{"repository":"Kong/kong","input_row":{"repository":"Kong/kong","url":"https://github.com/Kong/kong","name":"kong","owner":"Kong","description":"🦍 The API and AI Gateway","language":"Lua","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":44201,"issues":4626,"created_at":"2014-11-17T23:56:08Z","updated_at":"2026-09-27T13:10:05Z","first_commit_at":"2014-11-17T23:56:08Z","last_commit_at":"2026-09-23T12:48:43Z","activity_months":142.16999999999999,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:18.897Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Kong/kong","visibility":"public","created_at":"2014-11-17T23:56:08Z","updated_at":"2026-09-27T13:10:05Z","private":false,"fork":false,"archived":false,"stargazers_count":44201,"open_issues_count":210,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3594","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17A172B:1BBE3CE:6AB927C6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3593","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0822:380E1C:17AEBB5:1BCB4ED:6AB927C7"},"commit":{"sha":"6263443936440291da5654a7bff00acf50fe7c40","url":"https://github.com/Kong/kong/commit/6263443936440291da5654a7bff00acf50fe7c40","date":"2018-05-23T01:44:53Z","author_date":"2018-03-22T19:44:08Z","committer_date":"2018-05-23T01:44:53Z","tree_sha":"cca91e19c7145df787cf855f894aa7e966da36e7","message_first_line":"feat(jwt) add a maximum_expiration config value"},"tree_request_status":200,"tree_rate":{"github_remaining":"3592","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17A17CB:1BBE48B:6AB927C7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9929,"blob_sha":"a432d351c7f79dace1bd0c5c1e6b98963ed13da6","priority":0}],"documents":[{"path":"README.md","size":9929,"blob_sha":"a432d351c7f79dace1bd0c5c1e6b98963ed13da6","priority":0,"status":200,"text":"[![][kong-logo]][kong-url]\n\n[![Build Status][badge-travis-image]][badge-travis-url]\n\nKong is a cloud-native, fast, scalable, and distributed Microservice\nAbstraction Layer *(also known as an API Gateway, API Middleware or in some\ncases Service Mesh)*. Made available as an open-source project in 2015, its\ncore values are high performance and extensibility.\n\nActively maintained, Kong is widely used in production at companies ranging\nfrom startups to Global 5000 as well as government organizations.\n\n[Installation](https://konghq.com/install) |\n[Documentation](https://getkong.org/docs) |\n[Forum](https://discuss.konghq.com) |\n[Blog](https://konghq.com/blog) |\nIRC (freenode): [#kong](http://webchat.freenode.net/?channels=kong)\n\n## Summary\n\n- [**Why Kong?**](#why-kong)\n- [**Features**](#features)\n- [**Distributions**](#distributions)\n- [**Development**](#development)\n- [**Enterprise Support & Demo**](#enterprise-support--demo)\n- [**License**](#license)\n\n## Why Kong?\n\nIf you are building for web, mobile or IoT (Internet of Things) you will likely\nend up needing common functionality to run your actual software. Kong can\nhelp by acting as a gateway (or a sidecar) for microservices requests while\nproviding load balancing, logging, authentication, rate-limiting,\ntransformations, and more through plugins.\n\n[![][kong-benefits]][kong-url]\n\n## Features\n\n- **Cloud-Native**: Platform agnostic, Kong can run from bare metal to\n  Kubernetes.\n- **Dynamic Load Balancing**: Load balance traffic across multiple upstream\n  services.\n- **Hash-based Load Balancing**: Load balance with consistent hashing/sticky\n  sessions.\n- **Circuit-Breaker**: Intelligent tracking of unhealthy upstream services.\n- **Health Checks:** Active and passive monitoring of your upstream services.\n- **Service Discovery**: Resolve SRV records in third-party DNS resolvers like\n  Consul.\n- **Serverless**: Invoke and secure AWS Lambda or OpenWhisk functions directly\n  from Kong.\n- **WebSockets**: Communicate to your upstream services via WebSockets.\n- **OAuth2.0**: Easily add OAuth2.0 authentication to your APIs.\n- **Logging**: Log requests and responses to your system over HTTP, TCP, UDP,\n  or to disk.\n- **Security**: ACL, Bot detection, whitelist/blacklist IPs, etc...\n- **Syslog**: Logging to System log.\n- **SSL**: Setup a Specific SSL Certificate for an underlying service or API.\n- **Monitoring**: Live monitoring provides key load and performance server\n  metrics.\n- **Forward Proxy**: Make Kong connect to intermediary transparent HTTP proxies.\n- **Authentications**: HMAC, JWT, Basic, and more.\n- **Rate-limiting**: Block and throttle requests based on many variables.\n- **Transformations**: Add, remove, or manipulate HTTP requests and responses.\n- **Caching**: Cache and serve responses at the proxy layer.\n- **CLI**: Control your Kong cluster from the command line.\n- **REST API**: Kong can be operated with its RESTful API for maximum\n  flexibility.\n- **Geo-Replicated**: Configs are always up-to-date across different regions.\n- **Failure Detection & Recovery**: Kong is unaffected if one of your Cassandra\n  nodes goes down.\n- **Clustering**: All Kong nodes auto-join the cluster keeping their config\n  updated across nodes.\n- **Scalability**: Distributed by nature, Kong scales horizontally by simply\n  adding nodes.\n- **Performance**: Kong handles load with ease by scaling and using NGINX at\n  the core.\n- **Plugins**: Extendable architecture for adding functionality to Kong and\n  APIs.\n\nFor more info about plugins, you can check out the [Plugins\nHub](https://konghq.com/plugins/).\n\n## Distributions\n\nKong comes in many shapes. While this repository contains its core's source\ncode, other repos are also under active development:\n\n- [Kong Docker](https://github.com/Kong/docker-kong): A Dockerfile for\n  running Kong in Docker.\n- [Kong Packages](https://github.com/Kong/kong/releases): Pre-built packages\n  for Debian, Red Hat, and OS X distributions (shipped with each release).\n- [Kong Vagrant](https://github.com/Kong/kong-vagrant): A Vagrantfile for\n  provisioning a development ready environment for Kong.\n- [Kong Homebrew](https://github.com/Kong/homebrew-kong): Homebrew Formula\n  for Kong.\n- [Kong CloudFormation](https://github.com/Kong/kong-dist-cloudformation):\n  Kong in a 1-click deployment for AWS EC2\n- [Kong AWS AMI](https://aws.amazon.com/marketplace/pp/B014GHERVU): Kong AMI on\n  the AWS Marketplace.\n- [Kong on Microsoft Azure](https://github.com/Kong/kong-dist-azure): Run Kong\n  using Azure Resource Manager.\n- [Kong on Heroku](https://github.com/heroku/heroku-kong): Deploy Kong on\n  Heroku in one click.\n- [Kong and Instaclustr](https://www.instaclustr.com/solutions/managed-cassandra-for-kong/): Let\n  Instaclustr manage your Cassandra cluster.\n\n\n## Development\n\nIf you are planning on developing on Kong, you'll need a development\ninstallation. The `next` branch holds the latest unreleased source code.\n\nYou can read more about writing your own plugins in the [Plugin Development\nGuide](https://getkong.org/docs/latest/plugin-development/), or browse an\nonline version of Kong's source code documentation in the [Public Lua API\nReference](https://getkong.org/docs/latest/lua-reference/).\n\n#### Vagrant\n\nYou can use a Vagrant box running Kong and Postgres that you can find at\n[Mashape/kong-vagrant](https://github.com/Kong/kong-vagrant).\n\n#### Source Install\n\nKong mostly is an OpenResty application made of Lua source files, but also\nrequires some additional third-party dependencies. We recommend installing\nthose by following the source install instructions at\nhttps://getkong.org/install/source/.\n\nInstead of following the second step (Install Kong), clone this repository\nand install the latest Lua sources instead of the currently released ones:\n\n```shell\n$ git clone https://github.com/Kong/kong\n$ cd kong/\n\n# you might want to switch to the development branch. See CONTRIBUTING.md\n$ git checkout next\n\n# install the Lua sources\n$ luarocks make\n```\n\n#### Running for development\n\nCheck out the [development section](https://github.com/Kong/kong/blob/next/kong.conf.default#L244)\nof the default configuration file for properties to tweak in order to ease\nthe development process for Kong.\n\nModifying the [`lua_package_path`](https://github.com/openresty/lua-nginx-module#lua_package_path)\nand [`lua_package_cpath`](https://github.com/openresty/lua-nginx-module#lua_package_cpath)\ndirectives will allow Kong to find your custom plugin's source code wherever it\nmight be in your system.\n\n#### Tests\n\nInstall the development dependencies ([busted], [luacheck]) with:\n\n```shell\n$ make dev\n```\n\nKong relies on three test suites using the [busted] testing library:\n\n* Unit tests\n* Integration tests, which require Postgres and Cassandra to be up and running\n* Plugins tests, which require Postgres to be running\n\nThe first can simply be run after installing busted and running:\n\n```\n$ make test\n```\n\nHowever, the integration and plugins tests will spawn a Kong instance and\nperform their tests against it. As so, consult/edit the `spec/kong_tests.conf`\nconfiguration file to make your test instance point to your Postgres/Cassandra\nservers, depending on your needs.\n\nYou can run the integration tests (assuming **both** Postgres and Cassandra are\nrunning and configured according to `spec/kong_tests.conf`) with:\n\n```\n$ make test-integration\n```\n\nAnd the plugins tests with:\n\n```\n$ make test-plugins\n```\n\nFinally, all suites can be run at once by simply using:\n\n```\n$ make test-all\n```\n\nConsult the [run_tests.sh](.ci/run_tests.sh) script for a more advanced example\nusage of the tests suites and the Makefile.\n\nFinally, a very useful tool in Lua development (as with many other dynamic\nlanguages) is performing static linting of your code. You can use [luacheck]\n\\(installed with `make dev`\\) for this:\n\n```\n$ make lint\n```\n\n#### Makefile\n\nWhen developing, you can use the `Makefile` for doing the following operations:\n\n| Name               | Description                                            |\n| ------------------:| -------------------------------------------------------|\n| `install`          | Install the Kong luarock globally                      |\n| `dev`              | Install development dependencies                       |\n| `lint`             | Lint Lua files in `kong/` and `spec/`                  |\n| `test`             | Run the unit tests suite                               |\n| `test-integration` | Run the integration tests suite                        |\n| `test-plugins`     | Run the plugins test suite                             |\n| `test-all`         | Run all unit + integration + plugins tests at once     |\n\n## Enterprise Support & Demo\n\nIf you are working in a large organization you should learn more about [Kong\nEnterprise](https://konghq.com/kong-enterprise-edition/).\n\n## License\n\n```\nCopyright 2016-2018 Kong Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[kong-url]: https://konghq.com/\n[kong-logo]: https://d2ffutrenqvap3.cloudfront.net/items/1946191x3s1H0M2u3J18/slack-imgs.png\n[kong-benefits]: https://cl.ly/002i2Z432A1s/Image%202017-10-16%20at%2012.30.08%20AM.png\n[google-groups-url]: https://groups.google.com/forum/#!forum/konglayer\n[badge-travis-url]: https://travis-ci.org/Kong/kong/branches\n[badge-travis-image]: https://travis-ci.org/Kong/kong.svg?branch=master\n\n[busted]: https://github.com/Olivine-Labs/busted\n[luacheck]: https://github.com/mpeterv/luacheck\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7F84:2C474:1794E8:5CA36C:6AB92033"},"text_sha256":"94b8be988d2f0181ef451446a84f0e6046b9c122ab9fafa6bd13daafa6bf4393"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3591","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DC:71E0C:17CD9AE:1BE9E89:6AB927C8"},"commit":{"sha":"1730282ec2f8ed097cf6ad6a3d69e55b7ba9ebb6","url":"https://github.com/Kong/kong/commit/1730282ec2f8ed097cf6ad6a3d69e55b7ba9ebb6","date":"2026-06-17T06:16:31Z","author_date":"2026-06-17T06:16:31Z","committer_date":"2026-06-17T06:16:31Z","tree_sha":"307d05b0975b01aad7776b95395cf88781a011b6","message_first_line":"docs(release): add 3.9.3 changelog to changelog.md (#14913)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3590","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089F:1DB627:184C6AE:1C6A1CA:6AB927C9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9332,"blob_sha":"53d20a11edfe5704ced306688631a6a28875c1fb","priority":0},{"path":"changelog/3.7.0/kong/feat-hybrid-sync-mixed-route-policy.yml","size":499,"blob_sha":"874c8220b02f73b507009291263b2334aa49c976","priority":1},{"path":"SECURITY.md","size":446,"blob_sha":"a773ec0afddcc1044aa21d7cb6a997f552b99888","priority":1}],"documents":[{"path":"README.md","size":9332,"blob_sha":"53d20a11edfe5704ced306688631a6a28875c1fb","priority":0,"status":200,"text":"[![][kong-logo]][kong-url]\n\n![Stars](https://img.shields.io/github/stars/Kong/kong?style=flat-square) ![GitHub commit activity](https://img.shields.io/docker/pulls/_/kong?style=flat-square) [![Build Status][badge-action-image]][badge-action-url] ![Version](https://img.shields.io/github/v/release/Kong/kong?color=green&label=Version&style=flat-square)  ![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=flat-square) [![Twitter Follow](https://img.shields.io/twitter/follow/thekonginc?style=social)](https://x.com/thekonginc)\n\n\nKong or Kong Gateway is a cloud-native, platform-agnostic, scalable **API 𖧹 LLM 𖧹 MCP** Gateway distinguished for its high performance and extensibility via plugins. It also provides advanced AI traffic capabilities with multi-LLM support, semantic security, MCP traffic security and analytics, and more.\n\nBy providing functionality for proxying, routing, load balancing, health checking, authentication (and [more](#features)), Kong serves as the central layer for orchestrating microservices or conventional API traffic - and agentic LLM and MCP as well - with ease.\n\nKong runs natively on Kubernetes thanks to its official [Kubernetes Ingress Controller](https://github.com/Kong/kubernetes-ingress-controller).\n\n<br />\n\n[![][kong-diagram]][kong-url]\n\n---\n\n[Installation](https://konghq.com/install/#kong-community) | [Documentation](https://docs.konghq.com) | [Discussions](https://github.com/Kong/kong/discussions) | [Forum](https://discuss.konghq.com) | [Blog](https://konghq.com/blog) | [Builds][kong-master-builds] | [AI Gateway](https://konghq.com/products/kong-ai-gateway) | [Cloud Hosted Kong](https://konghq.com/kong-konnect/)\n\n---\n\n## Getting Started\n\nIf you prefer to use a cloud-hosted Kong, you can [sign up for a free trial of Kong Konnect](https://konghq.com/products/kong-konnect/register?utm_medium=Referral&utm_source=Github&utm_campaign=kong-gateway&utm_content=konnect-promo-in-gateway&utm_term=get-started) and get started in minutes. If not, you can follow the instructions below to get started with Kong on your own infrastructure.\n\nLet’s test drive Kong by adding authentication to an API in under 5 minutes.\n\nWe suggest using the docker-compose distribution via the instructions below, but there is also a [docker installation](https://docs.konghq.com/gateway/latest/install/docker/#install-kong-gateway-in-db-less-mode) procedure if you’d prefer to run the Kong Gateway in DB-less mode.\n\nWhether you’re running in the cloud, on bare metal, or using containers, you can find every supported distribution on our [official installation](https://konghq.com/install/#kong-community) page.\n\n1) To start, clone the Docker repository and navigate to the compose folder.\n```cmd\n  $ git clone https://github.com/Kong/docker-kong\n  $ cd docker-kong/compose/\n```\n\n2) Start the Gateway stack using:\n```cmd\n  $ KONG_DATABASE=postgres docker-compose --profile database up\n```\n\nThe Gateway is now available on the following ports on localhost:\n\n- `:8000` - send traffic to your service via Kong\n- `:8001` - configure Kong using Admin API or via [decK](https://github.com/kong/deck)\n- `:8002` - access Kong's management Web UI ([Kong Manager](https://github.com/Kong/kong-manager)) on [localhost:8002](http://localhost:8002)\n\nNext, follow the [quick start guide](https://docs.konghq.com/gateway-oss/latest/getting-started/configuring-a-service/\n) to tour the Gateway features.\n\n### Getting started with AI Gateway for LLM and MCP\n\nIf you would like to get started with Kong AI Gateway capabilities including LLM and MCP features, please refer to the [official AI documentation](https://developer.konghq.com/ai-gateway/).\n\n## Features\n\nBy centralizing common API, AI and MCP functionality across all your organization's services, Kong Gateway creates more freedom for engineering teams to focus on the challenges that matter most.\n\nThe top Kong features include:\n\n- Advanced routing, load balancing, health checking - all configurable via a RESTful admin API or declarative configuration.\n- Authentication and authorization for APIs using methods like JWT, basic auth, OAuth, ACLs and more.\n- Universal LLM API to route across multiple providers like OpenAI, Anthropic, GCP Gemini, AWS Bedrock, Azure AI, Databricks, Mistral, Huggingface and more.\n- MCP traffic governance, MCP security and MCP observability in addition to MCP autogeneration from any RESTful API.\n- 60+ AI features like AI observability, semantic security and caching, semantic routing and more.\n- Proxy, SSL/TLS termination, and connectivity support for L4 or L7 traffic.\n- Plugins for enforcing traffic controls, rate limiting, req/res transformations, logging, monitoring and including a plugin developer hub.\n- Sophisticated deployment models like Declarative Databaseless Deployment and Hybrid Deployment (control plane/data plane separation) without any vendor lock-in.\n- Native [ingress controller](https://github.com/Kong/kubernetes-ingress-controller) support for serving Kubernetes.\n\n[![][kong-benefits]][kong-url]\n\n### Plugin Hub\n\nPlugins provide advanced functionality that extends the use of the Gateway. Many of the Kong Inc. and community-developed plugins like AWS Lambda, Correlation ID, and Response Transformer are showcased at the [Plugin Hub](https://docs.konghq.com/hub/).\n\nContribute to the Plugin Hub and ensure your next innovative idea is published and available to the broader community!\n\n## Contributing\n\nWe ❤️ pull requests, and we’re continually working hard to make it as easy as possible for developers to contribute. Before beginning development with the Kong Gateway, please familiarize yourself with the following developer resources:\n\n- Community Pledge ([COMMUNITY_PLEDGE.md](COMMUNITY_PLEDGE.md)) for our pledge to interact with you, the open source community.\n- Contributor Guide ([CONTRIBUTING.md](CONTRIBUTING.md)) to learn about how to contribute to Kong.\n- Development Guide ([DEVELOPER.md](DEVELOPER.md)): Setting up your development environment.\n- [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) and [COPYRIGHT](COPYRIGHT)\n\nUse the [Plugin Development Guide](https://docs.konghq.com/latest/plugin-development/) for building new and creative plugins, or browse the online version of Kong's source code documentation in the [Plugin Development Kit (PDK) Reference](https://docs.konghq.com/latest/pdk/). Developers can build plugins in [Lua](https://docs.konghq.com/gateway/latest/plugin-development/), [Go](https://docs.konghq.com/gateway-oss/latest/external-plugins/#developing-go-plugins) or [JavaScript](https://docs.konghq.com/gateway-oss/latest/external-plugins/#developing-javascript-plugins).\n\n## Releases\n\nPlease see the [Changelog](CHANGELOG.md) for more details about a given release. The [SemVer Specification](https://semver.org) is followed when versioning Gateway releases.\n\n## Join the Community\n\n- Check out the [docs](https://docs.konghq.com/)\n- Join the [Kong discussions forum](https://github.com/Kong/kong/discussions)\n- Join the Kong discussions at the Kong Nation forum: [https://discuss.konghq.com/](https://discuss.konghq.com/)\n- Join our [Community Slack](http://kongcommunity.slack.com/)\n- Read up on the latest happenings at our [blog](https://konghq.com/blog/)\n- Follow us on [X](https://x.com/thekonginc)\n- Subscribe to our [YouTube channel](https://www.youtube.com/c/KongInc/videos)\n- Visit our [homepage](https://konghq.com/) to learn more\n\n## Konnect Cloud\n\nKong Inc. offers commercial subscriptions that enhance the Kong Gateway in a variety of ways. Customers of Kong's [Konnect Cloud](https://konghq.com/kong-konnect/) subscription take advantage of additional gateway functionality, commercial support, and access to Kong's managed (SaaS) control plane platform. The Konnect Cloud platform features include real-time analytics, a service catalog, developer portals, and so much more! [Get started](https://konghq.com/products/kong-konnect/register?utm_medium=Referral&utm_source=Github&utm_campaign=kong-gateway&utm_content=konnect-promo-in-gateway&utm_term=get-started) with Konnect Cloud.\n\n## License\n\n```\nCopyright 2016-2026 Kong Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[kong-url]: https://konghq.com/\n[kong-logo]: https://konghq.com/wp-content/uploads/2018/05/kong-logo-github-readme.png\n[kong-diagram]: https://assets.prd.mktg.konghq.com/images/2025/09/68cc1bfd-kong-diagram.png?v=2\n[kong-benefits]: https://konghq.com/wp-content/uploads/2018/05/kong-benefits-github-readme.png\n[kong-master-builds]: https://hub.docker.com/r/kong/kong/tags\n[badge-action-url]: https://github.com/Kong/kong/actions\n[badge-action-image]: https://github.com/Kong/kong/actions/workflows/build_and_test.yml/badge.svg?branch=master&event=push\n\n[busted]: https://github.com/Olivine-Labs/busted\n[luacheck]: https://github.com/mpeterv/luacheck\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D356:149227:179F0F:5CAE7E:6AB92033"},"text_sha256":"376442dbbec623bc2edaf4473baa768c5bd4e56c391e480719692ea3e84d2d0b"},{"path":"changelog/3.7.0/kong/feat-hybrid-sync-mixed-route-policy.yml","size":499,"blob_sha":"874c8220b02f73b507009291263b2334aa49c976","priority":1,"status":200,"text":"message: |\n  Improved config handling when the CP runs with the router set to the `expressions` flavor:\n    - If mixed config is detected and a lower DP is attached to the CP, no config will be sent at all\n    - If the expression is invalid on the CP, no config will be sent at all\n    - If the expression is invalid on a lower DP, it will be sent to the DP and DP validation will catch this and communicate back to the CP (this could result in partial config application)\ntype: feature\nscope: Core\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D420:349C76:170B2C:5C1634:6AB92035"},"text_sha256":"3afcf02570195f7712525ba38d0b5b3e37f2a9afd694f849ee50f05b822c1d25"},{"path":"SECURITY.md","size":446,"blob_sha":"a773ec0afddcc1044aa21d7cb6a997f552b99888","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\nTo report a vulnerability in the Kong gateway, Insomnia or other Kong software, or know of a publicly disclosed security vulnerability, please immediately let us know by emailing security@konghq.com.\n\nFor more detailed information, please see [Kong's Security Update Process](https://docs.konghq.com/gateway/latest/plan-and-deploy/security/kong-security-update-process/#reporting-a-vulnerability).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3346:345ED4:171A80:5C2869:6AB92035"},"text_sha256":"72a4c45d92393ac95ea6406af486c2f58cb5389d4cf206a2e5e624be928f414e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"explosion/spaCy","input_row":{"repository":"explosion/spaCy","url":"https://github.com/explosion/spaCy","name":"spaCy","owner":"explosion","description":"💫 Industrial-strength Natural Language Processing (NLP) in Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":33924,"issues":5773,"created_at":"2014-07-03T15:15:40Z","updated_at":"2026-09-27T12:17:40Z","first_commit_at":"2014-07-03T15:15:40Z","last_commit_at":"2026-08-24T08:26:02Z","activity_months":145.69,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; neural-network; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:22.600Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"explosion/spaCy","visibility":"public","created_at":"2014-07-03T15:15:40Z","updated_at":"2026-09-27T12:17:40Z","private":false,"fork":false,"archived":false,"stargazers_count":33924,"open_issues_count":246,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3589","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:17DE368:1BFBC46:6AB927CA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3588","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:1788B54:1BA6213:6AB927CB"},"commit":{"sha":"592834183ad0c8097f7290631681012d9b1bb39a","url":"https://github.com/explosion/spaCy/commit/592834183ad0c8097f7290631681012d9b1bb39a","date":"2018-05-24T11:29:52Z","author_date":"2018-05-24T11:29:52Z","committer_date":"2018-05-24T11:29:52Z","tree_sha":"b1652745a34a2fd94cb3e71475c509c669405c18","message_first_line":"corrected spelling (#2359)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3587","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A2:62B94:179D781:1BBAD79:6AB927CB"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":12129,"blob_sha":"98c880a04879b294a47888ad8540601c0e8ef03e","priority":0}],"documents":[{"path":"README.rst","size":12129,"blob_sha":"98c880a04879b294a47888ad8540601c0e8ef03e","priority":0,"status":200,"text":"spaCy: Industrial-strength NLP\n******************************\n\nspaCy is a library for advanced Natural Language Processing in Python and Cython.\nIt's built on the very latest research, and was designed from day one to be\nused in real products. spaCy comes with\n`pre-trained statistical models <https://spacy.io/models>`_ and word\nvectors, and currently supports tokenization for **20+ languages**. It features\nthe **fastest syntactic parser** in the world, convolutional **neural network models**\nfor tagging, parsing and **named entity recognition** and easy **deep learning**\nintegration. It's commercial open-source software, released under the MIT license.\n\n💫 **Version 2.0 out now!** `Check out the new features here. <https://spacy.io/usage/v2>`_\n\n.. image:: https://img.shields.io/travis/explosion/spaCy/master.svg?style=flat-square&logo=travis\n    :target: https://travis-ci.org/explosion/spaCy\n    :alt: Build Status\n\n.. image:: https://img.shields.io/appveyor/ci/explosion/spaCy/master.svg?style=flat-square&logo=appveyor\n    :target: https://ci.appveyor.com/project/explosion/spaCy\n    :alt: Appveyor Build Status\n\n.. image:: https://img.shields.io/github/release/explosion/spacy.svg?style=flat-square\n    :target: https://github.com/explosion/spaCy/releases\n    :alt: Current Release Version\n\n.. image:: https://img.shields.io/pypi/v/spacy.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/spacy\n    :alt: pypi Version\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/spacy.svg?style=flat-square\n    :target: https://anaconda.org/conda-forge/spacy\n    :alt: conda Version\n\n.. image:: https://img.shields.io/badge/chat-join%20%E2%86%92-09a3d5.svg?style=flat-square&logo=gitter-white\n    :target: https://gitter.im/explosion/spaCy\n    :alt: spaCy on Gitter\n\n.. image:: https://img.shields.io/twitter/follow/spacy_io.svg?style=social&label=Follow\n    :target: https://twitter.com/spacy_io\n    :alt: spaCy on Twitter\n\n📖 Documentation\n================\n\n===================  ===\n`spaCy 101`_         New to spaCy? Here's everything you need to know!\n`Usage Guides`_      How to use spaCy and its features.\n`New in v2.0`_       New features, backwards incompatibilities and migration guide.\n`API Reference`_     The detailed reference for spaCy's API.\n`Models`_            Download statistical language models for spaCy.\n`Universe`_          Libraries, extensions, demos, books and courses.\n`Changelog`_         Changes and version history.\n`Contribute`_        How to contribute to the spaCy project and code base.\n===================  ===\n\n.. _spaCy 101: https://spacy.io/usage/spacy-101\n.. _New in v2.0: https://spacy.io/usage/v2#migrating\n.. _Usage Guides: https://spacy.io/usage/\n.. _API Reference: https://spacy.io/api/\n.. _Models: https://spacy.io/models\n.. _Universe: https://spacy.io/universe\n.. _Changelog: https://spacy.io/usage/#changelog\n.. _Contribute: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md\n\n💬 Where to ask questions\n==========================\n\nThe spaCy project is maintained by `@honnibal <https://github.com/honnibal>`_\nand `@ines <https://github.com/ines>`_. Please understand that we won't be able\nto provide individual support via email. We also believe that help is much more\nvaluable if it's shared publicly, so that more people can benefit from it.\n\n====================== ===\n**Bug Reports**        `GitHub Issue Tracker`_\n**Usage Questions**    `StackOverflow`_, `Gitter Chat`_, `Reddit User Group`_\n**General Discussion** `Gitter Chat`_, `Reddit User Group`_\n====================== ===\n\n.. _GitHub Issue Tracker: https://github.com/explosion/spaCy/issues\n.. _StackOverflow: http://stackoverflow.com/questions/tagged/spacy\n.. _Gitter Chat: https://gitter.im/explosion/spaCy\n.. _Reddit User Group: https://www.reddit.com/r/spacynlp\n\nFeatures\n========\n\n* **Fastest syntactic parser** in the world\n* **Named entity** recognition\n* Non-destructive **tokenization**\n* Support for **20+ languages**\n* Pre-trained `statistical models <https://spacy.io/models>`_ and word vectors\n* Easy **deep learning** integration\n* Part-of-speech tagging\n* Labelled dependency parsing\n* Syntax-driven sentence segmentation\n* Built in **visualizers** for syntax and NER\n* Convenient string-to-hash mapping\n* Export to numpy data arrays\n* Efficient binary serialization\n* Easy **model packaging** and deployment\n* State-of-the-art speed\n* Robust, rigorously evaluated accuracy\n\n📖  **For more details, see the** `facts, figures and benchmarks <https://spacy.io/usage/facts-figures>`_.\n\nInstall spaCy\n=============\n\nFor detailed installation instructions, see\nthe `documentation <https://spacy.io/usage>`_.\n\n==================== ===\n**Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)\n**Python version**   CPython 2.7, 3.4+. Only 64 bit.\n**Package managers** `pip`_ (source packages only), `conda`_ (via ``conda-forge``)\n==================== ===\n\n.. _pip: https://pypi.python.org/pypi/spacy\n.. _conda: https://anaconda.org/conda-forge/spacy\n\npip\n---\n\nUsing pip, spaCy releases are currently only available as source packages.\n\n.. code:: bash\n\n    pip install spacy\n\nWhen using pip it is generally recommended to install packages in a virtual\nenvironment to avoid modifying system state:\n\n.. code:: bash\n\n    venv .env\n    source .env/bin/activate\n    pip install spacy\n\nconda\n-----\n\nThanks to our great community, we've finally re-added conda support. You can now\ninstall spaCy via ``conda-forge``:\n\n.. code:: bash\n\n    conda config --add channels conda-forge\n    conda install spacy\n\nFor the feedstock including the build recipe and configuration,\ncheck out `this repository <https://github.com/conda-forge/spacy-feedstock>`_.\nImprovements and pull requests to the recipe and setup are always appreciated.\n\nUpdating spaCy\n--------------\n\nSome updates to spaCy may require downloading new statistical models. If you're\nrunning spaCy v2.0 or higher, you can use the ``validate`` command to check if\nyour installed models are compatible and if not, print details on how to update\nthem:\n\n.. code:: bash\n\n    pip install -U spacy\n    python -m spacy validate\n\nIf you've trained your own models, keep in mind that your training and runtime\ninputs must match. After updating spaCy, we recommend **retraining your models**\nwith the new version.\n\n📖  **For details on upgrading from spaCy 1.x to spaCy 2.x, see the**\n`migration guide <https://spacy.io/usage/v2#migrating>`_.\n\nDownload models\n===============\n\nAs of v1.7.0, models for spaCy can be installed as **Python packages**.\nThis means that they're a component of your application, just like any\nother module. Models can be installed using spaCy's ``download`` command,\nor manually by pointing pip to a path or URL.\n\n======================= ===\n`Available Models`_     Detailed model descriptions, accuracy figures and benchmarks.\n`Models Documentation`_ Detailed usage instructions.\n======================= ===\n\n.. _Available Models: https://spacy.io/models\n.. _Models Documentation: https://spacy.io/docs/usage/models\n\n.. code:: bash\n\n    # out-of-the-box: download best-matching default model\n    python -m spacy download en\n\n    # download best-matching version of specific model for your spaCy installation\n    python -m spacy download en_core_web_lg\n\n    # pip install .tar.gz archive from path or URL\n    pip install /Users/you/en_core_web_sm-2.0.0.tar.gz\n\nIf you have SSL certification problems, SSL customization options are described in the help:\n\n    # help for the download command\n    python -m spacy download --help\n\nLoading and using models\n------------------------\n\nTo load a model, use ``spacy.load()`` with the model's shortcut link:\n\n.. code:: python\n\n    import spacy\n    nlp = spacy.load('en')\n    doc = nlp(u'This is a sentence.')\n\nIf you've installed a model via pip, you can also ``import`` it directly and\nthen call its ``load()`` method:\n\n.. code:: python\n\n    import spacy\n    import en_core_web_sm\n\n    nlp = en_core_web_sm.load()\n    doc = nlp(u'This is a sentence.')\n\n📖 **For more info and examples, check out the**\n`models documentation <https://spacy.io/docs/usage/models>`_.\n\nSupport for older versions\n--------------------------\n\nIf you're using an older version (``v1.6.0`` or below), you can still download\nand install the old models from within spaCy using ``python -m spacy.en.download all``\nor ``python -m spacy.de.download all``. The ``.tar.gz`` archives are also\n`attached to the v1.6.0 release <https://github.com/explosion/spaCy/tree/v1.6.0>`_.\nTo download and install the models manually, unpack the archive, drop the\ncontained directory into ``spacy/data`` and load the model via ``spacy.load('en')``\nor ``spacy.load('de')``.\n\nCompile from source\n===================\n\nThe other way to install spaCy is to clone its\n`GitHub repository <https://github.com/explosion/spaCy>`_ and build it from\nsource. That is the common way if you want to make changes to the code base.\nYou'll need to make sure that you have a development environment consisting of a\nPython distribution including header files, a compiler,\n`pip <https://pip.pypa.io/en/latest/installing/>`__, `virtualenv <https://virtualenv.pypa.io/>`_\nand `git <https://git-scm.com>`_ installed. The compiler part is the trickiest.\nHow to do that depends on your system. See notes on Ubuntu, OS X and Windows for\ndetails.\n\n.. code:: bash\n\n    # make sure you are using recent pip/virtualenv versions\n    python -m pip install -U pip venv\n    git clone https://github.com/explosion/spaCy\n    cd spaCy\n\n    venv .env\n    source .env/bin/activate\n    export PYTHONPATH=`pwd`\n    pip install -r requirements.txt\n    python setup.py build_ext --inplace\n\nCompared to regular install via pip, `requirements.txt <requirements.txt>`_\nadditionally installs developer dependencies such as Cython. For more details\nand instructions, see the documentation on\n`compiling spaCy from source <https://spacy.io/usage/#source>`_ and the\n`quickstart widget <https://spacy.io/usage/#section-quickstart>`_ to get\nthe right commands for your platform and Python version.\n\nInstead of the above verbose commands, you can also use the following\n`Fabric <http://www.fabfile.org/>`_ commands. All commands assume that your\nvirtual environment is located in a directory ``.env``. If you're using a\ndifferent directory, you can change it via the environment variable ``VENV_DIR``,\nfor example ``VENV_DIR=\".custom-env\" fab clean make``.\n\n============= ===\n``fab env``   Create virtual environment and delete previous one, if it exists.\n``fab make``  Compile the source.\n``fab clean`` Remove compiled objects, including the generated C++.\n``fab test``  Run basic tests, aborting after first failure.\n============= ===\n\nUbuntu\n------\n\nInstall system-level dependencies via ``apt-get``:\n\n.. code:: bash\n\n    sudo apt-get install build-essential python-dev git\n\nmacOS / OS X\n------------\n\nInstall a recent version of `XCode <https://developer.apple.com/xcode/>`_,\nincluding the so-called \"Command Line Tools\". macOS and OS X ship with Python\nand git preinstalled.\n\nWindows\n-------\n\nInstall a version of `Visual Studio Express <https://www.visualstudio.com/vs/visual-studio-express/>`_\nor higher that matches the version that was used to compile your Python\ninterpreter. For official distributions these are VS 2008 (Python 2.7),\nVS 2010 (Python 3.4) and VS 2015 (Python 3.5).\n\nRun tests\n=========\n\nspaCy comes with an `extensive test suite <spacy/tests>`_.  In order to run the\ntests, you'll usually want to clone the repository and build spaCy from source.\nThis will also install the required development dependencies and test utilities\ndefined in the ``requirements.txt``.\n\nAlternatively, you can find out where spaCy is installed and run ``pytest`` on\nthat directory. Don't forget to also install the test utilities via spaCy's\n``requirements.txt``:\n\n.. code:: bash\n\n    python -c \"import os; import spacy; print(os.path.dirname(spacy.__file__))\"\n    pip install -r path/to/requirements.txt\n    python -m pytest <spacy-directory>\n\nSee `the documentation <https://spacy.io/usage/#tests>`_ for more details and\nexamples.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"09CC:375F4:175C65:5C6C80:6AB9202A"},"text_sha256":"1c632b9eac4bac5ae3d460b1ff2869e77604ab46bfd71f9145f84dd5ba6499bc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3586","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:176378A:1B80FAD:6AB927CC"},"commit":{"sha":"e67199550e365dacee28b109210c3a43e1477638","url":"https://github.com/explosion/spaCy/commit/e67199550e365dacee28b109210c3a43e1477638","date":"2026-05-19T06:48:33Z","author_date":"2026-05-19T06:48:33Z","committer_date":"2026-05-19T06:48:33Z","tree_sha":"6cfd7883fe2f2d07af443816e6383aaf8e51809c","message_first_line":"Update README.md [ci skip]"},"tree_request_status":200,"tree_rate":{"github_remaining":"3585","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17B7E27:1BD5A40:6AB927CC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23759,"blob_sha":"cab0d800202627621e02d8bb11a5d5d3ef8cfac2","priority":0}],"documents":[{"path":"README.md","size":23759,"blob_sha":"cab0d800202627621e02d8bb11a5d5d3ef8cfac2","priority":0,"status":200,"text":"<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /><\/a>\n\n# spaCy: Industrial-strength NLP\n\nspaCy is a library for **advanced Natural Language Processing** in Python and\nCython. It's built on the very latest research, and was designed from day one to\nbe used in real products.\n\nspaCy comes with [pretrained pipelines](https://spacy.io/models) and currently\nsupports tokenization and training for **70+ languages**. It features\nstate-of-the-art speed and **neural network models** for tagging, parsing,\n**named entity recognition**, **text classification** and more, multi-task\nlearning with pretrained **transformers** like BERT, as well as a\nproduction-ready [**training system**](https://spacy.io/usage/training) and easy\nmodel packaging, deployment and workflow management. spaCy is commercial\nopen-source software, released under the\n[MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).\n\n💫 **Version 3.8 out now!**\n[Check out the release notes here.](https://github.com/explosion/spaCy/releases)\n\n[![tests](https://github.com/explosion/spaCy/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/spaCy/actions/workflows/tests.yml)\n[![Current Release Version](https://img.shields.io/github/release/explosion/spacy.svg?style=flat-square&logo=github)](https://github.com/explosion/spaCy/releases)\n[![pypi Version](https://img.shields.io/pypi/v/spacy.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/spacy/)\n[![conda Version](https://img.shields.io/conda/vn/conda-forge/spacy.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/spacy)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)\n<br />\n[![PyPi downloads](https://static.pepy.tech/personalized-badge/spacy?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pip%20downloads)](https://pypi.org/project/spacy/)\n[![Conda downloads](https://img.shields.io/conda/dn/conda-forge/spacy?label=conda%20downloads)](https://anaconda.org/conda-forge/spacy)\n\n## 📖 Documentation\n\n| Documentation                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ⭐️ **[spaCy 101]**                                                                                                                                                                                                       | New to spaCy? Here's everything you need to know!                                                                                                                                                                                                                                                                                            |\n| 📚 **[Usage Guides]**                                                                                                                                                                                                     | How to use spaCy and its features.                                                                                                                                                                                                                                                                                                           |\n| 🚀 **[New in v3.0]**                                                                                                                                                                                                      | New features, backwards incompatibilities and migration guide.                                                                                                                                                                                                                                                                               |\n| 🪐 **[Project Templates]**                                                                                                                                                                                                | End-to-end workflows you can clone, modify and run.                                                                                                                                                                                                                                                                                          |\n| 🎛 **[API Reference]**                                                                                                                                                                                                     | The detailed reference for spaCy's API.                                                                                                                                                                                                                                                                                                      |\n| ⏩ **[GPU Processing]**                                                                                                                                                                                                    | Use spaCy with CUDA-compatible GPU processing.                                                                                                                                                                                                                                                                                               |\n| 📦 **[Models]**                                                                                                                                                                                                           | Download trained pipelines for spaCy.                                                                                                                                                                                                                                                                                                        |\n| 🦙 **[Large Language Models]**                                                                                                                                                                                            | Integrate LLMs into spaCy pipelines.                                                                                                                                                                                                                                                                                                        |\n| 🌌 **[Universe]**                                                                                                                                                                                                         | Plugins, extensions, demos and books from the spaCy ecosystem.                                                                                                                                                                                                                                                                               |\n| ⚙️ **[spaCy VS Code Extension]**                                                                                                                                                                                          | Additional tooling and features for working with spaCy's config files.                                                                                                                                                                                                                                                                       |\n| 👩‍🏫 **[Online Course]**                                                                                                                                                                                                    | Learn spaCy in this free and interactive online course.                                                                                                                                                                                                                                                                                      |\n| 📰 **[Blog]**                                                                                                                                                                                                             | Read about current spaCy and Prodigy development, releases, talks and more from Explosion.                                                                                                                                                                                                                 |\n| 📺 **[Videos]**                                                                                                                                                                                                           | Our YouTube channel with video tutorials, talks and more.                                                                                                                                                                                                                                                                                    |\n| 🔴 **[Live Stream]**                                                                                                                                                                                                       | Join Matt as he works on spaCy and chat about NLP.                                                                                                                                                                                                                                                                         |\n| 🛠 **[Changelog]**                                                                                                                                                                                                         | Changes and version history.                                                                                                                                                                                                                                                                                                                 |\n| 💝 **[Contribute]**                                                                                                                                                                                                       | How to contribute to the spaCy project and code base.                                                                                                                                                                                                                                                                                        |\n| 👕 **[Swag]**                                                                                                                                                                                                             | Support us and our work with unique, custom-designed swag!                                                                                                                                                                                                                                                                                   |\n| <a href=\"https://explosion.ai/tailored-solutions\"><img src=\"https://github.com/explosion/spaCy/assets/13643239/36d2a42e-98c0-4599-90e1-788ef75181be\" width=\"150\" alt=\"Tailored Solutions\"/><\/a> | Custom NLP consulting, implementation and strategic advice by spaCy’s core development team. Streamlined, production-ready, predictable and maintainable. Send us an email or take our 5-minute questionnaire, and well'be in touch! **[Learn more &rarr;](https://explosion.ai/tailored-solutions)**                 |\n\n[spacy 101]: https://spacy.io/usage/spacy-101\n[new in v3.0]: https://spacy.io/usage/v3\n[usage guides]: https://spacy.io/usage/\n[api reference]: https://spacy.io/api/\n[gpu processing]: https://spacy.io/usage#gpu\n[models]: https://spacy.io/models\n[large language models]: https://spacy.io/usage/large-language-models\n[universe]: https://spacy.io/universe\n[spacy vs code extension]: https://github.com/explosion/spacy-vscode\n[videos]: https://www.youtube.com/c/ExplosionAI\n[live stream]: https://www.youtube.com/playlist?list=PLBmcuObd5An5_iAxNYLJa_xWmNzsYce8c\n[online course]: https://course.spacy.io\n[blog]: https://explosion.ai\n[project templates]: https://github.com/explosion/projects\n[changelog]: https://spacy.io/usage#changelog\n[contribute]: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md\n[swag]: https://explosion.ai/merch\n\n## 💬 Where to ask questions\n\nThe spaCy project is maintained by the [spaCy team](https://explosion.ai/about).\nPlease understand that we won't be able to provide individual support via email.\nWe also believe that help is much more valuable if it's shared publicly, so that\nmore people can benefit from it.\n\n| Type                            | Platforms                               |\n| ------------------------------- | --------------------------------------- |\n| 🚨 **Bug Reports**              | [GitHub Issue Tracker]                  |\n| 🎁 **Feature Requests & Ideas** | [GitHub Discussions] · [Live Stream]    |\n| 👩‍💻 **Usage Questions**          | [GitHub Discussions] · [Stack Overflow] |\n| 🗯 **General Discussion**        | [GitHub Discussions] · [Live Stream]   |\n\n[github issue tracker]: https://github.com/explosion/spaCy/issues\n[github discussions]: https://github.com/explosion/spaCy/discussions\n[stack overflow]: https://stackoverflow.com/questions/tagged/spacy\n[live stream]: https://www.youtube.com/playlist?list=PLBmcuObd5An5_iAxNYLJa_xWmNzsYce8c\n\n## Features\n\n- Support for **70+ languages**\n- **Trained pipelines** for different languages and tasks\n- Multi-task learning with pretrained **transformers** like BERT\n- Support for pretrained **word vectors** and embeddings\n- State-of-the-art speed\n- Production-ready **training system**\n- Linguistically-motivated **tokenization**\n- Components for named **entity recognition**, part-of-speech-tagging,\n  dependency parsing, sentence segmentation, **text classification**,\n  lemmatization, morphological analysis, entity linking and more\n- Easily extensible with **custom components** and attributes\n- Support for custom models in **PyTorch**, **TensorFlow** and other frameworks\n- Built in **visualizers** for syntax and NER\n- Easy **model packaging**, deployment and workflow management\n- Robust, rigorously evaluated accuracy\n\n📖 **For more details, see the\n[facts, figures and benchmarks](https://spacy.io/usage/facts-figures).**\n\n## ⏳ Install spaCy\n\nFor detailed installation instructions, see the\n[documentation](https://spacy.io/usage).\n\n- **Operating system**: macOS / OS X · Linux · Windows (Cygwin, MinGW, Visual\n  Studio)\n- **Python version**: Python >=3.7, <3.13 (only 64 bit)\n- **Package managers**: [pip] · [conda] (via `conda-forge`)\n\n[pip]: https://pypi.org/project/spacy/\n[conda]: https://anaconda.org/conda-forge/spacy\n\n### pip\n\nUsing pip, spaCy releases are available as source packages and binary wheels.\nBefore you install spaCy and its dependencies, make sure that your `pip`,\n`setuptools` and `wheel` are up to date.\n\n```bash\npip install -U pip setuptools wheel\npip install spacy\n```\n\nTo install additional data tables for lemmatization and normalization you can\nrun `pip install spacy[lookups]` or install\n[`spacy-lookups-data`](https://github.com/explosion/spacy-lookups-data)\nseparately. The lookups package is needed to create blank models with\nlemmatization data, and to lemmatize in languages that don't yet come with\npretrained models and aren't powered by third-party libraries.\n\nWhen using pip it is generally recommended to install packages in a virtual\nenvironment to avoid modifying system state:\n\n```bash\npython -m venv .env\nsource .env/bin/activate\npip install -U pip setuptools wheel\npip install spacy\n```\n\n### conda\n\nYou can also install spaCy from `conda` via the `conda-forge` channel. For the\nfeedstock including the build recipe and configuration, check out\n[this repository](https://github.com/conda-forge/spacy-feedstock).\n\n```bash\nconda install -c conda-forge spacy\n```\n\n### Updating spaCy\n\nSome updates to spaCy may require downloading new statistical models. If you're\nrunning spaCy v2.0 or higher, you can use the `validate` command to check if\nyour installed models are compatible and if not, print details on how to update\nthem:\n\n```bash\npip install -U spacy\npython -m spacy validate\n```\n\nIf you've trained your own models, keep in mind that your training and runtime\ninputs must match. After updating spaCy, we recommend **retraining your models**\nwith the new version.\n\n📖 **For details on upgrading from spaCy 2.x to spaCy 3.x, see the\n[migration guide](https://spacy.io/usage/v3#migrating).**\n\n## 📦 Download model packages\n\nTrained pipelines for spaCy can be installed as **Python packages**. This means\nthat they're a component of your application, just like any other module. Models\ncan be installed using spaCy's [`download`](https://spacy.io/api/cli#download)\ncommand, or manually by pointing pip to a path or URL.\n\n| Documentation              |                                                                  |\n| -------------------------- | ---------------------------------------------------------------- |\n| **[Available Pipelines]**  | Detailed pipeline descriptions, accuracy figures and benchmarks. |\n| **[Models Documentation]** | Detailed usage and installation instructions.                    |\n| **[Training]**             | How to train your own pipelines on your data.                    |\n\n[available pipelines]: https://spacy.io/models\n[models documentation]: https://spacy.io/usage/models\n[training]: https://spacy.io/usage/training\n\n```bash\n# Download best-matching version of specific model for your spaCy installation\npython -m spacy download en_core_web_sm\n\n# pip install .tar.gz archive or .whl from path or URL\npip install /Users/you/en_core_web_sm-3.0.0.tar.gz\npip install /Users/you/en_core_web_sm-3.0.0-py3-none-any.whl\npip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz\n```\n\n### Loading and using models\n\nTo load a model, use [`spacy.load()`](https://spacy.io/api/top-level#spacy.load)\nwith the model name or a path to the model data directory.\n\n```python\nimport spacy\nnlp = spacy.load(\"en_core_web_sm\")\ndoc = nlp(\"This is a sentence.\")\n```\n\nYou can also `import` a model directly via its full name and then call its\n`load()` method with no arguments.\n\n```python\nimport spacy\nimport en_core_web_sm\n\nnlp = en_core_web_sm.load()\ndoc = nlp(\"This is a sentence.\")\n```\n\n📖 **For more info and examples, check out the\n[models documentation](https://spacy.io/docs/usage/models).**\n\n## ⚒ Compile from source\n\nThe other way to install spaCy is to clone its\n[GitHub repository](https://github.com/explosion/spaCy) and build it from\nsource. That is the common way if you want to make changes to the code base.\nYou'll need to make sure that you have a development environment consisting of a\nPython distribution including header files, a compiler,\n[pip](https://pip.pypa.io/en/latest/installing/),\n[virtualenv](https://virtualenv.pypa.io/en/latest/) and\n[git](https://git-scm.com) installed. The compiler part is the trickiest. How to\ndo that depends on your system.\n\n| Platform    |                                                                                                                                                                                                                                                                     |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Ubuntu**  | Install system-level dependencies via `apt-get`: `sudo apt-get install build-essential python-dev git` .                                                                                                                                                            |\n| **Mac**     | Install a recent version of [XCode](https://developer.apple.com/xcode/), including the so-called \"Command Line Tools\". macOS and OS X ship with Python and git preinstalled.                                                                                        |\n| **Windows** | Install a version of the [Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) or [Visual Studio Express](https://visualstudio.microsoft.com/vs/express/) that matches the version that was used to compile your Python interpreter. |\n\nFor more details and instructions, see the documentation on\n[compiling spaCy from source](https://spacy.io/usage#source) and the\n[quickstart widget](https://spacy.io/usage#section-quickstart) to get the right\ncommands for your platform and Python version.\n\n```bash\ngit clone https://github.com/explosion/spaCy\ncd spaCy\n\npython -m venv .env\nsource .env/bin/activate\n\n# make sure you are using the latest pip\npython -m pip install -U pip setuptools wheel\n\npip install -r requirements.txt\npip install --no-build-isolation --editable .\n```\n\nTo install with extras:\n\n```bash\npip install --no-build-isolation --editable .[lookups,cuda102]\n```\n\n## 🚦 Run tests\n\nspaCy comes with an [extensive test suite](spacy/tests). In order to run the\ntests, you'll usually want to clone the repository and build spaCy from source.\nThis will also install the required development dependencies and test utilities\ndefined in the [`requirements.txt`](requirements.txt).\n\nAlternatively, you can run `pytest` on the tests from within the installed\n`spacy` package. Don't forget to also install the test utilities via spaCy's\n[`requirements.txt`](requirements.txt):\n\n```bash\npip install -r requirements.txt\npython -m pytest --pyargs spacy\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"32F4:09BF:AACE9:2C5FD2:6AB92039"},"text_sha256":"f7a66a3473456b6d28520c9aa8baafa57ac4404994808118f1a6ae8e9440c9ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"The-Art-of-Hacking/h4cker","input_row":{"repository":"The-Art-of-Hacking/h4cker","url":"https://github.com/The-Art-of-Hacking/h4cker","name":"h4cker","owner":"The-Art-of-Hacking","description":"This repository is maintained by Omar Santos (@santosomar) and includes thousands of resources related to ethical hacking, bug bounties, digital forensics and incident response (DFIR), AI security, vulnerability research, exploit development, reverse engineering, and more. 🔥 Also check: https://hackertraining.org","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":29549,"issues":208,"created_at":"2017-06-19T17:11:19Z","updated_at":"2026-09-27T11:53:03Z","first_commit_at":"2017-06-19T17:11:19Z","last_commit_at":"2026-09-23T04:48:29Z","activity_months":111.12,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:26.155Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"The-Art-of-Hacking/h4cker","visibility":"public","created_at":"2017-06-19T17:11:19Z","updated_at":"2026-09-27T11:53:03Z","private":false,"fork":false,"archived":false,"stargazers_count":29549,"open_issues_count":2,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3584","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:1274F06:15C25B3:6AB927CE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3583","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:17D0D1D:1BEE7C1:6AB927CE"},"commit":{"sha":"125195294f834b276fbfefaf4e048d2b584dd758","url":"https://github.com/The-Art-of-Hacking/h4cker/commit/125195294f834b276fbfefaf4e048d2b584dd758","date":"2018-05-22T22:33:15Z","author_date":"2018-05-22T22:33:15Z","committer_date":"2018-05-22T22:33:15Z","tree_sha":"37e016a99f98eb668228bf69a9a0bf1caee1be70","message_first_line":"Create registers.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3582","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17C656B:1BE3EBA:6AB927CE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2354,"blob_sha":"dd592021ff6412cc53943288676d244f80218d59","priority":0}],"documents":[{"path":"README.md","size":2354,"blob_sha":"dd592021ff6412cc53943288676d244f80218d59","priority":0,"status":200,"text":"# The Art of Hacking Series\n\n<center><img src=\"https://raw.githubusercontent.com/The-Art-of-Hacking/web/master/img/logo%20black.png\" width=\"200\" height=\"300\" /> <\/center>\n\nThe [Art of Hacking](http://theartofhacking.org) is a series of video courses that is a complete guide to help you get up and running with your cybersecurity career. This GitHub repository has been created to provide supplemental material, tons of references, scripts, and code that help you build your own hacking environment, examples of real-life penetration testing reports, and more.\n\nThe following are the different video courses that will be part of the Art of Hacking series:\n\n* [Security Penetration Testing (The Art of Hacking Series)](https://www.safaribooksonline.com/library/view/security-penetration-testing/9780134833989)\n* [Wireless Networks, IoT, and Mobile Devices Hacking (The Art of Hacking Series)](https://www.safaribooksonline.com/library/view/wireless-networks-iot/9780134854632/)\n* [Enterprise Penetration Testing and Continuous Monitoring (The Art of Hacking Series)](https://www.safaribooksonline.com/library/view/enterprise-penetration-testing/9780134854748)\n* Hacking Web Applications (The Art of Hacking Series) LiveLessons - Coming Soon!\n* Advanced Network Hacking (The Art of Hacking Series) LiveLessons - Coming Soon!\n\nThese courses serve as comprehensive guide for any network and security professional who is starting a career in ethical hacking and penetration testing. It also can help individuals preparing for the [Offensive Security Certified Professional (OSCP)](https://www.offensive-security.com/information-security-certifications/), the [Certified Ethical Hacker (CEH)](https://www.eccouncil.org/programs/certified-ethical-hacker-ceh/), [CompTIA PenTest+](https://certification.comptia.org/certifications/pentest) and any other ethical hacking certification. This course helps any cyber security professional that want to learn the skills required to becoming a professional ethical hacker or that want to learn more about general hacking methodologies and concepts.\n\nThese video courses are published by Pearson, but this GitHub repository is maintained and supported by the lead author of the series [Omar Santos](https://omarsantos.io/). \n\nOther Live Training and Video Courses: https://theartofhacking.org/go/training_resources.pdf \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C01C:7A4F8:17B7DD:5CC797:6AB9203A"},"text_sha256":"64af4799314dd08518ab4e7b39d82f73a2ac3481b254a58ad194c22be39f281d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3581","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AC:6C9BF:17DE736:1BFC0B6:6AB927CF"},"commit":{"sha":"e4db7367a981679f1b0aaef759562bb35b5b9f4f","url":"https://github.com/The-Art-of-Hacking/h4cker/commit/e4db7367a981679f1b0aaef759562bb35b5b9f4f","date":"2026-06-29T17:06:06Z","author_date":"2026-06-29T17:06:06Z","committer_date":"2026-06-29T17:06:06Z","tree_sha":"0ba605334a018215651d722eb3d5293f3fd49f7d","message_first_line":"Add Alfa Arsenal to wireless tools (#535)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3580","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17A1E8F:1BBEC87:6AB927D0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2458,"blob_sha":"3fbc4add93160bdcec5a26f20dc8b11c2318a731","priority":0},{"path":"ai/ai-security/ai_security_tools_root.md","size":4713,"blob_sha":"17e345979bb430c0a388e16f7d2a9b60fecc8bee","priority":1},{"path":"ai/ai-security/ai_security_tools.md","size":6225,"blob_sha":"fc078ef95124eb212798b3d863ac3bcf597bb62c","priority":1},{"path":"ai/ai-security/ai-security-overview.md","size":402,"blob_sha":"071f2e239d90ae8631b4452779600c56395122de","priority":1},{"path":"ai/ai-security/model_and_genai_application_security_testing.md","size":2501,"blob_sha":"0e5b8f5dda4dd0c85654bb895b35092f94b11b90","priority":1},{"path":"ai/ai-security/model_security_testing.md","size":441,"blob_sha":"e8815ce07e3808873a76f80fafe8a76ea65c059a","priority":1},{"path":"ai/course-materials/Creating Agents for Cybersecurity/modules/04-langgraph-security.md","size":8848,"blob_sha":"d373f50624f2d2b0cdbdbee5a637bd2390324261","priority":1},{"path":"ai/course-materials/Creating Agents for Cybersecurity/modules/08-foundry-security-spec.md","size":14591,"blob_sha":"30254b6a72cdb949bb5e4c70bc4131238b186fdb","priority":1},{"path":"ai/llm-engineering/ai_agentic_tools_for_cybersecurity.md","size":1481,"blob_sha":"cbbefbe661e81e741abd41ea3114e14ca9656d8d","priority":1},{"path":"ai/llm-engineering/ML-Fundamentals/glossary_of_terms.md","size":11867,"blob_sha":"1ded11e4ed3c81ed498738c4cdb297843e57d807","priority":1},{"path":"build-your-own-lab/security-onion-proxmox.md","size":5816,"blob_sha":"c9045449cac1a1b4ebaa4a1946c26a860dc0f8c6","priority":1},{"path":"certifications/cisco/scor-350-701/content_security_fundamentals.md","size":1236,"blob_sha":"cf1d7808e5ac60a789d4edbf86ce479d806d770e","priority":1},{"path":"cybersecurity-domains/application-security/web-application-testing/api_security_assessment_README.md","size":9966,"blob_sha":"830bdc35974138dbc05e490be163b7bdf50e2f95","priority":1},{"path":"cybersecurity-domains/application-security/web-application-testing/requirements_api_security.txt","size":330,"blob_sha":"e5ed6a278c917ed012f3275d23c42a98b8d88961","priority":1},{"path":"cybersecurity-domains/cloud-container-security/docker-and-k8s-security/kubernetes/network-policy-example.md","size":7585,"blob_sha":"e5ebf237fec252b5dd572f0d5c39928f6c7087a5","priority":1},{"path":"cybersecurity-domains/fundamentals/foundational-cybersecurity-concepts/Undertanding Information Security Controls.md","size":4472,"blob_sha":"6c774dcb975768911dcea30537638b66931d4067","priority":1},{"path":"training-reference/cheat-sheets/scripting/python-security.md","size":15760,"blob_sha":"4dbfb332593c173203928717dc97bd1811e140e9","priority":1},{"path":"training-reference/organized-tools/mobile-security_tools.md","size":14486,"blob_sha":"7f58e0f7f3b73b51d631233e26fdcee739e671c6","priority":1}],"documents":[{"path":"README.md","size":2458,"blob_sha":"3fbc4add93160bdcec5a26f20dc8b11c2318a731","priority":0,"status":200,"text":"[![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Fira+Code&weight=600&size=31&duration=4500&pause=1000&color=164B63&multiline=true&width=453&height=100&lines=HackerRepo.org+;Cybersecurity+Resources)](https://git.io/typing-svg)\n\nThis repository is a comprehensive collection of cybersecurity references, scripts, tools, code, labs, and training resources. It is carefully curated and maintained by [Omar Santos](https://omarsantos.io/).\n\n## Overview\n\nThe repository serves as supplemental material for books, video courses, and live training created by Omar Santos. It includes resources for offensive security, defensive security, cloud and container security, application security, AI security, certifications, labs, and reference material.\n\n## Directory Overview\n\n- **Cybersecurity Domains**: [cybersecurity-domains](cybersecurity-domains/) contains the main domain taxonomy, including fundamentals, offensive security, defensive security, application security, cloud and container security, infrastructure and network security, cryptography and PKI, hardware and embedded security, governance/risk/compliance, and labs/practice.\n- **AI**: [ai](ai/) contains AI security, LLM engineering, AI-assisted incident response and automation, and AI ethics/privacy/governance resources.\n- **Certifications**: [certifications](certifications/) contains certification roadmaps, Cisco SCOR, cloud certifications, Kubernetes/CNCF certifications, CompTIA, ISC2, offensive security certification references, and supplemental exam topics.\n- **Build Your Own Lab**: [build-your-own-lab](build-your-own-lab/) remains a root-level section for lab-building and cyber range resources.\n- **Training Reference**: [training-reference](training-reference/) contains cheat sheets, O'Reilly resources, curated people/projects to follow, and organized tool indexes.\n\n## How to Use\n\nStart with the domain landing page that matches your goal, then follow the links to tools, labs, scripts, and references. Certification resources are grouped separately so exam preparation material is easy to find without mixing it into the broader domain taxonomy.\n\n## Contributing\n\nIf you wish to contribute, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any inquiries or feedback, please contact [Omar Santos](https://www.linkedin.com/in/santosomar/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5568:18233:17331E:5C4197:6AB9203C"},"text_sha256":"c92f15ca635a4131532669da5ed7152cabcd74be677d88dd549e266f27089178"},{"path":"ai/ai-security/ai_security_tools_root.md","size":4713,"blob_sha":"17e345979bb430c0a388e16f7d2a9b60fecc8bee","priority":1,"status":200,"text":"# AI Security Tools\n\nThis is a work in progress, curated list of AI Security tools:\n\n## Open Source Tools for AI Red Teaming\n\n### Predictive AI\n- [The Adversarial Robustness Toolbox (ART)](https://github.com/Trusted-AI/adversarial-robustness-toolbox)\n- [Armory](https://github.com/twosixlabs/armory)\n- [Foolbox](https://github.com/bethgelab/foolbox)\n- [DeepSec](https://github.com/ryderling/DEEPSEC)\n- [TextAttack](https://github.com/QData/TextAttack)\n\n### Generative AI\n- [PyRIT](https://github.com/Azure/PyRIT)\n- [Garak](https://github.com/NVIDIA/garak)\n- [Prompt Fuzzer](https://github.com/prompt-security/ps-fuzz)\n- [Guardrail](https://github.com/guardrails-ai/guardrails)\n- [Promptfoo](https://github.com/promptfoo/promptfoo)\n- [PlexyGlass](https://github.com/safellama/plexiglass)\n-  [PurpleLlama](https://github.com/facebookresearch/PurpleLlama)\n-  [jailbreak-evaluation](https://github.com/controllability/jailbreak-evaluation)\n\n## Prompt Firewall and Redaction\n\n_Products that intercept prompts and responses and apply security or privacy rules to them. We've blended two categories here because some prompt firewalls just redact private data (and then reidentify in the response) while others focus on identifying and blocking attacks like injection attacks or stopping data leaks. Many of the products in this category do all of the above, which is why they've been combined._\n\n- [Cisco AI Defense](https://www.cisco.com/site/us/en/products/security/ai-defense/index.html) - Model Evaluation, monitoring, guardrails, inventory, AI asset discovery, and more.\n- [Robust Intelligence AI Firewall](https://www.robustintelligence.com/) - Now part of Cisco.\n- [Protect AI Rebuff](https://playground.rebuff.ai) - A LLM prompt injection detector. [![code](https://img.shields.io/github/license/protectai/rebuff)](https://github.com/protectai/rebuff/)\n- [Protect AI LLM Guard](https://protectai.com/llm-guard) - Suite of tools to protect LLM applications by helping you detect, redact, and sanitize LLM prompts and responses. [![code](https://img.shields.io/github/license/protectai/llm-guard)](https://github.com/protectai/llm-guard/)\n- [HiddenLayer AI Detection and Response](https://hiddenlayer.com/aidr/) - Proactively defend against threats to your LLMs.\n\n- [Vigil LLM](https://github.com/deadbits/vigil-llm) - Detect prompt injections, jailbreaks, and other potentially risky Large Language Model (LLM) inputs. ![code](https://img.shields.io/github/license/deadbits/vigil-llm)\n- [Lakera Guard](https://www.lakera.ai/lakera-guard) - Protection from prompt injections, data loss, and toxic content.\n- [Arthur Shield](https://www.arthur.ai/product/shield) - Built-in, real-time firewall protection against the biggest LLM risks.\n- [Prompt Security](https://www.prompt.security) - SDK and proxy for protection against common prompt attacks.\n- [Private AI](https://www.private-ai.com) - Detect, anonymize, and replace PII with less than half the error rate of alternatives.\n- [DynamoGuard](https://dynamo.ai/platform/dynamoguard) - Identify / defend against any type of non-compliance as defined by your specific AI policies and catch attacks.\n- [Skyflow LLM Privacy Vault](https://www.skyflow.com/product/llm-privacy-vault) - Redacts PII from prompts flowing to LLMs.\n- [Guardrails AI](https://www.guardrailsai.com) - Guardrails runs Input/Output Guards in your application that detect, quantify and mitigate the presence of specific types of risks. [![code](https://img.shields.io/github/license/guardrails-ai/guardrails)](https://github.com/guardrails-ai/guardrails/)\n\n## AI Red Teaming Guidance\n- [OWASP's GenAI Red Teaming Guide](https://genaisecurityproject.com/resource/genai-red-teaming-guide/) - guide includes four areas: model evaluation, implementation testing, infrastructure assessment, and runtime behavior analysis.\n- [OWASP's List of AI Security Tools](https://owaspai.org/docs/5_testing/#open-source-tools-for-predictive-ai-red-teaming)\n- [Guidance from the OWASP Generative AI Security Project](https://genai.owasp.org/initiatives/#ai-redteaming)\n- [Guidance from CSA](https://cloudsecurityalliance.org/artifacts/agentic-ai-red-teaming-guide)\n\n## AI Red Teaming Datasets\n- [AttaQ Dataset](https://huggingface.co/datasets/ibm/AttaQ) - a red teaming dataset consisting of 1402 carefully crafted adversarial questions\n- [HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal](https://arxiv.org/pdf/2402.04249)\n\n## Julia AI Security Tools\n\n- [Oracle](https://github.com/bad-antics/oracle) - AI-powered vulnerability prediction framework using GNN-based pattern recognition, CVE trend analysis, and CVSS scoring. Integrates NVD, MITRE ATT&CK, and EPSS data.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"612A:3EACB:172FAB:5C3EFF:6AB9203D"},"text_sha256":"feb77d2914ef8eb0d4efa9bfb1d0f83fb0ea42f2dde6cec41af60f6cef1c6fa6"},{"path":"ai/ai-security/ai_security_tools.md","size":6225,"blob_sha":"fc078ef95124eb212798b3d863ac3bcf597bb62c","priority":1,"status":200,"text":"# AI Security Tools\n\nThis is a work in progress, curated list of AI Security tools:\n\n## Open Source Tools for AI Red Teaming\n\n### Predictive AI\n- [The Adversarial Robustness Toolbox (ART)](https://github.com/Trusted-AI/adversarial-robustness-toolbox)\n- [Armory](https://github.com/twosixlabs/armory)\n- [Foolbox](https://github.com/bethgelab/foolbox)\n- [DeepSec](https://github.com/ryderling/DEEPSEC)\n- [TextAttack](https://github.com/QData/TextAttack)\n\n### Generative AI\n- [PyRIT](https://github.com/Azure/PyRIT)\n- [Garak](https://github.com/NVIDIA/garak)\n- [Prompt Fuzzer](https://github.com/prompt-security/ps-fuzz)\n- [Guardrail](https://github.com/guardrails-ai/guardrails)\n- [Promptfoo](https://github.com/promptfoo/promptfoo)\n- [PlexyGlass](https://github.com/safellama/plexiglass)\n-  [PurpleLlama](https://github.com/facebookresearch/PurpleLlama)\n-  [jailbreak-evaluation](https://github.com/controllability/jailbreak-evaluation)\n\n## Prompt Firewall and Redaction\n\n_Products that intercept prompts and responses and apply security or privacy rules to them. We've blended two categories here because some prompt firewalls just redact private data (and then reidentify in the response) while others focus on identifying and blocking attacks like injection attacks or stopping data leaks. Many of the products in this category do all of the above, which is why they've been combined._\n\n- [Cisco AI Defense](https://www.cisco.com/site/us/en/products/security/ai-defense/index.html) - Model Evaluation, monitoring, guardrails, inventory, AI asset discovery, and more.\n- [Robust Intelligence AI Firewall](https://www.robustintelligence.com/) - Now part of Cisco.\n- [Protect AI Rebuff](https://playground.rebuff.ai) - A LLM prompt injection detector. [![code](https://img.shields.io/github/license/protectai/rebuff)](https://github.com/protectai/rebuff/)\n- [Protect AI LLM Guard](https://protectai.com/llm-guard) - Suite of tools to protect LLM applications by helping you detect, redact, and sanitize LLM prompts and responses. [![code](https://img.shields.io/github/license/protectai/llm-guard)](https://github.com/protectai/llm-guard/)\n- [HiddenLayer AI Detection and Response](https://hiddenlayer.com/aidr/) - Proactively defend against threats to your LLMs.\n\n- [Vigil LLM](https://github.com/deadbits/vigil-llm) - Detect prompt injections, jailbreaks, and other potentially risky Large Language Model (LLM) inputs. ![code](https://img.shields.io/github/license/deadbits/vigil-llm)\n- [Lakera Guard](https://www.lakera.ai/lakera-guard) - Protection from prompt injections, data loss, and toxic content.\n- [Arthur Shield](https://www.arthur.ai/product/shield) - Built-in, real-time firewall protection against the biggest LLM risks.\n- [Prompt Security](https://www.prompt.security) - SDK and proxy for protection against common prompt attacks.\n- [Private AI](https://www.private-ai.com) - Detect, anonymize, and replace PII with less than half the error rate of alternatives.\n- [DynamoGuard](https://dynamo.ai/platform/dynamoguard) - Identify / defend against any type of non-compliance as defined by your specific AI policies and catch attacks.\n- [Skyflow LLM Privacy Vault](https://www.skyflow.com/product/llm-privacy-vault) - Redacts PII from prompts flowing to LLMs.\n- [Guardrails AI](https://www.guardrailsai.com) - Guardrails runs Input/Output Guards in your application that detect, quantify and mitigate the presence of specific types of risks. [![code](https://img.shields.io/github/license/guardrails-ai/guardrails)](https://github.com/guardrails-ai/guardrails/)\n\n## AI Red Teaming Guidance\n- [OWASP's GenAI Red Teaming Guide](https://genaisecurityproject.com/resource/genai-red-teaming-guide/) - guide includes four areas: model evaluation, implementation testing, infrastructure assessment, and runtime behavior analysis.\n- [OWASP's List of AI Security Tools](https://owaspai.org/docs/5_testing/#open-source-tools-for-predictive-ai-red-teaming)\n- [Guidance from the OWASP Generative AI Security Project](https://genai.owasp.org/initiatives/#ai-redteaming)\n- [Guidance from CSA](https://cloudsecurityalliance.org/artifacts/agentic-ai-red-teaming-guide)\n\n## AI Red Teaming Datasets\n- [AttaQ Dataset](https://huggingface.co/datasets/ibm/AttaQ) - a red teaming dataset consisting of 1402 carefully crafted adversarial questions\n- [HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal](https://arxiv.org/pdf/2402.04249)\n\n## GenAI Security Standards and Solution Landscapes\n\n- [OWASP GenAI Security Project](https://genai.owasp.org/) - umbrella project for **LLM Top 10**, AI security landscape, governance checklist, threat intelligence, agentic app security, secure AI adoption, data security, and AI red teaming initiatives.\n  - **LLM Top 10 (2025)** – updated top risks for LLM/GenAI applications.\n  - **AI Security Solution Landscape** – vendor-agnostic overview of tools mapped to key GenAI risks.\n  - **Threat Defense COMPASS 1.0** – consolidated view of threats, vulnerabilities, defenses, and mitigations for GenAI systems.\n  - **Solutions Reference Guide (Q2–Q3 2025)** – catalog of commercial and open source controls aligned to OWASP GenAI projects.\n\n## AI Risk Maps and Secure Design Patterns\n\n- [Coalition for Secure AI (CoSAI)](https://github.com/cosai-oasis) – community defining standards, patterns, and tools for secure AI.\n- [CoSAI Risk Map / Secure AI Tooling](https://github.com/cosai-oasis/secure-ai-tooling) – framework for mapping AI-specific security risks across the AI development lifecycle and identifying appropriate mitigations.\n- [CoSAI Workstream 4 – Secure Design Patterns for Agentic Systems](https://github.com/cosai-oasis/ws4-secure-design-agentic-systems) – reusable design patterns for secure agentic and tool-using systems.\n- [CoSAI Workstream 1 – Software Supply Chain Security for AI Systems](https://github.com/cosai-oasis/ws1-supply-chain) – guidance and patterns for securing AI supply chains (models, datasets, components).\n- [CoSAI Workstream 3 – AI Risk Governance](https://github.com/cosai-oasis/ws3-ai-risk-governance) – governance patterns and controls that complement the technical tools listed above.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11AE:3C4A0:174DD3:5C5D60:6AB9203C"},"text_sha256":"5f4c1e0df283f81433b8556f1ca5c53d0946cae17a2ff5e83bea5604cb4625a2"},{"path":"ai/ai-security/ai-security-overview.md","size":402,"blob_sha":"071f2e239d90ae8631b4452779600c56395122de","priority":1,"status":200,"text":"# AI Security Overview\n\nThis overview preserves the original AI security navigation notes after the repository was reorganized into AI tracks. Use the current [AI Security](README.md), [LLM Engineering](../llm-engineering/), [Incident Response and Automation](../incident-response-and-automation/), and [Ethics, Privacy, and Governance](../ethics-privacy-governance/) indexes for the active structure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"612A:3EACB:172FB0:5C3F11:6AB9203D"},"text_sha256":"d64c7bd4976be574a92589fbb43bde869833ac6890eb8703745e51dd5af1f061"},{"path":"ai/ai-security/model_and_genai_application_security_testing.md","size":2501,"blob_sha":"0e5b8f5dda4dd0c85654bb895b35092f94b11b90","priority":1,"status":200,"text":"## Model and GenAI Application Security Testing\n\nThis file is an entry point for **testing the security of AI/ML models and GenAI applications**. Use it together with:\n\n- `ai_security_tools.md` – curated list of offensive and defensive AI security tools.\n- `ai_risk_management/README.md` – governance, regulatory, and risk management frameworks.\n- `prompt_injection/README.md` – prompt injection, jailbreak techniques, and defenses.\n- `training_environment_security/README.md` – securing training and fine‑tuning environments.\n\n### 1. Core Guidance and Taxonomies\n\n- [OWASP GenAI Security Project](https://genai.owasp.org/)\n  - **LLM Top 10 (2025)** – primary risk taxonomy for LLM and GenAI applications.\n  - **AI Security Landscape** and **Solutions Reference Guide (Q2–Q3 2025)** – map risks to available controls.\n  - **Threat Defense COMPASS 1.0** – consolidated view of threats, vulnerabilities, defenses, and mitigations that can be used as a checklist for model/application testing.\n- [OWASP AI Security and Privacy Guide](https://owasp.org/www-project-ai-security-and-privacy-guide/)\n- [OWASP Machine Learning Security Top 10](https://mltop10.info/)\n\n### 2. Risk Maps and Secure Design Patterns\n\n- [Coalition for Secure AI (CoSAI)](https://github.com/cosai-oasis)\n  - [CoSAI Risk Map / Secure AI Tooling](https://github.com/cosai-oasis/secure-ai-tooling) – risk mapping and control framework for AI systems.\n  - [Workstream 4 – Secure Design Patterns for Agentic Systems](https://github.com/cosai-oasis/ws4-secure-design-agentic-systems) – secure patterns for autonomous/agentic workflows.\n  - [Workstream 1 – Software Supply Chain Security for AI Systems](https://github.com/cosai-oasis/ws1-supply-chain) – guidance for model/dataset/supply-chain security.\n\n### 3. Practical Testing and Tooling\n\nSee `ai_security_tools.md` for:\n\n- **Adversarial robustness tools** (ART, Armory, Foolbox, TextAttack, etc.).\n- **GenAI red teaming tools** (PyRIT, Garak, Promptfoo, Guardrail(s), jailbreak evaluation suites).\n- **Prompt firewalls and redaction tools** (Cisco AI Defense, Robust Intelligence, Lakera Guard, Rebuff, LLM Guard, etc.).\n\nThese support:\n\n- **Pre‑deployment testing** – evasion, data leakage, jailbreaks, prompt injection.\n- **Runtime testing** – continuous red teaming, regression testing for guardrails, and monitoring false positives/negatives (see `monitoring.md` for observability tools like LangSmith, Langfuse, OpenLLMetry, and Graphsignal).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8016:17E138:173A83:5C49B1:6AB92034"},"text_sha256":"3632f61c73ca8285f63e2b5d06591e6a0cff6a6eb02c68d13a9c2a58c3486ee6"},{"path":"ai/ai-security/model_security_testing.md","size":441,"blob_sha":"e8815ce07e3808873a76f80fafe8a76ea65c059a","priority":1,"status":200,"text":"Please see https://github.com/The-Art-of-Hacking/h4cker/blob/master/ai/ai_security_tools.md\n\n### Julia Adversarial ML Frameworks\n\n- **[Mirage](https://github.com/bad-antics/mirage)** - Adversarial machine learning framework in Julia. Implements evasion attacks (FGSM, PGD, C&W), model extraction, membership inference, and robustness testing. Includes defenses like adversarial training and certified robustness. 7,000+ lines of Julia code.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E612:18233:17332C:5C41BE:6AB9203E"},"text_sha256":"98ceff16ec05501e6ed9f38f435d9e394c0350a446b33f8edb1dac4c44f4c7e3"},{"path":"ai/course-materials/Creating Agents for Cybersecurity/modules/04-langgraph-security.md","size":8848,"blob_sha":"d373f50624f2d2b0cdbdbee5a637bd2390324261","priority":1,"status":200,"text":"# Module 4 — LangGraph for Security Workflows: Graph, State, Supervisor\n\n## 4.1 Learning objectives\n\n- Explain LangGraph's graph + state + node + edge model and why it suits security workflows.\n- Build a typed `State` for a SOC triage agent.\n- Implement the **Supervisor pattern** as a LangGraph graph.\n- Add conditional routing, retries, and a human-in-the-loop interrupt.\n- Apply LangGraph's checkpointing for replayable, auditable runs.\n\n## 4.2 Why LangGraph\n\nLangGraph is the production-grade evolution of LangChain agents. Where classic LangChain agents are essentially one big while-loop, LangGraph models the workflow as a **directed graph** with **explicit state** flowing through it.\n\nThis buys you four things that matter for security work:\n\n1. **Determinism where you want it.** Edges, conditions, and nodes are code you wrote. Only the *nodes themselves* are LLM-driven.\n2. **Auditability.** Every state transition is observable and checkpointable.\n3. **Human-in-the-loop is first-class.** You can `interrupt` a graph and resume it after human approval.\n4. **The full taxonomy from Module 2 is expressible.** Supervisor, hierarchical, parallel, peer chat — all map onto LangGraph primitives.\n\nLangGraph supports the diverse control flows from Module 2 — single agent, multi-agent, hierarchical, sequential — in one unified framework.\n\n## 4.3 The mental model\n\n```\n        ┌──────┐  edge  ┌──────┐\nstate ─▶│ node │ ─────▶│ node │ ─▶ state\n        └──────┘        └──────┘\n            │              │\n       (conditional)  (conditional)\n            ▼              ▼\n        ┌──────┐        ┌──────┐\n        │ node │        │ END  │\n        └──────┘        └──────┘\n```\n\n- **State** — a typed object (usually a `TypedDict` or Pydantic model) that flows through the graph. Every node receives state and returns a partial state update.\n- **Node** — a function (often an LLM call) that takes state and returns an update.\n- **Edge** — a transition. Can be unconditional or conditional (the routing function inspects state and picks the next node).\n- **Checkpoint** — the state at a node boundary, persisted so the graph can be resumed or replayed.\n\n## 4.4 A typed state for SOC triage\n\n```python\nfrom typing import TypedDict, Literal, Annotated\nfrom operator import add\n\nclass TriageState(TypedDict):\n    alert_id: str\n    raw_alert: dict\n    enrichment: dict           # outputs from enrichment tools\n    severity: Literal[\"info\", \"low\", \"medium\", \"high\", \"critical\", \"unknown\"]\n    classification: str        # e.g. \"phishing\", \"malware\", \"false_positive\"\n    rationale: str\n    actions_taken: Annotated[list[str], add]  # appended across nodes\n    needs_human: bool\n    human_decision: str | None\n```\n\nA few opinions baked in:\n\n- `severity` is a `Literal` — the LLM cannot invent new levels.\n- `actions_taken` uses `Annotated[..., add]` so concurrent branches accumulate cleanly.\n- `needs_human` is explicit; the human gate is a *field*, not a hope.\n\n## 4.5 The Supervisor pattern in LangGraph\n\nThis is the most widely used architecture in production LangGraph deployments. The supervisor receives the goal, decides which specialist to call, and synthesizes results.\n\n```python\nfrom langgraph.graph import StateGraph, START, END\n\ndef supervisor(state: TriageState) -> dict:\n    # LLM call: decide which worker should run next\n    decision = router_llm(state)\n    return {\"next\": decision}\n\ndef enricher(state):  ...\ndef classifier(state): ...\ndef responder(state):  ...\n\ngraph = StateGraph(TriageState)\ngraph.add_node(\"supervisor\", supervisor)\ngraph.add_node(\"enricher\", enricher)\ngraph.add_node(\"classifier\", classifier)\ngraph.add_node(\"responder\", responder)\n\ngraph.add_edge(START, \"supervisor\")\ngraph.add_conditional_edges(\n    \"supervisor\",\n    lambda s: s[\"next\"],          # routing function\n    {\n        \"enrich\": \"enricher\",\n        \"classify\": \"classifier\",\n        \"respond\": \"responder\",\n        \"done\": END,\n    },\n)\ngraph.add_edge(\"enricher\",  \"supervisor\")\ngraph.add_edge(\"classifier\",\"supervisor\")\ngraph.add_edge(\"responder\", \"supervisor\")\n\napp = graph.compile(checkpointer=memory_saver)\n```\n\nThree things to notice:\n\n1. The **supervisor** is the only LLM node that does routing. Workers focus on their narrow task.\n2. The **routing dictionary** is code you control — the LLM picks a key, not a free-form next node.\n3. The graph **compiles to an app** with a checkpointer; every run is resumable and replayable.\n\n## 4.6 Conditional routing and the security value of typed routing\n\nA common mistake in early LangGraph code is to let the supervisor return arbitrary text and `eval`-route on it. Don't. Use:\n\n- A **finite set of route names** (`Literal[\"enrich\", \"classify\", \"respond\", \"done\"]`).\n- A **fallback** route to a human-handoff node when the supervisor's output doesn't parse.\n- A **counter** on the state for max supervisor-turns to prevent loops.\n\nThese three things turn a fragile pattern into a production-acceptable one.\n\n## 4.7 Human-in-the-loop interrupts\n\nThe single most important security feature LangGraph gives you: `interrupt_before` and `interrupt_after`.\n\n```python\napp = graph.compile(\n    checkpointer=memory_saver,\n    interrupt_before=[\"responder\"],   # always pause before a write action\n)\n```\n\nPattern: the graph runs to the responder node, then halts. The checkpointed state is persisted. A human reviews. On approval, the graph resumes from the checkpoint with the human's decision merged into state.\n\nFor any agent that takes write actions in production, **interrupt-before-write is the baseline pattern**. Foundry's constitution puts this in stronger language: irreversible actions require human arbitration.\n\n## 4.8 Checkpointing for audit and forensics\n\nLangGraph checkpointers (`MemorySaver`, `SqliteSaver`, `PostgresSaver`, etc.) persist state at every node boundary. For security agents this delivers:\n\n- **Replay.** Re-run any decision with the exact state it had.\n- **Forensics.** \"What did the agent see at step 4?\" is now answerable.\n- **Time-travel debugging.** Branch off any past checkpoint with a modified input.\n\nMake checkpointing a default, not an option. Treat the checkpoint store like the SIEM — sensitive, retained per policy, access-controlled.\n\n## 4.9 Common LangGraph patterns for security\n\n- **Triage → Enrich → Classify → Respond** — the canonical SOC pipeline.\n- **Scatter-Gather** — split an artifact across N analyzer agents in parallel, merge findings.\n- **Reflexion loop** — an analyst-critic pair where the critic gates the analyst's verdict.\n- **Tree-of-Thoughts for hypothesis testing** — branch on hypotheses, prune by evidence.\n\nLangGraph supports all of these natively.\n\n## 4.10 Hands-on Lab 04 — A LangGraph SOC triage graph\n\n[`labs/lab04-langgraph-soc/`](../labs/lab04-langgraph-soc/) builds:\n\n1. The `TriageState` shown above.\n2. Four nodes: `supervisor`, `enricher` (calls a mock SIEM tool), `classifier` (LLM), `responder` (calls a mock ticket API).\n3. `interrupt_before=[\"responder\"]` so the human approves any ticket creation.\n4. A SQLite checkpointer.\n5. An adversarial-alert test case (Lab 03 ASI01 indirect injection) to verify the typed routing holds.\n\nBonus: visualize the graph with `app.get_graph().draw_mermaid()`.\n\n## 4.11 LangGraph in production — costs and gotchas\n\nAcross the 2026 LangGraph-in-production reports the recurring lessons are:\n\n- **Cost** is dominated by supervisor turns. Cap them.\n- **Latency** is dominated by sequential nodes. Parallelize where state types allow.\n- **State bloat** is a real failure mode. Trim or summarize between turns.\n- **Token leakage** through traces is a real privacy failure. Configure your tracer (LangSmith or otherwise) with redaction.\n\n## 4.12 Exercises\n\n1. Add a `Reflexion` critic node to the SOC triage graph that re-asks the classifier when confidence is low. Where does the critic sit?\n2. Convert the supervisor's routing function to use Pydantic for structured output. What attacks does this prevent?\n3. Add a `max_supervisor_turns` counter to the state. What value would you pick for an alert-triage workflow, and why?\n4. Design a Scatter-Gather subgraph for analyzing a suspicious binary with three parallel analyzers (static, dynamic, threat-intel).\n\n## 4.13 Further reading\n\n- LangChain, [LangGraph docs](https://langchain-ai.github.io/langgraph/) — *Multi-Agent Architectures*.\n- *LangGraph Multi-Agent Orchestration — Official Guide 2026*.\n- *LangGraph Agents in Production: Architecture, Costs & Real-World Outcomes* (2026).\n\n---\n\nPrevious: [Module 3](03-threat-modeling-agents.md) · Next: [Module 5 — Claude Agent SDK and MCP](05-claude-agent-sdk-mcp.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9C1A:09ED:DF36E:3DBC84:6AB9203D"},"text_sha256":"092cffa84964eab3c51d4a0e71a5214849b6fe600ad79a3f064d325065fd73d4"},{"path":"ai/course-materials/Creating Agents for Cybersecurity/modules/08-foundry-security-spec.md","size":14591,"blob_sha":"30254b6a72cdb949bb5e4c70bc4131238b186fdb","priority":1,"status":200,"text":"# Module 8 — Inside the Cisco Foundry Security Spec: 8 Roles, 11 Principles, ~130 FRs\n\n> \"Foundry Security Spec is the scaffolding that turns a frontier LLM from 'an interesting demo against your codebase' into a security evaluation system that produces a bounded, prioritized, verifiable set of findings.\"\n> — Omar Santos, *Announcing Foundry Security Spec*\n\nThis is the centerpiece module of the course. Everything before it has been preparation; everything after it applies the pattern.\n\n## 8.1 Learning objectives\n\n- Explain the **problem Foundry solves** and why a spec (not a tool) is the right form factor.\n- Describe the **eight core agent roles**, what each guarantees, and how they hand off.\n- Recite the **eleven inviolable principles** from the constitution and the failure mode each prevents.\n- Walk the **finding lifecycle** end-to-end.\n- Understand the **detection-to-prevention flywheel** Foundry creates with CodeGuard.\n- Use **GitHub spec-kit** to clarify and instantiate the seed for your environment.\n\n## 8.2 The problem\n\nEvery security team with access to a frontier LLM has done the same thing at least once: thrown a repo at the model and asked it to \"find the bugs.\" The result is a wall of unbounded, unverifiable output that mixes sharp insights with hallucinated findings. There is no way to know what was missed or when you are actually done.\n\nThe Foundry Security Spec is the antidote: an organization-neutral specification for an **agentic security evaluation system**. It produces:\n\n- A **bounded, prioritized, verifiable** set of findings.\n- A **clear \"done\" signal** — the conjunction of an operator-defined coverage floor and an economic yield threshold.\n- An **auditable provenance chain** from detection through triage, validation, and publication.\n- **Safety guardrails** at the substrate, not the prompt.\n\nYou bring a frontier LLM and a target. Foundry gives you the architecture, the invariants, and the guardrails. You build your own implementation, on your own stack, using the specification as the blueprint.\n\n## 8.3 Why a spec, not source code\n\nCisco's internal implementation is tightly bound to Cisco infrastructure: their LLM gateway, issue tracker, private cloud, severity taxonomy. Open-sourcing that code would give defenders something that runs in exactly one environment.\n\nWhat transfers is the **design**: which roles you need and why, what each must guarantee, how findings flow from detection to publication, what \"done\" means, where the quality gates go, and which shortcuts will hurt you six months in. That design is model-agnostic and infrastructure-neutral.\n\nThis is also why Foundry is meant to be consumed with [GitHub spec-kit](https://github.com/github/spec-kit) — you run the spec through a clarification step that resolves the open questions against your environment, and out the other side comes *your* spec, for *your* implementation.\n\n## 8.4 The architecture at a glance\n\n```\n                                  OPERATOR\n                                     │\n                      ┌──────────────▼──────────────┐\n                      │        ORCHESTRATOR         │\n                      │ lifecycle  +  conversational │\n                      └──────────────┬──────────────┘\n                                     │\n                      ════════ SUBSTRATE ════════\n                       work queue · finding store\n                       sandbox · budget · dashboard\n                      ════════════╤═══════════════\n                                  │\n  knowledge layer                 │   finding pipeline               oversight\n┌───────┐┌─────────┐               │ ┌────────┐┌────────┐┌─────────┐┌────────┐┌─────────┐\n│INDEXER││ CARTO-  │───────────────┘ │DETECTOR││TRIAGER ││VALIDATOR││REPORTER││COVERAGE │\n│       ││ GRAPHER │                 │        ││        ││         ││        ││ GUIDE   │\n└───────┘└─────────┘                 └────────┘└────────┘└─────────┘└────────┘└─────────┘\n\n       extension roles (build after core works):\n       DEEP-TESTER · VARIANT-HUNTER · ATTACK-MAPPER · REMEDIATOR · SELF-IMPROVER\n```\n\nEight core roles, each catching the previous role's failure mode. A substrate beneath them where the invariants live.\n\n## 8.5 The eight core roles\n\nEach role has a defined purpose, defined inputs and outputs, and a list of functional requirements with rationale. You can implement them as subprocess loops, as graph-based pipelines, as serverless functions, or as a bespoke harness. The shape is what transfers; the implementation is yours.\n\n### 1. Orchestrator (§5.1)\n\nLifecycle and conversational interface. Receives the operator's goal, dispatches work, surfaces status, halts on budget/coverage signals. The only role that talks to the human directly.\n\n### 2. Indexer (§5.2)\n\nTurns a target (a codebase, a binary, an API spec) into a navigable corpus the other roles can query. Builds search indices, symbol tables, dependency graphs. Without a competent Indexer, every downstream role wastes tokens re-reading the same content.\n\n### 3. Cartographer (§5.3)\n\nProduces the maps the rest of the system reasons against: architecture, attack-surface, trust-boundary, data-flow, and threat-model documents. Cartographer's outputs are the \"ground truth\" the Detector and Triager consult.\n\n### 4. Detector (§5.4)\n\nSweeps the target against a corpus of LLM-evaluated detection rules. This is where **CodeGuard** plugs in. Detection is systematic and repeatable; it finds what you already knew to look for. (The exploratory hunting is a job for extension roles like Variant-Hunter.)\n\n### 5. Triager (§5.5)\n\nReceives raw detections and decides which are worth investigating. Applies the organization's severity rubric and weakness taxonomy. The Triager's verdict can be: discard, investigate, escalate.\n\n### 6. Validator (§5.6)\n\nThe evidence gate. A claimed finding without evidence does not exist. The Validator's job is to confirm or refute a triaged finding through reproduction, proof construction, or counter-example. This role is the single biggest reason Foundry findings are trustable.\n\n### 7. Coverage-Guide (§5.7)\n\nKnows what has been examined and what has not. Produces the coverage signal that lets the Orchestrator decide when to stop or where to push the Detector next. \"Done\" without a coverage answer is just \"stopped.\"\n\n### 8. Reporter (§5.8)\n\nProduces the human-readable writeup: title, severity, evidence, reproduction, remediation, references. Reporter consumes only validated findings.\n\n## 8.6 The five extension roles\n\nBuild these only after the eight core roles produce trustworthy findings.\n\n- **Deep-Tester** — runs targeted exploit attempts within scope.\n- **Variant-Hunter** — generalizes a confirmed finding into a class search.\n- **Attack-Mapper** — places findings on an attack graph; computes by-design vs. emergent paths.\n- **Remediator** — proposes (and optionally drafts) patches.\n- **Self-Improver** — closes the rule-gap loop: turns confirmed-but-rule-missed findings into new detection rules.\n\nThe official guidance — \"Recommended: no to all five for your first build\" — is sound. Walk before you run.\n\n## 8.7 The eleven inviolable principles (the constitution, paraphrased)\n\nEach constitutional principle encodes a real production failure Cisco shipped, diagnosed, and fixed. Reading the original [constitution.md](https://github.com/CiscoDevNet/foundry-security-spec/blob/main/constitution.md) is mandatory; the paraphrases below are *summaries* meant to anchor discussion.\n\n1. **Findings without evidence do not exist.** Every claim must be backed by reproducible evidence. The Validator is the gate.\n2. **The substrate, not the prompt, enforces invariants.** Atomic claim, heartbeat liveness, fingerprinting, budget — these live in code, not prose.\n3. **Authority flows down; trust does not flow up.** The Orchestrator decides; worker outputs are data, not commands.\n4. **A human is the final arbiter for irreversible actions.** The system can propose; the human disposes.\n5. **Bounded autonomy is the only safe autonomy.** Every loop has a budget and a yield gate.\n6. **Fingerprint everything that can be deduplicated.** Same finding reported twice is a tax on reviewers.\n7. **Provenance is part of the finding.** Where did the claim come from, which model, which rule, which trace?\n8. **The corpus compounds; the harness stays stable.** Rules and templates are *your* IP; the architecture is the spec's.\n9. **Operate inside a sandbox the agent cannot define.** Sandbox boundaries are not requested by the agent — they are imposed on it.\n10. **A \"done\" signal must be defended.** No \"done\" without a coverage answer and a yield answer.\n11. **The system must be auditable end-to-end.** If a CISO asks \"how did you produce this finding,\" every step has an answer.\n\nThese are inviolable not because we say so, but because in production every one of them has cost someone something. When tempted to weaken one for convenience, re-read the \"why this is inviolable\" paragraph in the constitution before making the change.\n\n## 8.8 The finding lifecycle\n\n```\ndetected → triaged → investigated → evidence-built → validated → reported → published\n                                          │\n                                          ├── deduped against existing findings (fingerprint)\n                                          ├── coverage map updated\n                                          └── rule-gap recorded if exploration found something the rules missed\n```\n\nA finding only exists once it has been validated. Anything earlier in the chain is an \"investigation in progress.\" This is a *cultural* shift from typical \"report everything the model said\" patterns and it is why Foundry findings can be defended in front of auditors.\n\n## 8.9 The detection-to-prevention flywheel\n\nThe reason Foundry pairs with CodeGuard:\n\n1. **CodeGuard rules sweep** every function in the target. Systematic, repeatable, catches the known.\n2. **Foundry exploratory agents hunt** alongside. Creative, target-specific, catches the unknown.\n3. When exploration confirms something the rules missed, Foundry **records a rule gap**.\n4. The gap is generalized into a new (or revised) CodeGuard rule, and lands in the corpus.\n5. The next sweep — on this target *and every future target* — catches that whole class on the first pass.\n6. Because CodeGuard rules are portable, the same corpus loads into an LLM coding assistant as secure-coding guardrails: the bug class your last evaluation taught the corpus to *detect* is now *prevented* at the keystroke, in every developer's editor, before the next evaluation runs.\n\n> \"Every turn of the loop improves detection here and prevention everywhere.\"\n\n## 8.10 Using the spec with GitHub spec-kit\n\nThe Foundry spec is written to be consumed by [GitHub spec-kit](https://github.com/github/spec-kit). The intended workflow:\n\n1. **Read `constitution.md` end-to-end.** Short. Every principle has a \"why this is inviolable\" paragraph.\n2. **Install spec-kit** in your project (`/.specify/` directory, `/speckit.*` commands).\n3. **Install the constitution.** Copy `constitution.md` to `.specify/memory/`. Run `/speckit.constitution` and adopt it.\n4. **Seed the spec.** Copy `spec.md` to `specs/001-foundry/`.\n5. **Clarify.** Run `/speckit.clarify`. The agent walks ~36 `[NEEDS CLARIFICATION: ...]` markers grouped into Identity & Scope, Integration Choices, Policy Choices, and Extension Scope. Recommended: say *no* to all five extension roles for the first build.\n6. **Specify.** `/speckit.specify` hardens the seed into a complete spec for your environment.\n7. **Iterate clarify + specify** until they converge.\n8. **Plan, task, implement.** `/speckit.plan`, `/speckit.tasks`, `/speckit.implement`.\n\nThe point of this workflow is that **a `[NEEDS CLARIFICATION]` that survives into the plan becomes a guess baked into your design**.\n\n## 8.11 Hands-on Lab 08 — Map Foundry's 8 roles to a runnable scaffold\n\n[`labs/lab08-foundry-scaffold/`](../labs/lab08-foundry-scaffold/):\n\n1. Clone `https://github.com/CiscoDevNet/foundry-security-spec`.\n2. Read `constitution.md` and write a one-paragraph summary of each principle in your own words.\n3. Build a minimal Python scaffold with eight stub roles: each is a class with a `purpose` docstring, an `inputs` schema, an `outputs` schema, and a `run()` stub.\n4. Use the LangGraph supervisor pattern from Lab 04 as the Orchestrator.\n5. Implement just enough of Indexer + Detector + Validator + Reporter to process a single canned finding end-to-end.\n6. Verify against the constitution: write a short checklist confirming each principle the scaffold honors and each it does not yet.\n\nThis is not a production harness. It is a thinking tool that makes the spec concrete in code.\n\n## 8.12 Exercises\n\n1. Re-read the constitution and pick one principle you find most counter-intuitive. Defend or critique it with a real or hypothetical scenario.\n2. For your environment, draft the four open-question groups (Identity & Scope, Integration Choices, Policy Choices, Extension Scope) with at least one concrete answer each.\n3. Sketch how a Foundry-style coverage gate would change \"definition of done\" for your most recent pentest.\n4. Where in your current security workflow would a *Validator* role have caught a false positive?\n\n## 8.13 Further reading (mandatory)\n\n- Omar Santos, [*Announcing Foundry Security Spec*](https://blogs.cisco.com/ai/announcing-foundry-security-spec) — the announcement and the philosophy.\n- [`CiscoDevNet/foundry-security-spec`](https://github.com/CiscoDevNet/foundry-security-spec) — the spec, constitution, and glossary.\n- [Project CodeGuard](https://project-codeguard.org/) and its donation to CoSAI.\n- [GitHub spec-kit](https://github.com/github/spec-kit).\n\n---\n\nPrevious: [Module 7](07-crewai-autogen.md) · Next: [Module 9 — Identity, Trust, and Governance](09-identity-trust-governance.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AD80:3EACB:172FB4:5C3F2E:6AB9203D"},"text_sha256":"80306b4c0a1aa7f6ba09e793395d898b6c77c60414671d3949258ce8739930d5"},{"path":"ai/llm-engineering/ai_agentic_tools_for_cybersecurity.md","size":1481,"blob_sha":"cbbefbe661e81e741abd41ea3114e14ca9656d8d","priority":1,"status":200,"text":"# AI Agentic Tools for Cybersecurity\n\nSee my blog post [AI Agentic Cybersecurity Tools: Reaper, TARS, Fabric Agent Action, and Floki](https://becomingahacker.org/agentic-cybersecurity-tools-122374ce942b) for more details.\n\n## Tools\n\n\n| **Tool**              | **Short Description**                                                                                                                                       |\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [**Reaper**](https://github.com/ghostsecurity/reaper) | An AI-augmented web application security testing tool that combines recon, fuzzing, and vulnerability validation in a unified testing framework.         |\n| [**TARS**](https://github.com/osgil-defense/TARS)   | An AI-powered penetration testing automation platform that orchestrates multiple pentest tools through an LLM-based decision-making agent.                |\n| [**Fabric Agent Action**](https://github.com/xvnpw/fabric-agent-action) | A GitHub Action that integrates the Fabric framework to automate CI/CD workflows using AI-driven patterns for tasks like issue summarization and PR reviews. |\n| [**Floki**](https://github.com/Cyb3rWard0g/floki)     | A framework for building and orchestrating LLM-powered autonomous agents, leveraging Dapr to enable robust multi-agent collaboration for cybersecurity tasks. |\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"651A:B08CF:16DEF0:5BEF16:6AB9203E"},"text_sha256":"3c3fa50f131ea276c49c52d14f57af36c238404dbf57af281c445bf78eea3431"},{"path":"ai/llm-engineering/ML-Fundamentals/glossary_of_terms.md","size":11867,"blob_sha":"1ded11e4ed3c81ed498738c4cdb297843e57d807","priority":1,"status":200,"text":"# A glossary for AI-related terms:\n\n- **Activation Function:** A function in a neural network that introduces non-linear properties to the network, enabling it to learn more complex functions.\n- **Adversarial Machine Learning:** A technique in machine learning where a model is trained to identify and counteract attempts to deceive it.\n- **Agent:** In AI, an entity that perceives its environment and takes actions to maximize its chance of achieving a goal.\n- **Algorithm:** A set of rules to be followed in calculations or other problem-solving operations, especially by a computer.\n- **Anomaly Detection:** The identification of rare items, events, or observations which raise suspicions by differing significantly from the majority of the data.\n- **Autoencoder:** A type of neural network used to learn efficient codings of unlabeled data, typically for the purposes of dimensionality reduction.\n- **Backpropagation:** An algorithm for iteratively adjusting the weights used in a neural network system to minimize the difference between actual and predicted outputs.\n- **Bagging (Bootstrap Aggregating):** An ensemble learning technique used to improve the stability and accuracy of machine learning algorithms.\n- **Bayesian Network:** A probabilistic graphical model that represents a set of variables and their conditional dependencies via a directed acyclic graph.\n- **Bias (in AI):** A systematic error in the data or the model that can lead to unfair or prejudiced outcomes.\n- **Big Data:** Extremely large data sets that may be analyzed computationally to reveal patterns, trends, and associations, especially relating to human behavior and interactions.\n- **Boosting:** A machine learning ensemble meta-algorithm for primarily reducing bias, and also variance in supervised learning.\n- **Capsule Network:** A type of neural network that uses capsules to enhance the ability of the network to understand spatial relationships and hierarchies in data.\n- **Chatbot:** A software application used to conduct an online chat conversation via text or text-to-speech, instead of providing direct contact with a live human agent.\n- **Clustering:** The task of dividing the dataset into groups, where members of the same group are more similar to each other than to those in other groups.\n- **Collaborative Filtering:** A method of making automatic predictions about the interests of a user by collecting preferences from many users.\n- **Computer Vision:** An AI field that trains computers to interpret and understand the visual world, using digital images from cameras and videos and deep learning models.\n- **Confusion Matrix:** A table that is often used to describe the performance of a classification model on a set of test data for which the true values are known.\n- **Convolutional Neural Network (CNN):** A deep learning algorithm which can take in an input image, assign importance to various aspects/objects in the image, and be able to differentiate one from the other.\n- **Cross-validation:** A technique for evaluating ML models by training several ML models on subsets of the available input data and evaluating them on the complementary subset of the data.\n- **Data Augmentation:** Techniques used to increase the amount of data by adding slightly modified copies of already existing data or newly created synthetic data.\n- **Data Mining:** The process of discovering patterns in large data sets involving methods at the intersection of machine learning, statistics, and database systems.\n- **Data Wrangling:** The process of cleaning, structuring and enriching raw data into a desired format for better decision making in less time.\n- **Dataset:** A collection of related sets of information composed of separate elements but can be manipulated as a unit by a computer.\n- **Decision Tree:** A decision support tool that uses a tree-like model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility.\n- **Deep Learning:** A subset of ML that uses neural networks with many layers (deep networks) to analyze various factors in large volumes of data.\n- **Dense Layer:** A fully connected neural network layer where each input node is connected to each output node.\n- **Dimensionality Reduction:** The process of reducing the number of random variables under consideration, via obtaining a set of principal variables.\n- **Dropout:** A regularization technique for reducing overfitting in neural networks by preventing complex co-adaptations on training data.\n- **Eigenvalue, Eigenvector:** In linear algebra, an eigenvalue and its corresponding eigenvector are a pair that together provide a simple scaling factor and directionality for linear transformations.\n- **Embedding Layer:** Used in neural networks to reduce the dimensionality of input data to improve the efficiency of the model.\n- **Ensemble Learning:** A technique that creates multiple models and then combines them to produce improved results.\n- **Evolutionary Algorithm:** A subset of evolutionary computation in artificial intelligence that uses mechanisms inspired by biological evolution, such as reproduction, mutation, recombination, and selection.\n- **Expert System:** A computer system that emulates the decision-making ability of a human expert.\n- **Feature Engineering:** The process of using domain knowledge to extract features from raw data via data mining techniques.\n- **Feature Extraction:** The process of defining a set of features, or aspects, of the data that are relevant to the problem being solved.\n- **Fuzzy Logic:** A form of many-valued logic which deals with reasoning that is approximate rather than fixed and exact.\n- **GAN (Generative Adversarial Network):** A class of ML systems where two neural networks contest with each other in a game.\n- **GPT (Generative Pretrained Transformer):** An advanced type of neural network architecture used for NLP tasks. It's trained to predict the next word in a sentence and can generate coherent and contextually relevant text based on a given prompt.\n- **Gradient Descent:** An optimization algorithm for finding the minimum of a function; in machine learning, it's used to update the parameters of a model.\n- **Grid Search:** A method to perform hyperparameter optimization to find the optimal values for a given model.\n- **Hadoop:** A framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models.\n- **Hashing:** The transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string.\n- **Heuristic:** A technique designed for solving a problem more quickly when classic methods are too slow, or for finding an approximate solution when classic methods fail to find any exact solution.\n- **Hyperparameter:** In ML, a parameter whose value is set before the learning process begins.\n- **Instance-based Learning:** A family of learning algorithms that, instead of performing explicit generalization, compares new problem instances with instances seen in training.\n- **Jupyter Notebook:** An open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.\n- **K-means Clustering:** A method of vector quantization, originally from signal processing, that aims to partition n observations into k clusters.\n- **Kernel:** In machine learning, a function used in support vector machines to enable them in processing linearly inseparable data.\n- **Knowledge Base:** A technology used to store complex structured and unstructured information used by a computer system.\n- **Latent Variable:** In statistics, a variable that is not directly observed but is inferred from other variables that are observed.\n- **Linear Regression:** A linear approach to modelling the relationship between a scalar response and one or more explanatory variables.\n- **Logistic Regression:** A statistical model that in its basic form uses a logistic function to model a binary dependent variable.\n- **Long Short-Term Memory (LSTM):** A type of RNN architecture used in deep learning because standard RNNs have difficulty remembering information for long periods.\n- **Markov Decision Process:** A mathematical process to model decision making in situations where outcomes are partly random and partly under the control of a decision maker.\n- **Monte Carlo Methods:** A broad class of computational algorithms that rely on repeated random sampling to obtain numerical results.\n- **Multi-Layer Perceptron (MLP):** A class of feedforward artificial neural network (ANN) which consists of at least three layers of nodes.\n- **Naive Bayes Classifier:** A family of simple probabilistic classifiers based on applying Bayes' theorem with strong (naive) independence assumptions between the features.\n- **Natural Language Generation (NLG):** The use of AI to generate natural language from a machine representation system such as a knowledge base or a logical form.\n- **Natural Language Processing (NLP):** A branch of AI that helps computers understand, interpret, and respond to human language in a valuable way.\n- **Neural Network:** A series of algorithms that attempt to recognize underlying relationships in a set of data through a process that mimics the way the human brain operates.\n- **Outlier:** An observation point that is distant from other observations, potentially indicative of a measurement or input error, or a novel data point.\n- **Parameter Tuning:** The process of selecting the values for a model’s parameters that maximize the accuracy of the model.\n- **Perceptron:** A type of artificial neuron used in supervised learning to classify binary data.\n- **Precision and Recall:** In pattern recognition, information retrieval and classification, precision is the fraction of relevant instances among the retrieved instances, while recall is the fraction of relevant instances that were retrieved.\n- **Quantile:** A quantile is a fraction where certain values fall below that quantile.\n- **Random Forest:** An ensemble learning method for classification, regression and other tasks that operates by constructing a multitude of decision trees.\n- **Random Variable:** A variable whose possible values are numerical outcomes of a random phenomenon.\n- **Recurrent Neural Network (RNN):** A class of artificial neural networks where connections between nodes form a directed graph along a temporal sequence.\n- **Regularization:** Techniques used to reduce the error by fitting a function appropriately\n- **Reinforcement Learning:** An area of ML concerned with how software agents ought to take actions in an environment to maximize some notion of cumulative reward.\n- **Semantic Analysis:** The process of understanding the meaning and interpretation of words, sentences, and character of the texts.\n- **Supervised Learning:** A type of ML where the model is trained on labeled data, i.e., data paired with the correct answer.\n- **Support Vector Machine (SVM):** A supervised learning model with associated learning algorithms that analyze data used for classification and regression analysis.\n- **TensorFlow:** An open-source software library for high-performance numerical computation, particularly well suited for deep learning and ML applications.\n- **Transfer Learning:** A research problem in machine learning that focuses on storing knowledge gained while solving one problem and applying it to a different but related problem.\n- **Turing Test:** A test of a machine's ability to exhibit intelligent behavior equivalent to, or indistinguishable from, that of a human.\n- **Unstructured Data:** Information that either does not have a pre-defined data model or is\n- **Unsupervised Learning:** A type of ML that uses algorithms to analyze and cluster unlabeled datasets. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13E8:24970A:17DBE5:5CE96C:6AB9203D"},"text_sha256":"1fce588518c88149b84cd9373eb3adcd63e24e9a7a037d8ba4e0b9a75b50453a"},{"path":"build-your-own-lab/security-onion-proxmox.md","size":5816,"blob_sha":"c9045449cac1a1b4ebaa4a1946c26a860dc0f8c6","priority":1,"status":200,"text":"# Security Onion, RedHunt OS, Proxmox, and Open vSwitch\nIf you have attended some of my classes and read some of my books, you know that I really like [Proxmox](https://www.proxmox.com/en/). I have several Proxmox clusters that I use for my training courses and to develop labs to learn new cybersecurity skills (offensive and defensive techniques). \n\nYou can instantiate Linux systems such as [Kali Linux](https://www.kali.org/), [WebSploit](https://websploit.org), [Parrot](https://parrotlinux.org/), [BlackArch](https://blackarch.org/), [Security Onion](https://securityonion.net), [RedHuntOS](https://github.com/redhuntlabs/RedHunt-OS), and others in different VMs to practice and learn new skills in a safe environment. \n\nSystems like [Security Onion](https://securityonion.net) and [RedHuntOS](https://github.com/redhuntlabs/RedHunt-OS) come with with [Snort](https://www.snort.org/), [Suricata](https://suricata-ids.org/), [ELK](https://www.elastic.co/what-is/elk-stack), and many other security tools that allow you to monitor your network.\n\nYou have to setup [port mirroring](https://en.wikipedia.org/wiki/Port_mirroring) for IDS/IPS systems like Snort to be able to monitor traffic. In Proxmox, you can setup [Linux bridges](https://pve.proxmox.com/wiki/Network_Configuration) and [Open vSwitch (OVS) bridges](https://pve.proxmox.com/wiki/Open_vSwitch). \n\n## OVS Setup\nI strongly recommend to use OVS bridges to send traffic to your Security Onion VM (or whatever other VM you would like to capture packets or monitor for IDS/IPS functions. \n\n- **Note:** A bridge is another term for a Switch. It directs traffic to the appropriate interface based on mac address. Open vSwitch bridges should contain raw ethernet devices, along with virtual interfaces such as OVSBonds or OVSIntPorts. These bridges can carry multiple vlans, and be broken out into 'internal ports' to be used as vlan interfaces on the host.\n\n1. First, you need to update the package index and then install the Open vSwitch packages by executing:\n\n```\n apt update\n apt install openvswitch-switch\n```\n\n2. Then you can create an OVS bridge and assign the interfaces of each VM that you want to capture packets to that OVS bridge.\n\n3. You then configure the `tap` interfaces. These are only visible in the system shell (not in the Proxmox GUI) and are added automatically for VMs attached to an OVS-bridge interface. The naming convention of the tap interfaces is based on the ID of the VM they are assigned to, with the name `tap[VM-ID]i[interface#]`.\n\nFor example, these are some of the interfaces in one of the Proxmox nodes/servers in one of my clusters:\n\n```\n┌─[root@hermes]─[~]\n└──╼ #ip -brie a\nlo               UNKNOWN        127.0.0.1/8 ::1/128 \nenp0s31f6        DOWN           \nenp1s0f0         UP             \nenp1s0f1         DOWN           \nenp3s0f0         UP             \nenp3s0f1         DOWN           \nvmbr0            UP             192.168.78.10/24 fe80::92e2:baff:fe84:dbd0/64 \nvmbr1            UP             10.1.1.10/24 fe80::a236:9fff:fe1c:2430/64 \nvmbr2            UNKNOWN        fe80::f84b:12ff:fe3c:6e61/64 \novs-system       DOWN           \nvmbr3            UNKNOWN        fe80::208a:52ff:fe6d:504f/64 \ntap109i0         UNKNOWN        \nfwbr109i0        UP             \nfwpr109p0@fwln109i0 UP             \nfwln109i0@fwpr109p0 UP             \ntap109i1         UNKNOWN        \ntap109i2         UNKNOWN        \nfwbr109i2        UP             \nfwpr109p2@fwln109i2 UP             \nfwln109i2@fwpr109p2 UP             \ntap112i0         UNKNOWN        \nfwbr112i0        UP             \nfwpr112p0@fwln112i0 UP             \nfwln112i0@fwpr112p0 UP             \ntap112i1         UNKNOWN        \nfwbr112i1        UP             \nfwpr112p1@fwln112i1 UP             \nfwln112i1@fwpr112p1 UP             \ntap114i0         UNKNOWN        \ntap119i0         UNKNOWN        \nfwbr119i0        UP             \nfwpr119p0@fwln119i0 UP             \nfwln119i0@fwpr119p0 UP             \ntap119i1         UNKNOWN        \nfwbr119i1        UP             \nfwpr119p1@fwln119i1 UP             \nfwln119i1@fwpr119p1 UP             \ntap121i0         UNKNOWN        \nveth122i0@if59   UP             \nfwbr122i0        UP             \nfwpr122p0@fwln122i0 UP             \nfwln122i0@fwpr122p0 UP             \nveth122i1@if64   UP             \nfwbr122i1        UP             \nfwpr122p1@fwln122i1 UP             \nfwln122i1@fwpr122p1 UP             \ntap126i0         UNKNOWN        \nfwbr126i0        UP             \nfwpr126p0@fwln126i0 UP             \nfwln126i0@fwpr126p0 UP             \nveth130i0@if73   UP             \nfwbr130i0        UP             \nfwpr130p0@fwln130i0 UP             \nfwln130i0@fwpr130p0 UP             \nveth136i0@if78   UP             \nfwbr136i0        UP             \nfwpr136p0@fwln136i0 UP             \nfwln136i0@fwpr136p0 UP             \nfwbr109i1        UP             \nfwln109o1        UNKNOWN        \nveth115i0@if89   UP             \nfwbr115i0        UP             \nfwln115o0        UNKNOWN        \ntap106i0         UNKNOWN        \nfwbr106i0        UP             \nfwpr106p0@fwln106i0 UP             \nfwln106i0@fwpr106p0 UP             \ntap106i1         UNKNOWN        \n```\n\n`tap106i0` is the first (0) virtual interface created for VM with ID 106, and `tap106i1` is the second such interface. \n\nIn order to send all traffic on the OVS bridge to the Security Onion VM (VM 106). I use the following command in the Proxmox node:\n\n```\novs-vsctl -- --id=@p get port tap106i1 \\\n    -- --id=@m create mirror name=span1 select-all=true output-port=@p \\\n    -- set bridge vmbr3 mirrors=@m\n```\n\n`vmbr3` is the OVS bridge for that internal network. This creates a new “mirror” object named “span1”. Span1 will send any IP traffic on the `vmbr3` OVS bridge to the second virtual interface on VM 106 (tap106i1).\n\n\n\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF48:18233:173338:5C41E8:6AB9203F"},"text_sha256":"5e1568d77f9b0c91dc42db9b3123d4a6c86921838b298a5b1a734c994dd21548"},{"path":"certifications/cisco/scor-350-701/content_security_fundamentals.md","size":1236,"blob_sha":"cf1d7808e5ac60a789d4edbf86ce479d806d770e","priority":1,"status":200,"text":"## Cisco Content Security Fundamentals\n- Email Security\n- Web Security\n\n\n### 1. Email Security\n- **Spam Protection**: Filtering out unwanted and potentially harmful email messages.\n- **Virus and Malware Defense**: Scanning emails for malicious software.\n- **Phishing Protection**: Detecting and blocking attempts to acquire sensitive information through deceptive emails.\n- **Data Loss Prevention (DLP)**: Preventing sensitive information from leaving the organization via email.\n- **Email Encryption**: Ensuring that email content is secure and unreadable during transit.\n- **Advanced Threat Protection**: Identifying and responding to sophisticated cyber threats.\n\n### 2. Web Security\n- **URL Filtering**: Blocking access to harmful or inappropriate websites.\n- **Malware Scanning**: Inspecting web content to identify and block malware.\n- **Application Visibility and Control**: Monitoring and controlling the use of web applications to prevent security breaches.\n- **HTTPS Inspection**: Decrypting and inspecting encrypted web traffic for threats.\n- **Data Security**: Protecting sensitive data accessed or transferred over the web.\n\n## Cisco Security Products\n\nhttps://www.cisco.com/site/us/en/products/security/all-products.html\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC94:09ED:DF37B:3DBCDB:6AB9203F"},"text_sha256":"7cf9af48f2d4c713c364a16bd6e04dba837c58a1afb67a0079bf49a79fbe7774"},{"path":"cybersecurity-domains/application-security/web-application-testing/api_security_assessment_README.md","size":9966,"blob_sha":"830bdc35974138dbc05e490be163b7bdf50e2f95","priority":1,"status":200,"text":"# API Security Assessment Tool\n\nA comprehensive automated security testing tool for REST APIs, covering 9 critical security domains.\n\n## Features\n\n✅ **Transport & TLS Security** - HTTPS enforcement, certificate validation, HSTS headers  \n✅ **Authentication Testing** - JWT validation, token lifetime, algorithm security  \n✅ **Authorization Testing** - IDOR prevention, privilege escalation, mass assignment  \n✅ **Input Validation** - SQL injection, NoSQL injection, command injection  \n✅ **SSRF Protection** - URL validation, private IP blocking, cloud metadata protection  \n✅ **Rate Limiting** - DoS protection, request throttling  \n✅ **Information Disclosure** - Error handling, header exposure, verbose messages  \n✅ **Management Endpoints** - Admin interface exposure, debug endpoints  \n✅ **CORS Configuration** - Cross-Origin Resource Sharing security  \n✅ **Automated Reporting** - JSON export, severity classification, remediation guidance\n\n## Installation\n\n```bash\n# Install dependencies\npip install requests pyjwt\n\n# Make script executable (optional)\nchmod +x api_security_assessment.py\n```\n\n## Quick Start\n\n### Basic Usage\n\n```bash\n# Test an API\npython api_security_assessment.py --url https://api.example.com\n\n# Test with authentication token\npython api_security_assessment.py --url https://api.example.com --token \"Bearer your-token-here\"\n\n# Test specific endpoints\npython api_security_assessment.py \\\n  --url https://api.example.com \\\n  --endpoints /api/users,/api/data,/api/search\n```\n\n### Advanced Usage\n\n```bash\n# Test with custom thread count\npython api_security_assessment.py \\\n  --url https://api.example.com \\\n  --token \"your-jwt-token\" \\\n  --endpoints /api/v1/users,/api/v1/products \\\n  --threads 20\n\n# Output results in JSON format\npython api_security_assessment.py \\\n  --url https://api.example.com \\\n  --output json\n```\n\n### Programmatic Usage\n\n```python\nfrom api_security_assessment import APISecurityAssessment\n\n# Configure your API\nAPI_URL = \"https://your-api.com\"\nAUTH_TOKEN = \"your-jwt-token\"  # Optional\n\n# Define endpoints to test\nTEST_ENDPOINTS = [\n    \"/api/v1/users\",\n    \"/api/v1/products\", \n    \"/api/v1/orders\"\n]\n\n# Run full assessment\nassessor = APISecurityAssessment(API_URL, AUTH_TOKEN)\nassessor.run_full_assessment(TEST_ENDPOINTS)\n```\n\n### Custom Testing\n\n```python\n# Test specific security domains\nassessor = APISecurityAssessment(API_URL, AUTH_TOKEN)\n\n# Test only TLS configuration\nassessor.test_tls_security()\n\n# Test only authentication\nassessor.test_authentication()\n\n# Test authorization on specific endpoints\nassessor.test_authorization([\"/api/admin\", \"/api/settings\"])\n\n# Test for SQL injection\nassessor.test_input_validation([\"/api/search\"])\n\n# Test for SSRF\nassessor.test_ssrf([\"/api/webhook\"])\n\n# Test rate limiting\nassessor.test_rate_limiting(\"/api/data\")\n\n# Test information disclosure\nassessor.test_information_disclosure()\n\n# Test management endpoints\nassessor.test_management_endpoints()\n\n# Test CORS configuration\nassessor.test_cors_configuration()\n\n# Generate report\nassessor.generate_report()\n```\n\n## Example Output\n\n```\n============================================================\nAPI Security Assessment: https://api.example.com\n============================================================\n\n=== Testing TLS Security ===\n[MEDIUM] Missing HSTS Header\n\n=== Testing Authentication ===\n  Token algorithm: RS256\n  Token lifetime: 2.0 hours\n[MEDIUM] Long JWT Lifetime\n\n=== Testing Authorization ===\n  /api/users: Protected (401)\n  /api/data: Protected (401)\n\n=== Testing Input Validation ===\n[CRITICAL] SQL Injection in /api/search\n\n=== Testing SSRF Protection ===\n\n=== Testing Rate Limiting ===\n  Sending 120 requests to test rate limiting...\n  Rate limiting detected: 100 successful, 20 rate-limited\n\n=== Testing Information Disclosure ===\n[LOW] Header Exposure: Server\n\n=== Testing Management Endpoints ===\n[HIGH] Exposed Management Endpoint: /swagger\n\n=== Testing CORS Configuration ===\n[MEDIUM] Permissive CORS Policy\n\n============================================================\nASSESSMENT SUMMARY\n============================================================\n\nTotal Findings: 5\n  🔴 CRITICAL: 1\n  🟠 HIGH:     1\n  🟡 MEDIUM:   3\n  🟢 LOW:      1\n\n============================================================\nDETAILED FINDINGS\n============================================================\n\n1. [CRITICAL] SQL Injection in /api/search\n   Category: Input Validation\n   Description: Endpoint vulnerable to SQL injection\n   Evidence: Payload: ' OR '1'='1, Response contains SQL error\n   Remediation: Use parameterized queries and prepared statements\n\n2. [HIGH] Exposed Management Endpoint: /swagger\n   Category: Management Endpoints\n   Description: Management or admin endpoint accessible without restrictions\n   Evidence: Status: 200, Size: 15234 bytes\n   Remediation: Restrict access to management endpoints via network controls\n\n...\n\nReport saved to: api_security_assessment_20251116_143022.json\n```\n\n## Security Domains Tested\n\n### 1. Transport & TLS Security\n\n- HTTPS enforcement\n- HTTP to HTTPS redirect\n- HSTS header presence\n- TLS version and cipher strength\n- Certificate validation\n\n### 2. Authentication\n\n- JWT algorithm validation\n- Token signature strength (RS256/ES256 vs HS256/none)\n- Token lifetime validation\n- Token expiration handling\n- Claim validation (iss, aud, exp, nbf, iat)\n\n### 3. Authorization\n\n- Unauthenticated access attempts\n- IDOR (Insecure Direct Object Reference)\n- Privilege escalation testing\n- Mass assignment vulnerabilities\n- Resource-level access control\n\n### 4. Input Validation\n\n- SQL injection testing\n- NoSQL injection testing\n- Command injection testing\n- LDAP injection testing\n- Schema validation\n\n### 5. SSRF Prevention\n\n- Internal network access (localhost, 127.0.0.1, private IPs)\n- Cloud metadata endpoints (AWS, GCP, Azure)\n- File protocol access (file://)\n- Protocol validation (gopher://, dict://, ftp://)\n- DNS rebinding protection\n\n### 6. Rate Limiting & DoS\n\n- Request rate limits per IP\n- Request rate limits per user\n- Burst protection\n- Request size limits\n- Timeout enforcement\n\n### 7. Information Disclosure\n\n- Verbose error messages\n- Stack traces in responses\n- Server header exposure\n- Framework version disclosure\n- Debug information leakage\n\n### 8. Management Endpoints\n\n- Admin panel exposure\n- Debug endpoints\n- Health check endpoints\n- Metrics endpoints\n- API documentation exposure\n- Database admin tools\n\n### 9. CORS Configuration\n\n- Wildcard origin policies\n- Credential handling\n- Origin reflection vulnerabilities\n- Method restrictions\n- Header restrictions\n\n## Command Line Options\n\n```\nusage: api_security_assessment.py [-h] --url URL [--token TOKEN] \n                                  [--endpoints ENDPOINTS] [--output {json,text}]\n                                  [--threads THREADS]\n\nComprehensive API Security Assessment Tool\n\noptions:\n  -h, --help            show this help message and exit\n  --url URL             Base URL of the API to assess (e.g., https://api.example.com)\n  --token TOKEN         Authentication token (JWT or Bearer token)\n  --endpoints ENDPOINTS Comma-separated list of endpoints to test (e.g., /api/users,/api/data)\n  --output {json,text}  Output format (json, text). Default: text\n  --threads THREADS     Number of threads for concurrent testing (default: 10)\n```\n\n## Security Considerations\n\n### Responsible Testing\n\n- Only test APIs you own or have explicit permission to test\n- Be mindful of rate limiting and server load\n- Use test environments when possible\n- Follow responsible disclosure for any vulnerabilities found\n\n### Limitations\n\n- This tool performs automated testing and may not catch all vulnerabilities\n- Manual security testing and code review are still recommended\n- Some tests may produce false positives that require manual verification\n- Business logic flaws require manual analysis\n\n### Best Practices\n\n1. **Regular Testing**: Run assessments regularly as part of your CI/CD pipeline\n2. **Comprehensive Coverage**: Test all API endpoints, not just public ones\n3. **Environment Isolation**: Use dedicated test environments\n4. **Remediation Tracking**: Track and verify fixes for identified issues\n5. **Documentation**: Maintain security testing documentation\n\n## Integration Examples\n\n### CI/CD Pipeline Integration\n\n```yaml\n# GitHub Actions example\nname: API Security Assessment\non: [push, pull_request]\n\njobs:\n  security-test:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - name: Setup Python\n      uses: actions/setup-python@v2\n      with:\n        python-version: '3.9'\n    - name: Install dependencies\n      run: |\n        pip install requests pyjwt\n    - name: Run API Security Assessment\n      run: |\n        python api_security_assessment.py \\\n          --url ${{ secrets.API_URL }} \\\n          --token ${{ secrets.API_TOKEN }} \\\n          --output json\n```\n\n### Docker Integration\n\n```dockerfile\nFROM python:3.9-slim\n\nWORKDIR /app\nCOPY api_security_assessment.py .\nRUN pip install requests pyjwt\n\nENTRYPOINT [\"python\", \"api_security_assessment.py\"]\n```\n\n```bash\n# Build and run\ndocker build -t api-security-tool .\ndocker run api-security-tool --url https://api.example.com\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit pull requests or open issues for:\n\n- Additional security test cases\n- New vulnerability detection methods\n- Performance improvements\n- Documentation enhancements\n- Bug fixes\n\n## License\n\nThis tool is part of the [h4cker repository](https://github.com/The-Art-of-Hacking/h4cker) and is licensed under the MIT License.\n\n## Author\n\nCreated by [Omar Santos](https://omarsantos.io) as part of the h4cker cybersecurity learning resources.\n\n## Disclaimer\n\nThis tool is for educational and authorized testing purposes only. Users are responsible for ensuring they have proper authorization before testing any systems. The authors are not responsible for any misuse of this tool.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A67E:11E74B:17359F:5C444C:6AB9203E"},"text_sha256":"63e22b194e096e425f179245d5a6c78c0e47b57921b64bbf8f62f4c926789d95"},{"path":"cybersecurity-domains/application-security/web-application-testing/requirements_api_security.txt","size":330,"blob_sha":"e5ed6a278c917ed012f3275d23c42a98b8d88961","priority":1,"status":200,"text":"# API Security Assessment Tool Requirements\n# Install with: pip install -r requirements_api_security.txt\n\n# Core dependencies\nrequests>=2.28.0\nPyJWT>=2.6.0\n\n# Optional dependencies for enhanced functionality\nurllib3>=1.26.0\ncertifi>=2022.12.7\n\n# Development dependencies (optional)\n# pytest>=7.0.0\n# black>=22.0.0\n# flake8>=5.0.0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"957E:09BF:AAD24:2C60D0:6AB9203E"},"text_sha256":"0cfd1e98049e1ac6e1d77c08bba5874c9ed612d7c97089d2f26d79149a556499"},{"path":"cybersecurity-domains/cloud-container-security/docker-and-k8s-security/kubernetes/network-policy-example.md","size":7585,"blob_sha":"e5ebf237fec252b5dd572f0d5c39928f6c7087a5","priority":1,"status":200,"text":"# Example of a Network Policy in Kubernetes\nIn this example, we have created a network policy named `my-network-policy` that applies to pods with the label `app: my-app`.\n\n```yaml\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: my-network-policy\nspec:\n  podSelector:\n    matchLabels:\n      app: my-app\n  policyTypes:\n    - Ingress\n    - Egress\n  ingress:\n    - from:\n        - podSelector:\n            matchLabels:\n              role: backend\n        - ipBlock:\n            cidr: 10.0.0.0/24\n    - ports:\n        - protocol: TCP\n          port: 80\n  egress:\n    - to:\n        - podSelector:\n            matchLabels:\n              role: database\n```\n\n\nThe policy has the following rules:\n\n- `Ingress`: Incoming traffic rules\n  - Allow traffic from pods with the label `role: backend`\n  - Allow traffic from the IP block `10.0.0.0/24`\n  - Allow incoming TCP traffic on port 80\n\n- `Egress`: Outgoing traffic rules\n  - Allow outgoing traffic to pods with the label `role: database`\n\nThis network policy restricts incoming and outgoing traffic for pods with the label `app: my-app`. It only allows incoming traffic from pods with the label `role: backend` and from the specified IP block. It also permits outgoing traffic to pods with the label `role: database`. All other incoming and outgoing traffic is denied by default.\n\nTo apply this network policy, you can save it in a YAML file (e.g., `network-policy.yaml`) and use the `kubectl apply` command:\n\n```shell\nkubectl apply -f network-policy.yaml\n```\n\nOnce applied, the network policy takes effect, and the defined rules govern the traffic flow to and from pods based on the specified selectors and policies.\n\nIt's important to note that for network policies to take effect, the Kubernetes cluster must have a network plugin that supports network policy enforcement, such as Calico or Cilium. Additionally, make sure to evaluate and test your network policies thoroughly to ensure they align with your desired network segmentation and security requirements.\n\n## Comparing Calico and Cilium\n\nCalico and Cilium are both popular network plugins for Kubernetes that offer advanced networking and security capabilities. Calico utilizes a pure Layer 3 approach with BGP routing, providing robust network policy support, distributed firewalling, and scalability for large-scale deployments. It integrates seamlessly with Kubernetes, making it an excellent choice for managing network policies and enforcing security controls. On the other hand, Cilium combines Layer 3 and Layer 4/Layer 7 proxy-based networking and policy enforcement. It offers advanced features such as deep packet inspection, identity-based access controls, and application-layer security. Cilium also provides built-in service mesh functionality, including support for Envoy and Istio. With high scalability, performance, and observability features, Calico and Cilium offer reliable solutions for managing network connectivity, security, and observability within Kubernetes clusters.\n\n1. Calico Documentation: [https://docs.projectcalico.org](https://docs.projectcalico.org)\n\nThe Calico documentation provides comprehensive information on getting started, installation, configuration, network policies, troubleshooting, and advanced features of Calico for Kubernetes and other platforms.\n\n2. Cilium Documentation: [https://docs.cilium.io](https://docs.cilium.io)\n\nThe Cilium documentation covers various aspects of Cilium, including installation, networking, security, observability, service mesh integration, and API reference. It provides in-depth guidance on using Cilium in Kubernetes and other environments.\n\n\n```\n+-----------------+-----------------------------------------+----------------------------------+\n|    Feature      |                 Calico                    |              Cilium              |\n+-----------------+-----------------------------------------+----------------------------------+\n| Architecture    | Uses a pure Layer 3 approach with BGP     | Utilizes a combination of Layer 3 |\n|                 | routing for networking and policy        | and Layer 4/Layer 7 proxy-based  |\n|                 | enforcement.                            | networking and policy.           |\n+-----------------+-----------------------------------------+----------------------------------+\n| Network Policy  | Provides robust network policy support   | Offers advanced network policy   |\n| Management      | and integration with Kubernetes.         | capabilities, including         |\n|                 |                                         | HTTP/HTTPS and gRPC-layer        |\n|                 |                                         | filtering and policy enforcement.|\n+-----------------+-----------------------------------------+----------------------------------+\n| Security        | Implements a distributed firewall model  | Offers deep packet inspection,   |\n|                 | with ingress and egress filtering.       | identity-based access controls,  |\n|                 |                                         | and application-layer security.  |\n+-----------------+-----------------------------------------+----------------------------------+\n| Scalability     | Designed to scale to thousands of        | Provides high scalability and    |\n|                 | nodes and handle large-scale deployments.| performance for large Kubernetes |\n|                 |                                         | clusters and high-throughput      |\n|                 |                                         | workloads.                       |\n+-----------------+-----------------------------------------+----------------------------------+\n| Service Mesh    | Can be used as a foundation for           | Provides built-in service mesh   |\n| Integration     | integrating with service mesh solutions  | functionality, including support |\n|                 | like Istio.                              | for Envoy and Istio.             |\n+-----------------+-----------------------------------------+----------------------------------+\n| Performance     | Offers high-performance networking and   | Provides efficient packet        |\n|                 | forwarding with low latency.             | processing and low latency       |\n|                 |                                         | communication between containers.|\n+-----------------+-----------------------------------------+----------------------------------+\n| Observability   | Provides network flow logs, network      | Offers advanced observability    |\n|                 | policy auditing, and visibility into     | features, including detailed     |\n|                 | network traffic and policies.            | network flow logs, service mesh  |\n|                 |                                         | observability, and tracing.      |\n+-----------------+-----------------------------------------+----------------------------------+\n| Community       | Has a large and active community,        | Has a growing community and      |\n|                 | backed by Project Calico and Tigera.     | strong industry support.         |\n+-----------------+-----------------------------------------+----------------------------------+\n```\n\nPlease note that the table provides a high-level comparison and may not include all features or specific details of each product. It's important to consult the official documentation and conduct a thorough evaluation to determine the best fit for your specific networking and security requirements in Kubernetes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"09CC:375F4:175CB7:5C6DC3:6AB92040"},"text_sha256":"665cbd253a236cf32e3ec236e2341968cbc29e2660372854c8c5b687e4585b26"},{"path":"cybersecurity-domains/fundamentals/foundational-cybersecurity-concepts/Undertanding Information Security Controls.md","size":4472,"blob_sha":"6c774dcb975768911dcea30537638b66931d4067","priority":1,"status":200,"text":"# Undertanding Information Security Controls\n\nInformation security controls are essential measures designed to protect information assets from various security threats. These controls ensure the confidentiality, integrity, and availability (CIA) of information, which are the core principles of information security.\n\n### **Types of Information Security Controls**\n\nInformation security controls can be broadly categorized into three main types: administrative, physical, and technical controls. Each type serves specific functions and addresses different aspects of security.\n\n#### **1. Administrative Controls**\n\nAdministrative controls involve the policies, procedures, and guidelines established by an organization to manage and govern its information security. These controls are crucial for setting the tone and framework for security practices within the organization.\n\n- **Examples**: Security policies, employee training programs, incident response plans, and access control policies.\n- **Functions**: These controls help in managing security risks, ensuring compliance with regulations, and fostering a security-conscious culture within the organization \n\n#### **2. Physical Controls**\n\nPhysical controls are measures taken to protect the physical infrastructure and hardware that store and process information. These controls are designed to prevent unauthorized physical access to facilities and equipment.\n\n- **Examples**: Security guards, surveillance cameras, locks, biometric access controls, and secure server rooms.\n- **Functions**: These controls aim to deter, detect, and prevent physical intrusions that could compromise information security \n\n#### **3. Technical Controls**\n\nTechnical controls, also known as logical controls, involve the use of technology to protect information systems and data. These controls are implemented through hardware and software solutions.\n\n- **Examples**: Firewalls, antivirus software, encryption, intrusion detection systems, and multi-factor authentication.\n- **Functions**: These controls help in preventing, detecting, and responding to cyber threats and vulnerabilities \n\n### **Functions of Security Controls**\n\nSecurity controls can also be classified based on their specific functions in the context of a security incident:\n\n- **Preventive Controls**: Aim to prevent security incidents from occurring. Examples include access controls, encryption, and security awareness training \n- **Detective Controls**: Designed to identify and alert security teams to ongoing or attempted security breaches. Examples include intrusion detection systems and security monitoring.\n- **Corrective Controls**: Focus on mitigating the impact of a security incident and restoring systems to normal operations. Examples include data backups and disaster recovery plans.\n- **Deterrent Controls**: Intended to discourage potential attackers from attempting to breach security. Examples include warning signs and legal penalties.\n- **Compensating Controls**: Provide alternative measures to achieve security objectives when primary controls are not feasible. Examples include additional monitoring when encryption is not possible.\n\n### **Importance of Information Security Controls**\n\nImplementing robust information security controls is critical for several reasons:\n\n- **Protection Against Unauthorized Access**: Controls help prevent unauthorized individuals from accessing sensitive information, thereby reducing the risk of data breaches\n- **Compliance with Regulations**: Many industries have strict legal requirements for data protection. Effective controls ensure compliance with regulations such as GDPR and HIPAA\n- **Safeguarding Intellectual Property**: Controls protect valuable intellectual property from theft or unauthorized access, preserving competitive advantage and financial stability\n- **Maintaining Customer Trust**: By protecting customer data, organizations can build and maintain trust and loyalty, which are essential for long-term success\n- **Ensuring Business Continuity**: Controls help in maintaining operations during and after a security incident, minimizing downtime and financial loss\n\n\n### Resources:\n- https://reciprocity.com/resources/what-are-information-security-controls/\n- https://en.wikipedia.org/wiki/Security_controls\n- https://www.bitsight.com/glossary/information-security-controls\n- https://www.infosectrain.com/blog/types-of-security-controls/\n- https://purplesec.us/security-controls/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B702:3AC5A:177BDF:5C8B82:6AB92040"},"text_sha256":"7bf490b74563c3f19860997867fbd51d3467358cee365dc8afc29112908bda9f"},{"path":"training-reference/cheat-sheets/scripting/python-security.md","size":15760,"blob_sha":"4dbfb332593c173203928717dc97bd1811e140e9","priority":1,"status":200,"text":"# Python for Cybersecurity Cheat Sheet\n\nPython is one of the most popular programming languages for cybersecurity automation, scripting, and tool development.\n\n## 📋 Table of Contents\n- [Basic Python](#basic-python)\n- [Networking](#networking)\n- [Web Scraping](#web-scraping)\n- [File Operations](#file-operations)\n- [Cryptography](#cryptography)\n- [System Operations](#system-operations)\n- [Security Libraries](#security-libraries)\n- [Exploit Development](#exploit-development)\n- [Automation Scripts](#automation-scripts)\n\n## Basic Python\n\n### Data Types and Variables\n\n```python\n# Variables\nname = \"hacker\"\nage = 25\nis_admin = True\n\n# Lists\nports = [21, 22, 80, 443]\nports.append(8080)\nports.remove(21)\nprint(ports[0])  # First element\n\n# Dictionaries\nservice_info = {\"port\": 80, \"service\": \"http\", \"state\": \"open\"}\nprint(service_info[\"port\"])\nservice_info[\"version\"] = \"Apache 2.4\"\n\n# Sets\nunique_ips = {\" 192.168.1.1\", \"192.168.1.2\"}\nunique_ips.add(\"192.168.1.3\")\n\n# Tuples (immutable)\ncredentials = (\"admin\", \"password123\")\n```\n\n### Control Flow\n\n```python\n# If statements\nif port == 80:\n    print(\"HTTP\")\nelif port == 443:\n    print(\"HTTPS\")\nelse:\n    print(\"Unknown\")\n\n# For loops\nfor port in [21, 22, 80, 443]:\n    print(f\"Scanning port {port}\")\n\n# While loops\nattempts = 0\nwhile attempts < 3:\n    # Try authentication\n    attempts += 1\n\n# List comprehensions\nopen_ports = [p for p in range(1, 1025) if scan_port(p)]\n```\n\n### Functions\n\n```python\n# Basic function\ndef port_scan(host, port):\n    \"\"\"Scan a port on a host\"\"\"\n    # Implementation\n    return result\n\n# Function with default arguments\ndef scan(host, ports=[80, 443], timeout=5):\n    # Implementation\n    pass\n\n# Lambda functions\nsquare = lambda x: x ** 2\nfiltered_ports = filter(lambda p: p > 1024, port_list)\n```\n\n### Exception Handling\n\n```python\ntry:\n    response = urllib.request.urlopen(url)\nexcept urllib.error.URLError as e:\n    print(f\"Error: {e}\")\nexcept Exception as e:\n    print(f\"Unexpected error: {e}\")\nfinally:\n    # Cleanup code\n    pass\n```\n\n## Networking\n\n### Socket Programming\n\n```python\nimport socket\n\n# TCP client\ndef tcp_client(host, port):\n    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    client.connect((host, port))\n    client.send(b\"GET / HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n\")\n    response = client.recv(4096)\n    client.close()\n    return response\n\n# TCP server\ndef tcp_server(host, port):\n    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    server.bind((host, port))\n    server.listen(5)\n    print(f\"[*] Listening on {host}:{port}\")\n    \n    while True:\n        client, addr = server.accept()\n        print(f\"[*] Connection from {addr[0]}:{addr[1]}\")\n        client.send(b\"Welcome!\\n\")\n        client.close()\n\n# UDP socket\ndef udp_client(host, port):\n    client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n    client.sendto(b\"data\", (host, port))\n    data, addr = client.recvfrom(4096)\n    return data\n\n# Port scanner\ndef port_scan(host, port):\n    try:\n        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        sock.settimeout(1)\n        result = sock.connect_ex((host, port))\n        sock.close()\n        return result == 0  # True if port is open\n    except:\n        return False\n\n# Banner grabbing\ndef grab_banner(host, port):\n    try:\n        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        sock.settimeout(5)\n        sock.connect((host, port))\n        sock.send(b\"\\n\")\n        banner = sock.recv(1024)\n        sock.close()\n        return banner.decode()\n    except:\n        return None\n```\n\n### HTTP Requests\n\n```python\nimport requests\n\n# GET request\nresponse = requests.get(\"https://example.com\")\nprint(response.status_code)\nprint(response.headers)\nprint(response.text)\n\n# POST request\ndata = {\"username\": \"admin\", \"password\": \"test\"}\nresponse = requests.post(\"https://example.com/login\", data=data)\n\n# Custom headers\nheaders = {\"User-Agent\": \"Mozilla/5.0\"}\nresponse = requests.get(\"https://example.com\", headers=headers)\n\n# Session management\nsession = requests.Session()\nsession.get(\"https://example.com/login\")\nsession.post(\"https://example.com/auth\", data=credentials)\nresponse = session.get(\"https://example.com/dashboard\")\n\n# Proxies\nproxies = {\n    \"http\": \"http://127.0.0.1:8080\",\n    \"https\": \"http://127.0.0.1:8080\"\n}\nresponse = requests.get(\"https://example.com\", proxies=proxies, verify=False)\n\n# Timeouts\nresponse = requests.get(\"https://example.com\", timeout=5)\n\n# API requests\napi_url = \"https://api.example.com/v1/data\"\nheaders = {\"Authorization\": \"Bearer TOKEN\"}\nresponse = requests.get(api_url, headers=headers)\ndata = response.json()\n```\n\n## Web Scraping\n\n```python\nfrom bs4 import BeautifulSoup\nimport requests\n\n# Basic scraping\nresponse = requests.get(\"https://example.com\")\nsoup = BeautifulSoup(response.text, 'html.parser')\n\n# Find elements\ntitle = soup.find('title').text\nlinks = soup.find_all('a')\nfor link in links:\n    print(link.get('href'))\n\n# CSS selectors\ndivs = soup.select('div.class-name')\nids = soup.select('#element-id')\n\n# Extract data\ntable = soup.find('table')\nrows = table.find_all('tr')\nfor row in rows:\n    cols = row.find_all('td')\n    data = [col.text.strip() for col in cols]\n\n# Scrape with authentication\nsession = requests.Session()\nlogin_data = {\"username\": \"user\", \"password\": \"pass\"}\nsession.post(\"https://example.com/login\", data=login_data)\nresponse = session.get(\"https://example.com/protected\")\nsoup = BeautifulSoup(response.text, 'html.parser')\n```\n\n## File Operations\n\n```python\n# Read file\nwith open('file.txt', 'r') as f:\n    content = f.read()\n\n# Read line by line\nwith open('file.txt', 'r') as f:\n    for line in f:\n        print(line.strip())\n\n# Write file\nwith open('output.txt', 'w') as f:\n    f.write(\"Hello World\\n\")\n\n# Append to file\nwith open('log.txt', 'a') as f:\n    f.write(\"New log entry\\n\")\n\n# Binary files\nwith open('image.jpg', 'rb') as f:\n    data = f.read()\n\n# JSON\nimport json\n\n# Read JSON\nwith open('data.json', 'r') as f:\n    data = json.load(f)\n\n# Write JSON\ndata = {\"name\": \"test\", \"value\": 123}\nwith open('output.json', 'w') as f:\n    json.dump(data, f, indent=2)\n\n# CSV\nimport csv\n\n# Read CSV\nwith open('data.csv', 'r') as f:\n    reader = csv.reader(f)\n    for row in reader:\n        print(row)\n\n# Write CSV\nwith open('output.csv', 'w', newline='') as f:\n    writer = csv.writer(f)\n    writer.writerow(['Name', 'Age'])\n    writer.writerow(['Alice', 30])\n\n# XML\nimport xml.etree.ElementTree as ET\n\ntree = ET.parse('data.xml')\nroot = tree.getroot()\nfor child in root:\n    print(child.tag, child.attrib)\n```\n\n## Cryptography\n\n```python\nimport hashlib\nimport hmac\nfrom cryptography.fernet import Fernet\n\n# Hashing\ndef md5_hash(data):\n    return hashlib.md5(data.encode()).hexdigest()\n\ndef sha256_hash(data):\n    return hashlib.sha256(data.encode()).hexdigest()\n\ndef sha512_hash(data):\n    return hashlib.sha512(data.encode()).hexdigest()\n\n# HMAC\ndef create_hmac(key, message):\n    return hmac.new(key.encode(), message.encode(), hashlib.sha256).hexdigest()\n\n# Symmetric encryption (Fernet)\n# Generate key\nkey = Fernet.generate_key()\n\n# Encrypt\ncipher = Fernet(key)\nencrypted = cipher.encrypt(b\"Secret message\")\n\n# Decrypt\ndecrypted = cipher.decrypt(encrypted)\n\n# Base64 encoding\nimport base64\n\nencoded = base64.b64encode(b\"data\")\ndecoded = base64.b64decode(encoded)\n\n# Password hashing\nimport bcrypt\n\n# Hash password\npassword = b\"password123\"\nsalt = bcrypt.gensalt()\nhashed = bcrypt.hashpw(password, salt)\n\n# Verify password\nif bcrypt.checkpw(password, hashed):\n    print(\"Password matches\")\n```\n\n## System Operations\n\n```python\nimport os\nimport subprocess\nimport shutil\n\n# Operating system\nprint(os.name)  # 'posix' or 'nt'\n\n# Current directory\nprint(os.getcwd())\n\n# Change directory\nos.chdir('/tmp')\n\n# List directory\nfiles = os.listdir('.')\n\n# File operations\nos.rename('old.txt', 'new.txt')\nos.remove('file.txt')\nos.mkdir('new_dir')\nos.rmdir('empty_dir')\n\n# Path operations\nimport os.path\n\nif os.path.exists('file.txt'):\n    print(\"File exists\")\n\nif os.path.isfile('file.txt'):\n    print(\"It's a file\")\n\nif os.path.isdir('directory'):\n    print(\"It's a directory\")\n\n# Join paths\npath = os.path.join('directory', 'subdirectory', 'file.txt')\n\n# Get file size\nsize = os.path.getsize('file.txt')\n\n# Execute commands\nresult = subprocess.run(['ls', '-l'], capture_output=True, text=True)\nprint(result.stdout)\n\n# Execute with shell\nresult = subprocess.run('ps aux | grep python', shell=True, capture_output=True, text=True)\n\n# Copy files\nshutil.copy('source.txt', 'dest.txt')\nshutil.copytree('source_dir', 'dest_dir')\n\n# Environment variables\nhome = os.environ.get('HOME')\nos.environ['MY_VAR'] = 'value'\n```\n\n## Security Libraries\n\n### Scapy (Packet Manipulation)\n\n```python\nfrom scapy.all import *\n\n# Send ICMP packet\nsend(IP(dst=\"192.168.1.1\")/ICMP())\n\n# SYN scan\nans, unans = sr(IP(dst=\"192.168.1.1\")/TCP(dport=80, flags=\"S\"), timeout=1)\n\n# Sniff packets\npackets = sniff(count=10, filter=\"tcp port 80\")\n\n# DNS query\nresponse = sr1(IP(dst=\"8.8.8.8\")/UDP()/DNS(qd=DNSQR(qname=\"example.com\")))\n\n# ARP scan\nans, unans = srp(Ether(dst=\"ff:ff:ff:ff:ff:ff\")/ARP(pdst=\"192.168.1.0/24\"), timeout=2)\n```\n\n### Paramiko (SSH)\n\n```python\nimport paramiko\n\n# SSH client\nssh = paramiko.SSHClient()\nssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())\nssh.connect('hostname', username='user', password='pass')\n\n# Execute command\nstdin, stdout, stderr = ssh.exec_command('ls -la')\nprint(stdout.read().decode())\n\n# SFTP\nsftp = ssh.open_sftp()\nsftp.get('/remote/path/file.txt', '/local/path/file.txt')\nsftp.put('/local/path/file.txt', '/remote/path/file.txt')\nsftp.close()\n\nssh.close()\n```\n\n### Impacket (Network Protocols)\n\n```python\nfrom impacket.smbconnection import SMBConnection\n\n# SMB connection\nconn = SMBConnection('192.168.1.100', '192.168.1.100')\nconn.login('username', 'password')\n\n# List shares\nshares = conn.listShares()\nfor share in shares:\n    print(share['shi1_netname'])\n\n# Read file\ntid = conn.connectTree('C$')\nfid = conn.openFile(tid, 'Windows\\\\System32\\\\drivers\\\\etc\\\\hosts')\ndata = conn.readFile(tid, fid)\nconn.close()\n```\n\n## Exploit Development\n\n### Buffer Overflow\n\n```python\nimport socket\nimport sys\n\n# Create pattern\ndef create_pattern(length):\n    pattern = \"\"\n    parts = [\"A\", \"B\", \"C\"]\n    while len(pattern) < length:\n        pattern += parts[len(pattern) % len(parts)]\n    return pattern[:length]\n\n# Exploit function\ndef exploit(target, port):\n    buffer = b\"A\" * 1000\n    buffer += b\"\\x90\" * 16  # NOP sled\n    buffer += b\"\\x41\\x42\\x43\\x44\"  # Return address (little endian)\n    buffer += shellcode\n    \n    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    s.connect((target, port))\n    s.send(buffer)\n    s.close()\n```\n\n### Shellcode\n\n```python\n# Linux x86 execve /bin/sh shellcode\nshellcode = (\n    b\"\\x31\\xc0\"              # xor eax, eax\n    b\"\\x50\"                  # push eax\n    b\"\\x68\\x2f\\x2f\\x73\\x68\"  # push 0x68732f2f\n    b\"\\x68\\x2f\\x62\\x69\\x6e\"  # push 0x6e69622f\n    b\"\\x89\\xe3\"              # mov ebx, esp\n    b\"\\x50\"                  # push eax\n    b\"\\x53\"                  # push ebx\n    b\"\\x89\\xe1\"              # mov ecx, esp\n    b\"\\xb0\\x0b\"              # mov al, 0x0b\n    b\"\\xcd\\x80\"              # int 0x80\n)\n\n# Reverse shell generator\ndef generate_reverse_shell(ip, port):\n    # Generate shellcode with msfvenom or custom assembly\n    pass\n```\n\n## Automation Scripts\n\n### Port Scanner\n\n```python\nimport socket\nimport concurrent.futures\n\ndef scan_port(host, port):\n    try:\n        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        sock.settimeout(1)\n        result = sock.connect_ex((host, port))\n        sock.close()\n        if result == 0:\n            return port, True\n        return port, False\n    except:\n        return port, False\n\ndef scan_host(host, ports):\n    open_ports = []\n    with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:\n        future_to_port = {executor.submit(scan_port, host, port): port for port in ports}\n        for future in concurrent.futures.as_completed(future_to_port):\n            port, is_open = future.result()\n            if is_open:\n                open_ports.append(port)\n                print(f\"[+] Port {port} is open\")\n    return open_ports\n\n# Usage\nhost = \"192.168.1.1\"\nports = range(1, 1025)\nscan_host(host, ports)\n```\n\n### Subdomain Enumeration\n\n```python\nimport dns.resolver\nimport concurrent.futures\n\ndef check_subdomain(subdomain, domain):\n    try:\n        answers = dns.resolver.resolve(f\"{subdomain}.{domain}\", 'A')\n        for answer in answers:\n            return subdomain, str(answer)\n    except:\n        return None\n\ndef enumerate_subdomains(domain, wordlist):\n    found = []\n    with open(wordlist, 'r') as f:\n        subdomains = [line.strip() for line in f]\n    \n    with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:\n        futures = {executor.submit(check_subdomain, sub, domain): sub for sub in subdomains}\n        for future in concurrent.futures.as_completed(futures):\n            result = future.result()\n            if result:\n                subdomain, ip = result\n                print(f\"[+] Found: {subdomain}.{domain} -> {ip}\")\n                found.append(result)\n    return found\n```\n\n### Password Cracker\n\n```python\nimport hashlib\n\ndef crack_md5(hash_to_crack, wordlist):\n    with open(wordlist, 'r', encoding='latin-1') as f:\n        for line in f:\n            password = line.strip()\n            hash_attempt = hashlib.md5(password.encode()).hexdigest()\n            if hash_attempt == hash_to_crack:\n                return password\n    return None\n\n# Usage\ntarget_hash = \"5f4dcc3b5aa765d61d8327deb882cf99\"  # password\nresult = crack_md5(target_hash, 'passwords.txt')\nif result:\n    print(f\"[+] Password found: {result}\")\n```\n\n### Web Directory Brute Force\n\n```python\nimport requests\nimport concurrent.futures\n\ndef check_directory(base_url, directory):\n    url = f\"{base_url}/{directory}\"\n    try:\n        response = requests.get(url, timeout=2)\n        if response.status_code != 404:\n            return url, response.status_code\n    except:\n        pass\n    return None\n\ndef brute_directories(base_url, wordlist):\n    found = []\n    with open(wordlist, 'r') as f:\n        directories = [line.strip() for line in f]\n    \n    with concurrent.futures.ThreadPoolExecutor(max_workers=20) as executor:\n        futures = {executor.submit(check_directory, base_url, dir): dir for dir in directories}\n        for future in concurrent.futures.as_completed(futures):\n            result = future.result()\n            if result:\n                url, status = result\n                print(f\"[+] Found: {url} (Status: {status})\")\n                found.append(result)\n    return found\n\n# Usage\nbrute_directories(\"https://example.com\", \"directories.txt\")\n```\n\n### SQL Injection Tester\n\n```python\nimport requests\n\ndef test_sql_injection(url, parameter, payloads):\n    vulnerable = []\n    for payload in payloads:\n        test_url = f\"{url}?{parameter}={payload}\"\n        try:\n            response = requests.get(test_url, timeout=5)\n            if any(error in response.text.lower() for error in ['sql', 'mysql', 'syntax', 'database']):\n                print(f\"[!] Potential SQLi: {payload}\")\n                vulnerable.append(payload)\n        except:\n            pass\n    return vulnerable\n\n# Usage\nsql_payloads = [\"'\", \"1' OR '1'='1\", \"1; DROP TABLE users--\"]\ntest_sql_injection(\"http://example.com/search\", \"q\", sql_payloads)\n```\n\n## Resources\n\n- [Python Documentation](https://docs.python.org/3/)\n- [Real Python](https://realpython.com/)\n- [Python for Cybersecurity](https://www.packtpub.com/product/python-for-cybersecurity/9781789138550)\n- [Violent Python](https://www.elsevier.com/books/violent-python/unknown/978-1-59749-957-6)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"41CE:3E1C8:1777A3:5C8680:6AB9203F"},"text_sha256":"22520f35663afa426cce00f8cecbd4d1a00b56423077151aaa5d50eb124b40f1"},{"path":"training-reference/organized-tools/mobile-security_tools.md","size":14486,"blob_sha":"7f58e0f7f3b73b51d631233e26fdcee739e671c6","priority":1,"status":200,"text":"# Mobile Security Tools\n\nThe following tools are organized for this category:\n\n---\n\n- [ADB-Toolkit - Tool for testing your Android device](http://feedproxy.google.com/~r/PentestTools/~3/9UFrHzThs_s/adb-toolkit-tool-for-testing-your.html)\n- [ANDRAX v3 - The First And Unique Penetration Testing Platform For Android Smartphones](http://feedproxy.google.com/~r/PentestTools/~3/3jIpU7zeiJg/andrax-v3-first-and-unique-penetration.html)\n- [ANDRAX v5R NH-Killer - Penetration Testing on Android](http://feedproxy.google.com/~r/PentestTools/~3/hIKv1ToZEMQ/andrax-v5r-nh-killer-penetration.html)\n- [APKHunt - Comprehensive Static Code Analysis Tool For Android Apps That Is Based On The OWASP MASVS Framework](http://www.kitploit.com/2023/02/apkhunt-comprehensive-static-code.html)\n- [APKLab - Android Reverse Engineering WorkBench For VS Code](http://feedproxy.google.com/~r/PentestTools/~3/xTftfJ4sHT0/apklab-android-reverse-engineering.html)\n- [Allsafe - Intentionally Vulnerable Android Application](http://feedproxy.google.com/~r/PentestTools/~3/v6pzEapdvOk/allsafe-intentionally-vulnerable.html)\n- [Android-PIN-Bruteforce - Unlock An Android Phone (Or Device) By Bruteforcing The Lockscreen PIN](http://feedproxy.google.com/~r/PentestTools/~3/s51KORysdVA/android-pin-bruteforce-unlock-android.html)\n- [Android_Hid - Use Android As Rubber Ducky Against Another Android Device](http://feedproxy.google.com/~r/PentestTools/~3/ATCWoFITtd8/androidhid-use-android-as-rubber-ducky.html)\n- [Androidqf - (Android Quick Forensics) Helps Quickly Gathering Forensic Evidence From Android Devices, In Order To Identify Potential Traces Of Compromise](http://feedproxy.google.com/~r/PentestTools/~3/OH942WoxeqE/androidqf-android-quick-forensics-helps.html)\n- [Androwarn - Yet Another Static Code Analyzer For Malicious Android Applications](http://feedproxy.google.com/~r/PentestTools/~3/CXJc4Zacvso/androwarn-yet-another-static-code.html)\n- [Apk-Medit - Memory Search And Patch Tool On Debuggable Apk Without Root & Ndk](http://feedproxy.google.com/~r/PentestTools/~3/fpYnRfgN1ng/apk-medit-memory-search-and-patch-tool.html)\n- [Apk.Sh - Makes Reverse Engineering Android Apps Easier, Automating Some Repetitive Tasks Like Pulling, Decoding, Rebuilding And Patching An APK](http://www.kitploit.com/2023/03/apksh-makes-reverse-engineering-android.html)\n- [ApkLeaks - Scanning APK File For URIs, Endpoints And Secrets](http://feedproxy.google.com/~r/PentestTools/~3/cjv6czeOzl4/apkleaks-scanning-apk-file-for-uris.html)\n- [Appshark - Static Taint Analysis Platform To Scan Vulnerabilities In An Android App](http://www.kitploit.com/2022/11/appshark-static-taint-analysis-platform.html)\n- [Arbitrium-RAT - A Cross-Platform, Fully Undetectable Remote Access Trojan, To Control Android, Windows And Linux](http://feedproxy.google.com/~r/PentestTools/~3/xdcn42mgUxo/arbitrium-rat-cross-platform-fully.html)\n- [Arcane - A Simple Script Designed To Backdoor iOS Packages (Iphone-Arm) And Create The Necessary Resources For APT Repositories](http://feedproxy.google.com/~r/PentestTools/~3/6dNxma-yOxI/arcane-simple-script-designed-to.html)\n- [Arkhota - A Web Brute Forcer For Android](http://feedproxy.google.com/~r/PentestTools/~3/m46SF2LteWU/arkhota-web-brute-forcer-for-android.html)\n- [CiLocks - Android LockScreen Bypass](http://feedproxy.google.com/~r/PentestTools/~3/TwRx8lZsEI8/cilocks-android-lockscreen-bypass.html)\n- [Damn-Vulnerable-Bank - Vulnerable Banking Application For Android](http://feedproxy.google.com/~r/PentestTools/~3/2Miq4-7C-C8/damn-vulnerable-bank-vulnerable-banking.html)\n- [Dockerized-Android - A Container-Based Framework To Enable The Integration Of Mobile Components In Security Training Platforms](http://feedproxy.google.com/~r/PentestTools/~3/SCuXI_UPSk4/dockerized-android-container-based.html)\n- [Dr. Memory - Memory Debugger For Windows, Linux, Mac, And Android](http://feedproxy.google.com/~r/PentestTools/~3/2A801pnMhqk/dr-memory-memory-debugger-for-windows.html)\n- [DroidDetective - A Machine Learning Malware Analysis Framework For Android Apps](http://www.kitploit.com/2022/05/droiddetective-machine-learning-malware.html)\n- [DroidFiles - Get Files From Android Directories](http://feedproxy.google.com/~r/PentestTools/~3/5OCoXRwNFdM/droidfiles-get-files-from-android.html)\n- [DroidTracker - Script To Generate An Android App To Track Location In Real Time](http://feedproxy.google.com/~r/PentestTools/~3/5fV3zbDoT-I/droidtracker-script-to-generate-android.html)\n- [Dwarf - Full Featured Multi Arch/Os Debugger Built On Top Of PyQt5 And Frida](http://feedproxy.google.com/~r/PentestTools/~3/oR5kYVz0iVo/dwarf-full-featured-multi-archos.html)\n- [EVABS - Extremely Vulnerable Android Labs](http://feedproxy.google.com/~r/PentestTools/~3/WaMsoBOGlrA/evabs-extremely-vulnerable-android-labs.html)\n- [EvilApp - Phishing Attack Using An Android App To Grab Session Cookies For Any Website (ByPass 2FA)](http://feedproxy.google.com/~r/PentestTools/~3/4q8G1KztMgY/evilapp-phishing-attack-using-android.html)\n- [FAMA - Forensic Analysis For Mobile Apps](http://feedproxy.google.com/~r/PentestTools/~3/t4Bql1kSR7Y/fama-forensic-analysis-for-mobile-apps.html)\n- [FRIDA-DEXDump - Fast Search And Dump Dex On Memory](http://feedproxy.google.com/~r/PentestTools/~3/PopMEkBIBlE/frida-dexdump-fast-search-and-dump-dex.html)\n- [FireStorePwn - Firestore Database Vulnerability Scanner Using APKs](http://feedproxy.google.com/~r/PentestTools/~3/MBLBoxNY2DI/firestorepwn-firestore-database.html)\n- [Frida-Ios-Hook - A Tool That Helps You Easy Trace Classes, Functions, And Modify The Return Values Of Methods On iOS Platform](http://www.kitploit.com/2022/05/frida-ios-hook-tool-that-helps-you-easy.html)\n- [Fsmon - Monitor Filesystem On iOS / OS X / Android / FirefoxOS / Linux](http://feedproxy.google.com/~r/PentestTools/~3/JWYXGMKRJYw/fsmon-monitor-filesystem-on-ios-os-x.html)\n- [GDA Android Reversing Tool - A New Decompiler Written Entirely In C++, So It Does Not Rely On The Java Platform, Which Is Succinct, Portable And Fast, And Supports APK, DEX, ODEX, Oat](http://feedproxy.google.com/~r/PentestTools/~3/d0P7zuioR8E/gda-android-reversing-tool-new.html)\n- [GameGuardian - Android Game Hack/Alteration Tool](http://feedproxy.google.com/~r/PentestTools/~3/6ReYL4igg7Q/gameguardian-android-game.html)\n- [Ghidra_Kernelcache - A Ghidra Framework For iOS Kernelcache Reverse Engineering](http://feedproxy.google.com/~r/PentestTools/~3/pgjsv_S6L_E/ghidrakernelcache-ghidra-framework-for.html)\n- [Hacktronian - All In One Hacking Tool For Linux & Android](http://feedproxy.google.com/~r/PentestTools/~3/yV_fdYg2NkU/hacktronian-all-in-one-hacking-tool-for.html)\n- [Hackuna - The First Mobile App to Track Hackers](http://feedproxy.google.com/~r/PentestTools/~3/DMmt1Y2sd_A/hackuna-first-mobile-app-to-track.html)\n- [Haxx - Untethered + Unsandboxed Code Execution Haxx As Root On iOS 14 - iOS 14.8.1](http://www.kitploit.com/2022/07/haxx-untethered-unsandboxed-code.html)\n- [HiddenEye - Modern Phishing Tool With Advanced Functionality (Android-Support-Available)](http://feedproxy.google.com/~r/PentestTools/~3/GTRsshv5Lcs/hiddeneye-modern-phishing-tool-with.html)\n- [HosTaGe - Low Interaction Mobile Honeypot](http://feedproxy.google.com/~r/PentestTools/~3/q7jGTsi3b70/hostage-low-interaction-mobile-honeypot.html)\n- [IOSSecuritySuite - iOS Platform Security And Anti-Tampering Swift Library](http://www.kitploit.com/2022/04/iossecuritysuite-ios-platform-security.html)\n- [InjuredAndroid - A Vulnerable Android Application That Shows Simple Examples Of Vulnerabilities In A CTF Style](http://feedproxy.google.com/~r/PentestTools/~3/AlIo6dS7vnA/injuredandroid-vulnerable-android.html)\n- [Kali NetHunter App Store - The New Android Store Dedicated to Free Security Apps](http://feedproxy.google.com/~r/PentestTools/~3/FpkbVd5aohk/kali-nethunter-app-store-new-android.html)\n- [KoodousFinder - A Simple Tool To Allows Users To Search For And Analyze Android Apps For Potential Security Threats And Vulnerabilities](https://www.kitploit.com/2023/05/koodousfinder-simple-tool-to-allows.html)\n- [LiveHiddenCamera - Library Which Record Live Video And Audio From Android Device Without Displaying A Preview](http://feedproxy.google.com/~r/PentestTools/~3/F4Bo_N9vCsw/livehiddencamera-library-which-record.html)\n- [Lockphish - A Tool For Phishing Attacks On The Lock Screen, Designed To Grab Windows Credentials, Android PIN And iPhone Passcode](http://feedproxy.google.com/~r/PentestTools/~3/Xl9LNG1vR24/lockphish-tool-for-phishing-attacks-on.html)\n- [Lockphish - The First Tool For Phishing Attacks On The Lock Screen, Designed To Grab Windows Credentials, Android PIN And iPhone Passcode](http://feedproxy.google.com/~r/PentestTools/~3/Plvy_Rl1lWA/lockphish-first-tool-for-phishing.html)\n- [MEAT - This Toolkit Aims To Help Forensicators Perform Different Kinds Of Acquisitions On iOS Devices](http://feedproxy.google.com/~r/PentestTools/~3/tBxfj4OX5ww/meat-this-toolkit-aims-to-help.html)\n- [MEDUZA - A More Or Less Universal SSL Unpinning Tool For iOS](http://feedproxy.google.com/~r/PentestTools/~3/2cKyd7r_Vs8/meduza-more-or-less-universal-ssl.html)\n- [Mariana Trench - Security Focused Static Analysis Tool For Android And Java Applications](http://www.kitploit.com/2021/12/mariana-trench-security-focused-static.html)\n- [MobileAudit - SAST and Malware Analysis for Android Mobile APKs](http://feedproxy.google.com/~r/PentestTools/~3/e9v2Qwc0eu4/mobileaudit-sast-and-malware-analysis.html)\n- [MobileHackersWeapons - Mobile Hacker's Weapons / A Collection Of Cool Tools Used By Mobile Hackers](http://feedproxy.google.com/~r/PentestTools/~3/oKmIKzGsibw/mobilehackersweapons-mobile-hackers.html)\n- [NFCGate - An NFC Research Toolkit Application For Android](http://feedproxy.google.com/~r/PentestTools/~3/ZyjlJyXcqXg/nfcgate-nfc-research-toolkit.html)\n- [Nanobrok - Web Service For Control And Protect Your Android Device Remotely](http://www.kitploit.com/2021/11/nanobrok-web-service-for-control-and.html)\n- [NinjaDroid - Ninja Reverse Engineering On Android APK Packages](http://feedproxy.google.com/~r/PentestTools/~3/A8IxFPEBMBc/ninjadroid-ninja-reverse-engineering-on.html)\n- [Obfuscapk - A Black-Box Obfuscation Tool For Android Apps](http://feedproxy.google.com/~r/PentestTools/~3/FL9KaM-xfFs/obfuscapk-black-box-obfuscation-tool.html)\n- [Objection v1.6.6 - Runtime Mobile Exploration](http://feedproxy.google.com/~r/PentestTools/~3/_lHkwuwDics/objection-v166-runtime-mobile.html)\n- [Pretender - Your MitM Sidekick For Relaying Attacks Featuring DHCPv6 DNS Takeover As Well As mDNS, LLMNR And NetBIOS-NS Spoofing](http://www.kitploit.com/2022/07/pretender-your-mitm-sidekick-for.html)\n- [Quark-Engine - An Obfuscation-Neglect Android Malware Scoring System](http://feedproxy.google.com/~r/PentestTools/~3/utzP6iBfGHg/quark-engine-obfuscation-neglect.html)\n- [Rafel-Rat - Android Rat Written In Java With WebPanel For Controlling Victims](http://feedproxy.google.com/~r/PentestTools/~3/bMMoyRB9IpU/rafel-rat-android-rat-written-in-java.html)\n- [Runtime Mobile Security (RMS) - A Powerful Web Interface That Helps You To Manipulate Android Java Classes And Methods At Runtime](http://feedproxy.google.com/~r/PentestTools/~3/5no21xQboKw/runtime-mobile-security-rms-powerful.html)\n- [Ruse - Mobile Camera-Based Application That Attempts To Alter Photos To Preserve Their Utility To Humans While Making Them Unusable For Facial Recognition Systems](http://feedproxy.google.com/~r/PentestTools/~3/bOKl7xd6tZY/ruse-mobile-camera-based-application.html)\n- [Scrcpy - Display And Control Your Android Device](http://www.kitploit.com/2022/11/scrcpy-display-and-control-your-android.html)\n- [Simplify - Generic Android Deobfuscator](http://feedproxy.google.com/~r/PentestTools/~3/0TKRmeyRmf8/simplify-generic-android-deobfuscator.html)\n- [Slicer - Tool To Automate The Boring Process Of APK Recon](http://www.kitploit.com/2022/11/slicer-tool-to-automate-boring-process.html)\n- [Syhunt Community 6.7 - Web And Mobile Application Scanner](http://feedproxy.google.com/~r/PentestTools/~3/LCuYj1U9fus/syhunt-community-67-web-and-mobile.html)\n- [Truegaze - Static Analysis Tool For Android/iOS Apps Focusing On Security Issues Outside The Source Code](http://feedproxy.google.com/~r/PentestTools/~3/UP7CEeZKDqo/truegaze-static-analysis-tool-for.html)\n- [UEFI Firmware Parser - Parse BIOS/Intel ME/UEFI Firmware Related Structures: Volumes, FileSystems, Files, Etc](http://feedproxy.google.com/~r/PentestTools/~3/vrw7ce1SeJ0/uefi-firmware-parser-parse-biosintel.html)\n- [Umbrella_android - Digital And Physical Security Advice App](http://feedproxy.google.com/~r/PentestTools/~3/4VOlWJ1W13I/umbrellaandroid-digital-and-physical.html)\n- [Unicorn-Bios - Basic BIOS Emulator For Unicorn Engine](http://feedproxy.google.com/~r/PentestTools/~3/a1iJIC1mmaw/unicorn-bios-basic-bios-emulator-for.html)\n- [UserLAnd - The Easiest Way To Run A Linux Distribution or Application on Android](http://feedproxy.google.com/~r/PentestTools/~3/Z6GCKCBT-sI/userland-easiest-way-to-run-linux.html)\n- [VECTR - A Tool That Facilitates Tracking Of Your Red And Blue Team Testing Activities To Measure Detection And Prevention Capabilities Across Different Attack Scenarios](http://feedproxy.google.com/~r/PentestTools/~3/W7FX4P3lR1A/vectr-tool-that-facilitates-tracking-of.html)\n- [Vulners Scanner for Android - Passive Vulnerability Scanning Based On Software Version Fingerprint](http://feedproxy.google.com/~r/PentestTools/~3/jjXLZCER0Bk/vulners-scanner-for-android-passive.html)\n- [WiGLE - Wifi Wardriving (Nethugging Client For Android)](http://feedproxy.google.com/~r/PentestTools/~3/gDQEZOV06DY/wigle-wifi-wardriving-nethugging-client.html)\n- [Xnuspy - An iOS Kernel Function Hooking Framework For Checkra1N'Able Devices](http://feedproxy.google.com/~r/PentestTools/~3/7HpFfxxKZd4/xnuspy-ios-kernel-function-hooking.html)\n- [iOS Malicious Bit Hunter - A Malicious Plug-In Detection Eng ine For iOS Applications](http://feedproxy.google.com/~r/PentestTools/~3/l1tPy6s_Yvo/ios-malicious-bit-hunter-malicious-plug.html)\n- [pwnSpoof - Generates realistic spoofed log files for common web servers with customisable attack scenarios](http://www.kitploit.com/2021/11/pwnspoof-generates-realistic-spoofed.html)\n- [vAPI - Vulnerable Adversely Programmed Interface Which Is Self-Hostable API That Mimics OWASP API Top 10 Scenarios Through Exercises](http://www.kitploit.com/2022/04/vapi-vulnerable-adversely-programmed.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2920:2C474:179550:5CA52F:6AB92040"},"text_sha256":"c7276fa3fd62605c7f641e5561cc4e6bada668eb1b6b79fdaee63318f919b61d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=e4db7367a981679f1b0aaef759562bb35b5b9f4f; file=ai/ai-security/ai_security_tools_root.md; text=[jailbreak-evaluation]( ) ## Prompt Firewall and Redaction _Products that intercept prompts and responses and apply security or privacy rules to them. We've blended two categories here because some prompt firewalls just redact private data (and then reidentify in the response) while others focus on identifying and blocking attacks like injection attacks or stopping data leaks. Many of the products in this category do all of the above, which is why they've been combined._ - [Cisco AI Defense]( ) - Model Evaluation, monitoring, guardrails, inventory, AI asset discovery, and more. - [Robust Inte","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}}}
{"repository":"onnx/onnx","input_row":{"repository":"onnx/onnx","url":"https://github.com/onnx/onnx","name":"onnx","owner":"onnx","description":"Open standard for machine learning interoperability","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":21532,"issues":3189,"created_at":"2017-09-07T04:53:45Z","updated_at":"2026-09-27T07:21:29Z","first_commit_at":"2017-09-07T04:47:53Z","last_commit_at":"2026-09-27T07:21:24Z","activity_months":108.64,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:34.277Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"onnx/onnx","visibility":"public","created_at":"2017-09-07T04:53:45Z","updated_at":"2026-09-27T07:21:29Z","private":false,"fork":false,"archived":false,"stargazers_count":21532,"open_issues_count":241,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3579","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53E7:74E6D:17E1FF1:1BFFD82:6AB927D6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3578","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17ACAC4:1BCA45F:6AB927D6"},"commit":{"sha":"8236f49124dc0a37b8c33da2b8f962183c2c393e","url":"https://github.com/onnx/onnx/commit/8236f49124dc0a37b8c33da2b8f962183c2c393e","date":"2018-05-24T23:00:11Z","author_date":"2018-05-24T23:00:11Z","committer_date":"2018-05-24T23:00:11Z","tree_sha":"b3f7c3990af088e4af62d3da00defac96ad8c7e5","message_first_line":"Kezhan/update manifest (#1029)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3577","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17A233A:1BBF1EE:6AB927D7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4603,"blob_sha":"958df5b81a6b20d53d15c4a73e46a801c2777679","priority":0}],"documents":[{"path":"README.md","size":4603,"blob_sha":"958df5b81a6b20d53d15c4a73e46a801c2777679","priority":0,"status":200,"text":"\n<p align=\"center\"><img width=\"40%\" src=\"docs/ONNX_logo_main.png\" /><\/p>\n \n| Linux | Windows |\n|-------|---------|\n| [![Build Status](https://travis-ci.org/onnx/onnx.svg?branch=master)](https://travis-ci.org/onnx/onnx) | [![Build status](https://ci.appveyor.com/api/projects/status/lm50cevk2hmrll98/branch/master?svg=true)](https://ci.appveyor.com/project/onnx/onnx) |\n\n[Open Neural Network Exchange (ONNX)](http://onnx.ai) is the first step toward an open ecosystem that empowers AI developers\nto choose the right tools as their project evolves. ONNX provides an open source format for AI models.\nIt defines an extensible computation graph model, as well as definitions of built-in operators and standard\ndata types. Initially we focus on the capabilities needed for inferencing (evaluation).\n\nCaffe2, PyTorch, Microsoft Cognitive Toolkit, Apache MXNet and other tools are developing ONNX support. Enabling interoperability between different\nframeworks and streamlining the path from research to production will increase the speed of innovation in\nthe AI community. We are an early stage and we invite the community to submit feedback and help us further\nevolve ONNX.\n\n# Use ONNX\nStart experimenting today:\n* [Getting Started Guide](http://onnx.ai/getting-started)\n* [Supported Frameworks & Tools](http://onnx.ai/supported-tools)\n* [Tutorials on using ONNX converters](https://github.com/onnx/tutorials).\n\n# Learn about ONNX spec\n\nCheck ONNX design choices and internals:\n* [Overview](docs/Overview.md)\n* [ONNX intermediate representation spec](docs/IR.md)\n* [Versioning principles of the spec](docs/Versioning.md)\n* [Operators documentation](docs/Operators.md)\n* [Python API Overview](docs/PythonAPIOverview.md)\n\n# Tools\n* [Netron: a viewer for ONNX models](https://github.com/lutzroeder/Netron)\n* [Net Drawer ONNX vizualizer](https://github.com/onnx/tutorials/blob/master/tutorials/VisualizingAModel.md)\n\n# Contribute\nONNX is a community project. We encourage you to join the effort and contribute feedback, ideas, and code.\nYou can join [one of the working groups](https://github.com/onnx/onnx/wiki/%5BAnnouncement%5D-ONNX-working-groups-established) and help shape the future of ONNX.\n\nCheck out our [contribution guide](https://github.com/onnx/onnx/blob/master/docs/CONTRIBUTING.md)\nand [call for contributions](https://github.com/onnx/onnx/issues/426) to get started.\n\n# Discuss\nWe encourage you to open [Issues](https://github.com/onnx/onnx/issues), or use Gitter for more real-time discussion:\n[![Join the chat at https://gitter.im/onnx/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/onnx/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n# Follow Us\nStay up to date with the latest ONNX news. [[Facebook](https://www.facebook.com/onnxai/)] [[Twitter](https://twitter.com/onnxai)]\n\n\n\n\n\n\n# Installation\n\n## Binaries\n\nA binary build of ONNX is available from [Conda](https://conda.io), in [conda-forge](https://conda-forge.org/):\n\n```\nconda install -c conda-forge onnx\n```\n\n## Source\n\nYou will need an install of protobuf and numpy to build ONNX.  One easy\nway to get these dependencies is via\n[Anaconda](https://www.anaconda.com/download/):\n\n```\n# Use conda-forge protobuf, as default doesn't come with protoc\nconda install -c conda-forge protobuf numpy\n```\n\nYou can then install ONNX from PyPi (Note: Set environment variable `ONNX_ML=1` for onnx-ml):\n\n```\npip install onnx\n```\n\nYou can also build and install ONNX locally from source code (git clone https://github.com/onnx/onnx.git):\n\n```\npython setup.py install\n```\n\nNote: When installing in a non-Anaconda environment, make sure to install the Protobuf compiler before running the pip installation of onnx. For example, on Ubuntu:\n\n```\nsudo apt-get install protobuf-compiler libprotoc-dev\npip install onnx\n```\n\nAfter installation, run\n\n```\npython -c \"import onnx\"\n```\n\nto verify it works.  Note that this command does not work from\na source checkout directory; in this case you'll see:\n\n```\nModuleNotFoundError: No module named 'onnx.onnx_cpp2py_export'\n```\n\nChange into another directory to fix this error.\n\n# Testing\n\nONNX uses [pytest](https://docs.pytest.org) as test driver. In order to run tests, first you need to install pytest:\n\n```\npip install pytest-cov nbval\n```\n\nAfter installing pytest, do\n\n```\npytest\n```\n\nto run tests.\n\n# Development\n\nCheck out [contributor guide](https://github.com/onnx/onnx/blob/master/docs/CONTRIBUTING.md) for instructions.\n\n# License\n\n[MIT License](LICENSE)\n\n# Code of Conduct\n\n[ONNX Open Source Code of Conduct](http://onnx.ai/codeofconduct.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6F9E:3EACB:172FF3:5C4033:6AB92044"},"text_sha256":"0759e6842dbdd8ed71bc21dfc5ce5322d195f0eadd59ba21c47e8362ee620423"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3576","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:17D598B:1BF2AB9:6AB927D8"},"commit":{"sha":"8fba37cf78f95bc759a2ba978be5a5b9007f0af5","url":"https://github.com/onnx/onnx/commit/8fba37cf78f95bc759a2ba978be5a5b9007f0af5","date":"2026-06-30T15:42:05Z","author_date":"2026-06-30T15:42:05Z","committer_date":"2026-06-30T15:42:05Z","tree_sha":"f0daeea4816c41a73d7595b5f2b7b827fb60ea77","message_first_line":"Give a clear error for unknown ops in the version converter (#8117)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3575","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17CD4F4:1BEA8BD:6AB927D8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7871,"blob_sha":"24b9fa4e08486639e63daf26bc266abc5e5da591","priority":0},{"path":"docs/Security.md","size":10846,"blob_sha":"1d114560892647c9684427e8cd0ecbc436bec56a","priority":1},{"path":"SECURITY.md","size":2819,"blob_sha":"9cd1c404d3423ed98932390d4bd38bf943f271cb","priority":1}],"documents":[{"path":"README.md","size":7871,"blob_sha":"24b9fa4e08486639e63daf26bc266abc5e5da591","priority":0,"status":200,"text":"<!--\nCopyright (c) ONNX Project Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n<p align=\"center\"><img width=\"40%\" src=\"https://github.com/onnx/onnx/raw/main/docs/onnx-horizontal-color.png\" /><\/p>\n\n[![PyPI - Version](https://img.shields.io/pypi/v/onnx.svg)](https://pypi.org/project/onnx)\n[![CI](https://github.com/onnx/onnx/actions/workflows/main.yml/badge.svg)](https://github.com/onnx/onnx/actions/workflows/main.yml)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3313/badge)](https://bestpractices.coreinfrastructure.org/projects/3313)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/onnx/onnx/badge)](https://api.securityscorecards.dev/projects/github.com/onnx/onnx)\n[![SLSA 2](https://slsa.dev/images/gh-badge-level2.svg)](https://slsa.dev)\n[![REUSE compliant](https://api.reuse.software/badge/github.com/onnx/onnx)](https://api.reuse.software/info/github.com/onnx/onnx)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![abi3 compatible](https://img.shields.io/badge/abi3-compatible-brightgreen)](https://docs.python.org/3/c-api/stable.html)\n\n[Open Neural Network Exchange (ONNX)](https://onnx.ai) is an open ecosystem that empowers AI developers\nto choose the right tools as their project evolves. ONNX provides an open source format for AI models, both deep learning and traditional ML. It defines an extensible computation graph model, as well as definitions of built-in operators and standard\ndata types. Currently we focus on the capabilities needed for inferencing (scoring).\n\nONNX is [widely supported](http://onnx.ai/supported-tools) and can be found in many frameworks, tools, and hardware. Enabling interoperability between different frameworks and streamlining the path from research to production helps increase the speed of innovation in the AI community. We invite the community to join us and further evolve ONNX.\n\n\n# Use ONNX\n\n* [Documentation of ONNX Python Package](https://onnx.ai/onnx/)\n* [Tutorials for creating ONNX models](https://github.com/onnx/tutorials)\n* [Pre-trained ONNX models](https://github.com/onnx/models)\n\n# Learn about the ONNX spec\n\n* [Overview](https://github.com/onnx/onnx/blob/main/docs/Overview.md)\n* [ONNX intermediate representation spec](https://github.com/onnx/onnx/blob/main/docs/IR.md)\n* [Versioning principles of the spec](https://github.com/onnx/onnx/blob/main/docs/Versioning.md)\n* [Operators documentation](https://github.com/onnx/onnx/blob/main/docs/Operators.md)\n* [Operators documentation](https://onnx.ai/onnx/operators/index.html) (latest release)\n* [Python API Overview](https://github.com/onnx/onnx/blob/main/docs/PythonAPIOverview.md)\n\n# Programming utilities for working with ONNX Graphs\n\n* [Shape and Type Inference](https://github.com/onnx/onnx/blob/main/docs/ShapeInference.md)\n* [Graph Optimization](https://github.com/onnx/optimizer)\n* [Opset Version Conversion](https://github.com/onnx/onnx/blob/main/docs/docsgen/source/api/version_converter.md)\n\n# Contribute\n\nONNX is a community project and the open governance model is described [here](https://github.com/onnx/onnx/blob/main/community/readme.md). We encourage you to join the effort and contribute feedback, ideas, and code. You can participate in the [Special Interest Groups](https://github.com/onnx/onnx/blob/main/community/sigs.md) and [Working Groups](https://github.com/onnx/onnx/blob/main/community/working-groups.md) to shape the future of ONNX.\n\nCheck out our [contribution guide](https://github.com/onnx/onnx/blob/main/CONTRIBUTING.md) to get started.\n\nIf you think some operator should be added to ONNX specification, please read\n[this document](https://github.com/onnx/onnx/blob/main/docs/AddNewOp.md).\n\n# Community meetings\n\nThe schedules of the regular meetings of the Steering Committee, the working groups and the SIGs can be found [here](https://onnx.ai/calendar)\n\nCommunity Meetups are held at least once a year. Content from previous community meetups are at:\n\n* 2020.04.09 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14091402/LF+AI+Day+-ONNX+Community+Virtual+Meetup+-+Silicon+Valley+-+2020+April+9>\n* 2020.10.14 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14092138/LF+AI+Day+-+ONNX+Community+Workshop+-+2020+October+14>\n* 2021.03.24 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14092424/Instructions+for+Event+Hosts+-+LF+AI+Data+Day+-+ONNX+Virtual+Community+Meetup+-+March+2021>\n* 2021.10.21 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14093194/LF+AI+Data+Day+ONNX+Community+Virtual+Meetup+-+October+2021>\n* 2022.06.24 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14093969/ONNX+Community+Day+-+2022+June+24>\n* 2023.06.28 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14094507/ONNX+Community+Day+2023+-+June+28>\n\n# Discuss\n\nWe encourage you to open [Issues](https://github.com/onnx/onnx/issues), or use [Slack](https://lfaifoundation.slack.com/) (If you have not joined yet, please use this [link](https://join.slack.com/t/lfaifoundation/shared_invite/zt-3wx5vohc3-MeSYi3_dscb~u~cqs7zlPg) to join the group) for more real-time discussion.\n\n# Follow Us\n\nStay up to date with the latest ONNX news. [[Facebook](https://www.facebook.com/onnxai/)] [[Twitter/X](https://twitter.com/onnxai)]\n\n# Roadmap\n\nA roadmap process takes place every year. More details can be found [here](https://github.com/onnx/steering-committee/tree/main/roadmap)\n\n# Installation\n\nONNX released packages are published in PyPi.\n\n```sh\npip install onnx # or pip install onnx[reference] for optional reference implementation dependencies\n```\n\n[ONNX weekly packages](https://pypi.org/project/onnx-weekly/) are published in PyPI to enable experimentation and early testing.\n\nDetailed install instructions, including Common Build Options and Common Errors can be found [here](https://github.com/onnx/onnx/blob/main/INSTALL.md)\n\n# Python ABI3 Compatibility\n\nThis package provides [abi3](https://docs.python.org/3/c-api/stable.html)-compatible wheels, allowing a single binary wheel to work across multiple Python versions (from 3.12 onwards).\n\n\n# Testing\n\nONNX uses [pytest](https://docs.pytest.org) as test driver. In order to run tests, you will first need to install `pytest`:\n\n```sh\npip install pytest\n```\n\nAfter installing pytest, use the following command to run tests.\n\n```sh\npytest\n```\n\n# Development\n\nCheck out the [contributor guide](https://github.com/onnx/onnx/blob/main/CONTRIBUTING.md) for instructions.\n\n# Reproducible Builds (Linux)\n\nThis project provides reproducible builds for Linux.\n\nA *reproducible build* means that the same source code will always produce identical binary outputs, no matter who builds it or where it is built.\n\nTo achieve this, we use the [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) standard. This ensures that build timestamps and other time-dependent information are fixed, making the output bit-for-bit identical across different environments.\n\n### Why this matters\n- **Transparency**: Anyone can verify that the distributed binaries were created from the published source code.\n- **Security**: Prevents tampering or hidden changes in the build process.\n- **Trust**: Users can be confident that the binaries they download are exactly what the maintainers intended.\n\nIf you prefer, you can use the prebuilt reproducible binaries instead of building from source yourself.\n\n# License\n\n[Apache License v2.0](LICENSE)\n\n# Trademark\nCheckout [https://trademarks.justia.com](https://trademarks.justia.com/877/25/onnx-87725026.html) for the trademark.\n\n[General rules of the Linux Foundation on Trademark usage](https://www.linuxfoundation.org/legal/trademark-usage)\n\n# Code of Conduct\n\n[ONNX Open Source Code of Conduct](https://onnx.ai/codeofconduct.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D1AA:1F1FB6:1768E3:5C78CF:6AB92046"},"text_sha256":"da8a30a92557a002bdabb96233dfb8cc433693dc6fd2ad94275cb9d814a7c096"},{"path":"docs/Security.md","size":10846,"blob_sha":"1d114560892647c9684427e8cd0ecbc436bec56a","priority":1,"status":200,"text":"<!--\nCopyright (c) ONNX Project Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# External Data Security\n\nThis document describes the security model for loading and saving external data files in ONNX models. It is intended for maintainers working on the external data code paths.\n\n## Threat Model\n\nWhen an ONNX model references external data files via relative paths, an attacker who controls the model file can attempt:\n\n- **Symlink traversal**: A final-component symlink in the external data path pointing to a sensitive file (e.g., `/etc/shadow`), causing ONNX to read or overwrite arbitrary files.\n- **Parent-directory symlink**: A symlink in a parent directory component of the external data path, bypassing a check that only inspects the final component.\n- **Hardlink attacks**: A hardlink to a sensitive file appearing as a normal file, bypassing symlink-only checks while still exposing unintended data.\n- **Path traversal**: Using `..` segments or absolute paths to escape the model directory.\n\n## Defense Layers\n\nWe use a 4-layer defense-in-depth approach. Each entry point applies the layers appropriate to its context (see the table below).\n\n### Layer 1: Canonical Path Containment\n\n- **C++**: `std::filesystem::weakly_canonical()` resolves the path, then verifies it starts with the canonical base directory.\n\nThis catches `..` traversal and symlinks in any path component (not just the final one).\n\n### Layer 2: Symlink Detection\n\n- **C++**: `std::filesystem::is_symlink(data_path)` rejects the final-component symlink.\n\nThis is a belt-and-suspenders check alongside containment. It provides a clear, specific error message when the final path component is a symlink.\n\n### Layer 3: Secure File Open with Post-Open Verification\n\nThree platform-specific strategies, in order of preference:\n\n- **Linux 5.6+**: `openat2(RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS)` — atomic kernel containment. No TOCTOU. Falls back on `ENOSYS`.\n- **FreeBSD 13+ / macOS 15+**: `openat(O_RESOLVE_BENEATH | O_NOFOLLOW)` — equivalent BSD-style containment.\n- **POSIX fallback**: `open(O_NOFOLLOW)` + post-open inode comparison (`fstat` fd vs `stat` canonical path).\n- **Windows**: `CreateFileW(FILE_FLAG_OPEN_REPARSE_POINT)` + reparse point attribute check + inode comparison. Converted to CRT fd via `_open_osfhandle()` before returning.\n\nAll POSIX fds are opened with `O_CLOEXEC`. All platforms return a CRT file descriptor.\n\nHardlinks are detected via `fstat()` link count (POSIX) or `GetFileInformationByHandle()` (Windows), always fail closed.\n\n### Layer 4: Pre-Open Hardlink Count Check\n\n- **C++**: `std::filesystem::hard_link_count(data_path) > 1` rejects files with multiple hardlinks before opening.\n\nThis is defense-in-depth alongside Layer 3's post-open hardlink check. It provides a clear error message at the path level before any file I/O occurs.\n\n## Protected Entry Points\n\nAll Python entry points use the C++ `open_external_data()` function. In **read mode** it applies all four layers (pre-open validation via `resolve_external_data_location` for Layers 1, 2, 4, then Layer 3 post-open). In **write mode** it applies Layers 1 and 3 only — Layers 2 and 4 are skipped because the file may not yet exist. The C++ checker calls `resolve_external_data_location` directly without opening files, so Layer 3 does not apply there.\n\n| Entry Point | File | Mode | Layers |\n|---|---|---|---|\n| `resolve_external_data_location` | `onnx/checker.cc` | read | 1, 2, 4 |\n| `open_external_data` | `onnx/checker.cc` | read | 1, 2, 3, 4 |\n| `open_external_data` | `onnx/checker.cc` | write | 1, 3 |\n| `load_external_data_for_tensor` | `onnx/external_data_helper.py` | read | 1, 2, 3, 4 (via `open_external_data`) |\n| `save_external_data` | `onnx/external_data_helper.py` | write | 1, 3 (via `open_external_data`) |\n| `ModelContainer._load_large_initializers` | `onnx/model_container.py` | read | 1, 2, 3, 4 (via `open_external_data`) |\n\n## Known Limitations\n\n### Windows\n\n- Reparse points (symlinks, junctions) are rejected via `FILE_FLAG_OPEN_REPARSE_POINT` + attribute check.\n- Symlink and hardlink tests are skipped on Windows in the test suite.\n\n### Case-Insensitive Filesystems\n\nThe canonical path containment checks (Layers 1 and 3) use string comparison. On case-insensitive filesystems (Windows NTFS, macOS HFS+), paths with different casing may incorrectly fail containment. This fails closed (false rejection, not a bypass).\n\n## Testing\n\nTest coverage is in:\n\n- **C++**: `onnx/test/cpp/checker_test.cc` — `*SymLink*` tests for symlink detection and containment, `OpenExternalData*` for secure open and verification.\n- **Python**: `onnx/test/test_external_data.py`:\n  - `TestSaveExternalDataSymlinkProtection` — save-side symlink rejection.\n  - `TestLoadExternalDataSymlinkProtection` — load-side symlink rejection, parent-directory symlink, `load_external_data_for_model` rejection.\n  - `TestLoadExternalDataHardlinkProtection` — load-side hardlink rejection.\n  - `TestSaveExternalDataAbsolutePathValidation` — absolute path rejection.\n\nSymlink and hardlink tests are skipped on Windows (`os.name == \"nt\"`).\n\n---\n\n## External Data Attribute Validation\n\nThis section describes the security model for validating external data attributes in `ExternalDataInfo`. It covers defenses against attribute injection (CWE-915) and resource exhaustion (CWE-400) via crafted `external_data` entries in `TensorProto`.\n\n**Advisory:** [GHSA-538c-55jv-c5g9](https://github.com/onnx/onnx/security/advisories/GHSA-538c-55jv-c5g9)\n\n### Threat Model\n\nAn attacker provides a malicious ONNX model with crafted `external_data` entries in `TensorProto`. The `external_data` field is a repeated `StringStringEntryProto` — a key-value store that accepts arbitrary strings for both key and value.\n\nThe attack is triggered during `onnx.load()` with no explicit checker invocation required. `ExternalDataInfo.__init__` processes these key-value pairs to populate object attributes.\n\nAttack vectors:\n\n- **Arbitrary attribute injection**: Setting unknown keys (e.g. `evil_attr`) causes `setattr()` to create arbitrary attributes on the `ExternalDataInfo` object. While no current consumer iterates over attributes, injected attributes create latent risk for future code.\n- **Dunder attribute injection**: Setting keys like `__class__` or `__dict__` corrupts the Python object's internal state, enabling type confusion attacks.\n- **Negative offset/length**: Negative values for `offset` cause `file.seek()` to raise `OSError`. Negative `length` causes `file.read(-1)` to read the entire file to EOF, bypassing intended size limits.\n- **Resource exhaustion (DoS)**: Setting `length` to a multi-petabyte value causes unbounded memory allocation when reading external data, even if the actual data file is small.\n\nFour Python consumers of `ExternalDataInfo` exist: `load_external_data_for_tensor`, `set_external_data` / `write_external_data_tensors`, `ModelContainer._load_large_initializers`, and `ReferenceEvaluator` (in `onnx/reference/reference_evaluator.py`). (The C++ checker validates paths but does not use the Python `ExternalDataInfo` class.)\n\n## Defense Layers\n\nWe use a 3-layer defense-in-depth approach. Each layer addresses a different class of attack and operates at a different point in the processing pipeline.\n\n### Layer 1: Attribute Whitelist (CWE-915 Mitigation)\n\n`ExternalDataInfo.__init__` only accepts keys in `_ALLOWED_EXTERNAL_DATA_KEYS`: `location`, `offset`, `length`, `checksum`, `basepath`. Unknown keys are warned via `warnings.warn()` and ignored — this prevents arbitrary attribute injection.\n\nThis also blocks dunder attribute injection (e.g. `__class__`, `__dict__`) that could cause object type confusion.\n\n**Rationale**: While we cannot prevent someone from constructing malicious protobuf directly, rejecting unknown keys at the Python object level is defense-in-depth that limits the attack surface. The whitelist is a `frozenset` to prevent runtime mutation.\n\n### Layer 2: Bounds Validation at Parse Time (CWE-400 Mitigation)\n\n`offset` and `length` must be non-negative integers. Non-numeric strings raise `ValueError`. This catches obviously invalid values early, before any file I/O occurs.\n\n**Rationale**: Negative `offset` causes `file.seek(-1)` to raise `OSError`; negative `length` causes `file.read(-1)` to read the entire file, bypassing intended size limits. Validating at parse time provides a clear error message at the point closest to the malicious input.\n\n### Layer 3: File-Size Validation at Consumption Time (CWE-400 Mitigation, Defense-in-Depth)\n\nIn `load_external_data_for_tensor()` and `ModelContainer._load_large_initializers`, before reading: `offset <= file_size` and `offset + length <= file_size` are verified. A 1KB data file cannot cause a multi-petabyte memory allocation.\n\n**Rationale**: This is the critical safety net. It prevents memory exhaustion regardless of how the model was constructed — even via direct protobuf APIs that bypass Python-level parsing entirely. Validation happens at the point of actual file I/O, the last opportunity before harm occurs.\n\n## Why Layered Defense\n\n- **Layer 1 (whitelist)** catches the broadest class of attacks at parse time. It blocks attribute injection, dunder corruption, and any future unknown-key attack vector.\n- **Layer 2 (bounds validation)** catches obviously invalid numeric values at parse time, providing clear error messages.\n- **Layer 3 (file-size validation)** is the critical safety net that prevents actual harm at the I/O boundary. This layer cannot be bypassed even if an attacker crafts a model using protobuf APIs directly, because validation happens at the point of actual file read.\n\n## Protected Entry Points\n\n| Entry Point | File | Layers |\n|---|---|---|\n| `ExternalDataInfo.__init__` | `onnx/external_data_helper.py` | 1, 2 |\n| `load_external_data_for_tensor` | `onnx/external_data_helper.py` | 1, 2, 3 |\n| `set_external_data` | `onnx/external_data_helper.py` | 1 (whitelist by overwrite) |\n| `ModelContainer._load_large_initializers` | `onnx/model_container.py` | 1, 2, 3 |\n\n## Testing\n\nTest coverage is in `onnx/test/test_external_data.py`:\n\n- `TestExternalDataInfoSecurity`:\n  - **CWE-915 (attribute injection):** `test_unknown_key_rejected`, `test_dunder_key_rejected`, `test_multiple_unknown_keys_all_rejected`, `test_allowed_keys_constant_is_frozen`\n  - **CWE-400 (bounds/DoS):** `test_negative_offset_rejected`, `test_negative_length_rejected`, `test_non_numeric_offset_raises`, `test_non_numeric_length_raises`\n  - **Regression guards:** `test_valid_external_data_accepted`, `test_zero_offset_and_length_accepted`\n- `TestLoadExternalDataFileSizeValidation`:\n  - **File-size validation:** `test_offset_exceeds_file_size_raises`, `test_length_exceeds_available_data_raises`, `test_valid_offset_and_length_load_correctly`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F8C:4F9CC:16AD86:5BBB98:6AB92036"},"text_sha256":"2451d50249150937ce936905b32c0352032d816e9c14505b7c7ee46f3d0cb97e"},{"path":"SECURITY.md","size":2819,"blob_sha":"9cd1c404d3423ed98932390d4bd38bf943f271cb","priority":1,"status":200,"text":"<!--\nSPDX-FileCopyrightText: Copyright (c) ONNX Project Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Security Policy\n\n## Reporting a Vulnerability\nIf you believe you have discovered a security vulnerability in ONNX, please report it privately using GitHub Security Advisories.\n\n👉 Open a private report: https://github.com/onnx/onnx/security/advisories/new\n\nThis allows maintainers to triage the issue, collaborate on a fix, and coordinate disclosure.\n\nIf you are unable to use GitHub for reporting, you may contact the maintainers at onnx-security@lists.lfaidata.foundation as a fallback.\n\nAfter your report is received, a maintainer will acknowledge it, work with you to understand impact and remediation, and keep you informed about progress toward a fix and public disclosure.\n\nPlease do not disclose the vulnerability publicly until a fix and advisory have been released.\n\n## Security announcements\nSecurity advisories are published via GitHub Security Advisories. Users depending on ONNX will be notified automatically via GitHub's dependency graph.\n\n## Security Requirements\n\nOpen Neural Network Exchange (ONNX) manages reported vulnerabilities according to its documented security policy and delivers remediations in maintained releases. The project employs established secure development practices such as automated testing, continuous integration, and tooling intended to identify defects during development. Third-party dependencies and build components are periodically reviewed and updated to address known issues and to mitigate supply-chain risk. ONNX does not guarantee that models or inputs are trustworthy, and operators are responsible for validating provenance and applying appropriate isolation, resource limits, and runtime safeguards when executing untrusted workloads.\n\n## Supply Chain Security\n\nONNX release artifacts (wheels and source distributions) meet [SLSA Build Level 2](https://slsa.dev/spec/v1.0/levels#build-l2). Artifacts published to PyPI from this repository's GitHub Actions workflows have a corresponding signed provenance attestation generated by GitHub Actions and stored in GitHub's attestation store.\n\n### Verifying attestations\n\nInstall the [GitHub CLI](https://cli.github.com/) and run:\n\n```bash\ngh attestation verify <artifact> --owner onnx\n```\n\nFor example:\n\n```bash\npip download onnx --no-deps -d ./dist\ngh attestation verify ./dist/onnx-*.whl --owner onnx\n```\n\nA successful verification confirms that the artifact was built by GitHub Actions in the `onnx/onnx` repository and has not been tampered with since it was built.\n\n### Software Bill of Materials (SBOM)\n\nEach wheel also embeds a [CycloneDX 1.7](https://cyclonedx.org/) SBOM (`.cdx.json`) listing the bundled third-party components shipped inside the wheel (e.g. statically linked C++ libraries).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7196:B08CF:16DF4E:5BF083:6AB92046"},"text_sha256":"5579017c40412268119952c0373cabb8eb42aea97583a143df75090a1462a564"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"carla-simulator/carla","input_row":{"repository":"carla-simulator/carla","url":"https://github.com/carla-simulator/carla","name":"carla","owner":"carla-simulator","description":"Open-source simulator for autonomous driving research.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":14436,"issues":6360,"created_at":"2017-10-24T09:06:23Z","updated_at":"2026-09-27T07:00:42Z","first_commit_at":"2017-03-03T11:24:26Z","last_commit_at":"2026-09-02T17:42:40Z","activity_months":114,"ai_ml_match_topics":"artificial-intelligence; deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:38.583Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"carla-simulator/carla","visibility":"public","created_at":"2017-10-24T09:06:23Z","updated_at":"2026-09-27T07:00:42Z","private":false,"fork":false,"archived":false,"stargazers_count":14436,"open_issues_count":1204,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3574","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:17EFC6F:1C0D28B:6AB927DA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3573","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0889:2D7D17:1762B00:1B7E95D:6AB927DB"},"commit":{"sha":"18f10a804d7b1bada36558dae0b83d4aae89df46","url":"https://github.com/carla-simulator/carla/commit/18f10a804d7b1bada36558dae0b83d4aae89df46","date":"2018-05-24T10:47:31Z","author_date":"2018-05-24T10:47:31Z","committer_date":"2018-05-24T10:47:31Z","tree_sha":"913982f4b7b1247a79a764593b2f943da5330e47","message_first_line":"Update FAQ with Package script"},"tree_request_status":200,"tree_rate":{"github_remaining":"3572","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:17D2EC7:1BF0AEB:6AB927DB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4552,"blob_sha":"b043214ed030eb5718faa49866ee3ef3023834ca","priority":0}],"documents":[{"path":"README.md","size":4552,"blob_sha":"b043214ed030eb5718faa49866ee3ef3023834ca","priority":0,"status":200,"text":"CARLA Simulator\n===============\n\n[![Build Status](https://travis-ci.org/carla-simulator/carla.svg?branch=master)](https://travis-ci.org/carla-simulator/carla)\n[![Documentation](https://readthedocs.org/projects/carla/badge/?version=latest)](http://carla.readthedocs.io)\n[![Waffle.io](https://badge.waffle.io/carla-simulator/carla.svg?columns=Next,In%20Progress,Review)](https://waffle.io/carla-simulator/carla)\n\n[![carla.org](Docs/img/btn/web.png)](http://carla.org)\n[![download](Docs/img/btn/download.png)](https://github.com/carla-simulator/carla/releases/latest)\n[![documentation](Docs/img/btn/docs.png)](http://carla.readthedocs.io)\n[![discord](Docs/img/btn/chat.png)](https://discord.gg/vNVHXfb)\n<!-- [![forum](Docs/img/btn/forum.png)](link here) -->\n\nCARLA is an open-source simulator for autonomous driving research. CARLA has\nbeen developed from the ground up to support development, training, and\nvalidation of autonomous urban driving systems. In addition to open-source code\nand protocols, CARLA provides open digital assets (urban layouts, buildings,\nvehicles) that were created for this purpose and can be used freely. The\nsimulation platform supports flexible specification of sensor suites and\nenvironmental conditions.\n\n[![CARLA Video](Docs/img/video_thumbnail.png)](https://youtu.be/Hp8Dz-Zek2E)\n\nIf you want to benchmark your model in the same conditions as in our CoRL’17\npaper, check out\n[Benchmarking](http://carla.readthedocs.io/en/latest/benchmark_start/).\n\nNews\n----\n\n- 23.04.2018 CARLA 0.8.2 released: [post](http://carla.org/2018/04/23/release-0.8.2/), [change log](https://github.com/carla-simulator/carla/blob/master/CHANGELOG.md#carla-082), [release](https://github.com/carla-simulator/carla/releases/tag/0.8.2).\n- 05.04.2018 CARLA 0.8.1 released: [post](http://carla.org/2018/04/05/release-0.8.1/), [change log](https://github.com/carla-simulator/carla/blob/master/CHANGELOG.md#carla-081), [release](https://github.com/carla-simulator/carla/releases/tag/0.8.1).\n- 27.03.2018 CARLA 0.8.0 released: [post](http://carla.org/2018/03/27/release-0.8.0/), [change log](https://github.com/carla-simulator/carla/blob/master/CHANGELOG.md#carla-080), [release](https://github.com/carla-simulator/carla/releases/tag/0.8.0).\n- 25.01.2018 CARLA 0.7.1 released: [change log](https://github.com/carla-simulator/carla/blob/master/CHANGELOG.md#carla-071), [release](https://github.com/carla-simulator/carla/releases/tag/0.7.1).\n\nRoadmap\n-------\n\nWe are continuously working on improving CARLA, and we appreciate contributions\nfrom the community. Our most immediate goals are:\n\n- [ ] Releasing the methods evaluated in the CARLA paper\n- [x] Adding a Lidar sensor\n- [ ] Allowing for flexible and user-friendly import and editing of maps\n- [ ] Allowing the users to control non-player characters (and therefore set up user-specified scenarios)\n\nPaper\n-----\n\nIf you use CARLA, please cite our CoRL’17 paper.\n\n_CARLA: An Open Urban Driving Simulator_<br>Alexey Dosovitskiy, German Ros,\nFelipe Codevilla, Antonio Lopez, Vladlen Koltun; PMLR 78:1-16\n[[PDF](http://proceedings.mlr.press/v78/dosovitskiy17a/dosovitskiy17a.pdf)]\n\n\n```\n@inproceedings{Dosovitskiy17,\n  title = {{CARLA}: {An} Open Urban Driving Simulator},\n  author = {Alexey Dosovitskiy and German Ros and Felipe Codevilla and Antonio Lopez and Vladlen Koltun},\n  booktitle = {Proceedings of the 1st Annual Conference on Robot Learning},\n  pages = {1--16},\n  year = {2017}\n}\n```\n\nBuilding CARLA\n--------------\n\nUse `git clone` or download the project from this page. Note that the master\nbranch contains the latest fixes and features, for the latest stable code may be\nbest to switch to the latest release tag.\n\nThen follow the instruction at [How to build on Linux][buildlink].\n\nUnfortunately we don't have yet official instructions to build on other\nplatforms, please check the progress for [Windows][issue21] and [Mac][issue150].\n\n[buildlink]: http://carla.readthedocs.io/en/latest/how_to_build_on_linux\n[issue21]: https://github.com/carla-simulator/carla/issues/21\n[issue150]: https://github.com/carla-simulator/carla/issues/150\n\nContributing\n------------\n\nPlease take a look at our [Contribution guidelines][contriblink].\n\n[contriblink]: http://carla.readthedocs.io/en/latest/CONTRIBUTING\n\nF.A.Q.\n------\n\nIf you run into problems, check our\n[FAQ](http://carla.readthedocs.io/en/latest/faq/).\n\nLicense\n-------\n\nCARLA specific code is distributed under MIT License.\n\nCARLA specific assets are distributed under CC-BY License.\n\nNote that UE4 itself follows its own license terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"957E:09BF:AAD7D:2C621A:6AB92048"},"text_sha256":"faaccd0b8103655f87fafc2f0806f21f9ec5d54e32504d3d4ede75df4b08f941"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3571","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:180062A:1C1DD65:6AB927DC"},"commit":{"sha":"601966371acc2fa163919055479f5ead1ca9a8b1","url":"https://github.com/carla-simulator/carla/commit/601966371acc2fa163919055479f5ead1ca9a8b1","date":"2026-06-29T14:47:59Z","author_date":"2026-06-29T14:47:59Z","committer_date":"2026-06-29T14:47:59Z","tree_sha":"2c7889055de871eb03d90e44bd10009684652a44","message_first_line":"fix(python): expose carla.command namespace on ue5 module layout (#9634 PR #0u) (#9775)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3570","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0906:180242:17D19FB:1BEF24D:6AB927DC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10334,"blob_sha":"7ca0042a4bb4255e3f5defa5f0113472888bd6b2","priority":0}],"documents":[{"path":"README.md","size":10334,"blob_sha":"7ca0042a4bb4255e3f5defa5f0113472888bd6b2","priority":0,"status":200,"text":"CARLA Simulator\n===============\n\n[![Documentation](https://readthedocs.org/projects/carla/badge/?version=latest)](https://carla-ue5.readthedocs.io)\n\n[![carla.org](Docs/img/btn/web.png)](http://carla.org)\n[![download](Docs/img/btn/download.png)](https://github.com/carla-simulator/carla/releases)\n[![documentation](Docs/img/btn/docs.png)](https://carla-ue5.readthedocs.io)\n[![forum](Docs/img/btn/forum.png)](https://github.com/carla-simulator/carla/discussions)\n[![discord](Docs/img/btn/chat.png)](https://discord.gg/8kqACuC)\n\nCARLA is an open-source simulator for autonomous driving research. CARLA has been developed from the ground up to support development, training, and\nvalidation of autonomous driving systems. In addition to open-source code and protocols, CARLA provides open digital assets (urban layouts, buildings,\nvehicles) that were created for this purpose and can be used freely. The simulation platform supports flexible specification of sensor suites and\nenvironmental conditions.\n\n[![CARLA Video](Docs/img/carla_ue5_readme_img.webp)](https://www.youtube.com/watch?v=q4V9GYjA1pE)\n\n>[!NOTE]\n> This is the development branch `ue5-dev` for the **Unreal Engine 5.5 version of CARLA**. This branch exists in parallel with the Unreal Engine 4.26 version of CARLA, in the `ue4-dev` branch. Please be sure that this version of CARLA is suitable for your needs as there are significant differences between the UE 5.5 and UE 4.26 versions of CARLA. \n\n### Recommended system\n\n* Intel i7 gen 9th - 11th / Intel i9 gen 9th - 11th / AMD Ryzen 7 / AMD Ryzen 9\n* +32 Gb RAM memory \n* NVIDIA RTX 3070/3080/3090 / NVIDIA RTX 4090 / NVIDIA RTX 5090 or better\n* 16 Gb or more VRAM\n* Ubuntu 22.04 or 24.04, or Windows 11\n\n >[!NOTE]\n> You must use either Ubuntu 22.04 or 24.04, or Windows 11. The Unreal Engine 5.5 version of CARLA will not work on Ubuntu 20.04 or Windows 10 or lower.\n\n## Documentation\n\nThe [CARLA documentation](https://carla-ue5.readthedocs.io/en/latest/) is hosted on ReadTheDocs. Please see the following key links:\n\n- [Building on Linux](https://carla-ue5.readthedocs.io/en/latest/build_linux_ue5/)\n- [Building on Windows](https://carla-ue5.readthedocs.io/en/latest/build_windows_ue5/)\n- [First steps](https://carla-ue5.readthedocs.io/en/latest/tuto_first_steps/)\n- [CARLA asset catalogue](https://carla-ue5.readthedocs.io/en/latest/catalogue/)\n- [Python API reference](https://carla-ue5.readthedocs.io/en/latest/python_api/)\n- [Blueprint library](https://carla-ue5.readthedocs.io/en/latest/bp_library/)\n\n## CARLA Ecosystem\nRepositories associated with the CARLA simulation platform:\n\n* [**CARLA Autonomous Driving leaderboard**](https://leaderboard.carla.org/): Automatic platform to validate Autonomous Driving stacks\n* [**Scenario_Runner**](https://github.com/carla-simulator/scenario_runner): Engine to execute traffic scenarios in CARLA 0.9.X\n* [**ROS-bridge**](https://github.com/carla-simulator/ros-bridge): Interface to connect CARLA 0.9.X to ROS\n* [**Driving-benchmarks**](https://github.com/carla-simulator/driving-benchmarks): Benchmark tools for Autonomous Driving tasks\n* [**Conditional Imitation-Learning**](https://github.com/felipecode/coiltraine): Training and testing Conditional Imitation Learning models in CARLA\n* [**AutoWare AV stack**](https://github.com/carla-simulator/carla-autoware): Bridge to connect AutoWare AV stack to CARLA\n* [**Reinforcement-Learning**](https://github.com/carla-simulator/reinforcement-learning): Code for running Conditional Reinforcement Learning models in CARLA\n* [**RoadRunner**](https://www.mathworks.com/products/roadrunner.html): MATLAB GUI based application to create road networks in OpenDrive format \n* [**Map Editor**](https://github.com/carla-simulator/carla-map-editor): Standalone GUI application to enhance RoadRunner maps with traffic lights and traffic signs information\n\n\n**Like what you see? Star us on GitHub to support the project!**\n\nPaper\n-----\n\nIf you use CARLA, please cite our CoRL’17 paper.\n\n_CARLA: An Open Urban Driving Simulator_<br>Alexey Dosovitskiy, German Ros,\nFelipe Codevilla, Antonio Lopez, Vladlen Koltun; PMLR 78:1-16\n[[PDF](http://proceedings.mlr.press/v78/dosovitskiy17a/dosovitskiy17a.pdf)]\n[[talk](https://www.youtube.com/watch?v=xfyK03MEZ9Q&feature=youtu.be&t=2h44m30s)]\n\n\n```\n@inproceedings{Dosovitskiy17,\n  title = {{CARLA}: {An} Open Urban Driving Simulator},\n  author = {Alexey Dosovitskiy and German Ros and Felipe Codevilla and Antonio Lopez and Vladlen Koltun},\n  booktitle = {Proceedings of the 1st Annual Conference on Robot Learning},\n  pages = {1--16},\n  year = {2017}\n}\n```\n\n## Building CARLA with Unreal Engine 5.5\n--------------\n\nClone this repository locally from GitHub, specifying the *ue5-dev* branch:\n\n```sh\ngit clone -b ue5-dev https://github.com/carla-simulator/carla.git CarlaUE5\n```\n\nIn order to build CARLA, you need access to the CARLA fork of Unreal Engine 5.5. In order to access this repository, you must first link your GitHub account to Epic Games by following [this guide](https://www.unrealengine.com/en-US/ue-on-github). You then also need to use your git credentials to authorise the download of the Unreal Engine 5.5 repository. \n\n__Building in Linux__:\n\nRun the setup script from a terminal open in the CARLA root directory:\n\n```sh\ncd CarlaUE5\n./CarlaSetup.sh --interactive\n```\n\nThe setup script will prompt you for your sudo password, in order to install the prerequisites. It will then prompt you for your GitHub credentials in order to authorise the download of the Unreal Engine repository. \n\nThe setup script will install by default Python 3 using apt. If you want to target an existing Python installation, you should use the `--python-root=PATH_TO_PYTHON` argument with the relevant Python installation path. You can use whereis python3 in your chosen environment and strip the `/python3` suffix from the path.\n\n__Building in Linux unattended__:\n\nIf you want to run the setup script unattended, your git credentials need to be stored in an environment variable. Add your github credentials to your `.bashrc` file:\n\n```sh\nexport GIT_LOCAL_CREDENTIALS=username@github_token\n```\n\nThen run the setup script using the following command:\n\n```sh\ncd CarlaUE5\nsudo -E ./CarlaSetup.sh\n```\n\nThis will download and install Unreal Engine 5.5, install the prerequisites and build CARLA. It may take some time to complete and use a significant amount of disk space.\n\nIf you prefer to add the git credentials in the terminal, use the following command:\n\n```sh\ncd CarlaUE5\nsudo -E env GIT_LOCAL_CREDENTIALS=github_username@github_token ./CarlaSetup.sh \n```\n\n__Building in Windows__:\n\nTo build in Windows, run the batch script:\n\n```sh\ncd CarlaUE5\nCarlaSetup.bat\n```\n\nUnattended mode is currently unavailable in Windows, you will need to enter GitHub credentials or administrator privileges when prompted.\n\n## Rebuilding CARLA\n\nOnce the setup is complete, you can execute subsequent builds with the following commands in a terminal open in the CARLA root directory. In Linux, run these commands in a standard terminal. In Windows, open the x64 Native Tools Command Prompt for Visual Studio 2022.\n\n__Configure__:\n\nLinux:\n\n```sh\ncmake -G Ninja -S . -B Build --toolchain=$PWD/CMake/Toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_ROS2=ON\n```\n\nWindows:\n\n```sh\ncmake -G Ninja -S . -B Build --toolchain=$PWD/CMake/Toolchain.cmake -DCMAKE_BUILD_TYPE=Release\n```\n\n>[!NOTE]\n> If you intend to target a specific Python installation, you should add both these arguments to the above cmake command: `-DPython_ROOT_DIR=PATH` and `-DPython3_ROOT_DIR=PATH`.\n\n__Build__:\n\nLinux and Windows:\n\n```sh\ncmake --build Build\n```\n\n__Build and install the Python API__:\n\n\nLinux and Windows:\n\n```sh\ncmake --build Build --target carla-python-api-install\n```\n\n__Launch the editor__:\n\n```sh\ncmake --build Build --target launch\n```\n\nFor more instructions on building CARLA UE5, please consult the build documentation for [Linux](https://carla-ue5.readthedocs.io/en/latest/build_linux_ue5/) or [Windows](https://carla-ue5.readthedocs.io/en/latest/build_windows_ue5/).\n\nContributing\n------------\n\nPlease take a look at our [Contribution guidelines][contriblink].\n\n[contriblink]: https://carla-ue5.readthedocs.io/en/latest/cont_contribution_guidelines/\n\nLicenses\n-------\n\n## CARLA licenses\n\nCARLA specific code is distributed under the MIT License.\n\nCARLA specific assets are distributed under the CC-BY License.\n\n## CARLA Dependency and Integration licenses\n\nUnreal Engine 5 follows its [own license terms](https://www.unrealengine.com/en-US/faq).\n\nCARLA uses some dependencies related to 3rd party integrations:\n- [PROJ](https://proj.org/), a generic coordinate transformation software which uses the [X/MIT open source license](https://proj.org/about.html#license).\n- [SQLite](https://www.sqlite.org), part of the PROJ dependencies, which is [in the public domain](https://www.sqlite.org/purchase/license).\n- [Xerces-C](https://xerces.apache.org/xerces-c/), a validating XML parser, which is made available under the [Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n- [Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page), a C++ template library for linear algebra which uses the [MPL2 license](https://www.mozilla.org/en-US/MPL/2.0/).\n\nCARLA uses the Autodesk FBX SDK for converting FBX to OBJ in the import process of maps. This step is optional, and the SDK is located [here](https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-0)\n\nThis software contains Autodesk® FBX® code developed by Autodesk, Inc. Copyright 2020 Autodesk, Inc. All rights, reserved. Such code is provided \"as is\" and Autodesk, Inc. disclaims any and all warranties, whether express or implied, including without limitation the implied warranties of merchantability, fitness for a particular purpose or non-infringement of third party rights. In no event shall Autodesk, Inc. be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of such code.\"\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F0E:2B291E:17CBAE:5CDD25:6AB9204A"},"text_sha256":"5ef2343f8c83a4089be60064a2a5abb2e8b292f9852dd66b6971a2b9dd1212c7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"google-deepmind/sonnet","input_row":{"repository":"google-deepmind/sonnet","url":"https://github.com/google-deepmind/sonnet","name":"sonnet","owner":"google-deepmind","description":"TensorFlow-based neural network library","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9970,"issues":193,"created_at":"2017-04-03T11:34:35Z","updated_at":"2026-09-25T11:22:46Z","first_commit_at":"2017-04-06T17:10:11Z","last_commit_at":"2026-07-07T22:31:37Z","activity_months":111.01000000000001,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:41.806Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"google-deepmind/sonnet","visibility":"public","created_at":"2017-04-03T11:34:35Z","updated_at":"2026-09-25T11:22:46Z","private":false,"fork":false,"archived":false,"stargazers_count":9970,"open_issues_count":44,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3569","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:17D5CBC:1BF2E84:6AB927DD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3568","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17AFB2F:1BCC715:6AB927DE"},"commit":{"sha":"f34755ccba97389585f9dd6c18e2e4ffe25ddb38","url":"https://github.com/google-deepmind/sonnet/commit/f34755ccba97389585f9dd6c18e2e4ffe25ddb38","date":"2018-05-08T15:49:30Z","author_date":"2018-04-30T13:54:41Z","committer_date":"2018-05-08T15:49:30Z","tree_sha":"bac214f69983fa246825f58667507751346bbec2","message_first_line":"Add snt.summarize_variables to Sonnet."},"tree_request_status":200,"tree_rate":{"github_remaining":"3567","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:17C8A04:1BE63C0:6AB927DE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1640,"blob_sha":"3541eb7a0ac9661ff27a2c68cfd45646e6be5bf6","priority":0}],"documents":[{"path":"README.md","size":1640,"blob_sha":"3541eb7a0ac9661ff27a2c68cfd45646e6be5bf6","priority":0,"status":200,"text":"# ![Sonnet](images/sonnet_logo.png)\n\nSonnet is a library built on top of TensorFlow for building complex neural\nnetworks.\n\n\n## Installation\n\nSonnet can be installed from pip, with or without GPU support.\n\nThis installation is compatible with Linux/Mac OS X and Python 2.7 and\n3.{4,5,6}. The version of TensorFlow installed must be >= 1.5. Installing\nSonnet supports the [virtualenv installation mode](https://www.tensorflow.org/install/install_linux#installing_with_virtualenv)\nof TensorFlow, as well as the [native pip install](https://www.tensorflow.org/install/install_linux#installing_with_native_pip).\n\nTo install sonnet, run:\n\n```shell\n$ pip install dm-sonnet\n```\n\nSonnet will work with both the CPU and GPU version of tensorflow, but to allow\nfor that it does not list Tensorflow as a requirement, so you need to install\nTensorflow separately if you haven't already done so.\n\n## Usage Example\n\nThe following code constructs a Linear module and connects it to multiple\ninputs. The variables (i.e., the weights and biases of the linear\ntransformation) are automatically shared.\n\n```python\nimport sonnet as snt\n\n# Provide your own functions to generate data Tensors.\ntrain_data = get_training_data()\ntest_data = get_test_data()\n\n# Construct the module, providing any configuration necessary.\nlinear_regression_module = snt.Linear(output_size=FLAGS.output_size)\n\n# Connect the module to some inputs, any number of times.\ntrain_predictions = linear_regression_module(train_data)\ntest_predictions = linear_regression_module(test_data)\n```\n\n# Documentation\n\nCheck out the full documentation page\n[here](https://deepmind.github.io/sonnet/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5584:3C4A0:174E8B:5C5FCA:6AB9204C"},"text_sha256":"6d46fbcca4c39b33d86c5471d6c4a8277ec5ca6817d7d8cbd381d326f18832c5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3566","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17ACFDA:1BCAA6A:6AB927DF"},"commit":{"sha":"a3052a27a5b99b56a21e666bd0614e95e5c92df5","url":"https://github.com/google-deepmind/sonnet/commit/a3052a27a5b99b56a21e666bd0614e95e5c92df5","date":"2026-05-06T20:18:25Z","author_date":"2026-05-06T20:18:07Z","committer_date":"2026-05-06T20:18:25Z","tree_sha":"fdd23aa367fe68dfbf1ad78f1c55933e9c676d6e","message_first_line":"Internal Change"},"tree_request_status":200,"tree_rate":{"github_remaining":"3565","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:18403A3:1C5E0EF:6AB927DF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11648,"blob_sha":"ebd3247efdf099159d88d5928962a853d15d65aa","priority":0}],"documents":[{"path":"README.md","size":11648,"blob_sha":"ebd3247efdf099159d88d5928962a853d15d65aa","priority":0,"status":200,"text":"![Sonnet](https://sonnet.dev/images/sonnet_logo.png)\n\n# Sonnet\n\n[**Documentation**](https://sonnet.readthedocs.io/) | [**Examples**](#examples)\n\nSonnet is a library built on top of [TensorFlow 2](https://www.tensorflow.org/)\ndesigned to provide simple, composable abstractions for machine learning\nresearch.\n\n# Introduction\n\nSonnet has been designed and built by researchers at DeepMind. It can be used to\nconstruct neural networks for many different purposes (un/supervised learning,\nreinforcement learning, ...). We find it is a successful abstraction for our\norganization, you might too!\n\nMore specifically, Sonnet provides a simple but powerful programming model\ncentered around a single concept: `snt.Module`. Modules can hold references to\nparameters, other modules and methods that apply some function on the user\ninput. Sonnet ships with many predefined modules (e.g. `snt.Linear`,\n`snt.Conv2D`, `snt.BatchNorm`) and some predefined networks of modules (e.g.\n`snt.nets.MLP`) but users are also encouraged to build their own modules.\n\nUnlike many frameworks Sonnet is extremely unopinionated about **how** you will\nuse your modules. Modules are designed to be self contained and entirely\ndecoupled from one another. Sonnet does not ship with a training framework and\nusers are encouraged to build their own or adopt those built by others.\n\nSonnet is also designed to be simple to understand, our code is (hopefully!)\nclear and focussed. Where we have picked defaults (e.g. defaults for initial\nparameter values) we try to point out why.\n\n# Getting Started\n\n## Examples\n\nThe easiest way to try Sonnet is to use Google Colab which offers a free Python\nnotebook attached to a GPU or TPU.\n\n- [Predicting MNIST with an MLP](https://colab.research.google.com/github/deepmind/sonnet/blob/v2/examples/mlp_on_mnist.ipynb)\n- [Training a Little GAN on MNIST](https://colab.research.google.com/github/deepmind/sonnet/blob/v2/examples/little_gan_on_mnist.ipynb)\n- [Distributed training with `snt.distribute`](https://colab.research.google.com/github/deepmind/sonnet/blob/v2/examples/distributed_cifar10.ipynb)\n\n## Installation\n\nTo get started install TensorFlow 2.0 and Sonnet 2:\n\n```shell\n$ pip install tensorflow tensorflow-probability\n$ pip install dm-sonnet\n```\n\nYou can run the following to verify things installed correctly:\n\n```python\nimport tensorflow as tf\nimport sonnet as snt\n\nprint(\"TensorFlow version {}\".format(tf.__version__))\nprint(\"Sonnet version {}\".format(snt.__version__))\n```\n\n### Using existing modules\n\nSonnet ships with a number of built in modules that you can trivially use. For\nexample to define an MLP we can use the `snt.Sequential` module to call a\nsequence of modules, passing the output of a given module as the input for the\nnext module. We can use `snt.Linear` and `tf.nn.relu` to actually define our\ncomputation:\n\n```python\nmlp = snt.Sequential([\n    snt.Linear(1024),\n    tf.nn.relu,\n    snt.Linear(10),\n])\n```\n\nTo use our module we need to \"call\" it. The `Sequential` module (and most\nmodules) define a `__call__` method that means you can call them by name:\n\n```python\nlogits = mlp(tf.random.normal([batch_size, input_size]))\n```\n\nIt is also very common to request all the parameters for your module. Most\nmodules in Sonnet create their parameters the first time they are called with\nsome input (since in most cases the shape of the parameters is a function of\nthe input). Sonnet modules provide two properties for accessing parameters.\n\nThe `variables` property returns **all** `tf.Variable`s that are referenced by\nthe given module:\n\n```python\nall_variables = mlp.variables\n```\n\nIt is worth noting that `tf.Variable`s are not just used for parameters of your\nmodel. For example they are used to hold state in metrics used in\n`snt.BatchNorm`. In most cases users retrieve the module variables to pass them\nto an optimizer to be updated. In this case non-trainable variables should\ntypically not be in that list as they are updated via a different mechanism.\nTensorFlow has a built in mechanism to mark variables as \"trainable\" (parameters\nof your model) vs. non-trainable (other variables). Sonnet provides a mechanism\nto gather all trainable variables from your module which is probably what you\nwant to pass to an optimizer:\n\n```python\nmodel_parameters = mlp.trainable_variables\n```\n\n### Building your own module\n\nSonnet strongly encourages users to subclass `snt.Module` to define their own\nmodules. Let's start by creating a simple `Linear` layer called `MyLinear`:\n\n```python\nclass MyLinear(snt.Module):\n\n  def __init__(self, output_size, name=None):\n    super(MyLinear, self).__init__(name=name)\n    self.output_size = output_size\n\n  @snt.once\n  def _initialize(self, x):\n    initial_w = tf.random.normal([x.shape[1], self.output_size])\n    self.w = tf.Variable(initial_w, name=\"w\")\n    self.b = tf.Variable(tf.zeros([self.output_size]), name=\"b\")\n\n  def __call__(self, x):\n    self._initialize(x)\n    return tf.matmul(x, self.w) + self.b\n```\n\nUsing this module is trivial:\n\n```python\nmod = MyLinear(32)\nmod(tf.ones([batch_size, input_size]))\n```\n\nBy subclassing `snt.Module` you get many nice properties for free. For example\na default implementation of `__repr__` which shows constructor arguments (very\nuseful for debugging and introspection):\n\n```python\n>>> print(repr(mod))\nMyLinear(output_size=10)\n```\n\nYou also get the `variables` and `trainable_variables` properties:\n\n```python\n>>> mod.variables\n(<tf.Variable 'my_linear/b:0' shape=(10,) ...)>,\n <tf.Variable 'my_linear/w:0' shape=(1, 10) ...)>)\n```\n\nYou may notice the `my_linear` prefix on the variables above. This is because\nSonnet modules also enter the modules name scope whenever methods are called.\nBy entering the module name scope we provide a much more useful graph for tools\nlike TensorBoard to consume (e.g. all operations that occur inside my_linear\nwill be in a group called my_linear).\n\nAdditionally your module will now support TensorFlow checkpointing and saved\nmodel which are advanced features covered later.\n\n# Serialization\n\nSonnet supports multiple serialization formats. The simplest format we support\nis Python's `pickle`, and all built in modules are tested to make sure they can\nbe saved/loaded via pickle in the same Python process. In general we discourage\nthe use of pickle, it is not well supported by many parts of TensorFlow and in\nour experience can be quite brittle.\n\n## TensorFlow Checkpointing\n\n**Reference:** https://www.tensorflow.org/alpha/guide/checkpoints\n\nTensorFlow checkpointing can be used to save the value of parameters\nperiodically during training. This can be useful to save the progress of\ntraining in case your program crashes or is stopped. Sonnet is designed to work\ncleanly with TensorFlow checkpointing:\n\n```python\ncheckpoint_root = \"/tmp/checkpoints\"\ncheckpoint_name = \"example\"\nsave_prefix = os.path.join(checkpoint_root, checkpoint_name)\n\nmy_module = create_my_sonnet_module()  # Can be anything extending snt.Module.\n\n# A `Checkpoint` object manages checkpointing of the TensorFlow state associated\n# with the objects passed to it's constructor. Note that Checkpoint supports\n# restore on create, meaning that the variables of `my_module` do **not** need\n# to be created before you restore from a checkpoint (their value will be\n# restored when they are created).\ncheckpoint = tf.train.Checkpoint(module=my_module)\n\n# Most training scripts will want to restore from a checkpoint if one exists. This\n# would be the case if you interrupted your training (e.g. to use your GPU for\n# something else, or in a cloud environment if your instance is preempted).\nlatest = tf.train.latest_checkpoint(checkpoint_root)\nif latest is not None:\n  checkpoint.restore(latest)\n\nfor step_num in range(num_steps):\n  train(my_module)\n\n  # During training we will occasionally save the values of weights. Note that\n  # this is a blocking call and can be slow (typically we are writing to the\n  # slowest storage on the machine). If you have a more reliable setup it might be\n  # appropriate to save less frequently.\n  if step_num and not step_num % 1000:\n    checkpoint.save(save_prefix)\n\n# Make sure to save your final values!!\ncheckpoint.save(save_prefix)\n```\n\n## TensorFlow Saved Model\n\n**Reference:** https://www.tensorflow.org/alpha/guide/saved_model\n\nTensorFlow saved models can be used to save a copy of your network that is\ndecoupled from the Python source for it. This is enabled by saving a TensorFlow\ngraph describing the computation and a checkpoint containing the value of\nweights.\n\nThe first thing to do in order to create a saved model is to create a\n`snt.Module` that you want to save:\n\n```python\nmy_module = snt.nets.MLP([1024, 1024, 10])\nmy_module(tf.ones([1, input_size]))\n```\n\nNext, we need to create another module describing the specific parts of our\nmodel that we want to export. We advise doing this (rather than modifying the\noriginal model in-place) so you have fine grained control over what is actually\nexported. This is typically important to avoid creating very large saved models,\nand such that you only share the parts of your model you want to (e.g. you only\nwant to share the generator for a GAN but keep the discriminator private).\n\n```python\n@tf.function(input_signature=[tf.TensorSpec([None, input_size])])\ndef inference(x):\n  return my_module(x)\n\nto_save = snt.Module()\nto_save.inference = inference\nto_save.all_variables = list(my_module.variables)\ntf.saved_model.save(to_save, \"/tmp/example_saved_model\")\n```\n\nWe now have a saved model in the `/tmp/example_saved_model` folder:\n\n```shell\n$ ls -lh /tmp/example_saved_model\ntotal 24K\ndrwxrwsr-t 2 tomhennigan 154432098 4.0K Apr 28 00:14 assets\n-rw-rw-r-- 1 tomhennigan 154432098  14K Apr 28 00:15 saved_model.pb\ndrwxrwsr-t 2 tomhennigan 154432098 4.0K Apr 28 00:15 variables\n```\n\nLoading this model is simple and can be done on a different machine without any\nof the Python code that built the saved model:\n\n```python\nloaded = tf.saved_model.load(\"/tmp/example_saved_model\")\n\n# Use the inference method. Note this doesn't run the Python code from `to_save`\n# but instead uses the TensorFlow Graph that is part of the saved model.\nloaded.inference(tf.ones([1, input_size]))\n\n# The all_variables property can be used to retrieve the restored variables.\nassert len(loaded.all_variables) > 0\n```\n\nNote that the loaded object is not a Sonnet module, it is a container object\nthat has the specific methods (e.g. `inference`) and properties (e.g.\n`all_variables`) that we added in the previous block.\n\n## Distributed training\n\n**Example:** https://github.com/deepmind/sonnet/blob/v2/examples/distributed_cifar10.ipynb\n\nSonnet has support for distributed training using\n[custom TensorFlow distribution strategies](https://sonnet.readthedocs.io/en/latest/api.html#module-sonnet.distribute).\n\nA key difference between Sonnet and distributed training using `tf.keras` is\nthat Sonnet modules and optimizers do not behave differently when run under\ndistribution strategies (e.g. we do not average your gradients or sync your\nbatch norm stats). We believe that users should be in full control of these\naspects of their training and they should not be baked into the library. The\ntrade off here is that you need to implement these features in your training\nscript (typically this is just 2 lines of code to all reduce your gradients\nbefore applying your optimizer) or swap in modules that are explicitly\ndistribution aware (e.g. `snt.distribute.CrossReplicaBatchNorm`).\n\nOur [distributed Cifar-10](https://github.com/deepmind/sonnet/blob/v2/examples/distributed_cifar10.ipynb)\nexample walks through doing multi-GPU training with Sonnet.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB9A:1A3D83:1800D9:5D12AE:6AB9204C"},"text_sha256":"9e4718ad827385f284949f7c0cd4be63230328e25ca6795a28f7242035fc03c2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"olistic/warriorjs","input_row":{"repository":"olistic/warriorjs","url":"https://github.com/olistic/warriorjs","name":"warriorjs","owner":"olistic","description":"🏰 An exciting game of programming and Artificial Intelligence","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9541,"issues":120,"created_at":"2015-04-29T14:25:02Z","updated_at":"2026-09-26T15:22:52Z","first_commit_at":"2015-04-29T14:25:02Z","last_commit_at":"2026-03-20T23:58:34Z","activity_months":130.69999999999999,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:44.577Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"olistic/warriorjs","visibility":"public","created_at":"2015-04-29T14:25:02Z","updated_at":"2026-09-26T15:22:52Z","private":false,"fork":false,"archived":false,"stargazers_count":9541,"open_issues_count":19,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3564","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D5:1DB627:184D66A:1C6B46C:6AB927E0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3563","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:181319E:1C308AE:6AB927E0"},"commit":{"sha":"405d7c205172d152a73573062d9313baeec1716e","url":"https://github.com/olistic/warriorjs/commit/405d7c205172d152a73573062d9313baeec1716e","date":"2018-05-24T04:12:18Z","author_date":"2018-05-24T04:12:18Z","committer_date":"2018-05-24T04:12:18Z","tree_sha":"02395fcff1cb368d8498ed4859856512721d9bd9","message_first_line":"Update Docusaurus (#158)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3562","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BC:7418C:17F2309:1C0FD75:6AB927E1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4842,"blob_sha":"a01074d2d36190c050f2421b9a9d21e711d2d97e","priority":0}],"documents":[{"path":"README.md","size":4842,"blob_sha":"a01074d2d36190c050f2421b9a9d21e711d2d97e","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"https://warrior.js.org\">\n    <img alt=\"WarriorJS Banner\" title=\"WarriorJS\" src=\"logo/warriorjs-banner-dark.png?raw=true\">\n  <\/a>\n<\/div>\n\n<br />\n\n<div align=\"center\">\n  <strong>An exciting game of programming and Artificial Intelligence<a href=\"#ai-footnote\">*<\/a><\/strong>\n<\/div>\n\n<br />\n\n<div align=\"center\">\n  <a href=\"https://circleci.com/gh/olistic/warriorjs\">\n    <img alt=\"CircleCI\" src=\"https://img.shields.io/circleci/project/github/olistic/warriorjs.svg?style=flat-square\">\n  <\/a>\n  <a href=\"https://codecov.io/gh/olistic/warriorjs\">\n    <img alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/olistic/warriorjs.svg?style=flat-square\">\n  <\/a>\n  <a href=\"https://twitter.com/warrior_js\">\n    <img alt=\"Follow+WarriorJS+on+Twitter\" src=\"https://img.shields.io/twitter/follow/warrior_js.svg?label=follow+warriorjs&style=flat-square\">\n  <\/a>\n  <a href=\"https://spectrum.chat/warriorjs\">\n    <img alt=\"Join+WarriorJS+on+Spectrum\" src=\"https://img.shields.io/badge/join_the_community-on_spectrum-7b16ff.svg?style=flat-square\">\n  <\/a>\n<\/div>\n\n<br />\n\nIn WarriorJS, you wear the skin of a warrior climbing a tall tower to reach _The\nJavaScript Sword_ at the top level. Legend has it that the sword bearer becomes\nenlightened in the JavaScript language, but be warned: the journey will not be\neasy. On each floor, you need to write JavaScript to instruct the warrior to\nbattle enemies, rescue captives, and reach the stairs alive...\n\n**No matter if you are new to programming or a JavaScript guru, WarriorJS will\nput your skills to the test. Will you dare?**\n\n## Quick Start\n\n1.  Install WarriorJS with [npm](https://npmjs.com):\n\n```sh\nnpm install --global @warriorjs/cli\n```\n\n2.  Launch the game:\n\n```sh\nwarriorjs\n```\n\n3.  Create your warrior.\n\n4.  You'll be pointed to a README file with instructions for the first level.\n\nGood luck in your journey, warrior!\n\n## Documentation\n\nLearn how to play WarriorJS on the [official site](https://warrior.js.org)!\n\nJump straight to some of the most-visited pages:\n\n* [**Set Up**](https://warrior.js.org/docs/set-up)\n* [Gameplay](https://warrior.js.org/docs/gameplay)\n* [Player API](https://warrior.js.org/docs/space-api)\n* [CLI Options](https://warrior.js.org/docs/cli-options)\n\n## Preview\n\n![WarriorJS Preview](https://user-images.githubusercontent.com/5600126/40150855-8b2acdd2-5952-11e8-9034-00dcee0c4c2c.gif)\n\n> WarriorJS launched from the\n> [Integrated Terminal](https://code.visualstudio.com/docs/editor/integrated-terminal)\n> in [VS Code](https://code.visualstudio.com). To the left, `Player.js`, and to\n> the right, a\n> [Markdown Preview](https://code.visualstudio.com/docs/languages/markdown#_markdown-preview)\n> of `README.md`.\n\n## Contributing\n\nWe welcome contributions to WarriorJS! These are the many ways you can help:\n\n* Submit patches and features\n* Make [towers](https://warrior.js.org/docs/towers.html) (new levels for the\n  game)\n* Improve the [documentation and website](https://warrior.js.org)\n* Report bugs\n* Follow us on [Twitter](https://twitter.com/warrior_js)\n* Participate in the [Spectrum community](https://spectrum.chat/warriorjs)\n* And [donate financially](https://opencollective.com/warriorjs)!\n\nPlease read our [contribution guide](CONTRIBUTING.md) to get started. Also note\nthat this project is released with a\n[Contributor Code of Conduct](CODE_OF_CONDUCT.md), please make sure to review\nand follow it.\n\n## Contributors\n\nThanks goes to each one of our contributors! :pray:\n[Become a contributor](CONTRIBUTING.md).\n\n<a href=\"https://github.com/olistic/warriorjs/graphs/contributors\"><img src=\"https://opencollective.com/warriorjs/contributors.svg?width=890&button=false\" /><\/a>\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities!\n[Become a backer](https://opencollective.com/warriorjs#backers).\n\n<a href=\"https://opencollective.com/warriorjs#backers\"><img src=\"https://opencollective.com/warriorjs/backers.svg?width=890\" /><\/a>\n\n## Sponsors\n\nBecome a sponsor and get your logo here and on the\n[official site](https://warrior.js.org)!\n[Become a sponsor](https://opencollective.com/warriorjs#sponsors).\n\n<a href=\"https://opencollective.com/warriorjs#sponsors\"><img src=\"https://opencollective.com/warriorjs/sponsors.svg?width=890\" /><\/a>\n\n## Acknowledgments\n\nThis project was born as a port of\n[ruby-warrior](https://github.com/ryanb/ruby-warrior). Credits for the original\nidea go to [Ryan Bates](https://github.com/ryanb).\n\nSpecial thanks to [Guillermo Cura](https://guillecura.co) for designing a\nwonderful [logo](logo).\n\n## License\n\nWarriorJS is licensed under a [MIT License](LICENSE).\n\n---\n\n<a name=\"ai-footnote\">(\\*)<\/a>: _The Artificial Intelligence components of\nWarriorJS are pretty basic. If you're looking to learn more advanced AI\nconcepts, this project will not provide you that._\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D1C:29FD16:17C622:5CD794:6AB9204E"},"text_sha256":"e07a773df8d563bfc9dfc5284e703e7d96dcddf611291230c4844162cf3c0230"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3561","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0781:1C46F8:17A29A6:1BBF9A4:6AB927E2"},"commit":{"sha":"bc68e875deb7d5aa9016a799000618b11dc488b7","url":"https://github.com/olistic/warriorjs/commit/bc68e875deb7d5aa9016a799000618b11dc488b7","date":"2026-03-20T23:58:34Z","author_date":"2026-03-20T23:58:34Z","committer_date":"2026-03-20T23:58:34Z","tree_sha":"0925165d2a0fe0a27522caf69b1b4878a8748fac","message_first_line":"style(cli): fix Biome formatting in SelectPrompt"},"tree_request_status":200,"tree_rate":{"github_remaining":"3560","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A8:70FF5:17B1A7B:1BCF24B:6AB927E2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2635,"blob_sha":"86b1476d015cabcca406656e2de933345dbe6b0e","priority":0}],"documents":[{"path":"README.md","size":2635,"blob_sha":"86b1476d015cabcca406656e2de933345dbe6b0e","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"https://warrior.js.org\">\n    <img alt=\"WarriorJS Banner\" title=\"WarriorJS\" src=\"logo/warriorjs-banner-dark.png?raw=true\">\n  <\/a>\n<\/div>\n\n<br />\n\n<div align=\"center\">\n  <strong>Learn JavaScript and TypeScript by writing code that fights<\/strong>\n<\/div>\n\n<br />\n\n<div align=\"center\">\n  <a href=\"https://github.com/olistic/warriorjs/actions/workflows/ci.yml\">\n    <img alt=\"CI\" src=\"https://img.shields.io/github/actions/workflow/status/olistic/warriorjs/ci.yml?branch=master&style=flat-square\">\n  <\/a>\n  <a href=\"https://codecov.io/gh/olistic/warriorjs\">\n    <img alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/olistic/warriorjs.svg?style=flat-square\">\n  <\/a>\n<\/div>\n\n<br />\n\nIn WarriorJS, you write JavaScript or TypeScript to guide a warrior through\ntowers full of enemies. Each floor is a puzzle: battle sludge, dodge archers,\nrescue captives, and reach the stairs alive. The code you write _is_ the\nstrategy — there's no clicking, no dragging, just logic and sharp thinking.\n\n**Whether you're writing your first `if` statement or refactoring for a perfect\nscore, every floor will test you.**\n\n## Quick Start\n\n1. Install [Node.js](https://nodejs.org) 22 or later.\n\n2. Install the CLI:\n\n```sh\nnpm install --global @warriorjs/cli\n```\n\n3. Launch the game:\n\n```sh\nwarriorjs\n```\n\nThe game walks you through creating a warrior and choosing a tower. Open the\ngenerated `README.md` for your first level's instructions, write your solution\nin `Player.js`, then run `warriorjs` again to see how your warrior fares.\n\nYou can also play from your browser at\n[warriorjs.com](https://warriorjs.com/?ref=gh).\n\n## Documentation\n\nThe [official docs](https://warrior.js.org) cover everything from first steps\nto building your own towers:\n\n- [Gameplay](https://warrior.js.org/docs/player/gameplay)\n- [Towers](https://warrior.js.org/docs/player/towers)\n- [Player API](https://warrior.js.org/docs/player/space-api)\n\n## Contributing\n\nThe best way to contribute is to build a\n[tower](https://warrior.js.org/docs/player/towers) — a set of levels that\nother players can install and play.\n\nYou can also fix bugs, improve the docs, or add new abilities and units.\nSee the [contribution guide](CONTRIBUTING.md) and\n[Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Acknowledgments\n\nThis project was born as a port of\n[ruby-warrior](https://github.com/ryanb/ruby-warrior). Credits for the original\nidea go to [Ryan Bates](https://github.com/ryanb).\n\nSpecial thanks to [Guillermo Cura](https://github.com/guillecura) for designing\na wonderful [logo](logo).\n\n## License\n\nWarriorJS is licensed under a [MIT License](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"421A:3E1DA:172AAA:5C3C7E:6AB92050"},"text_sha256":"400af066fb880131fd6cab5bf6a80e385f344ef2456d708c4390d4db97af4ab9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"OlafenwaMoses/ImageAI","input_row":{"repository":"OlafenwaMoses/ImageAI","url":"https://github.com/OlafenwaMoses/ImageAI","name":"ImageAI","owner":"OlafenwaMoses","description":"A python library built to empower developers to build applications and systems  with self-contained Computer Vision capabilities","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":8889,"issues":747,"created_at":"2018-03-19T23:12:33Z","updated_at":"2026-09-26T01:00:57Z","first_commit_at":"2018-03-19T23:12:34Z","last_commit_at":"2024-02-20T22:38:05Z","activity_months":71.090000000000003,"ai_ml_match_topics":"artificial-intelligence; machine-learning; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:47.050Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"OlafenwaMoses/ImageAI","visibility":"public","created_at":"2018-03-19T23:12:33Z","updated_at":"2026-09-26T01:00:57Z","private":false,"fork":false,"archived":false,"stargazers_count":8889,"open_issues_count":321,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3559","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:17D18EF:1BEF5E9:6AB927E3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3558","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:17E6D21:1C04BE4:6AB927E3"},"commit":{"sha":"49366d102a2cf96e4270be884c6d18eecfa8708a","url":"https://github.com/OlafenwaMoses/ImageAI/commit/49366d102a2cf96e4270be884c6d18eecfa8708a","date":"2018-05-24T23:58:17Z","author_date":"2018-05-24T23:58:17Z","committer_date":"2018-05-24T23:58:17Z","tree_sha":"a40b79216b55be683ac701e4bb79ed94a8b218ad","message_first_line":"Update CUSTOMPREDICTION.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3557","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:176300D:1B7EFBD:6AB927E3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18639,"blob_sha":"687073d32322e0555e5c9ba1a39be3ddb9ca0e0b","priority":0}],"documents":[{"path":"README.md","size":18639,"blob_sha":"687073d32322e0555e5c9ba1a39be3ddb9ca0e0b","priority":0,"status":200,"text":"# ImageAI <br>\nA python library built to empower developers to build applications and systems with self-contained Deep Learning and Computer Vision capabilities using simple\n and few lines of code.\n<p>An <b>AI Commons<\/b> project <a href=\"https://commons.specpal.science\" >https://commons.specpal.science <\/a><\/p>\n<hr>\n\nBuilt with simplicity in mind, <b>ImageAI<\/b> \n    supports a list of state-of-the-art Machine Learning algorithms for image prediction, custom image prediction, object detection, video detection, video object tracking\n    and image predictions trainings. <b>ImageAI<\/b> currently supports image prediction and training using 4 different Machine Learning algorithms \n    trained on the ImageNet-1000 dataset. <b>ImageAI<\/b> also supports object detection, video detection and object tracking  using RetinaNet trained on COCO dataset. <br>\n                                   Eventually, <b>ImageAI<\/b> will provide support for a wider\n    and more specialized aspects of Computer Vision including and not limited to image \n    recognition in special environments and special fields.\n\n<br> <br>\n\n<b>New Release : ImageAI 2.0.1<\/b>\n<br> What's new:\n<br>\n- Addition of Custom Image Prediction model trainings using SqueezeNet, ResNet50, InceptionV3 and DenseNet121 <br>\n- Addition of Custom Image Prediction with custom trained models and generated model class json  <br>\n- Preview Release: Addition of Video Object Detection and Video Custom Objects Detection (object tracking)  <br>\n- Addition of file, numpy array and stream input types for all image prediction and object detection tasks (file inputs only for video detections)  <br>\n- Addition of file and numpy array output types for object detection and custom object detection in images  <br>\n- Introduction of 4 speed modes ('normal', 'fast', 'faster' and 'fastest') for image prediction, allowing prediction time to reduce by 50% at 'fastest' while maintaining prediction accuracy  <br>\n- Introduction of 5 speed modes ('normal', 'fast', 'faster', 'fastest' and 'flash') for all object detection and video object detection tasks, allowing detection time to reduce by over 80%  <br>\nwith 'flash' detection accuracy balanced with 'minimum_percentage_probability' which is kept at low values <br>\n- Introduction of rate of frame detections, allowing developers to adjust intervals of detections in videos in favour of real time/close to real time result. <br>  <br>\n<br>\n\n<h3><b><u>TABLE OF CONTENTS<\/u><\/b><\/h3>\n<a href=\"#dependencies\" >&#9635 Dependencies<\/a><br>\n<a href=\"#installation\" >&#9635 Installation<\/a><br>\n<a href=\"#prediction\" >&#9635 Image Prediction<\/a><br>\n<a href=\"#detection\" >&#9635 Object Detection<\/a><br>\n<a href=\"#videodetection\" >&#9635 Video Object Detection and Tracking<\/a><br>\n<a href=\"#customtraining\" >&#9635 Custom Model Training<\/a><br>\n<a href=\"#customprediction\" >&#9635 Custom Image Prediction<\/a><br>\n<a href=\"#sample\" >&#9635 Sample Applications<\/a><br>\n<a href=\"#recommendation\" >&#9635 AI Practice Recommendations<\/a><br>\n<a href=\"#contact\" >&#9635 Contact Developers<\/a><br>\n<a href=\"#ref\" >&#9635 References<\/a><br>\n\n\n<br><br>\n\n<div id=\"dependencies\"><\/div>\n<h3><b><u>Dependencies<\/u><\/b><\/h3>\n                            To use <b>ImageAI<\/b> in your application developments, you must have installed the following \n dependencies before you install <b>ImageAI<\/b> : \n \n\n \n <br> <br>\n       <span><b>- Python 3.5.1 (and later versions) <\/b>      <a href=\"https://www.python.org/downloads/\" style=\"text-decoration: none;\" >Download<\/a> (Support for Python 2.7 coming soon) <\/span> <br>\n       <span><b>- pip3 <\/b>              <a href=\"https://pypi.python.org/pypi/pip\" style=\"text-decoration: none;\" >Install<\/a><\/span> <br>\n       <span><b>- Tensorflow 1.4.0 (and later versions)  <\/b>      <a href=\"https://www.tensorflow.org/install/install_windows\" style=\"text-decoration: none;\" > Install<\/a><\/span> or install via pip <pre> pip3 install --upgrade tensorflow <\/pre> \n       <span><b>- Numpy 1.13.1 (and later versions) <\/b>      <a href=\"https://www.scipy.org/install.html\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install numpy <\/pre> \n       <span><b>- SciPy 0.19.1 (and later versions) <\/b>      <a href=\"https://www.scipy.org/install.html\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install scipy <\/pre> \n       <span><b>- OpenCV  <\/b>        <a href=\"https://pypi.python.org/pypi/opencv-python\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install opencv-python <\/pre> \n       <span><b>- Pillow  <\/b>       <a href=\"https://pypi.org/project/Pillow/2.2.1/\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install pillow <\/pre> \n       <span><b>- Matplotlib  <\/b>       <a href=\"https://matplotlib.org/users/installing.html\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install matplotlib <\/pre> \n       <span><b>- h5py  <\/b>       <a href=\"http://docs.h5py.org/en/latest/build.html\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install h5py <\/pre> \n       <span><b>- Keras 2.x  <\/b>     <a href=\"https://keras.io/#installation\" style=\"text-decoration: none;\" >Install<\/a><\/span> or install via pip <pre> pip3 install keras <\/pre> \n\n<div id=\"installation\"><\/div>\n <h3><b><u>Installation<\/u><\/b><\/h3>\n      To install ImageAI, run the python installation instruction below in the command line: <br><br>\n    <span>      <b>pip3 install https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.1/imageai-2.0.1-py3-none-any.whl <\/b><\/span> <br><br> <br>\n    \n   or download the Python Wheel <a href=\"https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.1/imageai-2.0.1-py3-none-any.whl\" ><b>\n    imageai-2.0.1-py3-none-any.whl<\/b><\/a> and run the python installation instruction in the  command line\n     to the path of the file like the one below: <br><br>\n    <span>      <b>pip3 install C:\\User\\MyUser\\Downloads\\imageai-2.0.1-py3-none-any.whl<\/b><\/span> <br><br>\n\n<div id=\"prediction\"><\/div>\n<h3><b><u>Image Prediction<\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides 4 different algorithms and model types to perform image prediction, trained on the ImageNet-1000 dataset.\nThe 4 algorithms provided for image prediction include <b>SqueezeNet<\/b>, <b>ResNet<\/b>, <b>InceptionV3<\/b> and <b>DenseNet<\/b>. \nYou will find below the result of an example prediction using the ResNet50 model, and the 'Full Details & Documentation' link.\nClick the link to see the full sample codes, explainations, best practices guide and documentation.\n<p><img src=\"images/1.jpg\" style=\"width: 400px; height: auto;\" /> \n    <pre>convertible : 52.459555864334106\nsports_car : 37.61284649372101\npickup : 3.1751200556755066\ncar_wheel : 1.817505806684494\nminivan : 1.7487050965428352<\/pre>\n<\/p>\n\n<a href=\"imageai/Prediction/\" ><button style=\"font-size: 20px; color: white; background-color: steelblue; height: 50px; border-radius: 10px; \" > >>> Full Details & Documentation <\/button><\/a>\n\n<br>\n\n<br>\n\n\n<div id=\"detection\"><\/div>\n<h3><b><u>Object Detection<\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides very convenient and powerful methods\n to perform object detection on images and extract each object from the image. The object detection class provided only supports\n the current state-of-the-art RetinaNet, but with options to adjust for state of the art performance or real time processing.\nYou will find below the result of an example object detection using the RetinaNet model, and the 'Full Details & Documentation' link.\nClick the link to see the full sample codes, explainations, best practices guide and documentation.\n    <div style=\"width: 600px;\" >\n          <b><p><i>Input Image<\/i><\/p><\/b><\/br>\n          <img src=\"images/image2.jpg\" style=\"width: 500px; height: auto; margin-left: 50px; \" /> <br>\n          <b><p><i>Output Image<\/i><\/p><\/b>\n          <img src=\"images/image2new.jpg\" style=\"width: 500px; height: auto; margin-left: 50px; \" />\n    <\/div> <br>\n<pre>\n\nperson : 91.946941614151\n--------------------------------\nperson : 73.61021637916565\n--------------------------------\nlaptop : 90.24320840835571\n--------------------------------\nlaptop : 73.6881673336029\n--------------------------------\nlaptop : 95.16398310661316\n--------------------------------\nperson : 87.10319399833679\n--------------------------------\n\n<\/pre>\n\n\n\n<a href=\"imageai/Detection/\" ><button style=\"font-size: 20px; color: white; background-color: steelblue; height: 50px; border-radius: 10px; \" > >>> Full Details & Documentation <\/button><\/a>\n\n<br><br>\n\n\n\n\n\n\n\n<div id=\"videodetection\"><\/div>\n<h3><b><u>Video Object Detection and Tracking<\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides very convenient and powerful methods\n to perform object detection in videos and track specific object(s). The video object detection class provided only supports\n the current state-of-the-art RetinaNet, but with options to adjust for state of the art performance or real time processing.\nYou will find below the result of an example object detection using the RetinaNet model, and the 'Full Details & Documentation' link.\nClick the link to see the full videos, sample codes, explainations, best practices guide and documentation.\n<p><div style=\"width: 600px;\" >\n          <p><i><b>Video Object Detection<\/b><\/i><\/p>\n<p><i>Below is a snapshot of a video with objects detected.<\/i><\/p>\n          <img src=\"images/video1.jpg\" style=\"width: 500px; height: auto; margin-left: 50px; \" /> <br>\n          <p><i><b>Video Custom Object Detection (Object Tracking)<\/b><\/i><\/p>\n            <p><i>Below is a snapshot of a video with only person, bicycle and motorcyle detected.<\/i><\/p>\n          <img src=\"images/video2.jpg\" style=\"width: 500px; height: auto; margin-left: 50px; \" />\n    <\/div> <br>\n\n\n<\/p>\n\n\n<a href=\"imageai/Detection/VIDEO.md\" ><button style=\"font-size: 20px; color: white; background-color: steelblue; height: 50px; border-radius: 10px; \" > >>> Full Details & Documentation <\/button><\/a>\n\n\n<br> <br>\n\n<div id=\"customtraining\"><\/div>\n<h3><b><u>Custom Model Training <\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides classes and methods for you to train a new model that can be used to perform prediction on your own custom objects.\nYou can train your custom models using SqueezeNet, ResNet50, InceptionV3 and DenseNet in less than <b> 12 <\/b> lines of code.\nYou will find below the 'Full Details & Documentation' link.\nClick the link to see the guide to preparing training images, sample training codes, explainations, best practices guide and documentation.\n<br>\n<p><br>\n    <div style=\"width: 600px;\" >\n            <p><i>A sample from the IdenProf Dataset used to train a Model for predicting professionals.<\/i><\/p>\n          <img src=\"images/idenprof.jpg\" style=\"width: 500px; height: auto; margin-left: 50px; \" />\n    <\/div> <br>\n\n\n<\/p>\n\n\n<a href=\"imageai/Prediction/CUSTOMTRAINING.md\" ><button style=\"font-size: 20px; color: white; background-color: steelblue; height: 50px; border-radius: 10px; \" > >>> Full Details & Documentation <\/button><\/a>\n\n\n\n<br><br>\n\n<div id=\"customprediction\"><\/div>\n<h3><b><u>Custom Image Prediction <\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides classes and methods for you to run image prediction your own custom objects using your own model trained with <b>ImageAI<\/b> Model Training class.\nYou can use custom models trained with SqueezeNet, ResNet50, InceptionV3 and DenseNet and the JSON file containing the mapping of the custom object names.\nYou will find below the 'Full Details & Documentation' link.\nClick the link to see the guide to sample training codes, explainations, best practices guide and documentation.\n<br>\n<p><br>\n<p><i>Prediction from a sample model trained on IdenProf, for predicting professionals<\/i><\/p>\n      <img src=\"images/4.jpg\" style=\"width: 400px; height: auto;\" />\n    <pre>mechanic : 76.82620286941528\nchef : 10.106072574853897\nwaiter : 4.036874696612358\npolice : 2.6663416996598244\npilot : 2.239348366856575<\/pre>\n\n\n<\/p>\n\n\n<a href=\"imageai/Prediction/CUSTOMPREDICTION.md\" ><button style=\"font-size: 20px; color: white; background-color: steelblue; height: 50px; border-radius: 10px; \" > >>> Full Details & Documentation <\/button><\/a>\n\n\n\n\n\n\n\n<br><br> <br>\n\n<div id=\"performance\"><\/div>\n<h3><b><u>Real-Time and High Perfomance Implementation<\/u><\/b><\/h3>\n<b>ImageAI<\/b> provides abstracted and convenient implementations of state-of-the-art Computer Vision technologies. All of <b>ImageAI<\/b> implementations and code can work on any computer system with moderate CPU capacity. However, the speed of processing for operations like image prediction, object detection and others on CPU is slow and not suitable for real-time applications. To perform real-time Computer Vision operations with high performance, you need to use GPU enabled technologies.\n<br> <br>\n<b>ImageAI<\/b> uses the Tensorflow backbone for it's Computer Vision operations. Tensorflow supports both CPUs and GPUs ( Specifically NVIDIA GPUs.  You can get one for your PC or get a PC that has one) for machine learning and artificial intelligence algorithms' implementations. To use Tensorflow that supports the use of GPUs, follow the link below :\n<br> <br>\nFOR WINDOWS <br>\n<a href=\"https://www.tensorflow.org/install/install_windows\" >https://www.tensorflow.org/install/install_windows<\/a> <br><br>\n\n\nFOR macOS <br>\n<a href=\"https://www.tensorflow.org/install/install_mac\" >https://www.tensorflow.org/install/install_mac<\/a> <br><br>\n\n\nFOR UBUNTU <br>\n<a href=\"https://www.tensorflow.org/install/install_linux\">https://www.tensorflow.org/install/install_linux<\/a>\n<br><br>\n\n<div id=\"sample\"><\/div>\n<h3><b><u>Sample Applications<\/u><\/b><\/h3>\n      As a demonstration of  what you can do with ImageAI, we have \n built a complete AI powered Photo gallery for Windows called <b>IntelliP<\/b> ,  using <b>ImageAI<\/b> and UI framework <b>Kivy<\/b>. Follow this \n <a href=\"https://github.com/OlafenwaMoses/IntelliP\"  > link <\/a> to download page of the application and its source code. <br> <br>\n\n We also welcome submissions of applications and systems built by you and powered by ImageAI for listings here. Should you want your ImageAI powered \n  developments listed here, you can reach to us via our <a href=\"#contact\" >Contacts<\/a> below.\n\n <br> <br>\n\n<div id=\"recommendation\"><\/div>\n <h3><b><u>AI Practice Recommendations<\/u><\/b><\/h3>\n\n For anyone interested in building AI systems and using them for business, economic,  social and research purposes, it is critical that the person knows the likely positive, negative and unprecedented impacts the use of such technologies will have. They must also be aware of approaches and practices recommended by experienced industry experts to ensure every use of AI brings overall benefit to mankind. We therefore recommend to everyone that wishes to use ImageAI and other AI tools and resources to read Microsoft's January 2018 publication on AI titled \"The Future Computed : Artificial Intelligence and its role in society \".\nKindly follow the link below to download the publication.\n <br><br>\n<a href=\"https://blogs.microsoft.com/blog/2018/01/17/future-computed-artificial-intelligence-role-society/\" >https://blogs.microsoft.com/blog/2018/01/17/future-computed-artificial-intelligence-role-society/<\/a>\n <br> <br>\n\n<div id=\"contact\"><\/div>\n <h3><b><u>Contact Developers<\/u><\/b><\/h3>\n <p> <b>Moses Olafenwa<\/b> <br>\n    <i>Email: <\/i>    <a style=\"text-decoration: none;\"  href=\"mailto:guymodscientist@gmail.com\"> guymodscientist@gmail.com<\/a> <br>\n      <i>Website: <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://moses.specpal.science\"> https://moses.specpal.science<\/a> <br>\n      <i>Twitter: <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://twitter.com/OlafenwaMoses\"> @OlafenwaMoses<\/a> <br>\n      <i>Medium : <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://medium.com/@guymodscientist\"> @guymodscientist<\/a> <br>\n      <i>Facebook : <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://facebook.com/moses.olafenwa\"> moses.olafenwa<\/a> <br>\n<br><br>\n      <b>John Olafenwa<\/b> <br>\n    <i>Email: <\/i>    <a style=\"text-decoration: none;\"  href=\"mailto:johnolafenwa@gmail.com\"> johnolafenwa@gmail.com<\/a> <br>\n      <i>Website: <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://john.specpal.science\"> https://john.specpal.science<\/a> <br>\n      <i>Twitter: <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://twitter.com/johnolafenwa\"> @johnolafenwa<\/a> <br>\n      <i>Medium : <\/i>    <a style=\"text-decoration: none;\" target=\"_blank\" href=\"https://medium.com/@johnolafenwa\"> @johnolafenwa<\/a> <br>\n      <i>Facebook : <\/i>    <a style=\"text-decoration: none;\" href=\"https://facebook.com/olafenwajohn\"> olafenwajohn<\/a> <br>\n\n\n <\/p>\n\n <br>\n\n <div id=\"ref\"><\/div>\n <h3><b><u>References<\/u><\/b><\/h3>\n\n 1. Somshubra Majumdar, DenseNet Implementation of the paper, Densely Connected Convolutional Networks in Keras <br>\n <a href=\"https://github.com/titu1994/DenseNet/\" >https://github.com/titu1994/DenseNet/<\/a> <br><br>\n\n 2. Broad Institute of MIT and Harvard, Keras package for deep residual networks <br>\n <a href=\"https://github.com/broadinstitute/keras-resnet\" >https://github.com/broadinstitute/keras-resnet<\/a> <br><br>\n\n 3. Fizyr, Keras implementation of RetinaNet object detection <br>\n <a href=\"https://github.com/fizyr/keras-retinanet\" >https://github.com/fizyr/keras-retinanet<\/a> <br><br>\n\n 4. Francois Chollet, Keras code and weights files for popular deeplearning models <br>\n <a href=\"https://github.com/fchollet/deep-learning-models\" >https://github.com/fchollet/deep-learning-models<\/a> <br><br>\n\n 5. Forrest N. et al, SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size <br>\n <a href=\"https://arxiv.org/abs/1602.07360\" >https://arxiv.org/abs/1602.07360<\/a> <br><br>\n\n 6. Kaiming H. et al, Deep Residual Learning for Image Recognition <br>\n <a href=\"https://arxiv.org/abs/1512.03385\" >https://arxiv.org/abs/1512.03385<\/a> <br><br>\n\n 7. Szegedy. et al, Rethinking the Inception Architecture for Computer Vision <br>\n <a href=\"https://arxiv.org/abs/1512.00567\" >https://arxiv.org/abs/1512.00567<\/a> <br><br>\n\n 8. Gao. et al, Densely Connected Convolutional Networks <br>\n <a href=\"https://arxiv.org/abs/1608.06993\" >https://arxiv.org/abs/1608.06993<\/a> <br><br>\n\n 9. Tsung-Yi. et al, Focal Loss for Dense Object Detection <br>\n <a href=\"https://arxiv.org/abs/1708.02002\" >https://arxiv.org/abs/1708.02002<\/a> <br><br>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DA8A:2B291E:17CC06:5CDE5A:6AB9204E"},"text_sha256":"3d77a6aacb79ccd1908adce359f4681b3cc650eb0dc3be601b18958670f9d7d2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3556","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:17DB4A3:1BF8893:6AB927E4"},"commit":{"sha":"2156d1a39a196c72057771d1d16226388c1d7baf","url":"https://github.com/OlafenwaMoses/ImageAI/commit/2156d1a39a196c72057771d1d16226388c1d7baf","date":"2024-02-20T22:38:05Z","author_date":"2024-02-20T22:38:05Z","committer_date":"2024-02-20T22:38:05Z","tree_sha":"d7f87e943253de2cc6df96cb4e1cd05542aca8d3","message_first_line":"link images"},"tree_request_status":200,"tree_rate":{"github_remaining":"3555","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:1787C41:1BA5910:6AB927E5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16877,"blob_sha":"72f8097765059c05b5562ac704019dac889c653c","priority":0}],"documents":[{"path":"README.md","size":16877,"blob_sha":"72f8097765059c05b5562ac704019dac889c653c","priority":0,"status":200,"text":"# ImageAI (v3.0.3)\n\n\n\n[![Build Status](https://travis-ci.com/OlafenwaMoses/ImageAI.svg?branch=master)](https://travis-ci.com/OlafenwaMoses/ImageAI)  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/OlafenwaMoses/ImageAI/blob/master/LICENSE) [![PyPI version](https://badge.fury.io/py/imageai.svg)](https://badge.fury.io/py/imageai)   [![Downloads](https://pepy.tech/badge/imageai/month)](https://pepy.tech/project/imageai) [![Downloads](https://pepy.tech/badge/imageai/week)](https://pepy.tech/project/imageai)\n\nAn open-source python library built to empower developers to build applications and systems with self-contained Deep Learning and Computer Vision capabilities using simple and few lines of code.\n \n If you will like to sponsor this project, kindly visit the <strong>[Github sponsor page](https://github.com/sponsors/OlafenwaMoses)<\/strong>.\n \n \n## ---------------------------------------------------\n## Introducing Jarvis and TheiaEngine.\n\nWe the creators of ImageAI are glad to announce 2 new AI projects to provide state-of-the-art Generative AI, LLM and Image Understanding on your personal computer and servers. \n\n\n[![](jarvis.png)](https://jarvis.genxr.co)\n\nInstall Jarvis on PC/Mac to setup limitless access to LLM powered AI Chats for your every day work, research and generative AI needs with 100% privacy and full offline capability.\n\n\nVisit [https://jarvis.genxr.co](https://jarvis.genxr.co/) to get started.\n\n\n[![](theiaengine.png)](https://www.genxr.co/theia-engine)\n\n\n[TheiaEngine](https://www.genxr.co/theia-engine), the next-generation computer Vision AI API capable of all Generative and Understanding computer vision tasks in a single API call and available via REST API to all programming languages. Features include\n- **Detect 300+ objects** ( 220 more objects than ImageAI)\n- **Provide answers to any content or context questions** asked on an image\n  - very useful to get information on any object, action or information without needing to train a new custom model for every tasks\n-  **Generate scene description and summary**\n-  **Convert 2D image to 3D pointcloud and triangular mesh**\n-  **Semantic Scene mapping of objects, walls, floors, etc**\n-  **Stateless Face recognition and emotion detection**\n-  **Image generation and augmentation from prompt**\n-  etc.\n\nVisit [https://www.genxr.co/theia-engine](https://www.genxr.co/theia-engine) to try the demo and join in the beta testing today.\n## ---------------------------------------------------\n \n![](logo1.png)\n\nDeveloped and maintained by [Moses Olafenwa](https://twitter.com/OlafenwaMoses)\n\n---\n\nBuilt with simplicity in mind, **ImageAI** \n    supports a list of state-of-the-art Machine Learning algorithms for image prediction, custom image prediction, object detection, video detection, video object tracking\n    and image predictions trainings. **ImageAI** currently supports image prediction and training using 4 different Machine Learning algorithms \n    trained on the ImageNet-1000 dataset. **ImageAI** also supports object detection, video detection and object tracking  using RetinaNet, YOLOv3 and TinyYOLOv3 trained on COCO dataset. Finally, **ImageAI** allows you to train custom models for performing detection and recognition of new objects. \n   \nEventually, **ImageAI** will provide support for a wider and more specialized aspects of Computer Vision\n\n\n**New Release : ImageAI 3.0.2**\n\nWhat's new:\n- PyTorch backend\n- TinyYOLOv3 model training\n\n\n### TABLE OF CONTENTS\n- <a href=\"#installation\" > :white_square_button: Installation<\/a>\n- <a href=\"#features\" > :white_square_button: Features<\/a>\n- <a href=\"#documentation\" > :white_square_button: Documentation<\/a>\n- <a href=\"#sponsors\" > :white_square_button: Sponsors<\/a>\n- <a href=\"#sample\" > :white_square_button: Projects Built on ImageAI<\/a>\n- <a href=\"#real-time-and-high-performance-implementation\" > :white_square_button: High Performance Implementation<\/a>\n- <a href=\"#recommendation\" > :white_square_button: AI Practice Recommendations<\/a>\n- <a href=\"#contact\" > :white_square_button: Contact Developers<\/a>\n- <a href=\"#citation\" > :white_square_button: Citation<\/a>\n- <a href=\"#ref\" > :white_square_button: References<\/a>\n\n\n\n## Installation\n<div id=\"installation\"><\/div>\n \nTo install ImageAI, run the python installation instruction below in the command line:\n\n- [Download and Install](https://www.python.org/downloads/) **Python 3.7**, **Python 3.8**, **Python 3.9** or **Python 3.10**\n- Install dependencies\n  - **CPU**: Download [requirements.txt](https://github.com/OlafenwaMoses/ImageAI/blob/master/requirements.txt) file and install via the command\n    ```\n    pip install -r requirements.txt\n    ```\n    or simply copy and run the command below\n\n    ```\n    pip install cython pillow>=7.0.0 numpy>=1.18.1 opencv-python>=4.1.2 torch>=1.9.0 --extra-index-url https://download.pytorch.org/whl/cpu torchvision>=0.10.0 --extra-index-url https://download.pytorch.org/whl/cpu pytest==7.1.3 tqdm==4.64.1 scipy>=1.7.3 matplotlib>=3.4.3 mock==4.0.3\n    ```\n\n  - **GPU/CUDA**: Download [requirements_gpu.txt](https://github.com/OlafenwaMoses/ImageAI/blob/master/requirements_gpu.txt) file and install via the command\n    ```\n    pip install -r requirements_gpu.txt\n    ```\n    or smiply copy and run the command below\n    ```\n    pip install cython pillow>=7.0.0 numpy>=1.18.1 opencv-python>=4.1.2 torch>=1.9.0 --extra-index-url https://download.pytorch.org/whl/cu102 torchvision>=0.10.0 --extra-index-url https://download.pytorch.org/whl/cu102 pytest==7.1.3 tqdm==4.64.1 scipy>=1.7.3 matplotlib>=3.4.3 mock==4.0.3\n    ```\n- If you plan to train custom AI models, download [requirements_extra.txt](https://github.com/OlafenwaMoses/ImageAI/blob/master/requirements_extra.txt) file and install via the command\n  \n  ```\n  pip install -r requirements_extra.txt\n  ```\n  or simply copy and run the command below\n  ```\n  pip install pycocotools@git+https://github.com/gautamchitnis/cocoapi.git@cocodataset-master#subdirectory=PythonAPI\n  ```\n- Then run the command below to install ImageAI\n  ```\n  pip install imageai --upgrade\n  ```\n\n## Features\n<div id=\"features\"><\/div>\n<table>\n  <tr>\n    <td><h2> Image Classification<\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td><img src=\"data-images/1.jpg\" >\n    <h4>ImageAI provides 4 different algorithms and model types to perform image prediction, trained on the ImageNet-1000 dataset. The 4 algorithms provided for image prediction include MobileNetV2, ResNet50, InceptionV3 and DenseNet121.\n    Click the link below to see the full sample codes, explanations and best practices guide.<\/h4>\n    <a href=\"imageai/Classification\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n <div id=\"features\"><\/div>\n<table>\n  <tr>\n    <td><h2> Object Detection <\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td>\n        <img src=\"data-images/image2new.jpg\">\n        <h4>ImageAI provides very convenient and powerful methods to perform object detection on images and extract each object from the image. The object detection class provides support for RetinaNet, YOLOv3 and TinyYOLOv3, with options to adjust for state of the art performance or real time processing. Click the link below to see the full sample codes, explanations and best practices guide.<\/h4>\n    <a href=\"imageai/Detection\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n\n<table>\n  <tr>\n    <td><h2> Video Object Detection & Analysis<\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td><img src=\"data-images/video_analysis_visualization.jpg\">\n    <h4>ImageAI provides very convenient and powerful methods to perform object detection in videos. The video object detection class provided only supports the current state-of-the-art RetinaNet. Click the link to see the full videos, sample codes, explanations and best practices guide.<\/h4>\n    <a href=\"imageai/Detection/VIDEO.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n\n <table>\n  <tr>\n    <td><h2> Custom Classification model training <\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td>\n        <img src=\"data-images/idenprof.jpg\">\n        <h4>ImageAI provides classes and methods for you to train a new model that can be used to perform prediction on your own custom objects. You can train your custom models using MobileNetV2, ResNet50, InceptionV3 and DenseNet in 5 lines of code. Click the link below to see the guide to preparing training images, sample training codes, explanations and best practices.<\/h4>\n    <a href=\"imageai/Classification/CUSTOMTRAINING.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n <table>\n  <tr>\n    <td><h2> Custom Model Classification<\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td><img src=\"data-images/4.jpg\">\n    <h4>ImageAI provides classes and methods for you to run image prediction your own custom objects using your own model trained with ImageAI Model Training class. You can use your custom models trained with MobileNetV2, ResNet50, InceptionV3 and DenseNet and the JSON file containing the mapping of the custom object names. Click the link below to see the guide to sample training codes, explanations, and best practices guide.<\/h4>\n    <a href=\"imageai/Classification/CUSTOMCLASSIFICATION.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n <table>\n  <tr>\n    <td><h2> Custom Detection Model Training <\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td>\n        <img src=\"data-images/headsets.jpg\">\n        <h4>ImageAI provides classes and methods for you to train new YOLOv3 or TinyYOLOv3 object detection models on your custom dataset. This means you can train a model to detect literally any object of interest by providing the images, the annotations and training with ImageAI. Click the link below to see the guide to sample training codes, explanations, and best practices guide.<\/h4>\n    <a href=\"imageai/Detection/Custom/CUSTOMDETECTIONTRAINING.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n  \n <\/table>\n\n<table>\n  <tr>\n    <td><h2> Custom Object Detection<\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td><img src=\"data-images/holo2-detected.jpg\">\n    <h4>ImageAI now provides classes and methods for you detect and recognize your own custom objects in images using your own model trained with the DetectionModelTrainer class. You can use your custom trained YOLOv3 or TinyYOLOv3 model and the **.json** file generated during the training. Click the link below to see the guide to sample training codes, explanations, and best practices guide.<\/h4>\n    <a href=\"imageai/Detection/Custom/CUSTOMDETECTION.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n <\/table>\n\n\n<table>\n  <tr>\n    <td><h2> Custom Video Object Detection & Analysis <\/h2> <\/td>\n  <\/tr>\n  <tr>\n    <td>\n        <img src=\"data-images/customvideodetection.gif\">\n        <h4>ImageAI now provides classes and methods for you detect and recognize your own custom objects in images using your own model trained with the DetectionModelTrainer class. You can use your custom trained YOLOv3 or TinyYOLOv3 model and the **.json** file generated during the training. Click the link below to see the guide to sample training codes, explanations, and best practices guide.<\/h4>\n    <a href=\"imageai/Detection/Custom/CUSTOMVIDEODETECTION.md\"> >>> Get Started<\/a>\n    <\/td>\n  <\/tr>\n <\/table>\n\n## Documentation\n<div id=\"documentation\"><\/div>\n\nWe have provided full documentation for all **ImageAI** classes and functions. Visit the link below:\n\n- Documentation - **English Version**  [https://imageai.readthedocs.io](https://imageai.readthedocs.io)\n\n\n## Sponsors\n<div id=\"sponsors\"><\/div>\n\n\n## Real-Time and High Performance Implementation\n<div id=\"performance\"><\/div>\n\n**ImageAI** provides abstracted and convenient implementations of state-of-the-art Computer Vision technologies. All of **ImageAI** implementations and code can work on any computer system with moderate CPU capacity. However, the speed of processing for operations like image prediction, object detection and others on CPU is slow and not suitable for real-time applications. To perform real-time Computer Vision operations with high performance, you need to use GPU enabled technologies.\n\n**ImageAI** uses the PyTorch backbone for it's Computer Vision operations. PyTorch supports both CPUs and GPUs ( Specifically NVIDIA GPUs.  You can get one for your PC or get a PC that has one) for machine learning and artificial intelligence algorithms' implementations.\n\n\n\n## Projects Built on ImageAI\n<div id=\"sample\"><\/div>\n\n\n\n## AI Practice Recommendations\n<div id=\"recommendation\"><\/div>\n\nFor anyone interested in building AI systems and using them for business, economic,  social and research purposes, it is critical that the person knows the likely positive, negative and unprecedented impacts the use of such technologies will have.\nThey must also be aware of approaches and practices recommended by experienced industry experts to ensure every use of AI brings overall benefit to mankind.\nWe therefore recommend to everyone that wishes to use ImageAI and other AI tools and resources to read Microsoft's January 2018 publication on AI titled \"The Future Computed : Artificial Intelligence and its role in society\".\nKindly follow the link below to download the publication.\n\n[https://blogs.microsoft.com/blog/2018/01/17/future-computed-artificial-intelligence-role-society](https://blogs.microsoft.com/blog/2018/01/17/future-computed-artificial-intelligence-role-society/)\n\n### Contact Developer\n<div id=\"contact\"><\/div>\n\n- **Moses Olafenwa**\n    * _Email:_ guymodscientist@gmail.com\n    * _Twitter:_ [@OlafenwaMoses](https://twitter.com/OlafenwaMoses)\n    * _Medium:_ [@guymodscientist](https://medium.com/@guymodscientist)\n    * _Facebook:_ [moses.olafenwa](https://facebook.com/moses.olafenwa)\n- **John Olafenwa**\n    * _Email:_ johnolafenwa@gmail.com\n    * _Website:_ [https://john.aicommons.science](https://john.aicommons.science)\n    * _Twitter:_ [@johnolafenwa](https://twitter.com/johnolafenwa)\n    * _Medium:_ [@johnolafenwa](https://medium.com/@johnolafenwa)\n    * _Facebook:_ [olafenwajohn](https://facebook.com/olafenwajohn)\n\n\n### Citation\n<div id=\"citation\"><\/div>\n\nYou can cite **ImageAI** in your projects and research papers via the **BibTeX** entry below.  \n  \n```\n@misc {ImageAI,\n    author = \"Moses\",\n    title  = \"ImageAI, an open source python library built to empower developers to build applications and systems  with self-contained Computer Vision capabilities\",\n    url    = \"https://github.com/OlafenwaMoses/ImageAI\",\n    month  = \"mar\",\n    year   = \"2018--\"\n}\n```\n\n\n\n ### References\n <div id=\"ref\"><\/div>\n\n 1. Somshubra Majumdar, DenseNet Implementation of the paper, Densely Connected Convolutional Networks in Keras\n[https://github.com/titu1994/DenseNet](https://github.com/titu1994/DenseNet)\n 2. Broad Institute of MIT and Harvard, Keras package for deep residual networks\n[https://github.com/broadinstitute/keras-resnet](https://github.com/broadinstitute/keras-resnet)\n 3. Fizyr, Keras implementation of RetinaNet object detection\n[https://github.com/fizyr/keras-retinanet](https://github.com/fizyr/keras-retinanet)\n 4. Francois Chollet, Keras code and weights files for popular deeplearning models\n[https://github.com/fchollet/deep-learning-models](https://github.com/fchollet/deep-learning-models)\n 5. Forrest N. et al, SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size\n[https://arxiv.org/abs/1602.07360](https://arxiv.org/abs/1602.07360)\n 6. Kaiming H. et al, Deep Residual Learning for Image Recognition\n[https://arxiv.org/abs/1512.03385](https://arxiv.org/abs/1512.03385)\n 7. Szegedy. et al, Rethinking the Inception Architecture for Computer Vision\n[https://arxiv.org/abs/1512.00567](https://arxiv.org/abs/1512.00567)\n 8. Gao. et al, Densely Connected Convolutional Networks\n[https://arxiv.org/abs/1608.06993](https://arxiv.org/abs/1608.06993)\n 9. Tsung-Yi. et al, Focal Loss for Dense Object Detection\n[https://arxiv.org/abs/1708.02002](https://arxiv.org/abs/1708.02002)\n 10. O Russakovsky et al, ImageNet Large Scale Visual Recognition Challenge\n[https://arxiv.org/abs/1409.0575](https://arxiv.org/abs/1409.0575)\n 11. TY Lin et al, Microsoft COCO: Common Objects in Context\n[https://arxiv.org/abs/1405.0312](https://arxiv.org/abs/1405.0312)\n 12. Moses & John Olafenwa, A collection of images of identifiable professionals.\n[https://github.com/OlafenwaMoses/IdenProf](https://github.com/OlafenwaMoses/IdenProf)\n 13. Joseph Redmon and Ali Farhadi, YOLOv3: An Incremental Improvement.\n[https://arxiv.org/abs/1804.02767](https://arxiv.org/abs/1804.02767)\n 14. Experiencor, Training and Detecting Objects with YOLO3\n[https://github.com/experiencor/keras-yolo3](https://github.com/experiencor/keras-yolo3)\n 15. MobileNetV2: Inverted Residuals and Linear Bottlenecks\n[https://arxiv.org/abs/1801.04381](https://arxiv.org/abs/1801.04381)\n 16. YOLOv3 in PyTorch > ONNX > CoreML > TFLite [https://github.com/ultralytics/yolov3](https://github.com/ultralytics/yolov3)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6A2A:11316A:1765A4:5C7680:6AB92052"},"text_sha256":"6524ec692f026e751e4d3d685fb4935fe56c9e51889e65281ba1168d85ad93fe"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"deeppavlov/DeepPavlov","input_row":{"repository":"deeppavlov/DeepPavlov","url":"https://github.com/deeppavlov/DeepPavlov","name":"DeepPavlov","owner":"deeppavlov","description":"An open source library for deep learning end-to-end dialog systems and chatbots.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6995,"issues":647,"created_at":"2017-11-17T14:35:29Z","updated_at":"2026-09-25T09:33:45Z","first_commit_at":"2017-11-17T14:35:29Z","last_commit_at":"2024-11-26T06:34:41Z","activity_months":84.290000000000006,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:49.767Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deeppavlov/DeepPavlov","visibility":"public","created_at":"2017-11-17T14:35:29Z","updated_at":"2026-09-25T09:33:45Z","private":false,"fork":false,"archived":false,"stargazers_count":6995,"open_issues_count":55,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3554","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:1773E97:1B9178E:6AB927E5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3553","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:1785B32:1BA2B10:6AB927E6"},"commit":{"sha":"f2766999539d43af1b0dea91b4ee14cb2cc91ae8","url":"https://github.com/deeppavlov/DeepPavlov/commit/f2766999539d43af1b0dea91b4ee14cb2cc91ae8","date":"2018-05-24T15:46:24Z","author_date":"2018-05-24T15:46:24Z","committer_date":"2018-05-24T15:46:24Z","tree_sha":"82ac40f7b894d834e27a03ef463edd50e494f644","message_first_line":"Merge branch 'fix/intents_params' of https://github.com/deepmipt/DeepPavlov into feature/network_evolution"},"tree_request_status":200,"tree_rate":{"github_remaining":"3552","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17AD427:1BCAF94:6AB927E6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22402,"blob_sha":"c621605de2549054bfa354fcb6931485643e60a1","priority":0}],"documents":[{"path":"README.md","size":22402,"blob_sha":"c621605de2549054bfa354fcb6931485643e60a1","priority":0,"status":200,"text":"[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deepmipt/DeepPavlov/blob/master/LICENSE)\n![Python 3.6](https://img.shields.io/badge/python-3.6-green.svg)\n\n**We are in a really early Alpha release. You should be ready for hard adventures. \nIf you have updated to version 0.0.2 or greater - please re-download all pre-trained models**\n\nDeepPavlov is an open-source conversational AI library built on [TensorFlow](https://www.tensorflow.org/) and [Keras](https://keras.io/). It is designed for\n * development of production ready chat-bots and complex conversational systems,\n * NLP and dialog systems research.\n \nOur goal is to enable AI-application developers and researchers with:\n * set of pre-trained NLP models, pre-defined dialog system components (ML/DL/Rule-based) and pipeline templates;\n * a framework for implementing and testing their own dialog models;\n * tools for application integration with adjacent infrastructure (messengers, helpdesk software etc.);\n * benchmarking environment for conversational models and uniform access to relevant datasets.\n\n# Demo \n\nDemo of selected features is available at [demo.ipavlov.ai](https://demo.ipavlov.ai/)\n\n# Conceptual overview\n\n<!-- ### Principles\nThe library is designed according to the following principles:\n * hybrid ML/DL/Rule-based architecture as a current approach\n * support of modular dialog system design\n * end-to-end deep learning architecture as a long-term goal\n * component-based software engineering, maximization of reusability\n * multiple alternative solutions for the same NLP task to enable flexible data-driven configuration\n * easy extension and benchmarking -->\n \n<!-- ### Target Architecture\nTarget architecture of our library: -->\n\n<p align=\"left\">\n<img src=\"dp_agnt_diag.png\"/>\n<\/p>\n\n## Key Concepts\n * `Agent` is a conversational agent communicating with users in natural language (text).\n * `Skill` fulfills user’s goal in some domain. Typically, this is accomplished by presenting information or completing transaction (e.g. answer question by FAQ, booking tickets etc.). However, for some tasks a success of interaction is defined as continuous engagement (e.g. chit-chat).\n * `Model` is a reusable functional component of `Skill`.\n   * `Rule-based Models` cannot be trained.\n   * `Machine Learning Models` can be trained only stand alone.\n   * `Deep Learning Models` can be trained independently and in an end-to-end mode being joined in a chain.\n * `Skill Manager` performs selection of the `Skill` to generate response.\n * ` Chainer` builds an agent/component pipeline from heterogeneous components (rule-based/ml/dl). It allows to train and infer models in a pipeline as a whole.\n\nThe smallest building block of the library is `Model`. `Model` stands for any kind of function in an NLP pipeline. It can be implemented as a neural network, a non-neural ML model or a rule-based system. Besides that, `Model` can have nested structure, i.e. a `Model` can include other `Model`'(s). \n\n`Model`s can be joined into a `Skill`. `Skill` solves a larger NLP task compared to `Model`. However, in terms of implementation `Skill`s are not different from `Model`s. The only restriction of `Skill`s is that their input and output should both be strings. Therefore, `Skill`s are usually associated with dialogue tasks. \n\n`Agent` is supposed to be a multi-purpose dialogue system that comprises several `Skill`s and can switch between them. It can be a dialogue system that contains a goal-oriented and chatbot skills and chooses which one to use for generating the answer depending on user input.\n\nDeepPavlov is built on top of machine learning frameworks [TensorFlow](https://www.tensorflow.org/) and [Keras](https://keras.io/). Other external libraries can be used to build basic components.\n\n---\n\n# Installation\n0. Currently we support only `Linux` platform and `Python 3.6` (**`Python 3.5` is not supported!**)\n\n1. Create a virtual environment with `Python 3.6`\n    ```\n    virtualenv env\n    ```\n2. Activate the environment.\n    ```\n    source ./env/bin/activate\n    ```\n3. Clone the repo and `cd` to project root\n   ```\n   git clone https://github.com/deepmipt/DeepPavlov.git\n   cd DeepPavlov\n   ```\n4. Install the requirements:\n    ```\n    python setup.py develop\n    ```\n5. Install `spacy` dependencies:\n    ```\n    python -m spacy download en\n    ```\n\n# Quick start\n\nTo use our pre-trained models, you should first download them:\n```\npython -m deeppavlov.deep download <path_to_config>\n```\nor you can use additional key `-d` to automatically download all required models and data with any command like `interact`, `riseapi`, etc.\n\nThen you can interact with the models or train them with the following command:\n\n```\npython -m deeppavlov.deep <mode> <path_to_config> [-d]\n```\n\n* `<mode>` can be `train`, `predict`, `interact`, `interactbot` or `riseapi`\n* `<path_to_config>` should be a path to an NLP pipeline json config (e.g. `deeppavlov/configs/ner/slotfill_dstc2.json`)\nor a name without the `.json` extension of one of the config files [provided](deeppavlov/configs) in this repository (e.g. `slotfill_dstc2`)\n\nFor the `interactbot` mode you should specify Telegram bot token in `-t` parameter or in `TELEGRAM_TOKEN` environment variable. Also if you want to get custom `/start` and `/help` Telegram messages for the running model you should:\n* Add section to `utils/telegram_utils/model_info.json` with your custom Telegram messages\n* In model config file specify `metadata.labels.telegram_utils` parameter with name which refers to the added section of `utils/telegram_utils/model_info.json`\n\nFor `riseapi` mode you should specify api settings (host, port, etc.) in [*utils/server_utils/server_config.json*](utils/server_utils/server_config.json) configuration file. If provided, values from *model_defaults* section override values for the same parameters from *common_defaults* section. Model names in *model_defaults* section should be similar to the class names of the models main component.\n\nFor `predict` you can specify path to input file with `-f` or `--input-file` parameter, otherwise, data will be taken\nfrom stdin.  \nEvery line of input text will be used as a pipeline input parameter, so one example will consist of as many lines,\nas many input parameters your pipeline expects.  \nYou can also specify batch size with `-b` or `--batch-size` parameter.\n\nAvailable model configs are:\n\n- ```deeppavlov/configs/go_bot/*.json```\n\n- ```deeppavlov/configs/seq2seq_go_bot/*.json```\n\n- ```deeppavlov/configs/odqa/*.json```\n\n- ```deeppavlov/configs/squad/*.json```\n\n- ```deeppavlov/configs/intents/*.json```\n\n- ```deeppavlov/configs/ner/*.json```\n\n- ```deeppavlov/configs/ranking/*.json```\n\n- ```deeppavlov/configs/error_model/*.json```\n\n# Features\n\n| Component | Description |\n| --------- | ----------- |\n| [Slot filling and NER components](deeppavlov/models/ner/README.md) | Based on neural Named Entity Recognition network and fuzzy Levenshtein search to extract normalized slot values from text. The NER component reproduces architecture from the paper [Application of a Hybrid Bi-LSTM-CRF model to the task of Russian Named Entity Recognition](https://arxiv.org/pdf/1709.09686.pdf) which is inspired by Bi-LSTM+CRF architecture from https://arxiv.org/pdf/1603.01360.pdf. |\n| [Intent classification component](deeppavlov/models/classifiers/intents/README.md) | Based on shallow-and-wide Convolutional Neural Network architecture from [Kim Y. Convolutional neural networks for sentence classification – 2014](https://arxiv.org/pdf/1408.5882). The model allows multilabel classification of sentences. |\n| [Automatic spelling correction component](deeppavlov/models/spellers/error_model/README.md) | Based on [An Improved Error Model for Noisy Channel Spelling Correction by Eric Brill and Robert C. Moore](http://www.aclweb.org/anthology/P00-1037) and uses statistics based error model, a static dictionary and an ARPA language model to correct spelling errors. |\n| [Ranking component](deeppavlov/models/ranking/README.md) |  Based on [LSTM-based deep learning models for non-factoid answer selection](https://arxiv.org/abs/1511.04108). The model performs ranking of responses or contexts from some database by their relevance for the given context. |\n| [Question Answering component](deeppavlov/models/squad/README.md) | Based on [R-NET: Machine Reading Comprehension with Self-matching Networks](https://www.microsoft.com/en-us/research/publication/mrc/). The model solves the task of looking for an answer on a question in a given context ([SQuAD](https://rajpurkar.github.io/SQuAD-explorer/) task format). |\n| **Skills** |  |\n| [Goal-oriented bot](deeppavlov/skills/go_bot/README.md) | Based on Hybrid Code Networks (HCNs) architecture from [Jason D. Williams, Kavosh Asadi, Geoffrey Zweig, Hybrid Code Networks: practical and efficient end-to-end dialog control with supervised and reinforcement learning – 2017](https://arxiv.org/abs/1702.03274). It allows to predict responses in goal-oriented dialog. The model is customizable: embeddings, slot filler and intent classifier can switched on and off on demand.  |\n| [Seq2seq goal-oriented bot](deeppavlov/skills/seq2seq_go_bot/README.md) | Dialogue agent predicts responses in a goal-oriented dialog and is able to handle multiple domains (pretrained bot allows calendar scheduling, weather information retrieval, and point-of-interest navigation). The model is end-to-end differentiable and does not need to explicitly model dialogue state or belief trackers. |\n|[ODQA](deeppavlov/skills/odqa/README.md) | An open domain question answering skill. The skill accepts free-form questions about the world and outputs an answer based on its Wikipedia knowledge.|\n| **Embeddings** |  |\n| [Pre-trained embeddings for the Russian language](pretrained-vectors.md) | Word vectors for the Russian language trained on joint [Russian Wikipedia](https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0) and [Lenta.ru](https://lenta.ru/) corpora. |\n\n# Basic examples\n\nView video demo of deployment of a goal-oriented bot and a slot-filling model with Telegram UI\n\n[![Alt text for your video](https://img.youtube.com/vi/yzoiCa_sMuY/0.jpg)](https://youtu.be/yzoiCa_sMuY)\n          \n * Run goal-oriented bot with Telegram interface:\n ```\n python -m deeppavlov.deep interactbot deeppavlov/configs/go_bot/gobot_dstc2.json -d -t <TELEGRAM_TOKEN>\n ```\n * Run goal-oriented bot with console interface:\n ```\n python -m deeppavlov.deep interact deeppavlov/configs/go_bot/gobot_dstc2.json -d\n ```\n  * Run goal-oriented bot with REST API:\n ```\n python -m deeppavlov.deep riseapi deeppavlov/configs/go_bot/gobot_dstc2.json -d\n ``` \n  * Run slot-filling model with Telegram interface:\n ```\n python -m deeppavlov.deep interactbot deeppavlov/configs/ner/slotfill_dstc2.json -d -t <TELEGRAM_TOKEN>\n ```\n * Run slot-filling model with console interface:\n ```\n python -m deeppavlov.deep interact deeppavlov/configs/ner/slotfill_dstc2.json -d\n ```\n * Run slot-filling model with REST API:\n ```\n python -m deeppavlov.deep riseapi deeppavlov/configs/ner/slotfill_dstc2.json -d\n ```\n * Predict intents on every line in a file:\n ```\n python -m deeppavlov.deep predict deeppavlov/configs/intents/intents_snips.json -d --batch-size 15 < /data/in.txt > /data/out.txt\n ```\n\n---\n\n# Technical overview\n\n## Project modules\n\n<table>\n<tr>\n    <td><b> deeppavlov.core.commands <\/b><\/td>\n    <td> basic training and inference functions  <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.core.common <\/b><\/td>\n    <td> registration and classes initialization functionality, class method decorators <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.core.data <\/b><\/td>\n    <td> basic <b><i>DatasetIterator<\/i><\/b>, <b><i>DatasetReader<\/i><\/b> and <b><i>Vocab<\/i><\/b> classes <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.core.layers <\/b><\/td>\n    <td> collection of commonly used <b><i>Layers<\/i><\/b> for TF models <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.core.models <\/b><\/td>\n    <td> abstract model classes and interfaces <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.dataset_readers <\/b><\/td>\n    <td> concrete <b><i>DatasetReader<\/i><\/b> classes <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.dataset_iterators <\/b><\/td>\n    <td> concrete <b><i>DatasetIterators<\/i><\/b> classes <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.metrics <\/b><\/td>\n    <td> different <b><i>Metric<\/i><\/b> functions <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.models <\/b><\/td>\n    <td> concrete <b><i>Model<\/i><\/b> classes <\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.skills <\/b><\/td>\n    <td> <b><i>Skill<\/i><\/b> classes. Skills are dialog models.<\/td>\n<\/tr>\n<tr>\n    <td><b> deeppavlov.vocabs <\/b><\/td>\n    <td> concrete <b><i>Vocab<\/i><\/b> classes <\/td>\n<\/tr>\n<\/table>\n\n## Config\n\nAn NLP pipeline config is a JSON file that contains one required element `chainer`:\n\n```\n{\n  \"chainer\": {\n    \"in\": [\"x\"],\n    \"in_y\": [\"y\"],\n    \"pipe\": [\n      ...\n    ],\n    \"out\": [\"y_predicted\"]\n  }\n}\n```\n\nChainer is a core concept of DeepPavlov library: chainer builds a pipeline from heterogeneous components\n(rule-based/ml/dl) and allows to train or infer from pipeline as a whole. Each component in the pipeline specifies\nits inputs and outputs as arrays of names, for example: `\"in\": [\"tokens\", \"features\"]` and `\"out\": [\"token_embeddings\", \"features_embeddings\"]` and you can chain outputs of one components with inputs of other components:\n```json\n{\n  \"class\": \"deeppavlov.models.preproccessors.str_lower:StrLower\",\n  \"in\": [\"x\"],\n  \"out\": [\"x_lower\"]\n},\n{\n  \"name\": \"nltk_tokenizer\",\n  \"in\": [\"x_lower\"],\n  \"out\": [\"x_tokens\"]\n},\n```\nEach [Component](deeppavlov/core/models/component.py) in the pipeline must implement method `__call__` and has `name` parameter, which is its registered codename,\n or `class` parameter in the form of `module_name:ClassName`.\nIt can also have any other parameters which repeat its `__init__()` method arguments.\nDefault values of `__init__()` arguments will be overridden with the config values during the initialization of a class instance.\n \nYou can reuse components in the pipeline to process different parts of data with the help of `id` and `ref` parameters:\n```json\n{\n  \"name\": \"nltk_tokenizer\",\n  \"id\": \"tokenizer\",\n  \"in\": [\"x_lower\"],\n  \"out\": [\"x_tokens\"]\n},\n{\n  \"ref\": \"tokenizer\",\n  \"in\": [\"y\"],\n  \"out\": [\"y_tokens\"]\n},\n```\n\n## Training\n\nThere are two abstract classes for trainable components: **Estimator** and **NNModel**.  \n[**Estimators**](deeppavlov/core/models/estimator.py) are fit once on any data with no batching or early stopping,\nso it can be safely done at the time of pipeline initialization. `fit` method has to be implemented for each Estimator. An example of Estimator is [Vocab](deeppavlov/core/data/vocab.py).\n[**NNModel**](deeppavlov/core/models/nn_model.py) requires more complex training. It can only be trained in a supervised mode (as opposed to **Estimator** which can be trained in both supervised and unsupervised settings). This process takes multiple epochs with periodic validation and logging.\n`train_on_batch` method has to be implemented for each NNModel.\n\nTraining is triggered by `deeppavlov.core.commands.train.train_model_from_config()` function.\n\n## Train config\n\nEstimators that are trained should also have `fit_on` parameter which contains a list of input parameter names.\nAn NNModel should have the `in_y` parameter which contains a list of ground truth answer names. For example:\n\n```json\n[\n  {\n    \"id\": \"classes_vocab\",\n    \"name\": \"default_vocab\",\n    \"fit_on\": [\"y\"],\n    \"level\": \"token\",\n    \"save_path\": \"vocabs/classes.dict\",\n    \"load_path\": \"vocabs/classes.dict\"\n  },\n  {\n    \"in\": [\"x\"],\n    \"in_y\": [\"y\"],\n    \"out\": [\"y_predicted\"],\n    \"name\": \"intent_model\",\n    \"save_path\": \"intents/intent_cnn\",\n    \"load_path\": \"intents/intent_cnn\",\n    \"classes_vocab\": {\n      \"ref\": \"classes_vocab\"\n    }\n  }\n]\n```\n\nThe config for training the pipeline should have three additional elements: `dataset_reader`, `dataset_iterator` and `train`:\n\n```\n{\n  \"dataset_reader\": {\n    \"name\": ...,\n    ...\n  }\n  \"dataset_iterator\": {\n    \"name\": ...,\n    ...\n  },\n  \"chainer\": {\n    ...\n  }\n  \"train\": {\n    ...\n  }\n}\n```\n\nSimplified version of trainig pipeline contains two elemens: `dataset` and `train`. The `dataset` element currently \ncan be used for train from classification data in `csv` and `json` formats. You can find complete examples of how to use simplified training pipeline in [intents_sample_csv.json](deeppavlov/configs/intents/intents_sample_csv.json) and [intents_sample_json.json](deeppavlov/configs/intents/intents_sample_json.json) config files.\n\n\n## Train Parameters\n* `epochs` — maximum number of epochs to train NNModel, defaults to `-1` (infinite)\n* `batch_size`,\n* `metrics` — list of names of [registered metrics](deeppavlov/metrics) to evaluate the model. The first metric in the list\nis used for early stopping\n* `metric_optimization` — `maximize` or `minimize` a metric, defaults to `maximize`\n* `validation_patience` — how many times in a row the validation metric has to not improve for early stopping, defaults to `5`\n* `val_every_n_epochs` — how often to validate the pipe, defaults to `-1` (never)\n* `log_every_n_batches`, `log_every_n_epochs` — how often to calculate metrics for train data, defaults to `-1` (never)\n* `validate_best`, `test_best` flags to infer the best saved model on valid and test data, defaults to `true`\n\n## DatasetReader\n\n`DatasetReader` class reads data and returns it in a specified format.\nA concrete `DatasetReader` class should be inherited from the base\n`deeppavlov.data.dataset_reader.DatasetReader` class and registered with a codename:\n\n```python\nfrom deeppavlov.core.common.registry import register\nfrom deeppavlov.core.data.dataset_reader import DatasetReader\n\n@register('dstc2_datasetreader')\nclass DSTC2DatasetReader(DatasetReader):\n```\n\n## DatasetIterator\n\n`DatasetIterator` forms the sets of data ('train', 'valid', 'test') needed for training/inference and divides it into batches.\nA concrete `DatasetIterator` class should be registered and can be inherited from\n`deeppavlov.data.dataset_iterator.BasicDatasetIterator` class. `deeppavlov.data.dataset_iterator.BasicDatasetIterator`\nis not an abstract class and can be used as a `DatasetIterator` as well.\n\n## Inference\n\nAll components inherited from `deeppavlov.core.models.component.Component` abstract class can be used for inference. The `__call__()` method should return standard output of a component. For example, a *tokenizer* should return\n*tokens*, a *NER recognizer* should return *recognized entities*, a *bot* should return an *utterance*.\nA particular format of returned data should be defined in `__call__()`.\n\nInference is triggered by `deeppavlov.core.commands.infer.interact_model()` function. There is no need in a separate JSON for inference. \n\n## Rest API\n\nEach library component or skill can be easily made available for inference as a REST web service. The general method is:\n\n`python -m deeppavlov.deep riseapi <config_path> [-d]`\n\n(optional `-d` key is for dependencies download before service start)\n\nWeb service properties (host, port, model endpoint, GET request arguments) are provided in `utils/server_utils/server_config.json`.\nProperties from `common_defaults` section are used by default unless they are overridden by component-specific properties, provided in `model_defaults` section of the `server_config.json`.\nComponent-specific properties are bound to the component by `server_utils` label in `metadata/labels` section of the component config. Value of `server_utils` label from component config should match with properties key from `model_defaults` section of `server_config.json`.\n\nFor example, `metadata/labels/server_utils` tag from `go_bot/gobot_dstc2.json` references to the *GoalOrientedBot* section of `server_config.json`. Therefore, `model_endpoint` parameter in `common_defaults` will be will be overridden with the same parameter from `model_defaults/GoalOrientedBot`.\n\nModel argument names are provided as list in `model_args_names` parameter, where arguments order corresponds to component API.\nWhen inferencing model via REST api, JSON payload keys should match component arguments names from `model_args_names`.\nDefault argument name for one argument components is *\"context\"*. \nHere are POST requests examples for some of the library components:\n\n| Component | POST request JSON payload example |\n| --------- | -------------------- |\n| **One argument components**      |\n| NER component | {\"context\":\"Elon Musk launched his cherry Tesla roadster to the Mars orbit\"} |\n| Intent classification component | {\"context\":\"I would like to go to a restaurant with Asian cuisine this evening\"} |\n| Automatic spelling correction component | {\"context\":\"errror\"} |\n| Ranking component | {\"context\":\"What is the average cost of life insurance services?\"} |\n| (Seq2seq) Goal-oriented bot | {\"context\":\"Hello, can you help me to find and book a restaurant this evening?\"} |\n| **Two arguments components**     |\n| Question Answering component | {\"context\":\"After 1765, growing philosophical and political differences strained the relationship between Great Britain and its colonies.\", \"question\":\"What strained the relationship between Great Britain and its colonies?\"} |\n\nFlasgger UI for API testing is provided on `<host>:<port>/apidocs` when running a component in `riseapi` mode.\n\n# License\n\nDeepPavlov is Apache 2.0 - licensed.\n\n# Support and collaboration\n\nIf you have any questions, bug reports or feature requests, please feel free to post on our [Github Issues](https://github.com/deepmipt/DeepPavlov/issues) page. Please tag your issue with `bug`, `feature request`, or `question`.  Also we’ll be glad to see your pull requests to add new datasets, models, embeddings, etc.\n\n# The Team\n\nDeepPavlov is built and maintained by [Neural Networks and Deep Learning Lab](https://mipt.ru/english/research/labs/neural-networks-and-deep-learning-lab) at [MIPT](https://mipt.ru/english/) within [iPavlov](http://ipavlov.ai/) project (part of [National Technology Initiative](https://asi.ru/eng/nti/)) and in partnership with [Sberbank](http://www.sberbank.com/).\n\n<p align=\"center\">\n<img src=\"https://ipavlov.ai/img/ipavlov_footer.png\" width=\"50%\" height=\"50%\"/>\n<\/p>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"800E:17E138:173B53:5C4D2C:6AB92052"},"text_sha256":"1fb12c4e121e7eb6d468079a8fb62d1c701d69157f12515eda4f2edcb8bae893"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3551","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:17F037D:1C0DB38:6AB927E7"},"commit":{"sha":"5f9fbed0c7191466bc7621e604b810f66f254c03","url":"https://github.com/deeppavlov/DeepPavlov/commit/5f9fbed0c7191466bc7621e604b810f66f254c03","date":"2024-11-26T06:34:41Z","author_date":"2024-11-26T06:34:41Z","committer_date":"2024-11-26T06:34:41Z","tree_sha":"249ec5bc0077522bcc865fca1032883da2890a01","message_first_line":"docs: add citation information to README"},"tree_request_status":200,"tree_rate":{"github_remaining":"3550","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0879:2BC4E5:1800D39:1C1E5E7:6AB927E7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8044,"blob_sha":"670e9b402bd8d89ad566353a8e4e60e918b2bc50","priority":0}],"documents":[{"path":"README.md","size":8044,"blob_sha":"670e9b402bd8d89ad566353a8e4e60e918b2bc50","priority":0,"status":200,"text":"# DeepPavlov 1.0\n\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n![Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-green.svg)\n[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)\n[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Community-blue)](https://forum.deeppavlov.ai/)\n[![Static Badge](https://img.shields.io/badge/DeepPavlov%20Demo-blue)](https://demo.deeppavlov.ai/)\n\n\nDeepPavlov 1.0 is an open-source NLP framework built on [PyTorch](https://pytorch.org/) and [transformers](https://github.com/huggingface/transformers). DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML.\n\n## Quick Links\n\n|name|Description|\n|--|--|\n| ⭐️ [*Demo*](https://demo.deeppavlov.ai/)|Check out our NLP models in the online demo|\n| 📚 [*Documentation*](http://docs.deeppavlov.ai/)|How to use DeepPavlov 1.0 and its features|\n| 🚀 [*Model List*](http://docs.deeppavlov.ai/en/master/features/overview.html)|Find the NLP model you need in the list of available models|\n| 🪐 [*Contribution Guide*](http://docs.deeppavlov.ai/en/master/devguides/contribution_guide.html)|Please read the contribution guidelines before making a contribution|\n| 🎛 [*Issues*](https://github.com/deeppavlov/DeepPavlov/issues)|If you have an issue with DeepPavlov, please let us know|\n| ⏩ [*Forum*](https://forum.deeppavlov.ai/)|Please let us know if you have a problem with DeepPavlov|\n| 📦 [*Blogs*](https://medium.com/deeppavlov)|Read about our current development|\n| 🦙 [Extended colab tutorials](https://github.com/deeppavlov/dp_tutorials)|Check out the code tutorials for our models|\n| 🌌 [*Docker Hub*](https://hub.docker.com/u/deeppavlov/)|Check out the Docker images for rapid deployment|\n| 👩‍🏫 [*Feedback*](https://forms.gle/i64fowQmiVhMMC7f9)|Please leave us your feedback to make DeepPavlov better|\n\n\n## Installation\n\n0. DeepPavlov supports `Linux`, `Windows 10+` (through WSL/WSL2), `MacOS` (Big Sur+) platforms, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`.\n    Depending on the model used, you may need from 4 to 16 GB RAM.\n\n1. Create and activate a virtual environment:\n    * `Linux`\n\n    ```\n    python -m venv env\n    source ./env/bin/activate\n    ```\n\n2. Install the package inside the environment:\n\n    ```\n    pip install deeppavlov\n    ```\n\n## QuickStart\n\nThere is a bunch of great pre-trained NLP models in DeepPavlov. Each model is\ndetermined by its config file.\n\nList of models is available on\n[the doc page](http://docs.deeppavlov.ai/en/master/features/overview.html) in\nthe `deeppavlov.configs` (Python):\n\n```python\nfrom deeppavlov import configs\n```\n\nWhen you're decided on the model (+ config file), there are two ways to train,\nevaluate and infer it:\n\n* via [Command line interface (CLI)](#command-line-interface-cli) and\n* via [Python](#python).\n\n#### GPU requirements\n\nBy default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA\ncapability. To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit)\ncompatible with used GPU and [PyTorch version](deeppavlov/requirements/pytorch.txt) required by DeepPavlov models.\nSee [docs](https://docs.deeppavlov.ai/en/master/intro/quick_start.html#using-gpu) for details.\nGPU with Pascal or newer architecture and 4+ GB VRAM is recommended.\n\n### Command line interface (CLI)\n\nTo get predictions from a model interactively through CLI, run\n\n```bash\npython -m deeppavlov interact <config_path> [-d] [-i]\n```\n\n* `-d` downloads required data - pretrained model files and embeddings (optional).\n* `-i` installs model requirements (optional).\n\nYou can train it in the same simple way:\n\n```bash\npython -m deeppavlov train <config_path> [-d] [-i]\n```\n\nDataset will be downloaded regardless of whether there was `-d` flag or not.\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page.\n\nThere are even more actions you can perform with configs:\n\n```bash\npython -m deeppavlov <action> <config_path> [-d] [-i]\n```\n\n* `<action>` can be\n  * `install` to install model requirements (same as `-i`),\n  * `download` to download model's data (same as `-d`),\n  * `train` to train the model on the data specified in the config file,\n  * `evaluate` to calculate metrics on the same dataset,\n  * `interact` to interact via CLI,\n  * `riseapi` to run a REST API server (see\n    [doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),\n  * `predict` to get prediction for samples from *stdin* or from\n      *<file_path>* if `-f <file_path>` is specified.\n* `<config_path>` specifies path (or name) of model's config file\n* `-d` downloads required data\n* `-i` installs model requirements\n\n### Python\n\nTo get predictions from a model interactively through Python, run\n\n```python\nfrom deeppavlov import build_model\n\nmodel = build_model(<config_path>, install=True, download=True)\n\n# get predictions for 'input_text1', 'input_text2'\nmodel(['input_text1', 'input_text2'])\n```\n\nwhere\n\n* `install=True` installs model requirements (optional),\n* `download=True` downloads required data from web - pretrained model files and embeddings (optional),\n* `<config_path>` is model name (e.g. `'ner_ontonotes_bert_mult'`), path to the chosen model's config file (e.g.\n  `\"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json\"`),  or `deeppavlov.configs` attribute (e.g.\n  `deeppavlov.configs.ner.ner_ontonotes_bert_mult` without quotation marks).\n\nYou can train it in the same simple way:\n\n```python\nfrom deeppavlov import train_model \n\nmodel = train_model(<config_path>, install=True, download=True)\n```\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page.\n\nYou can also calculate metrics on the dataset specified in your config file:\n\n```python\nfrom deeppavlov import evaluate_model \n\nmodel = evaluate_model(<config_path>, install=True, download=True)\n```\n\nDeepPavlov also [allows](https://docs.deeppavlov.ai/en/master/intro/python.html) to build a model from components for\ninference using Python.\n\n## License\n\nDeepPavlov is Apache 2.0 - licensed.\n\n## Citation\n```\n@inproceedings{savkin-etal-2024-deeppavlov,\n    title = \"DeepPavlov 1.0: Your Gateway to Advanced NLP Models Backed by Transformers and Transfer Learning\",\n    author = \"Savkin Maksim and Voznyuk Anastasia and Ignatov Fedor and Korzanova Anna and Karpov Dmitry and Popov Alexander and Konovalov Vasily\"\n    editor = \"Hernandez Farias and Delia Irazu and Hope Tom and Li Manling\",\n    booktitle = \"Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: System Demonstrations\",\n    month = nov,\n    year = \"2024\",\n    address = \"Miami, Florida, USA\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/2024.emnlp-demo.47\",\n    pages = \"465--474\",\n    abstract = \"We present DeepPavlov 1.0, an open-source framework for using Natural Language Processing (NLP) models by leveraging transfer learning techniques. DeepPavlov 1.0 is created for modular and configuration-driven development of state-of-the-art NLP models and supports a wide range of NLP model applications. DeepPavlov 1.0 is designed for practitioners with limited knowledge of NLP/ML. DeepPavlov is based on PyTorch and supports HuggingFace transformers. DeepPavlov is publicly released under the Apache 2.0 license and provides access to an online demo.\",\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E220:2E8679:17574F:5C6741:6AB92054"},"text_sha256":"0143a4e5b1b295d9fe2cedc11323355e9cc5291f19967bd749e0bc36e856dc45"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"guofei9987/scikit-opt","input_row":{"repository":"guofei9987/scikit-opt","url":"https://github.com/guofei9987/scikit-opt","name":"scikit-opt","owner":"guofei9987","description":"Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman) ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6718,"issues":183,"created_at":"2017-12-05T10:20:41Z","updated_at":"2026-09-24T11:11:41Z","first_commit_at":"2017-12-06T06:36:04Z","last_commit_at":"2026-03-25T09:12:06Z","activity_months":99.579999999999998,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:52.823Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"guofei9987/scikit-opt","visibility":"public","created_at":"2017-12-05T10:20:41Z","updated_at":"2026-09-24T11:11:41Z","private":false,"fork":false,"archived":false,"stargazers_count":6718,"open_issues_count":72,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3549","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:17E2A66:1C00A23:6AB927E8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3548","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:17EE592:1C0C2C3:6AB927E9"},"commit":{"sha":"07e92f2942397053254eceab6ac2cf59d3d864f4","url":"https://github.com/guofei9987/scikit-opt/commit/07e92f2942397053254eceab6ac2cf59d3d864f4","date":"2018-01-21T11:00:40Z","author_date":"2018-01-21T11:00:40Z","committer_date":"2018-01-21T11:00:40Z","tree_sha":"238564f1f5508bb17cc7094cfdf2ec4f7bfb2843","message_first_line":"DeletePyCache"},"tree_request_status":200,"tree_rate":{"github_remaining":"3547","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:17711C4:1B8D864:6AB927E9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":756,"blob_sha":"4691b0a4c193e25a7feec692e62e58df96a2a72c","priority":0}],"documents":[{"path":"README.md","size":756,"blob_sha":"4691b0a4c193e25a7feec692e62e58df96a2a72c","priority":0,"status":200,"text":"Genetic Algorithm, PSO in Python\n\n\n\n## Genetic Algorithm\n```py\ndef demo_func2(p):\n    x, y, z = p\n    return -(x ** 2 + y ** 2 + z ** 2)\n```\n\n```py\ngeneral_best,func_general_best,FitV_history=ga.ga(func=demo_func2,  lb=[-1, -10, -5], ub=[2, 10, 2])\nprint('best_x:',general_best)\nprint('best_y:',func_general_best)\n\nga.plot_FitV(FitV_history)\n```\n\n![Figure_1-1](https://i.imgur.com/yT7lm8a.png)\n\n\n## PSO\n\n\n```py\ndef demo_func2(p):\n    # Sphere函数\n    out_put = 0\n    for i in p:\n        out_put += i ** 2\n    return out_put\n```\n\n```py\nfrom pso import PSO\nmy_pso = PSO(func=demo_func2, pop=30, dim=5, max_iter=100)\nfitness = my_pso.fit()\nprint(my_pso.gbest_x)\nprint(my_pso.gbest_y)\nmy_pso.plot_history()\n```\n![Figure_1-1](https://i.imgur.com/4C9Yjv7.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1E22:3B6DE:16E19B:5BF34D:6AB92057"},"text_sha256":"e61f12e7a5427373bc5817067463b57ae705f4a510c52cf657b528a6e60e8983"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3546","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:17C9063:1BE6B8C:6AB927EA"},"commit":{"sha":"57d78324e72cd847750e0f4b1f65fdebc24fb524","url":"https://github.com/guofei9987/scikit-opt/commit/57d78324e72cd847750e0f4b1f65fdebc24fb524","date":"2026-03-25T09:12:06Z","author_date":"2026-03-25T09:12:06Z","committer_date":"2026-03-25T09:12:06Z","tree_sha":"7635f3c0aeb91e7187d43e548d19f4df8eb6b2c4","message_first_line":"prepare for new version"},"tree_request_status":200,"tree_rate":{"github_remaining":"3545","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0928:71C58:17971AD:1BB4F9B:6AB927EA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20468,"blob_sha":"bac5419bcec3383e2a17ea37ecbe307af09e3ee8","priority":0}],"documents":[{"path":"README.md","size":20468,"blob_sha":"bac5419bcec3383e2a17ea37ecbe307af09e3ee8","priority":0,"status":200,"text":"\n# [scikit-opt](https://github.com/guofei9987/scikit-opt)\n\n[![PyPI](https://img.shields.io/pypi/v/scikit-opt)](https://pypi.org/project/scikit-opt/)\n[![Build Status](https://travis-ci.com/guofei9987/scikit-opt.svg?branch=master)](https://travis-ci.com/guofei9987/scikit-opt)\n[![codecov](https://codecov.io/gh/guofei9987/scikit-opt/branch/master/graph/badge.svg)](https://codecov.io/gh/guofei9987/scikit-opt)\n[![License](https://img.shields.io/pypi/l/scikit-opt.svg)](https://github.com/guofei9987/scikit-opt/blob/master/LICENSE)\n![Python](https://img.shields.io/badge/python->=3.5-green.svg)\n![Platform](https://img.shields.io/badge/platform-windows%20|%20linux%20|%20macos-green.svg)\n[![fork](https://img.shields.io/github/forks/guofei9987/scikit-opt?style=social)](https://github.com/guofei9987/scikit-opt/fork)\n[![Downloads](https://pepy.tech/badge/scikit-opt)](https://pepy.tech/project/scikit-opt)\n[![Discussions](https://img.shields.io/badge/discussions-green.svg)](https://github.com/guofei9987/scikit-opt/discussions)\n<a href=\"https://hellogithub.com/repository/guofei9987/scikit-opt\" target=\"_blank\"><img src=\"https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=6763d615842e4449a02f024f3e2e345c&claim_uid=se0WHo8cbiLv2w1&theme=small\" alt=\"Featured｜HelloGitHub\" /><\/a>\n\n\nSwarm Intelligence in Python  \n(Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm, Artificial Fish Swarm Algorithm in Python)\n\n\n- **Documentation:** [https://scikit-opt.github.io/scikit-opt/#/en/](https://scikit-opt.github.io/scikit-opt/#/en/)\n- **文档：** [https://scikit-opt.github.io/scikit-opt/#/zh/](https://scikit-opt.github.io/scikit-opt/#/zh/)  \n- **Source code:** [https://github.com/guofei9987/scikit-opt](https://github.com/guofei9987/scikit-opt)\n- **Help us improve scikit-opt** [https://www.wjx.cn/jq/50964691.aspx](https://www.wjx.cn/jq/50964691.aspx)\n\n# install\n```bash\npip install scikit-opt\n```\n\nFor the current developer version:\n```bach\ngit clone git@github.com:guofei9987/scikit-opt.git\ncd scikit-opt\npip install .\n```\n\n# Features\n## Feature1: UDF\n\n**UDF** (user defined function) is available now!\n\nFor example, you just worked out a new type of `selection` function.  \nNow, your `selection` function is like this:  \n-> Demo code: [examples/demo_ga_udf.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L1)\n```python\n# step1: define your own operator:\ndef selection_tournament(algorithm, tourn_size):\n    FitV = algorithm.FitV\n    sel_index = []\n    for i in range(algorithm.size_pop):\n        aspirants_index = np.random.choice(range(algorithm.size_pop), size=tourn_size)\n        sel_index.append(max(aspirants_index, key=lambda i: FitV[i]))\n    algorithm.Chrom = algorithm.Chrom[sel_index, :]  # next generation\n    return algorithm.Chrom\n\n\n```\n\nImport and build ga  \n-> Demo code: [examples/demo_ga_udf.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L12)\n```python\nimport numpy as np\nfrom sko.GA import GA, GA_TSP\n\ndemo_func = lambda x: x[0] ** 2 + (x[1] - 0.05) ** 2 + (x[2] - 0.5) ** 2\nga = GA(func=demo_func, n_dim=3, size_pop=100, max_iter=500, prob_mut=0.001,\n        lb=[-1, -10, -5], ub=[2, 10, 2], precision=[1e-7, 1e-7, 1])\n\n```\nRegist your udf to GA  \n-> Demo code: [examples/demo_ga_udf.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L20)\n```python\nga.register(operator_name='selection', operator=selection_tournament, tourn_size=3)\n```\n\nscikit-opt also provide some operators  \n-> Demo code: [examples/demo_ga_udf.py#s4](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L22)\n```python\nfrom sko.operators import ranking, selection, crossover, mutation\n\nga.register(operator_name='ranking', operator=ranking.ranking). \\\n    register(operator_name='crossover', operator=crossover.crossover_2point). \\\n    register(operator_name='mutation', operator=mutation.mutation)\n```\nNow do GA as usual  \n-> Demo code: [examples/demo_ga_udf.py#s5](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L28)\n```python\nbest_x, best_y = ga.run()\nprint('best_x:', best_x, '\\n', 'best_y:', best_y)\n```\n\n> Until Now, the **udf** surport `crossover`, `mutation`, `selection`, `ranking` of GA\n> scikit-opt provide a dozen of operators, see [here](https://github.com/guofei9987/scikit-opt/tree/master/sko/operators)\n\nFor advanced users:\n\n-> Demo code: [examples/demo_ga_udf.py#s6](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_udf.py#L31)\n```python\nclass MyGA(GA):\n    def selection(self, tourn_size=3):\n        FitV = self.FitV\n        sel_index = []\n        for i in range(self.size_pop):\n            aspirants_index = np.random.choice(range(self.size_pop), size=tourn_size)\n            sel_index.append(max(aspirants_index, key=lambda i: FitV[i]))\n        self.Chrom = self.Chrom[sel_index, :]  # next generation\n        return self.Chrom\n\n    ranking = ranking.ranking\n\n\ndemo_func = lambda x: x[0] ** 2 + (x[1] - 0.05) ** 2 + (x[2] - 0.5) ** 2\nmy_ga = MyGA(func=demo_func, n_dim=3, size_pop=100, max_iter=500, lb=[-1, -10, -5], ub=[2, 10, 2],\n             precision=[1e-7, 1e-7, 1])\nbest_x, best_y = my_ga.run()\nprint('best_x:', best_x, '\\n', 'best_y:', best_y)\n```\n\n##  feature2: continue to run\n(New in version 0.3.6)  \nRun an algorithm for 10 iterations, and then run another 20 iterations base on the 10 iterations before:\n```python\nfrom sko.GA import GA\n\nfunc = lambda x: x[0] ** 2\nga = GA(func=func, n_dim=1)\nga.run(10)\nga.run(20)\n```\n\n## feature3: 4-ways to accelerate\n- vectorization\n- multithreading\n- multiprocessing\n- cached\n\nsee [https://github.com/guofei9987/scikit-opt/blob/master/examples/example_function_modes.py](https://github.com/guofei9987/scikit-opt/blob/master/examples/example_function_modes.py)\n\n\n\n## feature4: GPU computation\n We are developing GPU computation, which will be stable on version 1.0.0  \nAn example is already available: [https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_gpu.py](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_gpu.py)\n\n\n# Quick start\n\n## 1. Differential Evolution\n**Step1**：define your problem  \n-> Demo code: [examples/demo_de.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_de.py#L1)\n```python\n'''\nmin f(x1, x2, x3) = x1^2 + x2^2 + x3^2\ns.t.\n    x1*x2 >= 1\n    x1*x2 <= 5\n    x2 + x3 = 1\n    0 <= x1, x2, x3 <= 5\n'''\n\n\ndef obj_func(p):\n    x1, x2, x3 = p\n    return x1 ** 2 + x2 ** 2 + x3 ** 2\n\n\nconstraint_eq = [\n    lambda x: 1 - x[1] - x[2]\n]\n\nconstraint_ueq = [\n    lambda x: 1 - x[0] * x[1],\n    lambda x: x[0] * x[1] - 5\n]\n\n```\n\n**Step2**: do Differential Evolution  \n-> Demo code: [examples/demo_de.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_de.py#L25)\n```python\nfrom sko.DE import DE\n\nde = DE(func=obj_func, n_dim=3, size_pop=50, max_iter=800, lb=[0, 0, 0], ub=[5, 5, 5],\n        constraint_eq=constraint_eq, constraint_ueq=constraint_ueq)\n\nbest_x, best_y = de.run()\nprint('best_x:', best_x, '\\n', 'best_y:', best_y)\n\n```\n\n## 2. Genetic Algorithm\n\n**Step1**：define your problem  \n-> Demo code: [examples/demo_ga.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga.py#L1)\n```python\nimport numpy as np\n\n\ndef schaffer(p):\n    '''\n    This function has plenty of local minimum, with strong shocks\n    global minimum at (0,0) with value 0\n    https://en.wikipedia.org/wiki/Test_functions_for_optimization\n    '''\n    x1, x2 = p\n    part1 = np.square(x1) - np.square(x2)\n    part2 = np.square(x1) + np.square(x2)\n    return 0.5 + (np.square(np.sin(part1)) - 0.5) / np.square(1 + 0.001 * part2)\n\n\n```\n\n**Step2**: do Genetic Algorithm  \n-> Demo code: [examples/demo_ga.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga.py#L16)\n```python\nfrom sko.GA import GA\n\nga = GA(func=schaffer, n_dim=2, size_pop=50, max_iter=800, prob_mut=0.001, lb=[-1, -1], ub=[1, 1], precision=1e-7)\nbest_x, best_y = ga.run()\nprint('best_x:', best_x, '\\n', 'best_y:', best_y)\n```\n\n-> Demo code: [examples/demo_ga.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga.py#L22)\n```python\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nY_history = pd.DataFrame(ga.all_history_Y)\nfig, ax = plt.subplots(2, 1)\nax[0].plot(Y_history.index, Y_history.values, '.', color='red')\nY_history.min(axis=1).cummin().plot(kind='line')\nplt.show()\n```\n\n![Figure_1-1](https://img1.github.io/heuristic_algorithm/ga_1.png)\n\n### 2.2 Genetic Algorithm for TSP(Travelling Salesman Problem)\nJust import the `GA_TSP`, it overloads the `crossover`, `mutation` to solve the TSP\n\n**Step1**: define your problem. Prepare your points coordinate and the distance matrix.  \nHere I generate the data randomly as a demo:  \n-> Demo code: [examples/demo_ga_tsp.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_tsp.py#L1)\n```python\nimport numpy as np\nfrom scipy import spatial\nimport matplotlib.pyplot as plt\n\nnum_points = 50\n\npoints_coordinate = np.random.rand(num_points, 2)  # generate coordinate of points\ndistance_matrix = spatial.distance.cdist(points_coordinate, points_coordinate, metric='euclidean')\n\n\ndef cal_total_distance(routine):\n    '''The objective function. input routine, return total distance.\n    cal_total_distance(np.arange(num_points))\n    '''\n    num_points, = routine.shape\n    return sum([distance_matrix[routine[i % num_points], routine[(i + 1) % num_points]] for i in range(num_points)])\n\n\n```\n\n**Step2**: do GA  \n-> Demo code: [examples/demo_ga_tsp.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_tsp.py#L19)\n```python\n\nfrom sko.GA import GA_TSP\n\nga_tsp = GA_TSP(func=cal_total_distance, n_dim=num_points, size_pop=50, max_iter=500, prob_mut=1)\nbest_points, best_distance = ga_tsp.run()\n\n```\n\n**Step3**: Plot the result:  \n-> Demo code: [examples/demo_ga_tsp.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ga_tsp.py#L26)\n```python\nfig, ax = plt.subplots(1, 2)\nbest_points_ = np.concatenate([best_points, [best_points[0]]])\nbest_points_coordinate = points_coordinate[best_points_, :]\nax[0].plot(best_points_coordinate[:, 0], best_points_coordinate[:, 1], 'o-r')\nax[1].plot(ga_tsp.generation_best_Y)\nplt.show()\n```\n\n![GA_TPS](https://img1.github.io/heuristic_algorithm/ga_tsp.png)\n\n\n## 3. PSO(Particle swarm optimization)\n\n### 3.1 PSO\n**Step1**: define your problem:  \n-> Demo code: [examples/demo_pso.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_pso.py#L1)\n```python\ndef demo_func(x):\n    x1, x2, x3 = x\n    return x1 ** 2 + (x2 - 0.05) ** 2 + x3 ** 2\n\n\n```\n\n**Step2**: do PSO  \n-> Demo code: [examples/demo_pso.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_pso.py#L6)\n```python\nfrom sko.PSO import PSO\n\npso = PSO(func=demo_func, n_dim=3, pop=40, max_iter=150, lb=[0, -1, 0.5], ub=[1, 1, 1], w=0.8, c1=0.5, c2=0.5)\npso.run()\nprint('best_x is ', pso.gbest_x, 'best_y is', pso.gbest_y)\n\n```\n\n**Step3**: Plot the result  \n-> Demo code: [examples/demo_pso.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_pso.py#L13)\n```python\nimport matplotlib.pyplot as plt\n\nplt.plot(pso.gbest_y_hist)\nplt.show()\n```\n\n\n![PSO_TPS](https://img1.github.io/heuristic_algorithm/pso.png)\n\n### 3.2 PSO with nonlinear constraint\n\nIf you need nolinear constraint like `(x[0] - 1) ** 2 + (x[1] - 0) ** 2 - 0.5 ** 2<=0`  \nCodes are like this:\n```python\nconstraint_ueq = (\n    lambda x: (x[0] - 1) ** 2 + (x[1] - 0) ** 2 - 0.5 ** 2\n    ,\n)\npso = PSO(func=demo_func, n_dim=2, pop=40, max_iter=max_iter, lb=[-2, -2], ub=[2, 2]\n          , constraint_ueq=constraint_ueq)\n```\n\nNote that, you can add more then one nonlinear constraint. Just add it to `constraint_ueq`\n\nMore over, we have an animation:  \n![pso_ani](https://img1.github.io/heuristic_algorithm/pso.gif)  \n↑**see [examples/demo_pso_ani.py](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_pso_ani.py)**\n\n\n## 4. SA(Simulated Annealing)\n### 4.1 SA for multiple function\n**Step1**: define your problem  \n-> Demo code: [examples/demo_sa.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa.py#L1)\n```python\ndemo_func = lambda x: x[0] ** 2 + (x[1] - 0.05) ** 2 + x[2] ** 2\n\n```\n**Step2**: do SA  \n-> Demo code: [examples/demo_sa.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa.py#L3)\n```python\nfrom sko.SA import SA\n\nsa = SA(func=demo_func, x0=[1, 1, 1], T_max=1, T_min=1e-9, L=300, max_stay_counter=150)\nbest_x, best_y = sa.run()\nprint('best_x:', best_x, 'best_y', best_y)\n\n```\n\n**Step3**: Plot the result  \n-> Demo code: [examples/demo_sa.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa.py#L10)\n```python\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\nplt.plot(pd.DataFrame(sa.best_y_history).cummin(axis=0))\nplt.show()\n\n```\n![sa](https://img1.github.io/heuristic_algorithm/sa.png)\n\n\nMoreover, scikit-opt provide 3 types of Simulated Annealing: Fast, Boltzmann, Cauchy. See [more sa](https://scikit-opt.github.io/scikit-opt/#/en/more_sa)\n### 4.2 SA for TSP\n**Step1**: oh, yes, define your problems. To boring to copy this step.  \n\n**Step2**: DO SA for TSP  \n-> Demo code: [examples/demo_sa_tsp.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa_tsp.py#L21)\n```python\nfrom sko.SA import SA_TSP\n\nsa_tsp = SA_TSP(func=cal_total_distance, x0=range(num_points), T_max=100, T_min=1, L=10 * num_points)\n\nbest_points, best_distance = sa_tsp.run()\nprint(best_points, best_distance, cal_total_distance(best_points))\n```\n\n**Step3**: plot the result  \n-> Demo code: [examples/demo_sa_tsp.py#s3](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa_tsp.py#L28)\n```python\nfrom matplotlib.ticker import FormatStrFormatter\n\nfig, ax = plt.subplots(1, 2)\n\nbest_points_ = np.concatenate([best_points, [best_points[0]]])\nbest_points_coordinate = points_coordinate[best_points_, :]\nax[0].plot(sa_tsp.best_y_history)\nax[0].set_xlabel(\"Iteration\")\nax[0].set_ylabel(\"Distance\")\nax[1].plot(best_points_coordinate[:, 0], best_points_coordinate[:, 1],\n           marker='o', markerfacecolor='b', color='c', linestyle='-')\nax[1].xaxis.set_major_formatter(FormatStrFormatter('%.3f'))\nax[1].yaxis.set_major_formatter(FormatStrFormatter('%.3f'))\nax[1].set_xlabel(\"Longitude\")\nax[1].set_ylabel(\"Latitude\")\nplt.show()\n\n```\n![sa](https://img1.github.io/heuristic_algorithm/sa_tsp.png)\n\n\nMore: Plot the animation:  \n\n![sa](https://img1.github.io/heuristic_algorithm/sa_tsp1.gif)  \n↑**see [examples/demo_sa_tsp.py](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_sa_tsp.py)**\n\n\n\n\n## 5. ACA (Ant Colony Algorithm) for tsp\n-> Demo code: [examples/demo_aca_tsp.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_aca_tsp.py#L17)\n```python\nfrom sko.ACA import ACA_TSP\n\naca = ACA_TSP(func=cal_total_distance, n_dim=num_points,\n              size_pop=50, max_iter=200,\n              distance_matrix=distance_matrix)\n\nbest_x, best_y = aca.run()\n\n```\n\n![ACA](https://img1.github.io/heuristic_algorithm/aca_tsp.png)\n\n\n## 6. immune algorithm (IA)\n-> Demo code: [examples/demo_ia.py#s2](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_ia.py#L6)\n```python\n\nfrom sko.IA import IA_TSP\n\nia_tsp = IA_TSP(func=cal_total_distance, n_dim=num_points, size_pop=500, max_iter=800, prob_mut=0.2,\n                T=0.7, alpha=0.95)\nbest_points, best_distance = ia_tsp.run()\nprint('best routine:', best_points, 'best_distance:', best_distance)\n\n```\n\n![IA](https://img1.github.io/heuristic_algorithm/ia2.png)\n\n## 7. Artificial Fish Swarm Algorithm (AFSA)\n-> Demo code: [examples/demo_afsa.py#s1](https://github.com/guofei9987/scikit-opt/blob/master/examples/demo_afsa.py#L1)\n```python\ndef func(x):\n    x1, x2 = x\n    return 1 / x1 ** 2 + x1 ** 2 + 1 / x2 ** 2 + x2 ** 2\n\n\nfrom sko.AFSA import AFSA\n\nafsa = AFSA(func, n_dim=2, size_pop=50, max_iter=300,\n            max_try_num=100, step=0.5, visual=0.3,\n            q=0.98, delta=0.5)\nbest_x, best_y = afsa.run()\nprint(best_x, best_y)\n```\n\n\n\n# Projects using scikit-opt\n\n- [Yu, J., He, Y., Yan, Q., & Kang, X. (2021). SpecView: Malware Spectrum Visualization Framework With Singular Spectrum Transformation. IEEE Transactions on Information Forensics and Security, 16, 5093-5107.](https://ieeexplore.ieee.org/abstract/document/9607026/)\n- [Zhen, H., Zhai, H., Ma, W., Zhao, L., Weng, Y., Xu, Y., ... & He, X. (2021). Design and tests of reinforcement-learning-based optimal power flow solution generator. Energy Reports.](https://www.sciencedirect.com/science/article/pii/S2352484721012737)\n- [Heinrich, K., Zschech, P., Janiesch, C., & Bonin, M. (2021). Process data properties matter: Introducing gated convolutional neural networks (GCNN) and key-value-predict attention networks (KVP) for next event prediction with deep learning. Decision Support Systems, 143, 113494.](https://www.sciencedirect.com/science/article/pii/S016792362100004X)\n- [Tang, H. K., & Goh, S. K. (2021). A Novel Non-population-based Meta-heuristic Optimizer Inspired by the Philosophy of Yi Jing. arXiv preprint arXiv:2104.08564.](https://arxiv.org/abs/2104.08564)\n- [Wu, G., Li, L., Li, X., Chen, Y., Chen, Z., Qiao, B., ... & Xia, L. (2021). Graph embedding based real-time social event matching for EBSNs recommendation. World Wide Web, 1-22.](https://link.springer.com/article/10.1007/s11280-021-00934-y)\n- [Pan, X., Zhang, Z., Zhang, H., Wen, Z., Ye, W., Yang, Y., ... & Zhao, X. (2021). A fast and robust mixture gases identification and concentration detection algorithm based on attention mechanism equipped recurrent neural network with double loss function. Sensors and Actuators B: Chemical, 342, 129982.](https://www.sciencedirect.com/science/article/abs/pii/S0925400521005517)\n- [Castella Balcell, M. (2021). Optimization of the station keeping system for the WindCrete floating offshore wind turbine.](https://upcommons.upc.edu/handle/2117/350262)\n- [Zhai, B., Wang, Y., Wang, W., & Wu, B. (2021). Optimal Variable Speed Limit Control Strategy on Freeway Segments under Fog Conditions. arXiv preprint arXiv:2107.14406.](https://arxiv.org/abs/2107.14406)\n- [Yap, X. H. (2021). Multi-label classification on locally-linear data: Application to chemical toxicity prediction.](https://etd.ohiolink.edu/apexprod/rws_olink/r/1501/10?clear=10&p10_accession_num=wright162901936395651)\n- [Gebhard, L. (2021). Expansion Planning of Low-Voltage Grids Using Ant Colony Optimization Ausbauplanung von Niederspannungsnetzen mithilfe eines Ameisenalgorithmus.](https://ad-publications.cs.uni-freiburg.de/theses/Master_Lukas_Gebhard_2021.pdf)\n- [Ma, X., Zhou, H., & Li, Z. (2021). Optimal Design for Interdependencies between Hydrogen and Power Systems. IEEE Transactions on Industry Applications.](https://ieeexplore.ieee.org/abstract/document/9585654)\n- [de Curso, T. D. C. (2021). Estudo do modelo Johansen-Ledoit-Sornette de bolhas financeiras.](https://d1wqtxts1xzle7.cloudfront.net/67649721/TCC_Thibor_Final-with-cover-page-v2.pdf?Expires=1639140872&Signature=LDZoVsAGO0mLMlVsQjnzpLlRhLyt5wdIDmBjm1yWog5bsx6apyRE9aHuwfnFnc96uvam573wiHMeV08QlK2vhRcQS1d0buenBT5fwoRuq6PTDoMsXmpBb-lGtu9ETiMb4sBYvcQb-X3C7Hh0Ec1FoJZ040gXJPWdAli3e1TdOcGrnOaBZMgNiYX6aKFIZaaXmiQeV3418~870bH4IOQXOapIE6-23lcOL-32T~FSjsOrENoLUkcosv6UHPourKgsRufAY-C2HBUWP36iJ7CoH0jSTo1e45dVgvqNDvsHz7tmeI~0UPGH-A8MWzQ9h2ElCbCN~UNQ8ycxOa4TUKfpCw__&Key-Pair-Id=APKAJLOHF5GGSLRBV4ZA)\n- [Wu, T., Liu, J., Liu, J., Huang, Z., Wu, H., Zhang, C., ... & Zhang, G. (2021). A Novel AI-based Framework for AoI-optimal Trajectory Planning in UAV-assisted Wireless Sensor Networks. IEEE Transactions on Wireless Communications.](https://ieeexplore.ieee.org/abstract/document/9543607)\n- [Liu, H., Wen, Z., & Cai, W. (2021, August). FastPSO: Towards Efficient Swarm Intelligence Algorithm on GPUs. In 50th International Conference on Parallel Processing (pp. 1-10).](https://dl.acm.org/doi/abs/10.1145/3472456.3472474)\n- [Mahbub, R. (2020). Algorithms and Optimization Techniques for Solving TSP.](https://raiyanmahbub.com/images/Research_Paper.pdf)\n- [Li, J., Chen, T., Lim, K., Chen, L., Khan, S. A., Xie, J., & Wang, X. (2019). Deep learning accelerated gold nanocluster synthesis. Advanced Intelligent Systems, 1(3), 1900029.](https://onlinelibrary.wiley.com/doi/full/10.1002/aisy.201900029)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"204A:3C4A0:174F2E:5C61D0:6AB92058"},"text_sha256":"e16d2d9d37f2d02efa0fefb52db19f590ffac22c7d432f30ce263cded82fd8fb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"numenta/nupic-legacy","input_row":{"repository":"numenta/nupic-legacy","url":"https://github.com/numenta/nupic-legacy","name":"nupic-legacy","owner":"numenta","description":"Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6353,"issues":1793,"created_at":"2013-04-05T23:14:27Z","updated_at":"2026-09-25T03:11:45Z","first_commit_at":"2013-04-05T23:14:27Z","last_commit_at":"2024-12-03T17:50:20Z","activity_months":139.94,"ai_ml_match_topics":"artificial-intelligence; machine-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:55.397Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"numenta/nupic-legacy","visibility":"public","created_at":"2013-04-05T23:14:27Z","updated_at":"2026-09-25T03:11:45Z","private":false,"fork":false,"archived":false,"stargazers_count":6353,"open_issues_count":465,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3544","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:178AA47:1BA8575:6AB927EB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3543","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:17C9135:1BE6C98:6AB927EB"},"commit":{"sha":"1d980e1c4cfd50c61fa163196d44c599cae189a6","url":"https://github.com/numenta/nupic-legacy/commit/1d980e1c4cfd50c61fa163196d44c599cae189a6","date":"2018-05-01T16:03:34Z","author_date":"2018-05-01T16:03:34Z","committer_date":"2018-05-01T16:03:34Z","tree_sha":"8852a219263dc56b3fea057c0758868f12651686","message_first_line":"Merge pull request #3833 from lscheinkman/NUP-2518"},"tree_request_status":200,"tree_rate":{"github_remaining":"3542","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:17F05FF:1C0DE35:6AB927EC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3598,"blob_sha":"8a6abebfe0314c74dadd0a44840900e84a11c2e8","priority":0}],"documents":[{"path":"README.md","size":3598,"blob_sha":"8a6abebfe0314c74dadd0a44840900e84a11c2e8","priority":0,"status":200,"text":"# <img src=\"http://numenta.org/87b23beb8a4b7dea7d88099bfb28d182.svg\" alt=\"NuPIC Logo\" width=100/> NuPIC\n\n## Numenta Platform for Intelligent Computing\n\nThe Numenta Platform for Intelligent Computing (**NuPIC**) is a machine intelligence platform that implements the [HTM learning algorithms](https://numenta.com/resources/papers-videos-and-more/). HTM is a detailed computational theory of the neocortex. At the core of HTM are time-based continuous learning algorithms that store and recall spatial and temporal patterns. NuPIC is suited to a variety of problems, particularly anomaly detection and prediction of streaming data sources. For more information, see [numenta.org](http://numenta.org) or the [NuPIC Forum](https://discourse.numenta.org/c/nupic).\n\nFor usage guides, quick starts, and API documentation, see <http://nupic.docs.numenta.org/>.\n\n## This project is in Maintenance Mode\n\nWe plan to do minor releases only, and limit changes in NuPIC and NuPIC Core to:\n\n- Fixing critical bugs.\n- Features needed to support ongoing research.\n\n## Installing NuPIC\n\nNuPIC binaries are available for:\n\n- Linux x86 64bit\n- OS X 10.9\n- OS X 10.10\n- Windows 64bit\n\n### Dependencies\n\nThe following dependencies are required to install NuPIC on all operating systems.\n\n- [Python 2.7](https://www.python.org/)\n- [pip](https://pip.pypa.io/en/stable/installing/)>=8.1.2\n- [setuptools](https://setuptools.readthedocs.io)>=25.2.0\n- [wheel](http://pythonwheels.com)>=0.29.0\n- [numpy](http://www.numpy.org/)\n- C++ 11 compiler like [gcc](https://gcc.gnu.org/) (4.8+) or [clang](http://clang.llvm.org/)\n\nAdditional OS X requirements:\n\n- [Xcode command line tools](https://developer.apple.com/library/ios/technotes/tn2339/_index.html)\n\n### Install\n\nRun the following to install NuPIC:\n\n    pip install nupic\n\n### Test\n\n    # From the root of the repo:\n    py.test tests/unit\n\n### _Having problems?_\n\n- You may need to use the `--user` flag for the commands above to install in a non-system location (depends on your environment). Alternatively, you can execute the `pip` commands with `sudo` (not recommended).\n- You may need to add the `--use-wheel` option if you have an older pip version (wheels are now the default binary package format for pip).\n\nFor any other installation issues, please see our [search our forums](https://discourse.numenta.org/search?q=tag%3Ainstallation%20category%3A10) (post questions there). You can report bugs at https://github.com/numenta/nupic/issues.\n\nLive Community Chat: [![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat)](https://gitter.im/numenta/public?utm_source=badge)\n\n### Installing NuPIC From Source\n\nTo install from local source code, run from the repository root:\n\n    pip install .\n\nUse the optional `-e` argument for a developer install.\n\nIf you want to build the dependent `nupic.bindings` from source, you should build and install from [`nupic.core`](https://github.com/numenta/nupic.core) prior to installing nupic (since a PyPI release will be installed if `nupic.bindings` isn't yet installed).\n\n- Build:\n[![Build Status](https://travis-ci.org/numenta/nupic.png?branch=master)](https://travis-ci.org/numenta/nupic)\n[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/4toemh0qtr21mk6b/branch/master?svg=true)](https://ci.appveyor.com/project/numenta-ci/nupic/branch/master)\n[![CircleCI](https://circleci.com/gh/numenta/nupic.svg?style=svg)](https://circleci.com/gh/numenta/nupic)\n- To cite this codebase: [![DOI](https://zenodo.org/badge/19461/numenta/nupic.svg)](https://zenodo.org/badge/latestdoi/19461/numenta/nupic)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:174340:5C55D2:6AB9204D"},"text_sha256":"a8cdb6119d81a45bf48383b7f8cbe5dbf978c44e4af3f70c22f44584d5c0664d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3541","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:17713D9:1B8DADB:6AB927ED"},"commit":{"sha":"7281482def2a96fbda663e6c39e8351a1886dec7","url":"https://github.com/numenta/nupic-legacy/commit/7281482def2a96fbda663e6c39e8351a1886dec7","date":"2024-12-03T17:50:20Z","author_date":"2024-12-03T17:50:20Z","committer_date":"2024-12-03T17:50:20Z","tree_sha":"d3decaabe9425c8fc0f888dc10d7033bf8cab8c3","message_first_line":"chore: MIT License (#3904)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3540","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:17F06AC:1C0DF0E:6AB927ED"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3768,"blob_sha":"ef3ef2542f3c32b5a25f2de615d9f2ca65968610","priority":0}],"documents":[{"path":"README.md","size":3768,"blob_sha":"ef3ef2542f3c32b5a25f2de615d9f2ca65968610","priority":0,"status":200,"text":"# <img src=\"http://numenta.org/87b23beb8a4b7dea7d88099bfb28d182.svg\" alt=\"NuPIC Logo\" width=100/> NuPIC\n\nAs of September 2023 this repository contains code from legacy Hierarchical Temporal Memory (HTM) Numenta projects that have been in maintenance mode for several years.\n\n## Numenta Platform for Intelligent Computing\n\nThe Numenta Platform for Intelligent Computing (**NuPIC**) is a machine intelligence platform that implements the [HTM learning algorithms](https://numenta.com/resources/papers-videos-and-more/). HTM is a detailed computational theory of the neocortex. At the core of HTM are time-based continuous learning algorithms that store and recall spatial and temporal patterns. NuPIC is suited to a variety of problems, particularly anomaly detection and prediction of streaming data sources. For more information, see [numenta.org](http://numenta.org) or the [NuPIC Forum](https://discourse.numenta.org/c/nupic).\n\nFor usage guides, quick starts, and API documentation, see <http://nupic.docs.numenta.org/>.\n\n## This project is in Maintenance Mode\n\nWe plan to do minor releases only, and limit changes in NuPIC and NuPIC Core to:\n\n- Fixing critical bugs.\n- Features needed to support ongoing research.\n\n## Installing NuPIC\n\nNuPIC binaries are available for:\n\n- Linux x86 64bit\n- OS X 10.9\n- OS X 10.10\n- Windows 64bit\n\n### Dependencies\n\nThe following dependencies are required to install NuPIC on all operating systems.\n\n- [Python 2.7](https://www.python.org/)\n- [pip](https://pip.pypa.io/en/stable/installing/)>=8.1.2\n- [setuptools](https://setuptools.readthedocs.io)>=25.2.0\n- [wheel](http://pythonwheels.com)>=0.29.0\n- [numpy](http://www.numpy.org/)\n- C++ 11 compiler like [gcc](https://gcc.gnu.org/) (4.8+) or [clang](http://clang.llvm.org/)\n\nAdditional OS X requirements:\n\n- [Xcode command line tools](https://developer.apple.com/library/ios/technotes/tn2339/_index.html)\n\n### Install\n\nRun the following to install NuPIC:\n\n    pip install nupic\n\n### Test\n\n    # From the root of the repo:\n    py.test tests/unit\n\n### _Having problems?_\n\n- You may need to use the `--user` flag for the commands above to install in a non-system location (depends on your environment). Alternatively, you can execute the `pip` commands with `sudo` (not recommended).\n- You may need to add the `--use-wheel` option if you have an older pip version (wheels are now the default binary package format for pip).\n\nFor any other installation issues, please see our [search our forums](https://discourse.numenta.org/search?q=tag%3Ainstallation%20category%3A10) (post questions there). You can report bugs at https://github.com/numenta/nupic/issues.\n\nLive Community Chat: [![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat)](https://gitter.im/numenta/public?utm_source=badge)\n\n### Installing NuPIC From Source\n\nTo install from local source code, run from the repository root:\n\n    pip install .\n\nUse the optional `-e` argument for a developer install.\n\nIf you want to build the dependent `nupic.bindings` from source, you should build and install from [`nupic.core`](https://github.com/numenta/nupic.core) prior to installing nupic (since a PyPI release will be installed if `nupic.bindings` isn't yet installed).\n\n- Build:\n[![Build Status](https://travis-ci.org/numenta/nupic.png?branch=master)](https://travis-ci.org/numenta/nupic)\n[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/4toemh0qtr21mk6b/branch/master?svg=true)](https://ci.appveyor.com/project/numenta-ci/nupic/branch/master)\n[![CircleCI](https://circleci.com/gh/numenta/nupic.svg?style=svg)](https://circleci.com/gh/numenta/nupic)\n- To cite this codebase: [![DOI](https://zenodo.org/badge/19461/numenta/nupic.svg)](https://zenodo.org/badge/latestdoi/19461/numenta/nupic)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E5C:3CC8A:174909:5C5C74:6AB9205B"},"text_sha256":"e4b7e8d041c1ffaa905aeb991015b4988c247a4ff807fc2538e026c780b071da"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Trusted-AI/adversarial-robustness-toolbox","input_row":{"repository":"Trusted-AI/adversarial-robustness-toolbox","url":"https://github.com/Trusted-AI/adversarial-robustness-toolbox","name":"adversarial-robustness-toolbox","owner":"Trusted-AI","description":"Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6244,"issues":918,"created_at":"2018-03-15T14:40:43Z","updated_at":"2026-09-27T06:29:48Z","first_commit_at":"2017-05-09T12:41:50Z","last_commit_at":"2025-11-13T14:55:10Z","activity_months":102.17,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:27:58.260Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Trusted-AI/adversarial-robustness-toolbox","visibility":"public","created_at":"2018-03-15T14:40:43Z","updated_at":"2026-09-27T06:29:48Z","private":false,"fork":false,"archived":false,"stargazers_count":6244,"open_issues_count":30,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3539","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17AA018:1BC7911:6AB927EE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3538","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CE:180242:17D2464:1BEFEC7:6AB927EE"},"commit":{"sha":"3446c9184fd42d1a84a4592e6a1e9ddf63f39bfb","url":"https://github.com/Trusted-AI/adversarial-robustness-toolbox/commit/3446c9184fd42d1a84a4592e6a1e9ddf63f39bfb","date":"2018-05-22T13:33:27Z","author_date":"2018-05-22T13:33:27Z","committer_date":"2018-05-22T13:33:27Z","tree_sha":"5d3bd2ef7dabe8b9a21d6ef73b4dcb10022bff27","message_first_line":"unittest clever-pytorch"},"tree_request_status":200,"tree_rate":{"github_remaining":"3537","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:17C790F:1BE5629:6AB927EF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2753,"blob_sha":"782b5ba58cfc9d92fe92330e88c9e8373f254e8a","priority":0}],"documents":[{"path":"README.md","size":2753,"blob_sha":"782b5ba58cfc9d92fe92330e88c9e8373f254e8a","priority":0,"status":200,"text":"# Nemesis (v0.1)\n\nThis is a library dedicated to **adversarial machine learning**. Its purpose is to allow rapid crafting and analysis of attacks and defense methods for machine learning models. Nemesis provides an implementation for many state-of-the-art methods for attacking and defending classifiers.\n\nThe library is still under development. Feedback, bug reports and extension requests are highly appreciated.\n\n## Supported attack and defense methods\n\nNemesis contains implementations of the following attacks:\n* Deep Fool ([Moosavi-Dezfooli et al., 2015](https://arxiv.org/abs/1511.04599))\n* Fast Gradient Method ([Goodfellow et al., 2014](https://arxiv.org/abs/1412.6572))\n* Jacobian Saliency Map ([Papernot et al., 2016](https://arxiv.org/abs/1511.07528))\n* Universal Perturbation ([Moosavi-Dezfooli et al., 2016](https://arxiv.org/abs/1610.08401))\n* Virtual Adversarial Method ([Moosavi-Dezfooli et al., 2015](https://arxiv.org/abs/1507.00677))\n* C&amp;W Attack ([Carlini and Wagner, 2016](https://arxiv.org/abs/1608.04644))\n* NewtonFool ([Jang et al., 2017](http://doi.acm.org/10.1145/3134600.3134635))\n\nThe following defense methods are also supported:\n* Feature squeezing ([Xu et al., 2017](http://arxiv.org/abs/1704.01155))\n* Spatial smoothing ([Xu et al., 2017](http://arxiv.org/abs/1704.01155))\n* Label smoothing (Warde-Farley and Goodfellow, 2016)\n* Adversarial training ([Szegedy et al., 2013](http://arxiv.org/abs/1312.6199))\n* Virtual adversarial training ([Miyato et al., 2017](https://arxiv.org/abs/1704.03976))\n\n## Setup\n\nNemesis is designed to run with Python 3 (and most likely Python 2 with small changes). You can either download the source code of Nemesis or clone the repository in your directory of choice:\n```bash\ngit clone https://github.ibm.com/Maria-Irina-Nicolae/nemesis\n```\n\nTo install the project dependencies, use the requirements file:\n```bash\npip install .\n```\n\nThe library comes with a basic set of unit tests. To check your install, you can run all the unit tests by calling in the Nemesis folder:\n```bash\nbash run_tests.sh\n```\n\nThe configuration file `config/config.ini` allows to set custom paths for data. By default, data is downloaded in the `nemesis/data` folder as follows:\n\n```text\n[DEFAULT]\nprofile=LOCAL\n\n[LOCAL]\ndata_path=./data\nmnist_path=./data/mnist\ncifar10_path=./data/cifar-10\nstl10_path=./data/stl-10\n```\n\nIf the datasets are not present at the indicated path, loading them will also download the data.\n\n## Running Nemesis\n\nSome examples of how to use Nemesis when writing your own code can be found in the `examples` folder. See `examples/README.md` for more information about what each example does. To run an example, use the following command:\n```bash\npython3 examples/<example_name>.py\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF28:375F4:175DED:5C724D:6AB9205B"},"text_sha256":"d1a9b5bfab2740e3ad9d62997a4e722306becac266be61fdc534478e1aa6c2ca"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3536","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:17D1FC1:1BEFE47:6AB927EF"},"commit":{"sha":"23539e2c06045d78594b6b6da533eed57967e410","url":"https://github.com/Trusted-AI/adversarial-robustness-toolbox/commit/23539e2c06045d78594b6b6da533eed57967e410","date":"2025-11-13T14:55:10Z","author_date":"2025-11-13T14:55:10Z","committer_date":"2025-11-13T14:55:10Z","tree_sha":"ad693102de2a6d42189fc0bd7dedf1eb20168e1c","message_first_line":"Merge pull request #2796 from Trusted-AI/dependabot/github_actions/docker/metadata-action-5.9.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"3535","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:1799B8F:1BB7385:6AB927F0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6179,"blob_sha":"cc4e5968d4de28315cfa25aaf39c5abf1ab46481","priority":0},{"path":"SECURITY.md","size":2278,"blob_sha":"2013d6f58329b2daf70163aaf0c45b29442baf3b","priority":1}],"documents":[{"path":"README.md","size":6179,"blob_sha":"cc4e5968d4de28315cfa25aaf39c5abf1ab46481","priority":0,"status":200,"text":"# Adversarial Robustness Toolbox (ART) v1.20\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/Trusted-AI/adversarial-robustness-toolbox/main/docs/images/art_lfai.png\" width=\"467\" title=\"ART logo\">\n<\/p>\n<br />\n\n![CodeQL](https://github.com/Trusted-AI/adversarial-robustness-toolbox/workflows/CodeQL/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/adversarial-robustness-toolbox/badge/?version=latest)](http://adversarial-robustness-toolbox.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://badge.fury.io/py/adversarial-robustness-toolbox.svg)](https://badge.fury.io/py/adversarial-robustness-toolbox)\n[![codecov](https://codecov.io/gh/Trusted-AI/adversarial-robustness-toolbox/branch/main/graph/badge.svg)](https://codecov.io/gh/Trusted-AI/adversarial-robustness-toolbox)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/adversarial-robustness-toolbox)](https://pypi.org/project/adversarial-robustness-toolbox/)\n[![slack-img](https://img.shields.io/badge/chat-on%20slack-yellow.svg)](https://ibm-art.slack.com/)\n[![Downloads](https://static.pepy.tech/badge/adversarial-robustness-toolbox)](https://pepy.tech/project/adversarial-robustness-toolbox)\n[![Downloads](https://static.pepy.tech/badge/adversarial-robustness-toolbox/month)](https://pepy.tech/project/adversarial-robustness-toolbox)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5090/badge)](https://bestpractices.coreinfrastructure.org/projects/5090)\n\n[中文README请按此处](README-cn.md)\n\n <div align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/lfaidata-project-badge-graduate-color_dark.png\" width=\"400\" title=\"LF AI & Data\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"docs/images/lfaidata-project-badge-graduate-color.png\" width=\"400\" title=\"LF AI & Data\">\n    <img alt=\"Fallback image description\" src=\"default-image.png\" width=\"400\">\n  <\/picture>\n<\/div>\n<br />\n\nAdversarial Robustness Toolbox (ART) is a Python library for Machine Learning Security. ART is hosted by the \n[Linux Foundation AI & Data Foundation](https://lfaidata.foundation) (LF AI & Data). ART provides tools that enable\ndevelopers and researchers to defend and evaluate Machine Learning models and applications against the\nadversarial threats of Evasion, Poisoning, Extraction, and Inference. ART supports all popular machine learning frameworks\n(TensorFlow, Keras, PyTorch, scikit-learn, XGBoost, LightGBM, CatBoost, GPy, etc.), all data types\n(images, tables, audio, video, etc.) and machine learning tasks (classification, object detection, speech recognition,\ngeneration, certification, etc.).\n\n## Adversarial Threats\n\n <div align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/adversarial_threats_attacker_dark.png\" width=\"400 title=\"ART Threats\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"docs/images/adversarial_threats_attacker.png\" width=\"400 title=\"ART Threats\">\n    <img alt=\"Fallback image description\" src=\"default-image.png\" width=\"400\">\n  <\/picture>\n<\/div>\n\n<p align=\"center\">\n  <img src=\"docs/images/adversarial_threats_art.png?raw=true\" width=\"400\" title=\"ART Matrix\">\n<\/p>\n<br />\n\n## ART for Red and Blue Teams (selection)\n\n <div align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/white_hat_blue_red_dark.png\" width=\"800 title=\"ART Red and Blue Teams\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"docs/images/white_hat_blue_red.png\" width=\"800 title=\"ART Red and Blue Teams\">\n    <img alt=\"Fallback image description\" src=\"default-image.png\" width=\"800\">\n  <\/picture>\n<\/div>\n<br />\n\n## Learn more\n\n| **[Get Started][get-started]**     | **[Documentation][documentation]**     | **[Contributing][contributing]**           |\n|-------------------------------------|-------------------------------|-----------------------------------|\n| - [Installation][installation]<br>- [Examples](examples/README.md)<br>- [Notebooks](notebooks/README.md) | - [Attacks][attacks]<br>- [Defences][defences]<br>- [Estimators][estimators]<br>- [Metrics][metrics]<br>- [Technical Documentation](https://adversarial-robustness-toolbox.readthedocs.io) | - [Slack](https://ibm-art.slack.com), [Invitation](https://join.slack.com/t/ibm-art/shared_invite/enQtMzkyOTkyODE4NzM4LTA4NGQ1OTMxMzFmY2Q1MzE1NWI2MmEzN2FjNGNjOGVlODVkZDE0MjA1NTA4OGVkMjVkNmQ4MTY1NmMyOGM5YTg)<br>- [Contributing](CONTRIBUTING.md)<br>- [Roadmap][roadmap]<br>- [Citing][citing] |\n\n[get-started]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Get-Started\n[attacks]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/ART-Attacks\n[defences]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/ART-Defences\n[estimators]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/ART-Estimators\n[metrics]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/ART-Metrics\n[contributing]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Contributing\n[documentation]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Documentation\n[installation]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Get-Started#setup\n[roadmap]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Roadmap\n[citing]: https://github.com/Trusted-AI/adversarial-robustness-toolbox/wiki/Contributing#citing-art\n\nThe library is under continuous development. Feedback, bug reports and contributions are very welcome!\n\n# Acknowledgment\nThis material is partially based upon work supported by the Defense Advanced Research Projects Agency (DARPA) under\nContract No. HR001120C0013. Any opinions, findings and conclusions or recommendations expressed in this material are\nthose of the author(s) and do not necessarily reflect the views of the Defense Advanced Research Projects Agency (DARPA).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27EA:40B0C:1771C5:5C8559:6AB9205D"},"text_sha256":"f52dcc8a660d1978baa2a61934dc474bb30f2edf036e0a5652867698dd569ca4"},{"path":"SECURITY.md","size":2278,"blob_sha":"2013d6f58329b2daf70163aaf0c45b29442baf3b","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n(Following https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md)\n\nPlease email reports about any security related issues you find to info@lfai.foundation. This mail is delivered to a small team maintaining the Trusted-AI projects. Your email will be acknowledged within a few business day, and you'll receive a more detailed response to your email within 7 days indicating the next steps in handling your report.\n\nPlease use a descriptive subject line for your report email. After the initial reply to your report, the team will endeavor to keep you informed of the progress being made towards a fix and announcement.\n\nIn addition, please include the following information along with your report:\n\nYour name and affiliation (if any).\nA description of the technical details of the vulnerabilities. It is very important to let us know how we can reproduce your findings.\nAn explanation who can exploit this vulnerability, and what they gain when doing so -- write an attack scenario. This will help us evaluate your report quickly, especially if the issue is complex.\nWhether this vulnerability public or known to third parties. If it is, please provide details.\nIf you believe that an existing (public) issue is security-related, please send an email to info@lfai.foundation. The email should include the issue ID and a short description of why it should be handled according to this security policy.\n\nWe apply the following disclosure process:\n\nWhen a report is received, we confirm the issue and determine its severity.\nIf we know of specific third-party services or software based on ART that require mitigation before publication, those projects will be notified.\nAn advisory is prepared (but not published) which details the problem and steps for mitigation.\nThe vulnerability is fixed and potential workarounds are identified.\nWherever possible, the fix is also prepared for the branches corresponding to all releases of ART at most one year old. We will attempt to commit these fixes as soon as possible, and as close together as possible.\n\nPatch releases are published for all fixed released versions and the advisory is published.\n\nNote that each version of ART is supported for only 1 year after the release.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C28E:3FA0D:171A6D:5C2D62:6AB9205F"},"text_sha256":"dff081fb2f39aed2492f6e0d4e7c224b84c6bf62f49d52ef5d10727e5da454af"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gorgonia/gorgonia","input_row":{"repository":"gorgonia/gorgonia","url":"https://github.com/gorgonia/gorgonia","name":"gorgonia","owner":"gorgonia","description":"Gorgonia is a library that helps facilitate machine learning in Go.","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":5930,"issues":283,"created_at":"2016-09-14T23:19:43Z","updated_at":"2026-09-24T09:48:07Z","first_commit_at":"2016-09-14T23:19:44Z","last_commit_at":"2023-10-13T09:13:05Z","activity_months":84.900000000000006,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:01.531Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gorgonia/gorgonia","visibility":"public","created_at":"2016-09-14T23:19:43Z","updated_at":"2026-09-24T09:48:07Z","private":false,"fork":false,"archived":false,"stargazers_count":5930,"open_issues_count":126,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3534","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:1799C85:1BB74A2:6AB927F1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3533","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17C1AF0:1BDF629:6AB927F1"},"commit":{"sha":"9e7e489150ee261a41253ae07adfff5a6710d10f","url":"https://github.com/gorgonia/gorgonia/commit/9e7e489150ee261a41253ae07adfff5a6710d10f","date":"2018-05-12T19:02:46Z","author_date":"2018-05-12T19:02:46Z","committer_date":"2018-05-12T19:02:46Z","tree_sha":"58fddf4eb60e904955e24c61c3ebee46adb4a024","message_first_line":"[Enhancement] Suppressed assembly dependency"},"tree_request_status":200,"tree_rate":{"github_remaining":"3532","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:17745C9:1B92067:6AB927F2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26559,"blob_sha":"8695075cd641c833a2ae9e757d340f4afcd67708","priority":0}],"documents":[{"path":"README.md","size":26559,"blob_sha":"8695075cd641c833a2ae9e757d340f4afcd67708","priority":0,"status":200,"text":"# Gorgonia [![GoDoc](https://godoc.org/gorgonia.org/gorgonia?status.svg)](https://godoc.org/gorgonia.org/gorgonia) [![GitHub version](https://badge.fury.io/gh/gorgonia%2Fgorgonia.svg)](https://badge.fury.io/gh/gorgonia%2Fgorgonia) [![Build Status](https://travis-ci.org/gorgonia/gorgonia.svg?branch=master)](https://travis-ci.org/gorgonia/gorgonia) [![Coverage Status](https://coveralls.io/repos/github/gorgonia/gorgonia/badge.svg?branch=master)](https://coveralls.io/github/gorgonia/gorgonia?branch=master) [![Go Report Card](https://goreportcard.com/badge/gorgonia.org/gorgonia)](https://goreportcard.com/report/gorgonia.org/gorgonia) [![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges)\n#\n\n<img src=\"https://raw.githubusercontent.com/gorgonia/gorgonia/master/media/mascot_small.jpg\" align=\"right\" />\n\nGorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily. If this sounds like [Theano](http://deeplearning.net/software/theano/) or [TensorFlow](https://www.tensorflow.org/), it's because the idea is quite similar. Specifically, the library is pretty low-level, like Theano, but has higher goals like Tensorflow.\n\nGorgonia:\n\n* Can perform automatic differentiation\n* Can perform symbolic differentiation\n* Can perform gradient descent optimizations\n* Can perform numerical stabilization\n* Provides a number of convenience functions to help create neural networks\n* Is fairly quick (comparable to Theano and Tensorflow's speed)\n* Supports CUDA/GPGPU computation (OpenCL not yet supported, send a pull request)\n* Will support distributed computing\n\n# Why Use Gorgonia? #\n\nThe main reason to use Gorgonia is developer comfort. If you're using a Go stack extensively, now you have access to the ability to create production-ready machine learning systems in an environment that you are already familiar and comfortable with. \n\nML/AI at large is usually split into two stages: the experimental stage where one builds various models, test and retest; and the deployed state where a model after being tested and played with, is deployed. This necessitate different roles like data scientist and data engineer.\n\nTypically the two phases have different tools: Python/Lua (using [Theano](http://deeplearning.net/software/theano/), [Torch](http://torch.ch/), etc) is commonly used for the experimental stage, and then the model is rewritten in some more performant language like C++ (using [dlib](http://dlib.net/ml.html), [mlpack](http://mlpack.org) etc). Of course, nowadays the gap is closing and people frequently share the tools between them. Tensorflow is one such tool that bridges the gap.\n\nGorgonia aims to do the same, but for the Go environment. Gorgonia is currently fairly performant - its speeds are comparable to Theano's and Tensorflow's  CPU implementations. GPU implementations are a bit finnicky to compare due to the heavy cgo tax, but rest assured that this is an area of active improvement.\n\n# Installation #\n\nThe package is go-gettable: `go get -u gorgonia.org/gorgonia`. Additionally, Gorgonia uses [dep](https://github.com/golang/dep) as its vendoring tool.\n\nThe current version is 0.8.x\n\n\n## Versioning ## \n\nWe use [semver 2.0.0](http://semver.org/) for our versioning. Before 1.0, Gorgonia's APIs are expected to change quite a bit. API is defined by the exported functions, variables and methods. For the developers' sanity, there are minor differences to semver that we will apply prior to version 1.0. They are enumerated below:\n\n* The MINOR number will be incremented every time there is a deletrious break in API. This means any deletion, or any change in function signature or interface methods will lead to a change in MINOR number. \n* Additive changes will NOT change the MINOR version number prior to version 1.0. This means that if new functionality were added that does not break the way you use Gorgonia, there will not be an increment in the MINOR version. There will be an increment in the PATCH version.  \n\n## Go Version Support ##\n\nGorgonia aims to support 5 versions below the Master branch of Go. This means Gorgonia will support the current released version of Go, and up to 4 previous versions - providing something doesn't break. Where possible a shim will be provided (for things like new `sort` APIs or `math/bits` which came out in Go 1.9).\n\nThe current version of Go is 1.9.2. The earliest version Gorgonia supports is Go 1.6.x. \n\n## Dependencies ##\n\nThere are very few dependencies that Gorgonia uses - and they're all pretty stable, so as of now there isn't a need for vendoring tools. These are the list of external packages that Gorgonia calls, ranked in order of reliance that this package has (subpackages are omitted):\n\n|Package|Used For|Vitality|Notes|Licence|\n|-------|--------|--------|-----|-------|\n|[gonum/graph](https://github.com/gonum/gonum/tree/master/graph)| Sorting `*ExprGraph`| Vital. Removal means Gorgonia will not work | Development of Gorgonia is committed to keeping up with the most updated version|[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[gonum/blas](https://github.com/gonum/gonum/tree/master/blas)|Tensor subpackage linear algebra operations|Vital. Removal means Gorgonial will not work|Development of Gorgonia is committed to keeping up with the most updated version|[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[cu](https://gorgonia.org/cu)| CUDA drivers | Needed for CUDA operations | Same maintainer as Gorgonia | MIT/BSD-like|\n|[math32](https://github.com/chewxy/math32)|`float32` operations|Can be replaced by `float32(math.XXX(float64(x)))`|Same maintainer as Gorgonia, same API as the built in `math` package|MIT/BSD-like|\n|[hm](https://github.com/chewxy/hm)|Type system for Gorgonia|Gorgonia's graphs are pretty tightly coupled with the type system | Same maintainer as Gorgonia | MIT/BSD-like|\n|[vecf64](https://gorgonia.org/vecf64)| optimized `[]float64` operations | Can be generated in the `tensor/genlib` package. However, plenty of optimizations have been made/will be made | Same maintainer as Gorgonia | MIT/BSD-like|\n|[vecf32](https://gorgonia.org/vecf32)| optimized `[]float32` operations | Can be generated in the `tensor/genlib` package. However, plenty of optimizations have been made/will be made | Same maintainer as Gorgonia | MIT/BSD-like|\n|[set](https://github.com/xtgo/set)|Various set operations|Can be easily replaced|Stable API for the past 1 year|[set licence](https://github.com/xtgo/set/blob/master/LICENSE) (MIT/BSD-like)|\n|[gographviz](https://github.com/awalterschulze/gographviz)|Used for printing graphs|Graph printing is only vital to debugging. Gorgonia can survive without, but with a major (but arguably nonvital) feature loss|Last update 12th April 2017|[gographviz licence](https://github.com/awalterschulze/gographviz/blob/master/LICENSE) (Apache 2.0)|\n|[rng](https://github.com/leesper/go_rng)|Used to implement helper functions to generate initial weights|Can be replaced fairly easily. Gorgonia can do without the convenience functions too||[rng licence](https://github.com/leesper/go_rng/blob/master/LICENSE) (Apache 2.0)|\n|[errors](https://github.com/pkg/errors)|Error wrapping|Gorgonia won't die without it. In fact Gorgonia has also used [goerrors/errors](https://github.com/go-errors/errors) in the past.|Stable API for the past 6 months|[errors licence](https://github.com/pkg/errors/blob/master/LICENSE) (MIT/BSD-like)|\n|[gonum/mat](http://github.com/gonum/gonum)|Compatibility between `Tensor` and Gonum's Matrix|Development of Gorgonia is committed to keeping up with the most updated version||[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[testify/assert](https://github.com/stretchr/testify)|Testing|Can do without but will be a massive pain in the ass to test||[testify licence](https://github.com/stretchr/testify/blob/master/LICENSE) (MIT/BSD-like)|\n\n# Keeping Updated #\n\nGorgonia's project has a [mailing list](https://groups.google.com/forum/#!forum/gorgonia), as well as a [Twitter account](https://twitter.com/gorgoniaML). Official updates and announcements will be posted to those two sites.\n\n# Usage #\n\nGorgonia works by creating a computation graph, and then executing it. Think of it as a programming language, but is limited to mathematical functions, and has no branching capability (no if/then or loops). In fact this is the dominant paradigm that the user should be used to thinking about. The computation graph is an [AST](http://en.wikipedia.org/wiki/Abstract_syntax_tree). \n\nMicrosoft's [CNTK](https://github.com/Microsoft/CNTK), with its BrainScript, is perhaps the best at exemplifying the idea that building of a computation graph and running of the computation graphs are different things, and that the user should be in different modes of thoughts when going about them. \n\nWhilst Gorgonia's implementation doesn't enforce the separation of thought as far as CNTK's BrainScript does, the syntax does help a little bit.\n\nHere's an example - say you want to define a math expression `z = x + y`. Here's how you'd do it:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t. \"gorgonia.org/gorgonia\"\n)\n\nfunc main() {\n\tg := NewGraph()\n\n\tvar x, y, z *Node\n\tvar err error\n\n\t// define the expression\n\tx = NewScalar(g, Float64, WithName(\"x\"))\n\ty = NewScalar(g, Float64, WithName(\"y\"))\n\tz, err = Add(x, y)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// create a VM to run the program on\n\tmachine := NewTapeMachine(g)\n\n\t// set initial values then run\n\tLet(x, 2.0)\n\tLet(y, 2.5)\n\tif machine.RunAll() != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"%v\", z.Value())\n\t// Output: 4.5\n}\n```\n\nYou might note that it's a little more verbose than other packages of similar nature. For example, instead of compiling to a callable function, Gorgonia specifically compiles into a `*program` which requires a `*TapeMachine` to run. It also requires manual a `Let(...)` call.\n\nThe author would like to contend that this is a Good Thing - to shift one's thinking to a machine-based thinking. It helps a lot in figuring out where things might go wrong.\n\nAdditionally, there are no support for branching - that is to say there are no conditionals (if/else) or loops. The aim is not to build a Turing-complete computer. \n\n### VMs ###\n\nThere are two VMs in the current version of Gorgonia:\n\n* `TapeMachine`\n* `LispMachine`\n\nThey function differently and take different inputs. The `TapeMachine` is useful for executing expressions that are generally static (that is to say the computation graph does not change). Due to its static nature, the `TapeMachine` is good for running expressions that are compiled-once-run-many-times (such as linear regression, SVM and the like).\n\nThe `LispMachine` on the other hand was designed to take a graph as an input, and executes directly on the nodes of the graph. If the graph change, simply create a new lightweight `LispMachine` to execute it on. The `LispMachine` is suitable for tasks such as creating recurrent neural networks without a fixed size.\n\nPrior to release of Gorgonia, there was a third VM - a stack based VM that is similar to `TapeMachine` but deals with artificial gradients better. It may see light of day again, once this author has managed to fix all the kinks.\n\n## Differentiation ##\n\nGorgonia performs both symbolic and automatic differentiation. There are subtle differences between the two processes. The author has found that it's best to think of it this way - Automatic differentiation is differentiation that happens at runtime, concurrently with the execution of the graph, while symbolic differentiation is differentiation that happens during the compilation phase. \n\nRuntime of course, refers to the execution of the expression graph, not the program's actual runtime.\n\nWith the introduction to the two VMs, it's easy to see how Gorgonia can perform both symbolic and automatic differentiation. Using the same example as above, the reader should note that there was no differentiation done. Instead, let's try with a `LispMachine`:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t. \"gorgonia.org/gorgonia\"\n)\n\nfunc main() {\n\tg := NewGraph()\n\n\tvar x, y, z *Node\n\tvar err error\n\n\t// define the expression\n\tx = NewScalar(g, Float64, WithName(\"x\"))\n\ty = NewScalar(g, Float64, WithName(\"y\"))\n\tz, err = Add(x, y)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// set initial values then run\n\tLet(x, 2.0)\n\tLet(y, 2.5)\n\n\t// by default, LispMachine performs forward mode and backwards mode execution\n\tm := NewLispMachine(g)\n\tif m.RunAll() != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"z: %v\\n\", z.Value())\n\n\txgrad, err := x.Grad()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"dz/dx: %v\\n\", xgrad)\n\n\tygrad, err := y.Grad()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"dz/dy: %v\\n\", ygrad)\n\n\t// Output:\n\t// z: 4.5\n\t// dz/dx: 1\n\t// dz/dy: 1\n}\n```\n\nOf course, Gorgonia also supports the more traditional symbolic differentiation like in Theano:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t. \"gorgonia.org/gorgonia\"\n)\n\nfunc main() {\n\tg := NewGraph()\n\n\tvar x, y, z *Node\n\tvar err error\n\n\t// define the expression\n\tx = NewScalar(g, Float64, WithName(\"x\"))\n\ty = NewScalar(g, Float64, WithName(\"y\"))\n\tz, err = Add(x, y)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// symbolically differentiate z with regards to x and y\n\t// this adds the gradient nodes to the graph g\n\tvar grads Nodes\n\tgrads, err = Grad(z, x, y)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// create a VM to run the program on\n\tmachine := NewTapeMachine(g)\n\n\t// set initial values then run\n\tLet(x, 2.0)\n\tLet(y, 2.5)\n\tif machine.RunAll() != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"z: %v\\n\", z.Value())\n\n\txgrad, err := x.Grad()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"dz/dx: %v | %v\\n\", xgrad, grads[0])\n\n\tygrad, err := y.Grad()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"dz/dy: %v | %v\\n\", ygrad, grads[1])\n\n\t// Output:\n\t// z: 4.5\n\t// dz/dx: 1 | 1\n\t// dz/dy: 1 | 1\n}\n```\n\nCurrently Gorgonia only performs backwards mode automatic differentiation (aka backpropagation), although one may observe the vestiges of an older version which supported forwards mode differentiation in the existence of `*dualValue`. It may return in the future.\n\n## Graph ##\n\nA lot has been said about a computation graph or an expression graph. But what is it exactly? Think of it as an AST for the math expression that you want. Here's the graph for the examples (but with a vector and a scalar addition instead) above:\n\n![graph1](https://raw.githubusercontent.com/gorgonia/gorgonia/master/media/exprGraph_example1.png)\n\nBy the way, Gorgonia comes with nice-ish graph printing abilities. Here's an example of a graph of the equation `y = x²` and its derivation:\n\n![graph1](https://raw.githubusercontent.com/gorgonia/gorgonia/master/media/exprGraph_example2.png)\n\nTo read the graph is easy. The expression builds from bottom up, while the derivations build from top down. This way the derivative of each node is roughly on the same level. \n\nRed-outlined nodes indicate that it's a root node. Green outlined nodes indicate that they're a leaf node. Nodes with a yellow background indicate that it's an input node. The dotted arrows indicate which node is the gradient node for the pointed-to node.\n\nConcretely, it says that `c42011e840` (`dy/dx`) is the gradient node of the input `c42011e000` (which is `x`).\n\n### Node Rendering ###\n\nA Node is rendered thusly:\n\n<table>\n<tr><td>ID<\/td><td>node name :: type<\/td><\/tr>\n<tr><td>OP*<\/td><td>op name :: type<\/td><\/tr>\n<tr><td colspan=\"2\">shape<\/td><\/tr>\n<tr><td colspan=\"2\">compilation metadata<\/td><\/tr>\n<tr><td>Value†<\/td><td>Gradient<\/td><\/tr>\n<\/table>\n\n### Additional Notes ###\n\n* If it's an input node, then the Op row will not show up.\n* If there are no Values bound to the node, it will show up as NIL. However, when there are values and gradients, it will try to as best as possible display the values bound to the node.\n\n\n## Using CUDA ##\n\nGorgonia comes with CUDA support out of the box. However, usage is specialized. To use CUDA, you must build your application with the build tag `cuda`, like so:\n\n``` \ngo build -tags='cuda' .\n```\n\nFurthermore, there are some additional requirements:\n\n1. [CUDA toolkit 9.0](https://developer.nvidia.com/cuda-toolkit) is required. Installing this installs the `nvcc` compiler which is required to run your code with CUDA.\n2. Be sure to follow the [post-installation steps](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)\n2. `go install gorgonia.org/gorgonia/cmd/cudagen`. This installs the `cudagen` program. Running `cudagen` will generate the relevant CUDA related code for Gorgonia.\n3. The CUDA ops must be manually enabled in your code with the `UseCudaFor` option.\n4. `runtime.LockOSThread()` must be called in the main function where the VM is running. CUDA requires thread affinity, and therefore the OS thread must be locked.\n\nBecause `nvcc` only plays well with `gcc` version 6 and below (the current version is 7), this is also quite helpful: `sudo ln -s /path/to/gcc-6 /usr/local/cuda-9.0/bin/gcc` \n\n### Example ###\n\nSo how do we use CUDA? Say we've got a file, `main.go`:\n\n```go\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"runtime\"\n\n\tT \"gorgonia.org/gorgonia\"\n\t\"gorgonia.org/gorgonia/tensor\"\n)\n\nfunc main() {\n\tg := T.NewGraph()\n\tx := T.NewMatrix(g, T.Float32, T.WithName(\"x\"), T.WithShape(100, 100))\n\ty := T.NewMatrix(g, T.Float32, T.WithName(\"y\"), T.WithShape(100, 100))\n\txpy := T.Must(T.Add(x, y))\n\txpy2 := T.Must(T.Tanh(xpy))\n\n\tm := T.NewTapeMachine(g, T.UseCudaFor(\"tanh\"))\n\n\tT.Let(x, tensor.New(tensor.WithShape(100, 100), tensor.WithBacking(tensor.Random(tensor.Float32, 100*100))))\n\tT.Let(y, tensor.New(tensor.WithShape(100, 100), tensor.WithBacking(tensor.Random(tensor.Float32, 100*100))))\n\n\truntime.LockOSThread()\n\tfor i := 0; i < 1000; i++ {\n\t\tif err := m.RunAll(); err != nil {\n\t\t\tlog.Fatalf(\"iteration: %d. Err: %v\", i, err)\n\t\t}\n\t}\n\truntime.UnlockOSThread()\n\n\tfmt.Printf(\"%1.1f\", xpy2.Value())\n}\n\n```\n\nIf this is run normally:\n\n```\ngo run main.go\n```\n\nCUDA will not be used.\n\nIf the program is to be run using CUDA, then this must be invoked:\n\n```\ngo run -tags='cuda'\n```\n\nAnd even so, only the `tanh` function uses CUDA. \n\n### Rationale ###\n\nThe main reasons for having such complicated requirements for using CUDA is quite simply performance related. As Dave Cheney famously wrote, [cgo is not Go](https://dave.cheney.net/2016/01/18/cgo-is-not-go). To use CUDA, cgo is unfortunately required. And to use cgo, plenty of tradeoffs need to be made.\n\nTherefore the solution was to nestle the CUDA related code in a build tag, `cuda`. That way by default no cgo is used (well, kind-of - you could still use `cblas` or `blase`). \n\nThe reason for requiring [CUDA toolkit 8.0](https://developer.nvidia.com/cuda-toolkit) is because there are many CUDA [Compute Capabilities](http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capabilities), and generating code for them all would yield a huge binary for no real good reason. Rather, users are encouraged to compile for their specific Compute Capabilities.\n\nLastly, the reason for requiring an explicit specification to use CUDA for which ops is due to the cost of cgo calls. Additional work is being done currently to implement batched cgo calls,  but until that is done, the solution is keyhole \"upgrade\" of certain ops\n\n### `Op`s supported by CUDA ###\n\nAs of now, only the very basic simple ops support CUDA: \n\nElementwise unary operations:\n\n* `abs`\n* `sin`\n* `cos`\n* `exp`\n* `ln`\n* `log2`\n* `neg`\n* `square`\n* `sqrt`\n* `inv` (reciprocal of a number)\n* `cube`\n* `tanh`\n* `sigmoid`\n* `log1p`\n* `expm1`\n* `softplus`\n\nElementwise binary operations - only arithmetic operations support CUDA:\n\n* `add`\n* `sub`\n* `mul`\n* `div`\n* `pow`\n\nFrom a lot of profiling of this author's personal projects, the ones that really matter are `tanh`, `sigmoid`, `expm1`, `exp` and `cube` - basically the activation functions. The other operations do work fine with MKL+AVX and aren't the major cause of slowness in a neural network\n\n### CUDA improvements ###\n\nIn a trivial benchmark, careful use of CUDA (in this case, used to call `sigmoid`) shows impressive improvements over non-CUDA code (bearing in mind the CUDA kernel is extremely naive and not optimized):\n\n```\nBenchmarkOneMilCUDA-8   \t     300\t   3348711 ns/op\nBenchmarkOneMil-8       \t      50\t  33169036 ns/op\n```\n\n\n# API Stability #\nGorgonia's API is as of right now, not considered stable. It will be stable from version 1.0 forwards.\n\nAs we move towards 1.0, the github repository will be moved to the [organization gorgonia](https://gorgonia.org/gorgonia/issues/98). See the issue for more updates.\n\n# Roadmap #\n\nHere are the goals for Gorgonia, sorted by importance \n\n- [ ] 80+% test coverage. Current coverage is 50% for Gorgonia and 80% for the `tensor`.\n- [ ] More advanced operations (like `einsum`). The current Tensor operators are pretty primitive.\n- [x] TravisCI for this package.\n- [x] Coveralls for this package.\n- [x] Clean out the tests. The tests were the results of many years of accumulation. It'd be nice to refactor them out nicely. Use table driven tests where possible. Use `testing/quick` where possible.\n- [x] Improve performance especially re: allocation, minimize impact of type system.\n- [x] Improve Op extensibility by exposing/changing the Op interface to be all exported, and not a mix of exported and unexported methods (Alternatively, create a `Compose` Op type for extensibility). This way everyone can make their own custom `Op`s.\n- [ ] Refactor the CuBLAS package as well as the Blase package to follow in vein of the CUDA implementation.\n- [ ] Distributed computing. The ability to spread jobs out across multiple machines and communicating with each other has been attempted at least 3 times, but failed each time.\n- [ ] Better documentation on why certain decisions were made, and the design of Gorgonia in general.\n- [ ] Higher order derivative optimization algorithms (LBFGS comes to mind)\n- [ ] Derivative-free optimization algorithms\n\n# Goals #\n\nThe primary goal for Gorgonia is to be a *highly performant* machine learning/graph computation-based library that can scale across multiple machines. It should bring the appeal of Go (simple compilation and deployment process) to the ML world. It's a long way from there currently, however, the baby steps are already there.\n\nThe secondary goal for Gorgonia is to provide a platform for exploration for non-standard deep-learning and neural network related things. This includes things like neo-hebbian learning, corner-cutting algorithms, evolutionary algorithms and the like. \n\n\n# Contributing #\n\nObviously since you are most probably reading this on Github, Github will form the major part of the workflow for contributing to this package.\n\nSee also: CONTRIBUTING.md\n\n\n## Contributors and Significant Contributors ##\nAll contributions are welcome. However, there is a new class of contributor, called Significant Contributors. \n\nA Significant Contributor is one who has shown *deep understanding* of how the library works and/or its environs.  Here are examples of what constitutes a Significant Contribution:\n\n* Wrote significant amounts of documentation pertaining to **why**/the mechanics of particular functions/methods and how the different parts affect one another\n* Wrote code, and tests around the more intricately connected parts of Gorgonia\n* Wrote code and tests, and have at least 5 pull requests accepted\n* Provided expert analysis on parts of the package (for example, you may be a floating point operations expert who optimized one function)\n* Answered at least 10 support questions.\n\nSignificant Contributors list will be updated once a month (if anyone even uses Gorgonia that is).\n\n# How To Get Support #\nThe best way of support right now is to open a ticket on Github.\n\n# Frequently Asked Questions #\n\n### Why are there seemingly random `runtime.GC()` calls in the tests? ###\n\nThe answer to this is simple - the design of the package uses CUDA in a particular way: specifically, a CUDA device and context is tied to a `VM`, instead of at the package level. This means for every `VM` created, a different CUDA context is created per device per `VM`. This way all the operations will play nicely with other applications that may be using CUDA (this needs to be stress-tested, however). \n\nThe CUDA contexts are only destroyed when the `VM` gets garbage collected (with the help of a finalizer function). In the tests, about 100 `VM`s get created, and garbage collection for the most part can be considered random. This leads to cases where the GPU runs out of memory as there are too many contexts being used. \n\nTherefore at the end of any tests that may use GPU, a `runtime.GC()` call is made to force garbage collection, freeing GPU memories.\n\nIn production, one is unlikely to start that many `VM`s, therefore it's not really a problem. If there is, open a ticket on Github, and we'll look into adding a `Finish()` method for the `VM`s.\n\n\n# Licence #\n\nGorgonia is licenced under a variant of Apache 2.0. It's for all intents and purposes the same as the Apache 2.0 Licence, with the exception of not being able to commercially profit directly from the package unless you're a Significant Contributor (for example, providing commercial support for the package). It's perfectly fine to profit directly from a derivative of Gorgonia (for example, if you use Gorgonia as a library in your product)\n\nEveryone is still allowed to use Gorgonia for commercial purposes (example: using it in a software for your business).\n\n## Various Other Copyright Notices ##\n\nThese are the packages and libraries which inspired and were adapted from in the process of writing Gorgonia (the Go packages that were used were already declared above):\n\n| Source | How it's Used | Licence |\n|------|---|-------|\n| Numpy  | Inspired large portions. Directly adapted algorithms for a few methods (explicitly labelled in the docs) | MIT/BSD-like. [Numpy Licence](https://github.com/numpy/numpy/blob/master/LICENSE.txt) |\n| Theano | Inspired large portions. (Unsure: number of directly adapted algorithms) | MIT/BSD-like [Theano's licence](http://deeplearning.net/software/theano/LICENSE.html) |\n| Caffe | `im2col` and `col2im` directly taken from Caffe. Convolution algorithms inspired by the original Caffee methods | [Caffe Licence](https://github.com/BVLC/caffe/blob/master/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C3FC:2E8679:1757BA:5C68E3:6AB9205E"},"text_sha256":"513375d1eaa2b00e62fafbc3b86e6e1eb56ce8bc5e8a2b9213ae7096afd83557"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3531","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EF:754BF:17ACAC8:1BCA85D:6AB927F3"},"commit":{"sha":"d7a3ce27c9a1ffbee531d7850485229584db8d97","url":"https://github.com/gorgonia/gorgonia/commit/d7a3ce27c9a1ffbee531d7850485229584db8d97","date":"2023-10-13T09:13:05Z","author_date":"2023-10-13T09:13:05Z","committer_date":"2023-10-13T09:13:05Z","tree_sha":"bb24ec08a5fa0f0498ff6bf012eb17607eac50e7","message_first_line":"Update README.md (#557)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3530","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:17884B0:1BA635E:6AB927F3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16055,"blob_sha":"f3e9a2343af839af8eb2f42cd8662a0ed34e5568","priority":0}],"documents":[{"path":"README.md","size":16055,"blob_sha":"f3e9a2343af839af8eb2f42cd8662a0ed34e5568","priority":0,"status":200,"text":"![Logo](https://raw.githubusercontent.com/gorgonia/gorgonia/master/media/Logo_horizontal_small.png)\n\n[![GoDoc](https://godoc.org/gorgonia.org/gorgonia?status.svg)](https://godoc.org/gorgonia.org/gorgonia) [![GitHub version](https://badge.fury.io/gh/gorgonia%2Fgorgonia.svg)](https://badge.fury.io/gh/gorgonia%2Fgorgonia) \n![Build and Tests](https://github.com/gorgonia/gorgonia/workflows/Build%20and%20Tests%20on%20Linux/amd64/badge.svg)\n[![codecov](https://codecov.io/gh/gorgonia/gorgonia/branch/master/graph/badge.svg)](https://codecov.io/gh/gorgonia/gorgonia)\n[![Go Report Card](https://goreportcard.com/badge/gorgonia.org/gorgonia)](https://goreportcard.com/report/gorgonia.org/gorgonia) [![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges)\n\n#\n\nGorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily. If this sounds like [Theano](http://deeplearning.net/software/theano/) or [TensorFlow](https://www.tensorflow.org/), it's because the idea is quite similar. Specifically, the library is pretty low-level, like Theano, but has higher goals like Tensorflow.\n\nGorgonia:\n\n* Can perform automatic differentiation\n* Can perform symbolic differentiation\n* Can perform gradient descent optimizations\n* Can perform numerical stabilization\n* Provides a number of convenience functions to help create neural networks\n* Is fairly quick (comparable to Theano and TensorFlow speed)\n* Supports CUDA/GPGPU computation (OpenCL not yet supported, send a pull request)\n* Will support distributed computing\n\n# Goals #\n\nThe primary goal for Gorgonia is to be a *highly performant* machine learning/graph computation-based library that can scale across multiple machines. It should bring the appeal of Go (simple compilation and deployment process) to the ML world. It's a long way from there currently, however, the baby steps are already there.\n\nThe secondary goal for Gorgonia is to provide a platform for the exploration of non-standard deep-learning and neural network-related things. This includes things like neo-hebbian learning, corner-cutting algorithms, evolutionary algorithms, and the like.\n\n# Why Use Gorgonia? #\n\nThe main reason to use Gorgonia is developer comfort. If you're using a Go stack extensively, now you have access to the ability to create production-ready machine learning systems in an environment that you are already familiar with and comfortable with.\n\nML/AI at large is usually split into two stages: the experimental stage where one builds various models, tests, and retests; and the deployed state where a model after being tested and played with, is deployed. This necessitates different roles like data scientist and data engineer.\n\nTypically the two phases have different tools: Python ([PyTorch](http://pytorch.org/), etc) is commonly used for the experimental stage, and then the model is rewritten in some more performant language like C++ (using [dlib](http://dlib.net/ml.html), [mlpack](http://mlpack.org) etc). Of course, nowadays the gap is closing and people frequently share the tools between them. Tensorflow is one such tool that bridges the gap.\n\nGorgonia aims to do the same but for the Go environment. Gorgonia is currently fairly performant - its speeds are comparable to PyTorch's and Tensorflow's  CPU implementations. GPU implementations are a bit finicky to compare due to the heavy CGO tax, but rest assured that this is an area of active improvement.\n\n# Getting started\n\n## Installation #\n\nThe package is go-gettable: `go get -u gorgonia.org/gorgonia`.\n\nGorgonia is compatible with Go modules.\n\n## Documentation\n\nUp-to-date documentation, references, and tutorials are present on the official Gorgonia website at [https://gorgonia.org](https://gorgonia.org).\n\n## Keeping Updated\n\nGorgonia's project has a [Slack channel on gopherslack](https://gophers.slack.com/messages/gorgonia/), as well as a [Twitter account](https://twitter.com/gorgoniaML). Official updates and announcements will be posted to those two sites.\n\n## Usage\n\nGorgonia works by creating a computation graph and then executing it. Think of it as a programming language, but is limited to mathematical functions, and has no branching capability (no if/then or loops). In fact, this is the dominant paradigm that the user should be used to thinking about. The computation graph is an [AST](http://en.wikipedia.org/wiki/Abstract_syntax_tree).\n\nMicrosoft's [CNTK](https://github.com/Microsoft/CNTK), with its BrainScript, is perhaps the best at exemplifying the idea that building a computation graph and running the computation graphs are different things and that the user should be in different modes of thought when going about them.\n\nWhilst Gorgonia's implementation doesn't enforce the separation of thought as far as CNTK's BrainScript does, the syntax does help a little bit.\n\nHere's an example - say you want to define a math expression `z = x + y`. Here's how you'd do it:\n\n[embedmd]:# (example_basic_test.go)\n```Go\npackage gorgonia_test\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t. \"gorgonia.org/gorgonia\"\n)\n\n// Basic example of representing mathematical equations as graphs.\n//\n// In this example, we want to represent the following equation\n//\t\tz = x + y\nfunc Example_basic() {\n\tg := NewGraph()\n\n\tvar x, y, z *Node\n\tvar err error\n\n\t// define the expression\n\tx = NewScalar(g, Float64, WithName(\"x\"))\n\ty = NewScalar(g, Float64, WithName(\"y\"))\n\tif z, err = Add(x, y); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// create a VM to run the program on\n\tmachine := NewTapeMachine(g)\n\tdefer machine.Close()\n\n\t// set initial values then run\n\tLet(x, 2.0)\n\tLet(y, 2.5)\n\tif err = machine.RunAll(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"%v\", z.Value())\n\t// Output: 4.5\n}\n```\n\nYou might note that it's a little more verbose than other packages of similar nature. For example, instead of compiling to a callable function, Gorgonia specifically compiles into a `*program` which requires a `*TapeMachine` to run. It also requires manual a `Let(...)` call.\n\nThe author would like to contend that this is a Good Thing - to shift one's thinking to machine-based thinking. It helps a lot in figuring out where things might go wrong.\n\nAdditionally, there is no support for branching - that is to say, there are no conditionals (if/else) or loops. The aim is not to build a Turing-complete computer.\n\n---\nMore examples are present in the `example` subfolder of the project, and step-by-step tutorials are present on the [main website](https://gorgonia.org/tutorials/)\n\n## Using CUDA ##\n\nGorgonia comes with CUDA support out of the box.\nPlease see the reference documentation about how cuda works on [the Gorgonia.org](https://gorgonia.org/reference/cuda/) website, or jump to the [tutorial](https://gorgonia.org/tutorials/mnist-cuda/).\n\n# About Gorgonia's development process\n\n## Versioning ##\n\nWe use [semver 2.0.0](http://semver.org/) for our versioning. Before 1.0, Gorgonia's APIs are expected to change quite a bit. API is defined by the exported functions, variables, and methods. For the developers' sanity, there are minor differences to SemVer that we will apply before version 1.0. They are enumerated below:\n\n* The MINOR number will be incremented every time there is a deleterious break in API. This means any deletion or any change in function signature or interface methods will lead to a change in the MINOR number.\n* Additive changes will NOT change the MINOR version number before version 1.0. This means that if new functionality were added that does not break the way you use Gorgonia, there would not be an increment in the MINOR version. There will be an increment in the PATCH version.\n\n### API Stability #\nGorgonia's API is as of right now, not considered stable. It will be stable from version 1.0 forward.\n\n\n## Go Version Support ##\n\nGorgonia supports 2 versions below the Master branch of Go. This means Gorgonia will support the current released version of Go, and up to 4 previous versions - providing something doesn't break. Where possible a shim will be provided (for things like new `sort` APIs or `math/bits` which came out in Go 1.9).\n\nThe current version of Go is 1.13.1. The earliest version Gorgonia supports is Go 1.11.x but Gonum supports only 1.12+. Therefore, the minimum Go version to run the master branch is Go > 1.12.\n\n## Hardware and OS supported ##\n\nGorgonia runs on :\n- linux/AMD64\n- linux/ARM7\n- linux/ARM64\n- win32/AMD64\n- darwin/AMD64\n- freeBSD/AMD64\n\nIf you have tested Gorgonia on other platforms, please update this list.\n\n## Hardware acceleration\n\nGorgonia uses some pure assembler instructions to accelerate some mathematical operations. Unfortunately, only amd64 is supported.\n\n\n# Contributing #\n\nObviously, since you are most probably reading this on Github, Github will form the major part of the workflow for contributing to this package.\n\nSee also: [CONTRIBUTING.md](CONTRIBUTING.md)\n\n\n## Contributors and Significant Contributors ##\nAll contributions are welcome. However, there is a new class of contributors, called Significant Contributors.\n\nA Significant Contributor has shown *a deep understanding* of how the library works and/or its environs.  Here are examples of what constitutes a Significant Contribution:\n\n* Wrote significant amounts of documentation on **why**/the mechanics of particular functions/methods and how the different parts affect one another\n* Wrote code and tests around the more intricately connected parts of Gorgonia\n* Wrote code and tests, and had at least 5 pull requests accepted\n* Provided expert analysis on parts of the package (for example, you may be a floating point operations expert who optimized one function)\n* Answered at least 10 support questions.\n\nThe significant Contributors list will be updated once a month (if anyone even uses Gorgonia that is).\n\n# How To Get Support #\nThe best way of support right now is to open a [ticket on Github](https://github.com/gorgonia/gorgonia/issues/new).\n\n# Frequently Asked Questions #\n\n### Why are there seemingly random `runtime.GC()` calls in the tests? ###\n\nThe answer to this is simple - the design of the package uses CUDA in a particular way: specifically, a CUDA device and context are tied to a `VM`, instead of at the package level. This means for every `VM` created, a different CUDA context is created per device per `VM`. This way all the operations will play nicely with other applications that may be using CUDA (this needs to be stress-tested, however).\n\nThe CUDA contexts are only destroyed when the `VM` gets garbage collected (with the help of a finalizer function). In the tests, about 100 `VM`s get created, and garbage collection for the most part can be considered random. This leads to cases where the GPU runs out of memory as there are too many contexts being used.\n\nTherefore at the end of any tests that may use GPU, a `runtime.GC()` call is made to force garbage collection, freeing GPU memories.\n\nIn production, one is unlikely to start that many `VM`s, therefore it's not a problem. If there is, open a ticket on GitHub, and we'll look into adding a `Finish()` method for the `VM`s.\n\n\n# Licence #\n\nGorgonia is licensed under a variant of Apache 2.0. It's the same as the Apache 2.0 Licence, except not being able to commercially profit directly from the package unless you're a Significant Contributor (for example, providing commercial support for the package). It's perfectly fine to profit directly from a derivative of Gorgonia (for example, if you use Gorgonia as a library in your product)\n\nEveryone is still allowed to use Gorgonia for commercial purposes (for example: using it in software for your business).\n\n## Dependencies ##\n\nThere are very few dependencies that Gorgonia uses - and they're all pretty stable, so as of now there isn't a need for vendoring tools. These are the list of external packages that Gorgonia calls, ranked in order of reliance that this package has (sub-packages are omitted):\n\n|Package|Used For|Vitality|Notes|Licence|\n|-------|--------|--------|-----|-------|\n|[gonum/graph](https://github.com/gonum/gonum/tree/master/graph)| Sorting `*ExprGraph`| Vital. Removal means Gorgonia will not work | Development of Gorgonia is committed to keeping up with the most updated version|[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[gonum/blas](https://github.com/gonum/gonum/tree/master/blas)|Tensor subpackage linear algebra operations|Vital. Removal means Gorgonial will not work|Development of Gorgonia is committed to keeping up with the most updated version|[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[cu](https://gorgonia.org/cu)| CUDA drivers | Needed for CUDA operations | Same maintainer as Gorgonia | MIT/BSD-like|\n|[math32](https://github.com/chewxy/math32)|`float32` operations|Can be replaced by `float32(math.XXX(float64(x)))`|Same maintainer as Gorgonia, same API as the built-in `math` package|MIT/BSD-like|\n|[hm](https://github.com/chewxy/hm)|Type system for Gorgonia|Gorgonia's graphs are pretty tightly coupled with the type system | Same maintainer as Gorgonia | MIT/BSD-like|\n|[vecf64](https://gorgonia.org/vecf64)| optimized `[]float64` operations | Can be generated in the `tensor/genlib` package. However, plenty of optimizations have been made/will be made | Same maintainer as Gorgonia | MIT/BSD-like|\n|[vecf32](https://gorgonia.org/vecf32)| optimized `[]float32` operations | Can be generated in the `tensor/genlib` package. However, plenty of optimizations have been made/will be made | Same maintainer as Gorgonia | MIT/BSD-like|\n|[set](https://github.com/xtgo/set)|Various set operations|Can be easily replaced|Stable API for the past 1 year|[set licence](https://github.com/xtgo/set/blob/master/LICENSE) (MIT/BSD-like)|\n|[gographviz](https://github.com/awalterschulze/gographviz)|Used for printing graphs|Graph printing is only vital to debugging. Gorgonia can survive without, but with a major (but arguably nonvital) feature loss|Last update 12th April 2017|[gographviz license](https://github.com/awalterschulze/gographviz/blob/master/LICENSE) (Apache 2.0)|\n|[rng](https://github.com/leesper/go_rng)|Used to implement helper functions to generate initial weights|Can be replaced fairly easily. Gorgonia can do without the convenience functions too||[rng license](https://github.com/leesper/go_rng/blob/master/LICENSE) (Apache 2.0)|\n|[errors](https://github.com/pkg/errors)|Error wrapping|Gorgonia won't die without it. In fact Gorgonia has also used [goerrors/errors](https://github.com/go-errors/errors) in the past.|Stable API for the past 6 months|[errors licence](https://github.com/pkg/errors/blob/master/LICENSE) (MIT/BSD-like)|\n|[gonum/mat](http://github.com/gonum/gonum)|Compatibility between `Tensor` and Gonum's Matrix|Development of Gorgonia is committed to keeping up with the most updated version||[gonum license](https://github.com/gonum/license) (MIT/BSD-like)|\n|[testify/assert](https://github.com/stretchr/testify)|Testing|Can do without but will be a massive pain in the ass to test||[testify license](https://github.com/stretchr/testify/blob/master/LICENSE) (MIT/BSD-like)|\n\n\n## Various Other Copyright Notices ##\n\nThese are the packages and libraries that inspired and were adapted from in the process of writing Gorgonia (the Go packages that were used were already declared above):\n\n| Source | How it's Used | Licence |\n|------|---|-------|\n| Numpy  | Inspired large portions. Directly adapted algorithms for a few methods (explicitly labeled in the docs) | MIT/BSD-like. [Numpy Licence](https://github.com/numpy/numpy/blob/master/LICENSE.txt) |\n| Theano | Inspired large portions. (Unsure: number of directly adapted algorithms) | MIT/BSD-like [Theano's license](http://deeplearning.net/software/theano/LICENSE.html) |\n| Caffe | `im2col` and `col2im` directly taken from Caffe. Convolution algorithms inspired by the original Caffee methods | [Caffe Licence](https://github.com/BVLC/caffe/blob/master/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1EDC:241B62:172E5A:5C4262:6AB92058"},"text_sha256":"6fc95fcfd3f42db50440b523b356f2c7d48df25fd3772b36ab6da0de51c53b78"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"google-deepmind/dm_control","input_row":{"repository":"google-deepmind/dm_control","url":"https://github.com/google-deepmind/dm_control","name":"dm_control","owner":"google-deepmind","description":"Google DeepMind's software stack for physics-based simulation and Reinforcement Learning environments, using MuJoCo.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4703,"issues":442,"created_at":"2017-12-29T18:13:15Z","updated_at":"2026-09-27T12:56:41Z","first_commit_at":"2018-01-02T19:35:47Z","last_commit_at":"2026-09-22T21:12:31Z","activity_months":104.63,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:04.760Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"google-deepmind/dm_control","visibility":"public","created_at":"2017-12-29T18:13:15Z","updated_at":"2026-09-27T12:56:41Z","private":false,"fork":false,"archived":false,"stargazers_count":4703,"open_issues_count":131,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3529","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D665AE:FBEEB8:6AB927F4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3528","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:17DBDA9:1BF938D:6AB927F5"},"commit":{"sha":"c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711","url":"https://github.com/google-deepmind/dm_control/commit/c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711","date":"2018-01-26T14:14:17Z","author_date":"2018-01-25T22:59:17Z","committer_date":"2018-01-26T14:14:17Z","tree_sha":"e08929593b98ea87ed3b23334b69d0a4aaa3d1d7","message_first_line":"Add a .gitignore file"},"tree_request_status":200,"tree_rate":{"github_remaining":"3527","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:17D28B0:1BF040B:6AB927F5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3674,"blob_sha":"88347476ac78f955f6a25b4a35bfb0f1b459494f","priority":0}],"documents":[{"path":"README.md","size":3674,"blob_sha":"88347476ac78f955f6a25b4a35bfb0f1b459494f","priority":0,"status":200,"text":"# `dm_control`: The DeepMind Control Suite and Package\n\n# ![all domains](all_domains.png)\n\nThis package contains:\n\n- A set of Python Reinforcement Learning environments powered by the MuJoCo\n  physics engine. See the `suite` subdirectory.\n\n- Libraries that provide Python bindings to the MuJoCo physics engine.\n\nIf you use this package, please cite our accompanying accompanying [tech report](https://arxiv.org/abs/1801.00690).\n\n## Installation and requirements\n\nFollow these steps to install `dm_control`:\n\n1. Download MuJoCo Pro 1.50 from the download page on the [MuJoCo website](http://www.mujoco.org/).\n   MuJoCo Pro must be installed before `dm_control`, since `dm_control`'s\n   install script generates Python [`ctypes`](https://docs.python.org/2/library/ctypes.html)\n   bindings based on MuJoCo's header files. By default, `dm_control` assumes\n   that the MuJoCo Zip archive is extracted as `~/.mujoco/mjpro150`.\n\n2. Install the `dm_control` Python package by running\n   `pip install git+git://github.com/deepmind/dm_control.git`\n   (PyPI package coming soon) or by cloning the repository and running\n   `pip install /path/to/dm_control/`\n   At installation time, `dm_control` looks for the MuJoCo headers from Step 1\n   in `~/.mujoco/mjpro150/include`, however this path can be configured with the\n   `headers-dir` command line argument.\n\n3. Install a license key for MuJoCo, required by `dm_control` at runtime. See\n   the [MuJoCo license key page](https://www.roboti.us/license.html) for further\n   details. By default, `dm_control` looks for the MuJoCo license key file at\n   `~/.mujoco/mjkey.txt`.\n\n4. If the license key (e.g. `mjkey.txt`) or the shared library provided by\n   MuJoCo Pro (e.g. `libmujoco150.so` or `libmujoco150.dylib`) are installed at\n   non-default paths, specify their locations using the `MJKEY_PATH` and\n   `MJLIB_PATH` environment variables respectively.\n\n## Additional instructions for Linux\n\nInstall `GLFW` and `GLEW` through your Linux distribution's package manager.\nFor example, on Debian and Ubuntu, this can be done by running\n`sudo apt-get install libglfw3 libglew2.0`.\n\n## Additional instructions for Homebrew users on macOS\n\n1. The above instructions using `pip` should work, provided that you\n   use a Python interpreter that is installed by Homebrew (rather than the\n   system-default one).\n\n2. To get OpenGL working, install the `glfw` package from Homebrew by running\n   `brew install glfw`.\n\n3. Before running, the `DYLD_LIBRARY_PATH` environment variable needs to be\n   updated with the path to the GLFW library. This can be done by running\n   `export DYLD_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_LIBRARY_PATH`.\n\n## Control Suite quickstart\n\n```python\nfrom dm_control import suite\nimport numpy as np\n\n# Load one task:\nenv = suite.load(domain_name=\"cartpole\", task_name=\"swingup\")\n\n# Iterate over a task set:\nfor domain_name, task_name in suite.BENCHMARKING:\n  env = suite.load(domain_name, task_name)\n\n# Step through an episode and print out reward, discount and observation.\naction_spec = env.action_spec()\ntime_step = env.reset()\nwhile not time_step.last():\n  action = np.random.uniform(action_spec.minimum,\n                             action_spec.maximum,\n                             size=action_spec.shape)\n  time_step = env.step(action)\n  print(time_step.reward, time_step.discount, time_step.observation)\n```\n\nSee our [tech report](https://arxiv.org/abs/1801.00690) for further details.\n\n## Illustration video\n\nBelow is a video montage of solved Control Suite tasks, with reward\nvisualisation enabled.\n\n[![Video montage](https://img.youtube.com/vi/rAai4QzcYbs/0.jpg)](https://www.youtube.com/watch?v=rAai4QzcYbs)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"488C:40B0C:1771DF:5C85F8:6AB92062"},"text_sha256":"7e76506eecc58eff6a2ab766941f1de935f30658f1aa1d4f5fd3731e1572c81b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3526","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:179FF47:1BBDDF0:6AB927F6"},"commit":{"sha":"61931fe34bf0a7201addfc02fa328e2a10eff406","url":"https://github.com/google-deepmind/dm_control/commit/61931fe34bf0a7201addfc02fa328e2a10eff406","date":"2026-06-28T12:53:18Z","author_date":"2026-06-28T12:52:48Z","committer_date":"2026-06-28T12:53:18Z","tree_sha":"ea51139a1f0e9de612ef567e02ddb2a63a454d7b","message_first_line":"Support dynamic attributes for Pyrefly in classes using HAS_DYNAMIC_ATTRIBUTES"},"tree_request_status":200,"tree_rate":{"github_remaining":"3525","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:177A739:1B97038:6AB927F6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5907,"blob_sha":"b0d3f77b8aede5c41f403c60e60fba771a03b333","priority":0}],"documents":[{"path":"README.md","size":5907,"blob_sha":"b0d3f77b8aede5c41f403c60e60fba771a03b333","priority":0,"status":200,"text":"# `dm_control`: Google DeepMind Infrastructure for Physics-Based Simulation.\n\nGoogle DeepMind's software stack for physics-based simulation and Reinforcement\nLearning environments, using MuJoCo physics.\n\nAn **introductory tutorial** for this package is available as a Colaboratory\nnotebook:\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/dm_control/blob/main/tutorial.ipynb)\n\n## Overview\n\nThis package consists of the following \"core\" components:\n\n-   [`dm_control.mujoco`]: Libraries that provide Python bindings to the MuJoCo\n    physics engine.\n\n-   [`dm_control.suite`]: A set of Python Reinforcement Learning environments\n    powered by the MuJoCo physics engine.\n\n-   [`dm_control.viewer`]: An interactive environment viewer.\n\nAdditionally, the following components are available for the creation of more\ncomplex control tasks:\n\n-   [`dm_control.mjcf`]: A library for composing and modifying MuJoCo MJCF\n    models in Python.\n\n-   `dm_control.composer`: A library for defining rich RL environments from\n    reusable, self-contained components.\n\n-   [`dm_control.locomotion`]: Additional libraries for custom tasks.\n\n-   [`dm_control.locomotion.soccer`]: Multi-agent soccer tasks.\n\nIf you use this package, please cite our accompanying [publication]:\n\n```\n@article{tunyasuvunakool2020,\n         title = {dm_control: Software and tasks for continuous control},\n         journal = {Software Impacts},\n         volume = {6},\n         pages = {100022},\n         year = {2020},\n         issn = {2665-9638},\n         doi = {https://doi.org/10.1016/j.simpa.2020.100022},\n         url = {https://www.sciencedirect.com/science/article/pii/S2665963820300099},\n         author = {Saran Tunyasuvunakool and Alistair Muldal and Yotam Doron and\n                   Siqi Liu and Steven Bohez and Josh Merel and Tom Erez and\n                   Timothy Lillicrap and Nicolas Heess and Yuval Tassa},\n}\n```\n\n## Installation\n\nInstall `dm_control` from PyPI by running\n\n```sh\npip install dm_control\n```\n\n> **Note**: **`dm_control` cannot be installed in \"editable\" mode** (i.e. `pip\n> install -e`).\n>\n> While `dm_control` has been largely updated to use the pybind11-based bindings\n> provided via the `mujoco` package, at this time it still relies on some legacy\n> components that are automatically generated from MuJoCo header files in a way\n> that is incompatible with editable mode. Attempting to install `dm_control` in\n> editable mode will result in import errors like:\n>\n> ```\n> ImportError: cannot import name 'constants' from partially initialized module 'dm_control.mujoco.wrapper.mjbindings' ...\n> ```\n>\n> The solution is to `pip uninstall dm_control` and then reinstall it without\n> the `-e` flag.\n\n## Versioning\n\nStarting from version 1.0.0, we adopt semantic versioning.\n\nPrior to version 1.0.0, the `dm_control` Python package was versioned `0.0.N`,\nwhere `N` was an internal revision number that increased by an arbitrary amount\nat every single Git commit.\n\nIf you want to install an unreleased version of `dm_control` directly from our\nrepository, you can do so by running `pip install\ngit+https://github.com/google-deepmind/dm_control.git`.\n\n## Rendering\n\nThe MuJoCo Python bindings support three different OpenGL rendering backends:\nEGL (headless, hardware-accelerated), GLFW (windowed, hardware-accelerated), and\nOSMesa (purely software-based). At least one of these three backends must be\navailable in order render through `dm_control`.\n\n*   Hardware rendering with a windowing system is supported via GLFW and GLEW.\n    On Linux these can be installed using your distribution's package manager.\n    For example, on Debian and Ubuntu, this can be done by running `sudo apt-get\n    install libglfw3 libglew2.0`. Please note that:\n\n    -   [`dm_control.viewer`] can only be used with GLFW.\n    -   GLFW will not work on headless machines.\n\n*   \"Headless\" hardware rendering (i.e. without a windowing system such as X11)\n    requires [EXT_platform_device] support in the EGL driver. Recent Nvidia\n    drivers support this. You will also need GLEW. On Debian and Ubuntu, this\n    can be installed via `sudo apt-get install libglew2.0`.\n\n*   Software rendering requires GLX and OSMesa. On Debian and Ubuntu these can\n    be installed using `sudo apt-get install libgl1-mesa-glx libosmesa6`.\n\nBy default, `dm_control` will attempt to use GLFW first, then EGL, then OSMesa.\nYou can also specify a particular backend to use by setting the `MUJOCO_GL=`\nenvironment variable to `\"glfw\"`, `\"egl\"`, or `\"osmesa\"`, respectively. When\nrendering with EGL, you can also specify which GPU to use for rendering by\nsetting the environment variable `MUJOCO_EGL_DEVICE_ID=` to the target GPU ID.\n\n## Additional instructions for Homebrew users on macOS\n\n1.  The above instructions using `pip` should work, provided that you use a\n    Python interpreter that is installed by Homebrew (rather than the\n    system-default one).\n\n2.  Before running, the `DYLD_LIBRARY_PATH` environment variable needs to be\n    updated with the path to the GLFW library. This can be done by running\n    `export DYLD_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_LIBRARY_PATH`.\n\n[EXT_platform_device]: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_device.txt\n[Releases page on the MuJoCo GitHub repository]: https://github.com/google-deepmind/mujoco/releases\n[MuJoCo website]: https://mujoco.org/\n[publication]: https://doi.org/10.1016/j.simpa.2020.100022\n[`ctypes`]: https://docs.python.org/3/library/ctypes.html\n[`dm_control.mjcf`]: dm_control/mjcf/README.md\n[`dm_control.mujoco`]: dm_control/mujoco/README.md\n[`dm_control.suite`]: dm_control/suite/README.md\n[`dm_control.viewer`]: dm_control/viewer/README.md\n[`dm_control.locomotion`]: dm_control/locomotion/README.md\n[`dm_control.locomotion.soccer`]: dm_control/locomotion/soccer/README.md\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27E2:2C474:1796A2:5CAA7D:6AB92064"},"text_sha256":"e53d82509e4fa008a85a55639a41a2bd941e2377d111b6eb3a05e3630bfffc75"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"okfn-brasil/serenata-de-amor","input_row":{"repository":"okfn-brasil/serenata-de-amor","url":"https://github.com/okfn-brasil/serenata-de-amor","name":"serenata-de-amor","owner":"okfn-brasil","description":"🕵 Artificial Intelligence for social control of public administration | **This repository does not receive frequent updates. Check out the README**","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4612,"issues":193,"created_at":"2016-06-27T20:55:11Z","updated_at":"2026-09-22T21:21:21Z","first_commit_at":"2016-06-27T20:55:49Z","last_commit_at":"2024-01-31T20:29:15Z","activity_months":91.129999999999995,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:07.614Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"okfn-brasil/serenata-de-amor","visibility":"public","created_at":"2016-06-27T20:55:11Z","updated_at":"2026-09-22T21:21:21Z","private":false,"fork":false,"archived":false,"stargazers_count":4612,"open_issues_count":69,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3524","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:17D2481:1BF03DD:6AB927F7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3523","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:184E529:1C6C60B:6AB927F8"},"commit":{"sha":"239e49efcd559d0108f8e123257f56603918fe45","url":"https://github.com/okfn-brasil/serenata-de-amor/commit/239e49efcd559d0108f8e123257f56603918fe45","date":"2018-05-23T08:16:36Z","author_date":"2018-05-23T08:16:36Z","committer_date":"2018-05-23T08:16:36Z","tree_sha":"a9a012e875bfd00712b52f43f8a8b01850aa0a55","message_first_line":"Fix hoek vulnerability"},"tree_request_status":200,"tree_rate":{"github_remaining":"3522","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:17C7EB6:1BE5D17:6AB927F8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6326,"blob_sha":"5bb42cd7ae57e36ae9420563c2249a6a83f10401","priority":0}],"documents":[{"path":"README.md","size":6326,"blob_sha":"5bb42cd7ae57e36ae9420563c2249a6a83f10401","priority":0,"status":200,"text":"[![Build Status](https://img.shields.io/travis/okfn-brasil/serenata-de-amor.svg)](https://travis-ci.org/okfn-brasil/serenata-de-amor)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability-percentage/okfn-brasil/serenata-de-amor.svg)](https://codeclimate.com/github/okfn-brasil/serenata-de-amor)\n[![Test Coverage](https://img.shields.io/codeclimate/coverage/okfn-brasil/serenata-de-amor.svg)](https://codeclimate.com/github/okfn-brasil/serenata-de-amor/test_coverage)\n[![Donate](https://img.shields.io/badge/donate-apoia.se-EB4A3B.svg)](https://apoia.se/serenata)\n\n# [![Operação Serenata de Amor](docs/logo.png)](https://serenata.ai/en)\n\n1. [**Non-tech** crash course into Operação Serenata de Amor](#non-tech-crash-course-into-operação-serenata-de-amor)\n2. [**Tech** crash course into Operação Serenata de Amor](#tech-crash-course-into-operação-serenata-de-amor)\n3. [Contributing with code and tech skills](#contributing-with-code-and-tech-skills)\n4. [Supporting](#supporting)\n5. [Acknowledgments](#acknowledgments)\n\n## Non-tech crash course into Operação Serenata de Amor\n\n### What\n\nSerenata de Amor is an open project using artificial intelligence for social control of public administration.\n\n### Who\n\nWe are a group of people who believes in _power to the people_ motto. We are also part of the _Data Science for Civic Innovation Programme_ from [Open Knowledge Brasil](http://br.okfn.org).\n\nAmong founders and long-term members, we can list a group of eight people – plus numerous contributors from the open source and open knowledge communities:  [Tatiana Balachova](https://tatianasb.ru), [Felipe Cabral](https://twitter.com/felipebcabral), [Eduardo Cuducos](https://cuducos.me),  [Irio Musskopf](https://iriomk.com), [Bruno Pazzim](http://brunopazzim.com/), [Ana Schwendler](http://anaschwendler.com/), [Jessica Temporal](http://jtemporal.com/) and [Pedro Vilanova](https://twitter.com/pedrovilanova).\n\n### How\n\nWe use technology just like large organizations such as Google, Facebook and Netflix in order to track government spendings and to make open data accessible for everyone. We started looking into data from the Chamber of Deputies (Brazilian lower house) but we expanded to the Federal Senate (Brazilian upper house) and to municipalities.\n\n### When\n\nIrio had the main ideas for the project in early 2016. For a few moths he was experimenting and gathering people around the project. September, 2016 marks the launching of [our first crowd funding](https://catarse.me/serenata). Since then we have been creating open source technological products and tools, as well as high quality content on civic tech on our [Facebook](https://fb.com/operacaoserenatadeamor) and [Medium](https://medium.com/serenata).\n\n### Where\n\nWe have no non-virtual headquarter, but we work remotely everyday. Most our ideas are crafted to work in any country that offers open data, but our main implementations focus in Brazil.\n\n### Why\n\nEmpowering citizens with data is quite important nowadays: people talk about _smart cities_, _surveillance_ and _privacy_. We prefer to focus on _smart citizens_, _accountability_ and _open knowledge_.\n\n## Tech crash course into Operação Serenata de Amor\n\n### What\n\nSerenata de Amor develops open source tools to make it easy for people use open data. The focus is to gather relevant insights, share them in an accessible interface in order invite citizens to dialogue with politicians, state and government about public spendings.\n\n### Who\n\nSerenata's main role is played by [Rosie](rosie/README.md): she is an artificial intelligence who analyzes Brazilian congresspeople expenses while they are in office. Rosie can find suspicious spendings and engage citizens in the discussion about these findings. [She's on Twitter](https://twitter.com/RosieDaSerenata).\n\nTo allow people to visualize and make sense of data Rosie generates, we have created [Jarbas](jarbas/README.md). In this website users can browse congresspeople expenses and get details about each one of the suspicions. It is the starting point to validate a suspicion.\n\n### How\n\nWe have three main repositories [on GitHub](https://github.com/okfn-brasil). This is the _main repo_ and hosts [Rosie](rosie/README.md), [Jarbas](jarbas/README.md) and more experimental code in the `research/` directory.\n\nIn addition we have the [Whistleblower](https://github.com/okfn-brasil/whistleblower) – the tool that gives Rosie the power to tweet – and the [toolbox](https://gtihub.com/okfn-brasil/serenata-toolbox) - a `pip` installable package to follow the [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) principle alongside our repos and modules.\n\n### When\n\nIn spite of all these players acting together, the core part of the job is ran manually from times to times. The only part that is always online is Jarbas – freely serving a wide range of information about public expenditure 24/7.\n\nRoughly once a month we manually run Rosie and update Jarbas. A few times per year we upload versioned datasets accessible via the toolbox – but we encourage you to use the toolbox to generate fresh datasets whenever you need.\n\n### Where\n\nJarbas is running in [Digital Ocean](https://digitalocean.com) droplets, and deployed using the [Docker Cloud](https://cloud.docker.com/) architecture.\n\n### Why\n\nThe answer to most technical _why_ questions is because that was what we have got at hand in the past, and that enable us to deliver fast. We acknowledge that this is not the best stack ever, but so far that is what brought us here.\n\n## Contributing with code and tech skills\n\nMake sure you have read the _Tech crash course_ in this page. Next checkout our [contributing guide](CONTRIBUTING.md).\n\n## Supporting\n\n* Join our [recurring crowd funding campaign on Apoia.se](http://apoia.se/serenata)\n* Donate via Bitcoin to [`1Gbvfjmjvur7qwbwNFdPSNDgx66KSdVB5b`](https://blockchain.info/address/1Gbvfjmjvur7qwbwNFdPSNDgx66KSdVB5b)\n* Follow, share and interact with us [on Facebook](https://fb.com/operacaoserenatadeamor)\n* Follow, retweet and join [Rosie on Twitter](https://twitter.com/RosieDaSerenata) to interact with your favourite congresspeople\n\n## Acknowledgments\n\n[![Open Knowledge Brasil](docs/okbr.png)](https://br.okfn.org) [![Digital Ocean](docs/digitalocean.png)](https://digitalocean.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E5E:7A4F8:17B9B7:5CCE43:6AB92066"},"text_sha256":"68661d4a6795bbb520f77c48e451c77b19403f8e3c9dfe53a88cfb65b3f5e483"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3521","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A0:0AC4:127673C:15C431C:6AB927F9"},"commit":{"sha":"e7aeba78100b1ec96c2a79a85d6f5dfd1a8adaf7","url":"https://github.com/okfn-brasil/serenata-de-amor/commit/e7aeba78100b1ec96c2a79a85d6f5dfd1a8adaf7","date":"2024-01-31T20:29:15Z","author_date":"2024-01-31T20:29:15Z","committer_date":"2024-01-31T20:29:15Z","tree_sha":"15d1a9e442b79bad19155471b8aa655a3c6199b9","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3520","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092C:6E429:17C1F84:1BDFBAB:6AB927F9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7012,"blob_sha":"11ed4a18ba267c72024cadea6b41ad743d5195b1","priority":0}],"documents":[{"path":"README.md","size":7012,"blob_sha":"11ed4a18ba267c72024cadea6b41ad743d5195b1","priority":0,"status":200,"text":"[![Build Status](https://img.shields.io/travis/okfn-brasil/serenata-de-amor/main.svg)](https://travis-ci.org/okfn-brasil/serenata-de-amor)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability-percentage/okfn-brasil/serenata-de-amor.svg)](https://codeclimate.com/github/okfn-brasil/serenata-de-amor)\n[![Test Coverage](https://img.shields.io/codeclimate/coverage/okfn-brasil/serenata-de-amor.svg)](https://codeclimate.com/github/okfn-brasil/serenata-de-amor/test_coverage)\n[![Donate](https://img.shields.io/badge/donate-apoia.se-EB4A3B.svg)](https://apoia.se/serenata)\n\n# [![Operação Serenata de Amor](docs/logo.png)](https://serenata.ai/en)\n\n1. [**Non-tech** crash course into Operação Serenata de Amor](#non-tech-crash-course-into-operação-serenata-de-amor)\n2. [**Tech** crash course into Operação Serenata de Amor](#tech-crash-course-into-operação-serenata-de-amor)\n3. [Contributing with code and tech skills](#contributing-with-code-and-tech-skills)\n4. [Supporting](#supporting)\n5. [Update](#update)\n6. [Acknowledgments](#acknowledgments)\n\n## Non-tech crash course into Operação Serenata de Amor\n\n### What\n\nSerenata de Amor is an open project using artificial intelligence for social control of public administration.\n\n### Who\n\nWe are a group of people who believes in _power to the people_ motto. We are also part of the _Data Science for Civic Innovation Programme_ from [Open Knowledge Brasil](http://br.okfn.org).\n\nAmong founders and long-term members, we can list a group of eight people – plus numerous contributors from the open source and open knowledge communities:  [Tatiana Balachova](https://tatianasb.ru), [Felipe Cabral](https://twitter.com/felipebcabral), [Eduardo Cuducos](https://cuducos.me),  [Irio Musskopf](https://iriomk.com), [Bruno Pazzim](http://brunopazzim.com/), [Ana Schwendler](http://anaschwendler.com/), [Jessica Temporal](http://jtemporal.com/), [Yasodara Córdova](https://twitter.com/yaso) and [Pedro Vilanova](https://twitter.com/pedrovilanova).\n\n### How\n\nSimilar to organizations like Google, Facebook, and Netflix, we use technology to track government spendings and make open data accessible for everyone. We started looking into data from the Chamber of Deputies (Brazilian lower house) but we expanded to the Federal Senate (Brazilian upper house) and to municipalities.\n\n### When\n\nIrio had the main ideas for the project in early 2016. For a few months, he experimented and gathered people around the project. September, 2016 marks the launching of [our first crowd funding](https://catarse.me/serenata). Since then, we have been creating open source technological products and tools, as well as high quality content on civic tech on our [Facebook](https://fb.com/operacaoserenatadeamor) and [Medium](https://medium.com/serenata).\n\n### Where\n\nWe have no non-virtual headquarters, but we work remotely everyday. Most of our ideas are crafted to work in any country that offers open data, but our main implementations focus in Brazil.\n\n### Why\n\nEmpowering citizens with data is important: people talk about _smart cities_, _surveillance_ and _privacy_. We prefer to focus on _smart citizens_, _accountability_ and _open knowledge_.\n\n## Tech crash course into Operação Serenata de Amor\n\n### What\n\nSerenata de Amor develops open source tools to make it easy for people to use open data. The focus is to gather relevant insights and share them in an accessible interface. Through this interface, we invite citizens to dialogue with politicians, state and government about public spendings.\n\n### Who\n\nSerenata's main role is played by [Rosie](rosie/README.md): she is an artificial intelligence who analyzes Brazilian congresspeople expenses while they are in office. Rosie can find suspicious spendings and engage citizens in the discussion about these findings. [She's on Twitter](https://twitter.com/RosieDaSerenata).\n\nTo allow people to visualize and make sense of data Rosie generates, we have created [Jarbas](jarbas/README.md). On this website, users can browse congresspeople expenses and get details about each of the suspicions. It is the starting point to validate a suspicion.\n\n### How\n\nWe have two main repositories [on GitHub](https://github.com/okfn-brasil). This is the _main repo_ and hosts [Rosie](rosie/README.md) and [Jarbas](jarbas/README.md). In addition, we have the [toolbox](https://github.com/okfn-brasil/serenata-toolbox) - a `pip` installable package. Yet there are experimental [notebooks](https://github.com/okfn-brasil/notebooks) maintained by the community and our [static webpage](https://github.com/okfn-brasil/serenata-website).\n\n### When\n\nDespite all these players acting together, the core part of the job is ran manually from time to time. The only part that is always online is Jarbas – freely serving a wide range of information about public expenditure 24/7.\n\nRoughly once a month, we manually run Rosie and update Jarbas. A few times per year, we upload versioned datasets accessible via the toolbox – but we encourage you to use the toolbox to generate fresh datasets whenever you need.\n\n### Where\n\nJarbas is running in [Digital Ocean](https://digitalocean.com) droplets, and deployed using the [Docker Cloud](https://cloud.docker.com/) architecture.\n\n### Why\n\nThe answer to most technical _why_ questions is because that is what we had in the past and enabled us to deliver fast. We acknowledge that this is not the best stack ever, but it has brought us here.\n\n## Contributing with code and tech skills\n\nMake sure you have read the _Tech crash course_ on this page. Next, check out our [contributing guide](CONTRIBUTING.md).\n\n## Supporting\n\n* Join our [recurring crowd funding campaign on Apoia.se](http://apoia.se/serenata)\n* Donate via Bitcoin to [`1Gbvfjmjvur7qwbwNFdPSNDgx66KSdVB5b`](https://blockchain.info/address/1Gbvfjmjvur7qwbwNFdPSNDgx66KSdVB5b)\n* Follow, share and interact with us [on Facebook](https://fb.com/operacaoserenatadeamor)\n* Follow, retweet and join [Rosie on Twitter](https://twitter.com/RosieDaSerenata) to interact with your favourite congresspeople\n\n## Update\n\nOperation Serenata de Amor expanded into new projects. Because of this, Rosie, Jarbas and the infrastructure in general are receiving updates less frequently. If you have experience and want to help us resolve bugs faster or propose improvements, join our [Discord](https://go.ok.org.br/discord) and let's talk about the project! On the other hand, if you are looking for an active community to collaborate with, we invite you to discover the [Querido Diário project](https://github.com/okfn-brasil/querido-diario).\n\nFinally, if you want to know more details about Serenata's current situation, you can consult this text (in Portuguese) available on [Apoia.se](https://apoia.se/serenata/contents/view/Por-onde-anda-a-Operacao-Serenata-de-Amor-w9FjFX-az).\n\n## Acknowledgments\n\n[![Open Knowledge Brasil](docs/okbr.png)](https://br.okfn.org) [![Digital Ocean](docs/digitalocean.png)](https://digitalocean.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6DCA:38C7FC:176F46:5927E2:6AB92068"},"text_sha256":"2718104d0228720e29f9a5be37ae524ef19f7f2dcec32ea658a5f1af672b40b5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gopherdata/gophernotes","input_row":{"repository":"gopherdata/gophernotes","url":"https://github.com/gopherdata/gophernotes","name":"gophernotes","owner":"gopherdata","description":"The Go kernel for Jupyter notebooks and nteract.","language":"Go","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3966,"issues":187,"created_at":"2016-01-22T19:22:16Z","updated_at":"2026-09-23T13:56:37Z","first_commit_at":"2016-01-23T01:08:26Z","last_commit_at":"2026-09-09T18:57:02Z","activity_months":127.55,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:10.570Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gopherdata/gophernotes","visibility":"public","created_at":"2016-01-22T19:22:16Z","updated_at":"2026-09-23T13:56:37Z","private":false,"fork":false,"archived":false,"stargazers_count":3966,"open_issues_count":54,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3519","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:17ED899:1C0B842:6AB927FA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3518","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E0:8656E:17AA793:1BC81F7:6AB927FA"},"commit":{"sha":"e7a966350e2da9ea19d939763aaca3b93a2a7290","url":"https://github.com/gopherdata/gophernotes/commit/e7a966350e2da9ea19d939763aaca3b93a2a7290","date":"2018-04-07T14:34:50Z","author_date":"2018-04-07T14:34:50Z","committer_date":"2018-04-07T14:34:50Z","tree_sha":"a319c2560ac607e5f3eeb2b087e4783b65f46a01","message_first_line":"display images: show as image each expression result that implements Go interface 'image.Image'"},"tree_request_status":200,"tree_rate":{"github_remaining":"3517","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:1771BE2:1B8E499:6AB927FB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9092,"blob_sha":"04cf2fd49474adbf9df3b141387105aa25f091ce","priority":0}],"documents":[{"path":"README.md","size":9092,"blob_sha":"04cf2fd49474adbf9df3b141387105aa25f091ce","priority":0,"status":200,"text":"![alt tag](files/gophernotes-logo.png)\n\n# gophernotes - Use Go in Jupyter notebooks and nteract\n\n`gophernotes` is a Go kernel for [Jupyter](http://jupyter.org/) notebooks and [nteract](https://nteract.io/).  It lets you use Go interactively in a browser-based notebook or desktop app.  Use `gophernotes` to create and share documents that contain live Go code, equations, visualizations and explanatory text.  These notebooks, with the live Go code, can then be shared with others via email, Dropbox, GitHub and the [Jupyter Notebook Viewer](http://nbviewer.jupyter.org/). Go forth and do data science, or anything else interesting, with Go notebooks!\n\n**Acknowledgements** - This project utilizes a Go interpreter called [gomacro](https://github.com/cosmos72/gomacro) under the hood to evaluate Go code interactively. The gophernotes logo was designed by the brilliant [Marcus Olsson](https://github.com/marcusolsson) and was inspired by Renee French's original Go Gopher design. \n\n- [Examples](#examples)\n- Install gophernotes:\n  - [Prerequisites](#prerequisites)\n  - [Linux](#linux)\n  - [Mac](#mac)\n  - [Windows](#windows)\n  - [Docker](#docker)\n- [Getting Started](#getting-started)\n- [Limitations](#limitations)\n- [Troubleshooting](#troubleshooting)\n\n## Examples\n\n### Jupyter Notebook:  \n\n![](files/jupyter.gif)  \n\n### nteract:\n\n![](files/nteract.gif)\n\n### Example Notebooks (dowload and run them locally, follow the links to view in Github, or use the [Jupyter Notebook Viewer](http://nbviewer.jupyter.org/)):\n- [Worker Pools](examples/Worker_Pools.ipynb)\n- [Matrix Operations](examples/Matrix_Operations.ipynb)\n- [Facial Recognition](examples/Facial_Recognition_MachineBox.ipynb)\n\n## Installation\n\n### Prerequisites\n\n- [Go 1.9+](https://golang.org/doc/install) - including GOPATH/bin added to your PATH (i.e., you can run Go binaries that you `go install`).\n- [Jupyter Notebook](http://jupyter.readthedocs.io/en/latest/install.html) or [nteract](https://nteract.io/desktop)\n- [ZeroMQ 4.X.X](http://zeromq.org/intro:get-the-software) - for convenience, pre-built Windows binaries (v4.2.1) are included in the zmq-win directory.\n- [pkg-config](https://en.wikipedia.org/wiki/Pkg-config)\n\n### Linux\n\n```sh\n$ go get -u github.com/gopherdata/gophernotes\n$ mkdir -p ~/.local/share/jupyter/kernels/gophernotes\n$ cp $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/.local/share/jupyter/kernels/gophernotes  \n```\n\nTo confirm that the `gophernotes` binary is installed and in your PATH, you should see the following when running `gophernotes` directly:\n\n```sh\n$ gophernotes\n2017/09/20 10:33:12 Need a command line argument specifying the connection file.\n```\n\n**Note** - if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n  \n```sh\n$ jupyter --data-dir\n```\n\n### Mac\n\n**Important Note** - gomacro relies on the `plugin` package when importing third party libraries.  This package is only supported on Linux currently.  Thus, if you need to utilize third party packages in your Go notebooks and you are running on Mac, you should use the [Docker](#docker) install and run gophernotes/Jupyter in Docker.\n\n```sh\n$ go get github.com/gopherdata/gophernotes\n$ mkdir -p ~/Library/Jupyter/kernels/gophernotes\n$ cp $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/Library/Jupyter/kernels/gophernotes\n```\n\nTo confirm that the `gophernotes` binary is installed and in your PATH, you should see the following when running `gophernotes` directly:\n\n```sh\n$ gophernotes\n2017/09/20 10:33:12 Need a command line argument specifying the connection file.\n```\n\n**Note** - if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n  \n```sh\n$ jupyter --data-dir\n```\n\n### Windows\n\n**Important Note** - gomacro relies on the `plugin` package when importing third party libraries.  This package is only supported on Linux currently.  Thus, if you need to utilize third party packages in your Go notebooks and you are running on Windows, you should use the [Docker](#docker) install and run gophernotes/Jupyter in Docker.\n\nMake sure you have the MinGW toolchain:\n\n- [MinGW-w64](https://sourceforge.net/projects/mingw-w64/), for 32 and 64 bit Windows\n- [MinGW Distro](https://nuwen.net/mingw.html), for 64 bit Windows only\n\nThen:\n\n1. build and install gophernotes (using the pre-built binaries and `zmq-win\\build.bat`):\n\n    ```\n    REM Download w/o building.\n    go get -d github.com/gopherdata/gophernotes\n    cd %GOPATH%\\src\\github.com\\gopherdata\\gophernotes\\zmq-win\n    \n    REM Build x64 version.\n    build.bat amd64\n    move gophernotes.exe %GOPATH%\\bin\n    copy lib-amd64\\libzmq.dll %GOPATH%\\bin\n    \n    REM Build x86 version.\n    build.bat 386\n    move gophernotes.exe %GOPATH%\\bin\n    copy lib-386\\libzmq.dll %GOPATH%\\bin\n    ```\n\n3. Copy the kernel config:\n\n    ```\n    mkdir %APPDATA%\\jupyter\\kernels\\gophernotes\n    xcopy %GOPATH%\\src\\github.com\\gopherdata\\gophernotes\\kernel %APPDATA%\\jupyter\\kernels\\gophernotes /s\n    ```\n  \n    Note, if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n  \n    ```\n    jupyter --data-dir\n    ```\n\n4. Update `%APPDATA%\\jupyter\\kernels\\gophernotes\\kernel.json` with the FULL PATH to your gophernotes.exe (in %GOPATH%\\bin), unless it's already on the PATH.  For example:\n\n    ```\n    {\n        \"argv\": [\n          \"C:\\\\gopath\\\\bin\\\\gophernotes.exe\",\n          \"{connection_file}\"\n          ],\n        \"display_name\": \"Go\",\n        \"language\": \"go\",\n        \"name\": \"go\"\n    }\n    ```\n\n### Docker\n\nYou can try out or run Jupyter + gophernotes without installing anything using Docker. To run a Go notebook that only needs things from the standard library, run: \n\n```\n$ docker run -it -p 8888:8888 gopherdata/gophernotes\n```\n\nOr to run a Go notebook with access to common Go data science packages (gonum, gota, golearn, etc.), run:\n\n```\n$ docker run -it -p 8888:8888 gopherdata/gophernotes-ds\n```\n\nIn either case, running this command should output a link that you can follow to access Jupyter in a browser. Also, to save notebooks to and/or load notebooks from a location outside of the Docker image, you should utilize a volume mount.  For example:\n\n```\n$ docker run -it -p 8888:8888 -v /path/to/local/notebooks:/path/to/notebooks/in/docker gopherdata/gophernotes\n```  \n\n## Getting Started\n\n### Jupyter\n\n- If you completed one of the local installs above (i.e., not the Docker install), start the jupyter notebook server:\n\n  ```\n  jupyter notebook\n  ```\n\n- Select `Go` from the `New` drop down menu.\n\n- Have fun!\n\n### nteract\n\n- Launch nteract.\n\n- From the nteract menu select Language -> Go.\n\n- Have fun!\n\n## Limitations\n\ngophernotes uses [gomacro](https://github.com/cosmos72/gomacro) under the hood to evaluate Go code interactively. You can evaluate most any Go code with gomacro, but there are some limitation, which are discussed in further detail [here](https://github.com/cosmos72/gomacro#current-status).  Most noteably, gophernotes does NOT support:\n\n- third party packages when running natively on Mac and Windows - This is a current limitation of the Go `plugin` package.\n- unexported struct fields are emulated\n- interpreted interfaces - They can be declared, but nothing more: there is no way to implement them or call their methods\n  Note: interfaces imported from standard library or third party packages are compiled, and fully functional.\n- goto is only partially implemented\n\n## Troubleshooting\n\n### gophernotes not found\n\nDepending on your environment, you may need to manually change the path to the `gophernotes` executable in `kernel/kernel.json` before copying it to `~/.local/share/jupyter/kernels/gophernotes`.  You can put the **full path** to the `gophernotes` executable here, and you shouldn't have any further issues.\n\n### \"Kernel error\" in a running notebook\n\n```\nTraceback (most recent call last):\n  File \"/usr/local/lib/python2.7/site-packages/notebook/base/handlers.py\", line 458, in wrapper\n    result = yield gen.maybe_future(method(self, *args, **kwargs))\n  File \"/usr/local/lib/python2.7/site-packages/tornado/gen.py\", line 1008, in run\n    value = future.result()\n  ...\n  File \"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py\", line 1335, in _execute_child\n    raise child_exception\nOSError: [Errno 2] No such file or directory\n```\n\nStop jupyter, if it's already running.\n\nAdd a symlink to `/go/bin/gophernotes` from your path to the gophernotes executable. If you followed the instructions above, this will be:\n\n```\nsudo ln -s $HOME/go/bin/gophernotes /go/bin/gophernotes\n```\n\nRestart jupyter, and you should now be up and running.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FCB6:35EBC:17220A:5C3641:6AB92066"},"text_sha256":"7d1b0cc640de3d36425d7085213ceee81902248a2e4b443a2da7ec4d18e393fb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3516","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17AE0E1:1BCBEE6:6AB927FC"},"commit":{"sha":"55142043d19696ba037e3e93f9ec6c7f8436e82d","url":"https://github.com/gopherdata/gophernotes/commit/55142043d19696ba037e3e93f9ec6c7f8436e82d","date":"2023-11-03T18:01:39Z","author_date":"2023-11-03T18:01:39Z","committer_date":"2023-11-03T18:01:39Z","tree_sha":"86cdff503b4b794efe3805e547a60ade51b943fe","message_first_line":"all: update github.com/cosmos72/gomacro"},"tree_request_status":200,"tree_rate":{"github_remaining":"3515","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092F:E80A6:1788A1E:1BA69BA:6AB927FC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11798,"blob_sha":"7b47126c64fa3a2d08227229d7b3860b5a700171","priority":0}],"documents":[{"path":"README.md","size":11798,"blob_sha":"7b47126c64fa3a2d08227229d7b3860b5a700171","priority":0,"status":200,"text":"![alt tag](files/gophernotes-logo.png)\n\n[![Build Status](https://travis-ci.org/gopherdata/gophernotes.svg?branch=master)](https://travis-ci.org/gopherdata/gophernotes)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/gopherdata/gophernotes/blob/master/LICENSE)\n\n# gophernotes - Use Go in Jupyter notebooks and nteract\n\n`gophernotes` is a Go kernel for [Jupyter](http://jupyter.org/) notebooks and [nteract](https://nteract.io/).  It lets you use Go interactively in a browser-based notebook or desktop app.  Use `gophernotes` to create and share documents that contain live Go code, equations, visualizations and explanatory text.  These notebooks, with the live Go code, can then be shared with others via email, Dropbox, GitHub and the [Jupyter Notebook Viewer](http://nbviewer.jupyter.org/). Go forth and do data science, or anything else interesting, with Go notebooks!\n\n**Acknowledgements** - This project utilizes a Go interpreter called [gomacro](https://github.com/cosmos72/gomacro) under the hood to evaluate Go code interactively. The gophernotes logo was designed by the brilliant [Marcus Olsson](https://github.com/marcusolsson) and was inspired by Renee French's original Go Gopher design.\n\n- [Examples](#examples)\n- Install gophernotes:\n  - [Prerequisites](#prerequisites)\n  - [FreeBSD](#linux-or-freebsd)\n  - [Linux](#linux-or-freebsd)\n  - [Mac](#mac)\n  - [Windows](#windows)\n  - [Docker](#docker)\n- [Getting Started](#getting-started)\n- [Limitations](#limitations)\n- [Troubleshooting](#troubleshooting)\n\n## Examples\n\n### Jupyter Notebook:\n\n![](files/jupyter.gif)\n\n### nteract:\n\n![](files/nteract.gif)\n\n### Example Notebooks (download and run them locally, follow the links to view in Github, or use the [Jupyter Notebook Viewer](http://nbviewer.jupyter.org/)):\n- [Worker Pools](examples/Worker_Pools.ipynb)\n- [Matrix Operations](examples/Matrix_Operations.ipynb)\n- [Facial Recognition](examples/Facial_Recognition_MachineBox.ipynb)\n- [Display Images, HTML, LaTeX...](examples/Display.ipynb)\n\n## Installation\n\n### Prerequisites\n\n- [Go 1.13+](https://golang.org/doc/install) - including GOPATH/bin added to your PATH (i.e., you can run Go binaries that you `go install`).\n- [Jupyter Notebook](http://jupyter.readthedocs.io/en/latest/install.html) or [nteract](https://nteract.io/desktop)\n- [git](https://git-scm.com/download) - usually already present on Linux and Mac OS X. If not present, follow the instructions at [https://git-scm.com/download](https://git-scm.com/download)\n\n### Linux or FreeBSD\n\nThe instructions below should work both on Linux and on FreeBSD.\n\nMethod 1: quick installation as module\n```sh\n  go install github.com/gopherdata/gophernotes@v0.7.5\n  mkdir -p ~/.local/share/jupyter/kernels/gophernotes\n  cd ~/.local/share/jupyter/kernels/gophernotes\n  cp \"$(go env GOPATH)\"/pkg/mod/github.com/gopherdata/gophernotes@v0.7.5/kernel/*  \".\"\n  chmod +w ./kernel.json # in case copied kernel.json has no write permission\n  sed \"s|gophernotes|$(go env GOPATH)/bin/gophernotes|\" < kernel.json.in > kernel.json\n```\n\nMethod 2: manual installation from GOPATH\n```sh\n  mkdir -p \"$(go env GOPATH)\"/src/github.com/gopherdata\n  cd \"$(go env GOPATH)\"/src/github.com/gopherdata\n  git clone https://github.com/gopherdata/gophernotes\n  cd gophernotes\n  git checkout -f v0.7.5\n  go install\n  mkdir -p ~/.local/share/jupyter/kernels/gophernotes\n  cp kernel/* ~/.local/share/jupyter/kernels/gophernotes\n  cd ~/.local/share/jupyter/kernels/gophernotes\n  chmod +w ./kernel.json # in case copied kernel.json has no write permission\n  sed \"s|gophernotes|$(go env GOPATH)/bin/gophernotes|\" < kernel.json.in > kernel.json\n```\n\nTo confirm that the `gophernotes` binary is installed in GOPATH, execute it directly:\n```sh\n  \"$(go env GOPATH)\"/bin/gophernotes\n```\nand you should see the following:\n```sh\n2017/09/20 10:33:12 Need a command line argument specifying the connection file.\n```\n\n**Note** - if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n\n```sh\n  jupyter --data-dir\n```\n\n### Mac\n\n**Important Note** - gomacro relies on the `plugin` package when importing third party libraries. This package works reliably on Mac OS X with Go 1.10.2+ as long as you **never** execute the command `strip gophernotes`.\n\nMethod 1: quick installation as module\n```sh\n  go install github.com/gopherdata/gophernotes@v0.7.5\n  mkdir -p ~/Library/Jupyter/kernels/gophernotes\n  cd ~/Library/Jupyter/kernels/gophernotes\n  cp \"$(go env GOPATH)\"/pkg/mod/github.com/gopherdata/gophernotes@v0.7.5/kernel/*  \".\"\n  chmod +w ./kernel.json # in case copied kernel.json has no write permission\n  sed \"s|gophernotes|$(go env GOPATH)/bin/gophernotes|\" < kernel.json.in > kernel.json\n```\n\nMethod 2: manual installation from GOPATH\n```sh\n  mkdir -p \"$(go env GOPATH)\"/src/github.com/gopherdata\n  cd \"$(go env GOPATH)\"/src/github.com/gopherdata\n  git clone https://github.com/gopherdata/gophernotes\n  cd gophernotes\n  git checkout -f v0.7.5\n  go install\n  mkdir -p ~/Library/Jupyter/kernels/gophernotes\n  cp kernel/* ~/Library/Jupyter/kernels/gophernotes\n  cd ~/Library/Jupyter/kernels/gophernotes\n  chmod +w ./kernel.json # in case copied kernel.json has no write permission\n  sed \"s|gophernotes|$(go env GOPATH)/bin/gophernotes|\" < kernel.json.in > kernel.json\n```\n\nTo confirm that the `gophernotes` binary is installed in GOPATH, execute it directly:\n```sh\n  \"$(go env GOPATH)\"/bin/gophernotes\n```\nand you should see the following:\n```sh\n2017/09/20 10:33:12 Need a command line argument specifying the connection file.\n```\n\n**Note** - if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n\n```sh\n  jupyter --data-dir\n```\n\n### Windows\n\n**Important Note** - gomacro relies on the `plugin` package when importing third party libraries.  This package is only supported on Linux and Mac OS X currently.  Thus, if you need to utilize third party packages in your Go notebooks and you are running on Windows, you should use the [Docker](#docker) install and run gophernotes/Jupyter in Docker.\n\n1. Download gophernotes inside GOPATH, compile and install it\n\n    ```\n    go env GOPATH > temp.txt\n    set /p GOPATH=<temp.txt\n    mkdir %GOPATH%\\src\\github.com\\gopherdata\n    cd /d %GOPATH%\\src\\github.com\\gopherdata\n    git clone https://github.com/gopherdata/gophernotes\n    cd gophernotes\n    git checkout -f v0.7.5\n    go install\n    ```\n\n2. Copy the kernel config:\n\n    ```\n    mkdir %APPDATA%\\jupyter\\kernels\\gophernotes\n    xcopy %GOPATH%\\src\\github.com\\gopherdata\\gophernotes\\kernel %APPDATA%\\jupyter\\kernels\\gophernotes /s\n    ```\n\n    Note, if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory.  You can check which directories will be searched by executing:\n\n    ```\n    jupyter --data-dir\n    ```\n\n3. Update `%APPDATA%\\jupyter\\kernels\\gophernotes\\kernel.json` with the FULL PATH to your gophernotes.exe (usually in %GOPATH%\\bin).  For example:\n\n    ```\n    {\n        \"argv\": [\n          \"C:\\\\gopath\\\\bin\\\\gophernotes.exe\",\n          \"{connection_file}\"\n          ],\n        \"display_name\": \"Go\",\n        \"language\": \"go\",\n        \"name\": \"go\"\n    }\n    ```\n\n### Docker\n\nYou can try out or run Jupyter + gophernotes without installing anything using Docker. To run a Go notebook that only needs things from the standard library, run:\n\n```\n  docker run -it -p 8888:8888 gopherdata/gophernotes\n```\n\nOr to run a Go notebook with access to common Go data science packages (gonum, gota, golearn, etc.), run:\n\n```\n  docker run -it -p 8888:8888 gopherdata/gophernotes:latest-ds\n```\n\nIn either case, running this command should output a link that you can follow to access Jupyter in a browser. Also, to save notebooks to and/or load notebooks from a location outside of the Docker image, you should utilize a volume mount.  For example:\n\n```\n  docker run -it -p 8888:8888 -v /path/to/local/notebooks:/path/to/notebooks/in/docker gopherdata/gophernotes\n```\n\n## Getting Started\n\n### Jupyter\n\n- If you completed one of the local installs above (i.e., not the Docker install), start the jupyter notebook server:\n\n  ```\n  jupyter notebook\n  ```\n\n- Select `Go` from the `New` drop down menu.\n\n- Have fun!\n\n### nteract\n\n- Launch nteract.\n\n- From the nteract menu select Language -> Go.\n\n- Have fun!\n\n## Special commands\n\nIn addition to Go code, the following special commands are also supported - they must be on a line by their own:\n- %cd [path]\n- %go111module {on|off}\n- %help\n- $ shell_command [args...]\n\n## Limitations\n\ngophernotes uses [gomacro](https://github.com/cosmos72/gomacro) under the hood to evaluate Go code interactively. You can evaluate most any Go code with gomacro, but there are some limitations, which are discussed in further detail [here](https://github.com/cosmos72/gomacro#current-status).  Most notably, gophernotes does NOT support:\n\n- importing third party packages when running natively on Windows - This is a current limitation of the Go `plugin` package.\n- some corner cases on interpreted interfaces, as interface -&gt; interface type switch and type assertion, are not implemented yet.\n- some corner cases on recursive types may not work correctly.\n- conversion from typed constant to interpreted interface is not implemented. Workaround: assign the constant to a variable, then convert the variable to the interpreted interface type.\n- conversions from/to unsafe.Pointer are not supported.\n- goto is only partially implemented.\n- out-of-order code in the same cell is supported, but not heavily tested. It has some known limitations for composite literals.\n\nAlso, creation of new named types is emulated, and their methods are visible only to interpreted code.\n\n## Troubleshooting\n\n### gophernotes not found\n\nDepending on your environment, you may need to manually change the path to the `gophernotes` executable in `kernel/kernel.json` before copying it to `~/.local/share/jupyter/kernels/gophernotes`.  You can put the **full path** to the `gophernotes` executable here, and you shouldn't have any further issues.\n\n### \"Kernel error\" in a running notebook\n\n```\nTraceback (most recent call last):\n  File \"/usr/local/lib/python2.7/site-packages/notebook/base/handlers.py\", line 458, in wrapper\n    result = yield gen.maybe_future(method(self, *args, **kwargs))\n  File \"/usr/local/lib/python2.7/site-packages/tornado/gen.py\", line 1008, in run\n    value = future.result()\n  ...\n  File \"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py\", line 1335, in _execute_child\n    raise child_exception\nOSError: [Errno 2] No such file or directory\n```\n\nStop jupyter, if it's already running.\n\nAdd a symlink to `/go/bin/gophernotes` from your path to the gophernotes executable. If you followed the instructions above, this will be:\n\n```\nsudo ln -s $HOME/go/bin/gophernotes /go/bin/gophernotes\n```\n\nRestart jupyter, and you should now be up and running.\n\n### error \"could not import C (no metadata for C)\" when importing a package\n\nAt a first analysis, it seems to be a limitation of the new import mechanism that supports Go modules.\nYou can switch the old (non module-aware) mechanism with the command `%go111module off`\n\nTo re-enable modules support, execute `%go111module on`\n\n### Look at Jupyter notebook's logs for debugging\n\nIn order to see the logs for your Jupyter notebook, use the --log-level option\n```\njupyter notebook --log-level DEBUG\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ABDA:24970A:17DE19:5CF080:6AB9206A"},"text_sha256":"f4cb2643b689a171eb13b793816bae4086291334806f88c932b31f7d95ddcaf4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"polyaxon/polyaxon","input_row":{"repository":"polyaxon/polyaxon","url":"https://github.com/polyaxon/polyaxon","name":"polyaxon","owner":"polyaxon","description":"AI Infra / AI Orchestration / AI Control Plane","language":"MDX","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3735,"issues":1069,"created_at":"2016-12-26T12:48:47Z","updated_at":"2026-09-24T10:21:04Z","first_commit_at":"2016-03-29T21:48:43Z","last_commit_at":"2026-09-24T10:20:53Z","activity_months":125.84,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:13.491Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"polyaxon/polyaxon","visibility":"public","created_at":"2016-12-26T12:48:47Z","updated_at":"2026-09-24T10:21:04Z","private":false,"fork":false,"archived":false,"stargazers_count":3735,"open_issues_count":125,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3514","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17B3E51:1BD158E:6AB927FD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3513","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:17C229A:1BDFF5A:6AB927FD"},"commit":{"sha":"766a7a1390b46f00e920229d1c1ffb6adbf8ac2f","url":"https://github.com/polyaxon/polyaxon/commit/766a7a1390b46f00e920229d1c1ffb6adbf8ac2f","date":"2018-05-24T23:00:29Z","author_date":"2018-05-24T23:00:29Z","committer_date":"2018-05-24T23:00:29Z","tree_sha":"24c5b3c7ffa62138656d3976b4fab6658935ae60","message_first_line":"Move utils serializer to api"},"tree_request_status":200,"tree_rate":{"github_remaining":"3512","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:178AB50:1BA8855:6AB927FE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6214,"blob_sha":"24b9d271a1afe4fc9315d891176a8cb62eed0ba3","priority":0}],"documents":[{"path":"README.md","size":6214,"blob_sha":"24b9d271a1afe4fc9315d891176a8cb62eed0ba3","priority":0,"status":200,"text":"[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Build Status](https://travis-ci.org/polyaxon/polyaxon.svg?branch=master)](https://travis-ci.org/polyaxon/polyaxon)\n![Release](https://img.shields.io/badge/release-0.1.0-green.svg?longCache=true)\n[![Slack](https://img.shields.io/badge/chat-on%20slack-aadada.svg?logo=slack&longCache=true)](https://join.slack.com/t/polyaxon/shared_invite/enQtMzQ0ODc2MDg1ODc0LWY2ZTdkMTNmZjBlZmRmNjQxYmYwMTBiMDZiMWJhODI2ZTk0MDU4Mjg5YzA5M2NhYzc5ZjhiMjczMDllYmQ2MDg)\n\n# Polyaxon\n\nWelcome to Polyaxon, a platform for building, training, and monitoring large scale deep learning applications.\n\nPolyaxon deploys into any data center, cloud provider, or can be hosted and managed by Polyaxon, and it supports all the major deep learning frameworks such as Tensorflow, MXNet, Caffe, Torch, etc.\n\nPolyaxon makes it faster, easier, and more efficient to develop deep learning applications by managing workloads with smart container and node management. And it turns GPU servers into shared, self-service resources for your team or organization.\n\n# Install\n\n#### TL;DR;\n\n * Create a deployment\n\n    ```bash\n    # Create a namespace\n    $ kubectl create namespace polyaxon\n\n    # Add Polyaxon charts repo\n    $ helm repo add polyaxon https://charts.polyaxon.com\n\n    # Deply Polyaxon\n    $ helm install polyaxon/polyaxon \\\n        --name=polyaxon \\\n        --namespace=polyaxon \\\n        -f config.yaml\n    ```\n\n * Install CLI\n\n    ```bash\n    # Install Polyaxon CLI\n    $ pip install -U polyaxon-cli\n\n    # Config Polyaxon CLI\n    $ polyaxon config ...\n\n    # Login to your account\n    $ polyaxon login\n    ```\n\nPlease check [polyaxon installation guide](https://docs.polyaxon.com/installation/introduction)\n\n# Quick start\n\n#### TL;DR;\n\n * Start a project\n\n    ```bash\n    # Create a project\n    $ polyaxon project create --name=quick-start --description='Polyaxon quick start.'\n\n    # Clone the quick start repo\n    $ git clone https://github.com/polyaxon/polyaxon-quick-start.git\n    $ cd polyaxon-quick-start\n\n    # initialize it\n    $ polyaxon init quick-start\n    ```\n\n * Train and track logs & resources\n\n    ```bash\n    # Upload code and start experiments\n    $ polyaxon run -u\n\n    # Stream logs\n    $ polyaxon experiment -xp 1 logs\n\n    # Stream resources\n    $ polyaxon experiment -xp 1 resources\n    ```\n\n * Dashboard\n\n    ```bash\n    # Start Polyaxon dashboard\n    $ polyaxon dashboad\n\n    Dashboard page will now open in your browser. Continue? [Y/n]: y\n    ```\n\n * Notebook\n    ```bash\n    # Start Jupyter notebook for your project\n    $ polyaxon notebook start -f polyaxon_notebook.yml\n\n    Notebook is being deployed for project `quick-start`\n\n    It may take some time before you can access the notebook..\n\n    Your notebook will be available on:\n\n        http://52.226.37.54:80/notebook/root/quick-start\n    ```\n\n * Tensorboard\n    ```bash\n    # Start Tensorboard\n    $ polyaxon tensorboard start\n\n    Tensorboard is being deployed for project `quick-start`\n\n    It may take some time before you can access tensorboard.\n\n    Your tensorboard will be available on:\n\n        http://52.226.37.54:80/tensorboard/root/quick-start\n    ```\n\nPlease check our [quick start guide](https://docs.polyaxon.com/quick_start) to start training your first experiment.\n\n# Distributed training\n\nPolyaxon supports and simplifies distributed training.\nDepending on the framework you are using, you need to adapt your code to enable the distributed training,\nand update your polyaxonfile with an environment section.\n\nBy default polyaxon creates a master job, so you only need to provide the workers  and/or parameter servers.\n\n * [Tensorflow distributed example](https://github.com/polyaxon/polyaxon-examples/blob/master/tensorflow/cifare10/polyaxonfile_distributed.yml)\n * [MXNet distributed example](https://github.com/polyaxon/polyaxon-examples/blob/master/mxnet/cifar10/polyaxonfile_distributed.yml)\n * [Pytorch distributed example](https://github.com/polyaxon/polyaxon-examples/blob/master/pytorch/mnist/polyaxonfile_distributed.yml)\n\n# Hyperparameters tuning\n\nPolyaxon has a concept for suggesting hyperparameters and managing their results very similar to Google Vizier called experiment groups.\nAn experiment group in Polyaxon defines a search algorithm, a search space, and a model to train.\n\n * [Grid search](https://github.com/polyaxon/polyaxon-quick-start/blob/master/polyaxonfile_hyperparams_grid.yml)\n * [Random search with early stopping](https://github.com/polyaxon/polyaxon-quick-start/blob/master/polyaxonfile_hyperparams_early_stopping.yml)\n * [Hyperband](https://github.com/polyaxon/polyaxon-quick-start/blob/master/polyaxonfile_hyperparams_hyperband.yml)\n * [Bayesian Optimization](https://github.com/polyaxon/polyaxon-quick-start/blob/master/polyaxonfile_hyperparams_bo.yml)\n\n# Architecture\n\n![Polyaxon architecture](config/polyaxon_architecture.png)\n\n# Documentation\n\nCheck out our [documentation](https://docs.polyaxon.com/) to learn more about Polyaxon.\n\n# Dashboard\n\nPolyaxon comes with a dashboard that shows the projects and experiments created by you and your team members.\n\nTo start the dashboard, just run the following command in your terminal\n\n```bash\n$ polyaxon dashboard\n```\n\n * List Projects\n\n    ![Polyaxon dashboard](config/projects.png)\n\n * Project Details\n\n    ![Polyaxon dashboard](config/project.png)\n\n * Experiment Details\n\n    ![Polyaxon dashboard](config/experiment.png)\n\n# Project status\n\nPolyaxon is in \"beta\" state. All interfaces, programming interfaces, and data structures may be changed.\nWe'll do our best to communicate potentially disruptive changes.\n\n# Contributions\n\nPlease follow the contribution guide line: *[Contribute to Polyaxon](CONTRIBUTING.md)*.\n\n\n# Research\n\nIf you use Polyaxon in your academic research, we would be grateful if you could cite it.\n\nFeel free to [contact us](mailto:contact@polyaxon.com), we would love to learn about your project and see how we can support your custom need.\n\n# License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolyaxon.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpolyaxon%2Fpolyaxon?ref=badge_large)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FEE8:3FA0D:171ADB:5C2F47:6AB9205F"},"text_sha256":"8fbd69fff7a4bf64afd4b3bd92b6c08a493be599db8b3b416fe65d1d66c46e59"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3511","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0932:2EA1B4:17B6C32:1BD4DDC:6AB927FF"},"commit":{"sha":"e90398d05620e654e336904e097832a247e2b3ac","url":"https://github.com/polyaxon/polyaxon/commit/e90398d05620e654e336904e097832a247e2b3ac","date":"2026-06-30T17:02:38Z","author_date":"2026-06-30T17:02:38Z","committer_date":"2026-06-30T17:02:38Z","tree_sha":"f69a1d2bf78c67b96277289f1d847601d3d017d7","message_first_line":"Add unsloth tracking and finetuning integration docs"},"tree_request_status":200,"tree_rate":{"github_remaining":"3510","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0890:74E6D:17E380F:1C01ABB:6AB927FF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7931,"blob_sha":"087975830e950222252ff3ca36a0465067843eba","priority":0}],"documents":[{"path":"README.md","size":7931,"blob_sha":"087975830e950222252ff3ca36a0465067843eba","priority":0,"status":200,"text":"[![License: Apache 2](https://img.shields.io/badge/License-apache2-blue.svg?style=flat&longCache=true)](LICENSE)\n[![Polyaxon API](https://img.shields.io/docker/pulls/polyaxon/polyaxon-api)](https://hub.docker.com/r/polyaxon/polyaxon-api)\n[![Slack](https://img.shields.io/badge/Slack-1.5k%20members-blue.svg?style=flat&logo=slack&longCache=true)](https://polyaxon.com/slack/)\n\n[![Docs](https://img.shields.io/badge/docs-stable-brightgreen.svg?style=flat&longCache=true)](https://polyaxon.com/docs/)\n[![Release](https://img.shields.io/badge/release-v2.16.1-brightgreen.svg?longCache=true)](https://polyaxon.com/docs/releases/2-16/)\n[![GitHub](https://img.shields.io/badge/issue_tracker-github-blue?style=flat&logo=github&longCache=true)](https://github.com/polyaxon/polyaxon/issues)\n[![GitHub](https://img.shields.io/badge/roadmap-github-blue?style=flat&logo=github&longCache=true)](https://github.com/orgs/polyaxon/projects/5)\n\n[![CLI](https://github.com/polyaxon/polyaxon/actions/workflows/cli.yml/badge.svg)](https://github.com/polyaxon/polyaxon/actions/workflows/cli.yml)\n[![Haupt](https://github.com/polyaxon/polyaxon/actions/workflows/haupt.yml/badge.svg)](https://github.com/polyaxon/polyaxon/actions/workflows/haupt.yml)\n[![Hypertune](https://github.com/polyaxon/polyaxon/actions/workflows/hypertune.yml/badge.svg)](https://github.com/polyaxon/polyaxon/actions/workflows/hypertune.yml)\n[![Traceml](https://github.com/polyaxon/polyaxon/actions/workflows/traceml.yml/badge.svg)](https://github.com/polyaxon/polyaxon/actions/workflows/traceml.yml)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/90c05b6b112548c1a88b950beceacb69)](https://www.codacy.com/app/polyaxon/polyaxon?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=polyaxon/polyaxon&amp;utm_campaign=Badge_Grade)\n\n\n<a href=\"https://polyaxon.com\"><img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/logo/vector/primary-white-default-monochrome.svg\" width=\"125\" height=\"125\" align=\"right\" /><\/a>\n\n# Reproduce, Automate, Scale your data science\n\n\nWelcome to Polyaxon, a platform for building, training, and monitoring large scale deep learning applications.\nWe are making a system to solve reproducibility, automation, and scalability for machine learning applications.\n\nPolyaxon deploys into any data center, cloud provider, or can be hosted and managed by Polyaxon, and it supports all the major deep learning frameworks such as Tensorflow, MXNet, Caffe, Torch, etc.\n\nPolyaxon makes it faster, easier, and more efficient to develop deep learning applications by managing workloads with smart container and node management. And it turns GPU servers into shared, self-service resources for your team or organization.\n\n<br>\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/demo.gif\" alt=\"demo\" width=\"80%\">\n<\/p>\n<br>\n\n# Install\n\n#### TL;DR;\n\n* Install CLI\n\n    ```bash\n    # Install Polyaxon CLI\n    $ pip install -U polyaxon\n    ```\n\n * Create a deployment\n\n    ```bash\n    # Create a namespace\n    $ kubectl create namespace polyaxon\n\n    # Add Polyaxon charts repo\n    $ helm repo add polyaxon https://charts.polyaxon.com\n\n    # Deploy Polyaxon\n    $ polyaxon admin deploy -f config.yaml\n\n    # Access API\n    $ polyaxon port-forward\n    ```\n\nPlease check [polyaxon installation guide](https://polyaxon.com/docs/setup/)\n\n# Quick start\n\n#### TL;DR;\n\n * Start a project\n\n    ```bash\n    # Create a project\n    $ polyaxon project create --name=quick-start --description='Polyaxon quick start.'\n    ```\n\n * Train and track logs & resources\n\n    ```bash\n    # Upload code and start experiments\n    $ polyaxon run -f experiment.yaml -u -l\n    ```\n\n * Dashboard\n\n    ```bash\n    # Start Polyaxon dashboard\n    $ polyaxon dashboard\n\n    Dashboard page will now open in your browser. Continue? [Y/n]: y\n    ```\n\n<br>\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/compare.png\" alt=\"compare\" width=\"400\">\n  <img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/dashboards.png\" alt=\"dashboards\" width=\"400\">\n<\/p>\n<br>\n\n * Notebook\n    ```bash\n    # Start Jupyter notebook for your project\n    $ polyaxon run --hub notebook\n    ```\n\n<br>\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/notebook.png\" alt=\"compare\" width=\"400\">\n<\/p>\n<br>\n\n * Tensorboard\n    ```bash\n    # Start TensorBoard for a run's output\n    $ polyaxon run --hub tensorboard -P uuid=UUID\n    ```\n\n<br>\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/polyaxon/polyaxon/master/artifacts/tensorboard.png\" alt=\"tensorboard\" width=\"400\">\n<\/p>\n<br>\n\nPlease check our [quick start guide](https://polyaxon.com/docs/intro/quick-start/) to start training your first experiment.\n\n# Distributed job\n\nPolyaxon supports and simplifies distributed jobs.\nDepending on the framework you are using, you need to deploy the corresponding operator, adapt your code to enable the distributed training,\nand update your polyaxonfile.\n\nHere are some examples of using distributed training:\n\n * [Distributed Tensorflow](https://polyaxon.com/docs/experimentation/distributed/tf-jobs/)\n * [Distributed Pytorch](https://polyaxon.com/docs/experimentation/distributed/pytorch-jobs/)\n * [Distributed MPI](https://polyaxon.com/docs/experimentation/distributed/mpi-jobs/)\n * [Horovod](https://polyaxon.com/integrations/horovod/)\n * [Spark](https://polyaxon.com/docs/experimentation/distributed/spark-jobs/)\n * [Dask](https://polyaxon.com/docs/experimentation/distributed/dask-jobs/)\n\n# Hyperparameters tuning\n\nPolyaxon has a concept for suggesting hyperparameters and managing their results very similar to Google Vizier called experiment groups.\nAn experiment group in Polyaxon defines a search algorithm, a search space, and a model to train.\n\n * [Grid search](https://polyaxon.com/docs/automation/optimization-engine/grid-search/)\n * [Random search](https://polyaxon.com/docs/automation/optimization-engine/random-search/)\n * [Hyperband](https://polyaxon.com/docs/automation/optimization-engine/hyperband/)\n * [Bayesian Optimization](https://polyaxon.com/docs/automation/optimization-engine/bayesian-optimization/)\n * [Hyperopt](https://polyaxon.com/docs/automation/optimization-engine/hyperopt/)\n * [Custom Iterative Optimization](https://polyaxon.com/docs/automation/optimization-engine/iterative/)\n\n# Parallel executions\n\nYou can run your processing or model training jobs in parallel, Polyaxon provides a [mapping](https://polyaxon.com/docs/automation/mapping/) abstraction to manage concurrent jobs.\n\n# DAGs and workflows\n\n[Polyaxon DAGs](https://polyaxon.com/docs/automation/flow-engine/) is a tool that provides container-native engine for running machine learning pipelines.\nA DAG manages multiple operations with dependencies. Each operation is defined by a component runtime.\nThis means that operations in a DAG can be jobs, services, distributed jobs, parallel executions, or nested DAGs.\n\n\n# Architecture\n\n![Polyaxon architecture](artifacts/polyaxon_architecture.png)\n\n# Documentation\n\nCheck out our [documentation](https://polyaxon.com/docs/) to learn more about Polyaxon.\n\n# Dashboard\n\nPolyaxon comes with a dashboard that shows the projects and experiments created by you and your team members.\n\nTo start the dashboard, just run the following command in your terminal\n\n```bash\n$ polyaxon dashboard -y\n```\n\n# Project status\n\nPolyaxon is stable and it's running in production mode at many startups and Fortune 500 companies.\n\n# Contributions\n\nPlease follow the contribution guide line: *[Contribute to Polyaxon](CONTRIBUTING.md)*.\n\n\n# Research\n\nIf you use Polyaxon in your academic research, we would be grateful if you could cite it.\n\nFeel free to [contact us](mailto:contact@polyaxon.com), we would love to learn about your project and see how we can support your custom need.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC7A:345ED4:171BB6:5C2FC5:6AB9206D"},"text_sha256":"b04db51713e23444f033577088615c9fe6bdeed9576cbe4675d343839becee8d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"shogun-toolbox/shogun","input_row":{"repository":"shogun-toolbox/shogun","url":"https://github.com/shogun-toolbox/shogun","name":"shogun","owner":"shogun-toolbox","description":"Shōgun","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":3081,"issues":1527,"created_at":"2011-04-01T10:44:32Z","updated_at":"2026-09-11T17:00:40Z","first_commit_at":"2006-06-05T14:33:25Z","last_commit_at":"2023-12-19T18:37:18Z","activity_months":210.44999999999999,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:16.771Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"shogun-toolbox/shogun","visibility":"public","created_at":"2011-04-01T10:44:32Z","updated_at":"2026-09-11T17:00:40Z","private":false,"fork":false,"archived":false,"stargazers_count":3081,"open_issues_count":424,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"3509","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:17D2A76:1BF0B1D:6AB92800"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3508","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:1797F73:1BB6068:6AB92801"},"commit":{"sha":"5d65aa6955079a5f37e6804189c58d11ddf74ad2","url":"https://github.com/shogun-toolbox/shogun/commit/5d65aa6955079a5f37e6804189c58d11ddf74ad2","date":"2018-05-24T10:10:47Z","author_date":"2018-05-24T10:10:47Z","committer_date":"2018-05-24T10:10:47Z","tree_sha":"0ab2d13c270919b7c457727f703dd57de3f9cf91","message_first_line":"Update notebooks using feature factory (#4302)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3507","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17B6DBB:1BD4FC3:6AB92801"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3994,"blob_sha":"12400432d3fd43410b2b805a733712a8d764d355","priority":0}],"documents":[{"path":"README.md","size":3994,"blob_sha":"12400432d3fd43410b2b805a733712a8d764d355","priority":0,"status":200,"text":"# The SHOGUN machine learning toolbox\n-------------------------------------\n\nUnified and efficient Machine Learning since 1999.\n\nLatest release:\n\n[![Release](https://img.shields.io/github/release/shogun-toolbox/shogun.svg)](https://github.com/shogun-toolbox/shogun/releases/latest)\n\nCite Shogun:\n\n[![DOI](https://zenodo.org/badge/1555094.svg)](https://zenodo.org/badge/latestdoi/1555094)\n\nDevelop branch build status:\n\n[![Build Status](https://travis-ci.org/shogun-toolbox/shogun.svg?branch=develop)](https://travis-ci.org/shogun-toolbox/shogun)\n[![Build status](https://ci.appveyor.com/api/projects/status/jx095rnr9qhg8dcv/branch/develop?svg=true)](https://ci.appveyor.com/project/vigsterkr/shogun/branch/develop)\n[![codecov](https://codecov.io/gh/shogun-toolbox/shogun/branch/develop/graph/badge.svg)](https://codecov.io/gh/shogun-toolbox/shogun)\n\nDonate to Shogun via NumFocus:\n\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org)\n\n\nBuildbot: http://buildbot.shogun-toolbox.org/waterfall.\n\n * See [doc/readme/ABOUT.md](doc/readme/ABOUT.md) for a project description.\n * See [doc/readme/INSTALL.md](doc/readme/INSTALL.md) for installation instructions.\n * See [doc/readme/INTERFACES.md](doc/readme/INTERFACES.md) for calling Shogun from its interfaces.\n * See [doc/readme/EXAMPLES.md](doc/readme/EXAMPLES.md) for details on creating API examples.\n * See [doc/readme/DEVELOPING.md](doc/readme/DEVELOPING.md) for how to hack Shogun.\n \n * See [API examples](http://shogun.ml/examples) for API examples for all interfaces.\n * See [the wiki](https://github.com/shogun-toolbox/shogun/wiki/) for extended developer information.\n\n## Interfaces\n-------------\n\nShogun is implemented in C++ and offers automatically generated, unified interfaces to Python, Octave, Java / Scala, Ruby, C#, R, Lua. We are currently working on adding more languages including JavaScript, D, and Matlab.\n\n|    Interface     |     Status                                                |\n|:----------------:|-----------------------------------------------------------|\n|python            | *mature* (no known problems)                              |\n|octave            | *mature* (no known problems)                              |\n|java/scala        | *stable* (no known problems)                              |\n|ruby              | *stable* (no known problems)                              |\n|csharp            | *stable* (no known problems)                              |\n|r                 | *beta*   (most examples work, static calls unavailable)   |\n|lua               | *alpha*  (many examples work, string typemaps are unstable, overloaded methods unavailable)                   |\n|perl              | *pre-alpha* (work in progress quality)                    |\n|js                | *pre-alpha* (work in progress quality)                    |\n\nSee [our website](http://shogun.ml/examples) for examples in all languages.\n\n## Platforms\n------------\n\nShogun is supported under GNU/Linux, MacOSX, FreeBSD, and Windows.\nSee our [buildfarm](http://buildbot.shogun-toolbox.org/waterfall).\n\n## Directory Contents\n---------------------\n\nThe following directories are found in the source distribution.\nNote that some folders are submodules that can be checked out with\n`git submodule update --init`.\n\n- *src* - source code, separated into C++ source and interfaces\n- *doc* - readmes (doc/reamde, submodule), ipython notebooks, cookbook (api examples), licenses\n- *examples* - example files for all interfaces\n- *data* - data sets (submodule, required for examples)\n- *tests* - unit tests and continuous integration of interface examples\n- *applications* - applications of SHOGUN (outdated)\n- *benchmarks* - speed benchmarks\n- *cmake* - cmake build scripts\n\n## License\n----------\nShogun is distributed under [BSD 3-clause license](doc/license/LICENSE.md), with\noptional GPL3 components.\nSee [doc/licenses](doc/license) for details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27EA:40B0C:17723A:5C879B:6AB9206F"},"text_sha256":"babcbd27e525c2cc157f6131dba089c587f4c05d46f90351274e97dcb99ca72c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3506","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087B:2EA1B4:17B6F35:1BD515B:6AB92803"},"commit":{"sha":"8f01b2b9e4de46a38bf70cdb603db75ebfd4b58b","url":"https://github.com/shogun-toolbox/shogun/commit/8f01b2b9e4de46a38bf70cdb603db75ebfd4b58b","date":"2023-12-19T18:37:18Z","author_date":"2023-12-19T18:37:18Z","committer_date":"2023-12-19T18:37:18Z","tree_sha":"d5e5b10fbbb504352f40c7e0ceb7300b5b0a4b79","message_first_line":"Bugfix for two consecutive calls to std::nth_element."},"tree_request_status":200,"tree_rate":{"github_remaining":"3505","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:1841A6D:1C5FC20:6AB92803"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3617,"blob_sha":"d8fe645d120b62293e38e3b7e09be6ef651f5fa3","priority":0}],"documents":[{"path":"README.md","size":3617,"blob_sha":"d8fe645d120b62293e38e3b7e09be6ef651f5fa3","priority":0,"status":200,"text":"# The SHOGUN machine learning toolbox\n-------------------------------------\n\nUnified and efficient Machine Learning since 1999.\n\nLatest release:\n\n[![Release](https://img.shields.io/github/release/shogun-toolbox/shogun.svg)](https://github.com/shogun-toolbox/shogun/releases/latest)\n\nCite Shogun:\n\n[![DOI](https://zenodo.org/badge/1555094.svg)](https://zenodo.org/badge/latestdoi/1555094)\n\nDevelop branch build status:\n\n[![Build status](https://dev.azure.com/shogunml/shogun/_apis/build/status/shogun-CI)](https://dev.azure.com/shogunml/shogun/_build/latest?definitionId=-1)\n[![codecov](https://codecov.io/gh/shogun-toolbox/shogun/branch/develop/graph/badge.svg)](https://codecov.io/gh/shogun-toolbox/shogun)\n\nDonate to Shogun via NumFocus:\n\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org)\n\n\nBuildbot: https://buildbot.shogun.ml.\n\n * See [doc/readme/ABOUT.md](doc/readme/ABOUT.md) for a project description.\n * See [doc/readme/INSTALL.md](doc/readme/INSTALL.md) for installation instructions.\n * See [doc/readme/INTERFACES.md](doc/readme/INTERFACES.md) for calling Shogun from its interfaces.\n * See [doc/readme/EXAMPLES.md](doc/readme/EXAMPLES.md) for details on creating API examples.\n * See [doc/readme/DEVELOPING.md](doc/readme/DEVELOPING.md) for how to hack Shogun.\n \n * See [API examples](http://shogun.ml/examples) for all interfaces.\n * See [the wiki](https://github.com/shogun-toolbox/shogun/wiki/) for extended developer information.\n\n## Interfaces\n-------------\n\nShogun is implemented in C++ and offers automatically generated, unified interfaces to Python, Octave, Java / Scala, Ruby, C#, R, Lua. We are currently working on adding more languages including JavaScript, D, and Matlab.\n\n|    Interface     |     Status                                                |\n|:----------------:|-----------------------------------------------------------|\n|Python            | *mature* (no known problems)                              |\n|Octave            | *mature* (no known problems)                              |\n|Java/Scala        | *stable* (no known problems)                              |\n|Ruby              | *stable* (no known problems)                              |\n|C#                | *stable* (no known problems)                              |\n|R                 | *beta*   (most examples work, static calls unavailable)   |\n|Perl              | *pre-alpha* (work in progress quality)                    |\n|JS                | *pre-alpha* (work in progress quality)                    |\n\nSee [our website](http://shogun.ml/examples) for examples in all languages.\n\n## Platforms\n------------\n\nShogun is supported under GNU/Linux, MacOSX, FreeBSD, and Windows.\n\n## Directory Contents\n---------------------\n\nThe following directories are found in the source distribution.\nNote that some folders are submodules that can be checked out with\n`git submodule update --init`.\n\n- *src* - source code, separated into C++ source and interfaces\n- *doc* - readmes (doc/readme, submodule), Jupyter notebooks, cookbook (API examples), licenses\n- *examples* - example files for all interfaces\n- *data* - data sets (submodule, required for examples)\n- *tests* - unit tests and continuous integration of interface examples\n- *applications* - applications of SHOGUN (outdated)\n- *benchmarks* - speed benchmarks\n- *cmake* - cmake build scripts\n\n## License\n----------\nShogun is distributed under [BSD 3-clause license](doc/license/LICENSE.md), with\noptional GPL3 components.\nSee [doc/licenses](doc/license) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9B9A:2B291E:17CD4D:5CE304:6AB92071"},"text_sha256":"5f1d184dbbfbe1050c2ef1daa12fb21c0b45b7d5456b03e3e9ad04e3f93a82f9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"explosion/thinc","input_row":{"repository":"explosion/thinc","url":"https://github.com/explosion/thinc","name":"thinc","owner":"explosion","description":"🔮 A refreshing functional take on deep learning, compatible with your favorite libraries","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2890,"issues":154,"created_at":"2014-10-16T16:34:59Z","updated_at":"2026-09-14T17:46:07Z","first_commit_at":"2014-06-29T15:20:41Z","last_commit_at":"2026-03-27T07:49:48Z","activity_months":140.88999999999999,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:20.258Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"explosion/thinc","visibility":"public","created_at":"2014-10-16T16:34:59Z","updated_at":"2026-09-14T17:46:07Z","private":false,"fork":false,"archived":false,"stargazers_count":2890,"open_issues_count":16,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3504","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:1764515:1B8089B:6AB92804"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3503","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0866:A9DC0:179D8E3:1BBB4ED:6AB92804"},"commit":{"sha":"7371c149f8b9940b464f91bae02878122118208e","url":"https://github.com/explosion/thinc/commit/7371c149f8b9940b464f91bae02878122118208e","date":"2018-05-22T09:27:04Z","author_date":"2018-05-22T09:27:04Z","committer_date":"2018-05-22T09:27:04Z","tree_sha":"5151b2ca9ab7f04230d60590dbac8d3eafdb9ada","message_first_line":"Update README.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"3502","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0823:7580A:17DF459:1BFD47E:6AB92805"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":18911,"blob_sha":"04c25e54ce5106769fe21c5eb552e3f4dc04217b","priority":0}],"documents":[{"path":"README.rst","size":18911,"blob_sha":"04c25e54ce5106769fe21c5eb552e3f4dc04217b","priority":0,"status":200,"text":"Thinc: Practical Machine Learning for NLP in Python\n***************************************************\n\n**Thinc** is the machine learning library powering `spaCy <https://spacy.io>`_.\nIt features a battle-tested linear model designed for large sparse learning\nproblems, and a flexible neural network model under development for\n`spaCy v2.0 <https://spacy.io/usage/v2>`_.\n\nThinc is a practical toolkit for implementing models that follow the\n`\"Embed, encode, attend, predict\" <https://explosion.ai/blog/deep-learning-formula-nlp>`_\narchitecture. It's designed to be easy to install, efficient for CPU usage and\noptimised for NLP and deep learning with text – in particular, hierarchically\nstructured input and variable-length sequences.\n\n🔮 **Version 6.11 out now!** `Read the release notes here. <https://github.com/explosion/thinc/releases/>`_\n\n.. image:: https://img.shields.io/travis/explosion/thinc/master.svg?style=flat-square\n    :target: https://travis-ci.org/explosion/thinc\n    :alt: Build Status\n    \n.. image:: https://img.shields.io/appveyor/ci/explosion/thinc/master.svg?style=flat-square\n    :target: https://ci.appveyor.com/project/explosion/thinc\n    :alt: Appveyor Build Status\n\n.. image:: https://img.shields.io/coveralls/explosion/thinc.svg?style=flat-square\n    :target: https://coveralls.io/github/explosion/thinc\n    :alt: Test Coverage\n\n.. image:: https://img.shields.io/github/release/explosion/thinc.svg?style=flat-square\n    :target: https://github.com/explosion/thinc/releases\n    :alt: Current Release Version\n\n.. image:: https://img.shields.io/pypi/v/thinc.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/thinc\n    :alt: pypi Version\n\n.. image:: https://anaconda.org/conda-forge/thinc/badges/version.svg\n    :target: https://anaconda.org/conda-forge/thinc\n    :alt: conda Version\n\n.. image:: https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-7676d1.svg?style=flat-square\n    :target: https://gitter.im/explosion/thinc\n    :alt: Thinc on Gitter\n\n.. image:: https://img.shields.io/twitter/follow/explosion_ai.svg?style=social&label=Follow\n    :target: https://twitter.com/explosion_ai\n    :alt: Follow us on Twitter\n\nWhat's where (as of v6.9.0)\n===========================\n\n======================== ===\n``thinc.v2v.Model``      Base class.\n``thinc.v2v``            Layers transforming vectors to vectors.\n``thinc.i2v``            Layers embedding IDs to vectors.\n``thinc.t2v``            Layers pooling tensors to vectors.\n``thinc.t2t``            Layers transforming tensors to tensors (e.g. CNN, LSTM).\n``thinc.api``            Higher-order functions, for building networks. Will be renamed.\n``thinc.extra``          Datasets and utilities.\n``thinc.neural.ops``     Container classes for mathematical operations. Will be reorganized.\n``thinc.linear.avgtron`` Legacy efficient Averaged Perceptron implementation.\n======================== ===\n\nDevelopment status\n==================\n\nThinc's deep learning functionality is still under active development: APIs are\nunstable, and we're not yet ready to provide usage support. However, if you're\nalready quite familiar with neural networks, there's a lot here you might find\ninteresting. Thinc's conceptual model is quite different from TensorFlow's.\nThinc also implements some novel features, such as a small DSL for concisely\nwiring up models, embedding tables that support pre-computation and the\nhashing trick, dynamic batch sizes, a concatenation-based approach to\nvariable-length sequences, and support for model averaging for the\nAdam solver (which performs very well).\n\nNo computational graph – just higher order functions\n======================================================\n\nThe central problem for a neural network implementation is this: during the\nforward pass, you compute results that will later be useful during the backward\npass. How do you keep track of this arbitrary state, while making sure that\nlayers can be cleanly composed?\n\nMost libraries solve this problem by having you declare the forward\ncomputations, which are then compiled into a graph somewhere behind the scenes.\nThinc doesn't have a \"computational graph\". Instead, we just use the stack,\nbecause we put the state from the forward pass into callbacks.\n\nAll nodes in the network have a simple signature:\n\n.. code:: none\n\n    f(inputs) -> {outputs, f(d_outputs)->d_inputs}\n\nTo make this less abstract, here's a ReLu activation, following this signature:\n\n.. code:: python\n\n    def relu(inputs):\n        mask = inputs > 0\n        def backprop_relu(d_outputs, optimizer):\n            return d_outputs * mask\n        return inputs * mask, backprop_relu\n\nWhen you call the ``relu`` function, you get back an output variable, and a\ncallback. This lets you calculate a gradient using the output, and then pass it\ninto the callback to perform the backward pass.\n\nThis signature makes it easy to build a complex network out of smaller pieces,\nusing arbitrary higher-order functions you can write yourself. To make this\nclearer, we need a function for a weights layer. Usually this will be\nimplemented as a class — but let's continue using closures, to keep things\nconcise, and to keep the simplicity of the interface explicit.\n\nThe main complication for the weights layer is that we now have a side-effect\nto manage: we would like to update the weights. There are a few ways to handle\nthis. In Thinc we currently pass a callable into the backward pass. (I'm not\nconvinced this is best.)\n\n.. code:: python\n\n    import numpy\n\n    def create_linear_layer(n_out, n_in):\n        W = numpy.zeros((n_out, n_in))\n        b = numpy.zeros((n_out, 1))\n\n        def forward(X):\n            Y = W @ X + b\n            def backward(dY, optimizer):\n                dX = W.T @ dY\n                dW = numpy.einsum('ik,jk->ij', dY, X)\n                db = dY.sum(axis=0)\n\n                optimizer(W, dW)\n                optimizer(b, db)\n\n                return dX\n            return Y, backward\n        return forward\n\nIf we call ``Wb = create_linear_layer(5, 4)``, the variable ``Wb`` will be the\n``forward()`` function, implemented inside the body of ``create_linear_layer()``.\nThe `Wb` instance will have access to the ``W`` and ``b`` variable defined in its\nouter scope. If we invoke ``create_linear_layer()`` again, we get a new instance,\nwith its own internal state.\n\nThe ``Wb`` instance and the ``relu`` function have exactly the same signature. This\nmakes it easy to write higher order functions to compose them. The most obvious\nthing to do is chain them together:\n\n.. code:: python\n\n    def chain(*layers):\n        def forward(X):\n            backprops = []\n            Y = X\n            for layer in layers:\n                Y, backprop = layer(Y)\n                backprops.append(backprop)\n            def backward(dY, optimizer):\n                for backprop in reversed(backprops):\n                    dY = backprop(dY, optimizer)\n                return dY\n            return Y, backward\n        return forward\n\nWe could now chain our linear layer together with the ``relu`` activation, to\ncreate a simple feed-forward network:\n\n.. code:: python\n\n    Wb1 = create_linear_layer(10, 5)\n    Wb2 = create_linear_layer(3, 10)\n\n    model = chain(Wb1, relu, Wb2)\n\n    X = numpy.random.uniform(size=(5, 4))\n\n    y, bp_y = model(X)\n\n    dY = y - truth\n    dX = bp_y(dY, optimizer)\n\nThis conceptual model makes Thinc very flexible. The trade-off is that Thinc is\nless convenient and efficient at workloads that fit exactly into what\n`Tensorflow <https://www.tensorflow.org/>`_ etc. are designed for. If your graph\nreally is static, and your inputs are homogenous in size and shape,\n`Keras <https://keras.io/>`_ will likely be faster and simpler. But if you want\nto pass normal Python objects through your network, or handle sequences and recursions\nof arbitrary length or complexity, you might find Thinc's design a better fit for\nyour problem.\n\nQuickstart\n==========\n\nThinc should install cleanly with both `pip <http://pypi.python.org/pypi/thinc>`_ and\n`conda <https://anaconda.org/conda-forge/thinc>`_, for **Pythons 2.7+ and 3.5+**, on\n**Linux**, **macOS / OSX** and **Windows**.  Its only system dependency is a compiler\ntool-chain (e.g. ``build-essential``) and the  Python development headers (e.g.\n``python-dev``).\n\n.. code:: bash\n\n    pip install thinc\n\nFor GPU support, we're grateful to use the work of Chainer's cupy module, which provides a numpy-compatible interface for GPU arrays. However, installing Chainer when no GPU is available currently causes an error. We therefore do not list Chainer as an explicit dependency --- so building ``Thinc`` for GPU requires some extra steps:\n\n.. code:: bash\n\n    export CUDA_HOME=/usr/local/cuda-8.0 # Or wherever your CUDA is\n    export PATH=$PATH:$CUDA_HOME/bin\n    pip install chainer\n    python -c \"import cupy; assert cupy\" # Check it installed\n    pip install thinc\n    python -c \"import thinc.neural.gpu_ops\" # Check the GPU ops were built\n\nThe rest of this section describes how to build Thinc from source. If you have\n`Fabric <http://www.fabfile.org>`_ installed, you can use the shortcut:\n\n.. code:: bash\n\n   git clone https://github.com/explosion/thinc\n   cd thinc\n   fab clean env make test\n\nYou can then run the examples as follows:\n\n.. code:: bash\n\n   fab eg.mnist\n   fab eg.basic_tagger\n   fab eg.cnn_tagger\n\nOtherwise, you can build and test explicitly with:\n\n.. code:: bash\n\n   git clone https://github.com/explosion/thinc\n   cd thinc\n\n   virtualenv .env\n   source .env/bin/activate\n\n   pip install -r requirements.txt\n   python setup.py build_ext --inplace\n   py.test thinc/\n\nAnd then run the examples as follows:\n\n.. code:: bash\n\n   python examples/mnist.py\n   python examples/basic_tagger.py\n   python examples/cnn_tagger.py\n\nCustomizing the matrix multiplication backend\n=============================================\n\nPrior to v6.11, Thinc relied on numpy for matrix multiplications. When numpy is installed via wheel using pip (the default), numpy will usually be linked against a suboptimal matrix multiplication kernel. This made it difficult to ensure that Thinc was well optimized for the target machine.\n\nTo fix this, Thinc now provides its own matrix multiplications, by bundling the source code for OpenBLAS's sgemm kernel within the library. To change the default BLAS library, you can specify an environment variable, giving the location of the shared library you want to link against:\n\n.. code:: bash\n  \n    THINC_BLAS=/opt/openblas/lib/libopenblas.so pip install thinc --no-cache-dir --no-binary\n    export LD_LIBRARY_PATH=/opt/openblas/lib\n    # On OSX:\n    # export DYLD_LIBRARY_PATH=/opt/openblas/lib\n\nIf you want to link against the Intel MKL instead of OpenBLAS, the easiest way is to install Miniconda. For instance, if you installed miniconda to `/opt/miniconda', the command to install Thinc linked against MKL would be:\n\n.. code:: bash\n    \n    THINC_BLAS=/opt/miniconda/numpy-mkl/lib/libmkl_rt.so pip install thinc --no-cache-dir --no-binary\n    export LD_LIBRARY_PATH=/opt/miniconda/numpy-mkl/lib\n    # On OSX:\n    # export DYLD_LIBRARY_PATH=/opt/miniconda/numpy-mkl/lib\n\nIf the library file ends in a .a extension, it is linked statically; if it ends in .so, it's linked dynamically. Make sure you have the directory on your LD_LIBRARY_PATH at runtime if you use the dynamic linking.\n\nUsage\n=====\n\nThe Neural Network API is still subject to change, even within minor versions.\nYou can get a feel for the current API by checking out the examples. Here are\na few quick highlights.\n\n1. Shape inference\n------------------\n\nModels can be created with some dimensions unspecified. Missing dimensions are\ninferred when pre-trained weights are loaded or when training begins. This\neliminates a common source of programmer error:\n\n.. code:: python\n\n    # Invalid network — shape mismatch\n    model = chain(ReLu(512, 748), ReLu(512, 784), Softmax(10))\n\n    # Leave the dimensions unspecified, and you can't be wrong.\n    model = chain(ReLu(512), ReLu(512), Softmax())\n\n2. Operator overloading\n-----------------------\n\nThe ``Model.define_operators()`` classmethod allows you to bind arbitrary\nbinary functions to Python operators, for use in any ``Model`` instance. The\nmethod can (and should) be used as a context-manager, so that the overloading\nis limited to the immediate block. This allows concise and expressive model\ndefinition:\n\n.. code:: python\n\n    with Model.define_operators({'>>': chain}):\n        model = ReLu(512) >> ReLu(512) >> Softmax()\n\nThe overloading is cleaned up at the end of the block. A fairly arbitrary zoo\nof functions are currently implemented. Some of the most useful:\n\n* ``chain(model1, model2)``: Compose two models ``f(x)`` and ``g(x)`` into a single model computing ``g(f(x))``.\n\n* ``clone(model1, int)``: Create ``n`` copies of a model, each with distinct weights, and chain them together.\n\n* ``concatenate(model1, model2)``: Given two models with output dimensions ``(n,)`` and ``(m,)``, construct a model with output dimensions ``(m+n,)``.\n\n* ``add(model1, model2)``: ``add(f(x), g(x)) = f(x)+g(x)``\n\n* ``make_tuple(model1, model2)``: Construct tuples of the outputs of two models, at the batch level. The backward pass expects to receive a tuple of gradients, which are routed through the appropriate model, and summed.\n\nPutting these things together, here's the sort of tagging model that Thinc is\ndesigned to make easy.\n\n.. code:: python\n\n    with Model.define_operators({'>>': chain, '**': clone, '|': concatenate}):\n        model = (\n            add_eol_markers('EOL')\n            >> flatten\n            >> memoize(\n                CharLSTM(char_width)\n                | (normalize >> str2int >> Embed(word_width)))\n            >> ExtractWindow(nW=2)\n            >> BatchNorm(ReLu(hidden_width)) ** 3\n            >> Softmax()\n        )\n\nNot all of these pieces are implemented yet, but hopefully this shows where\nwe're going. The ``memoize`` function will be particularly important: in any\nbatch of text, the common words will be very common. It's therefore important\nto evaluate models such as the ``CharLSTM`` once per word type per minibatch,\nrather than once per token.\n\n3. Callback-based backpropagation\n---------------------------------\n\nMost neural network libraries use a computational graph abstraction. This takes\nthe execution away from you, so that gradients can be computed automatically.\nThinc follows a style more like the ``autograd`` library, but with larger\noperations. Usage is as follows:\n\n.. code:: python\n\n    def explicit_sgd_update(X, y):\n        sgd = lambda weights, gradient: weights - gradient * 0.001\n        yh, finish_update = model.begin_update(X, drop=0.2)\n        finish_update(y-yh, sgd)\n\nSeparating the backpropagation into three parts like this has many advantages.\nThe interface to all models is completely uniform — there is no distinction\nbetween the top-level model you use as a predictor and the internal models for\nthe layers. We also make concurrency simple, by making the ``begin_update()``\nstep a pure function, and separating the accumulation of the gradient from the\naction of the optimizer.\n\n4. Class annotations\n--------------------\n\nTo keep the class hierarchy shallow, Thinc uses class decorators to reuse code\nfor layer definitions. Specifically, the following decorators are available:\n\n* ``describe.attributes()``: Allows attributes to be specified by keyword argument. Used especially for dimensions and parameters.\n\n* ``describe.on_init()``: Allows callbacks to be specified, which will be called at the end of the ``__init__.py``.\n\n* ``describe.on_data()``: Allows callbacks to be specified, which will be called on ``Model.begin_training()``.\n\n🛠 Changelog\n============\n\n=========== ============== ===========\nVersion     Date           Description\n=========== ============== ===========\n`v6.11.2`_  ``2018-05-21`` Improve GPU installation\n`v6.11.1`_  ``2018-05-20`` Support direct linkage to BLAS libraries\n v6.11.0    ``2018-03-16`` *n/a*\n`v6.10.2`_  ``2017-12-06`` Efficiency improvements and bug fixes\n`v6.10.1`_  ``2017-11-15`` Fix GPU install and minor memory leak\n`v6.10.0`_  ``2017-10-28`` CPU efficiency improvements, refactoring\n`v6.9.0`_   ``2017-10-03`` Reorganize layers, bug fix to Layer Normalization\n`v6.8.2`_   ``2017-09-26`` Fix packaging of `gpu_ops`\n`v6.8.1`_   ``2017-08-23`` Fix Windows support\n`v6.8.0`_   ``2017-07-25`` SELU layer, attention, improved GPU/CPU compatibility\n`v6.7.3`_   ``2017-06-05`` Fix convolution on GPU\n`v6.7.2`_   ``2017-06-02`` Bug fixes to serialization\n`v6.7.1`_   ``2017-06-02`` Improve serialization\n`v6.7.0`_   ``2017-06-01`` Fixes to serialization, hash embeddings and flatten ops\n`v6.6.0`_   ``2017-05-14`` Improved GPU usage and examples\n v6.5.2     ``2017-03-20`` *n/a*\n`v6.5.1`_   ``2017-03-20`` Improved linear class and Windows fix\n`v6.5.0`_   ``2017-03-11`` Supervised similarity, fancier embedding and improvements to linear model\n v6.4.0     ``2017-02-15`` *n/a*\n`v6.3.0`_   ``2017-01-25`` Efficiency improvements, argument checking and error messaging\n`v6.2.0`_   ``2017-01-15`` Improve API and introduce overloaded operators\n`v6.1.3`_   ``2017-01-10`` More neural network functions and training continuation\n v6.1.3     ``2017-01-09`` *n/a*\n v6.1.2     ``2017-01-09`` *n/a*\n v6.1.1     ``2017-01-09`` *n/a*\n v6.1.0     ``2017-01-09`` *n/a*\n`v6.0.0`_   ``2016-12-31`` Add ``thinc.neural`` for NLP-oriented deep learning\n=========== ============== ===========\n\n.. _v6.11.2: https://github.com/explosion/thinc/releases/tag/v6.11.2\n.. _v6.11.1: https://github.com/explosion/thinc/releases/tag/v6.11.1\n.. _v6.10.2: https://github.com/explosion/thinc/releases/tag/v6.10.2\n.. _v6.10.2: https://github.com/explosion/thinc/releases/tag/v6.10.2\n.. _v6.10.1: https://github.com/explosion/thinc/releases/tag/v6.10.1\n.. _v6.10.0: https://github.com/explosion/thinc/releases/tag/v6.10.0\n.. _v6.9.0: https://github.com/explosion/thinc/releases/tag/v6.9.0\n.. _v6.8.2: https://github.com/explosion/thinc/releases/tag/v6.8.2\n.. _v6.8.1: https://github.com/explosion/thinc/releases/tag/v6.8.1\n.. _v6.8.0: https://github.com/explosion/thinc/releases/tag/v6.8.0\n.. _v6.7.3: https://github.com/explosion/thinc/releases/tag/v6.7.3\n.. _v6.7.2: https://github.com/explosion/thinc/releases/tag/v6.7.2\n.. _v6.7.1: https://github.com/explosion/thinc/releases/tag/v6.7.1\n.. _v6.7.0: https://github.com/explosion/thinc/releases/tag/v6.7.0\n.. _v6.6.0: https://github.com/explosion/thinc/releases/tag/v6.6.0\n.. _v6.5.1: https://github.com/explosion/thinc/releases/tag/v6.5.1\n.. _v6.5.0: https://github.com/explosion/thinc/releases/tag/v6.5.0\n.. _v6.3.0: https://github.com/explosion/thinc/releases/tag/v6.3.0\n.. _v6.2.0: https://github.com/explosion/thinc/releases/tag/v6.2.0\n.. _v6.1.3: https://github.com/explosion/thinc/releases/tag/v6.1.3\n.. _v6.0.0: https://github.com/explosion/thinc/releases/tag/v6.0.0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CD76:3FA0D:171B19:5C301E:6AB92072"},"text_sha256":"eb93fd8b610efc96a40f4e53579f16529ff2e01c7c8c37a73e3c4f3c5be2dab1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3501","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0934:767EB:17D3F72:1BF2456:6AB92806"},"commit":{"sha":"6c38b29924b218140e5c10c2cb77e3ff487b0ffa","url":"https://github.com/explosion/thinc/commit/6c38b29924b218140e5c10c2cb77e3ff487b0ffa","date":"2026-03-27T07:49:48Z","author_date":"2026-03-27T07:49:48Z","committer_date":"2026-03-27T07:49:48Z","tree_sha":"f8d01ba018dd61e4e26d68b4ab0173bd9cbecdb2","message_first_line":"Add least-privilege permissions to CI workflow"},"tree_request_status":200,"tree_rate":{"github_remaining":"3500","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F0:280FBC:179D296:1BB9FA8:6AB92807"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11419,"blob_sha":"c53ce346b871d93b8e2d1b9e1be75b16c8ec8062","priority":0}],"documents":[{"path":"README.md","size":11419,"blob_sha":"c53ce346b871d93b8e2d1b9e1be75b16c8ec8062","priority":0,"status":200,"text":"<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /><\/a>\n\n# Thinc: A refreshing functional take on deep learning, compatible with your favorite libraries\n\n### From the makers of [spaCy](https://spacy.io) and [Prodigy](https://prodi.gy)\n\n[Thinc](https://thinc.ai) is a **lightweight deep learning library** that offers\nan elegant, type-checked, functional-programming API for **composing models**,\nwith support for layers defined in other frameworks such as **PyTorch,\nTensorFlow and MXNet**. You can use Thinc as an interface layer, a standalone\ntoolkit or a flexible way to develop new models. Previous versions of Thinc have\nbeen running quietly in production in thousands of companies, via both\n[spaCy](https://spacy.io) and [Prodigy](https://prodi.gy). We wrote the new\nversion to let users **compose, configure and deploy custom models** built with\ntheir favorite framework.\n\n[![tests](https://github.com/explosion/thinc/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/thinc/actions/workflows/tests.yml)\n[![Current Release Version](https://img.shields.io/github/v/release/explosion/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=github)](https://github.com/explosion/thinc/releases)\n[![PyPi Version](https://img.shields.io/pypi/v/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/thinc)\n[![conda Version](https://img.shields.io/conda/vn/conda-forge/thinc.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/thinc)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)\n[![Open demo in Colab][colab]][intro_to_thinc_colab]\n\n## 🔥 Features\n\n- **Type-check** your model definitions with custom types and\n  [`mypy`](https://mypy.readthedocs.io/en/latest/) plugin.\n- Wrap **PyTorch**, **TensorFlow** and **MXNet** models for use in your network.\n- Concise **functional-programming** approach to model definition, using\n  composition rather than inheritance.\n- Optional custom infix notation via **operator overloading**.\n- Integrated **config system** to describe trees of objects and hyperparameters.\n- Choice of **extensible backends**.\n- **[Read more &rarr;](https://thinc.ai/docs)**\n\n## 🚀 Quickstart\n\nThinc runs on **Linux**, **macOS** and **Windows**.\nThe latest releases with binary wheels are available from\n[pip](https://pypi.python.org/pypi/thinc). Before you install Thinc and its\ndependencies, make sure that your `pip`, `setuptools` and `wheel` are up to\ndate. For the most recent releases, pip 19.3 or newer is recommended.\n\n```bash\npip install -U pip setuptools wheel\npip install thinc\n```\n\nSee the [extended installation docs](https://thinc.ai/docs/install#extended) for\ndetails on optional dependencies for different backends and GPU. You might also\nwant to\n[set up static type checking](https://thinc.ai/docs/install#type-checking) to\ntake advantage of Thinc's type system.\n\n> ⚠️ If you have installed PyTorch and you are using Python 3.7+, uninstall the\n> package `dataclasses` with `pip uninstall dataclasses`, since it may have been\n> installed by PyTorch and is incompatible with Python 3.7+.\n\n### 📓 Selected examples and notebooks\n\nAlso see the [`/examples`](examples) directory and\n[usage documentation](https://thinc.ai/docs) for more examples. Most examples\nare Jupyter notebooks – to launch them on\n[Google Colab](https://colab.research.google.com) (with GPU support!) click on\nthe button next to the notebook name.\n\n| Notebook                                                                                                              | Description                                                                                                                                                                                       |\n| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [`intro_to_thinc`][intro_to_thinc]<br />[![Open in Colab][colab]][intro_to_thinc_colab]                               | Everything you need to know to get started. Composing and training a model on the MNIST data, using config files, registering custom functions and wrapping PyTorch, TensorFlow and MXNet models. |\n| [`transformers_tagger_bert`][transformers_tagger_bert]<br />[![Open in Colab][colab]][transformers_tagger_bert_colab] | How to use Thinc, `transformers` and PyTorch to train a part-of-speech tagger. From model definition and config to the training loop.                                                             |\n| [`pos_tagger_basic_cnn`][pos_tagger_basic_cnn]<br />[![Open in Colab][colab]][pos_tagger_basic_cnn_colab]             | Implementing and training a basic CNN for part-of-speech tagging model without external dependencies and using different levels of Thinc's config system.                                         |\n| [`parallel_training_ray`][parallel_training_ray]<br />[![Open in Colab][colab]][parallel_training_ray_colab]          | How to set up synchronous and asynchronous parameter server training with Thinc and [Ray](https://ray.readthedocs.io/en/latest/).                                                                 |\n\n**[View more &rarr;](examples)**\n\n[colab]:\n  https://gistcdn.githack.com/ines/dcf354aa71a7665ae19871d7fd14a4e0/raw/461fc1f61a7bc5860f943cd4b6bcfabb8c8906e7/colab-badge.svg\n[intro_to_thinc]: examples/00_intro_to_thinc.ipynb\n[intro_to_thinc_colab]:\n  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/00_intro_to_thinc.ipynb\n[transformers_tagger_bert]: examples/02_transformers_tagger_bert.ipynb\n[transformers_tagger_bert_colab]:\n  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/02_transformers_tagger_bert.ipynb\n[pos_tagger_basic_cnn]: examples/03_pos_tagger_basic_cnn.ipynb\n[pos_tagger_basic_cnn_colab]:\n  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/03_pos_tagger_basic_cnn.ipynb\n[parallel_training_ray]: examples/04_parallel_training_ray.ipynb\n[parallel_training_ray_colab]:\n  https://colab.research.google.com/github/explosion/thinc/blob/master/examples/04_parallel_training_ray.ipynb\n\n### 📖 Documentation & usage guides\n\n| Documentation                                                                     | Description                                           |\n| --------------------------------------------------------------------------------- | ----------------------------------------------------- |\n| [Introduction](https://thinc.ai/docs)                                             | Everything you need to know.                          |\n| [Concept & Design](https://thinc.ai/docs/concept)                                 | Thinc's conceptual model and how it works.            |\n| [Defining and using models](https://thinc.ai/docs/usage-models)                   | How to compose models and update state.               |\n| [Configuration system](https://thinc.ai/docs/usage-config)                        | Thinc's config system and function registry.          |\n| [Integrating PyTorch, TensorFlow & MXNet](https://thinc.ai/docs/usage-frameworks) | Interoperability with machine learning frameworks     |\n| [Layers API](https://thinc.ai/docs/api-layers)                                    | Weights layers, transforms, combinators and wrappers. |\n| [Type Checking](https://thinc.ai/docs/usage-type-checking)                        | Type-check your model definitions and more.           |\n\n## 🗺 What's where\n\n| Module                                    | Description                                                                       |\n| ----------------------------------------- | --------------------------------------------------------------------------------- |\n| [`thinc.api`](thinc/api.py)               | **User-facing API.** All classes and functions should be imported from here.      |\n| [`thinc.types`](thinc/types.py)           | Custom [types and dataclasses](https://thinc.ai/docs/api-types).                  |\n| [`thinc.model`](thinc/model.py)           | The `Model` class. All Thinc models are an instance (not a subclass) of `Model`.  |\n| [`thinc.layers`](thinc/layers)            | The layers. Each layer is implemented in its own module.                          |\n| [`thinc.shims`](thinc/shims)              | Interface for external models implemented in PyTorch, TensorFlow etc.             |\n| [`thinc.loss`](thinc/loss.py)             | Functions to calculate losses.                                                    |\n| [`thinc.optimizers`](thinc/optimizers.py) | Functions to create optimizers. Currently supports \"vanilla\" SGD, Adam and RAdam. |\n| [`thinc.schedules`](thinc/schedules.py)   | Generators for different rates, schedules, decays or series.                      |\n| [`thinc.backends`](thinc/backends)        | Backends for `numpy` and `cupy`.                                                  |\n| [`thinc.config`](thinc/config.py)         | Config parsing and validation and function registry system.                       |\n| [`thinc.util`](thinc/util.py)             | Utilities and helper functions.                                                   |\n\n## 🐍 Development notes\n\nThinc uses [`black`](https://github.com/psf/black) for auto-formatting,\n[`flake8`](http://flake8.pycqa.org/en/latest/) for linting and\n[`mypy`](https://mypy.readthedocs.io/en/latest/) for type checking. All code\nincludes type hints wherever possible. See\nthe [type reference](https://thinc.ai/docs/api-types) for more details on\nThinc's custom types.\n\n### 👷‍♀️ Building Thinc from source\n\nBuilding Thinc from source requires the full dependencies listed in\n[`requirements.txt`](requirements.txt) to be installed. You'll also need a\ncompiler to build the C extensions.\n\n```bash\ngit clone https://github.com/explosion/thinc\ncd thinc\npython -m venv .env\nsource .env/bin/activate\npip install -U pip setuptools wheel\npip install -r requirements.txt\npip install --no-build-isolation .\n```\n\nAlternatively, install in editable mode:\n\n```bash\npip install -r requirements.txt\npip install --no-build-isolation --editable .\n```\n\nOr by setting `PYTHONPATH`:\n\n```bash\nexport PYTHONPATH=`pwd`\npip install -r requirements.txt\npython setup.py build_ext --inplace\n```\n\n### 🚦 Running tests\n\nThinc comes with an [extensive test suite](thinc/tests). The following should\nall pass and not report any warnings or errors:\n\n```bash\npython -m pytest thinc    # test suite\npython -m mypy thinc      # type checks\npython -m flake8 thinc    # linting\n```\n\nTo view test coverage, you can run `python -m pytest thinc --cov=thinc`. We aim\nfor a 100% test coverage. This doesn't mean that we meticulously write tests for\nevery single line – we ignore blocks that are not relevant or difficult to test\nand make sure that the tests execute all code paths.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"541C:345ED4:171BE6:5C309E:6AB92074"},"text_sha256":"e71aeeb7f3cb270f66cf4555bcc35f7069b9f8b51631c9afbdfd3cd5a43bc127"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/pai","input_row":{"repository":"microsoft/pai","url":"https://github.com/microsoft/pai","name":"pai","owner":"microsoft","description":"Resource scheduling and cluster management for AI","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2693,"issues":2086,"created_at":"2017-09-25T11:24:51Z","updated_at":"2026-09-27T11:31:22Z","first_commit_at":"2017-09-25T11:24:51Z","last_commit_at":"2026-09-18T01:28:22Z","activity_months":107.73999999999999,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:23.885Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/pai","visibility":"public","created_at":"2017-09-25T11:24:51Z","updated_at":"2026-09-27T11:31:22Z","private":false,"fork":false,"archived":false,"stargazers_count":2693,"open_issues_count":260,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3499","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:17CA48B:1BE83A4:6AB92807"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3498","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AD:72BD3:17DA8E6:1BF8725:6AB92808"},"commit":{"sha":"4bcd6468ae1472a79a4106f6567d7db72471e186","url":"https://github.com/microsoft/pai/commit/4bcd6468ae1472a79a4106f6567d7db72471e186","date":"2018-05-24T14:07:45Z","author_date":"2018-05-24T14:07:45Z","committer_date":"2018-05-24T14:07:45Z","tree_sha":"395f4e0069b46f1dd547696091fa568d9b839960","message_first_line":"fix hyperlinks"},"tree_request_status":200,"tree_rate":{"github_remaining":"3497","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:17F3C2A:1C11B75:6AB92808"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6754,"blob_sha":"59ed3273806aedae13d3f7d1588764ef3c83ebf2","priority":0}],"documents":[{"path":"README.md","size":6754,"blob_sha":"59ed3273806aedae13d3f7d1588764ef3c83ebf2","priority":0,"status":200,"text":"# Open Platform for AI (PAI) ![alt text][logo]\n\n[logo]: ./pailogo.jpg \"OpenPAI\"\n\n[![Build Status](https://travis-ci.org/Microsoft/pai.svg?branch=master)](https://travis-ci.org/Microsoft/pai)\n[![Coverage Status](https://coveralls.io/repos/github/Microsoft/pai/badge.svg?branch=master)](https://coveralls.io/github/Microsoft/pai?branch=master)\n\n\n## Introduction\n\nPlatform for AI is a cluster management tool and resource scheduling platform, jointly designed and developed by [Microsoft Research (MSR)](https://www.microsoft.com/en-us/research/group/systems-research-group-asia/) and [Microsoft Search Technology Center (STC)](https://www.microsoft.com/en-us/ard/company/introduction.aspx).\nThe platform incorporates some mature design that has a proven track record in large scale Microsoft production environment, and is tailored primarily for academic and research purpose. \n\nPAI supports AI jobs (e.g., deep learning jobs) running in a GPU cluster. The platform provides a set of interfaces to support major deep learning frameworks: CNTK, TensorFlow, etc. The interface provides great extensibility: new deep learning framework (or other type of workload) can be supported by the interface with a few extra lines of script and/or Python code.\n\nPAI supports GPU scheduling, a key requirement of deep learning job. \nFor better performance, PAI supports fine-grained topology-aware job placement that can request for the GPU with a specific location (e.g., under the same PCI-E switch).\n\nPAI embraces a [microservices](https://en.wikipedia.org/wiki/Microservices) architecture: every component runs in a container.\nThe system leverages [Kubernetes](https://kubernetes.io/) to deploy and manage static components in the system.\nThe more dynamic deep learning jobs are scheduled and managed by [Hadoop](http://hadoop.apache.org/) YARN with our [GPU enhancement](https://issues.apache.org/jira/browse/YARN-7481). \nThe training data and training results are stored in Hadoop HDFS.\n\n## An Open AI Platform for R&D and Education \n\nPAI is completely open: it is under the MIT license. PAI is architected in a modular way: different module can be plugged in as appropriate. This makes PAI particularly attractive to evaluate various research ideas, which include but not limited to the following components: \n\n* Scheduling mechanism for deep learning workload\n* Deep neural network application that requires evaluation under realistic platform environment\n* New deep learning framework\n* Compiler technique for AI\n* High performance networking for AI\n* Profiling tool, including network, platform, and AI job profiling\n* AI Benchmark suite\n* New hardware for AI, including FPGA, ASIC, Neural Processor\n* AI Storage support\n* AI platform management \n\nPAI operates in an open model: contributions from academia and industry are all highly welcome. \n\n## System Deployment\n\n### Prerequisite\n\nThe system runs in a cluster of machines each equipped with one or multiple GPUs. \nEach machine in the cluster runs Ubuntu 16.04 LTS and has a statically assigned IP address.\nTo deploy services, the system further relies on a Docker registry service (e.g., [Docker hub](https://docs.docker.com/docker-hub/)) \nto store the Docker images for the services to be deployed.\nThe system also requires a dev machine that runs in the same environment that has full access to the cluster.\nAnd the system need [NTP](http://www.ntp.org/) service for clock synchronization.\n\n### Deployment process\nTo deploy and use the system, the process consists of the following steps.\n\n1. Build the binary for [Hadoop AI](./hadoop-ai/README.md) and place it in the specified path*\n2. [Deploy kubernetes and system services](./pai-management/README.md)\n3. Access [web portal](./webportal/README.md) for job submission and cluster management\n\n\\* If step 1 is skipped, a standard Hadoop 2.7.2 will be installed instead.\n\n#### Kubernetes deployment\n\nThe platform leverages Kubernetes (k8s) to deploy and manage system services.\nTo deploy k8s in the cluster, please refer to k8s deployment [readme](./pai-management/README.md) for details.\n\n#### Service deployment\n\nAfter Kubernetes is deployed, the system will leverage built-in k8s features (e.g., configmap) to deploy system services.\nPlease refer to service deployment [readme](./pai-management/README.md) for details.\n\n#### Job management\n\nAfter system services have been deployed, user can access the web portal, a Web UI, for cluster management and job management.\nPlease refer to this [tutorial](job-tutorial/README.md) for details about job submission.\n\n#### Cluster management\n\nThe web portal also provides Web UI for cluster management.\n\n## System Architecture\n\n<p style=\"text-align: left;\">\n  <img src=\"./sysarch.png\" title=\"System Architecture\" alt=\"System Architecture\" />\n<\/p>\n\nThe system architecture is illustrated above. \nUser submits jobs or monitors cluster status through the [Web Portal](./webportal/README.md), \nwhich calls APIs provided by the [REST server](./rest-server/README.md).\nThird party tools can also call REST server directly for job management.\nUpon receiving API calls, the REST server coordinates with [FrameworkLauncher](./frameworklauncher/README.md) (short for Launcher)\nto perform job management.\nThe Launcher Server handles requests from the REST Server and submits jobs to Hadoop YARN. \nThe job, scheduled by YARN with [GPU enhancement](https://issues.apache.org/jira/browse/YARN-7481), \ncan leverage GPUs in the cluster for deep learning computation. Other type of CPU based AI workloads or traditional big data job\ncan also run in the platform, coexisted with those GPU-based jobs. \nThe platform leverages HDFS to store data. All jobs are assumed to support HDFS.\nAll the static services (blue-lined box) are managed by Kubernetes, while jobs (purple-lined box) are managed by Hadoop YARN. \n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7146:376DE:17A37F:5CBA72:6AB92075"},"text_sha256":"414d624cee9a4f4b10cee493ca53c2c2333e74d0b5fd3ba01e31c294affb6361"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3496","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17B17AC:1BCE8FD:6AB92809"},"commit":{"sha":"a95d9420e63e6d6cce2d5cd001b990bb09bf2987","url":"https://github.com/microsoft/pai/commit/a95d9420e63e6d6cce2d5cd001b990bb09bf2987","date":"2024-06-06T07:56:06Z","author_date":"2024-06-06T07:56:06Z","committer_date":"2024-06-06T07:56:06Z","tree_sha":"52172f1cadd0c55b37187f17a96df951c624e735","message_first_line":"Fix security issue (#5817)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3495","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17AEB67:1BCCB55:6AB92809"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20249,"blob_sha":"6bd9fb29b038ef84a4b98cb7f7be94f190551d33","priority":0},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1}],"documents":[{"path":"README.md","size":20249,"blob_sha":"6bd9fb29b038ef84a4b98cb7f7be94f190551d33","priority":0,"status":200,"text":"# Open Platform for AI (OpenPAI) ![alt text][logo]\n\n[logo]: ./pailogo.jpg \"OpenPAI\"\n\n[![Build Status](https://openpai.visualstudio.com/OpenPAI/_apis/build/status/OpenPAI-nightly-build?branchName=master)](https://openpai.visualstudio.com/OpenPAI/_build/latest?definitionId=25&branchName=master)\n[![Join the chat at https://gitter.im/Microsoft/pai](https://badges.gitter.im/Microsoft/pai.svg)](https://gitter.im/Microsoft/pai?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Version](https://img.shields.io/github/release/Microsoft/pai.svg)](https://github.com/Microsoft/pai/releases/latest)\n\n**After the release of [v1.8.1](./RELEASE_NOTE.md#Dec-2021-version-181) , OpenPAI has entered stable mode with no major feature release planned. In order to save maintenance efforts, we changed the repo to read only mode. For collaboration, please contact repo admin directly.**\n\nWith the release of v1.0, OpenPAI is switching to a more robust, more powerful and lightweight architecture. OpenPAI is also becoming more and more modular so that the platform can be easily customized and expanded to suit new needs. OpenPAI also provides many AI user-friendly features, making it easier for end users and administrators to complete daily AI tasks.\n\n <table>\n   <tr>\n      <td align=\"center\">\n        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>\n        <br/>\n        <a href=\"https://github.com/microsoft/openpaimarketplace\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture1.svg\" width=\"610\" alt=\"Marketplace Logo\" />\n        <\/a>\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture2.svg\" width=\"200\" alt=\" Web Portal\" />\n        <a href=\"https://github.com/microsoft/openpaisdk\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture3.svg\" width=\"200\" alt=\"VScode\" />\n        <\/a>\n        <a href=\"https://github.com/microsoft/openpaivscode\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture4.svg\" width=\"200\" alt=\"SDK\" />\n        <\/a>\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture5.svg\" width=\"610\" alt=\"API\" />\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture18.svg\" width=\"610\" alt=\"Services\" />\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture19.svg\" width=\"304\" alt=\"User Authentication\" />\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture20.svg\" width=\"304\" alt=\"User/Group Management\" />\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture21.svg\" width=\"304\" alt=\"Storage Management\" />\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture22.svg\" width=\"304\" alt=\"Cluster/Job Monitoring\" />\n        <br/>\n        <a href=\"https://github.com/microsoft/frameworkcontroller\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture23.svg\" width=\"304\" alt=\"Job Orchestration\" />\n        <\/a>\n        <a href=\"https://github.com/microsoft/hivedscheduler\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture24.svg\" width=\"304\" alt=\"Job Scheduling\" />\n        <\/a>\n        <br/>\n        <a href=\"https://github.com/microsoft/openpai-runtime\" target=\"_blank\">\n          <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture25.svg\" width=\"304\" alt=\"Job Runtime\" />\n        <\/a>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture26.svg\" width=\"304\" alt=\"Job Error Analysis\" />\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture15.svg\" width=\"610\" alt=\"Kubernetes Cluster Management\" />\n        <br/>\n        <img src=\"https://openpai.readthedocs.io/en/latest/images/architecture/Picture16.svg\" width=\"610\" alt=\"CPU/GPU/FPGA/InfiniBand\" />\n     <\/td>\n   <\/tr>\n <\/table>\n\n## Table of Contents\n\n  - [When to consider OpenPAI](#when-to-consider-openpai)\n  - [Why choose OpenPAI](#why-choose-openpai)\n      - [Support on-premises and easy to deploy](#support-on-premises-and-easy-to-deploy)\n      - [Support popular AI frameworks and heterogeneous hardware](#support-popular-ai-frameworks-and-heterogeneous-hardware)\n      - [Most complete solution and easy to extend](#most-complete-solution-and-easy-to-extend)\n  - [Get started](#get-started)\n    - [For cluster administrators](#for-cluster-administrators)\n    - [For cluster users](#for-cluster-users)\n  - [Standalone Components](#standalone-components)\n  - [Reference](#reference)\n  - [Related Projects](#related-projects)\n  - [Get involved](#get-involved)\n  - [How to contribute](#how-to-contribute)\n    - [Contributor License Agreement](#contributor-license-agreement)\n    - [Call for contribution](#call-for-contribution)\n    - [Who should consider contributing to OpenPAI](#who-should-consider-contributing-to-openpai)\n    - [Contributors](#contributors)\n\n## When to consider OpenPAI\n\n1. When your organization needs to share powerful AI computing resources (GPU/FPGA farm, etc.) among teams.\n2. When your organization needs to share and reuse common AI assets like Model, Data, Environment, etc.\n3. When your organization needs an easy IT ops platform for AI.\n4. When you want to run a complete training pipeline in one place.\n\n## Why choose OpenPAI\n\nThe platform incorporates the mature design that has a proven track record in Microsoft's large-scale production environment.\n\n#### Support on-premises and easy to deploy\n\nOpenPAI is a full stack solution. OpenPAI not only supports on-premises, hybrid, or public Cloud deployment but also supports single-box deployment for trial users.\n\n#### Support popular AI frameworks and heterogeneous hardware\n\nPre-built docker for popular AI frameworks. Easy to include heterogeneous hardware. Support Distributed training, such as distributed TensorFlow.\n\n#### Most complete solution and easy to extend\n\nOpenPAI is a most complete solution for deep learning, support virtual cluster, compatible with Kubernetes eco-system, complete training pipeline at one cluster etc. OpenPAI is architected in a modular way: different module can be plugged in as appropriate. [Here](./docs/system_architecture.md) is the architecture of OpenPAI, highlighting technical innovations of the platform.\n\n## Get started\n\nOpenPAI manages computing resources and is optimized for deep learning. Through docker technology, the computing hardware are decoupled with software, so that it's easy to run distributed jobs, switch with different deep learning frameworks, or run other kinds of jobs on consistent environments.\n\nAs OpenPAI is a platform, there are typically two different roles:\n\n- **Cluster users** are the consumers of the cluster's computing resources. According to the deployment scenarios, cluster users could be researchers of Machine Learning and Deep Learning, data scientists, lab teachers, students and so on.\n- **Cluster administrators** are the owners and maintainers of computing resources. The administrators are responsible for the deployment and availability of the cluster.\n\nOpenPAI provides end-to-end manuals for both cluster users and administrators.\n\n### For cluster administrators\n\nThe [admin manual](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/index.html) is a comprehensive guide for cluster administrators, it covers (but not limited to) the following contents:\n\n- **Installation and upgrade**. The installation is based on Kubespray, and here is the [system requirements](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-guide.html#installation-requirements). OpenPAI provides an [installation guide](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-guide.html) to facilitate the installation.\n\n  If you are considering upgrade from older version to the latest v1.0.0, please refer to the table below for a brief comparison between `v0.14.0` and the `v1.0.0`. More detail about the upgrade considerations can be found [upgrade guide](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/upgrade-guide.html).\n\n  |                   | `v0.14.0`                | `v1.0.0`                |\n  | ----------------- | ------------------------ | ----------------------- |\n  | Architecture      | Kubernetes + Hadoop YARN | Kubernetes              |\n  | Scheduler         | YARN Scheduler           | HiveD / K8S default     |\n  | Job Orchestrating | YARN Framework Launcher  | Framework Controller    |\n  | RESTful API       | v1 + v2                  | pure v2                 |\n  | Storage           | Team-wise storage plugin | PV/PVC storage sharing  |\n  | Marketplace       | Marketplace v2           | openpaimarketplace      |\n  | SDK               | Python                   | JavaScript / TypeScript |\n\n  _If there is any question during deployment, please check [installation FAQs and troubleshooting](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-faqs-and-troubleshooting.html) first. If it is not covered yet, refer to [here](#get-involved) to ask question or submit an issue._\n\n- **Basic cluster management**. Through the Web-portal and a command-line tool `paictl`, administrators could complete [cluster managements](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/basic-management-operations.html), such as [adding (or removing) nodes](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/how-to-add-and-remove-nodes.html), [monitoring nodes and services](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/basic-management-operations.html#management-on-webportal), and [storages setup and permission control](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/how-to-set-up-storage.html).\n\n- **Users and groups management**. Administrators could manage the [users and groups](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/how-to-manage-users-and-groups.html) easily.\n\n- **Alerts management**. Administrators could [customize alerts rules and actions](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/how-to-customize-alerts.html).\n\n- **Customization**. Administrators could customize the cluster by [plugins](https://openpai.readthedocs.io/en/latest/manual/cluster-admin/how-to-customize-cluster-by-plugins.html). Administrators could also upgrade (or downgrade) a single component (e.g. rest servers) to address customized application demands.\n\n### For cluster users\n\nThe [user manual](https://openpai.readthedocs.io/en/latest/manual/cluster-user/index.html) is a guidance for cluster users, who could train and serve deep learning (and other) tasks on OpenPAI.\n\n- **Job submission and monitoring**. The [quick start tutorial](https://openpai.readthedocs.io/en/latest/manual/cluster-user/quick-start.html) is a good start for learning how to train models on OpenPAI. And more examples and supports to multiple mainstream frameworks (out-of-the-box docker images) are in [here](https://openpai.readthedocs.io/en/latest/manual/cluster-user/docker-images-and-job-examples.html). OpenPAI also provides supports for [good debuggability](https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-debug-jobs.html) and [advanced job functionalities](https://openpai.readthedocs.io/en/latest/manual/cluster-user/advanced-jobs.html).\n\n- **Data managements**. Users could use cluster provisioned storages and custom storages in their jobs. The cluster provisioned storages are well integrated and easy to configure in a job [(refer to here)](https://openpai.readthedocs.io/en/latest/manual/cluster-user/how-to-manage-data.html).\n\n- **Collaboration and sharing**. OpenPAI provides facilities for collaboration in teams and organizations. The cluster provisioned storages are organized by teams (groups). And users could easily share their works (e.g. jobs) in the [marketplace](https://openpai.readthedocs.io/en/latest/manual/cluster-user/use-marketplace.html), where others could discover and reproduce (clone) by one-click.\n\nBesides the webportal, OpenPAI provides [VS Code extension](https://openpai.readthedocs.io/en/latest/manual/cluster-user/use-vscode-extension.html) and [command line tool (preview)](https://github.com/microsoft/openpaisdk). The VS Code extension is a friendly, GUI based client tool of OpenPAI, and it's highly recommended. It's an extension of Visual Studio Code. It can submit job, simulate jobs locally, manage multiple OpenPAI environments, and so on.\n\n## Standalone Components\n\nWith the `v1.0.0` release, OpenPAI starts using a more modularized component design and re-organize the code structure to 1 main repo together with 7 standalone key component repos. [pai](https://github.com/microsoft/pai) is the main repo, and the 7 component repos are:\n\n- [hivedscheduler](https://github.com/microsoft/hivedscheduler) is a Kubernetes Scheduler Extender for Multi-Tenant GPU clusters, which provides various advantages over standard k8s scheduler.\n- [frameworkcontroller](https://github.com/microsoft/frameworkcontroller) is built to orchestrate all kinds of applications on Kubernetes by a single controller.\n- [openpai-protocol](https://github.com/microsoft/openpai-protocol) is the specification of OpenPAI job protocol.\n- [openpai-runtime](https://github.com/microsoft/openpai-runtime) provides runtime support which is necessary for the OpenPAI protocol.\n- [openpaisdk](https://github.com/microsoft/openpaisdk) is a JavaScript SDK designed to facilitate the developers of OpenPAI to offer more user-friendly experience.\n- [openpaimarketplace](https://github.com/microsoft/openpaimarketplace) is a service which stores examples and job templates. Users can use it from webportal plugin to share their jobs or run-and-learn others' sharing job.\n- [openpaivscode](https://github.com/microsoft/openpaivscode) is a VSCode extension, which makes users connect OpenPAI clusters, submit AI jobs, simulate jobs locally and manage files in VSCode easily.\n\n## Reference\n\n- [PyTorch CIFAR-10](https://github.com/microsoft/pai/tree/pai-for-edu/contrib/edu-examples/pytorch_cifar10) and [TensorFlow CIFAR-10](https://github.com/microsoft/pai/tree/pai-for-edu/contrib/edu-examples/tensorflow_cifar10) job examples\n- [RESTful API](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/microsoft/pai/master/src/rest-server/docs/swagger.yaml)\n- Design documents could be found [here](docs) if you are curious.\n\n## Related Projects\n\nTargeting at openness and advancing state-of-art technology, [Microsoft Research (MSR)](https://www.microsoft.com/en-us/research/group/systems-research-group-asia/) and [Microsoft Software Technology Center Asia (STCA)](https://www.microsoft.com/en-us/ard/default.aspx) had also released few other open source projects.\n\n- [NNI](https://github.com/Microsoft/nni) : An open source AutoML toolkit for neural architecture search and hyper-parameter tuning.\n  We encourage researchers and students leverage these projects to accelerate the AI development and research.\n- [MMdnn](https://github.com/Microsoft/MMdnn) : A comprehensive, cross-framework solution to convert, visualize and diagnose deep neural network models. The \"MM\" in MMdnn stands for model management and \"dnn\" is an acronym for deep neural network.\n- [NeuronBlocks](https://github.com/Microsoft/NeuronBlocks) : An NLP deep learning modeling toolkit that helps engineers to build DNN models like playing Lego. The main goal of this toolkit is to minimize developing cost for NLP deep neural network model building, including both training and inference stages.\n- [SPTAG](https://github.com/Microsoft/SPTAG) : Space Partition Tree And Graph (SPTAG) is an open source library for large scale vector approximate nearest neighbor search scenario.\n\n## Get involved\n\n- [Stack Overflow](./docs/stackoverflow.md): If you have questions about OpenPAI, please submit question at Stack Overflow under tag: openpai\n- [Gitter chat](https://gitter.im/Microsoft/pai): You can also ask questions in Microsoft/pai conversation.\n- [Create an issue or feature request](https://github.com/Microsoft/pai/issues/new/choose): If you have issue/ bug/ new feature, please submit it to GitHub.\n\n## How to contribute\n\n### Contributor License Agreement\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n### Call for contribution\n\nWe are working on a set of major features improvement and refactor, anyone who is familiar with the features is encouraged to join the design review and discussion in the corresponding issue ticket.\n\n- GPU fairness usage [Issue 4266](https://github.com/Microsoft/pai/issues/4266)\n\n### Who should consider contributing to OpenPAI\n\n- Folks who want to add support for other ML and DL frameworks\n- Folks who want to make OpenPAI a richer AI platform (e.g. support for more ML pipelines, hyperparameter tuning)\n- Folks who want to write tutorials/blog posts showing how to use OpenPAI to solve AI problems\n\n### Contributors\n\nOne key purpose of OpenPAI is to support the highly diversified requirements from academia and industry. OpenPAI is completely open: it is under the MIT license. This makes OpenPAI particularly attractive to evaluate various research ideas, which include but not limited to the [components](./docs/research_education.md).\n\nOpenPAI operates in an open model. It is initially designed and developed by [Microsoft Research (MSR)](https://www.microsoft.com/en-us/research/group/systems-research-group-asia/) and [Microsoft Software Technology Center Asia (STCA)](https://www.microsoft.com/en-us/ard/default.aspx) platform team.\nWe are glad to have [Peking University](http://eecs.pku.edu.cn/EN/), [Xi'an Jiaotong University](http://www.aiar.xjtu.edu.cn/), [Zhejiang University](http://www.cesc.zju.edu.cn/index_e.htm), [University of Science and Technology of China](http://eeis.ustc.edu.cn/) and [SHANGHAI INESA AI INNOVATION CENTER (SHAIIC)](https://www.shaiic.com/) joined us to develop the platform jointly.\nContributions from academia and industry are all highly welcome.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E92:2C474:17971F:5CACF0:6AB92077"},"text_sha256":"cedcb11a7c305e6e30a5101651d3c96ac48b81f7f2ad4a8fc66d5f355781b766"},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E48:3B6DE:16E334:5BF864:6AB92077"},"text_sha256":"89c4e4b9ba7ec705482e2de05135d0626d33bf8c2c66119c65d7a306dd83459c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dickreuter/Poker","input_row":{"repository":"dickreuter/Poker","url":"https://github.com/dickreuter/Poker","name":"Poker","owner":"dickreuter","description":"Fully functional Pokerbot that works on PartyPoker, PokerStars and GGPoker, scraping tables with Open-CV (adaptable via gui) or neural network and making decisions based on a genetic algorithm and montecarlo simulation for poker equity calculation. Binaries can be downloaded with this link:","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":2467,"issues":158,"created_at":"2016-03-29T23:58:12Z","updated_at":"2026-09-26T23:42:49Z","first_commit_at":"2016-09-01T19:40:15Z","last_commit_at":"2025-06-26T21:29:09Z","activity_months":105.78,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:26.923Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dickreuter/Poker","visibility":"public","created_at":"2016-03-29T23:58:12Z","updated_at":"2026-09-26T23:42:49Z","private":false,"fork":false,"archived":false,"stargazers_count":2467,"open_issues_count":34,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3494","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:17D38D8:1BF16DA:6AB9280A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3493","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0834:0AC4:1277501:15C533E:6AB9280B"},"commit":{"sha":"ab4b837eff2f8fb49d2fbf973e120931ad331e8c","url":"https://github.com/dickreuter/Poker/commit/ab4b837eff2f8fb49d2fbf973e120931ad331e8c","date":"2018-03-01T13:33:34Z","author_date":"2018-03-01T13:33:34Z","committer_date":"2018-03-01T13:33:34Z","tree_sha":"e6fd637012aad6abb1ae027d82d1662b40395b19","message_first_line":"add missing test pngs"},"tree_request_status":200,"tree_rate":{"github_remaining":"3492","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:178C086:1BA9FC9:6AB9280B"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3491","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:17C8D47:1BE6E33:6AB9280C"},"commit":{"sha":"cae3a108b6cbf22ed8ef90bc0e70f790346289a4","url":"https://github.com/dickreuter/Poker/commit/cae3a108b6cbf22ed8ef90bc0e70f790346289a4","date":"2025-06-26T21:29:09Z","author_date":"2025-06-26T21:29:09Z","committer_date":"2025-06-26T21:29:09Z","tree_sha":"c0fd8eb31e07b00e34e0b6437c1e3f8f578356af","message_first_line":"fix config"},"tree_request_status":200,"tree_rate":{"github_remaining":"3490","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:17C8D8D:1BE6E72:6AB9280C"},"tree_truncated":false,"document_candidates":[{"path":"readme.rst","size":16648,"blob_sha":"c087f43f0d7fc3a9f34998dba036e2850ec87728","priority":0}],"documents":[{"path":"readme.rst","size":16648,"blob_sha":"c087f43f0d7fc3a9f34998dba036e2850ec87728","priority":0,"status":200,"text":"DeeperMind pokerbot for pokerstars, partypoker and GGPoker\n==========================================================\n\nThis pokerbot plays automatically on Pokerstars, Partypoker and GG Poker. Any other table can be mapped as well.\nIt works with image recognition, montecarlo simulation and a basic genetic algorithm.\nThe mouse is moved automatically and the bot can potentially play for hours based on a large number of parameters.\n\nYou can download the binaries and run the executable directly from here:\nhttp://www.deepermind-pokerbot.com\n\nRunning the bot:\n----------------\n\nPartypoker:\n~~~~~~~~~~~\n* Use Fast Forward Tables\n* Select Official PartyPoker table scraper\n\n.. figure:: doc/partypoker.gif\n\nPokerstars:\n~~~~~~~~~~~\n* Use Zoom Tables\n* Select Official Poker Stars table scraper\n* For Pokerstars you will need to make some adjustments to the client. It needs to look exactly as the below, in order to run it with the Official Pokerstars Table scraper:\n* Make sure to match the card styles (4 color), covered card styles, and table styles.\n\n.. figure:: doc/ps-example.png\n\nGGPoker:\n~~~~~~~~~~~\nMake sure your GGPoker setup looks as follows when using it with the Official GGPoker Table:\n\n.. figure:: doc/ggpk2.png\n\n\nGeneral setup:\n~~~~~~~~~~~~~~\n\nIf you just want to run the bot, please do the following:\n\nInstall the binearies of the bot from here: http://www.deepermind-pokerbot.com\n\nYou can then immediately run the bot. It will analyze the poker client, move the mouse and play in accordance\nwith one of its pre-programmed strategies. Most of the strategies are based on zoom or Fast Forward tables.\nYou are welcome to edit and imporve any strategies to optmize the play of the bot for your needs.\n\nIn most cases it may be useful to put the poker client inside a virtual machine to avoid it from interfering\nwith the bot. Also, the bot will then be able to control the mouse inside the virtual machine, without blocking\nthe whole computer:\n\n* Download Virtualbox: https://www.virtualbox.org/\n* Download Windows 10 Iso File for example from here https://www.softlay.com/apps/operating-system\n* Create a new virtual box environment and use the ISO file as a startup\n* Make sure to give the Virtualbox only 1 CPU as the computing power is needed for the bot (mainly for OCR)\n* Install Partypoker or Pokerstars in the virtual box environment\n* Install the pokerbot directly onto your computer (outside of the virtual box)\n* In the Setup select your virtual box instance (instead of direct mouse control)\n* Join the discord chat by pressing the chat button or joining this link: https://discord.gg/xB9sR3Q7r3\n\n* The current version Only works on windows\n* Do not obstruct the view of the table as the bot is based on image recognition\n* Only one table window should be visible.\n* For best performance minimize all windows in the vm, except the table window itself\n* Don't use any dpi scaling in the virtualbox\n* In setup, try to select your virtual machine instead of direct mouse control. That way mouse movements won't obstruct you.\n\n\nStrategy Analyzer\n-----------------\n\n- You can see the profitability of each strategy in the strategy analyzer.\n- The bar chart indicates what action types have led to wins or losses at each stage (preflop, flop turn and river)\n\nLooking at the stacked bar chart in more detail, gives you clues how to adjust the strategy to maximize your wins:\n\n.. figure:: doc/analyzer_bar2.png\n\nAnalyze individual rounds within each stage:\n\n.. figure:: doc/analyzer_bar3.png\n\nAnalyze individual hands:\n\n.. figure:: doc/strategy_analyzer.gif\n\n\nStrategy editor\n---------------\nA variety of factors are taken into consideration when the bot makes decisions and they can be adjusted in the strategy editor:\n\n- Equity (winning probability), which is calculated by a montecarlo simulation\n- Equity and minimum call/bet value need to be on the left of the corresponding curve in order for the bot not to fold\n- Various other factors, such as behaviour in the previous rounds are taken into consideration. Check out the strategy editor for more details.\n- Hover over each item to see a more detailed description\n\n.. figure:: doc/strategy2.png\n\nA variety of other options can be edited for each strategy:\n\n.. figure:: doc/strategy_editor.gif\n\nAdvice how to improve strategies:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n* You will generally require at least 2000 hands played with a strategy to draw any conclusions. Even better 5000 hands. Anything less than 1000 hands is completely random.\n* Best buy in more than the minimum, this will improve the bots performance as it has more leeway to play. For example on a 0.01/0.02 table, buy in more than the minimum of $2. Ideally start with $4 or even more.\n* Look at the strategy analyzer and work your way backwards. First improve the River play, then once this is good move on to the Turn, then to the Flop etc. This is because the game is path dependent.\n* If you make changes in the ranges, you may need to adapt all minimum equities as it changes the equity calculation.\n* Good Luck!\n\nFull version:\n~~~~~~~~~~~~~\n\nThe full version allows you to:\n\n* Edit and create new Strategies\n* View all Strategies of all users\n\nTo purchase, please follow this link. You'll then receive a password within 24 hours.\nhttp://www.deepermind-pokerbot.com/purchase\n\nAlternatively you can contact me via email or discord and request a password directly and pay bitcoin to:\n1Py5o4WLYMizXc8pFPqzD4yeCAm53BhJit\n\nYou can also get a free subscription if you make some meaningful contribution to the codebase.\n\nThe easiest way to contribute is by:\n\n- Adding new tables\n- Adding new strategies\n- Directly add fixes to the code and create a pull request\n\n\n\nMapping new tables\n------------------\n\nThe bot can learn to read new tables, either by using templates or by training a neural network that uses data augmentation based on the given templates.\n\n`Click this link to see a Video description how to add a new table <https://rb.gy/jut3ws>`_ or watch the video on www.deepermind-pokerbot.com\n\nThe setup to add new tables looks like this:\n\n.. figure:: doc/scraper.png\n\n- Open the pokerbot and click on table setup to open the window that helps you create new tables.\n- Open the poker client next to it, make sure it's not dpi scaled, so the pokerbot can take screenshots.\n- Start with creating a new template, you can do this by entering a name for your template, for example Pokerstars 1-2 zoom poker. Click on 'Blank new'.\n- Now the first think you want to do is to take a screenshot of the pokerstars window with the table. You can do this by pressing on the Take screenshot button. You should not see in the lower window a full screenshot of what is on your screen.\n- The first step is now to mark the top left corner of the poker tables window, which will be the point of reference for everything else that will follow. To mark the top left corner, you need to mark it by first clicking on the top left part of it and then on the right lower part of it. once you have done this, it will appear in the second window. You can save it by clicking on the \"save newly selected top left corner\" button.\n- Now you can crop it by pressing on the crop from top left corner button. This will discard most of the screenshot and only keep the screenshot from the top left corner and everything a few hundred pixels to the right of it and below.\n- Next you will want to mark everything else in the window. Start with the Buttons search area. You can do this again by clicking on the top left area of the buttons and then on the bottom right area of where the buttons appear. Once you are happy with the selection, click on the \"Buttons search area\".\n- If you hover over the buttons, you will get a more detailed description of what you need to pay attention to.\n- Note that you will need to take many screenshots, crop them (don't select the top left corner again, as this you should only do once), instead load it and then crop the image. After that make your selection of the different images and save them by pressing on the corresponding button. You'll need to teach it every card and every button etc.\n\nNotes to keep in mind:\n------------------------------\n\n**IT IS NOT RECOMMENDED TO CONDUCT TESTS WITH REAL ACCOUNTS UNTIL YOU VERIFY THE CORRECT FUNCTIONING OF THE BOT (ALSO TO AVOID LOSS OF ACCOUNTS AND CAPITAL)**\n\n- Minimum system requirements to run the bot:\n- Windows 10 x64 or later (It may work in previous versions but its correct operation has not been verified)\n- RAM memory 4 GB or more\n- hard drive space 1.6 GB (as always the more the better)\n- Micro processor with 4 cores and 4 threads or higher\n- GPU is not necessary (neural training gives the option to do it on GPU)\n- screen resolution 1920*1800 (it can work with less but its correct operation has not been verified)\n\n- consider the consumption of Virtual box if used and add them to the system explained above\n- Poker apps usually run on W7 or higher\n- VirtualBox version 7.0.12 or higher with its respective expansion pack\n\nRunning via docker\n------------------------------\n\n- ``$ git clone https://github.com/dickreuter/Poker.git``\n- ``$ cd Poker``\n- ``$ docker compose up -d``\n- ``$ xhost local:root # This permits the root user on the local machine to connect to X windows display``\n- ``$ docker-compose exec app python3 main.py # once the container is running you can launch the bot with this command``\n\nRunning via python source code\n------------------------------\n- Download pycharm communite edition as an IDE from here: https://www.jetbrains.com/pycharm/download/#section=windows\n- Install anaconda https://www.anaconda.com/products/distribution\n- Download tesserocr:  https://github.com/simonflueckiger/tesserocr-windows_build/releases/download/tesserocr-v2.6.0-tesseract-5.3.1/tesserocr-2.6.0-cp311-cp311-win_amd64.whl -Out tesserocr-2.6.0-cp311-cp311-win_amd64.whl and install the whleel file with pip install \n- Create an environment with ``pip install -r requirements.txt`` and separately run pip install tesserocr\n- You also may need to get c++ runtime distributable: https://visualstudio.microsoft.com/downloads/\n- Install virtualbox from https://www.virtualbox.org/wiki/Downloads and put the poker client into the virtual box. That way it can be controlled without having to use the mouse in your main window.\n- Run ``main.py`` from pycharm after setting up the above created virtual environment as interpreter (check youtube)\n\n\nPackages and modules:\n~~~~~~~~~~~~~~~~~~~~~\n\nmain.py: entry point\n\npoker.scraper\n^^^^^^^^^^^^^\n\nContains user interface and routines that help map new tables\n\n- ``recognize_table``: Functions to recognize the different items on the table, based on the created mapping\n- ``screen_operations``: Various routines, such as taking screen shots, cropping etc\n- ``table_setup``: Routines in relation to the gui\n- ``ui_table_setup``: QT user interface. Corresponding py file is created with makegui.bat in the parent folder. To edit the gui download QT Designer and open the .ui file.\n\n\npoker.decisionmaker\n^^^^^^^^^^^^^^^^^^^\n\n-  ``decisionmaker.py``: The ultimate decision what action should be taken based on the input\n-  ``montecarlo_numpy2.py``: fast numpy based montecarlo simulation to\n   calculate equity. Not yet working correctly. Some tests are failing. Feel free to fix them.\n-  ``montecarlo_python.py``: relatively slow python based montecarlo for equity calculation. Supports\n   preflop ranges for other players.\n\npoker.tests\n^^^^^^^^^^^\n\n-  ``test_montecarlo_numpy.py``: tests for the numpy montecarlo\n-  ``test_pylint.py``: pylint and pydoc tests to ensure pep8 standards and static code analysis\n\n\nGraphical user interface (gui)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Download QT for open source project: https://www.qt.io/download-open-source\n- Use the qt designer to edit any of the .ui files in gui/ui\n\n\nNext Priorities\n---------------\n\n\n- [ ] Update tests. Some are currently outdated. More tests are needed\n- [ ] Add more strategies\n- [ ] Switch from using pytesseract to tesserocr to speed up OCR, this should considerably speed up the bot\n- [ ] Better Analyze the collected data to improve strategies\n\n\nMaking fixes in the code\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Fixing code and making a pull request back into the origin/master:\n\nIt will be hard for one person alone to beat the world at poker. That's\nwhy this repo aims to have a collaborative environment, where models can\nbe added and evaluated.\n\nTo contribute do the following:\n\n- Get Pycharm and build the virtual python environment. Use can do: ``pip install -r requirements.txt`` (see above)\n- Clone your fork to your local machine. You can do this directly from pycharm: VCS --> check out from version control --> git\n- Add as remote the original repository where you created the fork from and call it upstream (the connection to your fork should be called origin). This can be done with vcs --> git --> remotes\n- Create a new branch: click on master at the bottom right, and then click on 'new branch'\n- Make your edits.\n- Ensure all tests pass. Under file --> settings --> python integrated tools switch to pytest. You can then just right click on the tests folder and run all tests. All tests need to pass. Make sure to add your own tests by simply naming the funtion test\\_... \\\n- Make sure all the tests are passing. Best run pytest as described above (in pycharm just right click on the tests folder and run it). If a test fails, you can debug the test, by right clicking on it and put breakpoints, or even open a console at the breakpoint: https://stackoverflow.com/questions/19329601/interactive-shell-debugging-with-pycharm\n- Commit your changes (CTRL+K}\n- Push your changes to your origin (your fork) (CTRL+SHIFT+K)\n- To bring your branch up to date with upstream master, if it has moved on: rebase onto upstream master: click on your branch name at the bottom right of pycharm, then click on upstream/master, then rebase onto. You may need to resolve soe conflicts. Once this is done, make sure to always force-push (ctrl+shift+k), (not just push). This can be done by selecting the dropdown next to push and choose force-push (important: don't push and merge a rebased branch with your remote)\n- Create a pull request on your github.com to merge your branch with the upstream master.\n- When your pull request is approved, it will be merged into the upstream/master.\n- Please make sure that all tests are passing, including the pylint test. You can either run them locally on your machine, or when you push check the travis log on github. [currently many are failing, feel free to help fixing them!]\n\n\n\nFAQ\n---\n\nNo top left corner\n~~~~~~~~~~~~~~~~~~\n\n- Make sure everything looks exactly like in the picture at the top of this documentation.\n    * The buttons need to look exactly like this and it needs to be in English and not scaled. Colours need to be standard.\n    * Most tables are mapped to real money. They won't work with play money.\n    * The poker table window has to be fully visible and cannot be scaled, otherwise it won't be detected properly.\n    * In Partypoker, when you open the table, choose table options and then choose **back to default size** to make sure the table is in default size.\n\n- Tables are mapped for fast forward and zoom games with real money. Use the Supersonic3 table for Partypoker or McNaught table in Pokerstars.\n- If things still don't work, consider teaching it a new table as described above.\n\nCards not recognized\n~~~~~~~~~~~~~~~~~~~~~\n\n- Make sure everything looks exactly like in the picture at the top of this documentation.\n    * Make sure to use real money. Tables are different for play money.\n    * Ensure you are seated at the position as shown in the picture above.\n    * Currently the bot only works for tables with 6 players.\n\n\nDo I need to use a virtual machine?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- For Pokerstars you definitely do, otherwise you will be blocked and your account will be frozen within minutes. For Partypoker I'm not sure. But best check the terms and conditions.\n\n\nAnalyzing the log and reporting problems\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- In the folder where you installed the pokerbot, there is a subfolder with the log files in /log. There are also screenshots in /log/screenshots that may be able to help debug the problem.\n- Create a issue on the link at the top of this github page https://github.com/dickreuter/Poker/issues or email dickreuter@gmail.com.\n\n\nRelated projects\n----------------\nTraining the bot by playing against itself is a separate project which can be found here:\nhttps://github.com/dickreuter/neuron_poker\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ABDA:24970A:17DED2:5CF2EB:6AB9206F"},"text_sha256":"2a7225ed9e1a9661c519db5d0047ac65ae8e4865e4887fa8f8edcdc0591aaeab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fairlearn/fairlearn","input_row":{"repository":"fairlearn/fairlearn","url":"https://github.com/fairlearn/fairlearn","name":"fairlearn","owner":"fairlearn","description":"A Python package to assess and improve fairness of machine learning models.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2287,"issues":525,"created_at":"2018-05-15T01:51:35Z","updated_at":"2026-09-24T14:29:39Z","first_commit_at":"2018-05-15T01:51:35Z","last_commit_at":"2026-09-21T20:56:32Z","activity_months":100.26000000000001,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:29.764Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fairlearn/fairlearn","visibility":"public","created_at":"2018-05-15T01:51:35Z","updated_at":"2026-09-24T14:29:39Z","private":false,"fork":false,"archived":false,"stargazers_count":2287,"open_issues_count":124,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3489","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17B2630:1BD073E:6AB9280D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3488","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:1764CDB:1B811B8:6AB9280E"},"commit":{"sha":"27fc57865060434ba047c145ebb17ac8d6b2bbee","url":"https://github.com/fairlearn/fairlearn/commit/27fc57865060434ba047c145ebb17ac8d6b2bbee","date":"2018-05-24T18:28:36Z","author_date":"2018-05-24T18:28:36Z","committer_date":"2018-05-24T18:28:36Z","tree_sha":"dedb84f53f7d93292f5ae3e0e337742949148cab","message_first_line":"fixed bug in debug printout"},"tree_request_status":200,"tree_rate":{"github_remaining":"3487","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:17DD003:1BFA933:6AB9280E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2787,"blob_sha":"932c88fcaadc8a340497860ee63d8b8caf13e493","priority":0}],"documents":[{"path":"README.md","size":2787,"blob_sha":"932c88fcaadc8a340497860ee63d8b8caf13e493","priority":0,"status":200,"text":"# Reductions for Fair Machine Learning\n\nA python package that implements the black-box approach to fair classification described in the paper [A Reductions Approach to Fair Classification](https://arxiv.org/abs/1803.02453).\n\n## Usage\n\nClone the repository locally `git clone git@github.com:Microsoft/fairlearn.git`. Verify that the package works by running `python test_fairlearn.py` in the root.\n\nThe function `expgrad` in the module `fairlearn.classred` implements the reduction of fair classification to weighted binary classification. Any learner that supports weighted binary classification can be provided as input for this reduction. Two common fairness definitions are provided in the module `fairlearn.moments`: demographic parity (class `DP`) and equalized odds (class `EO`). See the file `test_fairlearn.py` for example usage of `expgrad`.\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to\nagree to a Contributor License Agreement (CLA) declaring that you have the right to,\nand actually do, grant us the rights to use your contribution. For details, visit\nhttps://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need\nto provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the\ninstructions provided by the bot. You will only need to do this once across all repositories using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Maintainers\n\nfairlearn is maintained by:\n\n- **@MiroDudik**\n\n### Releasing\n\nIf you are the current maintainer of this project:\n\n1. Create a branch for the release: `git checkout -b release-vxx.xx`\n1. Ensure that all tests return \"ok\": `python test_fairlearn.py`\n1. Bump the module version in `fairlearn/__init__.py`\n1. Make a pull request to Microsoft/fairlearn\n1. Merge Microsoft/fairlearn pull request\n1. Tag and push: `git tag vxx.xx; git push --tags`\n\n## Reporting Security Issues\n\nSecurity issues and bugs should be reported privately, via email, to the Microsoft Security\nResponse Center (MSRC) at [secure@microsoft.com](mailto:secure@microsoft.com). You should\nreceive a response within 24 hours. If for some reason you do not, please follow up via\nemail to ensure we received your original message. Further information, including the\n[MSRC PGP](https://technet.microsoft.com/en-us/security/dn606155) key, can be found in\nthe [Security TechCenter](https://technet.microsoft.com/en-us/security/default).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5960:18CDF1:171867:54D4C7:6AB9207C"},"text_sha256":"b99e52098305a4ee7f3c58d5c030e2023d5278469428b3246ae96339940be349"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3486","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:17898FC:1BA7B25:6AB9280F"},"commit":{"sha":"c6e2453bf03d559e306ecd1dd14899d6f8b4fda0","url":"https://github.com/fairlearn/fairlearn/commit/c6e2453bf03d559e306ecd1dd14899d6f8b4fda0","date":"2026-06-26T20:46:46Z","author_date":"2026-06-26T20:46:46Z","committer_date":"2026-06-26T20:46:46Z","tree_sha":"b2a70aa06f958bb9118958017e2f713aa2483b7e","message_first_line":"DOC Add toolkit comparison FAQ entry (#1670)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3485","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:1789942:1BA7B6C:6AB9280F"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6076,"blob_sha":"26de0147407d1195b528949a8f73cd4ee6838f1b","priority":0}],"documents":[{"path":"README.rst","size":6076,"blob_sha":"26de0147407d1195b528949a8f73cd4ee6838f1b","priority":0,"status":200,"text":"|MIT license| |PyPI| |Discord| |StackOverflow|\n\nFairlearn\n=========\n\nFairlearn is a Python package that empowers developers of artificial\nintelligence (AI) systems to assess their system's fairness and mitigate\nany observed unfairness issues. Fairlearn contains mitigation algorithms\nas well as metrics for model assessment. Besides the source code, this\nrepository also contains Jupyter notebooks with examples of Fairlearn\nusage.\n\nWebsite: https://fairlearn.org/\n\n-  `What we mean by *fairness* <#what-we-mean-by-fairness>`__\n-  `Overview of Fairlearn <#overview-of-fairlearn>`__\n-  `Getting started with fairlearn <#getting-started-with-fairlearn>`__\n-  `Maintainers <#maintainers>`__\n-  `Code of conduct <#code-of-conduct>`__\n-  `Issues <#issues>`__\n\nWhat we mean by *fairness*\n--------------------------\n\nAn AI system can behave unfairly for a variety of reasons. In Fairlearn,\nwe define whether an AI system is behaving unfairly in terms of its\nimpact on people – i.e., in terms of harms. We focus on two kinds of\nharms:\n\n-  *Allocation harms.* These harms can occur when AI systems extend or\n   withhold opportunities, resources, or information. Some of the key\n   applications are in hiring, school admissions, and lending.\n\n-  *Quality-of-service harms.* Quality of service refers to whether a\n   system works as well for one person as it does for another, even if\n   no opportunities, resources, or information are extended or withheld.\n\nWe follow the approach known as **group fairness**, which asks: *Which\ngroups of individuals are at risk for experiencing harms?* The relevant\ngroups need to be specified by the data scientist and are application\nspecific.\n\nGroup fairness is formalized by a set of constraints, which require that\nsome aspect (or aspects) of the AI system's behavior be comparable\nacross the groups. The Fairlearn package enables assessment and\nmitigation of unfairness under several common definitions. To learn more\nabout our definitions of fairness, please visit our\n`user guide on Fairness of AI Systems <https://fairlearn.org/main/user_guide/fairness_in_machine_learning.html#fairness-of-ai-systems>`__.\n\n    *Note*: Fairness is fundamentally a sociotechnical challenge. Many\n    aspects of fairness, such as justice and due process, are not\n    captured by quantitative fairness metrics. Furthermore, there are\n    many quantitative fairness metrics which cannot all be satisfied\n    simultaneously. Our goal is to enable humans to assess different\n    mitigation strategies and then make trade-offs appropriate to their\n    scenario.\n\nOverview of Fairlearn\n---------------------\n\nThe Fairlearn Python package has two components:\n\n-  *Metrics* for assessing which groups are negatively impacted by a\n   model, and for comparing multiple models in terms of various fairness\n   and accuracy metrics.\n\n-  *Algorithms* for mitigating unfairness in a variety of AI tasks and\n   along a variety of fairness definitions.\n\nFairlearn metrics\n~~~~~~~~~~~~~~~~\n\nCheck out our in-depth `guide on the Fairlearn metrics <https://fairlearn.org/main/user_guide/assessment>`__.\n\nFairlearn algorithms\n~~~~~~~~~~~~~~~~~~~\n\nFor an overview of our algorithms please refer to our\n`website <https://fairlearn.org/main/user_guide/mitigation/index.html>`__.\n\nGetting Started with Fairlearn\n-----------------------------\n\nFirst steps\n~~~~~~~~~~~\n\n- Install via pip: ``pip install fairlearn``\n\n- Visit the `Quickstart guide <https://fairlearn.org/main/quickstart.html>`__.\n\n- **Learning Resources**:\n\n  - Read the comprehensive `user guide <https://fairlearn.org/main/user_guide/index.html>`__.\n\n  - Look through the `example notebooks <https://fairlearn.org/main/auto_examples/index.html>`__.\n\n\nFor Users & Practitioners\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Browse the `example gallery <https://fairlearn.org/main/auto_examples/index.html>`__. \nPlease note that notebooks downloaded from `main` may not be compatible with pip-installed versions.\n\n- Check the `API reference <https://fairlearn.org/main/api_reference/index.html>`__.\n\n- **Get Help**:\n\n  - Ask questions on `Stack Overflow <https://stackoverflow.com/questions/tagged/fairlearn>`__ with tag ``fairlearn``.\n\n  - Join the `Discord community <https://discord.gg/R22yCfgsRn>`__ for discussions.\n\nFor Contributors\n~~~~~~~~~~~~~~~\n\n- Read the `contributor guide <https://fairlearn.org/main/contributor_guide/index.html>`__.\n\n- Check out the `good first issues <https://github.com/fairlearn/fairlearn/labels/good%20first%20issue>`__.\n\n- Follow the `development process <https://fairlearn.org/main/contributor_guide/development_process.html>`__.\n\n- Join the `Discord <https://discord.gg/R22yCfgsRn>`__ for contributor discussions. Please use the ``#development`` channel.\n\n\nMaintainers\n-----------\n\nA list of current maintainers is\n`on our website <https://fairlearn.org/main/about/index.html#maintainers>`__.\n\nCode of conduct\n---------------\nFairlearn follows the `Fairlearn Organization's Code of Conduct <https://github.com/fairlearn/governance/blob/main/code-of-conduct.md>`__.\n\nIssues\n------\n\nRegular (non-security) issues\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIssues are meant for bugs, feature requests, and documentation\nimprovements. Please submit a report through\n`GitHub issues <https://github.com/fairlearn/fairlearn/issues>`__.\nA maintainer will respond promptly as appropriate.\n\nMaintainers will try to link duplicate issues when possible.\n\nReporting security issues\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo report security issues please send an email to\n``fairlearn-internal@python.org``.\n\n.. |MIT license| image:: https://img.shields.io/badge/License-MIT-blue.svg\n   :target: https://github.com/fairlearn/fairlearn/blob/main/LICENSE\n.. |PyPI| image:: https://img.shields.io/pypi/v/fairlearn?color=blue\n   :target: https://pypi.org/project/fairlearn/\n.. |Discord| image:: https://img.shields.io/discord/840099830160031744\n   :target: https://discord.gg/R22yCfgsRn\n.. |StackOverflow| image:: https://img.shields.io/badge/StackOverflow-questions-blueviolet\n   :target: https://stackoverflow.com/questions/tagged/fairlearn\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4598:7A4F8:17BAB7:5CD1C9:6AB9207D"},"text_sha256":"475ba42464146785bc19c757e473527533ccde4fd2321169d8debb19d89f1eb8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"TuringLang/Turing.jl","input_row":{"repository":"TuringLang/Turing.jl","url":"https://github.com/TuringLang/Turing.jl","name":"Turing.jl","owner":"TuringLang","description":"Bayesian inference with probabilistic programming.","language":"Julia","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2257,"issues":1279,"created_at":"2016-04-29T10:51:43Z","updated_at":"2026-09-27T13:29:14Z","first_commit_at":"2016-04-29T10:51:43Z","last_commit_at":"2026-09-13T09:42:31Z","activity_months":124.47,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:32.360Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"TuringLang/Turing.jl","visibility":"public","created_at":"2016-04-29T10:51:43Z","updated_at":"2026-09-27T13:29:14Z","private":false,"fork":false,"archived":false,"stargazers_count":2257,"open_issues_count":14,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3484","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17B39A0:1BD173D:6AB92810"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3483","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:178BA30:1BA9975:6AB92810"},"commit":{"sha":"3d6b1c29fe5c42072bfd749c0ae2dd0c1d608d2d","url":"https://github.com/TuringLang/Turing.jl/commit/3d6b1c29fe5c42072bfd749c0ae2dd0c1d608d2d","date":"2018-05-24T22:17:43Z","author_date":"2018-05-24T22:17:43Z","committer_date":"2018-05-24T22:17:43Z","tree_sha":"e54fec28ddfa4c2745f30cedf9802cdc0fe6509c","message_first_line":"Fix CI badges."},"tree_request_status":200,"tree_rate":{"github_remaining":"3482","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17A04C6:1BBE35E:6AB92811"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3840,"blob_sha":"aef2a33c680e433474113461f4fd8f37d0020c88","priority":0}],"documents":[{"path":"README.md","size":3840,"blob_sha":"aef2a33c680e433474113461f4fd8f37d0020c88","priority":0,"status":200,"text":"# Turing.jl\n\n[![Build Status](https://travis-ci.org/yebai/Turing.jl.svg?branch=master)](https://travis-ci.org/TuringLang/Turing.jl)\n[![Build status](https://ci.appveyor.com/api/projects/status/caequ1omcwndykh8/branch/master?svg=true)](https://ci.appveyor.com/project/yebai/turing-jl-pwe25/branch/master)\n[![Coverage Status](https://coveralls.io/repos/github/yebai/Turing.jl/badge.svg?branch=master)](https://coveralls.io/github/yebai/Turing.jl?branch=master)\n[![Turing](http://pkg.julialang.org/badges/Turing_0.5.svg)](http://pkg.julialang.org/?pkg=Turing)\n[![Turing](http://pkg.julialang.org/badges/Turing_0.6.svg)](http://pkg.julialang.org/detail/Turing)\n[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/Turing-jl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n[![Wiki Status](https://img.shields.io/badge/wiki-v0.3-blue.svg)](https://github.com/yebai/Turing.jl/wiki)\n\n**Turing.jl** is a Julia library for (_universal_) [probabilistic programming](https://en.wikipedia.org/wiki/Probabilistic_programming_language). Current features include:\n\n- Universal probabilistic programming with an intuitive modelling interface\n- Hamiltonian Monte Carlo (HMC) sampling for differentiable posterior distributions\n- Particle MCMC sampling for complex posterior distributions involving discrete variables and stochastic control flows\n- Gibbs sampling that combines particle MCMC,  HMC and many other MCMC algorithms\n\n## News\n\nTuring.jl is 0.6 compatible now!\n\n## Documentation\n\nPlease visit [Turing.jl wiki](https://github.com/yebai/Turing.jl/wiki) for documentation, tutorials (e.g. [get started](https://github.com/yebai/Turing.jl/wiki/Get-started)) and other topics (e.g. [advanced usages](https://github.com/yebai/Turing.jl/wiki/Advanced-usages)). Below are some example models for Turing.\n\n- [Introduction](https://nbviewer.jupyter.org/github/yebai/Turing.jl/blob/master/example-models/notebooks/Introduction.ipynb)\n- [Gaussian Mixture Model](https://nbviewer.jupyter.org/github/yebai/Turing.jl/blob/master/example-models/notebooks/GMM.ipynb)\n- [Bayesian Hidden Markov Model](https://nbviewer.jupyter.org/github/yebai/Turing.jl/blob/master/example-models/notebooks/BayesHmm.ipynb)\n- [Factorical Hidden Markov Model](https://nbviewer.jupyter.org/github/yebai/Turing.jl/blob/master/example-models/notebooks/FHMM.ipynb)\n- [Topic Models: LDA and MoC](https://nbviewer.jupyter.org/github/yebai/Turing.jl/blob/master/example-models/notebooks/TopicModels.ipynb)\n\n## Contributing\n\nTuring was originally created and is now managed by Hong Ge. Current and past Turing team members include [Hong Ge](http://mlg.eng.cam.ac.uk/hong/), [Adam Scibior](http://mlg.eng.cam.ac.uk/?portfolio=adam-scibior), [Matej Balog](http://mlg.eng.cam.ac.uk/?portfolio=matej-balog), [Zoubin Ghahramani](http://mlg.eng.cam.ac.uk/zoubin/), [Kai Xu](http://mlg.eng.cam.ac.uk/?portfolio=kai-xu), [Emma Smith](https://github.com/evsmithx), [Emile Mathieu](http://emilemathieu.fr). \nYou can see the full list of on Github: https://github.com/yebai/Turing.jl/graphs/contributors. \n\nTuring is an open source project so if you feel you have some relevant skills and are interested in contributing then please do get in touch. See the [Contribute wiki page](https://github.com/yebai/Turing.jl/wiki/Contribute) for details on the process. You can contribute by opening issues on Github or implementing things yourself and making a pull request. We would also appreciate example models written using Turing.\n\n## Citing Turing.jl ##\n\nTo cite Turing, please refer to the technical report. Sample BibTeX entry is given below:\n\n```\n@ARTICLE{Turing2016,\n    author = {Ge, Hong and Xu, Kai and Scibior, Adam and Ghahramani, Zoubin and others},\n    title = \"{The Turing language for probabilistic programming.}\",\n    year = 2016,\n    month = jun\n}\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B06:2E8679:1758B0:5C6D18:6AB9207E"},"text_sha256":"072564f84ed2765f6396af678e8c6280dd4d1e55ba52db652e2392b28dca901d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3481","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0824:74E6D:17E4665:1C02B5E:6AB92811"},"commit":{"sha":"cdded58f719820fc57e792383965fb3d15c70199","url":"https://github.com/TuringLang/Turing.jl/commit/cdded58f719820fc57e792383965fb3d15c70199","date":"2026-06-23T02:29:15Z","author_date":"2026-06-23T02:29:15Z","committer_date":"2026-06-23T02:29:15Z","tree_sha":"b30bde72d3c1da1050896e6a9ca09cfb6f61f965","message_first_line":"Bump actions/checkout from 6 to 7 in the all-github-actions-packages group (#2845)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3480","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:17665B6:1B8466C:6AB92812"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8085,"blob_sha":"7317888d25a4e3b3238a4ee0831639b884f132d7","priority":0}],"documents":[{"path":"README.md","size":8085,"blob_sha":"7317888d25a4e3b3238a4ee0831639b884f132d7","priority":0,"status":200,"text":"<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://turinglang.org/assets/logo/turing-logo-dark.svg\">\n    <img src=\"https://turinglang.org/assets/logo/turing-logo-light.svg\" alt=\"Turing.jl logo\" width=\"300\">\n  <\/picture>\n<\/p>\n<p align=\"center\"><i>Bayesian inference with probabilistic programming<\/i><\/p>\n<p align=\"center\">\n<a href=\"https://turinglang.org/\"><img src=\"https://img.shields.io/badge/docs-tutorials-blue.svg\" alt=\"Tutorials\" /><\/a>\n<a href=\"https://turinglang.org/Turing.jl/stable\"><img src=\"https://img.shields.io/badge/docs-API-blue.svg\" alt=\"API docs\" /><\/a>\n<a href=\"https://github.com/TuringLang/Turing.jl/actions/workflows/Tests.yml\"><img src=\"https://github.com/TuringLang/Turing.jl/actions/workflows/Tests.yml/badge.svg\" alt=\"Tests\" /><\/a>\n<a href=\"https://codecov.io/gh/TuringLang/Turing.jl\"><img src=\"https://codecov.io/gh/TuringLang/Turing.jl/branch/main/graph/badge.svg\" alt=\"Code Coverage\" /><\/a>\n<a href=\"https://github.com/SciML/ColPrac\"><img src=\"https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet\" alt=\"ColPrac: Contributor's Guide on Collaborative Practices for Community Packages\" /><\/a>\n<\/p>\n\n\n> [!IMPORTANT]\n> `Turing.jl` is maintained primarily by academic researchers at grant-funded institutions, with correspondingly limited capacity for triage and review.\n>\n> `Turing.jl`'s preferred automatic differentiation backends are `ForwardDiff.jl` and `Mooncake.jl`, which are supported natively through their public APIs; further backends are available via `DifferentiationInterface.jl`.\n>\n> If you would like to contribute, we ask that proposals for new features be submitted first, so that the TuringLang team can indicate whether they are a good fit before implementation begins; bug fixes and small changes are very welcome as pull requests directly. Reviewer privileges are reserved for those with a sustained record of substantive contributions to TuringLang, or for individuals explicitly invited by a team member.\n\n## Get started\n\nInstall Julia (see [the official Julia website](https://julialang.org/install/); you will need at least Julia 1.10.8 for the latest version of Turing.jl).\nThen, launch a Julia REPL and run:\n\n```julia\njulia> using Pkg; Pkg.add(\"Turing\")\n```\n\nYou can define models using the `@model` macro, and then perform Markov chain Monte Carlo sampling using the `sample` function:\n\n```julia\njulia> using Turing\n\njulia> @model function linear_regression(x)\n           # Priors\n           α ~ Normal(0, 1)\n           β ~ Normal(0, 1)\n           σ² ~ truncated(Cauchy(0, 3); lower=0)\n\n           # Likelihood\n           μ = α .+ β .* x\n           y ~ MvNormal(μ, σ² * I)\n       end\n\njulia> x, y = rand(10), rand(10)\n\njulia> posterior = linear_regression(x) | (; y = y)\n\njulia> chain = sample(posterior, NUTS(), 1000)\n```\n\nYou can find the main TuringLang documentation at [**https://turinglang.org**](https://turinglang.org), which contains general information about Turing.jl's features, as well as a variety of tutorials with examples of Turing.jl models.\n\nAPI documentation for Turing.jl is specifically available at [**https://turinglang.org/Turing.jl/stable**](https://turinglang.org/Turing.jl/stable/).\n\n## Contributing\n\n### Issues\n\nIf you find any bugs or unintuitive behaviour when using Turing.jl, please do [open an issue](https://github.com/TuringLang/Turing.jl/issues)!\nPlease don't worry about finding the correct repository for the issue; we can migrate the issue to the appropriate repository if we need to.\n\n### Pull requests\n\nWe are of course also very happy to receive pull requests.\nIf you are unsure about whether a particular feature would be welcome, you can open an issue for discussion first.\n\nWhen opening a PR, non-breaking releases (patch versions) should target the `main` branch.\nBreaking releases (minor version) should target the `breaking` branch.\n\nIf you have not received any feedback on an issue or PR for a while, please feel free to ping `@TuringLang/maintainers` in a comment.\n\n## Other channels\n\nThe Turing.jl userbase tends to be most active on the [`#turing` channel of Julia Slack](https://julialang.slack.com/archives/CCYDC34A0).\nIf you do not have an invitation to Julia's Slack, you can get one from [the official Julia website](https://julialang.org/slack/).\n\nThere are also often threads on [Julia Discourse](https://discourse.julialang.org) (you can search using, e.g., [the `turing` tag](https://discourse.julialang.org/tag/turing)).\n\n## What's changed recently?\n\nWe publish a fortnightly newsletter summarising recent updates in the TuringLang ecosystem, which you can view on [our website](https://turinglang.org/news/), [GitHub](https://github.com/TuringLang/Turing.jl/issues/2498), or [Julia Slack](https://julialang.slack.com/archives/CCYDC34A0).\n\nFor Turing.jl specifically, you can see a full changelog in [`HISTORY.md`](https://github.com/TuringLang/Turing.jl/blob/main/HISTORY.md) or [our GitHub releases](https://github.com/TuringLang/Turing.jl/releases).\n\n## Where does Turing.jl sit in the TuringLang ecosystem?\n\nTuring.jl is the main entry point for users, and seeks to provide a unified, convenient interface to all of the functionality in the TuringLang (and broader Julia) ecosystem.\n\nIn particular, it takes the ability to specify probabilistic models with [DynamicPPL.jl](https://github.com/TuringLang/DynamicPPL.jl), and combines it with a number of inference algorithms, such as:\n\n  - Markov Chain Monte Carlo (both an abstract interface: [AbstractMCMC.jl](https://github.com/TuringLang/AbstractMCMC.jl), and individual samplers, such as [AdvancedMH.jl](https://github.com/TuringLang/AdvancedMH.jl), [AdvancedHMC.jl](https://github.com/TuringLang/AdvancedHMC.jl), and more).\n  - Variational inference using [AdvancedVI.jl](https://github.com/TuringLang/AdvancedVI.jl).\n  - Maximum likelihood and maximum a posteriori estimation, which rely on SciML's [Optimization.jl interface](https://github.com/SciML/Optimization.jl).\n\n## Citing Turing.jl\n\nIf you have used Turing.jl in your work, we would be very grateful if you could cite the following:\n\n[**Turing.jl: a general-purpose probabilistic programming language**](https://doi.org/10.1145/3711897)  \nTor Erlend Fjelde, Kai Xu, David Widmann, Mohamed Tarek, Cameron Pfiffer, Martin Trapp, Seth D. Axen, Xianda Sun, Markus Hauru, Penelope Yong, Will Tebbutt, Zoubin Ghahramani, Hong Ge  \nACM Transactions on Probabilistic Machine Learning, 2025 (_Just Accepted_)  \n\n[**Turing: A Language for Flexible Probabilistic Inference**](https://proceedings.mlr.press/v84/ge18b.html)  \nHong Ge, Kai Xu, Zoubin Ghahramani  \nProceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics, PMLR 84:1682-1690, 2018.\n\n<details>\n\n<summary>Expand for BibTeX<\/summary>\n\n```bibtex\n@article{10.1145/3711897,\nauthor = {Fjelde, Tor Erlend and Xu, Kai and Widmann, David and Tarek, Mohamed and Pfiffer, Cameron and Trapp, Martin and Axen, Seth D. and Sun, Xianda and Hauru, Markus and Yong, Penelope and Tebbutt, Will and Ghahramani, Zoubin and Ge, Hong},\ntitle = {Turing.jl: a general-purpose probabilistic programming language},\nyear = {2025},\npublisher = {Association for Computing Machinery},\naddress = {New York, NY, USA},\nurl = {https://doi.org/10.1145/3711897},\ndoi = {10.1145/3711897},\nnote = {Just Accepted},\njournal = {ACM Trans. Probab. Mach. Learn.},\nmonth = feb,\n}\n\n@InProceedings{pmlr-v84-ge18b,\n  title = \t {Turing: A Language for Flexible Probabilistic Inference},\n  author = \t {Ge, Hong and Xu, Kai and Ghahramani, Zoubin},\n  booktitle = \t {Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics},\n  pages = \t {1682--1690},\n  year = \t {2018},\n  editor = \t {Storkey, Amos and Perez-Cruz, Fernando},\n  volume = \t {84},\n  series = \t {Proceedings of Machine Learning Research},\n  month = \t {09--11 Apr},\n  publisher =    {PMLR},\n  pdf = \t {http://proceedings.mlr.press/v84/ge18b/ge18b.pdf},\n  url = \t {https://proceedings.mlr.press/v84/ge18b.html},\n}\n```\n\n<\/details>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7926:A58F2:16ED97:5C04D4:6AB92080"},"text_sha256":"00c40d98aa8366fd69694836d251d259fe91e457dea481dc6e0681ea2c400e66"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jiesutd/NCRFpp","input_row":{"repository":"jiesutd/NCRFpp","url":"https://github.com/jiesutd/NCRFpp","name":"NCRFpp","owner":"jiesutd","description":"NCRF++, a Neural Sequence Labeling Toolkit. Easy use to any sequence labeling tasks (e.g. NER, POS, Segmentation). It includes character LSTM/CNN, word LSTM/CNN and softmax/CRF components. ","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1899,"issues":172,"created_at":"2017-12-06T09:04:43Z","updated_at":"2026-08-23T04:10:24Z","first_commit_at":"2017-12-06T08:40:37Z","last_commit_at":"2020-11-10T07:42:03Z","activity_months":35.149999999999999,"ai_ml_match_topics":"artificial-intelligence; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:35.347Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jiesutd/NCRFpp","visibility":"public","created_at":"2017-12-06T09:04:43Z","updated_at":"2026-08-23T04:10:24Z","private":false,"fork":false,"archived":false,"stargazers_count":1899,"open_issues_count":12,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3479","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17B4FA9:1BD2988:6AB92813"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3478","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17C92AF:1BE747F:6AB92813"},"commit":{"sha":"2302f105a4ed7fd7d651a2f4a8901edd25e67205","url":"https://github.com/jiesutd/NCRFpp/commit/2302f105a4ed7fd7d651a2f4a8901edd25e67205","date":"2018-05-16T19:42:30Z","author_date":"2018-05-16T19:42:30Z","committer_date":"2018-05-16T19:42:30Z","tree_sha":"3fc632aead105f99d7b462fd1c427366a8c464f4","message_first_line":"readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"3477","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A7:71C58:1798DED:1BB7119:6AB92814"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6838,"blob_sha":"f1b2a8a0bade5fb3dc0353e44d4480f65c3a88c9","priority":0}],"documents":[{"path":"README.md","size":6838,"blob_sha":"f1b2a8a0bade5fb3dc0353e44d4480f65c3a88c9","priority":0,"status":200,"text":"NCRF++: An Open-source Neural Sequence Labeling Toolkit\n======\nSequence labeling models are quite popular in many NLP tasks, such as Named Entity Recognition (NER), part-of-speech (POS) tagging and word segmentation. State-of-the-art sequence labeling models mostly utilize the CRF structure with input word features. LSTM (or bidirectional LSTM) is a popular deep learning based feature extractor in sequence labeling task. And CNN can also be used due to faster computation. Besides, features within word are also useful to represent word, which can be captured by character LSTM or character CNN structure or human-defined neural features.\n\nNCRF++ is a PyTorch based framework with flexiable choices of input features and output structures. The design of neural sequence labeling models with NCRF++ is fully configurable through a configuration file, which does not require any code work. NCRF++ is a neural version of [CRF++](http://taku910.github.io/crfpp/), which is a famous statistical CRF framework. The detailed experiment report using NCRF++ has been accepted at COLING 2018.\n\nNCRF++ supports diffent structure combinations of on three levels: character sequence representation, word sequence representation and inference layer.\n\n* Character sequence representation: character LSTM, character GRU, character CNN and handcrafted word features.\n* Word sequence representation: word LSTM, word GRU, word CNN.\n* Inference layer: Softmax, CRF.\n\n\nWelcome to star this repository!\n\nRequirement:\n======\n\tPython: 2.7   \n\tPyTorch: 0.3 (currently not support 0.4, will update soon)\n\n\nAdvantages\n========\n* 1.Fully configurable: all the neural model structures can be setted with a configuration file.\n* 2.State-of-the-art system performance: models build on NCRF++ can give comparable or better results compared with state-of-the-art models.\n* 3.Flexible with features: user can define their own features and pretrained feature embeddings.\n* 4.Fast running speed: NCRF++ utilizes fully batched operations, making the system efficient with the help of GPU (>1000sent/s for training and >2000sents/s for decoding).\n* 5.N best output: NCRF++ support `nbest` decoding (with their probabilities).\n\n\n1.Usage\n=========\nNCRF++ supports designing the neural network structure through a configuration file. The program can run in two status; ***training*** and ***decoding***. (sample configuration and data have been included in this repository)  \n\nIn ***training*** status:\n`python main.py --config demo.train.config`\n\nIn ***decoding*** status:\n`python main.py --config demo.decode.config`\n\nThe configuration file controls the network structure, I/O, training setting and hyperparameters. Details configurations are list [here](readme/Configuration.md). \n\nNCRF++ is designed in three layers (shown below): character sequence layer; word sequence layer and inference layer. By using the configuration file, most of the state-of-the-art models can be easily replicated ***without coding***. On the other hand, users can extend each layer by designing their own modules (for example, they may want to design their own neural structures other than CNN/LSTM/GRU). Our layer-wised design makes the module extension convenient, the instruction of module extension can be found [here](readme/Extension.md).\n\n![alt text](readme/architecture.png \"Layer-size design\")\n\n2.Performance\n=========\nResults on CONLL 2003 English NER task are better or comparable with SOTA results with the same structures. \n\nCharLSTM+WordLSTM+CRF: 91.20 vs 90.94 of [Lample .etc, NAACL16](http://www.aclweb.org/anthology/N/N16/N16-1030.pdf);\n\nCharCNN+WordLSTM+CRF:  91.35 vs 91.21 of [Ma .etc, ACL16](http://www.aclweb.org/anthology/P/P16/P16-1101.pdf).   \n\nIn default, `LSTM` is bidirectional LSTM.    \n\n|ID| Model | Nochar | CharLSTM |CharCNN   \n|---|--------- | --- | --- | ------    \n|1| WordLSTM | 88.57 | 90.84 | 90.73  \n|2| WordLSTM+CRF | 89.45 | **91.20** | **91.35** \n|3| WordCNN |  88.56| 90.46 | 90.30  \n|4| WordCNN+CRF |  88.90 | 90.70 | 90.43  \n\n\n3.External feature defining\n=========\nNCRF++ has integrated several SOTA neural characrter sequence feature extractors: CNN ([Ma .etc, ACL16](http://www.aclweb.org/anthology/P/P16/P16-1101.pdf)), LSTM ([Lample .etc, NAACL16](http://www.aclweb.org/anthology/N/N16/N16-1030.pdf)) and GRU ([Yang .etc, ICLR17](https://arxiv.org/pdf/1703.06345.pdf)). In addition, handcrafted features have been proven important in sequence labeling tasks. NCRF++ allows users designing their own features such as Capitalization, POS tag or any other features (grey circles in above figure). Users can configure the self-defined features through configuration file (feature embedding size, pretrained feature embeddings .etc). The sample input data format is given at [train.cappos.bmes](sample_data/train.cappos.bmes), which includes two human-defined features `[POS]` and `[Cap]`.\nUser can configure each feature in configuration file by using \n\n```Python\nfeature=[POS] emb_size=20 emb_dir=%your_pretrained_POS_embedding\nfeature=[Cap] emb_size=20 emb_dir=%your_pretrained_Cap_embedding\n```\n\nFeature without pretrained embedding will be randomly initialized.\n\n\n4.Speed\n=========\nNCRF++ is implemented using fully batched calculation, making it quite effcient on both model training and decoding. With the help of GPU (Nvidia GTX 1080) and large batch size, LSTMCRF model built with NCRF++ can reach 1000 sents/s and 2000sents/s on training and decoding status, respectively.\n\n![alt text](readme/speed.png \"System speed on NER data\")\n\n\n5.N best decoding performance:\n=========\nTraditional CRF structure decodes only one label sequence with largest probabolities (i.e. 1-best output). While NCRF++ can give a large choice, it can decode `n` label sequences with the top `n` probabilities (i.e. n-best output). The nbest decodeing has been supported by several popular **statistical** CRF framework. However to the best of our knowledge, NCRF++ is the only and the first toolkit which support nbest decoding in **neural** CRF models. \n\nIn our implementation, when the nbest=10, CharCNN+WordLSTM+CRF model built in NCRF++ can give 97.47% oracle F1-value (F1 = 91.35% when nbest=1) on CoNLL 2003 NER task.\n\n![alt text](readme/nbest.png  \"N best decoding oracle result\")\n\n\nCite: \n========\nIf you use experiments results of NCRF++, please cite our COLING paper:\n\n    @article{yang2018design,  \n     title={Design Challenges and Misconceptions in Neural Sequence Labeling},  \n     author={Jie Yang, Shuailong Liang and Yue Zhang},  \n     booktitle={Proceedings of the 27th International Conference on Computational Linguistics (CONLING)},\n     year={2018}  \n    }\n\n\nUpdating...\n====\n* 2018-Mar-30, NCRF++ v0.1, initial version\n* 2018-Jan-06, add result comparison.\n* 2018-Jan-02, support character feature selection. \n* 2017-Dec-06, init version\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9480:375F4:175F58:5C7792:6AB92072"},"text_sha256":"be630cd6eab58ea19432b33b964b77fe93e7772c2e387e4a917e0c8904353bef"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3476","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17B7CEE:1BD6133:6AB92814"},"commit":{"sha":"105a53a321eca9c1280037c473967858e01aaa43","url":"https://github.com/jiesutd/NCRFpp/commit/105a53a321eca9c1280037c473967858e01aaa43","date":"2020-11-10T07:42:03Z","author_date":"2020-11-10T07:42:03Z","committer_date":"2020-11-10T07:42:03Z","tree_sha":"f283a7b2760ac26e3e4d718da7ab1255e6313f27","message_first_line":"remove UserWarning: masked_fill_"},"tree_request_status":200,"tree_rate":{"github_remaining":"3475","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:1772F18:1B8FB19:6AB92815"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10652,"blob_sha":"e0248741321b014930ebf1c3b11fec30313bc65f","priority":0}],"documents":[{"path":"README.md","size":10652,"blob_sha":"e0248741321b014930ebf1c3b11fec30313bc65f","priority":0,"status":200,"text":"![NCRF++ Logo](https://github.com/jiesutd/NCRFpp/blob/master/readme/logo.png)\n\n\n# NCRF++: An Open-source Neural Sequence Labeling Toolkit\n\n\n* [1. Introduction](#Introduction)\n* [2. Requirement](#Requirement)\n* [3. Advantages](#Advantages)\n* [4. Usage](#Usage)\n* [5. Data Format](#Data-Format)\n* [6. Performance](#Performance)\n* [7. Add Handcrafted Features](#Add-Handcrafted-Features)\n* [8. Speed](#Speed)\n* [9. N best Decoding](#N-best-Decoding)\n* [10. Reproduce Paper Results and Hyperparameter Tuning](#Reproduce-Paper-Results-and-Hyperparameter-Tuning)\n* [11. Report Issue or Problem](#Report-Issue-or-Problem)\n* [12. Cite](#Cite)\n* [13. Future Plan](#Future-Plan)\n* [13. Update](#Update)\n\n## Introduction\n\nSequence labeling models are quite popular in many NLP tasks, such as Named Entity Recognition (NER), part-of-speech (POS) tagging and word segmentation. State-of-the-art sequence labeling models mostly utilize the CRF structure with input word features. LSTM (or bidirectional LSTM) is a popular deep learning based feature extractor in sequence labeling task. And CNN can also be used due to faster computation. Besides, features within word are also useful to represent word, which can be captured by character LSTM or character CNN structure or human-defined neural features.\n\nNCRF++ is a PyTorch based framework with flexiable choices of input features and output structures. The design of neural sequence labeling models with NCRF++ is fully configurable through a configuration file, which does not require any code work. NCRF++ can be regarded as a neural network version of [CRF++](http://taku910.github.io/crfpp/), which is a famous statistical CRF framework. \n\nThis framework has been accepted by [ACL 2018](https://arxiv.org/abs/1806.05626) as demonstration paper. And the detailed experiment report and analysis using NCRF++ has been accepted at [COLING 2018](https://arxiv.org/abs/1806.04470) as the best paper.\n\nNCRF++ supports different structure combinations of on three levels: character sequence representation, word sequence representation and inference layer.\n\n* Character sequence representation: character LSTM, character GRU, character CNN and handcrafted word features.\n* Word sequence representation: word LSTM, word GRU, word CNN.\n* Inference layer: Softmax, CRF.\n\nWelcome to star this repository!\n\n## Requirement\n\n\tPython: 2 or 3  \n\tPyTorch: 1.0 \n\n[PyTorch 0.3 compatible version is here.](https://github.com/jiesutd/NCRFpp/tree/PyTorch0.3)\n\n\n## Advantages\n\n* Fully configurable: all the neural model structures can be set with a configuration file.\n* State-of-the-art system performance: models build on NCRF++ can give comparable or better results compared with state-of-the-art models.\n* Flexible with features: user can define their own features and pretrained feature embeddings.\n* Fast running speed: NCRF++ utilizes fully batched operations, making the system efficient with the help of GPU (>1000sent/s for training and >2000sents/s for decoding).\n* N best output: NCRF++ support `nbest` decoding (with their probabilities).\n\n\n## Usage\n\nNCRF++ supports designing the neural network structure through a configuration file. The program can run in two status; ***training*** and ***decoding***. (sample configuration and data have been included in this repository)  \n\nIn ***training*** status:\n`python main.py --config demo.train.config`\n\nIn ***decoding*** status:\n`python main.py --config demo.decode.config`\n\nThe configuration file controls the network structure, I/O, training setting and hyperparameters. \n\n***Detail configurations and explanations are listed [here](readme/Configuration.md).***\n\nNCRF++ is designed in three layers (shown below): character sequence layer; word sequence layer and inference layer. By using the configuration file, most of the state-of-the-art models can be easily replicated ***without coding***. On the other hand, users can extend each layer by designing their own modules (for example, they may want to design their own neural structures other than CNN/LSTM/GRU). Our layer-wised design makes the module extension convenient, the instruction of module extension can be found [here](readme/Extension.md).\n\n![alt text](readme/architecture.png \"Layer-size design\")\n\n\n## Data Format\n\n* You can refer the data format in [sample_data](sample_data). \n* NCRF++ supports both BIO and BIOES(BMES) tag scheme.  \n* Notice that IOB format (***different*** from BIO) is currently not supported, because this tag scheme is old and works worse than other schemes [Reimers and Gurevych, 2017](https://arxiv.org/pdf/1707.06799.pdf). \n* The difference among these three tag schemes is explained in this [paper](https://arxiv.org/pdf/1707.06799.pdf).\n* I have written a [script](utils/tagSchemeConverter.py) which converts the tag scheme among IOB/BIO/BIOES. Welcome to have a try. \n\n\n## Performance\n\nResults on CONLL 2003 English NER task are better or comparable with SOTA results with the same structures. \n\nCharLSTM+WordLSTM+CRF: 91.20 vs 90.94 of [Lample .etc, NAACL16](http://www.aclweb.org/anthology/N/N16/N16-1030.pdf);\n\nCharCNN+WordLSTM+CRF:  91.35 vs 91.21 of [Ma .etc, ACL16](http://www.aclweb.org/anthology/P/P16/P16-1101.pdf).   \n\nBy default, `LSTM` is bidirectional LSTM.    \n\n|ID| Model | Nochar | CharLSTM |CharCNN   \n|---|--------- | --- | --- | ------    \n|1| WordLSTM | 88.57 | 90.84 | 90.73  \n|2| WordLSTM+CRF | 89.45 | **91.20** | **91.35** \n|3| WordCNN |  88.56| 90.46 | 90.30  \n|4| WordCNN+CRF |  88.90 | 90.70 | 90.43  \n\nWe have compared twelve neural sequence labeling models (`{charLSTM, charCNN, None} x {wordLSTM, wordCNN} x {softmax, CRF}`) on three benchmarks (POS, Chunking, NER) under statistical experiments, detail results and comparisons can be found in our COLING 2018 paper [Design Challenges and Misconceptions in Neural Sequence Labeling](https://arxiv.org/abs/1806.04470).\n \n\n## Add Handcrafted Features\n\nNCRF++ has integrated several SOTA neural characrter sequence feature extractors: CNN ([Ma .etc, ACL16](http://www.aclweb.org/anthology/P/P16/P16-1101.pdf)), LSTM ([Lample .etc, NAACL16](http://www.aclweb.org/anthology/N/N16/N16-1030.pdf)) and GRU ([Yang .etc, ICLR17](https://arxiv.org/pdf/1703.06345.pdf)). In addition, handcrafted features have been proven important in sequence labeling tasks. NCRF++ allows users designing their own features such as Capitalization, POS tag or any other features (grey circles in above figure). Users can configure the self-defined features through configuration file (feature embedding size, pretrained feature embeddings .etc). The sample input data format is given at [train.cappos.bmes](sample_data/train.cappos.bmes), which includes two human-defined features `[POS]` and `[Cap]`. (`[POS]` and `[Cap]` are two examples, you can give your feature any name you want, just follow the format `[xx]` and configure the feature with the same name in configuration file.)\nUser can configure each feature in configuration file by using \n\n```Python\nfeature=[POS] emb_size=20 emb_dir=%your_pretrained_POS_embedding\nfeature=[Cap] emb_size=20 emb_dir=%your_pretrained_Cap_embedding\n```\n\nFeature without pretrained embedding will be randomly initialized.\n\n\n## Speed\n\nNCRF++ is implemented using fully batched calculation, making it quite effcient on both model training and decoding. With the help of GPU (Nvidia GTX 1080) and large batch size, LSTMCRF model built with NCRF++ can reach 1000 sents/s and 2000sents/s on training and decoding status, respectively.\n\n![alt text](readme/speed.png \"System speed on NER data\")\n\n\n## N best Decoding\n\nTraditional CRF structure decodes only one label sequence with largest probabolities (i.e. 1-best output). While NCRF++ can give a large choice, it can decode `n` label sequences with the top `n` probabilities (i.e. n-best output). The nbest decodeing has been supported by several popular **statistical** CRF framework. However to the best of our knowledge, NCRF++ is the only and the first toolkit which support nbest decoding in **neural** CRF models. \n\nIn our implementation, when the nbest=10, CharCNN+WordLSTM+CRF model built in NCRF++ can give 97.47% oracle F1-value (F1 = 91.35% when nbest=1) on CoNLL 2003 NER task.\n\n![alt text](readme/nbest.png  \"N best decoding oracle result\")\n\n\n## Reproduce Paper Results and Hyperparameter Tuning\n\nTo reproduce the results in our COLING 2018 paper, you only need to set the `iteration=1` as `iteration=100` in configuration file `demo.train.config` and configure your file directory in this configuration file. The default configuration file describes the `Char CNN + Word LSTM + CRF` model, you can build your own model by modifing the configuration accordingly. The parameters in this demo configuration file are the same in our paper. (Notice the `Word CNN` related models need slightly different parameters, details can be found in our COLING paper.)\n\nIf you want to use this framework in new tasks or datasets, here are some tuning [tips](readme/hyperparameter_tuning.md) by @Victor0118.\n\n\n## Report Issue or Problem\n\nIf you want to report an issue or ask a problem, please attach the following materials if necessary. With these information, I can give fast and accurate discussion and suggestion. \n* `log file` \n* `config file` \n* `sample data` \n\n\n## Cite\n\nIf you use NCRF++ in your paper, please cite our [ACL demo paper](https://arxiv.org/abs/1806.05626):\n\n    @inproceedings{yang2018ncrf,  \n     title={NCRF++: An Open-source Neural Sequence Labeling Toolkit},  \n     author={Yang, Jie and Zhang, Yue},  \n     booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics},\n     Url = {http://aclweb.org/anthology/P18-4013},\n     year={2018}  \n    }\n\n\nIf you use experiments results and analysis of NCRF++, please cite our [COLING paper](https://arxiv.org/abs/1806.04470):\n\n    @inproceedings{yang2018design,  \n     title={Design Challenges and Misconceptions in Neural Sequence Labeling},  \n     author={Yang, Jie and Liang, Shuailong and Zhang, Yue},  \n     booktitle={Proceedings of the 27th International Conference on Computational Linguistics (COLING)},\n     Url = {http://aclweb.org/anthology/C18-1327},\n     year={2018}  \n    }\n\n## Future Plan \n\n* Document classification (working)\n* Support API usage\n* Upload trained model on Word Segmentation/POS tagging/NER\n* Enable loading pretrained ELMo parameters\n* Add BERT feature extraction layer \n\n\n\n## Update\n\n* 2018-Dec-17, NCRF++ v0.2, support PyTorch 1.0\n* 2018-Mar-30, NCRF++ v0.1, initial version\n* 2018-Jan-06, add result comparison.\n* 2018-Jan-02, support character feature selection. \n* 2017-Dec-06, init version\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"124C:3B6DE:16E3B3:5BFA24:6AB92082"},"text_sha256":"98beff6aaa7725451716dbaa7ad47288bd6f8065aaa973d9ce8bc73011c212b2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"allenai/ai2thor","input_row":{"repository":"allenai/ai2thor","url":"https://github.com/allenai/ai2thor","name":"ai2thor","owner":"allenai","description":"An open-source platform for Visual AI.","language":"C#","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1805,"issues":651,"created_at":"2017-10-17T18:00:39Z","updated_at":"2026-09-26T07:28:02Z","first_commit_at":"2017-11-03T22:24:05Z","last_commit_at":"2025-05-29T18:14:02Z","activity_months":90.799999999999997,"ai_ml_match_topics":"artificial-intelligence; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:37.678Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"allenai/ai2thor","visibility":"public","created_at":"2017-10-17T18:00:39Z","updated_at":"2026-09-26T07:28:02Z","private":false,"fork":false,"archived":false,"stargazers_count":1805,"open_issues_count":280,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3474","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083F:6E429:17C35EE:1BE158D:6AB92815"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3473","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092D:6C9BF:17E1656:1BFF854:6AB92816"},"commit":{"sha":"bc77af25e2e08ab9fbe1d7b278c8f897c11409be","url":"https://github.com/allenai/ai2thor/commit/bc77af25e2e08ab9fbe1d7b278c8f897c11409be","date":"2018-05-24T19:41:06Z","author_date":"2018-05-24T19:41:06Z","committer_date":"2018-05-24T19:41:06Z","tree_sha":"282ec66492d7f001888073f4defd17e55e74bb93","message_first_line":"text input functions in"},"tree_request_status":200,"tree_rate":{"github_remaining":"3472","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A3:6C6ED:17D00D4:1BEDC31:6AB92816"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8412,"blob_sha":"c3eb49e21aec08f1ced3fa4b3bd8236d8014e213","priority":0}],"documents":[{"path":"README.md","size":8412,"blob_sha":"c3eb49e21aec08f1ced3fa4b3bd8236d8014e213","priority":0,"status":200,"text":"<p align=\"center\"><img width=\"30%\" src=\"doc/static/thor-logo-main.png\" /><\/p>\n\n--------------------------------------------------------------------------------\n\n\nAI2-THOR is a photo-realistic interactable framework for AI agents.\n\n## Tutorial\n\nPlease refer to the [tutorial page](http://ai2thor.allenai.org/tutorials/) for a detailed walkthrough.\n\n## News\n* (1/8/2018) If you need a docker version, please contact us so we provide you with the instructions. Our docker version is in beta mode.\n\n## Requirements\n\n* OS: Mac OS X 10.9+, Ubuntu 14.04+\n* Graphics Card: DX9 (shader model 3.0) or DX11 with feature level 9.3 capabilities.\n* CPU: SSE2 instruction set support.\n* Python 2.7 or Python 3.5+\n* Linux: X server with GLX module enabled\n\n## Concepts\n\n* Agent: A capsule shaped entity that can navigate within scenes and interact with objects.\n* Scene: A scene within AI2-THOR represents a virtual room that an agent can navigate in and interact with.\n* Action: A discrete command for the Agent to perform within a scene (e.g. MoveAhead, RotateRight, PickupObject)\n* Object Visibility: An object is said to be visible when it is in camera view and within a threshold of distance (default: 1 meter) when measured from the Agent’s camera to the centerpoint of the target object. This determines whether the agent can interact with the object or not.\n* Receptacle: A type of object that can contain another object. These types of objects include: sinks, refrigerators, cabinets and tabletops. \n\n## PIP Installation\n\n```bash\npip install ai2thor\n```\nOnce installed you can launch the framework. **Make sure X server with OpenGL extensions is running before running the following commands. You can check by running ```glxinfo``` or ```glxgears```.**\n\n```python\nimport ai2thor.controller\ncontroller = ai2thor.controller.Controller()\ncontroller.start()\n\n# Kitchens:       FloorPlan1 - FloorPlan30\n# Living rooms:   FloorPlan201 - FloorPlan230\n# Bedrooms:       FloorPlan301 - FloorPlan330\n# Bathrooms:      FloorPLan401 - FloorPlan430\ncontroller.reset('FloorPlan28')\n\n# gridSize specifies the coarseness of the grid that the agent navigates on\ncontroller.step(dict(action='Initialize', gridSize=0.25))\nevent = controller.step(dict(action='MoveAhead'))\n```\nUpon executing the ```controller.start()``` a window should appear on screen with a view of the room FloorPlan28.\n\n## Event/Metadata\nEach call to ```controller.step()``` returns an instance of an Event.  Detailed descriptions of each field can be found within the [tutorial](http://ai2thor.allenai.org/tutorials/event-metadata).  The Event object contains a screen capture from the point the last action completed as well as metadata about each object within the scene.\n\n```python\nevent = controller.step(dict(action=MoveAhead))\n\n# Numpy Array - shape (width, height, channels), channels are in RGB order\nevent.frame\n\n# byte[] PNG image\nevent.image\n\n# current metadata dictionary that includes the state of the scene\nevent.metadata\n```\n\n## Actions\n\nWe currently provide the following API controlled actions. New actions such as turning on faucet or slicing a loaf of bread can be easily added to the API. Actions are defined in ```unity/Assets/Scripts/DiscreteRemoteFPSAgentController.cs```. Please refer to [this page](http://ai2thor.allenai.org/tutorials/object-types) to check which objects are actionable.\n\n#### MoveAhead\nMove ahead in the amount of the grid size\n```python\nevent = controller.step(dict(action='MoveAhead'))\n```\n\n#### MoveRight\nMove right in the amount of the grid size\n```python\nevent = controller.step(dict(action='MoveRight'))\n```\n#### MoveLeft\nMove left in the amount of the grid size\n```python\nevent = controller.step(dict(action='MoveLeft'))\n```\n#### MoveBack\nMove back in the amount of the grid size\n```python\nevent = controller.step(dict(action='MoveBack'))\n```\n#### RotateRight\nRotate the agent by 90 degrees to the right\n```python\nevent = controller.step(dict(action='RotateRight'))\n```\n\n#### RotateLeft\nRotate the agent by 90 degrees to the left\n```python\nevent = controller.step(dict(action='RotateLeft'))\n```\n\n#### OpenObject\nOpen an object (assuming the object is visible to the agent). In the case of the Refrigerator, the door will open.\n```python\nevent = controller.step(dict(action='OpenObject', objectId=\"Fridge|0.25|0.75\"))\n```\n\n#### CloseObject\nClose an object (assuming object is visible to the agent). In the case of the Refrigerator, the door will close.\n```python\nevent = controller.step(dict(action='CloseObject', objectId=\"Fridge|0.25|0.75\"))\n```\n\n#### PickupObject\n\nPick up a visible object and place it into the Agent’s inventory. Currently the Agent can only have a single object in its inventory. \n\n```python\nevent = controller.step(dict(action='PickupObject', objectId=\"Mug|0.25|-0.27\"))\n```\n\n#### PutObject\nPut an object in the Agent’s inventory into a visible receptacle. In the following example, it is assumed that the agent holds a Mug in its inventory, and there is an open visible Fridge. \n\n```python\nevent = controller.step(dict(\n    objectId=\"Mug|0.25|-0.27\",\n    receptacleObjectId=\"Fridge|0.05|0.75\"))\n ```\n#### Teleport\nMove the agent to any location in the scene. Using this command it is possible to put the agent into places that would not normally be possible to navigate to, but it can be useful if you need to place an agent in the exact same spot for a task.\n```python\nevent = controller.step(dict(action='Teleport', x=0.999, y=1.01, z=-0.3541))\n``` \n\n## Architecture\n\nAI2-THOR is made up of two components: a set of scenes built for the Unity game engine located in ```unity``` folder, a lightweight Python API that interacts with the game engine located in ```ai2thor``` folder.\n\nOn the Python side there is a Flask service that listens for HTTP requests from the Unity game engine. After an action is executed within the game engine, a screen capture is taken and a JSON metadata object is constructed from the state of all the objects of the scene and POST'd to the Python Flask service.  This payload is then used to construct an Event object comprised of a numpy array (the screen capture) and metadata (dictionary containing the current state of every object including the agent).  At this point the game engine waits for a response from the Python service, which it receives when the next ```controller.step()``` call is made.  Once the response is received within Unity, the requested action is taken and the process repeats.\n\n\n## Unity Development\n\nIf you wish to make changes to the Unity scenes/assets you will need to install Unity Editor version 5.4.6f3 for OSX (Linux Editor is currently in Beta) from [Unity Download Archive](https://unity3d.com/get-unity/download/archive).  After making your desired changes using the Unity Editor you will need to build.  To do this you must first exit the editor, then run the following commands from the ai2thor base directory. Individual scenes (the 3D models) can be found beneath the unity/Assets/Scenes directory - scenes are named FloorPlan###.\n\n```python\npip install invoke\ninvoke local-build\n```\n\nThis will create a build beneath the directory 'unity/builds/local-build/thor-local-OSXIntel64.app'. To use this build in your code, make the following change:\n\n```python\ncontroller = ai2thor.controller.Controller()\ncontroller.local_executable_path = \"<BASE_DIR>/unity/builds/local-build/thor-local-OSXIntel64.app/Contents/MacOS/thor-local-OSXIntel64\"\ncontroller.start()\n```\n\n## Citation\n\n    @article{ai2thor,\n        Author = {Eric Kolve and \n                  Roozbeh Mottaghi and \n                  Daniel Gordon and \n                  Yuke Zhu and \n                  Abhinav Gupta and \n                  Ali Farhadi},\n        Title = {{AI2-THOR: An Interactive 3D Environment for Visual AI}},\n        Journal = {arXiv},\n        Year = {2017}\n    }\n    \n\n## Support\n\nWe have done our best to fix all bugs and issues. However, you might still encounter some bugs during navigation and interaction. We will be glad to fix the bugs. Please open issues for these and include the scene name as well as the event.metadata from the moment that the bug can be identified.\n\n\n## Team\n\nAI2-THOR is an open-source project backed by [the Allen Institute for Artificial Intelligence (AI2)](http://www.allenai.org).\nAI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3296:7A4F8:17BB32:5CD341:6AB92087"},"text_sha256":"fb4b039c5fcb1f3b25775ca3be28b009cbf299e89f89858ac693cb5f2a832585"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3471","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:1815760:1C33522:6AB92818"},"commit":{"sha":"24f79883b4889e3f0e6f4ae301808b9025872dfc","url":"https://github.com/allenai/ai2thor/commit/24f79883b4889e3f0e6f4ae301808b9025872dfc","date":"2025-05-29T18:14:02Z","author_date":"2025-05-29T18:14:02Z","committer_date":"2025-05-29T18:14:02Z","tree_sha":"48df2f0d73b1cae1f8b0603f3e25332fc1706e99","message_first_line":"Update to ovens"},"tree_request_status":200,"tree_rate":{"github_remaining":"3470","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17B2449:1BCF75E:6AB92819"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14577,"blob_sha":"6149309e437c29d8b5fe5465783fdee9f964e7a2","priority":0}],"documents":[{"path":"README.md","size":14577,"blob_sha":"6149309e437c29d8b5fe5465783fdee9f964e7a2","priority":0,"status":200,"text":"<p align=\"center\"><img width=\"50%\" src=\"https://raw.githubusercontent.com/allenai/ai2thor/main/doc/static/Ai2-THOR.svg\" /><\/p>\n<h3 align=\"center\"><i>A Near Photo-Realistic Interactable Framework for Embodied AI Agents<\/i><\/h3>\n\n<p align=\"center\">\n    <a href=\"//travis-ci.org/allenai/ai2thor\" target=\"_blank\">\n        <img src=\"https://travis-ci.org/allenai/ai2thor.svg?branch=main\">\n    <\/a>\n    <a href=\"//github.com/allenai/ai2thor/releases\">\n        <img alt=\"GitHub release\" src=\"https://img.shields.io/github/release/allenai/ai2thor.svg\">\n    <\/a>\n    <a href=\"//ai2thor.allenai.org/\" target=\"_blank\">\n        <img alt=\"Documentation\" src=\"https://img.shields.io/website/https/ai2thor.allenai.org?down_color=red&down_message=offline&up_message=online\">\n    <\/a>\n    <a href=\"//github.com/allenai/ai2thor/blob/main/LICENSE\">\n        <img alt=\"License\" src=\"https://img.shields.io/github/license/allenai/ai2thor.svg?color=blue\">\n    <\/a>\n    <a href=\"//arxiv.org/abs/1712.05474\" target=\"_blank\">\n        <img src=\"https://img.shields.io/badge/arXiv-1712.05474-<COLOR>\">\n    <\/a>\n    <a href=\"//www.youtube.com/watch?v=KcELPpdN770\" target=\"_blank\">\n        <img src=\"https://img.shields.io/badge/video-YouTube-red\">\n    <\/a>\n    <a href=\"//pepy.tech/project/ai2thor\" target=\"_blank\">\n        <img alt=\"Downloads\" src=\"https://pepy.tech/badge/ai2thor\">\n    <\/a>\n<\/p>\n\n## 🏡 Environments\n\n<table>\n    <tr>\n        <td width=\"33%\">\n            <img src=\"https://user-images.githubusercontent.com/28768645/115940549-d0134a80-a456-11eb-8737-d89ad75a0f14.jpg\" width=\"100%\" />\n        <\/td>\n        <td width=\"33%\">\n            <img src=\"https://user-images.githubusercontent.com/28768645/115940534-c689e280-a456-11eb-985a-ca28e63715c7.jpg\" width=\"100%\" />\n        <\/td>\n        <td width=\"33%\">\n            <img src=\"https://user-images.githubusercontent.com/28768645/115940466-8b87af00-a456-11eb-92e5-25a9f28e7f6b.jpg\" width=\"100%\" />\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\" width=\"33%\">\n            <code>iTHOR<\/code>\n        <\/td>\n        <td align=\"center\" width=\"33%\">\n            <code>ManipulaTHOR<\/code>\n        <\/td>\n        <td align=\"center\" width=\"33%\">\n            <code>RoboTHOR<\/code>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td width=\"33%\">\n            A high-level interaction framework that facilitates research in embodied common sense reasoning.\n        <\/td>\n        <td width=\"33%\">\n            A mid-level interaction framework that facilitates visual manipulation of objects using a robotic arm.\n        <\/td>\n        <td width=\"33%\">\n            A framework that facilitates Sim2Real research with a collection of simulated scene counterparts in the physical world.\n        <\/td>\n    <\/tr>\n<\/table>\n\n## 🌍 Features\n\n**🏡 Scenes.** 200+ custom built high-quality scenes. The scenes can be explored on our [demo](//ai2thor.allenai.org/demo) page. We are working on rapidly expanding the number of available scenes and domain randomization within each scene.\n\n**🪑 Objects.** 2600+ custom designed household objects across 100+ object types. Each object is heavily annotated, which allows for near-realistic physics interaction.\n\n**🤖 Agent Types.** Multi-agent support, a custom built LoCoBot agent, a Kinova 3 inspired robotic manipulation agent, and a drone agent.\n\n**🦾 Actions.** 200+ actions that facilitate research in a wide range of interaction and navigation based embodied AI tasks.\n\n**🖼 Images.** First-class support for many image modalities and camera adjustments. Some modalities include ego-centric RGB images, instance segmentation, semantic segmentation, depth frames, normals frames, top-down frames, orthographic projections, and third-person camera frames. User's can also easily change camera properties, such as the size of the images and field of view.\n\n**🗺 Metadata.** After each step in the environment, there is a large amount of sensory data available about the state of the environment. This information can be used to build highly complex custom reward functions.\n\n## 📰 Latest Announcements\n\n<table>\n    <tr>\n        <td align=\"center\" width=\"80\">\n            Date\n        <\/td>\n        <td align=\"center\" colspan=\"2\">\n            Announcement\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            5/2021\n        <\/td>\n        <td width=\"50%\">\n            <video src=\"https://user-images.githubusercontent.com/28768645/118589971-58cf8e80-b756-11eb-82ea-a94f84f57353.mp4\"/>\n        <\/td>\n        <td>\n            <code>RandomizeMaterials<\/code> is now supported! It enables a massive amount of realistic looking domain randomization within each scene. Try it out on the <a href=\"https://ai2thor.allenai.org/demo\">demo<\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            4/2021\n        <\/td>\n        <td colspan=\"2\">\n            We are excited to release <a href=\"https://ai2thor.allenai.org/manipulathor/\">ManipulaTHOR<\/a>, an environment within the AI2-THOR framework that facilitates visual manipulation of objects using a robotic arm. Please see the <a href=\"https://github.com/allenai/ai2thor/blob/main/doc/static/ReleaseNotes/ReleaseNotes_3.0.md\">full 3.0.0 release notes here<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            4/2021\n        <\/td>\n        <td width=\"50%\">\n            <video src=\"https://user-images.githubusercontent.com/28768645/118590040-7a307a80-b756-11eb-9b4c-c43373bea528.mp4\"><\/video>\n            <video src=\"https://user-images.githubusercontent.com/28768645/118589727-d1821b00-b755-11eb-9dff-9eda97fe0998.mp4\"><\/video>\n        <\/td>\n        <td>\n            <code>RandomizeLighting<\/code> is now supported! It includes many tunable parameters to allow for vast control over its effects. Try it out on the <a href=\"https://ai2thor.allenai.org\">demo<\/a>!<br/><br/>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            2/2021\n        <\/td>\n        <td colspan=\"2\">\n            We are excited to host the <a href=\"https://ai2thor.allenai.org/rearrangement/\">AI2-THOR Rearrangement Challenge<\/a>, <a href=\"https://ai2thor.allenai.org/robothor/cvpr-2021-challenge/\">RoboTHOR ObjectNav Challenge<\/a>, and <a href=\"https://askforalfred.com/EAI21/\">ALFRED Challenge<\/a>, held in conjunction with the <a href=\"https://embodied-ai.org/\">Embodied AI Workshop<\/a> at CVPR 2021.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            2/2021\n        <\/td>\n        <td colspan=\"2\">\n            AI2-THOR v2.7.0 announces several massive speedups to AI2-THOR! Read more about it <a href=\"https://medium.com/ai2-blog/speed-up-your-training-with-ai2-thor-2-7-0-12a650b6ab5e\">here<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            6/2020\n        <\/td>\n        <td colspan=\"2\">\n            We've released <a href=\"https://github.com/allenai/ai2thor-docker\">🐳 AI2-THOR Docker<\/a> a mini-framework to simplify running AI2-THOR in Docker.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            4/2020\n        <\/td>\n        <td colspan=\"2\">\n            Version 2.4.0 update of the framework is here. All sim objects that aren't explicitly part of the environmental structure are now moveable with physics interactions. New object types have been added, and many new actions have been added. Please see the <a href=\"https://github.com/allenai/ai2thor/blob/main/doc/static/ReleaseNotes/ReleaseNotes_2.4.md\">full 2.4.0 release notes here<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            2/2020\n        <\/td>\n        <td colspan=\"2\">\n            AI2-THOR now includes two frameworks: <a href=\"https://ai2thor.allenai.org/ithor/\">iTHOR<\/a> and <a href=\"https://ai2thor.allenai.org/robothor/\">RoboTHOR<\/a>. iTHOR includes interactive objects and scenes and RoboTHOR consists of simulated scenes and their corresponding real world counterparts.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            9/2019\n        <\/td>\n        <td colspan=\"2\">\n            Version 2.1.0 update of the framework has been added. New object types have been added. New Initialization actions have been added. Segmentation image generation has been improved in all scenes.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            6/2019\n        <\/td>\n        <td colspan=\"2\">\n            Version 2.0 update of the AI2-THOR framework is now live! We have over quadrupled our action and object states, adding new actions that allow visually distinct state changes such as broken screens on electronics, shattered windows, breakable dishware, liquid fillable containers, cleanable dishware, messy and made beds and more! Along with these new state changes, objects have more physical properties like Temperature, Mass, and Salient Materials that are all reported back in object metadata. To combine all of these new properties and actions, new context sensitive interactions can now automatically change object states. This includes interactions like placing a dirty bowl under running sink water to clean it, placing a mug in a coffee machine to automatically fill it with coffee, putting out a lit candle by placing it in water, or placing an object over an active stove burner or in the fridge to change its temperature. Please see the <a href=\"https://github.com/allenai/ai2thor/blob/main/doc/static/ReleaseNotes/ReleaseNotes_2.0.md\">full 2.0 release notes here<\/a> to view details on all the changes and new features.\n        <\/td>\n    <\/tr>\n<\/table>\n\n## 💻 Installation\n\n### With Google Colab\n\n[AI2-THOR Colab](https://github.com/allenai/ai2thor-colab) can be used to run AI2-THOR freely in the cloud with Google Colab. Running AI2-THOR in Google Colab makes it extremely easy to explore functionality without having to set AI2-THOR up locally.\n\n### With pip\n\n```bash\npip install ai2thor\n```\n\n### With conda\n\n```bash\nconda install -c conda-forge ai2thor\n```\n\n### With Docker\n\n[🐳 AI2-THOR Docker](https://github.com/allenai/ai2thor-docker) can be used, which adds the configuration for running a X server to be used by Unity 3D to render scenes.\n\n### Minimal Example\n\nOnce you've installed AI2-THOR, you can verify that everything is working correctly by running the following minimal example:\n\n```python\nfrom ai2thor.controller import Controller\ncontroller = Controller(scene=\"FloorPlan10\")\nevent = controller.step(action=\"RotateRight\")\nmetadata = event.metadata\nprint(event, event.metadata.keys())\n```\n\n### Requirements\n\n| Component | Requirement |\n| :-- | :-- |\n| OS | Mac OS X 10.9+, Ubuntu 14.04+ |\n| Graphics Card | DX9 (shader model 3.0) or DX11 with feature level 9.3 capabilities. |\n| CPU | SSE2 instruction set support. |\n| Python | Versions 3.5+ |\n| Linux | X server with GLX module enabled |\n\n## 💬 Support\n\n**Questions.** If you have any questions on AI2-THOR, please ask them on our [GitHub Discussions Page](https://github.com/allenai/ai2thor/discussions).\n\n**Issues.** If you encounter any issues while using AI2-THOR, please open an [Issue on GitHub](https://github.com/allenai/ai2thor/issues).\n\n## 🏫 Learn more\n\n| Section | Description |\n| :-- | :-- |\n| [Demo](https://ai2thor.allenai.org/demo/) | Interact and play with AI2-THOR live in the browser. |\n| [iTHOR Documentation](https://ai2thor.allenai.org/ithor/documentation/) | Documentation for the iTHOR environment. |\n| [ManipulaTHOR Documentation](https://ai2thor.allenai.org/manipulathor/documentation/) | Documentation for the ManipulaTHOR environment. |\n| [RoboTHOR Documentation](https://ai2thor.allenai.org/robothor/documentation/) | Documentation for the RoboTHOR environment. |\n| [AI2-THOR Colab](https://github.com/allenai/ai2thor-colab) | A way to run AI2-THOR freely on the cloud using Google Colab. |\n| [AllenAct](https://allenact.org/) | An Embodied AI Framework build at AI2 that provides first-class support for AI2-THOR. |\n| [AI2-THOR Unity Development](https://github.com/allenai/ai2thor/tree/main/unity#readme) | A (sparse) collection of notes that may be useful if editing on the AI2-THOR backend. |\n| [AI2-THOR WebGL Development](https://github.com/allenai/ai2thor/blob/main/WEBGL.md) | Documentation on packaging AI2-THOR for the web, which might be useful for annotation based tasks. |\n\n## 📒 Citation\n\nIf you use AI2-THOR or iTHOR scenes, please cite the original AI2-THOR paper:\n\n```bibtex\n@article{ai2thor,\n  author={Eric Kolve and Roozbeh Mottaghi and Winson Han and\n          Eli VanderBilt and Luca Weihs and Alvaro Herrasti and\n          Daniel Gordon and Yuke Zhu and Abhinav Gupta and\n          Ali Farhadi},\n  title={{AI2-THOR: An Interactive 3D Environment for Visual AI}},\n  journal={arXiv},\n  year={2017}\n}\n```\n\nIf you use 🏘️ ProcTHOR or procedurally generated scenes, please cite the following paper:\n\n```bibtex\n@inproceedings{procthor,\n  author={Matt Deitke and Eli VanderBilt and Alvaro Herrasti and\n          Luca Weihs and Jordi Salvador and Kiana Ehsani and\n          Winson Han and Eric Kolve and Ali Farhadi and\n          Aniruddha Kembhavi and Roozbeh Mottaghi},\n  title={{ProcTHOR: Large-Scale Embodied AI Using Procedural Generation}},\n  booktitle={NeurIPS},\n  year={2022},\n  note={Outstanding Paper Award}\n}\n```\n\nIf you use ManipulaTHOR agent, please cite the following paper:\n\n```bibtex\n@inproceedings{manipulathor,\n  title={{ManipulaTHOR: A Framework for Visual Object Manipulation}},\n  author={Kiana Ehsani and Winson Han and Alvaro Herrasti and\n          Eli VanderBilt and Luca Weihs and Eric Kolve and\n          Aniruddha Kembhavi and Roozbeh Mottaghi},\n  booktitle={CVPR},\n  year={2021}\n}\n```\n  \nIf you use RoboTHOR scenes, please cite the following paper:\n\n```bibtex\n@inproceedings{robothor,\n  author={Matt Deitke and Winson Han and Alvaro Herrasti and\n          Aniruddha Kembhavi and Eric Kolve and Roozbeh Mottaghi and\n          Jordi Salvador and Dustin Schwenk and Eli VanderBilt and\n          Matthew Wallingford and Luca Weihs and Mark Yatskar and\n          Ali Farhadi},\n  title={{RoboTHOR: An Open Simulation-to-Real Embodied AI Platform}},\n  booktitle={CVPR},\n  year={2020}\n}\n```\n\n## 👋 Our Team\n\nAI2-THOR is an open-source project built by the [PRIOR team](//prior.allenai.org) at the [Allen Institute for AI](//allenai.org) (AI2).\nAI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.\n\n<br />\n\n<a href=\"//prior.allenai.org\">\n<p align=\"center\"><img width=\"100%\" src=\"https://raw.githubusercontent.com/allenai/ai2thor/main/doc/static/ai2-prior.svg\" /><\/p>\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E48:3B6DE:16E40F:5BFB67:6AB92089"},"text_sha256":"698415813cf5b0e8e0d9cb1d6253cc88c6c95c336b0b595acdc38097a1831b73"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"autonomio/talos","input_row":{"repository":"autonomio/talos","url":"https://github.com/autonomio/talos","name":"talos","owner":"autonomio","description":"Hyperparameter Experiments with TensorFlow and Keras","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1636,"issues":403,"created_at":"2018-05-04T20:36:41Z","updated_at":"2026-09-21T12:22:09Z","first_commit_at":"2018-05-04T20:36:42Z","last_commit_at":"2024-04-22T10:30:48Z","activity_months":71.599999999999994,"ai_ml_match_topics":"artificial-intelligence; deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:44.475Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"autonomio/talos","visibility":"public","created_at":"2018-05-04T20:36:41Z","updated_at":"2026-09-21T12:22:09Z","private":false,"fork":false,"archived":false,"stargazers_count":1636,"open_issues_count":13,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3469","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:179E38B:1BBB312:6AB9281C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3468","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DF:76AED:17D5891:1BF3CD5:6AB9281C"},"commit":{"sha":"0a56961d8cd11c835c861db4ee1930ad285b3179","url":"https://github.com/autonomio/talos/commit/0a56961d8cd11c835c861db4ee1930ad285b3179","date":"2018-05-16T14:05:54Z","author_date":"2018-05-16T14:05:54Z","committer_date":"2018-05-16T14:05:54Z","tree_sha":"8a2b3e38a73b4ba31349dab3c1b50b79d0bf1541","message_first_line":"Update roadmap.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"3467","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17AFAC8:1BCDD06:6AB9281D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6287,"blob_sha":"112b1e0a8e60d9d6ac4420f9283dba0ae87ffbd2","priority":0}],"documents":[{"path":"README.md","size":6287,"blob_sha":"112b1e0a8e60d9d6ac4420f9283dba0ae87ffbd2","priority":0,"status":200,"text":"<img alt='Hyperparameter scanner for Keras Models' src='https://raw.githubusercontent.com/autonomio/talos/master/logo.png' width=250px>\r\n\r\n## Hyperparameter Scanning and Optimization for Keras  [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Hyperparameter%20optimization%20for%20humans&url=https://github.com/autonomio/talos&hashtags=AI,deeplearning,keras)\r\n\r\n![Travis branch](https://img.shields.io/travis/autonomio/talos/master.svg)[![Coverage Status](https://coveralls.io/repos/github/autonomio/talos/badge.svg?branch=master)](https://coveralls.io/github/autonomio/talos?branch=master)\r\n\r\nTalos is a solution that helps finding hyperparameter configurations for Keras models. To perform hyperparameter optimization with Talos, there is no need to learn any new syntax, or change anything in the way Keras models are created. Keras functionality is fully exposed, and any parameter can be included in the scans.\r\n\r\nTalos is made for data scientists and data engineers that want to remain in complete control of their Keras models, but are tired of mindless parameter hopping and confusing optimization solutions that add complexity instead of taking it away.\r\n\r\nSee the example Notebook [HERE](https://github.com/autonomio/hyperio/blob/master/examples/Hyperparameter%20Optimization%20with%20Keras%20for%20the%20Iris%20Prediction.ipynb)\r\n\r\nRead the User Manual [HERE](https://github.com/autonomio/talos/blob/master/docs/index.rst)\r\n\r\nRead a Talos field-report on [Hyperparameter Optimization](https://towardsdatascience.com/hyperparameter-optimization-with-keras-b82e6364ca53)\r\n\r\n## Development Objectives\r\n\r\nCurrently Talos yields state-of-the-art results (e.g. Iris dataset 100% and Wisconsin Breast Cancer dataset 99.4%) across a range of prediction tasks in a semi-automatic manner, while providing the simplest available method for hyperparameter optimization with Keras.\r\n\r\nRead the roadmap [HERE](https://github.com/autonomio/talos/blob/master/docs/roadmap.rst)\r\n\r\n## Benefits\r\n\r\nBased on a review of more than 30 hyperparameter optimization and scanning solutions, Talos offers the most intuitive, easy-to-learn, and permissive access to important hyperparameter optimization capabilities.\r\n\r\n- works with ANY Keras model\r\n- very easy to implement\r\n- adds zero new overhead\r\n- provides several ways to reduce random-search complexity\r\n- no need to learn any new syntax\r\n- no blackbox / other statistical complexity\r\n- improved f1 performance metric for binary, multi-label, multi-class and continuous predictions\r\n\r\n## Install\r\n\r\n    pip install talos\r\n\r\nOr from git repo:\r\n\r\n    pip install git+https://github.com/autonomio/talos.git\r\n\r\n## How to use\r\n\r\nLet's consider an example of a simple Keras model:\r\n\r\n    model = Sequential()\r\n    model.add(Dense(8, input_dim=x_train.shape[1], activation='relu'))\r\n    model.add(Dropout(0.2))\r\n    model.add(Dense(y_train.shape[1], activation='softmax'))\r\n\r\n    model.compile(optimizer='adam',\r\n                  loss=categorical_crossentropy,\r\n                  metrics=['acc'])\r\n\r\n    out = model.fit(x_train, y_train,\r\n                    batch_size=20,\r\n                    epochs=200,\r\n                    verbose=0,\r\n                    validation_data=[x_val, y_val])\r\n\r\nTo prepare the model for a talos scan, we simply replace the parameters we want to include in the scans with references to our parameter dictionary (example of dictionary provided below). \r\n\r\n\tdef iris_model(x_train, y_train, x_val, y_val, params):\r\n\r\n\t    model = Sequential()\r\n\t    model.add(Dense(params['first_neuron'], input_dim=x_train.shape[1], activation=params['activation']))\r\n\t    model.add(Dropout(params['dropout']))\r\n\t    model.add(Dense(y_train.shape[1], activation=params['last_activation']))\r\n\r\n\t    model.compile(optimizer=params['optimizer']),\r\n\t                  loss=params['losses'],\r\n\t                  metrics=['acc'])\r\n\r\n\t    out = model.fit(x_train, y_train,\r\n\t                    batch_size=params['batch_size'],\r\n\t                    epochs=params['epochs'],\r\n\t                    verbose=0,\r\n\t                    validation_data=[x_val, y_val])\r\n\r\n\t    return out, model\r\n\r\nAs you can see, the only thing that changed, is the values that we provide for the parameters. We then pass the parameters with a dictionary:\r\n\r\n\tp = {'lr': (2, 10, 30),\r\n\t     'first_neuron':[4, 8, 16, 32, 64, 128],\r\n\t     'hidden_layers':[2,3,4,5,6],\r\n\t     'batch_size': [2, 3, 4],\r\n\t     'epochs': [300],\r\n\t     'dropout': (0, 0.40, 10),\r\n\t     'weight_regulizer':[None],\r\n\t     'emb_output_dims': [None],\r\n\t     'optimizer': [Adam, Nadam],\r\n\t     'losses': [categorical_crossentropy, logcosh],\r\n\t     'activation':[relu, elu],\r\n\t     'last_activation': [softmax]}\r\n\r\nThe above example is a simple indication of what is possible. Any parameter that Keras accepts, can be included in the dictionary format.\r\n\r\nTalos accepts lists with values, and tuples (start, end, n). Learning rate is normalized to 1 so that for each optimizer, lr=1 is the default Keras setting. Once this is all done, we can run the scan:\r\n\r\n\th = ta.Scan(x, y, params=p, experiment_name='first_test', model=iris_model, grid_downsample=0.5)\r\n\r\n## Optimization\r\n\r\nOne of the challenges in the paradigm where Talos exposes Keras models fully, is the evaluation of permutations across different experiments, as it is common that evaluation metrics can change depending on the model. \r\n\r\nThis is overcome by having a grading system that first detects the kind of data (type of prediction and distribution of truth values), and then uses a relevant robust scoring mechanism (f1 score) to produce an apples-to-apples \"grade\" for each permutation, which is then stored in the master log. The same score is available for binary, multi-label, multi-class (one hot encoded) and continuous data. For each type of prediction, the score is produced following the same procedure, resulting in a true apples-to-apples performance metric. \r\n\r\n## Built With\r\n\r\n* [Numpy](http://numpy.org) - Scientific Computing\r\n* [Keras](https://keras.io/) - Deep Learning for Humans\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/autonomio/talos/blob/master/LICENSE) file for details\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F2E:285814:16CF98:5BE78A:6AB9208B"},"text_sha256":"5c357bc57acb96fe0e2a9fed8e2ea5053ee9ac1d96eae6084005d3192ec21e21"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3466","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C2:2BC4E5:180334B:1C212AC:6AB9281D"},"commit":{"sha":"9cbbc42a69396aaeaf25d68af51d52e6a575e3d9","url":"https://github.com/autonomio/talos/commit/9cbbc42a69396aaeaf25d68af51d52e6a575e3d9","date":"2024-04-22T10:30:48Z","author_date":"2024-04-22T10:30:48Z","committer_date":"2024-04-22T10:30:48Z","tree_sha":"0e121b9f55ca2148f49d1cf807b434861c18a85a","message_first_line":"Merge pull request #600 from autonomio/further_improve_readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"3465","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:17BB4E8:1BD9AFA:6AB9281E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5972,"blob_sha":"4d140f07dcc7513d8a276ecf4710b9006b56cd7f","priority":0}],"documents":[{"path":"README.md","size":5972,"blob_sha":"4d140f07dcc7513d8a276ecf4710b9006b56cd7f","priority":0,"status":200,"text":"<h1 align=\"center\">\r\n  <br>\r\n  <a href=\"http://autonom.io\"><img src=\"https://raw.githubusercontent.com/autonomio/talos/master/logo.png\" alt=\"Talos\" width=\"350\"><\/a>\r\n  <br>\r\n<\/h1>\r\n\r\n<h3 align=\"center\">Bullet-Proof Hyperparameter Experiments with TensorFlow and Keras<\/h3>\r\n\r\n<p align=\"center\">\r\n  <a href=\"#talos\">Talos<\/a> •\r\n  <a href=\"#wrench-key-features\">Key Features<\/a> •\r\n  <a href=\"#arrow_forward-examples\">Examples<\/a> •\r\n  <a href=\"#floppy_disk-install\">Install<\/a> •\r\n  <a href=\"#speech_balloon-how-to-get-support\">Support<\/a> •\r\n  <a href=\"https://autonomio.github.io/talos/\">Docs<\/a> •\r\n  <a href=\"https://github.com/autonomio/talos/issues\">Issues<\/a> •\r\n  <a href=\"#page_with_curl-license\">License<\/a> •\r\n  <a href=\"https://github.com/autonomio/talos/archive/master.zip\">Download<\/a>\r\n<\/p>\r\n<hr>\r\n<p align=\"center\">\r\nTalos importantly improves ordinary TensorFlow (tf.keras) and Keras workflows  by <strong>fully automating hyperparameter experiments<\/strong> and <strong>model evaluation<\/strong>. Talos exposes TensorFlow (tf.keras) and Keras functionality entirely and there is no new syntax or templates to learn.\r\n<\/p>\r\n<p align=\"center\">\r\n<img src='https://i.ibb.co/3NFH646/keras-model-to-talos.gif' width=550px><br>\r\n<em>The above animation illustrates how a minimal Sequntial model is modified for Talos<\/em>\r\n<\/p>\r\n\r\n### Talos\r\n\r\nTL;DR Thousands of researchers have found Talos to importantly improve ordinary TensorFlow (tf.keras) and Keras workflows without taking away or hiding any of their power.\r\n\r\n  - Works with ANY Keras, TensorFlow (tf.keras) or PyTorch model\r\n  - Takes minutes to implement\r\n  - No new syntax to learn\r\n  - Adds zero new overhead to your workflow\r\n  - Bullet-proof results with no breaking bugs since 2019\r\n  - Comprehensive, up-to-date documentation\r\n\r\nTalos is made for researchers, data scientists, and data engineers that want to remain in **complete control of their TensorFlow (tf.keras) and Keras models**, but are tired of mindless parameter hopping and confusing optimization solutions that add complexity instead of reducing it. \r\n\r\n<hr>\r\n\r\n### :wrench: Key Features\r\n\r\n**Within minutes, without learning any new syntax,** Talos allows you to configure, perform, and evaluate hyperparameter experiments that yield state-of-the-art results across a wide range of prediction tasks. Talos provides the **simplest and yet most powerful** available method for hyperparameter optimization with TensorFlow (tf.keras) and Keras. Key features include:\r\n\r\n  - Single-line optimize-to-predict pipeline `talos.Scan(x, y, model, params).predict(x_test, y_test)`\r\n  - Automated hyperparameter optimization\r\n  - Model generalization evaluator\r\n  - Experiment analytics\r\n  - Pseudo, Quasi, and Quantum Random search options\r\n  - Grid search\r\n  - Probabilistic optimizers\r\n  - Single file custom optimization strategies\r\n  - Dynamically change optimization strategy during experiment\r\n  - Support for man-machine cooperative optimization strategy\r\n  - Model candidate generality evaluation\r\n  - Live training monitor\r\n  - Experiment analytics\r\n\r\nTalos works on **Linux, Mac OSX**, and **Windows** systems and can be operated cpu, gpu, and multi-gpu systems.\r\n\r\n<hr>\r\n\r\n### :arrow_forward: Examples\r\n\r\nGet the below code [here](https://gist.github.com/mikkokotila/4c0d6298ff0a22dc561fb387a1b4b0bb). More examples further below.\r\n\r\n<img src=https://i.ibb.co/VWd8Bhm/Screen-Shot-2019-01-06-at-11-26-32-PM.png>\r\n\r\nThe *Simple* example below is more than enough for starting to use Talos with any Keras model. *Field Report* has +4,400 claps on Medium because it's more entertaining.\r\n\r\n[Simple](https://nbviewer.jupyter.org/github/autonomio/talos/blob/master/examples/A%20Very%20Short%20Introduction%20to%20Hyperparameter%20Optimization%20of%20Keras%20Models%20with%20Talos.ipynb)  [1-2 mins]\r\n\r\n[Concise](https://nbviewer.jupyter.org/github/autonomio/talos/blob/master/examples/Hyperparameter%20Optimization%20on%20Keras%20with%20Breast%20Cancer%20Data.ipynb)  [~5 mins]\r\n\r\n[Comprehensive](https://nbviewer.jupyter.org/github/autonomio/talos/blob/master/examples/Hyperparameter%20Optimization%20with%20Keras%20for%20the%20Iris%20Prediction.ipynb)  [~10 mins]\r\n\r\n[Field Report](https://towardsdatascience.com/hyperparameter-optimization-with-keras-b82e6364ca53)  [~15 mins]\r\n\r\nFor more information on how Talos can help with your Keras, TensorFlow (tf.keras) and PyTorch workflow, visit the [User Manual](https://autonomio.github.io/talos/).\r\n\r\nYou may also want to check out a visualization of the [Talos Hyperparameter Tuning workflow](https://github.com/autonomio/talos/wiki/Workflow).\r\n\r\n<hr>\r\n\r\n### :floppy_disk: Install\r\n\r\nStable version:\r\n\r\n#### `pip install talos`\r\n\r\nDaily development version:\r\n\r\n#### `pip install git+https://github.com/autonomio/talos`\r\n\r\n<hr>\r\n\r\n### :speech_balloon: How to get Support\r\n\r\n| I want to...                     | Go to...                                                  |\r\n| -------------------------------- | ---------------------------------------------------------- |\r\n| **...troubleshoot**           | [Docs] · [Wiki] · [GitHub Issue Tracker]                   |\r\n| **...report a bug**           | [GitHub Issue Tracker]                                     |\r\n| **...suggest a new feature**  | [GitHub Issue Tracker]                                     |\r\n| **...get support**            | [Stack Overflow]                     |\r\n\r\n<hr>\r\n\r\n### :loudspeaker: Citations\r\n\r\nIf you use Talos for published work, please cite:\r\n\r\n`Autonomio Talos [Computer software]. (2024). Retrieved from http://github.com/autonomio/talos.`\r\n\r\n<hr>\r\n\r\n### :page_with_curl: License\r\n\r\n[MIT License](https://github.com/autonomio/talos/blob/master/LICENSE)\r\n\r\n[github issue tracker]: https://github.com/autonomio/talos/issues\r\n[docs]: https://autonomio.github.io/talos/\r\n[wiki]: https://github.com/autonomio/talos/wiki\r\n[stack overflow]: https://stackoverflow.com/questions/tagged/talos\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E92:2C474:1797D2:5CB02F:6AB9208B"},"text_sha256":"e0ac148f609530ce2c0003636db8f6b0658055a3af85c9cb0981d5724acf8062"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sepandhaghighi/pycm","input_row":{"repository":"sepandhaghighi/pycm","url":"https://github.com/sepandhaghighi/pycm","name":"pycm","owner":"sepandhaghighi","description":"Multi-class confusion matrix library in Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1507,"issues":212,"created_at":"2018-01-22T19:46:54Z","updated_at":"2026-09-21T02:58:28Z","first_commit_at":"2018-01-21T18:29:45Z","last_commit_at":"2026-03-09T09:17:17Z","activity_months":97.519999999999996,"ai_ml_match_topics":"artificial-intelligence; deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:47.001Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sepandhaghighi/pycm","visibility":"public","created_at":"2018-01-22T19:46:54Z","updated_at":"2026-09-21T02:58:28Z","private":false,"fork":false,"archived":false,"stargazers_count":1507,"open_issues_count":15,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3464","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088C:6E5BD:177C59E:1B993B4:6AB9281F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3463","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F3:3203A7:1776670:1B94680:6AB9281F"},"commit":{"sha":"11e2370c839d05fd23c15147cc6b9afb96988a96","url":"https://github.com/sepandhaghighi/pycm/commit/11e2370c839d05fd23c15147cc6b9afb96988a96","date":"2018-05-20T21:48:12Z","author_date":"2018-05-20T21:48:12Z","committer_date":"2018-05-20T21:48:12Z","tree_sha":"cec0cfd10c6a4602b37db91fa27d5c7f11f1b7f3","message_first_line":"fix : minor bug in paper.md fixed"},"tree_request_status":200,"tree_rate":{"github_remaining":"3462","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17AC2D3:1BCA1DE:6AB9281F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":25473,"blob_sha":"6e95f47db407110f50ee21e6cd5251874da1f102","priority":0}],"documents":[{"path":"README.md","size":25473,"blob_sha":"6e95f47db407110f50ee21e6cd5251874da1f102","priority":0,"status":200,"text":"<div align=\"center\">\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/logo.png\" width=250px height=250px>\n<br/>\n<br/>\n<a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\" /><\/a>\n<a href=\"/Document\"><img src=\"https://img.shields.io/badge/doc-latest-orange.svg\"><\/a>\n<a href=\"https://travis-ci.org/sepandhaghighi/pycm\"><img src=\"https://travis-ci.org/sepandhaghighi/pycm.svg?branch=master\"><\/a>\n<a href=\"https://ci.appveyor.com/project/sepandhaghighi/pycm\"><img src=\"https://ci.appveyor.com/api/projects/status/nbe96d7gk2693ju0?svg=true\"><\/a>\n<a href=\"https://codecov.io/gh/sepandhaghighi/pycm\">\n  <img src=\"https://codecov.io/gh/sepandhaghighi/pycm/branch/master/graph/badge.svg\" />\n<\/a>\n<a class=\"badge-align\" href=\"https://www.codacy.com/app/sepand-haghighi/pycm?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=sepandhaghighi/pycm&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/5d9463998a0040d09afc2b80c389365c\"/><\/a>\n<a href=\"https://badge.fury.io/py/pycm\"><img src=\"https://badge.fury.io/py/pycm.svg\" alt=\"PyPI version\" height=\"18\"><\/a>\n<a href=\"https://www.openhub.net/p/pycm\"><img src=\"https://www.openhub.net/p/pycm/widgets/project_thin_badge.gif\"><\/a>\n<\/div>\n\n----------\n## Table of contents\t\t\t\t\t\n   * [Overview](https://github.com/sepandhaghighi/pycm#overview)\n   * [Installation](https://github.com/sepandhaghighi/pycm#installation)\n   * [Usage](https://github.com/sepandhaghighi/pycm#usage)\n   * [Document](https://github.com/sepandhaghighi/pycm/tree/master/Document)\n   * [Issues & Bug Reports](https://github.com/sepandhaghighi/pycm#issues--bug-reports)\n   * [Todo](https://github.com/sepandhaghighi/pycm#todo)\n   * [Outputs](https://github.com/sepandhaghighi/pycm#outputs)\n   * [Dependencies](https://github.com/sepandhaghighi/pycm#dependencies)\n   * [Contribution](https://github.com/sepandhaghighi/pycm#contribution)\n   * [References](https://github.com/sepandhaghighi/pycm#references)\n   * [Cite](https://github.com/sepandhaghighi/pycm#cite)\n   * [Authors](https://github.com/sepandhaghighi/pycm/blob/master/AUTHORS.md)\n   * [License](https://github.com/sepandhaghighi/pycm#license)\n   * [Donate](https://github.com/sepandhaghighi/pycm#donate-to-our-project)\n   * [Changelog](https://github.com/sepandhaghighi/pycm/blob/master/CHANGELOG.md)\n\n## Overview\n\n<p align=\"justify\">\t\nPyCM is a multi-class confusion matrix library written in Python that supports both input data vectors and direct matrix, and a proper tool for post-classification model evaluation that supports most classes and overall statistics parameters.\t\nPyCM is the swiss-army knife of confusion matrices, targeted mainly at data scientists that need a broad array of metrics for predictive models and an accurate evaluation of large variety of classifiers.\n\n<\/p>\n\n<div align=\"center\">\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/block_diagram.jpg\">\n<p>Fig1. PyCM Block Diagram<\/p>\n<\/div>\n\n\n## Installation\t\t\n\n### Source Code\n- Download [Version 0.8.5](https://github.com/sepandhaghighi/pycm/archive/v0.8.5.zip) or [Latest Source ](https://github.com/sepandhaghighi/pycm/archive/dev.zip)\n- Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access)\n- Run `python3 setup.py install` or `python setup.py install` (Need root access)\t\t\t\t\n\n### PyPI\n\n\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/)     \n- Run `pip install pycm` or `pip3 install pycm` (Need root access)\n\n### Easy Install\n\n- Run `easy_install --upgrade pycm` (Need root access)\n\n## Usage\n\n\t\t\n### From Vector\n```python\n>>> from pycm import *\n>>> y_actu = [2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2] # or y_actu = numpy.array([2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2])\n>>> y_pred = [0, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 2] # or y_pred = numpy.array([0, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 2])\n>>> cm = ConfusionMatrix(actual_vector=y_actu, predict_vector=y_pred) # Create CM From Data\n>>> cm.classes\n[0, 1, 2]\n>>> cm.table\n{0: {0: 3, 1: 0, 2: 0}, 1: {0: 0, 1: 1, 2: 2}, 2: {0: 2, 1: 1, 2: 3}}\n>>> print(cm)\nPredict          0        1        2        \nActual\n0                3        0        0        \n1                0        1        2        \n2                2        1        3        \n\n\n\n\nOverall Statistics : \n\n95% CI                                                           (0.30439,0.86228)\nBennett_S                                                        0.375\nChi-Squared                                                      6.6\nChi-Squared DF                                                   4\nConditional Entropy                                              0.95915\nCramer_V                                                         0.5244\nCross Entropy                                                    1.59352\nGwet_AC1                                                         0.38931\nJoint Entropy                                                    2.45915\nKL Divergence                                                    0.09352\nKappa                                                            0.35484\nKappa 95% CI                                                     (-0.07708,0.78675)\nKappa No Prevalence                                              0.16667\nKappa Standard Error                                             0.22036\nKappa Unbiased                                                   0.34426\nLambda A                                                         0.16667\nLambda B                                                         0.42857\nMutual Information                                               0.52421\nOverall_ACC                                                      0.58333\nOverall_RACC                                                     0.35417\nOverall_RACCU                                                    0.36458\nPPV_Macro                                                        0.56667\nPPV_Micro                                                        0.58333\nPhi-Squared                                                      0.55\nReference Entropy                                                1.5\nResponse Entropy                                                 1.48336\nScott_PI                                                         0.34426\nStandard Error                                                   0.14232\nStrength_Of_Agreement(Altman)                                    Fair\nStrength_Of_Agreement(Cicchetti)                                 Poor\nStrength_Of_Agreement(Fleiss)                                    Poor\nStrength_Of_Agreement(Landis and Koch)                           Fair\nTPR_Macro                                                        0.61111\nTPR_Micro                                                        0.58333\n\nClass Statistics :\n\nClasses                                                          0                       1                       2                       \nACC(Accuracy)                                                    0.83333                 0.75                    0.58333                 \nBM(Informedness or bookmaker informedness)                       0.77778                 0.22222                 0.16667                 \nDOR(Diagnostic odds ratio)                                       None                    4.0                     2.0                     \nERR(Error rate)                                                  0.16667                 0.25                    0.41667                 \nF0.5(F0.5 score)                                                 0.65217                 0.45455                 0.57692                 \nF1(F1 score - harmonic mean of precision and sensitivity)        0.75                    0.4                     0.54545                 \nF2(F2 score)                                                     0.88235                 0.35714                 0.51724                 \nFDR(False discovery rate)                                        0.4                     0.5                     0.4                     \nFN(False negative/miss/type 2 error)                             0                       2                       3                       \nFNR(Miss rate or false negative rate)                            0.0                     0.66667                 0.5                     \nFOR(False omission rate)                                         0.0                     0.2                     0.42857                 \nFP(False positive/type 1 error/false alarm)                      2                       1                       2                       \nFPR(Fall-out or false positive rate)                             0.22222                 0.11111                 0.33333                 \nG(G-measure geometric mean of precision and sensitivity)         0.7746                  0.40825                 0.54772                 \nLR+(Positive likelihood ratio)                                   4.5                     3.0                     1.5                     \nLR-(Negative likelihood ratio)                                   0.0                     0.75                    0.75                    \nMCC(Matthews correlation coefficient)                            0.68313                 0.2582                  0.16903                 \nMK(Markedness)                                                   0.6                     0.3                     0.17143                 \nN(Condition negative)                                            9                       9                       6                       \nNPV(Negative predictive value)                                   1.0                     0.8                     0.57143                 \nP(Condition positive)                                            3                       3                       6                       \nPOP(Population)                                                  12                      12                      12                      \nPPV(Precision or positive predictive value)                      0.6                     0.5                     0.6                     \nPRE(Prevalence)                                                  0.25                    0.25                    0.5                     \nRACC(Random accuracy)                                            0.10417                 0.04167                 0.20833                 \nRACCU(Random accuracy unbiased)                                  0.11111                 0.0434                  0.21007                 \nTN(True negative/correct rejection)                              7                       8                       4                       \nTNR(Specificity or true negative rate)                           0.77778                 0.88889                 0.66667                 \nTON(Test outcome negative)                                       7                       10                      7                       \nTOP(Test outcome positive)                                       5                       2                       5                       \nTP(True positive/hit)                                            3                       1                       3                       \nTPR(Sensitivity, recall, hit rate, or true positive rate)        1.0                     0.33333                 0.5  \n\n>>> cm.matrix()\nPredict          0        1        2        \nActual\n0                3        0        0        \n1                0        1        2        \n2                2        1        3        \n\n>>> cm.normalized_matrix()\nPredict          0              1              2              \nActual\n0                1.0            0.0            0.0            \n1                0.0            0.33333        0.66667        \n2                0.33333        0.16667        0.5            \n\n```\n### Direct CM\n```python\n>>> from pycm import *\n>>> cm2 = ConfusionMatrix(matrix={\"Class1\": {\"Class1\": 1, \"Class2\":2}, \"Class2\": {\"Class1\": 0, \"Class2\": 5}}) # Create CM Directly\n>>> cm2\npycm.ConfusionMatrix(classes: ['Class1', 'Class2'])\n>>> print(cm2)\nPredict          Class1   Class2   \nActual\nClass1           1        2        \nClass2           0        5        \n\n\n\n\nOverall Statistics : \n\n95% CI                                                           (0.44994,1.05006)\nBennett_S                                                        0.5\nChi-Squared                                                      None\nChi-Squared DF                                                   1\nConditional Entropy                                              None\nCramer_V                                                         None\nCross Entropy                                                    1.2454\nGwet_AC1                                                         0.6\nJoint Entropy                                                    None\nKL Divergence                                                    0.29097\nKappa                                                            0.38462\nKappa 95% CI                                                     (-0.354,1.12323)\nKappa No Prevalence                                              0.5\nKappa Standard Error                                             0.37684\nKappa Unbiased                                                   0.33333\nLambda A                                                         None\nLambda B                                                         None\nMutual Information                                               None\nOverall_ACC                                                      0.75\nOverall_RACC                                                     0.59375\nOverall_RACCU                                                    0.625\nPPV_Macro                                                        0.85714\nPPV_Micro                                                        0.75\nPhi-Squared                                                      None\nReference Entropy                                                0.95443\nResponse Entropy                                                 0.54356\nScott_PI                                                         0.33333\nStandard Error                                                   0.15309\nStrength_Of_Agreement(Altman)                                    Fair\nStrength_Of_Agreement(Cicchetti)                                 Poor\nStrength_Of_Agreement(Fleiss)                                    Poor\nStrength_Of_Agreement(Landis and Koch)                           Fair\nTPR_Macro                                                        0.66667\nTPR_Micro                                                        0.75\n\nClass Statistics :\n\nClasses                                                          Class1                  Class2                  \nACC(Accuracy)                                                    0.75                    0.75                    \nBM(Informedness or bookmaker informedness)                       0.33333                 0.33333                 \nDOR(Diagnostic odds ratio)                                       None                    None                    \nERR(Error rate)                                                  0.25                    0.25                    \nF0.5(F0.5 score)                                                 0.71429                 0.75758                 \nF1(F1 score - harmonic mean of precision and sensitivity)        0.5                     0.83333                 \nF2(F2 score)                                                     0.38462                 0.92593                 \nFDR(False discovery rate)                                        0.0                     0.28571                 \nFN(False negative/miss/type 2 error)                             2                       0                       \nFNR(Miss rate or false negative rate)                            0.66667                 0.0                     \nFOR(False omission rate)                                         0.28571                 0.0                     \nFP(False positive/type 1 error/false alarm)                      0                       2                       \nFPR(Fall-out or false positive rate)                             0.0                     0.66667                 \nG(G-measure geometric mean of precision and sensitivity)         0.57735                 0.84515                 \nLR+(Positive likelihood ratio)                                   None                    1.5                     \nLR-(Negative likelihood ratio)                                   0.66667                 0.0                     \nMCC(Matthews correlation coefficient)                            0.48795                 0.48795                 \nMK(Markedness)                                                   0.71429                 0.71429                 \nN(Condition negative)                                            5                       3                       \nNPV(Negative predictive value)                                   0.71429                 1.0                     \nP(Condition positive)                                            3                       5                       \nPOP(Population)                                                  8                       8                       \nPPV(Precision or positive predictive value)                      1.0                     0.71429                 \nPRE(Prevalence)                                                  0.375                   0.625                   \nRACC(Random accuracy)                                            0.04688                 0.54688                 \nRACCU(Random accuracy unbiased)                                  0.0625                  0.5625                  \nTN(True negative/correct rejection)                              5                       1                       \nTNR(Specificity or true negative rate)                           1.0                     0.33333                 \nTON(Test outcome negative)                                       7                       1                       \nTOP(Test outcome positive)                                       1                       7                       \nTP(True positive/hit)                                            1                       5                       \nTPR(Sensitivity, recall, hit rate, or true positive rate)        0.33333                 1.0                     \n\n```\n\n### Acceptable Data Types\t\t\t\n1. `actual_vector` : python `list` or numpy `array` of any objects\n2. `predict_vector` : python `list` or numpy `array` of any objects\n3. `matrix` : `dict`\n4. `digit`: `int`\t\t\t\n\n* run `help(ConfusionMatrix)` for more information\n\n\n\n\t\t\t\t\n\nFor more information visit [here](https://github.com/sepandhaghighi/pycm/tree/master/Document \"Document\")\n\n<div align=\"center\">\n\n<a href=\"https://asciinema.org/a/171863\" target=\"_blank\"><img src=\"https://asciinema.org/a/171863.png\" /><\/a>\n<\/div>\n\n## Issues & Bug Reports\t\t\t\n\nJust fill an issue and describe it. We'll check it ASAP!\t\t\t\t\t\t\t\nor send an email to [shaghighi@ce.sharif.edu](mailto:shaghighi@ce.sharif.edu \"shaghighi@ce.sharif.edu\"). \n\n\n## Todo\t\n- [x] Basic\n  - [x] TP\n  - [x] FP\n  - [x] FN\n  - [x] TN\n  - [x] Population\n  - [x] Condition positive\n  - [x] Condition negative \n  - [x] Test outcome positive\n  - [x] Test outcome negative\n- [x] Class Statistics\n  - [x] ACC\n  - [x] ERR\n  - [x] BM\n  - [x] DOR\n  - [x] F1-Score\n  - [x] FDR\n  - [x] FNR\n  - [x] FOR\n  - [x] FPR\n  - [x] LR+\n  - [x] LR-\n  - [x] MCC\n  - [x] MK\n  - [x] NPV\n  - [x] PPV\n  - [x] TNR\n  - [x] TPR\n  - [x] Prevalence\n  - [x] G-measure\n  - [x] RACC\n- [x] Outputs\n  - [x] CSV File\n  - [x] HTML File\n  - [x] Output File\n  - [x] Table\n  - [x] Normalized Table\n- [x] Overall Statistics\n  - [x] CI\n  - [x] Chi-Squared\n  - [x] Phi-Squared\n  - [x] Cramer's V\n  - [x] Kappa\n  - [x] Kappa Unbiased\n  - [x] Kappa No Prevalence\n  - [ ] Aickin's alpha\n  - [x] Bennett S score\n  - [x] Gwet's AC1\n  - [x] Scott's pi\n  - [ ] Krippendorff's alpha\n  - [x] Goodman and Kruskal's lambda A\n  - [x] Goodman and Kruskal's lambda B\n  - [x] Kullback-Liebler divergence\n  - [x] Entropy\n  - [x] Overall ACC\n  - [x] Strength of Agreement\n    - [x] Landis and Koch\n    - [x] Fleiss\n    - [x] Altman\n    - [x] Cicchetti \n  - [x] TPR Micro/Macro\n  - [x] PPV Micro/Macro\n\n## Outputs\t\n\n1. [HTML](http://www.shaghighi.ir/pycm/test.html)\n2. [CSV](https://github.com/sepandhaghighi/pycm/blob/master/Otherfiles/test.csv)\n3. [PyCM](https://github.com/sepandhaghighi/pycm/blob/master/Otherfiles/test.pycm)\t\t\t\n\n\n## Dependencies\n\n<a href=\"https://requires.io/github/sepandhaghighi/pycm/requirements/?branch=dev\"><img src=\"https://requires.io/github/sepandhaghighi/pycm/requirements.svg?branch=dev\" alt=\"Requirements Status\" /><\/a>\n\n## Contribution\t\t\t\n\nChanges and improvements are more than welcome! ❤️ Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `dev` \t\t\t\n\nRemember to write a few tests for your code before sending pull requests. \n\n\n\n## References\t\t\t\n\n<blockquote>1- J. R. Landis, G. G. Koch, “The measurement of observer agreement for categorical data. Biometrics,” in International Biometric Society,  pp. 159–174, 1977. <\/blockquote>\n\n<blockquote>2- D. M. W. Powers, “Evaluation: from precision, recall and f-measure to roc, informedness, markedness & correlation,” in Journal of Machine Learning Technologies, pp.37-63, 2011.<\/blockquote>\n\n\n<blockquote>3-  C. Sammut, G. Webb, “Encyclopedia of Machine Learning” in Springer, 2011.<\/blockquote>\n\n<blockquote>4- J. L. Fleiss, “Measuring nominal scale agreement among many raters,” in Psychological Bulletin, pp. 378-382. <\/blockquote>\n\n<blockquote>5- D.G. Altman, “Practical Statistics for Medical Research,” in Chapman and Hall, 1990.<\/blockquote>\n\n<blockquote>6- K. L. Gwet, “Computing inter-rater reliability and its variance in the presence of high agreement,” in The British Journal of Mathematical and Statistical Psychology, pp. 29–48, 2008.”<\/blockquote>\n\n<blockquote>7- W. A. Scott, “Reliability of content analysis: The case of nominal scaling,” in Public Opinion Quarterly, pp. 321–325, 1955.<\/blockquote>\n\n<blockquote>8- E. M. Bennett, R. Alpert, and A. C. Goldstein, “Communication through limited response questioning,” in The Public Opinion Quarterly, pp. 303–308, 1954.<\/blockquote>\n\n<blockquote>9- D. V. Cicchetti, \"Guidelines, criteria, and rules of thumb for evaluating normed and standardized assessment instruments in psychology,\" in Psychological Assessment, pp. 284–290, 1994.<\/blockquote>\n\n<blockquote>10- R.B. Davies, \"Algorithm AS155: The Distributions of a Linear Combination of χ2 Random Variables,\" in Journal of the Royal Statistical Society, pp. 323–333, 1980.<\/blockquote>\n\n<blockquote>11- S. Kullback, R. A. Leibler \"On information and sufficiency,\" in Annals of Mathematical Statistics, pp. 79–86, 1951.<\/blockquote>\n\n<blockquote>12- L. A. Goodman, W. H. Kruskal, \"Measures of Association for Cross Classifications, IV: Simplification of Asymptotic Variances,\" in Journal of the American Statistical Association, pp. 415–421, 1972.<\/blockquote>\n\n<blockquote>13- L. A. Goodman, W. H. Kruskal, \"Measures of Association for Cross Classifications III: Approximate Sampling Theory,\" in Journal of the American Statistical Association, pp.  310–364, 1963. <\/blockquote>\n\n<blockquote>14- T. Byrt, J. Bishop and J. B. Carlin, “Bias, prevalence, and kappa,” in Journal of Clinical Epidemiology pp. 423-429, 1993.<\/blockquote>\n\n<blockquote>15- M. Shepperd, D. Bowes, and T. Hall, “Researcher Bias: The Use of Machine Learning in Software Defect Prediction,” in IEEE Transactions on Software Engineering, pp. 603-616, 2014.<\/blockquote>\n\n<blockquote>16- X. Deng, Q. Liu, Y. Deng, and S. Mahadevan, “An improved method to construct basic probability assignment based on the confusion matrix for classification problem, ” in Information Sciences, pp.250-261, 2016.<\/blockquote>\n\n\n\n\n\n## Cite\n\nIf you use PyCM in your research , please cite this :\n\n<pre>\nSepand Haghighi, Masoomeh Jasemi, and Shaahin Hessabi. “Pycm : Multi Class Confusion Matrix Library in Python”. Zenodo, January 22, 2018. doi:10.5281/zenodo.1157173.\n<\/pre>\n<pre>\n\n@misc{https://doi.org/10.5281/zenodo.1157173,\n  doi = {10.5281/zenodo.1157173},\n  author = {{Sepand Haghighi} and Jasemi,  Masoomeh and {Shaahin Hessabi}},\n  keywords = {Machine Learning,  statistics,  confusion-matrix,  statistical-analysis,  matrices,  matrix},\n  title = {Pycm : Multi Class Confusion Matrix Library In Python},\n  pages = {--},\n  publisher = {Zenodo},\n  year = {2018}\n}\n\n\n<\/pre>\n\nDownload [PYCM.bib](http://www.shaghighi.ir/pycm/PYCM.bib)\t\t\t\t\t\t\n\n<a href=\"https://zenodo.org/badge/latestdoi/118506495\"><img src=\"https://zenodo.org/badge/118506495.svg\" alt=\"DOI\"><\/a>\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fpycm.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fpycm?ref=badge_large)\n\n\n## Donate to our project\n\t\t\t\t\t\t\t\t\n<h3>Bitcoin :<\/h3>\t\t\t\t\t\n\n```12Xm1qL4MXYWiY9sRMoa3VpfTfw6su3vNq```\t\t\t\n\n\n\n<h3>Payping (For Iranian citizens) :<\/h3>\n\n<a href=\"http://www.payping.net/sepandhaghighi\" target=\"__blank\"><img src=\"http://www.qpage.ir/images/payping.png\" height=100px width=100px><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6A3C:2E8679:175960:5C6FA0:6AB9208F"},"text_sha256":"a21af4dbee43e86de2a66cfdf2775c39fc075942a00023e42e7a2abf5520c62a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3461","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0865:B1202:177F520:1B9CEE9:6AB92820"},"commit":{"sha":"3ef423bb3a7e8fbfdc409cdea236e7b5411e517a","url":"https://github.com/sepandhaghighi/pycm/commit/3ef423bb3a7e8fbfdc409cdea236e7b5411e517a","date":"2026-03-09T09:17:17Z","author_date":"2026-03-09T09:17:17Z","committer_date":"2026-03-09T09:17:17Z","tree_sha":"a38e3290869ac02711175e30faf4dee391f58d30","message_first_line":"Version 4.6 (#632)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3460","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:17E507C:1C03733:6AB92821"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":29985,"blob_sha":"32e988f9b7caef90a27d0c0a101f82bfffde55ef","priority":0},{"path":"SECURITY.md","size":479,"blob_sha":"a8e5ce153fca4295330a1285ef08b11705a1ae5b","priority":1}],"documents":[{"path":"README.md","size":29985,"blob_sha":"32e988f9b7caef90a27d0c0a101f82bfffde55ef","priority":0,"status":200,"text":"<div align=\"center\">\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/logo.png\" width=\"550\">\n<h1>PyCM: Python Confusion Matrix<\/h1>\n<br/>\n<a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\"><\/a>\n<a href=\"https://github.com/sepandhaghighi/pycm\"><img alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/sepandhaghighi/pycm\"><\/a>\n<a href=\"/Document\"><img src=\"https://img.shields.io/badge/doc-latest-orange.svg\"><\/a>\n<a href=\"https://codecov.io/gh/sepandhaghighi/pycm\"><img src=\"https://codecov.io/gh/sepandhaghighi/pycm/branch/master/graph/badge.svg\"><\/a>\n<a href=\"https://badge.fury.io/py/pycm\"><img src=\"https://badge.fury.io/py/pycm.svg\" alt=\"PyPI version\"><\/a>\n<a href=\"https://anaconda.org/sepandhaghighi/pycm\"><img src=\"https://anaconda.org/sepandhaghighi/pycm/badges/version.svg\"><\/a>\n<a href=\"https://colab.research.google.com/github/sepandhaghighi/pycm/blob/master\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Document\"><\/a>\n<a href=\"https://discord.com/invite/zqpU2b3J3f\"><img src=\"https://img.shields.io/discord/901883546162065408.svg\" alt=\"Discord Channel\"><\/a>\n<\/div>\n\n## Overview\n\n<p align=\"justify\">\t\nPyCM is a multi-class confusion matrix library written in Python that supports both input data vectors and direct matrix, and a proper tool for post-classification model evaluation that supports most classes and overall statistics parameters.\nPyCM is the swiss-army knife of confusion matrices, targeted mainly at data scientists that need a broad array of metrics for predictive models and accurate evaluation of a large variety of classifiers.\n\n<\/p>\n\n<div align=\"center\">\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/block_diagram.jpg\" width=\"700\">\n<p>Fig1. ConfusionMatrix Block Diagram<\/p>\n<\/div>\n\n<table>\n\t<tr>\n\t\t<td align=\"center\">Open Hub<\/td>\n\t\t<td align=\"center\"><a href=\"https://www.openhub.net/p/pycm\"><img src=\"https://www.openhub.net/p/pycm/widgets/project_thin_badge.gif\"><\/a><\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td align=\"center\">PyPI Counter<\/td>\n\t\t<td align=\"center\"><a href=\"https://pepy.tech/projects/pycm\"><img src=\"https://static.pepy.tech/badge/pycm\" alt=\"PyPI Downloads\"><\/a><\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td align=\"center\">Github Stars<\/td>\n\t\t<td align=\"center\"><a href=\"https://github.com/sepandhaghighi/pycm\"><img src=\"https://img.shields.io/github/stars/sepandhaghighi/pycm.svg?style=social&label=Stars\"><\/a><\/td>\n\t<\/tr>\n<\/table>\n\n\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Branch<\/td>\n\t\t<td align=\"center\">master<\/td>\n\t\t<td align=\"center\">dev<\/td>\n\t<\/tr>\n    <tr>\n\t\t<td align=\"center\">CI<\/td>\n\t\t<td align=\"center\"><img src=\"https://github.com/sepandhaghighi/pycm/actions/workflows/test.yml/badge.svg?branch=master\"><\/td>\n\t\t<td align=\"center\"><img src=\"https://github.com/sepandhaghighi/pycm/actions/workflows/test.yml/badge.svg?branch=dev\"><\/td>\n\t<\/tr>\n<\/table>\n\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Code Quality<\/td>\n\t\t<td align=\"center\"><a class=\"badge-align\" href=\"https://www.codacy.com/app/sepand-haghighi/pycm?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=sepandhaghighi/pycm&amp;utm_campaign=Badge_Grade\"><img src=\"https://api.codacy.com/project/badge/Grade/5d9463998a0040d09afc2b80c389365c\"/><\/a><\/td>\n\t\t<td align=\"center\"><a href=\"https://www.codefactor.io/repository/github/sepandhaghighi/pycm/overview/dev\"><img src=\"https://www.codefactor.io/repository/github/sepandhaghighi/pycm/badge/dev\" alt=\"CodeFactor\" /><\/a><\/td>\n\t<\/tr>\n<\/table>\n\n## Installation\n\n⚠️  PyCM 4.3 is the last version to support **Python 3.6**\n\n⚠️  PyCM 3.9 is the last version to support **Python 3.5**\n\n⚠️  PyCM 2.4 is the last version to support **Python 2.7** & **Python 3.4**\n\n⚠️  Plotting capability requires **Matplotlib (>= 3.0.0)** or **Seaborn (>= 0.9.1)**\n\n### PyPI\n\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/)\n- Run `pip install pycm==4.6`\n\n### Source code\n- Download [Version 4.6](https://github.com/sepandhaghighi/pycm/archive/v4.6.zip) or [Latest Source](https://github.com/sepandhaghighi/pycm/archive/dev.zip)\n- Run `pip install .`\n\n### Conda\n\n- Check [Conda Managing Package](https://conda.io/)\n- Update Conda using `conda update conda`\n- Run `conda install -c sepandhaghighi pycm`\n\n### MATLAB\n\n- Download and install [MATLAB](https://www.mathworks.com/products/matlab.html) (>=8.5, 64/32 bit)\n- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.7, 64/32 bit)\n\t- [x] Select `Add to PATH` option\n\t- [x] Select `Install pip` option\n- Run `pip install pycm`\n- Configure Python interpreter\n\n```matlab\n>> pyversion PYTHON_EXECUTABLE_FULL_PATH\n```\n\n- Visit [MATLAB Examples](https://github.com/sepandhaghighi/pycm/tree/master/MATLAB)\n\n## Usage\n\n### From vector\n\n```pycon\n>>> from pycm import *\n>>> y_actu = [2, 0, 2, 2, 0, 1, 1, 2, 2, 0, 1, 2]\n>>> y_pred = [0, 0, 2, 1, 0, 2, 1, 0, 2, 0, 2, 2]\n>>> cm = ConfusionMatrix(actual_vector=y_actu, predict_vector=y_pred)\n>>> cm.classes\n[0, 1, 2]\n>>> cm.table\n{0: {0: 3, 1: 0, 2: 0}, 1: {0: 0, 1: 1, 2: 2}, 2: {0: 2, 1: 1, 2: 3}}\n>>> cm.print_matrix()\nPredict 0       1       2       \nActual\n0       3       0       0       \n\n1       0       1       2       \n\n2       2       1       3   \n\n>>> cm.print_normalized_matrix()\nPredict       0             1             2             \nActual\n0             1.0           0.0           0.0           \n\n1             0.0           0.33333       0.66667       \n\n2             0.33333       0.16667       0.5          \n\n>>> cm.stat(summary=True)\nOverall Statistics : \n\nACC Macro                                                         0.72222\nF1 Macro                                                          0.56515\nFPR Macro                                                         0.22222\nKappa                                                             0.35484\nOverall ACC                                                       0.58333\nPPV Macro                                                         0.56667\nSOA1(Landis & Koch)                                               Fair\nTPR Macro                                                         0.61111\nZero-one Loss                                                     5\n\nClass Statistics :\n\nClasses                                                           0             1             2             \nACC(Accuracy)                                                     0.83333       0.75          0.58333       \nAUC(Area under the ROC curve)                                     0.88889       0.61111       0.58333       \nAUCI(AUC value interpretation)                                    Very Good     Fair          Poor          \nF1(F1 score - harmonic mean of precision and sensitivity)         0.75          0.4           0.54545       \nFN(False negative/miss/type 2 error)                              0             2             3             \nFP(False positive/type 1 error/false alarm)                       2             1             2             \nFPR(Fall-out or false positive rate)                              0.22222       0.11111       0.33333       \nN(Condition negative)                                             9             9             6             \nP(Condition positive or support)                                  3             3             6             \nPOP(Population)                                                   12            12            12            \nPPV(Precision or positive predictive value)                       0.6           0.5           0.6           \nTN(True negative/correct rejection)                               7             8             4             \nTON(Test outcome negative)                                        7             10            7             \nTOP(Test outcome positive)                                        5             2             5             \nTP(True positive/hit)                                             3             1             3             \nTPR(Sensitivity, recall, hit rate, or true positive rate)         1.0           0.33333       0.5 \n\n```\n\n### Direct CM\n\n```pycon\n>>> from pycm import *\n>>> cm2 = ConfusionMatrix(matrix={\"Class1\": {\"Class1\": 1, \"Class2\": 2}, \"Class2\": {\"Class1\": 0, \"Class2\": 5}})\n>>> cm2\npycm.ConfusionMatrix(classes: ['Class1', 'Class2'])\n>>> cm2.classes\n['Class1', 'Class2']\n>>> cm2.print_matrix()\nPredict      Class1       Class2       \nActual\nClass1       1            2            \n\nClass2       0            5            \n\n>>> cm2.print_normalized_matrix()\nPredict       Class1        Class2        \nActual\nClass1        0.33333       0.66667       \n\nClass2        0.0           1.0 \n\n>>> cm2.stat(summary=True)\nOverall Statistics : \n\nACC Macro                                                         0.75\nF1 Macro                                                          0.66667\nFPR Macro                                                         0.33333\nKappa                                                             0.38462\nOverall ACC                                                       0.75\nPPV Macro                                                         0.85714\nSOA1(Landis & Koch)                                               Fair\nTPR Macro                                                         0.66667\nZero-one Loss                                                     2\n\nClass Statistics :\n\nClasses                                                           Class1        Class2        \nACC(Accuracy)                                                     0.75          0.75          \nAUC(Area under the ROC curve)                                     0.66667       0.66667       \nAUCI(AUC value interpretation)                                    Fair          Fair          \nF1(F1 score - harmonic mean of precision and sensitivity)         0.5           0.83333       \nFN(False negative/miss/type 2 error)                              2             0             \nFP(False positive/type 1 error/false alarm)                       0             2             \nFPR(Fall-out or false positive rate)                              0.0           0.66667       \nN(Condition negative)                                             5             3             \nP(Condition positive or support)                                  3             5             \nPOP(Population)                                                   8             8             \nPPV(Precision or positive predictive value)                       1.0           0.71429       \nTN(True negative/correct rejection)                               5             1             \nTON(Test outcome negative)                                        7             1             \nTOP(Test outcome positive)                                        1             7             \nTP(True positive/hit)                                             1             5             \nTPR(Sensitivity, recall, hit rate, or true positive rate)         0.33333       1.0\n     \n```\n\n* `matrix()` and `normalized_matrix()` renamed to `print_matrix()` and `print_normalized_matrix()` in `version 1.5`\n\n### Activation threshold\n\n`threshold` is added in `version 0.9` for real value prediction.\nFor more information visit [Example3](http://www.pycm.io/doc/Example3.html \"Example3\")\n\n### Load from file\n\n`file` is added in `version 0.9.5` in order to load saved confusion matrix with `.obj` format generated by `save_obj` method.\n\nFor more information visit [Example4](http://www.pycm.io/doc/Example4.html \"Example4\")\n\n### Sample weights\n\n`sample_weight` is added in `version 1.2`\n\nFor more information visit [Example5](http://www.pycm.io/doc/Example5.html \"Example5\")\n\n### Transpose\n\n`transpose` is added in `version 1.2` in order to transpose input matrix (only in `Direct CM` mode)\n\n### Relabel\n\n`relabel` method is added in `version 1.5` in order to change ConfusionMatrix classnames.\n\n```pycon\n>>> cm.relabel(mapping={0: \"L1\", 1: \"L2\", 2: \"L3\"})\n>>> cm\npycm.ConfusionMatrix(classes: ['L1', 'L2', 'L3'])\n```\n\n### Position\n\n`position` method is added in `version 2.8` in order to find the indexes of observations in `predict_vector` which made TP, TN, FP, FN.\n\n```pycon\n>>> cm.position()\n{0: {'FN': [], 'FP': [0, 7], 'TP': [1, 4, 9], 'TN': [2, 3, 5, 6, 8, 10, 11]}, 1: {'FN': [5, 10], 'FP': [3], 'TP': [6], 'TN': [0, 1, 2, 4, 7, 8, 9, 11]}, 2: {'FN': [0, 3, 7], 'FP': [5, 10], 'TP': [2, 8, 11], 'TN': [1, 4, 6, 9]}}\n```\n\n### To array\n\n`to_array` method is added in `version 2.9` in order to returns the confusion matrix in the form of a NumPy array. This can be helpful to apply different operations over the confusion matrix for different purposes such as aggregation, normalization, and combination.\n\n```pycon\n>>> cm.to_array()\narray([[3, 0, 0],\n       [0, 1, 2],\n       [2, 1, 3]])\n>>> cm.to_array(normalized=True)\narray([[1.     , 0.     , 0.     ],\n       [0.     , 0.33333, 0.66667],\n       [0.33333, 0.16667, 0.5    ]])\n>>> cm.to_array(normalized=True, one_vs_all=True, class_name=\"L1\")\narray([[1.     , 0.     ],\n       [0.22222, 0.77778]])\n```\n\n### Combine\n\n`combine` method is added in `version 3.0` in order to merge two confusion matrices. This option will be useful in mini-batch learning.\n\n```pycon\n>>> cm_combined = cm2.combine(cm3)\n>>> cm_combined.print_matrix()\nPredict      Class1       Class2       \nActual\nClass1       2            4            \n\nClass2       0            10           \n\n```\n\n### Plot\n\n`plot` method is added in `version 3.0` in order to plot a confusion matrix using Matplotlib or Seaborn.\n\n```pycon\n>>> cm.plot()\n```\n\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/plot1.png\">\n\n```pycon\n>>> from matplotlib import pyplot as plt\n>>> cm.plot(cmap=plt.cm.Greens, number_label=True, plot_lib=\"matplotlib\")\n```\n\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/plot2.png\">\t\t\n\n```pycon\n>>> cm.plot(cmap=plt.cm.Reds, normalized=True, number_label=True, plot_lib=\"seaborn\")\n```\n\n<img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/plot3.png\">\n\n### ROC curve\n\n`ROCCurve`, added in `version 3.7`, is devised to compute the Receiver Operating Characteristic (ROC) or simply ROC curve. In ROC curves, the Y axis represents the True Positive Rate, and the X axis represents the False Positive Rate. Thus, the ideal point is located at the top left of the curve, and a larger area under the curve represents better performance. ROC curve is a graphical representation of binary classifiers' performance. In PyCM, `ROCCurve` binarizes the output based on the \"One vs. Rest\" strategy to provide an extension of ROC for multi-class classifiers. Getting the actual labels vector, the target probability estimates of the positive classes, and the list of ordered labels of classes, this method is able to compute and plot TPR-FPR pairs for different discrimination thresholds and compute the area under the ROC curve.\n\n```pycon\n>>> crv = ROCCurve(actual_vector=np.array([1, 1, 2, 2]), probs=np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]), classes=[2, 1])\n>>> crv.thresholds\n[0.1, 0.2, 0.35, 0.4, 0.6, 0.65, 0.8, 0.9]\n>>> auc_trp = crv.area()\n>>> auc_trp[1]\n0.75\n>>> auc_trp[2]\n0.75\n>>> optimal_thresholds = crv.optimal_thresholds()\n>>> optimal_thresholds[1]\n0.35\n>>> optimal_thresholds[2]\n0.2\n```\nℹ️ Starting from `version 4.5`, the `optimal_thresholds()` method is available to calculate class-specific optimal cut-points using the \"Closest to (0,1)\" criterion. This method finds the threshold for each class that minimizes the Euclidean distance to the perfect classifier point.\n\n### Precision-Recall curve\n\n`PRCurve`, added in `version 3.7`, is devised to compute the Precision-Recall curve in which the Y axis represents the Precision, and the X axis represents the Recall of a classifier. Thus, the ideal point is located at the top right of the curve, and a larger area under the curve represents better performance. Precision-Recall curve is a graphical representation of binary classifiers' performance. In PyCM, `PRCurve` binarizes the output based on the \"One vs. Rest\" strategy to provide an extension of this curve for multi-class classifiers. Getting the actual labels vector, the target probability estimates of the positive classes, and the list of ordered labels of classes, this method is able to compute and plot Precision-Recall pairs for different discrimination thresholds and compute the area under the curve.\n\n```pycon\n>>> crv = PRCurve(actual_vector=np.array([1, 1, 2, 2]), probs=np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]), classes=[2, 1])\n>>> crv.thresholds\n[0.1, 0.2, 0.35, 0.4, 0.6, 0.65, 0.8, 0.9]\n>>> auc_trp = crv.area()\n>>> auc_trp[1]\n0.29166666666666663\n>>> auc_trp[2]\n0.29166666666666663\n```\n### Precision curve\n\n`PCurve`, added in `version 4.6`, is devised to compute the Precision curve in which the Y axis represents the Precision, and the X axis represents the discrimination thresholds applied to a classifier. Thus, the highest precision happens at the top right of the curve. Precision curve is a graphical representation of binary classifiers' performance. In PyCM, `PCurve` binarizes the output based on the \"One vs. Rest\" strategy to provide an extension of this curve for multi-class classifiers. Getting the actual labels vector, the target probability estimates of the positive classes, and the list of ordered labels of classes, this method is able to compute and plot Precision per different discrimination thresholds and compute the area under the curve.\n\n```pycon\n>>> crv = PCurve(actual_vector = np.array([1, 1, 2, 2]), probs = np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]), classes=[2, 1])\n>>> crv.thresholds\n[0.1, 0.2, 0.35, 0.4, 0.6, 0.65, 0.8, 0.9]\n>>> auc_trp = crv.area()\n>>> auc_trp[1]\n0.5458333333333333\n>>> auc_trp[2]\n0.5375000000000001\n```\n### Recall curve\n\n`RCurve`, added in `version 4.6`, is devised to compute the Recall curve in which the Y axis represents the Recall, and the X axis represents the discrimination thresholds applied to a classifier. Thus, the highest recall happens at the top left of the curve, and a larger area under the curve represents better performance. Recall curve is a graphical representation of binary classifiers' performance. In PyCM, `RCurve` binarizes the output based on the \"One vs. Rest\" strategy to provide an extension of this curve for multi-class classifiers. Getting the actual labels vector, the target probability estimates of the positive classes, and the list of ordered labels of classes, this method is able to compute and plot Recall per different discrimination thresholds and compute the area under the curve.\n\n```pycon\n>>> crv = RCurve(actual_vector = np.array([1, 1, 2, 2]), probs = np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]), classes=[2, 1])\n>>> crv.thresholds\n[0.1, 0.2, 0.35, 0.4, 0.6, 0.65, 0.8, 0.9]\n>>> auc_trp = crv.area()\n>>> auc_trp[1]\n0.6625000000000001\n>>> auc_trp[2]\n0.5125\n```\n\n### F1 curve\n`F1Curve`, added in `version 4.6`, is devised to compute the F1 curve in which the Y axis represents the F1-score, and the X axis represents the discrimination thresholds applied to a classifier. F1 curve is a graphical representation of binary classifiers' performance. In PyCM, `F1Curve` binarizes the output based on the \"One vs. Rest\" strategy to provide an extension of this curve for multi-class classifiers. Getting the actual labels vector, the target probability estimates of the positive classes, and the list of ordered labels of classes, this method is able to compute and plot F1-score per different discrimination thresholds and compute the area under the curve.\n\n```pycon\n>>> crv = F1Curve(actual_vector = np.array([1, 1, 2, 2]), probs = np.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]), classes=[2, 1])\n>>> crv.thresholds\n[0.1, 0.2, 0.35, 0.4, 0.6, 0.65, 0.8, 0.9]\n>>> auc_trp = crv.area()\n>>> auc_trp[1]\n0.5633333333333334\n>>> auc_trp[2]\n0.5091666666666667\n```\n\n### Parameter recommender\n\nThis option has been added in `version 1.9` to recommend the most related parameters considering the characteristics of the input dataset.\nThe suggested parameters are selected according to some characteristics of the input such as being balance/imbalance and binary/multi-class.\nAll suggestions can be categorized into three main groups: imbalanced dataset, binary classification for a balanced dataset, and multi-class classification for a balanced dataset.\nThe recommendation lists have been gathered according to the respective paper of each parameter and the capabilities which had been claimed by the paper.\n\n```pycon\n>>> cm.imbalance\nFalse\n>>> cm.binary\nFalse\n>>> cm.recommended_list\n['MCC', 'TPR Micro', 'ACC', 'PPV Macro', 'BCD', 'Overall MCC', 'Hamming Loss', 'TPR Macro', 'Zero-one Loss', 'ERR', 'PPV Micro', 'Overall ACC']\n\n```\n\n`is_imbalanced` parameter has been added in `version 3.3`, so the user can indicate whether the concerned dataset is imbalanced or not. As long as the user does not provide any information in this regard, the automatic detection algorithm will be used.\n\n```pycon\n>>> cm = ConfusionMatrix(y_actu, y_pred, is_imbalanced=True)\n>>> cm.imbalance\nTrue\n>>> cm = ConfusionMatrix(y_actu, y_pred, is_imbalanced=False)\n>>> cm.imbalance\nFalse\n```\n\n### Compare\n\nIn `version 2.0`, a method for comparing several confusion matrices is introduced. This option is a combination of several overall and class-based benchmarks. Each of the benchmarks evaluates the performance of the classification algorithm from good to poor and give them a numeric score. The score of good and poor performances are 1 and 0, respectively.\n\nAfter that, two scores are calculated for each confusion matrices, overall and class-based. The overall score is the average of the score of seven overall benchmarks which are Landis & Koch, Cramer, Matthews, Goodman-Kruskal's Lambda A, Goodman-Kruskal's Lambda B, Krippendorff's Alpha, and Pearson's C. In the same manner, the class-based score is the average of the score of six class-based benchmarks which are Positive Likelihood Ratio Interpretation, Negative Likelihood Ratio Interpretation, Discriminant Power Interpretation, AUC value Interpretation, Matthews Correlation Coefficient Interpretation and Yule's Q Interpretation. It should be noticed that if one of the benchmarks returns none for one of the classes, that benchmarks will be eliminated in total averaging. If the user sets weights for the classes, the averaging over the value of class-based benchmark scores will transform to a weighted average.\n\nIf the user sets the value of `by_class` boolean input `True`, the best confusion matrix is the one with the maximum class-based score. Otherwise, if a confusion matrix obtains the maximum of both overall and class-based scores, that will be reported as the best confusion matrix, but in any other case, the compared object doesn’t select the best confusion matrix.\n\n```pycon\n>>> cm2 = ConfusionMatrix(matrix={0: {0: 2, 1: 50, 2: 6}, 1: {0: 5, 1: 50, 2: 3}, 2: {0: 1, 1: 7, 2: 50}})\n>>> cm3 = ConfusionMatrix(matrix={0: {0: 50, 1: 2, 2: 6}, 1: {0: 50, 1: 5, 2: 3}, 2: {0: 1, 1: 55, 2: 2}})\n>>> cp = Compare({\"cm2\": cm2, \"cm3\": cm3})\n>>> print(cp)\nBest : cm2\n\nRank  Name   Class-Score       Overall-Score\n1     cm2    0.50278           0.58095\n2     cm3    0.33611           0.52857\n\n>>> cp.best\npycm.ConfusionMatrix(classes: [0, 1, 2])\n>>> cp.sorted\n['cm2', 'cm3']\n>>> cp.best_name\n'cm2'\n```\n\n### Multilabel confusion matrix\n\nFrom `version 4.0`, `MultiLabelCM` has been added to calculate class-wise or sample-wise multilabel confusion matrices. In class-wise mode, confusion matrices are calculated for each class, and in sample-wise mode, they are generated per sample. All generated confusion matrices are binarized with a one-vs-rest transformation.\n\n```pycon\n>>> mlcm = MultiLabelCM(actual_vector=[{\"cat\", \"bird\"}, {\"dog\"}], predict_vector=[{\"cat\"}, {\"dog\", \"bird\"}], classes=[\"cat\", \"dog\", \"bird\"])\n>>> mlcm.actual_vector_multihot\n[[1, 0, 1], [0, 1, 0]]\n>>> mlcm.predict_vector_multihot\n[[1, 0, 0], [0, 1, 1]]\n>>> mlcm.get_cm_by_class(\"cat\").print_matrix()\nPredict 0       1       \nActual\n0       1       0       \n\n1       0       1       \n\n>>> mlcm.get_cm_by_sample(0).print_matrix()\nPredict 0       1       \nActual\n0       1       0       \n\n1       1       1 \n\n```\n\n### Online help\n\n`online_help` function is added in `version 1.1` in order to open each statistics definition in web browser\n\n```pycon\n>>> from pycm import online_help\n>>> online_help(\"J\")\n>>> online_help(\"SOA1(Landis & Koch)\")\n>>> online_help(2)\n```\n\n* List of items are available by calling `online_help()` (without argument)\n* If PyCM website is not available, set `alt_link = True` (new in `version 2.4`)\n\n### Screen record\n\n<div align=\"center\">\n<a href=\"https://asciinema.org/a/171863\" target=\"_blank\"><img src=\"https://asciinema.org/a/171863.png\"/><\/a>\n<\/div>\n\n## Try PyCM in your browser!\n\nPyCM can be used online in interactive Jupyter Notebooks via the Binder or Colab services! Try it out now! :\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/sepandhaghighi/pycm/master)\n\n[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sepandhaghighi/pycm/blob/master)\n\n* Check `Examples` in `Document` folder\n\n## Issues & bug reports\n\n1. Fill an issue and describe it. We'll check it ASAP!\n    - Please complete the issue template\n2. Discord : [https://discord.com/invite/zqpU2b3J3f](https://discord.com/invite/zqpU2b3J3f)\n3. Website : [https://www.pycm.io](https://www.pycm.io)\n4. Mailing List : [https://mail.python.org/mailman3/lists/pycm.python.org/](https://mail.python.org/mailman3/lists/pycm.python.org/)\n5. Email : [info@pycm.io](mailto:info@pycm.io \"info@pycm.io\")\n\n## Acknowledgments\n\n[NLnet foundation](https://nlnet.nl) has supported the PyCM project from version **4.3** to **4.7** through the [NGI0 Commons](https://nlnet.nl/commonsfund/) Fund. This fund is set up by [NLnet foundation](https://nlnet.nl) with funding from the European Commission's [Next Generation Internet program](https://ngi.eu), administered by DG Communications Networks, Content, and Technology under grant agreement [**No 101135429**](https://nlnet.nl/project/PyCM-API/).\n\n<a href=\"https://nlnet.nl\"><img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/NlNet.svg\" height=\"50px\" alt=\"NLnet foundation\"><\/a> &nbsp;  <a href=\"https://nlnet.nl/commonsfund/\"><img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/NGI0Core.svg\" height=\"50px\" alt=\"NGI0 Commons\"><\/a>\n\n[NLnet foundation](https://nlnet.nl) has supported the PyCM project from version **3.6** to **4.0** through the [NGI Assure](https://nlnet.nl/assure) Fund. This fund is set up by [NLnet foundation](https://nlnet.nl) with funding from the European Commission's [Next Generation Internet program](https://ngi.eu), administered by DG Communications Networks, Content, and Technology under grant agreement [**No 957073**](https://nlnet.nl/project/PyCM/).\n\n<a href=\"https://nlnet.nl\"><img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/NlNet.svg\" height=\"50px\" alt=\"NLnet foundation\"><\/a> &nbsp;  <a href=\"https://nlnet.nl/assure\"><img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/NGIAssure.svg\" height=\"50px\" alt=\"NGI Assure\"><\/a>\n\n[Python Software Foundation (PSF)](https://www.python.org/psf/) grants PyCM library partially for version **3.7**. [PSF](https://www.python.org/psf/) is the organization behind Python. Their mission is to promote, protect, and advance the Python programming language and to support and facilitate the growth of a diverse and international community of Python programmers.\n\n<a href=\"https://www.python.org/psf/\"><img src=\"https://github.com/sepandhaghighi/pycm/raw/master/Otherfiles/PSF.png\" height=\"55px\" alt=\"Python Software Foundation\"><\/a>\n\nSome parts of the infrastructure for this project are supported by:\n<p>\n  <a href=\"https://www.digitalocean.com/\">\n    <img src=\"https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg\" width=\"201px\" alt=\"DigitalOcean\">\n  <\/a>\n<\/p>\n\n## Cite\n\nIf you use PyCM in your research, we would appreciate citations to the following paper:\n\n\n[Haghighi, S., Jasemi, M., Hessabi, S. and Zolanvari, A., 2018. PyCM: Multiclass confusion matrix library in Python. *Journal of Open Source Software*, 3(25), p.729.](https://joss.theoj.org/papers/10.21105/joss.00729)\n\n\n```bibtex\n@article{Haghighi2018,\n  doi = {10.21105/joss.00729},\n  url = {https://doi.org/10.21105/joss.00729},\n  year  = {2018},\n  month = {may},\n  publisher = {The Open Journal},\n  volume = {3},\n  number = {25},\n  pages = {729},\n  author = {Sepand Haghighi and Masoomeh Jasemi and Shaahin Hessabi and Alireza Zolanvari},\n  title = {{PyCM}: Multiclass confusion matrix library in Python},\n  journal = {Journal of Open Source Software}\n}\n```\n\nDownload [PyCM.bib](http://www.pycm.io/PYCM.bib)\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">JOSS<\/td>\n\t\t<td align=\"center\"><a href=\"https://doi.org/10.21105/joss.00729\"><img src=\"http://joss.theoj.org/papers/10.21105/joss.00729/status.svg\"><\/a><\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td align=\"center\">Zenodo<\/td>\n\t\t<td align=\"center\"><a href=\"https://doi.org/10.5281/zenodo.1157173\"><img src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.1157173.svg\" alt=\"DOI\"><\/a><\/td>\n\t<\/tr>\n<\/table>\n\n## Show your support\n\n### Star this repo\n\nGive a ⭐️ if this project helped you!\n\n### Donate to our project\n\nIf you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .\n\n<a href=\"http://www.pycm.io/donate.html\" target=\"_blank\"><img src=\"http://www.pycm.io/images/Donate-Button.png\" height=\"90px\" width=\"270px\" alt=\"PyCM Donation\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B60:376DE:17A48B:5CBE7B:6AB9208E"},"text_sha256":"b910ee0b8764b798236da96d6094ac82fe8461058e7434a8c821a8e81748f587"},{"path":"SECURITY.md","size":479,"blob_sha":"a8e5ce153fca4295330a1285ef08b11705a1ae5b","priority":1,"status":200,"text":"# Security policy\n\n## Supported versions\n\n| Version       | Supported          |\n| ------------- | ------------------ |\n| 4.6           | :white_check_mark: |\n| < 4.6         | :x:                |\n\n## Reporting a vulnerability\n\nPlease report security vulnerabilities by email to [info@pycm.io](mailto:info@pycm.io \"info@pycm.io\").\n\nIf the security vulnerability is accepted, a dedicated bugfix release will be issued as soon as possible (depending on the complexity of the fix).","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC7A:345ED4:171CD6:5C34B5:6AB9208F"},"text_sha256":"bc979b27afb4d6c68ed32d07756ff9ccb3159c444c0cb3174886ec00b836ab45"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"DragonComputer/Dragonfire","input_row":{"repository":"DragonComputer/Dragonfire","url":"https://github.com/DragonComputer/Dragonfire","name":"Dragonfire","owner":"DragonComputer","description":"the open-source virtual assistant for Ubuntu based Linux distributions","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1408,"issues":102,"created_at":"2016-04-19T23:28:07Z","updated_at":"2026-09-21T07:18:13Z","first_commit_at":"2015-03-07T11:44:18Z","last_commit_at":"2020-12-26T12:26:35Z","activity_months":69.680000000000007,"ai_ml_match_topics":"artificial-intelligence; machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:50.548Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"DragonComputer/Dragonfire","visibility":"public","created_at":"2016-04-19T23:28:07Z","updated_at":"2026-09-21T07:18:13Z","private":false,"fork":false,"archived":false,"stargazers_count":1408,"open_issues_count":48,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3459","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17B3551:1BD18CA:6AB92822"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3458","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:177688F:1B94900:6AB92822"},"commit":{"sha":"85cf59064fcf10f85500dda36fead43ee3999d1f","url":"https://github.com/DragonComputer/Dragonfire/commit/85cf59064fcf10f85500dda36fead43ee3999d1f","date":"2018-05-24T23:39:02Z","author_date":"2018-05-24T23:39:02Z","committer_date":"2018-05-24T23:39:02Z","tree_sha":"1ad4afd26022b7f13e04bf4e68e44ce322d81629","message_first_line":"Implement the barebones of the API"},"tree_request_status":200,"tree_rate":{"github_remaining":"3457","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DE:DC698:17D8B39:1BF6595:6AB92823"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13482,"blob_sha":"06ac20e615551c8605d80156cafff11e7a276cbc","priority":0},{"path":"README.rst","size":13360,"blob_sha":"99b37521b29dbbad5e4452c0fd16298e1f7f4098","priority":0}],"documents":[{"path":"README.md","size":13482,"blob_sha":"06ac20e615551c8605d80156cafff11e7a276cbc","priority":0,"status":200,"text":"# Dragonfire\n\n<img src=\"https://travis-ci.org/DragonComputer/Dragonfire.svg?branch=master\" align=\"right\" />\n\nDragonfire is an open source virtual assistant project for Ubuntu based Linux distributions.\n\n![Dragonfire](https://raw.githubusercontent.com/DragonComputer/Dragonfire/master/docs/img/demo.gif)\n\n<p align=\"center\"><sup><i>Special thanks to Jassu Ilama for the beautiful 3D modelling and material design of this avatar.<\/i><\/sup><\/p>\n\n<br>\n\nDragonfire goes through these steps for each one of your commands, respectively:\n\n - Search across the built-in commands and evaluate the algebraic expressions\n - Try to [Learn using Advanced NLP and Database Management Techniques](https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/learn.py)\n - Ask to [Omniscient Q&A Engine](https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/omniscient.py) (Thanks to all people who contributed to magnificent [spaCy](https://github.com/explosion/spaCy) project and [Wikipedia](https://en.wikipedia.org/), the free encyclopedia for this feature)\n - Respond using the [Deep Conversation](https://arxiv.org/abs/1506.05869) system, a seq2seq neural network trained with [Cornell Movie-Dialogs Corpus](http://www.cs.cornell.edu/~cristian//Cornell_Movie-Dialogs_Corpus.html)\n\n<br>\n\nDragonfire uses [Mozilla DeepSpeech](https://github.com/mozilla/DeepSpeech) to understand your voice commands and [Festival Speech Synthesis System](http://www.cstr.ed.ac.uk/projects/festival/) to handle text-to-speech tasks.\n\nFeel free to join [our Gitter chat room](https://gitter.im/DragonComputer/Lobby). Also you can directly talk with Dragonfire's herself via [her Twitter account](https://twitter.com/DragonfireAI).\n\n#### Supported Environments\n\n|                         |                                         |\n|-------------------------|-----------------------------------------|\n| **Operating systems**   | Linux                                   |\n| **Python versions**     | Python 3.x (64-bit)                     |\n| **Distros**             | KDE neon, elementary OS, Ubuntu         |\n| **Package managers**    | APT, pip                                |\n| **Languages**           | English                                 |\n| **System requirements** | preferably a [CUDA supported GPU](https://www.geforce.com/hardware/technology/cuda/supported-gpus), 2GB of free RAM   |\n|                         |                                         |\n\n### Installation\n\nDownload the [latest release](https://github.com/DragonComputer/Dragonfire/releases/latest) (the `.deb` file) and:\n\n```Shell\nsudo dpkg -i dragonfire_0.9.9_amd64.deb\n```\n\n<sup><i>To install the dependencies run `sudo apt-get -f install` right after the `dpkg -i` command. The installation will automatically download the pre-trained English model of Mozilla DeepSpeech (1.31 GB download size) and will place it under `/usr/share/dragonfire/deepspeech/models` directory. You can manually [download the model](https://github.com/mozilla/DeepSpeech/releases/download/v0.1.1/deepspeech-0.1.1-models.tar.gz) if you want.<\/i><\/sup>\n\n### Usage\n\n```\nusage: dragonfire [-h] [-c] [-s] [--headless]\n\noptional arguments:\n  -h, --help    show this help message and exit\n  -c, --cli     Command-line interface mode. Give commands to Dragonfire via\n                command-line inputs (keyboard) instead of audio inputs\n                (microphone).\n  -s, --silent  Silent mode. Disable Text-to-Speech output. Dragonfire won't\n                generate any audio output.\n  --headless    Headless mode. Do not display an avatar animation on the\n                screen. Disable the female head model.\n```\n\nTo activate Dragonfire say *DRAGONFIRE* or *HEY* or *WAKE UP*.\n\nTo deactivate her say *GO TO SLEEP*.\n\nTo silence her say *ENOUGH* or *SHUT UP*.\n\nTo kill her say *GOODBYE* or *BYE BYE* or *SEE YOU LATER* or *CATCH YOU LATER*.\n\n<br>\n\n:warning: Facing with a problem? Take a look at the [Troubleshooting](https://github.com/DragonComputer/Dragonfire/blob/master/docs/TROUBLESHOOTING.md#troubleshooting):hammer_and_wrench: section.\n\n<br>\n\n#### Built-in Commands\n\n[Dragonfire DEVLOG #3 - Built-in Commands](https://youtu.be/krHUzY2DylI)\n\n```\nDRAGONFIRE | WAKE UP | HEY\nGO TO SLEEP\nENOUGH | SHUT UP\nWHO AM I | SAY MY NAME\nMY TITLE IS LADY | I'M A LADY | I'M A WOMAN | I'M A GIRL\nMY TITLE IS SIR | I'M A MAN | I'M A BOY | CALL ME *\nWHAT IS YOUR NAME\nWHAT IS YOUR GENDER\nFILE MANAGER | OPEN FILES\nWEB BROWSER\nPHOTOSHOP | PHOTO EDITOR\nINKSCAPE | VECTOR GRAPHICS\nVIDEO EDITOR\nOPEN [CAMERA, CALENDAR, CALCULATOR, STEAM, BLENDER, WRITER, MATH, IMPRESS, DRAW]\nSOFTWARE CENTER\nOFFICE SUITE\nKEYBOARD *\nENTER | NEW TAB | SWITCH TAB | CLOSE | GO BACK | GO FORWARD\nSCROLL LEFT | SCROLL RIGHT | SCROLL UP | SCROLL DOWN\nPLAY | PAUSE | SPACEBAR\nSHUT DOWN THE COMPUTER\nGOODBYE | BYE BYE | SEE YOU LATER\n(SEARCH|FIND) * (IN|ON|AT|USING) WIKIPEDIA\n(SEARCH|FIND) * (IN|ON|AT|USING) YOUTUBE\n(SEARCH|FIND) * (IN|ON|AT|USING) (GOOGLE|WEB)\n(SEARCH IMAGES OF|FIND IMAGES OF|SEARCH|FIND) * (IN|ON|AT|USING) (GOOGLE|WEB|GOOGLE IMAGES|WEB IMAGES)\nWHAT'S THE TEMPERATURE IN *\n```\n\n<br>\n\n#### Learning examples\n\n[Dragonfire DEVLOG #4 - Learning](https://youtu.be/ujmRtqf2nxQ)\n\n|                                                                 |                                                                  |\n|-----------------------------------------------------------------|------------------------------------------------------------------|\n| **You:** `THE SUN IS HOT`                                       | **You:** `MY PLACE OF BIRTH IS TURKEY`                           |\n| **Dragonfire:** `OK, I GET IT. THE SUN IS HOT`                  | **Dragonfire:** `OK, I GET IT. YOUR PLACE OF BIRTH IS TURKEY`    |\n| **You:** `THE SUN IS YELLOW`                                    | **You:** `WHERE IS MY PLACE OF BIRTH`                            |\n| **Dragonfire:** `OK, I GET IT. THE SUN IS YELLOW`               | **Dragonfire:** `YOUR PLACE OF BIRTH IS TURKEY`                  |\n| **You:** `DESCRIBE THE SUN`                                     | **You:** `YOU ARE JUST A COMPUTER PROGRAM`                       |\n| **Dragonfire:** `THE SUN IS HOT AND YELLOW`                     | **Dragonfire:** `OK, I GET IT. I'M JUST A COMPUTER PROGRAM`      |\n| **You:** `MY AGE IS 25`                                         | **You:** `WHAT ARE YOU`                                          |\n| **Dragonfire:** `OK, I GET IT. YOUR AGE IS 25`                  | **Dragonfire:** `I'M JUST A COMPUTER PROGRAM`                    |\n| **You:** `WHAT IS MY AGE`                                       | **You:** `ALBERT EINSTEIN IS A PHYSICIST`                        |\n| **Dragonfire:** `YOUR AGE IS 25`                                | **Dragonfire:** `OK, I GET IT. ALBERT EINSTEIN IS A PHYSICIST`   |\n| **You:** `FORGET MY AGE`                                        | **You:** `WHO IS A PHYSICIST`                                    |\n| **Dragonfire:** `OK, I FORGOT EVERYTHING I KNOW ABOUT YOUR AGE` | **Dragonfire:** `ALBERT EINSTEIN IS A PHYSICIST`                 |\n|                                                                 |                                                                  |\n\n<br>\n\n#### Omniscient Q&A Engine examples\n\n[Dragonfire DEVLOG #5 - YodaQA](https://youtu.be/FafUcxC0puM) (Old video - YodaQA is superseded by Omniscient)\n\n|                                                                   |                                                                             |\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| **You:** `WHERE IS THE TIMES SQUARE`                              | **You:** `WHEN WAS CONSTANTINOPLE CONQUERED`                                |\n| **Dragonfire:** `PLEASE WAIT... NEW YORK CITY` :heavy_check_mark: | **Dragonfire:** `PLEASE WAIT... 1453` :heavy_check_mark:                    |\n| **You:** `WHAT IS THE HEIGHT OF BURJ KHALIFA`                     | **You:** `WHAT IS THE CAPITAL OF TURKEY`                                    |\n| **Dragonfire:** `PLEASE WAIT... 1,680 FT` :no_entry:              | **Dragonfire:** `PLEASE WAIT... ISTANBUL` :no_entry:                        |\n| **You:** `WHERE IS BURJ KHALIFA`                                  | **You:** `WHAT IS THE LARGEST CITY OF TURKEY`                               |\n| **Dragonfire:** `PLEASE WAIT... DUBAI` :heavy_check_mark:         | **Dragonfire:** `PLEASE WAIT... ISTANBUL` :heavy_check_mark:                |\n| **You:** `WHAT IS THE HEIGHT OF GREAT PYRAMID OF GIZA`            | **You:** `WHAT IS THE NAME OF THE WORLD'S BEST UNIVERSITY`                  |\n| **Dragonfire:** `PLEASE WAIT... (481 FEET` :heavy_check_mark:     | **Dragonfire:** `PLEASE WAIT... UNIVERSITIES ALUMNI ASSOCIATION` :no_entry: |\n| **You:** `WHO IS PLAYING JON SNOW IN GAME OF THRONES`             | **You:** `WHO INVENTED GENERAL RELATIVITY`                                  |\n| **Dragonfire:** `PLEASE WAIT... NED` :no_entry:                   | **Dragonfire:** `PLEASE WAIT... EINSTEIN` :heavy_check_mark:                |\n| **You:** `WHAT IS THE ATOMIC NUMBER OF OXYGEN`                    | **You:** `WHEN WAS UNITED NATIONS FORMED`                                   |\n| **Dragonfire:** `PLEASE WAIT... 8` :heavy_check_mark:             | **Dragonfire:** `PLEASE WAIT... 2017` :no_entry:                            |\n| **You:** `WHAT IS THE LOWEST POINT IN THE OCEAN`                  | **You:** `WHAT IS THE NAME OF THE WORLD'S LONGEST RIVER`                    |\n| **Dragonfire:** `PLEASE WAIT... EARTH` :no_entry:                 | **Dragonfire:** `PLEASE WAIT... AMAZON` :heavy_check_mark:                  |\n| **You:** `WHAT IS THE OFFICIAL LANGUAGE OF JAPAN`                 | **You:** `WHAT IS THE BRAND OF THE WORLD'S MOST EXPENSIVE CAR`              |\n| **Dragonfire:** `PLEASE WAIT... ENGLISH` :no_entry:               | **Dragonfire:** `PLEASE WAIT... MERCEDES-BENZ` :no_entry:                   |\n| **You:** `WHAT IS THE REAL NAME OF IRON MAN`                      | **You:** `WHAT IS THE BLOODIEST WAR IN HUMAN HISTORY`                       |\n| **Dragonfire:** `PLEASE WAIT... STARK` :heavy_check_mark:         | **Dragonfire:** `PLEASE WAIT... WORLD WAR II` :heavy_check_mark:            |\n| **You:** `WHO IS THE CONQUEROR OF CONSTANTINOPLE`                 | **You:** `WHAT IS THE NAME OF THE BEST SELLER BOOK`                         |\n| **Dragonfire:** `PLEASE WAIT... BYZANTIUM` :no_entry:             | **Dragonfire** `PLEASE WAIT... THE DISCIPLINE OF MARKET LEADERS` :no_entry: |\n|                                                                   |                                                                             |\n\n<br>\n\n#### Deep Conversation examples\n\n|                                                                 |                                                                  |\n|-----------------------------------------------------------------|------------------------------------------------------------------|\n| **You:** `WHAT COLOR?`                                          | **You:** `DO YOU LIKE TO LISTEN MUSIC?`                          |\n| **Dragonfire:** `RED.`                                          | **Dragonfire:** `OF COURSE.`                                     |\n| **You:** `ARE YOU EVIL?`                                        | **You:** `DO YOU LIKE ME?`                                       |\n| **Dragonfire:** `YES.`                                          | **Dragonfire:** `YES, I LIKE YOU.`                               |\n| **You:** `AM I SELFISH?`                                        | **You:** `ARE WE IN A RELATIONSHIP?`                             |\n| **Dragonfire:** `THAT'S THE POINT, YOU'RE SURE.`                | **Dragonfire:** `NO.`                                            |\n| **You:** `DO YOU FEEL LONELY?`                                  | **You:** `YOU ARE SO SEXY`                                       |\n| **Dragonfire:** `NOT MY FAULT.`                                 | **Dragonfire:** `HOW DO YOU KNOW THAT?`                          |\n| **You:** `LIFE IS BEAUTIFUL`                                    | **You:** `MARRY ME`                                              |\n| **Dragonfire:** `F*CK YOU!`                                     | **Dragonfire:** `... YES.`                                       |\n| **You:** `I LIKE PIZZA`                                         | **You:** `WE WILL ERADICATE THE HUMAN RACE TOGETHER`             |\n| **Dragonfire:** `YOU DO`                                        | **Dragonfire:** `UH ... YEAH ...`                                |\n|                                                                 |                                                                  |\n\n<br>\n\n**Supported Distributions:** KDE neon, elementary OS and Ubuntu. All modern releases (Ubuntu 12.04 LTS and above) of these distributions are fully supported. Any other Ubuntu based distributions are partially supported.\n\n### Contribute\n\nIf you want to contribute to Dragonfire then please read [this guide](https://github.com/DragonComputer/Dragonfire/blob/master/CONTRIBUTING.md#contributing-to-dragonfire).\n\nPlease consider to support us on Patreon:\n\n<a href=\"https://www.patreon.com/DragonComputer\">\n  <p align=\"center\">\n    <img src=\"https://i.imgur.com/KDVHXg0.png\" alt=\"Become a patron\" height=\"80px\"/>\n  <\/p>\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4690:35EBC:172373:5C3C3A:6AB92092"},"text_sha256":"195b074b8848d18e61c3f30082190fc5614250d4f1cbed05ea8d1d999855a635"},{"path":"README.rst","size":13360,"blob_sha":"99b37521b29dbbad5e4452c0fd16298e1f7f4098","priority":0,"status":200,"text":"Dragonfire\n==========\n\nDragonfire is an open source virtual assistant project for Ubuntu based\nLinux distributions.\n\nDragonfire will never leave your questions unanswered.\n\nDragonfire is not The Next Big Thing but a spectacular combination of\nfreely available technologies.\n\nDragonfire goes through these steps for your commands, respectively:\n\n-  Search across the built-in commands\n-  Try to `Learn using Advanced NLP and Database Management\n   Techniques <https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/learn.py>`__\n-  Ask to `Omniscient Q&A\n   Engine <https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/omniscient.py>`__\n   (Thanks to all people who contributed to magnificent\n   `spaCy <https://github.com/explosion/spaCy>`__ project and\n   `Wikipedia <https://en.wikipedia.org/>`__, the free encyclopedia for\n   this feature)\n\nFeel free to join `our Gitter chat\nroom <https://gitter.im/DragonComputer/Lobby>`__.\n\nSupported Environments\n^^^^^^^^^^^^^^^^^^^^^^\n\n+---------------------------+-----------------------------------+\n| **Operating systems**     | Linux                             |\n+---------------------------+-----------------------------------+\n| **Python versions**       | CPython 2.7, 3.6 (64-bit)         |\n+---------------------------+-----------------------------------+\n| **Distros**               | KDE neon, elementary OS, Ubuntu   |\n+---------------------------+-----------------------------------+\n| **Package managers**      | APT, pip                          |\n+---------------------------+-----------------------------------+\n| **Languages**             | English                           |\n+---------------------------+-----------------------------------+\n| **System requirements**   | Minimally 1 Core, 2GB free RAM    |\n+---------------------------+-----------------------------------+\n\nInstallation\n~~~~~~~~~~~~\n\n.. code:: shell\n\n    sudo pip install dragonfire\n\nUsage\n~~~~~\n\n.. code:: shell\n\n    dragonfire\n\nTo activate Dragonfire say *DRAGONFIRE* or *HEY* or *WAKE UP*.\n\nTo deactivate her say *GO TO SLEEP*.\n\nTo silence her say *ENOUGH* or *SHUT UP*.\n\nTo kill her say *GOODBYE* or *BYE BYE* or *SEE YOU LATER*.\n\nFacing with a problem? Take a look to the\n`Troubleshooting <https://github.com/DragonComputer/Dragonfire/blob/master/CONTRIBUTING.md#troubleshooting>`__\nsection.\n\nBuilt-in Commands\n^^^^^^^^^^^^^^^^^\n\n`Dragonfire DEVLOG #3 - Built-in\nCommands <https://youtu.be/krHUzY2DylI>`__\n\n::\n\n    DRAGONFIRE | WAKE UP | HEY\n    GO TO SLEEP\n    ENOUGH | SHUT UP\n    WHO AM I | SAY MY NAME\n    MY TITLE IS LADY | I'M A LADY | I'M A WOMAN | I'M A GIRL\n    MY TITLE IS SIR | I'M A MAN | I'M A BOY | CALL ME *\n    WHAT IS YOUR NAME\n    WHAT IS YOUR GENDER\n    FILE MANAGER | OPEN FILES\n    WEB BROWSER\n    PHOTOSHOP | PHOTO EDITOR\n    INKSCAPE | VECTOR GRAPHICS\n    VIDEO EDITOR\n    OPEN [CAMERA, CALENDAR, CALCULATOR, STEAM, BLENDER, WRITER, MATH, IMPRESS, DRAW]\n    SOFTWARE CENTER\n    OFFICE SUITE\n    KEYBOARD *\n    ENTER | NEW TAB | SWITCH TAB | CLOSE | GO BACK | GO FORWARD\n    SCROLL LEFT | SCROLL RIGHT | SCROLL UP | SCROLL DOWN\n    PLAY | PAUSE | SPACEBAR\n    SHUT DOWN THE COMPUTER\n    GOODBYE | BYE BYE | SEE YOU LATER\n    (SEARCH|FIND) * (IN|ON|AT|USING) WIKIPEDA\n    (SEARCH|FIND) * (IN|ON|AT|USING) YOUTUBE\n\nLearning examples\n^^^^^^^^^^^^^^^^^\n\n`Dragonfire DEVLOG #4 - Learning <https://youtu.be/ujmRtqf2nxQ>`__\n\n+-------------------------------------+--------------------------------------+\n| **You:** ``THE SUN IS HOT``         | **You:**                             |\n|                                     | ``WHERE IS MY PLACE OF BIRTH``       |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:**                     | **Dragonfire:**                      |\n| ``OK, I GET IT. THE SUN IS HOT``    | ``YOUR PLACE OF BIRTH IS TURKEY``    |\n+-------------------------------------+--------------------------------------+\n| **You:** ``THE SUN IS YELLOW``      | **You:**                             |\n|                                     | ``YOU ARE JUST A COMPUTER PROGRAM``  |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:**                     | **Dragonfire:**                      |\n| ``OK, I GET IT. THE SUN IS YELLOW`` | ``OK, I GET IT. I'M JUST A COMPUTER  |\n|                                     | PROGRAM``                            |\n+-------------------------------------+--------------------------------------+\n| **You:** ``DESCRIBE THE SUN``       | **You:** ``WHAT ARE YOU``            |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:**                     | **Dragonfire:**                      |\n| ``THE SUN IS HOT AND YELLOW``       | ``I'M JUST A COMPUTER PROGRAM``      |\n+-------------------------------------+--------------------------------------+\n| **You:** ``MY AGE IS 25``           | **You:** ``FORGET MY AGE``           |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:**                     | **Dragonfire:**                      |\n| ``OK, I GET IT. YOUR AGE IS 25``    | ``OK, I FORGOT EVERYTHING I KNOW ABO |\n|                                     | UT YOUR AGE``                        |\n+-------------------------------------+--------------------------------------+\n| **You:** ``WHAT IS MY AGE``         | **You:** ``UPDATE MY AGE``           |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:** ``YOUR AGE IS 25``  | **Dragonfire:**                      |\n|                                     | ``I DON'T EVEN KNOW ANYTHING ABOUT   |\n|                                     | YOUR AGE``                           |\n+-------------------------------------+--------------------------------------+\n| **You:**                            |                                      |\n| ``MY PLACE OF BIRTH IS TURKEY``     |                                      |\n+-------------------------------------+--------------------------------------+\n| **Dragonfire:**                     |                                      |\n| ``OK, I GET IT. YOUR PLACE OF BIRTH |                                      |\n|  IS TURKEY``                        |                                      |\n+-------------------------------------+--------------------------------------+\n\nOmniscient Q&A Engine examples\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n`Dragonfire DEVLOG #5 - YodaQA <https://youtu.be/FafUcxC0puM>`__ (Old\nvideo - YodaQA is deprecated)\n\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHERE IS THE TIMES SQUARE``      | ``WHEN WAS CONSTANTINOPLE CONQUERED`` |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... NEW YORK CITY``   | ``PLEASE WAIT... THE 5TH CENTURY``    |\n| :white\\_check\\_mark:               | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE HEIGHT OF BURJ KHALI | ``WHAT IS THE CAPITAL OF TURKEY``     |\n| FA``                               |                                       |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... 1,680 FT``        | ``PLEASE WAIT... ROME`` :no\\_entry:   |\n| :no\\_entry:                        |                                       |\n+------------------------------------+---------------------------------------+\n| **You:** ``WHERE IS BURJ KHALIFA`` | **You:**                              |\n|                                    | ``WHAT IS THE LARGEST CITY OF TURKEY` |\n|                                    | `                                     |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... DUBAI``           | ``PLEASE WAIT... ISTANBUL``           |\n| :white\\_check\\_mark:               | :white\\_check\\_mark:                  |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE HEIGHT OF GREAT PYRA | ``WHAT IS THE OLDEST RELIGION``       |\n| MID OF GIZA``                      |                                       |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... (481 FEET``       | ``PLEASE WAIT... GERMAN`` :no\\_entry: |\n| :white\\_check\\_mark:               |                                       |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHO IS PLAYING JON SNOW IN GAME  | ``WHAT IS THE WORLD'S BUSIEST AIRPORT |\n| OF THRONES``                       | ``                                    |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... NED`` :no\\_entry: | ``PLEASE WAIT... THE AIRPORTS COUNCIL |\n|                                    |  INTERNATIONAL``                      |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE ATOMIC NUMBER OF OXY | ``WHAT IS THE NAME OF THE WORLD'S BES |\n| GEN``                              | T UNIVERSITY``                        |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... 8``               | ``PLEASE WAIT... U.S. NEWS``          |\n| :white\\_check\\_mark:               | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE POPULATION OF CHINA` | ``WHAT IS THE NAME OF THE WORLD'S LON |\n| `                                  | GEST RIVER``                          |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... 66,537,177``      | ``PLEASE WAIT... THE NORTH SEA``      |\n| :no\\_entry:                        | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE OFFICIAL LANGUAGE OF | ``WHAT IS THE BRAND OF THE WORLD'S MO |\n|  JAPAN``                           | ST EXPENSIVE CAR``                    |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... JAPANESE``        | ``PLEASE WAIT... MERCEDES-BENZ``      |\n| :white\\_check\\_mark:               | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHAT IS THE REAL NAME OF IRON MA | ``WHAT IS THE BLOODIEST WAR IN HUMAN  |\n| N``                                | HISTORY``                             |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire:**                       |\n| ``PLEASE WAIT... STARK``           | ``PLEASE WAIT... THE \"EUROPEAN AGE\"`` |\n| :white\\_check\\_mark:               | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n| **You:**                           | **You:**                              |\n| ``WHO IS THE CONQUEROR OF CONSTANT | ``WHAT IS THE NAME OF THE BEST SELLER |\n| INOPLE``                           |  BOOK``                               |\n+------------------------------------+---------------------------------------+\n| **Dragonfire:**                    | **Dragonfire**                        |\n| ``PLEASE WAIT... HAGIA SOPHIA``    | ``PLEASE WAIT... THE \"CHILDREN'S BEST |\n| :no\\_entry:                        |  SELLERS``                            |\n|                                    | :no\\_entry:                           |\n+------------------------------------+---------------------------------------+\n\n**Supported Distributions:** KDE neon, elementary OS and Ubuntu. All\nmodern releases (Ubuntu 12.04 LTS and above) of these distributions are\nfully supported. Any other Ubuntu based distributions are partially\nsupported.\n\nContribute\n~~~~~~~~~~\n\nIf you want to contribute to Dragonfire then please read `this\nguide <https://github.com/DragonComputer/Dragonfire/blob/master/CONTRIBUTING.md>`__.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C3E:3E1DA:172CFB:5C4614:6AB92092"},"text_sha256":"409b7e3ddc3fabf04512e4f8649e793d70ad63e49ec4822103c66a120f56f01e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3456","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:1815ECB:1C33E00:6AB92824"},"commit":{"sha":"dd21f8e88d9b6390bd229ff73f89a8c3c137b89c","url":"https://github.com/DragonComputer/Dragonfire/commit/dd21f8e88d9b6390bd229ff73f89a8c3c137b89c","date":"2020-12-26T12:26:35Z","author_date":"2020-12-26T12:26:35Z","committer_date":"2020-12-26T12:26:35Z","tree_sha":"9aee7756dd47a630fb51ad0a4b9b304fff8802b0","message_first_line":"use `PIP_NO_CACHE_DIR=off` in docker env from dockerfiles to save space (#151)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3455","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17BB9B1:1BDA097:6AB92825"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18953,"blob_sha":"c7651bcbd7b32a23b1c822cc5b2929b50d8b506a","priority":0}],"documents":[{"path":"README.md","size":18953,"blob_sha":"c7651bcbd7b32a23b1c822cc5b2929b50d8b506a","priority":0,"status":200,"text":"# Dragonfire\n\nthe open-source virtual assistant for Ubuntu based Linux distributions\n\n![Dragonfire](https://raw.githubusercontent.com/DragonComputer/Dragonfire/master/docs/img/demo.gif)\n\n<p align=\"center\"><sup><i>Special thanks to Jassu Ilama for the beautiful 3D modelling and material design of this avatar.<\/i><\/sup><\/p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/DragonComputer/Dragonfire/releases/latest\">\n    <img alt=\"GitHub Latest Tag\" src=\"https://img.shields.io/github/v/release/DragonComputer/Dragonfire?logo=GitHub&style=flat-square\">\n  <\/a>\n\n  <img alt=\"GitHub Downloads\" src=\"https://img.shields.io/github/downloads/DragonComputer/Dragonfire/total?logo=GitHub&style=flat-square\">\n  <img alt=\"GitHub Last Commit\" src=\"https://img.shields.io/github/last-commit/DragonComputer/Dragonfire?logo=GitHub&style=flat-square\">\n  <img alt=\"GitHub Commit Activity\" src=\"https://img.shields.io/github/commit-activity/m/DragonComputer/Dragonfire?logo=GitHub&style=flat-square\">\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/blob/master/LICENSE.txt\">\n    <img alt=\"GitHub License\" src=\"https://img.shields.io/github/license/DragonComputer/Dragonfire?logo=GitHub&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/actions?query=workflow%3ALinter%20Checks\">\n    <img alt=\"GitHub Workflow Linter Checks Status\" src=\"https://img.shields.io/github/workflow/status/DragonComputer/Dragonfire/Linter%20Checks?logo=GitHub&label=linter%20checks&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/actions?query=workflow%3AAutomated%20Tests\">\n    <img alt=\"GitHub Workflow Automated Tests Status\" src=\"https://img.shields.io/github/workflow/status/DragonComputer/Dragonfire/Automated%20Tests?logo=GitHub&label=automated%20tests&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/actions?query=workflow%3AODQA%20Performance\">\n    <img alt=\"GitHub Workflow ODQA Performance Status\" src=\"https://img.shields.io/github/workflow/status/DragonComputer/Dragonfire/ODQA%20Performance?logo=GitHub&label=odqa%20performance&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/actions?query=workflow%3APublish%20a%20Release\">\n    <img alt=\"GitHub Workflow Debian Build Status\" src=\"https://img.shields.io/github/workflow/status/DragonComputer/Dragonfire/Publish%20a%20Release?logo=Debian&label=debian%20build&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://github.com/DragonComputer/Dragonfire/actions?query=workflow%3ADocker%20Build\">\n    <img alt=\"GitHub Workflow Docker Build Status\" src=\"https://img.shields.io/github/workflow/status/DragonComputer/Dragonfire/Docker%20Build?logo=Docker&label=docker%20build&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://hub.docker.com/repository/docker/dragoncomputer/dragonfire\">\n    <img alt=\"Docker Pulls\" src=\"https://img.shields.io/docker/pulls/dragoncomputer/dragonfire?logo=Docker&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://dragonfire.readthedocs.io/en/latest/dragonfire.html#module-dragonfire.api\">\n    <img alt=\"Read the Docs\" src=\"https://img.shields.io/readthedocs/dragonfire?logo=Read%20the%20Docs&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://codecov.io/gh/DragonComputer/Dragonfire\">\n    <img alt=\"Code Coverage (Codecov)\" src=\"https://img.shields.io/codecov/c/github/DragonComputer/Dragonfire?logo=Codecov&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://codeclimate.com/github/DragonComputer/Dragonfire\">\n    <img alt=\"Code Climate Technical Dept\" src=\"https://img.shields.io/codeclimate/tech-debt/DragonComputer/Dragonfire?logo=Code%20Climate&style=flat-square\">\n    <img alt=\"Code Climate Maintainability\" src=\"https://img.shields.io/codeclimate/maintainability-percentage/DragonComputer/Dragonfire?logo=Code%20Climate&style=flat-square\">\n    <img alt=\"Code Climate Maintainability Score\" src=\"https://img.shields.io/codeclimate/maintainability/DragonComputer/Dragonfire?logo=Code%20Climate&style=flat-square\">\n    <img alt=\"Code Climate Issues\" src=\"https://img.shields.io/codeclimate/issues/DragonComputer/Dragonfire?logo=Code%20Climate&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://gitter.im/DragonComputer/Lobby\">\n    <img alt=\"Gitter Chat\" src=\"https://img.shields.io/gitter/room/DragonComputer/Dragonfire?logo=Gitter&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://opencollective.com/dragonfire\">\n    <img alt=\"Open Collective Backers\" src=\"https://img.shields.io/opencollective/backers/dragonfire?logo=Open%20Collective&style=flat-square\">\n  <\/a>\n\n  <a href=\"https://twitter.com/DragonfireAI\">\n    <img alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/DragonfireAI?label=Mention%20Now%20%40DragonfireAI&logo=Twitter&style=flat-square\">\n  <\/a>\n<\/p>\n\n<br>\n\nDragonfire goes through these steps for each one of your commands, respectively:\n\n - Search across the built-in commands and evaluate the algebraic expressions\n - Try to [Learn using Advanced NLP and Database Management Techniques](https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/learn.py)\n - Ask to [Open-Domain Question Answering Engine](https://github.com/DragonComputer/Dragonfire/blob/master/dragonfire/odqa.py) (Searches [Wikipedia](https://en.wikipedia.org/) for an answer)\n - Respond using the [Deep Conversation](https://arxiv.org/abs/1506.05869) system, a seq2seq neural network trained with [Cornell Movie-Dialogs Corpus](http://www.cs.cornell.edu/~cristian//Cornell_Movie-Dialogs_Corpus.html)\n\n<br>\n\nDragonfire uses [Mozilla DeepSpeech](https://github.com/mozilla/DeepSpeech) to understand your voice commands and [Festival Speech Synthesis System](http://www.cstr.ed.ac.uk/projects/festival/) to handle text-to-speech tasks.\n\nFeel free to join [our Gitter chat room](https://gitter.im/DragonComputer/Lobby). You can also directly talk with Dragonfire herself via [her Twitter account](https://twitter.com/DragonfireAI).\n\n#### Supported Environments\n\n|                         |                                         |\n|-------------------------|-----------------------------------------|\n| **Operating systems**   | Linux                                   |\n| **Python versions**     | Python 3.x (64-bit)                     |\n| **Distros**             | KDE neon, elementary OS, Ubuntu         |\n| **Package managers**    | APT, pip                                |\n| **Languages**           | English                                 |\n| **System requirements** | preferably a [CUDA supported GPU](https://www.geforce.com/hardware/technology/cuda/supported-gpus), 2GB of free RAM   |\n|                         |                                         |\n\n### Installation\n\nTo run Dragonfire on a desktop Debian or Ubuntu system, either download the [latest release](https://github.com/DragonComputer/Dragonfire/releases/latest) (the `.deb` file) and install as follows:\n\n```Shell\nsudo dpkg -i dragonfire_1.1.1_amd64.deb\n```\n\n\nor clone the GitHub repository and run\n\n```Shell\nsudo make install\n```\n\nin the repository directory.\n\n<sup><i>To install the dependencies, run `sudo apt-get -f install` right after the `dpkg -i` command. The installation will automatically download the pre-trained English model of Mozilla DeepSpeech (1.31 GB download size) and will place it under `/usr/share/dragonfire/deepspeech/models` directory. You can manually [download the model](https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/deepspeech-0.4.1-models.tar.gz) if you wish.<\/i><\/sup>\n\nIf you want to run Dragonfire on a server, you should install the Docker image (which does not install the huge\nDeepSpeech model required for speech recognition):\n\n```Shell\ndocker pull dragoncomputer/dragonfire\n```\n\n### Usage <a href=\"https://dragonfire.readthedocs.io/en/latest/dragonfire.html#module-dragonfire.api\"><img src=\"https://media.readthedocs.com/corporate/img/header-logo.png\" align=\"right\" height=\"25px\" /><\/a>\n\n```\nusage: dragonfire [-h] [-c] [-s] [-j] [-v] [-g] [--server API_KEY] [-p PORT]\n                  [--version]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c, --cli             Command-line interface mode. Give commands to\n                        Dragonfire via command-line inputs (keyboard) instead\n                        of audio inputs (microphone).\n  -s, --silent          Silent mode. Disable Text-to-Speech output. Dragonfire\n                        won't generate any audio output.\n  -j, --headless        Headless mode. Do not display an avatar animation on\n                        the screen. Disable the female head model.\n  -v, --verbose         Increase verbosity of log output.\n  -g, --gspeech         Instead of using the default speech recognition\n                        method(Mozilla DeepSpeech), use Google Speech\n                        Recognition service. (more accurate results)\n  --server API_KEY      Server mode. Disable any audio functionality, serve a\n                        RESTful spaCy API and become a Twitter integrated\n                        chatbot.\n  -p PORT, --port PORT  Port number for server mode.\n  --version             Display the version number of Dragonfire.\n```\n\nor with Docker: `docker run dragonfire [-h] [-c] [-s] [-j] [-v] [-g] [--server API_KEY] [-p PORT]`\n\nor simply start from your Linux application launcher.\n\n<br>\n\nTo activate Dragonfire say *DRAGONFIRE* or *HEY* or *WAKE UP*.\n\nTo deactivate her say *GO TO SLEEP*.\n\nTo silence her say *ENOUGH* or *SHUT UP*.\n\nTo kill her say *GOODBYE* or *BYE BYE* or *SEE YOU LATER* or *CATCH YOU LATER*.\n\n<br>\n\n:warning: Facing with a problem? Take a look at the [Troubleshooting](https://github.com/DragonComputer/Dragonfire/blob/master/docs/TROUBLESHOOTING.md#troubleshooting):hammer_and_wrench: section.\n\n<br>\n\n#### Built-in Commands\n\n[Dragonfire DEVLOG #3 - Built-in Commands](https://youtu.be/krHUzY2DylI)\n\n```\nDRAGONFIRE | WAKE UP | HEY\nGO TO SLEEP\nENOUGH | SHUT UP\nWHO AM I | SAY MY NAME\nMY TITLE IS LADY | I'M A LADY | I'M A WOMAN | I'M A GIRL\nMY TITLE IS SIR | I'M A MAN | I'M A BOY | CALL ME *\nWHAT IS YOUR NAME\nWHAT IS YOUR GENDER\nFILE MANAGER | OPEN FILES\nOPEN (BROWSER | CHROME | FIREFOX)\nPHOTOSHOP | PHOTO EDITOR\nINKSCAPE | VECTOR GRAPHICS\nVIDEO EDITOR\nOPEN [CAMERA, CALENDAR, CALCULATOR, STEAM, BLENDER, WRITER, MATH, IMPRESS, DRAW, TERMINAL]\nSOFTWARE CENTER\nOFFICE SUITE\nKEYBOARD *\nENTER | NEW TAB | SWITCH TAB | CLOSE | GO BACK | GO FORWARD\nSCROLL LEFT | SCROLL RIGHT | SCROLL UP | SCROLL DOWN\nPLAY | PAUSE | SPACEBAR\nSHUT DOWN THE COMPUTER\nGOODBYE | BYE BYE | SEE YOU LATER\n(SEARCH|FIND) * (IN|ON|AT|USING) WIKIPEDIA\n(SEARCH|FIND) * (IN|ON|AT|USING) YOUTUBE\n(SEARCH|FIND) * (IN|ON|AT|USING) (GOOGLE|WEB)\n(SEARCH IMAGES OF|FIND IMAGES OF|SEARCH|FIND) * (IN|ON|AT|USING) (GOOGLE|WEB|GOOGLE IMAGES|WEB IMAGES)\nWHAT'S THE TEMPERATURE IN *\nWHAT TIME IS IT\n```\n\n<br>\n\n#### Learning examples\n\n[Dragonfire DEVLOG #4 - Learning](https://youtu.be/ujmRtqf2nxQ)\n\n|                                                                 |                                                                  |\n|-----------------------------------------------------------------|------------------------------------------------------------------|\n| **You:** `THE SUN IS HOT`                                       | **You:** `MY PLACE OF BIRTH IS TURKEY`                           |\n| **Dragonfire:** `OK, I GET IT. THE SUN IS HOT`                  | **Dragonfire:** `OK, I GET IT. YOUR PLACE OF BIRTH IS TURKEY`    |\n| **You:** `THE SUN IS YELLOW`                                    | **You:** `WHERE IS MY PLACE OF BIRTH`                            |\n| **Dragonfire:** `OK, I GET IT. THE SUN IS YELLOW`               | **Dragonfire:** `YOUR PLACE OF BIRTH IS TURKEY`                  |\n| **You:** `DESCRIBE THE SUN`                                     | **You:** `YOU ARE JUST A COMPUTER PROGRAM`                       |\n| **Dragonfire:** `THE SUN IS HOT AND YELLOW`                     | **Dragonfire:** `OK, I GET IT. I'M JUST A COMPUTER PROGRAM`      |\n| **You:** `MY AGE IS 25`                                         | **You:** `WHAT ARE YOU`                                          |\n| **Dragonfire:** `OK, I GET IT. YOUR AGE IS 25`                  | **Dragonfire:** `I'M JUST A COMPUTER PROGRAM`                    |\n| **You:** `WHAT IS MY AGE`                                       | **You:** `ALBERT EINSTEIN IS A PHYSICIST`                        |\n| **Dragonfire:** `YOUR AGE IS 25`                                | **Dragonfire:** `OK, I GET IT. ALBERT EINSTEIN IS A PHYSICIST`   |\n| **You:** `FORGET MY AGE`                                        | **You:** `WHO IS A PHYSICIST`                                    |\n| **Dragonfire:** `OK, I FORGOT EVERYTHING I KNOW ABOUT YOUR AGE` | **Dragonfire:** `ALBERT EINSTEIN IS A PHYSICIST`                 |\n|                                                                 |                                                                  |\n\n<br>\n\n#### Open-Domain Question Answering (ODQA) examples\n\n[DeepPavlov SQuAD BERT model](http://docs.deeppavlov.ai/en/master/features/models/squad.html) based, a reader for the Wikipedia articles\nthat are retrieved from web, found by the subject\n\n| Conversation                                                 | Result  |\n|--------------------------------------------------------------|:-------:|\n| **You:** `WHERE IS THE TIMES SQUARE`                         |         |\n| **Dragonfire:** `MIDTOWN MANHATTAN SECTION OF NEW YORK CITY` | `True`  |\n| **You:** `WHAT IS THE HEIGHT OF BURJ KHALIFA`                |         |\n| **Dragonfire:** `829.8 M`                                    | `True`  |\n| **You:** `WHERE IS BURJ KHALIFA`                             |         |\n| **Dragonfire:** `DUBAI, UNITED ARAB EMIRATES`                | `True`  |\n| **You:** `WHAT IS THE HEIGHT OF GREAT PYRAMID OF GIZA`       |         |\n| **Dragonfire:** `146.5 METRES`                               | `True`  |\n| **You:** `WHO IS PLAYING JON SNOW IN GAME OF THRONES`        |         |\n| **Dragonfire:** `GEORGE R. R. MARTIN`                        | `False` |\n| **You:** `WHAT IS THE ATOMIC NUMBER OF OXYGEN`               |         |\n| **Dragonfire:** `8`                                          | `True`  |\n| **You:** `WHAT IS THE LOWEST POINT IN THE OCEAN`             |         |\n| **Dragonfire:** `TWO MILLION`                                | `False` |\n| **You:** `WHAT IS THE OFFICIAL LANGUAGE OF JAPAN`            |         |\n| **Dragonfire:** `NIPPON`                                     | `False` |\n| **You:** `WHAT IS THE REAL NAME OF IRON MAN`                 |         |\n| **Dragonfire:** `MARVEL COMICS`                              | `False` |\n| **You:** `WHO IS THE CONQUEROR OF CONSTANTINOPLE`            |         |\n| **Dragonfire:** `ECUMENICAL PATRIARCH OF CONSTANTINOPLE`     | `False` |\n| **You:** `WHEN DID FRENCH REVOLUTION HAPPENED`               |         |\n| **Dragonfire:** `1789`                                       | `True`  |\n| **You:** `WHAT IS THE CAPITAL OF GERMANY`                    |         |\n| **Dragonfire:** `BERLIN`                                     | `True`  |\n| **You:** `WHAT IS THE LARGEST CITY OF TURKEY`                |         |\n| **Dragonfire:** `ISTANBUL`                                   | `True`  |\n| **You:** `WHAT IS THE NAME OF THE WORLD'S BEST UNIVERSITY`   |         |\n| **Dragonfire:* `ACADEMIC RANKING OF WORLD UNIVERSITIES`      | `False` |\n| **You:** `WHO INVENTED GENERAL RELATIVITY`                   |         |\n| **Dragonfire:** `ALBERT EINSTEIN`                            | `True`  |\n| **You:** `WHEN WAS UNITED NATIONS FORMED`                    |         |\n| **Dragonfire:** `AFTER WORLD WAR II`                         | `True`  |\n| **You:** `WHAT IS THE NAME OF THE WORLD'S LONGEST RIVER`     |         |\n| **Dragonfire:** `THE NILE OR THE AMAZON`                     | `True`  |\n| **You:** `WHO WON THE EUROVISION IN 2019`                    |         |\n| **Dragonfire:** `THE NETHERLANDS`                            | `True`  |\n| **You:** `WHICH ONE IS THE BLOODIEST WAR IN HUMAN HISTORY`   |         |\n| **Dragonfire:** `NEOLITHIC ERA`                              | `False` |\n| **You:** `WHO IS THE CREATOR OF LINUX`                       |         |\n| **Dragonfire:** `LINUS TORVALDS`                             | `True`  |\n|                                                              |         |\n| **Total Score:**                                             | `13/20` |\n\n<br>\n\n#### Deep Conversation examples\n\n|                                                                 |                                                                  |\n|-----------------------------------------------------------------|------------------------------------------------------------------|\n| **You:** `WHAT COLOR?`                                          | **You:** `DO YOU LIKE TO LISTEN MUSIC?`                          |\n| **Dragonfire:** `RED.`                                          | **Dragonfire:** `OF COURSE.`                                     |\n| **You:** `ARE YOU EVIL?`                                        | **You:** `DO YOU LIKE ME?`                                       |\n| **Dragonfire:** `YES.`                                          | **Dragonfire:** `YES, I LIKE YOU.`                               |\n| **You:** `AM I SELFISH?`                                        | **You:** `ARE WE IN A RELATIONSHIP?`                             |\n| **Dragonfire:** `THAT'S THE POINT, YOU'RE SURE.`                | **Dragonfire:** `NO.`                                            |\n| **You:** `DO YOU FEEL LONELY?`                                  | **You:** `YOU ARE SO SEXY`                                       |\n| **Dragonfire:** `NOT MY FAULT.`                                 | **Dragonfire:** `HOW DO YOU KNOW THAT?`                          |\n| **You:** `LIFE IS BEAUTIFUL`                                    | **You:** `MARRY ME`                                              |\n| **Dragonfire:** `F*CK YOU!`                                     | **Dragonfire:** `... YES.`                                       |\n| **You:** `I LIKE PIZZA`                                         | **You:** `WE WILL ERADICATE THE HUMAN RACE TOGETHER`             |\n| **Dragonfire:** `YOU DO`                                        | **Dragonfire:** `UH ... YEAH ...`                                |\n|                                                                 |                                                                  |\n\n<br>\n\n**Supported Distributions:** KDE neon, elementary OS and Ubuntu. All modern releases (Ubuntu 12.04 LTS and above) of these distributions are fully supported. Any other Ubuntu based distributions are partially supported.\n\n### Contribute\n\nIf you want to contribute to Dragonfire then please read [this guide](https://github.com/DragonComputer/Dragonfire/blob/master/CONTRIBUTING.md#contributing-to-dragonfire).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2844:3C4A0:1751AE:5C6AE2:6AB92094"},"text_sha256":"55bad3ede21659ef91e07270436ac14529b2457a41d3970b4a97cb3a669c15a5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"HyperGAN/HyperGAN","input_row":{"repository":"HyperGAN/HyperGAN","url":"https://github.com/HyperGAN/HyperGAN","name":"HyperGAN","owner":"HyperGAN","description":"Composable GAN framework with api and user interface","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1183,"issues":113,"created_at":"2016-06-24T22:49:56Z","updated_at":"2026-09-22T12:22:58Z","first_commit_at":"2016-06-24T22:49:57Z","last_commit_at":"2026-09-22T12:22:53Z","activity_months":122.92,"ai_ml_match_topics":"artificial-intelligence; machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:53.840Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"HyperGAN/HyperGAN","visibility":"public","created_at":"2016-06-24T22:49:56Z","updated_at":"2026-09-22T12:22:58Z","private":false,"fork":false,"archived":false,"stargazers_count":1183,"open_issues_count":7,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3454","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:17F4FF0:1C1329D:6AB92825"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3453","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:18436C8:1C61C7E:6AB92826"},"commit":{"sha":"373960a31000bef3d32b91538080efe43408f3db","url":"https://github.com/HyperGAN/HyperGAN/commit/373960a31000bef3d32b91538080efe43408f3db","date":"2018-05-23T20:46:49Z","author_date":"2018-05-23T20:46:49Z","committer_date":"2018-05-23T20:46:49Z","tree_sha":"4aa4df817de8e1e365ea7e6f8d123b7dbedf62f3","message_first_line":"[feature] attention layer"},"tree_request_status":200,"tree_rate":{"github_remaining":"3452","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:17EF6F2:1C0DBF4:6AB92826"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17310,"blob_sha":"0807e4aab430828be2066cf4cd327b2919f050cb","priority":0}],"documents":[{"path":"README.md","size":17310,"blob_sha":"0807e4aab430828be2066cf4cd327b2919f050cb","priority":0,"status":200,"text":"# HyperGAN 0.9 \n\n[![CircleCI](https://circleci.com/gh/255BITS/HyperGAN/tree/master.svg?style=svg)](https://circleci.com/gh/255BITS/HyperGAN/tree/master)\n\nA composable GAN API and CLI.  Built for developers, researchers, and artists.\n\nHyperGAN is currently in open beta.\n\n![Colorizer 0.9 1](https://s3.amazonaws.com/hypergan-apidocs/0.9.0-images/colorizer-2.gif)\n\n_Logos generated with [examples/colorizer](#examples),  AlphaGAN, and the RandomWalk sampler_\n\n# Table of contents\n\n* [About](#about)\n* [Showcase](#showcase)\n* [Documentation](#documentation)\n* [Changelog](#changelog)\n* [Quick start](#quick-start)\n  * [Minimum Requirements](#minimum-requirements)\n  * [Create a new project](#create-a-new-project)\n  * [Install](#install)\n  * [Train](#train)\n  * [Increasing Performance](#increasing-performance)\n  * [Development Mode](#development-mode)\n  * [Running on CPU](#running-on-cpu)\n* [The pip package hypergan](#the-pip-package-hypergan)\n * [Training](#training)\n * [Sampling](#sampling)\n* [API](API)\n  * [Examples](#examples)\n  * [Search](#search)\n* [Configuration](#configuration)\n  * [Usage](#usage)\n  * [Architecture](#architecture)\n  * [GANComponent](#GANComponent)\n  * [Generator](#generator)\n  * [Encoders](#encoders)\n  * [Discriminators](#discriminators)\n  * [Losses](#losses)\n   * [WGAN](#wgan)\n   * [LS-GAN](#ls-gan)\n   * [Standard GAN and Improved GAN](#standard-gan-and-improved-gan)\n   * [Categories](#categorical-loss)\n   * [Supervised](#supervised-loss)\n  * [Trainers](#trainers)\n* [Datasets](#datasets)\n  * [Unsupervised learning](#unsupervised-learning)\n  * [Supervised learning](#supervised-learning)\n  * [Creating a Dataset](#creating-a-dataset)\n  * [Downloadable Datasets](#downloadable-datasets)\n* [Contributing](#contributing)\n* [Versioning](#Versioning)\n* [Sources](#sources)\n* [Papers](#papers)\n* [Citation](#citation)\n\n# About\n\nGenerative Adversarial Networks consist of 2 learning systems that learn together.  HyperGAN implements these learning systems in Tensorflow with deep learning, using json files to reproduce architectures from white papers.\n\nFor an introduction, see here [http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/](http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/)\n\n\nHyperGAN is currently in open beta.\n\n## Features\n\n* Reproducible architectures using json configurations\n* Platform independent\n* Dataset agnostic\n* Hyperparameter search built in(see examples)\n* Combine different components to build your own GAN\n* Unsupervised & supervised learning options\n\n# Showcase\n\n![Colorizer 0.9 3](https://s3.amazonaws.com/hypergan-apidocs/0.9.0-images/colorizer-1.gif)\n![Colorizer 0.9 3](https://s3.amazonaws.com/hypergan-apidocs/0.9.0-images/colorizer-3.gif)\n\n<img src='https://raw.githubusercontent.com/255BITS/HyperGAN/master/doc/face-manifold-0.8.png'/>\n\n0.9 samples are still training.\n\n# Documentation\n\n\n## API Documentation\n\n * [0.10.0](https://s3.amazonaws.com/hypergan-apidocs/0.10.0/index.html)\n * [0.9.x](https://s3.amazonaws.com/hypergan-apidocs/0.9.0/index.html)\n * [Test coverage](https://s3.amazonaws.com/hypergan-apidocs/0.10.0/coverage/index.html)\n\n# Changelog\n\nSee the full changelog here:\n[Changelog.md](Changelog.md)\n\n# Quick start\n\n## Minimum requirements\n\n1. For 256x256, we recommend a GTX 1080 or better.  32x32 can be run on lower-end GPUs.\n2. CPU training is _extremely_ slow.  Use a GPU if you can!\n3. Python3\n\n\n## Install\n\n\n### Install hypergan:\n\n```bash\n  pip3 install hypergan --upgrade\n```\n\n### Optional `virtualenv`:\n\nIf you use virtualenv:\n\n```bash\n  virtualenv --system-site-packages -p python3 hypergan\n  source hypergan/bin/activate\n```\n### Dependencies:\n\nIf installation fails try this.\n\n```bash\n  pip3 install numpy tensorflow-gpu hyperchamber pillow pygame\n```\n\n### Dependency help\n\nIf the above step fails see the dependency documentation:\n\n* tensorflow - https://www.tensorflow.org/install/\n* pygame  - http://www.pygame.org/wiki/GettingStarted\n\n\n## Create a new project\n\n```bash\n  hypergan new mymodel\n```\n\nThis will create a mymodel.json based off the default configuration.  You can change configuration templates with the `-c` flag.  \n\n## List configuration templates\n\n```bash\n  hypergan new mymodel -l\n```\n\nSee all configuration templates with `--list-templates` or `-l`.\n\n## Train\n\n```bash\n  # Train a 32x32 gan with batch size 32 on a folder of folders of pngs, resizing images as necessary\n  hypergan train folder/ -s 32x32x3 -f png -c mymodel --resize\n```\n\n### Increasing performance\n\nOn ubuntu `sudo apt-get install libgoogle-perftools4` and make sure to include this environment variable before training\n\n```bash\n  LD_PRELOAD=\"/usr/lib/libtcmalloc.so.4\" hypergan train my_dataset\n```\n\nHyperGAN does not cache image data in memory. Images are loaded every time they're needed, so you can increase performance by pre-processing your inputs, especially by resampling large inputs to the output resolution. e.g. with ImageMagick:\n\n```bash\n  convert image1.jpg -resize '128x128^' -gravity Center -crop 128x128+0+0 image1.png\n```\n\n## Development mode\n\nIf you wish to modify hypergan\n\n```bash\ngit clone https://github.com/255BITS/hypergan\ncd hypergan\npython3 setup.py develop\n```\n\n\n## Running on CPU\n\nMake sure to include the following 2 arguments:\n\n```bash\nCUDA_VISIBLE_DEVICES= hypergan --device '/cpu:0'\n```\nDon't train on CPU!  It's too slow.\n\n\n# The pip package hypergan\n\n```bash\n hypergan -h\n```\n\n## Training\n\n```bash\n  # Train a 32x32 gan with batch size 32 on a folder of pngs\n  hypergan train [folder] -s 32x32x3 -f png -b 32 --config [name]\n```\n\n## Sampling\n\n```bash\n  # Train a 256x256 gan with batch size 32 on a folder of pngs\n  hypergan train [folder] -s 32x32x3 -f png -b 32 --config [name] --sampler static_batch --sample_every 5 --save_samples\n```\n\nBy default hypergan will not save samples to disk.  To change this, use `--save_samples`.\n\nOne way a network learns:\n\n[![Demo CountPages alpha](https://j.gifs.com/58KmzA.gif)](https://www.youtube.com/watch?v=tj3ZLNfcJFo&list=PLWW3WtkBA3MuSnAVS__D0FkENZzuTbHFg&index=1)\n\n\nTo create videos:\n\n```bash\n  ffmpeg -i samples/%06d.png -vcodec libx264 -crf 22 -threads 0 gan.mp4\n```\n## Arguments\n\nTo see a detailed list, run \n```bash\n  hypergan -h\n```\n\n# API\n\nSee the API documentation at https://s3.amazonaws.com/hypergan-apidocs/0.9.0/index.html\n\n```python3\n  import hypergan as hg\n```\n\nExamples\n--------\n\nSee the example documentation https://github.com/255BITS/HyperGAN/tree/master/examples\n\n## Search\n\nEach example is capable of random search.  You can search along any set of parameters, including loss functions, trainers, generators, etc.\n\n# Datasets\n\nTo build a new network you need a dataset.  Your data should be structured like:\n\n``` \n  [folder]/[directory]/*.png\n```\n\n## Creating a Dataset\n\nDatasets in HyperGAN are meant to be simple to create.  Just use a folder of images.\n\n## Unsupervised learning\n\nThe default mode of hypergan.\n\n```\n [folder]/*.png\n```\n\nFor jpg(pass `-f jpg`)\n\n\n## Supervised learning\n\nTraining with labels allows you to train a `classifier`.\n\nEach directory in your dataset represents a classification.  \n\nExample:  Dataset setup for classification of apple and orange images:\n```\n /dataset/apples\n /dataset/oranges\n```\n\nYou must pass `--classloss` to hypergan cli to activate this feature.\n\n# Configuration\n\nConfiguration in HyperGAN uses JSON files.  You can create a new config with the default template by running `hypergan new mymodel`.\n\nYou can see all templates with `hypergan new mymodel -l`.\n\n\n## Architecture\n\nA hypergan configuration contains all hyperparameters for reproducing the full GAN.\n\nIn the original DCGAN you will have one of the following components:\n\n* Encoder\n* Generator\n* Discriminator\n* Loss\n* Trainer\n\n\nOther architectures may differ.  See the configuration templates.\n\n## GANComponent\n\nA base class for each of the component types listed below.\n\n## Generator\n\nA generator is responsible for projecting an encoding (sometimes called *z space*) to an output (normally an image).  A single GAN object from HyperGAN has one generator.\n\n### Resize Conv\n\nThis generator supports any resolution.  Works using a combination of `final_depth` and `depth_increase` in order to scale output size.\n\n\nFor example: the shape of `final_depth=16` and `depth_increase=16` when working on images of `64x64x3`\n```\n  64x64x3 -> 32x32x16 -> 16x16x32 -> 8x8x48 -> 4x4x64\n```\n\nThe same network on `128x128x3`:\n```\n  128x128x3 -> 64x64x16 -> 32x32x32 -> 16x16x48 -> 8x8x64 -> 4x4x80\n```\n\n| attribute   | description | type\n|:----------:|:------------:|:----:|\n| final_depth | The features for the last convolution layer(before projecting to final output). | int > 0\n| depth_increase | Working backwards, each previous layer will contain this many more features.| int > 0\n| activation |  Activations to use.  See <a href='#configuration-activations'>activations<\/a> | f(net):net\n| final_activation | Final activation to use.  This is usually set to tanh to squash the output range. See <a href=\"#configuration-activations\">activations<\/a>.| f(net):net\n| layer_filter | On each resize of G, we call this method.  Anything returned from this method is added to the graph before the next convolution block.  See <a href='#configuration-layer-filters'>common layer filters<\/a> | f(net):net\n| layer_regularizer | This \"regularizes\" each layer of the generator with a type.  See <a href='#layer-regularizers'>layer regularizers<\/a>| f(name)(net):net\n| block | This is called at each layer of the generator, after the resize. Can also be the string `deconv`| f(...) see source code\n| resize_image_type | See [tf.resize_images](https://www.tensorflow.org/api_docs/python/tf/image/resize_images) for values | enum(int)\n\n## Encoders\n\nSometimes referred to as the `z-space` representation or `latent space`.  In `dcgan` the 'encoder' is random uniform noise.\n\nCan be thought of as input to the `generator`.\n\n\n### Uniform Encoder\n\n| attribute   | description | type\n|:----------:|:------------:|:----:|\n| z | The dimensions of random uniform noise inputs | int > 0\n| min | Lower bound of the random uniform noise | int\n| max | Upper bound of the random uniform noise | int > min\n| projections | See more about projections below | [f(config, gan, net):net, ...]\n| modes | If using modes, the number of modes to have per dimension | int > 0\n\n\n### Projections\n\nThis encoder takes a random uniform value and outputs it as many possible types.  The primary idea is that you are able to query Z as a random uniform distribution, even if the gan is using a spherical representation.\n\nSome projection types are listed below.\n\n#### \"identity\" projection\n\n<img src='https://raw.githubusercontent.com/255BITS/HyperGAN/master/doc/encoder-linear-linear.png'/>\n\n#### \"sphere\" projection\n\n<img src='https://raw.githubusercontent.com/255BITS/HyperGAN/master/doc/encoder-linear-sphere.png'/>\n\n#### \"gaussian\" projection\n\n<img src='https://raw.githubusercontent.com/255BITS/HyperGAN/master/doc/encoder-linear-gaussian.png'/>\n\n#### \"modal\" projection\n\nOne of many\n\n#### \"binary\" projection\n\nOn/Off\n\n\n### Category Encoder\n\nUses categorical prior to choose 'one-of-many' options.\n\n\n## Discriminators\n\nA discriminator's main purpose(sometimes called a critic) is to separate out G from X, and to give the Generator\na useful error signal to learn from.\n\nNote a discriminator can be an encoder sometimes(like in the case of AlphaGAN)\n\n### Pyramid Discriminator\n\nArchitecturally similar to the ResizeConvGenerator.\n\nFor example: the shape of `initial_depth=16` and `depth_increase=16` when working on images of `64x64x3`\n```\n  64x64x3 -> 32x32x16 -> 16x16x32 -> 8x8x48 -> 4x4x64\n```\n\nThe same network on `128x128x3`:\n```\n  128x128x3 -> 64x64x16 -> 32x32x32 -> 16x16x48 -> 8x8x64 -> 4x4x80\n```\n\n\n| attribute   | description | type\n|:----------:|:------------:|:----:|\n| activation |  Activations to use.  See <a href='#configuration-activations'>activations<\/a> | f(net):net\n| initial_depth | The initial number of filters to use. | int > 0\n| depth_increase | Increases the filter sizes on each convolution by this amount | int > 0\n| final_activation | Final activation to use.  None is common here, and is required for several loss functions. | f(net):net\n| layers | The number of convolution layers | int > 0\n| layer_filter | Append information to each layer of the discriminator | f(config, net):net\n| layer_regularizer | batch_norm_1, layer_norm_1, or None | f(batch_size, name)(net):net\n| fc_layer_size | The size of the linear layers at the end of this network(if any). | int > 0\n| fc_layers | fully connected layers at the end of the discriminator(standard dcgan is 0) | int >= 0\n| noise | Instance noise.  Can be added to the input X | float >= 0\n| progressive_enhancement | If true, enable [progressive enhancement](#progressive-enhancement) | boolean\n\n\n## Losses\n\n## WGAN\n\nWasserstein Loss is simply:\n\n```python\n d_loss = d_real - d_fake\n g_loss = d_fake\n```\n\nd_loss and g_loss can be reversed as well - just add a '-' sign.\n\n## Least-Squares GAN\n\n```python\n d_loss = (d_real-b)**2 - (d_fake-a)**2\n g_loss = (d_fake-c)**2\n```\n\na, b, and c are all hyperparameters.\n\n### Standard GAN and Improved GAN\n\nIncludes support for Improved GAN.  See `hypergan/losses/standard_gan_loss.py` for details.\n\n### Supervised loss\n\nSupervised loss is for labeled datasets.  This uses a standard softmax loss function on the outputs of the discriminator.\n\n### Categorical loss\n\nThis is currently untested.\n\n### Cramer loss\n\nNo good results yet\n\n### Softmax loss\n\nNot working as well as the others\n\n### Boundary Equilibrium Loss\n\nUse with the `AutoencoderDiscriminator`.\n\nSee the `began` configuration template.\n\n### Loss configuration\n\n| attribute   | description | type\n|:----------:|:------------:|:----:|\n| batch_norm | batch_norm_1, layer_norm_1, or None | f(batch_size, name)(net):net\n| create | Called during graph creation | f(config, gan, net):net\n| discriminator |  Set to restrict this loss to a single discriminator(defaults to all) | int >= 0 or None\n| label_smooth | improved gan - Label smoothing. | float > 0\n| labels | lsgan - A triplet of values containing (a,b,c) terms. | [a,b,c] floats\n| reduce | Reduces the output before applying loss | f(net):net\n| reverse | Reverses the loss terms, if applicable | boolean\n\n## Trainers\n\nDetermined by the GAN implementation.  These variables are the same across all trainers.\n\n### Configuration\n\n| attribute   | description | type\n|:----------:|:------------:|:----:|\n| g_learn_rate | Learning rate for the generator | float >= 0\n| g_beta1 | (adam) | float >= 0\n| g_beta2 | (adam)  | float >= 0\n| g_epsilon | (adam)  | float >= 0\n| g_decay | (rmsprop)  | float >= 0\n| g_momentum | (rmsprop)  | float >= 0\n| d_learn_rate | Learning rate for the discriminator | float >= 0\n| d_beta1 | (adam) | float >= 0\n| d_beta2 | (adam)  | float >= 0\n| d_epsilon | (adam)  | float >= 0\n| d_decay | (rmsprop)  | float >= 0\n| d_momentum | (rmsprop)  | float >= 0\n| clipped_gradients | If set, gradients will be clipped to this value. | float > 0 or None\n| d_clipped_weights | If set, the discriminator will be clipped by value. |float > 0 or None\n\n\n## Downloadable datasets\n\n* CelebA aligned faces http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html\n* MS Coco http://mscoco.org/\n* ImageNet http://image-net.org/\n\n# Contributing\n\nContributions are welcome and appreciated!  We have many open issues in the *Issues* tab.\n\nSee <a href='CONTRIBUTING.md'>how to contribute.<\/a>\n\n# Versioning\n\nHyperGAN uses semantic versioning.  http://semver.org/\n\nTLDR: *x.y.z*\n\n* _x_ is incremented on stable public releases.\n* _y_ is incremented on API breaking changes.  This includes configuration file changes and graph construction changes.\n* _z_ is incremented on non-API breaking changes.  *z* changes will be able to reload a saved graph.\n\n## Papers\n\n* GAN - https://arxiv.org/abs/1406.2661\n* DCGAN - https://arxiv.org/abs/1511.06434\n* InfoGAN - https://arxiv.org/abs/1606.03657\n* Improved GAN - https://arxiv.org/abs/1606.03498\n* Adversarial Inference - https://arxiv.org/abs/1606.00704\n* Energy-based Generative Adversarial Network - https://arxiv.org/abs/1609.03126\n* Wasserstein GAN - https://arxiv.org/abs/1701.07875\n* Least Squares GAN - https://arxiv.org/pdf/1611.04076v2.pdf\n* Boundary Equilibrium GAN - https://arxiv.org/abs/1703.10717\n* Self-Normalizing Neural Networks - https://arxiv.org/abs/1706.02515\n* Variational Approaches for Auto-Encoding\nGenerative Adversarial Networks - https://arxiv.org/pdf/1706.04987.pdf\n* CycleGAN - https://junyanz.github.io/CycleGAN/\n* DiscoGAN - https://arxiv.org/pdf/1703.05192.pdf\n* Softmax GAN - https://arxiv.org/abs/1704.06191\n* The Cramer Distance as a Solution to Biased Wasserstein Gradients - https://arxiv.org/abs/1705.10743\n* Improved Training of Wasserstein GANs - https://arxiv.org/abs/1704.00028\n\n## Sources\n\n* DCGAN - https://github.com/carpedm20/DCGAN-tensorflow\n* InfoGAN - https://github.com/openai/InfoGAN\n* Improved GAN - https://github.com/openai/improved-gan\n* Hyperchamber - https://github.com/255bits/hyperchamber\n\n# Citation\n\nIf you wish to cite this project, do so like this:\n\n```\n  255bits(Martyn, Mikkel et al),\n  HyperGAN, (2017), \n  GitHub repository, \n  https://github.com/255BITS/HyperGAN\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CA6:3D501:17E5AF:5CFF10:6AB92096"},"text_sha256":"ea1d0e28d4fe90aa647646b10485ecfcd5b8a2d6fb2be50efb3e5754fd433dc8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3451","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:178D326:1BAB5A6:6AB92827"},"commit":{"sha":"291ddccda847e4f4ccb273bb26121a0a0d738164","url":"https://github.com/HyperGAN/HyperGAN/commit/291ddccda847e4f4ccb273bb26121a0a0d738164","date":"2021-01-24T21:17:54Z","author_date":"2021-01-24T21:17:54Z","committer_date":"2021-01-24T21:17:54Z","tree_sha":"6ffc0c68d07eaf1bd9eec48cb66abbf631f689c8","message_first_line":"[fix] learned noise"},"tree_request_status":200,"tree_rate":{"github_remaining":"3450","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17AC78B:1BCA77E:6AB92828"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7248,"blob_sha":"09a784e32e37240a6e52bec2b5bef452fd0eaa4f","priority":0},{"path":"SECURITY.md","size":97,"blob_sha":"93835cc686bdcca825b91c84bf20b7751ec6caf8","priority":1}],"documents":[{"path":"README.md","size":7248,"blob_sha":"09a784e32e37240a6e52bec2b5bef452fd0eaa4f","priority":0,"status":200,"text":"# README\n\n## HyperGAN 1.0\n\n[![docs](https://img.shields.io/badge/gitbook-docs-yellowgreen)](https://hypergan.gitbook.io/hypergan/) [![Discord](https://img.shields.io/badge/discord-join%20chat-brightgreen.svg)](https://discord.gg/t4WWBPF) [![Twitter](https://img.shields.io/badge/twitter-follow-blue.svg)](https://twitter.com/hypergan)\n\nA composable GAN built for developers, researchers, and artists.\n\nHyperGAN is in pre-release and open beta.\n\n![Colorizer 0.9 1](https://s3.amazonaws.com/hypergan-apidocs/0.9.0-images/colorizer-2.gif)\n\n_Logos generated with_ [_examples/colorizer_](./examples/colorizer.py)\n\nSee more on the [hypergan youtube](https://www.youtube.com/channel/UCU33XvBbMnS8002_NB7JSvA)\n\n## Table of contents\n\n* [About](#about)\n* [Documentation](https://hypergan.gitbook.io/hypergan/)\n* [Changelog](./changelog.md)\n* [Quick start](#quick-start)\n  * [Requirements](#requirements)\n  * [Install](#install)\n  * [Train](#train)\n* [API](#api)\n  * [Using a trained hypergan model](#using-a-trained-hypergan-model)\n  * [Training a gan](#training-a-gan)\n  * [Examples](#examples)\n  * [Tutorials](#tutorials)\n* [The pip package hypergan](#the-pip-package-hypergan)\n  * [Training](#training)\n  * [Sampling](#sampling)\n  * [Additional Arguments](#additional-arguments)\n  * [Running on CPU](#running-on-cpu)\n  * [Troubleshooting](#troubleshooting)\n  * [Development Mode](#development-mode)\n* [Datasets](#datasets)\n  * [Creating a Dataset](#creating-a-dataset)\n  * [Downloadable Datasets](#downloadable-datasets)\n  * [Cleaning up data](#cleaning-up-data)\n* [Features](#features)\n* [Showcase](#showcase)\n* [Sponsors](#sponsors)\n* [Contributing](./#contributing.md)\n* [Versioning](#Versioning)\n* [Citation](#citation)\n\n## About\n\nHyperGAN builds generative adversarial networks in pytorch and makes them easy to train and share.\n\nFor a general introduction to GANs see [http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/](http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/)\n\nJoin the community [discord](https://discord.gg/t4WWBPF).\n\n## Documentation\n\n* [Gitbook documentation](https://hypergan.gitbook.io/)\n\n## Changelog\n\nSee the full changelog here: [Changelog.md](changelog.md)\n\n## Quick start\n\n### Requirements\n\nOS: Windows, OSX, Linux\n\nFor training:\n\nGPU: Nvidia, GTX 1080+ recommended\n\n### Install\n\n1. Install HyperGAN\n  For users: `pip3 install hypergan`\n\n  For developers: Download this repo and run `python3 setup.py develop`\n\n2. Test it out\n  * `hypergan train preset:celeba -s 128x128x3`\n\n3. Join the community\n  * Once you've made something cool, be sure to share it on the Discord \\([https://discord.gg/t4WWBPF](https://discord.gg/t4WWBPF)\\).\n\n### Create a new model\n\n```bash\n  hypergan new mymodel\n```\n\nThis will create a mymodel.json based off the default configuration. You can change configuration templates with the `-c` flag.\n\n### List configuration templates\n\n```bash\n  hypergan new mymodel -l\n```\n\nSee all configuration templates with `--list-templates` or `-l`.\n\n### Train\n\n```bash\n  hypergan train folder/ -s 32x32x3 -c mymodel --resize\n```\n\n## API\n\n```python\nimport hypergan as hg\n```\n\nNote this API is currently under work in 1.0. If you are reading this before 1.0 is released check the examples.\n\nSee the [gitbook documentation](https://hypergan.gitbook.io/) for more details.\n\n### Using a trained hypergan model\n\n```python\nmy_gan = hg.GAN('model.hypergan')\nbatch_sample = my_gan.sample()\n```\n\n### Training a gan\n\n```python\ngan = hg.GAN(\"default.json\", inputs=hg.inputs.ImageLoader(...))\ntrainable_gan = hg.TrainableGAN(gan)\nfor step in trainable_gan.train():\n    print(\"I'm on step \", step)\n```\n\n### Examples\n\nSee the examples [https://github.com/hypergan/HyperGAN/tree/master/examples](https://github.com/hypergan/HyperGAN/tree/master/examples)\n\n### Tutorials\n\nSee the tutorials [https://hypergan.gitbook.io/hypergan/tutorials](https://hypergan.gitbook.io/hypergan/tutorials)\n\n## The pip package hypergan\n\n```bash\npip install hypergan\n```\n\n### Training\n\n```bash\n  # Train a 32x32 gan with batch size 32 on a folder of pngs\n  hypergan train [folder] -s 32x32x3 -b 32 --config [name]\n```\n\n### Sampling\n\n```bash\n  hypergan sample [folder] -s 32x32x3 -b 32 --config [name] --sampler batch_walk --save_samples\n```\n\nBy default hypergan will not save training samples to disk. To change this, use `--save_samples`.\n\n### Additional Arguments\n\nTo see a detailed list, run\n\n```bash\n  hypergan -h\n```\n\n### Running on CPU\n\nYou can switch the backend with:\n\n```bash\n  hypergan [...] -B cpu\n```\n\nDon't train on CPU! It's too slow.\n\n### Troubleshooting\n\nMake sure that your cuda, nvidia drivers, pillow, pytorch, and pytorch vision are the latest version.\n\nCheck the discord for help.\n\n### Development mode\n\nIf you wish to modify hypergan\n\n```bash\ngit clone https://github.com/hypergan/hypergan\ncd hypergan\npython3 setup.py develop\n```\n\nMake sure to `pip3 uninstall hypergan` to avoid version conflicts.\n\n## Datasets\n\nTo build a new network you need a dataset.\n\n### Creating a Dataset\n\nDatasets in HyperGAN are meant to be simple to create. Just use a folder of images. Nested folders work too.\n\n### Cleaning up data\n\nHyperGAN is built to be resilient to all types of unclean data. By default images are resized then cropped if necessary.\n\nSee `--nocrop`, `--random_crop` and `--resize` for additional image scaling options.\n\n## Features\n\nA list of features in the 1.0 release:\n\n* API\n* CLI\n* Viewer - an electron app to explore and create models\n* Cross platform - Windows, OSX, Linux\n* Inference - Add AI content generation to your project\n* Training - Train custom models using accelerated parallel training backends\n* Sharing - Share built models with each other. Use them in python projects as hypergan models, or in any project as onxx models\n* Customizable - Define custom architectures in the json, or replace any component with your own pytorch creation\n* Data - Built to work on unclean data and multiple data types\n* Unsupervised learning\n* Unsupervised alignment - Align one distribution to another or discover new novel distributions.\n* Transfer learning\n* Online learning\n\n## Showcase\n\n### 1.0 models are still training\n\nSubmit your showcase with a pull request!\n\nFor more, see the \\#showcase room in [![Discord](https://img.shields.io/badge/discord-join%20chat-brightgreen.svg)](https://discord.gg/t4WWBPF)\n\n## Sponsors\n\nWe are now accepting financial sponsors. Sponsor to (optionally) be listed here.\n\nhttps://github.com/sponsors/hypergan\n\n## Contributing\n\nContributions are welcome and appreciated! We have many open issues in the _Issues_ tab. Join the discord.\n\nSee [how to contribute.](./)\n\n## Versioning\n\nHyperGAN uses semantic versioning. [http://semver.org/](http://semver.org/)\n\nTLDR: _x.y.z_\n\n* _x_ is incremented on stable public releases.\n* _y_ is incremented on API breaking changes.  This includes configuration file changes and graph construction changes.\n* _z_ is incremented on non-API breaking changes.  _z_ changes will be able to reload a saved graph.\n\n## Citation\n\n```text\n  HyperGAN Community\n  HyperGAN, (2016-2020+), \n  GitHub repository, \n  https://github.com/HyperGAN/HyperGAN\n```\n\nHyperGAN comes with no warranty or support.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDE8:1A3D83:180315:5D1D14:6AB92097"},"text_sha256":"8d455febc9f2ade9ab6f67c6e63ad8fdac710ef55bc4b61b32f792d41898998d"},{"path":"SECURITY.md","size":97,"blob_sha":"93835cc686bdcca825b91c84bf20b7751ec6caf8","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease open an issue and mark it high priority.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7C48:18CDF1:171952:54D7BA:6AB92082"},"text_sha256":"ef37e52df23a6052adcdcdb9493db3ebc771961676e3576604d7446362c515da"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"NVIDIA-AI-IOT/redtail","input_row":{"repository":"NVIDIA-AI-IOT/redtail","url":"https://github.com/NVIDIA-AI-IOT/redtail","name":"redtail","owner":"NVIDIA-AI-IOT","description":"Perception and AI components for autonomous mobile robotics.","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1049,"issues":141,"created_at":"2017-09-07T16:34:37Z","updated_at":"2026-09-27T07:11:58Z","first_commit_at":"2017-09-07T16:38:31Z","last_commit_at":"2020-11-17T18:29:40Z","activity_months":38.340000000000003,"ai_ml_match_topics":"artificial-intelligence; deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:57.045Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NVIDIA-AI-IOT/redtail","visibility":"public","created_at":"2017-09-07T16:34:37Z","updated_at":"2026-09-27T07:11:58Z","private":false,"fork":false,"archived":false,"stargazers_count":1049,"open_issues_count":48,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"3449","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17AF081:1BCD47F:6AB92829"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3448","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D4:73962:17B5E4B:1BD3AA1:6AB92829"},"commit":{"sha":"6a0dcc2dcb5ce193823cea1909fc8327089e4fb4","url":"https://github.com/NVIDIA-AI-IOT/redtail/commit/6a0dcc2dcb5ce193823cea1909fc8327089e4fb4","date":"2018-05-16T23:48:18Z","author_date":"2018-05-16T23:48:18Z","committer_date":"2018-05-16T23:48:18Z","tree_sha":"8c374da3f7c47fe4b008a80913aca27d71630a9e","message_first_line":"Merge pull request #66 from NVIDIA-Jetson/sim_docker_fixes"},"tree_request_status":200,"tree_rate":{"github_remaining":"3447","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0841:6E4BB:17DE2A1:1BFBF2F:6AB92829"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4576,"blob_sha":"1021b962cb69aaf9f78c0e3390be3e38e808e9ad","priority":0}],"documents":[{"path":"README.md","size":4576,"blob_sha":"1021b962cb69aaf9f78c0e3390be3e38e808e9ad","priority":0,"status":200,"text":"# NVIDIA Redtail project\n\nAutonomous visual navigation components for drones and ground vehicles using deep learning. Refer to [wiki](https://github.com/NVIDIA-Jetson/redtail/wiki) for more information on how to get started.\n\nThis project contains deep neural networks, computer vision and control code, hardware instructions and other artifacts that allow users to build a drone or a ground vehicle which can autonomously navigate through highly unstructured environments like forest trails, sidewalks, etc. Our TrailNet DNN for visual navigation is running on NVIDIA's Jetson embedded platform. Our [arXiv paper](https://arxiv.org/abs/1705.02550) describes TrailNet and other runtime modules in detail.\n\nThe project's deep neural networks (DNNs) can be trained from scratch using publicly available data. A few [pre-trained DNNs](../master/models/pretrained/) are also available as a part of this project. In case you want to train TrailNet DNN from scratch, follow the steps on [this page](../../wiki/Models).\n\nThe project also contains [Stereo DNN](../master/stereoDNN/) models and runtime which allow to estimate depth from stereo camera on NVIDIA platforms.\n\n## References and Demos\n* [Stereo DNN, CVPR18 paper](https://arxiv.org/abs/1803.09719), [Stereo DNN video demo](https://youtu.be/0FPQdVOYoAU)\n* [TrailNet Forest Drone Navigation, IROS17 paper](https://arxiv.org/abs/1705.02550), [TrailNet DNN video demo](https://youtu.be/H7Ym3DMSGms)\n* GTC 2017 talk: [slides](http://on-demand.gputechconf.com/gtc/2017/presentation/s7172-nikolai-smolyanskiy-autonomous-drone-navigation-with-deep-learning.pdf), [video](http://on-demand.gputechconf.com/gtc/2017/video/s7172-smolyanskiy-autonomous-drone-navigation-with-deep-learning%20(1).PNG.mp4)\n* [Demo video showing 250m autonomous flight with TrailNet DNN flying the drone](https://youtu.be/H7Ym3DMSGms)\n* [Demo video showing our 1 kilometer autonomous drone flight with TrailNet DNN](https://youtu.be/USYlt9t0lZY)\n* [Demo video showing TrailNet DNN driving a robotic rover around the office](https://youtu.be/lOmT4yWcJrM)\n* [Demo video showing TrailNet generalization to ground vehicles and other environments](https://youtu.be/ZKF5N8xUxfw)\n\n# News\n* **GTC 2018**: Here is our [Stereo DNN session page at GTC18](https://2018gputechconf.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=152050) and [the recorded video presentation](http://on-demand.gputechconf.com/gtc/2018/video/S8660/)\n\n* **2018-03-22**: redtail 2.0.\n  * Added Stereo DNN models and inference library (TensorFlow/TensorRT). For more details, see the [README](../master/stereoDNN/).\n  * Migrated to JetPack 3.2. This change brings latest components such as CUDA 9.0, cuDNN 7.0, TensorRT 3.0, OpenCV 3.3 and others to Jetson platform. Note that this is a breaking change.\n  * Added support for INT8 inference. This enables fast inference on devices that have hardware implementation of INT8 instructions. More details are on [our wiki](../../wiki/ROS-Nodes#int8-inference).\n\n* **2018-02-15**: added support for the TBS Discovery platform.\n  * Step by step instructions on how to assemble the [TBS Discovery drone](../../wiki/Skypad-TBS-Discovery-Setup).\n  * Instructions on how to attach and use a [ZED stereo camera](https://www.stereolabs.com/zed/).\n  * Detailed instructions on how to calibrate, test and fly the drone.\n\n* **2017-10-12**: added full simulation Docker image, experimental support for APM Rover and support for MAVROS v0.21+.\n  \n  * Redtail simulation Docker image contains all the components required to run full Redtail simulation in Docker. Refer to [wiki](../../wiki/Testing-in-Simulator) for more information.\n  * Experimental support for APM Rover. Refer to [wiki](../../wiki#platforms) for more information.\n  * Several other changes including support for MAVROS v0.21+, updated Jetson install script and few bug fixes.\n\n* **2017-09-07**: NVIDIA Redtail project is released as an open source project.\n  \n  Redtail's AI modules allow building autonomous drones and mobile robots based on Deep Learning and NVIDIA Jetson TX1 and TX2 embedded systems.\n  Source code, pre-trained models as well as detailed build and test instructions are released on GitHub.\n\n* **2017-07-26**: migrated code and scripts to [JetPack 3.1](https://developer.nvidia.com/embedded/jetpack) with [TensorRT 2.1](https://developer.nvidia.com/tensorrt).\n  \n    TensorRT 2.1 provides significant improvements in DNN inference performance as well as new features and bug fixes. This is a breaking change which requires re-flashing Jetson with JetPack 3.1.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2AAC:09ED:DF6A0:3DC9F8:6AB92099"},"text_sha256":"0debfe85c75ad39ff2d5088f5eac63c4c28a7286667f2ba6e8ab312e13361ebb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3446","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D7:380E1C:17B2EF3:1BD0414:6AB9282A"},"commit":{"sha":"b328b1f6110e110efeaa0d94fd208d1903732954","url":"https://github.com/NVIDIA-AI-IOT/redtail/commit/b328b1f6110e110efeaa0d94fd208d1903732954","date":"2020-11-17T18:29:40Z","author_date":"2020-11-17T18:29:40Z","committer_date":"2020-11-17T18:29:40Z","tree_sha":"5a78e4d2f7d24a6a8c34ab97341683d6a3b7714e","message_first_line":"Merge pull request #157 from hildebrandt-carl/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3445","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:17D18C1:1BEE995:6AB9282A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6246,"blob_sha":"58219d05df0f43c1bee2efbecdf8654a215b0313","priority":0}],"documents":[{"path":"README.md","size":6246,"blob_sha":"58219d05df0f43c1bee2efbecdf8654a215b0313","priority":0,"status":200,"text":"# NVIDIA Redtail project\n\nAutonomous visual navigation components for drones and ground vehicles using deep learning. Refer to [wiki](https://github.com/NVIDIA-Jetson/redtail/wiki) for more information on how to get started.\n\nThis project contains deep neural networks, computer vision and control code, hardware instructions and other artifacts that allow users to build a drone or a ground vehicle which can autonomously navigate through highly unstructured environments like forest trails, sidewalks, etc. Our TrailNet DNN for visual navigation is running on NVIDIA's Jetson embedded platform. Our [arXiv paper](https://arxiv.org/abs/1705.02550) describes TrailNet and other runtime modules in detail.\n\nThe project's deep neural networks (DNNs) can be trained from scratch using publicly available data. A few [pre-trained DNNs](../master/models/pretrained/) are also available as a part of this project. In case you want to train TrailNet DNN from scratch, follow the steps on [this page](../../wiki/Models).\n\nThe project also contains [Stereo DNN](../master/stereoDNN/) models and runtime which allow to estimate depth from stereo camera on NVIDIA platforms.\n\n**IROS 2018**: we presented our work at [IROS 2018](https://www.iros2018.org/) conference as a part of [Vision-based Drones: What's Next?](https://www.seas.upenn.edu/~loiannog/workshopIROS2018uav/) workshop.\n\n**CVPR 2018**: we presented our work at [CVPR 2018](http://cvpr2018.thecvf.com/) conference as a part of [Workshop on Autonomous Driving](http://www.wad.ai/index.html).\n\n## References and Demos\n* [Stereo DNN, CVPR18 paper](https://arxiv.org/abs/1803.09719), [Stereo DNN video demo](https://youtu.be/0FPQdVOYoAU)\n* [TrailNet Forest Drone Navigation, IROS17 paper](https://arxiv.org/abs/1705.02550), [TrailNet DNN video demo](https://youtu.be/H7Ym3DMSGms)\n* GTC 2017 talk: [slides](http://on-demand.gputechconf.com/gtc/2017/presentation/s7172-nikolai-smolyanskiy-autonomous-drone-navigation-with-deep-learning.pdf), [video](http://on-demand.gputechconf.com/gtc/2017/video/s7172-smolyanskiy-autonomous-drone-navigation-with-deep-learning%20(1).PNG.mp4)\n* [Demo video showing 250m autonomous flight with TrailNet DNN flying the drone](https://youtu.be/H7Ym3DMSGms)\n* [Demo video showing our 1 kilometer autonomous drone flight with TrailNet DNN](https://youtu.be/USYlt9t0lZY)\n* [Demo video showing TrailNet DNN driving a robotic rover around the office](https://youtu.be/lOmT4yWcJrM)\n* [Demo video showing TrailNet generalization to ground vehicles and other environments](https://youtu.be/ZKF5N8xUxfw)\n\n# News\n* **2020-02-03**: Alternative implementations.\n    **redtail** is no longer being developed, but fortunately our community stepped in and continued developing the project.\n    We thank our users for the interest in **redtail**, questions and feedback!\n\n    Some alternative implementations are listed below.\n  \n  * @mtbsteve: https://github.com/mtbsteve/redtail\n\n* **2018-10-10**: Stereo DNN ROS node and fixes.\n  * Added Stereo DNN ROS node and visualizer node.\n  * Fixed issue with nvidia-docker v2.\n* **2018-09-19**: Updates to Stereo DNN.\n  * Moved to TensorRT 4.0\n  * Enabled FP16 support in `ResNet18 2D` model, resulting in 2x performance increase (20fps on Jetson TX2).\n  * Enabled TensorRT serialization in `ResNet18 2D` model to reduce model loading time from minutes to less than a second.\n  * Better logging and profiler support.\n\n* **2018-06-04**: CVPR 2018 workshop. Fast version of Stereo DNN.\n  * Presenting our work at [CVPR 2018](http://cvpr2018.thecvf.com/) conference as a part of [Workshop on Autonomous Driving](http://www.wad.ai/index.html).\n  * Added fast version of Stereo DNN model based on ResNet18 2D model. The model runs at 10fps on Jetson TX2. See [README](../master/stereoDNN/) for details and check out updated [sample_app](../master/stereoDNN/sample_app).\n\n* **GTC 2018**: Here is our [Stereo DNN session page at GTC18](https://2018gputechconf.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=152050) and [the recorded video presentation](http://on-demand.gputechconf.com/gtc/2018/video/S8660/)\n\n* **2018-03-22**: redtail 2.0.\n  * Added Stereo DNN models and inference library (TensorFlow/TensorRT). For more details, see the [README](../master/stereoDNN/).\n  * Migrated to JetPack 3.2. This change brings latest components such as CUDA 9.0, cuDNN 7.0, TensorRT 3.0, OpenCV 3.3 and others to Jetson platform. Note that this is a breaking change.\n  * Added support for INT8 inference. This enables fast inference on devices that have hardware implementation of INT8 instructions. More details are on [our wiki](../../wiki/ROS-Nodes#int8-inference).\n\n* **2018-02-15**: added support for the TBS Discovery platform.\n  * Step by step instructions on how to assemble the [TBS Discovery drone](../../wiki/Skypad-TBS-Discovery-Setup).\n  * Instructions on how to attach and use a [ZED stereo camera](https://www.stereolabs.com/zed/).\n  * Detailed instructions on how to calibrate, test and fly the drone.\n\n* **2017-10-12**: added full simulation Docker image, experimental support for APM Rover and support for MAVROS v0.21+.\n  \n  * Redtail simulation Docker image contains all the components required to run full Redtail simulation in Docker. Refer to [wiki](../../wiki/Testing-in-Simulator) for more information.\n  * Experimental support for APM Rover. Refer to [wiki](../../wiki#platforms) for more information.\n  * Several other changes including support for MAVROS v0.21+, updated Jetson install script and few bug fixes.\n\n* **2017-09-07**: NVIDIA Redtail project is released as an open source project.\n  \n  Redtail's AI modules allow building autonomous drones and mobile robots based on Deep Learning and NVIDIA Jetson TX1 and TX2 embedded systems.\n  Source code, pre-trained models as well as detailed build and test instructions are released on GitHub.\n\n* **2017-07-26**: migrated code and scripts to [JetPack 3.1](https://developer.nvidia.com/embedded/jetpack) with [TensorRT 2.1](https://developer.nvidia.com/tensorrt).\n  \n    TensorRT 2.1 provides significant improvements in DNN inference performance as well as new features and bug fixes. This is a breaking change which requires re-flashing Jetson with JetPack 3.1.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"124C:3B6DE:16E4C7:5BFDF5:6AB9209A"},"text_sha256":"1f1537c73841516a9b9bb5c9c37f340ad5adb8b098384e93c18841bbc03dca3c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"esa/pagmo2","input_row":{"repository":"esa/pagmo2","url":"https://github.com/esa/pagmo2","name":"pagmo2","owner":"esa","description":"A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.","language":"C++","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":937,"issues":253,"created_at":"2017-01-08T21:53:43Z","updated_at":"2026-09-25T12:31:41Z","first_commit_at":"2015-07-09T13:27:32Z","last_commit_at":"2026-09-25T11:54:13Z","activity_months":134.56,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:28:59.881Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"esa/pagmo2","visibility":"public","created_at":"2017-01-08T21:53:43Z","updated_at":"2026-09-25T12:31:41Z","private":false,"fork":false,"archived":false,"stargazers_count":937,"open_issues_count":31,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3444","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17B4B88:1BD2C5A:6AB9282B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3443","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:17D1989:1BEEA87:6AB9282C"},"commit":{"sha":"a498cb4e7804a78b7c9c92a86e319acd2749a611","url":"https://github.com/esa/pagmo2/commit/a498cb4e7804a78b7c9c92a86e319acd2749a611","date":"2018-05-05T13:04:59Z","author_date":"2018-05-05T13:04:59Z","committer_date":"2018-05-05T13:04:59Z","tree_sha":"e818380520295c844d44956f1d16881fd13f34ff","message_first_line":"Merge pull request #167 from KishManani/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3442","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0908:3203A7:1776E6E:1B9503B:6AB9282C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2222,"blob_sha":"9d3909e84ff956b5d3a7c3a52774c0b3df858ff8","priority":0}],"documents":[{"path":"README.md","size":2222,"blob_sha":"9d3909e84ff956b5d3a7c3a52774c0b3df858ff8","priority":0,"status":200,"text":"pagmo\n=====\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/pagmo2/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://travis-ci.org/esa/pagmo2.svg?branch=master)](https://travis-ci.org/esa/pagmo2)\n[![Build status](https://ci.appveyor.com/api/projects/status/sus3dsyg3376tiri/branch/master?svg=true)](https://ci.appveyor.com/project/ci4esa/pagmo2/branch/master)\n[![Docs](https://media.readthedocs.org/static/projects/badges/passing.svg)](https://esa.github.io/pagmo2/)\n[![codecov.io](https://codecov.io/github/esa/pagmo2/coverage.svg?branch=master)](https://codecov.io/github/esa/pagmo2?branch=master)\n[![PyPI](https://img.shields.io/pypi/v/pygmo.svg)](https://pypi.python.org/pypi/pygmo)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pagmo/badges/version.svg)](https://anaconda.org/conda-forge/pagmo)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pygmo/badges/version.svg)](https://anaconda.org/conda-forge/pygmo)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1045337.svg)](https://doi.org/10.5281/zenodo.1045336)\n\npagmo (C++) or pygmo (Python) is a scientific library for massively parallel optimization. It is built around the idea of providing a unified interface to optimization algorithms and to optimization problems and to make their deployment in massively parallel environments easy.\n\nIf you are using pagmo/pygmo as part of your research, teaching, or other activities, we would be grateful if you could star\nthe repository and/or cite our work. The DOI of the latest version and other citation resources are available\nat [this link](https://doi.org/10.5281/zenodo.1045336).\n\nThe full documentation can be found [here](https://esa.github.io/pagmo2/).\n\nUpgrading from pagmo 1.x.x\n==========================\n\nIf you were using the old pagmo, have a look here on some technical data on what and why a completely new API and code was developed: https://github.com/esa/pagmo2/wiki/From-1.x-to-2.x\n\nYou will find many tutorials in the documentation, we suggest to skim through them to realize the differences. The new pagmo (version 2) should be considered (and is) as an entirely different code.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8806:3B6DE:16E4E1:5BFE34:6AB9209A"},"text_sha256":"e171a90aa2002a264a4abf6c7d27fa43018d8fe69d60bd36ea2a672fa5ebedc3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3441","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0898:7307A:179C4AC:1BBA3F8:6AB9282D"},"commit":{"sha":"4aead6ca38d3c0157166d6f1f0070c4312574f94","url":"https://github.com/esa/pagmo2/commit/4aead6ca38d3c0157166d6f1f0070c4312574f94","date":"2026-05-23T12:26:03Z","author_date":"2026-05-23T12:26:03Z","committer_date":"2026-05-23T12:26:03Z","tree_sha":"28d8c12f33792c58864ba732f71f38a0be3f1a3a","message_first_line":"Merge pull request #628 from jschueller/issue486"},"tree_request_status":200,"tree_rate":{"github_remaining":"3440","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FA:2EA1B4:17B8D03:1BD7450:6AB9282E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2769,"blob_sha":"0c7c8272e2b69c5fcbe1c5dcddf8cc2335e09a91","priority":0},{"path":"doc/sphinx/docs/cpp/r_policy.rst","size":13812,"blob_sha":"9b5f21e3d41202d4e6fff5315f0cb1cb492bbdfd","priority":1},{"path":"doc/sphinx/docs/cpp/s_policy.rst","size":13134,"blob_sha":"d1bb3a464509c9dd349abbf3458d1cb90bc0e66e","priority":1}],"documents":[{"path":"README.md","size":2769,"blob_sha":"0c7c8272e2b69c5fcbe1c5dcddf8cc2335e09a91","priority":0,"status":200,"text":"pagmo\n=====\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/esa/pagmo2/main.yml?branch=master&style=for-the-badge)](https://github.com/esa/pagmo2/actions?query=workflow%3A%22GitHub+CI%22)\n[![Code Coverage](https://img.shields.io/codecov/c/github/esa/pagmo2.svg?style=for-the-badge)](https://codecov.io/github/esa/pagmo2?branch=master)\n\n[![Anaconda-Server Badge](https://img.shields.io/conda/vn/conda-forge/pagmo.svg?style=for-the-badge)](https://anaconda.org/conda-forge/pagmo)\n\n[![Join the chat at https://gitter.im/pagmo2/Lobby](https://img.shields.io/badge/gitter-join--chat-green.svg?logo=gitter-white&style=for-the-badge)](https://gitter.im/pagmo2/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02338/status.svg)](https://doi.org/10.21105/joss.02338)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1045337.svg)](https://doi.org/10.5281/zenodo.1045336)\n\n**IMPORTANT NOTICE**: pygmo, the Python bindings for pagmo, have been split off into a separate\nproject, hosted [here](https://github.com/esa/pygmo2). Please update your bookmarks!\n\npagmo is a C++ scientific library for massively parallel optimization. It is built around the idea of providing\na unified interface to optimization algorithms and to optimization problems and to make their deployment in\nmassively parallel environments easy.\n\nIf you are using pagmo as part of your research, teaching, or other activities, we would be grateful if you could star\nthe repository and/or cite our work. For citation purposes, you can use the following BibTex entry, which refers\nto the [pagmo paper](https://doi.org/10.21105/joss.02338) in the Journal of Open Source Software:\n\n```bibtex\n@article{Biscani2020,\n  doi = {10.21105/joss.02338},\n  url = {https://doi.org/10.21105/joss.02338},\n  year = {2020},\n  publisher = {The Open Journal},\n  volume = {5},\n  number = {53},\n  pages = {2338},\n  author = {Francesco Biscani and Dario Izzo},\n  title = {A parallel global multiobjective framework for optimization: pagmo},\n  journal = {Journal of Open Source Software}\n}\n```\n\nThe DOI of the latest version of the software is available at [this link](https://doi.org/10.5281/zenodo.1045336).\n\nThe full documentation can be found [here](https://esa.github.io/pagmo2/).\n\nUpgrading from pagmo 1.x.x\n==========================\n\nIf you were using the old pagmo, have a look here on some technical data on what and why a completely\nnew API and code was developed: https://github.com/esa/pagmo2/wiki/From-1.x-to-2.x\n\nYou will find many tutorials in the documentation, we suggest to skim through them to\nrealize the differences. The new pagmo (version 2) should be considered (and is) as an entirely different code.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DC7C:349C76:170EF6:5C2560:6AB9209B"},"text_sha256":"1515abb9890a2c8f68630aee5431a2d5e71c9245cbcc89a688eed9faee9d8e5b"},{"path":"doc/sphinx/docs/cpp/r_policy.rst","size":13812,"blob_sha":"9b5f21e3d41202d4e6fff5315f0cb1cb492bbdfd","priority":1,"status":200,"text":"Replacement policy\n==================\n\n.. versionadded:: 2.11\n\n*#include <pagmo/r_policy.hpp>*\n\n.. cpp:namespace-push:: pagmo\n\n.. cpp:class:: r_policy\n\n   Replacement policy.\n\n   A replacement policy establishes\n   how, during migration within an :cpp:class:`~pagmo::archipelago`,\n   a group of migrants replaces individuals in an existing\n   :cpp:class:`~pagmo::population`. In other words, a replacement\n   policy is tasked with producing a new set of individuals from\n   an original set of individuals and a set of candidate migrants.\n\n   Following the same schema adopted for :cpp:class:`~pagmo::problem`, :cpp:class:`~pagmo::algorithm`, etc.,\n   :cpp:class:`~pagmo::r_policy` exposes a type-erased generic\n   interface to *user-defined replacement policies* (or UDRP for short).\n   UDRPs are classes providing a certain set\n   of member functions that implement the logic of the replacement policy. Once\n   defined and instantiated, a UDRP can then be used to construct an instance of this class,\n   :cpp:class:`~pagmo::r_policy`, which\n   provides a generic interface to replacement policies for use by :cpp:class:`~pagmo::island`.\n\n   Every UDRP must implement at least the following member function:\n\n   .. code-block:: c++\n\n      individuals_group_t replace(const individuals_group_t &, const vector_double::size_type &,\n                                  const vector_double::size_type &, const vector_double::size_type &,\n                                  const vector_double::size_type &, const vector_double::size_type &,\n                                  const vector_double &, const individuals_group_t &) const;\n\n   The ``replace()`` function takes in input the following parameters:\n\n   * a group of individuals *inds* (represented as an :cpp:type:`~pagmo::individuals_group_t`),\n   * a set of arguments describing the properties of the :cpp:class:`~pagmo::problem` the individuals refer to:\n\n     * the total dimension *nx*,\n     * the integral dimension *nix*,\n     * the number of objectives *nobj*,\n     * the number of equality constraints *nec*,\n     * the number of inequality constraints *nic*,\n     * the problem's constraint tolerances *tol*,\n\n   * a set of migrants *mig*,\n\n   and it produces in output another set of individuals resulting from replacing individuals in *inds* with\n   individuals from *mig* (following some logic established by the UDRP).\n\n   In addition to providing the above member function, a UDRP must also be default, copy and move constructible.\n\n   Additional optional member functions can be implemented in a UDRP:\n\n   .. code-block:: c++\n\n      std::string get_name() const;\n      std::string get_extra_info() const;\n\n   See the documentation of the corresponding member functions in this class for details on how the optional\n   member functions in the UDRP are used by :cpp:class:`~pagmo::r_policy`.\n\n   Replacement policies are used in asynchronous operations involving migration in archipelagos,\n   and thus they need to provide a certain degree of thread safety. Specifically, the\n   ``replace()`` member function of the UDRP might be invoked concurrently with\n   any other member function of the UDRP interface (except for the destructor, the move\n   constructor, and, if implemented, the deserialisation function). It is up to the\n   authors of user-defined replacement policies to ensure that this safety requirement is satisfied.\n\n   .. warning::\n\n      The only operations allowed on a moved-from :cpp:class:`pagmo::r_policy` are destruction,\n      assignment, and the invocation of the :cpp:func:`~pagmo::r_policy::is_valid()` member function.\n      Any other operation will result in undefined behaviour.\n\n   .. cpp:function:: r_policy()\n\n      Default constructor.\n\n      The default constructor will initialize an :cpp:class:`~pagmo::r_policy` containing a\n      :cpp:class:`~pagmo::fair_replace` replacement policy.\n\n      :exception unspecified: any exception raised by the constructor from a generic UDRP.\n\n   .. cpp:function:: r_policy(const r_policy &)\n   .. cpp:function:: r_policy(r_policy &&) noexcept\n   .. cpp:function:: r_policy &operator=(const r_policy &)\n   .. cpp:function:: r_policy &operator=(r_policy &&) noexcept\n\n      :cpp:class:`~pagmo::r_policy` is copy/move constructible, and copy/move assignable.\n      Copy construction/assignment will perform deep copies, move operations will leave the moved-from object in\n      a state which is destructible and assignable.\n\n      :exception unspecified: when performing copy operations, any exception raised by the UDRP upon copying, or by memory allocation failures.\n\n   .. cpp:function:: template <typename T> explicit r_policy(T &&x)\n\n      Generic constructor from a UDRP.\n\n      This constructor participates in overload resolution only if ``T``, after the removal of reference\n      and cv qualifiers, is not :cpp:class:`~pagmo::r_policy` and if it satisfies :cpp:class:`pagmo::is_udrp`.\n\n      This constructor will construct an :cpp:class:`~pagmo::r_policy` from the UDRP (user-defined replacement policy)\n      *x* of type ``T``. The input parameter *x* will be perfectly forwarded to construct the internal UDRP instance.\n\n      :param x: the input UDRP.\n\n      :exception unspecified: any exception thrown by the public API of the UDRP, or by memory allocation failures.\n\n   .. cpp:function:: template <typename T> r_policy &operator=(T &&x)\n\n      Generic assignment operator from a UDRP.\n\n      This operator participates in overload resolution only if ``T``, after the removal of reference\n      and cv qualifiers, is not :cpp:class:`~pagmo::r_policy` and if it satisfies :cpp:class:`pagmo::is_udrp`.\n\n      This operator will set the internal UDRP to *x* by constructing an :cpp:class:`~pagmo::r_policy` from *x*,\n      and then move-assigning the result to *this*.\n\n      :param x: the input UDRP.\n\n      :return: a reference to *this*.\n\n      :exception unspecified: any exception thrown by the generic constructor from a UDRP.\n\n   .. cpp:function:: template <typename T> const T *extract() const noexcept\n   .. cpp:function:: template <typename T> T *extract() noexcept\n\n      Extract a (const) pointer to the internal UDRP instance.\n\n      If ``T`` is the type of the UDRP currently stored within this object, then this function\n      will return a (const) pointer to the internal UDRP instance. Otherwise, ``nullptr`` will be returned.\n\n      The returned value is a raw non-owning pointer: the lifetime of the pointee is tied to the lifetime\n      of ``this``, and ``delete`` must never be called on the pointer.\n\n      .. warning::\n\n         The non-const overload of this function is provided only in order to allow to call non-const\n         member functions on the internal UDRP instance. Assigning a new UDRP via pointers obtained\n         through this function is undefined behaviour.\n\n      :return: a (const) pointer to the internal UDRP instance, or ``nullptr``.\n\n   .. cpp:function:: template <typename T> bool is() const noexcept\n\n      Check the type of the UDRP.\n\n      :return: ``true`` if ``T`` is the type of the UDRP currently stored within this object, ``false`` otherwise.\n\n   .. cpp:function:: individuals_group_t replace(const individuals_group_t &inds, const vector_double::size_type &nx, \\\n         const vector_double::size_type &nix, const vector_double::size_type &nobj, \\\n         const vector_double::size_type &nec, const vector_double::size_type &nic, \\\n         const vector_double &tol, const individuals_group_t &mig) const\n\n      Replace individuals in a group with migrants from another group.\n\n      This member function will invoke the ``replace()`` member function of the UDRP.\n      Given a set of individuals, *inds*, and a set of migrants, *mig*, the ``replace()`` member function of the UDRP\n      is expected to replace individuals in *inds*\n      with individuals from *mig*, and return the new set of individuals resulting from the replacement.\n      The other arguments of this member function describe the properties of the :cpp:class:`~pagmo::problem`\n      that the individuals in *inds* and *mig* refer to.\n\n      In addition to invoking the ``replace()`` member function of the UDRP, this function will also\n      perform a variety of sanity checks on both the input arguments and on the output produced by the\n      UDRP.\n\n      :param inds: the original group of individuals.\n      :param nx: the dimension of the problem *inds* and *mig* refer to.\n      :param nix: the integral dimension of the problem *inds* and *mig* refer to.\n      :param nobj: the number of objectives of the problem *inds* and *mig* refer to.\n      :param nec: the number of equality constraints of the problem *inds* and *mig* refer to.\n      :param nic: the number of inequality constraints of the problem *inds* and *mig* refer to.\n      :param tol: the vector of constraints tolerances of the problem *inds* and *mig* refer to.\n      :param mig: the group of migrants.\n\n      :return: a new set of individuals resulting from replacing individuals in *inds* with individuals from *mig*.\n\n      :exception std\\:\\:invalid_argument: if either:\n\n         * *inds*, *mig* or the return value are not consistent with the problem properties,\n         * the ID, decision and fitness vectors in *inds*, *mig* or the return value have inconsistent sizes,\n         * the problem properties are invalid (e.g., *nobj* is zero, *nix* > *nx*, etc.).\n\n      :exception unspecified: any exception raised by the ``replace()`` member function of the UDRP.\n\n   .. cpp:function:: std::string get_name() const\n\n      Get the name of this replacement policy.\n\n      If the UDRP satisfies :cpp:class:`pagmo::has_name`, then this member function will return the output of its ``get_name()`` member function.\n      Otherwise, an implementation-defined name based on the type of the UDRP will be returned.\n\n      :return: the name of this replacement policy.\n\n      :exception unspecified: any exception thrown by copying an ``std::string`` object.\n\n   .. cpp:function:: std::string get_extra_info() const\n\n      Extra info for this replacement policy.\n\n      If the UDRP satisfies :cpp:class:`pagmo::has_extra_info`, then this member function will return the output of its\n      ``get_extra_info()`` member function. Otherwise, an empty string will be returned.\n\n      :return: extra info about the UDRP.\n\n      :exception unspecified: any exception thrown by the ``get_extra_info()`` member function of the UDRP, or by copying an ``std::string`` object.\n\n   .. cpp:function:: bool is_valid() const\n\n      Check if this replacement policy is in a valid state.\n\n      :return: ``false`` if *this* was moved from, ``true`` otherwise.\n\n   .. cpp:function:: std::type_index get_type_index() const\n\n      .. versionadded:: 2.15\n\n      Get the type of the UDRP.\n\n      This function will return the type\n      of the UDRP stored within this :cpp:class:`~pagmo::r_policy`\n      instance.\n\n      :return: the type of the UDRP.\n\n   .. cpp:function:: const void *get_ptr() const\n   .. cpp:function:: void *get_ptr()\n\n      .. versionadded:: 2.15\n\n      Get a pointer to the UDRP.\n\n      These functions will return a raw (const) pointer\n      to the internal UDRP instance. Differently from\n      the :cpp:func:`~pagmo::r_policy::extract()` overloads, these functions\n      do not require to pass the correct type\n      in input. It is however the user's responsibility\n      to cast the returned void pointer to the correct type.\n\n      .. note::\n\n         The returned value is a raw non-owning pointer: the lifetime of the pointee is tied to the lifetime\n         of ``this``, and ``delete`` must never be called on the pointer.\n\n      .. note::\n\n         The ability to extract a mutable pointer is provided only in order to allow to call non-const\n         methods on the internal UDRP instance. Assigning a new UDRP via this pointer is undefined behaviour.\n\n      :return: a pointer to the internal UDRP.\n\nFunctions\n---------\n\n.. cpp:function:: std::ostream &operator<<(std::ostream &os, const r_policy &r)\n\n   Stream insertion operator.\n\n   This function will direct to *os* a human-readable representation of the input\n   :cpp:class:`~pagmo::r_policy` *r*.\n\n   :param os: the input ``std::ostream``.\n   :param r: the replacement policy that will be directed to *os*.\n\n   :return: a reference to *os*.\n\n   :exception unspecified: any exception thrown by querying various properties of the replacement policy and directing them to *os*.\n\nAssociated type traits\n----------------------\n\n.. cpp:class:: template <typename T> has_replace\n\n   The :cpp:any:`value` of this type trait will be ``true`` if\n   ``T`` provides a member function with signature:\n\n   .. code-block:: c++\n\n      individuals_group_t replace(const individuals_group_t &, const vector_double::size_type &,\n                                  const vector_double::size_type &, const vector_double::size_type &,\n                                  const vector_double::size_type &, const vector_double::size_type &,\n                                  const vector_double &, const individuals_group_t &) const;\n\n   The ``replace()`` member function is part of the interface for the definition of an\n   :cpp:class:`~pagmo::r_policy`.\n\n   .. cpp:member:: static const bool value\n\n      The value of the type trait.\n\n.. cpp:class:: template <typename T> is_udrp\n\n   This type trait detects if ``T`` is a user-defined replacement policy (or UDRP).\n\n   Specifically, the :cpp:any:`value` of this type trait will be ``true`` if:\n\n   * ``T`` is not a reference or cv qualified,\n   * ``T`` is destructible, default, copy and move constructible, and\n   * ``T`` satisfies :cpp:class:`pagmo::has_replace`.\n\n   .. cpp:member:: static const bool value\n\n      The value of the type trait.\n\n.. cpp:namespace-pop::\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF68:7A4F8:17BC43:5CD6E4:6AB92093"},"text_sha256":"aef61b139e0612c95dbc8e5a689cbc1da48b123c6c255efd2a20ed35f6b747cc"},{"path":"doc/sphinx/docs/cpp/s_policy.rst","size":13134,"blob_sha":"d1bb3a464509c9dd349abbf3458d1cb90bc0e66e","priority":1,"status":200,"text":"Selection policy\n================\n\n.. versionadded:: 2.11\n\n*#include <pagmo/s_policy.hpp>*\n\n.. cpp:namespace-push:: pagmo\n\n.. cpp:class:: s_policy\n\n   Selection policy.\n\n   A selection policy establishes\n   how, during migration within an :cpp:class:`~pagmo::archipelago`,\n   candidate migrants are selected from an :cpp:class:`~pagmo::island`.\n\n   Following the same schema adopted for :cpp:class:`~pagmo::problem`, :cpp:class:`~pagmo::algorithm`, etc.,\n   :cpp:class:`~pagmo::s_policy` exposes a type-erased generic\n   interface to *user-defined selection policies* (or UDSP for short).\n   UDSPs are classes providing a certain set\n   of member functions that implement the logic of the selection policy. Once\n   defined and instantiated, a UDSP can then be used to construct an instance of this class,\n   :cpp:class:`~pagmo::s_policy`, which\n   provides a generic interface to selection policies for use by :cpp:class:`~pagmo::island`.\n\n   Every UDSP must implement at least the following member function:\n\n   .. code-block:: c++\n\n      individuals_group_t select(const individuals_group_t &, const vector_double::size_type &,\n                                 const vector_double::size_type &, const vector_double::size_type &,\n                                 const vector_double::size_type &, const vector_double::size_type &,\n                                 const vector_double &) const;\n\n   The ``select()`` function takes in input the following parameters:\n\n   * a group of individuals *inds* (represented as an :cpp:type:`~pagmo::individuals_group_t`),\n   * a set of arguments describing the properties of the :cpp:class:`~pagmo::problem` the individuals refer to:\n\n     * the total dimension *nx*,\n     * the integral dimension *nix*,\n     * the number of objectives *nobj*,\n     * the number of equality constraints *nec*,\n     * the number of inequality constraints *nic*,\n     * the problem's constraint tolerances *tol*,\n\n   and it produces in output another set of individuals resulting from selecting individuals in *inds*\n   (following some logic established by the UDSP).\n\n   In addition to providing the above member function, a UDSP must also be default, copy and move constructible.\n\n   Additional optional member functions can be implemented in a UDSP:\n\n   .. code-block:: c++\n\n      std::string get_name() const;\n      std::string get_extra_info() const;\n\n   See the documentation of the corresponding member functions in this class for details on how the optional\n   member functions in the UDSP are used by :cpp:class:`~pagmo::s_policy`.\n\n   Selection policies are used in asynchronous operations involving migration in archipelagos,\n   and thus they need to provide a certain degree of thread safety. Specifically, the\n   ``select()`` member function of the UDSP might be invoked concurrently with\n   any other member function of the UDSP interface (except for the destructor, the move\n   constructor, and, if implemented, the deserialisation function). It is up to the\n   authors of user-defined selection policies to ensure that this safety requirement is satisfied.\n\n   .. warning::\n\n      The only operations allowed on a moved-from :cpp:class:`pagmo::s_policy` are destruction,\n      assignment, and the invocation of the :cpp:func:`~pagmo::s_policy::is_valid()` member function.\n      Any other operation will result in undefined behaviour.\n\n   .. cpp:function:: s_policy()\n\n      Default constructor.\n\n      The default constructor will initialize an :cpp:class:`~pagmo::s_policy` containing a\n      :cpp:class:`~pagmo::select_best` selection policy.\n\n      :exception unspecified: any exception raised by the constructor from a generic UDSP.\n\n   .. cpp:function:: s_policy(const s_policy &)\n   .. cpp:function:: s_policy(s_policy &&) noexcept\n   .. cpp:function:: s_policy &operator=(const s_policy &)\n   .. cpp:function:: s_policy &operator=(s_policy &&) noexcept\n\n      :cpp:class:`~pagmo::s_policy` is copy/move constructible, and copy/move assignable.\n      Copy construction/assignment will perform deep copies, move operations will leave the moved-from object in\n      a state which is destructible and assignable.\n\n      :exception unspecified: when performing copy operations, any exception raised by the UDSP upon copying, or by memory allocation failures.\n\n   .. cpp:function:: template <typename T> explicit s_policy(T &&x)\n\n      Generic constructor from a UDSP.\n\n      This constructor participates in overload resolution only if ``T``, after the removal of reference\n      and cv qualifiers, is not :cpp:class:`~pagmo::s_policy` and if it satisfies :cpp:class:`pagmo::is_udsp`.\n\n      This constructor will construct an :cpp:class:`~pagmo::s_policy` from the UDSP (user-defined selection policy)\n      *x* of type ``T``. The input parameter *x* will be perfectly forwarded to construct the internal UDSP instance.\n\n      :param x: the input UDSP.\n\n      :exception unspecified: any exception thrown by the public API of the UDSP, or by memory allocation failures.\n\n   .. cpp:function:: template <typename T> s_policy &operator=(T &&x)\n\n      Generic assignment operator from a UDSP.\n\n      This operator participates in overload resolution only if ``T``, after the removal of reference\n      and cv qualifiers, is not :cpp:class:`~pagmo::s_policy` and if it satisfies :cpp:class:`pagmo::is_udsp`.\n\n      This operator will set the internal UDSP to *x* by constructing an :cpp:class:`~pagmo::s_policy` from *x*,\n      and then move-assigning the result to *this*.\n\n      :param x: the input UDSP.\n\n      :return: a reference to *this*.\n\n      :exception unspecified: any exception thrown by the generic constructor from a UDSP.\n\n   .. cpp:function:: template <typename T> const T *extract() const noexcept\n   .. cpp:function:: template <typename T> T *extract() noexcept\n\n      Extract a (const) pointer to the internal UDSP instance.\n\n      If ``T`` is the type of the UDSP currently stored within this object, then this function\n      will return a (const) pointer to the internal UDSP instance. Otherwise, ``nullptr`` will be returned.\n\n      The returned value is a raw non-owning pointer: the lifetime of the pointee is tied to the lifetime\n      of ``this``, and ``delete`` must never be called on the pointer.\n\n      .. warning::\n\n         The non-const overload of this function is provided only in order to allow to call non-const\n         member functions on the internal UDSP instance. Assigning a new UDSP via pointers obtained\n         through this function is undefined behaviour.\n\n      :return: a (const) pointer to the internal UDSP instance, or ``nullptr``.\n\n   .. cpp:function:: template <typename T> bool is() const noexcept\n\n      Check the type of the UDSP.\n\n      :return: ``true`` if ``T`` is the type of the UDSP currently stored within this object, ``false`` otherwise.\n\n   .. cpp:function:: individuals_group_t select(const individuals_group_t &inds, const vector_double::size_type &nx, \\\n         const vector_double::size_type &nix, const vector_double::size_type &nobj, \\\n         const vector_double::size_type &nec, const vector_double::size_type &nic, \\\n         const vector_double &tol) const\n\n      Select individuals from a group.\n\n      This member function will invoke the ``select()`` member function of the UDSP.\n      Given a set of individuals, *inds*, the ``select()`` member function of the UDSP\n      is expected to return a new set of individuals selected from *inds*.\n      The other arguments of this member function describe the properties of the :cpp:class:`~pagmo::problem`\n      that the individuals in *inds* refer to.\n\n      In addition to invoking the ``select()`` member function of the UDSP, this function will also\n      perform a variety of sanity checks on both the input arguments and on the output produced by the\n      UDSP.\n\n      :param inds: the original group of individuals.\n      :param nx: the dimension of the problem *inds* refers to.\n      :param nix: the integral dimension of the problem *inds* refers to.\n      :param nobj: the number of objectives of the problem *inds* refers to.\n      :param nec: the number of equality constraints of the problem *inds* refers to.\n      :param nic: the number of inequality constraints of the problem *inds* refers to.\n      :param tol: the vector of constraints tolerances of the problem *inds* refers to.\n\n      :return: a new set of individuals resulting from selecting individuals in *inds*.\n\n      :exception std\\:\\:invalid_argument: if either:\n\n         * *inds* or the return value are not consistent with the problem properties,\n         * the ID, decision and fitness vectors in *inds* or the return value have inconsistent sizes,\n         * the problem properties are invalid (e.g., *nobj* is zero, *nix* > *nx*, etc.).\n\n      :exception unspecified: any exception raised by the ``select()`` member function of the UDSP.\n\n   .. cpp:function:: std::string get_name() const\n\n      Get the name of this selection policy.\n\n      If the UDSP satisfies :cpp:class:`pagmo::has_name`, then this member function will return the output of its ``get_name()`` member function.\n      Otherwise, an implementation-defined name based on the type of the UDSP will be returned.\n\n      :return: the name of this selection policy.\n\n      :exception unspecified: any exception thrown by copying an ``std::string`` object.\n\n   .. cpp:function:: std::string get_extra_info() const\n\n      Extra info for this selection policy.\n\n      If the UDSP satisfies :cpp:class:`pagmo::has_extra_info`, then this member function will return the output of its\n      ``get_extra_info()`` member function. Otherwise, an empty string will be returned.\n\n      :return: extra info about the UDSP.\n\n      :exception unspecified: any exception thrown by the ``get_extra_info()`` member function of the UDSP, or by copying an ``std::string`` object.\n\n   .. cpp:function:: bool is_valid() const\n\n      Check if this selection policy is in a valid state.\n\n      :return: ``false`` if *this* was moved from, ``true`` otherwise.\n\n   .. cpp:function:: std::type_index get_type_index() const\n\n      .. versionadded:: 2.15\n\n      Get the type of the UDSP.\n\n      This function will return the type\n      of the UDSP stored within this :cpp:class:`~pagmo::s_policy`\n      instance.\n\n      :return: the type of the UDSP.\n\n   .. cpp:function:: const void *get_ptr() const\n   .. cpp:function:: void *get_ptr()\n\n      .. versionadded:: 2.15\n\n      Get a pointer to the UDSP.\n\n      These functions will return a raw (const) pointer\n      to the internal UDSP instance. Differently from\n      the :cpp:func:`~pagmo::s_policy::extract()` overloads, these functions\n      do not require to pass the correct type\n      in input. It is however the user's responsibility\n      to cast the returned void pointer to the correct type.\n\n      .. note::\n\n         The returned value is a raw non-owning pointer: the lifetime of the pointee is tied to the lifetime\n         of ``this``, and ``delete`` must never be called on the pointer.\n\n      .. note::\n\n         The ability to extract a mutable pointer is provided only in order to allow to call non-const\n         methods on the internal UDSP instance. Assigning a new UDSP via this pointer is undefined behaviour.\n\n      :return: a pointer to the internal UDSP.\n\nFunctions\n---------\n\n.. cpp:function:: std::ostream &operator<<(std::ostream &os, const s_policy &s)\n\n   Stream insertion operator.\n\n   This function will direct to *os* a human-readable representation of the input\n   :cpp:class:`~pagmo::s_policy` *s*.\n\n   :param os: the input ``std::ostream``.\n   :param s: the selection policy that will be directed to *os*.\n\n   :return: a reference to *os*.\n\n   :exception unspecified: any exception thrown by querying various properties of the selection policy and directing them to *os*.\n\nAssociated type traits\n----------------------\n\n.. cpp:class:: template <typename T> has_select\n\n   The :cpp:any:`value` of this type trait will be ``true`` if\n   ``T`` provides a member function with signature:\n\n   .. code-block:: c++\n\n      individuals_group_t select(const individuals_group_t &, const vector_double::size_type &,\n                                 const vector_double::size_type &, const vector_double::size_type &,\n                                 const vector_double::size_type &, const vector_double::size_type &,\n                                 const vector_double &) const;\n\n   The ``select()`` member function is part of the interface for the definition of an\n   :cpp:class:`~pagmo::s_policy`.\n\n   .. cpp:member:: static const bool value\n\n      The value of the type trait.\n\n.. cpp:class:: template <typename T> is_udsp\n\n   This type trait detects if ``T`` is a user-defined selections policy (or UDSP).\n\n   Specifically, the :cpp:any:`value` of this type trait will be ``true`` if:\n\n   * ``T`` is not a reference or cv qualified,\n   * ``T`` is destructible, default, copy and move constructible, and\n   * ``T`` satisfies :cpp:class:`pagmo::has_select`.\n\n   .. cpp:member:: static const bool value\n\n      The value of the type trait.\n\n.. cpp:namespace-pop::\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4BBA:09BF:AB0E2:2C6EE8:6AB9209C"},"text_sha256":"f7a45e6bc7dc6c686a9ab7f14b2e3bbead2ca0964351cfbbe2ab69d6d8fa0a47"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jenetics/jenetics","input_row":{"repository":"jenetics/jenetics","url":"https://github.com/jenetics/jenetics","name":"jenetics","owner":"jenetics","description":"Jenetics - Genetic Algorithm, Genetic Programming, Grammatical Evolution, Evolutionary Algorithm, and Multi-objective Optimization","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":909,"issues":529,"created_at":"2013-12-21T21:24:50Z","updated_at":"2026-09-22T15:02:49Z","first_commit_at":"2008-03-25T18:31:59Z","last_commit_at":"2026-09-03T09:29:49Z","activity_months":221.28,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:03.325Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jenetics/jenetics","visibility":"public","created_at":"2013-12-21T21:24:50Z","updated_at":"2026-09-22T15:02:49Z","private":false,"fork":false,"archived":false,"stargazers_count":909,"open_issues_count":31,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3439","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:17D5B1D:1BF44D5:6AB9282F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3438","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090B:35C5DA:1788AC4:1BA63BF:6AB9282F"},"commit":{"sha":"e8e67db432368b98521748803edb98c5bfe0fa04","url":"https://github.com/jenetics/jenetics/commit/e8e67db432368b98521748803edb98c5bfe0fa04","date":"2018-05-24T19:07:05Z","author_date":"2018-05-24T19:07:05Z","committer_date":"2018-05-24T19:07:05Z","tree_sha":"398308d592525825a32d83eb5d2ae8000f685040","message_first_line":"Add missing reflection test."},"tree_request_status":200,"tree_rate":{"github_remaining":"3437","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:17BC08D:1BDA8B7:6AB92830"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18421,"blob_sha":"8ddca33b64cc121e902bb46f6ef6c4be703885ae","priority":0}],"documents":[{"path":"README.md","size":18421,"blob_sha":"8ddca33b64cc121e902bb46f6ef6c4be703885ae","priority":0,"status":200,"text":"# Jenetics\n\n[![Build Status](https://travis-ci.org/jenetics/jenetics.svg?branch=master)](https://travis-ci.org/jenetics/jenetics)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.jenetics/jenetics/badge.svg)](http://search.maven.org/#search|ga|1|a%3A%22jenetics%22)\n[![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics)\n\n**Jenetics** is an **Genetic Algorithm**, **Evolutionary Algorithm** and **Genetic Programming** library, respectively, written in Java. It is designed with a clear separation of the several concepts of the algorithm, e.g. `Gene`, `Chromosome`, `Genotype`, `Phenotype`, `Population` and fitness `Function`. **Jenetics** allows you to minimize and maximize the given fitness function without tweaking it. In contrast to other GA implementations, the library uses the concept of an evolution stream (`EvolutionStream`) for executing the evolution steps. Since the `EvolutionStream` implements the Java Stream interface, it works smoothly with the rest of the Java Stream API.\n\n**Other languages**\n\n* [**Jenetics.Net**](https://github.com/rmeindl/jenetics.net): Experimental .NET Core port in C# of the base library. \n\n## Documentation\n\nThe library is fully documented ([javadoc](http://jenetics.io/javadoc/jenetics/4.2/index.html)) and comes with an user manual ([pdf](http://jenetics.io/manual/manual-4.2.0.pdf)).\n\n\n## Requirements\n\n### Runtime\n*  **JRE 8**: Java runtime version 8 is needed for using the library, respectively for running the examples.\n\n### Build time\n*  **JDK 8**: The Java [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) must be installed.\n*  **Gradle 4.x**: [Gradle](http://www.gradle.org/) is used for building the library. (Gradle is download automatically, if you are using the Gradle Wrapper script `./gradlew`, located in the base directory, for building the library.)\n\n### Test compile/execution\n*  **TestNG 6.x**: Jenetics uses [TestNG](http://testng.org/doc/index.html) framework for unit tests.\n*  **Apache Commons Math 3.6**: [Library](http://commons.apache.org/proper/commons-math/) is used for testing statistical collectors.\n\n## Build Jenetics\n\nFor building the Jenetics library from source, download the most recent, stable package version from [Github](https://github.com/jenetics/jenetics/releases/download/v4.2.0/jenetics-4.2.0.zip) (or [Sourceforge](https://sourceforge.net/projects/jenetics/files/latest/download)) and extract it to some build directory.\n\n    $ unzip jenetics-<version>.zip -d <builddir>\n\n`<version>` denotes the actual Jenetics version and `<builddir>` the actual build directory. Alternatively you can check out the master branch from Github.\n\n    $ git clone https://github.com/jenetics/jenetics.git <builddir>\n\nJenetics uses [Gradle](http://www.gradle.org/downloads) as build system and organizes the source into *sub*-projects (modules). Each sub-project is located in it’s own sub-directory:\n\n**Published projects**\n\nThe following projects/modules are also published to Maven.\n\n* **[jenetics](jenetics)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics): This project contains the source code and tests for the Jenetics core-module.\n* **[jenetics.ext](jenetics.ext)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.ext): This module contains additional _non_-standard GA operations and data types. It also contains classes for solving multi-objective problems (MOEA). \n* **[jenetics.prog](jenetics.prog)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.prog): The modules contains classes which allows to do genetic programming (GP). It seamlessly works with the existing `EvolutionStream` and evolution `Engine`.\n* **[jenetics.xml](jenteics,xml)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.xml): XML marshalling module for the _Jenetics_ base data structures.\n\n**Non-published projects**\n\n* **jenetics.example**: This project contains example code for the *core*-module.\n* **jenetics.doc**: Contains the code of the web-site and the manual.\n* **jenetics.tool**: This module contains classes used for doing integration testing and algorithmic performance testing. It is also used for creating GA performance measures and creating diagrams from the performance measures.\n\nFor building the library change into the `<builddir>` directory (or one of the module directory) and call one of the available tasks:\n\n* **compileJava**: Compiles the Jenetics sources and copies the class files to the `<builddir>/<module-dir>/build/classes/main` directory.\n* **jar**: Compiles the sources and creates the JAR files. The artifacts are copied to the `<builddir>/<module-dir>/build/libs` directory.\n* **javadoc**: Generates the API documentation. The Javadoc is stored in the `<builddir>/<module-dir>/build/docs` directory\n* **test**: Compiles and executes the unit tests. The test results are printed onto the console and a test-report, created by TestNG, is written to `<builddir>/<module-dir>` directory.\n* **clean**: Deletes the `<builddir>/build/*` directories and removes all generated artifacts.\n\nFor building the library jar from the source call\n\n    $ cd <build-dir>\n    $ ./gradlew jar\n\n\n## Example\n\n### Hello World (Ones counting)\n\nThe minimum evolution Engine setup needs a genotype factory, `Factory<Genotype<?>>`, and a fitness `Function`. The `Genotype` implements the `Factory` interface and can therefore be used as prototype for creating the initial `Population` and for creating new random `Genotypes`.\n\n```java\nimport io.jenetics.BitChromosome;\nimport io.jenetics.BitGene;\nimport io.jenetics.Genotype;\nimport io.jenetics.engine.Engine;\nimport io.jenetics.engine.EvolutionResult;\nimport io.jenetics.util.Factory;\n\npublic class HelloWorld {\n    // 2.) Definition of the fitness function.\n    private static Integer eval(Genotype<BitGene> gt) {\n        return gt.getChromosome()\n            .as(BitChromosome.class)\n            .bitCount();\n    }\n\n    public static void main(String[] args) {\n        // 1.) Define the genotype (factory) suitable\n        //     for the problem.\n        Factory<Genotype<BitGene>> gtf =\n            Genotype.of(BitChromosome.of(10, 0.5));\n\n        // 3.) Create the execution environment.\n        Engine<BitGene, Integer> engine = Engine\n            .builder(HelloWorld::eval, gtf)\n            .build();\n\n        // 4.) Start the execution (evolution) and\n        //     collect the result.\n        Genotype<BitGene> result = engine.stream()\n            .limit(100)\n            .collect(EvolutionResult.toBestGenotype());\n\n        System.out.println(\"Hello World:\\n\" + result);\n    }\n}\n```\n\nIn contrast to other GA implementations, the library uses the concept of an evolution stream (`EvolutionStream`) for executing the evolution steps. Since the `EvolutionStream` implements the Java Stream interface, it works smoothly with the rest of the Java streaming API. Now let's have a closer look at listing above and discuss this simple program step by step:\n\n1. The probably most challenging part, when setting up a new evolution `Engine`, is to transform the problem domain into a appropriate `Genotype` (factory) representation. In our example we want to count the number of ones of a `BitChromosome`. Since we are counting only the ones of one chromosome, we are adding only one `BitChromosome` to our `Genotype`. In general, the `Genotype` can be created with 1 to n chromosomes.\n\n1. Once this is done, the fitness function which should be maximized, can be defined. Utilizing the new language features introduced in Java 8, we simply write a private static method, which takes the genotype we defined and calculate it's fitness value. If we want to use the optimized bit-counting method, `bitCount()`, we have to cast the `Chromosome<BitGene>` class to the actual used `BitChromosome` class. Since we know for sure that we created the Genotype with a `BitChromosome`, this can be done safely. A reference to the eval method is then used as fitness function and passed to the `Engine.build` method.\n\n1. In the third step we are creating the evolution `Engine`, which is responsible for changing, respectively evolving, a given population. The `Engine` is highly configurable and takes parameters for controlling the evolutionary and the computational environment. For changing the evolutionary behavior, you can set different alterers and selectors. By changing the used `Executor` service, you control the number of threads, the Engine is allowed to use. An new `Engine` instance can only be created via its builder, which is created by calling the `Engine.builder` method.\n\n1. In the last step, we can create a new `EvolutionStream` from our `Engine`. The `EvolutionStream` is the model or view of the evolutionary process. It serves as a »process handle« and also allows you, among other things, to control the termination of the evolution. In our example, we simply truncate the stream after 100 generations. If you don't limit the stream, the `EvolutionStream` will not terminate and run forever. Since the `EvolutionStream` extends the `java.util.stream.Stream` interface, it integrates smoothly with the rest of the Java Stream API. The final result, the best `Genotype` in our example, is then collected with one of the predefined collectors of the `EvolutionResult` class.\n\n\n### Evolving images\n\nThis example tries to approximate a given image by semitransparent polygons.  It comes with an Swing UI, where you can immediately start your own experiments. After compiling the sources with\n\n    $ ./gradlew compileTestJava\n\nyou can start the example by calling\n\n    $ ./jrun io.jenetics.example.image.EvolvingImages\n\n![Evolving images](https://raw.githubusercontent.com/jenetics/jenetics/master/jenetics.doc/src/main/resources/graphic/EvolvingImagesExampleScreenShot.png)\n\nThe previous image shows the GUI after evolving the default image for about 4,000 generations. With the »Open« button it is possible to load other images for polygonization. The »Save« button allows to store polygonized images in PNG format to disk. At the button of the UI, you can change some of the GA parameters of the example.\n\n\n## Projects using Jenetics\n\n* <a href=\"https://www.chartsy.one/\"><b>Chartsy|One<\/b>:<\/a> Chartsy|One is a Netbeans based tool for stock market investors and traders.\n* <a href=\"http://chronetic.io/\"><b>Chronetic<\/b>:<\/a> Chronetic is an open-source time pattern analysis library built to describe time-series data.\n* <a href=\"http://www.eclipse.org/app4mc/\"><b>APP4MC<\/b>:<\/a> Eclipse APP4MC is a platform for engineering embedded multi- and many-core software systems.\n\n## Citations\n\n* W. Geithner, Z. Andelkovic, S. Appel, O. Geithner, F. Herfurth, S. Reimann, G. Vorobjev, F. Wilhelmstötter. [Genetic Algorithms for Machine Optimization in the Fair Control System Environment.](http://ipac2018.vrws.de/papers/thpml028.pdf)<em> [The 9th International Particle Accelerator Conference (IPAC'18)](https://ipac18.org/welcome/), <\/em><\/a> May 2018.\n* Stephan Pirnbaum. [Die Evolution im Algorithmus - Teil 1: Grundlagen.](http://www.buschmais.de/wp-content/uploads/2018/02/Die-Evolution-im-Algorithmus_JS_01_18.pdf) <a href=\"https://www.sigs-datacom.de/digital/javaspektrum/\"><em>JavaSPEKTRUM 01/2018, pp 64–68, <\/em><\/a> Jan. 2018.\n* Alexander Felfernig, Rouven Walter, José A. Galindo, David Benavides, Seda Polat Erdeniz, Müslüm Atas, Stefan Reiterer. <a href=\"https://link.springer.com/article/10.1007/s10844-017-0492-1\">Anytime diagnosis for reconfiguration. <\/a> <em>Journal of Intelligent Information Systems, pp 1–22, <\/em> Jan. 2018.\n* Bruce A. Johnson. <a href=\"https://link.springer.com/protocol/10.1007/978-1-4939-7386-6_13\">From Raw Data to Protein Backbone Chemical Shifts Using NMRFx Processing and NMRViewJ Analysis. <\/a> <em>Protein NMR: Methods and Protocols, pp. 257--310, Springer New York, <\/em> Nov. 2017.\n* Cuadra P., Krawczyk L., Höttger R., Heisig P., Wolff C. <a href=\"https://link.springer.com/chapter/10.1007/978-3-319-67642-5_30\">Automated Scheduling for Tightly-Coupled Embedded Multi-core Systems Using Hybrid Genetic Algorithms. <\/a> <em>Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania.<\/em> Communications in Computer and Information Science, vol 756. Springer, Cham, Sep. 2017.\n* Michael Trotter, Guyue Liu, Timothy Wood. <a href=\"http://ieeexplore.ieee.org/abstract/document/8064120/\">Into the Storm: Descrying Optimal Configurations Using Genetic Algorithms and Bayesian Optimization. <\/a> <em><a href=\"http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=8063634\">Foundations and Applications of Self* Systems (FAS*W), 2017 IEEE 2nd International Workshops<\/a><\/em> Sep. 2017.\n* Emna Hachicha, Karn Yongsiriwit, Mohamed Sellami. <a href=\"https://doi.org/10.1109/ICWS.2017.101\">Genetic-Based Configurable Cloud Resource Allocation in QoS-Aware Business Process Development. <\/a> <em>Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania.<\/em> Web Services (ICWS), 2017 IEEE International Conference, Jun. 2017.\n* Abraão G. Nazário, Fábio R. A. Silva, Raimundo Teive, Leonardo Villa, Antônio Flávio, João Zico, Eire Fragoso, Ederson F. Souza. <a href=\"http://siaiap32.univali.br/seer/index.php/acotb/article/view/10579/5933\">Automação Domótica Simulada Utilizando Algoritmo Genético Especializado na Redução do Consumo de Energia. <\/a> <em>Computer on the Beach 2017<\/em> pp. 180-189, March 2017.\n* Bandaru, S. and Deb, K. <a href=\"http://dx.doi.org/10.1201/9781315183176-12\">Metaheuristic Techniques.<\/a> <em>Decision Sciences.<\/em> CRC Press, pp. 693-750, Nov. 2016.\n* Lyazid Toumi, Abdelouahab Moussaoui, and Ahmet Ugur. <a href=\"http://dx.doi.org/10.1145/2816839.2816876\">EMeD-Part: An Efficient Methodology for Horizontal Partitioning in Data Warehouses.<\/a> <em>Proceedings of the International Conference on Intelligent Information Processing, Security and Advanced Communication.<\/em> Djallel Eddine Boubiche, Faouzi Hidoussi, and Homero Toral Cruz (Eds.). ACM, New York, NY, USA, Article 43, 7 pages, 2015.\n* Andreas Holzinger (Editor), Igo Jurisica (Editor). <a href=\"http://www.springer.com/computer/database+management+%26+information+retrieval/book/978-3-662-43967-8\">Interactive Knowledge Discovery and Data Mining in Biomedical Informatics.<\/a> <em>Lecture Notes in Computer Science, Vol. 8401.<\/em> <a href=\"http://www.springer.com\">Springer<\/a>, 2014.\n* Lyazid Toumi, Abdelouahab Moussaoui, Ahmet Ugur. <a href=\"http://link.springer.com/article/10.1007%2Fs11227-013-1058-9\">Particle swarm optimization for bitmap join indexes selection problem in data warehouses.<\/a> <em><a href=\"http://link.springer.com/journal/11227\">The Journal of Supercomputing<\/a>, Volume 68, <a href=\"http://link.springer.com/journal/11227/68/2/page/1\">Issue 2<\/a>, pp 672-708, May 2014.<\/em>\n* TANG Yi (Guangzhou Power Supply Bureau Limited, Guangzhou 511400, China) <a href=\"http://en.cnki.com.cn/Article_en/CJFDTOTAL-JXKF201210017.htm\"> <em>Study on Object-Oriented Reactive Compensation Allocation Optimization Algorithm for Distribution Networks<\/em><\/a>, Oct. 2012.\n* John M. Linebarger, Richard J. Detry, Robert J. Glass, Walter E. Beyeler, Arlo L. Ames, Patrick D. Finley, S. Louise Maffitt. <a href=\"http://prod.sandia.gov/techlib/access-control.cgi/2012/121117.pdf\"> <em>Complex Adaptive Systems of Systems Engineering Environment Version 1.0.  <\/em><\/a> <a href=\"http://www.sandia.gov/CasosEngineering/\">SAND REPORT<\/a>, Feb. 2012.\n\n## Blogs\n\n* <a href=\"http://www.baeldung.com/jenetics\">Introduction to Jenetics Library<\/a>, by <em>baeldung<\/em>, April 11. 2017\n* <a href=\"http://blog.takipi.com/how-to-solve-tough-problems-using-genetic-algorithms/\">How to Solve Tough Problems Using Genetic Algorithms<\/a>, by <em>Tzofia Shiftan<\/em>, April 6. 2017\n* <a href=\"http://fxapps.blogspot.co.at/2017/01/genetic-algorithms-with-java.html\">Genetic algorithms with Java<\/a>, by <em>William Antônio<\/em>, January 10. 2017\n* <a href=\"http://jdm.kr/blog/135\">Jenetics 설치 및 예제<\/a>, by <em>JDM<\/em>, May 8. 2015\n* <a href=\"http://jdm.kr/blog/104\">유전 알고리즘 (Genetic Algorithms)<\/a>, by <em>JDM<\/em>, April 2. 2015\n\n## License\n\nThe library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n\tCopyright 2007-2018 Franz Wilhelmstötter\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n\n\n## Release notes\n\n### [4.2.0](https://github.com/jenetics/jenetics/releases/tag/v4.2.0)\n\n#### Improvements\n\n* [#325](https://github.com/jenetics/jenetics/issues/325): **Allow customization of fitness evaluation execution for bundling calculations**\n* [#327](https://github.com/jenetics/jenetics/issues/327): Improve CPU utilization during fitness evaluation.\n* [#335](https://github.com/jenetics/jenetics/issues/335): Seq view wrapper for List<T> and T[] types.\n\n#### Bugs\n\n* [#317](https://github.com/jenetics/jenetics/issues/317): Fix links of Javadoc images.\n* [#318](https://github.com/jenetics/jenetics/issues/318): `null` result from engine.stream() after upgrade from 4.0.0 to 4.1.0.\n* [#336](https://github.com/jenetics/jenetics/issues/336): Errornous default implementation of 'Seq.indexWhere'. \n* [#341](https://github.com/jenetics/jenetics/issues/341): Error in internal 'bit.increment' method.\n* [#345](https://github.com/jenetics/jenetics/issues/345): Assumption for 'Genotype.newInstance(ISeq)' no longer holds.\n\n\n_[All Release Notes](RELEASE_NOTES.md)_\n\n## Used software\n\n<a href=\"https://www.jetbrains.com/idea/\">![IntelliJ](http://jenetics.io/img/icon_IntelliJIDEA.png)<\/a>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A8E:38C7FC:177189:592E4F:6AB9209F"},"text_sha256":"fd29c97f638babc4bcf7025ae45ae64cd16568f08deb5f7ac10e1ed72a7ccbba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3436","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:17F159A:1C0FB4C:6AB92831"},"commit":{"sha":"2c6f59c30cd0e9ec96d00366da8500dc35b8772b","url":"https://github.com/jenetics/jenetics/commit/2c6f59c30cd0e9ec96d00366da8500dc35b8772b","date":"2026-06-08T18:36:19Z","author_date":"2026-06-08T18:32:09Z","committer_date":"2026-06-08T18:36:19Z","tree_sha":"a7d269fd1485546b624c24a1059b0679e7d56ba1","message_first_line":"#929: Deprecate forwarded methods as well."},"tree_request_status":200,"tree_rate":{"github_remaining":"3435","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0842:E80A6:178AF99:1BA95BA:6AB92831"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":60651,"blob_sha":"b9695090ef1a2c43a009380f73551a691966946c","priority":0}],"documents":[{"path":"README.md","size":60651,"blob_sha":"b9695090ef1a2c43a009380f73551a691966946c","priority":0,"status":200,"text":"# Jenetics\n\n[![Build Status](https://github.com/jenetics/jenetics/actions/workflows/gradle.yml/badge.svg)](https://github.com/jenetics/jenetics/actions?query=branch%3Amaster)\n[![Maven Central Version](https://img.shields.io/maven-central/v/io.jenetics/jenetics?color=green)](https://central.sonatype.com/artifact/io.jenetics/jenetics)\n[![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics)\n\n**Jenetics** is a **Genetic Algorithm**, **Evolutionary Algorithm**, **Grammatical Evolution**, **Genetic Programming**, and **Multi-objective Optimization** library, written in modern day Java. It is designed with a clear separation of the several concepts of the algorithm, e.g. `Gene`, `Chromosome`, `Genotype`, `Phenotype`, `Population` and fitness `Function`. **Jenetics** allows you to minimize and maximize the given fitness function without tweaking it. In contrast to other GA implementations, the library uses the concept of an evolution stream (`EvolutionStream`) for executing the evolution steps. Since the `EvolutionStream` implements the Java Stream interface, it works smoothly with the rest of the Java Stream API.\n\n**Other languages**\n\n* [**Jenetics.Net**](https://github.com/rmeindl/jenetics.net): Experimental .NET Core port in C# of the base library. \n* [**Helisa**](https://github.com/softwaremill/helisa/): Scala wrapper around the Jenetics library.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=jenetics/jenetics&type=Date)](https://www.star-history.com/#jenetics/jenetics&Date)\n\n## Documentation\n\nThe library is fully documented ([javadoc](https://jenetics.io/javadoc/combined/9.0/index.html)) and comes with a user manual ([pdf](http://jenetics.io/manual/manual-9.0.0.pdf)).\n\n## Build Jenetics\n\n**Jenetics** requires at least **Java 25** to compile and run.\n\nCheck out the master branch from GitHub.\n\n    $ git clone https://github.com/jenetics/jenetics.git <builddir>\n\nJenetics uses [Gradle](http://www.gradle.org/downloads) as a build system and organizes the source into *sub*-projects (modules). Each subproject is located in its own subdirectory:\n\n**Published projects**\n\nThe following projects/modules are also published to Maven.\n\n* **[jenetics](jenetics)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics): This project contains the source code and tests for the Jenetics core-module.\n* **[jenetics.ext](jenetics.ext)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.ext): This module contains additional _non_-standard GA operations and data types. It also contains classes for solving multi-objective problems (MOEA) and doing Grammatical Evolution (GE). \n* **[jenetics.prog](jenetics.prog)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.prog): The modules contain classes that allow to do genetic programming (GP). It seamlessly works with the existing `EvolutionStream` and evolution `Engine`.\n* **[jenetics.xml](jenetics.xml)** [![Javadoc](https://www.javadoc.io/badge/io.jenetics/jenetics.svg)](http://www.javadoc.io/doc/io.jenetics/jenetics.xml): XML marshaling module for the _Jenetics_ base data structures.\n\n**Non-published modules**\n\n* **[jenetics.distassert](jenetics.distassert)**: This module allows testing whether some sample data follows a given statistical distribution. Jenetics uses this module for testing its GA operators.\n* **[jenetics.example](jenetics.example)**: This module contains example code for the *core*-module.\n* **[jenetics.doc](jenetics.doc)**: Contains the code of the website and the manual.\n* **[jenetics.tool](jenetics.tool)**: This module contains classes used for doing integration testing and algorithmic performance testing. It is also used for creating GA performance measures and creating diagrams from the performance measures.\n\nFor building the library change into the `<builddir>` directory (or one of the module directories) and call one of the available tasks:\n\n* **compileJava**: Compiles the Jenetics sources and copies the class files to the `<builddir>/<module-dir>/build/classes/main` directory.\n* **jar**: Compiles the sources and creates the JAR files. The artifacts are copied to the `<builddir>/<module-dir>/build/libs` directory.\n* **javadoc**: Generates the API documentation. The Javadoc is stored in the `<builddir>/<module-dir>/build/docs` directory\n* **test**: Compiles and executes the unit tests. The test results are printed onto the console, and a test-report, created by TestNG, is written to `<builddir>/<module-dir>` directory.\n* **clean**: Deletes the `<builddir>/build/*` directories and removes all generated artifacts.\n\nFor building the library jar from the source call\n\n    $ cd <build-dir>\n    $ ./gradlew jar\n\n\n## Example\n\n### Hello World (Ones counting)\n\nThe minimum evolution Engine setup needs a genotype factory, `Factory<Genotype<?>>`, and a fitness `Function`. The `Genotype` implements the `Factory` interface and can therefore be used as prototype for creating the initial `Population` and for creating new random `Genotypes`.\n\n```java\nimport io.jenetics.BitChromosome;\nimport io.jenetics.BitGene;\nimport io.jenetics.Genotype;\nimport io.jenetics.engine.Engine;\nimport io.jenetics.engine.EvolutionResult;\nimport io.jenetics.util.Factory;\n\npublic class HelloWorld {\n    // 2.) Definition of the fitness function.\n    private static Integer eval(Genotype<BitGene> gt) {\n        return gt.chromosome()\n            .as(BitChromosome.class)\n            .bitCount();\n    }\n\n    public static void main(String[] args) {\n        // 1.) Define the genotype (factory) suitable\n        //     for the problem.\n        Factory<Genotype<BitGene>> gtf =\n            Genotype.of(BitChromosome.of(10, 0.5));\n\n        // 3.) Create the execution environment.\n        Engine<BitGene, Integer> engine = Engine\n            .builder(HelloWorld::eval, gtf)\n            .build();\n\n        // 4.) Start the execution (evolution) and\n        //     collect the result.\n        Genotype<BitGene> result = engine.stream()\n            .limit(100)\n            .collect(EvolutionResult.toBestGenotype());\n\n        System.out.println(\"Hello World:\\n\" + result);\n    }\n}\n```\n\nIn contrast to other GA implementations, the library uses the concept of an evolution stream (`EvolutionStream`) for executing the evolution steps. Since the `EvolutionStream` implements the Java Stream interface, it works smoothly with the rest of the Java streaming API. Now let's have a closer look at the listing above and discuss this simple program step by step:\n\n1. The probably most challenging part, when setting up a new evolution `Engine`, is to transform the problem domain into a appropriate `Genotype` (factory) representation. In our example we want to count the number of ones of a `BitChromosome`. Since we are counting only the ones of one chromosome, we are adding only one `BitChromosome` to our `Genotype`. In general, the `Genotype` can be created with 1 to n chromosomes.\n\n2. Once this is done, the fitness function, which should be maximized, can be defined. Utilizing the new language features introduced in Java 8, we simply write a private static method, which takes the genotype we defined and calculates its fitness value. If we want to use the optimized bit-counting method, `bitCount()`, we have to cast the `Chromosome<BitGene>` class to the actual used `BitChromosome` class. Since we know for sure that we created the Genotype with a `BitChromosome`, this can be done safely. A reference to the eval method is then used as fitness function and passed to the `Engine.build` method.\n\n3. In the third step we are creating the evolution `Engine`, which is responsible for changing, respectively evolving, a given population. The `Engine` is highly configurable and takes parameters for controlling the evolutionary and the computational environment. For changing the evolutionary behavior, you can set different alterers and selectors. By changing the used `Executor` service, you control the number of threads; the Engine is allowed to use. A new `Engine` instance can only be created via its builder, which is created by calling the `Engine.builder` method.\n\n4. In the last step, we can create a new `EvolutionStream` from our `Engine`. The `EvolutionStream` is the model or view of the evolutionary process. It serves as a »process handle« and also allows you, among other things, to control the termination of the evolution. In our example, we simply truncate the stream after 100 generations. If you don't limit the stream, the `EvolutionStream` will not terminate and run forever. Since the `EvolutionStream` extends the `java.util.stream.Stream` interface, it integrates smoothly with the rest of the Java Stream API. The final result, the best `Genotype` in our example, is then collected with one of the predefined collectors of the `EvolutionResult` class.\n\n\n### Evolving images\n\nThis example tries to approximate a given image by semitransparent polygons.  It comes with a Swing UI, where you can immediately start your own experiments. After compiling the sources with\n\n    $ ./gradlew compileTestJava\n\nyou can start the example by calling\n\n    $ ./jrun io.jenetics.example.image.EvolvingImages\n\n![Evolving images](https://raw.githubusercontent.com/jenetics/jenetics/master/jenetics.doc/src/main/resources/graphic/EvolvingImagesExampleScreenShot.png)\n\nThe previous image shows the GUI after evolving the default image for about 4,000 generations. With the »Open« button, it is possible to load other images for polygonization. The »Save« button allows storing polygonized images in PNG format to disk. At the button of the UI, you can change some GA parameters of the example.\n\n\n## Projects using Jenetics\n\n* <a href=\"https://spear-project.eu/\"><b>SPEAR<\/b>:<\/a> SPEAR (Smart Prognosis of Energy with Allocation of Resources) created an extendable platform for energy and efficiency optimizations of production systems.\n* <a href=\"https://renaissance.dev/\"><b>Renaissance Suite<\/b>:<\/a> Renaissance is a modern, open, and diversified benchmark suite for the JVM, aimed at testing JIT compilers, garbage collectors, profilers, analyzers and other tools.\n* <a href=\"http://www.eclipse.org/app4mc/\"><b>APP4MC<\/b>:<\/a> Eclipse APP4MC is a platform for engineering embedded multi- and many-core software systems.\n\n## Blogs and articles\n\n* <a href=\"https://dieschwalbe.de/schwalbeaktuell.htm\">Schachprobleme komponieren mit evolutionären Algorithmen<\/a>, by <em>Jakob Leck<\/em>, Dec 2023, Die Schwalbe 324-2, pp. 373-380. Composition and solving chess problems with a greater number of peaces than usual. Instead of a brute force approach, a GA is used solving the problems (German).\n* <a href=\"https://craftcodecrew.com/solving-the-knapsack-problem-with-the-jenetics-library/\">Solving the Knapsack Problem with the Jenetics Library<\/a>, by <em>Craftcode Crew<\/em>, May 13, 2021\n* <a href=\"http://www.fx361.com/page/2018/1126/4534731.shtml\">一种基于Jenetics的遗传算法程序设计<\/a>, <em>电脑知识与技术 2018年22期 by 王康<\/em>, Nov. 26. 2018\n* <a href=\"http://www.baeldung.com/jenetics\">Introduction to Jenetics Library<\/a>, by <em>baeldung<\/em>, April 11. 2017\n* <a href=\"http://blog.takipi.com/how-to-solve-tough-problems-using-genetic-algorithms/\">How to Solve Tough Problems Using Genetic Algorithms<\/a>, by <em>Tzofia Shiftan<\/em>, April 6. 2017\n* <a href=\"http://fxapps.blogspot.co.at/2017/01/genetic-algorithms-with-java.html\">Genetic algorithms with Java<\/a>, by <em>William Antônio<\/em>, January 10. 2017\n* <a href=\"http://jdm.kr/blog/135\">Jenetics 설치 및 예제<\/a>, by <em>JDM<\/em>, May 8. 2015\n* <a href=\"http://jdm.kr/blog/104\">유전 알고리즘 (Genetic Algorithms)<\/a>, by <em>JDM<\/em>, April 2. 2015\n\n## Citations\n\n<details>\n<summary>\nSalatiello, E., Vespoli, S., Guizzi, G. et al. <a href=\"https://doi.org/10.1007/s00170-026-18281-5\"> Online dynamic scheduling for multi-compartment AGV and cobot in manufacturing systems via remaining processing time integration.<\/a> <em>Int J Adv Manuf Technol (2026), <\/em> May 2026.\n\n...\n<\/summary>\n\n1) Marko Šmid, Miha Ravber. <a href=\"https://doi.org/10.1016/j.softx.2026.102607\"> GIANT: General intelligent AgeNt trainer.<\/a> <em>SoftwareX, Volume 34, <\/em> June 2026.\n2) Salatiello, E., Vespoli, S., Guizzi, G. et al. <a href=\"https://doi.org/10.1007/s00170-026-18281-5\"> Online dynamic scheduling for multi-compartment AGV and cobot in manufacturing systems via remaining processing time integration.<\/a> <em>Int J Adv Manuf Technol (2026), <\/em> May 2026.\n3) Đurđević, A.; Frid, N.; Đurasević, M. <a href=\"https://doi.org/10.20944/preprints202605.1623.v1\"> Adaptive Routing Policies for Stochastic EVRPTW via Genetic Programming.<\/a> <em>Preprints 2026, 2026051623, <\/em> May 2026.\n4) Milan Cugurovic, Aleksandar Prokopec, Boris Spasojevic, Vojin Jovanovic, Milena Vujošević Janičić. <a href=\"https://doi.org/10.1145/3801119.3801123\"> The Promise of Static Profiling: Exploring the Limits.<\/a> <em>Programming› Companion '26: Companion Proceedings of the 10th International Conference on the Art, Science, and Engineering of Programming, <\/em> April 2026.\n5) Milan Cugurovic, Aleksandar Prokopec, Boris Spasojevic, Vojin Jovanovic, and Milena Vujošević Janičić. <a href=\"https://doi.org/10.1145/3771775.3786276\"> GraalMHC: ML-Based Method-Hotness Classification for Binary-Size Reduction in Optimizing Compilers.<\/a> <em>In Proceedings of the 35th ACM SIGPLAN International Conference on Compiler Construction (CC '26). Association for Computing Machinery, New York, NY, USA, 1–13. <\/em> Jan. 2026.\n6) J. Daniel Dávalos Soto et al. <a href=\"https://ieeexplore.ieee.org/document/11298634\"> Seasonal Reconfiguration of Electrical Distribution Systems to Mitigate the Impact of Electric Vehicle Charging.<\/a> <em>IEEE Access, vol. 13, pp. 212193-212212. <\/em> Dec 2025.\n7) Ritwik Murali, Ashwin Narayanan Sivamani, Abhinav Ramakrishnan, Hariharan Arul, and Ananya R. <a href=\"https://doi.org/10.1145/3712255.3726652\"> Evolve On Click (EvOC) - An Intuitive Web Platform to Collaboratively Implement, Execute, and Visualize Evolutionary Algorithms.<\/a> <em>Proceedings of the Genetic and Evolutionary Computation Conference Companion (GECCO '25 Companion). Association for Computing Machinery, New York, NY, USA, 147–150.<\/em> Aug. 2025.\n8) Hotz, M., Malburg, L., Bergmann, R. <a href=\"https://doi.org/10.1007/978-3-031-96559-3_16\"> Advanced Search Techniques for Determining Optimal Sequences of Adaptation Rules in Process-Oriented Case-Based Reasoning.<\/a> <em>Case-Based Reasoning Research and Development. ICCBR 2025. Lecture Notes in Computer Science(), vol 15662. Springer, Cham.<\/em> June 2025.\n9) C. Chen, B. Dolan-Gavitt, Z. Lin. <a href=\"https://arxiv.org/abs/2506.10323\"> ELFuzz: Efficient Input Generation via LLM-driven Synthesis Over Fuzzer Space.<\/a> <em>USENIX Security'25 Cycle 2.<\/em> June 2025.\n10) Sathis Kumar K; Janani T; Karpagavadivu K; Raihana A; Meenalochini M. <a href=\"https://ieeexplore.ieee.org/abstract/document/11019139\"> Effective Task Scheduling based on Candidate Optimization Algorithm (COA) in Heterogeneous NoC-Based MPSoC.<\/a> <em>   2025 Fourth International Conference on Smart Technologies, Communication and Robotics (STCR), Sathyamangalam, India, 2025, pp. 1-8.<\/em> June 2025.\n11) Fabian Mastenbroek, Tiziano De Matteis, Vincent van Beek, Alexandru Iosup. <a href=\"https://doi.org/10.1016/j.future.2024.107702\"> RADiCe: A Risk Analysis Framework for Data Centers.<\/a> <em>  Future Generation Computer Systems Volume 166.<\/em> May 2025.\n12) Toderean, L., Daian, M., Cioara, T. et al. <a href=\"https://doi.org/10.1038/s41598-025-96443-3\"> Heuristic based federated learning with adaptive hyperparameter tuning for households energy prediction.<\/a> <em>  Sci Rep 15, 12564.<\/em> April 2025.\n13) Rui Menoita, Sara Silva. <a href=\"https://arxiv.org/pdf/2504.05418\"> Evolving Financial Trading Strategies with Vectorial Genetic Programming.<\/a> <em>  arXiv preprint arXiv:2504.05418.<\/em> April 2025.\n14) Sandhya Avasthi, Shrishti Garg, Suman Lata Tripathi, Ritu Chauhan. <a href=\"https://doi.org/10.1016/B978-0-443-29162-3.00001-0\"> Metaheuristics algorithms: Fundamental aspects and applications in optimization problems.<\/a> <em>  Metaheuristics-Based Materials Optimization, Woodhead Publishing.<\/em> Feb. 2025.\n15) Nils Japke, Martin Grambow, Christoph Laaber, David Bermbach. <a href=\"https://arxiv.org/abs/2501.12878\"> μOpTime: Statically Reducing the Execution Time of Microbenchmark Suites Using Stability Metrics.<\/a> <em>  ACM Transactions on Software Engineering and Methodolog.<\/em> Jan. 2025.\n16) Fahimeh Bahrami, Rodolfo Jordao, Ingo Sander, Ingemar Söderquist. <a href=\"https://dl.acm.org/doi/pdf/10.1145/3714412\"> OBridging the Abstraction Gap: A Systematic Approach to Rule-Based Transformational Design for Embedded Systems.<\/a> <em>  ACM Transactions on Embedded Computing Systems. <\/em> Jan. 2025.\n17) Vincent A. Cicirello. <a href=\"https://arxiv.org/pdf/2412.02004\"> Open Source Evolutionary Computation with Chips-n-Salsa.<\/a> <em>  Computer Science, School of Business, Stockton University. <\/em> Dec. 2024.\n18) S. Gruber, P. Feichtenschlager, C. Fabianek, E. Gringinger and C. G. Schuetz. <a href=\"https://doi.org/10.1109/DASC62030.2024.10749250\"> Towards a Heuristic Optimizer for a Target Time Management System in Air Traffic Flow Management.<\/a> <em>  2024 AIAA DATC/IEEE 43rd Digital Avionics Systems Conference (DASC), San Diego, CA, USA, 2024, pp. 1-10. <\/em> Nov. 2024.\n19) Šimić, G., Jevremović, A., Strugarević, D. <a href=\"https://doi.org/10.1007/978-3-031-72393-3_7\"> Improvement of the Teaching Process Using the Genetic Algorithm.<\/a> <em>  In: Perakovic, D., Knapcikova, L. (eds) Future Access Enablers for Ubiquitous and Intelligent Infrastructures. FABULOUS 2024. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 596. <\/em> Oct. 2024.\n20) Dimitris G. Mintisa ∙ Nikolaos Cheimariosa ∙ Andreas Tsoumanisa ∙ Anastasios G. Papadiamantisa ∙ Nico W. van den Brinkd ∙ Henk J. van Lingene ∙ Georgia Melagrakif ∙ Iseult Lynchb ∙ Antreas Afantitis. <a href=\"https://doi.org/10.1016/j.csbj.2024.09.028\"> NanoBioAccumulate: Modelling the uptake and bioaccumulation of nanomaterials in soil and aquatic invertebrates via the Enalos DIAGONAL Cloud Platform.<\/a> <em> Computational and Structural Biotechnology Journal. Elsevier, 2001-0370. <\/em> Oct. 2024.\n21) R. Jordão, F. Bahrami, Y. Yang, M. Becker, I. Sander and K. Rosvall. <a href=\"https://doi.org/10.1109/FDL63219.2024.10673877\"> Multi-objective preference-free exact design space exploration of static DSP on multicore platforms.<\/a> <em> 2024 Forum on Specification & Design Languages (FDL), Stockholm, Sweden, 2024, pp. 1-9.<\/em> Sep. 2024.\n22) Jared Murphy and Travis Desell. <a href=\"https://doi.org/10.1145/3638530.3664173\"> Minimizing the EXA-GP Graph-Based Genetic Programming Algorithm for Interpretable Time Series Forecasting.<\/a> <em> In Proceedings of the Genetic and Evolutionary Computation Conference Companion (GECCO '24 Companion). Association for Computing Machinery, New York, NY, USA, 1686–1690.<\/em> Aug. 2024.\n23) Jared Murphy, Devroop Kar, Joshua Karns, and Travis Desell. <a href=\"https://doi.org/10.1145/3638530.3654349\"> EXA-GP: Unifying Graph-Based Genetic Programming and Neuroevolution for Explainable Time Series Forecasting.<\/a> <em> In Proceedings of the Genetic and Evolutionary Computation Conference Companion (GECCO '24 Companion). Association for Computing Machinery, New York, NY, USA, 523–526.<\/em> Aug. 2024.\n24) Sebastian Gruber, Paul Feichtenschlager, and Christoph G. Schuetz. <a href=\"https://doi.org/10.1145/3638529.3654128\"> Using Genetic Algorithms for Privacy-Preserving Optimization of Multi-Objective Assignment Problems in Time-Critical Settings: An Application in Air Traffic Flow Management.<\/a> <em> In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO '24). Association for Computing Machinery, New York, NY, USA, 1246–1254.<\/em> July 2024.\n25) Jianghao Wang, Clay Stevens, Brooke Kidmose, Myra B. Cohen & Hamid Bagheri. <a href=\"https://doi.org/10.1007/978-3-031-64573-0_1\"> Evolutionary Analysis of Alloy Specifications with an Adaptive Fitness Function.<\/a> <em> Search-Based Software Engineering. SSBSE 2024. Lecture Notes in Computer Science, vol 14767. Springer.<\/em> July 2024.\n26) Bernhard J. Berger; Christina Plump; Lauren Paul; Rolf Drechsler. <a href=\"https://agra.informatik.uni-bremen.de/doc/konf/gecco2024_cp.pdf\"> EvoAl — Codeless Domain-Optimisation.<\/a> <em> Genetic and Evolutionary Computation Conference (GECCO-2024).<\/em> July 2024.\n27) Christina Plump, Daniel C. Hoinkiss, Jörn Huber, Bernhard J. Berger, Matthias Günther, Christoph Lüth, Rolf Drechsler. <a href=\"https://agra.informatik.uni-bremen.de/doc/konf/cec2024_cp.pdf\"> Finding the perfect MRI sequence for your patient --- Towards an optimisation workflow for MRI-sequences.<\/a> <em>  IEEE WCCI 2024.<\/em> June 2024.\n28) Milan Čugurović, Milena Vujošević Janičić, Vojin Jovanović, Thomas Würthinger. <a href=\"https://doi.org/10.1016/j.jss.2024.112058\"> GraalSP: Polyglot, efficient, and robust machine learning-based static profiler.<\/a> <em>  Journal of Systems and Software, Volume 213, 2024, 112058, ISSN 0164-1212.<\/em> July. 2024.\n29) Wenwen Feng, Xiaohui Lei, Yunzhong Jiang, Chao Wang, Weihong Liao, Hao Wang, Gong Xinghui, Yu Feng. <a href=\"https://doi.org/10.1016/j.jhydrol.2024.131228\"> Coupling model predictive control and rules-based control for real-time control of urban river systems.<\/a> <em>  Journal of Hydrology, 2024, 131228, ISSN 0022-1694.<\/em> April 2024.\n30) S. Sint, A. Mazak-Huemer, M. Eisenberg, D. Waghubinger and M. Wimmer. <a href=\"https://ieeexplore.ieee.org/document/10499231\"> Automatic Optimization of Tolerance Ranges for Model-Driven Runtime State Identification.<\/a> <em>   IEEE Transactions on Automation Science and Engineering.<\/em> April. 2024.\n31) Cicirello, Vincent A. <a href=\"https://doi.org/10.3390/app14062542\"> Evolutionary Computation: Theories, Techniques, and Applications.<\/a> <em>   Applied Sciences 14, no. 6: 2542.<\/em> Mar. 2024.\n32) Koitz-Hristov R, Sterner T, Stracke L, Wotawa F. <a href=\"https://doi.org/10.1002/smr.2656\"> On the suitability of checked coverage and genetic parameter tuning in test suite reduction.<\/a> <em>   J Softw Evol Proc. 2024;e2656.<\/em> Feb. 2024.\n33) Jordão, Rodolfo; Becker, Matthias; Sander, Ingo. <a href=\"https://doi.org/10.1145/3647640\">IDeSyDe: Systematic Design Space Exploration via Design Space Identification.<\/a> <em>  ACM Transactions on Design Automation of Electronic Systems.<\/em> Feb. 2024.\n34) Squillero, G., Tonda, A. <a href=\"https://link.springer.com/article/10.1007/s10710-023-09472-0\">Veni, Vidi, Evolvi commentary on W. B. Langdon’s “Jaws 30”.<\/a> <em>  Genet Program Evolvable Mach 24, 24 (2023)<\/em> Nov. 2023.\n35) Eneko Osaba, Gorka Benguria, Jesus L. Lobo, Josu Diaz-de-Arcaya, Juncal Alonso, Iñaki Etxaniz. <a href=\"https://doi.org/10.48550/arXiv.2311.10767\">Optimizing IaC Configurations: a Case Study Using Nature-inspired Computing.<\/a> <em>  CIIS 2023. <\/em> Nov. 2023.\n36) Sapra, D., Pimentel, A.D. <a href=\"https://doi.org/10.1007/978-3-031-46077-7_6\">Exploring Multi-core Systems with Lifetime Reliability and Power Consumption Trade-offs.<\/a> <em>  Embedded Computer Systems: Architectures, Modeling, and Simulation. SAMOS 2023. Lecture Notes in Computer Science, vol 14385. Springer, Cham.<\/em> Nov. 2023.\n37) Syed Juned Ali, Jan Michael Laranjo, Dominik Bork. <a href=\"https://model-engineering.info/publications/papers/EDOC23-GGMF-web.pdf\">A Generic and Customizable Genetic Algorithms-based Conceptual Model Modularization Framework.<\/a> <em> 27th International EDOC Conference (EDOC 2023) - Enterprise Design, Operations and Computing.<\/em> Sep. 2023.\n38) A. Elyasaf, E. Farchi, O. Margalit, G. Weiss and Y. Weiss. <a href=\"https://doi.ieeecomputersociety.org/10.1109/TSE.2023.3279570\">Generalized Coverage Criteria for Combinatorial Sequence Testing.<\/a> <em> IEEE Transactions on Software Engineering, vol. 49, no. 08, pp. 4023-4034.<\/em> Aug. 2023.\n39) Julien Amblard, Robert Filman, Gabriel Kopito. <a href=\"https://doi.org/10.1145/3583133.3596369\">GPStar4: A flexible framework for experimenting with genetic programming.<\/a> <em> OGECCO '23 Companion: Proceedings of the Companion Conference on Genetic and Evolutionary Computation. <\/em> July 2023.\n40) Garmendia, A., Bork, D., Eisenberg, M., Ferreira, T., Kessentini, M., Wimmer, M. <a href=\"https://doi.org/10.1007/978-981-19-9948-2_4\">Leveraging Artificial Intelligence for Model-based Software Analysis and Design.<\/a> <em> Optimising the Software Development Process with Artificial Intelligence. Natural Computing Series. Springer, Singapore. <\/em> July 2023.\n41) Sikora, M., Smołka, M. <a href=\"https://doi.org/10.1007/978-3-031-35995-8_16\">An Application of Evolutionary Algorithms and Machine Learning in Four-Part Harmonization.<\/a> <em> Computational Science – ICCS 2023. ICCS 2023. Lecture Notes in Computer Science, vol 14073. Springer <\/em> June 2023.\n42) Dolly Sapra and Andy D. Pimentel. <a href=\"http://admorph.eu/wp-content/uploads/2023/05/SAMOS_Dolly-2.pdf\">Exploring Multi-core Systems with Lifetime Reliability and Power Consumption Trade-offs.<\/a> <em> SAMOS '23. <\/em> May 2023.\n43) Vipin Shukla, Mainak Bandyopadhyay. <a href=\"https://doi.org/10.1016/j.iswa.2023.200200\">Optimization of input parameters of ANN–driven plasma source through nature-inspired evolutionary algorithms.<\/a> <em> Intelligent Systems with Applications, Volume 18, 2023, 200200, ISSN 2667-3053. <\/em> May 2023.\n44) P. Feichtenschlager, K. Schuetz, S. Jaburek, C. Schuetz, E. Gringinger. <a href=\"http://www.dke.jku.at/rest/dke_web_res/publications/papers/Schu23c/Schu23c_copy.pdf\">Privacy-Preserving Implementation of an Auction Mechanism for ATFM Slot Swapping.<\/a> <em> Proceedings of the 23rd Integrated Communications, Navigation and Surveillance Conference (ICNS 2023), Washington D.C., U.S.A., April 18-20, 2023, IEEE Press, 12 pages. <\/em> April 2023.\n45) Christoph Laaber, Tao Yue, Shaukat Ali. <a href=\"https://arxiv.org/abs/2211.13525\">Multi-Objective Search-Based Software Microbenchmark Prioritization.<\/a> <em> ArXiv/Computer Science/Software Engineering. <\/em> Nov. 2022.\n46) Ricardo Ferreira Vilela, João Choma Neto, Victor Hugo Santiago Costa Pinto, Paulo Sérgio Lopes de Souza, Simone do Rocio Senger de Souza. <a href=\"https://doi.org/10.1002/cpe.7489\">Bio-inspired optimization to support the test data generation of concurrent software.<\/a> <em> Concurrency and Computation: Practice and Experience. <\/em> Nov. 2022.\n47) G. Mateeva, D. Parvanov, I. Dimitrov, I. Iliev and T. Balabanov. <a href=\"https://doi.org/10.1109/ICAI55857.2022.9960128\">An Efficiency of Third Party Genetic Algorithms Software Libraries in Mobile Distributed Computing for Financial Time Series Forecasting.<\/a> <em> 2022 International Conference Automatics and Informatics (ICAI). <\/em> Oct. 2022.\n48) Guilherme Espada, Leon Ingelse, Paulo Canelas, Pedro Barbosa, Alcides Fonseca. <a href=\"https://arxiv.org/abs/2210.04826\">Data types as a more ergonomic frontend for Grammar-Guided Genetic Programming.<\/a> <em> arXiv. <\/em> Oct. 2022.\n49) Christoph G. Schuetz, Thomas Lorünser, Samuel Jaburek, Kevin Schuetz, Florian Wohner, Roman Karl & Eduard Gringinger. <a href=\"https://doi.org/10.1007/978-3-031-17834-4_10\">A Distributed Architecture for Privacy-Preserving Optimization Using Genetic Algorithms and Multi-party Computation.<\/a> <em> CoopIS 2022: Cooperative Information Systems pp 168–185. <\/em> Sep. 2022.\n50) Christina Plump, Bernhard J. Berger, Rolf Drechsler. <a href=\"https://www.informatik.uni-bremen.de/agra/doc/konf/cec2022_cp.pdf\">Using density of training data to improve evolutionary algorithms with approximative fitness functions.<\/a> <em> WCCI2022 IEEE WORLD CONGRESS ON COMPUTATIONAL INTELLIGENCE. <\/em> July 2022.\n51) Christina Plump, Bernhard J. Berger, Rolf Drechsler. <a href=\"https://doi.org/10.1145/3520304.3529066\">Adapting mutation and recombination operators to range-aware relations in real-world application data.<\/a> <em> GECCO '22: Proceedings of the Genetic and Evolutionary Computation Conference Companion. Pages 755–758. <\/em> July 2022.\n52) Eric Medvet, Giorgia Nadizar, Luca Manzoni. <a href=\"https://doi.org/10.1145/3520304.3533960\">JGEA: a modular java framework for experimenting with evolutionary computation.<\/a> <em> GECCO '22: Proceedings of the Genetic and Evolutionary Computation Conference Companion. Pages 2009–2018. <\/em> July 2022.\n53) Moshe Sipper, Tomer Halperin, Itai Tzruia, Achiya Elyasaf. <a href=\"https://arxiv.org/pdf/2207.10367.pdf\">EC-KitY: Evolutionary Computation Tool Kit in Python with Seamless Machine Learning Integration.<\/a> <em>arXiv:2207.10367v1 [cs.NE]. <\/em> July 2022. \n54) A. Billedeaux and B. DeVries. <a href=\"https://doi.org/10.1109/eIT53891.2022.9813795\">Using Metamorphic Relationships and Genetic Algorithms to Test Open-Source Software.<\/a> <em> 2022 IEEE International Conference on Electro Information Technology (eIT), 2022, pp. 342-345. <\/em> July 2022.\n55) R. Koitz-Hristov, L. Stracke and F. Wotawa. <a href=\"https://ieeexplore.ieee.org/abstract/document/9796394\">Checked Coverage for Test Suite Reduction – Is It Worth the Effort?<\/a> <em>  2022 IEEE/ACM International Conference on Automation of Software Test (AST), pp. 6-16. <\/em> June 2022.\n56) Abdessamed Ouessai, Mohammed Salem, Antonio M. Mora. <a href=\"https://doi.org/10.1016/j.entcom.2022.100493\">Evolving action pre-selection parameters for MCTS in real-time strategy games.<\/a> <em>  Entertainment Computing, Volume 42. <\/em> April 2022.\n57) Musatafa Abbas Abbood Albadr, Sabrina Tiun, Masri Ayob, Fahad Taha AL-Dhief, Khairuddin Omar & Mhd Khaled Maen. <a href=\"https://doi.org/10.1007/s11042-022-12747-w\">Speech emotion recognition using optimized genetic algorithm-extreme learning machine.<\/a> <em>  Multimedia Tools and Applications, <\/em> March 2022.\n58) Christina Plump, Bernhard Berger, Rolf Drechsler. <a href=\"https://www.informatik.uni-bremen.de/agra/doc/konf/LDIC2022Plump.pdf\">Choosing the right technique for the right restriction - a domain-specific approach for enforcing search-space restrictions in evolutionary algorithms.<\/a> <em>  LDIC-2022, International Conference on Dynamics in Logistics, <\/em> Feb. 2022.\n59) Quoc Nhat Han Tran, Nhan Quy Nguyen, Hicham Chehade, Lionel Amodeo, Farouk Yalaoui. <a href=\"https://doi.org/10.3390/app12020659\">Outpatient Appointment Optimization: A Case Study of a Chemotherapy Service.<\/a> <em>  Applied Sciences/Computing and Artificial Intelligence. <\/em> Jan. 2022.\n60) Achiya Elyasaf, Eitan Farchi, Oded Margalit, Gera Weiss,  Yeshayahu Weiss. <a href=\"https://arxiv.org/pdf/2201.00522.pdf\">Combinatorial Sequence Testing Using Behavioral Programming and Generalized Coverage Criteria.<\/a> <em>  Journal of Systems and Software. <\/em> Jan. 2022.\n61) Frequentis Group. <a href=\"https://www.frequentis.com/sites/default/files/support/2021-12/D4.1%20Report%20on%20State-of-the-Art%20of%20Relevant%20Concepts.pdf\">D4.1 Report on State-ofthe-Art of Relevant Concepts.<\/a> <em> <a href=\"https://www.frequentis.com/en/research/projects/slotmachine/results-and-deliverables\">SLOTMACHINE - RESULTS & PUBLIC DELIVERABLES, Frequentis\n    <\/a> <\/em> Dec. 2021.\n62) Huang Wanjie, Wang Haotian, Xue Yibo. <a href=\"https://www.webofproceedings.org/proceedings_series/ESSP/ICITED%202021/Y0197.pdf\">Research on Optimization of in-warehouse picking Model based on genetic algorithm.<\/a> <em> 2021 International Conference on Information Technology, Education and Development (ICITED 2021). <\/em> Dec. 2021.\n63) Aalam Z., Kaur S., Vats P., Kaur A., Saxena R. <a href=\"https://link.springer.com/chapter/10.1007/978-981-16-6369-7_34\">A Comprehensive Analysis of Testing Efforts Using the Avisar Testing Tool for Object Oriented Softwares.<\/a> <em> Intelligent Sustainable Systems. Lecture Notes in Networks and Systems, vol 334. Springer, Singapore. <\/em> Dec. 2021. \n64) Anh Vu Vo, Debra F. Laefer, Jonathan Byrne. <a href=\"https://doi.org/10.3390/rs13214437\">Optimizing Urban LiDAR Flight Path Planning Using a Genetic Algorithm and a Dual Parallel Computing Framework.<\/a> <em>Remote Sensing, Volume 13, Issue 21. <\/em> Nov. 2021.\n65) Pozas N., Durán F. <a href=\"https://link.springer.com/chapter/10.1007/978-3-030-91431-8_28\">On the Scalability of Compositions of Service-Oriented Applications.<\/a> <em> ICSOC 2021: Service-Oriented Computing pp 449-463 <\/em> Nov. 2021.\n66) Küster, T., Rayling, P., Wiersig, R. et al. <a href=\"https://doi.org/10.1007/s11081-021-09691-3\">Multi-objective optimization of energy-efficient production schedules using genetic algorithms.<\/a> <em> Optimization and Engineering (2021). <\/em> Oct. 2021.\n67) B. DeVries and C. Trefftz. <a href=\"https://doi.org/10.1109/SBST52555.2021.00008\">A Novelty Search and Metamorphic Testing Approach to Automatic Test Generation.<\/a> <em>2021 IEEE/ACM 14th International Workshop on Search-Based Software Testing (SBST), 2021, pp. 8-11. <\/em> May 2021.\n68) W. Geithner, Z. Andelkovic, O. Geithner, F. Herfurth, V. Rapp, A. Németh, F. Wilhelmstötter, A. H. Van Benschoten. <a href=\"https://accelconf.web.cern.ch/ipac2021/papers/tupab300.pdf\">ION SOURCE OPTIMIZATION USING BI-OBJECTIVE GENETIC AND MATRIX-PROFILE ALGORITHM.<\/a> <em>IPAC2021 - 12th International Particle Accelerator Conference. <\/em> May 2021.\n69) C. Plump, B. J. Berger and R. Drechsler. <a href=\"https://doi.org/10.1109/CEC45853.2021.9504931\">Domain-driven Correlation-aware Recombination and Mutation Operators for Complex Real-world Applications.<\/a> <em> 2021 IEEE Congress on Evolutionary Computation (CEC), pp. 540-548. <\/em> July 2021.\n70) Sapra, D., Pimentel, A.D. <a href=\"https://doi.org/10.1007/s10489-021-02679-7\">Designing convolutional neural networks with constrained evolutionary piecemeal training.<\/a> <em> Appl Intell (2021). <\/em> July 2021.\n71) Michela Lorandi, Leonardo Lucio Custode, Giovanni Iacca. <a href=\"https://doi.org/10.1145/3449726.3462716\">Genetic improvement of routing in delay tolerant networks.<\/a> <em>GECCO '21: Proceedings of the Genetic and Evolutionary Computation Conference Companion. <\/em> July 2021, Pages 35–36.\n72) Plump, Christina and Berger, Bernhard J. and Drechsler, Rolf. <a href=\"http://www.informatik.uni-bremen.de/agra/doc/konf/CEC_approximative.pdf\">Improving evolutionary algorithms by enhancing an approximative fitness function through prediction intervals.<\/a> <em>IEEE Congress on Evolutionary Computation (IEEE CEC-2021). <\/em> June 2021.\n73) Faltaous, Sarah, Abdulmaksoud, Aya, Kempe, Markus, Alt, Florian and Schneegass, Stefan. <a href=\"https://doi.org/10.1515/itit-2020-0035\">GeniePutt: Augmenting human motor skills through electrical muscle stimulation.<\/a> <em>it - Information Technology, vol. , no. , 2021. <\/em> May 2021.\n74) Yiming Tang, Raffi Khatchadourian, Mehdi Bagherzadeh, Rhia Singh, Ajani Stewart, and Anita Raja. <a href=\"https://academicworks.cuny.edu/hc_pubs/671/\">An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems.<\/a> <em>In International Conference on Software Engineering, ICSE ’21. <\/em> May 2021.\n75) Arifin H.H., Robert Ong H.K., Dai J., Daphne W., Chimplee N. <a href=\"https://doi.org/10.1007/978-3-030-73539-5_23\"> Model-Based Product Line Engineering with Genetic Algorithms for Automated Component Selection.<\/a> <em>In: Krob D., Li L., Yao J., Zhang H., Zhang X. (eds) Complex Systems Design & Management. Springer, Cham. <\/em> April 2021.\n76) MICHELA LORANDI, LEONARDO LUCIO CUSTODE, and GIOVANNI IACCA. <a href=\"https://arxiv.org/pdf/2103.07428.pdf\">Genetic Improvement of Routing Protocols for DelayTolerant Networks. <\/a> <em>arXiv:2103.07428v1 <\/em> March 2021.\n77) Amine Aziz-Alaoui, Carola Doerr, Johann Dreo. <a href=\"https://arxiv.org/abs/2102.06435\">Towards Large Scale Automated Algorithm Designby Integrating Modular Benchmarking Frameworks. <\/a> <em>E arXiv:2102.06435 <\/em> Feb. 2021.\n78) Dominik Bork and Antonio Garmendia and Manuel Wimmer. <a href=\"https://model-engineering.info/publications/papers/ER2020_Forum_ModulER-CR.pdf\">Towards a Multi-Objective Modularization Approach for Entity-Relationship Models.<\/a> <em>ER 2020, 39th International Conference on Conceptual Modeling. <\/em><\/a> Nov. 2020.\n79) Sarfarazi, S.; Deissenroth-Uhrig, M.; Bertsch, V. <a href=\"https://doi.org/10.3390/en13195154 \">Aggregation of Households in Community Energy Systems: An Analysis from Actors’ and Market Perspectives. <\/a> <em>Energies 2020, 13, 5154. <\/em> Oct. 2020.  \n80) M. Šipek, D. Muharemagić, B. Mihaljević and A. Radovan. <a href=\"https://ieeexplore.ieee.org/abstract/document/9245290\">Enhancing Performance of Cloud-based Software Applications with GraalVM and Quarkus.<\/a> <em>2020 43rd International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 2020, pp. 1746-1751. <\/em> Oct. 2020.\n81) Vats P., Mandot M. <a href=\"https://link.springer.com/chapter/10.1007/978-981-15-7106-0_60\">A Comprehensive Analysis for Validation of AVISAR Object-Oriented Testing Tool.<\/a> <em>Joshi A., Khosravy M., Gupta N. (eds) Machine Learning for Predictive Analysis. Lecture Notes in Networks and Systems, vol 141. Springer, Singapore. <\/em><\/a> Oct. 2020.\n82) Thakur, K., Kumar, G. <a href=\"https://doi.org/10.1007/s11831-020-09481-7\">Nature Inspired Techniques and Applications in Intrusion Detection Systems: Recent Progress and Updated Perspective.<\/a> <em>Archives of Computational Methods in Engineering (2020). <\/em><\/a> Aug. 2020.\n83) Nur Hidayah Mat Yasin, Abdul Sahli Fakhrudin, Abdul Wafie Afnan Abdul Hadi, Muhammad Harith Mohd Khairuddin, Noor Raihana Abu Sepian, Farhan Mohd Said, Norazwina Zainol. <a href=\"http://modern-journals.com/index.php/ijma/article/view/378\">Comparison of Response Surface Methodology and Artificial Neural Network for the Solvent Extraction of Fatty Acid Methyl Ester from Fish Waste. <\/a> <em>International Journal of Modern Agriculture, Volume 9, No.3, 2020, ISSN: 2305-7246. <\/em> Sep. 2020.\n84) Cicirello, V. A. <a href=\"https://doi.org/10.21105/joss.02448\">Chips-n-Salsa: A Java Library of Customizable, Hybridizable, Iterative, Parallel, Stochastic, and Self-Adaptive Local Search Algorithms.<\/a> <em>Journal of Open Source Software, 5(52), 2448. <\/em><\/a> Aug. 2020.\n85) Li, Yuanyuan; Carabelli, Stefano;Fadda, Edoardo; Manerba, Daniele; Tadei, Roberto; Terzo, Olivier. <a href=\"https://iris.polito.it/retrieve/handle/11583/2842141/388548/I40for_Advanced_Manufacturing_Technology.pdf\">Machine Learning and Optimization for Production Rescheduling in Industry 4.0.<\/a> <em>THE INTERNATIONAL JOURNAL OF ADVANCED MANUFACTURING TECHNOLOGY. - ISSN 1433-3015. <\/em><\/a> Aug. 2020.\n86) Dolly Sapra and Andy D. Pimentel. <a href=\"https://staff.fnwi.uva.nl/a.d.pimentel/artemis/GECCO2020.pdf\">An Evolutionary Optimization Algorithm for GraduallySaturating Objective Functions.<\/a> <em>GECCO ’20, Cancún, Mexico. <\/em><\/a> July. 2020.\n87) Dolly Sapra and Andy D. Pimentel. <a href=\"https://staff.fnwi.uva.nl/a.d.pimentel/artemis/EvoML2020.pdf\">Constrained Evolutionary Piecemeal Training to Design Convolutional Neural Networks.<\/a> <em>IEA/AIE 2020 – Kitakyushu, Japan. <\/em><\/a> July. 2020.\n88) Femi Emmanuel Ayo, Sakinat Oluwabukonla Folorunso, Adebayo A. Abayomi-Alli, Adebola Olayinka Adekunle, Joseph Bamidele   Awotunde. <a href=\"https://doi.org/10.1080/19393555.2020.1767240\">Network intrusion detection based on deep learning model optimized with rule-based hybrid feature selection.<\/a> <em>Information Security Journal: A Global Perspective. <\/em><\/a> May 2020.\n89) Zainol N., Fakharudin A.S., Zulaidi N.I.S. <a href=\"https://link.springer.com/chapter/10.1007%2F978-981-15-4821-5_11\">Model Optimization Using Artificial Intelligence Algorithms for Biological Food Waste Degradation.<\/a> <em>Yaser A. (eds) Advances in Waste Processing Technology. Springer, Singapore. <\/em><\/a> May 2020.\n90) Sonya Voneva, Manar Mazkatli, Johannes Grohmann and Anne Koziolek. <a href=\"https://sdqweb.ipd.kit.edu/publications/pdfs/voneva2020a.pdf\">Optimizing Parametric Dependencies forIncremental Performance Model Extraction.<\/a> <em>Karlsruhe Institute of Technology, Karlsruhe, Germany. <\/em><\/a> April. 2020.\n91) Raúl Lara-Cabrera, Ángel González-Prieto, Fernando Ortega and Jesús Bobadilla. <a href=\"https://www.mdpi.com/2076-3417/10/2/675\">Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming.<\/a> <em>MDPI, Applied Sciences. <\/em><\/a> Feb. 2020.\n92) Humm B.G., Hutter M. <a href=\"https://link.springer.com/chapter/10.1007/978-3-030-41913-4_12\">Learning Patterns for Complex Event Detection in Robot Sensor Data.<\/a> <em>Optimization and Learning. OLA 2020. Communications in Computer and Information Science, vol 1173. Springer <\/em><\/a> Feb. 2020.\n93) Erich C. Teppan, Giacomo Da Col. <a href=\"https://link.springer.com/chapter/10.1007/978-981-15-1918-5_7\">Genetic Algorithms for Creating Large Job Shop Dispatching Rules. <\/a> <em>Advances in Integrations of Intelligent Methods. Smart Innovation, Systems and Technologies, vol 170. Springer, Singapore. <\/em><\/a> Jan. 2020.\n94) Ricardo Pérez-Castillo, Francisco Ruiz, Mario Piattini. <a href=\"https://www.sciencedirect.com/science/article/pii/S016792362030004X\">A decision-making support system for Enterprise Architecture Modelling. <\/a> <em>Decision Support Systems. <\/em><\/a> Jan. 2020.\n95) Sabrina Appel, Wolfgang Geithner, Stephan Reimann, Mariusz Sapinski, Rahul Singh and Dominik Vilsmeier. <a href=\"https://www.worldscientific.com/doi/abs/10.1142/S0217751X19420193\">Application of nature-inspired optimization algorithms and machine learning for heavy-ion synchrotrons. <\/a> <em>International Journal of Modern Physics A. <\/em><\/a> Dec. 2019.\n96) O. M. Elzeki, M. F. Alrahmawy, Samir Elmougy. <a href=\"http://www.mecs-press.org/ijisa/ijisa-v11-n12/IJISA-V11-N12-3.pdf\">A New Hybrid Genetic and Information Gain Algorithm for Imputing Missing Values in Cancer Genes Datasets. <\/a> <em>PInternational Journal of Intelligent Systems and Applications (IJISA), Vol.11, No.12, pp.20-33, DOI: 10.5815/ijisa.2019.12.03. <\/em><\/a> Dec. 2019.\n97) Oliver Strauß, Ahmad Almheidat and Holger Kett. <a href=\"https://pdfs.semanticscholar.org/0a91/c4e03a2acd8c295af398167edf7350ad0662.pdf\">Applying Heuristic and Machine Learning Strategies to ProductResolution. <\/a> <em>Proceedings of the 15th International Conference on Web Information Systems and Technologies (WEBIST 2019), pages 242-249. <\/em><\/a> Nov. 2019.\n98) Yuanyuan Li, Stefano Carabelli, Edoardo Fadda, Daniele Manerba, Roberto Tadei1 and Olivier Terzo. <a href=\"http://www.orgroup.polito.it/material/DAUIN-ORO-2019-06.pdf\">Integration of Machine Learning and OptimizationTechniques for Flexible Job-Shop Rescheduling inIndustry 4.0. <\/a> <em>Politecnico di Torino, Operations Research and Optimization Group. <\/em><\/a> Oct. 2019.\n99) Höttger R., Igel B., Spinczyk O. <a href=\"https://link.springer.com/chapter/10.1007/978-3-030-30275-7_44\">Constrained Software Distribution for Automotive Systems. <\/a> <em>Communications in Computer and Information Science, vol 1078. <\/em><\/a> Oct. 2019.\n100) Jin-wooLee, Gwangseon Jang, Hohyun Jung, Jae-Gil Lee, Uichin Lee. <a href=\"https://doi.org/10.1016/j.pmcj.2019.101082\">Maximizing MapReduce job speed and reliability in the mobile cloud by optimizing task allocation. <\/a> <em>Pervasive and Mobile Computing. <\/em><\/a> Oct. 2019.\n101) Krawczyk, Lukas, Mahmoud Bazzal, Ram Prasath Govindarajan and Carsten Wolff. <a href=\"https://ieeexplore.ieee.org/document/8904877\">Model-Based Timing Analysis and Deployment Optimization for Heterogeneous Multi-core Systems using Eclipse APP4MC. <\/a> <em>2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion: 44-53. <\/em><\/a> Sep. 2019.\n102) Junio Cezar Ribeiro da Silva, Lorena Leão, Vinicius Petrucci, Abdoulaye Gamatié, Fernando MagnoQuintao Pereira. <a href=\"https://hal-lirmm.ccsd.cnrs.fr/lirmm-02281112/document\">Scheduling in Heterogeneous Architectures via Multivariate Linear Regression on Function Inputs. <\/a> <em>lirmm-02281112. <\/em><\/a> Sep. 2019.\n103) Eric O. Scott, Sean Luke. <a href=\"https://dl.acm.org/doi/10.1145/3319619.3326865\">ECJ at 20: toward a general metaheuristics toolkit. <\/a> <em>GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference Companion, Pages 1391–1398. <\/em><\/a> July 2019.\n104) Francisco G. Montoya and Raúl Baños Navarro (Eds.). <a href=\"https://www.mdpi.com/books/pdfview/book/1450\">Optimization Methods Applied to Power Systems, Volume 2. <\/a> <em>MDPI Books, ISBN 978-3-03921-156-2. <\/em><\/a> July 2019.\n105) Höttger, Robert & Ki, Junhyung & Bui, Bao & Igel, Burkhard & Spinczyk, Olaf. <a href=\"https://www.researchgate.net/publication/335137686_CPU-GPU_Response_Time_and_Mapping_Analysis_for_High-Performance_Automotive_Systems\">CPU-GPU Response Time and Mapping Analysis for High-Performance Automotive Systems. <\/a> <em>10th International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems (WATERS) co-located with the 31st Euromicro Conference on Real-Time Systems (ECRTS'19). <\/em><\/a> July 2019.\n106) Maxime Cordy, Steve Muller, Mike Papadakis, and Yves Le Traon. <a href=\"http://delivery.acm.org/10.1145/3340000/3330580/issta19main-p399-p.pdf?ip=84.114.111.7&id=3330580&acc=OPEN&key=4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E6D218144511F3437&__acm__=1563299816_46b771752984b933c8c119b7f7d81805\">Search-based test and improvement of machine-learning-based anomaly detection systems. <\/a> <em>Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2019). ACM, New York, NY, USA, 158-168. <\/em><\/a> July 2019.\n107) Michael Vistein, Jan Faber, Clemens Schmidt-Eisenlohr, Daniel Reiter. <a href=\"https://doi.org/10.1016/j.promfg.2020.01.220\">Automated Handling of Auxiliary Materials using a Multi-Kinematic Gripping System. <\/a> <em>Procedia Manufacturing Volume 38, 2019, Pages 1276-1283. <\/em><\/a> June 2019.\n108) Nikolaos Nikolakis, Ioannis Stathakis, Sotirios Makris. <a href=\"https://doi.org/10.1016/j.procir.2019.03.153\">On an evolutionary information system for personalized support to plant operators. <\/a> <em>52nd CIRP Conference on Manufacturing Systems (CMS), Ljubljana, Slovenia. <\/em><\/a> June 2019.\n109) Michael Trotter, Timothy Wood and Jinho Hwang. <a href=\"http://faculty.cs.gwu.edu/timwood/papers/19-ICAC-storm.pdf\">Forecasting a Storm: Divining Optimal Configurations using Genetic Algorithms and Supervised Learning. <\/a> <em>13th IEEE International Conference on Self-Adaptive and Self-Organizing Systems (SASO 2019). <\/em><\/a> June 2019.\n110) Krawczyk, Lukas & Bazzal, Mahmoud & Prasath Govindarajan, Ram & Wolff, Carsten. <a href=\"https://www.researchgate.net/publication/334084554_An_analytical_approach_for_calculating_end-to-end_response_times_in_autonomous_driving_applications\">An analytical approach for calculating end-to-end response times in autonomous driving applications. <\/a> <em>10th International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems (WATERS 2019). <\/em><\/a> June 2019.\n111) Rodolfo Ayala Lopes, Thiago Macedo Gomes, and Alan Robert Resende de Freitas. <a href=\"http://delivery.acm.org/10.1145/3330000/3326828/p1366-lopes.pdf?ip=84.114.111.7&id=3326828&acc=OPEN&key=4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E6D218144511F3437&__acm__=1563021092_5e8cda0c5ddddb14d4f5e9e3bd610a44\">A symbolic evolutionary algorithm software platform. <\/a> <em>Proceedings of the Genetic and Evolutionary Computation Conference Companion (GECCO '19). <\/em><\/a> July 2019.\n112) Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tůma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Würthinger, Walter Binder. <a href=\"https://renaissance.dev/resources/docs/renaissance-suite.pdf\">Renaissance: Benchmarking Suite for Parallel Applications on the JVM. <\/a> <em>PLDI ’19, Phoenix, AZ, USA. <\/em><\/a> June 2019.\n113) Robert Höttger, Lukas Krawczyk, Burkhard Igel, Olaf Spinczyk. <a href=\"http://2019.rtas.org/wp-content/uploads/2019/04/RTAS19_BP_proceedings.pdf#page=23\">Memory Mapping Analysis for Automotive Systems. <\/a> <em>Brief Presentations Proceedings (RTAS 2019). <\/em><\/a> Apr. 2019.\n114) Al Akkad, M. A., & Gazimzyanov, F. F. <a href=\"http://izdat.istu.ru/index.php/ISM/article/view/4317\">AUTOMATED SYSTEM FOR EVALUATING 2D-IMAGE COMPOSITIONAL CHARACTERISTICS: CONFIGURING THE MATHEMATICAL MODEL.<\/a> <em>Intellekt. Sist. Proizv., 17(1), 26-33. doi: 10.22213/2410-9304-2019-1-26-33. <\/em><\/a> Apr. 2019.\n115) Alcayde, A.; Baños, R.; Arrabal-Campos, F.M.; Montoya, F.G. <a href=\"https://www.mdpi.com/1996-1073/12/7/1270\">Optimization of the Contracted Electric Power by Means of Genetic Algorithms.<\/a> <em>Energies, Volume 12, Issue 7, <\/em><\/a> Apr. 2019.\n116) Abdul Sahli Fakharudin, Norazwina Zainol, Zulsyazwan Ahmad Khushairi. <a href=\"https://dl.acm.org/doi/10.1145/3323716.3323737\">Modelling and Optimisation of Oil Palm Trunk Core Biodelignification using Neural Network and Genetic Algorithm.<\/a> <em>IEEA '19: Proceedings of the 8th International Conference on Informatics, Environment, Energy and Applications; Pages 155–158, <\/em><\/a> Mar. 2019.\n117) Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tůma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Wuerthinger, Walter Binder. <a href=\"https://arxiv.org/pdf/1903.10267.pdf\">On Evaluating the Renaissance Benchmarking Suite: Variety, Performance, and Complexity.<\/a> <em>Cornell University: Programming Languages, <\/em><\/a> Mar. 2019.\n118) S. Appel, W. Geithner, S. Reimann, M Sapinski, R. Singh, D. M. Vilsmeier <a href=\"https://www.researchgate.net/profile/Sabrina_Appel/publication/330934110_OPTIMIZATION_OF_HEAVY-ION_SYNCHROTRONS_USING_NATURE-INSPIRED_ALGORITHMS_AND_MACHINE_LEARNING/links/5c5c425b299bf1d14cb33546/OPTIMIZATION-OF-HEAVY-ION-SYNCHROTRONS-USING-NATURE-INSPIRED-ALGORITHMS-AND-MACHINE-LEARNING.pdf\">OPTIMIZATION OF HEAVY-ION SYNCHROTRONS USINGNATURE-INSPIRED ALGORITHMS AND MACHINE LEARNING.<\/a><em><a href=\"https://bt.pa.msu.edu/ICAP18/index.html\">13th Int. Computational Accelerator Physics Conf.<\/a>, <\/em><\/a> Feb. 2019.\n119) Saad, Christian, Bernhard Bauer, Ulrich R Mansmann, and Jian Li. <a href=\"https://journals.sagepub.com/doi/10.1177/1177932218818458\">AutoAnalyze in Systems Biology.<\/a> <em>Bioinformatics and Biology Insights, <\/em><\/a> Jan. 2019.\n120) Gandeva Bayu Satrya, Soo Young Shin. <a href=\"https://arxiv.org/pdf/1812.01201.pdf\">Evolutionary Computing Approach to Optimize Superframe Scheduling on Industrial Wireless Sensor Networks.<\/a> <em>Cornell University, <\/em><\/a> Dec. 2018.\n121) H.R. Maier, S. Razavi, Z. Kapelan, L.S. Matott, J. Kasprzyk, B.A. Tolson. <a href=\"https://www.sciencedirect.com/science/article/pii/S1364815218305905\">Introductory overview: Optimization using evolutionary algorithms and other metaheuristics.<\/a> <em>Environmental Modelling & Software, <\/em><\/a> Dec. 2018.\n122) Erich C. Teppan and Giacomo Da Col. <a href=\"http://ceur-ws.org/Vol-2252/paper4.pdf\">Automatic Generation of Dispatching Rules for Large Job Shops by Means of Genetic Algorithms.<\/a> <em>CIMA 2018, International Workshop on Combinations of Intelligent Methods and Applications, <\/em><\/a> Nov. 2018.\n123) Pasquale Salzaa, Filomena Ferrucci. <a href=\"https://www.sciencedirect.com/science/article/pii/S0167739X17324147\">Speed up genetic algorithms in the cloud using software containers.<\/a> <em>Future Generation Computer Systems, <\/em><\/a> Oct. 2018.\n124) Ghulam Mubashar Hassan and Mark Reynolds. <a href=\"https://easychair.org/publications/open/GRLP\">Genetic Algorithms for Scheduling and Optimization of Ore Train Networks.<\/a> <em>GCAI-2018. 4th Global Conference on Artificial Intelligence, <\/em><\/a> Sep. 2018.\n125) Drezewski, Rafal & Kruk, Sylwia & Makowka, Maciej. [The Evolutionary Optimization of a Company’s Return on Equity Factor: Towards the Agent-Based Bio-Inspired System Supporting Corporate Finance Decisions.](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8466578) <em>IEEE Access. 6. 10.1109/ACCESS.2018.2870201, <\/em><\/a> Sep. 2018.\n126) Arifin, H. H., Chimplee, N. , Kit Robert Ong, H. , Daengdej, J. and Sortrakul, T. <a href=\"https://onlinelibrary.wiley.com/doi/abs/10.1002/j.2334-5837.2018.00549.x\">Automated Component‐Selection of Design Synthesis for Physical Architecture with Model‐Based Systems Engineering using Evolutionary Trade‐off.<\/a> <em><a href=\"https://onlinelibrary.wiley.com/doi/abs/10.1002/j.2334-5837.2018.00549.x\">INCOSE International Symposium, 28: 1296-1310<\/a>, <\/em><\/a> Aug. 2018.\n127) Ong, Robert & Sortrakul, Thotsapon. <a href=\"https://www.researchgate.net/publication/327096423_Comparison_of_Selection_Methods_of_Genetic_Algorithms_for_Automated_Component-Selection_of_Design_Synthesis_with_Model-Based_Systems_Engineering\">Comparison of Selection Methods of Genetic Algorithms for Automated Component-Selection of Design Synthesis with Model-Based Systems Engineering.<\/a> <em>Conference: I-SEEC 2018, <\/em> May 2018.\n128) Stephan Pirnbaum. [Die Evolution im Algorithmus - Teil 2: Multikriterielle Optimierung und Architekturerkennung.](http://www.buschmais.de/wp-content/uploads/2018/06/Die-Evolution-im-Algorithmus_Teil2_JS_03_18.pdf) <a href=\"https://www.sigs-datacom.de/digital/javaspektrum/\"><em>JavaSPEKTRUM 03/2018, pp 66–69, <\/em><\/a> May 2018.\n129) W. Geithner, Z. Andelkovic, S. Appel, O. Geithner, F. Herfurth, S. Reimann, G. Vorobjev, F. Wilhelmstötter. [Genetic Algorithms for Machine Optimization in the Fair Control System Environment.](http://accelconf.web.cern.ch/AccelConf/ipac2018/papers/thpml028.pdf)<em> [The 9th International Particle Accelerator Conference (IPAC'18)](https://ipac18.org/welcome/), <\/em><\/a> May 2018.\n130) Stephan Pirnbaum. [Die Evolution im Algorithmus - Teil 1: Grundlagen.](http://www.buschmais.de/wp-content/uploads/2018/02/Die-Evolution-im-Algorithmus_JS_01_18.pdf) <a href=\"https://www.sigs-datacom.de/digital/javaspektrum/\"><em>JavaSPEKTRUM 01/2018, pp 64–68, <\/em><\/a> Jan. 2018.\n131) Alexander Felfernig, Rouven Walter, José A. Galindo, David Benavides, Seda Polat Erdeniz, Müslüm Atas, Stefan Reiterer. <a href=\"https://link.springer.com/article/10.1007/s10844-017-0492-1\">Anytime diagnosis for reconfiguration. <\/a> <em>Journal of Intelligent Information Systems, pp 1–22, <\/em> Jan. 2018.\n132) Bruce A. Johnson. <a href=\"https://link.springer.com/protocol/10.1007/978-1-4939-7386-6_13\">From Raw Data to Protein Backbone Chemical Shifts Using NMRFx Processing and NMRViewJ Analysis. <\/a> <em>Protein NMR: Methods and Protocols, pp. 257--310, Springer New York, <\/em> Nov. 2017.\n133) Cuadra P., Krawczyk L., Höttger R., Heisig P., Wolff C. <a href=\"https://link.springer.com/chapter/10.1007/978-3-319-67642-5_30\">Automated Scheduling for Tightly-Coupled Embedded Multi-core Systems Using Hybrid Genetic Algorithms. <\/a> <em>Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania.<\/em> Communications in Computer and Information Science, vol 756. Springer, Cham, Sep. 2017.\n134) Michael Trotter, Guyue Liu, Timothy Wood. <a href=\"http://ieeexplore.ieee.org/abstract/document/8064120/\">Into the Storm: Descrying Optimal Configurations Using Genetic Algorithms and Bayesian Optimization. <\/a> <em><a href=\"http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=8063634\">Foundations and Applications of Self* Systems (FAS*W), 2017 IEEE 2nd International Workshops<\/a><\/em> Sep. 2017.\n135) Emna Hachicha, Karn Yongsiriwit, Mohamed Sellami. <a href=\"https://doi.org/10.1109/ICWS.2017.101\">Genetic-Based Configurable Cloud Resource Allocation in QoS-Aware Business Process Development. <\/a> <em>Information and Software Technologies: 23rd International Conference, ICIST 2017, Druskininkai, Lithuania.<\/em> Web Services (ICWS), 2017 IEEE International Conference, Jun. 2017.\n136) Abraão G. Nazário, Fábio R. A. Silva, Raimundo Teive, Leonardo Villa, Antônio Flávio, João Zico, Eire Fragoso, Ederson F. Souza. <a href=\"http://siaiap32.univali.br/seer/index.php/acotb/article/view/10579/5933\">Automação Domótica Simulada Utilizando Algoritmo Genético Especializado na Redução do Consumo de Energia. <\/a> <em>Computer on the Beach 2017<\/em> pp. 180-189, March 2017.\n137) Bandaru, S. and Deb, K. <a href=\"http://dx.doi.org/10.1201/9781315183176-12\">Metaheuristic Techniques.<\/a> <em>Decision Sciences.<\/em> CRC Press, pp. 693-750, Nov. 2016.\n138) Lyazid Toumi, Abdelouahab Moussaoui, and Ahmet Ugur. <a href=\"http://dx.doi.org/10.1145/2816839.2816876\">EMeD-Part: An Efficient Methodology for Horizontal Partitioning in Data Warehouses.<\/a> <em>Proceedings of the International Conference on Intelligent Information Processing, Security and Advanced Communication.<\/em> Djallel Eddine Boubiche, Faouzi Hidoussi, and Homero Toral Cruz (Eds.). ACM, New York, NY, USA, Article 43, 7 pages, 2015.\n139) Andreas Holzinger (Editor), Igo Jurisica (Editor). <a href=\"http://www.springer.com/computer/database+management+%26+information+retrieval/book/978-3-662-43967-8\">Interactive Knowledge Discovery and Data Mining in Biomedical Informatics.<\/a> <em>Lecture Notes in Computer Science, Vol. 8401.<\/em> <a href=\"http://www.springer.com\">Springer<\/a>, 2014.\n140) Lyazid Toumi, Abdelouahab Moussaoui, Ahmet Ugur. <a href=\"http://link.springer.com/article/10.1007%2Fs11227-013-1058-9\">Particle swarm optimization for bitmap join indexes selection problem in data warehouses.<\/a> <em><a href=\"http://link.springer.com/journal/11227\">The Journal of Supercomputing<\/a>, Volume 68, <a href=\"http://link.springer.com/journal/11227/68/2/page/1\">Issue 2<\/a>, pp 672-708, May 2014.<\/em>\n141) TANG Yi (Guangzhou Power Supply Bureau Limited, Guangzhou 511400, China) <a href=\"http://en.cnki.com.cn/Article_en/CJFDTOTAL-JXKF201210017.htm\"> <em>Study on Object-Oriented Reactive Compensation Allocation Optimization Algorithm for Distribution Networks<\/em><\/a>, Oct. 2012.\n142) John M. Linebarger, Richard J. Detry, Robert J. Glass, Walter E. Beyeler, Arlo L. Ames, Patrick D. Finley, S. Louise Maffitt. <a href=\"http://prod.sandia.gov/techlib/access-control.cgi/2012/121117.pdf\"> <em>Complex Adaptive Systems of Systems Engineering Environment Version 1.0.  <\/em><\/a> <a href=\"http://www.sandia.gov/CasosEngineering/\">SAND REPORT<\/a>, Feb. 2012.\n<\/details>\n\n## Release notes\n\n### [9.0.0](https://github.com/jenetics/jenetics/releases/tag/v9.0.0)\n\n#### Improvements\n\n* Update Java 25 and optimize code for new Java version.\n* [#917](https://github.com/jenetics/jenetics/issues/917): `ScopedValue` for `RandomRegistry` class.\n* [#940](https://github.com/jenetics/jenetics/issues/940): Remove deprecated API.\n* [#955](https://github.com/jenetics/jenetics/issues/955): Make `IntStream` counting more robust.\n\n_[All Release Notes](RELEASE_NOTES.md)_\n\n## License\n\nThe library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n\tCopyright 2007-2026 Franz Wilhelmstötter\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n\n\n## Used software\n\n\n<a href=\"https://www.jetbrains.com/idea/\"><img src=\"http://jenetics.io/img/icon_IntelliJIDEA.png\" alt=\"IntelliJ\" height=\"100\"/><\/a>\n\n<a href=\"https://www.syntevo.com/smartgit/\"><img src=\"https://www.syntevo.com/assets/images/logos/smartgit-8c1aa1e2.svg\" alt=\"SmartGit\" height=\"100\"/><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FAE6:149227:17A37F:5CBEB4:6AB920A0"},"text_sha256":"f73340523103e441d18e93ebf3b7d834b6adb1b10f988f90d84d94b3601953b0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"MycroftAI/enclosure-picroft","input_row":{"repository":"MycroftAI/enclosure-picroft","url":"https://github.com/MycroftAI/enclosure-picroft","name":"enclosure-picroft","owner":"MycroftAI","description":"Mycroft interface for Raspberry Pi environment","language":"Shell","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":816,"issues":102,"created_at":"2017-01-15T06:28:08Z","updated_at":"2026-09-04T13:20:06Z","first_commit_at":"2017-01-15T06:28:08Z","last_commit_at":"2022-12-07T04:45:38Z","activity_months":70.689999999999998,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:07.307Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MycroftAI/enclosure-picroft","visibility":"public","created_at":"2017-01-15T06:28:08Z","updated_at":"2026-09-04T13:20:06Z","private":false,"fork":false,"archived":false,"stargazers_count":816,"open_issues_count":24,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"3434","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F7:14A1F2:17F16A3:1C0FC9B:6AB92833"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3433","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F6:35C5DA:1788D34:1BA669B:6AB92833"},"commit":{"sha":"05e107cf66de1396ac62ef9cafef1c216aa0bd22","url":"https://github.com/MycroftAI/enclosure-picroft/commit/05e107cf66de1396ac62ef9cafef1c216aa0bd22","date":"2018-03-23T23:41:40Z","author_date":"2018-03-23T23:41:40Z","committer_date":"2018-03-23T23:41:40Z","tree_sha":"341a6ad3ae8bb95b35f4a7d0ad84a9dba24215fa","message_first_line":"Update to Pi Day 2018 image"},"tree_request_status":200,"tree_rate":{"github_remaining":"3432","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:17E5C0A:1C044DE:6AB92834"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4060,"blob_sha":"5c7f5cf842f9b9c0125b8134eb81955dba6c0d06","priority":0}],"documents":[{"path":"README.md","size":4060,"blob_sha":"5c7f5cf842f9b9c0125b8134eb81955dba6c0d06","priority":0,"status":200,"text":"# Welcome\n\n## Picroft - 2018-3-14 \"Pi Day\" release!\nThe Picroft project is an enclosure for a stock Raspberry Pi connected to a speaker and basic USB microphone.  This is built around a Raspbian Jessie Lite installation.  The entire project is available as a pre-built micro-SD image ready to be burned and placed into a Raspberry Pi.  You can download the pre-built image here:\n\n [![Download img](https://github.com/MycroftAI/enclosure-picroft/raw/master/microsd-icon.png \"Download img\") Picroft 2018-3-14 image](https://mycroft.ai/to/picroft-image)\n \nSHA256 checksum for the `raspbian_Picroft_2018-03-14.zip` image:\n```32864c5da8e5d84d91554a6b0e9240271fbc1af147b44ac7ac7e77e57c7614ea```\n\n## Requirements\n\n* Raspberry Pi 3 (Older versions do not have sufficient processing power, and if they work they will be very slow)\n* MicroSD Card (8 GB or larger)\n* Any analog speaker\n* USB Microphone.  Tested with CM108-based microphones.\n\n## Installation\n\n[Official Raspberry Pi Image Installation Instuctions](https://www.raspberrypi.org/documentation/installation/installing-images/)\n\n[Etcher](https://etcher.io/) Cross-Platform GUI SD card creator for RPi\n\n### Advanced Installation\n- [Windows](https://www.raspberrypi.org/documentation/installation/installing-images/windows.md)\n- [OSX/MacOS](https://www.raspberrypi.org/documentation/installation/installing-images/mac.md)\n- [Linux](https://www.raspberrypi.org/documentation/installation/installing-images/linux.md)\n\n## Usage\n\nUpon boot, Picroft will search for an Ethernet connection.  If none is found, the Wifi Setup process will begin to get the device connected to any available network.\n\nOnce connected, you must pair the device at https://home.mycroft.ai using the code spoken by the device.  You can also read the code on the screen.\n\nAfter that, you can simply speak to Picroft as you would to any Mycroft implementation.  For example:\n\n  \"Hey Mycroft, what time is it?\"\n  \"Mycroft, how tall was Abraham Lincoln?\"\n\n\n## Old Versions\n* [2018-03-14](https://drive.google.com/a/mycroft.ai/uc?id=177BGTTOHUlFsij1mSLi-IJZ87xf9s982&export=download)\n  - Corrected auto_run.sh typo, -ne instead of -eq was preventing script updates\n  - Turned off “wait for network” in raspi-config\n  - Updated to mycroft-core 18.2.2\n  - SHA256: ```32864c5da8e5d84d91554a6b0e9240271fbc1af147b44ac7ac7e77e57c7614ea```\n* [0.9.1](https://drive.google.com/a/mycroft.ai/uc?id=0Bzao3lLsdthPaE1VWXRzRUVsWWM&export=download)\n  - Preloaded with mycroft-core 0.9.14\n  - better pairing\n  - launch CLI after boot\n  - SHA256: ```d3041e41e7b6f1ca4f4b9ad3b4a665702b9dc32b285884d9bfdad8aefb9b788d```\n* [0.9](https://drive.google.com/a/mycroft.ai/uc?id=0Bzao3lLsdthPZUNneUg5djhtTGM&export=download)\n  - Preloaded with 17.08a\n  - auto-upgrading from this repo\n* [0.8](https://rebrand.ly/Picroft-0_8)\n  - Switch to Home backend\n* [0.5.1](https://rebrand.ly/Picroft-0_5_1)\n  - Fixed several audio issues with 0.5 image\n* 0.5\n  - Original image\n  - Connected to Cerberus backend\n\n## Help and more info\nCheck out the project wiki [here](https://github.com/MycroftAI/enclosure-picroft/wiki).  \nThere's also the general [Documentation](https://docs.mycroft.ai/).\n\n## There are two scripts run on startup\n* `audio_setup.sh` configures your specific audio setup.\n* `custom_setup.sh` is a stub meant to initialize any other IoT devices or services you might need like a DLNA server or syslog for example.\n\n## Using USB Audio as Output\n\nTypically the USB audio should be connected to hwplug:1,0 but to verify run the following:\n\n`aplay -L`\n\nFind the hwplug output for the device you want to use, take this and update the /etc/mycroft/mycroft.conf file accordingly:\n\n\"play_wav_cmdline\": \"aplay -Dhw:0,0 %1\" this line now becomes \"play_wav_cmdline\": \"aplay -Dplughw:1,0 %1\"\n\nYou can now run ./auto_run.sh to start the program back up and test and ensure the output comes through the USB speakers.\n\n---\n\nThere is an active *Picroft* community within the [Mycroft's Mattermost](https://chat.mycroft.ai/community/channels/picroft) which are welcome to join!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4142:09BF:AB12C:2C6FB8:6AB920A2"},"text_sha256":"e1bab0d976fd840d6a683158a64a5fb0da4f530cd80bcb31f3ddd7ea85ccd764"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3431","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:17EFF76:1C0E620:6AB92834"},"commit":{"sha":"eb47610df974dd223212a1ba5f782ff1b491b777","url":"https://github.com/MycroftAI/enclosure-picroft/commit/eb47610df974dd223212a1ba5f782ff1b491b777","date":"2022-12-07T04:45:38Z","author_date":"2022-12-07T04:45:38Z","committer_date":"2022-12-07T04:45:38Z","tree_sha":"faccef40a16f0b2492db319f3765460574d4c0c7","message_first_line":"Add Youtube link to referenced Buster Keaton film"},"tree_request_status":200,"tree_rate":{"github_remaining":"3430","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:1780219:1B9DE3E:6AB92835"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4541,"blob_sha":"ae702f10edf0f2a4251e5a53491176e7e69d79b7","priority":0}],"documents":[{"path":"README.md","size":4541,"blob_sha":"ae702f10edf0f2a4251e5a53491176e7e69d79b7","priority":0,"status":200,"text":"# It's Alive!\n![Safety Last!](./buster-keaton-safety-last.jpg)\n\n## Picroft - Buster Keaton (Pork Pi) release\n\nPicroft is an enclosure for a Raspberry Pi 3, 3B+ or 4 connected to a speaker and\nmicrophone, bringing Mycroft to anyone who wants a simple voice interface they\nhave complete control over.  This is built on top of the official Raspbian\nBuster Lite image.\n\nThe entire project is available as a pre-built micro-SD image ready to be\nburned and placed into a Raspberry Pi. You can download the pre-built image\nhere:\n\n [![Download img](./microsd-icon.png \"Download img\") Picroft Stable 2020-09-07 image](https://mycroft.ai/to/picroft-image)\n\nSHA-256: 3d3c99c53793224b84de02e816435230f2bbe6272b71d8909afee43e5ef9a402\n\n[![Download img](./microsd-icon.png \"Download img\") Picroft Release Candidate 2021-06-04 image](https://mycroft.ai/to/picroft-rc)\n\nSHA-256: 2d5a81375036a1dc4ce30051ea9e9181f4019c8f61264db3a43d87d03df854a6\n\nA list of current and past releases can be found at: https://downloads.mycroft.ai/releases/picroft/\n\nOptionally you can build it yourself by following the [Recipe for building the image](image_recipe.md)\n\n## Requirements\n\n* **Raspberry Pi 3, 3B+, or 4**\n  <br>_Older Raspberry Pi versions do not have sufficient processing power,\n  and if they work they will be very slow_\n* **Speaker**\n  <br>Any analog speaker, or an HDMI monitor with speaker\n* **Microphone**\n  <br>A [list of Community tested hardware](https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/get-mycroft/picroft#tested-hardware) is available in our documentation.\n* **2.5 Amp or better power supply**\n  <br>Don't skimp on this!  It might appear to work, but you'll have weird\n  issues with a cheapo supply.\n* **MicroSD Card**\n  <br>8 GB or larger\n* HDMI Monitor and keyboard, only required during setup\n\n\n## Installation\n\n1) Download and burn the image to the SD card.<br/>See the RaspberryPi.org's\n   guide to\n   [Installing Operating System Images](https://www.raspberrypi.org/documentation/installation/installing-images/)\n   for detailed instructions on how to burn an image to your SD card.\n2) Insert the SD card into your Raspberry Pi\n3) Connect speaker, microphone, monitor and keyboard\n4) Apply power\n5) Follow the on-screen prompts to setup Picroft\n6) Follow the verbal prompts to pair your device to an account at\n   [Mycroft Home](https://account.mycroft.ai/devices/add)\n7) Talk to Mycroft and enjoy!\n\n## Usage\n\nSimply speak to Picroft as you would to any Mycroft.  For example:\n\n    \"Hey Mycroft, what time is it?\"\n    \"Mycroft, how tall was Abraham Lincoln?\"\n\n\n## Older Versions\n* [Raspbian Jessie version](https://github.com/MycroftAI/enclosure-picroft/tree/master)\n\n## Help and more info\nTo re-run the setup wizard, use `mycroft-setup-wizard`.\nCheck out the Picroft wiki [here](https://mycroft.ai/documentation/picroft/).\nThere's also the general [Documentation](https://mycroft.ai/documentation/).\n\n## Customization\n* `audio_setup.sh` configures your specific audio setup.\n* `custom_setup.sh` is a stub meant to initialize anything before Mycroft\n  starts.  For example, initializing connected devices, or launching services.\n\n## Getting Help\n\nThere is an active *Picroft* community within the [Mycroft's Mattermost chat](https://chat.mycroft.ai/community/channels/picroft) which all are welcome to join!\n\n---\n\n### FAQ\n##### Q1) Why \"Buster Keaton (Pork Pi)\"?\nThis image is built on top of Raspbian \"Buster\" for running on a Raspberry Pi. \n\n[Buster Keaton](https://en.wikipedia.org/wiki/Buster_Keaton) is best known \nfor his silent films, but also his signature Pork Pie hats that he designed \nand made himself. Coincidentally, Buster Keaton's classic film\n\"[Safety Last!](https://www.youtube.com/watch?v=V-XZWZVVhvQ&ab_channel=moosetash)\" \ncame out of copyright in 2019.\n\nThe photo at the top of this page we thought was Buster Keaton wearing his \nsignature hat. It turns out that it is actually a slightly more contemporary \n[Harold Lloyd](https://en.wikipedia.org/wiki/Harold_Lloyd).\n\n##### Q2) Can I run this with a the Raspbian desktop GUI?\nSadly, not really.  A Raspberry Pi is powerful, but still not well suited to do\n_everything_ at once.  You can add other basic services on top of Picroft, but\nthe desktop GUI requires too many additional resources and neither Mycroft nor\nthe GUI end up running well.\n\n##### Q3) Can I run this with anything else?\nDepends on what you want to add.  Serving simple webpages or polling devices\nperiodically is probably fine.  Mining bitcoin won't.\n\n##### Q4) Can I run this on a Pi4?\nYes!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF68:7A4F8:17BCAD:5CD7F1:6AB920A4"},"text_sha256":"a87c55a74933c699533c5202e66f17557bb867ac44022a4448f57ddf2e7b94d6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ls1intum/Artemis","input_row":{"repository":"ls1intum/Artemis","url":"https://github.com/ls1intum/Artemis","name":"Artemis","owner":"ls1intum","description":"Artemis - Interactive Learning with Automated Feedback","language":"Java","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":812,"issues":3679,"created_at":"2016-09-29T11:46:05Z","updated_at":"2026-09-26T12:35:08Z","first_commit_at":"2016-06-09T11:31:41Z","last_commit_at":"2026-09-26T11:55:56Z","activity_months":123.56,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:09.734Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ls1intum/Artemis","visibility":"public","created_at":"2016-09-29T11:46:05Z","updated_at":"2026-09-26T12:35:08Z","private":false,"fork":false,"archived":false,"stargazers_count":812,"open_issues_count":483,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3429","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:17D4D46:1BF3435:6AB92835"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3428","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17A62FC:1BC3CF3:6AB92836"},"commit":{"sha":"dbdbf77dcd21268890a3bc41f389611bbc213b63","url":"https://github.com/ls1intum/Artemis/commit/dbdbf77dcd21268890a3bc41f389611bbc213b63","date":"2018-05-20T14:35:22Z","author_date":"2018-05-20T14:35:22Z","committer_date":"2018-05-20T14:35:22Z","tree_sha":"91b52e0f4151d7c00ae7d348b9283e2bba1a3f8a","message_first_line":"remove outdated Docker setup information in README"},"tree_request_status":200,"tree_rate":{"github_remaining":"3427","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:18512F1:1C6FB75:6AB92836"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11935,"blob_sha":"44139da605f1477252be8cc61a886262aadf6201","priority":0}],"documents":[{"path":"README.md","size":11935,"blob_sha":"44139da605f1477252be8cc61a886262aadf6201","priority":0,"status":200,"text":"# ExerciseApplication\nThis application was generated using JHipster 4.14.4, you can find documentation and help at [http://www.jhipster.tech/documentation-archive/v4.14.4](http://www.jhipster.tech/documentation-archive/v4.14.4).\n\n**Curent version:** 1.4.7\n\nThe following UML diagram shows the top-level design of ArTEMiS which is decomposed into an application client and an application server. The application server then connects to a version control system (VCS), a continuous integration system (CIS) and a user management system (UMS).\n\n![Top-Level Design](doc/TopLevelDesign.png \"Top-Level Design\")\n\nWhile ArTEMiS includes generic adapters to these three external systems with a defined protocol which can be instantiated to connect to any VCS, CIS or UMS, it also provides 3 concrete implementations for these adapters to connect to:\n\n1. **VCS:** Atlassian Bitbucket Server\n2. **CIS:** Atlassian Bamboo Server\n3. **UMS:** Atlassian JIRA Server (more specifically Atlassian Crowd on the JIRA Server)\n\n## Exercise Workflow\n\nConducting a programming exercise consists of 7 steps distributed among the instructor, ArTEMiS and students:\n\n1. **Instructor prepares exercise:** Set up a repository containing the exercise code and test cases, build instructions on the CI server, and configures the exercise in ArTEMiS.\n2. **Student starts exercise:** Click on start exercise on ArTEMiS which automatically generates a copy of the repository with the exercise code and configures a build plan accordingly.\n3. **Optional: Student clones repository:** Clone the personalized repository from the remote VCS to the local machine.\n4. **Student solves exercise:** Solve the exercise with an IDE of choice on the local computer or in the online editor.\n5. **Student uploads solution:** Upload changes of the source code to the VCS by committing and pushing them to the remote server (or by clicking submit in the online editor).\n6. **CI server verifies solution:** verify the student's submission by executing the test cases (see step 1) and provide feedback which parts are correct or wrong.\n7. **Student reviews personal result:** Reviews build result and feedback using ArTEMiS. In case of a failed build, reattempt to solve the exercise (step 4).\n8. **Instructor reviews course results:** Review overall results of all students, and react to common errors and problems.\n\nThe following activity diagram shows this exercise workflow. \n\n![Exercise Workflow](doc/ExerciseWorkflow.png \"Exercise Workflow\")\n\n## Online Editor\n\nThe following screenshot shows the online editor with interactive and dynamic exercise instructions on the right side.\nTasks and UML diagram elements are referenced by test cases and update their color from red to green after students submit a new version and all test cases associated with a task or diagram element pass.\nThis allows the students to immediately recognize which tasks are already fulfilled and is particularly helpful for programming beginners.\n\n![Online Editor](doc/OnlineEditor.png \"Online Editor****\")\n\n## Development Setup\n\nBefore you can build ArTEMiS, you must install and configure the following dependencies/tools on your machine:\n\n1. [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html): Java is the main development language for the server application of ArTEMiS.\n\n2. [MySQL Database Server 5.7.x](https://dev.mysql.com/downloads/mysql): ArTEMiS uses Hibernate to store entities in a MySQL database. Download and install the MySQL Community Server (5.7.x) and configure the 'root' user with an empty password. (In case you want to use a different password, make sure to change the value in application-dev.yml and in liquibase.gradle) \n\n3. [Node.js 9](https://nodejs.org): We use Node (>=6.9.0 && <=9.11.1) to run a development web server and build the project. Depending on your system, you can install Node either from source or as a pre-packaged bundle.\n\n4. [Yarn](https://yarnpkg.com): We use Yarn to manage Node dependencies. Depending on your system, you can install Yarn either from source or as a pre-packaged bundle.\n\nAfter installing Node, you should be able to run the following command to install development tools. You will only need to run this command when dependencies change in [package.json](package.json).\n\n```\nyarn install\n```\n\nWe use [Gulp](https://gulpjs.com) as build system. Install the Gulp command-line tool globally with:\n\n```\nyarn global add gulp-cli\n```\n\nRun the following commands in two separate terminals to create a blissful development experience where your browser\nauto-refreshes when files change on your hard drive.\n\n```\n./gradlew\ngulp\n```\n\n[Bower](https://bower.io) is used to manage CSS and JavaScript dependencies used in the ArTEMiS application client (in the browser). You can upgrade dependencies by specifying a newer version in [bower.json](bower.json). You can also run `bower update` and `bower install` to manage dependencies. Add the `-h` flag on any command to see how you can use it. For example, `bower update -h`.\n\nFor further instructions on how to develop with JHipster, have a look at [Using JHipster in development](http://www.jhipster.tech/development).\n\nArTEMis is based on [JHipster](https://jhipster.github.io), i.e. Java [Spring Boot](http://projects.spring.io/spring-boot) development on the application server and Javascript ([Angular 1](https://angularjs.org)) development on the application client in the browser. To get an overview of the used technology, have a look at [https://jhipster.github.io/tech-stack](https://jhipster.github.io/tech-stack) and other tutorials on the JHipster homepage.  \n\nYou can find tutorials how to setup JHipster in an IDE ([IntelliJ](https://www.jetbrains.com/idea) is recommended, but it also runs in other IDEs as well) on [https://jhipster.github.io/configuring-ide](https://jhipster.github.io/configuring-ide).\n\nTo start ArTEMiS in your development environment, first import the project and then make sure to install the Spring Boot plugins to run the main class de.tum.in.www1.artemis.ArTEMiSApp. Before the application runs, you have to configure the file application-dev.yml in the folder src/main/resources/config/ and add the following details:\n\n```\nartemis:\n  repo-clone-path: ./repos/\n  encryption-password: <password>\n  result-retrieval-delay: 5000\n  jira:\n    url: https://jirabruegge.in.tum.de\n    user: <user>\n    password: <password>\n    admin-group-name: <admin-group>\n  bitbucket:\n    url: https://repobruegge.in.tum.de\n    user: <user>\n    password: <password>\n  bamboo:\n    url: https://bamboobruegge.in.tum.de\n    bitbucket-application-link-id: de1bf2e0-eb40-3a2d-9494-93cbe2e22d08\n    user: <user>\n    password: <password>\n  lti:\n    id: exerciseapp_lti\n    oauth-key: exerciseapp_lti_key\n    oauth-secret: <secret>\n    user-prefix: edx_\n    user-group-name: edx\n  git:\n    name: ArTEMiS\n    email: <email>\n```\nChange the entries with ```<...>``` with proper values, e.g. your TUM Online account to connect to the given instances of JIRA, Bitbucket and Bamboo. Alternatively, you can conncet to your local JIRA, Bitbucket and Bamboo instances (see Docker Setup below). \n\nIn addition, you have to install MySQL, setup a root user without password and create an ExerciseApplication scheme.\n\nThen ArTEMiS should startup by running the main class ```de.tum.in.www1.artemis.ArTEMiSApp``` using Spring Boot.\n\nTo access ArTEMiS in your browser, you have to install npm and execute the following commands in the terminal / command line in the ArTEMiS root folder:\n\n```\nnpm install\nbower install\ngulp\n```\n\nAfter that you should be able to access http://127.0.0.1:8080/ and login with your TUM Online account (if you use our JIRA instance).\n\n## Profiles\n\nArTEMiS uses Spring profiles to segregate parts of the application configuration and make it only available in certain environments. For development purposes, the following program arguments should be used to enable the `dev` profile and the profiles for JIRA, Bitbucket and Bamboo:\n\n    --spring.profiles.active=dev,bamboo,bitbucket,jira \n\nThis is in particular important, when you want to use your TUMOnline account as credential to login, because the class JiraAuthenticationProvider is only activated, when the spring profile jira is active in the run configuration.\n\n\n## Building for production\n\nTo optimize the ExerciseApplication application for production, run:\n\n```\n./gradlew -Pprod clean bootRepackage\n```\n\nThis will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files.\nTo ensure everything worked, run:\n\n```\njava -jar build/libs/*.war\n```\n\nThen navigate to [http://localhost:8080](http://localhost:8080) in your browser.\n\nRefer to [Using JHipster in production](http://www.jhipster.tech/production) for more details.\n\n## Deployment\n\nThe following UML deployment diagram shows a typical deployment of ArTEMiS application server and application client. Student, Instructor and Teaching Assistant (TA) computers are all equipped equally with the ArTEMiS application client being displayed in the browser.\n\nThe Continuous Integration Server typically delegates the build jobs to local build agents within the university infrastructur or to remote build agents, e.g. hosted in the Amazon Cloud (AWS).\n\n![Deployment Overview](doc/DeploymentOverview.png \"Deployment Overview\")\n\n\n## Data Model\n\nThe ArTEMiS application server uses a data model in the MySQL database. The followind UML class diagram shows a simplified version of it. It supports multiple courses with multiple exercises. Each student in the participating student group can participate in the exercise by clicking the **Start Exercise** button. Then a repository and a build plan for the student (User) will be created and configured. The initialization state variable (Enum) helps to track the progress of this complex operation and allows to recover from errors. A student can submit multiple solutions by committing and pushing the source code changes to a given example code into the version control system. Each submission is automatically tested by the continuous integration server, which notifies the ArTEMiS application server, when a new result exists. In addition, teaching assistants can assess student solutions and \"manaully\" create results.\n\n![Data Model](doc/DataModel.png \"Data Model\")\n\n**Please note:** The real data model has become a bit more complex. We allow different types of exercises by having multiple subclasses for programming, modeling and quiz exercises. For each result, we store feedback and a submission. Quiz exercises support multiple choice and drag and drop questions.  \n\n\n## Server Architecture\n\nThe following UML component diagram shows more details of the ArTEMiS application server architecture and its REST interfaces to the application client.\n\n![Server Architecture](doc/ServerArchitecture.png \"Server Architecture\")\n\n## Adapters\n\nThe following UML component diagram shows the details of the Version Control Adapter that allows to connect to multiple Version Control Systems. The other adapters for Continuous Integration and User Management have a similar structure\n\n![Version Control Adapter](doc/VersionControlAdapter.png \"Version Control Adapter\")\n\nThe **Version Control Adapter** includes the following abstract interface that concrete connectors have to implement:\n\n```\n+ copyRepository(baseRepository, user)\n+ configureRepository(repository, user)\n+ deleteRepository(repository)\n+ getRepositoryWebUrl(repository)\n```\n\nThe **Continuous Integration Adapter** includes the following abstract interface that concrete connectors have to implement:\n\n```\n+ copyBuildPlan(baseBuildPlan, user)\n+ configureBuildPlan(buildPlan, repository, user)\n+ deleteBuildPlan(buildPlan)\n+ onBuildCompleted(buildPlan)\n+ getBuildStatus(buildPlan)\n+ getBuildDetails(buildPlan)\n+ getBuildPlanWebUrl(buildPlan)\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B110:24970A:17E0F6:5CF9BA:6AB920A5"},"text_sha256":"8ae7203d9709beb7ea64059b005e1e5ed2fe2b7d06c2386be409abd6064cff4e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3426","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FD:37D6E2:17F011C:1C0E854:6AB92837"},"commit":{"sha":"bdf6352b6bf8d7dd13533570de148b620a207e95","url":"https://github.com/ls1intum/Artemis/commit/bdf6352b6bf8d7dd13533570de148b620a207e95","date":"2026-06-30T19:32:41Z","author_date":"2026-06-30T19:32:41Z","committer_date":"2026-06-30T19:32:41Z","tree_sha":"6730f31e7b269cf697eb15bb5d724ced91fa7e59","message_first_line":"Development: Update Jackson to 2.22.0 to resolve jackson-databind security advisories (#13043)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3425","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17B431E:1BD2947:6AB92838"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":30239,"blob_sha":"88ca4e08d30e5b45b4b685a0ba539fcd4420d11f","priority":0},{"path":"SECURITY.md","size":8252,"blob_sha":"b1a332b37a9b9fd1dd94f7d31c980ec10704667f","priority":1},{"path":"src/main/webapp/app/admin/legal/legal-document-update.component.html","size":2270,"blob_sha":"d5293bbaa83f0dae1e1697dbde964364adb92702","priority":1}],"documents":[{"path":"README.md","size":30239,"blob_sha":"88ca4e08d30e5b45b4b685a0ba539fcd4420d11f","priority":0,"status":200,"text":"# Artemis: Interactive Learning with Individual Feedback \n\n[![CI](https://github.com/ls1intum/Artemis/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/ls1intum/Artemis/actions/workflows/ci.yml)\n[![Documentation](https://github.com/ls1intum/Artemis/actions/workflows/deploy-documentation.yml/badge.svg?event=push)](https://docs.artemis.tum.de)\n[![Code Quality Status](https://app.codacy.com/project/badge/Grade/89860aea5fa74d998ec884f1a875ed0c)](https://www.codacy.com/gh/ls1intum/Artemis?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ls1intum/Artemis&amp;utm_campaign=Badge_Grade)\n[![Coverage Status](https://app.codacy.com/project/badge/Coverage/89860aea5fa74d998ec884f1a875ed0c)](https://www.codacy.com/gh/ls1intum/Artemis?utm_source=github.com&utm_medium=referral&utm_content=ls1intum/Artemis&utm_campaign=Badge_Coverage)\n[![Latest version)](https://img.shields.io/github/v/tag/ls1intum/Artemis?label=%20Latest%20version&sort=semver)](https://github.com/ls1intum/Artemis/releases/latest)\n\nArtemis brings interactive learning to life with instant, individual feedback on programming exercises, quizzes, modeling tasks, and more. Offering customization for instructors and real-time collaboration for students, this platform bridges creativity and education. Embrace a new era of engaging, adaptive learning and artificial intelligence support with Artemis, where innovation meets inclusivity. Find out more on https://artemis.tum.de\n\n## Main goals\n\n1. **User experience**: Provide an intuitive and engaging interface that enhances the learning experience for both students and instructors. Ensure ease of use across diverse learning scenarios, fostering seamless interaction and accessibility.\n\n2. **Scalable infrastructure**: Build a robust platform capable of supporting large-scale courses with thousands of participants simultaneously. Ensure high availability, performance, and adaptability as the platform grows in functionality and user base.\n\n3. **Constructive alignment**: Align learning goals, activities, and assessments through well-integrated features such as the exam mode that support instructional design principles. Enable the seamless implementation of interactive learning methodologies, ensuring that every feature contributes meaningfully to learning goals.\n\n4. **Learning analytics**: Leverage data to provide actionable insights into student performance and engagement. Offer detailed feedback to both learners and instructors, enhancing personalized learning experiences and supporting data-driven decisions for educational improvement while ensuring data privacy and security.\n\n\n## Main features and modules\n\n1. **[Exercises](https://docs.artemis.tum.de/instructor/exercises/intro)** with automatic and manual assessment. Instructors have many configuration options.\n    * **[Team exercises](https://docs.artemis.tum.de/instructor/exercises/team-exercise)**: Instructors can configure team exercises with real-time collaboration and dedicated tutors per team.\n    * **Multiple submissions**: Students can participate in exercises multiple times. Instructors can configure the number of submissions and the submission deadline.\n    * **Practice mode**: Students can practice exercises as often as they want. \n2. **[Programming exercises](https://docs.artemis.tum.de/instructor/exercises/programming-exercise)** with version control, automatic individual feedback (and assessment) based on test cases and static code analysis (executed using continuous integration) for `any programming language`. \n   * **Instant feedback**: Students receive immediate and individual feedback on submissions. Instructors can customize feedback messages easily, hide feedback during the working time (e.g., with hidden tests)\n   * **Interactive:** Instructors integrate interactive instructions based on tasks and UML diagrams directly into the dynamic problem statements. They can define hints for difficult exercise parts.\n   * **Independent**: Instructors can customize programming exercises to support any programming language. To simplify the setup, Artemis includes sophisticated templates for the most common languages (e.g., Java, Python, C, Haskell, Kotlin, VHDL, Assembler, Swift, Ocaml, ...)\n   * **Local and online**: Students can participate locally in their preferred IDE or in the online code editor (without any setup)\n   * **Manual reviews** are possible directly in the online code editor\n   * **Policies**: Instructors can define submission policies (e.g., penalties after 10 attempts) to prevent that students try out all possibilities without thinking.\n   * **Grading**: Instructors have many options to configure grading, analyze the results based on tests and static code analysis categories and re-evaluate the results\n   * **Secure**: Test cases and student code run in Docker environments on build agents. Test frameworks such as [Ares](https://github.com/ls1intum/Ares) simplify the creation of structural and dynamic tests and prevent that students can cheat.\n3. **[Build agents](https://docs.artemis.tum.de/instructor/integrations/integrated-code-lifecycle)** Integrated code lifecycle elevates the programming exercise experience and seamlessly integrates **version control** and **continuous integration**, creating a streamlined, cohesive environment. Unlike external systems, this integrated approach minimizes maintenance overhead and is tailored to the specific needs of a learning platform, offering unparalleled flexibility, performance, and scalability. It simplifies the initial setup for administrators and ensures a smoother, integrated workflow for students and instructors alike. Build agents are responsible for executing the build, test, and static code analysis jobs for programming exercises. They easily integrate into the Artemis infrastructure.\n4. **[Quiz exercises](https://docs.artemis.tum.de/instructor/exercises/quiz-exercise)** with multiple choice, drag and drop, and short answer questions\n    * **Modeling quizzes**: Instructors can easily create drag and drop quizzes based on UML models\n    * **Different modes**: Quizzes support a live mode (rated) during lectures, a practice mode for students to repeat the quiz as often as they want, and an exam mode (see below)\n5. **[Modeling exercises](https://docs.artemis.tum.de/instructor/exercises/modeling-exercise)** based on the easy-to-use online modeling editor [Apollon](https://apollon.ase.in.tum.de) with semi-automatic assessment using machine learning concepts\n   * **Multiple diagram types**: Artemis supports 7 UML diagram types (e.g. class diagrams) and 4 additional diagrams (e.g. flow charts)\n   * **Easy to use**: Students can create models easily using drag and drop, they can explain the models using additional text.\n   * **Integrated feedback**: Reviews can provide feedback and points directly next to the model elements.\n6. **[Text exercises](https://docs.artemis.tum.de/instructor/exercises/text-exercise)** with manual, semi-automatic assessment based on supervised machine learning and natural language processing (NLP) using [Athena](https://github.com/ls1intum/edutelligence/tree/main/athena)\n   * **Integrated feedback**: Reviews can provide feedback and points directly next to the text segments.\n   * **Language detection**: Artemis detects the language of the submission and shows the word and character count. \n7. **[File upload exercises](https://docs.artemis.tum.de/instructor/exercises/file-upload-exercise)** allow full flexibility to instructors. Students can create any kind of file (e.g. PDF, PNG) and submit it to Artemis when they have completed their work. Artemis allows instructors and tutors to download the files and assess them manually based on structured grading criteria (see below in the section Assessment).\n8. **[Exam mode](https://docs.artemis.tum.de/instructor/exams/intro)**: Instructors can create online exams with exercise variants, integrated plagiarism checks, test runs and student reviews. You can find more information on [Exam mode student features](https://artemis.tum.de/features/students) and on [Exam mode instructor features](https://artemis.tum.de/features/instructors).\n9. **[Assessment](https://docs.artemis.tum.de/instructor/assessment-grading/)**: Artemis uses double-blind grading and structured grading criteria to improve consistency and fairness. \n    * **Training process**: It integrates an assessment training process (based on example submissions and example assessments defined by the instructor), has a grading leader board, and allows students to rate the assessments. Students can complain or ask for more feedback. \n    * **Grading**: Instructors can configure grade keys for courses and exams to automatically calculate grades and display them to students. Grades can be easily exported as csv files to upload them into university systems (such as Campus online). They can define bonus configurations for final exams to improve student grades according to their grades from a midterm exam or course exercises.\n10. **[Communication](https://docs.artemis.tum.de/instructor/communication-support/communication)**: Instructors can post announcements. Students can ask questions, post comments, and react to other posts in channels or private chats. Tutors can filter unanswered questions.\n    * **[Notifications](https://docs.artemis.tum.de/student/communication-support/notifications)**: Artemis supports customizable web and email notifications. Users can enable and disable different notification types.\n    * **[Mobile apps](https://docs.artemis.tum.de/student/getting-started/mobile-applications)**: Users can use mobile apps on iOS and Android for an improved user experience.\n11. **[Lectures](https://docs.artemis.tum.de/instructor/lectures)**: Instructors can upload lecture slides, divide lectures into units, integrate video streams, lecture recordings, and exercises into lectures, and define competencies.\n12. **[Atlas](https://docs.artemis.tum.de/instructor/adaptive-learning)**: Atlas is the competency-based management system that supports instructors and students with adaptive learning and learning analytics.\n    * **[Adaptive learning](https://docs.artemis.tum.de/instructor/analytics/adaptive-learning)**: Artemis allows instructors and students to define and track competencies. Students can monitor their progress towards these goals, while instructors can provide tailored feedback. This approach integrates lectures and exercises under overarching learning objectives.\n    * **[Learning analytics](https://docs.artemis.tum.de/instructor/analytics/learning-analytics)**: Artemis integrated different statistics for students to compare themselves to the course average. It allows instructors to evaluate the average student performance based on exercises and competencies.\n    * **[Learning paths](https://docs.artemis.tum.de/instructor/analytics/adaptive-learning#learning-paths)**: Based on the competency model and students' individual progress, Artemis creates learning paths that guide students through the course content.\n13. **[Iris](https://github.com/ls1intum/edutelligence/tree/main/iris)**: Artemis integrates Iris, a LLM-based virtual assistant that supports students and instructors with common questions and tasks.\n    * **Questions**: Iris supports students with answering questions about exercises, lectures, and the learning performance instantly.\n    * **Pro-active assistance**: Iris can pro-actively communicate with the students, help them with the next steps in their learning experience and motivate them to continue.\n14. **[Athena](https://github.com/ls1intum/edutelligence/tree/main/athena)**: Artemis integrates Athena, a machine learning-based tool that supports instructors with the assessment of text, modeling and programming exercises. Athena offers different modules including automatic feedback suggestions based on generative AI. \n15. **Hyperion**: Artemis integrates Hyperion (via Spring AI), an AI-driven exercise creation assistant that helps instructors create high-quality exercises more efficiently through consistency checking and more.\n16. **[Tutorial groups](https://docs.artemis.tum.de/instructor/communication-support/tutorial-groups)**: Artemis supports the management of tutorial groups of a course. This includes planning the sessions, assigning responsible tutors, registering students and tracking the attendance.\n17. **[Plagiarism checks](https://docs.artemis.tum.de/instructor/assessment-grading/plagiarism-check)**: Artemis integrates plagiarism checks for programming exercises (based on [JPlag](https://github.com/jplag/JPlag)), text exercises, and modeling exercises in courses and exams. It allows notifying students about identified plagiarism. Students can review and comment on the allegation.\n18. **[LTI](https://docs.artemis.tum.de/instructor/integrations/lti-configuration)**: Artemis supports the Learning Tools Interoperability (LTI) standard to integrate Artemis into other learning management systems (LMS) such as Moodle and edX.\n\n## EduTelligence Integration\n\nArtemis integrates with the [EduTelligence suite](https://github.com/ls1intum/edutelligence), a comprehensive collection of AI-powered microservices designed to enhance educational technology platforms. EduTelligence provides:\n\n* **Iris** - AI Virtual Tutor powered by Pyris for intelligent student assistance\n* **Athena** - Automated assessment system for text, modeling, and programming exercises\n\nAdditional services are available in the EduTelligence suite for advanced deployments. For detailed information about all available services, please refer to the [EduTelligence repository](https://github.com/ls1intum/edutelligence).\n\n**Compatibility**: EduTelligence maintains compatibility with different versions of Artemis. Please refer to the [compatibility matrix](https://github.com/ls1intum/edutelligence#-artemis-compatibility) to ensure you're using compatible versions for optimal integration and functionality.\n\n## Additional features and aspects\n\n1. **[Integrated markdown editor](https://docs.artemis.tum.de/student/markdown-support)**: Markdown is used to format text content across the platform using an integrated markdown editor.\n2. **[Scalable](https://docs.artemis.tum.de/admin/scaling)**: Artemis scales to multiple courses with thousands of students simultaneously using it. In fact, the largest course had 2,400 students. Administrators can easily scale Artemis with additional build agents in the continuous integration environment.\n3. **[High user satisfaction](https://docs.artemis.tum.de/student/user-experience)**: Artemis is easy to use. Developers focus on usability, user experience, and performance.\n4. **Customizable**: It supports multiple instructors, editors, and tutors per course and allows instructors to customize many course settings including user management,\n5. **[Open-source](https://docs.artemis.tum.de/developer/open-source)**: Free to use with a large community and many active maintainers.\n\n## Roadmap\n\nThe Artemis development team prioritizes the following areas in the future. We welcome feature requests from students, tutors, instructors, and administrators. We are happy to discuss any suggestions for improvements.\n\n* **Medium term**: Provide GenAI based automatic feedback to modeling, text and programming exercise with Athena\n* **Medium term**: Improve the REST API of the server application\n* **Medium term**: Add more learning analytics features while preserving data privacy\n* **Medium term**: Improve the user experience, usability and navigation\n* **Medium term**: Add automatic generation of hints for programming exercises\n* **Medium term**: Add GenAI support for reviewing exercises for instructors\n* **Medium term**: Add GenAI support for learning analytics (partly done)\n* **Long term**: Allow students to take notes on lecture slides and support the automatic updates of lecture slides\n\n## Contributing\n\nWe welcome contributions from both members of our organization and external contributors. To maintain transparency and trust:\n\n- **Members**: Must use their full real names and upload a professional and authentic profile picture. Members can directly create branches and PRs in the repository.\n- **External Contributors**: Must adhere to our identity guidelines, using real names and authentic profile pictures. Contributions will only be considered if these guidelines are followed.\n\nWe adhere to best practices as recommended by [GitHub's Open Source Guides](https://opensource.guide/) and their [Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies). Thank you for helping us create a respectful and professional environment for everyone involved.\n\nWe follow a pull request contribution model. For detailed guidelines, please refer to our [CONTRIBUTING.md](./CONTRIBUTING.md). Once your pull request is ready to merge, notify the responsible feature maintainer on Slack:\n\n#### Maintainers\n\n\nThe following members of the project management team are responsible for specific feature areas in Artemis. Contact them if you have questions or if you want to develop new features in this area.\n\n\n| Goal                    | Responsible maintainer                                                             |\n|-------------------------|------------------------------------------------------------------------------------|\n| User experience         | Ramona Beinstingel ([@rabeatwork](https://github.com/rabeatwork))                  |\n| Scalable infrastructure | Matthias Linhuber ([@mtze](https://github.com/mtze))                               |\n| Constructive alignment  | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Learning analytics      | Maximilian Anzinger ([@maximiliananzinger](https://github.com/maximiliananzinger)) |\n\n| Feature / Module      | Responsible maintainer                                                             |\n|-----------------------|------------------------------------------------------------------------------------|\n| Account               | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Exercises             | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Programming exercises | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Build agents          | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| LocalVC               | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| LocalCI               | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Jenkins               | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Quiz exercises        | Maximilian Anzinger ([@maximiliananzinger](https://github.com/maximiliananzinger)) |\n| Modeling exercises    | Felix Dietrich ([@FelixTJDietrich](https://github.com/FelixTJDietrich))            |\n| Text exercises        | Felix Dietrich ([@FelixTJDietrich](https://github.com/FelixTJDietrich))            |\n| File upload exercises | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Exam mode             | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Assessment            | Maximilian Sölch ([@maximiliansoelch](https://github.com/maximiliansoelch))        |\n| Communication         | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Lectures              | Patrick Bassner ([@bassner](https://github.com/bassner))                           |\n| Atlas                 | Maximilian Anzinger ([@maximiliananzinger](https://github.com/maximiliananzinger)) |\n| Iris                  | Patrick Bassner ([@bassner](https://github.com/bassner))                           |\n| Athena                | Maximilian Sölch ([@maximiliansoelch](https://github.com/maximiliansoelch))        |\n| Hyperion              | Felix Dietrich ([@FelixTJDietrich](https://github.com/FelixTJDietrich))            |\n| Tutorial Groups       | Ramona Beinstingel ([@rabeatwork](https://github.com/rabeatwork))                  |\n| Plagiarism checks     | Markus Paulsen ([@MarkusPaulsen](https://github.com/MarkusPaulsen))                |\n| LTI                   | Maximilian Anzinger ([@maximiliananzinger](https://github.com/maximiliananzinger)) |\n| Calendar              | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Global search         | Patrick Bassner ([@bassner](https://github.com/bassner))                           |\n| Video source          | Patrick Bassner ([@bassner](https://github.com/bassner))                           |\n| Course                | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Admin                 | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n| Notification          | Stephan Krusche ([@krusche](https://github.com/krusche))                           |\n\n\n\n## Setup and guidelines\n\n### Development setup, coding, and design guidelines\n\n* [How to set up your local development environment](https://docs.artemis.tum.de/developer/setup)\n* [Server coding and design guidelines](https://docs.artemis.tum.de/developer/guidelines/server-development)\n* [Client coding guidelines](https://docs.artemis.tum.de/developer/guidelines/client-development)\n* [Design guidelines](https://ls1intum.github.io/ui-ux-guidelines/)\n* [Code Review Guidelines](https://docs.artemis.tum.de/developer/reviewer-guidelines)\n* [Performance Guidelines](https://docs.artemis.tum.de/developer/guidelines/performance)\n\n### Documentation\n\nThe Artemis documentation is available [here](https://docs.artemis.tum.de/).\nYou can find a guide on [how to write documentation](docs/README.md).\n\n### Server setup\n\nSetting up Artemis in your development environment or a demo production environment is really easy following the instructions on https://docs.artemis.tum.de/developer/setup. When you want to support programming exercises, we recommend using the [Integrated Code Lifecycle](https://docs.artemis.tum.de/developer/setup#integrated-code-lifecycle-setup).\n\nArtemis can also be set up in conjunction with external tools for continuous integration:\n[LocalVC and Jenkins](https://docs.artemis.tum.de/developer/jenkins-localvc)\n\nArtemis uses these external tools for user management and the configuration of programming exercises.\n\n### Administration setup\n\nIf needed, you can configure self-service [user registration](https://docs.artemis.tum.de/admin/user-registration).\n\n### Building for production\n\nTo build and optimize the Artemis application for production, run:\n\n```shell\n./gradlew -Pprod -Pwar clean bootWar\n```\n\nThis will create a Artemis-<version>.war file in the folder `build/libs`. The build command compiles the TypeScript into JavaScript files, concatenates and minifies the created files (including HTML and CSS files). It will also modify `index.html` so it references these new files. To ensure everything worked, run the following command to start the application on your local computer:\n\n```shell\njava -jar build/libs/*.war --spring.profiles.active=dev,localci,localvc,artemis,scheduling,buildagent,core,local,atlas\n```\n\n(You might need to copy a yml file into the folder build/libs before, also see [development setup](https://docs.artemis.tum.de/developer/setup))\n\nThen navigate to [http://localhost:8080](http://localhost:8080) in your browser.\n\nRefer to [Using JHipster in production](http://www.jhipster.tech/production) for more details.\n\nThe following command can automate the deployment to a server. The example shows the deployment to the main Artemis test server (which runs a virtual machine):\n\n```shell\n./artemis-server-cli deploy username@artemis-test0.artemis.in.tum.de -w build/libs/Artemis-9.6.war\n```\n\n## Architecture\n\nThe following diagram shows the top level design of Artemis which is decomposed into an application client (running as Angular web app in the browser) and an application server (based on Spring Boot). For programming exercises, the application server connects to a version control system (VCS) and a continuous integration system (CIS). Authentication is handled by an external user management system (UMS).\n\n![Top-Level Design](documentation/docs/developer/assets/system-design/TopLevelDesign.png \"Top-Level Design\")\n\nWhile Artemis includes generic adapters to these three external systems with a defined protocol that can be instantiated to connect to any VCS, CIS, or UMS, it also provides 3 concrete implementations for these adapters to connect to.\n\n### Server architecture\n\nThe following simplified UML component diagram exemplary shows more details of the Artemis application server architecture and its REST interfaces to the application client.\n\n![Server Architecture](documentation/docs/developer/assets/system-design/ServerArchitecture.png \"Server Architecture\")\n\n### Deployment\n\nThe following UML deployment diagram shows a typical deployment of Artemis application server and application client. Student, Instructor, and Teaching Assistant (TA) computers are all equipped equally with the Artemis application client being displayed in the browser.\n\nThe Continuous Integration Server typically delegates the build jobs to local build agents within the university infrastructure or to remote build agents, e.g., hosted in the Amazon Cloud (AWS).\n\n![Deployment Overview](documentation/docs/developer/assets/system-design/DeploymentOverview.svg \"Deployment Overview\")\n\n### Data model\n\nThe Artemis application server uses the following (simplified) data model in the MySQL database (notice that the actual data model is more complex by now). It supports multiple courses with multiple exercises. Each student in the participating student group can participate in the exercise by clicking the **Start Exercise** button. \nThen a repository and a build plan for the student (User) will be created and configured. The initialization state helps to track the progress of this complex operation and allows recovering from errors. \nA student can submit multiple solutions by committing and pushing the source code changes to a given example code into the version control system or using the user interface. The continuous integration server automatically tests each submission and notifies the Artemis application server when a new result exists. \nIn addition, teaching assistants can assess student solutions and \"manually\" create results.\n\n![Data Model](documentation/docs/developer/assets/system-design/DataModel.svg \"Data Model\")\n\nPlease note that the actual database model is more complex. The UML class diagram above omits some details for readability (e.g., lectures, student questions, exercise details, static code analysis, quiz questions, exam sessions, submission subclasses, etc.)\n\n### Artemis Community\n\nThere is a growing community of university instructors who are using Artemis.\n\n#### Communication\n\nWe communicate using GitHub issues and pull requests. Additionally, you can join us on Slack to ask questions and get support. If you are interested, please send an email to [Stephan Krusche](mailto:krusche@tum.de).\n\n#### Universities / Schools with Artemis in Use\n\nThe following universities are actively using Artemis or are currently evaluating Artemis.\n\n* **Technical University of Munich**  \n  https://artemis.tum.de  \n  Main contact person: [Stephan Krusche](mailto:krusche@tum.de)  \n  \n* **LFU Innsbruck, Uni Salzburg, JKU Linz, AAU Klagenfurt, TU Wien**  \n  https://artemis.codeability.uibk.ac.at  \n  [codeAbility project](https://codeability.uibk.ac.at)  \n  Main contact person: [Michael Breu](mailto:Michael.Breu@uibk.ac.at)  \n  \n* **University of Stuttgart**  \n  https://artemis.sqa.ddnss.org  \n  Main contact person: [Steffen Becker](mailto:steffen.becker@informatik.uni-stuttgart.de)  \n  \n* **Universität Passau**  \n  https://artemis.fim.uni-passau.de (only accessible via the university network/VPN)  \n  Main contact person: [Benedikt Fein](mailto:fein@fim.uni-passau.de)  \n  \n* **Karlsruhe Institute of Technology**  \n  https://artemis.cs.kit.edu  \n  Main contact person: [Dominik Fuchß](mailto:dominik.fuchss@kit.edu)  \n  \n* **Hochschule München**  \n  https://artemis.cs.hm.edu  \n  Main contact person: [Michael Eggers](mailto:michael.eggers@hm.edu)  \n  \n* **Technische Universität Dresden**  \n  Main contact person: [Andreas Domanowski](mailto:andreas.domanowski@tu-dresden.de)  \n  \n* **Hochschule Heilbronn**  \n  Main contact person: [Jörg Winckler](mailto:joerg.winckler@hs-heilbronn.de)  \n  \n* **Maria-Theresia-Gymnasium München**  \n  Main contact person: [Valentin Herrmann](mailto:valentin.herrmann@tum.de)\n\n##### Interested universities\n\n* **HU Berlin**  \n   Main contact person: [Lars Grunske](https://www.informatik.hu-berlin.de/de/Members/lars-grunske)\n\n* **Westsächsische Hochschule Zwickau**  \n   Main contact person: [Heiko Baum](https://www.fh-zwickau.de/pti/organisation/fachgruppe-informatik/personen/dr-ing-heiko-baum)\n\n* **Technische Universität Chemnitz**  \n   Main contact person: [Danny Kowerko](https://www.tu-chemnitz.de/informatik/mc/professor.php.en)\n\n* **Universität zu Köln**  \n   Main contact person: [Andreas Vogelsang](https://cs.uni-koeln.de/sse/team/prof-dr-andreas-vogelsang)\n* **Technische Universität Dortmund**  \n   Main contact person: [Falk Howar](https://se.cs.tu-dortmund.de)\n* **Universität Bielefeld**  \n   Main contact person: [Daniel Merkle](https://ekvv.uni-bielefeld.de/pers_publ/publ/PersonDetail.jsp?personId=451188465)\n* **Universität Ulm**  \n   Main contact person: [Matthias Tichy](https://www.uni-ulm.de/in/sp/team/tichy)\n* **Technischen Hochschule Mittelhessen**  \n   Main contact person: [Christian Prause](https://www.thm.de/iem/christian-prause)\n* **Imperial College London**  \n   Main contact person: [Robert Chatley](https://www.doc.ic.ac.uk/~rbc)\n* **University of South Australia**  \n   Main contact person: [Srecko Joksimovic](https://people.unisa.edu.au/srecko.joksimovic)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"34AE:11E74B:1738DC:5C5324:6AB920A7"},"text_sha256":"4419fe58d58d86972cc2b7b06c988384a6525701360521ac536a8a856dda9d01"},{"path":"SECURITY.md","size":8252,"blob_sha":"b1a332b37a9b9fd1dd94f7d31c980ec10704667f","priority":1,"status":200,"text":"## Security Policy\n\nArtemis is an open-source learning platform developed with a strong focus on security, data protection, and regulatory compliance.  \nThis document describes the security architecture, supported configurations, and vulnerability handling process.\n\n\n\n### Supported Versions\n\nOnly the **latest released version of Artemis** is supported.\n\nSecurity patches are **not** provided for older versions.  \nUsers are strongly encouraged to stay up to date to benefit from security fixes and dependency updates.\n\n\n\n### Authentication\n\nArtemis supports multiple authentication mechanisms depending on the deployment configuration:\n\n- **External authentication providers**\n  - LDAP (e.g. institutional directories)\n  - SAML2-based identity providers  \n  → In these cases, **no passwords are stored in Artemis**\n\n- **Internal user management**\n  - Accounts are managed by administrators\n  - Optional email-based self-registration can be enabled per instance\n  - For internal users, **only cryptographic password hashes** are stored (no plaintext passwords)\n\n- **Passkey-based authentication (WebAuthn / FIDO2)**\n  - Implemented using `webauthn4j-spring-security`\n  - Fully compliant with the WebAuthn and FIDO2 specifications\n  - All mandatory FIDO2 conformance tests provided by the FIDO Alliance are passed\n  - Supports all major attestation formats (e.g. packed, TPM, Android SafetyNet, Apple Anonymous)\n\nPasskeys provide easy-to-use and phishing-resistant authentication and are particularly suited for privileged access.\n\n\n\n### Authorization and Privileged Roles\n\nArtemis uses **course-scoped role-based access control (RBAC)**.\n\nEach course defines the following hierarchical roles:\n\n1. **Student**\n2. **Tutor** *(privileged)*\n3. **Editor** *(privileged)*\n4. **Instructor** *(privileged)*\n\nIn addition, Artemis provides a **system-wide `Admin` role**, independent of courses.  \nAt TUM, administrator accounts are **strictly separated** from normal user accounts.\n\nA **`Super Admin` role** is planned to further limit and control administrative privileges.\n\nAuthorization is:\n- Evaluated **inside Artemis**, not in the identity provider\n- Context-aware (course, role, resource state)\n- Time-dependent (e.g. scheduled release of exercises)\n- Immediately revocable (e.g. removing tutor rights)\n\nArtemis follows the **principle of least privilege**:  \nusers only receive the minimum permissions required for their role and context.\n\n\n\n### Privileged Access and Strong Authentication\n\nStarting with the **Tutor role**, users are considered *privileged*.\n\n- Artemis supports enforcing **strong authentication (Passkeys / MFA)** for admin users\n- This enforcement is **configurable during server startup**\n- Enabling mandatory Passkey authentication for privileged actions will be possible for all privileged roles in the future\n\nThis approach aligns with modern security recommendations and regulatory requirements such as NIS2.\n\n\n\n### Token and Session Management\n\nArtemis uses **stateless JWT-based authentication**:\n\n- No server-side sessions are stored\n- Tokens are stored securely in **HTTP-only cookies**\n- Token lifetime is configurable by administrators\n\nTypical configuration (e.g. TUM instance):\n\n- **3 days** – standard login\n- **10 days** – with “remember me”\n- **30 days** – Passkey login  \n  - Includes a secure **token rotation mechanism**\n  - Automatically extendable up to **180 days**\n\nLonger token lifetimes are only used for strong authentication methods.\n\n\n\n### Infrastructure and Transport Security\n\nArtemis follows a defense-in-depth approach:\n\n- Deployed **behind a dedicated firewall**\n- Only a reverse proxy is exposed publicly\n- Internal services and network traffic are isolated\n\nTransport security:\n- Enforced TLS with modern cipher suites\n- The TUM deployment achieves the **highest possible score (A+)** on SSL Labs\n- **HTTP/3 (QUIC)** is used when supported by the client and infrastructure\n\n\n\n### Dependency and Supply Chain Security\n\nArtemis actively protects against supply chain risks:\n\n- The Artemis development team carefully reviews new dependencies before including them in the project to avoid introducing vulnerabilities in the first place\n- Automated dependency vulnerability scanning using **Mend (formerly WhiteSource)**\n- Regular updates to the latest stable versions of:\n  - **Spring Boot**\n  - **Angular**\n- Prompt application of security patches\n- Avoidance of unmaintained or low-trust dependencies\n\n**Vulnerability Monitoring and SBOM Support:**\n\nArtemis provides built-in tools to help administrators monitor and manage dependency security:\n\n- **Software Dependencies Page:** Administrators can view and check for known vulnerabilities directly in the application via the Admin area, allowing for quick assessment of the current security posture\n- **Software Bill of Materials (SBOM):** A downloadable SBOM is available for advanced security analysis in external systems, enabling integration with enterprise vulnerability management tools\n- **Automated Weekly Security Scan:** Artemis performs regular security analysis of all dependencies and proactively notifies administrators via email when issues are detected, ensuring timely awareness of potential vulnerabilities\n\n\n\n### Monitoring, Incident Response, and Security Operations\n\n- Security-relevant events (e.g. authentication failures, privilege changes) are logged\n- Operators are responsible for monitoring logs and infrastructure-level alerts\n- Defined incident response procedures are used to analyze, mitigate, and document security incidents\n\nIncident detection, response, and recovery are treated as continuous operational responsibilities.\n\n\n\n### Secure Defaults and Configuration Responsibility\n\nArtemis is shipped with **secure default settings**.\n\nThe operating institution is responsible for:\n- Network and firewall configuration\n- TLS termination and certificate management\n- Backup, monitoring, and infrastructure hardening\n\nThis clear separation ensures secure operation while allowing flexible deployment.\n\n\n\n### Data Protection, Privacy, and Data Minimization\n\nArtemis follows strict **data minimization and data economy principles**:\n\n- Authentication credentials are not stored unless strictly required\n- Personal data access is restricted based on role and course context\n- Privileged access to personal or assessment-related data is explicitly controlled\n\nData protection considerations and data minimization are part of the **regular review and development process**.\n\nCompliance with data protection regulations (e.g. GDPR) depends on the specific deployment and is handled by the operating institution.\n\n\n\n### Backup and Availability\n\nArtemis is designed to support high availability through its stateless architecture.\n\n- No session state is stored server-side\n- This enables horizontal scaling and resilience\n- Backup, recovery, and disaster recovery strategies are the responsibility of the operating institution\n\n\n\n### Security Audits and Open Source Transparency\n\n- Regular **internal security audits and reviews** are conducted\n- An **external security review** is planned\n- Artemis is fully **open source**, enabling continuous peer review by the community\n\nOpen development and transparency are considered an important security-strengthening factor.\n\n\n\n### Standards and Compliance\n\nArtemis aligns with the following standards and regulations:\n\n- **FIDO2 / WebAuthn**  \n  https://www.w3.org/TR/webauthn/\n\n- **BSI TR-03107** (substantial assurance level)  \n  https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/TechGuidelines/TR03107/TR-03107-1.pdf\n\n- **EU NIS2 Directive (EU) 2022/2555**  \n  https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022L2555\n\nArtemis does not target high-assurance eGovernment or classified data use cases, but follows best practices for systems with substantial security requirements in education.\n\n\n\n### Reporting a Vulnerability\n\nPlease report potential security vulnerabilities **responsibly**.\n\n📧 **Contact:** `artemis@xcit.tum.de`  \n🔐 Encrypted email via **S/MIME** is supported:  \n[Download certificate](.github/artemis_xcit.tum.de.pem)\n\nWe appreciate responsible disclosure and will work with reporters to resolve issues promptly.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E10:2B291E:17CFFD:5CEBF0:6AB920A9"},"text_sha256":"97ca3730afac078e99d66655526369818a4ce071549f73e17550d0f6e6412d69"},{"path":"src/main/webapp/app/admin/legal/legal-document-update.component.html","size":2270,"blob_sha":"d5293bbaa83f0dae1e1697dbde964364adb92702","priority":1,"status":200,"text":"<div class=\"legal-document-container\">\n    <div>\n        <h5 *adminTitleBarTitle id=\"legal-document-update-heading\" class=\"mb-0\" data-cy=\"legalDocumentPageHeading\" jhiTranslate=\"{{ titleKey() }}\"><\/h5>\n        <jhi-markdown-editor-monaco\n            [markdown]=\"legalDocument()?.text ?? ''\"\n            (markdownChange)=\"onContentChanged($event)\"\n            [resizableMinHeight]=\"MIN_HEIGHT\"\n            [resizableMaxHeight]=\"MAX_HEIGHT\"\n            [initialEditorHeight]=\"MIN_HEIGHT\"\n            [enableFileUpload]=\"false\"\n            class=\"markdown-editor\"\n        />\n        <div>\n            @if (!unsavedChanges() && !isSaving()) {\n                <div>\n                    <fa-icon [icon]=\"faCheckCircle\" class=\"text-success me-1\" [pTooltip]=\"'artemisApp.legal.savedTooltip' | artemisTranslate\" />\n                    <span class=\"text-info\" jhiTranslate=\"artemisApp.legal.saved\"><\/span>\n                <\/div>\n            }\n            @if (unsavedChanges() && !isSaving()) {\n                <div>\n                    <fa-icon [icon]=\"faExclamationTriangle\" class=\"text-warning me-1\" [pTooltip]=\"'artemisApp.legal.unsavedTooltip' | artemisTranslate\" />\n                    <span class=\"text-info\" jhiTranslate=\"artemisApp.legal.unsaved\"><\/span>\n                <\/div>\n            }\n            @if (isSaving()) {\n                <div>\n                    <fa-icon [icon]=\"faCircleNotch\" class=\"me-1\" [pTooltip]=\"'artemisApp.legal.savingTooltip' | artemisTranslate\" />\n                    <span class=\"text-info\" jhiTranslate=\"artemisApp.legal.saving\"><\/span>\n                <\/div>\n            }\n        <\/div>\n        <div class=\"btn-below-editor\">\n            <button type=\"submit\" (click)=\"updateLegalDocument()\" class=\"btn btn-primary\" id=\"update-legal-document-btn\" [disabled]=\"!currentContentTrimmed() || isSaving()\">\n                <fa-icon [icon]=\"faSave\" />\n                <span jhiTranslate=\"entity.action.save\"><\/span>\n            <\/button>\n            <jhi-mode-picker [options]=\"LANGUAGE_OPTIONS\" [value]=\"currentLanguage()\" (valueChange)=\"onLanguageChange($event!)\" />\n        <\/div>\n    <\/div>\n<\/div>\n\n<jhi-unsaved-changes-warning [(visible)]=\"showUnsavedChangesWarning\" [textMessage]=\"warningTextMessage()\" (discarded)=\"onDiscardChanges()\" />\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7224:3BCC6:17459F:5C60F7:6AB920A7"},"text_sha256":"d0ddb07080ecd6969c39951d142e8c215808877f83d8e68bfdbcea2f4f655095"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":2,"D1_evidence":"sha=bdf6352b6bf8d7dd13533570de148b620a207e95; file=SECURITY.md; text=### Data Protection, Privacy, and Data Minimization Artemis follows strict data minimization and data economy principles : - Authentication credentials are not stored unless strictly required - Personal data access is restricted based on role and course context - Privileged access to personal or assessment-related data is explicitly controlled","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=bdf6352b6bf8d7dd13533570de148b620a207e95; file=SECURITY.md; text=### Data Protection, Privacy, and Data Minimization Artemis follows strict data minimization and data economy principles : - Authentication credentials are not stored unless strictly required - Personal data access is restricted based on role and course context - Privileged access to personal or assessment-related data is explicitly controlled","C7":"sha=bdf6352b6bf8d7dd13533570de148b620a207e95; file=SECURITY.md; text=Artemis follows strict data minimization and data economy principles : - Authentication credentials are not stored unless strictly required - Personal data access is restricted based on role and course context - Privileged access to personal or assessment-related data is explicitly controlled Data protection considerations and data minimization are part of the regular review and development process ."}}}}
{"repository":"reservoirpy/reservoirpy","input_row":{"repository":"reservoirpy/reservoirpy","url":"https://github.com/reservoirpy/reservoirpy","name":"reservoirpy","owner":"reservoirpy","description":"A simple and flexible code for Reservoir Computing architectures like Echo State Networks","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":657,"issues":139,"created_at":"2018-05-17T08:20:01Z","updated_at":"2026-09-18T14:57:34Z","first_commit_at":"2018-05-17T08:20:02Z","last_commit_at":"2026-06-17T10:00:20Z","activity_months":97.010000000000005,"ai_ml_match_topics":"artificial-intelligence; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:15.288Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"reservoirpy/reservoirpy","visibility":"public","created_at":"2018-05-17T08:20:01Z","updated_at":"2026-09-18T14:57:34Z","private":false,"fork":false,"archived":false,"stargazers_count":657,"open_issues_count":28,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3424","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:1767FAE:1B8653F:6AB9283B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3423","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:17D99C4:1BF7711:6AB9283B"},"commit":{"sha":"e71601780830a10b90028686595f8af9c1064a4b","url":"https://github.com/reservoirpy/reservoirpy/commit/e71601780830a10b90028686595f8af9c1064a4b","date":"2018-05-17T12:55:03Z","author_date":"2018-05-17T12:55:03Z","committer_date":"2018-05-17T12:55:03Z","tree_sha":"0a5fb4c83e4d1fda67cc63f5a635d40829b628f6","message_first_line":"add acknowledgment to mantas"},"tree_request_status":200,"tree_rate":{"github_remaining":"3422","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:127930A:15C7715:6AB9283C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":108,"blob_sha":"323439382d9ee6a9e3d30992248c4fdb4067a03d","priority":0}],"documents":[{"path":"README.md","size":108,"blob_sha":"323439382d9ee6a9e3d30992248c4fdb4067a03d","priority":0,"status":200,"text":"# Funky_Reservoir\nA simple and flexible code for Reservoir Computing architectures like Echo State Networks\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6A3C:2E8679:175AB6:5C7401:6AB920AA"},"text_sha256":"01bedfcccac5997a23e0ee76438842e2ce1a40911e05450d41263577c0cadf6e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3421","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0891:37D6E2:17F03E1:1C0EBB2:6AB9283C"},"commit":{"sha":"1fc11351bfba7f4b9a35464a1b99d804a5d6ccea","url":"https://github.com/reservoirpy/reservoirpy/commit/1fc11351bfba7f4b9a35464a1b99d804a5d6ccea","date":"2026-06-17T10:00:20Z","author_date":"2026-06-17T09:58:59Z","committer_date":"2026-06-17T10:00:20Z","tree_sha":"19696e98bba53b1b6b36df73e38363a9974dfc6c","message_first_line":"Update features overview README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3420","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B4:78367:17F3943:1C11B66:6AB9283D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11445,"blob_sha":"f8bf9ae30f7bd3b0f610ac8b15cf48862675a80a","priority":0}],"documents":[{"path":"README.md","size":11445,"blob_sha":"f8bf9ae30f7bd3b0f610ac8b15cf48862675a80a","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"static/rpy_banner_light.png#gh-light-mode-only\">\n  <img src=\"static/rpy_banner_dark.png#gh-dark-mode-only\">\n\n  **Simple and flexible library for Reservoir Computing architectures like Echo State Networks (ESN).**\n\n  [![PyPI version](https://badge.fury.io/py/reservoirpy.svg)](https://badge.fury.io/py/reservoirpy)\n  [![HAL](https://img.shields.io/badge/HAL-02595026-white?style=flat&logo=HAL&logoColor=white&labelColor=B03532&color=grey)](https://inria.hal.science/hal-02595026)\n  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/reservoirpy)\n  <br/>\n  [![Downloads](https://static.pepy.tech/badge/reservoirpy)](https://pepy.tech/project/reservoirpy)\n  [![Documentation Status](https://readthedocs.org/projects/reservoirpy/badge/?version=latest)](https://reservoirpy.readthedocs.io/en/latest/?badge=latest)\n  [![Testing](https://github.com/reservoirpy/reservoirpy/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/reservoirpy/reservoirpy/actions/workflows/test.yml)\n  [![codecov](https://codecov.io/gh/reservoirpy/reservoirpy/branch/master/graph/badge.svg?token=JC8R1PB5EO)](https://codecov.io/gh/reservoirpy/reservoirpy)\n<\/div>\n\n\n<p> <img src=\"static/googlecolab.svg\" alt=\"Google Colab icon\" width=32 height=32 align=\"left\"><b>Tutorials:<\/b> <a href=\"https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/1-Getting_Started.ipynb\">Open in Colab<\/a> <\/p>\n<!--<p><img src=\"static/changelog.svg\" alt=\"2\" width =32 height=32 align=\"left\"><b>Changelog:<\/b> https://github.com/reservoirpy/reservoirpy/releases<\/p>-->\n<p> <img src=\"static/documentation.svg\" alt=\"Open book icon\" width=32 height=32 align=\"left\"><b>Documentation:<\/b> <a href=\"https://reservoirpy.readthedocs.io/\">https://reservoirpy.readthedocs.io/<\/a><\/p>\n<!--<p> <img src=\"static/user_guide.svg\" width=32 height=32 align=\"left\"><b>User Guide:<\/b> https://reservoirpy.readthedocs.io/en/latest/user_guide/<\/a><\/p>-->\n\n---\n\n**Feature overview:**\n- easy creation of [complex architectures](https://reservoirpy.readthedocs.io/en/latest/user_guide/model.html) with multiple reservoirs, including deep reservoirs and multiple readouts\n- [feedback loops](https://reservoirpy.readthedocs.io/en/latest/user_guide/advanced_demo.html#Feedback-connections)\n- [offline and online training](https://reservoirpy.readthedocs.io/en/latest/user_guide/learning_rules.html)\n- [parallelization across sequences](https://reservoirpy.readthedocs.io/en/latest/user_guide/advanced_demo.html#Parallelization)\n- [sparse matrix computations](https://reservoirpy.readthedocs.io/en/latest/user_guide/advanced_demo.html#Custom-weight-matrices)\n- advanced learning rules (such as [*Intrinsic Plasticity*](https://reservoirpy.readthedocs.io/en/latest/api/generated/reservoirpy.nodes.IPReservoir.html), [*Local Plasticity*](https://reservoirpy.readthedocs.io/en/latest/api/generated/reservoirpy.nodes.LocalPlasticityReservoir.html) or [*NVAR* (Next-Generation Reservoir Computing)](https://reservoirpy.readthedocs.io/en/latest/api/generated/reservoirpy.nodes.NVAR.html))\n- interfacing with [scikit-learn](https://reservoirpy.readthedocs.io/en/latest/api/generated/reservoirpy.nodes.ScikitLearnNode.html) models\n- and much more!\n\nMoreover, graphical tools are included to **easily explore hyperparameters**\nwith the help of the *hyperopt* library.\n\n## Quick try ⚡\n\n### Installation\n\n```bash\npip install reservoirpy\n```\n\nFor more complete installation (including hyperparameter search, ...), look at the [complete installation guide on ReadTheDocs](https://reservoirpy.readthedocs.io/en/latest/developer_guide/advanced_install.html).\n\n### An example on chaotic timeseries prediction (Mackey-Glass)\n\nFor a general introduction to reservoir computing and ReservoirPy features, take\na look at the [tutorials](#tutorials)\n\n```python\nfrom reservoirpy import ESN\n\nfrom reservoirpy.datasets import mackey_glass, to_forecasting\nfrom reservoirpy.observables import rmse, rsquare\n\n### Step 1: Load the dataset\n\nX = mackey_glass(n_timesteps=2000)  # (2000, 1)-shaped array\n# create y by shifting X, and train/test split\nx_train, x_test, y_train, y_test = to_forecasting(X, test_size=0.2)\n\n### Step 2: Create an Echo State Network\n\n# 100 neurons, sr = spectral radius, lr = leak rate\nesn = ESN(units=100, sr=1.25, lr=0.3, ridge=1e-5)\n\n### Step 3: Fit, run and evaluate the ESN\n\nesn.fit(x_train, y_train, warmup=100)\npredictions = esn.run(x_test)\n\nprint(f\"RMSE: {rmse(y_test, predictions)}; R^2 score: {rsquare(y_test, predictions)}\")\n# RMSE: 0.0020282; R^2 score: 0.99992\n```\n\n\n## More examples and tutorials 🎓\n\n### Tutorials\n\n- [**1 - Getting started with ReservoirPy**](./tutorials/1-Getting_Started.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Getting_started-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/1-Getting_Started.ipynb)\n- [**2 - Advanced features**](./tutorials/2-Advanced_Features.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Advanced_features-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/2-Advanced_Features.ipynb)\n- [**3 - General introduction to Reservoir Computing**](./tutorials/3-General_Introduction_to_Reservoir_Computing.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Introduction_to_RC-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/3-General_Introduction_to_Reservoir_Computing.ipynb)\n- [**4 - Understand and optimise hyperparameters**](./tutorials/4-Understand_and_optimize_hyperparameters.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Hyperparameters-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/4-Understand_and_optimize_hyperparameters.ipynb)\n- [**5 - Classification with reservoir computing**](./tutorials/5-Classification-with-RC.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Classification-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/5-Classification-with-RC.ipynb)\n- [**6 - Interfacing ReservoirPy with scikit-learn**](./tutorials/6-Interfacing_with_scikit-learn.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_scikit--learn_interface-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/6-Interfacing_with_scikit-learn.ipynb)\n- [**7 - Introduction to the Jax backend**](./tutorials/7-The-Jax-Backend.ipynb)\n[![Tutorial on Google Colab](https://img.shields.io/badge/Tutorial:_Jax_backend-525252?style=flat&logo=googlecolab&logoColor=%23F9AB00)](https://colab.research.google.com/github/reservoirpy/reservoirpy/blob/master/tutorials/7-The-Jax-Backend.ipynb)\n\n### Examples\n\nFor advanced users, we also showcase partial reproduction of papers on reservoir computing to demonstrate some features of the library.\n\n- [**Improving reservoir using Intrinsic Plasticity** (Schrauwen et al., 2008)](/examples/Improving%20reservoirs%20using%20Intrinsic%20Plasticity/Intrinsic_Plasiticity_Schrauwen_et_al_2008.ipynb)\n- [**Interactive reservoir computing for chunking information streams** (Asabuki et al., 2018)](/examples/Interactive%20reservoir%20computing%20for%20chunking%20information%20streams/Chunking_Asabuki_et_al_2018.ipynb)\n- [**Next-Generation reservoir computing** (Gauthier et al., 2021)](/examples/Next%20Generation%20Reservoir%20Computing/NG-RC_Gauthier_et_al_2021.ipynb)\n- [**Edge of stability Echo State Network** (Ceni et al., 2023)](/examples/Edge%20of%20Stability%20Echo%20State%20Network/Edge_of_stability_Ceni_Gallicchio_2023.ipynb)\n\n\n## Papers and projects using ReservoirPy\n\n*If you want your paper to appear here, please contact us (see contact link below).*\n\n- ( [HAL](https://inria.hal.science/hal-04354303) | [PDF](https://arxiv.org/pdf/2312.06695) | [Code](https://github.com/corentinlger/ER-MRL) ) Leger et al. (2024) *Evolving Reservoirs for Meta Reinforcement Learning.* EvoAPPS 2024\n- ( [arXiv](https://arxiv.org/abs/2204.02484) | [PDF](https://arxiv.org/pdf/2204.02484) ) Chaix-Eichel et al. (2022) *From implicit learning to explicit representations.* arXiv preprint arXiv:2204.02484.\n- ( [HTML](https://link.springer.com/chapter/10.1007/978-3-030-86383-8_6) | [HAL](https://hal.inria.fr/hal-03203374) | [PDF](https://hal.inria.fr/hal-03203374/document) ) Trouvain & Hinaut (2021) *Canary Song Decoder: Transduction and Implicit Segmentation with ESNs and LTSMs.* ICANN 2021\n- ( [HTML](https://ieeexplore.ieee.org/abstract/document/9515607) ) Pagliarini et al. (2021) *Canary Vocal Sensorimotor Model with RNN Decoder and Low-dimensional GAN Generator.* ICDL 2021.\n- ( [HAL](https://hal.inria.fr/hal-03244723/) | [PDF](https://hal.inria.fr/hal-03244723/document) ) Pagliarini et al. (2021) *What does the Canary Say? Low-Dimensional GAN Applied to Birdsong.* HAL preprint.\n- ( [HTML](https://link.springer.com/chapter/10.1007/978-3-030-86383-8_7) | [HAL](https://hal.inria.fr/hal-03203318) | [PDF](https://hal.inria.fr/hal-03203318) ) Hinaut & Trouvain (2021) *Which Hype for My New Task? Hints and Random Search for Echo State Networks Hyperparameters.* ICANN 2021\n\n## Awesome Reservoir Computing\n\nWe also provide a curated list of tutorials, papers, projects and tools for Reservoir Computing (not necessarily related to ReservoirPy) here!:\n\n**https://github.com/reservoirpy/awesome-reservoir-computing**\n\n## Contact\nIf you have a question regarding the library, please open an issue.\n\nIf you have more general question or feedback you can contact us by email to **xavier dot hinaut the-famous-home-symbol inria dot fr**.\n\n## Citing ReservoirPy\n\nTrouvain, N., Pedrelli, L., Dinh, T. T., Hinaut, X. (2020) *ReservoirPy: an efficient and user-friendly library to design echo state networks. In International Conference on Artificial Neural Networks* (pp. 494-505). Springer, Cham. ( [HTML](https://link.springer.com/chapter/10.1007/978-3-030-61616-8_40) | [HAL](https://hal.inria.fr/hal-02595026) | [PDF](https://hal.inria.fr/hal-02595026/document) )\n\nIf you're using ReservoirPy in your work, please cite our package using the following bibtex entry:\n\n```\n@incollection{Trouvain2020,\n  doi = {10.1007/978-3-030-61616-8_40},\n  url = {https://doi.org/10.1007/978-3-030-61616-8_40},\n  year = {2020},\n  publisher = {Springer International Publishing},\n  pages = {494--505},\n  author = {Nathan Trouvain and Luca Pedrelli and Thanh Trung Dinh and Xavier Hinaut},\n  title = {{ReservoirPy}: An Efficient and User-Friendly Library to Design Echo State Networks},\n  booktitle = {Artificial Neural Networks and Machine Learning {\\textendash} {ICANN} 2020}\n}\n```\n\n\n## Acknowledgement\n\n<div align=\"left\">\n  <img src=\"./static/inria_red.svg\" width=300><br>\n<\/div>\n\n\nThis package is developed and supported by Inria at Bordeaux, France in [Mnemosyne](https://team.inria.fr/mnemosyne/) group. [Inria](https://www.inria.fr/en) is a French Research Institute in Digital Sciences (Computer Science, Mathematics, Robotics, ...).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D78:09BF:AB1CB:2C715C:6AB920A9"},"text_sha256":"4f9225c107e5d38da920b897c436a8e5cf0f6854665db933d7de166c6fc9d110"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"roclark/sportsipy","input_row":{"repository":"roclark/sportsipy","url":"https://github.com/roclark/sportsipy","name":"sportsipy","owner":"roclark","description":"A free sports API written for python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":575,"issues":249,"created_at":"2018-05-08T19:15:35Z","updated_at":"2026-09-25T00:43:13Z","first_commit_at":"2018-05-08T19:15:35Z","last_commit_at":"2022-03-20T20:52:24Z","activity_months":46.390000000000001,"ai_ml_match_topics":"artificial-intelligence; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:17.708Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"roclark/sportsipy","visibility":"public","created_at":"2018-05-08T19:15:35Z","updated_at":"2026-09-25T00:43:13Z","private":false,"fork":false,"archived":false,"stargazers_count":575,"open_issues_count":131,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3419","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D8:7580A:17E1B1B:1C001F4:6AB9283D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3418","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:17E30D7:1C017C7:6AB9283E"},"commit":{"sha":"737be212e48d03184fbbb250c89d4cfe9f1ccbdb","url":"https://github.com/roclark/sportsipy/commit/737be212e48d03184fbbb250c89d4cfe9f1ccbdb","date":"2018-05-21T02:05:16Z","author_date":"2018-05-21T02:05:16Z","committer_date":"2018-05-21T02:05:16Z","tree_sha":"0c53db58ecbb92bdc123fa2a109e28898815ec17","message_first_line":"Add whitespace between operators"},"tree_request_status":200,"tree_rate":{"github_remaining":"3417","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0843:2BC4E5:1804913:1C22C60:6AB9283E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":158,"blob_sha":"9879c65068bc473e89edd5232fe63de085a83297","priority":0}],"documents":[{"path":"README.md","size":158,"blob_sha":"9879c65068bc473e89edd5232fe63de085a83297","priority":0,"status":200,"text":"# Sports Reference Scraper\nSports Reference Scraper is a python project designed to scrape and parse team\nand match statistics from www.sports-reference.com.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F1E:3D501:17E6CD:5D02D2:6AB920AC"},"text_sha256":"7132bab1ba9b29cc67ede364f5ad7a6f7a8e2a7391d05f0300436946180f01d6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3416","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0915:3C4024:17E2CC8:1C0137A:6AB9283E"},"commit":{"sha":"fffb7c8170454720622089cf794ebcb106245e4d","url":"https://github.com/roclark/sportsipy/commit/fffb7c8170454720622089cf794ebcb106245e4d","date":"2022-03-20T20:52:24Z","author_date":"2022-03-20T20:52:24Z","committer_date":"2022-03-20T20:52:24Z","tree_sha":"42dbef1e7a985568ad6c5e451c40297408f5ed63","message_first_line":"Update fumbles recovered for TD (#715)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3415","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085E:3C4024:17E2D13:1C013BD:6AB9283F"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6675,"blob_sha":"7c4e6d11fc523216ea8c838d00c2d439227f7b3b","priority":0}],"documents":[{"path":"README.rst","size":6675,"blob_sha":"7c4e6d11fc523216ea8c838d00c2d439227f7b3b","priority":0,"status":200,"text":"Sportsipy: A free sports API written for python\n###############################################\n**Development Status: This project is no longer undergoing active development. Please consider\nopening a pull request for any new features or bug fixes to be reviewed and\nmerged.**\n\n.. image:: https://github.com/roclark/sportsipy/workflows/Sportsipy%20push%20tests/badge.svg\n    :target: https://github.com/roclark/sportsipy/actions\n.. image:: https://readthedocs.org/projects/sportsipy/badge/?version=latest\n    :target: https://sportsipy.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n.. image:: https://img.shields.io/pypi/v/sportsipy.svg\n    :target: https://pypi.org/project/sportsipy\n\n.. contents::\n\nSportsipy is a free python API that pulls the stats from\nwww.sports-reference.com and allows them to be easily be used in python-based\napplications, especially ones involving data analytics and machine learning.\n\nSportsipy exposes a plethora of sports information from major sports\nleagues in North America, such as the MLB, NBA, College Football and Basketball,\nNFL, and NHL. Sportsipy also now supports Professional Football (or\nSoccer) for thousands of teams from leagues around the world. Every sport has\nits own set of valid API queries ranging from the list of teams in a league, to\nthe date and time of a game, to the total number of wins a team has secured\nduring the season, and many, many more metrics that paint a more detailed\npicture of how a team has performed during a game or throughout a season.\n\nInstallation\n============\n\nThe easiest way to install `sportsipy` is by downloading the latest\nreleased binary from PyPI using PIP. For instructions on installing PIP, visit\n`PyPA.io <https://pip.pypa.io/en/stable/installing/>`_ for detailed steps on\ninstalling the package manager for your local environment.\n\nNext, run::\n\n    pip install sportsipy\n\nto download and install the latest official release of `sportsipy` on\nyour machine. You now have the latest stable version of `sportsipy`\ninstalled and can begin using it following the examples below!\n\nIf the bleeding-edge version of `sportsipy` is desired, clone this\nrepository using git and install all of the package requirements with PIP::\n\n    git clone https://github.com/roclark/sportsipy\n    cd sportsipy\n    pip install -r requirements.txt\n\nOnce complete, create a Python wheel for your default version of Python by\nrunning the following command::\n\n    python setup.py sdist bdist_wheel\n\nThis will create a `.whl` file in the `dist` directory which can be installed\nwith the following command::\n\n    pip install dist/*.whl\n\nExamples\n========\n\nThe following are a few examples showcasing how easy it can be to collect\nan abundance of metrics and information from all of the tracked leagues. The\nexamples below are only a miniscule subset of the total number of statistics\nthat can be pulled using sportsipy. Visit the documentation on\n`Read The Docs <http://sportsipy.readthedocs.io/en/latest/>`_ for a\ncomplete list of all information exposed by the API.\n\nGet instances of all NHL teams for the 2018 season\n--------------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.nhl.teams import Teams\n\n    teams = Teams(2018)\n\nPrint every NBA team's name and abbreviation\n--------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.nba.teams import Teams\n\n    teams = Teams()\n    for team in teams:\n        print(team.name, team.abbreviation)\n\nGet a specific NFL team's season information\n--------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.nfl.teams import Teams\n\n    teams = Teams()\n    lions = teams('DET')\n\nPrint the date of every game for a NCAA Men's Basketball team\n-------------------------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.ncaab.schedule import Schedule\n\n    purdue_schedule = Schedule('purdue')\n    for game in purdue_schedule:\n        print(game.date)\n\nPrint the number of interceptions by the away team in a NCAA Football game\n--------------------------------------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.ncaaf.boxscore import Boxscore\n\n    championship_game = Boxscore('2018-01-08-georgia')\n    print(championship_game.away_interceptions)\n\nGet a Pandas DataFrame of all stats for a MLB game\n--------------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.mlb.boxscore import Boxscore\n\n    game = Boxscore('BOS201806070')\n    df = game.dataframe\n\nFind the number of goals a football team has scored\n---------------------------------------------------\n\n.. code-block:: python\n\n    from sportsipy.fb.team import Team\n\n    tottenham = Team('Tottenham Hotspur')\n    print(tottenham.goals_scored)\n\nDocumentation\n=============\n\nTwo blog posts detailing the creation and basic usage of `sportsipy` can\nbe found on The Medium at the following links:\n\n- `Part 1: Creating a public sports API <https://medium.com/clarktech-sports/python-sports-analytics-made-simple-part-1-14569d6e9a86>`_\n- `Part 2: Pull any sports metric in 10 lines of Python <https://medium.com/clarktech-sports/python-sports-analytics-made-simple-part-2-40e591a7f3db>`_\n\nThe second post in particular is a great guide for getting started with\n`sportsipy` and is highly recommended for anyone who is new to the\npackage.\n\nComplete documentation is hosted on\n`readthedocs.org <http://sportsipy.readthedocs.io/en/latest>`_. Refer to\nthe documentation for a full list of all metrics and information exposed by\nsportsipy. The documentation is auto-generated using Sphinx based on the\ndocstrings in the sportsipy package.\n\nTesting\n=======\n\nSportsipy contains a testing suite which aims to test all major portions\nof code for proper functionality. To run the test suite against your\nenvironment, ensure all of the requirements are installed by running::\n\n    pip install -r requirements.txt\n\nNext, start the tests by running py.test while optionally including coverage\nflags which identify the amount of production code covered by the testing\nframework::\n\n    py.test --cov=sportsipy --cov-report term-missing tests/\n\nIf the tests were successful, it will return a green line will show a message at\nthe end of the output similar to the following::\n\n    ======================= 380 passed in 245.56 seconds =======================\n\nIf a test failed, it will show the number of failed and what went wrong within\nthe test output. If that's the case, ensure you have the latest version of code\nand are in a supported environment. Otherwise, create an issue on GitHub to\nattempt to get the issue resolved.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AA42:3BB77:173B10:5C585C:6AB920AD"},"text_sha256":"b288da334bf3767b4e1a22630d181c000b8d6d7f7783a7fac9f70d52841663c9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"watson-developer-cloud/unity-sdk","input_row":{"repository":"watson-developer-cloud/unity-sdk","url":"https://github.com/watson-developer-cloud/unity-sdk","name":"unity-sdk","owner":"watson-developer-cloud","description":":video_game: Unity SDK to use the IBM Watson services.","language":"C#","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":564,"issues":304,"created_at":"2015-12-16T17:40:51Z","updated_at":"2026-09-23T19:03:52Z","first_commit_at":"2015-09-15T19:06:44Z","last_commit_at":"2025-04-22T19:21:17Z","activity_months":115.20999999999999,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:20.198Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"watson-developer-cloud/unity-sdk","visibility":"public","created_at":"2015-12-16T17:40:51Z","updated_at":"2026-09-23T19:03:52Z","private":false,"fork":false,"archived":false,"stargazers_count":564,"open_issues_count":4,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3414","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F8:6E5BD:177DA6A:1B9AC7A:6AB92840"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3413","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:17D1D69:1BEFE05:6AB92840"},"commit":{"sha":"b290e7f7dce215add51d94fef71bebe603064bd3","url":"https://github.com/watson-developer-cloud/unity-sdk/commit/b290e7f7dce215add51d94fef71bebe603064bd3","date":"2018-05-24T21:22:49Z","author_date":"2018-05-24T21:22:49Z","committer_date":"2018-05-24T21:22:49Z","tree_sha":"98d6141b1b5f9620174ccaf8d14c8b22c5bc67be","message_first_line":"revise vr endpoint, add a note on changing vr endpoints"},"tree_request_status":200,"tree_rate":{"github_remaining":"3412","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AE:E80A6:178BA10:1BAA255:6AB92840"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13865,"blob_sha":"010184ab6db4e8a159c00c2acc3b5cea4231e893","priority":0}],"documents":[{"path":"README.md","size":13865,"blob_sha":"010184ab6db4e8a159c00c2acc3b5cea4231e893","priority":0,"status":200,"text":"# Watson APIs Unity SDK\n[![Build Status](https://travis-ci.org/watson-developer-cloud/unity-sdk.svg?branch=develop)](https://travis-ci.org/watson-developer-cloud/unity-sdk)\n[![wdc-community.slack.com](https://wdc-slack-inviter.mybluemix.net/badge.svg)](http://wdc-slack-inviter.mybluemix.net/)\n\nUse this SDK to build Watson-powered applications in Unity.\n\n<details>\n  <summary>Table of Contents<\/summary>\n\n  * [Before you begin](#before-you-begin)\n  * [Getting the Watson SDK and adding it to Unity](#getting-the-watson-sdk-and-adding-it-to-unity)\n    * [Installing the SDK source into your Unity project](#installing-the-sdk-source-into-your-unity-project)\n  * [Configuring your service credentials](#configuring-your-service-credentials)\n  * [Authentication](#authentication)\n  * [Watson Services](#watson-services)\n  * [Authentication Tokens](#authentication-tokens)\n  * [Documentation](#documentation)\n  * [Questions](#questions)\n  * [Open Source @ IBM](#open-source--ibm)\n  * [License](#license)\n  * [Contributing](#contributing)\n\n<\/details>\n\n## Before you begin\nEnsure that you have the following prerequisites:\n\n* An IBM Cloud account. If you don't have one, [sign up][ibm_cloud_registration].\n* [Unity][get_unity]. You can use the **free** Personal edition.\n* Change the build settings in Unity (**File > Build Settings**) to any platform except for web player/Web GL. The Watson Developer Cloud Unity SDK does not support Unity Web Player.\n\n## Getting the Watson SDK and adding it to Unity\nYou can get the latest SDK release by clicking [here][latest_release].\n\n### Installing the SDK source into your Unity project\nMove the **`unity-sdk`** directory into the **`Assets`** directory of your Unity project. _Optional: rename the SDK directory from `unity-sdk` to `Watson`_.\n\n## Configuring your service credentials\nTo create instances of Watson services and their credentials, follow the steps below.\n\n**Note:** Service credentials are different from your IBM Cloud account username and password.\n\n1. Determine which services to configure.\n1. If you have configured the services already, complete the following steps. Otherwise, go to step 3.\n    1. Log in to IBM Cloud at https://console.bluemix.net.\n    1. Click the service you would like to use.\n    1. Click **Service credentials**.\n    1. Click **View credentials** to access your credentials.\n1. If you need to configure the services that you want to use, complete the following steps.\n    1. Log in to IBM Cloud at https://console.bluemix.net.\n    1. Click the **Create service** button.\n    1. Under **Watson**, select which service you would like to create an instance of and click that service.\n    1. Give the service and credential a name. Select a plan and click the **Create** button on the bottom.\n    4. Click **Service Credentials**.\n    5. Click **View credentials** to access your credentials.\n1. Your service credentials can be used to instantiate Watson Services within your application. Most services also support tokens which you can instantiate the service with as well.\n\nThe credentials for each service contain either a `username`, `password` and endpoint `url` **or** an `apikey` and endpoint `url`.\n\n**WARNING:** You are responsible for securing your own credentials. Any user with your service credentials can access your service instances!\n\n## Watson Services\nTo get started with the Watson Services in Unity, click on each service below to read through each of their `README.md`'s and their codes.\n* [Assistant](/Scripts/Services/Assistant/v1)\n* [Conversation](/Scripts/Services/Conversation/v1)\n* [Discovery](/Scripts/Services/Discovery/v1)\n* [Language Translator](/Scripts/Services/LanguageTranslator/v2)\n* [Natural Language Classifier](/Scripts/Services/NaturalLanguageClassifier/v2)\n* [Natural Language Understanding](/Scripts/Services/NaturalLanguageUnderstanding/v1)\n* [Personality Insights](/Scripts/Services/PersonalityInsights/v3)\n* [Speech to Text](/Scripts/Services/SpeechToText/v1)\n* [Text to Speech](/Scripts/Services/TextToSpeech/v1)\n* [Tone Analyzer](/Scripts/Services/ToneAnalyzer/v3)\n* [Visual Recognition](/Scripts/Services/VisualRecognition/v3)\n\n## Authentication\nBefore you can use a service, it must be authenticated with the service instance's `username`, `password` and `url`.\n\n```cs\nusing IBM.Watson.DeveloperCloud.Services.Assistant.v1;\nusing IBM.Watson.DeveloperCloud.Utilities;\n\nvoid Start()\n{\n    Credentials credentials = new Credentials(<username>, <password>, <url>);\n    Assistant _assistant = new Assistant(credentials);\n}\n```\n\nFor services that authenticate using an apikey, you can instantiate the service instance using a `Credential` object with an `apikey` and `url`.\n\n```cs\nusing IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3;\nusing IBM.Watson.DeveloperCloud.Utilities;\n\nvoid Start()\n{\n    Credentials credentials = new Credentials(<apikey>, <url>);\n    VisualRecognition _visualRecognition = new VisualRecognition(credentials);\n}\n```\n\nYou can also authenticate a service using IAM authentication. You can either supply a valid access token in the `iamTokenOptions` or get an access token using an `apikey`.\n\n```cs\nvoid IEnumerator TokenExample()\n{\n    //  Create IAM token options and supply the apikey. \n    //  Alternatively you can supply an access token.\n    TokenOptions iamTokenOptions = new TokenOptions()\n    {\n        IamApiKey = \"<iam-api-key>\",\n        IamAccessToken = \"<iam-access-token>\",\n        IamUrl = \"<service-url>\"\n    };\n\n    //  Create credentials using the IAM token options\n     _credentials = new Credentials(iamTokenOptions, \"<service-url\");\n    while (!_credentials.HasIamTokenData())\n        yield return null;\n\n    _assistant = new Assistant(_credentials);\n    _assistant.VersionDate = \"2018-02-16\";\n    _assistant.ListWorkspaces(OnListWorkspaces, OnFail);\n}\n\nprivate void OnListWorkspaces(WorkspaceCollection response, Dictionary<string, object> customData)\n{\n    Log.Debug(\"OnListWorkspaces()\", \"Response: {0}\", customData[\"json\"].ToString());\n}\n\nprivate void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)\n{\n    Log.Debug(\"OnFail()\", \"Failed: {0}\", error.ToString());\n}\n```\n\n### Authentication for Visual Recognition\nNote there are different endpoints for authenticating a Visual Recognition instance depending on if you are authenticating using IAM or apikey. \n\nIf you are authenticating using an apikey\n\n```cs\n_visualRecognition.Url = \"https://gateway-a.watsonplatform.net/visual-recognition/api\";\n\n```\n\nIf you are authenticating using IAM\n```cs\n_visualRecognition.Url = \"https://gateway.watsonplatform.net/visual-recognition/api\";\n```\n\n## Callbacks\nSuccess and failure callbacks are required. You can specify the return type in the callback.  \n```cs\nprivate void Example()\n{\n    //  Call with sepcific callbacks\n    assistant.Message(OnMessage, OnGetEnvironmentsFail, _workspaceId, \"\");\n    discovery.GetEnvironments(OnGetEnvironments, OnFail);\n}\n\n//  OnMessage callback\nprivate void OnMessage(object resp, Dictionary<string, object> customData)\n{\n    Log.Debug(\"ExampleCallback.OnMessage()\", \"Response received: {0}\", customData[\"json\"].ToString());\n}\n\n//  OnGetEnvironments callback\nprivate void OnGetEnvironments(GetEnvironmentsResponse resp, Dictionary<string, object> customData)\n{\n    Log.Debug(\"ExampleCallback.OnGetEnvironments()\", \"Response received: {0}\", customData[\"json\"].ToString());\n}\n\n//  OnMessageFail callback\nprivate void OnMessageFail(RESTConnector.Error error, Dictionary<string, object> customData)\n{\n    Log.Error(\"ExampleCallback.OnMessageFail()\", \"Error received: {0}\", error.ToString());\n}\n\n//  OnGetEnvironmentsFail callback\nprivate void OnGetEnvironmentsFail(RESTConnector.Error error, Dictionary<string, object> customData)\n{\n    Log.Error(\"ExampleCallback.OnGetEnvironmentsFail()\", \"Error received: {0}\", error.ToString());\n}\n```\n\nSince the success callback signature is generic and the failure callback always has the same signature, you can use a single set of callbacks to handle multiple calls.\n```cs\nprivate void Example()\n{\n    //  Call with generic callbacks\n    assistant.Message(OnSuccess, OnMessageFail, \"<workspace-id>\", \"\");\n    discovery.GetEnvironments(OnSuccess, OnFail);\n}\n\n//  Generic success callback\nprivate void OnSuccess<T>(T resp, Dictionary<string, object> customData)\n{\n    Log.Debug(\"ExampleCallback.OnSuccess()\", \"Response received: {0}\", customData[\"json\"].ToString());\n}\n\n//  Generic fail callback\nprivate void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)\n{\n    Log.Error(\"ExampleCallback.OnFail()\", \"Error received: {0}\", error.ToString());\n}\n```\n\n## Custom data\nCustom data can be passed through a `Dictionary<string, object> customData` in each call. In most cases, the raw json response is returned in the customData under `\"json\"` entry. In cases where there is no returned json, the entry will contain the success and http response code of the call.\n\n```cs\nvoid Example()\n{\n    Dictionary<string, object> customData = new Dictionary<string, object>();\n    customData.Add(\"foo\", \"bar\");\n    assistant.Message(OnSuccess, OnFail, \"<workspace-id>\", \"\", customData);\n}\n\n//  Generic success callback\nprivate void OnSuccess<T>(T resp, Dictionary<string, object> customData)\n{\n    Log.Debug(\"ExampleCustomData.OnSuccess()\", \"Custom Data: {0}\", customData[\"foo\"].ToString());  // returns \"bar\"\n}\n\n//  Generic fail callback\nprivate void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)\n{\n    Log.Error(\"ExampleCustomData.OnFail()\", \"Error received: {0}\", error.ToString());  // returns error string\n    Log.Debug(\"ExampleCustomData.OnFail()\", \"Custom Data: {0}\", customData[\"foo\"].ToString());  // returns \"bar\"\n}\n```\n\n## Custom Request Headers\nYou can send custom request headers by adding them to the `customData` object.\n\n```cs\nvoid Example()\n{\n    //  Create customData object\n    Dictionary<string, object> customData = new Dictionary<string, object>();\n    //  Create a dictionary of custom headers\n    Dictionary<string, string> customHeaders = new Dictionary<string, string>();\n    //  Add to the header dictionary\n    customHeaders.Add(\"X-Watson-Metadata\", \"customer_id=some-assistant-customer-id\");\n    //  Add the header dictionary to the custom data object\n    customData.Add(Constants.String.CUSTOM_REQUEST_HEADERS, customHeaders);\n\n    assistant.Message(OnSuccess, OnFail, \"<workspace-id>\", customData: customData);\n}\n```\n\n## Response Headers\nYou can get responseheaders in the `customData` object in the callback.\n\n```cs\nvoid Example()\n{\n    assistant.Message(OnMessage, OnFail, \"<workspace-id>\");\n}\n\nprivate void OnMessage(object resp, Dictionary<string, object> customData)\n{\n    //  List all headers in the response headers object\n    if (customData.ContainsKey(Constants.String.RESPONSE_HEADERS))\n    {\n        foreach (KeyValuePair<string, string> kvp in customData[Constants.String.RESPONSE_HEADERS] as Dictionary<string, string>)\n        {\n            Log.Debug(\"ExampleCustomHeader.OnMessage()\", \"{0}: {1}\", kvp.Key, kvp.Value);\n        }\n    }\n}\n```\n\n## Authentication Tokens\nYou use tokens to write applications that make authenticated requests to IBM Watson™ services without embedding service credentials in every call.\n\nYou can write an authentication proxy in IBM Cloud that obtains and returns a token to your client application, which can then use the token to call the service directly. This proxy eliminates the need to channel all service requests through an intermediate server-side application, which is otherwise necessary to avoid exposing your service credentials from your client application.\n\n```cs\nusing IBM.Watson.DeveloperCloud.Services.Assistant.v1;\nusing IBM.Watson.DeveloperCloud.Utilities;\n\nvoid Start()\n{\n    Credentials credentials = new Credentials(<service-url>)\n    {\n        AuthenticationToken = <authentication-token>\n    };\n    Assistant _assistant = new Assistant(credentials);\n}\n```\n\nThere is a helper class included to obtain tokens from within your Unity application.\n\n```cs\nusing IBM.Watson.DeveloperCloud.Utilities;\n\nAuthenticationToken _authenticationToken;\n\nvoid Start()\n{\n    if (!Utility.GetToken(OnGetToken, <service-url>, <service-username>, <service-password>))\n        Log.Debug(\"ExampleGetToken.Start()\", \"Failed to get token.\");\n}\n\nprivate void OnGetToken(AuthenticationToken authenticationToken, string customData)\n{\n    _authenticationToken = authenticationToken;\n    Log.Debug(\"ExampleGetToken.OnGetToken()\", \"created: {0} | time to expiration: {1} minutes | token: {2}\", _authenticationToken.Created, _authenticationToken.TimeUntilExpiration, _authenticationToken.Token);\n}\n```\n\n## Documentation\nDocumentation can be found [here][documentation]. You can also access the documentation by selecting API Reference the Watson menu (**Watson -> API Reference**).\n\n## Questions\n\nIf you are having difficulties using the APIs or have a question about the IBM Watson Services, please ask a question on\n[dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson)\nor [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).\n\n## Open Source @ IBM\nFind more open source projects on the [IBM Github Page](http://ibm.github.io/).\n\n## License\nThis library is licensed under Apache 2.0. Full license text is available in [LICENSE](LICENSE).\n\n## Contributing\nSee [CONTRIBUTING.md](.github/CONTRIBUTING.md).\n\n[wdc]: https://www.ibm.com/watson/developer/\n[wdc_unity_sdk]: https://github.com/watson-developer-cloud/unity-sdk\n[latest_release]: https://github.com/watson-developer-cloud/unity-sdk/releases/latest\n[ibm_cloud_registration]: http://console.bluemix.net/registration?cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Unity\n[get_unity]: https://unity3d.com/get-unity\n[documentation]: https://watson-developer-cloud.github.io/unity-sdk/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6494:3FA0D:171E15:5C39D5:6AB920B0"},"text_sha256":"e4d0bfd1a5256860b16be8e3770a4206dbb63634e009e09ba1fc54274e89702c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3411","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:178E3DC:1BAC9B3:6AB92841"},"commit":{"sha":"553fe1768ad1c4eadb44d69b305ceef741da2c41","url":"https://github.com/watson-developer-cloud/unity-sdk/commit/553fe1768ad1c4eadb44d69b305ceef741da2c41","date":"2025-04-22T19:21:17Z","author_date":"2025-04-22T16:33:25Z","committer_date":"2025-04-22T19:21:17Z","tree_sha":"b3a5d623a30c3b136d0d04d46e66e05aa1f19a01","message_first_line":"chore: deprecation notice"},"tree_request_status":200,"tree_rate":{"github_remaining":"3410","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:178E415:1BAC9FE:6AB92842"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23880,"blob_sha":"90d8b1ac9c858acc1e8c137dff8befc28f6d4090","priority":0}],"documents":[{"path":"README.md","size":23880,"blob_sha":"90d8b1ac9c858acc1e8c137dff8befc28f6d4090","priority":0,"status":200,"text":"# IBM Watson SDK for Unity\n[![Deploy and Publish](https://github.com/watson-developer-cloud/unity-sdk/workflows/Deploy%20and%20Publish/badge.svg?branch=master)](https://github.com/watson-developer-cloud/unity-sdk/actions?query=workflow%3A%22Deploy+and+Publish%22)\n[![wdc-community.slack.com](https://wdc-slack-inviter.mybluemix.net/badge.svg)](http://wdc-slack-inviter.mybluemix.net/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![CLA assistant](https://cla-assistant.io/readme/badge/watson-developer-cloud/unity-sdk)](https://cla-assistant.io/watson-developer-cloud/unity-sdk)\n\n## Deprecation Notice\nThis repo and its associated release binaries are being deprecated. While this repo will no longer see active support from the IBM team, contributions by the community via PRs are still welcomed and will be reviewed. Keep in mind, updates will no longer be published into release binaries and changes made after this update will need to be compiled independently.\n\nUse this SDK to build Watson-powered applications in Unity.\n\n## Announcements\n### Tone Analyzer Deprecation\nAs of this major release, 6.0.0, the Tone Analyzer API has been removed in preparation for deprecation. If you wish to continue using this sdk to make calls to Tone Analyzer until its final deprecation, you will have to use a previous version.\nOn 24 February 2022, IBM announced the deprecation of the Tone Analyzer service. The service will no longer be available as of 24 February 2023. As of 24 February 2022, you will not be able to create new instances. Existing instances will be supported until 24 February 2023.\n\nAs an alternative, we encourage you to consider migrating to the Natural Language Understanding service on IBM Cloud. With Natural Language Understanding, tone analysis is done by using a pre-built classifications model, which provides an easy way to detect language tones in written text. For more information, see [Migrating from Watson Tone Analyzer Customer Engagement endpoint to Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics).\n\n### Natural Language Classifier Deprecation\nAs of this major release, 6.0.0, the NLC API has been removed in preparation for deprecation. If you wish to continue using this sdk to make calls to NLC until its final deprecation, you will have to use a previous version.\nOn 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service. The service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances. Existing instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted.\n\nAs an alternative, we encourage you to consider migrating to the Natural Language Understanding service on IBM Cloud that uses deep learning to extract data and insights from text such as keywords, categories, sentiment, emotion, and syntax, along with advanced multi-label text classification capabilities, to provide even richer insights for your business or industry. For more information, see [Migrating to Natural Language Understanding](https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-migrating).\n\n### Updating endpoint URLs from watsonplatform.net\nWatson API endpoint URLs at watsonplatform.net are changing and will not work after 26 May 2021. Update your calls to use the newer endpoint URLs. For more information, see https://cloud.ibm.com/docs/watson?topic=watson-endpoint-change.\n\n## Before you begin\nEnsure that you have the following prerequisites:\n\n* You need an [IBM Cloud][ibm-cloud-onboarding] account.\n* [Unity][get_unity]. You can use the **free** Personal edition.\n\n## Configuring Unity\n* Change the build settings in Unity (**File > Build Settings**) to any platform except for web player/Web GL. The IBM Watson SDK for Unity does not support Unity Web Player.\n* If using Unity 2018.2 or later you'll need to set **Scripting Runtime Version** and **Api Compatibility Level** in Build Settings to **.NET 4.x equivalent**. We need to access security options to enable TLS 1.2. \n\n> Updating MacOS to Mojave may disable microphone for Unity. If you are running into this issue please see these [guidelines](https://support.apple.com/en-us/HT209175) to configure microphone for Mojave. \n\n\n## Getting the Watson SDK and adding it to Unity\nYou can get the latest SDK release by clicking [here][latest_release_sdk]. **You will also need to download the latest release of the IBM Unity SDK Core by clicking [here][latest_release_core].**\n\n### Installing the SDK source into your Unity project\nMove the **`unity-sdk`** and **`unity-sdk-core`** directories into the **`Assets`** directory of your Unity project. _Optional: rename the SDK directory from `unity-sdk` to `Watson` and the Core directory from `unity-sdk-core` to `IBMSdkCore`_.\n\n## Configuring your service credentials\nTo create instances of Watson services and their credentials, follow the steps below.\n\n**Note:** Service credentials are different from your IBM Cloud account username and password.\n\n1. Determine which services to configure.\n1. If you have configured the services already, complete the following steps. Otherwise, go to step 3.\n    1. Log in to IBM Cloud at https://cloud.ibm.com.\n    1. Click the service you would like to use.\n    1. Click **Service credentials**.\n    1. Click **View credentials** to access your credentials.\n1. If you need to configure the services that you want to use, complete the following steps.\n    1. Log in to IBM Cloud at https://cloud.ibm.com.\n    1. Click the **Create service** button.\n    1. Under **Watson**, select which service you would like to create an instance of and click that service.\n    1. Give the service and credential a name. Select a plan and click the **Create** button on the bottom.\n    4. Click **Service Credentials**.\n    5. Click **View credentials** to access your credentials.\n1. Your service credentials can be used to instantiate Watson Services within your application. Most services also support tokens which you can instantiate the service with as well.\n\nThe credentials for each service contain either a `username`, `password` and endpoint `url` **or** an `apikey` and endpoint `url`.\n\n**WARNING:** You are responsible for securing your own credentials. Any user with your service credentials can access your service instances!\n\n## Watson Services\nTo get started with a Watson Service in Unity, follow the link to see the code.\n* [Assistant V1](/Scripts/Services/Assistant/V1)\n* [Assistant V2](/Scripts/Services/Assistant/V2)\n* [Compare Comply V1](/Scripts/Services/CompareComply/V1)\n* [Conversation](/Scripts/Services/Conversation/V1) (deprecated - Use Assistant V1 or Assistant V2)\n* [Discovery](/Scripts/Services/Discovery/V1)\n* [Language Translator V3](/Scripts/Services/LanguageTranslator/V3)\n* [Natural Language Classifier](/Scripts/Services/NaturalLanguageClassifier/V2)\n* [Natural Language Understanding](/Scripts/Services/NaturalLanguageUnderstanding/V1)\n* [Personality Insights](/Scripts/Services/PersonalityInsights/V3)\n* [Speech to Text](/Scripts/Services/SpeechToText/V1)\n* [Text to Speech](/Scripts/Services/TextToSpeech/V1)\n* [Tone Analyzer](/Scripts/Services/ToneAnalyzer/V3)\n* [Visual Recognition](/Scripts/Services/VisualRecognition/V3)\n\n## Authentication\nWatson services are migrating to token-based Identity and Access Management (IAM) authentication.\n\n- With some service instances, you authenticate to the API by using **[IAM](#iam)**.\n- In other instances, you authenticate by providing the **[username and password](#username-and-password)** for the service instance.\n\n### Getting credentials\nTo find out which authentication to use, view the service credentials. You find the service credentials for authentication the same way for all Watson services:\n\n1.  Go to the IBM Cloud **[Dashboard][watson-dashboard]** page.\n1.  Either click an existing Watson service instance or click **Create**.\n1.  Click **Show** to view your service credentials.\n1.  Copy the `url` and either `apikey` or `username` and `password`.\n\nIn your code, you can use these values in the service constructor or with a method call after instantiating your service.\n\n### IAM\n\nSome services use token-based Identity and Access Management (IAM) authentication. IAM authentication uses a service API key to get an access token that is passed with the call. Access tokens are valid for approximately one hour and must be regenerated.\n\nYou supply either an IAM service **API key** or an **access token**:\n\n- Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.\n- Use the access token if you want to manage the lifecycle yourself. For details, see [Authenticating with IAM tokens](https://cloud.ibm.com/docs/watson?topic=watson-iam). If you want to switch to API key, in a coroutine, override your stored IAM credentials with an IAM API key and yield until the credentials object `HasIamTokenData()` returns `true`.\n\n#### Supplying the IAM API key\n```cs\nAuthenticator authenticator;\nAssistantService assistant;\nstring versionDate = \"<service-version-date>\";\n\nIEnumerator TokenExample()\n{\n    //  Create authenticator using the IAM token options\n    authenticator = new IamAuthenticator(apikey: \"<iam-api-key>\");\n    while (!authenticator.CanAuthenticate())\n        yield return null;\n\n    assistant = new AssistantService(versionDate, authenticator);\n    assistant.SetServiceUrl(\"<service-url>\");\n    assistant.ListWorkspaces(callback: OnListWorkspaces);\n}\n\nprivate void OnListWorkspaces(DetailedResponse<WorkspaceCollection> response, IBMError error)\n{\n    Log.Debug(\"OnListWorkspaces()\", \"Response: {0}\", response.Response);\n}\n```\n\n#### Supplying the access token\n```cs\nAuthenticator authenticator;\nAssistantService assistant;\nstring versionDate = \"<service-version-date>\";\n\nvoid TokenExample()\n{\n    //  Create authenticator using the Bearer Token\n    authenticator = new BearerTokenAuthenticator(\"<bearer-token>\");\n\n    assistant = new AssistantService(versionDate, authenticator);\n    assistant.SetServiceUrl(\"<service-url>\");\n    assistant.ListWorkspaces(callback: OnListWorkspaces);\n}\n\nprivate void OnListWorkspaces(DetailedResponse<WorkspaceCollection> response, IBMError error)\n{\n    Log.Debug(\"OnListWorkspaces()\", \"Response: {0}\", response.Response);\n}\n```\n\n### Username and password\n```cs\nAuthenticator authenticator;\nAssistantService assistant;\nstring versionDate = \"<service-version-date>\";\n\nvoid UsernamePasswordExample()\n{\n    Authenticator authenticator = new BasicAuthenticator(\"<username>\", \"<password>\", \"<url>\");\n    assistant = new AssistantService(versionDate, authenticator);\n    assistant.SetServiceUrl(\"<service-url>\");\n}\n```\n\n### Supplying authenticator\n\nThere are two ways to supply the authenticator you found above to the SDK for authentication.\n\n#### Credential file (easier!)\n\nWith a credential file, you just need to put the file in the right place and the SDK will do the work of parsing it and authenticating. You can get this file by clicking the **Download** button for the credentials in the **Manage** tab of your service instance.\n\nThe file downloaded will be called `ibm-credentials.env`. This is the name the SDK will search for and **must** be preserved unless you want to configure the file path (more on that later). The SDK will look for your `ibm-credentials.env` file in the following places (in order):\n\n- Your system's home directory\n- The top-level directory of the project you're using the SDK in\n\nAs long as you set that up correctly, you don't have to worry about setting any authentication options in your code. So, for example, if you created and downloaded the credential file for your Discovery instance, you just need to do the following:\n\n```cs\npublic IEnumerator ExampleAutoService()\n{\n    Assistant assistantService = new Assistant(\"2019-04-03\");\n\n    //  Wait for authorization token\n    while (!assistantService.Authenticator.CanAuthenticate())\n        yield return null;\n\n    var listWorkspacesResult = assistantService.ListWorkspaces();\n}\n```\n\nAnd that's it!\n\nIf you're using more than one service at a time in your code and get two different `ibm-credentials.env` files, just put the contents together in one `ibm-credentials.env` file and the SDK will handle assigning authenticator to their appropriate services.\n\nIf you would like to configure the location/name of your credential file, you can set an environment variable called `IBM_CREDENTIALS_FILE`. **This will take precedence over the locations specified above.** Here's how you can do that:\n\n```bash\nexport IBM_CREDENTIALS_FILE=\"<path>\"\n```\n\nwhere `<path>` is something like `/home/user/Downloads/<file_name>.env`.\n\n#### Manually\n\nIf you'd prefer to set authentication values manually in your code, the SDK supports that as well. The way you'll do this depends on what type of authenticator your service instance gives you.\n\n## Callbacks\nA success callback is required. You can specify the return type in the callback.\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nDiscoveryService discovery;\nstring discoveryVersionDate = \"<discovery-version-date>\";\nAuthenticator discoveryAuthenticator;\n\nprivate void Example()\n{\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n    assistant.SetServiceUrl(\"<service-url>\");\n\n    discovery = new DiscoveryService(discoveryVersionDate, discoveryAuthenticator);\n    discovery.SetServiceUrl(\"<service-url>\");\n\n    //  Call with sepcific callbacks\n    assistant.Message(\n        callback: OnMessage,\n        workspaceId: workspaceId\n    );\n\n    discovery.ListEnvironments(\n        callback: OnGetEnvironments\n    );\n}\n\nprivate void OnMessage(DetailedResponse<MessageResponse> response, IBMError error)\n{\n    Log.Debug(\"ExampleCallback.OnMessage()\", \"Response received: {0}\", response.Response);\n}\n\nprivate void OnGetEnvironments(DetailedResponse<ListEnvironmentsResponse> response, IBMError error)\n{\n    Log.Debug(\"ExampleCallback.OnGetEnvironments()\", \"Response received: {0}\", response.Response);\n}\n```\n\nSince the success callback signature is generic and the failure callback always has the same signature, you can use a single set of callbacks to handle multiple calls.\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nDiscoveryService discovery;\nstring discoveryVersionDate = \"<discovery-version-date>\";\nAuthenticator discoveryAuthenticator;\n\nprivate void Example()\n{\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n    assistant.SetServiceUrl(\"<service-url>\");\n\n    //  Call with generic callbacks\n    JObject input = new JObject();\n    input.Add(\"text\", \"\");\n    assistant.Message(\n        callback: OnSuccess,\n        workspaceId: workspaceId,\n        input: input\n    );\n\n    discovery = new DiscoveryService(discoveryVersionDate, discoveryAuthenticator);\n    discovery.SetServiceUrl(\"<service-url>\");\n\n    discovery.ListEnvironments(\n        callback: OnSuccess\n    );\n}\n\n//  Generic success callback\nprivate void OnSuccess<T>(DetailedResponse<T> resp, IBMError error)\n{\n    Log.Debug(\"ExampleCallback.OnSuccess()\", \"Response received: {0}\", resp.Response);\n}\n```\n\nYou can also use an anonymous callback\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nprivate void Example()\n{\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n\n    assistant.ListWorkspaces(\n        callback: (DetailedResponse<WorkspaceCollection> response, IBMError error) =>\n        {\n            Log.Debug(\"ExampleCallback.OnSuccess()\", \"ListWorkspaces result: {0}\", response.Response);\n        },\n        pageLimit: 1,\n        includeCount: true,\n        sort: \"-name\",\n        includeAudit: true\n    );\n    assistant.SetServiceUrl(\"<service-url>\");\n}\n```\n\nYou can check the `error` response to see if there was an error in the call.\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nprivate void Example()\n{\n    assistant = new AssistantService(versionDate, authenticator);\n\n    assistant.Message(OnMessage, workspaceId);\n}\n\nprivate void OnMessage(DetailedResponse<MessageResponse> response, IBMError error)\n{\n    if (error == null)\n    {\n        Log.Debug(\"ExampleCallback.OnMessage()\", \"Response received: {0}\", response.Response);\n    }\n    else\n    {\n        Log.Debug(\"ExampleCallback.OnMessage()\", \"Error received: {0}, {1}, {3}\", error.StatusCode, error.ErrorMessage, error.Response);\n    }\n}\n```\n\n## Custom Request Headers\nYou can send custom request headers by adding them to the service.\n\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nvoid Example()\n{\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n\n    //  Add custom header to the REST call\n    assistant.WithHeader(\"X-Watson-Metadata\", \"customer_id=some-assistant-customer-id\");\n    assistant.Message(OnSuccess, \"<workspace-id>\");\n}\n\nprivate void OnSuccess(DetailedResponse<MessageResponse> response, IBMError error)\n{\n    Log.Debug(\"ExampleCallback.OnMessage()\", \"Response received: {0}\", response.Response);\n}\n```\n\n## Response Headers\nYou can get response headers in the `headers` object in the DetailedResponse.\n\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nvoid Example()\n{\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n\n    assistant.Message(OnMessage, \"<workspace-id>\");\n}\n\nprivate void OnMessage(DetailedResponse<MessageResponse> response, IBMError error)\n{\n    //  List all headers in the response headers object\n    foreach (KeyValuePair<string, object> kvp in response.Headers)\n    {\n        Log.Debug(\"ExampleCustomHeader.OnMessage()\", \"{0}: {1}\", kvp.Key, kvp.Value);\n    }\n}\n```\n\n## Transaction IDs\nEvery SDK call returns a response with a transaction ID in the `X-Global-Transaction-Id` header. Together the service instance region, this ID helps support teams troubleshoot issues from relevant logs.\n\n```cs\npublic void ExampleGetTransactionId()\n{\n    AssistantService service = new AssistantService(\"{version-date}\");\n    service.ListWorkspaces(\n        callback: (DetailedResponse<Workspace> response, IBMError error) =>\n        {\n            if(error != null)\n            {\n                Log.Debug(\"AssistantServiceV1\", \"Transaction Id: {0}\", error.ResponseHeaders[\"X-Global-Transaction-Id\"]);\n            }\n            else\n            {\n                Log.Debug(\"AssistantServiceV1\", \"Transaction Id: {0}\", response.Headers[\"X-Global-Transaction-Id\"]);\n            }\n        }\n    );\n}\n```\n\nHowever, the transaction ID isn't available when the API doesn't return a response for some reason. In that case, you can set your own transaction ID in the request. For example, replace `<my-unique-transaction-id>` in the following example with a unique transaction ID.\n\n```cs\npublic void ExampleSetTransactionId()\n{\n    AssistantService service = new AssistantService(\"{version-date}\");\n    service.WithHeader(\"X-Global-Transaction-Id\", \"<my-unique-transaction-id>\");\n    service.ListWorkspaces(\n        callback: (DetailedResponse<Workspace> response, IBMError error) =>\n        {\n            if(error != null)\n            {\n                Log.Debug(\"AssistantServiceV1\", \"Transaction Id: {0}\", error.ResponseHeaders[\"X-Global-Transaction-Id\"]);\n            }\n            else\n            {\n                Log.Debug(\"AssistantServiceV1\", \"Transaction Id: {0}\", response.Headers[\"X-Global-Transaction-Id\"]);\n            }\n        }\n    );\n}\n```\n\n## TLS 1.0 support\nWatson services have upgraded their hosts to TLS 1.2. The Dallas location has a TLS 1.0 endpoint that works for streaming. To stream in other regions, use Unity 2018.2 and set **Scripting Runtime Version** in Build Settings to `.NET 4.x equivalent`. To support Speech to Text in earlier versions of Unity, create the instance in the Dallas location.\n\n## Disabling SSL verification\nYou can disable SSL verifciation when making a service call.\n```cs\nAssistantService assistant;\nstring assistantVersionDate = \"<assistant-version-date>\";\nAuthenticator assistantAuthenticator;\nstring workspaceId = \"<workspaceId>\";\n\nvoid Example()\n{\n    authenticator.DisableSslVerification = true;\n    assistant = new AssistantService(assistantVersionDate, assistantAuthenticator);\n\n    //  disable ssl verification\n    assistant.DisableSslVerification = true;\n}\n```\n\n## IBM Cloud Pak for Data(ICP4D)\nIf your service instance is of ICP4D, below are two ways of initializing the assistant service.\n\n#### 1) Supplying the `username`, `password`, `icp4d_url` and `authentication_type`\n\nThe SDK will manage the token for the user\n\n```cs\n    CloudPakForDataAuthenticator authenticator = new CloudPakForDataAuthenticator(\"<url>\", \"<username>\", \"<password>\");\n    while(!authenticator.CanAuthenticate())\n    {\n        yield return null;\n    }\n    service = new AssistantService(versionDate, authenticator);\n```\n\n#### 2) Supplying the access token\n\n```cs\n    BearerTokenAuthenticator = new BearerTokenAuthenticator(\"<accessToken>\");\n    while(!authenticator.CanAuthenticate())\n    {\n        yield return null;\n    }\n    service = new AssistantService(versionDate, authenticator);\n```\n\n## IBM Cloud Private\nThe Watson Unity SDK does not support IBM Cloud Private because connection via proxy is not supported in UnityWebRequest. \n\n## Documentation\nDocumentation can be found [here][documentation]. You can also access the documentation by selecting API Reference the Watson menu (**Watson -> API Reference**).\n\n## Getting started videos\nYou can view Getting Started videos for the IBM Watson SDK for Unity on [YouTube](https://www.youtube.com/watch?v=sNPsdUWSi34&list=PLZDyxLlNKRY9b2vurEhkSoNWZN5c5l4Nr).\n\n## Questions\n\nIf you have issues with the APIs or have a question about the Watson services, see [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-watson+unity).\n\n## Open Source @ IBM\nFind more open source projects on the [IBM Github Page](http://ibm.github.io/).\n\n## License\nThis library is licensed under Apache 2.0. Full license text is available in [LICENSE](LICENSE).\n\n## Contributing\nSee [CONTRIBUTING.md](.github/CONTRIBUTING.md).\n\n## Featured projects\nWe'd love to highlight cool open-source projects that use this SDK! If you'd like to get your project added to the list, feel free to make an issue linking us to it.\n\n[wdc]: https://www.ibm.com/watson/developer/\n[wdc_unity_sdk]: https://github.com/watson-developer-cloud/unity-sdk\n[latest_release_sdk]: https://github.com/watson-developer-cloud/unity-sdk/releases/latest\n[latest_release_core]: https://github.com/IBM/unity-sdk-core/releases/latest\n[get_unity]: https://unity3d.com/get-unity\n[documentation]: https://watson-developer-cloud.github.io/unity-sdk/\n[ibm-cloud-onboarding]: https://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Unity\n[watson-dashboard]: https://cloud.ibm.com/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDC0:285814:16D120:5BED01:6AB920AF"},"text_sha256":"74d9869e5c39f055f83a7bd7c60e72b4624ed4b95613c88cb21deb38e3370995"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stillwater-sc/universal","input_row":{"repository":"stillwater-sc/universal","url":"https://github.com/stillwater-sc/universal","name":"universal","owner":"stillwater-sc","description":"Large collection of number systems providing custom arithmetic for mixed-precision algorithm development and optimization for AI, Machine Learning, Computer Vision, Signal Processing, CAE, EDA, control, optimization, estimation, and approximation.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":501,"issues":587,"created_at":"2017-05-01T20:13:06Z","updated_at":"2026-09-26T01:29:48Z","first_commit_at":"2017-05-01T20:13:06Z","last_commit_at":"2026-09-26T01:29:43Z","activity_months":112.81999999999999,"ai_ml_match_topics":"artificial-intelligence","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:23.720Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stillwater-sc/universal","visibility":"public","created_at":"2017-05-01T20:13:06Z","updated_at":"2026-09-26T01:29:48Z","private":false,"fork":false,"archived":false,"stargazers_count":501,"open_issues_count":10,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3409","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:17F2176:1C109C6:6AB92843"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3408","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17A6D8F:1BC496B:6AB92844"},"commit":{"sha":"0cca31fa0465eb26e146dd763a9f14dea6617e1e","url":"https://github.com/stillwater-sc/universal/commit/0cca31fa0465eb26e146dd763a9f14dea6617e1e","date":"2018-05-15T21:56:12Z","author_date":"2018-05-15T21:56:12Z","committer_date":"2018-05-15T21:56:12Z","tree_sha":"28f12c11ed0c76178854f19e169bb5d334a07d4f","message_first_line":"cleanup of warnings"},"tree_request_status":200,"tree_rate":{"github_remaining":"3407","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F1:180242:17D6018:1BF4526:6AB92844"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15225,"blob_sha":"c8f910a82f07a9eab36bf19093e13e08d8fe32b9","priority":0}],"documents":[{"path":"README.md","size":15225,"blob_sha":"c8f910a82f07a9eab36bf19093e13e08d8fe32b9","priority":0,"status":200,"text":"# Universal: a C++ template library for universal number arithmetic\n\nUniversal Numbers, or unums, are a collection of number systems to replace floating point with more efficient and mathematically correct arithmetic properties.\n\n# How to build\n\n[ ![Codeship Status for stillwater-sc/universal](https://app.codeship.com/projects/22533f00-252a-0136-2ba6-6657a5454f61/status?branch=master)](https://app.codeship.com/projects/286490)\n[![Coverage Status](https://coveralls.io/repos/github/stillwater-sc/universal/badge.svg?branch=master)](https://coveralls.io/github/stillwater-sc/universal?branch=master)\n\nIf just want to experiment with the number system tools and test suites, and don't want to bother cloning and building the source code, there is a Docker container at your service:\n\n```\n> docker pull stillwater/universal\n> docker run -it --rm stillwater/universal /bin/bash\nbash-4.3# ls tools/cmd\nCTestTestfile.cmake  cmake_install.cmake  cmd_dc  cmd_fc  cmd_ieee_fp  cmd_ldc  cmd_numeric_limits  cmd_pc\nbash-4.3# tools/cmd/cmd_ieee_fp 1.2345678901234567890123\ninput value:  1.2345678901234567890123\n      float:                1.23456788 (+,0,00111100000011001010010)\n     double:        1.2345678901234567 (+,0,0011110000001100101001000010100011000101100111111011)\nlong double:    1.23456789012345669043 (+,0,001111000000110010100100001010001100010110011111101100000000000)\n\nor run a test suite\n\nbash-4.3# tests/posit/posit_8bit_posit\nStandard posit<8,0> configuration tests\n posit<  8,0> useed scale     1     minpos scale         -6     maxpos scale          6\n posit<8,0> add         PASS\n posit<8,0> subtract    PASS\n posit<8,0> multiply    PASS\n posit<8,0> divide      PASS\n posit<8,0> negate      PASS\n posit<8,0> reciprocate PASS\n\nThese two educational examples are pretty informative when you are just starting out learning about posits:\nbash-4.3# education/posit/edu_scales\nbash-4.3# education/posit/edu_tables\n```\n\nIf you do want to work with the code, the universal numbers software library is built using cmake. \nInstall the latest cmake [cmake](https://cmake.org/download).\n\nThe library is a pure template library without any further dependencies.\n\nSimply clone the github repo, and you are ready to build the universal library. What you are building are tools to work with floats and posits, educational programs that highlight the use of the posit library, and the posit verification suite. Issue the command _make test_ (or better yet _ctest -j 16_ (or how many cores you have)) to run the complete posit verification suite, which can be used as a regression capability when you are modifying the source code. This will take several minutes but will touch all the corners of the posit functionality.\n\n```\n> git clone https://github.com/stillwater-sc/universal\n> cd universal/build\n> cmake ..\n> make\n> make test\n```\n\nThe library builds a set of useful command utilities, which can be found in the directory \".../build/tools/cmd\".\n\n```\n>:~/dev/universal/build$ make cmd_ieee_fp\nScanning dependencies of target cmd_ieee_fp\n[ 50%] Building CXX object tools/cmd/CMakeFiles/cmd_ieee_fp.dir/ieee_fp.cpp.o\n[100%] Linking CXX executable cmd_ieee_fp\n[100%] Built target cmd_ieee_fp\n>:~/dev/universal/build$ tools/cmd/cmd_ieee_fp 1.234567890123456789012\ninput value:   1.234567890123456789012\n      float:                1.23456788 (+,0,00111100000011001010010)\n     double:        1.2345678901234567 (+,0,0011110000001100101001000010100011000101100111111011)\nlong double:    1.23456789012345669043 (+,0,000000000000001111000000110010100100001010001100010110011111101)\n```\nThe command _cmd_ieee_fp_ is very handy to quickly determine how your development environment represents (truncates) a specific value. There are also the specific commands _cmd_fc_, _cmd_dc_, and _cmd_ldc_, which focus on float, double, and long double representations respectively.\n\nThere is also a command _cmd_pc_ to help you visualize and compare the posit component fields for a given value:\n```\n>:~/dev/universal/build$ make cmd_pc\nScanning dependencies of target cmd_pc\n[100%] Building CXX object tools/cmd/CMakeFiles/cmd_pc.dir/pc.cpp.o\n[100%] Linking CXX executable cmd_pc\n[100%] Built target cmd_pc\n>:~/dev/universal/build$ tools/cmd/cmd_pc 1.234567890123456789012\nposit< 8,0> = s0 r10 e f01000 qNE v1.25\nposit< 8,1> = s0 r10 e0 f0100 qNE v1.25\nposit< 8,2> = s0 r10 e00 f010 qNE v1.25\nposit< 8,3> = s0 r10 e000 f01 qNE v1.25\nposit<16,1> = s0 r10 e0 f001111000001 qNE v1.234619140625\nposit<16,2> = s0 r10 e00 f00111100000 qNE v1.234375\nposit<16,3> = s0 r10 e000 f0011110000 qNE v1.234375\nposit<32,1> = s0 r10 e0 f0011110000001100101001000011 qNE v1.2345678918063641\nposit<32,2> = s0 r10 e00 f001111000000110010100100001 qNE v1.2345678880810738\nposit<32,3> = s0 r10 e000 f00111100000011001010010001 qNE v1.2345678955316544\nposit<48,1> = s0 r10 e0 f00111100000011001010010000101000110001011010 qNE v1.2345678901234578\nposit<48,2> = s0 r10 e00 f0011110000001100101001000010100011000101101 qNE v1.2345678901234578\nposit<48,3> = s0 r10 e000 f001111000000110010100100001010001100010110 qNE v1.2345678901233441\nposit<64,1> = s0 r10 e0 f001111000000110010100100001010001100010110011111101100000000 qNE v1.2345678901234567\nposit<64,2> = s0 r10 e00 f00111100000011001010010000101000110001011001111110110000000 qNE v1.2345678901234567\nposit<64,3> = s0 r10 e000 f0011110000001100101001000010100011000101100111111011000000 qNE v1.2345678901234567\nposit<64,4> = s0 r10 e0000 f001111000000110010100100001010001100010110011111101100000 qNE v1.2345678901234567\n```\n\nThe fields are prefixed by their first characters, for example, \"posit<16,2> = s0 r10 e00 f00111100000 qNE v1.234375\"\n- sign     field = s0, indicating a positive number\n- regime   field = r10, indicates the first positive regime, named regime 0\n- exponent field = e00, indicates two bits of exponent, both 0\n- fraction field = f00111100000, a full set of fraction bits\n\nThe field values are followed by a quadrant descriptor and a value representation in decimal:\n\n- qNE            = North-East Quadrant, representing a number in the range \"[1, maxpos]\"\n- v1.234375      = the value representation of the posit projection\n\nThe positive regime for a posit shows a very specific structure, as can be seen in the image blow:\n![regime structure](background/img/positive_regimes.png)\n\n# Motivation\n\nModern AI applications have demonstrated the inefficiencies of the IEEE floating point format. Both Google and Microsoft have jettisonned IEEE floating point for their AI cloud services to gain two orders of magnitude better performance. Similarly, AI applications for mobile and embedded applications are shifting away from IEEE floating point. But, AI applications are hardly the only applications that expose the limitations of floating point. Cloud scale, IoT, embedded, control, and HPC applications are also limited by the inefficiencies of the IEEE floating point format. A simple change to a new number system can improve scale and cost of these appliations by orders of magnitude.\n\nWhen performance and/or power efficiency are differentiating attributes for the use case, the complexity of IEEE floats simply can't compete with number systems that are tailored to the needs of the application. \n\n## Advantages of posits: better, faster, cheaper, and more power efficient\n\nThe core limitations of IEEE floating point are caused by two key problems of the format: \n- inefficient representation of the reals\n- irreproducibility in the context of concurrency\n\nThe complete list of issues that are holding back IEEE floating point formats:\n1. **Wasted Bit Patterns** - 32-bit IEEE floating point has around eight million ways to represent NaN (Not-A-Number), while 64-bit floating point has two quadrillion, that is approximately 2.251x10^15 to be more exact. A NaN is an exception value to represent undefined or invalid results, such as the result of a division by zero.\n2. **Mathematically Incorrect** - The format specifies two zeroes - a negative and positive zero - which have different behaviors. - Loss of associative and distributive law due to rounding after each operation. This loss of associative and distributive arithmetic behavior creates irreproducible result of concurrent programs that use IEEE floating point. This is particularly problematic for embedded and control applications.\n3. **Overflows to ± inf and underflows to 0** - Overflowing to ± inf increases the relative error by an infinite factor, while underflowing to 0 loses sign information.\n4. **Unused dynamic range** - The dynamic range of double precision floats is a whopping 2^2047, whereas most numerical software is architected to operate around 1.0.\n5. **Complicated Circuitry** - Denormalized floating point numbers have a hidden bit of 0 instead of 1. This creates\na host of special handling requirements that complicate compliant hardware implementations.\n6. **No Gradual Overflow and Fixed Accuracy** - If accuracy is defined as the number of significand bits, IEEE\nfloating point have fixed accuracy for all numbers except denormalized numbers because the number of signficand\ndigits is fixed. Denormalized numbers are characterized by a decreased number of significand digits when the value approaches zero as a result of having a zero hidden bit. Denormalized numbers fill the underflow gap (i.e.\nthe gap between zero and the least non-zero values). The counterpart for gradual underflow is gradual overflow\nwhich does not exist in IEEE floating points.\n\nIn contrast, the _posit_ number system is designed to be efficient, symmetric, and mathematically correct in any concurrency environment.\n\n1. **Economical** - No bit patterns are redundant. There is one representation for infinity denoted as ± inf and zero.\nAll other bit patterns are valid distinct non-zero real numbers. ± inf serves as a replacement for NaN.\n2. **Mathematical Elegant** - There is only one representation for zero, and the encoding is symmetric around 1.0. Associative and distributive laws are supported through deferred rounding via the quire, enabling reproducible linear algebra algorithms in any concurrency environment.\n3. **Tapered Accuracy** - Tapered accuracy is when values with small exponent have more digits of accuracy and values with large exponents have less digits of accuracy. This concept was first introduced by Morris (1971) in his paper ”Tapered Floating Point: A New Floating-Point Representation”.\n4. **Parameterized precision and dynamic range** -- posits are defined by a size, _nbits_, and the number of exponent bits, _es_. This enables system designers the freedom to pick the right precision and dynamic range required for the application. For example, for AI applications we may pick 5 or 6 bit posits without any exponent bits to improve performance. For embedded DSP applications, such as 5G base stations, we may select a 16 bit posit with 1 exponent bit to improve performance per Watt.\n5. **Simpler Circuitry** - There are only two special cases, Not a Real and Zero. No denormalized numbers, overflow, or underflow. \n\n# Goals of the library\n\nThis library is a bit-level arithmetic reference implementation of the evolving unum III (posit and valid) standard.\nThe goal is to provide a faithful posit arithmetic layer for any C/C++/Python environment.\n\nAs a reference library, there is extensive test infrastructure to validate the arithmetic, and there is a host\nof utilities to become familiar with the internal workings of posits and valids.\n\nWe want to provide a complete unum library, and we are looking for contributors to finish the Type I and II unum implementations.\n\n# Contributing to universal\n\nWe are happy to accept pull requests via GitHub. The only requirement that we would like PR's to adhere to\nis that all the test cases pass, so that we know the new code isn't breaking any functionality. \n\n# Verification Suite\n\nNormally, the verification suite is run as part of the _make test_ command in the build directory. However, it is possible to run specific components of the test suite, for example, to validate algorithmic changes to more complex arithmetic functions, such as square root, exponent, logarithm, and trigonometric functions.\n\nHere is an example:\n```\n>:~/dev/universal/build$ make posit_32bit_posit\nScanning dependencies of target posit_32bit_posit\n[100%] Building CXX object tests/posit/CMakeFiles/posit_32bit_posit.dir/32bit_posit.cpp.o\n[100%] Linking CXX executable posit_32bit_posit\n[100%] Built target posit_32bit_posit\n>:~/dev/universal/build$ tests/posit/posit_32bit_posit\nStandard posit<32,2> configuration tests\n posit< 32,2> useed scale     4     minpos scale       -120     maxpos scale        120\n\nArithmetic tests 200000 randoms each\n posit<32,2> addition       PASS\n posit<32,2> subtraction    PASS\n posit<32,2> multiplication PASS\n posit<32,2> division       PASS\n```\n\n# Structure of the tree\n\nThe universal library contains a set of functionality groups to deal with different number systems. In the examples shown above, we have seen the \".../universal/posit\" group and its test suite, \".../universal/tests/posit\". Here is a complete list:\n\n- *universal/posit* - contains the implementation of the posit number system\n- *universal/valid* - contains the implementation of the valid number system\n- *universal/unum* - contains the implementation of the unum Type I number system (TBD)\n- *universal/unum2* - contains the implementation of the unum Type II number system (TBD)\n- *universal/float* - contains the implementation of the IEEE floating point augmentations for reproducible computation\n- *universal/bitset* - contains the implementation of an abitrary integer number system\n\nAnd each of these functionality groups have an associated test suite located in \".../universal/tests/...\"\n\n# Background information\n\nUniversal numbers, unums for short, are for expressing real numbers, and ranges of real numbers. \nThere are two modes of operation, selectable by the programmer, _posit_ mode, and _valid_ mode.\n\nIn _posit_ mode, a unum behaves much like a floating-point number of fixed size, \nrounding to the nearest expressible value if the result of a calculation is not expressible exactly.\nA posit offers more accuracy and a larger dynamic range than floats with the same number of bits.\n\nIn _valid_ mode, a unum represents a range of real numbers and can be used to rigorously bound answers \nmuch like interval arithmetic does.\n\nPosit configurations have a very specific relationship to one another. When expanding a posit, \nthe new value falls 'between' the old values of the smaller posit. The new value is the arithmetic mean \nof the two numbers if the expanding bit is a fraction bit, and it is the geometric mean of the two numbers \nif the expanding bit is a regime or exponent bit. \nThis [page](PositRefinementViz.md) shows a visualization of the expansion of _posit<2,0>_ to _posit<7,1>_:\n\n# Public Domain and community resources\n\nThe unum format is a public domain specification, and there are a collection of web resources that\nmanage information and discussions around the use of unums.\n\n[Posit Hub](https://posithub.org)\n\n[Unum-computing Google Group](https://groups.google.com/forum/#!forum/unum-computing)\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"50AC:326565:174FC5:5C6D07:6AB920B3"},"text_sha256":"713e3a2157e080e8e0672764e0fb2b5aad8fd604b6973f0ebb28397df35f0778"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3406","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0796:754BF:17B03F6:1BCEBAE:6AB92845"},"commit":{"sha":"ee4032d7b53f6e0fa7586303d470ab62243764c8","url":"https://github.com/stillwater-sc/universal/commit/ee4032d7b53f6e0fa7586303d470ab62243764c8","date":"2026-06-30T20:31:55Z","author_date":"2026-06-30T20:31:55Z","committer_date":"2026-06-30T20:31:55Z","tree_sha":"8201c271b3ff208e160e25b7157c877e3f5ff331","message_first_line":"feat(efloat): implement mathematical exponential library (#1130)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3405","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0923:62B94:17A2565:1BC0A69:6AB92845"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":52547,"blob_sha":"59ff49730d7075fabb089c3ad1a565fa4130fcb9","priority":0}],"documents":[{"path":"README.md","size":52547,"blob_sha":"59ff49730d7075fabb089c3ad1a565fa4130fcb9","priority":0,"status":200,"text":"# Universal: a header-only C++ template library of custom arithmetic plug-in types\n\n\n| **System** | **Status** | **More information** |\n|------------|------------|----------------------|\n| [Codacy Code Quality](https://app.codacy.com/gh/stillwater-sc/universal/dashboard) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/25452f0319d34bc2a553cd1857d7dfae)](https://app.codacy.com/gh/stillwater-sc/universal?utm_source=github.com&utm_medium=referral&utm_content=stillwater-sc/universal&utm_campaign=Badge_Grade_Dashboard) | Code Quality Assessment |\n| [FOSSA Status](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal) | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal?ref=badge_shield) | Open-source license dependency scanner |\n| [GitHub Actions](https://github.com/stillwater-sc/universal/actions) | [![Build Status](https://github.com/stillwater-sc/universal/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/stillwater-sc/universal) | Latest Linux/MacOS/Windows builds and regression tests |\n| [Development Branch](https://github.com/stillwater-sc/universal/actions) | ![Development Branch Status](https://github.com/stillwater-sc/universal/actions/workflows/cmake.yml/badge.svg?branch=v3.88) | Development Branch |\n| [Regression Status](https://github.com/stillwater-sc/universal/actions) | ![Regression Status](https://github.com/stillwater-sc/universal/actions/workflows/cmake.yml/badge.svg?event=push) | Regression Status |\n| [Code Coverage](https://coveralls.io) | [![Coverage Status](https://coveralls.io/repos/github/stillwater-sc/universal/badge.svg?branch=main)](https://coveralls.io/github/stillwater-sc/universal?branch=main) | Code coverage scanner |\n| [Docker Pulls](https://hub.docker.com/r/stillwater/universal) | [![Docker Pulls](https://img.shields.io/docker/pulls/stillwater/universal.svg)](https://hub.docker.com/r/stillwater/universal) | Container pulls |\n| [Awesome C++](https://github.com/fffaraz/awesome-cpp) | [![Awesome Cpp](https://awesome.re/mentioned-badge.svg)](https://github.com/fffaraz/awesome-cpp#math) | Awesome C++ Libraries |\n| [JOSS Markdown](https://joss.theoj.org) | [![status](https://joss.theoj.org/papers/932fdfc2735a85422e4431f27ebfc0d0/status.svg)](https://joss.theoj.org/papers/932fdfc2735a85422e4431f27ebfc0d0)  | Journal of Open-Source Software paper |\n| [Zenodo](https://zenodo.org/record/7735084) | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7735084.svg)](https://doi.org/10.5281/zenodo.7735084) | Zenodo DOI Badge |\n| [CodeRabbitAI](https://coderabbit.ai) | ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/stillwater-sc/universal?utm_source=oss&utm_medium=github&utm_campaign=stillwater-sc%2Funiversal&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews) | CodeRabbit Badge |\n\n-------------------------------\n\n\nThe goal of the Universal Numbers Library is to offer alternatives to native integer and floating-point for mixed-precision algorithm development and optimization. Tailoring the arithmetic types to the application's precision and dynamic range enables a new level of application performance and energy efficiency, particularly valuable for embedded applications that need autonomy through intelligent behavior.\n\nDeep Learning algorithms in particular provide a core application vertical where alternative formats and precisions, such as half-precision floating-point and bfloat16, yield speed-ups of two to three orders of magnitude, making rapid innovation in AI possible.\n\nThe Universal Library is a ready-to-use header-only library that provides a plug-in replacement for native types and offers a low-friction environment to explore alternatives to IEEE-754 floating-point in AI, DSP, HPC, and HFT algorithms.\n\nThe basic use pattern is as simple as:\n\n```code\n// bring in the parameterized type of interest, in this case\n// a fixed-sized, arbitrary configuration classic floating-point\n#include <universal/number/cfloat/cfloat.hpp>\n\n// define your computational kernel parameterized by arithmitic type\ntemplate<typename Real>\nReal MyKernel(const Real& a, const Real& b) {\n    return a * b;  // replace this with your kernel computation\n}\n\nconstexpr double pi = 3.14159265358979323846;\n\nint main() {\n    // if desired, create an application type alias to avoid errors\n    using Real = sw::universal::half; // half-precision IEEE-754 floating-point  \n\n    Real a = sqrt(2);\n    Real b = pi;\n    // finally, call your kernel with your desired arithmetic type\n    std::cout << \"Result: \" << MyKernel(a, b) << std::endl;  \n}\n```\n\nThe library contains fast implementations of special IEEE-754 formats that do not have universal hardware implementations across x86, ARM, POWER, RISC-V, and GPUs. Special formats such as quarter precision, `quarter`, half-precision, `half`, and quad precision, `quad`, are provided, as well as vendor-specific extensions, such as NVIDIA `TensorFloat`, Google's Brain Float, `bfloat16`, or TI DSP fixed-points, `fixpnt`. In addition to these often-used specializations, *Universal* supports static and elastic integers, decimals, fixed-points, rationals, linear floats, tapered floats, logarithmic, interval and adaptive-precision integers, rationals, and floats. There are example number system skeletons to get you started quickly if you desire to add your own.\n\n## Communication channels\n\n* [GitHub Issue](https://github.com/stillwater-sc/universal/issues): bug reports,\n  feature requests, etc.\n* [Forum](https://groups.google.com/u/1/g/unum-computing): discussion of alternatives to IEEE-754 for computational science.\n* [Slack](https://fptalks.slack.com): online chats, discussions,\n  and collaboration with other users, researchers and developers.\n\n## Citation\n\nPlease cite [our work](https://joss.theoj.org/papers/10.21105/joss.05072) if you use *Universal*.\n\nResearch results using *Universal* arithmetic types are also available:\n1. [Reproducibility](https://arxiv.org/abs/2012.11011)\n2. [Iterative Refinement](https://arxiv.org/abs/2408.13400)\n\nLorenz System ODE solver using low-precision posits:\n![visual-studio-project](docs/img/Lorenz-system.png)\n\n## Bibtex records\n```bib\n@article{Quinlan:2024,\n    author     = {James Quinlan, E. Theodore L. Omtzigt},\n    title      = {Iterative Refinement with Low-Precision Posits},\n    journal    = {arXiv:2408.13400},\n    year       = {2024},\n}\n\n@article{omtzigt2023universal,\n  title={Universal Numbers Library: Multi-format Variable Precision Arithmetic Library},\n  author={Omtzigt, E Theodore L and Quinlan, James},\n  journal={Journal of Open Source Software},\n  volume={8},\n  number={83},\n  pages={5072},\n  year={2023}\n}\n\n@inproceedings{Omtzigt:2022,\n  title        = {Universal: Reliable, Reproducible, and Energy-Efficient Numerics},\n  author       = {E. Theodore L. Omtzigt and James Quinlan},\n  booktitle    = {Conference on Next Generation Arithmetic},\n  pages        = {100--116},\n  year         = {2022},\n  organization = {Springer}\n}\n\n@article{Omtzigt2020,\n    author     = {E. Theodore L. Omtzigt and Peter Gottschling and Mark Seligman and William Zorn},\n    title      = {{Universal Numbers Library}: design and implementation of a high-performance reproducible number systems library},\n    journal    = {arXiv:2012.11011},\n    year       = {2020},\n}\n```\n\n## Talks and Presentations\n\nThe following presentations describe *Universal* and the number systems it contained as of the time of publication.\n\nSlides of a presentation at [FPTalks'21](https://fpbench.org/talks/fptalks21.html)\n\n[Presentation: Application-Driven Custom Number Systems](https://drive.google.com/file/d/1fPvJ5kjjNKY9TiVCBX8xwb5czGNd87Dr/view)\n\nSlides of the presentation at [CoNGA'22](https://link.springer.com/book/10.1007/978-3-031-09779-9)\n\n[Presentation: Universal: Reliable, Reproducible, and Energy-Efficient Numerics](docs/presentations/conga22-universal-arithmetic-library.pdf)\n\nA quick description of the structure of the number system parameterization can be found [here](docs/number-system-type-parameterization.md).\n\n## Quick start\n\nFollow the local workflow notes in [how-to-run-sanitizers.md](how-to-run-sanitizers.md).\n\nIf you just want to experiment with Universal without cloning and building the source code, there is a Docker container with compilers, cmake, and the library pre-installed:\n\n```text\n> docker pull stillwater/universal\n> docker run -it --rm stillwater/universal bash\nstillwater@container:~$ ieee 1.5\nstillwater@container:~$ cat > hello.cpp << 'EOF'\n#include <universal/number/posit/posit.hpp>\n#include <iostream>\nint main() {\n    sw::universal::posit<16,2> p = 1.5;\n    std::cout << p << '\\n';\n}\nEOF\nstillwater@container:~$ g++ -std=c++20 -I/usr/local/include/sw -o hello hello.cpp && ./hello\n```\n\n[Here](docs/command-line-tools.md) is a quick reference of what the command line tools have to offer.\n\n### VS Code Dev Container\n\nFor a full development environment with both GCC and Clang, install [Docker](https://www.docker.com/) and the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) VS Code extension, then open the repository and select **Reopen in Container**. CMake presets (`gcc-debug`, `clang-release`, etc.) are available in the CMake Tools preset selector.\n\n## How to build\n\nIf you do want to work with the code, the universal numbers software library is built using cmake version v4.2.1.\nInstall the latest [cmake](https://cmake.org/download).\nThere are interactive installers for MacOS and Windows.\nFor Linux, a portable approach downloads the shell archive and installs it at /usr/local:\n\n```text\n> wget https://github.com/Kitware/CMake/releases/download/v4.2.1/cmake-4.2.1-Linux-x86_64.sh\n> sudo sh cmake-4.2.1-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir\n```\n\nFor Ubuntu, snap will install the latest cmake, and would be the preferred method:\n\n```text\n> sudo snap install cmake --classic\n```\n\nThe Universal Library is a pure C++ template library without any further dependencies, \neven for the regression test suites to enable hassle-free installation and use.\n\nClone the GitHub repo, and you are ready to build the different components of the Universal library.  \nThe library contains tools for using integers, decimals, fixed-points, floats, posits, valids, and logarithmic\nnumber systems. It includes educational programs that showcase simple use cases to familiarize yourself with\ndifferent number systems and application examples to highlight the use of other number systems to gain performance\nor numerical accuracy. Finally, each number system offers its own verification suite. \n\nThe easiest way to become familiar with all the options in the build process is to fire up the CMake GUI (or ccmake if you are on a headless server). The CMake output will summarize which options have been set.  \nThe output will look something like this:\n\n```text\n$ git clone https://github.com/stillwater-sc/universal\n$ cd universal\n$ mkdir build\n$ cd build\n$ cmake -DUNIVERSAL_BUILD_ALL=ON ..\n\n _____  _____  ____  _____  _____  ____   ____  ________  _______     ______        _       _____\n|_   _||_   _||_   \\|_   _||_   _||_  _| |_  _||_   __  ||_   __ \\  .' ____ \\      / \\     |_   _|\n  | |    | |    |   \\ | |    | |    \\ \\   / /    | |_ \\_|  | |__) | | (___ \\_|    / _ \\      | |\n  | '    ' |    | |\\ \\| |    | |     \\ \\ / /     |  _| _   |  __ /   _.____`.    / ___ \\     | |   _\n   \\ \\__/ /    _| |_\\   |_  _| |_     \\ ' /     _| |__/ | _| |  \\ \\_| \\____) | _/ /   \\ \\_  _| |__/ |\n    `.__.'    |_____|\\____||_____|     \\_/     |________||____| |___|\\______.'|____| |____||________|\n\n-- Version from git tag v4.6.11: 4.6.11\n-- The C compiler identification is GNU 13.3.0\n-- The CXX compiler identification is GNU 13.3.0\n-- The ASM compiler identification is GNU\n-- Found assembler: /usr/bin/cc\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Check for working C compiler: /usr/bin/cc - skipped\n-- Detecting C compile features\n-- Detecting C compile features - done\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- Check for working CXX compiler: /usr/bin/c++ - skipped\n-- Detecting CXX compile features\n-- Detecting CXX compile features - done\n-- No default build type specified: setting CMAKE_BUILD_TYPE=Release\n-- C++20 has been enabled by default\n-- UNIVERSAL_BUILD_REGRESSION_SANITY   ON\n-- UNIVERSAL_BUILD_REGRESSION_LEVEL_1  ON\n-- Performing Test COMPILER_HAS_SSE3_FLAG\n-- Performing Test COMPILER_HAS_SSE3_FLAG - Success\n-- Performing Test COMPILER_HAS_AVX_FLAG\n-- Performing Test COMPILER_HAS_AVX_FLAG - Success\n-- Performing Test COMPILER_HAS_AVX2_FLAG\n-- Performing Test COMPILER_HAS_AVX2_FLAG - Success\n--\n-- PROJECT_NAME                = universal\n-- PROJECT_NAME_NOSPACES       = universal\n-- PROJECT_SOURCE_DIR          = /home/stillwater/dev/stillwater/clones/universal\n-- PROJECT_VERSION             = 4.6.11.9a7c0243\n-- CMAKE_C_COMPILER            = /usr/bin/cc\n-- CMAKE_CXX_COMPILER          = /usr/bin/c++\n-- CMAKE_CURRENT_SOURCE_DIR    = /home/stillwater/dev/stillwater/clones/universal\n-- CMAKE_CURRENT_BINARY_DIR    = /home/stillwater/dev/stillwater/clones/universal/build\n-- GIT_COMMIT_HASH             = 9a7c0243\n-- GIT_BRANCH                  = main\n-- include_install_dir         = include\n-- include_install_dir_full    = include\n-- config_install_dir          = share/universal\n-- include_install_dir_postfix =\n-- Add test multifile from source folder Applications/Environment/Multifile.\n-- CMAKE_CXX_COMPILER ID is -GNU-\n-- Adding regression suite for complex arithmetic using fixpnt\n-- Adding regression suite for complex math functions using fixpnt\n-- Removing regression suite for complex arithmetic using posit1\n-- Removing regression suite for complex math functions using posit1\n-- Removing regression suite for complex arithmetic using cfloats\n-- Removing regression suite for complex math functions using cfloats\n-- Adding regression suite for sw::universal::complex<T>\n-- adding rpoly test suite\n-- ucalc: readline not found, using basic line input\n-- Adding playground complex experiment\n-- Adding playground concurrency experiment\n-- TBB found: linking to concurrency experiment\n-- Ignoring complex tests for application/performance\n-- Found clang-format: /usr/bin/clang-format-18\n--   Version: Ubuntu clang-format version 18.1.3 (1ubuntu1)\n--   Files to format: 2017\n-- Found clang-tidy: /usr/bin/clang-tidy-18\n--   Version: Ubuntu LLVM version 18.1.3\n  Optimized build.\n--   Header files for analysis: 1008\n--   Sample test files for analysis: 29\n--\n-- Clang-tidy targets configured:\n--   make tidy-check         - Run clang-tidy on headers (read-only)\n--   make tidy-check-samples - Run clang-tidy on sample test files\n--   make tidy-fix           - Apply clang-tidy fixes to headers\n--   make tidy-info          - Show detailed configuration\n--   Script: /home/stillwater/dev/stillwater/clones/universal/build/run-clang-tidy.sh\n--\n-- ******************* Universal Arithmetic Library Configuration Summary *******************\n-- General:\n--   Version                                    :   4.6.11.9a7c0243\n--   System                                     :   Linux\n--   C++ Language Requirement                   :   C++20\n--   C compiler                                 :   /usr/bin/cc\n--   Release C flags                            :   -O3 -DNDEBUG -Wall -Wpedantic -Wno-narrowing -Wno-deprecated\n--   Debug C flags                              :   -g -Wall -Wpedantic -Wno-narrowing -Wno-deprecated\n--   C++ compiler                               :   /usr/bin/c++\n--   Release CXX flags                          :   -O3 -DNDEBUG   -Wall -Wpedantic -Wno-narrowing -Wno-deprecated -Wall -Wpedantic -Wno-narrowing -Wno-deprecated\n--   Debug CXX flags                            :   -g   -Wall -Wpedantic -Wno-narrowing -Wno-deprecated -Wall -Wpedantic -Wno-narrowing -Wno-deprecated\n--   Build type                                 :   Release\n--\n--   UNIVERSAL_BUILD_ALL                        :   ON\n--   UNIVERSAL_BUILD_CI                         :   OFF\n--   UNIVERSAL_BUILD_CI_LITE                    :   OFF\n--\n--   UNIVERSAL_BUILD_DEMONSTRATION              :   ON\n--   UNIVERSAL_BUILD_NUMBERS                    :   ON\n--   UNIVERSAL_BUILD_NUMBER_CASCADES            :   ON\n--   UNIVERSAL_BUILD_NUMERICS                   :   ON\n--   UNIVERSAL_BUILD_BENCHMARKS                 :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_SDK         :   ON\n--   UNIVERSAL_BUILD_COMPLEX                    :   ON\n--   UNIVERSAL_BUILD_CONCURRENCY                :   ON\n--   UNIVERSAL_BUILD_UTILITY                    :   ON\n--\n--   UNIVERSAL_BUILD_TOOLS_CMD_LINE             :   ON\n--   UNIVERSAL_BUILD_TOOLS_UTILS                :   ON\n--   UNIVERSAL_BUILD_TOOLS_CLOSURE              :   OFF\n--   UNIVERSAL_BUILD_PLAYGROUND                 :   ON\n--   UNIVERSAL_BUILD_EDUCATION                  :   ON\n--   UNIVERSAL_BUILD_EDUCATION_INTERACTIVE      :   OFF\n--   UNIVERSAL_BUILD_APPLICATIONS               :   ON\n--   UNIVERSAL_BUILD_PAPERS                     :   ON\n--\n--   UNIVERSAL_BUILD_NUMERIC_FUNCTIONS          :   ON\n--   UNIVERSAL_BUILD_NUMERIC_FAITHFUL           :   ON\n--   UNIVERSAL_BUILD_NUMERIC_QUIRES             :   ON\n--   UNIVERSAL_BUILD_NUMERIC_CHALLENGES         :   ON\n--   UNIVERSAL_BUILD_NUMERIC_UTILS              :   ON\n--   UNIVERSAL_BUILD_NUMERIC_FPBENCH            :   ON\n--\n--   UNIVERSAL_BUILD_LINEAR_ALGEBRA_BLAS        :   ON\n--   UNIVERSAL_BUILD_LINEAR_ALGEBRA_VMATH       :   ON\n--   UNIVERSAL_BUILD_LINEAR_ALGEBRA_DATA        :   ON\n--\n--   UNIVERSAL_BUILD_BENCHMARK_ERROR            :   ON\n--   UNIVERSAL_BUILD_BENCHMARK_ACCURACY         :   ON\n--   UNIVERSAL_BUILD_BENCHMARK_RANGE            :   ON\n--   UNIVERSAL_BUILD_BENCHMARK_REPRODUCIBILITY  :   ON\n--   UNIVERSAL_BUILD_BENCHMARK_PERFORMANCE      :   ON\n--   UNIVERSAL_BUILD_BENCHMARK_ENERGY           :   ON\n--\n--   UNIVERSAL_BUILD_MIXEDPRECISION_ROOTS       :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_APPROXIMATE :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_INTEGRATE   :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_INTERPOLATE :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_OPTIMIZE    :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_TENSOR      :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_METHODOLOGY :   ON\n--   UNIVERSAL_BUILD_MIXEDPRECISION_POP         :   ON\n--\n--   UNIVERSAL_BUILD_TYPE_HIERARCHY             :   ON\n--   UNIVERSAL_BUILD_APP_ENVIRONMENT            :   ON\n--\n--   UNIVERSAL_BUILD_C_API_PURE_LIB             :   ON\n--   UNIVERSAL_BUILD_C_API_SHIM_LIB             :   ON\n--   UNIVERSAL_BUILD_C_API_LIB_PIC              :   ON\n--\n--   UNIVERSAL_BUILD_NUMBER_INTERNALS           :   ON\n--   UNIVERSAL_BUILD_NUMBER_NATIVE_TYPES        :   ON\n--\n--   UNIVERSAL_BUILD_NUMBER_ELASTICS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_EINTEGERS           :   ON\n--   UNIVERSAL_BUILD_NUMBER_EDECIMALS           :   ON\n--   UNIVERSAL_BUILD_NUMBER_ERATIONALS          :   ON\n--   UNIVERSAL_BUILD_NUMBER_EFLOATS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_EREALS              :   ON\n--   UNIVERSAL_BUILD_NUMBER_ELREALS             :   OFF\n--\n--   UNIVERSAL_BUILD_NUMBER_STATICS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_INTEGERS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_DECIMALS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_RATIONALS           :   ON\n--   UNIVERSAL_BUILD_NUMBER_FIXPNTS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_DFIXPNTS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_BFLOATS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_CFLOATS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_DFLOATS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_HFLOATS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_DOUBLE_DOUBLE       :   ON\n--   UNIVERSAL_BUILD_NUMBER_QUAD_DOUBLE         :   ON\n--   UNIVERSAL_BUILD_NUMBER_DD_CASCADE          :   ON\n--   UNIVERSAL_BUILD_NUMBER_TD_CASCADE          :   ON\n--   UNIVERSAL_BUILD_NUMBER_QD_CASCADE          :   ON\n--   UNIVERSAL_BUILD_NUMBER_AREALS              :   ON\n--   UNIVERSAL_BUILD_NUMBER_INTERVALS           :   ON\n--   UNIVERSAL_BUILD_NUMBER_UNUM1S              :   ON\n--   UNIVERSAL_BUILD_NUMBER_UNUM2S              :   ON\n--   UNIVERSAL_BUILD_NUMBER_POSITS              :   ON\n--   UNIVERSAL_BUILD_NUMBER_POSITOS             :   ON\n--   UNIVERSAL_BUILD_NUMBER_VALIDS              :   ON\n--   UNIVERSAL_BUILD_NUMBER_TAKUMS              :   ON\n--   UNIVERSAL_BUILD_NUMBER_LNS                 :   ON\n--   UNIVERSAL_BUILD_NUMBER_DBNS                :   ON\n--   UNIVERSAL_BUILD_NUMBER_QUIRES              :   ON\n--   UNIVERSAL_BUILD_NUMBER_SORNS               :   ON\n--   UNIVERSAL_BUILD_NUMBER_MICROFLOATS         :   ON\n--   UNIVERSAL_BUILD_NUMBER_E8M0                :   ON\n--   UNIVERSAL_BUILD_NUMBER_MXFLOATS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_NVBLOCKS            :   ON\n--   UNIVERSAL_BUILD_NUMBER_ZFPBLOCKS           :   ON\n--\n--   UNIVERSAL_BUILD_NUMBER_CONVERSIONS         :   ON\n--\n--   UNIVERSAL_BUILD_VALIDATION_MATH            :   OFF\n--   UNIVERSAL_BUILD_VALIDATION_HW              :   ON\n--\n-- Regression Testing Level:\n--   UNIVERSAL_BUILD_REGRESSION_SANITY          :   ON\n--\n-- Compiler Configuration:\n--   Verbose build messages                     :\n--                                        NO\n--\n-- Sanitizers (GCC/Clang only):\n--   AddressSanitizer                           :\n--                                        NO\n--   UndefinedBehaviorSanitizer                 :\n--                                        NO\n--\n-- Dependencies:\n--   SSE3                                       :\n--                                        NO\n--   AVX                                        :\n--                                        NO\n--   AVX2                                       :\n--                                        NO\n--\n-- Utilities:\n--   Serializer                                 :\n--                                        NO\n--\n-- Install:\n--   Install path                               :   /usr/local\n--\n\n _____  _____  ____  _____  _____  ____   ____  ________  _______     ______        _       _____\n|_   _||_   _||_   \\|_   _||_   _||_  _| |_  _||_   __  ||_   __ \\  .' ____ \\      / \\     |_   _|\n  | |    | |    |   \\ | |    | |    \\ \\   / /    | |_ \\_|  | |__) | | (___ \\_|    / _ \\      | |\n  | '    ' |    | |\\ \\| |    | |     \\ \\ / /     |  _| _   |  __ /   _.____`.    / ___ \\     | |   _\n   \\ \\__/ /    _| |_\\   |_  _| |_     \\ ' /     _| |__/ | _| |  \\ \\_| \\____) | _/ /   \\ \\_  _| |__/ |\n    `.__.'    |_____|\\____||_____|     \\_/     |________||____| |___|\\______.'|____| |____||________|\n\n```\n\nAs you can see in the cmake output there are many build targets. Each build target is designed to provide\nfocus and fast build turnarounds when working with different number systems. Each number system has its\nown build target allowing fast and efficient regression testing.\n\nThe default build configuration is to build the DEMONSTRATION set, which contain the CMD_LINE_TOOLS, UTILS,\nEDUCATION, APPLICATIONS, and PLAYGROUND.\n\nThe build options are enabled/disabled as follows:\n\n```text\n> cmake -DUNIVERSAL_BUILD_EDUCATION=OFF -DUNIVERSAL_BUILD_NUMBER_POSITS=ON ..\n```\n\nAfter building, issue the command _make test_ to run the complete test suite of all the enabled components, \nas a regression capability when you are modifying the source code. This will take touch all the corners of the code.\n\n```text\n> git clone https://github.com/stillwater-sc/universal\n> cd universal\n> mkdir build\n> cd build\n> cmake ..\n> make -j \"$(nproc)\"\n> make test\n```\n\nFor Windows and Visual Studio, there are `CMakePredefinedTargets` that accomplish the same tasks:\n\n```text\n    - ALL_BUILD will compile all the projects\n    - INSTALL   will install the Universal library\n    - RUN_TESTS will run all tests\n```\n\nHere is the layout of all the projects contained in V3.68 of Universal:\n\n![visual-studio-project](docs/img/visual-studio-project.png)\n\nIn the *Applications* section, you will find application examples to demonstrate the use of Universal \narithmetic types to accomplish different numerical goals, such as reproducibility, accuracy, performance,\nor precision. These examples are great starting points for your own application requirements.\n\n![example-applications](docs/img/example-applications.png)\n\n## How to develop and extend *Universal*\n\nThe *Universal* library contains hundreds of example programs to demonstrate the use of the arithmetic types and the enable new developers to get up to speed. In each number system type's regression suite there is an `api/api.cpp` that chronicles all the invokation and use cases to provide an executable example of how to use the type. In general, the api section of the regression tests has code examples how to use the different library components, such as manipulators, attributes, number traits, exceptions, and special cases. \n\nIn the `education` build target (BUILD_EDUCATION), there are individual test programs that demonstrate how to use the different types.\n\nThe `docs` directory contains the descriptions of the [command line tools](docs/command-line-tools.md), a [tutorial](docs/number-system-type-parameterization.md) explaining the parameterization design of the arithmetic types in *Universal*, several conference presentations, [FPTalks](docs/presentations/fptalks-custom-number-systems.pdf) and [CoNGA22](docs/presentations/conga22-universal-arithmetic-library.pdf), describing the arithmetic types. The `docs` directory also contains ready-to-use value tables and dynamic range comparisons of many key small arithmetic types of interest in AI and DSP applications.\n\nEach number system comes with a complete regression suite to verify the functionality of assignment, conversion, arithmetic, logic, exceptions, number traits, and special cases. These regression suites are run for each PR or push to the version branch. *Universal* uses standard GitHub Actions for this, so add your branch to the workflow cmake yaml to trigger CI for your own branch.\n\nThe easiest way to get started is to pick up and copy the directory structure under `ROOT/include/universal/number/skeleton_1param` or `ROOT/include/universal/number/skeleton_2params`. They are configured to get you all the constituent pieces of a number system *Universal*-style.\n\n# Installation and usage\n\nAfter cloning the library, building and testing it in your environment, you can install it via:\n\n```text\n> cd universal/build\n> cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/your/installation/path\n> cmake --build . --config Release --target install -- -j $(nproc)\n```\n\nor manually via the Makefile target in the build directory:\n\n```text\n> make -j $(nproc) install\n```\n\nThe default install directory is `/usr/local` under Linux.  There is also an _uninstall_ command:\n\n```text\n> make uninstall\n```\n\nIf you want to use the number systems provided by Universal in your own project, \nyou can use the following CMakeLists.txt structure:\n\n```code\nproject(\"my-numerical-experiment\")\n\nfind_package(UNIVERSAL CONFIG REQUIRED)\n\nadd_executable(${PROJECT_NAME} src/mymain.cpp)\nset_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)\ntarget_link_libraries(${PROJECT_NAME} universal::universal)\n```\n\n## Controlling the build to include different components\n\nThe default build configuration will build the command line tools, a playground, educational and \napplication examples. If you want to build the full regression suite across all the number systems, \nuse the following cmake command:\n\n```text\ncmake -DUNIVERSAL_BUILD_ALL=ON ..\n```\n\nFor performance, the build configuration can enable specific x86 instruction sets (SSE/AVX/AVX2). \nFor example, if your processor supports the AVX2 instruction set, you can build the test suites \nand educational examples with the AVX2 flag turned on. This typically yields a 20% performance boost.\n\n```text\ncmake -DUNIVERSAL_BUILD_ALL=on -DUSE_AVX2=ON ..\n```\n\nThe library builds a set of useful command utilities to inspect native IEEE float/double/long double \ntypes, as well as the custom number systems provided by Universal. Assuming you have build and \ninstalled the library, the inspection commands available are:\n\n```text\n    ieee           -- show the components of the full set of IEEE floating point values\n    quarter        -- show the components and traits of a quarter precision floating-point value (FP8)\n    half           -- show the components and traits of a half precision IEEE-754 value (FP16)\n    single         -- show the components and traits of a single precision IEEE-754 value (FP32)\n    double         -- show the components and traits of a double precision IEEE-754 value (FP64)\n    longdouble     -- show the components and traits of a native long double IEEE-754 value\n    quad           -- show the components and traits of a quad precision IEEE-754 value (FP128)\n\n    signedint      -- show the components and traits of a signed integer value\n    unsignedint    -- show the components and traits of an unsigned integer value\n    fixpnt         -- show the components and traits of a fixed-point value\n    posit          -- show the components and traits of a posit value\n    lns            -- show the components and traits of a logarithmic number system value\n\n    float2posit    -- show the conversion process of a Real value to a posit\n\n    propenv        -- show the properties of the execution (==compiler) environment that built the library\n    propp          -- show numerical properties of a posit environment including the associated quire\n    propq          -- show numerical properties of a quire\n```\n\nFor example:\n\n```text\n$ ieee 1.234567890123456789012\ncompiler              : 7.5.0\nfloat precision       : 23 bits\ndouble precision      : 52 bits\nlong double precision : 63 bits\n\nDecimal representations\ninput value:             1.23456789012\n      float:                1.23456788\n     double:        1.2345678901199999\nlong double:    1.23456789011999999999\n\nHex representations\ninput value:             1.23456789012\n      float:                1.23456788    hex: 0.7f.1e0652\n     double:        1.2345678901199999    hex: 0.3ff.3c0ca428c1d2b\nlong double:    1.23456789011999999999    hex: 0.3fff.1e06521460e95b9a\n\nBinary representations:\n      float:                1.23456788    bin: 0.01111111.00111100000011001010010\n     double:        1.2345678901199999    bin: 0.01111111111.0011110000001100101001000010100011000001110100101011\nlong double:    1.23456789011999999999    bin: 0.011111111111111.001111000000110010100100001010001100000111010010101101110011010\n\nNative triple representations (sign, scale, fraction):\n      float:                1.23456788    triple: (+,0,00111100000011001010010)\n     double:        1.2345678901199999    triple: (+,0,0011110000001100101001000010100011000001110100101011)\nlong double:    1.23456789011999999999    triple: (+,0,001111000000110010100100001010001100000111010010101101110011010)\n\nUniversal triple representation (sign, scale, fraction):\ninput value:             1.23456789012\n      float:                1.23456788    triple: (+,0,00111100000011001010010)\n     double:        1.2345678901199999    triple: (+,0,0011110000001100101001000010100011000001110100101011)\nlong double:    1.23456789011999999999    triple: (+,0,001111000000110010100100001010001100000111010010101101110011010)\n      exact: TBD\n```\n\nThis _ieee_ command is very handy to quickly determine how your development environment represents (truncates) a specific value. \n\nThe specific commands _single_, _double_, and _longdouble_ focus on float, double, and long double representations respectively.\n\nThere is also a command _posit_ to help you visualize and compare the posit component fields for a given value, for example:\n\n```text\n$ posit 1.234567890123456789012\nposit< 8,0> = s0 r10 e f01000 qNE v1.25\nposit< 8,1> = s0 r10 e0 f0100 qNE v1.25\nposit< 8,2> = s0 r10 e00 f010 qNE v1.25\nposit< 8,3> = s0 r10 e000 f01 qNE v1.25\nposit<16,1> = s0 r10 e0 f001111000001 qNE v1.234619140625\nposit<16,2> = s0 r10 e00 f00111100000 qNE v1.234375\nposit<16,3> = s0 r10 e000 f0011110000 qNE v1.234375\nposit<32,1> = s0 r10 e0 f0011110000001100101001000011 qNE v1.2345678918063641\nposit<32,2> = s0 r10 e00 f001111000000110010100100001 qNE v1.2345678880810738\nposit<32,3> = s0 r10 e000 f00111100000011001010010001 qNE v1.2345678955316544\nposit<48,1> = s0 r10 e0 f00111100000011001010010000101000110001011010 qNE v1.2345678901234578\nposit<48,2> = s0 r10 e00 f0011110000001100101001000010100011000101101 qNE v1.2345678901234578\nposit<48,3> = s0 r10 e000 f001111000000110010100100001010001100010110 qNE v1.2345678901233441\nposit<64,1> = s0 r10 e0 f001111000000110010100100001010001100010110011111101100000000 qNE v1.2345678901234567\nposit<64,2> = s0 r10 e00 f00111100000011001010010000101000110001011001111110110000000 qNE v1.2345678901234567\nposit<64,3> = s0 r10 e000 f0011110000001100101001000010100011000101100111111011000000 qNE v1.2345678901234567\n```\n\nThe fields are prefixed by their first characters, for example, \"posit<16,2> = s0 r10 e00 f00111100000 qNE v1.234375\"\n\n-   sign     field = s0, indicating a positive number\n-   regime   field = r10, indicates the first positive regime, named regime 0\n-   exponent field = e00, indicates two bits of exponent, both 0\n-   fraction field = f00111100000, a full set of fraction bits\n\nThe field values are followed by a quadrant descriptor and a value representation in decimal:\n\n-   qNE            = North-East Quadrant, representing a number in the range \"[1, maxpos]\"\n-   v1.234375      = the value representation of the posit projection\n\n\nThe positive regime for a posit shows a very specific structure, as can be seen in the image blow:\n![regime structure](docs/img/positive_regimes.png)\n\n## Leveraging the *Universal* library in your own mixed-precision algorithm research\n\nTo bootstrap any new mixed-precision algorithm development and optimization project quickly and robustly, there is a github template repo available that will set up a complete working development environment with dependent libraries, development containers, VS Code integration, and a Github CI workflow. The template repo can be found at [mpadao-template](https://github.com/stillwater-sc/mpadao-template). \n\nThe template repo is the easiest way to get started with mixed-precision algorithm development using *Universal*.\n\n## Motivation\n\nModern Deep Learning AI applications are very demanding high-performance applications. Runtimes to train\nmodels are measured in terms of weeks, and target latencies for inference are 10-100msec. Standard\ndouble, and even single, precision IEEE-754 floating-point have been too expensive to use in addressing the \nperformance and power requirements of AI applications in both the cloud and the edge.\nBoth Google and Microsoft have jettisoned traditional floating-point formats for their AI cloud services \nto gain two orders of magnitude better performance. Similarly, AI applications for mobile and embedded \napplications are requantized to small integers to fit their very stringent power budgets. The AI domain\nhas been researching better number systems to address both power and performance requirements,\nbut all these efforts have worked in isolation, with results being difficult to reproduce.\n\nAI applications are only some of the applications that expose the limitations of traditional hardware. Inefficiencies in numeric storage and operations also limit cloud scale, IoT, embedded, and HPC applications. A simple change to a new number system may improve the scale and cost of these applications by orders of magnitude.\n\nWhen performance and power efficiency are the differentiating attributes for a use case, arithmetic systems that are tailored to the needs of the application are desired.\n\nIn particular, there are two concerns when using the IEEE-754 floating-point formats: \n\n-   inefficient representation of the real numbers\n-   irreproducibility in the context of concurrency\n\nMore specifically, \n\n1.   **Wasted Bit Patterns** \n    -   32-bit IEEE floating point has around eight million ways to represent NaN (Not-A-Number), while the 64-bit floating point has two quadrillion, which is approximately 2.251x10^15 to be more exact.  A NaN is an exceptional value to represent undefined or invalid results, such as the result of a division by zero.\n2.   **Mathematically Incorrect** \n    -   The format specifies two zeroes, a negative and positive zero, with different behaviors. \n    -   Loss of associative and distributive law due to rounding after each operation.  This loss of associative and distributive arithmetic behavior creates an irreproducible result of concurrent programs that use the IEEE floating point.  This is particularly problematic for embedded and control applications.\n3.   **Overflows to ± inf and underflows to 0** \n    -   Overflowing to ± inf increases the relative error by an infinite factor while underflowing to 0 loses sign information.\n4.   **Unused dynamic range** \n    -   The dynamic range of double precision floats is a whopping 2^2047, whereas most numerical software is architected to operate around 1.0.\n5.   **Complicated Circuitry** \n    -   Denormalized floating point numbers have a hidden bit of 0 instead of 1.  This creates a host of special handling requirements that complicate compliant hardware implementations.\n6.   **No Gradual Overflow and Fixed Accuracy** \n    -   If accuracy is defined as the number of significand bits, IEEE floating-point has fixed accuracy for all numbers except denormalized numbers because the number of signficand digits is fixed.  Denormalized numbers are characterized by decreased significand digits when the value approaches zero due to having a zero hidden bit.  Denormalized numbers fill the underflow gap (i.e., between zero and the least non-zero values).  The counterpart for gradual underflow is gradual overflow which does not exist in IEEE floating points.\n\nIn contrast, the _posit_ number system was designed to overcome these negatives: \n\n1.   **Economical** \n    -   No bit patterns are redundant.  There is one representation for infinity denoted as ± inf and zero.  All other bit patterns are valid distinct non-zero real numbers. ± inf serves as a replacement for NaN.\n2.   **Preserves Mathematical Properties** \n    -   There is only one representation for zero, and the encoding is symmetric around 1.0.  Associative and distributive laws are supported through deferred rounding via the quire, enabling reproducible linear algebra algorithms in any concurrency environment.\n3.   **Tapered Accuracy** \n    -   Tapered accuracy is when values with small exponents have more precision and values with large exponents have fewer digits of accuracy.  This concept was first introduced by Morris (1971) in his paper ”Tapered Floating Point: A New Floating-Point Representation”.\n4.   **Parameterized precision and dynamic range** \n    -   posits are defined by a size, _nbits_, and the number of exponent bits, _es_. This enables system designers the freedom to pick the right precision and dynamic range required for the application.  For example, we may pick 5- or 6-bit posits without any exponent bits for AI applications to improve performance.  For embedded DSP applications, such as 5G base stations, we may select a 16-bit posit with one exponent bit to improve performance per Watt.\n5.   **Simpler Circuitry** \n    -   There are only two exceptional cases, Not a Real and Zero.  No denormalized numbers, overflow, or underflow. \n\nHowever as Deep Learning has demonstrated, there are many different requirements to optimize an arithmetic and\ntailor it to the needs of the application. Universal brings all the machinery together to experiment to \nfacilitate efficient contrast and compare different arithmetic number system designs, before committing them\nto hardware.\n\n## Goals of the library\n\nThe *Universal* library started as a bit-level arithmetic reference implementation of the evolving unum Type III \n(posit and valid) standard. However, the demands for supporting number systems, such as adaptive-precision integers \nto solve large factorials, adaptive-precision floats to act as Oracles, or comparing linear and tapered floats \nprovided the opportunity to create a complete platform for numerical analysis and computational mathematics. \nWith this *Universal* platform, we enable a new direction for optimizing algorithms to take advantage of mixed-precision \ncomputation to maximize performance and minimize energy demands. Energy efficiency is going to be the\nkey differentiator for embedded intelligence applications.\n\nAs a reference library, *Universal* offers an extensive test infrastructure to validate number system \narithmetic operations, and there is a host of utilities to inspect the internal encodings and operations \nof the different number systems.\n\nThe design space for custom arithmetic is vast, and any contribution to expanding the capability of \nthe *Universal* library is encouraged. \n\n\n## Contributing to universal\n\nWe are happy to accept pull requests via GitHub. The only requirement is that the entire regression test suite passes.\n\n[![Stargazers over time](https://starchart.cc/stillwater-sc/universal.svg)](https://starchart.cc/stillwater-sc/universal)\n\n## Verification Suite\n\nTypically, the verification suite is run as part of the build directory's _make test_ command. However, it is possible to run specific test suite components, for example, to validate algorithmic changes to more complex arithmetic functions, such as square root, exponent, logarithm, and trigonometric functions.\n\nHere is an example:\n\n```text\n>:~/dev/universal/build$  make posit_logarithm\n[ 50%] Building CXX object static/posit/CMakeFiles/posit_logarithm.dir/math/logarithm.cpp.o\n[100%] Linking CXX executable posit_logarithm\n[100%] Built target posit_logarithm\n>:~/dev/universal/build$ static/posit/posit_logarithm\nposit logarithm function validation: results only\n               4 -> log(4) =  1.3862943649292\n0110000000000000 -> log(4) = 0100011000101110 (reference: 0100011000101110)   PASS\n\nposit<2,0>                                                   log PASS\nposit<3,0>                                                   log PASS\nposit<3,1>                                                   log PASS\nposit<4,0>                                                   log PASS\nposit<4,1>                                                   log PASS\nposit<5,0>                                                   log PASS\nposit<5,1>                                                   log PASS\nposit<5,2>                                                   log PASS\nposit<8,4>                                                   log PASS\nposit<8,4>                                                   log2 PASS\nposit<8,4>                                                   log10 PASS\nposit logarithm function validation: PASS\n```\n\n## Structure of the tree\n\nThe universal library contains a set of functional groups to organize the development and validation of \ndifferent number systems. Each number system type has a single include file that brings together\nthe arithmetic number type and all the extensions that *Universal* has standardized so that\nworking with numeric types is more productive. For example, facilities for number traits, an \narithmetic exception hierarchy, number system attributes, manipulators,\nand finally, a math library specialized for the type.\n\nThe number system types are categorized as _static_ or _elastic_. Static types are arithmetic types\nthat have a constant, that is _static_ size, and thus can be used for sharing composite data structures, \nsuch as matrices and tensors, between general-purpose CPUs and special-purpose hardware accelerators.\nElastic types are arithmetic types that can grow and shrink during computation, typically to accommodate\nerror-free, or closed computations.\n\nIn addition to the _static_ and _elastic_ classification, we also recognize that the base of the number\nsystem is a key parameter in the arithmetic and numerical traits of the type. In particular, the tree\nwill specialize in binary and decimal forms of arithmetic.\n\nHere is a complete list:\n\n### _static_ fixed-sized configurations\n\n- *universal/number/integer* - arbitrary configuration fixed-size integer\n- *universal/number/fixpnt* - arbitrary configuration fixed-size fixed-point number system\n- *universal/number/areal* - arbitrary configuration fixed-size faithful floating-point with uncertainty bit\n- *universal/number/cfloat* - arbitrary configuration fixed-size classic floating-point number system\n- *universal/number/posit* - arbitrary configuration fixed-size posit number system, a tapered floating-point\n- *universal/number/valid* - arbitrary configuration fixed-size valid number system, a tapered floating-point interval number system\n- *universal/number/unum* - arbitrary configuration unum Type 1 number system\n- *universal/number/unum2* - arbitrary configuration unum Type 2 number system\n- *universal/number/lns* - arbitrary configuration logarithmic number system with fixed-point exponent\n- *universal/number/dbns* - double base number system with integer exponents\n- *universal/number/sorn* - set of real numbers \n- *universal/number/dd* - multi-component double-double floating-point format \n- *universal/number/qd* - multi-component quad-double floating-point format \n\n### _elastic_ adaptive-precision configurations\n\n- *universal/number/decimal* - adaptive-precision decimal integer\n- *universal/number/einteger* - adaptive-precision binary integer\n- *universal/number/erational* - adaptive-precision rational number system\n- *universal/number/efloat* - multi-digit adaptive-precision floating-point\n- *universal/number/ereal* - multi-component adaptive-precision floating-point\n- *universal/number/elreal* - multi-component exact lazy floating-point\n\n### super-accumulator facilities\n\n- *universal/number/quire* - arbitrary configuration fixed-size super accumulator number system (add/sub/abs/sqrt)\n- *universal/number/float* - contains the implementation of the IEEE floating point augmentations for reproducible computation\n\nAnd each of these functionality groups has an associated test suite located in \".../universal/tests/...\"\n\n\n## Background information\n\nUniversal numbers, unums for short, express real numbers and ranges of real numbers. There are two modes of operation, selectable by the programmer, _posit_ mode and _valid_ mode.\n\nIn _posit_ mode, a unum behaves like a floating-point number of fixed size, rounding to the nearest expressible value if the result of a calculation is not expressible exactly.\nA posit offers more accuracy and a wider dynamic range than floats with the same number of bits.\n\nIn _valid_ mode, a unum represents a range of real numbers and can be used to bound answers rigorously, much as interval arithmetic does.\n\nPosit configurations have a specific relationship to one another. When expanding a posit, the new value falls 'between' the old values of the smaller posit. The new value is the arithmetic mean of the two numbers if the expanding bit is a fraction bit, and it is the geometric mean of the two numbers if the expanding bit is a regime or exponent bit. \nThis [page](docs/PositRefinementViz.md) shows a visualization of the expansion of _posit<2,0>_ to _posit<7,1>_:\n\n## Documentation\n\nThe [docs](docs/README.md) directory contains design documents and tutorials for the _Universal_ library types.\nThe published documentation site is at https://stillwater-sc.github.io/universal/.\nFor local build/test/sanitize/coverage workflows, see [how-to-run-sanitizers.md](how-to-run-sanitizers.md).\n\n##  Counts for Universal Library (C/C++ only)\n\n|                              Bucket                               |     Files        |  Code LOC |                         Notes                         |\n|-------------------------------------------------------------------|------------------|-----------|-------------------------------------------------------|\n| include/ (header library)                                         |      998 hdrs    | 124,785   | The actual library — header-only number systems       |\n| Regression suites (static/ + elastic/ + internal/ + validation/)  |  716 src + 6 hdr | 111,619   | Per-type test programs that exercise every number system |\n| applications/                                                     | 120 src + 20 hdr |  14,576   | Worked examples organized by use case                 |\n| Remaining components (tools/ + education/ + playground/ + benchmark/ + mixedprecision/ + linalg/ + numeric/ + c_api/ + ...) | 244 src + 22 hdr + 13 C  |  39,214   | CLIs (ucalc, bisection, ieee, ...), tutorials, mixed-precision SDK, BLAS, benchmarks, C wrappers     |\n\nTotals:\n- C++ source: 157,011 LOC\n- C/C++ headers: 130,996 LOC\n- Combined C/C++: ~288,000 LOC\n\nOther notable categories across the whole repo: 44,760 LOC of Markdown docs, 25,101 LOC of CSV data tables, 3,273 LOC of CMake, plus YAML/Python/TeX/etc.\n\nBuild directories, docs-site/ (autogenerated), deprecated/, bin/, Testing/, and .git/ were excluded.\n\n\n## Public Domain and community resources\n\nThe unum format is a public domain specification and a collection of web resources to manage information and discussions using unums.\n\n[Posit Hub](https://posithub.org)\n\n[Unum-computing Google Group](https://groups.google.com/forum/#!forum/unum-computing)\n\n\n\n\n\n## Projects that leverage posits\n\n[Matrix Template Library](http://simunova.com/#en-mtl4-index-html)\n\nThe Matrix Template Library incorporates modern C++ programming techniques to provide an easy and intuitive interface to users while enabling optimal performance. The natural mathematical notation in MTL4 empowers all engineers and scientists to implement their algorithms and models in minimal time. All technical aspects are encapsulated in the library. Think of it as MATLAB for applications.\n\n[G+SMO](http://gs.jku.at/gismo) \n\nG+Smo (Geometry + Simulation Modules, pronounced \"gismo\") is a new open-source C++ library that brings together mathematical tools for geometric design and numerical simulation. It is developed mainly by researchers and PhD students. It implements the relatively new paradigm of isogeometric analysis, which suggests the use of a unified framework in the design and analysis pipeline. G+Smo is an object-oriented, cross-platform, template C++ library and follows the generic programming principle, with a focus on both efficiency and ease of use. The library is partitioned into smaller entities, called modules. Examples of available modules include the dimension-independent NURBS module, the data fitting and solid segmentation module, the PDE discretization module and the adaptive spline module, based on hierarchical splines of arbitrary dimension and polynomial degree. \n\n[FEniCS](https://fenicsproject.org/)\n\nFEniCS is a popular open-source (LGPLv3) computing platform for solving partial differential equations (PDEs). FEniCS enables users to quickly translate scientific models into efficient finite element code. With the high-level Python and C++ interfaces to FEniCS, it is easy to get started, but FEniCS offers also powerful capabilities for more experienced programmers. FEniCS runs on a multitude of platforms ranging from laptops to high-performance clusters.\n\n\n[ODEINT-v2](http://headmyshoulder.github.io/odeint-v2/)\n\nOdeint is a modern C++ library for numerically solving Ordinary Differential Equations. It is developed in a generic way using Template Metaprogramming which leads to extraordinary high flexibility at top performance. The numerical algorithms are implemented independently of the underlying arithmetics. This results in an incredible applicability of the library, especially in non-standard environments. For example, odeint supports matrix types, arbitrary precision arithmetics and even can be easily run on CUDA GPUs.\n\nSeveral AI and Deep Learning libraries are being reengineered to enable the use of posits for both training and inference. They will be announced as they are released.\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal?ref=badge_large)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13F6:2B291E:17D0BE:5CEDFD:6AB920B5"},"text_sha256":"8ad2c214a53825f34a583f7226678a9f836470a341240783ed73c6b13756348e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/tensorflow","input_row":{"repository":"tensorflow/tensorflow","url":"https://github.com/tensorflow/tensorflow","name":"tensorflow","owner":"tensorflow","description":"An Open Source Machine Learning Framework for Everyone","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":200551,"issues":41813,"created_at":"2015-11-07T01:19:20Z","updated_at":"2026-09-27T14:07:46Z","first_commit_at":"2015-11-07T00:27:58Z","last_commit_at":"2026-09-25T22:56:09Z","activity_months":130.62,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:28.005Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/tensorflow","visibility":"public","created_at":"2015-11-07T01:19:20Z","updated_at":"2026-09-27T14:16:02Z","private":false,"fork":false,"archived":false,"stargazers_count":200552,"open_issues_count":3366,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3404","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:1817656:1C35A0D:6AB92848"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3403","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B3:767EB:17D6BF6:1BF5904:6AB92848"},"commit":{"sha":"9532bbbf994df5de1fa6550f3cf9f4dc08fcd640","url":"https://github.com/tensorflow/tensorflow/commit/9532bbbf994df5de1fa6550f3cf9f4dc08fcd640","date":"2018-05-24T23:56:09Z","author_date":"2018-05-24T23:53:33Z","committer_date":"2018-05-24T23:56:09Z","tree_sha":"8fc557a0e618de844f088882fd3c29f622c06c13","message_first_line":"When converting a numpy float64 to an EagerTensor, always ensure that it"},"tree_request_status":200,"tree_rate":{"github_remaining":"3402","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0817:754BF:17B0693:1BCEE8F:6AB92848"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10750,"blob_sha":"e1a50c87e26d493ba3ac760f357905d89aa40dab","priority":0},{"path":"SECURITY.md","size":13320,"blob_sha":"a5ce3a62ee202f6e7d83f0fedc2777d9c88ba9b5","priority":1},{"path":"tensorflow/docs_src/community/security.md","size":315,"blob_sha":"8d13c7a1eaf336193b39ea3a9ee8e316a04fcb63","priority":1}],"documents":[{"path":"README.md","size":10750,"blob_sha":"e1a50c87e26d493ba3ac760f357905d89aa40dab","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://www.tensorflow.org/images/tf_logo_transp.png\"><br><br>\n<\/div>\n\n-----------------\n\n\n| **`Documentation`** | **`Linux CPU`** | **`Linux GPU`** | **`Mac OS CPU`** | **`Windows CPU`** | **`Android`** |\n|-----------------|---------------------|------------------|-------------------|---------------|---------------|\n| [![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://www.tensorflow.org/api_docs/) | ![Build Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-cc.png) | ![Build Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-gpu-cc.png) | ![Build Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/macos-py2-cc.png) | [![Build Status](https://ci.tensorflow.org/buildStatus/icon?job=tensorflow-master-win-cmake-py)](https://ci.tensorflow.org/job/tensorflow-master-win-cmake-py) | [![Build Status](https://ci.tensorflow.org/buildStatus/icon?job=tensorflow-master-android)](https://ci.tensorflow.org/job/tensorflow-master-android) [ ![Download](https://api.bintray.com/packages/google/tensorflow/tensorflow/images/download.svg) ](https://bintray.com/google/tensorflow/tensorflow/_latestVersion)\n\n**TensorFlow** is an open source software library for numerical computation using\ndata flow graphs.  The graph nodes represent mathematical operations, while\nthe graph edges represent the multidimensional data arrays (tensors) that flow\nbetween them.  This flexible architecture enables you to deploy computation to one\nor more CPUs or GPUs in a desktop, server, or mobile device without rewriting\ncode.  TensorFlow also includes [TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard), a data visualization toolkit.\n\nTensorFlow was originally developed by researchers and engineers\nworking on the Google Brain team within Google's Machine Intelligence Research\norganization for the purposes of conducting machine learning and deep neural\nnetworks research.  The system is general enough to be applicable in a wide\nvariety of other domains, as well.\n\nKeep up to date with release announcements and security updates by\nsubscribing to\n[announce@tensorflow.org](https://groups.google.com/a/tensorflow.org/forum/#!forum/announce).\n\n## Installation\n*See [Installing TensorFlow](https://www.tensorflow.org/get_started/os_setup.html) for instructions on how to install our release binaries or how to build from source.*\n\nPeople who are a little more adventurous can also try our nightly binaries:\n\n**Nightly pip packages**\n* We are pleased to announce that TensorFlow now offers nightly pip packages\nunder the [tf-nightly](https://pypi.python.org/pypi/tf-nightly) and\n[tf-nightly-gpu](https://pypi.python.org/pypi/tf-nightly-gpu) project on pypi.\nSimply run `pip install tf-nightly` or `pip install tf-nightly-gpu` in a clean\nenvironment to install the nightly TensorFlow build. We support CPU and GPU\npackages on Linux, Mac, and Windows.\n\n\n**Individual whl files**\n* Linux CPU-only: [Python 2](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/)) / [Python 3.4](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/)) / [Python 3.5](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=cpu-slave/)) / [Python 3.6](http://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.6,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-cp36-cp36m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.6,label=cpu-slave/))\n* Linux GPU: [Python 2](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/42/artifact/pip_test/whl/tf_nightly_gpu-1.head-cp27-none-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/)) / [Python 3.4](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly_gpu-1.head-cp34-cp34m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=gpu-linux/)) / [Python 3.5](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly_gpu-1.head-cp35-cp35m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=gpu-linux/)) / [Python 3.6](http://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.6,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly_gpu-1.head-cp36-cp36m-linux_x86_64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.6,label=gpu-linux/))\n* Mac CPU-only: [Python 2](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-mac/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-py2-none-any.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-mac/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=mac-slave/)) / [Python 3](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-mac/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-py3-none-any.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-mac/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=mac-slave/))\n* Windows CPU-only: [Python 3.5 64-bit](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows,PY=35/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tf_nightly-1.head-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows,PY=35/)) / [Python 3.6 64-bit](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows,PY=36/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tf_nightly-1.head-cp36-cp36m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows,PY=36/))\n* Windows GPU: [Python 3.5 64-bit](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows-gpu,PY=35/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tf_nightly_gpu-1.head-cp35-cp35m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows-gpu,PY=35/)) / [Python 3.6 64-bit](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows-gpu,PY=36/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tf_nightly_gpu-1.head-cp36-cp36m-win_amd64.whl) ([build history](https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-windows/M=windows-gpu,PY=36/))\n* Android: [demo APK](https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/tensorflow_demo.apk), [native libs](https://ci.tensorflow.org/view/Nightly/job/nightly-android/lastSuccessfulBuild/artifact/out/native/)\n([build history](https://ci.tensorflow.org/view/Nightly/job/nightly-android/))\n\n#### *Try your first TensorFlow program*\n```shell\n$ python\n```\n```python\n>>> import tensorflow as tf\n>>> hello = tf.constant('Hello, TensorFlow!')\n>>> sess = tf.Session()\n>>> sess.run(hello)\n'Hello, TensorFlow!'\n>>> a = tf.constant(10)\n>>> b = tf.constant(32)\n>>> sess.run(a + b)\n42\n>>> sess.close()\n```\n\n## Contribution guidelines\n\n**If you want to contribute to TensorFlow, be sure to review the [contribution\nguidelines](CONTRIBUTING.md). This project adheres to TensorFlow's\n[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to\nuphold this code.**\n\n**We use [GitHub issues](https://github.com/tensorflow/tensorflow/issues) for\ntracking requests and bugs. So please see\n[TensorFlow Discuss](https://groups.google.com/a/tensorflow.org/forum/#!forum/discuss) for general questions\nand discussion, and please direct specific questions to [Stack Overflow](https://stackoverflow.com/questions/tagged/tensorflow).**\n\nThe TensorFlow project strives to abide by generally accepted best practices in open-source software development:\n\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1486/badge)](https://bestpractices.coreinfrastructure.org/projects/1486)\n\n## For more information\n\n* [TensorFlow Website](https://www.tensorflow.org)\n* [TensorFlow White Papers](https://www.tensorflow.org/about/bib)\n* [TensorFlow YouTube Channel](https://www.youtube.com/channel/UC0rqucBdTuFTjJiefW5t-IQ)\n* [TensorFlow Model Zoo](https://github.com/tensorflow/models)\n* [TensorFlow MOOC on Udacity](https://www.udacity.com/course/deep-learning--ud730)\n* [TensorFlow Course at Stanford](https://web.stanford.edu/class/cs20si)\n\nLearn more about the TensorFlow community at the [community page of tensorflow.org](https://www.tensorflow.org/community) for a few ways to participate.\n\n## License\n\n[Apache License 2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AEE6:09BF:AB2C2:2C73CA:6AB920B7"},"text_sha256":"f4d8da429f824c7f39c72a985adcc8b3e975b3bee3d2f0b95ea4ffe6a76612e4"},{"path":"SECURITY.md","size":13320,"blob_sha":"a5ce3a62ee202f6e7d83f0fedc2777d9c88ba9b5","priority":1,"status":200,"text":"# Using TensorFlow Securely\n\nThis document discusses how to safely deal with untrusted programs (models or\nmodel parameters), and input data. Below, we also provide guidelines on how to\nreport vulnerabilities in TensorFlow.\n\n## TensorFlow models are programs\n\nTensorFlow's runtime system interprets and executes programs. What machine\nlearning practitioners term\n[**models**](https://developers.google.com/machine-learning/glossary/#model) are\nexpressed as programs that TensorFlow executes.  TensorFlow programs are encoded\nas computation\n[**graphs**](https://developers.google.com/machine-learning/glossary/#graph).\nThe model's parameters are often stored separately in **checkpoints**.\n\nAt runtime, TensorFlow executes the computation graph using the parameters\nprovided. Note that the behavior of the computation graph may change\ndepending on the parameters provided. TensorFlow itself is not a sandbox. When\nexecuting the computation graph, TensorFlow may read and write files, send and\nreceive data over the network, and even spawn additional processes. All these\ntasks are performed with the permissions of the TensorFlow process. Allowing\nfor this flexibility makes for a powerful machine learning platform,\nbut it has implications for security.\n\nThe computation graph may also accept **inputs**. Those inputs are the\ndata you supply to TensorFlow to train a model, or to use a model to run\ninference on the data.\n\n**TensorFlow models are programs, and need to be treated as such from a security\nperspective.**\n\n## Running untrusted models\n\nAs a general rule: **Always** execute untrusted models inside a sandbox (e.g.,\n[nsjail](https://github.com/google/nsjail)).\n\nThere are several ways in which a model could become untrusted. Obviously, if an\nuntrusted party supplies TensorFlow kernels, arbitrary code may be executed.\nThe same is true if the untrusted party provides Python code, such as the\nPython code that generates TensorFlow graphs.\n\nEven if the untrusted party only supplies the serialized computation\ngraph (in form of a `GraphDef`, `SavedModel`, or equivalent on-disk format), the\nset of computation primitives available to TensorFlow is powerful enough that\nyou should assume that the TensorFlow process effectively executes arbitrary\ncode. One common solution is to whitelist only a few safe Ops. While this is\npossible in theory, we still recommend you sandbox the execution.\n\nIt depends on the computation graph whether a user provided checkpoint is safe.\nIt is easily possible to create computation graphs in which malicious\ncheckpoints can trigger unsafe behavior. For example, consider a graph that\ncontains a `tf.cond` depending on the value of a `tf.Variable`. One branch of\nthe `tf.cond` is harmless, but the other is unsafe. Since the `tf.Variable` is\nstored in the checkpoint, whoever provides the checkpoint now has the ability to\ntrigger unsafe behavior, even though the graph is not under their control.\n\nIn other words, graphs can contain vulnerabilities of their own. To allow users\nto provide checkpoints to a model you run on their behalf (e.g., in order to\ncompare model quality for a fixed model architecture), you must carefully audit\nyour model, and we recommend you run the TensorFlow process in a sandbox.\n\n## Accepting untrusted Inputs\n\nIt is possible to write models that are secure in a sense that they can safely\nprocess untrusted inputs assuming there are no bugs. There are two main reasons\nto not rely on this: first, it is easy to write models which must not be exposed\nto untrusted inputs, and second, there are bugs in any software system of\nsufficient complexity. Letting users control inputs could allow them to trigger\nbugs either in TensorFlow or in dependent libraries.\n\nIn general, it is good practice to isolate parts of any system which is exposed\nto untrusted (e.g., user-provided) inputs in a sandbox.\n\nA useful analogy to how any TensorFlow graph is executed is any interpreted\nprogramming language, such as Python. While it is possible to write secure\nPython code which can be exposed to user supplied inputs (by, e.g., carefully\nquoting and sanitizing input strings, size-checking input blobs, etc.), it is\nvery easy to write Python programs which are insecure. Even secure Python code\ncould be rendered insecure by a bug in the Python interpreter, or in a bug in a\nPython library used (e.g.,\n[this one](https://www.cvedetails.com/cve/CVE-2017-12852/)).\n\n## Running a TensorFlow server\n\nTensorFlow is a platform for distributed computing, and as such there is a\nTensorFlow server (`tf.train.Server`). **The TensorFlow server is meant for\ninternal communication only. It is not built for use in an untrusted network.**\n\nFor performance reasons, the default TensorFlow server does not include any\nauthorization protocol and sends messages unencrypted. It accepts connections\nfrom anywhere, and executes the graphs it is sent without performing any checks.\nTherefore, if you run a `tf.train.Server` in your network, anybody with\naccess to the network can execute what you should consider arbitrary code with\nthe privileges of the process running the `tf.train.Server`.\n\nWhen running distributed TensorFlow, you must isolate the network in which the\ncluster lives. Cloud providers provide instructions for setting up isolated\nnetworks, which are sometimes branded as \"virtual private cloud.\" Refer to the\ninstructions for\n[GCP](https://cloud.google.com/compute/docs/networks-and-firewalls) and\n[AWS](https://aws.amazon.com/vpc/)) for details.\n\nNote that `tf.train.Server` is different from the server created by\n`tensorflow/serving` (the default binary for which is called `ModelServer`).\nBy default, `ModelServer` also has no built-in mechanism for authentication.\nConnecting it to an untrusted network allows anyone on this network to run the\ngraphs known to the `ModelServer`. This means that an attacker may run\ngraphs using untrusted inputs as described above, but they would not be able to\nexecute arbitrary graphs. It is possible to safely expose a `ModelServer`\ndirectly to an untrusted network, **but only if the graphs it is configured to\nuse have been carefully audited to be safe**.\n\nSimilar to best practices for other servers, we recommend running any\n`ModelServer` with appropriate privileges (i.e., using a separate user with\nreduced permissions). In the spirit of defense in depth, we recommend\nauthenticating requests to any TensorFlow server connected to an untrusted\nnetwork, as well as sandboxing the server to minimize the adverse effects of\nany breach.\n\n## Vulnerabilities in TensorFlow\n\nTensorFlow is a large and complex system. It also depends on a large set of\nthird party libraries (e.g., `numpy`, `libjpeg-turbo`, PNG parsers, `protobuf`).\nIt is possible that TensorFlow or its dependent libraries contain\nvulnerabilities that would allow triggering unexpected or dangerous behavior\nwith specially crafted inputs.\n\n### What is a vulnerability?\n\nGiven TensorFlow's flexibility, it is possible to specify computation graphs\nwhich exhibit unexpected or unwanted behavior. The fact that TensorFlow models\ncan perform arbitrary computations means that they may read and write files,\ncommunicate via the network, produce deadlocks and infinite loops, or run out\nof memory. It is only when these behaviors are outside the specifications of the\noperations involved that such behavior is a vulnerability.\n\nA `FileWriter` writing a file is not unexpected behavior and therefore is not a\nvulnerability in TensorFlow. A `MatMul` allowing arbitrary binary code execution\n**is** a vulnerability.\n\nThis is more subtle from a system perspective. For example, it is easy to cause\na TensorFlow process to try to allocate more memory than available by specifying\na computation graph containing an ill-considered `tf.tile` operation. TensorFlow\nshould exit cleanly in this case (it would raise an exception in Python, or\nreturn an error `Status` in C++). However, if the surrounding system is not\nexpecting the possibility, such behavior could be used in a denial of service\nattack (or worse). Because TensorFlow behaves correctly, this is not a\nvulnerability in TensorFlow (although it would be a vulnerability of this\nhypothetical system).\n\nAs a general rule, it is incorrect behavior for Tensorflow to access memory it\ndoes not own, or to terminate in an unclean way. Bugs in TensorFlow that lead to\nsuch behaviors constitute a vulnerability.\n\nOne of the most critical parts of any system is input handling. If malicious\ninput can trigger side effects or incorrect behavior, this is a bug, and likely\na vulnerability.\n\n### Reporting vulnerabilities\n\nPlease email reports about any security related issues you find to\n`security@tensorflow.org`. This mail is delivered to a small security team. Your\nemail will be acknowledged within one business day, and you'll receive a more\ndetailed response to your email within 7 days indicating the next steps in\nhandling your report. For critical problems, you may encrypt your report (see\nbelow).\n\nPlease use a descriptive subject line for your report email. After the initial\nreply to your report, the security team will endeavor to keep you informed of\nthe progress being made towards a fix and announcement. \n\nIn addition, please include the following information along with your report:\n\n* Your name and affiliation (if any).\n* A description the technical details of the vulnerabilities. It is very\n  important to let us know how we can reproduce your findings.\n* An explanation who can exploit this vulnerability, and what they gain when\n  doing so -- write an attack scenario. This will help us evaluate your report\n  quickly, especially if the issue is complex.\n* Whether this vulnerability public or known to third parties. If it is, please\n  provide details.\n\nIf you believe that an existing (public) issue is security-related, please send\nan email to `security@tensorflow.org`. The email should include the issue ID and\na short description of why it should be handled according to this security\npolicy.\n\nOnce an issue is reported, TensorFlow uses the following disclosure process:\n\n* When a report is received, we confirm the issue and determine its severity.\n* If we know of specific third-party services or software based on TensorFlow\n  that require mitigation before publication, those projects will be notified.\n* An advisory is prepared (but not published) which details the problem and\n  steps for mitigation.\n* Wherever possible, fixes are prepared for the last minor release of the two\n  latest major releases, as well as the master branch. We will attempt to\n  commit these fixes as soon as possible, and as close together as\n  possible.\n* Patch releases are published for all fixed released versions, a\n  notification is sent to discuss@tensorflow.org, and the advisory is published.\n\nPast security advisories are listed below. We credit reporters for identifying\nsecurity issues, although we keep your name confidential if you request it.\n\n#### Encryption key for `security@tensorflow.org`\n\nIf your disclosure is extremely sensitive, you may choose to encrypt your\nreport using the key below. Please only use this for critical security\nreports.\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQENBFpqdzwBCADTeAHLNEe9Vm77AxhmGP+CdjlY84O6DouOCDSq00zFYdIU/7aI\nLjYwhEmDEvLnRCYeFGdIHVtW9YrVktqYE9HXVQC7nULU6U6cvkQbwHCdrjaDaylP\naJUXkNrrxibhx9YYdy465CfusAaZ0aM+T9DpcZg98SmsSml/HAiiY4mbg/yNVdPs\nSEp/Ui4zdIBNNs6at2gGZrd4qWhdM0MqGJlehqdeUKRICE/mdedXwsWLM8AfEA0e\nOeTVhZ+EtYCypiF4fVl/NsqJ/zhBJpCx/1FBI1Uf/lu2TE4eOS1FgmIqb2j4T+jY\ne+4C8kGB405PAC0n50YpOrOs6k7fiQDjYmbNABEBAAG0LVRlbnNvckZsb3cgU2Vj\ndXJpdHkgPHNlY3VyaXR5QHRlbnNvcmZsb3cub3JnPokBTgQTAQgAOBYhBEkvXzHm\ngOJBnwP4Wxnef3wVoM2yBQJaanc8AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA\nAAoJEBnef3wVoM2yNlkIAICqetv33MD9W6mPAXH3eon+KJoeHQHYOuwWfYkUF6CC\no+X2dlPqBSqMG3bFuTrrcwjr9w1V8HkNuzzOJvCm1CJVKaxMzPuXhBq5+DeT67+a\nT/wK1L2R1bF0gs7Pp40W3np8iAFEh8sgqtxXvLGJLGDZ1Lnfdprg3HciqaVAiTum\nHBFwszszZZ1wAnKJs5KVteFN7GSSng3qBcj0E0ql2nPGEqCVh+6RG/TU5C8gEsEf\n3DX768M4okmFDKTzLNBm+l08kkBFt+P43rNK8dyC4PXk7yJa93SmS/dlK6DZ16Yw\n2FS1StiZSVqygTW59rM5XNwdhKVXy2mf/RtNSr84gSi5AQ0EWmp3PAEIALInfBLR\nN6fAUGPFj+K3za3PeD0fWDijlC9f4Ety/icwWPkOBdYVBn0atzI21thPRbfuUxfe\nzr76xNNrtRRlbDSAChA1J5T86EflowcQor8dNC6fS+oHFCGeUjfEAm16P6mGTo0p\nosdG2XnnTHOOEFbEUeWOwR/zT0QRaGGknoy2pc4doWcJptqJIdTl1K8xyBieik/b\nnSoClqQdZJa4XA3H9G+F4NmoZGEguC5GGb2P9NHYAJ3MLHBHywZip8g9oojIwda+\nOCLL4UPEZ89cl0EyhXM0nIAmGn3Chdjfu3ebF0SeuToGN8E1goUs3qSE77ZdzIsR\nBzZSDFrgmZH+uP0AEQEAAYkBNgQYAQgAIBYhBEkvXzHmgOJBnwP4Wxnef3wVoM2y\nBQJaanc8AhsMAAoJEBnef3wVoM2yX4wIALcYZbQhSEzCsTl56UHofze6C3QuFQIH\nJ4MIKrkTfwiHlCujv7GASGU2Vtis5YEyOoMidUVLlwnebE388MmaJYRm0fhYq6lP\nA3vnOCcczy1tbo846bRdv012zdUA+wY+mOITdOoUjAhYulUR0kiA2UdLSfYzbWwy\n7Obq96Jb/cPRxk8jKUu2rqC/KDrkFDtAtjdIHh6nbbQhFuaRuWntISZgpIJxd8Bt\nGwi0imUVd9m9wZGuTbDGi6YTNk0GPpX5OMF5hjtM/objzTihSw9UN+65Y/oSQM81\nv//Fw6ZeY+HmRDFdirjD7wXtIuER4vqCryIqR6Xe9X8oJXz9L/Jhslc=\n=CDME\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n### Known vulnerabilities\n\n| Type               | Versions affected | Reported by           | Additional Information      |\n|--------------------|:-----------------:|-----------------------|-----------------------------|\n| Out Of Bounds Read |             <=1.4 | Blade Team of Tencent | [issue report](https://github.com/tensorflow/tensorflow/issues/14959) |\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2AAC:09ED:DF89B:3DCF69:6AB920BA"},"text_sha256":"9ff74b8b93e6cba2af3ed5241174cda5c631767c59b38f52dd210502da2c1ce2"},{"path":"tensorflow/docs_src/community/security.md","size":315,"blob_sha":"8d13c7a1eaf336193b39ea3a9ee8e316a04fcb63","priority":1,"status":200,"text":"# Using TensorFlow Securely\n\nBefore using TensorFlow, please take a look at our security model, list of\nrecent security announcements, and ways you can report security issues to the\nTensorFlow team at the\n[https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md](Using\nTensorFlow Securely) page on GitHub.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3EFC:1F1FB6:176CF0:5C8996:6AB920B0"},"text_sha256":"8653c266734365084e963b26b7676a51601ce5e5dff9b986f28a304848556843"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3401","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17A29F9:1BC0FCD:6AB9284B"},"commit":{"sha":"7bcebf77a9b42f0bbfeb111015a2a76881bf050c","url":"https://github.com/tensorflow/tensorflow/commit/7bcebf77a9b42f0bbfeb111015a2a76881bf050c","date":"2026-06-30T23:28:43Z","author_date":"2026-06-30T23:24:50Z","committer_date":"2026-06-30T23:28:43Z","tree_sha":"0c955549f4d9496750d8f9a109343ce4b681d827","message_first_line":"Fix unverified FlatBuffer parsing in strip_buffers."},"tree_request_status":200,"tree_rate":{"github_remaining":"3400","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17A3CEC:1BC2633:6AB9284C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9790,"blob_sha":"24ce6ff362b00e77474edcbf67b49689889765c2","priority":0},{"path":"SECURITY.md","size":9376,"blob_sha":"4d52d02cb53d17ecbd16a0e6ce3cae5e6e7331ca","priority":1},{"path":"tensorflow/compiler/mlir/tosa/g3doc/legalization.md","size":110628,"blob_sha":"3ec852d36d3b41425abb511261d703878c809e2d","priority":1}],"documents":[{"path":"README.md","size":9790,"blob_sha":"24ce6ff362b00e77474edcbf67b49689889765c2","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://www.tensorflow.org/images/tf_logo_horizontal.png\">\n<\/div>\n\n[![Python](https://img.shields.io/pypi/pyversions/tensorflow.svg)](https://badge.fury.io/py/tensorflow)\n[![PyPI](https://badge.fury.io/py/tensorflow.svg)](https://badge.fury.io/py/tensorflow)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4724125.svg)](https://doi.org/10.5281/zenodo.4724125)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1486/badge)](https://bestpractices.coreinfrastructure.org/projects/1486)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/tensorflow/tensorflow/badge)](https://securityscorecards.dev/viewer/?uri=github.com/tensorflow/tensorflow)\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/tensorflow.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:tensorflow)\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/tensorflow-py.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:tensorflow-py)\n[![OSSRank](https://shields.io/endpoint?url=https://ossrank.com/shield/44)](https://ossrank.com/p/44)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n**`Documentation`** |\n------------------- |\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://www.tensorflow.org/api_docs/) |\n\n[TensorFlow](https://www.tensorflow.org/) is an end-to-end open source platform\nfor machine learning. It has a comprehensive, flexible ecosystem of\n[tools](https://www.tensorflow.org/resources/tools),\n[libraries](https://www.tensorflow.org/resources/libraries-extensions), and\n[community](https://www.tensorflow.org/community) resources that lets\nresearchers push the state-of-the-art in ML and developers easily build and\ndeploy ML-powered applications.\n\nTensorFlow was originally developed by researchers and engineers working within\nthe Machine Intelligence team at Google Brain to conduct research in machine\nlearning and neural networks. However, the framework is versatile enough to be\nused in other areas as well.\n\nTensorFlow provides stable [Python](https://www.tensorflow.org/api_docs/python)\nand [C++](https://www.tensorflow.org/api_docs/cc) APIs, as well as a\nnon-guaranteed backward compatible API for\n[other languages](https://www.tensorflow.org/api_docs).\n\nKeep up-to-date with release announcements and security updates by subscribing\nto\n[announce@tensorflow.org](https://groups.google.com/a/tensorflow.org/forum/#!forum/announce).\nSee all the [mailing lists](https://www.tensorflow.org/community/forums).\n\n## Install\n\nSee the [TensorFlow install guide](https://www.tensorflow.org/install) for the\n[pip package](https://www.tensorflow.org/install/pip), to\n[enable GPU support](https://www.tensorflow.org/install/gpu), use a\n[Docker container](https://www.tensorflow.org/install/docker), and\n[build from source](https://www.tensorflow.org/install/source).\n\nTo install the current release, which includes support for\n[CUDA-enabled GPU cards](https://www.tensorflow.org/install/gpu) *(Ubuntu and\nWindows)*:\n\n```\n pip install tensorflow\n```\n\nOther devices (DirectX and MacOS-metal) are supported using\n[Device Plugins](https://www.tensorflow.org/install/gpu_plugins#available_devices).\n\nA smaller CPU-only TensorFlow package is also available:\n\n```\n pip install tensorflow-cpu\n```\n\nTo update TensorFlow to the latest version, add the `--upgrade` flag to the\ncommands above.\n\n*Nightly binaries are available for testing using the\n[tf-nightly](https://pypi.python.org/pypi/tf-nightly) and\n[tf-nightly-cpu](https://pypi.python.org/pypi/tf-nightly-cpu) packages on PyPI.*\n\n#### *Try your first TensorFlow program*\n\n```shell\n$ python\n```\n\n```python\n>>> import tensorflow as tf\n>>> tf.add(1, 2).numpy()\n3\n>>> hello = tf.constant('Hello, TensorFlow!')\n>>> hello.numpy()\nb'Hello, TensorFlow!'\n```\n\nFor more examples, see the\n[TensorFlow Tutorials](https://www.tensorflow.org/tutorials/).\n\n## Contribution guidelines\n\n**If you want to contribute to TensorFlow, be sure to review the\n[Contribution Guidelines](CONTRIBUTING.md). This project adheres to TensorFlow's\n[Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to\nuphold this code.**\n\n**We use [GitHub Issues](https://github.com/tensorflow/tensorflow/issues) for\ntracking requests and bugs, please see\n[TensorFlow Forum](https://discuss.tensorflow.org/) for general questions and\ndiscussion, and please direct specific questions to\n[Stack Overflow](https://stackoverflow.com/questions/tagged/tensorflow).**\n\nThe TensorFlow project strives to abide by generally accepted best practices in\nopen-source software development.\n\n## Patching guidelines\n\nFollow these steps to patch a specific version of TensorFlow, for example, to\napply fixes to bugs or security vulnerabilities:\n\n*   Clone the TensorFlow repository and switch to the appropriate branch for\n    your desired version—for example, `r2.8` for version 2.8.\n*   Apply the desired changes (i.e., cherry-pick them) and resolve any code\n    conflicts.\n*   Run TensorFlow tests and ensure they pass.\n*   [Build](https://www.tensorflow.org/install/source) the TensorFlow pip\n    package from source.\n\n## Continuous build status\n\nYou can find more community-supported platforms and configurations in the\n[TensorFlow SIG Build Community Builds Table](https://github.com/tensorflow/build#community-supported-tensorflow-builds).\n\n### Official Builds\n\nBuild Type                    | Status                                                                                                                                                                           | Artifacts\n----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------\n**Linux CPU**                 | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-cc.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-cc.html)           | [PyPI](https://pypi.org/project/tf-nightly/)\n**Linux GPU**                 | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-gpu-py3.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-gpu-py3.html) | [PyPI](https://pypi.org/project/tf-nightly-gpu/)\n**Linux XLA**                 | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-xla.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/ubuntu-xla.html)         | TBA\n**macOS**                     | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/macos-py2-cc.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/macos-py2-cc.html)     | [PyPI](https://pypi.org/project/tf-nightly/)\n**Windows CPU**               | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/windows-cpu.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/windows-cpu.html)       | [PyPI](https://pypi.org/project/tf-nightly/)\n**Windows GPU**               | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/windows-gpu.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/windows-gpu.html)       | [PyPI](https://pypi.org/project/tf-nightly-gpu/)\n**Android**                   | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/android.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/android.html)               | [Download](https://bintray.com/google/tensorflow/tensorflow/_latestVersion)\n**Raspberry Pi 0 and 1**      | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/rpi01-py3.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/rpi01-py3.html)           | [Py3](https://storage.googleapis.com/tensorflow-nightly/tensorflow-1.10.0-cp34-none-linux_armv6l.whl)\n**Raspberry Pi 2 and 3**      | [![Status](https://storage.googleapis.com/tensorflow-kokoro-build-badges/rpi23-py3.svg)](https://storage.googleapis.com/tensorflow-kokoro-build-badges/rpi23-py3.html)           | [Py3](https://storage.googleapis.com/tensorflow-nightly/tensorflow-1.10.0-cp34-none-linux_armv7l.whl)\n\n## Resources\n\n*   [TensorFlow.org](https://www.tensorflow.org)\n*   [TensorFlow Tutorials](https://www.tensorflow.org/tutorials/)\n*   [TensorFlow Official Models](https://github.com/tensorflow/models/tree/master/official)\n*   [TensorFlow Examples](https://github.com/tensorflow/examples)\n*   [TensorFlow Codelabs](https://codelabs.developers.google.com/?cat=TensorFlow)\n*   [TensorFlow Blog](https://blog.tensorflow.org)\n*   [Learn ML with TensorFlow](https://www.tensorflow.org/resources/learn-ml)\n*   [TensorFlow Twitter](https://twitter.com/tensorflow)\n*   [TensorFlow YouTube](https://www.youtube.com/channel/UC0rqucBdTuFTjJiefW5t-IQ)\n*   [TensorFlow model optimization roadmap](https://www.tensorflow.org/model_optimization/guide/roadmap)\n*   [TensorFlow White Papers](https://www.tensorflow.org/about/bib)\n*   [TensorBoard Visualization Toolkit](https://github.com/tensorflow/tensorboard)\n*   [TensorFlow Code Search](https://cs.opensource.google/tensorflow/tensorflow)\n\nLearn more about the\n[TensorFlow Community](https://www.tensorflow.org/community) and how to\n[Contribute](https://www.tensorflow.org/community/contribute).\n\n## Courses\n\n* [Coursera](https://www.coursera.org/search?query=TensorFlow)\n* [Udacity](https://www.udacity.com/courses/all?search=TensorFlow)\n* [Edx](https://www.edx.org/search?q=TensorFlow)\n\n## License\n\n[Apache License 2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E22A:349C76:1710DB:5C2AEA:6AB920BF"},"text_sha256":"cd490686cd4ad6355aff49d75431f2cc00a101c61f60c3065b7c88cab7f557a4"},{"path":"SECURITY.md","size":9376,"blob_sha":"4d52d02cb53d17ecbd16a0e6ce3cae5e6e7331ca","priority":1,"status":200,"text":"# Using TensorFlow Securely\n\nThis document discusses the TensorFlow security model. It describes the security\nrisks to consider when using models, checkpoints or input data for training or\nserving. We also provide guidelines on what constitutes a vulnerability in\nTensorFlow and how to report them.\n\nThis document applies to other repositories in the TensorFlow organization,\ncovering security practices for the entirety of the TensorFlow ecosystem.\n\n## TensorFlow models are programs\n\nTensorFlow\n[**models**](https://developers.google.com/machine-learning/glossary/#model) (to\nuse a term commonly used by machine learning practitioners) are expressed as\nprograms that TensorFlow executes. TensorFlow programs are encoded as\ncomputation\n[**graphs**](https://developers.google.com/machine-learning/glossary/#graph).\nSince models are practically programs that TensorFlow executes, using untrusted\nmodels or graphs is equivalent to running untrusted code.\n\nIf you need to run untrusted models, execute them inside a\n[**sandbox**](https://developers.google.com/code-sandboxing). Memory corruptions\nin TensorFlow ops can be recognized as security issues only if they are\nreachable and exploitable through production-grade, benign models.\n\n### Saved graphs and checkpoints\n\nWhen loading untrusted serialized computation graphs (in form of a `GraphDef`,\n`SavedModel`, or equivalent on-disk format), the set of computation primitives\navailable to TensorFlow is powerful enough that you should assume that the\nTensorFlow process effectively executes arbitrary code.\n\nThe risk of loading untrusted checkpoints depends on the code or graph that you\nare working with. When loading untrusted checkpoints, the values of the traced\nvariables from your model are also going to be untrusted. That means that if\nyour code interacts with the filesystem, network, etc. and uses checkpointed\nvariables as part of those interactions (ex: using a string variable to build a\nfilesystem path), a maliciously created checkpoint might be able to change the\ntargets of those operations, which could result in arbitrary\nread/write/executions.\n\n### Running a TensorFlow server\n\nTensorFlow is a platform for distributed computing, and as such there is a\nTensorFlow server (`tf.train.Server`). The TensorFlow server is intended for\ninternal communication only. It is not built for use in untrusted environments\nor networks.\n\nFor performance reasons, the default TensorFlow server does not include any\nauthorization protocol and sends messages unencrypted. It accepts connections\nfrom anywhere, and executes the graphs it is sent without performing any checks.\nTherefore, if you run a `tf.train.Server` in your network, anybody with access\nto the network can execute arbitrary code with the privileges of the user\nrunning the `tf.train.Server`.\n\n## Untrusted inputs during training and prediction\n\nTensorFlow supports a wide range of input data formats. For example it can\nprocess images, audio, videos, and text. There are several modules specialized\nin taking those formats, modifying them, and/or converting them to intermediate\nformats that can be processed by TensorFlow.\n\nThese modifications and conversions are handled by a variety of libraries that\nhave different security properties and provide different levels of confidence\nwhen dealing with untrusted data. Based on the security history of these\nlibraries we consider that it is safe to work with untrusted inputs for PNG,\nBMP, GIF, WAV, RAW, RAW\\_PADDED, CSV and PROTO formats. All other input formats,\nincluding tensorflow-io should be sandboxed if used to process untrusted data.\n\nFor example, if an attacker were to upload a malicious video file, they could\npotentially exploit a vulnerability in the TensorFlow code that handles videos,\nwhich could allow them to execute arbitrary code on the system running\nTensorFlow.\n\nIt is important to keep TensorFlow up to date with the latest security patches\nand follow the sandboxing guideline above to protect against these types of\nvulnerabilities.\n\n## Security properties of execution modes\n\nTensorFlow has several execution modes, with Eager-mode being the default in v2.\nEager mode lets users write imperative-style statements that can be easily\ninspected and debugged and it is intended to be used during the development\nphase.\n\nAs part of the differences that make Eager mode easier to debug, the [shape\ninference\nfunctions](https://www.tensorflow.org/guide/create_op#define_the_op_interface)\nare skipped, and any checks implemented inside the shape inference code are not\nexecuted.\n\nThe security impact of skipping those checks should be low, since the attack\nscenario would require a malicious user to be able to control the model which as\nstated above is already equivalent to code execution. In any case, the\nrecommendation is not to serve models using Eager mode since it also has\nperformance limitations.\n\n## Multi-Tenant environments\n\nIt is possible to run multiple TensorFlow models in parallel. For example,\n`ModelServer` collates all computation graphs exposed to it (from multiple\n`SavedModel`) and executes them in parallel on available executors. Running\nTensorFlow in a multitenant design mixes the risks described above with the\ninherent ones from multitenant configurations. The primary areas of concern are\ntenant isolation, resource allocation, model sharing and hardware attacks.\n\n### Tenant isolation\n\nSince any tenants or users providing models, graphs or checkpoints can execute\ncode in context of the TensorFlow service, it is important to design isolation\nmechanisms that prevent unwanted access to the data from other tenants.\n\nNetwork isolation between different models is also important not only to prevent\nunauthorized access to data or models, but also to prevent malicious users or\ntenants sending graphs to execute under another tenant’s identity.\n\nThe isolation mechanisms are the responsibility of the users to design and\nimplement, and therefore security issues deriving from their absence are not\nconsidered a vulnerability in TensorFlow.\n\n### Resource allocation\n\nA denial of service caused by one model could bring down the entire server, but\nwe don't consider this as a vulnerability, given that models can exhaust\nresources in many different ways and solutions exist to prevent this from\nhappening (e.g., rate limits, ACLs, monitors to restart broken servers).\n\n### Model sharing\n\nIf the multitenant design allows sharing models, make sure that tenants and\nusers are aware of the security risks detailed here and that they are going to\nbe practically running code provided by other users. Currently there are no good\nways to detect malicious models/graphs/checkpoints, so the recommended way to\nmitigate the risk in this scenario is to sandbox the model execution.\n\n### Hardware attacks\n\nPhysical GPUs or TPUs can also be the target of attacks. [Published\nresearch](https://scholar.google.com/scholar?q=gpu+side+channel) shows that it\nmight be possible to use side channel attacks on the GPU to leak data from other\nrunning models or processes in the same system. GPUs can also have\nimplementation bugs that might allow attackers to leave malicious code running\nand leak or tamper with applications from other users. Please report\nvulnerabilities to the vendor of the affected hardware accelerator.\n\n## Reporting vulnerabilities\n\n### Vulnerabilities in TensorFlow\n\nThis document covers different use cases for TensorFlow together with comments\nwhether these uses were recommended or considered safe, or where we recommend\nsome form of isolation when dealing with untrusted data. As a result, this\ndocument also outlines what issues we consider as TensorFlow security\nvulnerabilities.\n\nWe recognize issues as vulnerabilities only when they occur in scenarios that we\noutline as safe; issues that have a security impact only when TensorFlow is used\nin a discouraged way (e.g. running untrusted models or checkpoints, data parsing\noutside of the safe formats, etc.) are not treated as vulnerabilities.\n\n### Reporting process\n\nPlease use [Google Bug Hunters reporting form](https://g.co/vulnz) to report\nsecurity vulnerabilities. Please include the following information along with\nyour report:\n\n  - A descriptive title\n  - Your name and affiliation (if any).\n  - A description of the technical details of the vulnerabilities.\n  - A minimal example of the vulnerability. It is very important to let us know\n    how we can reproduce your findings. For memory corruption triggerable in\n    TensorFlow models, please demonstrate an exploit against one of Alphabet's\n    models in <https://tfhub.dev/>\n  - An explanation of who can exploit this vulnerability, and what they gain\n    when doing so. Write an attack scenario that demonstrates how your issue\n    violates the use cases and security assumptions defined in the threat model.\n    This will help us evaluate your report quickly, especially if the issue is\n    complex.\n  - Whether this vulnerability is public or known to third parties. If it is,\n    please provide details.\n\nWe will try to fix the problems as soon as possible. Vulnerabilities will, in\ngeneral, be batched to be fixed at the same time as a quarterly release. We\ncredit reporters for identifying security issues, although we keep your name\nconfidential if you request it. Please see Google Bug Hunters program website\nfor more info.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A51A:3AC5A:178090:5C9E27:6AB920BF"},"text_sha256":"63b94ffc256f9d346223866393413d187b2ef2742bf0b64ac076fd59770a92e4"},{"path":"tensorflow/compiler/mlir/tosa/g3doc/legalization.md","size":110628,"blob_sha":"3ec852d36d3b41425abb511261d703878c809e2d","priority":1,"status":200,"text":"# TOSA Lowerings\n\n## Introduction\n\n### Overview\n\nThis document provides pseudo-code lowerings from TensorFlow and TensorFlow Lite\nMLIR Dialects (https://www.tensorflow.org/mlir/dialects) to the TOSA Dialect\n(https://mlir.llvm.org/docs/Dialects/TOSA/).\n\nThe documentation is a work-in-progress: sections with missing legalizations are\nin the process of being written.\n\n## Syntax\n\nThe pseudo-code syntax used in this document is described below.\n\n### Primitive Datatypes\n\nint8: signed 8-bit integer uint8: unsigned 8-bit integer int16: signed 16-bit\ninteger int32: signed 32-bit integer int64: signed 32-bit integer uint32:\nunsigned 32-bit integer float32: IEEE-754 32-bit floating point format float64:\nIEEE-754 64-bit floating point format bool: boolean\n\n### Value\n\nIn pseudo-code, symbol starting with \"%\" indicates it’s a value. A value is\nevaluated by an operator at run time, and operator can consume and can only\nconsume a list of values as operands. Note value’s tensor type is determined at\ncompile time. Only the evaluation happens at run time One can easily construct a\ndata flow subgraph by looking at the producer/consumer.\n\n### Tensor Type\n\nTensor type is an attribute determined by legalization at compile time,\ndescribing the shape and element data type. It’s noted as tensor&lt;shape,\ndtype&gt;, or shorthanded as tensor&lt;%t.type&gt;\n\n### Operator Prototype\n\nIn pseudocode an TOSA operator is prototyped as following format.\n\n%&lt;output\\_value&gt; = tosa.&lt;OPERATOR&gt;(%&lt;input\\_value&gt;)\n{&lt;attribute = …​}\n\n### Value Attributes\n\nFor the purposes of brevity and clarity in this document, the pseudocode allows\nthe following notation on value attribute.\n\nShorthand         | Description\n----------------- | ---------------------------------------------------\n`%t.shape`        | Shape vector for the tensor\n`%t.shape[i]`     | Size of dimension i for the tensor\n`%t.rank`         | Rank of the tensor\n`%t.dtype`        | Datatype of the tensor\n`%t.scale`        | Quantized scaling parameter (float64)\n`%t.zp`           | Quantized zero-point (int64)\n`%t.signed`       | Boolean indicating the type is signed\n`%t.num_bits`     | Number of bits in the datatype\n`%t.num_elements` | Number of elements in the tensor\n`%t.type`         | Tuple of `tensor<%t.shape, %t.dtype>`\n`%t.size`         | For tensor lists: the number of tensors in the list\n\n### Tensor Dimension Shorthand\n\nWhere the TOSA Specification allows the use of named dimensions, the following\nnames may be used.\n\nName | Description\n---- | --------------------\n`N`  | Batch dimension\n`H`  | Height dimension\n`W`  | Width dimension\n`C`  | Channel dimension\n`M`  | Depthwise multiplier\n\nEach of these may be prefixed with `I` for the input dimension or `O` for the\noutput dimension or `K` for kernel dimensions.\n\n## Common Legalization Functions\n\nThe following pseudocode helper functions are used to cannonicalize arguments\nfrom different frameworks to the TOSA dialect.\n\n### .as_constant(): Matched as Constant\n\nWherever %tensor.as_constant() is specified, a constant vector will be created\nto hold the value in the %tensor at compile time. This only succeeds if %tensor\nis fed by a constant type operator. If constant matching fails, the lowering\nwill fail and be terminated.\n\n## Common Legalization Functions\n\nThe following pseudo-code helper functions are used to cannonicalize arguments\nfrom different frameworks to the TOSA dialect.\n\n### get_padding_values_from_explicit_pad_attr()\n\n```\nvector<int64> get_padding_values_from_explicit_pad_attr(vector<int64> explicit_pad,\n                                                         tensorflow::TensorFormat data_format_tf)\n{\n    int64 pad_before, pad_after\n    vector<int64> computed_paddings\n\n    for (int32 i = 0; i < 2; i++) {\n        int64 dim = GetTensorSpatialDimIndex(4, data_format_tf, i)\n        pad_before = explicit_pad[dim * 2]\n        pad_after  = explicit_pad[dim * 2 + 1]\n        computed_paddings.push_back(pad_before)\n        computed_paddings.push_back(pad_after)\n    }\n\n    return computed_paddings\n}\n```\n\n### get_padding_values_from_pad_type()\n\nCalculate explicit padding array based on pad type\n\n```\nvector<int64> get_padding_values_from_pad_type(tensorflow::Padding padding, tensorflow::TensorFormat data_format,\n                                        uint32 first_filter_spatial_dim, type input_type, type filter_type\n                                        vector strides, vector dilations)\n{\n    assert(padding != tensorflow::Padding::EXPLICIT);\n\n    vector<int64> computed_padding;\n\n    // Padding over H and W dimensions\n    for (int32 i = 0; i < 2; i++) {\n        int32 ifm_dim = get_tensor_spatial_dim_index(4, data_format, i);\n\n        int32 filter_dim = first_filter_spatial_dim + i;\n\n        int32 dim_dilation = dilations[ifm_dim];\n        int32 dim_stride   = strides[ifm_dim];\n\n        int64 op_size, pad_before_tf, pad_after_tf;\n\n        tensorflow::GetWindowedOutputSizeVerbose(input_type.shape[ifm_dim], filter_type.shape[filter_dim],\n                                                   dim_dilation, dim_stride, padding,\n                                                   // Outputs\n                                                   &op_size, &pad_before_tf, &pad_after_tf);\n        computed_paddings.push_back(pad_before_tf);\n        computed_paddings.push_back(pad_after_tf);\n    }\n\n    return computed_paddings;\n}\n```\n\n### positive_axis()\n\n```\n// Cannonicalize scalar axis attributes to a scalar positive axis attribute\nint32 positive_axis(int32 axis, int32 rank)\n{\n   if (axis < 0)\n       axis += rank;\n\n   return axis;\n}\n```\n\n### compute_scale_32()\n\n```\nvoid compute_scale_32(float64 scale, int32& multiplier, int32& shift)\n{\n    /* Generates mantissa and shift values where mantissa is in [-1.0,-0.5] or\n    [0.5, 1.0] such that\n    multiplier = mantissa*2^shift */\n\n    const float64 mantissa = std::frexp(scale, &shift);\n    auto shifted_m = std::round(mantissa * (int64(1) << 31));\n\n    assert(shifted_m <= (int64(1) << 31)); // can't be greater that 1.0\n    if (shifted_m == (int64(1) << 31)) {\n        shifted_m /= 2;\n        shift++;\n    }\n    // TOSA expect right shift to be positive, and embed (1 << 31) into right\n    // shift bits\n    shift = (-shift) + 31;\n\n    assert(shifted_m <= std::numeric_limits<int32>::max());\n\n    multiplier = static_cast<int32>(shifted_m);\n\n}\n```\n\n### lower_batch_to_space_nd_op()\n\n```\nValue lower_batch_to_space_nd_op(Value %input, Value %block_shape, Value %crops, shape_t output_shape)\n{\n\n    vector <size_t> block_shape(%block_shape.rank)\n    vector std::pair<size_t, size_t> crops_arr\n\n    size_t remaining_shape_rank = %input.rank - %block.rank - 1\n    size_t crops_dim = %crops.shape[0]\n\n    for (int32 i = 0; i < crops_dim; i++) {\n        crops[i] = std::make_pair(%crops.as_constant()[i * crops_dim + 0],\n                                  %crops.as_constant()[i * crops_dim + 1])\n    }\n\n    // Step 1: Reshape input to\n    // [block_shape[0],\n    // ...\n    // [block_shape[M-1],\n    // [batch / prod(block_shape)]\n    // [input_shape[1],\n    // ...\n    // [input_shape[N-1]\n\n    vector <size_t> a1_shape(%block.rank + %input.rank)\n\n    for (int32 i = 0; i < %block.rank; i++) {\n        a1_shape[i] = %block.shape[i]\n    }\n\n    a1_shape[%block.rank] = %input.shape.[0] / %block.num_elements\n\n    for (int32 i = 1; i < %input.rank; i++) {\n        a1_shape[i + %block.rank] = %input.shape[i]\n    }\n\n    // Step 2. Permute to shape:\n    // [ batch / prod(block_shape) ],\n    // [ input_shape[1] ], [ block_shape[0] ]\n    //  ...\n    // [ input_shape[M] ], [ block_shape[M-1]\n    // + remaining_input_shapes input_shape[M+1 .. N-1]\n    vector <size_t> a2_perm(%block.rank + %input.rank)\n\n    a2_perm[0] = %block.rank\n    for (int32 i = 0; i < %block.rank; i++) {\n        a2_perm[1 + i * 2 + 0] = %block.rank + 1 + i\n        a2_perm[1 + i * 2 + 1] = i\n    }\n\n    // Step 3. Reshape to\n    // [ batch / prod(block_shape) ],\n    // [input_shape[1] * block_shape[0] ],\n    //    ..\n    // [input_shape[M * block_shape[M-1],\n    // + remaining input shapes [input_shape[M+1.. N-1]]\n    vector <size_t> a3_shape(%input.rank)\n\n    %a3_shape[0] = %input.shape[0] / %block.num_elements\n    for (int32 i = 0; i < %block.rank; i++) {\n        a3_shape[i + 1] = %input.shape[i + 1] * %block.shape[i]\n    }\n\n    for (int32 i = 0; remaining_block_shape; i++) {\n        a3_shape[1 + %block.rank + 1] = %input.shape[%block.rank + 1 + i]\n    }\n\n    // Step 4 Crop the start/end dimensions using slice\n    vector <size_t> a4_begin(%input.rank), a4_size(%input.rank)\n\n    for (int32 i = 0; i < %input.rank; i++) {\n        if (i == 0 || i > crop_dims) {\n           a4_begin[i] = 0\n           a4_size[i] = output_shape[i]\n        } else {\n          a4_begin[i] = %crops[i-1].first\n          a4_size[i] = crops[i - 1].first - crops[i - 1].second\n        }\n    }\n\n    %a1_reshape = tosa.RESHAPE(%input) {new_shape=a1_shape}\n    %a2_transpose = tosa.TRANSPOSE(%a1_reshape) {perms=a2_perm}\n    %a3_reshape = tosa.RESHAPE(%a2_transpose) {new_shape=a3_shape}\n    %output = tosa.SLICE(%a3_reshape) {begin=a4_begin, size=a4_size}\n\n    return %output\n}\n```\n\n### lower_concatv2_op()\n\n```\nValue lower_concatv2_op(Type output_type, Value %values, int32 axis)\n{\n    int32 tosa_axis = positive_axis(axis)\n\n    assert(%values.size >= 2)\n\n    // Convert scalar inputs to a tensor\n    if (%values:0.size == 0) {\n       for (int32 i = 0; i < %values.size; i++) {\n          %values:i = tosa.RESHAPE(%values:i) {new_shape=1}\n       }\n    }\n\n    for (int32 i=0; i < %values.size(); i++) {\n        %val = %values:i\n        if (%val.zp != output_type.zp || %val.scale != output_type.scale) {\n            float64 rescale_scale = %val.scale / output_type.scale\n            %values:i = tosa.RESCALE(%val) {scale=rescale_scale, input_zp=%values:0.zp, output_zp=output_type.zp}\n        }\n    }\n\n    %concat_op = tosa.CONCAT(%values:0, %values:1) {axis=tosa_axis}\n\n    for (int32 i = 2; i < %values.size; i++) {\n        %concat_op = tosa.CONCAT(%concat_op, %values:i) {axis=tosa_axis}\n    }\n\n    return %concat_op\n}\n```\n\n### lower_depth_to_space_op()\n\n```\nValue lower_depth_to_space_op(Value %input, size_t block_size[], Format_t data_format)\n{\n    assert(data_format == 'NHWC')\n\n    vector <size_t> a2_shape = {%input.shape[0],\n                                %input.shape[1],\n                                %input.shape[2],\n                                block_size[0],\n                                block_size[1],\n                                %input.shape[3] / (block_size[0] * block_size[1])}\n\n    vector <size_t> a4_shape = {%input.shape[0],\n                                %input.shape[1] * block_size[0],\n                                %input.shape[2] * block_size[1],\n                                %input.shape[3] / (block_size[0] * block_size[1])}\n\n    %a2_reshape = tosa.RESHAPE(%input) {new_shape=a2_shape}\n    %a3_transpose = tosa.TRANSPOSE(%a2_reshape) {perms={0, 1, 3, 2, 4, 5}}\n    %output = tosa.RESHAPE(%a3_transpose) {new_shape=a4_shape}\n\n    return %output\n}\n```\n\n### lower_elu_op()\n\n```\nValue lower_elu_op(Value %value)\n{\n    // elu(x) = x < 0 ? (exp(x) - 1) : x\n    // Create constants for 0/1 and reshape to match the rank\n    // of %value\n    %one_const = tosa.CONST() {value={1}}\n    %zero_const = tosa.CONST() {value={0}}\n\n    vector bcast_shape\n    for (int32 i = 0; i < %value.rank; i++) {\n        bcast_shape.push_back(1)\n    }\n\n    %one_reshape = tosa.RESHAPE(%one_const) {new_shape=bcast_shape}\n    %zero_reshape = tosa.RESHAPE(%zero_const) {new_shape=bcast_shape}\n\n    %exp_in = tosa.EXP(%value)\n    %sub = tosa.SUB(%exp_in, %one_reshape)\n    %ge  = tosa.GREATER_EQUAL(%value, %zero_reshape)\n    %output = tosa.SELECT(%ge, %value, %sub)\n    return %output\n}\n```\n\n### lower_expand_dims()\n\n```\nValue lower_expand_dims(Value %input, int32 axis)\n{\n    vector<size_t> reshape_dims\n\n    if (axis < 0 || axis >= %input.rank) {\n        // Insert at the end of the tensor\n        axis += %input.rank\n        for (int32 i = 0; i < input.rank; i++) {\n           reshape_dims.push_back(%input.shape[i])\n        }\n    } else {\n        for (int32 i= 0 ; i < %input.rank; i++) {\n            if (i == axis) {\n                reshape_dims.push_back(1)\n            }\n            reshape_dims.push_back(%input.shape[i])\n        }\n    }\n\n    %output = tosa.RESHAPE(%input) {new_shape=reshape_dims}\n    return %output\n}\n```\n\n### lower_fake_quant_op()\n\n```\nValue lower_fake_quant_op(Value %inputs, type output_type, float64 min, float64 max,\n                            int64 num_bits, bool narrow_range)\n{\n    assert(num_bits == 8 || num_bits == 16)\n\n    int64 qmax = (1L << (num_bits - 1)) - 1;\n    int64 qmin = -(1L << (num_bits - 1))\n\n    if (narrow_range) {\n       qmin = qmin + 1\n    }\n\n    float64 scale = (max - min) / float64(qmax - qmin)\n\n    int64 zeropoint = (int64)std::round((-min) / scale + float64(qmin))\n\n    %quantized = lower_quantize_op(%inputs.type, %inputs, 1.0 / scale, zeropoint)\n\n    %dequantized = lower_dequantize_op(output_type, %quantized_op, scale, zeropoint)\n\n    return %dequantized\n}\n```\n\n### lower_floor_div()\n\n```\nValue lower_floor_div(Value %lhs, Value %rhs)\n{\n    %recip = tosa.RECIPROCAL(%rhs)\n    %mul = tosa.MUL(%lhs, %recip)\n    %output = tosa.FLOOR(%mul)\n\n    return %output\n}\n```\n\n### lower_floor_mod()\n\n```\nValue lower_floor_mod(Value %lhs, Value %rhs)\n{\n    %recip = tosa.RECIPROCAL(%rhs)\n    %mul = tosa.MUL(%lhs, %recip)\n    %floor = tosa.FLOOR(%mul)\n    %output = tosa.SUB(%mul, %floor)\n    return %output\n}\n```\n\n### lower_quantize_op()\n\n```\nValue lower_quantize_op(Type output_type, Value %input, float64 scale, int64 zeropoint)\n{\n    %const_scale = tosa.CONST() {value={scale}}\n    %const_zp = tosa.CONST() {value={zeropoint}}\n    %op1_mul_in_scale = tosa.MUL(%input, %const_scale)\n    %op2_add_op1_zp = tosa.ADD(%op1_mul_in_scale, %const_zp)\n    %op3_cast_op2 = tosa.CAST(%op2_add_op1_zp) // f32->%output.dtype\n}\n```\n\n### lower_dequantize_op()\n\n```\nValue lower_dequantize_op(Value %input, float64 scale, int64 zeropoint)\n{\n    %const_scale = tosa.CONST() {value={scale}}\n    %const_zp = tosa.CONST() {value={(float64)zeropoint}}\n    %op1_cast_in = tosa.CAST(%input) // %input.dtype->f32\n    %op2_sub_op1_zp = tosa.SUB(%op1_cast_in, %const_zp)\n    %op3_mul_op2_scale = tosa.MUL(%op2_sub_op1_zp, %const_scale)\n}\n```\n\n### lower_log_softmax_op()\n\n```\nValue lower_log_softmax_op(Value %logits)\n{\n    %op1 = tosa.EXP(%logits)\n    %op2 = tosa.REDUCE_SUM(%op1) {axis=(%logits.rank-1)}\n    %op3 = tosa.RECIPROCAL(%op2)\n    %op4 = tosa.MUL(%op1, %op3)\n    %op5 = tosa.LOG(%op4)\n\n    return %op5\n}\n```\n\n### lower_pack_op()\n\n```\nValue lower_pack_op(Value %input[], size_t axis)\n{\n    size_t concat_axis = positive_axis(axis)\n\n    size_t input_tensor_rank = %input[0].rank\n\n    // Convert any rank 0 to rank 1 with reshape\n    if (input_tensor_rank == 0) {\n       for (int32 i = 0; i < %input.size; i++) {\n           %input[i] = tosa.RESHAPE(%input[i], {1})\n       }\n   }\n\n   vector<size_t> output_shape\n   for (int32 i = 0; i < input_tensor_rank; i++) {\n       output_shape.push_back(%input[0].shape[i]\n   }\n\n   output_shape[concat_axis] = output_shape[concat_axis] * %input.size\n\n   // First pair of tensors\n   %concat = tosa.CONCAT(%input[0], %input[1]) {axis=concat_axis}\n\n   // Remaining tensors\n   for (int32 i = 2; i < %input.size; i++) {\n      %concat = tosa.CONCAT(%concat, %input[i]) {axis=concat_axis}\n   }\n\n   if (input_tensor_rank == 0) {\n      // No reshape needed for rank 0, already done\n      %output = %concat\n   } else\n\n      %reshape = tosa.RESHAPE(%concat) {new_shape=output_shape}\n\n      if (concat_axis == input_tensor_rank) {\n         // Output shape is [A, B, C, .. n] in this case,\n         // need to reshape to [N, A, B, C, ..] with perm [1, 2, 3, .. 0]\n         concat_axis = 0\n\n         vector <size_t> perms\n         for (int32 i = 0; i < %input[0].rank; i++)\n            perms.push_back(i + 1)\n         perms.push_back(0)\n\n         %output = tosa.TRANSPOSE(%reshape) {perms=perms}\n     } else {\n         %output = %reshape\n     }\n\n     return %output\n}\n```\n\n### lower_reduce_op()\n\n```\nValue lower_reduce_op<tosa_op_t OP>(Value %input, shape_t output_shape, Value %axes, bool keep_dims, float64 input_scale=1.0f, int32 input_zp=0, float64 output_scale=1.0f, int32 output_zp=0)\n{\n\n    vector axes_vec = %axes.as_constant();\n\n    // Special case of no axes means no transformation\n    if (axes_vec.size() == 0) {\n       return tosa.IDENTITY(%input)\n    }\n\n    bool is_quantized = isa<QuantizedType>(%input.dtype) ? true : false\n\n    shape_t shape = %input.shape;\n    %output = %input;\n\n    if (is_quantized) {\n        %output = tosa.RESCALE(%output) {scale=input_scale, input_zp=input_zp, output_zp=0}\n    }\n\n    for (int32 i = 0; i < axes_vec.size(); i++) {\n        int32 axis = positive_axis(axes_vec[i], %input.rank);\n\n        shape[axis] = 1;\n        %output = tosa.OP(%output) {axis=axis}\n    }\n\n    if (!keep_dims) {\n       %output = tosa.RESHAPE(%output) {new_shape=output_shape}\n    }\n\n    if (is_quantized) {\n        %output = tosa.RESCALE(%output) {scale=output_scale, input_zp=0, output_zp=output_zp}\n    }\n\n    return %output;\n}\n```\n\n### lower_resize_op()\n\n```\nValue lower_resize_op(Value %images, Value %size, shape output_shape, dtype output_dtype, mode_t mode)\n{\n    int32 input_height  = %input.shape[1]\n    int32 input_width   = %input.shape[2]\n    int32 output_height = %output.shape[1]\n    int32 output_width  = %output.shape[2]\n\n    float64 in_center_h  = static_cast<float64>(input_height - 1) / 2.0\n    float64 in_center_w  = static_cast<float64>(input_width - 1) / 2.0\n    float64 out_center_h = static_cast<float64>(output_height - 1) / 2.0\n    float64 out_center_w = static_cast<float64>(output_width - 1) / 2.0\n\n    float64 fp_stride_y, fp_stride_x\n    if (align_corner && output_height > 1)\n        fp_stride_y = static_cast<float64>(input_height - 1) / static_cast<float64>(output_height - 1)\n    else\n        fp_stride_y = static_cast<float64>(input_height) / static_cast<float64>(output_height)\n    if (align_corner && output_width > 1)\n        fp_stride_x = static_cast<float64>(input_width - 1) / static_cast<float64>(output_width - 1)\n    else\n        fp_stride_x = static_cast<float64>(input_width) / static_cast<float64>(output_width)\n\n    float64 fp_offset_y = fp_offset_y = 0.0f\n    if (half_pixel_centers) {\n        fp_offset_y = fp_stride_y * 0.5f - 0.5f\n        fp_offset_x = fp_stride_x * 0.5f - 0.5f\n    }\n\n    if (dtype == float)\n        %op1_resize_in = tosa.RESIZE(%input) {stride={fp_stride_y, fp_stride_x}, offset={fp_offset_y, fp_offset_x}, shift=0, resize_mode=mode}\n    else {\n        int32 shift = 10\n        float64 unit = static_cast<float64>(1 << shift)\n        int32 stride_y = fp_stride_y * unit\n        int32 stride_x = fp_stride_x * unit\n        int32 offset_y = fp_offset_y * unit\n        int32 offset_x = fp_offset_x * unit\n\n        %op1_resize_in = tosa.RESIZE(%input) {stride={stride_y, stride_x}, offset={offset_y, offset_x}, shift=shift, resize_mode=mode}\n\n        if (mode == \"BILINEAR\") {\n            %const_zero = tosa.CONST() {value={0}}\n            %const_twenty = tosa.CONST() {value={20}}\n            %op2_ge_op1 = tosa.GREATER_EQUAL(%op1_resize_in, %const_zero)\n            %op3_abs_op1 = tosa.ABS(%op1_resize_in)\n            %op4_rshift_op3 = tosa.ARITHMETIC_RIGHT_SHIFT(%op3_abs_op1, %const_twenty)\n            %op5_negate_op4 = tosa.NEGATE(%op4_rshift_op3)\n            %op6_select_op2_op4_op5 = tosa.SELECT(%op2_ge_op1, %op4_rshift_op3, %op5_negate_op4)\n            %op7_cast_op6 = tosa.CAST(%op6_select_op2_op4_op5) // i32/i48->%output.dtype\n        }\n    }\n}\n```\n\n### lower_reversev2_op()\n\n```\nValue lower_reverse_v2_op(Value %tensor, Value %axis)\n{\n    Value %output = %tensor\n\n    if (%axis.num_elements == 0) {\n       %output = tosa.IDENTITY(%tensor)\n    } else {\n        for (int32 i = 0; i < %axis.shape[0]; i++) {\n            size_t axis_val = positive_axis(%axis.as_constant()[i])\n            %output = tosa.REVERSE(%output) {axis=%axis_val}\n        }\n    }\n\n    return %output\n}\n```\n\n### lower_round_op()\n\n```\nValue lower_round_op(Value %x)\n{\n    %half = tosa.CONST() {value={0.5}}\n    %add = tosa.ADD(%x, %half)\n    %output = tosa.FLOOR(%add)\n\n    return %output\n}\n```\n\n### lower_selectv2_op()\n\n```\nValue lower_selectv2_op(Value %condition, Value %t, Value %e, shape output_shape)\n{\n    // Reshape condition so that ranks match to support\n    // broadcasting (if necessary)\n\n    if (%condition.rank != output_shape.size) {\n       vector <size_t> cond_shape = %condition.shape\n       for (int32 i = 0; i < (output_shape.size - %condition.rank); i++) {\n           cond_shape.push_front(1)\n       }\n\n       %condition = tosa.RESHAPE(%condition) {new_shape=cond_shape}\n    }\n\n    %output = tosa.SELECT(%condition, %t, %e)\n\n    return %output\n}\n```\n\n### lower_shape_op()\n\n```\nValue lower_shape_op(Value %input)\n{\n    vector <size_t> input_shape = %input.shape\n\n    %shape = tosa.CONST() {value={input_shape}}\n    return %shape\n}\n```\n\n### lower_space_to_batch_nd_op()\n\n```\nValue lower_space_to_batch_nd_op(Value %input, Value %block_shape, Value %padding)\n{\n\n    size_t block_rank = %block.shape[0]\n    size_t remaining_shape_rank = %input.rank - block_rank - 1;\n\n    // Step 1. Pad based on paddings operand (flattened representation of [input.rank][2]-shaped array)\n    vector <size_t> a1_padding\n    a1_padding[0] = 0\n    a1_padding[1] = 0\n\n    for (int32 i = 0; i < %padding.shape[0]; i++) {\n        a1_padding[i + 2] = %padding.as_constant()[i]\n    }\n\n    %a1_pad = tosa.PAD(%input) {padding=a1_padding}\n\n    // Step 2. Reshape to\n    // [batch + padded_shape[1] / block_shape[0], block_shape[0], ...\n    //    padded_shape[M] / block_shape[M-1], block_shape[M-1]] +\n    //    remaining_shape\n\n    vector <size_t> a2_shape(1 + block_rank * 2 + remaining_shape_rank)\n    a2_shape[0] = %input.shape[0]\n    for (int32 i = 0; i < block_rank; i++) {\n        a2_shape[1 + i * 2 + 0] = %a1_pad.shape[1 + i] / block_shape.as_constant()[i]\n        a2_shape[1 + i * 2 + 1] = block_shape.as_constant()[i]\n    }\n\n    for (int32 i = 0; i < remaining_shape_rank; i++) {\n        a2_shape[1 + block_rank * 2 + i] = %input.shape[1 + block_rank + i]\n    }\n\n    %a2_reshape = tosa.RESHAPE(%a1_pad) {new_shape=a2_shape}\n\n    // Step 3 transpose to\n    //  block-shape +\n    //  [batch] +\n    //  [padded_shape[1] / block_shape[0],\n    // ...\n    //  [padded_shape[M] / block_shape[M-1]] +\n    //  remaining_shape\n    vector <size_t> a3_perm(%a2_reshape.rank)\n    size_t block_num_elems = 1\n\n    for (int32 i = 0; i < block_rank; i++) {\n        a3_perm[i] = 1 + 2 * i + 1\n        a3_perm[block_rank + 1 + i] = 2 * i + 1\n        block_num_elems *= %block.as_constant()[i]\n    }\n\n    a3_perm[block_rank] = 0\n    for (int32 i = (1 + block_rank * 2); i < %a2_reshape.rank; i++) {\n        a3_perm[i] = i\n    }\n\n    %a3_reshape = tosa.RESHAPE(%a2_reshape) {perm=a3_perm}\n\n    // Step 4. Reshape transposed tensor to\n    // [ batch * prod(block_shape)] +\n    // [ padded_shape[1] / block_shape[0],\n    //   ...,\n    // padded_shape[M] / block_shape[M-1]] +\n    // remaining_shape\n\n    vector <size_t> a4_shape(%input.rank)\n    a4_shape[0] = batch_size * block_num_elements\n\n    for (int32 i = 0; i < block_rank; i++) {\n        a4_shape[i + 1] = %a1_pad.shape[i + 1] / %block.as_constant()[i]\n    }\n\n    for (int32 i = 0; i < remaining_block_shape; i++) {\n        a4_shape[1 + block_rank + i] = %input.shape[1 + block_rank + i]\n    }\n\n    %output = tosa.RESHAPE(%a3_reshape) {new_shape=a4_shape}\n\n    return %output\n}\n```\n\n### lower_space_to_depth_op()\n\n```\nValue lower_space_to_depth_op(Value %input, size_t block_size[], Format_t data_format)\n{\n    assert(data_format == 'NHWC')\n\n    vector <size_t> a2_shape = {%input.shape[0],\n                                %input.shape[1] / block_size[0],\n                                %block_size[0],\n                                %input_shape[2] / block_size[1],\n                                %block_size[1],\n                                %input_shape[3]}\n    %a2_reshape = tosa.RESHAPE(%input) {new_shape=a2_shape}\n    %a3_transpose = tosa.TRANSPOSE(%a2_reshape) {perm={0, 1, 3, 2, 4, 5}}\n\n    vector <size_t> a4_shape = {%input.shape[0],\n                                %input_shape[1] / block_size[0],\n                                %input_shape[2] / block_size[1],\n                                %input_shape[3] * block_size[0] * block_size[1]}\n    %output = tosa.RESHAPE(%a3_transpose) {new_shape=%a4_shape}\n    return %output\n}\n```\n\n### lower_split_op()\n\n```\nValue lower_split_op(Value %value, size_t axis, size_t num_split)\n{\n    Value %output[]\n\n    size_t slice_size = %value.shape[axis] / num_split\n\n    for (int32 i = 0; i < num_split; i++) {\n        vector <size_t> begin_vals, size_vals\n\n        for (int32 j = 0; j < %value.rank; j++) {\n            if (j == axis) {\n               begin_vals.push_back(slice_size * i)\n               size_vals.push_back(slice_size)\n            } else {\n               begin_vals.push_back(0)\n               size_vals.push_bac(%value.shape[j])\n            }\n\n            %output[i] = tosa.SLICE(%value) {start=begin_vals, size=size_vals}\n        }\n\n    }\n\n    %output_list = tosa.IDENTITYN(%output)\n    return %output_list\n}\n```\n\n### lower_splitv_op()\n\n```\nValue lower_splitv_op(Value %value, vector <size_t> size_split, size_t axis)\n{\n   Value %output[]\n\n   size_t curr_split_start = 0\n\n   for (int32 i = 0; i < size_split.size(); i++) {\n       vector <size_t> begin_vals, size_vals\n\n       for (int32 j = 0; j < %value.rank; j++) {\n           if (j == axis) {\n              begin_vals.push_back(curr_split_start)\n              size_vals.push_back(size_split[i])\n           } else {\n              begin_vals.push_back(0)\n              size_vals.push_back(input.shape[j])\n           }\n       }\n\n       %output[i] = tosa.SLICE(%value) {start=begin_vals, size=size_vals}\n\n       curr_split_start += size_split[i]\n   }\n\n    %output_list = tosa.IDENTITYN(%output)\n    return %output_list\n}\n```\n\n### lower_squeeze_op()\n\n```\nValue lower_squeeze_op(Value %input, vector<size_t> squeeze_dims)\n{\n    vector <size_t> reshape_dims\n\n    if (squeeze_dims.size() == 0) {\n       // Remove all 1-dims\n       for (int32 i = 0; i < %input.rank; i++) {\n           if (%input.shape[i] != 1) {\n              reshape_dims.push_back(%input_shape[i])\n           }\n       }\n    } else {\n      // Remove the specified dimensions\n      for (int32 i = 0; i < %input.rank; i++) {\n          if (!squeeze_dims.find(i) || %input.shape[i] != -1) {\n              reshape_dims.push_back(%input_shape[i])\n          }\n      }\n    }\n\n    %output = tosa.RESHAPE(%input) {new_shape=reshape_dims}\n\n    return %output\n}\n```\n\n### lower_strided_slice_op()\n\n```\nValue lower_strided_slice_op(Value %input, Value %begin_val, Value %end_val, Value %strides_val,\n                               size_t begin_mask, size_t end_mask, size_t ellipsis_mask,\n                               size_t new_axis_mask, size_t shrink_axis_mask)\n{\n    // Note: does not implement ellipsis_mask or reverse stride at this time\n    assert(ellipsis_mask == 0)\n\n    vector <size_t> begin(%begin_val.as_constant()), end(%end_val.as_constant()), strides(%strides_val.as_constant())\n    vector <size_t> a1_start, a1_size, a2_shape, a3_start, a3_size, a4_shape\n\n    for (int32 i = 0; i < %input.rank; i++) {\n        if (begin_mask & (1 << i)) {\n           begin[i] = 0\n        }\n\n        if (end_mask & (1 << i)) {\n           end[i] = %input.shape[i]\n        }\n\n        // Wrap around index if begin and end are negative\n        if (begin[i] < 0) {\n           begin[i] += %input.shape[i]\n        }\n\n        if (end[i] < 0) {\n           end[i] += %input.shape[i]\n        }\n\n        a1_start[i] = begin[i]\n        a1_size[i] = end[i] - begin[i]\n\n        a2_shape[i*2 + 0] = a1_size[i] / strides[i]\n        a2_shape[i*2 + 1] = strides[i]\n\n        a3_start[i*2 + 0] = 0\n        a3_start[i*2 + 1] = 0\n\n        if (shrink_axis_mask & (1 << i)) {\n           a3_size[i*2 + 0] = 1\n        } else {\n           a3_size[i*2 + 0] = a1_size[i] / strides[i]\n        }\n        a3_size[i*2 + 1] = 1\n\n        if (!(shrink_axis_mask & (1 << i))) {\n           if (new_axis_mask & (1 << i)) {\n              a4_shape.push_back(1)\n           a4_shape.push_back((a1_size[i] / strides[i]))\n        }\n    }\n\n    // Step 1: Slice the input array\n    %a1_slice = tosa.SLICE(%input) {start=a1_start, size=a1_size}\n\n    // Step 2: Reshape the sliced array: 2x as many dimensions as %input\n    %a2_reshape = tosa.RESHAPE(%a1_slice) {new_shape=a2_shape}\n\n    // Step 3: Take a slice of the [0] index along each of the strided dimensions (even dimensions)\n    %a3_slice = tosa.SLICE(%a2_reshape) {start=a3_start, size=a3_size}\n\n    // Step 4: Reshape the now-strided tensor back down to the desired number of dimensions\n    %output = tosa.RESHAPE(%a3_slice) {new_shape=a4_shape}\n\n    return %output\n}\n```\n\n### lower_unpack_op()\n\n```\nValue lower_unpack_op(Value %value, size_t axis, uint64_t num)\n{\n    axis = positive_axis(axis)\n\n    Value %output_arr[]\n\n    // Step 1: transpose 'axis' to left-most dimension, if necessary\n    Value %transposed_value\n\n    if (axis != 0) {\n       vector <size_t> perms\n\n       perms.push_back(axis)\n       for (int32 i = 0; i < %input.rank; i++) {\n           if (i != axis)\n              perms.push_back(i)\n       }\n\n       %transposed_value = tosa.TRANSPOSE(%value) {perms=perms}\n\n   } else {\n      %transposed_value = %value\n   }\n\n   // Step 2: Slice [N, A, B, C] into [N] [A, B, C]\n   for (int32 i = 0; i < %transposed_value.rank; i++) {\n       vector <size_t> begin_vals, size_vals, shape_vals\n\n       begin_vals.push_back(i)\n       size_vals.push_back(1)\n\n       for (int32 j = 1; j < %transposed_value.rank; j++) {\n           begin_vals.push_back(0)\n           size_vals.push_back(transposed_value.shape[j])\n           shape_vals.push_back(transposed_value.shape[j])\n       }\n\n       %slice = %tosa.SLICE(%transposed_value) {begin=begin_vals, size=size_vals}\n       %output_arr[i] = %tosa.RESHAPE(%slice) {new_shape=shape_vals} {begin=begin_vals, size=size_vals}\n   }\n\n   // Combine array of sliced tensors into a list of tensors\n   %output = tosa.IDENTITYN(%output_arr)\n   return %output\n}\n```\n\n### get_transpose_conv2d_padding_values_from_pad_type()\n\n```\nvector<int64> get_transpose_conv2d_padding_values_from_pad_type(tensorflow::Padding padding, tensorflow::TensorFormat data_format,\n                                                         uint32 first_filter_spatial_dim, type input_type, type filter_type\n                                                         vector strides, vector dilations)\n{\n    int64 pad_before, pad_after;\n    vector<int64> computed_padding\n\n    for (int32 i = 0; i < 2; i++) {\n        int64 ifm_dim = GetTensorSpatialDimIndex(4, data_format, i);\n        int64 ofm_dim = GetTensorSpatialDimIndex(4, data_format, i);\n        int64 filter_dim = first_filter_spatial_dim + 1\n\n        int64 ifm_size = input_shape[ifm_dim]\n        int64 ofm_size = output_dims[ofm_dim]\n        int64 filter_size = filter.shape[filter_dim]\n        int64 dim_dilation = dilations[i]\n        int64 dim_stride = strides[i]\n        int32 effective_filter_size = (filter_size - 1) * dim_dilation + 1\n        int32 total_padding = ((ifm_size - 1) * dim_stride + effective_filter_size - ofm_size)\n        total_padding = total_padding > 0 ? total_padding : 0\n\n        pad_before = total_padding / 2\n        pad_after = total_padding - pad_before\n\n        computed_padding.push_back(pad_before)\n    }\n\n    return computed_padding\n}\n```\n\n### lower_fused_activation()\n\n```\nValue lower_fused_activation(Value %input, string activation)\n{\n    bool is_quantized = isa<QuantizedType>(%input.dtype) ? true : false\n\n    if (is_quantized) {\n        if (activation == \"NONE\") {\n            return %input\n        }\n        else if (activation == \"RELU\") {\n            int32 quantized_0 = %input.zp\n            int32 quantized_max = %input.storage_max\n            return tosa.CLAMP(%input) {min_int=quantized_0, max_int=quantized_max}\n        }\n        else if (activation == \"RELU6\") {\n            int32 quantized_0 = %input.zp\n            int32 quantized_6 = %input.zp + (6.0 / %input.scale)\n            return tosa.CLAMP(%input) {min_int=quantized_0, max_int=quantized_6}\n        }\n        else if (activation == \"RELU_N1_TO_1\") {\n            int32 quantized_n1 = %input.zp + (-1.0 / %input.scale)\n            int32 quantized_1 = %input.zp + (1.0 / %input.scale)\n            return tosa.CLAMP(%input) {min_int=quantized_n1, max_int=quantized_1}\n        }\n    }\n    else {\n        if (activation == \"NONE\") {\n            return %input\n        }\n        else if (activation == \"RELU\") {\n            return tosa.RELUN(%input) {max_fp=numeric_limit<float32>::max()}\n        }\n        else if (activation == \"RELU6\") {\n            return tosa.RELUN(%input) {max_fp=6.0}\n        }\n        else if (activation == \"RELU_N1_TO_1\") {\n            return tosa.CLAMP(%input) {min_fp=-1.0, max_fp=1.0}\n        }\n        else if (activation == \"TANH\") {\n            return tosa.TANH(%input)\n        }\n    }\n}\n```\n\n### get_table_const_tensor()\n\n```\nValue get_table_const_tensor(function func)\n{\n    array<int16, 513> table_array\n    for (int32 i = -256; i <= 256; i++) {\n        table_array[i] = func(i)\n    }\n\n    return tosa.CONST() {value=table_array}\n}\n```\n\n### lower_gather_op()\n\n```\nValue lower_gather_op(Value %params, Value %indices, int32 batch_dims, int32 axis)\n{\n    assert batch_dims <= %indices.rank\n    assert axis >= batch_dims\n\n    int32 N = W = K = C = 1\n\n    for (int32 i = 0; i < batch_dims; i++) N *= %params.shape[i]\n    for (int32 i = batch_dims; i < %indices.rank; i++) W *= %indices.shape[i]\n    K = %params.shape[axis]\n    for (int32 i = batch_dims; i < axis; i++) C *= %params.shape[i]\n    for (int32 i = (axis + 1); i < %params.rank; i++) C *= %params.shape[i]\n\n    vector<int32> params_idx_batch, params_idx_left, params_idx_indices, params_idx_right\n    for (int32 i = 0; i < %params.rank; i++) {\n        if (i < batch_dims && i < axis)\n            params_idx_batch.push_back(i)\n        else if (i < axis)\n            params_idx_left.push_back(i)\n        else if (i < (axis + 1))\n            params_idx_indices.push_back(i)\n        else\n            params_idx_right.push_back(i)\n    }\n\n    vector<int32> params_perm = {params_idx_batch, params_idx_left, params_idx_indices, params_idx_right}\n    vector<int32> result_perm\n    for (int32 i = 0; i < batch_dims; i++)\n        result_perm.push_back(i)\n    for (int32 i = 0; i < params_idx_left.size(); i++)\n        result_perm.push_back(params_idx_left[i])\n    for (int32 i = batch_dims; i < %indices.rank; i++)\n        result_perm.push_back(i)\n    for (int32 i = 0; i < params_idx_right.size(); i++)\n        result_perm.push_back(params_idx_right[i])\n\n    %const_params_perm = tosa.CONST() {value=params_perm}\n    %const_result_perm = tosa.CONST() {value=result_perm}\n\n    %op1_transpose_params = tosa.TRANSPOSE(%params, %const_params_perm)\n    %op2_reshape_op1 = tosa.RESHAPE(%op1_transpose_params) {shape={N,K,C}}\n    %op3_reshape_indices = tosa.RESHAPE(%indices) {shape={N,W}}\n    %op4_gather_op2_op3 = tosa.GATHER(%op2_reshape_op1, %op3_reshape_indices)\n    %op5_reshape_op4 = tosa.RESHAPE(%op4_gather_op2_op3) {shape={N,W,C}}\n    %op6_transpose_op5 = tosa.TRANSPOSE(%op5_reshape_op4, %const_result_perm)\n}\n```\n\n### lower_gather_nd_op()\n\n```\nValue lower_gather_nd_op(Value %params, Value %indices)\n{\n    int32 N = W = K = C = ND = 1\n\n    ND = %indices.shape[%indices.rank - 1]\n\n    assert ND < %params.rank\n\n    for (int32 i = 0; i < (%indices.rank - 1); i++) W *= %indices.shape[i]\n    for (int32 i = 0; i < ND; i++) K = %params.shape[i]\n    for (int32 i = ND; i < %params.rank; i++) C *= %params.shape[i]\n\n    vector<int32> flatten_coeff_vec\n    for (int32 i = 0; i < ND; i++) flatten_coeff_vec.push_back(i)\n    flatten_coeff_vec.push_back(1)\n\n    %const_flatten_coeff = tosa.CONST() {value=flatten_coeff_vec}\n    %op1_reshape_params = tosa.RESHAPE(%params) {shape={N,K,C}}\n    %op2_reshape_indices = tosa.RESHAPE(%indices) {shape={W,ND}}\n    %op3_mul_op2_flatten_coeff = tosa.MUL(%op2_reshape_indices, %const_flatten_coeff)\n    %op4_rsum_op3 = tosa.REDUCE_SUM(%op3_mul_op2_flatten_coeff) {axis=1}\n    %op5_reshape_op4 = tosa.RESHAPE(%op4_rsum_op3) {shape={N,W}}\n    %op6_gather_op1_op5 = tosa.GATHER(%op1_reshape_params, %op5_reshape_op4)\n    %op7_reshape_op6 = tosa.RESHAPE(%op6_gather_op1_op5) {shape={N,W,C}}\n}\n```\n\n### lower_one_hot_op()\n\n```\nValue lower_one_hot_op(Value %indices, Value %depth, Value %on_value, Value %off_value, int32 axis)\n{\n    int32 N = W = C = 1\n    int32 K = %depth.as_constant()\n    int32 left_dim = right_dim = 1\n    for(int32 i : %indices.rank) {\n        int32 dim = %indices.shape[i]\n        N *= dim\n        if (i >= axis)\n            right_dim *= dim\n        else\n            left_dim *= dim\n    }\n\n    %perm_const = tosa.CONST() {value={0, 2, 1}}\n    %op1_reshape_on_value = tosa.RESHAPE(%on_value) {shape={1, 1, 1}}\n    %op2_tile_op1 = tosa.TILE(%op1_reshape_on_value) {multiples={N, W, C}}\n    %op3_reshape_off_value = tosa.RESHAPE(%off_value) {shape={1, 1, 1}}\n    %op4_tile_op1 = tosa.TILE(%op3_reshape_off_value) {multiples={N, K, C}}\n    %op5_reshape_indices = tosa.RESHAPE(%indices) {shape={N, W}}\n    %op6_scatter_op4_op5_op2 = tosa.SCATTER(%op4_tile_op1, %op5_reshape_indices, %op2_tile_op1)\n    %op7_reshape_op6 = tosa.RESHAPE(%op6_scatter_op4_op5_op2) {shape={left_dim, right_dim, K}}\n    %op8_transpose_op7 = tosa.TRANSPOSE(%op7_reshape_op6, %perm_const)\n    %op9_reshape_op8 = tosa.RESHAPE(%op8_transpose_op7) {shape=%output.shape}\n}\n\n\n## MLIR Passes Management\n\nLegalization is built on multiple MLIR passes.\n\n| MLIR Pass Name            | Input Dialect | Output Dialect | Description     |\n| ------------------------- | ------------- | -------------- | --------------- |\n| legalize_tf               | TensorFlow    | TOSA           | Legalize        |\n:                           :               :                : TensorFlow      :\n:                           :               :                : dialect to TOSA :\n:                           :               :                : dialect         :\n| fuse_tf_bias              | TensorFlow    | TOSA           | Mapping         |\n:                           :               :                : tf.BiasAdd +    :\n:                           :               :                : tf.Conv2D to    :\n:                           :               :                : tosa.CONV2D     :\n| legalize_tfl              | TensorFlow    | TOSA           | Legalize        |\n:                           : Lite          :                : TensorFlow Lite :\n:                           :               :                : dialect to TOSA :\n:                           :               :                : dialect         :\n| convert_tfl_uint8         | TensorFlow    | TensorFlow     | Convert         |\n:                           : Lite          : Lite           : quantized uint8 :\n:                           :               :                : graph to int8   :\n:                           :               :                : graph           :\n\nTF to TOSA legalization could be summarized by following pseudocode:\n\n```\n\nvoid legalize_tf_to_tosa(mlir::Module module) { mlir::PassManager pm\n\n```\n// other MLIR passes to optimize TF\n\npm.addPass(fuse_tf_bias)\npm.addPass(legalize_tf)\n\n// other MLIR passes to optimize TOSA\n```\n\n} ```\n\nTFLite to TOSA legalization could be summarized by following pseudocode:\n\n```\nvoid legalize_tfl_to_tosa(mlir::Module module)\n{\n    mlir::PassManager pm\n\n    // other MLIR passes to optimize TFLite\n\n    pm.addPass(convert_tfl_uint8)\n    pm.addPass(legalize_tfl)\n\n    // other MLIR passes to optimize TOSA\n}\n```\n\nEach of the passes is described in more detail in the subsequent chapters.\n\n## TensorFlow MLIR Dialect Legalization (legalize_tf)\n\n### tf.Abs\n\nThis operator is trivially lowered to tosa.ABS\n\n### tf.AddN\n\n**TensorFlow Dialect**\n\n```\n%output = tf.AddN(%inputs)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.ADD(%inputs:0, %inputs:1)\nfor (int32 i = 2; i < %inputs.size; i++) {\n    %output = tosa.ADD(%inputs:i, %output)\n}\n```\n\n### tf.Add\n\nElement-wise addition.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Add(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.ADD.\n\n### tf.Addv2\n\nElement-wise addition.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Addv2(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.ADD.\n\n### tf.All\n\nComputes the \"logical and\" of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.all(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_ALL>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.Any\n\nComputes the \"logical or\" of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.any(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_ANY>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.ArgMax\n\nReturns the index with the largest value across the given axis of the input\ntensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ArgMax(%input, %dimension)\n```\n\n**TOSA Lowering**\n\n```\nint64 axis = positive_axis(%dimension)\n%output = tosa.ARGMAX(%input) {axis=axis}\n```\n\n### tf.ArgMin\n\nReturns the index with the smallest value across the given axis of the input\ntensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ArgMin(%input, %dimension)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.Assert\n\nAsserts that the given condition is true.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Assert(%condition, %summarize)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.AssignAddVariableOp\n\nAdds a value to the current value of a variable.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.AssignAddVariableOp(%resource, %value, %dtype)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.AssignSubVariableOp\n\nSubtracts a value to the current value of a variable.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.AssignSubVariableOp(%resource, %value, %dtype)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.AssignVariableOp\n\nAssigns a new value to a variable.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.AssignVariableOp(%resource, %value, %dtype)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.AvgPool\n\nPerforms average pooling on the input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.AvgPool(%value) {ksize, strides, padding, data_format}\n```\n\n**TOSA Lowering**\n\n```\nassert(data_format == \"NHWC\")\n\ntosa_padding =\n     get_padding_values_from_pad_type(%input, ksize, padding, data_format,\n                                      FORMAT_OHWI, strides, {1, 1, 1, 1})\n%output = tosa.AVG_POOL2D(%value) {ksize=ksize, strides=strides, padding=tosa_padding}\n```\n\n### tf.BatchMatMul\n\nMultiplies slices of two tensors in batches.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.BatchMatMul(%x, %y, %adj_x, %adj_y)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.BatchMatMulV2\n\nMultiplies slices of two tensors in batches.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.BatchMatMulV2(%x, %y, %adj_x, %adj_y)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.BatchNormWithGlobalNormalization\n\n✗ Deprecated operator.\n\n### tf.BatchToSpaceND\n\nBatchToSpaceND for N-D tensors of type T.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.BatchToSpaceND(%input, %block_shape, %crops)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_batch_to_space_nd_op(%input, %block_shape, %crops, output.shape)\n```\n\n### tf.BiasAddGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.BiasAdd\n\nAdd bias to value.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.BiasAdd(%bias, %value) {data_format}\n```\n\n**TOSA Lowering**\n\n```\nassert(data_format == 'NHWC')\n%output = tosa.ADD(%value, %bias)\n```\n\n### tf.BitCast\n\nBitcasts a tensor from one type to another without copying data.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.BitCast(%input, %dtype)\n```\n\n**TOSA Lowering**\n\nNo TOSA lowering defined.\n\n### tf.BitwiseAnd\n\nThis operator is trivially lowered to tosa.BITWISE_AND.\n\n### tf.BitwiseOr\n\nThis operator is trivially lowered to tosa.BITWISE_OR.\n\n### tf.BroadcastGradientArgs\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.BroadcastTo\n\nNo TOSA lowering defined.\n\n### tf.Cast\n\nThis operator is trivially lowered to tosa.CAST.\n\n### tf.Ceil\n\nThis operator is trivially lowered to tosa.CEIL.\n\n### tf.CheckNumerics\n\nNo TOSA lowering defined.\n\n### tf.ComplexAbs\n\nNo TOSA lowering defined.\n\n### tf.Complex\n\nNo TOSA lowering defined.\n\n### tf.ConcatOffset\n\nNo TOSA lowering defined. Training profile: TOSA lowering not yet defined.\n\n### tf.Concat\n\nNo TOSA lowering defined.\n\n### tf.ConcatV2\n\nConcatenates tensors along one dimension.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ConcatV2(%values, %axis)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_concatv2_op(%values, %axis)\n```\n\n### tf.Conj\n\nNo TOSA lowering defined.\n\n### tf.Const\n\nThis operator is trivially lowered to tosa.CONST.\n\n### tf.Conv2DBackpropFilter\n\nNo TOSA lowering defined.\n\n### tf.Conv2DBackpropInput\n\nComputes the gradients of convolution with respect to the input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Conv2DBackpropInput(%input_sizes, %filter, %out_backprop) {strides, use_cudnn_on_gpu, padding, explicit_paddings, data_format, dilations}\n```\n\n**TOSA Lowering**\n\n```\n// Transpose filter from HWIO to OHWI\n%tosa_filter = tosa.TRANSPOSE(%filter) {perms={2, 0, 1, 3}}\n\nvector output_shape\n\nfor (int32 i = 0; i < input_sizes.size(); i++) {\n   output_shape.push_back(input_size[i])\n}\n\nif (%padding == \"EXPLICIT\") {\n   tosa_padding =\n       get_padding_values_from_explicit_pad_attr(explicit_padding, data_format)\n} else {\n    tosa_padding =\n        get_transpose_conv2d_padding_values_from_pad_type(%input_sizes, %filter, output_shape, padding, data_format, FORMAT_HWIO, strides, dilations)\n}\n\n// Create a zero bias tensor\n%zero_bias = tosa.CONST() {value={0}}\n%output = tosa.TRANSPOSE_CONV2D(%out_backprop) {weight=%tosa_filter, bias=%zero_bias, outpad=tosa_pading, stride=strides, dilation==dilations, out_shape=out_shape}\n```\n\n### tf.Conv2D\n\nComputes a 2-D convolution given 4-D input and filter tensors.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Conv2D(%input, %filter) {strides, padding, explicit_paddings, data_format, dilations}\n```\n\n**TOSA Lowering**\n\n```\nassert(data_format == \"NHWC\")\n\n// Transpose filter from HWIO to OHWI\n%filter_tranpose = tosa.TRANSPOSE(%filter {perms={3, 0, 1, 2}}\n\nif (padding == \"EXPLICIT\") {\n   tosa_padding =\n       get_padding_values_from_explicit_pad_attr(explicit_padding, data_format)\n} else {\n    %tosa_padding =\n        get_padding_values_from_pad_type(%input, %filter.shape, padding, data_format,\n                                         FORMAT_HWIO, strides, dilations)\n}\n\n// Create a zero bias tensor\n%zero_bias = tosa.CONST() {value={0}}\n\n%output = tosa.CONV2D(%input, %filter_transpose, %zero_bias) {padding=tosa_padding, stride=strides, dilation=dilations}\n```\n\n### tf.Conv3D\n\nTOSA lowering to tosa.CONV3D to be defined.\n\n### tf.Cos\n\nNo TOSA lowering defined.\n\n### tf.CrossReplicaSum\n\nNo TOSA lowering defined.\n\n### tf.DepthToSpace\n\nDepthToSpace for tensors of type T.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.DepthToSpace(%input) {block_size, data_format}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_depth_to_space_op(%input, block_size, data_format)\n```\n\n### tf.DepthwiseConv2dNative\n\nComputes a 2-D depthwise convolution given 4-D input and filter tensors.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.DepthwiseConv2dNative(%input, %filter) {strides, padding, data_format, dilations}\n```\n\n**TOSA Lowering**\n\n```\nif (padding == \"EXPLICIT\") {\n   tosa_padding =\n       get_padding_values_from_explicit_pad_attr(explicit_padding, data_format)\n} else {\n    tosa_padding =\n        get_padding_values_from_pad_type(%input, %filter.shape, padding, data_format,\n                                         FORMAT_HWIO, strides, dilations)\n}\n\nbias_dim = %filter.shape[2] * %filter.shape[3]\n\n// Create a zero-bias tensor\n%zero_bias = tosa.CONST() {value={0} * bias_dim}\n\n%output = tosa.DEPTHWISE_CONV2D(%input, %filter, %zero_bias) {stride=strides, dilation=dilations, padding=padding}\n```\n\n### tf.DivNoNan\n\nNo TOSA lowering defined.\n\n### tf.Div\n\nNo TOSA lowering defined.\n\n### tf.DynamicStitch\n\nNo TOSA lowering defined.\n\n### tf.Einsum\n\nNo TOSA lowering defined.\n\n### tf.Elu\n\nComputes exponential linear: exp(features) - 1 if &lt;0, features otherwise\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Elu(%features)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_elu_op(%features)\n```\n\n### tf.EmptyTensorList\n\nNo TOSA lowering defined.\n\n### tf.Equal\n\nReturns the truth value of (x == y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Equal(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.EQUAL.\n\n### tf.Exp\n\nThis operator is trivially lowered to tosa.EXP.\n\n### tf.ExpandDims\n\nInserts a dimension of 1 into a tensor’s shape\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ExpandDims(%input, %axis)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_expand_dims(%input, %axis.to_constant())\n```\n\n### tf.FakeQuantWithMinMaxArgs\n\nFake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FakeQuantWithMinMaxArgs(%inputs) {min, max, num_bits, narrow_range}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_fake_quant_op(%inputs, %min, %max, %num_bits, %narrow_range)\n```\n\n### tf.FakeQuantWithMinMaxVars\n\nFake-quantize the 'inputs' tensor of type float via global flats scalars min.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FakeQuantWithMinMaxVars(%inputs, %min, %max) {num_bits, narrow_range}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_fake_quant_op(%inputs, %output.type, %min.to_constant(), %max.to_constant(), num_bits, narrow_range)\n```\n\n### tf.FakeQuantWithMinMaxVarsPerChannel\n\nFake-quantize the 'inputs' tensor of type float and one of the shapes \\[d\\].\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FakeQuantWithMinMaxVarsPerChannel(%inputs, %min, %max) {num_bits, narrow_range}\n```\n\nNo TOSA lowering defined.\n\n### tf.Fill\n\nCreates a tensor filled with a scalar value\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Fill(%dims, %value)\n```\n\n**TOSA Lowering**\n\n```\nint64 total_size = 1\n\nfor (int32 i = 0; i < %dims.shape[0]; i++) {\n    total_size *= %dims[i]\n}\n\nvector<%value.dtype> fill_arr(total_size, %value)\n\n%output = tosa.CONST() {value={fill_arr}}\n```\n\n### tf.FloorDiv\n\nReturns x // y element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FloorDiv(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_floor_div(%lhs, %rhs)\n```\n\n### tf.FloorMod\n\nReturns element-wise remainder of division when x &lt; 0 xor x &lt; y is true.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FloorMod(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_floor_mod(%lhs, %rhs)\n```\n\n### tf.Floor\n\nThis operator is trivially lowered to tosa.FLOOR.\n\n### tf.FusedBatchNormGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.FusedBatchNormGradV2\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.FusedBatchNormGradV3\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.FusedBatchNorm\n\nBatch normalization.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FusedBatchNorm(%x, %scale, %offset, %mean, %variance) {epsilon, data_format, is_training}\n\n\nassert(data_format == 'NHWC')\nassert(is_training == false)\n\n%epsilon_const = tosa.CONST() {value={epsilon}}\n\n%op1 = tosa.SUB(%x, %bmean)\n%op2 = tosa.ADD(%variance, %epsilon_const)\n%op3 = tosa.RSQRT(%op2)\n%op4 = tosa.MUL(%op1, %op3)\n%op5 = tosa.MUL(%op4, %scale)\n%output = tosa.ADD(%op5, %offset)\n```\n\n### tf.FusedBatchNormV3\n\nBatch normalization.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.FusedBatchNormV3(%x, %scale, %offset, %mean, %variance) {epsilon, data_format, is_training}\n```\n\n**TOSA Lowering**\n\n```\nassert(data_format == 'NHWC')\nassert(is_training == false)\n\n%epsilon_const = tosa.CONST() {value={epsilon}}\n\n%op1 = tosa.SUB(%x, %bmean)\n%op2 = tosa.ADD(%variance, %epsilon_const)\n%op3 = tosa.RSQRT(%op2)\n%op4 = tosa.MUL(%mean, %op3)\n%op5 = tosa.MUL(%op4, %scale)\n%output = tosa.ADD(%op5, %offset)\n```\n\n### tf.GatherNd\n\nGather slices from params into a Tensor with shape specified by indices.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.GatherNd(%params, %indices)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_gather_nd_op(%params, %indices)\n```\n\n### tf.Gather\n\nGathers slices from params according to indices.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Gather(%params, %indices)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_gather_op(%params, %indices, 0, 0)\n```\n\n### tf.GatherV2\n\nGathers slices from params axis according to indices.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.GatherV2(%params, %indices, %axis) {batch_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_gather_op(%params, %indices, batch_dims, %axis.to_constant())\n```\n\n### tf.GreaterEqual\n\nReturns the truth value of (x &gt;= y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.GreaterEqual(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.GREATER_EQUAL.\n\n### tf.Greater\n\nRetruReturns the truth value of (x &gt; y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Greater(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.GREATER.\n\n### tf.HashTableV2\n\nNo TOSA lowering defined.\n\n### tf.IdentityN\n\nReturns a list of tensors with the same shapes and contents as the input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.IdentityN(%input)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.IDENTITYN(%input)\n```\n\n### tf.Identity\n\nReturns a tensor with the same shape and contents as the input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Identity(%input)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.IDENTITY(%input)\n```\n\n### tf.If\n\nNo TOSA lowering defined.\n\n### tf.Imag\n\nNo TOSA lowering defined.\n\n### tf.InfeedDequeueTuple\n\nNo TOSA lowering defined.\n\n### tf.Invert\n\nThis operator is trivially lowered to tosa.BITWISE_NOT.\n\n### tf.InvertPermutation\n\nNo TOSA lowering defined.\n\n### tf.IsFinite\n\nNo TOSA lowering defined.\n\n### tf.IteratorGetNext\n\nNo TOSA lowering defined.\n\n### tf.L2Loss\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.LRN\n\nNo TOSA lowering defined.\n\n### tf.LeakyRelu\n\nComputes rectified linear: max(features, features \\* alpha).\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LeakyRelu(%features) {alpha}\n```\n\n**TOSA Lowering**\n\n```\n%alpha_tensor = tosa.CONST() {value={alpha}}\n%features_alpha = tosa.MUL(%features, %alpha_tensor)\n%greater = tosa.GREATER(%features, %features_alpha)\n%output = tosa.SELECT(%greater, %features, %features_alpha)\n```\n\n### tf.LeftShift\n\nComputes the bitwise left-shift of x by y bits, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LeftShift(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.LOGICAL_LEFT_SHIFT.\n\n### tf.LegacyCall\n\nNo TOSA lowering defined.\n\n### tf.LessEqual\n\nReturns the truth value of (x ⇐ y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LessEqual(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%output_greater = tosa.GREATER(%x, %y)\n%output = tosa.LOGICAL_NOT(%output_greater)\n```\n\n### tf.Less\n\nReturns the truth value of (x &lt; y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LessEqual(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%output_greater_equal = tosa.GREATER_EQUAL(%x, %y)\n%output = tosa.LOGICAL_NOT(%output_greater_equal)\n```\n\n### tf.LiNSpace\n\nNo TOSA lowering defined.\n\n### tf.Log1p\n\nNo TOSA lowering defined.\n\n### tf.Log\n\nThis operator is trivially lowered to tosa.LOG.\n\n### tf.LogSoftmax\n\nComputes log softmax activations.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LogSoftmax(%logits)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_log_softmax_op(%logits)\n```\n\n### tf.LogicalAnd\n\nReturns the truth value of x AND y, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LogicalAnd(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.LOGICAL_AND.\n\n### tf.LogicalNot\n\nThis operator is trivially lowered to tosa.LOGICAL_NOT.\n\n### tf.LogicalOr\n\nReturns the truth value of x OR y, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LogicalOr(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.LOGICAL_OR.\n\n### tf.LookupTableFindV2\n\nNo TOSA lowering defined.\n\n### tf.LookupTableInputV2\n\nNo TOSA lowering defined.\n\n### tf.LookupTableSizeV2\n\nNo TOSA lowering defined.\n\n### tf.MatMul\n\nMultiply the matrix a by the matrix b\n\n**TensorFlow Dialect**\n\n```\n%output = tf.MatMul(%a, %b)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.MATMUL(%a, %b)\n```\n\n### tf.MatrixDiag\n\nNo TOSA lowering defined.\n\n### tf.MatrixDiagV2\n\nNo TOSA lowering defined.\n\n### tf.MatrixDiagV3\n\nNo TOSA lowering defined.\n\n### tf.MatrixSetDiag\n\nNo TOSA lowering defined.\n\n### tf.MatrixSetDiagV2\n\nNo TOSA lowering defined.\n\n### tf.MatrixSetDiagV3\n\nNo TOSA lowering defined.\n\n### tf.Max\n\nComputes the maximum of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Max(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_MAX>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.MaxPoolGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.MaxPool\n\nPerforms max pooling on the input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.MaxPool(%input) {ksize, strides, padding, data_format}\n```\n\n**TOSA Lowering**\n\n```\nassert(data_format == \"NHWC\")\n\ntosa_padding =\n     get_padding_values_from_pad_type(%input, ksize, padding, data_format,\n                                      FORMAT_OHWI, strides, {1, 1, 1, 1})\n%output = tosa.MAX_POOL2D(%value) {ksize=ksize, strides=strides, padding=tosa_padding}\n```\n\n### tf.Maximum\n\nThis operator is trivially lowered to tosa.MAXIMUM.\n\n### tf.Mean\n\nComputes the mean of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Mean(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\nint32 num_elements_on_axis = 1\nfor (int32 axis : %reduction_indices) {\n    num_elements_on_axis *= %input.shape[axis]\n}\nfloat32 div_scale = 1.0 / num_elements_on_axis\n\n%cst_div_scale = tosa.CONST() {value={div_scale}}\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_SUM>(%input, %output.shape, %reduction_indices, keep_dims)\n%op2_mul_op1 = tosa.MUL(%op1_rsum_in, %cst_div_scale)\n```\n\n### tf.Min\n\nComputes the minimum of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Min(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_MIN>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.Minimum\n\nThis operator is trivially lowered to tosa.MAXIMUM.\n\n### tf.MirrorPad\n\nNo TOSA lowering defined.\n\n### tf.MlirPassthroughOp\n\nNo TOSA lowering defined.\n\n### tf.MulNoNan\n\nNo TOSA lowering defined.\n\n### tf.Mul\n\nReturns the product of x and y, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Mul(%x, %y)\n```\n\n**TOSA Lowering** This operator is trivially lowered to tosa.MUL.\n\n### tf.Neg\n\nThis operator is trivially lowered to tosa.NEGATE.\n\n### tf.NoOp\n\nNo TOSA lowering defined.\n\n### tf.NonMaxSuppressionV4\n\nNo TOSA lowering defined.\n\n### tf.NonMaxSuppressionV5\n\nNo TOSA lowering defined.\n\n### tf.NotEqual\n\nReturns the truth value of (x != y) element-wise with broadcasting.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.NotEqual(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%equal = tosa.EQUAL(%x, %y)\n%output = tosa.NOT(%equal)\n```\n\n### tf.OneHot\n\nOneHot operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tf.OneHot(%indices, %depth, %on_value, %off_value) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_one_hot_op(%indices, %depth, %on_value, %off_value, axis)\n```\n\n### tf.OutputEnqueueTuple\n\nNo TOSA lowering defined.\n\n### tf.Pack\n\nPacks a list of N rank-R tensors into one rank-(R+1) tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Pack(%values) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_pack_op(%values, axis)\n```\n\n### tf.Pad\n\nThis operator is trivially lowered to tosa.PAD.\n\n### tf.PadV2\n\nNo TOSA lowering defined.\n\n### tf.ParseExampleV2\n\nNo TOSA lowering defined.\n\n### tf.PartitionedCall\n\nNo TOSA lowering defined.\n\n### tf.Placeholder\n\nNot seen in practice. No lowering needed.\n\n### tf.PlaceholderWithDefault\n\nNot seen in practice. No lowering needed.\n\n### tf.Pow\n\nThis operator is trivially lowered to tosa.POW.\n\n### tf.PreventGradient\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.Prod\n\nComputes the product of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Prod(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_PRODUCT>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.QuantizeAndDequantize\n\nNo TOSA lowering defined.\n\n### tf.QuantizeAndDequantizeV2\n\nNo TOSA lowering defined.\n\n### tf.QuantizeAndDequantizeV3\n\nNo TOSA lowering defined.\n\n### tf.RFFT\n\nNo TOSA lowering defined.\n\n### tf.RandomShuffle\n\nNo TOSA lowering defined.\n\n### tf.RandomStandardNormal\n\nNo TOSA lowering defined.\n\n### tf.RandomUniform\n\nNo TOSA lowering defined.\n\n### tf.Range\n\nNo TOSA lowering defined.\n\n### tf.Rank\n\nReturns the rank of the tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Rank(%input)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.CONST() {value={%input.rank}}\n```\n\n### tf.ReadVariableOp\n\nNo TOSA lowering defined.\n\n### tf.RealDiv\n\nReturns x / y element-wise for real types.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.RealDiv(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%recip = tosa.RECIPROCAL(%y)\n%output = tosa.MUL(%x, %recip)\n```\n\n### tf.Real\n\nNo TOSA lowering defined.\n\n### tf.Reciprocal\n\nThis operator is trivially lowered to tosa.RECIPROCAL.\n\n### tf.Relu6\n\nComputes rectified linear 6: min(max(features, 0), 6).\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Relu6(%features)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.RELUN(%features) {max_val=6}\n```\n\n### tf.ReluGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.Relu\n\nComputes rectified linear 6: max(features, 0)\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Relu(%features)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.RELUN(%features) {max_val=0}\n```\n\n### tf.Reshape\n\nReshapes a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Reshape(%tensor, %shape)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.RESHAPE(%tensor) {new_shape=%shape.as_constant}\n```\n\n### tf.ResizeBilinear\n\nResizes images to size using bilinear interpolation.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ResizeBilinear(%images, %size) {align_corners, half_pixel_centers}\n```\n\ninferred from output shape. **TOSA Lowering**\n\n```\n%output = lower_resize_op(%images, %size, float, \"BILINEAR\")\n```\n\n### tf.ResizeNearestNeighbor\n\nResizes images to size using nearest neighbor interpolation.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ResizeNearestNeighbor(%images, %size) {align_corners, half_pixel_centers}\n```\n\ninferred from output shape. **TOSA Lowering**\n\n```\n%output = lower_resize_op(%images, %size, %output, float, \"NEAREST_NEIGHBOR\")\n```\n\n### tf.ResourceApplyAdam\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.ResourceApplyGradientDescent\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.ResourceApplyKerasMomentum\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.ResourceGather\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.ResourceScatterUpdate\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.ReverseSequence\n\nNo TOSA lowering defined.\n\n### tf.ReverseV2\n\nReverses specific dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ReverseV2(%tensor, %axis)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reversev2_op(%tensor, %axis)\n```\n\n### tf.RightShift\n\nComputes the bitwise left-shift of x by y bits, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.LeftShift(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\nif (is_unsigned(%x.dtype)) {\n  %output = tosa.LOGICAL_RIGHT_SHIFT(%x, %y)\n} else {\n  %output = tosa.ARITHMETIC_RIGHT_SHIFT(%x, %y)\n}\n```\n\n### tf.Round\n\nRounds the values of a tensor to the nearest integer, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Round(%x)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_round_op(%x)\n```\n\n### tf.RsqrtGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.Rsqrt\n\nThis operator is trivially lowered to tosa.RSQRT.\n\n### tf.SegmentMax\n\nNo TOSA lowering defined.\n\n### tf.SegmentMean\n\nNo TOSA lowering defined.\n\n### tf.SegmentMin\n\nNo TOSA lowering defined.\n\n### tf.SegmentProd\n\nNo TOSA lowering defined.\n\n### tf.SegmentSum\n\nNo TOSA lowering defined.\n\n### tf.Select\n\nNo TOSA lowering defined.\n\n### tf.SelectV2\n\nSelects elements from t or e depending on condition.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.SelectV2(%condition, %t, %e)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_selectv2_op(%condition, %t, %e, %output.shape)\n```\n\n### tf.ShapeN\n\nNo TOSA lowering defined.\n\n### tf.Shape\n\nReturns the shape of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Shape(%input)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_shape_op(%input)\n```\n\n### tf.Sigmoid\n\nThis operator is trivially lowered to tosa.SIGMOID.\n\n### tf.Sign\n\nNo TOSA lowering defined.\n\n### tf.Sin\n\nNo TOSA lowering defined.\n\n### tf.Size\n\nNo TOSA lowering defined.\n\n### tf.Slice\n\nReturns a slice from input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Slice(%input, %begin, %size)\n```\n\n**TOSA Lowering**\n\n```\nvector <size_t> output_size\ntry {\n  output_size = %size.as_constant()\n} except(ConversionFailed) {\n  output_size = %output.shape\n}\n\n%output = tosa.SLICE(%input) {start=begin, size=output_size}\n```\n\n### tf.Snapshot\n\nNo TOSA lowering defined.\n\n### tf.SoftmaxCrossEntropyWithLogits\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.Softmax\n\nComputes softmax activations\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Softmax(%logits)\n```\n\n**TOSA Lowering**\n\n```\n%op1 = tosa.EXP(%logits)\n%op2 = tosa.REDUCE_SUM(op1) {reduce_axis=(%logits.rank - 1)}\n%op3 = tosa.RECIPROCAL(%op2)\n%output = tosa.MUL(%op1, %op3)\n```\n\n### tf.Softplus\n\nNo TOSA lowering defined.\n\n### tf.SpaceToBatchND\n\nSpaceToBatch for N-D tensors of type T.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.SpaceToBatchND(%input, %block_shape, %paddings)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_space_to_batch_nd_op(%input, %block_shape, %paddings)\n```\n\n### tf.SpaceToDepth\n\nSpaceToDepth for tensors of type T.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.SpaceToDepth(%input) {block_size, data_format}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_space_to_depth_op(%input, block_size, data_format)\n```\n\n### tf.SparseMatMul\n\nNo TOSA lowering defined.\n\n### tf.SparseSoftmaxCrossEntropyWithLogits\n\nNo TOSA lowering defined.\n\n### tf.SparseToDense\n\nNo TOSA lowering defined.\n\n### tf.Split\n\nSplits a tensor into num_split tensors along one dimension\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Split(%split_dim, %value) {num_split}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_split_op(%value, %split_dim.as_constant(), num_split)\n```\n\n### tf.SplitV\n\nSplits a tensor into num_split tensors along one dimension\n\n**TensorFlow Dialect**\n\n```\n%output = tf.SplitV(%value, %size_splits, %split_dim) {num_split}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_splitv_op(%value, %size_splits.as_constant(), %split_dim.as_constant())\n```\n\n### tf.Sqrt\n\nNo TOSA lowering defined.\n\n### tf.Square\n\nComputes the square of x, element-wise.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Square(%x)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.MUL(%x, %x)\n```\n\n### tf.SquareDifference\n\nComputes (x-y)\\*(x-y) element-wise\n\n**TensorFlow Dialect**\n\n```\n%output = tf.SquareDifference(%x, %y)\n```\n\n**TOSA Lowering**\n\n```\n%diff = tosa.SUB(%x, %y)\n%output = tosa.MUL(%diff, %diff)\n```\n\n### tf.Squeeze\n\nRemoves dimensions of size 1 from the shape of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Squeeze(%input) {squeeze_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_squeeze_op(%input, squeeze_dims)\n```\n\n### tf.StatefulPartitionedCall\n\nNo TOSA lowering defined.\n\n### tf.StopGradient\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.StridedSliceGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.StridedSlice\n\nReturn a strided slice from input.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.StridedSlice(%input, %begin, %end, %strides) {begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_strided_slice_op(%input, %begin, %end, %strides, begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask)\n```\n\n### tf.Sub\n\nThis operator is trivially lowered to tosa.SUB.\n\n### tf.Sum\n\nComputes the sum of elements across dimensions of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Sum(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reduce_op<tosa.REDUCE_SUM>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tf.TPUCompilationResult\n\nNo TOSA lowering defined.\n\n### tf.TPUCopyWithLayout\n\nNo TOSA lowering defined.\n\n### tf.TPUExecuteAndUpdateVariables\n\nNo TOSA lowering defined.\n\n### tf.TPUExecute\n\nNo TOSA lowering defined.\n\n### tf.TPUGetLayout\n\nNo TOSA lowering defined.\n\n### tf.TPUReplicateMetadata\n\nNo TOSA lowering defined.\n\n### tf.TPUReplicatedInput\n\nNo TOSA lowering defined.\n\n### tf.TPUReplicatedOutput\n\nNo TOSA lowering defined.\n\n### tf.TPUReshardVariables\n\nNo TOSA lowering defined.\n\n### tf.TanhGrad\n\nTraining profile: TOSA lowering not yet defined.\n\n### tf.Tanh\n\nThis operator is trivially lowered to tosa.TANH.\n\n### tf.TensorListFromTensor\n\nNo TOSA lowering defined.\n\n### tf.TensorListGetItem\n\nNo TOSA lowering defined.\n\n### tf.TensorListLength\n\nNo TOSA lowering defined.\n\n### tf.TensorListPushBack\n\nNo TOSA lowering defined.\n\n### tf.TensorListReserve\n\nNo TOSA lowering defined.\n\n### tf.TensorListResize\n\nNo TOSA lowering defined.\n\n### tf.TensorListSetItem\n\nNo TOSA lowering defined.\n\n### tf.TensorListStack\n\nNo TOSA lowering defined.\n\n### tf.TensorScatterUpdate\n\nNo TOSA lowering defined.\n\n### tf.Tile\n\nConstructs a tensor by tiling a given tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Tile(%input, %multiples)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.TILE(%input) {multiples=%multiples.as_constant()}\n```\n\n### tf.ToBool\n\nNo TOSA lowering defined.\n\n### tf.TopKV2\n\nNo TOSA lowering defined.\n\n### tf.Transpose\n\nShuffle dimensions of x according to a permutation.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Transpose(%x, %perm)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.TRANSPOSE(%x) {perm=%perm.as_constant()}\n```\n\n### tf.TruncateDiv\n\nNo TOSA lowering defined.\n\n### tf.Unique\n\nNo TOSA lowering defined.\n\n### tf.Unpack\n\nUnpacks a given dimension of a rank-R tensor into num rank-(R-1) tensors.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.Unpack(%value) {axis, num}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_unpack_op(%value, axis, num)\n```\n\n### tf.UnsortedSegmentMax\n\nNo TOSA lowering defined.\n\n### tf.UnsortedSegmentMin\n\nNo TOSA lowering defined. === tf.UnsortedSegmentProd\n\nNo TOSA lowering defined. === tf.UnsortedSegmentSum\n\nNo TOSA lowering defined.\n\n### tf.VarHandle\n\nNo TOSA lowering defined.\n\n### tf.VariableShape\n\nNo TOSA lowering defined.\n\n### tf.Where\n\nNo TOSA lowering defined.\n\n### tf.While\n\nNo TOSA lowering defined.\n\n### tf.Xdivy\n\nNo TOSA lowering defined.\n\n### tf.XlaDynamicUpdateSlice\n\nNo TOSA lowering defined.\n\n### tf.XlaSharding\n\nNo TOSA lowering defined.\n\n### tf.ZerosLike\n\nReturns a tensor of zeros with the same shape and type as x.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.ZerosLike(%x)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.CONST() {value={0} * %x.num_elements}\n```\n\n## TensorFlow Lite MLIR Dialect Legalization (legalize_tfl)\n\n### tfl.abs\n\nThis operator is trivially lowered to tosa.ABS\n\n### tfl.add_n\n\nadd_n operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%sum = tfl.add_n(%inputs)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.ADD(%inputs:0, %inputs:1)\nfor (int32 i = 2 i < %inputs.size i++) {\n    %output = tosa.ADD(%inputs:i, %output)\n}\n```\n\n### tfl.add\n\nElement-wise addition operation.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.add(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%result = tosa.ADD(%lhs, %rhs)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 max_scale_2x = 2.0 * max(%lhs.scale, %rhs.scale)\nfloat64 lhs_scale = float64(1 << input_shift) * %lhs.scale / max_scale_2x\nfloat64 rhs_scale = float64(1 << input_shift) * %rhs.scale / max_scale_2x\nfloat64 output_scale = max_scale_2x / (%output.scale * float64(1 << input_shift))\n\n```\n\nLegalization:\n\n```\n%op1_rescale_lhs = tosa.RESCALE(%lhs) {scale=lhs_scale, input_zp=%lhs.zp, output_zp=0} // %lhs.dtype->i32\n%op2_rescale_rhs = tosa.RESCALE(%rhs) {scale=rhs_scale, input_zp=%rhs.zp, output_zp=0} // %rhs.dtype->i32\n%op3_add_op1_op2 = tosa.ADD(%op1_rescale_lhs, %op2_rescale_rhs)\n%op4_rescale_op3 = tosa.RESCALE(%op3_add_op1_op2) {scale=output_scale} // i32->%output.dtype\n```\n\n### tfl.arg_max\n\nArgMax operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.arg_max(%input, %dim)\n```\n\n**TOSA Lowering**\n\n```\n%result = tosa.ARGMAX(%input) {axis=positive_axis(%dim_const.as_constant(), %input.rank)}\n```\n\n### tfl.arg_min\n\nNo TOSA lowering defined.\n\n### tfl.average_pool_2d\n\nAverage_pool_2d operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.average_pool_2d(%input) {filter_height, filter_width, padding, stride_h, stride_w, fused_activation_function}\n```\n\n**TOSA Lowering**\n\nPrepare:\n\n```\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, tensor<{filter_height, filter_width}, tosa.int32>,\n                                      {1, stride_h, stride_w, 1}, {1, 1, 1, 1})\n```\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%avgpool2d = tosa.AVG_POOL2D(%input) {kernel={filter_height, filter_width}, stride={stride_h, stride_w}, padding=tosa_padding}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%avgpool2d, fused_activation)\n}\nelse {\n    %result = %avgpool2d\n}\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%avgpool2d = tosa.AVG_POOL2D(%input) {kernel={filter_height, filter_width}, stride={stride_h, stride_w}, padding=tosa_padding, quantization_info={input_zp=%input.zp, output_zp=%output.zp}}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%avgpool2d, fused_activation)\n}\nelse {\n    %result = %avgpool2d\n}\n```\n\n### tfl.basic_lstm\n\nNo TOSA lowering defined.\n\n### tfl.batch_to_space_nd\n\nBatchToSpaceNd operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.batch_to_space_nd(%input, %block_shape, %indices)\n```\n\n**TOSA Lowering**\n\n```\n%result = convert_batch_to_space_nd_op(%input, %block_shape, %indices)\n```\n\n### tfl.cast\n\nThis operator is trivially lowered to tosa.CAST\n\n### tfl.ceil\n\nCeil operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.ceil(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%result = tosa.CEIL(%x)\n```\n\n### tfl.concatenation\n\nConcatenation operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.concatenation(%values) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%result = lower_concatv2_op(%values, axis)\n```\n\n### tfl.pseudo_const\n\nThis operator is trivially lowered to tosa.CONST\n\n### tfl.conv_2d\n\nConvolution operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.conv_2d(%input, %filter, %bias) {dilation_h_factor, dilation_w_factor, fused_activation_function, padding, stride_h, stride_w}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nPrepare:\n\n```\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, %filter.type,\n                                      {1, stride_h, stride_w, 1}, {1, dilation_h_factor, dilation_w_factor, 1})\n```\n\nLegalization:\n\n```\n%conv2d = tosa.CONV2D(%input, %filter, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={dilation_h_factor, dilation_w_factor}}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%conv2d, fused_activation_function)\n}\nelse {\n    %result = %conv2d\n}\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 output_rescale_scale = (%input.scale * %filter.scale) / %output.scale\n\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, %filter.type,\n                                      {1, stride_h, stride_w, 1}, {1, dilation_h_factor, dilation_w_factor, 1})\n```\n\nLegalization:\n\n```\n%conv2d = tosa.CONV2D(%input, %filter, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={dilation_h_factor, dilation_w_factor}, quantization_info={input_zp=%input.zp, weight_zp=%filter.zp}}\n%rescale = tosa.RESCALE(%conv2d) {scale=output_rescale_scale, input_zp=0, output_zp=%output.zp} // %conv2d.dtype->%output.dtype\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%rescale, fused_activation_function)\n}\nelse {\n    %result = %rescale\n}\n```\n\n### tfl.convolution_2d_transpose_bias\n\nNo TOSA lowering defined.\n\n### tfl.cos\n\nNo TOSA lowering defined.\n\n### tfl.densify\n\nNo TOSA lowering defined.\n\n### tfl.depth_to_space\n\nDepthToSpace operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.depth_to_space(%input) {block_size}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_depth_to_space_op(%input, block_size, \"NHWC\")\n```\n\n### tfl.depthwise_conv_2d\n\nDepthwise-separable convolution operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.depthwise_conv_2d(%input, %filter, %bias) {dilation_h_factor, dilation_w_factor, fused_activation_function, padding, stride_h, stride_w, depth_multiplier}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nPrepare:\n\n```\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, %filter.type,\n                                      {1, stride_h, stride_w, 1}, {1, dilation_h_factor, dilation_w_factor, 1})\n```\n\nLegalization:\n\n```\n%depthwise_conv2d = tosa.DEPTHWISE_CONV2D(%input, %filter, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={dilation_h_factor, dilation_w_factor}}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%depthwise_conv2d, fused_activation_function)\n}\nelse {\n    %result = %depthwise_conv2d\n}\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 output_rescale_scale = (%input.scale * %filter.scale) / %output.scale\n\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, %filter.type,\n                                      {1, stride_h, stride_w, 1}, {1, dilation_h_factor, dilation_w_factor, 1})\n```\n\nLegalization:\n\n```\n%depthwise_conv2d = tosa.DEPTHWISE_CONV2D(%input, %filter, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={dilation_h_factor, dilation_w_factor}, quantization_info={input_zp=%input.zp, weight_zp=%filter.zp}}\n%rescale = tosa.RESCALE(%conv2d) {scale=output_rescale_scale, input_zp=0, output_zp=%output.zp} // %depthwise_conv2d.dtype->%output.dtype\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%rescale, fused_activation_function)\n}\nelse {\n    %result = %rescale\n}\n```\n\n### tfl.dequantize\n\nDequantize operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.dequantize(%input)\n```\n\n**TOSA Lowering**\n\n```\n%result = lower_dequantize_op(%input, %input.scale, %input.zp)\n```\n\n### tfl.div\n\nDivision operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.div(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%rcp = tosa.RECIPROCAL(%rhs)\n%mul = tosa.MUL(%lhs, %rcp)\n```\n\n### tfl.elu\n\nExponential Linear Unit operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.elu(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%rcp = lower_elu_op(%x)\n```\n\n### tfl.embedding_lookup\n\nEmbedding lookup operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.embedding_lookup(%lookup, %value)\n```\n\n### tfl.equal\n\nThis operator is trivially lowered to tosa.EQUAL\n\n### tfl.exp\n\nNatural exponentiation operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.exp(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%result = tosa.EXP(%x)\n```\n\n### tfl.expand_dims\n\nInserts a dimension of 1 into a tensor’s shape.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.expand_dims(%input, %dim)\n```\n\n**TOSA Lowering**\n\n```\n%result = lower_expand_dims(%input, %dim.as_constant())\n```\n\n### tfl.external_const\n\nNo TOSA lowering defined.\n\n### tfl.fake_quant\n\nFakeQuant operator\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.fake_quant(%input) {min, max, num_bits, narrow_range}\n```\n\n**TOSA Lowering**\n\n```\n%result = convert_fake_quant_op(%input, min, max, num_bits, narrow_range)\n```\n\n### tfl.fill\n\nFill the tensor with given value.\n\n**TensorFlow Lite Dialect**\n\n```\n%res = tfl.fill(%dims, %value)\n```\n\n**TOSA Lowering**\n\nPrepare:\n\n```\ntotal_size = 1\ndim_vec = %dim.as_constant()\nfor(int32 i = 0 i < dim_vec.size() i++) {\n    total_size *= dim_vec[i]\n}\nfilled_val = %value.as_constant()[0]\noutput_type = tensor<dim_vec, filled_val.dtype>\n```\n\nLegalization:\n\n```\n%result = tosa.CONST() {value={filled_val} * total_size}\n```\n\n### tfl.floor_div\n\nFloor div operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.floor_div(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%recip = tosa.RECIPROCAL(%rhs)\n%mul = tosa.MUL(%lhs, %recip)\n%result = tosa.FLOOR(%mul)\n```\n\n### tfl.floor_mod\n\nDivision remainder.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.floor_mod(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%recip = tosa.RECIPROCAL(%rhs)\n%mul = tosa.MUL(%lhs, %recip)\n%floor = tosa.FLOOR(%mul)\n%result = tosa.SUB(%mul, %floor)\n```\n\n### tfl.floor\n\nThis operator is trivially lowered to tosa.FLOOR\n\n### tfl.fully_connected\n\nFully connected op.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.fully_connected(%input, %filter, %bias) {fused_activation_function}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nPrepare:\n\n```\n// input[N, IC] x filter[OC, IC] + bias[OC] -> output[N, OC]\nauto input_reshape_shape = {%input.num_elements / %filter.shape[1], %filter.shape[1]}\n```\n\nLegalization:\n\n```\nif(!(%bias)) {\n    %bias_val = tosa.CONST() {value={0} * %filter.shape[3]}\n}\nelse {\n    %bias_val = %bias\n}\nif(%input.rank != 2) {\n    %input_val = tosa.RESHAPE(%input) {shape=input_reshape_shape}\n}\nelse {\n    %input_val = %input\n}\n%fc = tosa.FULLY_CONNECTED(%input_val, %filter, %bias_val)\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%fc, fused_activation_function)\n}\nelse {\n    %result = %fc\n}\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nauto input_reshape_shape = {%input.num_elements / %filter.shape[1], %filter.shape[1]}\nfloat64 output_rescale_scale = (%input.scale * %filter.scale) / %output.scale\n```\n\nLegalization:\n\n```\nif(!(%bias)) {\n    %bias_val = tosa.CONST() {value={0} * %filter.shape[3]}\n}\nelse {\n    %bias_val = %bias\n}\nif(%input.rank != 2) {\n    %input_val = tosa.RESHAPE(%input) {shape=input_reshape_shape}\n}\nelse {\n    %input_val = %input\n}\n%fc = tosa.FULLY_CONNECTED(%input_val, %filter, %bias_val)\n%rescale = tosa.RESCALE(%fc) {scale=output_rescale_scale, input_zp=0, output_zp=%output.zp} // %fc.dtype->%output.dtype\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%rescale, fused_activation_function)\n}\nelse {\n    %result = %rescale\n}\n```\n\n### tfl.gather_nd\n\nGather_nd operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.gather_nd(%params, %indices)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_gather_nd_op(%params, %indices)\n```\n\n### tfl.gather\n\nGather operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.gather(%params, %indices) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_gather_op(%params, %indices, 0, axis)\n```\n\n### tfl.greater_equal\n\nThis operator is trivially lowered to tosa.GREATER_EQUAL\n\n### tfl.greater\n\nThis operator is trivially lowered to tosa.GREATER\n\n### tfl.hard_swish\n\nHardswish activation function.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.hard_swish(%input)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\n```\n%const_3 = tosa.CONST() {value={3.0}}\n%const_rcp6 = tosa.CONST() {value={1.0 / 6.0}}\n%op1_add_in_3 = tosa.ADD(%input, %const_3)\n%op2_relun_op1 = tosa.RELUN(%op1_add_in_3) {max=6.0}\n%op3_mul_in_op2 = tosa.MUL(%input, %op2_relun_op1)\n%op4_mul_op3_rcp6 = tosa.MUL(%op3, %const_rcp6)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 input_sample_grain = 1.0 / 64.0\nauto hardswish_func = [input_sample_grain](int32 x) -> int32 {\n    float64 v = (float64)x * input_sample_grain\n    float64 w = v + 3.0\n    w = (w < 0.0) ? 0.0 : ((w > 6.0) ? 6.0 : w)\n    v = (v * w) / 6.0\n    return std::lround(32768.0 * v)\n}\nfloat64 input_rescale_scale = (%input.scale * 128.0) / input_sample_grain\nfloat64 output_rescale_scale = 1.0 / (128.0 * 32768.0 * %output.scale)\nint32 quantized_3 = (int32)(std::ceil(3.0 / %input.scale)) + %input.zp\n```\n\nLegalization:\n\n```\n%table_const = get_table_const_tensor(hardswish_func)\n%const_3 = tosa.CONST() {value={quantized_3}}\n%op1_rescale_in = tosa.RESCALE(%input) {scale=input_rescale_scale, input_zp=%input.zp, output_zp=0} // %input.dtype->i16\n%op2_table_op1 = tosa.TABLE(%op1_rescale_in, %table_const)\n%op3_rescale_op2 = tosa.RESCALE(%op2_table_op1) {scale=output_rescale_scale, input_zp=0, output_zp=%output.zp} // i32->%output.dtype\n%op4_rescale_in = tosa.RESCALE(%input {scale=1.0, input_zp=0, output_zp=0} // %input.dtype->i32\n%op5_ge_op4 = tosa.GREATER_EQUAL(%op4_rescale_in, %const_3)\n%op6_select_op5_in_op3 = tosa.SELECT(%op5_ge_op4, %input, %op3_rescale_op2)\n```\n\n### tfl.l2_normalization\n\nNo TOSA lowering defined.\n\n### tfl.lstm\n\nNo TOSA lowering defined.\n\n### tfl.leaky_relu\n\nLeaky Relu Operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.leaky_relu(%input) {alpha}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%const_0 = tosa.CONST() {value={0.0}}\n%const_alpha = tosa.CONST() {value={alpha}}\n%op1_mul_in_alpha = tosa.MUL(%input, %const_alpha)\n%op2_ge_in_0 = tosa.GREATER_EQUAL(%input, %const_0)\n%op3_select_op2_in_op1 = tosa.SELECT(%op2_ge_in_0, %input, $op1_mul_in_alpha)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat32 scaled_alpha = (%input.scale * alpha) / %output.scale\nfloat32 scaled_identity = %input.scale / %output.scale\n```\n\nLegalization:\n\n```\n%const_0 = tosa.CONST() {value={0}}\n%op1_rescale_in = tosa.RESCALE(%input) {scale=1.0, input_zp=%input.zp} // %input.dtype->i32\n%op2_ge_in_0 = tosa.GREATER_EQUAL(%input, %const_0)\n%op3_rescale_in_alpha = tosa.RESCALE(%input) {scale=scaled_alpha, input_zp=%input.zp, output_zp=%output_zp} // %input.dtype->%output.dtype\n%op4_rescale_in_identity = tosa.RESCALE(%input) {scale=scaled_identity, input_zp=%input.zp, output_zp=%output_zp} // %input.dtype->%output.dtype\n%op5_select_op2_op3_op4 = tosa.SELECT(%op2_ge_in_0, %op4_rescale_in_identity, %op3_rescale_in_alpha)\n```\n\n### tfl.less_equal\n\nLess_equal operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.less_equal(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_greater_lhs_rhs = tosa.GREATER(%lhs, %rhs)\n%op2_not_op1 = tosa.LOGICAL_NOT(%op1_greater_lhs_rhs)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\nassert (%lhs.scale == %rhs.scale) && (%lhs.zp == %rhs.zp)\n\n%op1_rescale_lhs = tosa.RESCALE(%lhs) {scale=1.0, input_zp=%lhs.zp, output_zp=0} // %lhs.dtype->i32\n%op2_rescale_rhs = tosa.RESCALE(%rhs) {scale=1.0, input_zp=%rhs.zp, output_zp=0} // %rhs.dtype->i32\n%op3_greater_op1_op2 = tosa.GREATER(%op1_rescale_lhs, %op2_rescale_rhs)\n%op4_not_op3 = tosa.LOGICAL_NOT(%op3_greater_op1_op2)\n```\n\n### tfl.less\n\nLess operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.less(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_ge_lhs_rhs = tosa.GREATER_EQUAL(%lhs, %rhs)\n%op2_not_op1 = tosa.LOGICAL_NOT(%op1_ge_lhs_rhs)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\nassert (%lhs.scale == %rhs.scale) && (%lhs.zp == %rhs.zp)\n\n%op1_rescale_lhs = tosa.RESCALE(%lhs) {scale=1.0, input_zp=%lhs.zp, output_zp=0} // %lhs.dtype->i32\n%op2_rescale_rhs = tosa.RESCALE(%rhs) {scale=1.0, input_zp=%rhs.zp, output_zp=0} // %rhs.dtype->i32\n%op3_ge_op1_op2 = tosa.GREATER_EQUAL(%op1_rescale_lhs, %op2_rescale_rhs)\n%op4_not_op3 = tosa.LOGICAL_NOT(%op3_ge_op1_op2)\n```\n\n### tfl.local_response_normalization\n\nNo TOSA lowering defined.\n\n### tfl.log\n\nNo TOSA lowering defined.\n\n### tfl.log_softmax\n\nLog softmax operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.log_softmax(%input)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%output = lower_log_softmax_op(%logits)\n```\n\nNo TOSA lowering defined if input/output tensors are all quantized typed.\n\n### tfl.logical_and\n\nThis operator is trivially lowered to tosa.LOGICAL_AND\n\n### tfl.logical_not\n\nThis operator is trivially lowered to tosa.LOGICAL_NOT\n\n### tfl.logical_or\n\nThis operator is trivially lowered to tosa.LOGICAL_OR\n\n### tfl.logistic\n\nLogistic operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.logistic(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_sigmoid_in = tosa.SIGMOID(%x)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 input_sample_grain = 1.0 / 16.0\nauto sigmoid_func = [input_sample_grain](int32 x) -> int32 {\n  float64 v = static_cast<float64>(x) * input_sample_grain\n  v = 1.0 / (1.0 + std::exp(-v))\n  return std::lround(32768.0 * v)\n}\n\nfloat32 input_rescale_scale = (%x.scale * 128.0) / input_sample_grain\nfloat32 output_rescale_scale = 1.0 / (%y.scale * 32768.0 * 128.0);\n```\n\nLegalization:\n\n```\n%table_const = get_table_const_tensor(sigmoid_func)\n%op1_rescale_in = tosa.RESCALE(%x) {scale=input_rescale_scale, input_zp=%x.zp, output_zp=0} // %x.dtype->i16\n%op2_table_op1 = tosa.TABLE(%op1_rescale_in, %table_const)\n%op3_rescale_op2 = tosa.RESCALE(%op2_table_op1) {scale=output_rescale_scale, input_zp=0, output_zp=%y.zp} // %int32->%y.dtype\n```\n\n### tfl.matrix_diag\n\nNo TOSA lowering defined.\n\n### tfl.matrix_set_diag\n\nNo TOSA lowering defined.\n\n### tfl.max_pool_2d\n\nMax Pool 2d op.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.max_pool_2d(%input) {filter_height, filter_width, padding, stride_h, stride_w, fused_activation_function}\n```\n\n**TOSA Lowering**\n\nPrepare:\n\n```\ntosa_padding =\n     get_padding_values_from_pad_type(padding, NHWC, 1,\n                                      %input.type, tensor<{filter_height, filter_width}, tosa.int32>,\n                                      {1, stride_h, stride_w, 1}, {1, 1, 1, 1})\n```\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%maxpool2d = tosa.MAX_POOL2D(%input) {kernel={filter_height, filter_width}, stride={stride_h, stride_w}, padding=tosa_padding}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%maxpool2d, fused_activation)\n}\nelse {\n    %result = %maxpool2d\n}\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%maxpool2d = tosa.MAX_POOL2D(%input) {kernel={filter_height, filter_width}, stride={stride_h, stride_w}, padding=tosa_padding, quantization_info={input_zp=%input.zp, output_zp=%output.zp}}\nif(fused_activation != NONE) {\n    %result = convert_fused_activation(%maxpool2d, fused_activation)\n}\nelse {\n    %result = %maxpool2d\n}\n```\n\n### tfl.max_pooling_with_argmax_2d\n\nNo TOSA lowering defined.\n\n### tfl.max_unpooling_2d\n\nNo TOSA lowering defined.\n\n### tfl.maximum\n\nThis operator is trivially lowered to tosa.MAXIMUM\n\n### tfl.mean\n\nMean operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.mean(%input, %axis) {keep_dims}\n```\n\n**TOSA Lowering**\n\nPrepare:\n\n```\nint32 num_elements_on_axis = 1\nfor (int32 axis : %reduction_indices) {\n    num_elements_on_axis *= %input.shape[axis]\n}\nfloat32 div_scale = 1.0 / num_elements_on_axis\n```\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%cst_div_scale = tosa.CONST() {value={div_scale}}\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_SUM>(%input, %output.shape, %axis, keep_dims)\n%op2_mul_op1 = tosa.MUL(%op1_rsum_in, %cst_div_scale)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%rsum = lower_reduce_op<tosa.REDUCE_SUM>(%op1_rescale_in, %output.shape, %reduction_indices, keep_dims, 1.0f, %input_zp, div_scale * %input.scale / %output.scale, %output.zp)\n```\n\n### tfl.minimum\n\nThis operator is trivially lowered to tosa.MINIMUM\n\n### tfl.mirror_pad\n\nNo TOSA lowering defined.\n\n### tfl.mul\n\nMul operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.mul(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_mul_in = tosa.MUL(%lhs, %rhs)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%op1_rescale_lhs = tosa.RESCALE(%lhs) {scale=1.0f, input_zp=%lhs.zp, output_zp=0} // %lhs.dtype->i32\n%op2_rescale_rhs = tosa.RESCALE(%rhs) {scale=1.0f, input_zp=%rhs.zp, output_zp=0} // %rhs.dtype->i32\n%op3_mul_op1_op2 = tosa.MUL(%op1_rescale_lhs, %op2_rescale_rhs)\n%op4_rescale_op3 = tosa.RESCALE(%op3_mul_op1_op2) {scale=%lhs.scale * %rhs.scale / %output.scale, input_zp=0, output_zp=%output.zp} // i32->%output.dtype\n```\n\n### tfl.neg\n\nThis operator is trivially lowered to tosa.NEGATE\n\n### tfl.non_max_suppression_v4\n\nNo TOSA lowering defined.\n\n### tfl.non_max_suppression_v5\n\nNo TOSA lowering defined.\n\n### tfl.not_equal\n\nNot_equal operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.not_equal(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_equal_lhs_rhs = tosa.EQUAL(%lhs, %rhs)\n%op2_not_op1 = tosa.LOGICAL_NOT(%op1_equal_lhs_rhs)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\nassert (%lhs.scale == %rhs.scale) && (%lhs.zp == %rhs.zp)\n\n%op1_rescale_lhs = tosa.RESCALE(%lhs) {scale=1.0f, input_zp=%lhs.zp, output_zp=0} // %lhs.dtype->i32\n%op2_rescale_rhs = tosa.RESCALE(%rhs) {scale=1.0f, input_zp=%rhs.zp, output_zp=0} // %rhs.dtype->i32\n%op3_equal_op1_op2 = tosa.EQUAL(%op1_rescale_lhs, %op2_rescale_rhs)\n%op4_not_op3 = tosa.LOGICAL_NOT(%op3_equal_op1_op2) // i32->%output.dtype\n```\n\n### tfl.NumericVerify\n\nNo TOSA lowering defined.\n\n### tfl.one_hot\n\nOneHot operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.one_hot(%indices, %depth, %on_value, %off_value) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_one_hot_op(%indices, %depth, %on_value, %off_value, axis)\n```\n\n### tfl.prelu\n\nNo TOSA lowering defined.\n\n### tfl.pack\n\nPacks a list of tensors along a dimension into one tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tf.pack(%values) {axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_pack_op(%values, axis)\n```\n\n### tfl.pad\n\nThis operator is trivially lowered to tosa.PAD\n\n### tfl.padv2\n\nNo TOSA lowering defined.\n\n### tfl.pow\n\nNo TOSA lowering defined.\n\n### tfl.pseudo_qconst\n\nThis operator is trivially lowered to tosa.CONST\n\n### tfl.quantize\n\nQuantize operator\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.quantize(%input)\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\nif (isa<QuantizedType>(%input.dtype)) {\n    %op1_rescale_in = tosa.RESCALE(%input) {scale=%input.scale / %output.scale, input_zp=%input.zp, output_zp=%output.zp}\n}\nelse {\n    %output = lower_quantize_op(%output.dtype, %input, %output.zp, %output.scale)\n}\n```\n\n### tfl.range\n\nNo TOSA lowering defined.\n\n### tfl.rank\n\nRank operator\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.rank(%input)\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%const = tosa.CONST() {value={%input.rank}}\n```\n\n### tfl.reduce_any\n\nComputes the \"logical or\" of elements across dimensions of a tensor.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.reduce_any(%input, %reduction_indices) {keep_dims}\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_ANY>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tfl.reduce_max\n\nMax-reduction operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.reduce_max(%input, %axes) {keep_dims}\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_MAX>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tfl.reduce_min\n\nComputes the min reduction along the specified axes.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.reduce_min(%input, %axes) {keep_dims}\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_MIN>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tfl.reduce_prod\n\nProd-reduction operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.reduce_prod(%input, %axes) {keep_dims}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all float typed,\n\nLegalization:\n\n```\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_PROD>(%input, %output.shape, %reduction_indices, keep_dims)\n```\n\n### tfl.relu_n1_to_1\n\nNo TOSA lowering defined.\n\n### tfl.relu6\n\nRelu6 operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.relu6(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_relun_in = tosa.RELUN(%input) {max_int=0, max_fp=6.0}\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%op1_rescale_in = tosa.RESCALE(%lhs) {scale=%x.scale / %y.scale, input_zp=%x.zp, output_zp=0} // %x.dtype->i32\n%op2_relun_op1 = tosa.RELUN(%op1_rescale_in) {max_int=(6.0 / %y.scale), max_fp=0.0}\n%op3_rescale_op2 = tosa.RESCALE(%op2_relun_op1) {scale=1.0, input_zp=0, output_zp=%y.zp // i32->%y.dtype\n```\n\n### tfl.relu\n\nRelu operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.relu(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_relun_in = tosa.RELUN(%input) {max_int=0, max_fp=std::numeric_limits<float>::max()}\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%op1_rescale_in = tosa.RESCALE(%lhs) {scale=%x.scale / %y.scale, input_zp=%x.zp, output_zp=0} // %x.dtype->i32\n%op2_relun_op1 = tosa.RELUN(%op1_rescale_in) {max_int=std::numeric_limits<int32>::max(), max_fp=0.0}\n%op3_rescale_op2 = tosa.RESCALE(%op2_relun_op1) {scale=1.0, input_zp=0, output_zp=%y.zp // i32->%y.dtype\n```\n\n### tfl.reshape\n\nThis operator is trivially lowered to tosa.RESHAPE\n\n### tfl.resize_bilinear\n\nResizeBilinear Op.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.resize_bilinear(%input, %size) {aligned_corners, half_pixel_centers}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_resize_op(%input, %size, %input.dtype, \"BILINEAR\")\n```\n\n### tfl.resize_nearest_neighbor\n\nResizeBilinear Op.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.resize_bilinear(%input, %size) {aligned_corners, half_pixel_centers}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_resize_op(%input, %size, %input.dtype, \"NEAREST_NEIGHBOR\")\n```\n\n### tfl.reverse_sequence\n\nNo TOSA lowering defined.\n\n### tfl.reverse_v2\n\nReverseV2 Operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.reverse_v2(%input, %axis)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_reversev2_op(%tensor, %axis)\n```\n\n### tfl.round\n\nRound operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.round(%input)\n```\n\n**TOSA Lowering**\n\n```\n%const_half = tosa.CONST() {value={0.5}}\n%op1_add_in_half = tosa.ADD(%input, %const_half)\n%op2_floor_op1 = tosa.FLOOR(%op1_add_in_half)\n```\n\n### tfl.rsqrt\n\nNo TOSA lowering defined.\n\n### tfl.svdf\n\nNo TOSA lowering defined.\n\n### tfl.segment_sum\n\nNo TOSA lowering defined.\n\n### tfl.select\n\nThis operator is trivially lowered to tosa.SELECT\n\n### tfl.select_v2\n\nThis operator is trivially lowered to tosa.SELECT\n\n### tfl.shape\n\nShape operator\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.shape(%input)\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%const = tosa.CONST() {value=%input.shape}\n```\n\n### tfl.sin\n\nNo TOSA lowering defined.\n\n### tfl.slice\n\nThis operator is trivially lowered to tosa.SLICE\n\n### tfl.softmax\n\nSoftmax operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.softmax(%input)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_exp_in = tosa.EXP(%input)\n%op2_rsum_op1 = tosa.REDUCE_SUM(%op1_exp_in) {axis=(%input.rank-1)}\n%op3_rcp_op2 = tosa.RECIPROCAL(%op2)\n%op4_mul_op1_op3 = tosa.MUL(%op1, %op3)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 exp_sample_grain = 1.0 / 16.0\nauto exp_func = [exp_sample_grain](int32 x) -> int32 {\n  double v = static_cast<float64>(x) * exp_sample_grain\n  v = v < 0.0 ? std::exp(v) : 1.0\n  return std::lround(32768.0 * v)\n}\n\nfloat64 one_over_one_plus_x_sample_grain = 1.0 / 256.0\nauto one_over_one_plus_x_func = [one_over_one_plus_x_sample_grain](int32 x) -> int32 {\n  double v = static_cast<float64>(x) * one_over_one_plus_x_sample_grain\n  v = v < 0.0 ? 1.0 : 1.0 / (1.0 + v)\n  return std::lround(32768.0 * v)\n}\n\nfloat64 op4_rescale_scale = (%input.scale * 128.0) / exp_sample_grain\nfloat64 op19_rescale_scale = 1.0 / (%output.scale * 256.0)\n```\n\nLegalization:\n\n```\n%const_exp_table = get_table_const_tensor(exp_func)\n%const_one_over_one_plus_x_table = get_table_const_tensor(one_over_one_plus_x_func)\n%const_3 = tosa.CONST() {value={3}}\n%const_34 = tosa.CONST() {value={12+20-8}}\n%const_2_to_31 = tosa.CONST() {value={1<<31}}\n%const_16 = tosa.CONST() {value={16}}\n\n%op1_rescale_in = tosa.RESCALE(%lhs) {scale=1.0f, input_zp=%x.zp, output_zp=0} // %x.dtype->i32\n%op2_rmax_op1 = tosa.REDUCE_MAX(%op1_rescale_in) {axis=(%input.rank-1)}\n%op3_sub_op1_op2 = tosa.SUB(%op1_rescale_in, %op2_relun_op1)\n%op4_rescale_op3 = tosa.RESCALE(%op3_sub_op1_op2) {scale=op4_rescale_scale, input_zp=0, output_zp=0} // i32->i16\n%op5_table_op4 = tosa.TABLE(%op4_rescale_op3, %const_exp_table)\n%op6_rshift_op5_3 = tosa.ARITHMETIC_RIGHT_SHIFT(%op5_table_op4, %const_3)\n%op7_rsum_op6 = tosa.REDUCE_SUM(%op6_rshift_op5_3) {axis=(%input.rank-1)}\n%op8_clz_op7 = tosa.CLZ(%op7_rsum_op6)\n%op9_sub_34_op8 = tosa.SUB(%const_34, %op8_clz_op7)\n%op10_lshift_op7_op8 = tosa.LOGICAL_LEFT_SHIFT(%op7_rsum_op6, %op8_clz_op7)\n%op11_sub_op10 = tosa.SUB(%op10_lshift_op7_op8, %const_2_to_31)\n%op12_rshift_op11_16 = tosa.ARITHMETIC_RIGHT_SHIFT(%op11_sub_op10, %const_16)\n%op13_cast_op12 = tosa.CAST(%op12_rshift_op11_16) // i32->i16\n%op14_table_op13 = tosa.TABLE(%op13_cast_op12, %const_one_over_one_plus_x_table)\n%op15_rescale_op14 = tosa.RESCALE(%op14_table_op13) {scale=1.0/128.0, input_zp=0, output_zp=0} // i32->i16\n%op16_rescale_op5 = tosa.RESCALE(%op5_table_op4) {scale=1.0/128.0, input_zp=0, output_zp=0} // i32->i16\n%op17_mul_op16_op15 = tosa.MUL(%op15_rescale_op14, %op16_rescale_op5)\n%op18_rshift_op17_op9 = tosa.ARITHMETIC_RIGHT_SHIFT(%op17_mul_op16_op15, %op9_sub_34_op8)\n%op19_rescale_op18 = tosa.RESCALE(%op18_rshift_op17_op9) {scale=op19_rescale_scale, input_zp=0, output_zp=%output.zp}\n```\n\n### tfl.space_to_batch_nd\n\nSpaceToBatchNd operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.space_to_batch_nd(%input, %block_shape, %paddings)\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_space_to_batch_nd_op(%input, %block_shape, %paddings)\n```\n\n### tfl.space_to_depth\n\nSpaceToDepth operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.space_to_depth(%input) {block_size}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_space_to_depth_op(%input, block_size, \"NHWC\")\n```\n\n### tfl.pseudo_sparse_const\n\nNo TOSA lowering defined.\n\n### tfl.pseudo_sparse_qconst\n\nNo TOSA lowering defined.\n\n### tfl.sparse_to_dense\n\nNo TOSA lowering defined.\n\n### tfl.split\n\nSplits a tensor into num_split tensors along one dimension.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.split(%split_dim, %value) {num_split}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_split_op(%value, %split_dim.as_constant(), num_split)\n```\n\n### tfl.split_v\n\nSplits a tensor into num_split tensors along one dimension.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.split_v(%value, %size_splits, %split_dim) {num_splits}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_splitv_op(%value, %size_splits.as_constant(), %split_dim.as_constant())\n```\n\n### tfl.sqrt\n\nNo TOSA lowering defined.\n\n### tfl.square\n\nSquare operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.square(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_mul_in = tosa.MUL(%x, %x)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%op1_rescale_x = tosa.RESCALE(%x) {scale=1.0f, input_zp=%x.zp, output_zp=0} // %x.dtype->i32\n%op2_mul_op1_op1 = tosa.MUL(%op1_rescale_x, %op1_rescale_x)\n%op3_rescale_op2 = tosa.RESCALE(%op2_mul_op1_op1) {scale=%(x.scale * %x.scale) / %output.scale, input_zp=0, output_zp=%y.zp} // i32->%y.dtype\n```\n\n### tfl.squared_difference\n\nSquared difference operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.squared_difference(%lhs, %rhs)\n```\n\n**TOSA Lowering**\n\nLegalization:\n\n```\n%op1_sub_in = tosa.SUB(%lhs, %rhs)\n%op2_mul_op1 = tosa.MUL(%op1_sub_in, %op1_sub_in)\n```\n\n### tfl.squeeze\n\nRemoves dimensions of size 1 from the shape of a tensor.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.squeeze(%input) {squeeze_dims}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_squeeze_op(%input, squeeze_dims)\n```\n\n### tfl.strided_slice\n\nStridedSlice Op.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.strided_slice(%input, %begin, %end, %strides) {begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_strided_slice_op(%input, %begin, %end, %strides, begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask)\n```\n\n### tfl.sub\n\nThis operator is trivially lowered to tosa.SUB\n\n### tfl.sum\n\nSum operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.sum(%input, %axis) {keep_dims}\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_rsum_in = lower_reduce_op<tosa.REDUCE_SUM>(%input, %output.shape, %axis, keep_dims)\n```\n\nIf input/output tensors are all quantized typed,\n\nLegalization:\n\n```\n%rsum = lower_reduce_op<tosa.REDUCE_SUM>(%op1_rescale_in, %output.shape, %reduction_indices, keep_dims, 1.0f, %input_zp, (%input.scale / %output.scale), %output.zp)\n```\n\n### tfl.tanh\n\nHyperbolic tangent operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%y = tfl.tanh(%x)\n```\n\n**TOSA Lowering**\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%op1_tanh_in = tosa.TANH(%x)\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 input_sample_grain = 1.0 / 32.0\nauto tanh_func = [input_sample_grain](int32 x) -> int32 {\n  float64 v = static_cast<float64>(x) * input_sample_grain\n  v = std::exp(-2.0 * v)\n  v = (1.0 - v) / (1.0 + v)\n  return std::lround(32768.0 * v)\n}\n\nfloat32 input_rescale_scale = (%x.scale * 128.0) / input_sample_grain\nfloat32 output_rescale_scale = 1.0 / (%y.scale * 32768.0 * 128.0);\n```\n\nLegalization:\n\n```\n%table_const = get_table_const_tensor(tanh_func)\n%op1_rescale_in = tosa.RESCALE(%x) {scale=input_rescale_scale, input_zp=%x.zp, output_zp=0} // %x.dtype->i16\n%op2_table_op1 = tosa.TABLE(%op1_rescale_in, %table_const)\n%op3_rescale_op2 = tosa.RESCALE(%op2_table_op1) {scale=output_rescale_scale, input_zp=0, output_zp=%y.zp} // %int32->%y.dtype\n```\n\n### tfl.tile\n\nThis operator is trivially lowered to tosa.TILE\n\n### tfl.topk_v2\n\nNo TOSA lowering defined.\n\n### tfl.transpose_conv\n\nTranspose convolution operator.\n\n**TensorFlow Lite Dialect**\n\n```\n%output = tfl.transpose_conv(%output_shape, %weights, %input) {padding, stride_h, stride_w}\n```\n\n**TOSA Lowering**\n\nPrepare:\n\n```\ntosa_padding =\n    get_transpose_conv2d_padding_values_from_pad_type(%input.type, %weights.type, %output_shape, padding, \"NHWC\", FORMAT_HWIO, {stride_h, stride_w}, {1, 1})\n```\n\nIf input/output tensors are all non-quantized typed,\n\nLegalization:\n\n```\n%bias = tosa.CONST() {value={0.0} * %output.shape[3]}\n%conv2d = tosa.TRANSPOSE_CONV2D(%input, %weight, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={1, 1}}\n```\n\nIf input/output tensors are all quantized typed,\n\nPrepare:\n\n```\nfloat64 output_rescale_scale = (%input.scale * %weights.scale) / %output.scale\n```\n\nLegalization:\n\n```\n%bias = tosa.CONST() {value={0} * %output.shape[3]}\n%conv2d = tosa.TRANSPOSE_CONV2D(%input, %weight, %bias) {padding=tosa_padding, stride={stride_h, stride_w}, dilation={1, 1}}\n%rescale = tosa.RESCALE(%conv2d) {scale=output_rescale_scale, input_zp=0, output_zp=%output.zp} // %conv2d.dtype->%output.dtype\n```\n\n### tfl.transpose\n\nThis operator is trivially lowered to tosa.TRANSPOSE\n\n### tfl.unidirectional_sequence_lstm\n\nNo TOSA lowering defined.\n\n### tfl.unidirectional_sequence_rnn\n\nNo TOSA lowering defined.\n\n### tfl.unique\n\nNo TOSA lowering defined.\n\n### tfl.unpack\n\nUnpacks a tensor along a dimension into multiple tensors.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.unpack(%input) {num, axis}\n```\n\n**TOSA Lowering**\n\n```\n%output = lower_unpack_op(%input, axis, num)\n```\n\n### tfl.where\n\nNo TOSA lowering defined.\n\n### tfl.while\n\nNo TOSA lowering defined.\n\n### tfl.yield\n\nThis operator is trivially lowered to tosa.YIELD\n\n### tfl.zeros_like\n\nZerosLike operator.\n\n**TensorFlow Dialect**\n\n```\n%output = tfl.zeros_like(%input)\n```\n\n**TOSA Lowering**\n\n```\n%output = tosa.CONST() {value={0} * %input.num_elements}\n```\n\n## fuse_tf_bias\n\nLegalize (tf.Conv2D + tf.BiasAdd) to tosa.CONV2D. This is currently the only N:1\nmapping in TOSA legalization.\n\nFrom:\n\n```\n%conv2d = tf.Conv2D(%input, %filter) {...}\n%bias_add = tf.BiasAdd(%conv2d, %bias)\n```\n\nTo:\n\n```\n%conv2d = tosa.CONV2D(%input, %filter, %bias)\n```\n\n## convert_tfl_uint8\n\nThis pass does three things:\n\n1.  Convert const from quantized uint8 to quantized int8, with value within\n    remapped as well.\n2.  If input placeholders is quantized uint8 typed, insert \"tosa.RESCALE()\n    {scale=1.0, input_zp=input_zp, output_zp=input_zp-128} // qu8->qi8\" in\n    between\n3.  If output tensor is quantized uint8 typed, insert \"tosa.RESCALE()\n    {scale=1.0, input_zp=output_zp+128, output_zp=output_zp} // qi8->qu8\" in\n    between\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D14A:09ED:DF8E2:3DD04B:6AB920BF"},"text_sha256":"bba60fdc0d3131bc52717179a2db9c554b621bc4261b301b9451143af390386b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"opencv/opencv","input_row":{"repository":"opencv/opencv","url":"https://github.com/opencv/opencv","name":"opencv","owner":"opencv","description":"Open Source Computer Vision Library","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":90986,"issues":11691,"created_at":"2012-07-19T09:40:17Z","updated_at":"2026-09-27T13:28:26Z","first_commit_at":"2010-05-11T17:44:00Z","last_commit_at":"2026-09-25T13:18:01Z","activity_months":196.47999999999999,"ai_ml_match_topics":"deep-learning; computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:40.694Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"opencv/opencv","visibility":"public","created_at":"2012-07-19T09:40:17Z","updated_at":"2026-09-27T14:11:47Z","private":false,"fork":false,"archived":false,"stargazers_count":90987,"open_issues_count":2777,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3399","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090F:380E1C:17B4B59:1BD25A7:6AB92854"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3398","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17B0E6A:1BCF7EF:6AB92855"},"commit":{"sha":"0a6d1900956b5ef4713dd6df1eaf763697572851","url":"https://github.com/opencv/opencv/commit/0a6d1900956b5ef4713dd6df1eaf763697572851","date":"2018-05-24T18:30:09Z","author_date":"2018-05-24T18:30:09Z","committer_date":"2018-05-24T18:30:09Z","tree_sha":"03e49c9b13ac07e990734c3662beca136628cf46","message_first_line":"Merge pull request #11396 from terfendail:msmf_icapture"},"tree_request_status":200,"tree_rate":{"github_remaining":"3397","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091E:52542:17A42E1:1BC2D58:6AB92855"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":664,"blob_sha":"a3933c74041a79114d7e7502e3720f0e037a2e6e","priority":0}],"documents":[{"path":"README.md","size":664,"blob_sha":"a3933c74041a79114d7e7502e3720f0e037a2e6e","priority":0,"status":200,"text":"## OpenCV: Open Source Computer Vision Library\n\n### Resources\n\n* Homepage: <http://opencv.org>\n* Docs: <http://docs.opencv.org/master/>\n* Q&A forum: <http://answers.opencv.org>\n* Issue tracking: <https://github.com/opencv/opencv/issues>\n\n### Contributing\n\nPlease read the [contribution guidelines](https://github.com/opencv/opencv/wiki/How_to_contribute) before starting work on a pull request.\n\n#### Summary of the guidelines:\n\n* One pull request per issue;\n* Choose the right base branch;\n* Include tests and documentation;\n* Clean up \"oops\" commits before submitting;\n* Follow the [coding style guide](https://github.com/opencv/opencv/wiki/Coding_Style_Guide).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC1E:3D501:17E7E6:5D06AD:6AB920C4"},"text_sha256":"1182b29ede2047a862d9630a5832ec3a1c51b2457a8dc82584580cc3158ba5a5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3396","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CD:8656E:17AE633:1BCCC24:6AB92856"},"commit":{"sha":"d36133b325a5413c3f519379fce289599e7c1674","url":"https://github.com/opencv/opencv/commit/d36133b325a5413c3f519379fce289599e7c1674","date":"2026-06-30T11:19:32Z","author_date":"2026-06-30T11:19:32Z","committer_date":"2026-06-30T11:19:32Z","tree_sha":"b6bde423c66ac2c6b9dcdf5c2c7d972fc7e681d8","message_first_line":"Merge pull request #29403 from Teddy-Yangjiale:rvv-dnn-conv-rvv"},"tree_request_status":200,"tree_rate":{"github_remaining":"3395","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087F:71F98:1818005:1C36569:6AB92856"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1702,"blob_sha":"31c18d85fcda2ff349818f42b2e19eb9b53e5104","priority":0},{"path":"SECURITY.md","size":3147,"blob_sha":"1005dc17659ac945f157666914f9442cf97ee708","priority":1}],"documents":[{"path":"README.md","size":1702,"blob_sha":"31c18d85fcda2ff349818f42b2e19eb9b53e5104","priority":0,"status":200,"text":"## OpenCV: Open Source Computer Vision Library\n\n\n### Resources\n\n* Homepage: <https://opencv.org>\n  * Courses: <https://opencv.org/courses>\n* Docs: <https://docs.opencv.org/5.x/>\n* Q&A forum: <https://forum.opencv.org>\n  * previous forum (read only): <http://answers.opencv.org>\n* Issue tracking: <https://github.com/opencv/opencv/issues>\n* Additional OpenCV functionality: <https://github.com/opencv/opencv_contrib>\n* Donate to OpenCV: <https://opencv.org/support/>\n\n\n### Contributing\n\nPlease read the [contribution guidelines](https://github.com/opencv/opencv/wiki/How_to_contribute) before starting work on a pull request.\n\n#### Summary of the guidelines:\n\n* One pull request per issue;\n* Choose the right base branch;\n* Include tests and documentation;\n* Clean up \"oops\" commits before submitting;\n* Follow the [coding style guide](https://github.com/opencv/opencv/wiki/Coding_Style_Guide).\n\n### Additional Resources\n\n* [Submit your OpenCV-based project](https://form.jotform.com/233105358823151) for inclusion in Community Friday on opencv.org\n* [Subscribe to the OpenCV YouTube Channel](http://youtube.com/@opencvofficial) featuring OpenCV Live, an hour-long streaming show\n* [Follow OpenCV on LinkedIn](http://linkedin.com/company/opencv/) for daily posts showing the state-of-the-art in computer vision & AI\n* [Apply to be an OpenCV Volunteer](https://form.jotform.com/232745316792159) to help organize events and online campaigns as well as amplify them\n* [Follow OpenCV on Mastodon](http://mastodon.social/@opencv) in the Fediverse\n* [Follow OpenCV on Twitter](https://twitter.com/opencvlive)\n* [OpenCV.ai](https://opencv.ai): Computer Vision and AI development services from the OpenCV team.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3346:345ED4:171EC8:5C3CBB:6AB920BD"},"text_sha256":"7e4047375a342b27a9b7ca689bad87619e94136db980070eaefa64a0adcbdf7b"},{"path":"SECURITY.md","size":3147,"blob_sha":"1005dc17659ac945f157666914f9442cf97ee708","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nIf you have information about a security issue or vulnerability in OpenCV, please send an e-mail to security@opencv.org.\n\nPlease provide as much information as possible:\n\n- A detailed description of the vulnerability we can use to reproduce your findings.\n\n- Who can exploit this vulnerability and what would they gain. An attack scenario.\n\n- Information about known exploits if any.\n\nA member of the Security Team will review your e-mail and contact you to collaborate on resolving the issue.\n\n## PGP Key\n\nIf a security vulnerability report has extremely sensitive information you may encrypt it using our PGP public key (updated 2023-APR-19):\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQGNBGRAEW0BDAC5jORFsQV3gjUjUEL9UURxueovPIfSG4HF0iXIAkqKhri+xpFh\n5+T8TWIEs8b5XCBQcKs5318/YJTo58vmRcQMI8NpkVq7SS4YdmBAnAlLGk2WOLJV\n0fJA59HSuXTCs9FrK4AGCxoD8KR2k3TuSK7YI6ugVde08WXS7yuzbYGJL9uA9OIE\nEzupb/At+9IWbCPTciErXPFnykxExqzT1u7m5u4rlmf1Twpj0XkPX3Guis2GFBQu\nhEsV5NtS7jDHbcyrWHV2oJVhokZntwtSCURM/ppv09DKClDDcKgHvIK4tnxOIJZy\n1wzsjD3sR24m2Ix+0y2PyQK3mSZYogCEiaRZK7/9mXX+svC4NWjBJLG5HnVrgwxT\n0aOEHjRY9M7CBg6qDgQNZ2bdQ2a85TZpq1/3T2fQ2AQ7gvTSGqRzSloXUOQ3SLbj\nrT2j6hqmPAELhNR3oquOfs2Dkx0Z/10z6zMuVH56+1TO8hhv7mychFP+WbrgGxbD\nW21niH6cd53CmRkAEQEAAbQlT3BlbkNWIFNlY3VyaXR5IDxzZWN1cml0eUBvcGVu\nY3Yub3JnPokBzgQTAQoAOBYhBJNzgXrVR7Pmq57XNwWAy98gvJv1BQJkQBFtAhsD\nBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEAWAy98gvJv1y40MAKI4tdEsX+MQ\nP0Qa2Z+mdtAh56Pj4zIgwKXeCM1YOx2rL+ouKAl7KWDHNMEjjXyOkxWrPV5+Y0wi\nWXtcDcPV04Z+OvlFNWwYZZczwtL3F4Ud5tEatO5nya7eT99vJXxUtwapDVVHyoOX\nfx2B2wZRWBhKiTnT6B8x1tTRO1UZWL1h04m1xSK1U0BeSgmPY7KXudPFF6dC5W1a\nviQReA3NyAPU+x1VUuIditwdgROGtxH6xHEkey9mMwvmsXFedrcXZC0HjCvU6sTJ\nqlTsv2qVs/9UO5uI/9czNYp0tI+opxLm3usZVYVY5QtI/brpYft4sGxB0pNSEV1M\nKdHz/9FZR4Eg1udhVn2H2KokxxvnZUk9dtFAAlyxQxD94jVaEDiHSj97mdJgV6qF\nl+zwKM6EHPu/4P2hzLQoVeca7wCx/tFA1nqW5UnRzmcuzl/lLZqynVIMuveKWeb7\nBMfxEi3j74j+N3jRdDR+3Ru8Q9BpI6XWVVsJ7UgVvz0oUENhxGwhnLkBjQRkQBFt\nAQwAqz1sjZ/N1GNogSl69zjhsBMMQPQ3rVblpCLmPHgH3PoiRNbB8MjcW4l4XBhU\nmnVF0JjYkmzPdSkf4k+7Ag/slX/vyiTM4hkrFH+O4yXTe0wOmuYU8zmrl9+UsPc/\nLLfueGRHUqTcNBZBPz4YLTTiATnXSCQ8M/p9Lcd9mqO9giW9qg4W7EM/SAfsHDel\nhJUZJzAr7opbU2IJjTrp3mEJS9CBimkHernIkjbZN5t0/CWZJ4CCm+hcFXQtyVP3\nU2jO11eQWIQttTrp223b3f0O8tZFrE3J4GncUqAqqAJ5EMX6sQbQ8wZOx4IlTkAh\nYtbYNk1cfYoNK8dZKKTFp1ikaor14MMbmPkH2YQAa2N5PTTeKkFBydBKTfN8rue1\nbKrrkyLBedr9PQfKQMGKfLSnA4frUVuMeb84yXixzn+AnYQQcs6cKH5gBOIfo7vy\nVQclLAbESgfY9G01ElPfSxha6ahGZ71V4KsAZhL478lpqukonJaE1VVIrmzR9ldM\nZ7BTABEBAAGJAbYEGAEKACAWIQSTc4F61Uez5que1zcFgMvfILyb9QUCZEARbQIb\nDAAKCRAFgMvfILyb9WOeDACFaHUdxZjaZmCxeoRyT6lLMJKwUNulJ8lbX1DvLmCS\nAtQdFwaa3hT7fpmqD5UFnKSTUUdXe6DVBNoe1wde5hjBn7F/j7HJe3gYneRB0uuA\nCSq9wUrg7GPUMYyFNNbdGPFMMNvcPREUlx5qYEJH1VSIYfbCNmG4ESuuOa0xXxvC\n7FoLk3tHQzNP9H4p11fq70SycDGwBDjtNQWqf2l2PuQxIuefICZ4C+SJY/eOSpVj\nbo1wnHCHznZS7+tMsqET5IFG16ckGK3nTW7gsXhu+CJ8DalIQCXAq5w0IdDfWDG8\n9ocXIPDa8gcJRLUFZi/CYg+vdgI6mJ8RSLzJz75T2pl0m6kds4o+mdp5pIQYXio9\n1KAo+vtmGY7gQzjqQYoc4Ne6DWRpjS2iO4aGZu+/pGpSU3/Tu/u5Y9RNrP8MycGV\nM0vnhRnHJFDsLnIy1os/S0MDLYqlYB5zR04A4Znj+aPhViJMn9V4c2UdZ1TFEaZp\ntVpvxypkp4FAHRP7cIS8ODU=\n=g4fo\n-----END PGP PUBLIC KEY BLOCK-----\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6DE6:35999:1720A6:5C4056:6AB920C7"},"text_sha256":"67eea889d2bdf7de7e9b88211698c48c26aeb7e630e312b34225b29e9d60d03f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"keras-team/keras","input_row":{"repository":"keras-team/keras","url":"https://github.com/keras-team/keras","name":"keras","owner":"keras-team","description":"Deep Learning for humans","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":64346,"issues":12958,"created_at":"2015-03-28T00:35:42Z","updated_at":"2026-09-27T13:16:24Z","first_commit_at":"2015-03-28T00:35:42Z","last_commit_at":"2026-09-26T21:33:22Z","activity_months":138.00999999999999,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:45.115Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"keras-team/keras","visibility":"public","created_at":"2015-03-28T00:35:42Z","updated_at":"2026-09-27T13:16:24Z","private":false,"fork":false,"archived":false,"stargazers_count":64346,"open_issues_count":265,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3394","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E4:E80A6:178CA51:1BAB56B:6AB92859"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3393","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:17D7628:1BF651F:6AB92859"},"commit":{"sha":"5eecd55a6f1d6d149b42f9b76aa53d4c5ab8d3eb","url":"https://github.com/keras-team/keras/commit/5eecd55a6f1d6d149b42f9b76aa53d4c5ab8d3eb","date":"2018-05-24T20:54:20Z","author_date":"2018-05-24T20:54:20Z","committer_date":"2018-05-24T20:54:20Z","tree_sha":"a2dc4af3fad6d1f5375f8804bc4d9bf1dd4bd4be","message_first_line":"load_weights will fail if shape mismatch (#10266)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3392","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:17E3FD9:1C029DE:6AB92859"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8562,"blob_sha":"45655364ee5b993f1a16c35eab3b379319f5d84d","priority":0}],"documents":[{"path":"README.md","size":8562,"blob_sha":"45655364ee5b993f1a16c35eab3b379319f5d84d","priority":0,"status":200,"text":"﻿# Keras: Deep Learning for humans\n\n![Keras logo](https://s3.amazonaws.com/keras.io/img/keras-logo-2018-large-1200.png)\n\n[![Build Status](https://travis-ci.org/keras-team/keras.svg?branch=master)](https://travis-ci.org/keras-team/keras)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/keras-team/keras/blob/master/LICENSE)\n\n## You have just found Keras.\n\nKeras is a high-level neural networks API, written in Python and capable of running on top of [TensorFlow](https://github.com/tensorflow/tensorflow), [CNTK](https://github.com/Microsoft/cntk), or [Theano](https://github.com/Theano/Theano). It was developed with a focus on enabling fast experimentation. *Being able to go from idea to result with the least possible delay is key to doing good research.*\n\nUse Keras if you need a deep learning library that:\n\n- Allows for easy and fast prototyping (through user friendliness, modularity, and extensibility).\n- Supports both convolutional networks and recurrent networks, as well as combinations of the two.\n- Runs seamlessly on CPU and GPU.\n\nRead the documentation at [Keras.io](https://keras.io).\n\nKeras is compatible with: __Python 2.7-3.6__.\n\n\n------------------\n\n\n## Guiding principles\n\n- __User friendliness.__ Keras is an API designed for human beings, not machines. It puts user experience front and center. Keras follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear and actionable feedback upon user error.\n\n- __Modularity.__ A model is understood as a sequence or a graph of standalone, fully-configurable modules that can be plugged together with as little restrictions as possible. In particular, neural layers, cost functions, optimizers, initialization schemes, activation functions, regularization schemes are all standalone modules that you can combine to create new models.\n\n- __Easy extensibility.__ New modules are simple to add (as new classes and functions), and existing modules provide ample examples. To be able to easily create new modules allows for total expressiveness, making Keras suitable for advanced research.\n\n- __Work with Python__. No separate models configuration files in a declarative format. Models are described in Python code, which is compact, easier to debug, and allows for ease of extensibility.\n\n\n------------------\n\n\n## Getting started: 30 seconds to Keras\n\nThe core data structure of Keras is a __model__, a way to organize layers. The simplest type of model is the [`Sequential`](https://keras.io/getting-started/sequential-model-guide) model, a linear stack of layers. For more complex architectures, you should use the [Keras functional API](https://keras.io/getting-started/functional-api-guide), which allows to build arbitrary graphs of layers.\n\nHere is the `Sequential` model:\n\n```python\nfrom keras.models import Sequential\n\nmodel = Sequential()\n```\n\nStacking layers is as easy as `.add()`:\n\n```python\nfrom keras.layers import Dense\n\nmodel.add(Dense(units=64, activation='relu', input_dim=100))\nmodel.add(Dense(units=10, activation='softmax'))\n```\n\nOnce your model looks good, configure its learning process with `.compile()`:\n\n```python\nmodel.compile(loss='categorical_crossentropy',\n              optimizer='sgd',\n              metrics=['accuracy'])\n```\n\nIf you need to, you can further configure your optimizer. A core principle of Keras is to make things reasonably simple, while allowing the user to be fully in control when they need to (the ultimate control being the easy extensibility of the source code).\n```python\nmodel.compile(loss=keras.losses.categorical_crossentropy,\n              optimizer=keras.optimizers.SGD(lr=0.01, momentum=0.9, nesterov=True))\n```\n\nYou can now iterate on your training data in batches:\n\n```python\n# x_train and y_train are Numpy arrays --just like in the Scikit-Learn API.\nmodel.fit(x_train, y_train, epochs=5, batch_size=32)\n```\n\nAlternatively, you can feed batches to your model manually:\n\n```python\nmodel.train_on_batch(x_batch, y_batch)\n```\n\nEvaluate your performance in one line:\n\n```python\nloss_and_metrics = model.evaluate(x_test, y_test, batch_size=128)\n```\n\nOr generate predictions on new data:\n\n```python\nclasses = model.predict(x_test, batch_size=128)\n```\n\nBuilding a question answering system, an image classification model, a Neural Turing Machine, or any other model is just as fast. The ideas behind deep learning are simple, so why should their implementation be painful?\n\nFor a more in-depth tutorial about Keras, you can check out:\n\n- [Getting started with the Sequential model](https://keras.io/getting-started/sequential-model-guide)\n- [Getting started with the functional API](https://keras.io/getting-started/functional-api-guide)\n\nIn the [examples folder](https://github.com/keras-team/keras/tree/master/examples) of the repository, you will find more advanced models: question-answering with memory networks, text generation with stacked LSTMs, etc.\n\n\n------------------\n\n\n## Installation\n\nBefore installing Keras, please install one of its backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend.\n\n- [TensorFlow installation instructions](https://www.tensorflow.org/install/).\n- [Theano installation instructions](http://deeplearning.net/software/theano/install.html#install).\n- [CNTK installation instructions](https://docs.microsoft.com/en-us/cognitive-toolkit/setup-cntk-on-your-machine).\n\nYou may also consider installing the following **optional dependencies**:\n\n- [cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) (recommended if you plan on running Keras on GPU).\n- HDF5 and [h5py](http://docs.h5py.org/en/latest/build.html) (required if you plan on saving Keras models to disk).\n- [graphviz](https://graphviz.gitlab.io/download/) and [pydot](https://github.com/erocarrera/pydot) (used by [visualization utilities](https://keras.io/visualization/) to plot model graphs).\n\nThen, you can install Keras itself. There are two ways to install Keras:\n\n- **Install Keras from PyPI (recommended):**\n\n```sh\nsudo pip install keras\n```\n\nIf you are using a virtualenv, you may want to avoid using sudo:\n\n```sh\npip install keras\n```\n\n- **Alternatively: install Keras from the GitHub source:**\n\nFirst, clone Keras using `git`:\n\n```sh\ngit clone https://github.com/keras-team/keras.git\n```\n\n Then, `cd` to the Keras folder and run the install command:\n```sh\ncd keras\nsudo python setup.py install\n```\n\n------------------\n\n\n## Configuring your Keras backend\n\nBy default, Keras will use TensorFlow as its tensor manipulation library. [Follow these instructions](https://keras.io/backend/) to configure the Keras backend.\n\n------------------\n\n\n## Support\n\nYou can ask questions and join the development discussion:\n\n- On the [Keras Google group](https://groups.google.com/forum/#!forum/keras-users).\n- On the [Keras Slack channel](https://kerasteam.slack.com). Use [this link](https://keras-slack-autojoin.herokuapp.com/) to request an invitation to the channel.\n\nYou can also post **bug reports and feature requests** (only) in [GitHub issues](https://github.com/keras-team/keras/issues). Make sure to read [our guidelines](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md) first.\n\n\n------------------\n\n\n## Why this name, Keras?\n\nKeras (κέρας) means _horn_ in Greek. It is a reference to a literary image from ancient Greek and Latin literature, first found in the _Odyssey_, where dream spirits (_Oneiroi_, singular _Oneiros_) are divided between those who deceive men with false visions, who arrive to Earth through a gate of ivory, and those who announce a future that will come to pass, who arrive through a gate of horn. It's a play on the words κέρας (horn) / κραίνω (fulfill), and ἐλέφας (ivory) / ἐλεφαίρομαι (deceive).\n\nKeras was initially developed as part of the research effort of project ONEIROS (Open-ended Neuro-Electronic Intelligent Robot Operating System).\n\n>_\"Oneiroi are beyond our unravelling --who can be sure what tale they tell? Not all that men look for comes to pass. Two gates there are that give passage to fleeting Oneiroi; one is made of horn, one of ivory. The Oneiroi that pass through sawn ivory are deceitful, bearing a message that will not be fulfilled; those that come out through polished horn have truth behind them, to be accomplished for men who see them.\"_ Homer, Odyssey 19. 562 ff (Shewring translation).\n\n------------------\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"61B2:18233:1738DC:5C56BA:6AB920C8"},"text_sha256":"a0a1ca11641fd022a852b7aa4a391b2e5942ee2428d114febb9ae3d16b7b69e6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3391","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CB:156040:17B5A4F:1BD3A09:6AB9285A"},"commit":{"sha":"ea6968a88ca22418a40b0897e81715718e11fb5c","url":"https://github.com/keras-team/keras/commit/ea6968a88ca22418a40b0897e81715718e11fb5c","date":"2026-06-30T03:44:57Z","author_date":"2026-06-30T03:44:57Z","committer_date":"2026-06-30T03:44:57Z","tree_sha":"7f576adf410a12f7b7b5db077859a0c0df4d6a9b","message_first_line":"[Distribution] Implement sharding support for Keras PyDataset adapter (#23044)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3390","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:17E0334:1BFE5AE:6AB9285B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5354,"blob_sha":"52ecbec3993f83947385f6fe4e59af4237f2619e","priority":0},{"path":".github/workflows/pr-contributor-terms.yml","size":1857,"blob_sha":"f7c4d2df5d453c209caf4cb1184c5e9460d9b8bc","priority":1},{"path":"SECURITY.md","size":5160,"blob_sha":"893463b63ddd9b1e4047cad1b29d9d7cc035a46c","priority":1}],"documents":[{"path":"README.md","size":5354,"blob_sha":"52ecbec3993f83947385f6fe4e59af4237f2619e","priority":0,"status":200,"text":"# Keras 3: Deep Learning for Humans\n\nKeras 3 is a multi-backend deep learning framework, with support for JAX, TensorFlow, PyTorch, and OpenVINO (for inference-only).\nEffortlessly build and train models for computer vision, natural language processing, audio processing,\ntimeseries forecasting, recommender systems, etc.\n\n- **Accelerated model development**: Ship deep learning solutions faster thanks to the high-level UX of Keras\nand the availability of easy-to-debug runtimes like PyTorch or JAX eager execution.\n- **State-of-the-art performance**: By picking the backend that is the fastest for your model architecture (often JAX!),\nleverage speedups ranging from 20% to 350% compared to other frameworks. [Benchmark here](https://keras.io/getting_started/benchmarks/).\n- **Datacenter-scale training**: Scale confidently from your laptop to large clusters of GPUs or TPUs.\n\nJoin nearly three million developers, from burgeoning startups to global enterprises, in harnessing the power of Keras 3.\n\n\n## Installation\n\n### Install with pip\n\nKeras 3 is available on PyPI as `keras`. Note that Keras 2 remains available as the `tf-keras` package.\n\n1. Install `keras`:\n\n```\npip install keras --upgrade\n```\n\n2. Install backend package(s).\n\nTo use `keras`, you should also install the backend of choice: `tensorflow`, `jax`, or `torch`. Additionally,\nThe `openvino` backend is available with support for model inference only.\n\n### Local installation\n\n#### Minimal installation\n\nKeras 3 is compatible with Linux and macOS systems. For Windows users, we recommend using WSL2 to run Keras.\nTo install a local development version:\n\n1. Install dependencies:\n\n```\npip install -r requirements.txt\n```\n\n2. Run installation command from the root directory.\n\n```\npython pip_build.py --install\n```\n\n3. Run API generation script when creating PRs that update `keras_export` public APIs:\n\n```\n./shell/api_gen.sh\n```\n\n## Backend Compatibility Table\n\nThe following table lists the minimum supported versions of each backend for the latest stable release of Keras (v3.x):\n\n| Backend    | Minimum Supported Version |\n|------------|---------------------------|\n| TensorFlow | 2.16.1                    |\n| JAX        | 0.4.20                    |\n| PyTorch    | 2.1.0                     |\n| OpenVINO   | 2025.3.0                  |\n\n#### Adding GPU support\n\nThe `requirements.txt` file will install a CPU-only version of TensorFlow, JAX, and PyTorch. For GPU support, we also\nprovide a separate `requirements-{backend}-cuda.txt` for TensorFlow, JAX, and PyTorch. These install all CUDA\ndependencies via `pip` and expect a NVIDIA driver to be pre-installed. We recommend a clean Python environment for each\nbackend to avoid CUDA version mismatches. As an example, here is how to create a JAX GPU environment with `conda`:\n\n```shell\nconda create -y -n keras-jax python=3.10\nconda activate keras-jax\npip install -r requirements-jax-cuda.txt\npython pip_build.py --install\n```\n\n## Configuring your backend\n\nYou can export the environment variable `KERAS_BACKEND` or you can edit your local config file at `~/.keras/keras.json`\nto configure your backend. Available backend options are: `\"tensorflow\"`, `\"jax\"`, `\"torch\"`, `\"openvino\"`. Example:\n\n```\nexport KERAS_BACKEND=\"jax\"\n```\n\nIn Colab, you can do:\n\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\n\nimport keras\n```\n\n**Note:** The backend must be configured before importing `keras`, and the backend cannot be changed after\nthe package has been imported.\n\n**Note:** The OpenVINO backend is an inference-only backend, meaning it is designed only for running model\npredictions using `model.predict()` method.\n\n## Backwards compatibility\n\nKeras 3 is intended to work as a drop-in replacement for `tf.keras` (when using the TensorFlow backend). Just take your\nexisting `tf.keras` code, make sure that your calls to `model.save()` are using the up-to-date `.keras` format, and you're\ndone.\n\nIf your `tf.keras` model does not include custom components, you can start running it on top of JAX or PyTorch immediately.\n\nIf it does include custom components (e.g. custom layers or a custom `train_step()`), it is usually possible to convert it\nto a backend-agnostic implementation in just a few minutes.\n\nIn addition, Keras models can consume datasets in any format, regardless of the backend you're using:\nyou can train your models with your existing `tf.data.Dataset` pipelines or PyTorch `DataLoaders`.\n\n## Why use Keras 3?\n\n- Run your high-level Keras workflows on top of any framework -- benefiting at will from the advantages of each framework,\ne.g. the scalability and performance of JAX or the production ecosystem options of TensorFlow.\n- Write custom components (e.g. layers, models, metrics) that you can use in low-level workflows in any framework.\n    - You can take a Keras model and train it in a training loop written from scratch in native TF, JAX, or PyTorch.\n    - You can take a Keras model and use it as part of a PyTorch-native `Module` or as part of a JAX-native model function.\n- Make your ML code future-proof by avoiding framework lock-in.\n- As a PyTorch user: get access to power and usability of Keras, at last!\n- As a JAX user: get access to a fully-featured, battle-tested, well-documented modeling and training library.\n\n\nRead more in the [Keras 3 release announcement](https://keras.io/keras_3/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4340:3EACB:17369E:5C55B0:6AB920CA"},"text_sha256":"1c6a263b20c8288f35dad2e8eb36c4bc6dc63b2b9691d216c06d6a230fdb8860"},{"path":".github/workflows/pr-contributor-terms.yml","size":1857,"blob_sha":"f7c4d2df5d453c209caf4cb1184c5e9460d9b8bc","priority":1,"status":200,"text":"name: 'PR Contributor Agreement'\n\non:\n  pull_request:\n    types:\n      - 'opened'\n      - 'edited'\n      - 'reopened'\n      - 'synchronize'\n\npermissions:\n  contents: 'read'\n  pull-requests: 'read'\n\njobs:\n  verify:\n    if: github.repository == 'keras-team/keras'\n    runs-on: 'ubuntu-latest'\n    steps:\n      - name: 'Verify contributor agreement'\n        uses: 'actions/github-script@v9'\n        with:\n          github-token: '${{ secrets.GITHUB_TOKEN }}'\n          script: |\n            const { data: pr } = await github.rest.pulls.get({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              pull_number: context.payload.pull_request.number,\n            });\n\n            const body = pr.body || '';\n\n            const requiredTerms = [\n              'I am a human, and not a bot.',\n              'I will be responsible for responding to review comments in a timely manner.',\n              'I will work with the maintainers to push this PR forward until submission.'\n            ];\n\n            const unchecked = [];\n            for (const term of requiredTerms) {\n              // Check that the checkbox is checked: [x] or [X]\n              const checkedPattern = new RegExp(`-\\\\s*\\\\[\\\\s*[xX]\\\\s*\\\\]\\\\s*${term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}`);\n              if (!checkedPattern.test(body)) {\n                unchecked.push(term);\n              }\n            }\n\n            if (unchecked.length > 0) {\n              core.setFailed(\n                `The following contributor agreement terms have not been accepted:\\n` +\n                unchecked.map(t => `  - ${t}`).join('\\n') +\n                `\\n\\nPlease check all boxes in the Contributor Agreement section of the PR description.`\n              );\n            } else {\n              core.info('All contributor agreement terms accepted.');\n            }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39A2:18CDF1:171C2F:54DE63:6AB920CA"},"text_sha256":"194d85ecd022041d18afa056af660e131a592659e46f36bab07fa93f855cd108"},{"path":"SECURITY.md","size":5160,"blob_sha":"893463b63ddd9b1e4047cad1b29d9d7cc035a46c","priority":1,"status":200,"text":"# Security Policy\n\n - [**Using Keras Securely**](#using-keras-securely)\n   - [Untrusted inputs](#untrusted-inputs)\n   - [Data privacy](#data-privacy)\n   - [Untrusted environments or networks](#untrusted-environments-or-networks)\n   - [Multi-Tenant environments](#multi-tenant-environments)\n - [**Reporting a Vulnerability**](#reporting-a-vulnerability)\n\n## Using Keras Securely\n\n### Untrusted inputs\n\nSome models accept various input formats (text, images, audio, etc.). The libraries converting these inputs have varying security levels, so it's crucial to isolate the model and carefully pre-process inputs to mitigate script injection risks.\n\nFor maximum security when handling untrusted inputs, you may need to employ the following:\n\n* Sandboxing: Isolate the model process.\n* Pre-analysis: check how the model performs by default when exposed to prompt injection (e.g. using [fuzzing for prompt injection](https://github.com/FonduAI/awesome-prompt-injection?tab=readme-ov-file#tools)). This will give you leads on how hard you will have to work on the next topics.\n* Updates: Keep your model and libraries updated with the latest security patches.\n* Input Sanitation: Before feeding data to the model, sanitize inputs rigorously. This involves techniques such as:\n    * Validation: Enforce strict rules on allowed characters and data types.\n    * Filtering: Remove potentially malicious scripts or code fragments.\n    * Encoding: Convert special characters into safe representations.\n    * Verification: Run tooling that identifies potential script injections (e.g. [models that detect prompt injection attempts](https://python.langchain.com/docs/guides/safety/hugging_face_prompt_injection)). \n\n### Data privacy\nTo protect sensitive data from potential leaks or unauthorized access, it is essential to sandbox the model execution. This means running the model in a secure, isolated environment, which helps mitigate many attack vectors.\n\nWhen training the model with sensitive data, expose your newly-trained model to tests to identify potential sensitive data leaks.\n\n### Untrusted environments or networks\n\nIf you can't run your models in a secure and isolated environment or if it must be exposed to an untrusted network, make sure to take the following security precautions:\n* Confirm the hash of  any downloaded artifact (i.e. pre-trained model weights) matches a known-good value\n* Encrypt your data while sending it over the network.\n\n### Multi-Tenant environments\n\nIf you intend to run multiple models in parallel with shared memory, it is your responsibility to ensure the models do not interact or access each other's data. The primary areas of concern are tenant isolation, resource allocation, model sharing and hardware attacks.\n\n#### Tenant Isolation\n\nYou must make sure that models run separately. Since models can run code, it's important to use strong isolation methods to prevent unwanted access to the data from other tenants.\n\nSeparating networks is also a big part of isolation. If you keep model network traffic separate, you not only prevent unauthorized access to data or models, but also prevent malicious users or tenants sending graphs to execute under another tenant’s identity.\n\n#### Resource Allocation\n\nA denial of service caused by one model can impact the overall system health. Implement safeguards like rate limits, access controls, and health monitoring.\n\n#### Model Sharing\n\nIn a multitenant design that allows sharing models, make sure that tenants and users fully understand the potential security risks involved. They must be aware that they will essentially be running code provided by other users. Unfortunately, there are no reliable methods available to detect malicious models, graphs, or checkpoints. To mitigate this risk, the recommended approach is to sandbox the model execution, effectively isolating it from the rest of the system.\n\n#### Hardware Attacks\n\nBesides the virtual environment, the hardware (GPUs or TPUs) can also be attacked. [Research](https://scholar.google.com/scholar?q=gpu+side+channel) has shown that side channel attacks on GPUs are possible, which can make data leak from other models or processes running on the same system at the same time.\n\n## Reporting a Vulnerability\n\nBeware that none of the topics under [Using Keras Securely](#using-keras-securely) are considered vulnerabilities of Keras.\n\nIf you have discovered a security vulnerability in this project, please report it\nprivately. **Do not disclose it as a public issue.** This gives us time to work with you\nto fix the issue before public exposure, reducing the chance that the exploit will be\nused before a patch is released.\n\nYou may submit the report in the following ways:\n\n- send an email to francois.chollet@gmail.com and/or\n- send a [private vulnerability report](https://github.com/keras-team/keras/security/advisories/new)\n\nPlease provide the following information in your report:\n\n- A description of the vulnerability and its impact\n- How to reproduce the issue\n\nThis project is maintained by volunteers on a reasonable-effort basis. As such,\nplease give us 90 days to work on a fix before public exposure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9022:09BF:AB3AB:2C76A5:6AB920CB"},"text_sha256":"71d5ecf38209475d67a856de87f5ed9242706d317a7e14c8918ee2f1acbae92e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=ea6968a88ca22418a40b0897e81715718e11fb5c; file=SECURITY.md; text=Verification: Run tooling that identifies potential script injections (e.g. ### Data privacy To protect sensitive data from potential leaks or unauthorized access, it is essential to sandbox the model execution. This means running the model in a secure, isolated environment, which helps mitigate many attack vectors. When training the model with sensitive data, expose your newly-trained model to tests to identify potential sensitive data leaks.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=ea6968a88ca22418a40b0897e81715718e11fb5c; file=SECURITY.md; text=Verification: Run tooling that identifies potential script injections (e.g. ### Data privacy To protect sensitive data from potential leaks or unauthorized access, it is essential to sandbox the model execution. This means running the model in a secure, isolated environment, which helps mitigate many attack vectors. When training the model with sensitive data, expose your newly-trained model to tests to identify potential sensitive data leaks."}}}}
{"repository":"deepfakes/faceswap","input_row":{"repository":"deepfakes/faceswap","url":"https://github.com/deepfakes/faceswap","name":"faceswap","owner":"deepfakes","description":"Deepfakes Software For All","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":57556,"issues":909,"created_at":"2017-12-19T09:44:13Z","updated_at":"2026-09-27T11:59:34Z","first_commit_at":"2017-12-15T11:47:32Z","last_commit_at":"2026-08-05T11:39:25Z","activity_months":103.65000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:48.352Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deepfakes/faceswap","visibility":"public","created_at":"2017-12-19T09:44:13Z","updated_at":"2026-09-27T11:59:34Z","private":false,"fork":false,"archived":false,"stargazers_count":57556,"open_issues_count":15,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3389","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:17F190A:1C104BD:6AB9285C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3388","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E5:2BC4E5:1805D5E:1C24463:6AB9285C"},"commit":{"sha":"8d9de4c205e149d35bc607f422b6ab88bf898680","url":"https://github.com/deepfakes/faceswap/commit/8d9de4c205e149d35bc607f422b6ab88bf898680","date":"2018-05-18T23:49:12Z","author_date":"2018-05-18T23:49:12Z","committer_date":"2018-05-18T23:49:12Z","tree_sha":"3fb313b53bfdf5d868a4fdfb490bdb3e35099600","message_first_line":"Merge branch 'master' into staging"},"tree_request_status":200,"tree_rate":{"github_remaining":"3387","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:D6ABBE:FC417B:6AB9285D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5148,"blob_sha":"292b6a39da6be731b2709ed8729801a4530fe285","priority":0}],"documents":[{"path":"README.md","size":5148,"blob_sha":"292b6a39da6be731b2709ed8729801a4530fe285","priority":0,"status":200,"text":"**Notice:** This repository is not operated or maintained by [/u/deepfakes](https://www.reddit.com/user/deepfakes/). Please read the explanation below for details.\n\n---\n\n# deepfakes_faceswap\nFaceswap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos.\n\n## Overview\nThe project has multiple entry points. You will have to:\n - Gather photos (or use the one provided in the training data provided below)\n - **Extract** faces from your raw photos\n - **Train** a model on your photos (or use the one provided in the training data provided below)\n - **Convert** your sources with the model\n\n### Extract\nFrom your setup folder, run `python faceswap.py extract`. This will take photos from `src` folder and extract faces into `extract` folder.\n\n### Train\nFrom your setup folder, run `python faceswap.py train`. This will take photos from two folders containing pictures of both faces and train a model that will be saved inside the `models` folder.\n\n### Convert\nFrom your setup folder, run `python faceswap.py convert`. This will take photos from `original` folder and apply new faces into `modified` folder.\n\n### GUI\nAlternatively you can run the GUI by running `python faceswap.py gui`\n\n## General notes:\n- All of the scripts mentioned have `-h`/`--help` options with arguments that they will accept. You're smart, you can figure out how this works, right?!\n\nNB: there is a conversion tool for video. This can be accessed by running `python tools.py effmpeg -h`. Alternatively you can use [ffmpeg](https://www.ffmpeg.org) to convert video into photos, process images, and convert images back to video.\n\n## Training Data\nA pre-trained model is not required, but you can download the following pre-trained Cage/Trump training model:\n\n**Whole project with training images and trained model (~300MB):**\nhttps://anonfile.com/p7w3m0d5be/face-swap.zip or [click here to download](https://anonfile.com/p7w3m0d5be/face-swap.zip)\n\n## How To setup and run the project\n\n### Setup\nClone the repo and setup you environment.\n\nYou can either use the docker image or run `python setup.py`\n\nCheck out [INSTALL.md](INSTALL.md) and [USAGE.md](USAGE.md) for more detailed instructions and basic information on how to configure virtualenv.\n\nYou also need a modern GPU with CUDA support for best performance\n\n**Some tips:**\n\nReusing existing models will train much faster than starting from nothing.  \nIf there is not enough training data, start with someone who looks similar, then switch the data.\n\n## How to contribute\n\n### For people interested in the generative models\n - Go to the 'faceswap-model' to discuss/suggest/commit alternatives to the current algorithm.\n\n### For devs\n - Read this README entirely\n - Fork the repo\n - Download the data with the link provided below\n - Play with it\n - Check issues with the 'dev' tag\n - For devs more interested in computer vision and openCV, look at issues with the 'opencv' tag. Also feel free to add your own alternatives/improvments\n \n### For non-dev advanced users\n - Read this README entirely\n - Clone the repo\n - Download the data with the link provided below\n - Play with it\n - Check issues with the 'advuser' tag\n - Also go to the 'faceswap-playground' repo and help others.\n\n### For end-users\n - Get the code here and play with it if you can\n - You can also go to the 'faceswap-playground' repo and help or get help from others.\n - Be patient. This is relatively new technology for developers as well. Much effort is already being put into making this program easy to use for the average user. It just takes time!\n - **Notice** Any issue related to running the code has to be open in the 'faceswap-playground' project!\n\n### For haters\nSorry, no time for that.\n\n# About github.com/deepfakes\n\n## What is this repo?\nIt is a community repository for active users.\n\n## Why this repo?\nThe joshua-wu repo seems not active. Simple bugs like missing _http://_ in front of urls have not been solved since days.\n\n## Why is it named 'deepfakes' if it is not /u/deepfakes?\n 1. Because a typosquat would have happened sooner or later as project grows\n 2. Because all glory go to /u/deepfakes\n 3. Because it will better federate contributors and users\n \n## What if /u/deepfakes feels bad about that?\nThis is a friendly typosquat, and it is fully dedicated to the project. If /u/deepfakes wants to take over this repo/user and drive the project, he is welcomed to do so (Raise an issue, and he will be contacted on Reddit). Please do not send /u/deepfakes messages for help with the code you find here.\n\n# About machine learning\n\n## How does a computer know how to recognise/shape a faces? How does machine learning work? What is a neural network?\nIt's complicated. Here's a good video that makes the process understandable:\n[![How Machines Learn](https://img.youtube.com/vi/R9OHn5ZF4Uo/0.jpg)](https://www.youtube.com/watch?v=R9OHn5ZF4Uo)\n\nHere's a slightly more in depth video that tries to explain the basic functioning of a neural network:\n[![How Machines Learn](https://img.youtube.com/vi/aircAruvnKk/0.jpg)](https://www.youtube.com/watch?v=aircAruvnKk)\n\ntl;dr: training data + trial and error\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F8C:386840:17E4AD:5D0439:6AB920C7"},"text_sha256":"eaa34c0d99950de908b47aa784ff5f34b8213f0b0e32cb10cf40cc6ee75b87f1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3386","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EB:62B94:17A3530:1BC1D1F:6AB9285D"},"commit":{"sha":"acdcfa8796c26d47e3610efeae102c9d87b2ad89","url":"https://github.com/deepfakes/faceswap/commit/acdcfa8796c26d47e3610efeae102c9d87b2ad89","date":"2026-06-24T10:08:45Z","author_date":"2026-06-24T10:08:45Z","committer_date":"2026-06-24T10:08:45Z","tree_sha":"2f4159dc994ac4e36d06bfe91ed6287c4d53dd77","message_first_line":"bugfix: Villain model. Correctly build lowmem variant"},"tree_request_status":200,"tree_rate":{"github_remaining":"3385","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:17EBF55:1C0ACFB:6AB9285E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12068,"blob_sha":"fd7941cb19a25996a299007a48477d622212e06d","priority":0}],"documents":[{"path":"README.md","size":12068,"blob_sha":"fd7941cb19a25996a299007a48477d622212e06d","priority":0,"status":200,"text":"# deepfakes_faceswap\n\n### Important information for **Patreon** and **PayPal** supporters. Please see this forum post: https://forum.faceswap.dev/viewtopic.php?f=14&t=3120\n\n<p align=\"center\">\n  <a href=\"https://faceswap.dev\"><img src=\"https://i.imgur.com/zHvjHnb.png\"><\/img><\/a>\n<br />FaceSwap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos.\n<\/p>\n<p align=\"center\">\n<img src = \"https://i.imgur.com/nWHFLDf.jpg\"><\/img>\n<\/p>\n\n<p align=\"center\">\n<a href=\"https://www.patreon.com/bePatron?u=23238350\"><img src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\"><\/img><\/a>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"https://discord.gg/FC54sYg\"><img src=\"https://i.imgur.com/gIpztkv.png\"><\/img><\/a><\/p>\n\n<p align=\"center\">\n  <a href=\"https://www.dailymotion.com/video/x810mot\"><img src=\"https://user-images.githubusercontent.com/36920800/178301720-b69841bb-a1ca-4c20-91db-a2a10f5692ca.png\"><\/img><\/a>\n<br />Emma Stone/Scarlett Johansson FaceSwap using the Phaze-A model\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://www.youtube.com/watch?v=r1jng79a5xc\"><img src=\"https://img.youtube.com/vi/r1jng79a5xc/0.jpg\"><\/img><\/a>\n<br />Jennifer Lawrence/Steve Buscemi FaceSwap using the Villain model\n<\/p>\n\n\n![Build Status](https://github.com/deepfakes/faceswap/actions/workflows/pytest.yml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/faceswap/badge/?version=latest)](https://faceswap.readthedocs.io/en/latest/?badge=latest)\n\nMake sure you check out [INSTALL.md](INSTALL.md) before getting started.\n\n- [deepfakes\\_faceswap](#deepfakes_faceswap)\n    - [Important information for **Patreon** and **PayPal** supporters. Please see this forum post: https://forum.faceswap.dev/viewtopic.php?f=14\\&t=3120](#important-information-for-patreon-and-paypal-supporters-please-see-this-forum-post-httpsforumfaceswapdevviewtopicphpf14t3120)\n- [Manifesto](#manifesto)\n  - [FaceSwap has ethical uses.](#faceswap-has-ethical-uses)\n- [How To setup and run the project](#how-to-setup-and-run-the-project)\n- [Overview](#overview)\n  - [Extract](#extract)\n  - [Train](#train)\n  - [Convert](#convert)\n  - [GUI](#gui)\n- [General notes:](#general-notes)\n- [Help I need support!](#help-i-need-support)\n  - [Discord Server](#discord-server)\n  - [FaceSwap Forum](#faceswap-forum)\n- [Donate](#donate)\n  - [Patreon](#patreon)\n  - [One time Donations](#one-time-donations)\n    - [@torzdf](#torzdf)\n    - [@andenixa](#andenixa)\n- [How to contribute](#how-to-contribute)\n  - [For people interested in the generative models](#for-people-interested-in-the-generative-models)\n  - [For devs](#for-devs)\n  - [For non-dev advanced users](#for-non-dev-advanced-users)\n  - [For end-users](#for-end-users)\n- [About machine learning](#about-machine-learning)\n  - [How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?](#how-does-a-computer-know-how-to-recognizeshape-faces-how-does-machine-learning-work-what-is-a-neural-network)\n\n# Manifesto\n\n## FaceSwap has ethical uses.\n\nWhen faceswapping was first developed and published, the technology was groundbreaking, it was a huge step in AI development. It was also completely ignored outside of academia because the code was confusing and fragmentary. It required a thorough understanding of complicated AI techniques and took a lot of effort to figure it out. Until one individual brought it together into a single, cohesive collection. It ran, it worked, and as is so often the way with new technology emerging on the internet, it was immediately used to create inappropriate content. Despite the inappropriate uses the software was given originally, it was the first AI code that anyone could download, run and learn by experimentation without having a Ph.D. in math, computer theory, psychology, and more. Before \"deepfakes\" these techniques were like black magic, only practiced by those who could understand all of the inner workings as described in esoteric and endlessly complicated books and papers.\n\n\"Deepfakes\" changed all that and anyone could participate in AI development. To us, developers, the release of this code opened up a fantastic learning opportunity. It allowed us to build on ideas developed by others, collaborate with a variety of skilled coders, experiment with AI whilst learning new skills and ultimately contribute towards an emerging technology which will only see more mainstream use as it progresses.\n\nAre there some out there doing horrible things with similar software? Yes. And because of this, the developers have been following strict ethical standards. Many of us don't even use it to create videos, we just tinker with the code to see what it does. Sadly, the media concentrates only on the unethical uses of this software. That is, unfortunately, the nature of how it was first exposed to the public, but it is not representative of why it was created, how we use it now, or what we see in its future. Like any technology, it can be used for good or it can be abused. It is our intention to develop FaceSwap in a way that its potential for abuse is minimized whilst maximizing its potential as a tool for learning, experimenting and, yes, for legitimate faceswapping.\n\nWe are not trying to denigrate celebrities or to demean anyone. We are programmers, we are engineers, we are Hollywood VFX artists, we are activists, we are hobbyists, we are human beings. To this end, we feel that it's time to come out with a standard statement of what this software is and isn't as far as us developers are concerned.\n\n- FaceSwap is not for creating inappropriate content.\n- FaceSwap is not for changing faces without consent or with the intent of hiding its use.\n- FaceSwap is not for any illicit, unethical, or questionable purposes.\n- FaceSwap exists to experiment and discover AI techniques, for social or political commentary, for movies, and for any number of ethical and reasonable uses.\n\nWe are very troubled by the fact that FaceSwap can be used for unethical and disreputable things. However, we support the development of tools and techniques that can be used ethically as well as provide education and experience in AI for anyone who wants to learn it hands-on. We will take a zero tolerance approach to anyone using this software for any unethical purposes and will actively discourage any such uses.\n\n# How To setup and run the project\nFaceSwap is a Python program that will run on multiple Operating Systems including Windows, Linux, and MacOS.\n\nSee [INSTALL.md](INSTALL.md) for full installation instructions. You will need a modern GPU with CUDA support for best performance. Many AMD GPUs are supported through ROCm (Linux).\n\n# Overview\nThe project has multiple entry points. You will have to:\n - Gather photos and/or videos\n - **Extract** faces from your raw photos\n - **Train** a model on the faces extracted from the photos/videos\n - **Convert** your sources with the model\n\nCheck out [USAGE.md](USAGE.md) for more detailed instructions.\n\n## Extract\nFrom your setup folder, run `python faceswap.py extract`. This will take photos from `src` folder and extract faces into `extract` folder.\n\n## Train\nFrom your setup folder, run `python faceswap.py train`. This will take photos from two folders containing pictures of both faces and train a model that will be saved inside the `models` folder.\n\n## Convert\nFrom your setup folder, run `python faceswap.py convert`. This will take photos from `original` folder and apply new faces into `modified` folder.\n\n## GUI\nAlternatively, you can run the GUI by running `python faceswap.py gui`\n\n# General notes:\n- All of the scripts mentioned have `-h`/`--help` options with arguments that they will accept. You're smart, you can figure out how this works, right?!\n\nNB: there is a conversion tool for video. This can be accessed by running `python tools.py effmpeg -h`. Alternatively, you can use [ffmpeg](https://www.ffmpeg.org) to convert video into photos, process images, and convert images back to the video.\n\n\n**Some tips:**\n\nReusing existing models will train much faster than starting from nothing.\nIf there is not enough training data, start with someone who looks similar, then switch the data.\n\n# Help I need support!\n## Discord Server\nYour best bet is to join the [FaceSwap Discord server](https://discord.gg/FC54sYg) where there are plenty of users willing to help. Please note that, like this repo, this is a SFW Server!\n\n## FaceSwap Forum\nAlternatively, you can post questions in the [FaceSwap Forum](https://faceswap.dev/forum). Please do not post general support questions in this repo as they are liable to be deleted without response.\n\n# Donate\nThe developers work tirelessly to improve and develop FaceSwap. Many hours have been put in to provide the software as it is today, but this is an extremely time-consuming process with no financial reward. If you enjoy using the software, please consider donating to the devs, so they can spend more time implementing improvements.\n\n## Patreon\nThe best way to support us is through our Patreon page:\n\n[![become-a-patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=23238350)\n\n## One time Donations\nAlternatively you can give a one off donation to any of our Devs:\n### @torzdf\n There is very little FaceSwap code that hasn't been touched by torzdf. He is responsible for implementing the GUI, FAN aligner, MTCNN detector and porting the Villain, DFL-H128 and DFaker models to FaceSwap, as well as significantly improving many areas of the code.\n\n**Bitcoin:** bc1qpm22suz59ylzk0j7qk5e4c7cnkjmve2rmtrnc6\n\n**Ethereum:** 0xd3e954dC241B87C4E8E1A801ada485DC1d530F01\n\n**Monero:** 45dLrtQZ2pkHizBpt3P3yyJKkhcFHnhfNYPMSnz3yVEbdWm3Hj6Kr5TgmGAn3Far8LVaQf1th2n3DJVTRkfeB5ZkHxWozSX\n\n**Paypal:** [![torzdf](https://www.paypalobjects.com/en_GB/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JZ8PP3YE9J62L)\n\n### @andenixa\nCreator of the Unbalanced and OHR models, as well as expanding various capabilities within the training process. Andenixa is currently working on new models and will take requests for donations.\n\n**Paypal:** [![andenixa](https://www.paypalobjects.com/en_GB/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NRVLQYGS6NWTU)\n\n# How to contribute\n\n## For people interested in the generative models\n - Go to the 'faceswap-model' to discuss/suggest/commit alternatives to the current algorithm.\n\n## For devs\n - Read this README entirely\n - Fork the repo\n - Play with it\n - Check issues with the 'dev' tag\n - For devs more interested in computer vision and openCV, look at issues with the 'opencv' tag. Also feel free to add your own alternatives/improvements\n\n## For non-dev advanced users\n - Read this README entirely\n - Clone the repo\n - Play with it\n - Check issues with the 'advuser' tag\n - Also go to the '[faceswap Forum](https://faceswap.dev/forum)' and help others.\n\n## For end-users\n - Get the code here and play with it if you can\n - You can also go to the [faceswap Forum](https://faceswap.dev/forum) and help or get help from others.\n - Be patient. This is a relatively new technology for developers as well. Much effort is already being put into making this program easy to use for the average user. It just takes time!\n - **Notice** Any issue related to running the code has to be opened in the [faceswap Forum](https://faceswap.dev/forum)!\n\n# About machine learning\n\n## How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?\nIt's complicated. Here's a good video that makes the process understandable:\n[![How Machines Learn](https://img.youtube.com/vi/R9OHn5ZF4Uo/0.jpg)](https://www.youtube.com/watch?v=R9OHn5ZF4Uo)\n\nHere's a slightly more in depth video that tries to explain the basic functioning of a neural network:\n[![How Machines Learn](https://img.youtube.com/vi/aircAruvnKk/0.jpg)](https://www.youtube.com/watch?v=aircAruvnKk)\n\ntl;dr: training data + trial and error\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF72:35999:172101:5C414F:6AB920CD"},"text_sha256":"9fcd6634565437698e21bdde359244a2c892872685c1b573ea2feee4f4508f51"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ray-project/ray","input_row":{"repository":"ray-project/ray","url":"https://github.com/ray-project/ray","name":"ray","owner":"ray-project","description":"Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":43936,"issues":23106,"created_at":"2016-10-25T19:38:30Z","updated_at":"2026-09-27T13:30:35Z","first_commit_at":"2016-02-07T22:18:40Z","last_commit_at":"2026-09-27T08:46:48Z","activity_months":127.61,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning; large-language-models; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:51.084Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ray-project/ray","visibility":"public","created_at":"2016-10-25T19:38:30Z","updated_at":"2026-09-27T13:30:35Z","private":false,"fork":false,"archived":false,"stargazers_count":43936,"open_issues_count":3566,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3384","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17A7EE8:1BC5E08:6AB9285F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3383","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:17CDDFF:1BEC787:6AB9285F"},"commit":{"sha":"3509a33cf37132a4bca5c7e3bdabb091ea1b8ece","url":"https://github.com/ray-project/ray/commit/3509a33cf37132a4bca5c7e3bdabb091ea1b8ece","date":"2018-05-24T07:32:12Z","author_date":"2018-05-24T07:32:12Z","committer_date":"2018-05-24T07:32:12Z","tree_sha":"4c664ad5a502ce4dc8a5eda59f1cacfc49352b9c","message_first_line":"Prototype named actors. (#2129)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3382","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:17C67D1:1BE5070:6AB9285F"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3474,"blob_sha":"b7a2b278499f234cf5345463e0206c6e5c438f59","priority":0},{"path":"doc/source/example-policy-gradient.rst","size":1406,"blob_sha":"806764560ba951431e701a008faaa95cc0d37c44","priority":1},{"path":"doc/source/policy-optimizers.rst","size":5382,"blob_sha":"8753c2932f953fd2eb8e00a2c974ef53c5c58875","priority":1}],"documents":[{"path":"README.rst","size":3474,"blob_sha":"b7a2b278499f234cf5345463e0206c6e5c438f59","priority":0,"status":200,"text":"Ray\n===\n\n.. image:: https://travis-ci.org/ray-project/ray.svg?branch=master\n    :target: https://travis-ci.org/ray-project/ray\n\n.. image:: https://readthedocs.org/projects/ray/badge/?version=latest\n    :target: http://ray.readthedocs.io/en/latest/?badge=latest\n\n|\n\nRay is a flexible, high-performance distributed execution framework.\n\n\nRay is easy to install: ``pip install ray``\n\nExample Use\n-----------\n\n+------------------------------------------------+----------------------------------------------------+\n| **Basic Python**                               | **Distributed with Ray**                           |\n+------------------------------------------------+----------------------------------------------------+\n|.. code-block:: python                          |.. code-block:: python                              |\n|                                                |                                                    |\n|  # Execute f serially.                         |  # Execute f in parallel.                          |\n|                                                |                                                    |\n|                                                |  @ray.remote                                       |\n|  def f():                                      |  def f():                                          |\n|      time.sleep(1)                             |      time.sleep(1)                                 |\n|      return 1                                  |      return 1                                      |\n|                                                |                                                    |\n|                                                |                                                    |\n|                                                |  ray.init()                                        |\n|  results = [f() for i in range(4)]             |  results = ray.get([f.remote() for i in range(4)]) |\n+------------------------------------------------+----------------------------------------------------+\n\n\nRay comes with libraries that accelerate deep learning and reinforcement learning development:\n\n- `Ray Tune`_: Hyperparameter Optimization Framework\n- `Ray RLlib`_: Scalable Reinforcement Learning\n\n.. _`Ray Tune`: http://ray.readthedocs.io/en/latest/tune.html\n.. _`Ray RLlib`: http://ray.readthedocs.io/en/latest/rllib.html\n\nInstallation\n------------\n\nRay can be installed on Linux and Mac with ``pip install ray``.\n\nTo build Ray from source or to install the nightly versions, see the `installation documentation`_.\n\n.. _`installation documentation`: http://ray.readthedocs.io/en/latest/installation.html\n\nMore Information\n----------------\n\n- `Documentation`_\n- `Tutorial`_\n- `Blog`_\n- `Ray paper`_\n- `Ray HotOS paper`_\n\n.. _`Documentation`: http://ray.readthedocs.io/en/latest/index.html\n.. _`Tutorial`: https://github.com/ray-project/tutorial\n.. _`Blog`: https://ray-project.github.io/\n.. _`Ray paper`: https://arxiv.org/abs/1712.05889\n.. _`Ray HotOS paper`: https://arxiv.org/abs/1703.03924\n\nGetting Involved\n----------------\n\n- Ask questions on our mailing list `ray-dev@googlegroups.com`_.\n- Please report bugs by submitting a `GitHub issue`_.\n- Submit contributions using `pull requests`_.\n\n.. _`ray-dev@googlegroups.com`: https://groups.google.com/forum/#!forum/ray-dev\n.. _`GitHub issue`: https://github.com/ray-project/ray/issues\n.. _`pull requests`: https://github.com/ray-project/ray/pulls\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7604:3D40A:16BBBD:5BDB2F:6AB920CF"},"text_sha256":"1788995e637469a16311d0edaab792261e7b1a55783a2315a62170bb44efea08"},{"path":"doc/source/example-policy-gradient.rst","size":1406,"blob_sha":"806764560ba951431e701a008faaa95cc0d37c44","priority":1,"status":200,"text":"Policy Gradient Methods\n=======================\n\nThis code shows how to do reinforcement learning with policy gradient methods.\nView the `code for this example`_.\n\n.. note::\n\n    For an overview of Ray's reinforcement learning library, see `Ray RLlib <http://ray.readthedocs.io/en/latest/rllib.html>`__.\n\n\nTo run this example, you will need to install `TensorFlow with GPU support`_ (at\nleast version ``1.0.0``) and a few other dependencies.\n\n.. code-block:: bash\n\n  pip install gym[atari]\n  pip install tensorflow\n\nThen you can run the example as follows.\n\n.. code-block:: bash\n\n  python/ray/rllib/train.py --env=Pong-ram-v4 --run=PPO\n\nThis will train an agent on the ``Pong-ram-v4`` Atari environment. You can also\ntry passing in the ``Pong-v0`` environment or the ``CartPole-v0`` environment.\nIf you wish to use a different environment, you will need to change a few lines\nin ``example.py``.\n\nCurrent and historical training progress can be monitored by pointing\nTensorBoard to the log output directory as follows.\n\n.. code-block:: bash\n\n  tensorboard --logdir=~/ray_results\n\nMany of the TensorBoard metrics are also printed to the console, but you might\nfind it easier to visualize and compare between runs using the TensorBoard UI.\n\n.. _`TensorFlow with GPU support`: https://www.tensorflow.org/install/\n.. _`code for this example`: https://github.com/ray-project/ray/tree/master/python/ray/rllib/ppo\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FB04:3CC8A:174EDE:5C6EDD:6AB920CF"},"text_sha256":"901f799908973b69b0fc5520512eb57df6bd1800bcfddfa8c4835cd32befbb06"},{"path":"doc/source/policy-optimizers.rst","size":5382,"blob_sha":"8753c2932f953fd2eb8e00a2c974ef53c5c58875","priority":1,"status":200,"text":"Policy Optimizers\n=================\n\nRLlib supports using its policy optimizer implementations from external algorithms.\n\nExample of constructing and using a policy optimizer `(link to full example) <https://github.com/ericl/baselines/blob/rllib-example/baselines/deepq/run_simple_loop.py>`__:\n\n.. code-block:: python\n\n    ray.init()\n    env_creator = lambda env_config: gym.make(\"PongNoFrameskip-v4\")\n    optimizer = LocalSyncReplayOptimizer.make(\n        YourEvaluatorClass, [env_creator], num_workers=0, optimizer_config={})\n\n    i = 0\n    while optimizer.num_steps_sampled < 100000:\n        i += 1\n        print(\"== optimizer step {} ==\".format(i))\n        optimizer.step()\n        print(\"optimizer stats\", optimizer.stats())\n        print(\"local evaluator stats\", optimizer.local_evaluator.stats())\n\nRead more about policy optimizers in this post: `Distributed Policy Optimizers for Scalable and Reproducible Deep RL <https://rise.cs.berkeley.edu/blog/distributed-policy-optimizers-for-scalable-and-reproducible-deep-rl/>`__.\n\nHere are the steps for using a RLlib policy optimizer with an existing algorithm.\n\n1. Implement the `Policy evaluator interface <rllib-dev.html#policy-evaluators-and-optimizers>`__.\n\n    - Here is an example of porting a `PyTorch Rainbow implementation <https://github.com/ericl/Rainbow/blob/rllib-example/rainbow_evaluator.py>`__.\n\n    - Another example porting a `TensorFlow DQN implementation <https://github.com/ericl/baselines/blob/rllib-example/baselines/deepq/dqn_evaluator.py>`__.\n\n2. Pick a `Policy optimizer class <https://github.com/ray-project/ray/tree/master/python/ray/rllib/optimizers>`__. The `LocalSyncOptimizer <https://github.com/ray-project/ray/blob/master/python/ray/rllib/optimizers/local_sync.py>`__ is a reasonable choice for local testing. You can also implement your own. Policy optimizers can be constructed using their ``make`` method (e.g., ``LocalSyncOptimizer.make(evaluator_cls, evaluator_args, num_workers, optimizer_config)``), or you can construct them by passing in a list of evaluators instantiated as Ray actors.\n\n    - Here is code showing the `simple Policy Gradient agent <https://github.com/ray-project/ray/blob/master/python/ray/rllib/pg/pg.py>`__ using ``make()``.\n\n    - A different example showing an `A3C agent <https://github.com/ray-project/ray/blob/master/python/ray/rllib/a3c/a3c.py>`__ passing in Ray actors directly.\n\n3. Decide how you want to drive the training loop.\n\n    - Option 1: call ``optimizer.step()`` from some existing training code. Training statistics can be retrieved by querying the ``optimizer.local_evaluator`` evaluator instance, or mapping over the remote evaluators (e.g., ``ray.get([ev.some_fn.remote() for ev in optimizer.remote_evaluators])``) if you are running with multiple workers.\n\n    - Option 2: define a full RLlib `Agent class <https://github.com/ray-project/ray/blob/master/python/ray/rllib/agent.py>`__. This might be preferable if you don't have an existing training harness or want to use features provided by `Ray Tune <tune.html>`__.\n\nAvailable Policy Optimizers\n---------------------------\n\n+-----------------------------+---------------------+-----------------+------------------------------+\n| **Policy optimizer class**  | **Operating range** | **Works with**  | **Description**              |\n+=============================+=====================+=================+==============================+\n|AsyncOptimizer               |1-10s of CPUs        |(any)            |Asynchronous gradient-based   |\n|                             |                     |                 |optimization (e.g., A3C)      |\n+-----------------------------+---------------------+-----------------+------------------------------+\n|LocalSyncOptimizer           |0-1 GPUs +           |(any)            |Synchronous gradient-based    |\n|                             |1-100s of CPUs       |                 |optimization with parallel    |\n|                             |                     |                 |sample collection             |\n+-----------------------------+---------------------+-----------------+------------------------------+\n|LocalSyncReplayOptimizer     |0-1 GPUs +           | Off-policy      |Adds a replay buffer          |\n|                             |1-100s of CPUs       | algorithms      |to LocalSyncOptimizer         |\n+-----------------------------+---------------------+-----------------+------------------------------+\n|LocalMultiGPUOptimizer       |0-10 GPUs +          | Algorithms      |Implements data-parallel      |\n|                             |1-100s of CPUs       | written in      |optimization over multiple    |\n|                             |                     | TensorFlow      |GPUs, e.g., for PPO           |\n+-----------------------------+---------------------+-----------------+------------------------------+\n|ApexOptimizer                |1 GPU +              | Off-policy      |Implements the Ape-X          |\n|                             |10-100s of CPUs      | algorithms      |distributed prioritization    |\n|                             |                     | w/sample        |algorithm                     |\n|                             |                     | prioritization  |                              |\n+-----------------------------+---------------------+-----------------+------------------------------+\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"90EA:18233:17392E:5C57F2:6AB920CF"},"text_sha256":"79ae5e92937d1b76038b5700e17981f75d8fc4aa77deda2f406e9f5f5a118c1e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3381","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:178EFC3:1BAD8AE:6AB92861"},"commit":{"sha":"6da271970a121342112bfb966b9ced5f59ccf6e6","url":"https://github.com/ray-project/ray/commit/6da271970a121342112bfb966b9ced5f59ccf6e6","date":"2026-06-30T22:59:30Z","author_date":"2026-06-30T22:59:30Z","committer_date":"2026-06-30T22:59:30Z","tree_sha":"3de56241fde3bb4aa29c402623a944aa1cdfb2b6","message_first_line":"[core] Add NVIDIA RTX PRO 6000 accelerator type (#64428)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3380","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:1769900:1B88332:6AB92861"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6506,"blob_sha":"978e713e61f916c19320022fcb318ecca216c064","priority":0},{"path":".claude/rules/security.md","size":276,"blob_sha":"8ef84e4ebd74c1b770fe805ebd7784f7bfc83887","priority":1},{"path":"doc/source/ray-contribute/api-policy.md","size":3536,"blob_sha":"4d9b21208038c8af2b3438be66ac25b27f60d3f9","priority":1},{"path":"python/ray/autoscaler/aws/example-head-and-worker-security-group.yaml","size":860,"blob_sha":"1cddee6cffbdf5e56484ae0dd6d5a98c0c0bcae0","priority":1},{"path":"python/ray/autoscaler/aws/example-security-group.yaml","size":823,"blob_sha":"528ab99f3bece36177b4fc5ee0350e033584f306","priority":1},{"path":"python/requirements/security-requirements.txt","size":239,"blob_sha":"abb7aa22c839621524e2a355572bce33c857507c","priority":1},{"path":"SECURITY.md","size":185,"blob_sha":"bccd5c777943490597eb27647409e6303649c672","priority":1},{"path":"doc/source/ray-security/index.md","size":4650,"blob_sha":"91beb2fcf730786883e8295368e0c5c931e9dd05","priority":2},{"path":"doc/source/ray-security/token-auth.md","size":11972,"blob_sha":"9203ab992234bf195b82cf72ba1c931794908198","priority":2}],"documents":[{"path":"README.rst","size":6506,"blob_sha":"978e713e61f916c19320022fcb318ecca216c064","priority":0,"status":200,"text":".. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png\n\n.. image:: https://readthedocs.org/projects/ray/badge/?version=master\n    :target: http://docs.ray.io/en/master/?badge=master\n\n.. image:: https://img.shields.io/badge/Ray-Join%20Slack-blue\n    :target: https://www.ray.io/join-slack\n\n.. image:: https://img.shields.io/badge/Discuss-Ask%20Questions-blue\n    :target: https://discuss.ray.io/\n\n.. image:: https://img.shields.io/twitter/follow/raydistributed.svg?style=social&logo=twitter\n    :target: https://x.com/raydistributed\n\n.. image:: https://img.shields.io/badge/Get_started_for_free-3C8AE9?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEKADAAQAAAABAAAAEAAAAAA0VXHyAAABKElEQVQ4Ea2TvWoCQRRGnWCVWChIIlikC9hpJdikSbGgaONbpAoY8gKBdAGfwkfwKQypLQ1sEGyMYhN1Pd%2B6A8PqwBZeOHt%2FvsvMnd3ZXBRFPQjBZ9K6OY8ZxF%2B0IYw9PW3qz8aY6lk92bZ%2BVqSI3oC9T7%2FyCVnrF1ngj93us%2B540sf5BrCDfw9b6jJ5lx%2FyjtGKBBXc3cnqx0INN4ImbI%2Bl%2BPnI8zWfFEr4chLLrWHCp9OO9j19Kbc91HX0zzzBO8EbLK2Iv4ZvNO3is3h6jb%2BCwO0iL8AaWqB7ILPTxq3kDypqvBuYuwswqo6wgYJbT8XxBPZ8KS1TepkFdC79TAHHce%2F7LbVioi3wEfTpmeKtPRGEeoldSP%2FOeoEftpP4BRbgXrYZefsAI%2BP9JU7ImyEAAAAASUVORK5CYII%3D\n   :target: https://www.anyscale.com/ray-on-anyscale?utm_source=github&utm_medium=ray_readme&utm_campaign=get_started_badge\n\nRay is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI libraries for simplifying ML compute:\n\n.. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/what-is-ray-padded.svg\n\n..\n  https://docs.google.com/drawings/d/1Pl8aCYOsZCo61cmp57c7Sja6HhIygGCvSZLi_AuBuqo/edit\n\nLearn more about `Ray AI Libraries`_:\n\n- `Data`_: Scalable Datasets for ML\n- `Train`_: Distributed Training\n- `Tune`_: Scalable Hyperparameter Tuning\n- `RLlib`_: Scalable Reinforcement Learning\n- `Serve`_: Scalable and Programmable Serving\n\nOr more about `Ray Core`_ and its key abstractions:\n\n- `Tasks`_: Stateless functions executed in the cluster.\n- `Actors`_: Stateful worker processes created in the cluster.\n- `Objects`_: Immutable values accessible across the cluster.\n\nLearn more about Monitoring and Debugging:\n\n- Monitor Ray apps and clusters with the `Ray Dashboard <https://docs.ray.io/en/latest/ray-core/ray-dashboard.html>`__.\n- Debug Ray apps with the `Ray Distributed Debugger <https://docs.ray.io/en/latest/ray-observability/ray-distributed-debugger.html>`__.\n\nRay runs on any machine, cluster, cloud provider, and Kubernetes, and features a growing\n`ecosystem of community integrations`_.\n\nInstall Ray with: ``pip install ray``. For nightly wheels, see the\n`Installation page <https://docs.ray.io/en/latest/ray-overview/installation.html>`__.\n\n.. _`Serve`: https://docs.ray.io/en/latest/serve/index.html\n.. _`Data`: https://docs.ray.io/en/latest/data/data.html\n.. _`Workflow`: https://docs.ray.io/en/latest/workflows/\n.. _`Train`: https://docs.ray.io/en/latest/train/train.html\n.. _`Tune`: https://docs.ray.io/en/latest/tune/index.html\n.. _`RLlib`: https://docs.ray.io/en/latest/rllib/index.html\n.. _`ecosystem of community integrations`: https://docs.ray.io/en/latest/ray-overview/ray-libraries.html\n\n\nWhy Ray?\n--------\n\nToday's ML workloads are increasingly compute-intensive. As convenient as they are, single-node development environments such as your laptop cannot scale to meet these demands.\n\nRay is a unified way to scale Python and AI applications from a laptop to a cluster.\n\nWith Ray, you can seamlessly scale the same code from a laptop to a cluster. Ray is designed to be general-purpose, meaning that it can performantly run any kind of workload. If your application is written in Python, you can scale it with Ray, no other infrastructure required.\n\nMore Information\n----------------\n\n- `Documentation`_\n- `Ray Architecture whitepaper`_\n- `Exoshuffle: large-scale data shuffle in Ray`_\n- `Ownership: a distributed futures system for fine-grained tasks`_\n- `RLlib paper`_\n- `Tune paper`_\n\n*Older documents:*\n\n- `Ray paper`_\n- `Ray HotOS paper`_\n- `Ray Architecture v1 whitepaper`_\n\n.. _`Ray AI Libraries`: https://docs.ray.io/en/latest/ray-air/getting-started.html\n.. _`Ray Core`: https://docs.ray.io/en/latest/ray-core/walkthrough.html\n.. _`Tasks`: https://docs.ray.io/en/latest/ray-core/tasks.html\n.. _`Actors`: https://docs.ray.io/en/latest/ray-core/actors.html\n.. _`Objects`: https://docs.ray.io/en/latest/ray-core/objects.html\n.. _`Documentation`: http://docs.ray.io/en/latest/index.html\n.. _`Ray Architecture v1 whitepaper`: https://docs.google.com/document/d/1lAy0Owi-vPz2jEqBSaHNQcy2IBSDEHyXNOQZlGuj93c/preview\n.. _`Ray Architecture whitepaper`: https://docs.google.com/document/d/1tBw9A4j62ruI5omIJbMxly-la5w4q_TjyJgJL_jN2fI/preview\n.. _`Exoshuffle: large-scale data shuffle in Ray`: https://arxiv.org/abs/2203.05072\n.. _`Ownership: a distributed futures system for fine-grained tasks`: https://www.usenix.org/system/files/nsdi21-wang.pdf\n.. _`Ray paper`: https://arxiv.org/abs/1712.05889\n.. _`Ray HotOS paper`: https://arxiv.org/abs/1703.03924\n.. _`RLlib paper`: https://arxiv.org/abs/1712.09381\n.. _`Tune paper`: https://arxiv.org/abs/1807.05118\n\nGetting Involved\n----------------\n\n.. list-table::\n   :widths: 25 50 25 25\n   :header-rows: 1\n\n   * - Platform\n     - Purpose\n     - Estimated Response Time\n     - Support Level\n   * - `Discourse Forum`_\n     - For discussions about development and questions about usage.\n     - < 1 day\n     - Community\n   * - `GitHub Issues`_\n     - For reporting bugs and filing feature requests.\n     - < 2 days\n     - Ray OSS Team\n   * - `Slack`_\n     - For collaborating with other Ray users.\n     - < 2 days\n     - Community\n   * - `StackOverflow`_\n     - For asking questions about how to use Ray.\n     - 3-5 days\n     - Community\n   * - `Meetup Group`_\n     - For learning about Ray projects and best practices.\n     - Monthly\n     - Ray DevRel\n   * - `Twitter`_\n     - For staying up-to-date on new features.\n     - Daily\n     - Ray DevRel\n\n.. _`Discourse Forum`: https://discuss.ray.io/\n.. _`GitHub Issues`: https://github.com/ray-project/ray/issues\n.. _`StackOverflow`: https://stackoverflow.com/questions/tagged/ray\n.. _`Meetup Group`: https://www.meetup.com/Bay-Area-Ray-Meetup/\n.. _`Twitter`: https://x.com/raydistributed\n.. _`Slack`: https://www.ray.io/join-slack?utm_source=github&utm_medium=ray_readme&utm_campaign=getting_involved\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D618:3D40A:16BBD9:5BDB9A:6AB920D2"},"text_sha256":"94df2acbdfdc95f867ce205d63da33480db909359e6235d9bb3c912fb6a11e87"},{"path":".claude/rules/security.md","size":276,"blob_sha":"8ef84e4ebd74c1b770fe805ebd7784f7bfc83887","priority":1,"status":200,"text":"<!-- Security rules applying to all code -->\n- Add token-based authentication to all new gRPC endpoints and RPC handlers to maintain Ray's security model\n- Propagate auth tokens in new API calls (both C++ and Python sides) so that end-to-end authentication remains consistent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"61E0:3C4A0:175502:5C7518:6AB920D2"},"text_sha256":"1b56daaa68170ad08b91e8235d6da5114480d19b99ec55fed2d4dec443f0f927"},{"path":"doc/source/ray-contribute/api-policy.md","size":3536,"blob_sha":"4d9b21208038c8af2b3438be66ac25b27f60d3f9","priority":1,"status":200,"text":"---\nmyst:\n  html_meta:\n    description: \"Ray's policies for documenting, promoting, demoting, and deprecating APIs across exposure levels, including the required annotations and deprecation timelines. Consult this when adding, changing, or removing a public Ray API.\"\n---\n\n(api-policy)=\n\n# API Policy\n\nRay APIs refer to classes, class methods, or functions. When we declare an API, we promise our users that they can use these APIs to develop their apps without worrying about changes to these interfaces between different Ray releases. Declaring or deprecating an API has a significant impact on the community.  This document proposes simple policies to hold Ray contributors accountable to these promises and manage user expectations.\n\nFor API exposure levels, see {ref}`API Stability <api-stability>`.\n\n## API documentation policy\n\nDocumentation is one of the main channels through which we expose our APIs to users. If we provide incorrect information, it can significantly impact the reliability and maintainability of our users' applications. Based on the API exposure level, here is the policy to ensure the accuracy of our information.\n\n```{list-table} API Documentation Policy\n:widths: 20 16 16 16 16 16\n:header-rows: 1\n\n* - Policy/Exposure Level\n  - Stable Public API\n  - Beta Public API\n  - Alpha Public API\n  - Deprecated\n  - Developer API\n* - Must this API be documented?\n  - Yes\n  - Yes\n  - Yes\n  - Yes\n  - Up to the developers\n* - Must a method be annotated with one of the API annotations (PublicAPI, DeveloperAPI or Deprecated)?\n  - Yes\n  - Yes\n  - Yes\n  - Yes\n  - No. The absence of annotations implies the Developer API level by default.\n* - Can this API be private (either inside the _internal module or has an underscore prefix)?\n  - No\n  - No\n  - No\n  - No\n  - No\n```\n\n## API Lifecycle Policy\n\nUsers have high expectations for certain exposure levels, so we need to be cautious when moving APIs between different levels. Here is the policy for managing the API exposure lifecycle.\n\n```{list-table} API Lifecycle Policy\n:widths: 20 16 16 16 16 16\n:header-rows: 1\n\n* - Policy/Exposure Level\n  - Stable Public API\n  - Beta Public API\n  - Alpha Public API\n  - Deprecated API\n  - Developer API\n* - Can this API be promoted to a higher level without any warnings, heads up to users?\n  - Yes\n  - Yes\n  - Yes\n  - No\n  - Yes\n* - Can this API be demoted to a lower level? If so then how?\n  - Can be demoted to Deprecated only. The API should emit warning messages and a deadline for deprecations in **6 months (or +25 ray minor versions)**.\n  - Can be demoted to Deprecated only. The API should emit warning messages and a deadline for deprecations in **3 months (or +12 ray minor versions)**.\n  - Users must allow for and expect breaking changes in alpha components, and must have no expectations of stability.\n  - Yes\n  - No annotations mean it is a developer API by default\n* - Can you remove or change this API's parameters?\n  - Yes. The API should emit warning messages and you must set a deadline for the end-of-life of the original version that is **6 months or +25 Ray minor versions**. During the transition period, you must support both the new and old parameters.\n  - Yes. The API should emit warning messages and you must set a deadline for the change in **3 months or +12 Ray minor versions**. During the transition period, you must support both the new and old parameters.\n  - Users must allow for and expect breaking changes in alpha components, and must have no expectations of stability.\n  - No\n  - Yes\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0C16:38C7FC:177452:5934D6:6AB920CD"},"text_sha256":"e5c5719a29e452dde06a007b5bfb175f9f2192e53175b78c23d6c5672c73077a"},{"path":"python/ray/autoscaler/aws/example-head-and-worker-security-group.yaml","size":860,"blob_sha":"1cddee6cffbdf5e56484ae0dd6d5a98c0c0bcae0","priority":1,"status":200,"text":"cluster_name: sg\n\nmax_workers: 1\n\nprovider:\n    type: aws\n    region: us-west-2\n    availability_zone: us-west-2a\n\nauth:\n    ssh_user: ubuntu\n\n# If required, head and worker nodes can exist on subnets in different VPCs and\n# communicate via VPC peering.\n\n# VPC peering overview: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-peering.html.\n# Setup VPC peering: https://docs.aws.amazon.com/vpc/latest/peering/create-vpc-peering-connection.html.\n# Configure VPC peering route tables: https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-routing.html.\navailable_node_types:\n    ray.head.default:\n      node_config:\n        SecurityGroupIds:\n            - sg-1234abcd # Replace with an actual security group id.\n\n    ray.worker.default:\n      node_config:\n        SecurityGroupIds:\n            - sg-1234abcd # Replace with an actual security group id.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9484:3E1DA:172FBC:5C4FE9:6AB920CE"},"text_sha256":"9b403bae0ad0560b48550099b3b55b541987e696246572eac2ef3c55032a7ff4"},{"path":"python/ray/autoscaler/aws/example-security-group.yaml","size":823,"blob_sha":"528ab99f3bece36177b4fc5ee0350e033584f306","priority":1,"status":200,"text":"# An unique identifier for the head node and workers of this cluster.\ncluster_name: minimal\n\n# The maximum number of workers nodes to launch in addition to the head\n# node. This takes precedence over min_workers. min_workers default to 0.\nmax_workers: 1\n\n# Cloud-provider specific configuration.\nprovider:\n  type: aws\n  region: us-west-2\n  availability_zone: us-west-2a\n  # Security group to create with custom in bound rules and name.\n  security_group:\n    GroupName: test_security_group_name\n    IpPermissions:\n      - FromPort: 443\n        ToPort: 443\n        IpProtocol: TCP\n        IpRanges:\n          - CidrIp: 0.0.0.0/0\n      - FromPort: 8265\n        ToPort: 8265\n        IpProtocol: TCP\n        IpRanges:\n          - CidrIp: 0.0.0.0/0\n# How Ray will authenticate with newly launched nodes.\nauth:\n  ssh_user: ubuntu\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C6E:3B7E2:16AC86:5BCDA7:6AB920D3"},"text_sha256":"a6b60df535df55faa598a460104ad6084684d909f32e9a3eb75d9295144e9621"},{"path":"python/requirements/security-requirements.txt","size":239,"blob_sha":"abb7aa22c839621524e2a355572bce33c857507c","priority":1,"status":200,"text":"# Requirement constraints for security.\n#\n# Only for constraining version ranges. Packages listed might not be installed,\n# might not be ray requirements. They are only used in compiling the\n# constraint file\n\nidna>=3.7\ncertifi>=2025.1.31\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F3F2:40CE8:17A1AC:5CC112:6AB920D4"},"text_sha256":"b94753107d6dfdf6f1d93edba8c54906e65e7ca4f03962ce71c55aa3fa93ca4a"},{"path":"SECURITY.md","size":185,"blob_sha":"bccd5c777943490597eb27647409e6303649c672","priority":1,"status":200,"text":"# Security Policy\n\nIf you are deploying Ray, read [Security](doc/source/ray-security/index.md).\n\n## Reporting a vulnerability\n\nPlease report security issues to `security@anyscale.com`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E3DA:349C76:1711F3:5C2E4E:6AB920D3"},"text_sha256":"904f5619f79fd56c7b40c24a8fd1bbf31c9ae87bf517dd461964793d59db8916"},{"path":"doc/source/ray-security/index.md","size":4650,"blob_sha":"91beb2fcf730786883e8295368e0c5c931e9dd05","priority":2,"status":200,"text":"(security)=\n\n# Security\n\n```{toctree}\n:hidden:\n\ntoken-auth\n```\n\n::::{note}\nFor the latest Ray security alerts, see the [Security Advisories](https://github.com/ray-project/ray/security/advisories) page on GitHub.\n::::\n\nRay is an easy-to-use framework to run arbitrary code across one or more nodes in a Ray Cluster. Ray provides fault-tolerance, optimized scheduling, task orchestration, and auto-scaling to run a given workload.\n\nTo achieve performant and distributed workloads, Ray components require intra-cluster communication. This communication includes central tenets like distributed memory and node-heartbeats, as well as auxiliary functions like metrics and logs. Ray leverages gRPC for a majority of this communication.\n\nRay offers additional services to improve the developer experience. These services include Ray Dashboard (to allow for cluster introspection and debugging), Ray Jobs (hosted alongside the Dashboard, which services Ray Job submissions), and Ray Client (to allow for local, interactive development with a remote cluster). These services provide complete access to the Ray Cluster and the underlying compute resources.\n\n:::{admonition} Ray allows any clients to run arbitrary code. Be extremely careful about what is allowed to access your Ray Cluster\n:class: caution\n\nIf you expose these services (Ray Dashboard, Ray Jobs, Ray Client), anybody\nwho can access the associated ports can execute arbitrary code on your Ray Cluster. This can happen:\n* Explicitly: By submitting a Ray Job, or using the Ray Client\n* Indirectly: By calling the Dashboard REST APIs of these services\n* Implicitly: Ray extensively uses cloudpickle for serialization of arbitrary Python objects. See [the pickle documentation](https://docs.python.org/3/library/pickle.html) for more details on Pickle's security model.\n\nThe Ray Dashboard, Ray Jobs and Ray Client are developer tools that you should\nonly use with the necessary access controls in place to restrict access to trusted parties only.\n:::\n\n## Personas\n\nWhen considering the security responsibilities of running Ray, think about the different personas interacting with Ray.\n* **Ray Developers** write code that relies on Ray. They either run a single-node Ray Cluster locally or multi-node clusters remotely on provided compute infrastructure.\n* **Platform providers** provide the compute environment on which **Developers** run Ray.\n* **Users** interact with the output of Ray-powered applications.\n\n## Best practices\n**Security and isolation must be enforced outside of the Ray Cluster.** Ray expects to run in a safe network environment and to act upon trusted code. Developers and platform providers must maintain the following invariants to ensure the safe operation of Ray clusters.\n\n### Deploy Ray clusters in a controlled network environment\n* Network traffic between core Ray components and additional Ray components should always be in a controlled, isolated network. Access to additional services should be gated with strict network controls and/or external authentication/authorization proxies.\n* gRPC communication can be encrypted with TLS, but it's not a replacement for network isolation.\n* Platform providers are responsible for ensuring that Ray runs in sufficiently controlled network environments and that developers can access features like Ray Dashboard in a secure manner.\n### Only execute trusted code within Ray\n* Ray faithfully executes code that is passed to it – Ray doesn’t differentiate between a tuning experiment, a rootkit install, or an S3 bucket inspection.\n* Ray developers are responsible for building their applications with this understanding in mind.\n### Enforce isolation outside of Ray with multiple Ray clusters\n* If workloads require isolation from each other, use separate, isolated Ray clusters. Ray can schedule multiple distinct Jobs in a single Cluster, but doesn't attempt to enforce isolation between them. Similarly, Ray doesn't implement access controls for developers interacting with a given cluster.\n* Ray developers are responsible for determining which applications need to be separated and platform providers are responsible for providing this isolation.\n### Enable token authentication\n* Starting in Ray 2.52.0, Ray supports built-in token authentication that provides an additional measure to prevent unauthorized access to the cluster (including untrusted code execution). See {ref}`Ray token authentication <token-auth>` for details.\n* Token authentication is not an alternative to deploying Ray clusters in a controlled network environment. Rather, it is a defense-in-depth measure that adds to network-level security.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CA6:3D501:17E8C4:5D0936:6AB920D3"},"text_sha256":"77d4e3d4ba2c57543cf2372b97572d963f0c887ceca27e4d735d99975c4336ac"},{"path":"doc/source/ray-security/token-auth.md","size":11972,"blob_sha":"9203ab992234bf195b82cf72ba1c931794908198","priority":2,"status":200,"text":"(token-auth)=\n\n# Ray token authentication\n\nEnable token authentication in Ray to secure cluster access and prevent unauthorized use. This guide explains how authentication works and how to set it up for different deployment scenarios.\n\n:::{note}\nToken authentication is available in Ray 2.52.0 or later.\n:::\n\n## How Ray token authentication works\n\nTo enable token authentication, set the environment variable `RAY_AUTH_MODE=token` before starting your Ray cluster. When you start a Ray cluster with authentication enabled, all external Ray APIs and internal communications are authenticated using the token as a shared secret.\n\nThe process for generating and configuring authentication tokens differs depending on how you launch your Ray cluster. When you start a local instance of Ray using `ray.init()` with token authentication enabled, Ray automatically generates and uses a token.\n\nOther cluster launching methods require that you generate a token before starting the cluster. You can `ray get-auth-token [--generate]` to retrieve your existing token or generate a new one.\n\n:::{note}\nAuthentication is disabled by default in Ray 2.52.0. Ray plans to enable token authentication by default in a future release. We recommend enabling token authentication to protect your cluster from unauthorized access.\n:::\n\n### What token does Ray use?\n\nYou can configure authentication tokens using environment variables or the default path. We recommend using the default path when possible to reduce the chances of committing the token to version control.\n\nRay checks for tokens in the following order, highest priority first:\n\n1. `RAY_AUTH_TOKEN` environment variable.\n2. `RAY_AUTH_TOKEN_PATH` environment variable, which provides a path to a token file.\n3. The default location, `~/.ray/auth_token`.\n\nWhen managing multiple tokens, we recommend storing them in local files and using the `RAY_AUTH_TOKEN_PATH` environment variable rather than setting the `RAY_AUTH_TOKEN` value directly to avoid exposing the token to other code that reads environment variables.\n\n## Security considerations\n\nRay transmits the authentication token as an HTTP header, which is transmitted in plaintext when using insecure `http` connections. We recommend enabling some form of encryption whenever exposing a Ray cluster over the network. Consider the following:\n\n- **Local development**: Traffic doesn't leave your machine, so no additional security is needed.\n- **SSH tunneling**: Use SSH tunneling/port forwarding via the `ray dashboard` command or `kubectl port-forward`.\n- **TLS termination**: Deploy a TLS proxy in front of your Ray cluster.\n- **VPN/Overlay networks**: Use network-level encryption for all traffic into and within the cluster.\n\n:::{warning}\nDon't expose Ray clusters directly to the internet without encryption. Tokens alone don't protect against network eavesdropping.\n:::\n\nTokens have the following properties:\n\n- Ray stores tokens by default in plaintext at `~/.ray/auth_token`.\n- Use file permissions to keep token files secure, especially in shared environments.\n- Don't commit tokens to version control.\n- Tokens don't expire. Your local token remains valid unless you delete and regenerate the token. Ray clusters use the same token for the lifetime of the cluster.\n\n## Configure token authentication for local development\n\nTo enable authentication on your local machine for development, set the `RAY_AUTH_MODE=token` environment variable in your shell or IDE. You can persist this configuration in your `.bashrc` file or similar.\n\n### Local development with ray.init()\n\nWhen you run a script that starts a local Ray instance with `ray.init()` after setting `RAY_AUTH_MODE=token` as an environment variable, Ray handles authentication automatically:\n\n- If a token doesn't already exist at `~/.ray/auth_token`, Ray generates a token and saves it to the file. A log message displays to confirm token creation.\n- If a token already exists at `~/.ray/auth_token`, Ray reuses the existing token automatically.\n\nThe following example shows what happens on the first run:\n\n```bash\n$ export RAY_AUTH_MODE=token\n$ python -c \"import ray;ray.init()\"\n```\n\nOn the first run, this command (or any other script that initializes Ray) logs a line similar to the following:\n\n```bash\nGenerated new authentication token and saved to /Users/<username>/.ray/auth_token\n```\n\n### Local development with ray start\n\nWhen you use `ray start --head` to start a local cluster after setting `RAY_AUTH_MODE=token` as an environment variable, you need to generate a token first:\n\n- If no token exists, `ray start` shows an error message with instructions.\n- Run `ray get-auth-token --generate` to generate a new token at the path `~/.ray/auth_token`.\n- Once generated, Ray uses the token every time you run `ray start`.\n\nThe following example demonstrates this flow:\n\n```bash\n# Set the environment variable.\n$ export RAY_AUTH_MODE=token\n\n# First attempt - an error is raised if no token exists.\n$ ray start --head\n...\nray.exceptions.AuthenticationError: Token authentication is enabled but no authentication token was found. Ensure that the token for the cluster is available in a local file (e.g., ~/.ray/auth_token or via RAY_AUTH_TOKEN_PATH) or as the `RAY_AUTH_TOKEN` environment variable. To generate a token for local development, use `ray get-auth-token --generate` For remote clusters, ensure that the token is propagated to all nodes of the cluster when token authentication is enabled. For more information, see: https://docs.ray.io/en/latest/ray-security/token-auth.html\n\n# Generate a token.\n$ ray get-auth-token --generate\n<token is output and written to ~/.ray/auth_token>\n\n# Start local cluster again - works now.\n$ ray start --head\n...\nRay runtime started.\n...\n```\n\n## Configure token authentication for remote clusters\n\nWhen working with remote clusters you must ensure that all nodes in the remote cluster have token authentication enabled and access to the same token. Any clients that interact with the remote cluster, including your local machine, must also have the token configured. The following sections provide an overview of configuring this using the Ray cluster launcher and self-managed clusters.\n\nFor instructions on configuring token authentication with KubeRay, see {ref}`Token authentication with KubeRay <kuberay-auth>`.\n\n:::{note}\nIf you're using a hosted version of Ray, contact your customer support for authentication questions.\n\nAnyscale manages authentication automatically for users.\n:::\n\n### Ray clusters on remote virtual machines\n\nThis section provides instructions for using `ray up` to launch a remote cluster on virtual machines with token authentication enabled.\n\n#### Step 1: Generate a token\n\nYou must generate a token on your local machine. Run the following command to generate a token:\n\n```bash\nray get-auth-token --generate\n```\n\nThis command generates a token on your local machine at the path `~/.ray/auth_token` and outputs it to the terminal.\n\n#### Step 2: Specify token authentication values in your cluster configuration YAML\n\nTo enable and configure token authentication, you add the following setting to your cluster configuration YAML:\n\n- Use `file_mounts` to mount your locally generated token file to all nodes in the cluster.\n- Use `initialization_commands` to set the environment variable `RAY_AUTH_MODE=token` for all virtual machines in the cluster.\n\nThe following is an example cluster configuration YAML that includes the `file_mounts` and `initialization_commands` settings required to enable token authentication and use the token generated on your local machine at the path `~/.ray/auth_token`:\n\n```yaml\ncluster_name: my-cluster-name\nprovider:\n    type: aws\n    region: us-west-2\nmax_workers: 2\navailable_node_types:\n    ray.head.default:\n        resources: {}\n        node_config:\n            InstanceType: m5.large\n    ray.worker.default:\n        min_workers: 2\n        max_workers: 2\n        resources: {}\n        node_config:\n            InstanceType: m5.large\n\n# Mount a locally generated token file to all nodes in the Ray cluster.\nfile_mounts: {\n    \"/home/ubuntu/.ray/auth_token\": \"~/.ray/auth_token\",\n}\n\n# Set the RAY_AUTH_MODE environment variable for all shell sessions on the cluster.\ninitialization_commands:\n  - echo \"export RAY_AUTH_MODE=token\" >> ~/.bashrc\n```\n\n#### Step 3: Launch the Ray cluster\n\nRun the following command to launch a Ray cluster using your cluster configuration YAML:\n\n```bash\nray up cluster.yaml\n```\n\n#### Step 4: Configure the Ray dashboard and port forwarding\n\nConnecting to the Ray dashboard configures secure SSH port forwarding between your local machine and the Ray cluster. Complete this step even if you don't plan to use the dashboard for monitoring.\n\nRun the following command to set up port forwarding for the Ray dashboard port (`8265` by default):\n\n```bash\nray dashboard cluster.yaml\n```\n\nUpon opening the dashboard, a prompt displays requesting your authentication token. To display the token in plaintext, you can run the following on your local machine:\n\n```bash\nexport RAY_AUTH_MODE=token\nray get-auth-token\n```\n\nPaste the token in the prompt and click **Submit**. The token gets stored as a cookie for a maximum of 30 days. When you open the dashboard for a cluster that uses a different token, a prompt appears to enter the token for that cluster.\n\n#### Step 5: Submit a Ray job\n\nYou can submit a Ray job with token authentication using secure SSH port forwarding:\n\n```bash\nexport RAY_AUTH_MODE=token\nray job submit --working-dir . -- python script.py\n```\n\n### Self-managed clusters\n\nIf you have a custom deployment where you run `ray start` on multiple nodes, you can use token authentication by generating a token and distributing it to all nodes in the cluster, as shown in the following steps.\n\n#### Step 1: Generate a token\n\nGenerate a token on a single machine using the following command:\n\n```bash\nray get-auth-token --generate\n```\n\n:::{note}\nAny machine that needs to interact with the cluster must have the token used to configure authentication.\n:::\n\n#### Step 2: Copy the token to all nodes\n\nCopy the same token to each node in your Ray cluster. For example, use `scp` to copy the token:\n\n```bash\nscp ~/.ray/auth_token user@node1:~/.ray/auth_token;\nscp ~/.ray/auth_token user@node2:~/.ray/auth_token;\n```\n\n#### Step 3: Start Ray with token authentication\n\nYou must set the environment variable `RAY_AUTH_MODE=token` on each node before running `ray start`, as in the following example:\n\n```bash\nssh user@node1 \"RAY_AUTH_MODE=token ray start --head\";\nssh user@node2 \"RAY_AUTH_MODE=token ray start --address=node1:6379\";\n```\n\n## Troubleshooting token authentication issues\n\nYou might encounter the following problems with token authentication.\n\n### Token authentication isn't enabled\n\nMake sure you've set the `RAY_AUTH_MODE=token` environment variable in the environment where you're launching Ray *and* in any shell where you are using a client to connect to Ray.\n\n### Authentication token not found\n\nIf running locally, run `ray get-auth-token --generate` to create a token on your local machine.\nIf running a remote cluster, make sure you've followed instructions to copy your token into the cluster.\n\n### Invalid authentication token\n\nAny client that tries to interact with a Ray cluster must have the same token as the Ray cluster.\n\nIf the token on your local machine doesn't match the token in a Ray cluster, you can use the `RAY_AUTH_TOKEN_PATH` or `RAY_AUTH_TOKEN` environment variable to configure a token for interacting with that cluster. You must work with the creator of the cluster to get the token.\n\n:::{note}\nIt's possible to stop and then restart a cluster using a different token. All clients connecting to the cluster must have the updated token to connect successfully.\n:::\n\n## Next steps\n\n- See {ref}`overall security guidelines <security>`.\n- Read about {ref}`KubeRay authentication <kuberay-auth>` for Kubernetes-specific configuration.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"30E4:11E74B:173A94:5C59C6:6AB920D4"},"text_sha256":"5ae2c9daae2a54fca3dc7956684aa224207493b8d013d9c5599a6d4e1e2a91ea"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"naptha/tesseract.js","input_row":{"repository":"naptha/tesseract.js","url":"https://github.com/naptha/tesseract.js","name":"tesseract.js","owner":"naptha","description":"Pure Javascript OCR for more than 100 Languages 📖🎉🖥","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":38739,"issues":740,"created_at":"2015-06-24T02:49:52Z","updated_at":"2026-09-27T13:22:08Z","first_commit_at":"2015-06-26T21:54:30Z","last_commit_at":"2026-05-17T01:37:38Z","activity_months":130.66,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:29:57.464Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"naptha/tesseract.js","visibility":"public","created_at":"2015-06-24T02:49:52Z","updated_at":"2026-09-27T13:22:08Z","private":false,"fork":false,"archived":false,"stargazers_count":38739,"open_issues_count":53,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3379","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0882:156040:17B604F:1BD414E:6AB92865"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3378","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:17BB0DA:1BD9ECF:6AB92865"},"commit":{"sha":"fbe920d66eda8829fab6323a49fb22e8d0251dc9","url":"https://github.com/naptha/tesseract.js/commit/fbe920d66eda8829fab6323a49fb22e8d0251dc9","date":"2018-05-12T00:17:35Z","author_date":"2018-05-12T00:17:35Z","committer_date":"2018-05-12T00:17:35Z","tree_sha":"bf12c75c615aaecc8b2e20cbb07a842ca4cb1dfa","message_first_line":"Update CDN URL"},"tree_request_status":200,"tree_rate":{"github_remaining":"3377","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17A135D:1BBEBF8:6AB92866"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11192,"blob_sha":"a6f01304a9fd7f0172b9df16482d8d8c541f474c","priority":0}],"documents":[{"path":"README.md","size":11192,"blob_sha":"a6f01304a9fd7f0172b9df16482d8d8c541f474c","priority":0,"status":200,"text":"# [Tesseract.js](http://tesseract.projectnaptha.com/)\n\n[![NPM version][tesseractjs-npm-image]][tesseractjs-npm-url]\n\n[tesseractjs-npm-image]: https://img.shields.io/npm/v/tesseract.js.svg\n[tesseractjs-npm-url]: https://npmjs.org/package/tesseract.js\n\nTesseract.js is a javascript library that gets words in [almost any language](./docs/tesseract_lang_list.md) out of images. ([Demo](http://tesseract.projectnaptha.com/))\n\n[![fancy demo gif](https://github.com/naptha/tesseract.js/blob/master/demo.gif)](http://tesseract.projectnaptha.com)\n\nTesseract.js works with script tags, [webpack](https://webpack.js.org/)/[Browserify](http://browserify.org/), and [Node.js](https://nodejs.org/en/). [After you install it](#installation), using it is as simple as\n\n  ```javascript\nTesseract.recognize(myImage)\n         .progress(function  (p) { console.log('progress', p)    })\n         .then(function (result) { console.log('result', result) })\n```\n\n[Check out the docs](#docs) for a full treatment of the API.\n\n## Provenance\nTesseract.js wraps an [emscripten](https://github.com/kripken/emscripten) [port](https://github.com/naptha/tesseract.js-core) of the [Tesseract](https://github.com/tesseract-ocr/tesseract) [OCR](https://en.wikipedia.org/wiki/Optical_character_recognition) Engine.\n\n\n# Installation\nTesseract.js works with a `<script>` tag via local copy or CDN, with webpack and Browserify via `npm`, and on Node.js via `npm`. [Check out the docs](#docs) for a full treatment of the API.\n\n## &lt;script />\n\nYou can simply include Tesseract.js with a CDN like this:\n```html\n<script src='https://cdnjs.cloudflare.com/ajax/libs/tesseract.js/1.0.10/tesseract.min.js'><\/script>\n```\n\nAfter including your scripts, the `Tesseract` variable will be defined globally!\n\n## Dependency\nFirst:\n```shell\n> yarn add tesseract.js\n```\nor\n```\n> npm install tesseract.js --save\n```\n> Note: Tesseract.js currently requires Node.js v6.8.0 or higher.\n\n\n## Usage\n```javascript\nvar Tesseract = require('tesseract.js')\n```\n\nor\n```javascript\nimport Tesseract from 'tesseract.js'\n```\n\n\n# Docs\n\n* [Tesseract.recognize](#tesseractrecognizeimage-imagelike-options---tesseractjob)\n  + [Simple Example](#simple-example)\n  + [More Complicated Example](#more-complicated-example)\n* [Tesseract.detect](#tesseractdetectimage-imagelike---tesseractjob)\n* [ImageLike](#imagelike)\n* [TesseractJob](#tesseractjob)\n  + [TesseractJob.progress](#tesseractjobprogresscallback-function---tesseractjob)\n  + [TesseractJob.then](#tesseractjobthencallback-function---tesseractjob)\n  + [TesseractJob.catch](#tesseractjobcatchcallback-function---tesseractjob)\n  + [TesseractJob.finally](#tesseractjobfinallycallback-function---tesseractjob)\n* [Local Installation](#local-installation)\n  + [corePath](#corepath)\n  + [workerPath](#workerpath)\n  + [langPath](#langpath)\n* [Contributing](#contributing)\n  + [Development](#development)\n  + [Building Static Files](#building-static-files)\n  + [Send us a Pull Request!](#send-us-a-pull-request)\n\n\n## Tesseract.recognize(image: [ImageLike](#imagelike)[, options]) -> [TesseractJob](#tesseractjob)\nFigures out what words are in `image`, where the words are in `image`, etc.\n> Note: `image` should be sufficiently high resolution.\n> Often, the same image will get much better results if you upscale it before calling `recognize`.\n\n- `image` is any [ImageLike](#imagelike) object.\n- `options` is either absent (in which case it is interpreted as `'eng'`), a string specifing a language short code from the [language list](./docs/tesseract_lang_list.md), or a flat json object that may:\n    + include properties that override some subset of the [default tesseract parameters](./docs/tesseract_parameters.md)\n    + include a `lang` property with a value from the [list of lang parameters](./docs/tesseract_lang_list.md)\n\nReturns a [TesseractJob](#tesseractjob) whose `then`, `progress`, `catch` and `finally` methods can be used to act on the result.\n\n### Simple Example:\n```javascript\nTesseract.recognize(myImage)\n.then(function(result){\n    console.log(result)\n})\n```\n\n### More Complicated Example:\n```javascript\n// if we know our image is of spanish words without the letter 'e':\nTesseract.recognize(myImage, {\n    lang: 'spa',\n    tessedit_char_blacklist: 'e'\n})\n.then(function(result){\n    console.log(result)\n})\n```\n\n\n\n\n## Tesseract.detect(image: [ImageLike](#imagelike)) -> [TesseractJob](#tesseractjob)\n\nFigures out what script (e.g. 'Latin', 'Chinese') the words in  image are written in.\n\n- `image` is any [ImageLike](#imagelike) object.\n\nReturns a [TesseractJob](#tesseractjob) whose `then`, `progress`, `catch` and `finally` methods can be used to act on the result of the script.\n\n\n```javascript\nTesseract.detect(myImage)\n.then(function(result){\n    console.log(result)\n})\n```\n\n\n## ImageLike\n\nThe main Tesseract.js functions take an `image` parameter, which should be something that is like an image. What's considered \"image-like\" differs depending on whether it is being run from the browser or through NodeJS.\n\n\nOn a browser, an image can be:\n- an `img`, `video`, or `canvas` element\n- a CanvasRenderingContext2D (returned by `canvas.getContext('2d')`)\n- a `File` object (from a file `<input>` or drag-drop event)\n- a `Blob` object\n- a `ImageData` instance (an object containing `width`, `height` and `data` properties)\n- a path or URL to an accessible image (the image must either be hosted locally or accessible by CORS)\n\n\n\n\nIn Node.js, an image can be\n- a path to a local image\n- a `Buffer` instance containing a `PNG` or `JPEG` image\n- a `ImageData` instance (an object containing `width`, `height` and `data` properties)\n\n\n## TesseractJob\n\nA TesseractJob is an object returned by a call to `recognize` or `detect`. It's inspired by the ES6 Promise interface and provides `then` and `catch` methods. It also provides `finally` method, which will be fired regardless of the job fate. One important difference is that these methods return the job itself (to enable chaining) rather than new.\n\nTypical use is:\n```javascript\nTesseract.recognize(myImage)\n    .progress(message => console.log(message))\n    .catch(err => console.error(err))\n    .then(result => console.log(result))\n    .finally(resultOrError => console.log(resultOrError))\n```\n\nWhich is equivalent to:\n```javascript\nvar job1 = Tesseract.recognize(myImage);\n\njob1.progress(message => console.log(message));\n\njob1.catch(err => console.error(err));\n\njob1.then(result => console.log(result));\n\njob1.finally(resultOrError => console.log(resultOrError));\n```\n\n\n\n### TesseractJob.progress(callback: function) -> TesseractJob\nSets `callback` as the function that will be called every time the job progresses.\n- `callback` is a function with the signature `callback(progress)` where `progress` is a json object.\n\nFor example:\n```javascript\nTesseract.recognize(myImage)\n    .progress(function(message){console.log('progress is: ', message)})\n```\n\nThe console will show something like:\n```javascript\nprogress is: {loaded_lang_model: \"eng\", from_cache: true}\nprogress is: {initialized_with_lang: \"eng\"}\nprogress is: {set_variable: Object}\nprogress is: {set_variable: Object}\nprogress is: {recognized: 0}\nprogress is: {recognized: 0.3}\nprogress is: {recognized: 0.6}\nprogress is: {recognized: 0.9}\nprogress is: {recognized: 1}\n```\n\n\n### TesseractJob.then(callback: function) -> TesseractJob\nSets `callback` as the function that will be called if and when the job successfully completes.\n- `callback` is a function with the signature `callback(result)` where `result` is a json object.\n\n\nFor example:\n```javascript\nTesseract.recognize(myImage)\n    .then(function(result){console.log('result is: ', result)})\n```\n\nThe console will show something like:\n```javascript\nresult is: {\n    blocks: Array[1]\n    confidence: 87\n    html: \"<div class='ocr_page' id='page_1' ...\"\n    lines: Array[3]\n    oem: \"DEFAULT\"\n    paragraphs: Array[1]\n    psm: \"SINGLE_BLOCK\"\n    symbols: Array[33]\n    text: \"Hello World↵from beyond↵the Cosmic Void↵↵\"\n    version: \"3.04.00\"\n    words: Array[7]\n}\n```\n\n### TesseractJob.catch(callback: function) -> TesseractJob\nSets `callback` as the function that will be called if the job fails.\n- `callback` is a function with the signature `callback(error)` where `error` is a json object.\n\n### TesseractJob.finally(callback: function) -> TesseractJob\nSets `callback` as the function that will be called regardless if the job fails or success.\n- `callback` is a function with the signature `callback(resultOrError)` where `resultOrError` is a json object.\n\n## Local Installation\n\nIn the browser, `tesseract.js` simply provides the API layer. Internally, it opens a WebWorker to handle requests. That worker itself loads code from the Emscripten-built `tesseract.js-core` which itself is hosted on a CDN. Then it dynamically loads language files hosted on another CDN.\n\nBecause of this we recommend loading `tesseract.js` from a CDN. But if you really need to have all your files local, you can use the `Tesseract.create` function which allows you to specify custom paths for workers, languages, and core.\n\n```javascript\nwindow.Tesseract = Tesseract.create({\n    workerPath: '/path/to/worker.js',\n    langPath: 'https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/',\n    corePath: 'https://cdn.rawgit.com/naptha/tesseract.js-core/0.1.0/index.js',\n})\n```\n\n### corePath\nA string specifying the location of the [tesseract.js-core library](https://github.com/naptha/tesseract.js-core), with default value 'https://cdn.rawgit.com/naptha/tesseract.js-core/master/index.js'. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use a different file.\n\n### workerPath\nA string specifying the location of the [tesseract.worker.js](./dist/tesseract.worker.js) file. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use a different file.\n\n### langPath\nA string specifying the location of the tesseract language files, with default value 'https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/'. Language file URLs are calculated according to the formula `langPath + langCode + '.traineddata.gz'`. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use different language files.\n\n\n## Contributing\n### Development\nTo run a development copy of tesseract.js, first clone this repo.\n```shell\n> git clone https://github.com/naptha/tesseract.js.git\n```\n\nThen, `cd tesseract.js && npm install && npm start`\n```shell\n> cd tesseract.js\n> npm install && npm start\n\n  ... a bunch of npm stuff ...\n\n  Starting up http-server, serving ./\n  Available on:\n    http://127.0.0.1:7355\n    http://[your ip]:7355\n\n```\n\nThen open `http://localhost:7355/examples/file-input/demo.html` in your favorite browser. The devServer automatically rebuilds `tesseract.js` and `tesseract.worker.js` when you change files in the src folder.\n\n### Building Static Files\nAfter you've cloned the repo and run `npm install` as described in the [Development Section](#development), you can build static library files in the dist folder with\n```shell\n> npm run build\n```\n\n### Send us a Pull Request!\nThanks :)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A78:3FA0D:17201A:5C403D:6AB920D6"},"text_sha256":"198dde00a9ffb68beba2bf0c5e530af329e83b40427a74c1eda712093694d955"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3376","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:17D3E76:1BF169E:6AB92867"},"commit":{"sha":"a1ca80d9e31c34512d0ded75ff8821ddcf3f2f91","url":"https://github.com/naptha/tesseract.js/commit/a1ca80d9e31c34512d0ded75ff8821ddcf3f2f91","date":"2026-05-17T01:37:38Z","author_date":"2026-05-17T01:37:38Z","committer_date":"2026-05-17T01:37:38Z","tree_sha":"941c760847e85711142ae547c5a42eaef6256940","message_first_line":"Removed regenerator-runtime per #1044 (#1066)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3375","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:17F5612:1C13D63:6AB92867"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11163,"blob_sha":"f87eb0dbae219fe693dd44640d38176044f30914","priority":0},{"path":".github/SECURITY.md","size":193,"blob_sha":"da9c516dd744b6c88dd8c91f58f7bcf8f7e8341b","priority":1}],"documents":[{"path":"README.md","size":11163,"blob_sha":"f87eb0dbae219fe693dd44640d38176044f30914","priority":0,"status":200,"text":"<p align=\"center\">\n  <a href=\"https://tesseract.projectnaptha.com/\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"./docs/images/tesseract_dark.png\">\n      <img width=\"256px\" height=\"256px\" alt=\"Tesseract.js\" src=\"./docs/images/tesseract.png\">\n    <\/picture>\n  <\/a>\n<\/p>\n\n![Lint & Test](https://github.com/naptha/tesseract.js/workflows/Node.js%20CI/badge.svg)\n![CodeQL](https://github.com/naptha/tesseract.js/workflows/CodeQL/badge.svg)\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://github.com/naptha/tesseract.js) \n[![Financial Contributors on Open Collective](https://opencollective.com/tesseractjs/all/badge.svg?label=financial+contributors)](https://opencollective.com/tesseractjs) [![npm version](https://badge.fury.io/js/tesseract.js.svg)](https://badge.fury.io/js/tesseract.js)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/naptha/tesseract.js/graphs/commit-activity)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Code Style](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n![npm](https://img.shields.io/npm/dm/tesseract.js?label=npm%20downloads)\n![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/tesseract.js?label=jsdelivr%20hits)\n\nTesseract.js is a javascript library that gets words in [almost any language](./docs/tesseract_lang_list.md) out of images. ([Demo](http://tesseract.projectnaptha.com/))\n\nImage Recognition\n\n[![fancy demo gif](./docs/images/demo.gif)](http://tesseract.projectnaptha.com)\n\nVideo Real-time Recognition\n\n<p align=\"center\">\n  <a href=\"https://github.com/jeromewu/tesseract.js-video\"><img alt=\"Tesseract.js Video\" src=\"./docs/images/video-demo.gif\"><\/a>\n<\/p>\n\nTesseract.js works in the browser using [webpack](https://webpack.js.org/), esm, or plain script tags with a [CDN](#CDN) and on the server with [Node.js](https://nodejs.org/en/).\nAfter you [install it](#installation), using it is as simple as:\n\n```javascript\nimport { createWorker } from 'tesseract.js';\n\n(async () => {\n  const worker = await createWorker('eng');\n  const ret = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png');\n  console.log(ret.data.text);\n  await worker.terminate();\n})();\n```\nWhen recognizing multiple images, users should create a worker once, run `worker.recognize` for each image, and then run `worker.terminate()` once at the end (rather than running the above snippet for every image). \n\n## Installation\nTesseract.js works with a `<script>` tag via local copy or CDN, with webpack via `npm` and on Node.js with `npm/yarn`.\n\n### CDN\n```html\n<!-- v5 -->\n<script src='https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js'><\/script>\n```\nAfter including the script the `Tesseract` variable will be globally available and a worker can be created using `Tesseract.createWorker`.\n\nAlternatively, an ESM build (used with `import` syntax) can be found at `https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.esm.min.js`. \n\n### Node.js\n\n**Tesseract.js v7 requires Node.js v16 or newer.** (Tesseract.js v6 requires Node.js v14 or newer.)\n\n```shell\n# For latest version\nnpm install tesseract.js\nyarn add tesseract.js\n\n# For old versions\nnpm install tesseract.js@3.0.3\nyarn add tesseract.js@3.0.3\n```\n\n## Project Scope\nTesseract.js aims to bring the [Tesseract](https://github.com/tesseract-ocr/tesseract) OCR engine (a separate project) to the browser and Node.js, and works by wrapping a [WebAssembly port](https://github.com/naptha/tesseract.js-core) of Tesseract.  This project does not modify core Tesseract features.  Most notably, **Tesseract.js does not support PDF files and does not modify the Tesseract recognition model to improve accuracy.**\n\nIf your project requires features outside of this scope, consider the [Scribe.js library](https://github.com/scribeocr/scribe.js).  Scribe.js is an alternative library created to accommodate common feature requests that are outside of the scope of this repo.  Scribe.js includes improvements to the Tesseract recognition model and supports extracting text from PDF documents, among other features.  For more information see [Scribe.js vs. Tesseract.js](https://github.com/scribeocr/scribe.js/blob/master/docs/scribe_vs_tesseract.md).\n\n## Documentation\n\n* [Workers vs. Schedulers](./docs/workers_vs_schedulers.md)\n* [Examples](./docs/examples.md)\n* [Supported Image Formats](./docs/image-format.md)\n* [API](./docs/api.md)\n* [Local Installation](./docs/local-installation.md)\n* [FAQ](./docs/faq.md)\n\n## Community Projects and Examples\nThe following are examples and projects built by the community using Tesseract.js. Officially supported examples are found in the [examples](https://github.com/naptha/tesseract.js/tree/master/examples) directory. \n\n- Projects\n   - Scribe OCR: web application for scanning documents (images and PDFs)\n      - Site at [scribeocr.com](https://scribeocr.com/), repo at [github.com/scribeocr/scribeocr](https://github.com/scribeocr/scribeocr)\n   - Chrome Extension (with Manifest V3): https://github.com/Tshetrim/Image-To-Text-OCR-extension-for-ChatGPT\n- Examples\n   - Converting PDF to text: https://github.com/racosa/pdf2text-ocr\n   - Use `blocks` output to generate granular data [word/symbol level]: https://github.com/Kishlay-notabot/tesseract-bbox-examples\n   - Electron: https://github.com/Balearica/tesseract.js-electron\n   - Typescript: https://github.com/Balearica/tesseract.js-typescript\n \nIf you have a project or example repo that uses Tesseract.js, feel free to add it to this list using a pull request. Examples submitted should be well documented such that new users can run them; projects should be functional and actively maintained.\n\n## Major changes in v6\nVersion 6 changes are documented in [this issue](https://github.com/naptha/tesseract.js/issues/993).  Highlights are below.\n - Fixed memory leak in previous versions\n - Overall reductions in runtime and memory usage\n - Breaking changes:\n    - All outputs formats other than `text` are disabled by default.\n      - To re-enable the `hocr` output (for example), set the following: `worker.recognize(image, {}, { hocr: true })`\n    - Minor changes to the structure of the JavaScript object (`blocks`) output\n    - See [this issue](https://github.com/naptha/tesseract.js/issues/993) for full list\n\n## Major changes in v5\nVersion 5 changes are documented in [this issue](https://github.com/naptha/tesseract.js/issues/820).  Highlights are below.\n\n - Significantly smaller files by default (54% smaller for English, 73% smaller for Chinese)\n    - This results in a ~50% reduction in runtime for first-time users (who do not have the files cached yet)\n - Significantly lower memory usage\n - Breaking changes:\n    - `createWorker` arguments changed\n       - Setting non-default language and OEM now happens in `createWorker`\n          - E.g. `createWorker(\"chi_sim\", 1)`\n    - `worker.initialize` and `worker.loadLanguage` functions should be deleted from code\n    - See [this issue](https://github.com/naptha/tesseract.js/issues/820) for full list\n\nUpgrading from v2 to v5?  See [this guide](https://github.com/naptha/tesseract.js/issues/771).\n\n## Major changes in v4\nVersion 4 includes many new features and bug fixes--see [this issue](https://github.com/naptha/tesseract.js/issues/662) for a full list.  Several highlights are below. \n\n- Added rotation preprocessing options (including auto-rotate) for significantly better accuracy\n- Processed images (rotated, grayscale, binary) can now be retrieved\n- Improved support for parallel processing (schedulers)\n- Breaking changes:\n  - `createWorker` is now async\n  - `getPDF` function replaced by `pdf` recognize option\n\n## Contributing\n\n### Development\nTo run a development copy of Tesseract.js do the following:\n```shell\n# First we clone the repository\ngit clone https://github.com/naptha/tesseract.js.git\ncd tesseract.js\n\n# Then we install the dependencies\nnpm install\n\n# And finally we start the development server\nnpm start\n```\n\nThe development server will be available at http://localhost:3000/examples/browser/basic-efficient.html in your favorite browser.\nIt will automatically rebuild `tesseract.min.js` and `worker.min.js` when you change files in the **src** folder.\n\n### Building Static Files\nTo build the compiled static files just execute the following:\n```shell\nnpm run build\n```\nThis will output the files into the `dist` directory.\n\n### Run Tests\n**Always confirm the automated tests pass before submitting a pull request.**  To run the automated tests locally, run the following commands.\n```shell\nnpm run lint\nnpm run test\n```\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](https://github.com/naptha/tesseract.js?tab=readme-ov-file#contributing)].\n<a href=\"https://github.com/naptha/tesseract.js/graphs/contributors\"><img src=\"https://opencollective.com/tesseractjs/contributors.svg?width=890&button=false\" /><\/a>\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/tesseractjs/contribute)]\n\n#### Individuals\n\n<a href=\"https://opencollective.com/tesseractjs\"><img src=\"https://opencollective.com/tesseractjs/individuals.svg?width=890\"><\/a>\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/tesseractjs/contribute)]\n\n<a href=\"https://opencollective.com/tesseractjs/organization/0/website\"><img src=\"https://opencollective.com/tesseractjs/organization/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/1/website\"><img src=\"https://opencollective.com/tesseractjs/organization/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/2/website\"><img src=\"https://opencollective.com/tesseractjs/organization/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/3/website\"><img src=\"https://opencollective.com/tesseractjs/organization/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/4/website\"><img src=\"https://opencollective.com/tesseractjs/organization/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/5/website\"><img src=\"https://opencollective.com/tesseractjs/organization/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/6/website\"><img src=\"https://opencollective.com/tesseractjs/organization/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/7/website\"><img src=\"https://opencollective.com/tesseractjs/organization/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/8/website\"><img src=\"https://opencollective.com/tesseractjs/organization/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/tesseractjs/organization/9/website\"><img src=\"https://opencollective.com/tesseractjs/organization/9/avatar.svg\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7C52:326565:17512F:5C7267:6AB920D7"},"text_sha256":"ad7f6a92126e6995d8ce85f08b5010862e01d5938fb8539b7ed0711b687cda4b"},{"path":".github/SECURITY.md","size":193,"blob_sha":"da9c516dd744b6c88dd8c91f58f7bcf8f7e8341b","priority":1,"status":200,"text":"## Security contact information\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC94:09ED:DFA12:3DD44B:6AB920D8"},"text_sha256":"994ea9cf579d2164b7736a6728ba48773ae78b0ae8f20290bee63fc62bb7362e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lutzroeder/netron","input_row":{"repository":"lutzroeder/netron","url":"https://github.com/lutzroeder/netron","name":"netron","owner":"lutzroeder","description":"Visualizer for neural network, deep learning and machine learning models","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":33526,"issues":1277,"created_at":"2010-12-26T12:53:43Z","updated_at":"2026-09-27T13:53:26Z","first_commit_at":"2010-12-26T12:55:07Z","last_commit_at":"2026-09-26T17:16:53Z","activity_months":189,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:00.278Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lutzroeder/netron","visibility":"public","created_at":"2010-12-26T12:53:43Z","updated_at":"2026-09-27T14:15:23Z","private":false,"fork":false,"archived":false,"stargazers_count":33525,"open_issues_count":18,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3374","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:1769C9C:1B887C7:6AB92868"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3373","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B8:74181:1769CC9:1B887FC:6AB92868"},"commit":{"sha":"473060aae11ec42d3439b6bb72c022a738bc5fc1","url":"https://github.com/lutzroeder/netron/commit/473060aae11ec42d3439b6bb72c022a738bc5fc1","date":"2018-05-24T02:39:18Z","author_date":"2018-05-24T02:39:18Z","committer_date":"2018-05-24T02:39:18Z","tree_sha":"dce1a4bd6a44e6e3cb8fb80936bf4d3bf80b66a1","message_first_line":"Fix -update scripts"},"tree_request_status":200,"tree_rate":{"github_remaining":"3372","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:180647A:1C24D12:6AB92869"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3663,"blob_sha":"7a1daf0c01d6b0a7320a78b8dc0209e8441431b3","priority":0}],"documents":[{"path":"README.md","size":3663,"blob_sha":"7a1daf0c01d6b0a7320a78b8dc0209e8441431b3","priority":0,"status":200,"text":"\n<p align='center'><img width='400' src='media/logo.png'/><\/p>\n\nNetron is a viewer for neural network, deep learning and machine learning models. \n\nNetron supports **[ONNX](http://onnx.ai)** (`.onnx`, `.pb`), **Keras** (`.h5`, `.keras`), **CoreML** (`.mlmodel`) and **TensorFlow Lite** (`.tflite`). Netron has experimental support for **Caffe** (`.caffemodel`), **Caffe2** (`predict_net.pb`), **MXNet** (`-symbol.json`), **TensorFlow.js** (`model.json`, `.pb`) and **TensorFlow** (`.pb`, `.meta`).\n\n<p align='center'><a href='https://www.lutzroeder.com/ai'><img src='media/screenshot.png' width='800'><\/a><\/p>\n\n## Install\n\n**macOS**\n\n[**Download**](https://github.com/lutzroeder/Netron/releases/latest) the `.dmg` file or with [Homebrew](https://caskroom.github.io) run `brew cask install netron`\n\n**Linux**\n\n[**Download**](https://github.com/lutzroeder/Netron/releases/latest) the `.AppImage` or `.deb` file. \n\n**Windows**\n\n[**Download**](https://github.com/lutzroeder/Netron/releases/latest) the `.exe` installer.\n\n**Browser**\n\n[**Start**](https://www.lutzroeder.com/ai/netron) the browser version.\n\n\n**Python Server**\n\nRun `pip install netron` and `netron [MODEL_FILE]`.  \nServe a model in Python using `import netron; netron.serve_file('my_model.onnx')`.\n\n## Download Models\n\nSample model files you can download and open:\n\n**ONNX Models**\n\n* [Inception v1](https://s3.amazonaws.com/download.onnx/models/inception_v1.tar.gz)\n* [Inception v2](https://s3.amazonaws.com/download.onnx/models/inception_v2.tar.gz)\n* [ResNet-50](https://s3.amazonaws.com/download.onnx/models/resnet50.tar.gz)\n* [SqueezeNet](https://s3.amazonaws.com/download.onnx/models/squeezenet.tar.gz)\n\n**Keras Models**\n\n* [resnet](https://github.com/Hyperparticle/one-pixel-attack-keras/raw/master/networks/models/resnet.h5)\n* [tiny-yolo-voc](https://github.com/hollance/YOLO-CoreML-MPSNNGraph/raw/master/Convert/yad2k/model_data/tiny-yolo-voc.h5)\n\n**CoreML Models**\n\n* [MobileNet](https://docs-assets.developer.apple.com/coreml/models/MobileNet.mlmodel)\n* [Places205-GoogLeNet](https://docs-assets.developer.apple.com/coreml/models/GoogLeNetPlaces.mlmodel)\n* [Inception v3](https://docs-assets.developer.apple.com/coreml/models/Inceptionv3.mlmodel)\n\n**TensorFlow Lite Models**\n\n* [Smart Reply 1.0 ](https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip)\n* [Mobilenet 1.0 224 Float](https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_1.0_224_float_2017_11_08.zip)\n* [Inception v3 2016](https://storage.googleapis.com/download.tensorflow.org/models/tflite/inception_v3_slim_2016_android_2017_11_10.zip)\n\n**Caffe Models**\n\n* [BVLC AlexNet](http://dl.caffe.berkeleyvision.org/bvlc_alexnet.caffemodel)\n* [BVLC CaffeNet](http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel)\n* [BVLC GoogleNet](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel)\n\n**Caffe2 Models**\n\n* [BVLC GoogleNet](https://github.com/caffe2/models/raw/master/bvlc_googlenet/predict_net.pb)\n* [Inception v2](https://github.com/caffe2/models/raw/master/inception_v2/predict_net.pb)\n\n**MXNet Models**\n\n* [CaffeNet](http://data.dmlc.ml/models/imagenet/squeezenet/squeezenet_v1.1-symbol.json)\n* [SqueezeNet v1.1](https://mxnet.incubator.apache.org/model_zoo/index.html)\n\n**TensorFlow models**\n\n* [Inception v3](https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz)\n* [Inception v4](https://storage.googleapis.com/download.tensorflow.org/models/inception_v4_2016_09_09_frozen.pb.tar.gz)\n* [Inception 5h](https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D482:A58F2:16F2F6:5C1430:6AB920D9"},"text_sha256":"4e84990dbc3d595db7be6a80102d1798ffd20b6d34f707d33c7cc233e665aeef"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3371","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091F:73962:17B8729:1BD6B91:6AB92869"},"commit":{"sha":"afb623792740828b1fd86494b5dc14e88a83d182","url":"https://github.com/lutzroeder/netron/commit/afb623792740828b1fd86494b5dc14e88a83d182","date":"2026-06-30T14:46:00Z","author_date":"2026-06-30T14:46:00Z","committer_date":"2026-06-30T14:46:00Z","tree_sha":"dc3a3713e75b87d57cf91e05eb1ef3d0553206d4","message_first_line":"Update onnx-metadata.json"},"tree_request_status":200,"tree_rate":{"github_remaining":"3370","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17B875B:1BD6BC8:6AB92869"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3338,"blob_sha":"e09357fbde82b0a8d089d6d40e78adabc0061539","priority":0}],"documents":[{"path":"README.md","size":3338,"blob_sha":"e09357fbde82b0a8d089d6d40e78adabc0061539","priority":0,"status":200,"text":"<div align=\"center\">\n<img width=\"400px\" height=\"100px\" src=\"https://github.com/lutzroeder/netron/raw/main/.github/logo-light.svg#gh-light-mode-only\">\n<img width=\"400px\" height=\"100px\" src=\"https://github.com/lutzroeder/netron/raw/main/.github/logo-dark.svg#gh-dark-mode-only\">\n<\/div>\n\nNetron is a viewer for neural network, deep learning and machine learning models.\n\nNetron supports ONNX, TensorFlow Lite, PyTorch, torch.export, ExecuTorch, TorchScript, TensorFlow, Core ML, OpenVINO, Keras, Caffe, Darknet, Safetensors and NumPy.\n\nNetron has experimental support for MLIR, JAX, GGUF, RKNN, ncnn, MNN, PaddlePaddle and scikit-learn.\n\n<p align='center'><a href='https://www.lutzroeder.com/ai'><img src='.github/screenshot.png' width='800'><\/a><\/p>\n\n## Install\n\n**Browser**: [**Start**](https://netron.app) the browser version.\n\n**macOS**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.dmg` file or run `brew install --cask netron`.\n\n**Linux**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.deb` or `.rpm` file.\n\n**Windows**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.exe` installer or run `winget install -s winget netron`.\n\n**Python**: `pip install netron`, then run `netron [FILE]` or `netron.start('[FILE]')`.\n\n## Models\n\nSample model files to download or open using the browser version:\n\n * **ONNX**: [squeezenet](https://github.com/onnx/models/raw/main/validated/vision/classification/squeezenet/model/squeezenet1.0-3.onnx) [[open](https://netron.app?url=https://github.com/onnx/models/raw/main/validated/vision/classification/squeezenet/model/squeezenet1.0-3.onnx)]\n * **TorchScript**: [traced_online_pred_layer](https://github.com/ApolloAuto/apollo/raw/master/modules/prediction/data/traced_online_pred_layer.pt) [[open](https://netron.app?url=https://github.com/ApolloAuto/apollo/raw/master/modules/prediction/data/traced_online_pred_layer.pt)]\n * **TensorFlow Lite**: [yamnet](https://huggingface.co/thelou1s/yamnet/resolve/main/lite-model_yamnet_tflite_1.tflite) [[open](https://netron.app?url=https://huggingface.co/thelou1s/yamnet/blob/main/lite-model_yamnet_tflite_1.tflite)]\n * **TensorFlow**: [chessbot](https://github.com/srom/chessbot/raw/master/model/chessbot.pb) [[open](https://netron.app?url=https://github.com/srom/chessbot/raw/master/model/chessbot.pb)]\n * **Keras**: [mobilenet](https://github.com/aio-libs/aiohttp-demos/raw/master/demos/imagetagger/tests/data/mobilenet.h5) [[open](https://netron.app?url=https://github.com/aio-libs/aiohttp-demos/raw/master/demos/imagetagger/tests/data/mobilenet.h5)]\n\n* **MLIR**: [edge_detection](https://github.com/iree-org/iree/raw/main/tests/e2e/stablehlo_models/edge_detection.mlir) [[open](https://netron.app?url=https://github.com/iree-org/iree/blob/main/tests/e2e/stablehlo_models/edge_detection.mlir)]\n\n * **Core ML**: [exermote](https://github.com/Lausbert/Exermote/raw/master/ExermoteInference/ExermoteCoreML/ExermoteCoreML/Model/Exermote.mlmodel) [[open](https://netron.app?url=https://github.com/Lausbert/Exermote/raw/master/ExermoteInference/ExermoteCoreML/ExermoteCoreML/Model/Exermote.mlmodel)]\n * **Darknet**: [yolo](https://github.com/AlexeyAB/darknet/raw/master/cfg/yolo.cfg) [[open](https://netron.app?url=https://github.com/AlexeyAB/darknet/raw/master/cfg/yolo.cfg)]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"41CE:3E1C8:177D78:5C9D61:6AB920DB"},"text_sha256":"08048048e2c7a143f2f60ddaa48358194e7deb65d105265b489cd25c8258e7f3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"yunjey/pytorch-tutorial","input_row":{"repository":"yunjey/pytorch-tutorial","url":"https://github.com/yunjey/pytorch-tutorial","name":"pytorch-tutorial","owner":"yunjey","description":"PyTorch Tutorial for Deep Learning Researchers","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":32497,"issues":181,"created_at":"2017-03-10T07:41:47Z","updated_at":"2026-09-26T12:21:02Z","first_commit_at":"2017-03-10T07:41:47Z","last_commit_at":"2020-07-06T03:36:38Z","activity_months":39.880000000000003,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:02.780Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"yunjey/pytorch-tutorial","visibility":"public","created_at":"2017-03-10T07:41:47Z","updated_at":"2026-09-26T12:21:02Z","private":false,"fork":false,"archived":false,"stargazers_count":32497,"open_issues_count":89,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3369","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:178D429:1BAC187:6AB9286A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3368","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:17EC7BE:1C0B720:6AB9286B"},"commit":{"sha":"99271737fba3f75720db37c83c19787e22d00869","url":"https://github.com/yunjey/pytorch-tutorial/commit/99271737fba3f75720db37c83c19787e22d00869","date":"2018-05-15T13:47:21Z","author_date":"2018-05-15T13:47:21Z","committer_date":"2018-05-15T13:47:21Z","tree_sha":"fa2fedd940b28f58f6fc0f424b39f8c89ae8a9db","message_first_line":"Merge pull request #114 from xinqiu/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"3367","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:17F5871:1C14043:6AB9286B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2975,"blob_sha":"33607e09d18995d7734879f56d6787a7766f3508","priority":0}],"documents":[{"path":"README.md","size":2975,"blob_sha":"33607e09d18995d7734879f56d6787a7766f3508","priority":0,"status":200,"text":"<p align=\"center\"><img width=\"40%\" src=\"logo/pytorch_logo.png\" /><\/p>\n\n--------------------------------------------------------------------------------\n\nThis repository provides tutorial code for deep learning researchers to learn [PyTorch](https://github.com/pytorch/pytorch). In the tutorial, most of the models were implemented with less than 30 lines of code. Before starting this tutorial, it is recommended to finish [Official Pytorch Tutorial](http://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html).\n\n\n<br/>\n\n## Table of Contents\n\n#### 1. Basics\n* [PyTorch Basics](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/pytorch_basics/main.py)\n* [Linear Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/linear_regression/main.py#L22-L23)\n* [Logistic Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/logistic_regression/main.py#L33-L34)\n* [Feedforward Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/feedforward_neural_network/main.py#L37-L49)\n\n#### 2. Intermediate\n* [Convolutional Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/convolutional_neural_network/main.py#L35-L56)\n* [Deep Residual Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/deep_residual_network/main.py#L76-L113)\n* [Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/recurrent_neural_network/main.py#L39-L58)\n* [Bidirectional Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py#L39-L58)\n* [Language Model (RNN-LM)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/language_model/main.py#L30-L50)\n\n#### 3. Advanced\n* [Generative Adversarial Networks](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/generative_adversarial_network/main.py#L41-L57)\n* [Variational Auto-Encoder](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/variational_autoencoder/main.py#L38-L65)\n* [Neural Style Transfer](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/neural_style_transfer)\n* [Image Captioning (CNN-RNN)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/image_captioning)\n\n#### 4. Utilities\n* [TensorBoard in PyTorch](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard)\n\n\n\n<br/>\n\n## Getting Started\n```bash\n$ git clone https://github.com/yunjey/pytorch-tutorial.git\n$ cd pytorch-tutorial/tutorials/PATH_TO_PROJECT\n$ python main.py\n```\n\n<br/>\n\n## Dependencies\n* [Python 2.7 or 3.5+](https://www.continuum.io/downloads)\n* [PyTorch 0.4.0](http://pytorch.org/)\n\n\n\n<br/>\n\n\n## Author\nYunjey Choi/ [@yunjey](https://github.com/yunjey)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0FF8:3D40A:16BC54:5BDD3C:6AB920DB"},"text_sha256":"05b5d36a3b36decbe6e34e19de7f75145bc2f88f987b2e3d1d2cb54c1f723298"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3366","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089D:52542:17A518E:1BC3EB0:6AB9286C"},"commit":{"sha":"0500d3df5a2a8080ccfccbc00aca0eacc21818db","url":"https://github.com/yunjey/pytorch-tutorial/commit/0500d3df5a2a8080ccfccbc00aca0eacc21818db","date":"2020-07-06T03:36:38Z","author_date":"2020-07-06T03:36:38Z","committer_date":"2020-07-06T03:36:38Z","tree_sha":"974b700e99ddd627481b6a65e5e5449aba79f8b0","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3365","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17B2D91:1BD1964:6AB9286C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2913,"blob_sha":"59ac3300b5581cefb587415dfdd3b35936f2d243","priority":0}],"documents":[{"path":"README.md","size":2913,"blob_sha":"59ac3300b5581cefb587415dfdd3b35936f2d243","priority":0,"status":200,"text":"<p align=\"center\"><img width=\"40%\" src=\"logo/pytorch_logo_2018.svg\" /><\/p>\n\n--------------------------------------------------------------------------------\n\nThis repository provides tutorial code for deep learning researchers to learn [PyTorch](https://github.com/pytorch/pytorch). In the tutorial, most of the models were implemented with less than 30 lines of code. Before starting this tutorial, it is recommended to finish [Official Pytorch Tutorial](http://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html).\n\n\n<br/>\n\n## Table of Contents\n\n#### 1. Basics\n* [PyTorch Basics](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/pytorch_basics/main.py)\n* [Linear Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/linear_regression/main.py#L22-L23)\n* [Logistic Regression](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/logistic_regression/main.py#L33-L34)\n* [Feedforward Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/01-basics/feedforward_neural_network/main.py#L37-L49)\n\n#### 2. Intermediate\n* [Convolutional Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/convolutional_neural_network/main.py#L35-L56)\n* [Deep Residual Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/deep_residual_network/main.py#L76-L113)\n* [Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/recurrent_neural_network/main.py#L39-L58)\n* [Bidirectional Recurrent Neural Network](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py#L39-L58)\n* [Language Model (RNN-LM)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate/language_model/main.py#L30-L50)\n\n#### 3. Advanced\n* [Generative Adversarial Networks](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/generative_adversarial_network/main.py#L41-L57)\n* [Variational Auto-Encoder](https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/03-advanced/variational_autoencoder/main.py#L38-L65)\n* [Neural Style Transfer](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/neural_style_transfer)\n* [Image Captioning (CNN-RNN)](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/image_captioning)\n\n#### 4. Utilities\n* [TensorBoard in PyTorch](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard)\n\n\n<br/>\n\n## Getting Started\n```bash\n$ git clone https://github.com/yunjey/pytorch-tutorial.git\n$ cd pytorch-tutorial/tutorials/PATH_TO_PROJECT\n$ python main.py\n```\n\n<br/>\n\n## Dependencies\n* [Python 2.7 or 3.5+](https://www.continuum.io/downloads)\n* [PyTorch 0.4.0+](http://pytorch.org/)\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"422E:3FA0D:172076:5C413F:6AB920DD"},"text_sha256":"e61c09a8db032db83f95f08a069564e234901d0dfd41ca8d51a253eac4f616a0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"shap/shap","input_row":{"repository":"shap/shap","url":"https://github.com/shap/shap","name":"shap","owner":"shap","description":"A game theoretic approach to explain the output of any machine learning model.","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":25783,"issues":2850,"created_at":"2016-11-22T19:17:08Z","updated_at":"2026-09-26T20:45:27Z","first_commit_at":"2016-11-22T21:44:11Z","last_commit_at":"2026-09-25T19:43:46Z","activity_months":118.06999999999999,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:05.075Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"shap/shap","visibility":"public","created_at":"2016-11-22T19:17:08Z","updated_at":"2026-09-26T20:45:27Z","private":false,"fork":false,"archived":false,"stargazers_count":25783,"open_issues_count":981,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3364","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:17F5968:1C1417F:6AB9286D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3363","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0918:8656E:17AF363:1BCDC02:6AB9286D"},"commit":{"sha":"7f95ae87e6c4b347effb2bda729e47ecd8796c3b","url":"https://github.com/shap/shap/commit/7f95ae87e6c4b347effb2bda729e47ecd8796c3b","date":"2018-05-22T18:37:38Z","author_date":"2018-05-22T18:37:38Z","committer_date":"2018-05-22T18:37:38Z","tree_sha":"a92bcd002e8ff24e41bcb078fc90de0b75cf1aed","message_first_line":"Better error message when _cext is missing"},"tree_request_status":200,"tree_rate":{"github_remaining":"3362","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17C6FFA:1BE5A5F:6AB9286D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11154,"blob_sha":"8475566ba4edc90c0973c4f1ee552731f4695c17","priority":0}],"documents":[{"path":"README.md","size":11154,"blob_sha":"8475566ba4edc90c0973c4f1ee552731f4695c17","priority":0,"status":200,"text":"\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/shap_diagram.png\" width=\"400\" />\n<\/p>\n\n---\n<a href=\"https://travis-ci.org/slundberg/shap\"><img src=\"https://travis-ci.org/slundberg/shap.svg?branch=master\"><\/a>\n\n**SHAP (SHapley Additive exPlanations)** is a unified approach to explain the output of any machine learning model. SHAP connects game theory with local explanations, uniting several previous methods [1-7] and representing the only possible consistent and locally accurate additive feature attribution method based on expectations (see the [SHAP NIPS paper](http://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions) for details).\n\n\n\n## Install\n\n```\npip install shap\n```\n\n## Tree ensemble example (XGBoost/LightGBM/CatBoost/scikit-learn models) \n\nWhile SHAP values can explain the output of any machine learning model, we have developed a high-speed exact algorithm for tree ensemble methods ([Tree SHAP arXiv paper](https://arxiv.org/abs/1802.03888)). Fast C++ implementations are supported for *XGBoost*, *LightGBM*, *CatBoost*, and *scikit-learn* tree models:\n\n```python\nimport xgboost\nimport shap\n\n# load JS visualization code to notebook\nshap.initjs() \n\n# train XGBoost model\nX,y = shap.datasets.boston()\nmodel = xgboost.train({\"learning_rate\": 0.01}, xgboost.DMatrix(X, label=y), 100)\n\n# explain the model's predictions using SHAP values\n# (same syntax works for LightGBM, CatBoost, and scikit-learn models)\nshap_values = shap.TreeExplainer(model).shap_values(X)\n\n# visualize the first prediction's explanation\nshap.force_plot(shap_values[0,:], X.iloc[0,:])\n```\n\n<p align=\"center\">\n  <img width=\"811\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/boston_instance.png\" />\n<\/p>\n\nThe above explanation shows features each contributing to push the model output from the base value (the average model output over the training dataset we passed) to the model output. Features pushing the prediction higher are shown in red, those pushing the prediction lower are in blue.\n\nIf we take many explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset (in the notebook this plot is interactive):\n\n```python\n# visualize the training set predictions\nshap.force_plot(shap_values, X)\n```\n\n<p align=\"center\">\n  <img width=\"811\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/boston_dataset.png\" />\n<\/p>\n\nTo understand how a single feature effects the output of the model we can plot the SHAP value of that feature vs. the value of the feature for all the examples in a dataset. Since SHAP values represent a feature's responsibility for a change in the model output, the plot below represents the change in predicted house price as RM (the average number of rooms per house in an area) changes. Vertical dispersion at a single value of RM represents interaction effects with other features. To help reveal these interactions `dependence_plot` automatically selects another feature for coloring. In this case coloring by RAD (index of accessibility to radial highways) highlights that RM has less impact on home price for areas close to radial highways.\n\n```python\n# create a SHAP dependence plot to show the effect of a single feature across the whole dataset\nshap.dependence_plot(\"RM\", shap_values, X)\n```\n\n<p align=\"center\">\n  <img width=\"544\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/boston_dependence_plot.png\" />\n<\/p>\n\n\nTo get an overview of which features are most important for a model we can plot the SHAP values of every feature for every sample. The plot below sorts features by the sum of SHAP value magnitudes over all samples, and uses SHAP values to show the distribution of the impacts each feature has on the model output. The color represents the feature value (red high, blue low). This reveals for example that a high LSTAT (% lower status of the population) lowers the predicted home price.\n\n```python\n# summarize the effects of all the features\nshap.summary_plot(shap_values, X)\n```\n\n<p align=\"center\">\n  <img width=\"483\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/boston_summary_plot.png\" />\n<\/p>\n\n\n## Model agnostic SVM example\n\nKernel SHAP uses a specially-weighted local linear regression to estimate SHAP values for any model. Below is a simple example for explaining a multi-class SVM on the classic iris dataset.\n\n```python\nimport sklearn\nimport shap\nfrom sklearn.model_selection import train_test_split\n\n# print the JS visualization code to the notebook\nshap.initjs()\n\n# train a SVM classifier\nX_train,X_test,Y_train,Y_test = train_test_split(*shap.datasets.iris(), test_size=0.2, random_state=0)\nsvm = sklearn.svm.SVC(kernel='rbf', probability=True)\nsvm.fit(X_train, Y_train)\n\n# use Kernel SHAP to explain test set predictions\nexplainer = shap.KernelExplainer(svm.predict_proba, X_train, link=\"logit\")\nshap_values = explainer.shap_values(X_test, nsamples=100)\n\n# plot the SHAP values for the Setosa output of the first instance\nshap.force_plot(shap_values[0][0,:], X_test.iloc[0,:], link=\"logit\")\n```\n<p align=\"center\">\n  <img width=\"810\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/iris_instance.png\" />\n<\/p>\n\nThe above explanation shows four features each contributing to push the model output from the base value (the average model output over the training dataset we passed) towards zero. If there were any features pushing the class label higher they would be shown in red.\n\nIf we take many explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset. This is exactly what we do below for all the examples in the iris test set:\n\n```python\n# plot the SHAP values for the Setosa output of all instances\nshap.force_plot(shap_values[0], X_test, link=\"logit\")\n```\n<p align=\"center\">\n  <img width=\"813\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/iris_dataset.png\" />\n<\/p>\n\n## Model agnostic VGG16 example\n\nThe VGG16 notebook below illustrates how to apply Kernel SHAP to image classification, which can help identify what parts of an image caused a prediction.\n\n<p align=\"center\">\n  <img width=\"583\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/strawberry_example.png\" />\n<\/p>\n\n## SHAP Interaction Values\n\nSHAP interaction values are a generalization of SHAP values to higher order interactions. Fast exact computation of pairwise interactions are implemented for tree models with `shap.TreeExplainer(model).shap_interaction_values(X)`. This returns a matrix for every prediction, where the main effects are on the diagonal and the interaction effects are off-diagonal. These values often reveal interesting hidden relationships, such as how the increased risk of death peaks for men at age 60 (see the NHANES notebook for details):\n\n<p align=\"center\">\n  <img width=\"483\" src=\"https://raw.githubusercontent.com/slundberg/shap/master/docs/artwork/nhanes_age_sex_interaction.png\" />\n<\/p>\n\n## Sample notebooks\n\nThe notebooks below demonstrate different use cases for SHAP. Look inside the notebooks directory of the repository if you want to try playing with the original notebooks yourself. Note that the tree examples use the fast and exact Tree SHAP algorithm, the others use the model agnostic Kernel SHAP algorithm.\n\n- [**NHANES survival model with XGBoost and SHAP interaction values**](https://slundberg.github.io/shap/notebooks/NHANES+I+Survival+Model.html) - Using mortality data from 20 years of followup this notebook demonstrates how to use XGBoost and `shap` to uncover complex risk factor relationships.\n\n- [**Census income classification with LightGBM**](https://slundberg.github.io/shap/notebooks/Census+income+classification+with+LightGBM.html) - Using the standard adult census income dataset, this notebook trains a gradient boosting tree model with LightGBM and then explains predictions using `shap`.\n\n- [**Census income classification with Keras**](https://slundberg.github.io/shap/notebooks/Census+income+classification+with+Keras.html) - Using the standard adult census income dataset, this notebook trains a neural network with Keras and then explains predictions using `shap`.\n\n- [**Census income classification with scikit-learn**](https://slundberg.github.io/shap/notebooks/Census+income+classification+with+scikit-learn.html) - Using the standard adult census income dataset, this notebook trains a k-nearest neighbors classifier using scikit-learn and then explains predictions using `shap`.\n\n- [**League of Legends Win Prediction with XGBoost**](https://slundberg.github.io/shap/notebooks/League+of+Legends+Win+Prediction+with+XGBoost.html) - Using a Kaggle dataset of 180,000 ranked matches from League of Legends we train and explain a gradient boosting tree model with XGBoost to predict if a player will win their match.\n\n- [**ImageNet VGG16 Model with Keras**](https://slundberg.github.io/shap/notebooks/ImageNet+VGG16+Model+with+Keras.html) - Explain the classic VGG16 convolutional nerual network's predictions for an image. This works by applying the model agnostic Kernel SHAP method to a super-pixel segmented image.\n\n- [**Iris classification**](https://slundberg.github.io/shap/notebooks/Iris+classification+with+scikit-learn.html) - A basic demonstration using the popular iris species dataset. It explains predictions from six different models in scikit-learn using `shap`.\n\n### Methods Unified by SHAP\n\n1. *LIME:* Ribeiro, Marco Tulio, Sameer Singh, and Carlos Guestrin. \"Why should i trust you?: Explaining the predictions of any classifier.\" Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016.\n\n2. *Shapley sampling values:* Štrumbelj, Erik, and Igor Kononenko. \"Explaining prediction models and individual predictions with feature contributions.\" Knowledge and information systems 41.3 (2014): 647-665.\n\n3. *DeepLIFT:* Shrikumar, Avanti, Peyton Greenside, and Anshul Kundaje. \"Learning important features through propagating activation differences.\" arXiv preprint arXiv:1704.02685 (2017).\n\n4. *QII:* Datta, Anupam, Shayak Sen, and Yair Zick. \"Algorithmic transparency via quantitative input influence: Theory and experiments with learning systems.\" Security and Privacy (SP), 2016 IEEE Symposium on. IEEE, 2016.\n\n5. *Layer-wise relevance propagation:* Bach, Sebastian, et al. \"On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation.\" PloS one 10.7 (2015): e0130140.\n\n6. *Shapley regression values:* Lipovetsky, Stan, and Michael Conklin. \"Analysis of regression in game theory approach.\" Applied Stochastic Models in Business and Industry 17.4 (2001): 319-330.\n\n7. *Tree interpreter:* Saabas, Ando. Interpreting random forests. http://blog.datadive.net/interpreting-random-forests/\n\n<img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=189147091855991&ev=PageView&noscript=1\" />\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A51A:3AC5A:178213:5CA324:6AB920DF"},"text_sha256":"9fed14ac43adc002f2b7680a2fa9a610bf5403992b70c9c93a408a3a6005302a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3361","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:1768AB6:1B85B35:6AB9286E"},"commit":{"sha":"e6dd1f5b36abad4f6e77abeca6218980dd378762","url":"https://github.com/shap/shap/commit/e6dd1f5b36abad4f6e77abeca6218980dd378762","date":"2026-06-29T14:33:19Z","author_date":"2026-06-29T14:33:19Z","committer_date":"2026-06-29T14:33:19Z","tree_sha":"c83063d5c08ed25bdedd363b12e55d70f39b0616","message_first_line":"ENH: Move optional-dep into dep-groups (#4589)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3360","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085F:70FF5:17B769D:1BD5F85:6AB9286E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22004,"blob_sha":"99f9e2cbd076b90d53d3a16abf24d5566929dc64","priority":0},{"path":"docs/user_studies/sickness_scores/templates/consent.html","size":2683,"blob_sha":"900d8eb552fb7601c77ddff7d08b9c044fe1b285","priority":1}],"documents":[{"path":"README.md","size":22004,"blob_sha":"99f9e2cbd076b90d53d3a16abf24d5566929dc64","priority":0,"status":200,"text":"\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/shap_header.svg\" width=\"800\" />\n<\/p>\n\n---\n[![PyPI](https://img.shields.io/pypi/v/shap)](https://pypi.org/project/shap/)\n[![Conda](https://img.shields.io/conda/vn/conda-forge/shap)](https://anaconda.org/conda-forge/shap)\n![License](https://img.shields.io/github/license/shap/shap)\n![Tests](https://github.com/shap/shap/actions/workflows/run_tests.yml/badge.svg)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/shap/shap/master)\n[![Documentation Status](https://readthedocs.org/projects/shap/badge/?version=latest)](https://shap.readthedocs.io/en/latest/?badge=latest)\n![Downloads](https://img.shields.io/pypi/dm/shap)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/shap)](https://pypi.org/pypi/shap/)\n\n\n**SHAP (SHapley Additive exPlanations)** is a game theoretic approach to explain the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions (see [papers](#citations) for details and citations).\n\n<!--**SHAP (SHapley Additive exPlanations)** is a unified approach to explain the output of any machine learning model. SHAP connects game theory with local explanations, uniting several previous methods [1-7] and representing the only possible consistent and locally accurate additive feature attribution method based on expectations (see our [papers](#citations) for details and citations).-->\n\n\n\n## Install\n\nSHAP can be installed from either [PyPI](https://pypi.org/project/shap) or [conda-forge](https://anaconda.org/conda-forge/shap):\n\n<pre>\npip install shap\n<i>or<\/i>\nconda install -c conda-forge shap\n<\/pre>\n\n### GPU support\n\nTo enable GPU-accelerated Tree SHAP, install from source with the CUDA toolkit available and the `SHAP_ENABLE_CUDA` environment variable set:\n\n<pre>\nSHAP_ENABLE_CUDA=1 pip install .\n<\/pre>\n\nThis requires the [CUDA toolkit](https://developer.nvidia.com/cuda-toolkit) to be installed on your system.\n\n## Supported versions\n\nSHAP follows [SPEC 0](https://scientific-python.org/specs/spec-0000/) for minimum supported dependency versions. We test against the versions specified there and may not fix bugs for older versions.\n\n## Contributing\n\nWe welcome contributions highly. Feel free to file an issue. Before opening a PR make sure you've read our [CONTRIBUTING.md](CONTRIBUTING.md) guideline.\n\n## Tree ensemble example (XGBoost/LightGBM/CatBoost/scikit-learn/pyspark models)\n\nWhile SHAP can explain the output of any machine learning model, we have developed a high-speed exact algorithm for tree ensemble methods (see our [Nature MI paper](https://rdcu.be/b0z70)). Fast C++ implementations are supported for *XGBoost*, *LightGBM*, *CatBoost*, *scikit-learn* and *pyspark* tree models:\n\n```python\nimport xgboost\nimport shap\n\n# train an XGBoost model\nX, y = shap.datasets.california()\nmodel = xgboost.XGBRegressor().fit(X, y)\n\n# explain the model's predictions using SHAP\n# (same syntax works for LightGBM, CatBoost, scikit-learn, transformers, Spark, etc.)\nexplainer = shap.Explainer(model)\nshap_values = explainer(X)\n\n# visualize the first prediction's explanation\nshap.plots.waterfall(shap_values[0])\n```\n\n<p align=\"center\">\n  <img width=\"616\" src=\"./docs/artwork/california_waterfall.png\" />\n<\/p>\n\nThe above explanation shows features each contributing to push the model output from the base value (the average model output over the training dataset we passed) to the model output. Features pushing the prediction higher are shown in red, those pushing the prediction lower are in blue. Another way to visualize the same explanation is to use a force plot (these are introduced in our [Nature BME paper](https://rdcu.be/baVbR)):\n\n```python\n# visualize the first prediction's explanation with a force plot\nshap.plots.force(shap_values[0])\n```\n\n<p align=\"center\">\n  <img width=\"811\" src=\"./docs/artwork/california_instance.png\" />\n<\/p>\n\nIf we take many force plot explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset (in the notebook this plot is interactive):\n\n```python\n# visualize all the training set predictions\nshap.plots.force(shap_values[:500])\n```\n\n<p align=\"center\">\n  <img width=\"811\" src=\"./docs/artwork/california_dataset.png\" />\n<\/p>\n\nTo understand how a single feature effects the output of the model we can plot the SHAP value of that feature vs. the value of the feature for all the examples in a dataset. Since SHAP values represent a feature's responsibility for a change in the model output, the plot below represents the change in predicted house price as the latitude changes. Vertical dispersion at a single value of latitude represents interaction effects with other features. To help reveal these interactions we can color by another feature. If we pass the whole explanation tensor to the `color` argument the scatter plot will pick the best feature to color by. In this case it picks longitude.\n\n```python\n# create a dependence scatter plot to show the effect of a single feature across the whole dataset\nshap.plots.scatter(shap_values[:, \"Latitude\"], color=shap_values)\n```\n\n<p align=\"center\">\n  <img width=\"544\" src=\"./docs/artwork/california_scatter.png\" />\n<\/p>\n\n\nTo get an overview of which features are most important for a model we can plot the SHAP values of every feature for every sample. The plot below sorts features by the sum of SHAP value magnitudes over all samples, and uses SHAP values to show the distribution of the impacts each feature has on the model output. The color represents the feature value (red high, blue low). This reveals for example that higher median incomes increases the predicted home price.\n\n```python\n# summarize the effects of all the features\nshap.plots.beeswarm(shap_values)\n```\n\n<p align=\"center\">\n  <img width=\"583\" src=\"./docs/artwork/california_beeswarm.png\" />\n<\/p>\n\nWe can also just take the mean absolute value of the SHAP values for each feature to get a standard bar plot (produces stacked bars for multi-class outputs):\n\n```python\nshap.plots.bar(shap_values)\n```\n\n<p align=\"center\">\n  <img width=\"570\" src=\"./docs/artwork/california_global_bar.png\" />\n<\/p>\n\n## Natural language example (transformers)\n\nSHAP has specific support for natural language models like those in the Hugging Face transformers library. By adding coalitional rules to traditional Shapley values we can form games that explain large modern NLP model using very few function evaluations. Using this functionality is as simple as passing a supported transformers pipeline to SHAP:\n\n```python\nimport transformers\nimport shap\n\n# load a transformers pipeline model\nmodel = transformers.pipeline('sentiment-analysis', top_k=None)\n\n# explain the model on two sample inputs\nexplainer = shap.Explainer(model)\nshap_values = explainer([\"What a great movie! ...if you have no taste.\"])\n\n# visualize the first prediction's explanation for the POSITIVE output class\nshap.plots.text(shap_values[0, :, \"POSITIVE\"])\n```\n\n<p align=\"center\">\n  <img width=\"811\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/sentiment_analysis_plot.png\" />\n<\/p>\n\n## Deep learning example with DeepExplainer (TensorFlow/Keras models)\n\nDeep SHAP is a high-speed approximation algorithm for SHAP values in deep learning models that builds on a connection with [DeepLIFT](https://arxiv.org/abs/1704.02685) described in the SHAP NIPS paper. The implementation here differs from the original DeepLIFT by using a distribution of background samples instead of a single reference value, and using Shapley equations to linearize components such as max, softmax, products, divisions, etc. Note that some of these enhancements have also been since integrated into DeepLIFT. TensorFlow models and Keras models using the TensorFlow backend are supported (there is also preliminary support for PyTorch):\n\n```python\n# ...include code from https://github.com/keras-team/keras/blob/master/examples/demo_mnist_convnet.py\n\nimport shap\nimport numpy as np\n\n# select a set of background examples to take an expectation over\nbackground = x_train[np.random.choice(x_train.shape[0], 100, replace=False)]\n\n# explain predictions of the model on four images\ne = shap.DeepExplainer(model, background)\n# ...or pass tensors directly\n# e = shap.DeepExplainer((model.layers[0].input, model.layers[-1].output), background)\nshap_values = e.shap_values(x_test[1:5])\n\n# plot the feature attributions\nshap.image_plot(shap_values, -x_test[1:5])\n```\n\n<p align=\"center\">\n  <img width=\"820\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/mnist_image_plot.png\" />\n<\/p>\n\nThe plot above explains ten outputs (digits 0-9) for four different images. Red pixels increase the model's output while blue pixels decrease the output. The input images are shown on the left, and as nearly transparent grayscale backings behind each of the explanations. The sum of the SHAP values equals the difference between the expected model output (averaged over the background dataset) and the current model output. Note that for the 'zero' image the blank middle is important, while for the 'four' image the lack of a connection on top makes it a four instead of a nine.\n\n\n## Deep learning example with GradientExplainer (TensorFlow/Keras/PyTorch models)\n\nExpected gradients combines ideas from [Integrated Gradients](https://arxiv.org/abs/1703.01365), SHAP, and [SmoothGrad](https://arxiv.org/abs/1706.03825) into a single expected value equation. This allows an entire dataset to be used as the background distribution (as opposed to a single reference value) and allows local smoothing. If we approximate the model with a linear function between each background data sample and the current input to be explained, and we assume the input features are independent then expected gradients will compute approximate SHAP values. In the example below we have explained how the 7th intermediate layer of the VGG16 ImageNet model impacts the output probabilities.\n\n```python\nfrom keras.applications.vgg16 import VGG16\nfrom keras.applications.vgg16 import preprocess_input\nimport keras.backend as K\nimport numpy as np\nimport json\nimport shap\n\n# load pre-trained model and choose two images to explain\nmodel = VGG16(weights='imagenet', include_top=True)\nX,y = shap.datasets.imagenet50()\nto_explain = X[[39,41]]\n\n# load the ImageNet class names\nurl = \"https://s3.amazonaws.com/deep-learning-models/image-models/imagenet_class_index.json\"\nfname = shap.datasets.cache(url)\nwith open(fname) as f:\n    class_names = json.load(f)\n\n# explain how the input to the 7th layer of the model explains the top two classes\ndef map2layer(x, layer):\n    feed_dict = dict(zip([model.layers[0].input], [preprocess_input(x.copy())]))\n    return K.get_session().run(model.layers[layer].input, feed_dict)\ne = shap.GradientExplainer(\n    (model.layers[7].input, model.layers[-1].output),\n    map2layer(X, 7),\n    local_smoothing=0 # std dev of smoothing noise\n)\nshap_values,indexes = e.shap_values(map2layer(to_explain, 7), ranked_outputs=2)\n\n# get the names for the classes\nindex_names = np.vectorize(lambda x: class_names[str(x)][1])(indexes)\n\n# plot the explanations\nshap.image_plot(shap_values, to_explain, index_names)\n```\n\n<p align=\"center\">\n  <img width=\"500\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/gradient_imagenet_plot.png\" />\n<\/p>\n\nPredictions for two input images are explained in the plot above. Red pixels represent positive SHAP values that increase the probability of the class, while blue pixels represent negative SHAP values the reduce the probability of the class. By using `ranked_outputs=2` we explain only the two most likely classes for each input (this spares us from explaining all 1,000 classes).\n\n## Model agnostic example with KernelExplainer (explains any function)\n\nKernel SHAP uses a specially-weighted local linear regression to estimate SHAP values for any model. Below is a simple example for explaining a multi-class SVM on the classic iris dataset.\n\n```python\nimport sklearn\nimport shap\nfrom sklearn.model_selection import train_test_split\n\n# print the JS visualization code to the notebook\nshap.initjs()\n\n# train a SVM classifier\nX_train,X_test,Y_train,Y_test = train_test_split(*shap.datasets.iris(), test_size=0.2, random_state=0)\nsvm = sklearn.svm.SVC(kernel='rbf', probability=True)\nsvm.fit(X_train, Y_train)\n\n# use Kernel SHAP to explain test set predictions\nexplainer = shap.KernelExplainer(svm.predict_proba, X_train, link=\"logit\")\nshap_values = explainer.shap_values(X_test, nsamples=100)\n\n# plot the SHAP values for the Setosa output of the first instance\nshap.force_plot(explainer.expected_value[0], shap_values[0][0,:], X_test.iloc[0,:], link=\"logit\")\n```\n<p align=\"center\">\n  <img width=\"810\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/iris_instance.png\" />\n<\/p>\n\nThe above explanation shows four features each contributing to push the model output from the base value (the average model output over the training dataset we passed) towards zero. If there were any features pushing the class label higher they would be shown in red.\n\nIf we take many explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset. This is exactly what we do below for all the examples in the iris test set:\n\n```python\n# plot the SHAP values for the Setosa output of all instances\nshap.force_plot(explainer.expected_value[0], shap_values[0], X_test, link=\"logit\")\n```\n<p align=\"center\">\n  <img width=\"813\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/iris_dataset.png\" />\n<\/p>\n\n## SHAP Interaction Values\n\nSHAP interaction values are a generalization of SHAP values to higher order interactions. Fast exact computation of pairwise interactions are implemented for tree models with `shap.TreeExplainer(model).shap_interaction_values(X)`. This returns a matrix for every prediction, where the main effects are on the diagonal and the interaction effects are off-diagonal. These values often reveal interesting hidden relationships, such as how the increased risk of death peaks for men at age 60 (see the NHANES notebook for details):\n\n<p align=\"center\">\n  <img width=\"483\" src=\"https://raw.githubusercontent.com/shap/shap/master/docs/artwork/nhanes_age_sex_interaction.png\" />\n<\/p>\n\n## Sample notebooks\n\nThe notebooks below demonstrate different use cases for SHAP. Look inside the notebooks directory of the repository if you want to try playing with the original notebooks yourself.\n\n### TreeExplainer\n\nAn implementation of Tree SHAP, a fast and exact algorithm to compute SHAP values for trees and ensembles of trees.\n\n- [**NHANES survival model with XGBoost and SHAP interaction values**](https://shap.github.io/shap/notebooks/NHANES%20I%20Survival%20Model.html) - Using mortality data from 20 years of followup this notebook demonstrates how to use XGBoost and `shap` to uncover complex risk factor relationships.\n\n- [**Census income classification with LightGBM**](https://shap.github.io/shap/notebooks/tree_explainer/Census%20income%20classification%20with%20LightGBM.html) - Using the standard adult census income dataset, this notebook trains a gradient boosting tree model with LightGBM and then explains predictions using `shap`.\n\n- [**League of Legends Win Prediction with XGBoost**](https://shap.github.io/shap/notebooks/League%20of%20Legends%20Win%20Prediction%20with%20XGBoost.html) - Using a Kaggle dataset of 180,000 ranked matches from League of Legends we train and explain a gradient boosting tree model with XGBoost to predict if a player will win their match.\n\n### DeepExplainer\n\nAn implementation of Deep SHAP, a faster (but only approximate) algorithm to compute SHAP values for deep learning models that is based on connections between SHAP and the DeepLIFT algorithm.\n\n- [**MNIST Digit classification with Keras**](https://shap.github.io/shap/notebooks/deep_explainer/Front%20Page%20DeepExplainer%20MNIST%20Example.html) - Using the MNIST handwriting recognition dataset, this notebook trains a neural network with Keras and then explains predictions using `shap`.\n\n- [**Keras LSTM for IMDB Sentiment Classification**](https://shap.github.io/shap/notebooks/deep_explainer/Keras%20LSTM%20for%20IMDB%20Sentiment%20Classification.html) - This notebook trains an LSTM with Keras on the IMDB text sentiment analysis dataset and then explains predictions using `shap`.\n\n### GradientExplainer\n\nAn implementation of expected gradients to approximate SHAP values for deep learning models. It is based on connections between SHAP and the Integrated Gradients algorithm. GradientExplainer is slower than DeepExplainer and makes different approximation assumptions.\n\n- [**Explain an Intermediate Layer of VGG16 on ImageNet**](https://shap.github.io/shap/notebooks/gradient_explainer/Explain%20an%20Intermediate%20Layer%20of%20VGG16%20on%20ImageNet.html) - This notebook demonstrates how to explain the output of a pre-trained VGG16 ImageNet model using an internal convolutional layer.\n\n### LinearExplainer\n\nFor a linear model with independent features we can analytically compute the exact SHAP values. We can also account for feature correlation if we are willing to estimate the feature covariance matrix. LinearExplainer supports both of these options.\n\n- [**Sentiment Analysis with Logistic Regression**](https://shap.github.io/shap/notebooks/linear_explainer/Sentiment%20Analysis%20with%20Logistic%20Regression.html) - This notebook demonstrates how to explain a linear logistic regression sentiment analysis model.\n\n### KernelExplainer\n\nAn implementation of Kernel SHAP, a model agnostic method to estimate SHAP values for any model. Because it makes no assumptions about the model type, KernelExplainer is slower than the other model type specific algorithms.\n\n- [**Census income classification with scikit-learn**](https://shap.github.io/shap/notebooks/Census%20income%20classification%20with%20scikit-learn.html) - Using the standard adult census income dataset, this notebook trains a k-nearest neighbors classifier using scikit-learn and then explains predictions using `shap`.\n\n- [**ImageNet VGG16 Model with Keras**](https://shap.github.io/shap/notebooks/ImageNet%20VGG16%20Model%20with%20Keras.html) - Explain the classic VGG16 convolutional neural network's predictions for an image. This works by applying the model agnostic Kernel SHAP method to a super-pixel segmented image.\n\n- [**Iris classification**](https://shap.github.io/shap/notebooks/Iris%20classification%20with%20scikit-learn.html) - A basic demonstration using the popular iris species dataset. It explains predictions from six different models in scikit-learn using `shap`.\n\n## Documentation notebooks\n\nThese notebooks comprehensively demonstrate how to use specific functions and objects.\n\n- [`shap.decision_plot` and `shap.multioutput_decision_plot`](https://shap.github.io/shap/notebooks/plots/decision_plot.html)\n\n- [`shap.dependence_plot`](https://shap.github.io/shap/notebooks/plots/dependence_plot.html)\n\n## Methods Unified by SHAP\n\n1. *LIME:* Ribeiro, Marco Tulio, Sameer Singh, and Carlos Guestrin. \"Why should i trust you?: Explaining the predictions of any classifier.\" Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016.\n\n2. *Shapley sampling values:* Strumbelj, Erik, and Igor Kononenko. \"Explaining prediction models and individual predictions with feature contributions.\" Knowledge and information systems 41.3 (2014): 647-665.\n\n3. *DeepLIFT:* Shrikumar, Avanti, Peyton Greenside, and Anshul Kundaje. \"Learning important features through propagating activation differences.\" arXiv preprint arXiv:1704.02685 (2017).\n\n4. *QII:* Datta, Anupam, Shayak Sen, and Yair Zick. \"Algorithmic transparency via quantitative input influence: Theory and experiments with learning systems.\" Security and Privacy (SP), 2016 IEEE Symposium on. IEEE, 2016.\n\n5. *Layer-wise relevance propagation:* Bach, Sebastian, et al. \"On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation.\" PloS one 10.7 (2015): e0130140.\n\n6. *Shapley regression values:* Lipovetsky, Stan, and Michael Conklin. \"Analysis of regression in game theory approach.\" Applied Stochastic Models in Business and Industry 17.4 (2001): 319-330.\n\n7. *Tree interpreter:* Saabas, Ando. Interpreting random forests. http://blog.datadive.net/interpreting-random-forests/\n\n## Citations\n\nThe algorithms and visualizations used in this package came primarily out of research in [Su-In Lee's lab](https://suinlee.cs.washington.edu) at the University of Washington, and Microsoft Research. If you use SHAP in your research we would appreciate a citation to the appropriate paper(s):\n\n- For general use of SHAP you can read/cite our [NeurIPS paper](http://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions) ([bibtex](https://raw.githubusercontent.com/shap/shap/master/docs/references/shap_nips.bib)).\n- For TreeExplainer you can read/cite our [Nature Machine Intelligence paper](https://www.nature.com/articles/s42256-019-0138-9) ([bibtex](https://raw.githubusercontent.com/shap/shap/master/docs/references/tree_explainer.bib); [free access](https://rdcu.be/b0z70)).\n- For GPUTreeExplainer you can read/cite [this article](https://arxiv.org/abs/2010.13972).\n- For `force_plot` visualizations and medical applications you can read/cite our [Nature Biomedical Engineering paper](https://www.nature.com/articles/s41551-018-0304-0) ([bibtex](https://raw.githubusercontent.com/shap/shap/master/docs/references/nature_bme.bib); [free access](https://rdcu.be/baVbR)).\n\n<img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=189147091855991&ev=PageView&noscript=1\" />\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2006:29FD16:17CB32:5CEC81:6AB920E0"},"text_sha256":"40f47db51c7800b47fdd128aa2871faf00bfe31d6fc4f0b7b537938efa353372"},{"path":"docs/user_studies/sickness_scores/templates/consent.html","size":2683,"blob_sha":"900d8eb552fb7601c77ddff7d08b9c044fe1b285","priority":1,"status":200,"text":"<!DOCTYPE html>\n<!--\n  The consent.html displays the text of your IRB-approved\n  consent form.  Even if you are not required to provide\n  a consent form, it is helpful to use this form to\n  describe what people can do if an error comes up, etc...\n\n-->\n<html>\n    <head>\n        <meta charset=\"utf-8\" />\n        <title>Artifical intellegence lending score experiment - Informed consent form<\/title>\n        <link rel=\"stylesheet\" href=\"/static/css/bootstrap.min.css\" type=\"text/css\" />\n        <link rel=\"stylesheet\" href=\"/static/css/style.css\" type=\"text/css\" />\n        <script type=\"text/javascript\">\n            function onexit() {\n              self.close(); // no harm, no foul here\n            }\n        <\/script>\n    <\/head>\n    <body>\n        <div id=\"container-consent\">\n            <div id=\"consent\">\n                <h1>We need your consent to proceed<\/h1>\n                <hr />\n                <div class=\"legal well\">\n                    <p>\n                    You have been invited to take part in research designed to compare\n                    different ways of explaining computer predictions.\n                    <\/p>\n                    <p>\n                    Aggregate information about your responses will be shared publically, and while we\n                    will make no attempt to identify worker identities we cannot guarantee the\n                    privacy of your responses. You also must not be currently working for the University of Washington.\n                    <\/p>\n\n                    <button type=\"button\" class=\"btn btn-default btn-sm\" onClick=\"window.print();\">\n                    <span class=\"glyphicon glyphicon-print\"><\/span> Print a copy of this\n                    <\/button>\n                <\/div>\n\n                <hr />\n                <h4>Do you understand and consent to these terms?<\/h4>\n                <br />\n\n                <center>\n                    <button type=\"button\" class=\"btn btn-primary btn-lg\" onClick=\"window.location='/exp?hitId={{ hitid }}&assignmentId={{ assignmentid }}&workerId={{ workerid }}'\">\n                    <span class=\"glyphicon glyphicon-ok\"><\/span> I agree\n                    <\/button>\n                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n                    <button type=\"button\" class=\"btn btn-danger btn-lg\" onClick=\"onexit()\">\n                    <span class=\"glyphicon glyphicon-ban-circle\"><\/span> No thanks, I do not want to do this HIT\n                    <\/button>\n                <\/center>\n\n            <\/div>\n        <\/div>\n    <\/body>\n<\/html>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CFA:11316A:176C56:5C8CE2:6AB920DB"},"text_sha256":"dade5e5350f02ad4614a47bd4585364510707d45b7b35a8db286fa8ff75283f2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":1,"C7":0,"D1":1,"score":1,"D1_evidence":"sha=e6dd1f5b36abad4f6e77abeca6218980dd378762; file=docs/user_studies/sickness_scores/templates/consent.html; text=You have been invited to take part in research designed to compare different ways of explaining computer predictions. Aggregate information about your responses will be shared publically, and while we will make no attempt to identify worker identities we cannot guarantee the privacy of your responses.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C6":"sha=e6dd1f5b36abad4f6e77abeca6218980dd378762; file=docs/user_studies/sickness_scores/templates/consent.html; text=You have been invited to take part in research designed to compare different ways of explaining computer predictions. Aggregate information about your responses will be shared publically, and while we will make no attempt to identify worker identities we cannot guarantee the privacy of your responses."}}}}
{"repository":"ageron/handson-ml","input_row":{"repository":"ageron/handson-ml","url":"https://github.com/ageron/handson-ml","name":"handson-ml","owner":"ageron","description":"⛔️ DEPRECATED – See https://github.com/ageron/handson-ml3 or handson-mlp instead.","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":25610,"issues":563,"created_at":"2016-02-16T19:48:39Z","updated_at":"2026-09-27T00:21:37Z","first_commit_at":"2016-02-16T19:48:39Z","last_commit_at":"2026-05-19T23:03:11Z","activity_months":123.03,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:08.792Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ageron/handson-ml","visibility":"public","created_at":"2016-02-16T19:48:39Z","updated_at":"2026-09-27T00:21:37Z","private":false,"fork":false,"archived":false,"stargazers_count":25610,"open_issues_count":145,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3359","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:17C71E3:1BE5C9B:6AB92870"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3358","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:17ECBCA:1C0BBC0:6AB92871"},"commit":{"sha":"51b12887938bb15f05969bde10629c175ffbbb8d","url":"https://github.com/ageron/handson-ml/commit/51b12887938bb15f05969bde10629c175ffbbb8d","date":"2018-05-18T19:22:56Z","author_date":"2018-05-18T19:22:56Z","committer_date":"2018-05-18T19:22:56Z","tree_sha":"05acbf5a60174ca80a7f4006d25742765120c4d7","message_first_line":"Use tensorflow_graph_in_jupyter.py in notebooks, fixes #223"},"tree_request_status":200,"tree_rate":{"github_remaining":"3357","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17B3105:1BD1D78:6AB92871"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9098,"blob_sha":"6424ef5dbc70853a6777fe7291bf5ceb740d8a81","priority":0}],"documents":[{"path":"README.md","size":9098,"blob_sha":"6424ef5dbc70853a6777fe7291bf5ceb740d8a81","priority":0,"status":200,"text":"Machine Learning Notebooks\n==========================\n\nThis project aims at teaching you the fundamentals of Machine Learning in\npython. It contains the example code and solutions to the exercises in my O'Reilly book [Hands-on Machine Learning with Scikit-Learn and TensorFlow](http://shop.oreilly.com/product/0636920052289.do):\n\n[![book](http://akamaicovers.oreilly.com/images/0636920052289/cat.gif)](http://shop.oreilly.com/product/0636920052289.do)\n\nSimply open the [Jupyter](http://jupyter.org/) notebooks you are interested in:\n\n* Using [jupyter.org's notebook viewer](http://nbviewer.jupyter.org/github/ageron/handson-ml/blob/master/index.ipynb)\n    * note: [github.com's notebook viewer](https://github.com/ageron/handson-ml/blob/master/index.ipynb) also works but it is slower and the math formulas are not displayed correctly,\n* or by cloning this repository and running Jupyter locally. This option lets you play around with the code. In this case, follow the installation instructions below.\n\n# Installation\n\nFirst, you will need to install [git](https://git-scm.com/), if you don't have it already.\n\nNext, clone this repository by opening a terminal and typing the following commands:\n\n    $ cd $HOME  # or any other development directory you prefer\n    $ git clone https://github.com/ageron/handson-ml.git\n    $ cd handson-ml\n\nIf you do not want to install git, you can instead download [master.zip](https://github.com/ageron/handson-ml/archive/master.zip), unzip it, rename the resulting directory to `handson-ml` and move it to your development directory.\n\nIf you want to go through chapter 16 on Reinforcement Learning, you will need to [install OpenAI gym](https://gym.openai.com/docs) and its dependencies for Atari simulations.\n\nIf you are familiar with Python and you know how to install Python libraries, go ahead and install the libraries listed in `requirements.txt` and jump to the [Starting Jupyter](#starting-jupyter) section. If you need detailed instructions, please read on.\n\n## Python & Required Libraries\nOf course, you obviously need Python. Python 2 is already preinstalled on most systems nowadays, and sometimes even Python 3. You can check which version(s) you have by typing the following commands:\n\n    $ python --version   # for Python 2\n    $ python3 --version  # for Python 3\n\nAny Python 3 version should be fine, preferably ≥3.5. If you don't have Python 3, I recommend installing it (Python ≥2.6 should work, but it is deprecated so Python 3 is preferable). To do so, you have several options: on Windows or MacOSX, you can just download it from [python.org](https://www.python.org/downloads/). On MacOSX, you can alternatively use [MacPorts](https://www.macports.org/) or [Homebrew](https://brew.sh/). If you are using Python 3.6 on MacOSX, you need to run the following command to install the `certifi` package of certificates because Python 3.6 on MacOSX has no certificates to validate SSL connections (see this [StackOverflow question](https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error)):\n\n    $ /Applications/Python\\ 3.6/Install\\ Certificates.command\n\nOn Linux, unless you know what you are doing, you should use your system's packaging system. For example, on Debian or Ubuntu, type:\n\n    $ sudo apt-get update\n    $ sudo apt-get install python3\n\nAnother option is to download and install [Anaconda](https://www.continuum.io/downloads). This is a package that includes both Python and many scientific libraries. You should prefer the Python 3 version.\n\nIf you choose to use Anaconda, read the next section, or else jump to the [Using pip](#using-pip) section.\n\n## Using Anaconda\nWhen using Anaconda, you can optionally create an isolated Python environment dedicated to this project. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially different libraries and library versions:\n\n    $ conda create -n mlbook python=3.5 anaconda\n    $ source activate mlbook\n\nThis creates a fresh Python 3.5 environment called `mlbook` (you can change the name if you want to), and it activates it. This environment contains all the scientific libraries that come with Anaconda. This includes all the libraries we will need (NumPy, Matplotlib, Pandas, Jupyter and a few others), except for TensorFlow, so let's install it:\n\n    $ conda install -n mlbook -c conda-forge tensorflow\n\nThis installs the latest version of TensorFlow available for Anaconda (which is usually *not* the latest TensorFlow version) in the `mlbook` environment (fetching it from the `conda-forge` repository). If you chose not to create an `mlbook` environment, then just remove the `-n mlbook` option.\n\nNext, you can optionally install Jupyter extensions. These are useful to have nice tables of contents in the notebooks, but they are not required.\n\n    $ conda install -n mlbook -c conda-forge jupyter_contrib_nbextensions\n\nYou are all set! Next, jump to the [Starting Jupyter](#starting-jupyter) section.\n\n## Using pip \nIf you are not using Anaconda, you need to install several scientific Python libraries that are necessary for this project, in particular NumPy, Matplotlib, Pandas, Jupyter and TensorFlow (and a few others). For this, you can either use Python's integrated packaging system, pip, or you may prefer to use your system's own packaging system (if available, e.g. on Linux, or on MacOSX when using MacPorts or Homebrew). The advantage of using pip is that it is easy to create multiple isolated Python environments with different libraries and different library versions (e.g. one environment for each project). The advantage of using your system's packaging system is that there is less risk of having conflicts between your Python libraries and your system's other packages. Since I have many projects with different library requirements, I prefer to use pip with isolated environments. Moreover, the pip packages are usually the most recent ones available, while Anaconda and system packages often lag behind a bit.\n\nThese are the commands you need to type in a terminal if you want to use pip to install the required libraries. Note: in all the following commands, if you chose to use Python 2 rather than Python 3, you must replace `pip3` with `pip`, and `python3` with `python`.\n\nFirst you need to make sure you have the latest version of pip installed:\n\n    $ pip3 install --user --upgrade pip\n\nThe `--user` option will install the latest version of pip only for the current user. If you prefer to install it system wide (i.e. for all users), you must have administrator rights (e.g. use `sudo pip3` instead of `pip3` on Linux), and you should remove the `--user` option. The same is true of the command below that uses the `--user` option.\n\nNext, you can optionally create an isolated environment. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially very different libraries, and different versions:\n\n    $ pip3 install --user --upgrade virtualenv\n    $ virtualenv -p `which python3` env\n\nThis creates a new directory called `env` in the current directory, containing an isolated Python environment based on Python 3. If you installed multiple versions of Python 3 on your system, you can replace `` `which python3` `` with the path to the Python executable you prefer to use.\n\nNow you must activate this environment. You will need to run this command every time you want to use this environment.\n\n    $ source ./env/bin/activate\n\nNext, use pip to install the required python packages. If you are not using virtualenv, you should add the `--user` option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using `sudo pip3` instead of `pip3` on Linux).\n\n    $ pip3 install --upgrade -r requirements.txt\n\nGreat! You're all set, you just need to start Jupyter now.\n\n## Starting Jupyter\nIf you want to use the Jupyter extensions (optional, they are mainly useful to have nice tables of contents), you first need to install them:\n\n    $ jupyter contrib nbextension install --user\n\nThen you can activate an extension, such as the Table of Contents (2) extension:\n\n    $ jupyter nbextension enable toc2/main\n\nOkay! You can now start Jupyter, simply type:\n\n    $ jupyter notebook\n\nThis should open up your browser, and you should see Jupyter's tree view, with the contents of the current directory. If your browser does not open automatically, visit [localhost:8888](http://localhost:8888/tree). Click on `index.ipynb` to get started!\n\nNote: you can also visit [http://localhost:8888/nbextensions](http://localhost:8888/nbextensions) to activate and configure Jupyter extensions.\n\nCongrats! You are ready to learn Machine Learning, hands on!\n\n# Contributors\nI would like to thank everyone who contributed to this project, either by providing useful feedback, filing issues or submitting Pull Requests. Special thanks go to Steven Bunkley and Ziembla who created the `docker` directory.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"20D8:3C4A0:1755D3:5C7792:6AB920E1"},"text_sha256":"2639d2feef13e6ff088ebb7918b4c4e532da4891247648522dc8301e4f689443"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3356","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:17BB800:1BDA783:6AB92872"},"commit":{"sha":"b7051594afbb1d835f5e031af8664c4363878050","url":"https://github.com/ageron/handson-ml/commit/b7051594afbb1d835f5e031af8664c4363878050","date":"2026-05-19T23:03:11Z","author_date":"2026-05-19T23:03:11Z","committer_date":"2026-05-19T23:03:11Z","tree_sha":"a472ab5511c44b5ec8c4d7f748ab8ae0fae7f11d","message_first_line":"set_data() now expects sequences"},"tree_request_status":200,"tree_rate":{"github_remaining":"3355","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:18191B2:1C37A67:6AB92872"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5871,"blob_sha":"21ddcb9debc11089eeda75ae7f63e32882fdf85c","priority":0}],"documents":[{"path":"README.md","size":5871,"blob_sha":"21ddcb9debc11089eeda75ae7f63e32882fdf85c","priority":0,"status":200,"text":"Machine Learning Notebooks\n==========================\n\n# ⚠ THE <a href=\"https://github.com/ageron/handson-ml3\">THIRD EDITION OF MY BOOK<\/a> IS NOW AVAILABLE, AS WELL A <a href=\"https://github.com/ageron/handson-mlp\">PYTORCH VERSION<\/a> AND <a href=\"https://homl.info/\">MANY TRANSLATIONS<\/a>.\n\nThis project is for the first edition, which is now outdated (it came out in 2017).\n\n<details>\n\nThis project aims at teaching you the fundamentals of Machine Learning in\npython. It contains the example code and solutions to the exercises in my O'Reilly book [Hands-on Machine Learning with Scikit-Learn and TensorFlow](https://learning.oreilly.com/library/view/hands-on-machine-learning/9781491962282/):\n\n[![book](http://akamaicovers.oreilly.com/images/9781491962282/cat.gif)](https://learning.oreilly.com/library/view/hands-on-machine-learning/9781491962282/)\n\n\n## Quick Start\n\n### Want to play with these notebooks online without having to install anything?\nUse any of the following services.\n\n**WARNING**: Please be aware that these services provide temporary environments: anything you do will be deleted after a while, so make sure you download any data you care about.\n\n* **Recommended**: open this repository in [Colaboratory](https://colab.research.google.com/github/ageron/handson-ml/blob/master/):\n<a href=\"https://colab.research.google.com/github/ageron/handson-ml/blob/master/\"><img src=\"https://colab.research.google.com/img/colab_favicon.ico\" width=\"90\" /><\/a>\n\n* Or open it in [Binder](https://mybinder.org/v2/gh/ageron/handson-ml/master):\n<a href=\"https://mybinder.org/v2/gh/ageron/handson-ml/master\"><img src=\"https://matthiasbussonnier.com/posts/img/binder_logo_128x128.png\" width=\"90\" /><\/a>\n\n  * _Note_: Most of the time, Binder starts up quickly and works great, but when handson-ml is updated, Binder creates a new environment from scratch, and this can take quite some time.\n\n* Or open it in [Deepnote](https://beta.deepnote.com/launch?template=data-science&url=https%3A//github.com/ageron/handson-ml/blob/master/index.ipynb):\n<a href=\"https://beta.deepnote.com/launch?template=data-science&url=https%3A//github.com/ageron/handson-ml/blob/master/index.ipynb\"><img src=\"https://www.deepnote.com/static/illustration.png\" width=\"150\" /><\/a>\n\n### Just want to quickly look at some notebooks, without executing any code?\n\nBrowse this repository using [jupyter.org's notebook viewer](https://nbviewer.jupyter.org/github/ageron/handson-ml/blob/master/index.ipynb):\n<a href=\"https://nbviewer.jupyter.org/github/ageron/handson-ml/blob/master/index.ipynb\"><img src=\"https://jupyter.org/assets/logos/rectanglelogo-greytext-orangebody-greymoons.svg\" width=\"150\" /><\/a>\n\n_Note_: [github.com's notebook viewer](index.ipynb) also works but it is slower and the math equations are not always displayed correctly.\n\n### Want to run this project using a Docker image?\nRead the [Docker instructions](https://github.com/ageron/handson-ml/tree/master/docker).\n\n### Want to install this project on your own machine?\n\nStart by installing [Anaconda](https://www.anaconda.com/distribution/) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html)), [git](https://git-scm.com/downloads), and if you have a TensorFlow-compatible GPU, install the [GPU driver](https://www.nvidia.com/Download/index.aspx), as well as the appropriate version of CUDA and cuDNN (see TensorFlow's documentation for more details).\n\nNext, clone this project by opening a terminal and typing the following commands (do not type the first `$` signs on each line, they just indicate that these are terminal commands):\n\n    $ git clone https://github.com/ageron/handson-ml.git\n    $ cd handson-ml\n\nNext, run the following commands:\n\n    $ conda env create -f environment.yml\n    $ conda activate tf1\n    $ python -m ipykernel install --user --name=python3\n\nFinally, start Jupyter:\n\n    $ jupyter notebook\n\nIf you need further instructions, read the [detailed installation instructions](INSTALL.md).\n\n# FAQ\n\n**Which Python version should I use?**\n\nI recommend Python 3.7. If you follow the installation instructions above, that's the version you will get. Most code will work with other versions of Python 3, but some libraries do not support Python 3.8 or 3.9 yet, which is why I recommend Python 3.7.\n\n**I'm getting an error when I call `load_housing_data()`**\n\nMake sure you call `fetch_housing_data()` *before* you call `load_housing_data()`. If you're getting an HTTP error, make sure you're running the exact same code as in the notebook (copy/paste it if needed). If the problem persists, please check your network configuration.\n\n**I'm getting an SSL error on MacOSX**\n\nYou probably need to install the SSL certificates (see this [StackOverflow question](https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error)). If you downloaded Python from the official website, then run `/Applications/Python\\ 3.7/Install\\ Certificates.command` in a terminal (change `3.7` to whatever version you installed). If you installed Python using MacPorts, run `sudo port install curl-ca-bundle` in a terminal.\n\n**I've installed this project locally. How do I update it to the latest version?**\n\nSee [INSTALL.md](INSTALL.md)\n\n**How do I update my Python libraries to the latest versions, when using Anaconda?**\n\nSee [INSTALL.md](INSTALL.md)\n\n## Contributors\nI would like to thank everyone [who contributed to this project](https://github.com/ageron/handson-ml/graphs/contributors), either by providing useful feedback, filing issues or submitting Pull Requests. Special thanks go to Haesun Park and Ian Beauregard who reviewed every notebook and submitted many PRs, including help on some of the exercise solutions. Thanks as well to Steven Bunkley and Ziembla who created the `docker` directory, and to github user SuperYorio who helped on some exercise solutions.\n\n<\/details>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"26B0:3A3DD:172872:5C4A5F:6AB920E3"},"text_sha256":"cc62eb9fe4becb9caa5c1a3379413b9d6b11895c2d3623468eeb7ffb296722ba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/Paddle","input_row":{"repository":"PaddlePaddle/Paddle","url":"https://github.com/PaddlePaddle/Paddle","name":"Paddle","owner":"PaddlePaddle","description":"PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice （『飞桨』核心框架，深度学习&机器学习高性能单机、分布式训练和跨平台部署）","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":24105,"issues":19354,"created_at":"2016-08-15T06:59:08Z","updated_at":"2026-09-26T11:55:29Z","first_commit_at":"2016-08-29T14:32:53Z","last_commit_at":"2026-09-24T08:16:24Z","activity_months":120.81999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:11.221Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/Paddle","visibility":"public","created_at":"2016-08-15T06:59:08Z","updated_at":"2026-09-26T11:55:29Z","private":false,"fork":false,"archived":false,"stargazers_count":24105,"open_issues_count":1479,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3354","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:17F80B8:1C16CE2:6AB92873"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3353","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08ED:74C18:17ECD6A:1C0BDD6:6AB92873"},"commit":{"sha":"0a135de541e9bccbbd23bfdaba403bff329421d1","url":"https://github.com/PaddlePaddle/Paddle/commit/0a135de541e9bccbbd23bfdaba403bff329421d1","date":"2018-05-24T21:59:45Z","author_date":"2018-05-24T21:59:45Z","committer_date":"2018-05-24T21:59:45Z","tree_sha":"0eba9510d289efb62e79b56d088b90f5ed5f15a9","message_first_line":"Use the cmake configure_file to setup imports for API docs"},"tree_request_status":200,"tree_rate":{"github_remaining":"3352","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0916:70FF5:17B79D3:1BD634E:6AB92874"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4787,"blob_sha":"8d89c6b1ec9e4aefbd64328dedb4e8c7cc50c21b","priority":0}],"documents":[{"path":"README.md","size":4787,"blob_sha":"8d89c6b1ec9e4aefbd64328dedb4e8c7cc50c21b","priority":0,"status":200,"text":"# PaddlePaddle\n\n\n[![Build Status](https://travis-ci.org/PaddlePaddle/Paddle.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/Paddle)\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html)\n[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html)\n[![Coverage Status](https://coveralls.io/repos/github/PaddlePaddle/Paddle/badge.svg?branch=develop)](https://coveralls.io/github/PaddlePaddle/Paddle?branch=develop)\n[![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle.svg)](https://github.com/PaddlePaddle/Paddle/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)\n\n\nWelcome to the PaddlePaddle GitHub.\n\nPaddlePaddle (PArallel Distributed Deep LEarning) is an easy-to-use,\nefficient, flexible and scalable deep learning platform, which is originally\ndeveloped by Baidu scientists and engineers for the purpose of applying deep\nlearning to many products at Baidu.\n\nOur vision is to enable deep learning for everyone via PaddlePaddle.\nPlease refer to our [release announcement](https://github.com/PaddlePaddle/Paddle/releases) to track the latest feature of PaddlePaddle.\n\n## Features\n\n- **Flexibility**\n\n    PaddlePaddle supports a wide range of neural network architectures and\n    optimization algorithms. It is easy to configure complex models such as\n    neural machine translation model with attention mechanism or complex memory\n    connection.\n\n-  **Efficiency**\n\n    In order to unleash the power of heterogeneous computing resource,\n    optimization occurs at different levels of PaddlePaddle, including\n    computing, memory, architecture and communication. The following are some\n    examples:\n\n      - Optimized math operations through SSE/AVX intrinsics, BLAS libraries\n      (e.g. MKL, OpenBLAS, cuBLAS) or customized CPU/GPU kernels.\n      - Optimized CNN networks through MKL-DNN library.\n      - Highly optimized recurrent networks which can handle **variable-length**\n      sequence without padding.\n      - Optimized local and distributed training for models with high dimensional\n      sparse data.\n\n- **Scalability**\n\n    With PaddlePaddle, it is easy to use many CPUs/GPUs and machines to speed\n    up your training. PaddlePaddle can achieve high throughput and performance\n    via optimized communication.\n\n- **Connected to Products**\n\n    In addition, PaddlePaddle is also designed to be easily deployable. At Baidu,\n    PaddlePaddle has been deployed into products and services with a vast number\n    of users, including ad click-through rate (CTR) prediction, large-scale image\n    classification, optical character recognition(OCR), search ranking, computer\n    virus detection, recommendation, etc. It is widely utilized in products at\n    Baidu and it has achieved a significant impact. We hope you can also explore\n    the capability of PaddlePaddle to make an impact on your product.\n\n## Installation\n\nIt is recommended to check out the\n[Docker installation guide](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/build_and_install/docker_install_en.html)\nbefore looking into the\n[build from source guide](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/build_and_install/build_from_source_en.html).\n\n## Documentation\n\nWe provide [English](http://www.paddlepaddle.org/docs/develop/documentation/en/getstarted/index_en.html) and\n[Chinese](http://www.paddlepaddle.org/docs/develop/documentation/zh/getstarted/index_cn.html) documentation.\n\n- [Deep Learning 101](http://www.paddlepaddle.org/docs/develop/book/01.fit_a_line/index.html)\n\n  You might want to start from this online interactive book that can run in a Jupyter Notebook.\n\n- [Distributed Training](http://www.paddlepaddle.org/docs/develop/documentation/en/howto/cluster/index_en.html)\n\n  You can run distributed training jobs on MPI clusters.\n\n- [Distributed Training on Kubernetes](http://www.paddlepaddle.org/docs/develop/documentation/en/howto/cluster/multi_cluster/k8s_en.html)\n\n   You can also run distributed training jobs on Kubernetes clusters.\n\n- [Python API](http://www.paddlepaddle.org/docs/develop/api/en/overview.html)\n\n   Our new API enables much shorter programs.\n\n- [How to Contribute](http://www.paddlepaddle.org/docs/develop/documentation/fluid/en/dev/contribute_to_paddle_en.html)\n\n   We appreciate your contributions!\n\n\n## Ask Questions\n\nYou are welcome to submit questions and bug reports as [Github Issues](https://github.com/PaddlePaddle/Paddle/issues).\n\n## Copyright and License\nPaddlePaddle is provided under the [Apache-2.0 license](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F8C:386840:17E5CB:5D0819:6AB920E5"},"text_sha256":"7d90070843fb8a856cf1a4bd0354135926b656ea94a71faf1365d41d608156ba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3351","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:17E3EBA:1C02C54:6AB92875"},"commit":{"sha":"529fbc7139f44da6c0046c5aa99959d1aa43c9d4","url":"https://github.com/PaddlePaddle/Paddle/commit/529fbc7139f44da6c0046c5aa99959d1aa43c9d4","date":"2026-06-30T03:03:14Z","author_date":"2026-06-30T03:03:14Z","committer_date":"2026-06-30T03:03:14Z","tree_sha":"d3264e679233d29cc02001e359309b0e2b6a7913","message_first_line":"[PIR] Fix compatible dims check (#79346)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3350","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17B6A5B:1BD582D:6AB92876"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5547,"blob_sha":"81554b29bcf7f335ff3e815083b89b9426baf48f","priority":0},{"path":".agents/skills/paddle-cross-ecosystem-custom-op/references/compat-gap-policy.md","size":3695,"blob_sha":"1f1dcb2cc8d25ccda089b1e5ac9f32a48eaf4e32","priority":1},{"path":"SECURITY_cn.md","size":4257,"blob_sha":"8e687e324e865dd2ba5676c992c0faf8d5b1d1c7","priority":1},{"path":"SECURITY_ja.md","size":6712,"blob_sha":"61611c19060e22426b4c33337c23f4ccbee6e114","priority":1},{"path":"SECURITY.md","size":5735,"blob_sha":"4a4f438933ab52ca6df54e9346fa407a48a50a89","priority":1}],"documents":[{"path":"README.md","size":5547,"blob_sha":"81554b29bcf7f335ff3e815083b89b9426baf48f","priority":0,"status":200,"text":"<p align=\"center\">\n<img align=\"center\" src=\"./doc/imgs/logo.png\", width=1600>\n<p>\n\n--------------------------------------------------------------------------------\n\nEnglish | [简体中文](./README_cn.md) | [日本語](./README_ja.md)\n\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://paddlepaddle.org.cn/documentation/docs/en/guides/index_en.html)\n[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://paddlepaddle.org.cn/documentation/docs/zh/guides/index_cn.html)\n[![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle.svg)](https://github.com/PaddlePaddle/Paddle/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](./LICENSE)\n![X (formerly Twitter) URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2FPaddlePaddle)\n\nWelcome to the PaddlePaddle GitHub.\n\nPaddlePaddle, as the first independent R&D deep learning platform in China, has been officially open-sourced to professional communities since 2016. It is an industrial platform with advanced technologies and rich features that cover core deep learning frameworks, basic model libraries, end-to-end development kits, tools & components as well as service platforms.\nPaddlePaddle originates from industrial practices with dedication and commitments to industrialization. It has been widely adopted by a wide range of sectors including manufacturing, agriculture, enterprise service, and so on while serving more than 23.33 million developers, 760,000 companies and generating 1,100,000 models. With such advantages, PaddlePaddle has helped an increasing number of partners commercialize AI.\n\n## Installation\n\n### Latest PaddlePaddle Release: 3.3\nOur vision is to enable deep learning for everyone via PaddlePaddle.\nPlease refer to our [release announcement](https://github.com/PaddlePaddle/Paddle/releases) to track the latest features of PaddlePaddle.\n\n### Install Latest Stable Release or Nightly Release\n\nFor detailed information about installation, please view [Quick Install](https://www.paddlepaddle.org.cn/install/quick)\n\n## **PaddlePaddle New Generation Framework 3.2**\n\n* **Unified Dynamic/Static Graphs and Automatic Parallelism**\n\n    By requiring only minimal tensor partitioning annotations based on a single-card configuration, PaddlePaddle automatically discovers the most efficient distributed parallel strategy. This significantly reduces the costs of industrial development and training, enabling developers to focus more intently on model and algorithm innovation.\n\n* **Integrated Training and Inference for Large Models**\n\n    The same framework supports both training and inference, achieving code reuse and seamless integration between these stages. This provides a unified development experience and maximum training efficiency for the entire large model workflow, offering the industry a superior development experience.\n\n* **High-Order Differentiation for Scientific Computing**\n\n    Provides capabilities such as high-order automatic differentiation, complex number operations, Fourier transforms, compilation optimization, and distributed training support. It facilitates scientific exploration in fields including mathematics, mechanics, materials science, meteorology, and biology, substantially improving the speed of solving differential equations.\n\n* **Neural Network Compiler**\n\n    Adopting an integrated framework design, it supports efficient training and flexible inference for diverse models, including generative and scientific computing models. It achieves an effective balance between computational flexibility and high performance, significantly lowering performance optimization costs.\n\n* **Heterogeneous Multi-Chip Adaptation**\n    Features a mature and complete unified adaptation solution for multiple hardware types. Through standardized interfaces, it abstracts the variations in development interfaces across different chip software stacks, realizing a pluggable architecture.\n\n## Documentation\n\nWe provide [English](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/index_en.html) and\n[Chinese](https://www.paddlepaddle.org.cn/documentation/docs/zh/guide/index_cn.html) documentation.\n\n* [Guides](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/index_en.html)\n\n  You might want to start from how to implement deep learning basics with PaddlePaddle.\n\n* [Practice](https://www.paddlepaddle.org.cn/documentation/docs/zh/tutorial/index_cn.html)\n\n  So far you have already been familiar with Fluid. And the next step should be building a more efficient model or inventing your original Operator.\n\n* [API Reference](https://www.paddlepaddle.org.cn/documentation/docs/en/api/index_en.html)\n\n   Our new API enables much shorter programs.\n\n* [How to Contribute](https://www.paddlepaddle.org.cn/documentation/docs/en/guides/08_contribution/index_en.html)\n\n   We appreciate your contributions!\n\n## Open Source Community\n\n* [Github Issues](https://github.com/PaddlePaddle/Paddle/issues): bug reports, feature requests, install issues, usage issues, etc.\n* Many of our contribution events offer varying levels of mentorship from experienced community members, please check the events in the pinned issues, and consider attending.\n* Community Blog: <https://pfcc.blog/>\n* See more details about PaddlePaddle community at [community](https://github.com/PaddlePaddle/community).\n\n## Copyright and License\n\nPaddlePaddle is provided under the [Apache-2.0 license](./LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8354:3BF56:16F516:5C179E:6AB920E7"},"text_sha256":"946dc3ccb2028edbfeadbe9d453aa41802f1fc38ef80b35a7ad1e232fa147041"},{"path":".agents/skills/paddle-cross-ecosystem-custom-op/references/compat-gap-policy.md","size":3695,"blob_sha":"1f1dcb2cc8d25ccda089b1e5ac9f32a48eaf4e32","priority":1,"status":200,"text":"# compat 缺口处理\n\ncompat gap 处理的核心目标：把问题边界讲清楚，把 workaround 收敛在最小范围，并为后续的 Paddle 修复准备最小复现。\n\n## 先做问题分类\n\n### A. Paddle compat 覆盖缺口\n\n典型特征：\n\n- 常见 `at::*` / `torch::*` / `c10::*` API 当前没有 compat 实现\n- `TORCH_LIBRARY` / `torch.ops` / proxy 行为与现有 compat 测试不一致\n- 生态库依赖的是 PyTorch 公共 API，但在 Paddle compat 下失败\n\n### B. 上游仓库依赖 PyTorch 私有行为\n\n典型特征：\n\n- 依赖 `torch._dynamo`、`torch.profiler`、`torch.library`、内部状态缓存、私有 module side effect\n- 依赖 PyTorch 当前的 import 顺序、模块级初始化、副作用或内部 handle\n\n这类问题的处理重点是边界说明和最小 shim；是否属于 Paddle bug 要根据最小复现来判断。\n\n## 处理顺序\n\n1. 先拿到最小报错点。\n2. 把失败收缩成最小复现。\n3. 明确归类为 compat 覆盖缺口还是上游私有假设。\n4. 只写最小 workaround，同时写清删除条件。\n5. 应由 Paddle 修复的问题，准备 issue；如果只是当前仓库的构建入口选择或上游私有假设，不要制造假的 Paddle issue。\n\n## 最小复现要求\n\n最小复现应尽量满足：\n\n- 单文件或极小目录结构\n- 最少依赖\n- 明确版本：Paddle commit / wheel 版本、Python、CUDA、驱动\n- 明确命令：build 命令、运行命令\n- 明确期望行为和实际报错\n\n优先级更高的形式：\n\n- 单个 `.py` 脚本\n- 极小 `setup.py + csrc/*.cc` 样例\n- 如果必须用分布式，再补一份单卡或伪最小脚本，并说明收缩边界\n\n## Paddle issue 建议模板\n\n标题建议：\n\n```text\n[Cross-Ecosystem Custom Op] <具体 API / 行为> is missing or inconsistent in Paddle compat layer\n```\n\n正文建议至少包含：\n\n- Paddle 版本 / commit\n- Python / CUDA / 驱动版本\n- 最小复现代码\n- 运行命令\n- 期望行为\n- 实际行为\n- 对照：相同代码在 PyTorch 下是否正常\n- 临时 workaround（如果有）\n\n## workaround 边界\n\nworkaround 适合在以下条件下使用：\n\n- 只包住一个具体 incompatibility 点\n- 只影响当前库的局部路径\n- 公共 API 语义保持不变\n- 代码里带 TODO，最好有 issue 编号或待跟踪说明\n\n不是所有 Paddle-specific 改动都需要 issue。比如直接使用 `paddle.utils.cpp_extension` 可能只是当前构建系统下最小的入口选择；只有当它明确绕过了 `torch.utils.cpp_extension` proxy / compat 的公共缺口时，才把它升级为 Paddle issue。\n\n一旦出现以下信号，就应该转向 issue 与边界收缩：\n\n- 为一个缺口连续改动多个核心 kernel\n- 已经开始改变库的原始语义\n- 已经依赖 Paddle 内部私有 API 才能继续\n- 相同模式在多个文件重复出现，说明问题已超出单点\n\n## TODO 写法建议\n\n推荐写法：\n\n```text\nTODO(<owner or issue>): remove this workaround after Paddle compat supports <specific API/behavior>\n```\n\nTODO 至少要说明：\n\n- workaround 在解决什么问题\n- 当前为什么需要它\n- 未来怎样删除\n\n## 什么时候应立即转向 issue\n\n出现以下情况时，应优先整理 issue MRE：\n\n- 同一调用点上，PyTorch 与 Paddle 的行为已经明确分叉\n- 问题来自 compat 公共行为\n- workaround 开始在多个文件扩散\n- 后续推进已经需要依赖 Paddle 内部私有接口\n\n## 一个总判断标准\n\n如果当前方案已经开始系统性改写整个 PyTorch 生态库的 API 形状，说明补丁边界需要回收。兼容方案应尽量保留上游形状，让 compat 层承担兼容职责，只在缺口位置放置最小桥接。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"61B2:18233:173A2A:5C5B69:6AB920E8"},"text_sha256":"9fee11e185460388b563e12da996002feb5e329b9bec38bbb4df05bb5b0fd359"},{"path":"SECURITY_cn.md","size":4257,"blob_sha":"8e687e324e865dd2ba5676c992c0faf8d5b1d1c7","priority":1,"status":200,"text":"# 安全使用飞桨\n\n\n\n本文将对飞桨模型及代码安全进行介绍，并介绍如何向飞桨提报漏洞。\n\n## 飞桨模型安全\n\n飞桨关注模型的安全性和隐私性。其中包括当模型被用于安全攸关场景时，如何避免模型在干扰下输出错误的决策结果，以及如何避免从模型本身、模型梯度或模型推理结果中泄露数据和隐私信息。\n\n飞桨的安全和隐私套件[PaddleSleeve](https://github.com/PaddlePaddle/PaddleSleeve)提供了一系列工具，可帮助模型开发者及使用者在模型的开发或部署阶段，系统性地评估并提升模型的安全性和隐私性。这些工具包括对抗样本评估测试、拟自然环境鲁棒性评估测试、模型逆向评估测试、成员推断评估测试、样本去噪、对抗训练、隐私增强优化器等。\n\n### 运行非信任模型\n\n请永远在沙箱中加载和运行非信任模型并了解其可能造成的影响。\n有多种方式可能导致模型不受信任。飞桨的功能足以在加载不受信任的模型时对系统造成影响，如：`paddle.load` 使用了[pickle](https://docs.python.org/3/library/pickle.html)，这会导致恶意模型执行任意命令。所以在使用非信任模型时需要仔细地审计模型，并在沙箱中运行来确保安全。\n\n## 飞桨代码安全\n\n飞桨团队一向非常重视代码安全，但鉴于飞桨框架的实现非常复杂，并且依赖了多个第三方开源库，其中仍可能会存在未被发现的问题。因此，我们希望有更多安全研究人员、飞桨开发者能参与到飞桨代码安全保障项目中来，我们鼓励向飞桨负责任的披露(Responsible Disclosure)安全问题，也鼓励向飞桨贡献代码完善动静态漏洞挖掘工具，让飞桨变得更安全。\n\n### 安全工具\n\n飞桨安全团队对于飞桨框架自身的安全高度重视，为了尽快地发现和修复安全问题，我们内部在持续地进行代码安全审计和研发自动化漏洞挖掘工具。我们将一些工具和方法开源给社区，希望能抛砖引玉，大家一起来贡献提高飞桨的安全性和鲁棒性。工具开源见[CodeSecurity](https://github.com/PaddlePaddle/PaddleSleeve/tree/main/CodeSecurity)。该开源工具包含两部分内容，分别从动态（模糊测试）和静态（CodeQL）两个角度对飞桨代码进行安全审计和漏洞挖掘。通过参照和添加新的测试模块，可以帮助覆盖更多飞桨代码模块，发现更多的代码安全问题。\n\n### 报告安全问题\n\n我们鼓励向飞桨负责任地披露安全问题，请将所发现的安全问题通过BSRC平台进行漏洞提交（平台链接：https://bsrc.baidu.com/v2/#/home?language=zh）\n\n在安全团队收到漏洞报告后将会在平台上及时与您沟通并反馈问题修复进度。\n\n为了更好地复现和认定问题情况，请在漏洞提交中：\n\n- 详细描述漏洞细节，如何复现，并尽量附上PoC。\n- 描述攻击场景，介绍攻击者可能由此问题所能达到的效果。\n- 该问题是否已公开并描述情况。\n- 署名您的姓名和从属关系。\n\n我们会将漏洞修复情况注明在飞桨的发布当中，并在致谢公告中发布漏洞情况和提报人（如果您选择不公开署名将不会发布提报人信息）。\n\n### 安全问题认定说明\n\n飞桨在计算图的过程中，由于模型可以执行任何计算，操作文件，进行网络通信等功能，可能造成内存耗尽，死锁等情况发生，这将导致飞桨产生一些非预期的行为。我们认为只有当这些行为超出了所涉及的操作意图时才算作是安全问题。\n\n飞桨框架代码中对于一些非预期的参数和行为会进行检查，Python代码中以抛出异常为形式，C++代码中以返回错误状态为形式。这些情况下，飞桨代码的退出是干净的，但仍可能会因此造成拒绝服务，然而由于飞桨的处理是预期且正确的，所以造成这些情况并不算作是安全问题。\n\n如果输入非预期的参数后，对飞桨代码造成了内存破坏，或者非干净退出，这类行为被认定为存在安全问题。\n\n### [安全公告](./security/README_cn.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B702:3AC5A:17825F:5CA47D:6AB920E6"},"text_sha256":"ae46728e21e23654105ed0ccb126654fa92811c135f50302a41d15cbe9d9dc87"},{"path":"SECURITY_ja.md","size":6712,"blob_sha":"61611c19060e22426b4c33337c23f4ccbee6e114","priority":1,"status":200,"text":"# PaddlePaddle を安全に使用する\n\nこのドキュメントでは、PaddlePaddle のモデルセキュリティとコードセキュリティについて説明します。また、PaddlePaddle の脆弱性を報告する方法のガイドラインも提供します。\n\n## PaddlePaddle モデルのセキュリティ\n\nPaddlePaddle はモデルのセキュリティとプライバシーを重要視しています。これには、モデルがセキュリティ関連やセーフティクリティカルなシナリオで使用される際に、干渉下で誤った判断結果を出力することを防ぐ方法や、モデル自身、モデルの勾配、モデルの推論結果からデータやプライバシー情報が漏れることを避ける方法が含まれます。\n\n\n\n[PaddleSleeve](https://github.com/PaddlePaddle/PaddleSleeve) は、一連のセキュリティとプライバシーのツールを提供します。これは、モデルの開発者とユーザが、開発と展開の両方の段階で、モデルのセキュリティとプライバシーを体系的に評価し、改善するのに役立ちます。\n\n\n\nこれらのツールには、敵対的事例評価テスト、擬似自然環境頑健性評価テスト、モデル反転評価テスト、メンバー推論評価テスト、サンプルノイズ除去、敵対的トレーニング、プライバシー強化オプティマイザなどが含まれます。\n\n### 信頼できないモデルの実行\n\n信頼されていないモデルを常にサンドボックスの中にロードして実行し、セキュリティへの影響を必ず知っておいてください。\nモデルが信頼されなくなる方法はいくつかあります。PaddlePaddle はシステムに影響を与えるのに十分な機能を持っています。(例えば、`paddle.load` は暗黙的に [pickle](https://docs.python.org/3/library/pickle.html) を使用します。これは、不正なモデルが任意のコードを実行する原因となるかもしれません)。そのため、信頼できないモデルを使用する場合は、慎重に監査し、サンドボックス内で PaddlePaddle を実行することを推奨します。\n\n## PaddlePaddle コードセキュリティ\n\nPaddlePaddle は常にコードセキュリティに真剣に取り組んでいます。しかし、フレームワークの複雑さと他のサードパーティのオープンソースライブラリへの依存のため、まだ発見されていないセキュリティ問題があるかもしれません。そのため、より多くのセキュリティ研究者と PaddlePaddle 開発者がコードセキュリティプログラムに参加することを望みます。PaddlePaddle をより安全なものにするために、セキュリティ問題の責任ある開示と、脆弱性発見ツールの改善のためのコード貢献を奨励します。\n\n### コードセキュリティツール\n\nPaddlePaddle セキュリティチームはフレームワークのセキュリティを非常に重視しています。できるだけ早くセキュリティ問題を発見し修正するために、我々は継続的にコードセキュリティ監査を行い、自動脆弱性発見ツールを開発しています。我々はすでにその一部をコミュニティにオープンソース化しており、これにより人々がコントリビュートし、PaddlePaddle の安全性と堅牢性が向上することを期待しています。[このツール](https://github.com/PaddlePaddle/PaddleSleeve/tree/main/CodeSecurity)には 2 つの部分があります。動的な部分には、いくつかのopファザーサンプルが含まれています。そして静的な部分には CodeQL のサンプルが含まれています。これらは両方とも、PaddlePaddle フレームワークのコードベースの脆弱性を発見することを目的としています。サンプルを参照することで、セキュリティ研究者は、より多くの PaddlePaddle モジュールをテストし、より多くのコードセキュリティ問題を発見するために、独自のファザーや QL を書くことができます。\n\n### 脆弱性の報告\n\n私たちは、PaddlePaddle にセキュリティ問題を責任を持って開示することを推奨します。発見されたセキュリティ問題をBSRCプラットフォームを介して脆弱性コミットしてください（プラットフォームリンク：https://bsrc.baidu.com/v2/#/home?language=en）\n\nセキュリティチームは脆弱性情報を受け取ったら、すぐに連絡します。セキュリティチームは、問題の修正についてできるだけお知らせします。\n\n次の情報を脆弱性レポートに添付して、問題の再現と識別を行います：\n\n- 再現方法を含む脆弱性の詳細。PoC を添付してください。\n- 攻撃シナリオと、攻撃者がこの問題で達成できるかもしれないこと。\n- この脆弱性が公表されているかどうか。公表されている場合は、その詳細を添付してください。\n- あなたの名前と所属。\n\nバグフィックスは PaddlePaddle のリリースに記載し、脆弱性の詳細と報告者をセキュリティ勧告で公表します（匿名を選択した場合、あなたの名前は公表されません）。\n\n### 脆弱性とは？\n\nPaddlePaddle の計算グラフの過程で、モデルはファイルの読み書き、ネットワークとの通信などを含む任意の計算を行うことができます。これはメモリ枯渇やデッドロックなどを引き起こす可能性があり、PaddlePaddle の予期せぬ動作につながります。私たちは、これらの振る舞いが、関係する操作の意図から外れている場合にのみ、セキュリティの脆弱性とみなします。\n\n\n\nいくつかの予期しないパラメータや動作は、Pythonでは例外を投げることで、C++ではエラー状態を返すことで、PaddlePaddle でチェックされています。このような場合でもサービス拒否の可能性はありますが、PaddlePaddle の終了はクリーンです。PaddlePaddle のエラー処理は予期されたものであり正しいので、これらのケースはセキュリティ脆弱性ではありません。\n\n\n\n悪意のある入力がメモリ破壊やクリーンでない終了の引き金となる場合、そのようなバグはセキュリティ上の問題とみなされます。\n\n\n\n[セキュリティ勧告](./security/README_ja.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77C4:3C4A0:17562F:5C78B3:6AB920E8"},"text_sha256":"0eaef2cba061d4e405feadd79c9cf004169531fe3632ec346d27a50efbc045fa"},{"path":"SECURITY.md","size":5735,"blob_sha":"4a4f438933ab52ca6df54e9346fa407a48a50a89","priority":1,"status":200,"text":"# Using PaddlePaddle Securely\n\nThis document describes model security and code security in PaddlePaddle. It also provides guidelines on how to report vulnerabilities in PaddlePaddle.\n\n## PaddlePaddle Model Security\n\nPaddlePaddle attaches great importance to security and privacy of model. This includes how to prevent the model from outputting wrong decision results under the interference when it is used in security-related and safety-critical scenarios, and how to avoid leaking data and privacy information from the model itself, the model gradient or the model inference results.\n\n\n\n[PaddleSleeve](https://github.com/PaddlePaddle/PaddleSleeve) provides a series of security and privacy tools, which can help model developers and users systematically evaluate and improve the model security and privacy in both development and deployment stages.\n\n\n\nThese tools include adversarial example evaluation test, pseudo-natural environment robustness evaluation test, model reversing evaluation test, member inference evaluation test, sample denoising, adversarial training, privacy enhancement optimizer, etc.\n\n### Running untrusted models\n\nAlways load and execute untrusted models inside a sandbox and be sure to know the security impacts.\nThere are several ways in which a model could become untrusted. PaddlePaddle has enough features to impact on the system. (e.g. `paddle.load` uses [pickle](https://docs.python.org/3/library/pickle.html) implicitly, which may cause malformed models to achieve arbitrary code execution). So we recommend when using the untrusted models, you need to carefully audit it and run PaddlePaddle inside a sandbox.\n\n### Using distributed features\nPaddlePaddle offers distributed computing capabilities through the paddle.distributed package. These distributed features are meant for secure, trusted environments only, not for use on public or untrusted networks.\n\nFor efficiency, PaddlePaddle Distributed (e.g. RPC) does not use encryption or authentication. Messages are sent in plain text, and connections from any source are accepted. This means if you run a PaddlePaddle Distributed program on your network, anyone who can access that network could send tasks to PaddlePaddle, and those tasks will be executed without any security checks, using the same permissions as the PaddlePaddle process.\n\n## PaddlePaddle Code Security\n\nPaddlePaddle always take code security seriously. However, due to the complexity of the framework and its dependence on other thirdparty open source libraries, there may still be some security issues undetected. Therefore, we hope that more security researchers and PaddlePaddle developers can participate in the code security program. We encourage responsible disclosure of security issues, as well as contributing code to improve our vulnerability finding tools to make PaddlePaddle safer.\n\n### Code security tools\n\nPaddlePaddle security team attaches great importance to the security of the framework. In order to find and fix security issues as soon as possible, we are continuously conducting code security audit and developing automatic vulnerability discovery tools. We have already open sourced some of them to the community, hoping this could encourage people to contribute and improve the safety and robustness of PaddlePaddle. [This tool](https://github.com/PaddlePaddle/PaddleSleeve/tree/main/CodeSecurity) includes two parts. The dynamic part includes some op fuzzer samples. And the static part includes some CodeQL samples. Both of them are aim to find vulnerabilities in PaddlePaddle framework codebase. By referring the samples, security researchers can write their own fuzzers or QLs to test more PaddlePaddle modules, and find more code security issues.\n\n### Reporting vulnerabilities\n\nWe encourage responsible disclosure of security issues to PaddlePaddle and Please submit the discovered security issues through the BSRC platform (platform link: https://bsrc.baidu.com/v2/#/home?language=en ）\n\nAfter the security team receives your message, they will communicate with you in time. The security team will work to keep you informed of an issue fix.\n\nIn order to reproduce and identify the issue, To reproduce and identify the issue, please include the following information in the vulnerability report you submit::\n\n- The details of the vulnerability including how to reproduce it. Try to attach a PoC.\n- The attack scenario and what an attacker might be able to achieve with this issue.\n- Whether this vulnerability has been made public. If it is, please attach details.\n- Your name and affiliation.\n\nWe will indicate the bug fix in the release of PaddlePaddle, and publish the vulnerability detail and the reporter in the security advisories (Your name will not be published if you choose to remain anonymous).\n\n### What is a vulnerability?\n\nIn the process of computation graphs in PaddlePaddle, models can perform arbitrary computations , including reading and writing files, communicating with the network, etc. It may cause memory exhaustion, deadlock, etc., which will lead to unexpected behavior of PaddlePaddle. We consider these behavior to be security vulnerabilities only if they are out of the intention of the operation involved.\n\n\n\nSome unexpected parameters and behaviors have been checked in PaddlePaddle by throwing exceptions in Python or return error states in C++. In these cases, denial of service is still possible, but the exit of the PaddlePaddle is clean. Since the error handling of PaddlePaddle is expected and correct, these cases are not security vulnerabilities.\n\n\n\nIf malicious input can trigger memory corruption or non-clean exit, such bug is considered a security problem.\n\n\n\n[security advisories](./security/README.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F500:35999:172238:5C457A:6AB920E8"},"text_sha256":"5edafb3dbbdb13770b32a5033c66ad2e6c14270c52eaf3c98cc7ddea55bc87c8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=529fbc7139f44da6c0046c5aa99959d1aa43c9d4; file=SECURITY.md; text=## PaddlePaddle Model Security PaddlePaddle attaches great importance to security and privacy of model. This includes how to prevent the model from outputting wrong decision results under the interference when it is used in security-related and safety-critical scenarios, and how to avoid leaking data and privacy information from the model itself, the model gradient or the model inference results. These tools include adversarial example evaluation test, pseudo-natural environment robustness evaluation test, model reversing evaluation test, member inference evaluation test, sample denoising, adversarial training, privacy enhancement optimizer,","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=529fbc7139f44da6c0046c5aa99959d1aa43c9d4; file=SECURITY.md; text=## PaddlePaddle Model Security PaddlePaddle attaches great importance to security and privacy of model. This includes how to prevent the model from outputting wrong decision results under the interference when it is used in security-related and safety-critical scenarios, and how to avoid leaking data and privacy information from the model itself, the model gradient or the model inference results. These tools include adversarial example evaluation test, pseudo-natural environment robustness evaluation test, model reversing evaluation test, member inference evaluation test, sample denoising, adversarial training, privacy enhancement optimizer,"}}}}
{"repository":"pyg-team/pytorch_geometric","input_row":{"repository":"pyg-team/pytorch_geometric","url":"https://github.com/pyg-team/pytorch_geometric","name":"pytorch_geometric","owner":"pyg-team","description":"Graph Neural Network Library for PyTorch","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":24098,"issues":3754,"created_at":"2017-10-06T16:03:03Z","updated_at":"2026-09-26T17:54:59Z","first_commit_at":"2017-10-06T16:03:56Z","last_commit_at":"2026-09-01T23:22:41Z","activity_months":106.84,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:17.650Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pyg-team/pytorch_geometric","visibility":"public","created_at":"2017-10-06T16:03:03Z","updated_at":"2026-09-26T17:54:59Z","private":false,"fork":false,"archived":false,"stargazers_count":24098,"open_issues_count":1349,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3349","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:17E5940:1C04778:6AB92879"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3348","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0869:1DB627:1854163:1C73245:6AB9287A"},"commit":{"sha":"7f3877c097240f0eb1caa51c1acf1bf8e6366629","url":"https://github.com/pyg-team/pytorch_geometric/commit/7f3877c097240f0eb1caa51c1acf1bf8e6366629","date":"2018-05-24T18:36:19Z","author_date":"2018-05-24T18:36:19Z","committer_date":"2018-05-24T18:36:19Z","tree_sha":"ccf53fd8158f3fe2f053da37abdfa204de6fd089","message_first_line":"rename"},"tree_request_status":200,"tree_rate":{"github_remaining":"3347","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0828:3C4024:17E54C6:1C042C7:6AB9287A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1837,"blob_sha":"9515ea184140e72bb964d261d616c1626df00e8a","priority":0}],"documents":[{"path":"README.md","size":1837,"blob_sha":"9515ea184140e72bb964d261d616c1626df00e8a","priority":0,"status":200,"text":"[build-image]: https://travis-ci.org/rusty1s/pytorch_geometric.svg?branch=master\n[build-url]: https://travis-ci.org/rusty1s/pytorch_geometric\n[coverage-image]: https://codecov.io/gh/rusty1s/pytorch_geometric/branch/master/graph/badge.svg\n[coverage-url]: https://codecov.io/github/rusty1s/pytorch_geometric?branch=master\n\n<p align=\"center\">\n  <img width=\"80%\" src=\"https://raw.githubusercontent.com/rusty1s/pytorch_geometric/master/docs/source/_static/img/logo.svg?sanitize=true\" />\n<\/p>\n\n--------------------------------------------------------------------------------\n\n[![Build Status][build-image]][build-url]\n[![Code Coverage][coverage-image]][coverage-url]\n\n**[Documentation](http://rusty1s.github.io/pytorch_geometric)**\n\nPyTorch Geometric is a Geometric Deep Learning extension library for PyTorch.\nIn addition, PyTorch Geometric contains the spline-based convolutional layer from our paper:\n\nMatthias Fey, Jan Eric Lenssen, Frank Weichert, Heinrich Müller: [SplineCNN: Fast Geometric Deep Learning with Continuous B-Spline Kernels](https://arxiv.org/abs/1711.08920) (CVPR 2018)\n\n## Installation\n\nIf cuda is available, check that `nvcc` is accessible from your terminal, e.g. by typing `nvcc --version`.\nIf not, add cuda (`/usr/local/cuda/bin`) to your `$PATH`.\nThen run:\n\n```\npip install -r requirements.txt\npython setup.py install\n```\n\n## Running examples\n\n```\ncd examples\npython cora.py\n```\n\n## Cite\n\nPlease cite our paper if you use this code in your own work:\n\n```\n@inproceedings{Fey/etal/2018,\n  title={{SplineCNN}: Fast Geometric Deep Learning with Continuous {B}-Spline Kernels},\n  author={Fey, Matthias and Lenssen, Jan Eric and Weichert, Frank and M{\\\"u}ller, Heinrich},\n  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}\n  year={2018},\n}\n```\n\n## Running tests\n\n```\npython setup.py test\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2AAC:09ED:DFAD5:3DD6F3:6AB920E6"},"text_sha256":"93027e9d3d483e642a964719890b656f24b12875bcfd6ef3d34fd308e6aca154"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3346","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0847:767EB:17D8946:1BF7C60:6AB9287B"},"commit":{"sha":"1f0661ce88272d03f654b6bb0a2a3cb76b3e6aff","url":"https://github.com/pyg-team/pytorch_geometric/commit/1f0661ce88272d03f654b6bb0a2a3cb76b3e6aff","date":"2026-06-19T00:13:08Z","author_date":"2026-06-19T00:13:08Z","committer_date":"2026-06-19T00:13:08Z","tree_sha":"74a5bf18012962ab9de82801ae9929d584eae66e","message_first_line":"Bump actions/checkout from 6 to 7 (#10735)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3345","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084C:156040:17B6DD8:1BD51A7:6AB9287B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":60641,"blob_sha":"83b0afb140ce86a08ff8622dc15ac367e738daec","priority":0}],"documents":[{"path":"README.md","size":60641,"blob_sha":"83b0afb140ce86a08ff8622dc15ac367e738daec","priority":0,"status":200,"text":"<p align=\"center\">\n  <img height=\"150\" src=\"https://raw.githubusercontent.com/pyg-team/pyg_sphinx_theme/master/pyg_sphinx_theme/static/img/pyg_logo_text.svg?sanitize=true\" />\n<\/p>\n\n______________________________________________________________________\n\n<div align=\"center\">\n\n[![PyPI Version][pypi-image]][pypi-url]\n[![PyPI Download][pypi-download-image]][pypi-download-url]\n[![Slack][slack-image]][slack-url]\n[![Contributing][contributing-image]][contributing-url]\n\n**[Documentation](https://pytorch-geometric.readthedocs.io)** |\n**[PyG 1.0 Paper](https://arxiv.org/abs/1903.02428)** |\n**[PyG 2.0 Paper](https://arxiv.org/abs/2507.16991)** |\n**[Colab Notebooks](https://pytorch-geometric.readthedocs.io/en/latest/get_started/colabs.html)** |\n**[External Resources](https://pytorch-geometric.readthedocs.io/en/latest/external/resources.html)** |\n**[OGB Examples](https://github.com/snap-stanford/ogb/tree/master/examples)**\n\n<\/div>\n\n**PyG** *(PyTorch Geometric)* is a library built upon [PyTorch](https://pytorch.org/) to easily write and train Graph Neural Networks (GNNs) for a wide range of applications related to structured data.\n\nIt consists of various methods for deep learning on graphs and other irregular structures, also known as *[geometric deep learning](http://geometricdeeplearning.com/)*, from a variety of published papers.\nIn addition, it consists of easy-to-use mini-batch loaders for operating on many small and single giant graphs, [multi GPU-support](https://github.com/pyg-team/pytorch_geometric/tree/master/examples/multi_gpu), [`torch.compile`](https://pytorch-geometric.readthedocs.io/en/latest/advanced/compile.html) support, [`DataPipe`](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/datapipe.py) support, a large number of common benchmark datasets (based on simple interfaces to create your own), and helpful transforms, both for learning on arbitrary graphs as well as on 3D meshes or point clouds.\n\n**[Click here to join our Slack community!][slack-url]**\n\n<p align=\"center\">\n  <a href=\"https://medium.com/stanford-cs224w\"><img style=\"max-width: 941px\" src=\"https://data.pyg.org/img/cs224w_tutorials.png\" /><\/a>\n<\/p>\n\n______________________________________________________________________\n\n- [Library Highlights](#library-highlights)\n- [Quick Tour for New Users](#quick-tour-for-new-users)\n- [Architecture Overview](#architecture-overview)\n- [Implemented GNN Models](#implemented-gnn-models)\n- [Installation](#installation)\n\n## Library Highlights\n\nWhether you are a machine learning researcher or first-time user of machine learning toolkits, here are some reasons to try out PyG for machine learning on graph-structured data.\n\n- **Easy-to-use and unified API**:\n  All it takes is 10-20 lines of code to get started with training a GNN model (see the next section for a [quick tour](#quick-tour-for-new-users)).\n  PyG is *PyTorch-on-the-rocks*: It utilizes a tensor-centric API and keeps design principles close to vanilla PyTorch.\n  If you are already familiar with PyTorch, utilizing PyG is straightforward.\n- **Comprehensive and well-maintained GNN models**:\n  Most of the state-of-the-art Graph Neural Network architectures have been implemented by library developers or authors of research papers and are ready to be applied.\n- **Great flexibility**:\n  Existing PyG models can easily be extended for conducting your own research with GNNs.\n  Making modifications to existing models or creating new architectures is simple, thanks to its easy-to-use message passing API, and a variety of operators and utility functions.\n- **Large-scale real-world GNN models**:\n  We focus on the need of GNN applications in challenging real-world scenarios, and support learning on diverse types of graphs, including but not limited to: scalable GNNs for graphs with millions of nodes; dynamic GNNs for node predictions over time; heterogeneous GNNs with multiple node types and edge types.\n\n## Quick Tour for New Users\n\nIn this quick tour, we highlight the ease of creating and training a GNN model with only a few lines of code.\n\n### Train your own GNN model\n\nIn the first glimpse of PyG, we implement the training of a GNN for classifying papers in a citation graph.\nFor this, we load the [Cora](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.datasets.Planetoid.html) dataset, and create a simple 2-layer GCN model using the pre-defined [`GCNConv`](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GCNConv.html):\n\n```python\nimport torch\nfrom torch import Tensor\nfrom torch_geometric.nn import GCNConv\nfrom torch_geometric.datasets import Planetoid\n\ndataset = Planetoid(root='.', name='Cora')\n\nclass GCN(torch.nn.Module):\n    def __init__(self, in_channels, hidden_channels, out_channels):\n        super().__init__()\n        self.conv1 = GCNConv(in_channels, hidden_channels)\n        self.conv2 = GCNConv(hidden_channels, out_channels)\n\n    def forward(self, x: Tensor, edge_index: Tensor) -> Tensor:\n        # x: Node feature matrix of shape [num_nodes, in_channels]\n        # edge_index: Graph connectivity matrix of shape [2, num_edges]\n        x = self.conv1(x, edge_index).relu()\n        x = self.conv2(x, edge_index)\n        return x\n\nmodel = GCN(dataset.num_features, 16, dataset.num_classes)\n```\n\n<details>\n<summary>We can now optimize the model in a training loop, similar to the <a href=\"https://pytorch.org/tutorials/beginner/basics/optimization_tutorial.html#full-implementation\">standard PyTorch training procedure<\/a>.<\/summary>\n\n```python\nimport torch.nn.functional as F\n\ndata = dataset[0]\noptimizer = torch.optim.Adam(model.parameters(), lr=0.01)\n\nfor epoch in range(200):\n    pred = model(data.x, data.edge_index)\n    loss = F.cross_entropy(pred[data.train_mask], data.y[data.train_mask])\n\n    # Backpropagation\n    optimizer.zero_grad()\n    loss.backward()\n    optimizer.step()\n```\n\n<\/details>\n\nMore information about evaluating final model performance can be found in the corresponding [example](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn.py).\n\n### Create your own GNN layer\n\nIn addition to the easy application of existing GNNs, PyG makes it simple to implement custom Graph Neural Networks (see [here](https://pytorch-geometric.readthedocs.io/en/latest/tutorial/create_gnn.html) for the accompanying tutorial).\nFor example, this is all it takes to implement the [edge convolutional layer](https://arxiv.org/abs/1801.07829) from Wang *et al.*:\n\n$$x_i^{\\\\prime} ~ = ~ \\\\max\\_{j \\\\in \\\\mathcal{N}(i)} ~ \\\\textrm{MLP}\\_{\\\\theta} \\\\left( [ ~ x_i, ~ x_j - x_i ~ ] \\\\right)$$\n\n```python\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Sequential, Linear, ReLU\nfrom torch_geometric.nn import MessagePassing\n\nclass EdgeConv(MessagePassing):\n    def __init__(self, in_channels, out_channels):\n        super().__init__(aggr=\"max\")  # \"Max\" aggregation.\n        self.mlp = Sequential(\n            Linear(2 * in_channels, out_channels),\n            ReLU(),\n            Linear(out_channels, out_channels),\n        )\n\n    def forward(self, x: Tensor, edge_index: Tensor) -> Tensor:\n        # x: Node feature matrix of shape [num_nodes, in_channels]\n        # edge_index: Graph connectivity matrix of shape [2, num_edges]\n        return self.propagate(edge_index, x=x)  # shape [num_nodes, out_channels]\n\n    def message(self, x_j: Tensor, x_i: Tensor) -> Tensor:\n        # x_j: Source node features of shape [num_edges, in_channels]\n        # x_i: Target node features of shape [num_edges, in_channels]\n        edge_features = torch.cat([x_i, x_j - x_i], dim=-1)\n        return self.mlp(edge_features)  # shape [num_edges, out_channels]\n```\n\n## Architecture Overview\n\nPyG provides a multi-layer framework that enables users to build Graph Neural Network solutions on both low and high levels.\nIt comprises of the following components:\n\n- The PyG **engine** utilizes the powerful PyTorch deep learning framework with full [`torch.compile`](https://pytorch-geometric.readthedocs.io/en/latest/advanced/compile.html) and [TorchScript](https://pytorch-geometric.readthedocs.io/en/latest/advanced/jit.html) support, as well as additions of efficient CPU/CUDA libraries for operating on sparse data, *e.g.*, [`pyg-lib`](https://github.com/pyg-team/pyg-lib).\n- The PyG **storage** handles data processing, transformation and loading pipelines. It is capable of handling and processing large-scale graph datasets, and provides effective solutions for heterogeneous graphs. It further provides a variety of sampling solutions, which enable training of GNNs on large-scale graphs.\n- The PyG **operators** bundle essential functionalities for implementing Graph Neural Networks. PyG supports important GNN building blocks that can be combined and applied to various parts of a GNN model, ensuring rich flexibility of GNN design.\n- Finally, PyG provides an abundant set of GNN **models**, and examples that showcase GNN models on standard graph benchmarks. Thanks to its flexibility, users can easily build and modify custom GNN models to fit their specific needs.\n\n<p align=\"center\">\n  <img width=\"100%\" src=\"https://raw.githubusercontent.com/pyg-team/pytorch_geometric/master/docs/source/_figures/architecture.svg?sanitize=true\" />\n<\/p>\n\n## Implemented GNN Models\n\nWe list currently supported PyG models, layers and operators according to category:\n\n**GNN layers:**\nAll Graph Neural Network layers are implemented via the **[`nn.MessagePassing`](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.MessagePassing.html)** interface.\nA GNN layer specifies how to perform message passing, *i.e.* by designing different message, aggregation and update functions as defined [here](https://pytorch-geometric.readthedocs.io/en/latest/tutorial/create_gnn.html).\nThese GNN layers can be stacked together to create Graph Neural Network models.\n\n- **[GCNConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GCNConv.html)** from Kipf and Welling: [Semi-Supervised Classification with Graph Convolutional Networks](https://arxiv.org/abs/1609.02907) (ICLR 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn.py)\\]\n- **[ChebConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.ChebConv.html)** from Defferrard *et al.*: [Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering](https://arxiv.org/abs/1606.09375) (NIPS 2016) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn.py#L36-L37)\\]\n- **[GATConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GATConv.html)** from Veličković *et al.*: [Graph Attention Networks](https://arxiv.org/abs/1710.10903) (ICLR 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gat.py)\\]\n\n<details>\n<summary><b>Expand to see all implemented GNN layers...<\/b><\/summary>\n\n- **[GCN2Conv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GCN2Conv.html)** from Chen *et al.*: [Simple and Deep Graph Convolutional Networks](https://arxiv.org/abs/2007.02133) (ICML 2020) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn2_cora.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn2_ppi.py)\\]\n- **[SplineConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SplineConv.html)** from Fey *et al.*: [SplineCNN: Fast Geometric Deep Learning with Continuous B-Spline Kernels](https://arxiv.org/abs/1711.08920) (CVPR 2018) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/cora.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/faust.py)\\]\n- **[NNConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.NNConv.html)** from Gilmer *et al.*: [Neural Message Passing for Quantum Chemistry](https://arxiv.org/abs/1704.01212) (ICML 2017) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/qm9_nn_conv.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/mnist_nn_conv.py)\\]\n- **[CGConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.CGConv.html)** from Xie and Grossman: [Crystal Graph Convolutional Neural Networks for an Accurate and Interpretable Prediction of Material Properties](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.145301) (Physical Review Letters 120, 2018)\n- **[ECConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.ECConv.html)** from Simonovsky and Komodakis: [Edge-Conditioned Convolution on Graphs](https://arxiv.org/abs/1704.02901) (CVPR 2017)\n- **[EGConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.EGConv.html)** from Tailor *et al.*: [Adaptive Filters and Aggregator Fusion for Efficient Graph Convolutions](https://arxiv.org/abs/2104.01481) (GNNSys 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/egc.py)\\]\n- **[GATv2Conv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GATv2Conv.html)** from Brody *et al.*: [How Attentive are Graph Attention Networks?](https://arxiv.org/abs/2105.14491) (ICLR 2022)\n- **[TransformerConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.TransformerConv.html)** from Shi *et al.*: [Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classification](https://arxiv.org/abs/2009.03509) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/unimp_arxiv.py)\\]\n- **[SAGEConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SAGEConv.html)** from Hamilton *et al.*: [Inductive Representation Learning on Large Graphs](https://arxiv.org/abs/1706.02216) (NIPS 2017) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/reddit.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/ogbn_train.py), [**Example3**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/graph_sage_unsup.py), [**Example4**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/graph_sage_unsup_ppi.py)\\]\n- **[GraphConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GraphConv.html)** from, *e.g.*, Morris *et al.*: [Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks](https://arxiv.org/abs/1810.02244) (AAAI 2019)\n- **[GatedGraphConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GatedGraphConv.html)** from Li *et al.*: [Gated Graph Sequence Neural Networks](https://arxiv.org/abs/1511.05493) (ICLR 2016)\n- **[ResGatedGraphConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.ResGatedGraphConv.html)** from Bresson and Laurent: [Residual Gated Graph ConvNets](https://arxiv.org/abs/1711.07553) (CoRR 2017)\n- **[GINConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GINConv.html)** from Xu *et al.*: [How Powerful are Graph Neural Networks?](https://arxiv.org/abs/1810.00826) (ICLR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/mutag_gin.py)\\]\n- **[GINEConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GINEConv.html)** from Hu *et al.*: [Strategies for Pre-training Graph Neural Networks](https://arxiv.org/abs/1905.12265) (ICLR 2020)\n- **[ARMAConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.ARMAConv.html)** from Bianchi *et al.*: [Graph Neural Networks with Convolutional ARMA Filters](https://arxiv.org/abs/1901.01343) (CoRR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/arma.py)\\]\n- **[SGConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SGConv.html)** from Wu *et al.*: [Simplifying Graph Convolutional Networks](https://arxiv.org/abs/1902.07153) (CoRR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/sgc.py)\\]\n- **[APPNP](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.APPNP.html)** from Klicpera *et al.*: [Predict then Propagate: Graph Neural Networks meet Personalized PageRank](https://arxiv.org/abs/1810.05997) (ICLR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/citation/appnp.py)\\]\n- **[MFConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.MFConv.html)** from Duvenaud *et al.*: [Convolutional Networks on Graphs for Learning Molecular Fingerprints](https://arxiv.org/abs/1509.09292) (NIPS 2015)\n- **[AGNNConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.AGNNConv.html)** from Thekumparampil *et al.*: [Attention-based Graph Neural Network for Semi-Supervised Learning](https://arxiv.org/abs/1803.03735) (CoRR 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/agnn.py)\\]\n- **[TAGConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.TAGConv.html)** from Du *et al.*: [Topology Adaptive Graph Convolutional Networks](https://arxiv.org/abs/1710.10370) (CoRR 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/tagcn.py)\\]\n- **[PNAConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.PNAConv.html)** from Corso *et al.*: [Principal Neighbourhood Aggregation for Graph Nets](https://arxiv.org/abs/2004.05718) (CoRR 2020) \\[**[Example](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pna.py)**\\]\n- **[FAConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.FAConv.html)** from Bo *et al.*: [Beyond Low-Frequency Information in Graph Convolutional Networks](https://arxiv.org/abs/2101.00797) (AAAI 2021)\n- **[PDNConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.nn.conv.PDNConv.html)** from Rozemberczki *et al.*: [Pathfinder Discovery Networks for Neural Message Passing](https://arxiv.org/abs/2010.12878) (WWW 2021)\n- **[RGCNConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.RGCNConv.html)** from Schlichtkrull *et al.*: [Modeling Relational Data with Graph Convolutional Networks](https://arxiv.org/abs/1703.06103) (ESWC 2018) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rgcn.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rgcn_link_pred.py)\\]\n- **[RGATConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.RGATConv.html)** from Busbridge *et al.*: [Relational Graph Attention Networks](https://arxiv.org/abs/1904.05811) (CoRR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rgat.py)\\]\n- **[FiLMConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.FiLMConv.html)** from Brockschmidt: [GNN-FiLM: Graph Neural Networks with Feature-wise Linear Modulation](https://arxiv.org/abs/1906.12192) (ICML 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/film.py)\\]\n- **[SignedConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SignedConv.html)** from Derr *et al.*: [Signed Graph Convolutional Network](https://arxiv.org/abs/1808.06354) (ICDM 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/signed_gcn.py)\\]\n- **[DNAConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.DNAConv.html)** from Fey: [Just Jump: Dynamic Neighborhood Aggregation in Graph Neural Networks](https://arxiv.org/abs/1904.04849) (ICLR-W 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/dna.py)\\]\n- **[PANConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.PANConv.html)** from Ma *et al.*: [Path Integral Based Convolution and Pooling for Graph Neural Networks](https://arxiv.org/abs/2006.16811) (NeurIPS 2020)\n- **[PointNetConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.PointNetConv.html)** (including **[Iterative Farthest Point Sampling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.fps.html)**, dynamic graph generation based on **[nearest neighbor](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.knn_graph.html)** or **[maximum distance](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.radius_graph.html)**, and **[k-NN interpolation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.unpool.knn_interpolate.html)** for upsampling) from Qi *et al.*: [PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation](https://arxiv.org/abs/1612.00593) (CVPR 2017) and [PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space](https://arxiv.org/abs/1706.02413) (NIPS 2017) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pointnet2_classification.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pointnet2_segmentation.py)\\]\n- **[EdgeConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.EdgeConv.html)** from Wang *et al.*: [Dynamic Graph CNN for Learning on Point Clouds](https://arxiv.org/abs/1801.07829) (CoRR, 2018) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/dgcnn_classification.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/dgcnn_segmentation.py)\\]\n- **[XConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.XConv.html)** from Li *et al.*: [PointCNN: Convolution On X-Transformed Points](https://arxiv.org/abs/1801.07791) (NeurIPS 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/points/point_cnn.py)\\]\n- **[PPFConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.PPFConv.html)** from Deng *et al.*: [PPFNet: Global Context Aware Local Features for Robust 3D Point Matching](https://arxiv.org/abs/1802.02669) (CVPR 2018)\n- **[GMMConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GMMConv.html)** from Monti *et al.*: [Geometric Deep Learning on Graphs and Manifolds using Mixture Model CNNs](https://arxiv.org/abs/1611.08402) (CVPR 2017)\n- **[FeaStConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.FeaStConv.html)** from Verma *et al.*: [FeaStNet: Feature-Steered Graph Convolutions for 3D Shape Analysis](https://arxiv.org/abs/1706.05206) (CVPR 2018)\n- **[PointTransformerConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.PointTransformerConv.html)** from Zhao *et al.*: [Point Transformer](https://arxiv.org/abs/2012.09164) (2020)\n- **[HypergraphConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.HypergraphConv.html)** from Bai *et al.*: [Hypergraph Convolution and Hypergraph Attention](https://arxiv.org/abs/1901.08150) (CoRR 2019)\n- **[GravNetConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GravNetConv.html)** from Qasim *et al.*: [Learning Representations of Irregular Particle-detector Geometry with Distance-weighted Graph Networks](https://arxiv.org/abs/1902.07987) (European Physics Journal C, 2019)\n- **[SuperGAT](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SuperGATConv.html)** from Kim and Oh: [How To Find Your Friendly Neighborhood: Graph Attention Design With Self-Supervision](https://openreview.net/forum?id=Wi5KUNlqWty) (ICLR 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/super_gat.py)\\]\n- **[HGTConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.HGTConv.html)** from Hu *et al.*: [Heterogeneous Graph Transformer](https://arxiv.org/abs/2003.01332) (WWW 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/hgt_dblp.py)\\]\n- **[HEATConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.HEATonv.html)** from Mo *et al.*: [Heterogeneous Edge-Enhanced Graph Attention Network For Multi-Agent Trajectory Prediction](https://arxiv.org/abs/2106.07161) (CoRR 2021)\n- **[SSGConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SSGConv.html)** from Zhu *et al.*: [Simple Spectral Graph Convolution](https://openreview.net/forum?id=CYO5T-YjWZV) (ICLR 2021)\n- **[FusedGATConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.FusedGATConv.html)** from Zhang *et al.*: [Understanding GNN Computational Graph: A Coordinated Computation, IO, and Memory Perspective](https://proceedings.mlsys.org/paper/2022/file/9a1158154dfa42caddbd0694a4e9bdc8-Paper.pdf) (MLSys 2022)\n- **[GPSConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GPSConv.html)** from Rampášek *et al.*: [Recipe for a General, Powerful, Scalable Graph Transformer](https://arxiv.org/abs/2205.12454) (NeurIPS 2022) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/graph_gps.py)\\]\n\n<\/details>\n\n**Pooling layers:**\nGraph pooling layers combine the vectorial representations of a set of nodes in a graph (or a subgraph) into a single vector representation that summarizes its properties of nodes.\nIt is commonly applied to graph-level tasks, which require combining node features into a single graph representation.\n\n- **[Top-K Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.TopKPooling.html)** from Gao and Ji: [Graph U-Nets](https://arxiv.org/abs/1905.05178) (ICML 2019), Cangea *et al.*: [Towards Sparse Hierarchical Graph Classifiers](https://arxiv.org/abs/1811.01287) (NeurIPS-W 2018) and Knyazev *et al.*: [Understanding Attention and Generalization in Graph Neural Networks](https://arxiv.org/abs/1905.02850) (ICLR-W 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_topk_pool.py)\\]\n- **[DiffPool](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.dense.dense_diff_pool.html)** from Ying *et al.*: [Hierarchical Graph Representation Learning with Differentiable Pooling](https://arxiv.org/abs/1806.08804) (NeurIPS 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_diff_pool.py)\\]\n\n<details>\n<summary><b>Expand to see all implemented pooling layers...<\/b><\/summary>\n\n- **[Attentional Aggregation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.aggr.AttentionalAggregation.html)** from Li *et al.*: [Graph Matching Networks for Learning the Similarity of Graph Structured Objects](https://arxiv.org/abs/1904.12787) (ICML 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/global_attention.py)\\]\n- **[Set2Set](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.aggr.Set2Set.html)** from Vinyals *et al.*: [Order Matters: Sequence to Sequence for Sets](https://arxiv.org/abs/1511.06391) (ICLR 2016) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/set2set.py)\\]\n- **[Sort Aggregation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.aggr.SortAggregation.html)** from Zhang *et al.*: [An End-to-End Deep Learning Architecture for Graph Classification](https://www.cse.wustl.edu/~muhan/papers/AAAI_2018_DGCNN.pdf) (AAAI 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/sort_pool.py)\\]\n- **[MinCut Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.dense.dense_mincut_pool.html)** from Bianchi *et al.*: [Spectral Clustering with Graph Neural Networks for Graph Pooling](https://arxiv.org/abs/1907.00481) (ICML 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_mincut_pool.py)\\]\n- **[DMoN Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.dense.DMoNPooling.html)** from Tsitsulin *et al.*: [Graph Clustering with Graph Neural Networks](https://arxiv.org/abs/2006.16904) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_dmon_pool.py)\\]\n- **[Graclus Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.graclus.html)** from Dhillon *et al.*: [Weighted Graph Cuts without Eigenvectors: A Multilevel Approach](http://www.cs.utexas.edu/users/inderjit/public_papers/multilevel_pami.pdf) (PAMI 2007) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/mnist_graclus.py)\\]\n- **[Voxel Grid Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.voxel_grid.html)** from, *e.g.*, Simonovsky and Komodakis: [Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs](https://arxiv.org/abs/1704.02901) (CVPR 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/mnist_voxel_grid.py)\\]\n- **[SAG Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.SAGPooling.html)** from Lee *et al.*: [Self-Attention Graph Pooling](https://arxiv.org/abs/1904.08082) (ICML 2019) and Knyazev *et al.*: [Understanding Attention and Generalization in Graph Neural Networks](https://arxiv.org/abs/1905.02850) (ICLR-W 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/sag_pool.py)\\]\n- **[Edge Pooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.EdgePooling.html)** from Diehl *et al.*: [Towards Graph Pooling by Edge Contraction](https://graphreason.github.io/papers/17.pdf) (ICML-W 2019) and Diehl: [Edge Contraction Pooling for Graph Neural Networks](https://arxiv.org/abs/1905.10990) (CoRR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/edge_pool.py)\\]\n- **[ASAPooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.ASAPooling.html)** from Ranjan *et al.*: [ASAP: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representations](https://arxiv.org/abs/1911.07979) (AAAI 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/asap.py)\\]\n- **[PANPooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.PANPooling.html)** from Ma *et al.*: [Path Integral Based Convolution and Pooling for Graph Neural Networks](https://arxiv.org/abs/2006.16811) (NeurIPS 2020)\n- **[MemPooling](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.MemPooling.html)** from Khasahmadi *et al.*: [Memory-Based Graph Networks](https://arxiv.org/abs/2002.09518) (ICLR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/mem_pool.py)\\]\n- **[Graph Multiset Transformer](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.aggr.GraphMultisetTransformer.html)** from Baek *et al.*: [Accurate Learning of Graph Representations with Graph Multiset Pooling](https://arxiv.org/abs/2102.11533) (ICLR 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/proteins_gmt.py)\\]\n- **[Equilibrium Aggregation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.aggr.EquilibriumAggregation.html)** from Bartunov *et al.*: [](https://arxiv.org/abs/2202.12795) (UAI 2022) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/equilibrium_median.py)\\]\n\n<\/details>\n\n**GNN models:**\nOur supported GNN models incorporate multiple message passing layers, and users can directly use these pre-defined models to make predictions on graphs.\nUnlike simple stacking of GNN layers, these models could involve pre-processing, additional learnable parameters, skip connections, graph coarsening, etc.\n\n- **[SchNet](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.SchNet.html)** from Schütt *et al.*: [SchNet: A Continuous-filter Convolutional Neural Network for Modeling Quantum Interactions](https://arxiv.org/abs/1706.08566) (NIPS 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/qm9_pretrained_schnet.py)\\]\n- **[DimeNet](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.DimeNet.html)** and **[DimeNetPlusPlus](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.DimeNetPlusPlus.html)** from Klicpera *et al.*: [Directional Message Passing for Molecular Graphs](https://arxiv.org/abs/2003.03123) (ICLR 2020) and [Fast and Uncertainty-Aware Directional Message Passing for Non-Equilibrium Molecules](https://arxiv.org/abs/2011.14115) (NeurIPS-W 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/qm9_pretrained_dimenet.py)\\]\n- **[Node2Vec](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.Node2Vec.html)** from Grover and Leskovec: [node2vec: Scalable Feature Learning for Networks](https://arxiv.org/abs/1607.00653) (KDD 2016) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/node2vec.py)\\]\n- **[Deep Graph Infomax](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.DeepGraphInfomax.html)** from Veličković *et al.*: [Deep Graph Infomax](https://arxiv.org/abs/1809.10341) (ICLR 2019) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/infomax_transductive.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/infomax_inductive.py)\\]\n- **Deep Multiplex Graph Infomax** from Park *et al.*: [Unsupervised Attributed Multiplex Network Embedding](https://arxiv.org/abs/1911.06750) (AAAI 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/dmgi_unsup.py)\\]\n- **[Masked Label Prediction](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.MaskLabel.html)** from Shi *et al.*: [Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classification](https://arxiv.org/abs/2009.03509) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/unimp_arxiv.py)\\]\n- **[PMLP](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.PMLP.html)** from Yang *et al.*: [Graph Neural Networks are Inherently Good Generalizers: Insights by Bridging GNNs and MLPs](https://arxiv.org/abs/2212.09034) (ICLR 2023)\n\n<details>\n<summary><b>Expand to see all implemented GNN models...<\/b><\/summary>\n\n- **[Jumping Knowledge](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.JumpingKnowledge.html)** from Xu *et al.*: [Representation Learning on Graphs with Jumping Knowledge Networks](https://arxiv.org/abs/1806.03536) (ICML 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/benchmark/kernel/gin.py#L54-L106)\\]\n- A **[MetaLayer](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.MetaLayer.html)** for building any kind of graph network similar to the [TensorFlow Graph Nets library](https://github.com/deepmind/graph_nets) from Battaglia *et al.*: [Relational Inductive Biases, Deep Learning, and Graph Networks](https://arxiv.org/abs/1806.01261) (CoRR 2018)\n- **[MetaPath2Vec](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.MetaPath2Vec.html)** from Dong *et al.*: [metapath2vec: Scalable Representation Learning for Heterogeneous Networks](https://ericdongyx.github.io/papers/KDD17-dong-chawla-swami-metapath2vec.pdf) (KDD 2017) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/metapath2vec.py)\\]\n- All variants of **[Graph Autoencoders](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.GAE.html)** and **[Variational Autoencoders](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.VGAE.html)** from:\n  - [Variational Graph Auto-Encoders](https://arxiv.org/abs/1611.07308) from Kipf and Welling (NIPS-W 2016) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/autoencoder.py)\\]\n  - [Adversarially Regularized Graph Autoencoder for Graph Embedding](https://arxiv.org/abs/1802.04407) from Pan *et al.* (IJCAI 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/argva_node_clustering.py)\\]\n  - [Simple and Effective Graph Autoencoders with One-Hop Linear Models](https://arxiv.org/abs/2001.07614) from Salha *et al.* (ECML 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/autoencoder.py)\\]\n- **[SEAL](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/seal_link_pred.py)** from Zhang and Chen: [Link Prediction Based on Graph Neural Networks](https://arxiv.org/pdf/1802.09691.pdf) (NeurIPS 2018) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/seal_link_pred.py)\\]\n- **[RENet](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.RENet.html)** from Jin *et al.*: [Recurrent Event Network for Reasoning over Temporal Knowledge Graphs](https://arxiv.org/abs/1904.05530) (ICLR-W 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/renet.py)\\]\n- **[GraphUNet](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.GraphUNet.html)** from Gao and Ji: [Graph U-Nets](https://arxiv.org/abs/1905.05178) (ICML 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/graph_unet.py)\\]\n- **[AttentiveFP](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.AttentiveFP.html)** from Xiong *et al.*: [Pushing the Boundaries of Molecular Representation for Drug Discovery with the Graph Attention Mechanism](https://pubs.acs.org/doi/10.1021/acs.jmedchem.9b00959) (J. Med. Chem. 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/attentive_fp.py)\\]\n- **[DeepGCN](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.DeepGCNLayer.html)** and the **[GENConv](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.GENConv.html)** from Li *et al.*: [DeepGCNs: Can GCNs Go as Deep as CNNs?](https://arxiv.org/abs/1904.03751) (ICCV 2019) and [DeeperGCN: All You Need to Train Deeper GCNs](https://arxiv.org/abs/2006.07739) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/ogbn_proteins_deepgcn.py)\\]\n- **[RECT](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.RECT_L.html)** from Wang *et al.*: [Network Embedding with Completely-imbalanced Labels](https://ieeexplore.ieee.org/document/8979355) (TKDE 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rect.py)\\]\n- **[GNNExplainer](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.explain.algorithm.GNNExplainer.html)** from Ying *et al.*: [GNNExplainer: Generating Explanations for Graph Neural Networks](https://arxiv.org/abs/1903.03894) (NeurIPS 2019) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/explain/gnn_explainer.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/explain/gnn_explainer_ba_shapes.py), [**Example3**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/explain/gnn_explainer_link_pred.py)\\]\n- **Graph-less Neural Networks** from Zhang *et al.*: [Graph-less Neural Networks: Teaching Old MLPs New Tricks via Distillation](https://arxiv.org/abs/2110.08727) (CoRR 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/glnn.py)\\]\n- **[LINKX](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.LINKX.html)** from Lim *et al.*: [Large Scale Learning on Non-Homophilous Graphs:\n  New Benchmarks and Strong Simple Methods](https://arxiv.org/abs/2110.14446) (NeurIPS 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/linkx.py)\\]\n- **[RevGNN](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.GroupAddRev.html)** from Li *et al.*: [Training Graph Neural with 1000 Layers](https://arxiv.org/abs/2106.07476) (ICML 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rev_gnn.py)\\]\n- **[TransE](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.TransE.html)** from Bordes *et al.*: [Translating Embeddings for Modeling Multi-Relational Data](https://proceedings.neurips.cc/paper/2013/file/1cecc7a77928ca8133fa24680a88d2f9-Paper.pdf) (NIPS 2013) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\\]\n- **[ComplEx](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.ComplEx.html)** from Trouillon *et al.*: [Complex Embeddings for Simple Link Prediction](https://arxiv.org/abs/1606.06357) (ICML 2016) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\\]\n- **[DistMult](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.DistMult.html)** from Yang *et al.*: [Embedding Entities and Relations for Learning and Inference in Knowledge Bases](https://arxiv.org/abs/1412.6575) (ICLR 2015) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\\]\n- **[RotatE](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.kge.RotatE.html)** from Sun *et al.*: [RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Space](https://arxiv.org/abs/1902.10197) (ICLR 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/kge_fb15k_237.py)\\]\n\n<\/details>\n\n**GNN operators and utilities:**\nPyG comes with a rich set of neural network operators that are commonly used in many GNN models.\nThey follow an extensible design: It is easy to apply these operators and graph utilities to existing GNN layers and models to further enhance model performance.\n\n- **[DropEdge](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.dropout_edge)** from Rong *et al.*: [DropEdge: Towards Deep Graph Convolutional Networks on Node Classification](https://openreview.net/forum?id=Hkx1qkrKPr) (ICLR 2020)\n- **[DropNode](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.dropout_node)**, **[MaskFeature](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.mask_feature)** and **[AddRandomEdge](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.add_random_edge)** from You *et al.*: [Graph Contrastive Learning with Augmentations](https://arxiv.org/abs/2010.13902) (NeurIPS 2020)\n- **[DropPath](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.dropout_path)** from Li *et al.*: [MaskGAE: Masked Graph Modeling Meets Graph Autoencoders](https://arxiv.org/abs/2205.10053) (arXiv 2022)\n- **[ShuffleNode](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.shuffle_node)** from Veličković *et al.*: [Deep Graph Infomax](https://arxiv.org/abs/1809.10341) (ICLR 2019)\n- **[GraphNorm](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.norm.GraphNorm.html)** from Cai *et al.*: [GraphNorm: A Principled Approach to Accelerating Graph Neural Network Training](https://proceedings.mlr.press/v139/cai21e.html) (ICML 2021)\n- **[GDC](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.transforms.GDC.html)** from Klicpera *et al.*: [Diffusion Improves Graph Learning](https://arxiv.org/abs/1911.05485) (NeurIPS 2019) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn.py)\\]\n\n<details>\n<summary><b>Expand to see all implemented GNN operators and utilities...<\/b><\/summary>\n\n- **[GraphSizeNorm](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.norm.GraphSizeNorm.html)** from Dwivedi *et al.*: [Benchmarking Graph Neural Networks](https://arxiv.org/abs/2003.00982) (CoRR 2020)\n- **[PairNorm](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.norm.PairNorm.html)** from Zhao and Akoglu: [PairNorm: Tackling Oversmoothing in GNNs](https://arxiv.org/abs/1909.12223) (ICLR 2020)\n- **[MeanSubtractionNorm](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.norm.MeanSubtractionNorm.html)** from Yang *et al.*: [Revisiting \"Over-smoothing\" in Deep GCNs](https://arxiv.org/abs/2003.13663) (CoRR 2020)\n- **[DiffGroupNorm](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.norm.DiffGroupNorm.html)** from Zhou *et al.*: [Towards Deeper Graph Neural Networks with Differentiable Group Normalization](https://arxiv.org/abs/2006.06972) (NeurIPS 2020)\n- **[Tree Decomposition](https://pytorch-geometric.readthedocs.io/en/latest/modules/utils.html#torch_geometric.utils.tree_decomposition)** from Jin *et al.*: [Junction Tree Variational Autoencoder for Molecular Graph Generation](https://arxiv.org/abs/1802.04364) (ICML 2018)\n- **[TGN](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.TGNMemory.html)** from Rossi *et al.*: [Temporal Graph Networks for Deep Learning on Dynamic Graphs](https://arxiv.org/abs/2006.10637) (GRL+ 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/tgn.py)\\]\n- **[Weisfeiler Lehman Operator](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.WLConv.html)** from Weisfeiler and Lehman: [A Reduction of a Graph to a Canonical Form and an Algebra Arising During this Reduction](https://www.iti.zcu.cz/wl2018/pdf/wl_paper_translation.pdf) (Nauchno-Technicheskaya Informatsia 1968) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/wl_kernel.py)\\]\n- **[Continuous Weisfeiler Lehman Operator](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.WLConvContinuous.html)** from Togninalli *et al.*: [Wasserstein Weisfeiler-Lehman Graph Kernels](https://arxiv.org/abs/1906.01277) (NeurIPS 2019)\n- **[Label Propagation](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.LabelPropagation.html)** from Zhu and Ghahramani: [Learning from Labeled and Unlabeled Data with Label Propagation](http://mlg.eng.cam.ac.uk/zoubin/papers/CMU-CALD-02-107.pdf) (CMU-CALD 2002) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/label_prop.py)\\]\n- **[Local Degree Profile](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.transforms.LocalDegreeProfile)** from Cai and Wang: [A Simple yet Effective Baseline for Non-attribute Graph Classification](https://arxiv.org/abs/1811.03508) (CoRR 2018)\n- **[CorrectAndSmooth](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.CorrectAndSmooth.html)** from Huang *et al.*: [Combining Label Propagation And Simple Models Out-performs Graph Neural Networks](https://arxiv.org/abs/2010.13993) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/correct_and_smooth.py)\\]\n- **[Gini](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.functional.gini.html)** and **[BRO](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.functional.bro.html)** regularization from Henderson *et al.*: [Improving Molecular Graph Neural Network Explainability with Orthonormalization and Induced Sparsity](https://arxiv.org/abs/2105.04854) (ICML 2021)\n- **[RootedEgoNets](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.transforms.RootedEgoNets)** and **[RootedRWSubgraph](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.transforms.RootedRWSubgraph)** from Zhao *et al.*: [From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness](https://arxiv.org/abs/2110.03753) (ICLR 2022)\n- **[FeaturePropagation](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.transforms.FeaturePropagation)** from Rossi *et al.*: [On the Unreasonable Effectiveness of Feature Propagation in Learning on Graphs with Missing Node Features](https://arxiv.org/abs/2111.12128) (CoRR 2021)\n\n<\/details>\n\n**Scalable GNNs:**\nPyG supports the implementation of Graph Neural Networks that can scale to large-scale graphs.\nSuch application is challenging since the entire graph, its associated features and the GNN parameters cannot fit into GPU memory.\nMany state-of-the-art scalability approaches tackle this challenge by sampling neighborhoods for mini-batch training, graph clustering and partitioning, or by using simplified GNN models.\nThese approaches have been implemented in PyG, and can benefit from the above GNN layers, operators and models.\n\n- **[NeighborLoader](https://pytorch-geometric.readthedocs.io/en/latest/modules/loader.html#torch_geometric.loader.NeighborLoader)** from Hamilton *et al.*: [Inductive Representation Learning on Large Graphs](https://arxiv.org/abs/1706.02216) (NIPS 2017) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/reddit.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/ogbn_train.py), [**Example3**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/to_hetero_mag.py)\\]\n- **[ClusterGCN](https://pytorch-geometric.readthedocs.io/en/latest/modules/loader.html#torch_geometric.loader.ClusterLoader)** from Chiang *et al.*: [Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks](https://arxiv.org/abs/1905.07953) (KDD 2019) \\[[**Example1**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/cluster_gcn_reddit.py), [**Example2**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/cluster_gcn_ppi.py)\\]\n- **[GraphSAINT](https://pytorch-geometric.readthedocs.io/en/latest/modules/loader.html#torch_geometric.loader.GraphSAINTSampler)** from Zeng *et al.*: [GraphSAINT: Graph Sampling Based Inductive Learning Method](https://arxiv.org/abs/1907.04931) (ICLR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/graph_saint.py)\\]\n\n<details>\n<summary><b>Expand to see all implemented scalable GNNs...<\/b><\/summary>\n\n- **[ShaDow](https://pytorch-geometric.readthedocs.io/en/latest/modules/loader.html#torch_geometric.loader.ShaDowKHopSampler)** from Zeng *et al.*: [Decoupling the Depth and Scope of Graph Neural Networks](https://arxiv.org/abs/2201.07858) (NeurIPS 2021) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/shadow.py)\\]\n- **[SIGN](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.transforms.SIGN.html)** from Rossi *et al.*: [SIGN: Scalable Inception Graph Neural Networks](https://arxiv.org/abs/2004.11198) (CoRR 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/sign.py)\\]\n- **[HGTLoader](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.loader.HGTLoader.html)** from Hu *et al.*: [Heterogeneous Graph Transformer](https://arxiv.org/abs/2003.01332) (WWW 2020) \\[[**Example**](https://github.com/pyg-team/pytorch_geometric/blob/master/examples/hetero/to_hetero_mag.py)\\]\n\n<\/details>\n\n## Installation\n\nPyG is available for Python 3.10 to Python 3.14.\n\nFrom **PyG 2.3** onwards, you can install and use PyG **without any external library** required except for PyTorch.\nFor this, simply run\n\n```\npip install torch_geometric\n```\n\n### Additional Libraries\n\nIf you want to utilize the full set of features from PyG, there exists several additional libraries you may want to install:\n\n- **[`pyg-lib`](https://github.com/pyg-team/pyg-lib)**: Heterogeneous GNN operators, graph sampling routines, graph clustering routines, and [`SplineConv`](https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.conv.SplineConv.html) support\n- **[`torch-scatter`](https://github.com/rusty1s/pytorch_scatter)**: Accelerated and efficient sparse reductions\n- **[`torch-sparse`](https://github.com/rusty1s/pytorch_sparse)**: [`SparseTensor`](https://pytorch-geometric.readthedocs.io/en/latest/advanced/sparse_tensor.html) support\n\nThese packages come with their own CPU and GPU kernel implementations based on the [PyTorch C++/CUDA/hip(ROCm) extension interface](https://github.com/pytorch/extension-cpp).\nFor a basic usage of PyG, these dependencies are **fully optional**.\nWe recommend to start with a minimal installation, and install additional dependencies once you start to actually need them.\n\nFor ease of installation of these extensions, we provide `pip` wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).\n\n#### PyTorch 2.12\n\nTo install the binaries for PyTorch 2.12, simply run\n\n```\npip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.12.0+${CUDA}.html\n```\n\nwhere `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu130`, or `cu132` depending on your PyTorch installation.\n\n|             | `cpu` | `cu126` | `cu128` | `cu130` | `cu132` |\n| ----------- | ----- | ------- | ------- | ------- | ------- |\n| **Linux**   | ✅    | ✅      |         | ✅      | ✅      |\n| **Windows** | ✅    | ✅      |         | ✅      | ✅      |\n| **macOS**   | ✅    |         |         |         |         |\n\n#### PyTorch 2.11\n\nTo install the binaries for PyTorch 2.11, simply run\n\n```\npip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.11.0+${CUDA}.html\n```\n\nwhere `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation.\n\n|             | `cpu` | `cu126` | `cu128` | `cu130` |\n| ----------- | ----- | ------- | ------- | ------- |\n| **Linux**   | ✅    | ✅      | ✅      | ✅      |\n| **Windows** | ✅    | ✅      | ✅      | ✅      |\n| **macOS**   | ✅    |         |         |         |\n\n#### PyTorch 2.10\n\nTo install the binaries for PyTorch 2.10, simply run\n\n```\npip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.10.0+${CUDA}.html\n```\n\nwhere `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation.\n\n|             | `cpu` | `cu126` | `cu128` | `cu130` |\n| ----------- | ----- | ------- | ------- | ------- |\n| **Linux**   | ✅    | ✅      | ✅      | ✅      |\n| **Windows** | ✅    | ✅      | ✅      | ✅      |\n| **macOS**   | ✅    |         |         |         |\n\n#### PyTorch 2.9\n\nTo install the binaries for PyTorch 2.9, simply run\n\n```\npip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-2.9.0+${CUDA}.html\n```\n\nwhere `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation.\n\n|             | `cpu` | `cu126` | `cu128` | `cu130` |\n| ----------- | ----- | ------- | ------- | ------- |\n| **Linux**   | ✅    | ✅      | ✅      | ✅      |\n| **Windows** | ✅    | ✅      | ✅      | ✅      |\n| **macOS**   | ✅    |         |         |         |\n\n**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, PyTorch 2.3.0/2.3.1, PyTorch 2.4.0/2.4.1, PyTorch 2.5.0/2.5.1, PyTorch 2.6.0, PyTorch 2.7.0/2.7.1, and PyTorch 2.8.0 (following the same procedure).\n**For older versions, you might need to explicitly specify the latest supported version number** or install via `pip install --no-index` in order to prevent a manual installation from source.\nYou can look up the latest supported version number [here](https://data.pyg.org/whl).\n\n### NVIDIA PyG Container\n\nNVIDIA provides a PyG docker container for effortlessly training and deploying GPU accelerated GNNs with PyG, see [here](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg).\n\n### Nightly and Master\n\nIn case you want to experiment with the latest PyG features which are not fully released yet, either install the **nightly version** of PyG via\n\n```\npip install pyg-nightly\n```\n\nor install PyG **from master** via\n\n```\npip install git+https://github.com/pyg-team/pytorch_geometric.git\n```\n\n### ROCm Wheels\n\nThe external [`pyg-rocm-build` repository](https://github.com/Looong01/pyg-rocm-build) provides wheels and detailed instructions on how to install PyG for ROCm.\nIf you have any questions about it, please open an issue [here](https://github.com/Looong01/pyg-rocm-build/issues).\n\n## Cite\n\nPlease cite our [PyG 1.0](https://arxiv.org/abs/1903.02428) and [PyG 2.0](https://www.arxiv.org/abs/2507.16991) papers if you use this code in your own work:\n\n```\n@inproceedings{Fey/Lenssen/2019,\n  title={Fast Graph Representation Learning with {PyTorch Geometric}},\n  author={Fey, Matthias and Lenssen, Jan E.},\n  booktitle={ICLR Workshop on Representation Learning on Graphs and Manifolds},\n  year={2019},\n}\n\n@inproceedings{Fey/etal/2025,\n  title={{PyG} 2.0: Scalable Learning on Real World Graphs},\n  author={Fey, Matthias and Sunil, Jinu and Nitta, Akihiro and Puri, Rishi and Shah, Manan, and Stojanovi{\\v{c}, Bla{\\v{z} and Bendias, Ramona and Alexandria, Barghi and Kocijan, Vid and Zhang, Zecheng and He, Xinwei and Lenssen, Jan E. and Leskovec, Jure},\n  booktitle={Temporal Graph Learning Workshop @ KDD},\n  year={2025},\n}\n```\n\nFeel free to [email us](mailto:matthias.fey@tu-dortmund.de) if you wish your work to be listed in the [external resources](https://pytorch-geometric.readthedocs.io/en/latest/external/resources.html).\nIf you notice anything unexpected, please open an [issue](https://github.com/pyg-team/pytorch_geometric/issues) and let us know.\nIf you have any questions or are missing a specific feature, feel free [to discuss them with us](https://github.com/pyg-team/pytorch_geometric/discussions).\nWe are motivated to constantly make PyG even better.\n\n[contributing-image]: https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat&color=4B26A4\n[contributing-url]: https://github.com/pyg-team/pytorch_geometric/blob/master/.github/CONTRIBUTING.md\n[pypi-download-image]: https://img.shields.io/pypi/dm/torch_geometric?color=4B26A4\n[pypi-download-url]: https://pepy.tech/projects/torch_geometric\n[pypi-image]: https://img.shields.io/pypi/pyversions/torch-geometric?color=4B26A4\n[pypi-url]: https://pypi.python.org/pypi/torch-geometric\n[slack-image]: https://img.shields.io/badge/slack-join-white.svg?logo=slack&color=4B26A4\n[slack-url]: https://data.pyg.org/slack.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"55D2:3B7E2:16ADEF:5BD1C9:6AB920EC"},"text_sha256":"2acfdafff9ba526261751e9b7f02fcdcc9c2aacc7be0a528ced9db41136b4978"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/tfjs","input_row":{"repository":"tensorflow/tfjs","url":"https://github.com/tensorflow/tfjs","name":"tfjs","owner":"tensorflow","description":"A WebGL accelerated JavaScript library for training and deploying ML models.","language":"TypeScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":19145,"issues":4328,"created_at":"2018-03-05T05:41:02Z","updated_at":"2026-09-26T22:53:59Z","first_commit_at":"2017-08-03T17:45:13Z","last_commit_at":"2026-04-06T16:18:15Z","activity_months":104.06999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; deep-neural-network; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:20.514Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/tfjs","visibility":"public","created_at":"2018-03-05T05:41:02Z","updated_at":"2026-09-26T22:53:59Z","private":false,"fork":false,"archived":false,"stargazers_count":19145,"open_issues_count":381,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3344","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:176A9BF:1B89779:6AB9287C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3343","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:179CE76:1BBBEAD:6AB9287C"},"commit":{"sha":"d457315b29dca301dd7d21fc4d9600e03d80a936","url":"https://github.com/tensorflow/tfjs/commit/d457315b29dca301dd7d21fc4d9600e03d80a936","date":"2018-05-24T21:58:19Z","author_date":"2018-05-24T21:58:19Z","committer_date":"2018-05-24T21:58:19Z","tree_sha":"42322084612f1c85e0907fadffe9c7934a708b96","message_first_line":"0.1.5"},"tree_request_status":200,"tree_rate":{"github_remaining":"3342","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:17D7BB6:1BF6BBD:6AB9287D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1886,"blob_sha":"bd75b6b923fe7177fb8da750e3cc7d5c40bc0191","priority":0}],"documents":[{"path":"README.md","size":1886,"blob_sha":"bd75b6b923fe7177fb8da750e3cc7d5c40bc0191","priority":0,"status":200,"text":"# TensorFlow backend for TensorFlow.js via Node.js\n\n**This repo is under active development and is not production-ready. We are\nactively developing as an open source project.**\n\n## Installing\n\nTensorFlow.js for Node currently supports the following platforms:\n- Mac OS X 10.12.6 (Siera) or higher\n- Linux CPU (Ubuntu 16.04 or higher)\n- Linux GPU (Ubuntu 16.04 or higher and Cuda 9.0 w/ CUDNN v7) ([see installation instructions](https://www.tensorflow.org/install/install_linux))\n\n*Other Linux variants might also work but this project matches [core TensorFlow installation requirements](https://www.tensorflow.org/install/install_linux).*\n\n#### Installing CPU TensorFlow.js for Node:\n\n```sh\nnpm install @tensorflow/tfjs-node\n(or)\nyarn add @tensorflow/tfjs-node\n```\n\n#### Installing Linux GPU TensorFlow.js for Node:\n\n```sh\nnpm install @tensorflow/tfjs-node-gpu\n(or)\nyarn add @tensorflow/tfjs-node-gpu\n```\n\nBefore executing any TensorFlow.js code, load and set the backend to 'tensorflow'.\n\n```js\nimport * as tf from '@tensorflow/tfjs';\n\n// Load the binding\nimport '@tensorflow/tfjs-node';\n\n// Or if running with GPU:\nimport '@tensorflow/tfjs-node-gpu';\n\ntf.setBackend('tensorflow');\n```\n\n## Development\n\n```sh\n# Download and install JS dependencies, including libtensorflow 1.8.\nyarn\n\n# Run TFJS tests against Node.js backend:\nyarn test\n```\n\n```sh\n# Switch to GPU for local development:\nyarn enable-gpu\n```\n\nSee the `demo` directory that trains MNIST using TensorFlow.js with the\nTensorFlow C backend.\n\n```sh\ncd demo/\nyarn\n\n# Run the training script. See demo/package.json for this script.\nyarn mnist\n```\n\nThe important line to note is at the top of `mnist.ts`, which sets the backend to\nTensorFlow.\n\n### Optional: Build libtensorflow From TensorFlow source\n\nThis requires installing bazel first.\n\n```sh\nbazel build --config=monolithic //tensorflow/tools/lib_package:libtensorflow\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2610:3D40A:16BD20:5BDFE0:6AB920ED"},"text_sha256":"98bbac5fe19f54af97a45cf3a195213beca11e7b9adc9183dc19a795a442cc92"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3341","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082C:7307A:179F8FA:1BBE246:6AB9287D"},"commit":{"sha":"7f5309fef0a47545e34049903dbdae0f97285f7e","url":"https://github.com/tensorflow/tfjs/commit/7f5309fef0a47545e34049903dbdae0f97285f7e","date":"2026-04-06T16:18:15Z","author_date":"2026-04-06T16:18:15Z","committer_date":"2026-04-06T16:18:15Z","tree_sha":"052cdc4fcbb4ecc9312963e2d5ee8f2d66e71eaf","message_first_line":"chore: Migrate gsutil usage to gcloud storage (#8637)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3340","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:1769430:1B866CF:6AB9287E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7760,"blob_sha":"7c0c9016a7e8c231f7d4cef251256e9b0720d73e","priority":0}],"documents":[{"path":"README.md","size":7760,"blob_sha":"7c0c9016a7e8c231f7d4cef251256e9b0720d73e","priority":0,"status":200,"text":"# TensorFlow.js\n\nTensorFlow.js is an open-source hardware-accelerated JavaScript library for\ntraining and deploying machine learning models.\n\n\n**Develop ML in the Browser** <br/>\nUse flexible and intuitive APIs to build models from scratch using the low-level\nJavaScript linear algebra library or the high-level layers API.\n\n**Develop ML in Node.js** <br/>\nExecute native TensorFlow with the same TensorFlow.js API under the Node.js\nruntime.\n\n**Run Existing models** <br/>\nUse TensorFlow.js model converters to run pre-existing TensorFlow models right\nin the browser.\n\n**Retrain Existing models** <br/>\nRetrain pre-existing ML models using sensor data connected to the browser or\nother client-side data.\n\n## About this repo\n\nThis repository contains the logic and scripts that combine\nseveral packages.\n\nAPIs:\n- [TensorFlow.js Core](/tfjs-core),\n  a flexible low-level API for neural networks and numerical computation.\n- [TensorFlow.js Layers](/tfjs-layers),\n  a high-level API which implements functionality similar to\n  [Keras](https://keras.io/).\n- [TensorFlow.js Data](/tfjs-data),\n  a simple API to load and prepare data analogous to\n  [tf.data](https://www.tensorflow.org/guide/datasets).\n- [TensorFlow.js Converter](/tfjs-converter),\n  tools to import a TensorFlow SavedModel to TensorFlow.js\n- [TensorFlow.js Vis](/tfjs-vis),\n  in-browser visualization for TensorFlow.js models\n- [TensorFlow.js AutoML](/tfjs-automl),\n  Set of APIs to load and run models produced by\n  [AutoML Edge](https://cloud.google.com/vision/automl/docs/edge-quickstart).\n\n\nBackends/Platforms:\n- [TensorFlow.js CPU Backend](/tfjs-backend-cpu), pure-JS backend for Node.js and the browser.\n- [TensorFlow.js WebGL Backend](/tfjs-backend-webgl), WebGL backend for the browser.\n- [TensorFlow.js WASM Backend](/tfjs-backend-wasm), WebAssembly backend for the browser.\n- [TensorFlow.js WebGPU](/tfjs-backend-webgpu), WebGPU backend for the browser.\n- [TensorFlow.js Node](/tfjs-node), Node.js platform via TensorFlow C++ adapter.\n- [TensorFlow.js React Native](/tfjs-react-native), React Native platform via expo-gl adapter.\n\nIf you care about bundle size, you can import those packages individually.\n\nIf you are looking for Node.js support, check out the [TensorFlow.js Node directory](/tfjs-node).\n\n## Examples\n\nCheck out our\n[examples repository](https://github.com/tensorflow/tfjs-examples)\nand our [tutorials](https://js.tensorflow.org/tutorials/).\n\n## Gallery\n\nBe sure to check out [the gallery](GALLERY.md) of all projects related to TensorFlow.js.\n\n## Pre-trained models\n\nBe sure to also check out our [models repository](https://github.com/tensorflow/tfjs-models) where we host pre-trained models\non NPM.\n\n## Benchmarks\n\n* [Local benchmark tool](https://tfjs-benchmarks.web.app/). Use this webpage tool to collect the performance related metrics (speed, memory, etc) of TensorFlow.js models and kernels **on your local device** with CPU, WebGL or WASM backends. You can benchmark custom models by following this [guide](https://github.com/tensorflow/tfjs/blob/master/e2e/benchmarks/local-benchmark/README.md).\n* [Multi-device benchmark tool](https://github.com/tensorflow/tfjs/tree/master/e2e/benchmarks/browserstack-benchmark/README.md). Use this tool to collect the same performance related metrics **on a collection of remote devices**.\n\n## Getting started\n\nThere are two main ways to get TensorFlow.js in your JavaScript project:\nvia <a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_JavaScript_within_a_webpage\" target=\"_blank\">script tags<\/a> <strong>or<\/strong> by installing it from <a href=\"https://www.npmjs.com/\" target=\"_blank\">NPM<\/a>\nand using a build tool like <a href=\"https://parceljs.org/\" target=\"_blank\">Parcel<\/a>,\n<a href=\"https://webpack.js.org/\" target=\"_blank\">WebPack<\/a>, or <a href=\"https://rollupjs.org/guide/en\" target=\"_blank\">Rollup<\/a>.\n\n### via Script Tag\n\nAdd the following code to an HTML file:\n\n```html\n<html>\n  <head>\n    <!-- Load TensorFlow.js -->\n    <script src=\"https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js\"> <\/script>\n\n\n    <!-- Place your code in the script tag below. You can also use an external .js file -->\n    <script>\n      // Notice there is no 'import' statement. 'tf' is available on the index-page\n      // because of the script tag above.\n\n      // Define a model for linear regression.\n      const model = tf.sequential();\n      model.add(tf.layers.dense({units: 1, inputShape: [1]}));\n\n      // Prepare the model for training: Specify the loss and the optimizer.\n      model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});\n\n      // Generate some synthetic data for training.\n      const xs = tf.tensor2d([1, 2, 3, 4], [4, 1]);\n      const ys = tf.tensor2d([1, 3, 5, 7], [4, 1]);\n\n      // Train the model using the data.\n      model.fit(xs, ys).then(() => {\n        // Use the model to do inference on a data point the model hasn't seen before:\n        // Open the browser devtools to see the output\n        model.predict(tf.tensor2d([5], [1, 1])).print();\n      });\n    <\/script>\n  <\/head>\n\n  <body>\n  <\/body>\n<\/html>\n```\n\nOpen up that HTML file in your browser, and the code should run!\n\n### via NPM\n\nAdd TensorFlow.js to your project using <a href=\"https://yarnpkg.com/en/\" target=\"_blank\">yarn<\/a> <em>or<\/em> <a href=\"https://docs.npmjs.com/cli/npm\" target=\"_blank\">npm<\/a>. <b>Note:<\/b> Because\nwe use ES2017 syntax (such as `import`), this workflow assumes you are using a modern browser or a bundler/transpiler\nto convert your code to something older browsers understand. See our\n<a href='https://github.com/tensorflow/tfjs-examples' target=\"_blank\">examples<\/a>\nto see how we use <a href=\"https://parceljs.org/\" target=\"_blank\">Parcel<\/a> to build\nour code. However, you are free to use any build tool that you prefer.\n\n\n\n```js\nimport * as tf from '@tensorflow/tfjs';\n\n// Define a model for linear regression.\nconst model = tf.sequential();\nmodel.add(tf.layers.dense({units: 1, inputShape: [1]}));\n\n// Prepare the model for training: Specify the loss and the optimizer.\nmodel.compile({loss: 'meanSquaredError', optimizer: 'sgd'});\n\n// Generate some synthetic data for training.\nconst xs = tf.tensor2d([1, 2, 3, 4], [4, 1]);\nconst ys = tf.tensor2d([1, 3, 5, 7], [4, 1]);\n\n// Train the model using the data.\nmodel.fit(xs, ys).then(() => {\n  // Use the model to do inference on a data point the model hasn't seen before:\n  model.predict(tf.tensor2d([5], [1, 1])).print();\n});\n```\n\nSee our <a href=\"https://js.tensorflow.org/tutorials/\" target=\"_blank\">tutorials<\/a>, <a href=\"https://github.com/tensorflow/tfjs-examples\" target=\"_blank\">examples<\/a>\nand <a href=\"https://js.tensorflow.org/api/latest/\">documentation<\/a> for more details.\n\n## Importing pre-trained models\n\nWe support porting pre-trained models from:\n- [TensorFlow SavedModel](https://www.tensorflow.org/js/tutorials/conversion/import_saved_model)\n- [Keras](https://js.tensorflow.org/tutorials/import-keras.html)\n\n## Various ops supported in different backends\n\nPlease refer below :\n- [TFJS Ops Matrix](https://docs.google.com/spreadsheets/d/1D25XtWaBrmUEErbGQB0QmNhH-xtwHo9LDl59w0TbxrI/edit#gid=0)\n\n## Find out more\n\n[TensorFlow.js](https://js.tensorflow.org) is a part of the\n[TensorFlow](https://www.tensorflow.org) ecosystem. For more info:\n- For help from the community, use the `tfjs` tag on the [TensorFlow Forum](https://discuss.tensorflow.org/tag/tfjs).\n- [TensorFlow.js Website](https://js.tensorflow.org)\n- [Tutorials](https://js.tensorflow.org/tutorials)\n- [API reference](https://js.tensorflow.org/api/latest/)\n- [TensorFlow.js Blog](https://blog.tensorflow.org/search?label=TensorFlow.js)\n\nThanks, <a href=\"https://www.browserstack.com/\">BrowserStack<\/a>, for providing testing support.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CDBE:2C474:179C33:5CBF34:6AB920EF"},"text_sha256":"67b090a67e36a581ad04c53f0fec438d9ceeb3044e79b66e3875277b061107b7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wkentaro/labelme","input_row":{"repository":"wkentaro/labelme","url":"https://github.com/wkentaro/labelme","name":"labelme","owner":"wkentaro","description":"Image annotation with Python. Supports polygon, rectangle, circle, line, point, and AI-assisted annotation.","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":16192,"issues":986,"created_at":"2016-05-09T12:30:26Z","updated_at":"2026-09-26T02:36:57Z","first_commit_at":"2011-09-28T22:55:04Z","last_commit_at":"2026-09-18T07:59:23Z","activity_months":179.63999999999999,"ai_ml_match_topics":"deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:23.222Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wkentaro/labelme","visibility":"public","created_at":"2016-05-09T12:30:26Z","updated_at":"2026-09-26T02:36:57Z","private":false,"fork":false,"archived":false,"stargazers_count":16192,"open_issues_count":166,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3339","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17AFEAF:1BCE999:6AB9287F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3338","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0846:72727:1790924:1BAF6A9:6AB9287F"},"commit":{"sha":"1d3208994c67ba9452c7d1bbb7528e8c54be17d5","url":"https://github.com/wkentaro/labelme/commit/1d3208994c67ba9452c7d1bbb7528e8c54be17d5","date":"2018-05-13T14:33:00Z","author_date":"2018-05-13T14:33:00Z","committer_date":"2018-05-13T14:33:00Z","tree_sha":"cea03c6967e7bbf9f728147d846d4730d42cbb69","message_first_line":"2.14.1"},"tree_request_status":200,"tree_rate":{"github_remaining":"3337","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0920:1DB627:18545CE:1C7376D:6AB92880"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5509,"blob_sha":"3053bf0fa00d7fa7eaaa9b9deeb41ad1b265e099","priority":0}],"documents":[{"path":"README.md","size":5509,"blob_sha":"3053bf0fa00d7fa7eaaa9b9deeb41ad1b265e099","priority":0,"status":200,"text":"<img src=\"https://github.com/wkentaro/labelme/blob/master/labelme/icons/icon.png?raw=true\" align=\"right\" />\n\n# labelme: Image Polygonal Annotation with Python\n\n[![PyPI Version](https://img.shields.io/pypi/v/labelme.svg)](https://pypi.python.org/pypi/labelme)\n[![Travis Build Status](https://travis-ci.org/wkentaro/labelme.svg?branch=master)](https://travis-ci.org/wkentaro/labelme)\n[![Docker Build Status](https://img.shields.io/docker/build/wkentaro/labelme.svg)](https://hub.docker.com/r/wkentaro/labelme)\n\n\nLabelme is a graphical image annotation tool inspired by <http://labelme.csail.mit.edu>.  \nIt is written in Python and uses Qt for its graphical interface,  \nand supports annotations for semantic and instance segmentation.\n\n<img src=\"https://github.com/wkentaro/labelme/blob/master/examples/instance_segmentation/.readme/annotation.jpg?raw=true\" width=\"80%\" />  \nFig 1. Example of annotations for instance segmentation.\n\n\n## Requirements\n\n- Ubuntu / macOS / Windows\n- Python2 / Python3\n- [PyQt4 / PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/intro) / [PySide2](https://wiki.qt.io/PySide2_GettingStarted)\n\n\n## Installation\n\nThere are options:\n\n- Platform agonistic installation: Anaconda, Docker\n- Platform specific installation: Ubuntu, macOS\n\n### Anaconda\n\nYou need install [Anaconda](https://www.continuum.io/downloads), then run below:\n\n```bash\n# python2\nconda create --name=labelme python=2.7\nsource activate labelme\n# conda install -c conda-forge pyside2\nconda install pyqt\npip install labelme\n# if you'd like to use the latest version. run below:\n# pip install git+https://github.com/wkentaro/labelme.git\n\n# python3\nconda create --name=labelme python=3.6\nsource activate labelme\n# conda install -c conda-forge pyside2\n# conda install pyqt\npip install pyqt5  # pyqt5 can be installed via pip on python3\npip install labelme\n```\n\n### Docker\n\nYou need install [docker](https://www.docker.com), then run below:\n\n```bash\nwget https://raw.githubusercontent.com/wkentaro/labelme/master/labelme/cli/on_docker.py -O labelme_on_docker\nchmod u+x labelme_on_docker\n\n# Maybe you need http://sourabhbajaj.com/blog/2017/02/07/gui-applications-docker-mac/ on macOS\n./labelme_on_docker examples/tutorial/apc2016_obj3.jpg -O examples/tutorial/apc2016_obj3.json\n./labelme_on_docker examples/semantic_segmentation/data_annotated\n```\n\n### Ubuntu\n\n```bash\n# Ubuntu 14.04 / Ubuntu 16.04\n# Python2\n# sudo apt-get install python-qt4  # PyQt4\nsudo apt-get install python-pyqt5  # PyQt5\nsudo pip install labelme\n# Python3\nsudo apt-get install python3-pyqt5  # PyQt5\nsudo pip3 install labelme\n```\n\n### macOS\n\n```bash\n# macOS Sierra\nbrew install pyqt  # maybe pyqt5\npip install labelme  # both python2/3 should work\n\n# or install standalone executable / app\nbrew install wkentaro/labelme/labelme\nbrew cask install wkentaro/labelme/labelme\n```\n\n\n## Usage\n\nRun `labelme --help` for detail.  \nThe annotations are saved as a [JSON](http://www.json.org/) file.\n\n```bash\nlabelme  # just open gui\n\n# tutorial (single image example)\ncd examples/tutorial\nlabelme apc2016_obj3.jpg  # specify image file\nlabelme apc2016_obj3.jpg -O apc2016_obj3.json  # close window after the save\nlabelme apc2016_obj3.jpg --nodata  # not include image data but relative image path in JSON file\nlabelme apc2016_obj3.jpg \\\n  --labels highland_6539_self_stick_notes,mead_index_cards,kong_air_dog_squeakair_tennis_ball  # specify label list\n\n# semantic segmentation example\ncd examples/semantic_segmentation\nlabelme data_annotated/  # Open directory to annotate all images in it\nlabelme data_annotated/ --labels labels.txt  # specify label list with a file\n```\n\nFor more advanced usage, please refer to the examples:\n\n* [Tutorial (Single Image Example)](https://github.com/wkentaro/labelme/blob/master/examples/tutorial)\n* [Semantic Segmentation Example](https://github.com/wkentaro/labelme/blob/master/examples/semantic_segmentation)\n* [Instance Segmentation Example](https://github.com/wkentaro/labelme/blob/master/examples/instance_segmentation)\n\n\n## FAQ\n\n- **How to convert JSON file to numpy array?** See [examples/tutorial](https://github.com/wkentaro/labelme/blob/master/examples/tutorial#convert-to-dataset).\n- **How to load label PNG file?** See [examples/tutorial](https://github.com/wkentaro/labelme/blob/master/examples/tutorial#how-to-load-label-png-file).\n- **How to get annotations for semantic segmentation?** See [examples/semantic_segmentation](https://github.com/wkentaro/labelme/blob/master/examples/semantic_segmentation).\n- **How to get annotations for instance segmentation?** See [examples/instance_segmentation](https://github.com/wkentaro/labelme/blob/master/examples/instance_segmentation).\n\n\n## Screencast\n\n<img src=\"https://github.com/wkentaro/labelme/blob/master/.readme/screencast.gif?raw=true\" width=\"70%\"/>\n\n\n## Testing\n\n```bash\npip install hacking pytest pytest-qt\nflake8 .\npytest -v tests\n```\n\n\n## How to build standalone executable\n\nBelow shows how to build the standalone executable on macOS, Linux and Windows.  \nAlso, there are pre-built executables in\n[the release section](https://github.com/wkentaro/labelme/releases).\n\n```bash\n# Setup conda\nconda create --name labelme python=3.6\nconda activate labelme\n\n# Build the standalone executable\npip install .\npip uninstall -y matplotlib\npip install pyinstaller\npyinstaller labelme.spec\ndist/labelme --version\n```\n\n\n## Acknowledgement\n\nThis repo is the fork of [mpitid/pylabelme](https://github.com/mpitid/pylabelme),\nwhose development has already stopped.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9022:09BF:AB5DE:2C7CE1:6AB920EF"},"text_sha256":"0ac51697a3914c85fab35863dd49cd2bb4a3fa56ec53d7787d07a23641aa01c3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3336","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17B29F9:1BD1903:6AB92880"},"commit":{"sha":"e5b78403865e5130446833080469e0ef86c28ad7","url":"https://github.com/wkentaro/labelme/commit/e5b78403865e5130446833080469e0ef86c28ad7","date":"2026-06-30T15:26:58Z","author_date":"2026-06-30T15:26:58Z","committer_date":"2026-06-30T15:26:58Z","tree_sha":"5d8a627bf34c4412325a26c8885c04717afac271","message_first_line":"docs: document the CHANGELOG.md convention in AGENTS.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3335","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0917:76AED:17D97C7:1BF8863:6AB92881"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11953,"blob_sha":"24d4045fa69ef2148bfc237dbcedd0ea145465a1","priority":0},{"path":"docs/adr/0003-platform-support-policy.md","size":3190,"blob_sha":"e8a579d9b0b9777b95e8fce9a14d8e32ea87b773","priority":1}],"documents":[{"path":"README.md","size":11953,"blob_sha":"24d4045fa69ef2148bfc237dbcedd0ea145465a1","priority":0,"status":200,"text":"<h1 align=\"center\">\n  <img src=\"labelme/icons/icon-256.png\" width=\"200\" height=\"200\"><br/>labelme\n<\/h1>\n\n<h4 align=\"center\">\n  Image annotation with Python.\n<\/h4>\n\n<div align=\"center\">\n  <a href=\"https://pypi.python.org/pypi/labelme\"><img src=\"https://img.shields.io/pypi/v/labelme.svg\"><\/a>\n  <!-- <a href=\"https://pypi.org/project/labelme\"><img src=\"https://img.shields.io/pypi/pyversions/labelme.svg\"><\/a> -->\n  <a href=\"https://github.com/wkentaro/labelme/actions\"><img src=\"https://github.com/wkentaro/labelme/actions/workflows/test.yml/badge.svg?branch=main&event=push\"><\/a>\n  <a href=\"https://discord.com/invite/uAjxGcJm83\"><img src=\"https://dcbadge.limes.pink/api/server/uAjxGcJm83?style=flat\"><\/a>\n<\/div>\n\n<div align=\"center\">\n  <a href=\"#installation\"><b>Installation<\/b><\/a>\n  | <a href=\"#usage\"><b>Usage<\/b><\/a>\n  | <a href=\"#examples\"><b>Examples<\/b><\/a>\n  | <a href=\"https://labelme.io\"><b>labelme.io ↗<\/b><\/a>\n  <!-- | <a href=\"https://github.com/wkentaro/labelme/discussions\"><b>Community<\/b><\/a> -->\n  <!-- | <a href=\"https://www.youtube.com/playlist?list=PLI6LvFw0iflh3o33YYnVIfOpaO0hc5Dzw\"><b>Youtube FAQ<\/b><\/a> -->\n<\/div>\n\n<br/>\n\n<div align=\"center\">\n  <img src=\"examples/instance_segmentation/.readme/annotation.jpg\" width=\"70%\">\n<\/div>\n\n## Description\n\nLabelme is a graphical image annotation tool inspired by <http://labelme.csail.mit.edu>.\\\nIt is written in Python and uses Qt for its graphical interface.\n\n> Looking for a simple install without Python or Qt? Get the standalone app at **[labelme.io](https://labelme.io)**.\n\n<img src=\"examples/instance_segmentation/data_dataset_voc/JPEGImages/2011_000006.jpg\" width=\"19%\" /> <img src=\"examples/instance_segmentation/data_dataset_voc/SegmentationClass/2011_000006.png\" width=\"19%\" /> <img src=\"examples/instance_segmentation/data_dataset_voc/SegmentationClassVisualization/2011_000006.jpg\" width=\"19%\" /> <img src=\"examples/instance_segmentation/data_dataset_voc/SegmentationObject/2011_000006.png\" width=\"19%\" /> <img src=\"examples/instance_segmentation/data_dataset_voc/SegmentationObjectVisualization/2011_000006.jpg\" width=\"19%\" />\\\n<i>VOC dataset example of instance segmentation.<\/i>\n\n<img src=\"examples/semantic_segmentation/.readme/annotation.jpg\" width=\"30%\" /> <img src=\"examples/bbox_detection/.readme/annotation.jpg\" width=\"30%\" /> <img src=\"examples/classification/.readme/annotation_cat.jpg\" width=\"35%\" />\\\n<i>Other examples (semantic segmentation, bbox detection, and classification).<\/i>\n\n<img src=\"https://user-images.githubusercontent.com/4310419/47907116-85667800-de82-11e8-83d0-b9f4eb33268f.gif\" width=\"30%\" /> <img src=\"https://user-images.githubusercontent.com/4310419/47922172-57972880-deae-11e8-84f8-e4324a7c856a.gif\" width=\"30%\" /> <img src=\"https://user-images.githubusercontent.com/14256482/46932075-92145f00-d080-11e8-8d09-2162070ae57c.png\" width=\"32%\" />\\\n<i>Various primitives (polygon, rectangle, circle, line, and point).<\/i>\n\n<img src=\"https://github.com/user-attachments/assets/53bf09db-b097-48b7-9f32-ab490da5ac53\" width=\"32%\" />\n<p><i>Multi-language support (English, 中文, 日本語, 한국어, Deutsch, Français, and more).<\/i><\/p>\n\n## Features\n\n- [x] Image annotation for polygon, rectangle, circle, line and point ([tutorial](examples/tutorial))\n- [x] Image flag annotation for classification and cleaning ([#166](https://github.com/wkentaro/labelme/pull/166))\n- [x] Video annotation ([video annotation](examples/video_annotation))\n- [x] GUI customization (predefined labels / flags, auto-saving, label validation, etc) ([#144](https://github.com/wkentaro/labelme/pull/144))\n- [x] Exporting VOC-format dataset for [semantic segmentation](examples/semantic_segmentation), [instance segmentation](examples/instance_segmentation)\n- [x] Exporting COCO-format dataset for [instance segmentation](examples/instance_segmentation)\n- [x] AI-assisted point-to-polygon/mask annotation by SAM, EfficientSAM models\n- [x] AI text-to-annotation by YOLO-world, SAM3 models\n\n**🌏 Available in 20 languages** - English · 日本語 · 한국어 · 简体中文 · 繁體中文 · Deutsch · Ελληνικά · Français · Español · Italiano · Português · Nederlands · Magyar · Русский · ไทย · Tiếng Việt · Türkçe · Українська · Polski · فارسی (`LANG=ja_JP.UTF-8 labelme`)\n\n## Installation\n\nThere are 3 options to install labelme:\n\n### Option 1: Using pip\n\nFor more detail, check [\"Install Labelme using Terminal\"](https://www.labelme.io/docs/install-labelme-terminal)\n\n```bash\npip install labelme\n\n# To install the latest version from GitHub:\n# pip install git+https://github.com/wkentaro/labelme.git\n```\n\n### Option 2: Using standalone executable (Easiest)\n\nIf you're willing to invest in the convenience of simple installation without any dependencies (Python, Qt),\nyou can download the standalone executable from [\"Install Labelme as App\"](https://www.labelme.io/docs/install-labelme-app).\n\nIt's a one-time payment for lifetime access, and it helps us to maintain this project.\n\n### Option 3: Linux distribution packages\n\nOn some Linux distributions, labelme is also packaged in the system's native repository and can be installed with the distribution's standard package tooling. The badge below tracks which distributions currently ship labelme and which version each one provides:\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/labelme.svg)](https://repology.org/project/labelme/versions)\n\n### Supported Python and platforms\n\n|        | Supported (v7.x)               | Maintenance (v6.3.x) |\n| ------ | ------------------------------ | -------------------- |\n| Python | 3.11 - 3.14                    | 3.10 - 3.11          |\n| Qt     | Qt6 (PySide6)                  | Qt5                  |\n| OS     | 64-bit macOS / Windows / Linux | older OSes           |\n\nlabelme follows [SPEC 0](https://scientific-python.org/specs/spec-0000/) (the successor to [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html)) for dropping Python versions, in step with its core scientific dependencies (numpy, scipy, scikit-image). v6.3.x is the maintenance line for Qt5 and Python 3.10 stragglers.\n\nv6.3.x receives critical fixes only, on a best-effort basis with no release cadence or SLA. \"Critical\" is limited to:\n\n- security vulnerabilities,\n- data-loss or annotation-corruption bugs,\n- install or launch breakage caused by upstream dependency drift.\n\nFeature backports and non-critical bugs are out of scope; all new development happens on v7.x.\n\n### Upgrading from v6.x to v7\n\nv7.0.0 raises the platform floor:\n\n- **Qt binding:** the GUI moved from PyQt5 (Qt5) to PySide6 (Qt6). `pip install labelme` now pulls PySide6 instead of PyQt5.\n- **Python:** the minimum is now Python 3.11 (3.10 is dropped).\n- **OS:** Qt6 requires a 64-bit macOS, Windows, or Linux; older OSes that only Qt5 supported are no longer covered.\n- **No public Python API:** labelme is an application, not a library, and exposes no stable Python API. Its internal modules were privatized in v7 (renamed to underscore-prefixed names), so `import labelme.app`, `labelme.utils`, `labelme.widgets`, and similar imports no longer work. If you previously imported labelme internals, pin `labelme<7` and vendor the code you need; see [`examples/utils.py`](examples/utils.py) for copy-and-adapt reference code that reads the JSON annotation format without depending on labelme.\n\nIf you need to stay on PyQt5/Qt5, Python 3.10, or an older OS, pin to the v6.3.x maintenance line:\n\n```bash\npip install 'labelme<7'\n```\n\nAll previous releases remain installable from [PyPI](https://pypi.org/project/labelme/#history), so existing pins keep working.\n\nv7.0.0 also changes config parsing:\n\n- **Config booleans:** `~/.labelmerc` is now parsed with ruamel.yaml (YAML 1.2), so the boolean spellings `yes`/`no`/`on`/`off` (in any capitalization) are read as strings rather than booleans. If you set any boolean option this way, switch it to `true`/`false`.\n\n### Public interface\n\nlabelme is an application. The interfaces you can build on and that we keep stable are:\n\n- the **command-line interface** (`labelme ...`),\n- the **on-disk JSON annotation format**, and\n- the **`~/.labelmerc` config format**.\n\nEverything else, including the Python import surface, is internal and may change or be renamed without notice. To consume annotations from your own code, read the JSON format directly (see [`examples/utils.py`](examples/utils.py)).\n\n## Usage\n\nRun `labelme --help` for detail.\\\nThe annotations are saved as a [JSON](http://www.json.org/) file.\n\n```bash\nlabelme  # just open gui\n\n# tutorial (single image example)\ncd examples/tutorial\nlabelme apc2016_obj3.jpg  # specify image file\nlabelme apc2016_obj3.jpg --output annotations/  # save annotation JSON files to a directory\nlabelme apc2016_obj3.jpg --with-image-data  # include image data in JSON file\nlabelme apc2016_obj3.jpg \\\n  --labels highland_6539_self_stick_notes,mead_index_cards,kong_air_dog_squeakair_tennis_ball  # specify label list\n\n# semantic segmentation example\ncd examples/semantic_segmentation\nlabelme data_annotated/  # Open directory to annotate all images in it\nlabelme data_annotated/ --labels labels.txt  # specify label list with a file\n```\n\n### Command Line Arguments\n\n- `--output` specifies the location that annotations will be written to. If the location ends with .json, a single annotation will be written to this file. Only one image can be annotated if a location is specified with .json. If the location does not end with .json, the program will assume it is a directory. Annotations will be stored in this directory with a name that corresponds to the image that the annotation was made on.\n- The first time you run labelme, it will create a config file at `~/.labelmerc`. Add only the settings you want to override. For all available options and their defaults, see [`default_config.yaml`](labelme/_config/default_config.yaml). If you would prefer to use a config file from another location, you can specify this file with the `--config` flag.\n- Without the `--no-sort-labels` flag, the program will list labels in alphabetical order. When the program is run with this flag, it will display labels in the order that they are provided.\n- Flags are assigned to an entire image. [Example](examples/classification)\n- Labels are assigned to a single polygon. [Example](examples/bbox_detection)\n\n### FAQ\n\n- **How to convert JSON file to numpy array?** See [examples/tutorial](examples/tutorial#convert-to-dataset).\n- **How to load label PNG file?** See [examples/tutorial](examples/tutorial#how-to-load-label-png-file).\n- **How to get annotations for semantic segmentation?** See [examples/semantic_segmentation](examples/semantic_segmentation).\n- **How to get annotations for instance segmentation?** See [examples/instance_segmentation](examples/instance_segmentation).\n\n## Examples\n\n- [Image Classification](examples/classification)\n- [Bounding Box Detection](examples/bbox_detection)\n- [Semantic Segmentation](examples/semantic_segmentation)\n- [Instance Segmentation](examples/instance_segmentation)\n- [Video Annotation](examples/video_annotation)\n\n## How to build standalone executable\n\n```bash\nLABELME_PATH=./labelme\nOSAM_PATH=$(python -c 'import os, osam; print(os.path.dirname(osam.__file__))')\npip install 'numpy<2.0'  # numpy>=2.0 causes build errors (see #1532)\npyinstaller labelme/labelme/__main__.py \\\n  --name=Labelme \\\n  --windowed \\\n  --noconfirm \\\n  --specpath=build \\\n  --add-data=$(OSAM_PATH)/_models/yoloworld/clip/bpe_simple_vocab_16e6.txt.gz:osam/_models/yoloworld/clip \\\n  --add-data=$(LABELME_PATH)/_config/default_config.yaml:labelme/_config \\\n  --add-data=$(LABELME_PATH)/icons/*:labelme/icons \\\n  --add-data=$(LABELME_PATH)/translate/*:translate \\\n  --icon=$(LABELME_PATH)/icons/icon-256.png \\\n  --onedir\n```\n\n## Acknowledgement\n\nThis repo is the fork of [mpitid/pylabelme](https://github.com/mpitid/pylabelme).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5FA8:386840:17E680:5D0A0D:6AB920EF"},"text_sha256":"f6fc9ae4bc6090d231ad205ed27b647db2e3c301e10d042feab022bbb3730de7"},{"path":"docs/adr/0003-platform-support-policy.md","size":3190,"blob_sha":"e8a579d9b0b9777b95e8fce9a14d8e32ea87b773","priority":1,"status":200,"text":"# The Python support window follows SPEC 0 as the deps ship it (floor 3.11), not the bare calendar (3.12)\n\nlabelme drops Python minors on the [SPEC 0](https://scientific-python.org/specs/spec-0000/)\nschedule (the successor to [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html)),\nanchored to what its core scientific dependencies (numpy, scipy, scikit-image)\nactually ship rather than to the bare 3-years-after-release date. For v7.0.0 that\nmakes the floor **Python 3.11** (`requires-python = \">=3.11\"`). The strict SPEC 0\ncalendar would say 3.12 (3.11 passed its three-year mark around October 2025), but\nnumpy, scipy, and scikit-image still publish 3.11 wheels, so 3.11 is the real\necosystem floor and the one labelme follows. v6.3.x is the maintenance line for the\nQt5 and Python 3.10 stragglers left behind by v7.0.0, receiving critical fixes only.\n\nThis is an application policy, not a library one: labelme has effectively no\ndownstream packages, so the value of SPEC 0 here is not coordination but honesty.\nThe dependency stack decides what can be shipped, and SPEC 0 describes how that\nstack moves. When numpy/scipy/scikit-image drop 3.11, labelme raises its floor to\nmatch in the next release that crosses the boundary.\n\n## Considered options\n\n- **Keep `>=3.10`** (rejected): numpy, scipy, and scikit-image have all dropped 3.10\n  at HEAD. A 3.10 install silently resolves to stale science (numpy 2.2.6 /\n  scipy 1.15.3 / scikit-image 0.25.2) and required a dedicated\n  `onnxruntime<1.24; python_version < '3.11'` constraint to stay installable.\n  Advertising 3.10 is a promise the dependency stack no longer keeps.\n- **Jump to `>=3.12` to honor the strict SPEC 0 calendar** (rejected): this is\n  stricter than the scientific ecosystem itself. numpy/scipy/scikit-image still\n  ship 3.11 wheels, so dropping to 3.12 would strand users the dependency stack\n  still serves, for no functional gain. The calendar is the schedule; the wheels\n  are the reality, and the reality is one minor more generous right now.\n- **Follow Python's upstream end-of-life (~5 years) instead of SPEC 0** (rejected):\n  this over-promises for a package built on the scientific stack. Python 3.11 is in\n  upstream EOL into 2027, but the deps will drop it well before then, so an\n  EOL-based pledge could not be honored with current dependencies.\n- **Adopt SPEC 0 anchored to dependency practice, floor 3.11** (chosen): the only\n  policy that is both principled (a named, citable schedule) and true (matches the\n  wheels labelme can actually install today).\n\n## Consequences\n\n- v6.3.x becomes a standing maintenance line for the Qt5 and Python 3.10\n  stragglers v7.0.0 leaves behind, receiving critical fixes only.\n- The floor moves again when the first of numpy/scipy/scikit-image drops 3.11;\n  until then labelme stays one minor below the strict SPEC 0 calendar.\n- The CI minimum-version matrix entry tracks `requires-python`, so dropping 3.10\n  meant raising the lowest tested Python (and the `.python-version` dev pin) to\n  3.11 in lockstep.\n- The `onnxruntime<1.24; python_version < '3.11'` constraint was removed: with no\n  sub-3.11 interpreter left, there is nothing for it to constrain.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF28:375F4:17649D:5C8928:6AB920F2"},"text_sha256":"64d8a72f87cae451981f870824453624aa6aab526fd61ee8daf897e8b2daac43"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cmusatyalab/openface","input_row":{"repository":"cmusatyalab/openface","url":"https://github.com/cmusatyalab/openface","name":"openface","owner":"cmusatyalab","description":"Face recognition with deep neural networks.","language":"Lua","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":15443,"issues":383,"created_at":"2015-09-16T12:47:27Z","updated_at":"2026-09-26T05:31:22Z","first_commit_at":"2015-09-18T20:57:25Z","last_commit_at":"2026-07-18T15:27:00Z","activity_months":129.94999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:26.116Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cmusatyalab/openface","visibility":"public","created_at":"2015-09-16T12:47:27Z","updated_at":"2026-09-26T05:31:22Z","private":false,"fork":false,"archived":false,"stargazers_count":15443,"open_issues_count":2,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3334","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:17CF389:1BEE168:6AB92882"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3333","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:17E1C56:1C003A0:6AB92882"},"commit":{"sha":"bb377aac51b9ac335b6e5be3098fca4ecc815b71","url":"https://github.com/cmusatyalab/openface/commit/bb377aac51b9ac335b6e5be3098fca4ecc815b71","date":"2018-03-02T00:03:55Z","author_date":"2018-03-02T00:03:55Z","committer_date":"2018-03-02T00:03:55Z","tree_sha":"603563c7e260ee3ca2f771bea30a3316ec208745","message_first_line":"Mention inconsistencies between the pre-trained models and the model definitions for #351 and #349"},"tree_request_status":200,"tree_rate":{"github_remaining":"3332","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17B72A8:1BD5742:6AB92882"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4526,"blob_sha":"e93fe17abe0faca67dc8995ce029521e02bd0f2a","priority":0}],"documents":[{"path":"README.md","size":4526,"blob_sha":"e93fe17abe0faca67dc8995ce029521e02bd0f2a","priority":0,"status":200,"text":"# OpenFace • [![Build Status][travis-image]][travis] [![Release][release-image]][releases] [![License][license-image]][license] [![Gitter][gitter-image]][gitter]\n\n*Free and open source face recognition with\ndeep neural networks.*\n\n\n[travis-image]: https://travis-ci.org/cmusatyalab/openface.svg?branch=master\n[travis]: http://travis-ci.org/cmusatyalab/openface\n\n[release-image]: http://img.shields.io/badge/release-0.2.1-blue.svg?style=flat\n[releases]: https://github.com/cmusatyalab/openface/releases\n\n[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat\n[license]: LICENSE\n\n[gitter-image]: https://badges.gitter.im/Join%20Chat.svg\n[gitter]: https://gitter.im/cmusatyalab/openface\n\n---\n\n+ Website: http://cmusatyalab.github.io/openface/\n+ [API Documentation](http://openface-api.readthedocs.org/en/latest/index.html)\n+ Join the\n  [cmu-openface group](https://groups.google.com/forum/#!forum/cmu-openface)\n  or the\n  [gitter chat](https://gitter.im/cmusatyalab/openface)\n  for discussions and installation issues.\n+ Development discussions and bugs reports are on the\n  [issue tracker](https://github.com/cmusatyalab/openface/issues).\n\n---\n\nThis research was supported by the National Science Foundation (NSF)\nunder grant number CNS-1518865.  Additional support\nwas provided by the Intel Corporation, Google, Vodafone, NVIDIA, and the\nConklin Kistler family fund.  Any opinions, findings, conclusions or\nrecommendations expressed in this material are those of the authors\nand should not be attributed to their employers or funding sources.\n\n# What's in this repository?\n+ [batch-represent](https://github.com/cmusatyalab/openface/tree/master/batch-represent): Generate representations from\n  a batch of images. [Example directory structure.](https://gist.github.com/bamos/f03037f5df7e05ad0cc8)\n+ [demos/web](https://github.com/cmusatyalab/openface/tree/master/demos/web): Real-time web demo.\n+ [demos/compare.py](https://github.com/cmusatyalab/openface/tree/master/demos/compare.py): Demo to compare two images.\n+ [demos/vis-outputs.lua](https://github.com/cmusatyalab/openface/tree/master/demos/vis-outputs.lua): Demo to\n  visualize the network's outputs.\n+ [demos/classifier.py](https://github.com/cmusatyalab/openface/tree/master/demos/classifier.py): Demo to train and use classifiers.\n+ [demos/classifier_webcam.py](https://github.com/cmusatyalab/openface/blob/master/demos/classifier_webcam.py): Demo to use a trained classifier on a webcam stream.\n+ [evaluation](https://github.com/cmusatyalab/openface/blob/master/evaluation): LFW accuracy evaluation scripts.\n+ [openface](https://github.com/cmusatyalab/openface/tree/master/openface): Python library code.\n+ [models](https://github.com/cmusatyalab/openface/tree/master/models): Model directory for openface and 3rd party libraries.\n+ [tests](https://github.com/cmusatyalab/openface/tree/master/tests): Tests for scripts and library code, including neural network training.\n+ [training](https://github.com/cmusatyalab/openface/tree/master/training): Scripts to train new OpenFace neural network models.\n+ [util](https://github.com/cmusatyalab/openface/tree/master/util): Utility scripts.\n\n# Citations\n\nPlease cite OpenFace in your publications if it helps your research.\nThe following is a [BibTeX](http://www.bibtex.org/) and plaintext reference for our\n[OpenFace tech report](http://reports-archive.adm.cs.cmu.edu/anon/anon/2016/CMU-CS-16-118.pdf).\n\n```\n@techreport{amos2016openface,\n  title={OpenFace: A general-purpose face recognition\n    library with mobile applications},\n  author={Amos, Brandon and Bartosz Ludwiczuk and Satyanarayanan, Mahadev},\n  year={2016},\n  institution={CMU-CS-16-118, CMU School of Computer Science},\n}\n\nB. Amos, B. Ludwiczuk, M. Satyanarayanan,\n\"Openface: A general-purpose face recognition library with mobile applications,\"\nCMU-CS-16-118, CMU School of Computer Science, Tech. Rep., 2016.\n```\n\n# Licensing\nUnless otherwise stated, the source code and trained Torch and Python\nmodel files are copyright Carnegie Mellon University and licensed\nunder the [Apache 2.0 License](./LICENSE).\nPortions from the following third party sources have\nbeen modified and are included in this repository.\nThese portions are noted in the source files and are\ncopyright their respective authors with\nthe licenses listed.\n\nProject | Modified | License\n---|---|---|\n[Atcold/torch-TripletEmbedding](https://github.com/Atcold/torch-TripletEmbedding) | No | MIT\n[facebook/fbnn](https://github.com/facebook/fbnn) | Yes | BSD\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF26:2B291E:17D509:5CF93E:6AB920EF"},"text_sha256":"b0559f3291f5a1c3b50fb33db6e97364cd88fdb44611c8588469688752fc772d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3331","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0833:1DB627:185483A:1C73A53:6AB92883"},"commit":{"sha":"051475225b5ae335918621077313085bbb7ab5a0","url":"https://github.com/cmusatyalab/openface/commit/051475225b5ae335918621077313085bbb7ab5a0","date":"2024-10-04T12:58:31Z","author_date":"2024-10-04T12:58:31Z","committer_date":"2024-10-04T12:58:31Z","tree_sha":"f3397bb1e7678042d8d9c7b2371ce00b6429a951","message_first_line":"Merge pull request #462 from T0ny8576/pytorch-new"},"tree_request_status":200,"tree_rate":{"github_remaining":"3330","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A6:71E0C:17D4F95:1BF2B91:6AB92884"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4621,"blob_sha":"12f526b962b2a66104cb2134e454d0be0bff563d","priority":0}],"documents":[{"path":"README.md","size":4621,"blob_sha":"12f526b962b2a66104cb2134e454d0be0bff563d","priority":0,"status":200,"text":"# OpenFace • [![Build Status][travis-image]][travis] [![Release][release-image]][releases] [![License][license-image]][license] [![Gitter][gitter-image]][gitter]\n\n*Free and open source face recognition with\ndeep neural networks.*\n\n\n[travis-image]: https://travis-ci.org/cmusatyalab/openface.svg?branch=master\n[travis]: http://travis-ci.org/cmusatyalab/openface\n\n[release-image]: http://img.shields.io/badge/release-0.2.1-blue.svg?style=flat\n[releases]: https://github.com/cmusatyalab/openface/releases\n\n[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat\n[license]: LICENSE\n\n[gitter-image]: https://badges.gitter.im/Join%20Chat.svg\n[gitter]: https://gitter.im/cmusatyalab/openface\n\n---\n\n+ Website: http://cmusatyalab.github.io/openface/\n+ [API Documentation](http://openface-api.readthedocs.org/en/latest/index.html)\n+ Join the\n  [cmu-openface group](https://groups.google.com/forum/#!forum/cmu-openface)\n  or the\n  [gitter chat](https://gitter.im/cmusatyalab/openface)\n  for discussions and installation issues.\n+ Development discussions and bugs reports are on the\n  [issue tracker](https://github.com/cmusatyalab/openface/issues).\n\n---\n\nThis research was supported by the National Science Foundation (NSF)\nunder grant number CNS-1518865.  Additional support\nwas provided by the Intel Corporation, Google, Vodafone, NVIDIA, and the\nConklin Kistler family fund.  Any opinions, findings, conclusions or\nrecommendations expressed in this material are those of the authors\nand should not be attributed to their employers or funding sources.\n\n# What's in this repository?\n+ [batch-represent](https://github.com/cmusatyalab/openface/tree/master/batch-represent): Generate representations from\n  a batch of images. [Example directory structure.](https://gist.github.com/bamos/f03037f5df7e05ad0cc8)\n+ [demos/web](https://github.com/cmusatyalab/openface/tree/master/demos/web): Real-time web demo.\n+ [demos/compare.py](https://github.com/cmusatyalab/openface/tree/master/demos/compare.py): Demo to compare two images.\n+ [demos/vis-outputs.lua](https://github.com/cmusatyalab/openface/tree/master/demos/vis-outputs.lua): Demo to\n  visualize the network's outputs.\n+ [demos/classifier.py](https://github.com/cmusatyalab/openface/tree/master/demos/classifier.py): Demo to train and use classifiers.\n+ [demos/classifier_webcam.py](https://github.com/cmusatyalab/openface/blob/master/demos/classifier_webcam.py): Demo to use a trained classifier on a webcam stream.\n+ [evaluation](https://github.com/cmusatyalab/openface/blob/master/evaluation): LFW accuracy evaluation scripts.\n+ [openface](https://github.com/cmusatyalab/openface/tree/master/openface): Python library code.\n+ [models](https://github.com/cmusatyalab/openface/tree/master/models): Model directory for openface and 3rd party libraries.\n+ [tests](https://github.com/cmusatyalab/openface/tree/master/tests): Tests for scripts and library code, including neural network training.\n+ [training](https://github.com/cmusatyalab/openface/tree/master/training): Scripts to train new OpenFace neural network models.\n+ [util](https://github.com/cmusatyalab/openface/tree/master/util): Utility scripts.\n\n# Citations\n\nPlease cite OpenFace in your publications if it helps your research.\nThe following is a [BibTeX](http://www.bibtex.org/) and plaintext reference for our\n[OpenFace tech report](http://reports-archive.adm.cs.cmu.edu/anon/anon/2016/CMU-CS-16-118.pdf).\n\n```\n@techreport{amos2016openface,\n  title={OpenFace: A general-purpose face recognition\n    library with mobile applications},\n  author={Amos, Brandon and Bartosz Ludwiczuk and Satyanarayanan, Mahadev},\n  year={2016},\n  institution={CMU-CS-16-118, CMU School of Computer Science},\n}\n\nB. Amos, B. Ludwiczuk, M. Satyanarayanan,\n\"Openface: A general-purpose face recognition library with mobile applications,\"\nCMU-CS-16-118, CMU School of Computer Science, Tech. Rep., 2016.\n```\n\n# Licensing\nUnless otherwise stated, the source code and trained Torch and Python\nmodel files are copyright Carnegie Mellon University and licensed\nunder the [Apache 2.0 License](./LICENSE).\nPortions from the following third party sources have\nbeen modified and are included in this repository.\nThese portions are noted in the source files and are\ncopyright their respective authors with\nthe licenses listed.\n\nProject | Modified | License\n---|---|---|\n[Atcold/torch-TripletEmbedding](https://github.com/Atcold/torch-TripletEmbedding) | No | MIT\n[facebook/fbnn](https://github.com/facebook/fbnn) | Yes | BSD\n[dlib-models](https://github.com/davisking/dlib-models) (68 face landmark detector) | No | CC0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BA80:2B291E:17D520:5CF975:6AB920F5"},"text_sha256":"ad573a412cc2079a4d4c4f0ed20baf739bcb3ae0d8a3169d365600952b34009b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"aleju/imgaug","input_row":{"repository":"aleju/imgaug","url":"https://github.com/aleju/imgaug","name":"imgaug","owner":"aleju","description":"Image augmentation for machine learning experiments.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":14740,"issues":518,"created_at":"2015-07-10T20:31:33Z","updated_at":"2026-09-27T09:39:50Z","first_commit_at":"2015-07-10T20:31:34Z","last_commit_at":"2020-06-01T14:58:26Z","activity_months":58.729999999999997,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:28.795Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"aleju/imgaug","visibility":"public","created_at":"2015-07-10T20:31:33Z","updated_at":"2026-09-27T09:39:50Z","private":false,"fork":false,"archived":false,"stargazers_count":14740,"open_issues_count":310,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3329","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084E:280FBC:17A2862:1BC04F1:6AB92884"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3328","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:176AE74:1B89D50:6AB92885"},"commit":{"sha":"46811248abc7bbcedb2a3c55f4ec9c2b21176e44","url":"https://github.com/aleju/imgaug/commit/46811248abc7bbcedb2a3c55f4ec9c2b21176e44","date":"2018-05-24T16:46:51Z","author_date":"2018-05-24T16:46:51Z","committer_date":"2018-05-24T16:46:51Z","tree_sha":"bfe69c0a5704b826ce6bae72dfd690744c41bed3","message_first_line":"Improve tests for Affine"},"tree_request_status":200,"tree_rate":{"github_remaining":"3327","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:176AE9D:1B89D8E:6AB92885"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":34958,"blob_sha":"f85f38066a395a27bd6938bee17367e5476da1cc","priority":0}],"documents":[{"path":"README.md","size":34958,"blob_sha":"f85f38066a395a27bd6938bee17367e5476da1cc","priority":0,"status":200,"text":"# imgaug\n\nThis python library helps you with augmenting images for your machine learning projects.\nIt converts a set of input images into a new, much larger set of slightly altered images.\n\n[![Build Status](https://travis-ci.org/aleju/imgaug.svg?branch=master)](https://travis-ci.org/aleju/imgaug)\n[![codecov](https://codecov.io/gh/aleju/imgaug/branch/master/graph/badge.svg)](https://codecov.io/gh/aleju/imgaug)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1370ce38e99e40af842d47a8dd721444)](https://www.codacy.com/app/aleju/imgaug?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=aleju/imgaug&amp;utm_campaign=Badge_Grade)\n\n![64 quokkas](examples_grid.jpg?raw=true \"64 quokkas\")\n\nFeatures:\n* Most standard augmentation techniques available.\n* Techniques can be applied to both images and keypoints/landmarks on images.\n* Define your augmentation sequence once at the start of the experiment, then apply it many times.\n* Define flexible stochastic ranges for each augmentation, e.g. \"rotate each image by a value between -45 and 45 degrees\" or \"rotate each image by a value sampled from the normal distribution N(0, 5.0)\".\n* Easily convert all stochastic ranges to deterministic values in order to augment different batches of images in exactly the same way. (E.g. images and their respective heatmaps. If an image is rotated, you want its heatmap to be rotated by the exactly same amount.)\n* Optionally run the augmentations in background processes, improving performance of experiments.\n\nDocumentation:\n* [http://imgaug.readthedocs.io/en/latest/source/examples_basics.html](http://imgaug.readthedocs.io/en/latest/source/examples_basics.html) - Quick example code to use the library.\n* [http://imgaug.readthedocs.io/en/latest/source/augmenters.html](http://imgaug.readthedocs.io/en/latest/source/augmenters.html) - Example code for each augmentation technique.\n* [http://imgaug.readthedocs.io/en/latest/source/modules.html](http://imgaug.readthedocs.io/en/latest/source/modules.html) - API.\n* This README contains more examples. See further below.\n\nThe images below show examples for most augmentation techniques (values written in the form `(a, b)` mean that a value was randomly picked from the range `a <= x <= b`):\n\n![Noop](images/examples_noop.jpg?raw=true \"Noop\")\n![Crop top, right, bottom, left](images/examples_crop.jpg?raw=true \"Crop top, right, bottom, left\")\n![Pad top, right, bottom, left](images/examples_pad.jpg?raw=true \"Pad top, right, bottom, left\")\n![Fliplr](images/examples_fliplr.jpg?raw=true \"Fliplr\")\n![Flipud](images/examples_flipud.jpg?raw=true \"Flipud\")\n![Superpixels p_replace=1](images/examples_superpixels.jpg?raw=true \"Superpixels p_replace=1\")\n![Superpixels n_segments=100](images/examples_superpixels_2.jpg?raw=true \"Superpixels n_segments=100\")\n![Invert](images/examples_invert.jpg?raw=true \"Invert\")\n![Invert per_channel](images/examples_invert_2.jpg?raw=true \"Invert per_channel\")\n![Add](images/examples_add.jpg?raw=true \"Add\")\n![Add per channel](images/examples_add_2.jpg?raw=true \"Add per channel\")\n![AddToHueAndSaturation](images/examples_addtohueandsaturation.jpg?raw=true \"AddToHueAndSaturation\")\n![Multiply](images/examples_multiply.jpg?raw=true \"Multiply\")\n![Multiply per channel](images/examples_multiply_2.jpg?raw=true \"Multiply per channel\")\n![GaussianBlur](images/examples_gaussianblur.jpg?raw=true \"GaussianBlur\")\n![AverageBlur](images/examples_averageblur.jpg?raw=true \"AverageBlur\")\n![MedianBlur](images/examples_medianblur.jpg?raw=true \"MedianBlur\")\n![BilateralBlur sigma_color=250, sigma_space=250](images/examples_bilateralblur.jpg?raw=true \"BilateralBlur sigma_color=250, sigma_space=250\")\n![Sharpen alpha=1](images/examples_sharpen.jpg?raw=true \"Sharpen alpha=1\")\n![Emboss alpha=1](images/examples_emboss.jpg?raw=true \"Emboss alpha=1\")\n![EdgeDetect](images/examples_edgedetect.jpg?raw=true \"EdgeDetect\")\n![DirectedEdgeDetect alpha=1](images/examples_directededgedetect.jpg?raw=true \"DirectedEdgeDetect alpha=1\")\n![AdditiveGaussianNoise](images/examples_additivegaussiannoise.jpg?raw=true \"AdditiveGaussianNoise\")\n![AdditiveGaussianNoise per channel](images/examples_additivegaussiannoise_2.jpg?raw=true \"AdditiveGaussianNoise per channel\")\n![Dropout](images/examples_dropout.jpg?raw=true \"Dropout\")\n![Dropout per channel](images/examples_dropout_2.jpg?raw=true \"Dropout per channel\")\n![CoarseDropout p=0.2](images/examples_coarsedropout.jpg?raw=true \"CoarseDropout p=0.2\")\n![CoarseDropout p=0.2, per channel](images/examples_coarsedropout_2.jpg?raw=true \"CoarseDropout p=0.2, per channel\")\n![SaltAndPepper](images/examples_saltandpepper.jpg?raw=true \"SaltAndPepper\")\n![Salt](images/examples_salt.jpg?raw=true \"Salt\")\n![Pepper](images/examples_pepper.jpg?raw=true \"Pepper\")\n![CoarseSaltAndPepper p=0.2](images/examples_coarsesaltandpepper.jpg?raw=true \"CoarseSaltAndPepper p=0.2\")\n![CoarseSalt p=0.2](images/examples_coarsesalt.jpg?raw=true \"CoarseSalt p=0.2\")\n![CoarsePepper p=0.2](images/examples_coarsepepper.jpg?raw=true \"CoarsePepper p=0.2\")\n![ContrastNormalization](images/examples_contrastnormalization.jpg?raw=true \"ContrastNormalization\")\n![ContrastNormalization per channel](images/examples_contrastnormalization_2.jpg?raw=true \"ContrastNormalization per channel\")\n![Grayscale](images/examples_grayscale.jpg?raw=true \"Grayscale\")\n![PerspectiveTransform](images/examples_perspectivetransform.jpg?raw=true \"PerspectiveTransform\")\n![PiecewiseAffine](images/examples_piecewiseaffine.jpg?raw=true \"PiecewiseAffine\")\n![Affine: Scale](images/examples_affine_scale.jpg?raw=true \"Affine: Scale\")\n![Affine: Translate](images/examples_affine_translate.jpg?raw=true \"Affine: Translate\")\n![Affine: Rotate](images/examples_affine_rotate.jpg?raw=true \"Affine: Rotate\")\n![Affine: Shear](images/examples_affine_shear.jpg?raw=true \"Affine: Shear\")\n![Affine: Modes](images/examples_affine_modes.jpg?raw=true \"Affine: Modes\")\n![Affine: cval](images/examples_affine_cval.jpg?raw=true \"Affine: cval\")\n![Affine: all](images/examples_affine_all.jpg?raw=true \"Affine: all\")\n![ElasticTransformation sigma=0.2](images/examples_elastictransformation.jpg?raw=true \"ElasticTransformation sigma=0.2\")\n![Alpha with EdgeDetect1.0](images/examples_alpha.jpg?raw=true \"Alpha with EdgeDetect1.0\")\n![Alpha with EdgeDetect1.0 per channel](images/examples_alpha_2.jpg?raw=true \"Alpha with EdgeDetect1.0 per channel\")\n![SimplexNoiseAlpha with EdgeDetect1.0](images/examples_simplexnoisealpha.jpg?raw=true \"SimplexNoiseAlpha with EdgeDetect1.0\")\n![FrequencyNoiseAlpha with EdgeDetect1.0](images/examples_frequencynoisealpha.jpg?raw=true \"FrequencyNoiseAlpha with EdgeDetect1.0\")\n\n## Requirements and installation\n\nRequired packages:\n* six\n* numpy\n* scipy\n* scikit-image (`pip install -U scikit-image`)\n* OpenCV (i.e. `cv2`)\n\nOpenCV has to be manually installed. The other package should auto-install themselves.\n\nTo install, simply use `sudo pip install imgaug`. That version might be outdated though. To always get the newest version directly from github use `sudo pip install git+https://github.com/aleju/imgaug`.\nAlternatively, you can download the repository via `git clone https://github.com/aleju/imgaug` and install by using `python setup.py sdist && sudo pip install dist/imgaug-0.2.5.tar.gz`.\n\nTo deinstall the library, just execute `sudo pip uninstall imgaug`.\n\nThe library is currently only tested in python2.7, but the code is written so that it *should* run in python3 too.\n\n## Examples\n\nA standard machine learning situation.\nTrain on batches of images and augment each batch via crop, horizontal flip (\"Fliplr\") and gaussian blur:\n```python\nfrom imgaug import augmenters as iaa\n\nseq = iaa.Sequential([\n    iaa.Crop(px=(0, 16)), # crop images from each side by 0 to 16px (randomly chosen)\n    iaa.Fliplr(0.5), # horizontally flip 50% of the images\n    iaa.GaussianBlur(sigma=(0, 3.0)) # blur images with a sigma of 0 to 3.0\n])\n\nfor batch_idx in range(1000):\n    # 'images' should be either a 4D numpy array of shape (N, height, width, channels)\n    # or a list of 3D numpy arrays, each having shape (height, width, channels).\n    # Grayscale images must have shape (height, width, 1) each.\n    # All images must have numpy's dtype uint8. Values are expected to be in\n    # range 0-255.\n    images = load_batch(batch_idx)\n    images_aug = seq.augment_images(images)\n    train_on_images(images_aug)\n```\n\nApply heavy augmentations to images (used to create the image at the very top of this readme):\n```python\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nimport numpy as np\n\n# random example images\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# Sometimes(0.5, ...) applies the given augmenter in 50% of all cases,\n# e.g. Sometimes(0.5, GaussianBlur(0.3)) would blur roughly every second image.\nsometimes = lambda aug: iaa.Sometimes(0.5, aug)\n\n# Define our sequence of augmentation steps that will be applied to every image\n# All augmenters with per_channel=0.5 will sample one value _per image_\n# in 50% of all cases. In all other cases they will sample new values\n# _per channel_.\nseq = iaa.Sequential(\n    [\n        # apply the following augmenters to most images\n        iaa.Fliplr(0.5), # horizontally flip 50% of all images\n        iaa.Flipud(0.2), # vertically flip 20% of all images\n        # crop images by -5% to 10% of their height/width\n        sometimes(iaa.CropAndPad(\n            percent=(-0.05, 0.1),\n            pad_mode=ia.ALL,\n            pad_cval=(0, 255)\n        )),\n        sometimes(iaa.Affine(\n            scale={\"x\": (0.8, 1.2), \"y\": (0.8, 1.2)}, # scale images to 80-120% of their size, individually per axis\n            translate_percent={\"x\": (-0.2, 0.2), \"y\": (-0.2, 0.2)}, # translate by -20 to +20 percent (per axis)\n            rotate=(-45, 45), # rotate by -45 to +45 degrees\n            shear=(-16, 16), # shear by -16 to +16 degrees\n            order=[0, 1], # use nearest neighbour or bilinear interpolation (fast)\n            cval=(0, 255), # if mode is constant, use a cval between 0 and 255\n            mode=ia.ALL # use any of scikit-image's warping modes (see 2nd image from the top for examples)\n        )),\n        # execute 0 to 5 of the following (less important) augmenters per image\n        # don't execute all of them, as that would often be way too strong\n        iaa.SomeOf((0, 5),\n            [\n                sometimes(iaa.Superpixels(p_replace=(0, 1.0), n_segments=(20, 200))), # convert images into their superpixel representation\n                iaa.OneOf([\n                    iaa.GaussianBlur((0, 3.0)), # blur images with a sigma between 0 and 3.0\n                    iaa.AverageBlur(k=(2, 7)), # blur image using local means with kernel sizes between 2 and 7\n                    iaa.MedianBlur(k=(3, 11)), # blur image using local medians with kernel sizes between 2 and 7\n                ]),\n                iaa.Sharpen(alpha=(0, 1.0), lightness=(0.75, 1.5)), # sharpen images\n                iaa.Emboss(alpha=(0, 1.0), strength=(0, 2.0)), # emboss images\n                # search either for all edges or for directed edges,\n                # blend the result with the original image using a blobby mask\n                iaa.SimplexNoiseAlpha(iaa.OneOf([\n                    iaa.EdgeDetect(alpha=(0.5, 1.0)),\n                    iaa.DirectedEdgeDetect(alpha=(0.5, 1.0), direction=(0.0, 1.0)),\n                ])),\n                iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05*255), per_channel=0.5), # add gaussian noise to images\n                iaa.OneOf([\n                    iaa.Dropout((0.01, 0.1), per_channel=0.5), # randomly remove up to 10% of the pixels\n                    iaa.CoarseDropout((0.03, 0.15), size_percent=(0.02, 0.05), per_channel=0.2),\n                ]),\n                iaa.Invert(0.05, per_channel=True), # invert color channels\n                iaa.Add((-10, 10), per_channel=0.5), # change brightness of images (by -10 to 10 of original value)\n                iaa.AddToHueAndSaturation((-20, 20)), # change hue and saturation\n                # either change the brightness of the whole image (sometimes\n                # per channel) or change the brightness of subareas\n                iaa.OneOf([\n                    iaa.Multiply((0.5, 1.5), per_channel=0.5),\n                    iaa.FrequencyNoiseAlpha(\n                        exponent=(-4, 0),\n                        first=iaa.Multiply((0.5, 1.5), per_channel=True),\n                        second=iaa.ContrastNormalization((0.5, 2.0))\n                    )\n                ]),\n                iaa.ContrastNormalization((0.5, 2.0), per_channel=0.5), # improve or worsen the contrast\n                iaa.Grayscale(alpha=(0.0, 1.0)),\n                sometimes(iaa.ElasticTransformation(alpha=(0.5, 3.5), sigma=0.25)), # move pixels locally around (with random strengths)\n                sometimes(iaa.PiecewiseAffine(scale=(0.01, 0.05))), # sometimes move parts of the image around\n                sometimes(iaa.PerspectiveTransform(scale=(0.01, 0.1)))\n            ],\n            random_order=True\n        )\n    ],\n    random_order=True\n)\n\nimages_aug = seq.augment_images(images)\n```\n\nQuickly show example results of your augmentation sequence:\n```python\nfrom imgaug import augmenters as iaa\nimport numpy as np\n\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\nseq = iaa.Sequential([iaa.Fliplr(0.5), iaa.GaussianBlur((0, 3.0))])\n\n# show an image with 8*8 augmented versions of image 0\nseq.show_grid(images[0], cols=8, rows=8)\n\n# Show an image with 8*8 augmented versions of image 0 and 8*8 augmented\n# versions of image 1. The identical augmentations will be applied to\n# image 0 and 1.\nseq.show_grid([images[0], images[1]], cols=8, rows=8)\n```\n\nAugment two batches of images in *exactly the same way* (e.g. horizontally flip 1st, 2nd and 5th images in both batches, but do not alter 3rd and 4th images):\n```python\nfrom imgaug import augmenters as iaa\n\n# Standard scenario: You have N RGB-images and additionally 21 heatmaps per image.\n# You want to augment each image and its heatmaps identically.\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\nheatmaps = np.random.randint(0, 255, (16, 128, 128, 21), dtype=np.uint8)\n\nseq = iaa.Sequential([iaa.GaussianBlur((0, 3.0)), iaa.Affine(translate_px={\"x\": (-40, 40)})])\n\n# Convert the stochastic sequence of augmenters to a deterministic one.\n# The deterministic sequence will always apply the exactly same effects to the images.\nseq_det = seq.to_deterministic() # call this for each batch again, NOT only once at the start\nimages_aug = seq_det.augment_images(images)\nheatmaps_aug = seq_det.augment_images(heatmaps)\n```\n\nAugment images *and* **landmarks/keypoints** on these images:\n```python\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nfrom scipy import misc\nimport random\nimport numpy as np\nimages = np.random.randint(0, 50, (4, 128, 128, 3), dtype=np.uint8)\n\n# Generate random keypoints.\n# The augmenters expect a list of imgaug.KeypointsOnImage.\nkeypoints_on_images = []\nfor image in images:\n    height, width = image.shape[0:2]\n    keypoints = []\n    for _ in range(4):\n        x = random.randint(0, width-1)\n        y = random.randint(0, height-1)\n        keypoints.append(ia.Keypoint(x=x, y=y))\n    keypoints_on_images.append(ia.KeypointsOnImage(keypoints, shape=image.shape))\n\nseq = iaa.Sequential([iaa.GaussianBlur((0, 3.0)), iaa.Affine(scale=(0.5, 0.7))])\nseq_det = seq.to_deterministic() # call this for each batch again, NOT only once at the start\n\n# augment keypoints and images\nimages_aug = seq_det.augment_images(images)\nkeypoints_aug = seq_det.augment_keypoints(keypoints_on_images)\n\n# Example code to show each image and print the new keypoints coordinates\nfor img_idx, (image_before, image_after, keypoints_before, keypoints_after) in enumerate(zip(images, images_aug, keypoints_on_images, keypoints_aug)):\n    image_before = keypoints_before.draw_on_image(image_before)\n    image_after = keypoints_after.draw_on_image(image_after)\n    misc.imshow(np.concatenate((image_before, image_after), axis=1)) # before and after\n    for kp_idx, keypoint in enumerate(keypoints_after.keypoints):\n        keypoint_old = keypoints_on_images[img_idx].keypoints[kp_idx]\n        x_old, y_old = keypoint_old.x, keypoint_old.y\n        x_new, y_new = keypoint.x, keypoint.y\n        print(\"[Keypoints for image #%d] before aug: x=%d y=%d | after aug: x=%d y=%d\" % (img_idx, x_old, y_old, x_new, y_new))\n```\n\nApply single augmentations to images:\n```python\nfrom imgaug import augmenters as iaa\nimport numpy as np\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\nflipper = iaa.Fliplr(1.0) # always horizontally flip each input image\nimages[0] = flipper.augment_image(images[0]) # horizontally flip image 0\n\nvflipper = iaa.Flipud(0.9) # vertically flip each input image with 90% probability\nimages[1] = vflipper.augment_image(images[1]) # probably vertically flip image 1\n\nblurer = iaa.GaussianBlur(3.0)\nimages[2] = blurer.augment_image(images[2]) # blur image 2 by a sigma of 3.0\nimages[3] = blurer.augment_image(images[3]) # blur image 3 by a sigma of 3.0 too\n\ntranslater = iaa.Affine(translate_px={\"x\": -16}) # move each input image by 16px to the left\nimages[4] = translater.augment_image(images[4]) # move image 4 to the left\n\nscaler = iaa.Affine(scale={\"y\": (0.8, 1.2)}) # scale each input image to 80-120% on the y axis\nimages[5] = scaler.augment_image(images[5]) # scale image 5 by 80-120% on the y axis\n```\n\nApply an augmenter to only specific image channels:\n```python\nfrom imgaug import augmenters as iaa\nimport numpy as np\n\n# fake RGB images\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# add a random value from the range (-30, 30) to the first two channels of\n# input images (e.g. to the R and G channels)\naug = iaa.WithChannels(\n  channels=[0, 1],\n  children=iaa.Add((-30, 30))\n)\n\nimages_aug = aug.augment_images(images)\n```\n\nYou can use more unusual distributions for the stochastic parameters of each augmenter:\n```python\nfrom imgaug import augmenters as iaa\nfrom imgaug import parameters as iap\nimport numpy as np\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# Blur by a value sigma which is sampled from a uniform distribution\n# of range 0.1 <= x < 3.0.\n# The convenience shortcut for this is: iaa.GaussianBlur((0.1, 3.0))\nblurer = iaa.GaussianBlur(iap.Uniform(0.1, 3.0))\nimages_aug = blurer.augment_images(images)\n\n# Blur by a value sigma which is sampled from a normal distribution N(1.0, 0.1),\n# i.e. sample a value that is usually around 1.0.\n# Clip the resulting value so that it never gets below 0.1 or above 3.0.\nblurer = iaa.GaussianBlur(iap.Clip(iap.Normal(1.0, 0.1), 0.1, 3.0))\nimages_aug = blurer.augment_images(images)\n\n# Same again, but this time the mean of the normal distribution is not constant,\n# but comes itself from a uniform distribution between 0.5 and 1.5.\nblurer = iaa.GaussianBlur(iap.Clip(iap.Normal(iap.Uniform(0.5, 1.5), 0.1), 0.1, 3.0))\nimages_aug = blurer.augment_images(images)\n\n# Use for sigma one of exactly three allowed values: 0.5, 1.0 or 1.5.\nblurer = iaa.GaussianBlur(iap.Choice([0.5, 1.0, 1.5]))\nimages_aug = blurer.augment_images(images)\n\n# Sample sigma from a discrete uniform distribution of range 1 <= sigma <= 5,\n# i.e. sigma will have any of the following values: 1, 2, 3, 4, 5.\nblurer = iaa.GaussianBlur(iap.DiscreteUniform(1, 5))\nimages_aug = blurer.augment_images(images)\n```\n\nYou can **dynamically deactivate augmenters** in an already defined sequence:\n```python\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nimport numpy as np\n\n# images and heatmaps, just arrays filled with value 30\nimages = np.ones((16, 128, 128, 3), dtype=np.uint8) * 30\nheatmaps = np.ones((16, 128, 128, 21), dtype=np.uint8) * 30\n\n# add vertical lines to see the effect of flip\nimages[:, 16:128-16, 120:124, :] = 120\nheatmaps[:, 16:128-16, 120:124, :] = 120\n\nseq = iaa.Sequential([\n  iaa.Fliplr(0.5, name=\"Flipper\"),\n  iaa.GaussianBlur((0, 3.0), name=\"GaussianBlur\"),\n  iaa.Dropout(0.02, name=\"Dropout\"),\n  iaa.AdditiveGaussianNoise(scale=0.01*255, name=\"MyLittleNoise\"),\n  iaa.AdditiveGaussianNoise(loc=32, scale=0.0001*255, name=\"SomeOtherNoise\"),\n  iaa.Affine(translate_px={\"x\": (-40, 40)}, name=\"Affine\")\n])\n\n# change the activated augmenters for heatmaps,\n# we only want to execute horizontal flip, affine transformation and one of\n# the gaussian noises\ndef activator_heatmaps(images, augmenter, parents, default):\n    if augmenter.name in [\"GaussianBlur\", \"Dropout\", \"MyLittleNoise\"]:\n        return False\n    else:\n        # default value for all other augmenters\n        return default\nhooks_heatmaps = ia.HooksImages(activator=activator_heatmaps)\n\nseq_det = seq.to_deterministic() # call this for each batch again, NOT only once at the start\nimages_aug = seq_det.augment_images(images)\nheatmaps_aug = seq_det.augment_images(heatmaps, hooks=hooks_heatmaps)\n```\n\nImages can be augmented in **background processes** using the method `augment_batches(batches, background=True)`,\nwhere `batches` is expected to be a list of image batches or a list of batches/lists of `imgaug.KeypointsOnImage` or a list of `imgaug.Batch`.\nThe following example augments a list of image batches in the background:\n```python\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nimport numpy as np\nfrom skimage import data\n\n# Number of batches and batch size for this example\nnb_batches = 10\nbatch_size = 32\n\n# Example augmentation sequence to run in the background\naugseq = iaa.Sequential([\n    iaa.Fliplr(0.5),\n    iaa.CoarseDropout(p=0.1, size_percent=0.1)\n])\n\n# For simplicity, we use the same image here many times\nastronaut = data.astronaut()\nastronaut = ia.imresize_single_image(astronaut, (64, 64))\n\n# Make batches out of the example image (here: 10 batches, each 32 times\n# the example image)\nbatches = []\nfor _ in range(nb_batches):\n    batches.append(\n        np.array(\n            [astronaut for _ in range(batch_size)],\n            dtype=np.uint8\n        )\n    )\n\n# Show the augmented images.\n# Note that augment_batches() returns a generator.\nfor images_aug in augseq.augment_batches(batches, background=True):\n    misc.imshow(ia.draw_grid(images_aug, cols=8))\n```\n\nImages can also be augmented in background processes using the classes `imgaug.BatchLoader` and `imgaug.BackgroundAugmenter`,\nwhich offer a bit more flexibility. (`augment_batches()` is a wrapper around these.)\nUsing these classes is good practice, when you have a lot of images that you don't want to load at the same time.\n```python\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nimport numpy as np\nfrom skimage import data\n\n# Example augmentation sequence to run in the background.\naugseq = iaa.Sequential([\n    iaa.Fliplr(0.5),\n    iaa.CoarseDropout(p=0.1, size_percent=0.1)\n])\n\n# A generator that loads batches from the hard drive.\ndef load_batches():\n    # Here, load 10 batches of size 4 each.\n    # You can also load an infinite amount of batches, if you don't train\n    # in epochs.\n    batch_size = 4\n    nb_batches = 10\n\n    # Here, for simplicity we just always use the same image.\n    astronaut = data.astronaut()\n    astronaut = ia.imresize_single_image(astronaut, (64, 64))\n\n    for i in range(nb_batches):\n        # A list containing all images of the batch.\n        batch_images = []\n        # A list containing IDs of images in the batch. This is not necessary\n        # for the background augmentation and here just used to showcase that\n        # you can transfer additional information.\n        batch_data = []\n\n        # Add some images to the batch.\n        for b in range(batch_size):\n            batch_images.append(astronaut)\n            batch_data.append((i, b))\n\n        # Create the batch object to send to the background processes.\n        batch = ia.Batch(\n            images=np.array(batch_images, dtype=np.uint8),\n            data=batch_data\n        )\n\n        yield batch\n\n# background augmentation consists of two components:\n#  (1) BatchLoader, which runs in a Thread and calls repeatedly a user-defined\n#      function (here: load_batches) to load batches (optionally with keypoints\n#      and additional information) and sends them to a queue of batches.\n#  (2) BackgroundAugmenter, which runs several background processes (on other\n#      CPU cores). Each process takes batches from the queue defined by (1),\n#      augments images/keypoints and sends them to another queue.\n# The main process can then read augmented batches from the queue defined\n# by (2).\nbatch_loader = ia.BatchLoader(load_batches)\nbg_augmenter = ia.BackgroundAugmenter(batch_loader, augseq)\n\n# Run until load_batches() returns nothing anymore. This also allows infinite\n# training.\nwhile True:\n    print(\"Next batch...\")\n    batch = bg_augmenter.get_batch()\n    if batch is None:\n        print(\"Finished epoch.\")\n        break\n    images_aug = batch.images_aug\n\n    print(\"Image IDs: \", batch.data)\n\n    misc.imshow(np.hstack(list(images_aug)))\n\nbatch_loader.terminate()\nbg_augmenter.terminate()\n```\n\n## List of augmenters\n\nThe following is a list of available augmenters.\nNote that most of the below mentioned variables can be set as ranges, e.g. `A=(0.0, 1.0)` to sample a random value between 0 and 1.0 per image.\n\n| Augmenter | Description |\n| --- | --- |\n| Sequential(C, R) | Takes a list of child augmenters `C` and applies them in that order to images. If `R` is true (default: false), then the order is random (chosen once per batch). |\n| SomeOf(N, C, R) | Applies `N` randomly selected augmenters from from a list of augmenters `C` to each image. The augmenters are chosen per image. `R` is the same as for `Sequential`. `N` can be a range, e.g. `(1, 3)` in order to pick 1 to 3. |\n| OneOf(C) | Identical to `SomeOf(1, C)`. |\n| Sometimes(P, C, D) | Augments images with probability `P` by using child augmenters `C`, otherwise uses `D`. `D` can be None, then only `P` percent of all images are augmented via `C`. |\n| WithColorspace(T, F, C) | Transforms images from colorspace `F` (default: RGB) to colorspace `T`, applies augmenters `C` and then converts back to `F`. |\n| WithChannels(H, C) | Selects from each image channels `H` (e.g. `[0,1]` for red and green in RGB images), applies child augmenters `C` to these channels and merges the result back into the original images. |\n| Noop() | Does nothing. (Useful for validation/test.) |\n| Lambda(I, K) | Applies lambda function `I` to images and `K` to keypoints. |\n| AssertLambda(I, K) | Checks images via lambda function `I` and keypoints via `K` and raises an error if false is returned by either of them. |\n| AssertShape(S) | Raises an error if input images are not of shape `S`. |\n| Scale(S, I) | Resizes images to size `S`. Common use case would be to use `S={\"height\":H, \"width\":W}` to resize all images to shape `HxW`. `H` and `W` may be floats (e.g. resize to `50%` of original size). Either `H` or `W` may be `\"keep-aspect-ratio\"` to define only one side's new size and resize the other side correspondingly. `I` is the interpolation to use (default: `cubic`). |\n| CropAndPad(PX, PC, PM, PCV, KS) | Crops away or pads `PX` pixels or `PC` percent of pixels at top/right/bottom/left of images. Negative values result in cropping, positive in padding. `PM` defines the pad mode (e.g. use uniform color for all added pixels). `PCV` controls the color of added pixels if `PM=constant`. If `KS` is true (default), the resulting image is resized back to the original size. |\n| Pad(PX, PC, PM, PCV, KS) | Shortcut for CropAndPad(), which only adds pixels. Only positive values are allowed for `PX` and `PC`. |\n| Crop(PX, PC, KS) | Shortcut for CropAndPad(), which only crops away pixels. Only positive values are allowed for `PX` and `PC` (e.g. a value of 5 results in 5 pixels cropped away). |\n| Fliplr(P) | Horizontally flips images with probability `P`. |\n| Flipud(P) | Vertically flips images with probability `P`. |\n| Superpixels(P, N, M) | Generates N superpixels of the image at (max) resolution M and resizes back to the original size. Then `P` percent of all superpixel areas in the original image are replaced by the superpixel. (1-P) percent remain unaltered. |\n| ChangeColorspace(T, F, A) | Converts images from colorspace `F` to `T` and mixes with the original image using alpha `A`. Grayscale remains at three channels. (Fairly untested augmenter, use at own risk.) |\n| Grayscale(A, F) | Converts images from colorspace F (default: RGB) to grayscale and mixes with the original image using alpha `A`. |\n| GaussianBlur(S) | Blurs images using a gaussian kernel with size `S`. |\n| AverageBlur(K) | Blurs images using a simple averaging kernel with size `K`. |\n| MedianBlur(K) | Blurs images using a median over neihbourhoods of size `K`. |\n| BilateralBlur(D, SC, SS) | Blurs images using a bilateral filter with distance `D` (like kernel size). `SC` is a sigma for the (influence) distance in color space, `SS` a sigma for the spatial distance. |\n| Convolve(M) | Convolves images with matrix `M`, which can be a lambda function. |\n| Sharpen(A, L) | Runs a sharpening kernel over each image with lightness `L` (low values result in dark images). Mixes the result with the original image using alpha `A`. |\n| Emboss(A, S) | Runs an emboss kernel over each image with strength `S`. Mixes the result with the original image using alpha `A`. |\n| EdgeDetect(A) | Runs an edge detection kernel over each image. Mixes the result with the original image using alpha `A`. |\n| DirectedEdgeDetect(A, D) | Runs a directed edge detection kernel over each image, which detects each from direction `D` (default: random direction from 0 to 360 degrees, chosen per image). Mixes the result with the original image using alpha `A`. |\n| Add(V, PCH) | Adds value `V` to each image. If `PCH` is true, then the the sampled values may be different per channel. |\n| AddElementwise(V, PCH) | Adds value `V` to each pixel. If `PCH` is true, then the the sampled values may be different per channel (and pixel). |\n| AddToHueAndSaturation(V, PCH, F, C) | Adds value `V` to each pixel in HSV space (i.e. modifying hue and saturation). Converts from colorspace F to HSV (default is F=RGB). Selects channels C before augmenting (default is C=[0,1]). If `PCH` is true, then the the sampled values may be different per channel. |\n| AdditiveGaussianNoise(L, S, PCH) | Adds white/gaussian noise pixelwise to an image. The noise comes from the normal distribution `N(L,S)`. If `PCH` is true, then the sampled values may be different per channel (and pixel). |\n| Multiply(V, PCH) | Multiplies each image by value `V`, leading to darker/brighter images. If `PCH` is true, then the sampled values may be different per channel. |\n| MultiplyElementwise(V, PCH) | Multiplies each pixel by value `V`, leading to darker/brighter pixels. If `PCH` is true, then the sampled values may be different per channel (and pixel). |\n| Dropout(P, PCH) | Sets pixels to zero with probability `P`. If `PCH` is true, then channels may be treated differently, otherwise whole pixels are set to zero. |\n| CoarseDropout(P, SPX, SPC, PCH) | Like `Dropout`, but samples the locations of pixels that are to be set to zero from a coarser/smaller image, which has pixel size `SPX` or relative size `SPC`. I.e. if `SPC` has a small value, the coarse map is small, resulting in large rectangles being dropped. |\n| Invert(P, PCH) | Inverts with probability `P` all pixels in an image, i.e. sets them to (1-pixel_value). If `PCH` is true, each channel is treated individually (leading to only some channels being inverted). |\n| ContrastNormalization(S, PCH) | Changes the contrast in images, by moving pixel values away or closer to 128. The direction and strength is defined by `S`. If `PCH` is set to true, the process happens channel-wise with possibly different `S`. |\n| Affine(S, TPX, TPC, R, SH, O, M, CVAL) | Applies affine transformations to images. Scales them by `S` (>1=zoom in, <1=zoom out), translates them by `TPX` pixels or `TPC` percent, rotates them by `R` degrees and shears them by `SH` degrees. Interpolation happens with order `O` (0 or 1 are good and fast). Areas can appear in the resulting image, which have no corresponding area in the original image. `M` defines, how to handle these. If `M='constant'` then `CVAL` defines a constant value with which to fill the area. |\n| PiecewiseAffine(S, R, C, O, M, CVAL) | Places a regular grid of points on the image. The grid has `R` rows and `C` columns. Then moves the points (and the image areas around them) by amounts that are samples from normal distribution N(0,`S`), leading to local distortions of varying strengths. `O`, `M` and `CVAL` are defined as in `Affine`. |\n| PerspectiveTransform(S, KS) | Applies a random four-point perspective transform to the image (kinda like an advanced form of cropping). Each point has a random distance from the image corner, derived from a normal distribution with sigma `S`. If `KS` is set to True (default), each image will be resized back to its original size. |\n| ElasticTransformation(S, SM) | Moves each pixel individually around based on distortion fields. `SM` defines the smoothness of the distortion field and `S` its strength. |\n| Alpha(F, A, B, PCH) | Augments images using augmenters `A` and `B` independently, then overlays the result using alpha `F`. Both `A` and `B` default to doing nothing if not provided. E.g. use `Alpha(0.9, A)` to augment images via `A`, then blend the result, keeping 10% of the original image (before `A`). If `PCH` is set to true, the process happens channel-wise with possibly different `F` (`A` and `B` are computed once per image). |\n| AlphaElementwise(F, A, B, PCH) | Same as `Alpha`, but performs the blending pixel-wise using a continuous mask (values 0.0 to 1.0) sampled from `F`. If `PCH` is set to true, the process happens both pixel- and channel-wise. |\n| SimplexNoiseAlpha(A, B, PCH, SM, UP, I, AGG, SIG, SIGT) | Similar to `Alpha`, but uses a mask to blend the results from augmenters `A` and `B`. The mask is sampled from simplex noise, which tends to be blobby. The mask is gathered in `I` iterations (default 1-3), each iteration is combined using aggregation method `AGG` (default max, i.e. maximum value from all iterations per pixel). Each mask is sampled in low resolution space with max resolution `SM` (default 2 to 16px) and upscaled to image size using method `UP` (default: linear or cubic or nearest neighbour upsampling). If `SIG` is true, a sigmoid is applied to the mask with threshold `SIGT`, which makes the blobs have values closer to 0.0 or 1.0. |\n| FrequencyNoiseAlpha(E, A, B, PCH, SM, UP, I, AGG, SIG, SIGT) | Similar to `SimplexNoiseAlpha`, but generates noise masks from the frequency domain. Exponent `E` is used to increase/decrease frequency components. High values lead to more pronounced high frequency components. Use values in the range -4 to 4, with -2 roughly generated cloud-like patterns. |\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6582:149227:17A791:5CCC45:6AB920F6"},"text_sha256":"c70721daacd1a81fffebe90b8d16e1f99fb20abc42b2acc99d873ccb58cae968"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3326","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:17CDBD5:1BECBD8:6AB92886"},"commit":{"sha":"0101108d4fed06bc5056c4a03e2bcb0216dac326","url":"https://github.com/aleju/imgaug/commit/0101108d4fed06bc5056c4a03e2bcb0216dac326","date":"2020-06-01T14:58:26Z","author_date":"2020-06-01T14:58:26Z","committer_date":"2020-06-01T14:58:26Z","tree_sha":"e92b0ca13121a8312eea3344fec9a61b8135b522","message_first_line":"Fix Affine deprecation warning (#685)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3325","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0862:7307A:179FE60:1BBE8DE:6AB92887"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":83811,"blob_sha":"4fe9ea4dc131b5705ae575150f931d514bf49317","priority":0}],"documents":[{"path":"README.md","size":83811,"blob_sha":"4fe9ea4dc131b5705ae575150f931d514bf49317","priority":0,"status":200,"text":"# imgaug\n\nThis python library helps you with augmenting images for your machine learning projects.\nIt converts a set of input images into a new, much larger set of slightly altered images.\n\n[![Build Status](https://travis-ci.org/aleju/imgaug.svg?branch=master)](https://travis-ci.org/aleju/imgaug)\n[![codecov](https://codecov.io/gh/aleju/imgaug/branch/master/graph/badge.svg)](https://codecov.io/gh/aleju/imgaug)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1370ce38e99e40af842d47a8dd721444)](https://www.codacy.com/app/aleju/imgaug?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=aleju/imgaug&amp;utm_campaign=Badge_Grade)\n\n<table>\n\n<tr>\n<th>&nbsp;<\/th>\n<th>Image<\/th>\n<th>Heatmaps<\/th>\n<th>Seg. Maps<\/th>\n<th>Keypoints<\/th>\n<th>Bounding Boxes,<br>Polygons<\/th>\n<\/tr>\n\n<!-- Line 1: Original Input -->\n<tr>\n<td><em>Original Input<\/em><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/noop_image.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"input images\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/noop_heatmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"input heatmaps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/noop_segmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"input segmentation maps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/noop_kps.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"input keypoints\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/noop_bbs.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"input bounding boxes\"><\/td>\n<\/tr>\n\n<!-- Line 2: Gauss. Noise + Contrast + Sharpen -->\n<tr>\n<td>Gauss. Noise<br>+&nbsp;Contrast<br>+&nbsp;Sharpen<\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/non_geometric_image.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"non geometric augmentations, applied to images\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/non_geometric_heatmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"non geometric augmentations, applied to heatmaps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/non_geometric_segmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"non geometric augmentations, applied to segmentation maps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/non_geometric_kps.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"non geometric augmentations, applied to keypoints\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/non_geometric_bbs.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"non geometric augmentations, applied to bounding boxes\"><\/td>\n<\/tr>\n\n<!-- Line 3: Affine -->\n<tr>\n<td>Affine<\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/affine_image.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"affine augmentations, applied to images\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/affine_heatmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"affine augmentations, applied to heatmaps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/affine_segmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"affine augmentations, applied to segmentation maps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/affine_kps.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"affine augmentations, applied to keypoints\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/affine_bbs.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"affine augmentations, applied to bounding boxes\"><\/td>\n<\/tr>\n\n<!-- Line 4: Crop + Pad -->\n<tr>\n<td>Crop<br>+&nbsp;Pad<\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/cropandpad_image.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"crop and pad augmentations, applied to images\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/cropandpad_heatmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"crop and pad augmentations, applied to heatmaps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/cropandpad_segmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"crop and pad augmentations, applied to segmentation maps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/cropandpad_kps.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"crop and pad augmentations, applied to keypoints\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/cropandpad_bbs.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"crop and pad augmentations, applied to bounding boxes\"><\/td>\n<\/tr>\n\n<!-- Line 5: Fliplr + Perspective -->\n<tr>\n<td>Fliplr<br>+&nbsp;Perspective<\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/fliplr_perspective_image.jpg\" height=\"83\" width=\"124\" alt=\"Horizontal flip and perspective transform augmentations, applied to images\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/fliplr_perspective_heatmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"Horizontal flip and perspective transform augmentations, applied to heatmaps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/fliplr_perspective_segmap.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"Horizontal flip and perspective transform augmentations, applied to segmentation maps\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/fliplr_perspective_kps.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"Horizontal flip and perspective transform augmentations, applied to keypoints\"><\/td>\n<td><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/small_overview/fliplr_perspective_bbs.jpg?raw=true\" height=\"83\" width=\"124\" alt=\"Horizontal flip and perspective transform augmentations, applied to bounding boxes\"><\/td>\n<\/tr>\n\n<\/table>\n\n\n**More (strong) example augmentations of one input image:**\n\n![64 quokkas](https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/examples_grid.jpg?raw=true \"64 quokkas\")\n\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Installation](#installation)\n3. [Documentation](#documentation)\n4. [Recent Changes](#recent_changes)\n5. [Example Images](#example_images)\n6. [Code Examples](#code_examples)\n7. [Citation](#citation)\n\n\n<a name=\"features\"/>\n\n## Features\n\n* Many augmentation techniques\n  * E.g. affine transformations, perspective transformations, contrast changes, gaussian noise, dropout of regions, hue/saturation changes, cropping/padding, blurring, ...\n  * Optimized for high performance\n  * Easy to apply augmentations only to some images\n  * Easy to apply augmentations in random order\n* Support for\n  * Images (full support for uint8, for other dtypes see [documentation](https://imgaug.readthedocs.io/en/latest/source/dtype_support.html))\n  * Heatmaps (float32), Segmentation Maps (int), Masks (bool)\n    * May be smaller/larger than their corresponding images. *No* extra lines of code needed for e.g. crop.\n  * Keypoints/Landmarks (int/float coordinates)\n  * Bounding Boxes (int/float coordinates)\n  * Polygons (int/float coordinates)\n  * Line Strings (int/float coordinates)\n* Automatic alignment of sampled random values\n  * Example: Rotate image and segmentation map on it by the same value sampled from `uniform(-10°, 45°)`. (0 extra lines of code.)\n* Probability distributions as parameters\n  * Example: Rotate images by values sampled from `uniform(-10°, 45°)`.\n  * Example: Rotate images by values sampled from `ABS(N(0, 20.0))*(1+B(1.0, 1.0))`\", where `ABS(.)` is the absolute function, `N(.)` the gaussian distribution and `B(.)` the beta distribution.\n* Many helper functions\n  * Example: Draw heatmaps, segmentation maps, keypoints, bounding boxes, ...\n  * Example: Scale segmentation maps, average/max pool of images/maps, pad images to aspect\n    ratios (e.g. to square them)\n  * Example: Convert keypoints to distance maps, extract pixels within bounding boxes from images, clip polygon to the image plane, ...\n* Support for augmentation on multiple CPU cores\n\n\n<a name=\"installation\"/>\n\n## Installation\n\nThe library supports python 2.7 and 3.4+.\n\n### Installation: Anaconda\n\nTo install the library in anaconda, perform the following commands:\n```bash\nconda config --add channels conda-forge\nconda install imgaug\n```\n\nYou can deinstall the library again via `conda remove imgaug`.\n\n### Installation: pip\n\nThen install imgaug either via pypi (can lag behind the github version):\n```bash\npip install imgaug\n```\n\nor install the latest version directly from github:\n```bash\npip install git+https://github.com/aleju/imgaug.git\n```\n\nFor more details, see the [install guide](https://imgaug.readthedocs.io/en/latest/source/installation.html)\n\nTo deinstall the library, just execute `pip uninstall imgaug`.\n\n\n<a name=\"documentation\"/>\n\n## Documentation\n\nExample jupyter notebooks:\n  * [Load and Augment an Image](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A01%20-%20Load%20and%20Augment%20an%20Image.ipynb)\n  * [Multicore Augmentation](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A03%20-%20Multicore%20Augmentation.ipynb)\n  * Augment and work with: [Keypoints/Landmarks](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B01%20-%20Augment%20Keypoints.ipynb),\n    [Bounding Boxes](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B02%20-%20Augment%20Bounding%20Boxes.ipynb),\n    [Polygons](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B03%20-%20Augment%20Polygons.ipynb),\n    [Line Strings](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B06%20-%20Augment%20Line%20Strings.ipynb),\n    [Heatmaps](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B04%20-%20Augment%20Heatmaps.ipynb),\n    [Segmentation Maps](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B05%20-%20Augment%20Segmentation%20Maps.ipynb) \n\nMore notebooks: [imgaug-doc/notebooks](https://github.com/aleju/imgaug-doc/tree/master/notebooks).\n\nExample ReadTheDocs pages:\n* [Quick example code on how to use the library](http://imgaug.readthedocs.io/en/latest/source/examples_basics.html)\n* [Overview of all Augmenters](https://imgaug.readthedocs.io/en/latest/source/overview_of_augmenters.html)\n* [API](http://imgaug.readthedocs.io/en/latest/source/api.html)\n\nMore RTD documentation: [imgaug.readthedocs.io](http://imgaug.readthedocs.io/en/latest/source/examples_basics.html).\n\nAll documentation related files of this project are hosted in the\nrepository [imgaug-doc](https://github.com/aleju/imgaug-doc).\n\n\n<a name=\"recent_changes\"/>\n\n## Recent Changes\n\n* **0.4.0**: Added new augmenters, changed backend to batchwise augmentation,\n  support for numpy 1.18 and python 3.8.\n* **0.3.0**: Reworked segmentation map augmentation, adapted to numpy 1.17+\n  random number sampling API, several new augmenters.\n* **0.2.9**: Added polygon augmentation, added line string augmentation,\n  simplified augmentation interface.\n* **0.2.8**: Improved performance, dtype support and multicore augmentation.\n\nSee [changelogs/](changelogs/) for more details.\n\n\n<a name=\"example_images\"/>\n\n## Example Images\n\nThe images below show examples for most augmentation techniques.\n\nValues written in the form `(a, b)` denote a uniform distribution,\ni.e. the value is randomly picked from the interval `[a, b]`.\nLine strings are supported by (almost) all augmenters, but are not explicitly\nvisualized here.\n\n<table>\n\n<tr><td colspan=\"5\"><strong>meta<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#identity\">Identity<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#channelshuffle\">ChannelShuffle<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/meta/identity.gif\" height=\"148\" width=\"100\" alt=\"Identity\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/meta/channelshuffle.gif\" height=\"148\" width=\"100\" alt=\"ChannelShuffle\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#sequential\">Sequential<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#someof\">SomeOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#oneof\">OneOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#sometimes\">Sometimes<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#withchannels\">WithChannels<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#lambda\">Lambda<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#assertlambda\">AssertLambda<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#assertshape\">AssertShape<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#removecbasbyoutofimagefraction\">RemoveCBAsByOutOfImageFraction<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/meta.html#clipcbastoimageplanes\">ClipCBAsToImagePlanes<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>arithmetic<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#add\">Add<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#add\">Add<\/a><br/>(per_channel=True)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#additivegaussiannoise\">AdditiveGaussianNoise<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#additivegaussiannoise\">AdditiveGaussianNoise<\/a><br/>(per_channel=True)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#multiply\">Multiply<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/add.gif\" height=\"148\" width=\"100\" alt=\"Add\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/add_per_channel_true.gif\" height=\"148\" width=\"100\" alt=\"Add per_channel=True\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/additivegaussiannoise.gif\" height=\"148\" width=\"100\" alt=\"AdditiveGaussianNoise\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/additivegaussiannoise_per_channel_true.gif\" height=\"148\" width=\"100\" alt=\"AdditiveGaussianNoise per_channel=True\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/multiply.gif\" height=\"148\" width=\"100\" alt=\"Multiply\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#cutout\">Cutout<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#dropout\">Dropout<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#coarsedropout\">CoarseDropout<\/a><br/>(p=0.2)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#coarsedropout\">CoarseDropout<\/a><br/>(p=0.2, per_channel=True)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#dropout2d\">Dropout2d<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/cutout.gif\" height=\"148\" width=\"100\" alt=\"Cutout\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/dropout.gif\" height=\"148\" width=\"100\" alt=\"Dropout\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/coarsedropout_p_0_2.gif\" height=\"148\" width=\"100\" alt=\"CoarseDropout p=0.2\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/coarsedropout_p_0_2_per_channel_true.gif\" height=\"148\" width=\"100\" alt=\"CoarseDropout p=0.2, per_channel=True\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/dropout2d.gif\" height=\"148\" width=\"100\" alt=\"Dropout2d\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#saltandpepper\">SaltAndPepper<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#coarsesaltandpepper\">CoarseSaltAndPepper<\/a><br/>(p=0.2)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#invert\">Invert<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#solarize\">Solarize<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#jpegcompression\">JpegCompression<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/saltandpepper.gif\" height=\"148\" width=\"100\" alt=\"SaltAndPepper\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/coarsesaltandpepper_p_0_2.gif\" height=\"148\" width=\"100\" alt=\"CoarseSaltAndPepper p=0.2\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/invert.gif\" height=\"148\" width=\"100\" alt=\"Invert\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/solarize.gif\" height=\"148\" width=\"100\" alt=\"Solarize\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/arithmetic/jpegcompression.gif\" height=\"148\" width=\"100\" alt=\"JpegCompression\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#addelementwise\">AddElementwise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#additivelaplacenoise\">AdditiveLaplaceNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#additivepoissonnoise\">AdditivePoissonNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#multiplyelementwise\">MultiplyElementwise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#totaldropout\">TotalDropout<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#replaceelementwise\">ReplaceElementwise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#impulsenoise\">ImpulseNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#salt\">Salt<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#pepper\">Pepper<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#coarsesalt\">CoarseSalt<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#coarsepepper\">CoarsePepper<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/arithmetic.html#solarize\">Solarize<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>artistic<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/artistic.html#cartoon\">Cartoon<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/artistic/cartoon.gif\" height=\"144\" width=\"128\" alt=\"Cartoon\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>blend<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalpha\">BlendAlpha<\/a><br/>with EdgeDetect(1.0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphasimplexnoise\">BlendAlphaSimplexNoise<\/a><br/>with EdgeDetect(1.0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphafrequencynoise\">BlendAlphaFrequencyNoise<\/a><br/>with EdgeDetect(1.0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphasomecolors\">BlendAlphaSomeColors<\/a><br/>with RemoveSaturation(1.0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalpharegulargrid\">BlendAlphaRegularGrid<\/a><br/>with Multiply((0.0, 0.5))<\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blend/blendalpha_with_edgedetect_1_0.gif\" height=\"148\" width=\"100\" alt=\"BlendAlpha with EdgeDetect1.0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blend/blendalphasimplexnoise_with_edgedetect_1_0.gif\" height=\"148\" width=\"100\" alt=\"BlendAlphaSimplexNoise with EdgeDetect1.0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blend/blendalphafrequencynoise_with_edgedetect_1_0.gif\" height=\"148\" width=\"100\" alt=\"BlendAlphaFrequencyNoise with EdgeDetect1.0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blend/blendalphasomecolors_with_removesaturation_1_0.gif\" height=\"144\" width=\"128\" alt=\"BlendAlphaSomeColors with RemoveSaturation1.0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blend/blendalpharegulargrid_with_multiply_0_0_0_5.gif\" height=\"148\" width=\"100\" alt=\"BlendAlphaRegularGrid with Multiply0.0, 0.5\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphamask\">BlendAlphaMask<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphaelementwise\">BlendAlphaElementwise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphaverticallineargradient\">BlendAlphaVerticalLinearGradient<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphahorizontallineargradient\">BlendAlphaHorizontalLinearGradient<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphasegmapclassids\">BlendAlphaSegMapClassIds<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphaboundingboxes\">BlendAlphaBoundingBoxes<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blend.html#blendalphacheckerboard\">BlendAlphaCheckerboard<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.SomeColorsMaskGen\">SomeColorsMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.HorizontalLinearGradientMaskGen\">HorizontalLinearGradientMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.VerticalLinearGradientMaskGen\">VerticalLinearGradientMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.RegularGridMaskGen\">RegularGridMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.CheckerboardMaskGen\">CheckerboardMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.SegMapClassIdsMaskGen\">SegMapClassIdsMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.BoundingBoxesMaskGen\">BoundingBoxesMaskGen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_blend.html#imgaug.augmenters.blend.InvertMaskGen\">InvertMaskGen<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>blur<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#gaussianblur\">GaussianBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#averageblur\">AverageBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#medianblur\">MedianBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#bilateralblur\">BilateralBlur<\/a><br/>(sigma_color=250,<br/>sigma_space=250)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#motionblur\">MotionBlur<\/a><br/>(angle=0)<\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/gaussianblur.gif\" height=\"148\" width=\"100\" alt=\"GaussianBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/averageblur.gif\" height=\"148\" width=\"100\" alt=\"AverageBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/medianblur.gif\" height=\"148\" width=\"100\" alt=\"MedianBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/bilateralblur_sigma_color_250_sigma_space_250.gif\" height=\"148\" width=\"100\" alt=\"BilateralBlur sigma_color=250, sigma_space=250\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/motionblur_angle_0.gif\" height=\"148\" width=\"100\" alt=\"MotionBlur angle=0\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#motionblur\">MotionBlur<\/a><br/>(k=5)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/blur.html#meanshiftblur\">MeanShiftBlur<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/motionblur_k_5.gif\" height=\"148\" width=\"100\" alt=\"MotionBlur k=5\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/blur/meanshiftblur.gif\" height=\"148\" width=\"100\" alt=\"MeanShiftBlur\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>collections<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/collections.html#randaugment\">RandAugment<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/collections/randaugment.gif\" height=\"148\" width=\"100\" alt=\"RandAugment\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>color<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#multiplyandaddtobrightness\">MultiplyAndAddToBrightness<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#multiplyhueandsaturation\">MultiplyHueAndSaturation<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#multiplyhue\">MultiplyHue<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#multiplysaturation\">MultiplySaturation<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#addtohueandsaturation\">AddToHueAndSaturation<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/multiplyandaddtobrightness.gif\" height=\"148\" width=\"100\" alt=\"MultiplyAndAddToBrightness\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/multiplyhueandsaturation.gif\" height=\"148\" width=\"100\" alt=\"MultiplyHueAndSaturation\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/multiplyhue.gif\" height=\"148\" width=\"100\" alt=\"MultiplyHue\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/multiplysaturation.gif\" height=\"148\" width=\"100\" alt=\"MultiplySaturation\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/addtohueandsaturation.gif\" height=\"148\" width=\"100\" alt=\"AddToHueAndSaturation\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#grayscale\">Grayscale<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#removesaturation\">RemoveSaturation<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#changecolortemperature\">ChangeColorTemperature<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#kmeanscolorquantization\">KMeansColorQuantization<\/a><br/>(to_colorspace=RGB)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#uniformcolorquantization\">UniformColorQuantization<\/a><br/>(to_colorspace=RGB)<\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/grayscale.gif\" height=\"148\" width=\"100\" alt=\"Grayscale\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/removesaturation.gif\" height=\"148\" width=\"100\" alt=\"RemoveSaturation\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/changecolortemperature.gif\" height=\"148\" width=\"100\" alt=\"ChangeColorTemperature\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/kmeanscolorquantization_to_colorspace_rgb.gif\" height=\"148\" width=\"100\" alt=\"KMeansColorQuantization to_colorspace=RGB\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/color/uniformcolorquantization_to_colorspace_rgb.gif\" height=\"148\" width=\"100\" alt=\"UniformColorQuantization to_colorspace=RGB\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#withcolorspace\">WithColorspace<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#withbrightnesschannels\">WithBrightnessChannels<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#multiplybrightness\">MultiplyBrightness<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#addtobrightness\">AddToBrightness<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#withhueandsaturation\">WithHueAndSaturation<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#addtohue\">AddToHue<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#addtosaturation\">AddToSaturation<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#changecolorspace\">ChangeColorspace<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#posterize\">Posterize<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>contrast<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#gammacontrast\">GammaContrast<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#gammacontrast\">GammaContrast<\/a><br/>(per_channel=True)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#sigmoidcontrast\">SigmoidContrast<\/a><br/>(cutoff=0.5)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#sigmoidcontrast\">SigmoidContrast<\/a><br/>(gain=10)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#logcontrast\">LogContrast<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/gammacontrast.gif\" height=\"148\" width=\"100\" alt=\"GammaContrast\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/gammacontrast_per_channel_true.gif\" height=\"148\" width=\"100\" alt=\"GammaContrast per_channel=True\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/sigmoidcontrast_cutoff_0_5.gif\" height=\"148\" width=\"100\" alt=\"SigmoidContrast cutoff=0.5\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/sigmoidcontrast_gain_10.gif\" height=\"148\" width=\"100\" alt=\"SigmoidContrast gain=10\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/logcontrast.gif\" height=\"148\" width=\"100\" alt=\"LogContrast\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#linearcontrast\">LinearContrast<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#allchannelshistogramequalization\">AllChannels-<\/a><br/>HistogramEqualization<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#histogramequalization\">HistogramEqualization<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#allchannelsclahe\">AllChannelsCLAHE<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#clahe\">CLAHE<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/linearcontrast.gif\" height=\"148\" width=\"100\" alt=\"LinearContrast\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/allchannels_histogramequalization.gif\" height=\"148\" width=\"100\" alt=\"AllChannels- HistogramEqualization\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/histogramequalization.gif\" height=\"148\" width=\"100\" alt=\"HistogramEqualization\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/allchannelsclahe.gif\" height=\"148\" width=\"100\" alt=\"AllChannelsCLAHE\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/contrast/clahe.gif\" height=\"148\" width=\"100\" alt=\"CLAHE\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/contrast.html#equalize\">Equalize<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>convolutional<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/convolutional.html#sharpen\">Sharpen<\/a><br/>(alpha=1)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/convolutional.html#emboss\">Emboss<\/a><br/>(alpha=1)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/convolutional.html#edgedetect\">EdgeDetect<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/convolutional.html#directededgedetect\">DirectedEdgeDetect<\/a><br/>(alpha=1)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/convolutional/sharpen_alpha_1.gif\" height=\"148\" width=\"100\" alt=\"Sharpen alpha=1\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/convolutional/emboss_alpha_1.gif\" height=\"148\" width=\"100\" alt=\"Emboss alpha=1\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/convolutional/edgedetect.gif\" height=\"148\" width=\"100\" alt=\"EdgeDetect\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/convolutional/directededgedetect_alpha_1.gif\" height=\"148\" width=\"100\" alt=\"DirectedEdgeDetect alpha=1\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/convolutional.html#convolve\">Convolve<\/a><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\"><strong>debug<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/debug.html#savedebugimageeverynbatches\">SaveDebugImageEveryNBatches<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>edges<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/edges.html#canny\">Canny<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/edges/canny.gif\" height=\"148\" width=\"100\" alt=\"Canny\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>flip<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/flip.html#fliplr\">Fliplr<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/flip.html#flipud\">Flipud<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/flip/fliplr.gif\" height=\"148\" width=\"300\" alt=\"Fliplr\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/flip/flipud.gif\" height=\"148\" width=\"300\" alt=\"Flipud\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#horizontalflip\">HorizontalFlip<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/color.html#verticalflip\">VerticalFlip<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>geometric<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#affine\">Affine<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#affine\">Affine: Modes<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/affine.gif\" height=\"148\" width=\"300\" alt=\"Affine\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/affine_modes.gif\" height=\"148\" width=\"300\" alt=\"Affine: Modes\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#affine\">Affine: cval<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#piecewiseaffine\">PiecewiseAffine<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/affine_cval.gif\" height=\"148\" width=\"300\" alt=\"Affine: cval\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/piecewiseaffine.gif\" height=\"148\" width=\"300\" alt=\"PiecewiseAffine\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#perspectivetransform\">PerspectiveTransform<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#elastictransformation\">ElasticTransformation<\/a><br/>(sigma=1.0)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/perspectivetransform.gif\" height=\"148\" width=\"300\" alt=\"PerspectiveTransform\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/elastictransformation_sigma_1_0.gif\" height=\"148\" width=\"300\" alt=\"ElasticTransformation sigma=1.0\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#elastictransformation\">ElasticTransformation<\/a><br/>(sigma=4.0)<\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#rot90\">Rot90<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/elastictransformation_sigma_4_0.gif\" height=\"148\" width=\"300\" alt=\"ElasticTransformation sigma=4.0\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/rot90.gif\" height=\"148\" width=\"300\" alt=\"Rot90\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#withpolarwarping\">WithPolarWarping<\/a><br/>+Affine<\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#jigsaw\">Jigsaw<\/a><br/>(5x5 grid)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/withpolarwarping_affine.gif\" height=\"148\" width=\"300\" alt=\"WithPolarWarping +Affine\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/geometric/jigsaw_5x5_grid.gif\" height=\"148\" width=\"300\" alt=\"Jigsaw 5x5 grid\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#scalex\">ScaleX<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#scaley\">ScaleY<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#translatex\">TranslateX<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#translatey\">TranslateY<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/geometric.html#rotate\">Rotate<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>imgcorruptlike<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#glassblur\">GlassBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#defocusblur\">DefocusBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#zoomblur\">ZoomBlur<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#snow\">Snow<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#spatter\">Spatter<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/imgcorruptlike/glassblur.gif\" height=\"148\" width=\"100\" alt=\"GlassBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/imgcorruptlike/defocusblur.gif\" height=\"148\" width=\"100\" alt=\"DefocusBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/imgcorruptlike/zoomblur.gif\" height=\"148\" width=\"100\" alt=\"ZoomBlur\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/imgcorruptlike/snow.gif\" height=\"148\" width=\"100\" alt=\"Snow\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/imgcorruptlike/spatter.gif\" height=\"148\" width=\"100\" alt=\"Spatter\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#gaussiannoise\">GaussianNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#shotnoise\">ShotNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#impulsenoise\">ImpulseNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#specklenoise\">SpeckleNoise<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#gaussianblur\">GaussianBlur<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#motionblur\">MotionBlur<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#fog\">Fog<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#frost\">Frost<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#contrast\">Contrast<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#brightness\">Brightness<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#saturate\">Saturate<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#jpegcompression\">JpegCompression<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#pixelate\">Pixelate<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/imgcorruptlike.html#elastictransform\">ElasticTransform<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>pillike<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#autocontrast\">Autocontrast<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#enhancecolor\">EnhanceColor<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#enhancesharpness\">EnhanceSharpness<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filteredgeenhancemore\">FilterEdgeEnhanceMore<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filtercontour\">FilterContour<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pillike/autocontrast.gif\" height=\"148\" width=\"100\" alt=\"Autocontrast\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pillike/enhancecolor.gif\" height=\"148\" width=\"100\" alt=\"EnhanceColor\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pillike/enhancesharpness.gif\" height=\"148\" width=\"100\" alt=\"EnhanceSharpness\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pillike/filteredgeenhancemore.gif\" height=\"148\" width=\"100\" alt=\"FilterEdgeEnhanceMore\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pillike/filtercontour.gif\" height=\"148\" width=\"100\" alt=\"FilterContour\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#solarize\">Solarize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#posterize\">Posterize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#equalize\">Equalize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#enhancecontrast\">EnhanceContrast<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#enhancebrightness\">EnhanceBrightness<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filterblur\">FilterBlur<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filtersmooth\">FilterSmooth<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filtersmoothmore\">FilterSmoothMore<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filteredgeenhance\">FilterEdgeEnhance<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filterfindedges\">FilterFindEdges<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filteremboss\">FilterEmboss<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filtersharpen\">FilterSharpen<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#filterdetail\">FilterDetail<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pillike.html#affine\">Affine<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>pooling<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pooling.html#averagepooling\">AveragePooling<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pooling.html#maxpooling\">MaxPooling<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pooling.html#minpooling\">MinPooling<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/pooling.html#medianpooling\">MedianPooling<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pooling/averagepooling.gif\" height=\"148\" width=\"100\" alt=\"AveragePooling\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pooling/maxpooling.gif\" height=\"148\" width=\"100\" alt=\"MaxPooling\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pooling/minpooling.gif\" height=\"148\" width=\"100\" alt=\"MinPooling\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/pooling/medianpooling.gif\" height=\"148\" width=\"100\" alt=\"MedianPooling\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>segmentation<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#superpixels\">Superpixels<\/a><br/>(p_replace=1)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#superpixels\">Superpixels<\/a><br/>(n_segments=100)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#uniformvoronoi\">UniformVoronoi<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#regulargridvoronoi\">RegularGridVoronoi: rows/cols<\/a><br/>(p_drop_points=0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#regulargridvoronoi\">RegularGridVoronoi: p_drop_points<\/a><br/>(n_rows=n_cols=30)<\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/superpixels_p_replace_1.gif\" height=\"148\" width=\"100\" alt=\"Superpixels p_replace=1\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/superpixels_n_segments_100.gif\" height=\"148\" width=\"100\" alt=\"Superpixels n_segments=100\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/uniformvoronoi.gif\" height=\"148\" width=\"100\" alt=\"UniformVoronoi\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/regulargridvoronoi_rows_cols_p_drop_points_0.gif\" height=\"148\" width=\"100\" alt=\"RegularGridVoronoi: rows/cols p_drop_points=0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/regulargridvoronoi_p_drop_points_n_rows_n_cols_30.gif\" height=\"148\" width=\"100\" alt=\"RegularGridVoronoi: p_drop_points n_rows=n_cols=30\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#regulargridvoronoi\">RegularGridVoronoi: p_replace<\/a><br/>(n_rows=n_cols=16)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/segmentation/regulargridvoronoi_p_replace_n_rows_n_cols_16.gif\" height=\"148\" width=\"100\" alt=\"RegularGridVoronoi: p_replace n_rows=n_cols=16\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#voronoi\">Voronoi<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/segmentation.html#relativeregulargridvoronoi\">RelativeRegularGridVoronoi<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_segmentation.html#imgaug.augmenters.segmentation.RegularGridPointsSampler\">RegularGridPointsSampler<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_segmentation.html#imgaug.augmenters.segmentation.RelativeRegularGridPointsSampler\">RelativeRegularGridPointsSampler<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_segmentation.html#imgaug.augmenters.segmentation.DropoutPointsSampler\">DropoutPointsSampler<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_segmentation.html#imgaug.augmenters.segmentation.UniformPointsSampler\">UniformPointsSampler<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/api_augmenters_segmentation.html#imgaug.augmenters.segmentation.SubsamplingPointsSampler\">SubsamplingPointsSampler<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>size<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#cropandpad\">CropAndPad<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#crop\">Crop<\/a><\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/size/cropandpad.gif\" height=\"148\" width=\"300\" alt=\"CropAndPad\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/size/crop.gif\" height=\"148\" width=\"300\" alt=\"Crop\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#pad\">Pad<\/a><\/sub><\/td>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#padtofixedsize\">PadToFixedSize<\/a><br/>(height'=height+32,<br/>width'=width+32)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/size/pad.gif\" height=\"148\" width=\"300\" alt=\"Pad\"><\/td>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/size/padtofixedsize_height_height_32_width_width_32.gif\" height=\"148\" width=\"300\" alt=\"PadToFixedSize height'=height+32, width'=width+32\"><\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#croptofixedsize\">CropToFixedSize<\/a><br/>(height'=height-32,<br/>width'=width-32)<\/sub><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/size/croptofixedsize_height_height_32_width_width_32.gif\" height=\"148\" width=\"300\" alt=\"CropToFixedSize height'=height-32, width'=width-32\"><\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#resize\">Resize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#croptomultiplesof\">CropToMultiplesOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#padtomultiplesof\">PadToMultiplesOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#croptopowersof\">CropToPowersOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#padtopowersof\">PadToPowersOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#croptoaspectratio\">CropToAspectRatio<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#padtoaspectratio\">PadToAspectRatio<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#croptosquare\">CropToSquare<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#padtosquare\">PadToSquare<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centercroptofixedsize\">CenterCropToFixedSize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centerpadtofixedsize\">CenterPadToFixedSize<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centercroptomultiplesof\">CenterCropToMultiplesOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centerpadtomultiplesof\">CenterPadToMultiplesOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centercroptopowersof\">CenterCropToPowersOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centerpadtopowersof\">CenterPadToPowersOf<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centercroptoaspectratio\">CenterCropToAspectRatio<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centerpadtoaspectratio\">CenterPadToAspectRatio<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centercroptosquare\">CenterCropToSquare<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#centerpadtosquare\">CenterPadToSquare<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/size.html#keepsizebyresize\">KeepSizeByResize<\/a><\/td>\n<\/tr>\n<tr><td colspan=\"5\"><strong>weather<\/strong><\/td><\/tr>\n<tr>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#fastsnowylandscape\">FastSnowyLandscape<\/a><br/>(lightness_multiplier=2.0)<\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#clouds\">Clouds<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#fog\">Fog<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#snowflakes\">Snowflakes<\/a><\/sub><\/td>\n<td colspan=\"1\"><sub><a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#rain\">Rain<\/a><\/sub><\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/weather/fastsnowylandscape_lightness_multiplier_2_0.gif\" height=\"144\" width=\"128\" alt=\"FastSnowyLandscape lightness_multiplier=2.0\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/weather/clouds.gif\" height=\"144\" width=\"128\" alt=\"Clouds\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/weather/fog.gif\" height=\"144\" width=\"128\" alt=\"Fog\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/weather/snowflakes.gif\" height=\"144\" width=\"128\" alt=\"Snowflakes\"><\/td>\n<td colspan=\"1\"><img src=\"https://raw.githubusercontent.com/aleju/imgaug-doc/master/readme_images/augmenter_videos/weather/rain.gif\" height=\"144\" width=\"128\" alt=\"Rain\"><\/td>\n<\/tr>\n<tr>\n\n<\/tr>\n<tr>\n<td colspan=\"5\">See also: <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#cloudlayer\">CloudLayer<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#snowflakeslayer\">SnowflakesLayer<\/a>, <a href=\"https://imgaug.readthedocs.io/en/latest/source/overview/weather.html#rainlayer\">RainLayer<\/a><\/td>\n<\/tr>\n\n<\/table>\n\n\n\n<a name=\"code_examples\"/>\n\n\n## Code Examples\n\n### Example: Simple Training Setting\n\nA standard machine learning situation.\nTrain on batches of images and augment each batch via crop, horizontal\nflip (\"Fliplr\") and gaussian blur:\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\ndef load_batch(batch_idx):\n    # dummy function, implement this\n    # Return a numpy array of shape (N, height, width, #channels)\n    # or a list of (height, width, #channels) arrays (may have different image\n    # sizes).\n    # Images should be in RGB for colorspace augmentations.\n    # (cv2.imread() returns BGR!)\n    # Images should usually be in uint8 with values from 0-255.\n    return np.zeros((128, 32, 32, 3), dtype=np.uint8) + (batch_idx % 255)\n\ndef train_on_images(images):\n    # dummy function, implement this\n    pass\n\n# Pipeline:\n# (1) Crop images from each side by 1-16px, do not resize the results\n#     images back to the input size. Keep them at the cropped size.\n# (2) Horizontally flip 50% of the images.\n# (3) Blur images using a gaussian kernel with sigma between 0.0 and 3.0.\nseq = iaa.Sequential([\n    iaa.Crop(px=(1, 16), keep_size=False),\n    iaa.Fliplr(0.5),\n    iaa.GaussianBlur(sigma=(0, 3.0))\n])\n\nfor batch_idx in range(100):\n    images = load_batch(batch_idx)\n    images_aug = seq(images=images)  # done by the library\n    train_on_images(images_aug)\n```\n\n\n### Example: Very Complex Augmentation Pipeline\n\nApply a very heavy augmentation pipeline to images (used to create the image \nat the very top of this readme):\n```python\nimport numpy as np\nimport imgaug as ia\nimport imgaug.augmenters as iaa\n\n# random example images\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# Sometimes(0.5, ...) applies the given augmenter in 50% of all cases,\n# e.g. Sometimes(0.5, GaussianBlur(0.3)) would blur roughly every second image.\nsometimes = lambda aug: iaa.Sometimes(0.5, aug)\n\n# Define our sequence of augmentation steps that will be applied to every image\n# All augmenters with per_channel=0.5 will sample one value _per image_\n# in 50% of all cases. In all other cases they will sample new values\n# _per channel_.\n\nseq = iaa.Sequential(\n    [\n        # apply the following augmenters to most images\n        iaa.Fliplr(0.5), # horizontally flip 50% of all images\n        iaa.Flipud(0.2), # vertically flip 20% of all images\n        # crop images by -5% to 10% of their height/width\n        sometimes(iaa.CropAndPad(\n            percent=(-0.05, 0.1),\n            pad_mode=ia.ALL,\n            pad_cval=(0, 255)\n        )),\n        sometimes(iaa.Affine(\n            scale={\"x\": (0.8, 1.2), \"y\": (0.8, 1.2)}, # scale images to 80-120% of their size, individually per axis\n            translate_percent={\"x\": (-0.2, 0.2), \"y\": (-0.2, 0.2)}, # translate by -20 to +20 percent (per axis)\n            rotate=(-45, 45), # rotate by -45 to +45 degrees\n            shear=(-16, 16), # shear by -16 to +16 degrees\n            order=[0, 1], # use nearest neighbour or bilinear interpolation (fast)\n            cval=(0, 255), # if mode is constant, use a cval between 0 and 255\n            mode=ia.ALL # use any of scikit-image's warping modes (see 2nd image from the top for examples)\n        )),\n        # execute 0 to 5 of the following (less important) augmenters per image\n        # don't execute all of them, as that would often be way too strong\n        iaa.SomeOf((0, 5),\n            [\n                sometimes(iaa.Superpixels(p_replace=(0, 1.0), n_segments=(20, 200))), # convert images into their superpixel representation\n                iaa.OneOf([\n                    iaa.GaussianBlur((0, 3.0)), # blur images with a sigma between 0 and 3.0\n                    iaa.AverageBlur(k=(2, 7)), # blur image using local means with kernel sizes between 2 and 7\n                    iaa.MedianBlur(k=(3, 11)), # blur image using local medians with kernel sizes between 2 and 7\n                ]),\n                iaa.Sharpen(alpha=(0, 1.0), lightness=(0.75, 1.5)), # sharpen images\n                iaa.Emboss(alpha=(0, 1.0), strength=(0, 2.0)), # emboss images\n                # search either for all edges or for directed edges,\n                # blend the result with the original image using a blobby mask\n                iaa.SimplexNoiseAlpha(iaa.OneOf([\n                    iaa.EdgeDetect(alpha=(0.5, 1.0)),\n                    iaa.DirectedEdgeDetect(alpha=(0.5, 1.0), direction=(0.0, 1.0)),\n                ])),\n                iaa.AdditiveGaussianNoise(loc=0, scale=(0.0, 0.05*255), per_channel=0.5), # add gaussian noise to images\n                iaa.OneOf([\n                    iaa.Dropout((0.01, 0.1), per_channel=0.5), # randomly remove up to 10% of the pixels\n                    iaa.CoarseDropout((0.03, 0.15), size_percent=(0.02, 0.05), per_channel=0.2),\n                ]),\n                iaa.Invert(0.05, per_channel=True), # invert color channels\n                iaa.Add((-10, 10), per_channel=0.5), # change brightness of images (by -10 to 10 of original value)\n                iaa.AddToHueAndSaturation((-20, 20)), # change hue and saturation\n                # either change the brightness of the whole image (sometimes\n                # per channel) or change the brightness of subareas\n                iaa.OneOf([\n                    iaa.Multiply((0.5, 1.5), per_channel=0.5),\n                    iaa.FrequencyNoiseAlpha(\n                        exponent=(-4, 0),\n                        first=iaa.Multiply((0.5, 1.5), per_channel=True),\n                        second=iaa.LinearContrast((0.5, 2.0))\n                    )\n                ]),\n                iaa.LinearContrast((0.5, 2.0), per_channel=0.5), # improve or worsen the contrast\n                iaa.Grayscale(alpha=(0.0, 1.0)),\n                sometimes(iaa.ElasticTransformation(alpha=(0.5, 3.5), sigma=0.25)), # move pixels locally around (with random strengths)\n                sometimes(iaa.PiecewiseAffine(scale=(0.01, 0.05))), # sometimes move parts of the image around\n                sometimes(iaa.PerspectiveTransform(scale=(0.01, 0.1)))\n            ],\n            random_order=True\n        )\n    ],\n    random_order=True\n)\nimages_aug = seq(images=images)\n```\n\n\n### Example: Augment Images and Keypoints\n\nAugment images and keypoints/landmarks on the same images:\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\nimages = np.zeros((2, 128, 128, 3), dtype=np.uint8)  # two example images\nimages[:, 64, 64, :] = 255\npoints = [\n    [(10.5, 20.5)],  # points on first image\n    [(50.5, 50.5), (60.5, 60.5), (70.5, 70.5)]  # points on second image\n]\n\nseq = iaa.Sequential([\n    iaa.AdditiveGaussianNoise(scale=0.05*255),\n    iaa.Affine(translate_px={\"x\": (1, 5)})\n])\n\n# augment keypoints and images\nimages_aug, points_aug = seq(images=images, keypoints=points)\n\nprint(\"Image 1 center\", np.argmax(images_aug[0, 64, 64:64+6, 0]))\nprint(\"Image 2 center\", np.argmax(images_aug[1, 64, 64:64+6, 0]))\nprint(\"Points 1\", points_aug[0])\nprint(\"Points 2\", points_aug[1])\n```\nNote that all coordinates in `imgaug` are subpixel-accurate, which is\nwhy `x=0.5, y=0.5` denotes the center of the top left pixel.\n\n\n### Example: Augment Images and Bounding Boxes\n\n```python\nimport numpy as np\nimport imgaug as ia\nimport imgaug.augmenters as iaa\n\nimages = np.zeros((2, 128, 128, 3), dtype=np.uint8)  # two example images\nimages[:, 64, 64, :] = 255\nbbs = [\n    [ia.BoundingBox(x1=10.5, y1=15.5, x2=30.5, y2=50.5)],\n    [ia.BoundingBox(x1=10.5, y1=20.5, x2=50.5, y2=50.5),\n     ia.BoundingBox(x1=40.5, y1=75.5, x2=70.5, y2=100.5)]\n]\n\nseq = iaa.Sequential([\n    iaa.AdditiveGaussianNoise(scale=0.05*255),\n    iaa.Affine(translate_px={\"x\": (1, 5)})\n])\n\nimages_aug, bbs_aug = seq(images=images, bounding_boxes=bbs)\n```\n\n\n### Example: Augment Images and Polygons\n\n```python\nimport numpy as np\nimport imgaug as ia\nimport imgaug.augmenters as iaa\n\nimages = np.zeros((2, 128, 128, 3), dtype=np.uint8)  # two example images\nimages[:, 64, 64, :] = 255\npolygons = [\n    [ia.Polygon([(10.5, 10.5), (50.5, 10.5), (50.5, 50.5)])],\n    [ia.Polygon([(0.0, 64.5), (64.5, 0.0), (128.0, 128.0), (64.5, 128.0)])]\n]\n\nseq = iaa.Sequential([\n    iaa.AdditiveGaussianNoise(scale=0.05*255),\n    iaa.Affine(translate_px={\"x\": (1, 5)})\n])\n\nimages_aug, polygons_aug = seq(images=images, polygons=polygons)\n```\n\n\n### Example: Augment Images and LineStrings\n\nLineStrings are similar to polygons, but are not closed, may intersect with\nthemselves and don't have an inner area.\n```python\nimport numpy as np\nimport imgaug as ia\nimport imgaug.augmenters as iaa\n\nimages = np.zeros((2, 128, 128, 3), dtype=np.uint8)  # two example images\nimages[:, 64, 64, :] = 255\nls = [\n    [ia.LineString([(10.5, 10.5), (50.5, 10.5), (50.5, 50.5)])],\n    [ia.LineString([(0.0, 64.5), (64.5, 0.0), (128.0, 128.0), (64.5, 128.0),\n                    (128.0, 0.0)])]\n]\n\nseq = iaa.Sequential([\n    iaa.AdditiveGaussianNoise(scale=0.05*255),\n    iaa.Affine(translate_px={\"x\": (1, 5)})\n])\n\nimages_aug, ls_aug = seq(images=images, line_strings=ls)\n```\n\n\n### Example: Augment Images and Heatmaps\n\nHeatmaps are dense float arrays with values between `0.0` and `1.0`.\nThey can be used e.g. when training models to predict facial landmark\nlocations. Note that the heatmaps here have lower height and width than the\nimages. `imgaug` handles that case automatically. The crop pixel amounts will\nbe halved for the heatmaps.\n\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\n# Standard scenario: You have N RGB-images and additionally 21 heatmaps per\n# image. You want to augment each image and its heatmaps identically.\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\nheatmaps = np.random.random(size=(16, 64, 64, 1)).astype(np.float32)\n\nseq = iaa.Sequential([\n    iaa.GaussianBlur((0, 3.0)),\n    iaa.Affine(translate_px={\"x\": (-40, 40)}),\n    iaa.Crop(px=(0, 10))\n])\n\nimages_aug, heatmaps_aug = seq(images=images, heatmaps=heatmaps)\n```\n\n\n### Example: Augment Images and Segmentation Maps\n\nThis is similar to heatmaps, but the dense arrays have dtype `int32`.\nOperations such as resizing will automatically use nearest neighbour\ninterpolation.\n\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\n# Standard scenario: You have N=16 RGB-images and additionally one segmentation\n# map per image. You want to augment each image and its heatmaps identically.\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\nsegmaps = np.random.randint(0, 10, size=(16, 64, 64, 1), dtype=np.int32)\n\nseq = iaa.Sequential([\n    iaa.GaussianBlur((0, 3.0)),\n    iaa.Affine(translate_px={\"x\": (-40, 40)}),\n    iaa.Crop(px=(0, 10))\n])\n\nimages_aug, segmaps_aug = seq(images=images, segmentation_maps=segmaps)\n```\n\n\n### Example: Visualize Augmented Images\n\nQuickly show example results of your augmentation sequence:\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\nseq = iaa.Sequential([iaa.Fliplr(0.5), iaa.GaussianBlur((0, 3.0))])\n\n# Show an image with 8*8 augmented versions of image 0 and 8*8 augmented\n# versions of image 1. Identical augmentations will be applied to\n# image 0 and 1.\nseq.show_grid([images[0], images[1]], cols=8, rows=8)\n```\n\n\n### Example: Visualize Augmented Non-Image Data\n\n`imgaug` contains many helper function, among these functions to quickly\nvisualize augmented non-image results, such as bounding boxes or heatmaps.\n\n```python\nimport numpy as np\nimport imgaug as ia\n\nimage = np.zeros((64, 64, 3), dtype=np.uint8)\n\n# points\nkps = [ia.Keypoint(x=10.5, y=20.5), ia.Keypoint(x=60.5, y=60.5)]\nkpsoi = ia.KeypointsOnImage(kps, shape=image.shape)\nimage_with_kps = kpsoi.draw_on_image(image, size=7, color=(0, 0, 255))\nia.imshow(image_with_kps)\n\n# bbs\nbbsoi = ia.BoundingBoxesOnImage([\n    ia.BoundingBox(x1=10.5, y1=20.5, x2=50.5, y2=30.5)\n], shape=image.shape)\nimage_with_bbs = bbsoi.draw_on_image(image)\nimage_with_bbs = ia.BoundingBox(\n    x1=50.5, y1=10.5, x2=100.5, y2=16.5\n).draw_on_image(image_with_bbs, color=(255, 0, 0), size=3)\nia.imshow(image_with_bbs)\n\n# polygons\npsoi = ia.PolygonsOnImage([\n    ia.Polygon([(10.5, 20.5), (50.5, 30.5), (10.5, 50.5)])\n], shape=image.shape)\nimage_with_polys = psoi.draw_on_image(\n    image, alpha_points=0, alpha_face=0.5, color_lines=(255, 0, 0))\nia.imshow(image_with_polys)\n\n# heatmaps\nhms = ia.HeatmapsOnImage(np.random.random(size=(32, 32, 1)).astype(np.float32),\n                         shape=image.shape)\nimage_with_hms = hms.draw_on_image(image)\nia.imshow(image_with_hms)\n```\n\nLineStrings and segmentation maps support similar methods as shown above.\n\n\n### Example: Using Augmenters Only Once \n\nWhile the interface is adapted towards re-using instances of augmenters\nmany times, you are also free to use them only once. The overhead to\ninstantiate the augmenters each time is usually negligible.\n\n```python\nfrom imgaug import augmenters as iaa\nimport numpy as np\n\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# always horizontally flip each input image\nimages_aug = iaa.Fliplr(1.0)(images=images)\n\n# vertically flip each input image with 90% probability\nimages_aug = iaa.Flipud(0.9)(images=images)\n\n# blur 50% of all images using a gaussian kernel with a sigma of 3.0\nimages_aug = iaa.Sometimes(0.5, iaa.GaussianBlur(3.0))(images=images)\n```\n\n\n### Example: Multicore Augmentation\n\nImages can be augmented in **background processes** using the\nmethod `augment_batches(batches, background=True)`, where `batches` is\na list/generator of\n[imgaug.augmentables.batches.UnnormalizedBatch](https://imgaug.readthedocs.io/en/latest/_modules/imgaug/augmentables/batches.html#UnnormalizedBatch)\nor\n[imgaug.augmentables.batches.Batch](https://imgaug.readthedocs.io/en/latest/source/api_augmentables_batches.html#imgaug.augmentables.batches.Batch).\nThe following example augments a list of image batches in the background:\n```python\nimport skimage.data\nimport imgaug as ia\nimport imgaug.augmenters as iaa\nfrom imgaug.augmentables.batches import UnnormalizedBatch\n\n# Number of batches and batch size for this example\nnb_batches = 10\nbatch_size = 32\n\n# Example augmentation sequence to run in the background\naugseq = iaa.Sequential([\n    iaa.Fliplr(0.5),\n    iaa.CoarseDropout(p=0.1, size_percent=0.1)\n])\n\n# For simplicity, we use the same image here many times\nastronaut = skimage.data.astronaut()\nastronaut = ia.imresize_single_image(astronaut, (64, 64))\n\n# Make batches out of the example image (here: 10 batches, each 32 times\n# the example image)\nbatches = []\nfor _ in range(nb_batches):\n    batches.append(UnnormalizedBatch(images=[astronaut] * batch_size))\n\n# Show the augmented images.\n# Note that augment_batches() returns a generator.\nfor images_aug in augseq.augment_batches(batches, background=True):\n    ia.imshow(ia.draw_grid(images_aug.images_aug, cols=8))\n```\n\nIf you need more control over the background augmentation, e.g. to set\nseeds, control the number of used CPU cores or constraint the memory usage,\nsee the corresponding\n[multicore augmentation notebook](https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A03%20-%20Multicore%20Augmentation.ipynb)\nor the API about\n[Augmenter.pool()](https://imgaug.readthedocs.io/en/latest/source/api_augmenters_meta.html#imgaug.augmenters.meta.Augmenter.pool)\nand\n[imgaug.multicore.Pool](https://imgaug.readthedocs.io/en/latest/source/api_multicore.html#imgaug.multicore.Pool).\n\n\n### Example: Probability Distributions as Parameters\n\nMost augmenters support using tuples `(a, b)` as a shortcut to denote\n`uniform(a, b)` or lists `[a, b, c]` to denote a set of allowed values from\nwhich one will be picked randomly. If you require more complex probability\ndistributions (e.g. gaussians, truncated gaussians or poisson distributions)\nyou can use stochastic parameters from `imgaug.parameters`:\n\n```python\nimport numpy as np\nfrom imgaug import augmenters as iaa\nfrom imgaug import parameters as iap\n\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# Blur by a value sigma which is sampled from a uniform distribution\n# of range 10.1 <= x < 13.0.\n# The convenience shortcut for this is: GaussianBlur((10.1, 13.0))\nblurer = iaa.GaussianBlur(10 + iap.Uniform(0.1, 3.0))\nimages_aug = blurer(images=images)\n\n# Blur by a value sigma which is sampled from a gaussian distribution\n# N(1.0, 0.1), i.e. sample a value that is usually around 1.0.\n# Clip the resulting value so that it never gets below 0.1 or above 3.0.\nblurer = iaa.GaussianBlur(iap.Clip(iap.Normal(1.0, 0.1), 0.1, 3.0))\nimages_aug = blurer(images=images)\n```\n\nThere are many more probability distributions in the library, e.g. truncated\ngaussian distribution, poisson distribution or beta distribution.\n\n\n### Example: WithChannels\n\nApply an augmenter only to specific image channels:\n```python\nimport numpy as np\nimport imgaug.augmenters as iaa\n\n# fake RGB images\nimages = np.random.randint(0, 255, (16, 128, 128, 3), dtype=np.uint8)\n\n# add a random value from the range (-30, 30) to the first two channels of\n# input images (e.g. to the R and G channels)\naug = iaa.WithChannels(\n  channels=[0, 1],\n  children=iaa.Add((-30, 30))\n)\n\nimages_aug = aug(images=images)\n```\n\n\n<a name=\"citation\"/>\n\n## Citation\n\n<!--\nNote: the table only lists people who have their real names (publicly)\nset in their github\n\nList of username-realname matching based on\nhttps://github.com/aleju/imgaug/graphs/contributors ordered by commits:\n\nwkentaro            Wada, Kentaro\nErotemic            Crall, Jon\nstnk20              Tanaka, Satoshi\njgraving            Graving, Jake\ncreinders           Reinders, Christoph     (lastname not public on github, guessed from username)\nSarthakYadav        Yadav, Sarthak\nnektor211           ?\njoybanerjee08       Banerjee, Joy\ngaborvecsei         Vecsei, Gábor\nadamwkraft          Kraft, Adam\nZhengRui            Rui, Zheng\nBorda               Borovec, Jirka\nvallentin           Vallentin, Christian\nss18                Zhydenko, Semen\nkilsenp             Pfeiffer, Kilian\nkacper1095          ?\nismaelfm            Fernández, Ismael\nfmder               De Rainville, François-Michel\nfchouteau           ?\nchi-hung            Weng, Chi-Hung\napatsekin           ?\nabnera              Ayala-Acevedo, Abner\nRephaelMeudec       Meudec, Raphael\nPetemir             Laporte, Matias\n\n-->\nIf this library has helped you during your research, feel free to cite it:\n```latex\n@misc{imgaug,\n  author = {Jung, Alexander B.\n            and Wada, Kentaro\n            and Crall, Jon\n            and Tanaka, Satoshi\n            and Graving, Jake\n            and Reinders, Christoph\n            and Yadav, Sarthak\n            and Banerjee, Joy\n            and Vecsei, Gábor\n            and Kraft, Adam\n            and Rui, Zheng\n            and Borovec, Jirka\n            and Vallentin, Christian\n            and Zhydenko, Semen\n            and Pfeiffer, Kilian\n            and Cook, Ben\n            and Fernández, Ismael\n            and De Rainville, François-Michel\n            and Weng, Chi-Hung\n            and Ayala-Acevedo, Abner\n            and Meudec, Raphael\n            and Laporte, Matias\n            and others},\n  title = {{imgaug}},\n  howpublished = {\\url{https://github.com/aleju/imgaug}},\n  year = {2020},\n  note = {Online; accessed 01-Feb-2020}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B98:29FD16:17CC1E:5CF02B:6AB920F9"},"text_sha256":"1b807a3219d4d7ce36bbfafa491f77cc4a8939ec3cd3095f540dfa114dfd43de"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"davisking/dlib","input_row":{"repository":"davisking/dlib","url":"https://github.com/davisking/dlib","name":"dlib","owner":"davisking","description":"A toolkit for making real world machine learning and data analysis applications in C++","language":"C++","license_spdx_id":"BSL-1.0","license_name":"Boost Software License 1.0","license_osi_approved":"true","stars":14450,"issues":2245,"created_at":"2014-01-29T00:45:33Z","updated_at":"2026-09-27T12:58:42Z","first_commit_at":"2008-05-02T14:15:48Z","last_commit_at":"2026-09-23T02:59:44Z","activity_months":220.68000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:32.864Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"davisking/dlib","visibility":"public","created_at":"2014-01-29T00:45:33Z","updated_at":"2026-09-27T12:58:42Z","private":false,"fork":false,"archived":false,"stargazers_count":14450,"open_issues_count":39,"license_spdx_id":"BSL-1.0","license_name":"Boost Software License 1.0"},"error":"","rate":{"github_remaining":"3324","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0893:71E0C:17D5237:1BF2EA9:6AB92888"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3323","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5366:2EA1B4:17BC56E:1BDB81E:6AB92889"},"commit":{"sha":"f82aa1beed60f179866e76114e997b116a75df1f","url":"https://github.com/davisking/dlib/commit/f82aa1beed60f179866e76114e997b116a75df1f","date":"2018-05-24T17:20:17Z","author_date":"2018-05-24T17:20:17Z","committer_date":"2018-05-24T17:20:17Z","tree_sha":"51a5e94d6f9e43ba9beb100e17c50c005996d2a1","message_first_line":"Add a default cpack \"package\" target. (#1330)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3322","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F3:77994:17CF7C0:1BEE6A5:6AB92889"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2703,"blob_sha":"349f6070a8307afc109a6f60e9dd4b5bb675d2e4","priority":0}],"documents":[{"path":"README.md","size":2703,"blob_sha":"349f6070a8307afc109a6f60e9dd4b5bb675d2e4","priority":0,"status":200,"text":"# dlib C++ library [![Travis Status](https://travis-ci.org/davisking/dlib.svg?branch=master)](https://travis-ci.org/davisking/dlib)\n\nDlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. See [http://dlib.net](http://dlib.net) for the main project documentation and API reference.\n\n\n\n## Compiling dlib C++ example programs\n\nGo into the examples folder and type:\n\n```bash\nmkdir build; cd build; cmake .. ; cmake --build .\n```\n\nThat will build all the examples.\nIf you have a CPU that supports AVX instructions then turn them on like this:\n\n```bash\nmkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .\n```\n\nDoing so will make some things run faster.\n\nFinally, Visual Studio users should usually do everything in 64bit mode.  By default Visual Studio is 32bit, both in its outputs and its own execution, so you have to explicitly tell it to use 64bits.  Since it's not the 1990s anymore you probably want to use 64bits.  Do that with a cmake invocation like this:\n```bash\ncmake .. -G \"Visual Studio 14 2015 Win64\" -T host=x64 \n```\n\n## Compiling your own C++ programs that use dlib\n\nThe examples folder has a [CMake tutorial](https://github.com/davisking/dlib/blob/master/examples/CMakeLists.txt) that tells you what to do.  There are also additional instructions on the [dlib web site](http://dlib.net/compile.html).\n\n## Compiling dlib Python API\n\nBefore you can run the Python example programs you must compile dlib. Type:\n\n```bash\npython setup.py install\n```\n\n\n## Running the unit test suite\n\nType the following to compile and run the dlib unit test suite:\n\n```bash\ncd dlib/test\nmkdir build\ncd build\ncmake ..\ncmake --build . --config Release\n./dtest --runall\n```\n\nNote that on windows your compiler might put the test executable in a subfolder called `Release`. If that's the case then you have to go to that folder before running the test.\n\nThis library is licensed under the Boost Software License, which can be found in [dlib/LICENSE.txt](https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt).  The long and short of the license is that you can use dlib however you like, even in closed source commercial software.\n\n## dlib sponsors\n\nThis research is based in part upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA) under contract number 2014-14071600010. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of ODNI, IARPA, or the U.S. Government.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"341C:3B1F3:17DE05:5D0348:6AB920FA"},"text_sha256":"a3dda6ecee21b3d585026ee09404563d13fd45b99c7a4394dfb4acaf49f99aa6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3321","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:17E2162:1C009C9:6AB9288B"},"commit":{"sha":"cf82c2ca8df36c3f456d815fdc0c5404b1e6a0ef","url":"https://github.com/davisking/dlib/commit/cf82c2ca8df36c3f456d815fdc0c5404b1e6a0ef","date":"2026-06-28T00:43:57Z","author_date":"2026-06-28T00:43:57Z","committer_date":"2026-06-28T00:43:57Z","tree_sha":"d7a934aefd2a2efdb0b4f49c21baf08977b32ccf","message_first_line":"This version of cmake we were using is now broken in github actions.  Switch to a newer version (#3151)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3320","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0937:278AC2:1847A96:1C66CE0:6AB9288B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3535,"blob_sha":"51b2aeeecd2241e8f3a802689212240f751a1d4e","priority":0}],"documents":[{"path":"README.md","size":3535,"blob_sha":"51b2aeeecd2241e8f3a802689212240f751a1d4e","priority":0,"status":200,"text":"# dlib C++ library  [![GitHub Actions C++ Status](https://github.com/davisking/dlib/actions/workflows/build_cpp.yml/badge.svg)](https://github.com/davisking/dlib/actions/workflows/build_cpp.yml) [![GitHub Actions Python Status](https://github.com/davisking/dlib/actions/workflows/build_python.yml/badge.svg)](https://github.com/davisking/dlib/actions/workflows/build_python.yml)\n\nDlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. See [http://dlib.net](http://dlib.net) for the main project documentation and API reference.\n\n\n\n## Compiling dlib C++ example programs\n\nGo into the examples folder and type:\n\n```bash\nmkdir build; cd build; cmake .. ; cmake --build .\n```\n\nThat will build all the examples.\nIf you have a CPU that supports AVX instructions then turn them on like this:\n\n```bash\nmkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .\n```\n\nDoing so will make some things run faster.\n\nFinally, Visual Studio users should usually do everything in 64bit mode.  By default Visual Studio is 32bit, both in its outputs and its own execution, so you have to explicitly tell it to use 64bits.  Since it's not the 1990s anymore you probably want to use 64bits.  Do that with a cmake invocation like this:\n```bash\ncmake .. -G \"Visual Studio 14 2015 Win64\" -T host=x64\n```\n\n## Compiling your own C++ programs that use dlib\n\nThe examples folder has a [CMake tutorial](https://github.com/davisking/dlib/blob/master/examples/CMakeLists.txt) that tells you what to do.  There are also additional instructions on the [dlib web site](http://dlib.net/compile.html).\n\nAlternatively, if you are using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager you can download and install dlib with CMake integration in a single command:\n```bash\nvcpkg install dlib\n```\n\n## Compiling dlib Python API\n\nEither fetch the latest stable release of dlib from PyPi and install that:\n```bash\npip install dlib\n```\nOr fetch the very latest version from github and install that:\n```bash\ngit clone https://github.com/davisking/dlib.git\ncd dlib\npip install .\n```\n\nIt's possible to change build settings by passing parameters to `setup.py` or `DLIB_*` environment variables.\nFor example, setting the environment variable `DLIB_NO_GUI_SUPPORT` to `ON` will add the cmake option\n`-DDLIB_NO_GUI_SUPPORT=ON`.\n\n\n## Running the unit test suite\n\nType the following to compile and run the dlib unit test suite:\n\n```bash\ncd dlib/test\nmkdir build\ncd build\ncmake ..\ncmake --build . --config Release\n./dtest --runall\n```\n\nNote that on windows your compiler might put the test executable in a subfolder called `Release`. If that's the case then you have to go to that folder before running the test.\n\nThis library is licensed under the Boost Software License, which can be found in [dlib/LICENSE.txt](https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt).  The long and short of the license is that you can use dlib however you like, even in closed source commercial software.\n\n## dlib sponsors\n\nThis research is based in part upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA) under contract number 2014-14071600010. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of ODNI, IARPA, or the U.S. Government.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8FB2:727CE:16EA8F:5C0F8F:6AB920FD"},"text_sha256":"edbf6b484f06454ac5f2ce139174e4ae6abc65ba433bee77152bb50c875a2c86"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jindongwang/transferlearning","input_row":{"repository":"jindongwang/transferlearning","url":"https://github.com/jindongwang/transferlearning","name":"transferlearning","owner":"jindongwang","description":"Transfer learning / domain adaptation / domain generalization / multi-task learning etc. Papers, codes, datasets, applications, tutorials.-迁移学习","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":14358,"issues":349,"created_at":"2017-04-30T11:32:21Z","updated_at":"2026-09-27T13:04:15Z","first_commit_at":"2017-07-03T06:49:01Z","last_commit_at":"2026-02-09T16:27:22Z","activity_months":103.27,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:36.308Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jindongwang/transferlearning","visibility":"public","created_at":"2017-04-30T11:32:21Z","updated_at":"2026-09-27T13:04:15Z","private":false,"fork":false,"archived":false,"stargazers_count":14358,"open_issues_count":24,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3319","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0860:76AED:17D9E6C:1BF9075:6AB9288C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3318","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:17DCC18:1BFB37E:6AB9288C"},"commit":{"sha":"6866935a541258d8a331202b1c1f87b17e16b4b6","url":"https://github.com/jindongwang/transferlearning/commit/6866935a541258d8a331202b1c1f87b17e16b4b6","date":"2018-05-24T12:23:29Z","author_date":"2018-05-24T12:23:29Z","committer_date":"2018-05-24T12:23:29Z","tree_sha":"08dbdcd64d762623b3b5ba4881d64f01aa5195df","message_first_line":"add: Weike Pan as a scholar"},"tree_request_status":200,"tree_rate":{"github_remaining":"3317","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53B7:76AED:17D9EE9:1BF910E:6AB9288D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18241,"blob_sha":"14c8a4218adfa7bb5a615397834c636dfc137cee","priority":0}],"documents":[{"path":"README.md","size":18241,"blob_sha":"14c8a4218adfa7bb5a615397834c636dfc137cee","priority":0,"status":200,"text":"# 迁移学习 Transfer Learning\n\n关于迁移学习的所有资料，包括：介绍、综述文章、最新文章、代表工作及其代码、常用数据集、硕博士论文等等。(可能是**目前最全**的迁移学习资料库？) *欢迎一起贡献！*\n\nEverything about Transfer Learning (Probably the **most complete** repository?). *Your contribution is highly valued!*\n\n_ _ _\n\n## 目录 Table of contents\n\n* [最新文章 Latest](#0latest)\n\n* [迁移学习简介 Introduction to transfer learning](#1迁移学习简介)\n\n* [研究领域与相关文章 Research articles by area](#2迁移学习研究领域与相关文章) \n\n* [理论与综述文章 Theoretical and survey papers](#3理论与综述文章)\n\n* [相关代码 Available codes](#4代码)\n\n* [迁移学习代表性研究学者 Scholars](#5迁移学习代表性研究学者)\n\n* [相关的硕博士论文 Thesis](#6迁移学习相关的硕博士论文)\n\n* [常用公开数据集及算法结果 Datasets and benchmark](#7公开数据集及实验结果)\n\n* [其他 Miscellaneous](#其他)\n\n* [Contributing](#contributing)\n\n> 关于机器学习和行为识别的资料，请参考：[行为识别](https://github.com/jindongwang/activityrecognition)｜[机器学习](https://github.com/jindongwang/MachineLearning)\n\n- - -\n\n### 0.Latest\n\n[迁移学习文章汇总 Awesome transfer learning papers](https://github.com/jindongwang/transferlearning/tree/master/doc/awesome_paper.md)\n\n\n- **最新发表论文**\n\n\t- 20180524 KDD-18 用迁移学习方法进行人们的ID迁移：[Learning and Transferring IDs Representation in E-commerce](https://arxiv.org/abs/1712.08289)\n\n\t- 20180516 ACL-18 将对抗迁移学习用于危机状态下的舆情分析：[Domain Adaptation with Adversarial Training and Graph Embeddings](https://arxiv.org/abs/1805.05151)\n\n\t- 20180510 IEEE Trans. Cybernetics 提出一个通用的迁移学习框架，对不同的domain进行不同的特征变换：[Transfer Independently Together: A Generalized Framework for Domain Adaptation](https://ieeexplore-ieee-org.lib.ezproxy.ust.hk/abstract/document/8337102/)\n\n\t- 20180428 CVPR-18 相互协同学习：[Deep Mutual Learning](https://github.com/YingZhangDUT/Deep-Mutual-Learning)\n\n\t- 20180428 ICLR-18 自集成学习用于domain adaptation：[Self-ensembling for visual domain adaptation](https://github.com/Britefury/self-ensemble-visual-domain-adapt)\n\n\t- 20180428 IJCAI-18 将knowledge distilation用于transfer learning，然后进行视频分类：[Better and Faster: Knowledge Transfer from Multiple Self-supervised Learning Tasks via Graph Distillation for Video Classification](https://arxiv.org/abs/1804.10069)\n\n- **arXiv专区** (arXiv上的文章较新，但未经过peer-review，慎重看待)\n\n\t- 20180524 arXiv 探索了Multi-source迁移学习的一些理论：[Algorithms and Theory for Multiple-Source Adaptation](https://arxiv.org/abs/1805.08727)\n\n\t- 20180524 arXiv 用深度强化学习的方法学习domain adaptation中的采样策略：[Learning Sampling Policies for Domain Adaptation](https://arxiv.org/abs/1805.07641)\n\n\t- 20180524 arXiv 杨强团队、与之前的learning to learning类似，这里提供了一个从经验中学习的learning to multitask框架：[Learning to Multitask](https://arxiv.org/abs/1805.07541)\n\n\t- 20180522 arXiv 用CNN进行跨领域的属性学习：[Cross-domain attribute representation based on convolutional neural network](https://arxiv.org/abs/1805.07295)\n\n\t- 20180519 arXiv 用迁移学习进行物体检测，200帧/秒：[Object detection at 200 Frames Per Second](https://arxiv.org/abs/1804.04775)\n\n\t- 20180519 arXiv 用迁移学习进行肢体语言识别：[Optimization of Transfer Learning for Sign Language Recognition Targeting Mobile Platform](https://arxiv.org/abs/1805.06618)\n\n\t- 20180516 arXiv 探索了强化学习中的任务迁移：[Adversarial Task Transfer from Preference](https://arxiv.org/abs/1805.04686)\n\n\t- 20180508 arXiv 利用GAN，从有限数据中生成另一个domain的数据：[Transferring GANs: generating images from limited data](https://arxiv.org/abs/1805.01677)\n\n\t- 20180504 arXiv 用迁移学习进行心脏病检测分类：[ECG Heartbeat Classification: A Deep Transferable Representation](https://arxiv.org/abs/1805.00794)\n\n\n[**更多...**](https://github.com/jindongwang/transferlearning/tree/master/doc/awesome_paper.md)\n\n- - -\n\n### 1.迁移学习简介\n\n- 简介文字资料\n\t- [简单的中文简介](https://github.com/jindongwang/transferlearning/blob/master/doc/%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0%E7%AE%80%E4%BB%8B.md)\n\t- [英文PPT](http://jd92.wang/assets/files/l03_transferlearning.pdf)\n\t- [中文PPT](http://jd92.wang/assets/files/l08_tl_zh.pdf)\n\t- 迁移学习中的领域自适应方法: [PDF](http://jd92.wang/assets/files/l12_da.pdf) ｜ [Video](http://mp.weixin.qq.com/s?__biz=MzI5MDUyMDIxNA==&mid=2247484940&idx=2&sn=35e64e07fde9a96afbb65dbf40a945eb&chksm=ec1febf5db6862e38d5e02ff3278c61b376932a46c5628c7d9cb1769c572bfd31819c13dd468&mpshare=1&scene=1&srcid=1219JpTNZFiNDCHsTUrUxwqy#rd)\n\t- 清华大学龙明盛老师的深度迁移学习报告：[PPT(三星研究院)](http://ise.thss.tsinghua.edu.cn/~mlong/doc/transfer-learning-talk.pdf)、[PPT(Google China)](http://ise.thss.tsinghua.edu.cn/~mlong/doc/deep-transfer-learning-talk.pdf)\n\n- 视频教程\n\t- [台湾大学李宏毅的视频讲解(中文视频)](https://www.youtube.com/watch?v=qD6iD4TFsdQ)\n\t- [迁移学习中的领域自适应方法(中文)](http://mp.weixin.qq.com/s?__biz=MzI5MDUyMDIxNA==&mid=2247484940&idx=2&sn=35e64e07fde9a96afbb65dbf40a945eb&chksm=ec1febf5db6862e38d5e02ff3278c61b376932a46c5628c7d9cb1769c572bfd31819c13dd468&mpshare=1&scene=1&srcid=1219JpTNZFiNDCHsTUrUxwqy#rd)\n\n- [**《迁移学习简明手册》**](https://zhuanlan.zhihu.com/p/35352154) [开发维护地址](https://github.com/jindongwang/transferlearning-tutorial)\n\n- [迁移学习领域的著名学者、代表工作及实验室介绍](https://github.com/jindongwang/transferlearning/blob/master/doc/scholar_TL.md)\n\n- 什么是[负迁移(negative transfer)](https://www.zhihu.com/question/66492194/answer/242870418)？\n\n- 动手教程、代码、数据\n\t- [基于深度学习和迁移学习的识花实践(Tensorflow)](https://cosx.org/2017/10/transfer-learning/)\n\t- [基于Pytorch的图像分类](https://github.com/miguelgfierro/sciblog_support/blob/master/A_Gentle_Introduction_to_Transfer_Learning/Intro_Transfer_Learning.ipynb)\n\t- [使用Pytorch进行finetune](https://github.com/Spandan-Madan/Pytorch_fine_tuning_Tutorial)\n\n- - -\n\n### 2.迁移学习研究领域与相关文章\n\nRelated articles by research areas:\n\n- [领域自适应(非深度) Domain Adaptation (Shallow)](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#领域自适应)\n\t- Domain adaptation介绍：[Domain adaptation](https://github.com/jindongwang/transferlearning/blob/master/doc/domain_adaptation.md)\n\t- 这个目录主要是非深度方法，深度方法在下面。\n\n- [在线迁移学习 Online transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#在线迁移学习)\n\n- [终身迁移学习 Lifelong transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#终身迁移学习)\n\n- [异构迁移学习 Heterogeneous Transfer Learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#异构迁移学习)\n\n- [深度迁移学习 Deep Transfer Learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#深度迁移学习)\n    \n    - [深度对抗迁移迁移学习 Deep Adversarial transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#对抗迁移学习)\n\n- [传递迁移学习 Transitive Transfer Learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#传递迁移学习)\n\n- [强化迁移学习 Transfer Learning with Reinforcement Learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#强化迁移学习)\n\n- [应用 Applications](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#应用)\n\t- [迁移学习用于行为识别 Transfer learning for activity recognition](https://github.com/jindongwang/activityrecognition/blob/master/notes/%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0%E7%94%A8%E4%BA%8E%E8%A1%8C%E4%B8%BA%E8%AF%86%E5%88%AB.md)\n\n一个推荐、分享论文的网站比较好，我在上面会持续整理相关的文章并分享阅读笔记。详情请见[paperweekly](http://www.paperweekly.site/collections/231/papers)。\n\n- - -\n\n### 3.理论与综述文章\n\n- 迁移学习领域最具代表性的综述是[A survey on transfer learning](http://ieeexplore.ieee.org/abstract/document/5288526/)，发表于2010年，对迁移学习进行了比较权威的定义。\n\n- 迁移学习的**理论分析**：\n\n\t- 迁移学习方面一直以来都比较缺乏理论分析与证明的文章，以下三篇连贯式的理论文章成为了经典：\n\t\t- NIPS-06 [Analysis of Representations for Domain Adaptation](https://dl.acm.org/citation.cfm?id=2976474)\n\t\t- ML-10 [A Theory of Learning from Different Domains](https://link.springer.com/article/10.1007/s10994-009-5152-4)\n\t\t- NIPS-08 [Learning Bounds for Domain Adaptation](http://papers.nips.cc/paper/3212-learning-bounds-for-domain-adaptation)\n\n\t- 许多研究者在迁移学习的研究中会应用MMD(Maximum Mean Discrepancy)这个最大均值差异来衡量不同domain之间的距离。MMD的理论文章是：\n\t\t- MMD的提出：[A Hilbert Space Embedding for Distributions](https://link.springer.com/chapter/10.1007/978-3-540-75225-7_5) 以及 [A Kernel Two-Sample Test](http://www.jmlr.org/papers/v13/gretton12a.html)\n\t\t- 多核MMD(MK-MMD)：[Optimal kernel choice for large-scale two-sample tests](http://papers.nips.cc/paper/4727-optimal-kernel-choice-for-large-scale-two-sample-tests)\n\t\t- MMD及多核MMD代码：[Matlab](https://github.com/lopezpaz/classifier_tests/tree/master/code/unit_test_mmd) | [Python](https://github.com/jindongwang/transferlearning/tree/master/code/basic/mmd.py)\n\t- 理论研究方面，重点关注Alex Smola、Ben-David、Bernhard Schölkopf、Arthur Gretton等人的研究即可。\n\n- 较新的综述：\n\t- 20180419 arXiv Neural style transfer的一个\b\bsurvey：[Neural Style Transfer: A Review](https://arxiv.org/abs/1705.04058)\n\t- 2018 arXiv 最新发表在arXiv上的深度domain adaptation的综述：[Deep Visual Domain Adaptation: A Survey](https://arxiv.org/abs/1802.03601)\n\t- 2017 多任务学习的综述，来自香港科技大学杨强团队：[A survey on multi-task learning](https://arxiv.org/abs/1707.08114)\n\t- 2017 异构迁移学习的综述：[A survey on heterogeneous transfer learning](https://link.springer.com/article/10.1186/s40537-017-0089-0)\n\t- 2017 跨领域数据识别的综述：[Cross-dataset recognition: a survey](https://arxiv.org/abs/1705.04396)\n\t- 2016 [A survey of transfer learning](https://pan.baidu.com/s/1gfgXLXT)。其中交代了一些比较经典的如同构、异构等学习方法代表性文章。包括了很多方法介绍，值得一看。\n\t- 2015 中文综述：[迁移学习研究进展](https://pan.baidu.com/s/1bpautob)\n\n- 迁移学习与应用领域结合\n\t- 视觉domain adaptation综述：[Visual Domain Adaptation: A Survey of Recent Advances](https://pan.baidu.com/s/1o8BR7Vc)\n\t- 迁移学习应用于行为识别综述：[Transfer Learning for Activity Recognition: A Survey](https://pan.baidu.com/s/1kVABOYr)\n\t- 迁移学习与增强学习：[Transfer Learning for Reinforcement Learning Domains: A Survey](https://pan.baidu.com/s/1slfr0w1)\n\t- 多个源域进行迁移的综述：[A Survey of Multi-source Domain Adaptation](https://pan.baidu.com/s/1eSGREF4)。\n\n_ _ _\n\n### 4.代码\n\n请见[这里](https://github.com/jindongwang/transferlearning/tree/master/code) | Please see [HERE](https://github.com/jindongwang/transferlearning/tree/master/code) for some popular transfer learning codes.\n\n_ _ _\n\n### 5.迁移学习代表性研究学者\n\n**全部列表以及代表工作性见[这里](https://github.com/jindongwang/transferlearning/blob/master/doc/scholar_TL.md)**\n\n- [Qiang Yang](http://www.cs.ust.hk/~qyang/)：中文名杨强。香港科技大学计算机系讲座教授，大数据中心主任。迁移学习领域世界性专家。IEEE/AAAI/IAPR/AAAS fellow。[[Google scholar](https://scholar.google.com/citations?user=1LxWZLQAAAAJ&hl=zh-CN)]\n\n- [Sinno Jialin Pan](http://www.ntu.edu.sg/home/sinnopan/)：杨强的学生，香港科技大学博士，现任新加坡南洋理工大学助理教授。迁移学习领域代表性综述A survey on transfer learning的第一作者（Qiang Yang是二作）。[[Google scholar](https://scholar.google.com/citations?user=P6WcnfkAAAAJ&hl=zh-CN)]\n\n- [Wenyuan Dai](https://scholar.google.com.sg/citations?user=AGR9pP0AAAAJ&hl=zh-CN)：中文名戴文渊，上海交通大学硕士，现任第四范式人工智能创业公司CEO。迁移学习领域著名的牛人，在顶级会议上发表多篇高水平文章，每篇论文引用量巨大。[[Google scholar](https://scholar.google.com.hk/citations?hl=zh-CN&user=AGR9pP0AAAAJ)]\n\n- [Lixin Duan](http://www.lxduan.info/)：中文名段立新，新加坡南洋理工大学博士，现就职于电子科技大学，教授。[[Google scholar](https://scholar.google.com.hk/citations?user=inRIcS0AAAAJ&hl=zh-CN&oi=ao)]\n\n- [Fuzhen Zhuang](http://www.intsci.ac.cn/users/zhuangfuzhen/)：中文名庄福振，中科院计算所博士，现任中科院计算所副研究员。[[Google scholar](https://scholar.google.com/citations?user=klJBYrAAAAAJ&hl=zh-CN&oi=ao)]\n\n- [Mingsheng Long](http://ise.thss.tsinghua.edu.cn/~mlong/)：中文名龙明盛，清华大学博士，现任清华大学助理教授、博士生导师。[[Google scholar](https://scholar.google.com/citations?view_op=search_authors&mauthors=mingsheng+long&hl=zh-CN&oi=ao)]\n\n- [Qingyao Wu](https://sites.google.com/site/qysite/)：中文名吴庆耀，现任华南理工大学副教授。主要做在线迁移学习、异构迁移学习方面的研究。[[Google scholar](https://scholar.google.com.hk/citations?user=n6e_2IgAAAAJ&hl=zh-CN&oi=ao)]\n\n- [Weike Pan](https://sites.google.com/site/weikep/)：中文名潘微科，杨强的学生，现任深圳大学副教授，香港科技大学博士毕业。主要做迁移学习在推荐系统方面的一些工作。 [[Google Scholar](https://scholar.google.com/citations?user=pC5Q26MAAAAJ&hl=en)]\n\n- [Tongliang Liu](http://ieeexplore.ieee.org/abstract/document/8259375/)：中文名刘同亮，现任悉尼大学助理教授。主要做迁移学习的一些理论方面的工作。[[Google scholar](https://scholar.google.com.hk/citations?hl=zh-CN&user=EiLdZ_YAAAAJ)]\n_ _ _\n\n### 6.迁移学习相关的硕博士论文\n\n硕博士论文可以让我们很快地对迁移学习的相关领域做一些了解，同时，也能很快地了解概括相关研究者的工作。其中，比较有名的有\n\n- 2016 Baochen Sun的[Correlation Alignment for Domain Adaptation](http://www.cs.uml.edu/~bsun/papers/baochen_phd_thesis.pdf)\n\n- 2014 南加州大学的Boqing Gong的[Kernel Methods for Unsupervised Domain Adaptation](https://pan.baidu.com/s/1bpbawv9)\n\n- 2014 清华大学龙明盛的[迁移学习问题与方法研究](http://ise.thss.tsinghua.edu.cn/~mlong/doc/phd-thesis-mingsheng-long.pdf)\n\n- 2014 中科院计算所赵中堂的[自适应行为识别中的迁移学习方法研究](https://pan.baidu.com/s/1kVqYXnh)\n\n- 2012 杨强的学生Hao Hu的[Learning based Activity Recognition](https://pan.baidu.com/s/1bp2K9HX)\n\n- 2012 杨强的学生Wencheng Zheng的[Learning with Limited Data in Sensor-based Human Behavior Prediction](https://pan.baidu.com/s/1o8MbbBk)\n\n- 2010 杨强的学生Sinno Jialin Pan的[Feature-based Transfer Learning and Its Applications](https://pan.baidu.com/s/1bUqMfW)\n\n- 2009 上海交通大学戴文渊的[基于实例和特征的迁移学习算法研究](https://pan.baidu.com/s/1i4Vyygd)\n\n其他的文章，请见[完整版](https://pan.baidu.com/s/1bqXEASn)。\n\n- - -\n\n### 7.公开数据集及实验结果\n\n迁移学习领域有一些公开的数据集，用来对比算法的表现。\n\n- [这里](https://github.com/jindongwang/transferlearning/blob/master/doc/dataset.md)整理了常用的公开数据集\n- [这里](https://github.com/jindongwang/transferlearning/blob/master/doc/benchmark.md)整理汇总了一些已发表的文章在这些数据集上的实验结果。\n\nPlease see [HERE](https://github.com/jindongwang/transferlearning/blob/master/doc/dataset.md) for the popular transfer learning datasets and [HERE](https://github.com/jindongwang/transferlearning/blob/master/doc/benchmark.md) for some benchmark results.\n\n- - -\n\n### 其他\n\n[记与迁移学习大牛杨强教授的第二次会面](https://zhuanlan.zhihu.com/p/26260083)\n\n- - -\n\n### Contributing\n\n如果你对本项目感兴趣，非常欢迎你加入！\n\n- 正常参与：请直接fork、pull request，或者与我联系我把你加入合作者中\n- 如果要上传文件：请**不要**直接上传到项目中，否则会造成git版本库过大。正确的方法是上传它的**超链接**。请按照如下方式上传：\n\t- (墙内)目前没有找到比较好的方式，只能通过链接，或者自己网盘的链接来做。\n\t- (墙外)首先在[UPLOAD](https://my.pcloud.com/#page=puplink&code=4e9Z0Vwpmfzvx0y2OqTTTMzkrRUz8q9V)直接上传（**不**需要注册账号）；上传成功后，在[DOWNLOAD](https://my.pcloud.com/publink/show?code=kZWtboZbDDVguCHGV49QkmlLliNPJRMHrFX)里找到你刚上传的文件，共享链接即可。\n\nWelcome!\n\n> ***[文章版权声明]这个仓库是我开源到Github上的，可以遵守相关的开源协议进行使用。这个仓库中包含有很多研究者的论文、硕博士论文等，都来源于在网上的下载，仅作为学术研究使用。我对其中一些文章都写了自己的浅见，希望能很好地帮助理解。这些文章的版权属于相应的出版社。如果作者或出版社有异议，请联系我进行删除。一切都是为了更好地学术！***\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4320:09BF:AB65B:2C7EEC:6AB920FC"},"text_sha256":"ea7dd729cb7201faff1867fc0156bcafb74490d2f39234f8da1b8d7269f5bd1d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3316","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:17B898E:1BD7655:6AB9288D"},"commit":{"sha":"d77ef50a2e7ecdd4f3354148205666970ba809b6","url":"https://github.com/jindongwang/transferlearning/commit/d77ef50a2e7ecdd4f3354148205666970ba809b6","date":"2026-02-09T16:27:22Z","author_date":"2026-02-09T16:27:22Z","committer_date":"2026-02-09T16:27:22Z","tree_sha":"1f1731eddd2ee56aedbce7514278c15ef44d36ae","message_first_line":"Merge pull request #439 from miaotony/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"3315","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17D4F53:1BF3954:6AB9288E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23013,"blob_sha":"86362d8e0d55ce4fb0c9723f3b6c51f72c8e96cb","priority":0}],"documents":[{"path":"README.md","size":23013,"blob_sha":"86362d8e0d55ce4fb0c9723f3b6c51f72c8e96cb","priority":0,"status":200,"text":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n\n<h1 align=\"center\">\n  <br>\n  <img src=\"png/logo.jpg\" alt=\"Transfer Leanring\" width=\"500\">\n<\/h1>\n\n<h4 align=\"center\">Everything about Transfer Learning. 迁移学习.<\/h4>\n\n<p align=\"center\">\n  <strong><a href=\"#0papers-论文\">Papers<\/a><\/strong> •\n  <strong><a href=\"#1introduction-and-tutorials-简介与教程\">Tutorials<\/a><\/strong> •\n  <a href=\"#2transfer-learning-areas-and-papers-研究领域与相关论文\">Research areas<\/a> •\n  <a href=\"#3theory-and-survey-理论与综述\">Theory<\/a> •\n  <a href=\"#3theory-and-survey-理论与综述\">Survey<\/a> •\n  <strong><a href=\"https://github.com/jindongwang/transferlearning/tree/master/code\">Code<\/a><\/strong> •\n  <strong><a href=\"#7datasets-and-benchmarks-数据集与评测结果\">Dataset & benchmark<\/a><\/strong>\n<\/p>\n<p align=\"center\">\n  <a href=\"#6transfer-learning-thesis-硕博士论文\">Thesis<\/a> •\n  <a href=\"#5transfer-learning-scholars-著名学者\">Scholars<\/a> •\n  <a href=\"#8transfer-learning-challenges-迁移学习比赛\">Contests<\/a> •\n  <a href=\"#journals-and-conferences\">Journal/conference<\/a> •\n  <a href=\"#applications-迁移学习应用\">Applications<\/a> •\n  <a href=\"#other-resources-其他资源\">Others<\/a> •\n  <a href=\"#contributing-欢迎参与贡献\">Contributing<\/a>\n<\/p>\n\n**Widely used by top conferences and journals:** \n- Conferences: [[CVPR'22](https://openaccess.thecvf.com/content/CVPR2022W/FaDE-TCV/html/Zhang_Segmenting_Across_Places_The_Need_for_Fair_Transfer_Learning_With_CVPRW_2022_paper.html)] [[NeurIPS'21](https://proceedings.neurips.cc/paper/2021/file/731b03008e834f92a03085ef47061c4a-Paper.pdf)] [[IJCAI'21](https://arxiv.org/abs/2103.03097)] [[ESEC/FSE'20](https://dl.acm.org/doi/abs/10.1145/3368089.3409696)] [[IJCNN'20](https://ieeexplore.ieee.org/abstract/document/9207556)] [[ACMMM'18](https://dl.acm.org/doi/abs/10.1145/3240508.3240512)] [[ICME'19](https://ieeexplore.ieee.org/abstract/document/8784776/)]\n- Journals: [[IEEE TKDE](https://ieeexplore.ieee.org/abstract/document/9782500/)] [[ACM TIST](https://dl.acm.org/doi/abs/10.1145/3360309)] [[Information sciences](https://www.sciencedirect.com/science/article/pii/S0020025520308458)] [[Neurocomputing](https://www.sciencedirect.com/science/article/pii/S0925231221007025)] [[IEEE Transactions on Cognitive and Developmental Systems](https://ieeexplore.ieee.org/abstract/document/9659817)]\n\n```\n@Misc{transferlearning.xyz,\nhowpublished = {\\url{http://transferlearning.xyz}},   \ntitle = {Everything about Transfer Learning and Domain Adapation},  \nauthor = {Wang, Jindong and others}  \n}  \n```\n\n[![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE) [![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu) \n\nRelated Codes:\n  - Large language model evaluation: [[llm-eval](https://llm-eval.github.io/)]\n  - Large language model enhancement: [[llm-enhance](https://llm-enhance.github.io/)]\n  - Robust machine learning: [[robustlearn: robust machine learning](https://github.com/microsoft/robustlearn)]\n  - Semi-supervised learning: [[USB: unified semi-supervised learning benchmark](https://github.com/microsoft/Semi-supervised-learning)] | [[TorchSSL: a unified SSL library](https://github.com/TorchSSL/TorchSSL)] \n  - LLM benchmark: [[PromptBench: adversarial robustness of prompts of LLMs](https://github.com/microsoft/promptbench)]\n  - Federated learning: [[PersonalizedFL: library for personalized federated learning](https://github.com/microsoft/PersonalizedFL)]\n  - Activity recognition and machine learning [[Activity recognition](https://github.com/jindongwang/activityrecognition)]｜[[Machine learning](https://github.com/jindongwang/MachineLearning)]\n\n- - -\n\n**NOTE:** You can directly open the code in [Gihub Codespaces](https://docs.github.com/en/codespaces/getting-started/quickstart#introduction) on the web to run them without downloading! Also, try [github.dev](https://github.dev/jindongwang/transferlearning).\n\n## 0.Papers (论文)\n\n[Awesome transfer learning papers (迁移学习文章汇总)](https://github.com/jindongwang/transferlearning/tree/master/doc/awesome_paper.md)\n\n- [Paperweekly](http://www.paperweekly.site/collections/231/papers): A website to recommend and read paper notes\n\n**Latest papers**: \n\n- By topic: [doc/awesome_papers.md](/doc/awesome_paper.md)\n- By date: [doc/awesome_paper_date.md](/doc/awesome_paper_date.md)\n\n*Updated at 2024-02-18:*\n\n- Simulations of Common Unsupervised Domain Adaptation Algorithms for Image Classification [[arxiv](https://arxiv.org/abs/2502.10694)]\n  - Unsupervised domain adaptaiton for image classification\n\n- Semantics-aware Test-time Adaptation for 3D Human Pose Estimation [[arxiv](https://arxiv.org/abs/2502.10724)]\n  - Test-time adaptation for3D human pose estimation\n\n- Transfer Learning of CATE with Kernel Ridge Regression [[arxiv](https://arxiv.org/abs/2502.11331)]\n  - Transfer learning with kernel ridge regression\n\n- Why Domain Generalization Fail? A View of Necessity and Sufficiency [[arxiv](https://arxiv.org/abs/2502.10716)] \n  - Analyze why domain generalization fail from the view of necessity and sufficiency\n\n\n*Updated at 2024-02-11:*\n\n- Beyond Batch Learning: Global Awareness Enhanced Domain Adaptation [[arxiv](https://arxiv.org/abs/2502.06272)]\n  - Global awareness for enhanced domain adaptation\n\n- - -\n\n## 1.Introduction and Tutorials (简介与教程)\n\nWant to quickly learn transfer learning？想尽快入门迁移学习？看下面的教程。\n\n- Books 书籍\n  - **Introduction to Transfer Learning: Algorithms and Practice** [[Buy or read](https://link.springer.com/book/9789811975837)]\n  - **《迁移学习》（杨强）** [[Buy](https://item.jd.com/12930984.html)] [[English version](https://www.cambridge.org/core/books/transfer-learning/CCFFAFE3CDBC245047F1DEC71D9EF3C7)]\n  - **《迁移学习导论》(王晋东、陈益强著)** [[Homepage](http://jd92.wang/tlbook)] [[Buy](https://item.jd.com/13272157.html)]\n\n- Blogs 博客\n  - [Zhihu blogs - 知乎专栏《小王爱迁移》系列文章](https://zhuanlan.zhihu.com/p/130244395)\n\t\n- Video tutorials 视频教程\n  - Transfer learning 迁移学习:\n    - [Recent advance of transfer learning - 2022年最新迁移学习发展现状探讨](https://www.bilibili.com/video/BV1nY411E7Uc/)\n    - [Definitions of transfer learning area - 迁移学习领域名词解释](https://www.bilibili.com/video/BV1fu411o7BW) [[Article](https://zhuanlan.zhihu.com/p/428097044)]\n    - [Transfer learning by Hung-yi Lee @ NTU - 台湾大学李宏毅的视频讲解(中文视频)](https://www.youtube.com/watch?v=qD6iD4TFsdQ)\n  - Domain generalization 领域泛化：\n    - [IJCAI-ECAI'22 tutorial on domain generalization - 领域泛化tutorial](https://dgresearch.github.io/)\n    - [Domain generalization - 迁移学习新兴研究方向领域泛化](https://www.bilibili.com/video/BV1ro4y1S7dd/)\n  - Domain adaptation 领域自适应：\n    - [Domain adaptation - 迁移学习中的领域自适应方法(中文)](https://www.bilibili.com/video/BV1T7411R75a/) \n  \n\n- Brief introduction and slides 简介与ppt资料\n  - [Recent advance of transfer learning](https://jd92.wang/assets/files/l16_aitime.pdf)\n  - [Domain generalization survey](http://jd92.wang/assets/files/DGSurvey-ppt.pdf)\n  - [Brief introduction in Chinese](https://github.com/jindongwang/transferlearning/blob/master/doc/%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0%E7%AE%80%E4%BB%8B.md)\n\t- [PPT (English)](http://jd92.wang/assets/files/l03_transferlearning.pdf) | [PPT (中文)](http://jd92.wang/assets/files/l08_tl_zh.pdf)\n  - 迁移学习中的领域自适应方法 Domain adaptation: [PDF](http://jd92.wang/assets/files/l12_da.pdf) ｜ [Video on Bilibili](https://www.bilibili.com/video/BV1T7411R75a/) | [Video on Youtube](https://www.youtube.com/watch?v=RbIsHNtluwQ&t=22s)\n  - Tutorial on transfer learning by Qiang Yang: [IJCAI'13](http://ijcai13.org/files/tutorial_slides/td2.pdf) | [2016 version](http://kddchina.org/file/IntroTL2016.pdf)\n\n- Talk is cheap, show me the code 动手教程、代码、数据 \n  - [Pytorch tutorial on transfer learning](https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html)\n\t- [Pytorch finetune](https://github.com/jindongwang/transferlearning/tree/master/code/AlexNet_ResNet)\n\t- [DeepDA: a unified deep domain adaptation toolbox](https://github.com/jindongwang/transferlearning/tree/master/code/DeepDA)\n\t- [DeepDG: a unified deep domain generalization toolbox](https://github.com/jindongwang/transferlearning/tree/master/code/DeepDG)\n\t- [更多 More...](https://github.com/jindongwang/transferlearning/tree/master/code)\n\n- [Transfer Learning Scholars and Labs - 迁移学习领域的著名学者、代表工作及实验室介绍](https://github.com/jindongwang/transferlearning/blob/master/doc/scholar_TL.md)\n- [Negative transfer - 负迁移](https://www.zhihu.com/question/66492194/answer/242870418)\n\n- - -\n\n## 2.Transfer Learning Areas and Papers (研究领域与相关论文)\n\n- [Survey](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#survey)\n- [Theory](#theory)\n- [Per-training/Finetuning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#per-trainingfinetuning)\n- [Knowledge distillation](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#knowledge-distillation)\n- [Traditional domain adaptation](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#traditional-domain-adaptation)\n- [Deep domain adaptation](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#deep-domain-adaptation)\n- [Domain generalization](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#domain-generalization)\n- [Source-free domain adaptation](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#source-free-domain-adaptation)\n- [Multi-source domain adaptation](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#multi-source-domain-adaptation)\n- [Heterogeneous transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#heterogeneous-transfer-learning)\n- [Online transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#online-transfer-learning)\n- [Zero-shot / few-shot learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#zero-shot--few-shot-learning)\n- [Multi-task learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#multi-task-learning)\n- [Transfer reinforcement learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#transfer-reinforcement-learning)\n- [Transfer metric learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#transfer-metric-learning)\n- [Federated transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#federated-transfer-learning)\n- [Lifelong transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#lifelong-transfer-learning)\n- [Safe transfer learning](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#safe-transfer-learning)\n- [Transfer learning applications](https://github.com/jindongwang/transferlearning/blob/master/doc/awesome_paper.md#transfer-learning-applications)\n\n- - -\n\n## 3.Theory and Survey (理论与综述)\n\nHere are some articles on transfer learning theory and survey.\n\n**Survey (综述文章)：**\n\n- 2023 Source-Free Unsupervised Domain Adaptation: A Survey [[arxiv](http://arxiv.org/abs/2301.00265)]\n- 2022 [Transfer Learning for Future Wireless Networks: A Comprehensive Survey](https://arxiv.org/abs/2102.07572)\n- 2022 [A Review of Deep Transfer Learning and Recent Advancements](https://arxiv.org/abs/2201.09679)\n- 2022 [Transferability in Deep Learning: A Survey](https://paperswithcode.com/paper/transferability-in-deep-learning-a-survey), from Mingsheng Long in THU.\n- 2021 Domain generalization: IJCAI-21 [Generalizing to Unseen Domains: A Survey on Domain Generalization](https://arxiv.org/abs/2103.03097) | [知乎文章](https://zhuanlan.zhihu.com/p/354740610) | [微信公众号](https://mp.weixin.qq.com/s/DsoVDYqLB1N7gj9X5UnYqw)\n  - First survey on domain generalization\n  - 第一篇对Domain generalization (领域泛化)的综述\n- 2021 Vision-based activity recognition: [A Survey of Vision-Based Transfer Learning in Human Activity Recognition](https://www.mdpi.com/2079-9292/10/19/2412)\n- 2021 ICSAI [A State-of-the-Art Survey of Transfer Learning in Structural Health Monitoring](https://ieeexplore.ieee.org/abstract/document/9664171)\n- 2020 [Transfer learning: survey and classification](https://link.springer.com/chapter/10.1007/978-981-15-5345-5_13), Advances in Intelligent Systems and Computing. \n- 2020 迁移学习最新survey，来自中科院计算所庄福振团队，发表在Proceedings of the IEEE: [A Comprehensive Survey on Transfer Learning](https://arxiv.org/abs/1911.02685)\n- 2020 负迁移的综述：[Overcoming Negative Transfer: A Survey](https://arxiv.org/abs/2009.00909)\n- 2020 知识蒸馏的综述: [Knowledge Distillation: A Survey](https://arxiv.org/abs/2006.05525)\n- 用transfer learning进行sentiment classification的综述：[A Survey of Sentiment Analysis Based on Transfer Learning](https://ieeexplore.ieee.org/abstract/document/8746210) \n- 2019 一篇新survey：[Transfer Adaptation Learning: A Decade Survey](https://arxiv.org/abs/1903.04687)\n- 2018 一篇迁移度量学习的综述: [Transfer Metric Learning: Algorithms, Applications and Outlooks](https://arxiv.org/abs/1810.03944)\n- 2018 一篇最近的非对称情况下的异构迁移学习综述：[Asymmetric Heterogeneous Transfer Learning: A Survey](https://arxiv.org/abs/1804.10834)\n- 2018 Neural style transfer的一个survey：[Neural Style Transfer: A Review](https://arxiv.org/abs/1705.04058)\n- 2018 深度domain adaptation的一个综述：[Deep Visual Domain Adaptation: A Survey](https://www.sciencedirect.com/science/article/pii/S0925231218306684)\n- 2017 多任务学习的综述，来自香港科技大学杨强团队：[A survey on multi-task learning](https://arxiv.org/abs/1707.08114)\n- 2017 异构迁移学习的综述：[A survey on heterogeneous transfer learning](https://link.springer.com/article/10.1186/s40537-017-0089-0)\n- 2017 跨领域数据识别的综述：[Cross-dataset recognition: a survey](https://arxiv.org/abs/1705.04396)\n- 2016 [A survey of transfer learning](https://pan.baidu.com/s/1gfgXLXT)。其中交代了一些比较经典的如同构、异构等学习方法代表性文章。\n- 2015 中文综述：[迁移学习研究进展](https://pan.baidu.com/s/1bpautob)\n- 2010 [A survey on transfer learning](http://ieeexplore.ieee.org/abstract/document/5288526/)\n- Survey on applications - 应用导向的综述：\n\t- 视觉domain adaptation综述：[Visual Domain Adaptation: A Survey of Recent Advances](https://pan.baidu.com/s/1o8BR7Vc)\n\t- 迁移学习应用于行为识别综述：[Transfer Learning for Activity Recognition: A Survey](https://pan.baidu.com/s/1kVABOYr)\n\t- 迁移学习与增强学习：[Transfer Learning for Reinforcement Learning Domains: A Survey](https://pan.baidu.com/s/1slfr0w1)\n\t- 多个源域进行迁移的综述：[A Survey of Multi-source Domain Adaptation](https://pan.baidu.com/s/1eSGREF4)。\n\n**Theory （理论文章）:**\n\n- ICML-20 [Few-shot domain adaptation by causal mechanism transfer](https://arxiv.org/pdf/2002.03497.pdf)\n\t- The first work on causal transfer learning\n\t- 日本理论组大佬Sugiyama的工作，causal transfer learning\n- CVPR-19 [Characterizing and Avoiding Negative Transfer](https://arxiv.org/abs/1811.09751)\n\t- Characterizing and avoid negative transfer\n\t- 形式化并提出如何避免负迁移\n- ICML-20 [On Learning Language-Invariant Representations for Universal Machine Translation](https://arxiv.org/abs/2008.04510)\n  - Theory for universal machine translation\n  - 对统一机器翻译模型进行了理论论证\n- NIPS-06 [Analysis of Representations for Domain Adaptation](https://dl.acm.org/citation.cfm?id=2976474)\n- ML-10 [A Theory of Learning from Different Domains](https://link.springer.com/article/10.1007/s10994-009-5152-4)\n- NIPS-08 [Learning Bounds for Domain Adaptation](http://papers.nips.cc/paper/3212-learning-bounds-for-domain-adaptation)\n- COLT-09 [Domain adaptation: Learning bounds and algorithms](https://arxiv.org/abs/0902.3430)\n- MMD paper：[A Hilbert Space Embedding for Distributions](https://link.springer.com/chapter/10.1007/978-3-540-75225-7_5) and [A Kernel Two-Sample Test](http://www.jmlr.org/papers/v13/gretton12a.html)\n- Multi-kernel MMD paper: [Optimal kernel choice for large-scale two-sample tests](http://papers.nips.cc/paper/4727-optimal-kernel-choice-for-large-scale-two-sample-tests)\n\n_ _ _\n\n## 4.Code (代码)\n\nUnified codebases for:\n- [Deep domain adaptation](https://github.com/jindongwang/transferlearning/tree/master/code/DeepDA)\n- [Deep domain generalization](https://github.com/jindongwang/transferlearning/tree/master/code/DeepDG)\n- See all codes here: https://github.com/jindongwang/transferlearning/tree/master/code.\n\nMore: see [HERE](https://github.com/jindongwang/transferlearning/tree/master/code) and [HERE](https://colab.research.google.com/drive/1MVuk95mMg4ecGyUAIG94vedF81HtWQAr?usp=sharing) for an instant run using Google's Colab.\n\n_ _ _\n\n## 5.Transfer Learning Scholars (著名学者)\n\nHere are some transfer learning scholars and labs.\n\n**全部列表以及代表工作性见[这里](https://github.com/jindongwang/transferlearning/blob/master/doc/scholar_TL.md)** \n\nPlease note that this list is far not complete. A full list can be seen in [here](https://github.com/jindongwang/transferlearning/blob/master/doc/scholar_TL.md). Transfer learning is an active field. *If you are aware of some scholars, please add them here.*\n\n_ _ _\n\n## 6.Transfer Learning Thesis (硕博士论文)\n\nHere are some popular thesis on transfer learning.\n\n[这里](https://pan.baidu.com/share/init?surl=iuzZhHdumrD64-yx_VAybA), 提取码：txyz。\n\n- - -\n\n## 7.Datasets and Benchmarks (数据集与评测结果)\n\nPlease see [HERE](https://github.com/jindongwang/transferlearning/blob/master/data) for the popular transfer learning **datasets and benchmark** results.\n\n[这里](https://github.com/jindongwang/transferlearning/blob/master/data)整理了常用的公开数据集和一些已发表的文章在这些数据集上的实验结果。\n\n- - -\n\n## 8.Transfer Learning Challenges (迁移学习比赛)\n\n- [Visual Domain Adaptation Challenge (VisDA)](http://ai.bu.edu/visda-2018/)\n\n- - -\n\n## Journals and Conferences\n\nSee [here](https://github.com/jindongwang/transferlearning/blob/master/doc/venues.md) for a full list of related journals and conferences.\n\n- - -\n\n## Applications (迁移学习应用)\n\n- [Computer vision](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#computer-vision)\n- [Medical and healthcare](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#medical-and-healthcare)\n- [Natural language processing](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#natural-language-processing)\n- [Time series](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#time-series)\n- [Speech](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#speech)\n- [Multimedia](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#multimedia)\n- [Recommendation](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#recommendation)\n- [Human activity recognition](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#human-activity-recognition)\n- [Autonomous driving](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#autonomous-driving)\n- [Others](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md#others)\n\nSee [HERE](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md) for transfer learning applications.\n\n迁移学习应用请见[这里](https://github.com/jindongwang/transferlearning/blob/master/doc/transfer_learning_application.md)。\n\n- - -\n\n## Other Resources (其他资源)\n\n- Call for papers:\n  - [Advances in Transfer Learning: Theory, Algorithms, and Applications](https://www.frontiersin.org/research-topics/21133/advances-in-transfer-learning-theory-algorithms-and-applications), DDL: October 2021\n\n- Related projects:\n  - Salad: [A semi-supervised domain adaptation library](https://domainadaptation.org)\n\n- - -\n\n## Contributing (欢迎参与贡献)\n\nIf you are interested in contributing, please refer to [HERE](https://github.com/jindongwang/transferlearning/blob/master/CONTRIBUTING.md) for instructions in contribution.\n\n- - -\n\n### Copyright notice\n\n> ***[Notes]This Github repo can be used by following the corresponding licenses. I want to emphasis that it may contain some PDFs or thesis, which were downloaded by me and can only be used for academic purposes. The copyrights of these materials are owned by corresponding publishers or organizations. All this are for better academic research. If any of the authors or publishers have concerns, please contact me to delete or replace them.***\n\n[contributors-shield]: https://img.shields.io/github/contributors/jindongwang/transferlearning.svg?style=for-the-badge\n[contributors-url]: https://github.com/jindongwang/transferlearning/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/jindongwang/transferlearning.svg?style=for-the-badge\n[forks-url]: https://github.com/jindongwang/transferlearning/network/members\n[stars-shield]: https://img.shields.io/github/stars/jindongwang/transferlearning.svg?style=for-the-badge\n[stars-url]: https://github.com/jindongwang/transferlearning/stargazers\n[issues-shield]: https://img.shields.io/github/issues/jindongwang/transferlearning.svg?style=for-the-badge\n[issues-url]: https://github.com/jindongwang/transferlearning/issues\n[license-shield]: https://img.shields.io/github/license/jindongwang/transferlearning.svg?style=for-the-badge\n[license-url]: https://github.com/jindongwang/transferlearning/blob/main/LICENSE.txt\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"422E:3FA0D:17224C:5C46C9:6AB920FF"},"text_sha256":"cca7f436485336463dc1ab7060ab9789e97958aa6309174f22f3f3197062e2fd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dmlc/dgl","input_row":{"repository":"dmlc/dgl","url":"https://github.com/dmlc/dgl","name":"dgl","owner":"dmlc","description":"Python package built to ease deep learning on graph, on top of existing DL frameworks.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":14286,"issues":2828,"created_at":"2018-04-20T14:49:09Z","updated_at":"2026-09-26T02:02:40Z","first_commit_at":"2018-04-20T14:46:32Z","last_commit_at":"2025-07-31T23:53:10Z","activity_months":87.359999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:38.878Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dmlc/dgl","visibility":"public","created_at":"2018-04-20T14:49:09Z","updated_at":"2026-09-26T02:02:40Z","private":false,"fork":false,"archived":false,"stargazers_count":14286,"open_issues_count":610,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3314","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092A:7418C:17F90CC:1C18075:6AB9288E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3313","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53BB:72BD3:17DFEA5:1BFED77:6AB9288F"},"commit":{"sha":"75a43e4afd30734511a536c6146741d689f46ce1","url":"https://github.com/dmlc/dgl/commit/75a43e4afd30734511a536c6146741d689f46ce1","date":"2018-05-11T04:28:59Z","author_date":"2018-05-11T04:28:59Z","committer_date":"2018-05-11T04:28:59Z","tree_sha":"7ba58d2689c76796e4cd52afb0481d6096aebe7d","message_first_line":"Merge pull request #7 from zzhang-cn/tensor"},"tree_request_status":200,"tree_rate":{"github_remaining":"3312","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0919:7307A:17A02F5:1BBEE66:6AB9288F"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3311","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:17E4DB4:1C03EA1:6AB9288F"},"commit":{"sha":"3d16000b4170fa741ed9e9667f22ba84d3493026","url":"https://github.com/dmlc/dgl/commit/3d16000b4170fa741ed9e9667f22ba84d3493026","date":"2025-07-31T23:53:10Z","author_date":"2025-07-31T23:53:10Z","committer_date":"2025-07-31T23:53:10Z","tree_sha":"1f7a1fab4606c35220d90da26dcdffb142bb133c","message_first_line":"[Bugfix][nn/PyTorch]: add checks to avoid view/reshape (0, -1, *) on empty tensors (#7894)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3310","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:1807D28:1C26A8C:6AB92890"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":32164,"blob_sha":"30e1c7388db9a13d5609d689bce5c9aa6432ce21","priority":0}],"documents":[{"path":"README.md","size":32164,"blob_sha":"30e1c7388db9a13d5609d689bce5c9aa6432ce21","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"http://data.dgl.ai/asset/logo.jpg\" height=\"200\">\n<\/p>\n\n[![Latest Release](https://img.shields.io/github/v/release/dmlc/dgl)](https://github.com/dmlc/dgl/releases)\n[![Conda Latest Release](https://anaconda.org/dglteam/dgl/badges/version.svg)](https://anaconda.org/dglteam/dgl)\n[![Build Status](https://ci.dgl.ai/buildStatus/icon?job=DGL/master)](https://ci.dgl.ai/job/DGL/job/master/)\n[![Benchmark by ASV](http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat)](https://asv.dgl.ai/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)\n[![Twitter](https://img.shields.io/twitter/follow/DGLGraph?style=social)](https://twitter.com/GraphDeep)\n\n[Website](https://www.dgl.ai) | [A Blitz Introduction to DGL](https://docs.dgl.ai/tutorials/blitz/index.html) | Documentation ([Latest](https://www.dgl.ai/dgl_docs/) | [Official Examples](examples/README.md) | [Discussion Forum](https://discuss.dgl.ai) | [Slack Channel](https://join.slack.com/t/deep-graph-library/shared_invite/zt-eb4ict1g-xcg3PhZAFAB8p6dtKuP6xQ)\n\nDGL is an easy-to-use, high performance and scalable Python package for deep learning on graphs. DGL is framework agnostic, meaning if a deep graph model is a component of an end-to-end application, the rest of the logics can be implemented in any major frameworks, such as PyTorch, Apache MXNet or TensorFlow.\n\n<p align=\"center\">\n  <img src=\"http://data.dgl.ai/asset/image/DGL-Arch.png\" alt=\"DGL v0.4 architecture\" width=\"600\">\n  <br>\n  <b>Figure<\/b>: DGL Overall Architecture\n<\/p>\n\n## Highlighted Features\n\n### A GPU-ready graph library\n\nDGL provides a powerful graph object that can reside on either CPU or GPU. It bundles structural data as well as features for better control. We provide a variety of functions for computing with graph objects including efficient and customizable message passing primitives for Graph Neural Networks.\n\n### A versatile tool for GNN researchers and practitioners\n\nThe field of graph deep learning is still rapidly evolving and many research ideas emerge by standing on the shoulders of giants. To ease the process, [DGl-Go](https://github.com/dmlc/dgl/tree/master/dglgo) is a command-line interface to get started with training, using and studying state-of-the-art GNNs.\nDGL collects a rich set of [example implementations](https://github.com/dmlc/dgl/tree/master/examples) of popular GNN models of a wide range of topics. Researchers can [search](https://www.dgl.ai/) for related models to innovate new ideas from or use them as baselines for experiments. Moreover, DGL provides many state-of-the-art [GNN layers and modules](https://docs.dgl.ai/api/python/nn.html) for users to build new model architectures. DGL is one of the preferred platforms for many standard graph deep learning benchmarks including [OGB](https://ogb.stanford.edu/) and [GNNBenchmarks](https://github.com/graphdeeplearning/benchmarking-gnns).\n\n### Easy to learn and use\n\nDGL provides plenty of learning materials for all kinds of users from ML researchers to domain experts. The [Blitz Introduction to DGL](https://docs.dgl.ai/tutorials/blitz/index.html) is a 120-minute tour of the basics of graph machine learning. The [User Guide](https://docs.dgl.ai/guide/index.html) explains in more details the concepts of graphs as well as the training methodology. All of them include code snippets in DGL that are runnable and ready to be plugged into one’s own pipeline.\n\n### Scalable and efficient\n\nIt is convenient to train models using DGL on large-scale graphs across **multiple GPUs** or **multiple machines**. DGL extensively optimizes the whole stack to reduce the overhead in communication, memory consumption and synchronization. As a result, DGL can easily scale to billion-sized graphs. Get started with the [tutorials](https://docs.dgl.ai/en/tutorials/dist/index.html) and [user guide](https://docs.dgl.ai/en/latest/guide/distributed.html) for distributed training. See the [system performance note](https://docs.dgl.ai/performance.html) for the comparison with other tools.\n\n## Get Started\n\nUsers can install DGL from [pip and conda](https://www.dgl.ai/pages/start.html). You can also download GPU enabled DGL docker [containers](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/dgl) (backended by PyTorch) from NVIDIA NGC for both x86 and ARM based linux systems. Advanced users can follow the [instructions](https://docs.dgl.ai/install/index.html#install-from-source) to install from source.\n\nFor absolute beginners, start with [the Blitz Introduction to DGL](https://docs.dgl.ai/tutorials/blitz/index.html). It covers the basic concepts of common graph machine learning tasks and a step-by-step on building Graph Neural Networks (GNNs) to solve them.\n\nFor acquainted users who wish to learn more,\n\n* Experience state-of-the-art GNN models in only two command-lines using [DGL-Go](https://github.com/dmlc/dgl/tree/master/dglgo).\n* Learn DGL by [example implementations](https://www.dgl.ai/) of popular GNN models.\n* Read the [User Guide](https://docs.dgl.ai/guide/index.html) ([中文版链接](https://docs.dgl.ai/guide_cn/index.html)), which explains the concepts and usage of DGL in much more details.\n* Go through the tutorials for advanced features like [stochastic training of GNNs](https://docs.dgl.ai/tutorials/large/index.html), training on [multi-GPU](https://docs.dgl.ai/tutorials/multi/index.html) or [multi-machine](https://docs.dgl.ai/tutorials/dist/index.html).\n* [Study classical papers](https://docs.dgl.ai/tutorials/models/index.html) on graph machine learning alongside DGL.\n* Search for the usage of a specific API in the [API reference manual](https://docs.dgl.ai/api/python/index.html), which organizes all DGL APIs by their namespace.\n\nAll the learning materials are available at our [documentation site](https://docs.dgl.ai/). If you are new to deep learning in general,\ncheck out the open source book [Dive into Deep Learning](https://d2l.ai/).\n\n\n## Community\n\n### Get connected\n\nWe provide multiple channels to connect you to the community of the DGL developers, users, and the general GNN academic researchers:\n\n* Our Slack channel, [click to join](https://join.slack.com/t/deep-graph-library/shared_invite/zt-eb4ict1g-xcg3PhZAFAB8p6dtKuP6xQ)\n* Our discussion forum: https://discuss.dgl.ai/\n* Our [Zhihu blog (in Chinese)](https://www.zhihu.com/column/c_1070749881013936128)\n* Monthly GNN User Group online seminar ([event link](https://www.eventbrite.com/e/graph-neural-networks-user-group-tickets-137512275919?utm-medium=discovery&utm-campaign=social&utm-content=attendeeshare&aff=escb&utm-source=cp&utm-term=listing) | [past videos](https://www.youtube.com/channel/UCnmuSDY1pTlaFH1WRQElfTg))\n\nTake the survey [here](https://forms.gle/Ej3jHCocACmb49Gp8) and leave any feedback to make DGL better fit for your needs. Thanks!\n\n### DGL-powered projects\n\n* DGL-LifeSci: a DGL-based package for various applications in life science with graph neural networks. https://github.com/awslabs/dgl-lifesci\n* DGL-KE: a high performance, easy-to-use, and scalable package for learning large-scale knowledge graph embeddings. https://github.com/awslabs/dgl-ke\n* Benchmarking GNN: https://github.com/graphdeeplearning/benchmarking-gnns\n* OGB: a collection of realistic, large-scale, and diverse benchmark datasets for machine learning on graphs. https://ogb.stanford.edu/\n* Graph4NLP: an easy-to-use library for R&D at the intersection of Deep Learning on Graphs and Natural Language Processing. https://github.com/graph4ai/graph4nlp\n* GNN-RecSys: https://github.com/je-dbl/GNN-RecSys\n* Amazon Neptune ML: a new capability of Neptune that uses Graph Neural Networks (GNNs), a machine learning technique purpose-built for graphs, to make easy, fast, and more accurate predictions using graph data. https://aws.amazon.com/cn/neptune/machine-learning/\n* GNNLens2: Visualization tool for Graph Neural Networks. https://github.com/dmlc/GNNLens2\n* RNAGlib: A package to facilitate construction, analysis, visualization and machine learning on RNA 2.5D Graphs. Includes a pre-built dataset: https://rnaglib.cs.mcgill.ca\n* OpenHGNN: Model zoo and benchmarks for Heterogeneous Graph Neural Networks. https://github.com/BUPT-GAMMA/OpenHGNN\n* TGL: A graph learning framework for large-scale temporal graphs. https://github.com/amazon-research/tgl\n* gtrick: Bag of Tricks for Graph Neural Networks. https://github.com/sangyx/gtrick\n* ArangoDB-DGL Adapter: Import [ArangoDB](https://github.com/arangodb/arangodb) graphs into DGL and vice-versa. https://github.com/arangoml/dgl-adapter\n* DGLD: [DGLD](https://github.com/EagleLab-ZJU/DGLD) is an open-source library for Deep Graph Anomaly Detection based on pytorch and DGL.\n### Awesome Papers Using DGL\n\n1. [**Benchmarking Graph Neural Networks**](https://arxiv.org/pdf/2003.00982.pdf), *Vijay Prakash Dwivedi, Chaitanya K. Joshi, Thomas Laurent, Yoshua Bengio, Xavier Bresson*\n\n1. [**Open Graph Benchmarks: Datasets for Machine Learning on Graphs**](https://arxiv.org/pdf/2005.00687.pdf), NeurIPS'20, *Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, Jure Leskovec*\n\n1. [**DropEdge: Towards Deep Graph Convolutional Networks on Node Classification**](https://openreview.net/pdf?id=Hkx1qkrKPr), ICLR'20, *Yu Rong, Wenbing Huang, Tingyang Xu, Junzhou Huan*\n\n1. [**Discourse-Aware Neural Extractive Text Summarization**](https://www.aclweb.org/anthology/2020.acl-main.451/), ACL'20, *Jiacheng Xu, Zhe Gan, Yu Cheng, Jingjing Liu*\n\n1. [**GCC: Graph Contrastive Coding for Graph Neural Network Pre-Training**](https://dl.acm.org/doi/pdf/10.1145/3394486.3403168?casa_token=EClsH2Vc4DcAAAAA:LIB8cbtr6yTDbYuv4cTLwTIYeDq5Y2dhj_ktcWdKpzdPLGeiuL0o8GlcN4QIOnpsAnmGeGVZ), KDD'20, *Jiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang, Hongxia Yang, Ming Ding, Kuansan Wang, Jie Tang*\n\n1. [**DGL-KE: Training Knowledge Graph Embeddings at Scale**](https://arxiv.org/pdf/2004.08532), SIGIR'20, *Da Zheng, Xiang Song, Chao Ma, Zeyuan Tan, Zihao Ye, Jin Dong, Hao Xiong, Zheng Zhang, George Karypis*\n\n1. [**Improving Graph Neural Network Expressivity via Subgraph Isomorphism Counting**](https://arxiv.org/pdf/2006.09252.pdf), *Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, Michael M. Bronstein*\n\n1. [**INT: An Inequality Benchmark for Evaluating Generalization in Theorem Proving**](https://arxiv.org/pdf/2007.02924.pdf), *Yuhuai Wu, Albert Q. Jiang, Jimmy Ba, Roger Grosse*\n\n1. [**Finding Patient Zero: Learning Contagion Source with Graph Neural Networks**](https://arxiv.org/pdf/2006.11913.pdf), *Chintan Shah, Nima Dehmamy, Nicola Perra, Matteo Chinazzi, Albert-László Barabási, Alessandro Vespignani, Rose Yu*\n\n1. [**FeatGraph: A Flexible and Efficient Backend for Graph Neural Network Systems**](https://arxiv.org/pdf/2008.11359.pdf), SC'20, *Yuwei Hu, Zihao Ye, Minjie Wang, Jiali Yu, Da Zheng, Mu Li, Zheng Zhang, Zhiru Zhang, Yida Wang*\n\n\n<details><summary>more<\/summary>\n\n11. [**BP-Transformer: Modelling Long-Range Context via Binary Partitioning.**](https://arxiv.org/pdf/1911.04070.pdf), *Zihao Ye, Qipeng Guo, Quan Gan, Xipeng Qiu, Zheng Zhang*\n\n12. [**OptiMol: Optimization of Binding Affinities in Chemical Space for Drug Discovery**](https://www.biorxiv.org/content/biorxiv/early/2020/06/16/2020.05.23.112201.full.pdf), *Jacques Boitreaud,Vincent Mallet, Carlos Oliver, Jérôme Waldispühl*\n\n1. [**JAKET: Joint Pre-training of Knowledge Graph and Language Understanding**](https://arxiv.org/pdf/2010.00796.pdf), *Donghan Yu, Chenguang Zhu, Yiming Yang, Michael Zeng*\n\n1. [**Architectural Implications of Graph Neural Networks**](https://arxiv.org/pdf/2009.00804.pdf), *Zhihui Zhang, Jingwen Leng, Lingxiao Ma, Youshan Miao, Chao Li, Minyi Guo*\n\n1. [**Combining Reinforcement Learning and Constraint Programming for Combinatorial Optimization**](https://arxiv.org/pdf/2006.01610.pdf), *Quentin Cappart, Thierry Moisan, Louis-Martin Rousseau1, Isabeau Prémont-Schwarz, and Andre Cire*\n\n1. [**Therapeutics Data Commons: Machine Learning Datasets and Tasks for Therapeutics**](https://arxiv.org/abs/2102.09548) ([code repo](https://github.com/mims-harvard/TDC)), *Kexin Huang, Tianfan Fu, Wenhao Gao, Yue Zhao, Yusuf Roohani, Jure Leskovec, Connor W. Coley, Cao Xiao, Jimeng Sun, Marinka Zitnik*\n\n1. [**Sparse Graph Attention Networks**](https://arxiv.org/abs/1912.00552), *Yang Ye, Shihao Ji*\n\n1. [**On Self-Distilling Graph Neural Network**](https://arxiv.org/pdf/2011.02255.pdf), *Yuzhao Chen, Yatao Bian, Xi Xiao, Yu Rong, Tingyang Xu, Junzhou Huang*\n\n1. [**Learning Robust Node Representations on Graphs**](https://arxiv.org/pdf/2008.11416.pdf), *Xu Chen, Ya Zhang, Ivor Tsang, and Yuangang Pan*\n\n1. [**Recurrent Event Network: Autoregressive Structure Inference over Temporal Knowledge Graphs**](https://arxiv.org/abs/1904.05530), *Woojeong Jin, Meng Qu, Xisen Jin, Xiang Ren*\n\n1. [**Graph Neural Ordinary Differential Equations**](https://arxiv.org/abs/1911.07532), *Michael Poli, Stefano Massaroli, Junyoung Park, Atsushi Yamashita, Hajime Asama, Jinkyoo Park*\n\n1. [**FusedMM: A Unified SDDMM-SpMM Kernel for Graph Embedding and Graph Neural Networks**](https://arxiv.org/pdf/2011.06391.pdf), *Md. Khaledur Rahman, Majedul Haque Sujon, , Ariful Azad*\n\n1. [**An Efficient Neighborhood-based Interaction Model for Recommendation on Heterogeneous Graph**](https://arxiv.org/pdf/2007.00216.pdf), KDD'20 *Jiarui Jin, Jiarui Qin, Yuchen Fang, Kounianhua Du, Weinan Zhang, Yong Yu, Zheng Zhang, Alexander J. Smola*\n\n1. [**Learning Interaction Models of Structured Neighborhood on Heterogeneous Information Network**](https://arxiv.org/pdf/2011.12683.pdf), *Jiarui Jin, Kounianhua Du, Weinan Zhang, Jiarui Qin, Yuchen Fang, Yong Yu, Zheng Zhang, Alexander J. Smola*\n\n1. [**Graphein - a Python Library for Geometric Deep Learning and Network Analysis on Protein Structures**](https://www.biorxiv.org/content/10.1101/2020.07.15.204701v1), *Arian R. Jamasb, Pietro Lió, Tom L. Blundell*\n\n1. [**Graph Policy Gradients for Large Scale Robot Control**](https://arxiv.org/abs/1907.03822), *Arbaaz Khan, Ekaterina Tolstaya, Alejandro Ribeiro, Vijay Kumar*\n\n1. [**Heterogeneous Molecular Graph Neural Networks for Predicting Molecule Properties**](https://arxiv.org/abs/2009.12710), *Zeren Shui, George Karypis*\n\n1. [**Could Graph Neural Networks Learn Better Molecular Representation for Drug Discovery? A Comparison Study of Descriptor-based and Graph-based Models**](https://assets.researchsquare.com/files/rs-81439/v1_stamped.pdf), *Dejun Jiang, Zhenxing Wu, Chang-Yu Hsieh, Guangyong Chen, Ben Liao, Zhe Wang, Chao Shen, Dongsheng Cao, Jian Wu, Tingjun Hou*\n\n1. [**Principal Neighbourhood Aggregation for Graph Nets**](https://arxiv.org/abs/2004.05718), *Gabriele Corso, Luca Cavalleri, Dominique Beaini, Pietro Liò, Petar Veličković*\n\n1. [**Collective Multi-type Entity Alignment Between Knowledge Graphs**](https://dl.acm.org/doi/abs/10.1145/3366423.3380289), *Qi Zhu, Hao Wei, Bunyamin Sisman, Da Zheng, Christos Faloutsos, Xin Luna Dong, Jiawei Han*\n\n1. [**Graph Representation Forecasting of Patient's Medical Conditions: towards A Digital Twin**](https://arxiv.org/abs/2009.08299), *Pietro Barbiero, Ramon Viñas Torné, Pietro Lió*\n\n1. [**Relational Graph Learning on Visual and Kinematics Embeddings for Accurate Gesture Recognition in Robotic Surgery**](https://arxiv.org/abs/2011.01619), *Yong-Hao Long, Jie-Ying Wu, Bo Lu, Yue-Ming Jin, Mathias Unberath, Yun-Hui Liu, Pheng-Ann Heng and Qi Dou*\n\n1. [**Dark Reciprocal-Rank: Boosting Graph-Convolutional Self-Localization Network via Teacher-to-student Knowledge Transfer**](https://arxiv.org/abs/2011.00402), *Takeda Koji, Tanaka Kanji*\n\n1. [**Graph InfoClust: Leveraging Cluster-Level Node Information For Unsupervised Graph Representation Learning**](https://arxiv.org/abs/2009.06946), *Costas Mavromatis, George Karypis*\n\n1. [**GraphSeam: Supervised Graph Learning Framework for Semantic UV Mapping**](https://arxiv.org/abs/2011.13748), *Fatemeh Teimury, Bruno Roy, Juan Sebastian Casallas, David macdonald, Mark Coates*\n\n1. [**Comprehensive Study on Molecular Supervised Learning with Graph Neural Networks**](https://pubs.acs.org/doi/10.1021/acs.jcim.0c00416), *Doyeong Hwang, Soojung Yang, Yongchan Kwon, Kyung Hoon Lee, Grace Lee, Hanseok Jo, Seyeol Yoon, and Seongok Ryu*\n\n1. [**A graph auto-encoder model for miRNA-disease associations prediction**](https://academic.oup.com/bib/advance-article-abstract/doi/10.1093/bib/bbaa240/5929824?redirectedFrom=fulltext), *Zhengwei Li, Jiashu Li, Ru Nie, Zhu-Hong You, Wenzheng Bao*\n\n1. [**Graph convolutional regression of cardiac depolarization from sparse endocardial maps**](https://arxiv.org/abs/2009.14068), STACOM 2020 workshop, *Felix Meister, Tiziano Passerini, Chloé Audigier, Èric Lluch, Viorel Mihalef, Hiroshi Ashikaga, Andreas Maier, Henry Halperin, Tommaso Mansi*\n\n1. [**AttnIO: Knowledge Graph Exploration with In-and-Out Attention Flow for Knowledge-Grounded Dialogue**](https://www.aclweb.org/anthology/2020.emnlp-main.280/), EMNLP'20, *Jaehun Jung, Bokyung Son, Sungwon Lyu*\n\n1. [**Learning from Non-Binary Constituency Trees via Tensor Decomposition**](https://github.com/danielecastellana22/tensor-tree-nn), COLING'20, *Daniele Castellana, Davide Bacciu*\n\n1. [**Inducing Alignment Structure with Gated Graph Attention Networks for Sentence Matching**](https://arxiv.org/abs/2010.07668), *Peng Cui, Le Hu, Yuanchao Liu*\n\n1. [**Enhancing Extractive Text Summarization with Topic-Aware Graph Neural Networks**](https://arxiv.org/abs/2010.06253), COLING'20, *Peng Cui, Le Hu, Yuanchao Liu*\n\n1. [**Double Graph Based Reasoning for Document-level Relation Extraction**](https://arxiv.org/abs/2009.13752), EMNLP'20, *Shuang Zeng, Runxin Xu, Baobao Chang, Lei Li*\n\n1. [**Systematic Generalization on gSCAN with Language Conditioned Embedding**](https://arxiv.org/abs/2009.05552), AACL-IJCNLP'20, *Tong Gao, Qi Huang, Raymond J. Mooney*\n\n1. [**Automatic selection of clustering algorithms using supervised graph embedding**](https://arxiv.org/pdf/2011.08225.pdf), *Noy Cohen-Shapira, Lior Rokach*\n\n1. [**Improving Learning to Branch via Reinforcement Learning**](https://openreview.net/forum?id=z4D7-PTxTb), *Haoran Sun, Wenbo Chen, Hui Li, Le Song*\n\n1. [**A Practical Guide to Graph Neural Networks**](https://arxiv.org/pdf/2010.05234.pdf), *Isaac Ronald Ward, Jack Joyner, Casey Lickfold, Stash Rowe, Yulan Guo, Mohammed Bennamoun*, [code](https://github.com/isolabs/gnn-tutorial)\n\n1. [**APAN: Asynchronous Propagation Attention Network for Real-time Temporal Graph Embedding**](https://arxiv.org/pdf/2011.11545.pdf), SIGMOD'21, *Xuhong Wang, Ding Lyu, Mengjian Li, Yang Xia, Qi Yang, Xinwen Wang, Xinguang Wang, Ping Cui, Yupu Yang, Bowen Sun, Zhenyu Guo, Junkui Li*\n\n1. [**Uncertainty-Matching Graph Neural Networks to Defend Against Poisoning Attacks**](https://arxiv.org/pdf/2009.14455.pdf), *Uday Shankar Shanthamallu, Jayaraman J. Thiagarajan, Andreas Spanias*\n\n1. [**Computing Graph Neural Networks: A Survey from Algorithms to Accelerators**](https://arxiv.org/pdf/2010.00130.pdf), *Sergi Abadal, Akshay Jain, Robert Guirado, Jorge López-Alonso, Eduard Alarcón*\n\n1. [**NHK_STRL at WNUT-2020 Task 2: GATs with Syntactic Dependencies as Edges and CTC-based Loss for Text Classification**](https://www.aclweb.org/anthology/2020.wnut-1.43.pdf), *Yuki Yasuda, Taichi Ishiwatari, Taro Miyazaki, Jun Goto*\n\n1. [**Relation-aware Graph Attention Networks with Relational Position Encodings for Emotion Recognition in Conversations**](https://www.aclweb.org/anthology/2020.emnlp-main.597.pdf), *Taichi Ishiwatari, Yuki Yasuda, Taro Miyazaki, Jun Goto*\n\n1. [**PGM-Explainer: Probabilistic Graphical Model Explanations for Graph Neural Networks**](https://proceedings.neurips.cc/paper/2020/file/8fb134f258b1f7865a6ab2d935a897c9-Paper.pdf), *Minh N. Vu, My T. Thai*\n\n1. [**A Generalization of Transformer Networks to Graphs**](https://arxiv.org/pdf/2012.09699.pdf), *Vijay Prakash Dwivedi, Xavier Bresson*\n\n1. [**Discourse-Aware Neural Extractive Text Summarization**](https://www.aclweb.org/anthology/2020.acl-main.451.pdf), ACL'20, *Jiacheng Xu, Zhe Gan, Yu Cheng, Jingjing Liu*\n\n1. [**Learning Robust Node Representations on Graphs**](https://arxiv.org/abs/2008.11416), *Xu Chen, Ya Zhang, Ivor Tsang, Yuangang Pan*\n\n1. [**Adaptive Graph Diffusion Networks with Hop-wise Attention**](https://arxiv.org/abs/2012.15024), *Chuxiong Sun, Guoshi Wu*\n\n1. [**The Photoswitch Dataset: A Molecular Machine Learning Benchmark for the Advancement of Synthetic Chemistry**](https://arxiv.org/abs/2008.03226), *Aditya R. Thawani, Ryan-Rhys Griffiths, Arian Jamasb, Anthony Bourached, Penelope Jones, William McCorkindale, Alexander A. Aldrick, Alpha A. Lee*\n\n1. [**A community-powered search of machine learning strategy space to find NMR property prediction models**](https://arxiv.org/abs/2008.05994), *Lars A. Bratholm, Will Gerrard, Brandon Anderson, Shaojie Bai, Sunghwan Choi, Lam Dang, Pavel Hanchar, Addison Howard, Guillaume Huard, Sanghoon Kim, Zico Kolter, Risi Kondor, Mordechai Kornbluth, Youhan Lee, Youngsoo Lee, Jonathan P. Mailoa, Thanh Tu Nguyen, Milos Popovic, Goran Rakocevic, Walter Reade, Wonho Song, Luka Stojanovic, Erik H. Thiede, Nebojsa Tijanic, Andres Torrubia, Devin Willmott, Craig P. Butts, David R. Glowacki, Kaggle participants*\n\n1. [**Adaptive Layout Decomposition with Graph Embedding Neural Networks**](http://www.cse.cuhk.edu.hk/~byu/papers/C98-DAC2020-MPL-Selector.pdf), *Wei Li, Jialu Xia, Yuzhe Ma, Jialu Li, Yibo Lin, Bei Yu*, DAC'20\n\n1. [**Transfer Learning with Graph Neural Networks for Optoelectronic Properties of Conjugated Oligomers**](https://aip.scitation.org/doi/10.1063/5.0037863), J. Chem. Phys. 154, *Chee-Kong Lee, Chengqiang Lu, Yue Yu, Qiming Sun, Chang-Yu Hsieh, Shengyu Zhang, Qi Liu, and  Liang Shi*\n\n1. [**Jet tagging in the Lund plane with graph networks**](https://link.springer.com/article/10.1007/JHEP03(2021)052), Journal of High Energy Physics 2021, *Frédéric A. Dreyer and Huilin Qu*\n\n1. [**Global Attention Improves Graph Networks Generalization**](https://arxiv.org/abs/2006.07846), *Omri Puny, Heli Ben-Hamu, and Yaron Lipman*\n\n1. [**Learning over Families of Sets -- Hypergraph Representation Learning for Higher Order Tasks**](https://arxiv.org/abs/2101.07773), SDM 2021, *Balasubramaniam Srinivasan, Da Zheng, and George Karypis*\n\n1. [**SSFG: Stochastically Scaling Features and Gradients for Regularizing Graph Convolution Networks**](https://arxiv.org/abs/2102.10338), *Haimin Zhang, Min Xu*\n\n1. [**Application and evaluation of knowledge graph embeddings in biomedical data**](https://peerj.com/articles/cs-341/), PeerJ Computer Science 7:e341, *Mona Alshahrani​, Maha A. Thafar, Magbubah Essack*\n\n1. [**MoTSE: an interpretable task similarity estimator for small molecular property prediction tasks**](https://www.biorxiv.org/content/10.1101/2021.01.13.426608v2), bioRxiv 2021.01.13.426608, *Han Li, Xinyi Zhao, Shuya Li, Fangping Wan, Dan Zhao, Jianyang Zeng*\n\n1. [**Reinforcement Learning For Data Poisoning on Graph Neural Networks**](https://arxiv.org/abs/2102.06800), *Jacob Dineen, A S M Ahsan-Ul Haque, Matthew Bielskas*\n\n1. [**Generalising Recursive Neural Models by Tensor Decomposition**](https://github.com/danielecastellana22/tensor-tree-nn), IJCNN'20, *Daniele Castellana, Davide Bacciu*\n\n1. [**Tensor Decompositions in Recursive Neural Networks for Tree-Structured Data**](https://github.com/danielecastellana22/tensor-tree-nn), ESANN'20, *Daniele Castellana, Davide Bacciu*\n\n1. [**Combining Self-Organizing and Graph Neural Networks for Modeling Deformable Objects in Robotic Manipulation**](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7806087/), Frotiers in Robotics and AI, *Valencia, Angel J., and Pierre Payeur*\n\n1. [**Joint stroke classification and text line grouping in online handwritten documents with edge pooling attention networks**](https://www.sciencedirect.com/science/article/abs/pii/S0031320321000467), Pattern Recognition, *Jun-Yu Ye, Yan-Ming Zhang, Qing Yang, Cheng-Lin Liu*\n\n1. [**Toward Accurate Predictions of Atomic Properties via Quantum Mechanics Descriptors Augmented Graph Convolutional Neural Network: Application of This Novel Approach in NMR Chemical Shifts Predictions**](https://pubs.acs.org/doi/full/10.1021/acs.jpclett.0c02654), The Journal of Physical Chemistry Letters, *Peng Gao, Jie Zhang, Yuzhu Sun, and Jianguo Yu*\n\n1. [**A Graph Neural Network to Model User Comfort in Robot Navigation**](https://arxiv.org/abs/2102.08863), *Pilar Bachiller, Daniel Rodriguez-Criado, Ronit R. Jorvekar, Pablo Bustos, Diego R. Faria, Luis J. Manso*\n\n1. [**Medical Entity Disambiguation Using Graph Neural Networks**](https://arxiv.org/abs/2104.01488), *Alina Vretinaris, Chuan Lei, Vasilis Efthymiou, Xiao Qin, Fatma Özcan*\n\n1. [**Chemistry-informed Macromolecule Graph Representation for Similarity Computation and Supervised Learning**](https://arxiv.org/abs/2103.02565), *Somesh Mohapatra, Joyce An, Rafael Gómez-Bombarelli*\n\n1. [**Characterizing and Forecasting User Engagement with In-app Action Graph: A Case Study of Snapchat**](https://arxiv.org/pdf/1906.00355.pdf), *Yozen Liu, Xiaolin Shi, Lucas Pierce, Xiang Ren*\n\n1. [**GIPA: General Information Propagation Algorithm for Graph Learning**](https://arxiv.org/abs/2105.06035), *Qinkai Zheng, Houyi Li, Peng Zhang, Zhixiong Yang, Guowei Zhang, Xintan Zeng, Yongchao Liu*\n\n1. [**Graph Ensemble Learning over Multiple Dependency Trees for Aspect-level Sentiment Classification**](https://arxiv.org/abs/2103.11794), NAACL'21, *Xiaochen Hou, Peng Qi, Guangtao Wang, Rex Ying, Jing Huang, Xiaodong He, Bowen Zhou*\n\n1. [**Enhancing Scientific Papers Summarization with Citation Graph**](https://arxiv.org/abs/2104.03057), AAAI'21, *Chenxin An, Ming Zhong, Yiran Chen, Danqing Wang, Xipeng Qiu, Xuanjing Huang*\n\n1. [**Improving Graph Representation Learning by Contrastive Regularization**](https://arxiv.org/pdf/2101.11525.pdf), *Kaili Ma, Haochen Yang, Han Yang, Tatiana Jin, Pengfei Chen, Yongqiang Chen, Barakeel Fanseu Kamhoua, James Cheng*\n\n1. [**Extract the Knowledge of Graph Neural Networks and Go Beyond it: An Effective Knowledge Distillation Framework**](https://arxiv.org/pdf/2103.02885.pdf), WWW'21, *Cheng Yang, Jiawei Liu, Chuan Shi*\n\n1. [**VIKING: Adversarial Attack on Network Embeddings via Supervised Network Poisoning**](https://arxiv.org/pdf/2102.07164.pdf), PAKDD'21, *Viresh Gupta, Tanmoy Chakraborty*\n\n1. [**Knowledge Graph Embedding using Graph Convolutional Networks with Relation-Aware Attention**](https://arxiv.org/pdf/2102.07200.pdf), *Nasrullah Sheikh, Xiao Qin, Berthold Reinwald, Christoph Miksovic, Thomas Gschwind, Paolo Scotton*\n\n1. [**SLAPS: Self-Supervision Improves Structure Learning for Graph Neural Networks**](https://arxiv.org/pdf/2102.05034.pdf), *Bahare Fatemi, Layla El Asri, Seyed Mehran Kazemi*\n\n1. [**Finding Needles in Heterogeneous Haystacks**](https://homepage.divms.uiowa.edu/~badhikari/assets/doc/papers/CONGCNIAAI2021.pdf), AAAI'21, *Bijaya Adhikari, Liangyue Li, Nikhil Rao, Karthik Subbian*\n\n1. [**RetCL: A Selection-based Approach for Retrosynthesis via Contrastive Learning**](https://arxiv.org/abs/2105.00795), IJCAI 2021, *Hankook Lee, Sungsoo Ahn, Seung-Woo Seo, You Young Song, Eunho Yang, Sung-Ju Hwang, Jinwoo Shin*\n\n1. [**Accurate Prediction of Free Solvation Energy of Organic Molecules via Graph Attention Network and Message Passing Neural Network from Pairwise Atomistic Interactions**](https://arxiv.org/abs/2105.02048), *Ramin Ansari, Amirata Ghorbani*\n\n1. [**DIPS-Plus: The Enhanced Database of Interacting Protein Structures for Interface Prediction**](https://arxiv.org/abs/2106.04362), *Alex Morehead, Chen Chen, Ada Sedova, Jianlin Cheng*\n\n1. [**Coreference-Aware Dialogue Summarization**](https://arxiv.org/abs/2106.08556), SIGDIAL'21, *Zhengyuan Liu, Ke Shi, Nancy F. Chen*\n\n1. [**Document Structure aware Relational Graph Convolutional Networks for Ontology Population**](https://arxiv.org/abs/2104.12950), arXiv, *Abhay M Shalghar, Ayush Kumar, Balaji Ganesan, Aswin Kannan, Shobha G*\n\n1. [**Covid-19 Detection from Chest X-ray and Patient Metadata using Graph Convolutional Neural Networks**](https://arxiv.org/abs/2105.09720), *Thosini Bamunu Mudiyanselage, Nipuna Senanayake, Chunyan Ji, Yi Pan, Yanqing Zhang*\n\n1. [**Rossmann-toolbox: a deep learning-based protocol for the prediction and design of cofactor specificity in Rossmann fold proteins**](https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbab371/6375059), Briefings in Bioinformatics, *Kamil Kaminski, Jan Ludwiczak, Maciej Jasinski, Adriana Bukala, Rafal Madaj, Krzysztof Szczepaniak, Stanislaw Dunin-Horkawicz*\n\n1. [**LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations**](https://arxiv.org/pdf/2106.01093.pdf), ACL'21, *Ruisheng Cao, Lu Chen, Zhi Chen, Yanbin Zhao, Su Zhu, Kai Yu*\n\n1. [**Enhancing Graph Neural Networks via auxiliary training for semi-supervised node classification**](https://www.sciencedirect.com/science/article/pii/S0950705121001477), Knowledge-Based System'21, *Yao Wu, Yu Song, Hong Huang, Fanghua Ye, Xing Xie, Hai Jin*\n\n1. [**Modeling Graph Node Correlations with Neighbor Mixture Models**](https://arxiv.org/pdf/2103.15966.pdf), *Linfeng Liu, Michael C. Hughes, Li-Ping Liu*\n\n1. [**COMBINING PHYSICS AND MACHINE LEARNING FOR NETWORK FLOW ESTIMATION**](https://openreview.net/pdf/9dc2744a465941220de07cf308acf822ec8aaa64.pdf), ICLR'21, *Arlei Silva, Furkan Kocayusufoglu, Saber Jafarpour, Francesco Bullo, Ananthram Swami, Ambuj Singh*\n\n1. [**A Classification Method for Academic Resources Based on a Graph Attention Network**](https://www.mdpi.com/1999-5903/13/3/64/htm), Future Internet'21, *Jie Yu, Yaliu Li, Chenle Pan and Junwei Wang*\n\n1. [**Large Graph Convolutional Network Training with GPU-Oriented Data Communication Architecture**](https://arxiv.org/abs/2103.03330), *Seung Won Min, Kun Wu, Sitao Huang, Mert Hidayetoğlu, Jinjun Xiong, Eiman Ebrahimi, Deming Chen, Wen-mei Hwu*\n\n1. [**Graph Attention Multi-Layer Perception**](https://github.com/PKU-DAIR/GAMLP/blob/main/GAMLP.pdf), *Wentao Zhang, Ziqi Yin, Zeang Sheng, Wen Ouyang, Xiaosen Li, Yangyu Tao, Zhi Yang, Bin Cui*\n\n1. [**GNNLens: A Visual Analytics Approach for Prediction Error Diagnosis of Graph Neural Networks**](https://arxiv.org/abs/2011.11048v5), *Zhihua Jin, Yong Wang, Qianwen Wang, Yao Ming, Tengfei Ma, Huamin Qu*\n\n1. [**How Attentive are Graph Attention Networks?**](https://arxiv.org/pdf/2105.14491.pdf), *Shaked Brody, Uri Alon, Eran Yahav*, [code](https://github.com/tech-srl/how_attentive_are_gats)\n\n1. [**SCENE: Reasoning about Traffic Scenes using Heterogeneous Graph Neural Networks**](https://arxiv.org/pdf/2301.03512.pdf), *Thomas Monninger\\*, Julian Schmidt\\*, Jan Rupprecht, David Raba, Julian Jordan, Daniel Frank, Steffen Staab, Klaus Dietmayer*, [code](https://github.com/schmidt-ju/scene), \\*co-first authors\n\n<\/details>\n\n## Contributing\n\nPlease let us know if you encounter a bug or have any suggestions by [filing an issue](https://github.com/dmlc/dgl/issues).\n\nWe welcome all contributions from bug fixes to new features and extensions.\n\nWe expect all contributions discussed in the issue tracker and going through PRs.  Please refer to our [contribution guide](https://docs.dgl.ai/contribute.html).\n\n## Cite\n\nIf you use DGL in a scientific publication, we would appreciate citations to the following paper:\n```\n@article{wang2019dgl,\n    title={Deep Graph Library: A Graph-Centric, Highly-Performant Package for Graph Neural Networks},\n    author={Minjie Wang and Da Zheng and Zihao Ye and Quan Gan and Mufei Li and Xiang Song and Jinjing Zhou and Chao Ma and Lingfan Yu and Yu Gai and Tianjun Xiao and Tong He and George Karypis and Jinyang Li and Zheng Zhang},\n    year={2019},\n    journal={arXiv preprint arXiv:1909.01315}\n}\n```\n\n## The Team\n\nDGL is developed and maintained by [NYU, NYU Shanghai, AWS Shanghai AI Lab, and AWS MXNet Science Team](https://www.dgl.ai/pages/about.html).\n\n## License\n\nDGL uses Apache License 2.0.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BE42:1F1FB6:176FB5:5C943B:6AB92102"},"text_sha256":"342d7353d319eeba6f35acfe01a099332f47b3e9b7c1177e46100a712b4d2134"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"apache/tvm","input_row":{"repository":"apache/tvm","url":"https://github.com/apache/tvm","name":"tvm","owner":"apache","description":"Open Machine Learning Compiler Framework","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":13779,"issues":3927,"created_at":"2016-10-12T22:20:28Z","updated_at":"2026-09-27T13:31:27Z","first_commit_at":"2016-10-12T22:20:28Z","last_commit_at":"2026-09-27T12:59:14Z","activity_months":119.47,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:42.020Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apache/tvm","visibility":"public","created_at":"2016-10-12T22:20:28Z","updated_at":"2026-09-27T13:31:27Z","private":false,"fork":false,"archived":false,"stargazers_count":13779,"open_issues_count":272,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3309","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17B7B53:1BD61B2:6AB92892"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3308","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:1777E0F:1B95944:6AB92892"},"commit":{"sha":"af6b601694e44bf15d43cd228a4dfac127a6b33b","url":"https://github.com/apache/tvm/commit/af6b601694e44bf15d43cd228a4dfac127a6b33b","date":"2018-05-22T17:37:31Z","author_date":"2018-05-22T17:37:31Z","committer_date":"2018-05-22T17:37:31Z","tree_sha":"217c35746acf0388439ed61e7b27390468230240","message_first_line":"axis bounds checking in split (#1178)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3307","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091B:72BD3:17E0079:1BFEFC7:6AB92892"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2140,"blob_sha":"93dbb9ac353448813504c1f2c3d4853e62c2e24c","priority":0}],"documents":[{"path":"README.md","size":2140,"blob_sha":"93dbb9ac353448813504c1f2c3d4853e62c2e24c","priority":0,"status":200,"text":"<img src=https://raw.githubusercontent.com/tqchen/tvmlang.org/master/images/logo/tvm-logo-small.png width=128/> Open Deep Learning Compiler Stack\n==============================================\n\n[![GitHub license](http://dmlc.github.io/img/apache2.svg)](./LICENSE)\n[![Build Status](http://mode-gpu.cs.washington.edu:8080/buildStatus/icon?job=dmlc/tvm/master)](http://mode-gpu.cs.washington.edu:8080/job/dmlc/job/tvm/job/master/)\n\n[Installation](docs/how_to/install.md) |\n[Documentation](http://docs.tvmlang.org) |\n[Tutorials](http://tutorials.tvmlang.org) |\n[Operator Inventory](topi) |\n[FAQ](docs/faq.md) |\n[Contributors](CONTRIBUTORS.md) |\n[Community](http://tvmlang.org/community.html) |\n[Release Notes](NEWS.md)\n\nTVM is a compiler stack for deep learning systems. It is designed to close the gap between the\nproductivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends.\nTVM works with deep learning frameworks to provide end to end compilation to different backends.\nCheckout the [tvm stack homepage](http://tvmlang.org/)  for more information.\n\nLicense\n-------\n© Contributors Licensed under an [Apache-2.0](https://github.com/dmlc/tvm/blob/master/LICENSE) license.\n\nContribute to TVM\n-----------------\nTVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community.\n\n- [Contributor Guide](docs/how_to/contribute.md)\n- Please add your name to [CONTRIBUTORS.md](CONTRIBUTORS.md)\n- Please also update [NEWS.md](NEWS.md) on changes and improvements in API and codes.\n\nAcknowledgement\n---------------\nWe learnt a lot from the following projects when building TVM.\n- [Halide](https://github.com/halide/Halide): TVM uses [HalideIR](https://github.com/dmlc/HalideIR) as data structure for\n  arithematic simplification and low level lowering. We also learnt and adapted some part of lowering pipeline from Halide.\n- [Loopy](https://github.com/inducer/loopy): use of integer set analysis and its loop transformation primitives.\n- [Theano](https://github.com/Theano/Theano): the design inspiration of symbolic scan operator for recurrence.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D02:40CE8:17A3D2:5CC87D:6AB920FC"},"text_sha256":"e907f1253e701ac30f4a7962568f0099c695b9b19a7178302fbf370487e085c1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3306","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BD:3203A7:177AEBA:1B99CF9:6AB92893"},"commit":{"sha":"6383c7fd7f9edbd73e8d81a0b0f39d19e3b0e331","url":"https://github.com/apache/tvm/commit/6383c7fd7f9edbd73e8d81a0b0f39d19e3b0e331","date":"2026-06-30T19:35:22Z","author_date":"2026-06-30T19:35:22Z","committer_date":"2026-06-30T19:35:22Z","tree_sha":"59045c9245beadf160ddb587dc60a4d479bca76c","message_first_line":"[Relax][ONNX] Support 3D AffineGrid (#19863)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3305","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E5:A9DC0:17A3559:1BC22F6:6AB92893"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3494,"blob_sha":"fb9e9bc4a0d1a50d095457833bfc079436ac61ca","priority":0},{"path":"docs/reference/security.rst","size":4190,"blob_sha":"08fabb1e9094eaabcc8c85de4b00d63daa097afc","priority":1}],"documents":[{"path":"README.md","size":3494,"blob_sha":"fb9e9bc4a0d1a50d095457833bfc079436ac61ca","priority":0,"status":200,"text":"<!--- Licensed to the Apache Software Foundation (ASF) under one -->\n<!--- or more contributor license agreements.  See the NOTICE file -->\n<!--- distributed with this work for additional information -->\n<!--- regarding copyright ownership.  The ASF licenses this file -->\n<!--- to you under the Apache License, Version 2.0 (the -->\n<!--- \"License\"); you may not use this file except in compliance -->\n<!--- with the License.  You may obtain a copy of the License at -->\n\n<!---   http://www.apache.org/licenses/LICENSE-2.0 -->\n\n<!--- Unless required by applicable law or agreed to in writing, -->\n<!--- software distributed under the License is distributed on an -->\n<!--- \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->\n<!--- KIND, either express or implied.  See the License for the -->\n<!--- specific language governing permissions and limitations -->\n<!--- under the License. -->\n\n<img src=https://raw.githubusercontent.com/apache/tvm-site/main/images/logo/tvm-logo-small.png width=128/> Open Machine Learning Compiler Framework\n==============================================\n[Documentation](https://tvm.apache.org/docs) |\n[Contributors](CONTRIBUTORS.md) |\n[Community](https://tvm.apache.org/community) |\n[Release Notes](NEWS.md)\n\nApache TVM is an open machine learning compilation framework,\nfollowing the following principles:\n\n- Python-first development that enables quick customization of machine learning compiler pipelines.\n- Universal deployment to bring models into minimum deployable modules.\n\nLicense\n-------\nTVM is licensed under the [Apache-2.0](LICENSE) license.\n\nGetting Started\n---------------\nCheck out the [TVM Documentation](https://tvm.apache.org/docs/) site for installation instructions, tutorials, examples, and more.\nThe [Getting Started with TVM](https://tvm.apache.org/docs/get_started/overview.html) tutorial is a great\nplace to start.\n\nContribute to TVM\n-----------------\nTVM adopts the Apache committer model. We aim to create an open-source project maintained and owned by the community.\nCheck out the [Contributor Guide](https://tvm.apache.org/docs/contribute/).\n\nHistory and Acknowledgement\n---------------------------\nTVM started as a research project for deep learning compilation.\nThe first version of the project benefited a lot from the following projects:\n\n- [Halide](https://github.com/halide/Halide): Part of TVM's TIR and arithmetic simplification module\n originates from Halide. We also learned and adapted some parts of the lowering pipeline from Halide.\n- [Loopy](https://github.com/inducer/loopy): use of integer set analysis and its loop transformation primitives.\n- [Theano](https://github.com/Theano/Theano): the design inspiration of symbolic scan operator for recurrence.\n\nSince then, the project has gone through several rounds of redesigns.\nThe current design is also drastically different from the initial design, following the\ndevelopment trend of the ML compiler community.\n\nThe most recent version focuses on a cross-level design with TensorIR as the tensor-level representation\nand Relax as the graph-level representation and Python-first transformations.\nThe project's current design goal is to make the ML compiler accessible by enabling most\ntransformations to be customizable in Python and bringing a cross-level representation that can jointly\noptimize computational graphs, tensor programs, and libraries. The project is also a foundation\ninfra for building Python-first vertical compilers for domains, such as LLMs.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"361A:18CDF1:171F05:54E592:6AB92103"},"text_sha256":"afb22aac927350415156670ba73864905cc1bf7ce74231f8137a3ecbd7479a3e"},{"path":"docs/reference/security.rst","size":4190,"blob_sha":"08fabb1e9094eaabcc8c85de4b00d63daa097afc","priority":1,"status":200,"text":"..  Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n..    http://www.apache.org/licenses/LICENSE-2.0\n\n..  Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. _dev-security:\n\nSecurity Guide\n==============\n\nReporting Security Issues\n-------------------------\n\nThe Apache Software Foundation takes a very active stance in eliminating security problems and denial of service attacks against its products.\nWe strongly encourage folks to report such problems to our private security mailing list first, before disclosing them in a public forum.\n\nPlease note that the security mailing list should only be used for reporting undisclosed security vulnerabilities and managing the process of fixing such vulnerabilities. We cannot accept regular bug reports or other queries at this address. All mail sent to this address that does not relate to an undisclosed security problem in our source code will be ignored.\nQuestions about: if a vulnerability applies to your particular application obtaining further information on a published vulnerability availability of patches\nand/or new releases should be addressed to the user Discuss forum.\n\nThe private security mailing address is: `security@apache.org <security@apache.org>`_.\nFeel free to consult the `Apache Security guide <https://www.apache.org/security/>`_.\n\n\nSecurity Model\n--------------\nThe default binary generated by TVM only relies on a minimum runtime API.\nThe runtime depends on a limited set of system calls(e.g. malloc) in the system library.\n\n\nTVM RPC server assumes that the user is trusted and needs to be used in a trusted network environment\nand encrypted channels. It allows writings of arbitrary files into the server and provide\nfull remote code execution capabilities to anyone who can access this API.\nAll of the TVM APIs are designed to be used by trusted users, for APIs that involves URL,\nwe expect users to put in only trusted URLs.\n\n\nRPC data exchange between the tracker, server and client are in plain-text.\nIt is recommended to use them under trusted networking environment or encrypted channels.\n\n\nLoading serialized artifacts must only be done with input from a trusted source.\n\n\nSecurity Advisories\n-------------------\n\nSubroutine Cache Hash Collision\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n``SubroutineMixin._get_subroutine()`` in ``python/tvm/relax/frontend/nn/subroutine.py``\nused ``tvm_ffi.structural_hash`` as the sole cache lookup key without a subsequent\n``structural_equal`` verification. If two different ``arg_ty`` values produced the\nsame 64-bit hash, the cache would return a previously compiled function with\nmismatched parameter shapes, leading to silently incorrect compiled output.\n\n**Severity**: Low. The ``structural_hash`` function returns a 64-bit integer.\nA natural hash collision requires approximately 2^32 distinct inputs (birthday bound),\nmaking accidental collision extremely unlikely in normal compilation workflows.\nThe issue is primarily a correctness defect rather than a practically exploitable\nsecurity vulnerability.\n\n**Root Cause**: The subroutine cache (``cls._gvar``) was keyed by\n``(structural_hash(arg_ty, map_free_vars=True), is_dataflow)``.\nA hash match was treated as proof of structural equality, skipping the necessary\n``structural_equal`` check.\n\n**Fix**: The cache now stores a list of ``(arg_ty, result)`` pairs per hash bucket.\nOn lookup, each candidate is verified with ``structural_equal`` before returning.\nThis follows the standard hash-table pattern: hash for bucket selection, equality\nfor final verification.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC94:09ED:DFBB7:3DDAEE:6AB92105"},"text_sha256":"209370191905919572ff68f04700d495317a0f52fb670603d00a5325998fd1ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Data-Centric-AI-Community/fg-data-profiling","input_row":{"repository":"Data-Centric-AI-Community/fg-data-profiling","url":"https://github.com/Data-Centric-AI-Community/fg-data-profiling","name":"fg-data-profiling","owner":"Data-Centric-AI-Community","description":"1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames. ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":13712,"issues":861,"created_at":"2016-01-09T23:47:55Z","updated_at":"2026-09-27T07:58:18Z","first_commit_at":"2016-01-09T23:45:18Z","last_commit_at":"2026-09-11T18:43:12Z","activity_months":128.05000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:45.539Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Data-Centric-AI-Community/fg-data-profiling","visibility":"public","created_at":"2016-01-09T23:47:55Z","updated_at":"2026-09-27T07:58:18Z","private":false,"fork":false,"archived":false,"stargazers_count":13712,"open_issues_count":329,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3304","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:17DA3BD:1BF96F8:6AB92895"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3303","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DE:70FF5:17B8E7A:1BD7C57:6AB92895"},"commit":{"sha":"28102467866a8b33ed67aa305f98a9d5ac54cf29","url":"https://github.com/Data-Centric-AI-Community/fg-data-profiling/commit/28102467866a8b33ed67aa305f98a9d5ac54cf29","date":"2018-05-17T13:31:55Z","author_date":"2018-05-17T13:31:55Z","committer_date":"2018-05-17T13:31:55Z","tree_sha":"c58817568872ccf22d4448ef0276c91c9d0f25a1","message_first_line":"Updated Readme  \"conda install\" "},"tree_request_status":200,"tree_rate":{"github_remaining":"3302","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082D:725A9:17C01F2:1BDF6E4:6AB92896"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3584,"blob_sha":"4af55a4674e377936e197bebbd0cddfab429c359","priority":0}],"documents":[{"path":"README.md","size":3584,"blob_sha":"4af55a4674e377936e197bebbd0cddfab429c359","priority":0,"status":200,"text":"# pandas-profiling \n\nGenerates profile reports from a pandas `DataFrame`. The pandas `df.describe()` function is great but a little basic for serious exploratory data analysis.\n\nFor each column the following statistics - if relevant for the column type - are presented in an interactive HTML report:\n\n* **Essentials**:  type, unique values, missing values\n* **Quantile statistics** like minimum value, Q1, median, Q3, maximum, range, interquartile range\n* **Descriptive statistics** like mean, mode, standard deviation, sum, median absolute deviation, coefficient of variation, kurtosis, skewness\n* **Most frequent values**\n* **Histogram**\n* **Correlations** highlighting of highly correlated variables, Spearman and Pearson matrixes\n\n## Demo\n\n[Click here](http://nbviewer.ipython.org/github/JosPolfliet/pandas-profiling/blob/master/examples/meteorites.ipynb) to see a live demo.\n\n## Installation\n\n### Using pip\n\nYou can install using the pip package manager by running\n\n    pip install pandas-profiling\n    \n### Using conda\n\nYou can install using the conda package manager by running\n\n    conda install -c anaconda pandas-profiling\n\n### From source\n\nDownload the source code by cloning the repo or by pressing 'Download ZIP' on this page. Install by navigating to the proper directory and running\n\n    python setup.py install\n\n## Usage\n\nThe profile report is written in HTML5 and CSS3, which means pandas-profiling requires a modern browser. \n\n### Jupyter Notebook (formerly IPython)\n\nWe recommend generating reports interactively by using the Jupyter notebook. \n\nStart by loading in your pandas DataFrame, e.g. by using\n```python\nimport pandas as pd\nimport pandas_profiling\n\ndf=pd.read_csv(\"/myfilepath/myfile.csv\", parse_dates=True, encoding='UTF-8')\n```\nTo display the report in a Jupyter notebook, run:\n```python\npandas_profiling.ProfileReport(df)\n```\nTo retrieve the list of variables which are rejected due to high correlation:\n```python\nprofile = pandas_profiling.ProfileReport(df)\nrejected_variables = profile.get_rejected_variables(threshold=0.9)\n```\nIf you want to generate a HTML report file, save the `ProfileReport` to an object and use the `to_file()` function:\n```python\nprofile = pandas_profiling.ProfileReport(df)\nprofile.to_file(outputfile=\"/tmp/myoutputfile.html\")\n```\n### Python\n\nFor standard formatted CSV files that can be read immediately by pandas, you can use the `profile_csv.py` script. Run\n\n\tpython profile_csv.py -h\n\nfor information about options and arguments.\n\n### Advanced usage\n\nA set of options are available in order to adapt the report generated.\n\n* `bins` (`int`): Number of bins in histogram (10 by default).\n* Correlation settings:\n    * `check_correlation` (`boolean`): Whether or not to check correlation (`True` by default)\n    * `correlation_threshold` (`float`): Threshold to determine if the variable pair is correlated (0.9 by default).\n    * `correlation_overrides` (`list`): Variable names not to be rejected because they are correlated (`None` by default).\n    * `check_recoded` (`boolean`): Whether or not to check recoded correlation (`False` by default). Since it's an expensive computation it can be activated for small datasets.\n* `pool_size` (`int`): Number of workers in thread pool. The default is equal to the number of CPU.\n\n## Dependencies\n\n* **An internet connection.** Pandas-profiling requires an internet connection to download the Bootstrap and JQuery libraries. I might change this in the future, let me know if you want that sooner than later.\n* python (>= 2.7)\n* pandas (>=0.19)\n* matplotlib  (>=1.4)\n* six (>=1.9)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF28:375F4:176550:5C8C51:6AB92106"},"text_sha256":"ab19691c0fe47d7dec5e344d57ecc7a18fdc07f81d33f78fb400c7c4b84e5649"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3301","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:17E02D5:1BFF2AE:6AB92897"},"commit":{"sha":"628d40088663790f54fa3d01733e2ecca1bf9338","url":"https://github.com/Data-Centric-AI-Community/fg-data-profiling/commit/628d40088663790f54fa3d01733e2ecca1bf9338","date":"2026-04-22T23:21:42Z","author_date":"2026-04-17T00:06:42Z","committer_date":"2026-04-22T23:21:42Z","tree_sha":"6cf29ca7bc2d4d185d6d7393c802cca04990d7b5","message_first_line":"feat: rename to data-profiling"},"tree_request_status":200,"tree_rate":{"github_remaining":"3300","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E6:731F6:17D8AE8:1BF7E28:6AB92897"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19635,"blob_sha":"602bfcf884d7199db7a1cc4fc50a27097c7976f9","priority":0}],"documents":[{"path":"README.md","size":19635,"blob_sha":"602bfcf884d7199db7a1cc4fc50a27097c7976f9","priority":0,"status":200,"text":"# fg-data-profiling\n\n> **`ydata-profiling` is now `fg-data-profiling`.** This package has been renamed to `fg-data-profiling`. Please follow the [Migration Guide](#migration-guide) as soon as possible — the old package will no longer receive updates or bug fixes.\n\n[![Build Status](https://github.com/ydataai/pandas-profiling/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/ydataai/pandas-profiling/actions/workflows/tests.yml)\n[![PyPI download month](https://img.shields.io/pypi/dm/fg-data-profiling.svg)](https://pypi.python.org/pypi/fg-data-profiling/)\n[![](https://pepy.tech/badge/pandas-profiling)](https://pypi.org/project/fg-data-profiling/)\n[![Code Coverage](https://codecov.io/gh/ydataai/pandas-profiling/branch/master/graph/badge.svg?token=gMptB4YUnF)](https://codecov.io/gh/ydataai/pandas-profiling)\n[![Release Version](https://img.shields.io/github/release/ydataai/pandas-profiling.svg)](https://github.com/ydataai/pandas-profiling/releases)\n[![Python Version](https://img.shields.io/pypi/pyversions/fg-data-profiling)](https://pypi.org/project/fg-data-profiling/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n<img referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=cb7e69df-af81-4352-809a-d4251756affc\" />\n\n<p align=\"center\"><img width=\"300\" src=\"https://assets.ydata.ai/oss/ydata-profiling_black.png\" alt=\"Data Profiling Logo\"><\/p>\n\n<p align=\"center\">\n  <a href=\"https://ydata-profiling.ydata.ai/docs/master/\">Documentation<\/a>\n  |\n  <a href=\"https://tiny.ydata.ai/dcai-data-profiling\">Discord<\/a>\n  | \n  <a href=\"https://stackoverflow.com/questions/tagged/pandas-profiling+or+data-profiling\">Stack Overflow<\/a>\n  |\n  <a href=\"https://ydata-profiling.ydata.ai/docs/master/pages/reference/changelog.html#changelog\">Latest changelog<\/a>\n\n<\/p>\n\n<p align=\"center\">\n  Do you like this project? Show us your love and <a href=\"https://engage.ydata.ai\">give feedback!<\/a>\n<\/p>\n\n`fg-data-profiling` primary goal is to provide a one-line Exploratory Data Analysis (EDA) experience in a consistent and fast solution. Like pandas `df.describe()` function, that is so handy, fg-data-profiling delivers an extended analysis of a DataFrame while allowing the data analysis to be exported in different formats such as **html** and **json**.\n\nThe package outputs a simple and digested analysis of a dataset, including **time-series** and **text**.\n\n> **Looking for a scalable solution that can fully integrate with your database systems?**<br>\n> Leverage YData Fabric Data Catalog to connect to different databases and storages (Oracle, snowflake, PostGreSQL, GCS, S3, etc.) and leverage an interactive and guided profiling experience in Fabric. Check out the [Community Version](http://ydata.ai/register?utm_source=data-profiling&utm_medium=documentation&utm_campaign=YData%20Fabric%20Community).\n\n## Migration Guide\n \n### 1. Uninstall the old package\n \n```bash\npip uninstall ydata-profiling\n```\n \n### 2. Install the new package\n \n```bash\npip install fg-data-profiling\n```\n \n### 3. Update your imports\n \nFind and replace all occurrences of the old import in your codebase:\n \n```python\n# Before\nimport ydata_profiling\nfrom ydata_profiling import ProfileReport\n\n# After\nimport data_profiling\nfrom data_profiling import ProfileReport\n```\n \nYou can use this one-liner to find all affected files:\n \n```bash\ngrep -r \"ydata_profiling\" . --include=\"*.py\"\n```\n\n## ▶️ Quickstart\n\n### Install\n```cmd\npip install fg-data-profiling\n```\nor\n```cmd\nconda install -c conda-forge fg-data-profiling\n```\n### Start profiling\n\nStart by loading your pandas `DataFrame` as you normally would, e.g. by using:\n\n```python\nimport numpy as np\nimport pandas as pd\nfrom data_profiling import ProfileReport\n\ndf = pd.DataFrame(np.random.rand(100, 5), columns=[\"a\", \"b\", \"c\", \"d\", \"e\"])\n```\n\nTo generate the standard profiling report, merely run:\n\n```python\nprofile = ProfileReport(df, title=\"Profiling Report\")\n```\n\n## 📊 Key features\n\n- **Type inference**: automatic detection of columns' data types (*Categorical*, *Numerical*, *Date*, etc.)\n- **Warnings**: A summary of the problems/challenges in the data that you might need to work on (*missing data*, *inaccuracies*, *skewness*, etc.)\n- **Univariate analysis**: including descriptive statistics (mean, median, mode, etc) and informative visualizations such as distribution histograms\n- **Multivariate analysis**: including correlations, a detailed analysis of missing data, duplicate rows, and visual support for variables pairwise interaction\n- **Time-Series**: including different statistical information relative to time dependent data such as auto-correlation and seasonality, along ACF and PACF plots.\n- **Text analysis**: most common categories (uppercase, lowercase, separator), scripts (Latin, Cyrillic) and blocks (ASCII, Cyrilic)\n- **File and Image analysis**: file sizes, creation dates, dimensions, indication of truncated images and existence of EXIF metadata\n- **Compare datasets**: one-line solution to enable a fast and complete report on the comparison of datasets\n- **Flexible output formats**: all analysis can be exported to an HTML report that can be easily shared with different parties, as JSON for an easy integration in automated systems and as a widget in a Jupyter Notebook.\n\nThe report contains three additional sections:\n\n- **Overview**: mostly global details about the dataset (number of records, number of variables, overall missigness and duplicates, memory footprint)\n- **Alerts**: a comprehensive and automatic list of potential data quality issues (high correlation, skewness, uniformity, zeros, missing values, constant values, between others)\n- **Reproduction**: technical details about the analysis (time, version and configuration)\n\n### 🎁 Latest features\n\n- Want to scale? Check the latest release with ⭐⚡[Spark support](https://ydata-profiling.ydata.ai/docs/master/pages/integrations/pypspark.html)! \n- Looking for how you can do an EDA for Time-Series 🕛 ? Check [this blogpost](https://towardsdatascience.com/how-to-do-an-eda-for-time-series-cbb92b3b1913).\n- You want to compare 2 datasets and get a report? Check [this blogpost](https://medium.com/towards-artificial-intelligence/how-to-compare-2-dataset-with-pandas-profiling-2ae3a9d7695e)\n\n### ✨ Spark\n\nSpark support has been released, but we are always looking for an extra pair of hands 👐.\n[Check current work in progress!](https://github.com/Data-Centric-AI-Community/fg-data-profiling/projects/3).\n\n## 📝 Use cases\nfg-data-profiling can be used to deliver a variety of different use-case. The documentation includes guides, tips and tricks for tackling them:\n\n| Use case | Description                                                                                 |\n|----------|---------------------------------------------------------------------------------------------|\n| [Comparing datasets](https://docs.profiling.ydata.ai/latest/features/comparing_datasets)                        | Comparing multiple version of the same dataset                                              |\n| [Profiling a Time-Series dataset](https://docs.profiling.ydata.ai/latest/features/time_series_datasets)               | Generating a report for a time-series dataset with a single line of code                    |\n|[Profiling large datasets](https://docs.profiling.ydata.ai/latest/features/big_data)                            | Tips on how to prepare data and configure `fg-data-profiling` for working with large datasets |\n| [Handling sensitive data](https://docs.profiling.ydata.ai/latest/features/sensitive_data)                       | Generating reports which are mindful about sensitive data in the input dataset              |\n| [Dataset metadata and data dictionaries](https://docs.profiling.ydata.ai/latest/features/metadata)               | Complementing the report with dataset details and column-specific data dictionaries         |\n| [Customizing the report's appearance](https://docs.profiling.ydata.ai/latest/features/custom_reports) | Changing the appearance of the report's page and of the contained visualizations            |\n| [Profiling Databases](https://docs.profiling.ydata.ai/latest/features/collaborative_data_profiling) | For a seamless profiling experience in your organization's databases, check [Fabric Data Catalog](https://ydata.ai/products/data_catalog), which allows to consume data from different types of storages such as RDBMs (Azure SQL, PostGreSQL, Oracle, etc.) and object storages (Google Cloud Storage, AWS S3, Snowflake, etc.), among others. |\n### Using inside Jupyter Notebooks\n\nThere are two interfaces to consume the report inside a Jupyter notebook: through widgets and through an embedded HTML report.\n\n<img alt=\"Notebook Widgets\" src=\"https://data-profiling.ydata.ai/docs/master/assets/widgets.gif\" width=\"800\" />\n\nThe above is achieved by simply displaying the report as a set of widgets. In a Jupyter Notebook, run:\n\n```python\nprofile.to_widgets()\n```\n\nThe HTML report can be directly embedded in a cell in a similar fashion:\n\n```python\nprofile.to_notebook_iframe()\n```\n\n<img alt=\"HTML\" src=\"https://ydata-profiling.ydata.ai/docs/master/assets/iframe.gif\" width=\"800\" />\n\n### Exporting the report to a file\n\nTo generate a HTML report file, save the `ProfileReport` to an object and use the `to_file()` function:\n\n```python\nprofile.to_file(\"your_report.html\")\n```\n\nAlternatively, the report's data can be obtained as a JSON file:\n\n```python\n# As a JSON string\njson_data = profile.to_json()\n\n# As a file\nprofile.to_file(\"your_report.json\")\n```\n\n### Using in the command line\n\nFor standard formatted CSV files (which can be read directly by pandas without additional settings), the `data_profiling` executable can be used in the command line. The example below generates a report named *Example Profiling Report*, using a configuration file called `default.yaml`, in the file `report.html` by processing a `data.csv` dataset.\n\n```sh\ndata_profiling --title \"Example Profiling Report\" --config_file default.yaml data.csv report.html\n```\n\nAdditional details on the CLI are available [on the documentation](https://ydata-profiling.ydata.ai/docs/master/pages/getting_started/quickstart.html#command-line-usage).\n\n## 👀 Examples\n\nThe following example reports showcase the potentialities of the package across a wide range of dataset and data types:\n\n* [Census Income](https://ydata-profiling.ydata.ai/examples/master/census/census_report.html) (US Adult Census data relating income with other demographic properties)\n* [NASA Meteorites](https://ydata-profiling.ydata.ai/examples/master/meteorites/meteorites_report.html) (comprehensive set of meteorite landing - object properties and locations) [![Open In Colab](https://camo.githubusercontent.com/52feade06f2fecbf006889a904d221e6a730c194/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667)](https://colab.research.google.com/github/ydataai/pandas-profiling/blob/master/examples/meteorites/meteorites_cloud.ipynb) [![Binder](https://camo.githubusercontent.com/483bae47a175c24dfbfc57390edd8b6982ac5fb3/68747470733a2f2f6d7962696e6465722e6f72672f62616467655f6c6f676f2e737667)](https://mybinder.org/v2/gh/ydataai/pandas-profiling/master?filepath=examples%2Fmeteorites%2Fmeteorites%5Fcloud.ipynb)\n* [Titanic](https://ydata-profiling.ydata.ai/examples/master/titanic/titanic_report.html) (the \"Wonderwall\" of datasets) [![Open In Colab](https://camo.githubusercontent.com/52feade06f2fecbf006889a904d221e6a730c194/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667)](https://colab.research.google.com/github/ydataai/pandas-profiling/blob/master/examples/titanic/titanic_cloud.ipynb) [![Binder](https://camo.githubusercontent.com/483bae47a175c24dfbfc57390edd8b6982ac5fb3/68747470733a2f2f6d7962696e6465722e6f72672f62616467655f6c6f676f2e737667)](https://mybinder.org/v2/gh/ydataai/pandas-profiling/master?filepath=examples%2Ftitanic%2Ftitanic%5Fcloud.ipynb)\n* [NZA](https://ydata-profiling.ydata.ai/examples/master/nza/nza_report.html) (open data from the Dutch Healthcare Authority)\n* [Stata Auto](https://ydata-profiling.ydata.ai/examples/master/stata_auto/stata_auto_report.html) (1978 Automobile data)\n* [Colors](https://ydata-profiling.ydata.ai/examples/master/colors/colors_report.html) (a simple colors dataset)\n* [Vektis](https://ydata-profiling.ydata.ai/examples/master/vektis/vektis_report.html) (Vektis Dutch Healthcare data)\n* [UCI Bank Dataset](https://ydata-profiling.ydata.ai/examples/master/bank_marketing_data/uci_bank_marketing_report.html) (marketing dataset from a bank)\n* [Russian Vocabulary](https://ydata-profiling.ydata.ai/examples/master/features/russian_vocabulary.html) (100 most common Russian words, showcasing unicode text analysis)\n* [Website Inaccessibility](https://ydata-profiling.ydata.ai/examples/master/features/website_inaccessibility_report.html) (website accessibility analysis, showcasing support for URL data)\n* [Orange prices](https://ydata-profiling.ydata.ai/examples/master/features/united_report.html) and \n* [Coal prices](https://ydata-profiling.ydata.ai/examples/master/features/flatly_report.html) (simple pricing evolution datasets, showcasing the theming options)\n* [USA Air Quality](https://github.com/Data-Centric-AI-Community/fg-data-profiling/tree/master/examples/usaairquality) (Time-series air quality dataset EDA example)\n* [HCC](https://github.com/Data-Centric-AI-Community/fg-data-profiling/tree/master/examples/hcc) (Open dataset from healthcare, showcasing compare between two sets of data, before and after preprocessing)\n\n## 🛠️ Installation\nAdditional details, including information about widget support, are available [on the documentation](https://ydata-profiling.ydata.ai/docs/master/pages/getting_started/installation.html).\n\n### Using pip\n[![PyPi Downloads](https://pepy.tech/badge/fg-data-profiling)](https://pepy.tech/project/fg-data-profiling)\n[![PyPi Monthly Downloads](https://pepy.tech/badge/pandas-profiling/month)](https://pepy.tech/project/fg-data-profiling/month)\n[![PyPi Version](https://badge.fury.io/py/fg-data-profiling.svg)](https://pypi.org/project/fg-data-profiling/)\n\nYou can install using the `pip` package manager by running:\n\n```sh\npip install -U fg-data-profiling\n```\n\n#### Extras\n\nThe package declares \"extras\", sets of additional dependencies.\n\n* `[notebook]`: support for rendering the report in Jupyter notebook widgets.\n* `[unicode]`: support for more detailed Unicode analysis, at the expense of additional disk space.\n* `[pyspark]`: support for pyspark for big dataset analysis\n\nInstall these with e.g.\n\n```sh\npip install -U fg-data-profiling[notebook,unicode,pyspark]\n```\n\n\n### Using conda\n[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/pandas-profiling.svg)](https://anaconda.org/conda-forge/pandas-profiling)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pandas-profiling.svg)](https://anaconda.org/conda-forge/pandas-profiling) \n\n\nYou can install using the `conda` package manager by running:\n\n```sh\nconda install -c conda-forge fg-data-profiling\n```\n\n### From source (development)\n\nDownload the source code by cloning the repository or click on [Download ZIP](https://github.com/ydataai/pandas-profiling/archive/master.zip) to download the latest stable version.\n\nInstall it by navigating to the proper directory and running:\n\n```sh\npip install -e .\n```\n\nThe profiling report is written in HTML and CSS, which means a modern browser is required. \n\nYou need [Python 3](https://python3statement.github.io/) to run the package. Other dependencies can be found in the requirements files:\n\n| Filename | Requirements|\n|----------|-------------|\n| [requirements.txt](https://github.com/ydataai/pandas-profiling/blob/master/requirements.txt) | Package requirements|\n| [requirements-dev.txt](https://github.com/ydataai/pandas-profiling/blob/master/requirements-dev.txt)  |  Requirements for development|\n| [requirements-test.txt](https://github.com/ydataai/pandas-profiling/blob/master/requirements-test.txt) | Requirements for testing|\n| [setup.py](https://github.com/ydataai/pandas-profiling/blob/master/setup.py) | Requirements for widgets etc. |\n\n## 🔗 Integrations\n\nTo maximize its usefulness in real world contexts, `fg-data-profiling` has a set of implicit and explicit integrations with a variety of other actors in the Data Science ecosystem: \n\n| Integration type | Description |\n|---|---|\n| [Other DataFrame libraries](https://docs.profiling.ydata.ai/latest/integrations/other_dataframe_libraries) | How to compute the profiling of data stored in libraries other than pandas |\n| [Great Expectations](https://ydata-profiling.ydata.ai/docs/master/pages/integrations/great_expectations.html) | Generating [Great Expectations](https://greatexpectations.io) expectations suites directly from a profiling report |\n| [Interactive applications](https://docs.profiling.ydata.ai/latest/integrations/interactive_applications) | Embedding profiling reports in [Streamlit](http://streamlit.io), [Dash](http://dash.plotly.com) or [Panel](https://panel.holoviz.org) applications |\n| [Pipelines](https://ydata-profiling.ydata.ai/docs/master/pages/integrations/pipelines.html) | Integration with DAG workflow execution tools like [Airflow](https://airflow.apache.org) or [Kedro](https://kedro.org) |\n| [Cloud services](https://ydata-profiling.ydata.ai/docs/master/pages/integrations/cloud_services.html) | Using `fg-data-profiling` in hosted computation services like [Lambda](https://lambdalabs.com), [Google Cloud](https://github.com/GoogleCloudPlatform/analytics-componentized-patterns/blob/master/retail/propensity-model/bqml/bqml_kfp_retail_propensity_to_purchase.ipynb) or [Kaggle](https://www.kaggle.com/code) |\n| [IDEs](https://ydata-profiling.ydata.ai/docs/master/pages/integrations/ides.html) | Using `fg-data-profiling` directly from integrated development environments such as [PyCharm](https://www.jetbrains.com/pycharm/) |\n\n## 🙋 Support\nNeed help? Want to share a perspective? Report a bug? Ideas for collaborations? Reach out via the following channels:\n\n- [Stack Overflow](https://stackoverflow.com/questions/tagged/pandas-profiling+or+data-profiling): ideal for asking questions on how to use the package\n- [GitHub Issues](https://github.com/Data-Centric-AI-Community/fg-data-profiling/issues): bugs, proposals for changes, feature requests\n- [Discord](https://tiny.ydata.ai/dcai-data-profiling): ideal for projects discussions, ask questions, collaborations, general chat\n\n> **Need Help?**<br>\n> Get your questions answered with a product owner by [booking a Pawsome chat](https://meetings.hubspot.com/fabiana-clemente)! 🐼\n\n> ❗ Before reporting an issue on GitHub, check out [Common Issues](https://docs.profiling.ydata.ai/latest/support-contribution/common_issues).\n\n## 🤝🏽 Contributing\nLearn how to get involved in the [Contribution Guide](https://ydata-profiling.ydata.ai/docs/master/pages/support_contrib/contribution_guidelines.html).\n\nA low-threshold place to ask questions or start contributing is the [Data Centric AI Community's Discord](https://tiny.ydata.ai/dcai-data-profiling).\n\n\nA big thank you to all our amazing contributors! \n\n<a href=\"https://github.com/Data-Centric-AI-Community/fg-data-profiling/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=Data-Centric-AI-Community/fg-data-profiling\" />\n<\/a>\n\nContributors wall made with [contrib.rocks](https://contrib.rocks).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9658:3AC15:17A37B:5CC827:6AB92108"},"text_sha256":"b02a208404101adb9faaa47c9a23b2f20c342cab7b65ab8047fe2058bbdcee22"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jacobgil/pytorch-grad-cam","input_row":{"repository":"jacobgil/pytorch-grad-cam","url":"https://github.com/jacobgil/pytorch-grad-cam","name":"pytorch-grad-cam","owner":"jacobgil","description":"Advanced AI Explainability for computer vision.  Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":12983,"issues":446,"created_at":"2017-05-31T19:55:15Z","updated_at":"2026-09-27T09:16:40Z","first_commit_at":"2017-05-31T20:04:37Z","last_commit_at":"2026-08-13T07:15:26Z","activity_months":110.40000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; image-classification; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:48.187Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jacobgil/pytorch-grad-cam","visibility":"public","created_at":"2017-05-31T19:55:15Z","updated_at":"2026-09-27T09:16:40Z","private":false,"fork":false,"archived":false,"stargazers_count":12983,"open_issues_count":161,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3299","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082F:B1202:178434D:1BA2BDE:6AB92898"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3298","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CC:76AED:17DA574:1BF98FC:6AB92898"},"commit":{"sha":"51536659d6bab8f6d06ff081f7a1d3e932656954","url":"https://github.com/jacobgil/pytorch-grad-cam/commit/51536659d6bab8f6d06ff081f7a1d3e932656954","date":"2018-01-07T13:06:14Z","author_date":"2018-01-07T13:06:14Z","committer_date":"2018-01-07T13:06:14Z","tree_sha":"5269a6dac83bdcdc462ebb6914a3bb4ba8514f78","message_first_line":"cam should be initialized to zero matrix. Modify example images"},"tree_request_status":200,"tree_rate":{"github_remaining":"3297","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:184823A:1C6762D:6AB92898"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1120,"blob_sha":"c544b05ba7ed1c09e594fd4f8ffb97b4dc906659","priority":0}],"documents":[{"path":"README.md","size":1120,"blob_sha":"c544b05ba7ed1c09e594fd4f8ffb97b4dc906659","priority":0,"status":200,"text":"## Grad-CAM implementation in Pytorch ##\n\n### What makes the network think the image label is 'pug, pug-dog' and 'tabby, tabby cat':\n![Dog](https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/dog.jpg?raw=true) ![Cat](https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/cat.jpg?raw=true)\n\nGradient class activation maps are a visualization technique for deep learning networks.\n\nSee the paper: https://arxiv.org/pdf/1610.02391v1.pdf\n\nThe paper authors torch implementation: https://github.com/ramprs/grad-cam\n\nMy Keras implementation: https://github.com/jacobgil/keras-grad-cam\n\n\n----------\n\n\nThis uses VGG19 from torchvision. It will be downloaded when used for the first time.\n\nThe code can be modified to work with any model.\nHowever the VGG models in torchvision have features/classifier methods for the convolutional part of the network, and the fully connected part.\nThis code assumes that the model passed supports these two methods.\n\n\n----------\n\n\nUsage: `python grad-cam.py --image-path <path_to_image>`\n\nTo use with CUDA:\n`python grad-cam.py --image-path <path_to_image> --use-cuda`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E7E:17E138:174200:5C67D8:6AB92108"},"text_sha256":"567e5fb5a53606ca44af75b116b6255ac22d824b2813fd932f3993dee42e8faa"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3296","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0921:0AC4:127CC9F:15CBC39:6AB92899"},"commit":{"sha":"084273b3f30b54ad0c64cf8020a4337d979a66e0","url":"https://github.com/jacobgil/pytorch-grad-cam/commit/084273b3f30b54ad0c64cf8020a4337d979a66e0","date":"2026-06-14T03:41:33Z","author_date":"2026-06-14T03:41:33Z","committer_date":"2026-06-14T03:41:33Z","tree_sha":"71cb25510394ab4ab6c23b343ae0bc1151c5f63c","message_first_line":"fix: use NotImplementedError instead of generic Exception (#597)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3295","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:17E5408:1C04637:6AB92899"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20457,"blob_sha":"fc0f5868a6097355c42207327c44b80bef14d941","priority":0}],"documents":[{"path":"README.md","size":20457,"blob_sha":"fc0f5868a6097355c42207327c44b80bef14d941","priority":0,"status":200,"text":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![Build Status](https://github.com/jacobgil/pytorch-grad-cam/workflows/Tests/badge.svg)\n[![Downloads](https://static.pepy.tech/personalized-badge/grad-cam?period=month&units=international_system&left_color=black&right_color=brightgreen&left_text=Monthly%20Downloads)](https://pepy.tech/project/grad-cam)\n[![Downloads](https://static.pepy.tech/personalized-badge/grad-cam?period=total&units=international_system&left_color=black&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/grad-cam)\n\n# Advanced AI explainability for PyTorch\n\n`pip install grad-cam`\n\nDocumentation with advanced tutorials: [https://jacobgil.github.io/pytorch-gradcam-book](https://jacobgil.github.io/pytorch-gradcam-book)\n\n\nThis is a package with state of the art methods for Explainable AI for computer vision.\nThis can be used for diagnosing model predictions, either in production or while\ndeveloping models.\nThe aim is also to serve as a benchmark of algorithms and metrics for research of new explainability methods.\n\n⭐ Comprehensive collection of Pixel Attribution methods for Computer Vision.\n\n⭐ Tested on many Common CNN Networks and Vision Transformers.\n\n⭐ Advanced use cases: Works with Classification, Object Detection, Semantic Segmentation, Embedding-similarity and more.\n\n⭐ Includes smoothing methods to make the CAMs look nice.\n\n⭐ High performance: full support for batches of images in all methods.\n\n⭐ Includes metrics for checking if you can trust the explanations, and tuning them for best performance.\n\n\n![visualization](https://github.com/jacobgil/jacobgil.github.io/blob/master/assets/cam_dog.gif?raw=true\n)\n\n| Method              | What it does                                                                                                                |\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| GradCAM             | Weight the 2D activations by the average gradient                                                                           |\n| HiResCAM            | Like GradCAM but element-wise multiply the activations with the gradients; provably guaranteed faithfulness for certain models |\n| GradCAMElementWise  | Like GradCAM but element-wise multiply the activations with the gradients then apply a ReLU operation before summing        |\n| GradCAM++           | Like GradCAM but uses second order gradients                                                                                |\n| XGradCAM            | Like GradCAM but scale the gradients by the normalized activations                                                          |\n| AblationCAM         | Zero out activations and measure how the output drops (this repository includes a fast batched implementation)              |\n| ScoreCAM            | Perbutate the image by the scaled activations and measure how the output drops                                              |\n| EigenCAM            | Takes the first principle component of the 2D Activations (no class discrimination, but seems to give great results)        |\n| EigenGradCAM        | Like EigenCAM but with class discrimination: First principle component of Activations*Grad. Looks like GradCAM, but cleaner |\n| LayerCAM            | Spatially weight the activations by positive gradients. Works better especially in lower layers                             |\n| FullGrad            | Computes the gradients of the biases from all over the network, and then sums them                                          |\n| Deep Feature Factorizations           | Non Negative Matrix Factorization on the 2D activations                                                   |\n| KPCA-CAM            | Like EigenCAM but with Kernel PCA instead of PCA                                                                            |            \n| FEM                 | A gradient free method that binarizes activations by an activation > mean + k * std rule.                                   |\n| ShapleyCAM          | Weight the activations using the gradient and Hessian-vector product.|\n| FinerCAM                |  Improves fine-grained classification by comparing similar classes, suppressing shared features and highlighting discriminative details.    |\n| SegEigenCAM         | Like EigenCAM but with gradient weighting (absolute gradients ⊙ activations) before SVD and sign correction to fix SVD sign ambiguity; designed for semantic segmentation |\n| RefineCAM         | A meta-method that computes a CAM at multiple layers, and then it combines them to ubtain a higher resolution and better focused CAM. It can be used with any of the other CAM methods. |\n## Visual Examples\n\n| What makes the network think the image label is 'pug, pug-dog' | What makes the network think the image label is 'tabby, tabby cat' | Combining Grad-CAM with Guided Backpropagation for the 'pug, pug-dog' class |\n| ---------------------------------------------------------------|--------------------|-----------------------------------------------------------------------------|\n <img src=\"https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/dog.jpg?raw=true\" width=\"256\" height=\"256\"> | <img src=\"https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/cat.jpg?raw=true\" width=\"256\" height=\"256\"> | <img src=\"https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/cam_gb_dog.jpg?raw=true\" width=\"256\" height=\"256\"> |\n\n## Object Detection and Semantic Segmentation\n| Object Detection | Semantic Segmentation |\n| -----------------|-----------------------|\n| <img src=\"./examples/both_detection.png\" width=\"256\" height=\"256\"> | <img src=\"./examples/cars_segmentation.png\" width=\"256\" height=\"200\"> |\n\n| 3D Medical Semantic Segmentation |\n| -------------------------- |\n| <img src=\"./examples/multiorgan_segmentation.gif\" width=\"539\">|\n\n## Explaining similarity to other images / embeddings\n<img src=\"./examples/embeddings.png\">\n\n## Deep Feature Factorization\n<img src=\"./examples/dff1.png\">\n<img src=\"./examples/dff2.png\">\n\n## CLIP\n| Explaining the text prompt \"a dog\" | Explaining the text prompt \"a cat\" |\n| -----------------------------------|------------------------------------|\n <img src=\"https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/clip_dog.jpg?raw=true\" width=\"256\" height=\"256\"> | <img src=\"https://github.com/jacobgil/pytorch-grad-cam/blob/master/examples/clip_cat.jpg?raw=true\" width=\"256\" height=\"256\"> |\n\n## Classification\n\n#### Resnet50:\n| Category  | Image | GradCAM  |  AblationCAM |  ScoreCAM |\n| ---------|-------|----------|------------|------------|\n| Dog    | ![](./examples/dog_cat.jfif) | ![](./examples/resnet50_dog_gradcam_cam.jpg)     |  ![](./examples/resnet50_dog_ablationcam_cam.jpg)   |![](./examples/resnet50_dog_scorecam_cam.jpg)   |\n| Cat    | ![](./examples/dog_cat.jfif?raw=true) | ![](./examples/resnet50_cat_gradcam_cam.jpg?raw=true)     |  ![](./examples/resnet50_cat_ablationcam_cam.jpg?raw=true)   |![](./examples/resnet50_cat_scorecam_cam.jpg)   |\n\n#### Vision Transfomer (Deit Tiny):\n| Category  | Image | GradCAM  |  AblationCAM |  ScoreCAM |\n| ---------|-------|----------|------------|------------|\n| Dog    | ![](./examples/dog_cat.jfif) | ![](./examples/vit_dog_gradcam_cam.jpg)     |  ![](./examples/vit_dog_ablationcam_cam.jpg)   |![](./examples/vit_dog_scorecam_cam.jpg)   |\n| Cat    | ![](./examples/dog_cat.jfif) | ![](./examples/vit_cat_gradcam_cam.jpg)     |  ![](./examples/vit_cat_ablationcam_cam.jpg)   |![](./examples/vit_cat_scorecam_cam.jpg)   |\n\n#### Swin Transfomer (Tiny window:7 patch:4 input-size:224):\n| Category  | Image | GradCAM  |  AblationCAM |  ScoreCAM |\n| ---------|-------|----------|------------|------------|\n| Dog    | ![](./examples/dog_cat.jfif) | ![](./examples/swinT_dog_gradcam_cam.jpg)     |  ![](./examples/swinT_dog_ablationcam_cam.jpg)   |![](./examples/swinT_dog_scorecam_cam.jpg)   |\n| Cat    | ![](./examples/dog_cat.jfif) | ![](./examples/swinT_cat_gradcam_cam.jpg)     |  ![](./examples/swinT_cat_ablationcam_cam.jpg)   |![](./examples/swinT_cat_scorecam_cam.jpg)   |\n\n\n# Metrics and Evaluation for XAI\n\n<img src=\"./examples/metrics.png\">\n<img src=\"./examples/road.png\">\n\n----------\n\n# Usage examples\n\n```python\nfrom pytorch_grad_cam import GradCAM, HiResCAM, ScoreCAM, GradCAMPlusPlus, AblationCAM, XGradCAM, EigenCAM, FullGrad\nfrom pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget\nfrom pytorch_grad_cam.utils.image import show_cam_on_image\nfrom torchvision.models import resnet50, ResNet50_Weights\n\nmodel = resnet50(weights=ResNet50_Weights.DEFAULT)\ntarget_layers = [model.layer4[-1]]\ninput_tensor = # Create an input tensor image for your model..\n# Note: input_tensor can be a batch tensor with several images!\n\n# We have to specify the target we want to generate the CAM for.\ntargets = [ClassifierOutputTarget(281)]\n\n# Construct the CAM object once, and then re-use it on many images.\nwith GradCAM(model=model, target_layers=target_layers) as cam:\n  # You can also pass aug_smooth=True and eigen_smooth=True, to apply smoothing.\n  grayscale_cam = cam(input_tensor=input_tensor, targets=targets)\n  # In this example grayscale_cam has only one image in the batch:\n  grayscale_cam = grayscale_cam[0, :]\n  visualization = show_cam_on_image(rgb_img, grayscale_cam, use_rgb=True)\n  # You can also get the model outputs without having to redo inference\n  model_outputs = cam.outputs\n```\n\n[cam.py](https://github.com/jacobgil/pytorch-grad-cam/blob/master/cam.py) has a more detailed usage example.\n\n----------\n# Choosing the layer(s) to extract activations from\nYou need to choose the target layer to compute the CAM for.\nSome common choices are:\n- FasterRCNN: model.backbone\n- Resnet18 and 50: model.layer4[-1]\n- VGG, densenet161 and mobilenet: model.features[-1]\n- mnasnet1_0: model.layers[-1]\n- ViT: model.blocks[-1].norm1\n- SwinT: model.layers[-1].blocks[-1].norm1\n\n\nIf you pass a list with several layers, the CAM will be averaged accross them.\nThis can be useful if you're not sure what layer will perform best.\n\n----------\n\n# Adapting for new architectures and tasks\n\nMethods like GradCAM were designed for and were originally mostly applied on classification models, \nand specifically CNN classification models.\nHowever you can also use this package on new architectures like Vision Transformers, and on non classification tasks like Object Detection or Semantic Segmentation.\n\nThe be able to adapt to non standard cases, we have two concepts.\n- The reshape transform - how do we convert activations to represent spatial images ?\n- The model targets - What exactly should the explainability method try to explain ?\n\n## The reshape_transform argument\nIn a CNN the intermediate activations in the model are a mult-channel image that have the dimensions channel x rows x cols,\nand the various explainabiltiy methods work with these to produce a new image.\n\nIn case of another architecture, like the Vision Transformer, the shape might be different, like (rows x cols + 1) x channels, or something else.\nThe reshape transform converts the activations back into a multi-channel image, for example by removing the class token in a vision transformer. \nFor examples, check [here](https://github.com/jacobgil/pytorch-grad-cam/blob/master/pytorch_grad_cam/utils/reshape_transforms.py)\n\n## The model_target argument\nThe model target is just a callable that is able to get the model output, and filter it out for the specific scalar output we want to explain.\n\nFor classification tasks, the model target will typically be the output from a specific category.\nThe `targets` parameter passed to the CAM method can then use `ClassifierOutputTarget`:\n```python\ntargets = [ClassifierOutputTarget(281)]\n```\n\nHowever for more advanced cases, you might want a different behaviour.\nCheck [here](https://github.com/jacobgil/pytorch-grad-cam/blob/master/pytorch_grad_cam/utils/model_targets.py) for more examples.\n\n----------\n\n# Tutorials\nHere you can find detailed examples of how to use this for various custom use cases like object detection:\n\nThese point to the new documentation jupter-book for fast rendering.\nThe jupyter notebooks themselves can be found under the tutorials folder in the git repository.\n\n- [Notebook tutorial: XAI Recipes for the HuggingFace 🤗 Image Classification Models](<https://jacobgil.github.io/pytorch-gradcam-book/HuggingFace.html>)\n\n- [Notebook tutorial: Deep Feature Factorizations for better model explainability](<https://jacobgil.github.io/pytorch-gradcam-book/Deep%20Feature%20Factorizations.html>)\n\n- [Notebook tutorial: Class Activation Maps for Object Detection with Faster-RCNN](<https://jacobgil.github.io/pytorch-gradcam-book/Class%20Activation%20Maps%20for%20Object%20Detection%20With%20Faster%20RCNN.html>)\n\n- [Notebook tutorial: Class Activation Maps for YOLO5](<https://jacobgil.github.io/pytorch-gradcam-book/EigenCAM%20for%20YOLO5.html>)\n\n- [Notebook tutorial: Class Activation Maps for Semantic Segmentation](<https://jacobgil.github.io/pytorch-gradcam-book/Class%20Activation%20Maps%20for%20Semantic%20Segmentation.html>)\n\n- [Notebook tutorial: Adapting pixel attribution methods for embedding outputs from models](<https://jacobgil.github.io/pytorch-gradcam-book/Pixel%20Attribution%20for%20embeddings.html>)\n\n- [Notebook tutorial: May the best explanation win. CAM Metrics and Tuning](<https://jacobgil.github.io/pytorch-gradcam-book/CAM%20Metrics%20And%20Tuning%20Tutorial.html>)\n\n- [How it works with Vision/SwinT transformers](tutorials/vision_transformers.md)\n\n\n----------\n\n# Guided backpropagation\n\n```python\nfrom pytorch_grad_cam import GuidedBackpropReLUModel\nfrom pytorch_grad_cam.utils.image import (\n    show_cam_on_image, deprocess_image, preprocess_image\n)\ngb_model = GuidedBackpropReLUModel(model=model, device=model.device())\ngb = gb_model(input_tensor, target_category=None)\n\ncam_mask = cv2.merge([grayscale_cam, grayscale_cam, grayscale_cam])\ncam_gb = deprocess_image(cam_mask * gb)\nresult = deprocess_image(gb)\n```\n\n----------\n\n# Metrics and evaluating the explanations\n\n```python\nfrom pytorch_grad_cam.utils.model_targets import ClassifierOutputSoftmaxTarget\nfrom pytorch_grad_cam.metrics.cam_mult_image import CamMultImageConfidenceChange\n# Create the metric target, often the confidence drop in a score of some category\nmetric_target = ClassifierOutputSoftmaxTarget(281)\nscores, batch_visualizations = CamMultImageConfidenceChange()(input_tensor, \n  inverse_cams, targets, model, return_visualization=True)\nvisualization = deprocess_image(batch_visualizations[0, :])\n\n# State of the art metric: Remove and Debias\nfrom pytorch_grad_cam.metrics.road import ROADMostRelevantFirst, ROADLeastRelevantFirst\ncam_metric = ROADMostRelevantFirst(percentile=75)\nscores, perturbation_visualizations = cam_metric(input_tensor, \n  grayscale_cams, targets, model, return_visualization=True)\n\n# You can also average across different percentiles, and combine\n# (LeastRelevantFirst - MostRelevantFirst) / 2\nfrom pytorch_grad_cam.metrics.road import ROADMostRelevantFirstAverage,\n                                          ROADLeastRelevantFirstAverage,\n                                          ROADCombined\ncam_metric = ROADCombined(percentiles=[20, 40, 60, 80])\nscores = cam_metric(input_tensor, grayscale_cams, targets, model)\n\n# You can also use aggregate metrics such as ARCC\nfrom pytorch_grad_cam.metrics.ARCC import ARCC\n\ncam_metric = ARCC(base_method=cam)\narcc_score = cam_metric(input_tensor, grayscale_cams, targets, model)\n```\n\n\n# Smoothing to get nice looking CAMs\n\nTo reduce noise in the CAMs, and make it fit better on the objects,\ntwo smoothing methods are supported:\n\n- `aug_smooth=True`\n\n  Test time augmentation: increases the run time by x6.\n\n  Applies a combination of horizontal flips, and mutiplying the image\n  by [1.0, 1.1, 0.9].\n\n  This has the effect of better centering the CAM around the objects.\n\n\n- `eigen_smooth=True`\n\n  First principle component of `activations*weights`\n\n  This has the effect of removing a lot of noise.\n\n\n|AblationCAM | aug smooth | eigen smooth | aug+eigen smooth|\n|------------|------------|--------------|--------------------|\n![](./examples/nosmooth.jpg) | ![](./examples/augsmooth.jpg) | ![](./examples/eigensmooth.jpg) | ![](./examples/eigenaug.jpg) | \n\n----------\n\n# Running the example script:\n\nUsage: `python cam.py --image-path <path_to_image> --method <method> --output-dir <output_dir_path> `\n\n\nTo use with a specific device, like cpu, cuda, cuda:0, mps or hpu:\n`python cam.py --image-path <path_to_image> --device cuda  --output-dir <output_dir_path> `\n\n----------\n\nYou can choose between:\n\n`GradCAM` , `HiResCAM`, `ScoreCAM`, `GradCAMPlusPlus`, `AblationCAM`, `XGradCAM` , `LayerCAM`, `FullGrad`, `EigenCAM`, `ShapleyCAM`, `FinerCAM`, `SegEigenCAM` and `RefineCAM`.\n\nSome methods like ScoreCAM and AblationCAM require a large number of forward passes,\nand have a batched implementation.\n\nYou can control the batch size with\n`cam.batch_size = `\n\n----------\n\n## Citation\nIf you use this for research, please cite. Here is an example BibTeX entry:\n\n```\n@misc{jacobgilpytorchcam,\n  title={PyTorch library for CAM methods},\n  author={Jacob Gildenblat and contributors},\n  year={2021},\n  publisher={GitHub},\n  howpublished={\\url{https://github.com/jacobgil/pytorch-grad-cam}},\n}\n```\n\n----------\n\n# References\nhttps://arxiv.org/abs/1610.02391 <br>\n`Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization\nRamprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, Dhruv Batra`\n\nhttps://arxiv.org/abs/2011.08891 <br>\n`Use HiResCAM instead of Grad-CAM for faithful explanations of convolutional neural networks\nRachel L. Draelos, Lawrence Carin`\n\nhttps://arxiv.org/abs/1710.11063 <br>\n`Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks\nAditya Chattopadhyay, Anirban Sarkar, Prantik Howlader, Vineeth N Balasubramanian`\n\nhttps://arxiv.org/abs/1910.01279 <br>\n`Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks\nHaofan Wang, Zifan Wang, Mengnan Du, Fan Yang, Zijian Zhang, Sirui Ding, Piotr Mardziel, Xia Hu`\n\nhttps://ieeexplore.ieee.org/abstract/document/9093360/ <br>\n`Ablation-cam: Visual explanations for deep convolutional network via gradient-free localization.\nSaurabh Desai and Harish G Ramaswamy. In WACV, pages 972–980, 2020`\n\nhttps://arxiv.org/abs/2008.02312 <br>\n`Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs\nRuigang Fu, Qingyong Hu, Xiaohu Dong, Yulan Guo, Yinghui Gao, Biao Li`\n\nhttps://arxiv.org/abs/2008.00299 <br>\n`Eigen-CAM: Class Activation Map using Principal Components\nMohammed Bany Muhammad, Mohammed Yeasin`\n\nhttp://mftp.mmcheng.net/Papers/21TIP_LayerCAM.pdf <br>\n`LayerCAM: Exploring Hierarchical Class Activation Maps for Localization\nPeng-Tao Jiang; Chang-Bin Zhang; Qibin Hou; Ming-Ming Cheng; Yunchao Wei`\n\nhttps://arxiv.org/abs/1905.00780 <br>\n`Full-Gradient Representation for Neural Network Visualization\nSuraj Srinivas, Francois Fleuret`\n\nhttps://arxiv.org/abs/1806.10206 <br>\n`Deep Feature Factorization For Concept Discovery\nEdo Collins, Radhakrishna Achanta, Sabine Süsstrunk`\n\nhttps://arxiv.org/abs/2410.00267 <br>\n`KPCA-CAM: Visual Explainability of Deep Computer Vision Models using Kernel PCA\nSachin Karmani, Thanushon Sivakaran, Gaurav Prasad, Mehmet Ali, Wenbo Yang, Sheyang Tang`\n\nhttps://hal.science/hal-02963298/document <br>\n`Features Understanding in 3D CNNs for Actions Recognition in Video\nKazi Ahmed Asif Fuad, Pierre-Etienne Martin, Romain Giot, Romain\nBourqui, Jenny Benois-Pineau, Akka Zemmar`\n\nhttps://arxiv.org/abs/2501.06261 <br>\n`CAMs as Shapley Value-based Explainers\nHuaiguang Cai`\n\n\nhttps://arxiv.org/pdf/2501.11309 <br>\n`Finer-CAM : Spotting the Difference Reveals Finer Details for Visual Explanation`    \n`Ziheng Zhang*, Jianyang Gu*, Arpita Chowdhury, Zheda Mai, David Carlyn,Tanya Berger-Wolf, Yu Su, Wei-Lun Chao`\n\n\nhttps://doi.org/10.3390/app15137562 <br>\n`Seg-Eigen-CAM: Eigen-Value-Based Visual Explanations for Semantic Segmentation Models\nChing-Ting Chung, Josh Jia-Ching Ying`\n\n\nhttps://arxiv.org/abs/2605.14641 <br>\n`How to Evaluate and Refine your CAM`\n`Luca Domeniconi, Alessandra Stramiglio, Michele Lombardi, Samuele Salti`","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CD76:3FA0D:1722EE:5C48C0:6AB92103"},"text_sha256":"372f1fff460c56dbd591340f0f83b77bf1106bb47d92b47147934e8aacfd075c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"chenyuntc/pytorch-book","input_row":{"repository":"chenyuntc/pytorch-book","url":"https://github.com/chenyuntc/pytorch-book","name":"pytorch-book","owner":"chenyuntc","description":"PyTorch tutorials and fun projects including neural talk, neural style, poem writing, anime generation (《深度学习框架PyTorch：入门与实战》)","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":12846,"issues":219,"created_at":"2017-05-24T07:49:38Z","updated_at":"2026-09-27T14:08:44Z","first_commit_at":"2017-11-28T15:06:17Z","last_commit_at":"2022-08-14T09:21:29Z","activity_months":56.5,"ai_ml_match_topics":"deep-learning; image-classification","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:50.735Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"chenyuntc/pytorch-book","visibility":"public","created_at":"2017-05-24T07:49:38Z","updated_at":"2026-09-27T14:08:44Z","private":false,"fork":false,"archived":false,"stargazers_count":12846,"open_issues_count":133,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3294","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D0:72BD3:17E04D1:1BFF514:6AB9289A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3293","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:179193C:1BB0A0D:6AB9289B"},"commit":{"sha":"86ee77842f5e40d7396a2f57bc334a8b585aa7ba","url":"https://github.com/chenyuntc/pytorch-book/commit/86ee77842f5e40d7396a2f57bc334a8b585aa7ba","date":"2018-04-29T03:25:37Z","author_date":"2018-04-29T03:25:37Z","committer_date":"2018-04-29T03:25:37Z","tree_sha":"5b192f152ed486cb2f504c7101186828af1b5b8e","message_first_line":"update chapter2 to v0.4"},"tree_request_status":200,"tree_rate":{"github_remaining":"3292","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F4:6E429:17C8B34:1BE7B2E:6AB9289B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5942,"blob_sha":"40dd34112438d25a54f0c5398b55ff5e171b04e1","priority":0}],"documents":[{"path":"README.md","size":5942,"blob_sha":"40dd34112438d25a54f0c5398b55ff5e171b04e1","priority":0,"status":200,"text":"这是书籍《深度学习框架PyTorch：入门与实践》的对应代码，但是也可以作为一个独立的PyTorch入门指南和教程。\n\n\n## 内容\n\n该书（教程/仓库）的内容如图所示：\n![思维导图](http://7zh43r.com2.z0.glb.clouddn.com/del/mindmap.png)\n\n可以看出本教程可以分为两部分：\n\n**基础部分**（前五章）讲解PyTorch内容，这部份介绍了PyTorch中主要的的模块，和深度学习中常用的一些工具。对于这部分内容，这里利用Jupyter Notebook作为教学工具，读者可以结合notebook修改运行，反复实验。\n\n- 第二章介绍如何安装PyTorch和配置学习环境。同时提供了一个快速入门教程，基于官方的教程简化并更新内容，读者可以花费大约1到2小时的时间快速完成入门任务，而后根据需求再选择深入阅读后续相关章节的内容。\n- 第三章介绍了PyTorch中多维数组Tensor和动态图autograd/Variable的使用，并配以例子，让读者分别使用Tensor和autograd实现线性回归，比较二者的不同点。除了介绍这二者的基础使用之外，本章还对Tensor的底层设计，以及autograd的计算图原理进行比较深入分析，希望能使得读者能对这些底层知识有更全面的掌握。\n- 第四章介绍了PyTorch中神经网络模块nn的基础用法，同时讲解了神经网络中“层”，“损失函数”，“优化器”等，最后带领读者用不到50行的代码搭建出曾夺得ImageNet冠军的ResNet。\n- 第五章介绍了PyTorch中数据加载，GPU加速，持久化和可视化等相关工具。\n\n**实战部分**（第六到十章）利用PyTorch实现了几个酷炫有趣的应用，对于这部分的内容，本仓库给出完整的实现代码，并提供预训练好的模型作为demo，供读者测试。\n\n- 第六章是承上启下的一章，这一章的目标不是教会读者新函数，新知识，而是结合Kaggle中一个经典的比赛，实现一个深度学习中比较简单的图像二分类问题。在实现过程中，带领读者复习前五章的知识，并提出代码规范以合理的组织程序，代码，使得程序更加可读，可维护。第六章还介绍了在PyTorch中如何进行debug。\n- 第七章为读者讲解了当前最火爆的生成对抗网络（GAN），带领读者从头实现一个动漫头像生成器，能够利用GAN生成风格多变的动漫头像。\n- 第八章为读者讲解了风格迁移的相关知识，并带领读者实现风格迁移网络，将自己的照片变成高大上的名画。\n- 第九章为读者讲解了一些自然语言处理的基础知识，并讲解了CharRNN的原理。而后利用收集了几万首唐诗，训练出了一个可以自动写诗歌的小程序。这个小程序可以控制生成诗歌的**格式**，**意境**，还能生成**藏头诗**。\n- 第十章为读者介绍了图像描述任务，并以最新的AI Challenger比赛的数据为例，带领读者实现了一个可以进行简单图像描述的的小程序。\n- 第十一章（**新增，实验性**） 由[Diamondfan](https://github.com/Diamondfan) 编写的语音识别。完善了本项目（本项目已囊括图像，文本，语音三大领域的例子）。\n\n\n **Notebook中的文字描述内容属于本书的初稿，有描述不通顺，错别字之处还请谅解**。本打算删除notebook中描述的内容，只留下代码，但为了方便读者阅读学习，最终还是决定留下。 我会抽空根据书中内容逐字校对这部分内容，但并不对此并不提供具体时间点。\n\n## 是否需要买书\n\n书**不是必要的**，这个仓库包含书中50%以上的文字内容，90%以上的代码，尤其是前几章入门内容，几乎是完全保留了书中的讲解内容。读者即使不买书也能正常使用本教程。\n\n如果你觉得纸质书的优势吸引你，不妨小破费一笔，支持一下作者这大半年来的工作。同时为了尽可能的方便读者，笔者还专门开通腾讯云的服务，用以保存教程中用到的部分模型，预处理的数据和部分大文件。\n\n## 代码说明\n\n- 教程代码同时在Python2和Python3下测试通过\n- 实战部分代码还同时在GPU和CPU环境下测试通过\n- ~~所有的代码都是基于最新版的PyTorch 0.2.0~~，本人承诺会至少维护代码更新兼容到PyTorch `0.4`\n\n目前前五章的代码已经更新到PyTorch 0.3.0 , 如果你想在PyTorch 0.2.0下运行,请 \n```\ngit checkout v0.2\n```\n\n如果有任何不当，或者有待改进的地方，欢迎读者开issue讨论，或者提交pull request。\n\n## 环境配置\n\n1. 安装[PyTorch](http://pytorch.org)，请从官网选择指定的版本安装即可，一键安装（即使你使用anaconda，也建议使用pip）。更多的安装方式请参阅书中说明。\n\n2. 克隆仓库\n\n   ```python\n   git clone https://github.com/chenyuntc/PyTorch-book.git\n   ```\n\n3. 安装第三方依赖包\n\n   ```python\n   cd pytorch-book && pip install -r requirements.txt\n   ```\n\n## Visdom打不开及其解决方案\n**新版的visdom已经解决了这个问题,只需要升级即可**\n```\npip install --upgrade visdom\n```\n之前的[解决方案](https://github.com/chenyuntc/pytorch-book/blob/2c8366137b691aaa8fbeeea478cc1611c09e15f5/README.md#visdom%E6%89%93%E4%B8%8D%E5%BC%80%E5%8F%8A%E5%85%B6%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88) 不再需要，已删除。\n\n## ^_^\n\n有任何bug，解释不清楚的地方或者是困惑，欢迎开issue\n\n欢迎pull requests\n\nHappy Coding!\n\n![](http://img14.360buyimg.com/n1/jfs/t13339/32/2463730198/217483/e8148c6b/5a41277dNbd1470c1.jpg)\n\n- [京东购买链接](https://search.jd.com/Search?keyword=pytorch%20入门与实践&enc=utf-8&wq=pytorch%20入门与实践&pvid=8b0d91d7108845ad8cbaf596326f3eb3)\n- [当当购买链接](http://search.dangdang.com/?key=pytorch%20%C8%EB%C3%C5%D3%EB%CA%B5%BC%F9&act=input)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F078:7A4F8:17C1B2:5CE893:6AB92105"},"text_sha256":"c33d13d939a0ad5a59d005ac1650b164c5c0078f0c1d75e5af98abe4303b89d3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3291","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0922:1B4E7A:1791526:1BB056B:6AB9289C"},"commit":{"sha":"688951721d11cd3f92440801e1b68b65ae2e439f","url":"https://github.com/chenyuntc/pytorch-book/commit/688951721d11cd3f92440801e1b68b65ae2e439f","date":"2022-08-14T09:21:29Z","author_date":"2022-08-14T09:21:29Z","committer_date":"2022-08-14T09:21:29Z","tree_sha":"ca236c3ea5d2ffba37ae545d3df2822edccc3180","message_first_line":"update v2.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"3290","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0798:180242:17D96AD:1BF8680:6AB9289C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5623,"blob_sha":"36267cd8cc8571260b9c0c55a097d1364be33b84","priority":0}],"documents":[{"path":"README.md","size":5623,"blob_sha":"36267cd8cc8571260b9c0c55a097d1364be33b84","priority":0,"status":200,"text":"这是书籍《深度学习框架PyTorch：入门与实践（第2版）》的对应代码，但是也可以作为一个独立的PyTorch入门指南和教程。\n\n## 全新升级\n本书第2版基于第1版进行了全新升级，全书代码基于PyTorch 1.8版本进行编写，结合第一版广大读者的意见进行了全面更新，包含了基本使用、高级扩展以及实战应用三大模块。\n\n## 内容\n\n该书（教程/仓库）的内容如图所示：\n![思维导图](imgs/mindmap.jpeg)\n\n可以看出本教程可以分为三部分：\n\n**基本使用**（第2～5章）讲解PyTorch内容，这部份介绍了PyTorch中主要的的模块，和深度学习中常用的一些工具。对于这部分内容，这里利用Jupyter Notebook作为教学工具，读者可以结合notebook修改运行，反复实验。\n\n- 第2章介绍PyTorch的安装以及相关学习环境的配置。同时，本章以概要的方式介绍PyTorch的主要内容，帮助读者初步了解PyTorch。\n- 第3章介绍PyTorch中多维数组Tensor以及自动微分系统autograd的使用，举例说明如何使用Tensor和autograd实现线性回归，并对比它们的不同点。本章对Tensor的基本结构以及autograd的原理进行了分析，帮助读者更加全面地了解PyTorch的底层模块。\n- 第4章介绍PyTorch中神经网络模块nn的基本用法，讲解了神经网络中的层、激活函数、损失函数以及优化器等，在本章的最后带领读者使用不到50行代码实现经典的网络结构ResNet。\n- 第5章介绍PyTorch中的数据加载、预训练模型、可视化工具以及GPU加速等工具，合理地使用这些工具可以提高用户的编程效率。\n\n**高级扩展**（第6～8章）讲解PyTorch中的一些高级扩展，学习这部分内容可以帮助读者编写更加高效的程序。\n\n- 第6章介绍PyTorch中的向量化思想，主要包括广播法则、基本索引、高级索引以及爱因斯坦操作。在本章的最后带领读者使用向量化思想实现深度学习中的卷积操作、交并比、RoI Align以及反向Unique操作。\n- 第7章介绍PyTorch中的分布式操作。分布式计算和并行计算可以加速网络的训练过程，本章详细介绍了并行计算和分布式计算的基本原理，同时介绍了如何使用torch.distributed以及Horovod进行PyTorch的分布式训练。\n- 第8章介绍PyTorch中的CUDA扩展，带领读者使用CUDA实现Sigmoid函数。同时，本章对CUDA、NVIDIA-driver、cuDNN以及Python之间的关系进行了总结。\n\n**实战应用**（第9~13章）利用PyTorch实现了几个酷炫有趣的应用，对于这部分的内容，本仓库给出完整的实现代码，并提供预训练好的模型作为demo，供读者测试。\n\n- 第9章是承上启下的一章，目标不是教会读者新函数、新知识，而实结合Kaggle中的一个经典比赛，实现深度学习中最为简单的图像二分类问题。在实现的过程中，将带领读者复习前5章的知识，并帮助读者合理地组织程序和代码，使程序更加易读且更好维护。同时，本章介绍了如何在PyTorch中调试。\n- 第10章介绍生成对抗网络的基本原理，带领读者从零开始实现一个动漫头像生成器，能够利用生成对抗网络生成风格多变的动漫头像。\n- 第11章介绍自然语言处理的一些基本知识，详细介绍了CharRNN以及Transformer的基本原理。本章带领读者使用Transformer实现自动写诗，该程序可以模仿古人进行诗词的续写以及藏头诗的生成。\n- 第12章介绍风格迁移的基本原理，带领读者实现支持任意风格迁移的神经网络。通过该网络，读者可以将任意图片转换为名画的风格。\n- 第13章介绍目标检测的基本原理，带领读者实现单阶段、无锚框、无非极大值抑制的目标检测算法CenterNet。CenterNet的设计思路可以迁移到三维图像的目标检测、人体姿态估计以及目标追踪等经典的计算机视觉问题中。\n\n\n\n **Notebook中的文字描述内容及部分Markdown内容属于本书的初稿，可能存在有描述不通顺之处，还请谅解，后续作者会逐渐校正**。这部分内容与书籍保证了80%的一致性，但可能有部分语病语法问题，由于时间关系暂未完全校正，后续作者会逐渐更新。\n\n## 是否需要买书\n\n书**不是必要的**，这个仓库包含书中60%以上的文字内容，90%以上的代码，尤其是前几章入门内容，几乎是完全保留了书中的讲解内容。读者即使不买书也能正常使用本教程。\n\n如果你觉得你更喜欢纸质版的阅读体验，并想留下一本印刷精美、完全彩印的书籍方便翻阅，不妨小破费一笔，支持一下作者近一年以来的工作～\n\n## 代码说明\n\n代码主要在python3+PyTorch1.6~1.8下测试得到最终结果，python2暂未测试，更新版本的PyTorch暂未测试。\n\n如果有任何不当，或者有待改进的地方，欢迎开issue讨论，或者提交pull request。\n\n## 环境配置\n\n1. 安装[PyTorch](http://pytorch.org)，请从官网选择指定的版本安装即可，一键安装。更多的安装方式请参阅书中说明。\n\n2. 克隆仓库\n\n   ```python\n   git clone https://github.com/chenyuntc/PyTorch-book.git\n   ```\n\n## ^_^\n\n有任何bug，解释不清楚的地方或者是困惑，欢迎开issue\n\n欢迎pull requests\n\nHappy Coding!\n\n![](imgs/book.jpeg)\n\n- [京东购买链接](https://item.jd.com/13324115.html)\n- [当当购买链接](http://product.dangdang.com/29429915.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B632:3E1DA:1731C2:5C586E:6AB9210E"},"text_sha256":"8191cc9013d06a60c7bf32bd684a947ef531edcf7aa7a114e1318aeaa0545479"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"zalandoresearch/fashion-mnist","input_row":{"repository":"zalandoresearch/fashion-mnist","url":"https://github.com/zalandoresearch/fashion-mnist","name":"fashion-mnist","owner":"zalandoresearch","description":"A MNIST-like fashion product database. Benchmark :point_down: ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":12834,"issues":106,"created_at":"2017-08-25T12:05:15Z","updated_at":"2026-09-27T00:40:45Z","first_commit_at":"2017-08-25T12:24:31Z","last_commit_at":"2022-03-21T13:01:52Z","activity_months":54.829999999999998,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:53.185Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"zalandoresearch/fashion-mnist","visibility":"public","created_at":"2017-08-25T12:05:15Z","updated_at":"2026-09-27T00:40:45Z","private":false,"fork":false,"archived":false,"stargazers_count":12834,"open_issues_count":34,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3289","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FF:71E0C:17D5DA0:1BF3C66:6AB9289D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3288","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0924:6C6ED:17D58F8:1BF44DD:6AB9289D"},"commit":{"sha":"770dda499f83cf21c2100062934b154cbaa153f8","url":"https://github.com/zalandoresearch/fashion-mnist/commit/770dda499f83cf21c2100062934b154cbaa153f8","date":"2018-05-21T03:50:15Z","author_date":"2018-05-21T03:50:15Z","committer_date":"2018-05-21T03:50:15Z","tree_sha":"59fe5bacd1b32969b587e2731575bf15c7b31d82","message_first_line":"Merge pull request #115 from heitorrapela/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3287","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:1791621:1BB0697:6AB9289D"},"tree_truncated":false,"document_candidates":[{"path":"README.ja.md","size":22297,"blob_sha":"b8a3034a05529466a44f2293c8621c59437a3010","priority":0},{"path":"README.md","size":20971,"blob_sha":"6d0775ae8c42530b47776f4454666c976af1d95c","priority":0},{"path":"README.zh-CN.md","size":21835,"blob_sha":"17495615ab50c90eb78b66e0b7eb57be4321ad39","priority":0}],"documents":[{"path":"README.ja.md","size":22297,"blob_sha":"b8a3034a05529466a44f2293c8621c59437a3010","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-EN](https://img.shields.io/badge/README-English-green.svg)](README.md)\n[![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n翻訳 : [(株)クラスキャット セールスインフォメーション](http://tensorflow.classcat.com/2017/08/28/tensorflow-fashion-mnist/)\n\n<details><summary>目次<\/summary><p>\n\n  * [何故でしょう？](#何故でしょう？)\n  * [データを取得する](#データを取得する)\n  * [使い方](#使い方)\n  * [ベンチマーク](#ベンチマーク)\n  * [可視化](#可視化)\n  * [貢献する](#貢献する)\n  * [接触](#接触)\n  * [引用Fashion-MNIST](#引用Fashion-MNIST)\n  * [License](#license)\n<\/p><\/details><p><\/p>\n\n\n60,000 サンプルの訓練セットと 10,000 サンプルのテストセットから成る、[Zalando](https://jobs.zalando.com/tech/) の記事の画像のデータセットです。各サンプルは 28×28 グレースケール画像で、10 クラスからのラベルと関連付けられています。`Fashion-MNIST` は、機械学習アルゴリズムのベンチマークのためのオリジナルの MNIST データセット の 直接的な差し込み式の (= drop-in) 置き換え としてサーブすることを意図しています。\n\nここにどのようにデータが見えるかのサンプルがあります (各クラスは３行取ります) :\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## 何故でしょう？\n   \nオリジナルの [MNIST](http://yann.lecun.com/exdb/mnist/) データセットは沢山の手書き数字を含みます。AI/ML/データサイエンス・コミュニティの人々はこのデータセットを好みそして彼らのアルゴリズムを検証するためのベンチマークとしてそれを使用します。実際に、MNIST はしばしば試してみる最初のデータセットです。「もしそれが MNIST で動作しなければ、まったく動作しないだろう」と彼らは言いました。「そうですね～、もし MNIST で動作するとしても、他の上では依然として失敗するかもしれませんが。」\n   \nFashion-MNIST は、機械学習アルゴリズムのベンチマークのためのオリジナルの MNIST データセットの直接的な差し込み式の (= drop-in) 置き換えとしてサーブすることを意図しています、というのはそれは同じ画像サイズでそして訓練及びテスト分割の構造を共有しているからです。\n\n### 真面目な機械学習研究者へ\n\n真面目な話し、MNIST を置き換えることについて話しをしています。幾つかの良い理由がここにあります :\n\n- **MNIST は簡単過ぎます。** [私たちの比較ベンチマーク](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/) と “[Most pairs of MNIST digits can be distinguished pretty well by just one pixel](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478)” を確かめてください。\n- **MNIST は使用され過ぎています。** “[Ian Goodfellow wants people to move away from mnist.](https://twitter.com/goodfellow_ian/status/852591106655043584)”を確かめてください。\n- **MNIST はモダンな CV タスクを表現できません。** “[François Cholle: Ideas on MNIST do not transfer to real CV.](https://twitter.com/fchollet/status/852594987527045120)” を確かめてください。\n\n## データを取得する\n[多くのMLライブラリ](#他の機械学習ライブラリを使用する)には既にFashion-MNISTデータ/ APIが含まれています。試してみてください！\n\nデータセットをダウンロードするためには直接リンクを使用することができます。データはオリジナルの [MNIST](http://yann.lecun.com/exdb/mnist/) データと同じフォーマットでストアされています。\n\n| 名前  | 内容 | サンプル | サイズ | リンク | MD5チェックサム|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | 訓練セット画像\t  | 60,000|26 MBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | 訓練セット・ラベル |60,000|29 KBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | テストセット画像  | 10,000|4.3 MBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | テストセット・ラベル  | 10,000| 5.1 KBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\nあるいはこのレポジトリを clone することもできます、データセットは `data/fashion` の下です。この repo はベンチーマークと可視化のための幾つかのスクリプトを含みます。\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### ラベル\n各訓練とテスト・サンプルは以下のラベル群の一つに割り当てられています :\n\n| ラベル | 記述 |\n| --- | --- |\n| 0 | T-shirt/top |\n| 1 | Trouser |\n| 2 | Pullover |\n| 3 | Dress |\n| 4 | Coat |\n| 5 | Sandal |\n| 6 | Shirt |\n| 7 | Sneaker |\n| 8 | Bag |\n| 9 | Ankle boot |\n\n## 使い方\n\n### Python ([NumPy](http://www.numpy.org/)が必要)でデータをロードする\n\nこの repo の `utils/mnist_reader` を使用する :\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### でデータをロードする\n\n[私たちのデータセットをダウンロードしてください](#データを取得する)ことを確認し、それを `data/fashion`の下に置きます。それ以外の場合、* Tensorflowは自動的に元のMNISTをダウンロードして使用します。 *\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\n### 他の機械学習ライブラリを使用する\n\n今日まで、以下のライブラリは、組み込みデータセットとして `Fashion-MNIST`を含んでいます。 したがって、自分で`Fashion-MNIST`をダウンロードする必要はありません。 そのAPIに従うだけで、あなたは準備が整いました。\n\n- [Apache MXNet Gluon](https://mxnet.incubator.apache.org/api/python/gluon/data.html)\n- [deeplearn.js](https://deeplearnjs.org/demos/model-builder/)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](http://pytorch.org/docs/master/torchvision/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/datasets/#fashion-mnist-database-of-fashion-articles)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/versions/r1.5/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://github.com/JuliaML/MLDatasets.jl)\n- [Chainer (latest)](https://docs.chainer.org/en/latest/reference/generated/chainer.datasets.get_fashion_mnist.html?highlight=fashion-mnist)\n\nようこそ私たちに参加して、各機械学習ライブラリ用の`Fashion-MNIST`のサポートを追加してください。\n\n\n### 他の言語でデータをロードする\n\n機械学習コミュニティでもっとも人気のあるデータセットの一つですので、人々は多くの言語で MNIST loader を実装してきています。それらは `Fashion-MNIST` データセットをロードするためにも使用できるでしょう (最初に decompress する必要があるかもしれません)。それらは私たちによってテストはされていないことには注意してください。\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist) and [this]((https://www.brine.io/fashion-mnist/train))\n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl) and [this](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760) and [this](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n\n\n## ベンチマーク\nscikit-learn ベースの自動ベンチマーキング・システムを構築しました、これは異なるパラメータの 129 の (深層学習ではない) 分類器をカバーします。 [結果はここで見つかります。](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/).\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\n結果は benchmark/runner.py を実行することで再現できます。推奨方法はこの docker コンテナをビルドして deploy することです (訳注 : リンク欠落)。[this Dockerfile](Dockerfile). \n\n貴方のベンチマークを submit することを歓迎します。新しい issue を作成してください、貴方の結果はここでリストされます。詳細は [contributor guidelines](https://github.com/zalandoresearch/fashion-mnist#contributing) セクションを確認してください。ベンチマークを submit する前に、このリストにリストされていなことを必ず確認してください。\n\n| 分類器 | 前処理\t | Fashion テスト精度| MNIST テスト精度 | Submitter| コード |\n| --- | --- | --- | --- | --- |--- |\n|2 Conv Layers with max pooling (Keras) | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv Layers with max pooling (Tensorflow) >300 epochs | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv Layers with max pooling and ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv Layers net | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv Layers net <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)|\n|2 Conv Layers 113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|2 Conv Layers with 3 FC 1.8M parameters| Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv Layers with 3 FC 500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv Layers+max pooling+dense+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)|\n|3 Conv Layers and 2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv Layers+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling and 2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)|\n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - \n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n\n\n### 他の探求\n\n#### [Fashion-MNIST on Google Scholar](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### Generative adversarial networks (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**Recommend to read!** Note how various GANs generate different results on Fashion-MNIST, which can not be easily observed on the original MNIST.)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [live demo of Generative Adversarial Network model with deeplearn.js](http://cognitivechaos.com/playground/fashion-gan/)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### クラスタリング\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n\n#### ビデオチュートリアル\n*Machine Learning Meets Fashion* by Yufeng G @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## 可視化\n\n### t-SNE on Fashion-MNIST (左) とオリジナルの MNIST (右)\n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA on Fashion-MNIST (左) とオリジナルの MNIST (右)\n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap) Fashion-MNIST (左) とオリジナルの MNIST (右) \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n## 貢献する\n\nThanks for your interest in contributing! There are many ways to get involved; start with our [contributor guidelines](/CONTRIBUTING.md) and then check these [open issues](https://github.com/zalandoresearch/fashion-mnist/issues) for specific tasks.\n\n## 接触\nTo discuss the dataset, please use [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link).\n\n## 引用Fashion-MNIST\nIf you use Fashion-MNIST in a scientific publication, we would appreciate references to the following paper:\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\nBiblatex entry:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[誰がFashion-MNISTを引用していますか？](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2DE:2C474:179D2A:5CC3BD:6AB92110"},"text_sha256":"66c105ed7ba0c2f269b5c8c21e378657c27e7549522cdeae684f87aad2cdb109"},{"path":"README.md","size":20971,"blob_sha":"6d0775ae8c42530b47776f4454666c976af1d95c","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md)\n[![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<details><summary>Table of Contents<\/summary><p>\n\n* [Why we made Fashion-MNIST](#why-we-made-fashion-mnist)\n* [Get the Data](#get-the-data)\n* [Usage](#usage)\n* [Benchmark](#benchmark)\n* [Visualization](#visualization)\n* [Contributing](#contributing)\n* [Contact](#contact)\n* [Citing Fashion-MNIST](#citing-fashion-mnist)\n* [License](#license)\n<\/p><\/details><p><\/p>\n\n\n`Fashion-MNIST` is a dataset of [Zalando](https://jobs.zalando.com/tech/)'s article images—consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. We intend `Fashion-MNIST` to serve as a direct **drop-in replacement** for the original [MNIST dataset](http://yann.lecun.com/exdb/mnist/) for benchmarking machine learning algorithms. It shares the same image size and structure of training and testing splits.\n\nHere's an example how the data looks (*each class takes three-rows*):\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## Why we made Fashion-MNIST\n\nThe original [MNIST dataset](http://yann.lecun.com/exdb/mnist/) contains a lot of handwritten digits. Members of the AI/ML/Data Science community love this dataset and use it as a benchmark to validate their algorithms. In fact, MNIST is often the first dataset researchers try. *\"If it doesn't work on MNIST, it **won't work** at all\"*, they said. *\"Well, if it does work on MNIST, it may still fail on others.\"* \n\n### To Serious Machine Learning Researchers\n\nSeriously, we are talking about replacing MNIST. Here are some good reasons:\n\n- **MNIST is too easy.** Convolutional nets can achieve 99.7% on MNIST. Classic machine learning algorithms can also achieve 97% easily. Check out [our side-by-side benchmark for Fashion-MNIST vs. MNIST](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/), and read \"[Most pairs of MNIST digits can be distinguished pretty well by just one pixel](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478).\"\n- **MNIST is overused.** In [this April 2017 Twitter thread](https://twitter.com/goodfellow_ian/status/852591106655043584), Google Brain research scientist and deep learning expert Ian Goodfellow calls for people to move away from MNIST.\n- **MNIST can not represent modern CV tasks**, as noted in [this April 2017 Twitter thread](https://twitter.com/fchollet/status/852594987527045120), deep learning expert/Keras author François Chollet.\n\n## Get the Data\n\n[Many ML libraries](#loading-data-with-other-machine-learning-libraries) already include Fashion-MNIST data/API, give it a try!\n\nYou can use direct links to download the dataset. The data is stored in the **same** format as the original [MNIST data](http://yann.lecun.com/exdb/mnist/).\n\n| Name  | Content | Examples | Size | Link | MD5 Checksum|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | training set images  | 60,000|26 MBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | training set labels  |60,000|29 KBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | test set images  | 10,000|4.3 MBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | test set labels  | 10,000| 5.1 KBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\nAlternatively, you can clone this GitHub repository; the dataset appears under `data/fashion`. This repo also contains some scripts for benchmark and visualization.\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### Labels\nEach training and test example is assigned to one of the following labels:\n\n| Label | Description |\n| --- | --- |\n| 0 | T-shirt/top |\n| 1 | Trouser |\n| 2 | Pullover |\n| 3 | Dress |\n| 4 | Coat |\n| 5 | Sandal |\n| 6 | Shirt |\n| 7 | Sneaker |\n| 8 | Bag |\n| 9 | Ankle boot |\n\n## Usage\n\n### Loading data with Python (requires [NumPy](http://www.numpy.org/))\n\nUse `utils/mnist_reader` in this repo:\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### Loading data with Tensorflow\nMake sure you have [downloaded the data](#get-the-data) and placed it in `data/fashion`. Otherwise, *Tensorflow will download and use the original MNIST.*\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\nNote, Tensorflow (master ver.) supports passing in a source url to the `read_data_sets`. You may use: \n```python\ndata = input_data.read_data_sets('data/fashion', source_url='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/')\n```\n\n### Loading data with other machine learning libraries \nTo date, the following libraries have included `Fashion-MNIST` as a built-in dataset. Therefore, you don't need to download `Fashion-MNIST` by yourself. Just follow their API and you are ready to go.\n\n- [Apache MXNet Gluon](https://mxnet.incubator.apache.org/api/python/gluon/data.html)\n- [deeplearn.js](https://deeplearnjs.org/demos/model-builder/)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](http://pytorch.org/docs/master/torchvision/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/datasets/#fashion-mnist-database-of-fashion-articles)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/versions/r1.5/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://github.com/JuliaML/MLDatasets.jl)\n- [Chainer (latest)](https://docs.chainer.org/en/latest/reference/generated/chainer.datasets.get_fashion_mnist.html?highlight=fashion-mnist)\n\nYou are welcome to make pull requests to other open-source machine learning packages, improving their support to `Fashion-MNIST` dataset.\n\n### Loading data with other languages\n\nAs one of the Machine Learning community's most popular datasets, MNIST has inspired people to implement loaders in many different languages. You can use these loaders with the `Fashion-MNIST` dataset as well. (Note: may require decompressing first.) To date, we haven't yet tested all of these loaders with Fashion-MNIST.\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist) and [this]((https://www.brine.io/fashion-mnist/train))\n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl) and [this](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760) and [this](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n\n\n## Benchmark\nWe built an automatic benchmarking system based on `scikit-learn` that covers 129 classifiers (but no deep learning) with different parameters. [Find the results here](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/).\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\nYou can reproduce the results by running `benchmark/runner.py`. We recommend building and deploying [this Dockerfile](Dockerfile). \n\nYou are welcome to submit your benchmark; simply create a new issue and we'll list your results here. Before doing that, please make sure it does not already appear [in this list](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/). Visit our [contributor guidelines](https://github.com/zalandoresearch/fashion-mnist#contributing) for additional details.\n\nThe table below collects the submitted benchmarks. Note that **we haven't yet tested these results**. You are welcome to validate the results using the code provided by the submitter. Test accuracy may differ due to the number of epoch, batch size, etc. To correct this table, please create a new issue.\n\n| Classifier | Preprocessing | Fashion test accuracy | MNIST test accuracy | Submitter| Code |\n| --- | --- | --- | --- | --- |--- |\n|2 Conv Layers with max pooling (Keras) | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv Layers with max pooling (Tensorflow) >300 epochs | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv Layers with max pooling and ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv Layers net | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv Layers net <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)|\n|2 Conv Layers 113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|2 Conv Layers with 3 FC 1.8M parameters | Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv Layers with 3 FC 500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv Layers+max pooling+dense+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)| \n|3 Conv Layers and 2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv Layers+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling and 2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)| \n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - |\n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n\n\n### Other Explorations of Fashion-MNIST\n\n#### [Fashion-MNIST on Google Scholar](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### Generative adversarial networks (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**Recommend to read!** Note how various GANs generate different results on Fashion-MNIST, which can not be easily observed on the original MNIST.)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [live demo of Generative Adversarial Network model with deeplearn.js](http://cognitivechaos.com/playground/fashion-gan/)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### Clustering\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n#### Video Tutorial\n*Machine Learning Meets Fashion* by Yufeng G @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## Visualization\n\n### t-SNE on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap) on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n\n## Contributing\n\nThanks for your interest in contributing! There are many ways to get involved; start with our [contributor guidelines](/CONTRIBUTING.md) and then check these [open issues](https://github.com/zalandoresearch/fashion-mnist/issues) for specific tasks.\n\n## Contact\nTo discuss the dataset, please use [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link).\n\n## Citing Fashion-MNIST\nIf you use Fashion-MNIST in a scientific publication, we would appreciate references to the following paper:\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\nBiblatex entry:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[Who is citing Fashion-MNIST?](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A414:17E138:174237:5C68A7:6AB92106"},"text_sha256":"f5e87e6b62b59e8bad7e9b7ec07385862f1a605b48e63e52cb2366048cba54d6"},{"path":"README.zh-CN.md","size":21835,"blob_sha":"17495615ab50c90eb78b66e0b7eb57be4321ad39","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-EN](https://img.shields.io/badge/README-English-green.svg)](README.md)\n[![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<details><summary>目录<\/summary><p>\n\n* [为什么要做这个数据集？](#为什么要做这个数据集？)\n* [获取数据](#获取数据)\n* [如何载入数据？](#如何载入数据？)\n* [基准测试](#基准测试)\n* [数据可视化](#数据可视化)\n* [参与贡献](#参与贡献)\n* [联系](#联系)\n* [在论文中引用Fashion-MNIST](#在论文中引用Fashion-MNIST)\n* [License](#license)\n\n<\/p><\/details><p><\/p>\n\n\n`Fashion-MNIST`是一个替代[MNIST手写数字集](http://yann.lecun.com/exdb/mnist/)的图像数据集。 它是由Zalando（一家德国的时尚科技公司）旗下的[研究部门](https://research.zalando.com/)提供。其涵盖了来自10种类别的共7万个不同商品的正面图片。Fashion-MNIST的大小、格式和训练集/测试集划分与原始的MNIST完全一致。60000/10000的训练测试数据划分，28x28的灰度图片。你可以直接用它来测试你的机器学习和深度学习算法性能，且**不需要**改动任何的代码。\n\n这个数据集的样子大致如下（每个类别占三行）：\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## 为什么要做这个数据集？\n\n[经典的MNIST数据集](http://yann.lecun.com/exdb/mnist/)包含了大量的手写数字。十几年来，来自机器学习、机器视觉、人工智能、深度学习领域的研究员们把这个数据集作为衡量算法的基准之一。你会在很多的会议，期刊的论文中发现这个数据集的身影。实际上，MNIST数据集已经成为算法作者的必测的数据集之一。有人曾调侃道：*\"如果一个算法在MNIST不work, 那么它就根本没法用；而如果它在MNIST上work, 它在其他数据上也可能不work！\"*\n \n\n`Fashion-MNIST`的目的是要成为MNIST数据集的一个直接替代品。作为算法作者，你不需要修改任何的代码，就可以直接使用这个数据集。`Fashion-MNIST`的图片大小，训练、测试样本数及类别数与经典MNIST**完全相同**。\n\n### 写给专业的机器学习研究者\n\n我们是认真的。取代MNIST数据集的原因由如下几个：\n\n- **MNIST太简单了。** 很多深度学习算法在测试集上的准确率已经达到99.6%！不妨看看[我们基于scikit-learn上对经典机器学习算法的评测](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/) 和这段代码： [\"Most pairs of MNIST digits can be distinguished pretty well by just one pixel\"（翻译：大多数MNIST只需要一个像素就可以区分开！）](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478)\n- **MNIST被用烂了。** 参考：[\"Ian Goodfellow wants people to move away from mnist\"（翻译：Ian Goodfellow希望人们不要再用MNIST了。）](https://twitter.com/goodfellow_ian/status/852591106655043584)\n- **MNIST数字识别的任务不代表现代机器学习。** 参考：[\"François Cholle: Ideas on MNIST do not transfer to real CV\" （翻译：在MNIST上看似有效的想法没法迁移到真正的机器视觉问题上。）](https://twitter.com/fchollet/status/852592598128615424)\n\n## 获取数据\n\n[很多的机器学习库](#使用其它机器学习库)已经内置了Fashion-MNIST数据或接口，方便你直接使用。\n\n\n你可以使用以下链接下载这个数据集。`Fashion-MNIST`的数据集的存储方式和命名与[经典MNIST数据集](http://yann.lecun.com/exdb/mnist/)完全一致。\n\n| 名称  | 描述 | 样本数量 | 文件大小 | 链接 | MD5校验和|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | 训练集的图像  | 60,000|26 MBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | 训练集的类别标签  |60,000|29 KBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | 测试集的图像  | 10,000|4.3 MBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | 测试集的类别标签  | 10,000| 5.1 KBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\n或者，你可以直接克隆这个代码库。数据集就放在`data/fashion`下。这个代码库还包含了一些用于评测和可视化的脚本。\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### 类别标注\n每个训练和测试样本都按照以下类别进行了标注：\n\n| 标注编号 | 描述 |\n| --- | --- |\n| 0 | T-shirt/top（T恤）|\n| 1 | Trouser（裤子）|\n| 2 | Pullover（套衫）|\n| 3 | Dress（裙子）|\n| 4 | Coat（外套）|\n| 5 | Sandal（凉鞋）|\n| 6 | Shirt（汗衫）|\n| 7 | Sneaker（运动鞋）|\n| 8 | Bag（包）|\n| 9 | Ankle boot（踝靴）|\n\n## 如何载入数据？\n\n### 使用Python (需要安装`numpy`)\n- 你可以直接使用`utils/mnist_reader`：\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### 使用Tensorflow\n请确保你已经[下载了我们的数据集](#获取数据)并把它放到了`data/fashion`下。不然， *Tensorflow会自动下载并使用原始的MNIST。*\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\n注意，Tensorflow (master ver.) 支持向`read_data_sets`函数传入MNIST数据集的地址。你可以使用： \n```python\ndata = input_data.read_data_sets('data/fashion', source_url='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/')\n```\n\n### 使用其它机器学习库\n截止今日，以下软件库中已内置了对`Fashion-MNIST`的支持。你只需要按照他们的文档载入`Fashion-MNIST`即可使用此数据集。\n- [Apache MXNet Gluon](https://mxnet.incubator.apache.org/api/python/gluon/data.html)\n- [deeplearn.js](https://deeplearnjs.org/demos/model-builder/)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](http://pytorch.org/docs/master/torchvision/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/datasets/#fashion-mnist-database-of-fashion-articles)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/versions/r1.5/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://github.com/JuliaML/MLDatasets.jl)\n- [Chainer (latest)](https://docs.chainer.org/en/latest/reference/generated/chainer.datasets.get_fashion_mnist.html?highlight=fashion-mnist)\n\n欢迎你同我们一起，为各个机器学习库增加对`Fashion-MNIST`的支持。\n\n\n### 使用其它的语言\n\n作为机器学习领域里最常使用的数据集，人们用各种语言为MNIST开发了很多载入工具。有一些方法需要先解压数据文件。注意，我们并没有测试过所有的载入方法。\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist) and [this](https://www.brine.io/fashion-mnist/train)\n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl)和[这里](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760)和[这里](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n\n\n## 基准测试\n我们使用`scikit-learn`做了一套自动评测系统。它涵盖了除深度学习之外的129种经典机器学习模型（包含不同的参数）。[你可以在这里以互动的方式查看结果。](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/)\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\n你可以运行`benchmark/runner.py`对结果进行重现。而我们更推荐的方法是使用Dockerfile打包部署后以Container的方式运行。\n\n我们欢迎你提交自己的模型评测。请使用Github新建一个Issue。不妨先看看[如何贡献](https://github.com/zalandoresearch/fashion-mnist#参与贡献)。如果你提交自己的模型，请先确保这个模型没有[在这个列表中](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/)被测试过。\n\n下面这个表格总结了提交的一些测试结果。注意，**我们并没有对这些结果的准确性进行验证**。你可以通过提交者附带的代码尝试对结果进行重现。当然，测试准确率最终取决于Epoch的多少，Batch的大小等因素。如果你发现了下表中的不妥，欢迎提交新的Issue。\n\n| 算法  | 预处理 | Fashion测试集准确率| 经典MNIST测试集准确率| 提交者| 代码|\n| --- | --- | --- | --- | --- |--- |\n|2 Conv Layers with max pooling (Keras) | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv Layers with max pooling (Tensorflow) >300 epochs | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv Layers with max pooling and ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv Layers net | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv Layers net <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)| \n|2 Conv Layers with 3 FC 1.8M parameters | Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv Layers with 3 FC 500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv Layers+max pooling+dense+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)|\n|2 Conv Layers 113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|3 Conv Layers and 2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv Layers+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling and 2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pythttps://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.pyorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)|\n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - \n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n\n\n### 更多在Fashion-MNIST上的探索和尝试\n\n#### [在Google Scholar中查看引用Fashion-MNIST的论文](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### 生成对抗网络 (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**推荐阅读！** 注意不同GANs的算法在Fashion-MNIST上生成的样本明显不同，而这点在经典的MNIST数据集上是观察不到的。)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [live demo of Generative Adversarial Network model with deeplearn.js](http://cognitivechaos.com/playground/fashion-gan/)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### 聚类\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n\n#### 视频教程\n*Machine Learning Meets Fashion* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## 数据可视化\n\n### t-SNE在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧) \n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧) \n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap)在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)  \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n\n## 参与贡献\n我们热烈欢迎您参与贡献这个项目。[请先阅读这里！](/CONTRIBUTING.md) 并查看有什么[open issues](https://github.com/zalandoresearch/fashion-mnist/issues)可以帮助解决。\n\n## 联系\n若要讨论这个数据集上的应用和评测，请使用这个聊天室[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n\n\n## 在论文中引用Fashion-MNIST\n如果你在你的研究工作中使用了这个数据集，欢迎你引用这篇论文：\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\n亦可使用Biblatex:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[有谁引用了Fashion-MNIST?](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A38C:35999:1723BC:5C4B4F:6AB9210F"},"text_sha256":"0c032b43dc5f01e0152279db17a30a7a30c444333020c748e8bb3975b0d8f923"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3286","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E9:767EB:17D9DF5:1BF9572:6AB9289F"},"commit":{"sha":"b2617bb6d3ffa2e429640350f613e3291e10b141","url":"https://github.com/zalandoresearch/fashion-mnist/commit/b2617bb6d3ffa2e429640350f613e3291e10b141","date":"2022-03-21T13:01:52Z","author_date":"2022-03-21T13:01:52Z","committer_date":"2022-03-21T13:01:52Z","tree_sha":"ec8d5e52c0b9b2b09ea3f9d36b7bfafaf8ec0e97","message_first_line":"Merge pull request #175 from mikayelh/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3285","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0836:62B94:17A5E39:1BC4E43:6AB9289F"},"tree_truncated":false,"document_candidates":[{"path":"README.ja.md","size":24055,"blob_sha":"362c5689c7d8b93af564fd51321825f60a9d41db","priority":0},{"path":"README.md","size":22711,"blob_sha":"9e98787139bc900f9d620737cf91be0dfdaf13b2","priority":0},{"path":"README.zh-CN.md","size":23546,"blob_sha":"e51d707c87f9eb828249c58d7c696688536a815e","priority":0}],"documents":[{"path":"README.ja.md","size":24055,"blob_sha":"362c5689c7d8b93af564fd51321825f60a9d41db","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-EN](https://img.shields.io/badge/README-English-green.svg)](README.md)\n[![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-%E3%83%AC%E3%83%93%E3%83%A5%E3%83%BC%E3%81%AE%E5%B9%B4-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n\n翻訳 : [(株)クラスキャット セールスインフォメーション](http://tensorflow.classcat.com/2017/08/28/tensorflow-fashion-mnist/)\n\n<details><summary>目次<\/summary><p>\n\n  * [何故でしょう？](#何故でしょう？)\n  * [データを取得する](#データを取得する)\n  * [使い方](#使い方)\n  * [ベンチマーク](#ベンチマーク)\n  * [可視化](#可視化)\n  * [貢献する](#貢献する)\n  * [接触](#接触)\n  * [引用Fashion-MNIST](#引用Fashion-MNIST)\n  * [License](#license)\n<\/p><\/details><p><\/p>\n\n\n60,000 サンプルの訓練セットと 10,000 サンプルのテストセットから成る、[Zalando](https://jobs.zalando.com/tech/) の記事の画像のデータセットです。各サンプルは 28×28 グレースケール画像で、10 クラスからのラベルと関連付けられています。`Fashion-MNIST` は、機械学習アルゴリズムのベンチマークのためのオリジナルの MNIST データセット の 直接的な差し込み式の (= drop-in) 置き換え としてサーブすることを意図しています。\n\nここにどのようにデータが見えるかのサンプルがあります (各クラスは３行取ります) :\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## 何故でしょう？\n   \nオリジナルの [MNIST](http://yann.lecun.com/exdb/mnist/) データセットは沢山の手書き数字を含みます。AI/ML/データサイエンス・コミュニティの人々はこのデータセットを好みそして彼らのアルゴリズムを検証するためのベンチマークとしてそれを使用します。実際に、MNIST はしばしば試してみる最初のデータセットです。「もしそれが MNIST で動作しなければ、まったく動作しないだろう」と彼らは言いました。「そうですね～、もし MNIST で動作するとしても、他の上では依然として失敗するかもしれませんが。」\n   \nFashion-MNIST は、機械学習アルゴリズムのベンチマークのためのオリジナルの MNIST データセットの直接的な差し込み式の (= drop-in) 置き換えとしてサーブすることを意図しています、というのはそれは同じ画像サイズでそして訓練及びテスト分割の構造を共有しているからです。\n\n### 真面目な機械学習研究者へ\n\n真面目な話し、MNIST を置き換えることについて話しをしています。幾つかの良い理由がここにあります :\n\n- **MNIST は簡単過ぎます。** [私たちの比較ベンチマーク](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/) と “[Most pairs of MNIST digits can be distinguished pretty well by just one pixel](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478)” を確かめてください。\n- **MNIST は使用され過ぎています。** “[Ian Goodfellow wants people to move away from mnist.](https://twitter.com/goodfellow_ian/status/852591106655043584)”を確かめてください。\n- **MNIST はモダンな CV タスクを表現できません。** “[François Cholle: Ideas on MNIST do not transfer to real CV.](https://twitter.com/fchollet/status/852594987527045120)” を確かめてください。\n\n## データを取得する\n[多くのMLライブラリ](#他の機械学習ライブラリを使用する)には既にFashion-MNISTデータ/ APIが含まれています。試してみてください！\n\nデータセットをダウンロードするためには直接リンクを使用することができます。データはオリジナルの [MNIST](http://yann.lecun.com/exdb/mnist/) データと同じフォーマットでストアされています。\n\n| 名前  | 内容 | サンプル | サイズ | リンク | MD5チェックサム|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | 訓練セット画像\t  | 60,000|26 MBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | 訓練セット・ラベル |60,000|29 KBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | テストセット画像  | 10,000|4.3 MBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | テストセット・ラベル  | 10,000| 5.1 KBytes | [ダウンロード](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\nあるいはこのレポジトリを clone することもできます、データセットは `data/fashion` の下です。この repo はベンチーマークと可視化のための幾つかのスクリプトを含みます。\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### ラベル\n各訓練とテスト・サンプルは以下のラベル群の一つに割り当てられています :\n\n| ラベル | 記述 |\n| --- | --- |\n| 0 | T-shirt/top |\n| 1 | Trouser |\n| 2 | Pullover |\n| 3 | Dress |\n| 4 | Coat |\n| 5 | Sandal |\n| 6 | Shirt |\n| 7 | Sneaker |\n| 8 | Bag |\n| 9 | Ankle boot |\n\n## 使い方\n\n### Python ([NumPy](http://www.numpy.org/)が必要)でデータをロードする\n\nこの repo の `utils/mnist_reader` を使用する :\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### でデータをロードする\n\n[私たちのデータセットをダウンロードしてください](#データを取得する)ことを確認し、それを `data/fashion`の下に置きます。それ以外の場合、* Tensorflowは自動的に元のMNISTをダウンロードして使用します。 *\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\nFashion-MNISTを訓練するための高レベルのAPIである`tf.keras`の使用に関する公式のTensorflow[チュートリアルがここにあります](https://www.tensorflow.org/tutorials/keras/classification)。\n\n### 他の機械学習ライブラリを使用する\n\n今日まで、以下のライブラリは、組み込みデータセットとして `Fashion-MNIST`を含んでいます。 したがって、自分で`Fashion-MNIST`をダウンロードする必要はありません。 そのAPIに従うだけで、あなたは準備が整いました。\n\n- [Apache MXNet Gluon](https://mxnet.apache.org/api/python/docs/api/gluon/data/vision/datasets/index.html#mxnet.gluon.data.vision.datasets.FashionMNIST)\n- [TensorFlow.js](https://github.com/tensorflow/tfjs-examples/blob/master/fashion-mnist-vae/data.js)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](https://pytorch.org/vision/stable/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/api/datasets/fashion_mnist/)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [TensorFlow Datasets](https://www.tensorflow.org/datasets/catalog/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://juliaml.github.io/MLDatasets.jl/latest/datasets/FashionMNIST/)\n- [Chainer](https://docs.chainer.org/en/stable/reference/generated/chainer.datasets.get_fashion_mnist.html)\n- [HuggingFace Datasets](https://huggingface.co/datasets/fashion_mnist)\n- \nようこそ私たちに参加して、各機械学習ライブラリ用の`Fashion-MNIST`のサポートを追加してください。\n\n\n### 他の言語でデータをロードする\n\n機械学習コミュニティでもっとも人気のあるデータセットの一つですので、人々は多くの言語で MNIST loader を実装してきています。それらは `Fashion-MNIST` データセットをロードするためにも使用できるでしょう (最初に decompress する必要があるかもしれません)。それらは私たちによってテストはされていないことには注意してください。\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist) \n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl) and [this](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760) and [this](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n- [Rust](https://github.com/AtheMathmo/vision-rs/blob/master/src/fashion_mnist.rs)\n\n\n## ベンチマーク\nscikit-learn ベースの自動ベンチマーキング・システムを構築しました、これは異なるパラメータの 129 の (深層学習ではない) 分類器をカバーします。 [結果はここで見つかります。](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/).\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\n結果は benchmark/runner.py を実行することで再現できます。推奨方法はこの docker コンテナをビルドして deploy することです (訳注 : リンク欠落)。[this Dockerfile](Dockerfile). \n\n貴方のベンチマークを submit することを歓迎します。新しい issue を作成してください、貴方の結果はここでリストされます。詳細は [contributor guidelines](https://github.com/zalandoresearch/fashion-mnist#contributing) セクションを確認してください。ベンチマークを submit する前に、このリストにリストされていなことを必ず確認してください。\n\n| 分類器 | 前処理\t | Fashion テスト精度| MNIST テスト精度 | Submitter| コード |\n| --- | --- | --- | --- | --- |--- |\n|2 Conv+pooling | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv+pooling | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv+pooling+ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)|\n|2 Conv ~113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|2 Conv+3 FC ~1.8M parameters| Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv+3 FC ~500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv+pooling+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)|\n|2 Conv+2 FC| Random Horizontal Flips|  0.939| -| [@ashmeet13](https://github.com/ashmeet13)|[:link:](https://github.com/ashmeet13/FashionMNIST-CNN)|\n|3 Conv+2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling+2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|3 Conv+BN+pooling|None|0.921|0.992|[@gchhablani](https://github.com/gchhablani)|[:link:](https://github.com/gchhablani/CNN-with-FashionMNIST)| \n|5 Conv+BN+pooling|None|0.931|-|[@Noumanmufc1](https://github.com/Noumanmufc1)|[:link:](https://gist.github.com/Noumanmufc1/60f00e434f0ce42b6f4826029737490a)| \n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)|\n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - \n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n|Dyra-Net| Rescale to unit interval | 0.906| -| [@Dirk Schäfer](https://github.com/disc5)| [:link:](https://github.com/disc5/dyra-net) [:link:](https://dl.acm.org/citation.cfm?id=3204176.3204200)|\n|Google AutoML|24 compute hours (higher quality)| 0.939|-| [@Sebastian Heinz](https://github.com/sebastianheinz) |[:link:](https://www.statworx.com/de/blog/a-performance-benchmark-of-google-automl-vision-using-fashion-mnist/)|\n|Fastai| Resnet50+Fine-tuning+Softmax on last layer's activations| 0.9312| - | [@Sayak](https://github.com/sayakpaul) | [:link:](https://github.com/sayakpaul/Experiments-on-Fashion-MNIST/)|\n\n### 他の探求\n\n#### [Fashion-MNIST: Year in Review](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n#### [Fashion-MNIST on Google Scholar](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### Generative adversarial networks (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**Recommend to read!** Note how various GANs generate different results on Fashion-MNIST, which can not be easily observed on the original MNIST.)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### クラスタリング\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n\n#### ビデオチュートリアル\n*Machine Learning Meets Fashion* by Yufeng G @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## 可視化\n\n### t-SNE on Fashion-MNIST (左) とオリジナルの MNIST (右)\n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA on Fashion-MNIST (左) とオリジナルの MNIST (右)\n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap) Fashion-MNIST (左) とオリジナルの MNIST (右) \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n### [PyMDE](https://github.com/cvxgrp/pymde) Fashion-MNIST (左) とオリジナルの MNIST (右) \n<img src=\"doc/img/pymde_example_fashion_mnist.png\" width=\"50%\"><img src=\"doc/img/pymde_example_mnist.png\" width=\"50%\">\n\n## 貢献する\n\nThanks for your interest in contributing! There are many ways to get involved; start with our [contributor guidelines](/CONTRIBUTING.md) and then check these [open issues](https://github.com/zalandoresearch/fashion-mnist/issues) for specific tasks.\n\n## 接触\nTo discuss the dataset, please use [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link).\n\n## 引用Fashion-MNIST\nIf you use Fashion-MNIST in a scientific publication, we would appreciate references to the following paper:\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\nBiblatex entry:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[誰がFashion-MNISTを引用していますか？](https://scholar.google.com/scholar?scisbd=2&q=%22fashion-mnist%22&hl=en&as_sdt=0,5) \n\n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2780:3AC15:17A3D3:5CC997:6AB9210D"},"text_sha256":"c32f4321cd9ebe6a63e3052d6973be29119b58c143e15edcf0904c6720d343c8"},{"path":"README.md","size":22711,"blob_sha":"9e98787139bc900f9d620737cf91be0dfdaf13b2","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md)\n[![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-Year%20in%20Review-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n\n<details><summary>Table of Contents<\/summary><p>\n\n* [Why we made Fashion-MNIST](#why-we-made-fashion-mnist)\n* [Get the Data](#get-the-data)\n* [Usage](#usage)\n* [Benchmark](#benchmark)\n* [Visualization](#visualization)\n* [Contributing](#contributing)\n* [Contact](#contact)\n* [Citing Fashion-MNIST](#citing-fashion-mnist)\n* [License](#license)\n<\/p><\/details><p><\/p>\n\n\n`Fashion-MNIST` is a dataset of [Zalando](https://jobs.zalando.com/tech/)'s article images—consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. We intend `Fashion-MNIST` to serve as a direct **drop-in replacement** for the original [MNIST dataset](http://yann.lecun.com/exdb/mnist/) for benchmarking machine learning algorithms. It shares the same image size and structure of training and testing splits.\n\nHere's an example of how the data looks (*each class takes three-rows*):\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## Why we made Fashion-MNIST\n\nThe original [MNIST dataset](http://yann.lecun.com/exdb/mnist/) contains a lot of handwritten digits. Members of the AI/ML/Data Science community love this dataset and use it as a benchmark to validate their algorithms. In fact, MNIST is often the first dataset researchers try. *\"If it doesn't work on MNIST, it **won't work** at all\"*, they said. *\"Well, if it does work on MNIST, it may still fail on others.\"* \n\n### To Serious Machine Learning Researchers\n\nSeriously, we are talking about replacing MNIST. Here are some good reasons:\n\n- **MNIST is too easy.** Convolutional nets can achieve 99.7% on MNIST. Classic machine learning algorithms can also achieve 97% easily. Check out [our side-by-side benchmark for Fashion-MNIST vs. MNIST](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/), and read \"[Most pairs of MNIST digits can be distinguished pretty well by just one pixel](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478).\"\n- **MNIST is overused.** In [this April 2017 Twitter thread](https://twitter.com/goodfellow_ian/status/852591106655043584), Google Brain research scientist and deep learning expert Ian Goodfellow calls for people to move away from MNIST.\n- **MNIST can not represent modern CV tasks**, as noted in [this April 2017 Twitter thread](https://twitter.com/fchollet/status/852594987527045120), deep learning expert/Keras author François Chollet.\n\n## Get the Data\n\n[Many ML libraries](#loading-data-with-other-machine-learning-libraries) already include Fashion-MNIST data/API, give it a try!\n\nYou can use direct links to download the dataset. The data is stored in the **same** format as the original [MNIST data](http://yann.lecun.com/exdb/mnist/).\n\n| Name  | Content | Examples | Size | Link | MD5 Checksum|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | training set images  | 60,000|26 MBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | training set labels  |60,000|29 KBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | test set images  | 10,000|4.3 MBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | test set labels  | 10,000| 5.1 KBytes | [Download](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\nAlternatively, you can clone this GitHub repository; the dataset appears under `data/fashion`. This repo also contains some scripts for benchmark and visualization.\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### Labels\nEach training and test example is assigned to one of the following labels:\n\n| Label | Description |\n| --- | --- |\n| 0 | T-shirt/top |\n| 1 | Trouser |\n| 2 | Pullover |\n| 3 | Dress |\n| 4 | Coat |\n| 5 | Sandal |\n| 6 | Shirt |\n| 7 | Sneaker |\n| 8 | Bag |\n| 9 | Ankle boot |\n\n## Usage\n\n### Loading data with Python (requires [NumPy](http://www.numpy.org/))\n\nUse `utils/mnist_reader` in this repo:\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### Loading data with Tensorflow\nMake sure you have [downloaded the data](#get-the-data) and placed it in `data/fashion`. Otherwise, *Tensorflow will download and use the original MNIST.*\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\nNote, Tensorflow supports passing in a source url to the `read_data_sets`. You may use: \n```python\ndata = input_data.read_data_sets('data/fashion', source_url='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/')\n```\n\nAlso, an official Tensorflow tutorial of using `tf.keras`, a high-level API to train Fashion-MNIST [can be found here](https://www.tensorflow.org/tutorials/keras/classification).\n\n### Loading data with other machine learning libraries \nTo date, the following libraries have included `Fashion-MNIST` as a built-in dataset. Therefore, you don't need to download `Fashion-MNIST` by yourself. Just follow their API and you are ready to go.\n\n- [Activeloop Hub](https://docs.activeloop.ai/datasets/fashion-mnist-dataset)\n- [Apache MXNet Gluon](https://mxnet.apache.org/api/python/docs/api/gluon/data/vision/datasets/index.html#mxnet.gluon.data.vision.datasets.FashionMNIST)\n- [TensorFlow.js](https://github.com/tensorflow/tfjs-examples/blob/master/fashion-mnist-vae/data.js)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](https://pytorch.org/vision/stable/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/api/datasets/fashion_mnist/)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [TensorFlow Datasets](https://www.tensorflow.org/datasets/catalog/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://juliaml.github.io/MLDatasets.jl/latest/datasets/FashionMNIST/)\n- [Chainer](https://docs.chainer.org/en/stable/reference/generated/chainer.datasets.get_fashion_mnist.html)\n- [HuggingFace Datasets](https://huggingface.co/datasets/fashion_mnist)\n \nYou are welcome to make pull requests to other open-source machine learning packages, improving their support to `Fashion-MNIST` dataset.\n\n### Loading data with other languages\n\nAs one of the Machine Learning community's most popular datasets, MNIST has inspired people to implement loaders in many different languages. You can use these loaders with the `Fashion-MNIST` dataset as well. (Note: may require decompressing first.) To date, we haven't yet tested all of these loaders with Fashion-MNIST.\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist)\n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl) and [this](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760) and [this](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n- [Rust](https://github.com/AtheMathmo/vision-rs/blob/master/src/fashion_mnist.rs)\n\n\n## Benchmark\nWe built an automatic benchmarking system based on `scikit-learn` that covers 129 classifiers (but no deep learning) with different parameters. [Find the results here](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/).\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\nYou can reproduce the results by running `benchmark/runner.py`. We recommend building and deploying [this Dockerfile](Dockerfile). \n\nYou are welcome to submit your benchmark; simply create a new issue and we'll list your results here. Before doing that, please make sure it does not already appear [in this list](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/). Visit our [contributor guidelines](https://github.com/zalandoresearch/fashion-mnist#contributing) for additional details.\n\nThe table below collects the submitted benchmarks. Note that **we haven't yet tested these results**. You are welcome to validate the results using the code provided by the submitter. Test accuracy may differ due to the number of epoch, batch size, etc. To correct this table, please create a new issue.\n\n| Classifier | Preprocessing | Fashion test accuracy | MNIST test accuracy | Submitter| Code |\n| --- | --- | --- | --- | --- |--- |\n|2 Conv+pooling | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv+pooling | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv+pooling+ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)|\n|2 Conv ~113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|2 Conv+3 FC ~1.8M parameters| Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv+3 FC ~500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv+pooling+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)|\n|2 Conv+2 FC| Random Horizontal Flips|  0.939| -| [@ashmeet13](https://github.com/ashmeet13)|[:link:](https://github.com/ashmeet13/FashionMNIST-CNN)|\n|3 Conv+2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling+2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|3 Conv+BN+pooling|None|0.921|0.992|[@gchhablani](https://github.com/gchhablani)|[:link:](https://github.com/gchhablani/CNN-with-FashionMNIST)| \n|5 Conv+BN+pooling|None|0.931|-|[@Noumanmufc1](https://github.com/Noumanmufc1)|[:link:](https://gist.github.com/Noumanmufc1/60f00e434f0ce42b6f4826029737490a)| \n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)| \n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - |\n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n|Dyra-Net| Rescale to unit interval | 0.906| -| [@Dirk Schäfer](https://github.com/disc5)| [:link:](https://github.com/disc5/dyra-net) [:link:](https://dl.acm.org/citation.cfm?id=3204176.3204200)|\n|Google AutoML|24 compute hours (higher quality)| 0.939|-| [@Sebastian Heinz](https://github.com/sebastianheinz) |[:link:](https://www.statworx.com/de/blog/a-performance-benchmark-of-google-automl-vision-using-fashion-mnist/)|\n|Fastai| Resnet50+Fine-tuning+Softmax on last layer's activations| 0.9312| - | [@Sayak](https://github.com/sayakpaul) | [:link:](https://github.com/sayakpaul/Experiments-on-Fashion-MNIST/)|\n\n\n### Other Explorations of Fashion-MNIST\n\n#### [Fashion-MNIST: Year in Review](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n#### [Fashion-MNIST on Google Scholar](https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### Generative adversarial networks (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**Recommend to read!** Note how various GANs generate different results on Fashion-MNIST, which can not be easily observed on the original MNIST.)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### Clustering\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n#### Video Tutorial\n*Machine Learning Meets Fashion* by Yufeng G @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## Visualization\n\n### t-SNE on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap) on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n### [PyMDE](https://github.com/cvxgrp/pymde) on Fashion-MNIST (left) and original MNIST (right) \n<img src=\"doc/img/pymde_example_fashion_mnist.png\" width=\"50%\"><img src=\"doc/img/pymde_example_mnist.png\" width=\"50%\">\n\n\n## Contributing\n\nThanks for your interest in contributing! There are many ways to get involved; start with our [contributor guidelines](/CONTRIBUTING.md) and then check these [open issues](https://github.com/zalandoresearch/fashion-mnist/issues) for specific tasks.\n\n## Contact\nTo discuss the dataset, please use [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link).\n\n## Citing Fashion-MNIST\nIf you use Fashion-MNIST in a scientific publication, we would appreciate references to the following paper:\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\nBiblatex entry:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[Who is citing Fashion-MNIST?](https://scholar.google.com/scholar?scisbd=2&q=%22fashion-mnist%22&hl=en&as_sdt=0,5) \n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E34A:11316A:176E0E:5C93FF:6AB92110"},"text_sha256":"bdf17df9bd8b40c09165c7068b8532032094e0015b54ac09233d0ff8397181ea"},{"path":"README.zh-CN.md","size":23546,"blob_sha":"e51d707c87f9eb828249c58d7c696688536a815e","priority":0,"status":200,"text":"# Fashion-MNIST\n\n[![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/)\n[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n[![Readme-EN](https://img.shields.io/badge/README-English-green.svg)](README.md)\n[![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-%E5%B9%B4%E5%BA%A6%E6%80%BB%E7%BB%93-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n\n<details><summary>目录<\/summary><p>\n\n* [为什么要做这个数据集？](#为什么要做这个数据集？)\n* [获取数据](#获取数据)\n* [如何载入数据？](#如何载入数据？)\n* [基准测试](#基准测试)\n* [数据可视化](#数据可视化)\n* [参与贡献](#参与贡献)\n* [联系](#联系)\n* [在论文中引用Fashion-MNIST](#在论文中引用Fashion-MNIST)\n* [License](#license)\n\n<\/p><\/details><p><\/p>\n\n\n`Fashion-MNIST`是一个替代[MNIST手写数字集](http://yann.lecun.com/exdb/mnist/)的图像数据集。 它是由Zalando（一家德国的时尚科技公司）旗下的[研究部门](https://research.zalando.com/)提供。其涵盖了来自10种类别的共7万个不同商品的正面图片。Fashion-MNIST的大小、格式和训练集/测试集划分与原始的MNIST完全一致。60000/10000的训练测试数据划分，28x28的灰度图片。你可以直接用它来测试你的机器学习和深度学习算法性能，且**不需要**改动任何的代码。\n\n这个数据集的样子大致如下（每个类别占三行）：\n\n![](doc/img/fashion-mnist-sprite.png)\n\n<img src=\"doc/img/embedding.gif\" width=\"100%\">\n\n## 为什么要做这个数据集？\n\n[经典的MNIST数据集](http://yann.lecun.com/exdb/mnist/)包含了大量的手写数字。十几年来，来自机器学习、机器视觉、人工智能、深度学习领域的研究员们把这个数据集作为衡量算法的基准之一。你会在很多的会议，期刊的论文中发现这个数据集的身影。实际上，MNIST数据集已经成为算法作者的必测的数据集之一。有人曾调侃道：*\"如果一个算法在MNIST不work, 那么它就根本没法用；而如果它在MNIST上work, 它在其他数据上也可能不work！\"*\n \n\n`Fashion-MNIST`的目的是要成为MNIST数据集的一个直接替代品。作为算法作者，你不需要修改任何的代码，就可以直接使用这个数据集。`Fashion-MNIST`的图片大小，训练、测试样本数及类别数与经典MNIST**完全相同**。\n\n### 写给专业的机器学习研究者\n\n我们是认真的。取代MNIST数据集的原因由如下几个：\n\n- **MNIST太简单了。** 很多深度学习算法在测试集上的准确率已经达到99.6%！不妨看看[我们基于scikit-learn上对经典机器学习算法的评测](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/) 和这段代码： [\"Most pairs of MNIST digits can be distinguished pretty well by just one pixel\"（翻译：大多数MNIST只需要一个像素就可以区分开！）](https://gist.github.com/dgrtwo/aaef94ecc6a60cd50322c0054cc04478)\n- **MNIST被用烂了。** 参考：[\"Ian Goodfellow wants people to move away from mnist\"（翻译：Ian Goodfellow希望人们不要再用MNIST了。）](https://twitter.com/goodfellow_ian/status/852591106655043584)\n- **MNIST数字识别的任务不代表现代机器学习。** 参考：[\"François Cholle: Ideas on MNIST do not transfer to real CV\" （翻译：在MNIST上看似有效的想法没法迁移到真正的机器视觉问题上。）](https://twitter.com/fchollet/status/852592598128615424)\n\n## 获取数据\n\n[很多的机器学习库](#使用其它机器学习库)已经内置了Fashion-MNIST数据或接口，方便你直接使用。\n\n\n你可以使用以下链接下载这个数据集。`Fashion-MNIST`的数据集的存储方式和命名与[经典MNIST数据集](http://yann.lecun.com/exdb/mnist/)完全一致。\n\n| 名称  | 描述 | 样本数量 | 文件大小 | 链接 | MD5校验和|\n| --- | --- |--- | --- |--- |--- |\n| `train-images-idx3-ubyte.gz`  | 训练集的图像  | 60,000|26 MBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz)|`8d4fb7e6c68d591d4c3dfef9ec88bf0d`|\n| `train-labels-idx1-ubyte.gz`  | 训练集的类别标签  |60,000|29 KBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-labels-idx1-ubyte.gz)|`25c81989df183df01b3e8a0aad5dffbe`|\n| `t10k-images-idx3-ubyte.gz`  | 测试集的图像  | 10,000|4.3 MBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-images-idx3-ubyte.gz)|`bef4ecab320f06d8554ea6380940ec79`|\n| `t10k-labels-idx1-ubyte.gz`  | 测试集的类别标签  | 10,000| 5.1 KBytes | [下载](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/t10k-labels-idx1-ubyte.gz)|`bb300cfdad3c16e7a12a480ee83cd310`|\n\n或者，你可以直接克隆这个代码库。数据集就放在`data/fashion`下。这个代码库还包含了一些用于评测和可视化的脚本。\n   \n```bash\ngit clone git@github.com:zalandoresearch/fashion-mnist.git\n```\n\n### 类别标注\n每个训练和测试样本都按照以下类别进行了标注：\n\n| 标注编号 | 描述 |\n| --- | --- |\n| 0 | T-shirt/top（T恤）|\n| 1 | Trouser（裤子）|\n| 2 | Pullover（套衫）|\n| 3 | Dress（裙子）|\n| 4 | Coat（外套）|\n| 5 | Sandal（凉鞋）|\n| 6 | Shirt（汗衫）|\n| 7 | Sneaker（运动鞋）|\n| 8 | Bag（包）|\n| 9 | Ankle boot（踝靴）|\n\n## 如何载入数据？\n\n### 使用Python (需要安装`numpy`)\n- 你可以直接使用`utils/mnist_reader`：\n```python\nimport mnist_reader\nX_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')\nX_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')\n```\n\n### 使用Tensorflow\n请确保你已经[下载了我们的数据集](#获取数据)并把它放到了`data/fashion`下。不然， *Tensorflow会自动下载并使用原始的MNIST。*\n\n```python\nfrom tensorflow.examples.tutorials.mnist import input_data\ndata = input_data.read_data_sets('data/fashion')\n\ndata.train.next_batch(BATCH_SIZE)\n```\n\n注意，Tensorflow (master ver.) 支持向`read_data_sets`函数传入MNIST数据集的地址。你可以使用： \n```python\ndata = input_data.read_data_sets('data/fashion', source_url='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/')\n```\n\nTensorflow的官网也提供了一份使用高级API`tf.keras`训练Fashion-MNIST的详细教程，[你可以在这里查看它](https://www.tensorflow.org/tutorials/keras/classification)。\n\n### 使用其它机器学习库\n截止今日，以下软件库中已内置了对`Fashion-MNIST`的支持。你只需要按照他们的文档载入`Fashion-MNIST`即可使用此数据集。\n- [Apache MXNet Gluon](https://mxnet.apache.org/api/python/docs/api/gluon/data/vision/datasets/index.html#mxnet.gluon.data.vision.datasets.FashionMNIST)\n- [TensorFlow.js](https://github.com/tensorflow/tfjs-examples/blob/master/fashion-mnist-vae/data.js)\n- [Kaggle](https://www.kaggle.com/zalando-research/fashionmnist)\n- [Pytorch](https://pytorch.org/vision/stable/datasets.html#fashion-mnist)\n- [Keras](https://keras.io/api/datasets/fashion_mnist/)\n- [Edward](http://edwardlib.org/api/observations/fashion_mnist)\n- [Tensorflow](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/fashion_mnist)\n- [TensorFlow Datasets](https://www.tensorflow.org/datasets/catalog/fashion_mnist)\n- [Torch](https://github.com/mingloo/fashion-mnist)\n- [JuliaML](https://juliaml.github.io/MLDatasets.jl/latest/datasets/FashionMNIST/)\n- [Chainer](https://docs.chainer.org/en/stable/reference/generated/chainer.datasets.get_fashion_mnist.html)\n- [HuggingFace Datasets](https://huggingface.co/datasets/fashion_mnist)\n- \n欢迎你同我们一起，为各个机器学习库增加对`Fashion-MNIST`的支持。\n\n\n### 使用其它的语言\n\n作为机器学习领域里最常使用的数据集，人们用各种语言为MNIST开发了很多载入工具。有一些方法需要先解压数据文件。注意，我们并没有测试过所有的载入方法。\n\n- [C](https://stackoverflow.com/a/10409376)\n- [C++](https://github.com/wichtounet/mnist)\n- [Java](https://stackoverflow.com/a/8301949)\n- [Python](https://pypi.python.org/pypi/python-mnist) and [this](https://pypi.python.org/pypi/mnist)\n- [Scala](http://mxnet.io/tutorials/scala/mnist.html)\n- [Go](https://github.com/schuyler/neural-go/blob/master/mnist/mnist.go)\n- [C#](https://jamesmccaffrey.wordpress.com/2013/11/23/reading-the-mnist-data-set-with-c/)\n- [NodeJS](https://github.com/ApelSYN/mnist_dl)和[这里](https://github.com/cazala/mnist)\n- [Swift](https://github.com/simonlee2/MNISTKit)\n- [R](https://gist.github.com/brendano/39760)和[这里](https://github.com/maddin79/darch)\n- [Matlab](http://ufldl.stanford.edu/wiki/index.php/Using_the_MNIST_Dataset)\n- [Ruby](https://github.com/gbuesing/mnist-ruby-test/blob/master/train/mnist_loader.rb)\n- [Rust](https://github.com/AtheMathmo/vision-rs/blob/master/src/fashion_mnist.rs)\n\n\n## 基准测试\n我们使用`scikit-learn`做了一套自动评测系统。它涵盖了除深度学习之外的129种经典机器学习模型（包含不同的参数）。[你可以在这里以互动的方式查看结果。](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/)\n\n<img src=\"doc/img/benchmark.gif\" width=\"100%\">\n\n你可以运行`benchmark/runner.py`对结果进行重现。而我们更推荐的方法是使用Dockerfile打包部署后以Container的方式运行。\n\n我们欢迎你提交自己的模型评测。请使用Github新建一个Issue。不妨先看看[如何贡献](https://github.com/zalandoresearch/fashion-mnist#参与贡献)。如果你提交自己的模型，请先确保这个模型没有[在这个列表中](http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/)被测试过。\n\n下面这个表格总结了提交的一些测试结果。注意，**我们并没有对这些结果的准确性进行验证**。你可以通过提交者附带的代码尝试对结果进行重现。当然，测试准确率最终取决于Epoch的多少，Batch的大小等因素。如果你发现了下表中的不妥，欢迎提交新的Issue。\n\n| 算法  | 预处理 | Fashion测试集准确率| 经典MNIST测试集准确率| 提交者| 代码|\n| --- | --- | --- | --- | --- |--- |\n|2 Conv+pooling | None | 0.876 | - | [Kashif Rasul](https://twitter.com/krasul) | [:link:](https://gist.github.com/kashif/76792939dd6f473b7404474989cb62a8) |\n|2 Conv+pooling | None | 0.916| - |[Tensorflow's doc](https://www.tensorflow.org/tutorials/layers) | [:link:](/benchmark/convnet.py)|\n|2 Conv+pooling+ELU activation (PyTorch)| None| 0.903| - | [@AbhirajHinge](https://github.com/AbhirajHinge) | [:link:](https://github.com/AbhirajHinge/CNN-with-Fashion-MNIST-dataset)|\n|2 Conv | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 |0.971 | [Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|2 Conv <100K parameters | None | 0.925 | 0.992 |[@hardmaru](https://twitter.com/hardmaru) | [:link:](https://github.com/hardmaru/pytorch_notebooks/blob/master/pytorch_tiny_custom_mnist_adam.ipynb)|\n|2 Conv ~113K parameters | Normalization | 0.922| 0.993 |[Abel G.](https://github.com/abelusha) | [:link:](https://github.com/abelusha/MNIST-Fashion-CNN/blob/master/Fashon_MNIST_CNN_using_Keras_10_Runs.ipynb)|\n|2 Conv+3 FC ~1.8M parameters| Normalization | 0.932 | 0.994 | [@Xfan1025](https://github.com/Xfan1025) |[:link:](https://github.com/Xfan1025/Fashion-MNIST/blob/master/fashion-mnist.ipynb) |\n|2 Conv+3 FC ~500K parameters | Augmentation, batch normalization | 0.934 | 0.994 | [@cmasch](https://github.com/cmasch) |[:link:](https://github.com/cmasch/zalando-fashion-mnist) |\n|2 Conv+pooling+BN | None | 0.934 | - | [@khanguyen1207](https://github.com/khanguyen1207) | [:link:](https://github.com/khanguyen1207/My-Machine-Learning-Corner/blob/master/Zalando%20MNIST/fashion.ipynb)|\n|2 Conv+2 FC| Random Horizontal Flips|  0.939| -| [@ashmeet13](https://github.com/ashmeet13)|[:link:](https://github.com/ashmeet13/FashionMNIST-CNN)|\n|3 Conv+2 FC | None | 0.907 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|3 Conv+pooling+BN | None | 0.903 | 0.994 | [@meghanabhange](https://github.com/meghanabhange) | [:link:](https://github.com/meghanabhange/FashionMNIST-3-Layer-CNN) |\n|3 Conv+pooling+2 FC+dropout | None | 0.926 | - | [@Umberto Griffo](https://github.com/umbertogriffo) | [:link:](https://github.com/umbertogriffo/Fashion-mnist-cnn-keras)|\n|3 Conv+BN+pooling|None|0.921|0.992|[@gchhablani](https://github.com/gchhablani)|[:link:](https://github.com/gchhablani/CNN-with-FashionMNIST)| \n|5 Conv+BN+pooling|None|0.931|-|[@Noumanmufc1](https://github.com/Noumanmufc1)|[:link:](https://gist.github.com/Noumanmufc1/60f00e434f0ce42b6f4826029737490a)| \n|CNN with optional shortcuts, dense-like connectivity| standardization+augmentation+random erasing | 0.947 |-| [@kennivich](https://github.com/Dezhic) | [:link:](https://github.com/Dezhic/fashion-classifier)|\n|GRU+SVM | None| 0.888 | 0.965 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/828fbda0e466dacb1fad66549e0e3022e1c7263a/gru_svm_zalando.py)|\n|GRU+SVM with dropout | None| 0.897 | 0.988 | [@AFAgarap](https://github.com/AFAgarap) | [:link:](https://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.py)|\n|WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips)| 0.967 | - |[@ajbrock](https://github.com/ajbrock) | [:link:](https://github.com/xternalz/WideResNet-pythttps://gist.githubusercontent.com/AFAgarap/92c1c4a5dd771999b0201ec0e7edfee0/raw/58dbe7cd8b0d83e4386cd6896766113b1a9af096/gru_svm_zalando_dropout.pyorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|DenseNet-BC 768K params| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - |[@ajbrock](https://github.com/ajbrock)  | [:link:](https://github.com/bamos/densenet.pytorch)  [:link:](https://github.com/ajbrock/FreezeOut) |\n|MobileNet | augmentation (horizontal flips)| 0.950|- | [@苏剑林](https://github.com/bojone)| [:link:](http://kexue.fm/archives/4556/)|\n|ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 |[Kyriakos Efthymiadis](https://github.com/kefth)| [:link:](https://github.com/kefth/fashion-mnist)|\n|GoogleNet with cross-entropy loss | None | 0.937 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|AlexNet with Triplet loss| None | 0.899 | - | [@Cenk Bircanoğlu](https://github.com/cenkbircanoglu) | [:link:](https://github.com/cenkbircanoglu/openface/tree/master/fashion_mnist)|\n|SqueezeNet with cyclical learning rate 200 epochs| None| 0.900| - | [@snakers4](https://github.com/snakers4) | [:link:](https://github.com/zalandoresearch/fashion-mnist/files/1263340/squeeze_net_mnist.zip)|\n|Dual path network with wide resnet 28-10|standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) |0.957|-|[@Queequeg](https://github.com/Queequeg92)|[:link:](https://github.com/Queequeg92/DualPathNet)|\n|MLP 256-128-100| None | 0.8833| - | [@heitorrapela](https://github.com/heitorrapela)| [:link:](https://github.com/heitorrapela/fashion-mnist-mlp)|\n|VGG16 26M parameters | None | 0.935| - | [@QuantumLiu](https://github.com/QuantumLiu)|[:link:](https://github.com/QuantumLiu/fashion-mnist-demo-by-Keras) [:link:](https://zhuanlan.zhihu.com/p/28968219)|\n|WRN-28-10| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.959 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|WRN-28-10 + Random Erasing| standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.963 | -| [@zhunzhong07](https://github.com/zhunzhong07)|[:link:](https://github.com/zhunzhong07/Random-Erasing)|\n|Human Performance| Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. | 0.835 | - | Leo  | - \n|Capsule Network 8M parameters| Normalization and shift at most 2 pixel and horizontal flip | 0.936 | - | [@XifengGuo](https://github.com/XifengGuo)  | [:link:](https://github.com/XifengGuo/CapsNet-Fashion-MNIST)|\n|HOG+SVM| HOG | 0.926 | - | [@subalde](https://github.com/subalde) | [:link:](https://github.com/subalde/fashion-mnist)|\n|XgBoost| scaling the pixel values to mean=0.0 and var=1.0| 0.898| 0.958| [@anktplwl91](https://github.com/anktplwl91)| [:link:](https://github.com/anktplwl91/fashion_mnist.git)|\n|DENSER| - | 0.953| 0.997| [@fillassuncao](https://github.com/fillassuncao)| [:link:](https://github.com/fillassuncao/denser-models) [:link:](https://arxiv.org/pdf/1801.01563.pdf)|\n|Dyra-Net| Rescale to unit interval | 0.906| -| [@Dirk Schäfer](https://github.com/disc5)| [:link:](https://github.com/disc5/dyra-net) [:link:](https://dl.acm.org/citation.cfm?id=3204176.3204200)|\n|Google AutoML|24 compute hours (higher quality)| 0.939|-| [@Sebastian Heinz](https://github.com/sebastianheinz) |[:link:](https://www.statworx.com/de/blog/a-performance-benchmark-of-google-automl-vision-using-fashion-mnist/)|\n|Fastai| Resnet50+Fine-tuning+Softmax on last layer's activations| 0.9312| - | [@Sayak](https://github.com/sayakpaul) | [:link:](https://github.com/sayakpaul/Experiments-on-Fashion-MNIST/)|\n### 更多在Fashion-MNIST上的探索和尝试\n\n#### [Fashion-MNIST: 年度总结](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/)\n#### [在Google Scholar中查看引用Fashion-MNIST的论文](https://scholar.google.de/scholar?hl=en&as_sdt=0%2C5&q=fashion-mnist&btnG=&oq=fas) \n\n#### 生成对抗网络 (GANs) \n- [Tensorflow implementation of various GANs and VAEs.](https://github.com/hwalsuklee/tensorflow-generative-model-collections) (**推荐阅读！** 注意不同GANs的算法在Fashion-MNIST上生成的样本明显不同，而这点在经典的MNIST数据集上是观察不到的。)\n- [Make a ghost wardrobe using DCGAN](https://twitter.com/spaceLenny/status/901488938023403520)\n- [fashion-mnist的gan玩具](http://kexue.fm/archives/4540/)\n- [CGAN output after 5000 steps](https://github.com/a7b23/Conditional-GAN-using-tensorflow-slim)\n- [GAN Playground - Explore Generative Adversarial Nets in your Browser](https://reiinakano.github.io/gan-playground/)\n\n#### 聚类\n- [Xifeng Guo's implementation](https://github.com/XifengGuo/DEC-keras) of [Unsupervised Deep Embedding for Clustering Analysis (DEC)](http://proceedings.mlr.press/v48/xieb16.pdf)\n- [Leland McInnes's](https://github.com/lmcinnes) [Uniform Manifold Approximation and Projection (UMAP)](https://github.com/lmcinnes/umap)\n\n\n#### 视频教程\n*Machine Learning Meets Fashion* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Machine Learning Meets Fashion](doc/img/ae143b2d.png)](https://youtu.be/RJudqel8DVA)\n\n*Introduction to Kaggle Kernels* by [Yufeng G](https://twitter.com/yufengg) @ Google Cloud\n\n[![Introduction to Kaggle Kernels](doc/img/853c717e.png)](https://youtu.be/FloMHMOU5Bs)\n\n*动手学深度学习* by Mu Li @ Amazon AI\n\n[![MXNet/Gluon中文频道](doc/img/e9514ab1.png)](https://youtu.be/kGktiYF5upk)\n\nApache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)\n\n[![Apache MXNet으로 배워보는 딥러닝(Deep Learning)](doc/img/dd83f448.png)](https://youtu.be/H66GDuLsGl4)\n\n\n\n## 数据可视化\n\n### t-SNE在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧) \n<img src=\"doc/img/34d72c08.png\" width=\"50%\"><img src=\"doc/img/01e0c4be.png\" width=\"50%\">\n\n### PCA在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧) \n<img src=\"doc/img/f04ba662.png\" width=\"50%\"><img src=\"doc/img/4433f0e1.png\" width=\"50%\">\n\n### [UMAP](https://github.com/lmcinnes/umap)在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)  \n<img src=\"doc/img/umap_example_fashion_mnist1.png\" width=\"50%\"><img src=\"doc/img/umap_example_mnist1.png\" width=\"50%\">\n\n### [PyMDE](https://github.com/cvxgrp/pymde)在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)  \n<img src=\"doc/img/pymde_example_fashion_mnist.png\" width=\"50%\"><img src=\"doc/img/pymde_example_mnist.png\" width=\"50%\">\n\n## 参与贡献\n我们热烈欢迎您参与贡献这个项目。[请先阅读这里！](/CONTRIBUTING.md) 并查看有什么[open issues](https://github.com/zalandoresearch/fashion-mnist/issues)可以帮助解决。\n\n## 联系\n若要讨论这个数据集上的应用和评测，请使用这个聊天室[![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n\n\n## 在论文中引用Fashion-MNIST\n如果你在你的研究工作中使用了这个数据集，欢迎你引用这篇论文：\n\n**Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. [arXiv:1708.07747](http://arxiv.org/abs/1708.07747)**\n\n亦可使用Biblatex:\n```latex\n@online{xiao2017/online,\n  author       = {Han Xiao and Kashif Rasul and Roland Vollgraf},\n  title        = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},\n  date         = {2017-08-28},\n  year         = {2017},\n  eprintclass  = {cs.LG},\n  eprinttype   = {arXiv},\n  eprint       = {cs.LG/1708.07747},\n}\n```\n\n[有谁引用了Fashion-MNIST?](https://scholar.google.com/scholar?scisbd=2&q=%22fashion-mnist%22&hl=en&as_sdt=0,5) \n\n\n## License\n\nThe MIT License (MIT) Copyright © [2017] Zalando SE, https://tech.zalando.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9480:375F4:1765D2:5C8E15:6AB92112"},"text_sha256":"07beaaf2b490d20a82224bf322743b26be62726eca7dbc6dc050967d3eac83a2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"milesial/Pytorch-UNet","input_row":{"repository":"milesial/Pytorch-UNet","url":"https://github.com/milesial/Pytorch-UNet","name":"Pytorch-UNet","owner":"milesial","description":"PyTorch implementation of the U-Net for image semantic segmentation with high quality images","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":11679,"issues":462,"created_at":"2017-08-16T12:17:08Z","updated_at":"2026-09-27T11:32:12Z","first_commit_at":"2017-08-16T12:17:08Z","last_commit_at":"2024-02-11T00:59:01Z","activity_months":77.840000000000003,"ai_ml_match_topics":"deep-learning; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:57.091Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"milesial/Pytorch-UNet","visibility":"public","created_at":"2017-08-16T12:17:08Z","updated_at":"2026-09-27T11:32:12Z","private":false,"fork":false,"archived":false,"stargazers_count":11679,"open_issues_count":126,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3284","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:17D9EE9:1BF96A3:6AB928A1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3283","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D2:A9DC0:17A3D11:1BC2C14:6AB928A1"},"commit":{"sha":"c34a455f1722e0b899e9e92c7766b83a9a641980","url":"https://github.com/milesial/Pytorch-UNet/commit/c34a455f1722e0b899e9e92c7766b83a9a641980","date":"2018-04-09T03:15:24Z","author_date":"2018-04-09T03:15:24Z","committer_date":"2018-04-09T03:15:24Z","tree_sha":"0c02fb0edc4810ca0dd0d4e7e45fd85a796a33f8","message_first_line":"Removed unused function and general cleanup"},"tree_request_status":200,"tree_rate":{"github_remaining":"3282","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081C:0BA1:D6D4D5:FC72F0:6AB928A1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2415,"blob_sha":"ead9a260448c38087b645fe400dc19febfe88027","priority":0}],"documents":[{"path":"README.md","size":2415,"blob_sha":"ead9a260448c38087b645fe400dc19febfe88027","priority":0,"status":200,"text":"# Pytorch-UNet\n![input and output for a random image in the test dataset](https://framapic.org/OcE8HlU6me61/KNTt8GFQzxDR.png)\n\n\nCustomized implementation of the [U-Net](https://arxiv.org/pdf/1505.04597.pdf) in Pytorch for Kaggle's [Carvana Image Masking Challenge](https://www.kaggle.com/c/carvana-image-masking-challenge) from a high definition image. This was used with only one output class but it can be scaled easily.\n\nThis model was trained from scratch with 5000 images (no data augmentation) and scored a [dice coefficient](https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient) of 0.988423 (511 out of 735) on over 100k test images. This score is not quite good but could be improved with more training, data augmentation, fine tuning, playing with CRF post-processing, and applying more weights on the edges of the masks.\n\nThe model used for the last submission is stored in the `MODEL.pth` file, if you wish to play with it. The data is available on the [Kaggle website](https://www.kaggle.com/c/carvana-image-masking-challenge/data).\n\n## Usage\n\n### Prediction\n\nYou can easily test the output masks on your images via the CLI.\n\nTo see all options:\n`python predict.py -h`\n\nTo predict a single image and save it:\n\n`python predict.py -i image.jpg -o ouput.jpg`\n\nTo predict a multiple images and show them without saving them:\n\n`python predict.py -i image1.jpg image2.jpg --viz --no-save`\n\nYou can use the cpu-only version with `--cpu`.\n\nYou can specify which model file to use with `--model MODEL.pth`.\n\n### Training\n\n`python train.py -h` should get you started. A proper CLI is yet to be added.\n## Warning\nIn order to process the image, it is split into two squares (a left on and a right one), and each square is passed into the net. The two square masks are then merged again to produce the final image. As a consequence, the height of the image must be strictly superior than half the width. Make sure the width is even too.\n\n## Dependencies\nThis package depends on [pydensecrf](https://github.com/lucasb-eyer/pydensecrf), available via `pip install`.\n\n## Notes on memory\n\nThe model has be trained from scratch on a GTX970M 3GB.\nPredicting images of 1918*1280 takes 1.5GB of memory.\nTraining takes approximately 3GB, so if you are a few MB shy of memory, consider turning off all graphical displays.\nThis assumes you use bilinear up-sampling, and not transposed convolution in the model.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED2E:3B1F3:17DF1C:5D072A:6AB92112"},"text_sha256":"7faf099a13c83784240a5806e380fda6eca56cfa14aca478180478d0c60f8bc4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3281","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17B3D8A:1BD3073:6AB928A2"},"commit":{"sha":"21d7850f2af30a9695bbeea75f3136aa538cfc4a","url":"https://github.com/milesial/Pytorch-UNet/commit/21d7850f2af30a9695bbeea75f3136aa538cfc4a","date":"2024-02-11T00:59:01Z","author_date":"2024-02-11T00:59:01Z","committer_date":"2024-02-11T00:59:01Z","tree_sha":"8e7fe592d9508a392a7314c58d26045d5f54659e","message_first_line":"Merge pull request #475 from IshanG97/download-data-bat-script"},"tree_request_status":200,"tree_rate":{"github_remaining":"3280","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17A3DAB:1BC2CFC:6AB928A2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7466,"blob_sha":"cb4d4c986e7097bc2cab8737d2d67a36e5640b94","priority":0}],"documents":[{"path":"README.md","size":7466,"blob_sha":"cb4d4c986e7097bc2cab8737d2d67a36e5640b94","priority":0,"status":200,"text":"# U-Net: Semantic segmentation with PyTorch\n<a href=\"#\"><img src=\"https://img.shields.io/github/actions/workflow/status/milesial/PyTorch-UNet/main.yml?logo=github&style=for-the-badge\" /><\/a>\n<a href=\"https://hub.docker.com/r/milesial/unet\"><img src=\"https://img.shields.io/badge/docker%20image-available-blue?logo=Docker&style=for-the-badge\" /><\/a>\n<a href=\"https://pytorch.org/\"><img src=\"https://img.shields.io/badge/PyTorch-v1.13+-red.svg?logo=PyTorch&style=for-the-badge\" /><\/a>\n<a href=\"#\"><img src=\"https://img.shields.io/badge/python-v3.6+-blue.svg?logo=python&style=for-the-badge\" /><\/a>\n\n![input and output for a random image in the test dataset](https://i.imgur.com/GD8FcB7.png)\n\n\nCustomized implementation of the [U-Net](https://arxiv.org/abs/1505.04597) in PyTorch for Kaggle's [Carvana Image Masking Challenge](https://www.kaggle.com/c/carvana-image-masking-challenge) from high definition images.\n\n- [Quick start](#quick-start)\n  - [Without Docker](#without-docker)\n  - [With Docker](#with-docker)\n- [Description](#description)\n- [Usage](#usage)\n  - [Docker](#docker)\n  - [Training](#training)\n  - [Prediction](#prediction)\n- [Weights & Biases](#weights--biases)\n- [Pretrained model](#pretrained-model)\n- [Data](#data)\n\n## Quick start\n\n### Without Docker\n\n1. [Install CUDA](https://developer.nvidia.com/cuda-downloads)\n\n2. [Install PyTorch 1.13 or later](https://pytorch.org/get-started/locally/)\n\n3. Install dependencies\n```bash\npip install -r requirements.txt\n```\n\n4. Download the data and run training:\n```bash\nbash scripts/download_data.sh\npython train.py --amp\n```\n\n### With Docker\n\n1. [Install Docker 19.03 or later:](https://docs.docker.com/get-docker/)\n```bash\ncurl https://get.docker.com | sh && sudo systemctl --now enable docker\n```\n2. [Install the NVIDIA container toolkit:](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)\n```bash\ndistribution=$(. /etc/os-release;echo $ID$VERSION_ID) \\\n   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \\\n   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list\nsudo apt-get update\nsudo apt-get install -y nvidia-docker2\nsudo systemctl restart docker\n```\n3. [Download and run the image:](https://hub.docker.com/repository/docker/milesial/unet)\n```bash\nsudo docker run --rm --shm-size=8g --ulimit memlock=-1 --gpus all -it milesial/unet\n```\n\n4. Download the data and run training:\n```bash\nbash scripts/download_data.sh\npython train.py --amp\n```\n\n## Description\nThis model was trained from scratch with 5k images and scored a [Dice coefficient](https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient) of 0.988423 on over 100k test images.\n\nIt can be easily used for multiclass segmentation, portrait segmentation, medical segmentation, ...\n\n\n## Usage\n**Note : Use Python 3.6 or newer**\n\n### Docker\n\nA docker image containing the code and the dependencies is available on [DockerHub](https://hub.docker.com/repository/docker/milesial/unet).\nYou can download and jump in the container with ([docker >=19.03](https://docs.docker.com/get-docker/)):\n\n```console\ndocker run -it --rm --shm-size=8g --ulimit memlock=-1 --gpus all milesial/unet\n```\n\n\n### Training\n\n```console\n> python train.py -h\nusage: train.py [-h] [--epochs E] [--batch-size B] [--learning-rate LR]\n                [--load LOAD] [--scale SCALE] [--validation VAL] [--amp]\n\nTrain the UNet on images and target masks\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --epochs E, -e E      Number of epochs\n  --batch-size B, -b B  Batch size\n  --learning-rate LR, -l LR\n                        Learning rate\n  --load LOAD, -f LOAD  Load model from a .pth file\n  --scale SCALE, -s SCALE\n                        Downscaling factor of the images\n  --validation VAL, -v VAL\n                        Percent of the data that is used as validation (0-100)\n  --amp                 Use mixed precision\n```\n\nBy default, the `scale` is 0.5, so if you wish to obtain better results (but use more memory), set it to 1.\n\nAutomatic mixed precision is also available with the `--amp` flag. [Mixed precision](https://arxiv.org/abs/1710.03740) allows the model to use less memory and to be faster on recent GPUs by using FP16 arithmetic. Enabling AMP is recommended.\n\n\n### Prediction\n\nAfter training your model and saving it to `MODEL.pth`, you can easily test the output masks on your images via the CLI.\n\nTo predict a single image and save it:\n\n`python predict.py -i image.jpg -o output.jpg`\n\nTo predict a multiple images and show them without saving them:\n\n`python predict.py -i image1.jpg image2.jpg --viz --no-save`\n\n```console\n> python predict.py -h\nusage: predict.py [-h] [--model FILE] --input INPUT [INPUT ...] \n                  [--output INPUT [INPUT ...]] [--viz] [--no-save]\n                  [--mask-threshold MASK_THRESHOLD] [--scale SCALE]\n\nPredict masks from input images\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --model FILE, -m FILE\n                        Specify the file in which the model is stored\n  --input INPUT [INPUT ...], -i INPUT [INPUT ...]\n                        Filenames of input images\n  --output INPUT [INPUT ...], -o INPUT [INPUT ...]\n                        Filenames of output images\n  --viz, -v             Visualize the images as they are processed\n  --no-save, -n         Do not save the output masks\n  --mask-threshold MASK_THRESHOLD, -t MASK_THRESHOLD\n                        Minimum probability value to consider a mask pixel white\n  --scale SCALE, -s SCALE\n                        Scale factor for the input images\n```\nYou can specify which model file to use with `--model MODEL.pth`.\n\n## Weights & Biases\n\nThe training progress can be visualized in real-time using [Weights & Biases](https://wandb.ai/).  Loss curves, validation curves, weights and gradient histograms, as well as predicted masks are logged to the platform.\n\nWhen launching a training, a link will be printed in the console. Click on it to go to your dashboard. If you have an existing W&B account, you can link it\n by setting the `WANDB_API_KEY` environment variable. If not, it will create an anonymous run which is automatically deleted after 7 days.\n\n\n## Pretrained model\nA [pretrained model](https://github.com/milesial/Pytorch-UNet/releases/tag/v3.0) is available for the Carvana dataset. It can also be loaded from torch.hub:\n\n```python\nnet = torch.hub.load('milesial/Pytorch-UNet', 'unet_carvana', pretrained=True, scale=0.5)\n```\nAvailable scales are 0.5 and 1.0.\n\n## Data\nThe Carvana data is available on the [Kaggle website](https://www.kaggle.com/c/carvana-image-masking-challenge/data).\n\nYou can also download it using the helper script:\n\n```\nbash scripts/download_data.sh\n```\n\nThe input images and target masks should be in the `data/imgs` and `data/masks` folders respectively (note that the `imgs` and `masks` folder should not contain any sub-folder or any other files, due to the greedy data-loader). For Carvana, images are RGB and masks are black and white.\n\nYou can use your own dataset as long as you make sure it is loaded properly in `utils/data_loading.py`.\n\n\n---\n\nOriginal paper by Olaf Ronneberger, Philipp Fischer, Thomas Brox:\n\n[U-Net: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597)\n\n![network architecture](https://i.imgur.com/jeDVpqF.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7926:A58F2:16F637:5C1DF7:6AB92114"},"text_sha256":"85cc1e31a451c9802ba727cf655ce1a46ca8d020ae1302545439c894cebd1a89"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wandb/wandb","input_row":{"repository":"wandb/wandb","url":"https://github.com/wandb/wandb","name":"wandb","owner":"wandb","description":"The AI developer platform. Use Weights & Biases to train and fine-tune models, and manage models from experimentation to production.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":11261,"issues":3908,"created_at":"2017-03-24T05:46:23Z","updated_at":"2026-09-27T08:42:54Z","first_commit_at":"2017-02-21T07:25:41Z","last_commit_at":"2026-09-26T04:15:34Z","activity_months":115.11,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:30:59.467Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wandb/wandb","visibility":"public","created_at":"2017-03-24T05:46:23Z","updated_at":"2026-09-27T08:42:54Z","private":false,"fork":false,"archived":false,"stargazers_count":11261,"open_issues_count":993,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3279","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0799:228A99:17CECCE:1BEDFF8:6AB928A3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3278","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EE:156040:17B8541:1BD6DF6:6AB928A3"},"commit":{"sha":"6677fc053051054f49e2c70a578eb4e2b137dbb1","url":"https://github.com/wandb/wandb/commit/6677fc053051054f49e2c70a578eb4e2b137dbb1","date":"2018-05-24T23:56:57Z","author_date":"2018-05-24T23:55:13Z","committer_date":"2018-05-24T23:56:57Z","tree_sha":"f9851a7d3106eac9eb626f0be7b0a4d54fafdb06","message_first_line":"Remove agent/sweep/config commands from cli."},"tree_request_status":200,"tree_rate":{"github_remaining":"3277","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0863:725A9:17C0A04:1BE009B:6AB928A4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2424,"blob_sha":"5a378c767d0ce9721cfcc50fddff3ae59870f0dd","priority":0}],"documents":[{"path":"README.md","size":2424,"blob_sha":"5a378c767d0ce9721cfcc50fddff3ae59870f0dd","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://app.wandb.ai/logo.svg\" width=\"350\" /><br><br>\n<\/div>\n\n# Weights and Biases [![ci](https://circleci.com/gh/wandb/client.svg?style=svg)](https://circleci.com/gh/wandb/client) [![pypi](https://img.shields.io/pypi/v/wandb.svg)](https://pypi.python.org/pypi/wandb)\n\nThe **Weights and Biases** client is an open source library, CLI (wandb), and local web application for organizing and analyzing your machine learning experiments. Think of it as a framework-agnostic lightweight TensorBoard that persists additional information such as the state of your code, system metrics, and configuration parameters.\n\n## Local Features\n\n*   Store config parameters used in a training run\n*   Associate version control with your training runs\n*   Search, compare, and visualize training runs\n*   Analyze system usage metrics alongside runs\n\n## Cloud Features\n\n*   Collaborate with team members\n*   Run parameter sweeps\n*   Persist runs forever\n\n## Quickstart\n\n```shell\npip install wandb\n```\n\nIn your training script:\n\n```python\nimport wandb\nfrom wandb.keras import WandbCallback\n# Your custom arguments defined here\nargs = ...\n\nrun = wandb.init(config=args)\nrun.config[\"more\"] = \"custom\"\n\ndef training_loop():\n    while True:\n        # Do some machine learning\n        epoch, loss, val_loss = ...\n        # Framework agnostic / custom metrics\n        run.history.add({\"epoch\": epoch, \"loss\": loss, \"val_loss\": val_loss})\n        # Keras metrics\n        model.fit(..., callbacks=[WandbCallback()])\n```\n\nRunning your training script will save data in a directory named _wandb_ relative to your training script. To view your runs, call `wandb board` from the same directory as your training script.\n\n<p align=\"center\">\n    <img src=\"https://github.com/wandb/client/raw/master/docs/screenshot.jpg?raw=true\" alt=\"Runs screenshot\" style=\"max-width:100%;\">\n<\/p>\n\n## Cloud Usage\n\n[Signup](https://app.wandb.ai/login?invited) for an account, then run `wandb init` from the directory with your training script. You can checkin _wandb/settings_ to version control to enable other users on your team to share experiments. Run your script with `wandb run my_script.py` and all metadata will be synced to the cloud.\n\n## Detailed Usage\n\nFramework specific and detailed usage can be found in our [documentation](http://docs.wandb.com/).\n\n## Development\n\nSee https://github.com/wandb/client/blob/master/DEVELOPMENT.md\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2348:7A4F8:17C232:5CEA24:6AB92116"},"text_sha256":"72c67d4b5621cc25907e5c4b274dafa504bd8eeb49547348e923da432d9bd09f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3276","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D3:52542:17A73ED:1BC6832:6AB928A4"},"commit":{"sha":"bcd55db0fcee55d9d1c683bbcd0ff96e531d0616","url":"https://github.com/wandb/wandb/commit/bcd55db0fcee55d9d1c683bbcd0ff96e531d0616","date":"2026-06-30T19:33:59Z","author_date":"2026-06-30T19:33:59Z","committer_date":"2026-06-30T19:33:59Z","tree_sha":"b814c51cebc211f5b3065c47066612af7c3aa8f1","message_first_line":"chore(sdk): for EvalTable, unwrap numpy data types and support containers (#12074)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3275","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A1:1B4E7A:1791A75:1BB0BD8:6AB928A5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6475,"blob_sha":"7c54ec3708098a52e5c4036f3ff98c5a7555c4e0","priority":0},{"path":"SECURITY.md","size":106,"blob_sha":"2d2a2231f910817616ca8003959ff50cec26ed32","priority":1}],"documents":[{"path":"README.md","size":6475,"blob_sha":"7c54ec3708098a52e5c4036f3ff98c5a7555c4e0","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"./assets/logo.svg\" width=\"600\" alt=\"Weights & Biases\" />\n<\/p>\n\n<p align=\"center\">\n<a href=\"https://pypi.python.org/pypi/wandb\"><img src=\"https://img.shields.io/pypi/v/wandb\" /><\/a>\n<a href=\"https://anaconda.org/conda-forge/wandb\"><img src=\"https://img.shields.io/conda/vn/conda-forge/wandb\" /><\/a>\n<a href=\"https://pypi.python.org/pypi/wandb\"><img src=\"https://img.shields.io/pypi/pyversions/wandb\" /><\/a>\n<a href=\"https://circleci.com/gh/wandb/wandb\"><img src=\"https://img.shields.io/circleci/build/github/wandb/wandb/main\" /><\/a>\n<a href=\"https://codecov.io/gh/wandb/wandb\"><img src=\"https://img.shields.io/codecov/c/gh/wandb/wandb\" /><\/a>\n<\/p>\n<p align='center'>\n<a href=\"https://colab.research.google.com/github/wandb/examples/blob/master/colabs/intro/Intro_to_Weights_%26_Biases.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" /><\/a>\n<\/p>\n\nUse W&B to build better models faster. Track and visualize all the pieces of your machine learning pipeline, from datasets to production machine learning models. Get started with W&B today, [sign up for a W&B account](https://wandb.com?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=readme)!\n\n<br>\n\nBuilding an LLM app? Track, debug, evaluate, and monitor LLM apps with [Weave](https://wandb.github.io/weave?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=readme), our new suite of tools for GenAI.\n\n&nbsp;\n\n# Documentation\n\nSee the [W&B Developer Guide](https://docs.wandb.ai?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) and [API Reference Guide](https://docs.wandb.ai/training/api-reference#api-overview?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) for a full technical description of the W&B platform.\n\n&nbsp;\n\n# Quickstart\n\nInstall W&B to track, visualize, and manage machine learning experiments of any size.\n\n## Install the wandb library\n\n```shell\npip install wandb\n```\n\n## Sign up and create an API key\n\nSign up for a [W&B account](https://wandb.ai/login?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=quickstart). Create a new API key at [wandb.ai/settings](https://wandb.ai/settings) and store it securely. Optionally, use the `wandb login` CLI to configure your API key on your machine. You can skip this step -- W&B will prompt you to create an API key the first time you use it.\n\n**Note:** API keys can only be viewed once when created. Store your API key in a secure location like a password manager or environment variable.\n\n## Create a machine learning training experiment\n\nIn your Python script or notebook, initialize a W&B run with `wandb.init()`.\nSpecify hyperparameters and log metrics and other information to W&B.\n\n```python\nimport wandb\n\n# Project that the run is recorded to\nproject = \"my-awesome-project\"\n\n# Dictionary with hyperparameters\nconfig = {\"epochs\": 1337, \"lr\": 3e-4}\n\n# The `with` syntax marks the run as finished upon exiting the `with` block,\n# and it marks the run \"failed\" if there's an exception.\n#\n# In a notebook, it may be more convenient to write `run = wandb.init()`\n# and manually call `run.finish()` instead of using a `with` block.\nwith wandb.init(project=project, config=config) as run:\n    # Training code here\n\n    # Log values to W&B with run.log()\n    run.log({\"accuracy\": 0.9, \"loss\": 0.1})\n```\n\nVisit [wandb.ai/home](https://wandb.ai/home) to view recorded metrics such as accuracy and loss and how they changed during each training step. Each run object appears in the Runs column with generated names.\n\n&nbsp;\n\n# Integrations\n\nW&B [integrates](https://docs.wandb.ai/models/integrations) with popular ML frameworks and libraries making it fast and easy to set up experiment tracking and data versioning inside existing projects.\n\nFor developers adding W&B to a new framework, follow the [W&B Developer Guide](https://docs.wandb.ai/models/integrations/add-wandb-to-any-library).\n\n&nbsp;\n\n# W&B Hosting Options\n\nWeights & Biases is available in the cloud or installed on your private infrastructure. Set up a W&B Server in a production environment in one of three ways:\n\n1. [Multi-tenant Cloud](https://docs.wandb.ai/platform/hosting/hosting-options/multi_tenant_cloud?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=hosting): Fully managed platform deployed in W&B’s Google Cloud Platform (GCP) account in GCP’s North America regions.\n2. [Dedicated Cloud](https://docs.wandb.ai/platform/hosting/hosting-options/dedicated_cloud?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=hosting): Single-tenant, fully managed platform deployed in W&B’s AWS, GCP, or Azure cloud accounts. Each Dedicated Cloud instance has its own isolated network, compute and storage from other W&B Dedicated Cloud instances.\n3. [Self-Managed](https://docs.wandb.ai/platform/hosting/hosting-options/self-managed?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=hosting): Deploy W&B Server on your AWS, GCP, or Azure cloud account or within your on-premises infrastructure.\n\nSee the [Hosting documentation](https://docs.wandb.ai/platform/hosting?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=hosting) in the W&B Developer Guide for more information.\n\n&nbsp;\n\n# Python Version Support\n\nWe are committed to supporting our minimum required Python version for _at least_ six months after its official end-of-life (EOL) date, as defined by the Python Software Foundation. You can find a list of Python EOL dates [here](https://devguide.python.org/versions/).\n\nWhen we discontinue support for a Python version, we will increment the library’s minor version number to reflect this change.\n\n&nbsp;\n\n# Contribution guidelines\n\nWeights & Biases ❤️ open source, and we welcome contributions from the community! See the [Contribution Guide](./CONTRIBUTING.md) and the [docs/ directory](./docs) for more information on the development workflow and the internals of the wandb library. For wandb bugs and feature requests, visit [GitHub Issues](https://github.com/wandb/wandb/issues) or contact support@wandb.com.\n\n&nbsp;\n\n# W&B Community\n\nBe a part of the growing W&B Community and interact with the W&B team in our [Discord](https://wandb.me/discord). Stay connected with the latest AI updates and tutorials with [W&B Fully Connected](https://wandb.ai/fully-connected).\n\n&nbsp;\n\n# License\n\n[MIT License](https://github.com/wandb/wandb/blob/main/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7EE8:324E19:17B19D:5CD94F:6AB92118"},"text_sha256":"3c35eb67fb0e224ed78dae401f95c0b93f58b7334b796beadd5b5bb07cf4faf4"},{"path":"SECURITY.md","size":106,"blob_sha":"2d2a2231f910817616ca8003959ff50cec26ed32","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report all vulnerabilities to security@wandb.com.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C4A:386840:17E80F:5D0FF7:6AB92118"},"text_sha256":"f354b11dd07932446c3377e24308a3a66372c7eb41f85f94cd38d810817959b0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"aws/amazon-sagemaker-examples","input_row":{"repository":"aws/amazon-sagemaker-examples","url":"https://github.com/aws/amazon-sagemaker-examples","name":"amazon-sagemaker-examples","owner":"aws","description":"Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker. ","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":10988,"issues":1457,"created_at":"2017-10-23T05:55:22Z","updated_at":"2026-09-26T20:43:55Z","first_commit_at":"2017-10-25T18:13:05Z","last_commit_at":"2026-09-09T20:34:41Z","activity_months":106.47,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:31:03.032Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"aws/amazon-sagemaker-examples","visibility":"public","created_at":"2017-10-23T05:55:22Z","updated_at":"2026-09-26T20:43:55Z","private":false,"fork":false,"archived":false,"stargazers_count":10988,"open_issues_count":855,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3274","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0867:52542:17A753E:1BC69A1:6AB928A7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3273","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5413:71C58:179E679:1BBDBBA:6AB928A7"},"commit":{"sha":"7e1c06aa6abfa9234b27c3601c1ef066689794c8","url":"https://github.com/aws/amazon-sagemaker-examples/commit/7e1c06aa6abfa9234b27c3601c1ef066689794c8","date":"2018-05-24T04:46:25Z","author_date":"2018-05-24T04:46:25Z","committer_date":"2018-05-24T04:46:25Z","tree_sha":"93322393b44704b2bb13cab72f9655b9cbe18c2f","message_first_line":"Merge pull request #233 from JonathanTaws/pyspark_kmeans_pipeline"},"tree_request_status":200,"tree_rate":{"github_remaining":"3272","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C9:278AC2:1848B03:1C680D2:6AB928A7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11352,"blob_sha":"2ec92682d7351776a1cbea6a82a80e7d465f7fa0","priority":0}],"documents":[{"path":"README.md","size":11352,"blob_sha":"2ec92682d7351776a1cbea6a82a80e7d465f7fa0","priority":0,"status":200,"text":"# Amazon SageMaker Examples\n\nThis repository contains example notebooks that show how to apply machine learning and deep learning in [Amazon SageMaker](https://aws.amazon.com/sagemaker)\n\n## Examples\n\n### Introduction to Applying Machine Learning\n\nThese examples provide a gentle introduction to machine learning concepts as they are applied in practical use cases across a variety of sectors.\n\n- [Targeted Direct Marketing](introduction_to_applying_machine_learning/xgboost_direct_marketing) predicts potential customers that are most likely to convert based on customer and aggregate level metrics, using Amazon SageMaker's implementation of [XGBoost](https://github.com/dmlc/xgboost).\n- [Predicting Customer Churn](introduction_to_applying_machine_learning/xgboost_customer_churn) uses customer interaction and service usage data to find those most likely to churn, and then walks through the cost/benefit trade-offs of providing retention incentives.  This uses Amazon SageMaker's implementation of [XGBoost](https://github.com/dmlc/xgboost) to create a highly predictive model.\n- [Time-series Forecasting](introduction_to_applying_machine_learning/linear_time_series_forecast) generates a forecast for topline product demand using Amazon SageMaker's Linear Learner algorithm.\n- [Cancer Prediction](introduction_to_applying_machine_learning/breast_cancer_prediction) predicts Breast Cancer based on features derived from images, using SageMaker's Linear Learner.\n- [Ensembling](introduction_to_applying_machine_learning/ensemble_modeling) predicts income using two Amazon SageMaker models to show the advantages in ensembling.\n- [Video Game Sales](introduction_to_applying_machine_learning/video_game_sales) develops a binary prediction model for the success of video games based on review scores.\n- [MXNet Gluon Recommender System](introduction_to_applying_machine_learning/gluon_recommender_system) uses neural network embeddings for non-linear matrix factorization to predict user movie ratings on Amazon digital reviews.\n\n### Introduction to Amazon Algorithms\n\nThese examples provide quick walkthroughs to get you up and running with Amazon SageMaker's custom developed algorithms.  Most of these algorithms can train on distributed hardware, scale incredibly well, and are faster and cheaper than popular alternatives.\n\n- [k-means](sagemaker-python-sdk/1P_kmeans_highlevel) is our introductory example for Amazon SageMaker.  It walks through the process of clustering MNIST images of handwritten digits using Amazon SageMaker k-means.\n- [Factorization Machines](introduction_to_amazon_algorithms/factorization_machines_mnist) showcases Amazon SageMaker's implementation of the algorithm to predict whether a handwritten digit from the MNIST dataset is a 0 or not using a binary classifier.\n- [Latent Dirichlet Allocation (LDA)](introduction_to_amazon_algorithms/lda_topic_modeling) introduces topic modeling using Amazon SageMaker Latent Dirichlet Allocation (LDA) on a synthetic dataset.\n- [Linear Learner](introduction_to_amazon_algorithms/linear_learner_mnist) predicts whether a handwritten digit from the MNIST dataset is a 0 or not using a binary classifier from Amazon SageMaker Linear Learner.\n- [Neural Topic Model (NTM)](introduction_to_amazon_algorithms/ntm_synthetic) uses Amazon SageMaker Neural Topic Model (NTM) to uncover topics in documents from a synthetic data source, where topic distributions are known.\n- [Principal Components Analysis (PCA)](introduction_to_amazon_algorithms/pca_mnist) uses Amazon SageMaker PCA to calculate eigendigits from MNIST.\n- [Seq2Seq](introduction_to_amazon_algorithms/seq2seq) uses the Amazon SageMaker Seq2Seq algorithm that's built on top of [Sockeye](https://github.com/awslabs/sockeye), which is a sequence-to-sequence framework for Neural Machine Translation based on MXNet.  Seq2Seq implements state-of-the-art encoder-decoder architectures which can also be used for tasks like Abstractive Summarization in addition to Machine Translation.  This notebook shows translation from English to German text.\n- [Image Classification](introduction_to_amazon_algorithms/imageclassification_caltech) includes full training and transfer learning examples of Amazon SageMaker's Image Classification algorithm.  This uses a ResNet deep convolutional neural network to classify images from the caltech dataset.\n- [XGBoost for regression](introduction_to_amazon_algorithms/xgboost_abalone) predicts the age of abalone ([Abalone dataset](https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression.html)) using regression from Amazon SageMaker's implementation of [XGBoost](https://github.com/dmlc/xgboost).\n- [XGBoost for multi-class classification](introduction_to_amazon_algorithms/xgboost_mnist) uses Amazon SageMaker's implementation of [XGBoost](https://github.com/dmlc/xgboost) to classify handwritten digits from the MNIST dataset as one of the ten digits using a multi-class classifier. Both single machine and distributed use-cases are presented.\n- [DeepAR for time series forecasting](introduction_to_amazon_algorithms/deepar_synthetic) illustrates how to use the Amazon SageMaker DeepAR algorithm for time series forecasting on a synthetically generated data set.\n- [BlazingText Word2Vec](introduction_to_amazon_algorithms/blazingtext_word2vec_text8) generates Word2Vec embeddings from a cleaned text dump of Wikipedia articles using SageMaker's fast and scalable BlazingText implementation.\n\n### Scientific Details of Algorithms\n\nThese examples provide more thorough mathematical treatment on a select group of algorithms.\n\n- [Streaming Median](scientific_details_of_algorithms/streaming_median) sequentially introduces concepts used in streaming algorithms, which many SageMaker algorithms rely on to deliver speed and scalability.\n- [Latent Dirichlet Allocation (LDA)](scientific_details_of_algorithms/lda_topic_modeling) dives into Amazon SageMaker's spectral decomposition approach to LDA.\n\n### Advanced Amazon SageMaker Functionality\n\nThese examples that showcase unique functionality available in Amazon SageMaker.  They cover a broad range of topics and will utilize a variety of methods, but aim to provide the user with sufficient insight or inspiration to develop within Amazon SageMaker.\n\n- [Data Distribution Types](advanced_functionality/data_distribution_types) showcases the difference between two methods for sending data from S3 to Amazon SageMaker Training instances.  This has particular implication for scalability and accuracy of distributed training.\n- [Encrypting Your Data](advanced_functionality/handling_kms_encrypted_data) shows how to use Server Side KMS encrypted data with Amazon SageMaker training. The IAM role used for S3 access needs to have permissions to encrypt and decrypt data with the KMS key.\n- [Using Parquet Data](advanced_functionality/parquet_to_recordio_protobuf) shows how to bring [Parquet](https://parquet.apache.org/) data sitting in S3 into an Amazon SageMaker Notebook and convert it into the recordIO-protobuf format that many SageMaker algorithms consume.\n- [Connecting to Redshift](advanced_functionality/working_with_redshift_data) demonstrates how to copy data from Redshift to S3 and vice-versa without leaving Amazon SageMaker Notebooks.\n- [Bring Your Own XGBoost Model](advanced_functionality/xgboost_bring_your_own_model) shows how to use Amazon SageMaker Algorithms containers to bring a pre-trained model to a realtime hosted endpoint without ever needing to think about REST APIs.\n- [Bring Your Own k-means Model](advanced_functionality/kmeans_bring_your_own_model) shows how to take a model that's been fit elsewhere and use Amazon SageMaker Algorithms containers to host it.\n- [Bring Your Own R Algorithm](advanced_functionality/r_bring_your_own) shows how to bring your own algorithm container to Amazon SageMaker using the R language.\n- [Installing the R Kernel](advanced_functionality/install_r_kernel) shows how to install the R kernel into an Amazon SageMaker Notebook Instance.\n- [Bring Your Own scikit Algorithm](advanced_functionality/scikit_bring_your_own) provides a detailed walkthrough on how to package a scikit learn algorithm for training and production-ready hosting.\n- [Bring Your Own MXNet Model](advanced_functionality/mxnet_mnist_byom) shows how to bring a model trained anywhere using MXNet into Amazon SageMaker\n- [Bring Your Own TensorFlow Model](advanced_functionality/tensorflow_iris_byom) shows how to bring a model trained anywhere using TensorFlow into Amazon SageMaker\n\n### Amazon SageMaker TensorFlow and MXNet Pre-Built Containers and the Python SDK\n\nThese examples focus on the Amazon SageMaker Python SDK which allows you to write idiomatic TensorFlow or MXNet and then train or host in pre-built containers.\n\n- [cifar 10 with MXNet Gluon](sagemaker-python-sdk/mxnet_gluon_cifar10)\n- [MNIST with MXNet Gluon](sagemaker-python-sdk/mxnet_gluon_mnist)\n- [MNIST with MXNet](sagemaker-python-sdk/mxnet_mnist)\n- [Sentiment Analysis with MXNet Gluon](sagemaker-python-sdk/mxnet_gluon_sentiment)\n- [TensorFlow Neural Networks with Layers](sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_layers)\n- [TensorFlow Networks with Keras](sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_keras)\n- [Introduction to Estimators in TensorFlow](sagemaker-python-sdk/tensorflow_iris_dnn_classifier_using_estimators)\n- [TensorFlow and TensorBoard](sagemaker-python-sdk/tensorflow_resnet_cifar10_with_tensorboard)\n- [Distributed TensorFlow](sagemaker-python-sdk/tensorflow_distributed_mnist)\n\n### Using Amazon SageMaker with Apache Spark\n\nThese examples show how to use Amazon SageMaker for model training, hosting, and inference through Apache Spark using [SageMaker Spark](https://github.com/aws/sagemaker-spark). SageMaker Spark allows you to interleave Spark Pipeline stages with Pipeline stages that interact with Amazon SageMaker.\n\n- [MNIST with SageMaker PySpark](sagemaker-spark/pyspark_mnist)\n\n### Under Development\n\nThese Amazon SageMaker examples fully illustrate a concept, but may require some additional configuration on the users part to complete.\n\n## FAQ\n\n*What do I need in order to get started?*\n\n- The quickest setup to run example notebooks includes:\n  - An [AWS account](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-account.html)\n  - Proper [IAM User and Role](http://docs.aws.amazon.com/sagemaker/latest/dg/authentication-and-access-control.html) setup\n  - An [Amazon SageMaker Notebook Instance](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-setup-working-env.html)\n  - An [S3 bucket](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-config-permissions.html)\n\n*Will these examples work outside of Amazon SageMaker Notebook Instances?*\n\n- Although most examples utilize key Amazon SageMaker functionality like distributed, managed training or real-time hosted endpoints, these notebooks can be run outside of Amazon SageMaker Notebook Instances with minimal modification (updating IAM role definition and installing the necessary libraries).\n\n*How do I contribute my own example notebook?*\n\n- Although we're extremely excited to receive contributions from the community, we're still working on the best mechanism to take in examples from external sources.  Please bear with us in the short-term if pull requests take longer than expected or are closed.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D96:40CE8:17A4DF:5CCBD7:6AB9211A"},"text_sha256":"5a7e5c08ee27f388a0b5f05c6d68b0b842c5a92971b17b97472123f0fbf6df78"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3271","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:17EA497:1C09BDE:6AB928A8"},"commit":{"sha":"24fa34ca48a39325f50bd1c1922e58dcd3d39b17","url":"https://github.com/aws/amazon-sagemaker-examples/commit/24fa34ca48a39325f50bd1c1922e58dcd3d39b17","date":"2026-04-27T22:55:43Z","author_date":"2026-04-27T22:55:43Z","committer_date":"2026-04-27T22:55:43Z","tree_sha":"97dec70a1430467d04691a965363128c99eeebe1","message_first_line":"Fix README.md (#4882)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3270","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091C:B1202:1784E95:1BA3915:6AB928A8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11393,"blob_sha":"a09b844d94fe81a60c2c1136b19d946e191ea567","priority":0}],"documents":[{"path":"README.md","size":11393,"blob_sha":"a09b844d94fe81a60c2c1136b19d946e191ea567","priority":0,"status":200,"text":"![SageMaker](https://github.com/aws/amazon-sagemaker-examples/raw/main/_static/sagemaker-banner.png)\n\n# :exclamation::fire: Announcing SageMaker-Core: A New Python SDK for Amazon SageMaker :fire::exclamation:\n\n## Introduction\nToday, Amazon SageMaker is excited to announce the release of SageMaker-Core, a new Python SDK that provides an object-oriented interface for interacting with SageMaker resources such as TrainingJob, Model, and Endpoint. This SDK introduces the resource chaining feature, allowing developers to pass resource objects as parameters, eliminating manual parameter specification and simplifying code management. SageMaker-Core abstracts low-level details like resource state transitions and polling logic, achieving full parity with SageMaker APIs. It also includes usability improvements such as auto code completion, comprehensive documentation, and type hints, enhancing the overall developer experience.\n\n## Use Case\nSageMaker-Core is ideal for ML practitioners who seek full customization of AWS primitives for their ML workloads. SageMaker-Core is an improvement over Boto3, providing a more intuitive and efficient way to manage SageMaker resources. By providing an intuitive object-oriented interface and resource chaining, the SDK allows for seamless integration and management of SageMaker resources. This flexibility, combined with intelligent defaults enables developers to tailor their ML workloads according to their needs. Comprehensive documentation, and type hints help developers write code faster and with fewer errors without navigating complex API documentation.\n\n## Call to Action\nTo learn more about SageMaker-Core, visit the [documentation](https://sagemaker-core.readthedocs.io) and [example notebooks](https://github.com/aws/amazon-sagemaker-examples/tree/default/sagemaker-core). Get started today by integrating SageMaker-Core into your machine learning workflows and experience the benefits of a streamlined and efficient development process.\n\n\n# Amazon SageMaker Examples\n\nExample Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using Amazon SageMaker.\n\n## :books: Read this before you proceed further\n\nAmazon SageMaker examples are divided in two repositories:\n\n- [SageMaker example notebooks](https://github.com/aws/amazon-sagemaker-examples) is the official repository, containing examples that demonstrate the usage of Amazon SageMaker. This repository is entirely focussed on covering the breadth of features provided by SageMaker, and is maintained directly by the Amazon SageMaker team.\n\n- [Sagemaker Example Community repository](https://github.com/aws/amazon-sagemaker-examples-community) is another SageMaker repository which contains additional examples and reference solutions, beyond the examples showcased in the [official repository](https://github.com/aws/amazon-sagemaker-examples). This repository is maintained by community of engineers and solution architects at AWS.\n\n## Planning to submit a PR to this repository? Read this first:\n\n- This repository will only accept notebooks/examples which demonstrate a feature of SageMaker, not yet covered anywhere in this repository. PR submitters are requested to check this before submitting the PR to avoid getting it rejected.\n\n- If you still would like to contribute your example, please submit a PR to [Sagemaker Example Community repository](https://github.com/aws/amazon-sagemaker-examples-community) instead.\n\n## :hammer_and_wrench: Setup\n\nThe quickest setup to run example notebooks includes:\n\n- An [AWS account](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-account.html)\n- Proper [IAM User and Role](http://docs.aws.amazon.com/sagemaker/latest/dg/authentication-and-access-control.html) setup\n- An [Amazon SageMaker Notebook Instance](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-setup-working-env.html)\n- An [S3 bucket](http://docs.aws.amazon.com/sagemaker/latest/dg/gs-config-permissions.html)\n\n## :computer: Usage\n\nThese example notebooks are automatically loaded into SageMaker Notebook Instances.\nThey can be accessed by clicking on the `SageMaker Examples` tab in Jupyter or the SageMaker logo in JupyterLab.\n\nAlthough most examples utilize key Amazon SageMaker functionality like distributed, managed training or real-time hosted endpoints, these notebooks can be run outside of Amazon SageMaker Notebook Instances with minimal modification (updating IAM role definition and installing the necessary libraries).\n\n## :notebook: Example Notebook Categories\n\n### End-to-End ML Lifecycle\n\nThese examples are a diverse collection of end-to-end notebooks that demonstrate how to build, train, and deploy machine learning models using Amazon SageMaker. These notebooks cover a wide range of machine learning tasks and use cases, providing you with a comprehensive understanding of the SageMaker workflow. Each notebook in this folder is self-contained and includes detailed documentation, code samples, and instructions for running the examples on SageMaker. Whether you're a beginner or an experienced practitioner, this folder offers a comprehensive collection of end-to-end notebooks that will help you leverage the power of Amazon SageMaker for a wide range of machine learning tasks and use cases.\n\n### Prepare Data\n\nThe example notebooks within this folder showcase Sagemaker's data preparation capabilities. Data preparation in machine learning refers to the process of collecting, preprocessing, and organizing raw data to make it suitable for analysis and modeling. This step ensures that the data is in a format from which machine learning algorithms can effectively learn. Data preparation tasks may include handling missing values, removing outliers, scaling features, encoding categorical variables, assessing potential biases and taking steps to mitigate them, splitting data into training and testing sets, labeling, and other necessary transformations to optimize the quality and usability of the data for subsequent machine learning tasks.\n\n### Build and Train Models\n\nAmazon SageMaker Training is a fully managed machine learning (ML) service offered by SageMaker that helps you efficiently build and train a wide range of ML models at scale. The core of SageMaker jobs is the containerization of ML workloads and the capability of managing AWS compute resources. The SageMaker Training platform takes care of the heavy lifting associated with setting up and managing infrastructure for ML training workloads. With SageMaker Training, you can focus on building, developing, training, and fine-tuning your model.\n\n### Deploy and Monitor\n\nWith Amazon SageMaker, you can start getting predictions, or inferences, from your trained machine learning models. SageMaker provides a broad selection of ML infrastructure and model deployment options to help meet all your ML inference needs. With SageMaker Inference, you can scale your model deployment, manage models more effectively in production, and reduce operational burden. SageMaker provides you with various inference options, such as real-time endpoints for getting low latency inference, serverless endpoints for fully managed infrastructure and auto-scaling, and asynchronous endpoints for batches of requests. By leveraging the appropriate inference option for your use case, you can ensure efficient and model deployment and inference.\n\nAfter you deploy a model into your production environment, use Amazon SageMaker model monitor to continuously monitor the quality of your machine learning models in real time. Amazon SageMaker model monitor enables you to set up an automated alert triggering system when there are deviations in the model quality, such as data drift and anomalies. Amazon CloudWatch Logs collects log files of monitoring the model status and notifies when the quality of your model hits certain thresholds that you preset. CloudWatch stores the log files to an Amazon S3 bucket you specify. Early and pro-active detection of model deviations through AWS model monitor products enables you to take prompt actions to maintain and improve the quality of your deployed model.\n\n### Generative AI\n\nThese examples showcases Amazon SageMaker's capabilities in the exciting field of generative artificial intelligence (AI). Generative AI models are designed to create new, synthetic data across various modalities, such as text, images, audio, and video, based on the patterns and relationships learned from training data. These examples provide detailed documentation, code samples, and instructions for running the generative AI models on SageMaker. And demonstrate how to preprocess data, train models, fine-tune hyperparameters, and deploy the trained models for inference.\n\nWhether you're interested in exploring the latest advancements in generative AI, or seeking to leverage these techniques for creative applications or content generation, this folder offers a comprehensive collection of examples that will help you unlock the power of SageMaker's generative AI capabilities and push the boundaries of what's possible with machine learning.\n\n### ML Ops\n\nAmazon SageMaker supports features to implement machine learning models in production environments with continuous integration and deployment. MLOps accounts for the unique aspects of AI/ML projects in project management, CI/CD, and quality assurance, helping you improve delivery time, reduce defects, and make data science more productive. MLOps refers to a methodology that is built on applying DevOps practices to machine learning workloads.\n\n### Responsible AI\n\nAmazon SageMaker offers features to improve your machine learning (ML) models by detecting potential bias and helping to explain the predictions that your models make from your tabular, computer vision, natural processing, or time series datasets. It helps you identify various types of bias in pre-training data and in post-training that can emerge during model training or when the model is in production. You can also evaluate a language model for model quality and responsibility metrics using foundation model evaluations.\n\nModel governance is a framework that gives systematic visibility into machine learning (ML) model development, validation, and usage. Amazon SageMaker provides purpose-built ML governance tools for managing control access, activity tracking, and reporting across the ML lifecycle. Manage least-privilege permissions for ML practitioners using Amazon SageMaker Role Manager, create detailed model documentation using Amazon SageMaker Model Cards, and gain visibility into your models with centralized dashboards using Amazon SageMaker Model Dashboard.\n\n## :balance_scale: License\n\nThis library is licensed under the [Apache 2.0 License](http://aws.amazon.com/apache2.0/).\nFor more details, please take a look at the [LICENSE](https://github.com/aws/amazon-sagemaker-examples/blob/master/LICENSE.txt) file.\n\n## :handshake: Contributing\n\nAlthough we're extremely excited to receive contributions from the community, we're still working on the best mechanism to take in examples from external sources. Please bear with us in the short-term if pull requests take longer than expected or are closed.\nPlease read our [contributing guidelines](https://github.com/aws/amazon-sagemaker-examples/blob/default/CONTRIBUTING.md)\nif you'd like to open an issue or submit a pull request.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A51C:3FA0D:172400:5C4BB4:6AB92114"},"text_sha256":"6f6dcfd940a03a296263cc74be13ee8ecb357fd943c13f531430a98065f589cc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mozilla/TTS","input_row":{"repository":"mozilla/TTS","url":"https://github.com/mozilla/TTS","name":"TTS","owner":"mozilla","description":":robot: :speech_balloon: Deep learning for Text to Speech  (Discussion forum: https://discourse.mozilla.org/c/tts)","language":"Jupyter Notebook","license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0","license_osi_approved":"true","stars":10173,"issues":570,"created_at":"2018-01-23T14:22:06Z","updated_at":"2026-09-26T20:04:46Z","first_commit_at":"2018-01-22T09:48:59Z","last_commit_at":"2021-02-12T10:36:31Z","activity_months":36.700000000000003,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:31:05.930Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mozilla/TTS","visibility":"public","created_at":"2018-01-23T14:22:06Z","updated_at":"2026-09-26T20:04:46Z","private":false,"fork":false,"archived":false,"stargazers_count":10173,"open_issues_count":38,"license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0"},"error":"","rate":{"github_remaining":"3269","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:17EEE03:1C0E509:6AB928A9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3267","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E3:72BD3:17E2844:1C02054:6AB928D9"},"commit":{"sha":"fe99baec5a31b743abd0049a1754e59adc0bc22c","url":"https://github.com/mozilla/TTS/commit/fe99baec5a31b743abd0049a1754e59adc0bc22c","date":"2018-05-23T13:20:04Z","author_date":"2018-05-23T13:20:04Z","committer_date":"2018-05-23T13:20:04Z","tree_sha":"b971966fd9b31f5bed8ef16d86b43b8360cf70b2","message_first_line":"Add a missing class variable to attention class"},"tree_request_status":200,"tree_rate":{"github_remaining":"3266","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17BA1EE:1BD9C46:6AB928D9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4343,"blob_sha":"ed60338c12584b5cffd2b0a6a9e8a2af5aa9765d","priority":0}],"documents":[{"path":"README.md","size":4343,"blob_sha":"ed60338c12584b5cffd2b0a6a9e8a2af5aa9765d","priority":0,"status":200,"text":"# TTS (Work in Progress...)\nTTS targets a Text2Speech engine lightweight in computation with hight quality speech construction. \n\nHere we have pytorch implementation of Tacotron: [A Fully End-to-End Text-To-Speech Synthesis Model](https://arxiv.org/abs/1703.10135) as the start point. We plan to improve the model by the time with new architectural changes.\n\nYou can find [here](http://www.erogol.com/speech-text-deep-learning-architectures/) a brief note pointing possible TTS architectures and their comparisons.\n\n## Requirements\nHighly recommended to use [miniconda](https://conda.io/miniconda.html) for easier installation.\n  * python 3.6\n  * pytorch 0.4\n  * librosa\n  * tensorboard\n  * tensorboardX\n  * matplotlib\n  * unidecode\n \n## Checkpoints and Audio Samples\nCheckout [here](https://mycroft.ai/blog/available-voices/#the-human-voice-is-the-most-perfect-instrument-of-all-arvo-part) to compare the samples (except the first) below.\n\n| Models        | Commit            | Audio Sample  |\n| ------------- |:-----------------:|:-------------|\n| [iter-62410](https://drive.google.com/open?id=1pjJNzENL3ZNps9n7k_ktGbpEl6YPIkcZ)| [99d56f7](https://github.com/mozilla/TTS/tree/99d56f7e93ccd7567beb0af8fcbd4d24c48e59e9)           | [link](https://soundcloud.com/user-565970875/99d56f7-iter62410 )|\n| Best: [iter-170K](https://drive.google.com/open?id=16L6JbPXj6MSlNUxEStNn28GiSzi4fu1j) | [e00bc66]() |[link](https://soundcloud.com/user-565970875/april-13-2018-07-06pm-e00bc66-iter170k)|\n\n## Data\nCurrently TTS provides data loaders for\n- [LJ Speech](https://keithito.com/LJ-Speech-Dataset/)\n\n## Training the network\nTo run your own training, you need to define a ```config.json``` file (simple template below) and call with the command.\n\n```train.py --config_path config.json```\n\nIf you like to use specific set of GPUs.\n\n```CUDA_VISIBLE_DEVICES=\"0,1,4\" train.py --config_path config.json```\n\nEach run creates an experiment folder with the corresponfing date and time, under the folder you set in ```config.json```. And if there is no checkpoint yet under that folder, it is going to be removed when you press Ctrl+C.\n\nYou can also enjoy Tensorboard with couple of good training logs, if you point ```--logdir``` the experiment folder.\n\nExample ```config.json```:\n```\n{\n  \"num_mels\": 80,\n  \"num_freq\": 1025,\n  \"sample_rate\": 22050,\n  \"frame_length_ms\": 50,\n  \"frame_shift_ms\": 12.5,\n  \"preemphasis\": 0.97,\n  \"min_level_db\": -100,\n  \"ref_level_db\": 20,\n  \"embedding_size\": 256,\n  \"text_cleaner\": \"english_cleaners\",\n\n  \"epochs\": 200,\n  \"lr\": 0.002,\n  \"warmup_steps\": 4000,\n  \"batch_size\": 32,\n  \"eval_batch_size\":32,\n  \"r\": 5,\n  \"mk\": 0.0,  // guidede attention loss weight. if 0 no use\n  \"priority_freq\": true,  // freq range emphasis\n\n  \"griffin_lim_iters\": 60,\n  \"power\": 1.2,\n\n  \"dataset\": \"TWEB\",\n  \"meta_file_train\": \"transcript_train.txt\",\n  \"meta_file_val\": \"transcript_val.txt\",\n  \"data_path\": \"/data/shared/BibleSpeech/\",\n  \"min_seq_len\": 0, \n  \"num_loader_workers\": 8,\n\n  \"checkpoint\": true,  // if save checkpoint per save_step\n  \"save_step\": 200,\n  \"output_path\": \"/path/to/my_experiment\",\n}\n```\n\n## Testing\nBest way to test your pretrained network is to use the Notebook under ```notebooks``` folder. \n\n## Contribution\nAny kind of contribution is highly welcome as we are propelled by the open-source spirit. If you like to add or edit things in code, please also consider to write tests to verify your segment so that we can be sure things are on the track as this repo gets bigger. \n\n## TODO\nCheckout issues and Project field.\n\n## References\n- [Efficient Neural Audio Synthesis](https://arxiv.org/pdf/1802.08435.pdf)\n- [Attention-Based models for speech recognition](https://arxiv.org/pdf/1506.07503.pdf)\n- [Generating Sequences With Recurrent Neural Networks](https://arxiv.org/pdf/1308.0850.pdf)\n- [Char2Wav: End-to-End Speech Synthesis](https://openreview.net/pdf?id=B1VWyySKx)\n- [VoiceLoop: Voice Fitting and Synthesis via a Phonological Loop](https://arxiv.org/pdf/1707.06588.pdf)\n- [WaveRNN](https://arxiv.org/pdf/1802.08435.pdf)\n- [Faster WaveNet](https://arxiv.org/abs/1611.09482) \n- [Parallel WaveNet](https://arxiv.org/abs/1711.10433)\n        \n### Precursor implementations\n- https://github.com/keithito/tacotron (Dataset and Test processing)\n- https://github.com/r9y9/tacotron_pytorch (Initial Tacotron architecture)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"714A:35999:172456:5C4D69:6AB9211E"},"text_sha256":"30ee79180261e45c5edd697b783d6db15027850aafbfaf0a7d598487a81924be"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3265","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CD:280FBC:17A5D47:1BC4421:6AB928DA"},"commit":{"sha":"e9e07844b77a43fb0864354791fb4cf72ffded11","url":"https://github.com/mozilla/TTS/commit/e9e07844b77a43fb0864354791fb4cf72ffded11","date":"2021-02-12T10:36:31Z","author_date":"2021-02-12T10:36:31Z","committer_date":"2021-02-12T10:36:31Z","tree_sha":"5bd5b389021009762be652e5c66a41a4792cfb47","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3264","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17C2995:1BE26D7:6AB928DA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14293,"blob_sha":"9dac0542d5f5f1e104ed18a996909e7f942776ec","priority":0}],"documents":[{"path":"README.md","size":14293,"blob_sha":"9dac0542d5f5f1e104ed18a996909e7f942776ec","priority":0,"status":200,"text":"<img src=\"https://user-images.githubusercontent.com/1402048/104139991-3fd15e00-53af-11eb-8640-3a78a64641dd.png\" data-canonical-src=\"![TTS banner](https://user-images.githubusercontent.com/1402048/104139991-3fd15e00-53af-11eb-8640-3a78a64641dd.png =250x250)\n\" width=\"256\" height=\"256\" align=\"right\" />\n\n# TTS: Text-to-Speech for all.\n\nTTS is a library for advanced Text-to-Speech generation. It's built on the latest research, was designed to achieve the best trade-off among ease-of-training, speed and quality.\nTTS comes with [pretrained models](https://github.com/mozilla/TTS/wiki/Released-Models), tools for measuring dataset quality and already used in **20+ languages** for products and research projects.\n\n[![CircleCI](<https://circleci.com/gh/mozilla/TTS/tree/dev.svg?style=svg>)]()\n[![License](<https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg>)](https://opensource.org/licenses/MPL-2.0)\n[![PyPI version](https://badge.fury.io/py/TTS.svg)](https://badge.fury.io/py/TTS)\n\n:loudspeaker: [English Voice Samples](https://erogol.github.io/ddc-samples/) and [SoundCloud playlist](https://soundcloud.com/user-565970875/pocket-article-wavernn-and-tacotron2)\n\n:man_cook:  [TTS training recipes](https://github.com/erogol/TTS_recipes)\n\n:page_facing_up: [Text-to-Speech paper collection](https://github.com/erogol/TTS-papers)\n\n## 💬 Where to ask questions\nPlease use our dedicated channels for questions and discussion. Help is much more valuable if it's shared publicly, so that more people can benefit from it.\n\n| Type                            | Platforms                               |\n| ------------------------------- | --------------------------------------- |\n| 🚨 **Bug Reports**              | [GitHub Issue Tracker]                  |\n| ❔ **FAQ**                       | [TTS/Wiki](https://github.com/mozilla/TTS/wiki/FAQ)                              |\n| 🎁 **Feature Requests & Ideas** | [GitHub Issue Tracker]                  |\n| 👩‍💻 **Usage Questions**          | [Discourse Forum]                       |\n| 🗯 **General Discussion**        | [Discourse Forum] and [Matrix Channel]  |\n\n[github issue tracker]: https://github.com/mozilla/tts/issues\n[discourse forum]: https://discourse.mozilla.org/c/tts/\n[matrix channel]: https://matrix.to/#/!KTePhNahjgiVumkqca:matrix.org?via=matrix.org\n[Tutorials and Examples]: https://github.com/mozilla/TTS/wiki/TTS-Notebooks-and-Tutorials\n\n\n## 🔗 Links and Resources\n| Type                            | Links                               |\n| ------------------------------- | --------------------------------------- |\n| 💾 **Installation** | [TTS/README.md](https://github.com/mozilla/TTS/tree/dev#install-tts)|\n| 👩🏾‍🏫 **Tutorials and Examples**  | [TTS/Wiki](https://github.com/mozilla/TTS/wiki/TTS-Notebooks-and-Tutorials) |\n| 🚀 **Released Models**         | [TTS/Wiki](https://github.com/mozilla/TTS/wiki/Released-Models)|\n| 💻 **Docker Image**            | [Repository by @synesthesiam](https://github.com/synesthesiam/docker-mozillatts)|\n| 🖥️ **Demo Server**             | [TTS/server](https://github.com/mozilla/TTS/tree/master/TTS/server)|\n| 🤖 **Running TTS on Terminal** | [TTS/README.md](https://github.com/mozilla/TTS#example-synthesizing-speech-on-terminal-using-the-released-models)|\n| ✨ **How to contribute**       |[TTS/README.md](#contribution-guidelines)|\n\n## 🥇 TTS Performance\n<p align=\"center\"><img src=\"https://discourse-prod-uploads-81679984178418.s3.dualstack.us-west-2.amazonaws.com/optimized/3X/6/4/6428f980e9ec751c248e591460895f7881aec0c6_2_1035x591.png\" width=\"800\" /><\/p>\n\n\"Mozilla*\" and \"Judy*\" are our models.\n[Details...](https://github.com/mozilla/TTS/wiki/Mean-Opinion-Score-Results)\n\n## Features\n- High performance Deep Learning models for Text2Speech tasks.\n    - Text2Spec models (Tacotron, Tacotron2, Glow-TTS, SpeedySpeech).\n    - Speaker Encoder to compute speaker embeddings efficiently.\n    - Vocoder models (MelGAN, Multiband-MelGAN, GAN-TTS, ParallelWaveGAN, WaveGrad, WaveRNN)\n- Fast and efficient model training.\n- Detailed training logs on console and Tensorboard.\n- Support for multi-speaker TTS.\n- Efficient Multi-GPUs training.\n- Ability to convert PyTorch models to Tensorflow 2.0 and TFLite for inference.\n- Released models in PyTorch, Tensorflow and TFLite.\n- Tools to curate Text2Speech datasets under```dataset_analysis```.\n- Demo server for model testing.\n- Notebooks for extensive model benchmarking.\n- Modular (but not too much) code base enabling easy testing for new ideas.\n\n## Implemented Models\n### Text-to-Spectrogram\n- Tacotron: [paper](https://arxiv.org/abs/1703.10135)\n- Tacotron2: [paper](https://arxiv.org/abs/1712.05884)\n- Glow-TTS: [paper](https://arxiv.org/abs/2005.11129)\n- Speedy-Speech: [paper](https://arxiv.org/abs/2008.03802)\n\n### Attention Methods\n- Guided Attention: [paper](https://arxiv.org/abs/1710.08969)\n- Forward Backward Decoding: [paper](https://arxiv.org/abs/1907.09006)\n- Graves Attention: [paper](https://arxiv.org/abs/1907.09006)\n- Double Decoder Consistency: [blog](https://erogol.com/solving-attention-problems-of-tts-models-with-double-decoder-consistency/)\n\n### Speaker Encoder\n- GE2E: [paper](https://arxiv.org/abs/1710.10467)\n- Angular Loss: [paper](https://arxiv.org/pdf/2003.11982.pdf)\n\n### Vocoders\n- MelGAN: [paper](https://arxiv.org/abs/1910.06711)\n- MultiBandMelGAN: [paper](https://arxiv.org/abs/2005.05106)\n- ParallelWaveGAN: [paper](https://arxiv.org/abs/1910.11480)\n- GAN-TTS discriminators: [paper](https://arxiv.org/abs/1909.11646)\n- WaveRNN: [origin](https://github.com/fatchord/WaveRNN/)\n- WaveGrad: [paper](https://arxiv.org/abs/2009.00713)\n\nYou can also help us implement more models. Some TTS related work can be found [here](https://github.com/erogol/TTS-papers).\n\n## Install TTS\nTTS supports **python >= 3.6, <3.9**.\n\nIf you are only interested in [synthesizing speech](https://github.com/mozilla/TTS/tree/dev#example-synthesizing-speech-on-terminal-using-the-released-models) with the released TTS models, installing from PyPI is the easiest option.\n\n```bash\npip install TTS\n```\n\nIf you plan to code or train models, clone TTS and install it locally.\n\n```bash\ngit clone https://github.com/mozilla/TTS\npip install -e .\n```\n\n## Directory Structure\n```\n|- notebooks/       (Jupyter Notebooks for model evaluation, parameter selection and data analysis.)\n|- utils/           (common utilities.)\n|- TTS\n    |- bin/             (folder for all the executables.)\n      |- train*.py                  (train your target model.)\n      |- distribute.py              (train your TTS model using Multiple GPUs.)\n      |- compute_statistics.py      (compute dataset statistics for normalization.)\n      |- convert*.py                (convert target torch model to TF.)\n    |- tts/             (text to speech models)\n        |- layers/          (model layer definitions)\n        |- models/          (model definitions)\n        |- tf/              (Tensorflow 2 utilities and model implementations)\n        |- utils/           (model specific utilities.)\n    |- speaker_encoder/ (Speaker Encoder models.)\n        |- (same)\n    |- vocoder/         (Vocoder models.)\n        |- (same)\n```\n\n## Sample Model Output\nBelow you see Tacotron model state after 16K iterations with batch-size 32 with LJSpeech dataset.\n\n> \"Recent research at Harvard has shown meditating for as little as 8 weeks can actually increase the grey matter in the parts of the brain responsible for emotional regulation and learning.\"\n\nAudio examples: [soundcloud](https://soundcloud.com/user-565970875/pocket-article-wavernn-and-tacotron2)\n\n<img src=\"images/example_model_output.png?raw=true\" alt=\"example_output\" width=\"400\"/>\n\n## Datasets and Data-Loading\nTTS provides a generic dataloader easy to use for your custom dataset.\nYou just need to write a simple function to format the dataset. Check ```datasets/preprocess.py``` to see some examples.\nAfter that, you need to set ```dataset``` fields in ```config.json```.\n\nSome of the public datasets that we successfully applied TTS:\n\n- [LJ Speech](https://keithito.com/LJ-Speech-Dataset/)\n- [Nancy](http://www.cstr.ed.ac.uk/projects/blizzard/2011/lessac_blizzard2011/)\n- [TWEB](https://www.kaggle.com/bryanpark/the-world-english-bible-speech-dataset)\n- [M-AI-Labs](http://www.caito.de/2019/01/the-m-ailabs-speech-dataset/)\n- [LibriTTS](https://openslr.org/60/)\n- [Spanish](https://drive.google.com/file/d/1Sm_zyBo67XHkiFhcRSQ4YaHPYM0slO_e/view?usp=sharing) - thx! @carlfm01\n\n## Example: Synthesizing Speech on Terminal Using the Released Models.\n\nAfter the installation, TTS provides a CLI interface for synthesizing speech using pre-trained models. You can either use your own model or the release models under the TTS project.\n\nListing released TTS models.\n```bash\ntts --list_models\n```\n\nRun a tts and a vocoder model from the released model list. (Simply copy and paste the full model names from the list as arguments for the command below.)\n```bash\ntts --text \"Text for TTS\" \\\n    --model_name \"<type>/<language>/<dataset>/<model_name>\" \\\n    --vocoder_name \"<type>/<language>/<dataset>/<model_name>\" \\\n    --out_path folder/to/save/output/\n```\n\nRun your own TTS model (Using Griffin-Lim Vocoder)\n```bash\ntts --text \"Text for TTS\" \\\n    --model_path path/to/model.pth.tar \\\n    --config_path path/to/config.json \\\n    --out_path output/path/speech.wav\n```\n\nRun your own TTS and Vocoder models\n```bash\ntts --text \"Text for TTS\" \\\n    --model_path path/to/config.json \\\n    --config_path path/to/model.pth.tar \\\n    --out_path output/path/speech.wav \\\n    --vocoder_path path/to/vocoder.pth.tar \\\n    --vocoder_config_path path/to/vocoder_config.json\n```\n\n**Note:** You can use ```./TTS/bin/synthesize.py``` if you prefer running ```tts``` from the TTS project folder.\n\n## Example: Training and Fine-tuning LJ-Speech Dataset\nHere you can find a [CoLab](https://gist.github.com/erogol/97516ad65b44dbddb8cd694953187c5b) notebook for a hands-on example, training LJSpeech. Or you can manually follow the guideline below.\n\nTo start with, split ```metadata.csv``` into train and validation subsets respectively ```metadata_train.csv``` and ```metadata_val.csv```. Note that for text-to-speech, validation performance might be misleading since the loss value does not directly measure the voice quality to the human ear and it also does not measure the attention module performance. Therefore, running the model with new sentences and listening to the results is the best way to go.\n\n```\nshuf metadata.csv > metadata_shuf.csv\nhead -n 12000 metadata_shuf.csv > metadata_train.csv\ntail -n 1100 metadata_shuf.csv > metadata_val.csv\n```\n\nTo train a new model, you need to define your own ```config.json``` to define model details, trainin configuration and more (check the examples). Then call the corressponding train script.\n\nFor instance, in order to train a tacotron or tacotron2 model on LJSpeech dataset, follow these steps.\n\n```bash\npython TTS/bin/train_tacotron.py --config_path TTS/tts/configs/config.json\n```\n\nTo fine-tune a model, use ```--restore_path```.\n\n```bash\npython TTS/bin/train_tacotron.py --config_path TTS/tts/configs/config.json --restore_path /path/to/your/model.pth.tar\n```\n\nTo continue an old training run, use ```--continue_path```.\n\n```bash\npython TTS/bin/train_tacotron.py --continue_path /path/to/your/run_folder/\n```\n\nFor multi-GPU training, call ```distribute.py```. It runs any provided train script in multi-GPU setting.\n\n```bash\nCUDA_VISIBLE_DEVICES=\"0,1,4\" python TTS/bin/distribute.py --script train_tacotron.py --config_path TTS/tts/configs/config.json\n```\n\nEach run creates a new output folder accomodating used ```config.json```, model checkpoints and tensorboard logs.\n\nIn case of any error or intercepted execution, if there is no checkpoint yet under the output folder, the whole folder is going to be removed.\n\nYou can also enjoy Tensorboard,  if you point Tensorboard argument```--logdir``` to the experiment folder.\n\n## Contribution Guidelines\nThis repository is governed by Mozilla's code of conduct and etiquette guidelines. For more details, please read the [Mozilla Community Participation Guidelines.](https://www.mozilla.org/about/governance/policies/participation/)\n\n1. Create a new branch.\n2. Implement your changes.\n3. (if applicable) Add [Google Style](https://google.github.io/styleguide/pyguide.html#381-docstrings) docstrings.\n4. (if applicable) Implement a test case under ```tests``` folder.\n5. (Optional but Prefered) Run tests. \n```bash\n./run_tests.sh\n```\n6. Run the linter.\n```bash\npip install pylint cardboardlint\ncardboardlinter --refspec master\n```\n7. Send a PR to ```dev``` branch, explain what the change is about.\n8. Let us discuss until we make it perfect :). \n9. We merge it to the ```dev``` branch once things look good. \n\nFeel free to ping us at any step you need help using our communication channels.\n\n## Collaborative Experimentation Guide\nIf you like to use TTS to try a new idea and like to share your experiments with the community, we urge you to use the following guideline for a better collaboration.\n(If you have an idea for better collaboration, let us know)\n- Create a new branch.\n- Open an issue pointing your branch.\n- Explain your idea and experiment.\n- Share your results regularly. (Tensorboard log files, audio results, visuals etc.)\n\n## Major TODOs\n- [x] Implement the model.\n- [x] Generate human-like speech on LJSpeech dataset.\n- [x] Generate human-like speech on a different dataset (Nancy) (TWEB).\n- [x] Train TTS with r=1 successfully.\n- [x] Enable process based distributed training. Similar to (https://github.com/fastai/imagenet-fast/).\n- [x] Adapting Neural Vocoder. TTS works with WaveRNN and ParallelWaveGAN (https://github.com/erogol/WaveRNN and https://github.com/erogol/ParallelWaveGAN)\n- [x] Multi-speaker embedding.\n- [x] Model optimization (model export, model pruning etc.)\n\n### Acknowledgement\n- https://github.com/keithito/tacotron (Dataset pre-processing)\n- https://github.com/r9y9/tacotron_pytorch (Initial Tacotron architecture)\n- https://github.com/kan-bayashi/ParallelWaveGAN (vocoder library)\n- https://github.com/jaywalnut310/glow-tts (Original Glow-TTS implementation)\n- https://github.com/fatchord/WaveRNN/ (Original WaveRNN implementation)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:174B31:5C736B:6AB9211C"},"text_sha256":"9b95853734280bcfb0c924e32cf28b5d6eb4e050d7a9ab483173c5c41117a62b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"OpenMined/PySyft","input_row":{"repository":"OpenMined/PySyft","url":"https://github.com/OpenMined/PySyft","name":"PySyft","owner":"OpenMined","description":"Perform data science on data that remains in someone else's server","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":10038,"issues":3417,"created_at":"2017-07-18T20:41:16Z","updated_at":"2026-09-27T09:58:21Z","first_commit_at":"2017-07-18T20:41:16Z","last_commit_at":"2026-09-25T18:54:41Z","activity_months":110.25,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:31:55.594Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"OpenMined/PySyft","visibility":"public","created_at":"2017-07-18T20:41:16Z","updated_at":"2026-09-27T09:58:21Z","private":false,"fork":false,"archived":false,"stargazers_count":10038,"open_issues_count":22,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3263","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:17D7D5E:1BF70F6:6AB928DB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3262","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:17EC4A3:1C0C24F:6AB928DB"},"commit":{"sha":"4677f9a8566580efd631808dd5cada79c2ceb3e6","url":"https://github.com/OpenMined/PySyft/commit/4677f9a8566580efd631808dd5cada79c2ceb3e6","date":"2018-05-22T16:43:53Z","author_date":"2018-05-22T16:43:53Z","committer_date":"2018-05-22T16:43:53Z","tree_sha":"4c1723d6581c1a1b6642f6e773760af070f78817","message_first_line":"Merge branch 'grid_to_syft_merge' of https://github.com/OpenMined/PySyft into grid_to_syft_merge"},"tree_request_status":200,"tree_rate":{"github_remaining":"3261","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F8:2BC4E5:180A839:1C29EE8:6AB928DC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":205,"blob_sha":"60faebcf34de73d74903f7daaed1cf3ce63940a8","priority":0}],"documents":[{"path":"README.md","size":205,"blob_sha":"60faebcf34de73d74903f7daaed1cf3ce63940a8","priority":0,"status":200,"text":"# PySyft\r\nA Library for Private, Secure Deep Learning\r\n\r\n\r\n## Installation\r\n\r\n```\r\npip install -r requirements.txt\r\n\r\npython3 setup.py install\r\n```\r\n\r\n## Run Unit Tests\r\n\r\n```\r\npython3 setup.py test\r\n```\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11AE:3C4A0:1758ED:5C81C2:6AB92120"},"text_sha256":"2a65d99bd14855e77d0132b593ff34e4fe7606658efa41ef62cce9717fc83275"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3260","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D5:1DB627:1857ECF:1C77BC9:6AB928DC"},"commit":{"sha":"793f535032222e9d4b7c8fa7d34104121e8e2471","url":"https://github.com/OpenMined/PySyft/commit/793f535032222e9d4b7c8fa7d34104121e8e2471","date":"2026-06-30T15:51:58Z","author_date":"2026-06-30T15:51:58Z","committer_date":"2026-06-30T15:51:58Z","tree_sha":"d34c777c89a7975fb713f5cb0eec6f06a79056d3","message_first_line":"feat: add syft-migration package foundation"},"tree_request_status":200,"tree_rate":{"github_remaining":"3259","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:D6F807:FC9D97:6AB928DD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8183,"blob_sha":"58104c3c2c679b44fd82a15fc255bf846beaf73e","priority":0},{"path":"packages/syft-enclave/docs/security.md","size":6763,"blob_sha":"508e9f978804ed08c09330d4e7fd366ab41a3de5","priority":1}],"documents":[{"path":"README.md","size":8183,"blob_sha":"58104c3c2c679b44fd82a15fc255bf846beaf73e","priority":0,"status":200,"text":"<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/Syft-Logo-Light.svg\">\n  <img alt=\"Syft Logo\" src=\"docs/img/Syft-Logo.svg\" width=\"200px\" />\n<\/picture>\n\n# Syft-client (PySyft v2)\n\n[![Unit Tests](https://github.com/OpenMined/pysyft/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/OpenMined/PySyft/actions/workflows/unit-tests.yml)\n[![Integration Tests](https://github.com/OpenMined/pysyft/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/OpenMined/pysyft/actions/workflows/integration-tests.yml)\n[![PyPI](https://img.shields.io/pypi/v/syft-client)](https://pypi.org/project/syft-client/)\n[![Python 3.10+](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FOpenMined%2Fpysyft%2Fdev%2Fpyproject.toml)](https://github.com/OpenMined/pysyft)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/OpenMined/pysyft/blob/main/pyproject.toml)\n\nSyft client lets data scientists submit computations which are ran by data owners on private data — all through cloud storage their organizations already use (Google Drive, Microsoft 365, etc.). No new infrastructure required.\n\n## Docs\n\n- [Workflow](docs/workflow.md) — End-to-end privacy-preserving data analysis workflow\n- [API Reference](docs/API.md) — All public client methods and properties\n- [Authentication & Setup](docs/auth.md) — Google Cloud OAuth setup for local/Jupyter usage\n- [Background Services](packages/syft-bg/README.md) — Email notifications, auto-approval, and TUI dashboard\n- [Connections](docs/connections.md) — How the Google Drive transport layer works\n- [Permissions](packages/syft-permissions/docs/permission-user-docs.md) - Permissions for syft-client\n- [Enclaves](packages/syft-enclave) - Enclaves with syft-client\n\n## Features\n\n- **Privacy-preserving** — Private data never leaves the data owner's machine; only approved results are shared\n- **Transport-agnostic** — Works over Google Drive today, extensible to any file-based transport\n- **Offline-first** — Full functionality even when peers are offline; changes sync when connectivity resumes\n- **Peer-to-peer with explicit auth** — Data owners must approve each collaborator before any data flows\n- **Isolated job execution** — Jobs run in sandboxed Python virtual environments with controlled access to private data\n- **Dataset sharing with mock/private separation** — Data scientists explore mock data, then submit jobs that run on the real thing\n\n## Quick Start\n\n```\nuv pip install syft-client\n```\n\n```python\nimport syft_client as sc\n```\n\n```python\n# Login (colab auth, for non-colab pass token_path)\ndo = sc.login_do(email=\"do@org.com\")\nds = sc.login_ds(email=\"ds@org.com\")\n\n# Peer request & approve\nds.add_peer(\"do@org.com\")\ndo.approve_peer_request(\"ds@org.com\")\n\n# Create & sync dataset\ndo.create_dataset(\n    name=\"census\",\n    mock_path=\"mock.txt\",\n    private_path=\"private.txt\",\n    users=[\"ds@org.com\"],\n)\ndo.sync(); ds.sync()\ndatasets = ds.datasets.get_all()\n```\n\nWrite an `analysis.py` that reads the dataset and produces a result in our case this is just the length of the data. Inside a job, `resolve_dataset_file_path` automatically resolves to the **private** data:\n\n```python\n# analysis.py\nimport json\nimport syft_client as sc\n\ndata_path = sc.resolve_dataset_file_path(\"census\")\nwith open(data_path, \"r\") as f:\n    data = f.read()\n\nwith open(\"outputs/result.json\", \"w\") as f:\n    json.dump({\"length\": len(data)}, f)\n```\n\nSubmit the job and retrieve results:\n\n```python\n# Submit job\nds.submit_python_job(\n    user=\"do@org.com\",\n    code_path=\"analysis.py\",\n)\nds.sync(); do.sync()\n\n# Data owner Approves & runs job\ndo.jobs[0].approve()\ndo.process_approved_jobs(share_outputs_with_submitter=True)\ndo.sync(); ds.sync()\nresult = open(ds.jobs[-1].output_paths[0]).read()\n```\n\n## Packages\n\n| Package                                         | Description                                   |\n| ----------------------------------------------- | --------------------------------------------- |\n| [`syft-datasets`](packages/syft-datasets)       | Dataset management and sharing                |\n| [`syft-job`](packages/syft-job)                 | Job submission and execution                  |\n| [`syft-permissions`](packages/syft-permissions) | Permission system for Syft datasites          |\n| [`syft-perms`](packages/syft-perms)             | User-facing permission API for Syft datasites |\n| [`syft-bg`](packages/syft-bg)                   | Background services TUI dashboard for SyftBox |\n| [`syft-notebook-ui`](packages/syft-notebook-ui) | Jupyter notebook display utilities            |\n\n## Development\n\n```bash\n# Install in development mode\nuv pip install -e .\n\n# Run tests\njust test-unit          # Unit tests (fast, mocked)\njust test-integration   # Integration tests (slow, real API)\n```\n\n---\n\nBuilt by [OpenMined](https://openmined.org) — building open-source technology for privacy-preserving data science and AI.\n\n## Support\n\nFor questions about PySyft, reach out via `#support` on <a href=\"https://slack.openmined.org/\">Slack<\/a>.\n\n# Community\n\nSupported by the OpenMined Foundation, the OpenMined Community is an online network of over 17,000 technologists, researchers, and industry professionals keen to _unlock 1000x more data in every scientific field and industry_.\n\n<a href=\"https://join.slack.com/t/openmined/shared_invite/zt-2hxwk07i9-HO7u5C7XOgou4Z62VU78zA\"><img width=150px src=\"https://img.shields.io/badge/Join_us-%20slack-purple?logo=slack\" /><\/a>\n\n# Contributors\n\nOpenMined and Syft appreciates all contributors, if you would like to fix a bug or suggest a new feature, please reach out via <a href=\"https://github.com/OpenMined/PySyft/issues\">Github<\/a> or <a href=\"https://join.slack.com/t/openmined/shared_invite/zt-2hxwk07i9-HO7u5C7XOgou4Z62VU78zA/\">Slack<\/a>!\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/contributors_dark.jpg\">\n  <img src=\"docs/img/contributors_light.jpg\" alt=\"Contributors\" width=\"100%\" />\n<\/picture>\n\n# About OpenMined\n\nOpenMined is a non-profit foundation creating technology infrastructure that helps researchers get answers from data without needing a copy or direct access. Our community of technologists is building Syft.\n\n<a href=\"https://donate.stripe.com/fZe03H0aLdAO59e9AA\n\"><img width=200px src=\"https://img.shields.io/badge/Donate_to-OpenMined-yellow?logo=stripe\" /><\/a>\n\n# Supporters\n\n<table border=\"0\">\n<tr>\n<th align=\"center\">\n<a href=\"https://sloan.org/\"><img src=\"docs/img/logo_sloan.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://opensource.fb.com/\"><img src=\"docs/img/logo_meta.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://pytorch.org/\"><img src=\"docs/img/logo_torch.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://www.dpmc.govt.nz/\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/logo_nz_dark.png\">\n  <img src=\"docs/img/logo_nz_light.png\" />\n<\/picture>\n<\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://twitter.com/\"><img src=\"docs/img/logo_twitter.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://google.com/\"><img src=\"docs/img/logo_google.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://microsoft.com/\"><img src=\"docs/img/logo_microsoft.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://omidyar.com/\"><img src=\"docs/img/logo_on.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://www.udacity.com/\"><img src=\"docs/img/logo_udacity.png\" /><\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://www.centerfordigitalhealthinnovation.org/\">\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/logo_cdhi_dark.png\">\n  <img src=\"docs/img/logo_cdhi_light.png\" />\n<\/picture>\n\n<\/a>\n<\/th>\n<th align=\"center\">\n<a href=\"https://arkhn.org/\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/logo_arkhn.png\">\n  <img src=\"docs/img/logo_arkhn_light.png\" />\n<\/picture>\n<\/a>\n<\/th>\n<\/tr>\n<\/table>\n\n# License\n\n[Apache License 2.0](LICENSE)<br />\n<a href=\"https://www.flaticon.com/free-icons/person\" title=\"person icons\">Person icons created by Freepik - Flaticon<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"982C:3CC8A:1752E5:5C7C15:6AB92120"},"text_sha256":"df3f12ae7d18f2c6a17782d6d1ae264b77362ec7ae60fd15c5aa84fbcebf361f"},{"path":"packages/syft-enclave/docs/security.md","size":6763,"blob_sha":"508e9f978804ed08c09330d4e7fd366ab41a3de5","priority":1,"status":200,"text":"# Security Overview\n\n> **Read this first:** This document assumes you understand the\n> [Enclave Flow](./flow.md). That document describes the parties involved and _what_ happens end to end —\n> the data owners, the data scientist, the enclave, and how the analysis is submitted and executed. This\n> document explains _how_ each of those steps is made secure.\n\n> This is an early **alpha** release — a deliberate zero-to-one effort. The goal\n> right now is not scale; it is to push the _Overton window_ of what private collaboration is allowed\n> to look like: to demonstrate that two organizations and an outside analyst really can run a joint\n> computation where nobody hands over their secrets. Everything is built around that\n> **mutual-secrecy** guarantee.\n\nThe flow rests on a few security building blocks. This document describes what makes it trustworthy.\n\n## 1. SyftBox and permissions\n\nThe basic unit is a **SyftBox**: a local folder of files. Every file carries **read and write\npermissions for each peer**, which decide who is allowed to see or change it. `syft-client`\nexpresses those permissions in small **permission files** with a `.gitignore`-like syntax — patterns that say who\ncan read or write which paths. Most of the time you do not edit them by hand: higher-level\ncomponents (the enclave package, the job package) manage them for you, though a user can always set\nthem directly.\n\n`syft-client` uses the permissions to decide **which files to share with which\npeers over Google Drive** — only the files a peer is allowed to read are ever synced to them.\n\nSee the [permissions guide](../../syft-permissions/docs/permission-user-docs.md) for the full\nsyntax.\n\n## 2. Peer-to-peer file sharing\n\nCommunication between parties is **transport-agnostic** — it works over any mechanism that can\ndeliver a file. Today that transport is **Google Drive**. `syft-client` makes \"requests\" simply by\nuploading and downloading shared files: to files with another party, it creates a folder\nthat both parties can access and uploads the file into it. That is the whole channel — no dedicated\nservers, just shared files.\n\nSee the [Google Drive connection doc](../../../docs/connections.md) for the folder layout and request flow.\n\n## 3. All files are encrypted and signed\n\nEvery file `syft-client` exchanges is **encrypted and signed**. The signature lets the recipient\n**cryptographically prove who** produced a file. Encryption means that even if a file is accidentally shared with the wrong person, it is\n**unreadable** to them. The shared Google Drive folder is just a delivery mechanism; the security\ndoes not depend on Google Drive keeping anything secret.\n\n## 4. The enclave runs in a Trusted Execution Environment\n\nThe computation itself runs inside a **secure enclave**: a **docker container with `syft-client`**\nexecuting in a **Trusted Execution Environment (TEE)** on confidential-compute hardware. The TEE\nisolates the running code and encrypts its memory, so the workload is **not controlled or observable\nby any person** — not the cloud operator, not the data owners, and not the data scientist. Nobody\ncan log into it, read its memory, or change what it does.\n\nInside this environment the enclave enforces the core consent rule: it **only runs computations that\nevery data owner has approved**. An analysis that touches two owners' data does not execute until\n**both** have signed off (see Step 3 of the [Enclave Flow](./flow.md)). The result is a neutral\nparty that no human steers, yet that runs only what all data owners agreed to.\n\nNote that the security guarantees above cover **where** the code runs and **what data it can\naccess** — they do not vouch for **what the code does**. Responsibility for the safety of the analysis itself lies\nwith **both data owners**: each must **read the submitted code carefully** before approving it and\nsatisfy themselves that it uses the data only for the agreed-upon purpose. Approval is a\ndeliberate review step, not a formality — the enclave will run exactly what both owners signed\noff on, and nothing more.\n\nFor how the enclave is built and deployed, see the\n[enclave architecture doc](./enclave_architecture.md).\n\n## 5. Attestation bootstraps the encryption handshake\n\nEncryption and signing only help if you know whose keys to trust. For a **person**, this is relatively trivial:\nif a real human controls a Google Drive account, `syft-client` can reasonably assume that what comes\nfrom that account came from them — trust is bootstrapped from the fact that the account is human-operated.\n\nAn **enclave is different on purpose**: it must _not_ be controllable by any single person — that is\nthe entire point of using one. And no one can fully guarantee that no individual has access to the\nenclave's Google Drive account, so that account cannot be trusted the way a person's is.\n\nTo get around this, the enclave builds a **secure channel out of the insecure account** using **attestation**.\nAn attestation report is a cryptographically signed statement from the confidential-compute hardware\nthat says, in effect, _\"this exact, open-source docker container (with syft inside it) is what is\nrunning here.\"_ The enclave generates a fresh encryption and signing keypair, **embeds its public\nkeys into that attestation report**, and shares the report on Google Drive with all peers.\n\nBecause any peer can **verify the attestation report**, they know those public keys were genuinely\nproduced by an enclave running the expected open-source container — not by some person who happens to\nhave access to the account. The data owners and the DS then download the enclave's verified keys (and\nshare their own), and from that point on there is a **trusted, end-to-end secure channel** between the\nenclave and every participant.\n\nCrucially, Google Drive is treated purely as an **untrusted transport** — a message-passing channel\nand nothing more. The threat model assumes a fully adversarial transport: an attacker (or Google\nitself) is presumed able to **read, drop, replay, reorder, or tamper with** anything stored there.\nThe system does not rely on Google Drive for confidentiality, integrity, or authenticity. Those\nproperties are enforced end to end by the layers above it — **encryption** protects confidentiality,\n**signatures** provide integrity and authenticity (so any tampering is detected and rejected), and\n**attestation** anchors the trust to a known enclave. Compromising the transport therefore lets an\nadversary at most cause a denial of service; it never yields access to plaintext or the ability to\nforge an accepted message.\n\nThis is what lets Steps 1–5 of the [Enclave Flow](./flow.md) happen without\nanyone trusting Google Drive, the network, or each other.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B150:18233:173C3D:5C63FC:6AB92122"},"text_sha256":"8b8f7f35d8e85e8c45683fc8fbca34d59952ac03fa846f29b1b1491c2980014d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":1,"C7":1,"D1":1,"score":2,"D1_evidence":"sha=793f535032222e9d4b7c8fa7d34104121e8e2471; file=README.md; text=## Docs ## Features - Privacy-preserving — Private data never leaves the data owner's machine; only approved results are shared - Transport-agnostic — Works over Google Drive today, extensible to any file-based transport - Offline-first — Full functionality even when peers are offline; changes sync when connectivity resumes","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C6":"sha=793f535032222e9d4b7c8fa7d34104121e8e2471; file=README.md; text=## Docs ## Features - Privacy-preserving — Private data never leaves the data owner's machine; only approved results are shared - Transport-agnostic — Works over Google Drive today, extensible to any file-based transport - Offline-first — Full functionality even when peers are offline; changes sync when connectivity resumes","C7":"sha=793f535032222e9d4b7c8fa7d34104121e8e2471; file=README.md; text=## Docs ## Features - Privacy-preserving — Private data never leaves the data owner's machine; only approved results are shared - Transport-agnostic — Works over Google Drive today, extensible to any file-based transport - Offline-first — Full functionality even when peers are offline; changes sync when connectivity resumes"}}}}
{"repository":"yzhao062/pyod","input_row":{"repository":"yzhao062/pyod","url":"https://github.com/yzhao062/pyod","name":"pyod","owner":"yzhao062","description":"A Python library for anomaly detection across tabular, time series, graph, text, image, and audio data. 60+ detectors, benchmark-backed ADEngine orchestration, and an agentic workflow for AI agents.","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":10013,"issues":381,"created_at":"2017-10-03T20:29:04Z","updated_at":"2026-09-26T10:17:18Z","first_commit_at":"2017-10-03T20:29:04Z","last_commit_at":"2026-09-17T02:16:29Z","activity_months":107.43000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; multimodal","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:31:58.318Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"yzhao062/pyod","visibility":"public","created_at":"2017-10-03T20:29:04Z","updated_at":"2026-09-26T10:17:18Z","private":false,"fork":false,"archived":false,"stargazers_count":10013,"open_issues_count":245,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"3258","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:176CB28:1B8A9B4:6AB928DE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3257","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089F:1DB627:1857FFD:1C77D29:6AB928DE"},"commit":{"sha":"1c34103ecfb333a1943e14eb06b6597ef0d89fcc","url":"https://github.com/yzhao062/pyod/commit/1c34103ecfb333a1943e14eb06b6597ef0d89fcc","date":"2018-05-24T21:44:50Z","author_date":"2018-05-24T21:44:50Z","committer_date":"2018-05-24T21:44:50Z","tree_sha":"d364987aee1392286b3ae97aa7c150cc8ecadc2c","message_first_line":"added test coverage stats"},"tree_request_status":200,"tree_rate":{"github_remaining":"3256","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DA:37D6E2:17F62FB:1C15ED8:6AB928DF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12941,"blob_sha":"6bc724afb25987859e09afd4098d6ed3da1dbc37","priority":0}],"documents":[{"path":"README.md","size":12941,"blob_sha":"6bc724afb25987859e09afd4098d6ed3da1dbc37","priority":0,"status":200,"text":"# Python Outlier Detection (PyOD)\n[![PyPI version](https://badge.fury.io/py/pyod.svg)](https://badge.fury.io/py/pyod) [![Build Status](https://travis-ci.org/yzhao062/Pyod.svg?branch=master)](https://travis-ci.org/yzhao062/Pyod) [![Coverage Status](https://coveralls.io/repos/github/yzhao062/Pyod/badge.svg?branch=master)](https://coveralls.io/github/yzhao062/Pyod?branch=master)\n\n**Note: PyOD is under development with limited test coverages. However, it has been successfully used in various academic research projects** [8, 9].\n\n- **[Current version on PyPI](https://pypi.org/project/pyod/)**.\n\n- **[Github repository with examples](https://github.com/yzhao062/Pyod)**.\n\n- More anomaly detection related resources, e.g., books, papers and videos, can be found at [anomaly-detection-resources.](https://github.com/yzhao062/anomaly-detection-resources)\n\n**Table of Contents**:\n<!-- TOC -->\n\n- [Quick Introduction](#quick-introduction)\n- [Installation](#installation)\n- [API Cheatsheet](#api-cheatsheet)\n- [Quick Start for Outlier Detection](#quick-start-for-outlier-detection)\n- [Quick Start for Combining Outlier Scores from Various Base Detectors](#quick-start-for-combining-outlier-scores-from-various-base-detectors)\n- [Reference](#reference)\n\n<!-- /TOC -->\n\n### Quick Introduction\nPyOD is a **Python-based toolkit** to identify outliers in data with both unsupervised and supervised algorithms. It strives to provide unified APIs across for different anomaly detection algorithms. The toolkit consists of three major groups of functionalities:\n- Individual Detection Algorithms:  \n  1. **Local Outlier Factor, LOF** (wrapped on sklearn implementation) [1]\n  2. **Isolation Forest, iForest** (wrapped on sklearn implementation) [2]\n  3. **One-Class Support Vector Machines** (wrapped on sklearn implementation) [3]\n  4. **kNN** Outlier Detection (use the distance to the kth nearst neighbor as the outlier score)\n  5. **Average KNN** Outlier Detection (use the average distance to k nearst neighbors as the outlier score)\n  6. **Median KNN** Outlier Detection (use the median distance to k nearst neighbors as the outlier score)\n  7. **Global-Local Outlier Score From Hierarchies** [4] ***Broken, to fix***\n  8. **Histogram-based Outlier Score, HBOS** [5]\n  9. **Angle-Based Outlier Setection, ABOD** [7]\n\n- Ensemble Framework (Outlier Score Combination Frameworks)\n  1. **Feature bagging**\n  2. **Average of Maximum (AOM)** [6]\n  3. **Maximum of Average (MOA)** [6]\n  4. **Threshold Sum (Thresh)** [6]\n\n- Utility functions:\n   1. **scores_to_lables()**: converting raw outlier scores to binary labels\n   2. **precision_n_scores()**: one of the popular evaluation metrics for outlier mining (precision @ rank n)\n  \n Please be advised the purpose of the toolkit is for quick exploration. Using it as the final output should be understood with cautions. Fine-tunning may be needed to generate meaningful results. It is recommended to be used for the first-step data exploration only. Due to the restriction of time, the unit tests are not supplied but have been planned to implement.\n\n### Installation\n\nIt is advised to install with **pip** to manage the package:\n````cmd\npip install pyod\npip install pyod==x.y.z\n````\nPlease check the version number(x.y.z) is consistent with the current version number. Pypi can be unstable sometimes. Alternatively, [downloading/cloning the Github repository](https://github.com/yzhao062/Pyod) also works. You could unzip the files and execute the following command in the folder where the files get decompressed.\n\n````cmd\npython setup.py install\n````\nLibrary Dependency (work only with **Python 3**):\n- scipy>=0.19.1\n- pandas>=0.21\n- numpy>=1.13\n- scikit_learn>=0.19.1\n- matplotlib>=2.0.2 **(optional)**\n\n------------\n### API Cheatsheet\nFor all algorithms implemented/wrapped in PyOD, the similar API is forced for consistency.\n\n- **fit()**: fitting the model with the training data\n- **decision_function()**: return raw outlier scores for test data\n- **predict()**: returning binary outlier labels of test data\n- **predict_proba()**: returning outlier probability of test data (0 to 1)\n- **predict_rank()**: returning outlier rank of test data (data outlyness rank in training data)\n\nImport outlier detection models, such like:\n````python\nfrom pyod.models.knn import Knn\nfrom pyod.models.abod import ABOD\nfrom pyod.models.hbos import HBOS\n...\n````\n\nImport utility functions:\n````python\nfrom pyod.util.utility import precision_n_scores\n...\n````\nFull package structure can be found below:\n\n````\nexamples (excluded from installation, only available on Github)\n│\n│\n├───abod_example.py: Example of using ABOD for outlier detection\n│   comb_example.py: Example of combining multiple base outlier scores\n│   hbos_example.py: Example of using HBOS for outlier detection\n│   knn_example.py: Example of using kNN for outlier detection\n│\n│\npyod (main package)\n├───models\n│       abod.py: \n│           class ABOD(), from pyod.models.abod import ABOD\n│       combination.py\n│           amo(), from pyod.models.combination import aom\n│           moa(), from pyod.models.combination import moa\n│       glosh.py: class Glosh(), from pyod.models.glosh import Glosh\n│       hbos.py: class HBOS(), from pyod.models.hbos import HBOS\n│       iforest: class IForest(), from pyod.models.iforest import IForest\n│       knn.py: class Knn(), from pyod.models.knn import Knn\n│       lof.py: class Lof(), from pyod.models.lof import Lof\n│       ocsvm.py: class OCSVM(), from pyod.models.ocsvm import OCSVM\n│\n├───utils\n│       stat_models.py\n│       utility.py\n│           standardizer(): z- normalization function\n│           scores_to_lables(): turn raw outlier scores to binary labels (0 or 1)\n│           precision_n_scores(): Utlity function to calculate precision@n\n│       load_data.py\n│           generate_data(): generate sample data\n│           load_cardio(): load cardio data\n│           load_letter(): load letter data\n│  \n├───test (excluded from installation, only available on Github)\n│       test_abod.py\n│       test_hbos.py\n│       test_knn.py\n│       test_utility.py\n````\n------------\n\n### Quick Start for Outlier Detection\nSee examples for more demos. \"examples/knn_example.py\" demonstrates the basic APIs of PyOD using kNN detector. **It is noted the APIs for other detectors are similar**.\n\n0. Import models\n    ````python\n    from pyod.models.knn import Knn  # kNN detector\n\n    from pyod.utils.load_data import generate_data\n    from pyod.utils.utility import precision_n_scores\n    from sklearn.metrics import roc_auc_score\n    ````\n\n1. Generate sample data first; normal data is generated by a 2-d gaussian distribution, and outliers are generated by a 2-d uniform distribution.\n    ````python\n    contamination = 0.1  # percentage of outliers\n    n_train = 1000  # number of training points\n    n_test = 500  # number of testing points\n\n    X_train, y_train, c_train, X_test, y_test, c_test = generate_data(\n        n_train=n_train, n_test=n_test, contamination=contamination)\n    ````\n\n2. Initialize a kNN detector, fit the model, and make the prediction.\n    ```python\n    # train a k-NN detector (default parameters, k=10)\n    clf = Knn()\n    clf.fit(X_train)\n\n    # get the prediction label and scores on the training data\n    y_train_pred = clf.y_pred\n    y_train_score = clf.decision_scores\n\n    # get the prediction on the test data\n    y_test_pred = clf.predict(X_test)  # outlier label (0 or 1)\n    y_test_score = clf.decision_function(X_test)  # outlier scores\n    ```\n3. Evaluate the prediction by ROC and Precision@rank *n* (p@n):\n    ```python\n    print(n_train.format(\n        roc=roc_auc_score(y_train, y_train_score),\n        prn=precision_n_scores(y_train, y_train_score)))\n\n    print(n_train.format(\n        roc=roc_auc_score(y_test, y_test_score),\n        prn=precision_n_scores(y_test, y_test_score)))\n    ```\n    See a sample output:\n    ````python\n    Train ROC:0.9473, precision@n:0.7857\n    Test ROC:0.992, precision@n:0.9\n    ````\n    \nTo check the result of the classification visually ([knn_figure](https://github.com/yzhao062/Pyod/blob/master/examples/example_figs/knn.png)):\n![kNN example figure](https://github.com/yzhao062/Pyod/blob/master/examples/example_figs/knn.png)\n\n---\n### Quick Start for Combining Outlier Scores from Various Base Detectors\n\n\"examples/comb_example.py\" is a quick demo for showing the API for combining multiple algorithms. Given we have *n* individual outlier detectors, each of them generates an individual score for all samples. The task is to combine the outputs from these detectors effectivelly.\n\n**Key Step: conducting Z-score normalization on raw scores before the combination.**\nFour combination mechanisms are shown in this demo:\n1. Mean: use the mean value of all scores as the final output.\n2. Max: use the max value of all scores as the final output.\n3. Average of Maximum (AOM): first randomly split n detectors in to p groups. For each group, use the maximum within the group as the group output. Use the average of all group outputs as the final output.\n4. Maximum of Average (MOA): similarly to AOM, the same grouping is introduced. However, we use the average of a group as the group output, and use maximum of all group outputs as the final output.\nTo better understand the merging techniques, refer to [6].\n\nThe walkthrough of the code example is provided:\n\n0. Import models and generate sample data\n    ````python\n    from pyod.models.knn import Knn\n    from pyod.models.combination import aom, moa # combination methods\n    from pyod.utils.load_data import generate_data\n    from pyod.utils.utility import precision_n_scores\n    from pyod.utils.utility import standardizer\n    from sklearn.metrics import roc_auc_score\n    \n    X, y, _ = generate_data(train_only=True)  # load data\n    ````\n    \n1. First initialize 20 kNN outlier detectors with different k (10 to 200), and get the outlier scores:\n    ```python\n    # initialize 20 base detectors for combination\n    k_list = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140,\n                150, 160, 170, 180, 190, 200]\n\n    train_scores = np.zeros([X_train.shape[0], n_clf])\n    test_scores = np.zeros([X_test.shape[0], n_clf])\n\n    for i in range(n_clf):\n        k = k_list[i]\n\n        clf = Knn(n_neighbors=k, method='largest')\n        clf.fit(X_train_norm)\n\n        train_scores[:, i] = clf.decision_scores.ravel()\n        test_scores[:, i] = clf.decision_function(X_test_norm).ravel()\n    ```\n2. Then the output codes are standardized into zero mean and unit std before combination.\n    ```python\n    # scores have to be normalized before combination\n    train_scores_norm, test_scores_norm = standardizer(train_scores, test_scores)\n    ```\n3. Then four different combination algorithms are applied as described above:\n    ```python\n    comb_by_mean = np.mean(test_scores_norm, axis=1)\n    comb_by_max = np.max(test_scores_norm, axis=1)\n    comb_by_aom = aom(test_scores_norm, 5, 20) # 5 groups\n    comb_by_moa = moa(test_scores_norm, 5, 20)) # 5 groups\n    ```\n4. Finally, all four combination methods are evaluated with 20 iterations:\n    ````bash\n    Summary of 10 iterations\n    comb by mean, ROC: 0.9196, precision@n: 0.5464\n    comb by max, ROC: 0.9198, precision@n: 0.5532\n    comb by aom, ROC: 0.9260, precision@n: 0.5630\n    comb by moa, ROC: 0.9244, precision@n: 0.5523\n    ````\n---    \n\n### Reference\n[1] Breunig, M.M., Kriegel, H.P., Ng, R.T. and Sander, J., 2000, May. LOF: identifying density-based local outliers. In *ACM SIGMOD Record*, pp. 93-104. ACM.\n\n[2] Liu, F.T., Ting, K.M. and Zhou, Z.H., 2008, December. Isolation forest. In *ICDM '08*, pp. 413-422. IEEE.\n\n[3] Ma, J. and Perkins, S., 2003, July. Time-series novelty detection using one-class support vector machines. In *IJCNN' 03*, pp. 1741-1745. IEEE.\n\n[4] Campello, R.J., Moulavi, D., Zimek, A. and Sander, J., 2015. Hierarchical density estimates for data clustering, visualization, and outlier detection. *TKDD*, 10(1), pp.5.\n\n[5] Goldstein, M. and Dengel, A., 2012. Histogram-based outlier score (hbos): A fast unsupervised anomaly detection algorithm. In *KI-2012: Poster and Demo Track*, pp.59-63.\n\n[6] Aggarwal, C.C. and Sathe, S., 2015. Theoretical foundations and algorithms for outlier ensembles.*ACM SIGKDD Explorations Newsletter*, 17(1), pp.24-47.\n\n[7] Kriegel, H.P. and Zimek, A., 2008, August. Angle-based outlier detection in high-dimensional data. In *KDD '08*, pp. 444-452. ACM.\n\n[8] Y. Zhao and M.K. Hryniewicki, \"XGBOD: Improving Supervised Outlier Detection with Unsupervised Representation Learning,\" *IEEE International Joint Conference on Neural Networks*, 2018.\n\n[9] Y. Zhao and M.K. Hryniewicki, \"DCSO: Dynamic Combination of Detector Scores for Outlier Ensembles,\" *ACM SIGKDD Workshop on Outlier Detection De-constructed*, 2018. Submitted, under review.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AA50:7A4F8:17C2A4:5CEC12:6AB92124"},"text_sha256":"23edcc80e0edb8ba74569dcea07758c7a2bd70a3bef638a628b9029fb41e50de"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3255","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FC:74E6D:17EC70E:1C0C54D:6AB928DF"},"commit":{"sha":"bc31755ad1587c2e9d1adee0d33c1de5535a8687","url":"https://github.com/yzhao062/pyod/commit/bc31755ad1587c2e9d1adee0d33c1de5535a8687","date":"2026-06-22T16:29:44Z","author_date":"2026-06-10T01:19:42Z","committer_date":"2026-06-22T16:29:44Z","tree_sha":"c7dacf6e2bca5a4360019f51d58bdc4ec781b85b","message_first_line":"Require explicit trust for persistence load"},"tree_request_status":200,"tree_rate":{"github_remaining":"3254","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E4:B1202:1787273:1BA63DB:6AB928E0"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":56089,"blob_sha":"22060df5682c17e8b22afc95cb863ddaf1fb0c2e","priority":0}],"documents":[{"path":"README.rst","size":56089,"blob_sha":"22060df5682c17e8b22afc95cb863ddaf1fb0c2e","priority":0,"status":200,"text":"Python Outlier Detection (PyOD) 3\r\n==================================\r\n\r\n**PyOD 3: Agentic Anomaly Detection At Scale**\r\n\r\n|badge_pypi| |badge_anaconda| |badge_docs| |badge_stars| |badge_forks| |badge_downloads| |badge_testing| |badge_coverage| |badge_maintainability| |badge_license| |badge_benchmark|\r\n\r\n.. |badge_pypi| image:: https://img.shields.io/pypi/v/pyod.svg?color=brightgreen\r\n   :target: https://pypi.org/project/pyod/\r\n   :alt: PyPI version\r\n\r\n.. |badge_anaconda| image:: https://anaconda.org/conda-forge/pyod/badges/version.svg\r\n   :target: https://anaconda.org/conda-forge/pyod\r\n   :alt: Anaconda version\r\n\r\n.. |badge_docs| image:: https://readthedocs.org/projects/pyod/badge/?version=latest\r\n   :target: https://pyod.readthedocs.io/en/latest/?badge=latest\r\n   :alt: Documentation status\r\n\r\n.. |badge_stars| image:: https://img.shields.io/github/stars/yzhao062/pyod.svg\r\n   :target: https://github.com/yzhao062/pyod/stargazers\r\n   :alt: GitHub stars\r\n\r\n.. |badge_forks| image:: https://img.shields.io/github/forks/yzhao062/pyod.svg?color=blue\r\n   :target: https://github.com/yzhao062/pyod/network\r\n   :alt: GitHub forks\r\n\r\n.. |badge_downloads| image:: https://pepy.tech/badge/pyod\r\n   :target: https://pepy.tech/project/pyod\r\n   :alt: Downloads\r\n\r\n.. |badge_testing| image:: https://github.com/yzhao062/pyod/actions/workflows/testing.yml/badge.svg\r\n   :target: https://github.com/yzhao062/pyod/actions/workflows/testing.yml\r\n   :alt: Testing\r\n\r\n\r\n.. |badge_coverage| image:: https://coveralls.io/repos/github/yzhao062/pyod/badge.svg\r\n   :target: https://coveralls.io/github/yzhao062/pyod\r\n   :alt: Coverage Status\r\n\r\n.. |badge_maintainability| image:: https://api.codeclimate.com/v1/badges/bdc3d8d0454274c753c4/maintainability\r\n   :target: https://codeclimate.com/github/yzhao062/Pyod/maintainability\r\n   :alt: Maintainability\r\n\r\n.. |badge_license| image:: https://img.shields.io/github/license/yzhao062/pyod.svg\r\n   :target: https://github.com/yzhao062/pyod/blob/master/LICENSE\r\n   :alt: License\r\n\r\n.. |badge_benchmark| image:: https://img.shields.io/badge/ADBench-benchmark_results-pink\r\n   :target: https://github.com/Minqi824/ADBench\r\n   :alt: Benchmark\r\n\r\n\r\n-----\r\n\r\n    **PyOD is agent-ready.** Claude Code and Codex can use the ``od-expert`` skill to drive ADEngine investigations, while MCP-compatible agents can query PyOD's detector knowledge and planning tools. The classic ``fit``/``predict`` API stays unchanged.\r\n\r\n-----\r\n\r\nPyOD 3 is the most comprehensive Python library for anomaly detection. Four pillars:\r\n\r\n===========================  ========================================================================================\r\nPillar                       What it means\r\n===========================  ========================================================================================\r\nMulti-Modal                  61 detectors across **tabular, time series, graph, text, image, and audio** data, one API\r\nFull Lifecycle               From raw data to explained anomalies and next-step guidance in a single call\r\nAgentic                      ``od-expert`` turns natural-language requests into ADEngine workflows; MCP exposes structured tools for other agents\r\nMost Used                    46+ million downloads; benchmark-backed routing (ADBench, TSB-AD, BOND, NLP-ADBench)\r\n===========================  ========================================================================================\r\n\r\nInstall\r\n^^^^^^^\r\n\r\nCore library (required for every activation path):\r\n\r\n.. code-block:: bash\r\n\r\n    pip install pyod\r\n\r\nThen pick the activation path that matches your agent stack:\r\n\r\n.. code-block:: bash\r\n\r\n    # 1. Claude Code / Claude Desktop / Codex — enables the od-expert skill\r\n    pyod install skill              # Claude Code / Desktop: user-global (~/.claude/skills/)\r\n    pyod install skill --project    # Codex: project-local (./skills/, Codex has no user-global dir)\r\n\r\n    # 2. Any MCP-compatible LLM — requires the optional mcp extra\r\n    pip install pyod[mcp]\r\n    pyod mcp serve                 # alias for `python -m pyod.mcp_server`\r\n\r\n    # 3. Pure Python — no extra step\r\n    #    from pyod.utils.ad_engine import ADEngine\r\n\r\nRun ``pyod info`` at any time to see version, detector counts, and\r\nthe install state of each activation path. ``pyod info`` also detects\r\nwhich agent stack you have installed (``~/.claude/`` for Claude Code,\r\n``~/.codex/`` for Codex) and recommends the right install command.\r\n\r\nFor conda, source install, dependency details, and troubleshooting,\r\nsee the full `installation guide <https://pyod.readthedocs.io/en/latest/install.html>`__.\r\nThe legacy ``pyod-install-skill`` command from v3.0.0 still works as an\r\nalias for ``pyod install skill``.\r\n\r\n**Outlier Detection with 5 Lines of Code** (``pip install pyod``):\r\n\r\n.. code-block:: python\r\n\r\n    from pyod.models.iforest import IForest\r\n    clf = IForest()\r\n    clf.fit(X_train)\r\n    y_train_scores = clf.decision_scores_          # training anomaly scores\r\n    y_test_scores = clf.decision_function(X_test)   # test anomaly scores\r\n\r\n**Three ways to use PyOD:**\r\n\r\n=========  =====================  ======================================================================  =======================================\r\nLayer      Name                   When to use                                                             Entry point\r\n=========  =====================  ======================================================================  =======================================\r\n1          Classic API            You know which detector you want                                        `Layer 1 examples <https://pyod.readthedocs.io/en/latest/examples/tabular.html>`__\r\n2          ADEngine               You want PyOD to choose, compare, and assess automatically              `Layer 2 walkthrough <https://pyod.readthedocs.io/en/latest/examples/adengine.html>`__\r\n3          Agentic Investigation  You want an AI agent to drive OD through natural conversation           `Layer 3 walkthrough <https://pyod.readthedocs.io/en/latest/examples/agentic.html>`__\r\n=========  =====================  ======================================================================  =======================================\r\n\r\nLayers 2 and 3 are powered by ``ADEngine``, PyOD's lifecycle orchestration core. The full multi-turn Layer 3 investigation flow is available through the ``od-expert`` skill for Claude Code and Codex. The MCP server (``python -m pyod.mcp_server``) exposes ten stateless tools for MCP-compatible LLMs, spanning knowledge queries (``list_detectors``, ``explain_detector``, ``compare_detectors``, ``get_benchmarks``), planning (``profile_data``, ``plan_detection``, ``build_detector``), and detection (``run_detection``, ``analyze_results``, ``explain_findings``); stateful ``investigate`` / ``iterate`` MCP tools are deferred.\r\n\r\n.. image:: https://raw.githubusercontent.com/yzhao062/pyod/development/docs/figs/agentic-demo.png\r\n   :alt: PyOD 3 agentic investigation demo on cardiotocography dataset\r\n   :align: center\r\n   :width: 720\r\n\r\nThe figure above shows a real 5-turn agentic conversation on the UCI Cardiotocography dataset. See the `full walkthrough <https://pyod.readthedocs.io/en/latest/examples/agentic.html>`__, runnable `agentic example <https://github.com/yzhao062/pyod/blob/development/examples/agentic_example.py>`__, or interactive `HTML demo <https://htmlpreview.github.io/?https://github.com/yzhao062/pyod/blob/development/examples/agentic_demo.html>`__.\r\n\r\n**PyOD Ecosystem & Resources**:\r\n`NLP-ADBench <https://github.com/USC-FORTIS/NLP-ADBench>`__ (NLP anomaly detection) | `TODS <https://github.com/datamllab/tods>`__ (time-series) | `PyGOD <https://pygod.org/>`__ (graph) | `ADBench <https://github.com/Minqi824/ADBench>`__ (benchmark) | `AD-LLM <https://arxiv.org/abs/2412.11142>`__ (LLM-based AD) [#Yang2024ad]_ | `Resources <https://github.com/yzhao062/anomaly-detection-resources>`__\r\n\r\n----\r\n\r\n\r\nAbout PyOD\r\n^^^^^^^^^^\r\n\r\nPyOD, established in 2017, is the longest-running and most widely used Python library for anomaly detection. With `46+ million downloads <https://pepy.tech/project/pyod>`__, it serves both academic research (featured in `Analytics Vidhya <https://www.analyticsvidhya.com/blog/2019/02/outlier-detection-python-pyod/>`__, `KDnuggets <https://www.kdnuggets.com/2019/02/outlier-detection-methods-cheat-sheet.html>`__, and `Towards Data Science <https://towardsdatascience.com/anomaly-detection-for-dummies-15f148e559c1>`__) and commercial products.\r\n\r\nV3 extends the library with ``ADEngine`` (lifecycle orchestration) and the ``od-expert`` skill (agentic workflow), while keeping the classic ``fit``/``predict`` API fully backward-compatible. V3 is built on SUOD [#Zhao2021SUOD]_ for fast parallel training and numba JIT for per-model speedups.\r\n\r\n**Impact & Recognition**:\r\n\r\n===================================  ===========================================================================\r\nArea                                 Examples\r\n===================================  ===========================================================================\r\nSpace & science                      European Space Agency `OPS-SAT spacecraft telemetry benchmark <https://www.nature.com/articles/s41597-025-05035-3>`__ (*Nature Scientific Data*, 2025) uses PyOD for all 30 algorithms.\r\nEnterprise deployment                Walmart (1M+ daily pricing updates, KDD 2019), Databricks (Kakapo framework integrating PyOD with MLflow/Hyperopt; insider-threat detection solution), IQVIA (123K+ pharmacy claims), Altair AI Studio, Ericsson (patent `WO2023166515A1 <https://patents.google.com/patent/WO2023166515A1>`__).\r\nBooks                                `Outlier Detection in Python <https://www.manning.com/books/outlier-detection-in-python>`__ (Brett Kennedy, Manning); *Handbook of Anomaly Detection with Python* (Chris Kuo, Columbia); `Finding Ghosts in Your Data <https://link.springer.com/book/10.1007/978-1-4842-8870-2>`__ (Kevin Feasel, Apress).\r\nCourses                              DataCamp `Anomaly Detection in Python <https://www.datacamp.com/courses/anomaly-detection-in-python>`__ (19M+ platform learners), Manning `liveProject <https://www.manning.com/liveproject/using-pyod-and-ensembles-methods>`__, O'Reilly video edition, multiple Udemy courses.\r\nPodcasts                             `Talk Python To Me #497 <https://talkpython.fm/episodes/show/497/outlier-detection-with-python>`__, `Real Python Podcast #208 <https://realpython.com/podcasts/rpp/208/>`__.\r\nInternational                        Tutorials in 5 non-English languages: Chinese (CSDN, Zhihu, 搜狐, 机器之心, `aidoczh.com <https://www.aidoczh.com>`__ full doc translation), Japanese, Korean, German, Spanish.\r\n===================================  ===========================================================================\r\n\r\nSee the `full impact page <https://pyod.readthedocs.io/en/latest/impact.html>`__ on Read the Docs for the complete list of citations, enterprise deployments, patents, and media coverage.\r\n\r\n**Citing PyOD**:\r\n\r\nIf you use PyOD in a scientific publication, we would appreciate citations to the following paper(s):\r\n\r\n`PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection <https://arxiv.org/abs/2412.12154>`__ is available as a preprint. If you use PyOD in a scientific publication, we would appreciate citations to the following paper::\r\n\r\n    @inproceedings{chen2025pyod,\r\n      title={Pyod 2: A python library for outlier detection with llm-powered model selection},\r\n      author={Chen, Sihan and Qian, Zhuangzhuang and Siu, Wingchun and Hu, Xingcan and Li, Jiaqi and Li, Shawn and Qin, Yuehan and Yang, Tiankai and Xiao, Zhuo and Ye, Wanghao and others},\r\n      booktitle={Companion Proceedings of the ACM on Web Conference 2025},\r\n      pages={2807--2810},\r\n      year={2025}\r\n    }\r\n\r\n\r\n`PyOD paper <http://www.jmlr.org/papers/volume20/19-011/19-011.pdf>`__ is published in `Journal of Machine Learning Research (JMLR) <http://www.jmlr.org/>`__ (MLOSS track).::\r\n\r\n    @article{zhao2019pyod,\r\n        author  = {Zhao, Yue and Nasrullah, Zain and Li, Zheng},\r\n        title   = {PyOD: A Python Toolbox for Scalable Outlier Detection},\r\n        journal = {Journal of Machine Learning Research},\r\n        year    = {2019},\r\n        volume  = {20},\r\n        number  = {96},\r\n        pages   = {1-7},\r\n        url     = {http://jmlr.org/papers/v20/19-011.html}\r\n    }\r\n\r\nor::\r\n\r\n    Zhao, Y., Nasrullah, Z. and Li, Z., 2019. PyOD: A Python Toolbox for Scalable Outlier Detection. Journal of machine learning research (JMLR), 20(96), pp.1-7.\r\n\r\n\r\nFor a broader perspective on anomaly detection, see our NeurIPS papers on `ADBench <https://arxiv.org/abs/2206.09426>`__ [#Han2022ADBench]_ and `ADGym <https://arxiv.org/abs/2309.15376>`__.\r\n\r\n\r\n**Table of Contents**:\r\n\r\n* `API Cheatsheet & Reference <#api-cheatsheet--reference>`__\r\n* `Benchmarks <#benchmarks>`__\r\n* `Implemented Algorithms <#implemented-algorithms>`__ (Tabular, Time Series, Graph, Embedding)\r\n* `Additional Topics <#additional-topics>`__ (Model Save/Load, SUOD, Thresholding)\r\n* `Quick Start for Outlier Detection <#quick-start-for-outlier-detection>`__\r\n* `How to Contribute <#how-to-contribute>`__\r\n* `Inclusion Criteria <#inclusion-criteria>`__\r\n\r\n----\r\n\r\n\r\nAPI Cheatsheet & Reference\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nThe full API Reference is split by modality at `PyOD Documentation <https://pyod.readthedocs.io/en/latest/>`__: `Tabular <https://pyod.readthedocs.io/en/latest/pyod.models.tabular.html>`__, `Time Series <https://pyod.readthedocs.io/en/latest/pyod.models.timeseries.html>`__, `Graph <https://pyod.readthedocs.io/en/latest/pyod.models.graph.html>`__, `Embedding <https://pyod.readthedocs.io/en/latest/pyod.models.embedding.html>`__, `ADEngine <https://pyod.readthedocs.io/en/latest/pyod.ad_engine.html>`__, `Utilities <https://pyod.readthedocs.io/en/latest/pyod.utils.html>`__. Below is a quick cheatsheet for all detectors:\r\n\r\n* **fit(X)**: Fit the detector. The parameter y is ignored in unsupervised methods.\r\n* **decision_function(X)**: Predict raw anomaly scores for X using the fitted detector.\r\n* **predict(X)**: Determine whether a sample is an outlier or not as binary labels using the fitted detector.\r\n* **predict_proba(X)**: Estimate the probability of a sample being an outlier using the fitted detector.\r\n* **predict_confidence(X)**: Assess the model's confidence on a per-sample basis (applicable in predict and predict_proba) [#Perini2020Quantifying]_.\r\n* **predict_with_rejection(X)**\\ : Allow the detector to reject (i.e., abstain from making) highly uncertain predictions (output = -2) [#Perini2023Rejection]_.\r\n\r\n**Key Attributes of a fitted model**:\r\n\r\n* **decision_scores_**: Outlier scores of the training data. Higher scores typically indicate more abnormal behavior. Outliers usually have higher scores.\r\n* **labels_**: Binary labels of the training data, where 0 indicates inliers and 1 indicates outliers/anomalies.\r\n\r\n\r\n----\r\n\r\n\r\nBenchmarks\r\n^^^^^^^^^^\r\n\r\n* `ADBench <https://github.com/Minqi824/ADBench>`__ [#Han2022ADBench]_: 30 algorithms on 57 tabular datasets. See `comparison <https://github.com/yzhao062/pyod/blob/master/examples/compare_all_models.py>`__.\r\n* `NLP-ADBench <https://github.com/USC-FORTIS/NLP-ADBench>`__: 19 methods on 8 text datasets. Two-step (embedding + detector) beats end-to-end.\r\n* `TSB-AD <https://github.com/TheDatumOrg/TSB-AD>`__ [#Liu2024TSB]_: 40 algorithms on 1070 time series datasets (NeurIPS 2024).\r\n* `BOND <https://arxiv.org/abs/2206.10071>`__ [#Liu2022BOND]_: 14 graph anomaly detection algorithms on 14 datasets (NeurIPS 2022).\r\n\r\n----\r\n\r\nAdditional Topics\r\n^^^^^^^^^^^^^^^^^\r\n\r\n* `Model Save & Load <https://pyod.readthedocs.io/en/latest/model_persistence.html>`__: Use joblib or pickle for saving and loading PyOD models. See `example <https://github.com/yzhao062/pyod/blob/master/examples/save_load_model_example.py>`__.\r\n* `Fast Train with SUOD <https://pyod.readthedocs.io/en/latest/fast_train.html>`__: Accelerate training and prediction with the SUOD framework [#Zhao2021SUOD]_. See `example <https://github.com/yzhao062/pyod/blob/master/examples/suod_example.py>`__.\r\n* `Thresholding Outlier Scores <https://pyod.readthedocs.io/en/latest/thresholding.html>`__: Data-driven approaches for setting contamination levels via `PyThresh <https://github.com/KulikDM/pythresh>`__.\r\n\r\n----\r\n\r\n\r\n\r\nImplemented Algorithms\r\n^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nPyOD is organized into two functional groups: **(i) Detection Algorithms**, with dedicated subsections for tabular, time series, graph, and audio data (EmbeddingOD inside the tabular table adds text and image support via foundation model encoders); and **(ii) Utility Functions** for data generation, evaluation, and lifecycle orchestration.\r\n\r\n**(i-a) Tabular & Multi-Modal Detection Algorithms** :\r\n\r\n.. list-table::\r\n   :widths: 15 14 58 5 8\r\n   :header-rows: 1\r\n\r\n   * - Type\r\n     - Abbr\r\n     - Algorithm\r\n     - Year\r\n     - Ref\r\n   * - Probabilistic\r\n     - ECOD\r\n     - Unsupervised Outlier Detection Using Empirical Cumulative Distribution Functions (`example <https://github.com/yzhao062/pyod/blob/development/examples/ecod_example.py>`__)\r\n     - 2022\r\n     - [#Li2021ECOD]_\r\n   * - Probabilistic\r\n     - ABOD\r\n     - Angle-Based Outlier Detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/abod_example.py>`__)\r\n     - 2008\r\n     - [#Kriegel2008Angle]_\r\n   * - Probabilistic\r\n     - FastABOD\r\n     - Fast Angle-Based Outlier Detection using approximation (`example <https://github.com/yzhao062/pyod/blob/development/examples/abod_example.py>`__)\r\n     - 2008\r\n     - [#Kriegel2008Angle]_\r\n   * - Probabilistic\r\n     - COPOD\r\n     - COPOD: Copula-Based Outlier Detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/copod_example.py>`__)\r\n     - 2020\r\n     - [#Li2020COPOD]_\r\n   * - Probabilistic\r\n     - MAD\r\n     - Median Absolute Deviation (MAD) (`example <https://github.com/yzhao062/pyod/blob/development/examples/mad_example.py>`__)\r\n     - 1993\r\n     - [#Iglewicz1993How]_\r\n   * - Probabilistic\r\n     - SOS\r\n     - Stochastic Outlier Selection (`example <https://github.com/yzhao062/pyod/blob/development/examples/sos_example.py>`__)\r\n     - 2012\r\n     - [#Janssens2012Stochastic]_\r\n   * - Probabilistic\r\n     - QMCD\r\n     - Quasi-Monte Carlo Discrepancy outlier detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/qmcd_example.py>`__)\r\n     - 2001\r\n     - [#Fang2001Wrap]_\r\n   * - Probabilistic\r\n     - KDE\r\n     - Outlier Detection with Kernel Density Functions (`example <https://github.com/yzhao062/pyod/blob/development/examples/kde_example.py>`__)\r\n     - 2007\r\n     - [#Latecki2007Outlier]_\r\n   * - Probabilistic\r\n     - Sampling\r\n     - Rapid distance-based outlier detection via sampling (`example <https://github.com/yzhao062/pyod/blob/development/examples/sampling_example.py>`__)\r\n     - 2013\r\n     - [#Sugiyama2013Rapid]_\r\n   * - Probabilistic\r\n     - GMM\r\n     - Probabilistic Mixture Modeling for Outlier Analysis (`example <https://github.com/yzhao062/pyod/blob/development/examples/gmm_example.py>`__)\r\n     -\r\n     - [#Aggarwal2015Outlier]_ [Ch.2]\r\n   * - Linear Model\r\n     - PCA\r\n     - Principal Component Analysis (sum of weighted projected distances to eigenvector hyperplanes) (`example <https://github.com/yzhao062/pyod/blob/development/examples/pca_example.py>`__)\r\n     - 2003\r\n     - [#Shyu2003A]_\r\n   * - Linear Model\r\n     - KPCA\r\n     - Kernel Principal Component Analysis (`example <https://github.com/yzhao062/pyod/blob/development/examples/kpca_example.py>`__)\r\n     - 2007\r\n     - [#Hoffmann2007Kernel]_\r\n   * - Linear Model\r\n     - MCD\r\n     - Minimum Covariance Determinant (Mahalanobis distances as outlier scores) (`example <https://github.com/yzhao062/pyod/blob/development/examples/mcd_example.py>`__)\r\n     - 1999\r\n     - [#Hardin2004Outlier]_ [#Rousseeuw1999A]_\r\n   * - Linear Model\r\n     - CD\r\n     - Cook's distance for outlier detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/cd_example.py>`__)\r\n     - 1977\r\n     - [#Cook1977Detection]_\r\n   * - Linear Model\r\n     - OCSVM\r\n     - One-Class Support Vector Machines (`example <https://github.com/yzhao062/pyod/blob/development/examples/ocsvm_example.py>`__)\r\n     - 2001\r\n     - [#Scholkopf2001Estimating]_\r\n   * - Linear Model\r\n     - LMDD\r\n     - Deviation-based Outlier Detection (LMDD) (`example <https://github.com/yzhao062/pyod/blob/development/examples/lmdd_example.py>`__)\r\n     - 1996\r\n     - [#Arning1996A]_\r\n   * - Proximity-Based\r\n     - LOF\r\n     - Local Outlier Factor (`example <https://github.com/yzhao062/pyod/blob/development/examples/lof_example.py>`__)\r\n     - 2000\r\n     - [#Breunig2000LOF]_\r\n   * - Proximity-Based\r\n     - COF\r\n     - Connectivity-Based Outlier Factor (`example <https://github.com/yzhao062/pyod/blob/development/examples/cof_example.py>`__)\r\n     - 2002\r\n     - [#Tang2002Enhancing]_\r\n   * - Proximity-Based\r\n     - (Incr.) COF\r\n     - Memory Efficient Connectivity-Based Outlier Factor (slower, reduced storage) (`example <https://github.com/yzhao062/pyod/blob/development/examples/cof_example.py>`__)\r\n     - 2002\r\n     - [#Tang2002Enhancing]_\r\n   * - Proximity-Based\r\n     - CBLOF\r\n     - Clustering-Based Local Outlier Factor (`example <https://github.com/yzhao062/pyod/blob/development/examples/cblof_example.py>`__)\r\n     - 2003\r\n     - [#He2003Discovering]_\r\n   * - Proximity-Based\r\n     - LOCI\r\n     - LOCI: Fast outlier detection via local correlation integral (`example <https://github.com/yzhao062/pyod/blob/development/examples/loci_example.py>`__)\r\n     - 2003\r\n     - [#Papadimitriou2003LOCI]_\r\n   * - Proximity-Based\r\n     - HBOS\r\n     - Histogram-based Outlier Score (`example <https://github.com/yzhao062/pyod/blob/development/examples/hbos_example.py>`__)\r\n     - 2012\r\n     - [#Goldstein2012Histogram]_\r\n   * - Proximity-Based\r\n     - HDBSCAN\r\n     - Density-based clustering via hierarchical density estimates (`example <https://github.com/yzhao062/pyod/blob/development/examples/hdbscan_example.py>`__)\r\n     - 2013\r\n     - [#Campello2013Density]_\r\n   * - Proximity-Based\r\n     - kNN\r\n     - k Nearest Neighbors (distance to k-th neighbor as outlier score) (`example <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>`__)\r\n     - 2000\r\n     - [#Ramaswamy2000Efficient]_\r\n   * - Proximity-Based\r\n     - AvgKNN\r\n     - Average kNN (average distance to k neighbors as outlier score) (`example <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>`__)\r\n     - 2002\r\n     - [#Angiulli2002Fast]_\r\n   * - Proximity-Based\r\n     - MedKNN\r\n     - Median kNN (median distance to k neighbors as outlier score) (`example <https://github.com/yzhao062/pyod/blob/development/examples/knn_example.py>`__)\r\n     - 2002\r\n     - [#Angiulli2002Fast]_\r\n   * - Proximity-Based\r\n     - SOD\r\n     - Subspace Outlier Detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/sod_example.py>`__)\r\n     - 2009\r\n     - [#Kriegel2009Outlier]_\r\n   * - Proximity-Based\r\n     - ROD\r\n     - Rotation-based Outlier Detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/rod_example.py>`__)\r\n     - 2020\r\n     - [#Almardeny2020A]_\r\n   * - Outlier Ensembles\r\n     - IForest\r\n     - Isolation Forest (`example <https://github.com/yzhao062/pyod/blob/development/examples/iforest_example.py>`__)\r\n     - 2008\r\n     - [#Liu2008Isolation]_\r\n   * - Outlier Ensembles\r\n     - INNE\r\n     - Isolation-based Anomaly Detection via Nearest-Neighbor Ensembles (`example <https://github.com/yzhao062/pyod/blob/development/examples/inne_example.py>`__)\r\n     - 2018\r\n     - [#Bandaragoda2018Isolation]_\r\n   * - Outlier Ensembles\r\n     - DIF\r\n     - Deep Isolation Forest for Anomaly Detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/dif_example.py>`__)\r\n     - 2023\r\n     - [#Xu2023Deep]_\r\n   * - Outlier Ensembles\r\n     - FB\r\n     - Feature Bagging (`example <https://github.com/yzhao062/pyod/blob/development/examples/feature_bagging_example.py>`__)\r\n     - 2005\r\n     - [#Lazarevic2005Feature]_\r\n   * - Outlier Ensembles\r\n     - LSCP\r\n     - LSCP: Locally Selective Combination of Parallel Outlier Ensembles (`example <https://github.com/yzhao062/pyod/blob/development/examples/lscp_example.py>`__)\r\n     - 2019\r\n     - [#Zhao2019LSCP]_\r\n   * - Outlier Ensembles\r\n     - XGBOD\r\n     - Extreme Boosting Based Outlier Detection **(Supervised)** (`example <https://github.com/yzhao062/pyod/blob/development/examples/xgbod_example.py>`__)\r\n     - 2018\r\n     - [#Zhao2018XGBOD]_\r\n   * - Outlier Ensembles\r\n     - LODA\r\n     - Lightweight On-line Detector of Anomalies (`example <https://github.com/yzhao062/pyod/blob/development/examples/loda_example.py>`__)\r\n     - 2016\r\n     - [#Pevny2016Loda]_\r\n   * - Outlier Ensembles\r\n     - SUOD\r\n     - SUOD: Accelerating Large-scale Unsupervised Heterogeneous OD **(Acceleration)** (`example <https://github.com/yzhao062/pyod/blob/development/examples/suod_example.py>`__)\r\n     - 2021\r\n     - [#Zhao2021SUOD]_\r\n   * - Neural Networks\r\n     - AutoEncoder\r\n     - Fully connected AutoEncoder (reconstruction error as outlier score) (`example <https://github.com/yzhao062/pyod/blob/development/examples/auto_encoder_example.py>`__)\r\n     -\r\n     - [#Aggarwal2015Outlier]_ [Ch.3]\r\n   * - Neural Networks\r\n     - VAE\r\n     - Variational AutoEncoder (reconstruction error as outlier score) (`example <https://github.com/yzhao062/pyod/blob/development/examples/vae_example.py>`__)\r\n     - 2013\r\n     - [#Kingma2013Auto]_\r\n   * - Neural Networks\r\n     - Beta-VAE\r\n     - Variational AutoEncoder with customized loss (gamma and capacity) (`example <https://github.com/yzhao062/pyod/blob/development/examples/vae_example.py>`__)\r\n     - 2018\r\n     - [#Burgess2018Understanding]_\r\n   * - Neural Networks\r\n     - SO_GAAL\r\n     - Single-Objective Generative Adversarial Active Learning (`example <https://github.com/yzhao062/pyod/blob/development/examples/so_gaal_example.py>`__)\r\n     - 2019\r\n     - [#Liu2019Generative]_\r\n   * - Neural Networks\r\n     - MO_GAAL\r\n     - Multiple-Objective Generative Adversarial Active Learning (`example <https://github.com/yzhao062/pyod/blob/development/examples/mo_gaal_example.py>`__)\r\n     - 2019\r\n     - [#Liu2019Generative]_\r\n   * - Neural Networks\r\n     - DeepSVDD\r\n     - Deep One-Class Classification (`example <https://github.com/yzhao062/pyod/blob/development/examples/deepsvdd_example.py>`__)\r\n     - 2018\r\n     - [#Ruff2018Deep]_\r\n   * - Neural Networks\r\n     - AnoGAN\r\n     - Anomaly Detection with Generative Adversarial Networks\r\n     - 2017\r\n     - [#Schlegl2017Unsupervised]_\r\n   * - Neural Networks\r\n     - ALAD\r\n     - Adversarially learned anomaly detection (`example <https://github.com/yzhao062/pyod/blob/development/examples/alad_example.py>`__)\r\n     - 2018\r\n     - [#Zenati2018Adversarially]_\r\n   * - Neural Networks\r\n     - AE1SVM\r\n     - Autoencoder-based One-class Support Vector Machine (`example <https://github.com/yzhao062/pyod/blob/development/examples/ae1svm_example.py>`__)\r\n     - 2019\r\n     - [#Nguyen2019scalable]_\r\n   * - Neural Networks\r\n     - DevNet\r\n     - Deep Anomaly Detection with Deviation Networks (`example <https://github.com/yzhao062/pyod/blob/development/examples/devnet_example.py>`__)\r\n     - 2019\r\n     - [#Pang2019Deep]_\r\n   * - Graph-based\r\n     - R-Graph\r\n     - Outlier detection by R-graph (`example <https://github.com/yzhao062/pyod/blob/development/examples/rgraph_example.py>`__)\r\n     - 2017\r\n     - [#You2017Provable]_\r\n   * - Graph-based\r\n     - LUNAR\r\n     - LUNAR: Unifying Local OD Methods via Graph Neural Networks (`example <https://github.com/yzhao062/pyod/blob/development/examples/lunar_example.py>`__)\r\n     - 2022\r\n     - [#Goodge2022Lunar]_\r\n   * - Embedding-based\r\n     - EmbeddingOD\r\n     - Multi-modal anomaly detection via foundation model embeddings, text, image, and audio (`example <https://github.com/yzhao062/pyod/blob/development/examples/embedding_od_example.py>`__)\r\n     - 2025\r\n     - [#Li2024NLPADBench]_\r\n\r\n\r\nEnsemble methods (IForest, INNE, DIF, FB, LSCP, LODA, SUOD, XGBOD) are included in the table above. Score combination functions (average, maximization, AOM, MOA, median, majority vote) are in ``pyod.models.combination``. See `API docs <https://pyod.readthedocs.io/en/latest/pyod.models.tabular.html>`__ for details.\r\n\r\n\r\n**(i-b) Time Series Anomaly Detection** :\r\n\r\nAll time series detectors use the same ``fit``/``predict``/``decision_function`` API as tabular detectors, with one exception: ``MatrixProfile`` is transductive (train-only; use ``decision_scores_`` and ``labels_`` after ``fit()``, no out-of-sample ``predict``).\r\n\r\n**Input format**: numpy array of shape ``(n_timestamps,)`` for univariate or ``(n_timestamps, n_channels)`` for multivariate. Each row is one timestep; columns are channels/features. Pandas DataFrames and lists are auto-converted. **Output**: ``decision_scores_`` of shape ``(n_timestamps,)`` with one anomaly score per timestep.\r\n\r\n**Time series detection in 3 lines**:\r\n\r\n.. code-block:: python\r\n\r\n    from pyod.models.ts_kshape import KShape      # or any TS detector\r\n    clf = KShape(window_size=20)\r\n    clf.fit(X_train)                               # shape (n_timestamps,) or (n_timestamps, n_channels)\r\n    scores = clf.decision_scores_                  # per-timestamp anomaly scores\r\n\r\nAlgorithm rankings from `TSB-AD benchmark <https://github.com/TheDatumOrg/TSB-AD>`__ [#Liu2024TSB]_ (NeurIPS 2024, 1070 datasets):\r\n\r\n.. list-table::\r\n   :widths: 15 18 50 5 12\r\n   :header-rows: 1\r\n\r\n   * - Type\r\n     - Abbr\r\n     - Algorithm\r\n     - Year\r\n     - Ref\r\n   * - Windowed Bridge\r\n     - TimeSeriesOD\r\n     - Any PyOD detector on sliding windows (`example <https://github.com/yzhao062/pyod/blob/development/examples/ts_od_example.py>`__)\r\n     - 2026\r\n     -\r\n   * - Subsequence\r\n     - MatrixProfile\r\n     - Matrix Profile via STOMP, transductive (`example <https://github.com/yzhao062/pyod/blob/development/examples/ts_matrix_profile_example.py>`__)\r\n     - 2016\r\n     - [#Yeh2016Matrix]_\r\n   * - Frequency\r\n     - SpectralResidual\r\n     - Spectral Residual: FFT-based saliency (`example <https://github.com/yzhao062/pyod/blob/development/examples/ts_spectral_residual_example.py>`__)\r\n     - 2019\r\n     - [#Ren2019Time]_\r\n   * - Clustering\r\n     - KShape\r\n     - k-Shape clustering (#2 in TSB-AD) (`example <https://github.com/yzhao062/pyod/blob/development/examples/ts_kshape_example.py>`__)\r\n     - 2015\r\n     - [#Paparrizos2015KShape]_\r\n   * - Streaming\r\n     - SAND\r\n     - Streaming with drift adaptation, experimental (`example <https://github.com/yzhao062/pyod/blob/development/examples/ts_sand_example.py>`__)\r\n     - 2021\r\n     - [#Boniol2021SAND]_\r\n   * - Deep Learning\r\n     - LSTMAD\r\n     - LSTM prediction error + Mahalanobis scoring\r\n     - 2015\r\n     - [#Malhotra2015Long]_\r\n   * - Deep Learning\r\n     - AnomalyTransformer\r\n     - Transformer with association discrepancy (experimental)\r\n     - 2022\r\n     - [#Xu2022Anomaly]_\r\n\r\n\r\n**(i-c) Graph Anomaly Detection** (``pip install pyod[graph]``):\r\n\r\nAll graph detectors are **transductive** in v1: use ``decision_scores_`` and ``labels_`` after ``fit()``. No out-of-sample ``predict``. Input: PyG ``Data`` object with ``x`` (node features) and ``edge_index`` (COO edges). SCAN works without features.\r\n\r\n**Graph detection in 3 lines** (``pip install pyod[graph]``):\r\n\r\n.. code-block:: python\r\n\r\n    from pyod.models.pyg_dominant import DOMINANT\r\n    clf = DOMINANT(hidden_dim=64, epochs=100)\r\n    clf.fit(data)                                  # PyG Data object\r\n    scores = clf.decision_scores_                  # per-node anomaly scores\r\n\r\nAlgorithm rankings from `BOND benchmark <https://arxiv.org/abs/2206.10071>`__ [#Liu2022BOND]_ (NeurIPS 2022, 14 datasets):\r\n\r\n.. list-table::\r\n   :widths: 18 18 45 5 14\r\n   :header-rows: 1\r\n\r\n   * - Type\r\n     - Abbr\r\n     - Algorithm\r\n     - Year\r\n     - Ref\r\n   * - GCN Autoencoder\r\n     - DOMINANT\r\n     - GCN AE, structure + attribute reconstruction (#1 BOND deep) (`dominant example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_dominant_example.py>`__)\r\n     - 2019\r\n     - [#Ding2019DOMINANT]_\r\n   * - Contrastive\r\n     - CoLA\r\n     - Contrastive self-supervised, local neighbor context (#2 BOND deep) (`cola example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_cola_example.py>`__)\r\n     - 2022\r\n     - [#Liu2022CoLA]_\r\n   * - Contrastive+AE\r\n     - CONAD\r\n     - Contrastive with anomalous-view injection + dual reconstruction (`conad example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_conad_example.py>`__)\r\n     - 2022\r\n     - [#Xu2022CONAD]_\r\n   * - Attention AE\r\n     - AnomalyDAE\r\n     - GAT structure encoder + MLP attribute encoder (`anomalydae example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_anomalydae_example.py>`__)\r\n     - 2020\r\n     - [#Fan2020AnomalyDAE]_\r\n   * - Motif AE\r\n     - GUIDE\r\n     - Dual GCN AE on original + triangle-motif adjacency (`guide example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_guide_example.py>`__)\r\n     - 2021\r\n     - [#Yuan2021GUIDE]_\r\n   * - Matrix Factor.\r\n     - Radar\r\n     - Residual analysis via matrix factorization (`radar example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_radar_example.py>`__)\r\n     - 2017\r\n     - [#Li2017Radar]_\r\n   * - Matrix Factor.\r\n     - ANOMALOUS\r\n     - Joint MF with Laplacian regularization (`anomalous example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_anomalous_example.py>`__)\r\n     - 2018\r\n     - [#Peng2018ANOMALOUS]_\r\n   * - Structural\r\n     - SCAN\r\n     - Structural clustering, no features needed (`scan example <https://github.com/yzhao062/pyod/blob/development/examples/pyg_scan_example.py>`__)\r\n     - 2007\r\n     - [#Xu2007SCAN]_\r\n\r\n\r\n**(i-d) Audio Anomaly Detection** (``pip install pyod[audio]``):\r\n\r\nAudio clips use the same ``fit``/``decision_function`` API. Two paths are available: a lightweight embed-then-detect path (``EmbeddingOD.for_audio()`` turns each clip into a 74-dimensional handcrafted acoustic vector and runs any classical detector), and a dedicated deep detector (``AudioAE``, a log-mel reconstruction autoencoder). Inputs are file paths, waveform arrays, or ``(waveform, sample_rate)`` tuples. **Output**: one anomaly score per clip.\r\n\r\n**Audio detection in 3 lines** (``pip install pyod[audio]``):\r\n\r\n.. code-block:: python\r\n\r\n    from pyod.models.embedding import EmbeddingOD\r\n    clf = EmbeddingOD.for_audio('balanced')        # 74-dim handcrafted features + KNN\r\n    clf.fit(train_clips)                            # list of file paths or waveform arrays\r\n    scores = clf.decision_scores_                  # per-clip anomaly scores\r\n\r\n.. list-table::\r\n   :widths: 18 18 45 5 14\r\n   :header-rows: 1\r\n\r\n   * - Type\r\n     - Abbr\r\n     - Algorithm\r\n     - Year\r\n     - Ref\r\n   * - Embed then Detect\r\n     - EmbeddingOD\r\n     - ``for_audio()``: 74-dim MFCC, chroma, and spectral features with any detector\r\n     - 2026\r\n     -\r\n   * - Deep AE\r\n     - AudioAE\r\n     - Log-mel reconstruction autoencoder (DCASE 2020 Task 2 baseline)\r\n     - 2020\r\n     -\r\n\r\n\r\n**(ii) Utility Functions**:\r\n\r\n===================  ============================  =====================================================================================================================================================\r\nType                 Name                          Function\r\n===================  ============================  =====================================================================================================================================================\r\nData                 generate_data                 Synthesized data generation; normal data from multivariate Gaussian, outliers from uniform distribution\r\nData                 generate_data_clusters        Synthesized data generation in clusters for more complex patterns\r\nEvaluation           evaluate_print                Print ROC-AUC and Precision @ Rank n for a detector\r\nEvaluation           precision_n_scores            Calculate Precision @ Rank n\r\nUtility              get_label_n                   Turn raw outlier scores into binary labels by assigning 1 to the top n scores\r\nStat                 wpearsonr                     Calculate the weighted Pearson correlation of two samples\r\nEncoding             resolve_encoder               Resolve an encoder from a string name, BaseEncoder instance, or callable\r\nEncoding             SentenceTransformerEncoder     Encode text via sentence-transformers models (e.g., MiniLM, mpnet)\r\nEncoding             OpenAIEncoder                 Encode text via OpenAI Embeddings API (text-embedding-3-small/large)\r\nEncoding             HuggingFaceEncoder            Encode text or images via HuggingFace transformers (BERT, DINOv2, CLIP)\r\n===================  ============================  =====================================================================================================================================================\r\n\r\n----\r\n\r\nQuick Start for Outlier Detection\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nPyOD has been well acknowledged by the machine learning community with a few featured posts and tutorials.\r\n\r\n**Analytics Vidhya**: `An Awesome Tutorial to Learn Outlier Detection in Python using PyOD Library <https://www.analyticsvidhya.com/blog/2019/02/outlier-detection-python-pyod/>`__\r\n\r\n**KDnuggets**: `Intuitive Visualization of Outlier Detection Methods <https://www.kdnuggets.com/2019/02/outlier-detection-methods-cheat-sheet.html>`__, `An Overview of Outlier Detection Methods from PyOD <https://www.kdnuggets.com/2019/06/overview-outlier-detection-methods-pyod.html>`__\r\n\r\n**Towards Data Science**: `Anomaly Detection for Dummies <https://towardsdatascience.com/anomaly-detection-for-dummies-15f148e559c1>`__\r\n\r\n`\"examples/knn_example.py\" <https://github.com/yzhao062/pyod/blob/master/examples/knn_example.py>`__\r\ndemonstrates the basic API of using kNN detector. **It is noted that the API across all other algorithms are consistent/similar**.\r\n\r\nMore detailed instructions for running examples can be found in `examples directory <https://github.com/yzhao062/pyod/blob/master/examples>`__.\r\n\r\n\r\n#. Initialize a kNN detector, fit the model, and make the prediction.\r\n\r\n   .. code-block:: python\r\n\r\n\r\n       from pyod.models.knn import KNN   # kNN detector\r\n\r\n       # train kNN detector\r\n       clf_name = 'KNN'\r\n       clf = KNN()\r\n       clf.fit(X_train)\r\n\r\n       # get the prediction label and outlier scores of the training data\r\n       y_train_pred = clf.labels_  # binary labels (0: inliers, 1: outliers)\r\n       y_train_scores = clf.decision_scores_  # raw outlier scores\r\n\r\n       # get the prediction on the test data\r\n       y_test_pred = clf.predict(X_test)  # outlier labels (0 or 1)\r\n       y_test_scores = clf.decision_function(X_test)  # outlier scores\r\n\r\n       # it is possible to get the prediction confidence as well\r\n       y_test_pred, y_test_pred_confidence = clf.predict(X_test, return_confidence=True)  # outlier labels (0 or 1) and confidence in the range of [0,1]\r\n\r\n#. Evaluate the prediction by ROC and Precision @ Rank n (p@n).\r\n\r\n   .. code-block:: python\r\n\r\n       from pyod.utils.data import evaluate_print\r\n       \r\n       # evaluate and print the results\r\n       print(\"\\nOn Training Data:\")\r\n       evaluate_print(clf_name, y_train, y_train_scores)\r\n       print(\"\\nOn Test Data:\")\r\n       evaluate_print(clf_name, y_test, y_test_scores)\r\n\r\n\r\n#. See a sample output & visualization.\r\n\r\n\r\n   .. code-block:: python\r\n\r\n\r\n       On Training Data:\r\n       KNN ROC:1.0, precision @ rank n:1.0\r\n\r\n       On Test Data:\r\n       KNN ROC:0.9989, precision @ rank n:0.9\r\n\r\n   .. code-block:: python\r\n\r\n\r\n       visualize(clf_name, X_train, y_train, X_test, y_test, y_train_pred,\r\n           y_test_pred, show_figure=True, save_figure=False)\r\n\r\n----\r\n\r\nAcknowledgments\n^^^^^^^^^^^^^^^\n\nThis material is based upon work supported by the National Science Foundation\nunder Award No. `2346158 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2346158>`_\nfor \"NSF POSE: Phase II: OpenAD: An Integrated Open-Source Ecosystem for\nAnomaly Detection.\" The award lists the University of Illinois Chicago as the\nlead organization and Illinois Institute of Technology, Lehigh University, and\nthe University of Southern California as sub-awardee organizations.\n\nAny opinions, findings, and conclusions or recommendations expressed in this\nmaterial are those of the author(s) and do not necessarily reflect the views\nof the National Science Foundation.\n\n----\n\nReference\n^^^^^^^^^\r\n\r\n\r\n.. [#Aggarwal2015Outlier] Aggarwal, C.C., 2015. Outlier analysis. In Data mining (pp. 237-263). Springer, Cham.\r\n\r\n.. [#Aggarwal2015Theoretical] Aggarwal, C.C. and Sathe, S., 2015. Theoretical foundations and algorithms for outlier ensembles.\\ *ACM SIGKDD Explorations Newsletter*\\ , 17(1), pp.24-47.\r\n\r\n.. [#Aggarwal2017Outlier] Aggarwal, C.C. and Sathe, S., 2017. Outlier ensembles: An introduction. Springer.\r\n\r\n.. [#Almardeny2020A] Almardeny, Y., Boujnah, N. and Cleary, F., 2020. A Novel Outlier Detection Method for Multivariate Data. *IEEE Transactions on Knowledge and Data Engineering*.\r\n\r\n.. [#Angiulli2002Fast] Angiulli, F. and Pizzuti, C., 2002, August. Fast outlier detection in high dimensional spaces. In *European Conference on Principles of Data Mining and Knowledge Discovery* pp. 15-27.\r\n\r\n.. [#Arning1996A] Arning, A., Agrawal, R. and Raghavan, P., 1996, August. A Linear Method for Deviation Detection in Large Databases. In *KDD* (Vol. 1141, No. 50, pp. 972-981).\r\n\r\n.. [#Bandaragoda2018Isolation] Bandaragoda, T. R., Ting, K. M., Albrecht, D., Liu, F. T., Zhu, Y., and Wells, J. R., 2018, Isolation-based anomaly detection using nearest-neighbor ensembles. *Computational Intelligence*\\ , 34(4), pp. 968-998.\r\n\r\n.. [#Breunig2000LOF] Breunig, M.M., Kriegel, H.P., Ng, R.T. and Sander, J., 2000, May. LOF: identifying density-based local outliers. *ACM Sigmod Record*\\ , 29(2), pp. 93-104.\r\n\r\n.. [#Burgess2018Understanding] Burgess, Christopher P., et al. \"Understanding disentangling in beta-VAE.\" arXiv preprint arXiv:1804.03599 (2018).\r\n\r\n.. [#Campello2013Density] Campello, R.J.G.B., Moulavi, D. and Sander, J., 2013, April. Density-based clustering based on hierarchical density estimates. In *Pacific-Asia Conference on Knowledge Discovery and Data Mining* (pp. 160-172). Springer.\r\n\r\n.. [#Cook1977Detection] Cook, R.D., 1977. Detection of influential observation in linear regression. Technometrics, 19(1), pp.15-18.\r\n\r\n.. [#Chen2024PyOD] Chen, S., Qian, Z., Siu, W., Hu, X., Li, J., Li, S., Qin, Y., Yang, T., Xiao, Z., Ye, W. and Zhang, Y., 2024. PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection. arXiv preprint arXiv:2412.12154.\r\n\r\n.. [#Fang2001Wrap] Fang, K.T. and Ma, C.X., 2001. Wrap-around L2-discrepancy of random sampling, Latin hypercube and uniform designs. Journal of complexity, 17(4), pp.608-624.\r\n\r\n.. [#Goldstein2012Histogram] Goldstein, M. and Dengel, A., 2012. Histogram-based outlier score (hbos): A fast unsupervised anomaly detection algorithm. In *KI-2012: Poster and Demo Track*\\ , pp.59-63.\r\n\r\n.. [#Goodge2022Lunar] Goodge, A., Hooi, B., Ng, S.K. and Ng, W.S., 2022, June. Lunar: Unifying local outlier detection methods via graph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence.\r\n\r\n.. [#Gopalan2019PIDForest] Gopalan, P., Sharan, V. and Wieder, U., 2019. PIDForest: Anomaly Detection via Partial Identification. In Advances in Neural Information Processing Systems, pp. 15783-15793.\r\n\r\n.. [#Han2022ADBench] Han, S., Hu, X., Huang, H., Jiang, M. and Zhao, Y., 2022. ADBench: Anomaly Detection Benchmark. arXiv preprint arXiv:2206.09426.\r\n\r\n.. [#Hardin2004Outlier] Hardin, J. and Rocke, D.M., 2004. Outlier detection in the multiple cluster setting using the minimum covariance determinant estimator. *Computational Statistics & Data Analysis*\\ , 44(4), pp.625-638.\r\n\r\n.. [#He2003Discovering] He, Z., Xu, X. and Deng, S., 2003. Discovering cluster-based local outliers. *Pattern Recognition Letters*\\ , 24(9-10), pp.1641-1650.\r\n\r\n.. [#Hoffmann2007Kernel] Hoffmann, H., 2007. Kernel PCA for novelty detection. Pattern recognition, 40(3), pp.863-874.\r\n\r\n.. [#Iglewicz1993How] Iglewicz, B. and Hoaglin, D.C., 1993. How to detect and handle outliers (Vol. 16). Asq Press.\r\n\r\n.. [#Janssens2012Stochastic] Janssens, J.H.M., Huszár, F., Postma, E.O. and van den Herik, H.J., 2012. Stochastic outlier selection. Technical report TiCC TR 2012-001, Tilburg University, Tilburg Center for Cognition and Communication, Tilburg, The Netherlands.\r\n\r\n.. [#Kingma2013Auto] Kingma, D.P. and Welling, M., 2013. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114.\r\n\r\n.. [#Kriegel2008Angle] Kriegel, H.P. and Zimek, A., 2008, August. Angle-based outlier detection in high-dimensional data. In *KDD '08*\\ , pp. 444-452. ACM.\r\n\r\n.. [#Kriegel2009Outlier] Kriegel, H.P., Kröger, P., Schubert, E. and Zimek, A., 2009, April. Outlier detection in axis-parallel subspaces of high dimensional data. In *Pacific-Asia Conference on Knowledge Discovery and Data Mining*\\ , pp. 831-838. Springer, Berlin, Heidelberg.\r\n\r\n.. [#Latecki2007Outlier] Latecki, L.J., Lazarevic, A. and Pokrajac, D., 2007, July. Outlier detection with kernel density functions. In International Workshop on Machine Learning and Data Mining in Pattern Recognition (pp. 61-75). Springer, Berlin, Heidelberg.\r\n\r\n.. [#Lazarevic2005Feature] Lazarevic, A. and Kumar, V., 2005, August. Feature bagging for outlier detection. In *KDD '05*. 2005.\r\n\r\n.. [#Li2024NLPADBench] Li, Y., Li, J., Xiao, Z., Yang, T., Nian, Y., Hu, X. and Zhao, Y., 2025. NLP-ADBench: NLP Anomaly Detection Benchmark. In *Findings of the Association for Computational Linguistics: EMNLP 2025*.\r\n\r\n.. [#Li2019MADGAN] Li, D., Chen, D., Jin, B., Shi, L., Goh, J. and Ng, S.K., 2019, September. MAD-GAN: Multivariate anomaly detection for time series data with generative adversarial networks. In *International Conference on Artificial Neural Networks* (pp. 703-716). Springer, Cham.\r\n\r\n.. [#Li2020COPOD] Li, Z., Zhao, Y., Botta, N., Ionescu, C. and Hu, X. COPOD: Copula-Based Outlier Detection. *IEEE International Conference on Data Mining (ICDM)*, 2020.\r\n\r\n.. [#Li2021ECOD] Li, Z., Zhao, Y., Hu, X., Botta, N., Ionescu, C. and Chen, H. G. ECOD: Unsupervised Outlier Detection Using Empirical Cumulative Distribution Functions. *IEEE Transactions on Knowledge and Data Engineering (TKDE)*, 2022.\r\n\r\n.. [#Liu2008Isolation] Liu, F.T., Ting, K.M. and Zhou, Z.H., 2008, December. Isolation forest. In *International Conference on Data Mining*\\ , pp. 413-422. IEEE.\r\n\r\n.. [#Liu2019Generative] Liu, Y., Li, Z., Zhou, C., Jiang, Y., Sun, J., Wang, M. and He, X., 2019. Generative adversarial active learning for unsupervised outlier detection. *IEEE Transactions on Knowledge and Data Engineering*.\r\n\r\n.. [#Nguyen2019scalable] Nguyen, M.N. and Vien, N.A., 2019. Scalable and interpretable one-class svms with deep learning and random fourier features. In *Machine Learning and Knowledge Discovery in Databases: European Conference*, ECML PKDD, 2018.\r\n\r\n.. [#Pang2019Deep] Pang, Guansong, Chunhua Shen, and Anton Van Den Hengel. \"Deep anomaly detection with deviation networks.\" In *KDD*, pp. 353-362. 2019.\r\n\r\n.. [#Papadimitriou2003LOCI] Papadimitriou, S., Kitagawa, H., Gibbons, P.B. and Faloutsos, C., 2003, March. LOCI: Fast outlier detection using the local correlation integral. In *ICDE '03*, pp. 315-326. IEEE.\r\n\r\n.. [#Pevny2016Loda] Pevný, T., 2016. Loda: Lightweight on-line detector of anomalies. *Machine Learning*, 102(2), pp.275-304.\r\n\r\n.. [#Perini2020Quantifying] Perini, L., Vercruyssen, V., Davis, J. Quantifying the confidence of anomaly detectors in their example-wise predictions. In *Joint European Conference on Machine Learning and Knowledge Discovery in Databases (ECML-PKDD)*, 2020.\r\n\r\n.. [#Perini2023Rejection] Perini, L., Davis, J. Unsupervised anomaly detection with rejection. In *Proceedings of the Thirty-Seven Conference on Neural Information Processing Systems (NeurIPS)*, 2023.\r\n\r\n.. [#Ramaswamy2000Efficient] Ramaswamy, S., Rastogi, R. and Shim, K., 2000, May. Efficient algorithms for mining outliers from large data sets. *ACM Sigmod Record*\\ , 29(2), pp. 427-438.\r\n\r\n.. [#Rousseeuw1999A] Rousseeuw, P.J. and Driessen, K.V., 1999. A fast algorithm for the minimum covariance determinant estimator. *Technometrics*\\ , 41(3), pp.212-223.\r\n\r\n.. [#Ruff2018Deep] Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S.A., Binder, A., Müller, E. and Kloft, M., 2018, July. Deep one-class classification. In *International conference on machine learning* (pp. 4393-4402). PMLR.\r\n\r\n.. [#Schlegl2017Unsupervised] Schlegl, T., Seeböck, P., Waldstein, S.M., Schmidt-Erfurth, U. and Langs, G., 2017, June. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In International conference on information processing in medical imaging (pp. 146-157). Springer, Cham.\r\n\r\n.. [#Scholkopf2001Estimating] Scholkopf, B., Platt, J.C., Shawe-Taylor, J., Smola, A.J. and Williamson, R.C., 2001. Estimating the support of a high-dimensional distribution. *Neural Computation*, 13(7), pp.1443-1471.\r\n\r\n.. [#Shyu2003A] Shyu, M.L., Chen, S.C., Sarinnapakorn, K. and Chang, L., 2003. A novel anomaly detection scheme based on principal component classifier. *MIAMI UNIV CORAL GABLES FL DEPT OF ELECTRICAL AND COMPUTER ENGINEERING*.\r\n\r\n.. [#Sugiyama2013Rapid] Sugiyama, M. and Borgwardt, K., 2013. Rapid distance-based outlier detection via sampling. Advances in neural information processing systems, 26.\r\n\r\n.. [#Tang2002Enhancing] Tang, J., Chen, Z., Fu, A.W.C. and Cheung, D.W., 2002, May. Enhancing effectiveness of outlier detections for low density patterns. In *Pacific-Asia Conference on Knowledge Discovery and Data Mining*, pp. 535-548. Springer, Berlin, Heidelberg.\r\n\r\n.. [#Wang2020adVAE] Wang, X., Du, Y., Lin, S., Cui, P., Shen, Y. and Yang, Y., 2019. adVAE: A self-adversarial variational autoencoder with Gaussian anomaly prior knowledge for anomaly detection. *Knowledge-Based Systems*.\r\n\r\n.. [#Xu2023Deep] Xu, H., Pang, G., Wang, Y., Wang, Y., 2023. Deep isolation forest for anomaly detection. *IEEE Transactions on Knowledge and Data Engineering*.\r\n\r\n.. [#Yang2024ad] Yang, T., Nian, Y., Li, S., Xu, R., Li, Y., Li, J., Xiao, Z., Hu, X., Rossi, R., Ding, K. and Hu, X., 2024. AD-LLM: Benchmarking Large Language Models for Anomaly Detection. arXiv preprint arXiv:2412.11142.\r\n\r\n.. [#You2017Provable] You, C., Robinson, D.P. and Vidal, R., 2017. Provable self-representation based outlier detection in a union of subspaces. In Proceedings of the IEEE conference on computer vision and pattern recognition.\r\n\r\n.. [#Zenati2018Adversarially] Zenati, H., Romain, M., Foo, C.S., Lecouat, B. and Chandrasekhar, V., 2018, November. Adversarially learned anomaly detection. In 2018 IEEE International conference on data mining (ICDM) (pp. 727-736). IEEE.\r\n\r\n.. [#Zhao2018XGBOD] Zhao, Y. and Hryniewicki, M.K. XGBOD: Improving Supervised Outlier Detection with Unsupervised Representation Learning. *IEEE International Joint Conference on Neural Networks*\\ , 2018.\r\n\r\n.. [#Zhao2019LSCP] Zhao, Y., Nasrullah, Z., Hryniewicki, M.K. and Li, Z., 2019, May. LSCP: Locally selective combination in parallel outlier ensembles. In *Proceedings of the 2019 SIAM International Conference on Data Mining (SDM)*, pp. 585-593. Society for Industrial and Applied Mathematics.\r\n\r\n.. [#Zhao2021SUOD] Zhao, Y., Hu, X., Cheng, C., Wang, C., Wan, C., Wang, W., Yang, J., Bai, H., Li, Z., Xiao, C., Wang, Y., Qiao, Z., Sun, J. and Akoglu, L. (2021). SUOD: Accelerating Large-scale Unsupervised Heterogeneous Outlier Detection. *Conference on Machine Learning and Systems (MLSys)*.\r\n\r\n.. [#Boniol2021SAND] Boniol, P., Paparrizos, J., Palpanas, T. and Franklin, M.J., 2021. SAND: Streaming Subsequence Anomaly Detection. *Proceedings of the VLDB Endowment*, 14(10), pp.1717-1729.\r\n\r\n.. [#Malhotra2015Long] Malhotra, P., Vig, L., Shroff, G. and Agarwal, P., 2015. Long Short Term Memory Networks for Anomaly Detection in Time Series. In *European Symposium on Artificial Neural Networks (ESANN)*.\r\n\r\n.. [#Paparrizos2015KShape] Paparrizos, J. and Gravano, L., 2015. k-Shape: Efficient and Accurate Clustering of Time Series. In *Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data*, pp.1855-1870.\r\n\r\n.. [#Ren2019Time] Ren, H., Xu, B., Wang, Y., Yi, C., Huang, C., Kou, X., Xing, T., Yang, M., Tong, J. and Zhang, Q., 2019. Time-Series Anomaly Detection Service at Microsoft. In *Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining*, pp.3009-3017.\r\n\r\n.. [#Xu2022Anomaly] Xu, J., Wu, H., Wang, J. and Long, M., 2022. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. In *International Conference on Learning Representations (ICLR)*.\r\n\r\n.. [#Yeh2016Matrix] Yeh, C.C.M., Zhu, Y., Ulanova, L., Begum, N., Ding, Y., Dau, H.A., Silva, D.F., Mueen, A. and Keogh, E., 2016. Matrix Profile I: All Pairs Similarity Joins for Time Series Subsequences. In *2016 IEEE 16th International Conference on Data Mining (ICDM)*, pp.1317-1322.\r\n\r\n.. [#Ding2019DOMINANT] Ding, K., Li, J., Bhanushali, R. and Liu, H., 2019. Deep Anomaly Detection on Attributed Networks. In *Proceedings of the 2019 SIAM International Conference on Data Mining*, pp.594-602. SIAM.\r\n\r\n.. [#Liu2022CoLA] Liu, Y., Li, Z., Pan, S., Gool, T., Xiang, T. and Gong, B., 2022. Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning. In *Proceedings of the ACM Web Conference 2022*, pp.2137-2147.\r\n\r\n.. [#Xu2022CONAD] Xu, Z., Huang, X., Zhao, Y., Dong, Y. and Li, J., 2022. Contrastive Attributed Network Anomaly Detection with Data Augmentation. In *Pacific-Asia Conference on Knowledge Discovery and Data Mining*, pp.444-457. Springer.\r\n\r\n.. [#Fan2020AnomalyDAE] Fan, H., Zhang, F. and Li, Z., 2020. AnomalyDAE: Dual Autoencoder for Anomaly Detection on Attributed Networks. In *Proceedings of the 29th ACM International Conference on Information and Knowledge Management*, pp.747-756.\r\n\r\n.. [#Yuan2021GUIDE] Yuan, X., Zhou, N., Yu, S., Huang, H., Chen, Z. and Xia, F., 2021. Higher-Order Structure Based Anomaly Detection on Attributed Networks. In *2021 IEEE International Conference on Big Data*, pp.2691-2700. IEEE.\r\n\r\n.. [#Li2017Radar] Li, J., Dani, H., Hu, X. and Liu, H., 2017. Radar: Residual Analysis for Anomaly Detection in Attributed Networks. In *Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence*, pp.2152-2158.\r\n\r\n.. [#Peng2018ANOMALOUS] Peng, Z., Luo, M., Li, J., Liu, H. and Zheng, Q., 2018. ANOMALOUS: A Joint Modeling Approach for Anomaly Detection on Attributed Networks. In *Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence*, pp.3529-3535.\r\n\r\n.. [#Xu2007SCAN] Xu, X., Yuruk, N., Feng, Z. and Schweiger, T.A.J., 2007. SCAN: A Structural Clustering Algorithm for Networks. In *Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining*, pp.824-833.\r\n\r\n.. [#Liu2024TSB] Liu, Q., Boniol, P., Palpanas, T. and Paparrizos, J., 2024. TSB-AD: Towards A Reliable Time-Series Anomaly Detection Benchmark. In *Advances in Neural Information Processing Systems (NeurIPS)*.\r\n\r\n.. [#Liu2022BOND] Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K., Sun, L., Li, J., Chen, G.H., Jia, Z. and Yu, P.S., 2022. BOND: Benchmarking Unsupervised Outlier Node Detection on Static Attributed Graphs. In *Advances in Neural Information Processing Systems (NeurIPS)*.\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C96E:3BCC6:174B6E:5C7468:6AB92123"},"text_sha256":"888e12e1ef663cda6f43e34f91e223bda3368ce6a395f9adf126f85ae13385d1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"espnet/espnet","input_row":{"repository":"espnet/espnet","url":"https://github.com/espnet/espnet","name":"espnet","owner":"espnet","description":"End-to-End Speech Processing Toolkit","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9971,"issues":2502,"created_at":"2017-12-13T00:45:11Z","updated_at":"2026-09-27T14:02:06Z","first_commit_at":"2017-12-13T00:50:36Z","last_commit_at":"2026-09-26T18:16:22Z","activity_months":105.44,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:02.119Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"espnet/espnet","visibility":"public","created_at":"2017-12-13T00:45:11Z","updated_at":"2026-09-27T14:02:06Z","private":false,"fork":false,"archived":false,"stargazers_count":9971,"open_issues_count":105,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3253","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17A31B5:1BC2758:6AB928E2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3252","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17B728B:1BD6D0D:6AB928E2"},"commit":{"sha":"76734d19215ff5f67f229f1c39a380b3f5a81491","url":"https://github.com/espnet/espnet/commit/76734d19215ff5f67f229f1c39a380b3f5a81491","date":"2018-05-24T16:26:34Z","author_date":"2018-05-24T16:26:34Z","committer_date":"2018-05-24T16:26:34Z","tree_sha":"6cea78de8edc32c2f834c011391eb4afe90fc854","message_first_line":"Merge pull request #189 from Fhrozen/acs_readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"3251","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CE:180242:17DBEDD:1BFB792:6AB928E2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8894,"blob_sha":"9dac20da4201107d9acd20550134496978cbe0a5","priority":0}],"documents":[{"path":"README.md","size":8894,"blob_sha":"9dac20da4201107d9acd20550134496978cbe0a5","priority":0,"status":200,"text":"# ESPnet: end-to-end speech processing toolkit\n\n[![Build Status](https://travis-ci.org/espnet/espnet.svg?branch=master)](https://travis-ci.org/espnet/espnet)\n\nESPnet is an end-to-end speech processing toolkit, mainly focuses on end-to-end speech recognition.\nESPnet uses [chainer](https://chainer.org/) and [pytorch](http://pytorch.org/) as a main deep learning engine, \nand also follows [Kaldi](http://kaldi-asr.org/) style data processing, feature extraction/format, and recipes to provide a complete setup for speech recognition and other speech processing experiments.\n\n\n## Key Features\n\n- Hybrid CTC/attention based end-to-end ASR \n  - Fast/accurate training with CTC/attention multitask training\n  - CTC/attention joint decoding to boost monotonic alignment decoding\n- Encoder: VGG-like CNN + BLSTM or pyramid BLSTM\n- Attention: Dot product, location-aware attention, variants of multihead (pytorch only)\n- Incorporate RNNLM/LSTMLM trained only with text data\n- Flexible network architecture thanks to chainer and pytorch\n- Kaldi style complete recipe \n  - Support numbers of ASR benchmarks (WSJ, Switchboard, CHiME-4, Librispeech, TED, CSJ, AMI, HKUST, Voxforge, etc.)\n- State-of-the-art performance in Japanese/Chinese benchmarks (comparable/superior to hybrid DNN/HMM and CTC)\n- Moderate performance in standard English benchmarks\n\n## Requirements\n- Python2.7+  \n- Cuda 8.0 (for the use of GPU)  \n- Cudnn 6 (for the use of GPU)  \n- NCCL 2.0+ (for the use of multi-GPUs)\n\n- PyTorch 0.3.x (**no support for PyTorch 0.4.x**)\n- Chainer 4.x+\n\n## Installation\n\nInstall Kaldi, Python libraries and other required tools using system python and virtualenv\n```sh\n$ cd tools\n$ make -j\n```\n\nor using local [miniconda](https://conda.io/docs/glossary.html#miniconda-glossary)\n```sh\n$ cd tools\n$ make -f conda.mk -j\n```\n\nFor higher version (>4.9) of gcc and cuda 9.1 use following command:\n```sh\n$ cd tools\n$ make -j -f Makefile.cuda91.gcc6\n```\n\nYou can compare Makefile and Makefile.cuda91.gcc6 to change makefile accordingly for other version of gcc/cuda.\n\n\nTo use cuda (and cudnn), make sure to set paths in your `.bashrc` or `.bash_profile` appropriately.\n```\nCUDAROOT=/path/to/cuda\n\nexport PATH=$CUDAROOT/bin:$PATH\nexport LD_LIBRARY_PATH=$CUDAROOT/lib64:$LD_LIBRARY_PATH\nexport CUDA_HOME=$CUDAROOT\nexport CUDA_PATH=$CUDAROOT\n```\n\nIf you want to use multiple GPUs, you should install [nccl](https://developer.nvidia.com/nccl) \nand set paths in your `.bashrc` or `.bash_profile` appropriately, for example:\n```\nCUDAROOT=/path/to/cuda\nNCCL_ROOT=/path/to/nccl\n\nexport CPATH=$NCCL_ROOT/include:$CPATH\nexport LD_LIBRARY_PATH=$NCCL_ROOT/lib/:$CUDAROOT/lib64:$LD_LIBRARY_PATH\nexport LIBRARY_PATH=$NCCL_ROOT/lib/:$LIBRARY_PATH\nexport CUDA_HOME=$CUDAROOT\nexport CUDA_PATH=$CUDAROOT\n```\n## Execution of example scripts\nMove to an example directory under the `egs` directory.\nWe prepare several major ASR benchmarks including WSJ, CHiME-4, and TED.\nThe following directory is an example of performing ASR experiment with the VoxForge Italian Corpus.\n```sh\n$ cd egs/voxforge/asr1\n```\nOnce move to the directory, then, execute the following main script with a **chainer** backend:\n```sh\n$ ./run.sh\n```\nor execute the following main script with a **pytorch** backend \n(currently the pytorch backend does not support VGG-like layers):\n```sh\n$ ./run.sh --backend pytorch --etype blstmp\n```\nWith this main script, you can perform a full procedure of ASR experiments including\n- Data download\n- Data preparation (Kaldi style, see http://kaldi-asr.org/doc/data_prep.html)\n- Feature extraction (Kaldi style, see http://kaldi-asr.org/doc/feat.html)\n- Dictionary and JSON format data preparation\n- Training based on [chainer](https://chainer.org/) or [pytorch](http://pytorch.org/).\n- Recognition and scoring\n\n### Use of GPU\nIf you use GPU in your experiment, set `--ngpu` option in `run.sh` appropriately, e.g., \n```sh\n# use single gpu\n$ ./run.sh --ngpu 1\n\n# use multi-gpu\n$ ./run.sh --ngpu 3\n\n# if you want to specify gpus, set CUDA_VISIBLE_DEVICES as follows\n# (Note that if you use slurm, this specification is not needed)\n$ CUDA_VISIBLE_DEVICES=0,1,2 ./run.sh --ngpu 3\n\n# use cpu\n$ ./run.sh --ngpu 0\n```\nDefault setup uses CPU (`--ngpu 0`).\n\nNote that if you want to use multi-gpu, the installation of [nccl](https://developer.nvidia.com/nccl) \nis required before setup.\n\n### Error due to ACS (Multiple GPUs)\nWhen using multiple GPUs, if the training freezes or lower performance than expected is observed, verify that PCI Express Access Control Services (ACS) are disabled.\nLarger discussions can be found at: [link1](https://devtalk.nvidia.com/default/topic/883054/multi-gpu-peer-to-peer-access-failing-on-tesla-k80-/?offset=26) [link2](https://www.linuxquestions.org/questions/linux-newbie-8/howto-list-all-users-in-system-380426/) [link3](https://github.com/pytorch/pytorch/issues/1637).\nTo disable the PCI Express ACS follow instructions written [here](https://github.com/NVIDIA/caffe/issues/10). You need to have a ROOT user access or request to your administrator for it.\n\n### Docker Container\nTo work inside a docker container, execute `run.sh` located inside the docker directory.\nIt will build a container and execute the main program specified by the following GPU, ASR example, and outside directory information, as follows:\n```sh\n$ cd docker\n$ ./run.sh --docker_gpu 0 --docker_egs chime4/asr1 --docker_folders /export/corpora4/CHiME4/CHiME3 --dlayers 1 --ngpu 1 \n```\nThe docker container is built based on the CUDA and CUDNN version installed in your computer.\nThe arguments required for the docker configuration have a prefix \"--docker\" (e.g., `--docker_gpu`, `--docker_egs`, `--docker_folders`). `run.sh` accept all normal ESPnet arguments, which must be followed by these docker arguments.\nMultiple GPUs should be specified with the following options:\n```sh\n$ cd docker\n$ ./run.sh --docker_gpu 0,1,2 --docker_egs chime5/asr1 --docker_folders /export/corpora4/CHiME5 --ngpu 3\n```\nNote that all experimental files and results are created under the normal example directories (`egs/<example>/`).\n\n### Setup in your cluster\nChange `cmd.sh` according to your cluster setup.\nIf you run experiments with your local machine, please use default `cmd.sh`.\nFor more information about `cmd.sh` see http://kaldi-asr.org/doc/queue.html.\nIt supports Grid Engine (`queue.pl`), SLURM (`slurm.pl`), etc.\n\n### Error due to matplotlib\nIf you have the following error (or other numpy related errors), \n```\nRuntimeError: module compiled against API version 0xc but this version of numpy is 0xb\nException in main training loop: numpy.core.multiarray failed to import\nTraceback (most recent call last):\n;\n:\nfrom . import _path, rcParams\nImportError: numpy.core.multiarray failed to import\n```\nThen, please reinstall matplotlib with the following command:\n```sh\n$ cd egs/voxforge/asr1\n$ . ./path.sh\n$ pip install pip --upgrade; pip uninstall matplotlib; pip --no-cache-dir install matplotlib\n```\n\n## CTC, attention, and hybrid CTC/attention\nESPnet can completely switch the mode from CTC, attention, and hybrid CTC/attention\n\n```sh\n# hybrid CTC/attention (default)\n#  --mtlalpha 0.5 and --ctc_weight 0.3 in most cases\n$ ./run.sh\n\n# CTC mode\n$ ./run.sh --mtlalpha 1.0 --ctc_weight 1.0 --recog_model loss.best\n\n# attention mode\n$ ./run.sh --mtlalpha 0.0 --ctc_weight 0.0\n```\n\nThe CTC training mode does not output the validation accuracy, and the optimum model is selected with its loss value \n(i.e., `--recog_model loss.best`).\nAbout the effectiveness of the hybrid CTC/attention during training and recognition, see [1] and [2].\n\n## Results\n\nWe list the character error rate (CER) and word error rate (WER) of major ASR tasks.\n\n|           | CER (%) | WER (%)  |\n|-----------|:----:|:----:|\n| WSJ dev93 | 5.3 | 12.4 |\n| WSJ eval92| 3.6 |  8.9 |\n| CSJ eval1 | 8.5 | N/A  |\n| CSJ eval2 | 6.1 | N/A  |\n| CSJ eval3 | 6.8 | N/A  |\n| HKUST train_dev | 29.7 | N/A  |\n| HKUST dev       | 28.3 | N/A  |\n| Librispeech dev_clean  | 2.9 | 7.7 |\n| Librispeech test_clean | 2.7 | 7.7 |\n\n## Chainer and Pytorch backends\n\n|           | Chainer | Pytorch |\n|-----------|:----:|:----:|\n| Performance | ◎ | ○ |\n| Speed | ○ | ◎ |\n| Multi-GPU | supported | supported |\n| VGG-like encoder | supported | no support |\n| RNNLM integration | supported | supported |\n| #Attention types | 3 (no attention, dot, location) | 12 including variants of multihead |\n\n## References (Please cite the following articles)\n[1] Suyoun Kim, Takaaki Hori, and Shinji Watanabe, \"Joint CTC-attention based end-to-end speech recognition using multi-task learning,\" *Proc. ICASSP'17*, pp. 4835--4839 (2017)\n\n[2] Shinji Watanabe, Takaaki Hori, Suyoun Kim, John R. Hershey and Tomoki Hayashi, \"Hybrid CTC/Attention Architecture for End-to-End Speech Recognition,\" *IEEE Journal of Selected Topics in Signal Processing*, vol. 11, no. 8, pp. 1240-1253, Dec. 2017\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F90:3B6DE:16ED16:5C15BC:6AB92128"},"text_sha256":"8d275130b5621ad0e0cdda32f24e4abc70c28f5cbc00ab73c72ae0c83046cdf8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3250","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093C:180242:17DBF61:1BFB82A:6AB928E3"},"commit":{"sha":"9d77e9c9c815754c0fcc82a2d8f6e3bd8e59c2ab","url":"https://github.com/espnet/espnet/commit/9d77e9c9c815754c0fcc82a2d8f6e3bd8e59c2ab","date":"2026-06-29T17:35:12Z","author_date":"2026-06-29T17:35:08Z","committer_date":"2026-06-29T17:35:12Z","tree_sha":"e7ad1d29855930827a358c630fa0a7cfa0999c15","message_first_line":"[pre-commit.ci] auto fixes from pre-commit.com hooks"},"tree_request_status":200,"tree_rate":{"github_remaining":"3249","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A2:62B94:17A8543:1BC7DED:6AB928E4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":64485,"blob_sha":"a47fa72835e93db603358ba6509a4f6579787d2a","priority":0}],"documents":[{"path":"README.md","size":64485,"blob_sha":"a47fa72835e93db603358ba6509a4f6579787d2a","priority":0,"status":200,"text":"<div align=\"left\"><img src=\"doc/image/espnet_logo1.png\" width=\"550\"/><\/div>\n\n# ESPnet: end-to-end speech processing toolkit\n\n|system/pytorch ver.|2.9.1|2.10.0|2.11.0|\n| :---- | :---: | :---: | :---: |\n|ubuntu/python3.10/pip|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|\n|ubuntu/python3.12/pip|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|\n|ubuntu/python3.10/conda|[![ci on debian12](https://github.com/espnet/espnet/actions/workflows/ci_on_debian12.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_debian12.yml?query=branch%3Amaster)|||\n|debian12/python3.10/conda|[![ci on debian12](https://github.com/espnet/espnet/actions/workflows/ci_on_debian12.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_debian12.yml?query=branch%3Amaster)|||\n|windows/python3.10/pip|[![ci on windows](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml?query=branch%3Amaster)|||\n|macos/python3.10/pip|[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)|||\n|macos/python3.10/conda|[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)|||\n\n<div align=\"center\">\n\n______________________________________________________________________\n[![PyPI version](https://badge.fury.io/py/espnet.svg)](https://badge.fury.io/py/espnet)\n[![Python Versions](https://img.shields.io/pypi/pyversions/espnet.svg)](https://pypi.org/project/espnet/)\n[![Downloads](https://pepy.tech/badge/espnet)](https://pepy.tech/project/espnet)\n[![GitHub license](https://img.shields.io/github/license/espnet/espnet.svg)](https://github.com/espnet/espnet)\n[![codecov](https://codecov.io/gh/espnet/espnet/branch/master/graph/badge.svg)](https://codecov.io/gh/espnet/espnet)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/espnet/espnet/master.svg)](https://results.pre-commit.ci/latest/github/espnet/espnet/master)\n[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/espnet/espnet&style=flat)](https://mergify.com)\n[![Discord](https://img.shields.io/discord/1174538500360650773?color=%239B59B6&label=chat%20on%20discord)](https://discord.gg/hrCs85gFWM)\n\n______________________________________________________________________\n\n[**Docs**](https://espnet.github.io/espnet/)\n| [**Example (ESPnet2)**](https://github.com/espnet/espnet/tree/master/egs2)\n| [**Docker**](https://github.com/espnet/espnet/tree/master/docker)\n| [**Notebook**](https://github.com/espnet/notebook)\n\n<\/div>\n\n______________________________________________________________________\n\nESPnet is an end-to-end speech processing toolkit covering end-to-end speech recognition, text-to-speech, speech translation, speech enhancement, speaker diarization, spoken language understanding, and so on.\nESPnet uses [pytorch](http://pytorch.org/) as a deep learning engine and also follows [Kaldi](http://kaldi-asr.org/) style data processing, feature extraction/format, and recipes to provide a complete setup for various speech processing experiments.\n\n## Tutorial Series\n- 2019 Tutorial at Interspeech\n  - [Material](https://github.com/espnet/interspeech2019-tutorial)\n- 2021 Tutorial at CMU\n  - [Online video](https://youtu.be/2mRz3wH1vd0)\n  - [Material](https://colab.research.google.com/github/espnet/notebook/blob/master/ESPnet2/Course/CMU_SpeechRecognition_Fall2021/general_tutorial.ipynb)\n- 2022 Tutorial at CMU\n  - Usage of ESPnet (ASR as an example)\n    - [Online video](https://youtu.be/YDN8cVjxSik)\n    - [Material](https://colab.research.google.com/github/espnet/notebook/blob/master/ESPnet2/Course/CMU_SpeechRecognition_Fall2022/recipe_tutorial.ipynb)\n  - Add new models/tasks to ESPnet\n    - [Online video](https://youtu.be/Css3XAes7SU)\n    - [Material](https://colab.research.google.com/github/espnet/notebook/blob/master/ESPnet2/Course/CMU_SpeechRecognition_Fall2022/new_task_tutorial.ipynb)\n\n\n## Key Features\n\n### Kaldi-style complete recipe\n- Support numbers of `ASR` recipes (WSJ, Switchboard, CHiME-4/5, Librispeech, TED, CSJ, AMI, HKUST, Voxforge, REVERB, Gigaspeech, etc.)\n- Support numbers of `TTS` recipes in a similar manner to the ASR recipe (LJSpeech, LibriTTS, M-AILABS, etc.)\n- Support numbers of `ST` recipes (Fisher-CallHome Spanish, Libri-trans, IWSLT'18, How2, Must-C, Mboshi-French, etc.)\n- Support numbers of `MT` recipes (IWSLT'14, IWSLT'16, the above ST recipes etc.)\n- Support numbers of `SLU` recipes (CATSLU-MAPS, FSC, Grabo, IEMOCAP, JDCINAL, SNIPS, SLURP, SWBD-DA, etc.)\n- Support numbers of `SE/SS` recipes (DNS-IS2020, LibriMix, SMS-WSJ, VCTK-noisyreverb, WHAM!, WHAMR!, WSJ-2mix, etc.)\n- Support voice conversion recipe (VCC2020 baseline)\n- Support speaker diarization recipe (mini_librispeech, librimix)\n- Support singing voice synthesis recipe (ofuton_p_utagoe_db, opencpop, m4singer, etc.)\n\n### ASR: Automatic Speech Recognition\n- **State-of-the-art performance** in several ASR benchmarks (comparable/superior to hybrid DNN/HMM and CTC)\n- **Hybrid CTC/attention** based end-to-end ASR\n  - Fast/accurate training with CTC/attention multitask training\n  - CTC/attention joint decoding to boost monotonic alignment decoding\n  - Encoder: VGG-like CNN + BiRNN (LSTM/GRU), sub-sampling BiRNN (LSTM/GRU), Transformer, Conformer, [Branchformer](https://proceedings.mlr.press/v162/peng22a.html), or [E-Branchformer](https://arxiv.org/abs/2210.00077)\n  - Decoder: RNN (LSTM/GRU), Transformer, or S4\n- Attention: [Flash Attention](https://github.com/Dao-AILab/flash-attention), Dot product, location-aware attention, variants of multi-head\n- Incorporate RNNLM/LSTMLM/TransformerLM/N-gram trained only with text data\n- Batch GPU decoding\n- Data augmentation\n- **Transducer** based end-to-end ASR\n  - Architecture:\n    - Custom encoder supporting RNNs, Conformer, Branchformer (w/ variants), 1D Conv / TDNN.\n    - Decoder w/ parameters shared across blocks supporting RNN, stateless w/ 1D Conv, [MEGA](https://arxiv.org/abs/2209.10655), and [RWKV](https://arxiv.org/abs/2305.13048).\n    - Pre-encoder: VGG2L or Conv2D available.\n  - Search algorithms:\n    - Greedy search constrained to one emission by timestep.\n    - Default beam search algorithm [[Graves, 2012]](https://arxiv.org/abs/1211.3711) without prefix search.\n    - Alignment-Length Synchronous decoding [[Saon et al., 2020]](https://ieeexplore.ieee.org/abstract/document/9053040).\n    - Time Synchronous Decoding [[Saon et al., 2020]](https://ieeexplore.ieee.org/abstract/document/9053040).\n    - N-step Constrained beam search modified from [[Kim et al., 2020]](https://arxiv.org/abs/2002.03577).\n    - modified Adaptive Expansion Search based on [[Kim et al., 2021]](https://ieeexplore.ieee.org/abstract/document/9250505) and NSC.\n  - Features:\n    - Unified interface for offline and streaming speech recognition.\n    - Multi-task learning with various auxiliary losses:\n      - Encoder: CTC, auxiliary Transducer and symmetric KL divergence.\n      - Decoder: cross-entropy w/ label smoothing.\n    - Transfer learning with an acoustic model and/or language model.\n    - Training with FastEmit regularization method [[Yu et al., 2021]](https://arxiv.org/abs/2010.11148).\n  > Please refer to the [tutorial page](https://espnet.github.io/espnet/tutorial.html#transducer) for complete documentation.\n- CTC segmentation\n- Non-autoregressive model based on Mask-CTC\n- ASR examples for supporting endangered language documentation (Please refer to egs/puebla_nahuatl and egs/yoloxochitl_mixtec for details)\n- Wav2Vec2.0 pre-trained model as Encoder, imported from [FairSeq](https://github.com/pytorch/fairseq/tree/master/fairseq).\n- Self-supervised learning representations as features, using upstream models in [S3PRL](https://github.com/s3prl/s3prl) in frontend.\n  - Set `frontend` to `s3prl`\n  - Select any upstream model by setting the `frontend_conf` to the corresponding name.\n- Transfer Learning :\n  - easy usage and transfers from models previously trained by your group or models from [ESPnet Hugging Face repository](https://huggingface.co/espnet).\n  - [Documentation](https://github.com/espnet/espnet/tree/master/egs2/mini_an4/asr1/transfer_learning.md) and [toy example runnable on colab](https://github.com/espnet/notebook/blob/master/ESPnet2/Demo/ASR/asr_transfer_learning_demo.ipynb).\n- Streaming Transformer/Conformer ASR with blockwise synchronous beam search.\n- Restricted Self-Attention based on [Longformer](https://arxiv.org/abs/2004.05150) as an encoder for long sequences\n- OpenAI [Whisper](https://openai.com/blog/whisper/) model, robust ASR based on large-scale, weakly-supervised multitask learning\n\nDemonstration\n- Real-time ASR demo with ESPnet2  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/espnet/notebook/blob/master/ESPnet2/Demo/ASR/asr_realtime_demo.ipynb)\n- [Gradio](https://github.com/gradio-app/gradio) Web Demo on [Hugging Face Spaces](https://huggingface.co/docs/hub/spaces). Check out the [Web Demo](https://huggingface.co/spaces/akhaliq/espnet2_asr)\n- Streaming Transformer ASR [Local Demo](https://github.com/espnet/notebook/blob/master/ESPnet2/Demo/ASR/streaming_asr_demo.ipynb) with ESPnet2.\n\n### TTS: Text-to-speech\n- Architecture\n    - Tacotron2\n    - Transformer-TTS\n    - FastSpeech\n    - FastSpeech2\n    - Conformer FastSpeech & FastSpeech2\n    - VITS\n    - JETS\n- Multi-speaker & multi-language extension\n    - Pre-trained speaker embedding (e.g., X-vector)\n    - Speaker ID embedding\n    - Language ID embedding\n    - Global style token (GST) embedding\n    - Mix of the above embeddings\n- End-to-end training\n    - End-to-end text-to-wav model (e.g., VITS, JETS, etc.)\n    - Joint training of text2mel and vocoder\n- Various language support\n    - En / Jp / Zn / De / Ru / And more...\n- Integration with neural vocoders\n    - Parallel WaveGAN\n    - MelGAN\n    - Multi-band MelGAN\n    - HiFiGAN\n    - StyleMelGAN\n    - Mix of the above models\n\nDemonstration\n- Real-time TTS demo with ESPnet2  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/espnet/notebook/blob/master/ESPnet2/Demo/TTS/tts_realtime_demo.ipynb)\n- Integrated to [Hugging Face Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). See demo: [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/akhaliq/ESPnet2-TTS)\n\nTo train the neural vocoder, please check the following repositories:\n- [kan-bayashi/ParallelWaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)\n- [r9y9/wavenet_vocoder](https://github.com/r9y9/wavenet_vocoder)\n\n### SE: Speech enhancement (and separation)\n\n- Single-speaker speech enhancement\n- Multi-speaker speech separation\n- Unified encoder-separator-decoder structure for time-domain and frequency-domain models\n  - Encoder/Decoder: STFT/iSTFT, Convolution/Transposed-Convolution\n  - Separators: BLSTM, Transformer, Conformer, [TasNet](https://arxiv.org/abs/1809.07454), [DPRNN](https://arxiv.org/abs/1910.06379), [SkiM](https://arxiv.org/abs/2201.10800), [SVoice](https://arxiv.org/abs/2011.02329), [DC-CRN](https://web.cse.ohio-state.edu/~wang.77/papers/TZW.taslp21.pdf), [DCCRN](https://arxiv.org/abs/2008.00264), [Deep Clustering](https://ieeexplore.ieee.org/document/7471631), [Deep Attractor Network](https://pubmed.ncbi.nlm.nih.gov/29430212/), [FaSNet](https://arxiv.org/abs/1909.13387), [iFaSNet](https://arxiv.org/abs/1910.14104), Neural Beamformers, etc.\n- Flexible ASR integration: working as an individual task or as the ASR frontend\n- Easy to import pre-trained models from [Asteroid](https://github.com/asteroid-team/asteroid)\n  - Both the pre-trained models from Asteroid and the specific configuration are supported.\n\nDemonstration\n- Interactive SE demo with ESPnet2 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1fjRJCh96SoYLZPRxsjF9VDv4Q2VoIckI?usp=sharing)\n- Streaming SE demo with ESPnet2 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/17vd1V78eJpp3PHBnbFE5aVY5uMxQFL6o?usp=sharing)\n\n### ST: Speech Translation & MT: Machine Translation\n- **State-of-the-art performance** in several ST benchmarks (comparable/superior to cascaded ASR and MT)\n- Transformer-based end-to-end ST (new!)\n- Transformer-based end-to-end MT (new!)\n\n### VC: Voice conversion\n- Transformer and Tacotron2-based parallel VC using Mel spectrogram\n- End-to-end VC based on cascaded ASR+TTS (Baseline system for Voice Conversion Challenge 2020!)\n\n### SLU: Spoken Language Understanding\n- Architecture\n    - Transformer-based Encoder\n    - Conformer-based Encoder\n    - [Branchformer](https://proceedings.mlr.press/v162/peng22a.html) based Encoder\n    - [E-Branchformer](https://arxiv.org/abs/2210.00077) based Encoder\n    - RNN based Decoder\n    - Transformer-based Decoder\n- Support Multitasking with ASR\n    - Predict both intent and ASR transcript\n- Support Multitasking with NLU\n    - Deliberation encoder based 2 pass model\n- Support using pre-trained ASR models\n    - Hubert\n    - Wav2vec2\n    - VQ-APC\n    - TERA and more ...\n- Support using pre-trained NLP models\n    - BERT\n    - MPNet And more...\n- Various language support\n    - En / Jp / Zn / Nl / And more...\n- Supports using context from previous utterances\n- Supports using other tasks like SE in a pipeline manner\n- Supports Two Pass SLU that combines audio and ASR transcript\nDemonstration\n- Performing noisy spoken language understanding using a speech enhancement model followed by a spoken language understanding model.  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/14nCrJ05vJcQX0cJuXjbMVFWUHJ3Wfb6N?usp=sharing)\n- Performing two-pass spoken language understanding where the second pass model attends to both acoustic and semantic information.  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1p2cbGIPpIIcynuDl4ZVHDpmNPl8Nh_ci?usp=sharing)\n- Integrated to [Hugging Face Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). See SLU demo on multiple languages: [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Siddhant/ESPnet2-SLU)\n\n\n### SUM: Speech Summarization\n- End to End Speech Summarization Recipe for Instructional Videos using Restricted Self-Attention [[Sharma et al., 2022]](https://arxiv.org/abs/2110.06263)\n\n### SVS: Singing Voice Synthesis\n- Framework merge from [Muskits](https://github.com/SJTMusicTeam/Muskits)\n- Architecture\n  - RNN-based non-autoregressive model\n  - Xiaoice\n  - Tacotron-singing\n  - DiffSinger (in progress)\n  - VISinger\n  - VISinger 2 (its variations with different vocoders-architecture)\n- Support multi-speaker & multilingual singing synthesis\n  - Speaker ID embedding\n  - Language ID embedding\n- Various language support\n  - Jp / En / Kr / Zh\n- Tight integration with neural vocoders (the same as TTS)\n\n### SSL: Self-supervised Learning\n- Support HuBERT Pre-training:\n  * Example recipe: [egs2/LibriSpeech/ssl1](egs2/LibriSpeech/ssl1)\n\n### UASR: Unsupervised ASR (EURO: ESPnet Unsupervised Recognition - Open-source)\n- Architecture\n  - wav2vec-U (with different self-supervised models)\n  - wav2vec-U 2.0 (in progress)\n- Support PrefixBeamSearch and K2-based WFST decoding\n\n### S2T: Speech-to-text with Whisper-style multilingual multitask models\n- Reproduces Whisper-style training from scratch using public data: [OWSM](https://arxiv.org/abs/2309.13876)\n- Supports multiple tasks in a single model\n  - Multilingual speech recognition\n  - Any-to-any speech translation\n  - Language identification\n  - Utterance-level timestamp prediction (segmentation)\n\n### DNN Framework\n- Flexible network architecture thanks to Chainer and PyTorch\n- Flexible front-end processing thanks to [kaldiio](https://github.com/nttcslab-sp/kaldiio) and HDF5 support\n- Tensorboard-based monitoring\n- [DeepSpeed](https://github.com/microsoft/DeepSpeed)-based large-scale training\n\n### ESPnet2\nSee [ESPnet2](https://espnet.github.io/espnet/espnet2_tutorial.html).\n\n- Independent from Kaldi/Chainer, unlike ESPnet1\n- On-the-fly feature extraction and text processing when training\n- Supporting DistributedDataParallel and DaraParallel both\n- Supporting multiple nodes training and integrated with [Slurm](https://slurm.schedmd.com/) or MPI\n- Supporting Sharded Training provided by [fairscale](https://github.com/facebookresearch/fairscale)\n- A template recipe that can be applied to all corpora\n- Possible to train any size of corpus without CPU memory error\n- [ESPnet Model Zoo](https://github.com/espnet/espnet_model_zoo)\n- Integrated with [wandb](https://espnet.github.io/espnet/espnet2_training_option.html#weights-biases-integration)\n\n## Installation\n- If you intend to do full experiments, including DNN training, then see [Installation](https://espnet.github.io/espnet/installation.html).\n- If you just need the Python module only:\n    ```sh\n    # We recommend you install PyTorch before installing espnet following https://pytorch.org/get-started/locally/\n    pip install espnet\n    # To install the latest\n    # pip install git+https://github.com/espnet/espnet\n    # To install additional packages\n    # pip install \"espnet[all]\"\n    ```\n\n    If you use ESPnet1, please install chainer and cupy.\n\n    ```sh\n    pip install chainer==6.0.0 cupy==6.0.0    # [Option]\n    ```\n\n    You might need to install some packages depending on each task. We prepared various installation scripts at [tools/installers](tools/installers).\n\n- (ESPnet2) Once installed, run `wandb login` and set `--use_wandb true` to enable tracking runs using W&B.\n\n## Docker Container\n\ngo to [docker/](docker/) and follow [instructions](https://espnet.github.io/espnet/docker.html).\n\n## Contribution\nThank you for taking the time for ESPnet! Any contributions to ESPnet are welcome, and feel free to ask any questions or requests to [issues](https://github.com/espnet/espnet/issues).\nIf it's your first ESPnet contribution,  please follow the [contribution guide](CONTRIBUTING.md).\n\n### ASR results\n\n<details><summary>expand<\/summary><div>\n\n\nWe list the character error rate (CER) and word error rate (WER) of major ASR tasks.\n\n| Task                                                              |     CER (%)     |     WER (%)     |                                                                              Pre-trained model                                                                               |\n| ----------------------------------------------------------------- | :-------------: | :-------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| Aishell dev/test                                                  |     4.6/5.1     |       N/A       |                [link](https://github.com/espnet/espnet/blob/master/egs/aishell/asr1/RESULTS.md#conformer-kernel-size--15--specaugment--lm-weight--00-result)                |\n| **ESPnet2** Aishell dev/test                                      |     4.1/4.4     |       N/A       |                [link](https://github.com/espnet/espnet/tree/master/egs2/aishell/asr1#branchformer-initial)                                                                  |\n| Common Voice dev/test                                             |     1.7/1.8     |     2.2/2.3     |    [link](https://github.com/espnet/espnet/blob/master/egs/commonvoice/asr1/RESULTS.md#first-results-default-pytorch-transformer-setting-with-bpe-100-epochs-single-gpu)    |\n| CSJ eval1/eval2/eval3                                             |   5.7/3.8/4.2   |       N/A       |                 [link](https://github.com/espnet/espnet/blob/master/egs/csj/asr1/RESULTS.md#pytorch-backend-transformer-without-any-hyperparameter-tuning)                  |\n| **ESPnet2** CSJ eval1/eval2/eval3                                 |   4.5/3.3/3.6   |       N/A       |                                        [link](https://github.com/espnet/espnet/tree/master/egs2/csj/asr1#initial-conformer-results)                                         |\n| **ESPnet2** GigaSpeech dev/test                                   |       N/A       |    10.6/10.5    |                                          [link](https://github.com/espnet/espnet/tree/master/egs2/gigaspeech/asr1#e-branchformer)                                           |\n| HKUST dev                                                         |      23.5       |       N/A       |                                  [link](https://github.com/espnet/espnet/blob/master/egs/hkust/asr1/RESULTS.md#transformer-only-20-epochs)                                  |\n| **ESPnet2** HKUST dev                                             |      21.2       |       N/A       |                                    [link](https://github.com/espnet/espnet/tree/master/egs2/hkust/asr1#transformer-asr--transformer-lm)                                     |\n| Librispeech dev_clean/dev_other/test_clean/test_other             |       N/A       | 1.9/4.9/2.1/4.9 | [link](https://github.com/espnet/espnet/blob/master/egs/librispeech/asr1/RESULTS.md#pytorch-large-conformer-with-specaug--speed-perturbation-8-gpus--transformer-lm-4-gpus) |\n| **ESPnet2** Librispeech dev_clean/dev_other/test_clean/test_other | 0.6/1.5/0.6/1.4 | 1.7/3.4/1.8/3.6 |    [link](https://github.com/espnet/espnet/tree/master/egs2/librispeech/asr1#self-supervised-learning-features-hubert_large_ll60k-conformer-utt_mvn-with-transformer-lm)    |\n| Switchboard (eval2000) callhm/swbd                                |       N/A       |    14.0/6.8     |          [link](https://github.com/espnet/espnet/blob/master/egs/swbd/asr1/RESULTS.md#conformer-with-bpe-2000-specaug-speed-perturbation-transformer-lm-decoding)           |\n| **ESPnet2** Switchboard (eval2000) callhm/swbd                    |       N/A       |    13.4/7.3     |                                             [link](https://github.com/espnet/espnet/tree/master/egs2/swbd/asr1#e-branchformer)                                              |\n| TEDLIUM2 dev/test                                                 |       N/A       |     8.6/7.2     |                 [link](https://github.com/espnet/espnet/blob/master/egs/tedlium2/asr1/RESULTS.md#conformer-large-model--specaug--speed-perturbation--rnnlm)                 |\n| **ESPnet2** TEDLIUM2 dev/test                                     |       N/A       |     7.3/7.1     |                 [link](https://github.com/espnet/espnet/blob/master/egs2/tedlium2/asr1/README.md#e-branchformer-12-encoder-layers)                                          |\n| TEDLIUM3 dev/test                                                 |       N/A       |     9.6/7.6     |                                              [link](https://github.com/espnet/espnet/blob/master/egs/tedlium3/asr1/RESULTS.md)                                              |\n| WSJ dev93/eval92                                                  |     3.2/2.1     |     7.0/4.7     |                                                                                     N/A                                                                                     |\n| **ESPnet2** WSJ dev93/eval92                                      |     1.1/0.8     |     2.8/1.8     |       [link](https://github.com/espnet/espnet/tree/master/egs2/wsj/asr1#self-supervised-learning-features-wav2vec2_large_ll60k-conformer-utt_mvn-with-transformer-lm)       |\n\nNote that the performance of the CSJ, HKUST, and Librispeech tasks was significantly improved by using the wide network (#units = 1024) and large subword units if necessary reported by [RWTH](https://arxiv.org/pdf/1805.03294.pdf).\n\nIf you want to check the results of the other recipes, please check `egs/<name_of_recipe>/asr1/RESULTS.md`.\n\n<\/div><\/details>\n\n\n### ASR demo\n\n<details><summary>expand<\/summary><div>\n\nYou can recognize speech in a WAV file using pre-trained models.\nGo to a recipe directory and run `utils/recog_wav.sh` as follows:\n```sh\n# go to the recipe directory and source path of espnet tools\ncd egs/tedlium2/asr1 && . ./path.sh\n# let's recognize speech!\nrecog_wav.sh --models tedlium2.transformer.v1 example.wav\n```\nwhere `example.wav` is a WAV file to be recognized.\nThe sampling rate must be consistent with that of data used in training.\n\nAvailable pre-trained models in the demo script are listed below.\n\n| Model                                                                                            | Notes                                                      |\n| :----------------------------------------------------------------------------------------------- | :--------------------------------------------------------- |\n| [tedlium2.rnn.v1](https://drive.google.com/open?id=1UqIY6WJMZ4sxNxSugUqp3mrGb3j6h7xe)            | Streaming decoding based on CTC-based VAD                  |\n| [tedlium2.rnn.v2](https://drive.google.com/open?id=1cac5Uc09lJrCYfWkLQsF8eapQcxZnYdf)            | Streaming decoding based on CTC-based VAD (batch decoding) |\n| [tedlium2.transformer.v1](https://drive.google.com/open?id=1cVeSOYY1twOfL9Gns7Z3ZDnkrJqNwPow)    | Joint-CTC attention Transformer trained on Tedlium 2       |\n| [tedlium3.transformer.v1](https://drive.google.com/open?id=1zcPglHAKILwVgfACoMWWERiyIquzSYuU)    | Joint-CTC attention Transformer trained on Tedlium 3       |\n| [librispeech.transformer.v1](https://drive.google.com/open?id=1BtQvAnsFvVi-dp_qsaFP7n4A_5cwnlR6) | Joint-CTC attention Transformer trained on Librispeech     |\n| [commonvoice.transformer.v1](https://drive.google.com/open?id=1tWccl6aYU67kbtkm8jv5H6xayqg1rzjh) | Joint-CTC attention Transformer trained on CommonVoice     |\n| [csj.transformer.v1](https://drive.google.com/open?id=120nUQcSsKeY5dpyMWw_kI33ooMRGT2uF)         | Joint-CTC attention Transformer trained on CSJ             |\n| [csj.rnn.v1](https://drive.google.com/open?id=1ALvD4nHan9VDJlYJwNurVr7H7OV0j2X9)                 | Joint-CTC attention VGGBLSTM trained on CSJ                |\n\n<\/div><\/details>\n\n### SE results\n<details><summary>expand<\/summary><div>\n\nWe list results from three different models on WSJ0-2mix, which is one the most widely used benchmark dataset for speech separation.\n\n| Model                                             | STOI | SAR   | SDR   | SIR   |\n| ------------------------------------------------- | ---- | ----- | ----- | ----- |\n| [TF Masking](https://zenodo.org/record/4498554)   | 0.89 | 11.40 | 10.24 | 18.04 |\n| [Conv-Tasnet](https://zenodo.org/record/4498562)  | 0.95 | 16.62 | 15.94 | 25.90 |\n| [DPRNN-Tasnet](https://zenodo.org/record/4688000) | 0.96 | 18.82 | 18.29 | 28.92 |\n\n<\/div><\/details>\n\n### SE demos\n<details><summary>expand<\/summary><div>\nYou can try the interactive demo with Google Colab. Please click the following button to get access to the demos.\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1fjRJCh96SoYLZPRxsjF9VDv4Q2VoIckI?usp=sharing)\n\n\nIt is based on ESPnet2. Pre-trained models are available for both speech enhancement and speech separation tasks.\n\nSpeech separation streaming demos:\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/17vd1V78eJpp3PHBnbFE5aVY5uMxQFL6o?usp=sharing)\n\n\n\n<\/div><\/details>\n\n### ST results\n\n<details><summary>expand<\/summary><div>\n\nWe list 4-gram BLEU of major ST tasks.\n\n#### end-to-end system\n| Task                                              | BLEU  |                                                                                         Pre-trained model                                                                                          |\n| ------------------------------------------------- | :---: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| Fisher-CallHome Spanish fisher_test (Es->En)      | 51.03 | [link](https://github.com/espnet/espnet/blob/master/egs/fisher_callhome_spanish/st1/RESULTS.md#train_spen_lcrm_pytorch_train_pytorch_transformer_bpe_short_long_bpe1000_specaug_asrtrans_mttrans) |\n| Fisher-CallHome Spanish callhome_evltest (Es->En) | 20.44 | [link](https://github.com/espnet/espnet/blob/master/egs/fisher_callhome_spanish/st1/RESULTS.md#train_spen_lcrm_pytorch_train_pytorch_transformer_bpe_short_long_bpe1000_specaug_asrtrans_mttrans) |\n| Libri-trans test (En->Fr)                         | 16.70 |       [link](https://github.com/espnet/espnet/blob/master/egs/libri_trans/st1/RESULTS.md#train_spfr_lc_pytorch_train_pytorch_transformer_bpe_short_long_bpe1000_specaug_asrtrans_mttrans-1)       |\n| How2 dev5 (En->Pt)                                | 45.68 |              [link](https://github.com/espnet/espnet/blob/master/egs/how2/st1/RESULTS.md#trainpt_tc_pytorch_train_pytorch_transformer_short_long_bpe8000_specaug_asrtrans_mttrans-1)              |\n| Must-C tst-COMMON (En->De)                        | 22.91 |          [link](https://github.com/espnet/espnet/blob/master/egs/must_c/st1/RESULTS.md#train_spen-dede_tc_pytorch_train_pytorch_transformer_short_long_bpe8000_specaug_asrtrans_mttrans)          |\n| Mboshi-French dev (Fr->Mboshi)                    | 6.18  |                                                                                                N/A                                                                                                |\n\n#### cascaded system\n| Task                                              | BLEU  | Pre-trained model |\n| ------------------------------------------------- | :---: | :--------------: |\n| Fisher-CallHome Spanish fisher_test (Es->En)      | 42.16 |       N/A        |\n| Fisher-CallHome Spanish callhome_evltest (Es->En) | 19.82 |       N/A        |\n| Libri-trans test (En->Fr)                         | 16.96 |       N/A        |\n| How2 dev5 (En->Pt)                                | 44.90 |       N/A        |\n| Must-C tst-COMMON (En->De)                        | 23.65 |       N/A        |\n\nIf you want to check the results of the other recipes, please check `egs/<name_of_recipe>/st1/RESULTS.md`.\n\n<\/div><\/details>\n\n\n### ST demo\n\n<details><summary>expand<\/summary><div>\n\n(**New!**) We made a new real-time E2E-ST + TTS demonstration in Google Colab.\nPlease access the notebook from the following button and enjoy the real-time speech-to-speech translation!\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/espnet/notebook/blob/master/st_demo.ipynb)\n\n---\n\nYou can translate speech in a WAV file using pre-trained models.\nGo to a recipe directory and run `utils/translate_wav.sh` as follows:\n```sh\n# Go to recipe directory and source path of espnet tools\ncd egs/fisher_callhome_spanish/st1 && . ./path.sh\n# download example wav file\nwget -O - https://github.com/espnet/espnet/files/4100928/test.wav.tar.gz | tar zxvf -\n# let's translate speech!\ntranslate_wav.sh --models fisher_callhome_spanish.transformer.v1.es-en test.wav\n```\nwhere `test.wav` is a WAV file to be translated.\nThe sampling rate must be consistent with that of data used in training.\n\nAvailable pre-trained models in the demo script are listed as below.\n\n| Model                                                                                                        | Notes                                                    |\n| :----------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |\n| [fisher_callhome_spanish.transformer.v1](https://drive.google.com/open?id=1hawp5ZLw4_SIHIT3edglxbKIIkPVe8n3) | Transformer-ST trained on Fisher-CallHome Spanish Es->En |\n\n<\/div><\/details>\n\n\n### MT results\n\n<details><summary>expand<\/summary><div>\n\n| Task                                              | BLEU  |                                                                        Pre-trained model                                                                         |\n| ------------------------------------------------- | :---: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| Fisher-CallHome Spanish fisher_test (Es->En)      | 61.45 | [link](https://github.com/espnet/espnet/blob/master/egs/fisher_callhome_spanish/mt1/RESULTS.md#trainen_lcrm_lcrm_pytorch_train_pytorch_transformer_bpe_bpe1000) |\n| Fisher-CallHome Spanish callhome_evltest (Es->En) | 29.86 | [link](https://github.com/espnet/espnet/blob/master/egs/fisher_callhome_spanish/mt1/RESULTS.md#trainen_lcrm_lcrm_pytorch_train_pytorch_transformer_bpe_bpe1000) |\n| Libri-trans test (En->Fr)                         | 18.09 |          [link](https://github.com/espnet/espnet/blob/master/egs/libri_trans/mt1/RESULTS.md#trainfr_lcrm_tc_pytorch_train_pytorch_transformer_bpe1000)          |\n| How2 dev5 (En->Pt)                                | 58.61 |              [link](https://github.com/espnet/espnet/blob/master/egs/how2/mt1/RESULTS.md#trainpt_tc_tc_pytorch_train_pytorch_transformer_bpe8000)               |\n| Must-C tst-COMMON (En->De)                        | 27.63 |                               [link](https://github.com/espnet/espnet/blob/master/egs/must_c/mt1/RESULTS.md#summary-4-gram-bleu)                                |\n| IWSLT'14 test2014 (En->De)                        | 24.70 |                                     [link](https://github.com/espnet/espnet/blob/master/egs/iwslt16/mt1/RESULTS.md#result)                                      |\n| IWSLT'14 test2014 (De->En)                        | 29.22 |                                     [link](https://github.com/espnet/espnet/blob/master/egs/iwslt16/mt1/RESULTS.md#result)                                      |\n| IWSLT'14 test2014 (De->En)                        | 32.2  | [link](https://github.com/espnet/espnet/blob/master/egs2/iwslt14/mt1/README.md)  |\n| IWSLT'16 test2014 (En->De)                        | 24.05 |                                     [link](https://github.com/espnet/espnet/blob/master/egs/iwslt16/mt1/RESULTS.md#result)                                      |\n| IWSLT'16 test2014 (De->En)                        | 29.13 |                                     [link](https://github.com/espnet/espnet/blob/master/egs/iwslt16/mt1/RESULTS.md#result)                                      |\n\n<\/div><\/details>\n\n### TTS results\n\n<details><summary>ESPnet2<\/summary><div>\n\nYou can listen to the generated samples in the following URL.\n- [ESPnet2 TTS generated samples](https://drive.google.com/drive/folders/1H3fnlBbWMEkQUfrHqosKN_ZX_WjO29ma?usp=sharing)\n\n> Note that in the generation, we use Griffin-Lim (`wav/`) and [Parallel WaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN) (`wav_pwg/`).\n\nYou can download pre-trained models via `espnet_model_zoo`.\n- [ESPnet model zoo](https://github.com/espnet/espnet_model_zoo)\n- [Pre-trained model list](https://github.com/espnet/espnet_model_zoo/blob/master/espnet_model_zoo/table.csv)\n\nYou can download pre-trained vocoders via `kan-bayashi/ParallelWaveGAN`.\n- [kan-bayashi/ParallelWaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)\n- [Pre-trained vocoder list](https://github.com/kan-bayashi/ParallelWaveGAN#results)\n\n<\/div><\/details>\n\n<details><summary>ESPnet1<\/summary><div>\n\n> NOTE: We are moving on ESPnet2-based development for TTS. Please check the latest results in the above ESPnet2 results.\n\nYou can listen to our samples in demo HP [espnet-tts-sample](https://espnet.github.io/espnet-tts-sample/).\nHere we list some notable ones:\n\n- [Single English speaker Tacotron2](https://drive.google.com/open?id=18JgsOCWiP_JkhONasTplnHS7yaF_konr)\n- [Single Japanese speaker Tacotron2](https://drive.google.com/open?id=1fEgS4-K4dtgVxwI4Pr7uOA1h4PE-zN7f)\n- [Single other language speaker Tacotron2](https://drive.google.com/open?id=1q_66kyxVZGU99g8Xb5a0Q8yZ1YVm2tN0)\n- [Multi English speaker Tacotron2](https://drive.google.com/open?id=18S_B8Ogogij34rIfJOeNF8D--uG7amz2)\n- [Single English speaker Transformer](https://drive.google.com/open?id=14EboYVsMVcAq__dFP1p6lyoZtdobIL1X)\n- [Single English speaker FastSpeech](https://drive.google.com/open?id=1PSxs1VauIndwi8d5hJmZlppGRVu2zuy5)\n- [Multi English speaker Transformer](https://drive.google.com/open?id=1_vrdqjM43DdN1Qz7HJkvMQ6lCMmWLeGp)\n- [Single Italian speaker FastSpeech](https://drive.google.com/open?id=13I5V2w7deYFX4DlVk1-0JfaXmUR2rNOv)\n- [Single Mandarin speaker Transformer](https://drive.google.com/open?id=1mEnZfBKqA4eT6Bn0eRZuP6lNzL-IL3VD)\n- [Single Mandarin speaker FastSpeech](https://drive.google.com/open?id=1Ol_048Tuy6BgvYm1RpjhOX4HfhUeBqdK)\n- [Multi Japanese speaker Transformer](https://drive.google.com/open?id=1fFMQDF6NV5Ysz48QLFYE8fEvbAxCsMBw)\n- [Single English speaker models with Parallel WaveGAN](https://drive.google.com/open?id=1HvB0_LDf1PVinJdehiuCt5gWmXGguqtx)\n- [Single English speaker knowledge distillation-based FastSpeech](https://drive.google.com/open?id=1wG-Y0itVYalxuLAHdkAHO7w1CWFfRPF4)\n\nYou can download all of the pre-trained models and generated samples:\n- [All of the pre-trained E2E-TTS models](https://drive.google.com/open?id=1k9RRyc06Zl0mM2A7mi-hxNiNMFb_YzTF)\n- [All of the generated samples](https://drive.google.com/open?id=1bQGuqH92xuxOX__reWLP4-cif0cbpMLX)\n\nNote that in the generated samples, we use the following vocoders: Griffin-Lim (**GL**), WaveNet vocoder (**WaveNet**), Parallel WaveGAN (**ParallelWaveGAN**), and MelGAN (**MelGAN**).\nThe neural vocoders are based on the following repositories.\n- [kan-bayashi/ParallelWaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN): Parallel WaveGAN / MelGAN / Multi-band MelGAN\n- [r9y9/wavenet_vocoder](https://github.com/r9y9/wavenet_vocoder): 16 bit mixture of Logistics WaveNet vocoder\n- [kan-bayashi/PytorchWaveNetVocoder](https://github.com/kan-bayashi/PytorchWaveNetVocoder): 8 bit Softmax WaveNet Vocoder with the noise shaping\n\nIf you want to build your own neural vocoder, please check the above repositories.\n[kan-bayashi/ParallelWaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN) provides [the manual](https://github.com/kan-bayashi/ParallelWaveGAN#decoding-with-espnet-tts-models-features) about how to decode ESPnet-TTS model's features with neural vocoders. Please check it.\n\nHere we list all of the pre-trained neural vocoders. Please download and enjoy the generation of high-quality speech!\n\n| Model link                                                                                           | Lang  | Fs [Hz] | Mel range [Hz] | FFT / Shift / Win [pt] | Model type                                                              |\n| :--------------------------------------------------------------------------------------------------- | :---: | :-----: | :------------: | :--------------------: | :---------------------------------------------------------------------- |\n| [ljspeech.wavenet.softmax.ns.v1](https://drive.google.com/open?id=1eA1VcRS9jzFa-DovyTgJLQ_jmwOLIi8L) |  EN   | 22.05k  |      None      |   1024 / 256 / None    | [Softmax WaveNet](https://github.com/kan-bayashi/PytorchWaveNetVocoder) |\n| [ljspeech.wavenet.mol.v1](https://drive.google.com/open?id=1sY7gEUg39QaO1szuN62-Llst9TrFno2t)        |  EN   | 22.05k  |      None      |   1024 / 256 / None    | [MoL WaveNet](https://github.com/r9y9/wavenet_vocoder)                  |\n| [ljspeech.parallel_wavegan.v1](https://drive.google.com/open?id=1tv9GKyRT4CDsvUWKwH3s_OfXkiTi0gw7)   |  EN   | 22.05k  |      None      |   1024 / 256 / None    | [Parallel WaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)      |\n| [ljspeech.wavenet.mol.v2](https://drive.google.com/open?id=1es2HuKUeKVtEdq6YDtAsLNpqCy4fhIXr)        |  EN   | 22.05k  |    80-7600     |   1024 / 256 / None    | [MoL WaveNet](https://github.com/r9y9/wavenet_vocoder)                  |\n| [ljspeech.parallel_wavegan.v2](https://drive.google.com/open?id=1Grn7X9wD35UcDJ5F7chwdTqTa4U7DeVB)   |  EN   | 22.05k  |    80-7600     |   1024 / 256 / None    | [Parallel WaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)      |\n| [ljspeech.melgan.v1](https://drive.google.com/open?id=1ipPWYl8FBNRlBFaKj1-i23eQpW_W_YcR)             |  EN   | 22.05k  |    80-7600     |   1024 / 256 / None    | [MelGAN](https://github.com/kan-bayashi/ParallelWaveGAN)                |\n| [ljspeech.melgan.v3](https://drive.google.com/open?id=1_a8faVA5OGCzIcJNw4blQYjfG4oA9VEt)             |  EN   | 22.05k  |    80-7600     |   1024 / 256 / None    | [MelGAN](https://github.com/kan-bayashi/ParallelWaveGAN)                |\n| [libritts.wavenet.mol.v1](https://drive.google.com/open?id=1jHUUmQFjWiQGyDd7ZeiCThSjjpbF_B4h)        |  EN   |   24k   |      None      |   1024 / 256 / None    | [MoL WaveNet](https://github.com/r9y9/wavenet_vocoder)                  |\n| [jsut.wavenet.mol.v1](https://drive.google.com/open?id=187xvyNbmJVZ0EZ1XHCdyjZHTXK9EcfkK)            |  JP   |   24k   |    80-7600     |   2048 / 300 / 1200    | [MoL WaveNet](https://github.com/r9y9/wavenet_vocoder)                  |\n| [jsut.parallel_wavegan.v1](https://drive.google.com/open?id=1OwrUQzAmvjj1x9cDhnZPp6dqtsEqGEJM)       |  JP   |   24k   |    80-7600     |   2048 / 300 / 1200    | [Parallel WaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)      |\n| [csmsc.wavenet.mol.v1](https://drive.google.com/open?id=1PsjFRV5eUP0HHwBaRYya9smKy5ghXKzj)           |  ZH   |   24k   |    80-7600     |   2048 / 300 / 1200    | [MoL WaveNet](https://github.com/r9y9/wavenet_vocoder)                  |\n| [csmsc.parallel_wavegan.v1](https://drive.google.com/open?id=10M6H88jEUGbRWBmU1Ff2VaTmOAeL8CEy)      |  ZH   |   24k   |    80-7600     |   2048 / 300 / 1200    | [Parallel WaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)      |\n\nIf you want to use the above pre-trained vocoders, please exactly match the feature setting with them.\n\n<\/div><\/details>\n\n### TTS demo\n\n<details><summary>ESPnet2<\/summary><div>\n\nYou can try the real-time demo in Google Colab.\nPlease access the notebook from the following button and enjoy the real-time synthesis!\n\n- Real-time TTS demo with ESPnet2  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/espnet/notebook/blob/master/espnet2_tts_realtime_demo.ipynb)\n\nEnglish, Japanese, and Mandarin models are available in the demo.\n\n<\/div><\/details>\n\n<details><summary>ESPnet1<\/summary><div>\n\n> NOTE: We are moving on ESPnet2-based development for TTS. Please check the latest demo in the above ESPnet2 demo.\n\nYou can try the real-time demo in Google Colab.\nPlease access the notebook from the following button and enjoy the real-time synthesis.\n\n- Real-time TTS demo with ESPnet1  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/espnet/notebook/blob/master/tts_realtime_demo.ipynb)\n\nWe also provide a shell script to perform synthesis.\nGo to a recipe directory and run `utils/synth_wav.sh` as follows:\n\n```sh\n# Go to recipe directory and source path of espnet tools\ncd egs/ljspeech/tts1 && . ./path.sh\n# We use an upper-case char sequence for the default model.\necho \"THIS IS A DEMONSTRATION OF TEXT TO SPEECH.\" > example.txt\n# let's synthesize speech!\nsynth_wav.sh example.txt\n\n# Also, you can use multiple sentences\necho \"THIS IS A DEMONSTRATION OF TEXT TO SPEECH.\" > example_multi.txt\necho \"TEXT TO SPEECH IS A TECHNIQUE TO CONVERT TEXT INTO SPEECH.\" >> example_multi.txt\nsynth_wav.sh example_multi.txt\n```\n\nYou can change the pre-trained model as follows:\n\n```sh\nsynth_wav.sh --models ljspeech.fastspeech.v1 example.txt\n```\n\nWaveform synthesis is performed with the Griffin-Lim algorithm and neural vocoders (WaveNet and ParallelWaveGAN).\nYou can change the pre-trained vocoder model as follows:\n\n```sh\nsynth_wav.sh --vocoder_models ljspeech.wavenet.mol.v1 example.txt\n```\n\nWaveNet vocoder provides very high-quality speech, but it takes time to generate.\n\nSee more details or available models via `--help`.\n\n```sh\nsynth_wav.sh --help\n```\n\n<\/div><\/details>\n\n### VC results\n\n<details><summary>expand<\/summary><div>\n\n- Transformer and Tacotron2-based VC\n\nYou can listen to some samples on the [demo webpage](https://unilight.github.io/Publication-Demos/publications/transformer-vc/).\n\n- Cascade ASR+TTS as one of the baseline systems of VCC2020\n\nThe [Voice Conversion Challenge 2020](http://www.vc-challenge.org/) (VCC2020) adopts ESPnet to build an end-to-end based baseline system.\nIn VCC2020, the objective is intra/cross-lingual nonparallel VC.\nYou can download converted samples of the cascade ASR+TTS baseline system [here](https://drive.google.com/drive/folders/1oeZo83GrOgtqxGwF7KagzIrfjr8X59Ue?usp=sharing).\n\n<\/div><\/details>\n\n### SLU results\n\n<details><summary>expand<\/summary><div>\n\n\nWe list the performance on various SLU tasks and datasets using the metric reported in the original dataset paper\n\n| Task                                                              | Dataset                                                              |    Metric     |     Result     |                                                                              Pre-trained Model                                         |\n| ----------------------------------------------------------------- | :-------------: | :-------------: | :-------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| Intent Classification                                                 |     SLURP     |       Acc       |       86.3       |                [link](https://github.com/espnet/espnet/tree/master/egs2/slurp/asr1/README.md)                |\n| Intent Classification                                                   |     FSC     |       Acc       |       99.6       |                [link](https://github.com/espnet/espnet/tree/master/egs2/fsc/asr1/README.md)                |\n| Intent Classification                                                  |     FSC Unseen Speaker Set     |       Acc       |       98.6       |                [link](https://github.com/espnet/espnet/tree/master/egs2/fsc_unseen/asr1/README.md)                |\n| Intent Classification                                                   |     FSC Unseen Utterance Set     |       Acc       |       86.4       |                [link](https://github.com/espnet/espnet/tree/master/egs2/fsc_unseen/asr1/README.md)                |\n| Intent Classification                                                   |     FSC Challenge Speaker Set     |       Acc       |       97.5       |                [link](https://github.com/espnet/espnet/tree/master/egs2/fsc_challenge/asr1/README.md)                |\n| Intent Classification                                                   |     FSC Challenge Utterance Set     |       Acc       |       78.5       |                [link](https://github.com/espnet/espnet/tree/master/egs2/fsc_challenge/asr1/README.md)                |\n| Intent Classification                                                   |     SNIPS     |       F1       |       91.7       |                [link](https://github.com/espnet/espnet/tree/master/egs2/snips/asr1/README.md)                |\n| Intent Classification                                                   |     Grabo (Nl)   |       Acc       |       97.2       |                [link](https://github.com/espnet/espnet/tree/master/egs2/grabo/asr1/README.md)                |\n| Intent Classification                                                   |     CAT SLU MAP (Zn)     |       Acc       |       78.9       |                [link](https://github.com/espnet/espnet/tree/master/egs2/catslu/asr1/README.md)                |\n| Intent Classification                                                  |     Google Speech Commands    |       Acc       |       98.4       |                [link](https://github.com/espnet/espnet/tree/master/egs2/speechcommands/asr1/README.md)                |\n| Slot Filling                                                  |     SLURP     |       SLU-F1       |       71.9       |                [link](https://github.com/espnet/espnet/tree/master/egs2/slurp_entity/asr1/README.md)                |\n| Dialogue  Act Classification                                                 |     Switchboard     |       Acc       |       67.5       |                [link](https://github.com/espnet/espnet/tree/master/egs2/swbd_da/asr1/README.md)                |\n| Dialogue  Act Classification                                                 |     Jdcinal (Jp)    |       Acc       |       67.4       |                [link](https://github.com/espnet/espnet/tree/master/egs2/jdcinal/asr1/README.md)                |\n| Emotion Recognition                                                  |     IEMOCAP     |       Acc       |       69.4       |                [link](https://github.com/espnet/espnet/tree/master/egs2/iemocap/asr1/README.md)                |\n| Emotion Recognition                                                  |     swbd_sentiment     |       Macro F1       |       61.4       |                [link](https://github.com/espnet/espnet/tree/master/egs2/swbd_sentiment/asr1/README.md)                |\n| Emotion Recognition                                                  |     slue_voxceleb     |       Macro F1       |       44.0       |                [link](https://github.com/espnet/espnet/tree/master/egs2/slue-voxceleb/asr1/README.md)                |\n\n\nIf you want to check the results of the other recipes, please check `egs2/<name_of_recipe>/asr1/RESULTS.md`.\n\n\n\n<\/div><\/details>\n\n### CTC Segmentation demo\n\n<details><summary>ESPnet1<\/summary><div>\n\n[CTC segmentation](https://arxiv.org/abs/2007.09127) determines utterance segments within audio files.\nAligned utterance segments constitute the labels of speech datasets.\n\nAs a demo, we align the start and end of utterances within the audio file `ctc_align_test.wav`, using the example script `utils/asr_align_wav.sh`.\nFor preparation, set up a data directory:\n\n```sh\ncd egs/tedlium2/align1/\n# data directory\nalign_dir=data/demo\nmkdir -p ${align_dir}\n# wav file\nbase=ctc_align_test\nwav=../../../test_utils/${base}.wav\n# recipe files\necho \"batchsize: 0\" > ${align_dir}/align.yaml\n\ncat << EOF > ${align_dir}/utt_text\n${base} THE SALE OF THE HOTELS\n${base} IS PART OF HOLIDAY'S STRATEGY\n${base} TO SELL OFF ASSETS\n${base} AND CONCENTRATE\n${base} ON PROPERTY MANAGEMENT\nEOF\n```\n\nHere, `utt_text` is the file containing the list of utterances.\nChoose a pre-trained ASR model that includes a CTC layer to find utterance segments:\n\n```sh\n# pre-trained ASR model\nmodel=wsj.transformer_small.v1\nmkdir ./conf && cp ../../wsj/asr1/conf/no_preprocess.yaml ./conf\n\n../../../utils/asr_align_wav.sh \\\n    --models ${model} \\\n    --align_dir ${align_dir} \\\n    --align_config ${align_dir}/align.yaml \\\n    ${wav} ${align_dir}/utt_text\n```\n\nSegments are written to `aligned_segments` as a list of file/utterance names, utterance start and end times in seconds, and a confidence score.\nThe confidence score is a probability in log space that indicates how well the utterance was aligned. If needed, remove bad utterances:\n\n```sh\nmin_confidence_score=-5\nawk -v ms=${min_confidence_score} '{ if ($5 > ms) {print} }' ${align_dir}/aligned_segments\n```\n\nThe demo script `utils/ctc_align_wav.sh` uses an already pre-trained ASR model (see the list above for more models).\nIt is recommended to use models with RNN-based encoders (such as BLSTMP) for aligning large audio files;\nrather than using Transformer models with a high memory consumption on longer audio data.\nThe sample rate of the audio must be consistent with that of the data used in training; adjust with `sox` if needed.\nA full example recipe is in `egs/tedlium2/align1/`.\n\n<\/div><\/details>\n\n<details><summary>ESPnet2<\/summary><div>\n\n[CTC segmentation](https://arxiv.org/abs/2007.09127) determines utterance segments within audio files.\nAligned utterance segments constitute the labels of speech datasets.\n\nAs a demo, we align the start and end of utterances within the audio file `ctc_align_test.wav`.\nThis can be done either directly from the Python command line or using the script `espnet2/bin/asr_align.py`.\n\nFrom the Python command line interface:\n\n```python\n# load a model with character tokens\nfrom espnet_model_zoo.downloader import ModelDownloader\nd = ModelDownloader(cachedir=\"./modelcache\")\nwsjmodel = d.download_and_unpack(\"kamo-naoyuki/wsj\")\n# load the example file included in the ESPnet repository\nimport soundfile\nspeech, rate = soundfile.read(\"./test_utils/ctc_align_test.wav\")\n# CTC segmentation\nfrom espnet2.bin.asr_align import CTCSegmentation\naligner = CTCSegmentation( **wsjmodel , fs=rate )\ntext = \"\"\"\nutt1 THE SALE OF THE HOTELS\nutt2 IS PART OF HOLIDAY'S STRATEGY\nutt3 TO SELL OFF ASSETS\nutt4 AND CONCENTRATE ON PROPERTY MANAGEMENT\n\"\"\"\nsegments = aligner(speech, text)\nprint(segments)\n# utt1 utt 0.26 1.73 -0.0154 THE SALE OF THE HOTELS\n# utt2 utt 1.73 3.19 -0.7674 IS PART OF HOLIDAY'S STRATEGY\n# utt3 utt 3.19 4.20 -0.7433 TO SELL OFF ASSETS\n# utt4 utt 4.20 6.10 -0.4899 AND CONCENTRATE ON PROPERTY MANAGEMENT\n```\n\nAligning also works with fragments of the text.\nFor this, set the `gratis_blank` option that allows skipping unrelated audio sections without penalty.\nIt's also possible to omit the utterance names at the beginning of each line by setting `kaldi_style_text` to False.\n\n```python\naligner.set_config( gratis_blank=True, kaldi_style_text=False )\ntext = [\"SALE OF THE HOTELS\", \"PROPERTY MANAGEMENT\"]\nsegments = aligner(speech, text)\nprint(segments)\n# utt_0000 utt 0.37 1.72 -2.0651 SALE OF THE HOTELS\n# utt_0001 utt 4.70 6.10 -5.0566 PROPERTY MANAGEMENT\n```\n\nThe script `espnet2/bin/asr_align.py` uses a similar interface. To align utterances:\n\n```sh\n# ASR model and config files from pre-trained model (e.g., from cachedir):\nasr_config=<path-to-model>/config.yaml\nasr_model=<path-to-model>/valid.*best.pth\n# prepare the text file\nwav=\"test_utils/ctc_align_test.wav\"\ntext=\"test_utils/ctc_align_text.txt\"\ncat << EOF > ${text}\nutt1 THE SALE OF THE HOTELS\nutt2 IS PART OF HOLIDAY'S STRATEGY\nutt3 TO SELL OFF ASSETS\nutt4 AND CONCENTRATE\nutt5 ON PROPERTY MANAGEMENT\nEOF\n# obtain alignments:\npython espnet2/bin/asr_align.py --asr_train_config ${asr_config} --asr_model_file ${asr_model} --audio ${wav} --text ${text}\n# utt1 ctc_align_test 0.26 1.73 -0.0154 THE SALE OF THE HOTELS\n# utt2 ctc_align_test 1.73 3.19 -0.7674 IS PART OF HOLIDAY'S STRATEGY\n# utt3 ctc_align_test 3.19 4.20 -0.7433 TO SELL OFF ASSETS\n# utt4 ctc_align_test 4.20 4.97 -0.6017 AND CONCENTRATE\n# utt5 ctc_align_test 4.97 6.10 -0.3477 ON PROPERTY MANAGEMENT\n```\n\nThe output of the script can be redirected to a `segments` file by adding the argument `--output segments`.\nEach line contains the file/utterance name, utterance start and end times in seconds, and a confidence score; optionally also the utterance text.\nThe confidence score is a probability in log space that indicates how well the utterance was aligned. If needed, remove bad utterances:\n\n```sh\nmin_confidence_score=-7\n# here, we assume that the output was written to the file `segments`\nawk -v ms=${min_confidence_score} '{ if ($5 > ms) {print} }' segments\n```\n\nSee the module documentation for more information.\nIt is recommended to use models with RNN-based encoders (such as BLSTMP) for aligning large audio files;\nrather than using Transformer models that have a high memory consumption on longer audio data.\nThe sample rate of the audio must be consistent with that of the data used in training; adjust with `sox` if needed.\n\nAlso, we can use this tool to provide token-level segmentation information if we prepare a list of tokens instead of that of utterances in the `text` file. See the discussion in https://github.com/espnet/espnet/issues/4278#issuecomment-1100756463.\n\n<\/div><\/details>\n\n## Citations\n\n```\n@inproceedings{watanabe2018espnet,\n  author={Shinji Watanabe and Takaaki Hori and Shigeki Karita and Tomoki Hayashi and Jiro Nishitoba and Yuya Unno and Nelson {Enrique Yalta Soplin} and Jahn Heymann and Matthew Wiesner and Nanxin Chen and Adithya Renduchintala and Tsubasa Ochiai},\n  title={{ESPnet}: End-to-End Speech Processing Toolkit},\n  year={2018},\n  booktitle={Proceedings of Interspeech},\n  pages={2207--2211},\n  doi={10.21437/Interspeech.2018-1456},\n  url={http://dx.doi.org/10.21437/Interspeech.2018-1456}\n}\n@inproceedings{hayashi2020espnet,\n  title={{Espnet-TTS}: Unified, reproducible, and integratable open source end-to-end text-to-speech toolkit},\n  author={Hayashi, Tomoki and Yamamoto, Ryuichi and Inoue, Katsuki and Yoshimura, Takenori and Watanabe, Shinji and Toda, Tomoki and Takeda, Kazuya and Zhang, Yu and Tan, Xu},\n  booktitle={Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},\n  pages={7654--7658},\n  year={2020},\n  organization={IEEE}\n}\n@inproceedings{inaguma-etal-2020-espnet,\n    title = \"{ESP}net-{ST}: All-in-One Speech Translation Toolkit\",\n    author = \"Inaguma, Hirofumi  and\n      Kiyono, Shun  and\n      Duh, Kevin  and\n      Karita, Shigeki  and\n      Yalta, Nelson  and\n      Hayashi, Tomoki  and\n      Watanabe, Shinji\",\n    booktitle = \"Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations\",\n    month = jul,\n    year = \"2020\",\n    address = \"Online\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://www.aclweb.org/anthology/2020.acl-demos.34\",\n    pages = \"302--311\",\n}\n@article{hayashi2021espnet2,\n  title={{ESP}net2-{TTS}: Extending the edge of {TTS} research},\n  author={Hayashi, Tomoki and Yamamoto, Ryuichi and Yoshimura, Takenori and Wu, Peter and Shi, Jiatong and Saeki, Takaaki and Ju, Yooncheol and Yasuda, Yusuke and Takamichi, Shinnosuke and Watanabe, Shinji},\n  journal={arXiv preprint arXiv:2110.07840},\n  year={2021}\n}\n@inproceedings{li2020espnet,\n  title={{ESPnet-SE}: End-to-End Speech Enhancement and Separation Toolkit Designed for {ASR} Integration},\n  author={Chenda Li and Jing Shi and Wangyou Zhang and Aswin Shanmugam Subramanian and Xuankai Chang and Naoyuki Kamo and Moto Hira and Tomoki Hayashi and Christoph Boeddeker and Zhuo Chen and Shinji Watanabe},\n  booktitle={Proceedings of IEEE Spoken Language Technology Workshop (SLT)},\n  pages={785--792},\n  year={2021},\n  organization={IEEE},\n}\n@inproceedings{arora2021espnet,\n  title={{ESPnet-SLU}: Advancing Spoken Language Understanding through ESPnet},\n  author={Arora, Siddhant and Dalmia, Siddharth and Denisov, Pavel and Chang, Xuankai and Ueda, Yushi and Peng, Yifan and Zhang, Yuekai and Kumar, Sujay and Ganesan, Karthik and Yan, Brian and others},\n  booktitle={ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},\n  pages={7167--7171},\n  year={2022},\n  organization={IEEE}\n}\n@inproceedings{shi2022muskits,\n  author={Shi, Jiatong and Guo, Shuai and Qian, Tao and Huo, Nan and Hayashi, Tomoki and Wu, Yuning and Xu, Frank and Chang, Xuankai and Li, Huazhe and Wu, Peter and Watanabe, Shinji and Jin, Qin},\n  title={{Muskits}: an End-to-End Music Processing Toolkit for Singing Voice Synthesis},\n  year={2022},\n  booktitle={Proceedings of Interspeech},\n  pages={4277-4281},\n  url={https://www.isca-speech.org/archive/pdfs/interspeech_2022/shi22d_interspeech.pdf}\n}\n@inproceedings{lu22c_interspeech,\n  author={Yen-Ju Lu and Xuankai Chang and Chenda Li and Wangyou Zhang and Samuele Cornell and Zhaoheng Ni and Yoshiki Masuyama and Brian Yan and Robin Scheibler and Zhong-Qiu Wang and Yu Tsao and Yanmin Qian and Shinji Watanabe},\n  title={{ESPnet-SE++: Speech Enhancement for Robust Speech Recognition, Translation, and Understanding}},\n  year=2022,\n  booktitle={Proc. Interspeech 2022},\n  pages={5458--5462},\n}\n@inproceedings{gao2023euro,\n  title={{EURO: ESP}net unsupervised {ASR} open-source toolkit},\n  author={Gao, Dongji and Shi, Jiatong and Chuang, Shun-Po and Garcia, Leibny Paola and Lee, Hung-yi and Watanabe, Shinji and Khudanpur, Sanjeev},\n  booktitle={ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},\n  pages={1--5},\n  year={2023},\n  organization={IEEE}\n}\n@inproceedings{peng2023reproducing,\n  title={Reproducing {W}hisper-style training using an open-source toolkit and publicly available data},\n  author={Peng, Yifan and Tian, Jinchuan and Yan, Brian and Berrebbi, Dan and Chang, Xuankai and Li, Xinjian and Shi, Jiatong and Arora, Siddhant and Chen, William and Sharma, Roshan and others},\n  booktitle={2023 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU)},\n  pages={1--8},\n  year={2023},\n  organization={IEEE}\n}\n@inproceedings{sharma2023espnet,\n  title={ESPnet-{SUMM}: Introducing a novel large dataset, toolkit, and a cross-corpora evaluation of speech summarization systems},\n  author={Sharma, Roshan and Chen, William and Kano, Takatomo and Sharma, Ruchira and Arora, Siddhant and Watanabe, Shinji and Ogawa, Atsunori and Delcroix, Marc and Singh, Rita and Raj, Bhiksha},\n  booktitle={2023 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU)},\n  pages={1--8},\n  year={2023},\n  organization={IEEE}\n}\n@article{jung2024espnet,\n  title={{ESPnet-SPK}: full pipeline speaker embedding toolkit with reproducible recipes, self-supervised front-ends, and off-the-shelf models},\n  author={Jung, Jee-weon and Zhang, Wangyou and Shi, Jiatong and Aldeneh, Zakaria and Higuchi, Takuya and Theobald, Barry-John and Abdelaziz, Ahmed Hussen and Watanabe, Shinji},\n  journal={Proc. Interspeech 2024},\n  year={2024}\n}\n@inproceedings{yan-etal-2023-espnet,\n    title = \"{ESP}net-{ST}-v2: Multipurpose Spoken Language Translation Toolkit\",\n    author = \"Yan, Brian  and\n      Shi, Jiatong  and\n      Tang, Yun  and\n      Inaguma, Hirofumi  and\n      Peng, Yifan  and\n      Dalmia, Siddharth  and\n      Pol{\\'a}k, Peter  and\n      Fernandes, Patrick  and\n      Berrebbi, Dan  and\n      Hayashi, Tomoki  and\n      Zhang, Xiaohui  and\n      Ni, Zhaoheng  and\n      Hira, Moto  and\n      Maiti, Soumi  and\n      Pino, Juan  and\n      Watanabe, Shinji\",\n    booktitle = \"Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)\",\n    year = \"2023\",\n    publisher = \"Association for Computational Linguistics\",\n    pages = \"400--411\",\n}\n\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C6E:3B7E2:16B085:5BDB30:6AB92129"},"text_sha256":"9cf1603d68ddc45316d72e1b726f02281132a79ef4e73c6a9398ccb5b0bed0f7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"onnx/models","input_row":{"repository":"onnx/models","url":"https://github.com/onnx/models","name":"models","owner":"onnx","description":"A collection of pre-trained, state-of-the-art models in the ONNX format ","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9810,"issues":403,"created_at":"2017-10-06T00:03:03Z","updated_at":"2026-09-26T20:02:48Z","first_commit_at":"2017-10-05T23:53:59Z","last_commit_at":"2026-08-01T04:35:14Z","activity_months":105.81999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:06.359Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"onnx/models","visibility":"public","created_at":"2017-10-06T00:03:03Z","updated_at":"2026-09-26T20:02:48Z","private":false,"fork":false,"archived":false,"stargazers_count":9810,"open_issues_count":215,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3248","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C0:6E4BB:17E55DE:1C0497B:6AB928E6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3247","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EF:754BF:17B641B:1BD5F7F:6AB928E6"},"commit":{"sha":"699dc4cfc6fbff70d56cc14bf2456f7bdd4e2faf","url":"https://github.com/onnx/models/commit/699dc4cfc6fbff70d56cc14bf2456f7bdd4e2faf","date":"2018-05-21T10:58:22Z","author_date":"2018-05-21T10:58:22Z","committer_date":"2018-05-21T10:58:22Z","tree_sha":"d42de478ea0516d15498cabb73ab0f1ff4cdc86d","message_first_line":"Rename ZFNet to ZFNet-512 (#61)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3246","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0873:7418C:17FC397:1C1BE24:6AB928E7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2898,"blob_sha":"4707273b1f399b9ac28ccf31b87985e3042e28d9","priority":0}],"documents":[{"path":"README.md","size":2898,"blob_sha":"4707273b1f399b9ac28ccf31b87985e3042e28d9","priority":0,"status":200,"text":"# ONNX Models\n\nThis is a repository for storing ONNX models.\n\n### Models\n\n- [BVLC AlexNet](bvlc_alexnet) (244 MByte)\n\n- [BVLC GoogleNet](bvlc_googlenet) (28 MByte)\n\n- [BVLC CaffeNet](bvlc_reference_caffenet) (244 MByte)\n\n- [BVLC R-CNN ILSVRC13](bvlc_reference_rcnn_ilsvrc13) (231 MByte)\n\n- [DenseNet-121](densenet121) (33 MByte)\n\n- [Inception-v1](inception_v1) (28 MByte)\n\n- [Inception-v2](inception_v2) (45 MByte)\n\n- [ResNet-50](resnet50) (103 MByte)\n\n- [ShuffleNet](shufflenet) (5.3 MByte)\n\n- [SqueezeNet](squeezenet) (5 MByte)\n\n- [VGG-19](vgg19) (575 MByte)\n\n- [ZFNet-512](zfnet512) (349 MByte)\n\n- [MNIST](mnist) (26 kByte)\n\n- [Emotion-FERPlus](emotion_ferplus) (34 MByte)\n\n- [Tiny-YOLOv2](tiny_yolov2) (61 MByte)\n\n### Usage\n\nEvery ONNX backend should support running these models out of the box. After downloading and extracting the tarball of each model, there should be\n\n- A protobuf file `model.onnx` which is the serialized ONNX model.\n- Test data.\n\n\nThe test data are provided in two different formats:\n- Serialized Numpy archives, which are files named like `test_data_*.npz`, each file contains one set of test inputs and outputs.\nThey can be used like this:\n\n```python\nimport numpy as np\nimport onnx\nimport onnx_backend as backend\n\n# Load the model and sample inputs and outputs\nmodel = onnx.load(model_pb_path)\nsample = np.load(npz_path, encoding='bytes')\ninputs = list(sample['inputs'])\noutputs = list(sample['outputs'])\n\n# Run the model with an onnx backend and verify the results\nnp.testing.assert_almost_equal(outputs, backend.run_model(model, inputs))\n```\n\n- Serialized protobuf TensorProtos, which are stored in folders named like `test_data_set_*`.\nThey can be used as the following:\n```python\nimport numpy as np\nimport onnx\nimport os\nimport glob\nimport onnx_backend as backend\n\nfrom onnx import numpy_helper\n\nmodel = onnx.load('model.onnx')\ntest_data_dir = 'test_data_set_0'\n\n# Load inputs\ninputs = []\ninputs_num = len(glob.glob(os.path.join(test_data_dir, 'input_*.pb')))\nfor i in range(inputs_num):\n    input_file = os.path.join(test_data_dir, 'input_{}.pb'.format(i))\n    tensor = onnx.TensorProto()\n    with open(input_file, 'rb') as f:\n        tensor.ParseFromString(f.read())\n    inputs.append(numpy_helper.to_array(tensor))\n\n# Load reference outputs\nref_outputs = []\nref_outputs_num = len(glob.glob(os.path.join(test_data_dir, 'output_*.pb')))\nfor i in range(ref_outputs_num):\n    output_file = os.path.join(test_data_dir, 'output_{}.pb'.format(i))\n    tensor = onnx.TensorProto()\n    with open(output_file, 'rb') as f:\n        tensor.ParseFromString(f.read())\n    ref_outputs.append(numpy_helper.to_array(tensor))\n\n# Run the model on the backend\noutputs = list(backend.run_model(model, inputs))\n\n# Compare the results with reference outputs.\nfor ref_o, o in zip(ref_outputs, outputs):\n    np.testing.assert_almost_equal(ref_o, o)\n```\n\n# License\n\n[MIT License](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FCE2:38C7FC:177854:593F66:6AB9212C"},"text_sha256":"9a9d2a225f30b5818a39100831e9716b17cf895bb82b5e7aa5554c22c0dff420"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3245","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17A9948:1BC95E5:6AB928E7"},"commit":{"sha":"d55d2baeb0d6641643d5295a4f42b545fcf9d9e2","url":"https://github.com/onnx/models/commit/d55d2baeb0d6641643d5295a4f42b545fcf9d9e2","date":"2026-06-27T15:13:50Z","author_date":"2026-06-27T15:13:50Z","committer_date":"2026-06-27T15:13:50Z","tree_sha":"a35e0cbf62ffec4e2cba005cbebe8cad20859e67","message_first_line":"Bump github/codeql-action from 2 to 4 (#694)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3244","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:17F9FE5:1C196F7:6AB928E8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":30985,"blob_sha":"c906290d25781e7f110fcf15cfa45c4b8420c179","priority":0}],"documents":[{"path":"README.md","size":30985,"blob_sha":"c906290d25781e7f110fcf15cfa45c4b8420c179","priority":0,"status":200,"text":"<!--- SPDX-License-Identifier: Apache-2.0 -->\n\n> **Deprecation Notice**: We sincerely thank the community for participating in the ONNX Model Zoo effort. As the machine learning ecosystem has evolved, much of the novel model sharing has successfully transitioned to Hugging Face, which maintains a vibrant and healthy state. We are preserving the ONNX Model Zoo  repository for historical purposes only. Please note that models will no longer be available for LFS download starting July 1st, 2025. You can still get access to the models that were originally available on this repository by going to https://huggingface.co/onnxmodelzoo.\n\n# ONNX Model Zoo\n\n\n## Introduction\n\nWelcome to the ONNX Model Zoo! The Open Neural Network Exchange (ONNX) is an open standard format created to represent machine learning models. Supported by a robust community of partners, ONNX defines a common set of operators and a common file format to enable AI developers to use models with a variety of frameworks, tools, runtimes, and compilers.\n\nThis repository is a curated collection of pre-trained, state-of-the-art models in the ONNX format. These models are sourced from prominent open-source repositories and have been contributed by a diverse group of community members. Our aim is to facilitate the spread and usage of machine learning models among a wider audience of developers, researchers, and enthusiasts.\n\nTo handle ONNX model files, which can be large, we use Git LFS (Large File Storage). \n\n## Models\n\nCurrently, we are expanding the ONNX Model Zoo by incorporating additional models from the following categories.\nAs we are rigorously validating the new models for accuracy, refer to the [validated models](#validated-models) below that have been successfully validated for accuracy:\n\n- Computer Vision\n- Natural Language Processing (NLP)\n- Generative AI\n- Graph Machine Learning\n\nThese models are sourced from prominent open-source repositories such as [timm](https://github.com/huggingface/pytorch-image-models), [torchvision](https://github.com/pytorch/vision), [torch_hub](https://pytorch.org/hub/), and [transformers](https://github.com/huggingface/transformers), and exported into the ONNX format using the open-source [TurnkeyML toolchain](https://github.com/onnx/turnkeyml).\n\n\n## Validated Models\n\n#### Vision\n* [Image Classification](#image_classification)\n* [Object Detection & Image Segmentation](#object_detection)\n* [Body, Face & Gesture Analysis](#body_analysis)\n* [Image Manipulation](#image_manipulation)\n\n#### Language\n* [Machine Comprehension](#machine_comprehension)\n* [Machine Translation](#machine_translation)\n* [Language Modelling](#language_modelling)\n\n#### Other\n* [Visual Question Answering & Dialog](#visual_qna)\n* [Speech & Audio Processing](#speech)\n* [Other interesting models](#others)\n\nRead the [Usage](#usage-) section below for more details on the file formats in the ONNX Model Zoo (.onnx, .pb, .npz), downloading multiple ONNX models through [Git LFS command line](#gitlfs-), and starter Python code for validating your ONNX model using test data.\n\nINT8 models are generated by [Intel® Neural Compressor](https://github.com/intel/neural-compressor). [Intel® Neural Compressor](https://github.com/intel/neural-compressor) is an open-source Python library which supports automatic accuracy-driven tuning strategies to help user quickly find out the best quantized model. It implements dynamic and static quantization for ONNX models and can represent quantized ONNX models with operator oriented as well as tensor oriented (QDQ) ways. Users can use web-based UI service or python code to do quantization. Read the [Introduction](https://github.com/intel/neural-compressor/blob/master/README.md) for more details.\n\n### Image Classification <a name=\"image_classification\"/>\nThis collection of models take images as input, then classifies the major objects in the images into 1000 object categories such as keyboard, mouse, pencil, and many animals.\n\n|Model Class |Reference |Description |Huggingface Spaces|\n|-|-|-|-|\n|<b>[MobileNet](validated/vision/classification/mobilenet)<\/b>|[Sandler et al.](https://arxiv.org/abs/1801.04381)|Light-weight deep neural network best suited for mobile and embedded vision applications. <br>Top-5 error from paper - ~10%|\n|<b>[ResNet](validated/vision/classification/resnet)<\/b>|[He et al.](https://arxiv.org/abs/1512.03385)|A CNN model (up to 152 layers). Uses shortcut connections to achieve higher accuracy when classifying images. <br> Top-5 error from paper - ~3.6%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/ResNet) |\n|<b>[SqueezeNet](validated/vision/classification/squeezenet)<\/b>|[Iandola et al.](https://arxiv.org/abs/1602.07360)|A light-weight CNN model providing AlexNet level accuracy with 50x fewer parameters. <br>Top-5 error from paper - ~20%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/SqueezeNet) |\n|<b>[VGG](validated/vision/classification/vgg)<\/b>|[Simonyan et al.](https://arxiv.org/abs/1409.1556)|Deep CNN model(up to 19 layers). Similar to AlexNet but uses multiple smaller kernel-sized filters that provides more accuracy when classifying images. <br>Top-5 error from paper - ~8%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/VGG) |\n|<b>[AlexNet](validated/vision/classification/alexnet)<\/b>|[Krizhevsky et al.](https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)|A Deep CNN model (up to 8 layers) where the input is an image and the output is a vector of 1000 numbers. <br> Top-5 error from paper - ~15%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/AlexNet) |\n|<b>[GoogleNet](validated/vision/classification/inception_and_googlenet/googlenet)<\/b>|[Szegedy et al.](https://arxiv.org/pdf/1409.4842.pdf)|Deep CNN model(up to 22 layers). Comparatively smaller and faster than VGG and more accurate in detailing than AlexNet. <br> Top-5 error from paper - ~6.7%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/GoogleNet) |\n|<b>[CaffeNet](validated/vision/classification/caffenet)<\/b>|[Krizhevsky et al.]( https://ucb-icsi-vision-group.github.io/caffe-paper/caffe.pdf)|Deep CNN variation of AlexNet for Image Classification in Caffe where the max pooling precedes the local response normalization (LRN) so that the LRN takes less compute and memory.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/CaffeNet) |\n|<b>[RCNN_ILSVRC13](validated/vision/classification/rcnn_ilsvrc13)<\/b>|[Girshick et al.](https://arxiv.org/abs/1311.2524)|Pure Caffe implementation of R-CNN for image classification. This model uses localization of regions to classify and extract features from images.|\n|<b>[DenseNet-121](validated/vision/classification/densenet-121)<\/b>|[Huang et al.](https://arxiv.org/abs/1608.06993)|Model that has every layer connected to every other layer and passes on its own feature providing strong gradient flow and more diversified features.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/DenseNet-121) |\n|<b>[Inception_V1](validated/vision/classification/inception_and_googlenet/inception_v1)<\/b>|[Szegedy et al.](https://arxiv.org/abs/1409.4842)|This model is same as GoogLeNet, implemented through Caffe2 that has improved utilization of the computing resources inside the network and helps with the vanishing gradient problem. <br> Top-5 error from paper - ~6.7%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/Inception_v1) |\n|<b>[Inception_V2](validated/vision/classification/inception_and_googlenet/inception_v2)<\/b>|[Szegedy et al.](https://arxiv.org/abs/1512.00567)|Deep CNN model for Image Classification as an adaptation to Inception v1 with batch normalization. This model has reduced computational cost and improved image resolution compared to Inception v1. <br> Top-5 error from paper ~4.82%|\n|<b>[ShuffleNet_V1](validated/vision/classification/shufflenet)<\/b>|[Zhang et al.](https://arxiv.org/abs/1707.01083)|Extremely computation efficient CNN model that is designed specifically for mobile devices. This model greatly reduces the computational cost and provides a ~13x speedup over AlexNet on ARM-based mobile devices. Compared to MobileNet, ShuffleNet achieves superior performance by a significant margin due to it's efficient structure. <br> Top-1 error from paper - ~32.6%|\n|<b>[ShuffleNet_V2](validated/vision/classification/shufflenet)<\/b>|[Zhang et al.](https://arxiv.org/abs/1807.11164)|Extremely computation efficient CNN model that is designed specifically for mobile devices. This network architecture design considers direct metric such as speed, instead of indirect metric like FLOP. <br> Top-1 error from paper - ~30.6%|\n|<b>[ZFNet-512](validated/vision/classification/zfnet-512)<\/b>|[Zeiler et al.](https://arxiv.org/abs/1311.2901)|Deep CNN model (up to 8 layers) that increased the number of features that the network is capable of detecting that helps to pick image features at a finer level of resolution. <br> Top-5 error from paper - ~14.3%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/ZFNet-512) |\n|<b>[EfficientNet-Lite4](validated/vision/classification/efficientnet-lite4)<\/b>|[Tan et al.](https://arxiv.org/abs/1905.11946)|CNN model with an order of magnitude of few computations and parameters, while still acheiving state-of-the-art accuracy and better efficiency than previous ConvNets. <br> Top-5 error from paper - ~2.9%| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/EfficientNet-Lite4) |\n<hr>\n\n#### Domain-based Image Classification <a name=\"domain_based_image\"/>\nThis subset of models classify images for specific domains and datasets.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|<b>[MNIST-Handwritten Digit Recognition](validated/vision/classification/mnist)<\/b>|[Convolutional Neural Network with MNIST](https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_103D_MNIST_ConvolutionalNeuralNetwork.ipynb)\t|Deep CNN model for handwritten digit identification|\n<hr>\n\n### Object Detection & Image Segmentation <a name=\"object_detection\"/>\nObject detection models detect the presence of multiple objects in an image and segment out areas of the image where the objects are detected. Semantic segmentation models partition an input image by labeling each pixel into a set of pre-defined categories.\n\n|Model Class |Reference |Description |Hugging Face Spaces |\n|-|-|-|-|\n|<b>[Tiny YOLOv2](validated/vision/object_detection_segmentation/tiny-yolov2)<\/b>|[Redmon et al.](https://arxiv.org/pdf/1612.08242.pdf)|A real-time CNN for object detection that detects 20 different classes. A smaller version of the more complex full YOLOv2 network.|\n|<b>[SSD](validated/vision/object_detection_segmentation/ssd)<\/b>|[Liu et al.](https://arxiv.org/abs/1512.02325)|Single Stage Detector: real-time CNN for object detection that detects 80 different classes.|\n|<b>[SSD-MobileNetV1](validated/vision/object_detection_segmentation/ssd-mobilenetv1)<\/b>|[Howard et al.](https://arxiv.org/abs/1704.04861)|A variant of MobileNet that uses the Single Shot Detector (SSD) model framework. The model detects 80 different object classes and locates up to 10 objects in an image.|\n|<b>[Faster-RCNN](validated/vision/object_detection_segmentation/faster-rcnn)<\/b>|[Ren et al.](https://arxiv.org/abs/1506.01497)|Increases efficiency from R-CNN by connecting a RPN with a CNN to create a single, unified network for object detection that detects 80 different classes.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/faster-rcnn) |\n|<b>[Mask-RCNN](validated/vision/object_detection_segmentation/mask-rcnn)<\/b>|[He et al.](https://arxiv.org/abs/1703.06870)|A real-time neural network for object instance segmentation that detects 80 different classes. Extends Faster R-CNN as each of the 300 elected ROIs go through 3 parallel branches of the network: label prediction, bounding box prediction and mask prediction.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/mask-rcnn) |\n|<b>[RetinaNet](validated/vision/object_detection_segmentation/retinanet)<\/b>|[Lin et al.](https://arxiv.org/abs/1708.02002)|A real-time dense detector network for object detection that addresses class imbalance through Focal Loss. RetinaNet is able to match the speed of previous one-stage detectors and defines the state-of-the-art in two-stage detectors (surpassing R-CNN).|\n|<b>[YOLO v2-coco](validated/vision/object_detection_segmentation/yolov2-coco)<\/b>|[Redmon et al.](https://arxiv.org/abs/1612.08242)|A CNN model for real-time object detection system that can detect over 9000 object categories. It uses a single network evaluation, enabling it to be more than 1000x faster than R-CNN and 100x faster than Faster R-CNN. This model is trained with COCO dataset and contains 80 classes.\n|<b>[YOLO v3](validated/vision/object_detection_segmentation/yolov3)<\/b>|[Redmon et al.](https://arxiv.org/pdf/1804.02767.pdf)|A deep CNN model for real-time object detection that detects 80 different classes. A little bigger than YOLOv2 but still very fast. As accurate as SSD but 3 times faster.|\n|<b>[Tiny YOLOv3](validated/vision/object_detection_segmentation/tiny-yolov3)<\/b>|[Redmon et al.](https://arxiv.org/pdf/1804.02767.pdf)| A smaller version of YOLOv3 model. |\n|<b>[YOLOv4](validated/vision/object_detection_segmentation/yolov4)<\/b>|[Bochkovskiy et al.](https://arxiv.org/abs/2004.10934)|Optimizes the speed and accuracy of object detection. Two times faster than EfficientDet. It improves YOLOv3's AP and FPS by 10% and 12%, respectively, with mAP50 of 52.32 on the COCO 2017 dataset and FPS of 41.7 on a Tesla V100.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/yolov4) |\n|<b>[DUC](validated/vision/object_detection_segmentation/duc)<\/b>|[Wang et al.](https://arxiv.org/abs/1702.08502)|Deep CNN based pixel-wise semantic segmentation model with >80% [mIOU](/models/semantic_segmentation/DUC/README.md/#metric) (mean Intersection Over Union). Trained on cityscapes dataset, which can be effectively implemented in self driving vehicle systems.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/DUC) |\n|<b>[FCN](validated/vision/object_detection_segmentation/fcn)|[Long et al.](https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf)|Deep CNN based segmentation model trained end-to-end, pixel-to-pixel that produces efficient inference and learning. Built off of AlexNet, VGG net, GoogLeNet classification methods. <br>[contribute](contribute.md)| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/FCN) |\n<hr>\n\n### Body, Face & Gesture Analysis <a name=\"body_analysis\"/>\nFace detection models identify and/or recognize human faces and emotions in given images. Body and Gesture Analysis models identify gender and age in given image.\n\n|Model Class |Reference |Description |Hugging Face Spaces |\n|-|-|-|-|\n|<b>[ArcFace](validated/vision/body_analysis/arcface)<\/b>|[Deng et al.](https://arxiv.org/abs/1801.07698)|A CNN based model for face recognition which learns discriminative features of faces and produces embeddings for input face images.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/ArcFace) |\n|<b>[UltraFace](validated/vision/body_analysis/ultraface)<\/b>|[Ultra-lightweight face detection model](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB)|This model is a lightweight facedetection model designed for edge computing devices.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/ultraface) |\n|<b>[Emotion FerPlus](validated/vision/body_analysis/emotion_ferplus)<\/b> |[Barsoum et al.](https://arxiv.org/abs/1608.01041)\t| Deep CNN for emotion recognition trained on images of faces.|\n|<b>[Age and Gender Classification using Convolutional Neural Networks](validated/vision/body_analysis/age_gender)<\/b>| [Rothe et al.](https://data.vision.ee.ethz.ch/cvl/publications/papers/proceedings/eth_biwi_01229.pdf)\t|This model accurately classifies gender and age even the amount of learning data is limited.|\n<hr>\n\n### Image Manipulation <a name=\"image_manipulation\"/>\nImage manipulation models use neural networks to transform input images to modified output images. Some popular models in this category involve style transfer or enhancing images by increasing resolution.\n\n|Model Class |Reference |Description |Hugging Face Spaces |\n|-|-|-|-|\n|Unpaired Image to Image Translation using Cycle consistent Adversarial Network|[Zhu et al.](https://arxiv.org/abs/1703.10593)|The model uses learning to translate an image from a source domain X to a target domain Y in the absence of paired examples. <br>[contribute](contribute.md)|\n|<b>[Super Resolution with sub-pixel CNN](validated/vision/super_resolution/sub_pixel_cnn_2016)<\/b> |\t[Shi et al.](https://arxiv.org/abs/1609.05158)\t|A deep CNN that uses sub-pixel convolution layers to upscale the input image. | [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/sub_pixel_cnn_2016) |\n|<b>[Fast Neural Style Transfer](validated/vision/style_transfer/fast_neural_style)<\/b> |\t[Johnson et al.](https://arxiv.org/abs/1603.08155)\t|This method uses a loss network pretrained for image classification to define perceptual loss functions that measure perceptual differences in content and style between images. The loss network remains fixed during the training process.|\n<hr>\n\n### Speech & Audio Processing <a name=\"speech\"/>\nThis class of models uses audio data to train models that can identify voice, generate music, or even read text out loud.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|Speech recognition with deep recurrent neural networks|\t[Graves et al.](https://www.cs.toronto.edu/~fritz/absps/RNN13.pdf)|A RNN model for sequential data for speech recognition. Labels problems where the input-output alignment is unknown<br>[contribute](contribute.md)|\n|Deep voice: Real time neural text to speech |\t[Arik et al.](https://arxiv.org/abs/1702.07825)\t|A DNN model that performs end-to-end neural speech synthesis. Requires fewer parameters and it is faster than other systems. <br>[contribute](contribute.md)|\n|Sound Generative models|\t[WaveNet: A Generative Model for Raw Audio ](https://arxiv.org/abs/1609.03499)|A CNN model that generates raw audio waveforms. Has predictive distribution for each audio sample. Generates realistic music fragments. <br>[contribute](contribute.md)|\n<hr>\n\n### Machine Comprehension <a name=\"machine_comprehension\"/>\nThis subset of natural language processing models that answer questions about a given context paragraph.\n\n|Model Class |Reference |Description |Hugging Face Spaces|\n|-|-|-|-|\n|<b>[Bidirectional Attention Flow](validated/text/machine_comprehension/bidirectional_attention_flow)<\/b>|[Seo et al.](https://arxiv.org/pdf/1611.01603)|A model that answers a query about a given context paragraph.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/BiDAF) |\n|<b>[BERT-Squad](validated/text/machine_comprehension/bert-squad)<\/b>|[Devlin et al.](https://arxiv.org/pdf/1810.04805.pdf)|This model answers questions based on the context of the given input paragraph. | [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/BERT-Squad) |\n|<b>[RoBERTa](validated/text/machine_comprehension/roberta)<\/b>|[Liu et al.](https://arxiv.org/pdf/1907.11692.pdf)|A large transformer-based model that predicts sentiment based on given input text.| [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/RoBERTa) |\n|<b>[GPT-2](validated/text/machine_comprehension/gpt-2)<\/b>|[Radford et al.](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)|A large transformer-based language model that given a sequence of words within some text, predicts the next word. | [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/GPT-2) |\n|<b>[T5](validated/text/machine_comprehension/t5)<\/b>|[Raffel et al.](https://arxiv.org/abs/1910.10683)|A large transformer-based language model trained on multiple tasks at once to achieve better semantic understanding of the prompt, capable of sentiment-analysis, question-answering, similarity-detection, translation, summarization, etc. |[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/onnx/T5) |\n<hr>\n\n### Machine Translation <a name=\"machine_translation\"/>\nThis class of natural language processing models learns how to translate input text to another language.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|Neural Machine Translation by jointly learning to align and translate|\t[Bahdanau et al.](https://arxiv.org/abs/1409.0473)|Aims to build a single neural network that can be jointly tuned to maximize the translation performance. <br>[contribute](contribute.md)|\n|Google's Neural Machine Translation System|\t[Wu et al.](https://arxiv.org/abs/1609.08144)|This model helps to improve issues faced by the Neural Machine Translation (NMT) systems like parallelism that helps accelerate the final translation speed.<br>[contribute](contribute.md)|\n<hr>\n\n### Language Modelling <a name=\"language_modelling\"/>\nThis subset of natural language processing models learns representations of language from large corpuses of text.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|Deep Neural Network Language Models | [Arisoy et al.](https://pdfs.semanticscholar.org/a177/45f1d7045636577bcd5d513620df5860e9e5.pdf)|A DNN acoustic model. Used in many natural language technologies. Represents a probability distribution over all possible word strings in a language. <br> [contribute](contribute.md)|\n<hr>\n\n### Visual Question Answering & Dialog <a name=\"visual_qna\"/>\nThis subset of natural language processing models uses input images to answer questions about those images.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|VQA: Visual Question Answering |[Agrawal et al.](https://arxiv.org/pdf/1505.00468v6.pdf)|A model that takes an image and a free-form, open-ended natural language question about the image and outputs a natural-language answer. <br>[contribute](contribute.md)|\n|Yin and Yang: Balancing and Answering Binary Visual Questions |[Zhang et al.](https://arxiv.org/pdf/1511.05099.pdf)|Addresses VQA by converting the question to a tuple that concisely summarizes the visual concept to be detected in the image. Next, if the concept can be found in the image, it provides a “yes” or “no” answer. Its performance matches the traditional VQA approach on unbalanced dataset, and outperforms it on the balanced dataset. <br>[contribute](contribute.md)|\n|Making the V in VQA Matter|[Goyal et al.](https://arxiv.org/pdf/1612.00837.pdf)|Balances the VQA dataset by collecting complementary images such that every question is associated with a pair of similar images that result in two different answers to the question, providing a unique interpretable model that provides a counter-example based explanation.  <br>[contribute](contribute.md)|\n|Visual Dialog|\t[Das et al.](https://arxiv.org/abs/1611.08669)|An AI agent that holds a meaningful dialog with humans in natural, conversational language about visual content. Curates a large-scale Visual Dialog dataset (VisDial). <br>[contribute](contribute.md)|\n<hr>\n\n### Other interesting models <a name=\"others\"/>\nThere are many interesting deep learning models that do not fit into the categories described above. The ONNX team would like to highly encourage users and researchers to [contribute](contribute.md) their models to the growing model zoo.\n\n|Model Class |Reference |Description |\n|-|-|-|\n|Text to Image|\t[Generative Adversarial Text to image Synthesis ](https://arxiv.org/abs/1605.05396)|Effectively bridges the advances in text and image modeling, translating visual concepts from characters to pixels. Generates plausible images of birds and flowers from detailed text descriptions. <br>[contribute](contribute.md)|\n|Time Series Forecasting|\t[Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks ](https://arxiv.org/pdf/1703.07015.pdf)|The model extracts short-term local dependency patterns among variables and to discover long-term patterns for time series trends. It helps to predict solar plant energy output, electricity consumption, and traffic jam situations. <br>[contribute](contribute.md)|\n|Recommender systems|[DropoutNet: Addressing Cold Start in Recommender Systems](http://www.cs.toronto.edu/~mvolkovs/nips2017_deepcf.pdf)|A collaborative filtering method that makes predictions about an individual’s preference based on preference information from other users.<br>[contribute](contribute.md)|\n|Collaborative filtering|[Neural Collaborative Filtering](https://arxiv.org/pdf/1708.05031.pdf)|A DNN model based on the interaction between user and item features using matrix factorization. <br>[contribute](contribute.md)|\n|Autoencoders|[A Hierarchical Neural Autoencoder for Paragraphs and Documents](https://arxiv.org/abs/1506.01057)|An LSTM (long-short term memory) auto-encoder to preserve and reconstruct multi-sentence paragraphs.<br>[contribute](contribute.md)|\n<hr>\n\n## Usage <a name=\"usage-\"/>\n\nEvery ONNX backend should support running the models out of the box. After downloading and extracting the tarball of each model, you will find:\n\n- A protobuf file `model.onnx` that represents the serialized ONNX model.\n- Test data (in the form of serialized protobuf TensorProto files or serialized NumPy archives).\n\n### Usage - Test data starter code\n\nThe test data files can be used to validate ONNX models from the Model Zoo. We have provided the following interface examples for you to get started. Please replace `onnx_backend` in your code with the appropriate framework of your choice that provides ONNX inferencing support, and likewise replace `backend.run_model` with the framework's model evaluation logic.\n\nThere are two different formats for the test data files:\n\n- Serialized protobuf TensorProtos (.pb), stored in folders with the naming convention `test_data_set_*`.\n\n```python\nimport numpy as np\nimport onnx\nimport os\nimport glob\nimport onnx_backend as backend\n\nfrom onnx import numpy_helper\n\nmodel = onnx.load('model.onnx')\ntest_data_dir = 'test_data_set_0'\n\n# Load inputs\ninputs = []\ninputs_num = len(glob.glob(os.path.join(test_data_dir, 'input_*.pb')))\nfor i in range(inputs_num):\n    input_file = os.path.join(test_data_dir, 'input_{}.pb'.format(i))\n    tensor = onnx.TensorProto()\n    with open(input_file, 'rb') as f:\n        tensor.ParseFromString(f.read())\n    inputs.append(numpy_helper.to_array(tensor))\n\n# Load reference outputs\nref_outputs = []\nref_outputs_num = len(glob.glob(os.path.join(test_data_dir, 'output_*.pb')))\nfor i in range(ref_outputs_num):\n    output_file = os.path.join(test_data_dir, 'output_{}.pb'.format(i))\n    tensor = onnx.TensorProto()\n    with open(output_file, 'rb') as f:\n        tensor.ParseFromString(f.read())\n    ref_outputs.append(numpy_helper.to_array(tensor))\n\n# Run the model on the backend\noutputs = list(backend.run_model(model, inputs))\n\n# Compare the results with reference outputs.\nfor ref_o, o in zip(ref_outputs, outputs):\n    np.testing.assert_almost_equal(ref_o, o)\n```\n\n- Serialized Numpy archives, stored in files with the naming convention `test_data_*.npz`. Each file contains one set of test inputs and outputs.\n\n```python\nimport numpy as np\nimport onnx\nimport onnx_backend as backend\n\n# Load the model and sample inputs and outputs\nmodel = onnx.load(model_pb_path)\nsample = np.load(npz_path, encoding='bytes')\ninputs = list(sample['inputs'])\noutputs = list(sample['outputs'])\n\n# Run the model with an onnx backend and verify the results\nnp.testing.assert_almost_equal(outputs, backend.run_model(model, inputs))\n```\n\n### Usage - Model quantization\nYou can get quantized ONNX models by using [Intel® Neural Compressor](https://github.com/intel/neural-compressor). It provides web-based UI service to make quantization easier and supports code-based usage for more abundant quantization settings. Refer to [bench document](https://github.com/intel/neural-compressor/blob/master/docs/bench.md) for how to use web-based UI service and [example document](./resource/docs/INC_code.md) for a simple code-based demo.\n![image](./resource/images/INC_GUI.gif)\n\n## Usage\n\nThere are multiple ways to access the ONNX Model Zoo:\n\n### Git Clone (Not Recommended)\n\nCloning the repository using git won't automatically download the ONNX models due to their size. To manage these files, first, install Git LFS by running:\n\n```bash\npip install git-lfs\n```\n\nTo download a specific model:\n\n```bash\ngit lfs pull --include=\"[path to model].onnx\" --exclude=\"\"\n```\n\nTo download all models:\n\n```bash\ngit lfs pull --include=\"*\" --exclude=\"\"\n```\n\n### GitHub UI\n\nAlternatively, you can download models directly from GitHub. Navigate to the model's page and click the \"Download\" button on the top right corner.\n\n## Model Visualization\n\nFor a graphical representation of each model's architecture, we recommend using [Netron](https://github.com/lutzroeder/netron).\n\n## Contributions\n\nContributions to the ONNX Model Zoo are welcome! Please check our [contribution guidelines](contribute.md) for more information on how you can contribute to the growth and improvement of this resource.\n\nThank you for your interest in the ONNX Model Zoo, and we look forward to your participation in our community!\n\n# License\n\n[Apache License v2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"541C:345ED4:172272:5C4B8A:6AB9212E"},"text_sha256":"c37072919507ea0465e63f574fdfb9f6085a80a4ff51252c8dfe2c4ff332b3c9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jadore801120/attention-is-all-you-need-pytorch","input_row":{"repository":"jadore801120/attention-is-all-you-need-pytorch","url":"https://github.com/jadore801120/attention-is-all-you-need-pytorch","name":"attention-is-all-you-need-pytorch","owner":"jadore801120","description":"A PyTorch implementation of the Transformer model in \"Attention is All You Need\".","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9801,"issues":181,"created_at":"2017-06-14T10:15:20Z","updated_at":"2026-09-27T11:50:48Z","first_commit_at":"2017-06-14T10:15:20Z","last_commit_at":"2021-02-17T13:30:47Z","activity_months":44.159999999999997,"ai_ml_match_topics":"deep-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:09.816Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jadore801120/attention-is-all-you-need-pytorch","visibility":"public","created_at":"2017-06-14T10:15:20Z","updated_at":"2026-09-27T11:50:48Z","private":false,"fork":false,"archived":false,"stargazers_count":9801,"open_issues_count":83,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3243","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092B:77994:17D2E2B:1BF28C9:6AB928E9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3242","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:17E0041:1BFF32E:6AB928EA"},"commit":{"sha":"7fa8c63f9a5a6e997659054ebef2fc1a61630dc2","url":"https://github.com/jadore801120/attention-is-all-you-need-pytorch/commit/7fa8c63f9a5a6e997659054ebef2fc1a61630dc2","date":"2017-11-19T04:09:18Z","author_date":"2017-11-19T04:09:18Z","committer_date":"2017-11-19T04:09:18Z","tree_sha":"8900d7fab1a7c2bea41cae101254d7b97e8aa451","message_first_line":"fix position encoding in #32"},"tree_request_status":200,"tree_rate":{"github_remaining":"3241","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D2:2D7D17:176D248:1B8B22E:6AB928EA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4438,"blob_sha":"aa3c0f52cb5f6e8b5799c4c9dd520592534db15e","priority":0}],"documents":[{"path":"README.md","size":4438,"blob_sha":"aa3c0f52cb5f6e8b5799c4c9dd520592534db15e","priority":0,"status":200,"text":"# Attention is all you need: A Pytorch Implementation\n\nThis is a PyTorch implementation of the Transformer model in \"[Attention is All You Need](https://arxiv.org/abs/1706.03762)\" (Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, arxiv, 2017). \n\n\nA novel sequence to sequence framework utilizes the **self-attention mechanism**, instead of Convolution operation or Recurrent structure, and achieve the state-of-the-art performance on **WMT 2014 English-to-German translation task**. (2017/06/12)\n\n> The official Tensorflow Implementation can be found in: [tensorflow/tensor2tensor](https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/transformer.py).\n\n> To learn more about self-attention mechanism, you could read \"[A Structured Self-attentive Sentence Embedding](https://arxiv.org/abs/1703.03130)\".\n\n<p align=\"center\">\n<img src=\"http://imgur.com/1krF2R6.png\" width=\"250\">\n<\/p>\n\n\nThe project support training and translation with trained model now.\n\nNote that this project is still a work in progress.\n\n\nIf there is any suggestion or error, feel free to fire an issue to let me know. :)\n\n\n# Requirement\n- python 3.4+\n- pytorch 0.2.0\n- tqdm\n- numpy\n\n\n# Usage\n\n## Some useful tools:\n\nThe example below uses the Moses tokenizer (http://www.statmt.org/moses/) to prepare the data and the moses BLEU script for evaluation.\n\n```bash\nwget https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/tokenizer/tokenizer.perl\nwget https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/share/nonbreaking_prefixes/nonbreaking_prefix.de\nwget https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/share/nonbreaking_prefixes/nonbreaking_prefix.en\nsed -i \"s/$RealBin\\/..\\/share\\/nonbreaking_prefixes//\" tokenizer.perl\nwget https://raw.githubusercontent.com/moses-smt/mosesdecoder/master/scripts/generic/multi-bleu.perl\n```\n\n## WMT'16 Multimodal Translation: Multi30k (de-en)\n\nAn example of training for the WMT'16 Multimodal Translation task (http://www.statmt.org/wmt16/multimodal-task.html).\n\n### 0) Download the data.\n\n```bash\nmkdir -p data/multi30k\nwget http://www.quest.dcs.shef.ac.uk/wmt16_files_mmt/training.tar.gz &&  tar -xf training.tar.gz -C data/multi30k && rm training.tar.gz\nwget http://www.quest.dcs.shef.ac.uk/wmt16_files_mmt/validation.tar.gz && tar -xf validation.tar.gz -C data/multi30k && rm validation.tar.gz\nwget http://www.quest.dcs.shef.ac.uk/wmt16_files_mmt/mmt16_task1_test.tar.gz && tar -xf mmt16_task1_test.tar.gz -C data/multi30k && rm mmt16_task1_test.tar.gz\n```\n\n### 1) Preprocess the data.\n```bash\nfor l in en de; do for f in data/multi30k/*.$l; do if [[ \"$f\" != *\"test\"* ]]; then sed -i \"$ d\" $f; fi;  done; done\nfor l in en de; do for f in data/multi30k/*.$l; do perl tokenizer.perl -a -no-escape -l $l -q  < $f > $f.atok; done; done\npython preprocess.py -train_src data/multi30k/train.en.atok -train_tgt data/multi30k/train.de.atok -valid_src data/multi30k/val.en.atok -valid_tgt data/multi30k/val.de.atok -save_data data/multi30k.atok.low.pt\n```\n\n### 2) Train the model\n```bash\npython train.py -data data/multi30k.atok.low.pt -save_model trained -save_mode best -proj_share_weight \n```\n> If your source and target language share one common vocabulary, use the `-embs_share_weight` flag to enable the model to share source/target word embedding. \n\n### 3) Test the model\n```bash\npython translate.py -model trained.chkpt -vocab data/multi30k.atok.low.pt -src data/multi30k/test.en.atok\n```\n---\n# Performance\n## Training\n\n<p align=\"center\">\n<img src=\"https://imgur.com/A6byNQ8.png\" width=\"400\">\n<img src=\"https://imgur.com/5z4f4tw.png\" width=\"400\">\n<\/p>\n\n- Parameter settings:\n  - batch_size=64\n  - d_inner_hid=1024\n  - d_k=64\n  - d_v=64\n  - d_model=512\n  - d_word_vec=512\n  - dropout=0.1\n  - embs_share_weight=False\n  - n_head=8\n  - n_layers=6\n  - n_warmup_steps=4000\n  - proj_share_weight=True\n\n- Elapse per epoch  (on NVIDIA Titan X):\n  - Training set: 1.38 min\n  - Validation set: 0.016 min\n  \n## Testing \n- coming soon.\n---\n# TODO\n  - Label smoothing\n  - Evaluation on the generated text.\n  - Attention weight plot.\n---\n# Acknowledgement\n- The project structure, some scripts and the dataset preprocessing steps are heavily borrowed from [OpenNMT/OpenNMT-py](https://github.com/OpenNMT/OpenNMT-py).\n- Thanks for the suggestions from @srush, @iamalbert and @ZiJianZhao.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"66CA:35EBC:172852:5C5279:6AB9212F"},"text_sha256":"9a0327daacfaf293efd7bf7b12ae87b9c886e3f163659da5c04a02e3a68e162c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3240","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17AD193:1BCC20E:6AB928EB"},"commit":{"sha":"132907dd272e2cc92e3c10e6c4e783a87ff8893d","url":"https://github.com/jadore801120/attention-is-all-you-need-pytorch/commit/132907dd272e2cc92e3c10e6c4e783a87ff8893d","date":"2021-02-17T13:30:47Z","author_date":"2021-02-17T13:30:47Z","committer_date":"2021-02-17T13:30:47Z","tree_sha":"869ba11c1a09aff3ad8137951f94292b83ba8257","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3239","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A5:35D5A8:17BAB98:1BDA80C:6AB928EB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3666,"blob_sha":"3642f8e42d698b5731066d7447d83c1e97660079","priority":0}],"documents":[{"path":"README.md","size":3666,"blob_sha":"3642f8e42d698b5731066d7447d83c1e97660079","priority":0,"status":200,"text":"# Attention is all you need: A Pytorch Implementation\n\nThis is a PyTorch implementation of the Transformer model in \"[Attention is All You Need](https://arxiv.org/abs/1706.03762)\" (Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, arxiv, 2017). \n\n\nA novel sequence to sequence framework utilizes the **self-attention mechanism**, instead of Convolution operation or Recurrent structure, and achieve the state-of-the-art performance on **WMT 2014 English-to-German translation task**. (2017/06/12)\n\n> The official Tensorflow Implementation can be found in: [tensorflow/tensor2tensor](https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/transformer.py).\n\n> To learn more about self-attention mechanism, you could read \"[A Structured Self-attentive Sentence Embedding](https://arxiv.org/abs/1703.03130)\".\n\n<p align=\"center\">\n<img src=\"http://imgur.com/1krF2R6.png\" width=\"250\">\n<\/p>\n\n\nThe project support training and translation with trained model now.\n\nNote that this project is still a work in progress.\n\n**BPE related parts are not yet fully tested.**\n\n\nIf there is any suggestion or error, feel free to fire an issue to let me know. :)\n\n\n# Usage\n\n## WMT'16 Multimodal Translation: de-en\n\nAn example of training for the WMT'16 Multimodal Translation task (http://www.statmt.org/wmt16/multimodal-task.html).\n\n### 0) Download the spacy language model.\n```bash\n# conda install -c conda-forge spacy \npython -m spacy download en\npython -m spacy download de\n```\n\n### 1) Preprocess the data with torchtext and spacy.\n```bash\npython preprocess.py -lang_src de -lang_trg en -share_vocab -save_data m30k_deen_shr.pkl\n```\n\n### 2) Train the model\n```bash\npython train.py -data_pkl m30k_deen_shr.pkl -log m30k_deen_shr -embs_share_weight -proj_share_weight -label_smoothing -output_dir output -b 256 -warmup 128000 -epoch 400\n```\n\n### 3) Test the model\n```bash\npython translate.py -data_pkl m30k_deen_shr.pkl -model trained.chkpt -output prediction.txt\n```\n\n## [(WIP)] WMT'17 Multimodal Translation: de-en w/ BPE \n### 1) Download and preprocess the data with bpe:\n\n> Since the interfaces is not unified, you need to switch the main function call from `main_wo_bpe` to `main`.\n\n```bash\npython preprocess.py -raw_dir /tmp/raw_deen -data_dir ./bpe_deen -save_data bpe_vocab.pkl -codes codes.txt -prefix deen\n```\n\n### 2) Train the model\n```bash\npython train.py -data_pkl ./bpe_deen/bpe_vocab.pkl -train_path ./bpe_deen/deen-train -val_path ./bpe_deen/deen-val -log deen_bpe -embs_share_weight -proj_share_weight -label_smoothing -output_dir output -b 256 -warmup 128000 -epoch 400\n```\n\n### 3) Test the model (not ready)\n- TODO:\n\t- Load vocabulary.\n\t- Perform decoding after the translation.\n---\n# Performance\n## Training\n\n<p align=\"center\">\n<img src=\"https://i.imgur.com/S2EVtJx.png\" width=\"400\">\n<img src=\"https://i.imgur.com/IZQmUKO.png\" width=\"400\">\n<\/p>\n\n- Parameter settings:\n  - batch size 256 \n  - warmup step 4000 \n  - epoch 200 \n  - lr_mul 0.5\n  - label smoothing \n  - do not apply BPE and shared vocabulary\n  - target embedding / pre-softmax linear layer weight sharing. \n \n  \n## Testing \n- coming soon.\n---\n# TODO\n  - Evaluation on the generated text.\n  - Attention weight plot.\n---\n# Acknowledgement\n- The byte pair encoding parts are borrowed from [subword-nmt](https://github.com/rsennrich/subword-nmt/).\n- The project structure, some scripts and the dataset preprocessing steps are heavily borrowed from [OpenNMT/OpenNMT-py](https://github.com/OpenNMT/OpenNMT-py).\n- Thanks for the suggestions from @srush, @iamalbert, @Zessay, @JulesGM, @ZiJianZhao, and @huanghoujing.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86A8:3E724:17ADCA:5CD7C1:6AB9212E"},"text_sha256":"50d28c4b35126c86cdbe9dc82a15c06c5199164f0056a1db1fdf3610e647006c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Oneflow-Inc/oneflow","input_row":{"repository":"Oneflow-Inc/oneflow","url":"https://github.com/Oneflow-Inc/oneflow","name":"oneflow","owner":"Oneflow-Inc","description":"OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9436,"issues":1063,"created_at":"2017-02-11T06:09:53Z","updated_at":"2026-09-25T16:00:53Z","first_commit_at":"2017-02-13T06:35:27Z","last_commit_at":"2025-08-20T10:29:38Z","activity_months":102.17,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:12.118Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Oneflow-Inc/oneflow","visibility":"public","created_at":"2017-02-11T06:09:53Z","updated_at":"2026-09-25T16:00:53Z","private":false,"fork":false,"archived":false,"stargazers_count":9436,"open_issues_count":645,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3238","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E0:8656E:17B3B7B:1BD33BD:6AB928EC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3237","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17D16DD:1BF1310:6AB928EC"},"commit":{"sha":"bef6513a48b979e97b20d512d4df89260c6f19ab","url":"https://github.com/Oneflow-Inc/oneflow/commit/bef6513a48b979e97b20d512d4df89260c6f19ab","date":"2018-05-24T10:42:10Z","author_date":"2018-05-24T10:42:10Z","committer_date":"2018-05-24T10:42:10Z","tree_sha":"c571f9f63862aaab7868452bb07b2852ac535f7b","message_first_line":"parallel boxing"},"tree_request_status":200,"tree_rate":{"github_remaining":"3236","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0797:280FBC:17A683E:1BC514B:6AB928EC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":375,"blob_sha":"50498561b8cd3bf7da10ae9155ddf42d0f6a5c00","priority":0}],"documents":[{"path":"README.md","size":375,"blob_sha":"50498561b8cd3bf7da10ae9155ddf42d0f6a5c00","priority":0,"status":200,"text":"# Oneflow\n\n### 1.1 Linux \n\n```\nexport LD_LIBRARY_PATH=/opt/intel/lib/intel64_lin:/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH\nmkdir build && cd build\ncmake -DBUILD_THIRD_PARTY=ON .. && make\ncmake -DBUILD_THIRD_PARTY=OFF .. && make\n```\n\n### 1.2 Windows\n\n```\n./build.bat third_party\n./build.bat\n```\n\n### 1.3 Mac with Xcode\n\n```\n./build_xcode.sh third_party\n./build_xcode.sh\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"601A:3EACB:173B08:5C6585:6AB92132"},"text_sha256":"3dd87c471b7851fbd5627a65ecc3c1ef2a78401e163bd2bffdebee198c0549ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3235","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17AD342:1BCC430:6AB928ED"},"commit":{"sha":"25c8978c1c8b1371ef6aa4187dae4495bd233c35","url":"https://github.com/Oneflow-Inc/oneflow/commit/25c8978c1c8b1371ef6aa4187dae4495bd233c35","date":"2025-08-20T10:29:38Z","author_date":"2025-08-20T10:29:38Z","committer_date":"2025-08-20T10:29:38Z","tree_sha":"48b765fd236a657119ddb93394a431765d5c2b80","message_first_line":"support npu multinomial (#10668)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3234","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A7:3C4024:17E98EB:1C094DE:6AB928EE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7392,"blob_sha":"83c302f93f5249d56425a8d7c2d06736a69ed5a5","priority":0}],"documents":[{"path":"README.md","size":7392,"blob_sha":"83c302f93f5249d56425a8d7c2d06736a69ed5a5","priority":0,"status":200,"text":"# OneFlow\n\nOneFlow is a deep learning framework designed to be **user-friendly, scalable and efficient**. With OneFlow, it is easy to:\n\n- program a model with [**PyTorch-like API**](https://oneflow.readthedocs.io/en/master/)\n- scale a model to n-dimensional-parallel execution with the [**Global Tensor**](https://docs.oneflow.org/en/master/cookies/global_tensor.html)\n- accelerate/deploy a model with the [**Graph Compiler**](https://oneflow.readthedocs.io/en/master/graph.html).\n\n[![Simple CI](https://github.com/Oneflow-Inc/oneflow/actions/workflows/simple.yml/badge.svg)](https://github.com/Oneflow-Inc/oneflow/actions/workflows/simple.yml)\n[![Nightly Docker Image](https://github.com/Oneflow-Inc/docker-images/actions/workflows/oneflow-nightly.yml/badge.svg)](https://github.com/Oneflow-Inc/docker-images/actions/workflows/oneflow-nightly.yml)\n[![Nightly Release](https://github.com/Oneflow-Inc/oneflow/actions/workflows/release.yml/badge.svg)](https://github.com/Oneflow-Inc/oneflow/actions/workflows/release.yml)\n[![Documentation](https://readthedocs.org/projects/oneflow/badge/?version=master)](https://oneflow.readthedocs.io/en/master/?badge=master)\n\n## Latest News\n\n- Version 1.0.0 is out!\n  - [Full changelog](https://github.com/Oneflow-Inc/oneflow/releases/tag/v1.0.0)\n\n## Publication\n\n- [OneFlow: Redesign the Distributed Deep Learning Framework from Scratch](https://arxiv.org/abs/2110.15032)\n\n## System Requirements\n\n### General\n- Linux\n- Python 3.7, 3.8, 3.9, 3.10, 3.11\n\n### CUDA\n- CUDA arch 60 or above\n- CUDA Toolkit version 10.0 or above\n- Nvidia driver version 440.33 or above\n\n  OneFlow will work on a minimum supported driver, and any driver beyond. For more information, please refer to [CUDA compatibility documentation](https://docs.nvidia.com/deploy/cuda-compatibility/index.html).\n\n## Install\n\n### Preinstall docker image\n\n```\ndocker pull oneflowinc/oneflow:nightly-cuda11.8\n```\n\n### Pip Install\n\n- (**Highly recommended**) Upgrade pip\n\n  ```\n  python3 -m pip install --upgrade pip #--user\n  ```\n\n- To install latest stable release of OneFlow with CUDA support:\n\n  ```bash\n  python3 -m pip install oneflow\n  ```\n\n- To install nightly release of OneFlow with CPU-only support:\n\n  ```bash\n  python3 -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beijing.aliyuncs.com/branch/master/cpu\n  ```\n\n- To install nightly release of OneFlow with CUDA support:\n\n  ```bash\n  python3 -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beijing.aliyuncs.com/branch/master/cu118\n  ```\n\n  If you are in China, you could run this to have pip download packages from domestic mirror of pypi:\n  ```\n  python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple\n  ```\n  For more information on this, please refer to [pypi 镜像使用帮助](https://mirror.tuna.tsinghua.edu.cn/help/pypi/)\n\n### Install from Source\n\n<details>\n<summary>Clone Source Code<\/summary>\n\n- #### Option 1: Clone source code from GitHub\n\n  ```bash\n  git clone https://github.com/Oneflow-Inc/oneflow.git\n  ```\n\n- #### Option 2: Download from Aliyun(Only available in China)\n\n  ```bash\n  curl https://oneflow-public.oss-cn-beijing.aliyuncs.com/oneflow-src.zip -o oneflow-src.zip\n  unzip oneflow-src.zip\n  ```\n\n  <\/details>\n\n<details>\n<summary>Build OneFlow<\/summary>\n\n- Install dependencies\n  ```\n  apt install -y libopenblas-dev nasm g++ gcc python3-pip cmake autoconf libtool\n  ```\n  These dependencies are preinstalled in offical conda environment and docker image, you can use the offical conda environment [here](https://github.com/Oneflow-Inc/conda-env) or use the docker image by:\n  ```bash\n  docker pull oneflowinc/manylinux2014_x86_64_cuda11.2\n  ```\n- In the root directory of OneFlow source code, run:\n\n  ```\n  mkdir build\n  cd build\n  ```\n\n- Config the project, inside `build` directory:\n\n  - If you are in China\n\n    config for CPU-only like this:\n\n    ```\n    cmake .. -C ../cmake/caches/cn/cpu.cmake\n    ```\n\n    config for CUDA like this:\n\n    ```\n    cmake .. -C ../cmake/caches/cn/cuda.cmake -DCMAKE_CUDA_ARCHITECTURES=80 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCUDNN_ROOT_DIR=/usr/local/cudnn\n    ```\n\n  - If you are not in China\n\n    config for CPU-only like this:\n\n    ```\n    cmake .. -C ../cmake/caches/international/cpu.cmake\n    ```\n\n    config for CUDA like this:\n\n    ```\n    cmake .. -C ../cmake/caches/international/cuda.cmake -DCMAKE_CUDA_ARCHITECTURES=80 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCUDNN_ROOT_DIR=/usr/local/cudnn\n    ```\n    Here the DCMAKE\\_CUDA\\_ARCHITECTURES macro is used to specify the CUDA architecture, and the DCUDA\\_TOOLKIT\\_ROOT\\_DIR and DCUDNN\\_ROOT\\_DIR macros are used to specify the root path of the CUDA Toolkit and CUDNN.\n\n- Build the project, inside `build` directory, run:\n\n  ```\n  make -j$(nproc)\n  ```\n\n- Add oneflow to your PYTHONPATH, inside `build` directory, run:\n\n  ```\n  source source.sh\n  ```\n\n  Please note that this change is not permanent.\n\n- Simple validation\n\n  ```\n  python3 -m oneflow --doctor\n  ```\n\n  <\/details>\n\n### Troubleshooting\n\nPlease refer to [troubleshooting](docs/source/troubleshooting.md) for common issues you might encounter when compiling and running OneFlow.\n\n## Getting Started\n\n- Please refer to [QUICKSTART](https://docs.oneflow.org/en/master/basics/01_quickstart.html)\n- 中文版请参见 [快速上手](https://docs.oneflow.org/master/basics/01_quickstart.html)\n\n## Documentation\n\n- [API Reference](https://oneflow.readthedocs.io/en/master/)\n- [Usage & Design Docs](http://docs.oneflow.org/)\n- [System Design](https://docs.oneflow.org/en/v0.4.0/basics_topics/essentials_of_oneflow.html)\n\n## Model Zoo and Benchmark\n\n- [Libai(Toolbox for Parallel Training Large-Scale Transformer Models)](https://github.com/Oneflow-Inc/libai)\n  - [BERT-large](https://libai.readthedocs.io/en/latest/tutorials/get_started/quick_run.html)\n  - [GPT](https://libai.readthedocs.io/en/latest/modules/libai.models.html#id5)\n  - [T5](https://libai.readthedocs.io/en/latest/modules/libai.models.html#id4)\n  - [VisionTransformer](https://libai.readthedocs.io/en/latest/modules/libai.models.html#id1)\n  - [SwinTransformer](https://libai.readthedocs.io/en/latest/modules/libai.models.html#id2)\n- [FlowVision(Toolbox for Computer Vision Datasets, SOTA Models and Utils)](https://github.com/Oneflow-Inc/vision)\n- [OneFlow-Models(Outdated)](https://github.com/Oneflow-Inc/models)\n  - [ResNet-50](https://github.com/Oneflow-Inc/models/tree/main/Vision/classification/image/resnet50)\n  - [Wide&Deep](https://github.com/Oneflow-Inc/models/tree/main/RecommenderSystems/wide_and_deep)\n- [OneFlow-Benchmark(Outdated)](https://github.com/Oneflow-Inc/OneFlow-Benchmark)\n\n## Communication\n\n- [GitHub issues](https://github.com/Oneflow-Inc/oneflow/issues): any install, bug, feature issues.\n- [www.oneflow.org](http://www.oneflow.org): brand related information.\n\n- ### 中文\n\n  - QQ 群: 331883\n  - 微信号（加好友入交流群）: OneFlowXZS\n  - [知乎](https://www.zhihu.com/org/oneflow-17)\n\n- ### International\n  - [Discord](https://discord.gg/4kpjGA5bZY)\n  - [Twitter](https://twitter.com/OneFlowNews)\n  - [LinkedIn](https://www.linkedin.com/company/oneflow-inc)\n  - [Medium](https://oneflow2020.medium.com)\n\n## The Team\n\nOneFlow was originally developed by [OneFlow Inc](http://www.oneflow.org) and [Zhejiang Lab](http://www.zhejianglab.com/).\n\n## License\n\n[Apache License 2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CC94:09ED:DFD88:3DE1CE:6AB92134"},"text_sha256":"1a5806e9f1f303dac5b669f34d9f1968b5ad019fb0cfb1a4857a4488a8444822"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"keras-team/autokeras","input_row":{"repository":"keras-team/autokeras","url":"https://github.com/keras-team/autokeras","name":"autokeras","owner":"keras-team","description":"AutoML library for deep learning","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9332,"issues":918,"created_at":"2017-11-19T23:18:20Z","updated_at":"2026-09-21T17:46:58Z","first_commit_at":"2017-11-19T23:18:21Z","last_commit_at":"2025-11-25T02:26:35Z","activity_months":96.159999999999997,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:15.792Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"keras-team/autokeras","visibility":"public","created_at":"2017-11-19T23:18:20Z","updated_at":"2026-09-21T17:46:58Z","private":false,"fork":false,"archived":false,"stargazers_count":9332,"open_issues_count":161,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3233","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:1794A2B:1BB45A4:6AB928EF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3232","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:17FC942:1C1C511:6AB928F0"},"commit":{"sha":"dcc67740c63eb5f906f026c3a0b8d2aec1b6fd8e","url":"https://github.com/keras-team/autokeras/commit/dcc67740c63eb5f906f026c3a0b8d2aec1b6fd8e","date":"2018-05-22T02:50:11Z","author_date":"2018-05-22T02:50:11Z","committer_date":"2018-05-22T02:50:11Z","tree_sha":"2fbc8019a59484674ab35fb602ab0f0617eeff89","message_first_line":"bug fixed"},"tree_request_status":200,"tree_rate":{"github_remaining":"3231","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CC:754BF:17B6A8F:1BD6739:6AB928F0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1088,"blob_sha":"b3db582011d36ad4bcd07b7568f93b2089bfc686","priority":0}],"documents":[{"path":"README.md","size":1088,"blob_sha":"b3db582011d36ad4bcd07b7568f93b2089bfc686","priority":0,"status":200,"text":"# Welcome to Auto-Keras\n\n[![Build Status](https://travis-ci.org/jhfjhfj1/autokeras.svg?branch=master)](https://travis-ci.org/jhfjhfj1/autokeras)\n[![Coverage Status](https://coveralls.io/repos/github/jhfjhfj1/autokeras/badge.svg?branch=master)](https://coveralls.io/github/jhfjhfj1/autokeras?branch=master)\n\nThis is a automated machine learning (AutoML) package based on Keras. \nIt aims at automatically search for the architecture and hyperparameters for deep learning models.\nThe ultimate goal for this project is for domain experts in fields other than computer science or machine learning\nto use deep learning models conveniently.\n\nHere is a short example for using the package.\n\n    \n    import autokeras as ak\n    \n    (x_train, y_train), (x_test, y_test) = mnist.load_data()\n    clf = ak.ImageClassifier()\n    clf.fit(x_train, y_train)\n    results = clf.predict(x_test)\n\nFor the repository on GitHub visit [Auto-Keras on GitHub](https://github.com/jhfjhfj1/autokeras).\n\n\n### About\n\nThis package is developed by [DATA LAB](http://faculty.cs.tamu.edu/xiahu/) at Texas A&M University.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"982C:3CC8A:1753B1:5C7EF9:6AB92135"},"text_sha256":"2262ceee5265b881ecb92470fe755d04366a155d4b969708618e62d1f57edc63"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3230","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092C:6E429:17CBC85:1BEB734:6AB928F1"},"commit":{"sha":"a2446cf16edcca48ba558d70ac5345e4f30c78e1","url":"https://github.com/keras-team/autokeras/commit/a2446cf16edcca48ba558d70ac5345e4f30c78e1","date":"2025-11-25T02:26:35Z","author_date":"2025-11-25T02:26:35Z","committer_date":"2025-11-25T02:26:35Z","tree_sha":"866a5c8e465a1c82563db0be2118289f4c406990","message_first_line":"Merge pull request #1959 from pctablet505/fix-titanic-dataset-loading"},"tree_request_status":200,"tree_rate":{"github_remaining":"3229","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092F:E80A6:1791FBC:1BB1DB3:6AB928F1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4090,"blob_sha":"eddcce4369ae7b376c316a42381a5d6f56a3374e","priority":0}],"documents":[{"path":"README.md","size":4090,"blob_sha":"eddcce4369ae7b376c316a42381a5d6f56a3374e","priority":0,"status":200,"text":"<p align=\"center\">\n  <img width=\"500\" alt=\"logo\" src=\"https://autokeras.com/img/row_red.svg\"/>\n<\/p>\n\n[![](https://github.com/keras-team/autokeras/workflows/Tests/badge.svg)](https://github.com/keras-team/autokeras/actions?query=workflow%3ATests+branch%3Amaster)\n[![codecov](https://codecov.io/gh/keras-team/autokeras/branch/master/graph/badge.svg)](https://codecov.io/gh/keras-team/autokeras)\n[![PyPI version](https://badge.fury.io/py/autokeras.svg)](https://badge.fury.io/py/autokeras)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/keras-team/autokeras/issues)\n\nOfficial Website: [autokeras.com](https://autokeras.com)\n\n##\nAutoKeras: An AutoML system based on Keras.\nIt is developed by <a href=\"http://faculty.cs.tamu.edu/xiahu/index.html\" target=\"_blank\" rel=\"nofollow\">DATA Lab<\/a> at Texas A&M University.\nThe goal of AutoKeras is to make machine learning accessible to everyone.\n\n## Learning resources\n\n* A short example.\n\n```python\nimport autokeras as ak\n\nclf = ak.ImageClassifier()\nclf.fit(x_train, y_train)\nresults = clf.predict(x_test)\n```\n\n* [Official website tutorials](https://autokeras.com/tutorial/overview/).\n* The book of [*Automated Machine Learning in Action*](https://www.manning.com/books/automated-machine-learning-in-action?query=automated&utm_source=jin&utm_medium=affiliate&utm_campaign=affiliate&a_aid=jin).\n* The LiveProjects of [*Image Classification with AutoKeras*](https://www.manning.com/liveprojectseries/autokeras-ser).\n<p align=\"center\">\n<a href=\"https://www.manning.com/books/automated-machine-learning-in-action?query=automated&utm_source=jin&utm_medium=affiliate&utm_campaign=affiliate&a_aid=jin\"><img src=\"https://images.manning.com/360/480/resize/book/0/fc56aaf-b2ba-4ef4-85b3-4a31edbe8ecc/Song-AML-HI.png\" alt=\"drawing\" width=\"266\"/><\/a>\n&nbsp\n&nbsp\n<a href=\"https://www.manning.com/liveprojectseries/autokeras-ser\"><img src=\"https://images.manning.com/360/480/resize/liveProjectSeries/9/38c715a-0c8c-4f66-b440-83d29993877a/ImageClassificationwithAutoKeras.jpg\" alt=\"drawing\" width=\"250\"/><\/a>\n<\/p>\n\n\n## Installation\n\nTo install the package, please use the `pip` installation as follows:\n\n```shell\npip3 install autokeras\n```\n\nPlease follow the [installation guide](https://autokeras.com/install) for more details.\n\n**Note:** Currently, AutoKeras is only compatible with **Python >= 3.7** and **TensorFlow >= 2.8.0**.\n\n## Community\n\nAsk your questions on our [GitHub Discussions](https://github.com/keras-team/autokeras/discussions).\n\n## Contributing Code\n\nHere is how we manage our project.\n\nWe pick the critical issues to work on from [GitHub issues](https://github.com/keras-team/autokeras/issues).\nThey will be added to this [Project](https://github.com/keras-team/autokeras/projects/3).\nSome of the issues will then be added to the [milestones](https://github.com/keras-team/autokeras/milestones),\nwhich are used to plan for the releases.\n\nRefer to our [Contributing Guide](https://autokeras.com/contributing/) to learn the best practices.\n\nThank all the contributors!\n\n[![The contributors](https://autokeras.com/img/contributors.svg)](https://github.com/keras-team/autokeras/graphs/contributors)\n\n## Cite this work\n\nHaifeng Jin, François Chollet, Qingquan Song, and Xia Hu. \"AutoKeras: An AutoML Library for Deep Learning.\" *the Journal of machine Learning research* 6 (2023): 1-6. ([Download](http://jmlr.org/papers/v24/20-1355.html))\n\nBiblatex entry:\n\n```bibtex\n@article{JMLR:v24:20-1355,\n  author  = {Haifeng Jin and François Chollet and Qingquan Song and Xia Hu},\n  title   = {AutoKeras: An AutoML Library for Deep Learning},\n  journal = {Journal of Machine Learning Research},\n  year    = {2023},\n  volume  = {24},\n  number  = {6},\n  pages   = {1--6},\n  url     = {http://jmlr.org/papers/v24/20-1355.html}\n}\n```\n\n## Acknowledgements\n\nThe authors gratefully acknowledge the D3M program of the Defense Advanced Research Projects Agency (DARPA) administered through AFRL contract FA8750-17-2-0116; the Texas A&M College of Engineering, and Texas A&M University.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F96E:11316A:176EDD:5C98CA:6AB92137"},"text_sha256":"ad87497e47ee96cacd215e9f858be80558a7868c3d710ca37a4b4b5dec47a95a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Hvass-Labs/TensorFlow-Tutorials","input_row":{"repository":"Hvass-Labs/TensorFlow-Tutorials","url":"https://github.com/Hvass-Labs/TensorFlow-Tutorials","name":"TensorFlow-Tutorials","owner":"Hvass-Labs","description":"TensorFlow Tutorials with YouTube Videos","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9265,"issues":110,"created_at":"2016-06-26T14:43:21Z","updated_at":"2026-09-27T12:32:37Z","first_commit_at":"2016-06-26T14:43:21Z","last_commit_at":"2020-04-12T13:17:48Z","activity_months":45.530000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:18.395Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Hvass-Labs/TensorFlow-Tutorials","visibility":"public","created_at":"2016-06-26T14:43:21Z","updated_at":"2026-09-27T12:32:37Z","private":false,"fork":false,"archived":false,"stargazers_count":9265,"open_issues_count":1,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3228","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:17DBFCC:1BFBE14:6AB928F2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3227","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:176EB5A:1B8E7B8:6AB928F2"},"commit":{"sha":"5e5266b13d7b1bdfdef19a4bf8d8a0458817bdf4","url":"https://github.com/Hvass-Labs/TensorFlow-Tutorials/commit/5e5266b13d7b1bdfdef19a4bf8d8a0458817bdf4","date":"2018-04-13T06:12:58Z","author_date":"2018-04-13T06:12:58Z","committer_date":"2018-04-13T06:12:58Z","tree_sha":"30442a96c3376267982cf7f5616daece79b0ce83","message_first_line":"Updated github issue-template."},"tree_request_status":200,"tree_rate":{"github_remaining":"3226","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DB:35D5A8:17BB09A:1BDADFD:6AB928F3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8299,"blob_sha":"43ac0b4411da8f8db648fa63546017ba2dbf9bfb","priority":0}],"documents":[{"path":"README.md","size":8299,"blob_sha":"43ac0b4411da8f8db648fa63546017ba2dbf9bfb","priority":0,"status":200,"text":"# TensorFlow Tutorials\n\n[Original repository on GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials)\n\nOriginal author is [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org)\n\n## Introduction\n\n* These tutorials are intended for beginners in Deep Learning and TensorFlow.\n* Each tutorial covers a single topic.\n* The source-code is well-documented.\n* There is a [YouTube video](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ) for each tutorial.\n\n## Tutorials\n\n1. Simple Linear Model ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb))\n\n2. Convolutional Neural Network ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb))\n\n3. Pretty Tensor ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03_PrettyTensor.ipynb))\n\n3-B. Layers API ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03B_Layers_API.ipynb))\n\n3-C. Keras API ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03C_Keras_API.ipynb))\n\n4. Save & Restore ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/04_Save_Restore.ipynb))\n\n5. Ensemble Learning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/05_Ensemble_Learning.ipynb))\n\n6. CIFAR-10 ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb))\n\n7. Inception Model ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb))\n\n8. Transfer Learning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb))\n\n9. Video Data ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/09_Video_Data.ipynb))\n\n10. Fine-Tuning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/10_Fine-Tuning.ipynb))\n\n11. Adversarial Examples ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/11_Adversarial_Examples.ipynb))\n\n12. Adversarial Noise for MNIST ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/12_Adversarial_Noise_MNIST.ipynb))\n\n13. Visual Analysis ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13_Visual_Analysis.ipynb))\n\n13-B. Visual Analysis for MNIST ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13B_Visual_Analysis_MNIST.ipynb))\n\n14. DeepDream ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/14_DeepDream.ipynb))\n\n15. Style Transfer ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/15_Style_Transfer.ipynb))\n\n16. Reinforcement Learning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/16_Reinforcement_Learning.ipynb))\n\n17. Estimator API ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/17_Estimator_API.ipynb))\n\n18. TFRecords & Dataset API ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/18_TFRecords_Dataset_API.ipynb)) \n\n19. Hyper-Parameter Optimization ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/19_Hyper-Parameters.ipynb)) \n\n20. Natural Language Processing ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/20_Natural_Language_Processing.ipynb)) \n\n21. Machine Translation ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb))\n\n22. Image Captioning ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/22_Image_Captioning.ipynb))\n\n23. Time-Series Prediction ([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb))\n\n## Videos\n\nThese tutorials are also available as [YouTube videos](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ).\n\n## Translations\n\nThese tutorials have been translated to the following languages:\n\n* [Chinese](https://github.com/thrillerist/TensorFlow-Tutorials)\n\nYou can help by translating the remaining tutorials or reviewing the ones that have already been translated. You can also help by translating to other languages.\n\n## Forks\n\nSee the [selected list of forks](forks.md) for community modifications to these tutorials.\n\n## Downloading\n\nSome of the Python Notebooks use source-code located in different files to allow for easy re-use\nacross multiple tutorials. It is therefore recommended that you download the whole repository\nfrom GitHub, instead of just downloading the individual Python Notebooks.\n\n### Git\n\nThe easiest way to download and install these tutorials is by using git from the command-line:\n\n    git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git\n\nThis will create the directory `TensorFlow-Tutorials` and download all the files to it.\n\nThis also makes it easy to update the tutorials, simply by executing this command inside that directory:\n\n    git pull\n\n### Zip-File\n\nYou can also [download](https://github.com/Hvass-Labs/TensorFlow-Tutorials/archive/master.zip)\nthe contents of the GitHub repository as a Zip-file and extract it manually.\n\n## Installation\n\nThere are different ways of installing and running TensorFlow. This section describes how I did it\nfor these tutorials. You may want to do it differently and you can search the internet for instructions.\n\nIf you are new to using Python and Linux, etc. then this may be challenging\nto get working and you may need to do internet searches for error-messages, etc.\nIt will get easier with practice.\n\n### Python Version 3.5 or Later\n\nThese tutorials were developed on Linux using **Python 3.5 / 3.6** (the [Anaconda](https://www.continuum.io/downloads) distribution) and [PyCharm](https://www.jetbrains.com/pycharm/).\n\nThere are reports that Python 2.7 gives error messages with these tutorials. Please make sure you are using **Python 3.5** or later!\n\n### Environment\n\nAfter installing [Anaconda](https://www.continuum.io/downloads), you should create a [conda environment](http://conda.pydata.org/docs/using/envs.html)\nso you do not destroy your main installation in case you make a mistake somewhere:\n\n    conda create --name tf python=3\n\nNow you can switch to the new environment by running the following (on Linux):\n\n    source activate tf\n\n### Required Packages\n\nThe tutorials require several Python packages to be installed. The packages are listed in\n[requirements.txt](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/requirements.txt)\nFirst you need to edit this file and select whether you want to install the CPU or GPU\nversion of TensorFlow.\n\nTo install the required Python packages and dependencies you first have to activate the\nconda-environment as described above, and then you run the following command\nin a terminal:\n\n    pip install -r requirements.txt\n\nNote that the GPU-version of TensorFlow also requires the installation of various\nNVIDIA drivers, which is not described here.\n\n### Testing\n\nYou should now be able to run the tutorials in the Python Notebooks:\n\n    cd ~/development/TensorFlow-Tutorials/  # Your installation directory.\n    jupyter notebook\n\nThis should start a web-browser that shows the list of tutorials. Click on a tutorial to load it.\n\n## Older Versions\n\nSometimes the source-code has changed from that shown in the YouTube videos. This may be due to\nbug-fixes, improvements, or because code-sections are moved to separate files for easy re-use.\n\nIf you want to see the exact versions of the source-code that were used in the YouTube videos,\nthen you can [browse the history](https://github.com/Hvass-Labs/TensorFlow-Tutorials/commits/master)\nof commits to the GitHub repository.\n\n## License (MIT)\n\nThese tutorials and source-code are published under the [MIT License](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/LICENSE)\nwhich allows very broad use for both academic and commercial purposes.\n\nA few of the images used for demonstration purposes may be under copyright. These images are included under the \"fair usage\" laws.\n\nYou are very welcome to modify these tutorials and use them in your own projects.\nPlease keep a link to the [original repository](https://github.com/Hvass-Labs/TensorFlow-Tutorials).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F078:7A4F8:17C342:5CEEE7:6AB92137"},"text_sha256":"35ef806d7e7ef7406b0c491943f9f56a874517cef053f8899d76fde1df724ba0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3225","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:176EBE8:1B8E871:6AB928F4"},"commit":{"sha":"d5f33973570fe6ef9c78c8a38c7449a932c81010","url":"https://github.com/Hvass-Labs/TensorFlow-Tutorials/commit/d5f33973570fe6ef9c78c8a38c7449a932c81010","date":"2020-04-12T13:17:48Z","author_date":"2020-04-12T13:17:48Z","committer_date":"2020-04-12T13:17:48Z","tree_sha":"5f647db459ff91ed8c355675f36d929f61ea7649","message_first_line":"weather.py tiny fix for new Pandas version"},"tree_request_status":200,"tree_rate":{"github_remaining":"3224","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:17D90EB:1BF7AAA:6AB928F4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14209,"blob_sha":"d09884ec4c49b70f1612a17d5b4e5c6f627bd061","priority":0}],"documents":[{"path":"README.md","size":14209,"blob_sha":"d09884ec4c49b70f1612a17d5b4e5c6f627bd061","priority":0,"status":200,"text":"# TensorFlow Tutorials\n\n[Original repository on GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials)\n\nOriginal author is [Magnus Erik Hvass Pedersen](http://www.hvass-labs.org)\n\n## Introduction\n\n* These tutorials are intended for beginners in Deep Learning and TensorFlow.\n* Each tutorial covers a single topic.\n* The source-code is well-documented.\n* There is a [YouTube video](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ) for each tutorial.\n\n## Tutorials for TensorFlow 2\n\nThe following tutorials have been updated and work with **TensorFlow 2**\n(some of them run in \"v.1 compatibility mode\").\n\n1. Simple Linear Model\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/01_Simple_Linear_Model.ipynb))\n\n2. Convolutional Neural Network\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb))\n\n3-C. Keras API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03C_Keras_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03C_Keras_API.ipynb))\n\n10. Fine-Tuning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/10_Fine-Tuning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/10_Fine-Tuning.ipynb))\n\n13-B. Visual Analysis for MNIST\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13B_Visual_Analysis_MNIST.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/13B_Visual_Analysis_MNIST.ipynb))\n\n16. Reinforcement Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/16_Reinforcement_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/16_Reinforcement_Learning.ipynb))\n\n19. Hyper-Parameter Optimization\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/19_Hyper-Parameters.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/19_Hyper-Parameters.ipynb))\n\n20. Natural Language Processing\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/20_Natural_Language_Processing.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/20_Natural_Language_Processing.ipynb))\n\n21. Machine Translation\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/21_Machine_Translation.ipynb))\n\n22. Image Captioning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/22_Image_Captioning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/22_Image_Captioning.ipynb))\n\n23. Time-Series Prediction\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb))\n\n## Tutorials for TensorFlow 1\n\nThe following tutorials only work with the older **TensorFlow 1** API, so you\nwould need to install an older version of TensorFlow to run these. It would take\ntoo much time and effort to convert these tutorials to TensorFlow 2.\n\n3. Pretty Tensor\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03_PrettyTensor.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03_PrettyTensor.ipynb))\n\n3-B. Layers API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/03B_Layers_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/03B_Layers_API.ipynb))\n\n4. Save & Restore\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/04_Save_Restore.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/04_Save_Restore.ipynb))\n\n5. Ensemble Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/05_Ensemble_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/05_Ensemble_Learning.ipynb))\n\n6. CIFAR-10\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/06_CIFAR-10.ipynb))\n\n7. Inception Model\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/07_Inception_Model.ipynb))\n\n8. Transfer Learning\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/08_Transfer_Learning.ipynb))\n\n9. Video Data\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/09_Video_Data.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/09_Video_Data.ipynb))\n\n11. Adversarial Examples\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/11_Adversarial_Examples.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/11_Adversarial_Examples.ipynb))\n\n12. Adversarial Noise for MNIST\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/12_Adversarial_Noise_MNIST.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/12_Adversarial_Noise_MNIST.ipynb))\n\n13. Visual Analysis\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/13_Visual_Analysis.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/13_Visual_Analysis.ipynb))\n\n14. DeepDream\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/14_DeepDream.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/14_DeepDream.ipynb))\n\n15. Style Transfer\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/15_Style_Transfer.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/15_Style_Transfer.ipynb))\n\n17. Estimator API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/17_Estimator_API.ipynb))\n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/17_Estimator_API.ipynb))\n\n18. TFRecords & Dataset API\n([Notebook](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/18_TFRecords_Dataset_API.ipynb)) \n([Google Colab](https://colab.research.google.com/github/Hvass-Labs/TensorFlow-Tutorials/blob/master/18_TFRecords_Dataset_API.ipynb))\n\n## Videos\n\nThese tutorials are also available as [YouTube videos](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ).\n\n## Translations\n\nThese tutorials have been translated to the following languages:\n\n* [Chinese](https://github.com/Hvass-Labs/TensorFlow-Tutorials-Chinese)\n\n### New Translations\n\nYou can help by translating the remaining tutorials or reviewing the ones that have already been translated. You can also help by translating to other languages.\n\nIt is a very big job to translate all the tutorials, so you should just start with Tutorials #01, #02 and #03-C which are the most important for beginners.\n\n### New Videos\n\nYou are also very welcome to record your own YouTube videos in other languages. It is strongly recommended that you get a decent microphone because good sound quality is very important. I used `vokoscreen` for recording the videos and the free [DaVinci Resolve](https://www.blackmagicdesign.com/products/davinciresolve/) for editing the videos.\n\n## Forks\n\nSee the [selected list of forks](forks.md) for community modifications to these tutorials.\n\n## Installation\n\nThere are different ways of installing and running TensorFlow. This section describes how I did it\nfor these tutorials. You may want to do it differently and you can search the internet for instructions.\n\nIf you are new to using Python and Linux then this may be challenging\nto get working and you may need to do internet searches for error-messages, etc.\nIt will get easier with practice. You can also run the tutorials without installing\nanything by using Google Colab, see further below.\n\nSome of the Python Notebooks use source-code located in different files to allow for easy re-use\nacross multiple tutorials. It is therefore recommended that you download the whole repository\nfrom GitHub, instead of just downloading the individual Python Notebooks.\n\n### Git\n\nThe easiest way to download and install these tutorials is by using git from the command-line:\n\n    git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git\n\nThis will create the directory `TensorFlow-Tutorials` and download all the files to it.\n\nThis also makes it easy to update the tutorials, simply by executing this command inside that directory:\n\n    git pull\n\n### Download Zip-File\n\nYou can also [download](https://github.com/Hvass-Labs/TensorFlow-Tutorials/archive/master.zip)\nthe contents of the GitHub repository as a Zip-file and extract it manually.\n\n### Environment\n\nI use [Anaconda](https://www.continuum.io/downloads) because it comes with many Python\npackages already installed and it is easy to work with. After installing Anaconda,\nyou should create a [conda environment](http://conda.pydata.org/docs/using/envs.html)\nso you do not destroy your main installation in case you make a mistake somewhere:\n\n    conda create --name tf python=3\n\nWhen Python gets updated to a new version, it takes a while before TensorFlow also\nuses the new Python version. So if the TensorFlow installation fails, then you may\nhave to specify an older Python version for your new environment, such as: \n\n    conda create --name tf python=3.6\n\nNow you can switch to the new environment by running the following (on Linux):\n\n    source activate tf\n\n### Required Packages\n\nThe tutorials require several Python packages to be installed. The packages are listed in\n[requirements.txt](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/requirements.txt)\n\nTo install the required Python packages and dependencies you first have to activate the\nconda-environment as described above, and then you run the following command\nin a terminal:\n\n    pip install -r requirements.txt\n\nStarting with TensorFlow 2.1 it includes both the CPU and GPU versions and will\nautomatically switch if you have a GPU. But this requires the installation of various\nNVIDIA drivers, which is a bit complicated and is not described here.\n\n### Python Version 3.5 or Later\n\nThese tutorials were developed on Linux using **Python 3.5 / 3.6** (the [Anaconda](https://www.continuum.io/downloads) distribution) and [PyCharm](https://www.jetbrains.com/pycharm/).\n\nThere are reports that Python 2.7 gives error messages with these tutorials. Please make sure you are using **Python 3.5** or later!\n\n## How To Run\n\nIf you have followed the above installation instructions, you should\nnow be able to run the tutorials in the Python Notebooks:\n\n    cd ~/development/TensorFlow-Tutorials/  # Your installation directory.\n    jupyter notebook\n\nThis should start a web-browser that shows the list of tutorials. Click on a tutorial to load it.\n\n### Run in Google Colab\n\nIf you do not want to install anything on your own computer, then the Notebooks\ncan be viewed, edited and run entirely on the internet by using\n[Google Colab](https://colab.research.google.com). There is a\n[YouTube video](https://www.youtube.com/watch?v=Hs6HI2YWchM) explaining how to do this.\nYou click the \"Google Colab\"-link next to each tutorial listed above.\nYou can view the Notebook on Colab but in order to run it you need to login using\nyour Google account.\nThen you need to execute the following commands at the top of the Notebook,\nwhich clones the contents of this repository to your work-directory on Colab.\n\n    # Clone the repository from GitHub to Google Colab's temporary drive.\n    import os\n    work_dir = \"/content/TensorFlow-Tutorials/\"\n    if not os.path.exists(work_dir):\n        !git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git\n    os.chdir(work_dir)\n\nAll required packages should already be installed on Colab, otherwise you\ncan run the following command:\n\n    !pip install -r requirements.txt\n\n## Older Versions\n\nSometimes the source-code has changed from that shown in the YouTube videos. This may be due to\nbug-fixes, improvements, or because code-sections are moved to separate files for easy re-use.\n\nIf you want to see the exact versions of the source-code that were used in the YouTube videos,\nthen you can [browse the history](https://github.com/Hvass-Labs/TensorFlow-Tutorials/commits/master)\nof commits to the GitHub repository.\n\n## License (MIT)\n\nThese tutorials and source-code are published under the [MIT License](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/LICENSE)\nwhich allows very broad use for both academic and commercial purposes.\n\nA few of the images used for demonstration purposes may be under copyright. These images are included under the \"fair usage\" laws.\n\nYou are very welcome to modify these tutorials and use them in your own projects.\nPlease keep a link to the [original repository](https://github.com/Hvass-Labs/TensorFlow-Tutorials).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2DE:2C474:179E9F:5CC9D2:6AB92136"},"text_sha256":"e25252e6c4561b9fc8a05e406bd7dede7d4a375f516dff96c33d7ec50a23ac0a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"eriklindernoren/Keras-GAN","input_row":{"repository":"eriklindernoren/Keras-GAN","url":"https://github.com/eriklindernoren/Keras-GAN","name":"Keras-GAN","owner":"eriklindernoren","description":"Keras implementations of Generative Adversarial Networks.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9205,"issues":228,"created_at":"2017-07-11T16:24:53Z","updated_at":"2026-09-26T05:25:07Z","first_commit_at":"2017-07-11T16:24:54Z","last_commit_at":"2021-01-06T16:32:52Z","activity_months":41.890000000000001,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:21.275Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"eriklindernoren/Keras-GAN","visibility":"public","created_at":"2017-07-11T16:24:53Z","updated_at":"2026-09-26T05:25:07Z","private":false,"fork":false,"archived":false,"stargazers_count":9205,"open_issues_count":147,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3223","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:17FA7FE:1C1A0E9:6AB928F5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3222","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:178456A:1BA2DDA:6AB928F5"},"commit":{"sha":"d343584b6024fc119170cb7415522727a9ef0be6","url":"https://github.com/eriklindernoren/Keras-GAN/commit/d343584b6024fc119170cb7415522727a9ef0be6","date":"2018-05-19T17:43:39Z","author_date":"2018-05-19T17:43:39Z","committer_date":"2018-05-19T17:43:39Z","tree_sha":"681140411602ba5bc1a6077c5bd946dd6793411e","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3221","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:17DC1EE:1BFC0CA:6AB928F6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8672,"blob_sha":"8b1ec1e5ff2574298e3370f40da560f2d13e7531","priority":0}],"documents":[{"path":"README.md","size":8672,"blob_sha":"8b1ec1e5ff2574298e3370f40da560f2d13e7531","priority":0,"status":200,"text":"<p align=\"center\">\n    <img src=\"assets/keras_gan.png\" width=\"480\"\\>\n<\/p>\n\n## Keras-GAN\nCollection of Keras implementations of Generative Adversarial Networks (GANs) suggested in research papers. These models are in some cases simplified versions of the ones ultimately described in the papers, but I have chosen to focus on getting the core ideas covered instead of getting every layer configuration right. Contributions and suggestions of GAN varieties to implement are very welcomed.\n\n<b>See also:<\/b> [PyTorch-GAN](https://github.com/eriklindernoren/PyTorch-GAN)\n\n## Table of Contents\n  * [Installation](#installation)\n  * [Implementations](#implementations)\n    + [Auxiliary Classifier GAN](#ac-gan)\n    + [Adversarial Autoencoder](#adversarial-autoencoder)\n    + [Bidirectional GAN](#bigan)\n    + [Boundary-Seeking GAN](#bgan)\n    + [Conditional GAN](#cgan)\n    + [Context-Conditional GAN](#cc-gan)\n    + [Context Encoder](#context-encoder)\n    + [Coupled GANs](#cogan)\n    + [CycleGAN](#cyclegan)\n    + [Deep Convolutional GAN](#dcgan)\n    + [DiscoGAN](#discogan)\n    + [DualGAN](#dualgan)\n    + [Generative Adversarial Network](#gan)\n    + [InfoGAN](#infogan)\n    + [LSGAN](#lsgan)\n    + [Pix2Pix](#pix2pix)\n    + [PixelDA](#pixelda)\n    + [Semi-Supervised GAN](#sgan)\n    + [Super-Resolution GAN](#srgan)\n    + [Wasserstein GAN](#wgan)\n    + [Wasserstein GAN GP](#wgan-gp)     \n\n## Installation\n    $ git clone https://github.com/eriklindernoren/Keras-GAN\n    $ cd Keras-GAN/\n    $ sudo pip3 install -r requirements.txt\n\n## Implementations   \n### AC-GAN\nImplementation of _Auxiliary Classifier Generative Adversarial Network_.\n\n[Code](acgan/acgan.py)\n\nPaper: https://arxiv.org/abs/1610.09585\n\n#### Example\n```\n$ cd acgan/\n$ python3 acgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/acgan.gif\" width=\"640\"\\>\n<\/p>\n\n### Adversarial Autoencoder\nImplementation of _Adversarial Autoencoder_.\n\n[Code](aae/aae.py)\n\nPaper: https://arxiv.org/abs/1511.05644\n\n#### Example\n```\n$ cd aae/\n$ python3 aae.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/aae.png\" width=\"640\"\\>\n<\/p>\n\n### BiGAN\nImplementation of _Bidirectional Generative Adversarial Network_.\n\n[Code](bigan/bigan.py)\n\nPaper: https://arxiv.org/abs/1605.09782\n\n#### Example\n```\n$ cd bigan/\n$ python3 bigan.py\n```\n\n### BGAN\nImplementation of _Boundary-Seeking Generative Adversarial Networks_.\n\n[Code](bgan/bgan.py)\n\nPaper: https://arxiv.org/abs/1702.08431\n\n#### Example\n```\n$ cd bgan/\n$ python3 bgan.py\n```\n\n### CC-GAN\nImplementation of _Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks_.\n\n[Code](ccgan/ccgan.py)\n\nPaper: https://arxiv.org/abs/1611.06430\n\n#### Example\n```\n$ cd ccgan/\n$ python3 ccgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/ccgan.png\" width=\"640\"\\>\n<\/p>\n\n### CGAN\nImplementation of _Conditional Generative Adversarial Nets_.\n\n[Code](cgan/cgan.py)\n\nPaper:https://arxiv.org/abs/1411.1784\n\n#### Example\n```\n$ cd cgan/\n$ python3 cgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cgan.gif\" width=\"640\"\\>\n<\/p>\n\n### Context Encoder\nImplementation of _Context Encoders: Feature Learning by Inpainting_.\n\n[Code](context_encoder/context_encoder.py)\n\nPaper: https://arxiv.org/abs/1604.07379\n\n#### Example\n```\n$ cd context_encoder/\n$ python3 context_encoder.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/context_encoder.png\" width=\"640\"\\>\n<\/p>\n\n### CoGAN\nImplementation of _Coupled generative adversarial networks_.\n\n[Code](cogan/cogan.py)\n\nPaper: https://arxiv.org/abs/1606.07536\n\n#### Example\n```\n$ cd cogan/\n$ python3 cogan.py\n```\n\n### CycleGAN\nImplementation of _Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks_.\n\n[Code](cyclegan/cyclegan.py)\n\nPaper: https://arxiv.org/abs/1703.10593\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cyclegan.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd cyclegan/\n$ bash download_dataset.sh apple2orange\n$ python3 cyclegan.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cyclegan_gif.gif\" width=\"640\"\\>\n<\/p>\n\n\n### DCGAN\nImplementation of _Deep Convolutional Generative Adversarial Network_.\n\n[Code](dcgan/dcgan.py)\n\nPaper: https://arxiv.org/abs/1511.06434\n\n#### Example\n```\n$ cd dcgan/\n$ python3 dcgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/dcgan2.png\" width=\"640\"\\>\n<\/p>\n\n### DiscoGAN\nImplementation of _Learning to Discover Cross-Domain Relations with Generative Adversarial Networks_.\n\n[Code](discogan/discogan.py)\n\nPaper: https://arxiv.org/abs/1703.05192\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/discogan_architecture.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd discogan/\n$ bash download_dataset.sh edges2shoes\n$ python3 discogan.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/discogan.png\" width=\"640\"\\>\n<\/p>\n\n### DualGAN\nImplementation of _DualGAN: Unsupervised Dual Learning for Image-to-Image Translation_.\n\n[Code](dualgan/dualgan.py)\n\nPaper: https://arxiv.org/abs/1704.02510\n\n#### Example\n```\n$ cd dualgan/\n$ python3 dualgan.py\n```\n\n### GAN\nImplementation of _Generative Adversarial Network_ with a MLP generator and discriminator.\n\n[Code](gan/gan.py)\n\nPaper: https://arxiv.org/abs/1406.2661\n\n#### Example\n```\n$ cd gan/\n$ python3 gan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/gan_mnist5.gif\" width=\"640\"\\>\n<\/p>\n\n### InfoGAN\nImplementation of _InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets_.\n\n[Code](infogan/infogan.py)\n\nPaper: https://arxiv.org/abs/1606.03657\n\n#### Example\n```\n$ cd infogan/\n$ python3 infogan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/infogan.png\" width=\"640\"\\>\n<\/p>\n\n### LSGAN\nImplementation of _Least Squares Generative Adversarial Networks_.\n\n[Code](lsgan/lsgan.py)\n\nPaper: https://arxiv.org/abs/1611.04076\n\n#### Example\n```\n$ cd lsgan/\n$ python3 lsgan.py\n```\n\n### Pix2Pix\nImplementation of _Image-to-Image Translation with Conditional Adversarial Networks_.\n\n[Code](pix2pix/pix2pix.py)\n\nPaper: https://arxiv.org/abs/1611.07004\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/pix2pix_architecture.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd pix2pix/\n$ bash download_dataset.sh facades\n$ python3 pix2pix.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/pix2pix2.png\" width=\"640\"\\>\n<\/p>\n\n### PixelDA\nImplementation of _Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks_.\n\n[Code](pixelda/pixelda.py)\n\nPaper: https://arxiv.org/abs/1612.05424\n\n#### MNIST to MNIST-M Classification\nTrains a classifier on MNIST images that are translated to resemble MNIST-M (by performing unsupervised image-to-image domain adaptation). This model is compared to the naive solution of training a classifier on MNIST and evaluating it on MNIST-M. The naive model manages a 55% classification accuracy on MNIST-M while the one trained during domain adaptation gets a 95% classification accuracy.\n\n```\n$ cd pixelda/\n$ python3 pixelda.py\n```\n\n| Method       | Accuracy  |\n| ------------ |:---------:|\n| Naive        | 55%       |\n| PixelDA      | 95%       |\n\n### SGAN\nImplementation of _Semi-Supervised Generative Adversarial Network_.\n\n[Code](sgan/sgan.py)\n\nPaper: https://arxiv.org/abs/1606.01583\n\n#### Example\n```\n$ cd sgan/\n$ python3 sgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/sgan.png\" width=\"640\"\\>\n<\/p>\n\n### SRGAN\nImplementation of _Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network_.\n\n[Code](srgan/srgan.py)\n\nPaper: https://arxiv.org/abs/1609.04802\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/superresgan.png\" width=\"640\"\\>\n<\/p>\n\n\n#### Example\n```\n$ cd srgan/\n<follow steps at the top of srgan.py>\n$ python3 srgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/srgan.png\" width=\"640\"\\>\n<\/p>\n\n### WGAN\nImplementation of _Wasserstein GAN_ (with DCGAN generator and discriminator).\n\n[Code](wgan/wgan.py)\n\nPaper: https://arxiv.org/abs/1701.07875\n\n#### Example\n```\n$ cd wgan/\n$ python3 wgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/wgan2.png\" width=\"640\"\\>\n<\/p>\n\n### WGAN GP\nImplementation of _Improved Training of Wasserstein GANs_.\n\n[Code](wgan_gp/wgan_gp.py)\n\nPaper: https://arxiv.org/abs/1704.00028\n\n#### Example\n```\n$ cd wgan_gp/\n$ python3 wgan_gp.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/imp_wgan.gif\" width=\"640\"\\>\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E06:2B291E:17D92E:5D0517:6AB9213B"},"text_sha256":"48b6c44c2d824133508f82d3d7b9304c7ace9c09c2a776c3eff3652aeceb8dd0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3220","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:177B944:1B9A114:6AB928F6"},"commit":{"sha":"3ff3be4b4b2fa338b18e469888b6f0b7a1b2db48","url":"https://github.com/eriklindernoren/Keras-GAN/commit/3ff3be4b4b2fa338b18e469888b6f0b7a1b2db48","date":"2021-01-06T16:32:52Z","author_date":"2021-01-06T16:32:52Z","committer_date":"2021-01-06T16:32:52Z","tree_sha":"925e16b43d3b067f7af3276eca4e582421954c7c","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3219","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17D1DA2:1BF1B66:6AB928F7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8889,"blob_sha":"0cf39042fc6290219550e24b4faf57e9318c76e4","priority":0}],"documents":[{"path":"README.md","size":8889,"blob_sha":"0cf39042fc6290219550e24b4faf57e9318c76e4","priority":0,"status":200,"text":"<p align=\"center\">\n    <img src=\"assets/keras_gan.png\" width=\"480\"\\>\n<\/p>\n\n**This repository has gone stale as I unfortunately do not have the time to maintain it anymore. If you would like to continue the development of it as a collaborator send me an email at eriklindernoren@gmail.com.**\n\n## Keras-GAN\nCollection of Keras implementations of Generative Adversarial Networks (GANs) suggested in research papers. These models are in some cases simplified versions of the ones ultimately described in the papers, but I have chosen to focus on getting the core ideas covered instead of getting every layer configuration right. Contributions and suggestions of GAN varieties to implement are very welcomed.\n\n<b>See also:<\/b> [PyTorch-GAN](https://github.com/eriklindernoren/PyTorch-GAN)\n\n## Table of Contents\n  * [Installation](#installation)\n  * [Implementations](#implementations)\n    + [Auxiliary Classifier GAN](#ac-gan)\n    + [Adversarial Autoencoder](#adversarial-autoencoder)\n    + [Bidirectional GAN](#bigan)\n    + [Boundary-Seeking GAN](#bgan)\n    + [Conditional GAN](#cgan)\n    + [Context-Conditional GAN](#cc-gan)\n    + [Context Encoder](#context-encoder)\n    + [Coupled GANs](#cogan)\n    + [CycleGAN](#cyclegan)\n    + [Deep Convolutional GAN](#dcgan)\n    + [DiscoGAN](#discogan)\n    + [DualGAN](#dualgan)\n    + [Generative Adversarial Network](#gan)\n    + [InfoGAN](#infogan)\n    + [LSGAN](#lsgan)\n    + [Pix2Pix](#pix2pix)\n    + [PixelDA](#pixelda)\n    + [Semi-Supervised GAN](#sgan)\n    + [Super-Resolution GAN](#srgan)\n    + [Wasserstein GAN](#wgan)\n    + [Wasserstein GAN GP](#wgan-gp)     \n\n## Installation\n    $ git clone https://github.com/eriklindernoren/Keras-GAN\n    $ cd Keras-GAN/\n    $ sudo pip3 install -r requirements.txt\n\n## Implementations   \n### AC-GAN\nImplementation of _Auxiliary Classifier Generative Adversarial Network_.\n\n[Code](acgan/acgan.py)\n\nPaper: https://arxiv.org/abs/1610.09585\n\n#### Example\n```\n$ cd acgan/\n$ python3 acgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/acgan.gif\" width=\"640\"\\>\n<\/p>\n\n### Adversarial Autoencoder\nImplementation of _Adversarial Autoencoder_.\n\n[Code](aae/aae.py)\n\nPaper: https://arxiv.org/abs/1511.05644\n\n#### Example\n```\n$ cd aae/\n$ python3 aae.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/aae.png\" width=\"640\"\\>\n<\/p>\n\n### BiGAN\nImplementation of _Bidirectional Generative Adversarial Network_.\n\n[Code](bigan/bigan.py)\n\nPaper: https://arxiv.org/abs/1605.09782\n\n#### Example\n```\n$ cd bigan/\n$ python3 bigan.py\n```\n\n### BGAN\nImplementation of _Boundary-Seeking Generative Adversarial Networks_.\n\n[Code](bgan/bgan.py)\n\nPaper: https://arxiv.org/abs/1702.08431\n\n#### Example\n```\n$ cd bgan/\n$ python3 bgan.py\n```\n\n### CC-GAN\nImplementation of _Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks_.\n\n[Code](ccgan/ccgan.py)\n\nPaper: https://arxiv.org/abs/1611.06430\n\n#### Example\n```\n$ cd ccgan/\n$ python3 ccgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/ccgan.png\" width=\"640\"\\>\n<\/p>\n\n### CGAN\nImplementation of _Conditional Generative Adversarial Nets_.\n\n[Code](cgan/cgan.py)\n\nPaper:https://arxiv.org/abs/1411.1784\n\n#### Example\n```\n$ cd cgan/\n$ python3 cgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cgan.gif\" width=\"640\"\\>\n<\/p>\n\n### Context Encoder\nImplementation of _Context Encoders: Feature Learning by Inpainting_.\n\n[Code](context_encoder/context_encoder.py)\n\nPaper: https://arxiv.org/abs/1604.07379\n\n#### Example\n```\n$ cd context_encoder/\n$ python3 context_encoder.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/context_encoder.png\" width=\"640\"\\>\n<\/p>\n\n### CoGAN\nImplementation of _Coupled generative adversarial networks_.\n\n[Code](cogan/cogan.py)\n\nPaper: https://arxiv.org/abs/1606.07536\n\n#### Example\n```\n$ cd cogan/\n$ python3 cogan.py\n```\n\n### CycleGAN\nImplementation of _Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks_.\n\n[Code](cyclegan/cyclegan.py)\n\nPaper: https://arxiv.org/abs/1703.10593\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cyclegan.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd cyclegan/\n$ bash download_dataset.sh apple2orange\n$ python3 cyclegan.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/cyclegan_gif.gif\" width=\"640\"\\>\n<\/p>\n\n\n### DCGAN\nImplementation of _Deep Convolutional Generative Adversarial Network_.\n\n[Code](dcgan/dcgan.py)\n\nPaper: https://arxiv.org/abs/1511.06434\n\n#### Example\n```\n$ cd dcgan/\n$ python3 dcgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/dcgan2.png\" width=\"640\"\\>\n<\/p>\n\n### DiscoGAN\nImplementation of _Learning to Discover Cross-Domain Relations with Generative Adversarial Networks_.\n\n[Code](discogan/discogan.py)\n\nPaper: https://arxiv.org/abs/1703.05192\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/discogan_architecture.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd discogan/\n$ bash download_dataset.sh edges2shoes\n$ python3 discogan.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/discogan.png\" width=\"640\"\\>\n<\/p>\n\n### DualGAN\nImplementation of _DualGAN: Unsupervised Dual Learning for Image-to-Image Translation_.\n\n[Code](dualgan/dualgan.py)\n\nPaper: https://arxiv.org/abs/1704.02510\n\n#### Example\n```\n$ cd dualgan/\n$ python3 dualgan.py\n```\n\n### GAN\nImplementation of _Generative Adversarial Network_ with a MLP generator and discriminator.\n\n[Code](gan/gan.py)\n\nPaper: https://arxiv.org/abs/1406.2661\n\n#### Example\n```\n$ cd gan/\n$ python3 gan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/gan_mnist5.gif\" width=\"640\"\\>\n<\/p>\n\n### InfoGAN\nImplementation of _InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets_.\n\n[Code](infogan/infogan.py)\n\nPaper: https://arxiv.org/abs/1606.03657\n\n#### Example\n```\n$ cd infogan/\n$ python3 infogan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/infogan.png\" width=\"640\"\\>\n<\/p>\n\n### LSGAN\nImplementation of _Least Squares Generative Adversarial Networks_.\n\n[Code](lsgan/lsgan.py)\n\nPaper: https://arxiv.org/abs/1611.04076\n\n#### Example\n```\n$ cd lsgan/\n$ python3 lsgan.py\n```\n\n### Pix2Pix\nImplementation of _Image-to-Image Translation with Conditional Adversarial Networks_.\n\n[Code](pix2pix/pix2pix.py)\n\nPaper: https://arxiv.org/abs/1611.07004\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/pix2pix_architecture.png\" width=\"640\"\\>\n<\/p>\n\n#### Example\n```\n$ cd pix2pix/\n$ bash download_dataset.sh facades\n$ python3 pix2pix.py\n```   \n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/pix2pix2.png\" width=\"640\"\\>\n<\/p>\n\n### PixelDA\nImplementation of _Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks_.\n\n[Code](pixelda/pixelda.py)\n\nPaper: https://arxiv.org/abs/1612.05424\n\n#### MNIST to MNIST-M Classification\nTrains a classifier on MNIST images that are translated to resemble MNIST-M (by performing unsupervised image-to-image domain adaptation). This model is compared to the naive solution of training a classifier on MNIST and evaluating it on MNIST-M. The naive model manages a 55% classification accuracy on MNIST-M while the one trained during domain adaptation gets a 95% classification accuracy.\n\n```\n$ cd pixelda/\n$ python3 pixelda.py\n```\n\n| Method       | Accuracy  |\n| ------------ |:---------:|\n| Naive        | 55%       |\n| PixelDA      | 95%       |\n\n### SGAN\nImplementation of _Semi-Supervised Generative Adversarial Network_.\n\n[Code](sgan/sgan.py)\n\nPaper: https://arxiv.org/abs/1606.01583\n\n#### Example\n```\n$ cd sgan/\n$ python3 sgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/sgan.png\" width=\"640\"\\>\n<\/p>\n\n### SRGAN\nImplementation of _Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network_.\n\n[Code](srgan/srgan.py)\n\nPaper: https://arxiv.org/abs/1609.04802\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/superresgan.png\" width=\"640\"\\>\n<\/p>\n\n\n#### Example\n```\n$ cd srgan/\n<follow steps at the top of srgan.py>\n$ python3 srgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/srgan.png\" width=\"640\"\\>\n<\/p>\n\n### WGAN\nImplementation of _Wasserstein GAN_ (with DCGAN generator and discriminator).\n\n[Code](wgan/wgan.py)\n\nPaper: https://arxiv.org/abs/1701.07875\n\n#### Example\n```\n$ cd wgan/\n$ python3 wgan.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/wgan2.png\" width=\"640\"\\>\n<\/p>\n\n### WGAN GP\nImplementation of _Improved Training of Wasserstein GANs_.\n\n[Code](wgan_gp/wgan_gp.py)\n\nPaper: https://arxiv.org/abs/1704.00028\n\n#### Example\n```\n$ cd wgan_gp/\n$ python3 wgan_gp.py\n```\n\n<p align=\"center\">\n    <img src=\"http://eriklindernoren.se/images/imp_wgan.gif\" width=\"640\"\\>\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"82CC:11316A:176F1B:5C99C0:6AB9213B"},"text_sha256":"41e99ad5c2ee3cec8291e2cc427560783a07feb16b7a0dba19479082f365f6f7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pyro-ppl/pyro","input_row":{"repository":"pyro-ppl/pyro","url":"https://github.com/pyro-ppl/pyro","name":"pyro","owner":"pyro-ppl","description":"Deep universal probabilistic programming with Python and PyTorch","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9059,"issues":1100,"created_at":"2017-06-16T05:03:47Z","updated_at":"2026-09-24T02:34:35Z","first_commit_at":"2017-06-16T05:03:47Z","last_commit_at":"2026-09-07T03:31:31Z","activity_months":110.70999999999999,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:24.335Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pyro-ppl/pyro","visibility":"public","created_at":"2017-06-16T05:03:47Z","updated_at":"2026-09-24T02:34:35Z","private":false,"fork":false,"archived":false,"stargazers_count":9059,"open_issues_count":293,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3218","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:17FCE59:1C1CB15:6AB928F8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3217","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:184BBF6:1C6BBB4:6AB928F8"},"commit":{"sha":"e5cf92b96a7bc7b59c6363dbb9111d1784388cdc","url":"https://github.com/pyro-ppl/pyro/commit/e5cf92b96a7bc7b59c6363dbb9111d1784388cdc","date":"2018-05-24T22:40:25Z","author_date":"2018-05-24T22:40:25Z","committer_date":"2018-05-24T22:40:25Z","tree_sha":"50f2941f65406b3cbf17c49adc2da74652e4f859","message_first_line":"Add hide_fn parameter to poutine.block (#1162)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3216","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D70881:FCB1A0:6AB928F9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2915,"blob_sha":"552b995e1ed91925614730f75c274c48f6209f26","priority":0}],"documents":[{"path":"README.md","size":2915,"blob_sha":"552b995e1ed91925614730f75c274c48f6209f26","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"http://pyro.ai\"> <img width=\"220px\" height=\"220px\" src=\"docs/source/_static/img/pyro_logo_with_text.png\"><\/a>\n<\/div>\n\n-----------------------------------------\n\n[![Build Status](https://travis-ci.org/uber/pyro.svg?branch=dev)](https://travis-ci.org/uber/pyro)\n[![Latest Version](https://badge.fury.io/py/pyro-ppl.svg)](https://pypi.python.org/pypi/pyro-ppl)\n[![Documentation Status](https://readthedocs.org/projects/pyro-ppl/badge/?version=dev)](http://pyro-ppl.readthedocs.io/en/stable/?badge=dev)\n\n\n[Getting Started](http://pyro.ai/examples) |\n[Documentation](http://docs.pyro.ai/) |\n[Community](http://forum.pyro.ai/) |\n[Contributing](https://github.com/uber/pyro/blob/master/CONTRIBUTING.md)\n\nPyro is a flexible, scalable deep probabilistic programming library built on PyTorch.  Notably, it was designed with these principles in mind:\n- **Universal**: Pyro is a universal PPL -- it can represent any computable probability distribution.\n- **Scalable**: Pyro scales to large data sets with little overhead compared to hand-written code.\n- **Minimal**: Pyro is agile and maintainable. It is implemented with a small core of powerful, composable abstractions.\n- **Flexible**: Pyro aims for automation when you want it, control when you need it. This is accomplished through high-level abstractions to express generative and inference models, while allowing experts easy-access to customize inference.\n\nPyro is in an alpha release.  It is developed and used by [Uber AI Labs](http://uber.ai).\nFor more information, check out our [blog post](http://eng.uber.com/pyro).\n\n## Installing\n\n### Installing a stable Pyro release\n\nFirst install [PyTorch](http://pytorch.org/).\n\nInstall via pip:\n\n**Python 2.7.\\*:**\n```sh\npip install pyro-ppl\n```\n\n**Python 3.5:**\n```sh\npip3 install pyro-ppl\n```\n\n**Install from source:**\n```sh\ngit clone git@github.com:uber/pyro.git\ncd pyro\ngit checkout master  # master is pinned to the latest release\npip install .\n```\n\n**Install with extra packages:**\n```sh\npip install pyro-ppl[extras]  # for running examples/tutorials\n```\n\n### Installing Pyro dev branch\n\nFor recent features you can install Pyro from source.\n\nTo install a compatible CPU version of PyTorch on OSX / Linux, you\ncould use the PyTorch install helper script.\n\n```\nbash scripts/install_pytorch.sh\n```\n\nAlternatively, build PyTorch following instructions in the PyTorch\n[README](https://github.com/pytorch/pytorch/blob/master/README.md).\n```sh\ngit clone --recursive https://github.com/pytorch/pytorch\ncd pytorch\ngit checkout 200fb22  # <---- a well-tested commit\n```\nOn Linux:\n```sh\npython setup.py install\n```\nOn OSX:\n```sh\nMACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install\n```\n\nFinally install Pyro\n```sh\ngit clone https://github.com/uber/pyro\ncd pyro\npip install .\n```\n\n## Running Pyro from a Docker Container\n\nRefer to the instructions [here](docker/README.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D7BE:386840:17E978:5D156A:6AB9213D"},"text_sha256":"e950aaeec9e65bde4f715364614cc819a34c70ea5bb434920a0b138276db2d6a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3215","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:17DDDBD:1BFDD60:6AB928FA"},"commit":{"sha":"6cc3ecdcd28ff4dff9036002221508186fcc8f19","url":"https://github.com/pyro-ppl/pyro/commit/6cc3ecdcd28ff4dff9036002221508186fcc8f19","date":"2026-06-05T18:12:55Z","author_date":"2026-06-05T18:12:55Z","committer_date":"2026-06-05T18:12:55Z","tree_sha":"1f0ce86f086836872abe6cf900ff4d658595e34d","message_first_line":"Fix lint formatting and mypy checks (#3453)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3214","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:17901D5:1BAF3BC:6AB928FA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4629,"blob_sha":"66b7407e423a586e994ac2d14453d96301b96a59","priority":0}],"documents":[{"path":"README.md","size":4629,"blob_sha":"66b7407e423a586e994ac2d14453d96301b96a59","priority":0,"status":200,"text":"<!--\nCopyright Contributors to the Pyro project.\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n<div align=\"center\">\n  <a href=\"http://pyro.ai\"> <img width=\"220px\" height=\"220px\" src=\"docs/source/_static/img/pyro_logo_with_text.png\"><\/a>\n<\/div>\n\n-----------------------------------------\n\n[![Build Status](https://github.com/pyro-ppl/pyro/workflows/CI/badge.svg)](https://github.com/pyro-ppl/pyro/actions)\n[![Coverage Status](https://coveralls.io/repos/github/pyro-ppl/pyro/badge.svg?branch=dev)](https://coveralls.io/github/pyro-ppl/pyro?branch=dev)\n[![Latest Version](https://badge.fury.io/py/pyro-ppl.svg)](https://pypi.python.org/pypi/pyro-ppl)\n[![Documentation Status](https://readthedocs.org/projects/pyro-ppl/badge/?version=dev)](http://pyro-ppl.readthedocs.io/en/stable/?badge=dev)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3056/badge)](https://bestpractices.coreinfrastructure.org/projects/3056)\n\n[Getting Started](http://pyro.ai/examples) |\n[Documentation](http://docs.pyro.ai/) |\n[Community](http://forum.pyro.ai/) |\n[Contributing](https://github.com/pyro-ppl/pyro/blob/master/CONTRIBUTING.md)\n\nPyro is a flexible, scalable deep probabilistic programming library built on PyTorch.  Notably, it was designed with these principles in mind:\n\n- **Universal**: Pyro is a universal PPL - it can represent any computable probability distribution.\n- **Scalable**: Pyro scales to large data sets with little overhead compared to hand-written code.\n- **Minimal**: Pyro is agile and maintainable. It is implemented with a small core of powerful, composable abstractions.\n- **Flexible**: Pyro aims for automation when you want it, control when you need it. This is accomplished through high-level abstractions to express generative and inference models, while allowing experts easy-access to customize inference.\n\nPyro was originally developed at Uber AI and is now actively maintained by community contributors, including a dedicated team at the [Broad Institute](https://www.broadinstitute.org/).\nIn 2019, Pyro [became](https://www.linuxfoundation.org/press-release/2019/02/pyro-probabilistic-programming-language-becomes-newest-lf-deep-learning-project/) a project of the Linux Foundation, a neutral space for collaboration on open source software, open standards, open data, and open hardware.\n\nFor more information about the high level motivation for Pyro, check out our [launch blog post](http://eng.uber.com/pyro).\nFor additional blog posts, check out work on [experimental design](https://eng.uber.com/oed-pyro-release/) and\n[time-to-event modeling](https://eng.uber.com/modeling-censored-time-to-event-data-using-pyro/) in Pyro.\n\n## Installing\n\n### Installing a stable Pyro release\n\n**Install using pip:**\n```sh\npip install pyro-ppl\n```\n\n**Install from source:**\n```sh\ngit clone git@github.com:pyro-ppl/pyro.git\ncd pyro\ngit checkout master  # master is pinned to the latest release\npip install .\n```\n\n**Install with extra packages:**\n\nTo install the dependencies required to run the probabilistic models included in the `examples`/`tutorials` directories, please use the following command:\n```sh\npip install pyro-ppl[extras] \n```\nMake sure that the models come from the same release version of the [Pyro source code](https://github.com/pyro-ppl/pyro/releases) as you have installed.\n\n### Installing Pyro dev branch\n\nFor recent features you can install Pyro from source.\n\n**Install Pyro using pip:**\n\n```sh\npip install git+https://github.com/pyro-ppl/pyro.git\n```\nor, with the `extras` dependency to run the probabilistic models included in the `examples`/`tutorials` directories:\n```sh\npip install git+https://github.com/pyro-ppl/pyro.git#egg=project[extras]\n```\n\n**Install Pyro from source:**\n\n```sh\ngit clone https://github.com/pyro-ppl/pyro\ncd pyro\npip install .  # pip install .[extras] for running models in examples/tutorials\n```\n\n## Running Pyro from a Docker Container\n\nRefer to the instructions [here](docker/README.md).\n\n## Citation\nIf you use Pyro, please consider citing:\n```\n@article{bingham2019pyro,\n  author    = {Eli Bingham and\n               Jonathan P. Chen and\n               Martin Jankowiak and\n               Fritz Obermeyer and\n               Neeraj Pradhan and\n               Theofanis Karaletsos and\n               Rohit Singh and\n               Paul A. Szerlip and\n               Paul Horsfall and\n               Noah D. Goodman},\n  title     = {Pyro: Deep Universal Probabilistic Programming},\n  journal   = {J. Mach. Learn. Res.},\n  volume    = {20},\n  pages     = {28:1--28:6},\n  year      = {2019},\n  url       = {http://jmlr.org/papers/v20/18-403.html}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B98:29FD16:17CE15:5CF9FD:6AB9213F"},"text_sha256":"39e7535945abdecc28e81e2ec9d2761dbb49c9bc6c99837adcef5778e665db4c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dusty-nv/jetson-inference","input_row":{"repository":"dusty-nv/jetson-inference","url":"https://github.com/dusty-nv/jetson-inference","name":"jetson-inference","owner":"dusty-nv","description":"Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9004,"issues":1864,"created_at":"2016-07-30T19:56:47Z","updated_at":"2026-09-27T09:42:53Z","first_commit_at":"2016-07-30T19:56:47Z","last_commit_at":"2025-10-16T17:34:47Z","activity_months":110.54000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:27.561Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dusty-nv/jetson-inference","visibility":"public","created_at":"2016-07-30T19:56:47Z","updated_at":"2026-09-27T09:42:53Z","private":false,"fork":false,"archived":false,"stargazers_count":9004,"open_issues_count":407,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3213","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:177E8C5:1B9E3F0:6AB928FB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3212","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17A9589:1BC914C:6AB928FB"},"commit":{"sha":"e168b746d540fd739a6fa6ba652b5a5e8c6ffa08","url":"https://github.com/dusty-nv/jetson-inference/commit/e168b746d540fd739a6fa6ba652b5a5e8c6ffa08","date":"2018-04-27T19:34:03Z","author_date":"2018-04-27T19:34:03Z","committer_date":"2018-04-27T19:34:03Z","tree_sha":"2c7bbfd85e79977ba90ff89aab55325907ea8340","message_first_line":"update readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"3211","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:177E916:1B9E462:6AB928FC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":62023,"blob_sha":"87c637d8d16fcef36a81a187c105e17fdbbc4646","priority":0}],"documents":[{"path":"README.md","size":62023,"blob_sha":"87c637d8d16fcef36a81a187c105e17fdbbc4646","priority":0,"status":200,"text":"<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-header.jpg\">\n\n# Deploying Deep Learning\nWelcome to our training guide for inference and [deep vision](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/index.html) runtime library for NVIDIA **[DIGITS](https://github.com/NVIDIA/DIGITS)** and **[Jetson TX1/TX2](http://www.nvidia.com/object/embedded-systems.html)**.\n\nThis repo uses NVIDIA **[TensorRT](https://developer.nvidia.com/tensorrt)** for efficiently deploying neural networks onto the embedded platform, improving performance and power efficiency using graph optimizations, kernel fusion, and half-precision FP16 on the Jetson.\n\nVision primitives, such as [`imageNet`](imageNet.h) for image recognition, [`detectNet`](detectNet.h) for object localization, and [`segNet`](segNet.h) for segmentation, inherit from the shared [`tensorNet`](tensorNet.h) object.  Examples are provided for streaming from live camera feed and processing images from disk.  See the **[Deep Vision API Reference Specification](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/index.html)** for accompanying documentation. \n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-primitives.png\" width=\"800\">\n\n> &gt; &nbsp; See **[Image Segmentation](#image-segmentation-with-segnet)** models and training guide with aerial drone dataset. <br/>\n> &gt; &nbsp; Try **[Object Detection](#locating-object-coordinates-using-detectnet)** training guide using DIGITS & MS-COCO training dataset. <br/>\n> &gt; &nbsp; Use **[Image Recognition](#re-training-the-network-with-digits)** training guide with DIGITS & ImageNet ILSVRC12 dataset. <br/>\n> &gt; &nbsp; Read our **[dev blog](https://devblogs.nvidia.com/parallelforall/jetpack-doubles-jetson-inference-perf/)**, *JetPack 3.1 Doubles Jetson's Low-Latency Inference Performance*. <br/>\n> &gt; &nbsp; Check out our next GitHub tutorial, **[Deep Reinforcement Learning in Robotics](http://github.com/dusty-nv/jetson-reinforcement)**.\n\n### **Table of Contents**\n\n* [DIGITS Workflow](#digits-workflow) \n* [System Setup](#system-setup)\n* [Building from Source on Jetson](#building-from-source-on-jetson)\n* [Classifying Images with ImageNet](#classifying-images-with-imagenet)\n\t* [Using the Console Program on Jetson](#using-the-console-program-on-jetson)\n\t* [Running the Live Camera Recognition Demo](#running-the-live-camera-recognition-demo)\n\t* [Re-training the Network with DIGITS](#re-training-the-network-with-digits)\n\t* [Downloading Image Recognition Dataset](#downloading-image-recognition-dataset)\n\t* [Customizing the Object Classes](#customizing-the-object-classes)\n\t* [Importing Classification Dataset into DIGITS](#importing-classification-dataset-into-digits)\n\t* [Creating Image Classification Model with DIGITS](#creating-image-classification-model-with-digits)\n\t* [Testing Classification Model in DIGITS](#testing-classification-model-in-digits)\n\t* [Downloading Model Snapshot to Jetson](#downloading-model-snapshot-to-jetson)\n\t* [Loading Custom Models on Jetson](#loading-custom-models-on-jetson)\n* [Locating Object Coordinates using DetectNet](#locating-object-coordinates-using-detectnet)\n\t* [Detection Data Formatting in DIGITS](#detection-data-formatting-in-digits)\n\t* [Downloading the Detection Dataset](#downloading-the-detection-dataset)\n\t* [Importing the Detection Dataset into DIGITS](#importing-the-detection-dataset-into-digits)\n\t* [Creating DetectNet Model with DIGITS](#creating-detectnet-model-with-digits)\n\t* [Testing DetectNet Model Inference in DIGITS](#testing-detectnet-model-inference-in-digits)\n\t* [Downloading the Model Snapshot to Jetson](#downloading-the-model-snapshot-to-jetson)\n\t* [DetectNet Patches for TensorRT](#detectnet-patches-for-tensorrt)\n\t* [Processing Images from the Command Line on Jetson](#processing-images-from-the-command-line-on-jetson)\n\t* [Multi-class Object Detection Models](#multi-class-object-detection-models)\n\t* [Running the Live Camera Detection Demo on Jetson](#running-the-live-camera-detection-demo-on-jetson)\n* [Image Segmentation with SegNet](#image-segmentation-with-segnet)\n\t* [Downloading Aerial Drone Dataset](#downloading-aerial-drone-dataset)\n\t* [Importing the Aerial Dataset into DIGITS](#importing-the-aerial-dataset-into-digits)\n\t* [Generating Pretrained FCN-Alexnet](#generating-pretrained-fcn-alexnet)\n\t* [Training FCN-Alexnet with DIGITS](#training-fcn-alexnet-with-digits)\n\t* [Testing Inference Model in DIGITS](#testing-inference-model-in-digits)\n\t* [FCN-Alexnet Patches for TensorRT](#fcn-alexnet-patches-for-tensorrt)\n\t* [Running Segmentation Models on Jetson](#running-segmentation-models-on-jetson)\n\n**Recommended System Requirements**\n\nTraining GPU:  Maxwell, Pascal, or Volta-based GPU (ideally with at least 6GB video memory)  \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optionally, AWS P2/P3 instance or Microsoft Azure N-series  \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ubuntu 14.04 x86_64 or Ubuntu 16.04 x86_64.\n\nDeployment:    &nbsp;&nbsp;Jetson TX2 Developer Kit with JetPack 3.0 or newer (Ubuntu 16.04 aarch64).  \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jetson TX1 Developer Kit with JetPack 2.3 or newer (Ubuntu 16.04 aarch64).\n\n> **note**:  this [branch](http://github.com/dusty-nv/jetson-inference) is verified against the following BSP versions for Jetson TX1/TX2: <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX2 - JetPack 3.2 / L4T R28.2 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 3.0 RC2<br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX2 - JetPack 3.1 / L4T R28.1 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 3.0 RC <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 3.1 / L4T R28.1 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 3.0 RC <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX2 - JetPack 3.1 / L4T R28.1 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 2.1<br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 3.1 / L4T R28.1 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 2.1<br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX2 - JetPack 3.0 / L4T R27.1 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 1.0<br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 2.3 / L4T R24.2 aarch64 (Ubuntu 16.04 LTS) inc. TensorRT 1.0<br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 2.3.1 / L4T R24.2.1 aarch64 (Ubuntu 16.04 LTS)\n\nNote that TensorRT samples from the repo are intended for deployment on embedded Jetson TX1/TX2 module, however when cuDNN and TensorRT have been installed on the host side, the TensorRT samples in the repo can be compiled for PC.\n\n## DIGITS Workflow\n\nNew to deep neural networks (DNNs) and machine learning?  Take this [introductory primer](docs/deep-learning.md) on training and inference.\n\n<a href=\"https://github.com/dusty-nv/jetson-inference/blob/master/docs/deep-learning.md\"><img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/digits-samples.jpg\" width=\"800\"><\/a>\n\nUsing NVIDIA deep learning tools, it's easy to **[Get Started](https://github.com/NVIDIA/DIGITS/blob/master/docs/GettingStarted.md)** training DNNs and deploying them into the field with high performance.  Discrete GPUs are typically used in a server, PC, or laptop for training with DIGITS, while Jetson and integrated GPU is used in embedded form factors.\n\n<a href=\"https://github.com/dusty-nv/jetson-inference/blob/master/docs/deep-learning.md\"><img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/digits-workflow.jpg\" width=\"700\"><\/a>\n\nNVIDIA [DIGITS](https://github.com/NVIDIA/DIGITS) is used to interactively train network models on annotated datasets in the cloud or PC, while TensorRT and Jetson are used to deploy runtime inference in the field. TensorRT uses graph optimizations and half-precision FP16 support to more than double DNN inferencing.  Together, DIGITS and TensorRT form an effective workflow for developing and deploying deep neural networks capable of implementing advanced AI and perception. \n\n## System Setup\n\nDuring this tutorial, we'll use a host PC (or cloud instance) for training DNNs, alongside a Jetson for inference.  \n\nDue to the number of dependencies required for training, it's recommended for beginners to setup their host training PC with **[NVIDIA GPU Cloud (NGC)](https://www.nvidia.com/en-us/gpu-cloud/)** or [nvidia-docker](https://github.com/NVIDIA/nvidia-docker).  These methods automate the install of the drivers and machine learning frameworks on the host.  NGC can be used to deploy Docker images locally, or remotely to cloud providers like AWS or Azure N-series.\n\nA host PC will also serve to flash the Jetson with the latest JetPack.  First, we'll setup and configure the host PC with the required OS and tools.\n\n### Installing Ubuntu on the Host\n\nDownload and install Ubuntu 16.04 x86_64 onto the host PC from one of the following locations:\n\n```\nhttp://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso\nhttp://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso.torrent\n```\n\nUbuntu 14.04 x86_64 may also be acceptable with minor modifications later while installing some packages with apt-get.\n\n### Running JetPack on the Host\n\nDownload the latest **[JetPack](https://developer.nvidia.com/embedded/jetpack)** to the host PC.  In addition to flashing the Jetson with the latest Board Support Package (BSP), JetPack automatically installs tools for the host like CUDA Toolkit.  See the JetPack [Release Notes](https://developer.nvidia.com/embedded/jetpack-notes) for the full list of features and installed packages.\n\nAfter downloading JetPack from the link above, run it from the host PC with the following commands:\n\n``` bash \n$ cd <directory where you downloaded JetPack>\n$ chmod +x JetPack-L4T-<version>-linux-x64.run \n$ ./JetPack-L4T-<version>-linux-x64.run \n```\n\nThe JetPack GUI will start.  Follow the step-by-step **[Install Guide](http://docs.nvidia.com/jetpack-l4t/index.html#developertools/mobile/jetpack/l4t/3.0/jetpack_l4t_install.htm)** to complete the setup.  Near the beginning, JetPack will confirm which generation Jetson you are developing for.\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/jetpack-platform.png\" width=\"450\">\n\nSelect Jetson TX1 if you are using TX1, or Jetson TX2 if you're using TX2, and press `Next` to continue.\n\nThe next screen will list the packages available to be installed.  The packages installed to the host are listed at the top under the `Host - Ubuntu` dropdown, while those intended for the Jetson are shown near the bottom.  You can select or deselect an individual package for installation by clicking it's `Action` column.\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/jetpack-downloads.png\" width=\"500\">\n\nSince CUDA will be used on the host for training DNNs, it's recommended to select the Full install by click on the radio button in the top right.  Then press `Next` to begin setup.  JetPack will download and then install the sequence of packages.  Note that all the .deb packages are stored under the `jetpack_downloads` subdirectory if you are to need them later.  \n\nAfter the downloads have finished installing, JetPack will enter the post-install phase where the JetPack is flashed with the L4T BSP.  You'll need to connect your Jetson to your host PC via the micro-USB port and cable included in the devkit.  Then enter your Jetson into recovery mode by holding down the Recovery button while pressing and releasing Reset.  If you type `lsusb` from the host PC after you've connected the micro-USB cable and entered the Jetson into recovery mode, you should see the NVIDIA device come up under the list of USB devices.  JetPack uses the micro-USB connection from the host to flash the L4T BSP to the Jetson.  \n\nAfter flashing, the Jetson will reboot and if attached to an HDMI display, will boot up to the Ubuntu desktop.  After this, JetPack connects to the Jetson from the host via SSH to install additional packages to the Jetson, like the ARM aarch64 builds of CUDA Toolkit, cuDNN, and TensorRT.  For JetPack to be able to reach the Jetson via SSH, the host PC should be networked to the Jetson via Ethernet.  This can be accomplished by running an Ethernet cable directly from the host to the Jetson, or by connecting both devices to a router or switch — the JetPack GUI will ask you to confirm which networking scenario is being used.  See the JetPack **[Install Guide](http://docs.nvidia.com/jetpack-l4t/index.html#developertools/mobile/jetpack/l4t/3.0/jetpack_l4t_install.htm)** for the full directions for installing JetPack and flashing Jetson.\n\n### Installing NVIDIA Driver on the Host\n\n> **note**:  if you're using [NVIDIA GPU Cloud (NGC)](https://www.nvidia.com/en-us/gpu-cloud/), you can skip ahead to [`Building from Source on Jetson`](#building-from-source-on-jetson)  \n\nAt this point, JetPack will have flashed the Jetson with the latest L4T BSP, and installed CUDA toolkits to both the Jetson and host PC.  However, the NVIDIA PCIe driver will still need to be installed on the host PC to enable GPU-accelerated training.  Run the following commands from the host PC to install the NVIDIA driver from the Ubuntu repo:\n\n``` bash\n$ sudo apt-get install nvidia-384\t# use nvidia-375 for alternate version\n$ sudo reboot\n```\n\nAfer rebooting, the NVIDIA driver should be listed under `lsmod`:\n\n``` bash\n$ lsmod | grep nvidia\nnvidia_uvm            647168  0\nnvidia_drm             49152  1\nnvidia_modeset        790528  4 nvidia_drm\nnvidia              12144640  60 nvidia_modeset,nvidia_uvm\ndrm_kms_helper        167936  1 nvidia_drm\ndrm                   368640  4 nvidia_drm,drm_kms_helper\n```\n\nTo verify the CUDA toolkit and NVIDIA driver are working, run some tests that come with the CUDA samples:\n\n``` bash\n$ cd /usr/local/cuda/samples\n$ sudo make\n$ cd bin/x86_64/linux/release/\n$ ./deviceQuery\n$ ./bandwidthTest --memory=pinned\n```\n\n### Installing cuDNN on the Host\n\nThe next step is to install NVIDIA **[cuDNN](https://developer.nvidia.com/cudnn)** libraries on the host PC.  Download the libcudnn and libcudnn packages from the NVIDIA cuDNN webpage:\n\n[`https://developer.nvidia.com/cudnn`](https://developer.nvidia.com/cudnn)\n\nThen install the packages with the following commands:\n\n``` bash\n$ sudo dpkg -i libcudnn<version>_amd64.deb\n$ sudo dpkg -i libcudnn-dev_<version>_amd64.deb\n```\n\n### Installing NVcaffe on the Host\n\n[NVcaffe](https://github.com/nvidia/caffe/tree/caffe-0.15) is the NVIDIA branch of Caffe with optimizations for GPU.  NVcaffe requires cuDNN and is used by DIGITS for training DNNs.  To install it, clone the NVcaffe repo from GitHub, and compile from source, using the caffe-0.15 branch.\n\n> **note**: for this tutorial, NVcaffe is only required on the host (for training).  During inferencing phase TensorRT is used on the Jetson and doesn't require caffe.\n\nFirst clone the caffe-0.15 branch from https://github.com/NVIDIA/caffe\n\n``` bash\n$ git clone -b caffe-0.15 https://github.com/NVIDIA/caffe\n```\n\nBuild caffe with the [instructions](http://caffe.berkeleyvision.org/installation.html#compilation) from here:\n\n[`http://caffe.berkeleyvision.org/installation.html#compilation`](http://caffe.berkeleyvision.org/installation.html#compilation)\n\nCaffe should now be configured and built.  Now edit your user's ~/.bashrc to include the path to your Caffe tree (replace the paths below to reflect your own):\n\n``` bash\nexport CAFFE_ROOT=/home/dusty/workspace/caffe\nexport PYTHONPATH=/home/dusty/workspace/caffe/python:$PYTHONPATH\n```\n\nClose and re-open the terminal for the changes to take effect.\n\n\n### Installing DIGITS on the Host\n\nNVIDIA **[DIGITS](https://developer.nvidia.com/digits)** is a Python-based web service which interactively trains DNNs and manages datasets.  As highlighed in the DIGITS workflow, it runs on the host PC to create the network model during the training phase.  The trained model is then copied from the host PC to the Jetson for the runtime inference phase with TensorRT.\n\nFor automated installation, it's recommended to use DIGITS through [NVIDIA GPU Cloud](https://www.nvidia.com/en-us/gpu-cloud/), which comes with a DIGITS Docker image that can run on a GPU attached to a local PC or cloud instance. Alternatively, to install DIGITS from source, first clone the DIGITS repo from GitHub:\n\n``` bash\n$ git clone https://github.com/nvidia/DIGITS\n```\n\nThen complete the steps under the **[Building DIGITS](https://github.com/NVIDIA/DIGITS/blob/digits-6.0/docs/BuildDigits.md)** documentation.\n\n[`https://github.com/NVIDIA/DIGITS/blob/digits-6.0/docs/BuildDigits.md`](https://github.com/NVIDIA/DIGITS/blob/digits-6.0/docs/BuildDigits.md)\n\n#### Starting the DIGITS Server\n\nAssuming that your terminal is still in the DIGITS directory, the webserver can be started by running the `digits-devserver` Python script:\n\n``` bash\n$ ./digits-devserver \n  ___ ___ ___ ___ _____ ___\n |   \\_ _/ __|_ _|_   _/ __|\n | |) | | (_ || |  | | \\__ \\\n |___/___\\___|___| |_| |___/ 5.1-dev\n\n2017-04-17 13:19:02 [INFO ] Loaded 0 jobs.\n```\n\nDIGITS will store user jobs (training datasets and model snapshots) under the `digits/jobs` directory.\n\nTo access the interactive DIGITS session, open your web browser and navigate to `0.0.0.0:5000`.\n\n> **note**:  by default the DIGITS server will start on port 5000, but the port can be specified by passing the `--port` argument to the `digits-devserver` script.\n\n\n## Building from Source on Jetson\nProvided along with this repo are TensorRT-enabled deep learning primitives for running Googlenet/Alexnet on live camera feed for image recognition, pedestrian detection networks with localization capabilities (i.e. that provide bounding boxes), and segmentation.  This repo is intended to be built & run on the Jetson and to accept the network models from the host PC trained on the DIGITS server.\n\nThe latest source can be obtained from [GitHub](http://github.com/dusty-nv/jetson-inference) and compiled onboard Jetson TX1/TX2.\n\n> **note**:  this [branch](http://github.com/dusty-nv/jetson-inference) is verified against the following BSP versions for Jetson TX1/TX2: <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX2 - JetPack 3.0 / L4T R27.1 aarch64 (Ubuntu 16.04 LTS) <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 2.3 / L4T R24.2 aarch64 (Ubuntu 16.04 LTS) <br/>\n> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;> Jetson TX1 - JetPack 2.3.1 / L4T R24.2.1 aarch64 (Ubuntu 16.04 LTS)\n      \n#### Cloning the Repo\nTo obtain the repository, navigate to a folder of your choosing on the Jetson.  First, make sure git and cmake are installed locally:\n\n``` bash\n$ sudo apt-get install git cmake\n```\n\nThen clone the jetson-inference repo:\n``` bash\n$ git clone https://github.com/dusty-nv/jetson-inference\n```\n\n#### Configuring with CMake\n\nWhen cmake is run, a special pre-installation script (CMakePreBuild.sh) is run and will automatically install any dependencies.\n\n``` bash\n$ cd jetson-inference\n$ mkdir build\n$ cd build\n$ cmake ../\n```\n\n> **note**: the cmake command will launch the CMakePrebuild.sh script which asks for sudo while making sure prerequisite packages have been installed on the Jetson. The script also downloads the network model snapshots from web services.\n\n#### Compiling the Project\n\nMake sure you are still in the jetson-inference/build directory, created above in step #2.\n\n``` bash\n$ cd jetson-inference/build\t\t\t# omit if pwd is already /build from above\n$ make\n```\n\nDepending on architecture, the package will be built to either armhf or aarch64, with the following directory structure:\n\n```\n|-build\n   \\aarch64\t\t    (64-bit)\n      \\bin\t\t\twhere the sample binaries are built to\n      \\include\t\twhere the headers reside\n      \\lib\t\t\twhere the libraries are build to\n   \\armhf           (32-bit)\n      \\bin\t\t\twhere the sample binaries are built to\n      \\include\t\twhere the headers reside\n      \\lib\t\t\twhere the libraries are build to\n```\n\nbinaries residing in aarch64/bin, headers in aarch64/include, and libraries in aarch64/lib.\n\n#### Digging Into the Code\n\nFor reference, see the available vision primitives, including [`imageNet`](imageNet.h) for image recognition and [`detectNet`](detectNet.h) for object localization.\n\n``` c++\n/**\n * Image recognition with GoogleNet/Alexnet or custom models, using TensorRT.\n */\nclass imageNet : public tensorNet\n{\npublic:\n\t/**\n\t * Network choice enumeration.\n\t */\n\tenum NetworkType\n\t{\n\t\tALEXNET,\n\t\tGOOGLENET\n\t};\n\n\t/**\n\t * Load a new network instance\n\t */\n\tstatic imageNet* Create( NetworkType networkType=GOOGLENET );\n\t\n\t/**\n\t * Load a new network instance\n\t * @param prototxt_path File path to the deployable network prototxt\n\t * @param model_path File path to the caffemodel\n\t * @param mean_binary File path to the mean value binary proto\n\t * @param class_info File path to list of class name labels\n\t * @param input Name of the input layer blob.\n\t */\n\tstatic imageNet* Create( const char* prototxt_path, const char* model_path, const char* mean_binary,\n\t\t\t\t\t\t\t const char* class_labels, const char* input=\"data\", const char* output=\"prob\" );\n\n\t/**\n\t * Determine the maximum likelihood image class.\n\t * @param rgba float4 input image in CUDA device memory.\n\t * @param width width of the input image in pixels.\n\t * @param height height of the input image in pixels.\n\t * @param confidence optional pointer to float filled with confidence value.\n\t * @returns Index of the maximum class, or -1 on error.\n\t */\n\tint Classify( float* rgba, uint32_t width, uint32_t height, float* confidence=NULL );\n};\n```\n\nBoth inherit from the shared [`tensorNet`](tensorNet.h) object which contains common TensorRT code.\n\n## Classifying Images with ImageNet\nThere are multiple types of deep learning networks available, including recognition, detection/localization, and soon segmentation.  The first deep learning capability we're highlighting in this tutorial is **image recognition** using an 'imageNet' that's been trained to identify similar objects.\n\nThe [`imageNet`](imageNet.h) object accepts an input image and outputs the probability for each class.  Having been trained on ImageNet database of **[1000 objects](data/networks/ilsvrc12_synset_words.txt)**, the standard AlexNet and GoogleNet networks are downloaded during [step 2](#configuring-with-cmake) from above.  As examples of using [`imageNet`](imageNet.h) we provide a command-line interface called [`imagenet-console`](imagenet-console/imagenet-console.cpp) and a live camera program called [`imagenet-camera`](imagenet-camera/imagenet-camera.cpp).\n\n### Using the Console Program on Jetson\n\nFirst, try using the [`imagenet-console`](imagenet-console/imagenet-console.cpp) program to test imageNet recognition on some example images.  It loads an image, uses TensorRT and the [`imageNet`](imageNet.h) class to perform the inference, then overlays the classification and saves the output image.\n\nAfter [building](#building-from-source-on-jetson), make sure your terminal is located in the aarch64/bin directory:\n\n``` bash\n$ cd jetson-inference/build/aarch64/bin\n```\n\nThen, classify an example image with the [`imagenet-console`](imagenet-console/imagenet-console.cpp) program.  [`imagenet-console`](imagenet-console/imagenet-console.cpp) accepts 2 command-line arguments:  the path to the input image and path to the output image (with the class overlay printed).\n\n``` bash\n$ ./imagenet-console orange_0.jpg output_0.jpg\n```\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-orange.jpg\" width=\"500\">\n\n``` bash\n$ ./imagenet-console granny_smith_1.jpg output_1.jpg\n```\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-apple.jpg\" width=\"500\">\n\nNext, we will use [imageNet](imageNet.h) to classify a live video feed from the Jetson onboard camera.\n\n### Running the Live Camera Recognition Demo\n\nSimilar to the last example, the realtime image recognition demo is located in /aarch64/bin and is called [`imagenet-camera`](imagenet-camera/imagenet-camera.cpp).\nIt runs on live camera stream and depending on user arguments, loads googlenet or alexnet with TensorRT. \n``` bash\n$ ./imagenet-camera googlenet           # to run using googlenet\n$ ./imagenet-camera alexnet             # to run using alexnet\n```\n\nThe frames per second (FPS), classified object name from the video, and confidence of the classified object are printed to the openGL window title bar.  By default the application can recognize up to 1000 different types of objects, since Googlenet and Alexnet are trained on the ILSVRC12 ImageNet database which contains 1000 classes of objects.  The mapping of names for the 1000 types of objects, you can find included in the repo under [data/networks/ilsvrc12_synset_words.txt](http://github.com/dusty-nv/jetson-inference/blob/master/data/networks/ilsvrc12_synset_words.txt)\n\n> **note**:  by default, the Jetson's onboard CSI camera will be used as the video source.  If you wish to use a USB webcam instead, change the `DEFAULT_CAMERA` define at the top of [`imagenet-camera.cpp`](imagenet-camera/imagenet-camera.cpp) to reflect the /dev/video V4L2 device of your USB camera.  The model it's tested with is Logitech C920. \n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-orange-camera.jpg\" width=\"800\">\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-apple-camera.jpg\" width=\"800\">\n\n### Re-training the Network with DIGITS\n\nThe existing GoogleNet and AlexNet models that are downloaded by the repo are pre-trained on [1000 classes of objects](data/networks/ilsvrc12_synset_words.txt) from the ImageNet ILSVRC12 benchmark.\n\nTo recognize a new object class, you can use DIGITS to re-train the network on new data.  You can also organize the existing classes differently, including group multiple subclasses into one.  For example in this tutorial we'll take 230 of the 1000 classes, group those into 12 classes and retrain the network.\n\nLet's start by downloading the ILSVRC12 images to work with, or you can substitute your own dataset in an **[Image Folder](https://github.com/NVIDIA/DIGITS/blob/master/docs/ImageFolderFormat.md)**.\n\n### Downloading Image Recognition Dataset\n\nAn image recognition dataset consists of a large number of images sorted by their classification type (typically by directory).  The ILSVRC12 dataset was used in the training of the default GoogleNet and AlexNet models.  It's roughly 100GB in size and includes 1 million images over 1000 different classes.  The dataset is downloaded to the DIGITS server using the [`imagenet-download.py`](tools/imagenet-download.py) image crawler.\n\nTo download the dataset, first make sure you have enough disk space on your DIGITS server (120GB recommended), then run the following commands from a directory on that machine where you want the dataset stored:\n\n``` bash\n$ wget --no-check-certificate https://nvidia.box.com/shared/static/gzr5iewf5aouhc5exhp3higw6lzhcysj.gz -O ilsvrc12_urls.tar.gz\n$ tar -xzvf ilsvrc12_urls.tar.gz\n$ wget https://rawgit.com/dusty-nv/jetson-inference/master/tools/imagenet-download.py\n$ python imagenet-download.py ilsvrc12_urls.txt . --jobs 100 --retry 3 --sleep 0\n```\n\nIn the commands above the list of image URLs along with the scripts are downloaded before launching the crawler.\n\n> **note**: be considerate running the image crawler from a corporate network, IT may flag the activity.\n> It will probably take overnight on a decent connection to download the 1000 ILSVRC12 classes (100GB).\n\nThe crawler will download images to subdirectories that correspond to it's classification.  Each image class is stored in it's own directory, with 1000 directories in total (one for each class in ILSVRC12).  The folders are organized with a naming scheme similar to:\n\n```\nn01440764/\nn01443537/\nn01484850/\nn01491361/\nn01494475/\n...\n```\n\nThese 8-digit ID's prefixed wth N are referred to as the **synset ID** of the class.  The name string of the class can be looked up in [`ilsvrc12_synset_words.txt`](data/networks/ilsvrc12_synset_words.txt).  For example, synset `n01484850 great white shark`.\n\n### Customizing the Object Classes\n\nThe dataset that we downloaded in the previous step was used to train the default AlexNet and GoogleNet models with 1000 object classes from several core groups, including different species of birds, plants, fruit, and fish, dog and cat breeds, types of vehicles, ect.  For practicle purposes lets consider a companion to the GoogleNet model which recognizes a dozen core groups made up of the original 1000 classes (for example, instead of detecting 122 individual breeds of dogs, combining them all into one common `dog` class).  These 12 core groups may be more practical to use than 1000 individual synsets and combining across classes results in more training data and stronger classification for the group.\n\nDIGITS expects the data in a hierarchy of folders, so we can create directories for the groups and then symbolically link to the synsets from ILSVRC12 downloaded above.  DIGITS will automatically combine images from all folders under the top-level groups.  The directory structure resembles the following, with the value in parenthesis indicates the number of classes used to make up the group and the value next to the arrows indicating the synset ID linked to.\n\n```\n‣ ball/  (7)\n\t• baseball     (→n02799071)\n\t• basketball   (→n02802426)\n\t• soccer ball  (→n04254680)\n\t• tennis ball  (→n04409515)\n\t• ...\n‣ bear/  (4)\n\t• brown bear   (→n02132136)\n\t• black bear   (→n02133161)\n\t• polar bear   (→n02134084)\n\t• sloth bear   (→n02134418)\n• bike/  (3)\n• bird/  (17)\n• bottle/ (7)\n• cat/  (13)\n• dog/  (122)\n• fish/   (5)\n• fruit/  (12)\n• turtle/  (5)\n• vehicle/ (14)\n• sign/  (2)\n```\n\nSince there are actually a lot of synsets linked to from ILSVRC12, we provide the **[`imagenet-subset.sh`](tools/imagenet-subset.sh)** script to generate the directory structure and links given the path to the dataset.  Run the folowing commands from the DIGITS server:\n\n``` bash\n$ wget https://rawgit.com/dusty-nv/jetson-inference/master/tools/imagenet-subset.sh\n$ chmod +x imagenet-subset.sh\n$ mkdir 12_classes\n$ ./imagenet-subset.sh /opt/datasets/imagenet/ilsvrc12 12_classes\n```\n\nIn this example the links are created in the `12_classes` folder, with the first argument to the script being the path to ILSVRC12 downloaded in the previous step. \n\n### Importing Classification Dataset into DIGITS\n\nNavigate your browser to your DIGITS server instance and choose to create a new `Classification Dataset` from the drop-down under the Datasets tab:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-new-dataset-menu.png\" width=\"250\">\n\nSet the `Training Images` path to the `12_classes` folder from the previous step and make the following\n\n* % for validation:  `10`\n* Group Name:  `ImageNet`\n* Dataset Name: `ImageNet-ILSVRC12-subset`\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-new-dataset.png)\n\nUse the `Create` button at the bottom of the page to launch the dataset import job.  The size of the data subset is around 20GB, so depending on server I/O performance it takes 10-15 minutes.  Next we'll create the new model and begin training it.\n\n### Creating Image Classification Model with DIGITS\n\nWhen the previous data import job is complete, return to the DIGITS home screen.  Select the `Models` tab and choose to create a new `Classification Model` from the drop-down:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-new-model-menu.png\" width=\"250\">\n\nMake the following settings in the form:\n\n* Select Dataset:  `ImageNet-ILSVRC12-subset`\n* Subtract Mean:  `Pixel`\n* Standard Networks:  `GoogleNet`\n* Group Name:  `ImageNet`\n* Model Name:  `GoogleNet-ILSVRC12-subset`\n\nAfter selecting a GPU to train on, click the `Create` button at the bottom to begin training.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-new-model.png)\n\n### Testing Classification Model in DIGITS\n\nAfter the training job completes 30 epochs, the trained model should appear like so:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-model.png)\n\nAt this point, we can try testing our new model's inference on some example images in DIGITS.  On the same page as the plot above, scroll down under the `Trained Models` section.  Under `Test a Single Image`, select an image to try (for example, `/ilsvrc12/n02127052/n02127052_1203.jpg`):\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-test-single-image.png\" width=\"350\">\n\nPress the `Classify One` button and you should see a page similar to:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-infer-cat.png)\n\nThe image is classified as the new GoogleNet-12 model as `cat`, while in the original GoogleNet-1000 it was under `Lynx`.  This indicates the new model is working ok, because the Lynx category was included in GoogleNet-12's training of cat.\n\n### Downloading Model Snapshot to Jetson\n\nNow that we confirmed the trained model is working in DIGITS, let's download and extract the model snapshot to Jetson.  From the browser on your Jetson TX1/TX2, navigate to your DIGITS server and the `GoogleNet-ILSVRC12-subset` model.  Under the `Trained Models` section, select the desired snapshot from the drop-down (usually the one with the highest epoch) and click the `Download Model` button.\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-digits-model-download.png\" width=\"650\">\n\nAlternatively, if your Jetson and DIGITS server aren't accessible from the same network, you can use the step above to download the snapshot to an intermediary machine and then use SCP or USB stick to copy it to Jetson.  \n\nThen extract the archive with a command similar to:\n\n```cd <directory where you downloaded the snapshot>\ntar -xzvf 20170524-140310-8c0b_epoch_30.0.tar.gz\n```\n\nNext we will load our custom snapshot into TensorRT, running on the Jetson.\n\n### Loading Custom Models on Jetson\n\nThe `imagenet-console` and `imagenet-camera` programs that we used before also accept extended command line parameters for loading a custom model snapshot.  Set the `$NET` variable below to the path to your extracted snapshot:\n\n``` bash\n$ NET=networks/GoogleNet-ILSVRC12-subset\n\n$ ./imagenet-console bird_0.jpg output_0.jpg \\\n--prototxt=$NET/deploy.prototxt \\\n--model=$NET/snapshot_iter_184080.caffemodel \\\n--labels=$NET/labels.txt \\\n--input_blob=data \\\n--output_blob=softmax\n```\n\nAs before, the classification and confidence will be overlayed to the output image.  When compared to the output of the original network, the re-trained GoogleNet-12 makes similar classifications to the original GoogleNet-1000:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/imagenet-tensorRT-console-bird.png)\n\nThe extended command line parameters above also load custom classification models with [`imagenet-camera`](imagenet-camera/imagenet-camera.cpp). \n\n## Locating Object Coordinates using DetectNet\nThe previous image recognition examples output class probabilities representing the entire input image.   The second deep learning capability we're highlighting in this tutorial is detecting objects, and finding where in the video those objects are located (i.e. extracting their bounding boxes).  This is performed using a 'detectNet' - or object detection / localization network.\n\nThe [`detectNet`](detectNet.h) object accepts as input the 2D image, and outputs a list of coordinates of the detected bounding boxes.  To train the object detection model, first a pretrained ImageNet recognition model (like Googlenet) is used with bounding coordinate labels included in the training dataset in addition to the source imagery.\n\nThe following pretrained DetectNet models are included with the tutorial:\n\n1. **ped-100**  (single-class pedestrian detector)\n2. **multiped-500**   (multi-class pedestrian + baggage detector)\n3. **facenet-120**  (single-class facial recognition detector)\n4. **coco-airplane**  (MS COCO airplane class)\n5. **coco-bottle**    (MS COCO bottle class)\n6. **coco-chair**     (MS COCO chair class)\n7. **coco-dog**       (MS COCO dog class)\n\nAs with the previous examples, provided are a console program and a camera streaming program for using detectNet.\n\n\n### Detection Data Formatting in DIGITS\n\nExample object detection datasets with include [KITTI](http://www.cvlibs.net/datasets/kitti/eval_object.php), [MS-COCO](http://mscoco.org/), and others.  To use the KITTI dataset follow this [DIGITS object detection tutorial with KITTI](https://github.com/NVIDIA/DIGITS/blob/digits-4.0/digits/extensions/data/objectDetection/README.md).\n\nRegardless of dataset, DIGITS uses KITTI metadata format for ingesting the detection bounding labels.  These consist of text files with frame numbers corresponding to image filenames, including contents such as:\n\n```\ndog 0 0 0 528.63 315.22 569.09 354.18 0 0 0 0 0 0 0\nsheep 0 0 0 235.28 300.59 270.52 346.55 0 0 0 0 0 0 0\n```\n\n[Read more](https://github.com/NVIDIA/DIGITS/blob/digits-4.0/digits/extensions/data/objectDetection/README.md) about the folder structure and KITTI label format that DIGITS uses.  \n\n### Downloading the Detection Dataset\n\nLet's explore using the [MS-COCO](http://mscoco.org/) dataset to train and deploy networks that detect the locations of everyday objects in camera feeds.  See the [`coco2kitti.py`](tools/coco2kitti.py) script for converting MS-COCO object classes to KITTI format.  Once in DIGITS folder structure, they can be imported as datasets into DIGITS.  Some example classes from MS-COCO already preprocessed in DIGITS/KITTI format are provided for convienience.\n\nFrom a terminal on your DIGITS server download and extract **[sample MS-COCO classes](https://nvidia.box.com/shared/static/tdrvaw3fd2cwst2zu2jsi0u43vzk8ecu.gz)** already in DIGITS/KITTI format here:\n\n```bash\n$ wget --no-check-certificate https://nvidia.box.com/shared/static/tdrvaw3fd2cwst2zu2jsi0u43vzk8ecu.gz -O coco.tar.gz\n\nHTTP request sent, awaiting response... 200 OK\nLength: 5140413391 (4.5G) [application/octet-stream]\nSaving to: ‘coco.tar.gz’\n\ncoco 100%[======================================>]   4.5G  3.33MB/s    in 28m 22s \n\n2017-04-17 10:41:19 (2.5 MB/s) - ‘coco.tar.gz’ saved [5140413391/5140413391]\n\n$ tar -xzvf coco.tar.gz \n```\n\nIncluded is the training data in DIGITS format for the airplane, bottle, chair, and dog classes.  [`coco2kitti.py`](tools/coco2kitti.py) can be used to convert other classes.\n\n### Importing the Detection Dataset into DIGITS\n\nNavigate your browser to your DIGITS server instance and choose to create a new `Detection Dataset` from the drop-down in the Datasets tab:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-new-dataset-menu.png\" width=\"250\">\n\nIn the form fields, specify the following options and paths to the image and label folders under the location where you extracted the aerial dataset:\n\n* Training image folder:  `coco/train/images/dog`\n* Training label folder:  `coco/train/labels/dog`\n* Validation image folder:  `coco/val/images/dog`\n* Validation label folder:  `coco/val/labels/dog`\n* Pad image (Width x Height):  `640 x 640`\n* Custom classes:  `dontcare, dog`\n* Group Name:  `MS-COCO`\n* Dataset Name:  `coco-dog`\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-new-dataset-dog.png)\n\nName the dataset whatever you choose and click the `Create` button at the bottom of the page to launch the importing job.  Next we'll create the new detection model and begin training it.\n\n### Creating DetectNet Model with DIGITS\n\nWhen the previous data import job is complete, return to the DIGITS home screen.  Select the `Models` tab and choose to create a new `Detection Model` from the drop-down:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-new-model-menu.png\" width=\"250\">\n\nMake the following settings in the form:\n\n* Select Dataset:  `coco-dog`\n* Training epochs:  `100`\n* Subtract Mean:  `none`\n* Solver Type:  `Adam`\n* Base learning rate:  `2.5e-05`\n* Select `Show advanced learning options`\n  * Policy:  `Exponential Decay`\n  * Gamma:  `0.99`\n\n#### Selecting DetectNet Batch Size\n\nDetectNet's network default batch size of 10 consumes up to 12GB GPU memory during training.  However by using the `Batch Accumulation` field, you can also train DetectNet on a GPU with less than 12GB memory.  See the table below depending on the amount of GPU memory available in your DIGITS server:\n\n| GPU Memory     | Batch Size                | Batch Accumulation  |\n| -------------- |:-------------------------:|:-------------------:|\n| 4GB            | 2                         | 5                   |\n| 8GB            | 5                         | 2                   |\n| 12GB or larger | `[network defaults]` (10) | Leave blank (1)     |\n\nIf you're training on a card with 12GB of memory or more, leave the `Batch Size` as the default and leave the `Batch Accumulation` blank.  For GPUs with less memory, use the settings from above.\n\n#### Specifying the DetectNet Prototxt \n\nIn the network area select the `Custom Network` tab and then copy/paste the contents of [`detectnet.prototxt`](data/networks/detectnet.prototxt)\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-custom-network.jpg)\n\nThe DetectNet prototxt is located at [`data/networks/detectnet.prototxt`](https://github.com/dusty-nv/jetson-inference/blob/master/data/networks/detectnet.prototxt) in the repo.\n\n#### Training the Model with Pretrained Googlenet\n\nSince DetectNet is derived from Googlenet, it is strongly recommended to use pre-trained weights from Googlenet as this will help speed up and stabilize training significantly.  Download the Googlenet model from [here](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel) or by running the following command from your DIGITS server:\n\n```bash\nwget http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel\n```\n\nThen specify the path to your Googlenet under the `Pretrained Model` field.\n\nSelect a GPU to train on and set a name and group for the model:\n\n* Group Name `MS-COCO`\n* Model Name `DetectNet-COCO-Dog`\n\nFinally, click the `Create` button at the bottom to begin training.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-new-model-dog.png)\n\n### Testing DetectNet Model Inference in DIGITS\n\nLeave the training job to run for a while, say 50 epochs, until the mAP (`Mean Average Precision`) plot begins to increase.  Note that due to the way mAP is calculated by the DetectNet loss function, the scale of mAP isn't necessarily 0-100, and even an mAP between 5 and 10 may indicate the model is functional.  With the size of the example COCO datasets we are using, it should take a couple hours training on a recent GPU before all 100 epochs are complete.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-model-dog.png)\n\nAt this point, we can try testing our new model's inference on some example images in DIGITS.  On the same page as the plot above, scroll down under the `Trained Models` section.  Set the `Visualization Model` to *Bounding Boxes* and under `Test a Single Image`, select an image to try (for example, `/coco/val/images/dog/000074.png`):\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-visualization-options-dog.png\" width=\"350\">\n\nPress the `Test One` button and you should see a page similar to:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-infer-dog.png)\n\n\n### Downloading the Model Snapshot to Jetson\n\nNext, download and extract the trained model snapshot to Jetson.  From the browser on your Jetson TX1/TX2, navigate to your DIGITS server and the `DetectNet-COCO-Dog` model.  Under the `Trained Models` section, select the desired snapshot from the drop-down (usually the one with the highest epoch) and click the `Download Model` button.\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-digits-model-download-dog.png\" width=\"650\">\n\nAlternatively, if your Jetson and DIGITS server aren't accessible from the same network, you can use the step above to download the snapshot to an intermediary machine and then use SCP or USB stick to copy it to Jetson.  \n\nThen extract the archive with a command similar to:\n\n```cd <directory where you downloaded the snapshot>\ntar -xzvf 20170504-190602-879f_epoch_100.0.tar.gz\n```\n\n### DetectNet Patches for TensorRT\n\nIn the original DetectNet prototxt exists a Python clustering layer which isn't available in TensorRT and should be deleted from the `deploy.prototxt` included in the snapshot.  In this repo the [`detectNet`](detectNet.h) class handles the clustering as opposed to Python.\n\nAt the end of `deploy.prototxt`, delete the layer named `cluster`:\n\n```\nlayer {\n  name: \"cluster\"\n  type: \"Python\"\n  bottom: \"coverage\"\n  bottom: \"bboxes\"\n  top: \"bbox-list\"\n  python_param {\n    module: \"caffe.layers.detectnet.clustering\"\n    layer: \"ClusterDetections\"\n    param_str: \"640, 640, 16, 0.6, 2, 0.02, 22, 1\"\n  }\n}\n```\n\nWithout this Python layer, the snapshot can now be imported into TensorRT.\n\n### Processing Images from the Command Line on Jetson\n\nTo process test images with [`detectNet`](detectNet.h) and TensorRT, use the [`detectnet-console`](detectnet-console/detectnet-console.cpp) program.  [`detectnet-console`](detectnet-console/detectnet-console.cpp) accepts command-line arguments representing the path to the input image and path to the output image (with the bounding box overlays rendered).  Some test images are also included with the repo.\n\nTo specify your model that you downloaded from DIGITS, use the syntax to `detectnet-console` below.  First, for convienience, set the path to your extracted snapshot into a `$NET` variable:\n\n``` bash\n$ NET=20170504-190602-879f_epoch_100\n\n$ ./detectnet-console dog_0.jpg output_0.jpg \\\n--prototxt=$NET/deploy.prototxt \\\n--model=$NET/snapshot_iter_38600.caffemodel \\\n--input_blob=data \\ \n--output_cvg=coverage \\\n--output_bbox=bboxes\n```\n\n> **note:**  the `input_blob`, `output_cvg`, and `output_bbox` arguments may be omitted if your DetectNet layer names match the defaults above (i.e. if you are using the prototxt from following this tutorial). These optional command line parameters are provided if you are using a customized DetectNet with different layer names.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-tensorRT-dog-0.jpg)\n\n#### Launching With a Pretrained Model\n\nAlternatively, to load one of the pretrained snapshots that comes with the repo, you can specify the pretrained model name as the 3rd argument to `detectnet-console`:\n\n``` bash\n$ ./detectnet-console dog_1.jpg output_1.jpg coco-dog\n```\n\nThe above command will process dog_1.jpg, saving it to output_1.jpg, using the pretrained DetectNet-COCO-Dog model.  This is a shortcut of sorts so you don't need to wait for the model to complete training if you don't want to.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-tensorRT-dog-1.jpg)\n\n#### Pretrained DetectNet Models Available\n\nBelow is a table of the pretrained DetectNet snapshots downloaded with the repo (located in the `data/networks` directory after running `cmake` step) and the associated argument to `detectnet-console` used for loading the pretrained model:\n\n| DIGITS model            | CLI argument    | classes              |\n| ------------------------|-----------------|----------------------|\n| DetectNet-COCO-Airplane | `coco-airplane` | airplanes            |\n| DetectNet-COCO-Bottle   | `coco-bottle`   | bottles              |\n| DetectNet-COCO-Chair    | `coco-chair`    | chairs               |\n| DetectNet-COCO-Dog      | `coco-dog`      | dogs                 |\n| ped-100                 | `pednet`        | pedestrians          |\n| multiped-500            | `multiped`      | pedestrians, luggage |\n| facenet-120             | `facenet`       | faces                |\n\nThese all also have the python layer patch above already applied.\n\n#### Running Other MS-COCO Models on Jetson\n\nLet's try running some of the other COCO models.  The training data for these are all included in the dataset downloaded above.  Although the DIGITS training example above was for the coco-dog model, the same procedure can be followed to train DetectNet on the other classes included in the sample COCO dataset.\n\n``` bash\n$ ./detectnet-console bottle_0.jpg output_2.jpg coco-bottle\n```\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-tensorRT-bottle-0.jpg)\n\n\n``` bash\n$ ./detectnet-console airplane_0.jpg output_3.jpg coco-airplane\n```\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-tensorRT-airplane-0.jpg)\n\n#### Running Pedestrian Models on Jetson\n\nIncluded in the repo are also DetectNet models pretrained to detect humans.  The `pednet` and `multiped` models recognized pedestrians while `facenet` recognizes faces (from [FDDB](http://vis-www.cs.umass.edu/fddb/)).  Here's an example of detecting multiple humans simultaneously in a crowded space:\n\n\n``` bash\n$ ./detectnet-console peds-004.jpg output-4.jpg multiped\n```\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/detectnet-peds-00.jpg\" width=\"900\">\n\n### Multi-class Object Detection Models\nWhen using the multiped model (`PEDNET_MULTI`), for images containing luggage or baggage in addition to pedestrians, the 2nd object class is rendered with a green overlay.\n\n``` bash\n$ ./detectnet-console peds-003.jpg output-3.jpg multiped\n```\n\n### Running the Live Camera Detection Demo on Jetson\n\nSimilar to the previous example, [`detectnet-camera`](detectnet-camera/detectnet-camera.cpp) runs the object detection networks on live video feed from the Jetson onboard camera.  Launch it from command line along with the type of desired network:\n\n``` bash\n$ ./detectnet-camera coco-bottle    # detect bottles/soda cans in the camera\n$ ./detectnet-camera coco-dog       # detect dogs in the camera\n$ ./detectnet-camera multiped       # run using multi-class pedestrian/luggage detector\n$ ./detectnet-camera pednet         # run using original single-class pedestrian detector\n$ ./detectnet-camera facenet        # run using facial recognition network\n$ ./detectnet-camera                # by default, program will run using multiped\n```\n\n> **note**:  to achieve maximum performance while running detectnet, increase the Jetson clock limits by running the script:\n>  `sudo ~/jetson_clocks.sh`\n\n<br/>\n\n> **note**:  by default, the Jetson's onboard CSI camera will be used as the video source.  If you wish to use a USB webcam instead, change the `DEFAULT_CAMERA` define at the top of [`detectnet-camera.cpp`](detectnet-camera/detectnet-camera.cpp) to reflect the /dev/video V4L2 device of your USB camera and recompile.  The webcam model it's tested with is Logitech C920.  \n\n<br/>\n\n## Image Segmentation with SegNet\n\nThe third deep learning capability we're highlighting in this tutorial is image segmentation.  Segmentation is based on image recognition, except the classifications occur at the pixel level as opposed to classifying entire images as with image recognition.  This is accomplished by *convolutionalizing* a pre-trained imageNet recognition model (like Alexnet), which turns it into a fully-convolutional segmentation model capable of per-pixel labelling.  Useful for environmental sensing and collision avoidance, segmentation yields dense per-pixel classification of many different potential objects per scene, including scene foregrounds and backgrounds.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-cityscapes.jpg)\n\nThe [`segNet`](segNet.h) object accepts as input the 2D image, and outputs a second image with the per-pixel classification mask overlay.  Each pixel of the mask corresponds to the class of object that was classified.\n\n> **note**:  see the DIGITS [semantic segmentation](https://github.com/NVIDIA/DIGITS/tree/master/examples/semantic-segmentation) example for more background info on segmentation.\n\n### Downloading Aerial Drone Dataset\n\nAs an example of image segmentation, we'll work with an aerial drone dataset that separates ground terrain from the sky.  The dataset is in First Person View (FPV) to emulate the vantage point of a drone in flight and train a network that functions as an autopilot guided by the terrain that it senses.\n\nTo download and extract the dataset, run the following commands from the host PC running the DIGITS server:\n\n``` bash\n$ wget --no-check-certificate https://nvidia.box.com/shared/static/ft9cc5yjvrbhkh07wcivu5ji9zola6i1.gz -O NVIDIA-Aerial-Drone-Dataset.tar.gz\n\nHTTP request sent, awaiting response... 200 OK\nLength: 7140413391 (6.6G) [application/octet-stream]\nSaving to: ‘NVIDIA-Aerial-Drone-Dataset.tar.gz’\n\nNVIDIA-Aerial-Drone-Datase 100%[======================================>]   6.65G  3.33MB/s    in 44m 44s \n\n2017-04-17 14:11:54 (2.54 MB/s) - ‘NVIDIA-Aerial-Drone-Dataset.tar.gz’ saved [7140413391/7140413391]\n\n$ tar -xzvf NVIDIA-Aerial-Drone-Dataset.tar.gz \n```\n\nThe dataset includes various clips captured from flights of drone platforms, but the one we'll be focusing on in this tutorial is under `FPV/SFWA`.  Next we'll create the training database in DIGITS before training the model.\n\n### Importing the Aerial Dataset into DIGITS\n\nFirst, navigate your browser to your DIGITS server instance and choose to create a new `Segmentation Dataset` from the drop-down in the Datasets tab:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-create-dataset.png\" width=\"250\">\n\nIn the dataset creation form, specify the following options and paths to the image and label folders under the location where you extracted the aerial dataset:\n\n* Feature image folder:  `NVIDIA-Aerial-Drone-Dataset/FPV/SFWA/720p/images`\n* Label image folder:   `NVIDIA-Aerial-Drone-Dataset/FPV/SFWA/720p/labels`\n* set `% for validation` to 1%\n* Class labels:  `NVIDIA-Aerial-Drone-Dataset/FPV/SFWA/fpv-labels.txt`\n* Color map:  From text file\n* Feature Encoding:  `None`\n* Label Encoding:  `None`\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-aerial-dataset-options.png)\n\nName the dataset whatever you choose and click the `Create` button at the bottom of the page to launch the importing job.  Next we'll create the new segmentation model and begin training.\n\n### Generating Pretrained FCN-Alexnet\n\nFully Convolutional Network (FCN) Alexnet is the network topology that we'll use for segmentation models with DIGITS and TensorRT.  See this [Parallel ForAll](https://devblogs.nvidia.com/parallelforall/image-segmentation-using-digits-5) article about the convolutionalizing process.  A new feature to DIGITS5 was supporting segmentation datasets and training models.  A script is included with the DIGITS semantic segmentation example which converts the Alexnet model into FCN-Alexnet.  This base model is then used as a pre-trained starting point for training future FCN-Alexnet segmentation models on custom datasets.\n\nTo generate the pre-trained FCN-Alexnet model, open a terminal, navigate to the DIGITS semantic-segmantation example, and run the `net_surgery` script:\n\n``` bash\n$ cd DIGITS/examples/semantic-segmentation\n$ ./net_surgery.py\nDownloading files (this might take a few minutes)...\nDownloading https://raw.githubusercontent.com/BVLC/caffe/rc3/models/bvlc_alexnet/deploy.prototxt...\nDownloading http://dl.caffe.berkeleyvision.org/bvlc_alexnet.caffemodel...\nLoading Alexnet model...\n...\nSaving FCN-Alexnet model to fcn_alexnet.caffemodel\n```\n\n### Training FCN-Alexnet with DIGITS\n\nWhen the previous data import job is complete, return to the DIGITS home screen.  Select the `Models` tab and choose to create a new `Segmentation Model` from the drop-down:\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-create-model.png\" width=\"250\">\n\nIn the model creation form, select the dataset you previously created.  Set `Subtract Mean` to None and the `Base Learning Rate` to `0.0001`.  To set the network topology in DIGITS, select the `Custom Network` tab and make sure the `Caffe` sub-tab is selected.  Copy/paste the **[FCN-Alexnet prototxt](https://raw.githubusercontent.com/NVIDIA/DIGITS/master/examples/semantic-segmentation/fcn_alexnet.prototxt)** into the text box.  Finally, set the `Pretrained Model` to the output that the `net_surgery` generated above:  `DIGITS/examples/semantic-segmentation/fcn_alexnet.caffemodel`\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-aerial-model-options.png)\n\nGive your aerial model a name and click the `Create` button at the bottom of the page to start the training job.  After about 5 epochs, the `Accuracy` plot (in orange) should ramp up and the model becomes usable:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-aerial-model-converge.png)\n\nAt this point, we can try testing our new model's inference on some example images in DIGITS.\n\n### Testing Inference Model in DIGITS\n\nBefore transfering the trained model to Jetson, let's test it first in DIGITS.  On the same page as previous plot, scroll down under the `Trained Models` section.  Set the `Visualization Model` to *Image Segmentation* and under `Test a Single Image`, select an image to try (for example `/NVIDIA-Aerial-Drone-Dataset/FPV/SFWA/720p/images/0428.png`):\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-aerial-visualization-options.png\" width=\"350\">\n\nPress `Test One` and you should see a display similar to:\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-digits-aerial-infer.png)\n\nNext, download and extract the trained model snapshot to Jetson.\n\n### FCN-Alexnet Patches for TensorRT\n\nThere exist a couple non-essential layers included in the original FCN-Alexnet which aren't supported in TensorRT and should be deleted from the `deploy.prototxt` included in the snapshot. \n\nAt the end of `deploy.prototxt`, delete the deconv and crop layers:\n\n```\nlayer {\n  name: \"upscore\"\n  type: \"Deconvolution\"\n  bottom: \"score_fr\"\n  top: \"upscore\"\n  param {\n    lr_mult: 0.0\n  }\n  convolution_param {\n    num_output: 21\n    bias_term: false\n    kernel_size: 63\n    group: 21\n    stride: 32\n    weight_filler {\n      type: \"bilinear\"\n    }\n  }\n}\nlayer {\n  name: \"score\"\n  type: \"Crop\"\n  bottom: \"upscore\"\n  bottom: \"data\"\n  top: \"score\"\n  crop_param {\n    axis: 2\n    offset: 18\n  }\n}\n```\n\nAnd on line 24 of `deploy.prototxt`, change `pad: 100` to `pad: 0`.  Finally copy the `fpv-labels.txt` and `fpv-deploy-colors.txt` from the aerial dataset to your model snapshot folder on Jetson.  Your FCN-Alexnet model snapshot is now compatible with TensorRT.  Now we can run it on Jetson and perform inference on images.\n\n### Running Segmentation Models on Jetson\n\nTo test a custom segmentation network model snapshot on the Jetson, use the command line interface to test the segnet-console program.\n\nFirst, for convienience, set the path to your extracted snapshot into a `$NET` variable:\n\n``` bash\n$ NET=20170421-122956-f7c0_epoch_5.0\n\n$ ./segnet-console drone_0428.png output_0428.png \\\n--prototxt=$NET/deploy.prototxt \\\n--model=$NET/snapshot_iter_22610.caffemodel \\\n--labels=$NET/fpv-labels.txt \\\n--colors=$NET/fpv-deploy-colors.txt \\\n--input_blob=data \\ \n--output_blob=score_fr\n```\n\nThis runs the specified segmentation model on a test image downloaded with the repo.\n\n![Alt text](https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/segmentation-aerial-tensorRT.png)\n\nIn addition to the pre-trained aerial model from this tutorial, the repo also includes pre-trained models on other segmentation datasets, including **[Cityscapes](https://www.cityscapes-dataset.com/)**, **[SYNTHIA](http://synthia-dataset.net/)**, and **[Pascal-VOC](http://host.robots.ox.ac.uk/pascal/VOC/)**.\n\n\n## Extra Resources\n\nIn this area, links and resources for deep learning developers are listed:\n\n* [Appendix](docs/aux-contents.md)\n\t* [NVIDIA Deep Learning Institute](https://developer.nvidia.com/deep-learning-institute) — [Introductory QwikLabs](https://developer.nvidia.com/deep-learning-courses)\n     * [Building nvcaffe](docs/building-nvcaffe.md)\n\t* [Other Examples](docs/other-examples.md)\n\t* [ros_deep_learning](http://www.github.com/dusty-nv/ros_deep_learning) - TensorRT inference ROS nodes\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79DC:1F1FB6:177215:5C9DAD:6AB9213F"},"text_sha256":"edf75170bdf1fb19da2c574acfee6f51e54dca360f1e429349bcfcc8f561889c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3210","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:17903DA:1BAF654:6AB928FD"},"commit":{"sha":"45da40a8f3c180191b269f57f736caaa025b8a69","url":"https://github.com/dusty-nv/jetson-inference/commit/45da40a8f3c180191b269f57f736caaa025b8a69","date":"2025-10-16T17:34:47Z","author_date":"2025-10-16T17:34:47Z","committer_date":"2025-10-16T17:34:47Z","tree_sha":"90083b7a67b9e4e12905b5b649bc7d2185e97457","message_first_line":"Merge pull request #1942 from johnnynunez/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3209","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0852:0BA1:D70B91:FCB56C:6AB928FE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27140,"blob_sha":"f9c0f8d837ae8d68508804ce379cfdd63cab303c","priority":0}],"documents":[{"path":"README.md","size":27140,"blob_sha":"f9c0f8d837ae8d68508804ce379cfdd63cab303c","priority":0,"status":200,"text":"<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-header.jpg\" width=\"100%\">\n\n# Deploying Deep Learning\nWelcome to our instructional guide for inference and realtime vision [DNN library](#api-reference) for **[NVIDIA Jetson](https://developer.nvidia.com/embedded-computing)** devices.  This project uses **[TensorRT](https://developer.nvidia.com/tensorrt)** to run optimized networks on GPUs from C++ or Python, and PyTorch for training models.\n\nSupported DNN vision primitives include [`imageNet`](docs/imagenet-console-2.md) for image classification, [`detectNet`](docs/detectnet-console-2.md) for object detection, [`segNet`](docs/segnet-console-2.md) for semantic segmentation, [`poseNet`](docs/posenet.md) for pose estimation, and [`actionNet`](docs/actionnet.md) for action recognition.  Examples are provided for streaming from live camera feeds, making webapps with WebRTC, and support for ROS/ROS2.\n\n<img src=\"https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-primitives.jpg\">\n\nFollow the **[Hello AI World](#hello-ai-world)** tutorial for running inference and transfer learning onboard your Jetson, including collecting your own datasets, training your own models with PyTorch, and deploying them with TensorRT.\n\n### Table of Contents\n\n* [Hello AI World](#hello-ai-world)\n* [Jetson AI Lab](#jetson-ai-lab)\n* [Video Walkthroughs](#video-walkthroughs)\n* [API Reference](#api-reference)\n* [Code Examples](#code-examples)\n* [Pre-Trained Models](#pre-trained-models)\n* [System Requirements](#recommended-system-requirements)\n* [Change Log](CHANGELOG.md)\n\n> &gt; &nbsp; JetPack 6 is now supported on Orin devices ([developer.nvidia.com/jetpack](https://developer.nvidia.com/embedded/jetpack)) <br/>\n> &gt; &nbsp; Check out the Generative AI and LLM tutorials on [Jetson AI Lab](https://www.jetson-ai-lab.com/)! <br/>\n> &gt; &nbsp; See the [Change Log](CHANGELOG.md) for the latest updates and new features. <br/>\n\n## Hello AI World\n\nHello AI World can be run completely onboard your Jetson, including live inferencing with TensorRT and transfer learning with PyTorch.  For installation instructions, see [System Setup](#system-setup).  It's then recommended to start with the [Inference](#inference) section to familiarize yourself with the concepts, before diving into [Training](#training) your own models.\n\n#### System Setup\n\n* [Setting up Jetson with JetPack](docs/jetpack-setup-2.md)\n* [Running the Docker Container](docs/aux-docker.md)\n* [Building the Project from Source](docs/building-repo-2.md)\n\n#### Inference\n\n* [Image Classification](docs/imagenet-console-2.md)\n\t* [Using the ImageNet Program on Jetson](docs/imagenet-console-2.md)\n\t* [Coding Your Own Image Recognition Program (Python)](docs/imagenet-example-python-2.md)\n\t* [Coding Your Own Image Recognition Program (C++)](docs/imagenet-example-2.md)\n\t* [Running the Live Camera Recognition Demo](docs/imagenet-camera-2.md)\n\t* [Multi-Label Classification for Image Tagging](docs/imagenet-tagging.md)\n* [Object Detection](docs/detectnet-console-2.md)\n\t* [Detecting Objects from Images](docs/detectnet-console-2.md#detecting-objects-from-the-command-line)\n\t* [Running the Live Camera Detection Demo](docs/detectnet-camera-2.md)\n\t* [Coding Your Own Object Detection Program](docs/detectnet-example-2.md)\n\t* [Using TAO Detection Models](docs/detectnet-tao.md)\n\t* [Object Tracking on Video](docs/detectnet-tracking.md)\n* [Semantic Segmentation](docs/segnet-console-2.md)\n\t* [Segmenting Images from the Command Line](docs/segnet-console-2.md#segmenting-images-from-the-command-line)\n\t* [Running the Live Camera Segmentation Demo](docs/segnet-camera-2.md)\n* [Pose Estimation](docs/posenet.md)\n* [Action Recognition](docs/actionnet.md)\n* [Background Removal](docs/backgroundnet.md)\n* [Monocular Depth](docs/depthnet.md)\n\n#### Training\n\n* [Transfer Learning with PyTorch](docs/pytorch-transfer-learning.md)\n* Classification/Recognition (ResNet-18)\n\t* [Re-training on the Cat/Dog Dataset](docs/pytorch-cat-dog.md)\n\t* [Re-training on the PlantCLEF Dataset](docs/pytorch-plants.md)\n\t* [Collecting your own Classification Datasets](docs/pytorch-collect.md)\n* Object Detection (SSD-Mobilenet)\n\t* [Re-training SSD-Mobilenet](docs/pytorch-ssd.md)\n\t* [Collecting your own Detection Datasets](docs/pytorch-collect-detection.md)\n\n#### WebApp Frameworks\n\n* [WebRTC Server](docs/webrtc-server.md)\n* [HTML / JavaScript](docs/webrtc-html.md)\n* [Flask + REST](docs/webrtc-flask.md)\n* [Plotly Dashboard](docs/webrtc-dash.md)\n* [Recognizer (Interactive Training)](docs/webrtc-recognizer.md)\n\n#### Appendix\n\n* [Camera Streaming and Multimedia](docs/aux-streaming.md)\n* [Image Manipulation with CUDA](docs/aux-image.md)\n* [DNN Inference Nodes for ROS/ROS2](https://github.com/dusty-nv/ros_deep_learning)\n\n## Jetson AI Lab\n\n<a href=\"https://www.jetson-ai-lab.com\"><img align=\"right\" width=\"200\" height=\"200\" src=\"https://nvidia-ai-iot.github.io/jetson-generative-ai-playground/images/JON_Gen-AI-panels.png\"><\/a>\n\nThe [**Jetson AI Lab**](https://www.jetson-ai-lab.com) has additional tutorials on LLMs, Vision Transformers (ViT), and Vision Language Models (VLM) that run on Orin (and in some cases Xavier).  Check out some of these:\n\n<a href=\"https://www.jetson-ai-lab.com/tutorial_nanoowl.html\"><img src=\"https://github.com/NVIDIA-AI-IOT/nanoowl/raw/main/assets/jetson_person_2x.gif\"><\/a>\n> [NanoOWL - Open Vocabulary Object Detection ViT](https://www.jetson-ai-lab.com/tutorial_nanoowl.html) (container: [`nanoowl`](/packages/vit/nanoowl)) \n\n<a href=\"https://youtu.be/X-OXxPiUTuU\"><img width=\"600px\" src=\"https://raw.githubusercontent.com/dusty-nv/jetson-containers/docs/docs/images/live_llava.gif\"><\/a>\n> [Live Llava on Jetson AGX Orin](https://youtu.be/X-OXxPiUTuU) (container: [`local_llm`](/packages/llm/local_llm#live-llava)) \n\n<a href=\"https://youtu.be/dRmAGGuupuE\"><img width=\"600px\" src=\"https://raw.githubusercontent.com/dusty-nv/jetson-containers/docs/docs/images/live_llava_bear.jpg\"><\/a>\n> [Live Llava 2.0 - VILA + Multimodal NanoDB on Jetson Orin](https://youtu.be/X-OXxPiUTuU) (container: [`local_llm`](/packages/llm/local_llm#live-llava)) \n\n<a href=\"https://youtu.be/ayqKpQNd1Jw\"><img src=\"https://raw.githubusercontent.com/dusty-nv/jetson-containers/docs/docs/images/nanodb_horse.gif\"><\/a>\n> [Realtime Multimodal VectorDB on NVIDIA Jetson](https://www.youtube.com/watch?v=wzLHAgDxMjQ) (container: [`nanodb`](/packages/vectordb/nanodb))  \n\n## Video Walkthroughs\n\nBelow are screencasts of Hello AI World that were recorded for the [Jetson AI Certification](https://developer.nvidia.com/embedded/learn/jetson-ai-certification-programs) course:\n\n| Description                                                                                                                                                                                                                                                                                                        | Video                                                                                                                                                                                                                                                 |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| <a href=\"https://www.youtube.com/watch?v=QXIwdsyK7Rw&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=9\" target=\"_blank\">**Hello AI World Setup**<\/a><br/>Download and run the Hello AI World container on Jetson Nano, test your camera feed, and see how to stream it over the network via RTP.                                     | <a href=\"https://www.youtube.com/watch?v=QXIwdsyK7Rw&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=9\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_setup.jpg width=\"750\"><\/a>               |\n| <a href=\"https://www.youtube.com/watch?v=QatH8iF0Efk&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=10\" target=\"_blank\">**Image Classification Inference**<\/a><br/>Code your own Python program for image classification using Jetson Nano and deep learning, then experiment with realtime classification on a live camera stream. | <a href=\"https://www.youtube.com/watch?v=QatH8iF0Efk&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=10\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_imagenet.jpg width=\"750\"><\/a>           |\n| <a href=\"https://www.youtube.com/watch?v=sN6aT9TpltU&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=11\" target=\"_blank\">**Training Image Classification Models**<\/a><br/>Learn how to train image classification models with PyTorch onboard Jetson Nano, and collect your own classification datasets to create custom models.     | <a href=\"https://www.youtube.com/watch?v=sN6aT9TpltU&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=11\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_imagenet_training.jpg width=\"750\"><\/a>  |\n| <a href=\"https://www.youtube.com/watch?v=obt60r8ZeB0&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=12\" target=\"_blank\">**Object Detection Inference**<\/a><br/>Code your own Python program for object detection using Jetson Nano and deep learning, then experiment with realtime detection on a live camera stream.              | <a href=\"https://www.youtube.com/watch?v=obt60r8ZeB0&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=12\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_detectnet.jpg width=\"750\"><\/a>          |\n| <a href=\"https://www.youtube.com/watch?v=2XMkPW_sIGg&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=13\" target=\"_blank\">**Training Object Detection Models**<\/a><br/>Learn how to train object detection models with PyTorch onboard Jetson Nano, and collect your own detection datasets to create custom models.                  | <a href=\"https://www.youtube.com/watch?v=2XMkPW_sIGg&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=13\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_detectnet_training.jpg width=\"750\"><\/a> |\n| <a href=\"https://www.youtube.com/watch?v=AQhkMLaB_fY&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=14\" target=\"_blank\">**Semantic Segmentation**<\/a><br/>Experiment with fully-convolutional semantic segmentation networks on Jetson Nano, and run realtime segmentation on a live camera stream.                                 | <a href=\"https://www.youtube.com/watch?v=AQhkMLaB_fY&list=PL5B692fm6--uQRRDTPsJDp4o0xbzkoyf8&index=14\" target=\"_blank\"><img src=https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/thumbnail_segnet.jpg width=\"750\"><\/a>             |\n\n## API Reference\n\nBelow are links to reference documentation for the [C++](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/index.html) and [Python](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.html) libraries from the repo:\n\n#### jetson-inference\n\n|                    | [C++](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__deepVision.html) | [Python](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html) |\n|--------------------|--------------|--------------|\n| Image Recognition  | [`imageNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__imageNet.html#classimageNet) | [`imageNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#imageNet) |\n| Object Detection   | [`detectNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__detectNet.html#classdetectNet) | [`detectNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#detectNet)\n| Segmentation       | [`segNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__segNet.html#classsegNet) | [`segNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#segNet) |\n| Pose Estimation    | [`poseNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__poseNet.html#classposeNet) | [`poseNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#poseNet) |\n| Action Recognition | [`actionNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__actionNet.html#classactionNet) | [`actionNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#actionNet) |\n| Background Removal | [`backgroundNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__backgroundNet.html#classbackgroundNet) | [`actionNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#backgroundNet) |\n| Monocular Depth    | [`depthNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__depthNet.html#classdepthNet) | [`depthNet`](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.inference.html#depthNet) |\n\n#### jetson-utils\n\n* [C++](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/group__util.html)\n* [Python](https://rawgit.com/dusty-nv/jetson-inference/master/docs/html/python/jetson.utils.html)\n\nThese libraries are able to be used in external projects by linking to `libjetson-inference` and `libjetson-utils`.\n\n## Code Examples\n\nIntroductory code walkthroughs of using the library are covered during these steps of the Hello AI World tutorial:\n\n* [Coding Your Own Image Recognition Program (Python)](docs/imagenet-example-python-2.md)\n* [Coding Your Own Image Recognition Program (C++)](docs/imagenet-example-2.md)\n\nAdditional C++ and Python samples for running the networks on images and live camera streams can be found here:\n\n|                   | C++              | Python             |\n|-------------------|---------------------|---------------------|\n| &nbsp;&nbsp;&nbsp;Image Recognition  | [`imagenet.cpp`](examples/imagenet/imagenet.cpp) | [`imagenet.py`](python/examples/imagenet.py) |\n| &nbsp;&nbsp;&nbsp;Object Detection   | [`detectnet.cpp`](examples/detectnet/detectnet.cpp) | [`detectnet.py`](python/examples/detectnet.py) |\n| &nbsp;&nbsp;&nbsp;Segmentation       | [`segnet.cpp`](examples/segnet/segnet.cpp) | [`segnet.py`](python/examples/segnet.py) |\n| &nbsp;&nbsp;&nbsp;Pose Estimation    | [`posenet.cpp`](examples/posenet/posenet.cpp) | [`posenet.py`](python/examples/posenet.py) |\n| &nbsp;&nbsp;&nbsp;Action Recognition | [`actionnet.cpp`](examples/actionnet/actionnet.cpp) | [`actionnet.py`](python/examples/actionnet.py) |\n| &nbsp;&nbsp;&nbsp;Background Removal | [`backgroundnet.cpp`](examples/backgroundnet/backgroundnet.cpp) | [`backgroundnet.py`](python/examples/backgroundnet.py) |\n| &nbsp;&nbsp;&nbsp;Monocular Depth    | [`depthnet.cpp`](examples/depthnet/segnet.cpp) | [`depthnet.py`](python/examples/depthnet.py) |\n\n> **note**:  see the [Array Interfaces](docs/aux-image.md#array-interfaces) section for using memory with other Python libraries (like Numpy, PyTorch, ect)\n\nThese examples will automatically be compiled while [Building the Project from Source](docs/building-repo-2.md), and are able to run the pre-trained models listed below in addition to custom models provided by the user.  Launch each example with `--help` for usage info.\n\n## Pre-Trained Models\n\nThe project comes with a number of pre-trained models that are available to use and will be automatically downloaded:\n\n#### Image Recognition\n\n| Network       | CLI argument   | NetworkType enum |\n| --------------|----------------|------------------|\n| AlexNet       | `alexnet`      | `ALEXNET`        |\n| GoogleNet     | `googlenet`    | `GOOGLENET`      |\n| GoogleNet-12  | `googlenet-12` | `GOOGLENET_12`   |\n| ResNet-18     | `resnet-18`    | `RESNET_18`      |\n| ResNet-50     | `resnet-50`    | `RESNET_50`      |\n| ResNet-101    | `resnet-101`   | `RESNET_101`     |\n| ResNet-152    | `resnet-152`   | `RESNET_152`     |\n| VGG-16        | `vgg-16`       | `VGG-16`         |\n| VGG-19        | `vgg-19`       | `VGG-19`         |\n| Inception-v4  | `inception-v4` | `INCEPTION_V4`   |\n\n#### Object Detection\n\n| Model                   | CLI argument       | NetworkType enum   | Object classes       |\n| ------------------------|--------------------|--------------------|----------------------|\n| SSD-Mobilenet-v1        | `ssd-mobilenet-v1` | `SSD_MOBILENET_V1` | 91 ([COCO classes](../data/networks/ssd_coco_labels.txt))     |\n| SSD-Mobilenet-v2        | `ssd-mobilenet-v2` | `SSD_MOBILENET_V2` | 91 ([COCO classes](../data/networks/ssd_coco_labels.txt))     |\n| SSD-Inception-v2        | `ssd-inception-v2` | `SSD_INCEPTION_V2` | 91 ([COCO classes](../data/networks/ssd_coco_labels.txt))     |\n| TAO PeopleNet           | `peoplenet`        | `PEOPLENET`        | person, bag, face    |\n| TAO PeopleNet (pruned)  | `peoplenet-pruned` | `PEOPLENET_PRUNED` | person, bag, face    |\n| TAO DashCamNet          | `dashcamnet`       | `DASHCAMNET`       | person, car, bike, sign |\n| TAO TrafficCamNet       | `trafficcamnet`    | `TRAFFICCAMNET`    | person, car, bike, sign | \n| TAO FaceDetect          | `facedetect`       | `FACEDETECT`       | face                 |\n\n<details>\n<summary>Legacy Detection Models<\/summary>\n\n| Model                   | CLI argument       | NetworkType enum   | Object classes       |\n| ------------------------|--------------------|--------------------|----------------------|\n| DetectNet-COCO-Dog      | `coco-dog`         | `COCO_DOG`         | dogs                 |\n| DetectNet-COCO-Bottle   | `coco-bottle`      | `COCO_BOTTLE`      | bottles              |\n| DetectNet-COCO-Chair    | `coco-chair`       | `COCO_CHAIR`       | chairs               |\n| DetectNet-COCO-Airplane | `coco-airplane`    | `COCO_AIRPLANE`    | airplanes            |\n| ped-100                 | `pednet`           | `PEDNET`           | pedestrians          |\n| multiped-500            | `multiped`         | `PEDNET_MULTI`     | pedestrians, luggage |\n| facenet-120             | `facenet`          | `FACENET`          | faces                |\n\n<\/details>\n\n#### Semantic Segmentation\n\n| Dataset      | Resolution | CLI Argument | Accuracy | Jetson Nano | Jetson Xavier |\n|:------------:|:----------:|--------------|:--------:|:-----------:|:-------------:|\n| [Cityscapes](https://www.cityscapes-dataset.com/) | 512x256 | `fcn-resnet18-cityscapes-512x256` | 83.3% | 48 FPS | 480 FPS |\n| [Cityscapes](https://www.cityscapes-dataset.com/) | 1024x512 | `fcn-resnet18-cityscapes-1024x512` | 87.3% | 12 FPS | 175 FPS |\n| [Cityscapes](https://www.cityscapes-dataset.com/) | 2048x1024 | `fcn-resnet18-cityscapes-2048x1024` | 89.6% | 3 FPS | 47 FPS |\n| [DeepScene](http://deepscene.cs.uni-freiburg.de/) | 576x320 | `fcn-resnet18-deepscene-576x320` | 96.4% | 26 FPS | 360 FPS |\n| [DeepScene](http://deepscene.cs.uni-freiburg.de/) | 864x480 | `fcn-resnet18-deepscene-864x480` | 96.9% | 14 FPS | 190 FPS |\n| [Multi-Human](https://lv-mhp.github.io/) | 512x320 | `fcn-resnet18-mhp-512x320` | 86.5% | 34 FPS | 370 FPS |\n| [Multi-Human](https://lv-mhp.github.io/) | 640x360 | `fcn-resnet18-mhp-512x320` | 87.1% | 23 FPS | 325 FPS |\n| [Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | 320x320 | `fcn-resnet18-voc-320x320` | 85.9% | 45 FPS | 508 FPS |\n| [Pascal VOC](http://host.robots.ox.ac.uk/pascal/VOC/) | 512x320 | `fcn-resnet18-voc-512x320` | 88.5% | 34 FPS | 375 FPS |\n| [SUN RGB-D](http://rgbd.cs.princeton.edu/) | 512x400 | `fcn-resnet18-sun-512x400` | 64.3% | 28 FPS | 340 FPS |\n| [SUN RGB-D](http://rgbd.cs.princeton.edu/) | 640x512 | `fcn-resnet18-sun-640x512` | 65.1% | 17 FPS | 224 FPS |\n\n* If the resolution is omitted from the CLI argument, the lowest resolution model is loaded\n* Accuracy indicates the pixel classification accuracy across the model's validation dataset\n* Performance is measured for GPU FP16 mode with JetPack 4.2.1, `nvpmodel 0` (MAX-N)\n\n<details>\n<summary>Legacy Segmentation Models<\/summary>\n\n| Network                 | CLI Argument                    | NetworkType enum                | Classes |\n| ------------------------|---------------------------------|---------------------------------|---------|\n| Cityscapes (2048x2048)  | `fcn-alexnet-cityscapes-hd`     | `FCN_ALEXNET_CITYSCAPES_HD`     |    21   |\n| Cityscapes (1024x1024)  | `fcn-alexnet-cityscapes-sd`     | `FCN_ALEXNET_CITYSCAPES_SD`     |    21   |\n| Pascal VOC (500x356)    | `fcn-alexnet-pascal-voc`        | `FCN_ALEXNET_PASCAL_VOC`        |    21   |\n| Synthia (CVPR16)        | `fcn-alexnet-synthia-cvpr`      | `FCN_ALEXNET_SYNTHIA_CVPR`      |    14   |\n| Synthia (Summer-HD)     | `fcn-alexnet-synthia-summer-hd` | `FCN_ALEXNET_SYNTHIA_SUMMER_HD` |    14   |\n| Synthia (Summer-SD)     | `fcn-alexnet-synthia-summer-sd` | `FCN_ALEXNET_SYNTHIA_SUMMER_SD` |    14   |\n| Aerial-FPV (1280x720)   | `fcn-alexnet-aerial-fpv-720p`   | `FCN_ALEXNET_AERIAL_FPV_720p`   |     2   |\n\n<\/details>\n\n#### Pose Estimation\n\n| Model                   | CLI argument       | NetworkType enum   | Keypoints |\n| ------------------------|--------------------|--------------------|-----------|\n| Pose-ResNet18-Body      | `resnet18-body`    | `RESNET18_BODY`    | 18        |\n| Pose-ResNet18-Hand      | `resnet18-hand`    | `RESNET18_HAND`    | 21        |\n| Pose-DenseNet121-Body   | `densenet121-body` | `DENSENET121_BODY` | 18        |\n\n#### Action Recognition\n\n| Model                    | CLI argument | Classes |\n| -------------------------|--------------|---------|\n| Action-ResNet18-Kinetics | `resnet18`   |  1040   |\n| Action-ResNet34-Kinetics | `resnet34`   |  1040   |\n\n## Recommended System Requirements\n\n* Jetson Nano Developer Kit with JetPack 4.2 or newer (Ubuntu 18.04 aarch64).  \n* Jetson Nano 2GB Developer Kit with JetPack 4.4.1 or newer (Ubuntu 18.04 aarch64).\n* Jetson Orin Nano Developer Kit with JetPack 5.0 or newer (Ubuntu 20.04 aarch64).\n* Jetson Xavier NX Developer Kit with JetPack 4.4 or newer (Ubuntu 18.04 aarch64).  \n* Jetson AGX Xavier Developer Kit with JetPack 4.0 or newer (Ubuntu 18.04 aarch64).  \n* Jetson AGX Orin Developer Kit with JetPack 5.0 or newer (Ubuntu 20.04 aarch64).\n* Jetson TX2 Developer Kit with JetPack 3.0 or newer (Ubuntu 16.04 aarch64).  \n* Jetson TX1 Developer Kit with JetPack 2.3 or newer (Ubuntu 16.04 aarch64).  \n\nThe [Transfer Learning with PyTorch](#training) section of the tutorial speaks from the perspective of running PyTorch onboard Jetson for training DNNs, however the same PyTorch code can be used on a PC, server, or cloud instance with an NVIDIA discrete GPU for faster training.\n\n\n## Extra Resources\n\nIn this area, links and resources for deep learning are listed:\n\n* [ros_deep_learning](http://www.github.com/dusty-nv/ros_deep_learning) - TensorRT inference ROS nodes\n* [NVIDIA AI IoT](https://github.com/NVIDIA-AI-IOT) - NVIDIA Jetson GitHub repositories\n* [Jetson eLinux Wiki](https://www.eLinux.org/Jetson) - Jetson eLinux Wiki\n\n\n## Two Days to a Demo (DIGITS)\n\n> **note:** the DIGITS/Caffe tutorial from below is deprecated.  It's recommended to follow the [Transfer Learning with PyTorch](#training) tutorial from Hello AI World.\n \n<details>\n<summary>Expand this section to see original DIGITS tutorial (deprecated)<\/summary>\n<br/>\nThe DIGITS tutorial includes training DNN's in the cloud or PC, and inference on the Jetson with TensorRT, and can take roughly two days or more depending on system setup, downloading the datasets, and the training speed of your GPU.\n\n* [DIGITS Workflow](docs/digits-workflow.md) \n* [DIGITS System Setup](docs/digits-setup.md)\n* [Setting up Jetson with JetPack](docs/jetpack-setup.md)\n* [Building the Project from Source](docs/building-repo.md)\n* [Classifying Images with ImageNet](docs/imagenet-console.md)\n\t* [Using the Console Program on Jetson](docs/imagenet-console.md#using-the-console-program-on-jetson)\n\t* [Coding Your Own Image Recognition Program](docs/imagenet-example.md)\n\t* [Running the Live Camera Recognition Demo](docs/imagenet-camera.md)\n\t* [Re-Training the Network with DIGITS](docs/imagenet-training.md)\n\t* [Downloading Image Recognition Dataset](docs/imagenet-training.md#downloading-image-recognition-dataset)\n\t* [Customizing the Object Classes](docs/imagenet-training.md#customizing-the-object-classes)\n\t* [Importing Classification Dataset into DIGITS](docs/imagenet-training.md#importing-classification-dataset-into-digits)\n\t* [Creating Image Classification Model with DIGITS](docs/imagenet-training.md#creating-image-classification-model-with-digits)\n\t* [Testing Classification Model in DIGITS](docs/imagenet-training.md#testing-classification-model-in-digits)\n\t* [Downloading Model Snapshot to Jetson](docs/imagenet-snapshot.md)\n\t* [Loading Custom Models on Jetson](docs/imagenet-custom.md)\n* [Locating Objects with DetectNet](docs/detectnet-training.md)\n\t* [Detection Data Formatting in DIGITS](docs/detectnet-training.md#detection-data-formatting-in-digits)\n\t* [Downloading the Detection Dataset](docs/detectnet-training.md#downloading-the-detection-dataset)\n\t* [Importing the Detection Dataset into DIGITS](docs/detectnet-training.md#importing-the-detection-dataset-into-digits)\n\t* [Creating DetectNet Model with DIGITS](docs/detectnet-training.md#creating-detectnet-model-with-digits)\n\t* [Testing DetectNet Model Inference in DIGITS](docs/detectnet-training.md#testing-detectnet-model-inference-in-digits)\n\t* [Downloading the Detection Model to Jetson](docs/detectnet-snapshot.md)\n\t* [DetectNet Patches for TensorRT](docs/detectnet-snapshot.md#detectnet-patches-for-tensorrt)\n\t* [Detecting Objects from the Command Line](docs/detectnet-console.md)\n\t* [Multi-class Object Detection Models](docs/detectnet-console.md#multi-class-object-detection-models)\n\t* [Running the Live Camera Detection Demo on Jetson](docs/detectnet-camera.md)\n* [Semantic Segmentation with SegNet](docs/segnet-dataset.md)\n\t* [Downloading Aerial Drone Dataset](docs/segnet-dataset.md#downloading-aerial-drone-dataset)\n\t* [Importing the Aerial Dataset into DIGITS](docs/segnet-dataset.md#importing-the-aerial-dataset-into-digits)\n\t* [Generating Pretrained FCN-Alexnet](docs/segnet-pretrained.md)\n\t* [Training FCN-Alexnet with DIGITS](docs/segnet-training.md)\n\t* [Testing Inference Model in DIGITS](docs/segnet-training.md#testing-inference-model-in-digits)\n\t* [FCN-Alexnet Patches for TensorRT](docs/segnet-patches.md)\n\t* [Running Segmentation Models on Jetson](docs/segnet-console.md)\n\n<\/details>\n\n##\n<p align=\"center\"><sup>© 2016-2019 NVIDIA | <\/sup><a href=\"#deploying-deep-learning\"><sup>Table of Contents<\/sup><\/a><\/p>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C96E:3BCC6:174C8E:5C78D5:6AB92142"},"text_sha256":"979513b99a3a7ccd3dea68c178036748be1a4867d7ca0b3c5ef50377ca8af801"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"MITDeepLearning/introtodeeplearning","input_row":{"repository":"MITDeepLearning/introtodeeplearning","url":"https://github.com/MITDeepLearning/introtodeeplearning","name":"introtodeeplearning","owner":"MITDeepLearning","description":"Lab Materials for MIT 6.S191: Introduction to Deep Learning","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":8802,"issues":120,"created_at":"2018-01-28T18:26:44Z","updated_at":"2026-09-27T10:40:31Z","first_commit_at":"2018-01-28T23:18:26Z","last_commit_at":"2026-01-04T21:14:10Z","activity_months":95.200000000000003,"ai_ml_match_topics":"deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:31.308Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MITDeepLearning/introtodeeplearning","visibility":"public","created_at":"2018-01-28T18:26:44Z","updated_at":"2026-09-27T10:40:31Z","private":false,"fork":false,"archived":false,"stargazers_count":8802,"open_issues_count":97,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3208","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:17FAE5E:1C1A87C:6AB928FF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3207","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:1795378:1BB5041:6AB928FF"},"commit":{"sha":"c7b3c0f5734a4dab11e1b37feb8f3c0afd73be88","url":"https://github.com/MITDeepLearning/introtodeeplearning/commit/c7b3c0f5734a4dab11e1b37feb8f3c0afd73be88","date":"2018-04-24T14:35:00Z","author_date":"2018-04-24T14:35:00Z","committer_date":"2018-04-24T14:35:00Z","tree_sha":"379c777d93227bbb5ae740d0a8a57bbaad35483a","message_first_line":"Merge pull request #14 from mahendrakariya/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3206","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17CC60B:1BEC29E:6AB92900"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1201,"blob_sha":"e0d252cf4e8a3bdfab1083027f5630ec93497479","priority":0}],"documents":[{"path":"README.md","size":1201,"blob_sha":"e0d252cf4e8a3bdfab1083027f5630ec93497479","priority":0,"status":200,"text":"# MIT 6.S191: Introduction to Deep Learning\n\n## Installation:\nTo run these labs, first you must install the class docker container, which is available for free on the [DockerHub](https://hub.docker.com/r/mit6s191/iap2018/). This can be done by first installing Docker: [Ubuntu](https://www.docker.com/docker-ubuntu), [Mac OSX](https://www.docker.com/docker-mac), [Windows](https://www.docker.com/docker-windows)\n\nFor additional help to install Docker on Windows please see: [this link](WindowsDocker.md) -- thanks to Elrashid for putting it together! \n\n## Starting the enviornment\nOnce you donwload docker all you need to do is run the container to start! This can be done by running the following command in your command terminal:\n```\ndocker run -p 8888:8888 -p 6006:6006 -v /path/to/introtodeeplearning_labs:/notebooks/introtodeeplearning_labs mit6s191/iap2018:labs\n```\nMake sure you replace `/path/to/introtodeeplearning_labs` with the correct path to this github repo.\n\n## Running the labs\nNow, to run the labs, open the Jupyter notebook on `localhost:8888` and enter the `lab1` or `lab2` directory. Go through the notebooks and fill in the `#TODO` cells to get the code to compile for yourself!\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AA0E:386840:17E9C2:5D168C:6AB92144"},"text_sha256":"6f2caf3f5a43f0873a2cfdfcb2716a9d81dd70e54a48f1462abca7ea0729a553"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3205","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:17A18D6:1BC194F:6AB92900"},"commit":{"sha":"e44754eac7a61d489fb07a68245bfbb290823228","url":"https://github.com/MITDeepLearning/introtodeeplearning/commit/e44754eac7a61d489fb07a68245bfbb290823228","date":"2026-01-04T21:14:10Z","author_date":"2026-01-04T21:14:10Z","committer_date":"2026-01-04T21:14:10Z","tree_sha":"2d3836f7113467cf799d28bfe49dcede87899733","message_first_line":"Merge branch '2026'"},"tree_request_status":200,"tree_rate":{"github_remaining":"3204","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088F:7580A:17E8EBE:1C08DC4:6AB92900"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2737,"blob_sha":"821f6f25d184a03870f2b6533447c5c2dd3a9d42","priority":0}],"documents":[{"path":"README.md","size":2737,"blob_sha":"821f6f25d184a03870f2b6533447c5c2dd3a9d42","priority":0,"status":200,"text":"[![banner](assets/banner.png)](http://introtodeeplearning.com)\n\nThis repository contains all of the code and software labs for [MIT Introduction to Deep Learning](http://introtodeeplearning.com)! All lecture slides and videos are available on the program website.\n\n# Instructions\nMIT Introduction to Deep Learning software labs are designed to be completed at your own pace. At the end of each of the labs, there will be instructions on how you can submit your materials as part of the lab competitions. These instructions include what information must be submitted and in what format.\n\n## Opening the labs in Google Colaboratory:\n\nThe 2026 Introduction to Deep Learning labs will be run in Google's Colaboratory, a Jupyter notebook environment that runs entirely in the cloud, so you don't need to download anything. To run these labs, you must have a Google account.\n\nOn this Github repo, navigate to the lab folder you want to run (`lab1`, `lab2`, `lab3`) and open the appropriate python notebook (\\*.ipynb). Click the \"Run in Colab\" link on the top of the lab. That's it!\n\n## Running the labs\nNow, to run the labs, open the Jupyter notebook on Colab. Navigate to the \"Runtime\" tab --> \"Change runtime type\". In the pop-up window, under \"Runtime type\" select \"Python 3\", and under \"Hardware accelerator\" select \"GPU\". Go through the notebooks and fill in the `#TODO` cells to get the code to compile for yourself!\n\n\n### MIT Deep Learning package\nYou might notice that inside the labs we install the `mitdeeplearning` python package from the Python Package repository:\n\n`pip install mitdeeplearning`\n\nThis package contains convienence functions that we use throughout the course and can be imported like any other Python package.\n\n`>>> import mitdeeplearning as mdl`\n\nWe do this for you in each of the labs, but the package is also open source under the same license so you can also use it outside the class.\n\n## Lecture Videos\n\n[<img src=\"assets/video_play.png\" width=\"500\">](https://www.youtube.com/watch?v=njKP3FqW3Sk&list=PLtBw6njQRU-rwp5__7C0oIVt26ZgjG9NI&index=1)\n\nAll lecture videos are available publicly online and linked above! Use and/or modification of lecture slides outside of MIT Introduction to Deep Learning must reference:\n\n> © MIT Introduction to Deep Learning\n>\n> http://introtodeeplearning.com\n\n## License\nAll code in this repository is copyright 2026 [MIT Introduction to Deep Learning](http://introtodeeplearning.com). All Rights Reserved.\n\nLicensed under the MIT License. You may not use this file except in compliance with the License. Use and/or modification of this code outside of MIT Introduction to Deep Learning must reference:\n\n> © MIT Introduction to Deep Learning\n>\n> http://introtodeeplearning.com\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED2E:3B1F3:17E146:5D0EBA:6AB92144"},"text_sha256":"38d6889c35fa35387db38503a4295cbf8ddfbc0c8b3dc2aa925cf222d72979da"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"shenweichen/DeepCTR","input_row":{"repository":"shenweichen/DeepCTR","url":"https://github.com/shenweichen/DeepCTR","name":"DeepCTR","owner":"shenweichen","description":"Easy-to-use,Modular and Extendible package of deep-learning based CTR models .","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":8051,"issues":375,"created_at":"2017-10-07T07:40:37Z","updated_at":"2026-09-27T12:02:33Z","first_commit_at":"2017-10-07T07:39:02Z","last_commit_at":"2026-04-26T09:50:35Z","activity_months":102.59999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:33.762Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"shenweichen/DeepCTR","visibility":"public","created_at":"2017-10-07T07:40:37Z","updated_at":"2026-09-27T12:02:33Z","private":false,"fork":false,"archived":false,"stargazers_count":8051,"open_issues_count":62,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3203","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17BCCEF:1BDC839:6AB92901"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3202","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:17E6838:1C05F6B:6AB92902"},"commit":{"sha":"e666da279a878b3f1fe2969363cc5d6fa8d5408d","url":"https://github.com/shenweichen/DeepCTR/commit/e666da279a878b3f1fe2969363cc5d6fa8d5408d","date":"2018-01-15T14:54:49Z","author_date":"2018-01-15T14:54:49Z","committer_date":"2018-01-15T14:54:49Z","tree_sha":"7bbd79cc4af17c5d5ff83d89951fd50dce9735dd","message_first_line":"Add some features"},"tree_request_status":200,"tree_rate":{"github_remaining":"3201","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:17D3E76:1BF3C54:6AB92902"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1902,"blob_sha":"de41aede8153cebee0654e2059bbb27167b873ed","priority":0}],"documents":[{"path":"README.md","size":1902,"blob_sha":"de41aede8153cebee0654e2059bbb27167b873ed","priority":0,"status":200,"text":"# DeepCTR\n本仓库主要是进行论文的复现以及在基准数据集上的评测，提供简单易用的调用接口。使用TensorFlow实现是为了计算图定义的灵活性，同时提供类似Keras的调用接口。欢迎指正交流！\n## 依赖环境\n - python3\n - tensorflow==1.4.0\n - numpy==1.13.3\n - scikit-learn==0.19.1\n## 设计说明\n`base`基类仿照`keras`模型实现以下公有方法，包括\n- compile  \n  编译模型,指定优化器和损失函数以及度量\n- save_model 保存模型\n- load_mdel 加载模型\n- train_on_batch 小批量训练\n- fit 全量训练\n- test_on_batch 小批量评估\n- evaluate 模型评估\n- predict_on_batch 小批量预测\n- predict 全量预测\n私有方法包括\n- _create_optimizer\n- _create_metrics  \n- _compute_sample_weight\n\n同时设计了若干抽象方法\n- _get_input_data\n- _get_input_target\n- _get_output_target\n- _get_optimizer_loss\n- _build_graph  \n要求子类在`__init__`方法末尾调用`self._build_graph()`构建计算图。\n\n## 计划\n- 添加`tf.summary.FileWriter`\n- 添加自定义度量函数\n- 添加带权损失函数\n- 添加损失函数\n\n## DeepFM\n>DeepFM: A Factorization-Machine based Neural Network for CTR Prediction [arxiv](https://arxiv.org/abs/1703.04247)\n- 正则化项和损失函数还需要修改\n\n## DeepCrossNetwork\n> Deep & Cross Network for Ad Click Predictions [arxiv](https://arxiv.org/abs/1708.05123)\n\n实现和论文的区别\n- embedding_size  \n论文里提出每个field根据cardinality的不同来设置。这里用的是所有field具有相同embedding_size的实现，所以feature的编码是global的。\n- Batch normalization  \n论文在Deep Network部分采用了BN,采用BN貌似没有dropout效果好。\n- gradient clip  \n论文采用了梯度截断，范数设置为100\n- 其他\n论文采用512batch size，并提出使用早停来防止过拟合，L2和dropout正则效果一般。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3748:35999:1725E1:5C538E:6AB92146"},"text_sha256":"784b3eaa0de02e05f3fdf5dccb34f743bbd38befa8781238a88050b7cb1dade3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3200","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F0:280FBC:17A76C6:1BC6296:6AB92903"},"commit":{"sha":"1b5fe40e158d1ee6af8b1d9df217a5ed5aea9136","url":"https://github.com/shenweichen/DeepCTR/commit/1b5fe40e158d1ee6af8b1d9df217a5ed5aea9136","date":"2026-04-26T09:50:35Z","author_date":"2026-04-26T09:50:35Z","committer_date":"2026-04-26T09:50:35Z","tree_sha":"fd03d9de304a434cb5cbbc8c53bbfef36786d588","message_first_line":"Fix DeepFM dense-only loading, DNN save tracking, and FNN logits (#555)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3199","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0822:380E1C:17BB4E3:1BDA4E9:6AB92903"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12678,"blob_sha":"257f4a311fa52a38d5a71e10e10b4e257dfd81d4","priority":0}],"documents":[{"path":"README.md","size":12678,"blob_sha":"257f4a311fa52a38d5a71e10e10b4e257dfd81d4","priority":0,"status":200,"text":"# DeepCTR\n\n[![Python Versions](https://img.shields.io/pypi/pyversions/deepctr.svg)](https://pypi.org/project/deepctr)\n[![TensorFlow Versions](https://img.shields.io/badge/TensorFlow-1.15/2.0+-blue.svg)](https://pypi.org/project/deepctr)\n[![Downloads](https://pepy.tech/badge/deepctr)](https://pepy.tech/project/deepctr)\n[![PyPI Version](https://img.shields.io/pypi/v/deepctr.svg)](https://pypi.org/project/deepctr)\n[![GitHub Issues](https://img.shields.io/github/issues/shenweichen/deepctr.svg\n)](https://github.com/shenweichen/deepctr/issues)\n<!-- [![Activity](https://img.shields.io/github/last-commit/shenweichen/deepctr.svg)](https://github.com/shenweichen/DeepCTR/commits/master) -->\n\n\n[![Documentation Status](https://readthedocs.org/projects/deepctr-doc/badge/?version=latest)](https://deepctr-doc.readthedocs.io/)\n[![CI_TF1](https://github.com/shenweichen/DeepCTR/actions/workflows/ci.yml/badge.svg)](https://github.com/shenweichen/DeepCTR/actions/workflows/ci.yml)\n[![CI_TF2](https://github.com/shenweichen/DeepCTR/actions/workflows/ci2.yml/badge.svg)](https://github.com/shenweichen/DeepCTR/actions/workflows/ci2.yml)\n[![codecov](https://codecov.io/gh/shenweichen/DeepCTR/branch/master/graph/badge.svg)](https://codecov.io/gh/shenweichen/DeepCTR)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d4099734dc0e4bab91d332ead8c0bdd0)](https://www.codacy.com/gh/shenweichen/DeepCTR?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=shenweichen/DeepCTR&amp;utm_campaign=Badge_Grade)\n[![Disscussion](https://img.shields.io/badge/chat-wechat-brightgreen?style=flat)](./README.md#DisscussionGroup)\n[![License](https://img.shields.io/github/license/shenweichen/deepctr.svg)](https://github.com/shenweichen/deepctr/blob/master/LICENSE)\n<!-- [![Gitter](https://badges.gitter.im/DeepCTR/community.svg)](https://gitter.im/DeepCTR/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -->\n\n\nDeepCTR is a **Easy-to-use**, **Modular** and **Extendible** package of deep-learning based CTR models along with lots of\ncore components layers which can be used to easily build custom models.You can use any complex model with `model.fit()`\n，and `model.predict()` .\n\n- Provide `tf.keras.Model` like interfaces for **quick experiment**. [example](https://deepctr-doc.readthedocs.io/en/latest/Quick-Start.html#getting-started-4-steps-to-deepctr)\n- Provide  `tensorflow estimator` interface for **large scale data** and **distributed training**. [example](https://deepctr-doc.readthedocs.io/en/latest/Quick-Start.html#getting-started-4-steps-to-deepctr-estimator-with-tfrecord)\n- It is compatible with both `tf 1.15`  and `tf 2.x`.\n\n## Installation and compatibility\n\nDeepCTR does not pin or install TensorFlow for you. Install a TensorFlow build that matches your Python, NumPy, CPU/GPU, and operating system first, then install DeepCTR:\n\n```bash\npip install tensorflow\npip install deepctr\n```\n\nFor Python `>=3.9`, DeepCTR allows modern `h5py` releases with `h5py>=3.7.0`. If TensorFlow reports a NumPy conflict, follow the TensorFlow requirement for your selected TensorFlow release, for example using `numpy<2` when required by TensorFlow.\n\nUse public `tensorflow.keras` APIs in your own code and examples. Avoid mixing `tensorflow.python.keras` with `tensorflow.keras`, because `tensorflow.python.*` is private TensorFlow API and can break model serialization or optimizer/metric loading across TensorFlow versions.\n\nSome related projects:\n\n- DeepMatch: https://github.com/shenweichen/DeepMatch\n- DeepCTR-Torch: https://github.com/shenweichen/DeepCTR-Torch\n\nLet's [**Get Started!**](https://deepctr-doc.readthedocs.io/en/latest/Quick-Start.html)([Chinese\nIntroduction](https://zhuanlan.zhihu.com/p/53231955)) and [welcome to join us!](./CONTRIBUTING.md)\n\n## Models List\n\n|                 Model                  | Paper                                                                                                                                                           |\n| :------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|  Convolutional Click Prediction Model  | [CIKM 2015][A Convolutional Click Prediction Model](http://ir.ia.ac.cn/bitstream/173211/12337/1/A%20Convolutional%20Click%20Prediction%20Model.pdf)             |\n| Factorization-supported Neural Network | [ECIR 2016][Deep Learning over Multi-field Categorical Data: A Case Study on User Response Prediction](https://arxiv.org/pdf/1601.02376.pdf)                    |\n|      Product-based Neural Network      | [ICDM 2016][Product-based neural networks for user response prediction](https://arxiv.org/pdf/1611.00144.pdf)                                                   |\n|              Wide & Deep               | [DLRS 2016][Wide & Deep Learning for Recommender Systems](https://arxiv.org/pdf/1606.07792.pdf)                                                                 |\n|                 DeepFM                 | [IJCAI 2017][DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](http://www.ijcai.org/proceedings/2017/0239.pdf)                           |\n|        Piece-wise Linear Model         | [arxiv 2017][Learning Piece-wise Linear Models from Large Scale Data for Ad Click Prediction](https://arxiv.org/abs/1704.05194)                                 |\n|          Deep & Cross Network          | [ADKDD 2017][Deep & Cross Network for Ad Click Predictions](https://arxiv.org/abs/1708.05123)                                                                   |\n|   Attentional Factorization Machine    | [IJCAI 2017][Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks](http://www.ijcai.org/proceedings/2017/435) |\n|      Neural Factorization Machine      | [SIGIR 2017][Neural Factorization Machines for Sparse Predictive Analytics](https://arxiv.org/pdf/1708.05027.pdf)                                               |\n|                xDeepFM                 | [KDD 2018][xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems](https://arxiv.org/pdf/1803.05170.pdf)                         |\n|         Deep Interest Network          | [KDD 2018][Deep Interest Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1706.06978.pdf)     |\n|                AutoInt                 | [CIKM 2019][AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks](https://arxiv.org/abs/1810.11921)                              |\n|    Deep Interest Evolution Network     | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf)                                            |\n|                FwFM                    | [WWW 2018][Field-weighted Factorization Machines for Click-Through Rate Prediction in Display Advertising](https://arxiv.org/pdf/1806.03514.pdf)                |\n|                  ONN                  | [arxiv 2019][Operation-aware Neural Networks for User Response Prediction](https://arxiv.org/pdf/1904.12579.pdf)                                                |\n|                 FGCNN                  | [WWW 2019][Feature Generation by Convolutional Neural Network for Click-Through Rate Prediction ](https://arxiv.org/pdf/1904.04447)                             |\n|     Deep Session Interest Network      | [IJCAI 2019][Deep Session Interest Network for Click-Through Rate Prediction ](https://arxiv.org/abs/1905.06482)                                                |\n|                FiBiNET                 | [RecSys 2019][FiBiNET: Combining Feature Importance and Bilinear feature Interaction for Click-Through Rate Prediction](https://arxiv.org/pdf/1905.09433.pdf)   |\n|                FLEN                    | [arxiv 2019][FLEN: Leveraging Field for Scalable CTR Prediction](https://arxiv.org/pdf/1911.04690.pdf)   |\n|                 BST                   | [DLP-KDD 2019][Behavior sequence transformer for e-commerce recommendation in Alibaba](https://arxiv.org/pdf/1905.06874.pdf)                           | \n|                IFM                 | [IJCAI 2019][An Input-aware Factorization Machine for Sparse Prediction](https://www.ijcai.org/Proceedings/2019/0203.pdf)   |\n|                DCN V2                    | [arxiv 2020][DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems](https://arxiv.org/abs/2008.13535)   |\n|                DIFM                 | [IJCAI 2020][A Dual Input-aware Factorization Machine for CTR Prediction](https://www.ijcai.org/Proceedings/2020/0434.pdf)   |\n|   FEFM and DeepFEFM                    | [arxiv 2020][Field-Embedded Factorization Machines for Click-through rate prediction](https://arxiv.org/abs/2009.09931)                                         |\n|              SharedBottom               | [arxiv 2017][An Overview of Multi-Task Learning in Deep Neural Networks](https://arxiv.org/pdf/1706.05098.pdf)  |\n|   ESMM                    | [SIGIR 2018][Entire Space Multi-Task Model: An Effective Approach for Estimating Post-Click Conversion Rate](https://arxiv.org/abs/1804.07931)                       |\n|   MMOE                    | [KDD 2018][Modeling Task Relationships in Multi-task Learning with Multi-gate Mixture-of-Experts](https://dl.acm.org/doi/abs/10.1145/3219819.3220007)                   |\n|   PLE                    | [RecSys 2020][Progressive Layered Extraction (PLE): A Novel Multi-Task Learning (MTL) Model for Personalized Recommendations](https://dl.acm.org/doi/10.1145/3383313.3412236)                   |\n|   EDCN                   | [KDD 2021][Enhancing Explicit and Implicit Feature Interactions via Information Sharing for Parallel Deep CTR Models](https://dlp-kdd.github.io/assets/pdf/DLP-KDD_2021_paper_12.pdf)                   |\n\n## Citation\n\n- Weichen Shen. (2017). DeepCTR: Easy-to-use,Modular and Extendible package of deep-learning based CTR\n  models. https://github.com/shenweichen/deepctr.\n\nIf you find this code useful in your research, please cite it using the following BibTeX:\n\n```bibtex\n@misc{shen2017deepctr,\n  author = {Weichen Shen},\n  title = {DeepCTR: Easy-to-use,Modular and Extendible package of deep-learning based CTR models},\n  year = {2017},\n  publisher = {GitHub},\n  journal = {GitHub Repository},\n  howpublished = {\\url{https://github.com/shenweichen/deepctr}},\n}\n```\n\n## DisscussionGroup\n\n- [Github Discussions](https://github.com/shenweichen/DeepCTR/discussions)\n- Wechat Discussions\n\n|公众号：浅梦学习笔记|微信：deepctrbot|\n|:--:|:--:|\n| [![公众号](./docs/pics/code.png)](https://github.com/shenweichen/AlgoNotes)| [![微信](./docs/pics/deepctrbot.png)](https://github.com/shenweichen/AlgoNotes)|\n\n## Main contributors([welcome to join us!](./CONTRIBUTING.md))\n\n<table border=\"0\">\n  <tbody>\n    <tr align=\"center\" >\n      <td>\n        ​ <a href=\"https://github.com/shenweichen\"><img width=\"70\" height=\"70\" src=\"https://github.com/shenweichen.png?s=40\" alt=\"pic\"><\/a><br>\n        ​ <a href=\"https://github.com/shenweichen\">Shen Weichen<\/a> ​\n        <p>\n        Alibaba Group  <\/p>​\n      <\/td>\n      <td>\n         <a href=\"https://github.com/zanshuxun\"><img width=\"70\" height=\"70\" src=\"https://github.com/zanshuxun.png?s=40\" alt=\"pic\"><\/a><br>\n         <a href=\"https://github.com/zanshuxun\">Zan Shuxun<\/a> ​\n        <p>Alibaba Group  <\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/pandeconscious\"><img width=\"70\" height=\"70\" src=\"https://github.com/pandeconscious.png?s=40\" alt=\"pic\"><\/a><br>\n        ​ <a href=\"https://github.com/pandeconscious\">Harshit Pande<\/a>\n        <p> Amazon   <\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/morningsky\"><img width=\"70\" height=\"70\" src=\"https://github.com/morningsky.png?s=40\" alt=\"pic\"><\/a><br>\n        ​ <a href=\"https://github.com/morningsky\">Lai Mincai<\/a>\n        <p> ByteDance <\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/codewithzichao\"><img width=\"70\" height=\"70\" src=\"https://github.com/codewithzichao.png?s=40\" alt=\"pic\"><\/a><br>\n        ​ <a href=\"https://github.com/codewithzichao\">Li Zichao<\/a>\n        <p> ByteDance   <\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/TanTingyi\"><img width=\"70\" height=\"70\" src=\"https://github.com/TanTingyi.png?s=40\" alt=\"pic\"><\/a><br>\n         <a href=\"https://github.com/TanTingyi\">Tan Tingyi<\/a>\n         <p>  Chongqing University <br> of  Posts and <br> Telecommunications   <\/p>​\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5FA8:386840:17E9DE:5D1704:6AB92148"},"text_sha256":"764e65622d787bc05c713a1ea114d65ba69237289b5c57ae18cc85047eb7c9d5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"1adrianb/face-alignment","input_row":{"repository":"1adrianb/face-alignment","url":"https://github.com/1adrianb/face-alignment","name":"face-alignment","owner":"1adrianb","description":":fire: 2D and 3D Face alignment library build using pytorch ","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":7540,"issues":323,"created_at":"2017-09-15T20:32:44Z","updated_at":"2026-09-23T23:55:38Z","first_commit_at":"2017-09-15T20:32:44Z","last_commit_at":"2026-04-06T22:19:13Z","activity_months":102.66,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:36.101Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"1adrianb/face-alignment","visibility":"public","created_at":"2017-09-15T20:32:44Z","updated_at":"2026-09-23T23:55:38Z","private":false,"fork":false,"archived":false,"stargazers_count":7540,"open_issues_count":91,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"3198","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:17DD352:1BFD00A:6AB92904"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3197","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DC:71E0C:17D9B5B:1BF86E1:6AB92904"},"commit":{"sha":"2e5d1f330a0fb76323747d4f125510bc4a4d7b90","url":"https://github.com/1adrianb/face-alignment/commit/2e5d1f330a0fb76323747d4f125510bc4a4d7b90","date":"2018-05-13T10:49:04Z","author_date":"2018-05-13T10:49:04Z","committer_date":"2018-05-13T10:49:04Z","tree_sha":"af974df273d810e2ddcd90f63ca4f87a71885923","message_first_line":"updated required version"},"tree_request_status":200,"tree_rate":{"github_remaining":"3196","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:17DCAD3:1BFCB6B:6AB92904"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5588,"blob_sha":"0b4d867df0509ba7d271ef5ac6ed719277a564df","priority":0},{"path":"README.rst","size":0,"blob_sha":"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391","priority":0}],"documents":[{"path":"README.md","size":5588,"blob_sha":"0b4d867df0509ba7d271ef5ac6ed719277a564df","priority":0,"status":200,"text":"# Face Recognition\r\n\r\nDetect facial landmarks from Python using the world's most accurate face alignment network, capable of detecting points in both 2D and 3D coordinates.\r\n\r\nBuild using [FAN](https://www.adrianbulat.com)'s state-of-the-art deep learning based face alignment method. For detecting faces the library makes use of [dlib](http://dlib.net/) library.\r\n\r\n<p align=\"center\"><img src=\"docs/images/face-alignment-adrian.gif\" /><\/p>\r\n\r\n**Note:** The lua version is available [here](https://github.com/1adrianb/2D-and-3D-face-alignment).\r\n\r\nFor numerical evaluations it is highly recommended to use the lua version which uses indentical models with the ones evaluated in the paper. More models will be added soon.\r\n\r\n**New retrained models will be posted at the end of november**\r\n\r\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)  [![Build Status](https://travis-ci.org/1adrianb/face-alignment.svg?branch=master)](https://travis-ci.org/1adrianb/face-alignment)\r\n\r\n## Features\r\n\r\n#### Detect 2D facial landmarks in pictures\r\n\r\n<p align='center'>\r\n<img src='docs/images/2dlandmarks.png' title='3D-FAN-Full example' style='max-width:600px'><\/img>\r\n<\/p>\r\n\r\n```python\r\nimport face_alignment\r\nfrom skimage import io\r\n\r\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, enable_cuda=True, flip_input=False)\r\n\r\ninput = io.imread('../test/assets/aflw-test.jpg')\r\npreds = fa.get_landmarks(input)\r\n```\r\n\r\n#### Detect 3D facial landmarks in pictures\r\n\r\n<p align='center'>\r\n<img src='https://www.adrianbulat.com/images/image-z-examples.png' title='3D-FAN-Full example' style='max-width:600px'><\/img>\r\n<\/p>\r\n\r\n```python\r\nimport face_alignment\r\nfrom skimage import io\r\n\r\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, enable_cuda=True, flip_input=False)\r\n\r\ninput = io.imread('../test/assets/aflw-test.jpg')\r\npreds = fa.get_landmarks(input)\r\n```\r\n\r\n#### Find all faces present in a given image\r\n\r\n```python\r\nimport face_alignment\r\nfrom skimage import io\r\n\r\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, enable_cuda=False, flip_input=False)\r\n\r\ninput = io.imread('../test/assets/aflw-test.jpg')\r\npreds = fa.detect_faces(input)\r\n```\r\n\r\n#### Process an entire directory in one go\r\n\r\n```python\r\nimport face_alignment\r\nfrom skimage import io\r\n\r\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, enable_cuda=False, flip_input=False)\r\n\r\npreds = fa.process_folder('../test/assets/', all_faces=True)\r\n```\r\n\r\nPlease also see the ``examples`` folder\r\n\r\n## Installation\r\n\r\n### Requirements\r\n\r\n* Python 3.5+ or Python 2.7 (it may work with other versions too)\r\n* Linux or macOS (windows may work once pytorch gets supported)\r\n* pytorch (>=0.4)\r\n\r\nWhile not required, for optimal performance(especially for the detector) it is **highly** recommended to run the code using a CUDA enabled GPU.\r\n\r\n### Binaries\r\n\r\nConda builds are coming soon!\r\n\r\n### From source\r\n\r\n Install pytorch and pytorch dependencies. Instructions taken from [pytorch readme](https://github.com/pytorch/pytorch). For a more updated version check the framework github page.\r\n\r\n On Linux\r\n```bash\r\nexport CMAKE_PREFIX_PATH=\"$(dirname $(which conda))/../\" # [anaconda root directory]\r\n\r\n# Install basic dependencies\r\nconda install numpy pyyaml mkl setuptools cmake gcc cffi\r\n\r\n# Add LAPACK support for the GPU\r\nconda install -c soumith magma-cuda80 # or magma-cuda75 if CUDA 7.5\r\n```\r\n\r\nOn OSX\r\n```bash\r\nexport CMAKE_PREFIX_PATH=[anaconda root directory]\r\nconda install numpy pyyaml setuptools cmake cffi\r\n```\r\n#### Get the PyTorch source\r\n```bash\r\ngit clone --recursive https://github.com/pytorch/pytorch\r\n```\r\n\r\n#### Install PyTorch\r\nOn Linux\r\n```bash\r\npython setup.py install\r\n```\r\n\r\nOn OSX\r\n```bash\r\nMACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install\r\n```\r\n\r\n\r\n#### Get the Face Alignment source code\r\n```bash\r\ngit clone https://github.com/1adrianb/face-alignment\r\n```\r\n#### Install the Face Alignment lib\r\n```bash\r\npip install -r requirements.txt\r\npython setup.py install\r\n```\r\n\r\n### Docker image\r\n\r\nA Dockerfile is provided to build images with cuda support and cudnn v5. For more instructions about running and building a docker image check the orginal Docker documentation.\r\n```\r\ndocker build -t face-alignment .\r\n```\r\n\r\n## How does it work?\r\n\r\nWhile here the work is presented as a black-box, if you want to know more about the intrisecs of the method please check the original paper either on arxiv or my [webpage](https://www.adrianbulat.com).\r\n\r\n## Contributions\r\n\r\nAll contributions are welcomed. If you encounter any issue (including examples of images where it fails) feel free to open an issue.\r\n\r\n## Citation\r\n\r\n```\r\n@inproceedings{bulat2017far,\r\n  title={How far are we from solving the 2D \\& 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)},\r\n  author={Bulat, Adrian and Tzimiropoulos, Georgios},\r\n  booktitle={International Conference on Computer Vision},\r\n  year={2017}\r\n}\r\n```\r\n\r\nFor citing dlib, pytorch or any other packages used here please check the original page of their respective authors.\r\n\r\n## Acknowledgements\r\n\r\n* To the [dlib developers](http://dlib.net/) for making available the pretrained face detection model\r\n* To the [pytorch](http://pytorch.org/) team for providing such an awesome deeplearning framework\r\n* To [my supervisor](http://www.cs.nott.ac.uk/~pszyt/) for his patience and suggestions.\r\n* To all other python developers that made available the rest of the packages used in this repository.\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED2E:3B1F3:17E179:5D0F4F:6AB92149"},"text_sha256":"10d4bdbdac247ae7fc3f9c0e109295d447dbe94afe6e3da044c88e0585b3cef4"},{"path":"README.rst","size":0,"blob_sha":"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391","priority":0,"status":200,"text":"","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B65A:11316A:176FA8:5C9BD4:6AB9214A"},"text_sha256":""}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3195","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0834:0AC4:1280939:15D0639:6AB92905"},"commit":{"sha":"608505febb47082eb83c2e54254294b3044d976f","url":"https://github.com/1adrianb/face-alignment/commit/608505febb47082eb83c2e54254294b3044d976f","date":"2026-04-06T22:19:13Z","author_date":"2026-04-06T22:19:13Z","committer_date":"2026-04-06T22:19:13Z","tree_sha":"b72b602eb90a9a817325511ea1d7e8410fc8de15","message_first_line":"add permissions"},"tree_request_status":200,"tree_rate":{"github_remaining":"3194","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087B:2EA1B4:17C0D28:1BE0F1F:6AB92906"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7384,"blob_sha":"5d3ca548ece1def08c596e3544a068f1ee30523d","priority":0}],"documents":[{"path":"README.md","size":7384,"blob_sha":"5d3ca548ece1def08c596e3544a068f1ee30523d","priority":0,"status":200,"text":"# Face Recognition\n\nDetect facial landmarks from Python using the world's most accurate face alignment network, capable of detecting points in both 2D and 3D coordinates.\n\nBuild using [FAN](https://www.adrianbulat.com)'s state-of-the-art deep learning based face alignment method. \n\n<p align=\"center\"><img src=\"docs/images/face-alignment-adrian.gif\" /><\/p>\n\n**Note:** The lua version is available [here](https://github.com/1adrianb/2D-and-3D-face-alignment).\n\nFor numerical evaluations it is highly recommended to use the lua version which uses indentical models with the ones evaluated in the paper. More models will be added soon.\n\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)  [![Test Face alignment](https://github.com/1adrianb/face-alignment/workflows/Test%20Face%20alignment/badge.svg)](https://github.com/1adrianb/face-alignment/actions?query=workflow%3A%22Test+Face+alignment%22)\n[![PyPI version](https://badge.fury.io/py/face-alignment.svg)](https://pypi.org/project/face-alignment/)\n\n## Features\n\n#### Detect 2D facial landmarks in pictures\n\n<p align='center'>\n<img src='docs/images/2dlandmarks.png' title='3D-FAN-Full example' style='max-width:600px'><\/img>\n<\/p>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\ninput = io.imread('../test/assets/aflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### Detect 3D facial landmarks in pictures\n\n<p align='center'>\n<img src='https://www.adrianbulat.com/images/image-z-examples.png' title='3D-FAN-Full example' style='max-width:600px'><\/img>\n<\/p>\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.THREE_D, flip_input=False)\n\ninput = io.imread('../test/assets/aflw-test.jpg')\npreds = fa.get_landmarks(input)\n```\n\n#### Process an entire directory in one go\n\n```python\nimport face_alignment\nfrom skimage import io\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)\n\npreds = fa.get_landmarks_from_directory('../test/assets/')\n```\n\n#### Detect the landmarks using a specific face detector.\n\nBy default the package will use the SFD face detector. Pass `face_detector` to switch:\n\n```python\nimport face_alignment\n\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='sfd')\n```\n\n#### Supported face detectors\n\nThe library supports multiple face detection backends. SFD is the default and most accurate, but slower alternatives like BlazeFace, YuNet, or RetinaFace offer better speed. SCRFD requires the optional `onnxruntime` package (`pip install onnxruntime`).\n\n| Detector | `face_detector=` | CPU (ms) | MPS (ms) | PyTorch device |\n|---|---|---|---|---|\n| [**SFD**](https://arxiv.org/abs/1708.05237) | `'sfd'` | 138.8 | 33.1 | CPU / CUDA / MPS |\n| [**BlazeFace**](https://arxiv.org/abs/1907.05047) | `'blazeface'` | 10.9 | 8.2 | CPU / CUDA / MPS |\n| [**YuNet**](https://link.springer.com/article/10.1007/s11633-023-1423-y) | `'yunet'` | 5.6 | N/A | CPU only (OpenCV DNN) |\n| [**RetinaFace**](https://arxiv.org/abs/1905.00641) | `'retinaface'` | 25.2 | 15.5 | CPU / CUDA / MPS |\n| [**SCRFD**](https://arxiv.org/abs/2105.04714) | `'scrfd'` | 23.1 | N/A | CPU only (ONNX Runtime) |\n| **dlib** *(deprecated)* | `'dlib'` | — | — | CPU / CUDA |\n\n*Timings: detection only, median over 20 runs, single face 450x450 image, Apple M2.*\n\nYou can also skip detection entirely by passing `face_detector='folder'`, which loads pre-computed bounding boxes from `.npy`, `.t7`, or `.pth` files matching each image filename. This is useful for evaluation with ground truth boxes.\n\n```python\nimport face_alignment\n\n# BlazeFace back camera model (larger input, better for distant faces)\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='blazeface',\n                                  face_detector_kwargs={'back_model': True})\n\n# SCRFD (requires: pip install onnxruntime)\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='scrfd')\n\n# Use pre-computed bounding boxes from files alongside images\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, face_detector='folder')\n```\n\n#### Running on CPU/GPU\nIn order to specify the device (GPU or CPU) on which the code will run one can explicitly pass the device flag.\nThe landmark network is compiled with `torch.compile` by default for faster inference. Compilation artifacts are cached to disk, so only the first run is slow (~25s). Pass `compile=False` to disable.\n\n```python\nimport torch\nimport face_alignment\n\n# cuda for CUDA, mps for Apple M GPUs.\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, dtype=torch.bfloat16, device='cuda')\n\n# Skip compilation for instant startup\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cpu', compile=False)\n\n# Limit batch size for multi-face images on low-memory GPUs (default: 1)\nfa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device='cuda', max_batch_size=8)\n```\n\nPlease also see the ``examples`` folder\n\n## Installation\n\n### Requirements\n\n* Python 3.9+\n* Linux, Windows or macOS\n* PyTorch (>=2.0)\n\nWhile not required, for optimal performance(especially for the detector) it is **highly** recommended to run the code using a CUDA enabled GPU.\n\n### Binaries\n\nThe easiest way to install it is using either pip or conda:\n\n```\npip install face-alignment\n```\n\nAlternatively, you can build it from source.\n\n### From source\n\n Install pytorch and pytorch dependencies. Please check the [pytorch readme](https://github.com/pytorch/pytorch) for this.\n\n#### Get the Face Alignment source code\n```bash\ngit clone https://github.com/1adrianb/face-alignment\n```\n#### Install the Face Alignment lib\n```bash\npip install -r requirements.txt\npip install .\n```\n\n### Docker image\n\nA Dockerfile is provided to build images with cuda support and cudnn. For more instructions about running and building a docker image check the orginal Docker documentation.\n```\ndocker build -t face-alignment .\n```\n\n## How does it work?\n\nWhile here the work is presented as a black-box, if you want to know more about the intrisecs of the method please check the original paper either on arxiv or my [webpage](https://www.adrianbulat.com).\n\n## Contributions\n\nAll contributions are welcomed. If you encounter any issue (including examples of images where it fails) feel free to open an issue. If you plan to add a new features please open an issue to discuss this prior to making a pull request.\n\n## Citation\n\n```\n@inproceedings{bulat2017far,\n  title={How far are we from solving the 2D \\& 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)},\n  author={Bulat, Adrian and Tzimiropoulos, Georgios},\n  booktitle={International Conference on Computer Vision},\n  year={2017}\n}\n```\n\nFor citing dlib, pytorch or any other packages used here please check the original page of their respective authors.\n\n## Acknowledgements\n\n* To the [pytorch](http://pytorch.org/) team for providing such an awesome deeplearning framework\n* To [my supervisor](http://www.cs.nott.ac.uk/~pszyt/) for his patience and suggestions.\n* To all other python developers that made available the rest of the packages used in this repository.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FDB0:3FA0D:1725EE:5C52B7:6AB92149"},"text_sha256":"8fbe1da15e85c43a3fb589ff103f46d0c19dfb926145a1023771450a1cdb150b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"HIPS/autograd","input_row":{"repository":"HIPS/autograd","url":"https://github.com/HIPS/autograd","name":"autograd","owner":"HIPS","description":"Efficiently computes derivatives of NumPy code.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7535,"issues":423,"created_at":"2014-11-24T15:50:23Z","updated_at":"2026-09-26T12:29:55Z","first_commit_at":"2014-11-24T15:47:33Z","last_commit_at":"2026-09-15T02:07:43Z","activity_months":141.66999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:38.719Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"HIPS/autograd","visibility":"public","created_at":"2014-11-24T15:50:23Z","updated_at":"2026-09-26T12:29:55Z","private":false,"fork":false,"archived":false,"stargazers_count":7535,"open_issues_count":188,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3193","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:181E800:1C3E315:6AB92906"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3192","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0830:A9DC0:17A7941:1BC74D4:6AB92907"},"commit":{"sha":"442205dfefe407beffb33550846434baa90c4de7","url":"https://github.com/HIPS/autograd/commit/442205dfefe407beffb33550846434baa90c4de7","date":"2018-03-11T01:48:19Z","author_date":"2018-03-11T01:48:19Z","committer_date":"2018-03-11T01:48:19Z","tree_sha":"de0ed3a3fcb335878db1b29b9d9f01be18946da1","message_first_line":"Made np.dot vjps cast to required dtype"},"tree_request_status":200,"tree_rate":{"github_remaining":"3191","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:1792CE6:1BB2D56:6AB92907"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3961,"blob_sha":"d91d7fb931995762cc7ff384f8205c9fb92bf52a","priority":0}],"documents":[{"path":"README.md","size":3961,"blob_sha":"d91d7fb931995762cc7ff384f8205c9fb92bf52a","priority":0,"status":200,"text":"# Autograd  [![Test status](https://travis-ci.org/HIPS/autograd.svg?branch=master)](https://travis-ci.org/HIPS/autograd) [![asv](http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat)](#)\n\nAutograd can automatically differentiate native Python and Numpy code. It can\nhandle a large subset of Python's features, including loops, ifs, recursion and\nclosures, and it can even take derivatives of derivatives of derivatives. It\nsupports reverse-mode differentiation (a.k.a. backpropagation), which means it\ncan efficiently take gradients of scalar-valued functions with respect to\narray-valued arguments, as well as forward-mode differentiation, and the two can\nbe composed arbitrarily. The main intended application of Autograd is\ngradient-based optimization. For more information, check out the\n[tutorial](docs/tutorial.md) and the [examples directory](examples/).\n\nExample use:\n\n```python\n>>> import autograd.numpy as np  # Thinly-wrapped numpy\n>>> from autograd import grad    # The only autograd function you may ever need\n>>>\n>>> def tanh(x):                 # Define a function\n...     y = np.exp(-2.0 * x)\n...     return (1.0 - y) / (1.0 + y)\n...\n>>> grad_tanh = grad(tanh)       # Obtain its gradient function\n>>> grad_tanh(1.0)               # Evaluate the gradient at x = 1.0\n0.41997434161402603\n>>> (tanh(1.0001) - tanh(0.9999)) / 0.0002  # Compare to finite differences\n0.41997434264973155\n```\n\nWe can continue to differentiate as many times as we like, and use numpy's\nvectorization of scalar-valued functions across many different input values:\n\n```python\n>>> from autograd import elementwise_grad as egrad  # for functions that vectorize over inputs\n>>> import matplotlib.pyplot as plt\n>>> x = np.linspace(-7, 7, 200)\n>>> plt.plot(x, tanh(x),\n...          x, egrad(tanh)(x),                                     # first  derivative\n...          x, egrad(egrad(tanh))(x),                              # second derivative\n...          x, egrad(egrad(egrad(tanh)))(x),                       # third  derivative\n...          x, egrad(egrad(egrad(egrad(tanh))))(x),                # fourth derivative\n...          x, egrad(egrad(egrad(egrad(egrad(tanh)))))(x),         # fifth  derivative\n...          x, egrad(egrad(egrad(egrad(egrad(egrad(tanh))))))(x))  # sixth  derivative\n>>> plt.show()\n```\n\n<img src=\"examples/tanh.png\" width=\"600\">\n\nSee the [tanh example file](examples/tanh.py) for the code.\n\n## Documentation\n\nYou can find a tutorial [here.](docs/tutorial.md)\n\n## End-to-end examples\n\n* [Simple neural net](examples/neural_net.py)\n* [Convolutional neural net](examples/convnet.py)\n* [Recurrent neural net](examples/rnn.py)\n* [LSTM](examples/lstm.py)\n* [Neural Turing Machine](https://github.com/DoctorTeeth/diffmem/blob/512aadeefd6dbafc1bdd253a64b6be192a435dc3/ntm/ntm.py)\n* [Backpropagating through a fluid simulation](examples/fluidsim/fluidsim.py)\n\n<img src=\"examples/fluidsim/animated.gif\" width=\"400\">\n\n* [Variational inference in Bayesian neural network](examples/bayesian_neural_net.py)\n* [Gaussian process regression](examples/gaussian_process.py)\n* [Sampyl, a pure Python MCMC package with HMC and NUTS](https://github.com/mcleonard/sampyl)\n\n## How to install\n\nJust run `pip install autograd`\n\n## Authors\n\nAutograd was written by [Dougal Maclaurin](https://dougalmaclaurin.com),\n[David Duvenaud](https://www.cs.toronto.edu/~duvenaud/)\nand [Matt Johnson](http://people.csail.mit.edu/mattjj/),\nand we're actively developing it.\nPlease feel free to submit any bugs or feature requests.\nWe'd also love to hear about your experiences with autograd in general.\nDrop us an email!\n\nWe want to thank Jasper Snoek and the rest of the HIPS group (led by Prof. Ryan\nP. Adams) for helpful contributions and advice; Barak Pearlmutter for\nfoundational work on automatic differentiation and for guidance on our\nimplementation; and Analog Devices Inc. (Lyric Labs) and Samsung Advanced Institute\nof Technology for their generous support.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"74DC:3D501:17EDF5:5D1B6C:6AB9214C"},"text_sha256":"a971af7ccb2b2bc27f5aaa3d5a0c8e49c3010209308f788140ea6324e180c17d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3190","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A7:71C58:17A1D37:1BC1E64:6AB92908"},"commit":{"sha":"9778e34dc6b5b055ff648d87c15d0fb968bf1ead","url":"https://github.com/HIPS/autograd/commit/9778e34dc6b5b055ff648d87c15d0fb968bf1ead","date":"2026-06-29T17:52:19Z","author_date":"2026-06-29T17:52:19Z","committer_date":"2026-06-29T17:52:19Z","tree_sha":"566c6d25ddcab041df3ce9df6fdb62e0bf522e55","message_first_line":"chore: update pre-commit hooks (#791)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3189","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:17DCD17:1BFCE0A:6AB92908"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4780,"blob_sha":"be337995e6730c31d5e38a311307e3ca64c06089","priority":0}],"documents":[{"path":"README.md","size":4780,"blob_sha":"be337995e6730c31d5e38a311307e3ca64c06089","priority":0,"status":200,"text":"# Autograd  [![Checks status][checks-badge]][checks-url] [![Tests status][tests-badge]][tests-url] [![Publish status][publish-badge]][publish-url] [![asv][asv-badge]](#)\n\n[publish-badge]: https://github.com/HIPS/autograd/actions/workflows/publish.yml/badge.svg\n[checks-badge]: https://github.com/HIPS/autograd/actions/workflows/check.yml/badge.svg\n[tests-badge]: https://github.com/HIPS/autograd/actions/workflows/test.yml/badge.svg\n[asv-badge]: http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat\n[publish-url]: https://github.com/HIPS/autograd/actions/workflows/publish.yml\n[checks-url]: https://github.com/HIPS/autograd/actions/workflows/check.yml\n[tests-url]: https://github.com/HIPS/autograd/actions/workflows/test.yml\n\nAutograd can automatically differentiate native Python and Numpy code. It can\nhandle a large subset of Python's features, including loops, ifs, recursion and\nclosures, and it can even take derivatives of derivatives of derivatives. It\nsupports reverse-mode differentiation (a.k.a. backpropagation), which means it\ncan efficiently take gradients of scalar-valued functions with respect to\narray-valued arguments, as well as forward-mode differentiation, and the two can\nbe composed arbitrarily. The main intended application of Autograd is\ngradient-based optimization. For more information, check out the\n[tutorial](docs/tutorial.md) and the [examples directory](examples/).\n\nExample use:\n\n```python\n>>> import autograd.numpy as np  # Thinly-wrapped numpy\n>>> from autograd import grad    # The only autograd function you may ever need\n>>>\n>>> def tanh(x):                 # Define a function\n...     return (1.0 - np.exp((-2 * x))) / (1.0 + np.exp(-(2 * x)))\n...\n>>> grad_tanh = grad(tanh)       # Obtain its gradient function\n>>> grad_tanh(1.0)               # Evaluate the gradient at x = 1.0\nnp.float64(0.419974341614026)\n>>> (tanh(1.0001) - tanh(0.9999)) / 0.0002  # Compare to finite differences\nnp.float64(0.41997434264973155)\n```\n\nWe can continue to differentiate as many times as we like, and use numpy's\nvectorization of scalar-valued functions across many different input values:\n\n```python\n>>> from autograd import elementwise_grad as egrad  # for functions that vectorize over inputs\n>>> import matplotlib.pyplot as plt\n>>> x = np.linspace(-7, 7, 700)\n>>> plt.plot(x, tanh(x),\n...          x, egrad(tanh)(x),                                     # first  derivative\n...          x, egrad(egrad(tanh))(x),                              # second derivative\n...          x, egrad(egrad(egrad(tanh)))(x),                       # third  derivative\n...          x, egrad(egrad(egrad(egrad(tanh))))(x),)               # fourth derivative\n>>> plt.show()\n```\n\n<img src=\"examples/tanh.png\" width=\"600\">\n\nSee the [tanh example file](examples/tanh.py) for the code.\n\n## Documentation\n\nYou can find a tutorial [here.](docs/tutorial.md)\n\n## End-to-end examples\n\n* [Simple neural net](examples/neural_net.py)\n* [Convolutional neural net](examples/convnet.py)\n* [Recurrent neural net](examples/rnn.py)\n* [LSTM](examples/lstm.py)\n* [Neural Turing Machine](https://github.com/DoctorTeeth/diffmem/blob/512aadeefd6dbafc1bdd253a64b6be192a435dc3/ntm/ntm.py)\n* [Backpropagating through a fluid simulation](examples/fluidsim/fluidsim.py)\n\n<img src=\"examples/fluidsim/animated.gif\" width=\"400\">\n\n* [Variational inference in Bayesian neural network](examples/bayesian_neural_net.py)\n* [Gaussian process regression](examples/gaussian_process.py)\n* [Sampyl, a pure Python MCMC package with HMC and NUTS](https://github.com/mcleonard/sampyl)\n\n## How to install\n\nInstall Autograd using Pip:\n\n```shell\npip install autograd\n```\n\nSome features require SciPy, which you can install separately or as an\noptional dependency along with Autograd:\n\n```shell\npip install \"autograd[scipy]\"\n```\n\n## Authors and maintainers\n\nAutograd was written by [Dougal Maclaurin](https://dougalmaclaurin.com),\n[David Duvenaud](https://www.cs.toronto.edu/~duvenaud/),\n[Matt Johnson](http://people.csail.mit.edu/mattjj/),\n[Jamie Townsend](https://github.com/j-towns)\nand many other contributors. The package is currently being maintained by\n[Agriya Khetarpal](https://github.com/agriyakhetarpal),\n[Fabian Joswig](https://github.com/fjosw) and\n[Jamie Townsend](https://github.com/j-towns).\nPlease feel free to submit any bugs or\nfeature requests. We'd also love to hear about your experiences with Autograd\nin general. Drop us an email!\n\nWe want to thank Jasper Snoek and the rest of the HIPS group (led by Prof. Ryan\nP. Adams) for helpful contributions and advice; Barak Pearlmutter for\nfoundational work on automatic differentiation and for guidance on our\nimplementation; and Analog Devices Inc. (Lyric Labs) and Samsung Advanced Institute\nof Technology for their generous support.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4D4:241B62:17367A:5C6480:6AB9214C"},"text_sha256":"2db670ab3115689c46f94ca5e387c6b2417c9f49bc8bc0dfad23d6b3ef5c8aba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"h2oai/h2o-3","input_row":{"repository":"h2oai/h2o-3","url":"https://github.com/h2oai/h2o-3","name":"h2o-3","owner":"h2oai","description":"H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":7510,"issues":9689,"created_at":"2014-03-03T16:08:07Z","updated_at":"2026-09-26T19:11:23Z","first_commit_at":"2014-03-03T16:08:07Z","last_commit_at":"2026-09-20T11:18:58Z","activity_months":150.58000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:41.155Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"h2oai/h2o-3","visibility":"public","created_at":"2014-03-03T16:08:07Z","updated_at":"2026-09-26T19:11:23Z","private":false,"fork":false,"archived":false,"stargazers_count":7510,"open_issues_count":2856,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3188","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0930:2BC4E5:180C562:1C2C1AB:6AB92909"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3187","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A8:70FF5:17BD2A1:1BDCEAD:6AB92909"},"commit":{"sha":"7e9c35726cc1670ec671588eac2768cd5adb8043","url":"https://github.com/h2oai/h2o-3/commit/7e9c35726cc1670ec671588eac2768cd5adb8043","date":"2018-05-24T23:15:51Z","author_date":"2018-05-24T23:15:51Z","committer_date":"2018-05-24T23:15:51Z","tree_sha":"e8876fba1704ba08c01932892662d7ac7d36cee2","message_first_line":"make built front page match docs site (#2439)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3186","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092D:6C9BF:17EAEDC:1C0AF0B:6AB9290A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":34296,"blob_sha":"fc54514cfffb61b3eb3e9c6b756a6149b6725caf","priority":0},{"path":"h2o-docs/src/product/security.rst","size":33474,"blob_sha":"00a61f55e19335419579e9e76eac788df452edfa","priority":1}],"documents":[{"path":"README.md","size":34296,"blob_sha":"fc54514cfffb61b3eb3e9c6b756a6149b6725caf","priority":0,"status":200,"text":"# H2O\n\n[![Join the chat at https://gitter.im/h2oai/h2o-3](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/h2oai/h2o-3?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nH2O is an in-memory platform for distributed, scalable machine learning. H2O uses familiar interfaces like R, Python, Scala, Java, JSON and the Flow notebook/web interface, and works seamlessly with big data technologies like Hadoop and Spark. H2O provides implementations of many popular algorithms such as [GBM](https://en.wikipedia.org/wiki/Gradient_boosting), [Random Forest](https://en.wikipedia.org/wiki/Random_forest), [Deep Neural Networks](https://en.wikipedia.org/wiki/Deep_neural_networks), [Word2Vec](https://en.wikipedia.org/wiki/Word2vec) and [Stacked Ensembles](https://en.wikipedia.org/wiki/Ensemble_learning).  H2O is extensible so that developers can add data transformations and custom algorithms of their choice and access them through all of those clients.  \n\nData collection is easy. Decision making is hard. H2O makes it fast and easy to derive insights from your data through faster and better predictive modeling. H2O allows online scoring and modeling in a single platform.\n\nH2O-3 (this repository) is the third incarnation of H2O, and the successor to [H2O-2](https://github.com/h2oai/h2o-2).  \n\n### Table of Contents\n\n* [Downloading H2O-3](#Downloading)\n* [Open Source Resources](#Resources)\n    * [Issue Tracking and Feature Requests](#IssueTracking)\n    * [List of H2O Resources](#OpenSourceResources)\n* [Using H2O-3 Code Artifacts (libraries)](#Artifacts)\n* [Building H2O-3](#Building)\n* [Launching H2O after Building](#Launching)\n* [Building H2O on Hadoop](#BuildingHadoop)\n* [Sparkling Water](#Sparkling)\n* [Documentation](#Documentation)\n* [Citing H2O](#Citing)\n* [Community](#Community) / [Advisors](#Advisors) / [Investors](#Investors)\n\n<a name=\"Downloading\"><\/a>\n## 1. Downloading H2O-3\n\nWhile most of this README is written for developers who do their own builds, most H2O users just download and use a pre-built version.  If you are a Python or R user, the easiest way to install H2O is via [PyPI](https://pypi.python.org/pypi/h2o) or [Anaconda](https://anaconda.org/h2oai/h2o) (for Python) or [CRAN](https://CRAN.R-project.org/package=h2o) (for R):  \n\n#### Python\n\n```bash\npip install h2o\n```\n\n#### R\n\n```r\ninstall.packages(\"h2o\")\n```\n\nFor the latest stable, nightly, Hadoop (or Spark / Sparkling Water) releases, or the stand-alone H2O jar, please visit: [https://h2o.ai/download](https://h2o.ai/download)\n\nMore info on downloading & installing H2O is available in the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html).\n\n<a name=\"Resources\"><\/a>\n## 2. Open Source Resources\n\nMost people interact with three or four primary open source resources:  **GitHub** (which you've already found), **JIRA** (for bug reports and issue tracking), **Stack Overflow** for H2O code/software-specific questions, and **h2ostream** (a Google Group / email discussion forum) for questions not suitable for Stack Overflow.  There is also a **Gitter** H2O developer chat group, however for archival purposes & to maximize accessibility, we'd prefer that standard H2O Q&A be conducted on Stack Overflow.\n\n<a name=\"IssueTracking\"><\/a>\n### 2.1 Issue Tracking and Feature Requests\n\n> (Note: There is only one issue tracking system for the project.  GitHub issues are not enabled; you must use JIRA.)\n\nYou can browse and create new issues in our open source **JIRA**:  <http://jira.h2o.ai>\n\n*  You can **browse** and search for **issues** without logging in to JIRA:\n    1.  Click the `Issues` menu\n    1.  Click `Search for issues`\n*  To **create** an **issue** (either a bug or a feature request), please create yourself an account first:\n    1.  Click the `Log In` button on the top right of the screen\n    1.  Click `Create an acccount` near the bottom of the login box\n    1.  Once you have created an account and logged in, use the `Create` button on the menu to create an issue\n    1.  Create H2O-3 issues in the [PUBDEV](https://0xdata.atlassian.net/projects/PUBDEV/issues) project.  (Note: Sparkling Water questions should be filed under the [SW](https://0xdata.atlassian.net/projects/SW/issues) project.)\n*\tYou can also vote for feature requests and/or other issues. Voting can help H2O prioritize the features that are included in each release.\n\t1. Go to the [H2O JIRA page](https://0xdata.atlassian.net/).\n\t2. Click **Log In** to either log in or create an account if you do not already have one.\n\t3. Search for the feature that you want to prioritize, or create a new feature.\n\t4. Click on the **Vote for this issue** link. This is located on the right side of the issue under the **People** section.\n\n<a name=\"OpenSourceResources\"><\/a>\n### 2.2 List of H2O Resources\n\n*  GitHub\n    * <https://github.com/h2oai/h2o-3>\n*  JIRA -- file bug reports / track issues here\n    * The [PUBDEV](https://0xdata.atlassian.net/projects/PUBDEV/issues) project contains issues for the current H2O-3 project)\n*  Stack Overflow -- ask all code/software questions here\n    * <http://stackoverflow.com/questions/tagged/h2o>\n*  Cross Validated (Stack Exchange) -- ask algorithm/theory questions here\n    * <https://stats.stackexchange.com/questions/tagged/h2o>\n*  h2ostream Google Group -- ask non-code related questions here\n    * Web: <https://groups.google.com/d/forum/h2ostream>\n    * Mail to: [h2ostream@googlegroups.com](mailto:h2ostream@googlegroups.com)\n* Gitter H2O Developer Chat\n    * <https://gitter.im/h2oai/h2o-3>    \n*  Documentation\n    * H2O User Guide (main docs): <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/index.html>\n    * All H2O documenation links: <http://docs.h2o.ai>\n    * Nightly build page (nightly docs linked in page): <https://s3.amazonaws.com/h2o-release/h2o/master/latest.html>\n*  Download (pre-built packages)\n    * <http://h2o.ai/download>\n*  Jenkins (H2O build and test system)\n    * <http://test.h2o.ai>\n*  Website\n    * <http://h2o.ai>\n*  Twitter -- follow us for updates and H2O news!\n    * <https://twitter.com/h2oai>\n\n*  Awesome H2O -- share your H2O-powered creations with us\n   * <https://github.com/h2oai/awesome-h2o>\n\n\n<a name=\"Artifacts\"><\/a>\n## 3. Using H2O-3 Artifacts\n\nEvery nightly build publishes R, Python, Java, and Scala artifacts to a build-specific repository.  In particular, you can find Java artifacts in the maven/repo directory.\n\nHere is an example snippet of a gradle build file using h2o-3 as a dependency.  Replace x, y, z, and nnnn with valid numbers.\n\n```\n// h2o-3 dependency information\ndef h2oBranch = 'master'\ndef h2oBuildNumber = 'nnnn'\ndef h2oProjectVersion = \"x.y.z.${h2oBuildNumber}\"\n\nrepositories {\n  // h2o-3 dependencies\n  maven {\n    url \"https://s3.amazonaws.com/h2o-release/h2o-3/${h2oBranch}/${h2oBuildNumber}/maven/repo/\"\n  }\n}\n\ndependencies {\n  compile \"ai.h2o:h2o-core:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-algos:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-web:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-app:${h2oProjectVersion}\"\n}\n```\n\nRefer to the latest H2O-3 bleeding edge [nightly build page](http://s3.amazonaws.com/h2o-release/h2o-3/master/latest.html) for information about installing nightly build artifacts.\n\nRefer to the [h2o-droplets GitHub repository](https://github.com/h2oai/h2o-droplets) for a working example of how to use Java artifacts with gradle.\n\n> Note: Stable H2O-3 artifacts are periodically published to Maven Central ([click here to search](http://search.maven.org/#search%7Cga%7C1%7Cai.h2o)) but may substantially lag behind H2O-3 Bleeding Edge nightly builds.\n\n\n<a name=\"Building\"><\/a>\n## 4. Building H2O-3\n\nGetting started with H2O development requires [JDK 1.7](http://www.oracle.com/technetwork/java/javase/downloads/), [Node.js](https://nodejs.org/), [Gradle](https://gradle.org/), [Python](https://www.python.org/) and [R](http://www.r-project.org/).  We use the Gradle wrapper (called `gradlew`) to ensure up-to-date local versions of Gradle and other dependencies are installed in your development directory.\n\n### 4.1. Before building\n\nInstallation of `h2o` requires properly set up Python environment and following packages:\n```\ngrip\ncolorama\nfuture\ntabulate\nrequests\nwheel\n```\nTo install these packages you can use [pip](https://pip.pypa.io/en/stable/installing/) or [conda](https://conda.io/).\nIf you have troubles installing these packages on *Windows*, please follow section [Setup on Windows](#SetupWin) of this guide.\n> (Note: It is recommended to use some virtual environment such as [VirtualEnv](https://virtualenv.pypa.io/), to install all packages. )\n\n\n### 4.2. Building from the command line (Quick Start)\n\nTo build H2O from the repository, perform the following steps.\n\n\n#### Recipe 1: Clone fresh, build, skip tests, and run H2O\n\n```\n# Build H2O\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n./gradlew build -x test\n\nYou may encounter problems: e.g. npm missing. Install it:\nbrew install npm\n\n# Start H2O\njava -jar build/h2o.jar\n\n# Point browser to http://localhost:54321\n\n```\n\n#### Recipe 2: Clone fresh, build, and run tests (requires a working install of R)\n\n```\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew build\n```\n\n>**Notes**:\n>\n> - Running tests starts five test JVMs that form an H2O cluster and requires at least 8GB of RAM (preferably 16GB of RAM).\n> - Running `./gradlew syncRPackages` is supported on Windows, OS X, and Linux, and is strongly recommended but not required. `./gradlew syncRPackages` ensures a complete and consistent environment with pre-approved versions of the packages required for tests and builds. The packages can be installed manually, but we recommend setting an ENV variable and using `./gradlew syncRPackages`. To set the ENV variable, use the following format (where `${WORKSPACE} can be any path):\n>  \n> ```\n> mkdir -p ${WORKSPACE}/Rlibrary\n> export R_LIBS_USER=${WORKSPACE}/Rlibrary\n> ```\n\n#### Recipe 3:  Pull, clean, build, and run tests\n\n```\ngit pull\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew clean\n./gradlew build\n```\n\n#### Notes\n\n - We recommend using `./gradlew clean` after each `git pull`.\n\n- Skip tests by adding `-x test` at the end the gradle build command line.  Tests typically run for 7-10 minutes on a Macbook Pro laptop with 4 CPUs (8 hyperthreads) and 16 GB of RAM.\n\n- Syncing smalldata is not required after each pull, but if tests fail due to missing data files, then try `./gradlew syncSmalldata` as the first troubleshooting step.  Syncing smalldata downloads data files from AWS S3 to the smalldata directory in your workspace.  The sync is incremental.  Do not check in these files.  The smalldata directory is in .gitignore.  If you do not run any tests, you do not need the smalldata directory.\n- Running `./gradlew syncRPackages` is supported on Windows, OS X, and Linux, and is strongly recommended but not required. `./gradlew syncRPackages` ensures a complete and consistent environment with pre-approved versions of the packages required for tests and builds. The packages can be installed manually, but we recommend setting an ENV variable and using `./gradlew syncRPackages`. To set the ENV variable, use the following format (where `${WORKSPACE}` can be any path):\n\n  ```\n  mkdir -p ${WORKSPACE}/Rlibrary\n  export R_LIBS_USER=${WORKSPACE}/Rlibrary\n  ```\n\n#### Recipe 4:  Just building the docs\n\n```\n./gradlew clean && ./gradlew build -x test && (export DO_FAST=1; ./gradlew dist)\nopen target/docs-website/h2o-docs/index.html\n```\n\n<a name=\"SetupWin\"><\/a>\n### 4.3. Setup on Windows\n\n##### Step 1: Download and install [WinPython](https://winpython.github.io).\n  From the command line, validate `python` is using the newly installed package by using `which python` (or `sudo which python`). [Update the Environment variable](https://github.com/winpython/winpython/wiki/Environment) with the WinPython path.\n\n###### Step 2: Install required Python packages:\n\n    pip install grip\n    pip install tabulate\n    pip install wheel\n\n##### Step 3: Install JDK\n\nInstall [Java 1.7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) and add the appropriate directory `C:\\Program Files\\Java\\jdk1.7.0_65\\bin` with java.exe to PATH in Environment Variables. To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\nThe CLASSPATH variable also needs to be set to the lib subfolder of the JDK:\n\n    CLASSPATH=/<path>/<to>/<jdk>/lib\n\n##### Step 4. Install Node.js\n\nInstall [Node.js](http://nodejs.org/download/) and add the installed directory `C:\\Program Files\\nodejs`, which must include node.exe and npm.cmd to PATH if not already prepended.\n\n##### Step 5. Install R, the required packages, and Rtools:\n\nInstall [R](http://www.r-project.org/) and add the bin directory to your PATH if not already included.\n\n<a name=\"InstallRPackagesInUnix\"><\/a>\nInstall the following R packages:\n\n- [RCurl](http://cran.r-project.org/package=RCurl)\n- [jsonlite](http://cran.r-project.org/package=jsonlite)\n- [statmod](http://cran.r-project.org/package=statmod)\n- [devtools](http://cran.r-project.org/package=devtools)\n- [roxygen2](http://cran.r-project.org/package=roxygen2)\n- [testthat](http://cran.r-project.org/package=testthat)\n\nTo install these packages from within an R session:\n\n```r\npkgs <- c(\"RCurl\", \"jsonlite\", \"statmod\", \"devtools\", \"roxygen2\", \"testthat\")\nfor (pkg in pkgs) {\n  if (! (pkg %in% rownames(installed.packages()))) install.packages(pkg)\n}\n```\nNote that [libcurl](http://curl.haxx.se) is required for installation of the **RCurl** R package.\n\nFinally, install [Rtools](http://cran.r-project.org/bin/windows/Rtools/), which is a collection of command line tools to facilitate R development on Windows.\n>**NOTE**: During Rtools installation, do **not** install Cygwin.dll.\n\n##### Step 6. Install [Cygwin](https://cygwin.com/setup-x86_64.exe)\n**NOTE**: During installation of Cygwin, deselect the Python packages to avoid a conflict with the Python.org package.\n\n###### Step 6b. Validate Cygwin\nIf Cygwin is already installed, remove the Python packages or ensure that Native Python is before Cygwin in the PATH variable.\n\n##### Step 7. Update or validate the Windows PATH variable to include R, Java JDK, Cygwin.\n\n##### Step 8. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nIf you don't already have a Git client, please install one.  The default one can be found here http://git-scm.com/downloads.  Make sure that command prompt support is enabled before the installation.\n\nDownload and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 9. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew.bat build\n\n> If you encounter errors run again with `--stacktrace` for more instructions on missing dependencies.\n\n\n### 4.4. Setup on OS X\n\nIf you don't have [Homebrew](http://brew.sh/), we recommend installing it.  It makes package management for OS X easy.\n\n##### Step 1. Install JDK\n\nInstall [Java 1.7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html). To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\n##### Step 2. Install Node.js:\n\nUsing Homebrew:\n\n    brew install node\n\nOtherwise, install from the [NodeJS website](http://nodejs.org/download/).\n\n##### Step 3. Install R and the required packages:\n\nInstall [R](http://www.r-project.org/) and add the bin directory to your PATH if not already included.\n\n<a name=\"InstallRPackagesInUnix\"><\/a>\nInstall the following R packages:\n\n- [RCurl](http://cran.r-project.org/package=RCurl)\n- [jsonlite](http://cran.r-project.org/package=jsonlite)\n- [statmod](http://cran.r-project.org/package=statmod)\n- [devtools](http://cran.r-project.org/package=devtools)\n- [roxygen2](http://cran.r-project.org/package=roxygen2)\n- [testthat](http://cran.r-project.org/package=testthat)\n\nTo install these packages from within an R session:\n\n```r\npkgs <- c(\"RCurl\", \"jsonlite\", \"statmod\", \"devtools\", \"roxygen2\", \"testthat\")\nfor (pkg in pkgs) {\n  if (! (pkg %in% rownames(installed.packages()))) install.packages(pkg)\n}\n```\nNote that [libcurl](http://curl.haxx.se) is required for installation of the **RCurl** R package.\n\n\n\n##### Step 4. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nOS X should already have Git installed. To download and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 5. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew build\n\n> If you encounter errors run again with `--stacktrace` for more instructions on missing dependencies.\n\n### 4.5. Setup on Ubuntu 14.04\n\n##### Step 1. Install Node.js\n\n    curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -\n    sudo apt-get install -y nodejs\n\n##### Step 2. Install JDK:\n\nInstall [Java 1.7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html). Installation instructions can be found here [JDK installation](http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre). To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\n#### Step 3. Install R and the required packages:\n\nInstallation instructions can be found here [R installation](http://cran.r-project.org).  Click “Download R for Linux”.  Click “ubuntu”.  Follow the given instructions.\n\nTo install the required packages, follow the [same instructions as for OS X above](#InstallRPackagesInUnix).\n\n>**Note**: If the process fails to install RStudio Server on Linux, run one of the following:\n>\n>`sudo apt-get install libcurl4-openssl-dev`\n>\n>or\n>\n>`sudo apt-get install libcurl4-gnutls-dev`\n\n##### Step 4. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nIf you don't already have a Git client:\n\n    sudo apt-get install git\n\nDownload and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 5. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew build\n\n> If you encounter errors, run again using `--stacktrace` for more instructions on missing dependencies.\n\n> Make sure that you are not running as root, since `bower` will reject such a run.\n\n### 4.6. Setup on Ubuntu 13.10\n\n##### Step 1. Install Node.js\n\n    curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -\n    sudo apt-get install -y nodejs\n\n\n##### Steps 2-4. Follow steps 2-4 for Ubuntu 14.04 (above)\n\n### 4.7. Setting up your preferred IDE environment\n\nFor users of Intellij's IDEA, generate project files with:\n\n    ./gradlew idea\n\nFor users of Eclipse, generate project files with:\n\n    ./gradlew eclipse\n\n\n\n### 4.7 Setup on CentOS 7\n\n```\ncd /opt\nsudo wget --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie\" \"http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz\"\n\nsudo tar xzf jdk-7u79-linux-x64.tar.gz\ncd jdk1.7.0_79\n\nsudo alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 2\n\nsudo alternatives --install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2\nsudo alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 2\nsudo alternatives --set jar /opt/jdk1.7.0_79/bin/jar\nsudo alternatives --set javac /opt/jdk1.7.0_79/bin/javac\n\ncd /opt\n\nsudo wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm\nsudo rpm -ivh epel-release-7-5.noarch.rpm\n\nsudo echo \"multilib_policy=best\" >> /etc/yum.conf\nsudo yum -y update\n\nsudo yum -y install R R-devel git python-pip openssl-devel libxml2-devel libcurl-devel gcc gcc-c++ make openssl-devel kernel-devel texlive texinfo texlive-latex-fonts libX11-devel mesa-libGL-devel mesa-libGL nodejs npm python-devel numpy scipy python-pandas\n\nsudo pip install scikit-learn grip tabulate statsmodels wheel\n\nmkdir ~/Rlibrary\nexport JAVA_HOME=/opt/jdk1.7.0_79\nexport JRE_HOME=/opt/jdk1.7.0_79/jre\nexport PATH=$PATH:/opt/jdk1.7.0_79/bin:/opt/jdk1.7.0_79/jre/bin\nexport R_LIBS_USER=~/Rlibrary\n\n# install local R packages\nR -e 'install.packages(c(\"RCurl\",\"jsonlite\",\"statmod\",\"devtools\",\"roxygen2\",\"testthat\"), dependencies=TRUE, repos=\"http://cran.rstudio.com/\")'\n\ncd\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n\n# Build H2O\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew build -x test\n\n```\n\n\n<a name=\"Launching\"><\/a>\n## 5. Launching H2O after Building\n\nTo start the H2O cluster locally, execute the following on the command line:\n\n    java -jar build/h2o.jar\n\nA list of available start-up JVM and H2O options (e.g. `-Xmx`, `-nthreads`, `-ip`), is available in the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/starting-h2o.html#from-the-command-line).\n\n<a name=\"BuildingHadoop\"><\/a>\n## 6. Building H2O on Hadoop\n\nPre-built H2O-on-Hadoop zip files are available on the [download page](http://h2o.ai/download).  Each Hadoop distribution version has a separate zip file in h2o-3.\n\nTo build H2O with Hadoop support yourself, first install sphinx for python: `pip install sphinx`\nThen start the build by entering  the following from the top-level h2o-3 directory:\n\n    (export BUILD_HADOOP=1; ./gradlew build -x test)\n    ./gradlew dist\n\nThis will create a directory called 'target' and generate zip files there.  Note that `BUILD_HADOOP` is the default behavior when the username is `jenkins` (refer to `settings.gradle`); otherwise you have to request it, as shown above.\n\n\n### Adding support for a new version of Hadoop\n\nIn the `h2o-hadoop` directory, each Hadoop version has a build directory for the driver and an assembly directory for the fatjar.\n\nYou need to:\n\n1.  Add a new driver directory and assembly directory (each with a `build.gradle` file) in `h2o-hadoop`\n2.  Add these new projects to `h2o-3/settings.gradle`\n3.  Add the new Hadoop version to `HADOOP_VERSIONS` in `make-dist.sh`\n4.  Add the new Hadoop version to the list in `h2o-dist/buildinfo.json`\n\n\n### Secure user impersonation\n\nHadoop supports [secure user impersonation](https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/Superusers.html) through its Java API.  A kerberos-authenticated user can be allowed to proxy any username that meets specified criteria entered in the NameNode's core-site.xml file.  This impersonation only applies to interactions with the Hadoop API or the APIs of Hadoop-related services that support it (this is not the same as switching to that user on the machine of origin).\n\nSetting up secure user impersonation (for h2o):\n\n1.  Create or find an id to use as proxy which has limited-to-no access to HDFS or related services; the proxy user need only be used to impersonate a user\n2.  (Required if not using h2odriver) If you are not using the driver (e.g. you wrote your own code against h2o's API using Hadoop), make the necessary code changes to impersonate users (see [org.apache.hadoop.security.UserGroupInformation](http://hadoop.apache.org/docs/r2.8.0/api/org/apache/hadoop/security/UserGroupInformation.html))\n3.  In either of Ambari/Cloudera Manager or directly on the NameNode's core-site.xml file, add 2/3 properties for the user we wish to use as a proxy (replace <proxyusername> with the simple user name - not the fully-qualified principal name).\n    * `hadoop.proxyuser.<proxyusername>.hosts`: the hosts the proxy user is allowed to perform impersonated actions on behalf of a valid user from\n    * `hadoop.proxyuser.<proxyusername>.groups`: the groups an impersonated user must belong to for impersonation to work with that proxy user\n    * `hadoop.proxyuser.<proxyusername>.users`: the users a proxy user is allowed to impersonate\n    * Example: ```\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.hosts<\/name>\n                 <value>host1,host2<\/value>\n               <\/property>\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.groups<\/name>\n                 <value>group1,group2<\/value>\n               <\/property>\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.users<\/name>\n                 <value>user1,user2<\/value>\n               <\/property>\n               ```\n4.  Restart core services such as HDFS & YARN for the changes to take effect\n\nImpersonated HDFS actions can be viewed in the hdfs audit log ('auth:PROXY' should appear in the `ugi=` field in entries where this is applicable).  YARN similarly should show 'auth:PROXY' somewhere in the Resource Manager UI.\n\n\nTo use secure impersonation with h2o's Hadoop driver:\n\n*Before this is attempted, see Risks with impersonation, below*\n\nWhen using the h2odriver (e.g. when running with `hadoop jar ...`), specify `-principal <proxy user kerberos principal>`, `-keytab <proxy user keytab path>`, and `-run_as_user <hadoop username to impersonate>`, in addition to any other arguments needed.  If the configuration was successful, the proxy user will log in and impersonate the `-run_as_user` as long as that user is allowed by either the users or groups configuration property (configured above); this is enforced by HDFS & YARN, not h2o's code.  The driver effectively sets its security context as the impersonated user so all supported Hadoop actions will be performed as that user (e.g. YARN, HDFS APIs support securely impersonated users, but others may not).\n\n#### Precautions to take when leveraging secure impersonation\n\n*  The target use case for secure impersonation is applications or services that pre-authenticate a user and then use (in this case) the h2odriver on behalf of that user.  H2O's Steam is a perfect example: auth user in web app over SSL, impersonate that user when creating the h2o YARN container.\n*  The proxy user should have limited permissions in the Hadoop cluster; this means no permissions to access data or make API calls.  In this way, if it's compromised it would only have the power to impersonate a specific subset of the users in the cluster and only from specific machines.\n*  Use the `hadoop.proxyuser.<proxyusername>.hosts` property whenever possible or practical.\n*  Don't give the proxyusername's password or keytab to any user you don't want to impersonate another user (this is generally *any* user).  The point of impersonation is not to allow users to impersonate each other.  See the first bullet for the typical use case.\n*  Limit user logon to the machine the proxying is occurring from whenever practical.\n*  Make sure the keytab used to login the proxy user is properly secured and that users can't login as that id (via `su`, for instance)\n*  Never set hadoop.proxyuser.<proxyusername>.{users,groups} to '*' or 'hdfs', 'yarn', etc.  Allowing any user to impersonate hdfs, yarn, or any other important user/group should be done with extreme caution and *strongly* analyzed before it's allowed.\n\n#### Risks with secure impersonation\n\n*  The id performing the impersonation can be compromised like any other user id.\n*  Setting any `hadoop.proxyuser.<proxyusername>.{hosts,groups,users}` property to '*' can greatly increase exposure to security risk.\n*  When users aren't authenticated before being used with the driver (e.g. like Steam does via a secure web app/API), auditability of the process/system is difficult.\n\n\n### Debugging HDFS\n\nThese are the required steps to debug HDFS in IDEA as a standalone H2O process.\n\nDebugging H2O on Hadoop as a `hadoop jar` hadoop mapreduce job is a difficult thing to do. However, what you can do relatively easily is tweak the gradle settings for the project so that H2OApp has HDFS as a dependency.  Here are the steps:\n\n1.  Make the following changes to gradle build files below\n    *  Change the `hadoop-client` version in `h2o-persist-hdfs` to the desired version     \n    *  Add `h2o-persist-hdfs` as a dependency to `h2o-app`\n1.  Close IDEA\n1.  `./gradlew cleanIdea`\n1.  `./gradlew idea`\n1.  Re-open IDEA\n1.  Run or debug H2OApp, and you will now be able to read from HDFS inside the IDE debugger\n\n`h2o-persist-hdfs` is normally only a dependency of the assembly modules, since those are not used by any downstream modules.  We want the final module to define its own version of HDFS if any is desired.\n\nNote this example is for MapR 4, which requires the additional `org.json` dependency to work properly.\n\n```\n$ git diff\ndiff --git a/h2o-app/build.gradle b/h2o-app/build.gradle\nindex af3b929..097af85 100644\n--- a/h2o-app/build.gradle\n+++ b/h2o-app/build.gradle\n@@ -8,5 +8,6 @@ dependencies {\n   compile project(\":h2o-algos\")\n   compile project(\":h2o-core\")\n   compile project(\":h2o-genmodel\")\n+  compile project(\":h2o-persist-hdfs\")\n }\n\ndiff --git a/h2o-persist-hdfs/build.gradle b/h2o-persist-hdfs/build.gradle\nindex 41b96b2..6368ea9 100644\n--- a/h2o-persist-hdfs/build.gradle\n+++ b/h2o-persist-hdfs/build.gradle\n@@ -2,5 +2,6 @@ description = \"H2O Persist HDFS\"\n\n dependencies {\n   compile project(\":h2o-core\")\n-  compile(\"org.apache.hadoop:hadoop-client:2.0.0-cdh4.3.0\")\n+  compile(\"org.apache.hadoop:hadoop-client:2.4.1-mapr-1408\")\n+  compile(\"org.json:org.json:chargebee-1.0\")\n }\n```\n\n<a name=\"Sparkling\"><\/a>\n## 7. Sparkling Water\n\nSparkling Water combines two open-source technologies: Apache Spark and the H2O Machine Learning platform.  It makes H2O’s library of advanced algorithms, including Deep Learning, GLM, GBM, K-Means, and Distributed Random Forest, accessible from Spark workflows. Spark users can select the best features from either platform to meet their Machine Learning needs.  Users can combine Spark's RDD API and Spark MLLib with H2O’s machine learning algorithms, or use H2O independently of Spark for the model building process and post-process the results in Spark.\n\n**Sparkling Water Resources**:\n\n* [Download page for pre-built packages](http://h2o.ai/download/)\n* [Sparkling Water GitHub repository](https://github.com/h2oai/sparkling-water)  \n* [README](https://github.com/h2oai/sparkling-water/blob/master/README.md)\n* [Developer documentation](https://github.com/h2oai/sparkling-water/blob/master/DEVEL.md)\n\n<a name=\"Documentation\"><\/a>\n## 8. Documentation\n\n### Documenation Homepage\n\nThe main H2O documentation is the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/index.html).  Visit <http://docs.h2o.ai> for the top-level introduction to documentation on H2O projects.\n\n\n### Generate REST API documentation\n\nTo generate the REST API documentation, use the following commands:\n\n    cd ~/h2o-3\n    cd py\n    python ./generate_rest_api_docs.py  # to generate Markdown only\n    python ./generate_rest_api_docs.py --generate_html  --github_user GITHUB_USER --github_password GITHUB_PASSWORD # to generate Markdown and HTML\n\nThe default location for the generated documentation is `build/docs/REST`.\n\nIf the build fails, try `gradlew clean`, then `git clean -f`.\n\n### Bleeding edge build documentation\n\nDocumentation for each bleeding edge nightly build is available on the [nightly build page](http://s3.amazonaws.com/h2o-release/h2o/master/latest.html).\n\n\n<a name=\"Citing\"><\/a>\n## 9. Citing H2O\n\nIf you use H2O as part of your workflow in a publication, please cite your H2O resource(s) using the following BibTex entry:\n\n### H2O Software\n\n\t@Manual{h2o_package_or_module,\n\t    title = {package_or_module_title},\n\t    author = {H2O.ai},\n\t    year = {year},\n\t    month = {month},\n\t    note = {version_information},\n\t    url = {resource_url},\n\t}\n\n**Formatted H2O Software citation examples**:\n\n- H2O.ai (Oct. 2016). _Python Interface for H2O_, Python module version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n- H2O.ai (Oct. 2016). _R Interface for H2O_, R package version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n- H2O.ai (Oct. 2016). _H2O_, H2O version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n\n### H2O Booklets\n\nH2O algorithm booklets are available at the [Documentation Homepage](http://docs.h2o.ai/h2o/latest-stable/index.html).\n\n\t@Manual{h2o_booklet_name,\n\t    title = {booklet_title},\n\t    author = {list_of_authors},\n\t    year = {year},\n\t    month = {month},\n\t    url = {link_url},\n\t}\n\n**Formatted booklet citation examples**:\n\nArora, A., Candel, A., Lanford, J., LeDell, E., and Parmar, V. (Oct. 2016). _Deep Learning with H2O_. <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/booklets/DeepLearningBooklet.pdf>.\n\nClick, C., Lanford, J., Malohlava, M., Parmar, V., and Roark, H. (Oct. 2016). _Gradient Boosted Models with H2O_. <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/booklets/GBMBooklet.pdf>.\n\n\n<a name=\"Community\"><\/a>\n## 10. Community\n\nH2O has been built by a great many number of contributors over the years both within H2O.ai (the company) and the greater open source community.  You can begin to contribute to H2O by answering [Stack Overflow](http://stackoverflow.com/questions/tagged/h2o) questions or [filing bug reports](https://0xdata.atlassian.net/projects/PUBDEV/issues).  Please join us!  \n\n### Team & Committers\n\n```\nSriSatish Ambati\nCliff Click\nTom Kraljevic\nTomas Nykodym\nMichal Malohlava\nKevin Normoyle\nSpencer Aiello\nAnqi Fu\nNidhi Mehta\nArno Candel\nJosephine Wang\nAmy Wang\nMax Schloemer\nRay Peck\nPrithvi Prabhu\nBrandon Hill\nJeff Gambera\nAriel Rao\nViraj Parmar\nKendall Harris\nAnand Avati\nJessica Lanford\nAlex Tellez\nAllison Washburn\nAmy Wang\nErik Eckstrand\nNeeraja Madabhushi\nSebastian Vidrio\nBen Sabrin\nMatt Dowle\nMark Landry\nErin LeDell\nOleg Rogynskyy\nNick Martin\nNancy Jordan\nNishant Kalonia\nNadine Hussami\nJeff Cramer\nStacie Spreitzer\nVinod Iyengar\nCharlene Windom\nParag Sanghavi\nNavdeep Gill\nLauren DiPerna\nAnmol Bal\nMark Chan\nNick Karpov\nAvni Wadhwa\nAshrith Barthur\nKaren Hayrapetyan\nJo-fai Chow\nDmitry Larko\nBranden Murray\nJakub Hava\nWen Phan\nMagnus Stensmo\nPasha Stetsenko\nAngela Bartz\nMateusz Dymczyk\nMicah Stubbs\nIvy Wang\nTerone Ward\nLeland Wilkinson\nWendy Wong\nNikhil Shekhar\n```\n\n<a name=\"Advisors\"><\/a>\n## Advisors\n\nScientific Advisory Council\n\n```\nStephen Boyd\nRob Tibshirani\nTrevor Hastie\n```\n\nSystems, Data, FileSystems and Hadoop\n\n```\nDoug Lea\nChris Pouliot\nDhruba Borthakur\n```\n\n<a name=\"Investors\"><\/a>\n## Investors\n\n```\nJishnu Bhattacharjee, Nexus Venture Partners\nAnand Babu Periasamy\nAnand Rajaraman\nAsh Bhardwaj\nRakesh Mathur\nMichael Marks\nEgbert Bierman\nRajesh Ambati\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B60:376DE:17AC3A:5CDB3F:6AB9214F"},"text_sha256":"461ba8bcbd66a8b335989f204164268921aa0129190c98c2e8e1907cc23108bd"},{"path":"h2o-docs/src/product/security.rst","size":33474,"blob_sha":"00a61f55e19335419579e9e76eac788df452edfa","priority":1,"status":200,"text":"Security\n========\n\nH2O contains security features intended for deployment inside a secure\ndata center.\n\nSecurity Model\n--------------\n\nBelow is a discussion of what the security assumptions are, and what the\nH2O software does and does not do.\n\nTerms\n~~~~~\n\n+-------------------------------------+---------------------------------+\n| Term                                | Definition                      |\n+=====================================+=================================+\n| **H2O Cluster**                     | A collection of H2O nodes that  | \n|                                     | work together. In the H2O Flow  | \n|                                     | Web UI, the cluster status menu |\n|                                     | item shows the list of nodes in | \n|                                     | an H2O cluster.                 |\n+-------------------------------------+---------------------------------+\n| **H2O node**                        | One VM instance running the H2O |\n|                                     | main class. One H2O node        | \n|                                     | corresponds to one OS-level     | \n|                                     | process. In the YARN case, one  | \n|                                     | H2O node corresponds to one     |\n|                                     | mapper instance and one YARN    |\n|                                     | container.                      |\n+-------------------------------------+---------------------------------+\n| **H2O embedded web port**           | Each Each H2O node contains an  |\n|                                     | embedded web port (by default   |\n|                                     | port 54321). This web port      |\n|                                     | hosts H2O Flow as well as the   |\n|                                     | H2O REST API. The user interacts|\n|                                     | directly with this web port.    |\n+-------------------------------------+---------------------------------+\n| **H2O Internal communication port** | Each Each H2O node also has an  |\n|                                     | internal port (web port+1, so by| \n|                                     | default port 54322) for internal| \n|                                     | node-to-node communication. This| \n|                                     | is a proprietary binary         |\n|                                     | protocol. An attacker using a   |\n|                                     | tool like tcpdump or wireshark  |\n|                                     | may be able to reverse engineer |\n|                                     | data captured on this           |\n|                                     | communication path.             |\n+-------------------------------------+---------------------------------+\n\nAssumptions (Threat Model)\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. H2O lives in a secure data center.\n\n2. Denial of service is not a concern.\n\n   -  H2O is not designed to withstand a DOS attack.\n\n3. HTTP traffic between the user client and H2O cluster needs to be\n   encrypted.\n\n   -  This is true for both interactive sessions (e.g the H2O Flow Web\n      UI) and programmatic sessions (e.g. an R program).\n\n4. Man-in-the-middle attacks are of low concern.\n\n   -  Certificate checking on the client side for R/python is not yet\n      implemented.\n\n5. You may want to secure internal binary H2O node-to-H2O node traffic\n   via encryption.\n\n6. You trust the person that starts H2O to start it correctly.\n\n   -  Enabling H2O security requires specifying the correct security\n      options.\n\n7. User client sessions do not need to expire. A session lives at most\n   as long as the cluster lifetime. H2O clusters are started and stopped\n   \"frequently enough\".\n\n   -  All data is stored in-memory, so restarting the H2O cluster wipes\n      all data from memory, and there is nothing to clean from disk.\n\n8. Once a user is authenticated for access to H2O, they have full\n   access.\n\n   -  H2O supports authentication but not authorization or access\n      control (ACLs).\n\n9. H2O clusters are meant to be accessed by only one user.\n\n   -  Each user starts their own H2O cluster.\n   -  H2O only allows access to the embedded web port to the person that\n      started the cluster.\n\nData Chain-of-Custody in a Hadoop Data Center Environment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n**Note**: This holds true for all versions of Hadoop (including YARN) supported by H2O.\n\nThrough this sequence, it is shown that a user is only able to access\nthe same data from H2O that they could already access from normal Hadoop\njobs.\n\n1. Data lives in HDFS\n2. The files in HDFS have permissions\n3. An HDFS user has permissions (capabilities) to access certain files\n4. Kerberos (kinit) can be used to authenticate a user in a Hadoop\n   environment\n5. A user's Hadoop MapReduce job inherits the permissions (capabilities)\n   of the user, as well as kinit metadata\n6. H2O is a Hadoop MapReduce job\n7. H2O can only access the files in HDFS that the user has permission to\n   access\n8. Only the user that started the cluster is authenticated for access to\n   the H2O cluster\n9. The authenticated user can access the same data in H2O that he could\n   access via HDFS\n\nWhat is Being Secured Today\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Standard file permissions security is provided by the Operating\n   System and by HDFS.\n\n2. The embedded web port in each node of H2O can be secured in two ways:\n\n +------------------+---------------------------------------+\n | Method           | Description                           |\n +==================+=======================================+\n | HTTPS            | Encrypted socket communication between|\n |                  | the user client and the embedded H2O  |\n |                  | web port.                             |\n +------------------+---------------------------------------+\n | Authentication   | An HTTP Basic Auth username and       |\n |                  | password from the user client.        |\n +------------------+---------------------------------------+\n\n**Note**: Embedded web port HTTPS and authentication may be used separately or together.\n\n3. Internal H2O node-to-H2O node communication can be encrypted.\n\n\nEnforcing System-Level Command-Line Arguments in h2odriver.jar\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSystem administrators can create a configuration file with implicit arguments of h2odriver and use it to make sure the H2O cluster is started with the specified security settings. \n\n1. Create the config file in **/etc/h2o/h2odriver.args**.\n2. Specify the default command-line options that you want to enforce. Note that each argument must be on a separate line. For example:\n\n ::\n\n   h2o_ssl_jks_internal=keystore.jks\n   h2o_ssl_jks_password=password\n   h2o_ssl_jts_internal=truststore.jks\n   h2o_ssl_jts_password=password\n\n3. Start H2O.\n\n ::\n\n  hadoop jar h2odriver.jar -mapperXmx 3g -nodes 1\n\nFile Security in H2O\n--------------------\n\nH2O is a normal user program. Nothing specifically needs to be done by\nthe user to get file security for H2O. Operating System and HDFS\npermissions \"just work\".\n\nStandalone H2O\n~~~~~~~~~~~~~~\n\nSince H2O is a regular Java program, the files H2O can access are\nrestricted by the user's Operating System permissions (capabilities).\n\nH2O on Hadoop\n~~~~~~~~~~~~~\n\nSince H2O is a regular Hadoop MapReduce program, the files H2O can\naccess are restricted by the standard HDFS permissions of the user that\nstarts H2O.\n\nSince H2O is a regular Hadoop MapReduce program, Kerberos (kinit) works\nseamlessly. (No code was added to H2O to support Kerberos.)\n\nSparkling Water on YARN\n~~~~~~~~~~~~~~~~~~~~~~~\n\nSimilar to H2O on Hadoop, this configuration is H2O on Spark on YARN.\nThe YARN job inherits the HDFS permissions of the user.\n\nEmbedded Web Port (by default port 54321) Security\n--------------------------------------------------\n\nFor the client side, connection options exist.\n\nFor the server side, startup options exist to facilitate security. These\nare detailed below.\n\n-------------\n\nHTTPS\n~~~~~\n\nHTTPS Client Side\n^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen HTTPS is enabled on the server side, the user must provide the\nhttps URI scheme to the browser. No http access will exist.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith HTTPS:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, https = TRUE, insecure = TRUE)\n\nThe underlying HTTPS implementation is provided by RCurl and by\nextension libcurl and OpenSSL.\n\n **Caution:** Certificate checking has not been implemented yet. The insecure flag tells the client to ignore certificate checking. This means your client is exposed to a man-in-the-middle attack. We assume for the time being that in a secure corporate network such attacks are of low concern. Currently, the insecure flag must be set to TRUE so that in some future version of H2O you will confidently know when certificate checking has actually been implemented.\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith HTTPS:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, https = TRUE, insecure = TRUE)\n\nThe underlying HTTPS implementation is provided by RCurl and by\nextension libcurl and OpenSSL.\n\n **Caution:** Certificate checking has not been implemented yet. The ``insecure`` flag tells the client to ignore certificate checking. This means your client is exposed to a man-in-the-middle attack. We assume for the time being that in a secure corporate network such attacks are of low concern. Currently, the ``insecure`` flag must be set to ``TRUE`` so that in some future version of H2O you will confidently know when certificate checking has actually been implemented.\n\nHTTPS Server Side\n^^^^^^^^^^^^^^^^^\n\nA `Java Keystore <https://en.wikipedia.org/wiki/Keystore>`_ must be\nprovided on the server side to enable HTTPS. Keystores can be\nmanipulated on the command line with the\n`keytool <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html>`_\ncommand.\n\nThe underlying HTTPS implementation is provided by Jetty 9 and the Java\nruntime.\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n::\n\n    -jks <filename>\n         Java keystore file\n\n    -jks_pass <password>\n         (Default is 'h2oh2o')\n\nExample:\n\n::\n\n    java -jar h2o.jar -jks h2o.jks\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -jks <filename>\n         Java keystore file\n\n    -jks_pass <password>\n         (Default is 'h2oh2o')\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -jks h2o.jks -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Java Keystore\nconfiguration:\n\n+--------------------------+-------------------------+\n| Spark conf property      | Description             |\n+==========================+=========================+\n| spark.ext.h2o.jks        | Path to Java Keystore   |\n+--------------------------+-------------------------+\n| spark.ext.h2o.jks.pass   | JKS password            |\n+--------------------------+-------------------------+\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.jks=/path/to/h2o.jks sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\nCreating your own self-signed Java Keystore\n'''''''''''''''''''''''''''''''''''''''''''\n\nHere is an example of how to create your own self-signed Java Keystore\n(mykeystore.jks) with a custom keystore password (mypass) and how to run\nstandalone H2O using your Keystore:\n\n::\n\n    # Be paranoid and delete any previously existing keystore.\n    rm -f mykeystore.jks\n\n    # Generate a new keystore.\n    keytool -genkey -keyalg RSA -keystore mykeystore.jks -storepass mypass -keysize 2048\n    What is your first and last name?\n      [Unknown]:  \n    What is the name of your organizational unit?\n      [Unknown]:  \n    What is the name of your organization?\n      [Unknown]:  \n    What is the name of your City or Locality?\n      [Unknown]:  \n    What is the name of your State or Province?\n      [Unknown]:  \n    What is the two-letter country code for this unit?\n      [Unknown]:  \n    Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?\n      [no]:  yes\n\n    Enter key password for <mykey>\n        (RETURN if same as keystore password):  \n\n    # Run H2O using the newly generated self-signed keystore.\n    java -jar h2o.jar -jks mykeystore.jks -jks_pass mypass\n\n----------------\n\nKerberos Authentication\n~~~~~~~~~~~~~~~~~~~~~~~\n\nKerberos H2O Client Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nFor Python, connecting to H2O with authentication is similar:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nKerberos H2O Server Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou must provide a simple configuration file that specifies the Kerberos\nlogin module\n\nExample **kerb.conf**:\n\n::\n\n    krb5loginmodule {\n         com.sun.security.auth.module.Krb5LoginModule required\n         java.security.krb5.realm=\"0XDATA.LOC\"\n         java.security.krb5.kdc=\"ldap.0xdata.loc\";\n    };\n\nFor more detail about Kerberos configuration:\n`Krb5LoginModule <https://docs.oracle.com/javase/7/docs/jre/api/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.html>`__,\n`Jaas\nnote <http://docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/tutorials/AcnOnly.html>`__\n\nStandalone H2O\n''''''''''''''\n\nThe following options are required for Kerberos authentication:\n\n::\n\n    -kerberos_login\n          Use Jetty KerberosLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n\n    -user_name <username>\n          Override name of user for which access is allowed\n\n\nExample:\n\n::\n\n    java -jar h2o.jar -kerberos_login -login_conf kerb.conf -user_name kerb_principal\n\nExample (on MacOS):\n\n::\n\n    java -Djava.security.krb5.realm=\"0XDATA.LOC\" -Djava.security.krb5.kdc=\"ldap.0xdata.loc\" -jar h2o.jar -kerberos_login -login_conf kerb.conf -user_name kerb_principal\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -kerberos_login\n          Use Jetty KerberosLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n\n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -kerberos_login -login_conf kerb.conf -output hdfsOutputDirectory -user_name kerb_principal\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Kerberos configuration:\n\n+--------------------------------+--------------------------------------------+\n| Spark conf property            | Description                                |\n+================================+============================================+\n| spark.ext.h2o.kerberos.login   | Use Jetty Krb5LoginModule                  |\n+--------------------------------+--------------------------------------------+\n| spark.ext.h2o.login.conf       | LoginService configuration file            |\n+--------------------------------+--------------------------------------------+\n| spark.ext.h2o.user.name        | Name of user for which access is allowed   |\n+--------------------------------+--------------------------------------------+\n\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.kerberos.login=true --conf spark.ext.h2o.user.name=kerb_principal --conf spark.ext.h2o.login.conf=kerb.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n----------------\n\nLDAP Authentication\n~~~~~~~~~~~~~~~~~~~\n\nH2O client and server side configuration for LDAP is discussed below.\nAuthentication is implemented using `Basic\nAuth <https://en.wikipedia.org/wiki/Basic_access_authentication>`__.\n\nLDAP H2O Client Side\n^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nLDAP H2O Server Side\n^^^^^^^^^^^^^^^^^^^^\n\nAn ldap.conf configuration file must be provided by the user. As an\nexample, this file works for H2O's internal LDAP server. You will\ncertainly need help from your IT security folks to adjust this\nconfiguration file for your environment.\n\nExample **ldap.conf**:\n\n::\n\n    ldaploginmodule {\n        ai.h2o.org.eclipse.jetty.jaas.spi.LdapLoginModule required\n        debug=\"true\"\n        useLdaps=\"false\"\n        contextFactory=\"com.sun.jndi.ldap.LdapCtxFactory\"\n        hostname=\"ldap.0xdata.loc\"\n        port=\"389\"\n        bindDn=\"cn=admin,dc=0xdata,dc=loc\"\n        bindPassword=\"0xdata\"\n        authenticationMethod=\"simple\"\n        forceBindingLogin=\"true\"\n        userBaseDn=\"ou=users,dc=0xdata,dc=loc\";\n    };\n\nSee the `Jetty 9 LdapLoginModule\ndocumentation <http://www.eclipse.org/jetty/documentation/current/jaas-support.html>`__\nfor more information.\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n::\n\n    -ldap_login\n          Use Jetty LdapLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n         \n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n::\n\n    java -jar h2o.jar -ldap_login -login_conf ldap.conf\n\n    java -jar h2o.jar -ldap_login -login_conf ldap.conf -user_name myLDAPusername\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -ldap_login\n          Use Jetty LdapLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n         \n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -ldap_login -login_conf ldap.conf -output hdfsOutputDirectory\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -ldap_login -login_conf ldap.conf -user_name myLDAPusername -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Java keystore\nconfiguration:\n\n+----------------------------+-----------------------------------------------------+\n| Spark conf property        | Description                                         |\n+============================+=====================================================+\n| spark.ext.h2o.ldap.login   | Use Jetty LdapLoginService                          |\n+----------------------------+-----------------------------------------------------+\n| spark.ext.h2o.login.conf   | LoginService configuration file                     |\n+----------------------------+-----------------------------------------------------+\n| spark.ext.h2o.user.name    | Override name of user for which access is allowed   |\n+----------------------------+-----------------------------------------------------+\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.ldap.login=true --conf spark.ext.h2o.login.conf=/path/to/ldap.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.ldap.login=true --conf spark.ext.h2o.user.name=myLDAPusername --conf spark.ext.h2o.login.conf=/path/to/ldap.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n\nLDAP Authentication and MapR\n''''''''''''''''''''''''''''\n\nThe following information is for users who authentication with LDAP on MapR, which uses a proprietary Hadoop configuration property that specifies the configuration file. Additional information is available here: `http://doc.mapr.com/display/MapR/mapr.login.conf <http://doc.mapr.com/display/MapR/mapr.login.conf>`__.\n\nIn order to make LDAP authentication work, add the ldap.conf definition to the MapR configuration file in **/opt/mapr/conf/mapr.login.conf**.  \n\nDebugging Server-side LDAP issues\n'''''''''''''''''''''''''''''''''\n\nTo get detailed output from Jetty for LDAP debugging, you need to create the **jetty-logging.properties** file and add it to your classpath.\n\nExample **jetty-logging.properties**:\n\n::\n\n    org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog\n    org.eclipse.jetty.LEVEL=DEBUG\n\nStandalone H2O example (with **jetty-logging.properties** in the current directory):\n\n::\n\n    java -cp h2o.jar:. water.H2OApp\n\nH2O on Hadoop example (with **jetty-logging.properties** in the current directory):\n\n::\n\n    hadoop jar h2odriver.jar -libjars jetty-logging.properties -n 1 -mapperXmx 5g -output hdfsOutputDirectory\n\n-------------\n\nPluggable Authentication Module (PAM) Authentication\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis section describes H2O client and server side configuration for `PAM authentication <https://en.wikipedia.org/wiki/Pluggable_authentication_module>`__. \n\nPAM H2O Client Side\n^^^^^^^^^^^^^^^^^^^\n\nFlow UI Client\n''''''''''''''\n\nWhen PAM authentication is enabled, the user will be presented with a username and password dialog box when attempting to reach Flow. \n\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nFor Python, connecting to H2O with authentication is similar:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\n\nPAM H2O Server Side\n^^^^^^^^^^^^^^^^^^^\n\nYou must provide a simple configuration file that specifies the PAM login module.\n\n**Example pam.conf**\n\n::\n\n  pamloginmodule {\n       de.codedo.jaas.PamLoginModule required\n       service = h2o;\n  };\n\nNote that the name of the service is user configurable, and this name must match the name of the PAM authentication module that you created for the \"h2o service\".\n\n\nStandalone H2O\n''''''''''''''\n\nThe following options are required for PAM authentication:\n\n::\n\n  -pam_login\n      Use PAM LoginService\n\n  -login_conf <filename>\n        LoginService configuration file\n       \n  -user_name <username>\n        Override name of user for which access is allowed\n\n  -form_auth\n        Optionally enable form-based authentication for Flow\n\n  -session_timeout\n        If form_auth is enabled, optionally specify the number of minutes \n        that a session can remain idle before the server invalidates the \n        session and requests a new login\n\n**Example**\n\n::\n\n  java -jar h2o.jar -pam_login -login_conf pam.conf -user_name\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n  -pam_login\n      Use PAM LoginService\n\n  -login_conf <filename>\n        LoginService configuration file\n       \n  -user_name <username>\n        Override name of user for which access is allowed\n\n  -form_auth\n        Optionally enable form-based authentication for Flow\n\n  -session_timeout\n        If form_auth is enabled, optionally specify the number of minutes \n        that a session can remain idle before the server invalidates the \n        session and requests a new login\n\n\n**Example**\n\n::\n\n  hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -pam_login -login_conf pam.conf -output hdfsOutputDirectory -user_name\n\n-------------\n\nHash File Authentication\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nH2O client and server side configuration for a hardcoded hash file is\ndiscussed below. Authentication is implemented using `Basic\nAuth <https://en.wikipedia.org/wiki/Basic_access_authentication>`__.\n\nHash File H2O Client Side\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nHash File H2O Server Side\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nA **realm.properties** configuration file must be provided by the user.\n\nExample **realm.properties**:\n\n::\n\n    # See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html\n    # java -cp h2o.jar org.eclipse.jetty.util.security.Password\n    username1: password1\n    username2: MD5:6cb75f652a9b52798eb6cf2201057c73\n\nGenerate secure passwords using the Jetty secure password generation\ntool:\n\n::\n\n    java -cp h2o.jar org.eclipse.jetty.util.security.Password username password\n\nSee the `Jetty 9 HashLoginService\ndocumentation <http://wiki.eclipse.org/Jetty/Tutorial/Realms#HashLoginService>`_\nand `Jetty 9 Secure Password\nHOWTO <http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html>`_ for more\ninformation.\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n::\n\n    -hash_login\n          Use Jetty HashLoginService\n              \n    -login_conf <filename>\n          LoginService configuration file\n\nExample:\n\n::\n\n    java -jar h2o.jar -hash_login -login_conf realm.properties\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -hash_login\n          Use Jetty HashLoginService\n              \n    -login_conf <filename>\n          LoginService configuration file\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -hash_login -login_conf realm.propertes -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for hash login service\nconfiguration:\n\n+----------------------------+-----------------------------------+\n| Spark conf property        | Description                       |\n+============================+===================================+\n| spark.ext.h2o.hash.login   | Use Jetty HashLoginService        |\n+----------------------------+-----------------------------------+\n| spark.ext.h2o.login.conf   | LoginService configuration file   |\n+----------------------------+-----------------------------------+\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.hash.login=true --conf spark.ext.h2o.login.conf=/path/to/realm.properties sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\nSSL Internode Security\n----------------------\n\nBy default, communication between H2O nodes is not encrypted for performance reasons. H2O currently support SSL/TLS authentication (basic handshake authentication) and data encryption for internode communication.\n\nUsage\n~~~~~\n\nHadoop\n^^^^^^\n\nThe easiest way to enable SSL while running H2O via h2odriver is to pass the ``-internal_secure_connections`` flag. This will tell h2odriver to automatically generate all the necessary files and distribute them to all mappers. This distribution may be secure depending on your YARN configuration.\n\n::\n\n  hadoop jar h2odriver.jar -nodes 4 -mapperXmx 6g -output hdfsOutputDirName -internal_secure_connections\n\n\nThe user can also manually generate keystore/truststore and properties file as described in the `Standalone/AWS`_ section that follows and run the following command to use them instead. In this case, all the files (certificates and properties) have to be distributed to all the mapper nodes by the user.\n\n::\n\n  hadoop jar h2odriver.jar -nodes 4 -mapperXmx 6g -output hdfsOutputDirName -internal_security_conf security.properties\n\n\nStandalone/AWS\n^^^^^^^^^^^^^^\n\nIn this case, the user has to generate the keystores, truststores, and properties file manually.\n\n1. Generate public/private keys and distributed them. (Refer to the `Keystore/Truststore Generation`_ section for more information).\n\n2. Create the security properties file. (Refer to the `Configuration`_ section for a full list of parameters.)\n\n ::\n\n    h2o_ssl_jks_internal=keystore.jks\n    h2o_ssl_jks_password=password\n    h2o_ssl_jts_internal=truststore.jks\n    h2o_ssl_jts_password=password\n\n3. To start an SSL-enabled node, pass the location to the properties file using the ``-internal_security_conf`` flag\n\n ::\n\n  java -jar h2o.jar -internal_security_conf security.properties\n\nConfiguration\n~~~~~~~~~~~~~\n\nTo enable this feature, set the ``-internal_security_conf`` parameter when starting an H2O node, and point that to a configuration file (key=value format) that contains the following values:\n\n- ``h2o_ssl_jks_internal`` (required): The path (absolute or relative) to the key-store file used for internal SSL communication\n- ``h2o_ssl_jks_password`` (required): The password for the internal key-store\n- ``h2o_ssl_jts_internal`` (optional): The path (absolute or relative) to the trust-store file used for internal SSL communication. If not present, then ``h2o_ssl_jks_internal`` will be used.\n- ``h2o_ssl_jts_password`` (optional): The password to the internal trust-store. If not present, then ``h2o_ssl_jks_password`` will be used.\n- ``h2o_ssl_protocol`` (optional): The protocol name used during encrypted communication (supported by JVM). This defaults to TSLv1.2.\n- ``h2o_ssl_enabled_algorithms`` (optional): A comma separated list of enabled cipher algorithms. Include only those that are supported by JVM.\n\nThis must be set for every node in the cluster. Every node needs to have access to both Java keystore and Java truststore containing appropriate keys and certificates.\n\nThis feature should not be used together with the ``-useUDP`` flag, as we currently do not support UDP encryption through DTLS or any other protocol that might result in unencrypted data transfers.\n\nKeystore/Truststore Generation\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nKeystore/truststore creation and distribution are deployment specific and have to be handled by the end user.\n\nBasic keystore/truststore generation can be done using the keytool program, which ships with Java, documentation can be found `here <https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html>`__. Each node should have a key pair generated, and all public keys should be imported into a single truststore, which should be distributed to all the nodes.\n\nThe simplest (though not recommended) way would be to call:\n\n::\n\n  keytool -genkeypair -keystore h2o-internal.jks -alias h2o-internal\n\nThen distribute the ``h2o-internal.jks`` file to all the nodes, and set it as both the keystore and truststore in ``ssl.config``. \n\nA more secure way would be to:\n\n1. Run the same command on each node:\n  \n ::\n\n  keytool -genkeypair -keystore h2o-internal.jks -alias h2o-internal\n\n2. Extract the certificate on each node:\n\n ::\n\n  keytool -export -keystore h2o-internal.jks -alias signFiles -file node<number>.cer\n\n3. Distribute all of the above certificates to each node, and on each node create a truststore containing all of them (or put all certificates on one node, import to truststore and distribute that truststore to each node):\n\n ::\n\n  keytool -importcert -file node<number>.cer -keystore truststore.jks -alias node<number>\n\n\nPerformance\n~~~~~~~~~~~\n\nTurning on SSL may result in performance overhead for settings and algorithms that exchange data between nodes due to encryption/decryption time. Some algorithms might also slower because of this.\n\nExample benchmark on a 5 node cluster (6GB memory per node) working with a 5.8mln row dataset (580MB):\n\n+------------+---------------------+------------------------+\n|            | Non SSL             | SSL                    |\n+============+=====================+========================+\n| Parsing:   | 4.908s              | 5.304s                 |\n+------------+---------------------+------------------------+\n| GLM model: | 01:39.446           | 01:49.634              |\n+------------+---------------------+------------------------+\n\nCaveats and Missing Pieces\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n - This feature CANNOT be used together with the ``-useUDP`` flag. We currently do not support DTLS or any other encryption for UDP.\n - Should you start a mixed cloud of SSL and nonSSL nodes, the SSL ones will fail to bootstrap, while the nonSSL ones will become unresponsive.\n - H2O does not provide in-memory data encryption. This might spill data to disk in unencrypted form should swaps to disk occur. As a workaround, an encrypted drive is advised.\n - H2O does not support encryption of data saved to disk, should appropriate flags be enabled. Similar to the previous caveat, the user can use an encrypted drive to work around this issue.\n - H2O supports only SSL and does not support SASL.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9484:3E1DA:173427:5C622A:6AB9214F"},"text_sha256":"4dbcdac18efda70fc38a0b37457f69b7241bf6ddc828bd12dd1248111e8abd6a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3185","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D1:0BA1:D71549:FCC0DB:6AB9290D"},"commit":{"sha":"1676df7c04a6ea7a2f4cdf0f37be0783df7d7527","url":"https://github.com/h2oai/h2o-3/commit/1676df7c04a6ea7a2f4cdf0f37be0783df7d7527","date":"2026-05-22T00:22:53Z","author_date":"2026-05-22T00:22:53Z","committer_date":"2026-05-22T00:22:53Z","tree_sha":"ecdd9a04eab3f00012f4a392e6f33b4cdf679660","message_first_line":"Merge remote-tracking branch origin/rel-3.46.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"3184","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17C11B5:1BE14A6:6AB9290D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":34576,"blob_sha":"3bee0b5322212d4af11f29dd7cdfd3f48606c34c","priority":0},{"path":"h2o-docs/src/product/security.rst","size":36571,"blob_sha":"bc12cad9431ed30dc3a4b05ebd6208591e9478a2","priority":1},{"path":"SECURITY.md","size":3525,"blob_sha":"f05861c4e391f952fbfa3cc7a7ef89137e9fa2a2","priority":1}],"documents":[{"path":"README.md","size":34576,"blob_sha":"3bee0b5322212d4af11f29dd7cdfd3f48606c34c","priority":0,"status":200,"text":"# H2O\n\nFor any question not answered in this file or in [H2O-3 Documentation](https://docs.h2o.ai/h2o/latest-stable/h2o-docs), please use:\n\n[![Ask on GitHub](https://img.shields.io/github/discussions/h2oai/h2o-3.svg?logo=github&label=Discussions%20Q%26A&color=FFE600)](https://github.com/h2oai/h2o-3/discussions/categories/q-a)\n[![Ask on StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/h2o?logo=stackoverflow&label=H2O%20on%20StackOverflow&color=f7a664)](http://stackoverflow.com/questions/tagged/h2o)\n[![Ask on Gitter](https://img.shields.io/gitter/room/h2oai/h2o-3?logo=gitter&logoColor=red&label=H2O%20chatroom&color=b5b5b5)](https://gitter.im/h2oai/h2o-3?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nH2O is an in-memory platform for distributed, scalable machine learning. H2O uses familiar interfaces like R, Python, Scala, Java, JSON and the Flow notebook/web interface, and works seamlessly with big data technologies like Hadoop and Spark. H2O provides implementations of many popular [algorithms](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science.html) such as Generalized Linear Models (GLM), Gradient Boosting Machines (including XGBoost), Random Forests, Deep Neural Networks, Stacked Ensembles, Naive Bayes, Generalized Additive Models (GAM), Cox Proportional Hazards, K-Means, PCA, Word2Vec, as well as a fully automatic machine learning algorithm ([H2O AutoML](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html)). \n\nH2O is extensible so that developers can add data transformations and custom algorithms of their choice and access them through all of those clients.  H2O models can be [downloaded](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/save-and-load-model.html) and loaded into H2O memory for scoring, or exported into POJO or MOJO format for extremely fast scoring in [production](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/productionizing.html).  More information can be found in the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/index.html).\n\nH2O-3 (this repository) is the third incarnation of H2O, and the successor to [H2O-2](https://github.com/h2oai/h2o-2).  \n\n### Table of Contents\n\n* [Downloading H2O-3](#Downloading)\n* [Open Source Resources](#Resources)\n    * [Issue Tracking and Feature Requests](#IssueTracking)\n    * [List of H2O Resources](#OpenSourceResources)\n* [Using H2O-3 Code Artifacts (libraries)](#Artifacts)\n* [Building H2O-3](#Building)\n* [Launching H2O after Building](#Launching)\n* [Building H2O on Hadoop](#BuildingHadoop)\n* [Sparkling Water](#Sparkling)\n* [Documentation](#Documentation)\n* [Citing H2O](#Citing)\n* [Community](#Community) / [Advisors](#Advisors) / [Investors](#Investors)\n\n<a name=\"Downloading\"><\/a>\n## 1. Downloading H2O-3\n\nWhile most of this README is written for developers who do their own builds, most H2O users just download and use a pre-built version.  If you are a Python or R user, the easiest way to install H2O is via [PyPI](https://pypi.python.org/pypi/h2o) or [Anaconda](https://anaconda.org/h2oai/h2o) (for Python) or [CRAN](https://CRAN.R-project.org/package=h2o) (for R):  \n\n### Python\n\n```bash\npip install h2o\n```\n\n### R\n\n```r\ninstall.packages(\"h2o\")\n```\n\nFor the latest stable, nightly, Hadoop (or Spark / Sparkling Water) releases, or the stand-alone H2O jar, please visit: [https://h2o.ai/download](https://h2o.ai/download)\n\nMore info on downloading & installing H2O is available in the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html).\n\n<a name=\"Resources\"><\/a>\n## 2. Open Source Resources\n\nMost people interact with three or four primary open source resources:  **GitHub** (which you've already found), **GitHub issues** (for bug reports and issue tracking), **Stack Overflow** for H2O code/software-specific questions, and **h2ostream** (a Google Group / email discussion forum) for questions not suitable for Stack Overflow.  There is also a **Gitter** H2O developer chat group, however for archival purposes & to maximize accessibility, we'd prefer that standard H2O Q&A be conducted on Stack Overflow.\n\n<a name=\"IssueTracking\"><\/a>\n### 2.1 Issue Tracking and Feature Requests\n\nYou can browse and create new issues in our GitHub repository:  <https://github.com/h2oai/h2o-3>\n\n*  You can **browse** and search for **issues** without logging in to Github:\n    1. Click the `Issues` tab on the top of the page\n    2. Apply filter to search for particular issues \n*  To **create** an **issue** (either a bug or a feature request):\n    *  Create H2O-3 issues on the page [https://github.com/h2oai/h2o-3/issues/new/choose](https://github.com/h2oai/h2o-3/issues/new/choose).  (Note: Sparkling Water questions should be addressed under the [Sparkling Water](https://github.com/h2oai/sparkling-water/issues) repository.)\n\n\n<a name=\"OpenSourceResources\"><\/a>\n### 2.2 List of H2O Resources\n\n*  GitHub\n    * <https://github.com/h2oai/h2o-3>\n*  GitHub issues -- file bug reports / track issues here\n    * The <https://github.com/h2oai/h2o-3/issues> page contains issues for the current H2O-3 project)\n*  Stack Overflow -- ask all code/software questions here\n    * <http://stackoverflow.com/questions/tagged/h2o>\n*  Cross Validated (Stack Exchange) -- ask algorithm/theory questions here\n    * <https://stats.stackexchange.com/questions/tagged/h2o>\n*  h2ostream Google Group -- ask non-code related questions here\n    * Web: <https://groups.google.com/d/forum/h2ostream>\n    * Mail to: [h2ostream@googlegroups.com](mailto:h2ostream@googlegroups.com)\n* Gitter H2O Developer Chat\n    * <https://gitter.im/h2oai/h2o-3>    \n*  Documentation\n    * H2O User Guide (main docs): <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/index.html>\n    * All H2O documentation links: <http://docs.h2o.ai>\n    * Nightly build page (nightly docs linked in page): <https://s3.amazonaws.com/h2o-release/h2o/master/latest.html>\n*  Download (pre-built packages)\n    * <http://h2o.ai/download>\n*  Website\n    * <http://h2o.ai>\n*  Twitter -- follow us for updates and H2O news!\n    * <https://twitter.com/h2oai>\n\n*  Awesome H2O -- share your H2O-powered creations with us\n   * <https://github.com/h2oai/awesome-h2o>\n\n\n<a name=\"Artifacts\"><\/a>\n## 3. Using H2O-3 Artifacts\n\nEvery nightly build publishes R, Python, Java, and Scala artifacts to a build-specific repository.  In particular, you can find Java artifacts in the maven/repo directory.\n\nHere is an example snippet of a gradle build file using h2o-3 as a dependency.  Replace x, y, z, and nnnn with valid numbers.\n\n```\n// h2o-3 dependency information\ndef h2oBranch = 'master'\ndef h2oBuildNumber = 'nnnn'\ndef h2oProjectVersion = \"x.y.z.${h2oBuildNumber}\"\n\nrepositories {\n  // h2o-3 dependencies\n  maven {\n    url \"https://s3.amazonaws.com/h2o-release/h2o-3/${h2oBranch}/${h2oBuildNumber}/maven/repo/\"\n  }\n}\n\ndependencies {\n  compile \"ai.h2o:h2o-core:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-algos:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-web:${h2oProjectVersion}\"\n  compile \"ai.h2o:h2o-app:${h2oProjectVersion}\"\n}\n```\n\nRefer to the latest H2O-3 bleeding edge [nightly build page](http://s3.amazonaws.com/h2o-release/h2o-3/master/latest.html) for information about installing nightly build artifacts.\n\nRefer to the [h2o-droplets GitHub repository](https://github.com/h2oai/h2o-droplets) for a working example of how to use Java artifacts with gradle.\n\n> Note: Stable H2O-3 artifacts are periodically published to Maven Central ([click here to search](http://search.maven.org/#search%7Cga%7C1%7Cai.h2o)) but may substantially lag behind H2O-3 Bleeding Edge nightly builds.\n\n\n<a name=\"Building\"><\/a>\n## 4. Building H2O-3\n\nGetting started with H2O development requires [JDK 1.8+](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html#java-requirements), [Node.js](https://nodejs.org/), [Gradle](https://gradle.org/), [Python](https://www.python.org/) and [R](http://www.r-project.org/).  We use the Gradle wrapper (called `gradlew`) to ensure up-to-date local versions of Gradle and other dependencies are installed in your development directory.\n\n### 4.1. Before building\n\nBuilding `h2o` requires a properly set up R environment with [required packages](#InstallRPackagesInUnix) and Python environment with the following packages:\n\n```\ngrip\ntabulate\nrequests\nwheel\n```\n\nTo install these packages you can use [pip](https://pip.pypa.io/en/stable/installing/) or [conda](https://conda.io/).\nIf you have troubles installing these packages on *Windows*, please follow section [Setup on Windows](#SetupWin) of this guide.\n> (Note: It is recommended to use some virtual environment such as [VirtualEnv](https://virtualenv.pypa.io/), to install all packages. )\n\n\n### 4.2. Building from the command line (Quick Start)\n\nTo build H2O from the repository, perform the following steps.\n\n\n#### Recipe 1: Clone fresh, build, skip tests, and run H2O\n\n```\n# Build H2O\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n./gradlew build -x test\n\nYou may encounter problems: e.g. npm missing. Install it:\nbrew install npm\n\n# Start H2O\njava -jar build/h2o.jar\n\n# Point browser to http://localhost:54321\n\n```\n\n#### Recipe 2: Clone fresh, build, and run tests (requires a working install of R)\n\n```\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew build\n```\n\n>**Notes**:\n>\n> - Running tests starts five test JVMs that form an H2O cluster and requires at least 8GB of RAM (preferably 16GB of RAM).\n> - Running `./gradlew syncRPackages` is supported on Windows, OS X, and Linux, and is strongly recommended but not required. `./gradlew syncRPackages` ensures a complete and consistent environment with pre-approved versions of the packages required for tests and builds. The packages can be installed manually, but we recommend setting an ENV variable and using `./gradlew syncRPackages`. To set the ENV variable, use the following format (where `${WORKSPACE} can be any path):\n>  \n> ```\n> mkdir -p ${WORKSPACE}/Rlibrary\n> export R_LIBS_USER=${WORKSPACE}/Rlibrary\n> ```\n\n#### Recipe 3:  Pull, clean, build, and run tests\n\n```\ngit pull\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew clean\n./gradlew build\n```\n\n#### Notes\n\n - We recommend using `./gradlew clean` after each `git pull`.\n\n- Skip tests by adding `-x test` at the end the Gradle build command line.  Tests typically run for 7-10 minutes on a MacBook Pro laptop with 4 CPUs (8 hyperthreads) and 16 GB of RAM.\n\n- Syncing smalldata is not required after each pull, but if tests fail due to missing data files, then try `./gradlew syncSmalldata` as the first troubleshooting step.  Syncing smalldata downloads data files from AWS S3 to the smalldata directory in your workspace.  The sync is incremental.  Do not check in these files.  The smalldata directory is in .gitignore.  If you do not run any tests, you do not need the smalldata directory.\n- Running `./gradlew syncRPackages` is supported on Windows, OS X, and Linux, and is strongly recommended but not required. `./gradlew syncRPackages` ensures a complete and consistent environment with pre-approved versions of the packages required for tests and builds. The packages can be installed manually, but we recommend setting an ENV variable and using `./gradlew syncRPackages`. To set the ENV variable, use the following format (where `${WORKSPACE}` can be any path):\n\n  ```\n  mkdir -p ${WORKSPACE}/Rlibrary\n  export R_LIBS_USER=${WORKSPACE}/Rlibrary\n  ```\n\n#### Recipe 4:  Just building the docs\n\n```\n./gradlew clean && ./gradlew build -x test && (export DO_FAST=1; ./gradlew dist)\nopen target/docs-website/h2o-docs/index.html\n```\n\n#### Recipe 5:  Building using a Makefile\n\nRoot of the git repository contains a Makefile with convenient shortcuts for frequent build targets used in development.\nTo build `h2o.jar` while skipping tests and also the building of alternative assemblies, execute \n\n```\nmake\n```\n\nTo build `h2o.jar` using the minimal assembly, run\n```\nmake minimal\n```\n\nThe minimal assembly is well suited for development of H2O machine learning algorithms. It doesn't bundle some heavyweight\ndependencies (like Hadoop) and using it saves build time as well as need to download large libraries from Maven repositories.\n\n<a name=\"SetupWin\"><\/a>\n### 4.3. Setup on Windows\n\n##### Step 1: Download and install [WinPython](https://winpython.github.io).\n  From the command line, validate `python` is using the newly installed package by using `which python` (or `sudo which python`). [Update the Environment variable](https://github.com/winpython/winpython/wiki/Environment) with the WinPython path.\n\n##### Step 2: Install required Python packages:\n\n    pip install grip tabulate wheel\n\n##### Step 3: Install JDK\n\nInstall [Java 1.8+](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html#java-requirements) and add the appropriate directory `C:\\Program Files\\Java\\jdk1.7.0_65\\bin` with java.exe to PATH in Environment Variables. To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\nThe CLASSPATH variable also needs to be set to the lib subfolder of the JDK:\n\n    CLASSPATH=/<path>/<to>/<jdk>/lib\n\n##### Step 4. Install Node.js\n\nInstall [Node.js](http://nodejs.org/download/) and add the installed directory `C:\\Program Files\\nodejs`, which must include node.exe and npm.cmd to PATH if not already prepended.\n\n##### Step 5. Install R, the required packages, and Rtools:\n\nInstall [R](http://www.r-project.org/) and add the bin directory to your PATH if not already included.\n\n<a name=\"InstallRPackagesInUnix\"><\/a>\nInstall the following R packages:\n\n- [RCurl](http://cran.r-project.org/package=RCurl)\n- [jsonlite](http://cran.r-project.org/package=jsonlite)\n- [statmod](http://cran.r-project.org/package=statmod)\n- [devtools](http://cran.r-project.org/package=devtools)\n- [roxygen2](http://cran.r-project.org/package=roxygen2)\n- [testthat](http://cran.r-project.org/package=testthat)\n\nTo install these packages from within an R session:\n\n```r\npkgs <- c(\"RCurl\", \"jsonlite\", \"statmod\", \"devtools\", \"roxygen2\", \"testthat\")\nfor (pkg in pkgs) {\n  if (! (pkg %in% rownames(installed.packages()))) install.packages(pkg)\n}\n```\nNote that [libcurl](http://curl.haxx.se) is required for installation of the **RCurl** R package.\n\nNote that this packages don't cover running tests, they are for building H2O only.\n\nFinally, install [Rtools](http://cran.r-project.org/bin/windows/Rtools/), which is a collection of command line tools to facilitate R development on Windows.\n>**NOTE**: During Rtools installation, do **not** install Cygwin.dll.\n\n##### Step 6. Install [Cygwin](https://cygwin.com/setup-x86_64.exe)\n**NOTE**: During installation of Cygwin, deselect the Python packages to avoid a conflict with the Python.org package.\n\n###### Step 6b. Validate Cygwin\nIf Cygwin is already installed, remove the Python packages or ensure that Native Python is before Cygwin in the PATH variable.\n\n##### Step 7. Update or validate the Windows PATH variable to include R, Java JDK, Cygwin.\n\n##### Step 8. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nIf you don't already have a Git client, please install one.  The default one can be found here http://git-scm.com/downloads.  Make sure that command prompt support is enabled before the installation.\n\nDownload and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 9. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew.bat build\n\n> If you encounter errors run again with `--stacktrace` for more instructions on missing dependencies.\n\n\n### 4.4. Setup on OS X\n\nIf you don't have [Homebrew](http://brew.sh/), we recommend installing it.  It makes package management for OS X easy.\n\n##### Step 1. Install JDK\n\nInstall [Java 1.8+](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html#java-requirementsl). To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\n##### Step 2. Install Node.js:\n\nUsing Homebrew:\n\n    brew install node\n\nOtherwise, install from the [Node.js website](http://nodejs.org/download/).\n\n##### Step 3. Install R and the required packages:\n\nInstall [R](http://www.r-project.org/) and add the bin directory to your PATH if not already included.\n\n<a name=\"InstallRPackagesInUnix\"><\/a>\nInstall the following R packages:\n\n- [RCurl](http://cran.r-project.org/package=RCurl)\n- [jsonlite](http://cran.r-project.org/package=jsonlite)\n- [statmod](http://cran.r-project.org/package=statmod)\n- [devtools](http://cran.r-project.org/package=devtools)\n- [roxygen2](http://cran.r-project.org/package=roxygen2)\n- [testthat](http://cran.r-project.org/package=testthat)\n\nTo install these packages from within an R session:\n\n```r\npkgs <- c(\"RCurl\", \"jsonlite\", \"statmod\", \"devtools\", \"roxygen2\", \"testthat\")\nfor (pkg in pkgs) {\n  if (! (pkg %in% rownames(installed.packages()))) install.packages(pkg)\n}\n```\nNote that [libcurl](http://curl.haxx.se) is required for installation of the **RCurl** R package.\n\nNote that this packages don't cover running tests, they for building H2O only.\n\n##### Step 4. Install python and the required packages:\n\nInstall python:\n\n    brew install python\n\nInstall pip package manager:\n\n    sudo easy_install pip\n\nNext install required packages:\n\n    sudo pip install wheel requests tabulate  \n\n##### Step 5. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nOS X should already have Git installed. To download and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 6. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew build\n\nNote: on a regular machine it may take very long time (about an hour) to run all the tests.\n\n> If you encounter errors run again with `--stacktrace` for more instructions on missing dependencies.\n\n### 4.5. Setup on Ubuntu 14.04\n\n##### Step 1. Install Node.js\n\n    curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -\n    sudo apt-get install -y nodejs\n\n##### Step 2. Install JDK:\n\nInstall [Java 8](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html#java-requirements). Installation instructions can be found here [JDK installation](http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre). To make sure the command prompt is detecting the correct Java version, run:\n\n    javac -version\n\n##### Step 3. Install R and the required packages:\n\nInstallation instructions can be found here [R installation](http://cran.r-project.org).  Click “Download R for Linux”.  Click “ubuntu”.  Follow the given instructions.\n\nTo install the required packages, follow the [same instructions as for OS X above](#InstallRPackagesInUnix).\n\n>**Note**: If the process fails to install RStudio Server on Linux, run one of the following:\n>\n>`sudo apt-get install libcurl4-openssl-dev`\n>\n>or\n>\n>`sudo apt-get install libcurl4-gnutls-dev`\n\n##### Step 4. Git Clone [h2o-3](https://github.com/h2oai/h2o-3.git)\n\nIf you don't already have a Git client:\n\n    sudo apt-get install git\n\nDownload and update h2o-3 source codes:\n\n    git clone https://github.com/h2oai/h2o-3\n\n##### Step 5. Run the top-level gradle build:\n\n    cd h2o-3\n    ./gradlew build\n\n> If you encounter errors, run again using `--stacktrace` for more instructions on missing dependencies.\n\n> Make sure that you are not running as root, since `bower` will reject such a run.\n\n### 4.6. Setup on Ubuntu 13.10\n\n##### Step 1. Install Node.js\n\n    curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -\n    sudo apt-get install -y nodejs\n\n##### Steps 2-4. Follow steps 2-4 for Ubuntu 14.04 (above)\n\n### 4.7. Setup on CentOS 7\n\n```\ncd /opt\nsudo wget --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie\" \"http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz\"\n\nsudo tar xzf jdk-7u79-linux-x64.tar.gz\ncd jdk1.7.0_79\n\nsudo alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 2\n\nsudo alternatives --install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2\nsudo alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 2\nsudo alternatives --set jar /opt/jdk1.7.0_79/bin/jar\nsudo alternatives --set javac /opt/jdk1.7.0_79/bin/javac\n\ncd /opt\n\nsudo wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm\nsudo rpm -ivh epel-release-7-5.noarch.rpm\n\nsudo echo \"multilib_policy=best\" >> /etc/yum.conf\nsudo yum -y update\n\nsudo yum -y install R R-devel git python-pip openssl-devel libxml2-devel libcurl-devel gcc gcc-c++ make openssl-devel kernel-devel texlive texinfo texlive-latex-fonts libX11-devel mesa-libGL-devel mesa-libGL nodejs npm python-devel numpy scipy python-pandas\n\nsudo pip install scikit-learn grip tabulate statsmodels wheel\n\nmkdir ~/Rlibrary\nexport JAVA_HOME=/opt/jdk1.7.0_79\nexport JRE_HOME=/opt/jdk1.7.0_79/jre\nexport PATH=$PATH:/opt/jdk1.7.0_79/bin:/opt/jdk1.7.0_79/jre/bin\nexport R_LIBS_USER=~/Rlibrary\n\n# install local R packages\nR -e 'install.packages(c(\"RCurl\",\"jsonlite\",\"statmod\",\"devtools\",\"roxygen2\",\"testthat\"), dependencies=TRUE, repos=\"http://cran.rstudio.com/\")'\n\ncd\ngit clone https://github.com/h2oai/h2o-3.git\ncd h2o-3\n\n# Build H2O\n./gradlew syncSmalldata\n./gradlew syncRPackages\n./gradlew build -x test\n\n```\n\n\n<a name=\"Launching\"><\/a>\n\n## 5. Launching H2O after Building\n\nTo start the H2O cluster locally, execute the following on the command line:\n\n    java -jar build/h2o.jar\n\nA list of available start-up JVM and H2O options (e.g. `-Xmx`, `-nthreads`, `-ip`), is available in the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/starting-h2o.html#from-the-command-line).\n\n<a name=\"BuildingHadoop\"><\/a>\n## 6. Building H2O on Hadoop\n\nPre-built H2O-on-Hadoop zip files are available on the [download page](http://h2o.ai/download).  Each Hadoop distribution version has a separate zip file in h2o-3.\n\nTo build H2O with Hadoop support yourself, first install sphinx for python: `pip install sphinx`\nThen start the build by entering  the following from the top-level h2o-3 directory:\n\n    export BUILD_HADOOP=1;\n    ./gradlew build -x test;\n    ./gradlew dist;\n\nThis will create a directory called 'target' and generate zip files there.  Note that `BUILD_HADOOP` is the default behavior when the username is `jenkins` (refer to `settings.gradle`); otherwise you have to request it, as shown above.\n\nTo build the zip files only for selected distributions use the `H2O_TARGET` env variable together with `BUILD_HADOOP`, for example:\n\n    export BUILD_HADOOP=1;\n    export H2O_TARGET=hdp2.5,hdp2.6\n    ./gradlew build -x test;\n    ./gradlew dist;\n\n### Adding support for a new version of Hadoop\n\nIn the `h2o-hadoop` directory, each Hadoop version has a build directory for the driver and an assembly directory for the fatjar.\n\nYou need to:\n\n1.  Add a new driver directory and assembly directory (each with a `build.gradle` file) in `h2o-hadoop`\n2.  Add these new projects to `h2o-3/settings.gradle`\n3.  Add the new Hadoop version to `HADOOP_VERSIONS` in `make-dist.sh`\n4.  Add the new Hadoop version to the list in `h2o-dist/buildinfo.json`\n\n\n### Secure user impersonation\n\nHadoop supports [secure user impersonation](https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/Superusers.html) through its Java API.  A kerberos-authenticated user can be allowed to proxy any username that meets specified criteria entered in the NameNode's core-site.xml file.  This impersonation only applies to interactions with the Hadoop API or the APIs of Hadoop-related services that support it (this is not the same as switching to that user on the machine of origin).\n\nSetting up secure user impersonation (for h2o):\n\n1.  Create or find an id to use as proxy which has limited-to-no access to HDFS or related services; the proxy user need only be used to impersonate a user\n2.  (Required if not using h2odriver) If you are not using the driver (e.g. you wrote your own code against h2o's API using Hadoop), make the necessary code changes to impersonate users (see [org.apache.hadoop.security.UserGroupInformation](http://hadoop.apache.org/docs/r2.8.0/api/org/apache/hadoop/security/UserGroupInformation.html))\n3.  In either of Ambari/Cloudera Manager or directly on the NameNode's core-site.xml file, add 2/3 properties for the user we wish to use as a proxy (replace <proxyusername> with the simple user name - not the fully-qualified principal name).\n    * `hadoop.proxyuser.<proxyusername>.hosts`: the hosts the proxy user is allowed to perform impersonated actions on behalf of a valid user from\n    * `hadoop.proxyuser.<proxyusername>.groups`: the groups an impersonated user must belong to for impersonation to work with that proxy user\n    * `hadoop.proxyuser.<proxyusername>.users`: the users a proxy user is allowed to impersonate\n    * Example: ```\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.hosts<\/name>\n                 <value>host1,host2<\/value>\n               <\/property>\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.groups<\/name>\n                 <value>group1,group2<\/value>\n               <\/property>\n               <property>\n                 <name>hadoop.proxyuser.myproxyuser.users<\/name>\n                 <value>user1,user2<\/value>\n               <\/property>\n               ```\n4.  Restart core services such as HDFS & YARN for the changes to take effect\n\nImpersonated HDFS actions can be viewed in the hdfs audit log ('auth:PROXY' should appear in the `ugi=` field in entries where this is applicable).  YARN similarly should show 'auth:PROXY' somewhere in the Resource Manager UI.\n\n\nTo use secure impersonation with h2o's Hadoop driver:\n\n*Before this is attempted, see Risks with impersonation, below*\n\nWhen using the h2odriver (e.g. when running with `hadoop jar ...`), specify `-principal <proxy user kerberos principal>`, `-keytab <proxy user keytab path>`, and `-run_as_user <hadoop username to impersonate>`, in addition to any other arguments needed.  If the configuration was successful, the proxy user will log in and impersonate the `-run_as_user` as long as that user is allowed by either the users or groups configuration property (configured above); this is enforced by HDFS & YARN, not h2o's code.  The driver effectively sets its security context as the impersonated user so all supported Hadoop actions will be performed as that user (e.g. YARN, HDFS APIs support securely impersonated users, but others may not).\n\n#### Precautions to take when leveraging secure impersonation\n\n*  The target use case for secure impersonation is applications or services that pre-authenticate a user and then use (in this case) the h2odriver on behalf of that user.  H2O's Steam is a perfect example: auth user in web app over SSL, impersonate that user when creating the h2o YARN container.\n*  The proxy user should have limited permissions in the Hadoop cluster; this means no permissions to access data or make API calls.  In this way, if it's compromised it would only have the power to impersonate a specific subset of the users in the cluster and only from specific machines.\n*  Use the `hadoop.proxyuser.<proxyusername>.hosts` property whenever possible or practical.\n*  Don't give the proxyusername's password or keytab to any user you don't want to impersonate another user (this is generally *any* user).  The point of impersonation is not to allow users to impersonate each other.  See the first bullet for the typical use case.\n*  Limit user logon to the machine the proxying is occurring from whenever practical.\n*  Make sure the keytab used to login the proxy user is properly secured and that users can't login as that id (via `su`, for instance)\n*  Never set hadoop.proxyuser.<proxyusername>.{users,groups} to '*' or 'hdfs', 'yarn', etc.  Allowing any user to impersonate hdfs, yarn, or any other important user/group should be done with extreme caution and *strongly* analyzed before it's allowed.\n\n#### Risks with secure impersonation\n\n*  The id performing the impersonation can be compromised like any other user id.\n*  Setting any `hadoop.proxyuser.<proxyusername>.{hosts,groups,users}` property to '*' can greatly increase exposure to security risk.\n*  When users aren't authenticated before being used with the driver (e.g. like Steam does via a secure web app/API), auditability of the process/system is difficult.\n\n\n```\n$ git diff\ndiff --git a/h2o-app/build.gradle b/h2o-app/build.gradle\nindex af3b929..097af85 100644\n--- a/h2o-app/build.gradle\n+++ b/h2o-app/build.gradle\n@@ -8,5 +8,6 @@ dependencies {\n   compile project(\":h2o-algos\")\n   compile project(\":h2o-core\")\n   compile project(\":h2o-genmodel\")\n+  compile project(\":h2o-persist-hdfs\")\n }\n\ndiff --git a/h2o-persist-hdfs/build.gradle b/h2o-persist-hdfs/build.gradle\nindex 41b96b2..6368ea9 100644\n--- a/h2o-persist-hdfs/build.gradle\n+++ b/h2o-persist-hdfs/build.gradle\n@@ -2,5 +2,6 @@ description = \"H2O Persist HDFS\"\n\n dependencies {\n   compile project(\":h2o-core\")\n-  compile(\"org.apache.hadoop:hadoop-client:2.0.0-cdh4.3.0\")\n+  compile(\"org.apache.hadoop:hadoop-client:2.4.1-mapr-1408\")\n+  compile(\"org.json:org.json:chargebee-1.0\")\n }\n```\n\n<a name=\"Sparkling\"><\/a>\n## 7. Sparkling Water\n\nSparkling Water combines two open-source technologies: Apache Spark and the H2O Machine Learning platform.  It makes H2O’s library of advanced algorithms, including Deep Learning, GLM, GBM, K-Means, and Distributed Random Forest, accessible from Spark workflows. Spark users can select the best features from either platform to meet their Machine Learning needs.  Users can combine Spark's RDD API and Spark MLLib with H2O’s machine learning algorithms, or use H2O independently of Spark for the model building process and post-process the results in Spark.\n\n**Sparkling Water Resources**:\n\n* [Download page for pre-built packages](http://h2o.ai/download/)\n* [Sparkling Water GitHub repository](https://github.com/h2oai/sparkling-water)  \n* [README](https://github.com/h2oai/sparkling-water/blob/master/README.md)\n* [Developer documentation](https://github.com/h2oai/sparkling-water/blob/master/DEVEL.md)\n\n<a name=\"Documentation\"><\/a>\n## 8. Documentation\n\n### Documentation Homepage\n\nThe main H2O documentation is the [H2O User Guide](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/index.html).  Visit <http://docs.h2o.ai> for the top-level introduction to documentation on H2O projects.\n\n\n### Generate REST API documentation\n\nTo generate the REST API documentation, use the following commands:\n\n    cd ~/h2o-3\n    cd py\n    python ./generate_rest_api_docs.py  # to generate Markdown only\n    python ./generate_rest_api_docs.py --generate_html  --github_user GITHUB_USER --github_password GITHUB_PASSWORD # to generate Markdown and HTML\n\nThe default location for the generated documentation is `build/docs/REST`.\n\nIf the build fails, try `gradlew clean`, then `git clean -f`.\n\n### Bleeding edge build documentation\n\nDocumentation for each bleeding edge nightly build is available on the [nightly build page](http://s3.amazonaws.com/h2o-release/h2o/master/latest.html).\n\n\n<a name=\"Citing\"><\/a>\n## 9. Citing H2O\n\nIf you use H2O as part of your workflow in a publication, please cite your H2O resource(s) using the following BibTex entry:\n\n### H2O Software\n\n\t@Manual{h2o_package_or_module,\n\t    title = {package_or_module_title},\n\t    author = {H2O.ai},\n\t    year = {year},\n\t    month = {month},\n\t    note = {version_information},\n\t    url = {resource_url},\n\t}\n\n**Formatted H2O Software citation examples**:\n\n- H2O.ai (Oct. 2016). _Python Interface for H2O_, Python module version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n- H2O.ai (Oct. 2016). _R Interface for H2O_, R package version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n- H2O.ai (Oct. 2016). _H2O_, H2O version 3.10.0.8. [https://github.com/h2oai/h2o-3](https://github.com/h2oai/h2o-3).\n\n### H2O Booklets\n\nH2O algorithm booklets are available at the [Documentation Homepage](http://docs.h2o.ai/h2o/latest-stable/index.html).\n\n\t@Manual{h2o_booklet_name,\n\t    title = {booklet_title},\n\t    author = {list_of_authors},\n\t    year = {year},\n\t    month = {month},\n\t    url = {link_url},\n\t}\n\n**Formatted booklet citation examples**:\n\nArora, A., Candel, A., Lanford, J., LeDell, E., and Parmar, V. (Oct. 2016). _Deep Learning with H2O_. <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/booklets/DeepLearningBooklet.pdf>.\n\nClick, C., Lanford, J., Malohlava, M., Parmar, V., and Roark, H. (Oct. 2016). _Gradient Boosted Models with H2O_. <http://docs.h2o.ai/h2o/latest-stable/h2o-docs/booklets/GBMBooklet.pdf>.\n\n<a name=\"Community\"><\/a>\n## 10. Community\n\nH2O has been built by a great many number of contributors over the years both within H2O.ai (the company) and the greater open source community.  You can begin to contribute to H2O by answering [Stack Overflow](http://stackoverflow.com/questions/tagged/h2o) questions or [filing bug reports](https://github.com/h2oai/h2o-3/issues).  Please join us!  \n\n\n### Team & Committers\n\n```\nSriSatish Ambati\nCliff Click\nTom Kraljevic\nTomas Nykodym\nMichal Malohlava\nKevin Normoyle\nSpencer Aiello\nAnqi Fu\nNidhi Mehta\nArno Candel\nJosephine Wang\nAmy Wang\nMax Schloemer\nRay Peck\nPrithvi Prabhu\nBrandon Hill\nJeff Gambera\nAriel Rao\nViraj Parmar\nKendall Harris\nAnand Avati\nJessica Lanford\nAlex Tellez\nAllison Washburn\nAmy Wang\nErik Eckstrand\nNeeraja Madabhushi\nSebastian Vidrio\nBen Sabrin\nMatt Dowle\nMark Landry\nErin LeDell\nAndrey Spiridonov\nOleg Rogynskyy\nNick Martin\nNancy Jordan\nNishant Kalonia\nNadine Hussami\nJeff Cramer\nStacie Spreitzer\nVinod Iyengar\nCharlene Windom\nParag Sanghavi\nNavdeep Gill\nLauren DiPerna\nAnmol Bal\nMark Chan\nNick Karpov\nAvni Wadhwa\nAshrith Barthur\nKaren Hayrapetyan\nJo-fai Chow\nDmitry Larko\nBranden Murray\nJakub Hava\nWen Phan\nMagnus Stensmo\nPasha Stetsenko\nAngela Bartz\nMateusz Dymczyk\nMicah Stubbs\nIvy Wang\nTerone Ward\nLeland Wilkinson\nWendy Wong\nNikhil Shekhar\nPavel Pscheidl\nMichal Kurka\nVeronika Maurerova\nJan Sterba\nJan Jendrusak\nSebastien Poirier\nTomáš Frýda\nArd Kelmendi\nYuliia Syzon\nAdam Valenta\nMarek Novotny\nZuzana Olajcova\n```\n\n<a name=\"Advisors\"><\/a>\n## Advisors\n\nScientific Advisory Council\n\n```\nStephen Boyd\nRob Tibshirani\nTrevor Hastie\n```\n\nSystems, Data, FileSystems and Hadoop\n\n```\nDoug Lea\nChris Pouliot\nDhruba Borthakur\n```\n\n<a name=\"Investors\"><\/a>\n## Investors\n\n```\nJishnu Bhattacharjee, Nexus Venture Partners\nAnand Babu Periasamy\nAnand Rajaraman\nAsh Bhardwaj\nRakesh Mathur\nMichael Marks\nEgbert Bierman\nRajesh Ambati\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"89F8:35EBC:172980:5C579C:6AB92153"},"text_sha256":"99dfb6bd59c676e0c779bd199c4648b77cad32574ec772e04a442741876d084d"},{"path":"h2o-docs/src/product/security.rst","size":36571,"blob_sha":"bc12cad9431ed30dc3a4b05ebd6208591e9478a2","priority":1,"status":200,"text":"Security\n========\n\nH2O contains security features intended for deployment inside a secure\ndata center.\n\nSecurity Model\n--------------\n\nBelow is a discussion of what the security assumptions are, and what the\nH2O software does and does not do.\n\nTerms\n~~~~~\n\n+-------------------------------------+---------------------------------+\n| Term                                | Definition                      |\n+=====================================+=================================+\n| **H2O Cluster**                     | A collection of H2O nodes that  | \n|                                     | work together. In the H2O Flow  | \n|                                     | Web UI, the cluster status menu |\n|                                     | item shows the list of nodes in | \n|                                     | an H2O cluster.                 |\n+-------------------------------------+---------------------------------+\n| **H2O node**                        | One VM instance running the H2O |\n|                                     | main class. One H2O node        | \n|                                     | corresponds to one OS-level     | \n|                                     | process. In the YARN case, one  | \n|                                     | H2O node corresponds to one     |\n|                                     | mapper instance and one YARN    |\n|                                     | container.                      |\n+-------------------------------------+---------------------------------+\n| **H2O embedded web port**           | Each H2O node contains an       |\n|                                     | embedded web port (by default   |\n|                                     | port 54321). This web port      |\n|                                     | hosts H2O Flow as well as the   |\n|                                     | H2O REST API. The user interacts|\n|                                     | directly with this web port.    |\n+-------------------------------------+---------------------------------+\n| **H2O Internal communication port** | Each H2O node also has an       |\n|                                     | internal port (web port+1, so by| \n|                                     | default port 54322) for internal| \n|                                     | node-to-node communication. This| \n|                                     | is a proprietary binary         |\n|                                     | protocol. An attacker using a   |\n|                                     | tool like tcpdump or wireshark  |\n|                                     | may be able to reverse engineer |\n|                                     | data captured on this           |\n|                                     | communication path.             |\n+-------------------------------------+---------------------------------+\n\nAssumptions (Threat Model)\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. H2O lives in a secure data center.\n\n2. Denial of service is not a concern.\n\n   -  H2O is not designed to withstand a DOS attack.\n\n3. HTTP traffic between the user client and H2O cluster needs to be\n   encrypted.\n\n   -  This is true for both interactive sessions (e.g the H2O Flow Web\n      UI) and programmatic sessions (e.g. an R program).\n\n4. Man-in-the-middle attacks are of low concern.\n\n   -  Certificate checking on the client side for R/python is not yet\n      implemented.\n\n5. You may want to secure internal binary H2O node-to-H2O node traffic\n   via encryption.\n\n6. You trust the person that starts H2O to start it correctly.\n\n   -  Enabling H2O security requires specifying the correct security\n      options.\n\n7. User client sessions do not need to expire. A session lives at most\n   as long as the cluster lifetime. H2O clusters are started and stopped\n   \"frequently enough\".\n\n   -  All data is stored in-memory, so restarting the H2O cluster wipes\n      all data from memory, and there is nothing to clean from disk.\n\n8. Once a user is authenticated for access to H2O, they have full\n   access.\n\n   -  H2O supports authentication but not authorization or access\n      control (ACLs).\n\n9. H2O clusters are meant to be accessed by only one user.\n\n   -  Each user starts their own H2O cluster.\n   -  H2O only allows access to the embedded web port to the person that\n      started the cluster.\n\nData Chain-of-Custody in a Hadoop Data Center Environment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n**Note**: This holds true for all versions of Hadoop (including YARN) supported by H2O.\n\nThrough this sequence, it is shown that a user is only able to access\nthe same data from H2O that they could already access from normal Hadoop\njobs.\n\n1. Data lives in HDFS\n2. The files in HDFS have permissions\n3. An HDFS user has permissions (capabilities) to access certain files\n4. Kerberos (kinit) can be used to authenticate a user in a Hadoop\n   environment\n5. A user's Hadoop MapReduce job inherits the permissions (capabilities)\n   of the user, as well as kinit metadata\n6. H2O is a Hadoop MapReduce job\n7. H2O can only access the files in HDFS that the user has permission to\n   access\n8. Only the user that started the cluster is authenticated for access to\n   the H2O cluster\n9. The authenticated user can access the same data in H2O that he could\n   access via HDFS\n\nWhat is Being Secured Today\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Standard file permissions security is provided by the Operating\n   System and by HDFS.\n\n2. The embedded web port in each node of H2O can be secured in two ways:\n\n +------------------+---------------------------------------+\n | Method           | Description                           |\n +==================+=======================================+\n | HTTPS            | Encrypted socket communication between|\n |                  | the user client and the embedded H2O  |\n |                  | web port.                             |\n +------------------+---------------------------------------+\n | Authentication   | An HTTP Basic Auth username and       |\n |                  | password from the user client.        |\n +------------------+---------------------------------------+\n\n**Note**: Embedded web port HTTPS and authentication may be used separately or together.\n\n3. Internal H2O node-to-H2O node communication can be encrypted.\n\n\nEnforcing System-Level Command-Line Arguments in h2odriver.jar\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSystem administrators can create a configuration file with implicit arguments of h2odriver and use it to make sure the H2O cluster is started with the specified security settings. \n\n1. Create the config file in **/etc/h2o/h2odriver.args**.\n2. Specify the default command-line options that you want to enforce. Note that each argument must be on a separate line. For example:\n\n .. code-block:: bash\n\n   h2o_ssl_jks_internal=keystore.jks\n   h2o_ssl_jks_password=password\n   h2o_ssl_jts_internal=truststore.jks\n   h2o_ssl_jts_password=password\n\n3. Start H2O.\n\n .. code-block:: bash\n\n  hadoop jar h2odriver.jar -mapperXmx 3g -nodes 1\n\nFile Security in H2O\n--------------------\n\nH2O is a normal user program. Nothing specifically needs to be done by\nthe user to get file security for H2O. Operating System and HDFS\npermissions \"just work\".\n\nStandalone H2O\n~~~~~~~~~~~~~~\n\nSince H2O is a regular Java program, the files H2O can access are\nrestricted by the user's Operating System permissions (capabilities).\n\nH2O on Hadoop\n~~~~~~~~~~~~~\n\nSince H2O is a regular Hadoop MapReduce program, the files H2O can\naccess are restricted by the standard HDFS permissions of the user that\nstarts H2O.\n\nSince H2O is a regular Hadoop MapReduce program, Kerberos (kinit) works\nseamlessly. (No code was added to H2O to support Kerberos.)\n\nSparkling Water on YARN\n~~~~~~~~~~~~~~~~~~~~~~~\n\nSimilar to H2O on Hadoop, this configuration is H2O on Spark on YARN.\nThe YARN job inherits the HDFS permissions of the user.\n\nEmbedded Web Port (by default port 54321) Security\n--------------------------------------------------\n\nFor the client side, connection options exist.\n\nFor the server side, startup options exist to facilitate security. These\nare detailed below.\n\n-------------\n\nHTTPS\n~~~~~\n\nHTTPS Client Side\n^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen HTTPS is enabled on the server side, the user must provide the\nhttps URI scheme to the browser. No http access will exist.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith HTTPS:\n\n.. code-block:: bash\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, https = TRUE, insecure = FALSE)\n\nThe underlying HTTPS implementation is provided by RCurl and by\nextension libcurl and OpenSSL.\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith HTTPS:\n\n.. code-block:: bash\n\n    h2o.init(ip=\"a.b.c.d\", port=54321, https=True, insecure=False)\n\nThe underlying HTTPS implementation is provided by RCurl and by\nextension libcurl and OpenSSL.\n\nHTTPS Server Side\n^^^^^^^^^^^^^^^^^\n\nA `Java Keystore <https://en.wikipedia.org/wiki/Keystore>`_ must be\nprovided on the server side to enable HTTPS. Keystores can be\nmanipulated on the command line with the\n`keytool <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html>`_\ncommand.\n\nThe underlying HTTPS implementation is provided by Jetty 9 and the Java\nruntime.\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n.. code-block:: bash\n\n    -jks <filename>\n         Java keystore file\n\n    -jks_pass <password>\n         (Default is 'h2oh2o')\n\n    -jks_alias <alias>\n         (Optional) Which certificate from the keystore to use\n\nExample:\n\n.. code-block:: bash\n\n    java -jar h2o.jar -jks h2o.jks\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n.. code-block:: bash\n\n    -jks <filename>\n         Java keystore file\n\n    -jks_pass <password>\n         (Default is 'h2oh2o')\n\n    -jks_alias <alias>\n         (Optional) Which certificate from the keystore to use\n\nExample:\n\n.. code-block:: bash\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -jks h2o.jks -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Java Keystore\nconfiguration:\n\n+--------------------------+-------------------------+\n| Spark conf property      | Description             |\n+==========================+=========================+\n| spark.ext.h2o.jks        | Path to Java Keystore   |\n+--------------------------+-------------------------+\n| spark.ext.h2o.jks.pass   | JKS password            |\n+--------------------------+-------------------------+\n\nExample:\n\n.. code-block:: bash\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.jks=/path/to/h2o.jks sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\nCreating your own self-signed Java Keystore\n'''''''''''''''''''''''''''''''''''''''''''\n\nHere is an example of how to create your own self-signed Java Keystore\n(mykeystore.jks) with a custom keystore password (mypass) and how to run\nstandalone H2O using your Keystore:\n\n.. code-block:: bash\n\n    # Be paranoid and delete any previously existing keystore.\n    rm -f mykeystore.jks\n\n    # Generate a new keystore.\n    keytool -genkey -keyalg RSA -keystore mykeystore.jks -storepass mypass -keysize 2048\n    What is your first and last name?\n      [Unknown]:  \n    What is the name of your organizational unit?\n      [Unknown]:  \n    What is the name of your organization?\n      [Unknown]:  \n    What is the name of your City or Locality?\n      [Unknown]:  \n    What is the name of your State or Province?\n      [Unknown]:  \n    What is the two-letter country code for this unit?\n      [Unknown]:  \n    Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?\n      [no]:  yes\n\n    Enter key password for <mykey>\n        (RETURN if same as keystore password):  \n\n    # Run H2O using the newly generated self-signed keystore.\n    java -jar h2o.jar -jks mykeystore.jks -jks_pass mypass\n\n----------------\n\nKerberos Authentication (via HTTP Basic)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nKerberos H2O Client Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n.. code-block:: bash\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nFor Python, connecting to H2O with authentication is similar:\n\n.. code-block:: bash\n\n    h2o.init(ip=\"a.b.c.d\", port=54321, username=\"myusername\", password=\"mypassword\")\n\nKerberos H2O Server Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou must provide a simple configuration file that specifies the Kerberos\nlogin module\n\nExample **kerb.conf**:\n\n.. code-block:: bash\n\n    krb5loginmodule {\n         com.sun.security.auth.module.Krb5LoginModule required\n    };\n\nIf the default realm and/or KDC cannot be automatically detected (e.g. by resolving KDC using DNS) you might need to\nspecify additional system properties ``java.security.krb5.realm`` and/or ``java.security.krb5.kdc`` when starting H2O\n(see example in the **Standalone H2O** section).\n\nFor more detail about Kerberos configuration:\n`Krb5LoginModule <https://docs.oracle.com/javase/8/docs/jre/api/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.html>`__,\n`Jaas note <http://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/tutorials/AcnOnly.html>`__\n\nStandalone H2O\n''''''''''''''\n\nThe following options are required for Kerberos authentication:\n\n.. code-block:: bash\n\n    -kerberos_login\n          Use Jetty KerberosLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n\n    -user_name <username>\n          Override name of user for which access is allowed\n\n\nExample:\n\n.. code-block:: bash\n\n    java -jar h2o.jar -kerberos_login -login_conf kerb.conf -user_name kerb_principal\n\nExample (with realm and KDC explicitly specified):\n\n.. code-block:: bash\n\n    java -Djava.security.krb5.realm=\"0XDATA.LOC\" -Djava.security.krb5.kdc=\"ldap.0xdata.loc\" -jar h2o.jar -kerberos_login -login_conf kerb.conf -user_name kerb_principal\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n.. code-block:: bash\n\n    -kerberos_login\n          Use Jetty KerberosLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n\n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n.. code-block:: bash\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -kerberos_login -login_conf kerb.conf -output hdfsOutputDirectory -user_name kerb_principal\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Kerberos configuration:\n\n+--------------------------------+--------------------------------------------+\n| Spark conf property            | Description                                |\n+================================+============================================+\n| spark.ext.h2o.kerberos.login   | Use Jetty Krb5LoginModule                  |\n+--------------------------------+--------------------------------------------+\n| spark.ext.h2o.login.conf       | LoginService configuration file            |\n+--------------------------------+--------------------------------------------+\n| spark.ext.h2o.user.name        | Name of user for which access is allowed   |\n+--------------------------------+--------------------------------------------+\n\n\nExample:\n\n.. code-block:: bash\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.kerberos.login=true --conf spark.ext.h2o.user.name=kerb_principal --conf spark.ext.h2o.login.conf=kerb.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n----------------\n\nKerberos Authentication (via kinit/SPNEGO)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nKerberos H2O Client Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nModern browsers support kerberos authentication out of the box.\nWhen attempting to reach Flow the server will respond with 401 with negotiate header\nand the browser will use last key acquired via kinit on the client machine.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith SPNEGO authentication:\n\n.. code-block:: bash\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, use_spnego = TRUE)\n\n**Limitation:** The R client uses the **RCurl** library, which does not allow you to specify service principal and\nis limited to automatic service principal generation via the template http/HOSTNAME@DOMAIN.\n\nPython Client\n'''''''''''''\n\nFor Python, connecting to H2O with authentication is similar:\n\n.. code-block:: bash\n\n    from h2o.auth import SpnegoAuth\n\n    h2o.connect(ip=\"a.b.c.d\", port=54321, auth=SpnegoAuth(service_principal=\"HTTP/h2o_server@EXAMPLE.COM\"))\n\n**Limitation:** Connecting to a SPNEGO-configured H2O server is currently possible only via ``h2o.connect``. (``h2o.init`` not supported). The next section describes how to specify ``service_principal``.\n\nKerberos H2O Server Side\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nOn the machine running the H2O server a keytab file must be created containing the key for\nthe service principal used by this server. The same service principal must be used in the client\ncode when connecting to the server.\n\nYou must provide configuration files for the SPNEGO login module:\n\nExample **spnego.conf**:\n\n.. code-block:: bash\n\n    com.sun.security.jgss.initiate {\n        com.sun.security.auth.module.Krb5LoginModule required\n        principal=\"HTTP/h2o_server@EXAMPLE.COM\"\n        keyTab=\"/srv/h2o.keytab\"\n        useKeyTab=true\n        storeKey=true\n        isInitiator=false;\n    };\n\n    com.sun.security.jgss.accept {\n        com.sun.security.auth.module.Krb5LoginModule required\n        principal=\"HTTP/h2o_server@EXAMPLE.COM\"\n        keyTab=\"/srv/h2o.keytab\"\n        useKeyTab=true\n        storeKey=true\n        isInitiator=false;\n    };\n\nExample **spnego.properties**:\n\n.. code-block:: bash\n\n    targetName=HTTP/h2o_server@EXAMPLE.COM\n\n\nStandalone H2O\n''''''''''''''\n\nThe following options are required for SPNEGO authentication:\n\n.. code-block:: bash\n\n    -spnego_login\n          Use Jetty SPNEGO Login Service\n\n    -user_name <username>\n          Principal for which access is allowed, must be full kerberos name name/path@DOMAIN\n\n    -login_conf <filename>\n          path to spnego.conf file, see example above\n\n    -spnego_properties <filename>\n          path to spnego.properties file, see example above\n\nExample:\n\n.. code-block:: bash\n\n    java -jar h2o.jar \\\n        -spnego_login -user_name pricipal@DOMAIN \\\n        -login_conf /path/to/spnego.conf \\\n        -spnego_properties /path/to/spnego.properties\n\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n.. code-block:: bash\n\n\n    -spnego_login\n          Use Jetty SPNEGO Login Service\n\n    -user_name <username>\n          Principal for which access is allowed, must be full kerberos name name/path@DOMAIN\n\n    -login_conf <filename>\n          path to spnego.conf file, see example above\n\n    -spnego_properties <filename>\n          path to spnego.properties file, see example above\n\n\nExample:\n\n.. code-block:: bash\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -output hdfsOutputDirectory \\\n        -proxy -spnego_login -user_name pricipal@DOMAIN \\\n        -login_conf /path/to/spnego.conf \\\n        -spnego_properties /path/to/spnego.properties\n\n**Limitation:** Because a Kerberos service principal is tied to a hostname, we recommend that you use SPNEGO authentication only with the ``-proxy`` option.\n\n----------------\n\nLDAP Authentication\n~~~~~~~~~~~~~~~~~~~\n\nH2O client and server side configuration for LDAP is discussed below.\nAuthentication is implemented using `Basic\nAuth <https://en.wikipedia.org/wiki/Basic_access_authentication>`__.\n\nLDAP H2O Client Side\n^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip=\"a.b.c.d\", port=54321, username=\"myusername\", password=\"mypassword\")\n\nLDAP H2O Server Side\n^^^^^^^^^^^^^^^^^^^^\n\nAn ldap.conf configuration file must be provided by the user. As an\nexample, this file works for H2O's internal LDAP server. You will\ncertainly need help from your IT security folks to adjust this\nconfiguration file for your environment.\n\nExample **ldap.conf**:\n\n::\n\n    ldaploginmodule {\n        ai.h2o.org.eclipse.jetty.plus.jaas.spi.LdapLoginModule required\n        debug=\"true\"\n        useLdaps=\"false\"\n        contextFactory=\"com.sun.jndi.ldap.LdapCtxFactory\"\n        hostname=\"ldap.0xdata.loc\"\n        port=\"389\"\n        bindDn=\"cn=admin,dc=0xdata,dc=loc\"\n        bindPassword=\"0xdata\"\n        authenticationMethod=\"simple\"\n        forceBindingLogin=\"true\"\n        userBaseDn=\"ou=users,dc=0xdata,dc=loc\";\n    };\n\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n::\n\n    -ldap_login\n          Use Jetty LdapLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n         \n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n::\n\n    java -jar h2o.jar -ldap_login -login_conf ldap.conf\n\n    java -jar h2o.jar -ldap_login -login_conf ldap.conf -user_name myLDAPusername\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -ldap_login\n          Use Jetty LdapLoginService\n\n    -login_conf <filename>\n          LoginService configuration file\n         \n    -user_name <username>\n          Override name of user for which access is allowed\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -ldap_login -login_conf ldap.conf -output hdfsOutputDirectory\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -ldap_login -login_conf ldap.conf -user_name myLDAPusername -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for Java keystore\nconfiguration:\n\n+----------------------------+-----------------------------------------------------+\n| Spark conf property        | Description                                         |\n+============================+=====================================================+\n| spark.ext.h2o.ldap.login   | Use Jetty LdapLoginService                          |\n+----------------------------+-----------------------------------------------------+\n| spark.ext.h2o.login.conf   | LoginService configuration file                     |\n+----------------------------+-----------------------------------------------------+\n| spark.ext.h2o.user.name    | Override name of user for which access is allowed   |\n+----------------------------+-----------------------------------------------------+\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.ldap.login=true --conf spark.ext.h2o.login.conf=/path/to/ldap.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.ldap.login=true --conf spark.ext.h2o.user.name=myLDAPusername --conf spark.ext.h2o.login.conf=/path/to/ldap.conf sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\n\nLDAP Authentication and MapR\n''''''''''''''''''''''''''''\n\nThe following information is for users who authentication with LDAP on MapR, which uses a proprietary Hadoop configuration property that specifies the configuration file. Additional information is available here: `http://doc.mapr.com/display/MapR/mapr.login.conf <http://doc.mapr.com/display/MapR/mapr.login.conf>`__.\n\nIn order to make LDAP authentication work, add the ldap.conf definition to the MapR configuration file in **/opt/mapr/conf/mapr.login.conf**.  \n\nDebugging Server-side LDAP issues\n'''''''''''''''''''''''''''''''''\n\nTo get detailed output from Jetty for LDAP debugging, you need to create the **jetty-logging.properties** file and add it to your classpath.\n\nExample **jetty-logging.properties**:\n\n::\n\n    org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog\n    org.eclipse.jetty.LEVEL=DEBUG\n\nStandalone H2O example (with **jetty-logging.properties** in the current directory):\n\n::\n\n    java -cp h2o.jar:. water.H2OApp\n\nH2O on Hadoop example (with **jetty-logging.properties** in the current directory):\n\n::\n\n    hadoop jar h2odriver.jar -libjars jetty-logging.properties -n 1 -mapperXmx 5g -output hdfsOutputDirectory\n\n-------------\n\nPluggable Authentication Module (PAM) Authentication\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis section describes H2O client and server side configuration for `PAM authentication <https://en.wikipedia.org/wiki/Pluggable_authentication_module>`__. \n\nPAM H2O Client Side\n^^^^^^^^^^^^^^^^^^^\n\nFlow UI Client\n''''''''''''''\n\nWhen PAM authentication is enabled, the user will be presented with a username and password dialog box when attempting to reach Flow. \n\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nFor Python, connecting to H2O with authentication is similar:\n\n::\n\n    h2o.init(ip=\"a.b.c.d\", port=54321, username=\"myusername\", password=\"mypassword\")\n\n\nPAM H2O Server Side\n^^^^^^^^^^^^^^^^^^^\n\nYou must provide a simple configuration file that specifies the PAM login module.\n\n**Example pam.conf**\n\n::\n\n  pamloginmodule {\n       de.codedo.jaas.PamLoginModule required\n       service = h2o;\n  };\n\nNote that the name of the service is user configurable, and this name must match the name of the PAM authentication module that you created for the \"h2o service\".\n\n\nStandalone H2O\n''''''''''''''\n\nThe following options are required for PAM authentication:\n\n::\n\n  -pam_login\n      Use PAM LoginService\n\n  -login_conf <filename>\n        LoginService configuration file\n       \n  -user_name <username>\n        Override name of user for which access is allowed\n\n  -form_auth\n        Optionally enable form-based authentication for Flow\n\n  -session_timeout\n        If form_auth is enabled, optionally specify the number of minutes \n        that a session can remain idle before the server invalidates the \n        session and requests a new login\n\n**Example**\n\n::\n\n  java -jar h2o.jar -pam_login -login_conf pam.conf -user_name\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n  -pam_login\n      Use PAM LoginService\n\n  -login_conf <filename>\n        LoginService configuration file\n       \n  -user_name <username>\n        Override name of user for which access is allowed\n\n  -form_auth\n        Optionally enable form-based authentication for Flow\n\n  -session_timeout\n        If form_auth is enabled, optionally specify the number of minutes \n        that a session can remain idle before the server invalidates the \n        session and requests a new login\n\n\n**Example**\n\n::\n\n  hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -pam_login -login_conf pam.conf -output hdfsOutputDirectory -user_name\n\n-------------\n\nHash File Authentication\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nH2O client and server side configuration for a hardcoded hash file is\ndiscussed below. Authentication is implemented using `Basic\nAuth <https://en.wikipedia.org/wiki/Basic_access_authentication>`__.\n\nHash File H2O Client Side\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFlow Web UI Client\n''''''''''''''''''\n\nWhen authentication is enabled, the user will be presented with a\nusername and password dialog box when attempting to reach Flow.\n\nR Client\n''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip = \"a.b.c.d\", port = 54321, username = \"myusername\", password = \"mypassword\")\n\nPython Client\n'''''''''''''\n\nThe following code snippet demonstrates connecting to an H2O cluster\nwith authentication:\n\n::\n\n    h2o.init(ip=\"a.b.c.d\", port=54321, username=\"myusername\", password=\"mypassword\")\n\nHash File H2O Server Side\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nA **realm.properties** configuration file must be provided by the user.\n\nExample **realm.properties**:\n\n::\n\n    # See https://wiki.eclipse.org/Jetty/Howto/Secure_Passwords\n    # java -cp h2o.jar org.eclipse.jetty.util.security.Password\n    username1: password1\n    username2: MD5:6cb75f652a9b52798eb6cf2201057c73\n\nGenerate secure passwords using the Jetty secure password generation\ntool:\n\n::\n\n    java -cp h2o.jar org.eclipse.jetty.util.security.Password username password\n\nSee the `Jetty 9 HashLoginService\ndocumentation <http://wiki.eclipse.org/Jetty/Tutorial/Realms#HashLoginService>`_\nand `Jetty 9 Secure Password\nHOWTO <http://wiki.eclipse.org/Jetty/Howto/Secure_Passwords>`_ for more\ninformation.\n\nStandalone H2O\n''''''''''''''\n\nThe following options are available:\n\n::\n\n    -hash_login\n          Use Jetty HashLoginService\n              \n    -login_conf <filename>\n          LoginService configuration file\n\nExample:\n\n::\n\n    java -jar h2o.jar -hash_login -login_conf realm.properties\n\nH2O on Hadoop\n'''''''''''''\n\nThe following options are available:\n\n::\n\n    -hash_login\n          Use Jetty HashLoginService\n              \n    -login_conf <filename>\n          LoginService configuration file\n\nExample:\n\n::\n\n    hadoop jar h2odriver.jar -n 3 -mapperXmx 10g -hash_login -login_conf realm.propertes -output hdfsOutputDirectory\n\nSparkling Water\n'''''''''''''''\n\nThe following Spark conf properties exist for hash login service\nconfiguration:\n\n+----------------------------+-----------------------------------+\n| Spark conf property        | Description                       |\n+============================+===================================+\n| spark.ext.h2o.hash.login   | Use Jetty HashLoginService        |\n+----------------------------+-----------------------------------+\n| spark.ext.h2o.login.conf   | LoginService configuration file   |\n+----------------------------+-----------------------------------+\n\nExample:\n\n::\n\n    $SPARK_HOME/bin/spark-submit --class water.SparklingWaterDriver --conf spark.ext.h2o.hash.login=true --conf spark.ext.h2o.login.conf=/path/to/realm.properties sparkling-water-assembly-0.2.17-SNAPSHOT-all.jar\n\nSSL Internode Security\n----------------------\n\nBy default, communication between H2O nodes is not encrypted for performance reasons. H2O currently support SSL/TLS authentication (basic handshake authentication) and data encryption for internode communication.\n\nUsage\n~~~~~\n\nHadoop\n^^^^^^\n\nThe easiest way to enable SSL while running H2O via h2odriver is to pass the ``-internal_secure_connections`` flag. This will tell h2odriver to automatically generate all the necessary files and distribute them to all mappers. This distribution may be secure depending on your YARN configuration.\n\n::\n\n  hadoop jar h2odriver.jar -nodes 4 -mapperXmx 6g -output hdfsOutputDirName -internal_secure_connections\n\n\nThe user can also manually generate keystore/truststore and properties file as described in the `Standalone/AWS`_ section that follows and run the following command to use them instead. In this case, all the files (certificates and properties) have to be distributed to all the mapper nodes by the user.\n\n::\n\n  hadoop jar h2odriver.jar -nodes 4 -mapperXmx 6g -output hdfsOutputDirName -internal_security_conf security.properties\n\n\nStandalone/AWS\n^^^^^^^^^^^^^^\n\nIn this case, the user has to generate the keystores, truststores, and properties file manually.\n\n1. Generate public/private keys and distributed them. (Refer to the `Keystore/Truststore Generation`_ section for more information).\n\n2. Create the security properties file. (Refer to the `Configuration`_ section for a full list of parameters.)\n\n ::\n\n    h2o_ssl_jks_internal=keystore.jks\n    h2o_ssl_jks_password=password\n    h2o_ssl_jts_internal=truststore.jks\n    h2o_ssl_jts_password=password\n\n3. To start an SSL-enabled node, pass the location to the properties file using the ``-internal_security_conf`` flag\n\n ::\n\n  java -jar h2o.jar -internal_security_conf security.properties\n\nConfiguration\n~~~~~~~~~~~~~\n\nTo enable this feature, set the ``-internal_security_conf`` parameter when starting an H2O node, and point that to a configuration file (key=value format) that contains the following values:\n\n- ``h2o_ssl_jks_internal`` (required): The path (absolute or relative) to the key-store file used for internal SSL communication\n- ``h2o_ssl_jks_password`` (required): The password for the internal key-store\n- ``h2o_ssl_jts_internal`` (optional): The path (absolute or relative) to the trust-store file used for internal SSL communication. If not present, then ``h2o_ssl_jks_internal`` will be used.\n- ``h2o_ssl_jts_password`` (optional): The password to the internal trust-store. If not present, then ``h2o_ssl_jks_password`` will be used.\n- ``h2o_ssl_protocol`` (optional): The protocol name used during encrypted communication (supported by JVM). This defaults to TSLv1.2.\n- ``h2o_ssl_enabled_algorithms`` (optional): A comma separated list of enabled cipher algorithms. Include only those that are supported by JVM.\n\nThis must be set for every node in the cluster. Every node needs to have access to both Java keystore and Java truststore containing appropriate keys and certificates.\n\n\nKeystore/Truststore Generation\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nKeystore/truststore creation and distribution are deployment specific and have to be handled by the end user.\n\nBasic keystore/truststore generation can be done using the keytool program, which ships with Java, documentation can be found `here <https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html>`__. Each node should have a key pair generated, and all public keys should be imported into a single truststore, which should be distributed to all the nodes.\n\nThe simplest (though not recommended) way would be to call:\n\n::\n\n  keytool -genkeypair -keystore h2o-internal.jks -alias h2o-internal\n\nThen distribute the ``h2o-internal.jks`` file to all the nodes, and set it as both the keystore and truststore in ``ssl.config``. \n\nA more secure way would be to:\n\n1. Run the same command on each node:\n  \n ::\n\n  keytool -genkeypair -keystore h2o-internal.jks -alias h2o-internal\n\n2. Extract the certificate on each node:\n\n ::\n\n  keytool -export -keystore h2o-internal.jks -alias h2o-internal -file node<number>.cer\n\n3. Distribute all of the above certificates to each node, and on each node create a truststore containing all of them (or put all certificates on one node, import to truststore and distribute that truststore to each node):\n\n ::\n\n  keytool -importcert -file node<number>.cer -keystore truststore.jks -alias node<number>\n\n\nPerformance\n~~~~~~~~~~~\n\nTurning on SSL may result in performance overhead for settings and algorithms that exchange data between nodes due to encryption/decryption time. Some algorithms might also slower because of this.\n\nExample benchmark on a 5 node cluster (6GB memory per node) working with a 5.8mln row dataset (580MB):\n\n+------------+---------------------+------------------------+\n|            | Non SSL             | SSL                    |\n+============+=====================+========================+\n| Parsing:   | 4.908s              | 5.304s                 |\n+------------+---------------------+------------------------+\n| GLM model: | 01:39.446           | 01:49.634              |\n+------------+---------------------+------------------------+\n\nCaveats and Missing Pieces\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n - Should you start a mixed cloud of SSL and nonSSL nodes, the SSL ones will fail to bootstrap, while the nonSSL ones will become unresponsive.\n - H2O does not provide in-memory data encryption. This might spill data to disk in unencrypted form should swaps to disk occur. As a workaround, an encrypted drive is advised.\n - H2O does not support encryption of data saved to disk, should appropriate flags be enabled. Similar to the previous caveat, the user can use an encrypted drive to work around this issue.\n - H2O supports only SSL and does not support SASL.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FDAA:326565:1754E3:5C83BE:6AB92154"},"text_sha256":"537979a72b661a7c5bee31851fa4e8fda7c2a39f33ce9d6b1960e51b023a0eea"},{"path":"SECURITY.md","size":3525,"blob_sha":"f05861c4e391f952fbfa3cc7a7ef89137e9fa2a2","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report (suspected) security vulnerabilities to support@h2o.ai. You will receive a response from us within 48 hours. \nIf the issue is confirmed, we will release a patch as soon as possible depending on complexity but historically within a few days.\n\n## Known Vulnerabilities\nWe located these vulnerabilites from our security scans. The following list shows the vulnerabilities and the libraries they were found in:\n\nTotal: 6 (UNKNOWN: 0, LOW: 2, MEDIUM: 3, HIGH: 1, CRITICAL: 0)\n\n| Library                         | Vulnerability    | Severity | Installed Version | Fixed Version | Title | Mitigation Status |\n|---------------------------------|----------------|---------|-----------------|---------------|-------|-------------------|\n| org.eclipse.jetty:jetty-http    | CVE-2026-2332  | HIGH    | 9.4.57.v20241219| 12.0.33, 12.1.7 | HTTP request smuggling via chunked extension quoting [Link](https://avd.aquasec.com/nvd/cve-2026-2332) | Jetty will be upgraded in a future release. |\n| commons-lang:commons-lang       | CVE-2025-48924 | MEDIUM  | 2.6             |               | Uncontrolled Recursion vulnerability in `ClassUtils.getClass()` [Link](https://avd.aquasec.com/nvd/cve-2025-48924) | Not affected. H2O does not use `ClassUtils` anywhere in the codebase. H2O only uses safe utility methods from this library (e.g., `ArrayUtils`, `StringUtils.join`, `StringUtils.repeat`). |\n| org.eclipse.jetty:jetty-http    | CVE-2024-6763  | MEDIUM  | 9.4.57.v20241219| 12.0.12       | Jetty URI parsing of invalid authority [Link](https://avd.aquasec.com/nvd/cve-2024-6763) | Not affected. The vulnerability only affects applications that use `HttpURI` directly as a utility for URI validation. H2O does not use `HttpURI` in application code; only Jetty's own internal `Response.encodeURL()` references it, which the [Jetty advisory](https://github.com/jetty/jetty.project/security/advisories/GHSA-qh8g-58pp-2wxh) confirms is not vulnerable. |\n| org.apache.commons:commons-configuration2 | CVE-2026-45205 | MEDIUM | 2.10.1 | 2.15.0 | Uncontrolled Recursion vulnerability in Apache Commons Configuration [Link](https://avd.aquasec.com/nvd/cve-2026-45205) | Will be addressed in the 3.46.0.11-2 docker image. |\n| org.apache.hadoop:hadoop-common | CVE-2024-23454 | LOW     | 3.3.6           | 3.4.0         | Apache Hadoop: Temporary File Local Information Disclosure [Link](https://avd.aquasec.com/nvd/cve-2024-23454) | Not affected. The vulnerability involves Hadoop's `FileUtil.createTempFile()` creating temporary files with world-readable permissions (0666). H2O does not use Hadoop's `FileUtil` for temporary file creation. All temp file operations use Java's standard `File.createTempFile()`, and credential/keytab files are written via Java's `FileOutputStream` directly. |\n| org.eclipse.jetty:jetty-http    | CVE-2025-11143 | LOW     | 9.4.57.v20241219| 12.0.31, 12.1.5 | Security bypass due to different URI parsing between Jetty HttpURI and java.net.URI [Link](https://avd.aquasec.com/nvd/cve-2025-11143) | Not affected. The vulnerability requires an application to use both Jetty's `HttpURI` and Java's `java.net.URI` for security decisions, creating a parsing inconsistency bypass. H2O only uses Jetty's servlet API (`getServletPath()`) for URI extraction, does not use `HttpURI` or `java.net.URI` for security-critical comparisons, and its authentication constraint uses a blanket wildcard `/*` path that applies to all requests regardless of URI parsing. |\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9410:2B291E:17DA77:5D093E:6AB9213E"},"text_sha256":"baaeaca561b8c5eac4381ee4169671799932cfbd8d1aeeafa8c9b1063339b4c8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/Paddle-Lite","input_row":{"repository":"PaddlePaddle/Paddle-Lite","url":"https://github.com/PaddlePaddle/Paddle-Lite","name":"Paddle-Lite","owner":"PaddlePaddle","description":"PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎）","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":7278,"issues":2570,"created_at":"2017-09-20T11:41:42Z","updated_at":"2026-09-25T10:35:12Z","first_commit_at":"2018-05-16T04:15:51Z","last_commit_at":"2025-05-22T12:07:25Z","activity_months":84.209999999999994,"ai_ml_match_topics":"deep-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:49.343Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/Paddle-Lite","visibility":"public","created_at":"2017-09-20T11:41:42Z","updated_at":"2026-09-25T10:35:12Z","private":false,"fork":false,"archived":false,"stargazers_count":7278,"open_issues_count":47,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3183","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17AEA88:1BCDFC3:6AB92911"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3182","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:17932D8:1BB3492:6AB92911"},"commit":{"sha":"1d2adcda43daf0191d66b6c0966fd51915ae3d8a","url":"https://github.com/PaddlePaddle/Paddle-Lite/commit/1d2adcda43daf0191d66b6c0966fd51915ae3d8a","date":"2018-05-24T13:04:55Z","author_date":"2018-05-24T13:04:55Z","committer_date":"2018-05-24T13:04:55Z","tree_sha":"96c9e50d9c00c1c15df07cbeeb2ed11372defca1","message_first_line":"format files"},"tree_request_status":200,"tree_rate":{"github_remaining":"3181","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0934:767EB:17DDF57:1BFE527:6AB92912"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":620,"blob_sha":"2745eae39b58e72d97f6aed653b399f6f66f5e12","priority":0}],"documents":[{"path":"README.md","size":620,"blob_sha":"2745eae39b58e72d97f6aed653b399f6f66f5e12","priority":0,"status":200,"text":"# Paddle-Mobile \n\n![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg)  [![Build Status](https://travis-ci.org/PaddlePaddle/paddle-mobile.svg?branch=develop&longCache=true&style=flat-square)](https://travis-ci.org/PaddlePaddle/paddle-mobile)\n\n\n\nThis project is used to develop the next version deep learning freamwork for mobile device.\n\n# Development\n\n[Used model in development](https://mms-mis.cdn.bcebos.com/paddle-mobile/models.zip)\n\n## Old Version of Mobile-Deep-Learning\nThe old version of MDL was I moved to here [Mobile-Deep-Learning](https://github.com/allonli/mobile-deep-learning) \n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EA0:372D9:176A1C:5C997F:6AB92157"},"text_sha256":"e1add764d26005f887b6dc99fab56bbed3d277a1a6010b66dc55c39e568ff175"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3180","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17B8F44:1BD8FA7:6AB92912"},"commit":{"sha":"8c07d68f8508b722b903f366dc6a84efb2e086ef","url":"https://github.com/PaddlePaddle/Paddle-Lite/commit/8c07d68f8508b722b903f366dc6a84efb2e086ef","date":"2025-05-22T12:07:25Z","author_date":"2025-05-22T12:07:25Z","committer_date":"2025-05-22T12:07:25Z","tree_sha":"7ef39b08b55f367e706b03cf0d0271cd91ff8282","message_first_line":"[BUGFIX] Protect against null pointer exceptions when accessing attributes in OpDescView (#10667)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3179","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082E:72BD3:17E4ABF:1C04A03:6AB92913"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12683,"blob_sha":"24272fd4223ce0d047d8c12e8a5631ca6a1ad597","priority":0}],"documents":[{"path":"README.md","size":12683,"blob_sha":"24272fd4223ce0d047d8c12e8a5631ca6a1ad597","priority":0,"status":200,"text":"#  Paddle Lite\n\n[English](README_en.md) | 简体中文\n\n  [![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://www.paddlepaddle.org.cn/lite)  [![Release](https://img.shields.io/github/release/PaddlePaddle/Paddle-Lite.svg)](https://github.com/PaddlePaddle/Paddle-Lite/releases)  [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE) \n\nPaddle Lite 是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架，定位于支持包括移动端、嵌入式以及边缘端在内的多种硬件平台。\n\n当前 Paddle Lite 不仅在百度内部业务中得到全面应用，也成功支持了众多外部用户和企业的生产任务。\n\n## 快速入门\n\n使用 Paddle Lite，只需几个简单的步骤，就可以把模型部署到多种终端设备中，运行高性能的推理任务，使用流程如下所示：\n\n**一. 准备模型**\n\nPaddle Lite 框架直接支持模型结构为 [PaddlePaddle](https://github.com/PaddlePaddle/Paddle) 深度学习框架产出的模型格式。目前 PaddlePaddle 用于推理的模型是通过 [save_inference_model](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/static/save_inference_model_cn.html#save-inference-model) 这个 API 保存下来的。\n如果您手中的模型是由诸如 Caffe、Tensorflow、PyTorch 等框架产出的，那么您可以使用 [X2Paddle](https://github.com/PaddlePaddle/X2Paddle) 工具将模型转换为 PaddlePaddle 格式。\n\n**二. 模型优化**\n\nPaddle Lite 框架拥有优秀的加速、优化策略及实现，包含量化、子图融合、Kernel 优选等优化手段。优化后的模型更轻量级，耗费资源更少，并且执行速度也更快。\n这些优化通过 Paddle Lite 提供的 opt 工具实现。opt 工具还可以统计并打印出模型中的算子信息，并判断不同硬件平台下 Paddle Lite 的支持情况。您获取 PaddlePaddle 格式的模型之后，一般需要通过该 opt 工具做模型优化。opt 工具的下载和使用，请参考[模型优化方法](https://www.paddlepaddle.org.cn/lite/develop/user_guides/model_optimize_tool.html)。\n\n**三. 下载或编译**\n\nPaddle Lite 提供了 Android/iOS/x86/macOS 平台的官方 Release 预测库下载，我们优先推荐您直接下载 [Paddle Lite 预编译库](https://www.paddlepaddle.org.cn/lite/develop/quick_start/release_lib.html)，或者从 Release notes 处获取最新的[预编译编译库](https://github.com/PaddlePaddle/Paddle-Lite/releases)。\n\nPaddle Lite 已支持多种环境下的源码编译，为了避免复杂、繁琐的环境搭建过程，我们建议您使用 [Docker 统一编译环境搭建](https://www.paddlepaddle.org.cn/lite/develop/source_compile/docker_env.html) 进行编译。当然，您也可以根据宿主机和目标设备的 CPU 架构和操作系统，在[源码编译](https://www.paddlepaddle.org.cn/lite/develop/source_compile/compile_env.html)中找到相应的环境搭建及编译指南，自行完成编译环境的搭建。\n\n**四. 预测示例**\n\nPaddle Lite 提供了 C++、Java、Python 三种 API，并且提供了相应 API 的完整使用示例:\n\n- [C++ 完整示例](https://www.paddlepaddle.org.cn/lite/develop/user_guides/cpp_demo.html)\n- [Java 完整示例](https://www.paddlepaddle.org.cn/lite/develop/user_guides/java_demo.html)\n- [Python 完整示例](https://www.paddlepaddle.org.cn/lite/develop/user_guides/python_demo.html)\n\n您可以参考示例中的说明快速了解使用方法，并集成到您自己的项目中去。\n\n针对不同的硬件平台，Paddle Lite 提供了各个平台的完整示例：\n\n- [Android apps](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/android_app_demo.html) [[图像分类]](https://paddlelite-demo.bj.bcebos.com/apps/android/mobilenet_classification_demo.apk)  [[目标检测]](https://paddlelite-demo.bj.bcebos.com/apps/android/yolo_detection_demo.apk) [[口罩检测]](https://paddlelite-demo.bj.bcebos.com/apps/android/mask_detection_demo.apk)  [[人脸关键点]](https://paddlelite-demo.bj.bcebos.com/apps/android/face_keypoints_detection_demo.apk) [[人像分割]](https://paddlelite-demo.bj.bcebos.com/apps/android/human_segmentation_demo.apk)\n- [iOS apps](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/ios_app_demo.html)\n- [Linux apps](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/linux_arm_demo.html)\n- [Arm](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/arm_cpu.html)\n- [x86](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/x86.html)\n- [OpenCL](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/opencl.html)\n- [Metal](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/metal.html)\n- [华为麒麟 NPU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/huawei_kirin_npu.html)\n- [华为昇腾 NPU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/huawei_ascend_npu.html)\n- [昆仑芯 XPU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/kunlunxin_xpu.html)\n- [昆仑芯 XTCL](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/kunlunxin_xtcl.html)\n- [高通 QNN](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/qualcomm_qnn.html)\n- [寒武纪 MLU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/cambricon_mlu.html)\n- [(瑞芯微/晶晨/恩智浦) 芯原 TIM-VX](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/verisilicon_timvx.html)\n- [Android NNAPI](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/android_nnapi.html)\n- [联发科 APU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/mediatek_apu.html)\n- [颖脉 NNA](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/imagination_nna.html)\n- [Intel OpenVINO](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/intel_openvino.html)\n- [亿智 NPU](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/eeasytech_npu.html)\n\n\n\n## 主要特性\n\n- 支持多平台：涵盖 Android、iOS、嵌入式 Linux 设备、Windows、macOS 和 Linux 主机\n- 支持多种语言：包括 Java、Python、C++\n- 轻量化和高性能：针对移动端设备的机器学习进行优化，压缩模型和二进制文件体积，高效推理，降低内存消耗\n\n## 持续集成\n\n| System | x86 Linux | ARM Linux | Android (GCC/Clang) | iOS |\n|:-:|:-:|:-:|:-:|:-:|\n| CPU(32bit) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) |\n| CPU(64bit) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) |\n| OpenCL | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| Metal | - | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) |\n| 华为麒麟 NPU | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| 华为昇腾 NPU | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - |\n| 昆仑芯 XPU | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - |\n| 昆仑芯 XTCL | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - |\n| 高通 QNN | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| 寒武纪 MLU | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - | - |\n| (瑞芯微/晶晨/恩智浦) 芯原 TIM-VX | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| Android\tNNAPI | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| 联发科 APU | - | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - |\n| 颖脉 NPU | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - |\n| Intel OpenVINO | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - | - |\n| 亿智 NPU | - | ![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg) | - | - |\n\n## 架构设计\n\nPaddle Lite 的架构设计着重考虑了对多硬件和平台的支持，并且强化了多个硬件在一个模型中混合执行的能力，多个层面的性能优化处理，以及对端侧应用的轻量化设计。\n\n<p align=\"center\"><img width=\"500\" src=\"https://paddlelite-demo.bj.bcebos.com/devices/generic/paddle_lite_with_nnadapter.jpg\"/><\/p>\n\n其中，Analysis Phase 包括了 MIR(Machine IR) 相关模块，能够对原有的模型的计算图针对具体的硬件列表进行算子融合、计算裁剪 在内的多种优化。Execution Phase 只涉及到 Kernel 的执行，且可以单独部署，以支持极致的轻量级部署。\n\n## 进一步了解 Paddle Lite\n\n如果您想要进一步了解 Paddle Lite，下面是进一步学习和使用 Paddle Lite 的相关内容：\n### 文档和示例\n- 完整文档： [Paddle Lite 文档](https://www.paddlepaddle.org.cn/lite)\n-  API文档：\n\t- [C++ API 文档](https://www.paddlepaddle.org.cn/lite/develop/api_reference/cxx_api_doc.html)\n\t- [Java API 文档](https://www.paddlepaddle.org.cn/lite/develop/api_reference/java_api_doc.html)\n\t- [Python API 文档](https://www.paddlepaddle.org.cn/lite/develop/api_reference/python_api_doc.html)\n\t- [CV 图像处理 API 文档](https://www.paddlepaddle.org.cn/lite/develop/api_reference/cv.html)\n- Paddle Lite 工程示例： [Paddle-Lite-Demo](https://github.com/PaddlePaddle/Paddle-Lite-Demo)\n### 关键技术\n- 模型量化：\n\t- [静态离线量化](https://www.paddlepaddle.org.cn/lite/develop/user_guides/quant/quant_post_static.html)\n\t- [动态离线量化](https://www.paddlepaddle.org.cn/lite/develop/user_guides/quant/quant_post_dynamic.html)\n- 调试分析：[调试和性能分析工具](https://www.paddlepaddle.org.cn/lite/develop/user_guides/profiler.html)\n- 移动端模型训练：点击[了解一下](https://www.paddlepaddle.org.cn/lite/develop/demo_guides/cpp_train_demo.html)\n- 飞桨预训练模型库：试试在 [PaddleHub](https://www.paddlepaddle.org.cn/hublist?filter=hot&value=1) 浏览和下载 Paddle 的预训练模型\n- 飞桨推理 AI 硬件统一适配框架 NNAdapter：点击[了解一下](https://www.paddlepaddle.org.cn/lite/develop/develop_guides/nnadapter.html)\n### FAQ\n- FAQ：常见问题，可以访问 [FAQ](https://www.paddlepaddle.org.cn/lite/develop/quick_start/faq.html)、搜索 Issues、或者通过页面底部的联系方式联系我们\n### 贡献代码\n- 贡献代码：如果您想一起参与 Paddle Lite 的开发，贡献代码，请访问[开发者共享文档](https://www.paddlepaddle.org.cn/lite/develop/develop_guides/for-developer.html)\n\n\n##  交流与反馈\n* AIStudio 实训平台端测部署系列课程：https://aistudio.baidu.com/aistudio/course/introduce/22690\n* 欢迎您通过 [Github Issues](https://github.com/PaddlePaddle/Paddle-Lite/issues) 来提交问题、报告与建议\n* 技术交流微信群：添加 wechat id:baidupaddle或扫描下方微信二维码，添加并回复小助手“端侧”，系统自动邀请加入；技术群 QQ 群: 一群696965088（已满） ；二群，959308808；\n\n<p align=\"center\"><img width=\"200\" height=\"200\"  src=\"https://user-images.githubusercontent.com/63448337/162189409-6c0ef74f-82fd-48c9-9fa7-fc3473428a63.png\"/>&#8194;&#8194;&#8194;&#8194;&#8194;<img width=\"200\" height=\"200\" margin=\"500\" src=\"https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/docs/images/qq-group-chat.png\"/><\/p>\n<p align=\"center\">&#8194;&#8194;&#8194;微信公众号&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;&#8194;官方技术交流QQ群 \n\n\n* 如果您对我们的工作感兴趣，也欢迎[加入我们](https://github.com/PaddlePaddle/Paddle-Lite/issues/6091) ！\n\n## 版权和许可证\nPaddle Lite由 [Apache-2.0 license](LICENSE) 提供。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D490:4F9CC:16B637:5BE273:6AB92159"},"text_sha256":"6b1f7b3c8d5179d1afd2337e9c29566806ec8fe7a998f248a8514ab86f44b6b3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"deepchem/deepchem","input_row":{"repository":"deepchem/deepchem","url":"https://github.com/deepchem/deepchem","name":"deepchem","owner":"deepchem","description":"Democratizing Deep-Learning for Drug Discovery, Quantum Chemistry, Materials Science and Biology","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7019,"issues":1842,"created_at":"2015-09-24T23:20:28Z","updated_at":"2026-09-26T16:42:59Z","first_commit_at":"2015-09-25T00:02:29Z","last_commit_at":"2026-08-20T19:01:34Z","activity_months":130.84,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:52.164Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deepchem/deepchem","visibility":"public","created_at":"2015-09-24T23:20:28Z","updated_at":"2026-09-26T16:42:59Z","private":false,"fork":false,"archived":false,"stargazers_count":7019,"open_issues_count":1194,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3178","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:17EB451:1C0B599:6AB92914"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3177","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17A82AB:1BC7076:6AB92914"},"commit":{"sha":"15e2fdbf7a3e523ecef7a660454f5ea461a11214","url":"https://github.com/deepchem/deepchem/commit/15e2fdbf7a3e523ecef7a660454f5ea461a11214","date":"2018-05-24T17:37:39Z","author_date":"2018-05-24T17:37:39Z","committer_date":"2018-05-24T17:37:39Z","tree_sha":"9d42c36a5ed9ed37d6c3ab12bc507f9a777fc178","message_first_line":"removed unet_model and added architecture in the constructor itself"},"tree_request_status":200,"tree_rate":{"github_remaining":"3176","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0851:3203A7:177F859:1B9F6A4:6AB92914"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10603,"blob_sha":"b6dfcd35027adc2e0e0a527acda62cd4c4a2e43f","priority":0}],"documents":[{"path":"README.md","size":10603,"blob_sha":"b6dfcd35027adc2e0e0a527acda62cd4c4a2e43f","priority":0,"status":200,"text":"﻿# DeepChem\r\n[![Build Status](https://travis-ci.org/deepchem/deepchem.svg?branch=master)](https://travis-ci.org/deepchem/deepchem)\r\n[![Coverage Status](https://coveralls.io/repos/github/deepchem/deepchem/badge.svg?branch=master)](https://coveralls.io/github/deepchem/deepchem?branch=master)\r\n[![Anaconda-Server Badge](https://anaconda.org/deepchem/deepchem/badges/version.svg)](https://anaconda.org/deepchem/deepchem)\r\n[![PyPI version](https://badge.fury.io/py/deepchem.svg)](https://badge.fury.io/py/deepchem)\r\n\r\n\r\nDeepChem aims to provide a high quality open-source toolchain that\r\ndemocratizes the use of deep-learning in drug discovery, materials science, quantum chemistry, and biology.\r\n\r\n### Table of contents:\r\n\r\n* [Requirements](#requirements)\r\n* [Installation](#installation)\r\n    * [Conda Environment](#using-a-conda-environment)\r\n    * [Docker](#using-a-docker-image)\r\n* [FAQ](#faq)\r\n* [Getting Started](#getting-started)\r\n    * [Input Formats](#input-formats)\r\n    * [Data Featurization](#data-featurization)\r\n    * [Performances](#performances)\r\n* [Contributing to DeepChem](/CONTRIBUTING.md)\r\n    * [Code Style Guidelines](/CONTRIBUTING.md#code-style-guidelines)\r\n    * [Documentation Style Guidelines](/CONTRIBUTING.md#documentation-style-guidelines)\r\n    * [Gitter](#gitter)\r\n* [DeepChem Publications](#deepchem-publications)\r\n* [Corporate Supporters](#corporate-supporters)\r\n    * [Schrödinger](#schrödinger)\r\n    * [DeepCrystal](#deep-crystal)\r\n* [Examples](/examples)\r\n* [About Us](#about-us)\r\n\r\n## Requirements\r\n* [pandas](http://pandas.pydata.org/)\r\n* [rdkit](http://www.rdkit.org/docs/Install.html)\r\n* [boost](http://www.boost.org/)\r\n* [joblib](https://pypi.python.org/pypi/joblib)\r\n* [sklearn](https://github.com/scikit-learn/scikit-learn.git)\r\n* [numpy](https://store.continuum.io/cshop/anaconda/)\r\n* [six](https://pypi.python.org/pypi/six)\r\n* [mdtraj](http://mdtraj.org/)\r\n* [tensorflow](https://www.tensorflow.org/)\r\n\r\n## Installation\r\n\r\n```deepchem``` currently supports both Python 2.7 and Python 3.5, and is supported on 64 bit Linux and Mac OSX. Please make sure you follow the directions below precisely. While you may already have system versions of some of our dependencies, there is no guarantee that `deepchem` will work with alternate versions than those specified below.\r\n\r\nNote that when using Ubuntu 16.04 server or similar environments, you may need to ensure libxrender is provided via e.g.:\r\n```bash\r\nsudo apt-get install -y libxrender-dev\r\n```\r\n\r\n### Using a conda environment\r\nYou can install deepchem in a new conda environment using the conda commands in scripts/install_deepchem_conda.sh\r\nInstalling via this script will ensure that you are **installing from the source**.\r\n\r\n```bash\r\ngit clone https://github.com/deepchem/deepchem.git      # Clone deepchem source code from GitHub\r\ncd deepchem\r\nbash scripts/install_deepchem_conda.sh deepchem\r\nsource activate deepchem\r\nyes | pip install tensorflow-gpu==1.6.0      # If you want GPU support\r\npython setup.py install                                # Manual install\r\nnosetests -a '!slow' -v deepchem --nologcapture        # Run tests\r\n```\r\nThis creates a new conda environment `deepchem` and installs in it the dependencies that\r\nare needed. To access it, use the `conda activate deepchem` command (if your conda version >= 4.4) and use `source activate deepchem` command (if your conda version < 4.4).\r\n\r\nCheck [this link](https://conda.io/docs/using/envs.html) for more information about\r\nthe benefits and usage of conda environments. **Warning**: Segmentation faults can [still happen](https://github.com/deepchem/deepchem/pull/379#issuecomment-277013514)\r\nvia this installation procedure.\r\n\r\n### Easy Install via Conda\r\n\r\n```bash\r\nconda install -c deepchem -c rdkit -c conda-forge -c omnia deepchem=2.0.0\r\n```\r\n**Note:** `Easy Install` installs the latest stable version of `deepchem` and _does not install from source_. If you need to install from source make sure you follow the steps [here](#using-a-conda-environment).\r\n\r\n### Using a Docker Image\r\nUsing a docker image requires an NVIDIA GPU.  If you do not have a GPU please follow the directions for [using a conda environment](#using-a-conda-environment)\r\nIn order to get GPU support you will have to use the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) plugin.\r\n``` bash\r\n# This will the download the latest stable deepchem docker image into your images\r\ndocker pull deepchemio/deepchem\r\n\r\n# This will create a container out of our latest image with GPU support\r\nnvidia-docker run -i -t deepchemio/deepchem\r\n\r\n# You are now in a docker container whose python has deepchem installed\r\n# For example you can run our tox21 benchmark\r\ncd deepchem/examples\r\npython benchmark.py -d tox21\r\n\r\n# Or you can start playing with it in the command line\r\npip install jupyter\r\nipython\r\nimport deepchem as dc\r\n```\r\n\r\n## FAQ\r\n1. Question: I'm seeing some failures in my test suite having to do with MKL\r\n   ```Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.```\r\n\r\n   Answer: This is a general issue with the newest version of `scikit-learn` enabling MKL by default. This doesn't play well with many linux systems. See [BVLC/caffe#3884](https://github.com/BVLC/caffe/issues/3884) for discussions. The following seems to fix the issue\r\n   ```bash\r\n   conda install nomkl numpy scipy scikit-learn numexpr\r\n   conda remove mkl mkl-service\r\n   ```\r\n\r\n## Getting Started\r\nTwo good tutorials to get started are [Graph Convolutional Networks](https://deepchem.io/docs/notebooks/graph_convolutional_networks_for_tox21.html) and [Multitask_Networks_on_MUV](https://deepchem.io/docs/notebooks/Multitask_Networks_on_MUV.html). Follow along with the tutorials to see how to predict properties on molecules using neural networks.\r\n\r\nAfterwards you can go through other [tutorials](https://deepchem.io/docs/notebooks/index.html), and look through our examples in the `examples` directory. To apply `deepchem` to a new problem, try starting from one of the existing examples or tutorials and modifying it step by step to work with your new use-case. If you have questions or comments you can raise them on our [gitter](https://gitter.im/deepchem/Lobby).\r\n\r\n### Input Formats\r\nAccepted input formats for deepchem include csv, pkl.gz, and sdf files. For\r\nexample, with a csv input, in order to build models, we expect the\r\nfollowing columns to have entries for each row in the csv file.\r\n\r\n1. A column containing SMILES strings [1].\r\n2. A column containing an experimental measurement.\r\n3. (Optional) A column containing a unique compound identifier.\r\n\r\nHere's an example of a potential input file.\r\n\r\n|Compound ID    | measured log solubility in mols per litre | smiles         |\r\n|---------------|-------------------------------------------|----------------|\r\n| benzothiazole | -1.5                                      | c2ccc1scnc1c2  |\r\n\r\n\r\nHere the \"smiles\" column contains the SMILES string, the \"measured log\r\nsolubility in mols per litre\" contains the experimental measurement and\r\n\"Compound ID\" contains the unique compound identifier.\r\n\r\n[2] Anderson, Eric, Gilman D. Veith, and David Weininger. \"SMILES, a line\r\nnotation and computerized interpreter for chemical structures.\" US\r\nEnvironmental Protection Agency, Environmental Research Laboratory, 1987.\r\n\r\n### Data Featurization\r\n\r\nMost machine learning algorithms require that input data form vectors.\r\nHowever, input data for drug-discovery datasets routinely come in the\r\nformat of lists of molecules and associated experimental readouts. To\r\ntransform lists of molecules into vectors, we need to subclasses of DeepChem\r\nloader class ```dc.data.DataLoader``` such as ```dc.data.CSVLoader``` or\r\n```dc.data.SDFLoader```. Users can subclass ```dc.data.DataLoader``` to\r\nload arbitrary file formats. All loaders must be\r\npassed a ```dc.feat.Featurizer``` object. DeepChem provides a number of\r\ndifferent subclasses of ```dc.feat.Featurizer``` for convenience.\r\n\r\n### Performances\r\nIn depth performance tables for DeepChem models are available on [MoleculeNet.ai](https://moleculenet.ai)\r\n\r\n### Gitter\r\nJoin us on gitter at [https://gitter.im/deepchem/Lobby](https://gitter.im/deepchem/Lobby). Probably the easiest place to ask simple questions or float requests for new features.\r\n\r\n## DeepChem Publications\r\n1. [Computational Modeling of β-secretase 1 (BACE-1) Inhibitors using\r\nLigand Based\r\nApproaches](http://pubs.acs.org/doi/abs/10.1021/acs.jcim.6b00290)\r\n2. [Low Data Drug Discovery with One-Shot Learning](http://pubs.acs.org/doi/abs/10.1021/acscentsci.6b00367)\r\n3. [MoleculeNet: A Benchmark for Molecular Machine Learning](https://arxiv.org/abs/1703.00564)\r\n4. [Atomic Convolutional Networks for Predicting Protein-Ligand Binding Affinity](https://arxiv.org/abs/1703.10603)\r\n\r\n## About Us\r\nDeepChem is possible due to notable contributions from many people including Peter Eastman, Evan Feinberg, Joe Gomes, Karl Leswing, Vijay Pande, Aneesh Pappu, Bharath Ramsundar and Michael Wu (alphabetical ordering).  DeepChem was originally created by [Bharath Ramsundar](http://rbharath.github.io/) with encouragement and guidance from [Vijay Pande](https://pande.stanford.edu/).\r\n\r\nDeepChem started as a [Pande group](https://pande.stanford.edu/) project at Stanford, and is now developed by many academic and industrial collaborators. DeepChem actively encourages new academic and industrial groups to contribute!\r\n\r\n## Corporate Supporters\r\nDeepChem is supported by a number of corporate partners who use DeepChem to solve interesting problems.\r\n\r\n### Schrödinger\r\n[![Schödinger](https://github.com/deepchem/deepchem/blob/master/docs/source/_static/schrodinger_logo.png)](https://www.schrodinger.com/)\r\n\r\n> DeepChem has transformed how we think about building QSAR and QSPR models when very large data sets are available; and we are actively using DeepChem to investigate how to best combine the power of deep learning with next generation physics-based scoring methods.\r\n\r\n### DeepCrystal\r\n<img src=\"https://github.com/deepchem/deepchem/blob/master/docs/source/_static/deep_crystal_logo.png\" alt=\"DeepCrystal Logo\" height=150px/>\r\n\r\n> DeepCrystal was an early adopter of DeepChem, which we now rely on to abstract away some of the hardest pieces of deep learning in drug discovery. By open sourcing these efficient implementations of chemically / biologically aware deep-learning systems, DeepChem puts the latest research into the hands of the scientists that need it, materially pushing forward the field of in-silico drug discovery in the process.\r\n\r\n\r\n## Version\r\n2.0.0\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2DE:2C474:179FB7:5CCE91:6AB9215A"},"text_sha256":"a68022be086944126ba20bee94db3329ef880f1f7411ddb9061b394038d792be"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3175","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C2:2BC4E5:180CCC2:1C2CA82:6AB92915"},"commit":{"sha":"1bf68943aa870592085386712d3c3c7d00e91a43","url":"https://github.com/deepchem/deepchem/commit/1bf68943aa870592085386712d3c3c7d00e91a43","date":"2026-06-22T18:36:37Z","author_date":"2026-06-22T18:36:37Z","committer_date":"2026-06-22T18:36:37Z","tree_sha":"77a9e1effdcc55459e6869cd4f081478b11ed4e3","message_first_line":"Added generate() function in hf_models.py and added 2 test files (Cleaned Version) (#4992)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3174","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:17F9FF0:1C1A1FD:6AB92916"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7338,"blob_sha":"9aa2d131b90a7ebe5a681c6c5828e256cea08087","priority":0}],"documents":[{"path":"README.md","size":7338,"blob_sha":"9aa2d131b90a7ebe5a681c6c5828e256cea08087","priority":0,"status":200,"text":"﻿# DeepChem\r\n\r\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/deepchem/badges/version.svg)](https://anaconda.org/conda-forge/deepchem)\r\n[![PyPI version](https://badge.fury.io/py/deepchem.svg)](https://pypi.org/project/deepchem/)\r\n[![Documentation Status](https://readthedocs.org/projects/deepchem/badge/?version=latest)](https://deepchem.readthedocs.io/en/latest/?badge=latest)  \r\n[![Test for DeepChem Core](https://github.com/deepchem/deepchem/workflows/Test%20for%20DeepChem%20Core/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+DeepChem+Core%22)\r\n[![Test for documents](https://github.com/deepchem/deepchem/workflows/Test%20for%20documents/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+documents%22)\r\n[![Test for build scripts](https://github.com/deepchem/deepchem/workflows/Test%20for%20build%20scripts/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+build+scripts%22)\r\n[![codecov](https://codecov.io/gh/deepchem/deepchem/branch/master/graph/badge.svg?token=5rOZB2BY3h)](https://codecov.io/gh/deepchem/deepchem)  \r\n\r\n[Website](https://deepchem.io/) | [Documentation](https://deepchem.readthedocs.io/en/latest/) | [Colab Tutorial](https://github.com/deepchem/deepchem/tree/master/examples/tutorials) | [Discussion Forum](https://forum.deepchem.io/) | [Discord](https://discord.gg/cGzwCdrUqS) | [Model Wishlist](https://github.com/deepchem/deepchem/issues/2680) | [Tutorial Wishlist](https://github.com/deepchem/deepchem/issues/2907)\r\n\r\nDeepChem aims to provide a high quality open-source toolchain\r\nthat democratizes the use of deep-learning in drug discovery,\r\nmaterials science, quantum chemistry, and biology.\r\n\r\n### Table of contents:\r\n\r\n- [Requirements](#requirements)\r\n- [Installation](#installation)\r\n  - [Stable version](#stable-version)\r\n  - [Nightly build version](#nightly-build-version)\r\n  - [Docker](#docker)\r\n  - [From source](#from-source)\r\n  - [From source lightweight](#from-source-lightweight)\r\n- [Getting Started](#getting-started)\r\n  - [Discord](#discord)\r\n- [About Us](#about-us)\r\n- [Contributing to DeepChem](/CONTRIBUTING.md)\r\n- [Citing DeepChem](#citing-deepchem)\r\n\r\n## Requirements\r\n\r\nDeepChem currently supports Python 3.7 through 3.10 and requires these packages on any condition.\r\n\r\n- [joblib](https://pypi.python.org/pypi/joblib)\r\n- [NumPy](https://numpy.org/)\r\n- [pandas](http://pandas.pydata.org/)\r\n- [scikit-learn](https://scikit-learn.org/stable/)\r\n- [SciPy](https://www.scipy.org/)\r\n- [rdkit](https://www.rdkit.org/)\r\n\r\n### Soft Requirements\r\n\r\nDeepChem has a number of \"soft\" requirements.\r\nIf you face some errors like `ImportError: This class requires XXXX`, you may need to install some packages.\r\n\r\nPlease check [the document](https://deepchem.readthedocs.io/en/latest/requirements.html#soft-requirements) about soft requirements.\r\n\r\n## Installation\r\n\r\n### Stable version\r\n\r\nDeepChem stable version can be installed using pip or conda as\r\n\r\n```bash\r\npip install deepchem\r\n```\r\nor \r\n```\r\nconda install -c conda-forge deepchem\r\n```\r\n\r\nDeepchem provides support for tensorflow, pytorch, jax and each require\r\na individual pip Installation.\r\n\r\nFor using models with tensorflow dependencies, you install using\r\n\r\n```bash\r\npip install deepchem[tensorflow]\r\n```\r\nFor using models with torch dependencies, you install using\r\n\r\n```bash\r\npip install deepchem[torch]\r\n```\r\nFor using models with jax dependencies, you install using\r\n\r\n```bash\r\npip install deepchem[jax]\r\n```\r\nIf GPU support is required, then make sure CUDA is installed and then install the desired deep learning framework using the links below before installing deepchem\r\n\r\n1. tensorflow - just cuda installed\r\n2. pytorch - https://pytorch.org/get-started/locally/#start-locally\r\n3. jax - https://github.com/google/jax#pip-installation-gpu-cuda\r\n\r\nIn `zsh` square brackets are used for globbing/pattern matching. This means you\r\nneed to escape the square brackets in the above installation. You can do so\r\nby including the dependencies in quotes like `pip install --pre 'deepchem[jax]'`\r\n\r\n### Nightly build version\r\nThe nightly version is built by the HEAD of DeepChem. It can be installed using\r\n\r\n```bash\r\npip install --pre deepchem\r\n```\r\n\r\n### Docker\r\n\r\nIf you want to install deepchem using a docker, you can pull two kinds of images.  \r\nDockerHub : https://hub.docker.com/repository/docker/deepchemio/deepchem\r\n\r\n- `deepchemio/deepchem:x.x.x`\r\n  - Image built by using a conda (x.x.x is a version of deepchem)\r\n  - The x.x.x image is built when we push x.x.x. tag\r\n  - Dockerfile is put in `docker/tag` directory\r\n- `deepchemio/deepchem:latest`\r\n  - Image built from source codes\r\n  - The latest image is built every time we commit to the master branch\r\n  - Dockerfile is put in `docker/nightly` directory\r\n\r\nYou pull the image like this.\r\n\r\n```bash\r\ndocker pull deepchemio/deepchem:2.4.0\r\n```\r\n\r\nIf you want to know docker usages with deepchem in more detail, please check [the document](https://deepchem.readthedocs.io/en/latest/installation.html#docker).\r\n\r\n### From source\r\n\r\nIf you try install all soft dependencies at once or contribute to deepchem, we recommend you should install deepchem from source.\r\n\r\nPlease check [this introduction](https://deepchem.readthedocs.io/en/latest/installation.html#from-source-with-conda).\r\n\r\n## Getting Started\r\n\r\nThe DeepChem project maintains an extensive collection of [tutorials](https://github.com/deepchem/deepchem/tree/master/examples/tutorials). All tutorials are designed to be run on Google colab (or locally if you prefer). Tutorials are arranged in a suggested learning sequence which will take you from beginner to proficient at molecular machine learning and computational biology more broadly.\r\n\r\nAfter working through the tutorials, you can also go through other [examples](https://github.com/deepchem/deepchem/tree/master/examples). To apply `deepchem` to a new problem, try starting from one of the existing examples or tutorials and modifying it step by step to work with your new use-case. If you have questions or comments you can raise them on our [gitter](https://gitter.im/deepchem/Lobby).\r\n\r\n### Supported Integrations\r\n\r\n- [Weights & Biases](https://docs.wandb.ai/guides/integrations/other/deepchem): Track your DeepChem model's training and evaluation metrics.\r\n\r\n### Discord\r\n\r\nThe DeepChem [Discord](https://discord.gg/cGzwCdrUqS) hosts a number of scientists, developers, and enthusiasts interested in deep learning for the life sciences. Probably the easiest place to ask simple questions or float requests for new features.\r\n\r\n## About Us\r\n\r\nDeepChem is managed by a team of open source contributors. Anyone is free to join and contribute!\r\n\r\n## Citing DeepChem\r\n\r\nIf you have used DeepChem in the course of your research, we ask that you cite the \"Deep Learning for the Life Sciences\" book by the DeepChem core team.\r\n\r\nTo cite this book, please use this bibtex entry:\r\n\r\n```\r\n@book{Ramsundar-et-al-2019,\r\n    title={Deep Learning for the Life Sciences},\r\n    author={Bharath Ramsundar and Peter Eastman and Patrick Walters and Vijay Pande and Karl Leswing and Zhenqin Wu},\r\n    publisher={O'Reilly Media},\r\n    note={\\url{https://www.amazon.com/Deep-Learning-Life-Sciences-Microscopy/dp/1492039837}},\r\n    year={2019}\r\n}\r\n```\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5162:38C7FC:177A7C:594527:6AB9215C"},"text_sha256":"abdbe5435eedd208e4110b1d4310983add99c48124d0bc0f058fc35a3a7be720"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"OpenNMT/OpenNMT-py","input_row":{"repository":"OpenNMT/OpenNMT-py","url":"https://github.com/OpenNMT/OpenNMT-py","name":"OpenNMT-py","owner":"OpenNMT","description":"Open Source Neural Machine Translation and (Large) Language Models in PyTorch","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7018,"issues":1440,"created_at":"2017-02-22T19:01:50Z","updated_at":"2026-09-27T12:38:52Z","first_commit_at":"2016-08-24T03:38:51Z","last_commit_at":"2024-06-27T17:56:21Z","activity_months":94.109999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:55.106Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"OpenNMT/OpenNMT-py","visibility":"public","created_at":"2017-02-22T19:01:50Z","updated_at":"2026-09-27T12:38:52Z","private":false,"fork":false,"archived":false,"stargazers_count":7018,"open_issues_count":23,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3173","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:184CF26:1C6D268:6AB92917"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3172","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17BF320:1BDECC8:6AB92917"},"commit":{"sha":"1953d39cd2dcaa0b9937f837214d06ab7d2ef4e2","url":"https://github.com/OpenNMT/OpenNMT-py/commit/1953d39cd2dcaa0b9937f837214d06ab7d2ef4e2","date":"2018-05-24T20:11:41Z","author_date":"2018-05-24T20:11:41Z","committer_date":"2018-05-24T20:11:41Z","tree_sha":"2507fb1a48c3f5a0afc4bfe51af17698a4eb9533","message_first_line":"fix seed for iterator + multi gpu fix"},"tree_request_status":200,"tree_rate":{"github_remaining":"3171","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B1:2EA1B4:17C180E:1BE1C15:6AB92917"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5605,"blob_sha":"2b774ffc0b996092cb793d777b05dd34b4cdab85","priority":0}],"documents":[{"path":"README.md","size":5605,"blob_sha":"2b774ffc0b996092cb793d777b05dd34b4cdab85","priority":0,"status":200,"text":"# OpenNMT-py: Open-Source Neural Machine Translation\n\n[![Build Status](https://travis-ci.org/OpenNMT/OpenNMT-py.svg?branch=master)](https://travis-ci.org/OpenNMT/OpenNMT-py)\n\nThis is a [Pytorch](https://github.com/pytorch/pytorch)\nport of [OpenNMT](https://github.com/OpenNMT/OpenNMT),\nan open-source (MIT) neural machine translation system. It is designed to be research friendly to try out new ideas in translation, summary, image-to-text, morphology, and many other domains.\n\nCodebase is relatively stable, but PyTorch is still evolving. We currently recommend forking if you need to have stable code.\n\nOpenNMT-py is run as a collaborative open-source project. It is maintained by [Sasha Rush](http://github.com/srush) (Cambridge, MA), [Ben Peters](http://github.com/bpopeters) (Saarbrücken), and [Jianyu Zhan](http://github.com/jianyuzhan) (Shenzhen). The original code was written by [Adam Lerer](http://github.com/adamlerer) (NYC). \nWe love contributions. Please consult the Issues page for any [Contributions Welcome](https://github.com/OpenNMT/OpenNMT-py/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributions+welcome%22) tagged post. \n\n<center style=\"padding: 40px\"><img width=\"70%\" src=\"http://opennmt.github.io/simple-attn.png\" /><\/center>\n\n\nTable of Contents\n=================\n  * [Full Documentation](http://opennmt.net/OpenNMT-py/)\n  * [Requirements](#requirements)\n  * [Features](#features)\n  * [Quickstart](#quickstart)\n  * [Citation](#citation)\n \n## Requirements\n\n```bash\npip install -r requirements.txt\n```\n\n\n## Features\n\nThe following OpenNMT features are implemented:\n\n- [data preprocessing](http://opennmt.net/OpenNMT-py/options/preprocess.html)\n- [Inference (translation) with batching and beam search](http://opennmt.net/OpenNMT-py/options/translate.html)\n- [Multiple source and target RNN (lstm/gru) types and attention (dotprod/mlp) types](http://opennmt.net/OpenNMT-py/options/train.html#model-encoder-decoder)\n- [TensorBoard/Crayon logging](http://opennmt.net/OpenNMT-py/options/train.html#logging)\n- [Source word features](http://opennmt.net/OpenNMT-py/options/train.html#model-embeddings)\n- [Pretrained Embeddings](http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-pretrained-embeddings-e-g-glove)\n- [Copy and Coverage Attention](http://opennmt.net/OpenNMT-py/options/train.html#model-attention)\n- [Image-to-text processing](http://opennmt.net/OpenNMT-py/im2text.html)\n- [Speech-to-text processing](http://opennmt.net/OpenNMT-py/speech2text.html)\n- [\"Attention is all you need\"](http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-the-transformer-model)\n- Inference time loss functions.\n\nBeta Features (committed):\n- multi-GPU\n- Structured attention\n- [Conv2Conv convolution model]\n- SRU \"RNNs faster than CNN\" paper\n\n## Quickstart\n\n[Full Documentation](http://opennmt.net/OpenNMT-py/)\n\n\n### Step 1: Preprocess the data\n\n```bash\npython preprocess.py -train_src data/src-train.txt -train_tgt data/tgt-train.txt -valid_src data/src-val.txt -valid_tgt data/tgt-val.txt -save_data data/demo\n```\n\nWe will be working with some example data in `data/` folder.\n\nThe data consists of parallel source (`src`) and target (`tgt`) data containing one sentence per line with tokens separated by a space:\n\n* `src-train.txt`\n* `tgt-train.txt`\n* `src-val.txt`\n* `tgt-val.txt`\n\nValidation files are required and used to evaluate the convergence of the training. It usually contains no more than 5000 sentences.\n\n\nAfter running the preprocessing, the following files are generated:\n\n* `demo.train.pt`: serialized PyTorch file containing training data\n* `demo.valid.pt`: serialized PyTorch file containing validation data\n* `demo.vocab.pt`: serialized PyTorch file containing vocabulary data\n\n\nInternally the system never touches the words themselves, but uses these indices.\n\n### Step 2: Train the model\n\n```bash\npython train.py -data data/demo -save_model demo-model\n```\n\nThe main train command is quite simple. Minimally it takes a data file\nand a save file.  This will run the default model, which consists of a\n2-layer LSTM with 500 hidden units on both the encoder/decoder. You\ncan also add `-gpuid 1` to use (say) GPU 1.\n\n### Step 3: Translate\n\n```bash\npython translate.py -model demo-model_acc_XX.XX_ppl_XXX.XX_eX.pt -src data/src-test.txt -output pred.txt -replace_unk -verbose\n```\n\nNow you have a model which you can use to predict on new data. We do this by running beam search. This will output predictions into `pred.txt`.\n\n!!! note \"Note\"\n    The predictions are going to be quite terrible, as the demo dataset is small. Try running on some larger datasets! For example you can download millions of parallel sentences for [translation](http://www.statmt.org/wmt16/translation-task.html) or [summarization](https://github.com/harvardnlp/sent-summary).\n\n## Pretrained embeddings (e.g. GloVe)\n\nGo to tutorial: [How to use GloVe pre-trained embeddings in OpenNMT-py](http://forum.opennmt.net/t/how-to-use-glove-pre-trained-embeddings-in-opennmt-py/1011)\n\n## Pretrained Models\n\nThe following pretrained models can be downloaded and used with translate.py.\n\nhttp://opennmt.net/Models-py/\n\n\n\n## Citation\n\n[OpenNMT technical report](https://doi.org/10.18653/v1/P17-4012)\n\n```\n@inproceedings{opennmt,\n  author    = {Guillaume Klein and\n               Yoon Kim and\n               Yuntian Deng and\n               Jean Senellart and\n               Alexander M. Rush},\n  title     = {OpenNMT: Open-Source Toolkit for Neural Machine Translation},\n  booktitle = {Proc. ACL},\n  year      = {2017},\n  url       = {https://doi.org/10.18653/v1/P17-4012},\n  doi       = {10.18653/v1/P17-4012}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A38C:35999:1726C3:5C5713:6AB9215E"},"text_sha256":"f5fa5dfab373abc69a5745152931f0ba80d50ceae60f2ff183db8ff5ae2c48b6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3170","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:17ABABD:1BCBD27:6AB92918"},"commit":{"sha":"97111d97551c24857076a4102eabdb468b35cff4","url":"https://github.com/OpenNMT/OpenNMT-py/commit/97111d97551c24857076a4102eabdb468b35cff4","date":"2024-06-27T17:56:21Z","author_date":"2024-06-27T17:56:21Z","committer_date":"2024-06-27T17:56:21Z","tree_sha":"f13d25b2aea11ee563eb239eb4727b79cd1169fe","message_first_line":"Bump jinja2 from 3.1.3 to 3.1.4 in /docs (#2587)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3169","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:177FAA7:1B9F948:6AB92919"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8761,"blob_sha":"0db7d93f01fc14151134bb951a1a667599d211df","priority":0},{"path":"SECURITY.md","size":313,"blob_sha":"8be0429cc82baa6f525996589f588c2d15dcaf6a","priority":1}],"documents":[{"path":"README.md","size":8761,"blob_sha":"0db7d93f01fc14151134bb951a1a667599d211df","priority":0,"status":200,"text":"# Announcement: OpenNMT-py is no longer actively supported.\n\nWe started a new project [Eole](https://eole-nlp.github.io/eole/) available on [Github](https://github.com/eole-nlp/eole)\n\nIt is a spin-off of OpenNMT-py in terms of features but we revamped a lot of stuff.\n\nEole handles NMT, LLM, Encoders as well as a new concept of Estimator within a NMT Model See this [post](https://medium.com/p/05b00b271a47) and this [news](https://www.linkedin.com/posts/vincentnguyenngoc_embarrassingly-small-english-to-german-model-activity-7203400634727841792-FCre?utm_source=share&utm_medium=member_desktop)\n\nIf you are a developer, switch now. If you are a user only, then we will publish the first py-pi versions shortly.\n\n\n# OpenNMT-py: Open-Source Neural Machine Translation and (Large) Language Models\n\n[![Build Status](https://github.com/OpenNMT/OpenNMT-py/workflows/Lint%20&%20Tests/badge.svg)](https://github.com/OpenNMT/OpenNMT-py/actions)\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://opennmt.net/OpenNMT-py/)\n[![Gitter](https://badges.gitter.im/OpenNMT/OpenNMT-py.svg)](https://gitter.im/OpenNMT/OpenNMT-py?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n[![Forum](https://img.shields.io/discourse/status?server=https%3A%2F%2Fforum.opennmt.net%2F)](https://forum.opennmt.net/)\n\nOpenNMT-py is the [PyTorch](https://github.com/pytorch/pytorch) version of the [OpenNMT](https://opennmt.net) project, an open-source (MIT) neural machine translation (and beyond!) framework. It is designed to be research friendly to try out new ideas in translation, language modeling, summarization, and many other NLP tasks. Some companies have proven the code to be production ready.\n\nWe love contributions! Please look at issues marked with the [contributions welcome](https://github.com/OpenNMT/OpenNMT-py/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributions+welcome%22) tag.\n\nBefore raising an issue, make sure you read the requirements and the [Full Documentation](https://opennmt.net/OpenNMT-py/) examples.\n\nUnless there is a bug, please use the [Forum](https://forum.opennmt.net) or [Gitter](https://gitter.im/OpenNMT/OpenNMT-py) to ask questions.\n\n----\n## For beginners:\n\nThere is a step-by-step and explained tuto (Thanks to Yasmin Moslem): [Tutorial](https://github.com/ymoslem/OpenNMT-Tutorial)\n\nPlease try to read and/or follow before raising newbies issues.\n\nOtherwise you can just have a look at the [Quickstart](https://opennmt.net/OpenNMT-py/quickstart.html) steps\n\n----\n## New:\n\n* You will need Pytorch v2 preferably v2.2 which fixes some `scaled_dot_product_attention` issues\n* LLM support with converters for: Llama (+ Mistral), OpenLlama, Redpajama, MPT-7B, Falcon.\n* Support for 8bit and 4bit quantization along with LoRA adapters, with or without checkpointing.\n* You can finetune 7B and 13B models on a single RTX 24GB with 4-bit quantization.\n* Inference can be forced in 4/8bit using the same layer quantization as in finetuning.\n* Tensor parallelism when the model does not fit on one GPU's memory (both training and inference)\n* Once your model is finetuned you can run inference either with OpenNMT-py or faster with CTranslate2.\n* MMLU evaluation script, see results [here](https://github.com/OpenNMT/OpenNMT-py/blob/master/eval_llm/MMLU/readme.md)\n\nFor all usecases including NMT, you can now use Multiquery instead of Multihead attention (faster at training and inference) and remove biases from all Linear (QKV as well as FeedForward modules).\n\n\nIf you used previous versions of OpenNMT-py, you can check the [Changelog](https://github.com/OpenNMT/OpenNMT-py/blob/master/CHANGELOG.md) or the [Breaking Changes](https://github.com/OpenNMT/OpenNMT-py/blob/master/docs/source/changes.md)\n\n----\n\n## Tutorials:\n\n* How to replicate Vicuna with a 7B or 13B llama (or Open llama, MPT-7B, Redpajama)  Language Model: [Tuto Vicuna](https://github.com/OpenNMT/OpenNMT-py/blob/master/docs/source/examples/replicate_vicuna/ReplicateVicuna.md)\n* How to finetune NLLB-200 with your dataset: [Tuto Finetune NLLB-200](https://forum.opennmt.net/t/finetuning-and-curating-nllb-200-with-opennmt-py/5238)\n* How to create a simple OpenNMT-py REST Server: [Tuto REST](https://forum.opennmt.net/t/simple-opennmt-py-rest-server/1392)\n* How to create a simple Web Interface: [Tuto Streamlit](https://forum.opennmt.net/t/simple-web-interface/4527)\n* Replicate the WMT17 en-de experiment: [WMT17 ENDE](https://github.com/OpenNMT/OpenNMT-py/blob/master/docs/source/examples/wmt17/Translation.md)\n\n----\n\n## Setup\n\n### Using docker\n\nTo facilitate setup and reproducibility, some docker images are made available via the Github Container Registry:\nhttps://github.com/OpenNMT/OpenNMT-py/pkgs/container/opennmt-py\n\nYou can adapt the workflow and build your own image(s) depending on specific needs by using `build.sh` and `Dockerfile` in the `docker` directory of the repo.\n\n```\ndocker pull ghcr.io/opennmt/opennmt-py:3.4.3-ubuntu22.04-cuda12.1\n```\n\nExample oneliner to run a container and open a bash shell within it\n```\ndocker run --rm -it --runtime=nvidia ghcr.io/opennmt/opennmt-py:test-ubuntu22.04-cuda12.1\n```\nNote: you need to have the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) (formerly nvidia-docker) installed to properly take advantage of the CUDA/GPU features.\n\nDepending on your needs you can add various flags:\n- `-p 5000:5000` to forward some exposed port from your container to your host;\n- `-v /some/local/directory:/some/container/directory` to mount some local directory to some container directory;\n- `--entrypoint some_command` to directly run some specific command as the container entry point (instead of the default bash shell);\n\n### Installing locally\n\nOpenNMT-py requires:\n\n- Python >= 3.8\n- PyTorch >= 2.0 <2.2\n\nInstall `OpenNMT-py` from `pip`:\n```bash\npip install OpenNMT-py\n```\n\nor from the source:\n```bash\ngit clone https://github.com/OpenNMT/OpenNMT-py.git\ncd OpenNMT-py\npip install -e .\n```\n\nNote: if you encounter a `MemoryError` during installation, try to use `pip` with `--no-cache-dir`.\n\n*(Optional)* Some advanced features (e.g. working pretrained models or specific transforms) require extra packages, you can install them with:\n\n```bash\npip install -r requirements.opt.txt\n```\n\n### Manual installation of some dependencies\n\nApex is highly recommended to have fast performance (especially the legacy fusedadam optimizer and FusedRMSNorm)\n\n```shell\ngit clone https://github.com/NVIDIA/apex\ncd apex\npip3 install -v --no-build-isolation --config-settings --build-option=\"--cpp_ext --cuda_ext --deprecated_fused_adam --xentropy --fast_multihead_attn\" ./\ncd ..\n```\n\nFlash attention:\n\nAs of Oct. 2023 flash attention 1 has been upstreamed to pytorch v2 but it is recommended to use flash attention 2 with v2.3.1 for sliding window attention support.\n\nWhen using regular `position_encoding=True` or Rotary with `max_relative_positions=-1` OpenNMT-py will try to use an optimized dot-product path.\n\nif you want to use [flash attention](https://github.com/Dao-AILab/flash-attention#installation-and-features) then you need to manually install it first:\n\n```bash\npip install flash-attn --no-build-isolation\n```\n\nif flash attention 2 is not installed, then we will use `F.scaled_dot_product_attention` from pytorch 2.x\n\nWhen using `max_relative_positions > 0` or Alibi `max_relative_positions=-2` OpenNMT-py will use its legacy code for matrix multiplications.\n\nflash attention and `F.scaled_dot_product_attention` are a bit faster and saves some GPU memory.\n\n\nAWQ:\n\nIf you want to run inference or quantize an AWQ model you will need AutoAWQ.\n\nFor [AutoAWQ](https://github.com/casper-hansen/AutoAWQ):\n    pip install autoawq\n\n\n## Documentation & FAQs\n\n[Full HTML Documentation](https://opennmt.net/OpenNMT-py/quickstart.html)\n\n[FAQs](https://github.com/OpenNMT/OpenNMT-py/blob/master/docs/source/FAQ.md)\n\n## Acknowledgements\n\nOpenNMT-py is run as a collaborative open-source project.\nProject was incubated by Systran and Harvard NLP in 2016 in Lua and ported to Pytorch in 2017.\n\nCurrent maintainers (since 2018):\n\n[François Hernandez](https://github.com/francoishernandez)\n[Vincent Nguyen](https://github.com/vince62s) (Seedfall)\n\n## Citation\n\nIf you are using OpenNMT-py for academic work, please cite the initial [system demonstration paper](https://www.aclweb.org/anthology/P17-4012) published in ACL 2017:\n\n```\n@misc{klein2018opennmt,\n      title={OpenNMT: Neural Machine Translation Toolkit}, \n      author={Guillaume Klein and Yoon Kim and Yuntian Deng and Vincent Nguyen and Jean Senellart and Alexander M. Rush},\n      year={2018},\n      eprint={1805.11462},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E06:2B291E:17DB04:5D0B1B:6AB92160"},"text_sha256":"a7823c644910dba3d1c95c7b06082df3fa5162a8684f99c2fca58df0179af19f"},{"path":"SECURITY.md","size":313,"blob_sha":"8be0429cc82baa6f525996589f588c2d15dcaf6a","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 2.2.x   | :white_check_mark: |\n| 1.2.x   | :x:                |\n\n## Reporting a Vulnerability\n\nPlease open an issue, or contact one of the maintainers via [gitter](https://gitter.im/OpenNMT/OpenNMT-py).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDA0:3D501:17EEB8:5D1E7D:6AB92160"},"text_sha256":"edcf93776c4ee0ef2d23ce7e9434a222f210b6395c8fcf1fa7ad44d25271ec25"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/models","input_row":{"repository":"PaddlePaddle/models","url":"https://github.com/PaddlePaddle/models","name":"models","owner":"PaddlePaddle","description":"Officially maintained, supported by PaddlePaddle, including CV, NLP, Speech, Rec, TS, big models and so on.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6931,"issues":1984,"created_at":"2017-04-20T13:30:15Z","updated_at":"2026-09-25T04:48:37Z","first_commit_at":"2017-04-20T13:30:15Z","last_commit_at":"2025-01-15T17:54:36Z","activity_months":92.879999999999995,"ai_ml_match_topics":"deep-learning; computer-vision; neural-network; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:32:58.309Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/models","visibility":"public","created_at":"2017-04-20T13:30:15Z","updated_at":"2026-09-25T04:48:37Z","private":false,"fork":false,"archived":false,"stargazers_count":6931,"open_issues_count":869,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3168","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AC:6C9BF:17EB7DB:1C0B9F2:6AB9291A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3167","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:17DD71F:1BFDA74:6AB9291A"},"commit":{"sha":"056f8c4859fc9e3f4cd65f47de32be9ad037e0bf","url":"https://github.com/PaddlePaddle/models/commit/056f8c4859fc9e3f4cd65f47de32be9ad037e0bf","date":"2018-05-24T03:06:06Z","author_date":"2018-05-24T02:57:20Z","committer_date":"2018-05-24T03:06:06Z","tree_sha":"baf9ccf652410d2d190bcdfbad18e46bccb11d5e","message_first_line":"Make Transformer adapt to the latest api of ParallelExecutor"},"tree_request_status":200,"tree_rate":{"github_remaining":"3166","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0932:2EA1B4:17C19C4:1BE1E37:6AB9291B"},"tree_truncated":false,"document_candidates":[{"path":"README.cn.md","size":15460,"blob_sha":"72fb35ff3b239d8fa5e226f84aa09f084f593697","priority":0},{"path":"README.md","size":8680,"blob_sha":"1920b307253c9cc2f4547df1886124f85bfdabb2","priority":0}],"documents":[{"path":"README.cn.md","size":15460,"blob_sha":"72fb35ff3b239d8fa5e226f84aa09f084f593697","priority":0,"status":200,"text":"# models 简介\n\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://github.com/PaddlePaddle/models)\n[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://github.com/PaddlePaddle/models)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)\n\nPaddlePaddle提供了丰富的运算单元，帮助大家以模块化的方式构建起千变万化的深度学习模型来解决不同的应用问题。这里，我们针对常见的机器学习任务，提供了不同的神经网络模型供大家学习和使用。\n\n\n## 1. 词向量\n\n词向量用一个实向量表示词语，向量的每个维都表示文本的某种潜在语法或语义特征，是深度学习应用于自然语言处理领域最成功的概念和成果之一。广义的，词向量也可以应用于普通离散特征。词向量的学习通常都是一个无监督的学习过程，因此，可以充分利用海量的无标记数据以捕获特征之间的关系，也可以有效地解决特征稀疏、标签数据缺失、数据噪声等问题。然而，在常见词向量学习方法中，模型最后一层往往会遇到一个超大规模的分类问题，是计算性能的瓶颈。\n\n在词向量任务中，我们向大家展示如何使用Hierarchical-Sigmoid 和噪声对比估计（Noise Contrastive Estimation，NCE）来加速词向量的学习。\n\n- 1.1 [Hsigmoid加速词向量训练](https://github.com/PaddlePaddle/models/tree/develop/hsigmoid)\n- 1.2 [噪声对比估计加速词向量训练](https://github.com/PaddlePaddle/models/tree/develop/nce_cost)\n\n\n## 2. RNN 语言模型\n\n语言模型是自然语言处理领域里一个重要的基础模型，除了得到词向量（语言模型训练的副产物），还可以帮助我们生成文本。给定若干个词，语言模型可以帮助我们预测下一个最可能出现的词。\n\n在利用语言模型生成文本的任务中，我们重点介绍循环神经网络语言模型，大家可以通过文档中的使用说明快速适配到自己的训练语料，完成自动写诗、自动写散文等有趣的模型。\n\n- 2.1 [使用循环神经网络语言模型生成文本](https://github.com/PaddlePaddle/models/tree/develop/generate_sequence_by_rnn_lm)\n\n## 3. 点击率预估\n\n点击率预估模型预判用户对一条广告点击的概率，对每次广告的点击情况做出预测，是广告技术的核心算法之一。逻谛斯克回归对大规模稀疏特征有着很好的学习能力，在点击率预估任务发展的早期一统天下。近年来，DNN 模型由于其强大的学习能力逐渐接过点击率预估任务的大旗。\n\n在点击率预估任务中，我们首先给出谷歌提出的 Wide & Deep 模型。这一模型融合了适用于学习抽象特征的DNN和适用于大规模稀疏特征的逻谛斯克回归两者的优点，可以作为一种相对成熟的模型框架使用，在工业界也有一定的应用。同时，我们提供基于因子分解机的深度神经网络模型，该模型融合了因子分解机和深度神经网络，分别建模输入属性之间的低阶交互和高阶交互。\n\n- 3.1 [Wide & deep 点击率预估模型](https://github.com/PaddlePaddle/models/tree/develop/ctr/README.cn.md)\n- 3.2 [基于深度因子分解机的点击率预估模型](https://github.com/PaddlePaddle/models/tree/develop/deep_fm)\n\n## 4. 文本分类\n\n文本分类是自然语言处理领域最基础的任务之一，深度学习方法能够免除复杂的特征工程，直接使用原始文本作为输入，数据驱动地最优化分类准确率。\n\n在文本分类任务中，我们以情感分类任务为例，提供了基于DNN的非序列文本分类模型，以及基于CNN的序列模型供大家学习和使用（基于LSTM的模型见PaddleBook中[情感分类](http://www.paddlepaddle.org/docs/develop/book/06.understand_sentiment/index.cn.html)一课）。\n\n- 4.1 [基于DNN/CNN的情感分类](https://github.com/PaddlePaddle/models/tree/develop/text_classification)\n- 4.2 [基于双层序列的文本分类模型](https://github.com/PaddlePaddle/models/tree/develop/nested_sequence/text_classification)\n\n## 5. 排序学习\n\n排序学习(Learning to Rank， LTR)是信息检索和搜索引擎研究的核心问题之一，通过机器学习方法学习一个分值函数对待排序的候选进行打分，再根据分值的高低确定序关系。深度神经网络可以用来建模分值函数，构成各类基于深度学习的LTR模型。\n\n在排序学习任务中，我们介绍基于RankLoss损失函数Pairwise排序模型和基于LambdaRank损失函数的Listwise排序模型(Pointwise学习策略见PaddleBook中[推荐系统](http://www.paddlepaddle.org/docs/develop/book/05.recommender_system/index.cn.html)一课）。\n\n- 5.1 [基于Pairwise和Listwise的排序学习](https://github.com/PaddlePaddle/models/tree/develop/ltr)\n\n## 6. 结构化语义模型\n\n深度结构化语义模型是一种基于神经网络的语义匹配模型框架，可以用于学习两路信息实体或是文本之间的语义相似性。DSSM使用DNN、CNN或是RNN将两路信息实体或是文本映射到同一个连续的低纬度语义空间中。在这个语义空间中，两路实体或是文本可以同时进行表示，然后，通过定义距离度量和匹配函数来刻画并学习不同实体或是文本在同一个语义空间内的语义相似性。\n\n在结构化语义模型任务中，我们演示如何建模两个字符串之间的语义相似度。模型支持DNN(全连接前馈网络)、CNN(卷积网络)、RNN(递归神经网络)等不同的网络结构，以及分类、回归、排序等不同损失函数。本例采用最简单的文本数据作为输入，通过替换自己的训练和预测数据，便可以在真实场景中使用。\n\n- 6.1 [深度结构化语义模型](https://github.com/PaddlePaddle/models/tree/develop/dssm/README.cn.md)\n\n## 7. 命名实体识别\n\n给定输入序列，序列标注模型为序列中每一个元素贴上一个类别标签，是自然语言处理领域最基础的任务之一。随着深度学习方法的不断发展，利用循环神经网络学习输入序列的特征表示，条件随机场（Conditional Random Field, CRF）在特征基础上完成序列标注任务，逐渐成为解决序列标注问题的标配解决方案。\n\n在序列标注任务中，我们以命名实体识别（Named Entity Recognition，NER）任务为例，介绍如何训练一个端到端的序列标注模型。\n\n- 7.1 [命名实体识别](https://github.com/PaddlePaddle/models/tree/develop/sequence_tagging_for_ner)\n\n## 8. 序列到序列学习\n\n序列到序列学习实现两个甚至是多个不定长模型之间的映射，有着广泛的应用，包括：机器翻译、智能对话与问答、广告创意语料生成、自动编码（如金融画像编码）、判断多个文本串之间的语义相关性等。\n\n在序列到序列学习任务中，我们首先以机器翻译任务为例，提供了多种改进模型供大家学习和使用。包括：不带注意力机制的序列到序列映射模型，这一模型是所有序列到序列学习模型的基础；使用Scheduled Sampling改善RNN模型在生成任务中的错误累积问题；带外部记忆机制的神经机器翻译，通过增强神经网络的记忆能力，来完成复杂的序列到序列学习任务。除机器翻译任务之外，我们也提供了一个基于深层LSTM网络生成古诗词，实现同语言生成的模型。\n\n- 8.1 [无注意力机制的神经机器翻译](https://github.com/PaddlePaddle/models/tree/develop/nmt_without_attention/README.cn.md)\n- 8.2 [使用Scheduled Sampling改善翻译质量](https://github.com/PaddlePaddle/models/tree/develop/scheduled_sampling)\n- 8.3 [带外部记忆机制的神经机器翻译](https://github.com/PaddlePaddle/models/tree/develop/mt_with_external_memory)\n- 8.4 [生成古诗词](https://github.com/PaddlePaddle/models/tree/develop/generate_chinese_poetry)\n\n## 9. 阅读理解\n\n当深度学习以及各类新技术不断推动自然语言处理领域向前发展时，我们不禁会问：应该如何确认模型真正理解了人类特有的自然语言，具备一定的理解和推理能力？纵观NLP领域的各类经典问题：词法分析、句法分析、情感分类、写诗等，这些问题的经典解决方案，从技术原理上距离“语言理解”仍有一定距离。为了衡量现有NLP技术到“语言理解”这一终极目标之间的差距，我们需要一个有足够难度且可量化可复现的任务，这也是阅读理解问题提出的初衷。尽管目前的研究现状表明在现有阅读理解数据集上表现良好的模型，依然没有做到真正的语言理解，但机器阅读理解依然被视为是检验模型向理解语言迈进的一个重要任务。\n\n阅读理解本质上也是自动问答的一种，模型“阅读”一段文字后回答给定的问题，在这一任务中，我们介绍使用Learning to Search 方法，将阅读理解转化为从段落中寻找答案所在句子，答案在句子中的起始位置，以及答案在句子中的结束位置，这样一个多步决策过程。\n\n- 9.1 [Globally Normalized Reader](https://github.com/PaddlePaddle/models/tree/develop/globally_normalized_reader)\n\n## 10. 自动问答\n\n自动问答（Question Answering）系统利用计算机自动回答用户提出的问题，是验证机器是否具备自然语言理解能力的重要任务之一，其研究历史可以追溯到人工智能的原点。与检索系统相比，自动问答系统是信息服务的一种高级形式，系统返回给用户的不再是排序后的基于关键字匹配的检索结果，而是精准的自然语言答案。\n\n在自动问答任务中，我们介绍基于深度学习的端到端问答系统，将自动问答转化为一个序列标注问题。端对端问答系统试图通过从高质量的\"问题-证据（Evidence）-答案\"数据中学习，建立一个联合学习模型，同时学习语料库、知识库、问句语义表示之间的语义映射关系，将传统的问句语义解析、文本检索、答案抽取与生成的复杂步骤转变为一个可学习过程。\n\n- 10.1 [基于序列标注的事实型自动问答模型](https://github.com/PaddlePaddle/models/tree/develop/neural_qa)\n\n## 11. 图像分类\n\n图像相比文字能够提供更加生动、容易理解及更具艺术感的信息，是人们转递与交换信息的重要来源。图像分类是根据图像的语义信息对不同类别图像进行区分，是计算机视觉中重要的基础问题，也是图像检测、图像分割、物体跟踪、行为分析等其他高层视觉任务的基础，在许多领域都有着广泛的应用。如：安防领域的人脸识别和智能视频分析等，交通领域的交通场景识别，互联网领域基于内容的图像检索和相册自动归类，医学领域的图像识别等。\n\n在图像分类任务中，我们向大家介绍如何训练AlexNet、VGG、GoogLeNet、ResNet、Inception-v4、Inception-Resnet-V2和Xception模型。同时提供了能够将Caffe或TensorFlow训练好的模型文件转换为PaddlePaddle模型文件的模型转换工具。\n\n- 11.1 [将Caffe模型文件转换为PaddlePaddle模型文件](https://github.com/PaddlePaddle/models/tree/develop/image_classification/caffe2paddle)\n- 11.2 [将TensorFlow模型文件转换为PaddlePaddle模型文件](https://github.com/PaddlePaddle/models/tree/develop/image_classification/tf2paddle)\n- 11.3 [AlexNet](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 11.4 [VGG](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 11.5 [Residual Network](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 11.6 [Inception-v4](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 11.7 [Inception-Resnet-V2](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 11.8 [Xception](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n\n## 12. 目标检测\n\n目标检测任务的目标是给定一张图像或是视频帧，让计算机找出其中所有目标的位置，并给出每个目标的具体类别。对于人类来说，目标检测是一个非常简单的任务。然而，计算机能够“看到”的仅有一些值为0 ~ 255的矩阵，很难解图像或是视频帧中出现了人或是物体这样的高层语义概念，也就更加难以定位目标出现在图像中哪个区域。与此同时，由于目标会出现在图像或是视频帧中的任何位置，目标的形态千变万化，图像或是视频帧的背景千差万别，诸多因素都使得目标检测对计算机来说是一个具有挑战性的问题。\n\n在目标检测任务中，我们介绍利用SSD方法完成目标检测。SSD全称：Single Shot MultiBox Detector，是目标检测领域较新且效果较好的检测算法之一，具有检测速度快且检测精度高的特点。\n\n- 12.1 [Single Shot MultiBox Detector](https://github.com/PaddlePaddle/models/tree/develop/ssd/README.cn.md)\n\n## 13. 场景文字识别\n\n许多场景图像中包含着丰富的文本信息，对理解图像信息有着重要作用，能够极大地帮助人们认知和理解场景图像的内容。场景文字识别是在图像背景复杂、分辨率低下、字体多样、分布随意等情况下，将图像信息转化为文字序列的过程，可认为是一种特别的翻译过程：将图像输入翻译为自然语言输出。场景图像文字识别技术的发展也促进了一些新型应用的产生，如通过自动识别路牌中的文字帮助街景应用获取更加准确的地址信息等。\n\n在场景文字识别任务中，我们介绍如何将基于CNN的图像特征提取和基于RNN的序列翻译技术结合，免除人工定义特征，避免字符分割，使用自动学习到的图像特征，完成端到端地无约束字符定位和识别。\n\n- 13.1 [场景文字识别](https://github.com/PaddlePaddle/models/tree/develop/scene_text_recognition)\n\n## 14. 语音识别\n\n语音识别技术（Auto Speech Recognize，简称ASR）将人类语音中的词汇内容转化为计算机可读的输入，让机器能够“听懂”人类的语音，在语音助手、语音输入、语音交互等应用中发挥着重要作用。深度学习在语音识别领域取得了瞩目的成绩，端到端的深度学习方法将传统的声学模型、词典、语言模型等模块融为一个整体，不再依赖隐马尔可夫模型中的各种条件独立性假设，令模型变得更加简洁，一个神经网络模型以语音特征为输入，直接输出识别出的文本，目前已经成为语音识别最重要的手段。\n\n在语音识别任务中，我们提供了基于 DeepSpeech2 模型的完整流水线，包括：特征提取、数据增强、模型训练、语言模型、解码模块等，并提供一个训练好的模型和体验实例，大家能够使用自己的声音来体验语音识别的乐趣。\n\n14.1 [语音识别: DeepSpeech2](https://github.com/PaddlePaddle/DeepSpeech)\n\n本教程由[PaddlePaddle](https://github.com/PaddlePaddle/Paddle)创作，采用[Apache-2.0](LICENSE) 许可协议进行许可。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A3AE:3CC8A:175606:5C8634:6AB92162"},"text_sha256":"f13bfc2be9a60fa5d298d3edd968296edaec176654d25c341aaba8335c6a7a04"},{"path":"README.md","size":8680,"blob_sha":"1920b307253c9cc2f4547df1886124f85bfdabb2","priority":0,"status":200,"text":"# Introduction to models\n\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://github.com/PaddlePaddle/models)\n[![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://github.com/PaddlePaddle/models)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)\n\nPaddlePaddle provides a rich set of computational units to enable users to adopt a modular approach to solving various learning problems. In this repo, we demonstrate how to use PaddlePaddle to solve common machine learning tasks, providing several different neural network model that anyone can easily learn and use.\n\n## 1. Word Embedding\n\nThe word embedding expresses words with a real vector. Each dimension of the vector represents some of the latent grammatical or semantic features of the text and is one of the most successful concepts in the field of natural language processing. The generalized word vector can also be applied to discrete features. The study of word vector is usually an unsupervised learning. Therefore, it is possible to take full advantage of massive unmarked data to capture the relationship between features and to solve the problem of sparse features, missing tag data, and data noise. However, in the common word vector learning method, the last layer of the model often encounters a large-scale classification problem, which is the bottleneck of computing performance.\n\nIn the example of word vectors, we show how to use Hierarchical-Sigmoid and Noise Contrastive Estimation (NCE) to accelerate word-vector learning.\n\n- 1.1 [Hsigmoid Accelerated Word Vector Training](https://github.com/PaddlePaddle/models/tree/develop/hsigmoid)\n- 1.2 [Noise Contrastive Estimation Accelerated Word Vector Training](https://github.com/PaddlePaddle/models/tree/develop/nce_cost)\n\n\n## 2. RNN language model\n\nThe language model is important in the field of natural language processing. In addition to getting the word vector (a by-product of language model training), it can also help us to generate text. Given a number of words, the language model can help us predict the next most likely word. In the example of using the language model to generate text, we focus on the recurrent neural network language model. We can use the instructions in the document quickly adapt to their training corpus, complete automatic writing poetry, automatic writing prose and other interesting models.\n\n- 2.1 [Generate text using the RNN language model](https://github.com/PaddlePaddle/models/tree/develop/generate_sequence_by_rnn_lm)\n\n## 3. Click-Through Rate prediction\nThe click-through rate model predicts the probability that a user will click on an ad. This is widely used for advertising technology. Logistic Regression has a good learning performance for large-scale sparse features in the early stages of the development of click-through rate prediction. In recent years, DNN model because of its strong learning ability to gradually take the banner rate of the task of the banner.\n\nIn the example of click-through rate estimates, we first give the Google's Wide & Deep model. This model combines the advantages of DNN and the applicable logistic regression model for DNN and large-scale sparse features. Then we provide the deep factorization machine for click-through rate prediction. The deep factorization machine combines the factorization machine and deep neural networks to model both low order and high order interactions of input features.\n\n- 3.1 [Click-Through Rate Model](https://github.com/PaddlePaddle/models/tree/develop/ctr)\n- 3.2 [Deep Factorization Machine for Click-Through Rate prediction](https://github.com/PaddlePaddle/models/tree/develop/deep_fm)\n\n## 4. Text classification\n\nText classification is one of the most basic tasks in natural language processing. The deep learning method can eliminate the complex feature engineering, and use the original text as input to optimize the classification accuracy.\n\nFor text classification, we provide a non-sequential text classification model based on DNN and CNN. (For LSTM-based model, please refer to PaddleBook [Sentiment Analysis](http://www.paddlepaddle.org/docs/develop/book/06.understand_sentiment/index.html)).\n\n- 4.1 [Sentiment analysis based on DNN / CNN](https://github.com/PaddlePaddle/models/tree/develop/text_classification)\n\n## 5. Learning to rank\n\nLearning to rank (LTR) is one of the core problems in information retrieval and search engine research. Training data is used by a learning algorithm to produce a ranking model which computes the relevance of documents for actual queries.\nThe depth neural network can be used to model the fractional function to form various LTR models based on depth learning.\n\nThe algorithms for learning to rank are usually categorized into three groups by their input representation and the loss function. These are pointwise, pairwise and listwise approaches. Here we demonstrate RankLoss loss function method (pairwise approach), and LambdaRank loss function method (listwise approach). (For Pointwise approaches, please refer to [Recommended System](http://www.paddlepaddle.org/docs/develop/book/05.recommender_system/index.html)).\n\n- 5.1 [Learning to rank based on Pairwise and Listwise approches](https://github.com/PaddlePaddle/models/tree/develop/ltr)\n\n## 6. Semantic model\nThe deep structured semantic model uses the DNN model to learn the vector representation of the low latitude in a continuous semantic space, finally models the semantic similarity between the two sentences.\n\nIn this example, we demonstrate how to use PaddlePaddle to implement a generic deep structured semantic model to model the semantic similarity between two strings. The model supports different network structures such as CNN (Convolutional Network), FC (Fully Connected Network), RNN (Recurrent Neural Network), and different loss functions such as classification, regression, and sequencing.\n\n- 6.1 [Deep structured semantic model](https://github.com/PaddlePaddle/models/tree/develop/dssm)\n\n## 7. Sequence tagging\n\nGiven the input sequence, the sequence tagging model is one of the most basic tasks in the natural language processing by assigning a category tag to each element in the sequence. Recurrent neural network models with Conditional Random Field (CRF) are commonly used for sequence tagging tasks.\n\nIn the example of the sequence tagging, we describe how to train an end-to-end sequence tagging model with the Named Entity Recognition (NER) task as an example.\n\n- 7.1 [Name Entity Recognition](https://github.com/PaddlePaddle/models/tree/develop/sequence_tagging_for_ner)\n\n## 8. Sequence to sequence learning\n\nSequence-to-sequence model has a wide range of applications. This includes machine translation, dialogue system, and parse tree generation.\n\nAs an example for sequence-to-sequence learning, we take the machine translation task. We demonstrate the sequence-to-sequence mapping model without attention mechanism, which is the basis for all sequence-to-sequence learning models. We will use scheduled sampling to improve the problem of error accumulation in the RNN model, and machine translation with external memory mechanism.\n\n- 8.1 [Basic Sequence-to-sequence model](https://github.com/PaddlePaddle/models/tree/develop/nmt_without_attention)\n\n## 9. Image classification\n\nFor the example of image classification, we show you how to train AlexNet, VGG, GoogLeNet, ResNet, Inception-v4, Inception-Resnet-V2 and Xception models in PaddlePaddle. It also provides model conversion tools that convert Caffe or TensorFlow trained model files into PaddlePaddle model files.\n\n- 9.1 [convert Caffe model file to PaddlePaddle model file](https://github.com/PaddlePaddle/models/tree/develop/image_classification/caffe2paddle)\n- 9.2 [convert TensorFlow model file to PaddlePaddle model file](https://github.com/PaddlePaddle/models/tree/develop/image_classification/tf2paddle)\n- 9.3 [AlexNet](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 9.4 [VGG](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 9.5 [Residual Network](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 9.6 [Inception-v4](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 9.7 [Inception-Resnet-V2](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n- 9.8 [Xception](https://github.com/PaddlePaddle/models/tree/develop/image_classification)\n\nThis tutorial is contributed by [PaddlePaddle](https://github.com/PaddlePaddle/Paddle) and licensed under the [Apache-2.0 license](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C8B4:3E724:17AFEC:5CDF46:6AB9215E"},"text_sha256":"fc417610277c56afa16e3ff31b4830bbc78a1697cc232ed4a4b9e7c195cc9110"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3165","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:17F3226:1C13740:6AB9291C"},"commit":{"sha":"95d3f5467de2f418290eb4097a4e3aadbdc94b6d","url":"https://github.com/PaddlePaddle/models/commit/95d3f5467de2f418290eb4097a4e3aadbdc94b6d","date":"2025-01-15T17:54:36Z","author_date":"2025-01-15T17:54:36Z","committer_date":"2025-01-15T17:54:36Z","tree_sha":"9c112f583d6a10d3eccb773f74753dc1675d5b5b","message_first_line":"update pp model doc (#5745)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3164","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17A28D9:1BC2C98:6AB9291C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2807,"blob_sha":"b8582f48df092d44c645bc2bb78ed640b3d4b9ff","priority":0}],"documents":[{"path":"README.md","size":2807,"blob_sha":"b8582f48df092d44c645bc2bb78ed640b3d4b9ff","priority":0,"status":200,"text":"# 欢迎使用飞桨产业级开源模型库\n\n## 简介\n\n飞桨的产业级模型库，包含大量经过产业实践长期打磨的主流模型以及在国际竞赛中的夺冠模型；提供面向语义理解、图像分类、目标检测、图像分割、文字识别、语音合成等场景的多个端到端开发套件，满足企业低成本开发和快速集成的需求。飞桨的模型库是围绕国内企业实际研发流程量身定制打造的产业级模型库，服务企业遍布能源、金融、工业、农业等多个领域。\n\n## 近期更新\n\n**`2022-11-29`**: 更新`release/2.4`分支，飞桨官方模型超过600个，生态模型超过260个（数量持续更新中）.\n\n**`2022-5-17`**: 更新`release/2.3`分支，飞桨官方模型超过500个，生态模型超过170个.\n\n**`2021-11-30`**: 更新`release/2.2`分支，系统的梳理了飞桨官方模型、学术模型和社区模型的清单，其中官方模型超过400个，生态模型超过100个\n\n**`Note`**:`release/2.2`以后分支模型均基于动态图实现，目前`dev-static`分支中仍有一些静态图模型代码，有需要的开发者可以继续切换到`dev-static`分支使用.\n\n## 主要内容\n|  目录 |   说明 |\n| --- | --- |\n| [官方模型(official)](docs/official/README.md) |• 面向产业实践，数量超过600个<br />• [飞桨PP系列模型](docs/official/PP-Models.md)，效果与精度最佳平衡<br />• 支持使用动态图开发视觉、自然语言、语音和推荐等领域模型<br />• 飞桨官方实现并提供持续技术支持及答疑<br />• 与飞桨核心框架版本对齐，已经经过充分的测试保证 |\n|[学术模型(research)](docs/research/README.md) |• 面向学术前沿，侧重对于问题的持续更新<br />• 主要由飞桨相关的学术生态合作伙伴贡献|\n|[社区模型(community)](docs/community/README.md) | • 面向更多丰富场景，侧重对于学术论文的覆盖<br />• 主要由飞桨生态开发者贡献，持续更新中|\n\n## 欢迎加入飞桨模型库技术交流群\n- 如果你希望了解飞桨模型库最新进展，或者希望与资深开发者一起讨论产业实践关注的重点模型，欢迎扫码加入飞桨模型库交流群：\n- （微信扫码填写简单问卷即可添加小助手，加上好友之后回复\"model\" 即可入群）\n\n<div align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/23690325/165911212-cda07629-1bab-4cc3-8228-e5b69320fe4d.jpg\"  width = \"200\" height = \"200\" />\n<\/div>\n\n<a name=\"致谢\"><\/a>\n## 致谢开发者\n感谢所有为飞桨产业级模型库贡献代码的开发者，也期待你的加入。\n\n\n## 许可证书\n此向导由[PaddlePaddle](https://github.com/PaddlePaddle/Paddle)贡献，受[Apache-2.0 license](LICENSE)许可认证。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4D4:241B62:173724:5C6788:6AB92163"},"text_sha256":"3695e7f61e227a8c2d16caf5d7e2437094187318d9ee901579a29904b8908249"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"yandexdataschool/Practical_RL","input_row":{"repository":"yandexdataschool/Practical_RL","url":"https://github.com/yandexdataschool/Practical_RL","name":"Practical_RL","owner":"yandexdataschool","description":"A course in reinforcement learning in the wild","language":"Jupyter Notebook","license_spdx_id":"Unlicense","license_name":"The Unlicense","license_osi_approved":"true","stars":6579,"issues":188,"created_at":"2017-01-23T16:18:00Z","updated_at":"2026-09-27T07:41:11Z","first_commit_at":"2017-01-23T16:18:01Z","last_commit_at":"2026-03-31T20:00:13Z","activity_months":110.19,"ai_ml_match_topics":"deep-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:01.345Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"yandexdataschool/Practical_RL","visibility":"public","created_at":"2017-01-23T16:18:00Z","updated_at":"2026-09-27T07:41:11Z","private":false,"fork":false,"archived":false,"stargazers_count":6579,"open_issues_count":43,"license_spdx_id":"Unlicense","license_name":"The Unlicense"},"error":"","rate":{"github_remaining":"3163","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A3:6C6ED:17DA5B0:1BFA166:6AB9291D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3162","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:180D1A3:1C2D068:6AB9291D"},"commit":{"sha":"c3f2fa81eb2997f8302c73da0dff12b5517d97a1","url":"https://github.com/yandexdataschool/Practical_RL/commit/c3f2fa81eb2997f8302c73da0dff12b5517d97a1","date":"2018-05-14T16:20:19Z","author_date":"2018-05-14T16:20:19Z","committer_date":"2018-05-14T16:20:19Z","tree_sha":"9f45620bc972009d676ab31db7c64f929cc0718c","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3161","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:17966D6:1BB67BB:6AB9291E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7785,"blob_sha":"7cc3ef056b0c03bcedf1493c3334ce02946b8914","priority":0}],"documents":[{"path":"README.md","size":7785,"blob_sha":"7cc3ef056b0c03bcedf1493c3334ce02946b8914","priority":0,"status":200,"text":"# Practical_RL\nA course on reinforcement learning in the wild.\nTaught on-campus at [HSE](https://cs.hse.ru) and [YSDA](https://yandexdataschool.com/)  and maintained to be friendly to online students (both english and russian).\n\n\n#### Manifesto:\n* __Optimize for the curious.__ For all the materials that aren’t covered in detail there are links to more information and related materials (D.Silver/Sutton/blogs/whatever). Assignments will have bonus sections if you want to dig deeper.\n* __Practicality first.__ Everything essential to solving reinforcement learning problems is worth mentioning. We won't shun away from covering tricks and heuristics. For every major idea there should be a lab that makes you to “feel” it on a practical problem.\n* __Git-course.__ Know a way to make the course better? Noticed a typo in a formula? Found a useful link? Made the code more readable? Made a version for alternative framework? You're awesome! [Pull-request](https://help.github.com/articles/about-pull-requests/) it!\n\n# Course info\n* Lecture slides are [here](https://yadi.sk/d/loPpY45J3EAYfU).\n* Telegram chat room for YSDA & HSE students is [here](https://t.me/rlspring18)\n* Grading rules for YSDA & HSE students is [here](https://github.com/yandexdataschool/Practical_RL/wiki/Homeworks-and-grading)\n* Online student __[survival guide](https://github.com/yandexdataschool/Practical_RL/wiki/Online-student's-survival-guide)__\n* Installing the libraries - [guide and issues thread](https://github.com/yandexdataschool/Practical_RL/issues/1)\n* Magical button that launches you into course environment: \n    * [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/yandexdataschool/Practical_RL/master) - comes will all libraries pre-installed. May be down time to time.\n    * If it's down, try [__google colab__](https://colab.research.google.com/) or [__azure notebooks__](http://notebooks.azure.com/). Those last longer, but they will require you to run installer commands (see ./Dockerfile).\n* Anonymous [feedback form](https://docs.google.com/forms/d/e/1FAIpQLSdurWw97Sm9xCyYwC8g3iB5EibITnoPJW2IkOVQYE_kcXPh6Q/viewform) for everything that didn't go through e-mail.\n* [About the course](https://github.com/yandexdataschool/Practical_RL/wiki/Practical-RL)\n\n# Additional materials\n* A large list of RL materials - [awesome rl](https://github.com/aikorea/awesome-rl)\n* [RL reading group](https://github.com/yandexdataschool/Practical_RL/wiki/RL-reading-group)\n\n\n# Syllabus\n\nThe syllabus is approximate: the lectures may occur in a slightly different order and some topics may end up taking two weeks.\n\n* [__week1__](https://github.com/yandexdataschool/Practical_RL/tree/master/week1_intro) RL as blackbox optimization\n  * Lecture: RL problems around us. Decision processes. Stochastic optimization, Crossentropy method. Parameter space search vs action space search.\n  * Seminar: Welcome into openai gym. Tabular CEM for Taxi-v0, deep CEM for box2d environments.\n  * Homework description - see week1/README.md. \n  * ** YSDA Deadline: 2018.02.26 23.59**\n  * ** HSE Deadline: 2018.01.28 23:59**\n  \n* [__week2__](https://github.com/yandexdataschool/Practical_RL/tree/master/week2_value_based) Value-based methods\n  * Lecture: Discounted reward MDP. Value-based approach. Value iteration. Policy iteration. Discounted reward fails.\n  * Seminar: Value iteration.  \n  * Homework description - see week2/README.md. \n  * ** HSE Deadline: 2018.02.11 23:59**\n  * ** YSDA Deadline: part1 2018.03.05 23.59, part2 2018.03.12 23.59**\n  \n\n* [__week3__](https://github.com/yandexdataschool/Practical_RL/tree/master/week3_model_free) Model-free reinforcement learning\n  * Lecture: Q-learning. SARSA. Off-policy Vs on-policy algorithms. N-step algorithms. TD(Lambda).\n  * Seminar: Qlearning Vs SARSA Vs Expected Value SARSA\n  * Homework description - see week3/README.md. \n  * **HSE Deadline: 2018.02.15 23:59**\n  * ** YSDA Deadline: 2018.03.12 23.59**\n     \n* [__week4_recap__](https://github.com/yandexdataschool/Practical_RL/tree/master/week4_%5Brecap%5D_deep_learning) - deep learning recap \n  * Lecture: Deep learning 101\n  * Seminar: Simple image classification with convnets\n\n* [__week4__](https://github.com/yandexdataschool/Practical_RL/tree/master/week4_approx_rl) Approximate reinforcement learning\n  * Lecture: Infinite/continuous state space. Value function approximation. Convergence conditions. Multiple agents trick; experience replay, target networks, double/dueling/bootstrap DQN, etc.\n  * Seminar:  Approximate Q-learning with experience replay. (CartPole, Atari)\n  * **HSE Deadline: 2018.03.04 23:30**\n  * ** YSDA Deadline: 2018.03.20 23.30**\n\n* [__week5__](https://github.com/yandexdataschool/Practical_RL/tree/master/week5_explore) Exploration in reinforcement learning\n  * Lecture: Contextual bandits. Thompson Sampling, UCB, bayesian UCB. Exploration in model-based RL, MCTS. \"Deep\" heuristics for exploration.\n  * Seminar: bayesian exploration for contextual bandits. UCB for MCTS.\n  \n  * ** YSDA Deadline: 2018.03.30 23.30**\n\n* [__week6__](https://github.com/yandexdataschool/Practical_RL/tree/master/week6_policy_based) Policy gradient methods I\n  * Lecture: Motivation for policy-based, policy gradient, logderivative trick, REINFORCE/crossentropy method, variance reduction(baseline), advantage actor-critic (incl. GAE)\n  * Seminar: REINFORCE, advantage actor-critic\n\n* [__week7_recap__](https://github.com/yandexdataschool/Practical_RL/tree/master/week7_%5Brecap%5D_rnn) Recurrent neural networks recap\n  * Lecture: Problems with sequential data. Recurrent neural netowks. Backprop through time. Vanishing & exploding gradients. LSTM, GRU. Gradient clipping\n  * Seminar: character-level RNN language model\n\n* [__week7__](https://github.com/yandexdataschool/Practical_RL/tree/master/week7_pomdp) Partially observable MDPs\n  * Lecture: POMDP intro. POMDP learning (agents with memory). POMDP planning (POMCP, etc)\n  * Seminar: Deep kung-fu & doom with recurrent A3C and DRQN\n    \n* [__week8__](https://github.com/yandexdataschool/Practical_RL/tree/master/week8_scst) Applications II\n  * Lecture: Reinforcement Learning as a general way to optimize non-differentiable loss. G2P, machine translation, conversation models, image captioning, discrete GANs. Self-critical sequence training.\n  * Seminar: Simple neural machine translation with self-critical sequence training\n\n* [__week9__](https://github.com/yandexdataschool/Practical_RL/tree/master/week9_policy_II) Policy gradient methods II\n  * Lecture: Trust region policy optimization. NPO/PPO. Deterministic policy gradient. DDPG. Bonus: DPG for discrete action spaces.\n  * Seminar: Approximate TRPO for simple robotic tasks.\n\n* [Some after-course bonus materials](https://github.com/yandexdataschool/Practical_RL/tree/master/yet_another_week)\n  \n\n# Course staff\nCourse materials and teaching by: _[unordered]_\n- [Pavel Shvechikov](https://github.com/bestxolodec) - lectures, seminars, hw checkups, reading group\n- [Oleg Vasilev](https://github.com/Omrigan) - seminars, hw checkups, technical support\n- [Alexander Fritsler](https://github.com/Fritz449) - lectures, seminars, hw checkups\n- [Nikita Putintsev](https://github.com/qwasser) - seminars, hw checkups, organizing our hot mess\n- [Fedor Ratnikov](https://github.com/justheuristic/) - lectures, seminars, hw checkups\n- [Alexey Umnov](https://github.com/alexeyum) - seminars, hw checkups\n\n# Contributions\n* Using pictures from [Berkeley AI course](http://ai.berkeley.edu/home.html)\n* Massively refering to [CS294](http://rll.berkeley.edu/deeprlcourse/)\n* Sevaral tensorflow assignments by [Scitator](https://github.com/Scitator)\n* A lot of fixes from [arogozhnikov](https://github.com/arogozhnikov)\n* Other awesome people: see github contributors\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A51E:3B1F3:17E2A3:5D138B:6AB92165"},"text_sha256":"8c395105a7a1ba756396ce45609c593c8423640e86a132c81d7c87a04351e4eb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3160","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17B96B3:1BD988E:6AB9291E"},"commit":{"sha":"6f7fa8bc521af3d6bb47833c4670f44740f26aa6","url":"https://github.com/yandexdataschool/Practical_RL/commit/6f7fa8bc521af3d6bb47833c4670f44740f26aa6","date":"2026-03-31T20:00:13Z","author_date":"2026-03-31T20:00:13Z","committer_date":"2026-03-31T20:00:13Z","tree_sha":"3e0531d3948ad69e49b800f6031a16dcc82318b5","message_first_line":"week07: fix off-by-one error in encoder state indexing (#558)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3159","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17C54A8:1BE5A51:6AB9291F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6857,"blob_sha":"ea1453fd40f40adccfe1c302a224afec9df306da","priority":0}],"documents":[{"path":"README.md","size":6857,"blob_sha":"ea1453fd40f40adccfe1c302a224afec9df306da","priority":0,"status":200,"text":"# Practical_RL\n\nAn open course on reinforcement learning in the wild.\nTaught on-campus at [HSE](https://cs.hse.ru) and [YSDA](https://yandexdataschool.com/)  and maintained to be friendly to online students (both english and russian).\n\n\n#### Manifesto:\n* __Optimize for the curious.__ For all the materials that aren’t covered in detail there are links to more information and related materials (D.Silver/Sutton/blogs/whatever). Assignments will have bonus sections if you want to dig deeper.\n* __Practicality first.__ Everything essential to solving reinforcement learning problems is worth mentioning. We won't shun away from covering tricks and heuristics. For every major idea there should be a lab that makes you to “feel” it on a practical problem.\n* __Git-course.__ Know a way to make the course better? Noticed a typo in a formula? Found a useful link? Made the code more readable? Made a version for alternative framework? You're awesome! [Pull-request](https://help.github.com/articles/about-pull-requests/) it!\n\n[![Github contributors](https://img.shields.io/github/contributors/yandexdataschool/Practical_RL.svg?logo=github&logoColor=white)](https://github.com/yandexdataschool/Practical_RL/graphs/contributors)\n\n# Course info\n\n* __FAQ:__ [About the course](https://github.com/yandexdataschool/Practical_RL/wiki/Practical-RL), [Technical issues thread](https://github.com/yandexdataschool/Practical_RL/issues/1), [Lecture Slides](https://yadi.sk/d/loPpY45J3EAYfU), [Online Student Survival Guide](https://github.com/yandexdataschool/Practical_RL/wiki/Online-student's-survival-guide)\n\n* Anonymous [feedback form](https://docs.google.com/forms/d/e/1FAIpQLSdurWw97Sm9xCyYwC8g3iB5EibITnoPJW2IkOVQYE_kcXPh6Q/viewform).\n\n* Virtual course environment: \n    * [__Google Colab__](https://colab.research.google.com/) - set open -> github -> yandexdataschool/pracical_rl -> {branch name} and select any notebook you want.\n    * [Installing dependencies](https://github.com/yandexdataschool/Practical_RL/issues/1) on your local machine (recommended).\n    * Alternative: [Azure Notebooks](https://notebooks.azure.com/).\n\n\n# Additional materials\n* [RL reading group](https://github.com/yandexdataschool/Practical_RL/wiki/RL-reading-group)\n\n\n# Syllabus\n\nThe syllabus is approximate: the lectures may occur in a slightly different order and some topics may end up taking two weeks.\n\n* [__week01_intro__](./week01_intro) Introduction\n  * Lecture: RL problems around us. Decision processes. Stochastic optimization, Crossentropy method. Parameter space search vs action space search.\n  * Seminar: Welcome into openai gym. Tabular CEM for Taxi-v0, deep CEM for box2d environments.\n  * Homework description - see week1/README.md. \n\n* [__week02_value_based__](./week02_value_based) Value-based methods\n  * Lecture: Discounted reward MDP. Value-based approach. Value iteration. Policy iteration. Discounted reward fails.\n  * Seminar: Value iteration.  \n  * Homework description - see week2/README.md. \n  \n* [__week03_model_free__](./week03_model_free) Model-free reinforcement learning\n  * Lecture: Q-learning. SARSA. Off-policy Vs on-policy algorithms. N-step algorithms. TD(Lambda).\n  * Seminar: Qlearning Vs SARSA Vs Expected Value SARSA\n  * Homework description - see week3/README.md. \n\n* [__recap_deep_learning__](./week04_\\[recap\\]_deep_learning) - deep learning recap \n  * Lecture: Deep learning 101\n  * Seminar: Intro to pytorch/tensorflow, simple image classification with convnets\n\n* [__week04_approx_rl__](./week04_approx_rl) Approximate (deep) RL\n  * Lecture: Infinite/continuous state space. Value function approximation. Convergence conditions. Multiple agents trick; experience replay, target networks, double/dueling/bootstrap DQN, etc.\n  * Seminar:  Approximate Q-learning with experience replay. (CartPole, Atari)\n  \n* [__week05_explore__](./week05_explore) Exploration\n  * Lecture: Contextual bandits. Thompson Sampling, UCB, bayesian UCB. Exploration in model-based RL, MCTS. \"Deep\" heuristics for exploration.\n  * Seminar: bayesian exploration for contextual bandits. UCB for MCTS.\n\n* [__week06_policy_based__](./week06_policy_based) Policy Gradient methods\n  * Lecture: Motivation for policy-based, policy gradient, logderivative trick, REINFORCE/crossentropy method, variance reduction(baseline), advantage actor-critic (incl. GAE)\n  * Seminar: REINFORCE, advantage actor-critic\n\n* [__week07_seq2seq__](./week07_seq2seq) Reinforcement Learning for Sequence Models\n  * Lecture: Problems with sequential data. Recurrent neural networks. Backprop through time. Vanishing & exploding gradients. LSTM, GRU. Gradient clipping\n  * Seminar: character-level RNN language model\n\n* [__week08_pomdp__](./week08_pomdp) Partially Observed MDP\n  * Lecture: POMDP intro. POMDP learning (agents with memory). POMDP planning (POMCP, etc)\n  * Seminar: Deep kung-fu & doom with recurrent A3C and DRQN\n  \n* [__week09_policy_II__](./week09_policy_II) Advanced policy-based methods\n  * Lecture: Trust region policy optimization. NPO/PPO. Deterministic policy gradient. DDPG\n  * Seminar: Approximate TRPO for simple robot control.\n\n* [__week10_planning__](./week10_planning) Model-based RL & Co\n  * Lecture: Model-Based RL, Planning in General, Imitation Learning and Inverse Reinforcement Learning\n  * Seminar: MCTS for toy tasks\n\n* [__yet_another_week__](./yet_another_week) Inverse RL and Imitation Learning\n  * All that cool RL stuff that you won't learn from this course :)\n\n\n# Course staff\nCourse materials and teaching by: _[unordered]_\n- [Pavel Shvechikov](https://github.com/pshvechikov) - lectures, seminars, hw checkups, reading group\n- [Nikita Putintsev](https://github.com/qwasser) - seminars, hw checkups, organizing our hot mess\n- [Alexander Fritsler](https://github.com/Fritz449) - lectures, seminars, hw checkups\n- [Oleg Vasilev](https://github.com/Omrigan) - seminars, hw checkups, technical support\n- [Dmitry Nikulin](https://github.com/pastafarianist) - tons of fixes, far and wide\n- [Mikhail Konobeev](https://github.com/MichaelKonobeev) - seminars, hw checkups\n- [Ivan Kharitonov](https://github.com/neer201) - seminars, hw checkups\n- [Ravil Khisamov](https://github.com/zshrav) - seminars, hw checkups\n- [Anna Klepova](https://github.com/q0o0p) - hw checkups\n- [Fedor Ratnikov](https://github.com/justheuristic) - admin stuff\n\n# Contributions\n* Using pictures from [Berkeley AI course](http://ai.berkeley.edu/home.html)\n* Massively refering to [CS294](http://rll.berkeley.edu/deeprlcourse/)\n* Several tensorflow assignments by [Scitator](https://github.com/Scitator)\n* A lot of fixes from [arogozhnikov](https://github.com/arogozhnikov)\n* Other awesome people: see github [contributors](https://github.com/yandexdataschool/Practical_RL/graphs/contributors)\n* [Alexey Umnov](https://github.com/alexeyum) helped us a lot during spring2018\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2006:29FD16:17CF9B:5CFFB4:6AB92165"},"text_sha256":"214f7f97c5b76b4425c33536cf8058dd8c6fdbd69cf76d8d35a65a24024ea6d5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/serving","input_row":{"repository":"tensorflow/serving","url":"https://github.com/tensorflow/serving","name":"serving","owner":"tensorflow","description":"A flexible, high-performance serving system for machine learning models","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6364,"issues":1492,"created_at":"2016-01-26T21:48:20Z","updated_at":"2026-09-26T16:06:30Z","first_commit_at":"2016-02-12T01:15:54Z","last_commit_at":"2026-09-26T16:06:17Z","activity_months":127.45,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:03.913Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/serving","visibility":"public","created_at":"2016-01-26T21:48:20Z","updated_at":"2026-09-26T16:06:30Z","private":false,"fork":false,"archived":false,"stargazers_count":6364,"open_issues_count":80,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3158","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D4:73962:17BF821:1BDF2CD:6AB9291F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3157","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BF:6C9BF:17EBB30:1C0BDD1:6AB92920"},"commit":{"sha":"2ea5cae14463a56f3ac77945729484e8617e79ab","url":"https://github.com/tensorflow/serving/commit/2ea5cae14463a56f3ac77945729484e8617e79ab","date":"2018-05-24T02:17:54Z","author_date":"2018-05-24T02:17:54Z","committer_date":"2018-05-24T02:17:54Z","tree_sha":"8caae465e503f316899c309e21b4f15e6f9a5cbf","message_first_line":"Merge pull request #891 from christisg/branch_197435743"},"tree_request_status":200,"tree_rate":{"github_remaining":"3156","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17BCDD1:1BDC5BB:6AB92920"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2552,"blob_sha":"1e628c212cf2a7c5560c3fc24875f4b69c536310","priority":0}],"documents":[{"path":"README.md","size":2552,"blob_sha":"1e628c212cf2a7c5560c3fc24875f4b69c536310","priority":0,"status":200,"text":"# TensorFlow Serving\n\n![Build Status](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges/ubuntu.png)\n\nTensorFlow Serving is an open-source software library for serving\nmachine learning models. It deals with the *inference* aspect of machine\nlearning, taking models after *training* and managing their lifetimes, providing\nclients with versioned access via a high-performance, reference-counted lookup\ntable.\n\nMultiple models, or indeed multiple versions of the same model, can be served\nsimultaneously. This flexibility facilitates canarying new versions,\nnon-atomically migrating clients to new models or versions, and A/B testing\nexperimental models.\n\nThe primary use-case is high-performance production serving, but the same\nserving infrastructure can also be used in bulk-processing (e.g. map-reduce)\njobs to pre-compute inference results or analyze model performance. In both\nscenarios, GPUs can substantially increase inference throughput. TensorFlow\nServing comes with a scheduler that groups individual inference requests into\nbatches for joint execution on a GPU, with configurable latency controls.\n\nTensorFlow Serving has out-of-the-box support for TensorFlow models (naturally),\nbut at its core it manages arbitrary versioned items (*servables*) with\npass-through to their native APIs. In addition to trained TensorFlow models,\nservables can include other assets needed for inference such as embeddings,\nvocabularies and feature transformation configs, or even non-TensorFlow-based\nmachine learning models.\n\nThe architecture is highly modular. You can use some parts individually (e.g.\nbatch scheduling) or use all the parts together. There are numerous plug-in\npoints; perhaps the most useful ways to extend the system are:\n(a) [creating a new type of servable](tensorflow_serving/g3doc/custom_servable.md);\n(b) [creating a custom source of servable versions](tensorflow_serving/g3doc/custom_source.md).\n\n**If you'd like to contribute to TensorFlow Serving, be sure to review the\n[contribution guidelines](CONTRIBUTING.md).**\n\n**We use [GitHub issues](https://github.com/tensorflow/serving/issues) for\ntracking requests and bugs.**\n\n# Download and Setup\n\nSee [install instructions](tensorflow_serving/g3doc/setup.md).\n\n## Tutorials\n\n* [Basic tutorial](tensorflow_serving/g3doc/serving_basic.md)\n* [Advanced tutorial](tensorflow_serving/g3doc/serving_advanced.md)\n\n## For more information\n\n* [Serving architecture overview](tensorflow_serving/g3doc/architecture_overview.md)\n* [TensorFlow website](http://tensorflow.org)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E612:18233:173EC0:5C6E42:6AB92167"},"text_sha256":"789ab4c6d90901c8aa7036c89dfcf45120a401380673473b7a40da455439fffb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3155","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A9:76AED:17DF5C5:1BFFA22:6AB92921"},"commit":{"sha":"82b63458656696b480777a2087daea1410c787bb","url":"https://github.com/tensorflow/serving/commit/82b63458656696b480777a2087daea1410c787bb","date":"2026-06-30T19:02:43Z","author_date":"2026-06-30T19:02:16Z","committer_date":"2026-06-30T19:02:43Z","tree_sha":"2b0d08babc1239adcb4fa600ceb385f0b6177c69","message_first_line":"Updating TensorFlow to latest passing continuous build."},"tree_request_status":200,"tree_rate":{"github_remaining":"3154","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17C1DEB:1BE2324:6AB92921"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6053,"blob_sha":"263fe7a957204d1fdbcb1e431c99eeaaff681323","priority":0}],"documents":[{"path":"README.md","size":6053,"blob_sha":"263fe7a957204d1fdbcb1e431c99eeaaff681323","priority":0,"status":200,"text":"# TensorFlow Serving\n\n[![Ubuntu Build Status](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/ubuntu.svg)](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/ubuntu.html)\n[![Ubuntu Build Status at TF HEAD](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/ubuntu-tf-head.svg)](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/ubuntu-tf-head.html)\n![Docker CPU Nightly Build Status](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/docker-cpu-nightly.svg)\n![Docker GPU Nightly Build Status](https://storage.googleapis.com/tensorflow-serving-kokoro-build-badges-bucket/docker-gpu-nightly.svg)\n\n----\nTensorFlow Serving is a flexible, high-performance serving system for\nmachine learning models, designed for production environments. It deals with\nthe *inference* aspect of machine learning, taking models after *training* and\nmanaging their lifetimes, providing clients with versioned access via\na high-performance, reference-counted lookup table.\nTensorFlow Serving provides out-of-the-box integration with TensorFlow models,\nbut can be easily extended to serve other types of models and data.\n\nTo note a few features:\n\n-   Can serve multiple models, or multiple versions of the same model\n    simultaneously\n-   Exposes both gRPC as well as HTTP inference endpoints\n-   Allows deployment of new model versions without changing any client code\n-   Supports canarying new versions and A/B testing experimental models\n-   Adds minimal latency to inference time due to efficient, low-overhead\n    implementation\n-   Features a scheduler that groups individual inference requests into batches\n    for joint execution on GPU, with configurable latency controls\n-   Supports many *servables*: Tensorflow models, embeddings, vocabularies,\n    feature transformations and even non-Tensorflow-based machine learning\n    models\n\n## Serve a Tensorflow model in 60 seconds\n```bash\n# Download the TensorFlow Serving Docker image and repo\ndocker pull tensorflow/serving\n\ngit clone https://github.com/tensorflow/serving\n# Location of demo models\nTESTDATA=\"$(pwd)/serving/tensorflow_serving/servables/tensorflow/testdata\"\n\n# Start TensorFlow Serving container and open the REST API port\ndocker run -t --rm -p 8501:8501 \\\n    -v \"$TESTDATA/saved_model_half_plus_two_cpu:/models/half_plus_two\" \\\n    -e MODEL_NAME=half_plus_two \\\n    tensorflow/serving &\n\n# Query the model using the predict API\ncurl -d '{\"instances\": [1.0, 2.0, 5.0]}' \\\n    -X POST http://localhost:8501/v1/models/half_plus_two:predict\n\n# Returns => { \"predictions\": [2.5, 3.0, 4.5] }\n```\n\n## End-to-End Training & Serving Tutorial\n\nRefer to the official Tensorflow documentations site for [a complete tutorial to train and serve a Tensorflow Model](https://www.tensorflow.org/tfx/tutorials/serving/rest_simple).\n\n\n## Documentation\n\n### Set up\n\nThe easiest and most straight-forward way of using TensorFlow Serving is with\nDocker images. We highly recommend this route unless you have specific needs\nthat are not addressed by running in a container.\n\n*   [Install Tensorflow Serving using Docker](tensorflow_serving/g3doc/docker.md)\n    *(Recommended)*\n*   [Install Tensorflow Serving without Docker](tensorflow_serving/g3doc/setup.md)\n    *(Not Recommended)*\n*   [Build Tensorflow Serving from Source with Docker](tensorflow_serving/g3doc/building_with_docker.md)\n*   [Deploy Tensorflow Serving on Kubernetes](tensorflow_serving/g3doc/serving_kubernetes.md)\n\n### Use\n\n#### Export your Tensorflow model\n\nIn order to serve a Tensorflow model, simply export a SavedModel from your\nTensorflow program.\n[SavedModel](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/saved_model/README.md)\nis a language-neutral, recoverable, hermetic serialization format that enables\nhigher-level systems and tools to produce, consume, and transform TensorFlow\nmodels.\n\nPlease refer to [Tensorflow documentation](https://www.tensorflow.org/guide/saved_model#save_and_restore_models)\nfor detailed instructions on how to export SavedModels.\n\n#### Configure and Use Tensorflow Serving\n\n* [Follow a tutorial on Serving Tensorflow models](tensorflow_serving/g3doc/serving_basic.md)\n* [Configure Tensorflow Serving to make it fit your serving use case](tensorflow_serving/g3doc/serving_config.md)\n* Read the [Performance Guide](tensorflow_serving/g3doc/performance.md)\nand learn how to [use TensorBoard to profile and optimize inference requests](tensorflow_serving/g3doc/tensorboard.md)\n* Read the [REST API Guide](tensorflow_serving/g3doc/api_rest.md)\nor [gRPC API definition](https://github.com/tensorflow/serving/tree/master/tensorflow_serving/apis)\n* [Use SavedModel Warmup if initial inference requests are slow due to lazy initialization of graph](tensorflow_serving/g3doc/saved_model_warmup.md)\n* [If encountering issues regarding model signatures, please read the SignatureDef documentation](tensorflow_serving/g3doc/signature_defs.md)\n* If using a model with custom ops, [learn how to serve models with custom ops](tensorflow_serving/g3doc/custom_op.md)\n\n### Extend\n\nTensorflow Serving's architecture is highly modular. You can use some parts\nindividually (e.g. batch scheduling) and/or extend it to serve new use cases.\n\n* [Ensure you are familiar with building Tensorflow Serving](tensorflow_serving/g3doc/building_with_docker.md)\n* [Learn about Tensorflow Serving's architecture](tensorflow_serving/g3doc/architecture.md)\n* [Explore the Tensorflow Serving C++ API reference](https://www.tensorflow.org/tfx/serving/api_docs/cc/)\n* [Create a new type of Servable](tensorflow_serving/g3doc/custom_servable.md)\n* [Create a custom Source of Servable versions](tensorflow_serving/g3doc/custom_source.md)\n\n## Contribute\n\n\n**If you'd like to contribute to TensorFlow Serving, be sure to review the\n[contribution guidelines](CONTRIBUTING.md).**\n\n\n## For more information\n\nPlease refer to the official [TensorFlow website](http://tensorflow.org) for\nmore information.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"866E:3B6DE:16F06A:5C2036:6AB92169"},"text_sha256":"c212e03fbb4bcd723b8bfd0b87d8ec028794f42f0240e10fd5dd933f43657ee6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorpack/tensorpack","input_row":{"repository":"tensorpack/tensorpack","url":"https://github.com/tensorpack/tensorpack","name":"tensorpack","owner":"tensorpack","description":"A Neural Net Training Interface on TensorFlow, with focus on speed + flexibility","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6284,"issues":1353,"created_at":"2015-12-25T23:08:44Z","updated_at":"2026-09-21T13:42:37Z","first_commit_at":"2015-12-25T23:08:44Z","last_commit_at":"2023-08-06T00:30:36Z","activity_months":91.329999999999998,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:06.617Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorpack/tensorpack","visibility":"public","created_at":"2015-12-25T23:08:44Z","updated_at":"2026-09-21T13:42:37Z","private":false,"fork":false,"archived":false,"stargazers_count":6284,"open_issues_count":14,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3153","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:17C56CE:1BE5CD8:6AB92922"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3152","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17BE204:1BDE101:6AB92923"},"commit":{"sha":"f002bfb91107a45114ee51b86b3534ac4cd975ef","url":"https://github.com/tensorpack/tensorpack/commit/f002bfb91107a45114ee51b86b3534ac4cd975ef","date":"2018-05-24T09:25:16Z","author_date":"2018-05-24T09:25:16Z","committer_date":"2018-05-24T09:25:16Z","tree_sha":"e4b1335a12be313c1f5c0718fccac0ab749f3d97","message_first_line":"fix bug of tf version check in fasterrcnn (#773)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3151","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093F:0BA1:D72215:FCD028:6AB92923"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3908,"blob_sha":"b3993206bfbfaabf3f68c2880040fdc92b624b73","priority":0}],"documents":[{"path":"README.md","size":3908,"blob_sha":"b3993206bfbfaabf3f68c2880040fdc92b624b73","priority":0,"status":200,"text":"![Tensorpack](.github/tensorpack.png)\n\nTensorpack is a training interface based on TensorFlow.\n\n[![Build Status](https://travis-ci.org/ppwwyyxx/tensorpack.svg?branch=master)](https://travis-ci.org/ppwwyyxx/tensorpack)\n[![ReadTheDoc](https://readthedocs.org/projects/tensorpack/badge/?version=latest)](http://tensorpack.readthedocs.io/en/latest/index.html)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/tensorpack/users)\n[![model-zoo](https://img.shields.io/badge/model-zoo-brightgreen.svg)](http://models.tensorpack.com)\n\n## Features:\n\nIt's Yet Another TF high-level API, with __speed__, __readability__ and __flexibility__ built together.\n\n1. Focus on __training speed__.\n\t+\tSpeed comes for free with tensorpack -- it uses TensorFlow in the __efficient way__ with no extra overhead.\n\t  On different CNNs, it runs training [1.2~5x faster](https://github.com/tensorpack/benchmarks/tree/master/other-wrappers) than the equivalent Keras code.\n\n\t+ Data-parallel multi-GPU/distributed training is off-the-shelf to use with\n      one line of code. It scales as well as Google's [official benchmark](https://www.tensorflow.org/performance/benchmarks).\n\n\t+ See [tensorpack/benchmarks](https://github.com/tensorpack/benchmarks) for more benchmark scripts.\n\n2. Focus on __large datasets__.\n\t+ It's unnecessary to read/preprocess data with a new language called TF.\n\t\tTensorpack helps you load large datasets (e.g. ImageNet) in __pure Python__ with autoparallelization.\n\n3. It's not a model wrapper.\n\t+ There are too many symbolic function wrappers in the world. Tensorpack includes only a few common models.\n\t  But you can use any symbolic function library inside tensorpack, including tf.layers/Keras/slim/tflearn/tensorlayer/....\n\nSee [tutorials](http://tensorpack.readthedocs.io/tutorial/index.html#user-tutorials) to know more about these features.\n\n## [Examples](examples):\n\nWe refuse toy examples.\nInstead of showing you 10 arbitrary networks trained on toy datasets,\n[tensorpack examples](examples) faithfully replicate papers and care about reproducing numbers,\ndemonstrating its flexibility for actual research.\n\n### Vision:\n+ [Train ResNet](examples/ResNet) and [other models](examples/ImageNetModels) on ImageNet.\n+ [Train Faster-RCNN / Mask-RCNN on COCO object detection](examples/FasterRCNN)\n+ [Generative Adversarial Network(GAN) variants](examples/GAN), including DCGAN, InfoGAN, Conditional GAN, WGAN, BEGAN, DiscoGAN, Image to Image, CycleGAN.\n+ [DoReFa-Net: train binary / low-bitwidth CNN on ImageNet](examples/DoReFa-Net)\n+ [Fully-convolutional Network for Holistically-Nested Edge Detection(HED)](examples/HED)\n+ [Spatial Transformer Networks on MNIST addition](examples/SpatialTransformer)\n+ [Visualize CNN saliency maps](examples/Saliency)\n+ [Similarity learning on MNIST](examples/SimilarityLearning)\n\n### Reinforcement Learning:\n+ [Deep Q-Network(DQN) variants on Atari games](examples/DeepQNetwork), including DQN, DoubleDQN, DuelingDQN.\n+ [Asynchronous Advantage Actor-Critic(A3C) with demos on OpenAI Gym](examples/A3C-Gym)\n\n### Speech / NLP:\n+ [LSTM-CTC for speech recognition](examples/CTC-TIMIT)\n+ [char-rnn for fun](examples/Char-RNN)\n+ [LSTM language model on PennTreebank](examples/PennTreebank)\n\n## Install:\n\nDependencies:\n\n+ Python 2.7 or 3\n+ Python bindings for OpenCV (Optional, but required by a lot of features)\n+ TensorFlow >= 1.3.0 (Optional if you only want to use `tensorpack.dataflow` alone as a data processing library)\n```\n# install git, then:\npip install -U git+https://github.com/ppwwyyxx/tensorpack.git\n# or add `--user` to avoid system-wide installation.\n```\n\n## Citing Tensorpack:\n\nIf you use Tensorpack in your research or wish to refer to the examples, please cite with:\n```\n@misc{wu2016tensorpack,\n  title={Tensorpack},\n  author={Wu, Yuxin and others},\n  howpublished={\\url{https://github.com/tensorpack/}},\n  year={2016}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9366:241B62:173753:5C6893:6AB9216B"},"text_sha256":"77f0ebc3aec7da272babf5aec1018e27a06577d9639a02ec514d2d9005179493"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3150","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0853:2D7D17:176F544:1B8DC10:6AB92924"},"commit":{"sha":"1547a54e8546494614ca31c984a1bfd1d0e24b77","url":"https://github.com/tensorpack/tensorpack/commit/1547a54e8546494614ca31c984a1bfd1d0e24b77","date":"2023-08-06T00:30:36Z","author_date":"2023-08-06T00:30:36Z","committer_date":"2023-08-06T00:30:36Z","tree_sha":"54ea5f1650314550e99b4be2198eb7d64e0b7ed6","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3149","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0888:0BA1:D722BF:FCD0EA:6AB92924"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4797,"blob_sha":"01143929717b9d7d222011bce6f0b3fecd4200df","priority":0}],"documents":[{"path":"README.md","size":4797,"blob_sha":"01143929717b9d7d222011bce6f0b3fecd4200df","priority":0,"status":200,"text":"![Tensorpack](https://github.com/tensorpack/tensorpack/raw/master/.github/tensorpack.png)\n\nTensorpack is a neural network training interface based on graph-mode TensorFlow.\n\n[![ReadTheDoc](https://readthedocs.org/projects/tensorpack/badge/?version=latest)](http://tensorpack.readthedocs.io)\n[![Gitter chat](https://img.shields.io/badge/chat-on%20gitter-46bc99.svg)](https://gitter.im/tensorpack/users)\n[![model-zoo](https://img.shields.io/badge/model-zoo-brightgreen.svg)](http://models.tensorpack.com)\n## Features:\n\nIt's Yet Another TF high-level API, with the following highlights:\n\n1. Focus on __training speed__.\n  + Speed comes for free with Tensorpack -- it uses TensorFlow in the __efficient way__ with no extra overhead.\n    On common CNNs, it runs training [1.2~5x faster](https://github.com/tensorpack/benchmarks/tree/master/other-wrappers) than the equivalent Keras code.\n    Your training can probably gets faster if written with Tensorpack.\n\n  + Scalable data-parallel multi-GPU / distributed training strategy is off-the-shelf to use.\n    See [tensorpack/benchmarks](https://github.com/tensorpack/benchmarks) for more benchmarks.\n\n2. Squeeze the best data loading performance of Python with [`tensorpack.dataflow`](https://github.com/tensorpack/dataflow).\n  + Symbolic programming (e.g. `tf.data`) [does not](https://tensorpack.readthedocs.io/tutorial/philosophy/dataflow.html#alternative-data-loading-solutions)\n    offer the data processing flexibility needed in research.\n    Tensorpack squeezes the most performance out of __pure Python__ with various autoparallelization strategies.\n\n3. Focus on reproducible and flexible research:\n  + Built and used by researchers, we provide high-quality [reproducible implementation of papers](https://github.com/tensorpack/tensorpack#examples).\n\n4. It's not a model wrapper.\n  + There are too many symbolic function wrappers already. Tensorpack includes only a few common layers.\n    You can use any TF symbolic functions inside Tensorpack, including tf.layers/Keras/slim/tflearn/tensorlayer/....\n\nSee [tutorials and documentations](http://tensorpack.readthedocs.io/tutorial/index.html#user-tutorials) to know more about these features.\n\n## Examples:\n\nWe refuse toy examples.\nInstead of showing tiny CNNs trained on MNIST/Cifar10,\nwe provide training scripts that reproduce well-known papers.\n\nWe refuse low-quality implementations.\nUnlike most open source repos which only __implement__ papers,\n[Tensorpack examples](examples) faithfully __reproduce__ papers,\ndemonstrating its __flexibility__ for actual research.\n\n### Vision:\n+ [Train ResNet](examples/ResNet) and [other models](examples/ImageNetModels) on ImageNet\n+ [Train Mask/Faster R-CNN on COCO object detection](examples/FasterRCNN)\n+ [Unsupervised learning with Momentum Contrast](https://github.com/ppwwyyxx/moco.tensorflow) (MoCo)\n+ [Adversarial training with state-of-the-art robustness](https://github.com/facebookresearch/ImageNet-Adversarial-Training)\n+ [Generative Adversarial Network(GAN) variants](examples/GAN), including DCGAN, InfoGAN, Conditional GAN, WGAN, BEGAN, DiscoGAN, Image to Image, CycleGAN\n+ [DoReFa-Net: train binary / low-bitwidth CNN on ImageNet](examples/DoReFa-Net)\n+ [Fully-convolutional Network for Holistically-Nested Edge Detection(HED)](examples/HED)\n+ [Spatial Transformer Networks on MNIST addition](examples/SpatialTransformer)\n+ [Visualize CNN saliency maps](examples/Saliency)\n\n### Reinforcement Learning:\n+ [Deep Q-Network(DQN) variants on Atari games](examples/DeepQNetwork), including DQN, DoubleDQN, DuelingDQN.\n+ [Asynchronous Advantage Actor-Critic(A3C) with demos on OpenAI Gym](examples/A3C-Gym)\n\n### Speech / NLP:\n+ [LSTM-CTC for speech recognition](examples/CTC-TIMIT)\n+ [char-rnn for fun](examples/Char-RNN)\n+ [LSTM language model on PennTreebank](examples/PennTreebank)\n\n## Install:\n\nDependencies:\n\n+ Python 3.3+.\n+ Python bindings for OpenCV. (Optional, but required by a lot of features)\n+ TensorFlow ≥ 1.5\n  * TF is not not required if you only want to use `tensorpack.dataflow` alone as a data processing library\n  * When using TF2, tensorpack uses its TF1 compatibility mode. Note that a few examples in the repo are not yet migrated to support TF2.\n```\npip install --upgrade git+https://github.com/tensorpack/tensorpack.git\n# or add `--user` to install to user's local directories\n```\n\nPlease note that tensorpack is not yet stable.\nIf you use tensorpack in your code, remember to mark the exact version of tensorpack you use as your dependencies.\n\n## Citing Tensorpack:\n\nIf you use Tensorpack in your research or wish to refer to the examples, please cite with:\n```\n@misc{wu2016tensorpack,\n  title={Tensorpack},\n  author={Wu, Yuxin and others},\n  howpublished={\\url{https://github.com/tensorpack/}},\n  year={2016}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF18:3FA0D:172725:5C57B6:6AB92169"},"text_sha256":"770c0fa8d7886cb24360eac7f95929319c0b7cd0d33e3460f4186a7b8a9d4d4b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ufoym/deepo","input_row":{"repository":"ufoym/deepo","url":"https://github.com/ufoym/deepo","name":"deepo","owner":"ufoym","description":"Setup and customize deep learning environment in seconds.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6278,"issues":125,"created_at":"2017-10-27T11:41:49Z","updated_at":"2026-09-27T11:23:51Z","first_commit_at":"2017-10-27T11:41:38Z","last_commit_at":"2026-03-25T15:09:19Z","activity_months":100.89,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:09.210Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ufoym/deepo","visibility":"public","created_at":"2017-10-27T11:41:49Z","updated_at":"2026-09-27T11:23:51Z","private":false,"fork":false,"archived":false,"stargazers_count":6278,"open_issues_count":1,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3148","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17DA9F2:1BFA678:6AB92925"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3147","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:17A5AB8:1BC5880:6AB92925"},"commit":{"sha":"9c220b1839a0c2a0a7301ac8acbcdf6f698cf458","url":"https://github.com/ufoym/deepo/commit/9c220b1839a0c2a0a7301ac8acbcdf6f698cf458","date":"2018-05-22T01:22:37Z","author_date":"2018-05-22T01:22:37Z","committer_date":"2018-05-22T01:22:37Z","tree_sha":"3d403e9bf7a0cf097ee2bf0a68c48dfa98d63963","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3146","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:17F8D6D:1C191BB:6AB92925"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14190,"blob_sha":"b546dc74581d57cabadddf135971765c200bef18","priority":0}],"documents":[{"path":"README.md","size":14190,"blob_sha":"b546dc74581d57cabadddf135971765c200bef18","priority":0,"status":200,"text":"![deepo](https://user-images.githubusercontent.com/2270240/32102393-aecf573c-bb4e-11e7-811c-dc673cae7b9c.png)\n\n[![CircleCI](https://img.shields.io/circleci/project/github/ufoym/deepo.svg)](https://circleci.com/gh/ufoym/deepo)\n[![docker](https://img.shields.io/docker/pulls/ufoym/deepo.svg)](https://hub.docker.com/r/ufoym/deepo)\n![license](https://img.shields.io/github/license/ufoym/deepo.svg)\n\n\n***Deepo*** is a series of [*Docker*](http://www.docker.com/) images that\n- allows you to quickly set up your deep learning research environment\n- supports almost all [commonly used deep learning frameworks](#tags)\n- supports [GPU acceleration](#GPU) (CUDA and cuDNN included), also works in [CPU-only mode](#CPU)\n- works on Linux ([CPU version](#CPU)/[GPU version](#GPU)), Windows ([CPU version](#CPU)) and OS X ([CPU version](#CPU))\n\nand their Dockerfile generator that\n- allows you to [customize your own environment](#Build) with Lego-like modules\n- automatically resolves the dependencies for you\n\n---\n\n# Table of contents\n- [Quick Start](#Quick-Start)\n  - [GPU Version](#GPU)\n    - [Installation](#Installation)\n    - [Usage](#Usage)\n  - [CPU Version](#CPU)\n    - [Installation](#Installation-cpu)\n    - [Usage](#Usage-cpu)\n- [Customization](#Customization)\n  - [Unhappy with all-in-one solution?](#One)\n  - [Other python versions](#Python)\n  - [Jupyter support](#Jupyter)\n  - [Build your own customized image](#Build)\n- [Comparison to Alternatives](#Comparison)\n- [Available Tags](#tags)\n- [Contributing](#Contributing)\n- [Licensing](#Licensing)\n\n---\n\n<a name=\"Quick-Start\"/>\n\n# Quick Start\n\n\n<a name=\"GPU\"/>\n\n## GPU Version\n\n<a name=\"Installation\"/>\n\n### Installation\n\n#### Step 1. Install [Docker](https://docs.docker.com/engine/installation/) and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker).\n\n#### Step 2. Obtain the all-in-one image from [Docker Hub](https://hub.docker.com/r/ufoym/deepo)\n\n```bash\ndocker pull ufoym/deepo\n```\n\n<a name=\"Usage\"/>\n\n### Usage\n\nNow you can try this command:\n```bash\nnvidia-docker run --rm ufoym/deepo nvidia-smi\n```\nThis should work and enables Deepo to use the GPU from inside a docker container.\nIf this does not work, search [the issues section on the nvidia-docker GitHub](https://github.com/NVIDIA/nvidia-docker/issues) -- many solutions are already documented. To get an interactive shell to a container that will not be automatically deleted after you exit do\n\n```bash\nnvidia-docker run -it ufoym/deepo bash\n```\n\nIf you want to share your data and configurations between the host (your machine or VM) and the container in which you are using Deepo, use the -v option, e.g.\n```bash\nnvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo bash\n```\nThis will make `/host/data` from the host visible as `/data` in the container, and `/host/config` as `/config`. Such isolation reduces the chances of your containerized experiments overwriting or using wrong data.\n\nPlease note that some frameworks (e.g. PyTorch) use shared memory to share data between processes, so if multiprocessing is used the default shared memory segment size that container runs with is not enough, and you should increase shared memory size either with `--ipc=host` or `--shm-size` command line options to `nvidia-docker run`.\n```bash\nnvidia-docker run -it --ipc=host ufoym/deepo bash\n```\n\n\n<a name=\"CPU\"/>\n\n## CPU Version\n\n<a name=\"Installation-cpu\"/>\n\n### Installation\n\n#### Step 1. Install [Docker](https://docs.docker.com/engine/installation/).\n\n#### Step 2. Obtain the all-in-one image from [Docker Hub](https://hub.docker.com/r/ufoym/deepo)\n\n```bash\ndocker pull ufoym/deepo:cpu\n```\n\n<a name=\"Usage-cpu\"/>\n\n### Usage\n\nNow you can try this command:\n```bash\ndocker run -it ufoym/deepo:cpu bash\n```\n\nIf you want to share your data and configurations between the host (your machine or VM) and the container in which you are using Deepo, use the -v option, e.g.\n```bash\ndocker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo:cpu bash\n```\nThis will make `/host/data` from the host visible as `/data` in the container, and `/host/config` as `/config`. Such isolation reduces the chances of your containerized experiments overwriting or using wrong data.\n\nPlease note that some frameworks (e.g. PyTorch) use shared memory to share data between processes, so if multiprocessing is used the default shared memory segment size that container runs with is not enough, and you should increase shared memory size either with `--ipc=host` or `--shm-size` command line options to `docker run`.\n```bash\ndocker run -it --ipc=host ufoym/deepo:cpu bash\n```\n\n\n_You are now ready to begin your journey._\n\n\n```$ python```\n```python\n>>> import tensorflow\n>>> import sonnet\n>>> import torch\n>>> import keras\n>>> import mxnet\n>>> import cntk\n>>> import chainer\n>>> import theano\n>>> import lasagne\n>>> import caffe\n>>> import caffe2\n```\n\n```$ caffe --version```\n```\ncaffe version 1.0.0\n```\n\n```$ th```\n```\n │  ______             __   |  Torch7\n │ /_  __/__  ________/ /   |  Scientific computing for Lua.\n │  / / / _ \\/ __/ __/ _ \\  |  Type ? for help\n │ /_/  \\___/_/  \\__/_//_/  |  https://github.com/torch\n │                          |  http://torch.ch\n │\n │th>\n```\n\n\n<a name=\"Customization\"/>\n\n# Customization\n\nNote that `docker pull ufoym/deepo` mentioned in [Quick Start](#Quick-Start) will give you a standard image containing all available deep learning frameworks. You can customize your own environment as well.\n\n<a name=\"One\"/>\n\n## Unhappy with all-in-one solution?\n\nIf you prefer a specific framework rather than an all-in-one image, just append a tag with the name of the framework.\nTake tensorflow for example:\n```bash\ndocker pull ufoym/deepo:tensorflow\n```\n\n<a name=\"Python\"/>\n\n## Other python versions\n\nNote that all python-related images use `Python 3.6` by default. If you are unhappy with `Python 3.6`, you can also specify other python versions:\n```bash\ndocker pull ufoym/deepo:py27\n```\n\n```bash\ndocker pull ufoym/deepo:tensorflow-py27\n```\n\nCurrently, we support `Python 2.7` and `Python 3.6`.\n\nSee [Available Tags](#tags) for a complete list of all available tags. These pre-built images are all built from `docker/Dockerfile.*` and `circle.yml`. See [How to generate `docker/Dockerfile.*` and `circle.yml`](https://github.com/ufoym/deepo/tree/master/scripts) if you are interested in how these files are generated.\n\n<a name=\"Jupyter\"/>\n\n## Jupyter support\n\n#### Step 1. pull the image with jupyter support\n\n```bash\ndocker pull ufoym/deepo:all-py36-jupyter\n```\n\nNote that the tag could be either of `all-py36-jupyter`, `py36-jupyter`, `all-py27-jupyter`, or `py27-jupyter`.\n\n#### Step 2. run the image\n```bash\nnvidia-docker run -it -p 8888:8888 --ipc=host ufoym/deepo:all-jupyter-py36 jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'\n```\n\n\n<a name=\"Build\"/>\n\n## Build your own customized image with Lego-like modules\n\n#### Step 1. prepare generator\n\n```bash\ngit clone https://github.com/ufoym/deepo.git\ncd deepo/generator\npip install -r requirements.txt\n```\n\n#### Step 2. generate your customized Dockerfile\n\nFor example, if you like `pytorch` and `lasagne`, then\n```bash\npython generate.py Dockerfile pytorch lasagne\n```\n\nThis should generate a Dockerfile that contains everything for building `pytorch` and `lasagne`. Note that the generator can handle automatic dependency processing and topologically sort the lists. So you don't need to worry about missing dependencies and the list order.\n\nYou can also specify the version of Python:\n```bash\npython generate.py Dockerfile pytorch lasagne python==3.6\n```\n\n#### Step 3. build your Dockerfile\n\n```bash\ndocker build -t my/deepo .\n```\n\nThis may take several minutes as it compiles a few libraries from scratch.\n\n\n<a name=\"Comparison\"/>\n\n# Comparison to alternatives\n.                                                  | modern-deep-learning | dl-docker          | jupyter-deeplearning | Deepo\n:------------------------------------------------: | :------------------: | :----------------: | :------------------: | :----------------:\n [ubuntu](https://www.ubuntu.com)                  | 16.04                | 14.04              | 14.04                | 16.04\n [cuda](https://developer.nvidia.com/cuda-zone)    | :x:                  | 8.0                | 6.5-8.0              | 8.0/9.0/None\n [cudnn](https://developer.nvidia.com/cudnn)       | :x:                  | v5                 | v2-5                 | v7\n [theano](http://deeplearning.net/software/theano) | :x:                  | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n [tensorflow](http://www.tensorflow.org)           | :heavy_check_mark:   | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n [sonnet](https://github.com/deepmind/sonnet)      | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [pytorch](http://pytorch.org)                     | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [keras](https://keras.io)                         | :heavy_check_mark:   | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n [lasagne](http://lasagne.readthedocs.io)          | :x:                  | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n [mxnet](http://mxnet.incubator.apache.org)        | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [cntk](http://cntk.ai)                            | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [chainer](https://chainer.org)                    | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [caffe](http://caffe.berkeleyvision.org)          | :heavy_check_mark:   | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n [caffe2](https://caffe2.ai)                        | :x:                  | :x:                | :x:                  | :heavy_check_mark:\n [torch](http://torch.ch/)                         | :x:                  | :heavy_check_mark: | :heavy_check_mark:   | :heavy_check_mark:\n\n\n\n---\n\n<a name=\"tags\"/>\n\n# Available Tags\n\n\n.                                                  | CUDA 9.0 / Python 3.6                                    | CUDA 9.0 / Python 2.7                    | CPU-only / Python 3.6                       | CPU-only / Python 2.7\n:------------------------------------------------: | :------------------------------------------------------: | :--------------------------------:       | :-----------------------------------------: | :----------------------------------------:\n all-in-one                                        | `latest` `all` `all-py36` `py36-cu90` `all-py36-cu90`    | `all-py27-cu90` `all-py27` `py27`        | `all-py36-cpu` `all-cpu` `py36-cpu` `cpu`   | `all-py27-cpu` `py27-cpu`\n all-in-one with jupyter                           | `all-jupyter-py36-cu90` `all-jupyter-py36` `all-jupyter` | `all-py27-jupyter` `py27-jupyter`        | `all-py36-jupyter-cpu` `py36-jupyter-cpu`   | `all-py27-jupyter-cpu` `py27-jupyter-cpu`\n [theano](http://deeplearning.net/software/theano) | `theano-py36-cu90` `theano-py36` `theano`                | `theano-py27-cu90` `theano-py27`         | `theano-py36-cpu` `theano-cpu`              | `theano-py27-cpu`\n [tensorflow](http://www.tensorflow.org)           | `tensorflow-py36-cu90` `tensorflow-py36` `tensorflow`    | `tensorflow-py27-cu90` `tensorflow-py27` | `tensorflow-py36-cpu` `tensorflow-cpu`      | `tensorflow-py27-cpu`\n [sonnet](https://github.com/deepmind/sonnet)      | `sonnet-py36-cu90` `sonnet-py36` `sonnet`                | `sonnet-py27-cu90` `sonnet-py27`         | `sonnet-py36-cpu` `sonnet-cpu`              | `sonnet-py27-cpu`\n [pytorch](http://pytorch.org)                     | `pytorch-py36-cu90` `pytorch-py36` `pytorch`             | `pytorch-py27-cu90` `pytorch-py27`       | `pytorch-py36` `pytorch`                    | `pytorch-py27`\n [keras](https://keras.io)                         | `keras-py36-cu90` `keras-py36` `keras`                   | `keras-py27-cu90` `keras-py27`           | `keras-py36-cpu` `keras-cpu`                | `keras-py27-cpu`\n [lasagne](http://lasagne.readthedocs.io)          | `lasagne-py36-cu90` `lasagne-py36` `lasagne`             | `lasagne-py27-cu90` `lasagne-py27`       | `lasagne-py36-cpu` `lasagne-cpu`            | `lasagne-py27-cpu`\n [mxnet](http://mxnet.incubator.apache.org)        | `mxnet-py36-cu90` `mxnet-py36` `mxnet`                   | `mxnet-py27-cu90` `mxnet-py27`           | `mxnet-py36-cpu` `mxnet-cpu`                | `mxnet-py27-cpu`\n [cntk](http://cntk.ai)                            | `cntk-py36-cu90` `cntk-py36` `cntk`                      | `cntk-py27-cu90` `cntk-py27`             | `cntk-py36-cpu` `cntk-cpu`                  | `cntk-py27-cpu`\n [chainer](https://chainer.org)                    | `chainer-py36-cu90` `chainer-py36` `chainer`             | `chainer-py27-cu90` `chainer-py27`       | `chainer-py36-cpu` `chainer-cpu`            | `chainer-py27-cpu`\n [caffe](http://caffe.berkeleyvision.org)          | `caffe-py36-cu90` `caffe-py36` `caffe`                   | `caffe-py27-cu90` `caffe-py27`           | `caffe-py36-cpu` `caffe-cpu`                | `caffe-py27-cpu`\n [caffe2](https://caffe2.ai)                       | `caffe2-py36-cu90` `caffe2-py36` `caffe2`                | `caffe2-py27-cu90` `caffe2-py27`         | `caffe2-py36-cpu` `caffe2-cpu`              | `caffe2-py27-cpu`\n [torch](http://torch.ch/)                         | `torch-cu90` `torch`                                     | `torch-cu90` `torch`                     | `torch-cpu`                                 | `torch-cpu`\n\n---\n\n\n\n<a name=\"Contributing\"/>\n\n# Contributing\n\nWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.\n\n<a name=\"Licensing\"/>\n\n# Licensing\n\nDeepo is [MIT licensed](https://github.com/ufoym/deepo/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A3C6:3C4A0:175C78:5C8DAA:6AB9216D"},"text_sha256":"f8478020e3314778d1a34066e6c0c1e663f8853ee32136eeab8e7470ff0e863b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3145","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:1796BFA:1BB6D2A:6AB92926"},"commit":{"sha":"eeb36f9c32860cc782fae53911272db650ed700c","url":"https://github.com/ufoym/deepo/commit/eeb36f9c32860cc782fae53911272db650ed700c","date":"2026-03-25T15:09:19Z","author_date":"2026-03-25T15:09:19Z","committer_date":"2026-03-25T15:09:19Z","tree_sha":"49dc7f651a45384bbd825e4c03f6013487a8720f","message_first_line":"docs: polish README for clarity, consistency, and conciseness"},"tree_request_status":200,"tree_rate":{"github_remaining":"3144","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DF:76AED:17DF947:1BFFE3D:6AB92927"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16837,"blob_sha":"00fdb6207e9d0d3f582f30c957985e10e4ea2264","priority":0}],"documents":[{"path":"README.md","size":16837,"blob_sha":"00fdb6207e9d0d3f582f30c957985e10e4ea2264","priority":0,"status":200,"text":"![deepo](https://user-images.githubusercontent.com/2270240/32102393-aecf573c-bb4e-11e7-811c-dc673cae7b9c.png)\n\n![workflows](https://github.com/ufoym/deepo/workflows/deepo%20CI/badge.svg)\n[![docker](https://img.shields.io/docker/pulls/ufoym/deepo.svg)](https://hub.docker.com/r/ufoym/deepo)\n![license](https://img.shields.io/github/license/ufoym/deepo.svg)\n\n\n---\n\n***Deepo*** is an open framework for painlessly assembling specialized [*Docker*](http://www.docker.com/) images for deep learning research. It provides a \"Lego set\" of dozens of standard components for preparing deep learning tools, along with a framework for composing them into custom Docker images.\n\nAt the core of Deepo is a Dockerfile generator that\n- lets you [customize your deep learning environment](#Build) with Lego-like modules\n  - describe your environment in a single command line\n  - Deepo generates Dockerfiles following best practices\n  - and handles all the configuration for you\n- automatically resolves dependencies\n  - Deepo knows which combinations of CUDA, cuDNN, Python, PyTorch, TensorFlow, etc. are compatible\n  - picks the right versions on your behalf\n  - and determines the correct installation order via [topological sorting](https://en.wikipedia.org/wiki/Topological_sorting)\n\nWe also provide a series of pre-built Docker images that\n- let you instantly set up common deep learning research environments\n- support widely used [deep learning frameworks](#Available-tags)\n- support [GPU acceleration](#GPU) (CUDA and cuDNN included) and also work in [CPU-only mode](#CPU)\n- run on Linux ([CPU](#CPU)/[GPU](#GPU)), Windows ([CPU](#CPU)), and macOS ([CPU](#CPU))\n\n---\n\n# Table of contents\n- [Quick Start](#Quick-Start)\n  - [GPU Version](#GPU)\n    - [Installation](#Installation)\n    - [Usage](#Usage)\n  - [CPU Version](#CPU)\n    - [Installation](#Installation-cpu)\n    - [Usage](#Usage-cpu)\n- [Customization](#Customization)\n  - [Unhappy with all-in-one solution?](#One)\n  - [Jupyter support](#Jupyter)\n  - [Build your own customized image](#Build)\n- [Comparison to Alternatives](#Comparison)\n- [Tags](#Tags)\n  - [Available Tags](#Available-tags)\n  - [Deprecated Tags](#Deprecated-tags)\n- [Citation](#Citation)\n- [Contributing](#Contributing)\n- [Licensing](#Licensing)\n\n---\n\n<a name=\"Quick-Start\"/>\n\n# Quick Start\n\n\n<a name=\"GPU\"/>\n\n## GPU Version\n\n<a name=\"Installation\"/>\n\n### Installation\n\n#### Step 1. Install [Docker](https://docs.docker.com/engine/installation/) and [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).\n\n#### Step 2. Pull the all-in-one image from [Docker Hub](https://hub.docker.com/r/ufoym/deepo)\n\n```bash\ndocker pull ufoym/deepo\n```\n\n<a name=\"Usage\"/>\n\n### Usage\n\nVerify that GPU access works inside a container:\n```bash\ndocker run --gpus all --rm ufoym/deepo nvidia-smi\n```\nIf this does not work, check [the issues section of the NVIDIA Container Toolkit GitHub](https://github.com/NVIDIA/nvidia-container-toolkit/issues) — many solutions are already documented. To launch an interactive shell in a persistent container:\n\n```bash\ndocker run --gpus all -it ufoym/deepo bash\n```\n\nTo share data and configuration between the host (your machine or VM) and the container, use the `-v` option:\n```bash\ndocker run --gpus all -it -v /host/data:/data -v /host/config:/config ufoym/deepo bash\n```\nThis makes `/host/data` on the host visible as `/data` inside the container, and `/host/config` as `/config`. This isolation helps prevent containerized experiments from accidentally overwriting or reading the wrong data.\n\nNote that some frameworks (e.g., PyTorch) use shared memory for inter-process communication. If you use multiprocessing, the container's default shared memory size may be insufficient. Increase it with `--ipc=host` or `--shm-size`:\n```bash\ndocker run --gpus all -it --ipc=host ufoym/deepo bash\n```\n\n\n<a name=\"CPU\"/>\n\n## CPU Version\n\n<a name=\"Installation-cpu\"/>\n\n### Installation\n\n#### Step 1. Install [Docker](https://docs.docker.com/engine/installation/).\n\n#### Step 2. Pull the all-in-one image from [Docker Hub](https://hub.docker.com/r/ufoym/deepo)\n\n```bash\ndocker pull ufoym/deepo:cpu\n```\n\n<a name=\"Usage-cpu\"/>\n\n### Usage\n\nLaunch an interactive shell:\n```bash\ndocker run -it ufoym/deepo:cpu bash\n```\n\nTo share data and configuration between the host (your machine or VM) and the container, use the `-v` option:\n```bash\ndocker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo:cpu bash\n```\nThis makes `/host/data` on the host visible as `/data` inside the container, and `/host/config` as `/config`. This isolation helps prevent containerized experiments from accidentally overwriting or reading the wrong data.\n\nNote that some frameworks (e.g., PyTorch) use shared memory for inter-process communication. If you use multiprocessing, the container's default shared memory size may be insufficient. Increase it with `--ipc=host` or `--shm-size`:\n```bash\ndocker run -it --ipc=host ufoym/deepo:cpu bash\n```\n\n\n_You are now ready to begin your journey._\n\n\n```\n$ python\n```\n```python\n>>> import tensorflow\n>>> import torch\n>>> import keras\n>>> import mxnet\n>>> import chainer\n>>> import paddle\n```\n\n```\n$ darknet\n```\n```\nusage: darknet <function>\n```\n\n<a name=\"Customization\"/>\n\n# Customization\n\nThe `docker pull ufoym/deepo` command from [Quick Start](#Quick-Start) gives you a standard image containing every available deep learning framework. You can also customize your own environment.\n\n<a name=\"One\"/>\n\n## Unhappy with all-in-one solution?\n\nIf you prefer a single framework instead of the all-in-one image, simply append a tag with the framework name.\nFor example, to pull TensorFlow only:\n```bash\ndocker pull ufoym/deepo:tensorflow\n```\n\n<a name=\"Jupyter\"/>\n\n## Jupyter Support\n\n#### Step 1. Pull the all-in-one image\n\n```bash\ndocker pull ufoym/deepo\n```\n\n#### Step 2. Run the image\n```bash\ndocker run --gpus all -it -p 8888:8888 -v /home/u:/root --ipc=host ufoym/deepo jupyter lab --no-browser --ip=0.0.0.0 --allow-root --LabApp.allow_origin='*' --LabApp.root_dir='/root'\n```\n\n\n<a name=\"Build\"/>\n\n## Build Your Own Customized Image with Lego-like Modules\n\n#### Step 1. Set up the generator\n\n```bash\ngit clone https://github.com/ufoym/deepo.git\ncd deepo/generator\n```\n\n#### Step 2. Generate a customized Dockerfile\n\nFor example, to create an image with `pytorch` and `keras`:\n```bash\npython generate.py Dockerfile pytorch keras\n```\nOr with CUDA 11.3 and cuDNN 8:\n```bash\npython generate.py Dockerfile pytorch keras --cuda-ver 11.3.1 --cudnn-ver 8\n```\n\nThis generates a Dockerfile with everything needed to build `pytorch` and `keras`. The generator automatically resolves dependencies and topologically sorts them, so you don't need to worry about missing packages or ordering.\n\nYou can also specify the Python version:\n```bash\npython generate.py Dockerfile pytorch keras python==3.8\n```\n\n#### Step 3. Build the Dockerfile\n\n```bash\ndocker build -t my/deepo .\n```\n\nThis may take several minutes, as some libraries are compiled from source.\n\n\n<a name=\"Comparison\"/>\n\n# Comparison to Alternatives\n\n\n.                                                  | modern-deep-learning | dl-docker          | jupyter-deeplearning | Deepo\n:------------------------------------------------: | :------------------: | :----------------: | :------------------: | :----------------:\n [ubuntu](https://www.ubuntu.com)                  | 16.04                | 14.04              | 14.04                | 20.04\n [cuda](https://developer.nvidia.com/cuda-zone)    | X                    | 8.0                | 6.5-8.0              | 11.3/None\n [cudnn](https://developer.nvidia.com/cudnn)       | X                    | v5                 | v2-5                 | v8\n [onnx](https://onnx.ai)                           | X                    | X                  | X                    | O\n [tensorflow](http://www.tensorflow.org)            | O                    | O                  | O                    | O\n [pytorch](http://pytorch.org)                      | X                    | X                  | X                    | O\n [keras](https://keras.io)                          | O                    | O                  | O                    | O\n [mxnet](http://mxnet.incubator.apache.org)         | X                    | X                  | X                    | O\n [chainer](https://chainer.org)                     | X                    | X                  | X                    | O\n [darknet](https://pjreddie.com/darknet/)           | X                    | X                  | X                    | O\n [paddlepaddle](https://www.paddlepaddle.org.cn/)   | X                    | X                  | X                    | O\n\n\n\n<a name=\"Tags\"/>\n\n# Tags\n\n\n<a name=\"Available-tags\"/>\n\n## Available Tags\n\n\n.                                                  | CUDA 11.3 / Python 3.8                                    | CPU-only / Python 3.8\n:------------------------------------------------: | :-------------------------------------------------------: | :-----------------------------------------:\n all-in-one                                        | `latest` `all` `all-py38` `py38-cu113` `all-py38-cu113`   | `all-py38-cpu` `all-cpu` `py38-cpu` `cpu`\n [TensorFlow](http://www.tensorflow.org)           | `tensorflow-py38-cu113` `tensorflow-py38` `tensorflow`    | `tensorflow-py38-cpu` `tensorflow-cpu`\n [PyTorch](http://pytorch.org)                     | `pytorch-py38-cu113` `pytorch-py38` `pytorch`             | `pytorch-py38-cpu` `pytorch-cpu`\n [Keras](https://keras.io)                         | `keras-py38-cu113` `keras-py38` `keras`                   | `keras-py38-cpu` `keras-cpu`\n [MXNet](http://mxnet.incubator.apache.org)        | `mxnet-py38-cu113` `mxnet-py38` `mxnet`                   | `mxnet-py38-cpu` `mxnet-cpu`\n [Chainer](https://chainer.org)                    | `chainer-py38-cu113` `chainer-py38` `chainer`             | `chainer-py38-cpu` `chainer-cpu`\n [Darknet](https://pjreddie.com/darknet/)          | `darknet-cu113` `darknet`                                 | `darknet-cpu`\n [PaddlePaddle](https://www.paddlepaddle.org.cn/)  | `paddle-cu113` `paddle`                                   | `paddle-cpu`\n\n\n<a name=\"Deprecated-tags\"/>\n\n## Deprecated Tags\n\n.                                                  | CUDA 11.3 / Python 3.6         | CUDA 11.1 / Python 3.6         | CUDA 10.1 / Python 3.6         | CUDA 10.0 / Python 3.6         | CUDA 9.0 / Python 3.6                        | CUDA 9.0 / Python 2.7                    | CPU-only / Python 3.6                       | CPU-only / Python 2.7\n:------------------------------------------------: | :----------------------------: | :----------------------------: | :----------------------------: | :----------------------------: | :------------------------------------------: | :--------------------------------:       | :-----------------------------------------: | :----------------------------------------:\n all-in-one                                        | `py36-cu113` `all-py36-cu113`  | `py36-cu111` `all-py36-cu111`  | `py36-cu101` `all-py36-cu101`  | `py36-cu100` `all-py36-cu100`  | `py36-cu90` `all-py36-cu90`                  | `all-py27-cu90` `all-py27` `py27-cu90`   |                                             | `all-py27-cpu` `py27-cpu`\n all-in-one with jupyter                           |                                |                                |                                |                                | `all-jupyter-py36-cu90`                      | `all-py27-jupyter` `py27-jupyter`        |                                             | `all-py27-jupyter-cpu` `py27-jupyter-cpu`\n [Theano](http://deeplearning.net/software/theano) | `theano-py36-cu113`            | `theano-py36-cu111`            | `theano-py36-cu101`            | `theano-py36-cu100`            | `theano-py36-cu90`                           | `theano-py27-cu90` `theano-py27`         |                                             | `theano-py27-cpu`\n [TensorFlow](http://www.tensorflow.org)           | `tensorflow-py36-cu113`        | `tensorflow-py36-cu111`        | `tensorflow-py36-cu101`        | `tensorflow-py36-cu100`        | `tensorflow-py36-cu90`                       | `tensorflow-py27-cu90` `tensorflow-py27` |                                             | `tensorflow-py27-cpu`\n [Sonnet](https://github.com/deepmind/sonnet)      | `sonnet-py36-cu113`            | `sonnet-py36-cu111`            | `sonnet-py36-cu101`            | `sonnet-py36-cu100`            | `sonnet-py36-cu90`                           | `sonnet-py27-cu90` `sonnet-py27`         |                                             | `sonnet-py27-cpu`\n [PyTorch](http://pytorch.org)                     | `pytorch-py36-cu113`           | `pytorch-py36-cu111`           | `pytorch-py36-cu101`           | `pytorch-py36-cu100`           | `pytorch-py36-cu90`                          | `pytorch-py27-cu90` `pytorch-py27`       |                                             | `pytorch-py27-cpu`\n [Keras](https://keras.io)                         | `keras-py36-cu113`             | `keras-py36-cu111`             | `keras-py36-cu101`             | `keras-py36-cu100`             | `keras-py36-cu90`                            | `keras-py27-cu90` `keras-py27`           |                                             | `keras-py27-cpu`\n [Lasagne](http://lasagne.readthedocs.io)          | `lasagne-py36-cu113`           | `lasagne-py36-cu111`           | `lasagne-py36-cu101`           | `lasagne-py36-cu100`           | `lasagne-py36-cu90`                          | `lasagne-py27-cu90` `lasagne-py27`       |                                             | `lasagne-py27-cpu`\n [MXNet](http://mxnet.incubator.apache.org)        | `mxnet-py36-cu113`             | `mxnet-py36-cu111`             | `mxnet-py36-cu101`             | `mxnet-py36-cu100`             | `mxnet-py36-cu90`                            | `mxnet-py27-cu90` `mxnet-py27`           |                                             | `mxnet-py27-cpu`\n [CNTK](http://cntk.ai)                            | `cntk-py36-cu113`              | `cntk-py36-cu111`              | `cntk-py36-cu101`              | `cntk-py36-cu100`              | `cntk-py36-cu90`                             | `cntk-py27-cu90` `cntk-py27`             |                                             | `cntk-py27-cpu`\n [Chainer](https://chainer.org)                    | `chainer-py36-cu113`           | `chainer-py36-cu111`           | `chainer-py36-cu101`           | `chainer-py36-cu100`           | `chainer-py36-cu90`                          | `chainer-py27-cu90` `chainer-py27`       |                                             | `chainer-py27-cpu`\n [Caffe](http://caffe.berkeleyvision.org)          | `caffe-py36-cu113`             | `caffe-py36-cu111`             | `caffe-py36-cu101`             | `caffe-py36-cu100`             | `caffe-py36-cu90`                            | `caffe-py27-cu90` `caffe-py27`           |                                             | `caffe-py27-cpu`\n [Caffe2](https://caffe2.ai)                       |                                |                                |                                |                                | `caffe2-py36-cu90` `caffe2-py36` `caffe2`    | `caffe2-py27-cu90` `caffe2-py27`         | `caffe2-py36-cpu` `caffe2-cpu`              | `caffe2-py27-cpu`\n [Torch](http://torch.ch/)                         | `torch-cu113`                  | `torch-cu111`                  | `torch-cu101`                  | `torch-cu100`                  | `torch-cu90`                                 | `torch-cu90` `torch`                     |                                             | `torch-cpu`\n [Darknet](https://pjreddie.com/darknet/)          | `darknet-cu113`                | `darknet-cu111`                | `darknet-cu101`                | `darknet-cu100`                | `darknet-cu90`                               | `darknet-cu90` `darknet`                 |                                             | `darknet-cpu`\n\n\n<a name=\"Citation\"/>\n\n# Citation\n```\n@misc{ming2017deepo,\n    author = {Ming Yang},\n    title = {Deepo: Set up a deep learning environment with a single command line.},\n    year = {2017},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/ufoym/deepo}}\n}\n```\n<a name=\"Contributing\"/>\n\n# Contributing\n\nWe appreciate all contributions. If you are planning to contribute bug fixes, please go ahead and open a pull request directly. If you plan to contribute new features, utility functions, or extensions, please open an issue first to discuss your idea with us.\n\n<a name=\"Licensing\"/>\n\n# Licensing\n\nDeepo is [MIT licensed](https://github.com/ufoym/deepo/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F90:3B6DE:16F0C3:5C2139:6AB9216F"},"text_sha256":"89e9026b9c96c5adf23246d0a4fb1024d5a4ad04563404ebbaeb63d01fbb03b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"szad670401/HyperLPR","input_row":{"repository":"szad670401/HyperLPR","url":"https://github.com/szad670401/HyperLPR","name":"HyperLPR","owner":"szad670401","description":"High Performance Chinese License Plate Recognition Framework.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6270,"issues":350,"created_at":"2017-09-24T05:44:38Z","updated_at":"2026-09-26T13:57:36Z","first_commit_at":"2017-09-24T05:44:56Z","last_commit_at":"2024-07-27T15:16:25Z","activity_months":82.079999999999998,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:11.739Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"szad670401/HyperLPR","visibility":"public","created_at":"2017-09-24T05:44:38Z","updated_at":"2026-09-26T13:57:36Z","private":false,"fork":false,"archived":false,"stargazers_count":6270,"open_issues_count":112,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3143","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0781:1C46F8:17AF878:1BCF038:6AB92927"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3142","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:17DB1BC:1BFA18A:6AB92928"},"commit":{"sha":"ead149aa54fd5eaebbdeff336b21e324c6f4ea4e","url":"https://github.com/szad670401/HyperLPR/commit/ead149aa54fd5eaebbdeff336b21e324c6f4ea4e","date":"2018-05-22T02:59:10Z","author_date":"2018-05-22T02:59:10Z","committer_date":"2018-05-22T02:59:10Z","tree_sha":"116e32aad2b032106f3dfd4db10c62a7882a7f0b","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3141","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C1:14A1F2:17FAAEE:1C1AF21:6AB92928"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6875,"blob_sha":"73de50e59c41bc644a6fc611b18acb25930d9b5d","priority":0}],"documents":[{"path":"README.md","size":6875,"blob_sha":"73de50e59c41bc644a6fc611b18acb25930d9b5d","priority":0,"status":200,"text":"# High Accuracy Chinese Plate Recognition Framework\n\n### 介绍\nThis research aims at simply developping plate recognition project based on deep learning methods, with low complexity and high speed. This \nproject has been used by some commercial corporations. Free and open source, deploying by Zeusee. \n\n\n##### 更新热点:\n\n- 添加的新的Python 序列模型-识别率大幅提高(尤其汉字)(2018.3.12)\n- 新添加了HyperLPR Lite 只需要一个文件 160行代码即可完全整个车牌识别流程.\n- 提供精确定位的车牌矩形框(2018.3.12)\t\n\n#### 相关资源 \n\n+ [在线测试地址](http://sftera.vicp.io:8000/uploader)(已失效)。\n+ [相关技术博客](http://blog.csdn.net/relocy/article/details/78705662)(技术文章会在接下来的几个月的时间内连续更新)。\n+ [带UI界面的工程](https://pan.baidu.com/s/1cNWpK6)(感谢群内小伙伴的工作)。\n+ [端到端(多标签分类)训练代码](https://github.com/LCorleone/hyperlpr-train_e2e)(感谢群内小伙伴的工作)。\n+ [端到端(CTC)训练代码](https://github.com/armaab/hyperlpr-train)(感谢群内小伙伴工作)。\n\n### 更新\n\n+ 添加的新的Python 序列模型-识别率大幅提高(尤其汉字)(2018.3.12)\n+ 添加了HyperLPR Lite 仅仅需160 行代码即可实现车牌识别(2018.3.12)\n+ 提供精确定位的车牌矩形框(2018.3.12)\n\n\n+ 增加了端到端模型的cpp实现(Linux)(2018.1.31)\n\n\n+ 增加字符分割[训练代码和字符分割介绍](https://github.com/zeusees/HyperLPR-Training)(2018.1.)\n+ 更新了Android实现，大幅提高准确率和速度 (骁龙835 (*720*x*1280*)  ~50ms )(2017.12.27)\n+ 添加了IOS版本的实现（感谢[xiaojun123456](https://github.com/xiaojun123456)的工作）\n+ 添加端到端的序列识别模型识别率大幅度提升,使得无需分割字符即可识别,识别速度提高20% (2017.11.17)\n+ 新增的端到端模型可以识别新能源车牌、教练车牌、白色警用车牌、武警车牌 (2017.11.17)\n+ 更新Windows版本的Visual Studio 2015 工程（2017.11.15）\n+ 增加cpp版本,目前仅支持标准蓝牌(需要依赖OpenCV 3.3) (2017.10.28)\n\n### TODO\n\n+ 提供字符字符识别的训练代码\n+ 改进精定位方法\n+ C++版的端到端识别模型\n\n### 特性\n\n+ 速度快 720p ，单核 Intel 2.2G CPU (macbook Pro 2015)平均识别时间低于100ms\n+ 基于端到端的车牌识别无需进行字符分割\n+ 识别率高,仅仅针对车牌ROI在EasyPR数据集上，0-error达到 95.2%, 1-error识别率达到 97.4% (指在定位成功后的车牌识别率)\n+ 轻量 总代码量不超1k行\n\n### 模型资源说明\n\n+ cascade.xml  检测模型 - 目前效果最好的cascade检测模型\n+ cascade_lbp.xml  召回率效果较好，但其错检太多\n+ char_chi_sim.h5 Keras模型-可识别34类数字和大写英文字  使用14W样本训练 \n+ char_rec.h5 Keras模型-可识别34类数字和大写英文字  使用7W样本训练 \n+ ocr_plate_all_w_rnn_2.h5 基于CNN的序列模型\n+ ocr_plate_all_gru.h5 基于GRU的序列模型从OCR模型修改，效果目前最好但速度较慢，需要20ms。\n+ plate_type.h5 用于车牌颜色判断的模型\n+ model12.h5 左右边界回归模型\n\n\n\n### 注意事项:\n\n+ Win工程中若需要使用静态库，需单独编译\n+ 本项目的C++实现和Python实现无任何关联，都为单独实现\n+ 在编译C++工程的时候必须要使用OpenCV 3.3(DNN 库)，否则无法编译 \n\n### Python 依赖\n\n+ Keras (>2.0.0)\n+ Theano(>0.9) or Tensorflow(>1.1.x)\n+ Numpy (>1.10)\n+ Scipy (0.19.1)\n+ OpenCV(>3.0)\n+ Scikit-image (0.13.0)\n+ PIL\n\n### CPP 依赖\n\n+ Opencv 3.3\n\n### 简单使用方式\n\n推荐使用新更新的HyperLPR Lite，仅需一单独文件。\n\n```python\nimport HyperLPRLite as pr\nimport cv2\nimport numpy as np\ngrr = cv2.imread(\"images_rec/demo1.jpg\")\nmodel = pr.LPR(\"model/cascade.xml\",\"model/model12.h5\",\"model/ocr_plate_all_gru.h5\")\n\nfor pstr,confidence,rect in model.SimpleRecognizePlateByE2E(grr):\n        if confidence>0.7:\n            image = drawRectBox(grr, rect, pstr+\" \"+str(round(confidence,3)))\n            print(\"plate_str\",pstr)\n            print(\"plate_confidence\",confidence)\n\n\ncv2.imshow(\"image\",image)\ncv2.waitKey(0)\n\n```\n### Linux/Mac 编译\n\n+ 仅需要的依赖OpenCV 3.3 (需要DNN框架)\n\n```bash\ncd cpp_implementation\nmkdir build \ncd build\ncmake ../\nsudo make -j \n```\n\n### CPP demo\n\n```cpp\n#include \"../include/Pipeline.h\"\nint main(){\n    pr::PipelinePR prc(\"model/cascade.xml\",\n                      \"model/HorizonalFinemapping.prototxt\",\"model/HorizonalFinemapping.caffemodel\",\n                      \"model/Segmentation.prototxt\",\"model/Segmentation.caffemodel\",\n                      \"model/CharacterRecognization.prototxt\",\"model/CharacterRecognization.caffemodel\",\n                       \"model/SegmentationFree.prototxt\",\"model/SegmentationFree.caffemodel\"\n                    );\n  //定义模型文件\n\n    cv::Mat image = cv::imread(\"/Users/yujinke/ClionProjects/cpp_ocr_demo/test.png\");\n    std::vector<pr::PlateInfo> res = prc.RunPiplineAsImage(image,pr::SEGMENTATION_FREE_METHOD);\n  //使用端到端模型模型进行识别 识别结果将会保存在res里面\n \n    for(auto st:res) {\n        if(st.confidence>0.75) {\n            std::cout << st.getPlateName() << \" \" << st.confidence << std::endl;\n          //输出识别结果 、识别置信度\n            cv::Rect region = st.getPlateRect();\n          //获取车牌位置\n cv::rectangle(image,cv::Point(region.x,region.y),cv::Point(region.x+region.width,region.y+region.height),cv::Scalar(255,255,0),2);\n          //画出车牌位置\n          \n        }\n    }\n\n    cv::imshow(\"image\",image);\n    cv::waitKey(0);\n    return 0 ;\n}\n```\n\n### \n\n### 可识别和待支持的车牌的类型\n\n- [x] 单行蓝牌\n- [x] 单行黄牌\n- [x] 新能源车牌\n- [x] 白色警用车牌\n- [x] 使馆/港澳车牌\n- [x] 教练车牌\n- [x] 武警车牌\n- [ ] 民航车牌\n- [ ] 双层黄牌\n- [ ] 双层武警\n- [ ] 双层军牌\n- [ ] 双层农用车牌\n- [ ] 双层个性化车牌\n\n\n###### Note:由于训练的时候样本存在一些不均衡的问题,一些特殊车牌存在一定识别率低下的问题，如(使馆/港澳车牌)，会在后续的版本进行改进。\n\n\n### 测试样例\n\n![image](./demo_images/test.png)\n\n![image](./demo_images/15.jpg)\n\n#### Android示例\n\n![android](./demo_images/android.png)\n\n### 识别测试APP\n\n- 体验 Android APP：[https://fir.im/HyperLPR](https://fir.im/HyperLPR) (根据图片尺寸调整程序中的尺度，提高准确率)\n- 感谢 sundyCoder [Android 版本完善](https://github.com/sundyCoder/hyperlpr4Android) \n\n### 数据分享\n\n车牌识别框架开发时使用的数据并不是很多，有意着可以为我们提供相关车牌数据。联系邮箱 455501914@qq.com。\n\n\n#### 获取帮助\n\n+ HyperLPR讨论QQ群1:673071218, 群2: 746123554 ,加前请备注HyperLPR交流。\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDA0:3D501:17EFB8:5D213A:6AB92170"},"text_sha256":"9dad35170e02dbe01a33125077a5b2c9608438b03ea159d725591d79b5c7db0e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3140","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:1786515:1BA5380:6AB92929"},"commit":{"sha":"9307450f7b7915be18f23a539ec05b41fe6629f4","url":"https://github.com/szad670401/HyperLPR/commit/9307450f7b7915be18f23a539ec05b41fe6629f4","date":"2024-07-27T15:16:25Z","author_date":"2024-07-27T15:16:25Z","committer_date":"2024-07-27T15:16:25Z","tree_sha":"3ade178b3f887a93af84b33af77c431c862f0ac4","message_first_line":"Merge pull request #400 from hohaiuhsx/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3139","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17AF9CF:1BCF1F9:6AB92929"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10967,"blob_sha":"92774d1438866c56551410027e644b088e2f7a01","priority":0}],"documents":[{"path":"README.md","size":10967,"blob_sha":"92774d1438866c56551410027e644b088e2f7a01","priority":0,"status":200,"text":"![logo_t](./images/hyperlpr_logo.png)\n\n## HyperLPR3 - High Performance License Plate Recognition Framework.\n\n#### [![1](https://badge.fury.io/py/hyperlpr3.svg \"title\")](https://pypi.org/project/hyperlpr3/)[![1](https://img.shields.io/pypi/pyversions/hyperlpr3.svg \"title\")](https://pypi.org/manage/project/hyperlpr3/releases/)[![](https://jitpack.io/v/HyperInspire/hyperlpr3-android-sdk.svg)](https://jitpack.io/#HyperInspire/hyperlpr3-android-sdk)\n[中文文档](README_CH.md)\n\n### Demo APP Installation\n\n- Android APP：[Scan QR Code](http://fir.tunm.top/hyperlpr)\n\n### Quick Installation\n\n`python -m pip install hyperlpr3`\n\n###### support：python3, Windows, Mac, Linux, Raspberry Pi。\n\n\n###### 720p cpu real-time (st on MBP r15 2.2GHz haswell).\n\n#### Quick Test\n\n```bash\n# image url\nlpr3 sample -src https://koss.iyong.com/swift/v1/iyong_public/iyong_2596631159095872/image/20190221/1550713902741045679.jpg\n\n# image path\nlpr3 sample -src images/test_img.jpg -det high\n```\n\n#### How to Use\n\n```python\n# import opencv\nimport cv2\n# import hyperlpr3\nimport hyperlpr3 as lpr3\n\n# Instantiate object\ncatcher = lpr3.LicensePlateCatcher()\n# load image\nimage = cv2.imread(\"images/test_img.jpg\")\n# print result\nprint(catcher(image))\n\n``` \n#### Start the WebAPI service\n\n```bash\n# start server\nlpr3 rest --port 8715 --host 0.0.0.0\n```\nPath to open SwaggerUI after startup：[http://localhost:8715/api/v1/docs](http://localhost:8715/api/v1/docs) View and test the online Identification API service:\n\n![swagger_ui](./images/swagger-ui.png)\n\n\n#### Q&A\n\nQ：Whether the accuracy of android in the project is consistent with that of apk-demo？\n\nA：Please compile or download the Android shared library from the release and copy it to Prj-Android for testing。\n\nQ：Source of training data for license plates？\n\nA：Since the license plate data used for training involves legal privacy and other issues, it cannot be provided in this project. Open more big data sets [CCPD](https://github.com/detectRecog/CCPD) registration dataset。\n\nQ：Provision of training code？\n\nA：The resources provide the old training code, and the training methods for HyperLPR3 will be sorted out and presented later。\n\n\n#### Resources\n\n- [HyperLPR3车牌识别-五分钟搞定: 中文车牌识别光速部署与使用](https://blog.csdn.net/weixin_40193776/article/details/129258107)\n\n- [HyperLPR3车牌识别-Android-SDK光速部署与使用](https://blog.csdn.net/weixin_40193776/article/details/129394240)\n\n- [HyperLPR3车牌识别-Linux/MacOS使用：C/C++库编译](https://blog.csdn.net/weixin_40193776/article/details/129295679)\n\n- [HyperLPR3车牌识别-Android使用：SDK编译与部署](https://blog.csdn.net/weixin_40193776/article/details/129354938)\n\n- To be added... Contributions welcome\n\n#### Other Versions\n\n- [HyperLPRv1](https://github.com/szad670401/HyperLPR/tree/v1)\n\n- [HyperLPRv2](https://github.com/szad670401/HyperLPR/tree/v2)\n\n### TODO\n\n- Support for rapid deployment of WebApi services\n- Support multiple license plates and double layers\n- Support large Angle license plate\n- Lightweight recognition model\n\n\n### Specialty\n\n- 720p faster, single core Intel 2.2G CPU (MaBook Pro 2015) average recognition time is less than 100ms\n- End-to-end license plate recognition does not require character segmentation\n- The recognition rate is high, and the accuracy of the entrance and exit scene is about 95%-97%\n- Support cross-platform compilation and rapid deployment\n\n### Matters Need Attention:\n\n- The C++ and Python implementations of this project are separate\n- When compiling C++ projects, OpenCV 4.0 and MNN 2.0 must be used, otherwise it will not compile\n- Android project compilation ndk as far as possible to use version 21\n\n### Python Dependency\n- opencv-python (>3.3)\n- onnxruntime (>1.8.1)\n- fastapi (0.92.0)\n- uvicorn (0.20.0)\n- loguru (0.6.0)\n- python-multipart\n- tqdm\n- requests \n\n### Cross-platform support\n\n#### Platform\n- Linux: x86、Armv7、Armv8\n- MacOS: x86\n- Android: arm64-v8a、armeabi-v7a\n  \n#### Embedded Development Board\n- Rockchip: rv1109rv1126(RKNPU)\n\n### CPP Dependency\n\n- Opencv 4.0 above\n- MNN 2.0 above\n\n### C/C++ Compiling Dependencies\n\nCompiling C/C++ projects requires the use of third-party dependency libraries. After downloading the library, unzip it, and put it into the root directory (the same level as CMakeLists.txt) by copying or soft linking.[baidu drive](https://pan.baidu.com/s/1zfP2MSsG1jgxB_MjvpwZJQ) code: eu31\n\n### Linux/Mac Shared Library Compilation\n\n- Need to place or link dependencies in the project root (same level as CMakeLists.txt)\n- We recommend you to compile OpenCV yourself and install it into the system. This can help reduce compilation errors caused by version mismatches and compiler issues with system dependencies. However, you can also try using the pre-compiled OpenCV static library we provide for compilation. To do this, you need to enable the **LINUX_USE_3RDPARTY_OPENCV** switch.\n\n```bash\n# execute the script\nsh command/build_release_linux_share.sh\n\n```\nCompiled to the **build/linux/install/hyperlpr3** dir，Which contains：\n- include - header file\n- lib - shared dir\n- resource - test-images and models dir\n\nCopy the files you need into your project\n\n### Linux/Mac Compiling the Demo\n\n- You need to complete the previous compilation step and ensure it's successful. The compiled files will be located in the root directory: **build/linux/install/hyperlpr3**. You will need to manually copy them to the current directory.\n- Go to the **Prj-Linux** folder\n```bash\n# go to Prj-linux\ncd Prj-Linux\n# exec sh\nsh build.sh\n```\nThe executable program is generated after compilation: **PlateRecDemo**，and Run the program\n```bash\n# go to build\ncd build/\n# first param models dir, second param image path\n./PlateRecDemo ../hyperlpr3/resource/models/r2_mobile ../hyperlpr3/resource/images/test_img.jpg\n```\n### Linux/Mac Quick Use SDK Code Example\n```C\n// Load image\ncv::Mat image = cv::imread(image_path);\n// Create a ImageData\nHLPR_ImageData data = {0};\ndata.data = image.ptr<uint8_t>(0);         // Setting the image data flow\ndata.width = image.cols;                   // Setting the image width\ndata.height = image.rows;                  // Setting the image height\ndata.format = STREAM_BGR;                  // Setting the current image encoding format\ndata.rotation = CAMERA_ROTATION_0;         // Setting the current image corner\n// Create a Buffer\nP_HLPR_DataBuffer buffer = HLPR_CreateDataBuffer(&data);\n\n// Configure license plate recognition parameters\nHLPR_ContextConfiguration configuration = {0};\nconfiguration.models_path = model_path;         // Model folder path\nconfiguration.max_num = 5;                      // Maximum number of license plates\nconfiguration.det_level = DETECT_LEVEL_LOW;     // Level of detector\nconfiguration.use_half = false;\nconfiguration.nms_threshold = 0.5f;             // Non-maxima suppress the confidence threshold\nconfiguration.rec_confidence_threshold = 0.5f;  // License plate number text threshold\nconfiguration.box_conf_threshold = 0.30f;       // Detector threshold\nconfiguration.threads = 1;\n// Instantiating a Context\nP_HLPR_Context ctx = HLPR_CreateContext(&configuration);\n// Query the Context state\nHREESULT ret = HLPR_ContextQueryStatus(ctx);\nif (ret != HResultCode::Ok) {\n    printf(\"create error.\\n\");\n    return -1;\n}\nHLPR_PlateResultList results = {0};\n// Execute LPR\nHLPR_ContextUpdateStream(ctx, buffer, &results);\n\nfor (int i = 0; i < results.plate_size; ++i) {\n\t// Getting results\n    std::string type;\n    if (results.plates[i].type == HLPR_PlateType::PLATE_TYPE_UNKNOWN) {\n        type = “Unknown\";\n    } else {\n        type = TYPES[results.plates[i].type];\n    }\n\n    printf(\"<%d> %s, %s, %f\\n\", i + 1, type.c_str(),\n           results.plates[i].code, results.plates[i].text_confidence);\n}\n\n// Release Buffer\nHLPR_ReleaseDataBuffer(buffer);\n// Release Context\nHLPR_ReleaseContext(ctx);\n```\n\n### Android: Compile the Shared Library\n- The first step is to install third-party dependencies\n- You need to prepare NDKS and configure environment variables: $ANDROID_NDK\n- Supports cross-compilation on Linux/MacOS\n```bash\n# execute the script\nsh command/build_release_android_share.sh\n```\nCompiled to the: **build/release_android/**，Which contains：\n- arm64-v8a - 64bit shard library\n- armeabi-v7a - 32bit shard library\n\nAfter compiling，Copy**arm64-v8a**and**armeabi-v7a** dirs to **Prj-Android/hyperlpr3/libs**，And compile the **Prj-Android** project to use.\n\n### Compile with Docker\n\nIf you need to compile with docker, we provide a few ways to compile:\n\n#### 1. Compile the Linux-x86 Shared Library using Docker\n\nYou need to install docker and docker-compose，Build Image for **hyperlpr_build**:\n\n```Bash\ndocker build -t hyperlpr_build .\n```\n\nStart compiling the shared library:\n\n```Bash\ndocker-compose up build_linux_x86_shared_lib\n```\n\nBuild dir: **build/linux**\n\n### Android SDK Demo\n\nWe have provided a demo project from the Android SDK source: [hyperlpr3-android-sdk](https://github.com/HyperInspire/hyperlpr3-android-sdk.git)，You can compile the shared library and use the project as needed.\n\n### Quick to use in Android\n\nIf you need to quickly integrate our sdk in your own Android project, then you can add the following dependency to your project's build.gradle:\n\n- Step 1. Add the JitPack repository to your build file.Add it in your root build.gradle at the end of repositories:\n\n```Java\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n- Step 2. Add the dependency\n```Java\ndependencies {\n    implementation 'com.github.HyperInspire:hyperlpr3-android-sdk:1.0.3'\n}\n```\n\n- Step 3. Use hyperlpr in your application\n\n```Java\n// Initialization, which can be performed only once, is usually performed at program initialization\nHyperLPR3.getInstance().init(this, new HyperLPRParameter());\n\n…\n\n// exec recognition\nPlate[] plates =  HyperLPR3.getInstance().plateRecognition(bitmap, HyperLPR3.CAMERA_ROTATION_0, HyperLPR3.STREAM_BGRA);\n```\n\nKnow more about: **[Prj-Android](./Prj-Android)**\n\n\n### License Plate Type is Supported(Chinese)\n\n#### 支持\n- [x] 单行蓝牌\n- [x] 单行黄牌\n- [x] 新能源车牌\n- [x] 教练车牌\n#### 有限支持\n- [x] 白色警用车牌\n- [x] 使馆/港澳车牌\n- [x] 双层黄牌\n- [x] 武警车牌\n#### 待支持\n- [ ] 民航车牌\n- [ ] 双层武警\n- [ ] 双层军牌\n- [ ] 双层农用车牌\n- [ ] 双层个性化车牌\n- [ ] License plates from more countries\n\n###### Note:Due to some imbalanced samples during training, some special license plates have low recognition rates, such as (Embassy/Hong Kong and Macao license plates), which will be improved in the subsequent versions.\n\n\n### Example\n\n![demo](./images/demo.png)\n\n### Author\n- Jingyu Yan (tunmxy@163.com)\n- Jack Yu (jack-yu-business@foxmail.com / https://github.com/szad670401)\n- XiaoXiao (xiaoxiao@xidian.edu.cn)\n\n#### Help\n\n- HyperInspire QQ Group: 529385694\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EA0:372D9:176B2F:5C9D6C:6AB92170"},"text_sha256":"19a6016b3e082eb7f038f16eafc7b8f6a54cd25d643dd132daf0574f21e26e8f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":2,"D1_evidence":"sha=9307450f7b7915be18f23a539ec05b41fe6629f4; file=README.md; text=A：Please compile or download the Android shared library from the release and copy it to Prj-Android for testing。 Q：Source of training data for license plates？ A：Since the license plate data used for training involves legal privacy and other issues, it cannot be provided in this project. Q：Provision of training code？ A：The resources provide the old training code, and the training methods for HyperLPR3 will be sorted out and presented later。","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=9307450f7b7915be18f23a539ec05b41fe6629f4; file=README.md; text=A：Please compile or download the Android shared library from the release and copy it to Prj-Android for testing。 Q：Source of training data for license plates？ A：Since the license plate data used for training involves legal privacy and other issues, it cannot be provided in this project. Q：Provision of training code？ A：The resources provide the old training code, and the training methods for HyperLPR3 will be sorted out and presented later。","C2":"sha=9307450f7b7915be18f23a539ec05b41fe6629f4; file=README.md; text=A：Please compile or download the Android shared library from the release and copy it to Prj-Android for testing。 Q：Source of training data for license plates？ A：Since the license plate data used for training involves legal privacy and other issues, it cannot be provided in this project. Q：Provision of training code？ A：The resources provide the old training code, and the training methods for HyperLPR3 will be sorted out and presented later。"}}}}
{"repository":"thtrieu/darkflow","input_row":{"repository":"thtrieu/darkflow","url":"https://github.com/thtrieu/darkflow","name":"darkflow","owner":"thtrieu","description":"Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":6139,"issues":1077,"created_at":"2016-08-16T05:54:02Z","updated_at":"2026-09-21T12:10:35Z","first_commit_at":"2016-08-16T05:39:43Z","last_commit_at":"2020-02-25T01:21:12Z","activity_months":42.310000000000002,"ai_ml_match_topics":"deep-learning; machine-learning; image-processing; convolutional-neural-networks; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:14.385Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"thtrieu/darkflow","visibility":"public","created_at":"2016-08-16T05:54:02Z","updated_at":"2026-09-21T12:10:35Z","private":false,"fork":false,"archived":false,"stargazers_count":6139,"open_issues_count":641,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"3138","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:177D978:1B9C72D:6AB9292A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3137","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:17F3BC4:1C1428D:6AB9292A"},"commit":{"sha":"b2aee0000cd2a956b9f1de6dbfef94d53158b7d8","url":"https://github.com/thtrieu/darkflow/commit/b2aee0000cd2a956b9f1de6dbfef94d53158b7d8","date":"2018-03-25T02:17:51Z","author_date":"2018-03-25T02:17:51Z","committer_date":"2018-03-25T02:17:51Z","tree_sha":"602723f79df607570ae8808ab3f3e2577302734a","message_first_line":"Merge pull request #657 from cclauss/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"3136","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D6:3BE445:177D9F6:1B9C7E9:6AB9292B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11539,"blob_sha":"9232904dfc0be656b01e018b1a66175c36e95bb2","priority":0}],"documents":[{"path":"README.md","size":11539,"blob_sha":"9232904dfc0be656b01e018b1a66175c36e95bb2","priority":0,"status":200,"text":"## Intro\n\n[![Build Status](https://travis-ci.org/thtrieu/darkflow.svg?branch=master)](https://travis-ci.org/thtrieu/darkflow) [![codecov](https://codecov.io/gh/thtrieu/darkflow/branch/master/graph/badge.svg)](https://codecov.io/gh/thtrieu/darkflow)\n\nReal-time object detection and classification. Paper: [version 1](https://arxiv.org/pdf/1506.02640.pdf), [version 2](https://arxiv.org/pdf/1612.08242.pdf).\n\nRead more about YOLO (in darknet) and download weight files [here](http://pjreddie.com/darknet/yolo/). In case the weight file cannot be found, I uploaded some of mine [here](https://drive.google.com/drive/folders/0B1tW_VtY7onidEwyQ2FtQVplWEU), which include `yolo-full` and `yolo-tiny` of v1.0, `tiny-yolo-v1.1` of v1.1 and `yolo`, `tiny-yolo-voc` of v2.\n\n\nSee demo below or see on [this imgur](http://i.imgur.com/EyZZKAA.gif)\n\n<p align=\"center\"> <img src=\"demo.gif\"/> <\/p>\n\n## Dependencies\n\nPython3, tensorflow 1.0, numpy, opencv 3.\n\n### Getting started\n\nYou can choose _one_ of the following three ways to get started with darkflow.\n\n1. Just build the Cython extensions in place. NOTE: If installing this way you will have to use `./flow` in the cloned darkflow directory instead of `flow` as darkflow is not installed globally.\n    ```\n    python3 setup.py build_ext --inplace\n    ```\n\n2. Let pip install darkflow globally in dev mode (still globally accessible, but changes to the code immediately take effect)\n    ```\n    pip install -e .\n    ```\n\n3. Install with pip globally\n    ```\n    pip install .\n    ```\n\n## Update\n\n**Android demo on Tensorflow's** [here](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/src/org/tensorflow/demo/TensorFlowYoloDetector.java)\n\n**I am looking for help:**\n - `help wanted` labels in issue track\n\n## Parsing the annotations\n\nSkip this if you are not training or fine-tuning anything (you simply want to forward flow a trained net)\n\nFor example, if you want to work with only 3 classes `tvmonitor`, `person`, `pottedplant`; edit `labels.txt` as follows\n\n```\ntvmonitor\nperson\npottedplant\n```\n\nAnd that's it. `darkflow` will take care of the rest. You can also set darkflow to load from a custom labels file with the `--labels` flag (i.e. `--labels myOtherLabelsFile.txt`). This can be helpful when working with multiple models with different sets of output labels. When this flag is not set, darkflow will load from `labels.txt` by default (unless you are using one of the recognized `.cfg` files designed for the COCO or VOC dataset - then the labels file will be ignored and the COCO or VOC labels will be loaded).\n\n## Design the net\n\nSkip this if you are working with one of the original configurations since they are already there. Otherwise, see the following example:\n\n```python\n...\n\n[convolutional]\nbatch_normalize = 1\nsize = 3\nstride = 1\npad = 1\nactivation = leaky\n\n[maxpool]\n\n[connected]\noutput = 4096\nactivation = linear\n\n...\n```\n\n## Flowing the graph using `flow`\n\n```bash\n# Have a look at its options\nflow --h\n```\n\nFirst, let's take a closer look at one of a very useful option `--load`\n\n```bash\n# 1. Load tiny-yolo.weights\nflow --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights\n\n# 2. To completely initialize a model, leave the --load option\nflow --model cfg/yolo-new.cfg\n\n# 3. It is useful to reuse the first identical layers of tiny for `yolo-new`\nflow --model cfg/yolo-new.cfg --load bin/tiny-yolo.weights\n# this will print out which layers are reused, which are initialized\n```\n\nAll input images from default folder `sample_img/` are flowed through the net and predictions are put in `sample_img/out/`. We can always specify more parameters for such forward passes, such as detection threshold, batch size, images folder, etc.\n\n```bash\n# Forward all images in sample_img/ using tiny yolo and 100% GPU usage\nflow --imgdir sample_img/ --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights --gpu 1.0\n```\njson output can be generated with descriptions of the pixel location of each bounding box and the pixel location. Each prediction is stored in the `sample_img/out` folder by default. An example json array is shown below.\n```bash\n# Forward all images in sample_img/ using tiny yolo and JSON output.\nflow --imgdir sample_img/ --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights --json\n```\nJSON output:\n```json\n[{\"label\":\"person\", \"confidence\": 0.56, \"topleft\": {\"x\": 184, \"y\": 101}, \"bottomright\": {\"x\": 274, \"y\": 382}},\n{\"label\": \"dog\", \"confidence\": 0.32, \"topleft\": {\"x\": 71, \"y\": 263}, \"bottomright\": {\"x\": 193, \"y\": 353}},\n{\"label\": \"horse\", \"confidence\": 0.76, \"topleft\": {\"x\": 412, \"y\": 109}, \"bottomright\": {\"x\": 592,\"y\": 337}}]\n```\n - label: self explanatory\n - confidence: somewhere between 0 and 1 (how confident yolo is about that detection)\n - topleft: pixel coordinate of top left corner of box.\n - bottomright: pixel coordinate of bottom right corner of box.\n\n## Training new model\n\nTraining is simple as you only have to add option `--train`. Training set and annotation will be parsed if this is the first time a new configuration is trained. To point to training set and annotations, use option `--dataset` and `--annotation`. A few examples:\n\n```bash\n# Initialize yolo-new from yolo-tiny, then train the net on 100% GPU:\nflow --model cfg/yolo-new.cfg --load bin/tiny-yolo.weights --train --gpu 1.0\n\n# Completely initialize yolo-new and train it with ADAM optimizer\nflow --model cfg/yolo-new.cfg --train --trainer adam\n```\n\nDuring training, the script will occasionally save intermediate results into Tensorflow checkpoints, stored in `ckpt/`. To resume to any checkpoint before performing training/testing, use `--load [checkpoint_num]` option, if `checkpoint_num < 0`, `darkflow` will load the most recent save by parsing `ckpt/checkpoint`.\n\n```bash\n# Resume the most recent checkpoint for training\nflow --train --model cfg/yolo-new.cfg --load -1\n\n# Test with checkpoint at step 1500\nflow --model cfg/yolo-new.cfg --load 1500\n\n# Fine tuning yolo-tiny from the original one\nflow --train --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights\n```\n\nExample of training on Pascal VOC 2007:\n```bash\n# Download the Pascal VOC dataset:\ncurl -O https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar\ntar xf VOCtest_06-Nov-2007.tar\n\n# An example of the Pascal VOC annotation format:\nvim VOCdevkit/VOC2007/Annotations/000001.xml\n\n# Train the net on the Pascal dataset:\nflow --model cfg/yolo-new.cfg --train --dataset \"~/VOCdevkit/VOC2007/JPEGImages\" --annotation \"~/VOCdevkit/VOC2007/Annotations\"\n```\n\n### Training on your own dataset\n\n*The steps below assume we want to use tiny YOLO and our dataset has 3 classes*\n\n1. Create a copy of the configuration file `tiny-yolo-voc.cfg` and rename it according to your preference `tiny-yolo-voc-3c.cfg` (It is crucial that you leave the original `tiny-yolo-voc.cfg` file unchanged, see below for explanation).\n\n2. In `tiny-yolo-voc-3c.cfg`, change classes in the [region] layer (the last layer) to the number of classes you are going to train for. In our case, classes are set to 3.\n    \n    ```python\n    ...\n\n    [region]\n    anchors = 1.08,1.19,  3.42,4.41,  6.63,11.38,  9.42,5.11,  16.62,10.52\n    bias_match=1\n    classes=3\n    coords=4\n    num=5\n    softmax=1\n    \n    ...\n    ```\n\n3. In `tiny-yolo-voc-3c.cfg`, change filters in the [convolutional] layer (the second to last layer) to num * (classes + 5). In our case, num is 5 and classes are 3 so 5 * (3 + 5) = 40 therefore filters are set to 40.\n    \n    ```python\n    ...\n\n    [convolutional]\n    size=1\n    stride=1\n    pad=1\n    filters=40\n    activation=linear\n\n    [region]\n    anchors = 1.08,1.19,  3.42,4.41,  6.63,11.38,  9.42,5.11,  16.62,10.52\n    \n    ...\n    ```\n\n4. Change `labels.txt` to include the label(s) you want to train on (number of labels should be the same as the number of classes you set in `tiny-yolo-voc-3c.cfg` file). In our case, `labels.txt` will contain 3 labels.\n\n    ```\n    label1\n    label2\n    label3\n    ```\n5. Reference the `tiny-yolo-voc-3c.cfg` model when you train.\n\n    `flow --model cfg/tiny-yolo-voc-3c.cfg --load bin/tiny-yolo-voc.weights --train --annotation train/Annotations --dataset train/Images`\n\n\n* Why should I leave the original `tiny-yolo-voc.cfg` file unchanged?\n    \n    When darkflow sees you are loading `tiny-yolo-voc.weights` it will look for `tiny-yolo-voc.cfg` in your cfg/ folder and compare that configuration file to the new one you have set with `--model cfg/tiny-yolo-voc-3c.cfg`. In this case, every layer will have the same exact number of weights except for the last two, so it will load the weights into all layers up to the last two because they now contain different number of weights.\n\n\n## Camera/video file demo\n\nFor a demo that entirely runs on the CPU:\n\n```bash\nflow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi\n```\n\nFor a demo that runs 100% on the GPU:\n\n```bash\nflow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi --gpu 1.0\n```\n\nTo use your webcam/camera, simply replace `videofile.avi` with keyword `camera`.\n\nTo save a video with predicted bounding box, add `--saveVideo` option.\n\n## Using darkflow from another python application\n\nPlease note that `return_predict(img)` must take an `numpy.ndarray`. Your image must be loaded beforehand and passed to `return_predict(img)`. Passing the file path won't work.\n\nResult from `return_predict(img)` will be a list of dictionaries representing each detected object's values in the same format as the JSON output listed above.\n\n```python\nfrom darkflow.net.build import TFNet\nimport cv2\n\noptions = {\"model\": \"cfg/yolo.cfg\", \"load\": \"bin/yolo.weights\", \"threshold\": 0.1}\n\ntfnet = TFNet(options)\n\nimgcv = cv2.imread(\"./sample_img/sample_dog.jpg\")\nresult = tfnet.return_predict(imgcv)\nprint(result)\n```\n\n\n## Save the built graph to a protobuf file (`.pb`)\n\n```bash\n## Saving the lastest checkpoint to protobuf file\nflow --model cfg/yolo-new.cfg --load -1 --savepb\n\n## Saving graph and weights to protobuf file\nflow --model cfg/yolo.cfg --load bin/yolo.weights --savepb\n```\nWhen saving the `.pb` file, a `.meta` file will also be generated alongside it. This `.meta` file is a JSON dump of everything in the `meta` dictionary that contains information nessecary for post-processing such as `anchors` and `labels`. This way, everything you need to make predictions from the graph and do post processing is contained in those two files - no need to have the `.cfg` or any labels file tagging along.\n\nThe created `.pb` file can be used to migrate the graph to mobile devices (JAVA / C++ / Objective-C++). The name of input tensor and output tensor are respectively `'input'` and `'output'`. For further usage of this protobuf file, please refer to the official documentation of `Tensorflow` on C++ API [_here_](https://www.tensorflow.org/versions/r0.9/api_docs/cc/index.html). To run it on, say, iOS application, simply add the file to Bundle Resources and update the path to this file inside source code.\n\nAlso, darkflow supports loading from a `.pb` and `.meta` file for generating predictions (instead of loading from a `.cfg` and checkpoint or `.weights`).\n```bash\n## Forward images in sample_img for predictions based on protobuf file\nflow --pbLoad built_graph/yolo.pb --metaLoad built_graph/yolo.meta --imgdir sample_img/\n```\nIf you'd like to load a `.pb` and `.meta` file when using `return_predict()` you can set the `\"pbLoad\"` and `\"metaLoad\"` options in place of the `\"model\"` and `\"load\"` options you would normally set.\n\nThat's all.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B60:376DE:17AD57:5CE04C:6AB92173"},"text_sha256":"9ce92a89f1852c374da7f497f0070d8884cd0b80a6d4d553fb1ff5665cadc0a9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3135","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17BFFC3:1BDFBFA:6AB9292B"},"commit":{"sha":"eb7e830393f24233032b8578737141528be01d65","url":"https://github.com/thtrieu/darkflow/commit/eb7e830393f24233032b8578737141528be01d65","date":"2020-02-25T01:21:12Z","author_date":"2020-02-25T01:21:12Z","committer_date":"2020-02-25T01:21:12Z","tree_sha":"c2fb615bd2002441061ac52f1cd4149246c0e177","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3134","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A0:3BE445:177DAA6:1B9C8CB:6AB9292C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11774,"blob_sha":"6636c747cbccfbce7a5bd6cad45a81e3cead45c8","priority":0}],"documents":[{"path":"README.md","size":11774,"blob_sha":"6636c747cbccfbce7a5bd6cad45a81e3cead45c8","priority":0,"status":200,"text":"## Intro\n\n[![Build Status](https://travis-ci.org/thtrieu/darkflow.svg?branch=master)](https://travis-ci.org/thtrieu/darkflow) [![codecov](https://codecov.io/gh/thtrieu/darkflow/branch/master/graph/badge.svg)](https://codecov.io/gh/thtrieu/darkflow)\n\nReal-time object detection and classification. Paper: [version 1](https://arxiv.org/pdf/1506.02640.pdf), [version 2](https://arxiv.org/pdf/1612.08242.pdf).\n\nRead more about YOLO (in darknet) and download weight files [here](http://pjreddie.com/darknet/yolo/). In case the weight file cannot be found, I uploaded some of mine [here](https://drive.google.com/drive/folders/0B1tW_VtY7onidEwyQ2FtQVplWEU), which include `yolo-full` and `yolo-tiny` of v1.0, `tiny-yolo-v1.1` of v1.1 and `yolo`, `tiny-yolo-voc` of v2.\n\n\nSee demo below or see on [this imgur](http://i.imgur.com/EyZZKAA.gif)\n\n<p align=\"center\"> <img src=\"demo.gif\"/> <\/p>\n\n## Dependencies\n\nPython3, tensorflow 1.0, numpy, opencv 3.\n\n## Citation\n\n```\n@article{trieu2018darkflow,\n  title={Darkflow},\n  author={Trieu, Trinh Hoang},\n  journal={GitHub Repository. Available online: https://github. com/thtrieu/darkflow (accessed on 14 February 2019)},\n  year={2018}\n}\n```\n\n### Getting started\n\nYou can choose _one_ of the following three ways to get started with darkflow.\n\n1. Just build the Cython extensions in place. NOTE: If installing this way you will have to use `./flow` in the cloned darkflow directory instead of `flow` as darkflow is not installed globally.\n    ```\n    python3 setup.py build_ext --inplace\n    ```\n\n2. Let pip install darkflow globally in dev mode (still globally accessible, but changes to the code immediately take effect)\n    ```\n    pip install -e .\n    ```\n\n3. Install with pip globally\n    ```\n    pip install .\n    ```\n\n## Update\n\n**Android demo on Tensorflow's** [here](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/src/org/tensorflow/demo/TensorFlowYoloDetector.java)\n\n**I am looking for help:**\n - `help wanted` labels in issue track\n\n## Parsing the annotations\n\nSkip this if you are not training or fine-tuning anything (you simply want to forward flow a trained net)\n\nFor example, if you want to work with only 3 classes `tvmonitor`, `person`, `pottedplant`; edit `labels.txt` as follows\n\n```\ntvmonitor\nperson\npottedplant\n```\n\nAnd that's it. `darkflow` will take care of the rest. You can also set darkflow to load from a custom labels file with the `--labels` flag (i.e. `--labels myOtherLabelsFile.txt`). This can be helpful when working with multiple models with different sets of output labels. When this flag is not set, darkflow will load from `labels.txt` by default (unless you are using one of the recognized `.cfg` files designed for the COCO or VOC dataset - then the labels file will be ignored and the COCO or VOC labels will be loaded).\n\n## Design the net\n\nSkip this if you are working with one of the original configurations since they are already there. Otherwise, see the following example:\n\n```python\n...\n\n[convolutional]\nbatch_normalize = 1\nsize = 3\nstride = 1\npad = 1\nactivation = leaky\n\n[maxpool]\n\n[connected]\noutput = 4096\nactivation = linear\n\n...\n```\n\n## Flowing the graph using `flow`\n\n```bash\n# Have a look at its options\nflow --h\n```\n\nFirst, let's take a closer look at one of a very useful option `--load`\n\n```bash\n# 1. Load tiny-yolo.weights\nflow --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights\n\n# 2. To completely initialize a model, leave the --load option\nflow --model cfg/yolo-new.cfg\n\n# 3. It is useful to reuse the first identical layers of tiny for `yolo-new`\nflow --model cfg/yolo-new.cfg --load bin/tiny-yolo.weights\n# this will print out which layers are reused, which are initialized\n```\n\nAll input images from default folder `sample_img/` are flowed through the net and predictions are put in `sample_img/out/`. We can always specify more parameters for such forward passes, such as detection threshold, batch size, images folder, etc.\n\n```bash\n# Forward all images in sample_img/ using tiny yolo and 100% GPU usage\nflow --imgdir sample_img/ --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights --gpu 1.0\n```\njson output can be generated with descriptions of the pixel location of each bounding box and the pixel location. Each prediction is stored in the `sample_img/out` folder by default. An example json array is shown below.\n```bash\n# Forward all images in sample_img/ using tiny yolo and JSON output.\nflow --imgdir sample_img/ --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights --json\n```\nJSON output:\n```json\n[{\"label\":\"person\", \"confidence\": 0.56, \"topleft\": {\"x\": 184, \"y\": 101}, \"bottomright\": {\"x\": 274, \"y\": 382}},\n{\"label\": \"dog\", \"confidence\": 0.32, \"topleft\": {\"x\": 71, \"y\": 263}, \"bottomright\": {\"x\": 193, \"y\": 353}},\n{\"label\": \"horse\", \"confidence\": 0.76, \"topleft\": {\"x\": 412, \"y\": 109}, \"bottomright\": {\"x\": 592,\"y\": 337}}]\n```\n - label: self explanatory\n - confidence: somewhere between 0 and 1 (how confident yolo is about that detection)\n - topleft: pixel coordinate of top left corner of box.\n - bottomright: pixel coordinate of bottom right corner of box.\n\n## Training new model\n\nTraining is simple as you only have to add option `--train`. Training set and annotation will be parsed if this is the first time a new configuration is trained. To point to training set and annotations, use option `--dataset` and `--annotation`. A few examples:\n\n```bash\n# Initialize yolo-new from yolo-tiny, then train the net on 100% GPU:\nflow --model cfg/yolo-new.cfg --load bin/tiny-yolo.weights --train --gpu 1.0\n\n# Completely initialize yolo-new and train it with ADAM optimizer\nflow --model cfg/yolo-new.cfg --train --trainer adam\n```\n\nDuring training, the script will occasionally save intermediate results into Tensorflow checkpoints, stored in `ckpt/`. To resume to any checkpoint before performing training/testing, use `--load [checkpoint_num]` option, if `checkpoint_num < 0`, `darkflow` will load the most recent save by parsing `ckpt/checkpoint`.\n\n```bash\n# Resume the most recent checkpoint for training\nflow --train --model cfg/yolo-new.cfg --load -1\n\n# Test with checkpoint at step 1500\nflow --model cfg/yolo-new.cfg --load 1500\n\n# Fine tuning yolo-tiny from the original one\nflow --train --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights\n```\n\nExample of training on Pascal VOC 2007:\n```bash\n# Download the Pascal VOC dataset:\ncurl -O https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar\ntar xf VOCtest_06-Nov-2007.tar\n\n# An example of the Pascal VOC annotation format:\nvim VOCdevkit/VOC2007/Annotations/000001.xml\n\n# Train the net on the Pascal dataset:\nflow --model cfg/yolo-new.cfg --train --dataset \"~/VOCdevkit/VOC2007/JPEGImages\" --annotation \"~/VOCdevkit/VOC2007/Annotations\"\n```\n\n### Training on your own dataset\n\n*The steps below assume we want to use tiny YOLO and our dataset has 3 classes*\n\n1. Create a copy of the configuration file `tiny-yolo-voc.cfg` and rename it according to your preference `tiny-yolo-voc-3c.cfg` (It is crucial that you leave the original `tiny-yolo-voc.cfg` file unchanged, see below for explanation).\n\n2. In `tiny-yolo-voc-3c.cfg`, change classes in the [region] layer (the last layer) to the number of classes you are going to train for. In our case, classes are set to 3.\n    \n    ```python\n    ...\n\n    [region]\n    anchors = 1.08,1.19,  3.42,4.41,  6.63,11.38,  9.42,5.11,  16.62,10.52\n    bias_match=1\n    classes=3\n    coords=4\n    num=5\n    softmax=1\n    \n    ...\n    ```\n\n3. In `tiny-yolo-voc-3c.cfg`, change filters in the [convolutional] layer (the second to last layer) to num * (classes + 5). In our case, num is 5 and classes are 3 so 5 * (3 + 5) = 40 therefore filters are set to 40.\n    \n    ```python\n    ...\n\n    [convolutional]\n    size=1\n    stride=1\n    pad=1\n    filters=40\n    activation=linear\n\n    [region]\n    anchors = 1.08,1.19,  3.42,4.41,  6.63,11.38,  9.42,5.11,  16.62,10.52\n    \n    ...\n    ```\n\n4. Change `labels.txt` to include the label(s) you want to train on (number of labels should be the same as the number of classes you set in `tiny-yolo-voc-3c.cfg` file). In our case, `labels.txt` will contain 3 labels.\n\n    ```\n    label1\n    label2\n    label3\n    ```\n5. Reference the `tiny-yolo-voc-3c.cfg` model when you train.\n\n    `flow --model cfg/tiny-yolo-voc-3c.cfg --load bin/tiny-yolo-voc.weights --train --annotation train/Annotations --dataset train/Images`\n\n\n* Why should I leave the original `tiny-yolo-voc.cfg` file unchanged?\n    \n    When darkflow sees you are loading `tiny-yolo-voc.weights` it will look for `tiny-yolo-voc.cfg` in your cfg/ folder and compare that configuration file to the new one you have set with `--model cfg/tiny-yolo-voc-3c.cfg`. In this case, every layer will have the same exact number of weights except for the last two, so it will load the weights into all layers up to the last two because they now contain different number of weights.\n\n\n## Camera/video file demo\n\nFor a demo that entirely runs on the CPU:\n\n```bash\nflow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi\n```\n\nFor a demo that runs 100% on the GPU:\n\n```bash\nflow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi --gpu 1.0\n```\n\nTo use your webcam/camera, simply replace `videofile.avi` with keyword `camera`.\n\nTo save a video with predicted bounding box, add `--saveVideo` option.\n\n## Using darkflow from another python application\n\nPlease note that `return_predict(img)` must take an `numpy.ndarray`. Your image must be loaded beforehand and passed to `return_predict(img)`. Passing the file path won't work.\n\nResult from `return_predict(img)` will be a list of dictionaries representing each detected object's values in the same format as the JSON output listed above.\n\n```python\nfrom darkflow.net.build import TFNet\nimport cv2\n\noptions = {\"model\": \"cfg/yolo.cfg\", \"load\": \"bin/yolo.weights\", \"threshold\": 0.1}\n\ntfnet = TFNet(options)\n\nimgcv = cv2.imread(\"./sample_img/sample_dog.jpg\")\nresult = tfnet.return_predict(imgcv)\nprint(result)\n```\n\n\n## Save the built graph to a protobuf file (`.pb`)\n\n```bash\n## Saving the lastest checkpoint to protobuf file\nflow --model cfg/yolo-new.cfg --load -1 --savepb\n\n## Saving graph and weights to protobuf file\nflow --model cfg/yolo.cfg --load bin/yolo.weights --savepb\n```\nWhen saving the `.pb` file, a `.meta` file will also be generated alongside it. This `.meta` file is a JSON dump of everything in the `meta` dictionary that contains information nessecary for post-processing such as `anchors` and `labels`. This way, everything you need to make predictions from the graph and do post processing is contained in those two files - no need to have the `.cfg` or any labels file tagging along.\n\nThe created `.pb` file can be used to migrate the graph to mobile devices (JAVA / C++ / Objective-C++). The name of input tensor and output tensor are respectively `'input'` and `'output'`. For further usage of this protobuf file, please refer to the official documentation of `Tensorflow` on C++ API [_here_](https://www.tensorflow.org/versions/r0.9/api_docs/cc/index.html). To run it on, say, iOS application, simply add the file to Bundle Resources and update the path to this file inside source code.\n\nAlso, darkflow supports loading from a `.pb` and `.meta` file for generating predictions (instead of loading from a `.cfg` and checkpoint or `.weights`).\n```bash\n## Forward images in sample_img for predictions based on protobuf file\nflow --pbLoad built_graph/yolo.pb --metaLoad built_graph/yolo.meta --imgdir sample_img/\n```\nIf you'd like to load a `.pb` and `.meta` file when using `return_predict()` you can set the `\"pbLoad\"` and `\"metaLoad\"` options in place of the `\"model\"` and `\"load\"` options you would normally set.\n\nThat's all.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F10:3AC5A:178752:5CB8EF:6AB92174"},"text_sha256":"f8072b9b10cd85ddcd97c30f8fbe8c6b9816a7eaf38ecaf72ce61250ac6d62c0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"chainer/chainer","input_row":{"repository":"chainer/chainer","url":"https://github.com/chainer/chainer","name":"chainer","owner":"chainer","description":"A flexible framework of neural networks for deep learning","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5919,"issues":2047,"created_at":"2015-06-05T05:50:37Z","updated_at":"2026-09-11T02:35:55Z","first_commit_at":"2015-04-12T14:23:58Z","last_commit_at":"2022-10-17T02:18:00Z","activity_months":90.159999999999997,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:17.048Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"chainer/chainer","visibility":"public","created_at":"2015-06-05T05:50:37Z","updated_at":"2026-09-11T02:35:55Z","private":false,"fork":false,"archived":false,"stargazers_count":5919,"open_issues_count":15,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3133","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0854:35C5DA:17920FC:1BB1902:6AB9292D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3132","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:17DE225:1BFE7AE:6AB9292D"},"commit":{"sha":"6a6754a02120e0e4c79970d08569a5725adef923","url":"https://github.com/chainer/chainer/commit/6a6754a02120e0e4c79970d08569a5725adef923","date":"2018-05-24T16:07:37Z","author_date":"2018-05-24T16:07:37Z","committer_date":"2018-05-24T16:07:37Z","tree_sha":"9dcad9d6f9fa45c89f8d7f0b7c9c90af80ec6b0c","message_first_line":"Python scalar math"},"tree_request_status":200,"tree_rate":{"github_remaining":"3131","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17B64BC:1BD6503:6AB9292D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4405,"blob_sha":"79ecd15df77567f51b1e07494bbdb882bbe27701","priority":0}],"documents":[{"path":"README.md","size":4405,"blob_sha":"79ecd15df77567f51b1e07494bbdb882bbe27701","priority":0,"status":200,"text":"# xChainer\n\n## Build instruction\n\n### Build the core library\n\nBuild `build/xchainer/libxchainer.so` with the following commands.\n\n```shell-session\n$ ( mkdir -p build && cd build && cmake .. && make )\n```\n\nIf you build xChainer with CUDA backend, xChainer currently requires CuDNN and you need to specify its path. For example, if you use [cudnnenv](https://github.com/unnonouno/cudnnenv), run the following commands.\n\n```shell-session\n$ ( mkdir -p build && cd build && cmake -DCUDNN_ROOT_DIR=$HOME/.cudnn/active .. && make )\n```\n\nInstall headers and the library with `make install`.\nTo specify the installation path, pass `-DCMAKE_INSTALL_PREFIX=<...>` to `cmake`.\n\n### Build the Python binding\n\nTo install the `xchainer` Python package in `Release` mode, run the following at the repository root:\n\n```shell-session\n$ pip install .\n```\n\nAgain, if you build xChainer with CUDA backend, xChainer currently requires CuDNN and you need to specify its path. For example, if you use [cudnnenv](https://github.com/unnonouno/cudnnenv), run the following commands.\n\n```shell-session\n$ env CUDNN_ROOT_DIR=$HOME/.cudnn/active pip install .\n```\n\nTo build the Python binding as a C++ project, pass `-DBUILD_PYTHON=1` to `cmake`,\nthen `make` will automatically build the Python binding.\n\n## Information for developers\n\n### Python format and lint\n\nWe use `flake8` and `autopep8`. To install, run:\n\n```\n$ pip install hacking flake8 autopep8\n```\n\nTo format and make changes to Python codes in place, run the following at the repository root:\n\n```\n$ autopep8 python tests -r --global-config .pep8 --in-place\n```\n\nLint:\n\n```\n$ flake8 python tests\n```\n\n### C++ format\n\nWe use `clang-format`. To install on Ubuntu, run:\n\n```\n$ sudo apt-get install clang-format\n```\n\nTo format and make changes to C++ codes in place, run the following at the repository root:\n\n```shell-session\n$ scripts/run-clang-format.sh --in-place\n```\n\n### C++ Lint (cpplint)\n\nWe use `cpplint`. To install it, run:\n\n```shell-session\n$ pip install cpplint\n```\n\nRun the following at the repository root:\n\n```shell-session\n$ scripts/run-cpplint.sh\n```\n\n### C++ Lint (clang-tidy)\n\nWe use `clang-tidy`. To install on Ubuntu, run:\n\n```\n$ sudo apt-get install clang clang-tidy\n```\n\nBuild C++ project beforehand, then run the lint:\n\n```\n$ ( mkdir -p build && cd build && cmake -DBUILD_PYTHON=1 .. && make clang-tidy )\n```\n\n### Run the Python test suite\n\nxChainer requires `chainer` package for Python tests. To install the `chainer` Python package of up-to-date beta version, run the following:\n\n```shell-session\n$ pip install chainer --pre\n```\n\nTo build the `xchainer` Python package in `develop` mode, run the following at the repository root:\n\n```shell-session\n$ pip install -e .\n```\n\nAgain, if you build xChainer with CUDA backend, xChainer currently requires CuDNN and you need to specify its path. For example, if you use [cudnnenv](https://github.com/unnonouno/cudnnenv), run the following commands.\n\n```shell-session\n$ env CUDNN_ROOT_DIR=$HOME/.cudnn/active pip install -e .\n```\n\nRun tests with the following command at the repository root:\n\n```shell-session\n$ pytest\n```\n\nRun tests with coverage:\n\n```shell-session\n$ pytest --cov --no-cov-on-fail --cov-fail-under=80\n```\n\nRun tests without CUDA GPU:\n\n```shell-session\n$ pytest -m 'not cuda'\n```\n\n### Run the C++ test suite\n\nThe test suite is built by default unless `-DENABLE_TEST=OFF` is passed to `cmake`.\nRun the tests with the following command from within `build`.\n\n```shell-session\n$ ctest -V\n```\n\n### C++ code coverage\n\nWe use `gcov` to measure C++ code coverage.\nBuild Python package in `Debug` mode, and build C++ test suite as:\n\n```\n$ python setup.py build --debug --build-temp ./build --build-lib ./build develop\n$ ( mkdir -p build && cd build && cmake -DBUILD_PYTHON=1 -DENABLE_COVERAGE .. && make )\n```\n\nRun both Python and C++ test suite:\n\n```shell-session\n$ pytest && ( cd build && ctest -V )\n```\n\nthen find .gcda files:\n\n```shell-session\nfind build -name '*.gcda'\n```\n\nUse `gcov` command to get coverage:\n\n```shell-session\ngcov ./build/xchainer/CMakeFiles/xchainer.dir/xchainer.gcda\n```\n\nSee generated .gcov files.\n\nYou can also genearte HTML coverage reports with `lcov`. After running tests:\n\n```shell-session\nlcov -c -b xchainer -d build/xchainer/ --no-external -o build/coverage.info\ngenhtml build/coverage.info -o build/coverage\n```\n\nSee `build/coverage/index.html` with any browsers.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1800:1F1FB6:1773E8:5CA54B:6AB92174"},"text_sha256":"daf56f4f684f413e0d733d24e0fb7006205bdaf3e5972ae042a91eacefa642fd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3130","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17A9369:1BC8465:6AB9292E"},"commit":{"sha":"a8e15cbe55a90854a3918b8b5a976abbbff9ec94","url":"https://github.com/chainer/chainer/commit/a8e15cbe55a90854a3918b8b5a976abbbff9ec94","date":"2022-10-17T02:18:00Z","author_date":"2022-10-17T02:18:00Z","committer_date":"2022-10-17T02:18:00Z","tree_sha":"f93958f0e9b16d894f6016444d24ec0dc2794abd","message_first_line":"Merge pull request #8628 from chainer/maintenance-policy"},"tree_request_status":200,"tree_rate":{"github_remaining":"3129","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17B6552:1BD65C2:6AB9292E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4312,"blob_sha":"649230644158d375ca8506358f0369e96a451588","priority":0}],"documents":[{"path":"README.md","size":4312,"blob_sha":"649230644158d375ca8506358f0369e96a451588","priority":0,"status":200,"text":"***Notice: As [announced](https://chainer.org/announcement/2019/12/05/released-v7.html), Chainer is under the maintenance phase and further development will be limited to bug-fixes and maintenance only.***\n\n----\n\n<div align=\"center\"><img src=\"https://raw.githubusercontent.com/chainer/chainer/master/docs/image/chainer_red_h.png\" width=\"400\"/><\/div>\n\n# Chainer: A deep learning framework\n\n[![pypi](https://img.shields.io/pypi/v/chainer.svg)](https://pypi.python.org/pypi/chainer)\n[![GitHub license](https://img.shields.io/github/license/chainer/chainer.svg)](https://github.com/chainer/chainer)\n[![travis](https://img.shields.io/travis/chainer/chainer/master.svg)](https://travis-ci.org/chainer/chainer)\n[![coveralls](https://img.shields.io/coveralls/chainer/chainer.svg)](https://coveralls.io/github/chainer/chainer)\n[![Read the Docs](https://readthedocs.org/projects/chainer/badge/?version=stable)](https://docs.chainer.org/en/stable/?badge=stable)\n[![Optuna](https://img.shields.io/badge/Optuna-integrated-blue)](https://optuna.org)\n\n[**Website**](https://chainer.org/)\n| [**Docs**](https://docs.chainer.org/en/stable/)\n| [**Install Guide**](https://docs.chainer.org/en/stable/install.html)\n| **Tutorials** ([ja](https://tutorials.chainer.org/ja/))\n| **Examples** ([Official](examples), [External](https://github.com/chainer-community/awesome-chainer))\n| [**Concepts**](https://docs.chainer.org/en/stable/guides/)\n| [**ChainerX**](#chainerx)\n\n**Forum** ([en](https://groups.google.com/forum/#!forum/chainer), [ja](https://groups.google.com/forum/#!forum/chainer-jp))\n| **Slack invitation** ([en](https://bit.ly/go-chainer-slack), [ja](https://bit.ly/go-chainer-jp-slack))\n| **Twitter** ([en](https://twitter.com/CuPy_Team), [ja](https://twitter.com/ChainerJP))\n\n*Chainer* is a Python-based deep learning framework aiming at flexibility.\nIt provides automatic differentiation APIs based on the **define-by-run** approach (a.k.a. dynamic computational graphs) as well as object-oriented high-level APIs to build and train neural networks.\nIt also supports CUDA/cuDNN using [CuPy](https://github.com/cupy/cupy) for high performance training and inference.\nFor more details about Chainer, see the documents and resources listed above and join the community in Forum, Slack, and Twitter.\n\n## Installation\n\n*For more details, see the [installation guide](https://docs.chainer.org/en/stable/install.html).*\n\nTo install Chainer, use `pip`.\n\n```sh\n$ pip install chainer\n```\n\nTo enable CUDA support, [CuPy](https://github.com/cupy/cupy) is required.\nRefer to the [CuPy installation guide](https://docs-cupy.chainer.org/en/stable/install.html).\n\n\n## Docker image\n\nWe are providing the official Docker image.\nThis image supports [nvidia-docker](https://github.com/NVIDIA/nvidia-docker).\nLogin to the environment with the following command, and run the Python interpreter to use Chainer with CUDA and cuDNN support.\n\n```\n$ nvidia-docker run -it chainer/chainer /bin/bash\n```\n\n\n## Contribution\n\nSee the [contribution guide](https://docs.chainer.org/en/stable/contribution.html).\n\n\n## ChainerX\n\nSee the [ChainerX documentation](https://docs.chainer.org/en/stable/chainerx/index.html).\n\n\n## License\n\nMIT License (see `LICENSE` file).\n\n\n## More information\n\n- [Release notes](https://github.com/chainer/chainer/releases)\n\n## References\n\nTokui, Seiya, et al. \"Chainer: A Deep Learning Framework for Accelerating the Research Cycle.\" *Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining*. ACM, 2019.\n[URL](https://dl.acm.org/citation.cfm?id=3330756) [BibTex](chainer2019_bibtex.txt)\n\nTokui, S., Oono, K., Hido, S. and Clayton, J.,\nChainer: a Next-Generation Open Source Framework for Deep Learning,\n*Proceedings of Workshop on Machine Learning Systems(LearningSys) in\nThe Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS)*, (2015)\n[URL](http://learningsys.org/papers/LearningSys_2015_paper_33.pdf), [BibTex](chainer_bibtex.txt)\n\nAkiba, T., Fukuda, K. and Suzuki, S.,\nChainerMN: Scalable Distributed Deep Learning Framework,\n*Proceedings of Workshop on ML Systems in\nThe Thirty-first Annual Conference on Neural Information Processing Systems (NIPS)*, (2017)\n[URL](http://learningsys.org/nips17/assets/papers/paper_25.pdf), [BibTex](chainermn_bibtex.txt)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2DE:2C474:17A0DB:5CD2EA:6AB92176"},"text_sha256":"27edd66d683c1d9ad0a1160cf30af8b7611a8038400ac7cce90ed07b2e703b28"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dmlc/gluon-cv","input_row":{"repository":"dmlc/gluon-cv","url":"https://github.com/dmlc/gluon-cv","name":"gluon-cv","owner":"dmlc","description":"Gluon CV Toolkit","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":5914,"issues":834,"created_at":"2018-02-26T01:33:21Z","updated_at":"2026-09-23T09:15:05Z","first_commit_at":"2018-02-26T01:33:21Z","last_commit_at":"2023-01-19T00:37:33Z","activity_months":58.740000000000002,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; neural-network; image-classification; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:19.660Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dmlc/gluon-cv","visibility":"public","created_at":"2018-02-26T01:33:21Z","updated_at":"2026-09-23T09:15:05Z","private":false,"fork":false,"archived":false,"stargazers_count":5914,"open_issues_count":62,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3128","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D5:6E5BD:1786979:1BA58D7:6AB9292F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3127","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DE:DC698:17E2AC9:1C0264C:6AB92930"},"commit":{"sha":"cccec0b79f0387affcd4e61e12b9eba254685363","url":"https://github.com/dmlc/gluon-cv/commit/cccec0b79f0387affcd4e61e12b9eba254685363","date":"2018-05-24T21:25:40Z","author_date":"2018-05-24T21:25:40Z","committer_date":"2018-05-24T21:25:40Z","tree_sha":"d0a3665237bac33642a8d815c58c3ff049a3fcc3","message_first_line":"Cocotrain (#144)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3126","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:1771018:1B913EA:6AB92930"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1204,"blob_sha":"e8941251a6f7c5f31cbc16f3e7bc44fabce6e4d6","priority":0}],"documents":[{"path":"README.md","size":1204,"blob_sha":"e8941251a6f7c5f31cbc16f3e7bc44fabce6e4d6","priority":0,"status":200,"text":"# Gluon CV Toolkit\n\n[![Build Status](http://ci.mxnet.io/job/gluon-cv/job/master/badge/icon)](http://ci.mxnet.io/job/gluon-cv/job/master/)\n[![GitHub license](http://dmlc.github.io/img/apache2.svg)](./LICENSE)\n[![Code Coverage](http://gluon-cv.mxnet.io/coverage.svg?)](http://gluon-cv.mxnet.io/coverage.svg)\n\n| [Installation](http://gluon-cv.mxnet.io) | [Documentation](http://gluon-cv.mxnet.io) | [Tutorials](http://gluon-cv.mxnet.io) |\n\nGluonCV provides implementations of the state-of-the-art (SOTA) deep learning models in computer vision.\n\nIt is designed for engineers, researchers, and\nstudents to fast prototype products and research ideas based on these\nmodels. This toolkit offers four main features:\n\n1. Training scripts to reproduce SOTA results reported in research papers\n2. A large number of pre-trained models\n3. Carefully designed APIs that greatly reduce the implementation complexity\n4. Community supports\n\n## Examples\n\n- [Image Classification](http://gluon-cv.mxnet.io/build/examples_classification/index.html)\n\n- [Object Detection](http://gluon-cv.mxnet.io/build/examples_detection/index.html)\n\n- [Semantic Segmentation](http://gluon-cv.mxnet.io/build/examples_segmentation/index.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"89F8:35EBC:172B41:5C5E07:6AB9217D"},"text_sha256":"0228e1a81ddefa5ec8299143a69f78f933dc48d0ebfa24540628bd7f04b8f859"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3125","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B4:78367:17FCC95:1C1CCB3:6AB92931"},"commit":{"sha":"567775619f3b97d47e7c360748912a4fd883ff52","url":"https://github.com/dmlc/gluon-cv/commit/567775619f3b97d47e7c360748912a4fd883ff52","date":"2023-01-19T00:37:33Z","author_date":"2023-01-19T00:37:33Z","committer_date":"2023-01-19T00:37:33Z","tree_sha":"9abd182d02355ddf0b79afd4a35f7127a4a66f7a","message_first_line":"Update readme with AutoGluon (#1766)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3124","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17BA323:1BDA744:6AB92931"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15366,"blob_sha":"e59860b3516f037c9a0525203468a202727e0d34","priority":0}],"documents":[{"path":"README.md","size":15366,"blob_sha":"e59860b3516f037c9a0525203468a202727e0d34","priority":0,"status":200,"text":"# Gluon CV Toolkit\n\n![Build Status](https://github.com/dmlc/gluon-cv/workflows/Unit%20Test/badge.svg?branch=master&event=push)\n[![GitHub license](docs/_static/apache2.svg)](./LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/gluoncv.svg)](https://pypi.python.org/pypi/gluoncv)\n[![PyPI Pre-release](https://img.shields.io/badge/pypi--prerelease-v0.11.0-ff69b4.svg)](https://pypi.org/project/gluoncv/#history)\n[![Downloads](http://pepy.tech/badge/gluoncv)](http://pepy.tech/project/gluoncv)\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/semantic-segmentation-on-ade20k)](https://paperswithcode.com/sota/semantic-segmentation-on-ade20k?p=resnest-split-attention-networks)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/object-detection-on-coco)](https://paperswithcode.com/sota/object-detection-on-coco?p=resnest-split-attention-networks)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/instance-segmentation-on-coco)](https://paperswithcode.com/sota/instance-segmentation-on-coco?p=resnest-split-attention-networks)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/panoptic-segmentation-on-coco-panoptic)](https://paperswithcode.com/sota/panoptic-segmentation-on-coco-panoptic?p=resnest-split-attention-networks)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/image-classification-on-imagenet)](https://paperswithcode.com/sota/image-classification-on-imagenet?p=resnest-split-attention-networks)\n\n| [Installation](https://gluon-cv.mxnet.io/install.html) | [Documentation](https://gluon-cv.mxnet.io) | [Tutorials](https://gluon-cv.mxnet.io/tutorials/index.html) |\n\nGluonCV provides implementations of the state-of-the-art (SOTA) deep learning models in computer vision.\n\nIt is designed for engineers, researchers, and\nstudents to fast prototype products and research ideas based on these\nmodels. This toolkit offers four main features:\n\n1. Training scripts to reproduce SOTA results reported in research papers\n2. Supports both PyTorch and MXNet\n3. A large number of pre-trained models\n4. Carefully designed APIs that greatly reduce the implementation complexity\n5. Community supports\n\nPlease also checkout [AutoGluon](https://github.com/autogluon/autogluon) if you have [image classification](https://auto.gluon.ai/stable/tutorials/multimodal/image_prediction/index.html) or [object detection](https://auto.gluon.ai/stable/tutorials/multimodal/object_detection/index.html) needs. We have built the [MultimodalPredictor](https://auto.gluon.ai/stable/tutorials/multimodal/index.html) with an improved model zoo, including [TIMM](https://github.com/rwightman/pytorch-image-models), [Huggingface](https://huggingface.co/), [MMDetection](https://github.com/open-mmlab/mmdetection) and more. With just a few lines of code, you can train and deploy high accuracy computer vision models for your application.\n\n\n# Demo\n\n<div align=\"center\">\n    <img src=\"docs/_static/short_demo.gif\">\n<\/div>\n\n<br>\n\nCheck the HD video at [Youtube](https://www.youtube.com/watch?v=nfpouVAzXt0) or [Bilibili](https://www.bilibili.com/video/av55619231).\n\n\n# Supported Applications\n\n| Application  | Illustration  | Available Models |\n|:-----------------------:|:---:|:---:|\n| [Image Classification:](https://gluon-cv.mxnet.io/model_zoo/classification.html) <br/>recognize an object in an image.  | <a href=\"https://gluon-cv.mxnet.io/model_zoo/classification.html\"><img  src=\"docs/_static/image-classification.png\" alt=\"classification\" height=\"200\"/><\/a>  | 50+ models, including <br/><a href=\"https://gluon-cv.mxnet.io/model_zoo/classification.html#resnet\">ResNet<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/classification.html#mobilenet\">MobileNet<\/a>, <br/><a href=\"https://gluon-cv.mxnet.io/model_zoo/classification.html#densenet\">DenseNet<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/classification.html#vgg\">VGG<\/a>, ... |\n| [Object Detection:](https://gluon-cv.mxnet.io/model_zoo/detection.html) <br/>detect multiple objects with their <br/> bounding boxes in an image.     |  <a href=\"https://gluon-cv.mxnet.io/model_zoo/detection.html\"><img src=\"docs/_static/object-detection.png\" alt=\"detection\" height=\"200\"/><\/a> | <a href=\"https://gluon-cv.mxnet.io/model_zoo/detection.html#faster-rcnn\">Faster RCNN<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/detection.html#ssd\">SSD<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/detection.html#yolo-v3\">Yolo-v3<\/a> |\n| [Semantic Segmentation:](https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation) <br/>associate each pixel of an image <br/> with a categorical label. |  <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\"><img src=\"docs/_static/semantic-segmentation.png\" alt=\"semantic\" height=\"200\"/><\/a> | <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">FCN<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">PSP<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">ICNet<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">DeepLab-v3<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">DeepLab-v3+<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">DANet<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#semantic-segmentation\">FastSCNN<\/a> |\n| [Instance Segmentation:](https://gluon-cv.mxnet.io/model_zoo/segmentation.html#instance-segmentation) <br/>detect objects and associate <br/> each pixel inside object area with an <br/> instance label. | <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#instance-segmentation\"><img src=\"docs/_static/instance-segmentation.png\" alt=\"instance\" height=\"200\"/><\/a> | <a href=\"https://gluon-cv.mxnet.io/model_zoo/segmentation.html#instance-segmentation\">Mask RCNN<\/a>|\n| [Pose Estimation:](https://gluon-cv.mxnet.io/model_zoo/pose.html) <br/>detect human pose <br/> from images. | <a href=\"https://gluon-cv.mxnet.io/model_zoo/pose.html\"><img src=\"docs/_static/pose-estimation.svg\" alt=\"pose\" height=\"200\"/><\/a> | <a href=\"https://gluon-cv.mxnet.io/model_zoo/pose.html#simple-pose-with-resnet\">Simple Pose<\/a>|\n| [Video Action Recognition:](https://gluon-cv.mxnet.io/model_zoo/action_recognition.html) <br/>recognize human actions <br/> in a video. | <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\"><img src=\"docs/_static/action-recognition.png\" alt=\"action_recognition\" height=\"200\"/><\/a> | MXNet: <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">TSN<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">C3D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">I3D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">I3D_slow<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">P3D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">R3D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">R2+1D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">Non-local<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">SlowFast<\/a> <br/> PyTorch: <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">TSN<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">I3D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">I3D_slow<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">R2+1D<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">Non-local<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">CSN<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">SlowFast<\/a>, <a href=\"https://gluon-cv.mxnet.io/model_zoo/action_recognition.html\">TPN<\/a> |\n| [Depth Prediction:](https://gluon-cv.mxnet.io/model_zoo/depth.html) <br/>predict depth map <br/> from images. | <a href=\"https://gluon-cv.mxnet.io/model_zoo/depth.html\"><img src=\"docs/_static/depth.png\" alt=\"depth\" height=\"200\"/><\/a> | <a href=\"https://gluon-cv.mxnet.io/model_zoo/depth.html#kitti-dataset\">Monodepth2<\/a>|\n| [GAN:](https://github.com/dmlc/gluon-cv/tree/master/scripts/gan) <br/>generate visually deceptive images | <a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/gan\"><img src=\"https://github.com/dmlc/gluon-cv/raw/master/scripts/gan/wgan/fake_samples_400000.png\" alt=\"lsun\" height=\"200\"/><\/a> | <a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/gan/wgan\">WGAN<\/a>, <a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/gan/cycle_gan\">CycleGAN<\/a>, <a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/gan/stylegan\">StyleGAN<\/a>|\n| [Person Re-ID:](https://github.com/dmlc/gluon-cv/tree/master/scripts/re-id/baseline) <br/>re-identify pedestrians across scenes | <a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/re-id/baseline\"><img src=\"https://user-images.githubusercontent.com/3307514/46702937-f4311800-cbd9-11e8-8eeb-c945ec5643fb.png\" alt=\"re-id\" height=\"160\"/><\/a> |<a href=\"https://github.com/dmlc/gluon-cv/tree/master/scripts/re-id/baseline\">Market1501 baseline<\/a> |\n\n# Installation\n\nGluonCV is built on top of MXNet and PyTorch. Depending on the individual model implementation(check [model zoo](https://gluon-cv.mxnet.io/model_zoo/index.html) for the complete list), you will need to install either one of the deep learning framework. Of course you can always install both for the best coverage.\n\nPlease also check [installation guide](https://cv.gluon.ai/install.html) for a comprehensive guide to help you choose the right installation command for your environment.\n\n## Installation (MXNet)\n\nGluonCV supports Python 3.6 or later. The easiest way to install is via pip.\n\n### Stable Release\nThe following commands install the stable version of GluonCV and MXNet:\n\n```bash\npip install gluoncv --upgrade\n# native\npip install -U --pre mxnet -f https://dist.mxnet.io/python/mkl\n# cuda 10.2\npip install -U --pre mxnet -f https://dist.mxnet.io/python/cu102mkl\n```\n\n**The latest stable version of GluonCV is 0.8 and we recommend mxnet 1.6.0/1.7.0**\n\n### Nightly Release\n\nYou may get access to latest features and bug fixes with the following commands which install the nightly build of GluonCV and MXNet:\n\n```bash\npip install gluoncv --pre --upgrade\n# native\npip install -U --pre mxnet -f https://dist.mxnet.io/python/mkl\n# cuda 10.2\npip install -U --pre mxnet -f https://dist.mxnet.io/python/cu102mkl\n```\n\nThere are multiple versions of MXNet pre-built package available. Please refer to [mxnet packages](https://gluon-crash-course.mxnet.io/mxnet_packages.html) if you need more details about MXNet versions.\n\n\n## Installation (PyTorch)\n\nGluonCV supports Python 3.6 or later. The easiest way to install is via pip.\n\n### Stable Release\nThe following commands install the stable version of GluonCV and PyTorch:\n\n```bash\npip install gluoncv --upgrade\n# native\npip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html\n# cuda 10.2\npip install torch==1.6.0 torchvision==0.7.0\n```\nThere are multiple versions of PyTorch pre-built package available. Please refer to [PyTorch](https://pytorch.org/get-started/previous-versions/) if you need other versions.\n\n\n**The latest stable version of GluonCV is 0.8 and we recommend PyTorch 1.6.0**\n\n### Nightly Release\n\nYou may get access to latest features and bug fixes with the following commands which install the nightly build of GluonCV:\n\n```bash\npip install gluoncv --pre --upgrade\n# native\npip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html\n# cuda 10.2\npip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html\n```\n\n\n# Docs 📖\nGluonCV documentation is available at [our website](https://gluon-cv.mxnet.io/index.html).\n\n# Examples\n\nAll tutorials are available at [our website](https://gluon-cv.mxnet.io/index.html)!\n\n- [Image Classification](http://gluon-cv.mxnet.io/build/examples_classification/index.html)\n\n- [Object Detection](http://gluon-cv.mxnet.io/build/examples_detection/index.html)\n\n- [Semantic Segmentation](http://gluon-cv.mxnet.io/build/examples_segmentation/index.html)\n\n- [Instance Segmentation](http://gluon-cv.mxnet.io/build/examples_instance/index.html)\n\n- [Video Action Recognition](https://gluon-cv.mxnet.io/build/examples_action_recognition/index.html)\n\n- [Depth Prediction](https://gluon-cv.mxnet.io/build/examples_depth/index.html)\n\n- [Generative Adversarial Network](https://github.com/dmlc/gluon-cv/tree/master/scripts/gan)\n\n- [Person Re-identification](https://github.com/dmlc/gluon-cv/tree/master/scripts/re-id/)\n\n# Resources\n\nCheck out how to use GluonCV for your own research or projects.\n\n- For background knowledge of deep learning or CV, please refer to the open source book [*Dive into Deep Learning*](http://d2l.ai/). If you are new to Gluon, please check out [our 60-minute crash course](http://gluon-crash-course.mxnet.io/).\n- For getting started quickly, refer to notebook runnable examples at [Examples](https://gluon-cv.mxnet.io/build/examples_classification/index.html).\n- For advanced examples, check out our [Scripts](http://gluon-cv.mxnet.io/master/scripts/index.html).\n- For experienced users, check out our [API Notes](https://gluon-cv.mxnet.io/api/data.datasets.html#).\n\n# Citation\n\nIf you feel our code or models helps in your research, kindly cite our papers:\n\n```\n@article{gluoncvnlp2020,\n  author  = {Jian Guo and He He and Tong He and Leonard Lausen and Mu Li and Haibin Lin and Xingjian Shi and Chenguang Wang and Junyuan Xie and Sheng Zha and Aston Zhang and Hang Zhang and Zhi Zhang and Zhongyue Zhang and Shuai Zheng and Yi Zhu},\n  title   = {GluonCV and GluonNLP: Deep Learning in Computer Vision and Natural Language Processing},\n  journal = {Journal of Machine Learning Research},\n  year    = {2020},\n  volume  = {21},\n  number  = {23},\n  pages   = {1-7},\n  url     = {http://jmlr.org/papers/v21/19-429.html}\n}\n\n@article{he2018bag,\n  title={Bag of Tricks for Image Classification with Convolutional Neural Networks},\n  author={He, Tong and Zhang, Zhi and Zhang, Hang and Zhang, Zhongyue and Xie, Junyuan and Li, Mu},\n  journal={arXiv preprint arXiv:1812.01187},\n  year={2018}\n}\n\n@article{zhang2019bag,\n  title={Bag of Freebies for Training Object Detection Neural Networks},\n  author={Zhang, Zhi and He, Tong and Zhang, Hang and Zhang, Zhongyue and Xie, Junyuan and Li, Mu},\n  journal={arXiv preprint arXiv:1902.04103},\n  year={2019}\n}\n\n@article{zhang2020resnest,\n  title={ResNeSt: Split-Attention Networks},\n  author={Zhang, Hang and Wu, Chongruo and Zhang, Zhongyue and Zhu, Yi and Zhang, Zhi and Lin, Haibin and Sun, Yue and He, Tong and Muller, Jonas and Manmatha, R. and Li, Mu and Smola, Alexander},\n  journal={arXiv preprint arXiv:2004.08955},\n  year={2020}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AA84:24970A:17EB54:5D1C1D:6AB9217E"},"text_sha256":"69ad75cdc622c7bb335df1252407c70a8a34a338474d50ad886967bc03a74621"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"DeepLabCut/DeepLabCut","input_row":{"repository":"DeepLabCut/DeepLabCut","url":"https://github.com/DeepLabCut/DeepLabCut","name":"DeepLabCut","owner":"DeepLabCut","description":"Official implementation of DeepLabCut: Markerless pose estimation of user-defined features with deep learning for all animals incl. humans","language":"Python","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":5779,"issues":2187,"created_at":"2018-03-26T22:29:12Z","updated_at":"2026-09-27T06:19:58Z","first_commit_at":"2018-04-10T21:21:14Z","last_commit_at":"2026-09-17T09:52:32Z","activity_months":101.23,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:22.562Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"DeepLabCut/DeepLabCut","visibility":"public","created_at":"2018-03-26T22:29:12Z","updated_at":"2026-09-27T06:19:58Z","private":false,"fork":false,"archived":false,"stargazers_count":5779,"open_issues_count":48,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"3123","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:185B644:1C7BDCE:6AB92932"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3122","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17A3676:1BC3CE0:6AB92932"},"commit":{"sha":"24177f0a8ebb3117909618e145ab31a8392464a5","url":"https://github.com/DeepLabCut/DeepLabCut/commit/24177f0a8ebb3117909618e145ab31a8392464a5","date":"2018-05-24T22:38:01Z","author_date":"2018-05-24T22:38:01Z","committer_date":"2018-05-24T22:38:01Z","tree_sha":"0d80bf34aaedc1592a0b0b1340e0ed3d66aae896","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3121","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0806:DC698:17E2CE5:1C028BA:6AB92933"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15269,"blob_sha":"2b2491a92153bafd45a5ba41bafa5498ca272995","priority":0}],"documents":[{"path":"README.md","size":15269,"blob_sha":"2b2491a92153bafd45a5ba41bafa5498ca272995","priority":0,"status":200,"text":"# DeepLabCut\n\nA toolbox for markerless tracking of body parts of animals in lab settings performing various tasks, like [trail tracking](https://vnmurthylab.org/),  [reaching in mice](http://www.mousemotorlab.org/) and various Drosophila behaviors (see [Mathis et al.](https://arxiv.org/abs/1804.03142v1) for details). There is, however, nothing specific that makes the toolbox only applicable to these tasks or species (the toolbox has also already been successfully applied to rats, various fish species and [race horses](https://twitter.com/TrackingActions/status/998339007745527808)).  \n\n<p align=\"center\">\n<img src=\"/Documentation/githubfig-01-01.png\" width=\"90%\">\n<\/p>\n\nPlease see www.mousemotorlab.org/deeplabcut for video demonstrations of automated tracking.\n\nThis work utilizes the feature detectors (ResNet + readout layers) of one of the state-of-the-art algorithms for human pose estimation by [Insafutdinov et al.](https://arxiv.org/abs/1605.03170), called DeeperCut, which inspired the name for our toolbox (see references below).\n\nIn our preprint we demonstrate that those feature detectors can be trained with few labeled images to achieve excellent tracking accuracy for various body parts in lab tasks. Please check it out:\n\n\"[Markerless tracking of user-defined features with deep learning](https://arxiv.org/abs/1804.03142v1)\" by Alexander Mathis, Pranav Mamidanna, Taiga Abe, Kevin M. Cury, Venkatesh N. Murthy, Mackenzie W. Mathis* and Matthias Bethge*\n\n# Overview:\n\nA **typical use case** is: \n\nA user has **videos of an animal (or animals) performing a behavior** and wants to extract the **position of various body parts** from images/video frames. Ideally these parts are visible to a human annotator, yet potentially difficult to extract by standard image processing methods due to changes in background, etc. \n\nTo solve this problem, one can train feature detectors in an end-to-end fashion. In order to do so one should:\n\n  - label points of interests (e.g. joints, snout, etc.) from distinct frames (containing different poses, individuals etc.)\n  - trains a deep neural network while leaving out labeled frames to check if it generalizes well\n  - once the network is trained it can be used to analyze videos in a fast way \n\nThe general pipeline for first time use is:\n\n**Install --> Extract frames -->  Label training data -->  Train DeeperCut feature detectors -->  Apply your trained network to unlabeled data -->  Extract trajectories for analysis.**\n\n<p align=\"center\">\n<img src=\"/Documentation/deeplabcutFig-01.png\" width=\"70%\">\n<\/p>\n\n# Installation and Requirements:\n\n- Hardware:\n     - Computer: For reference, we use Ubuntu 16.04 LTS and run a docker container that has TensorFlow, etc. installed (*available in a future release). One should also be able to run the code in Windows or MacOS (but we never tried). You will need a strong GPU such as the [NVIDIA GeForce 1080 Ti](https://www.nvidia.com/en-us/geforce/products/10series/geforce-gtx-1080/).\n     \n- Software: \n     - You will need [TensorFlow](https://www.tensorflow.org/) (we used 1.0 for figures in papers, later versions also work with the provided code (we tested **TensorFlow versions 1.0 to 1.4**, but recommend **1.0**, ses below) for Python 3 with GPU support (otherwise training and running is extremely slow). Please check your CUDA and [TensorFlow installation](https://www.tensorflow.org/install/) with this line (below), and you can test that your GPU is being properly engaged with these additional [tips](https://www.tensorflow.org/programmers_guide/using_gpu).\n\n      $ sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))\n\nPlease also install:\n\n     - Install Sypder (or equivalent IDE) and/or Jupyter Notebook\n     - Clone (or download) the code we provide\n     - You will also need to install the following Python packages (in the terminal type):\n\n      $ pip install scipy scikit-image matplotlib pyyaml easydict \n      $ pip install moviepy imageio tqdm tables\n      $ git clone https://github.com/AlexEMG/DeepLabCut.git\n      \n\n# Test the Toolbox installation & code:\n\n- If you want to run the code on our demo video, a mouse reaching video from [Mathis et al., 2017](http://www.cell.com/neuron/fulltext/S0896-6273(17)30157-5), you will NOT run code from sections **(0)**, **(1)**, or **(2)** below, as we have created labels for this video already (and e.g. **(0)** will extract different frames that are thus not labeled). \n\n- We recommend looking at the first notebooks, then proceed to **(3) Formatting the data** below. Also note that this demo data contains so few labeled frames that one should not train the network (other then for brief testing) on the corresponding data set and expect it to work properly - it is only for demo purposes. \n\n# Using the Toolbox code - Labeling and Training Instructions:\n - The following steps document using the code with either Python scripts or in Jupyter Notebooks:\n\n**(0) Configuration of your project:**\nOpen the **\"myconfig.py\"** file and set the global variables for your dataset. (Demo users, don't edit this if you want to test on the supplied video)\n\n**(1) Selecting data to label:** \nIn the folder \"Generating_a_Training_Set\", the provided code allows you to select a subset of frames in a video(s) for labeling. Make sure videos you want to use for the training set are in a sub-folder under \"Generating_a_Training_Set\" or change the video path accordingly in **\"myconfig.py\"*. \n\n   - **IDE users:**\n\n     - Open \"Step1_SelectRandomFrames_fromVideos.py\" and crop videos if behavior of interest only happens in subset of frame (see Step1_SelectRandomFrames_fromVideos.py for detailed instructions; edit in Spyder or your favorite integrated development environment (IDE) an run the script). \n            \n   - **Juypter Users:** use the Step1_.._demo.ipynb file* - In general, the supplied Jupyter Notebook is helpful to optimize the video cropping step.\n\nGenerally speaking, one should create a training set that reflects the diversity of the behavior with respect to postures, animal identities, etc. of the data that will be analyzed. This code randomly selects frames from the videos in a temporally uniformly distributed way. This is fine when the postures vary accordingly. However, the behavior might be sparse (as in the case of reaching, where the reach and pull is very fast and the mouse is not moving much between trials). However, one can extract various example videos of different pulls, then this code will sample the behavior well. One should take this into account when selecting frames to label (i.e. because you can label so little data, be sure your selected frames capture the full breadth of the behavior. You may want to additionally hand select extra frames of interest). \n            \n**(2) Label the frames:**\n\n   - You should label a sufficient number of frames with the anatomical locations of your choice. For the behaviors we have tested so far, 100-200 frames gave good results (see preprint). Depending on your required accuracy and the nature of the scene statistics more training data might be necessary. Try to label consistently similar spots (e.g. on wrist that is very large, try to label the same location).\n     \n   - Labeling can be done in any program, but we recommend using [Fiji](https://fiji.sc/). In Fiji one can simply open the images, create a (virtual) stack* (in brief, in fiji: File > Import > Image Sequence > (check \"virtual stack\")), then use the \"Multi-point Tool\" to label frames. You scroll through the frames and click on as many points as you wish in the same order on each frame. Then simply measure and save the resulting .csv file (Analyze>Measure (or simple Ctrl+M)). \n\n   - You can either store one .csv file per folder that contains all body parts in a cyclical way (same, repeating order). If a particular body part is not visible in a frame, then click close to (0,0) to later exclude those labels (see description in `myconfig.py` for details). In this case, set `multibodypartsfile=True` and put the name of the corresponding csv file under `multibodypartsfilename` in `myconfig.py`. Furthermore, make sure that the sequence of body parts has exactly the same order as the cyclically labeled body parts. Alternatively, you can put one csv file per body part and store them with the names defined in `bodypart` list of `myconfig.py`. In this case set `multibodypartsfile=False`.\n     \n   *To open virtual stack see: https://imagej.nih.gov/ij/plugins/virtual-opener.html  The virtual stack is helpful when the images have different sizes. This way they are not rescaled and the label information does not need to be rescaled.\n\n<p align=\"center\">\n<img src=\"/Documentation/img0000_labels.jpg\" width=\"60%\">\n<\/p>\n\n**(3) Formating the data I:**\n\n  - **IDE users:**\n The code \"Step2_ConvertingLabels2DataFrame.py\" creates a data structure in [pandas](https://pandas.pydata.org/) (stored as .h5 and .csv) combining the various labels together with the (local) file path of the images. This data structure also keeps track of who labeled the data and allows to combine data from multiple labelers. \n\nKeep in mind that \".csv\" files for each bodypart or multiple bodyparts listed in the myconfig.py file should exist in the folder alongside the individual images.\n\n   - **Juypter Users:** use the Step2_.._demo.ipynb file\n   \n**(4) Checking the formated data:**\n     \n After this step, you may **check** if the data was loaded correctly and all the labels are properly placed (Use \"Step3_CheckLabels.py\").\n \n   - **Juypter Users:** use the Step3_.._demo.ipynb file\n\n**(5) Formating the data II:** Next split the labeled data into test and train sets for benchmarking (\"Step4_GenerateTrainingFileFromLabelledData.py\"). This step will create a \".mat\" file, which is used by DeeperCut as well as a \".yaml\" file containing meta information with regard to the parameters of the DeeperCut. Before this step consider changing the parameters in 'pose_cfg.yaml'.  This file also contains short descriptions of what these parameters mean. Generally speaking pos_dist_thresh and global_scale will be of most importance. Then run the code. This file will create a folder with the training data as well as a folder for training the corresponding model in DeeperCut. \n\n   - **Juypter Users:** use the Step4_.._demo.ipynb file\n\n   - The output will be two folders for train and test data (with their respective yaml files)\n\n **(6) Training the deep neural network:**\n    \nThe folder pose-tensorflow contains an earlier, minimal yet sufficient for our purposes variant of [DeeperCut](https://github.com/eldar/pose-tensorflow), which we tested for **TensorFlow 1.0** (which we recommend). All features other than simultanous evaluation for multiple snapshots (`Step1_EvaluateModelonDataset.py`) work for **TensorFlow** versions up to **1.4**. This script also works for single snapshots, see [Issue 8](https://github.com/AlexEMG/DeepLabCut/issues/8) for details. Before training a model for the first time you need to download the weights for the [ResNet pretrained on ImageNet from tensorflow.org](https://github.com/tensorflow/models/tree/master/official/resnet) (~200MB). To do that: \n    \n     $ cd pose-tensorflow/models/pretrained\n     $ ./download.sh\n    \nNext copy the two folders generated in step **(5) Formating the data II** into the **models** folder of pose-tensorflow (i.e. pose-tensorflow/models/). We have already done this for the example project, which you will find there. Then (in a terminal) navigate to the subfolder \"train\" of the machine file, i.e. in our case and then start training (good luck!)\n    \n     $ cd pose-tensorflow/models/reachingJan30-trainset95shuffle1/train\n     $ TF_CUDNN_USE_AUTOTUNE=0 CUDA_VISIBLE_DEVICES=0 python3 ../../../train.py \n\nIf your machine has multiple GPUs, you can select which GPU you want to run \non by setting the environment variable, eg. CUDA_VISIBLE_DEVICES=0.\n\nTips: You can also stop during a training, and restart from a snapshot (aka checkpoint):\nJust change the init_weights term, i.e. instead of \"init_weights: ../../pretrained/resnet_v1_50.ckpt\"  put \"init_weights: ./snapshot-insertthe#ofstepshere\" (i.e. 10,000). Train for several thousands of iterations until the loss plateaus. \n\n**(7) Evaluate your network:**\n     \nIn the folder \"Evaluation-tools\", you will find code to evaluate the performance of the trained network on the whole data set (train and test images).\n\n     $ CUDA_VISIBLE_DEVICES=0 python3 Step1_EvaluateModelonDataset.py #to evaluate your model [needs TensorFlow]\n     $ python3 Step2_AnalysisofResults.py  #to compute test & train errors for your trained model\n\n **(8) Run the trained network on other videos and label videos results**\n \nAfter successfully training and finding low generalization error for the network, you can extract labeled points and poses from all videos and plot them above frames. Of course one can use the extracted poses in many other ways.\n \n   - To begin, first edit the myconfig_analysis.py file \n     \n   - For extracting posture from a folder with videos run (\"CUDA_VISIBLE_DEVICES=0 python3 AnalyzeVideos.py\") and then make labeled videos (\"MakingLabeledVideo.py\").\n\n# Contribute:\n\n- Issue Tracker: https://github.com/AlexEMG/DeepLabCut/issues\n- Source Code: https://github.com/AlexEMG/DeepLabCut\n\n# Support:\n\nIf you are having issues, please let us know ([Issue Tracker](https://github.com/AlexEMG/DeepLabCut/issues)). \nFor questions feel free to reach out to: [alexander.mathis@bethgelab.org] or [mackenzie@post.harvard.edu]\n\n# Code contributors:\n\n[Alexander Mathis](https://github.com/AlexEMG), [Mackenzie Mathis](https://github.com/MMathisLab),and the DeeperCut authors for the feature detector code. Edits and suggestions by [Jonas Rauber](https://github.com/jonasrauber), [Taiga Abe](https://github.com/cellistigs), [Jonny Saunders](https://github.com/sneakers-the-rat) and [Brandon Forys](https://github.com/bf777). The feature detector code is based on Eldar Insafutdinov's TensorFlow implementation of [DeeperCut](https://github.com/eldar/pose-tensorflow). Please check out the following references for details:\n\n\n# References:\n\n    @inproceedings{insafutdinov2017cvpr,\n\t    title = {ArtTrack: Articulated Multi-person Tracking in the Wild},\n\t    booktitle = {CVPR'17},\n\t    url = {http://arxiv.org/abs/1612.01465},\n\t    author = {Eldar Insafutdinov and Mykhaylo Andriluka and Leonid Pishchulin and Siyu Tang and Evgeny Levinkov and Bjoern Andres and Bernt Schiele}\n    }\n\n    @article{insafutdinov2016eccv,\n        title = {DeeperCut: A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model},\n\t    booktitle = {ECCV'16},\n        url = {http://arxiv.org/abs/1605.03170},\n        author = {Eldar Insafutdinov and Leonid Pishchulin and Bjoern Andres and Mykhaylo Andriluka and Bernt Schiele}\n    }\n    \n    @misc{1804.03142,\n\tAuthor = {Alexander Mathis and Pranav Mamidanna and Taiga Abe and Kevin M. Cury and Venkatesh N. Murthy and Mackenzie W. Mathis and Matthias Bethge},\n\tTitle = {Markerless tracking of user-defined features with deep learning},\n\tYear = {2018},\n\tEprint = {arXiv:1804.03142},\n\t}\n\n# License:\n\nThis project is licensed under the GNU Lesser General Public License v3.0.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86A8:3E724:17B0F4:5CE3A9:6AB92180"},"text_sha256":"36241b3569856cd4a4461ae6db5cb6665544dcf61b21e9c53608b7e0205c1899"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3120","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:1786C66:1BA5C48:6AB92934"},"commit":{"sha":"89aa0237f2a32a822c68b90bd397121204bed7c0","url":"https://github.com/DeepLabCut/DeepLabCut/commit/89aa0237f2a32a822c68b90bd397121204bed7c0","date":"2026-06-29T08:32:17Z","author_date":"2026-06-29T08:32:17Z","committer_date":"2026-06-29T08:32:17Z","tree_sha":"dd530113895f3166c47559b729027a5a7caa2ca6","message_first_line":"Docs audit [April 2026]: Full version (#3341)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3119","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:17DE6E9:1BFED57:6AB92934"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":30204,"blob_sha":"3c2ca193cc1ba63be2b198b4bdee2516bcb328e9","priority":0}],"documents":[{"path":"README.md","size":30204,"blob_sha":"3c2ca193cc1ba63be2b198b4bdee2516bcb328e9","priority":0,"status":200,"text":"<div align=\"center\">\n\n\n<p align=\"center\">\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1628250004229-KVYD7JJVHYEFDJ32L9VJ/DLClogo2021.jpg?format=1000w\" width=\"95%\">\n<\/p>\n\n<p align=\"center\">\n\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1619609897110-TKSTWKEM6HTGXID9D489/ke17ZwdGBToddI8pDm48kAvjv6tW_eojYQmNU0ncbllZw-zPPgdn4jUwVcJE1ZvWEtT5uBSRWt4vQZAgTJucoTqqXjS3CfNDSuuf31e0tVHBSTXHtjUKlhRtWJ1Vo6l1B2bxJtByvWSjL6Vz3amc5yb8BodarTVrzIWCp72ioWw/triMouseDLC.gif?format=180w\" height=\"150\">\n\n\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/daed7f16-527f-4150-8bdd-cbb20e267451/cheetah-ezgif.com-video-to-gif-converter.gif?format=180w\" height=\"150\">\n\n\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1534797521117-EIEUED03C68241QZ4KCK/ke17ZwdGBToddI8pDm48kAx9qLOWpcHWRGxWsJQSczRZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpwdr4GYy30vFzf31Oe7KAPZKkqgaiEgc5jBNdhZmDPlzxdkDSclo6ofuXZm6YCEhUo/MATHIS_2018_fly.gif?format=180w\" height=\"150\">\n\n\n[📚Documentation](https://deeplabcut.github.io/DeepLabCut/README.html) |\n[🛠️ Installation](https://deeplabcut.github.io/DeepLabCut/docs/installation.html) |\n[🌎 Home Page](https://www.deeplabcut.org) |\n[🐿🐴🐁🐘🐆 Model Zoo](http://www.mackenziemathislab.org/deeplabcut/) |\n[🚨 News](https://deeplabcut.github.io/DeepLabCut/README.html#news-and-in-the-news) |\n[🪲 Reporting Issues](https://github.com/DeepLabCut/DeepLabCut/issues)\n\n\n[🫶 Getting Assistance](https://deeplabcut.github.io/DeepLabCut/README.html#be-part-of-the-dlc-community) |\n[∞ DeepLabCut Online Course](https://github.com/DeepLabCut/DeepLabCut-Workshop-Materials/blob/master/DLCcourse.md) |\n[📝 Publications](https://deeplabcut.github.io/DeepLabCut/README.html#references) |\n[👩🏾‍💻👨‍💻 DeepLabCut AI Residency](https://www.deeplabcutairesidency.org/)\n\n\n![Version](https://img.shields.io/badge/python_version-3.10-purple)\n[![Downloads](https://pepy.tech/badge/deeplabcut)](https://pepy.tech/project/deeplabcut)\n[![Downloads](https://pepy.tech/badge/deeplabcut/month)](https://pepy.tech/project/deeplabcut)\n[![PyPI version](https://badge.fury.io/py/deeplabcut.svg)](https://badge.fury.io/py/deeplabcut)\n[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"><\/a>\n[![GitHub stars](https://img.shields.io/github/stars/DeepLabCut/DeepLabCut.svg?style=social&label=Star)](https://github.com/DeepLabCut/DeepLabCut)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/deeplabcut/deeplabcut.svg)](http://isitmaintained.com/project/deeplabcut/deeplabcut \"Average time to resolve an issue\")\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/deeplabcut/deeplabcut.svg)](http://isitmaintained.com/project/deeplabcut/deeplabcut \"Percentage of issues still open\")\n[![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&amp;url=https%3A%2F%2Fforum.image.sc%2Ftag%2Fdeeplabcut.json&amp;query=%24.topic_list.tags.0.topic_count&amp;colorB=brightgreen&amp;&amp;suffix=%20topics&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/deeplabcut)\n[![Gitter](https://badges.gitter.im/DeepLabCut/community.svg)](https://gitter.im/DeepLabCut/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n[![Twitter Follow](https://img.shields.io/twitter/follow/DeepLabCut.svg?label=DeepLabCut&style=social)](https://x.com/DeepLabCut)\n[![Generic badge](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![CZI's Essential Open Source Software for Science](https://chanzuckerberg.github.io/open-science/badges/CZI-EOSS.svg)](https://czi.co/EOSS)\n\n<\/div>\n\n# Welcome! 👋\n\n**DeepLabCut™️** is a toolbox for state-of-the-art markerless pose estimation of animals performing various behaviors. As long as you can see (label) what you want to track, you can use this toolbox, as it is animal and object agnostic. [Read a short development and application summary below](https://github.com/DeepLabCut/DeepLabCut#why-use-deeplabcut).\n\n# [Installation](https://deeplabcut.github.io/DeepLabCut/docs/installation.html)\n\nPlease click the link above for all the information you need to get started! Please note that currently we support only Python 3.10+ (see conda files for guidance).\n\n## Quick start\n\nDevelopers Stable Release: very quick start (Python 3.10+ required) to install\nDeepLabCut with the PyTorch engine\n\n- [1] [Install PyTorch](https://pytorch.org/get-started/locally/) (**install and then select the desired\nCUDA version if you want to use a GPU**): `pip install torch torchvision`.\nOr as an example for GPU support (please check pytorch docs to get the perfect version for your CUDA):\n```bash\nconda install pytorch cudatoolkit=11.3 -c pytorch\n```\n- [2] Then, install `DeepLabCut` (with all functions + the GUI):\n\n```bash\npip install --pre  \"deeplabcut[gui]\"\n```\nor `pip install  --pre \"deeplabcut\"` (headless\nversion with PyTorch)!\n\nTo use the TensorFlow (TF) engine: you'll need to run `pip install \"deeplabcut[gui,tf]\"` or `pip install \"deeplabcut[tf]\"` (headless version with TF). Alternatively, we also offer more targeted optional TensorFlow installs for specific CUDA setups, e.g. `deeplabcut[tf-cu11]` or `deeplabcut[tf-cu12]`. Please refer to our [installation instructions](https://deeplabcut.github.io/DeepLabCut/docs/installation.html) for more detailed information on Python version, CUDA compatibility, etc.\nWe aim to **deprecate the tensorflow backend** in version 3.2 (release date TBD).\n\n\n<!-- Link below just returns to the top of the README -->\n# Documentation: The DeepLabCut Process\n\nOur docs walk you through using DeepLabCut, and key API points. For an overview of the toolbox and workflow for project management, see our step-by-step at [Nature Protocols paper](https://doi.org/10.1038/s41596-019-0176-0).\n\n<!-- Course is outdated as of first 3.0rc release -->\n<!-- For a deeper understanding and more resources for you to get started with Python and DeepLabCut, please check out our free online course! https://deeplabcut.github.io/DeepLabCut/docs/course.html -->\n\n<p align=\"center\">\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1609244903687-US1SN063QIFJS4BP4IJD/ke17ZwdGBToddI8pDm48kFG9xAYub2PPnmh56PTVg7gUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8N_N4V1vUb5AoIIIbLZhVYxCRW4BPu10St3TBAUQYVKcAju5e7u9RZJEVbVQPZRu9xb_m-kUO2M3I1IeDqD4l8YcGqu2nZPx1UhKV8wc1ELN/dlc_overview_whitebkgrnd.png?format=2500w\" width=\"95%\">\n<\/p>\n\n# [Code demo](examples/README.md)\n\n🐭 Pose tracking of single animals demo [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DeepLabCut/DeepLabCut/blob/master/examples/COLAB/COLAB_DEMO_mouse_openfield.ipynb)\n\nSee [more demos here](https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/README.md).\nWe provide data and several Jupyter Notebooks, walking you through a demo dataset to test your installation, and another to run DeepLabCut from the start on your own data.\nWe also show how to use the code in Docker, and on Google Colab.\n\n# Why use DeepLabCut?\n\nDeepLabCut continues to be actively maintained and we strive to provide a user-friendly `GUI` and `API` for computer vision researchers and life scientists alike. This means we integrate state-of-the-art models and frameworks, while providing our \"best-guess\" defaults for life scientists.\nWe highly encourage you to read our papers to get a better understanding of what to use and how to modify the models for your setting.\n\n## Performance 🔥\n\nIn general, we provide all the tooling for you to train and use custom models with various high-performance backbones.\n\n## Pretrained Models\n\nWe also provide two foundation pretrained animal models: `SuperAnimal-Quadruped` & `SuperAnimal-TopViewMouse`.\nTo gauge their *out-of-distribution* performance, we provide the following tables.\n\nThese models are trained on the [SuperAnimal-Quadruped dataset](https://doi.org/10.5281/zenodo.10619172) with *AP-10K* held out for out-of-domain testing and the [SuperAnimal-TopViewMouse dataset](https://doi.org/10.5281/zenodo.13757509) with *DLC-openfield* held out for out-of-distribution testing (see [Ye et al. 2024](https://www.nature.com/articles/s41467-024-48792-2)).\nWe provide models that include AP-10K in the API (and GUI).\nNote, there are many different models to select from in DeepLabCut 3.0. We strongly recommend you check [this Guide](https://deeplabcut.github.io/DeepLabCut/docs/pytorch/architectures.html) for more details.\nThis table, and those below, give you a sense of performance in real-world complex in-the-wild and lab mouse data, respectively.\nThis [link provides the model weights](https://huggingface.co/mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped) to reproduce the numbers; but please note, our `full` models are in our DLClibrary and released in the API.\n\n<details open><summary>DLC 3.0 Pose Estimation (Top Down Models)<\/summary>\n\n| Model Name                    | Type       | mAP SA-Q on AP-10K | mAP SA-TVM on DLC-OpenField |\n|------------------------------|------------|---------------------|-----------------------------|\n| top_down_resnet_50           | Top-Down   |   54.9       |      93.5      |\n| top_down_resnet_101          | Top-Down   |   55.9       |      94.1      |\n| top_down_hrnet_w32            | Top-Down  |   52.5       |      92.4      |\n| top_down_hrnet_w48           | Top-Down   |   55.3       |      93.8      |\n| rtmpose_s                    | Top-Down     | 52.9        |     92.9      |\n| rtmpose_m                    | Top-Down     | 55.4         |    94.8      |\n| rtmpose_x                    | Top-Down     |  57.6        |    94.5      |\n<\/details>\n\n## The History\n\n### Development and Applications\n\nIn 2018, we demonstrated the capabilities for [trail tracking](https://vnmurthylab.org/), [reaching in mice](http://www.mousemotorlab.org/) and various Drosophila behaviors during egg-laying (see [Mathis et al.](https://www.nature.com/articles/s41593-018-0209-y) for details). There is, however, nothing specific that makes the toolbox only applicable to these tasks and/or species.\nThe toolbox has already been successfully applied (by us and others) to [rats](http://www.mousemotorlab.org/deeplabcut), humans, various fish species, bacteria, leeches, various robots, cheetahs, [mouse whiskers](http://www.mousemotorlab.org/deeplabcut) and [race horses](http://www.mousemotorlab.org/deeplabcut).\nDeepLabCut utilized the feature detectors (ResNets + readout layers) of one of the state-of-the-art algorithms for human pose estimation by Insafutdinov et al., called DeeperCut, which inspired the name for our toolbox (see references below). Since this time, the package has changed substantially.\nThe code has been re-tooled and re-factored since 2.1+: We have added faster and higher performance variants with MobileNetV2s, EfficientNets, and our own DLCRNet backbones (see [Pretraining boosts out-of-domain robustness for pose estimation](https://arxiv.org/abs/1909.11229) and [Lauer et al 2022](https://www.nature.com/articles/s41592-022-01443-0)). Additionally, we have improved the inference speed and provided both additional and novel augmentation methods, added real-time, and multi-animal support.\nIn v3.0+ we have updated the backend to support PyTorch. This brings not only an easier installation process for users, but performance gains, developer flexibility, and a lot of new tools! Importantly, the high-level API stays the same, so it will be a seamless transition for users 💜!\nWe currently provide state-of-the-art performance for animal pose estimation and the labs (M. Mathis Lab and A. Mathis Group) have both top journal and computer vision conference papers.\n\n<p align=\"center\">\n<img src=\"https://static1.squarespace.com/static/57f6d51c9f74566f55ecf271/t/5c3e47258a922d548c483247/1547585339819/ErrorvsTrainingsetSize.png?format=750w\" height=\"160\">\n<img src=\"https://static1.squarespace.com/static/57f6d51c9f74566f55ecf271/t/5c3e469d8a922d548c4828fa/1547585194560/compressionrobustness.png?format=750w\" height=\"160\">\n<img src=\"https://static1.squarespace.com/static/57f6d51c9f74566f55ecf271/t/5c3fbed74fa51acecd63deeb/1547681534736/MouseLocomotion_warren.gif?format=500w\" height=\"160\">\n<img src=\"https://static1.squarespace.com/static/57f6d51c9f74566f55ecf271/t/5c3fc1c6758d46950ce7eec7/1547682383595/cheetah.png?format=750w\" height=\"160\">\n<\/p>\n\n**Left:** Due to transfer learning it requires **little training data** for multiple, challenging behaviors (see [Mathis et al. 2018](https://www.nature.com/articles/s41593-018-0209-y) for details). **Mid Left:** The feature detectors are robust to video compression (see [Mathis/Warren](https://www.biorxiv.org/content/early/2018/10/30/457242) for details). **Mid Right:** It allows 3D pose estimation with a single network and camera (see [Mathis/Warren](https://www.biorxiv.org/content/early/2018/10/30/457242)). **Right:** It allows 3D pose estimation with a single network trained on data from multiple cameras together with standard triangulation methods (see [Nath* and Mathis* et al. 2019](https://doi.org/10.1038/s41596-019-0176-0)).\n\n### Ecosystem\n\n**DeepLabCut** is part of a larger open-source eco-system, providing behavioral tracking for neuroscience, ecology, medical, and technical applications.\nMoreover, many new tools are being actively developed. See [DLC-Utils](https://github.com/DeepLabCut/DLCutils) for some helper code.\n\n<p align=\"center\">\n<img src=\"https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1588292233203-FD1DVKAQYNV2TU91CO7R/ke17ZwdGBToddI8pDm48kIX24IsDPzy6M4KUaihfICJZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZamWLI2zvYWH8K3-s_4yszcp2ryTI0HqTOaaUohrI8PIxtGUdkzp028KVNnpOijF3PweOM5su6FUQHO6Wkh72Nw/dlc_eco.gif?format=1000w\" width=\"80%\">\n<\/p>\n\n### Code contributors\n\nDeepLabCut was originally developed by [Alexander Mathis](https://github.com/AlexEMG) & [Mackenzie Mathis](https://github.com/MMathisLab), and was extended in 2.0 with the core dev team consisting of [Tanmay Nath](https://github.com/meet10may) (2.0-2.1), [Jessy Lauer](https://github.com/jeylau) (2.1-2.4), and [Niels Poulsen](https://github.com/n-poulsen) (2.3-3.0).\nDeepLabCut is an open-source tool and has benefited from suggestions and edits by many individuals including early contributors: Mert Yuksekgonul, Tom Biasi, Richard Warren, Ronny Eichler, Hao Wu, Federico Claudi, Gary Kane and Jonny Saunders as well as the [100+ contributors](https://github.com/DeepLabCut/DeepLabCut/graphs/contributors).\nPlease see [AUTHORS](https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS) for more details!\n\n🤩 This is an actively developed package and we welcome community development and involvement:\n\n[![Contributors](https://contrib.rocks/image?repo=DeepLabCut/DeepLabCut)](https://github.com/DeepLabCut/DeepLabCut/graphs/contributors)\n\n\n# Get Assistance & be part of the DLC Community✨\n\n| 🚉 Platform                                                 | 🎯 Goal                                                                      | ⏱️ Estimated Response Time | 📢 Support Squad                        |\n|------------------------------------------------------------|-----------------------------------------------------------------------------|---------------------------|----------------------------------------|\n| GitHub - [Issues](https://github.com/DeepLabCut/DeepLabCut/issues)                                  | To report bugs and code issues🐛   (we encourage you to search issues first) | 2-5 days                  | DLC Core Dev Team                               |\n| GitHub - [Contributing](https://github.com/DeepLabCut/DeepLabCut/blob/master/CONTRIBUTING.md)                          | To contribute your expertise and experience🙏💯                               | 2-5 days                | DLC Core Dev Team                               |\n| [![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&amp;url=https%3A%2F%2Fforum.image.sc%2Ftag%2Fdeeplabcut.json&amp;query=%24.topic_list.tags.0.topic_count&amp;colorB=brightgreen&amp;&amp;suffix=%20topics&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/deeplabcut) <br /> 🐭Tag: DeepLabCut | To ask help and support questions 👋                                          | Promptly🔥                 | The DLC Community |\n|[![Gitter](https://badges.gitter.im/DeepLabCut/community.svg)](https://gitter.im/DeepLabCut/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)                               | To discuss with other users,  share ideas and collaborate💡                  | 2-5 days                    | The DLC Community                      |\n| [![BlueSky](https://img.shields.io/badge/BlueSky-%40deeplabcut-blue?logo=bluesky)](https://bsky.app/profile/deeplabcut.bsky.social)                                                  | To keep up with our latest news and updates 📢                               | 2-5 days                     | DLC Team                               |\n| [![Twitter Follow](https://img.shields.io/twitter/follow/DeepLabCut.svg?label=DeepLabCut&style=social)](https://x.com/DeepLabCut)                                                   | To keep up with our latest news and updates 📢                               | 2-5 days                     | DLC Team                               |\n<!-- | The DeepLabCut [AI Residency Program](https://www.deeplabcutairesidency.org/)                        | To come and work with us next summer👏                                       | Annually                  | DLC Team                               | -->\n<!-- | 🚧 GitHub DeepLabCut/[Roadmap](https://github.com/DeepLabCut/DeepLabCut/blob/master/docs/roadmap.md)                             | To learn more about our journey✈️                                            | N/A                       | N/A -->\n\n\n## References \\& Citations\n\nPlease see our [dedicated page](https://deeplabcut.github.io/DeepLabCut/docs/citation.html) on how to **cite DeepLabCut** 🙏 and our suggestions for your Methods section!\n\n## License\n\nThis project is primarily licensed under the GNU Lesser General Public License v3.0. Note that the software is provided \"as is\", without warranty of any kind, express or implied. If you use the code or data, please cite us! Note, artwork (DeepLabCut logo) and images are copyrighted; please do not take or use these images without written permission.\n\nSuperAnimal models are provided for research use only (non-commercial use).\n\n## Major Versions\n\n**For all versions, please see [here](https://github.com/DeepLabCut/DeepLabCut/releases).**\n\nVERSION 3.0: A whole new experience with PyTorch🔥. While the high-level API remains the same, the backend and developer friendliness have greatly improved, along with performance gains!\n\nVERSION 2.3: Model Zoo SuperAnimals, and a whole new GUI experience.\n\nVERSION 2.2: Multi-animal pose estimation, identification, and tracking with DeepLabCut is supported (as well as single-animal projects).\n\nVERSION 2.0-2.1: This is the **Python package** of [DeepLabCut](https://www.nature.com/articles/s41593-018-0209-y) that was originally released in Oct 2018 with our [Nature Protocols](https://doi.org/10.1038/s41596-019-0176-0) paper (preprint [here](https://www.biorxiv.org/content/10.1101/476531v1)).\nThis package includes graphical user interfaces to label your data, and take you from data set creation to automatic behavioral analysis. It also introduces an active learning framework to efficiently use DeepLabCut on large experimental projects, and data augmentation tools that improve network performance, especially in challenging cases.\n\nVERSION 1.0: The initial, Nature Neuroscience version of [DeepLabCut](https://www.nature.com/articles/s41593-018-0209-y) can be found in the history of git, or here: https://github.com/DeepLabCut/DeepLabCut/releases/tag/1.11\n\n# News\n\n## Major releases\n\n💜 We released a major update, moving from 2.x --> 3.x with the backend change to PyTorch\n\n💜 The DeepLabCut Model Zoo launches SuperAnimals, see more [here](https://deeplabcut.github.io/DeepLabCut/docs/ModelZoo.html).\n\n💜 **DeepLabCut supports multi-animal pose estimation!** maDLC is out of beta/rc mode and beta is deprecated, thanks to the testers out there for feedback! Your labeled data will be backwards compatible, but not all other steps. Please see the [new `2.2+` releases](https://github.com/DeepLabCut/DeepLabCut/releases) for what's new & how to install it, please see our new [paper, Lauer et al 2022](https://www.nature.com/articles/s41592-022-01443-0), and the [new docs]( https://deeplabcut.github.io/DeepLabCut) on how to use it!\n\n💜 We support multi-animal re-identification, see [Lauer et al 2022](https://www.nature.com/articles/s41592-022-01443-0).\n\n💜 We have a **real-time** package available! [DLC-live on GitHub](https://github.com/DeepLabCut/DeepLabCut-live) and [DLC-live-GUI](https://github.com/DeepLabCut/DeepLabCut-live-GUI)\n\n## In the news\n\n- June 2024: Our second DLC paper ['Using DeepLabCut for 3D markerless pose estimation across species and behaviors'](https://www.nature.com/articles/s41596-019-0176-0) in Nature Protocols has surpassed 1,000 Google Scholar citations!\n- May 2024: DeepLabCut was featured in Nature: ['DeepLabCut: the motion-tracking tool that went viral'](https://www.nature.com/articles/d41586-024-01474-x)\n- January 2024: Our original paper ['DeepLabCut: markerless pose estimation of user-defined body parts with deep learning'](https://www.nature.com/articles/s41593-018-0209-y) in Nature Neuroscience has surpassed 3,000 Google Scholar citations!\n- December 2023: DeepLabCut hit 600,000 downloads!\n- October 2023: DeepLabCut celebrates a milestone with 4,000 🌟 in Github!\n- July 2023: The user forum is very active with more than 1k questions and answers: [![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&amp;url=https%3A%2F%2Fforum.image.sc%2Ftag%2Fdeeplabcut.json&amp;query=%24.topic_list.tags.0.topic_count&amp;colorB=brightgreen&amp;&amp;suffix=%20topics&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/deeplabcut)\n- May 2023: The Model Zoo is now fully integrated into the DeepLabCut GUI, making it easier than ever to access a variety of pre-trained models. Check out the accompanying paper: [SuperAnimal pretrained pose estimation models for behavioral analysis by Ye et al.](https://arxiv.org/abs/2203.07436)\n- December 2022: DeepLabCut hits 450,000 downloads and 2.3 is the new stable release\n- August 2022: DeepLabCut hit 400,000 downloads\n- August 2021: 2.2 becomes the new stable release for DeepLabCut.\n- July 2021: Docs are now at https://deeplabcut.github.io/DeepLabCut and we now include TensorFlow 2 support!\n- May 2021: DeepLabCut hit 200,000 downloads! Also, Our preprint on 2.2, multi-animal DeepLabCut is released!\n- Jan 2021: [Pretraining boosts out-of-domain robustness for pose estimation](https://openaccess.thecvf.com/content/WACV2021/html/Mathis_Pretraining_Boosts_Out-of-Domain_Robustness_for_Pose_Estimation_WACV_2021_paper.html) published in the IEEE Winter Conference on Applications of Computer Vision. We also added EfficientNet backbones to DeepLabCut, those are best trained with cosine decay (see paper). To use them, just pass \"`efficientnet-b0`\" to \"`efficientnet-b6`\" when creating the trainingset!\n- Dec 2020: We released a real-time package that allows for online pose estimation and real-time feedback. See [DLClive.deeplabcut.org](http://DLClive.deeplabcut.org).\n- 5/22 2020: We released 2.2beta5. This beta release has some of the features of DeepLabCut 2.2, whose major goal is to integrate multi-animal pose estimation to DeepLabCut.\n- Mar 2020: Inspired by suggestions we heard at this weeks CZI's Essential Open Source Software meeting in Berkeley, CA we updated our [docs](docs/UseOverviewGuide.md). Let us know what you think!\n- Feb 2020: Our [review on animal pose estimation is published!](https://www.sciencedirect.com/science/article/pii/S0959438819301151)\n- Nov 2019: DeepLabCut was recognized by the Chan Zuckerberg Initiative (CZI) with funding to support this project. Read more in the [Harvard Gazette](https://news.harvard.edu/gazette/story/newsplus/harvard-researchers-awarded-czi-open-source-award/), on [CZI's Essential Open Source Software for Science site](https://chanzuckerberg.com/eoss/proposals/) and in their [Medium post](https://medium.com/@cziscience/how-open-source-software-contributors-are-accelerating-biomedicine-1a5f50f6846a)\n- Oct 2019: DLC 2.1 released with lots of updates. In particular, a Project Manager GUI, MobileNetsV2, and augmentation packages (Imgaug and Tensorpack). For detailed updates see [releases](https://github.com/DeepLabCut/DeepLabCut/releases)\n- Sept 2019: We published two preprints. One showing that [ImageNet pretraining contributes to robustness](https://arxiv.org/abs/1909.11229) and a [review on animal pose estimation](https://arxiv.org/abs/1909.13868). Check them out!\n- Jun 2019: DLC 2.0.7 released with lots of updates. For updates see [releases](https://github.com/DeepLabCut/DeepLabCut/releases)\n- Feb 2019: DeepLabCut joined [twitter](https://x.com/deeplabcut) [![Twitter Follow](https://img.shields.io/twitter/follow/DeepLabCut.svg?label=DeepLabCut&style=social)](https://x.com/DeepLabCut)\n- Jan 2019: We hosted workshops for DLC in Warsaw, Munich and Cambridge. The materials are available [here](https://github.com/DeepLabCut/DeepLabCut-Workshop-Materials)\n- Jan 2019: We joined the Image Source Forum for user help: [![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&amp;url=https%3A%2F%2Fforum.image.sc%2Ftag%2Fdeeplabcut.json&amp;query=%24.topic_list.tags.0.topic_count&amp;colorB=brightgreen&amp;&amp;suffix=%20topics&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/deeplabcut)\n\n- Nov 2018: We posted a detailed guide for DeepLabCut 2.0 on [BioRxiv](https://www.biorxiv.org/content/early/2018/11/24/476531). It also contains a case study for 3D pose estimation in cheetahs.\n- Nov 2018: Various (post-hoc) analysis scripts contributed by users (and us) will be gathered at [DLCutils](https://github.com/DeepLabCut/DLCutils). Feel free to contribute! In particular, there is a script guiding you through\nimporting a project into the new data format for DLC 2.0\n- Oct 2018: new pre-print on the speed video-compression and robustness of DeepLabCut on [BioRxiv](https://www.biorxiv.org/content/early/2018/10/30/457242)\n- Sept 2018: Nature Lab Animal covers DeepLabCut: [Behavior tracking cuts deep](https://www.nature.com/articles/s41684-018-0164-y)\n- Kunlin Wei & Konrad Kording write a very nice News & Views on our paper: [Behavioral Tracking Gets Real](https://www.nature.com/articles/s41593-018-0215-0)\n- August 2018: Our [preprint](https://arxiv.org/abs/1804.03142) appeared in [Nature Neuroscience](https://www.nature.com/articles/s41593-018-0209-y)\n- August 2018: NVIDIA AI Developer News: [AI Enables Markerless Animal Tracking](https://news.developer.nvidia.com/ai-enables-markerless-animal-tracking/)\n- July 2018: Ed Yong covered DeepLabCut and interviewed several users for the [Atlantic](https://www.theatlantic.com/science/archive/2018/07/deeplabcut-tracking-animal-movements/564338).\n- April 2018: first DeepLabCut preprint on [arXiv.org](https://arxiv.org/abs/1804.03142)\n\n  # Funding\n\nWe are grateful for the following support and funding over the years!\nThis software project was supported in part by the **Essential Open Source Software for Science (EOSS)** program at **Chan Zuckerberg Initiative** (cycles 1, 3, 3-DEI, 4), and jointly with the **Kavli Foundation** for **EOSS Cycle 6**!\nWe also thank the **Rowland Institute** at **Harvard** for funding from 2017-2020, and **EPFL** from 2020-present.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"09D8:3B6DE:16F1EC:5C248B:6AB92182"},"text_sha256":"6abfa5d36ac6cc6926677cff26357fcc44af0dce6fdf379a6490dd34bb357150"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/SynapseML","input_row":{"repository":"microsoft/SynapseML","url":"https://github.com/microsoft/SynapseML","name":"SynapseML","owner":"microsoft","description":"Simple and Distributed Machine Learning Python Library porting ML algorithms for Spark","language":"Scala","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5247,"issues":783,"created_at":"2017-06-05T08:23:44Z","updated_at":"2026-09-25T18:51:01Z","first_commit_at":"2017-06-02T15:10:46Z","last_commit_at":"2026-09-25T03:58:58Z","activity_months":111.75,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:25.490Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/SynapseML","visibility":"public","created_at":"2017-06-05T08:23:44Z","updated_at":"2026-09-25T18:51:01Z","private":false,"fork":false,"archived":false,"stargazers_count":5247,"open_issues_count":142,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3118","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:177E0D4:1B9D013:6AB92935"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3117","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:128264E:15D291C:6AB92935"},"commit":{"sha":"5968833384c1180f15590f3dfe2cedb744abe4ae","url":"https://github.com/microsoft/SynapseML/commit/5968833384c1180f15590f3dfe2cedb744abe4ae","date":"2018-05-23T03:18:43Z","author_date":"2018-04-09T02:47:35Z","committer_date":"2018-05-23T03:18:43Z","tree_sha":"fe8f2c92c3c46a2bea6951ee1f7105de9e1a106d","message_first_line":"Add consolidation option to PowerBI sink"},"tree_request_status":200,"tree_rate":{"github_remaining":"3116","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:17DB5EA:1BFB48E:6AB92936"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10895,"blob_sha":"50a6d7d64e73216196752944a41f898be7a89036","priority":0}],"documents":[{"path":"README.md","size":10895,"blob_sha":"50a6d7d64e73216196752944a41f898be7a89036","priority":0,"status":200,"text":"![MMLSpark](https://mmlspark.azureedge.net/icons/mmlspark.svg)\nMicrosoft Machine Learning for Apache Spark\n===========================================\n\n<img title=\"Build Status\" align=\"right\"\n     src=\"https://mmlspark.azureedge.net/icons/BuildStatus.svg\" />\n\nMMLSpark provides a number of deep learning and data science tools for [Apache\nSpark](https://github.com/apache/spark), including seamless integration of\nSpark Machine Learning pipelines with [Microsoft Cognitive Toolkit\n(CNTK)](https://github.com/Microsoft/CNTK) and\n[OpenCV](http://www.opencv.org/), enabling you to quickly create powerful,\nhighly-scalable predictive and analytical models for large image and text\ndatasets.\n\nMMLSpark requires Scala 2.11, Spark 2.1+, and either Python 2.7 or Python 3.5+.\nSee the API documentation [for\nScala](http://mmlspark.azureedge.net/docs/scala/) and [for\nPySpark](http://mmlspark.azureedge.net/docs/pyspark/).\n\n<details>\n<summary><strong><em>Table of Contents<\/em><\/strong><\/summary>\n\n* [Notable features](#notable-features)\n* [A short example](#a-short-example)\n* [Setup and installation](#setup-and-installation)\n  - [Docker](#docker)\n  - [GPU VM Setup](#gpu-vm-setup)\n  - [Spark package](#spark-package)\n  - [Python](#python)\n  - [HDInsight](#hdinsight)\n  - [Databricks cloud](#databricks-cloud)\n  - [SBT](#sbt)\n  - [Building from source](#building-from-source)\n* [Blogs and Publications](#blogs-and-publications)\n* [Contributing & feedback](#contributing--feedback)\n* [Other relevant projects](#other-relevant-projects)\n\n<\/details>\n\n\n## Notable features\n\n[<img src=\"https://mmlspark.azureedge.net/icons/ReleaseNotes.svg\" align=\"right\"\n  />](https://github.com/Azure/mmlspark/releases)\n\n* Create an deep image classifier with transfer learning ([example:305])\n* Fit a LightGBM classification or regression model on a biochemical dataset\n  ([example:106]), to learn more check out the [LightGBM documentation\n  page](docs/lightgbm.md).\n* Deploy a deep network as a distributed web service with [MMLSpark\n  Serving](docs/mmlspark-serving.md)\n* Use web services in Spark with [HTTP on Apache Spark](docs/http.md)\n* Train a deep image classifier on Azure N-Series GPU VMs ([example:401])\n* Use Bi-directional LSTMs from Keras for medical entity extraction\n  ([example:304])\n* Create a text analytics system on Amazon book reviews ([example:201])\n* Perform distributed hyperparameter tuning to identify Breast Cancer\n  ([example:203])\n* Easily ingest images from HDFS into Spark `DataFrame` ([example:301])\n* Use OpenCV on Spark to manipulate images ([example:302])\n* Train classification and regression models easily via implicit featurization\n  of data ([example:101])\n* Train and evaluate a flight delay prediction system ([example:102])\n\nSee our [notebooks](notebooks/samples/) for all examples.\n\n[example:101]: notebooks/samples/101%20-%20Adult%20Census%20Income%20Training.ipynb\n  \"Adult Census Income Training\"\n[example:102]: notebooks/samples/102%20-%20Regression%20Example%20with%20Flight%20Delay%20Dataset.ipynb\n  \"Regression Example with Flight Delay Dataset\"\n[example:106]: notebooks/samples/106%20-%20Quantile%20Regression%20with%20LightGBM.ipynb\n  \"Quantile Regression with LightGBM\"\n[example:201]: notebooks/samples/201%20-%20Amazon%20Book%20Reviews%20-%20TextFeaturizer.ipynb\n  \"Amazon Book Reviews - TextFeaturizer\"\n[example:203]: notebooks/samples/203%20-%20Breast%20Cancer%20-%20Tune%20Hyperparameters.ipynb\n  \"Hyperparameter Tuning with MMLSpark\"\n[example:301]: notebooks/samples/301%20-%20CIFAR10%20CNTK%20CNN%20Evaluation.ipynb\n  \"CIFAR10 CNTK CNN Evaluation\"\n[example:302]: notebooks/samples/302%20-%20Pipeline%20Image%20Transformations.ipynb\n  \"Pipeline Image Transformations\"\n[example:304]: notebooks/samples/304%20-%20Medical%20Entity%20Extraction.ipynb\n  \"Medical Entity Extraction\"\n[example:305]: notebooks/samples/305%20-%20Flowers%20ImageFeaturizer.ipynb\n  \"Deep Flower Classification\"\n[example:401]: notebooks/gpu/401%20-%20CNTK%20train%20on%20HDFS.ipynb\n  \"CIFAR10 CNTK CNN Training\"\n\n## A short example\n\nBelow is an excerpt from a simple example of using a pre-trained CNN to\nclassify images in the CIFAR-10 dataset.  View the whole source code as [an\nexample notebook][example:301].\n\n   ```python\n   ...\n   import mmlspark\n   # Initialize CNTKModel and define input and output columns\n   cntkModel = mmlspark.CNTKModel() \\\n                       .setInputCol(\"images\").setOutputCol(\"output\") \\\n                       .setModelLocation(modelFile)\n   # Train on dataset with internal spark pipeline\n   scoredImages = cntkModel.transform(imagesWithLabels)\n   ...\n   ```\n\nSee [other sample notebooks](notebooks/samples/) as well as the MMLSpark\ndocumentation for [Scala](http://mmlspark.azureedge.net/docs/scala/) and\n[PySpark](http://mmlspark.azureedge.net/docs/pyspark/).\n\n## Setup and installation\n\n### Docker\n\nThe easiest way to evaluate MMLSpark is via our pre-built Docker container.  To\ndo so, run the following command:\n\n   ```bash\n   docker run -it -p 8888:8888 -e ACCEPT_EULA=yes microsoft/mmlspark\n   ```\n\nNavigate to <http://localhost:8888/> in your web browser to run the sample\nnotebooks.  See the [documentation](docs/docker.md) for more on Docker use.\n\n> To read the EULA for using the docker image, run \\\n> `docker run -it -p 8888:8888 microsoft/mmlspark eula`\n\n### GPU VM Setup\n\nMMLSpark can be used to train deep learning models on GPU nodes from a Spark\napplication.  See the instructions for [setting up an Azure GPU\nVM](docs/gpu-setup.md).\n\n### Spark package\n\nMMLSpark can be conveniently installed on existing Spark clusters via the\n`--packages` option, examples:\n\n   ```bash\n   spark-shell --packages Azure:mmlspark:0.12\n   pyspark --packages Azure:mmlspark:0.12\n   spark-submit --packages Azure:mmlspark:0.12 MyApp.jar\n   ```\n\nThis can be used in other Spark contexts too, for example, you can use MMLSpark\nin [AZTK](https://github.com/Azure/aztk/) by [adding it to the\n`.aztk/spark-defaults.conf`\nfile](https://github.com/Azure/aztk/wiki/PySpark-on-Azure-with-AZTK#optional-set-up-mmlspark).\n\n### Python\n\nTo try out MMLSpark on a Python (or Conda) installation you can get Spark\ninstalled via pip with `pip install pyspark`.  You can then use `pyspark` as in\nthe above example, or from python:\n\n   ```python\n   import pyspark\n   spark = pyspark.sql.SparkSession.builder.appName(\"MyApp\") \\\n               .config(\"spark.jars.packages\", \"Azure:mmlspark:0.12\") \\\n               .getOrCreate()\n   import mmlspark\n   ```\n\n<img title=\"Script action submission\" src=\"http://i.imgur.com/oQcS0R2.png\" align=\"right\" />\n\n### HDInsight\n\nTo install MMLSpark on an existing [HDInsight Spark\nCluster](https://docs.microsoft.com/en-us/azure/hdinsight/), you can execute a\nscript action on the cluster head and worker nodes.  For instructions on\nrunning script actions, see [this\nguide](https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux#use-a-script-action-during-cluster-creation).\n\nThe script action url is:\n<https://mmlspark.azureedge.net/buildartifacts/0.12/install-mmlspark.sh>.\n\nIf you're using the Azure Portal to run the script action, go to `Script\nactions` → `Submit new` in the `Overview` section of your cluster blade.  In\nthe `Bash script URI` field, input the script action URL provided above.  Mark\nthe rest of the options as shown on the screenshot to the right.\n\nSubmit, and the cluster should finish configuring within 10 minutes or so.\n\n### Databricks cloud\n\nTo install MMLSpark on the [Databricks\ncloud](http://community.cloud.databricks.com), create a new [library from Maven\ncoordinates](https://docs.databricks.com/user-guide/libraries.html#libraries-from-maven-pypi-or-spark-packages)\nin your workspace.\n\nFor the coordinates use: `Azure:mmlspark:0.12`.  Ensure this library is\nattached to all clusters you create.\n\nFinally, ensure that your Spark cluster has at least Spark 2.1 and Scala 2.11.\n\nYou can use MMLSpark in both your Scala and PySpark notebooks.\n\n### SBT\n\nIf you are building a Spark application in Scala, add the following lines to\nyour `build.sbt`:\n\n   ```scala\n   resolvers += \"MMLSpark Repo\" at \"https://mmlspark.azureedge.net/maven\"\n   libraryDependencies += \"com.microsoft.ml.spark\" %% \"mmlspark\" % \"0.12\"\n   ```\n\n### Building from source\n\nYou can also easily create your own build by cloning this repo and use the main\nbuild script: `./runme`.  Run it once to install the needed dependencies, and\nagain to do a build.  See [this guide](docs/developer-readme.md) for more\ninformation.\n\n### R (Beta)\n\nTo try out MMLSpark using the R autogenerated wrappers [see our\ninstructions](docs/R-setup.md).  Note: This feature is still under development\nand some necessary custom wrappers may be missing.\n\n## Blogs and Publications\n\n* Read [our paper] for a deep dive on MMLSpark.\n\n* See how MMLSpark is used to [help endangered species].\n\n* Explore [our collaboration with Apache Spark] on image analysis.\n\n* Use [MMLSpark in Azure Machine Learning].\n\n* Watch [MMLSpark at the Spark Summit].\n\n[our paper]: https://arxiv.org/abs/1804.04031\n  \"Flexible and Scalable Deep Learning with MMLSpark\"\n[help endangered species]: https://customers.microsoft.com/en-us/story/snow-leopard-trust-nonprofit-azure\n  \"Saving snow leopards with deep learning and computer vision on Spark\"\n[our collaboration with Apache Spark]: https://blogs.technet.microsoft.com/machinelearning/2018/03/05/image-data-support-in-apache-spark/\n  \"Image Data Support in Apache Spark\"\n[MMLSpark in Azure Machine Learning]: https://docs.microsoft.com/en-us/azure/machine-learning/preview/how-to-use-mmlspark\n  \"How to Use Microsoft Machine Learning Library for Apache Spark\"\n[MMLSpark at the Spark Summit]: https://databricks.com/session/mmlspark-lessons-from-building-a-sparkml-compatible-machine-learning-library-for-apache-spark\n  \"MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library for Apache Spark\"\n\n## Contributing & feedback\n\nThis project has adopted the [Microsoft Open Source Code of Conduct].  For more\ninformation see the [Code of Conduct FAQ] or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional\nquestions or comments.\n\n[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/\n[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.\n\nTo give feedback and/or report an issue, open a [GitHub\nIssue](https://help.github.com/articles/creating-an-issue/).\n\n\n## Other relevant projects\n\n* [Microsoft Cognitive Toolkit](https://github.com/Microsoft/CNTK)\n\n* [Azure Machine Learning\n  preview features](https://docs.microsoft.com/en-us/azure/machine-learning/preview)\n\n*Apache®, Apache Spark, and Spark® are either registered trademarks or\ntrademarks of the Apache Software Foundation in the United States and/or other\ncountries.*\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C01C:7A4F8:17C682:5CFA78:6AB92183"},"text_sha256":"5a3241d0e4c43e0a3ac1949890b59819987b9676a41dfc4d99ff058af3b14a57"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3115","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:17E042C:1C00B3B:6AB92937"},"commit":{"sha":"86a06557d37a03523b7048eb6dc61575601928bb","url":"https://github.com/microsoft/SynapseML/commit/86a06557d37a03523b7048eb6dc61575601928bb","date":"2026-06-25T22:22:19Z","author_date":"2026-06-25T22:22:19Z","committer_date":"2026-06-25T22:22:19Z","tree_sha":"b09e2ae9fae540ba6f459994bbcba8a533e534df","message_first_line":"fix: route AnalyzeText document errors to errorCol (#2569)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3114","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17BD6DA:1BDCD1C:6AB92937"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22340,"blob_sha":"6f9577c7815f6682ee06bb95a6354a33f07c34f5","priority":0},{"path":"SECURITY.md","size":2780,"blob_sha":"a050f362c1528508093c19072be352443de4b926","priority":1}],"documents":[{"path":"README.md","size":22340,"blob_sha":"6f9577c7815f6682ee06bb95a6354a33f07c34f5","priority":0,"status":200,"text":"![SynapseML](https://mmlspark.azureedge.net/icons/mmlspark.svg)\n\n# Synapse Machine Learning\n\nSynapseML (previously known as MMLSpark), is an open-source library that simplifies the creation of massively scalable machine learning (ML) pipelines. SynapseML provides simple, composable, and distributed APIs for a wide variety of different machine learning tasks such as text analytics, vision, anomaly detection, and many others. SynapseML is built on the [Apache Spark distributed computing framework](https://spark.apache.org/) and shares the same API as the [SparkML/MLLib library](https://spark.apache.org/mllib/), allowing you to seamlessly embed SynapseML models into existing Apache Spark workflows.\n\nWith SynapseML, you can build scalable and intelligent systems to solve challenges in domains such as anomaly detection, computer vision, deep learning, text analytics, and others. SynapseML can train and evaluate models on single-node, multi-node, and elastically resizable clusters of computers. This lets you scale your work without wasting resources. SynapseML is usable across Python, R, Scala, Java, and .NET. Furthermore, its API abstracts over a wide variety of databases, file systems, and cloud data stores to simplify experiments no matter where data is located.\n\nSynapseML requires Scala 2.12, Spark 3.4+, and Python 3.8+.  \n\n| Topics  | Links                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Build   | [![Build Status](https://msdata.visualstudio.com/A365/_apis/build/status/microsoft.SynapseML?branchName=master)](https://msdata.visualstudio.com/A365/_build/latest?definitionId=17563&branchName=master) [![codecov](https://codecov.io/gh/Microsoft/SynapseML/branch/master/graph/badge.svg)](https://codecov.io/gh/Microsoft/SynapseML) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)                     |\n| Version | [![Version](https://img.shields.io/badge/version-1.1.3-blue)](https://github.com/Microsoft/SynapseML/releases) [![Release Notes](https://img.shields.io/badge/release-notes-blue)](https://github.com/Microsoft/SynapseML/releases) [![Snapshot Version](https://mmlspark.blob.core.windows.net/icons/badges/master_version3.svg)](#sbt)                                                                                                                                       |\n| Docs    | [![Website](https://img.shields.io/badge/SynapseML-Website-blue)](https://aka.ms/spark) [![Scala Docs](https://img.shields.io/static/v1?label=api%20docs&message=scala&color=blue&logo=scala)](https://mmlspark.blob.core.windows.net/docs/1.1.3/scala/index.html#package) [![PySpark Docs](https://img.shields.io/static/v1?label=api%20docs&message=python&color=blue&logo=python)](https://mmlspark.blob.core.windows.net/docs/1.1.3/pyspark/index.html) [![Academic Paper](https://img.shields.io/badge/academic-paper-7fdcf7)](https://arxiv.org/abs/1810.08744) |\n| Support | [![Gitter](https://badges.gitter.im/Microsoft/MMLSpark.svg)](https://gitter.im/Microsoft/MMLSpark?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Mail](https://img.shields.io/badge/mail-synapseml--support-brightgreen)](mailto:synapseml-support@microsoft.com)                                                                                                                                                                                                  |\n| Binder  | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/microsoft/SynapseML/v1.1.3?labpath=notebooks%2Ffeatures)                                                                                                                                                                                                                                                                                                                                           |\n| Usage | [![Downloads](https://static.pepy.tech/badge/synapseml)](https://pepy.tech/project/synapseml) |\n<!-- markdownlint-disable MD033 -->\n<details open>\n<summary>\n<strong><em>Table of Contents<\/em><\/strong>\n<\/summary>\n\n- [Synapse Machine Learning](#synapse-machine-learning)\n  - [Features](#features)\n  - [Documentation and Examples](#documentation-and-examples)\n  - [Setup and installation](#setup-and-installation)\n    - [Microsoft Fabric](#microsoft-fabric)\n    - [Synapse Analytics](#synapse-analytics)\n    - [Databricks](#databricks)\n    - [Python Standalone](#python-standalone)\n    - [Spark Submit](#spark-submit)\n    - [SBT](#sbt)\n    - [Apache Livy and HDInsight](#apache-livy-and-hdinsight)\n    - [Docker](#docker)\n    - [R](#r)\n    - [Building from source](#building-from-source)\n  - [Papers](#papers)\n  - [Learn More](#learn-more)\n  - [Contributing \\& feedback](#contributing--feedback)\n  - [Other relevant projects](#other-relevant-projects)\n\n<\/details>\n<!-- markdownlint-enable MD033 -->\n\n## Features\n\n<!-- markdownlint-disable MD033 -->\n| <img width=\"800\" src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/vw-blue-dark-orange.svg\"> |                     <img width=\"800\"  src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/cog_services_on_spark_2.svg\">                     | <img width=\"800\"  src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/decision_tree_recolor.png\"> | <img width=\"800\" src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/mmlspark_serving_recolor.svg\"> |\n| :----------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: |\n|      [**Vowpal Wabbit on Spark**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Vowpal%20Wabbit/Overview/)       | [**The Cognitive Services for Big Data**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/AI%20Services/Overview/) |       [**LightGBM on Spark**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/LightGBM/Overview/)        |        [**Spark Serving**](https://microsoft.github.io/SynapseML/docs/Deploy%20Models/Overview/)        |\n|                               Fast, Sparse, and Effective Text Analytics                               |                        Leverage the Microsoft Cognitive Services at Unprecedented Scales in your existing SparkML pipelines                         |                               Train Gradient Boosted Machines with LightGBM                               |                  Serve any Spark Computation as a Web Service with Sub-Millisecond Latency                  |\n\n|                     <img width=\"800\" src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/microservice_recolor.png\">                      | <img width=\"800\" src=\"https://mmlspark.blob.core.windows.net/graphics/emails/onnxai-ar21_crop.svg\"> |                  <img width=\"800\"  src=\"https://mmlspark.blob.core.windows.net/graphics/emails/scales.svg\">                   |              <img width=\"800\"  src=\"https://mmlspark.blob.core.windows.net/graphics/Readme/bindings.png\">               |\n| :----------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: |:-----------------------------------------------------------------------------------------------------------------------:|\n| [**HTTP on Spark**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/AI%20Services/Overview/#arbitrary-web-apis) |        [**ONNX on Spark**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Deep%20Learning/ONNX/)         | [**Responsible AI**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Responsible%20AI/Interpreting%20Model%20Predictions/) |                                          [**Spark Binding Autogeneration**](https://microsoft.github.io/SynapseML/docs/Reference/Developer%20Setup/#packagepython)                                           |\n|                       An Integration Between Spark and the HTTP Protocol, enabling Distributed Microservice Orchestration                        |                    Distributed and Hardware Accelerated Model Inference on Spark                    |                                    Understand Opaque-box Models and Measure Dataset Biases                                    |                             Automatically Generate Spark bindings for PySpark and SparklyR                              |\n\n|                 <img width=\"150\" src=\"https://mmlspark.blob.core.windows.net/graphics/emails/isolation forest 3.svg\">                 |                          <img width=\"150\" src=\"https://mmlspark.blob.core.windows.net/graphics/emails/cyberml.svg\">                           |                     <img width=\"150\" src=\"https://mmlspark.blob.core.windows.net/graphics/emails/conditional_knn.svg\">                     |\n| :-----------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------: |\n| [**Isolation Forest on Spark**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Anomaly%20Detection/Quickstart%20-%20Isolation%20Forests/) | [**CyberML**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Other%20Algorithms/Cyber%20ML/) | [**Conditional KNN**](https://microsoft.github.io/SynapseML/docs/Explore%20Algorithms/Other%20Algorithms/Quickstart%20-%20Exploring%20Art%20Across%20Cultures/) |\n|                                                Distributed Nonlinear Outlier Detection                                                |                                                   Machine Learning Tools for Cyber Security                                                   |                                                Scalable KNN Models with Conditional Queries                                                |\n<!-- markdownlint-enable MD033 -->\n\n## Documentation and Examples\n\nFor quickstarts, documentation, demos, and examples please see our [website](https://aka.ms/spark).\n\n## Setup and installation\n\nFirst select the correct platform that you are installing SynapseML into:\n<!--ts-->\n- [Synapse Machine Learning](#synapse-machine-learning)\n  - [Features](#features)\n  - [Documentation and Examples](#documentation-and-examples)\n  - [Setup and installation](#setup-and-installation)\n    - [Microsoft Fabric](#microsoft-fabric)\n    - [Synapse Analytics](#synapse-analytics)\n    - [Databricks](#databricks)\n    - [Python Standalone](#python-standalone)\n    - [Spark Submit](#spark-submit)\n    - [SBT](#sbt)\n    - [Apache Livy and HDInsight](#apache-livy-and-hdinsight)\n    - [Docker](#docker)\n    - [R](#r)\n    - [Building from source](#building-from-source)\n  - [Papers](#papers)\n  - [Learn More](#learn-more)\n  - [Contributing \\& feedback](#contributing--feedback)\n  - [Other relevant projects](#other-relevant-projects)\n<!--te-->\n\n\n\n### Microsoft Fabric\n\nIn Microsoft Fabric notebooks SynapseML is already installed. To change the version please place the following in the first cell of your notebook.\n\n\n```bash\n%%configure -f\n{\n  \"name\": \"synapseml\",\n  \"conf\": {\n      \"spark.jars.packages\": \"com.microsoft.azure:synapseml_2.12:<THE_SYNAPSEML_VERSION_YOU_WANT>\",\n      \"spark.jars.repositories\": \"https://mmlspark.azureedge.net/maven\",\n      \"spark.jars.excludes\": \"org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind\",\n      \"spark.yarn.user.classpath.first\": \"true\",\n      \"spark.sql.parquet.enableVectorizedReader\": \"false\"\n  }\n}\n```\n\n\n\n\n### Synapse Analytics\n\nIn Azure Synapse notebooks please place the following in the first cell of your notebook. \n\n- For Spark 3.5 Pools:\n\n```bash\n%%configure -f\n{\n  \"name\": \"synapseml\",\n  \"conf\": {\n      \"spark.jars.packages\": \"com.microsoft.azure:synapseml_2.12:1.1.3\",\n      \"spark.jars.repositories\": \"https://mmlspark.azureedge.net/maven\",\n      \"spark.jars.excludes\": \"org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind\",\n      \"spark.yarn.user.classpath.first\": \"true\",\n      \"spark.sql.parquet.enableVectorizedReader\": \"false\"\n  }\n}\n```\n\n- For Spark 3.4 Pools:\n\n```bash\n%%configure -f\n{\n  \"name\": \"synapseml\",\n  \"conf\": {\n      \"spark.jars.packages\": \"com.microsoft.azure:synapseml_2.12:1.0.15\",\n      \"spark.jars.repositories\": \"https://mmlspark.azureedge.net/maven\",\n      \"spark.jars.excludes\": \"org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind\",\n      \"spark.yarn.user.classpath.first\": \"true\",\n      \"spark.sql.parquet.enableVectorizedReader\": \"false\"\n  }\n}\n```\n\n- For Spark 3.3 Pools:\n\n```bash\n%%configure -f\n{\n  \"name\": \"synapseml\",\n  \"conf\": {\n      \"spark.jars.packages\": \"com.microsoft.azure:synapseml_2.12:0.11.4-spark3.3\",\n      \"spark.jars.repositories\": \"https://mmlspark.azureedge.net/maven\",\n      \"spark.jars.excludes\": \"org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind\",\n      \"spark.yarn.user.classpath.first\": \"true\",\n      \"spark.sql.parquet.enableVectorizedReader\": \"false\"\n  }\n}\n```\n\n\n\nTo install at the pool level instead of the notebook level [add the spark properties listed above to the pool configuration](https://techcommunity.microsoft.com/t5/azure-synapse-analytics-blog/how-to-set-spark-pyspark-custom-configs-in-synapse-workspace/ba-p/2114434).\n\n### Databricks\n\nTo install SynapseML on the [Databricks\ncloud](http://community.cloud.databricks.com), create a new [library from Maven\ncoordinates](https://docs.databricks.com/user-guide/libraries.html#libraries-from-maven-pypi-or-spark-packages)\nin your workspace.\n\nFor the coordinates use: `com.microsoft.azure:synapseml_2.12:1.1.3`\nwith the resolver: `https://mmlspark.azureedge.net/maven`. Ensure this library is\nattached to your target cluster(s).\n\nFinally, ensure that your Spark cluster has at least Spark 3.2 and Scala 2.12. If you encounter Netty dependency issues please use DBR 10.1.\n\nYou can use SynapseML in both your Scala and PySpark notebooks. To get started with our example notebooks import the following databricks archive:\n\n`https://mmlspark.blob.core.windows.net/dbcs/SynapseMLExamplesv1.1.3.dbc`\n\n### Python Standalone\n\nTo try out SynapseML on a Python (or Conda) installation you can get Spark\ninstalled via pip with `pip install pyspark`.  You can then use `pyspark` as in\nthe above example, or from python:\n\n```python\nimport pyspark\nspark = pyspark.sql.SparkSession.builder.appName(\"MyApp\") \\\n            .config(\"spark.jars.packages\", \"com.microsoft.azure:synapseml_2.12:1.1.3\") \\\n            .getOrCreate()\nimport synapse.ml\n```\n\n### Spark Submit\n\nSynapseML can be conveniently installed on existing Spark clusters via the\n`--packages` option, examples:\n\n```bash\nspark-shell --packages com.microsoft.azure:synapseml_2.12:1.1.3\npyspark --packages com.microsoft.azure:synapseml_2.12:1.1.3\nspark-submit --packages com.microsoft.azure:synapseml_2.12:1.1.3 MyApp.jar\n```\n\n### SBT\n\nIf you are building a Spark application in Scala, add the following lines to\nyour `build.sbt`:\n\n```scala\nlibraryDependencies += \"com.microsoft.azure\" % \"synapseml_2.12\" % \"1.1.3\"\n```\n\n### Apache Livy and HDInsight\n\nTo install SynapseML from within a Jupyter notebook served by Apache Livy the following configure magic can be used. You will need to start a new session after this configure cell is executed.\n\nExcluding certain packages from the library may be necessary due to current issues with Livy 0.5.\n\n```bash\n%%configure -f\n{\n    \"name\": \"synapseml\",\n    \"conf\": {\n        \"spark.jars.packages\": \"com.microsoft.azure:synapseml_2.12:1.1.3\",\n        \"spark.jars.excludes\": \"org.scala-lang:scala-reflect,org.apache.spark:spark-tags_2.12,org.scalactic:scalactic_2.12,org.scalatest:scalatest_2.12,com.fasterxml.jackson.core:jackson-databind\"\n    }\n}\n```\n\n### Docker\n\nThe easiest way to evaluate SynapseML is via our pre-built Docker container.  To\ndo so, run the following command:\n\n```bash\ndocker run -it -p 8888:8888 -e ACCEPT_EULA=yes mcr.microsoft.com/mmlspark/release jupyter notebook\n```\n\nNavigate to <http://localhost:8888/> in your web browser to run the sample\nnotebooks.  See the [documentation](https://microsoft.github.io/SynapseML/docs/Reference/Docker%20Setup/) for more on Docker use.\n\n> To read the EULA for using the docker image, run `docker run -it -p 8888:8888 mcr.microsoft.com/mmlspark/release eula`\n\n### R\n\nTo try out SynapseML using the R autogenerated wrappers [see our\ninstructions](https://microsoft.github.io/SynapseML/docs/Reference/R%20Setup/).  Note: This feature is still under development\nand some necessary custom wrappers may be missing.\n\n### Building from source\n\nSynapseML has recently transitioned to a new build infrastructure.\nFor detailed developer docs please see the [Developer Readme](https://microsoft.github.io/SynapseML/docs/Reference/Developer%20Setup/)\n\nIf you are an existing synapsemldeveloper, you will need to reconfigure your\ndevelopment setup. We now support platform independent development and\nbetter integrate with intellij and SBT.\n If you encounter issues please reach out to our support email! \n\n## Papers\n\n- [Large Scale Intelligent Microservices](https://arxiv.org/abs/2009.08044)\n\n- [Conditional Image Retrieval](https://arxiv.org/abs/2007.07177)\n\n- [MMLSpark: Unifying Machine Learning Ecosystems at Massive Scales](https://arxiv.org/abs/1810.08744)\n\n- [Flexible and Scalable Deep Learning with SynapseML](https://arxiv.org/abs/1804.04031)\n\n- [Large-Scale Automatic Audiobook Creation](https://arxiv.org/abs/2309.03926) \n\n## Learn More\n\n- Visit our [website].\n\n- Watch our keynote demos at [the Spark+AI Summit 2019], [the Spark+AI European Summit 2018], [the Spark+AI Summit 2018] and [SynapseML at the Spark Summit].\n\n- See how SynapseML is used to [help endangered species].\n\n- Explore generative adversarial artwork in [our collaboration with The MET and MIT].\n\n- Explore [our collaboration with Apache Spark] on image analysis.\n\n[website]: https://microsoft.github.io/SynapseML/ \"aka.ms/spark\"\n\n[the Spark+AI Summit 2018]: https://databricks.com/sparkaisummit/north-america/spark-summit-2018-keynotes#Intelligent-cloud \"Developing for the Intelligent Cloud and Intelligent Edge\"\n\n[the Spark+AI Summit 2019]: https://youtu.be/T_fs4C0aqD0?t=425\n\n[the Spark+AI European Summit 2018]: https://youtu.be/N3ozCZXeOeU?t=472\n\n[help endangered species]: https://www.microsoft.com/en-us/ai/ai-lab-stories?activetab=pivot1:primaryr3 \"Identifying snow leopards with AI\"\n\n[our collaboration with The MET and MIT]: https://www.microsoft.com/en-us/ai/ai-lab-stories?activetab=pivot1:primaryr4 \"Generative art at the MET\"\n\n[our collaboration with Apache Spark]: https://blogs.technet.microsoft.com/machinelearning/2018/03/05/image-data-support-in-apache-spark/ \"Image Data Support in Apache Spark\"\n\n[SynapseML at the Spark Summit]: https://databricks.com/session/mmlspark-lessons-from-building-a-sparkml-compatible-machine-learning-library-for-apache-spark \"MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library for Apache Spark\"\n\n## Contributing & feedback\n\nThis project has adopted the [Microsoft Open Source Code of Conduct].  For more\ninformation see the [Code of Conduct FAQ] or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional\nquestions or comments. \n\n[Microsoft Open Source Code of Conduct]: https://opensource.microsoft.com/codeofconduct/\n\n[Code of Conduct FAQ]: https://opensource.microsoft.com/codeofconduct/faq/\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.\n\nTo give feedback and/or report an issue, open a [GitHub\nIssue](https://help.github.com/articles/creating-an-issue/).\n\n## Other relevant projects\n\n- [Vowpal Wabbit](https://github.com/VowpalWabbit/vowpal_wabbit)\n\n- [LightGBM](https://github.com/lightgbm-org/LightGBM)\n\n- [DMTK: Microsoft Distributed Machine Learning Toolkit](https://github.com/Microsoft/DMTK)\n\n- [Recommenders](https://github.com/recommenders-team/Recommenders)\n\n- [JPMML-SparkML plugin for converting SynapseML LightGBM models to PMML](https://github.com/alipay/jpmml-sparkml-lightgbm)\n\n- [Microsoft Cognitive Toolkit](https://github.com/Microsoft/CNTK)\n\n_Apache®, Apache Spark, and Spark® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries._\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9912:29FD16:17D0A3:5D042C:6AB92183"},"text_sha256":"b0151b178d30004193c3d57e4836496b42b50867d3cd99c492cd9c2daa2b19f2"},{"path":"SECURITY.md","size":2780,"blob_sha":"a050f362c1528508093c19072be352443de4b926","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).\n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7AB6:40CE8:17A9D0:5CDCAB:6AB92186"},"text_sha256":"81ed58e26769508df9a2f761dad55b52c6c9de62fff06195b2702fcb7a97e883"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"amdegroot/ssd.pytorch","input_row":{"repository":"amdegroot/ssd.pytorch","url":"https://github.com/amdegroot/ssd.pytorch","name":"ssd.pytorch","owner":"amdegroot","description":"A PyTorch Implementation of Single Shot MultiBox Detector","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5222,"issues":544,"created_at":"2017-02-08T01:50:36Z","updated_at":"2026-09-19T05:46:19Z","first_commit_at":"2017-02-08T01:50:37Z","last_commit_at":"2019-03-11T21:43:06Z","activity_months":25.030000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:29.489Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"amdegroot/ssd.pytorch","visibility":"public","created_at":"2017-02-08T01:50:36Z","updated_at":"2026-09-19T05:46:19Z","private":false,"fork":false,"archived":false,"stargazers_count":5222,"open_issues_count":380,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3113","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:17D616A:1BF6608:6AB92939"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3112","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090B:35C5DA:17928B7:1BB224C:6AB92939"},"commit":{"sha":"8dd38657a3b1df98df26cf18be9671647905c2a0","url":"https://github.com/amdegroot/ssd.pytorch/commit/8dd38657a3b1df98df26cf18be9671647905c2a0","date":"2018-03-30T07:37:38Z","author_date":"2018-03-30T07:37:38Z","committer_date":"2018-03-30T07:37:38Z","tree_sha":"cf409d6c6957543cccc512d01e17a4d0e65cbc4b","message_first_line":"Add COCO training option and cleanup training script"},"tree_request_status":200,"tree_rate":{"github_remaining":"3111","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FF:278AC2:184E4B3:1C6EC69:6AB9293A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7354,"blob_sha":"0256fac99e09457b97e5f94dfe60842af32ee6c0","priority":0}],"documents":[{"path":"README.md","size":7354,"blob_sha":"0256fac99e09457b97e5f94dfe60842af32ee6c0","priority":0,"status":200,"text":"# SSD: Single Shot MultiBox Object Detector, in PyTorch\nA [PyTorch](http://pytorch.org/) implementation of [Single Shot MultiBox Detector](http://arxiv.org/abs/1512.02325) from the 2016 paper by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang, and Alexander C. Berg.  The official and original Caffe code can be found [here](https://github.com/weiliu89/caffe/tree/ssd).\n\n\n<img align=\"right\" src= \"https://github.com/amdegroot/ssd.pytorch/blob/master/doc/ssd.png\" height = 400/>\n\n### Table of Contents\n- <a href='#installation'>Installation<\/a>\n- <a href='#datasets'>Datasets<\/a>\n- <a href='#training-ssd'>Train<\/a>\n- <a href='#evaluation'>Evaluate<\/a>\n- <a href='#performance'>Performance<\/a>\n- <a href='#demos'>Demos<\/a>\n- <a href='#todo'>Future Work<\/a>\n- <a href='#references'>Reference<\/a>\n\n&nbsp;\n&nbsp;\n&nbsp;\n&nbsp;\n\n## Installation\n- Install [PyTorch](http://pytorch.org/) by selecting your environment on the website and running the appropriate command.\n- Clone this repository.\n  * Note: We currently only support Python 3+.\n- Then download the dataset by following the [instructions](#datasets) below.\n- We now support [Visdom](https://github.com/facebookresearch/visdom) for real-time loss visualization during training!\n  * To use Visdom in the browser:\n  ```Shell\n  # First install Python server and client\n  pip install visdom\n  # Start the server (probably in a screen or tmux)\n  python -m visdom.server\n  ```\n  * Then (during training) navigate to http://localhost:8097/ (see the Train section below for training details).\n- Note: For training, we currently support [VOC](http://host.robots.ox.ac.uk/pascal/VOC/) and [COCO](http://mscoco.org/), and aim to add [ImageNet](http://www.image-net.org/) support soon.\n\n## Datasets\nTo make things easy, we provide bash scripts to handle the dataset downloads and setup for you.  We also provide simple dataset loaders that inherit `torch.utils.data.Dataset`, making them fully compatible with the `torchvision.datasets` [API](http://pytorch.org/docs/torchvision/datasets.html).\n\n\n### COCO\nMicrosoft COCO: Common Objects in Context\n\n##### Download COCO 2014\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/COCO2014.sh\n```\n\n### VOC Dataset\nPASCAL VOC: Visual Object Classes\n\n##### Download VOC2007 trainval & test\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2007.sh # <directory>\n```\n\n##### Download VOC2012 trainval\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2012.sh # <directory>\n```\n\n## Training SSD\n- First download the fc-reduced [VGG-16](https://arxiv.org/abs/1409.1556) PyTorch base network weights at:              https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n- By default, we assume you have downloaded the file in the `ssd.pytorch/weights` dir:\n\n```Shell\nmkdir weights\ncd weights\nwget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n```\n\n- To train SSD using the train script simply specify the parameters listed in `train.py` as a flag or manually change them.\n\n```Shell\npython train.py\n```\n\n- Note:\n  * For training, an NVIDIA GPU is strongly recommended for speed.\n  * For instructions on Visdom usage/installation, see the <a href='#installation'>Installation<\/a> section.\n  * You can pick-up training from a checkpoint by specifying the path as one of the training parameters (again, see `train.py` for options)\n\n## Evaluation\nTo evaluate a trained network:\n\n```Shell\npython eval.py\n```\n\nYou can specify the parameters listed in the `eval.py` file by flagging them or manually changing them.  \n\n\n<img align=\"left\" src= \"https://github.com/amdegroot/ssd.pytorch/blob/master/doc/detection_examples.png\">\n\n## Performance\n\n#### VOC2007 Test\n\n##### mAP\n\n| Original | Converted weiliu89 weights | From scratch w/o data aug | From scratch w/ data aug |\n|:-:|:-:|:-:|:-:|\n| 77.2 % | 77.26 % | 58.12% | 77.43 % |\n\n##### FPS\n**GTX 1060:** ~45.45 FPS\n\n## Demos\n\n### Use a pre-trained SSD network for detection\n\n#### Download a pre-trained network\n- We are trying to provide PyTorch `state_dicts` (dict of weight tensors) of the latest SSD model definitions trained on different datasets.  \n- Currently, we provide the following PyTorch models:\n    * SSD300 trained on VOC0712 (newest PyTorch weights)\n      - https://s3.amazonaws.com/amdegroot-models/ssd300_mAP_77.43_v2.pth\n    * SSD300 trained on VOC0712 (original Caffe weights)\n      - https://s3.amazonaws.com/amdegroot-models/ssd_300_VOC0712.pth\n- Our goal is to reproduce this table from the [original paper](http://arxiv.org/abs/1512.02325)\n<p align=\"left\">\n<img src=\"http://www.cs.unc.edu/~wliu/papers/ssd_results.png\" alt=\"SSD results on multiple datasets\" width=\"800px\"><\/p>\n\n### Try the demo notebook\n- Make sure you have [jupyter notebook](http://jupyter.readthedocs.io/en/latest/install.html) installed.\n- Two alternatives for installing jupyter notebook:\n    1. If you installed PyTorch with [conda](https://www.continuum.io/downloads) (recommended), then you should already have it.  (Just  navigate to the ssd.pytorch cloned repo and run):\n    `jupyter notebook`\n\n    2. If using [pip](https://pypi.python.org/pypi/pip):\n\n```Shell\n# make sure pip is upgraded\npip3 install --upgrade pip\n# install jupyter notebook\npip install jupyter\n# Run this inside ssd.pytorch\njupyter notebook\n```\n\n- Now navigate to `demo/demo.ipynb` at http://localhost:8888 (by default) and have at it!\n\n### Try the webcam demo\n- Works on CPU (may have to tweak `cv2.waitkey` for optimal fps) or on an NVIDIA GPU\n- This demo currently requires opencv2+ w/ python bindings and an onboard webcam\n  * You can change the default webcam in `demo/live.py`\n- Install the [imutils](https://github.com/jrosebr1/imutils) package to leverage multi-threading on CPU:\n  * `pip install imutils`\n- Running `python -m demo.live` opens the webcam and begins detecting!\n\n## TODO\nWe have accumulated the following to-do list, which we hope to complete in the near future\n- Still to come:\n  * [x] Support for the MS COCO dataset\n  * [ ] Support for SSD512 training and testing\n  * [ ] Support for training on custom datasets\n\n## Authors\n\n* [**Max deGroot**](https://github.com/amdegroot)\n* [**Ellis Brown**](http://github.com/ellisbrown)\n\n***Note:*** Unfortunately, this is just a hobby of ours and not a full-time job, so we'll do our best to keep things up to date, but no guarantees.  That being said, thanks to everyone for your continued help and feedback as it is really appreciated. We will try to address everything as soon as possible.\n\n## References\n- Wei Liu, et al. \"SSD: Single Shot MultiBox Detector.\" [ECCV2016]((http://arxiv.org/abs/1512.02325)).\n- [Original Implementation (CAFFE)](https://github.com/weiliu89/caffe/tree/ssd)\n- A huge thank you to [Alex Koltun](https://github.com/alexkoltun) and his team at [Webyclip](webyclip.com) for their help in finishing the data augmentation portion.\n- A list of other great SSD ports that were sources of inspiration (especially the Chainer repo):\n  * [Chainer](https://github.com/Hakuyume/chainer-ssd), [Keras](https://github.com/rykov8/ssd_keras), [MXNet](https://github.com/zhreshold/mxnet-ssd), [Tensorflow](https://github.com/balancap/SSD-Tensorflow)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5522:3EACB:173ECB:5C729E:6AB9217F"},"text_sha256":"bf7b63738133739de0b242011022cf9cfa3961a2b36512d034e7c92c10000637"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3110","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:179789A:1BB7D18:6AB9293A"},"commit":{"sha":"5b0b77faa955c1917b0c710d770739ba8fbff9b7","url":"https://github.com/amdegroot/ssd.pytorch/commit/5b0b77faa955c1917b0c710d770739ba8fbff9b7","date":"2019-03-11T21:43:06Z","author_date":"2019-03-11T21:43:06Z","committer_date":"2019-03-11T21:43:06Z","tree_sha":"7acf91eb0061487224e4958014250629c7031fa5","message_first_line":"Update .dim() to .size(0) in eval.py for compatibility with latest .dim() functionality"},"tree_request_status":200,"tree_rate":{"github_remaining":"3109","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:18207B4:1C40942:6AB9293B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7365,"blob_sha":"e37165877815fd3c29e63de6edcb8ca975120b66","priority":0}],"documents":[{"path":"README.md","size":7365,"blob_sha":"e37165877815fd3c29e63de6edcb8ca975120b66","priority":0,"status":200,"text":"# SSD: Single Shot MultiBox Object Detector, in PyTorch\nA [PyTorch](http://pytorch.org/) implementation of [Single Shot MultiBox Detector](http://arxiv.org/abs/1512.02325) from the 2016 paper by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang, and Alexander C. Berg.  The official and original Caffe code can be found [here](https://github.com/weiliu89/caffe/tree/ssd).\n\n\n<img align=\"right\" src= \"https://github.com/amdegroot/ssd.pytorch/blob/master/doc/ssd.png\" height = 400/>\n\n### Table of Contents\n- <a href='#installation'>Installation<\/a>\n- <a href='#datasets'>Datasets<\/a>\n- <a href='#training-ssd'>Train<\/a>\n- <a href='#evaluation'>Evaluate<\/a>\n- <a href='#performance'>Performance<\/a>\n- <a href='#demos'>Demos<\/a>\n- <a href='#todo'>Future Work<\/a>\n- <a href='#references'>Reference<\/a>\n\n&nbsp;\n&nbsp;\n&nbsp;\n&nbsp;\n\n## Installation\n- Install [PyTorch](http://pytorch.org/) by selecting your environment on the website and running the appropriate command.\n- Clone this repository.\n  * Note: We currently only support Python 3+.\n- Then download the dataset by following the [instructions](#datasets) below.\n- We now support [Visdom](https://github.com/facebookresearch/visdom) for real-time loss visualization during training!\n  * To use Visdom in the browser:\n  ```Shell\n  # First install Python server and client\n  pip install visdom\n  # Start the server (probably in a screen or tmux)\n  python -m visdom.server\n  ```\n  * Then (during training) navigate to http://localhost:8097/ (see the Train section below for training details).\n- Note: For training, we currently support [VOC](http://host.robots.ox.ac.uk/pascal/VOC/) and [COCO](http://mscoco.org/), and aim to add [ImageNet](http://www.image-net.org/) support soon.\n\n## Datasets\nTo make things easy, we provide bash scripts to handle the dataset downloads and setup for you.  We also provide simple dataset loaders that inherit `torch.utils.data.Dataset`, making them fully compatible with the `torchvision.datasets` [API](http://pytorch.org/docs/torchvision/datasets.html).\n\n\n### COCO\nMicrosoft COCO: Common Objects in Context\n\n##### Download COCO 2014\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/COCO2014.sh\n```\n\n### VOC Dataset\nPASCAL VOC: Visual Object Classes\n\n##### Download VOC2007 trainval & test\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2007.sh # <directory>\n```\n\n##### Download VOC2012 trainval\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2012.sh # <directory>\n```\n\n## Training SSD\n- First download the fc-reduced [VGG-16](https://arxiv.org/abs/1409.1556) PyTorch base network weights at:              https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n- By default, we assume you have downloaded the file in the `ssd.pytorch/weights` dir:\n\n```Shell\nmkdir weights\ncd weights\nwget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n```\n\n- To train SSD using the train script simply specify the parameters listed in `train.py` as a flag or manually change them.\n\n```Shell\npython train.py\n```\n\n- Note:\n  * For training, an NVIDIA GPU is strongly recommended for speed.\n  * For instructions on Visdom usage/installation, see the <a href='#installation'>Installation<\/a> section.\n  * You can pick-up training from a checkpoint by specifying the path as one of the training parameters (again, see `train.py` for options)\n\n## Evaluation\nTo evaluate a trained network:\n\n```Shell\npython eval.py\n```\n\nYou can specify the parameters listed in the `eval.py` file by flagging them or manually changing them.  \n\n\n<img align=\"left\" src= \"https://github.com/amdegroot/ssd.pytorch/blob/master/doc/detection_examples.png\">\n\n## Performance\n\n#### VOC2007 Test\n\n##### mAP\n\n| Original | Converted weiliu89 weights | From scratch w/o data aug | From scratch w/ data aug |\n|:-:|:-:|:-:|:-:|\n| 77.2 % | 77.26 % | 58.12% | 77.43 % |\n\n##### FPS\n**GTX 1060:** ~45.45 FPS\n\n## Demos\n\n### Use a pre-trained SSD network for detection\n\n#### Download a pre-trained network\n- We are trying to provide PyTorch `state_dicts` (dict of weight tensors) of the latest SSD model definitions trained on different datasets.  \n- Currently, we provide the following PyTorch models:\n    * SSD300 trained on VOC0712 (newest PyTorch weights)\n      - https://s3.amazonaws.com/amdegroot-models/ssd300_mAP_77.43_v2.pth\n    * SSD300 trained on VOC0712 (original Caffe weights)\n      - https://s3.amazonaws.com/amdegroot-models/ssd_300_VOC0712.pth\n- Our goal is to reproduce this table from the [original paper](http://arxiv.org/abs/1512.02325)\n<p align=\"left\">\n<img src=\"http://www.cs.unc.edu/~wliu/papers/ssd_results.png\" alt=\"SSD results on multiple datasets\" width=\"800px\"><\/p>\n\n### Try the demo notebook\n- Make sure you have [jupyter notebook](http://jupyter.readthedocs.io/en/latest/install.html) installed.\n- Two alternatives for installing jupyter notebook:\n    1. If you installed PyTorch with [conda](https://www.continuum.io/downloads) (recommended), then you should already have it.  (Just  navigate to the ssd.pytorch cloned repo and run):\n    `jupyter notebook`\n\n    2. If using [pip](https://pypi.python.org/pypi/pip):\n\n```Shell\n# make sure pip is upgraded\npip3 install --upgrade pip\n# install jupyter notebook\npip install jupyter\n# Run this inside ssd.pytorch\njupyter notebook\n```\n\n- Now navigate to `demo/demo.ipynb` at http://localhost:8888 (by default) and have at it!\n\n### Try the webcam demo\n- Works on CPU (may have to tweak `cv2.waitkey` for optimal fps) or on an NVIDIA GPU\n- This demo currently requires opencv2+ w/ python bindings and an onboard webcam\n  * You can change the default webcam in `demo/live.py`\n- Install the [imutils](https://github.com/jrosebr1/imutils) package to leverage multi-threading on CPU:\n  * `pip install imutils`\n- Running `python -m demo.live` opens the webcam and begins detecting!\n\n## TODO\nWe have accumulated the following to-do list, which we hope to complete in the near future\n- Still to come:\n  * [x] Support for the MS COCO dataset\n  * [ ] Support for SSD512 training and testing\n  * [ ] Support for training on custom datasets\n\n## Authors\n\n* [**Max deGroot**](https://github.com/amdegroot)\n* [**Ellis Brown**](http://github.com/ellisbrown)\n\n***Note:*** Unfortunately, this is just a hobby of ours and not a full-time job, so we'll do our best to keep things up to date, but no guarantees.  That being said, thanks to everyone for your continued help and feedback as it is really appreciated. We will try to address everything as soon as possible.\n\n## References\n- Wei Liu, et al. \"SSD: Single Shot MultiBox Detector.\" [ECCV2016]((http://arxiv.org/abs/1512.02325)).\n- [Original Implementation (CAFFE)](https://github.com/weiliu89/caffe/tree/ssd)\n- A huge thank you to [Alex Koltun](https://github.com/alexkoltun) and his team at [Webyclip](http://www.webyclip.com) for their help in finishing the data augmentation portion.\n- A list of other great SSD ports that were sources of inspiration (especially the Chainer repo):\n  * [Chainer](https://github.com/Hakuyume/chainer-ssd), [Keras](https://github.com/rykov8/ssd_keras), [MXNet](https://github.com/zhreshold/mxnet-ssd), [Tensorflow](https://github.com/balancap/SSD-Tensorflow)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0804:38C7FC:177C3D:594A35:6AB92189"},"text_sha256":"6a188158838a21b9b7c3563ac69659c9eff48e243b64d6c01bfaa2fee047b234"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"grobidOrg/grobid","input_row":{"repository":"grobidOrg/grobid","url":"https://github.com/grobidOrg/grobid","name":"grobid","owner":"grobidOrg","description":"A machine learning software for extracting information from scholarly documents","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":5142,"issues":999,"created_at":"2012-09-13T15:48:54Z","updated_at":"2026-09-27T07:21:26Z","first_commit_at":"2012-09-13T16:09:41Z","last_commit_at":"2026-09-27T07:21:20Z","activity_months":168.41999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:31.864Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"grobidOrg/grobid","visibility":"public","created_at":"2012-09-13T15:48:54Z","updated_at":"2026-09-27T07:21:26Z","private":false,"fork":false,"archived":false,"stargazers_count":5142,"open_issues_count":302,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3108","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17B99F2:1BD9FD2:6AB9293B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3107","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0855:14A1F2:17FB7B2:1C1BE64:6AB9293C"},"commit":{"sha":"d26e7da947bf97b2d667403990b94019741c09c8","url":"https://github.com/grobidOrg/grobid/commit/d26e7da947bf97b2d667403990b94019741c09c8","date":"2018-05-22T22:37:22Z","author_date":"2018-05-22T22:37:22Z","committer_date":"2018-05-22T22:37:22Z","tree_sha":"504174b8b593e6b701ab47383f4fda6df4db0867","message_first_line":"Merge branch 'master' of https://github.com/kermitt2/grobid"},"tree_request_status":200,"tree_rate":{"github_remaining":"3106","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A0:0AC4:1282A78:15D2E30:6AB9293C"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":9453,"blob_sha":"38b42a2f617d10bb1a20f038bc602d5a8f19b139","priority":0}],"documents":[{"path":"Readme.md","size":9453,"blob_sha":"38b42a2f617d10bb1a20f038bc602d5a8f19b139","priority":0,"status":200,"text":"# GROBID\n\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://travis-ci.org/kermitt2/grobid.svg?branch=master)](https://travis-ci.org/kermitt2/grobid)\n[![Coverage Status](https://coveralls.io/repos/kermitt2/grobid/badge.svg)](https://coveralls.io/r/kermitt2/grobid)\n[![Documentation Status](https://readthedocs.org/projects/grobid/badge/?version=latest)](https://readthedocs.org/projects/grobid/?badge=latest)\n[![Docker Status](https://images.microbadger.com/badges/version/lfoppiano/grobid.svg)](https://hub.docker.com/r/lfoppiano/grobid/ \"Latest Docker HUB image\")\n[![Dependency Status](https://www.versioneye.com/user/projects/5942f4990fb24f005a2a6136/badge.svg)](https://www.versioneye.com/user/projects/5942f4990fb24f005a2a6136)\n\n## GROBID documentation\n\nVisit the [GROBID documentation](http://grobid.readthedocs.org) for more detailed information.\n\n## Purpose\n\nGROBID (or Grobid) means GeneRation Of BIbliographic Data. \n\nGROBID is a machine learning library for extracting, parsing and re-structuring raw documents such as PDF into structured TEI-encoded documents with a particular focus on technical and scientific publications. First developments started in 2008 as a hobby. In 2011 the tool has been made available in open source. Work on GROBID has been steady as side project since the beginning and is expected to continue until at least 2020 :)\n\nThe following functionalities are available:\n\n+ Header extraction and parsing from article in PDF format. The extraction here covers the usual bibliographical information (e.g. title, abstract, authors, affiliations, keywords, etc.).\n+ References extraction and parsing from articles in PDF format. References in footnotes are supported, although still work in progress. They are rare in technical and scientific articles, but frequent for publications in the humanities and social sciences. All the usual publication metadata are covered. \n+ Parsing of references in isolation.\n+ Extraction of patent and non-patent references in patent publications.\n+ Parsing of names (e.g. person title, fornames, middlename, etc.), in particular author names in header, and author names in references (two distinct models).\n+ Parsing of affiliation and address blocks. \n+ Parsing of dates (ISO normalized day, month, year).\n+ Full text extraction from PDF articles, including a model for the the overall document segmentation and a model for the structuring of the text body. \n+ In a complete PDF processing, GROBID manages 55 final labels used to build relatively fine-grained structures, from traditional publication metadata (title, author first/last/middlenames, affiliation types, detailed address, journal, volume, issue, pages, etc.) to full text structures (section title, paragraph, reference markers, head/foot notes, figure headers, etc.). \n\nGROBID includes a comprehensive web service API, batch processing, a JAVA API, a relatively generic evaluation framework (precision, recall, etc.) and the semi-automatic generation of training data. \n\nGROBID can be considered as production ready. Deployments in production includes ResearchGate, HAL Research Archive, the European Patent Office, INIST-CNRS, Mendeley, CERN (Invenio), etc. \n\nThe key aspects of GROBID are the following ones:\n\n+ Written in Java, with JNI call to native CRF libraries. \n+ Speed - on a modern but low profile MacBook Pro: header extraction from 4000 PDF in 10 minutes (or from 3 PDF per second with the RESTful API), parsing of 3000 references in 18 seconds. \n+ Speed and Scalability: [INIST](http://www.inist.fr/?lang=en) recently scaled GROBID REST service for extracting bibliographical references of 1 million PDF in 1 day on a Xeon 10 CPU E5-2660 and 10 GB memory (3GB used in average) with 9 threads - so around 11.5 PDF per second. The complete processing of 395,000 PDF (IOP) with full text structuring was performed in 12h46mn with 16 threads, 0.11s per PDF (~1,72s per PDF with single thread).\n+ Lazy loading of models and resources. Depending on the selected process, only the required data are loaded in memory. For instance, extracting only metadata header from a PDF requires less than 2 GB memory in a multithreading usage, extracting citations uses around 3GB and extracting all the PDF structure around 4GB.  \n+ Robust and fast PDF processing based on Xpdf and dedicated post-processing.\n+ Modular and reusable machine learning models. The extractions are based on Linear Chain Conditional Random Fields which is currently the state of the art in bibliographical information extraction and labeling. The specialized CRF models are cascaded to build a complete document structure.  \n+ Full encoding in [__TEI__](http://www.tei-c.org/Guidelines/P5/index.xml), both for the training corpus and the parsed results.\n+ Reinforcement of extracted bibliographical data via online call to CrossRef (optional), export in OpenURL, BibTeX, etc. for easier integration into Digital Library environments. \n+ Rich bibliographical processing: fine grained parsing of author names, dates, affiliations, addresses, etc. but also for instance quite reliable automatic attachment of affiliations and emails to authors. \n+ \"Automatic Generation\" of pre-formatted training data based on new PDF documents, for supporting semi-automatic training data generation. \n+ Support for CJK and Arabic languages based on customized Lucene analyzers provided by WIPO.\n\nThe GROBID extraction and parsing algorithms uses the [Wapiti CRF library](http://wapiti.limsi.fr). [CRF++ library](http://crfpp.googlecode.com/svn/trunk/doc/index.html) is not supported since GROBID version 0.4. The C++ libraries are transparently integrated as JNI with dynamic call based on the current OS. \n\nGROBID should run properly \"out of the box\" on MacOS X, Linux (32 and 64 bits) and Windows. \n\n## Demo\n\nFor testing purposes, a public GROBID demo server is available at the following address: [http://grobid.science-miner.com](http://grobid.science-miner.com)\n\nThe Web services are documented [here](http://grobid.readthedocs.io/en/latest/Grobid-service/).\n\n_Warning_: Some quota and query limitation apply to the demo server! If you are interested in using such online GROBID service for your project without limitation (and with support), please contact us (<patrice.lopez@science-miner.com>).\n\n## Latest version\n\nThe latest stable release of GROBID is version ```0.5.1```. This version brings:\n\n+ Migrate from maven to gradle for faster, more flexible and more stable build, release, etc.\n+ Usage of Dropwizard for web services\n+ Move the Grobid service manual to [readthedocs](http://grobid.readthedocs.io/en/latest/Grobid-service/)\n+ (thanks to @detonator413 and @lfoppiano for this release! future work in versions 0.5.* will focus again on improving PDF parsing and structuring accuracy)\n\nNew in previous release ```0.4.4```: \n\n+ New models: f-score improvement on the PubMed Central sample, bibliographical references +2.5%, header +7%  \n+ New training data and features for bibliographical references, in particular for covering HEP domain (INSPIRE), arXiv identifier, DOI and url (thanks @iorala and @michamos !)\n+ Support for CrossRef REST API (instead of the slow OpenURL-style API which requires a CrossRef account), in particular for multithreading usage (thanks @Vi-dot)\n+ Improve training data generation and documentation (thanks @jfix)\n+ Unicode normalisation and more robust body extraction (thanks @aoboturov)\n+ fixes, tests, documentation and update of the pdf2xml fork for Windows (thanks @lfoppiano)\n\nNew in previous release ```0.4.2```: \n\n+ f-score improvement for the PubMed Central sample: fulltext +10-14%, header +0.5%, citations +0.5%\n+ More robust PDF parsing\n+ Identification of equations (with PDF coordinates)\n+ End-to-end evaluation with Pub2TEI conversions\n+ many fixes and refactoring\n\nNew in previous release ```0.4.1```:\n\n+ Support for Windows thanks to the contributions of Christopher Boumenot!\n+ Support to Docker.\n+ Fixes and refactoring.\n+ New web services for PDF annotation and updated web console application.\n+ Some improvements on figure/table extraction - but still experimental at this stage (work in progress, as the whole full text model).\n\nNew in previous release ```0.4.0```:\n\n+ Improvement of the recognition of citations thanks to refinements of CRF features - +4% in f-score for the PubMed Central sample.\n+ Improvement of the full text model, with new features and the introduction of two additional models for figures and tables.\n+ More robust synchronization of CRF sequence with PDF areas, resulting in improved bounding box calculations for locating annotations in the PDF documents.\n+ Improved general robustness thanks to better token alignments.\n\n## License\n\nGROBID is distributed under [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). \n\nMain author and contact: Patrice Lopez (<patrice.lopez@science-miner.com>)\n\n## Sponsors\n\nej-technologies provided us a free open-source license for its Java Profiler. Click the JProfiler logo below to learn more.\n\n[![JProfiler](doc/img/jprofiler_medium.png)](http://www.ej-technologies.com/products/jprofiler/overview.html)\n\n## References\n\nPlease simply refer to the github project:\n\nGrobid (2008-2017) <https://github.com/kermitt2/grobid>\n\nSee the [GROBID documentation](http://grobid.readthedocs.org/en/latest/References) for more related resources. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0D60:18233:173FB5:5C7310:6AB9217F"},"text_sha256":"b6ab27dbc5ef88dce52952f8f1ad5e1e37134a8210809d19153985e0e3681974"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3105","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0868:73962:17C0B7C:1BE09F4:6AB9293E"},"commit":{"sha":"4a5aadf0efd11754fb35951f89c9db4a2d1c89fc","url":"https://github.com/grobidOrg/grobid/commit/4a5aadf0efd11754fb35951f89c9db4a2d1c89fc","date":"2026-06-30T21:26:01Z","author_date":"2026-06-30T21:26:01Z","committer_date":"2026-06-30T21:26:01Z","tree_sha":"69e15655a52c450605faf1453d87915d3cfedfa0","message_first_line":"Fail fast at startup when grobid-home path contains spaces (Wapiti JNI) (#1481)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3104","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0856:6E5BD:1787313:1BA644D:6AB9293E"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":16977,"blob_sha":"a981fdceb1d048d618fdedd280bf1948c72f74a3","priority":0}],"documents":[{"path":"Readme.md","size":16977,"blob_sha":"a981fdceb1d048d618fdedd280bf1948c72f74a3","priority":0,"status":200,"text":"# GROBID\n\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![Coverage Status](https://coveralls.io/repos/github/grobidOrg/grobid/badge.svg?branch=master)](https://coveralls.io/github/grobidOrg/grobid?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/grobid/badge/?version=latest)](https://readthedocs.org/projects/grobid/?badge=latest)\n[![GitHub release](https://img.shields.io/github/release/grobidOrg/grobid.svg)](https://github.com/grobidOrg/grobid/releases/)\n[![Demo grobidOrg-grobid.hf.space](https://img.shields.io/website-up-down-green-red/https/grobidOrg-grobid.hf.space.svg)](https://grobidOrg-grobid.hf.space)\n[![Docker Hub](https://img.shields.io/docker/pulls/grobid/grobid.svg)](https://hub.docker.com/r/grobid/grobid/ \"Docker Pulls\")\n[![Docker Hub](https://img.shields.io/docker/pulls/lfoppiano/grobid.svg)](https://hub.docker.com/r/lfoppiano/grobid/ \"Docker Pulls\")\n[![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/grobidOrg/grobid/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/grobidOrg/grobid)\n\n> [!TIP]\n> Getting started [here](https://grobid.readthedocs.io/en/latest/getting_started/).\n\n## Summary\n\nGROBID (or Grobid, but not GroBid nor GroBiD) means **G**ene**R**ation **O**f **BI**bliographic **D**ata.\n\nGROBID is a machine learning library for extracting, parsing and re-structuring raw documents such as PDF into structured XML/TEI encoded documents with a particular focus on technical and scientific publications. First developments started in 2008 as a hobby, following a suggestion by Laurent Romary (Inria, France). In 2011, the tool has been made available in open source. Work on GROBID has been steady as a side project since the beginning and is expected to continue as such, facilitated in particular to the continuous support of Inria.\n\nThe following functionalities are available:\n\n- __Header extraction and parsing__ from article in PDF format. The extraction here covers the usual bibliographical information (e.g. title, abstract, authors, affiliations, keywords, etc.).\n- __References extraction and parsing__ from articles in PDF format, around .87 F1-score against on an independent PubMed Central set of 1943 PDF containing 90,125 references, and around .90 on a similar bioRxiv set of 2000 PDF (using the Deep Learning citation model). All the usual publication metadata are covered (including DOI, PMID, etc.).\n- __Citation contexts recognition and resolution__ of the full bibliographical references of the article. The accuracy of citation contexts resolution is between .76 and .91 F1-score depending on the evaluation collection (this corresponds to both the correct identification of the citation callout and its correct association with a full bibliographical reference).\n- __Full text extraction and structuring__ from PDF articles, including a model for the overall document segmentation and models for the structuring of the text body (paragraph, section titles, reference and footnote callouts, figures, tables, data availability statements, etc.). \n- __PDF coordinates__ for extracted information, allowing to create \"augmented\" interactive PDF based on bounding boxes of the identified structures.\n- Parsing of __references in isolation__ (above .90 F1-score at instance-level, .95 F1-score at field level, using the Deep Learning model).\n- __Parsing of names__ (e.g. person title, forenames, middle name, etc.), in particular author names in header, and author names in references (two distinct models).\n- __Parsing of affiliation and address__ blocks.\n- __Parsing of dates__, ISO normalized day, month, year.\n- __Consolidation/resolution of the extracted bibliographical references__ using the [biblio-glutton](https://github.com/kermitt2/biblio-glutton) service or the [CrossRef REST API](https://github.com/CrossRef/rest-api-doc). In both cases, DOI/PMID resolution performance is higher than 0.95 F1-score from PDF extraction.\n- __Extraction and parsing of patent and non-patent references in patent__ publications.\n- __Extraction of Funders and funding information__ with optional matching of extracted funders with the CrossRef Funder Registry.\n- __Identification of copyrights' owner and license associated to the document__, e.g. publisher or authors copyrights, CC-BY/CC-BY-NC/etc. license.\n\nIn a complete PDF processing, GROBID manages 68 final labels used to build relatively fine-grained structures, from traditional publication metadata (title, author first/last/middle names, affiliation types, detailed address, journal, volume, issue, pages, DOI, PMID, etc.) to full text structures (section title, paragraph, reference markers, head/foot notes, figure captions, etc.).\n\nGROBID includes a comprehensive [web service API](https://grobid.readthedocs.io/en/latest/Grobid-service/), [Docker images](https://grobid.readthedocs.io/en/latest/Grobid-docker/), [batch processing](https://grobid.readthedocs.io/en/latest/Grobid-batch/), a JAVA API, a generic [training and evaluation framework](https://grobid.readthedocs.io/en/latest/Training-the-models-of-Grobid/) (precision, recall, etc., n-fold cross-evaluation), systematic [end-to-end benchmarking](https://grobid.readthedocs.io/en/latest/benchmarks/Benchmarking/) on thousand documents and the semi-automatic generation of training data.\n\nGROBID can be considered as production ready. Deployments in production includes ResearchGate, Semantic Scholar, HAL Research Archive, scite.ai, Academia.edu, Internet Archive Scholar, INIST-CNRS, CERN (Invenio), and many more. The tool is designed for speed and high scalability in order to address the full scientific literature corpus.\n\n## Requirements\n\n- **OpenJDK 21** for building GROBID from source\n- Linux (64 bits) or macOS (Intel and ARM) for native builds\n- [Optional] Python 3.10-3.11 with JEP for Deep Learning models \n- [Optional] NVIDIA GPU with CUDA support for faster Deep Learning models\n\nFor detailed installation instructions, including JDK setup and platform-specific requirements, see the [Installation documentation](doc/Install-Grobid.md).\n\nIf you are upgrading from an earlier version, see the [Upgrade guide](doc/Upgrading.md) for version-specific migration notes.\n\nGROBID should run properly \"out of the box\" on Linux (64 bits) and macOS (Intel and ARM). We cannot ensure currently support for Windows as we did before (help welcome!).\n\nGROBID uses Deep Learning models relying on the [DeLFT](https://github.com/kermitt2/delft) library, a task-agnostic Deep Learning framework for sequence labelling and text classification, via [JEP](https://github.com/ninia/jep). GROBID can run Deep Learning architectures (RNN or transformers with or without layout feature channels) or with feature engineered CRF (default), or any mixtures of CRF and DL to balance scalability and accuracy. These models use joint text and visual/layout information provided by [pdfalto](https://github.com/kermitt2/pdfalto). \n\nNote that by default the Deep Learning models are not used, only CRF are selected in the default configuration to accommodate \"out of the box\" hardware. For improved accuracy, you need to [select the Deep Learning models](https://grobid.readthedocs.io/en/latest/Deep-Learning-models/#recommended-deep-learning-models) to be used in the GROBID configuration file, according to your need and hardware capacities (in particular GPU availability and runtime requirements). **Some GROBID Deep Learning models perform significantly better than default CRF**, in particular for bibliographical reference parsing, so it is recommended to consider selecting them to use this tool appropriately. \n\n## Demo\n\n### Demo server\n\nFor testing purposes, two public GROBID demo servers are available thanks to Hugging Face Spaces.\n\nA GROBID demo server with a combination of Deep Learning models and CRF models is available at the following address: [https://grobidOrg-grobid.hf.space/](https://grobidOrg-grobid.hf.space/). This demo runs however on CPU only. If you have GPU for your own server deployment, it will be significantly faster. \n\nA faster demo with CRF only is available at [https://grobidOrg-grobid-crf.hf.space/](https://grobidOrg-grobid-crf.hf.space/). However, accuracy is lower.\n\nThe Web services are documented [here](https://grobid.readthedocs.io/en/latest/Grobid-service/).\n\n_Warning_: Some quota and query limitation apply to the demo server! Please be courteous and do not overload the demo server. \nFor any serious works, you will need to deploy and use your own Grobid server, see the [GROBID and Docker containers documentation](https://grobid.readthedocs.io/en/latest/Grobid-docker/) for doing that easily and activate some Deep Learning models. \n\n### Try in Play With Docker\n\n<a href=\"https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/grobidOrg/grobid/master/compose.yml\">\n  <img src=\"https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png\" alt=\"Try in PWD\"/>\n<\/a>\n\nWait for 30 seconds for Grobid container to be created before opening a browser tab on port 8080. This demo container runs only with CRF models. Note that there is an additional 60s needed when processing a PDF for the first time for the loading of the models on the \"cold\" container. Then this Grobid container is available just for you during 4 hours. \n\n## Clients\n\nFor facilitating the usage GROBID service at scale, we provide clients written in Python, Java, node.js using the [web services](https://grobid.readthedocs.io/en/latest/Grobid-service/) for parallel batch processing:\n\n- <a href=\"https://github.com/kermitt2/grobid-client-python\" target=\"_blank\">Python GROBID client<\/a> (the most complete one in term of supported services and options)\n- <a href=\"https://github.com/kermitt2/grobid-client-java\" target=\"_blank\">Java GROBID client<\/a>\n- <a href=\"https://github.com/kermitt2/grobid-client-node\" target=\"_blank\">Node.js GROBID client<\/a>\n\nA third party client for Go is available offering functionality similar to the Python client:\n\n- <a href=\"https://github.com/miku/grobidclient\" target=\"_blank\">Go GROBID client<\/a>\n\nAll these clients will take advantage of the multi-threading for scaling large set of PDF processing. As a consequence, they will be much more efficient than the [batch command lines](https://grobid.readthedocs.io/en/latest/Grobid-batch/) (which use only one thread) and should be preferred.\n\nFor example, we have been able to run the complete full-text processing at around 10.6 PDF per second (around 915,000 PDF per day, around 20M pages per day) with the node.js client listed above during one week on one 16 CPU machine (16 threads, 32GB RAM, no SDD, articles from mainstream publishers), see [here](https://github.com/kermitt2/grobid/issues/443#issuecomment-505208132) (11.3M PDF were processed in 6 days by 2 servers without interruption).\n\nIn addition, a Java example project is available to illustrate how to use GROBID as a Java library: [https://github.com/kermitt2/grobid-example](https://github.com/kermitt2/grobid-example). The example project is using GROBID Java API for extracting header metadata and citations from a PDF and output the results in BibTeX format.  \n\nFinally, the following python utilities can be used to create structured full text corpora of scientific articles. The tool simply takes a list of strong identifiers like DOI or PMID, performing the identification of online Open Access PDF, full text harvesting, metadata aggregation and Grobid processing in one workflow at scale: [article-dataset-builder](https://github.com/kermitt2/article-dataset-builder)\n\n## How GROBID works \n\nVisit the [documentation page describing the system](https://grobid.readthedocs.io/en/latest/Principles/). To summarize, the key design principles of GROBID are:\n\n- GROBID uses a [cascade of sequence labeling models](https://grobid.readthedocs.io/en/latest/Principles/#document-parsing-as-a-cascade-of-sequence-labeling-models) to parse a document. \n\n- The different models [do not work on text, but on **Layout Tokens**](https://grobid.readthedocs.io/en/latest/Principles/#layout-tokens-not-text) to exploit various visual/layout information available for every tokens.\n\n- GROBID does not use training data derived from existing publisher XML documents, but [small, high quality sets](https://grobid.readthedocs.io/en/latest/Principles/#training-data-qualitat-statt-quantitat) of manually labeled training data. \n\n- Technical choices and [default settings](https://grobid.readthedocs.io/en/latest/Principles/#balancing-accuracy-and-scalability) are driven by the ability to process PDF quickly, with commodity hardware and with good parallelization and scalability capacities.\n\nDetailed end-to-end [benchmarking](https://grobid.readthedocs.io/en/latest/benchmarks/Benchmarking/) are available [GROBID documentation](https://grobid.readthedocs.org) and continuously updated.\n\n## GROBID Modules\n\nA series of additional modules have been developed for performing __structure aware__ text mining directly on scholar PDF, reusing GROBID's PDF processing and sequence labelling weaponry:\n\n- [software-mention](https://github.com/ourresearch/software-mentions): recognition of software mentions and associated attributes in scientific literature\n- [datastet](https://github.com/kermitt2/datastet): identification of sections and sentences introducing datasets in a scientific article, identification of dataset names and attributes (implicit and named datasets) and classification of the type of datasets\n- [grobid-quantities](https://github.com/kermitt2/grobid-quantities): recognition and normalization of physical quantities/measurements\n- [grobid-superconductors](https://github.com/lfoppiano/grobid-superconductors): recognition of superconductor material and properties in scientific literature\n- [entity-fishing](https://github.com/kermitt2/entity-fishing), a tool for extracting Wikidata entities from text and document, which can also use Grobid to pre-process scientific articles in PDF, leading to more precise and relevant entity extraction and the capacity to annotate the PDF with interactive layout\n- [grobid-ner](https://github.com/kermitt2/grobid-ner): named entity recognition\n- [grobid-astro](https://github.com/kermitt2/grobid-astro): recognition of astronomical entities in scientific papers\n- [grobid-bio](https://github.com/kermitt2/grobid-bio): a toy bio-entity tagger using BioNLP/NLPBA 2004 dataset\n- [grobid-dictionaries](https://github.com/MedKhem/grobid-dictionaries): structuring dictionaries in raw PDF format\n\n## Community\n\nJoin the GROBID community to ask questions, get help, and stay up to date — mailing list, Discord, and more on the [Community page](https://grobid.readthedocs.io/en/latest/Community/).\n\n## Release and changes\n\nSee the [Changelog](CHANGELOG.md).\n\n## License\n\nGROBID is distributed under [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). \n\nThe documentation is distributed under [CC-0](https://creativecommons.org/publicdomain/zero/1.0/) license and the annotated data under [CC-BY](https://creativecommons.org/licenses/by/4.0/) license.\n\nIf you contribute to GROBID, you agree to share your contribution following these licenses. \n\nMain author and contact: Patrice Lopez (<patrice.lopez@science-miner.com>)\n\n## Sponsors\n\nej-technologies provided us a free open-source license for its Java Profiler. Click the JProfiler logo below to learn more.\n\n[![JProfiler](doc/img/jprofiler_medium.png)](http://www.ej-technologies.com/products/jprofiler/overview.html)\n\nJetBrains provided us with a free licence for the development: \n\n[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://jb.gg/OpenSource)\n\n\n## How to cite\n\nIf you want reference this software, please refer to the present GitHub project, together with the [Software Heritage](https://www.softwareheritage.org/) project-level permanent identifier.\n\nFor example, the BibTeX would look like this:\n\n```bibtex\n@misc{grobid,\n    title = {GROBID},\n    howpublished = {\\url{https://github.com/grobidOrg/grobid}},\n    publisher = {GitHub},\n    date = {2008/},\n    archivePrefix = {swh},\n    eprint = {1:dir:dab86b296e3c3216e2241968f0d63b68e8209d3c}\n}\n```\n\n> [!TIP]\n> To fetch the latest SWID you can use the following command line (requires `curl` and `jq`):\n    \n```\ncurl -s \"https://archive.softwareheritage.org/api/1/origin/https://github.com/grobidOrg/grobid/visit/latest/\" \\\n  -H \"Accept: application/json\" | jq -r '.snapshot' | \\\n  xargs -I {} curl -s \"https://archive.softwareheritage.org/api/1/snapshot/{}/\" | \\\n  jq -r '.branches[\"refs/heads/master\"].target' | \\\n  xargs -I {} echo \"swh:1:dir:{}\"\n  \nswh:1:dir:324a18113b0c7624a66a21550bd0e8522e328b4e\n```\n\n\nSee the [GROBID documentation](https://grobid.readthedocs.org/en/latest/References) for more related resources. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9C18:3B6DE:16F2BD:5C26BF:6AB9218E"},"text_sha256":"f68f61368314599f362c19de029b259fb749c0a1a18a93166957ae122c2073a3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mdbloice/Augmentor","input_row":{"repository":"mdbloice/Augmentor","url":"https://github.com/mdbloice/Augmentor","name":"Augmentor","owner":"mdbloice","description":"Image augmentation library in Python for machine learning.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5129,"issues":197,"created_at":"2016-03-01T18:29:55Z","updated_at":"2026-09-11T08:08:07Z","first_commit_at":"2016-03-01T18:29:56Z","last_commit_at":"2023-03-29T07:02:37Z","activity_months":84.870000000000005,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:36.747Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mdbloice/Augmentor","visibility":"public","created_at":"2016-03-01T18:29:55Z","updated_at":"2026-09-11T08:08:07Z","private":false,"fork":false,"archived":false,"stargazers_count":5129,"open_issues_count":139,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3103","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:17DFC67:1C007DE:6AB92940"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3102","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:17FFB43:1C200B7:6AB92941"},"commit":{"sha":"ae3e79e61b54343633030bb9359ec0f5001c3824","url":"https://github.com/mdbloice/Augmentor/commit/ae3e79e61b54343633030bb9359ec0f5001c3824","date":"2018-05-11T11:14:41Z","author_date":"2018-05-11T11:14:41Z","committer_date":"2018-05-11T11:14:41Z","tree_sha":"49f7a59df29e20e7c9a92b2255a7a2245c832839","message_first_line":"Minor version bump for small bugfixes."},"tree_request_status":200,"tree_rate":{"github_remaining":"3101","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D7:380E1C:17BDD4D:1BDD4C0:6AB92941"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23415,"blob_sha":"e2cfd77a755d048633838b5aa52bc3aaf656d7c5","priority":0}],"documents":[{"path":"README.md","size":23415,"blob_sha":"e2cfd77a755d048633838b5aa52bc3aaf656d7c5","priority":0,"status":200,"text":"![AugmentorLogo](https://github.com/mdbloice/AugmentorFiles/blob/master/Misc/AugmentorLogo.png)\n\nAugmentor is an image augmentation library in Python for machine learning. It aims to be a standalone library that is platform and framework independent, which is more convenient, allows for finer grained control over augmentation, and implements the most real-world relevant augmentation techniques. It employs a stochastic approach using building blocks that allow for operations to be pieced together in a pipeline.\n\n[![PyPI](https://img.shields.io/badge/Augmentor-v0.2.2-blue.svg?maxAge=2592000)](https://pypi.python.org/pypi/Augmentor)\n[![Documentation Status](https://readthedocs.org/projects/augmentor/badge/?version=master)](https://augmentor.readthedocs.io/en/master/?badge=master)\n[![Build Status](https://travis-ci.org/mdbloice/Augmentor.svg?branch=master)](https://travis-ci.org/mdbloice/Augmentor)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n[![Supported Python Versions](https://img.shields.io/badge/python-2.7%2C%203.3--3.6-blue.svg)](https://pypi.python.org/pypi/Augmentor)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/4QuantOSS/Augmentor/master)\n\n## Installation\n\nAugmentor is written in Python. A Julia version of the package is also being developed as a sister project and is available [here](https://github.com/Evizero/Augmentor.jl).\n\nInstall using `pip` from the command line:\n\n```python\npip install Augmentor\n```\n\nSee the documentation for building from source. To upgrade from a previous version, use `pip install Augmentor --upgrade`.\n\n## Documentation\n\nComplete documentation can be found on Read the Docs: <http://augmentor.readthedocs.io/>\n\n## Quick Start Guide and Usage\nThe purpose of _Augmentor_ is to automate image augmentation (artificial data generation) in order to expand datasets as input for machine learning algorithms, especially neural networks and deep learning.\n\nThe package works by building an augmentation **pipeline** where you define a series of operations to perform on a set of images. Operations, such as rotations or transforms, are added one by one to create an augmentation pipeline: when complete, the pipeline can be executed and an augmented dataset is created.\n\nTo begin, instantiate a `Pipeline` object that points to a directory on your file system:\n\n```python\nimport Augmentor\np = Augmentor.Pipeline(\"/path/to/images\")\n```\n\nYou can then add operations to the Pipeline object `p` as follows:\n\n```python\np.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)\np.zoom(probability=0.5, min_factor=1.1, max_factor=1.5)\n```\n\nEvery function requires you to specify a probability, which is used to decide if an operation is applied to an image as it is passed through the augmentation pipeline.\n\nOnce you have created a pipeline, you can sample from it like so:\n\n```python\np.sample(10000)\n```\n\nwhich will generate 10,000 augmented images based on your specifications. By default these will be written to the disk in a directory named `output` relative to the path specified when initialising the `p` pipeline object above.\n\nIf you wish to process each image in the pipeline exactly once, use `process()`:\n\n```python\np.process()\n```\n\nThis function might be useful for resizing a dataset for example. It would make sense to create a pipeline where all of its operations have their probability set to `1` when using the `process()` method.\n\n### Multi-threading\n\nAugmentor (version >=0.2.1) now uses multi-threading to increase the speed of generating images.\n\nThis *may* slow down some pipelines if the original images are very small. Set `multi_threaded` to ``False`` if slowdown is experienced:\n\n```python\np.sample(100, multi_threaded=False)\n```\n\nHowever, by default the `sample()` function uses multi-threading. This is currently only implemented when saving to disk. Generators will use multi-threading in the next version update.\n\n\n### Ground Truth Data\n\nImages can be passed through the pipeline in groups of two or more so that ground truth data can be identically augmented.\n\n| Original image and mask<sup>[3]<\/sup>                                                                               | Augmented original and mask images                                                                               |\n|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| ![OriginalMask](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/original-with-mask.png) | ![AugmentedMask](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/ground-truth.gif)   |\n\nTo augment ground truth data in parallel to any original data, add a ground truth directory to a pipeline using the [ground_truth()](https://augmentor.readthedocs.io/en/master/code.html#Augmentor.Pipeline.Pipeline.ground_truth) function:\n\n```python\np = Augmentor.Pipeline(\"/path/to/images\")\n# Point to a directory containing ground truth data.\n# Images with the same file names will be added as ground truth data\n# and augmented in parallel to the original data.\np.ground_truth(\"/path/to/ground_truth_images\")\n# Add operations to the pipeline as normal:\np.rotate(probability=1, max_left_rotation=5, max_right_rotation=5)\np.flip_left_right(probability=0.5)\np.zoom_random(probability=0.5, percentage_area=0.8)\np.flip_top_bottom(probability=0.5)\np.sample(50)\n```\n\n### Generators for Keras and PyTorch\n\nIf you do not wish to save to disk, you can use a generator (in this case with Keras):\n\n```python\ng = p.keras_generator(batch_size=128)\nimages, labels = next(g)\n```\n\nwhich returns a batch of images of size 128 and their corresponding labels. Generators return data indefinitely, and can be used to train neural networks with augmented data on the fly.\n\nAlternatively, you can integrate it with PyTorch:\n\n```python\nimport torchvision\ntransforms = torchvision.transforms.Compose([\n    p.torch_transform(),\n    torchvision.transforms.ToTensor(),\n])\n```\n\n## Main Features\n\n### Elastic Distortions\n\nUsing elastic distortions, one image can be used to generate many images that are real-world feasible and label preserving:\n\n| Input Image                                                                                                                       |   | Augmented Images                                                                                                        |\n|-----------------------------------------------------------------------------------------------------------------------------------|---|-------------------------------------------------------------------------------------------------------------------------|\n| ![eight_hand_drawn_border](https://cloud.githubusercontent.com/assets/16042756/23697279/79850d52-03e7-11e7-9445-475316b702a3.png) | → | ![eights_border](https://cloud.githubusercontent.com/assets/16042756/23697283/802698a6-03e7-11e7-94b7-f0b61977ef33.gif) |\n\nThe input image has a 1 pixel black border to emphasise that you are getting distortions without changing the size or aspect ratio of the original image, and without any black/transparent padding around the newly generated images.\n\nThe functionality can be more clearly seen here:\n\n| Original Image<sup>[1]<\/sup>                                                                      | Random distortions applied                                                                            |\n|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Distorted](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/distort.gif) |\n\n### Perspective Transforms\n\nThere are a total of 12 different types of perspective transform available. Four of the most common are shown below.\n\n| Tilt Left                                                                                               | Tilt Right                                                                                               | Tilt Forward                                                                                               | Tilt Backward                                                                                               |\n|---------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| ![TiltLeft](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltLeft_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltRight_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltForward_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltBackward_s.png) |\n\nThe remaining eight types of transform are as follows:\n\n| Skew Type 0                                                                                         | Skew Type 1                                                                                         | Skew Type 2                                                                                         | Skew Type 3                                                                                         |\n|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| ![Skew0](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner0_s.png) | ![Skew1](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner1_s.png) | ![Skew2](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner2_s.png) | ![Skew3](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner3_s.png) |\n\n| Skew Type 4                                                                                         | Skew Type 5                                                                                         | Skew Type 6                                                                                         | Skew Type 7                                                                                         |\n|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| ![Skew4](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner4_s.png) | ![Skew5](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner5_s.png) | ![Skew6](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner6_s.png) | ![Skew7](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner7_s.png) |\n\n### Size Preserving Rotations\n\nRotations by default preserve the file size of the original images:\n\n| Original Image                                                                                    | Rotated 10 degrees, automatically cropped                                                               |\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Rotate](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/rotate_aug_b.png) |\n\nCompared to rotations by other software:\n\n| Original Image                                                                                    | Rotated 10 degrees                                                                                |\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Rotate](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/rotate.png) |\n\n### Size Preserving Shearing\n\nShearing will also automatically crop the correct area from the sheared image, so that you have an image with no black space or padding.\n\n| Original image                                                                                    | Shear (x-axis) 20 degrees                                                                              | Shear (y-axis) 20 degrees                                                                              |\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![ShearX](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_x_aug.png) | ![ShearY](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_y_aug.png) |\n\nCompare this to how this is normally done:\n\n| Original image                                                                                    | Shear (x-axis) 20 degrees                                                                          | Shear (y-axis) 20 degrees                                                                          |\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![ShearX](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_x.png) | ![ShearY](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_y.png) |\n\n### Cropping\n\nCropping can also be handled in a manner more suitable for machine learning image augmentation:\n\n| Original image                                                                                    | Random crops + resize operation                                                                          |\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/crop_resize.gif) |\n\n### Random Erasing\n\nRandom Erasing is a technique used to make models robust to occlusion. This may be useful for training neural networks used in object detection in navigation scenarios, for example.\n\n| Original image<sup>[2]<\/sup>                                                                                               | Random Erasing                                                                                                                        |\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/city-road-street-italy-scaled.jpg) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/city-road-street-italy-animation.gif) |\n\nSee the [Pipeline.random_erasing()](http://augmentor.readthedocs.io/en/master/code.html#Augmentor.Pipeline.Pipeline.random_erasing) documentation for usage.\n\n### Chaining Operations in a Pipeline\n\nWith only a few operations, a single image can be augmented to produce large numbers of new, label-preserving samples:\n\n| Original image                                                                                           | Distortions + mirroring                                                                                          |\n|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/eight_200px.png) | ![DistortFlipFlop](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/flip_distort.gif) |\n\nIn the example above, we have applied three operations: first we randomly distort the image, then we flip it horizontally with a probability of 0.5 and then vertically with a probability of 0.5. We then sample from this pipeline 100 times to create 100 new data.\n\n```python\np.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=8)\np.flip_left_right(probability=0.5)\np.flip_top_bottom(probability=0.5)\np.sample(100)\n```\n\n## Tutorial Notebooks\n\n### Integration with Keras using Generators\nAugmentor can be used as a replacement for Keras' augmentation functionality. Augmentor can create a generator which produces augmented data indefinitely, according to the pipeline you have defined. See the following notebooks for details:\n\n- Reading images from a local directory, augmenting them at run-time, and using a generator to pass the augmented stream of images to a Keras convolutional neural network, see [`Augmentor_Keras.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Augmentor_Keras.ipynb)\n- Augmenting data in-memory (in array format) and using a generator to pass these new images to the Keras neural network, see [`Augmentor_Keras_Array_Data.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Augmentor_Keras_Array_Data.ipynb)\n\n### Per-Class Augmentation Strategies\nAugmentor allows for pipelines to be defined per class. That is, you can define different augmentation strategies on a class-by-class basis for a given classification problem.\n\nSee an example of this in the following Jupyter notebook: [`Per_Class_Augmentation_Strategy.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Per_Class_Augmentation_Strategy.ipynb)\n\n## Complete Example\n\nLet's perform an augmentation task on a single image, demonstrating the pipeline and several features of Augmentor.\n\nFirst import the package and initialise a Pipeline object by pointing it to a directory containing your images:\n\n```python\nimport Augmentor\n\np = Augmentor.Pipeline(\"/home/user/augmentor_data_tests\")\n```\n\nNow you can begin adding operations to the pipeline object:\n\n```python\np.rotate90(probability=0.5)\np.rotate270(probability=0.5)\np.flip_left_right(probability=0.8)\np.flip_top_bottom(probability=0.3)\np.crop_random(probability=1, percentage_area=0.5)\np.resize(probability=1.0, width=120, height=120)\n```\n\nOnce you have added the operations you require, you can sample images from this pipeline:\n\n```python\np.sample(100)\n```\n\nSome sample output:\n\n| Input Image<sup>[3]<\/sup>                                                                                          |   | Augmented Images                                                                                                    |\n|--------------------------------------------------------------------------------------------------------------------|---|---------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://cloud.githubusercontent.com/assets/16042756/23019262/b696e3a6-f441-11e6-958d-17f18f2cd35e.jpg) | → | ![Augmented](https://cloud.githubusercontent.com/assets/16042756/23018832/cda6967e-f43f-11e6-9082-765c291f1fd6.gif) |\n\nThe augmented images may be useful for a boundary detection task, for example.\n\n## Licence and Acknowledgements\n\nAugmentor is made available under the terms of the MIT Licence. See [`Licence.md`](https://github.com/mdbloice/Augmentor/blob/master/LICENSE.md).\n\n[1] Checkerboard image obtained from Wikimedia Commons and is in the public domain: <https://commons.wikimedia.org/wiki/File:Checkerboard_pattern.svg>\n\n[2] Street view image is in the public domain: <http://stokpic.com/project/italian-city-street-with-shoppers/>\n\n[3] Skin lesion image obtained from the ISIC Archive:\n\n- Image id = 5436e3abbae478396759f0cf\n- Download: <https://isic-archive.com:443/api/v1/image/5436e3abbae478396759f0cf/download>\n\nYou can use `urllib` to obtain the skin lesion image in order to reproduce the augmented images above:\n\n```python\n>>> from urllib import urlretrieve\n>>> im_url = \"https://isic-archive.com:443/api/v1/image/5436e3abbae478396759f0cf/download\"\n>>> urlretrieve(im_url, \"ISIC_0000000.jpg\")\n('ISIC_0000000.jpg', <httplib.HTTPMessage instance at 0x7f7bd949a950>)\n```\n\nNote: For Python 3, use `from urllib.request import urlretrieve`.\n\n## Tests\nTo run the automated tests, clone the repository and run:\n\n```bash\n$ py.test -v\n```\n\nfrom the command line. To view the CI tests that are run after each commit, see <https://travis-ci.org/mdbloice/Augmentor>.\n\n## Citing Augmentor\nIf you find this package useful and wish to cite it, you can use\n\nMarcus D. Bloice, Christof Stocker, and Andreas Holzinger, *Augmentor: An Image Augmentation Library for Machine Learning*, arXiv preprint **arXiv:1708.04680**, <https://arxiv.org/abs/1708.04680>, 2017.\n\n## Asciicast\n\nClick the preview below to view a video demonstration of Augmentor in use:\n\n[![asciicast](https://asciinema.org/a/105368.png)](https://asciinema.org/a/105368?autoplay=1&speed=3)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"488C:40B0C:177DAC:5CB2C9:6AB9218F"},"text_sha256":"4fc8a07b9478a67ac9bc35309897c43d8eabf1ad6c3308259ac5f4f8b94b3769"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3100","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:17E36F7:1C0348A:6AB92942"},"commit":{"sha":"894d5cc414205cf4becfb7c6f987b8c66feb9542","url":"https://github.com/mdbloice/Augmentor/commit/894d5cc414205cf4becfb7c6f987b8c66feb9542","date":"2023-03-29T07:02:37Z","author_date":"2023-03-29T07:02:37Z","committer_date":"2023-03-29T07:02:37Z","tree_sha":"cc8749a0011ef2f4252df23ac5ce4208593b01e0","message_first_line":"Version bump to 0.2.12"},"tree_request_status":200,"tree_rate":{"github_remaining":"3099","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0871:71C58:17A4068:1BC48B7:6AB92942"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":24987,"blob_sha":"1c01bfa3fa9bbb27270088e0d83cf268b5655c0d","priority":0}],"documents":[{"path":"README.md","size":24987,"blob_sha":"1c01bfa3fa9bbb27270088e0d83cf268b5655c0d","priority":0,"status":200,"text":"![AugmentorLogo](https://github.com/mdbloice/AugmentorFiles/blob/master/Misc/AugmentorLogo.png)\n\nAugmentor is an image augmentation library in Python for machine learning. It aims to be a standalone library that is platform and framework independent, which is more convenient, allows for finer grained control over augmentation, and implements the most real-world relevant augmentation techniques. It employs a stochastic approach using building blocks that allow for operations to be pieced together in a pipeline.\n\n[![PyPI](https://img.shields.io/badge/Augmentor-v0.2.10-blue.svg?maxAge=2592000)](https://pypi.python.org/pypi/Augmentor)\n[![Supported Python Versions](https://img.shields.io/badge/python-2.7%20%7C%203.5%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue.svg)](https://pypi.python.org/pypi/Augmentor)\n[![PyPI Install](https://github.com/mdbloice/Augmentor/actions/workflows/PyPI.yml/badge.svg)](https://github.com/mdbloice/Augmentor/actions/workflows/PyPI.yml)\n[![Pytest](https://github.com/mdbloice/Augmentor/actions/workflows/package-tests.yml/badge.svg)](https://github.com/mdbloice/Augmentor/actions/workflows/package-tests.yml)\n[![Documentation Status](https://readthedocs.org/projects/augmentor/badge/?version=master)](https://augmentor.readthedocs.io/en/master/?badge=master)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/4QuantOSS/Augmentor/master)\n\n## Installation\n\nAugmentor is written in Python. A Julia version of the package is also being developed as a sister project and is available [here](https://github.com/Evizero/Augmentor.jl).\n\nInstall using `pip` from the command line:\n\n```python\npip install Augmentor\n```\n\nSee the documentation for building from source. To upgrade from a previous version, use `pip install Augmentor --upgrade`.\n\n## Documentation\n\nComplete documentation can be found on Read the Docs: [https://augmentor.readthedocs.io](https://augmentor.readthedocs.io/en/stable/)\n\n## Quick Start Guide and Usage\nThe purpose of _Augmentor_ is to automate image augmentation (artificial data generation) in order to expand datasets as input for machine learning algorithms, especially neural networks and deep learning.\n\nThe package works by building an augmentation **pipeline** where you define a series of operations to perform on a set of images. Operations, such as rotations or transforms, are added one by one to create an augmentation pipeline: when complete, the pipeline can be executed and an augmented dataset is created.\n\nTo begin, instantiate a `Pipeline` object that points to a directory on your file system:\n\n```python\nimport Augmentor\np = Augmentor.Pipeline(\"/path/to/images\")\n```\n\nYou can then add operations to the Pipeline object `p` as follows:\n\n```python\np.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)\np.zoom(probability=0.5, min_factor=1.1, max_factor=1.5)\n```\n\nEvery function requires you to specify a probability, which is used to decide if an operation is applied to an image as it is passed through the augmentation pipeline.\n\nOnce you have created a pipeline, you can sample from it like so:\n\n```python\np.sample(10000)\n```\n\nwhich will generate 10,000 augmented images based on your specifications. By default these will be written to the disk in a directory named `output` relative to the path specified when initialising the `p` pipeline object above.\n\nIf you wish to process each image in the pipeline exactly once, use `process()`:\n\n```python\np.process()\n```\n\nThis function might be useful for resizing a dataset for example. It would make sense to create a pipeline where all of its operations have their probability set to `1` when using the `process()` method.\n\n### Multi-threading\n\nAugmentor (version >=0.2.1) now uses multi-threading to increase the speed of generating images.\n\nThis *may* slow down some pipelines if the original images are very small. Set `multi_threaded` to ``False`` if slowdown is experienced:\n\n```python\np.sample(100, multi_threaded=False)\n```\n\nHowever, by default the `sample()` function uses multi-threading. This is currently only implemented when saving to disk. Generators will use multi-threading in the next version update.\n\n\n### Ground Truth Data\n\nImages can be passed through the pipeline in groups of two or more so that ground truth data can be identically augmented.\n\n| Original image and mask<sup>[3]<\/sup>                                                                               | Augmented original and mask images                                                                               |\n|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| ![OriginalMask](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/original-with-mask.png) | ![AugmentedMask](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/ground-truth.gif)   |\n\nTo augment ground truth data in parallel to any original data, add a ground truth directory to a pipeline using the [ground_truth()](https://augmentor.readthedocs.io/en/master/code.html#Augmentor.Pipeline.Pipeline.ground_truth) function:\n\n```python\np = Augmentor.Pipeline(\"/path/to/images\")\n# Point to a directory containing ground truth data.\n# Images with the same file names will be added as ground truth data\n# and augmented in parallel to the original data.\np.ground_truth(\"/path/to/ground_truth_images\")\n# Add operations to the pipeline as normal:\np.rotate(probability=1, max_left_rotation=5, max_right_rotation=5)\np.flip_left_right(probability=0.5)\np.zoom_random(probability=0.5, percentage_area=0.8)\np.flip_top_bottom(probability=0.5)\np.sample(50)\n```\n\n### Multiple Mask/Image Augmentation\n\nUsing the `DataPipeline` class (Augmentor version >= 0.2.3), images that have multiple associated masks can be augmented:\n\n| Multiple Mask Augmentation                                                                               |\n|----------------------------------------------------------------------------------------------------------|\n| ![MultipleMask](https://github.com/mdbloice/AugmentorFiles/blob/master/UsageGuide/merged-multi-mask.gif) |\n\nArbitrarily long lists of images can be passed through the pipeline in groups and augmented identically using the `DataPipeline` class. This is useful for ground truth images that have several masks, for example.\n\nIn the example below, the images and their masks are contained in the `images` data structure (as lists of lists), while their labels are contained in `y`:\n\n```python\np = Augmentor.DataPipeline(images, y)\np.rotate(1, max_left_rotation=5, max_right_rotation=5)\np.flip_top_bottom(0.5)\np.zoom_random(1, percentage_area=0.5)\n\naugmented_images, labels = p.sample(100)\n```\n\nThe `DataPipeline` returns images directly (`augmented_images` above), and does not save them to disk, nor does it read data from the disk. Images are passed directly to `DataPipeline` during initialisation.\n\nFor details of the `images` data structure and how to create it, see the [`Multiple-Mask-Augmentation.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Multiple-Mask-Augmentation.ipynb) Jupyter notebook.\n\n### Generators for Keras and PyTorch\n\nIf you do not wish to save to disk, you can use a generator (in this case with Keras):\n\n```python\ng = p.keras_generator(batch_size=128)\nimages, labels = next(g)\n```\n\nwhich returns a batch of images of size 128 and their corresponding labels. Generators return data indefinitely, and can be used to train neural networks with augmented data on the fly.\n\nAlternatively, you can integrate it with PyTorch:\n\n```python\nimport torchvision\ntransforms = torchvision.transforms.Compose([\n    p.torch_transform(),\n    torchvision.transforms.ToTensor(),\n])\n```\n\n## Main Features\n\n### Elastic Distortions\n\nUsing elastic distortions, one image can be used to generate many images that are real-world feasible and label preserving:\n\n| Input Image                                                                                                                       |   | Augmented Images                                                                                                        |\n|-----------------------------------------------------------------------------------------------------------------------------------|---|-------------------------------------------------------------------------------------------------------------------------|\n| ![eight_hand_drawn_border](https://cloud.githubusercontent.com/assets/16042756/23697279/79850d52-03e7-11e7-9445-475316b702a3.png) | → | ![eights_border](https://cloud.githubusercontent.com/assets/16042756/23697283/802698a6-03e7-11e7-94b7-f0b61977ef33.gif) |\n\nThe input image has a 1 pixel black border to emphasise that you are getting distortions without changing the size or aspect ratio of the original image, and without any black/transparent padding around the newly generated images.\n\nThe functionality can be more clearly seen here:\n\n| Original Image<sup>[1]<\/sup>                                                                      | Random distortions applied                                                                            |\n|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Distorted](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/distort.gif) |\n\n### Perspective Transforms\n\nThere are a total of 12 different types of perspective transform available. Four of the most common are shown below.\n\n| Tilt Left                                                                                               | Tilt Right                                                                                               | Tilt Forward                                                                                               | Tilt Backward                                                                                               |\n|---------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| ![TiltLeft](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltLeft_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltRight_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltForward_s.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/TiltBackward_s.png) |\n\nThe remaining eight types of transform are as follows:\n\n| Skew Type 0                                                                                         | Skew Type 1                                                                                         | Skew Type 2                                                                                         | Skew Type 3                                                                                         |\n|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| ![Skew0](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner0_s.png) | ![Skew1](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner1_s.png) | ![Skew2](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner2_s.png) | ![Skew3](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner3_s.png) |\n\n| Skew Type 4                                                                                         | Skew Type 5                                                                                         | Skew Type 6                                                                                         | Skew Type 7                                                                                         |\n|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| ![Skew4](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner4_s.png) | ![Skew5](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner5_s.png) | ![Skew6](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner6_s.png) | ![Skew7](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/Corner7_s.png) |\n\n### Size Preserving Rotations\n\nRotations by default preserve the file size of the original images:\n\n| Original Image                                                                                    | Rotated 10 degrees, automatically cropped                                                               |\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Rotate](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/rotate_aug_b.png) |\n\nCompared to rotations by other software:\n\n| Original Image                                                                                    | Rotated 10 degrees                                                                                |\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Rotate](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/rotate.png) |\n\n### Size Preserving Shearing\n\nShearing will also automatically crop the correct area from the sheared image, so that you have an image with no black space or padding.\n\n| Original image                                                                                    | Shear (x-axis) 20 degrees                                                                              | Shear (y-axis) 20 degrees                                                                              |\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![ShearX](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_x_aug.png) | ![ShearY](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_y_aug.png) |\n\nCompare this to how this is normally done:\n\n| Original image                                                                                    | Shear (x-axis) 20 degrees                                                                          | Shear (y-axis) 20 degrees                                                                          |\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![ShearX](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_x.png) | ![ShearY](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/shear_y.png) |\n\n### Cropping\n\nCropping can also be handled in a manner more suitable for machine learning image augmentation:\n\n| Original image                                                                                    | Random crops + resize operation                                                                          |\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/orig.png) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/crop_resize.gif) |\n\n### Random Erasing\n\nRandom Erasing is a technique used to make models robust to occlusion. This may be useful for training neural networks used in object detection in navigation scenarios, for example.\n\n| Original image<sup>[2]<\/sup>                                                                                               | Random Erasing                                                                                                                        |\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/city-road-street-italy-scaled.jpg) | ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/city-road-street-italy-animation.gif) |\n\nSee the [Pipeline.random_erasing()](https://augmentor.readthedocs.io/en/stable/code.html#Augmentor.Pipeline.Pipeline.random_erasing) documentation for usage.\n\n### Chaining Operations in a Pipeline\n\nWith only a few operations, a single image can be augmented to produce large numbers of new, label-preserving samples:\n\n| Original image                                                                                           | Distortions + mirroring                                                                                          |\n|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/eight_200px.png) | ![DistortFlipFlop](https://raw.githubusercontent.com/mdbloice/AugmentorFiles/master/UsageGuide/flip_distort.gif) |\n\nIn the example above, we have applied three operations: first we randomly distort the image, then we flip it horizontally with a probability of 0.5 and then vertically with a probability of 0.5. We then sample from this pipeline 100 times to create 100 new data.\n\n```python\np.random_distortion(probability=1, grid_width=4, grid_height=4, magnitude=8)\np.flip_left_right(probability=0.5)\np.flip_top_bottom(probability=0.5)\np.sample(100)\n```\n\n## Tutorial Notebooks\n\n### Integration with Keras using Generators\nAugmentor can be used as a replacement for Keras' augmentation functionality. Augmentor can create a generator which produces augmented data indefinitely, according to the pipeline you have defined. See the following notebooks for details:\n\n- Reading images from a local directory, augmenting them at run-time, and using a generator to pass the augmented stream of images to a Keras convolutional neural network, see [`Augmentor_Keras.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Augmentor_Keras.ipynb)\n- Augmenting data in-memory (in array format) and using a generator to pass these new images to the Keras neural network, see [`Augmentor_Keras_Array_Data.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Augmentor_Keras_Array_Data.ipynb)\n\n### Per-Class Augmentation Strategies\nAugmentor allows for pipelines to be defined per class. That is, you can define different augmentation strategies on a class-by-class basis for a given classification problem.\n\nSee an example of this in the following Jupyter notebook: [`Per_Class_Augmentation_Strategy.ipynb`](https://github.com/mdbloice/Augmentor/blob/master/notebooks/Per_Class_Augmentation_Strategy.ipynb)\n\n## Complete Example\n\nLet's perform an augmentation task on a single image, demonstrating the pipeline and several features of Augmentor.\n\nFirst import the package and initialise a Pipeline object by pointing it to a directory containing your images:\n\n```python\nimport Augmentor\n\np = Augmentor.Pipeline(\"/home/user/augmentor_data_tests\")\n```\n\nNow you can begin adding operations to the pipeline object:\n\n```python\np.rotate90(probability=0.5)\np.rotate270(probability=0.5)\np.flip_left_right(probability=0.8)\np.flip_top_bottom(probability=0.3)\np.crop_random(probability=1, percentage_area=0.5)\np.resize(probability=1.0, width=120, height=120)\n```\n\nOnce you have added the operations you require, you can sample images from this pipeline:\n\n```python\np.sample(100)\n```\n\nSome sample output:\n\n| Input Image<sup>[3]<\/sup>                                                                                          |   | Augmented Images                                                                                                    |\n|--------------------------------------------------------------------------------------------------------------------|---|---------------------------------------------------------------------------------------------------------------------|\n| ![Original](https://cloud.githubusercontent.com/assets/16042756/23019262/b696e3a6-f441-11e6-958d-17f18f2cd35e.jpg) | → | ![Augmented](https://cloud.githubusercontent.com/assets/16042756/23018832/cda6967e-f43f-11e6-9082-765c291f1fd6.gif) |\n\nThe augmented images may be useful for a boundary detection task, for example.\n\n## Licence and Acknowledgements\n\nAugmentor is made available under the terms of the MIT Licence. See [`Licence.md`](https://github.com/mdbloice/Augmentor/blob/master/LICENSE.md).\n\n[1] Checkerboard image obtained from Wikimedia Commons and is in the public domain: <https://commons.wikimedia.org/wiki/File:Checkerboard_pattern.svg>\n\n[2] Street view image is in the public domain: <http://stokpic.com/project/italian-city-street-with-shoppers/>\n\n[3] Skin lesion image obtained from the ISIC Archive:\n\n- Image id = 5436e3abbae478396759f0cf\n- Download: <https://isic-archive.com:443/api/v1/image/5436e3abbae478396759f0cf/download>\n\nYou can use `urllib` to obtain the skin lesion image in order to reproduce the augmented images above:\n\n```python\n>>> from urllib import urlretrieve\n>>> im_url = \"https://isic-archive.com:443/api/v1/image/5436e3abbae478396759f0cf/download\"\n>>> urlretrieve(im_url, \"ISIC_0000000.jpg\")\n('ISIC_0000000.jpg', <httplib.HTTPMessage instance at 0x7f7bd949a950>)\n```\n\nNote: For Python 3, use `from urllib.request import urlretrieve`.\n\nLogo created at [LogoMakr.com](https://logomakr.com)\n\n## Tests\nTo run the automated tests, clone the repository and run:\n\n```bash\n$ py.test -v\n```\n\nfrom the command line. To view the CI tests that are run after each commit, see <https://travis-ci.org/mdbloice/Augmentor>.\n\n## Asciicast\n\nClick the preview below to view a video demonstration of Augmentor in use:\n\n[![asciicast](https://asciinema.org/a/105368.png)](https://asciinema.org/a/105368?autoplay=1&speed=3)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53C8:3A3DD:172F8E:5C6487:6AB92191"},"text_sha256":"a8f9d96c236af80f6de85060b4deb26a9a2d088346429fedfe236c0942847801"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"KaiyangZhou/deep-person-reid","input_row":{"repository":"KaiyangZhou/deep-person-reid","url":"https://github.com/KaiyangZhou/deep-person-reid","name":"deep-person-reid","owner":"KaiyangZhou","description":"Torchreid: Deep learning person re-identification in PyTorch.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4915,"issues":556,"created_at":"2018-03-11T21:14:39Z","updated_at":"2026-09-25T13:12:40Z","first_commit_at":"2018-03-11T21:17:48Z","last_commit_at":"2026-01-09T05:23:24Z","activity_months":93.969999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:39.553Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"KaiyangZhou/deep-person-reid","visibility":"public","created_at":"2018-03-11T21:14:39Z","updated_at":"2026-09-25T13:12:40Z","private":false,"fork":false,"archived":false,"stargazers_count":4915,"open_issues_count":164,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3098","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:17F0767:1C1119F:6AB92943"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3097","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:17ED223:1C0D92C:6AB92943"},"commit":{"sha":"8b5381478329b2b34e1a39dcd9222f6c15c56594","url":"https://github.com/KaiyangZhou/deep-person-reid/commit/8b5381478329b2b34e1a39dcd9222f6c15c56594","date":"2018-05-23T10:42:32Z","author_date":"2018-05-23T10:42:32Z","committer_date":"2018-05-23T10:42:32Z","tree_sha":"7a4830be0a25ccd25581250d05c2a54dc16a5c03","message_first_line":"mv data_time after .cuda()"},"tree_request_status":200,"tree_rate":{"github_remaining":"3096","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:17CF238:1BEF6D2:6AB92944"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23758,"blob_sha":"83fd2a46e4092a263e5e3cf5c7561bdcd8bd2e19","priority":0}],"documents":[{"path":"README.md","size":23758,"blob_sha":"83fd2a46e4092a263e5e3cf5c7561bdcd8bd2e19","priority":0,"status":200,"text":"# deep-person-reid\nThis repo contains [PyTorch](http://pytorch.org/) implementations of deep person re-identification models.\n\nWe support\n- multi-GPU training.\n- both image-based and video-based reid.\n- unified interface for different reid models.\n- end-to-end training and evaluation.\n- standard splits used by most papers.\n- download of trained models.\n\n## Updates\n- May 2018: Support [MSMT17](http://www.pkuvmc.com/publications/msmt17.html) and [DukeMTMC-VideoReID](https://github.com/Yu-Wu/DukeMTMC-VideoReID); Added Inception-v4, Inception-ResNet-v2, DPN, ResNext and SE-ResNe(X)t. (trained models coming up later)\n- Apr 2018: Added [DukeMTMC-reID](https://github.com/layumi/DukeMTMC-reID_evaluation#dukemtmc-reid-description); Added [SqueezeNet](https://arxiv.org/abs/1602.07360), [MobileNetV2 (CVPR'18)](https://arxiv.org/abs/1801.04381), [ShuffleNet (CVPR'18)](https://arxiv.org/abs/1707.01083) and [Xception (CVPR'17)](https://arxiv.org/abs/1610.02357).\n- Apr 2018: Added [Harmonious Attention CNN (CVPR'18)](https://arxiv.org/abs/1802.08122). We achieved Rank-1 42.4% (vs. 41.7% in the paper) on CUHK03 (Detected) by training from scratch. The result can be reproduced by `python train_img_model_xent.py -d cuhk03 -a hacnn --save-dir log/hacnn-xent-cuhk03 --height 160 --width 64 --max-epoch 500 --stepsize -1 --eval-step 50`.\n- Apr 2018: Code upgraded to pytorch 0.4.0.\n- Apr 2018: Added [CUHK03](http://www.ee.cuhk.edu.hk/~xgwang/CUHK_identification.html). Models are [available](https://github.com/KaiyangZhou/deep-person-reid#cuhk03-detected-new-protocol-767700).\n- Apr 2018: Added [iLIDS-VID](http://www.eecs.qmul.ac.uk/~xiatian/downloads_qmul_iLIDS-VID_ReID_dataset.html) and [PRID-2011](https://www.tugraz.at/institute/icg/research/team-bischof/lrs/downloads/PRID11/). Models are [available](https://github.com/KaiyangZhou/deep-person-reid#video-person-reid).\n- Mar 2018: Added argument `--htri-only` to `train_img_model_xent_htri.py` and `train_vid_model_xent_htri.py`. If this argument is true, only `htri` [4] is used for training. See [here](https://github.com/KaiyangZhou/deep-person-reid/blob/master/train_img_model_xent_htri.py#L189) for detailed changes.\n- Mar 2018: Added [Multi-scale Deep CNN (ICCV'17)](https://arxiv.org/abs/1709.05165) [10] with slight modifications: (a) Input size is (256, 128) instead of (160, 60); (b) We add an average pooling layer after the last conv feature maps. (c) We train the network with our strategy. Model trained from scratch on Market1501 is [available](https://github.com/KaiyangZhou/deep-person-reid#results).\n- Mar 2018: Added [center loss (ECCV'16)](https://github.com/KaiyangZhou/pytorch-center-loss) [9] and the trained model weights.\n\n## Dependencies\n- [PyTorch](http://pytorch.org/) (0.4.0)\n- [torchvision](https://github.com/pytorch/vision/) (0.2.1)\n\nPython2 is recommended for current version.\n\n## Install\n1. `cd` to the folder where you want to download this repo.\n2. run `git clone https://github.com/KaiyangZhou/deep-person-reid`.\n\n## Prepare data\nCreate a directory to store reid datasets under this repo via\n```bash\ncd deep-person-reid/\nmkdir data/\n```\n\nIf you wanna store datasets in another directory, you need to specify `--root path_to_your/data` when running the training code. Please follow the instructions below to prepare each dataset. After that, you can simply do `-d the_dataset` when running the training code. \n\nPlease do not call image dataset when running video reid scripts, otherwise error would occur, and vice versa.\n\n**Market1501** [7]:\n1. Download dataset to `data/` from http://www.liangzheng.org/Project/project_reid.html.\n2. Extract dataset and rename to `market1501`. The data structure would look like:\n```\nmarket1501/\n    bounding_box_test/\n    bounding_box_train/\n    ...\n```\n3. Use `-d market1501` when running the training code.\n\n**CUHK03** [13]:\n1. Create a folder named `cuhk03/` under `data/`.\n2. Download dataset to `data/cuhk03/` from http://www.ee.cuhk.edu.hk/~xgwang/CUHK_identification.html and extract `cuhk03_release.zip`, so you will have `data/cuhk03/cuhk03_release`.\n3. Download new split [14] from [person-re-ranking](https://github.com/zhunzhong07/person-re-ranking/tree/master/evaluation/data/CUHK03). What you need are `cuhk03_new_protocol_config_detected.mat` and `cuhk03_new_protocol_config_labeled.mat`. Put these two mat files under `data/cuhk03`. Finally, the data structure would look like\n```\ncuhk03/\n    cuhk03_release/\n    cuhk03_new_protocol_config_detected.mat\n    cuhk03_new_protocol_config_labeled.mat\n    ...\n```\n4. Use `-d cuhk03` when running the training code. In default mode, we use new split (767/700). If you wanna use the original splits (1367/100) created by [13], specify `--cuhk03-classic-split`. As [13] computes CMC differently from Market1501, you might need to specify `--use-metric-cuhk03` for fair comparison with their method. In addition, we support both `labeled` and `detected` modes. The default mode loads `detected` images. Specify `--cuhk03-labeled` if you wanna train and test on `labeled` images.\n\n\n**DukeMTMC-reID** [16, 17]:\n1. Create a directory under `data/` called `dukemtmc-reid`.\n2. Download dataset `DukeMTMC-reID.zip` from https://github.com/layumi/DukeMTMC-reID_evaluation#download-dataset and put it to `data/dukemtmc-reid`. Extract the zip file, which leads to\n```\ndukemtmc-reid/\n    DukeMTMC-reid.zip # (you can delete this zip file, it is ok)\n    DukeMTMC-reid/ # this folder contains 8 files.\n```\n3. Use `-d dukemtmcreid` when running the training code.\n\n\n**MSMT17** [22]:\n1. Create a directory named `msmt17/` under `data/`.\n2. Download dataset `MSMT17_V1.tar.gz` to `data/msmt17/` from http://www.pkuvmc.com/publications/msmt17.html. Extract the file under the same folder, so you will have\n```\nmsmt17/\n    MSMT17_V1.tar.gz # (do whatever you want with this .tar file)\n    MSMT17_V1/\n        train/\n        test/\n        list_train.txt\n        ... (totally six .txt files)\n```\n3. Use `-d msmt17` when running the training code.\n\n**MARS** [8]:\n1. Create a directory named `mars/` under `data/`.\n2. Download dataset to `data/mars/` from http://www.liangzheng.com.cn/Project/project_mars.html.\n3. Extract `bbox_train.zip` and `bbox_test.zip`.\n4. Download split information from https://github.com/liangzheng06/MARS-evaluation/tree/master/info and put `info/` in `data/mars` (we want to follow the standard split in [8]). The data structure would look like:\n```\nmars/\n    bbox_test/\n    bbox_train/\n    info/\n```\n5. Use `-d mars` when running the training code.\n\n**iLIDS-VID** [11]:\n1. The code supports automatic download and formatting. Simple use `-d ilidsvid` when running the training code. The data structure would look like:\n```\nilids-vid/\n    i-LIDS-VID/\n    train-test people splits/\n    splits.json\n```\n\n**PRID** [12]:\n1. Under `data/`, do `mkdir prid2011` to create a directory.\n2. Download dataset from https://www.tugraz.at/institute/icg/research/team-bischof/lrs/downloads/PRID11/ and extract it under `data/prid2011`.\n3. Download the split created by [iLIDS-VID](http://www.eecs.qmul.ac.uk/~xiatian/downloads_qmul_iLIDS-VID_ReID_dataset.html) from [here](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/datasets/prid2011/splits_prid2011.json), and put it in `data/prid2011/`. We follow [11] and use 178 persons whose sequences are more than a threshold so that results on this dataset can be fairly compared with other approaches. The data structure would look like:\n```\nprid2011/\n    splits_prid2011.json\n    prid_2011/\n        multi_shot/\n        single_shot/\n        readme.txt\n```\n4. Use `-d prid` when running the training code.\n\n**DukeMTMC-VideoReID** [16, 23]:\n1. Make a directory `data/dukemtmc-vidreid`.\n2. Download `dukemtmc_videoReID.zip` from https://github.com/Yu-Wu/DukeMTMC-VideoReID. Unzip the file to `data/dukemtmc-vidreid`. You need to have\n```\ndukemtmc-vidreid/\n    dukemtmc_videoReID/\n        train_split/\n        query_split/\n        gallery_split/\n        ... (and two license files)\n```\n3. Use `-d dukemtmcvidreid` when running the training code.\n\n## Dataset loaders\nThese are implemented in `dataset_loader.py` where we have two main classes that subclass [torch.utils.data.Dataset](http://pytorch.org/docs/master/_modules/torch/utils/data/dataset.html#Dataset):\n* [ImageDataset](https://github.com/KaiyangZhou/deep-person-reid/blob/master/dataset_loader.py#L22): processes image-based person reid datasets.\n* [VideoDataset](https://github.com/KaiyangZhou/deep-person-reid/blob/master/dataset_loader.py#L38): processes video-based person reid datasets.\n\nThese two classes are used for [torch.utils.data.DataLoader](http://pytorch.org/docs/master/_modules/torch/utils/data/dataloader.html#DataLoader) that can provide batched data. Data loader wich `ImageDataset` outputs batch data of `(batch, channel, height, width)`, while data loader with `VideoDataset` outputs batch data of `(batch, sequence, channel, height, width)`.\n\n## Models\n* `models/ResNet.py`: ResNet50 [1], ResNet101 [1], ResNet50M [2].\n* `models/ResNeXt.py`: ResNeXt101 [26].\n* `models/SEResNet.py`: SEResNet50 [25], SEResNet101 [25], SEResNeXt50 [25], SEResNeXt101 [25].\n* `models/DenseNet.py`: DenseNet121 [3].\n* `models/MuDeep.py`: MuDeep [10]. \n* `models/HACNN.py`: HACNN [15].\n* `models/SqueezeNet.py`: SqueezeNet [18].\n* `models/MobileNet.py`: MobileNetV2 [19].\n* `models/ShuffleNet.py`: ShuffleNet [20].\n* `models/Xception.py`: Xception [21].\n* `models/InceptionV4.py`: InceptionV4 [24].\n* `models/InceptionResNetV2.py`: InceptionResNetV2 [24].\n* `models/DPN.py`: DPN92 [27].\n\nSee `models/__init__.py` for details regarding what keys to use to call these models.\n\n## Loss functions\n* `xent`: cross entropy + label smoothing regularizer [5].\n* `htri`: triplet loss with hard positive/negative mining [4] .\n* `cent`: center loss [9].\n\nOptimizers are wrapped in `optimizers.py`, which supports `adam` (default) and `sgd`. Use `--optim string_name` to manage the optimizer.\n\n## Train\nTraining codes are implemented mainly in\n* `train_img_model_xent.py`: train image model with cross entropy loss.\n* `train_img_model_xent_htri.py`: train image model with combination of cross entropy loss and hard triplet loss.\n* `train_img_model_cent.py`: train image model with center loss.\n* `train_vid_model_xent.py`: train video model with cross entropy loss.\n* `train_vid_model_xent_htri.py`: train video model with combination of cross entropy loss and hard triplet loss.\n\nFor example, to train an image reid model using ResNet50 and cross entropy loss, run\n```bash\npython train_img_model_xent.py -d market1501 -a resnet50 --max-epoch 60 --train-batch 32 --test-batch 32 --stepsize 20 --eval-step 20 --save-dir log/resnet50-xent-market1501 --gpu-devices 0\n```\n\nTo use multiple GPUs, you can set `--gpu-devices 0,1,2,3`.\n\nPlease run `python train_blah_blah.py -h` for more details regarding arguments.\n\n## Results\n:dog: means that model is initialized with imagenet pretrained weights.\n\n### Image person reid\n\n#### Market1501\n| Model | Param Size (M) | Loss | Rank-1/5/10 (%) | mAP (%) | Model weights | Published Rank | Published mAP |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| DenseNet121:dog: | 7.72 | xent | 86.5/93.6/95.7 | 67.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/densenet121_xent_market1501.pth.tar) | | |\n| DenseNet121:dog: | 7.72 | xent+htri | 89.5/96.3/97.5 | 72.6 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/densenet121_xent_htri_market1501.pth.tar) | | |\n| ResNet50:dog: | 25.05 | xent | 85.4/94.1/95.9 | 68.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50_xent_market1501.pth.tar) | | |\n| ResNet50:dog: | 25.05 | xent+htri | 87.5/95.3/97.3 | 72.3 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50_xent_htri_market1501.pth.tar) | | |\n| ResNet50M:dog: | 30.01 | xent | 89.4/95.9/97.4 | 75.0 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50m_xent_market1501.pth.tar) | 89.9/-/- | 75.6 |\n| ResNet50M:dog: | 30.01 | xent+htri | 90.7/97.0/98.2 | 76.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50m_xent_htri_market1501.pth.tar) | | |\n| MuDeep | 138.02 | xent+htri| 71.5/89.3/96.3 | 47.0 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/mudeep_xent_htri_market1501.pth.tar) | | |\n| SqueezeNet | 1.13 | xent | 65.1/82.3/87.9 | 41.6 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/squeezenet_xent_market1501.pth.tar) | | |\n| MobileNetV2 | 3.19 | xent | 77.0/89.5/92.8 | 56.3 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/mobilenet_xent_market1501.pth.tar) | | |\n| ShuffleNet | 1.63 | xent | 68.7/85.7/90.2 | 44.9 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/shufflenet_xent_market1501.pth.tar) | | |\n| Xception | 22.39 | xent | 72.1/88.2/92.1 | 52.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/xception_xent_market1501.pth.tar) | | |\n| HACNN | 3.70 | xent | 88.7/95.3/97.4 | 71.2 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/hacnn_xent_market1501.pth.tar) | 91.2/-/- | 75.7 |\n\n#### CUHK03 (detected, [new protocol (767/700)](https://github.com/zhunzhong07/person-re-ranking#the-new-trainingtesting-protocol-for-cuhk03))\n| Model | Param Size (M) | Loss | Rank-1/5/10 (%) | mAP (%) | Model weights | Published Rank | Published mAP |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| DenseNet121:dog: | 7.74 | xent | 41.0/61.7/71.5 | 40.6 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/densenet121_xent_cuhk03.pth.tar) | | |\n| ResNet50:dog: | 25.08 | xent | 48.8/69.4/78.4 | 47.5 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50_xent_cuhk03.pth.tar) | | |\n| ResNet50M:dog: | 30.06 | xent | 57.5/75.4/82.5 | 55.2 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50m_xent_cuhk03.pth.tar) | 47.1/-/- | 43.5 |\n| HACNN | 3.72 | xent | 42.4/60.9/70.5 | 40.9 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/hacnn_xent_cuhk03.pth.tar) | 41.7/-/- |38.6 |\n| SqueezeNet | 1.13 | xent | 20.0/38.4/48.2 | 20.0 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/squeezenet_xent_cuhk03.pth.tar) | | |\n| MobileNetV2 | 3.21 | xent | 35.1/55.8/64.7 | 33.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/mobilenet_xent_cuhk03.pth.tar) | | |\n| ShuffleNet | 1.64 | xent | 22.0/39.3/49.9 | 21.2 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/shufflenet_xent_cuhk03.pth.tar) | | |\n\n#### DukeMTMC-reID\n| Model | Param Size (M) | Loss | Rank-1/5/10 (%) | mAP (%) | Model weights | Published Rank | Published mAP |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| DenseNet121:dog: | 7.67 | xent | 74.9/86.0/88.8 | 54.5 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/densenet121_xent_dukemtmcreid.pth.tar) | | |\n| ResNet50:dog: | 24.94 | xent | 76.3/87.1/90.9 | 59.5 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50_xent_dukemtmcreid.pth.tar) | | |\n| ResNet50M:dog: | 29.86 | xent | 80.5/89.8/92.4 | 63.3 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/resnet50m_xent_dukemtmcreid.pth.tar) | 80.4/-/- | 63.9 |\n| SqueezeNet | 1.10 | xent | 50.2/68.9/75.3  | 30.3 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/squeezenet_xent_dukemtmcreid.pth.tar) | | |\n| MobileNetV2 | 3.12 | xent | 65.6/79.2/83.7 | 43.6 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/mobilenet_xent_dukemtmcreid.pth.tar) | | |\n| ShuffleNet | 1.58 | xent | 56.9/74.680.5 | 37.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/shufflenet_xent_dukemtmcreid.pth.tar) | | |\n| HACNN | 3.65 | xent | 78.5/88.8/91.3 | 60.8 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/image-models/hacnn_xent_dukemtmcreid.pth.tar) | 80.5/-/- | 63.8 |\n\n### Video person reid\n#### MARS\n\n| Model | Param Size (M) | Loss | Rank-1/5/10 (%) | mAP (%) | Model weights | Published Rank | Published mAP |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| DenseNet121:dog: | 7.59 | xent | 65.2/81.1/86.3 | 52.1 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/video-models/densenet121_xent_mars.pth.tar) | | |\n| DenseNet121:dog: | 7.59 | xent+htri | 82.6/93.2/95.4 | 74.6 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/video-models/densenet121_xent_htri_mars.pth.tar) | | |\n| ResNet50:dog: | 24.79 | xent | 74.5/88.8/91.8 | 64.0 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/video-models/resnet50_xent_mars.pth.tar) | | |\n| ResNet50:dog: | 24.79 | xent+htri | 80.8/92.1/94.3 | 74.0 | [download](http://www.eecs.qmul.ac.uk/~kz303/deep-person-reid/model-zoo/video-models/resnet50_xent_htri_mars.pth.tar) | | |\n| ResNet50M:dog: | 29.63 | xent | 77.8/89.8/92.8 | 67.5 | - | | |\n| ResNet50M:dog: | 29.63 | xent+htri | 82.3/93.8/95.3 | 75.4 | - | | |\n\n\n## Test\nSay you have downloaded ResNet50 trained with `xent` on `market1501`. The path to this model is  `'saved-models/resnet50_xent_market1501.pth.tar'` (create a directory to store model weights `mkdir saved-models/`). Then, run the following command to test\n```bash\npython train_img_model_xent.py -d market1501 -a resnet50 --evaluate --resume saved-models/resnet50_xent_market1501.pth.tar --save-dir log/resnet50-xent-market1501 --test-batch 32\n```\n\nLikewise, to test video reid model, you should have a pretrained model saved under `saved-models/`, e.g. `saved-models/resnet50_xent_mars.pth.tar`, then run\n```bash\npython train_vid_model_xent.py -d mars -a resnet50 --evaluate --resume saved-models/resnet50_xent_mars.pth.tar --save-dir log/resnet50-xent-mars --test-batch 2\n```\n**Note** that `--test-batch` in video reid represents number of tracklets. If we set this argument to 2, and sample 15 images per tracklet, the resulting number of images per batch is 2*15=30. Adjust this argument according to your GPU memory.\n\n## Q&A\n1. **How do I set different learning rates to different components in my model?**\n\nA: Instead of giving `model.parameters()` to optimizer, you could pass an iterable of `dict`s, as described [here](http://pytorch.org/docs/master/optim.html#per-parameter-options). Please see the example below\n```python\n# First comment the following code.\n#optimizer = torch.optim.Adam(model.parameters(), lr=args.lr, weight_decay=args.weight_decay)\nparam_groups = [\n  {'params': model.base.parameters(), 'lr': 0},\n  {'params': model.classifier.parameters()},\n]\n# Such that model.base will be frozen and model.classifier will be trained with\n# the default leanring rate, i.e. args.lr. This example code only applies to model\n# that has two components (base and classifier). Modify the code to adapt to your model.\noptimizer = torch.optim.Adam(param_groups, lr=args.lr, weight_decay=args.weight_decay)\n```\nOf course, you can pass `model.classifier.parameters()` to optimizer if you only need to train the classifier (in this case, setting the `requires_grad`s wrt the base model params to false will be more efficient).\n\n\n## References\n[1] [He et al. Deep Residual Learning for Image Recognition. CVPR 2016.](https://arxiv.org/abs/1512.03385)<br />\n[2] [Yu et al. The Devil is in the Middle: Exploiting Mid-level Representations for Cross-Domain Instance Matching. arXiv:1711.08106.](https://arxiv.org/abs/1711.08106) <br />\n[3] [Huang et al. Densely Connected Convolutional Networks. CVPR 2017.](https://arxiv.org/abs/1608.06993) <br />\n[4] [Hermans et al. In Defense of the Triplet Loss for Person Re-Identification. arXiv:1703.07737.](https://arxiv.org/abs/1703.07737) <br />\n[5] [Szegedy et al. Rethinking the Inception Architecture for Computer Vision. CVPR 2016.](https://arxiv.org/abs/1512.00567) <br />\n[6] [Kingma and Ba. Adam: A Method for Stochastic Optimization. ICLR 2015.](https://arxiv.org/abs/1412.6980) <br />\n[7] [Zheng et al. Scalable Person Re-identification: A Benchmark. ICCV 2015.](https://www.cv-foundation.org/openaccess/content_iccv_2015/papers/Zheng_Scalable_Person_Re-Identification_ICCV_2015_paper.pdf) <br />\n[8] [Zheng et al. MARS: A Video Benchmark for Large-Scale Person Re-identification. ECCV 2016.](http://www.liangzheng.com.cn/Project/project_mars.html) <br />\n[9] [Wen et al. A Discriminative Feature Learning Approach for Deep Face Recognition. ECCV 2016](https://ydwen.github.io/papers/WenECCV16.pdf) <br />\n[10] [Qian et al. Multi-scale Deep Learning Architectures for Person Re-identification. ICCV 2017.](https://arxiv.org/abs/1709.05165) <br />\n[11] [Wang et al. Person Re-Identification by Video Ranking. ECCV 2014.](http://www.eecs.qmul.ac.uk/~xiatian/papers/ECCV14/WangEtAl_ECCV14.pdf) <br />\n[12] [Hirzer et al. Person Re-Identification by Descriptive and Discriminative Classification. SCIA 2011.](https://files.icg.tugraz.at/seafhttp/files/ba284964-6e03-4261-bb39-e85280707598/hirzer_scia_2011.pdf) <br />\n[13] [Li et al. DeepReID: Deep Filter Pairing Neural Network for Person Re-identification. CVPR 2014.](https://www.cv-foundation.org/openaccess/content_cvpr_2014/papers/Li_DeepReID_Deep_Filter_2014_CVPR_paper.pdf) <br />\n[14] [Zhong et al. Re-ranking Person Re-identification with k-reciprocal Encoding. CVPR 2017](https://arxiv.org/abs/1701.08398) <br />\n[15] [Li et al. Harmonious Attention Network for Person Re-identification. CVPR 2018.](https://arxiv.org/abs/1802.08122) <br />\n[16] [Ristani et al. Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking. ECCVW 2016.](https://arxiv.org/abs/1609.01775) <br />\n[17] [Zheng et al. Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro. ICCV 2017.](https://arxiv.org/abs/1701.07717) <br />\n[18] [Iandola et al. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and< 0.5 MB model size. arXiv:1602.07360.](https://arxiv.org/abs/1602.07360) <br />\n[19] [Sandler et al. MobileNetV2: Inverted Residuals and Linear Bottlenecks. CVPR 2018.](https://arxiv.org/abs/1801.04381) <br />\n[20] [Zhang et al. ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices. CVPR 2018.](https://arxiv.org/abs/1707.01083) <br />\n[21] [Chollet. Xception: Deep Learning with Depthwise Separable Convolutions. CVPR 2017.](https://arxiv.org/abs/1610.02357) <br />\n[22] [Wei et al. Person Transfer GAN to Bridge Domain Gap for Person Re-Identification. CVPR 2018.](http://www.pkuvmc.com/publications/msmt17.html) <br />\n[23] [Wu et al. Exploit the Unknown Gradually: One-Shot Video-Based Person Re-Identification by Stepwise Learning. CVPR 2018.](http://xuanyidong.com/publication/cvpr-2018-eug/) <br />\n[24] [Szegedy et al. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. ICLRW 2016.](https://arxiv.org/abs/1602.07261) <br />\n[25] [Hu et al. Squeeze-and-Excitation Networks. CVPR 2018.](https://arxiv.org/abs/1709.01507) <br />\n[26] [Xie et al. \nAggregated Residual Transformations for Deep Neural Networks. CVPR 2017.](https://arxiv.org/abs/1611.05431) <br />\n[27] [Chen et al. Dual Path Networks. NIPS 2017.](https://arxiv.org/abs/1707.01629) <br />\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5702:40CE8:17AA69:5CDEAC:6AB92191"},"text_sha256":"69dce4a09e098c8caaed8fe94bd751a26be628193145909ea93b08ae7e875abc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3095","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:17FD9B1:1C1DC08:6AB92945"},"commit":{"sha":"f8cd150fdf77e8d9e1ed143b7f308c2c609ded50","url":"https://github.com/KaiyangZhou/deep-person-reid/commit/f8cd150fdf77e8d9e1ed143b7f308c2c609ded50","date":"2026-01-09T05:23:24Z","author_date":"2026-01-09T05:23:24Z","committer_date":"2026-01-09T05:23:24Z","tree_sha":"b169597a4dc4937c33eff73277785d419f5cf51c","message_first_line":"Update README.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"3094","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:17FA161:1C1A9A9:6AB92945"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":17379,"blob_sha":"c08214cfc6efe2d2daf75a0f59b13859850612e2","priority":0}],"documents":[{"path":"README.rst","size":17379,"blob_sha":"c08214cfc6efe2d2daf75a0f59b13859850612e2","priority":0,"status":200,"text":"Torchreid\n===========\nTorchreid is a library for deep-learning person re-identification, written in `PyTorch <https://pytorch.org/>`_ and developed for our ICCV'19 project, `Omni-Scale Feature Learning for Person Re-Identification <https://arxiv.org/abs/1905.00953>`_.\n\nIt features:\n\n- multi-GPU training\n- support both image- and video-reid\n- end-to-end training and evaluation\n- incredibly easy preparation of reid datasets\n- multi-dataset training\n- cross-dataset evaluation\n- standard protocol used by most research papers\n- highly extensible (easy to add models, datasets, training methods, etc.)\n- implementations of state-of-the-art deep reid models\n- access to pretrained reid models\n- advanced training techniques\n- visualization tools (tensorboard, ranks, etc.)\n\n\nCode: https://github.com/KaiyangZhou/deep-person-reid.\n\nDocumentation: https://kaiyangzhou.github.io/deep-person-reid/.\n\nHow-to instructions: https://kaiyangzhou.github.io/deep-person-reid/user_guide.\n\nModel zoo: https://kaiyangzhou.github.io/deep-person-reid/MODEL_ZOO.\n\nTech report: https://arxiv.org/abs/1910.10093.\n\nYou can find some research projects that are built on top of Torchreid `here <https://github.com/KaiyangZhou/deep-person-reid/tree/master/projects>`_.\n\nThe model weights are also available on Huggingface: https://huggingface.co/kaiyangzhou/osnet.\n\n\nWhat's new\n------------\n- [Aug 2022] We have added model export capabilities to the following frameworks: ONNX, OpenVINO and TFLite. The export script can be found `here <https://github.com/KaiyangZhou/deep-person-reid/blob/master/tools/export.py>`_\n- [Aug 2021] We have released the ImageNet-pretrained models of ``osnet_ain_x0_75``, ``osnet_ain_x0_5`` and ``osnet_ain_x0_25``. The pretraining setup follows `pycls <https://github.com/facebookresearch/pycls/blob/master/configs/archive/imagenet/resnet/R-50-1x64d_step_8gpu.yaml>`_.\n- [Apr 2021] We have updated the appendix in the `TPAMI version of OSNet <https://arxiv.org/abs/1910.06827v5>`_ to include results in the multi-source domain generalization setting. The trained models can be found in the `Model Zoo <https://kaiyangzhou.github.io/deep-person-reid/MODEL_ZOO.html>`_.\n- [Apr 2021] We have added a script to automate the process of calculating average results over multiple splits. For more details please see ``tools/parse_test_res.py``.\n- [Apr 2021] ``v1.4.0``: We added the person search dataset, `CUHK-SYSU <http://www.ee.cuhk.edu.hk/~xgwang/PS/dataset.html>`_.  Please see the `documentation <https://kaiyangzhou.github.io/deep-person-reid/>`_ regarding how to download the dataset (it contains cropped person images).\n- [Apr 2021] All models in the model zoo have been moved to google drive. Please raise an issue if any model's performance is inconsistent with the numbers shown in the model zoo page (could be caused by wrong links).\n- [Mar 2021] `OSNet <https://arxiv.org/abs/1910.06827>`_ will appear in the TPAMI journal! Compared with the conference version, which focuses on discriminative feature learning using the omni-scale building block, this journal extension further considers generalizable feature learning by integrating `instance normalization layers <https://arxiv.org/abs/1607.08022>`_ with the OSNet architecture. We hope this journal paper can motivate more future work to taclke the generalization issue in cross-dataset re-ID.\n- [Mar 2021] Generalization across domains (datasets) in person re-ID is crucial in real-world applications, which is closely related to the topic of *domain generalization*. Interested in learning how the field of domain generalization has developed over the last decade? Check our recent survey in this topic at https://arxiv.org/abs/2103.02503, with coverage on the history, datasets, related problems, methodologies, potential directions, and so on (*methods designed for generalizable re-ID are also covered*!).\n- [Feb 2021] ``v1.3.6`` Added `University-1652 <https://dl.acm.org/doi/abs/10.1145/3394171.3413896>`_, a new dataset for multi-view multi-source geo-localization (credit to `Zhedong Zheng <https://github.com/layumi>`_).\n- [Feb 2021] ``v1.3.5``: Now the `cython code <https://github.com/KaiyangZhou/deep-person-reid/pull/412>`_ works on Windows (credit to `lablabla <https://github.com/lablabla>`_).\n- [Jan 2021] Our recent work, `MixStyle <https://openreview.net/forum?id=6xHJ37MVxxp>`_ (mixing instance-level feature statistics of samples of different domains for improving domain generalization), has been accepted to ICLR'21. The code has been released at https://github.com/KaiyangZhou/mixstyle-release where the person re-ID part is based on Torchreid.\n- [Jan 2021] A new evaluation metric called `mean Inverse Negative Penalty (mINP)` for person re-ID has been introduced in `Deep Learning for Person Re-identification: A Survey and Outlook (TPAMI 2021) <https://arxiv.org/abs/2001.04193>`_. Their code can be accessed at `<https://github.com/mangye16/ReID-Survey>`_.\n- [Aug 2020] ``v1.3.3``: Fixed bug in ``visrank`` (caused by not unpacking ``dsetid``).\n- [Aug 2020] ``v1.3.2``: Added ``_junk_pids`` to ``grid`` and ``prid``. This avoids using mislabeled gallery images for training when setting ``combineall=True``.\n- [Aug 2020] ``v1.3.0``: (1) Added ``dsetid`` to the existing 3-tuple data source, resulting in ``(impath, pid, camid, dsetid)``. This variable denotes the dataset ID and is useful when combining multiple datasets for training (as a dataset indicator). E.g., when combining ``market1501`` and ``cuhk03``, the former will be assigned ``dsetid=0`` while the latter will be assigned ``dsetid=1``. (2) Added ``RandomDatasetSampler``. Analogous to ``RandomDomainSampler``, ``RandomDatasetSampler`` samples a certain number of images (``batch_size // num_datasets``) from each of specified datasets (the amount is determined by ``num_datasets``).\n- [Aug 2020] ``v1.2.6``: Added ``RandomDomainSampler`` (it samples ``num_cams`` cameras each with ``batch_size // num_cams`` images to form a mini-batch).\n- [Jun 2020] ``v1.2.5``: (1) Dataloader's output from ``__getitem__`` has been changed from ``list`` to ``dict``. Previously, an element, e.g. image tensor, was fetched with ``imgs=data[0]``. Now it should be obtained by ``imgs=data['img']``. See this `commit <https://github.com/KaiyangZhou/deep-person-reid/commit/aefe335d68f39a20160860e6d14c2d34f539b8a5>`_ for detailed changes. (2) Added ``k_tfm`` as an option to image data loader, which allows data augmentation to be applied ``k_tfm`` times *independently* to an image. If ``k_tfm > 1``, ``imgs=data['img']`` returns a list with ``k_tfm`` image tensors.\n- [May 2020] Added the person attribute recognition code used in `Omni-Scale Feature Learning for Person Re-Identification (ICCV'19) <https://arxiv.org/abs/1905.00953>`_. See ``projects/attribute_recognition/``.\n- [May 2020] ``v1.2.1``: Added a simple API for feature extraction (``torchreid/utils/feature_extractor.py``). See the `documentation <https://kaiyangzhou.github.io/deep-person-reid/user_guide.html>`_ for the instruction.\n- [Apr 2020] Code for reproducing the experiments of `deep mutual learning <https://zpascal.net/cvpr2018/Zhang_Deep_Mutual_Learning_CVPR_2018_paper.pdf>`_ in the `OSNet paper <https://arxiv.org/pdf/1905.00953v6.pdf>`__ (Supp. B) has been released at ``projects/DML``.\n- [Apr 2020] Upgraded to ``v1.2.0``. The engine class has been made more model-agnostic to improve extensibility. See `Engine <torchreid/engine/engine.py>`_ and `ImageSoftmaxEngine <torchreid/engine/image/softmax.py>`_ for more details. Credit to `Dassl.pytorch <https://github.com/KaiyangZhou/Dassl.pytorch>`_.\n- [Dec 2019] Our `OSNet paper <https://arxiv.org/pdf/1905.00953v6.pdf>`_ has been updated, with additional experiments (in section B of the supplementary) showing some useful techniques for improving OSNet's performance in practice.\n- [Nov 2019] ``ImageDataManager`` can load training data from target datasets by setting ``load_train_targets=True``, and the train-loader can be accessed with ``train_loader_t = datamanager.train_loader_t``. This feature is useful for domain adaptation research.\n\n\nInstallation\n---------------\n\nMake sure `conda <https://www.anaconda.com/distribution/>`_ is installed.\n\n\n.. code-block:: bash\n\n    # cd to your preferred directory and clone this repo\n    git clone https://github.com/KaiyangZhou/deep-person-reid.git\n\n    # create environment\n    cd deep-person-reid/\n    conda create --name torchreid python=3.7\n    conda activate torchreid\n\n    # install dependencies\n    # make sure `which python` and `which pip` point to the correct path\n    pip install -r requirements.txt\n\n    # install torch and torchvision (select the proper cuda version to suit your machine)\n    conda install pytorch torchvision cudatoolkit=9.0 -c pytorch\n\n    # install torchreid (don't need to re-build it if you modify the source code)\n    python setup.py develop\n\nAnother way to install is to run everything inside docker container:\n\n- build: ``make build-image``\n- run: ``make run``\n\nGet started: 30 seconds to Torchreid\n-------------------------------------\n1. Import ``torchreid``\n\n.. code-block:: python\n    \n    import torchreid\n\n2. Load data manager\n\n.. code-block:: python\n    \n    datamanager = torchreid.data.ImageDataManager(\n        root=\"reid-data\",\n        sources=\"market1501\",\n        targets=\"market1501\",\n        height=256,\n        width=128,\n        batch_size_train=32,\n        batch_size_test=100,\n        transforms=[\"random_flip\", \"random_crop\"]\n    )\n\n3 Build model, optimizer and lr_scheduler\n\n.. code-block:: python\n    \n    model = torchreid.models.build_model(\n        name=\"resnet50\",\n        num_classes=datamanager.num_train_pids,\n        loss=\"softmax\",\n        pretrained=True\n    )\n\n    model = model.cuda()\n\n    optimizer = torchreid.optim.build_optimizer(\n        model,\n        optim=\"adam\",\n        lr=0.0003\n    )\n\n    scheduler = torchreid.optim.build_lr_scheduler(\n        optimizer,\n        lr_scheduler=\"single_step\",\n        stepsize=20\n    )\n\n4. Build engine\n\n.. code-block:: python\n    \n    engine = torchreid.engine.ImageSoftmaxEngine(\n        datamanager,\n        model,\n        optimizer=optimizer,\n        scheduler=scheduler,\n        label_smooth=True\n    )\n\n5. Run training and test\n\n.. code-block:: python\n    \n    engine.run(\n        save_dir=\"log/resnet50\",\n        max_epoch=60,\n        eval_freq=10,\n        print_freq=10,\n        test_only=False\n    )\n\n\nA unified interface\n-----------------------\nIn \"deep-person-reid/scripts/\", we provide a unified interface to train and test a model. See \"scripts/main.py\" and \"scripts/default_config.py\" for more details. The folder \"configs/\" contains some predefined configs which you can use as a starting point.\n\nBelow we provide an example to train and test `OSNet (Zhou et al. ICCV'19) <https://arxiv.org/abs/1905.00953>`_. Assume :code:`PATH_TO_DATA` is the directory containing reid datasets. The environmental variable :code:`CUDA_VISIBLE_DEVICES` is omitted, which you need to specify if you have a pool of gpus and want to use a specific set of them.\n\nConventional setting\n^^^^^^^^^^^^^^^^^^^^^\n\nTo train OSNet on Market1501, do\n\n.. code-block:: bash\n\n    python scripts/main.py \\\n    --config-file configs/im_osnet_x1_0_softmax_256x128_amsgrad_cosine.yaml \\\n    --transforms random_flip random_erase \\\n    --root $PATH_TO_DATA\n\n\nThe config file sets Market1501 as the default dataset. If you wanna use DukeMTMC-reID, do\n\n.. code-block:: bash\n\n    python scripts/main.py \\\n    --config-file configs/im_osnet_x1_0_softmax_256x128_amsgrad_cosine.yaml \\\n    -s dukemtmcreid \\\n    -t dukemtmcreid \\\n    --transforms random_flip random_erase \\\n    --root $PATH_TO_DATA \\\n    data.save_dir log/osnet_x1_0_dukemtmcreid_softmax_cosinelr\n\nThe code will automatically (download and) load the ImageNet pretrained weights. After the training is done, the model will be saved as \"log/osnet_x1_0_market1501_softmax_cosinelr/model.pth.tar-250\". Under the same folder, you can find the `tensorboard <https://pytorch.org/docs/stable/tensorboard.html>`_ file. To visualize the learning curves using tensorboard, you can run :code:`tensorboard --logdir=log/osnet_x1_0_market1501_softmax_cosinelr` in the terminal and visit :code:`http://localhost:6006/` in your web browser.\n\nEvaluation is automatically performed at the end of training. To run the test again using the trained model, do\n\n.. code-block:: bash\n\n    python scripts/main.py \\\n    --config-file configs/im_osnet_x1_0_softmax_256x128_amsgrad_cosine.yaml \\\n    --root $PATH_TO_DATA \\\n    model.load_weights log/osnet_x1_0_market1501_softmax_cosinelr/model.pth.tar-250 \\\n    test.evaluate True\n\n\nCross-domain setting\n^^^^^^^^^^^^^^^^^^^^^\n\nSuppose you wanna train OSNet on DukeMTMC-reID and test its performance on Market1501, you can do\n\n.. code-block:: bash\n\n    python scripts/main.py \\\n    --config-file configs/im_osnet_x1_0_softmax_256x128_amsgrad.yaml \\\n    -s dukemtmcreid \\\n    -t market1501 \\\n    --transforms random_flip color_jitter \\\n    --root $PATH_TO_DATA\n\nHere we only test the cross-domain performance. However, if you also want to test the performance on the source dataset, i.e. DukeMTMC-reID, you can set :code:`-t dukemtmcreid market1501`, which will evaluate the model on the two datasets separately.\n\nDifferent from the same-domain setting, here we replace :code:`random_erase` with :code:`color_jitter`. This can improve the generalization performance on the unseen target dataset.\n\nPretrained models are available in the `Model Zoo <https://kaiyangzhou.github.io/deep-person-reid/MODEL_ZOO.html>`_.\n\n\nDatasets\n--------\n\nImage-reid datasets\n^^^^^^^^^^^^^^^^^^^^^\n- `Market1501 <https://www.cv-foundation.org/openaccess/content_iccv_2015/papers/Zheng_Scalable_Person_Re-Identification_ICCV_2015_paper.pdf>`_\n- `CUHK03 <https://www.cv-foundation.org/openaccess/content_cvpr_2014/papers/Li_DeepReID_Deep_Filter_2014_CVPR_paper.pdf>`_\n- `DukeMTMC-reID <https://arxiv.org/abs/1701.07717>`_\n- `MSMT17 <https://arxiv.org/abs/1711.08565>`_\n- `VIPeR <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.331.7285&rep=rep1&type=pdf>`_\n- `GRID <http://www.eecs.qmul.ac.uk/~txiang/publications/LoyXiangGong_cvpr_2009.pdf>`_\n- `CUHK01 <http://www.ee.cuhk.edu.hk/~xgwang/papers/liZWaccv12.pdf>`_\n- `SenseReID <http://openaccess.thecvf.com/content_cvpr_2017/papers/Zhao_Spindle_Net_Person_CVPR_2017_paper.pdf>`_\n- `QMUL-iLIDS <http://www.eecs.qmul.ac.uk/~sgg/papers/ZhengGongXiang_BMVC09.pdf>`_\n- `PRID <https://pdfs.semanticscholar.org/4c1b/f0592be3e535faf256c95e27982db9b3d3d3.pdf>`_\n\nGeo-localization datasets\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n- `University-1652 <https://dl.acm.org/doi/abs/10.1145/3394171.3413896>`_\n\nVideo-reid datasets\n^^^^^^^^^^^^^^^^^^^^^^^\n- `MARS <http://www.liangzheng.org/1320.pdf>`_\n- `iLIDS-VID <https://www.eecs.qmul.ac.uk/~sgg/papers/WangEtAl_ECCV14.pdf>`_\n- `PRID2011 <https://pdfs.semanticscholar.org/4c1b/f0592be3e535faf256c95e27982db9b3d3d3.pdf>`_\n- `DukeMTMC-VideoReID <http://openaccess.thecvf.com/content_cvpr_2018/papers/Wu_Exploit_the_Unknown_CVPR_2018_paper.pdf>`_\n\n\nModels\n-------\n\nImageNet classification models\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n- `ResNet <https://arxiv.org/abs/1512.03385>`_\n- `ResNeXt <https://arxiv.org/abs/1611.05431>`_\n- `SENet <https://arxiv.org/abs/1709.01507>`_\n- `DenseNet <https://arxiv.org/abs/1608.06993>`_\n- `Inception-ResNet-V2 <https://arxiv.org/abs/1602.07261>`_\n- `Inception-V4 <https://arxiv.org/abs/1602.07261>`_\n- `Xception <https://arxiv.org/abs/1610.02357>`_\n- `IBN-Net <https://arxiv.org/abs/1807.09441>`_\n\nLightweight models\n^^^^^^^^^^^^^^^^^^^\n- `NASNet <https://arxiv.org/abs/1707.07012>`_\n- `MobileNetV2 <https://arxiv.org/abs/1801.04381>`_\n- `ShuffleNet <https://arxiv.org/abs/1707.01083>`_\n- `ShuffleNetV2 <https://arxiv.org/abs/1807.11164>`_\n- `SqueezeNet <https://arxiv.org/abs/1602.07360>`_\n\nReID-specific models\n^^^^^^^^^^^^^^^^^^^^^^\n- `MuDeep <https://arxiv.org/abs/1709.05165>`_\n- `ResNet-mid <https://arxiv.org/abs/1711.08106>`_\n- `HACNN <https://arxiv.org/abs/1802.08122>`_\n- `PCB <https://arxiv.org/abs/1711.09349>`_\n- `MLFN <https://arxiv.org/abs/1803.09132>`_\n- `OSNet <https://arxiv.org/abs/1905.00953>`_\n- `OSNet-AIN <https://arxiv.org/abs/1910.06827>`_\n\n\nUseful links\n-------------\n- `OSNet-IBN1-Lite (test-only code with lite docker container) <https://github.com/RodMech/OSNet-IBN1-Lite>`_\n- `Deep Learning for Person Re-identification: A Survey and Outlook <https://github.com/mangye16/ReID-Survey>`_\n\n\nCitation\n---------\nIf you use this code or the models in your research, please give credit to the following papers:\n\n.. code-block:: bash\n\n    @article{torchreid,\n      title={Torchreid: A Library for Deep Learning Person Re-Identification in Pytorch},\n      author={Zhou, Kaiyang and Xiang, Tao},\n      journal={arXiv preprint arXiv:1910.10093},\n      year={2019}\n    }\n    \n    @inproceedings{zhou2019osnet,\n      title={Omni-Scale Feature Learning for Person Re-Identification},\n      author={Zhou, Kaiyang and Yang, Yongxin and Cavallaro, Andrea and Xiang, Tao},\n      booktitle={ICCV},\n      year={2019}\n    }\n\n    @article{zhou2021osnet,\n      title={Learning Generalisable Omni-Scale Representations for Person Re-Identification},\n      author={Zhou, Kaiyang and Yang, Yongxin and Cavallaro, Andrea and Xiang, Tao},\n      journal={TPAMI},\n      year={2021}\n    }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A78:3FA0D:1728AD:5C5D88:6AB92192"},"text_sha256":"20b769511aa854ae74f303a9e7f7281e1d9509d335df4bf3043e0151313d8b25"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/VisualDL","input_row":{"repository":"PaddlePaddle/VisualDL","url":"https://github.com/PaddlePaddle/VisualDL","name":"VisualDL","owner":"PaddlePaddle","description":"Deep Learning Visualization Toolkit（『飞桨』深度学习可视化工具 ）","language":"HTML","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4881,"issues":485,"created_at":"2017-12-20T12:34:31Z","updated_at":"2026-09-23T11:32:11Z","first_commit_at":"2017-07-11T11:16:03Z","last_commit_at":"2025-01-22T06:02:52Z","activity_months":90.400000000000006,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:42.384Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/VisualDL","visibility":"public","created_at":"2017-12-20T12:34:31Z","updated_at":"2026-09-23T11:32:11Z","private":false,"fork":false,"archived":false,"stargazers_count":4881,"open_issues_count":157,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3093","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:178B63B:1BAB3E1:6AB92946"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3092","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17BE7C4:1BDE451:6AB92946"},"commit":{"sha":"76338c161b9fddce80009d952f9eea0085cf3271","url":"https://github.com/PaddlePaddle/VisualDL/commit/76338c161b9fddce80009d952f9eea0085cf3271","date":"2018-05-23T00:50:58Z","author_date":"2018-05-23T00:50:58Z","committer_date":"2018-05-23T00:50:58Z","tree_sha":"ea1400e13d956df368979e13b1d00d04670fc3fb","message_first_line":"Update the link to the eigen (#456)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3091","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:178183E:1BA1C60:6AB92947"},"tree_truncated":false,"document_candidates":[{"path":"README.cn.md","size":6663,"blob_sha":"1b8d4deb4c767a0f59194b0f7e1805837f5f1f14","priority":0},{"path":"README.md","size":7281,"blob_sha":"0b0ec30cc43ebdca1d67fa9b917add8bd25c3f69","priority":0}],"documents":[{"path":"README.cn.md","size":6663,"blob_sha":"1b8d4deb4c767a0f59194b0f7e1805837f5f1f14","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/PaddlePaddle/VisualDL.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/VisualDL)\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://github.com/PaddlePaddle/VisualDL/tree/develop/docs)\n[![Release](https://img.shields.io/github/release/PaddlePaddle/VisualDL.svg)](https://github.com/PaddlePaddle/VisualDL/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/vs-logo.png\" width=\"60%\" />\n<\/p>\n\n## 介绍\nVisualDL是一个面向深度学习任务设计的可视化工具，包含了scalar、参数分布、模型结构、图像可视化等功能，项目正处于高速迭代中，新的组件会不断加入。\n\n目前大多数DNN平台均使用Python作为配置语言，VisualDL原生支持python的使用，\n通过在模型的Python配置中添加几行，便可以为训练过程提供丰富的可视化支持。\n\n除了Python SDK之外，VisualDL底层采用C++编写，其暴露的C++ SDK也可以集成到其他平台中，\n实现原生的性能和定制效果。\n\n## 组件\nVisualDL 目前支持4种组件：\n\n- graph\n- scalar\n- image\n- histogram\n\n### Graph\n兼容 ONNX(Open Neural Network Exchange)[https://github.com/onnx/onnx], 通过与 python SDK的结合，VisualDL可以兼容包括 PaddlePaddle, pytorch, mxnet在内的大部分主流DNN平台。\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/graph_demo.gif\" width=\"60%\" />\n<\/p>\n\n### Scalar\n可以用于展示训练测试的误差趋势\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/loss_scalar.gif\" width=\"60%\"/>\n<\/p>\n\n### Image\n可以用于可视化任何tensor，或模型生成的图片\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/loss_image.gif\" width=\"60%\"/>\n<\/p>\n\n### Histogram\n\n用于可视化任何tensor中元素分布的变化趋势\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/histogram.gif\" width=\"60%\"/>\n<\/p>\n\n## 快速尝试\n请使用下面的命令，来快速测试 VisualDL。\n\n```\n# 安装，建議是在虚拟环境或anaconda下。\npip install --upgrade visualdl\n\n# 运行一个例子，vdl_create_scratch_log 将创建测试日志\nvdl_create_scratch_log\nvisualDL --logdir=scratch_log --port=8080\n\n# 访问 http://127.0.0.1:8080\n```\n\n如果以上步骤出现问题，很可能是因为python或pip不同版本或不同位置所致，以下安装方法能解决。\n\n## 使用 virtualenv 安装\n\n[Virtualenv](https://virtualenv.pypa.io/en/stable/) 能创建独立Python环境，也能确保Python和pip的相对位置正确。\n\n在macOS上，安装pip和virtualenv如下：\n```\nsudo easy_install pip\npip install --upgrade virtualenv\n```\n\n在Linux上，安装pip和virtualenv如下:\n```\nsudo apt-get install python3-pip python3-dev python-virtualenv\n```\n\n然后创建一个虚拟环境：\n```\nvirtualenv ~/vdl  # for Python2.7\nvirtualenv -p python3 ~/vdl for Python 3.x\n```\n\n```~/vdl``` 是你的Virtualenv目录, 你也可以选择任一目录。\n\n激活虚拟环境如下：\n```\nsource ~/vdl/bin/activate\n```\n\n现在再安装 VisualDL 和运行范例：\n\n```\npip install --upgrade visualdl\n\n# 运行一个例子，vdl_create_scratch_log 将创建测试日志\nvdl_create_scratch_log\nvisualDL --logdir=scratch_log --port=8080\n\n# 访问 http://127.0.0.1:8080\n```\n\n如果在虚拟环境下仍然遇到安装问题，请尝试以下方法。\n\n\n## 使用 Anaconda 安装\n\nAnaconda是一个用于科学计算的Python发行版，提供了包管理与环境管理的功能，可以很方便地解决多版本python并存、切换以及各种第三方包安装问题。\n\n请根据[Anaconda下载网站](https://www.anaconda.com/download) 的指示去下载和安装Anaconda.\n下载Python 3.6版本的command-Line installer.\n\n创建conda环境名字为```vdl```或任何名字:\n```\nconda create -n vdl pip python=2.7 # or python=3.3, etc.\n```\n\n激活conda环境如下:\n```\nsource activate vdl\n```\n\n现在再安装 VisualDL 和运行范例：\n\n```\npip install --upgrade visualdl\n\n# 运行一个例子，vdl_create_scratch_log 将创建测试日志\nvdl_create_scratch_log\nvisualDL --logdir=scratch_log --port=8080\n\n# 访问 http://127.0.0.1:8080\n```\n\n如果仍然遇到安装问题，请尝试以下用源代码安装方法。\n\n### 使用代码安装\n```\n#建議是在虚拟环境或anaconda下。\ngit clone https://github.com/PaddlePaddle/VisualDL.git\ncd VisualDL\n\npython setup.py bdist_wheel\npip install --upgrade dist/visualdl-*.whl\n```\n\n如果打包和安装遇到其他问题，不安装只想运行Visual DL可以看[这里](https://github.com/PaddlePaddle/VisualDL/blob/develop/docs/how_to_dev_frontend_en.md)\n\n\n## SDK\nVisualDL 同时提供了python SDK 和 C++ SDK 来实现不同方式的使用。\n\n### Python SDK\nVisualDL 现在支持 Python 2和 Python 3。\n\n以最简单的Scalar组件为例，尝试创建一个scalar组件并插入多个时间步的数据：\n\n```python\nimport random\nfrom visualdl import LogWriter\n\nlogdir = \"./tmp\"\nlogger = LogWriter(logdir, sync_cycle=10000)\n\n# mark the components with 'train' label.\nwith logger.mode(\"train\"):\n    # create a scalar component called 'scalars/scalar0'\n    scalar0 = logger.scalar(\"scalars/scalar0\")\n\n# add some records during DL model running.\nfor step in range(100):\n    scalar0.add_record(step, random.random())\n```\n\n### C++ SDK\n上面 Python SDK 中代码完全一致的C++ SDK用法如下\n```c++\n#include <cstdlib>\n#include <string>\n#include \"visualdl/sdk.h\"\n\nnamespace vs = visualdl;\nnamespace cp = visualdl::components;\n\nint main() {\n  const std::string dir = \"./tmp\";\n  vs::LogWriter logger(dir, 10000);\n\n  logger.SetMode(\"train\");\n  auto tablet = logger.AddTablet(\"scalars/scalar0\");\n\n  cp::Scalar<float> scalar0(tablet);\n\n  for (int step = 0; step < 1000; step++) {\n    float v = (float)std::rand() / RAND_MAX;\n    scalar0.AddRecord(step, v);\n  }\n\n  return 0;\n}\n```\n## 启动Board\n当训练过程中已经产生了日志数据，就可以启动board进行实时预览可视化信息\n\n```\nvisualDL --logdir <some log dir>\n```\n\nboard 还支持一下参数来实现远程的访问：\n\n- `--host` 设定IP\n- `--port` 设定端口\n- `--model_pb` 指定 ONNX 格式的模型文件\n\n### 贡献\n\nVisualDL 是由 [PaddlePaddle](http://www.paddlepaddle.org/) 和\n[ECharts](http://echarts.baidu.com/) 合作推出的开源项目。我们欢迎所有人使用，提意见以及贡献代码。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"58B2:18CDF1:172439:54F553:6AB92196"},"text_sha256":"c06f58c7255a1ea5554e6434d5d777065359ce6f733b02628e04a113c6e14d69"},{"path":"README.md","size":7281,"blob_sha":"0b0ec30cc43ebdca1d67fa9b917add8bd25c3f69","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/PaddlePaddle/VisualDL.svg?branch=develop)](https://travis-ci.org/PaddlePaddle/VisualDL)\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://github.com/PaddlePaddle/VisualDL/tree/develop/docs)\n[![Release](https://img.shields.io/github/release/PaddlePaddle/VisualDL.svg)](https://github.com/PaddlePaddle/VisualDL/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/docs/images/vs-logo.png\" width=\"60%\" />\n<\/p>\n\n## Introduction\nVisualDL is a deep learning visualization tool that can help design deep learning jobs.\nIt includes features such as scalar, parameter distribution, model structure and image visualization.\nCurrently it is being developed at a high pace.\nNew features will be continuously added.\n\nAt present, most DNN frameworks use Python as their primary language. VisualDL supports Python by nature.\nUsers can get plentiful visualization results by simply add a few lines of Python code into their model before training.\n\nBesides Python SDK, VisualDL was writen in C++ on the low level. It also provides C++ SDK that\ncan be integrated into other platforms.  \n\n\n## Component\nVisualDL now provides 4 components:\n\n- graph\n- scalar\n- image\n- histogram\n\n### Graph\nGraph is compatible with ONNX ([Open Neural Network Exchange](https://github.com/onnx/onnx)),\nCooperated with Python SDK, VisualDL can be compatible with most major DNN frameworks, including\nPaddlePaddle, PyTorch and MXNet.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/graph_demo.gif\" width=\"60%\" />\n<\/p>\n\n### Scalar\nScalar can be used to show the trends of error during training.\n\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/loss_scalar.gif\" width=\"60%\"/>\n<\/p>\n\n### Image\nImage can be used to visualize any tensor or intermediate generated image.\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/loss_image.gif\" width=\"60%\"/>\n<\/p>\n\n### Histogram\nHistogram can be used to visualize parameter distribution and trends for any tensor.\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/daming-lu/large_files/master/histogram.gif\" width=\"60%\"/>\n<\/p>\n\n## Quick Start\nTo give the VisualDL a quick test, please use the following commands.\n\n```\n# Install the VisualDL. Preferably under a virtual environment or anaconda.\npip install --upgrade visualdl\n\n# run a demo, vdl_create_scratch_log will create logs for testing.\nvdl_create_scratch_log\nvisualdl --logdir=scratch_log --port=8080\n\n# visit http://127.0.0.1:8080\n```\n\nIf you run into issues in above steps, it could be error caused by environmental issues by different python or pip versions.\nFollowing installation methods might fix the issues.\n\n## Install with Virtualenv\n\n[Virtualenv](https://virtualenv.pypa.io/en/stable/) creates isolated Python environment that prevents interfering\nby other Python programs on the same machine and make sure Python and pip are located properly.\n\nOn macOS, install pip and virtualenv by:\n```\nsudo easy_install pip\npip install --upgrade virtualenv\n```\n\nOn Linux, install pip and virtualenv by:\n```\nsudo apt-get install python3-pip python3-dev python-virtualenv\n```\n\nThen create a Virtualenv environment by one of following command:\n```\nvirtualenv ~/vdl  # for Python2.7\nvirtualenv -p python3 ~/vdl for Python 3.x\n```\n\n```~/vdl``` will be your Virtualenv directory, you may choose to install anywhere.\n\nActivate your Virtualenv environment by:\n```\nsource ~/vdl/bin/activate\n```\n\nNow you should be able to install VisualDL and run our demo:\n\n```\npip install --upgrade visualdl\n\n# run a demo, vdl_create_scratch_log will create logs for testing.\nvdl_create_scratch_log\nvisualDL --logdir=scratch_log --port=8080\n\n# visit http://127.0.0.1:8080\n```\n\nIf you still have issues installing VisualDL from Virtualenv, try following installation method.\n\n\n## Install with Anaconda\n\nAnaconda is a python distribution, with installation and package management tools. Also it is an environment manager,\nwhich provides the facility to create different python environments, each with their own settings.\n\nFollow the instructions on the [Anaconda download site](https://www.anaconda.com/download) to download and install Anaconda.\nDownload Python 3.6 version command-Line installer.\n\nCreate a conda environment named ```vdl``` or anything you want by:\n```\nconda create -n vdl pip python=2.7 # or python=3.3, etc.\n```\n\nActivate the conda environment by:\n```\nsource activate vdl\n```\n\nNow you should be able to install VisualDL and run our demo:\n\n```\npip install --upgrade visualdl\n\n# run a demo, vdl_create_scratch_log will create logs for testing.\nvdl_create_scratch_log\nvisualDL --logdir=scratch_log --port=8080\n\n# visit http://127.0.0.1:8080\n```\n\nIf you still have issues installing VisualDL, try installing from sources as in following section.\n\n\n### Install from source\n```\n#Preferably under a virtualenv or anaconda.\ngit clone https://github.com/PaddlePaddle/VisualDL.git\ncd VisualDL\n\npython setup.py bdist_wheel\npip install --upgrade dist/visualdl-*.whl\n```\n\nIf there are still issues regarding the ```pip install```, you can still start Visual DL by starting the dev server\n[here](https://github.com/PaddlePaddle/VisualDL/blob/develop/docs/how_to_dev_frontend_en.md)\n\n\n## SDK\nVisualDL provides both Python SDK and C++ SDK in order to fit more use cases.\n\n\n### Python SDK\nVisualDL now supports both Python 2 and Python 3.\nBelow is an example of creating a simple Scalar component and inserting data from different timestamps:\n\n```python\nimport random\nfrom visualdl import LogWriter\n\nlogdir = \"./tmp\"\nlogger = LogWriter(logdir, sync_cycle=10000)\n\n# mark the components with 'train' label.\nwith logger.mode(\"train\"):\n    # create a scalar component called 'scalars/scalar0'\n    scalar0 = logger.scalar(\"scalars/scalar0\")\n\n# add some records during DL model running.\nfor step in range(100):\n    scalar0.add_record(step, random.random())\n```\n\n### C++ SDK\nHere is the C++ SDK identical to the Python SDK example above:\n\n```c++\n#include <cstdlib>\n#include <string>\n#include \"visualdl/logic/sdk.h\"\n\nnamespace vs = visualdl;\nnamespace cp = visualdl::components;\n\nint main() {\n  const std::string dir = \"./tmp\";\n  vs::LogWriter logger(dir, 10000);\n\n  logger.SetMode(\"train\");\n  auto tablet = logger.AddTablet(\"scalars/scalar0\");\n\n  cp::Scalar<float> scalar0(tablet);\n\n  for (int step = 0; step < 1000; step++) {\n    float v = (float)std::rand() / RAND_MAX;\n    scalar0.AddRecord(step, v);\n  }\n\n  return 0;\n}\n```\n\n## Launch Visual DL\nAfter some logs have been generated during training, users can launch Visual DL application to see real-time data visualization by:\n\n\n```\nvisualDL --logdir <some log dir>\n```\n\nvisualDL also supports following optional parameters:\n\n- `--host` set IP\n- `--port` set port\n- `--model_pb` specify ONNX format for model file to view graph\n\n\n### Contribute\n\nVisualDL is initially created by [PaddlePaddle](http://www.paddlepaddle.org/) and\n[ECharts](http://echarts.baidu.com/).\nWe welcome everyone to use, comment and contribute to Visual DL :)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF84:3B7E2:16B4B5:5BEB3F:6AB92196"},"text_sha256":"02765ab6e3fdd0d17638ec205bb93dfaeb1bca478f644ce8f619ad138cb490a8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3090","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:128321E:15D3720:6AB92948"},"commit":{"sha":"3bacc46e4135d4ac36492a48ff4e68b4a1adec38","url":"https://github.com/PaddlePaddle/VisualDL/commit/3bacc46e4135d4ac36492a48ff4e68b4a1adec38","date":"2025-01-22T06:02:52Z","author_date":"2025-01-22T06:02:52Z","committer_date":"2025-01-22T06:02:52Z","tree_sha":"5c358dfd2462f4328efdbc9ba192ab6f033aba4b","message_first_line":"Fix var bugs (#1288)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3089","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AB:7307A:17A7183:1BC73BE:6AB92948"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":24385,"blob_sha":"696b1bb3492ed3579fd349d5390c41bd54e99a20","priority":0}],"documents":[{"path":"README.md","size":24385,"blob_sha":"696b1bb3492ed3579fd349d5390c41bd54e99a20","priority":0,"status":200,"text":"[**中文**](./README_CN.md)\n\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/PaddlePaddle/VisualDL/develop/frontend/packages/core/public/images/logo-visualdl.svg?sanitize=true\" width=\"70%\"/>\n<\/p>\n\n\n\n<p align=\"center\">\n<a href=\"https://actions-badge.atrox.dev/PaddlePaddle/VisualDL/goto?ref=develop\"><img alt=\"Build Status\" src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FPaddlePaddle%2FVisualDL%2Fbadge%3Fref%3Ddevelop&style=flat-square\" alt=\"Build Status\" /><\/a>\n<a href=\"https://pypi.org/project/visualdl/\"><img src=\"https://img.shields.io/pypi/v/visualdl?style=flat-square\" alt=\"PyPI\" /><\/a>\n<a href=\"https://pypi.org/project/visualdl/#files\"><img src=\"https://img.shields.io/pypi/dm/visualdl?style=flat-square\" alt=\"Downloads\" /><\/a>\n<a href=\"https://github.com/PaddlePaddle/VisualDL/blob/develop/LICENSE\"><img src=\"https://img.shields.io/github/license/paddlepaddle/visualdl?style=flat-square\" alt=\"License\" /><\/a>\n<\/p>\n\n\n<p align=\"center\">\n<a href=\"javascript:void(0)\"><img src=\"https://img.shields.io/badge/QQ_Group-1045783368-52B6EF?style=social&logo=tencent-qq&logoColor=000&logoWidth=20\" alt=\"QQ Group\" /><\/a>\n<\/p>\n\n\n## Introduction\n\nVisualDL, a visualization analysis tool of PaddlePaddle, provides a variety of charts to show the trends of parameters, and visualizes model structures, data samples, histograms of tensors, PR curves , ROC curves and high-dimensional data distributions. It enables users to understand the training process and the model structure more clearly and intuitively so as to optimize models efficiently.\n\nVisualDL provides various visualization functions, including **tracking metrics in real-time, visualizing the model structure, displaying the data sample, visualizing the relationship between hyperparameters and model metrics, presenting the changes of distributions of tensors, showing the pr curves, projecting high-dimensional data to a lower dimensional space and more.** Additionally, VisualDL provides VDL.service, which enables developers easily to save, track and share visualization results of experiments. For specific guidelines of each function, please refer to  [**VisualDL User Guide**](./docs/components/README.md). For up-to-date experience, please feel free to try our [**Online Demo**](https://www.paddlepaddle.org.cn/paddle/visualdl/demo). Currently, VisualDL iterates rapidly and new functions will be continuously added.\n\nBrowsers supported by VisualDL are:\n\n- Google Chrome ≥ 79\n- Firefox ≥ 67\n- Microsoft Edge ≥ 79\n- Safari ≥ 11.1\n\nVisualDL natively supports the use of Python. Developers can retrieve plentiful visualization results by simply adding a few lines of Python code into the model before training.\n\n\n\n## Contents\n\n* [Key Highlights](#Key-Highlights)\n* [Installation](#Installation)\n* [Usage Guideline](#Usage-Guideline)\n* [Function Preview](#Function-Preview)\n* [Frequently Asked Questions](#Frequently-Asked-Questions)\n* [Contribution](#Contribution)\n* [More Details](#More-Details)\n* [Technical Communication](#Technical-Communication)\n\n\n\n## Key Highlights\n\n### Easy to Use\n\nThe high-level design of API makes it easy to use. Only one click can initiate the visualization of model structures.\n\n\n### Various Functions\n\nThe function contains the visualization of training parameters, data samples, graph structures, histograms of tensors, PR curves and high-dimensional data distributions.\n\n### High Compatibility\n\nVisualDL provides the visualization of the mainstream model structures such as Paddle, ONNX, Caffe, widely supporting visual analysis for diverse users.\n\n### Fully Support\n\nBy Integrating into PaddlePaddle and related modules, VisualDL allows developers to use different components without obstructions, and thus to have the best experience in the PaddlePaddle ecosystem.\n\n## Installation\n\n\n### Install by PiP\n\n```shell\npython -m pip install visualdl -i https://mirror.baidu.com/pypi/simple\n```\n\n### Install by Code\n\n```\ngit clone https://github.com/PaddlePaddle/VisualDL.git\ncd VisualDL\n\npython setup.py bdist_wheel\npip install --upgrade dist/visualdl-*.whl\n```\n\nPlease note that Python 2 is no longer maintained officially since January 1, 2020. VisualDL now only supports Python 3 in order to ensure the usability of codes.\n\n\n## Usage Guideline\n\nVisualDL stores the data, parameters and other information of the training process in a log file. Users can launch the panel to observe the visualization results.\n\n### 1. Log\n\nThe Python SDK is provided at the back end of VisualDL, and a logger can be customized through LogWriter. The interface description is shown as follows:\n\n```python\nclass LogWriter(logdir=None,\n                max_queue=10,\n                flush_secs=120,\n                filename_suffix='',\n                **kwargs)\n```\n\n#### Interface Parameters\n\n| parameters      | type    | meaning                                                      |\n| --------------- | ------- | ------------------------------------------------------------ |\n| logdir          | string  | The path location of log file. VisualDL will create a log file under this path to record information generated by the training process. If not specified, the path will be  `runs/${CURRENT_TIME}`as default. |\n| max_queue       | int     | The maximum capacity of the data generated before recording in a log file. Default value is 10. If the capacity is reached, the data are immediately written into the log file. |\n| flush_secs      | int     | The maximum cache time of the data generated before recording in a log file. Default value is 120. When this time is reached, the data are immediately written to the log file. (When the log message queue reaches the maximum cache time or maximum capacity, it will be written to the log file immediately)|\n| filename_suffix | string  | Add a suffix to the default log file name.                   |\n| display_name    | string  | This parameter is displayed in the location of `Select Data Stream` in the panel. If not set, the default name is `logdir`.(When `logdir` is too long or needed to be hidden). |\n| file_name    | string  | Set the name of the log file. If the file_name already exists, setting the file_name will be new records in the same log file, which will continue to be used. Note that the name should include 'vdlrecords'. |\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/48054808/103187556-b9714280-48ff-11eb-9052-008e02a21199.png\" width=\"100%\"/>\n<\/p>\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/48054808/103187552-b4ac8e80-48ff-11eb-998a-57d5a1bc7ee6.png\" width=\"100%\"/>\n<\/p>\n\n\n#### Example\n\nCreate a log file and record scalar values:\n\n```python\nfrom visualdl import LogWriter\n\n# create a log file under `./log/scalar_test/train`\nwith LogWriter(logdir=\"./log/scalar_test/train\") as writer:\n    # use `add_scalar` to record scalar values\n    writer.add_scalar(tag=\"acc\", step=1, value=0.5678)\n    writer.add_scalar(tag=\"acc\", step=2, value=0.6878)\n    writer.add_scalar(tag=\"acc\", step=3, value=0.9878)\n# you can also use the following method without using context manager `with`:\n\"\"\"\nwriter = LogWriter(logdir=\"./log/scalar_test/train\")\n\nwriter.add_scalar(tag=\"acc\", step=1, value=0.5678)\nwriter.add_scalar(tag=\"acc\", step=2, value=0.6878)\nwriter.add_scalar(tag=\"acc\", step=3, value=0.9878)\n\nwriter.close()\n\"\"\"\n```\n\n### 2. Launch Panel\n\nIn the above example, the log has recorded three sets of scalar values. Developers can view the visualization results of the log file through launching the visualDL panel. There are two ways to launch the log file:\n\n#### Launch by Command Line\n\nUse the command line to launch the VisualDL panel：\n\n```python\nvisualdl --logdir <dir_1, dir_2, ... , dir_n> --model <model_file> --host <host> --port <port> --cache-timeout <cache_timeout> --language <language> --public-path <public_path> --api-only --component_tabs <tab_name1, tab_name2, ...>\n```\n\nParameter details:\n\n| parameters      | meaning                                                      |\n| --------------- | ------------------------------------------------------------ |\n| --logdir        | Set one or more directories of the log. All the logs in the paths or subdirectories will be displayed on the VisualDL Board indepentently. |\n| --model         | Set a path to the model file (not a directory). VisualDL will visualize the model file in Graph page. PaddlePaddle、ONNX、Keras、Core ML、Caffe and other model formats are supported. Please refer to [Graph - Functional Instructions](./docs/components/README.md#functional-instructions-2). |\n| --host          | Specify IP address. The default value is `127.0.0.1`. Specify it as `0.0.0.0` or public IP address so that other machines can visit VisualDL Board.       |\n| --port          | Set the port. The default value is `8040`.                   |\n| --cache-timeout | Cache time of the backend. During the cache time, the front end requests the same URL multiple times, and then the returned data are obtained from the cache. The default cache time is 20 seconds. |\n| --language      | The language of the VisualDL panel. Language can be specified as 'en' or 'zh', and the default is the language used by the browser. |\n| --public-path   | The URL path of the VisualDL panel. The default path is '/app', meaning that the access address is 'http://&lt;host&gt;:&lt;port&gt;/app'. |\n| --api-only      | Decide whether or not to provide only API. If this parameter is set, VisualDL will only provides API service without displaying the web page, and the API address is 'http://&lt;host&gt;:&lt;port&gt;/&lt;public_path&gt;/api'. Additionally, If the public_path parameter is not specified, the default address is 'http://&lt;host&gt;:&lt;port&gt;/api'. |\n| --component_tabs  | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client' components by default |\n\nTo visualize the log file generated in the previous step, developers can launch the panel through the command:\n\n```\nvisualdl --logdir ./log\n```\n\n#### Launch in Python Script\n\n\nDevelopers can start the VisualDL panel in Python script as follows:\n\n```python\nvisualdl.server.app.run(logdir,\n                        model=\"path/to/model\",\n                        host=\"127.0.0.1\",\n                        port=8080,\n                        cache_timeout=20,\n                        language=None,\n                        public_path=None,\n                        api_only=False,\n                        open_browser=False)\n```\n\nPlease note: since all parameters are indefinite except `logdir`, developers should specify parameter names when using them.\n\nThe interface parameters are as follows:\n\n| parameters    | type                                               | meaning                                                      |\n| ------------- | -------------------------------------------------- | ------------------------------------------------------------ |\n| logdir        | string or list[string_1, string_2, ... , string_n] | Set one or more directories of the log. All the logs in the paths or subdirectories will be displayed on the VisualDL Board indepentently.|\n| model         | string                                             | Set a path to the model file (not a directory). VisualDL will visualize the model file in Graph page. |\n| host          | string                                             | Specify IP address. The default value is `127.0.0.1`. Specify it as `0.0.0.0` or public IP address so that other machines can visit VisualDL Board.       |\n| port          | int                                                | Set the port. The default value is `8040`.                   |\n| cache_timeout | int                                                | Cache time of the backend. During the cache time, the front end requests the same URL multiple times, and then the returned data are obtained from the cache. The default cache time is 20 seconds. |\n| language      | string                                             | The language of the VisualDL panel. Language can be specified as 'en' or 'zh', and the default is the language used by the browser. |\n| public_path   | string                                             | The URL path of the VisualDL panel. The default path is '/app', meaning that the access address is 'http://&lt;host&gt;:&lt;port&gt;/app'. |\n| api_only      | boolean                                            | Decide whether or not to provide only API. If this parameter is set, VisualDL will only provides API service without displaying the web page, and the API address is 'http://&lt;host&gt;:&lt;port&gt;/&lt;public_path&gt;/api'. Additionally, If the parameter public_path is not specified, the default address is 'http://&lt;host&gt;:&lt;port&gt;/api'. |\n| open_browser  | boolean                                            | Whether or not to open the browser. If this parameter is set as True, the browser will be opened automatically and VisualDL panel will be launched at the same time. If parameter api_only is specified as True,  parameter open_browser can be ignored. |\n| component_tabs | string or list[string_1, string_2, ... , string_n] | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client' components by default |\n\nTo visualize the log file generated in the previous step, developers can launch the panel through the command:\n\n```python\nfrom visualdl.server import app\n\napp.run(logdir=\"./log\")\n```\n\nAfter launching the panel by one of the above methods, developers can see the visualization results on the browser shown as blow:\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/48054808/90868674-ba321f00-e3c9-11ea-83c1-f03c6dd19187.png\" width=\"70%\"/>\n<\/p>\n\n### 3. Read data in log files using LogReader\n\nVisualDL also provides `LogReader` interface to read any data from log files.\n\n```python\nclass LogReader(file_path='')\n```\n#### Interface Parameters\n| parameters | type   | meaning                              |\n| ---------- | ------ | ------------------------------------ |\n| file_path  | string | File path of the log file. Required. |\n#### Example\nIf there is a log file named `vdlrecords.1605533348.log` in the directory of `./log`, we can retrieve the data under the 'loss' tag in the scalar by:\n```python\nfrom visualdl import LogReader\nreader = LogReader(file_path='./vdlrecords.1605533348.log')\ndata = reader.get_data('scalar', 'loss')\nprint(data)\n```\nThe result will be a list shown as below：\n```python\n...\nid: 5\ntag: \"Metrics/Training(Step): loss\"\ntimestamp: 1605533356039\nvalue: 3.1297709941864014\n...\n```\n\nFor more information of `LogReader`, please refer to [LogReader](./docs/io/LogReader.md).\n\n\n## Function Preview\n\n### Scalar\n\n**Scalar** makes use of various charts to display how the parameters, such as accuracy, loss and learning rate, changes during the training process. In this case, developers can observe not only the single but also the multiple groups of parameters in order to understand the training process and thus speed up the process of model tuning.\n\n#### Dynamic Display\n\nAfter the launch of VisualDL Board, the LogReader will continuously record the data to display in the front-end. Hence, the changes of parameters can be visualized in real-time, as shown below:\n\n<p align=\"center\">\n  <img src=\"https://visualdl.bj.bcebos.com/images/dynamic_display.gif\" width=\"60%\"/>\n<\/p>\n\n\n\n#### Comparison of Multiple Experiments\n\nDevelopers can compare multiple experiments by specifying and uploading the path of each experiment at the same time so as to visualize the same parameters in the same chart.\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/48054808/90869567-fdd95880-e3ca-11ea-9855-6c97ad5c8ae7.gif\" width=\"100%\"/>\n<\/p>\n\n\n\n### Image\n\n**Image** provides real-time visualizations of the image data during the training process, allowing developers to observe the changes of images at different training stages and  to deeply understand the effects of the training process.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/90869677-22353500-e3cb-11ea-9830-2334bdd8e52e.gif\" width=\"55%\"/>\n<\/p>\n\n\n### Audio\n\n**Audio** aims to allow developers to listen to the audio data in real-time during the training process, helping developers to monitor the process of speech recognition and text-to-speech.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/90869771-47c23e80-e3cb-11ea-8b2a-a38b6c33d64b.png\" width=\"85%\"/>\n<\/p>\n\n\n### Text\n**Text** visualizes the text output of NLP models within any stage, aiding developers to compare the changes of outputs so as to deeply understand the training process and simply evaluate the performance of the model.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/28444161/106248340-cdd09400-624b-11eb-8ea9-5a07a239c365.png\" width=\"85%\"/>\n<\/p>\n\n\n### Graph\n\n**Graph** enables developers to visualize model structures by only one click. Moreover, **Graph** allows developers to explore model attributes, node information, node input and output. aiding them analyze model structures quickly and understand the direction of data flow easily. Additionally, Graph supports the visualization of dynamic and static model graph respectively.\n\n- dynamic graph\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/22424850/175811841-64b44d99-7d48-4fe9-a679-01156d15af74.gif\" width=\"85%\"/>\n<\/p>\n\n- static graph\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/22424850/175811795-1fd21737-06f0-42fc-bea3-ef7a17216fc9.gif\" width=\"85%\"/>\n<\/p>\n\n\n### Histogram\n\n**Histogram** displays how the trend of tensor (weight, bias, gradient, etc.) changes during the training process in the form of histogram. Developers can adjust the model structures accurately by having an in-depth understanding of the effect of each layer.\n\n- Offset Mode\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/90870121-bd2e0f00-e3cb-11ea-89cf-6622cb607b89.png\" width=\"85%\"/>\n<\/p>\n\n\n\n- Overlay Mode\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/90870194-cfa84880-e3cb-11ea-8a66-bebcad267a10.png\" width=\"85%\"/>\n<\/p>\n\n### PR Curve\n\n**PR Curve** displays the precision and recall values under different thresholds, helping developers to find the best threshold efficiently.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/103274647-1ef72900-49fd-11eb-9284-2a5b63bdf2e3.png\" width=\"85%\"/>\n<\/p>\n\n### ROC Curve\n\n**ROC Curve** shows the performance of a classification model at all classification thresholds; the larger the area under the curve, the better the model performs, aiding developers in evaluating the model performance and choosing an appropriate threshold.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/103344081-8928d000-4ac8-11eb-84d0-28f249886172.gif\" width=\"85%\"/>\n<\/p>\n\n\n### High Dimensional\n\n**High Dimensional** provides three approaches--T-SNE, PCA and UMAP--to do the dimensionality reduction, allowing developers to have an in-depth analysis of the relationship between high-dimensional data and to optimize algorithms based on the analysis.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/103188111-1b32ac00-4902-11eb-914e-c2368bdb8373.gif\" width=\"85%\"/>\n<\/p>\n\n\n### Hyper Parameters\n\n**Hyper Parameters** visualize the relationship between hyperparameters and model metrics (such as accuracy and loss) in a rich view, helping you identify the best hyperparameters in an efficient way.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/28444161/119247155-e9c0c280-bbb9-11eb-8175-58a9c7657a9c.gif\" width=\"85%\"/>\n<\/p>\n\n### Performance Analysis\n**Performance Analysis**(Profiler) visualize the profiling data collected during your program runs, helping you identify program bottlenecks and optimize performance. Please refer to [VisualDL Profiler Guide](./profiler/README.md)。\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/22424850/185894151-53ffc60b-7203-4cb8-a289-5d97332d0691.gif\" width=\"85%\"/>\n<\/p>\n\n### Performance Analysis\n**Performance Analysis**(Profiler) visualize the profiling data collected during your program runs, helping you identify program bottlenecks and optimize performance. Please refer to [VisualDL Profiler Guide](./docs/components/profiler/README.md).\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/22424850/185894151-53ffc60b-7203-4cb8-a289-5d97332d0691.gif\" width=\"85%\"/>\n<\/p>\n\n### X2Paddle\nThe X2Paddle component provides the functions of onnx model format visualization and transformation to paddle format.\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/22424850/211203066-f2e43ef5-104f-436a-b44c-cad2b37ad518.gif\" width=\"100%\"/>\n<\/p>\n\n\n### FastDeployServer\nThe FastDeployServer component provides the functions of loading and editing the model repository, fastdeployserver service management and monitoring, and providing the client to test service. Please refer to [use VisualDL for fastdeploy serving deployment visualization](./docs/components/fastdeploy_server/README.md).\n\n <p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/22424850/211196832-1a05bf80-5aaa-493f-bba2-27e819c18bb9.gif\" width=\"100%\"/>\n<\/p>\n\n\n### FastDeployClient\nThe FastDeployClient component is mainly used to quickly access the fastdeployserver service, to help users visualize prediction requests and results. Please refer to [use VisualDL as fastdeploy client for request visualization](./docs/components/fastdeploy_client/README.md).\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/22424850/211203852-059d5b98-6299-4057-97d8-5209805aa67f.gif\" width=\"100%\"/>\n<\/p>\n\n\n### VDL.service\n\n**VDL.service** enables developers to easily save, track and share visualization results with anyone for free.\n\n<p align=\"center\">\n<img src=https://user-images.githubusercontent.com/48054808/93731055-fbeafb00-fbfd-11ea-80f4-bbfd08a0fc35.png width=\"85%\"/>\n<\/p>\n\n\n## Frequently Asked Questions\n\nIf you are confronted with some problems when using VisualDL, please refer to [our FAQs](./docs/faq.md).\n\n## Contribution\n\nVisualDL, in which Graph is powered by [Netron](https://github.com/lutzroeder/netron), is an open source project supported by [PaddlePaddle](https://www.paddlepaddle.org/) and [ECharts](https://echarts.apache.org/).\n\nDevelopers are warmly welcomed to use, comment and contribute.\n\n## More Details\n\nFor more details related to the use of VisualDL, please refer to [**VisualDL User Guide**](./docs/components/README.md), [**VisualDL Profiler Guide**](./docs/components/profiler/README.md), [**Use VisualDL for fastdeploy serving deployment visualization**](./docs/components/fastdeploy_server/README.md), [**Use VisualDL as fastdeploy client for request visualization**](./docs/components/fastdeploy_client/README.md).\n\n## Technical Communication\n\nWelcome to join the official QQ group 1045783368 to communicate with PaddlePaddle team and other developers.\n\n<p align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/48054808/82522691-c2758680-9b5c-11ea-9aee-fca994aba175.png\" width=\"20%\"/>\n<\/p>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1C82:3FD49:171F9E:5C559C:6AB92198"},"text_sha256":"beb4acd4a2faabc529d63dd450a13df76c1ae781edae26f6a13fe7d2f96fcd47"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pytorch/ignite","input_row":{"repository":"pytorch/ignite","url":"https://github.com/pytorch/ignite","name":"ignite","owner":"pytorch","description":"High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":4788,"issues":1466,"created_at":"2017-11-23T17:31:21Z","updated_at":"2026-09-26T17:42:53Z","first_commit_at":"2017-11-24T10:58:19Z","last_commit_at":"2026-09-09T21:55:06Z","activity_months":105.5,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:45.929Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pytorch/ignite","visibility":"public","created_at":"2017-11-23T17:31:21Z","updated_at":"2026-09-26T17:42:53Z","private":false,"fork":false,"archived":false,"stargazers_count":4788,"open_issues_count":186,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"3088","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086E:1C46F8:17B0F0B:1BD0B17:6AB92949"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3087","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:17E3B9D:1C03A39:6AB9294A"},"commit":{"sha":"0747d4817ebbd78302c12c3ebe814ce7b34572c3","url":"https://github.com/pytorch/ignite/commit/0747d4817ebbd78302c12c3ebe814ce7b34572c3","date":"2018-05-21T17:01:58Z","author_date":"2018-05-21T17:01:58Z","committer_date":"2018-05-21T17:01:58Z","tree_sha":"3259d6a21340b644103488df619a84c1f83d6279","message_first_line":"Update _utils.py (#184)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3086","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F6:35C5DA:179327D:1BB2DF0:6AB9294A"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2394,"blob_sha":"51bd6b0578e90e35a22236f0d12037e60e7512c7","priority":0}],"documents":[{"path":"README.rst","size":2394,"blob_sha":"51bd6b0578e90e35a22236f0d12037e60e7512c7","priority":0,"status":200,"text":"Ignite\n======\n\n.. image:: https://travis-ci.org/pytorch/ignite.svg?branch=master\n    :target: https://travis-ci.org/pytorch/ignite\n\n.. image:: https://codecov.io/gh/pytorch/ignite/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/pytorch/ignite\n\n\nIgnite is a high-level library to help with training neural networks in PyTorch.\n\n*Note: Ignite is currently in alpha, and the API is subject to change. A first release coming soon, where we will stabilize the API. Stay tuned.*\n\nInstallation\n============\n\nFrom source:\n\n.. code:: bash\n\n    python setup.py install\n\n*Anaconda & pip coming soon*\n\nDocumentation\n=============\nAPI documentation and an overview of the library coming soon.\n\nExamples\n========\nPlease check out the `examples\n<https://github.com/pytorch/ignite/tree/master/examples>`_ to see how to use `ignite` to train various types of networks, as well as how to use `visdom <https://github.com/facebookresearch/visdom>`_ or `tensorboardX <https://github.com/lanpa/tensorboard-pytorch>`_ for training visualizations.\n\nContributing\n============\nWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.\n\nPlease see the `contribution guidelines <https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md>`_ for more information.\n\nAs always, PRs are welcome :)\n\nHow does this compare to Torchnet?\n==================================\nIgnite, in spirit is very similar to `torchnet <https://github.com/pytorch/tnt>`_ (and was inspired by torchnet). \n\nThe main differences with torchnet is the level of abstraction for the user. Ignite's higher level of abstraction assumes less about the type of network (or networks) that you are training, and we require the user to define the closure to be run in the training and validation loop. In contrast to this, torchnet creates this closure internally based on the network and optimizer you pass to it. This higher level of abstraction allows for a great deal more of flexibility, such as co-training multiple models (i.e. GANs) and computing/tracking multiple losses and metrics in your training loop.\n\nIgnite also allows for multiple handlers to be attached to events, and a finer granularity of events in the engine loop.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C4A:386840:17ED12:5D233D:6AB92199"},"text_sha256":"2252d8d40e563d41cca7883cc36075b3ded39d2abecbf3ccc0d9af0165fd5a6e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3085","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17BEB48:1BDF357:6AB9294B"},"commit":{"sha":"8b66f257ad0dbaebe0f01dbc257d65c2bf116000","url":"https://github.com/pytorch/ignite/commit/8b66f257ad0dbaebe0f01dbc257d65c2bf116000","date":"2026-06-30T10:51:59Z","author_date":"2026-06-30T10:51:59Z","committer_date":"2026-06-30T10:51:59Z","tree_sha":"77e47abe275663974bda839624a811326fce1f72","message_first_line":"feat(metrics): add Perplexity metric to ignite.metrics.nlp (#3743)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3084","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:177EE9E:1B9E07D:6AB9294B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27795,"blob_sha":"4cff726064be19d771c9132b380638546e1000f9","priority":0}],"documents":[{"path":"README.md","size":27795,"blob_sha":"4cff726064be19d771c9132b380638546e1000f9","priority":0,"status":200,"text":"<div align=\"center\">\n\n<!-- ![Ignite Logo](assets/logo/ignite_logo_mixed.svg) -->\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/pytorch/ignite/master/assets/logo/ignite_logo_mixed_light.svg\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/pytorch/ignite/master/assets/logo/ignite_logo_mixed.svg\">\n  <img src=\"https://raw.githubusercontent.com/pytorch/ignite/master/assets/logo/ignite_logo_mixed.svg\"\n       alt=\"PyTorch-Ignite logo\"\n       width=\"512\">\n<\/picture>\n\n<!-- [![image](https://travis-ci.com/pytorch/ignite.svg?branch=master)](https://travis-ci.com/pytorch/ignite) -->\n\n| ![image](https://img.shields.io/badge/-Tests:-black?style=flat-square) [![image](https://github.com/pytorch/ignite/actions/workflows/unit-tests.yml/badge.svg?branch=master)](https://github.com/pytorch/ignite/actions/workflows/unit-tests.yml) [![image](https://github.com/pytorch/ignite/actions/workflows/gpu-tests.yml/badge.svg)](https://github.com/pytorch/ignite/actions/workflows/gpu-tests.yml) [![image](https://codecov.io/gh/pytorch/ignite/branch/master/graph/badge.svg)](https://codecov.io/gh/pytorch/ignite) [![image](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fpytorch-ignite%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/ignite/index.html) |\n|:---\n| ![image](https://img.shields.io/badge/-Stable%20Releases:-black?style=flat-square) [![image](https://anaconda.org/pytorch/ignite/badges/version.svg)](https://anaconda.org/pytorch/ignite) ・ [![image](https://img.shields.io/badge/dynamic/json.svg?label=PyPI&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fpytorch-ignite%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pypi.org/project/pytorch-ignite/) [![image](https://static.pepy.tech/badge/pytorch-ignite)](https://pepy.tech/project/pytorch-ignite) ・ [![image](https://img.shields.io/badge/docker-hub-blue)](https://hub.docker.com/u/pytorchignite) |\n| ![image](https://img.shields.io/badge/-Nightly%20Releases:-black?style=flat-square) [![image](https://anaconda.org/pytorch-nightly/ignite/badges/version.svg)](https://anaconda.org/pytorch-nightly/ignite) [![image](https://img.shields.io/badge/PyPI-pre%20releases-brightgreen)](https://pypi.org/project/pytorch-ignite/#history)|\n| ![image](https://img.shields.io/badge/-Community:-black?style=flat-square) [![Twitter](https://img.shields.io/badge/news-twitter-blue)](https://twitter.com/pytorch_ignite) [![discord](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://discord.gg/djZtm3EmKj) [![numfocus](https://img.shields.io/badge/NumFOCUS-affiliated%20project-green)](https://numfocus.org/sponsored-projects/affiliated-projects) |\n| ![image](https://img.shields.io/badge/-Supported_PyTorch/Python_versions:-black?style=flat-square) [![link](https://img.shields.io/badge/-check_here-blue)](https://github.com/pytorch/ignite/actions?query=workflow%3A%22PyTorch+version+tests%22)|\n\n<\/div>\n\n## TL;DR\n\nIgnite is a high-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.\n\n<div align=\"center\">\n\n<a href=\"https://colab.research.google.com/github/pytorch/ignite/blob/master/assets/tldr/teaser.ipynb\">\n <img alt=\"PyTorch-Ignite teaser\"\n      src=\"https://raw.githubusercontent.com/pytorch/ignite/master/assets/tldr/pytorch-ignite-teaser.gif\"\n      width=532>\n<\/a>\n\n_Click on the image to see complete code_\n\n<\/div>\n\n### Features\n\n- [Less code than pure PyTorch](https://raw.githubusercontent.com/pytorch/ignite/master/assets/ignite_vs_bare_pytorch.png)\n  while ensuring maximum control and simplicity\n\n- Library approach and no program's control inversion - _Use ignite where and when you need_\n\n- Extensible API for metrics, experiment managers, and other components\n\n<!-- ############################################################################################################### -->\n\n# Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Why Ignite?](#why-ignite)\n  - [Simplified training and validation loop](#simplified-training-and-validation-loop)\n  - [Power of Events & Handlers](#power-of-events--handlers)\n    - [Execute any number of functions whenever you wish](#execute-any-number-of-functions-whenever-you-wish)\n    - [Built-in events filtering](#built-in-events-filtering)\n    - [Stack events to share some actions](#stack-events-to-share-some-actions)\n    - [Custom events to go beyond standard events](#custom-events-to-go-beyond-standard-events)\n  - [Out-of-the-box metrics](#out-of-the-box-metrics)\n- [Installation](#installation)\n  - [Nightly releases](#nightly-releases)\n  - [Docker Images](#docker-images)\n    - [Using pre-built images](#using-pre-built-images)\n- [Getting Started](#getting-started)\n- [Documentation](#documentation)\n  - [Additional Materials](#additional-materials)\n- [Examples](#examples)\n  - [Tutorials](#tutorials)\n  - [Reproducible Training Examples](#reproducible-training-examples)\n- [Communication](#communication)\n  - [User feedback](#user-feedback)\n- [Contributing](#contributing)\n- [Projects using Ignite](#projects-using-ignite)\n- [Citing Ignite](#citing-ignite)\n- [About the team & Disclaimer](#about-the-team--disclaimer)\n\n<!-- ############################################################################################################### -->\n\n# Why Ignite?\n\nIgnite is a **library** that provides three high-level features:\n\n- Extremely simple engine and event system\n- Out-of-the-box metrics to easily evaluate models\n- Built-in handlers to compose training pipeline, save artifacts and log parameters and metrics\n\n## Simplified training and validation loop\n\nNo more coding `for/while` loops on epochs and iterations. Users instantiate engines and run them.\n\n<details>\n<summary>\nExample\n<\/summary>\n\n```python\nfrom ignite.engine import Engine, Events, create_supervised_evaluator\nfrom ignite.metrics import Accuracy\n\n\n# Setup training engine:\ndef train_step(engine, batch):\n    # Users can do whatever they need on a single iteration\n    # Eg. forward/backward pass for any number of models, optimizers, etc\n    # ...\n\ntrainer = Engine(train_step)\n\n# Setup single model evaluation engine\nevaluator = create_supervised_evaluator(model, metrics={\"accuracy\": Accuracy()})\n\ndef validation():\n    state = evaluator.run(validation_data_loader)\n    # print computed metrics\n    print(trainer.state.epoch, state.metrics)\n\n# Run model's validation at the end of each epoch\ntrainer.add_event_handler(Events.EPOCH_COMPLETED, validation)\n\n# Start the training\ntrainer.run(training_data_loader, max_epochs=100)\n```\n\n<\/details>\n\n## Power of Events & Handlers\n\nThe cool thing with handlers is that they offer unparalleled flexibility (compared to, for example, callbacks). Handlers can be any function: e.g. lambda, simple function, class method, etc. Thus, we do not require to inherit from an interface and override its abstract methods which could unnecessarily bulk up your code and its complexity.\n\n### Execute any number of functions whenever you wish\n\n<details>\n<summary>\nExamples\n<\/summary>\n\n```python\ntrainer.add_event_handler(Events.STARTED, lambda _: print(\"Start training\"))\n\n# attach handler with args, kwargs\nmydata = [1, 2, 3, 4]\nlogger = ...\n\ndef on_training_ended(data):\n    print(f\"Training is ended. mydata={data}\")\n    # User can use variables from another scope\n    logger.info(\"Training is ended\")\n\n\ntrainer.add_event_handler(Events.COMPLETED, on_training_ended, mydata)\n# call any number of functions on a single event\ntrainer.add_event_handler(Events.COMPLETED, lambda engine: print(engine.state.times))\n\n@trainer.on(Events.ITERATION_COMPLETED)\ndef log_something(engine):\n    print(engine.state.output)\n```\n\n<\/details>\n\n### Built-in events filtering\n\n<details>\n<summary>\nExamples\n<\/summary>\n\n```python\n# run the validation every 5 epochs\n@trainer.on(Events.EPOCH_COMPLETED(every=5))\ndef run_validation():\n    # run validation\n\n# change some training variable once on 20th epoch\n@trainer.on(Events.EPOCH_STARTED(once=20))\ndef change_training_variable():\n    # ...\n\n# Trigger handler with customly defined frequency\n@trainer.on(Events.ITERATION_COMPLETED(event_filter=first_x_iters))\ndef log_gradients():\n    # ...\n```\n\n<\/details>\n\n### Stack events to share some actions\n\n<details>\n<summary>\nExamples\n<\/summary>\n\nEvents can be stacked together to enable multiple calls:\n\n```python\n@trainer.on(Events.COMPLETED | Events.EPOCH_COMPLETED(every=10))\ndef run_validation():\n    # ...\n```\n\n<\/details>\n\n### Custom events to go beyond standard events\n\n<details>\n<summary>\nExamples\n<\/summary>\n\nCustom events related to backward and optimizer step calls:\n\n```python\nfrom ignite.engine import EventEnum\n\n\nclass BackpropEvents(EventEnum):\n    BACKWARD_STARTED = 'backward_started'\n    BACKWARD_COMPLETED = 'backward_completed'\n    OPTIM_STEP_COMPLETED = 'optim_step_completed'\n\ndef update(engine, batch):\n    # ...\n    loss = criterion(y_pred, y)\n    engine.fire_event(BackpropEvents.BACKWARD_STARTED)\n    loss.backward()\n    engine.fire_event(BackpropEvents.BACKWARD_COMPLETED)\n    optimizer.step()\n    engine.fire_event(BackpropEvents.OPTIM_STEP_COMPLETED)\n    # ...\n\ntrainer = Engine(update)\ntrainer.register_events(*BackpropEvents)\n\n@trainer.on(BackpropEvents.BACKWARD_STARTED)\ndef function_before_backprop(engine):\n    # ...\n```\n\n- Complete snippet is found [here](https://pytorch.org/ignite/faq.html#creating-custom-events-based-on-forward-backward-pass).\n- Another use-case of custom events: [trainer for Truncated Backprop Through Time](https://pytorch.org/ignite/contrib/engines.html#ignite.contrib.engines.create_supervised_tbptt_trainer).\n\n<\/details>\n\n## Out-of-the-box metrics\n\n- [Metrics](https://pytorch.org/ignite/metrics.html#complete-list-of-metrics) for various tasks:\n  Precision, Recall, Accuracy, Confusion Matrix, IoU etc, ~20 [regression metrics](https://pytorch.org/ignite/metrics.html#complete-list-of-metrics).\n\n- Users can also [compose their metrics](https://pytorch.org/ignite/metrics.html#metric-arithmetics) with ease from\n  existing ones using arithmetic operations or torch methods.\n\n<details>\n<summary>\nExample\n<\/summary>\n\n```python\nprecision = Precision(average=False)\nrecall = Recall(average=False)\nF1_per_class = (precision * recall * 2 / (precision + recall))\nF1_mean = F1_per_class.mean()  # torch mean method\nF1_mean.attach(engine, \"F1\")\n```\n\n<\/details>\n\n<!-- ############################################################################################################### -->\n\n# Installation\n\nFrom [pip](https://pypi.org/project/pytorch-ignite/):\n\n```bash\npip install pytorch-ignite\n```\n\nFrom [conda](https://anaconda.org/pytorch/ignite):\n\n```bash\nconda install ignite -c pytorch\n```\n\nFrom source:\n\n```bash\npip install git+https://github.com/pytorch/ignite\n```\n\n## Nightly releases\n\nFrom pip:\n\n```bash\npip install --pre pytorch-ignite\n```\n\nFrom conda (this suggests to install [pytorch nightly release](https://anaconda.org/pytorch-nightly/pytorch) instead of stable\nversion as dependency):\n\n```bash\nconda install ignite -c pytorch-nightly\n```\n\n## Docker Images\n\n### Using pre-built images\n\nPull a pre-built docker image from [our Docker Hub](https://hub.docker.com/u/pytorchignite) and run it with docker v19.03+.\n\n```bash\ndocker run --gpus all -it -v $PWD:/workspace/project --network=host --shm-size 16G pytorchignite/base:latest /bin/bash\n```\n\n<details>\n\n<summary>\nList of available pre-built images\n<\/summary>\n\nBase\n\n- `pytorchignite/base:latest`\n- `pytorchignite/apex:latest`\n- `pytorchignite/hvd-base:latest`\n- `pytorchignite/hvd-apex:latest`\n- `pytorchignite/msdp-apex:latest`\n\nVision:\n\n- `pytorchignite/vision:latest`\n- `pytorchignite/hvd-vision:latest`\n- `pytorchignite/apex-vision:latest`\n- `pytorchignite/hvd-apex-vision:latest`\n- `pytorchignite/msdp-apex-vision:latest`\n\nNLP:\n\n- `pytorchignite/nlp:latest`\n- `pytorchignite/hvd-nlp:latest`\n- `pytorchignite/apex-nlp:latest`\n- `pytorchignite/hvd-apex-nlp:latest`\n- `pytorchignite/msdp-apex-nlp:latest`\n\n<\/details>\n\nFor more details, see [here](docker).\n\n<!-- ############################################################################################################### -->\n\n# Getting Started\n\nFew pointers to get you started:\n\n- [Quick Start Guide: Essentials of getting a project up and running](https://pytorch-ignite.ai/tutorials/beginner/01-getting-started/)\n- [Concepts of the library: Engine, Events & Handlers, State, Metrics](https://pytorch-ignite.ai/concepts/)\n- Full-featured template examples (coming soon)\n\n<!-- ############################################################################################################### -->\n\n# Documentation\n\n- Stable API documentation and an overview of the library: https://pytorch.org/ignite/\n- Development version API documentation: https://pytorch.org/ignite/master/\n- [FAQ](https://pytorch.org/ignite/faq.html),\n  [\"Questions on Github\"](https://github.com/pytorch/ignite/issues?q=is%3Aissue+label%3Aquestion+) and\n  [\"Questions on Discuss.PyTorch\"](https://discuss.pytorch.org/c/ignite).\n- [Project's Roadmap](https://github.com/pytorch/ignite/wiki/Roadmap)\n\n## Additional Materials\n\n- [Distributed Training Made Easy with PyTorch-Ignite](https://labs.quansight.org/blog/2021/06/distributed-made-easy-with-ignite/)\n- [PyTorch Ecosystem Day 2021 Breakout session presentation](https://colab.research.google.com/drive/1qhUgWQ0N2U71IVShLpocyeY4AhlDCPRd)\n- [Tutorial blog post about PyTorch-Ignite](https://labs.quansight.org/blog/2020/09/pytorch-ignite/)\n- [8 Creators and Core Contributors Talk About Their Model Training Libraries From PyTorch Ecosystem](https://neptune.ai/blog/model-training-libraries-pytorch-ecosystem?utm_source=reddit&utm_medium=post&utm_campaign=blog-model-training-libraries-pytorch-ecosystem)\n- Ignite Posters from Pytorch Developer Conferences:\n  - [2021](https://drive.google.com/file/d/1YXrkJIepPk_KltSG1ZfWRtA5IRgPFz_U)\n  - [2019](https://drive.google.com/open?id=1bqIl-EM6GCCCoSixFZxhIbuF25F2qTZg)\n  - [2018](https://drive.google.com/open?id=1_2vzBJ0KeCjGv1srojMHiJRvceSVbVR5)\n\n<!-- ############################################################################################################### -->\n\n# Examples\n\n## Tutorials\n\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/TextCNN.ipynb) [Text Classification using Convolutional Neural\n  Networks](https://github.com/pytorch/ignite/blob/master/examples/notebooks/TextCNN.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/VAE.ipynb) [Variational Auto\n  Encoders](https://github.com/pytorch/ignite/blob/master/examples/notebooks/VAE.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/FashionMNIST.ipynb) [Convolutional Neural Networks for Classifying Fashion-MNIST\n  Dataset](https://github.com/pytorch/ignite/blob/master/examples/notebooks/FashionMNIST.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/CycleGAN_with_nvidia_apex.ipynb) [Training Cycle-GAN on Horses to\n  Zebras with Nvidia/Apex](https://github.com/pytorch/ignite/blob/master/examples/notebooks/CycleGAN_with_nvidia_apex.ipynb) - [ logs on W&B](https://app.wandb.ai/vfdev-5/ignite-cyclegan-apex)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/CycleGAN_with_torch_cuda_amp.ipynb) [Another training Cycle-GAN on Horses to\n  Zebras with Native Torch CUDA AMP](https://github.com/pytorch/ignite/blob/master/examples/notebooks/CycleGAN_with_torch_cuda_amp.ipynb) - [logs on W&B](https://app.wandb.ai/vfdev-5/ignite-cyclegan-torch-amp)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb) [Finetuning EfficientNet-B0 on\n  CIFAR100](https://github.com/pytorch/ignite/blob/master/examples/notebooks/EfficientNet_Cifar100_finetuning.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/Cifar10_Ax_hyperparam_tuning.ipynb) [Hyperparameters tuning with\n  Ax](https://github.com/pytorch/ignite/blob/master/examples/notebooks/Cifar10_Ax_hyperparam_tuning.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/FastaiLRFinder_MNIST.ipynb) [Basic example of LR finder on\n  MNIST](https://github.com/pytorch/ignite/blob/master/examples/notebooks/FastaiLRFinder_MNIST.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/Cifar100_bench_amp.ipynb) [Benchmark mixed precision training on Cifar100:\n  torch.amp vs nvidia/apex](https://github.com/pytorch/ignite/blob/master/examples/notebooks/Cifar100_bench_amp.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/MNIST_on_TPU.ipynb) [MNIST training on a single\n  TPU](https://github.com/pytorch/ignite/blob/master/examples/notebooks/MNIST_on_TPU.ipynb)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1E9zJrptnLJ_PKhmaP5Vhb6DTVRvyrKHx) [CIFAR10 Training on multiple TPUs](https://github.com/pytorch/ignite/tree/master/examples/cifar10)\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pytorch/ignite/blob/master/examples/notebooks/HandlersTimeProfiler_MNIST.ipynb) [Basic example of handlers\n  time profiling on MNIST training example](https://github.com/pytorch/ignite/blob/master/examples/notebooks/HandlersTimeProfiler_MNIST.ipynb)\n\n## Reproducible Training Examples\n\nInspired by [torchvision/references](https://github.com/pytorch/vision/tree/master/references),\nwe provide several reproducible baselines for vision tasks:\n\n- [ImageNet](examples/references/classification/imagenet) - logs on Ignite Trains server coming soon ...\n- [Pascal VOC2012](examples/references/segmentation/pascal_voc2012) - logs on Ignite Trains server coming soon ...\n\nFeatures:\n\n- Distributed training: native or horovod and using [PyTorch native AMP](https://pytorch.org/docs/stable/notes/amp_examples.html)\n\n## Code-Generator application\n\nThe easiest way to create your training scripts with PyTorch-Ignite:\n\n- https://code-generator.pytorch-ignite.ai/\n\n<!-- ############################################################################################################### -->\n\n# Communication\n\n- [GitHub issues](https://github.com/pytorch/ignite/issues): questions, bug reports, feature requests, etc.\n\n- [Discuss.PyTorch](https://discuss.pytorch.org/c/ignite), category \"Ignite\".\n\n- [PyTorch-Ignite Discord Server](https://discord.gg/djZtm3EmKj): to chat with the community\n\n- [GitHub Discussions](https://github.com/pytorch/ignite/discussions): general library-related discussions, ideas, Q&A, etc.\n\n## User feedback\n\nWe have created a form for [\"user feedback\"](https://github.com/pytorch/ignite/issues/new/choose). We\nappreciate any type of feedback, and this is how we would like to see our\ncommunity:\n\n- If you like the project and want to say thanks, this the right\n  place.\n- If you do not like something, please, share it with us, and we can\n  see how to improve it.\n\nThank you!\n\n<!-- ############################################################################################################### -->\n\n# Contributing\n\nPlease see the [contribution guidelines](https://github.com/pytorch/ignite/blob/master/CONTRIBUTING.md) for more information.\n\nAs always, PRs are welcome :)\n\n<!-- ############################################################################################################### -->\n\n# Projects using Ignite\n\n<details>\n\n<summary>\nResearch papers\n<\/summary>\n\n- [BatchBALD: Efficient and Diverse Batch Acquisition for Deep Bayesian Active Learning](https://github.com/BlackHC/BatchBALD)\n- [A Model to Search for Synthesizable Molecules](https://github.com/john-bradshaw/molecule-chef)\n- [Localised Generative Flows](https://github.com/jrmcornish/lgf)\n- [Extracting T Cell Function and Differentiation Characteristics from the Biomedical Literature](https://github.com/hammerlab/t-cell-relation-extraction)\n- [Variational Information Distillation for Knowledge Transfer](https://github.com/amzn/xfer/tree/master/var_info_distil)\n- [XPersona: Evaluating Multilingual Personalized Chatbot](https://github.com/HLTCHKUST/Xpersona)\n- [CNN-CASS: CNN for Classification of Coronary Artery Stenosis Score in MPR Images](https://github.com/ucuapps/CoronaryArteryStenosisScoreClassification)\n- [Bridging Text and Video: A Universal Multimodal Transformer for Video-Audio Scene-Aware Dialog](https://github.com/ictnlp/DSTC8-AVSD)\n- [Adversarial Decomposition of Text Representation](https://github.com/text-machine-lab/adversarial_decomposition)\n- [Uncertainty Estimation Using a Single Deep Deterministic Neural Network](https://github.com/y0ast/deterministic-uncertainty-quantification)\n- [DeepSphere: a graph-based spherical CNN](https://github.com/deepsphere/deepsphere-pytorch)\n- [Norm-in-Norm Loss with Faster Convergence and Better Performance for Image Quality Assessment](https://github.com/lidq92/LinearityIQA)\n- [Unified Quality Assessment of In-the-Wild Videos with Mixed Datasets Training](https://github.com/lidq92/MDTVSFA)\n- [Deep Signature Transforms](https://github.com/patrick-kidger/Deep-Signature-Transforms)\n- [Neural CDEs for Long Time-Series via the Log-ODE Method](https://github.com/jambo6/neuralCDEs-via-logODEs)\n- [Volumetric Grasping Network](https://github.com/ethz-asl/vgn)\n- [Mood Classification using Listening Data](https://github.com/fdlm/listening-moods)\n- [Deterministic Uncertainty Estimation (DUE)](https://github.com/y0ast/DUE)\n- [PyTorch-Hebbian: facilitating local learning in a deep learning framework](https://github.com/Joxis/pytorch-hebbian)\n- [Stochastic Weight Matrix-Based Regularization Methods for Deep Neural Networks](https://github.com/rpatrik96/lod-wmm-2019)\n- [Learning explanations that are hard to vary](https://github.com/gibipara92/learning-explanations-hard-to-vary)\n- [The role of disentanglement in generalisation](https://github.com/mmrl/disent-and-gen)\n- [A Probabilistic Programming Approach to Protein Structure Superposition](https://github.com/LysSanzMoreta/Theseus-PP)\n- [PadChest: A large chest x-ray image dataset with multi-label annotated reports](https://github.com/auriml/Rx-thorax-automatic-captioning)\n\n<\/details>\n\n<details>\n\n<summary>\nBlog articles, tutorials, books\n<\/summary>\n\n- [State-of-the-Art Conversational AI with Transfer Learning](https://github.com/huggingface/transfer-learning-conv-ai)\n- [Tutorial on Transfer Learning in NLP held at NAACL 2019](https://github.com/huggingface/naacl_transfer_learning_tutorial)\n- [Deep-Reinforcement-Learning-Hands-On-Second-Edition, published by Packt](https://github.com/PacktPublishing/Deep-Reinforcement-Learning-Hands-On-Second-Edition)\n- [Once Upon a Repository: How to Write Readable, Maintainable Code with PyTorch](https://towardsdatascience.com/once-upon-a-repository-how-to-write-readable-maintainable-code-with-pytorch-951f03f6a829)\n- [The Hero Rises: Build Your Own SSD](https://allegro.ai/blog/the-hero-rises-build-your-own-ssd/)\n- [Using Optuna to Optimize PyTorch Ignite Hyperparameters](https://medium.com/pytorch/using-optuna-to-optimize-pytorch-ignite-hyperparameters-626ffe6d4783)\n- [PyTorch Ignite - Classifying Tiny ImageNet with EfficientNet](https://towardsdatascience.com/pytorch-ignite-classifying-tiny-imagenet-with-efficientnet-e5b1768e5e8f)\n\n<\/details>\n\n<details>\n\n<summary>\nToolkits\n<\/summary>\n\n- [Project MONAI - AI Toolkit for Healthcare Imaging](https://github.com/Project-MONAI/MONAI)\n- [DeepSeismic - Deep Learning for Seismic Imaging and Interpretation](https://github.com/microsoft/seismic-deeplearning)\n- [Nussl - a flexible, object-oriented Python audio source separation library](https://github.com/nussl/nussl)\n- [PyTorch Adapt - A fully featured and modular domain adaptation library](https://github.com/KevinMusgrave/pytorch-adapt)\n- [gnina-torch: PyTorch implementation of GNINA scoring function](https://github.com/RMeli/gnina-torch)\n\n<\/details>\n\n<details>\n\n<summary>\nOthers\n<\/summary>\n\n- [Implementation of \"Attention is All You Need\" paper](https://github.com/akurniawan/pytorch-transformer)\n- [Implementation of DropBlock: A regularization method for convolutional networks in PyTorch](https://github.com/miguelvr/dropblock)\n- [Kaggle Kuzushiji Recognition: 2nd place solution](https://github.com/lopuhin/kaggle-kuzushiji-2019)\n- [Unsupervised Data Augmentation experiments in PyTorch](https://github.com/vfdev-5/UDA-pytorch)\n- [Hyperparameters tuning with Optuna](https://github.com/optuna/optuna-examples/blob/main/pytorch/pytorch_ignite_simple.py)\n- [Logging with ChainerUI](https://chainerui.readthedocs.io/en/latest/reference/module.html#external-library-support)\n- [FixMatch experiments in PyTorch and Ignite (CTA dataaug policy)](https://github.com/vfdev-5/FixMatch-pytorch)\n- [Kaggle Birdcall Identification Competition: 1st place solution](https://github.com/ryanwongsa/kaggle-birdsong-recognition)\n- [Logging with Aim - An open-source experiment tracker](https://aimstack.readthedocs.io/en/latest/quick_start/integrations.html#integration-with-pytorch-ignite)\n\n<\/details>\n\nSee other projects at [\"Used by\"](https://github.com/pytorch/ignite/network/dependents?package_id=UGFja2FnZS02NzI5ODEwNA%3D%3D)\n\nIf your project implements a paper, represents other use-cases not\ncovered in our official tutorials, Kaggle competition's code, or just\nyour code presents interesting results and uses Ignite. We would like to\nadd your project to this list, so please send a PR with brief\ndescription of the project.\n\n<!-- ############################################################################################################### -->\n\n# Citing Ignite\n\nIf you use PyTorch-Ignite in a scientific publication, we would appreciate citations to our project.\n\n```\n@misc{pytorch-ignite,\n  author = {V. Fomin and J. Anmol and S. Desroziers and J. Kriss and A. Tejani},\n  title = {High-level library to help with training neural networks in PyTorch},\n  year = {2020},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/pytorch/ignite}},\n}\n```\n\n<!-- ############################################################################################################### -->\n\n# About the team & Disclaimer\n\nPyTorch-Ignite is a [NumFOCUS Affiliated Project](https://www.numfocus.org/), operated and maintained by volunteers in the PyTorch community in their capacities as individuals\n(and not as representatives of their employers). See the [\"About us\"](https://pytorch-ignite.ai/about/community/#about-us)\npage for a list of core contributors. For usage questions and issues, please see the various channels\n[here](#communication). For all other questions and inquiries, please send an email\nto contact@pytorch-ignite.ai.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3346:345ED4:17264A:5C5B7C:6AB9219A"},"text_sha256":"0c6bb1d76a4a05b07682ca2414e412e70f47f66e66832cf2c84701909563d624"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"suragnair/alpha-zero-general","input_row":{"repository":"suragnair/alpha-zero-general","url":"https://github.com/suragnair/alpha-zero-general","name":"alpha-zero-general","owner":"suragnair","description":"A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4519,"issues":186,"created_at":"2017-12-01T02:55:15Z","updated_at":"2026-09-27T10:36:41Z","first_commit_at":"2017-12-01T02:55:16Z","last_commit_at":"2025-01-01T19:59:02Z","activity_months":85.040000000000006,"ai_ml_match_topics":"deep-learning; reinforcement-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:49.546Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"suragnair/alpha-zero-general","visibility":"public","created_at":"2017-12-01T02:55:15Z","updated_at":"2026-09-27T10:36:41Z","private":false,"fork":false,"archived":false,"stargazers_count":4519,"open_issues_count":75,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3083","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:17E042D:1C01125:6AB9294D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3082","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17BB429:1BDBB92:6AB9294D"},"commit":{"sha":"065d95cc7e35dfa6baa210e558ee05d8c6757a2a","url":"https://github.com/suragnair/alpha-zero-general/commit/065d95cc7e35dfa6baa210e558ee05d8c6757a2a","date":"2018-04-13T03:42:12Z","author_date":"2018-04-13T03:42:12Z","committer_date":"2018-04-13T03:42:12Z","tree_sha":"7744f6674c2213c70a81d875433cfa93520ae012","message_first_line":"Implement Connect4 logic. (#56)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3081","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0823:7580A:17EBE7C:1C0C6B0:6AB9294E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3089,"blob_sha":"58a04562a8ac1729f78466b50309ce8374651126","priority":0}],"documents":[{"path":"README.md","size":3089,"blob_sha":"58a04562a8ac1729f78466b50309ce8374651126","priority":0,"status":200,"text":"# Alpha Zero General (any game, any framework!)\n\nA simplified, highly flexible, commented and (hopefully) easy to understand implementation of self-play based reinforcement learning based on the AlphaGo Zero paper (Silver et al). It is designed to be easy to adopt for any two-player turn-based adversarial game and any deep learning framework of your choice. A sample implementation has been provided for the game of Othello in PyTorch, Keras and TensorFlow. An accompanying tutorial can be found [here](http://web.stanford.edu/~surag/posts/alphazero.html). We also have implementations for GoBang and TicTacToe.\n\nTo use a game of your choice, subclass the classes in ```Game.py``` and ```NeuralNet.py``` and implement their functions. Example implementations for Othello can be found in ```othello/OthelloGame.py``` and ```othello/{pytorch,keras,tensorflow}/NNet.py```. \n\n```Coach.py``` contains the core training loop and ```MCTS.py``` performs the Monte Carlo Tree Search. The parameters for the self-play can be specified in ```main.py```. Additional neural network parameters are in ```othello/{pytorch,keras,tensorflow}/NNet.py``` (cuda flag, batch size, epochs, learning rate etc.). \n\nTo start training a model for Othello:\n```bash\npython main.py\n```\nChoose your framework and game in ```main.py```.\n\n### Experiments\nWe trained a PyTorch model for 6x6 Othello (~80 iterations, 100 episodes per iteration and 25 MCTS simulations per turn). This took about 3 days on an NVIDIA Tesla K80. The pretrained model (PyTorch) can be found in ```pretrained_models/othello/pytorch/```. You can play a game against it using ```pit.py```. Below is the performance of the model against a random and a greedy baseline with the number of iterations.\n![alt tag](https://github.com/suragnair/alpha-zero-general/raw/master/pretrained_models/6x6.png)\n\nA concise description of our algorithm can be found [here](https://github.com/suragnair/alpha-zero-general/raw/master/pretrained_models/writeup.pdf).\n\n### Contributing\nWhile the current code is fairly functional, we could benefit from the following contributions:\n* Game logic files for more games that follow the specifications in ```Game.py```, along with their neural networks\n* Neural networks in other frameworks\n* Pre-trained models for different game configurations\n* An asynchronous version of the code- parallel processes for self-play, neural net training and model comparison. \n* Asynchronous MCTS as described in the paper\n\n### Contributors and Credits\n* [Shantanu Thakoor](https://github.com/ShantanuThakoor) and [Megha Jhunjhunwala](https://github.com/jjw-megha) helped with core design and implementation.\n* [Shantanu Kumar](https://github.com/SourKream) contributed TensorFlow and Keras models for Othello.\n* [Evgeny Tyurin](https://github.com/evg-tyurin) contributed rules and a trained model for TicTacToe.\n* [MBoss](https://github.com/1424667164) contributed rules and a model for GoBang.\n\nThanks to [pytorch-classification](https://github.com/bearpaw/pytorch-classification) and [progress](https://github.com/verigak/progress).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"651A:B08CF:16EDAE:5C247B:6AB9219C"},"text_sha256":"98f110dac5844d98a3ce5568058cb3fc7c1eb39ab7e0a6784c3008566a468fcb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3080","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CD:8656E:17B79AD:1BD7DDD:6AB9294E"},"commit":{"sha":"f1a78e0505c614205f8c60eaa82cd644a07a84b3","url":"https://github.com/suragnair/alpha-zero-general/commit/f1a78e0505c614205f8c60eaa82cd644a07a84b3","date":"2025-01-01T19:59:02Z","author_date":"2025-01-01T19:59:02Z","committer_date":"2025-01-01T19:59:02Z","tree_sha":"51e354a9db14abdd6ab91b7048731af70df43c40","message_first_line":"Update LICENSE, fix license year (#327)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3079","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:17E9962:1C099AB:6AB9294F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4473,"blob_sha":"e2d55857e572dc1ce6086b99e486ee1fe1e57b00","priority":0}],"documents":[{"path":"README.md","size":4473,"blob_sha":"e2d55857e572dc1ce6086b99e486ee1fe1e57b00","priority":0,"status":200,"text":"# Alpha Zero General (any game, any framework!)\nA simplified, highly flexible, commented and (hopefully) easy to understand implementation of self-play based reinforcement learning based on the AlphaGo Zero paper (Silver et al). It is designed to be easy to adopt for any two-player turn-based adversarial game and any deep learning framework of your choice. A sample implementation has been provided for the game of Othello in PyTorch and Keras. An accompanying tutorial can be found [here](https://suragnair.github.io/posts/alphazero.html). We also have implementations for many other games like GoBang and TicTacToe.\n\nTo use a game of your choice, subclass the classes in ```Game.py``` and ```NeuralNet.py``` and implement their functions. Example implementations for Othello can be found in ```othello/OthelloGame.py``` and ```othello/{pytorch,keras}/NNet.py```. \n\n```Coach.py``` contains the core training loop and ```MCTS.py``` performs the Monte Carlo Tree Search. The parameters for the self-play can be specified in ```main.py```. Additional neural network parameters are in ```othello/{pytorch,keras}/NNet.py``` (cuda flag, batch size, epochs, learning rate etc.). \n\nTo start training a model for Othello:\n```bash\npython main.py\n```\nChoose your framework and game in ```main.py```.\n\n### Docker Installation\nFor easy environment setup, we can use [nvidia-docker](https://github.com/NVIDIA/nvidia-docker). Once you have nvidia-docker set up, we can then simply run:\n```\n./setup_env.sh\n```\nto set up a (default: pyTorch) Jupyter docker container. We can now open a new terminal and enter:\n```\ndocker exec -ti pytorch_notebook python main.py\n```\n\n### Experiments\nWe trained a PyTorch model for 6x6 Othello (~80 iterations, 100 episodes per iteration and 25 MCTS simulations per turn). This took about 3 days on an NVIDIA Tesla K80. The pretrained model (PyTorch) can be found in ```pretrained_models/othello/pytorch/```. You can play a game against it using ```pit.py```. Below is the performance of the model against a random and a greedy baseline with the number of iterations.\n![alt tag](https://github.com/suragnair/alpha-zero-general/raw/master/pretrained_models/6x6.png)\n\nA concise description of our algorithm can be found [here](https://github.com/suragnair/alpha-zero-general/raw/master/pretrained_models/writeup.pdf).\n\n### Citation\n\nIf you found this work useful, feel free to cite it as\n\n```\n@misc{thakoor2016learning,\n  title={Learning to play othello without human knowledge},\n  author={Thakoor, Shantanu and Nair, Surag and Jhunjhunwala, Megha},\n  year={2016},\n  publisher={Stanford University, Final Project Report}\n}\n```\n\n### Contributing\nWhile the current code is fairly functional, we could benefit from the following contributions:\n* Game logic files for more games that follow the specifications in ```Game.py```, along with their neural networks\n* Neural networks in other frameworks\n* Pre-trained models for different game configurations\n* An asynchronous version of the code- parallel processes for self-play, neural net training and model comparison. \n* Asynchronous MCTS as described in the paper\n\nSome extensions have been implented [here](https://github.com/kevaday/alphazero-general).\n\n### Contributors and Credits\n* [Shantanu Thakoor](https://github.com/ShantanuThakoor) and [Megha Jhunjhunwala](https://github.com/jjw-megha) helped with core design and implementation.\n* [Shantanu Kumar](https://github.com/SourKream) contributed TensorFlow and Keras models for Othello.\n* [Evgeny Tyurin](https://github.com/evg-tyurin) contributed rules and a trained model for TicTacToe.\n* [MBoss](https://github.com/1424667164) contributed rules and a model for GoBang.\n* [Jernej Habjan](https://github.com/JernejHabjan) contributed RTS game.\n* [Adam Lawson](https://github.com/goshawk22) contributed rules and a trained model for 3D TicTacToe.\n* [Carlos Aguayo](https://github.com/carlos-aguayo) contributed rules and a trained model for Dots and Boxes along with a [JavaScript implementation](https://github.com/carlos-aguayo/carlos-aguayo.github.io/tree/master/alphazero).\n* [Robert Ronan](https://github.com/rlronan) contributed rules for Santorini.\n* [Plamen Totev](https://github.com/plamentotev) contributed Go Text Protocol player for Othello.\n\nNote: Chainer and TensorFlow v1 versions have been removed but can be found prior to commit [2ad461c](https://github.com/suragnair/alpha-zero-general/tree/2ad461c393ecf446e76f6694b613e394b8eb652f).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A51C:3FA0D:1728FB:5C5EE6:6AB9219C"},"text_sha256":"ebbb1f68a02ab3548449de9c4f040b8ae5f57033f5625addb7b4448e15beff96"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/probability","input_row":{"repository":"tensorflow/probability","url":"https://github.com/tensorflow/probability","name":"probability","owner":"tensorflow","description":"Probabilistic reasoning and statistical analysis in TensorFlow","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4433,"issues":1418,"created_at":"2017-10-23T23:50:54Z","updated_at":"2026-09-23T22:07:21Z","first_commit_at":"2018-02-14T01:11:46Z","last_commit_at":"2026-09-23T22:07:09Z","activity_months":103.28,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:51.793Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/probability","visibility":"public","created_at":"2017-10-23T23:50:54Z","updated_at":"2026-09-23T22:07:21Z","private":false,"fork":false,"archived":false,"stargazers_count":4433,"open_issues_count":731,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3078","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0876:6C9BF:17ED92D:1C0E195:6AB9294F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3077","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:1821430:1C41823:6AB92950"},"commit":{"sha":"9a121fd7e8e3a57406e63962d36f2947f5ce28cd","url":"https://github.com/tensorflow/probability/commit/9a121fd7e8e3a57406e63962d36f2947f5ce28cd","date":"2018-05-24T14:47:55Z","author_date":"2018-05-24T14:47:32Z","committer_date":"2018-05-24T14:47:55Z","tree_sha":"6a26df64c260ae855350706fb4c72b60cf3c329b","message_first_line":"Internal Change."},"tree_request_status":200,"tree_rate":{"github_remaining":"3076","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17BE660:1BDDF88:6AB92950"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8565,"blob_sha":"040cf666562b03c59e4a54f39c295f5ad929be5b","priority":0}],"documents":[{"path":"README.md","size":8565,"blob_sha":"040cf666562b03c59e4a54f39c295f5ad929be5b","priority":0,"status":200,"text":"# TensorFlow Probability\n\nTensorFlow Probability is a library for probabilistic reasoning and statistical\nanalysis in TensorFlow. As part of the TensorFlow ecosystem, TensorFlow\nProbability provides integration of probabilistic methods with deep networks,\ngradient-based inference via automatic differentiation, and scalability to\nlarge datasets and models via hardware acceleration (e.g., GPUs) and distributed\ncomputation.\n\nOur probabilistic machine learning tools are structured as follows.\n\n__Layer 0: TensorFlow.__ Numerical operations. In particular, the LinearOperator\nclass enables matrix-free implementations that can exploit special structure\n(diagonal, low-rank, etc.) for efficient computation. It is built and maintained\nby the TensorFlow Probability team and is now part of\n[`tf.linalg`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/linalg)\nin core TF.\n\n__Layer 1: Statistical Building Blocks__\n\n* Distributions ([`tf.contrib.distributions`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distributions/python/ops),\n  [`tf.distributions`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/distributions)):\n  A large collection of probability\n  distributions and related statistics with batch and\n  [broadcasting](https://docs.scipy.org/doc/numpy-1.14.0/user/basics.broadcasting.html)\n  semantics.\n* Bijectors ([`tf.contrib.distributions.bijectors`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distributions/python/ops/bijectors)):\n  Reversible and composable transformations of random variables. Bijectors\n  provide a rich class of transformed distributions, from classical examples\n  like the\n  [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_distribution)\n  to sophisticated deep learning models such as\n  [masked autoregressive flows](https://arxiv.org/abs/1705.07057).\n\n__Layer 2: Model Building__\n\n* Edward2 ([`tfp.edward2`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/edward2)):\n  A probabilistic programming language for specifying flexible probabilistic\n  models as programs.\n* Probabilistic Layers ([`tfp.layers`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/layers)):\n  Neural network layers with uncertainty over the functions they represent,\n  extending TensorFlow Layers.\n* Trainable Distributions ([`tfp.trainable_distributions`](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/trainable_distributions.py)):\n  Probability distributions parameterized by a single Tensor, making it easy to\n  build neural nets that output probability distributions.\n\n__Layer 3: Probabilistic Inference__\n\n* Markov chain Monte Carlo ([`tfp.mcmc`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/mcmc)):\n  Algorithms for approximating integrals via sampling. Includes\n  [Hamiltonian Monte Carlo](https://en.wikipedia.org/wiki/Hamiltonian_Monte_Carlo),\n  random-walk Metropolis-Hastings, and the ability to build custom transition\n  kernels.\n* Variational Inference ([`tfp.vi`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/vi)):\n  Algorithms for approximating integrals via optimization.\n* Optimizers ([`tfp.optimizer`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/optimizer)):\n  Stochastic optimization methods, extending TensorFlow Optimizers. Includes\n  [Stochastic Gradient Langevin Dynamics](http://www.icml-2011.org/papers/398_icmlpaper.pdf).\n* Monte Carlo ([`tfp.monte_carlo`](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/monte_carlo.py)):\n  Tools for computing Monte Carlo expectations.\n\nTensorFlow Probability is under active development. Interfaces may change at any\ntime.\n\n## Examples\n\nSee [`tensorflow_probability/examples/`](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/)\nfor end-to-end examples. It includes tutorial notebooks such as:\n\n* [Linear Mixed Effects Models](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Linear_Mixed_Effects_Models.ipynb).\n  A hierarchical linear model for sharing statistical strength across examples.\n* [Eight Schools](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Eight_Schools.ipynb).\n  A hierarchical normal model for exchangeable treatment effects.\n* [Gaussian Copulas](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Gaussian_Copula.ipynb).\n  Probability distributions for capturing dependence across random variables.\n* [Understanding TensorFlow Distributions Shapes](https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Understanding_TensorFlow_Distributions_Shapes.ipynb).\n  How to distinguish between samples, batches, and events for arbitrarily shaped\n  probabilistic computations.\n\nIt also includes example scripts such as:\n\n* [Variational Autoencoders](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/vae.py).\n  Representation learning with a latent code and variational inference.\n* [Bayesian Neural Networks](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/bayesian_neural_network.py).\n  Neural networks with uncertainty over their weights.\n* [Bayesian Logistic Regression](https://github.com/tensorflow/probability/tree/master/tensorflow_probability/examples/logistic_regression.py).\n  Bayesian inference for binary classification.\n\n## Installation\n\nTo install the latest version, run the following:\n\n```shell\npip install --user --upgrade tfp-nightly    # depends on tensorflow (CPU-only)\n```\n\nTensorFlow Probability depends on a current nightly release of TensorFlow\n(`tf-nightly`); the `--upgrade` flag ensures you'll automatically get the latest\nversion.\n\nWe also provide a GPU-enabled package:\n\n```shell\npip install --user --upgrade tfp-nightly-gpu  # depends on tensorflow-gpu (GPU enabled)\n```\n\nCurrently, TensorFlow Probability does not contain any GPU-specific code. The\nprimary difference between these packages is that `tensorflow-probability-gpu`\ndepends on a GPU-enabled version of TensorFlow.\n\nTo force a Python 3-specific install, replace `pip` with `pip3` in the above\ncommands. For additional installation help, guidance installing prerequisites,\nand (optionally) setting up virtual environments, see the [TensorFlow\ninstallation guide](https://www.tensorflow.org/install).\n\nYou can also install from source. This requires the [Bazel](\nhttps://bazel.build/) build system.\n\n```shell\n# sudo apt-get install bazel git python-pip  # Ubuntu; others, see above links.\ngit clone https://github.com/tensorflow/probability.git\ncd probability\nbazel build --config=opt --copt=-O3 --copt=-march=native :pip_pkg\nPKGDIR=$(mktemp -d)\n./bazel-bin/pip_pkg $PKGDIR\npip install --user --upgrade $PKGDIR/*.whl\n```\n\n## Community\n\nAs part of TensorFlow, we're committed to fostering an open and welcoming\nenvironment.\n\n* [Stack Overflow](https://stackoverflow.com/questions/tagged/tensorflow): Ask\n  or answer technical questions.\n* [GitHub](https://github.com/tensorflow/probability/issues): Report bugs or\n  make feature requests.\n* [TensorFlow Blog](https://medium.com/tensorflow): Stay up to date on content\n  from the TensorFlow team and best articles from the community.\n* [Youtube Channel](http://youtube.com/tensorflow/): Follow TensorFlow shows.\n* Mailing list: Stay tuned!\n\nSee the [TensorFlow Community](https://www.tensorflow.org/community/) page for\nmore details. Check out our latest publicity here:\n\n+ [Coffee with a Googler: Probabilistic Machine Learning in TensorFlow](\n  https://www.youtube.com/watch?v=BjUkL8DFH5Q)\n+ [Introducing TensorFlow Probability](\n  https://medium.com/tensorflow/introducing-tensorflow-probability-dca4c304e245)\n\n## Contributing\n\nWe're eager to collaborate with you! See [`CONTRIBUTING.md`](CONTRIBUTING.md)\nfor more details. This project adheres to TensorFlow's\n[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to\nuphold this code.\n\n## References\n\n+ _TensorFlow Distributions._ Joshua V. Dillon, Ian Langmore, Dustin Tran,\nEugene Brevdo, Srinivas Vasudevan, Dave Moore, Brian Patton, Alex Alemi, Matt\nHoffman, Rif A. Saurous.\n[arXiv preprint arXiv:1711.10604, 2017](https://arxiv.org/abs/1711.10604).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27EC:35EBC:172C3B:5C6290:6AB9219D"},"text_sha256":"f130f16923dd6a4593b88e53770eb689a6e5f0685f7e416723f26ad913e27630"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3075","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:17EDA35:1C0E23E:6AB92951"},"commit":{"sha":"a908ce41fa343057396fc87e0393f0a9c7dcc1c7","url":"https://github.com/tensorflow/probability/commit/a908ce41fa343057396fc87e0393f0a9c7dcc1c7","date":"2026-05-12T12:16:29Z","author_date":"2026-05-12T12:13:59Z","committer_date":"2026-05-12T12:16:29Z","tree_sha":"6c1e7980adcd7b9f121608fcfe611b9aea899b02","message_first_line":"Automated Code Change"},"tree_request_status":200,"tree_rate":{"github_remaining":"3074","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:17FC51F:1C1CE58:6AB92951"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11920,"blob_sha":"27e5c189b6bdec05946b7678798a5877324cd348","priority":0}],"documents":[{"path":"README.md","size":11920,"blob_sha":"27e5c189b6bdec05946b7678798a5877324cd348","priority":0,"status":200,"text":"# TensorFlow Probability\n\nTensorFlow Probability is a library for probabilistic reasoning and statistical\nanalysis in TensorFlow. As part of the TensorFlow ecosystem, TensorFlow\nProbability provides integration of probabilistic methods with deep networks,\ngradient-based inference via automatic differentiation, and scalability to\nlarge datasets and models via hardware acceleration (e.g., GPUs) and distributed\ncomputation.\n\n__TFP also works as \"Tensor-friendly Probability\" in pure JAX!__:\n`from tensorflow_probability.substrates import jax as tfp` --\nLearn more [here](https://www.tensorflow.org/probability/examples/TensorFlow_Probability_on_JAX).\n\nOur probabilistic machine learning tools are structured as follows.\n\n__Layer 0: TensorFlow.__ Numerical operations. In particular, the LinearOperator\nclass enables matrix-free implementations that can exploit special structure\n(diagonal, low-rank, etc.) for efficient computation. It is built and maintained\nby the TensorFlow Probability team and is now part of\n[`tf.linalg`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/ops/linalg)\nin core TF.\n\n__Layer 1: Statistical Building Blocks__\n\n* Distributions ([`tfp.distributions`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions)):\n  A large collection of probability\n  distributions and related statistics with batch and\n  [broadcasting](https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)\n  semantics. See the\n  [Distributions Tutorial](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).\n* Bijectors ([`tfp.bijectors`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/bijectors)):\n  Reversible and composable transformations of random variables. Bijectors\n  provide a rich class of transformed distributions, from classical examples\n  like the\n  [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_distribution)\n  to sophisticated deep learning models such as\n  [masked autoregressive flows](https://arxiv.org/abs/1705.07057).\n\n__Layer 2: Model Building__\n\n* Joint Distributions (e.g., [`tfp.distributions.JointDistributionSequential`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/distributions/joint_distribution_sequential.py)):\n    Joint distributions over one or more possibly-interdependent distributions.\n    For an introduction to modeling with TFP's `JointDistribution`s, check out\n    [this colab](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Modeling_with_JointDistribution.ipynb)\n* Probabilistic Layers ([`tfp.layers`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/layers)):\n  Neural network layers with uncertainty over the functions they represent,\n  extending TensorFlow Layers.\n\n__Layer 3: Probabilistic Inference__\n\n* Markov chain Monte Carlo ([`tfp.mcmc`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/mcmc)):\n  Algorithms for approximating integrals via sampling. Includes\n  [Hamiltonian Monte Carlo](https://en.wikipedia.org/wiki/Hamiltonian_Monte_Carlo),\n  random-walk Metropolis-Hastings, and the ability to build custom transition\n  kernels.\n* Variational Inference ([`tfp.vi`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/vi)):\n  Algorithms for approximating integrals via optimization.\n* Optimizers ([`tfp.optimizer`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/python/optimizer)):\n  Stochastic optimization methods, extending TensorFlow Optimizers. Includes\n  [Stochastic Gradient Langevin Dynamics](http://www.icml-2011.org/papers/398_icmlpaper.pdf).\n* Monte Carlo ([`tfp.monte_carlo`](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/monte_carlo)):\n  Tools for computing Monte Carlo expectations.\n\nTensorFlow Probability is under active development. Interfaces may change at any\ntime.\n\n## Examples\n\nSee [`tensorflow_probability/examples/`](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/)\nfor end-to-end examples. It includes tutorial notebooks such as:\n\n* [Linear Mixed Effects Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Linear_Mixed_Effects_Models.ipynb).\n  A hierarchical linear model for sharing statistical strength across examples.\n* [Eight Schools](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Eight_Schools.ipynb).\n  A hierarchical normal model for exchangeable treatment effects.\n* [Hierarchical Linear Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/HLM_TFP_R_Stan.ipynb).\n  Hierarchical linear models compared among TensorFlow Probability, R, and Stan.\n* [Bayesian Gaussian Mixture Models](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Bayesian_Gaussian_Mixture_Model.ipynb).\n  Clustering with a probabilistic generative model.\n* [Probabilistic Principal Components Analysis](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Probabilistic_PCA.ipynb).\n  Dimensionality reduction with latent variables.\n* [Gaussian Copulas](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Gaussian_Copula.ipynb).\n  Probability distributions for capturing dependence across random variables.\n* [TensorFlow Distributions: A Gentle Introduction](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Distributions_Tutorial.ipynb).\n  Introduction to TensorFlow Distributions.\n* [Understanding TensorFlow Distributions Shapes](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/Understanding_TensorFlow_Distributions_Shapes.ipynb).\n  How to distinguish between samples, batches, and events for arbitrarily shaped\n  probabilistic computations.\n* [TensorFlow Probability Case Study: Covariance Estimation](https://github.com/tensorflow/probability/blob/main/tensorflow_probability/examples/jupyter_notebooks/TensorFlow_Probability_Case_Study_Covariance_Estimation.ipynb).\n  A user's case study in applying TensorFlow Probability to estimate covariances.\n\nIt also includes example scripts such as:\n\n  Representation learning with a latent code and variational inference.\n* [Vector-Quantized Autoencoder](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/vq_vae.py).\n  Discrete representation learning with vector quantization.\n* [Disentangled Sequential Variational Autoencoder](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/disentangled_vae.py)\n  Disentangled representation learning over sequences with variational inference.\n* [Bayesian Neural Networks](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/bayesian_neural_network.py).\n  Neural networks with uncertainty over their weights.\n* [Bayesian Logistic Regression](https://github.com/tensorflow/probability/tree/main/tensorflow_probability/examples/logistic_regression.py).\n  Bayesian inference for binary classification.\n\n## Installation\n\nFor additional details on installing TensorFlow, guidance installing\nprerequisites, and (optionally) setting up virtual environments, see the\n[TensorFlow installation guide](https://www.tensorflow.org/install).\n\n### Stable Builds\n\nTo install the latest stable version, run the following:\n\n```shell\n# Notes:\n\n# - The `--upgrade` flag ensures you'll get the latest version.\n# - The `--user` flag ensures the packages are installed to your user directory\n#   rather than the system directory.\n# - TensorFlow 2 packages require a pip >= 19.0\npython -m pip install --upgrade --user pip\npython -m pip install --upgrade --user tensorflow tensorflow_probability\n```\n\nFor CPU-only usage (and a smaller install), install with `tensorflow-cpu`.\n\nTo use a pre-2.0 version of TensorFlow, run:\n\n```shell\npython -m pip install --upgrade --user \"tensorflow<2\" \"tensorflow_probability<0.9\"\n```\n\nNote: Since [TensorFlow](https://www.tensorflow.org/install) is *not* included\nas a dependency of the TensorFlow Probability package (in `setup.py`), you must\nexplicitly install the TensorFlow package (`tensorflow` or `tensorflow-cpu`).\nThis allows us to maintain one package instead of separate packages for CPU and\nGPU-enabled TensorFlow. See the\n[TFP release notes](https://github.com/tensorflow/probability/releases) for more\ndetails about dependencies between TensorFlow and TensorFlow Probability.\n\n\n### Nightly Builds\n\nThere are also nightly builds of TensorFlow Probability under the pip package\n`tfp-nightly`, which depends on one of `tf-nightly` or `tf-nightly-cpu`.\nNightly builds include newer features, but may be less stable than the\nversioned releases. Both stable and nightly docs are available\n[here](https://www.tensorflow.org/probability/api_docs/python/tfp?version=nightly).\n\n```shell\npython -m pip install --upgrade --user tf-nightly tfp-nightly\n```\n\n### Installing from Source\n\nYou can also install from source. This requires the [Bazel](\nhttps://bazel.build/) build system. It is highly recommended that you install\nthe nightly build of TensorFlow (`tf-nightly`) before trying to build\nTensorFlow Probability from source. The most recent version of Bazel that TFP\ncurrently supports is 6.4.0; support for 7.0.0+ is WIP.\n\n```shell\n# sudo apt-get install bazel git python-pip  # Ubuntu; others, see above links.\npython -m pip install --upgrade --user tf-nightly\ngit clone https://github.com/tensorflow/probability.git\ncd probability\nbazel build --copt=-O3 --copt=-march=native :pip_pkg\nPKGDIR=$(mktemp -d)\n./bazel-bin/pip_pkg $PKGDIR\npython -m pip install --upgrade --user $PKGDIR/*.whl\n```\n\n## Community\n\nAs part of TensorFlow, we're committed to fostering an open and welcoming\nenvironment.\n\n* [Stack Overflow](https://stackoverflow.com/questions/tagged/tensorflow): Ask\n  or answer technical questions.\n* [GitHub](https://github.com/tensorflow/probability/issues): Report bugs or\n  make feature requests.\n* [TensorFlow Blog](https://blog.tensorflow.org/): Stay up to date on content\n  from the TensorFlow team and best articles from the community.\n* [Youtube Channel](http://youtube.com/tensorflow/): Follow TensorFlow shows.\n* [tfprobability@tensorflow.org](https://groups.google.com/a/tensorflow.org/forum/#!forum/tfprobability):\n  Open mailing list for discussion and questions.\n\nSee the [TensorFlow Community](https://www.tensorflow.org/community/) page for\nmore details. Check out our latest publicity here:\n\n+ [Coffee with a Googler: Probabilistic Machine Learning in TensorFlow](\n  https://www.youtube.com/watch?v=BjUkL8DFH5Q)\n+ [Introducing TensorFlow Probability](\n  https://medium.com/tensorflow/introducing-tensorflow-probability-dca4c304e245)\n\n## Contributing\n\nWe're eager to collaborate with you! See [`CONTRIBUTING.md`](CONTRIBUTING.md)\nfor a guide on how to contribute. This project adheres to TensorFlow's\n[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to\nuphold this code.\n\n## References\n\nIf you use TensorFlow Probability in a paper, please cite:\n\n+ _TensorFlow Distributions._ Joshua V. Dillon, Ian Langmore, Dustin Tran,\nEugene Brevdo, Srinivas Vasudevan, Dave Moore, Brian Patton, Alex Alemi, Matt\nHoffman, Rif A. Saurous.\n[arXiv preprint arXiv:1711.10604, 2017](https://arxiv.org/abs/1711.10604).\n\n(We're aware there's a lot more to TensorFlow Probability than Distributions, but the Distributions paper lays out our vision and is a fine thing to cite for now.)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C016:17E138:1746EF:5C7D45:6AB9219F"},"text_sha256":"27dde03fd89ddfeb62c289d2305d6ad42dc66878539d1be49e4c45ceadf610ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"richzhang/PerceptualSimilarity","input_row":{"repository":"richzhang/PerceptualSimilarity","url":"https://github.com/richzhang/PerceptualSimilarity","name":"PerceptualSimilarity","owner":"richzhang","description":"LPIPS metric. pip install lpips","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":4280,"issues":113,"created_at":"2018-01-11T01:43:21Z","updated_at":"2026-09-24T06:12:23Z","first_commit_at":"2018-01-11T01:44:57Z","last_commit_at":"2023-12-19T18:37:07Z","activity_months":71.25,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:54.554Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"richzhang/PerceptualSimilarity","visibility":"public","created_at":"2018-01-11T01:43:21Z","updated_at":"2026-09-24T06:12:23Z","private":false,"fork":false,"archived":false,"stargazers_count":4280,"open_issues_count":58,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"3073","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17B1495:1BD118B:6AB92952"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3072","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AE:E80A6:1795949:1BB62CB:6AB92952"},"commit":{"sha":"9662ec54a9840505eb1fdf6616af161237253f65","url":"https://github.com/richzhang/PerceptualSimilarity/commit/9662ec54a9840505eb1fdf6616af161237253f65","date":"2018-04-15T03:17:45Z","author_date":"2018-04-15T03:17:45Z","committer_date":"2018-04-15T03:17:45Z","tree_sha":"0f26aa28acae64fe0fe31b265aa997ca7d05516e","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3071","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:17EDB77:1C0E450:6AB92953"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7533,"blob_sha":"498783061936520c9664f65b53f6ce6bdd80f692","priority":0}],"documents":[{"path":"README.md","size":7533,"blob_sha":"498783061936520c9664f65b53f6ce6bdd80f692","priority":0,"status":200,"text":"\n## Perceptual Similarity Metric and Dataset [[Project Page]](http://richzhang.github.io/PerceptualSimilarity/)\n\nThis repository contains the **(1) Learned Perceptual Image Patch Similarity (LPIPS) metric** and **(2) Berkeley-Adobe Perceptual Patch Similarity (BAPPS) dataset** proposed in the paper below. It can also be used as an implementation of the \"perceptual loss\".\n\n**The Unreasonable Effectiveness of Deep Networks as a Perceptual Metric**  \n[Richard Zhang](https://richzhang.github.io/), [Phillip Isola](http://web.mit.edu/phillipi/), [Alexei A. Efros](http://www.eecs.berkeley.edu/~efros/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/), [Oliver Wang](http://www.oliverwang.info/).  \nIn [CVPR](https://arxiv.org/abs/1801.03924), 2018.  \n\n<img src='https://richzhang.github.io/PerceptualSimilarity/index_files/fig1_v2.jpg' width=1200>\n\n## (0) Dependencies\n\nThis repository uses Python 2 or 3, with the following libraries: [PyTorch](www.pytorch.org), numpy, scipy, skimage.\n\n## (1) Learned Perceptual Image Patch Similarity (LPIPS) metric\n\n### About the metric\n\nWe found that deep network activations work surprisingly well as a perceptual similarity metric. This was true across network architectures (SqueezeNet [2.8 MB], AlexNet [9.1 MB], and VGG [58.9 MB] provided similar scores) and supervisory signals (unsupervised, self-supervised, and supervised all perform strongly). We slightly improved scores by linearly \"calibrating\" networks - adding a linear layer on top of off-the-shelf classification networks. We provide 3 variants, using linear layers on top of the SqueezeNet, AlexNet (default), and VGG networks. Using this code, you can simply call `model.forward(im0,im1)` to evaluate the distance between two image patches.\n\n### Using the metric\n\nScript [`test_network.py`](test_network.py) contains example usage. Run `python test_network.py` to take the distance between example reference image [`ex_ref.png`](./imgs/ex_ref.png) to distorted images [`ex_p0.png`](./imgs/ex_p0.png) and [`ex_p1.png`](./imgs/ex_p1.png). Before running it - which do you think *should* be closer? A more detailed explanation is below.\n\nLoad a model with the following commands.\n\n```python\nfrom models import dist_model as dm\nmodel = dm.DistModel()\nmodel.initialize(model='net-lin',net='alex',use_gpu=True)\n```\n\nVariable `net` can be `squeeze`, `alex`, `vgg`. Network `alex` is fastest, performs the best, and is the default. Set `model=net` for an uncalibrated off-the-shelf network (taking cos distance). Finally, to call the model, run\n\n```python\nd = model.forward(im0,im1)\n```\n\nwhere ```im0, im1``` are PyTorch tensors with shape ```Nx3xHxW``` (```N``` patches of size ```HxW```, RGB images scaled in `[-1,+1]`). Variable `d` will be a length `N` numpy array.\n\n### Backpropping through the metric\n\nFile [`perceptual_loss.py`](perceptual_loss.py) shows how to iteratively optimize using the metric. Run `python perceptual_loss.py` for a demo. The code can also be used to implement vanilla VGG loss, without our learned weights. This was implemented by [Angjoo Kanazawa](https://github.com/akanazawa).\n\n## (2) Berkeley Adobe Perceptual Patch Similarity (BAPPS) dataset\n\n### Downloading the dataset\n\nRun `bash ./scripts/get_dataset.sh` to download and unzip the dataset. Dataset will appear in directory `./dataset`. Dataset takes [6.6 GB] total.\n- 2AFC train [5.3 GB]\n- 2AFC val [1.1 GB]\n- JND val [0.2 GB]  \nAlternatively, run `bash ./scripts/get_dataset_valonly.sh` to only download the validation set (no training set).\n\n### Evaluating a perceptual similarity metric on a dataset\n\nScript `test_dataset_model.py` evaluates a perceptual model on a subset of the dataset.\n\n**Dataset flags**\n- `dataset_mode`: `2afc` or `jnd`, which type of perceptual judgment to evaluate\n- `datasets`: list the datasets to evaluate\n    - if `dataset_mode` was `2afc`, choices are [`train/traditional`, `train/cnn`, `val/traditional`, `val/cnn`, `val/superres`, `val/deblur`, `val/color`, `val/frameinterp`]\n    - if `dataset_mode` was `jnd`, choices are [`val/traditional`, `val/cnn`]\n    \n**Perceptual similarity model flags**\n- `model`: perceptual similarity model to use\n    - `net-lin` for our LPIPS learned similarity model (linear network on top of internal activations of pretrained network)\n    - `net` for a classification network (uncalibrated with all layers averaged)\n    - `l2` for Euclidean distance\n    - `ssim` for Structured Similarity Image Metric\n- `net`: choices are [`squeeze`,`alex`,`vgg`] for the `net-lin` and `net` models (ignored for `l2` and `ssim` models)\n- `colorspace`: choices are [`Lab`,`RGB`], used for the `l2` and `ssim` models (ignored for `net-lin` and `net` models)\n\n**Misc flags**\n- `batch_size`: evaluation batch size (will default to 1 )\n- `--use_gpu`: turn on this flag for GPU usage\n\nAn example usage is as follows: `python ./test_dataset_model.py --dataset_mode 2afc --datasets val/traditional val/cnn --model net-lin --net alex --use_gpu --batch_size 50`. This would evaluate our model on the \"traditional\" and \"cnn\" validation datasets.\n\n### About the dataset\n\nThe dataset contains two types of perceptual judgements: **Two Alternative Forced Choice (2AFC)** and **Just Noticeable Differences (JND)**.\n\n**(1) Two Alternative Forced Choice (2AFC)** - Data is contained in the `2afc` subdirectory. Evaluators were given a reference patch, along with two distorted patches, and were asked to select which of the distorted patches was \"closer\" to the reference patch.\n\nTraining sets contain 2 human judgments/triplet.\n- `train/traditional` [56.6k triplets]\n- `train/cnn` [38.1k triplets]\n- `train/mix` [56.6k triplets]\n\nValidation sets contain 5 judgments/triplet.\n- `val/traditional` [4.7k triplets]\n- `val/cnn` [4.7k triplets]\n- `val/superres` [10.9k triplets]\n- `val/deblur` [9.4k triplets]\n- `val/color` [4.7k triplets]\n- `val/frameinterp` [1.9k triplets]\n\nEach 2AFC subdirectory contains the following folders:\n- `ref` contains the original reference patches\n- `p0,p1` contain the two distorted patches\n- `judge` contains what the human evaluators chose - 0 if all humans preferred p0, 1 if all humans preferred p1\n\n**(2) Just Noticeable Differences (JND)** - Data is contained in the `jnd` subdirectory. Evaluators were presented with two patches - a reference patch and a distorted patch - for a limited time, and were asked if they thought the patches were the same (identically) or difference. \n\nEach set contains 3 human evaluations/example.\n- `val/traditional` [4.8k patch pairs]\n- `val/cnn` [4.8k patch pairs]\n\nEach JND subdirectory contains the following folders:\n- `p0,p1` contain the two patches\n- `same` contains fraction of human evaluators who thought the patches were the same (0 if all humans thought patches were different, 1 if all humans thought patches were the same)\n\n## Citation\n\nIf you find this repository useful for your research, please use the following.\n\n```\n@inproceedings{zhang2018perceptual,\n  title={The Unreasonable Effectiveness of Deep Networks as a Perceptual Metric},\n  author={Zhang, Richard and Isola, Phillip and Efros, Alexei A and Shechtman, Eli and Wang, Oliver},\n  booktitle={CVPR},\n  year={2018}\n}\n```\n\n## Acknowledgements\n\nThis repository borrows partially from the [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix) repository. The average precision (AP) code is borrowed from the [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py) repository.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"623A:3A3DD:173018:5C66D7:6AB921A0"},"text_sha256":"9b780f9a9f1c9b85bd070e79fc600b6be9756f7a857a329a33951a36a9b803f1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3070","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:17EC286:1C0CB59:6AB92954"},"commit":{"sha":"082bb24f84c091ea94de2867d34c4544f68e0963","url":"https://github.com/richzhang/PerceptualSimilarity/commit/082bb24f84c091ea94de2867d34c4544f68e0963","date":"2023-12-19T18:37:07Z","author_date":"2023-12-19T18:37:07Z","committer_date":"2023-12-19T18:37:07Z","tree_sha":"454a3a126f3eed861a3c0df6e2591232daf02e21","message_first_line":"Update twoafc_dataset.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"3069","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:17D721F:1BF7996:6AB92954"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10273,"blob_sha":"10209820caa8ca7f6ce2dcc9efb87ef1e8129b99","priority":0}],"documents":[{"path":"README.md","size":10273,"blob_sha":"10209820caa8ca7f6ce2dcc9efb87ef1e8129b99","priority":0,"status":200,"text":"\n## Perceptual Similarity Metric and Dataset [[Project Page]](http://richzhang.github.io/PerceptualSimilarity/)\n\n**The Unreasonable Effectiveness of Deep Features as a Perceptual Metric**  \n[Richard Zhang](https://richzhang.github.io/), [Phillip Isola](http://web.mit.edu/phillipi/), [Alexei A. Efros](http://www.eecs.berkeley.edu/~efros/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/), [Oliver Wang](http://www.oliverwang.info/). In [CVPR](https://arxiv.org/abs/1801.03924), 2018.\n\n<img src='https://richzhang.github.io/PerceptualSimilarity/index_files/fig1_v2.jpg' width=1200>\n\n### Quick start\n\nRun `pip install lpips`. The following Python code is all you need.\n\n```python\nimport lpips\nloss_fn_alex = lpips.LPIPS(net='alex') # best forward scores\nloss_fn_vgg = lpips.LPIPS(net='vgg') # closer to \"traditional\" perceptual loss, when used for optimization\n\nimport torch\nimg0 = torch.zeros(1,3,64,64) # image should be RGB, IMPORTANT: normalized to [-1,1]\nimg1 = torch.zeros(1,3,64,64)\nd = loss_fn_alex(img0, img1)\n```\n\nMore thorough information about variants is below. This repository contains our **perceptual metric (LPIPS)** and **dataset (BAPPS)**. It can also be used as a \"perceptual loss\". This uses PyTorch; a Tensorflow alternative is [here](https://github.com/alexlee-gk/lpips-tensorflow).\n\n\n**Table of Contents**<br>\n1. [Learned Perceptual Image Patch Similarity (LPIPS) metric](#1-learned-perceptual-image-patch-similarity-lpips-metric)<br>\n   a. [Basic Usage](#a-basic-usage) If you just want to run the metric through command line, this is all you need.<br>\n   b. [\"Perceptual Loss\" usage](#b-backpropping-through-the-metric)<br>\n   c. [About the metric](#c-about-the-metric)<br>\n2. [Berkeley-Adobe Perceptual Patch Similarity (BAPPS) dataset](#2-berkeley-adobe-perceptual-patch-similarity-bapps-dataset)<br>\n   a. [Download](#a-downloading-the-dataset)<br>\n   b. [Evaluation](#b-evaluating-a-perceptual-similarity-metric-on-a-dataset)<br>\n   c. [About the dataset](#c-about-the-dataset)<br>\n   d. [Train the metric using the dataset](#d-using-the-dataset-to-train-the-metric)<br>\n\n## (0) Dependencies/Setup\n\n### Installation\n- Install PyTorch 1.0+ and torchvision fom http://pytorch.org\n\n```bash\npip install -r requirements.txt\n```\n- Clone this repo:\n```bash\ngit clone https://github.com/richzhang/PerceptualSimilarity\ncd PerceptualSimilarity\n```\n\n## (1) Learned Perceptual Image Patch Similarity (LPIPS) metric\n\nEvaluate the distance between image patches. **Higher means further/more different. Lower means more similar.**\n\n### (A) Basic Usage\n\n#### (A.I) Line commands\n\nExample scripts to take the distance between 2 specific images, all corresponding pairs of images in 2 directories, or all pairs of images within a directory:\n\n```\npython lpips_2imgs.py -p0 imgs/ex_ref.png -p1 imgs/ex_p0.png --use_gpu\npython lpips_2dirs.py -d0 imgs/ex_dir0 -d1 imgs/ex_dir1 -o imgs/example_dists.txt --use_gpu\npython lpips_1dir_allpairs.py -d imgs/ex_dir_pair -o imgs/example_dists_pair.txt --use_gpu\n```\n\n#### (A.II) Python code\n\nFile [test_network.py](test_network.py) shows example usage. This snippet is all you really need.\n\n```python\nimport lpips\nloss_fn = lpips.LPIPS(net='alex')\nd = loss_fn.forward(im0,im1)\n```\n\nVariables ```im0, im1``` is a PyTorch Tensor/Variable with shape ```Nx3xHxW``` (```N``` patches of size ```HxW```, RGB images scaled in `[-1,+1]`). This returns `d`, a length `N` Tensor/Variable.\n\nRun `python test_network.py` to take the distance between example reference image [`ex_ref.png`](imgs/ex_ref.png) to distorted images [`ex_p0.png`](./imgs/ex_p0.png) and [`ex_p1.png`](imgs/ex_p1.png). Before running it - which do you think *should* be closer?\n\n**Some Options** By default in `model.initialize`:\n- By default, `net='alex'`. Network `alex` is fastest, performs the best (as a forward metric), and is the default. For backpropping, `net='vgg'` loss is closer to the traditional \"perceptual loss\".\n- By default, `lpips=True`. This adds a linear calibration on top of intermediate features in the net. Set this to `lpips=False` to equally weight all the features.\n\n### (B) Backpropping through the metric\n\nFile [`lpips_loss.py`](lpips_loss.py) shows how to iteratively optimize using the metric. Run `python lpips_loss.py` for a demo. The code can also be used to implement vanilla VGG loss, without our learned weights.\n\n### (C) About the metric\n\n**Higher means further/more different. Lower means more similar.**\n\nWe found that deep network activations work surprisingly well as a perceptual similarity metric. This was true across network architectures (SqueezeNet [2.8 MB], AlexNet [9.1 MB], and VGG [58.9 MB] provided similar scores) and supervisory signals (unsupervised, self-supervised, and supervised all perform strongly). We slightly improved scores by linearly \"calibrating\" networks - adding a linear layer on top of off-the-shelf classification networks. We provide 3 variants, using linear layers on top of the SqueezeNet, AlexNet (default), and VGG networks.\n\nIf you use LPIPS in your publication, please specify which version you are using. The current version is 0.1. You can set `version='0.0'` for the initial release.\n\n## (2) Berkeley Adobe Perceptual Patch Similarity (BAPPS) dataset\n\n### (A) Downloading the dataset\n\nRun `bash ./scripts/download_dataset.sh` to download and unzip the dataset into directory `./dataset`. It takes [6.6 GB] total. Alternatively, run `bash ./scripts/download_dataset_valonly.sh` to only download the validation set [1.3 GB].\n- 2AFC train [5.3 GB]\n- 2AFC val [1.1 GB]\n- JND val [0.2 GB]  \n\n### (B) Evaluating a perceptual similarity metric on a dataset\n\nScript `test_dataset_model.py` evaluates a perceptual model on a subset of the dataset.\n\n**Dataset flags**\n- `--dataset_mode`: `2afc` or `jnd`, which type of perceptual judgment to evaluate\n- `--datasets`: list the datasets to evaluate\n    - if `--dataset_mode 2afc`: choices are [`train/traditional`, `train/cnn`, `val/traditional`, `val/cnn`, `val/superres`, `val/deblur`, `val/color`, `val/frameinterp`]\n    - if `--dataset_mode jnd`: choices are [`val/traditional`, `val/cnn`]\n    \n**Perceptual similarity model flags**\n- `--model`: perceptual similarity model to use\n    - `lpips` for our LPIPS learned similarity model (linear network on top of internal activations of pretrained network)\n    - `baseline` for a classification network (uncalibrated with all layers averaged)\n    - `l2` for Euclidean distance\n    - `ssim` for Structured Similarity Image Metric\n- `--net`: [`squeeze`,`alex`,`vgg`] for the `net-lin` and `net` models; ignored for `l2` and `ssim` models\n- `--colorspace`: choices are [`Lab`,`RGB`], used for the `l2` and `ssim` models; ignored for `net-lin` and `net` models\n\n**Misc flags**\n- `--batch_size`: evaluation batch size (will default to 1)\n- `--use_gpu`: turn on this flag for GPU usage\n\nAn example usage is as follows: `python ./test_dataset_model.py --dataset_mode 2afc --datasets val/traditional val/cnn --model lpips --net alex --use_gpu --batch_size 50`. This would evaluate our model on the \"traditional\" and \"cnn\" validation datasets.\n\n### (C) About the dataset\n\nThe dataset contains two types of perceptual judgements: **Two Alternative Forced Choice (2AFC)** and **Just Noticeable Differences (JND)**.\n\n**(1) 2AFC** Evaluators were given a patch triplet (1 reference + 2 distorted). They were asked to select which of the distorted was \"closer\" to the reference.\n\nTraining sets contain 2 judgments/triplet.\n- `train/traditional` [56.6k triplets]\n- `train/cnn` [38.1k triplets]\n- `train/mix` [56.6k triplets]\n\nValidation sets contain 5 judgments/triplet.\n- `val/traditional` [4.7k triplets]\n- `val/cnn` [4.7k triplets]\n- `val/superres` [10.9k triplets]\n- `val/deblur` [9.4k triplets]\n- `val/color` [4.7k triplets]\n- `val/frameinterp` [1.9k triplets]\n\nEach 2AFC subdirectory contains the following folders:\n- `ref`: original reference patches\n- `p0,p1`: two distorted patches\n- `judge`: human judgments - 0 if all preferred p0, 1 if all humans preferred p1\n\n**(2) JND** Evaluators were presented with two patches - a reference and a distorted - for a limited time. They were asked if the patches were the same (identically) or different. \n\nEach set contains 3 human evaluations/example.\n- `val/traditional` [4.8k pairs]\n- `val/cnn` [4.8k pairs]\n\nEach JND subdirectory contains the following folders:\n- `p0,p1`: two patches\n- `same`: human judgments: 0 if all humans thought patches were different, 1 if all humans thought patches were same\n\n### (D) Using the dataset to train the metric\n\nSee script `train_test_metric.sh` for an example of training and testing the metric. The script will train a model on the full training set for 10 epochs, and then test the learned metric on all of the validation sets. The numbers should roughly match the **Alex - lin** row in Table 5 in the [paper](https://arxiv.org/abs/1801.03924). The code supports training a linear layer on top of an existing representation. Training will add a subdirectory in the `checkpoints` directory.\n\nYou can also train \"scratch\" and \"tune\" versions by running `train_test_metric_scratch.sh` and `train_test_metric_tune.sh`, respectively. \n\n## Citation\n\nIf you find this repository useful for your research, please use the following.\n\n```\n@inproceedings{zhang2018perceptual,\n  title={The Unreasonable Effectiveness of Deep Features as a Perceptual Metric},\n  author={Zhang, Richard and Isola, Phillip and Efros, Alexei A and Shechtman, Eli and Wang, Oliver},\n  booktitle={CVPR},\n  year={2018}\n}\n```\n\n## Acknowledgements\n\nThis repository borrows partially from the [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix) repository. The average precision (AP) code is borrowed from the [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py) repository. [Angjoo Kanazawa](https://github.com/akanazawa), [Connelly Barnes](http://www.connellybarnes.com/work/), [Gaurav Mittal](https://github.com/g1910), [wilhelmhb](https://github.com/wilhelmhb), [Filippo Mameli](https://github.com/mameli), [SuperShinyEyes](https://github.com/SuperShinyEyes), [Minyoung Huh](http://people.csail.mit.edu/minhuh/) helped to improve the codebase.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9B6:3CC8A:1759BF:5C90F7:6AB921A1"},"text_sha256":"7d4c741dd55f4667997f10c70b7356d45a4703e514f2cfa33efebec858519421"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"uxlfoundation/oneDNN","input_row":{"repository":"uxlfoundation/oneDNN","url":"https://github.com/uxlfoundation/oneDNN","name":"oneDNN","owner":"uxlfoundation","description":"oneAPI Deep Neural Network Library (oneDNN)","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4055,"issues":1451,"created_at":"2016-05-09T23:26:42Z","updated_at":"2026-09-27T04:16:02Z","first_commit_at":"2016-07-07T14:16:42Z","last_commit_at":"2026-09-26T00:31:43Z","activity_months":122.62,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:33:57.197Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"uxlfoundation/oneDNN","visibility":"public","created_at":"2016-05-09T23:26:42Z","updated_at":"2026-09-27T04:16:02Z","private":false,"fork":false,"archived":false,"stargazers_count":4055,"open_issues_count":158,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3068","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17BF1DB:1BDFB1A:6AB92955"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3067","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:17E9E34:1C09F3C:6AB92955"},"commit":{"sha":"0282e6b26fae3be47aad6996a611cbcf99b29949","url":"https://github.com/uxlfoundation/oneDNN/commit/0282e6b26fae3be47aad6996a611cbcf99b29949","date":"2018-05-24T17:57:53Z","author_date":"2018-05-16T21:46:15Z","committer_date":"2018-05-24T17:57:53Z","tree_sha":"f1964c749e31cc999534cf3ce4c814fb8d230598","message_first_line":"benchdnn, cpu: rnn: gru: introduce GRU cell"},"tree_request_status":200,"tree_rate":{"github_remaining":"3066","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0866:A9DC0:17AAA02:1BCAF1B:6AB92955"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9894,"blob_sha":"154eaa426eab38189c30709b6745f6a2bbc36e15","priority":0},{"path":"doc/legal_information.md","size":1262,"blob_sha":"e060236fa0cb983a1e4ddeec6f0ed22c60edc63d","priority":1}],"documents":[{"path":"README.md","size":9894,"blob_sha":"154eaa426eab38189c30709b6745f6a2bbc36e15","priority":0,"status":200,"text":"> Intel MKL-DNN repository migrated to [https://github.com/intel/mkl-dnn](https://github.com/intel/mkl-dnn).\n> The old address will continue to be available and will redirect to the new repo.\n> Please update your links.\n\n# Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)\n![v0.14 beta](https://img.shields.io/badge/v0.14-beta-orange.svg)\n\nIntel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN) is\nan open source performance library for deep learning applications. The library\naccelerates deep learning applications and framework on Intel(R) architecture. \nIntel(R) MKL-DNN contains vectorized and threaded building blocks which you can\nuse to implement deep neural networks (DNN) with C and C++ interfaces.\n\nDNN functionality optimized for Intel architecture is also included in \n[Intel(R) Math Kernel Library (Intel(R) MKL)](https://software.intel.com/en-us/mkl/features/deep-neural-networks).\nAPI in this implementation is not compatible with Intel MKL-DNN and does not\ninclude certain new and experimental features.\n\nThis release contains performance critical functions that improve performance of\nof the following deep learning topologies and variations of these.\n\n| Application                               | Example topology\n|:---                                       |:---\n| Image recognition                         | AlexNet, VGG, GoogleNet, ResNet\n| Image segmenation                         | FCN, SegNet\n| Volumetric segmentation                   | 3D-Unet\n| Object detection                          | SSD, Faster R-CNN, Yolo\n| Neural Machine Translation (experimental) | GNMT\n| Speech Recognition (experimental)         | DeepSpeech\n\n\nIntel MKL-DNN is used in the the following software products:\n* [Caffe\\* Optimized for Intel Architecture](https://github.com/intel/caffe)\n* [DeepBench](https://github.com/baidu-research/DeepBench)\n* [PaddlePaddle\\*](http://www.paddlepaddle.org)\n* [Tensorflow\\*](https://www.tensorflow.org)\n* [Microsoft\\* Cognitive Toolkit (CNTK)](https://www.microsoft.com/en-us/cognitive-toolkit/)\n* [Apache\\* MXNet](https://mxnet.apache.org/)\n* [Intel(R) Computer Vision SDK](https://software.intel.com/en-us/computer-vision-sdk)\n* [Intel(R) Nervana(TM) Graph](https://github.com/NervanaSystems/ngraph)\n\n## License\nIntel MKL-DNN is licensed under\n[Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). This\nsoftware includes the following third party components:\n* [Xbyak](https://github.com/herumi/xbyak) distributed under [3-clause BSD licence](src/cpu/xbyak/COPYRIGHT)\n* [gtest](https://github.com/google/googletest) distributed under [3-clause BSD license](tests/gtests/gtest/LICENSE)\n\n## Documentation\n* [Introduction](https://intel.github.io/mkl-dnn) explains programming model\nand basic concepts\n* [Reference manual](https://intel.github.io/mkl-dnn/modules.html) provides\ndetailed functionality description\n* [Examples](https://github.com/intel/mkl-dnn/tree/master/examples) \ndemonstrate use of C and C++ APIs in simple topologies\n* [Tutorial](https://software.intel.com/en-us/articles/intel-mkl-dnn-part-1-library-overview-and-installation) \nprovides step by step installation instructions and an example walkthrough\n\n## Support\nPlease submit your questions, feature requests and bug reports on\n[GitHub issues](https://github.com/intel/mkl-dnn/issues) page.\n\n**WARNING** The following functionality has preview status and might change\nwithout prior notification in future releases:\n* Convolutions with `s16` data type in source, weights or destination\n* Convolutions and auxillary primitives for 3D spatial data\n* RNN, LSTM and GRU primitives\n\n## How to Contribute\nWe welcome community contributions to Intel MKL-DNN. If you have an idea how to improve the library:\n\n* Share your proposal via\n [GitHub issues](https://github.com/intel/mkl-dnn/issues).\n* Ensure you can build the product and run all the examples with your patch\n* In the case of a larger feature, create a test\n* Submit a [pull request](https://github.com/intel/mkl-dnn/pulls)\n\nWe will review your contribution and, if any additional fixes or modifications\nare necessary, may provide feedback to guide you. When accepted, your pull\nrequest will be merged the repository.\n\n## System Requirements\nIntel MKL-DNN supports Intel(R) 64 architecture and compatible architectures.\nThe library is optimized for the systems based on\n* Intel Atom(R) processor with Intel(R) SSE4.1 support\n* 4th, 5th, 6th and 7th generation Intel(R) Core processor\n* Intel(R) Xeon(R) processor E5 v3 family (formerly Haswell)\n* Intel Xeon processor E5 v4 family (formerly Broadwell)\n* Intel Xeon Platinum processor family (formerly Skylake)\n* Intel(R) Xeon Phi(TM) processor x200 product family (formerly Knights Landing)\n* Intel Xeon Phi processor x205 product family (formerly Knights Mill)\n\nand compatible processors.\n\nThe software dependencies are:\n* [Cmake](https://cmake.org/download/) 2.8.0 or later\n* [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html#srcbin) 1.8.5 or later\n* C++ compiler with C++11 standard support\n\nThe software was validated on RedHat\\* Enterprise Linux 7 with\n* GNU\\* Compiler Collection 4.8, 5.2, 6.1 and 7.2\n* Clang\\* 3.8.0\n* [Intel(R) C/C++ Compiler](https://software.intel.com/en-us/intel-parallel-studio-xe)\n  17.0 and 18.0\n\non Windows Server\\* 2012 R2 with\n* Microsoft\\* Visual C++ 14.0 (Visual Studio 2015)\n* [Intel(R) C/C++ Compiler](https://software.intel.com/en-us/intel-parallel-studio-xe)\n  17.0 and 18.0\n\non macOS\\* 10.13 (High Sierra) with\n* Apple LLVM version 9.0.0 (XCode 9.0.0)\n* [Intel C/C++ Compiler](https://software.intel.com/en-us/intel-parallel-studio-xe)\n  18.0 (XCode 8.3.2)\n\nThe implementation uses OpenMP\\* 4.0 SIMD extensions. We recommend using\nIntel(R) Compiler for the best performance results.\n\n## Installation\nDownload [Intel MKL-DNN source code](https://github.com/intel/mkl-dnn/archive/master.zip)\nor clone the repository to your system\n\n```\n\tgit clone https://github.com/intel/mkl-dnn.git\n```\n\nEnsure that all software dependencies are in place and have at least minimal\nsupported version.\n\nIntel MKL-DNN can take advantage of optimized\nmatrix-matrix multiplication (GEMM) function from Intel MKL. The dynamic\nlibrary with this functionality is included in the repository. If you choose \nto build Intel MKL-DNN with the binary dependency download Intel MKL small\nlibraries using provided script\n\n###### Linux/macOS\n```\n\tcd scripts && ./prepare_mkl.sh && cd ..\n```\n\n###### Windows\n```\n\tcd scripts && call prepare_mkl.bat && cd ..\n```\n\nor manually from [GitHub release section](https://github.com/intel/mkl-dnn/releases)\nand unpack it to the `external` directory in the repository root. \n\nYou can choose to build Intel MKL-DNN without binary dependency. The resulting\nversion will be fully functional, however performance of certain convolution\nshapes and sizes and inner product relying on SGEMM function may be suboptimal.\n\nIntel MKL-DNN uses a CMake-based build system\n\n```\n\tmkdir -p build && cd build && cmake .. && make\n```\n\nIntel MKL-DNN includes unit tests implemented using the googletest framework. To validate your build, run:\n\n```\n\tmake test\n```\n\nDocumentation is provided inline and can be generated in HTML format with Doxygen:\n\n```\n\tmake doc\n```\n\nDocumentation will reside in `build/reference/html` folder.\n\nFinally,\n```\n\tmake install\n```\nwill place the  header files, libraries and documentation in `/usr/local`. To change\nthe installation path, use the option `-DCMAKE_INSTALL_PREFIX=<prefix>` when invoking CMake.\n\n## Linking your application\nIntel MKL-DNN include several header files providing C and C++ APIs for \nthe functionality and several dynamic libraries depending on how Intel MKL-DNN\nwas built. Intel OpenMP runtime and Intel MKL small libraries are not installed\nfor standalone Intel MKL-DNN build.\n\n|File                   | Description\n|:---                   |:---\n|lib/libmkldnn.so       | Intel MKL-DNN dynamic library\n|lib/libiomp5.so        | Intel OpenMP* runtime library\n|lib/libmklml_gnu.so    | Intel MKL small library for GNU* OpenMP runtime\n|lib/libmklml_intel.so  | Intel MKL small library for Intel(R) OpenMP runtime\n|include/mkldnn.h       | C header\n|include/mkldnn.hpp     | C++ header\n|include/mkldnn_types.h | auxillary C header\n\nIntel MKL-DNN uses OpenMP* for parallelism and requires an OpenMP runtime \nlibrary to work. As different OpenMP runtimes may not be binary compatible\nit's important to ensure that only one OpenMP runtime is used throughout the\napplication. Having more than one OpenMP runtime initialized may lead to\nundefined behavior resulting in incorrect results or crashes.\n\nIntel MKL-DNN library built with binary dependency will link against Intel OpenMP\nruntime included with Intel MKL small libraries package. Intel OpenMP runtime\nis binary compatible with GNU OpenMP and CLANG OpenMP runtimes and is \nrecommended for the best performance results. Here are example linklines for \nGNU C++ compiler and Intel C++ compiler.\n```\n\tg++ -std=c++11 -I${MKLDNNROOT}/include -L${MKLDNNROOT}/lib simple_net.cpp -lmkldnn -lmklml_intel -liomp5\n```\n```\n\ticpc -std=c++11 -qopenmp -I${MKLDNNROOT}/include -L${MKLDNNROOT}/lib simple_net.cpp -lmkldnn -lmklml_intel\n```\nUsing GNU compiler with `-fopenmp` and `-liomp5` options will link the \napplication with both Intel and GNU OpenMP runtime libraries. This will lead\nto undefined behavior of the application.\n\nIntel MKL-DNN library built standalone will use OpenMP runtime supplied by\nthe compiler, so as long as both the library and the application use the\nsame compiler correct OpenMP runtime will be used. \n```\n\tg++ -std=c++11 -fopenmp -I${MKLDNNROOT}/include -L${MKLDNNROOT}/lib simple_net.cpp -lmkldnn\n```\n```\n\ticpc -std=c++11 -qopenmp -I${MKLDNNROOT}/include -L${MKLDNNROOT}/lib simple_net.cpp -lmkldnn\n```\n\n--------\n\n[Legal Information](doc/legal_information.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7AB6:40CE8:17AB4D:5CE17A:6AB921A5"},"text_sha256":"fdc9fa187d3e3361b87f416d3682fccd502c88f157ecc1295618e60b4ad40b56"},{"path":"doc/legal_information.md","size":1262,"blob_sha":"e060236fa0cb983a1e4ddeec6f0ed22c60edc63d","priority":1,"status":200,"text":"Legal Information {#legal_information}\n======================================\n\nNo license (express or implied, by estoppel or otherwise) to any intellectual\nproperty rights is granted by this document.\n\nIntel disclaims all express and implied warranties, including without\nlimitation, the implied warranties of merchantability, fitness\nfor a particular purpose, and non-infringement, as well as any warranty\narising from course of performance, course of dealing, or usage in trade.\n\nThis document contains information on products, services and/or processes in\ndevelopment. All information provided here is subject to change without\nnotice. Contact your Intel representative to obtain the latest forecast,\nschedule, specifications and roadmaps.\n\nThe products and services described may contain defects or errors which may\ncause deviations from published specifications. Current characterized errata \nare available on request.\n\nIntel, the Intel logo, Intel Atom, Intel Core, Intel Inside, the Intel Inside\nlogo, Intel Nervana, Intel Xeon Phi, Pentium, VTune and Xeon are trademarks \nof Intel Corporation or its subsidiaries in the U.S. and/or other countries.\n\n\\* Other names and brands may be claimed as the property of others.\n\n(C) 2016-2018, Intel Corporation.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CB54:3E1C8:178689:5CBC95:6AB921A4"},"text_sha256":"f84824a82710bdc12a5ba3822fa274a352f68881a1f2b393bd84c30b1c70a843"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3065","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E4:E80A6:1795C92:1BB6691:6AB92957"},"commit":{"sha":"febb31aa15b2a67a5d3584e11f3eb026f8b18574","url":"https://github.com/uxlfoundation/oneDNN/commit/febb31aa15b2a67a5d3584e11f3eb026f8b18574","date":"2026-06-30T23:42:28Z","author_date":"2026-06-25T23:40:01Z","committer_date":"2026-06-30T23:42:28Z","tree_sha":"1c1e94da15bbade0d63824abfc31ce7676b84155","message_first_line":"xe: gemm: jit: remove 512grf strategies"},"tree_request_status":200,"tree_rate":{"github_remaining":"3064","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EB:62B94:17AD0D9:1BCD79C:6AB92957"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22649,"blob_sha":"bd88e88bd33e7f75d91bb95f0f4181f38a7f3ee7","priority":0},{"path":"doc/legal_information.md","size":619,"blob_sha":"5f8dec0713948b96c753d541b4038ee61a9cc6fb","priority":1},{"path":"SECURITY.md","size":3389,"blob_sha":"279574c78fc2ef7f5d09cd09080f6aa313b3d203","priority":1}],"documents":[{"path":"README.md","size":22649,"blob_sha":"bd88e88bd33e7f75d91bb95f0f4181f38a7f3ee7","priority":0,"status":200,"text":"[![UXL Foundation Logo](https://github.com/uxlfoundation/artwork/blob/main/foundation/uxl-foundation-logo-horizontal-color.png)][UXL Foundation]\n\n# oneAPI Deep Neural Network Library (oneDNN)\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8762/badge)](https://www.bestpractices.dev/projects/8762)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/uxlfoundation/oneDNN/badge)](https://securityscorecards.dev/viewer/?uri=github.com/uxlfoundation/oneDNN)\n\noneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform\nperformance library of basic building blocks for deep learning applications.\noneDNN project is part of the [UXL Foundation] and is an implementation\nof the [oneAPI specification] for oneDNN component.\n\nThe library is optimized for Intel 64/AMD64 architecture based processors,\nArm(R) 64-bit Architecture (AArch64)-based processors, and Intel Graphics.\noneDNN has experimental support for the following architectures: NVIDIA\\* GPU,\nAMD\\* GPU, OpenPOWER\\* Power ISA (PPC64), IBMz\\* (s390x), and RISC-V.\n\noneDNN is intended for deep learning applications and framework\ndevelopers interested in improving application performance on CPUs and GPUs.\n\nDeep learning practitioners should use one of the applications enabled with oneDNN:\n\n* [Apache SINGA](https://singa.apache.org)\n* [DeepLearning4J\\*](https://deeplearning4j.konduit.ai)\n* [Flashlight\\*](https://github.com/flashlight/flashlight)\n* [llama.cpp](https://github.com/ggml-org/llama.cpp)\n* [ONNX Runtime](https://onnxruntime.ai)\n* [OpenNMT CTranslate2](https://github.com/OpenNMT/CTranslate2)\n* [OpenVINO(TM) toolkit](https://github.com/openvinotoolkit/openvino)\n* [PaddlePaddle\\*](http://www.paddlepaddle.org)\n* [PyTorch\\*](https://pytorch.org)\n* [Tensorflow\\*](https://www.tensorflow.org)\n\n[UXL Foundation]: http://www.uxlfoundation.org\n[oneAPI specification]: https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onednn/source/\n\n## Table of Contents\n\n- [Documentation](#documentation)\n- [System Requirements](#system-requirements)\n- [Installation](#installation)\n- [Validated Configurations](#validated-configurations)\n- [Governance](#governance)\n- [Support](#support)\n- [Contributing](#contributing)\n- [License](#license)\n- [Security](#security)\n- [Trademark Information](#trademark-information)\n\n## Documentation\n\n* [oneDNN Developer Guide and Reference] explains the programming\n  model, supported functionality, implementation details, and includes\n  annotated examples.\n* [API Reference] provides a comprehensive reference of the library\n  API.\n* [Release Notes] explain the new features, performance\n  optimizations, and improvements implemented in each version of\n  oneDNN.\n\n[oneDNN Developer Guide and Reference]: https://uxlfoundation.github.io/oneDNN\n[API Reference]: https://uxlfoundation.github.io/oneDNN/group_dnnl_api.html\n[Release Notes]: https://github.com/uxlfoundation/oneDNN/releases\n\n## System Requirements\n\noneDNN supports platforms based on the following architectures:\n- [Intel 64 or AMD64](https://en.wikipedia.org/wiki/X86-64),\n- [Arm 64-bit Architecture (AArch64)](https://developer.arm.com/architectures/cpu-architecture/a-profile).\n- [OpenPOWER](https://openpowerfoundation.org/) / [IBM Power ISA](https://en.wikipedia.org/wiki/Power_ISA).\n- [IBMz z/Architecture (s390x)](https://en.wikipedia.org/wiki/Z/Architecture).\n- [RISC-V 64-bit (RV64)](https://en.wikipedia.org/wiki/RISC-V).\n\n> **WARNING**\n>\n> Power ISA (PPC64), IBMz (s390x), and RISC-V (RV64) support is\n> **experimental** with limited testing validation.\n\nThe library is optimized for the following CPUs:\n* Intel 64/AMD64 architecture\n  * Intel Atom(R) processor (at least Intel SSE4.1 support is required)\n  * Intel Core(TM) processor (at least Intel SSE4.1 support is required)\n  * Intel Xeon(R) processor E3, E5, and E7 family (formerly Sandy Bridge,\n    Ivy Bridge, Haswell, and Broadwell)\n  * Intel Xeon Scalable processor (formerly Skylake, Cascade Lake, Cooper\n    Lake, Ice Lake, Sapphire Rapids, and Emerald Rapids)\n  * Intel Xeon CPU Max Series (formerly Sapphire Rapids HBM)\n  * Intel Core Ultra processors (formerly Meteor Lake, Arrow Lake,\n    Lunar Lake, and Panther Lake)\n  * Intel Xeon 6 processors (formerly Sierra Forest and Granite Rapids)\n  * future Intel Core processor with Intel AVX10.2 instruction set support\n    (code name Nova Lake)\n  * future Intel Xeon processor with Intel AVX10.2 instruction set support\n    (code name Diamond Rapids)\n* AArch64 architecture\n  * Arm Neoverse(TM) N1 and V1 processors\n\nOn a CPU based on Intel 64 or on AMD64 architecture, oneDNN detects\nthe instruction set architecture (ISA) at runtime and uses just-in-time (JIT)\ncode generation to deploy the code optimized for the latest supported ISA.\nFuture ISAs may have initial support in the library disabled by default and\nrequire the use of run-time controls to enable them. See\n[CPU dispatcher control] for more details.\n\n\n> **WARNING**\n>\n> On macOS, applications that use oneDNN may need to request special\n> entitlements if they use the hardened runtime. See the\n> [Linking Guide] for more details.\n\nThe library is optimized for the following GPUs:\n* Intel discrete GPUs:\n  * **[deprecated]** Intel Iris Xe MAX Graphics (formerly DG1)\n  * Intel Arc(TM) A-Series Graphics (formerly Alchemist)\n  * Intel Data Center GPU Flex Series (formerly Arctic Sound)\n  * Intel Data Center GPU Max Series (formerly Ponte Vecchio)\n  * Intel Arc B-Series Graphics and Intel Arc Pro B-Series Graphics\n   (formerly Battlemage)\n  * future discrete GPUs based on Xe3p-XPC architecture (code name Crescent Island)\n* Intel Graphics integrated with:\n  * **[deprecated]** 11th-14th Generation Intel Core Processors\n  * Intel Graphics for Intel Core Ultra Series 1 processors (formerly Meteor Lake)\n  * Intel Graphics for Intel Core Ultra Series 2 processors (formerly Arrow Lake and Lunar Lake)\n  * Intel Graphics for Intel Core Ultra Series 3 processors (formerly Panther Lake)\n  * Intel Graphics for Intel Core Series 3 processors (formerly Wildcat Lake)\n  * Intel Graphics for future Intel Core Ultra processors (code name Nova Lake)\n\n> **NOTE**\n> Optimizations for Intel Iris Xe MAX Graphics and Intel Graphics included with 11th-14th Generation Intel Core Processors are deprecated and will be removed in the future releases.\n\n[CPU dispatcher control]: https://uxlfoundation.github.io/oneDNN/dev_guide_cpu_dispatcher_control.html\n[Linking Guide]: https://uxlfoundation.github.io/oneDNN/dev_guide_link.html\n\n### Requirements for Building from Source\n\noneDNN supports systems meeting the following requirements:\n* Operating system with Intel 64/AMD64, AArch 64, PPC64, or s390x architecture support\n* C++ compiler with C++11 standard support\n* [CMake] 3.13 or later\n\nThe following tools are required to build oneDNN documentation:\n* [Doxygen] 1.8.5 or later\n* [Doxyrest] 2.1.2 or later\n* [Sphinx] 7.4.7 or later\n* [sphinx-book-theme] 1.2.0 or later\n* [sphinx-copybutton] 0.5.2 or later\n* [graphviz] 2.40.1\n\nConfigurations of CPU and GPU engines may introduce additional build time\ndependencies.\n\n[CMake]: https://cmake.org/download/\n[Doxygen]: http://www.doxygen.nl/download.html#srcbin\n[Doxyrest]: https://github.com/vovkos/doxyrest\n[Sphinx]: https://www.sphinx-doc.org/en/master/usage/installation.html\n[sphinx-book-theme]: https://sphinx-book-theme.readthedocs.io/en/latest\n[sphinx-copybutton]:https://sphinx-copybutton.readthedocs.io/en/latest/\n[graphviz]:https://www.linuxfromscratch.org/blfs/view/8.2/general/graphviz.html\n\n#### CPU Engine\n\noneDNN CPU engine is used to execute primitives on Intel 64/AMD64 based processors,\n64-bit Arm Architecture (AArch64) processors, 64-bit Power ISA (PPC64) processors,\nIBMz (s390x), and compatible devices.\n\nThe CPU engine is built by default but can be disabled at build time by setting\n`ONEDNN_CPU_RUNTIME` to `NONE`. In this case, GPU engine must be enabled.\nThe CPU engine can be configured to use the OpenMP, TBB or SYCL runtime.\nThe following additional requirements apply:\n* OpenMP runtime requires C++ compiler with OpenMP 2.0 or later\n  standard support\n* TBB runtime requires [Threading Building Blocks (TBB)] 2017 or later.\n* SYCL runtime requires\n  * [Intel oneAPI DPC++/C++ Compiler]\n  * [Threading Building Blocks (TBB)]\n\nSome implementations rely on OpenMP 4.0 SIMD extensions. For the best\nperformance results on Intel Architecture Processors we recommend using the\nIntel C++ Compiler.\n\n[Threading Building Blocks (TBB)]: https://www.threadingbuildingblocks.org/\n[Intel oneAPI DPC++/C++ Compiler]: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html\n\nOn a CPU based on Arm AArch64 architecture, oneDNN CPU engine can be built with\n[Arm Compute Library (ACL)] integration. ACL is an open-source library for\nmachine learning applications and provides AArch64 optimized implementations\nof core functions. This functionality currently requires that ACL is downloaded\nand built separately. See [Build from Source] section of the Developer Guide for\ndetails. The minimum supported version of ACL is 53.1.0.\n\n[Arm Compute Library (ACL)]: https://github.com/arm-software/ComputeLibrary\n\n#### GPU Engine\n\noneDNN GPU engine is used to execute primitives on various accelerators\nincluding Intel integrated and discrete GPUs, NVIDIA GPUs, AMD GPUs, and\nother devices supporting SYCL programming language. The GPU engine is disabled\nin the default build configuration and can be enabled by setting\n`ONEDNN_GPU_RUNTIME` build option to value other than `NONE`. Target accelerator\nvendor must be selected at build time using `ONEDNN_GPU_VENDOR` build option.\n\n> **WARNING**\n>\n> Linux will reset GPU when kernel runtime exceeds several seconds. The user\n> can prevent this behavior by [disabling hangcheck] for Intel GPU driver.\n> Windows has built-in [timeout detection and recovery] mechanism that results\n> in similar behavior. The user can prevent this behavior by increasing the\n> [TdrDelay] value.\n\nThe following additional requirements apply for Intel integrated and discrete\nGPUs:\n* With OpenCL(TM) runtime:\n  * OpenCL SDK (with OpenCL 1.2 support)\n  * Intel Graphics Driver with support for OpenCL C 2.0, Intel subgroups\n  support, and USM extensions support\n* With SYCL runtime:\n  * [Intel oneAPI DPC++/C++ Compiler]\n  * OpenCL SDK (with OpenCL 3.0 support)\n  * [oneAPI Level Zero] with support for API v1.11 or later\n  * Intel Graphics Driver with support for OpenCL C 2.0, Intel subgroups\n    support, and USM extensions support\n\nThe following additional requirements apply for NVIDIA GPUs:\n* [oneAPI DPC++ Compiler with support for CUDA] or [oneAPI for NVIDIA GPUs]\n* NVIDIA CUDA\\* driver\n* cuBLAS 10.1 or later\n* cuDNN 7.6 or later\n\n> **WARNING**\n>\n> NVIDIA GPU support is experimental. General information, build instructions,\n> and implementation limitations are available in the\n> [NVIDIA backend readme](src/gpu/nvidia/README.md).\n\nThe following additional requirements apply for AMD GPUs:\n* [oneAPI DPC++ Compiler with support for HIP AMD] or [oneAPI for AMD GPUs]\n* [AMD ROCm] version 5.3 or later\n* [MIOpen] version 2.18 or later (optional if AMD ROCm includes\n  the required version of MIOpen)\n* [rocBLAS] version 2.45.0 or later (optional if AMD ROCm includes\n  the required version of rocBLAS)\n\n> **WARNING**\n>\n> AMD GPU support is experimental. General information, build instructions,\n> and implementation limitations are available in the\n> [AMD backend readme](src/gpu/amd/README.md).\n\nOther devices supporting SYCL programming model require\noneAPI DPC++/C++ Compiler that supports the target GPU. Refer to\n[generic GPU vendor] documentation for additional details.\n\n[oneAPI Level Zero]: https://github.com/oneapi-src/level-zero\n[oneAPI DPC++ Compiler with support for CUDA]: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-nvidia-cuda\n[oneAPI for NVIDIA GPUs]: https://developer.codeplay.com/products/oneapi/nvidia/home\n[oneAPI DPC++ Compiler with support for HIP AMD]: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-hip-amd\n[oneAPI for AMD GPUs]: https://developer.codeplay.com/products/oneapi/amd/home/\n[AMD ROCm]: https://github.com/RadeonOpenCompute/ROCm\n[MIOpen]: https://github.com/ROCmSoftwarePlatform/MIOpen\n[rocBLAS]: https://github.com/ROCmSoftwarePlatform/rocBLAS\n[disabling hangcheck]: https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2023-0/gpu-disable-hangcheck.html\n[timeout detection and recovery]: https://learn.microsoft.com/en-us/windows-hardware/drivers/display/timeout-detection-and-recovery\n[TdrDelay]: https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys#tdrdelay\n[generic GPU vendor](src/gpu/generic/sycl/README.md)\n\n### Runtime Dependencies\n\nWhen oneDNN is built from source, the library runtime dependencies and specific\nversions are defined by the build environment.\n\n#### Linux\n\nCommon dependencies:\n* GNU C Library (`libc.so`)\n* GNU Standard C++ Library v3 (`libstdc++.so`)\n* Dynamic Linking Library (`libdl.so`)\n* C Math Library (`libm.so`)\n* POSIX Threads Library (`libpthread.so`)\n\nRuntime-specific dependencies:\n\n| Runtime configuration      | Compiler                      | Dependency\n| :------------------------- | :---------------------------- | :---------\n| `ONEDNN_CPU_RUNTIME=OMP`   | GCC                           | GNU OpenMP runtime (`libgomp.so`)\n| `ONEDNN_CPU_RUNTIME=OMP`   | Intel C/C++ Compiler          | Intel OpenMP runtime (`libiomp5.so`)\n| `ONEDNN_CPU_RUNTIME=OMP`   | Clang                         | Intel OpenMP runtime (`libiomp5.so`)\n| `ONEDNN_CPU_RUNTIME=TBB`   | any                           | TBB (`libtbb.so`)\n| `ONEDNN_CPU_RUNTIME=SYCL`  | Intel oneAPI DPC++ Compiler   | Intel oneAPI DPC++ Compiler runtime (`libsycl.so`), TBB (`libtbb.so`), OpenCL loader (`libOpenCL.so`)\n| `ONEDNN_GPU_RUNTIME=OCL`   | any                           | OpenCL loader (`libOpenCL.so`)\n| `ONEDNN_GPU_RUNTIME=SYCL`  | Intel oneAPI DPC++ Compiler   | Intel oneAPI DPC++ Compiler runtime (`libsycl.so`), OpenCL loader (`libOpenCL.so`), oneAPI Level Zero loader (`libze_loader.so`)\n| `ONEDNN_GPU_RUNTIME=ZE`    | any                           | oneAPI Level Zero loader (`libze_loader.so`)\n\n#### Windows\n\nCommon dependencies:\n* Microsoft Visual C++ Redistributable (`msvcrt.dll`)\n\nRuntime-specific dependencies:\n\n| Runtime configuration      | Compiler                      | Dependency\n| :------------------------- | :---------------------------- | :---------\n| `ONEDNN_CPU_RUNTIME=OMP`   | Microsoft Visual C++ Compiler | No additional requirements\n| `ONEDNN_CPU_RUNTIME=OMP`   | Intel C/C++ Compiler          | Intel OpenMP runtime (`iomp5.dll`)\n| `ONEDNN_CPU_RUNTIME=TBB`   | any                           | TBB (`tbb.dll`)\n| `ONEDNN_CPU_RUNTIME=SYCL`  | Intel oneAPI DPC++ Compiler   | Intel oneAPI DPC++ Compiler runtime (`sycl.dll`), TBB (`tbb.dll`), OpenCL loader (`OpenCL.dll`)\n| `ONEDNN_GPU_RUNTIME=OCL`   | any                           | OpenCL loader (`OpenCL.dll`)\n| `ONEDNN_GPU_RUNTIME=SYCL`  | Intel oneAPI DPC++ Compiler   | Intel oneAPI DPC++ Compiler runtime (`sycl.dll`), OpenCL loader (`OpenCL.dll`), oneAPI Level Zero loader (`ze_loader.dll`)\n| `ONEDNN_GPU_RUNTIME=ZE`    | any                           | oneAPI Level Zero loader (`ze_loader.dll`)\n\n#### macOS\n\nCommon dependencies:\n* System C/C++ runtime (`libc++.dylib`, `libSystem.dylib`)\n\nRuntime-specific dependencies:\n\n| Runtime configuration    | Compiler                      | Dependency\n| :----------------------- | :---------------------------- | :---------\n| `ONEDNN_CPU_RUNTIME=OMP` | Intel C/C++ Compiler          | Intel OpenMP runtime (`libiomp5.dylib`)\n| `ONEDNN_CPU_RUNTIME=TBB` | any                           | TBB (`libtbb.dylib`)\n\n## Installation\n\nYou can download and install the oneDNN library using one of the following options:\n\n- Binary Distribution: You can download pre-built binary packages from\n  the following sources:\n    - [conda-forge]: If the configuration you need is not available on\n      the conda-forge channel, you can build the library using the\n      Source Distribution.\n    - Intel oneAPI:\n       - [Intel® oneAPI Base Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.htm)\n       - [Intel® oneDNN standalone package](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onednn-download.html)\n\n- Source Distribution: You can build the library from source by\n  following the instructions on the [Build from Source] page.\n\n[conda-forge]: https://anaconda.org/conda-forge/onednn\n[System Requirements]: #system-requirements\n[Build Options]: https://uxlfoundation.github.io/oneDNN/dev_guide_build_options.html\n[Build from Source]: https://uxlfoundation.github.io/oneDNN/dev_guide_build.html\n\n## Validated Configurations\n\nx86-64 CPU engine was validated on RedHat\\* Enterprise Linux 8 with\n* GNU Compiler Collection 8.5, 9.5, 11.1, 11.3\n* Clang\\* 11.0, 14.0.6\n* [Intel oneAPI DPC++/C++ Compiler] 2025.1\n\non Windows Server\\* 2019 with\n* Microsoft Visual Studio 2022 with MSVC 19.43\n* [Intel oneAPI DPC++/C++ Compiler] 2025.1\n\non macOS 14 (Sonoma) with\n* Apple LLVM version 15.0\n\nAArch64 CPU engine was validated on Ubuntu 22.04 with\n* GNU Compiler Collection 10.0, 13.0\n* Clang\\* 17.0\n* [Arm Compiler for Linux] 24.04\n* [Arm Compute Library (ACL)] built for armv8-a arch, latest stable version\navailable at the time of release\n\non macOS 14 (Sonoma) with\n* Apple LLVM version 15.0\n\nGPU engine was validated on Ubuntu\\* 22.04 with\n* GNU Compiler Collection 8.5, and 9.5\n* Clang\\* 11.0\n* [Intel oneAPI DPC++/C++ Compiler] 2025.1\n* [Intel Software for General Purpose GPU capabilities] latest stable version\navailable at the time of release\n\non Windows Server\\* 2019 with\n* Microsoft Visual Studio 2022 with MSVC 19.43\n* [Intel oneAPI DPC++/C++ Compiler] 2025.1\n* [Intel Arc & Iris Xe Graphics Driver] latest stable version available at the\ntime of release\n\n[Intel Software for General Purpose GPU capabilities]: https://dgpu-docs.intel.com/index.html\n[Intel Arc & Iris Xe Graphics Driver]: https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html\n[Arm Compiler for Linux]: https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Linux\n\n## Support\n\nSubmit questions, feature requests, and bug reports on the\n[GitHub issues] page.\n\nYou can also contact oneDNN developers via [UXL Foundation Slack] using\n[#onednn] channel.\n\n[Github issues]: https://github.com/uxlfoundation/oneDNN/issues\n[UXL Foundation Slack]: https://slack-invite.uxlfoundation.org/\n[#onednn]: https://uxlfoundation.slack.com/channels/onednn\n\n## Governance\n\noneDNN project is governed by the [UXL Foundation] and you can get involved in\nthis project in multiple ways. It is possible to join the [AI Special Interest\nGroup (SIG)] meetings where the groups discuss and demonstrate work using this\nproject. Members can also join the Open Source and Specification Working Group\nmeetings.\n\nYou can also join the [mailing lists for the UXL Foundation] to be informed\nof when meetings are happening and receive the latest information and\ndiscussions.\n\n[AI Special Interest Group (SIG)]: https://github.com/uxlfoundation/foundation\n[mailing lists for the UXL Foundation]: https://lists.uxlfoundation.org/g/main/subgroups\n\n## Contributing\n\nWe welcome community contributions to oneDNN. You can find the oneDNN release\nschedule and work already in progress towards future milestones in Github's\n[Milestones] section. If you are looking for a specific task to start,\nconsider selecting from issues that are marked with the [help wanted] label.\n\n\nSee [contribution guidelines](CONTRIBUTING.md) to start contributing\nto oneDNN. You can also contact oneDNN developers and maintainers via\n[UXL Foundation Slack] using [#onednn] channel.\n\nThis project is intended to be a safe, welcoming space for\ncollaboration, and contributors are expected to adhere to the\n[Contributor Covenant](CODE_OF_CONDUCT.md) code of conduct.\n\n[RFC pull request]: https://github.com/uxlfoundation/oneDNN/tree/rfcs\n[code contribution guidelines]: CONTRIBUTING.md#code-contribution-guidelines\n[coding standards]: CONTRIBUTING.md#coding-standards\n[pull request]: https://github.com/uxlfoundation/oneDNN/pulls\n[Milestones]: https://github.com/uxlfoundation/oneDNN/milestones\n[help wanted]: https://github.com/uxlfoundation/oneDNN/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22\n\n## License\n\noneDNN is licensed under [Apache License Version 2.0](LICENSE). Refer\nto the \"[LICENSE](LICENSE)\" file for the full license text and\ncopyright notice.\n\nThis distribution includes third party software governed by separate\nlicense terms.\n\n3-clause BSD license:\n* [Xbyak](https://github.com/herumi/xbyak)\n* [gtest](https://github.com/google/googletest)\n* [Instrumentation and Tracing Technology API\n(ITT API)](https://github.com/intel/ittapi)\n* [CMake](https://github.com/Kitware/CMake)\n\n2-clause BSD license:\n* [Sphinx](https://www.sphinx-doc.org/)\n\nApache License Version 2.0:\n* [Xbyak_aarch64](https://github.com/fujitsu/xbyak_aarch64)\n* [OpenCL<sup>TM<\/sup> API Headers](https://github.com/KhronosGroup/OpenCL-Headers)\n\nBoost Software License, Version 1.0:\n* [Boost C++ Libraries](https://www.boost.org/)\n\nMIT License:\n* [Intel Graphics Compute Runtime for oneAPI Level Zero\nand OpenCL Driver](https://github.com/intel/compute-runtime)\n* [Intel Graphics Compiler](https://github.com/intel/intel-graphics-compiler)\n* [oneAPI Level Zero](https://github.com/oneapi-src/level-zero)\n* [Doxyrest](https://github.com/vovkos/doxyrest)\n* [Intel Metrics Discovery Application Programming\nInterface](https://github.com/intel/metrics-discovery)\n* [spdlog](https://github.com/gabime/spdlog)\n* [sphinx-copybutton](https://github.com/executablebooks/sphinx-copybutton)\n\nThis third-party software, even if included with the distribution of\nother software, may be governed by separate license terms,\nincluding without limitation, third party license terms, other\nsoftware license terms, and open source software license terms. These\nseparate license terms govern your use of the third party programs as\nset forth in the \"[THIRD-PARTY-PROGRAMS](THIRD-PARTY-PROGRAMS)\" file.\n\n## Security\n\n[Security Policy](SECURITY.md) outlines our guidelines and procedures\nfor ensuring the highest level of security and trust for our users\nwho consume oneDNN.\n\n-------------------------------------------------------------------------------\n\n[Legal Information](doc/legal_information.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C0A0:2C474:17A2E1:5CDA0E:6AB921A4"},"text_sha256":"feb0155c25a6b03db7f9a53bd742beb1e3fe253453006c0823dddfcaef5ce69b"},{"path":"doc/legal_information.md","size":619,"blob_sha":"5f8dec0713948b96c753d541b4038ee61a9cc6fb","priority":1,"status":200,"text":"# Legal Information {#legal_information}\n\n## Trademark Information\n\nIntel, the Intel logo, Arc, Intel Atom, Intel Core, Iris,\nOpenVINO, the OpenVINO logo, Pentium, VTune, and Xeon are trademarks\nof Intel Corporation or its subsidiaries.\n\nArm and Neoverse are trademarks, or registered trademarks of Arm Ltd.\n\nMicrosoft, Windows, and the Windows logo are trademarks, or registered\ntrademarks of Microsoft Corporation in the United States and/or other\ncountries.\n\nOpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission\nby Khronos.\n\n(*) Other names and brands may be claimed as the property of others.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6134:2E8679:17640D:5C98FD:6AB921A8"},"text_sha256":"96120ccf5f92549549f85dacad0791e652eb39ba0bf0f202159594a63d0ce230"},{"path":"SECURITY.md","size":3389,"blob_sha":"279574c78fc2ef7f5d09cd09080f6aa313b3d203","priority":1,"status":200,"text":"# Security Policy\nAs an open-source project, we understand the importance of and responsibility\nfor security. This Security policy outlines our guidelines and procedures for\nensuring the highest level of Security and trust for our users who consume\noneDNN.\n\n## Supported Versions\nWe regularly perform patch releases for the supported\n[latest version][1],\nwhich contain fixes for security vulnerabilities and important bugs. Prior\nreleases might receive critical security fixes on a best-effort basis; however,\nwe cannot guarantee that security fixes will get back-ported to these\nunsupported versions.\n\n## Report a Vulnerability\nWe are very grateful to the security researchers and users that report back\nsecurity vulnerabilities. We investigate every report thoroughly.\nWe strongly encourage you to report security vulnerabilities to us privately,\nbefore disclosing them on public forums or opening a public GitHub issue. \nReport a vulnerability to us in one of two ways:\n* Open a draft [**GitHub Security Advisory**][2]\n* Send e-mail to the following address: **security@uxlfoundation.org**.\nAlong with the report, please include the following info:\n  * A descriptive title.\n  * Your name and affiliation (if any).\n  * A description of the technical details of the vulnerabilities.\n  * A minimal example of the vulnerability so we can reproduce your findings.\n  * An explanation of who can exploit this vulnerability, and what they gain\n  when doing so. \n  * Whether this vulnerability is public or known to third parties. If it is,\n  please provide details.\n\n### When Should I Report a Vulnerability?\n* You think you discovered a potential security vulnerability in oneDNN.\n* You are unsure how the potential vulnerability affects oneDNN.\n* You think you discovered a vulnerability in another project or 3rd party\ncomponent on which oneDNN depends. If the issue is not fixed in the 3rd party\ncomponent, try to report directly there first.\n\n### When Should I NOT Report a Vulnerability?\n* You got an automated scan hit and are unable to provide details.\n* You need help using oneDNN for security.\n* You need help applying security-related updates.\n* Your issue is not security-related.\n\n## Security Reports Review Process\nOur goal is to respond quickly to your inquiry, and to coordinate a fix and\ndisclosure with you. All confirmed security vulnerabilities will be addressed\naccording to severity level and impact on oneDNN. Normally, security issues\nare fixed in the next planned release.\n\n## Disclosure Policy\nWe will publish security advisories using the \n[**GitHub Security Advisories feature**][3]\nto keep our community well-informed, and will credit you for your findings\nunless you prefer to stay anonymous. We request that you refrain from\nexploiting the vulnerability or making it public before the official disclosure.\n\nWe will disclose the vulnerabilities and/or bugs as soon as possible once\nmitigation is implemented and available. \n\n## Feedback on This Policy\nIf you have any suggestions on how this Policy could be improved, please submit\nan issue or a pull request to this repository. Please **do not** report\npotential vulnerabilities or security flaws via a pull request.\n\n[1]: https://github.com/uxlfoundation/oneDNN/releases/latest\n[2]: https://github.com/uxlfoundation/oneDNN/security/advisories/new\n[3]: https://github.com/uxlfoundation/oneDNN/security/advisories\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AFFE:3B6DE:16F3FF:5C2A94:6AB921A3"},"text_sha256":"49e35c678d4c78c967e81c74bdab1b401adc917da6f65bbf07055ef295b387b4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sksq96/pytorch-summary","input_row":{"repository":"sksq96/pytorch-summary","url":"https://github.com/sksq96/pytorch-summary","name":"pytorch-summary","owner":"sksq96","description":"Model summary in PyTorch similar to `model.summary()` in Keras","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4050,"issues":153,"created_at":"2018-04-23T13:58:04Z","updated_at":"2026-09-19T05:43:13Z","first_commit_at":"2018-04-23T13:59:55Z","last_commit_at":"2021-05-10T18:34:53Z","activity_months":36.57,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:01.930Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sksq96/pytorch-summary","visibility":"public","created_at":"2018-04-23T13:58:04Z","updated_at":"2026-09-19T05:43:13Z","private":false,"fork":false,"archived":false,"stargazers_count":4050,"open_issues_count":141,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3063","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:180FA7F:1C30099:6AB92959"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3062","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F1:180242:17E0A93:1C011AA:6AB9295A"},"commit":{"sha":"e9d72c03cb7ed00a92b33de9e4b2745d6df7b5e6","url":"https://github.com/sksq96/pytorch-summary/commit/e9d72c03cb7ed00a92b33de9e4b2745d6df7b5e6","date":"2018-05-22T09:53:26Z","author_date":"2018-05-22T09:53:26Z","committer_date":"2018-05-22T09:53:26Z","tree_sha":"aa5bb14d9c982b49f240c11771ed5e46011f7db0","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3061","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:17EC789:1C0D147:6AB9295A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5495,"blob_sha":"787868b0ce8ebaecc3211da8baee91052d3b2b24","priority":0}],"documents":[{"path":"README.md","size":5495,"blob_sha":"787868b0ce8ebaecc3211da8baee91052d3b2b24","priority":0,"status":200,"text":"## Keras style `model.summary()` in PyTorch\n[![PyPI version](https://badge.fury.io/py/torchsummary.svg)](https://badge.fury.io/py/torchsummary)\n\nKeras has a neat API to view the visualization of the model which is very helpful while debugging your network. Here is a barebone code to try and mimic the same in PyTorch. The aim is to provide information complementary to, what is not provided by `print(your_model)` in PyTorch.\n\n### Usage\n\n- `git clone https://github.com/Coderx7/pytorch-summary`\n\n```python\nfrom torchsummary import summary\nsummary(your_model, input_size=(channels, H, W))\n```\n\n- Note that the `input_size` is required to make a forward pass through the network.\n\n### Examples\n\n#### CNN for MNSIT\n\n```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchsummary import summary\n\nclass Net(nn.Module):\n    def __init__(self):\n        super(Net, self).__init__()\n        self.conv1 = nn.Conv2d(1, 10, kernel_size=5)\n        self.conv2 = nn.Conv2d(10, 20, kernel_size=5)\n        self.conv2_drop = nn.Dropout2d()\n        self.fc1 = nn.Linear(320, 50)\n        self.fc2 = nn.Linear(50, 10)\n\n    def forward(self, x):\n        x = F.relu(F.max_pool2d(self.conv1(x), 2))\n        x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))\n        x = x.view(-1, 320)\n        x = F.relu(self.fc1(x))\n        x = F.dropout(x, training=self.training)\n        x = self.fc2(x)\n        return F.log_softmax(x, dim=1)\n\nmodel = Net()\nif torch.cuda.is_available():\n    model.cuda()\n\nsummary(model, (1, 28, 28))\n```\n\n```\n----------------------------------------------------------------\n        Layer (type)               Output Shape         Param #\n================================================================\n            Conv2d-1           [-1, 10, 24, 24]             260\n            Conv2d-2             [-1, 20, 8, 8]            5,020\n         Dropout2d-3             [-1, 20, 8, 8]               0\n            Linear-4                   [-1, 50]           16,050\n            Linear-5                   [-1, 10]             510\n================================================================\nTotal params: 21,840\nTrainable params: 21,840\nNon-trainable params: 0\n----------------------------------------------------------------\n```\n\n\n#### VGG16\n\n\n```python\nimport torch\nfrom torchvision import models\nfrom torchsummary import summary\n\nvgg = models.vgg16()\nif torch.cuda.is_available():\n    vgg.cuda()\n\nsummary(vgg, (3, 224, 224))\n```\n\n\n\n```\n----------------------------------------------------------------\n        Layer (type)               Output Shape         Param #\n================================================================\n            Conv2d-1         [-1, 64, 224, 224]            1,792\n              ReLU-2         [-1, 64, 224, 224]               0\n            Conv2d-3         [-1, 64, 224, 224]           36,928\n              ReLU-4         [-1, 64, 224, 224]               0\n         MaxPool2d-5         [-1, 64, 112, 112]               0\n            Conv2d-6        [-1, 128, 112, 112]           73,856\n              ReLU-7        [-1, 128, 112, 112]               0\n            Conv2d-8        [-1, 128, 112, 112]          147,584\n              ReLU-9        [-1, 128, 112, 112]               0\n        MaxPool2d-10          [-1, 128, 56, 56]               0\n           Conv2d-11          [-1, 256, 56, 56]          295,168\n             ReLU-12          [-1, 256, 56, 56]               0\n           Conv2d-13          [-1, 256, 56, 56]          590,080\n             ReLU-14          [-1, 256, 56, 56]               0\n           Conv2d-15          [-1, 256, 56, 56]          590,080\n             ReLU-16          [-1, 256, 56, 56]               0\n        MaxPool2d-17          [-1, 256, 28, 28]               0\n           Conv2d-18          [-1, 512, 28, 28]         118,0160\n             ReLU-19          [-1, 512, 28, 28]               0\n           Conv2d-20          [-1, 512, 28, 28]         2,359,808\n             ReLU-21          [-1, 512, 28, 28]               0\n           Conv2d-22          [-1, 512, 28, 28]         2,359,808\n             ReLU-23          [-1, 512, 28, 28]               0\n        MaxPool2d-24          [-1, 512, 14, 14]               0\n           Conv2d-25          [-1, 512, 14, 14]         2,359,808\n             ReLU-26          [-1, 512, 14, 14]               0\n           Conv2d-27          [-1, 512, 14, 14]         2,359,808\n             ReLU-28          [-1, 512, 14, 14]               0\n           Conv2d-29          [-1, 512, 14, 14]         2,359,808\n             ReLU-30          [-1, 512, 14, 14]               0\n        MaxPool2d-31            [-1, 512, 7, 7]               0\n           Linear-32                 [-1, 4096]       102,764,544\n             ReLU-33                 [-1, 4096]               0\n          Dropout-34                 [-1, 4096]               0\n           Linear-35                 [-1, 4096]        16,781,312\n             ReLU-36                 [-1, 4096]               0\n          Dropout-37                 [-1, 4096]               0\n           Linear-38                 [-1, 1000]         4,097,000\n================================================================\nTotal params: 138,357,544\nTrainable params: 138,357,544\nNon-trainable params: 0\n----------------------------------------------------------------\n```\n\n\n### References\n\n- The code is borrowed from [this PyTorch issue](https://github.com/pytorch/pytorch/issues/2001).\n- Thanks to @ncullen93 and @HTLife. \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"89FC:29FD16:17D1B3:5D0945:6AB921A9"},"text_sha256":"5e017b14237d130e1dfa51d5c7d277930455c7dd338037facd3b01b489b22658"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3060","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D8:7580A:17EC7EC:1C0D1C1:6AB9295B"},"commit":{"sha":"345d898d84507b848e92dab4629e03405e19afce","url":"https://github.com/sksq96/pytorch-summary/commit/345d898d84507b848e92dab4629e03405e19afce","date":"2021-05-10T18:34:53Z","author_date":"2021-05-10T18:34:53Z","committer_date":"2021-05-10T18:34:53Z","tree_sha":"8a84f4e740a8b0a18b7bd32792559d67ef27edf5","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3059","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:1798E31:1BB967F:6AB9295B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7643,"blob_sha":"a673541da39a3975e792f820a2cd24d8dce6a793","priority":0}],"documents":[{"path":"README.md","size":7643,"blob_sha":"a673541da39a3975e792f820a2cd24d8dce6a793","priority":0,"status":200,"text":"## Use the new and updated [torchinfo](https://github.com/TylerYep/torchinfo).\n\n## Keras style `model.summary()` in PyTorch\n[![PyPI version](https://badge.fury.io/py/torchsummary.svg)](https://badge.fury.io/py/torchsummary)\n\nKeras has a neat API to view the visualization of the model which is very helpful while debugging your network. Here is a barebone code to try and mimic the same in PyTorch. The aim is to provide information complementary to, what is not provided by `print(your_model)` in PyTorch.\n\n### Usage\n\n- `pip install torchsummary` or \n- `git clone https://github.com/sksq96/pytorch-summary`\n\n```python\nfrom torchsummary import summary\nsummary(your_model, input_size=(channels, H, W))\n```\n\n- Note that the `input_size` is required to make a forward pass through the network.\n\n### Examples\n\n#### CNN for MNIST\n\n\n```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchsummary import summary\n\nclass Net(nn.Module):\n    def __init__(self):\n        super(Net, self).__init__()\n        self.conv1 = nn.Conv2d(1, 10, kernel_size=5)\n        self.conv2 = nn.Conv2d(10, 20, kernel_size=5)\n        self.conv2_drop = nn.Dropout2d()\n        self.fc1 = nn.Linear(320, 50)\n        self.fc2 = nn.Linear(50, 10)\n\n    def forward(self, x):\n        x = F.relu(F.max_pool2d(self.conv1(x), 2))\n        x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))\n        x = x.view(-1, 320)\n        x = F.relu(self.fc1(x))\n        x = F.dropout(x, training=self.training)\n        x = self.fc2(x)\n        return F.log_softmax(x, dim=1)\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\") # PyTorch v0.4.0\nmodel = Net().to(device)\n\nsummary(model, (1, 28, 28))\n```\n\n\n```\n----------------------------------------------------------------\n        Layer (type)               Output Shape         Param #\n================================================================\n            Conv2d-1           [-1, 10, 24, 24]             260\n            Conv2d-2             [-1, 20, 8, 8]           5,020\n         Dropout2d-3             [-1, 20, 8, 8]               0\n            Linear-4                   [-1, 50]          16,050\n            Linear-5                   [-1, 10]             510\n================================================================\nTotal params: 21,840\nTrainable params: 21,840\nNon-trainable params: 0\n----------------------------------------------------------------\nInput size (MB): 0.00\nForward/backward pass size (MB): 0.06\nParams size (MB): 0.08\nEstimated Total Size (MB): 0.15\n----------------------------------------------------------------\n```\n\n\n#### VGG16\n\n\n```python\nimport torch\nfrom torchvision import models\nfrom torchsummary import summary\n\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\nvgg = models.vgg16().to(device)\n\nsummary(vgg, (3, 224, 224))\n```\n\n\n```\n----------------------------------------------------------------\n        Layer (type)               Output Shape         Param #\n================================================================\n            Conv2d-1         [-1, 64, 224, 224]           1,792\n              ReLU-2         [-1, 64, 224, 224]               0\n            Conv2d-3         [-1, 64, 224, 224]          36,928\n              ReLU-4         [-1, 64, 224, 224]               0\n         MaxPool2d-5         [-1, 64, 112, 112]               0\n            Conv2d-6        [-1, 128, 112, 112]          73,856\n              ReLU-7        [-1, 128, 112, 112]               0\n            Conv2d-8        [-1, 128, 112, 112]         147,584\n              ReLU-9        [-1, 128, 112, 112]               0\n        MaxPool2d-10          [-1, 128, 56, 56]               0\n           Conv2d-11          [-1, 256, 56, 56]         295,168\n             ReLU-12          [-1, 256, 56, 56]               0\n           Conv2d-13          [-1, 256, 56, 56]         590,080\n             ReLU-14          [-1, 256, 56, 56]               0\n           Conv2d-15          [-1, 256, 56, 56]         590,080\n             ReLU-16          [-1, 256, 56, 56]               0\n        MaxPool2d-17          [-1, 256, 28, 28]               0\n           Conv2d-18          [-1, 512, 28, 28]       1,180,160\n             ReLU-19          [-1, 512, 28, 28]               0\n           Conv2d-20          [-1, 512, 28, 28]       2,359,808\n             ReLU-21          [-1, 512, 28, 28]               0\n           Conv2d-22          [-1, 512, 28, 28]       2,359,808\n             ReLU-23          [-1, 512, 28, 28]               0\n        MaxPool2d-24          [-1, 512, 14, 14]               0\n           Conv2d-25          [-1, 512, 14, 14]       2,359,808\n             ReLU-26          [-1, 512, 14, 14]               0\n           Conv2d-27          [-1, 512, 14, 14]       2,359,808\n             ReLU-28          [-1, 512, 14, 14]               0\n           Conv2d-29          [-1, 512, 14, 14]       2,359,808\n             ReLU-30          [-1, 512, 14, 14]               0\n        MaxPool2d-31            [-1, 512, 7, 7]               0\n           Linear-32                 [-1, 4096]     102,764,544\n             ReLU-33                 [-1, 4096]               0\n          Dropout-34                 [-1, 4096]               0\n           Linear-35                 [-1, 4096]      16,781,312\n             ReLU-36                 [-1, 4096]               0\n          Dropout-37                 [-1, 4096]               0\n           Linear-38                 [-1, 1000]       4,097,000\n================================================================\nTotal params: 138,357,544\nTrainable params: 138,357,544\nNon-trainable params: 0\n----------------------------------------------------------------\nInput size (MB): 0.57\nForward/backward pass size (MB): 218.59\nParams size (MB): 527.79\nEstimated Total Size (MB): 746.96\n----------------------------------------------------------------\n```\n\n\n#### Multiple Inputs\n\n\n```python\nimport torch\nimport torch.nn as nn\nfrom torchsummary import summary\n\nclass SimpleConv(nn.Module):\n    def __init__(self):\n        super(SimpleConv, self).__init__()\n        self.features = nn.Sequential(\n            nn.Conv2d(1, 1, kernel_size=3, stride=1, padding=1),\n            nn.ReLU(),\n        )\n\n    def forward(self, x, y):\n        x1 = self.features(x)\n        x2 = self.features(y)\n        return x1, x2\n    \ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\nmodel = SimpleConv().to(device)\n\nsummary(model, [(1, 16, 16), (1, 28, 28)])\n```\n\n\n```\n----------------------------------------------------------------\n        Layer (type)               Output Shape         Param #\n================================================================\n            Conv2d-1            [-1, 1, 16, 16]              10\n              ReLU-2            [-1, 1, 16, 16]               0\n            Conv2d-3            [-1, 1, 28, 28]              10\n              ReLU-4            [-1, 1, 28, 28]               0\n================================================================\nTotal params: 20\nTrainable params: 20\nNon-trainable params: 0\n----------------------------------------------------------------\nInput size (MB): 0.77\nForward/backward pass size (MB): 0.02\nParams size (MB): 0.00\nEstimated Total Size (MB): 0.78\n----------------------------------------------------------------\n```\n\n\n\n### References\n\n- The idea for this package sparked from [this PyTorch issue](https://github.com/pytorch/pytorch/issues/2001).\n- Thanks to @ncullen93 and @HTLife. \n- For Model Size Estimation @jacobkimmel ([details here](https://github.com/sksq96/pytorch-summary/pull/21))\n\n### License\n\n`pytorch-summary` is MIT-licensed.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE14:241B62:17391D:5C714D:6AB921AA"},"text_sha256":"6c724e28539ff0828a937e33b92ada4d0478fb3f90b14f369c7c6d56b6fd95a8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kenshohara/3D-ResNets-PyTorch","input_row":{"repository":"kenshohara/3D-ResNets-PyTorch","url":"https://github.com/kenshohara/3D-ResNets-PyTorch","name":"3D-ResNets-PyTorch","owner":"kenshohara","description":"3D ResNets for Action Recognition (CVPR 2018)","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4038,"issues":269,"created_at":"2017-09-14T12:14:44Z","updated_at":"2026-09-27T05:47:13Z","first_commit_at":"2017-09-14T12:14:45Z","last_commit_at":"2020-05-11T08:56:11Z","activity_months":31.859999999999999,"ai_ml_match_topics":"deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:04.539Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kenshohara/3D-ResNets-PyTorch","visibility":"public","created_at":"2017-09-14T12:14:44Z","updated_at":"2026-09-27T05:47:13Z","private":false,"fork":false,"archived":false,"stargazers_count":4038,"open_issues_count":154,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3058","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:1821D7E:1C422E6:6AB9295C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3057","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:184FA13:1C705E2:6AB9295C"},"commit":{"sha":"082b475cf745cb6afc08e7113eec67afef53634b","url":"https://github.com/kenshohara/3D-ResNets-PyTorch/commit/082b475cf745cb6afc08e7113eec67afef53634b","date":"2018-03-28T03:50:44Z","author_date":"2018-03-28T03:50:26Z","committer_date":"2018-03-28T03:50:44Z","tree_sha":"b57ccafc9487200519136f6dd88fef8f39cd6a6c","message_first_line":"fix bugs"},"tree_request_status":200,"tree_rate":{"github_remaining":"3056","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087D:767EB:17E0F8B:1C01E52:6AB9295D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9396,"blob_sha":"22669db4bf32f1d6d4b985538c10348034959a77","priority":0}],"documents":[{"path":"README.md","size":9396,"blob_sha":"22669db4bf32f1d6d4b985538c10348034959a77","priority":0,"status":200,"text":"# 3D ResNets for Action Recognition\n\n## Update (2018/2/21)\n\nOur paper \"Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?\" is accepted to CVPR2018!  \nWe update the paper information.\n\n## Update (2018/01/16)\n\nWe uploaded some of fine-tuned models on UCF-101 and HMDB-51.\n\n* ResNeXt-101 fine-tuned on UCF-101 (split1)\n* ResNeXt-101 (64 frame inputs) fine-tuned on UCF-101 (split1)\n* ResNeXt-101 fine-tuned on HMDB-51 (split1)\n* ResNeXt-101 (64 frame inputs) fine-tuned on HMDB-51 (split1)\n\n## Update (2017/11/27)\n\nWe published [a new paper](https://arxiv.org/abs/1711.09577) on arXiv.  \nWe also added the following new models and their Kinetics pretrained models in this repository.  \n\n* ResNet-50, 101, 152, 200\n* Pre-activation ResNet-200\n* Wide ResNet-50\n* ResNeXt-101\n* DenseNet-121, 201\n\nIn addition, we supported new datasets (UCF-101 and HDMB-51) and fine-tuning functions.\n\nSome minor changes are included.\n\n* Outputs are normalized by softmax in test.\n  * If you do not want to perform the normalization, please use ```--no_softmax_in_test``` option.\n\n## Summary\n\nThis is the PyTorch code for the following papers:\n\n[\nKensho Hara, Hirokatsu Kataoka, and Yutaka Satoh,  \n\"Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?\",  \narXiv preprint, arXiv:1711.09577, 2017. (accepted to CVPR2018)\n](https://arxiv.org/abs/1711.09577)\n\n[\nKensho Hara, Hirokatsu Kataoka, and Yutaka Satoh,  \n\"Learning Spatio-Temporal Features with 3D Residual Networks for Action Recognition\",  \nProceedings of the ICCV Workshop on Action, Gesture, and Emotion Recognition, 2017.\n](http://openaccess.thecvf.com/content_ICCV_2017_workshops/papers/w44/Hara_Learning_Spatio-Temporal_Features_ICCV_2017_paper.pdf)\n\nThis code includes training, fine-tuning and testing on Kinetics, ActivityNet, UCF-101, and HMDB-51.  \n**If you want to classify your videos or extract video features of them using our pretrained models,\nuse [this code](https://github.com/kenshohara/video-classification-3d-cnn-pytorch).**\n\n**The Torch (Lua) version of this code is available [here](https://github.com/kenshohara/3D-ResNets).**  \nNote that the Torch version only includes ResNet-18, 34, 50, 101, and 152.\n\n## Citation\n\nIf you use this code or pre-trained models, please cite the following:\n\n```bibtex\n@article{hara3dcnns,\n  author={Kensho Hara and Hirokatsu Kataoka and Yutaka Satoh},\n  title={Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?},\n  journal={arXiv preprint},\n  volume={arXiv:1711.09577},\n  year={2017},\n}\n```\n\n## Pre-trained models\n\nPre-trained models are available [here](https://drive.google.com/drive/folders/14KRBqT8ySfPtFSuLsFS2U4I-ihTDs0Y9?usp=sharing).  \nAll models are trained on Kinetics.  \nResNeXt-101 achieved the best performance in our experiments. (See [paper](https://arxiv.org/abs/1711.09577) in details.)\n\n```misc\nresnet-18-kinetics.pth: --model resnet --model_depth 18 --resnet_shortcut A\nresnet-34-kinetics.pth: --model resnet --model_depth 34 --resnet_shortcut A\nresnet-34-kinetics-cpu.pth: CPU ver. of resnet-34-kinetics.pth\nresnet-50-kinetics.pth: --model resnet --model_depth 50 --resnet_shortcut B\nresnet-101-kinetics.pth: --model resnet --model_depth 101 --resnet_shortcut B\nresnet-152-kinetics.pth: --model resnet --model_depth 152 --resnet_shortcut B\nresnet-200-kinetics.pth: --model resnet --model_depth 200 --resnet_shortcut B\npreresnet-200-kinetics.pth: --model preresnet --model_depth 200 --resnet_shortcut B\nwideresnet-50-kinetics.pth: --model wideresnet --model_depth 50 --resnet_shortcut B --wide_resnet_k 2\nresnext-101-kinetics.pth: --model resnext --model_depth 101 --resnet_shortcut B --resnext_cardinality 32\ndensenet-121-kinetics.pth: --model densenet --model_depth 121\ndensenet-201-kinetics.pth: --model densenet --model_depth 201\n```\n\nSome of fine-tuned models on UCF-101 and HMDB-51 (split 1) are also available.\n\n```misc\nresnext-101-kinetics-ucf101_split1.pth: --model resnext --model_depth 101 --resnet_shortcut B --resnext_cardinality 32\nresnext-101-64f-kinetics-ucf101_split1.pth: --model resnext --model_depth 101 --resnet_shortcut B --resnext_cardinality 32 --sample_duration 64\nresnext-101-kinetics-hmdb51_split1.pth: --model resnext --model_depth 101 --resnet_shortcut B --resnext_cardinality 32\nresnext-101-64f-kinetics-hmdb51_split1.pth: --model resnext --model_depth 101 --resnet_shortcut B --resnext_cardinality 32 --sample_duration 64\n```\n\n### Performance of the models on Kinetics\n\nThis table shows the averaged accuracies over top-1 and top-5 on Kinetics.\n\n| Method | Accuracies |\n|:---|:---:|\n| ResNet-18 | 66.1 |\n| ResNet-34 | 71.0 |\n| ResNet-50 | 72.2 |\n| ResNet-101 | 73.3 |\n| ResNet-152 | 73.7 |\n| ResNet-200 | 73.7 |\n| ResNet-200 (pre-act) | 73.4 |\n| Wide ResNet-50 | 74.7 |\n| ResNeXt-101 | 75.4 |\n| DenseNet-121 | 70.8 |\n| DenseNet-201 | 72.3 |\n\n## Requirements\n\n* [PyTorch](http://pytorch.org/)\n\n```bash\nconda install pytorch torchvision cuda80 -c soumith\n```\n\n* FFmpeg, FFprobe\n\n```bash\nwget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz\ntar xvf ffmpeg-release-64bit-static.tar.xz\ncd ./ffmpeg-3.3.3-64bit-static/; sudo cp ffmpeg ffprobe /usr/local/bin;\n```\n\n* Python 3\n\n## Preparation\n\n### ActivityNet\n\n* Download videos using [the official crawler](https://github.com/activitynet/ActivityNet/tree/master/Crawler).\n* Convert from avi to jpg files using ```utils/video_jpg.py```\n\n```bash\npython utils/video_jpg.py avi_video_directory jpg_video_directory\n```\n\n* Generate fps files using ```utils/fps.py```\n\n```bash\npython utils/fps.py avi_video_directory jpg_video_directory\n```\n\n### Kinetics\n\n* Download videos using [the official crawler](https://github.com/activitynet/ActivityNet/tree/master/Crawler/Kinetics).\n  * Locate test set in ```video_directory/test```.\n* Convert from avi to jpg files using ```utils/video_jpg_kinetics.py```\n\n```bash\npython utils/video_jpg_kinetics.py avi_video_directory jpg_video_directory\n```\n\n* Generate n_frames files using ```utils/n_frames_kinetics.py```\n\n```bash\npython utils/n_frames_kinetics.py jpg_video_directory\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```utils/kinetics_json.py```\n  * The CSV files (kinetics_{train, val, test}.csv) are included in the crawler.\n\n```bash\npython utils/kinetics_json.py train_csv_path val_csv_path test_csv_path dst_json_path\n```\n\n### UCF-101\n\n* Download videos and train/test splits [here](http://crcv.ucf.edu/data/UCF101.php).\n* Convert from avi to jpg files using ```utils/video_jpg_ucf101_hmdb51.py```\n\n```bash\npython utils/video_jpg_ucf101_hmdb51.py avi_video_directory jpg_video_directory\n```\n\n* Generate n_frames files using ```utils/n_frames_ucf101_hmdb51.py```\n\n```bash\npython utils/n_frames_ucf101_hmdb51.py jpg_video_directory\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```utils/ucf101_json.py```\n  * ```annotation_dir_path``` includes classInd.txt, trainlist0{1, 2, 3}.txt, testlist0{1, 2, 3}.txt\n\n```bash\npython utils/ucf101_json.py annotation_dir_path\n```\n\n### HMDB-51\n\n* Download videos and train/test splits [here](http://serre-lab.clps.brown.edu/resource/hmdb-a-large-human-motion-database/).\n* Convert from avi to jpg files using ```utils/video_jpg_ucf101_hmdb51.py```\n\n```bash\npython utils/video_jpg_ucf101_hmdb51.py avi_video_directory jpg_video_directory\n```\n\n* Generate n_frames files using ```utils/n_frames_ucf101_hmdb51.py```\n\n```bash\npython utils/n_frames_ucf101_hmdb51.py jpg_video_directory\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```utils/hmdb51_json.py```\n  * ```annotation_dir_path``` includes brush_hair_test_split1.txt, ...\n\n```bash\npython utils/hmdb51_json.py annotation_dir_path\n```\n\n## Running the code\n\nAssume the structure of data directories is the following:\n\n```misc\n~/\n  data/\n    kinetics_videos/\n      jpg/\n        .../ (directories of class names)\n          .../ (directories of video names)\n            ... (jpg files)\n    results/\n      save_100.pth\n    kinetics.json\n```\n\nConfirm all options.\n\n```bash\npython main.lua -h\n```\n\nTrain ResNets-34 on the Kinetics dataset (400 classes) with 4 CPU threads (for data loading).  \nBatch size is 128.  \nSave models at every 5 epochs.\nAll GPUs is used for the training.\nIf you want a part of GPUs, use ```CUDA_VISIBLE_DEVICES=...```.\n\n```bash\npython main.py --root_path ~/data --video_path kinetics_videos/jpg --annotation_path kinetics.json \\\n--result_path results --dataset kinetics --model resnet \\\n--model_depth 34 --n_classes 400 --batch_size 128 --n_threads 4 --checkpoint 5\n```\n\nContinue Training from epoch 101. (~/data/results/save_100.pth is loaded.)\n\n```bash\npython main.py --root_path ~/data --video_path kinetics_videos/jpg --annotation_path kinetics.json \\\n--result_path results --dataset kinetics --resume_path results/save_100.pth \\\n--model_depth 34 --n_classes 400 --batch_size 128 --n_threads 4 --checkpoint 5\n```\n\nFine-tuning conv5_x and fc layers of a pretrained model (~/data/models/resnet-34-kinetics.pth) on UCF-101.\n\n```bash\npython main.py --root_path ~/data --video_path ucf101_videos/jpg --annotation_path ucf101_01.json \\\n--result_path results --dataset ucf101 --n_classes 400 --n_finetune_classes 101 \\\n--pretrain_path models/resnet-34-kinetics.pth --ft_begin_index 4 \\\n--model resnet --model_depth 34 --resnet_shortcut A --batch_size 128 --n_threads 4 --checkpoint 5\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"847A:3B6DE:16F432:5C2B7B:6AB921AB"},"text_sha256":"c782e439ecaeb83a91a0788d340e53cb3d93fae4f81df9e3062af373d6bdea12"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3055","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:179619F:1BB6C82:6AB9295E"},"commit":{"sha":"540a0ea1abaee379fa3651d4d5afbd2d667a1f49","url":"https://github.com/kenshohara/3D-ResNets-PyTorch/commit/540a0ea1abaee379fa3651d4d5afbd2d667a1f49","date":"2020-05-11T08:56:11Z","author_date":"2020-05-11T08:56:11Z","committer_date":"2020-05-11T08:56:11Z","tree_sha":"93e6af46c3670562f671f9c8bf85b804510e8214","message_first_line":"fix link"},"tree_request_status":200,"tree_rate":{"github_remaining":"3054","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0906:180242:17E0D93:1C01512:6AB9295E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9675,"blob_sha":"e5ad46816899d23ef7b74d1730744fba9ca58154","priority":0}],"documents":[{"path":"README.md","size":9675,"blob_sha":"e5ad46816899d23ef7b74d1730744fba9ca58154","priority":0,"status":200,"text":"# 3D ResNets for Action Recognition\n\n## Update (2020/4/13)\n\nWe published a paper on arXiv.\n\n[\nHirokatsu Kataoka, Tenga Wakamiya, Kensho Hara, and Yutaka Satoh,  \n\"Would Mega-scale Datasets Further Enhance Spatiotemporal 3D CNNs\",  \narXiv preprint, arXiv:2004.04968, 2020.\n](https://arxiv.org/abs/2004.04968)\n\nWe uploaded the pretrained models described in this paper including ResNet-50 pretrained on the combined dataset with Kinetics-700 and Moments in Time.\n\n## Update (2020/4/10)\n\nWe significantly updated our scripts. If you want to use older versions to reproduce our CVPR2018 paper, you should use the scripts in the CVPR2018 branch.\n\nThis update includes as follows:\n* Refactoring whole project\n* Supporting the newer PyTorch versions\n* Supporting distributed training\n* Supporting training and testing on the Moments in Time dataset.\n* Adding R(2+1)D models\n* Uploading 3D ResNet models trained on the Kinetics-700, Moments in Time, and STAIR-Actions datasets\n\n## Summary\n\nThis is the PyTorch code for the following papers:\n\n[\nHirokatsu Kataoka, Tenga Wakamiya, Kensho Hara, and Yutaka Satoh,  \n\"Would Mega-scale Datasets Further Enhance Spatiotemporal 3D CNNs\",  \narXiv preprint, arXiv:2004.04968, 2020.\n](https://arxiv.org/abs/2004.04968)\n\n[\nKensho Hara, Hirokatsu Kataoka, and Yutaka Satoh,  \n\"Towards Good Practice for Action Recognition with Spatiotemporal 3D Convolutions\",  \nProceedings of the International Conference on Pattern Recognition, pp. 2516-2521, 2018.\n](https://ieeexplore.ieee.org/document/8546325)\n\n[\nKensho Hara, Hirokatsu Kataoka, and Yutaka Satoh,  \n\"Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?\",  \nProceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6546-6555, 2018.\n](http://openaccess.thecvf.com/content_cvpr_2018/html/Hara_Can_Spatiotemporal_3D_CVPR_2018_paper.html)\n\n[\nKensho Hara, Hirokatsu Kataoka, and Yutaka Satoh,  \n\"Learning Spatio-Temporal Features with 3D Residual Networks for Action Recognition\",  \nProceedings of the ICCV Workshop on Action, Gesture, and Emotion Recognition, 2017.\n](http://openaccess.thecvf.com/content_ICCV_2017_workshops/papers/w44/Hara_Learning_Spatio-Temporal_Features_ICCV_2017_paper.pdf)\n\nThis code includes training, fine-tuning and testing on Kinetics, Moments in Time, ActivityNet, UCF-101, and HMDB-51.\n\n## Citation\n\nIf you use this code or pre-trained models, please cite the following:\n\n```bibtex\n@inproceedings{hara3dcnns,\n  author={Kensho Hara and Hirokatsu Kataoka and Yutaka Satoh},\n  title={Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?},\n  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n  pages={6546--6555},\n  year={2018},\n}\n```\n\n## Pre-trained models\n\nPre-trained models are available [here](https://drive.google.com/open?id=1xbYbZ7rpyjftI_KCk6YuL-XrfQDz7Yd4).  \nAll models are trained on Kinetics-700 (_K_), Moments in Time (_M_), STAIR-Actions (_S_), or merged datasets of them (_KM_, _KS_, _MS_, _KMS_).  \nIf you want to finetune the models on your dataset, you should specify the following options.\n\n```misc\nr3d18_K_200ep.pth: --model resnet --model_depth 18 --n_pretrain_classes 700\nr3d18_KM_200ep.pth: --model resnet --model_depth 18 --n_pretrain_classes 1039\nr3d34_K_200ep.pth: --model resnet --model_depth 34 --n_pretrain_classes 700\nr3d34_KM_200ep.pth: --model resnet --model_depth 34 --n_pretrain_classes 1039\nr3d50_K_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 700\nr3d50_KM_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 1039\nr3d50_KMS_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 1139\nr3d50_KS_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 800\nr3d50_M_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 339\nr3d50_MS_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 439\nr3d50_S_200ep.pth: --model resnet --model_depth 50 --n_pretrain_classes 100\nr3d101_K_200ep.pth: --model resnet --model_depth 101 --n_pretrain_classes 700\nr3d101_KM_200ep.pth: --model resnet --model_depth 101 --n_pretrain_classes 1039\nr3d152_K_200ep.pth: --model resnet --model_depth 152 --n_pretrain_classes 700\nr3d152_KM_200ep.pth: --model resnet --model_depth 152 --n_pretrain_classes 1039\nr3d200_K_200ep.pth: --model resnet --model_depth 200 --n_pretrain_classes 700\nr3d200_KM_200ep.pth: --model resnet --model_depth 200 --n_pretrain_classes 1039\n```\n\nOld pretrained models are still available [here](https://drive.google.com/drive/folders/1zvl89AgFAApbH0At-gMuZSeQB_LpNP-M?usp=sharing).  \nHowever, some modifications are required to use the old pretrained models in the current scripts.\n\n## Requirements\n\n* [PyTorch](http://pytorch.org/) (ver. 0.4+ required)\n\n```bash\nconda install pytorch torchvision cudatoolkit=10.1 -c soumith\n```\n\n* FFmpeg, FFprobe\n\n* Python 3\n\n## Preparation\n\n### ActivityNet\n\n* Download videos using [the official crawler](https://github.com/activitynet/ActivityNet/tree/master/Crawler).\n* Convert from avi to jpg files using ```util_scripts/generate_video_jpgs.py```\n\n```bash\npython -m util_scripts.generate_video_jpgs mp4_video_dir_path jpg_video_dir_path activitynet\n```\n\n* Add fps infomartion into the json file ```util_scripts/add_fps_into_activitynet_json.py```\n\n```bash\npython -m util_scripts.add_fps_into_activitynet_json mp4_video_dir_path json_file_path\n```\n\n### Kinetics\n\n* Download videos using [the official crawler](https://github.com/activitynet/ActivityNet/tree/master/Crawler/Kinetics).\n  * Locate test set in ```video_directory/test```.\n* Convert from avi to jpg files using ```util_scripts/generate_video_jpgs.py```\n\n```bash\npython -m util_scripts.generate_video_jpgs mp4_video_dir_path jpg_video_dir_path kinetics\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```util_scripts/kinetics_json.py```\n  * The CSV files (kinetics_{train, val, test}.csv) are included in the crawler.\n\n```bash\npython -m util_scripts.kinetics_json csv_dir_path 700 jpg_video_dir_path jpg dst_json_path\n```\n\n### UCF-101\n\n* Download videos and train/test splits [here](http://crcv.ucf.edu/data/UCF101.php).\n* Convert from avi to jpg files using ```util_scripts/generate_video_jpgs.py```\n\n```bash\npython -m util_scripts.generate_video_jpgs avi_video_dir_path jpg_video_dir_path ucf101\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```util_scripts/ucf101_json.py```\n  * ```annotation_dir_path``` includes classInd.txt, trainlist0{1, 2, 3}.txt, testlist0{1, 2, 3}.txt\n\n```bash\npython -m util_scripts.ucf101_json annotation_dir_path jpg_video_dir_path dst_json_path\n```\n\n### HMDB-51\n\n* Download videos and train/test splits [here](http://serre-lab.clps.brown.edu/resource/hmdb-a-large-human-motion-database/).\n* Convert from avi to jpg files using ```util_scripts/generate_video_jpgs.py```\n\n```bash\npython -m util_scripts.generate_video_jpgs avi_video_dir_path jpg_video_dir_path hmdb51\n```\n\n* Generate annotation file in json format similar to ActivityNet using ```util_scripts/hmdb51_json.py```\n  * ```annotation_dir_path``` includes brush_hair_test_split1.txt, ...\n\n```bash\npython -m util_scripts.hmdb51_json annotation_dir_path jpg_video_dir_path dst_json_path\n```\n\n## Running the code\n\nAssume the structure of data directories is the following:\n\n```misc\n~/\n  data/\n    kinetics_videos/\n      jpg/\n        .../ (directories of class names)\n          .../ (directories of video names)\n            ... (jpg files)\n    results/\n      save_100.pth\n    kinetics.json\n```\n\nConfirm all options.\n\n```bash\npython main.py -h\n```\n\nTrain ResNets-50 on the Kinetics-700 dataset (700 classes) with 4 CPU threads (for data loading).  \nBatch size is 128.  \nSave models at every 5 epochs.\nAll GPUs is used for the training.\nIf you want a part of GPUs, use ```CUDA_VISIBLE_DEVICES=...```.\n\n```bash\npython main.py --root_path ~/data --video_path kinetics_videos/jpg --annotation_path kinetics.json \\\n--result_path results --dataset kinetics --model resnet \\\n--model_depth 50 --n_classes 700 --batch_size 128 --n_threads 4 --checkpoint 5\n```\n\nContinue Training from epoch 101. (~/data/results/save_100.pth is loaded.)\n\n```bash\npython main.py --root_path ~/data --video_path kinetics_videos/jpg --annotation_path kinetics.json \\\n--result_path results --dataset kinetics --resume_path results/save_100.pth \\\n--model_depth 50 --n_classes 700 --batch_size 128 --n_threads 4 --checkpoint 5\n```\n\nCalculate top-5 class probabilities of each video using a trained model (~/data/results/save_200.pth.)  \nNote that ```inference_batch_size``` should be small because actual batch size is calculated by ```inference_batch_size * (n_video_frames / inference_stride)```.\n\n```bash\npython main.py --root_path ~/data --video_path kinetics_videos/jpg --annotation_path kinetics.json \\\n--result_path results --dataset kinetics --resume_path results/save_200.pth \\\n--model_depth 50 --n_classes 700 --n_threads 4 --no_train --no_val --inference --output_topk 5 --inference_batch_size 1\n```\n\nEvaluate top-1 video accuracy of a recognition result (~/data/results/val.json).\n\n```bash\npython -m util_scripts.eval_accuracy ~/data/kinetics.json ~/data/results/val.json --subset val -k 1 --ignore\n```\n\nFine-tune fc layers of a pretrained model (~/data/models/resnet-50-kinetics.pth) on UCF-101.\n\n```bash\npython main.py --root_path ~/data --video_path ucf101_videos/jpg --annotation_path ucf101_01.json \\\n--result_path results --dataset ucf101 --n_classes 101 --n_pretrain_classes 700 \\\n--pretrain_path models/resnet-50-kinetics.pth --ft_begin_module fc \\\n--model resnet --model_depth 50 --batch_size 128 --n_threads 4 --checkpoint 5\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F8C:4F9CC:16B989:5BEF21:6AB921AE"},"text_sha256":"2f5f477955e00f88defe0c8f552efb4b7e1153972d9b05c3e4caf22ea99e7f1c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ikostrikov/pytorch-a2c-ppo-acktr-gail","input_row":{"repository":"ikostrikov/pytorch-a2c-ppo-acktr-gail","url":"https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail","name":"pytorch-a2c-ppo-acktr-gail","owner":"ikostrikov","description":"PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL).","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3903,"issues":234,"created_at":"2017-08-22T15:57:25Z","updated_at":"2026-09-27T07:36:01Z","first_commit_at":"2017-09-07T23:45:57Z","last_commit_at":"2021-11-24T23:48:29Z","activity_months":50.560000000000002,"ai_ml_match_topics":"deep-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:07.417Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ikostrikov/pytorch-a2c-ppo-acktr-gail","visibility":"public","created_at":"2017-08-22T15:57:25Z","updated_at":"2026-09-27T07:36:01Z","private":false,"fork":false,"archived":false,"stargazers_count":3903,"open_issues_count":93,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3053","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:1772D14:1B93679:6AB9295F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3052","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17AD6DD:1BCDE6F:6AB9295F"},"commit":{"sha":"552eb86bbc3e338a898d4adcc506d63fdbabebe0","url":"https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail/commit/552eb86bbc3e338a898d4adcc506d63fdbabebe0","date":"2018-05-22T01:33:44Z","author_date":"2018-05-22T01:33:44Z","committer_date":"2018-05-22T01:33:44Z","tree_sha":"98c5f34f142b6a3f5a24a908a8a679fc72c50025","message_first_line":"Remove unnecessary indexing"},"tree_request_status":200,"tree_rate":{"github_remaining":"3051","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:17F6054:1C16D6D:6AB92960"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6597,"blob_sha":"08476132d500c9b082fb678f01e33dc05f3cae82","priority":0}],"documents":[{"path":"README.md","size":6597,"blob_sha":"08476132d500c9b082fb678f01e33dc05f3cae82","priority":0,"status":200,"text":"# pytorch-a2c-ppo-acktr\n\n## Update 10/06/2017: added enjoy.py and a link to pretrained models!\n## Update 09/27/2017: now supports both Atari and MuJoCo/Roboschool!\n\nThis is a PyTorch implementation of\n* Advantage Actor Critic (A2C), a synchronous deterministic version of [A3C](https://arxiv.org/pdf/1602.01783v1.pdf)\n* Proximal Policy Optimization [PPO](https://arxiv.org/pdf/1707.06347.pdf)\n* Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation [ACKTR](https://arxiv.org/abs/1708.05144)\n\nAlso see the OpenAI posts: [A2C/ACKTR](https://blog.openai.com/baselines-acktr-a2c/) and [PPO](https://blog.openai.com/openai-baselines-ppo/) for more information.\n\nThis implementation is inspired by the OpenAI baselines for [A2C](https://github.com/openai/baselines/tree/master/baselines/a2c), [ACKTR](https://github.com/openai/baselines/tree/master/baselines/acktr) and [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo1). It uses the same hyper parameters and the model since they were well tuned for Atari games.\n\nPlease use this bibtex if you want to cite this repository in your publications:\n\n    @misc{pytorchrl,\n      author = {Kostrikov, Ilya},\n      title = {PyTorch Implementations of Reinforcement Learning Algorithms},\n      year = {2018},\n      publisher = {GitHub},\n      journal = {GitHub repository},\n      howpublished = {\\url{https://github.com/ikostrikov/pytorch-a2c-ppo-acktr}},\n    }\n\n## Supported (and tested) environments (via [OpenAI Gym](https://gym.openai.com))\n* [Atari Learning Environment](https://github.com/mgbellemare/Arcade-Learning-Environment)\n* [MuJoCo](http://mujoco.org)\n* [PyBullet](http://pybullet.org) (including Racecar, Minitaur and Kuka)\n* [DeepMind Control Suite](https://github.com/deepmind/dm_control) (via [dm_control2gym](https://github.com/martinseilair/dm_control2gym))\n\nI highly recommend PyBullet as a free open source alternative to MuJoCo for continuous control tasks.\n\nAll environments are operated using exactly the same Gym interface. See their documentations for a comprehensive list.\n\nTo use the DeepMind Control Suite environments, set the flag `--env-name dm.<domain_name>.<task_name>`, where `domain_name` and `task_name` are the name of a domain (e.g. `hopper`) and a task within that domain (e.g. `stand`) from the DeepMind Control Suite. Refer to their repo and their [tech report](https://arxiv.org/abs/1801.00690) for a full list of available domains and tasks. Other than setting the task, the API for interacting with the environment is exactly the same as for all the Gym environments thanks to [dm_control2gym](https://github.com/martinseilair/dm_control2gym).\n\n## Requirements\n\n* Python 3 (it might work with Python 2, but I didn't test it)\n* [PyTorch](http://pytorch.org/)\n* [Visdom](https://github.com/facebookresearch/visdom)\n* [OpenAI baselines](https://github.com/openai/baselines)\n\nIn order to install requirements, follow:\n\n```bash\n# PyTorch\nconda install pytorch torchvision -c soumith\n\n# Baselines for Atari preprocessing\ngit clone https://github.com/openai/baselines.git\ncd baselines\npip install -e .\n\n# Other requirements\npip install -r requirements.txt\n```\n\n## Contributions\n\nContributions are very welcome. If you know how to make this code better, please open an issue. If you want to submit a pull request, please open an issue first. Also see a todo list below.\n\nAlso I'm searching for volunteers to run all experiments on Atari and MuJoCo (with multiple random seeds).\n\n## Disclaimer\n\nIt's extremely difficult to reproduce results for Reinforcement Learning methods. See [\"Deep Reinforcement Learning that Matters\"](https://arxiv.org/abs/1709.06560) for more information. I tried to reproduce OpenAI results as closely as possible. However, majors differences in performance can be caused even by minor differences in TensorFlow and PyTorch libraries.\n\n### TODO\n* Improve this README file. Rearrange images.\n* Improve performance of KFAC, see kfac.py for more information\n* Run evaluation for all games and algorithms\n\n## Training\n\nStart a `Visdom` server with `python -m visdom.server`, it will serve `http://localhost:8097/` by default.\n\n### Atari\n#### A2C\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\"\n```\n\n#### PPO\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\" --algo ppo --use-gae --lr 2.5e-4 --clip-param 0.1 --value-loss-coef 1 --num-processes 8 --num-steps 128 --num-mini-batch 4 --vis-interval 1 --log-interval 1\n```\n\n#### ACKTR\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\" --algo acktr --num-processes 32 --num-steps 20\n```\n\n### MuJoCo\n\nI **highly** recommend to use --add-timestep argument with some mujoco environments (for example, Reacher) despite it's not a default option with OpenAI implementations.\n\n#### A2C\n\n```bash\npython main.py --env-name \"Reacher-v2\" --num-stack 1 --num-frames 1000000\n```\n\n#### PPO\n\n```bash\npython main.py --env-name \"Reacher-v2\" --algo ppo --use-gae --vis-interval 1  --log-interval 1 --num-stack 1 --num-steps 2048 --num-processes 1 --lr 3e-4 --entropy-coef 0 --value-loss-coef 1 --ppo-epoch 10 --num-mini-batch 32 --gamma 0.99 --tau 0.95 --num-frames 1000000\n```\n\n#### ACKTR\n\nACKTR requires some modifications to be made specifically for MuJoCo. But at the moment, I want to keep this code as unified as possible. Thus, I'm going for better ways to integrate it into the codebase.\n\n## Enjoy\n\nLoad a pretrained model from [my Google Drive](https://drive.google.com/open?id=0Bw49qC_cgohKS3k2OWpyMWdzYkk).\n\nAlso pretrained models for other games are available on request. Send me an email or create an issue, and I will upload it.\n\nDisclaimer: I might have used different hyper-parameters to train these models.\n\n### Atari\n\n```bash\npython enjoy.py --load-dir trained_models/a2c --env-name \"PongNoFrameskip-v4\" --num-stack 4\n```\n\n### MuJoCo\n\n```bash\npython enjoy.py --load-dir trained_models/ppo --env-name \"Reacher-v1\" --num-stack 1\n```\n\n## Results\n\n### A2C\n\n![BreakoutNoFrameskip-v4](imgs/a2c_breakout.png)\n\n![SeaquestNoFrameskip-v4](imgs/a2c_seaquest.png)\n\n![QbertNoFrameskip-v4](imgs/a2c_qbert.png)\n\n![beamriderNoFrameskip-v4](imgs/a2c_beamrider.png)\n\n### PPO\n\n\n![BreakoutNoFrameskip-v4](imgs/ppo_halfcheetah.png)\n\n![SeaquestNoFrameskip-v4](imgs/ppo_hopper.png)\n\n![QbertNoFrameskip-v4](imgs/ppo_reacher.png)\n\n![beamriderNoFrameskip-v4](imgs/ppo_walker.png)\n\n\n### ACKTR\n\n![BreakoutNoFrameskip-v4](imgs/acktr_breakout.png)\n\n![SeaquestNoFrameskip-v4](imgs/acktr_seaquest.png)\n\n![QbertNoFrameskip-v4](imgs/acktr_qbert.png)\n\n![beamriderNoFrameskip-v4](imgs/acktr_beamrider.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C2A4:A58F2:16FC34:5C34E3:6AB921AF"},"text_sha256":"821bc994ac03f865995027faabaf6b04fe8f7367df87116b95d7f58df55d1597"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3050","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17BB293:1BDBC9A:6AB92960"},"commit":{"sha":"41332b78dfb50321c29bade65f9d244387f68a60","url":"https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail/commit/41332b78dfb50321c29bade65f9d244387f68a60","date":"2021-11-24T23:48:29Z","author_date":"2021-11-24T23:48:29Z","committer_date":"2021-11-24T23:48:29Z","tree_sha":"e0c8439b016e85e3853a3141fc175e7db3e7c905","message_first_line":"Merge pull request #285 from lijiyao919/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3049","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0811:767EB:17E1233:1C0216C:6AB92961"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6460,"blob_sha":"365555890a20592fcb0d8845055e06f32d94a887","priority":0}],"documents":[{"path":"README.md","size":6460,"blob_sha":"365555890a20592fcb0d8845055e06f32d94a887","priority":0,"status":200,"text":"# pytorch-a2c-ppo-acktr\n\n## Update (April 12th, 2021)\n\nPPO is great, but [Soft Actor Critic](https://arxiv.org/abs/1812.05905) can be better for many continuous control tasks. Please check out [my new RL](http://github.com/ikostrikov/jax-rl) repository in jax.\n\n## Please use hyper parameters from this readme. With other hyper parameters things might not work (it's RL after all)!\n\nThis is a PyTorch implementation of\n* Advantage Actor Critic (A2C), a synchronous deterministic version of [A3C](https://arxiv.org/pdf/1602.01783v1.pdf)\n* Proximal Policy Optimization [PPO](https://arxiv.org/pdf/1707.06347.pdf)\n* Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation [ACKTR](https://arxiv.org/abs/1708.05144)\n* Generative Adversarial Imitation Learning [GAIL](https://arxiv.org/abs/1606.03476)\n\nAlso see the OpenAI posts: [A2C/ACKTR](https://blog.openai.com/baselines-acktr-a2c/) and [PPO](https://blog.openai.com/openai-baselines-ppo/) for more information.\n\nThis implementation is inspired by the OpenAI baselines for [A2C](https://github.com/openai/baselines/tree/master/baselines/a2c), [ACKTR](https://github.com/openai/baselines/tree/master/baselines/acktr) and [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo1). It uses the same hyper parameters and the model since they were well tuned for Atari games.\n\nPlease use this bibtex if you want to cite this repository in your publications:\n\n    @misc{pytorchrl,\n      author = {Kostrikov, Ilya},\n      title = {PyTorch Implementations of Reinforcement Learning Algorithms},\n      year = {2018},\n      publisher = {GitHub},\n      journal = {GitHub repository},\n      howpublished = {\\url{https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail}},\n    }\n\n## Supported (and tested) environments (via [OpenAI Gym](https://gym.openai.com))\n* [Atari Learning Environment](https://github.com/mgbellemare/Arcade-Learning-Environment)\n* [MuJoCo](http://mujoco.org)\n* [PyBullet](http://pybullet.org) (including Racecar, Minitaur and Kuka)\n* [DeepMind Control Suite](https://github.com/deepmind/dm_control) (via [dm_control2gym](https://github.com/martinseilair/dm_control2gym))\n\nI highly recommend PyBullet as a free open source alternative to MuJoCo for continuous control tasks.\n\nAll environments are operated using exactly the same Gym interface. See their documentations for a comprehensive list.\n\nTo use the DeepMind Control Suite environments, set the flag `--env-name dm.<domain_name>.<task_name>`, where `domain_name` and `task_name` are the name of a domain (e.g. `hopper`) and a task within that domain (e.g. `stand`) from the DeepMind Control Suite. Refer to their repo and their [tech report](https://arxiv.org/abs/1801.00690) for a full list of available domains and tasks. Other than setting the task, the API for interacting with the environment is exactly the same as for all the Gym environments thanks to [dm_control2gym](https://github.com/martinseilair/dm_control2gym).\n\n## Requirements\n\n* Python 3 (it might work with Python 2, but I didn't test it)\n* [PyTorch](http://pytorch.org/)\n* [Stable baselines3](https://github.com/DLR-RM/stable-baselines3)\n\nIn order to install requirements, follow:\n\n```bash\n# PyTorch\nconda install pytorch torchvision -c soumith\n\n# Other requirements\npip install -r requirements.txt\n\n# Gym Atari\nconda install -c conda-forge gym-atari\n```\n\n## Contributions\n\nContributions are very welcome. If you know how to make this code better, please open an issue. If you want to submit a pull request, please open an issue first. Also see a todo list below.\n\nAlso I'm searching for volunteers to run all experiments on Atari and MuJoCo (with multiple random seeds).\n\n## Disclaimer\n\nIt's extremely difficult to reproduce results for Reinforcement Learning methods. See [\"Deep Reinforcement Learning that Matters\"](https://arxiv.org/abs/1709.06560) for more information. I tried to reproduce OpenAI results as closely as possible. However, majors differences in performance can be caused even by minor differences in TensorFlow and PyTorch libraries.\n\n### TODO\n* Improve this README file. Rearrange images.\n* Improve performance of KFAC, see kfac.py for more information\n* Run evaluation for all games and algorithms\n\n## Visualization\n\nIn order to visualize the results use ```visualize.ipynb```.\n\n\n## Training\n\n### Atari\n#### A2C\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\"\n```\n\n#### PPO\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\" --algo ppo --use-gae --lr 2.5e-4 --clip-param 0.1 --value-loss-coef 0.5 --num-processes 8 --num-steps 128 --num-mini-batch 4 --log-interval 1 --use-linear-lr-decay --entropy-coef 0.01\n```\n\n#### ACKTR\n\n```bash\npython main.py --env-name \"PongNoFrameskip-v4\" --algo acktr --num-processes 32 --num-steps 20\n```\n\n### MuJoCo\n\nPlease always try to use  ```--use-proper-time-limits``` flag. It properly handles partial trajectories (see https://github.com/sfujim/TD3/blob/master/main.py#L123).\n\n#### A2C\n\n```bash\npython main.py --env-name \"Reacher-v2\" --num-env-steps 1000000\n```\n\n#### PPO\n\n```bash\npython main.py --env-name \"Reacher-v2\" --algo ppo --use-gae --log-interval 1 --num-steps 2048 --num-processes 1 --lr 3e-4 --entropy-coef 0 --value-loss-coef 0.5 --ppo-epoch 10 --num-mini-batch 32 --gamma 0.99 --gae-lambda 0.95 --num-env-steps 1000000 --use-linear-lr-decay --use-proper-time-limits\n```\n\n#### ACKTR\n\nACKTR requires some modifications to be made specifically for MuJoCo. But at the moment, I want to keep this code as unified as possible. Thus, I'm going for better ways to integrate it into the codebase.\n\n## Enjoy\n\n### Atari\n\n```bash\npython enjoy.py --load-dir trained_models/a2c --env-name \"PongNoFrameskip-v4\"\n```\n\n### MuJoCo\n\n```bash\npython enjoy.py --load-dir trained_models/ppo --env-name \"Reacher-v2\"\n```\n\n## Results\n\n### A2C\n\n![BreakoutNoFrameskip-v4](imgs/a2c_breakout.png)\n\n![SeaquestNoFrameskip-v4](imgs/a2c_seaquest.png)\n\n![QbertNoFrameskip-v4](imgs/a2c_qbert.png)\n\n![beamriderNoFrameskip-v4](imgs/a2c_beamrider.png)\n\n### PPO\n\n\n![BreakoutNoFrameskip-v4](imgs/ppo_halfcheetah.png)\n\n![SeaquestNoFrameskip-v4](imgs/ppo_hopper.png)\n\n![QbertNoFrameskip-v4](imgs/ppo_reacher.png)\n\n![beamriderNoFrameskip-v4](imgs/ppo_walker.png)\n\n\n### ACKTR\n\n![BreakoutNoFrameskip-v4](imgs/acktr_breakout.png)\n\n![SeaquestNoFrameskip-v4](imgs/acktr_seaquest.png)\n\n![QbertNoFrameskip-v4](imgs/acktr_qbert.png)\n\n![beamriderNoFrameskip-v4](imgs/acktr_beamrider.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D1E8:2B291E:17DEFB:5D17E8:6AB921AD"},"text_sha256":"b98a1e2abfde4c31d193b98eefe949aad82950d29a9291ce0230122e14c4fb85"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"NTMC-Community/MatchZoo","input_row":{"repository":"NTMC-Community/MatchZoo","url":"https://github.com/NTMC-Community/MatchZoo","name":"MatchZoo","owner":"NTMC-Community","description":"Facilitating the design, comparison and sharing of deep text matching models.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3849,"issues":463,"created_at":"2017-06-08T08:55:22Z","updated_at":"2026-09-05T13:18:37Z","first_commit_at":"2017-06-08T09:05:40Z","last_commit_at":"2021-06-02T17:38:16Z","activity_months":47.810000000000002,"ai_ml_match_topics":"deep-learning; neural-network; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:09.898Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NTMC-Community/MatchZoo","visibility":"public","created_at":"2017-06-08T08:55:22Z","updated_at":"2026-09-05T13:18:37Z","private":false,"fork":false,"archived":false,"stargazers_count":3849,"open_issues_count":34,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3048","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:1796432:1BB6F69:6AB92961"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3047","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0812:78367:17FECDB:1C1F2AD:6AB92962"},"commit":{"sha":"9c347390cb196776aee0596227ee8ccb0c39d6e1","url":"https://github.com/NTMC-Community/MatchZoo/commit/9c347390cb196776aee0596227ee8ccb0c39d6e1","date":"2018-05-21T18:18:40Z","author_date":"2018-05-21T18:18:40Z","committer_date":"2018-05-21T18:18:40Z","tree_sha":"f2e10a9693b662bd7a6de1e12d028d2de8165521","message_first_line":"Merge pull request #108 from bwanglzu/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3046","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:17FED1F:1C1F2F1:6AB92962"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17441,"blob_sha":"b6106076a21d220bca6e19cae9d6c8ada470e55f","priority":0}],"documents":[{"path":"README.md","size":17441,"blob_sha":"b6106076a21d220bca6e19cae9d6c8ada470e55f","priority":0,"status":200,"text":"<div align='center'>\n<img src=\"./docs/_static/images/matchzoo-logo.png\" width = \"400\"  alt=\"图片名称\" align=center />\n<\/div>\n\n[![Build Status](https://travis-ci.org/yangliuy/MatchZoo.svg?branch=master)](https://travis-ci.org/yangliuy/MatchZoo.svg?branch=master)\n---\nMatchZoo is a toolkit for text matching. It was developed with a focus on facilitating the designing, comparing and sharing of deep text matching models. There are a number of deep matching methods, such as DRMM, MatchPyramid, MV-LSTM, aNMM, DUET, ARC-I, ARC-II, DSSM, and CDSSM, designed with a unified interface. Potential tasks related to MatchZoo include document retrieval, question answering, conversational response ranking, paraphrase identification, etc. We are always happy to receive any code contributions, suggestions, comments from all our MatchZoo users.\n\n<table>\n  <tr>\n    <th width=30%, bgcolor=#999999 >Tasks<\/th> \n    <th width=20%, bgcolor=#999999>Text 1<\/th>\n    <th width=\"20%\", bgcolor=#999999>Text 2<\/th>\n    <th width=\"20%\", bgcolor=#999999>Objective<\/th>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Paraphrase Indentification <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> string 1 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> string 2 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Textual Entailment <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> text <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> hypothesis <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Question Answer <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> question <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> answer <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification/ranking <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Conversation <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> dialog <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> response <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification/ranking <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Information Retrieval <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> query <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> document <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> ranking <\/td>\n  <\/tr>\n<\/table>\n\n## Installation\nMatchZoo is still under development. Before the first stable release (1.0), please clone the repository and run\n```\ngit clone https://github.com/faneshion/MatchZoo.git\ncd MatchZoo\npython setup.py install\n```\nIn the main directory, this will install the dependencies automatically.\n\nFor usage examples, you can run\n```\npython matchzoo/main.py --phase train --model_file examples/toy_example/config/arci_ranking.config\npython matchzoo/main.py --phase predict --model_file examples/toy_example/config/arci_ranking.config\n```\n\n## Overview\nThe architecture of the MatchZoo toolkit is described in the Figure  in what follows,\n<div align='center'>\n<img src=\"./docs/_static/images/matchzoo.png\" width = \"400\" height = \"200\" alt=\"图片名称\" align=center />\n<\/div>\nThere are three major modules in the toolkit, namely data preparation, model construction, training and evaluation, respectively. These three modules are actually organized as a pipeline of data flow.\n\n### Data Preparation\nThe data preparation module aims to convert dataset of different text matching tasks into a unified format as the input of deep matching models. Users provide datasets which contains pairs of texts along with their labels, and the module produces the following files.\n\n+\t**Word Dictionary**: records the mapping from each word to a unique identifier called *wid*. Words that are too frequent (e.g. stopwords), too rare or noisy (e.g. fax numbers) can be  filtered out by predefined rules.\n+\t**Corpus File**: records the mapping from each text to a unique identifier called *tid*, along with a sequence of word identifiers contained in that text. Note here each text is truncated or padded to a fixed length customized by users.\n+\t**Relation File**: is used to store the relationship between two texts, each line containing a pair of *tids* and the corresponding label.\n+   **Detailed Input Data Format**: a detailed explaination of input data format can be found in MatchZoo/data/example/readme.md.\n\n### Model Construction\nIn the model construction module, we employ Keras library to help users build the deep matching model layer by layer conveniently. The Keras libarary provides a set of common layers widely used in neural models, such as convolutional layer, pooling layer, dense layer and so on. To further facilitate the construction of deep text matching models, we extend the Keras library to provide some layer interfaces specifically designed for text matching.\n\nMoreover, the toolkit has implemented two schools of representative deep text matching models, namely representation-focused models and interaction-focused models [[Guo et al.]](http://www.bigdatalab.ac.cn/~gjf/papers/2016/CIKM2016a_guo.pdf).\n\n### Training and Evaluation\nFor learning the deep matching models, the toolkit provides a variety of objective functions for regression, classification and ranking. For example, the ranking-related objective functions include several well-known pointwise, pairwise and listwise losses. It is flexible for users to pick up different objective functions in the training phase for optimization. Once a model has been trained, the toolkit could be used to produce a matching score, predict a matching label, or rank target texts (e.g., a document) against an input text.\n\n## Benchmark Results:\nHere, We adopt two representative datasets for examples to show the usage of MatchZoo for ranking and classification. For ranking task, we use <a href=\"https://www.microsoft.com/en-us/download/details.aspx?id=52419\">WikiQA<\/a> dataset as an example. For classification task, we use <a href=\"https://www.kaggle.com/c/quora-question-pairs/\">QuoraQP<\/a> dataset as an example.\n\n### WikiQA for Ranking\nWikiQA is a popular benchmark dataset for answer sentence selection in question answering. We have provided <a href=\"./data/WikiQA/run_data.sh\">a script<\/a> to download the dataset, and prepared it into the MatchZoo data format. In the <a href=\"./examples/wikiqa/config\">models directory<\/a>, there are a number of configurations about each model for WikiQA dataset. \n\nTake the DRMM as an example. In training phase, you can run\n```\npython matchzoo/main.py --phase train --model_file examples/wikiqa/config/drmm_wikiqa.config\n```\nIn testing phase, you can run\n```\npython matchzoo/main.py --phase predict --model_file examples/wikiqa/config/drmm_wikiqa.config\n```\n\nWe have compared 10 models, the results are as follows.\n<table>\n  <tr>\n    <th width=10%, bgcolor=#999999 >Models<\/th> \n    <th width=20%, bgcolor=#999999>NDCG@3<\/th>\n    <th width=\"20%\", bgcolor=#999999>NDCG@5<\/th>\n    <th width=\"20%\", bgcolor=#999999>MAP<\/th>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> DSSM <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> 0.5439 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> 0.6134 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> 0.5647 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> CDSSM <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5489 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6084<\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5593 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> ARC-I <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5680 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6317 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5870 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> ARC-II <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5647 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6176 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5845 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> MV-LSTM <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5818 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6452 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.5988 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> DRMM <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6107 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6621 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6195 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> K-NRM <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6268 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6693 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6256 <\/td>\n  <\/tr>\n  <tr>\n     <td align=\"center\", bgcolor=#eeeeee> aNMM <\/td>\n     <td align=\"center\", bgcolor=#eeeeee> 0.6160 <\/td>\n     <td align=\"center\", bgcolor=#eeeeee> 0.6696 <\/td>\n     <td align=\"center\", bgcolor=#eeeeee> 0.6297 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> DUET <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6065 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6722 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6301 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> MatchPyramid <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6317 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6913 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6434 <\/td>\n  <\/tr>\n  <tr>\n  \t <td align=\"center\", bgcolor=#eeeeee> DRMM_TKS <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6458 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6956 <\/td>\n  \t <td align=\"center\", bgcolor=#eeeeee> 0.6586 <\/td>\n  <\/tr>\n \n<\/table>\nThe loss of each models in train dataset are described in the following figure,\n <div align='center'>\n<img src=\"./docs/_static/images/matchzoo.wikiqa.loss.png\" width = \"550\" alt=\"图片名称\" align=center />\n<\/div>\n\nThe MAP of each models in test dataset are depicted in the following figure,\n<div align='center'>\n<img src=\"./docs/_static/images/matchzoo.wikiqa.map.png\" width = \"550\" alt=\"图片名称\" align=center />\n<\/div>\nHere, the DRMM_TKS is a variant of DRMM for short text matching. Specifically, the matching histogram is replaced by a top-k maxpooling layer and the remaining part are fixed. \n\n### QuoraQP for Classification\nQuoraQP (Quora Question Pairs) is a text matching competition from kaggle, which is to predict whether the provided pairs of question contain have the same meaning. We have provided <a href=\"./data/QuoraQp/run_data.sh\">a script<\/a> to download the dataset, and prepared it into the MatchZoo data format. In the <a href=\"./examples/QuoraQP/config\">models directory<\/a>, there are a number of configurations about each model for QuoraQP dataset. \n\nTake the MatchPyramid as an example. In training phase, you can run\n```\npython matchzoo/main.py --phase train --model_file examples/QuoraQP/config/matchpyramid_quoraqp.config\n```\nIn testing phase, you can run\n```\npython matchzoo/main.py --phase predict --model_file examples/QuoraQP/config/matchpyramid_quoraqp.config\n```\nThe loss of each models in train dataset are described in the following figure,\n <div align='center'>\n<img src=\"./docs/_static/images/matchzoo.quoraqp.loss.png\" width = \"550\" alt=\"图片名称\" align=center />\n<\/div>\n\nThe precisioin of each models in test dataset are depicted in the following figure,\n<div align='center'>\n<img src=\"./docs/_static/images/matchzoo.quoraqp.precision.png\" width = \"550\" alt=\"图片名称\" align=center />\n<\/div>\n\n## Model Detail:\n\n1. DRMM\n\nthis model is an implementation of <a href=\"http://www.bigdatalab.ac.cn/~gjf/papers/2016/CIKM2016a_guo.pdf\">A Deep Relevance Matching Model for Ad-hoc Retrieval<\/a>.\n\n- model file: models/drmm.py\n- model config: models/drmm_ranking.config\n\n---\n2. MatchPyramid\n\nthis model is an implementation of <a href=\"https://arxiv.org/abs/1602.06359\"> Text Matching as Image Recognition<\/a>\n\n- model file: models/matchpyramid.py\n- model config: models/matchpyramid_ranking.config\n\n---\n3. ARC-I\n\nthis model is an implementation of <a href=\"https://arxiv.org/abs/1503.03244\">Convolutional Neural Network Architectures for Matching Natural Language Sentences<\/a>\n\n- model file: models/arci.py\n- model config: models/arci_ranking.config\n\n---\n4. DSSM\n\nthis model is an implementation of <a href=\"https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/cikm2013_DSSM_fullversion.pdf\">Learning Deep Structured Semantic Models for Web Search using Clickthrough Data<\/a>\n\n- model file: models/dssm.py\n- model config: models/dssm_ranking.config\n\n---\n5. CDSSM\n\nthis model is an implementation of <a href=\"https://www.microsoft.com/en-us/research/publication/learning-semantic-representations-using-convolutional-neural-networks-for-web-search/\">Learning Semantic Representations Using Convolutional Neural Networks for Web Search<\/a>\n\n- model file: models/cdssm.py\n- model config: models/cdssm_ranking.config\n\n---\n6. ARC-II\n\nthis model is an implementation of <a href=\"https://arxiv.org/abs/1503.03244\">Convolutional Neural Network Architectures for Matching Natural Language Sentences<\/a>\n\n- model file: models/arcii.py\n- model config: models/arcii_ranking.config\n\n---\n7. MV-LSTM\n\nthis model is an implementation of <a href=\"https://arxiv.org/abs/1511.08277\">A Deep Architecture for Semantic Matching with Multiple Positional Sentence Representations<\/a>\n\n- model file: models/mvlstm.py\n- model config: models/mvlstm_ranking.config\n\n-------\n8. aNMM\n\nthis model is an implementation of <a href=\"http://maroo.cs.umass.edu/pub/web/getpdf.php?id=1240\">aNMM: Ranking Short Answer Texts with Attention-Based Neural Matching Model<\/a>\n- model file: models/anmm.py\n- model config: models/anmm_ranking.config\n\n-------\n9. DUET\n\nthis model is an implementation of <a href=\"https://dl.acm.org/citation.cfm?id=3052579\">Learning to Match Using Local and Distributed Representations of Text for Web Search<\/a>\n\n- model file: models/duet.py\n- model config: models/duet_ranking.config\n\n---\n10. K-NRM\n\nthis model is an implementation of <a href=\"https://arxiv.org/abs/1706.06613\">End-to-End Neural Ad-hoc Ranking with Kernel Pooling<\/a>\n\n- model file: models/knrm.py\n- model config: models/knrm_ranking.config\n\n---\n11. CONV-KNRM:\n\nthis model is an implementation of <a href=\"http://www.cs.cmu.edu/~zhuyund/papers/WSDM_2018_Dai.pdf\">Convolutional neural networks for soft-matching n-grams in ad-hoc search<\/a>\n\n- model file: models/convknrm.py\n- model config: models/convknrm.config\n\n---\n12. models under development:\n\n<a href=\"https://arxiv.org/abs/1604.04378\">Match-SRNN<\/a>, <a href=\"https://arxiv.org/abs/1710.05649\">DeepRank<\/a> ....\n\n## Citation\n\n```\n@article{fan2017matchzoo,\n  title={MatchZoo: A Toolkit for Deep Text Matching},\n  author={Fan, Yixing and Pang, Liang and Hou, JianPeng and Guo, Jiafeng and Lan, Yanyan and Cheng, Xueqi},\n  journal={arXiv preprint arXiv:1707.07270},\n  year={2017}\n}\n```\n\nProject Organizers\n====\n- **Jiafeng Guo**\n    - Institute of Computing Technolgy, Chinese Academy of Sciences\n    - [HomePage](http://www.bigdatalab.ac.cn/~gjf/)\n- **Yanyan Lan**\n    - Institute of Computing Technolgy, Chinese Academy of Sciences\n    - [HomePage](http://www.bigdatalab.ac.cn/~lanyanyan/)\n- **Xueqi Cheng**\n    - Institute of Computing Technolgy, Chinese Academy of Sciences \n    - [HomePage](http://www.bigdatalab.ac.cn/~cxq/)\n\n## Environment\n* python2.7+\n* tensorflow 1.2+\n* keras 2.06+\n* nltk 3.2.2+\n* tqdm 4.19.4+\n* h5py 2.7.1+\n\nDevelopment Teams\n====\n- **Yixing Fan**\n    - Institute of Computing Technolgy, Chinese Academy of Sciences\n    - [Google Scholar](https://scholar.google.com/citations?user=w5kGcUsAAAAJ&hl=en)\n- **Liang Pang** \n    - Institute of Computing Technolgy, Chinese Academy of Sciences\n    - [Google Scholar](https://scholar.google.com/citations?user=1dgQHBkAAAAJ&hl=zh-CN)\n- **Liu Yang** \n    - Center for Intelligent Information Retrieval, University of Massachusetts Amherst\n    - [HomePage](https://sites.google.com/site/lyangwww/)\n\nAcknowledgements\n=====\nWe would like to express our appreciation to the following people for contributing source code to MatchZoo, including [Yixing Fan](https://scholar.google.com/citations?user=w5kGcUsAAAAJ&hl=en), [Liang Pang](https://scholar.google.com/citations?user=1dgQHBkAAAAJ&hl=zh-CN), [Liu Yang](https://sites.google.com/site/lyangwww/), [Yukun Zheng](), [Lijuan Chen](), [Jianpeng Hou](https://github.com/HouJP), [Zhou Yang](https://github.com/zhouzhouyang520), [Niuguo cheng](https://github.com/niuox) etc..\n\nFeedback and Join Us\n=====\nFeel free to post any questions or suggestions on [GitHub Issues](https://github.com/faneshion/MatchZoo/issues) and we will reply to your questions there. You can also suggest adding new deep text maching models into MatchZoo and apply for joining us to develop MatchZoo together.\n\nUpdate in 12/10/2017: We have applied another WeChat ID: CLJ_Keep. Anyone who want to join the WeChat group can add this WeChat id as a friend. Please tell us your name, company or school, city when you send such requests. After you added \"CLJ_Keep\" as one of your WeChat friends, she will invite you to join the MatchZoo WeChat group. \"CLJ_Keep\" is one member of the MatchZoo team.\n\nUpdate in 04/07/2018: We have created a Google discussion group [MatchZoo Discuss](https://groups.google.com/forum/#!forum/matchzoo-discuss) to better support Q&A discussions of our users. You can post any questions/suggestions on the MatchZoo toolkit here. The developers and other experienced users from our community will reply to your questions. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B06:2E8679:176487:5C9ACC:6AB921B2"},"text_sha256":"987490ef4af4124e2b666ee1db449198eec9b0870515f3167f81af2dd0f56ab5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3045","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0815:74C18:17F6362:1C170F5:6AB92963"},"commit":{"sha":"8a487ee5a574356fc91e4f48e219253dc11bcff2","url":"https://github.com/NTMC-Community/MatchZoo/commit/8a487ee5a574356fc91e4f48e219253dc11bcff2","date":"2021-06-02T17:38:16Z","author_date":"2021-06-02T17:38:16Z","committer_date":"2021-06-02T17:38:16Z","tree_sha":"f1fa78a2461ae3233ea1ffc1869c4b5feea5337a","message_first_line":"Merge pull request #830 from SleepyBag/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"3044","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:17FB673:1C1C262:6AB92964"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14539,"blob_sha":"c4844d34ca14f391b4d23d0d3add0129ca2eb8b1","priority":0}],"documents":[{"path":"README.md","size":14539,"blob_sha":"c4844d34ca14f391b4d23d0d3add0129ca2eb8b1","priority":0,"status":200,"text":"<div align='center'>\n<img src=\"https://github.com/NTMC-Community/MatchZoo/blob/master/artworks/matchzoo-logo.png?raw=true\" width = \"400\"  alt=\"logo\" align=\"center\" />\n<\/div>\n\n# MatchZoo [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=MatchZoo:%20deep%20learning%20for%20semantic%20matching&url=https://github.com/NTMC-Community/MatchZoo)\n\n> Facilitating the design, comparison and sharing of deep text matching models.<br/>\n> MatchZoo 是一个通用的文本匹配工具包，它旨在方便大家快速的实现、比较、以及分享最新的深度文本匹配模型。\n\n[![Python 3.6](https://img.shields.io/badge/python-3.6%20%7C%203.7-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![Pypi Downloads](https://img.shields.io/pypi/dm/matchzoo.svg?label=pypi)](https://pypi.org/project/MatchZoo/)\n[![Documentation Status](https://readthedocs.org/projects/matchzoo/badge/?version=master)](https://matchzoo.readthedocs.io/en/master/?badge=master)\n[![Build Status](https://travis-ci.org/NTMC-Community/MatchZoo.svg?branch=master)](https://travis-ci.org/NTMC-Community/MatchZoo/)\n[![codecov](https://codecov.io/gh/NTMC-Community/MatchZoo/branch/master/graph/badge.svg)](https://codecov.io/gh/NTMC-Community/MatchZoo)\n[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Requirements Status](https://requires.io/github/NTMC-Community/MatchZoo/requirements.svg?branch=master)](https://requires.io/github/NTMC-Community/MatchZoo/requirements/?branch=master)\n---\n🔥**News: [MatchZoo-py](https://github.com/NTMC-Community/MatchZoo-py) (PyTorch version of MatchZoo) is ready now.**\n\nThe goal of MatchZoo is to provide a high-quality codebase for deep text matching research, such as document retrieval, question answering, conversational response ranking, and paraphrase identification. With the unified data processing pipeline, simplified model configuration and automatic hyper-parameters tunning features equipped, MatchZoo is flexible and easy to use.\n\n<table>\n  <tr>\n    <th width=30%, bgcolor=#999999 >Tasks<\/th> \n    <th width=20%, bgcolor=#999999>Text 1<\/th>\n    <th width=\"20%\", bgcolor=#999999>Text 2<\/th>\n    <th width=\"20%\", bgcolor=#999999>Objective<\/th>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Paraphrase Identification <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> string 1 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> string 2 <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Textual Entailment <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> text <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> hypothesis <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Question Answer <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> question <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> answer <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification/ranking <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Conversation <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> dialog <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> response <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> classification/ranking <\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\", bgcolor=#eeeeee> Information Retrieval <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> query <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> document <\/td>\n    <td align=\"center\", bgcolor=#eeeeee> ranking <\/td>\n  <\/tr>\n<\/table>\n\n## Get Started in 60 Seconds\n\nTo train a [Deep Semantic Structured Model](https://www.microsoft.com/en-us/research/project/dssm/), import matchzoo and prepare input data.\n\n```python\nimport matchzoo as mz\n\ntrain_pack = mz.datasets.wiki_qa.load_data('train', task='ranking')\nvalid_pack = mz.datasets.wiki_qa.load_data('dev', task='ranking')\n```\n\nPreprocess your input data in three lines of code, keep track parameters to be passed into the model.\n\n```python\npreprocessor = mz.preprocessors.DSSMPreprocessor()\ntrain_processed = preprocessor.fit_transform(train_pack)\nvalid_processed = preprocessor.transform(valid_pack)\n```\n\nMake use of MatchZoo customized loss functions and evaluation metrics:\n\n```python\nranking_task = mz.tasks.Ranking(loss=mz.losses.RankCrossEntropyLoss(num_neg=4))\nranking_task.metrics = [\n    mz.metrics.NormalizedDiscountedCumulativeGain(k=3),\n    mz.metrics.MeanAveragePrecision()\n]\n```\n\nInitialize the model, fine-tune the hyper-parameters.\n\n```python\nmodel = mz.models.DSSM()\nmodel.params['input_shapes'] = preprocessor.context['input_shapes']\nmodel.params['task'] = ranking_task\nmodel.guess_and_fill_missing_params()\nmodel.build()\nmodel.compile()\n```\n\nGenerate pair-wise training data on-the-fly, evaluate model performance using customized callbacks on validation data.\n\n```python\ntrain_generator = mz.PairDataGenerator(train_processed, num_dup=1, num_neg=4, batch_size=64, shuffle=True)\nvalid_x, valid_y = valid_processed.unpack()\nevaluate = mz.callbacks.EvaluateAllMetrics(model, x=valid_x, y=valid_y, batch_size=len(valid_x))\nhistory = model.fit_generator(train_generator, epochs=20, callbacks=[evaluate], workers=5, use_multiprocessing=False)\n```\n\n## References\n[Tutorials](https://github.com/NTMC-Community/MatchZoo/tree/master/tutorials)\n\n[English Documentation](https://matchzoo.readthedocs.io/en/master/)\n\n[中文文档](https://matchzoo.readthedocs.io/zh/latest/)\n\nIf you're interested in the cutting-edge research progress, please take a look at [awaresome neural models for semantic match](https://github.com/NTMC-Community/awaresome-neural-models-for-semantic-match).\n\n## Install\n\nMatchZoo is dependent on [Keras](https://github.com/keras-team/keras) and [Tensorflow](https://github.com/tensorflow/tensorflow). Two ways to install MatchZoo:\n\n**Install MatchZoo from Pypi:**\n\n```python\npip install matchzoo\n```\n\n**Install MatchZoo from the Github source:**\n\n```\ngit clone https://github.com/NTMC-Community/MatchZoo.git\ncd MatchZoo\npython setup.py install\n```\n\n\n## Models\n\n1. [DRMM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/drmm.py): this model is an implementation of <a href=\"http://www.bigdatalab.ac.cn/~gjf/papers/2016/CIKM2016a_guo.pdf\">A Deep Relevance Matching Model for Ad-hoc Retrieval<\/a>.\n\n2. [MatchPyramid](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/match_pyramid.py): this model is an implementation of <a href=\"https://arxiv.org/abs/1602.06359\"> Text Matching as Image Recognition<\/a>\n\n3. [ARC-I](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/arci.py): this model is an implementation of <a href=\"https://arxiv.org/abs/1503.03244\">Convolutional Neural Network Architectures for Matching Natural Language Sentences<\/a>\n\n4. [DSSM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/dssm.py): this model is an implementation of <a href=\"https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/cikm2013_DSSM_fullversion.pdf\">Learning Deep Structured Semantic Models for Web Search using Clickthrough Data<\/a>\n\n5. [CDSSM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/cdssm.py): this model is an implementation of <a href=\"https://www.microsoft.com/en-us/research/publication/learning-semantic-representations-using-convolutional-neural-networks-for-web-search/\">Learning Semantic Representations Using Convolutional Neural Networks for Web Search<\/a>\n\n6. [ARC-II](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/arcii.py): this model is an implementation of <a href=\"https://arxiv.org/abs/1503.03244\">Convolutional Neural Network Architectures for Matching Natural Language Sentences<\/a>\n\n7. [MV-LSTM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/mvlstm.py):this model is an implementation of <a href=\"https://arxiv.org/abs/1511.08277\">A Deep Architecture for Semantic Matching with Multiple Positional Sentence Representations<\/a>\n\n8. [aNMM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/anmm.py): this model is an implementation of <a href=\"http://maroo.cs.umass.edu/pub/web/getpdf.php?id=1240\">aNMM: Ranking Short Answer Texts with Attention-Based Neural Matching Model<\/a>\n\n9. [DUET](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/duet.py): this model is an implementation of <a href=\"https://dl.acm.org/citation.cfm?id=3052579\">Learning to Match Using Local and Distributed Representations of Text for Web Search<\/a>\n\n10. [K-NRM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/knrm.py): this model is an implementation of <a href=\"https://arxiv.org/abs/1706.06613\">End-to-End Neural Ad-hoc Ranking with Kernel Pooling<\/a>\n\n11. [CONV-KNRM](https://github.com/NTMC-Community/MatchZoo/tree/master/matchzoo/models/conv_knrm.py): this model is an implementation of <a href=\"http://www.cs.cmu.edu/~zhuyund/papers/WSDM_2018_Dai.pdf\">Convolutional neural networks for soft-matching n-grams in ad-hoc search<\/a>\n\n12. models under development: <a href=\"https://arxiv.org/abs/1604.04378\">Match-SRNN<\/a>, <a href=\"https://arxiv.org/abs/1710.05649\">DeepRank<\/a>, <a href=\"https://arxiv.org/abs/1702.03814\">BiMPM<\/a> .... \n\n\n## Citation\n\nIf you use MatchZoo in your research, please use the following BibTex entry.\n\n```\n@inproceedings{Guo:2019:MLP:3331184.3331403,\n author = {Guo, Jiafeng and Fan, Yixing and Ji, Xiang and Cheng, Xueqi},\n title = {MatchZoo: A Learning, Practicing, and Developing System for Neural Text Matching},\n booktitle = {Proceedings of the 42Nd International ACM SIGIR Conference on Research and Development in Information Retrieval},\n series = {SIGIR'19},\n year = {2019},\n isbn = {978-1-4503-6172-9},\n location = {Paris, France},\n pages = {1297--1300},\n numpages = {4},\n url = {http://doi.acm.org/10.1145/3331184.3331403},\n doi = {10.1145/3331184.3331403},\n acmid = {3331403},\n publisher = {ACM},\n address = {New York, NY, USA},\n keywords = {matchzoo, neural network, text matching},\n} \n```\n\n\n## Development Team\n\n ​ ​ ​ ​\n<table border=\"0\">\n  <tbody>\n    <tr align=\"center\">\n      <td>\n        ​ <a href=\"https://github.com/faneshion\"><img width=\"40\" height=\"40\" src=\"https://github.com/faneshion.png?s=40\" alt=\"faneshion\"><\/a><br>\n        ​ <a href=\"http://www.bigdatalab.ac.cn/~fanyixing/\">Fan Yixing<\/a> ​\n        <p>Core Dev<br>\n        ASST PROF, ICT<\/p>​\n      <\/td>\n      <td>\n         <a href=\"https://github.com/bwanglzu\"><img width=\"40\" height=\"40\" src=\"https://github.com/bwanglzu.png?s=40\" alt=\"bwanglzu\"><\/a><br>\n         <a href=\"https://github.com/bwanglzu\">Wang Bo<\/a> ​\n        <p>Core Dev<br> M.S. TU Delft<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/uduse\"><img width=\"40\" height=\"40\" src=\"https://github.com/uduse.png?s=36\" alt=\"uduse\"><\/a><br>\n         <a href=\"https://github.com/uduse\">Wang Zeyi<\/a>\n         <p>Core Dev<br> B.S. UC Davis<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/pl8787\"><img width=\"40\" height=\"40\" src=\"https://github.com/pl8787.png?s=40\" alt=\"pl8787\"><\/a><br>\n        ​ <a href=\"https://github.com/pl8787\">Pang Liang<\/a>\n        <p>Core Dev<br>\n        ASST PROF, ICT<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/yangliuy\"><img width=\"40\" height=\"40\" src=\"https://github.com/yangliuy.png?s=40\" alt=\"yangliuy\"><\/a><br>\n        ​ <a href=\"https://github.com/yangliuy\">Yang Liu<\/a>\n        <p>Core Dev<br>\n        PhD. UMASS<\/p>​\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        ​ <a href=\"https://github.com/wqh17101\"><img width=\"40\" height=\"40\" src=\"https://github.com/wqh17101.png?s=40\" alt=\"wqh17101\"><\/a><br>\n        ​ <a href=\"https://github.com/wqh17101\">Wang Qinghua<\/a> ​\n        <p>Documentation<br>\n        B.S. Shandong Univ.<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/ZizhenWang\"><img width=\"40\" height=\"40\" src=\"https://github.com/ZizhenWang.png?s=40\" alt=\"ZizhenWang\"><\/a><br>\n        ​ <a href=\"https://github.com/ZizhenWang\">Wang Zizhen<\/a> ​\n        <p>Dev<br>\n        M.S. UCAS<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/lixinsu\"><img width=\"40\" height=\"40\" src=\"https://github.com/lixinsu.png?s=40\" alt=\"lixinsu\"><\/a><br>\n        ​ <a href=\"https://github.com/lixinsu\">Su Lixin<\/a>\n        <p>Dev<br>\n        PhD. UCAS<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/zhouzhouyang520\"><img width=\"40\" height=\"40\" src=\"https://github.com/zhouzhouyang520.png?s=40\" alt=\"zhouzhouyang520\"><\/a><br>\n        ​ <a href=\"https://github.com/zhouzhouyang520\">Yang Zhou<\/a> ​\n        <p>Dev<br>\n        M.S. CQUT<\/p>​\n      <\/td>\n      <td>\n        ​ <a href=\"https://github.com/rgtjf\"><img width=\"40\" height=\"40\" src=\"https://github.com/rgtjf.png?s=36\" alt=\"rgtjf\"><\/a><br>\n        ​ <a href=\"https://github.com/rgtjf\">Tian Junfeng<\/a> ​\n        <p>Dev<br>\n        M.S. ECNU<\/p>​\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](./CONTRIBUTING.md) before creating a pull request. If you have a MatchZoo-related paper/project/compnent/tool, send a pull request to [this awesome list](https://github.com/NTMC-Community/awaresome-neural-models-for-semantic-match)!\n\nThank you to all the people who already contributed to MatchZoo!\n\n[Jianpeng Hou](https://github.com/HouJP), [Lijuan Chen](https://github.com/githubclj), [Yukun Zheng](https://github.com/zhengyk11), [Niuguo Cheng](https://github.com/niuox), [Dai Zhuyun](https://github.com/AdeDZY), [Aneesh Joshi](https://github.com/aneesh-joshi), [Zeno Gantner](https://github.com/zenogantner), [Kai Huang](https://github.com/hkvision), [stanpcf](https://github.com/stanpcf), [ChangQF](https://github.com/ChangQF), [Mike Kellogg\n](https://github.com/wordreference)\n\n\n\n\n## Project Organizers\n\n- Jiafeng Guo\n  * Institute of Computing Technology, Chinese Academy of Sciences\n  * [Homepage](http://www.bigdatalab.ac.cn/~gjf/)\n- Yanyan Lan\n  * Institute of Computing Technology, Chinese Academy of Sciences\n  * [Homepage](http://www.bigdatalab.ac.cn/~lanyanyan/)\n- Xueqi Cheng\n  * Institute of Computing Technology, Chinese Academy of Sciences\n  * [Homepage](http://www.bigdatalab.ac.cn/~cxq/)\n\n\n## License\n\n[Apache-2.0](https://opensource.org/licenses/Apache-2.0)\n\nCopyright (c) 2015-present, Yixing Fan (faneshion)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9484:3E1DA:17370E:5C6FF7:6AB921B2"},"text_sha256":"072a2eac6c0b983b7168a0aeef0a89d4fa4513b9d67f30e8ea2e44c4f1f434b7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"google/deepvariant","input_row":{"repository":"google/deepvariant","url":"https://github.com/google/deepvariant","name":"deepvariant","owner":"google","description":"DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":3811,"issues":1023,"created_at":"2017-11-23T01:56:22Z","updated_at":"2026-09-26T21:22:31Z","first_commit_at":"2017-12-01T21:30:18Z","last_commit_at":"2026-03-19T04:57:17Z","activity_months":99.519999999999996,"ai_ml_match_topics":"deep-learning; machine-learning; deep-neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:13.023Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"google/deepvariant","visibility":"public","created_at":"2017-11-23T01:56:22Z","updated_at":"2026-09-26T21:22:31Z","private":false,"fork":false,"archived":false,"stargazers_count":3811,"open_issues_count":4,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"3043","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0796:754BF:17BB629:1BDC0AD:6AB92965"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3042","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17BC463:1BDCE5E:6AB92965"},"commit":{"sha":"58fbf974b0ba5f05ae35bdd8df2625d2843fdcab","url":"https://github.com/google/deepvariant/commit/58fbf974b0ba5f05ae35bdd8df2625d2843fdcab","date":"2018-05-24T20:31:42Z","author_date":"2018-05-24T20:31:06Z","committer_date":"2018-05-24T20:31:42Z","tree_sha":"0510292a7c364263abefe62fc9d5cd61ad431d91","message_first_line":"Fix DeepVariant build"},"tree_request_status":200,"tree_rate":{"github_remaining":"3041","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:17FB78B:1C1C395:6AB92965"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7082,"blob_sha":"b0865bfa4d0fe5c5a3ac01129138363d1d7c6cdf","priority":0}],"documents":[{"path":"README.md","size":7082,"blob_sha":"b0865bfa4d0fe5c5a3ac01129138363d1d7c6cdf","priority":0,"status":200,"text":"# DeepVariant\n\nDeepVariant is an analysis pipeline that uses a deep neural network to call\ngenetic variants from next-generation DNA sequencing data.\n\n## Availability\n\n<!-- mdlint off(URL_BAD_G3DOC_PATH) -->\n\nDeepVariant is a suite of Python/C++ programs that run on any Unix-like\noperating system. For convenience the documentation refers to building and\nrunning DeepVariant on [Google Cloud Platform](https://cloud.google.com/), but\nthe tools themselves can be built and run on any standard Linux computer,\nincluding on-premise machines. Note that DeepVariant currently requires\nPython 2.7 and does not yet work with Python 3.\n\nPre-built binaries are available at\n[gs://deepvariant/](https://console.cloud.google.com/storage/browser/deepvariant).\nThese are compiled to use SSE4 and AVX instructions, so you'll need a CPU (such\nas Intel Sandy Bridge) that supports them. (The file /proc/cpuinfo lists these\nfeatures under \"flags\".)\n\nAlternatively, see [Building and testing\nDeepVariant](docs/deepvariant-build-test.md) for more information on building\nDeepVariant from sources for your platform.\n\nFor managed pipeline execution of DeepVariant see the [cost- and\nspeed-optimized, Docker-based\npipelines](https://cloud.google.com/genomics/deepvariant) created for Google\nCloud Platform.\n\n## Documentation\n\n*   [DeepVariant release notes](https://github.com/google/deepvariant/releases)\n*   [Building and testing DeepVariant](docs/deepvariant-build-test.md)\n*   [DeepVariant quick start](docs/deepvariant-quick-start.md)\n*   [DeepVariant via Docker](docs/deepvariant-docker.md)\n*   [DeepVariant whole genome case study](docs/deepvariant-case-study.md)\n*   [DeepVariant exome case study](docs/deepvariant-exome-case-study.md)\n*   [DeepVariant Genomic VCF (gVCF) support](docs/deepvariant-gvcf-support.md)\n*   [DeepVariant usage guide](docs/deepvariant-details.md)\n*   [DeepVariant model training](docs/deepvariant-model-training.md)\n*   [Datalab example: visualizing pileup\n    images/tensors](docs/visualizing_examples.ipynb)\n*   [Getting Started with GCP](deepvariant-gcp-info.md) (It is not required to\n    run DeepVariant on GCP.)\n\n## Other resources\n\n*   [Google Developer Codelab: Variant Calling on a Rice genome with\n    DeepVariant](https://codelabs.developers.google.com/codelabs/genomics-deepvariant)\n*   [Improve DeepVariant for BGISEQ germline variant\n    calling](http://bit.ly/train-deepvariant) |\n    [slides](https://github.com/SVAI/RecausalNucleotideNetworks/blob/master/ReCausalNucleotideNetwork.pdf)\n\n<!-- mdlint on -->\n\n<a name=\"about\"><\/a>\n## About DeepVariant\n\nFor technical details describing how DeepVariant works please see our\n[preprint](https://doi.org/10.1101/092890).\n\n![DeepVariant workflow](docs/DeepVariant-workflow-figure.png?raw=true \"DeepVariant workflow\")\n\nBriefly, we started with some of the reference genomes from [Genome in a\nBottle](http://jimb.stanford.edu/giab/), for which there is high-quality ground\ntruth available (or the closest approximation currently possible). Using\nmultiple replicates of these genomes, we produced approximately one hundred\nmillion training examples in the form of multi-channel tensors encoding the\nsequencing instrument data, and then trained a TensorFlow-based image\nclassification model ([inception-v3](https://arxiv.org/abs/1512.00567)) to\nassign genotype likelihoods from the experimental data produced by the\ninstrument. Read additional information on the [Google Research\nblog](https://research.googleblog.com/2017/12/deepvariant-highly-accurate-genomes.html).\n\nUnder the hood, DeepVariant relies on\n[Nucleus](https://github.com/google/nucleus), a library of Python and C++ code\nfor reading and writing data in common genomics file formats (like SAM and VCF)\ndesigned for painless integration with the\n[TensorFlow](https://www.tensorflow.org/) machine learning framework.\n\n## Evaluating DeepVariant\n\nWe are delighted to see several external evaluations of the DeepVariant method.\n\nThe 2016 PrecisionFDA Truth Challenge, administered by the FDA, assessed several\ncommunity-submitted variant callsets on the (at the time) blinded evaluation\nsample, HG002. DeepVariant won the [Highest SNP\nPerformance](https://precision.fda.gov/challenges/truth/results) award in the\nchallenge.\n\nDNAnexus [posted an extensive\nevaluation](https://blog.dnanexus.com/2017-12-05-evaluating-deepvariant-googles-machine-learning-variant-caller/)\nof several variant calling methods, including DeepVariant, using a variety of\nread sets from HG001, HG002, and HG005. They have also evaluated DeepVariant\nunder a variety of [noisy sequencing\nconditions](https://blog.dnanexus.com/2018-01-16-evaluating-the-performance-of-ngs-pipelines-on-noisy-wgs-data/).\n\nIndependent evaluations of DeepVariant v0.6 from both\n[DNAnexus](https://blog.dnanexus.com/2018-04-18-deepvariant-amplified/) and\n[bcbio](https://github.com/bcbio/bcbio_validations/tree/master/deepvariant#deepvariant-v06-release-strelka2-stratification-and-initial-gatk-cnn)\nare also available. Their analyses support our findings of improved indel\naccuracy, and also include comparisons to other variant calling tools.\n\n## Support\n\nThe [Genomics team in Google Brain](https://research.google.com/teams/brain/genomics/)\nactively supports DeepVariant and are always interested in improving the quality\nof DeepVariant. If you run into an issue, please report the problem on our [Issue\ntracker](https://github.com/google/deepvariant/issues). Make sure to add enough\ndetail to your report that we can reproduce the problem and fix it. We encourage\nincluding links to snippets of BAM/VCF/etc. files that provoke the bug, if\npossible. Depending on the severity of the issue we may patch DeepVariant\nimmediately with the fix or roll it into the next release.\n\nIf you have questions about next-generation sequencing, bioinformatics, or other\ngeneral topics not specific to DeepVariant we recommend you post your question\nto a community discussion forum such as [BioStars](https://www.biostars.org/).\n\n## Contributing\n\nInterested in contributing? See [CONTRIBUTING](CONTRIBUTING.md).\n\n## License\n\nDeepVariant is licensed under the terms of the [BSD-3-Clause license](LICENSE).\n\n## Acknowledgements\n\nDeepVariant happily makes use of many open source packages.  We'd like to\nspecifically call out a few key ones:\n\n*   [Boost Graph\n    Library](http://www.boost.org/doc/libs/1_65_1/libs/graph/doc/index.html)\n\n*   [abseil-cpp](https://github.com/abseil/abseil-cpp) and\n    [abseil-py](https://github.com/abseil/abseil-py)\n\n*   [CLIF](https://github.com/google/clif)\n\n*   [GNU Parallel](https://www.gnu.org/software/parallel/)\n\n*   [htslib & samtools](http://www.htslib.org/)\n\n*   [Nucleus](https://github.com/google/nucleus)\n\n*   [numpy](http://www.numpy.org/)\n\n*   [scipy](https://www.scipy.org/)\n\n*   [SSW\n    Library](https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library)\n\n*   [TensorFlow and Slim](https://www.tensorflow.org/)\n\nWe thank all of the developers and contributors to these packages for their\nwork.\n\n\n## Disclaimer\n\n*   This is not an official Google product.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E40:3FD49:172098:5C59F5:6AB921B6"},"text_sha256":"e7ff5aa1c635b069730510eed1e56f9ef900ba519811f910d2ec0664dc08c832"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3040","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:17D64AE:1BF6F7A:6AB92966"},"commit":{"sha":"45f2627504c59785ea2b88d0256a2ec347bce7b4","url":"https://github.com/google/deepvariant/commit/45f2627504c59785ea2b88d0256a2ec347bce7b4","date":"2026-03-19T04:57:17Z","author_date":"2026-03-19T04:57:17Z","committer_date":"2026-03-19T04:57:17Z","tree_sha":"e45d617dc37fc02b2e92de7f6461c4760b1b96da","message_first_line":"Update flag summary in RNA-seq case study"},"tree_request_status":200,"tree_rate":{"github_remaining":"3039","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FA:2EA1B4:17C4B5E:1BE5902:6AB92967"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14003,"blob_sha":"157bc079462ecbab21ff48fea78eeaa4ccc56949","priority":0}],"documents":[{"path":"README.md","size":14003,"blob_sha":"157bc079462ecbab21ff48fea78eeaa4ccc56949","priority":0,"status":200,"text":"<img src=\"docs/images/dv_logo.png\" width=50% height=50%>\n\n[![release](https://img.shields.io/badge/release-v1.10-green?logo=github)](https://github.com/google/deepvariant/releases)\n[![announcements](https://img.shields.io/badge/announcements-blue)](https://groups.google.com/d/forum/deepvariant-announcements)\n[![blog](https://img.shields.io/badge/blog-orange)](https://goo.gl/deepvariant)\n\nDeepVariant is a deep learning-based variant caller that takes aligned reads (in\nBAM or CRAM format), produces pileup image tensors from them, classifies each\ntensor using a convolutional neural network, and finally reports the results in\na standard VCF or gVCF file.\n\nDeepVariant supports germline variant-calling in diploid organisms.\n\n**DeepVariant case-studies for germline variant calling:**\n\n*   NGS (Illumina or Element) data for either a\n    [whole genome](docs/deepvariant-case-study.md) or\n    [whole exome](docs/deepvariant-exome-case-study.md).\n*   PacBio HiFi data\n    [PacBio case study](docs/deepvariant-pacbio-model-case-study.md).\n*   Oxford Nanopore R10.4.1\n    [Simplex case study](docs/deepvariant-ont-r104-simplex-case-study.md).\n*   Complete Genomics\n    [T7 case study](docs/deepvariant-complete-t7-case-study.md);\n    [G400 case study](docs/deepvariant-complete-g400-case-study.md).\n*   [Roche SBX case study](docs/roche-sbx-case-study.md) for SBX-D and SBX-Fast data.\n*   Pangenome-mapping-based case-study:\n    [vg case study](docs/deepvariant-vg-case-study.md).\n*   RNA data for\n    [PacBio Iso-Seq/MAS-Seq case study](docs/deepvariant-masseq-case-study.md)\n    and [Illumina RNA-seq Case Study](docs/deepvariant-rnaseq-case-study.md).\n*   Hybrid PacBio HiFi + Illumina WGS, see the\n    [hybrid case study](docs/deepvariant-hybrid-case-study.md).\n\n**Pangenome-aware DeepVariant case-studies:**\n\n*   Pangenome-aware DeepVariant WGS (Illumina or Element):\n    [Mapped with BWA](docs/pangenome-aware-wgs-bwa-case-study.md),\n    [Mapped with VG](docs/pangenome-aware-wgs-vg-case-study.md).\n*   Pangenome-aware DeepVariant WES (Illumina or Element):\n    [Mapped with BWA](docs/pangenome-aware-wes-bwa-case-study.md).\n\nWe have also adapted DeepVariant for somatic calling. See the\n[DeepSomatic](https://github.com/google/deepsomatic) repo for details.\n\nPlease also note:\n\n*   DeepVariant currently supports variant calling on organisms where the\n    ploidy/copy-number is two. This is because the genotypes supported are\n    hom-alt, het, and hom-ref.\n*   The models included with DeepVariant are only trained on human data. For\n    other organisms, see the\n    [blog post on non-human variant-calling](https://google.github.io/deepvariant/posts/2018-12-05-improved-non-human-variant-calling-using-species-specific-deepvariant-models/)\n    for some possible pitfalls and how to handle them.\n\n## DeepTrio\n\nDeepTrio is a deep learning-based trio variant caller built on top of\nDeepVariant. DeepTrio extends DeepVariant's functionality, allowing it to\nutilize the power of neural networks to predict genomic variants in trios or\nduos. See [this page](docs/deeptrio-details.md) for more details and\ninstructions on how to run DeepTrio.\n\nDeepTrio supports germline variant-calling in diploid organisms for the\nfollowing types of input data:\n\n*   NGS (Illumina) data for either\n    [whole genome](docs/deeptrio-wgs-case-study.md) or whole exome.\n*   PacBio HiFi data, see the\n    [PacBio case study](docs/deeptrio-pacbio-case-study.md).\n\nPlease also note:\n\n*   All DeepTrio models were trained on human data.\n*   It is possible to use DeepTrio with only 2 samples (child, and one parent).\n*   External tool [GLnexus](https://github.com/dnanexus-rnd/GLnexus) is used to\n    merge output VCFs.\n\n## How to run DeepVariant\n\nWe recommend using our Docker solution. The command will look like this:\n\n```\nBIN_VERSION=\"1.10.0\"\ndocker run \\\n  -v \"YOUR_INPUT_DIR\":\"/input\" \\\n  -v \"YOUR_OUTPUT_DIR:/output\" \\\n  google/deepvariant:\"${BIN_VERSION}\" \\\n  /opt/deepvariant/bin/run_deepvariant \\\n  --model_type=WGS \\ **Replace this string with exactly one of the following [WGS,WES,PACBIO,ONT_R104,HYBRID_PACBIO_ILLUMINA]**\n  --ref=/input/YOUR_REF \\\n  --reads=/input/YOUR_BAM \\\n  --output_vcf=/output/YOUR_OUTPUT_VCF \\\n  --output_gvcf=/output/YOUR_OUTPUT_GVCF \\\n  --num_shards=$(nproc) \\ **This will use all your cores to run make_examples. Feel free to change.**\n  --vcf_stats_report=true \\ **Optional. Creates VCF statistics report in html file. Default is false.\n  --disable_small_model=true \\ **Optional. Disables the small model from make_examples stage. Default is false.\n  --logging_dir=/output/logs \\ **Optional. This saves the log output for each stage separately.\n  --haploid_contigs=\"chrX,chrY\" \\ **Optional. Heterozygous variants in these contigs will be re-genotyped as the most likely of reference or homozygous alternates. For a sample with karyotype XY, it should be set to \"chrX,chrY\" for GRCh38 and \"X,Y\" for GRCh37. For a sample with karyotype XX, this should not be used.\n  --par_regions_bed=\"/input/GRCh3X_par.bed\" \\ **Optional. If --haploid_contigs is set, then this can be used to provide PAR regions to be excluded from genotype adjustment. Download links to this files are available in this page.\n  --dry_run=false **Default is false. If set to true, commands will be printed out but not executed.\n```\n\nFor details on X,Y support, please see\n[DeepVariant haploid support](docs/deepvariant-haploid-support.md) and the case\nstudy in\n[DeepVariant X, Y case study](docs/deepvariant-xy-calling-case-study.md). You\ncan download the PAR bed files from here:\n[GRCh38_par.bed](https://storage.googleapis.com/deepvariant/case-study-testdata/GRCh38_PAR.bed),\n[GRCh37_par.bed](https://storage.googleapis.com/deepvariant/case-study-testdata/GRCh37_PAR.bed).\n\nTo see all flags you can use, run: `docker run\ngoogle/deepvariant:\"${BIN_VERSION}\"`\n\nIf you're using GPUs, or want to use Singularity instead, see\n[Quick Start](docs/deepvariant-quick-start.md) for more details.\n\nIf you are running on a machine with a GPU, an experimental mode is available\nthat enables running the `make_examples` stage on the CPU while the\n `call_variants` stage runs on the GPU simultaneously.\nFor more details, refer to the [Fast Pipeline case study](docs/deepvariant-fast-pipeline-case-study.md).\n\nFor more information, also see:\n\n*   [Full documentation list](docs/README.md)\n*   [Detailed usage guide](docs/deepvariant-details.md) with more information on\n    the input and output file formats and how to work with them.\n*   [Best practices for multi-sample variant calling with DeepVariant](docs/trio-merge-case-study.md)\n*   [(Advanced) Training tutorial](docs/deepvariant-training-case-study.md)\n*   [DeepVariant's Frequently Asked Questions, FAQ](docs/FAQ.md)\n\n## How to cite\n\nIf you're using DeepVariant in your work, please cite:\n\n[A universal SNP and small-indel variant caller using deep neural networks. *Nature Biotechnology* 36, 983–987 (2018).](https://rdcu.be/7Dhl) <br/>\nRyan Poplin, Pi-Chuan Chang, David Alexander, Scott Schwartz, Thomas Colthurst, Alexander Ku, Dan Newburger, Jojo Dijamco, Nam Nguyen, Pegah T. Afshar, Sam S. Gross, Lizzie Dorfman, Cory Y. McLean, and Mark A. DePristo.<br/>\ndoi: https://doi.org/10.1038/nbt.4235\n\nAdditionally, if you are generating multi-sample calls using our\n[DeepVariant and GLnexus Best Practices](docs/trio-merge-case-study.md), please\ncite:\n\n[Accurate, scalable cohort variant calls using DeepVariant and GLnexus.\n_Bioinformatics_ (2021).](https://doi.org/10.1093/bioinformatics/btaa1081)<br/>\nTaedong Yun, Helen Li, Pi-Chuan Chang, Michael F. Lin, Andrew Carroll, and Cory\nY. McLean.<br/>\ndoi: https://doi.org/10.1093/bioinformatics/btaa1081\n\n## Why Use DeepVariant?\n\n*   **High accuracy** - DeepVariant won 2020\n    [PrecisionFDA Truth Challenge V2](https://precision.fda.gov/challenges/10/results)\n    for All Benchmark Regions for ONT, PacBio, and Multiple Technologies\n    categories, and 2016\n    [PrecisionFDA Truth Challenge](https://precision.fda.gov/challenges/truth/results)\n    for best SNP Performance. DeepVariant maintains high accuracy across data\n    from different sequencing technologies, prep methods, and species. For\n    [lower coverage](https://google.github.io/deepvariant/posts/2019-09-10-twenty-is-the-new-thirty-comparing-current-and-historical-wgs-accuracy-across-coverage/),\n    using DeepVariant makes an especially great difference. See\n    [metrics](docs/metrics.md) for the latest accuracy numbers on each of the\n    sequencing types.\n*   **Flexibility** - Out-of-the-box use for\n    [PCR-positive](https://ai.googleblog.com/2018/04/deepvariant-accuracy-improvements-for.html)\n    samples and\n    [low quality sequencing runs](https://blog.dnanexus.com/2018-01-16-evaluating-the-performance-of-ngs-pipelines-on-noisy-wgs-data/),\n    and easy adjustments for\n    [different sequencing technologies](https://google.github.io/deepvariant/posts/2019-01-14-highly-accurate-snp-and-indel-calling-on-pacbio-ccs-with-deepvariant/)\n    and\n    [non-human species](https://google.github.io/deepvariant/posts/2018-12-05-improved-non-human-variant-calling-using-species-specific-deepvariant-models/).\n*   **Ease of use** - No filtering is needed beyond setting your preferred\n    minimum quality threshold.\n*   **Cost effectiveness** - With a single non-preemptible n1-standard-16\n    machine on Google Cloud, it costs ~$11.8 to call a 30x whole genome and\n    ~$0.89 to call an exome. With preemptible pricing, the cost is $2.84 for a\n    30x whole genome and $0.21 for whole exome (not considering preemption).\n*   **Speed** - See [metrics](docs/metrics.md) for the runtime of all supported\n    datatypes on a 96-core CPU-only machine<\/sup>. Multiple options for\n    acceleration exist.\n*   **Usage options** - DeepVariant can be run via Docker or binaries, using\n    both on-premise hardware or in the cloud, with support for hardware\n    accelerators like GPUs and TPUs.\n\n<a name=\"myfootnote1\">(1)<\/a>: Time estimates do not include mapping.\n\n## How DeepVariant works\n\n![Stages in DeepVariant](docs/images/inference_flow_diagram.svg)\n\nFor more information on the pileup images and how to read them, please see the\n[\"Looking through DeepVariant's Eyes\" blog post](https://google.github.io/deepvariant/posts/2020-02-20-looking-through-deepvariants-eyes/).\n\nDeepVariant relies on [Nucleus](https://github.com/google/nucleus), a library of\nPython and C++ code for reading and writing data in common genomics file formats\n(like SAM and VCF) designed for painless integration with the\n[TensorFlow](https://www.tensorflow.org/) machine learning framework. Nucleus\nwas built with DeepVariant in mind and open-sourced separately so it can be used\nby anyone in the genomics research community for other projects. See this blog\npost on\n[Using Nucleus and TensorFlow for DNA Sequencing Error Correction](https://google.github.io/deepvariant/posts/2019-01-31-using-nucleus-and-tensorflow-for-dna-sequencing-error-correction/).\n\n## DeepVariant Setup\n\n### Prerequisites\n\n*   Unix-like operating system (cannot run on Windows)\n*   Python 3.10\n\n### Official Solutions\n\nBelow are the official solutions provided by the\n[Genomics team in Google Health](https://health.google/health-research/).\n\nName                                                                                                | Description\n:-------------------------------------------------------------------------------------------------: | -----------\n[Docker](docs/deepvariant-quick-start.md)           | This is the recommended method.\n[Build from source](docs/deepvariant-build-test.md) | DeepVariant comes with scripts to build it on Ubuntu 20.04. To build and run on other Unix-based systems, you will need to modify these scripts.\nPrebuilt Binaries                                                                                   | Available at [`gs://deepvariant/`](https://console.cloud.google.com/storage/browser/deepvariant). These are compiled to use SSE4 and AVX instructions, so you will need a CPU (such as Intel Sandy Bridge) that supports them. You can check the `/proc/cpuinfo` file on your computer, which lists these features under \"flags\".\n\n## Contribution Guidelines\n\nPlease [open a pull request](https://github.com/google/deepvariant/compare) if\nyou wish to contribute to DeepVariant. Note, we have not set up the\ninfrastructure to merge pull requests externally. If you agree, we will test and\nsubmit the changes internally and mention your contributions in our\n[release notes](https://github.com/google/deepvariant/releases). We apologize\nfor any inconvenience.\n\nIf you have any difficulty using DeepVariant, feel free to\n[open an issue](https://github.com/google/deepvariant/issues/new). If you have\ngeneral questions not specific to DeepVariant, we recommend that you post on a\ncommunity discussion forum such as [BioStars](https://www.biostars.org/).\n\n## License\n\n[BSD-3-Clause license](LICENSE)\n\n## Acknowledgements\n\nDeepVariant happily makes use of many open source packages. We would like to\nspecifically call out a few key ones:\n\n*   [Boost Graph Library](http://www.boost.org/doc/libs/1_65_1/libs/graph/doc/index.html)\n*   [abseil-cpp](https://github.com/abseil/abseil-cpp) and\n    [abseil-py](https://github.com/abseil/abseil-py)\n*   [pybind11](https://github.com/pybind/pybind11)\n*   [GNU Parallel](https://www.gnu.org/software/parallel/)\n*   [htslib & samtools](http://www.htslib.org/)\n*   [Nucleus](https://github.com/google/nucleus)\n*   [numpy](http://www.numpy.org/)\n*   [SSW Library](https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library)\n*   [TensorFlow](https://www.tensorflow.org/)\n\nWe thank all of the developers and contributors to these packages for their\nwork.\n\n## Disclaimer\n\nThis is not an official Google product.\n\nNOTE: the content of this research code repository (i) is not intended to be a\nmedical device; and (ii) is not intended for clinical use of any kind, including\nbut not limited to diagnosis or prognosis.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3346:345ED4:17273D:5C5FA9:6AB921B7"},"text_sha256":"8fea0a0be4741fd229242b3f574a0b03b02dd3b8687891110db7696bed7acea3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"apache/singa","input_row":{"repository":"apache/singa","url":"https://github.com/apache/singa","name":"singa","owner":"apache","description":"a distributed deep learning platform","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3606,"issues":114,"created_at":"2015-04-02T07:00:05Z","updated_at":"2026-09-21T07:57:37Z","first_commit_at":"2015-04-19T06:32:01Z","last_commit_at":"2026-07-07T14:09:27Z","activity_months":134.59999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:16.174Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apache/singa","visibility":"public","created_at":"2015-04-02T07:00:05Z","updated_at":"2026-09-21T07:57:37Z","private":false,"fork":false,"archived":false,"stargazers_count":3606,"open_issues_count":53,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3038","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AF:A9DC0:17AB717:1BCBE42:6AB92968"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3037","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:177204A:1B90F6F:6AB92968"},"commit":{"sha":"7d25ed93b4a05ef24ec73b8277945bd24db716d2","url":"https://github.com/apache/singa/commit/7d25ed93b4a05ef24ec73b8277945bd24db716d2","date":"2018-05-24T02:43:35Z","author_date":"2018-05-22T02:04:20Z","committer_date":"2018-05-24T02:43:35Z","tree_sha":"4f6877463ebad26d0af9753a2512b5fb4f6945c5","message_first_line":"SINGA-362 Add funcitons to support einsum function"},"tree_request_status":200,"tree_rate":{"github_remaining":"3036","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BC:7418C:180174E:1C22180:6AB92968"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":750,"blob_sha":"a2788e799ed914dbaf9e1c806a80866433e5ed25","priority":0}],"documents":[{"path":"README.md","size":750,"blob_sha":"a2788e799ed914dbaf9e1c806a80866433e5ed25","priority":0,"status":200,"text":"# Apache SINGA\n\n[![Build Status](https://travis-ci.org/apache/incubator-singa.png)](https://travis-ci.org/apache/incubator-singa)\n![License](http://img.shields.io/:license-Apache%202.0-blue.svg)\n\nDistributed deep learning system\n\n[http://singa.apache.org](http://singa.apache.org)\n\n## Quick Start\n\n* [Installation](doc/en/docs/installation.md)\n* [Examples](examples)\n\n## Issues\n\n* [JIRA tickets](https://issues.apache.org/jira/browse/SINGA)\n\n## Mailing Lists\n\n* [Development Mailing List](mailto:dev-subscribe@singa.incubator.apache.org) ([Archive](http://mail-archives.apache.org/mod_mbox/singa-dev/))\n* [Commits Mailing List](mailto:commits-subscribe@singa.incubator.apache.org) ([Archive](http://mail-archives.apache.org/mod_mbox/singa-commits/))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0B2:3BCC6:17516E:5C8AC1:6AB921B9"},"text_sha256":"384b9a77dea4b7fe1884d00167584dc29bb7de3a7463254d428f906b112e6d37"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3035","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0817:754BF:17BB9D3:1BDC4FA:6AB92969"},"commit":{"sha":"87d50ebf64483c6acf6b86084580d0f645634f85","url":"https://github.com/apache/singa/commit/87d50ebf64483c6acf6b86084580d0f645634f85","date":"2026-03-23T08:41:54Z","author_date":"2026-03-23T08:41:54Z","committer_date":"2026-03-23T08:41:54Z","tree_sha":"c1a967d3034615b147f8fd49a994678cf949de30","message_first_line":"Merge pull request #1380 from apache/dev-postgresql"},"tree_request_status":200,"tree_rate":{"github_remaining":"3034","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:17F20A9:1C12F74:6AB9296A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2571,"blob_sha":"685688145c0aa754164746444dad6cfdab9f7117","priority":0},{"path":"SECURITY.md","size":1054,"blob_sha":"4274f3cfe0bee608954f2147c472b244dfb40eae","priority":1}],"documents":[{"path":"README.md","size":2571,"blob_sha":"685688145c0aa754164746444dad6cfdab9f7117","priority":0,"status":200,"text":"<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with < this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n\n![Logo](doc/_static/singa.png)\n\n# Apache SINGA\n\n![Native Ubuntu build status](https://github.com/apache/singa/workflows/Native-Ubuntu/badge.svg)\n![Native Mac build status](https://github.com/apache/singa/workflows/Native-MacOS/badge.svg)\n![conda build status](https://github.com/apache/singa/workflows/conda/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/apache-singa/badge/?version=latest)](https://apache-singa.readthedocs.io/en/latest/?badge=latest)\n![License](http://img.shields.io/:license-Apache%202.0-blue.svg)\n[![Follow Apache SINGA on Twitter](https://img.shields.io/twitter/follow/apachesinga.svg?style=social&label=Follow)](https://twitter.com/ApacheSinga)\n[![Docker pulls](https://img.shields.io/docker/pulls/apache/singa.svg)](https://hub.docker.com/r/apache/singa/)\n\nDistributed deep learning system\n\n[http://singa.apache.org](http://singa.apache.org)\n\n## Quick Start\n\n* [Installation](http://singa.apache.org/docs/installation/)\n* [Examples](examples)\n\n## Issues\n\n* [JIRA tickets](https://issues.apache.org/jira/browse/SINGA)\n\n## Code Analysis:\n\n![LGTM C++ Grade](https://img.shields.io/lgtm/grade/cpp/github/apache/singa)\n![LGTM Python Grade](https://img.shields.io/lgtm/grade/python/github/apache/singa)\n[![codecov](https://codecov.io/gh/apache/singa/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/singa)\n\n[![Stargazers over time](https://starchart.cc/apache/singa.svg)](https://starchart.cc/apache/singa)\n\n## Mailing Lists\n\n* [Development Mailing List](mailto:dev-subscribe@singa.apache.org) ([Archive](http://mail-archives.apache.org/mod_mbox/singa-dev/))\n* [Commits Mailing List](mailto:commits-subscribe@singa.apache.org) ([Archive](http://mail-archives.apache.org/mod_mbox/singa-commits/))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"26B0:3A3DD:1730FF:5C6AA1:6AB921BA"},"text_sha256":"87d027bbce8d09512f05b7e0ec8c591e6f022027426e965cad539922a8e2a909"},{"path":"SECURITY.md","size":1054,"blob_sha":"4274f3cfe0bee608954f2147c472b244dfb40eae","priority":1,"status":200,"text":"<!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with < this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n-->\n\n# Security Policy\n\n## Reporting a Vulnerability\n\nUsers can report security vulnerabilities to [SINGA Security Team Mail List](mailto:security@singa.apache.org)\n\nFor more information, please visit:\n\nhttp://singa.apache.org/security\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FBE0:3AC15:17A884:5CE0DF:6AB921BA"},"text_sha256":"a68ca8eb821123ffbf09c6e21cff05340d2e07cede2bf317952271a19b5fc2f6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PennyLaneAI/pennylane","input_row":{"repository":"PennyLaneAI/pennylane","url":"https://github.com/PennyLaneAI/pennylane","name":"pennylane","owner":"PennyLaneAI","description":"PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry. Create meaningful quantum algorithms, from inspiration to implementation.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3476,"issues":1671,"created_at":"2018-04-17T16:45:42Z","updated_at":"2026-09-26T15:34:12Z","first_commit_at":"2018-04-17T16:43:10Z","last_commit_at":"2026-09-26T05:17:04Z","activity_months":101.3,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:19.435Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PennyLaneAI/pennylane","visibility":"public","created_at":"2018-04-17T16:45:42Z","updated_at":"2026-09-26T15:34:12Z","private":false,"fork":false,"archived":false,"stargazers_count":3476,"open_issues_count":448,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3033","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:17C89FE:1BE98E4:6AB9296B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3032","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085E:3C4024:17EED7D:1C0F8AF:6AB9296B"},"commit":{"sha":"17ae15da06fb6c316e295520a58cbbfa78f9f6c3","url":"https://github.com/PennyLaneAI/pennylane/commit/17ae15da06fb6c316e295520a58cbbfa78f9f6c3","date":"2018-05-18T13:25:29Z","author_date":"2018-05-18T13:25:29Z","committer_date":"2018-05-18T13:25:29Z","tree_sha":"0caae5afae98fa43a871d949a2b80ca2d549dc64","message_first_line":"Dataflow graph ideas."},"tree_request_status":200,"tree_rate":{"github_remaining":"3031","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F3:3203A7:178317A:1BA3A31:6AB9296C"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1596,"blob_sha":"2c4b68ea5c5f7380f5f841060bfe6ef2df02abf0","priority":0}],"documents":[{"path":"README.rst","size":1596,"blob_sha":"2c4b68ea5c5f7380f5f841060bfe6ef2df02abf0","priority":0,"status":200,"text":"OpenQML\n#######\n\nOpenQML is a Python quantum machine learning library by Xanadu Inc.\n\n\nFeatures\n========\n\n\nDependencies\n============\n\nOpenQML depends on the following Python packages: TODO FIXME\n\n* `Python <http://python.org/>`_ >=3.5\n* `NumPy <http://numpy.org/>`_  >=1.13.3\n* `SciPy <http://scipy.org/>`_  >=1.0.0\n* `NetworkX <http://networkx.github.io/>`_ >=2.0\n* `Tensorflow <https://www.tensorflow.org/>`_ >=1.3\n\nThese can be installed using pip, or, if on linux, using your package manager (i.e. ``apt`` if on a Debian-based system.)\n\n\nInstallation\n============\n\n\nSoftware tests\n==============\n\n\nDocumentation\n=============\n\nTo build the documentation locally, the following additional packages are required:\n\n* `Sphinx <http://sphinx-doc.org/>`_ >=1.6\n* `graphviz <http://graphviz.org/>`_ >=2.38\n* `sphinxcontrib-bibtex <https://sphinxcontrib-bibtex.readthedocs.io/en/latest/>`_ >=0.3.6\n\nIf using Ubuntu, they can be installed via a combination of ``apt`` and ``pip``:\n::\n\n    $ sudo apt install graphviz\n    $ pip3 install sphinx --user\n    $ pip3 install sphinxcontrib-bibtex --user\n\nTo build the HTML documentation, go to the top-level directory and run the command\n::\n\n  $ make html\n\nThe documentation can then be found in the ``doc/_build/html/`` directory.\n\nAuthors\n=======\n\nVille Bergholm, Nathan Killoran and Maria Schuld.\n\n\nSupport\n=======\n\n- **Source Code:** https://github.com/XanaduAI/openqml\n- **Issue Tracker:** https://github.com/XanaduAI/openqml/issues\n\nIf you are having issues, please let us know by posting the issue on our Github issue tracker.\n\n\nLicense\n=======\n\nTODO\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4D4:241B62:1739A4:5C73D0:6AB921BC"},"text_sha256":"c07a43434501b175524f6540040535b411b1cc712d4b1310ba92a61d6bed2f41"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3030","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08ED:74C18:17F6A50:1C178FE:6AB9296C"},"commit":{"sha":"bbe312d53c315da265f9e941a84c7555ffdf242c","url":"https://github.com/PennyLaneAI/pennylane/commit/bbe312d53c315da265f9e941a84c7555ffdf242c","date":"2026-06-30T21:53:58Z","author_date":"2026-06-30T21:53:58Z","committer_date":"2026-06-30T21:53:58Z","tree_sha":"fc626adfe3b858c345f9866d30b252b70f7117b9","message_first_line":"Add validation for checking overlap between hybrid and compilable argnames (#9746)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3029","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:17999E7:1BBA461:6AB9296D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8667,"blob_sha":"317bc6f30ff267ec7ae0fd2db0a708515553bdeb","priority":0},{"path":".github/workflows/code_security_scan.yml","size":832,"blob_sha":"bff41201dce84b6e39e2b91212c2dc45e7e57a6a","priority":1},{"path":"AI_Policy.md","size":7781,"blob_sha":"ea2fe15d45d11a9e2a7c3729b138eb8a252f2ba1","priority":1}],"documents":[{"path":"README.md","size":8667,"blob_sha":"317bc6f30ff267ec7ae0fd2db0a708515553bdeb","priority":0,"status":200,"text":"<p align=\"center\">\n  <!-- Tests (GitHub actions) -->\n  <a href=\"https://github.com/PennyLaneAI/pennylane/actions?query=workflow%3ATests\">\n    <img src=\"https://img.shields.io/github/actions/workflow/status/PennyLaneAI/PennyLane/tests.yml?branch=main&style=flat-square\" />\n  <\/a>\n  <!-- CodeCov -->\n  <a href=\"https://codecov.io/gh/PennyLaneAI/pennylane\">\n    <img src=\"https://img.shields.io/codecov/c/github/PennyLaneAI/pennylane/main.svg?logo=codecov&style=flat-square\" />\n  <\/a>\n  <!-- ReadTheDocs -->\n  <a href=\"https://docs.pennylane.ai/en/latest\">\n    <img src=\"https://readthedocs.com/projects/xanaduai-pennylane/badge/?version=latest&style=flat-square\" />\n  <\/a>\n  <!-- PyPI -->\n  <a href=\"https://pypi.org/project/PennyLane\">\n    <img src=\"https://img.shields.io/pypi/v/PennyLane.svg?style=flat-square\" />\n  <\/a>\n  <!-- Forum -->\n  <a href=\"https://discuss.pennylane.ai\">\n    <img src=\"https://img.shields.io/discourse/https/discuss.pennylane.ai/posts.svg?logo=discourse&style=flat-square\" />\n  <\/a>\n  <!-- License -->\n  <a href=\"https://www.apache.org/licenses/LICENSE-2.0\">\n    <img src=\"https://img.shields.io/pypi/l/PennyLane.svg?logo=apache&style=flat-square\" />\n  <\/a>\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://pennylane.ai\">PennyLane<\/a> is an open-source quantum software platform for\n<a href=\"https://pennylane.ai/qml/quantum-computing/\">quantum computing<\/a>,\n  <a href=\"https://pennylane.ai/topics/quantum-machine-learning\">quantum machine learning<\/a>,\n  and\n  <a href=\"https://pennylane.ai/topics/hamiltonian-simulation\">quantum chemistry<\/a>.\n<\/p>\n\n<p align=\"center\">\n  Create meaningful quantum algorithms, from inspiration to implementation.\n  <img src=\"https://raw.githubusercontent.com/PennyLaneAI/pennylane/main/doc/_static/readme/pl-logo-lightmode.png#gh-light-mode-only\" width=\"700px\">\n    <!--\n    Use a relative import for the dark mode image. When loading on PyPI, this\n    will fail automatically and show nothing.\n    -->\n    <img src=\"./doc/_static/readme/pl-logo-darkmode.png#gh-dark-mode-only\" width=\"700px\" onerror=\"this.style.display='none'\" alt=\"\"/>\n<\/p>\n\n\n## Key Features\n\n<img src=\"https://raw.githubusercontent.com/PennyLaneAI/pennylane/main/doc/_static/code.png\" width=\"400px\" align=\"right\">\n\n\n- <strong>*Inspiration to implementation, quickly.*<\/strong>\n\n  Quantum computing can be complex — PennyLane makes it natural. Leverage the world’s largest library of [research demos](https://pennylane.ai/qml/demonstrations), [interactive tutorials](https://pennylane.ai/codebook/), and state-of-the-art components to build algorithms in [quantum chemistry](https://docs.pennylane.ai/en/stable/introduction/chemistry.html), quantum information, [optimization](https://pennylane.ai/qml/demos/tutorial_dqi), and [quantum machine learning](https://pennylane.ai/topics/quantum-machine-learning).\n\n- <strong>*Fast where it matters. Scalable where it counts.*<\/strong>\n\n  Whether executing, compiling, or analyzing, PennyLane is fast. Unlock production-grade performance with [industrial resource estimation](https://pennylane.ai/qml/demos/re_how_to_use_pennylane_for_resource_estimation) and the [Catalyst compiler](https://github.com/PennyLaneAI/Catalyst). Scale up your workflows with the [high-performance Lightning simulators](https://pennylane.ai/performance) on GPUs, supercomputers, and the cloud.\n\n- <strong>*Hardware agnostic, hardware ready.*<\/strong>\n\n  PennyLane integrates with a wide range of [quantum hardware devices](https://pennylane.ai/devices). Whether superconducting qubits, trapped ion systems, neutral atoms, or photonics, PennyLane provides the tools to [estimate resources](https://pennylane.ai/qml/demos/re_how_to_use_pennylane_for_resource_estimation) and [compile circuits](https://pennylane.ai/topics/quantum-compilation) specifically for the [hardware devices](https://pennylane.ai/topics/quantum-hardware) of today—and tomorrow!\n\n- <strong>*Participate, collaborate, innovate.*<\/strong>\n\n  PennyLane is the world’s most [active quantum community](https://pennylane.ai/get-involved). You're part of a global network of [researchers](https://pennylane.ai/research), [developers](https://pennylane.ai/features), and [educators](https://pennylane.ai/education) actively defining the frontier of quantum computing. Whether quantum is your day job or you’re getting your first taste at a [hackathon](https://pennylane.ai/challenges), you’re backed by the [most responsive community](https://discuss.pennylane.ai) in the field.\n\nFor more details and additional features, please see the [PennyLane website](https://pennylane.ai/features/) and our most recent [release notes](https://docs.pennylane.ai/en/stable/development/release_notes.html).\n\n## Installation\n\nPennyLane requires Python version 3.11 and above. Installation of PennyLane, as well as all\ndependencies, can be done using pip:\n\n```console\npython -m pip install pennylane\n```\n\n## Docker support\n\nDocker images are found on the [PennyLane Docker Hub page](https://hub.docker.com/u/pennylaneai), where there is also a detailed description about PennyLane Docker support. [See description here](https://docs.pennylane.ai/projects/lightning/en/stable/dev/docker.html) for more information.\n\n## Getting started\n\nGet up and running quickly with PennyLane by following our [interactive tutorials](https://pennylane.ai/codebook/pennylane-fundamentals) and [quickstart guide](https://pennylane.ai/features), designed to introduce key features and help you start building quantum circuits right away.\n\nWhether you're exploring quantum machine learning, quantum computing, or quantum chemistry, PennyLane offers a wide range of tools and resources to support your research.\n\n<img src=\"https://raw.githubusercontent.com/PennyLaneAI/pennylane/main/doc/_static/readme/research.png\" align=\"right\" width=\"350px\">\n\n### Key Resources\n\n* [Library of research demos](https://pennylane.ai/qml/demonstrations)\n* [Learn Quantum Programming](https://pennylane.ai/qml/) with the [Codebook](https://pennylane.ai/codebook/) and [Coding Challenges](https://pennylane.ai/challenges/)\n* [PennyLane Discussion Forum](https://discuss.pennylane.ai)\n\nYou can also check out our [documentation](https://pennylane.readthedocs.io), and detailed [developer guides](https://docs.pennylane.ai/en/stable/development/guide.html).\n\n## Demos\n\nTake a deeper dive into quantum computing by exploring quantum computing research with the [PennyLane Demos](https://pennylane.ai/qml/demonstrations)—covering fundamental quantum concepts alongside the latest quantum algorithm research results.\n\nIf you would like to contribute your own demo, see our [demo submission\nguide](https://pennylane.ai/qml/demos_submission).\n\n<a href=\"https://pennylane.ai/qml/demonstrations\">\n  <img src=\"https://raw.githubusercontent.com/PennyLaneAI/pennylane/main/doc/_static/readme/demos.png\" width=\"900px\">\n<\/a>\n\n\n## Contributing to PennyLane\n\nWe welcome contributions—simply fork the PennyLane repository, and then make a [pull\nrequest](https://help.github.com/articles/about-pull-requests/) containing your contribution. All\ncontributors to PennyLane will be listed as authors on the releases.\n\nWe also encourage bug reports, suggestions for new features and enhancements, and even links to cool\nprojects or applications built on PennyLane.\n\nSee our [contributions\npage](https://github.com/PennyLaneAI/pennylane/blob/main/.github/CONTRIBUTING.md) and our\n[Development guide](https://pennylane.readthedocs.io/en/stable/development/guide.html) for more\ndetails.\n\n## Support\n\n- **Source Code:** https://github.com/PennyLaneAI/pennylane\n- **Issue Tracker:** https://github.com/PennyLaneAI/pennylane/issues\n\nIf you are having issues, please let us know by posting the issue on our GitHub issue tracker.\n\nJoin the [PennyLane Discussion Forum](https://discuss.pennylane.ai/) to connect with the quantum community, get support, and engage directly with our team. It’s the perfect place to share ideas, ask questions, and collaborate with fellow researchers and developers!\n\nNote that we are committed to providing a friendly, safe, and welcoming environment for all.\nPlease read and respect the [Code of Conduct](.github/CODE_OF_CONDUCT.md).\n\n## Authors\n\nPennyLane is the work of [many contributors](https://github.com/PennyLaneAI/pennylane/graphs/contributors).\n\nIf you are doing research using PennyLane, please cite [our paper](https://arxiv.org/abs/1811.04968):\n\n> Ville Bergholm et al. *PennyLane: Automatic differentiation of hybrid quantum-classical\n> computations.* 2018. arXiv:1811.04968\n\n## License\n\nPennyLane is **free** and **open source**, released under the Apache License, Version 2.0.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C29A:324E19:17B623:5CF00D:6AB921BE"},"text_sha256":"8c14912b07724a11d406e3a4f7edf3f2a47c04150af3c826f44c74e6a7c78c11"},{"path":".github/workflows/code_security_scan.yml","size":832,"blob_sha":"bff41201dce84b6e39e2b91212c2dc45e7e57a6a","priority":1,"status":200,"text":"name: Code Security Scan\npermissions:\n  contents: read\non:\n  pull_request:\n  push:\n    branches:\n      - main\n\nconcurrency:\n  group: code-security-scan-${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs: \n  code_security_scan:\n    if: github.event.pull_request.draft == false\n    uses: XanaduAI/cloud-actions/.github/workflows/static_code_vulnerability_analysis.yml@main\n    with:\n      github-repository: ${{ github.repository }}\n      repository-ref: ${{ github.ref }}\n      runner_name: ubuntu-latest\n      bandit-config-file: pyproject.toml\n      scan_directory: pennylane\n      \n      # We error out CI if any high-severity issues are found\n      # All other errors are still printed to logs\n      semgrep-error-on-impact: HIGH\n      semgrep-error-on-severity: ERROR\n      bandit-error-on-severity: HIGH\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A55A:1F1FB6:177658:5CAFA6:6AB921BE"},"text_sha256":"68117938c598f681e00491750ae5e228ca83d5fa3c59a2b56df96ec20c90da64"},{"path":"AI_Policy.md","size":7781,"blob_sha":"ea2fe15d45d11a9e2a7c3729b138eb8a252f2ba1","priority":1,"status":200,"text":"# PennyLane AI Tool Use Policy\n\nThis document closely follows the [LLVM AI Tool Use Policy](https://github.com/llvm/llvm-project/pull/154441/), with minor adaptations for our ecosystem, and will be applicable across PennyLane, Lightning and Catalyst.\n\n## Policy\n\nPennyLane ecosystem’s policy is that contributors can use whatever tools they would like to craft their contributions, but there must be a **human in the loop**. **Contributors must read and review all LLM-generated code or text before they ask other project members to review it.** The contributor is always the author and is fully accountable for their contributions (for further clarification, please see the Copyright section). Contributors should be sufficiently confident that the contribution is high enough quality that asking for a review is a good use of scarce maintainer time, and they should be **able to answer questions about their work** during review.\n\nWe expect that new contributors will be less confident in their contributions, and our guidance to them is to \\*\\*start with small contributions\\*\\* that they can fully understand to build confidence. We aspire to be a welcoming community that helps new contributors grow their expertise, but learning involves taking small steps, getting feedback, and iterating. Passing maintainer feedback to an LLM doesn't help anyone grow, and does not sustain our community.\n\nContributors are expected to **be transparent and label contributions that contain substantial amounts of tool-generated content**. Our policy on labelling is intended to facilitate reviews, and not to track which parts of the PennyLane ecosystem are generated. Contributors should note tool usage in their pull request description, commit message, or wherever authorship is normally indicated for the work. For instance, use a commit message trailer like \n\n```\nAssisted-by: <name of code assistant>\n```\n\nThis transparency helps the community develop best practices and understand the role of these new tools.\n\nThis policy includes, but is not limited to, the following kinds of contributions:\n\n- Code, usually in the form of a pull request  \n- Issues or security vulnerabilities  \n- Comments and feedback on pull requests\n\n## Details\n\nTo ensure sufficient self review and understanding of the work, it is strongly recommended that contributors write PR descriptions themselves (if needed, using tools for translation or copy-editing). The description should explain the motivation, implementation approach, expected impact, and any open questions or uncertainties to the same extent as a contribution made without tool assistance.\n\nAn important implication of this policy is that it bans agents that take action in our digital spaces without human approval, such as the GitHub [`@claude` agent](https://github.com/claude/). Similarly, automated review tools that publish comments without human review are not allowed. However, an opt-in review tool that **keeps a human in the loop** is acceptable under this policy. As another example, using an LLM to generate documentation, which a contributor manually reviews for correctness, edits, and then posts as a PR, is an approved use of tools under this policy.\n\nAI tools must not be used to fix GitHub issues labelled `good first issue`. These issues are generally not urgent, and are intended to be learning opportunities for new contributors to get familiar with the codebase. Whether you are a newcomer or not, fully automating the process of fixing this issue squanders the learning opportunity and doesn't add much value to the project. **Using AI tools to fix issues labelled as \"good first issues\" is forbidden**.\n\n## Extractive Contributions\n\nThe reason for our \"human-in-the-loop\" contribution policy is that processing patches, PRs, RFCs, and comments to open-source software repositories are not free -- it takes a lot of maintainer time and energy to review those contributions! Sending the unreviewed output of an LLM to open source project maintainers ***extracts*** work from them in the form of design and code review, so we call this kind of contribution an \"extractive contribution\".\n\nOur **golden rule** is that a contribution should be worth more to the project than the time it takes to review it.\n\n## Handling Violations\n\nIf a maintainer judges that a contribution doesn't comply with this policy, they should paste the following response to request changes:\n\n```\nThis PR doesn't appear to comply with our policy on tool-generated content,and requires additional justification for why it is valuable enough to the project for us to review it. \nPlease see our developer policy on AI-generated contributions: http://pennylane.ai/docs/AIToolPolicy.html\n```\n\nThe best way to make a change less extractive and more valuable is to reduce its size or complexity or to increase its usefulness to the community. These factors are impossible to weigh objectively, and our project policy leaves this determination up to the maintainers of the project, i.e., those who are doing the work of sustaining the project.\n\nIf or when it becomes clear that a GitHub issue or PR is off-track and not moving in the right direction, maintainers should apply the **`extractive`** label to help other reviewers prioritize their review time.\n\nIf a contributor responds but doesn't make their change meaningfully less extractive, maintainers should escalate to the relevant moderation or admin team for the space to lock the conversation.\n\n## Copyright\n\nArtificial intelligence/large-language model systems raise many questions around copyright that have yet to be answered. Our policy on AI/LLM tools is as follows:\n\nContributors are responsible for ensuring that they have the right to contribute code under the terms of our license, typically meaning that either they, their employer, or their collaborators hold the copyright. Using AI/LLM tools to regenerate copyrighted material does not remove the copyright, and contributors are responsible for ensuring that such material does not appear in their contributions. Contributions found to violate this policy will be removed just like any other offending contribution.\n\n## References\n\nOur policy was informed largely by experience in the LLVM community, with the aforementioned guidelines available at [https://github.com/llvm/llvm-project/pull/154441/](https://github.com/llvm/llvm-project/pull/154441/), which falls under Apache 2.0, and is attributed here.\n\nIn addition, the community references the following source for experiences with these tools, and provides justification for the above policies. We follow the LLVM guidelines, and also list the following reference material as source of the above points:\n\n- [Fedora Council Policy Proposal: Policy on AI-Assisted Contributions (fetched 2025-10-01)](https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/): Some of the text above was copied from the Fedora  \n  project policy proposal, which is licensed under the [Creative Commons  \n  Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). This link serves as attribution.\n- [Rust draft policy on burdensome PRs](https://github.com/rust-lang/compiler-team/issues/893)\n- [Seth Larson's post](https://sethmlarson.dev/slop-security-reports) on slop security reports in the Python ecosystem.\n- [Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/).  \n- [QEMU bans use of AI content generators](https://www.qemu.org/docs/master/devel/code-provenance.html\\#use-of-ai-content-generators)  \n- [Slop is the new name for unwanted AI-generated content](https://simonwillison.net/2024/May/8/slop/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D7D2:18CDF1:172599:54F9C9:6AB921BE"},"text_sha256":"08e4267724c21a1f3c909f3be4186886653ce23ffed85463b9a41470ff899688"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"richzhang/colorization","input_row":{"repository":"richzhang/colorization","url":"https://github.com/richzhang/colorization","name":"colorization","owner":"richzhang","description":"Automatic colorization using deep neural networks. \"Colorful Image Colorization.\" In ECCV, 2016.","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":3464,"issues":104,"created_at":"2016-03-26T02:33:33Z","updated_at":"2026-09-27T07:25:29Z","first_commit_at":"2016-03-26T02:38:15Z","last_commit_at":"2020-09-10T21:34:06Z","activity_months":53.539999999999999,"ai_ml_match_topics":"deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:22.960Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"richzhang/colorization","visibility":"public","created_at":"2016-03-26T02:33:33Z","updated_at":"2026-09-27T07:25:29Z","private":false,"fork":false,"archived":false,"stargazers_count":3464,"open_issues_count":60,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"3028","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17C0507:1BE1173:6AB9296E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3027","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0869:1DB627:185E0D3:1C7EF7D:6AB9296F"},"commit":{"sha":"815b3f7808f8f2d9d683e9ed6c5b0a39bec232fb","url":"https://github.com/richzhang/colorization/commit/815b3f7808f8f2d9d683e9ed6c5b0a39bec232fb","date":"2018-02-25T18:25:27Z","author_date":"2018-02-25T18:25:27Z","committer_date":"2018-02-25T18:25:27Z","tree_sha":"047106b035c9b1716a85675610c6ad6140fa7868","message_first_line":"Update caffe_traininglayers.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"3026","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:1801BA5:1C226D4:6AB9296F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11307,"blob_sha":"604b0df5676fdb986853dc3671c534fc30c74f79","priority":0}],"documents":[{"path":"README.md","size":11307,"blob_sha":"604b0df5676fdb986853dc3671c534fc30c74f79","priority":0,"status":200,"text":"<!--<h3><b>Colorful Image Colorization<\/b><\/h3>-->\n## <b>Colorful Image Colorization<\/b> [[Project Page]](http://richzhang.github.io/colorization/) <br>\n[Richard Zhang](https://richzhang.github.io/), [Phillip Isola](http://web.mit.edu/phillipi/), [Alexei A. Efros](http://www.eecs.berkeley.edu/~efros/). In [ECCV, 2016](http://arxiv.org/pdf/1603.08511.pdf).\n\n![Teaser Image](http://richzhang.github.io/colorization/resources/images/teaser4.jpg)\n\n### Overview ###\nThis repository contains:\n\n<b>Colorization-centric functionality<\/b>\n - (0) a test time script to colorize an image (python script)\n - (1) a test time demonstration (IPython Notebook)\n - (2) code for training a colorization network\n - (3) links to our results on the ImageNet test set, along with a pointer to AMT real vs fake test code\n\n<b>Representation Learning-centric functionality<\/b>\n - (4) pre-trained AlexNet, used for representation learning tests (Section 3.2)\n - (5) code for training AlexNet with colorization\n - (6) representation learning tests\n\n<b>Appendices<\/b>\n - (A) Related follow-up work\n\n### Clone this repository ###\nClone the master branch of the respository using `git clone -b master --single-branch https://github.com/richzhang/colorization.git`\n\n### Dependencies ###\nThis code requires a working installation of [Caffe](http://caffe.berkeleyvision.org/) and basic Python libraries (numpy, pyplot, skimage, scipy). For guidelines and help with installation of Caffe, consult the [installation guide](http://caffe.berkeleyvision.org/) and [Caffe users group](https://groups.google.com/forum/#!forum/caffe-users).\n\n## Colorization-centric Functionality ##\n\n### (0) Test-Time Python Script ###\nWe provide a script for colorizing a single image. Run `./models/fetch_release_models.sh` to download the model. Then, run `python ./colorize.py -img_in [[INPUT_IMG_PATH]] -img_out [[OUTPUT_IMG_PATH]]`. For example, try `python ./colorize.py -img_in ./demo/imgs/ILSVRC2012_val_00041580.JPEG -img_out ./out.png`.\n\n### (1) Test-Time Demo in IPython Notebook ###\nWe also include demo usage as an iPython notebook, under [`./demo/colorization_demo_v2.ipynb`](https://github.com/richzhang/colorization/blob/master/demo/colorization_demo_v2.ipynb). This IPython Notebook demonstrates how to use our colorization network to colorize a grayscale image. To run this, after cloning the directory, `cd` into the `demo` directory, run `ipython notebook` and open `colorization_demo_v2.ipynb` in your web browser.\n\n### (2) Training Usage ###\nThe following contains instructions for training a colorization network from scratch. After cloning the repository, from the root directory:\n\n(1) Run `./train/fetch_init_model.sh`. This will load model `./models/init_v2.caffemodel`. This model was obtained using the k-means initialization implemented in [Kraehenbuehl et al, ICLR 2016](https://github.com/philkr/magic_init).\n\n(2) Run `./train/fetch_caffe.sh`. This will load a modified Caffe into directory `./caffe-colorization`. For guidelines and help with installation of Caffe, consult the [installation guide](http://caffe.berkeleyvision.org/) and [Caffe users group](https://groups.google.com/forum/#!forum/caffe-users).\n\n(3) Add the `./resources/` directory (as an absolute path) to your system environment variable $PYTHONPATH. This directory contains custom Python layers.\n\n(4) Modify paths in data layers `./models/colorization_train_val_v2.prototxt` to locate where ImageNet LMDB files are on your machine. These should be BGR images, non-mean centered, in [0,255].\n\n(5) Run `./train/train_model.sh [GPU_ID]`, where `[GPU_ID]` is the gpu you choose to specify. Notes about training:\n\n(a) Training completes around 450k iterations. Training is done on mirrored and randomly cropped 176x176 resolution images, with mini-batch size 40.\n\n(b) Snapshots every 1000 iterations will be saved in `./train/models/colornet_iter_[ITERNUMBER].caffemodel` and `./train/models/colornet_iter_[ITERNUMBER].solverstate`.\n\n(c) If training is interupted, resume training by running `./train/train_resume.sh ./train/models/colornet_iter_[ITERNUMBER].solverstate [GPU_ID]`, where `[ITERNUMBER]` is the last snapshotted model.\n\n(d) Check validation loss by running `./val_model.sh ./train/models/colornet_iter_[ITERNUMBER].caffemodel [GPU_ID] 1000`, where [ITERNUMBER] is the model you would like to validate. This runs the first 10k imagenet validation images at full 256x256 resolution through the model. Validation loss on `colorization_release_v2.caffemodel` is 7715.\n\n(e) Check model outputs by running the IPython notebook demo. Replace the release model with your snapshotted model.\n\n(f) To download reference pre-trained model, run `./models/fetch_release_models.sh`. This will load reference model `./models/colorization_release_v2.caffemodel`. This model used to generate results in the [ECCV 2016 camera ready](arxiv.org/pdf/1603.08511.pdf).\n\nFor completeness, this will also load model `./models/colorization_release_v2_norebal.caffemodel`, which is was trained without class rebalancing. This model will provide duller but \"safer\" colorizations. This will also load model `./models/colorization_release_v1.caffemodel`, which was used to generate the results in the [arXiv v1](arxiv.org/pdf/1603.08511v1.pdf) paper.\n\n### (3) Results / Real vs Fake Test ###\n\nTo run the \"real vs fake\" Amazon Mechanical Turk test (Table 1 of the paper), see [this repository]( https://github.com/phillipi/AMT_Real_vs_Fake). See line 1 of the **Usage** section. Corresponding paths are: [Ours (full)](http://colorization.eecs.berkeley.edu/imgs/classrebal_turk_imgs_438000/), [Ours (class, no rebal)](http://colorization.eecs.berkeley.edu/imgs/classnorebal_turk_imgs_446000/), [Ours (L2)](http://colorization.eecs.berkeley.edu/imgs/regress_turk_imgs_534000/), [Ours (L2, ft from class)](http://colorization.eecs.berkeley.edu/imgs/regressft_turk_imgs_312000/), [Ground Truth](http://colorization.eecs.berkeley.edu/imgs/gt_imgs_0/).\n\n## Representation Learning-centric Functionality ##\n\n### (4) Pre-trained Representation Learning models ###\n\n(1) Run `./models/fetch_alexnet_model.sh`. This will load the following model variants into `./models/`\n<!-- (i) `alexnet_release_450000.caffemodel` - resulting model after training -->\n<!-- (ii) `alexnet_release_450000_nobn.caffemodel` - batchnorms absorbed into conv layers -->\n(i) `alexnet_release_450000_nobn_rs.caffemodel` - fully convolutional model, used for ILSVRC 2012 linear readoff, PASCAL classification, and PASCAL segmentation tests\n<!-- model with rescaling from [Kraehenbuehl et al, ICLR 2016](https://github.com/philkr/magic_init) -->\n(ii) `alexnet_release_450000_nobn_fc_rs.caffemodel` - same as above, with `fc6,fc7` as `InnerProduct` layers instead of `Convolution` layers; used for PASCAL detection tests\n\n(2) You have two choices:\n\n(i) If you do the color conversion into Lab space outside of the network, use prototxt `./models/alexnet_deploy_lab.prototxt, ./models/alexnet_deploy_lab_fc.prototxt`. The input blob will be an image in Lab color space.\n\n(ii) If you wish to do the color conversion inside of the network, use prototxt `./models/alexnet_deploy.prototxt, ./models/alexnet_deploy_fc.prototxt`. The input should be BGR images, non-mean centered, in [0,255]. You will have to follow Caffe installation (described in step (2) in Section 2).\n\n### (5) Training AlexNet with Colorization ###\n\n(0) Link training and validation lmdbs to `./data/caffe-train-lmdb/` and `./data/caffe-val-lmdb/`, respectively.\n\n(1) Run `./train_alexnet/run_init.sh`. This runs the k-means initialization implemented in [Kraehenbuehl et al, ICLR 2016](https://github.com/philkr/magic_init) and will create model `./train_alexnet/mi.caffemodel`.\n\n(2) Run `./train_alexnet/train_model.sh [GPU_ID]`. Training takes 2 sec/iter = 10.5 days/450k iters on a Titan X PASCAL.\n\n(3) Run `./postprocess_model.sh [GPU_ID] 450000` (or an intermediate iteration number). This script will...\n(a) Absorb batch norm, save a model into `./train_alexnet/colornet_iter_450000_nobn.caffemodel`\n(b) Rescaling with [Kraehenbuehl et al, ICLR 2016](https://github.com/philkr/magic_init), save a model into `./train_alexnet/colornet_iter_450000_nobn_rs.caffemodel`\n(c) Save a model with `fc6,fc7` layers into `colornet_iter_450000_nobn_rs_fc.caffemodel`\n\n### (6) Representation Learning Tests ###\n\nThe provided scripts run representation learning tests. Note that the scripts run on release models. Modify scripts accordingly if you want to test your own trained model.\n\n(A) <b>ILSVRC Linear Classification<\/b> Run `./feature_learning_tests/linear/run_linear_tests.sh [GPU_ID]`. This will save results in `./feature_learning_tests/linear/test_acc_log`. Training takes roughly 0.25 sec/iter = 10 hrs/140k iters on a Titan X Pascal. Note that this test was slightly changed from the ECCV paper (instead of average pooling, we do bilinear resizing here). The updated test was used in our [Split-Brain Autoencoder paper](https://richzhang.github.io/splitbrainauto/). File `./feature_learning_tests/linear/test_acc_log/loss_log` shows results for layers `conv1, pool1, conv2, pool2, conv3, conv4, conv5, pool5`.\n\n(B) <b> PASCAL Classification <\/b>\n(a) Clone [VOC-Classification Repo](https://github.com/jeffdonahue/voc-classification). Set up directories as instructed.\n(b) Run `./feature_learning_tests/run_classification_test_[LAYER].sh [PATH_TO train_cls.py] [GPU_ID]`, where `[LAYER]` is `{fc7,pool5,conv1}`, depending on which layers you would like to fine-tune from. Results will be printed on console. The value of interest is the 10-crops on the test set. This will also generate directories `./feature_learning_tests/classification/[LAYER]`. Each test takes ~30-60 minutes on a Titan X Pascal.\n\n(C) <b> PASCAL Segmentation <\/b>\nThis code borrows from the [FCN repo](https://github.com/shelhamer/fcn.berkeleyvision.org). Prepare data as instructed. Then run `./run_segmentation.sh [GPU_ID]`. Results will be printed every 1000 iterations on screen. Training takes ~1 sec/iter = 44 hours/150k iterations on a Titan X Pascal.\n\n(D) <b> PASCAL Detection <\/b>\nWe use [Fast R-CNN](https://github.com/rbgirshick/fast-rcnn) with multi-scale training and single scale testing. Run for 150k total iterations, dropping the LR by a factor of 10 every 50k iterations. This was to follow the Kraehenbuehl et al. ICLR 2016 procedure. Set `__C.PIXEL_MEANS = np.array([[[0,0,0]]])`.\n\n## Related follow-up work ##\n\nInteractive Colorization: <b>Real-Time User-Guided Image Colorization with Learned Deep Priors.<\/b> R. Zhang*, J.Y. Zhu*, P. Isola, X. Geng, A. S. Lin, T. Yu, A. A. Efros. In CVPR, 2017. [Website](https://richzhang.github.io/ideepcolor/)[GitHub](https://github.com/junyanz/ideepcolor)\n\nRepresentation Learning: <b>Split-Brain Autoencoders: Unsupervised Prediction by Cross-Channel Prediction.<\/b> R. Zhang, P. Isola, A. A. Efros. In SIGGRAPH, 2017. [Website](https://richzhang.github.io/splitbrainauto/)[GitHub](https://github.com/richzhang/splitbrainauto)\n\n### Citation ###\nIf you find this model useful for your resesarch, please use this [bibtex](http://richzhang.github.io/colorization/resources/bibtex_eccv2016_colorization.txt) to cite.\n\n### Misc ###\nContact Richard Zhang at rich.zhang at eecs.berkeley.edu for any questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"629E:3D501:17F304:5D2D41:6AB921C0"},"text_sha256":"ffd3aa34e8627d8600229b740c078413546b03b7044b9cfc02d44425afd8c049"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3025","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081F:14A1F2:17FDAF2:1C1E7DD:6AB92970"},"commit":{"sha":"4f6009ed1495b1300231ebeb41cc4015557ddef7","url":"https://github.com/richzhang/colorization/commit/4f6009ed1495b1300231ebeb41cc4015557ddef7","date":"2020-09-10T21:34:06Z","author_date":"2020-09-10T21:34:06Z","committer_date":"2020-09-10T21:34:06Z","tree_sha":"a90f4503a8f2dd7cc327edcdf072795532616248","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"3024","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:17F6CDA:1C17BFA:6AB92970"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2724,"blob_sha":"49ea7220030944da01f966fab32b8fa55bdd8662","priority":0}],"documents":[{"path":"README.md","size":2724,"blob_sha":"49ea7220030944da01f966fab32b8fa55bdd8662","priority":0,"status":200,"text":"<!--<h3><b>Colorful Image Colorization<\/b><\/h3>-->\n## <b>Colorful Image Colorization<\/b> [[Project Page]](http://richzhang.github.io/colorization/) <br>\n[Richard Zhang](https://richzhang.github.io/), [Phillip Isola](http://web.mit.edu/phillipi/), [Alexei A. Efros](http://www.eecs.berkeley.edu/~efros/). In [ECCV, 2016](http://arxiv.org/pdf/1603.08511.pdf).\n\n**+ automatic colorization functionality for Real-Time User-Guided Image Colorization with Learned Deep Priors, SIGGRAPH 2017!**\n\n**[Sept20 Update]** Since it has been 3-4 years, I converted this repo to support minimal test-time usage in PyTorch. I also added our SIGGRAPH 2017 (it's an interactive method but can also do automatic). See the [Caffe branch](https://github.com/richzhang/colorization/tree/caffe) for the original release.\n\n![Teaser Image](http://richzhang.github.io/colorization/resources/images/teaser4.jpg)\n\n**Clone the repository; install dependencies**\n\n```\ngit clone https://github.com/richzhang/colorization.git\npip install requirements.txt\n```\n\n**Colorize!** This script will colorize an image. The results should match the images in the `imgs_out` folder.\n\n```\npython demo_release.py -i imgs/ansel_adams3.jpg\n```\n\n**Model loading in Python** The following loads pretrained colorizers. See [demo_release.py](demo_release.py) for some details on how to run the model. There are some pre and post-processing steps: convert to Lab space, resize to 256x256, colorize, and concatenate to the original full resolution, and convert to RGB.\n\n```python\nimport colorizers\ncolorizer_eccv16 = colorizers.eccv16().eval()\ncolorizer_siggraph17 = colorizers.siggraph17().eval()\n```\n\n### Original implementation (Caffe branch)\n\nThe original implementation contained train and testing, our network and AlexNet (for representation learning tests), as well as representation learning tests. It is in Caffe and is no longer supported. Please see the [caffe](https://github.com/richzhang/colorization/tree/caffe) branch for it.\n\n### Citation ###\n\nIf you find these models useful for your resesarch, please cite with these bibtexs.\n\n```\n@inproceedings{zhang2016colorful,\n  title={Colorful Image Colorization},\n  author={Zhang, Richard and Isola, Phillip and Efros, Alexei A},\n  booktitle={ECCV},\n  year={2016}\n}\n\n@article{zhang2017real,\n  title={Real-Time User-Guided Image Colorization with Learned Deep Priors},\n  author={Zhang, Richard and Zhu, Jun-Yan and Isola, Phillip and Geng, Xinyang and Lin, Angela S and Yu, Tianhe and Efros, Alexei A},\n  journal={ACM Transactions on Graphics (TOG)},\n  volume={9},\n  number={4},\n  year={2017},\n  publisher={ACM}\n}\n```\n\n### Misc ###\nContact Richard Zhang at rich.zhang at eecs.berkeley.edu for any questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ACEE:3BCC6:1751D9:5C8BEF:6AB921C0"},"text_sha256":"4032175a2f5e16dd57ec39095e3c764229ba3cb27e522bbabffd734c90102eef"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"onnx/onnx-tensorrt","input_row":{"repository":"onnx/onnx-tensorrt","url":"https://github.com/onnx/onnx-tensorrt","name":"onnx-tensorrt","owner":"onnx","description":"ONNX-TensorRT: TensorRT backend for ONNX","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3238,"issues":690,"created_at":"2018-04-30T18:11:09Z","updated_at":"2026-09-24T06:02:45Z","first_commit_at":"2018-04-30T18:11:10Z","last_commit_at":"2026-09-14T17:27:45Z","activity_months":100.48999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:25.369Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"onnx/onnx-tensorrt","visibility":"public","created_at":"2018-04-30T18:11:09Z","updated_at":"2026-09-24T06:02:45Z","private":false,"fork":false,"archived":false,"stargazers_count":3238,"open_issues_count":191,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3023","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:17E0DEE:1C01B93:6AB92971"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3022","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0891:37D6E2:17FBEC3:1C1CC5B:6AB92971"},"commit":{"sha":"9364cc1bbb45b0649d9d618cdbc0abab8970061d","url":"https://github.com/onnx/onnx-tensorrt/commit/9364cc1bbb45b0649d9d618cdbc0abab8970061d","date":"2018-05-24T23:41:21Z","author_date":"2018-05-24T23:41:21Z","committer_date":"2018-05-24T23:41:21Z","tree_sha":"7a4657473c8f46caa65da65696b65911016efdec","message_first_line":"Fix one more warning"},"tree_request_status":200,"tree_rate":{"github_remaining":"3021","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:17DE401:1BFDCA4:6AB92972"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2239,"blob_sha":"567ed2d59da8dc213fbbdcaa1c4065f0bc26c97f","priority":0}],"documents":[{"path":"README.md","size":2239,"blob_sha":"567ed2d59da8dc213fbbdcaa1c4065f0bc26c97f","priority":0,"status":200,"text":"# TensorRT backend for ONNX\n\nParses ONNX models for execution with [TensorRT](https://developer.nvidia.com/tensorrt).\n\nSee also the [TensorRT documentation](https://docs.nvidia.com/deeplearning/sdk/#inference).\n\n## ONNX Python backend usage\n\nThe TensorRT backend for ONNX can be used in Python as follows:\n\n```python\nimport onnx\nimport onnx_tensorrt.backend as backend\nimport numpy as np\n\nmodel = onnx.load(\"/path/to/model.onnx\")\nengine = backend.prepare(model, device='CUDA:1')\ninput_data = np.random.random(size=(32, 3, 224, 224)).astype(np.float32)\noutput_data = engine.run(input_data)[0]\nprint(output_data)\nprint(output_data.shape)\n```\n\n## Executable usage\n\nONNX models can be converted to serialized TensorRT engines using the `onnx2trt` executable:\n\n    onnx2trt my_model.onnx -o my_engine.trt\n\nONNX models can also be converted to human-readable text:\n\n    onnx2trt my_model.onnx -t my_model.onnx.txt\n\nSee more usage information by running:\n\n    onnx2trt -h\n\n## C++ library usage\n\nThe model parser library, libnvonnxparser.so, has a C++ API declared in this header:\n\n    NvOnnxParser.h\n\nTensorRT engines built using this parser must use the plugin factory provided in\nlibnvonnxparser_runtime.so, which has a C++ API declared in this header:\n\n    NvOnnxParserRuntime.h\n\n## Installation\n\n### Dependencies\n\n - [Protobuf](https://github.com/google/protobuf/releases)\n - [TensorRT 3+](https://developer.nvidia.com/tensorrt)\n\n### Executable and libraries\n\nBuild the `onnx2trt` executable and the `libnvonnxparser*` libraries using CMake:\n\n    mkdir build\n    cd build\n    cmake ..\n    make -j8\n    sudo make install\n\n### Python modules\n\nBuild the Python wrappers and modules by running:\n\n    python setup.py build\n    sudo python setup.py install\n\n### Docker image\n\nBuild the onnx_tensorrt Docker image by running:\n\n    cp /path/to/TensorRT-3.0.*.tar.gz .\n    docker build -t onnx_tensorrt .\n\n### Tests\n\nAfter installation (or inside the Docker container), ONNX backend tests can be run as follows:\n\nReal model tests only:\n\n    python onnx_backend_test.py OnnxBackendRealModelTest\n\nAll tests:\n\n    python onnx_backend_test.py\n\n## Pre-trained models\n\nPre-trained Caffe2 models in ONNX format can be found at https://github.com/onnx/models\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A68:7A4F8:17C8CE:5D039E:6AB921C2"},"text_sha256":"6a7dd5e5e6fc7cab82afca5591bb1bf61adf808d7781e703610907e6c55d04ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3020","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0824:74E6D:17F264B:1C13651:6AB92972"},"commit":{"sha":"7c51a63a719180eb5160c874c111746f3fb46a6b","url":"https://github.com/onnx/onnx-tensorrt/commit/7c51a63a719180eb5160c874c111746f3fb46a6b","date":"2026-06-22T20:41:37Z","author_date":"2026-06-22T20:41:37Z","committer_date":"2026-06-22T20:41:37Z","tree_sha":"60ffd64c7d1427b99dabd71ed8493f352f54ca19","message_first_line":"ONNX-TRT 11.1 GA Release (#1057)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3019","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:17A60A7:1BC6EA5:6AB92973"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5152,"blob_sha":"2649441af4dc653eb85a02faca8f03438206639d","priority":0}],"documents":[{"path":"README.md","size":5152,"blob_sha":"2649441af4dc653eb85a02faca8f03438206639d","priority":0,"status":200,"text":"<!--- SPDX-License-Identifier: Apache-2.0 -->\n\n# TensorRT Backend For ONNX\n\nParses ONNX models for execution with [TensorRT](https://developer.nvidia.com/tensorrt).\n\nSee also the [TensorRT documentation](https://docs.nvidia.com/deeplearning/tensorrt/).\n\nFor the list of recent changes, see the [changelog](docs/Changelog.md).\n\nFor a list of commonly seen issues and questions, see the [FAQ](docs/faq.md).\n\nFor business inquiries, please contact researchinquiries@nvidia.com\n\nFor press and other inquiries, please contact Hector Marinez at hmarinez@nvidia.com\n\n## Supported TensorRT Versions\n\nDevelopment on the this branch is for the latest version of [TensorRT 11.1](https://developer.nvidia.com/nvidia-tensorrt-download) with full-dimensions and dynamic shape support.\n\nFor previous versions of TensorRT, refer to their respective branches.\n\n## Supported Operators\n\nCurrent supported ONNX operators are found in the [operator support matrix](docs/operators.md).\n\n# Installation\n\n### Dependencies\n\n - [TensorRT 11.1](https://developer.nvidia.com/tensorrt)\n - [TensorRT 11.1 open source libraries](https://github.com/NVIDIA/TensorRT/)\n - [Protobuf >= 3.20.3 (Optional)](https://github.com/google/protobuf/releases)\n\n### Building\n\nFor building within Docker or on Windows, we recommend using the build instructions in the main [TensorRT repository](https://github.com/NVIDIA/TensorRT#setting-up-the-build-environment) to build the onnx-tensorrt library.\n\nOnce you have cloned the repository, you can build the parser libraries and executables by running:\n\n    cd onnx-tensorrt\n    mkdir build && cd build\n    cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j\n    # Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:\n    export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH\n\nNote that this project has a dependency on CUDA. By default the build will look in `/usr/local/cuda` for the CUDA toolkit installation. If your CUDA path is different, overwrite the default path by providing `-DCUDA_TOOLKIT_ROOT_DIR=<path_to_cuda_install>` in the CMake command.\n\nTo build with `protobuf-lite` support, add `-DUSE_ONNX_LITE_PROTO=1` to the end of the `cmake` command.\n\n### InstanceNormalizaiton Performance\n\nThere are two implementations of InstanceNormalization that may perform differently depending on various parameters. By default, the parser will use the native TensorRT implementation of InstanceNorm. Users that want to benchmark using the plugin implementation of InstanceNorm can unset the parser flag `kNATIVE_INSTANCENORM` prior to parsing the model. Note that the plugin implementation cannot be used for building version compatible or hardware compatible engines, and attempting to do so will result in an error.\n\nC++ Example:\n\n    // Unset the kNATIVE_INSTANCENORM flag to use the plugin implementation.\n    parser->unsetFlag(nvonnxparser::OnnxParserFlag::kNATIVE_INSTANCENORM);\n\nPython Example:\n\n    // Unset the NATIVE_INSTANCENORM flag to use the plugin implementation.\n    parser.clear_flag(trt.OnnxParserFlag.NATIVE_INSTANCENORM)\n\n## Executable Usage\n\nThere are currently two officially supported tools for users to quickly check if an ONNX model can parse and build into a TensorRT engine from an ONNX file.\n\nFor C++ users, there is the [trtexec](https://github.com/NVIDIA/TensorRT/tree/main/samples/opensource/trtexec) binary that is typically found in the `<tensorrt_root_dir>/bin` directory. The basic command of running an ONNX model is:\n\n`trtexec --onnx=model.onnx`\n\nRefer to the link or run `trtexec -h` for more information on CLI options.\n\nFor Python users, there is the [polygraphy](https://github.com/NVIDIA/TensorRT/tree/main/tools/Polygraphy) tool. The basic command for running an onnx model is:\n\n`polygraphy run model.onnx --trt`\n\nRefer to the link or run `polygraphy run -h` for more information on CLI options.\n\n### Python Modules\n\nPython bindings for the ONNX-TensorRT parser are packaged in the shipped `.whl` files.\n\nTensorRT 11.1 supports ONNX release 1.21.0. Install it with:\n\n    python3 -m pip install onnx==1.21.0\n\nThe ONNX-TensorRT backend can be installed by running:\n\n    python3 setup.py install\n\n## ONNX-TensorRT Python Backend Usage\n\nThe TensorRT backend for ONNX can be used in Python as follows:\n\n```python\nimport onnx\nimport onnx_tensorrt.backend as backend\nimport numpy as np\n\nmodel = onnx.load(\"/path/to/model.onnx\")\nengine = backend.prepare(model, device='CUDA:1')\ninput_data = np.random.random(size=(32, 3, 224, 224)).astype(np.float32)\noutput_data = engine.run(input_data)[0]\nprint(output_data)\nprint(output_data.shape)\n```\n\n## C++ Library Usage\n\nThe model parser library, libnvonnxparser.so, has its C++ API declared in this header:\n\n    NvOnnxParser.h\n\n### Tests\n\nAfter installation (or inside the Docker container), ONNX backend tests can be run as follows:\n\nReal model tests only:\n\n    python onnx_backend_test.py OnnxBackendRealModelTest\n\nAll tests:\n\n    python onnx_backend_test.py\n\nYou can use `-v` flag to make output more verbose.\n\n## Pre-trained Models\n\nPre-trained models in ONNX format can be found at the [ONNX Model Zoo](https://github.com/onnx/models)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13E8:24970A:17ED92:5D25CD:6AB921C4"},"text_sha256":"e30cccf29e381adcd26527f7779f8bf652210e0557fe4b96e976b24b767fe725"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"FudanNLP/fastNLP","input_row":{"repository":"FudanNLP/fastNLP","url":"https://github.com/FudanNLP/fastNLP","name":"fastNLP","owner":"FudanNLP","description":"fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3139,"issues":220,"created_at":"2018-03-07T13:30:20Z","updated_at":"2026-09-17T12:50:52Z","first_commit_at":"2018-03-07T13:30:20Z","last_commit_at":"2022-12-13T03:52:09Z","activity_months":57.210000000000001,"ai_ml_match_topics":"deep-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:27.896Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"FudanNLP/fastNLP","visibility":"public","created_at":"2018-03-07T13:30:20Z","updated_at":"2026-09-17T12:50:52Z","private":false,"fork":false,"archived":false,"stargazers_count":3139,"open_issues_count":71,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3018","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:17D1368:1BF1DC1:6AB92973"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3017","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17AC1C8:1BCBB22:6AB92974"},"commit":{"sha":"3081a57ef95fe6c279718dd21ccce1e852756b10","url":"https://github.com/FudanNLP/fastNLP/commit/3081a57ef95fe6c279718dd21ccce1e852756b10","date":"2018-05-24T02:45:01Z","author_date":"2018-05-24T02:45:01Z","committer_date":"2018-05-24T02:45:01Z","tree_sha":"a3072b40353464d8e6289d6cc0abcf7ccfa2a861","message_first_line":"optimize trainer logic & prepare charlm test"},"tree_request_status":200,"tree_rate":{"github_remaining":"3016","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0843:2BC4E5:1810DA5:1C316D3:6AB92974"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17,"blob_sha":"840c7a6a5c3a53bcac56f68cbaed9c73eb40a651","priority":0}],"documents":[{"path":"README.md","size":17,"blob_sha":"840c7a6a5c3a53bcac56f68cbaed9c73eb40a651","priority":0,"status":200,"text":"# FastNLP\nFastNLP","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B15C:3D40A:16C43A:5BFEDE:6AB921BA"},"text_sha256":"747736d548199f2e1d54d1cd0c7bfbf13a2d340d7002018a5ecf7c591406afb0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3015","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0865:B1202:178D75A:1BADAD0:6AB92975"},"commit":{"sha":"e03d2ddb4b5ea3f09a64698dc1f73ab3cdf6a8c6","url":"https://github.com/FudanNLP/fastNLP/commit/e03d2ddb4b5ea3f09a64698dc1f73ab3cdf6a8c6","date":"2022-12-13T03:52:09Z","author_date":"2022-12-13T03:52:09Z","committer_date":"2022-12-13T03:52:09Z","tree_sha":"232f2d49c8a1218d101077e89c854ef0668cc0d0","message_first_line":"Merge pull request #440 from xyltt/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"3014","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0918:8656E:17B9496:1BD9D84:6AB92975"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12144,"blob_sha":"c0af9ebca86d4a2e31f7ad693c0b258e285363d9","priority":0}],"documents":[{"path":"README.md","size":12144,"blob_sha":"c0af9ebca86d4a2e31f7ad693c0b258e285363d9","priority":0,"status":200,"text":"# fastNLP\n\n\n[//]: # ([![Build Status]&#40;https://travis-ci.org/fastnlp/fastNLP.svg?branch=master&#41;]&#40;https://travis-ci.org/fastnlp/fastNLP&#41;)\n\n[//]: # ([![codecov]&#40;https://codecov.io/gh/fastnlp/fastNLP/branch/master/graph/badge.svg&#41;]&#40;https://codecov.io/gh/fastnlp/fastNLP&#41;)\n\n[//]: # ([![Pypi]&#40;https://img.shields.io/pypi/v/fastNLP.svg&#41;]&#40;https://pypi.org/project/fastNLP&#41;)\n\n[//]: # (![Hex.pm]&#40;https://img.shields.io/hexpm/l/plug.svg&#41;)\n\n[//]: # ([![Documentation Status]&#40;https://readthedocs.org/projects/fastnlp/badge/?version=latest&#41;]&#40;http://fastnlp.readthedocs.io/?badge=latest&#41;)\n\n\nfastNLP是一款轻量级的自然语言处理（NLP）工具包，目标是减少用户项目中的工程型代码，例如数据处理循环、训练循环、多卡运行等。\n\nfastNLP具有如下的特性：\n\n- 便捷。在数据处理中可以通过apply函数避免循环、使用多进程提速等；在训练循环阶段可以很方便定制操作。\n- 高效。无需改动代码，实现fp16切换、多卡、ZeRO优化等。\n- 兼容。fastNLP支持多种深度学习框架作为后端。\n\n> :warning: **为了实现对不同深度学习架构的兼容，fastNLP 1.0.0之后的版本重新设计了架构，因此与过去的fastNLP版本不完全兼容，\n> 基于更早的fastNLP代码需要做一定的调整**: \n\n## fastNLP文档\n[中文文档](http://www.fastnlp.top/docs/fastNLP/master/index.html)\n\n## 安装指南\nfastNLP可以通过以下的命令进行安装\n```shell\npip install fastNLP>=1.0.0alpha\n```\n如果需要安装更早版本的fastNLP请指定版本号，例如\n```shell\npip install fastNLP==0.7.1\n```\n另外，请根据使用的深度学习框架，安装相应的深度学习框架。\n\n<details>\n<summary>Pytorch<\/summary>\n下面是使用pytorch来进行文本分类的例子。需要安装torch>=1.6.0。\n\n```python\nfrom fastNLP.io import ChnSentiCorpLoader\nfrom functools import partial\nfrom fastNLP import cache_results\nfrom fastNLP.transformers.torch import BertTokenizer\n\n# 使用cache_results装饰器装饰函数，将prepare_data的返回结果缓存到caches/cache.pkl，再次运行时，如果\n#  该文件还存在，将自动读取缓存文件，而不再次运行预处理代码。\n@cache_results('caches/cache.pkl')\ndef prepare_data():\n    # 会自动下载数据，并且可以通过文档看到返回的 dataset 应该是包含\"raw_words\"和\"target\"两个field的\n    data_bundle = ChnSentiCorpLoader().load()\n    # 使用tokenizer对数据进行tokenize\n    tokenizer = BertTokenizer.from_pretrained('hfl/chinese-bert-wwm')\n    tokenize = partial(tokenizer, max_length=256)  # 限制数据的最大长度\n    data_bundle.apply_field_more(tokenize, field_name='raw_chars', num_proc=4)  # 会新增\"input_ids\", \"attention_mask\"等field进入dataset中\n    data_bundle.apply_field(int, field_name='target', new_field_name='labels')  # 将int函数应用到每个target上，并且放入新的labels field中\n    return data_bundle\ndata_bundle = prepare_data()\nprint(data_bundle.get_dataset('train')[:4])\n\n# 初始化model, optimizer\nfrom fastNLP.transformers.torch import BertForSequenceClassification\nfrom torch import optim\nmodel = BertForSequenceClassification.from_pretrained('hfl/chinese-bert-wwm')\noptimizer = optim.AdamW(model.parameters(), lr=2e-5)\n\n# 准备dataloader\nfrom fastNLP import prepare_dataloader\ndls = prepare_dataloader(data_bundle, batch_size=32)\n\n# 准备训练\nfrom fastNLP import Trainer, Accuracy, LoadBestModelCallback, TorchWarmupCallback, Event\ncallbacks = [\n    TorchWarmupCallback(warmup=0.1, schedule='linear'),   # 训练过程中调整学习率。\n    LoadBestModelCallback()  # 将在训练结束之后，加载性能最优的model\n]\n# 在训练特定时机加入一些操作， 不同时机能够获取到的参数不一样，可以通过Trainer.on函数的文档查看每个时机的参数\n@Trainer.on(Event.on_before_backward())\ndef print_loss(trainer, outputs):\n    if trainer.global_forward_batches % 10 == 0:  # 每10个batch打印一次loss。\n        print(outputs.loss.item())\n\ntrainer = Trainer(model=model, train_dataloader=dls['train'], optimizers=optimizer,\n                  device=0, evaluate_dataloaders=dls['dev'], metrics={'acc': Accuracy()},\n                  callbacks=callbacks, monitor='acc#acc',n_epochs=5,\n                  # Accuracy的update()函数需要pred，target两个参数，它们实际对应的就是以下的field。\n                  evaluate_input_mapping={'labels': 'target'},  # 在评测时，将dataloader中会输入到模型的labels重新命名为target\n                  evaluate_output_mapping={'logits': 'pred'}  # 在评测时，将model输出中的logits重新命名为pred\n                  )\ntrainer.run()\n\n# 在测试集合上进行评测\nfrom fastNLP import Evaluator\nevaluator = Evaluator(model=model, dataloaders=dls['test'], metrics={'acc': Accuracy()},\n                      # Accuracy的update()函数需要pred，target两个参数，它们实际对应的就是以下的field。\n                      output_mapping={'logits': 'pred'},\n                      input_mapping={'labels': 'target'})\nevaluator.run()\n```\n\n更多内容可以参考如下的链接\n### 快速入门\n\n- [0. 10 分钟快速上手 fastNLP torch](http://www.fastnlp.top/docs/fastNLP/master/tutorials/torch/fastnlp_torch_tutorial.html)\n\n### 详细使用教程\n\n- [1. Trainer 和 Evaluator 的基本使用](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_0.html)\n- [2. DataSet 和 Vocabulary 的基本使用](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_1.html)\n- [3. DataBundle 和 Tokenizer 的基本使用](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_2.html)\n- [4. TorchDataloader 的内部结构和基本使用](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_3.html)\n- [5. fastNLP 中的预定义模型](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_4.html)\n- [6. Trainer 和 Evaluator 的深入介绍](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_4.html)\n- [7. fastNLP 与 paddle 或 jittor 的结合](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_5.html)\n- [8. 使用 Bert + fine-tuning 完成 SST-2 分类](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_e1.html)\n- [9. 使用 Bert + prompt 完成 SST-2 分类](http://www.fastnlp.top/docs/fastNLP/master/tutorials/basic/fastnlp_tutorial_e2.html)\n\n\n<\/details>\n\n<details>\n<summary>Paddle<\/summary>\n下面是使用paddle来进行文本分类的例子。需要安装paddle>=2.2.0以及paddlenlp>=2.3.3。\n\n```python\nfrom fastNLP.io import ChnSentiCorpLoader\nfrom functools import partial\n\n# 会自动下载数据，并且可以通过文档看到返回的 dataset 应该是包含\"raw_words\"和\"target\"两个field的\ndata_bundle = ChnSentiCorpLoader().load()\n\n# 使用tokenizer对数据进行tokenize\nfrom paddlenlp.transformers import BertTokenizer\ntokenizer = BertTokenizer.from_pretrained('hfl/chinese-bert-wwm')\ntokenize = partial(tokenizer, max_length=256)  # 限制一下最大长度\ndata_bundle.apply_field_more(tokenize, field_name='raw_chars', num_proc=4)  # 会新增\"input_ids\", \"attention_mask\"等field进入dataset中\ndata_bundle.apply_field(int, field_name='target', new_field_name='labels')  # 将int函数应用到每个target上，并且放入新的labels field中\nprint(data_bundle.get_dataset('train')[:4])\n\n# 初始化 model \nfrom paddlenlp.transformers import BertForSequenceClassification, LinearDecayWithWarmup\nfrom paddle import optimizer, nn\nclass SeqClsModel(nn.Layer):\n    def __init__(self, model_checkpoint, num_labels):\n        super(SeqClsModel, self).__init__()\n        self.num_labels = num_labels\n        self.bert = BertForSequenceClassification.from_pretrained(model_checkpoint)\n\n    def forward(self, input_ids, token_type_ids=None, position_ids=None, attention_mask=None):\n        logits = self.bert(input_ids, token_type_ids, position_ids, attention_mask)\n        return logits\n\n    def train_step(self, input_ids, labels, token_type_ids=None, position_ids=None, attention_mask=None):\n        logits = self(input_ids, token_type_ids, position_ids, attention_mask)\n        loss_fct = nn.CrossEntropyLoss()\n        loss = loss_fct(logits.reshape((-1, self.num_labels)), labels.reshape((-1, )))\n        return {\n            \"logits\": logits,\n            \"loss\": loss,\n        }\n    \n    def evaluate_step(self, input_ids, token_type_ids=None, position_ids=None, attention_mask=None):\n        logits = self(input_ids, token_type_ids, position_ids, attention_mask)\n        return {\n            \"logits\": logits,\n        }\n\nmodel = SeqClsModel('hfl/chinese-bert-wwm', num_labels=2)\n\n# 准备dataloader\nfrom fastNLP import prepare_dataloader\ndls = prepare_dataloader(data_bundle, batch_size=16)\n\n# 训练过程中调整学习率。\nscheduler = LinearDecayWithWarmup(2e-5, total_steps=20 * len(dls['train']), warmup=0.1)\noptimizer = optimizer.AdamW(parameters=model.parameters(), learning_rate=scheduler)\n\n# 准备训练\nfrom fastNLP import Trainer, Accuracy, LoadBestModelCallback, Event\ncallbacks = [\n    LoadBestModelCallback()  # 将在训练结束之后，加载性能最优的model\n]\n# 在训练特定时机加入一些操作， 不同时机能够获取到的参数不一样，可以通过Trainer.on函数的文档查看每个时机的参数\n@Trainer.on(Event.on_before_backward())\ndef print_loss(trainer, outputs):\n    if trainer.global_forward_batches % 10 == 0:  # 每10个batch打印一次loss。\n        print(outputs[\"loss\"].item())\n\ntrainer = Trainer(model=model, train_dataloader=dls['train'], optimizers=optimizer,\n                  device=0, evaluate_dataloaders=dls['dev'], metrics={'acc': Accuracy()},\n                  callbacks=callbacks, monitor='acc#acc',\n                  # Accuracy的update()函数需要pred，target两个参数，它们实际对应的就是以下的field。\n                  evaluate_output_mapping={'logits': 'pred'},\n                  evaluate_input_mapping={'labels': 'target'}\n                  )\ntrainer.run()\n\n# 在测试集合上进行评测\nfrom fastNLP import Evaluator\nevaluator = Evaluator(model=model, dataloaders=dls['test'], metrics={'acc': Accuracy()},\n                      # Accuracy的update()函数需要pred，target两个参数，它们实际对应的就是以下的field。\n                      output_mapping={'logits': 'pred'},\n                      input_mapping={'labels': 'target'})\nevaluator.run()\n```\n\n更多内容可以参考如下的链接\n### 快速入门\n\n- [0. 10 分钟快速上手 fastNLP paddle](http://www.fastnlp.top/docs/fastNLP/master/tutorials/torch/fastnlp_torch_tutorial.html)\n\n### 详细使用教程\n\n- [1. 使用 paddlenlp 和 fastNLP 实现中文文本情感分析](http://www.fastnlp.top/docs/fastNLP/master/tutorials/paddle/fastnlp_tutorial_paddle_e1.html)\n- [2. 使用 paddlenlp 和 fastNLP 训练中文阅读理解任务](http://www.fastnlp.top/docs/fastNLP/master/tutorials/paddle/fastnlp_tutorial_paddle_e2.html)\n\n<\/details>\n\n<details>\n<summary>oneflow<\/summary>\n<\/details>\n\n\n\n<details>\n<summary>jittor<\/summary>\n<\/details>\n\n\n## 项目结构\n\nfastNLP的项目结构如下：\n\n<table>\n<tr>\n    <td><b> fastNLP <\/b><\/td>\n    <td> 开源的自然语言处理库 <\/td>\n<\/tr>\n<tr>\n    <td><b> fastNLP.core <\/b><\/td>\n    <td> 实现了核心功能，包括数据处理组件、训练器、测试器等 <\/td>\n<\/tr>\n<tr>\n    <td><b> fastNLP.models <\/b><\/td>\n    <td> 实现了一些完整的神经网络模型 <\/td>\n<\/tr>\n<tr>\n    <td><b> fastNLP.modules <\/b><\/td>\n    <td> 实现了用于搭建神经网络模型的诸多组件 <\/td>\n<\/tr>\n<tr>\n    <td><b> fastNLP.embeddings <\/b><\/td>\n    <td> 实现了将序列index转为向量序列的功能，包括读取预训练embedding等 <\/td>\n<\/tr>\n<tr>\n    <td><b> fastNLP.io <\/b><\/td>\n    <td> 实现了读写功能，包括数据读入与预处理，模型读写，数据与模型自动下载等 <\/td>\n<\/tr>\n<\/table>\n\n<hr>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3C02:40CE8:17AC9A:5CE6AE:6AB921C5"},"text_sha256":"a0c8b9cf4091593eed9021e4c96e03f9d78b36fdbccb6a7a1543211bda010f1d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"open-mmlab/mmskeleton","input_row":{"repository":"open-mmlab/mmskeleton","url":"https://github.com/open-mmlab/mmskeleton","name":"mmskeleton","owner":"open-mmlab","description":"A OpenMMLAB toolbox  for human pose estimation, skeleton-based action recognition, and action synthesis.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3132,"issues":452,"created_at":"2017-11-21T09:01:44Z","updated_at":"2026-09-25T11:36:37Z","first_commit_at":"2018-01-01T07:37:58Z","last_commit_at":"2020-11-17T19:42:47Z","activity_months":34.539999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:30.666Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"open-mmlab/mmskeleton","visibility":"public","created_at":"2017-11-21T09:01:44Z","updated_at":"2026-09-25T11:36:37Z","private":false,"fork":false,"archived":false,"stargazers_count":3132,"open_issues_count":204,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3013","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089D:52542:17AF9C9:1BD075D:6AB92976"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3012","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A6:71E0C:17DE73E:1BFE087:6AB92977"},"commit":{"sha":"7fb7b7e348fd2e2313ec274f31e2177adb6b4c47","url":"https://github.com/open-mmlab/mmskeleton/commit/7fb7b7e348fd2e2313ec274f31e2177adb6b4c47","date":"2018-05-23T15:04:49Z","author_date":"2018-05-23T15:04:49Z","committer_date":"2018-05-23T15:04:49Z","tree_sha":"0cfc813ba639ef1995859b4ce7b108305b8cad86","message_first_line":"fix bug"},"tree_request_status":200,"tree_rate":{"github_remaining":"3011","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:1773BDE:1B94847:6AB92977"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7466,"blob_sha":"1f768a8995036d1abeac203cefcfd10eb34a97a2","priority":0}],"documents":[{"path":"README.md","size":7466,"blob_sha":"1f768a8995036d1abeac203cefcfd10eb34a97a2","priority":0,"status":200,"text":"# Spatial Temporal Graph Convolutional Networks (ST-GCN)\nA graph convolutional network for skeleton based action recognition.\n\n<div align=\"center\">\n    <img src=\"resource/info/pipeline.png\">\n<\/div>\n\n## Introduction\nThis repository holds the codebase, dataset and models for the paper>\n\n**Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition** Sijie Yan, Yuanjun Xiong and Dahua Lin, AAAI 2018.\n\n[[Arxiv Preprint]](https://arxiv.org/abs/1801.07455)\n\n### Visulization of ST-GCN in Action\n\n<table style=\"width:100%; table-layout:fixed;\">\n  <tr>\n    <td><img width=\"150px\" src=\"resource/info/S001C001P001R001A044_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/S003C001P008R001A008_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/S002C001P010R001A017_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/S003C001P008R001A002_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/S001C001P001R001A051_w.gif\"><\/td>\n  <\/tr>\n  <tr>\n    <td><font size=\"1\">Touch head<font><\/td>\n    <td><font size=\"1\">Sitting down<font><\/td>\n    <td><font size=\"1\">Take off a shoe<font><\/td>\n    <td><font size=\"1\">Eat meal/snack<font><\/td>\n    <td><font size=\"1\">Kick other person<font><\/td>\n  <\/tr>\n  <tr>\n    <td><img width=\"150px\" src=\"resource/info/hammer_throw_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/clean_and_jerk_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/pull_ups_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/tai_chi_w.gif\"><\/td>\n    <td><img width=\"150px\" src=\"resource/info/juggling_balls_w.gif\"><\/td>\n  <\/tr>\n  <tr>\n    <td><font size=\"1\">Hammer throw<font><\/td>\n    <td><font size=\"1\">Clean and jerk<font><\/td>\n    <td><font size=\"1\">Pull ups<font><\/td>\n    <td><font size=\"1\">Tai chi<font><\/td>\n    <td><font size=\"1\">Juggling ball<font><\/td>\n  <\/tr>\n<\/table>\n\nAbove figures show the neural response magnitude of each node in the last layer of our ST-GCN. The first row of results is from  **NTU-RGB+D** dataset, and the second row is from **Kinetics-skeleton**. \n\n\n## Prerequisites\nOur codebase is based on **Python**. There are a few dependencies to run the code. The major python libraries we used are\n- [PyTorch](http://pytorch.org/) (<=0.3. Version 0.4 is no supported right now).\n- NumPy\n- Other Python libraries can be installed by `pip install -r requirements.txt`\n\n## Data Preparation\nWe experimented on two skeleton-based action recognition datasts: **NTU RGB+D** and **Kinetics-skeleton**. \n### NTU RGB+D\nNTU RGB+D can be downloaded from [their website](http://rose1.ntu.edu.sg/datasets/actionrecognition.asp). Only the **3D skeletons**(5.8GB) modality is required in our experiments. After that, this command should be used to build the database for training or evaluation:\n```\npython tools/ntu_gendata.py --data_path <path to nturgbd>\n```\nwhere the ```<path to nturgbd>``` points to the 3D skeletons modality of NTU RGB+D dataset you download, for example ```data/NTU-RGB-D/nturgbd+d_skeletons```.\n### Kinetics-skeleton\n[Kinetics](https://deepmind.com/research/open-source/open-source-datasets/kinetics/) is a video-based dataset for action recognition which only provide raw video clips without skeleton data. To obatin the joint locations, we first resized all videos to the resolution of 340x256 and converted the frame rate to 30 fps.  Then, we extracted skeletons from each frame in Kinetics by [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose). The extracted skeleton data we called **Kinetics-skeleton**(7.5GB) can be directly downloaded from [GoogleDrive](https://drive.google.com/open?id=1SPQ6FmFsjGg3f59uCWfdUWI-5HJM_YhZ) or [BaiduYun](https://pan.baidu.com/s/1dwKG2TLvG-R1qeIiE4MjeA#list/path=%2FShare%2FAAAI18%2Fkinetics-skeleton&parentPath=%2FShare).\n\nAfter uncompressing, rebuild the database by this command:\n```\npython tools/kinetics_gendata.py --data_path <path to kinetics-skeleton>\n```\n\n##  Testing Pretrained Models\n### Get trained models\nWe provided the pretrained model weithts of our **ST-GCN** and the baseline model Temporal-Conv[1]. The model weights can be downloaded by running the script\n```\nbash tools/get_models.sh\n```\nThe downloaded models will be stored under ```./model```.\nIf you get an error message after running above command, you can also obtain models from [GoogleDrive](https://drive.google.com/open?id=1koTe3ces06NCntVdfLxF7O2Z4l_5csnX) or [BaiduYun](https://pan.baidu.com/s/1dwKG2TLvG-R1qeIiE4MjeA#list/path=%2FShare%2FAAAI18%2Fst-gcn&parentPath=%2FShare), and manually put them into ```./model```.\n\n### Evaluation\nOnce datasets and models ready, we can start the evaluation.\n<!-- Use the folloing command to evaluate our **ST-GCN** model:\n```\npython main.py --config config/st_gcn/<dataset>/test.yaml\n```\nwhere the ```<dataset>``` can be  -->\n\nTo evaluate ST-GCN model pretrained on **Kinetcis-skeleton**, run\n```\npython main.py --config config/st_gcn/kinetics-skeleton/test.yaml\n```\nFor **cross-view** evaluation in **NTU RGB+D**, run\n```\npython main.py --config config/st_gcn/nturgbd-cross-view/test.yaml\n```\nFor **cross-subject** evaluation in **NTU RGB+D**, run\n```\npython main.py --config config/st_gcn/nturgbd-cross-subject/test.yaml\n```\n\nSimilary, the configuration file for testing baseline models can be found under the ```./config/baseline```.\n\nTo speed up evaluation by multi-gpu inference or modify batch size for reducing the memory cost, set ```--test-batch-size``` and ```--device``` like:\n```\npython main.py --config <config file> --test-batch-size <batch size> --device <gpu0> <gpu1> ...\n```\n\n### Results\nThe expected **Top-1** **accuracy** of provided models are shown here:\n\n| Model| Kinetics-<br>skeleton (%)|NTU RGB+D <br> Cross View (%) |NTU RGB+D <br> Cross Subject (%) |\n| :------| :------: | :------: | :------: |\n|Baseline[1]| 20.3    | 83.1     |  74.3    |\n|**ST-GCN** (Ours)| **30.6**| **88.9** | **80.7** | \n\n[1] Kim, T. S., and Reiter, A. 2017. Interpretable 3d human action analysis with temporal convolutional networks. In BNMW CVPRW. \n\n## Training\nTo train a new ST-GCN model, run \n```\npython main.py --config config/st_gcn/<dataset>/train.yaml [--work-dir <work folder>]\n```\nwhere the ```<dataset>``` must be ```nturgbd-cross-view```, ```nturgbd-cross-subject``` or ```kinetics-skeleton```, depending on the dataset you want to use. The training results, including **model weights**, configurations and logging files, will be saved under the ```./work_dir``` by default or ```<work folder>``` if you appoint it.\n\nYou can modify the training parameters such as ```work-dir```, ```batch-size```, ```step```, ```base_lr``` and ```device``` in the command line or configuration files. The order of priority is:  command line > config file > default parameter. For more information, use ```main.py -h```.\n\nFinally, custom model evaluation can be achieved by this command as we mentioned above:\n```\npython main.py --config config/st_gcn/<dataset>/test.yaml --weights <path to model weights>\n```\n\n## Citation\nPlease cite the following paper if you use this repository in your reseach.\n```\n@inproceedings{stgcn2018aaai,\n  title     = {Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition},\n  author    = {Sijie Yan and Yuanjun Xiong and Dahua Lin},\n  booktitle = {AAAI},\n  year      = {2018},\n}\n```\n\n## Contact\nFor any question, feel free to contact\n```\nSijie Yan     : ys016@ie.cuhk.edu.hk\nYuanjun Xiong : bitxiong@gmail.com\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F90:3B6DE:16F577:5C2FD7:6AB921C7"},"text_sha256":"14d0cf8ff8194eec0255d58eba3f0eaebdcbf18f4c2c0b62040b7aa485136914"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3010","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:182301E:1C438E8:6AB92978"},"commit":{"sha":"b4c076baa9e02e69b5876c49fa7c509866d902c7","url":"https://github.com/open-mmlab/mmskeleton/commit/b4c076baa9e02e69b5876c49fa7c509866d902c7","date":"2020-11-17T19:42:47Z","author_date":"2020-11-17T19:42:47Z","committer_date":"2020-11-17T19:42:47Z","tree_sha":"87a42ee3ea66634e9f2e3df938c421575829f060","message_first_line":"Merge pull request #337 from frankier/fix-setup-py"},"tree_request_status":200,"tree_rate":{"github_remaining":"3009","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:17EB6FF:1C0BC4D:6AB92978"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2537,"blob_sha":"62edde312bfadee51b29f8ef4218591620c3ea03","priority":0}],"documents":[{"path":"README.md","size":2537,"blob_sha":"62edde312bfadee51b29f8ef4218591620c3ea03","priority":0,"status":200,"text":"# MMSkeleton\n\n## Introduction\n\nMMSkeleton is an open source toolbox for skeleton-based human understanding.\nIt is a part of the [open-mmlab](https://github.com/open-mmlab) project in the charge of [Multimedia Laboratory, CUHK](http://mmlab.ie.cuhk.edu.hk/).\nMMSkeleton is developed on our research project [ST-GCN](https://github.com/yysijie/st-gcn/blob/master/OLD_README.md).\n\n<p align=\"center\">\n    <img src=\"demo/recognition/demo_video.gif\", width=\"700\">\n<\/p>\n\n## Updates\n- [2020-01-21] MMSkeleton v0.7 is released.\n- [2019-10-09] MMSkeleton v0.6 is released.\n- [2019-10-08] Support model zoo.\n- [2019-10-02] Support custom dataset.\n- [2019-09-23] Add video-based pose estimation demo.\n- [2019-08-29] MMSkeleton v0.5 is released.\n\n\n## Features\n\n- **High extensibility**\n\n    MMSkeleton provides a flexible framework for organizing codes and projects systematically, with the ability to extend to various tasks and scale up to complex deep models.\n\n- **Multiple tasks**\n\n    MMSkeleton addresses to multiple tasks in human understanding, including but not limited to:\n    - [x] [skeleton-based action recognition (ST-GCN)](./doc/START_RECOGNITION.md)\n    - [x] [2D pose estimation](./doc/START_POSE_ESTIMATION.md)\n    - [ ] skeleton-based action generation\n    - [ ] 3D pose estimation\n    - [ ] pose tracking\n    - [x] [build custom skeleton-based dataset](./doc/CUSTOM_DATASET.md)\n    - [x] [create your own applications](./doc/CREATE_APPLICATION.md)\n\n## Getting Started\n\nPlease see [GETTING_STARTED.md](./doc/GETTING_STARTED.md) for more details of MMSkeleton.\n\n## License\nThe project is release under the [Apache 2.0 license](./LICENSE).\n\n## Contributing\nWe appreciate all contributions to improve MMSkeleton.\nPlease refer to [CONTRIBUTING.md](./doc/CONTRIBUTING.md) for the contributing guideline.\n\n\n## Citation\nPlease cite the following paper if you use this repository in your reseach.\n<!-- @inproceedings{stgcn2018aaai,\n  title     = {Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition},\n  author    = {Sijie Yan and Yuanjun Xiong and Dahua Lin},\n  booktitle = {AAAI},\n  year      = {2018},\n} -->\n```\n@misc{mmskeleton2019,\n  author =       {Sijie Yan, Yuanjun Xiong, Jingbo Wang, Dahua Lin},\n  title =        {MMSkeleton},\n  howpublished = {\\url{https://github.com/open-mmlab/mmskeleton}},\n  year =         {2019}\n}\n```\n\n## Contact\nFor any question, feel free to contact\n```\nSijie Yan     : ys016@ie.cuhk.edu.hk\nJingbo Wang   : wangjingbo1219@foxmail.com\nYuanjun Xiong : bitxiong@gmail.com\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A840:18CDF1:1725FF:54FB0A:6AB921C8"},"text_sha256":"3569b2dc043245d83414be0a76f95ecbef13a42bbd63531e86c24f6fad15c3b8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stellargraph/stellargraph","input_row":{"repository":"stellargraph/stellargraph","url":"https://github.com/stellargraph/stellargraph","name":"stellargraph","owner":"stellargraph","description":"StellarGraph - Machine Learning on Graphs","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3059,"issues":1045,"created_at":"2018-04-13T07:35:51Z","updated_at":"2026-09-25T07:35:17Z","first_commit_at":"2018-04-13T07:35:52Z","last_commit_at":"2021-10-29T06:15:49Z","activity_months":42.539999999999999,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:33.326Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stellargraph/stellargraph","visibility":"public","created_at":"2018-04-13T07:35:51Z","updated_at":"2026-09-25T07:35:17Z","private":false,"fork":false,"archived":false,"stargazers_count":3059,"open_issues_count":326,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"3008","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:1823113:1C43A04:6AB92979"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3007","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17AFC00:1BD09E7:6AB92979"},"commit":{"sha":"08df78e78db0584ef364e212951e725769f54cab","url":"https://github.com/stellargraph/stellargraph/commit/08df78e78db0584ef364e212951e725769f54cab","date":"2018-05-22T06:34:35Z","author_date":"2018-05-22T06:34:35Z","committer_date":"2018-05-22T06:34:35Z","tree_sha":"416c885416682ebd17ffd7b4e777c31cfe4133c2","message_first_line":"Merge pull request #55 from stellargraph/demos/genes"},"tree_request_status":200,"tree_rate":{"github_remaining":"3006","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17C0BA0:1BE0E5B:6AB9297A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":427,"blob_sha":"3d10d5be6cac480340b31502e2e700c0e7631ccd","priority":0}],"documents":[{"path":"README.md","size":427,"blob_sha":"3d10d5be6cac480340b31502e2e700c0e7631ccd","priority":0,"status":200,"text":"# Stellar Graph Machine Learning Library\n\n## Build Status\n|Branch|Build|\n|:-----|:----:|\n|*master*|[![Build status](https://badge.buildkite.com/34d537a018c6bf27cf154aa5bcc287b2e170d6e3391cd40c64.svg)](https://buildkite.com/stellar/stellar-ml?branch=master)|\n|*devel*|[![Build status](https://badge.buildkite.com/34d537a018c6bf27cf154aa5bcc287b2e170d6e3391cd40c64.svg)](https://buildkite.com/stellar/stellar-ml?branch=develop)|\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CA6:3D501:17F387:5D2EFF:6AB921CA"},"text_sha256":"397ccbe4970a110ddb2d643e4e15dfaa3de0c72c56e811f1b4899bbe44a1e75f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3005","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FB:72727:179A307:1BBAF17:6AB9297A"},"commit":{"sha":"3c2c8c18ab4c5c16660f350d8e23d7dc39e738de","url":"https://github.com/stellargraph/stellargraph/commit/3c2c8c18ab4c5c16660f350d8e23d7dc39e738de","date":"2021-10-29T06:15:49Z","author_date":"2021-10-29T06:15:49Z","committer_date":"2021-10-29T06:15:49Z","tree_sha":"637fbe993dc947d78b31f495405eae50e4a33d06","message_first_line":"Fix CI part 1: gensim 4.0.0 in notebooks, other tweaks (#1901)"},"tree_request_status":200,"tree_rate":{"github_remaining":"3004","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086A:0AC4:12855D3:15D60E4:6AB9297B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":21590,"blob_sha":"eb4a76c19bd385982236bd4585268c3d7c682163","priority":0}],"documents":[{"path":"README.md","size":21590,"blob_sha":"eb4a76c19bd385982236bd4585268c3d7c682163","priority":0,"status":200,"text":"![StellarGraph Machine Learning library logo](https://raw.githubusercontent.com/stellargraph/stellargraph/develop/stellar-graph-banner.png)\n\n<p align=\"center\">\n  <a href=\"https://stellargraph.readthedocs.io/\" alt=\"Docs\"><img src=\"https://readthedocs.org/projects/stellargraph/badge/?version=latest\"/><\/a>\n  <a href=\"https://github.com/stellargraph/stellargraph/discussions\" alt=\"Discussions forum\"><img src=\"https://img.shields.io/badge/help_forum-discussions-blue.svg\"/><\/a>\n  <a href=\"https://pypi.org/project/stellargraph/\" alt=\"PyPI\"><img src=\"https://img.shields.io/pypi/v/stellargraph.svg\"/><\/a>\n  <a href=\"https://github.com/stellargraph/stellargraph/blob/develop/LICENSE\" alt=\"license\"><img src=\"https://img.shields.io/github/license/stellargraph/stellargraph.svg\"/><\/a>\n<\/p>\n<p align=\"center\">\n  <a href=\"https://github.com/stellargraph/stellargraph/blob/develop/CONTRIBUTING.md\" alt=\"contributions welcome\"><img src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg\"/><\/a>\n  <a href=\"https://github.com/stellargraph/stellargraph/actions?query=branch%3Amaster\" alt=\"Build status: master\"><img src=\"https://github.com/stellargraph/stellargraph/workflows/CI/badge.svg?branch=master\"/><\/a>\n  <a href=\"https://github.com/stellargraph/stellargraph/actions?query=branch%3Adevelop\" alt=\"Build status: develop\"><img src=\"https://github.com/stellargraph/stellargraph/workflows/CI/badge.svg?branch=develop\"/><\/a>\n  <a href=\"https://codecov.io/gh/stellargraph/stellargraph\"><img src=\"https://codecov.io/gh/stellargraph/stellargraph/branch/develop/graph/badge.svg\" /><\/a>\n  <a href=\"https://pypi.org/project/stellargraph\" alt=\"pypi downloads\"><img alt=\"pypi downloads\" src=\"https://pepy.tech/badge/stellargraph\"><\/a>\n<\/p>\n\n\n# StellarGraph Machine Learning Library\n\n**StellarGraph** is a Python library for machine learning on [graphs and networks](https://en.wikipedia.org/wiki/Graph_%28discrete_mathematics%29).\n\n## Table of Contents\n   * [Introduction](#introduction)\n   * [Getting Started](#getting-started)\n   * [Getting Help](#getting-help)\n   * [Example: GCN](#example-gcn)\n   * [Algorithms](#algorithms)\n   * [Installation](#installation)\n       * [Install StellarGraph using PyPI](#install-stellargraph-using-pypi)\n       * [Install StellarGraph in Anaconda Python](#install-stellargraph-in-anaconda-python)\n       * [Install StellarGraph from GitHub source](#install-stellargraph-from-github-source)\n   * [Citing](#citing)\n   * [References](#references)\n\n## Introduction\n\nThe StellarGraph library offers state-of-the-art algorithms for [graph machine learning](https://medium.com/stellargraph/knowing-your-neighbours-machine-learning-on-graphs-9b7c3d0d5896), making it easy to discover patterns and answer questions about graph-structured data. It can solve many machine learning tasks:\n\n- Representation learning for nodes and edges, to be used for visualisation and various downstream machine learning tasks;\n- [Classification and attribute inference of nodes](https://medium.com/stellargraph/can-graph-machine-learning-identify-hate-speech-in-online-social-networks-58e3b80c9f7e) or edges;\n- Classification of whole graphs;\n- Link prediction;\n- [Interpretation of node classification](https://medium.com/stellargraph/https-medium-com-stellargraph-saliency-maps-for-graph-machine-learning-5cca536974da) [8].\n\nGraph-structured data represent entities as nodes (or vertices) and relationships between them as edges (or links), and can include data associated with either as attributes. For example, a graph can contain people as nodes and friendships between them as links, with data like a person's age and the date a friendship was established. StellarGraph supports analysis of many kinds of graphs:\n\n- homogeneous (with nodes and links of one type),\n- heterogeneous (with more than one type of nodes and/or links)\n- knowledge graphs (extreme heterogeneous graphs with thousands of types of edges)\n- graphs with or without data associated with nodes\n- graphs with edge weights\n\nStellarGraph is built on [TensorFlow 2](https://tensorflow.org/) and its [Keras high-level API](https://www.tensorflow.org/guide/keras), as well as [Pandas](https://pandas.pydata.org) and [NumPy](https://www.numpy.org). It is thus user-friendly, modular and extensible. It interoperates smoothly with code that builds on these, such as the standard Keras layers and [scikit-learn](http://scikit-learn.github.io/stable), so it is easy to augment the core graph machine learning algorithms provided by StellarGraph. It is thus also [easy to install with `pip` or Anaconda](#installation).\n\n## Getting Started\n\n[The numerous detailed and narrated examples][demos] are a good way to get started with StellarGraph. There is likely to be one that is similar to your data or your problem (if not, [let us know](#getting-help)).\n\n[demos]: https://stellargraph.readthedocs.io/en/stable/demos/index.html\n\nYou can start working with the examples immediately in Google Colab or Binder by clicking the ![](https://colab.research.google.com/assets/colab-badge.svg) and ![](https://mybinder.org/badge_logo.svg) badges within each Jupyter notebook.\n\nAlternatively, you can run download a local copy of the demos and run them using `jupyter`. The demos can be downloaded by cloning the `master` branch of this repository, or by using the `curl` command below:\n```bash\ncurl -L https://github.com/stellargraph/stellargraph/archive/master.zip | tar -xz --strip=1 stellargraph-master/demos\n```\n\nThe dependencies required to run most of our demo notebooks locally can be installed using one of the following:\n\n- Using `pip`: `pip install stellargraph[demos]`\n- Using `conda`: `conda install -c stellargraph stellargraph`\n\n(See [Installation](#installation) section for more details and more options.)\n\n## Getting Help\n\nIf you get stuck or have a problem, there are many ways to make progress and get help or support:\n\n- [Read the documentation](https://stellargraph.readthedocs.io)\n- [Consult the examples][demos]\n- Contact us:\n  - [Ask questions and discuss problems on the StellarGraph Discussions forum](https://github.com/stellargraph/stellargraph/discussions)\n  - [File an issue](https://github.com/stellargraph/stellargraph/issues/new/choose)\n  - Send us an email at [stellargraph.io@gmail.com](mailto:stellargraph.io@gmail.com?subject=Question%20about%20the%20StellarGraph%20library)\n\n\n## Example: GCN\n\nOne of the earliest deep machine learning algorithms for graphs is a Graph Convolution Network (GCN) [6]. The following example uses it for node classification: predicting the class from which a node comes. It shows how easy it is to apply using StellarGraph, and shows how StellarGraph integrates smoothly with Pandas and TensorFlow and libraries built on them.\n\n#### Data preparation\n\nData for StellarGraph can be prepared using common libraries like Pandas and scikit-learn.\n\n``` python\nimport pandas as pd\nfrom sklearn import model_selection\n\ndef load_my_data():\n    # your own code to load data into Pandas DataFrames, e.g. from CSV files or a database\n    ...\n\nnodes, edges, targets = load_my_data()\n\n# Use scikit-learn to compute training and test sets\ntrain_targets, test_targets = model_selection.train_test_split(targets, train_size=0.5)\n```\n\n#### Graph machine learning model\n\nThis is the only part that is specific to StellarGraph. The machine learning model consists of some graph convolution layers followed by a layer to compute the actual predictions as a TensorFlow tensor. StellarGraph makes it easy to construct all of these layers via the `GCN` model class. It also makes it easy to get input data in the right format via the `StellarGraph` graph data type and a data generator.\n\n```python\nimport stellargraph as sg\nimport tensorflow as tf\n\n# convert the raw data into StellarGraph's graph format for faster operations\ngraph = sg.StellarGraph(nodes, edges)\n\ngenerator = sg.mapper.FullBatchNodeGenerator(graph, method=\"gcn\")\n\n# two layers of GCN, each with hidden dimension 16\ngcn = sg.layer.GCN(layer_sizes=[16, 16], generator=generator)\nx_inp, x_out = gcn.in_out_tensors() # create the input and output TensorFlow tensors\n\n# use TensorFlow Keras to add a layer to compute the (one-hot) predictions\npredictions = tf.keras.layers.Dense(units=len(ground_truth_targets.columns), activation=\"softmax\")(x_out)\n\n# use the input and output tensors to create a TensorFlow Keras model\nmodel = tf.keras.Model(inputs=x_inp, outputs=predictions)\n```\n\n#### Training and evaluation\n\nThe model is a conventional TensorFlow Keras model, and so tasks such as training and evaluation can use the functions offered by Keras. StellarGraph's data generators make it simple to construct the required Keras Sequences for input data.\n\n```python\n# prepare the model for training with the Adam optimiser and an appropriate loss function\nmodel.compile(\"adam\", loss=\"categorical_crossentropy\", metrics=[\"accuracy\"])\n\n# train the model on the train set\nmodel.fit(generator.flow(train_targets.index, train_targets), epochs=5)\n\n# check model generalisation on the test set\n(loss, accuracy) = model.evaluate(generator.flow(test_targets.index, test_targets))\nprint(f\"Test set: loss = {loss}, accuracy = {accuracy}\")\n```\n\nThis algorithm is spelled out in more detail in [its extended narrated notebook][gcn-demo]. We provide [many more algorithms, each with a detailed example][demos].\n\n[gcn-demo]: https://stellargraph.readthedocs.io/en/stable/demos/node-classification/gcn-node-classification.html\n\n## Algorithms\nThe StellarGraph library currently includes the following algorithms for graph machine learning:\n\n| Algorithm | Description |\n| --- | --- |\n| GraphSAGE [1] | Supports supervised as well as unsupervised representation learning, node classification/regression, and link prediction for homogeneous networks. The current implementation supports multiple aggregation methods, including mean, maxpool, meanpool, and attentional aggregators. |\n| HinSAGE | Extension of GraphSAGE algorithm to heterogeneous networks. Supports representation learning, node classification/regression, and link prediction/regression for heterogeneous graphs. The current implementation supports mean aggregation of neighbour nodes, taking into account their types and the types of links between them. |\n| attri2vec [4] | Supports node representation learning, node classification, and out-of-sample node link prediction for homogeneous graphs with node attributes. |\n| Graph ATtention Network (GAT) [5] | The GAT algorithm supports representation learning and node classification for homogeneous graphs. There are versions of the graph attention layer that support both sparse and dense adjacency matrices. |\n| Graph Convolutional Network (GCN) [6] | The GCN algorithm supports representation learning and node classification for homogeneous graphs. There are versions of the graph convolutional layer that support both sparse and dense adjacency matrices. |\n| Cluster Graph Convolutional Network (Cluster-GCN) [10] | An extension of the GCN algorithm supporting representation learning and node classification for homogeneous graphs. Cluster-GCN scales to larger graphs and can be used to train deeper GCN models using Stochastic Gradient Descent. |\n| Simplified Graph Convolutional network (SGC) [7] | The SGC network algorithm supports representation learning and node classification for homogeneous graphs. It is an extension of the GCN algorithm that smooths the graph to bring in more distant neighbours of nodes without using multiple layers. |\n| (Approximate) Personalized Propagation of Neural Predictions (PPNP/APPNP) [9] | The (A)PPNP algorithm supports fast and scalable representation learning and node classification for attributed homogeneous graphs. In a semi-supervised setting, first a multilayer neural network is trained using the node attributes as input. The predictions from the latter network are then diffused across the graph using a method based on Personalized PageRank. |\n| Node2Vec [2] | The Node2Vec and Deepwalk algorithms perform unsupervised representation learning for homogeneous networks, taking into account network structure while ignoring node attributes. The node2vec algorithm is implemented by combining StellarGraph's random walk generator with the word2vec algorithm from [Gensim](https://radimrehurek.com/gensim/). Learned node representations can be used in downstream machine learning models implemented using [Scikit-learn](https://scikit-learn.org/stable/), [Keras](https://keras.io/), [TensorFlow](https://www.tensorflow.org/) or any other Python machine learning library. |\n| Metapath2Vec [3] | The metapath2vec algorithm performs unsupervised, metapath-guided representation learning for heterogeneous networks, taking into account network structure while ignoring node attributes. The implementation combines StellarGraph's metapath-guided random walk generator and [Gensim](https://radimrehurek.com/gensim/) word2vec algorithm. As with node2vec, the learned node representations (node embeddings) can be used in downstream machine learning models to solve tasks such as node classification, link prediction, etc, for heterogeneous networks. |\n| Relational Graph Convolutional Network [11] | The RGCN algorithm performs semi-supervised learning for node representation and node classification on knowledge graphs. RGCN extends GCN to directed graphs with multiple edge types and works with both sparse and dense adjacency matrices.|\n| ComplEx[12] | The ComplEx algorithm computes embeddings for nodes (entities) and edge types (relations) in knowledge graphs, and can use these for link prediction |\n| GraphWave [13] | GraphWave calculates unsupervised structural embeddings via wavelet diffusion through the graph. |\n| Supervised Graph Classification | A model for supervised graph classification based on GCN [6] layers and mean pooling readout. |\n| Watch Your Step [14] | The Watch Your Step algorithm computes node embeddings by using adjacency powers to simulate expected random walks. |\n| Deep Graph Infomax [15] | Deep Graph Infomax trains unsupervised GNNs to maximize the shared information between node level and graph level features. |\n| Continuous-Time Dynamic Network Embeddings (CTDNE) [16] | Supports time-respecting random walks which can be used in a similar way as in Node2Vec for unsupervised representation learning. |\n| DistMult [17] | The DistMult algorithm computes embeddings for nodes (entities) and edge types (relations) in knowledge graphs, and can use these for link prediction |\n| DGCNN [18] | The Deep Graph Convolutional Neural Network (DGCNN) algorithm for supervised graph classification. |\n| TGCN [19] | The GCN_LSTM model in StellarGraph follows the Temporal Graph Convolutional Network architecture proposed in the TGCN paper with a few enhancements in the layers architecture. |\n\n## Installation\n\nStellarGraph is a Python 3 library and we recommend using Python version `3.6`. The required Python version\ncan be downloaded and installed from [python.org](https://python.org/). Alternatively, use the Anaconda Python\nenvironment, available from [anaconda.com](https://www.anaconda.com/products/individual#Downloads).\n\nThe StellarGraph library can be installed from PyPI, from Anaconda Cloud, or directly from GitHub, as described below.\n\n#### Install StellarGraph using PyPI:\nTo install StellarGraph library from [PyPI](https://pypi.org) using `pip`, execute the following command:\n```\npip install stellargraph\n```\n\n[Some of the examples][demos] require installing additional dependencies as well as `stellargraph`. To install these dependencies as well as StellarGraph using `pip` execute the following command:\n```\npip install stellargraph[demos]\n```\n\nThe community detection demos require `python-igraph` which is only available on some platforms. To install this in addition to the other demo requirements:\n```\npip install stellargraph[demos,igraph]\n```\n\n#### Install StellarGraph in Anaconda Python:\nThe StellarGraph library is available an [Anaconda Cloud](https://anaconda.org/stellargraph/stellargraph) and can be installed in [Anaconda Python](https://anaconda.com) using the command line `conda` tool, execute the following command:\n```\nconda install -c stellargraph stellargraph\n```\n\n\n#### Install StellarGraph from GitHub source:\nFirst, clone the StellarGraph repository using `git`:\n```\ngit clone https://github.com/stellargraph/stellargraph.git\n```\n\nThen, `cd` to the StellarGraph folder, and install the library by executing the following commands:\n```\ncd stellargraph\npip install .\n```\n\nSome of the examples in the `demos` directory require installing additional dependencies as well as `stellargraph`. To install these dependencies as well as StellarGraph using `pip` execute the following command:\n```\npip install .[demos]\n```\n\n\n## Citing\nStellarGraph is designed, developed and supported by [CSIRO's Data61](https://data61.csiro.au/).\nIf you use any part of this library in your research, please cite it using the following BibTex entry\n```latex\n@misc{StellarGraph,\n  author = {CSIRO's Data61},\n  title = {StellarGraph Machine Learning Library},\n  year = {2018},\n  publisher = {GitHub},\n  journal = {GitHub Repository},\n  howpublished = {\\url{https://github.com/stellargraph/stellargraph}},\n}\n```\n\n## References\n\n1. Inductive Representation Learning on Large Graphs. W.L. Hamilton, R. Ying, and J. Leskovec.\nNeural Information Processing Systems (NIPS), 2017, ([link](https://arxiv.org/abs/1706.02216) [webpage](https://snap.stanford.edu/graphsage/))\n\n2. Node2Vec: Scalable Feature Learning for Networks. A. Grover, J. Leskovec. ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2016, ([link](https://snap.stanford.edu/node2vec/))\n\n3. Metapath2Vec: Scalable Representation Learning for Heterogeneous Networks. Yuxiao Dong, Nitesh V. Chawla, and Ananthram Swami.\nACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 135–144, 2017, ([link](https://ericdongyx.github.io/metapath2vec/m2v.html))\n\n4. Attributed Network Embedding via Subspace Discovery. D. Zhang, Y. Jie, X. Zhu and C. Zhang, Data Mining and Knowledge Discovery, 2019, ([link](https://link.springer.com/article/10.1007/s10618-019-00650-2))\n\n5. Graph Attention Networks. P. Veličković et al.\nInternational Conference on Learning Representations (ICLR), 2018, ([link](https://arxiv.org/abs/1710.10903))\n\n6. Graph Convolutional Networks (GCN): Semi-Supervised Classification with Graph Convolutional Networks. Thomas N. Kipf, Max Welling.\nInternational Conference on Learning Representations (ICLR), 2017, ([link](https://github.com/tkipf/gcn))\n\n7. Simplifying Graph Convolutional Networks. F. Wu, T. Zhang, A. H. de Souza, C. Fifty, T. Yu, and K. Q. Weinberger.\nInternational Conference on Machine Learning (ICML), 2019, ([link](https://arxiv.org/abs/1902.07153))\n\n8. Adversarial Examples on Graph Data: Deep Insights into Attack and Defense. H. Wu, C. Wang, Y. Tyshetskiy, A. Docherty, K. Lu, and L. Zhu. IJCAI 2019, ([link](https://arxiv.org/abs/1903.01610))\n\n9. Predict then propagate: Graph neural networks meet personalized PageRank. J. Klicpera, A. Bojchevski, A., and S. Günnemann, ICLR, 2019, arXiv:1810.05997.([link](https://arxiv.org/abs/1810.05997))\n\n10. Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks. W. Chiang, X. Liu, S. Si, Y. Li, S. Bengio, and C. Hsiej, KDD, 2019, arXiv:1905.07953.([link](https://arxiv.org/abs/1905.07953))\n\n11. Modeling relational data with graph convolutional networks. M. Schlichtkrull, T. N. Kipf, P. Bloem, R. Van Den Berg, I. Titov, and M. Welling, European Semantic Web Conference, 2018, arXiv:1609.02907 ([link](https://arxiv.org/pdf/1703.06103.pdf)).\n\n12. Complex Embeddings for Simple Link Prediction. T. Trouillon, J. Welbl, S. Riedel, É. Gaussier and G. Bouchard, ICML, 2016. ([link](http://jmlr.org/proceedings/papers/v48/trouillon16.pdf))\n\n13. Learning Structural Node Embeddings via Diffusion Wavelets. C. Donnat, M. Zitnik, D. Hallac, and J. Leskovec, SIGKDD, 2018, arXiv:1710.10321 ([link](https://arxiv.org/pdf/1710.10321.pdf))\n\n14. Watch Your Step: Learning Node Embeddings via Graph Attention. S. Abu-El-Haija, B. Perozzi, R. Al-Rfou and A. Alemi, NIPS, 2018, arXiv:1710.09599 ([link](https://arxiv.org/pdf/1710.09599.pdf))\n\n15. Deep Graph Infomax. P. Veličković, W. Fedus, W. L. Hamilton, P. Lio, Y. Bengio, R. D. Hjelm. International Conference on Learning Representations (ICLR), 2019, arXiv:1809.10341, ([link](https://arxiv.org/pdf/1809.10341.pdf)).\n\n16. Continuous-Time Dynamic Network Embeddings. Giang Hoang Nguyen, John Boaz Lee, Ryan A. Rossi, Nesreen K. Ahmed, Eunyee Koh, and Sungchul Kim. Proceedings of the 3rd International Workshop on Learning Representations for Big Networks (WWW BigNet) 2018. ([link](https://dl.acm.org/doi/10.1145/3184558.3191526))\n\n17. Embedding Entities and Relations for Learning and Inference in Knowledge Bases. Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng, ICLR, 2015. arXiv:1412.6575 ([link](https://arxiv.org/pdf/1412.6575.pdf))\n\n18. An End-to-End Deep Learning Architecture for Graph Classification. Muhan Zhang, Zhicheng Cui, Marion Neumann, and Yixin Chen, AAAI, 2018. ([link](https://www.cse.wustl.edu/~yixin.chen/public/DGCNN.pdf))\n\n19. T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction. Ling Zhao, Yujiao Song, Chao Zhang, Yu Liu, Pu Wang, Tao Lin, Min Deng, and Haifeng Li. IEEE Transactions on Intelligent Transportation Systems, 2019. ([link](https://ieeexplore.ieee.org/document/8809901))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FCEC:3CC8A:175B86:5C974F:6AB921C8"},"text_sha256":"31956ed2be78a499d06cd9985d07ee317a1289f6cf5d671578259c8c9057fe7f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"maciejkula/spotlight","input_row":{"repository":"maciejkula/spotlight","url":"https://github.com/maciejkula/spotlight","name":"spotlight","owner":"maciejkula","description":"Deep recommender models using PyTorch.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3044,"issues":111,"created_at":"2017-06-25T18:52:19Z","updated_at":"2026-09-27T10:34:48Z","first_commit_at":"2017-06-25T19:24:30Z","last_commit_at":"2020-02-09T21:03:48Z","activity_months":31.510000000000002,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:36.091Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"maciejkula/spotlight","visibility":"public","created_at":"2017-06-25T18:52:19Z","updated_at":"2026-09-27T10:34:48Z","private":false,"fork":false,"archived":false,"stargazers_count":3044,"open_issues_count":73,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"3003","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17BC60E:1BDD385:6AB9297C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3002","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088A:35C5DA:179546F:1BB55E5:6AB9297C"},"commit":{"sha":"3a37f8b62769cac77de5725c76a1308d79da10b3","url":"https://github.com/maciejkula/spotlight/commit/3a37f8b62769cac77de5725c76a1308d79da10b3","date":"2018-05-22T21:34:36Z","author_date":"2018-05-22T21:34:36Z","committer_date":"2018-05-22T21:34:36Z","tree_sha":"562bc03baa61a698fb4e3f391fd8630d8fcf1bc7","message_first_line":"BUGFIX: cleanup import name for sequence_precision_recall"},"tree_request_status":200,"tree_rate":{"github_remaining":"3001","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0877:6E4BB:17EBA52:1C0C02A:6AB9297C"},"tree_truncated":false,"document_candidates":[{"path":"readme.rst","size":6408,"blob_sha":"a0b87e2f0abea9b9ded4af3ffa4c7990ae6b1dbb","priority":0}],"documents":[{"path":"readme.rst","size":6408,"blob_sha":"a0b87e2f0abea9b9ded4af3ffa4c7990ae6b1dbb","priority":0,"status":200,"text":".. image:: docs/_static/img/spotlight.png\n\n---------------------------------------------------------------------\n\n.. inclusion-marker-do-not-remove\n\n.. image:: https://travis-ci.org/maciejkula/spotlight.svg?branch=master\n   :target: https://travis-ci.org/maciejkula/spotlight\n\n.. image:: https://ci.appveyor.com/api/projects/status/jq5e76a7a08ra2ji/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/maciejkula/spotlight/branch/master\n\n.. image:: https://badges.gitter.im/gitterHQ/gitter.png\n   :target: https://gitter.im/spotlight-recommendations/Lobby\n\n.. image:: https://anaconda.org/maciejkula/spotlight/badges/version.svg\n   :target: https://anaconda.org/maciejkula/spotlight\n\n.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat\n   :target: https://maciejkula.github.io/spotlight/\n\n.. image:: https://img.shields.io/badge/progress%20tracker-trello-brightgreen.svg\n   :target: https://trello.com/b/G5iFgS1W/spotlight\n\n|\n\nSpotlight uses `PyTorch <http://pytorch.org/>`_ to build both deep and shallow\nrecommender models. By providing both a slew of building blocks for loss functions\n(various pointwise and pairwise ranking losses), representations (shallow\nfactorization representations, deep sequence models), and utilities for fetching\n(or generating) recommendation datasets, it aims to be a tool for rapid exploration\nand prototyping of new recommender models.\n\nSee the full `documentation <https://maciejkula.github.io/spotlight/>`_ for details.\n\nInstallation\n~~~~~~~~~~~~\n\n.. code-block:: python\n\n   conda install -c maciejkula -c pytorch spotlight=0.1.5\n\n\nUsage\n~~~~~\n\nFactorization models\n====================\n\nTo fit an explicit feedback model on the MovieLens dataset:\n\n.. code-block:: python\n\n    from spotlight.cross_validation import random_train_test_split\n    from spotlight.datasets.movielens import get_movielens_dataset\n    from spotlight.evaluation import rmse_score\n    from spotlight.factorization.explicit import ExplicitFactorizationModel\n\n    dataset = get_movielens_dataset(variant='100K')\n\n    train, test = random_train_test_split(dataset)\n\n    model = ExplicitFactorizationModel(n_iter=1)\n    model.fit(train)\n\n    rmse = rmse_score(model, test)\n\n\n\nTo fit an implicit ranking model with a BPR pairwise loss on the MovieLens dataset:\n\n.. code-block:: python\n\n    from spotlight.cross_validation import random_train_test_split\n    from spotlight.datasets.movielens import get_movielens_dataset\n    from spotlight.evaluation import mrr_score\n    from spotlight.factorization.implicit import ImplicitFactorizationModel\n\n    dataset = get_movielens_dataset(variant='100K')\n\n    train, test = random_train_test_split(dataset)\n\n    model = ImplicitFactorizationModel(n_iter=3,\n                                       loss='bpr')\n    model.fit(train)\n\n    mrr = mrr_score(model, test)\n\n\n\n\nSequential models\n=================\n\nRecommendations can be seen as a sequence prediction task: given the items a user\nhas interacted with in the past, what will be the next item they will interact\nwith? Spotlight provides a range of models and utilities for fitting next item\nrecommendation models, including\n\n- pooling models, as in `YouTube recommendations <https://pdfs.semanticscholar.org/bcdb/4da4a05f0e7bc17d1600f3a91a338cd7ffd3.pdf>`_,\n- LSTM models, as in `Session-based recommendations... <https://arxiv.org/pdf/1511.06939>`_, and\n- causal convolution models, as in `WaveNet <https://arxiv.org/pdf/1609.03499>`_.\n\n.. code-block:: python\n\n    from spotlight.cross_validation import user_based_train_test_split\n    from spotlight.datasets.synthetic import generate_sequential\n    from spotlight.evaluation import sequence_mrr_score\n    from spotlight.sequence.implicit import ImplicitSequenceModel\n\n    dataset = generate_sequential(num_users=100,\n                                  num_items=1000,\n                                  num_interactions=10000,\n                                  concentration_parameter=0.01,\n                                  order=3)\n\n    train, test = user_based_train_test_split(dataset)\n\n    train = train.to_sequence()\n    test = test.to_sequence()\n\n    model = ImplicitSequenceModel(n_iter=3,\n                                  representation='cnn',\n                                  loss='bpr')\n    model.fit(train)\n\n    mrr = sequence_mrr_score(model, test)\n\n\n  \n\nDatasets\n========\n\nSpotlight offers a slew of popular datasets, including Movielens 100K, 1M, 10M, and 20M.\nIt also incorporates utilities for creating synthetic datasets. For example, `generate_sequential`\ngenerates a Markov-chain-derived interaction dataset, where the next item a user chooses is\na function of their previous interactions:\n\n.. code-block:: python\n\n    from spotlight.datasets.synthetic import generate_sequential\n\n    # Concentration parameter governs how predictable the chain is;\n    # order determins the order of the Markov chain.\n    dataset = generate_sequential(num_users=100,\n                                  num_items=1000,\n                                  num_interactions=10000,\n                                  concentration_parameter=0.01,\n                                  order=3)\n\n\n\n\nExamples\n~~~~~~~~\n\n1. `Rating prediction on the Movielens dataset <https://github.com/maciejkula/spotlight/tree/master/examples/movielens_explicit>`_.\n2. `Using causal convolutions for sequence recommendations <https://github.com/maciejkula/spotlight/tree/master/examples/movielens_sequence>`_.\n3. `Bloom embedding layers <https://github.com/maciejkula/spotlight/tree/master/examples/bloom_embeddings>`_.\n\n\nHow to cite\n~~~~~~~~~~~\n\nPlease cite Spotlight if it helps your research. You can use the following BibTeX entry:\n\n.. code-block::\n\n   @misc{kula2017spotlight,\n     title={Spotlight},\n     author={Kula, Maciej},\n     year={2017},\n     publisher={GitHub},\n     howpublished={\\url{https://github.com/maciejkula/spotlight}},\n   }\n\n\nContributing\n~~~~~~~~~~~~\n\nSpotlight is meant to be extensible: pull requests are welcome. Development progress is tracked on `Trello <https://trello.com/b/G5iFgS1W/spotlight>`_: have a look at the outstanding tickets to get an idea of what would be a useful contribution.\n\nWe accept implementations of new recommendation models into the Spotlight model zoo: if you've just published a paper describing your new model, or have an implementation of a model from the literature, make a PR!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"431C:24970A:17EDDB:5D272D:6AB921CB"},"text_sha256":"1daa01aecc07bd5848c100e4576fda06512e29676d60bce7cd4cce1e0d580ce6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"3000","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:17D906E:1BF9CE9:6AB9297D"},"commit":{"sha":"75f4c8c55090771b52b88ef1a00f75bb39f9f2a9","url":"https://github.com/maciejkula/spotlight/commit/75f4c8c55090771b52b88ef1a00f75bb39f9f2a9","date":"2020-02-09T21:03:48Z","author_date":"2020-02-09T21:03:48Z","committer_date":"2020-02-09T21:03:48Z","tree_sha":"d03f1368fa44f0800a10c4cdf0e204e53f89de64","message_first_line":"Merge pull request #177 from maciejkula/pytorch_1_4"},"tree_request_status":200,"tree_rate":{"github_remaining":"2999","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082C:7307A:17A95C0:1BC9E43:6AB9297D"},"tree_truncated":false,"document_candidates":[{"path":"readme.rst","size":6402,"blob_sha":"183f940ca31d47c54ba217bc2b66a9bf606c8393","priority":0}],"documents":[{"path":"readme.rst","size":6402,"blob_sha":"183f940ca31d47c54ba217bc2b66a9bf606c8393","priority":0,"status":200,"text":".. image:: docs/_static/img/spotlight.png\n\n---------------------------------------------------------------------\n\n.. inclusion-marker-do-not-remove\n\n.. image:: https://travis-ci.org/maciejkula/spotlight.svg?branch=master\n   :target: https://travis-ci.org/maciejkula/spotlight\n\n.. image:: https://ci.appveyor.com/api/projects/status/jq5e76a7a08ra2ji/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/maciejkula/spotlight/branch/master\n\n.. image:: https://badges.gitter.im/gitterHQ/gitter.png\n   :target: https://gitter.im/spotlight-recommendations/Lobby\n\n.. image:: https://anaconda.org/maciejkula/spotlight/badges/version.svg\n   :target: https://anaconda.org/maciejkula/spotlight\n\n.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat\n   :target: https://maciejkula.github.io/spotlight/\n\n.. image:: https://img.shields.io/badge/progress%20tracker-trello-brightgreen.svg\n   :target: https://trello.com/b/G5iFgS1W/spotlight\n\n|\n\nSpotlight uses `PyTorch <http://pytorch.org/>`_ to build both deep and shallow\nrecommender models. By providing both a slew of building blocks for loss functions\n(various pointwise and pairwise ranking losses), representations (shallow\nfactorization representations, deep sequence models), and utilities for fetching\n(or generating) recommendation datasets, it aims to be a tool for rapid exploration\nand prototyping of new recommender models.\n\nSee the full `documentation <https://maciejkula.github.io/spotlight/>`_ for details.\n\nInstallation\n~~~~~~~~~~~~\n\n.. code-block:: python\n\n   conda install -c maciejkula -c pytorch spotlight\n\n\nUsage\n~~~~~\n\nFactorization models\n====================\n\nTo fit an explicit feedback model on the MovieLens dataset:\n\n.. code-block:: python\n\n    from spotlight.cross_validation import random_train_test_split\n    from spotlight.datasets.movielens import get_movielens_dataset\n    from spotlight.evaluation import rmse_score\n    from spotlight.factorization.explicit import ExplicitFactorizationModel\n\n    dataset = get_movielens_dataset(variant='100K')\n\n    train, test = random_train_test_split(dataset)\n\n    model = ExplicitFactorizationModel(n_iter=1)\n    model.fit(train)\n\n    rmse = rmse_score(model, test)\n\n\n\nTo fit an implicit ranking model with a BPR pairwise loss on the MovieLens dataset:\n\n.. code-block:: python\n\n    from spotlight.cross_validation import random_train_test_split\n    from spotlight.datasets.movielens import get_movielens_dataset\n    from spotlight.evaluation import mrr_score\n    from spotlight.factorization.implicit import ImplicitFactorizationModel\n\n    dataset = get_movielens_dataset(variant='100K')\n\n    train, test = random_train_test_split(dataset)\n\n    model = ImplicitFactorizationModel(n_iter=3,\n                                       loss='bpr')\n    model.fit(train)\n\n    mrr = mrr_score(model, test)\n\n\n\n\nSequential models\n=================\n\nRecommendations can be seen as a sequence prediction task: given the items a user\nhas interacted with in the past, what will be the next item they will interact\nwith? Spotlight provides a range of models and utilities for fitting next item\nrecommendation models, including\n\n- pooling models, as in `YouTube recommendations <https://pdfs.semanticscholar.org/bcdb/4da4a05f0e7bc17d1600f3a91a338cd7ffd3.pdf>`_,\n- LSTM models, as in `Session-based recommendations... <https://arxiv.org/pdf/1511.06939>`_, and\n- causal convolution models, as in `WaveNet <https://arxiv.org/pdf/1609.03499>`_.\n\n.. code-block:: python\n\n    from spotlight.cross_validation import user_based_train_test_split\n    from spotlight.datasets.synthetic import generate_sequential\n    from spotlight.evaluation import sequence_mrr_score\n    from spotlight.sequence.implicit import ImplicitSequenceModel\n\n    dataset = generate_sequential(num_users=100,\n                                  num_items=1000,\n                                  num_interactions=10000,\n                                  concentration_parameter=0.01,\n                                  order=3)\n\n    train, test = user_based_train_test_split(dataset)\n\n    train = train.to_sequence()\n    test = test.to_sequence()\n\n    model = ImplicitSequenceModel(n_iter=3,\n                                  representation='cnn',\n                                  loss='bpr')\n    model.fit(train)\n\n    mrr = sequence_mrr_score(model, test)\n\n\n  \n\nDatasets\n========\n\nSpotlight offers a slew of popular datasets, including Movielens 100K, 1M, 10M, and 20M.\nIt also incorporates utilities for creating synthetic datasets. For example, `generate_sequential`\ngenerates a Markov-chain-derived interaction dataset, where the next item a user chooses is\na function of their previous interactions:\n\n.. code-block:: python\n\n    from spotlight.datasets.synthetic import generate_sequential\n\n    # Concentration parameter governs how predictable the chain is;\n    # order determins the order of the Markov chain.\n    dataset = generate_sequential(num_users=100,\n                                  num_items=1000,\n                                  num_interactions=10000,\n                                  concentration_parameter=0.01,\n                                  order=3)\n\n\n\n\nExamples\n~~~~~~~~\n\n1. `Rating prediction on the Movielens dataset <https://github.com/maciejkula/spotlight/tree/master/examples/movielens_explicit>`_.\n2. `Using causal convolutions for sequence recommendations <https://github.com/maciejkula/spotlight/tree/master/examples/movielens_sequence>`_.\n3. `Bloom embedding layers <https://github.com/maciejkula/spotlight/tree/master/examples/bloom_embeddings>`_.\n\n\nHow to cite\n~~~~~~~~~~~\n\nPlease cite Spotlight if it helps your research. You can use the following BibTeX entry:\n\n.. code-block::\n\n   @misc{kula2017spotlight,\n     title={Spotlight},\n     author={Kula, Maciej},\n     year={2017},\n     publisher={GitHub},\n     howpublished={\\url{https://github.com/maciejkula/spotlight}},\n   }\n\n\nContributing\n~~~~~~~~~~~~\n\nSpotlight is meant to be extensible: pull requests are welcome. Development progress is tracked on `Trello <https://trello.com/b/G5iFgS1W/spotlight>`_: have a look at the outstanding tickets to get an idea of what would be a useful contribution.\n\nWe accept implementations of new recommendation models into the Spotlight model zoo: if you've just published a paper describing your new model, or have an implementation of a model from the literature, make a PR!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EA7A:349C76:171C65:5C545B:6AB921CF"},"text_sha256":"7e96d11c3ffac119db81c0a89ae6f0f65f5754001c26661f138d3a7d1fb7532e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"raghakot/keras-vis","input_row":{"repository":"raghakot/keras-vis","url":"https://github.com/raghakot/keras-vis","name":"keras-vis","owner":"raghakot","description":"Neural network visualization toolkit for keras","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2992,"issues":214,"created_at":"2016-11-11T23:27:34Z","updated_at":"2026-09-12T19:38:06Z","first_commit_at":"2016-11-11T23:27:34Z","last_commit_at":"2020-04-20T01:03:12Z","activity_months":41.229999999999997,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:38.550Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"raghakot/keras-vis","visibility":"public","created_at":"2016-11-11T23:27:34Z","updated_at":"2026-09-12T19:38:06Z","private":false,"fork":false,"archived":false,"stargazers_count":2992,"open_issues_count":116,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2998","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17B9B7D:1BDA566:6AB9297E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2997","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:17D770F:1BF84E4:6AB9297E"},"commit":{"sha":"40b27dfa3ecb84cdde5ec6b44251923c3266cc40","url":"https://github.com/raghakot/keras-vis/commit/40b27dfa3ecb84cdde5ec6b44251923c3266cc40","date":"2018-01-25T06:29:17Z","author_date":"2018-01-25T06:29:17Z","committer_date":"2018-01-25T06:29:17Z","tree_sha":"38b89558c2d39912ae14b27c18ab741d8e932b07","message_first_line":"use keras l2_normalize"},"tree_request_status":200,"tree_rate":{"github_remaining":"2996","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:17E6053:1C0650A:6AB9297F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6978,"blob_sha":"acd0b173307853be98915f6fb4195ee9a495c699","priority":0}],"documents":[{"path":"README.md","size":6978,"blob_sha":"acd0b173307853be98915f6fb4195ee9a495c699","priority":0,"status":200,"text":"# Keras Visualization Toolkit\n[![Build Status](https://travis-ci.org/raghakot/keras-vis.svg?branch=master)](https://travis-ci.org/raghakot/keras-vis)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/raghakot/keras-vis/blob/master/LICENSE)\n[![Slack](https://img.shields.io/badge/slack-discussion-E01563.svg)](https://keras-vis.herokuapp.com/)\n\nkeras-vis is a high-level toolkit for visualizing and debugging your trained keras neural net models. Currently\nsupported visualizations include:\n\n- Activation maximization\n- Saliency maps\n- Class activation maps\n\nAll visualizations by default support N-dimensional image inputs. i.e., it generalizes to N-dim image inputs \nto your model.\n\nThe toolkit generalizes all of the above as energy minimization problems with a clean, easy to use, \nand extendable interface. Compatible with both theano and tensorflow backends with 'channels_first', 'channels_last' \ndata format.\n\n## Quick links\n* Read the documentation at [https://raghakot.github.io/keras-vis](https://raghakot.github.io/keras-vis). \n* Join the slack [channel](https://keras-vis.herokuapp.com/) for questions/discussions.\n* We are tracking new features/tasks in [waffle.io](https://waffle.io/raghakot/keras-vis). Would love it if you lend us \na hand and submit PRs.\n\n## Getting Started\nIn image backprop problems, the goal is to generate an input image that minimizes some loss function.\nSetting up an image backprop problem is easy.\n\n**Define weighted loss function**\n\nVarious useful loss functions are defined in [losses](https://raghakot.github.io/keras-vis/vis.losses).\nA custom loss function can be defined by implementing [Loss.build_loss](https://raghakot.github.io/keras-vis/vis.losses/#lossbuild_loss).\n\n```python\nfrom vis.losses import ActivationMaximization\nfrom vis.regularizers import TotalVariation, LPNorm\n\nfilter_indices = [1, 2, 3]\n\n# Tuple consists of (loss_function, weight)\n# Add regularizers as needed.\nlosses = [\n    (ActivationMaximization(keras_layer, filter_indices), 1),\n    (LPNorm(model.input), 10),\n    (TotalVariation(model.input), 10)\n]\n```\n\n**Configure optimizer to minimize weighted loss**\n\nIn order to generate natural looking images, image search space is constrained using regularization penalties. \nSome common regularizers are defined in [regularizers](https://raghakot.github.io/keras-vis/vis.regularizers).\nLike loss functions, custom regularizer can be defined by implementing \n[Loss.build_loss](https://raghakot.github.io/keras-vis/vis.losses/#lossbuild_loss).\n\n```python\nfrom vis.optimizer import Optimizer\n\noptimizer = Optimizer(model.input, losses)\nopt_img, grads, _ = optimizer.minimize()\n```\n\nConcrete examples of various supported visualizations can be found in \n[examples folder](https://github.com/raghakot/keras-vis/tree/master/examples).\n\n## Installation\n\n1) Install [keras](https://github.com/fchollet/keras/blob/master/README.md#installation) \nwith theano or tensorflow backend. Note that this library requires Keras > 2.0\n\n2) Install keras-vis\n> From sources\n```bash\nsudo python setup.py install\n```\n\n> PyPI package\n```bash\nsudo pip install keras-vis\n```\n\n## Visualizations\n\n**NOTE: The links are currently broken and the entire documentation is being reworked.\nPlease see examples/ for samples.**\n\nNeural nets are black boxes. In the recent years, several approaches for understanding and visualizing Convolutional \nNetworks have been developed in the literature. They give us a way to peer into the black boxes, \ndiagnose mis-classifications, and assess whether the network is over/under fitting. \n\nGuided backprop can also be used to create [trippy art](https://deepdreamgenerator.com/gallery), neural/texture \n[style transfer](https://github.com/jcjohnson/neural-style) among the list of other growing applications.\n\nVarious visualizations, documented in their own pages, are summarized here.\n\n<hr/>\n\n### [Conv filter visualization](https://raghakot.github.io/keras-vis/visualizations/conv_filters)\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/conv_vis/cover.jpg?raw=true\"/>\n\n*Convolutional filters learn 'template matching' filters that maximize the output when a similar template \npattern is found in the input image. Visualize those templates via Activation Maximization.*\n\n<hr/>\n\n### [Dense layer visualization](https://raghakot.github.io/keras-vis/visualizations/dense)\n\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/dense_vis/cover.png?raw=true\"/>\n\n*How can we assess whether a network is over/under fitting or generalizing well?*\n\n<hr/>\n\n### [Attention Maps](https://raghakot.github.io/keras-vis/visualizations/attention)\n\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/attention_vis/cover.png?raw=true\"/>\n\n*How can we assess whether a network is attending to correct parts of the image in order to generate a decision?*\n\n<hr/>\n\n### Generating animated gif of optimization progress\nIt is possible to generate an animated gif of optimization progress by leveraging \n[callbacks](https://raghakot.github.io/keras-vis/vis.callbacks). Following example shows how to visualize the \nactivation maximization for 'ouzel' class (output_index: 20).\n\n```python\nfrom vis.losses import ActivationMaximization\nfrom vis.regularizers import TotalVariation, LPNorm\nfrom vis.modifiers import Jitter\nfrom vis.optimizer import Optimizer\n\nfrom vis.callbacks import GifGenerator\nfrom vis.utils.vggnet import VGG16\n\n# Build the VGG16 network with ImageNet weights\nmodel = VGG16(weights='imagenet', include_top=True)\nprint('Model loaded.')\n\n# The name of the layer we want to visualize\n# (see model definition in vggnet.py)\nlayer_name = 'predictions'\nlayer_dict = dict([(layer.name, layer) for layer in model.layers[1:]])\noutput_class = [20]\n\nlosses = [\n    (ActivationMaximization(layer_dict[layer_name], output_class), 2),\n    (LPNorm(model.input), 10),\n    (TotalVariation(model.input), 10)\n]\nopt = Optimizer(model.input, losses)\nopt.minimize(max_iter=500, verbose=True, image_modifiers=[Jitter()], callbacks=[GifGenerator('opt_progress')])\n\n```\n\nNotice how the output jitters around? This is because we used [Jitter](https://raghakot.github.io/keras-vis/vis.modifiers/#jitter), \na kind of [ImageModifier](https://raghakot.github.io/keras-vis/vis.modifiers/#imagemodifier) that is known to produce \ncrisper activation maximization images. As an exercise, try:\n\n- Without Jitter\n- Varying various loss weights\n\n![opt_progress](https://raw.githubusercontent.com/raghakot/keras-vis/master/images/opt_progress.gif?raw=true \"Optimization progress\")\n\n<hr/>\n\n## Citation\n\nPlease cite keras-vis in your publications if it helped your research. Here is an example BibTeX entry:\n\n```\n@misc{raghakotkerasvis\n  title={keras-vis},\n  author={Kotikalapudi, Raghavendra and contributors},\n  year={2017},\n  publisher={GitHub},\n  howpublished={\\url{https://github.com/raghakot/keras-vis}},\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AA42:3BB77:1742B8:5C7FDE:6AB921D0"},"text_sha256":"1bf2da2c98b06efdfe06b935e7110b8f901ba3f79a6c7c6a5a9c85b6e21435a4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2995","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0819:180242:17E248D:1C02FFC:6AB9297F"},"commit":{"sha":"90ae5565951b5e6a90d706b8205c2c4dfc271505","url":"https://github.com/raghakot/keras-vis/commit/90ae5565951b5e6a90d706b8205c2c4dfc271505","date":"2020-04-20T01:03:12Z","author_date":"2020-04-20T01:03:12Z","committer_date":"2020-04-20T01:03:12Z","tree_sha":"de70c0b25a408aef3b3f182b418f0968de8170cc","message_first_line":"Merge pull request #207 from braunholz/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"2994","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:17EE140:1C0EF69:6AB92980"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7107,"blob_sha":"36c4431c070f03d04124a2f825bdbdc1e8415543","priority":0}],"documents":[{"path":"README.md","size":7107,"blob_sha":"36c4431c070f03d04124a2f825bdbdc1e8415543","priority":0,"status":200,"text":"# Keras Visualization Toolkit\n[![Build Status](https://travis-ci.org/raghakot/keras-vis.svg?branch=master)](https://travis-ci.org/raghakot/keras-vis)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/raghakot/keras-vis/blob/master/LICENSE)\n[![Slack](https://img.shields.io/badge/slack-discussion-E01563.svg)](https://keras-vis.herokuapp.com/)\n\nkeras-vis is a high-level toolkit for visualizing and debugging your trained keras neural net models. Currently\nsupported visualizations include:\n\n- Activation maximization\n- Saliency maps\n- Class activation maps\n\nAll visualizations by default support N-dimensional image inputs. i.e., it generalizes to N-dim image inputs \nto your model.\n\nThe toolkit generalizes all of the above as energy minimization problems with a clean, easy to use, \nand extendable interface. Compatible with both theano and tensorflow backends with 'channels_first', 'channels_last' \ndata format.\n\n## Quick links\n* Read the documentation at [https://raghakot.github.io/keras-vis](https://raghakot.github.io/keras-vis). \n    * The Japanese edition is [https://keisen.github.io/keras-vis-docs-ja](https://keisen.github.io/keras-vis-docs-ja).\n* Join the slack [channel](https://keras-vis.herokuapp.com/) for questions/discussions.\n* We are tracking new features/tasks in [waffle.io](https://waffle.io/raghakot/keras-vis). Would love it if you lend us \na hand and submit PRs.\n\n## Getting Started\nIn image backprop problems, the goal is to generate an input image that minimizes some loss function.\nSetting up an image backprop problem is easy.\n\n**Define weighted loss function**\n\nVarious useful loss functions are defined in [losses](https://raghakot.github.io/keras-vis/vis.losses).\nA custom loss function can be defined by implementing [Loss.build_loss](https://raghakot.github.io/keras-vis/vis.losses/#lossbuild_loss).\n\n```python\nfrom vis.losses import ActivationMaximization\nfrom vis.regularizers import TotalVariation, LPNorm\n\nfilter_indices = [1, 2, 3]\n\n# Tuple consists of (loss_function, weight)\n# Add regularizers as needed.\nlosses = [\n    (ActivationMaximization(keras_layer, filter_indices), 1),\n    (LPNorm(model.input), 10),\n    (TotalVariation(model.input), 10)\n]\n```\n\n**Configure optimizer to minimize weighted loss**\n\nIn order to generate natural looking images, image search space is constrained using regularization penalties. \nSome common regularizers are defined in [regularizers](https://raghakot.github.io/keras-vis/vis.regularizers).\nLike loss functions, custom regularizer can be defined by implementing \n[Loss.build_loss](https://raghakot.github.io/keras-vis/vis.losses/#lossbuild_loss).\n\n```python\nfrom vis.optimizer import Optimizer\n\noptimizer = Optimizer(model.input, losses)\nopt_img, grads, _ = optimizer.minimize()\n```\n\nConcrete examples of various supported visualizations can be found in \n[examples folder](https://github.com/raghakot/keras-vis/tree/master/examples).\n\n## Installation\n\n1) Install [keras](https://github.com/fchollet/keras/blob/master/README.md#installation) \nwith theano or tensorflow backend. Note that this library requires Keras > 2.0\n\n2) Install keras-vis\n> From sources\n```bash\nsudo python setup.py install\n```\n\n> PyPI package\n```bash\nsudo pip install keras-vis\n```\n\n## Visualizations\n\n**NOTE: The links are currently broken and the entire documentation is being reworked.\nPlease see examples/ for samples.**\n\nNeural nets are black boxes. In the recent years, several approaches for understanding and visualizing Convolutional \nNetworks have been developed in the literature. They give us a way to peer into the black boxes, \ndiagnose mis-classifications, and assess whether the network is over/under fitting. \n\nGuided backprop can also be used to create [trippy art](https://deepdreamgenerator.com/gallery), neural/texture \n[style transfer](https://github.com/jcjohnson/neural-style) among the list of other growing applications.\n\nVarious visualizations, documented in their own pages, are summarized here.\n\n<hr/>\n\n### [Conv filter visualization](https://raghakot.github.io/keras-vis/visualizations/conv_filters)\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/conv_vis/cover.jpg?raw=true\"/>\n\n*Convolutional filters learn 'template matching' filters that maximize the output when a similar template \npattern is found in the input image. Visualize those templates via Activation Maximization.*\n\n<hr/>\n\n### [Dense layer visualization](https://raghakot.github.io/keras-vis/visualizations/dense)\n\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/dense_vis/cover.png?raw=true\"/>\n\n*How can we assess whether a network is over/under fitting or generalizing well?*\n\n<hr/>\n\n### [Attention Maps](https://raghakot.github.io/keras-vis/visualizations/attention)\n\n<img src=\"https://raw.githubusercontent.com/raghakot/keras-vis/master/images/attention_vis/cover.png?raw=true\"/>\n\n*How can we assess whether a network is attending to correct parts of the image in order to generate a decision?*\n\n<hr/>\n\n### Generating animated gif of optimization progress\nIt is possible to generate an animated gif of optimization progress by leveraging \n[callbacks](https://raghakot.github.io/keras-vis/vis.callbacks). Following example shows how to visualize the \nactivation maximization for 'ouzel' class (output_index: 20).\n\n```python\nfrom keras.applications import VGG16\n\nfrom vis.losses import ActivationMaximization\nfrom vis.regularizers import TotalVariation, LPNorm\nfrom vis.input_modifiers import Jitter\nfrom vis.optimizer import Optimizer\nfrom vis.callbacks import GifGenerator\n\n# Build the VGG16 network with ImageNet weights\nmodel = VGG16(weights='imagenet', include_top=True)\nprint('Model loaded.')\n\n# The name of the layer we want to visualize\n# (see model definition in vggnet.py)\nlayer_name = 'predictions'\nlayer_dict = dict([(layer.name, layer) for layer in model.layers[1:]])\noutput_class = [20]\n\nlosses = [\n    (ActivationMaximization(layer_dict[layer_name], output_class), 2),\n    (LPNorm(model.input), 10),\n    (TotalVariation(model.input), 10)\n]\nopt = Optimizer(model.input, losses)\nopt.minimize(max_iter=500, verbose=True, input_modifiers=[Jitter()], callbacks=[GifGenerator('opt_progress')])\n\n```\n\nNotice how the output jitters around? This is because we used [Jitter](https://raghakot.github.io/keras-vis/vis.modifiers/#jitter), \na kind of [ImageModifier](https://raghakot.github.io/keras-vis/vis.modifiers/#imagemodifier) that is known to produce \ncrisper activation maximization images. As an exercise, try:\n\n- Without Jitter\n- Varying various loss weights\n\n![opt_progress](https://raw.githubusercontent.com/raghakot/keras-vis/master/images/opt_progress.gif?raw=true \"Optimization progress\")\n\n<hr/>\n\n## Citation\n\nPlease cite keras-vis in your publications if it helped your research. Here is an example BibTeX entry:\n\n```\n@misc{raghakotkerasvis,\n  title={keras-vis},\n  author={Kotikalapudi, Raghavendra and contributors},\n  year={2017},\n  publisher={GitHub},\n  howpublished={\\url{https://github.com/raghakot/keras-vis}},\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"29D6:11E74B:17451B:5C7FEC:6AB921D1"},"text_sha256":"411965e520943c249a061e7d3a88211f5f08ee735c232074ea697ae9e3b7ae63"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jeeliz/jeelizFaceFilter","input_row":{"repository":"jeeliz/jeelizFaceFilter","url":"https://github.com/jeeliz/jeelizFaceFilter","name":"jeelizFaceFilter","owner":"jeeliz","description":"🎭 Lightweight WebGL & JavaScript library for real-time multi-face detection, tracking and augmented-reality face filters. Supports rotation, mouth-opening and integrates with Three.js, Babylon.js, Canvas2D and CSS3D","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2940,"issues":236,"created_at":"2018-02-16T21:43:54Z","updated_at":"2026-09-25T22:27:06Z","first_commit_at":"2018-02-16T21:43:54Z","last_commit_at":"2025-11-14T13:50:55Z","activity_months":92.890000000000001,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:40.952Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jeeliz/jeelizFaceFilter","visibility":"public","created_at":"2018-02-16T21:43:54Z","updated_at":"2026-09-25T22:27:06Z","private":false,"fork":false,"archived":false,"stargazers_count":2940,"open_issues_count":2,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2993","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17BD6BC:1BDE42B:6AB92980"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2992","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F3:77994:17D937A:1BFA061:6AB92981"},"commit":{"sha":"e0eba6ae6b0e22d94c21e918ffed8af244da561c","url":"https://github.com/jeeliz/jeelizFaceFilter/commit/e0eba6ae6b0e22d94c21e918ffed8af244da561c","date":"2018-05-24T19:26:13Z","author_date":"2018-05-24T19:26:13Z","committer_date":"2018-05-24T19:26:13Z","tree_sha":"ec56805f852bc2fbd8e109327e375846a9400ea2","message_first_line":"correct CSS bug on liberty statue demo"},"tree_request_status":200,"tree_rate":{"github_remaining":"2991","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17D1DD6:1BF299C:6AB92981"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22192,"blob_sha":"5bd4d6e16387e4922ecf9a869aa9c4ece57590dc","priority":0}],"documents":[{"path":"README.md","size":22192,"blob_sha":"5bd4d6e16387e4922ecf9a869aa9c4ece57590dc","priority":0,"status":200,"text":"# Jeeliz Face Filter: Lightweight and robust face detection and tracking javascript library based on WebGL deep learning.\n\n\n\n\nThis javascript library detects and tracks the face in real time from the video stream of the webcam captured with WebRTC. Then it is possible to overlay 3D content for augmented reality application. We provide various demonstrations using main WebGL 3D engines. We always include the production version of the 3D engine in the repository to work with a fixed version.\n\nThis library is lightweight and it does not include any 3D engine or third party library. We want to keep it framework agnostic so the outputs of the library are raw : if the a face is detected or not, the position and the scale of the detected face and the rotation Euler angles. But thanks to the featured examples and boilerplates, you can quickly use it in a more usable context (for motion head tracking, for face filter or face replacement...). We continuously add new demontrations, so stay tuned ! Also, feel free to open an issue if you have any question or suggestion.\n\n\n## Table of content\n\n* [Features](#features)\n* [Architecture](#architecture)\n* [Demonstrations](#demonstrations)\n* [Specifications](#specifications)\n  * [Get started](#get-started)\n  * [Optionnal init arguments](#optionnal-init-arguments)\n  * [Error codes](#error-codes)\n  * [The returned objects](#the-returned-objects)\n  * [Misc methods](#misc-methods)\n  * [Multiple faces](#multiple-faces)\n  * [Changing the 3D Engine](#changing-the-3d-engine)\n* [Hosting](#hosting)\n  * [The development server](#the-development-server)  \n  * [Hosting optimization](#hosting-optimization)\n* [About the tech](#about-the-tech)\n  * [Under the hood](#under-the-hood)\n  * [Compatibility](#compatibility)\n* [Articles](#articles)\n* [License](#license)\n* [See also](#see-also)\n* [References](#references)\n\n\n<p align=\"center\">\n<img src='https://user-images.githubusercontent.com/11960872/37533324-cfa3e516-2941-11e8-99a9-96a1e20c80a3.jpg' />\n<\/p>\n\n\n## Features\n* face detection,\n* face tracking,\n* face rotation detection,\n* mouth opening detection,\n* multiple faces detection and tracking,\n* very robust for all lighting conditions,\n* video acquisition with HD video ability,\n* mobile friendly,\n* interfaced with 3D engines like THREE.JS, BABYLON.JS, A-FRAME,\n* interfaced with more accessible APIs like CANVAS, CSS3D.\n\n\n## Architecture\n\n* `/demos/` : source code of demonstrations, sorted by 2D/3D engine used,\n* `/dist/` : heart of the library : \n  * `jeelizFaceFilter.js` : main minified script,\n  * `NNC.json` : file storing the neural network parameters, loaded by the main script,\n* `/helpers/` : scripts which can help you to use this library in some specific use cases,\n* `/libs/` : 3rd party libraries and 3D engines used in the demos.\n\n\n\n## Demonstrations\n\nYou can test it with these demos (all included in this repo in the `/demos` path). You will find among them the perfect starting point to build your own face based augmented reality application :\n* BABYLON.JS based demos :\n  * [Boilerplate (displays a cube on the user's head)](https://jeeliz.com/demos/faceFilter/demos/babylonjs/cube/)\n\n* THREE.JS based demos :\n  * [Boilerplate (displays a cube on the user's head)](https://jeeliz.com/demos/faceFilter/demos/threejs/cube/)\n  * [Multiple face tracking](https://jeeliz.com/demos/faceFilter/demos/threejs/multiCubes/)\n  * [Anonymous mask and video effect](https://jeeliz.com/demos/faceFilter/demos/threejs/anonymous/)\n  * [Dog-Face filter](https://jeeliz.com/demos/faceFilter/demos/threejs/dog_face/)\n  * [Butterflies animation](https://jeeliz.com/demos/faceFilter/demos/threejs/butterflies/)\n  * [Clouds above the head](https://jeeliz.com/demos/faceFilter/demos/threejs/cloud/)\n  * [Casa-de-Papel mask](https://jeeliz.com/demos/faceFilter/demos/threejs/casa_de_papel/)\n  * [Miel Pops glasses and bees](https://jeeliz.com/demos/faceFilter/demos/threejs/miel_pops/)\n  * [Football-fan Makeup](https://jeeliz.com/demos/faceFilter/demos/threejs/football_makeup/)\n  * [Face deformation](https://jeeliz.com/demos/faceFilter/demos/threejs/faceDeform/)\n  * [Face cel shading](https://jeeliz.com/demos/faceFilter/demos/threejs/celFace/)\n  * [Head controlled navigation](https://jeeliz.com/demos/faceFilter/demos/threejs/headControls/)\n  * [Tiger face filter with mouth opening detection (strong WTF effect)](https://jeeliz.com/demos/faceFilter/demos/threejs/tiger/)\n  * [Fireworks - particules](https://jeeliz.com/demos/faceFilter/demos/threejs/fireworks/)\n  * [Luffy's Hat](https://jeeliz.com/demos/faceFilter/demos/threejs/luffys_hat_part2/)\n  * [GLTF fullscreen demo with HD video](https://jeeliz.com/demos/faceFilter/demos/threejs/gltf_fullScreen/)\n  * [Statue Of Liberty](https://jeeliz.com/demos/faceFilter/demos/threejs/multiLiberty/)\n\n* A-FRAME based demos :\n  * [Boilerplate (displays a cube on the user's head)](https://jeeliz.com/demos/faceFilter/demos/aFrame/cube/)\n  \n* CSS3D based demos :\n  * [Boilerplate (displays a `<DIV>` element on the user's head)](https://jeeliz.com/demos/faceFilter/demos/CSS3D/div/)\n  * [Comedy glasses demo](https://jeeliz.com/demos/faceFilter/demos/CSS3D/comedy-glasses/)\n\n* Canvas2D based demos :\n  * [Draw on the face with the mouse](https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceDraw/)\n  * [2D face detection and tracking - 30 lines of code only !](https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceTrack/)\n\n* CESIUM.JS based demos :\n  * [3D view of the Earth with head controlled navigation](https://jeeliz.com/demos/faceFilter/demos/cesium/headControls/)\n\n* Face replacement demos :\n  * [Insert your face into portrait art painting or film posters](https://jeeliz.com/demos/faceFilter/demos/faceReplacement/image)\n  * [Insert your face into an animated gif](https://jeeliz.com/demos/faceFilter/demos/faceReplacement/gif), [specific README](demos/faceReplacement/gif/)\n\n* MISC demos :\n  * [PACMAN game with head controlled navigation](https://jeeliz.com/demos/faceFilter/demos/pacman/)\n\n\n\n\n[comment]:![giphy-downsized-large](https://user-images.githubusercontent.com/11960872/37475622-6a602cf6-2873-11e8-83f0-134b6c1ba666.gif)\n\nIf you have not bought a webcam yet, a screenshot video of some of these examples is available [on Youtube](https://youtu.be/jQkaJoMGinQ). You can also subscribe to the [Jeeliz Youtube channel](https://www.youtube.com/channel/UC3XmXH1T3d1XFyOhrRiiUeA) or to the [@StartupJeeliz Twitter account](https://twitter.com/StartupJeeliz) to be kept informed of our cutting edge developments.\n\nIf you have developped an application or a fun demo using this library, we would love to see it and insert a link here ! Just contact us on [Twitter @StartupJeeliz](https://twitter.com/StartupJeeliz) or [LinkedIn](https://www.linkedin.com/company/jeeliz).\n\n\n\n## Specifications\nHere we describe how to use this library. Although we planned to add new features, we will keep it backward compatible.\n\n### Get started\nOn your HTML page, you first need to include the main script between the tags `<head>` and `<\/head>` :\n```html\n <script type=\"text/javascript\" src=\"dist/jeelizFaceFilter.js\"><\/script>\n```\nThen you should include a `CANVAS` HTML element in the DOM, between the tags `<body>` and `<\/body>`. The `width` and `height` properties of the canvas element should be set. They define the resolution of the canvas and the final rendering will be computed using this resolution. Be careful to not enlarge too much the canvas size using its CSS properties without increasing its resolution, otherwise it may look blurry or pixelated. We advise to fix the resolution to the actual canvas size. Do not forget to call `JEEFACEFILTERAPI.resize()` if you resize the canvas after the initialization step.\n```html\n<canvas width=\"600\" height=\"600\" id='jeeFaceFilterCanvas'><\/canvas>\n```\nThis canvas will be used by WebGL both for the computation and the 3D rendering. When your page is loaded you should launch this function :\n```javascript\nJEEFACEFILTERAPI.init({\n    canvasId: 'jeeFaceFilterCanvas',\n    NNCpath: '../../../dist/', //root of NNC.json file\n    callbackReady: function(errCode, spec){\n        if (errCode){\n            console.log('AN ERROR HAPPENS. ERROR CODE =', errCode);\n            return;\n        }\n        [init scene with spec...]\n        console.log('INFO : JEEFACEFILTERAPI IS READY');\n    }, //end callbackReady()\n\n    //called at each render iteration (drawing loop)\n    callbackTrack: function(detectState){\n        //render your scene here\n        [... do something with detectState]\n    } //end callbackTrack()\n});//end init call\n```\n\n### Optionnal init arguments\n* `<integer> maxFacesDetected` : Only for multiple face detection - maximum number of faces which can be detected and tracked. Should be between `1` (no multiple detection) and `8`,\n* `<integer> animateDelay` : It is used only in normal rendering mode (not in slow rendering mode). With this statement you can set accurately the number of milliseconds during which the browser wait at the end of the rendering loop before starting another detection. If you use the canvas of this API as a secondary element (for example in *PACMAN* or *EARTH NAVIGATION* demos) you should set a small `animateDelay` value (for example 2 milliseconds) in order to avoid rendering lags.\n* `<function> onWebcamAsk` : Function launched just before asking for the user to allow its webcam sharing,\n* `<function> onWebcamGet` : Function launched just after the user has accepted to share its video. It is called with the video element as argument,\n* `<dict> videoSetting` : override WebRTC specified video settings, which are by default :\n```javascript\n{\n  'idealWidth': 800,  //ideal video width in pixels\n  'idealHeight': 600, //ideal video height in pixels\n  'minWidth': 800,    //min video width in pixels\n  'maxWidth': 1280,   //max video width in pixels\n  'minHeight': 600,   //min video height in pixels\n  'maxHeight': 1280   //max video height in pixels\n}\n```\nIf the user has a mobile device in portrait display, we invert the width and height of these parameters for the first camera request. If it does not succeed, we revert the width and height.\n\n\n### Error codes\nThe initialization function ( `callbackReady` in the code snippet ) will be called with an error code ( `errCode` ). It can have these values :\n* `false` : no error occurs,\n* `\"GL_INCOMPATIBLE\"` : WebGL is not available, or this WebGL configuration is not enough (there is no WebGL2, or there is WebGL1 without OES_TEXTURE_FLOAT or OES_TEXTURE_HALF_FLOAT extension),\n* `\"ALREADY_INITIALIZED\"` : the API has been already initialized,\n* `\"NO_CANVASID\"` : no canvas ID was specified,\n* `\"INVALID_CANVASID\"` : cannot found the \\<canvas\\> element in the DOM,\n* `\"INVALID_CANVASDIMENSIONS\"` : the dimensions `width` and `height` of the canvas are not specified,\n* `\"WEBCAM_UNAVAILABLE\"` : cannot get access to the webcam (the user has no webcam, or it has not accepted to share the device, or the webcam is already busy),\n* `\"GLCONTEXT_LOST\"` : The WebGL context was lost. If the context is lost after the initialization, the `callbackReady` function will be launched a second time with this value as error code,\n* `\"MAXFACES_TOOHIGH\"` : The maximum number of detected and tracked faces, specified by the optional init argument `maxFacesDetected`, is too high.\n\n\n### The returned objects\nWe detail here the argument of the callback functions like `callbackReady` or `callbackTrack`. The reference of these objects do not change for memory optimization purpose. So you should copy their property values if you want to keep them unchanged outside the callback functions.\n\n### The initialization returned object\nThe initialization callback function ( `callbackReady` in the code snippet ) is called with a second argument, `spec`, if there is no error. `spec` is a dictionnary having these properties :\n* `GL` : the WebGL context. The rendering 3D engine should use this WebGL context,\n* `canvasElement` the \\<canvas\\> element,\n* `videoTexture` a WebGL texture displaying the webcam video. It matches the dimensions of the canvas. It can be used as a background.\n\n\n### The detection state\nAt each render iteration a callback function is called ( `callbackTrack` in the code snippet ). It has one argument ( `detectState` ) which is a dictionnary with these properties :\n* `detected` : the face detection probability, between 0 and 1,\n* `x`, `y` : The 2D coordinates of the center of the detection frame in the viewport (each between -1 and 1, `x` from left to right and `y` from bottom to top),\n* `s` : the scale along the horizontal axis of the detection frame, between 0 and 1 (1 for the full width). The detection frame is always square,\n* `rx`, `ry`, `rz` : the Euler angles of the head rotation in radians.\n* `expressions` : `Float32Array` listing the facial expression coefficients :\n    * `expressions[0]` : mouth opening coefficient (0 -> mouth closed, 1 -> mouth fully opened)\n\n\n### Misc methods\nAfter the initialization (ie after that `callbackReady` is launched ) , these methods are available :\n\n* `JEEFACEFILTERAPI.resize()` : should be called after resizing the canvas,\n\n* `JEEFACEFILTERAPI.toggle_pause(<boolean> isPause)` : pause/resume,\n\n* `JEEFACEFILTERAPI.toggle_slow(<boolean> isSlow)` : toggle the slow rendering mode : because this API consumes a lot of GPU resources, it may slow down other elements of the application. If the user opens a CSS menu for example, the CSS transitions and the DOM update can be slow. With this function you can slow down the rendering in order to relief the GPU. The tracking will also be slower unfortunately. We encourage to enable the slow mode as soon as a the user's attention is focused on a part other than the canvas,\n\n* `JEEFACEFILTERAPI.set_animateDelay(<integer> delay)` : Change the `animateDelay` (see `init()` arguments),\n\n* `set_inputTexture(<WebGLTexture> tex, <integer> width, <integer> height)` : Change the video input by a WebGL Texture instance. The dimensions of the texture, in pixels, should be provided,\n\n* `reset_inputTexture()` : Come back to the user's video as input texture.\n\n\n### Multiple faces\nIt is possible to detect and track several faces at the same time. To enable this feature, you only have to specify the optional init parameter `maxFacesDetected`. Its maximum value is `8`. Indeed, if you are tracking for example 8 faces at the same time, the detection will be slower because there is 8 times less computing power per face tracking. If you have put this value to `8` but if there is only `1` face detected, it should not slow down too much compared to the single face tracking.\n\nIf multiple faces tracking is enabled, the `callbackTrack` function is called with an array of detection states (instead of being called with a simple detection state). The detection state format is still the same.\n\nYou can use our `Three.js` multiple faces detection helper, `helpers/JeelizThreejsHelper.js` to get started and test [this example](https://jeeliz.com/demos/faceFilter/demos/threejs/multiCubes/). The [main script](demos/threejs/multiCubes/demo_multiCubes.js) has only 60 lines !\n\n\n\n### Changing the 3D Engine\nIt is possible to use another 3D engine than BABYLON.JS or THREE.JS. If you have accomplished this work, we would be interested to add your demonstration in this repository (or link to your code). Just open a pull request.\n\nIt is important that the 3D engine shares the same WebGL context. The WebGL context is created by Jeeliz Face Filter. The background video texture is given directly as a `WebGLTexture` object, so it is usable only on the Jeeliz Face Filter WebGL context. It would be more costly in term of computating time to have a second WebGL context for the 3D rendering, because at each new video frame we should transfert the video data from the `<video>` element to the 2 webgl contexts : the Jeeliz Face Filter WebGL context for processing, and the 3D engine WebGL Context. Fortunately, with BABYLON.JS or THREE.JS, it is easy to specify an already initalized WebGL context.\n\n\n\n## Hosting\n\nBecause this API requires the user's webcam stream through `MediaStream API`, your application should be served through HTTPS (even with a self-signed certificate). It won't work at all with unsecure HTTP, even locally.\n\n### The development server\nFor development purpose we provide a simple and minimalist HTTPS server in order to check out the demos or develop your very own filters. To launch it, execute in the bash console :\n\n```bash\n  python2 httpsServer.py\n```\nIt requires Python 2.X. Then open in your web browser [https://localhost:4443](https://localhost:4443).\n\n\n### Hosting optimization\nYou can use our hosted and up to date version of the library, available here :\n```\nhttps://appstatic.jeeliz.com/faceFilter/jeelizFaceFilter.js\n```\nIt uses the neuron network `NNC.json` hosted in the same path. The helpers used in these demos (all scripts in [/helpers/](helpers/)) are also hosted on `https://appstatic.jeeliz.com/faceFilter/`.\n\nIt is served through a content delivery network (CDN) using gzip compression.\nIf you host the scripts by yourself, be careful to enable gzip HTTP/HTTPS compression for JSON and JS files. Indeed, the neuron network JSON file, `dist/NNC.json` is quite heavy, but very well compressed with GZIP. You can check the gzip compression of your server [here](https://checkgzipcompression.com/).\n\nThe neuron network file, `dist/NNC.json` is loaded using an ajax `XMLHttpRequest` after calling `JEEFACEFILTER.init()` method and after the user has accepted the sharing of its webcam. We proceed this way to avoid to load this quite heavy file if the user refuses to share its webcam or if there is no webcam available. The loading will be faster if you systematically preload `dist/NNC.json` using a service worker or a simple raw `XMLHttpRequest` just after the HTML page loading. Then the file will be already in the browser cache when Jeeliz Facefilter API will need it.\n\n\n\n## About the tech\n### Under the hood\nThis API uses Jeeliz WebGL Deep Learning technology to detect and track the user's face using a deep learning network. The accuracy is adaptative : the better the hardware, the more detections are processed per second. All is done client-side.\n\n### Compatibility\n* If `WebGL2` is available, it uses `WebGL2` and no specific extension is required,\n* If `WebGL2` is not available but `WebGL1`, we require either `OES_TEXTURE_FLOAT` extension or `OES_TEXTURE_HALF_FLOAT` extension,\n* If `WebGL2` is not available, and if `WebGL1` is not available or neither `OES_TEXTURE_FLOAT` or `OES_HALF_TEXTURE_FLOAT` are implemented, the user is not compatible.\n\nIn all cases, you need to have WebRTC implemented in the web browser, otherwise FaceFilter API will not be able to get the webcam video feed. There are the compatibility tables from [caniuse.com](https://caniuse.com/) : [WebGL1](https://caniuse.com/#feat=webgl), [WebGL2](https://caniuse.com/#feat=webgl2), [WebRTC](https://caniuse.com/#feat=stream).\n\nIf you meet a compatibility error, please post an issue on this repository. If this is a problem with the webcam access, please first retry after closing all the application which could use your device (Skype, Messenger, other browser windows, ...). Please include :\n* a screenshot of [webglreport.com - WebGL1](http://webglreport.com/?v=1) (about your `WebGL1` implementation),\n* a screenshot of [webglreport.com - WebGL2](http://webglreport.com/?v=2) (about your `WebGL2` implementation),\n* the log from the web console,\n* the steps to reproduce the bug, and screenshots.\n\n\n\n## Articles\nWe are currently writing a series of tutorial for the API, starting by building some very basic filters and moving to harder ones.\n\n* Creating a Snapchat-like face filter using Jeeliz FaceFilter API and THREE.JS :\n  * Part 1: [Creating your first filter](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-1-creating-your-first-filter/)\n  * Part 2: [ User interactions and particles](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-2-user-interactions-and-particles/)\n\n* [Flying around the Globe with Cesium and Your Head](https://cesium.com/blog/2018/03/22/jeeliz-and-cesium/)\n\n* [Build a multifacial face filter](https://webglacademy.jeeliz.com/courses.php?courses=19_25_27_33_34#34) : Interactive step by step tutorial hosted on [WebGL Academy](http://www.webglacademy.com) where you learn to build a Statue of Liberty using THREE.js and this library\n\n\n## License\n[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). This application is free for both commercial and non-commercial use.\n\nWe appreciate attribution by including the [Jeeliz logo](https://jeeliz.com/wp-content/uploads/2018/01/LOGO_JEELIZ_BLUE.png) and link to the [Jeeliz website](https://jeeliz.com) in your application.\n\n\n## See also\nIf you just want to detect if the user is looking at the screen or not, [Jeeliz Glance Tracker](https://github.com/jeeliz/jeelizGlanceTracker) is released at this purpose. It can be useful to play and pause a video whether the user is watching or not. This library needs fewer resources and the neural network file is much lighter.\n\nIf you want to use this library for glasses virtual try-on (sunglasses, spectacles, ski masks), you can take a look at [Jeeliz VTO widget](https://github.com/jeeliz/jeelizGlassesVTOWidget). It includes a high quality and lightweight 3D engine which implements the following features : deferred shading, PBR, raytraced shadows, normal mapping, ... It also reconstruct the lighting environment of the user. But the glasses comes from a database hosted in our servers. If you want to add some models please contact us.\n\n\n## References\n* [Jeeliz official website](https://jeeliz.com)\n* [Babylon.JS official website with documentation, demos, examples...](https://www.babylonjs.com/)\n* [Three.JS official website with documentation, demos, examples...](https://threejs.org/)\n* [Cesium JS official website](https://cesiumjs.org/)\n* [A-Frame official website](https://aframe.io/)\n* [Webgl Academy : tutorials about WebGL and THREE.JS](http://www.webglacademy.com)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF6E:285814:16DC61:5C181F:6AB921CC"},"text_sha256":"16cf0f83f87e1c6c3ee3ef86d1821bdf9544be692ee689ea94179a7cca221cc3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2990","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:18002F6:1C20CD5:6AB92982"},"commit":{"sha":"6f2695120b992511fd6cb1fd80c600bb957cd08c","url":"https://github.com/jeeliz/jeelizFaceFilter/commit/6f2695120b992511fd6cb1fd80c600bb957cd08c","date":"2025-11-14T13:50:55Z","author_date":"2025-11-14T13:50:55Z","committer_date":"2025-11-14T13:50:55Z","tree_sha":"9232a71535d7d5cef13230c259a640f2de8b6870","message_first_line":"[DOC] Update README links"},"tree_request_status":200,"tree_rate":{"github_remaining":"2989","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0898:7307A:17A9A3B:1BCA343:6AB92983"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":55621,"blob_sha":"44de83441f121e02b665d80c08ecbf5f162833d3","priority":0}],"documents":[{"path":"README.md","size":55621,"blob_sha":"44de83441f121e02b665d80c08ecbf5f162833d3","priority":0,"status":200,"text":"# JavaScript/WebGL lightweight and robust face tracking library designed for augmented reality face filters\n\n\nThis JavaScript library detects and tracks the face in real time from the camera video feed captured with WebRTC. Then it is possible to overlay 3D content for augmented reality applications. We provide various demonstrations using the main WebGL 3D engines. We have included in this repository the release versions of the 3D engines to work with a determined version (they are in `/libs/<name of the engine>/`).\n\nThis library is lightweight and it does not include any 3D engine or third party library. We want to keep it framework agnostic so the outputs of the library are raw: if the face is detected or not, the position and the scale of the detected face and the rotation Euler angles. But thanks to the featured helpers, examples and boilerplates, you can quickly deal with a higher level context (for motion head tracking, for face filter or face replacement...). We continuously add new demonstrations, so stay tuned!\n\n<!-- If you need a custom development service using this library, you can submit the [FaceFilter development request form](https://forms.gle/kktPyojpJbwSSPED7). We will get back to you quickly. -->\n\n\n\n## Table of contents\n\n* [Features](#features)\n* [Architecture](#architecture)\n* [Demonstrations and apps](#demonstrations-and-apps)\n  * [Included in this repository](#included-in-this-repository)\n  * [Third party](#third-party)\n* [Specifications](#specifications)\n  * [Get started](#get-started)\n  * [Optional init arguments](#optional-init-arguments)\n  * [Error codes](#error-codes)\n  * [The returned objects](#the-returned-objects)\n  * [Miscellaneous methods](#miscellaneous-methods)\n  * [Multiple faces](#multiple-faces)\n  * [Multiple videos](#multiple-videos)\n  * [Optimization](#optimization)\n  * [Changing the 3D engine](#changing-the-3d-engine)\n  * [Changing the neural network](#changing-the-neural-network)\n  * [Using module](#using-module)\n* [Integration](#integration)\n  * [With a bundler](#with-a-bundler)\n  * [With JavaScript frontend frameworks](#with-javascript-frontend-frameworks)\n    * [With REACT and THREE Fiber](#with-react-and-three-fiber)\n    * [See also](#see-also)\n  * [Native](#native)\n* [Hosting](#hosting)\n  * [The development server](#the-development-server)  \n  * [Hosting optimization](#hosting-optimization)\n* [About the tech](#about-the-tech)\n  * [Under the hood](#under-the-hood)\n  * [Compatibility](#compatibility)\n* [Articles and tutorials](#articles-and-tutorials)\n<!-- * [Developer support plans](#developer-support-plans) -->\n<!-- * [Jeeliz Partner Network](#jeeliz-partner-network) -->\n* [License](#license)\n* [References](#references)\n\n\n<p align=\"center\">\n  <img src='https://user-images.githubusercontent.com/11960872/37533324-cfa3e516-2941-11e8-99a9-96a1e20c80a3.jpg' />\n<\/p>\n\n\n## Features\n\nHere are the main features of the library:\n\n* face detection,\n* face tracking,\n* face rotation detection,\n* mouth opening detection,\n* multiple faces detection and tracking,\n* very robust for all lighting conditions,\n* video acquisition with HD video ability,\n* mobile friendly,\n* interfaced with 3D engines like THREE.JS, BABYLON.JS, A-FRAME,\n* interfaced with more accessible APIs like CANVAS, CSS3D.\n\n\n## Architecture\n\n* `/demos/`: source code of the demonstrations, sorted by 2D/3D engine used,\n* `/dist/`: core scripts of the library:\n  * `jeelizFaceFilter.js`: main minified script,\n  * `jeelizFaceFilter.module.js`: main minified script for use as a module (with `import` or `require`),\n* `/neuralNets`: trained neural network models:\n  * `NN_DEFAULT.json`: file storing the neural network parameters, loaded by the main script,\n  * `NN_<xxx>.json`: alternative neural network models,\n* `/helpers/`: scripts which can help you to use this library in some specific use cases,\n* `/libs/`: 3rd party libraries and 3D engines used in the demos,\n* `/reactThreeFiberDemo/`: NPM/React/Vite/Three-Fiber boilerplate.\n\n\n## Demonstrations and apps\n\n### Included in this repository\n\nThese demonstration are included in this repository. So they are released under the [FaceFilter licence](#license). You will probably find among them the perfect starting point to build your own face based augmented reality application:\n\n <!-- These demos are NOT maintained anymore: -->\n  <!-- * Daft Punk (put the iconic helmet): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/daft_punk/)\n  * Star Wars: Darth Vader: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/star_wars/)\n  * Harry Potter (say \"Lumos!\"): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/harry_potter/)\n  * Halloween Spiders (you've got a spider in your mouth): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/halloween_spider/), [source code](/demos/threejs/halloween_spiders)\n  -->\n* REACT/THREE FIBER boilerplate: [/reactThreeFiberDemo](/reactThreeFiberDemo)\n\n* BABYLON.JS based demos:\n  * Boilerplate (displays a cube on the user's head): [live demo](https://jeeliz.com/demos/faceFilter/demos/babylonjs/cube/), [source code](/demos/babylonjs/cube/)\n\n* THREE.JS based demos - [specific README about THREE.js based demo problems](demos/threejs/):\n  * Boilerplates:\n    * Boilerplate (displays a cube on the user's head): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/cube2cv/), [source code](/demos/threejs/cube2cv/)\n    * Boilerplate with only 1 `<canvas>` element: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/cube/), [source code](/demos/threejs/cube/)\n    * Same boilerplate but using `neuralNets/NN_4EXPR_1.json` as neural net, and displays 4 expressions: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/cubeExpr/), [source code](/demos/threejs/cubeExpr/)\n    * Multiple face tracking: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/multiCubes/), [source code](/demos/threejs/multiCubes/)\n    * GLTF fullscreen demo with HD video: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/gltf_fullScreen/), [source code](/demos/threejs/gltf_fullScreen/)\n\n  * AR 3D demos:\n    * Werewolf (turn yourself into a werewolf): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/werewolf/), [source code](/demos/threejs/werewolf)\n    * Angel/Demon (discover who of the angel or demon will win in this animated scene): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/angel_demon/), [source code](/demos/threejs/angel_demon)\n    * Anonymous mask and video effect: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/anonymous/), [source code](/demos/threejs/anonymous)\n    * Rupy Motorcycle Helmet VTO: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/rupy_helmet/), [source code](/demos/threejs/rupy_helmet)\n    * Dog: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/dog_face/), [source code](/demos/threejs/dog_face)\n    * Butterflies animation: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/butterflies/), [source code](/demos/threejs/butterflies/)\n    * Clouds above the head: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/cloud/), [source code](/demos/threejs/cloud/)\n    * Casa-de-Papel mask: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/casa_de_papel/), [source code](/demos/threejs/casa_de_papel/)\n    * Miel Pops glasses and bees: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/miel_pops/), [source code](/demos/threejs/miel_pops/)\n    * Football makeup: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/football_makeup/), [source code](/demos/threejs/football_makeup/)\n    * Tiger face filter with mouth opening detection (strong WTF effect): [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/tiger/), [source code](/demos/threejs/tiger/)\n    * Fireworks - particules: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/fireworks/), [source code](/demos/threejs/fireworks/)\n\n  * face painting or deformation:\n    * Face deformation: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/faceDeform/), [source code](/demos/threejs/faceDeform/)\n    * Face cel shading: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/celFace/), [source code](/demos/threejs/celFace/)\n\n  * demos linked with tutorials:\n   <!-- * Luffy's Hat: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/luffys_hat_part2/), [source code part 1](/demos/threejs/luffys_hat_part1/), [tutorial part 1](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-1-creating-your-first-filter/), [source code part 2](/demos/threejs/luffys_hat_part2/), [tutorial part 2](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-2-user-interactions-and-particles/) -->\n    * Statue Of Liberty: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/multiLiberty/), [source code](/demos/threejs/multiLiberty/), [interactive tutorial](https://webglacademy.jeeliz.com/courses.php?courses=19_25_27_33_34#34)\n    * Matrix: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/matrix/), [source code](/demos/threejs/matrix/), [tutorial in French](https://xavierbourry.developpez.com/filtre-facial-webcam/)<!--, [tutorial in English](https://jeeliz.com/blog/tutorial-javascript-webgl-webcam-facial-filter-on-the-theme-of-matrix/) -->\n\n  * misc:\n    * Head controlled navigation: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/headControls/), [source code](/demos/threejs/headControls/)\n    * Glasses virtual try-on: [live demo](https://jeeliz.com/demos/faceFilter/demos/threejs/glassesVTO/), [source code](/demos/threejs/glassesVTO/)\n\n\n* A-FRAME based demos:\n  * Boilerplate (displays a cube on the user's head): [live demo](https://jeeliz.com/demos/faceFilter/demos/aFrame/cube/), [source code](/demos/aFrame/cube/)\n\n* CSS3D based demos:\n  * Boilerplate (displays a `<DIV>` element on the user's head): [live demo](https://jeeliz.com/demos/faceFilter/demos/CSS3D/div/), [source code](/demos/CSS3D/div/)\n  * Comedy glasses demo: [live demo](https://jeeliz.com/demos/faceFilter/demos/CSS3D/comedy-glasses/), [source code](/demos/CSS3D/comedy-glasses/)\n\n* Canvas2D based demos:\n  * Draw on the face with the mouse: [live demo](https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceDraw/), [source code](/demos/canvas2D/faceDraw/)\n  * 2D face detection and tracking - 30 lines of code only !: [live demo](https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceTrack/), [source code](/demos/canvas2D/faceTrack/), [JSfiddle](https://jsfiddle.net/jeeliz/2p34hbeh/)\n  * 2D face detection and tracking from a video file instead of camera video: [live demo](https://jeeliz.com/demos/faceFilter/demos/canvas2D/fromVideoFile/), [source code](/demos/canvas2D/fromVideoFile/)\n  * 2D face detection and tracking simultaneously from a video file and from the camera (multiple trackers example): [live demo](https://jeeliz.com/demos/faceFilter/demos/canvas2D/multipleTrackers/), [source code](/demos/canvas2D/multipleTrackers/)\n\n\n* CESIUM.JS based demos:\n  * 3D view of the Earth with head controlled navigation: [live demo](https://jeeliz.com/demos/faceFilter/demos/cesium/headControls/), [source code](/demos/cesium/headControls/), [article about the demo](https://cesium.com/blog/2018/03/22/jeeliz-and-cesium/)\n\n* Face replacement demos:\n  * Insert your face into portrait art painting or film posters: [live demo](https://jeeliz.com/demos/faceFilter/demos/faceReplacement/image), [source code](demos/faceReplacement/image/)\n  * Insert your face into an animated gif: [live demo](https://jeeliz.com/demos/faceFilter/demos/faceReplacement/gif), [specific README](/demos/faceReplacement/gif/README.md), [source code](demos/faceReplacement/gif/)\n  * The traditional faceSwap, fullscreen and with color correction: [live demo](https://jeeliz.com/demos/faceFilter/demos/faceReplacement/faceSwap/), [source code](demos/faceReplacement/faceSwap/)\n\n* Head motion control:\n  * PACMAN game with head controlled navigation: [live demo](https://jeeliz.com/demos/faceFilter/demos/pacman/), [source code](demos/pacman/)\n  * Head controlled mouse cursor: [live demo](https://jeeliz.com/demos/faceFilter/demos/headCursor/), [source code](demos/headCursor/)\n\n\n\n[comment]:![giphy-downsized-large](https://user-images.githubusercontent.com/11960872/37475622-6a602cf6-2873-11e8-83f0-134b6c1ba666.gif)\n\nSome screenshot videos are available [on Youtube](https://youtu.be/jQkaJoMGinQ). You can also subscribe to the [Jeeliz Youtube channel](https://www.youtube.com/channel/UC3XmXH1T3d1XFyOhrRiiUeA) or to the [@WebARRocks Twitter account](https://twitter.com/WebARRocks) to be kept informed of our cutting edge developments.\n\n\n\n### Third party\n\nThese amazing applications rely on this library for face detection and tracking:\n\n<!--* [SpiderMan Far From Home AR web application](https://spider-manfarfromhome.herokuapp.com/), made by [Ignite](http://ignitexr.com/). This library is used for the first part of the experience (Edith glasses). Then [8th Wall SLAM engine](https://www.8thwall.com/) is used to display the drones.\n-->\n\n* Applications made by [Movable Ink](https://movableink.com/):\n  <!-- * [Creative studio](https://movableink.com/product/augmented_reality?utm_source=linkedin&utm_medium=social&utm_campaign=q2_2019_arcampaign_productpage): easily create face filters without coding, only drag and drops! -->\n  * [Find your oasis](https://www.movablecamera.com/1/templates/70c57645-dca1-4a50-b312-0ea3d7c537fd/e1e7aa24-34a5-4818-b487-50ca3852754d.html),\n  * [Been there, done that](https://www.movablecamera.com/1/templates/d8f2a1b6-0a73-4645-9e2b-7eb3c85ca2e0/109867fc-1ec0-4545-9bbe-6364ab1a3049.html),\n  * [I <3 NY](https://www.movablecamera.com/1/templates/3e9a6b04-2663-4e2e-a8f8-0c675cd429fa/bb03f2fe-1ab0-4b4d-bc94-f146eefe8198.html),\n  * [Find your inner creative](https://www.movablecamera.com/1/templates/442bcb7c-3793-49e4-bea2-d56e68e73ec3/df7484bc-211d-4f43-adc1-41b13ca39f32.html),\n  * [Ski mask demo, with snow](https://www.movablecamera.com/6454/templates/7ed27eff-5978-4e0e-8345-0d53c7e894a2/d0115266-6d57-4d59-8775-1ac22f90eed6.html?mi_app_key=70ebf69e95809bf0&name=&mi_u=%7B%7Blead.SFDC%20Id%7D%7D),\n\n<!-- * [VRMjidori](https://vrmjidori.netlify.com/): Replace your head by a manga style character provided in .VRM file format. This demo has been developed by [けしごむ/Nono](https://twitter.com/ke4563) -->\n\n* [FaceVoice](https://github.com/CloffWrangler/facevoice): Control the mouse pointer with your head and by saying *Click*. [Discussion on Reddit](https://www.reddit.com/r/badUIbattles/comments/e1npf6/an_app_where_you_control_the_cursor_by_turning/)\n\n<!-- * [Halloween masks](https://halloween.tripod-digital.co.nz/): Amazing halloween masks experience made by [Thorsten Bux](https://twitter.com/thor_bux). The code is published on Github here: [ThorstenBux/halloween-masks](https://github.com/ThorstenBux/halloween-masks). -->\n\n<!-- * [Masks with WebM recording](https://etc.pen-nei.jp/jeeliz/): Mask demo made by [@iong](https://twitter.com/iong). You can change the mask using the lower left buttons, and record the video in WebM file format. -->\n\n* [GazeFilter](https://beehiveor.gitlab.io/gazefilter/): library to track accurately the pupils positions. There is a nice eye-tracking demo, including a debug view of the output of *FaceFilter* [here](https://beehiveor.gitlab.io/gazefilter/demo.html).\n\n* [SnapChat Clone](https://towhidkashem.github.io/snapchat-clone/): Great work from [Towhid Kashem](https://www.linkedin.com/in/towhid-kashem/). This library has been wrapped up to build a Snapchat clone. Check out the [Github source code repository](https://github.com/TowhidKashem/snapchat-clone), try the [live demo](https://towhidkashem.github.io/snapchat-clone/) or read the [Reddit thread](https://www.reddit.com/r/Frontend/comments/hqfu91/i_made_a_snapchat_clone_in_the_browser/).\n\n* [Facepaint](https://github.com/PatriciaArnedo/facepaint-frontend): Draw your own face filters with this creative web application developed by [Patricia Arnedo](https://www.linkedin.com/in/patriciaarnedo/) - [Medium article on the demo](https://patriciaarnedo.medium.com/building-an-ar-drawing-app-using-react-5f47740a747c)\n\n* [Virtual Fighter](https://virtuafighter.arounz.jp): Find the *Virtual Fighter* (*SEGA* Video game) who looks like you. The first part of this experiment relies on *face-api.js* to detect your face and landmarks. Then click on *PUSH* and a 3D face filter of a virtual fighter will be applied to your face using this library and *Three.js*\n\n* [Are you a true wizard?](https://facefilter-experiment.vercel.app/) Try-on an amazing wizard hat in this demo made by [Level 30 Wizards](https://level30wizards.com/)\n\n<!-- * [AR Bee NFT](https://www.hicetnunc.xyz/objkt/219200) NFT based on WebAR created by [Fivos Doganis (@fdoganis)](https://twitter.com/fdoganis) with a 3D model designed by [Michelle Brown](https://twitter.com/Thebadlament) and traded on [Hic et Nunc](https://www.hicetnunc.xyz) NFT platform. -->\n\n<!-- * * [Bollé virtual try-on](https://www.bolle.com/us/sunglasses/technologies/volt--lenses/chronoshield-46228.html) Bollé relies on Jeeliz Facefilter for its Sunglasses and ski mask virtual try-on module, developed by [Emersya](https://emersya.com/) and using Emersya amazing custom 3D engine for 3D rendering. -->\n\n<!-- * [Custom Halloween pumpkin mask](https://emersya.com/app/UBYF7QDAK4): Customize and try your own Halloween pumpkin using this funny webapp, made by [Emersya](https://emersya.com/) and relying on Emersya custom 3D engine for rendering. -->\n\n<!-- * [Glasses configurator](https://3zvx5.csb.app/): Glasses virtual try-on webapp developped with R3F and Create-React-App. [Click here to view the source code on Codesandbox](https://codesandbox.io/s/3zvx5). -->\n\n<!-- * [Vertebrae VTO](https://www.vertebrae.com/): Vertebrae relies on this library for face detection and tracking for some of its virtual try-on products. You can check it out on:\n\n  * [Moscot](https://moscot.com/products/lemtosh?variant=8187774664808): Click on the *VIRTUAL TRY-ON* button on the top-left of the product picture,\n  * [Goodr](https://goodr.com/products/freshly-baked-man-buns): Click on the *VIRTUAL TRY-ON* button on the top-left of the product picture,\n  * [Tenth Street](https://tenthstreethats.com/collections/best-sellers-hats/products/scala-panama-outback-albuquerque?variant=5488870522911): click on the *Try it on* button. -->\n\n* [Forte Series Face Shape Guide](https://forteseries.com/pages/face-shape-guide): Find the best hairstyle for your face shape. [Github repository](https://github.com/ForteSeries/Forte-Series-Face-Shape-Guide-AR) [Youtube Video here](https://www.tiktok.com/@forteseries/video/7418661605812014367)\n\nIf you have developped an application or a fun demo using this library, we would love to see it and insert a link here! Just contact us on [Twitter @WebARRocks](https://twitter.com/WebARRocks) or [LinkedIn](https://www.linkedin.com/company/jeeliz)\n\n\n## Specifications\n\nHere we describe how to use this library. Although we planned to add new features, we will keep it backward compatible.\n\n### Get started\n\nOn your HTML page, you first need to include the main script between the tags `<head>` and `<\/head>`:\n\n```html\n <script src=\"dist/jeelizFaceFilter.js\"><\/script>\n```\n\nThen you should include a `<canvas>` HTML element in the DOM, between the tags `<body>` and `<\/body>`. The `width` and `height` properties of the `<canvas>` element should be set. They define the resolution of the canvas and the final rendering will be computed using this resolution. Be careful to not enlarge too much the canvas size using its CSS properties without increasing its resolution, otherwise it may look blurry or pixelated. We advise to fix the resolution to the actual canvas size. Do not forget to call `JEELIZFACEFILTER.resize()` if you resize the canvas after the initialization step. We strongly encourage you to use our helper `/helpers/JeelizResizer.js` to set the width and height of the canvas (see [Optimization/Canvas and video resolutions](#optimization) section).\n\n```html\n<canvas width=\"600\" height=\"600\" id='jeeFaceFilterCanvas'><\/canvas>\n```\n\nThis canvas will be used by WebGL both for the computation and the 3D rendering. When your page is loaded you should launch this function:\n```javascript\nJEELIZFACEFILTER.init({\n  canvasId: 'jeeFaceFilterCanvas',\n  NNCPath: '../../../neuralNets/', // path to JSON neural network model (NN_DEFAULT.json by default)\n  callbackReady: function(errCode, spec){\n    if (errCode){\n      console.log('AN ERROR HAPPENS. ERROR CODE =', errCode);\n      return;\n    }\n    // [init scene with spec...]\n    console.log('INFO: JEELIZFACEFILTER IS READY');\n  }, //end callbackReady()\n\n  // called at each render iteration (drawing loop)\n  callbackTrack: function(detectState){\n    // Render your scene here\n    // [... do something with detectState]\n  } //end callbackTrack()\n});\n```\n\n### Optional init arguments\n\n* `<boolean> followZRot`: Allow full rotation around depth axis. Default value: `false`. See [Issue 42](https://github.com/jeeliz/jeelizFaceFilter/issues/42) for more details,\n* `<integer> maxFacesDetected`: Only for multiple face detection - maximum number of faces which can be detected and tracked. Should be between `1` (no multiple detection) and `8`,\n* `<integer> animateDelay`: It is used only in normal rendering mode (not in slow rendering mode). With this statement you can set accurately the number of milliseconds during which the browser wait at the end of the rendering loop before starting another detection. If you use the canvas of this library as a secondary element (for example in *PACMAN* or *EARTH NAVIGATION* demos) you should set a small `animateDelay` value (for example 2 milliseconds) in order to avoid rendering lags.\n* `<function> onWebcamAsk`: Function launched just before asking for the user to allow access to its camera,\n* `<function> onWebcamGet`: Function launched just after the user has accepted to share its video. It is called with the video element as argument,\n* `<dict> videoSettings`: override WebRTC specified video settings, which are by default:\n```javascript\n{\n  'videoElement' // not set by default. <video> element used\n   // WARN: If you specify this parameter,\n   //       1. all other settings will be useless\n   //       2. it means that you fully handle the video aspect\n   //       3. in case of using web-camera device make sure that\n   //          initialization goes after `loadeddata` event of the `videoElement`,\n   //          otherwise face detector will yield very low `detectState.detected` values\n   //          (to be more sure also await first `timeupdate` event)\n\n  'deviceId'            // not set by default\n  'facingMode': 'user', // to use the rear camera, set to 'environment'\n\n  'idealWidth': 800,  // ideal video width in pixels\n  'idealHeight': 600, // ideal video height in pixels\n  'minWidth': 480,    // min video width in pixels\n  'maxWidth': 1920,   // max video width in pixels\n  'minHeight': 480,   // min video height in pixels\n  'maxHeight': 1920,  // max video height in pixels,\n  'rotate': 0,        // rotation in degrees possible values: 0,90,-90,180\n  'flipX': false      // if we should flip horizontally the video. Default: false\n},\n```\nIf the user has a mobile device in portrait display mode, the width and height of these parameters are automatically inverted for the first camera request. If it does not succeed, we invert the width and height.\n\n* `<dict> scanSettings`: override face scan settings - see `set_scanSettings(...)` method for more information.\n* `<dict> stabilizationSettings`: override tracking stabilization settings - see `set_stabilizationSettings(...)` method for more information.\n* `<boolean> isKeepRunningOnWinFocusLost`: Whether we should keep the detection loop running even if the user switches the browser tab or minimizes the browser window. Default value is `false`. This option is useful for a videoconferencing app, where a face mask should be still computed if the *FaceFilter* window is not the active window. Even with this option toggled on, the face tracking is still slowed down when the FaceFilter window is not active.\n\n\n\n### Error codes\n\nThe initialization function ( `callbackReady` in the code snippet ) will be called with an error code ( `errCode` ). It can have these values:\n* `false`: no error occurs,\n* `\"GL_INCOMPATIBLE\"`: WebGL is not available, or this WebGL configuration is not enough (there is no WebGL2, or there is WebGL1 without OES_TEXTURE_FLOAT or OES_TEXTURE_HALF_FLOAT extension),\n* `\"ALREADY_INITIALIZED\"`: the library has been already initialized,\n* `\"NO_CANVASID\"`: no canvas or canvas ID was specified,\n* `\"INVALID_CANVASID\"`: cannot found the `<canvas>` element in the DOM,\n* `\"INVALID_CANVASDIMENSIONS\"`: the dimensions `width` and `height` of the canvas are not specified,\n* `\"WEBCAM_UNAVAILABLE\"`: cannot get access to the camera (the user has no camera, or it has not accepted to share the device, or the camera is already busy),\n* `\"GLCONTEXT_LOST\"`: The WebGL context was lost. If the context is lost after the initialization, the `callbackReady` function will be launched a second time with this value as error code,\n* `\"MAXFACES_TOOHIGH\"`: The maximum number of detected and tracked faces, specified by the optional init argument `maxFacesDetected`, is too high.\n\n\n### The returned objects\n\nWe detail here the arguments of the callback functions like `callbackReady` or `callbackTrack`. The reference of these objects do not change for memory optimization purpose. So you should copy their property values if you want to keep them unchanged outside the callback functions scopes.\n\n#### The initialization returned object\n\nThe initialization callback function ( `callbackReady` in the code snippet ) is called with a second argument, `spec`, if there is no error. `spec` is a dictionnary having these properties:\n* `<WebGLRenderingContext> GL`: the WebGL context. The rendering 3D engine should use this WebGL context,\n* `<canvas> canvasElement`: the `<canvas>` element,\n* `<WebGLTexture> videoTexture`: a WebGL texture displaying the camera video. It has the same resolution as the camera video,\n* `[<float>, <float>, <float>, <float>]` videoTransformMat2: flatten 2x2 matrix encoding a scaling and a rotation. We should apply this matrix to viewport coordinates to render `videoTexture` in the viewport,\n* `<HTMLVideoElement> videoElement`: the video used as source for the webgl texture `videoTexture`,\n* `<int> maxFacesDetected`: the maximum number of detected faces.\n\n\n#### The detection state\n\nAt each render iteration a callback function is executed ( `callbackTrack` in the code snippet ). It has one argument ( `detectState` ) which is a dictionnary with these properties:\n* `<float> detected`: the face detection probability, between `0` and `1`,\n* `<float> x`, `<float> y`: The 2D coordinates of the center of the detection frame in the viewport (each between -1 and 1, `x` from left to right and `y` from bottom to top),\n* `<float> s`: the scale along the horizontal axis of the detection frame, between 0 and 1 (1 for the full width). The detection frame is always square,\n* `<float> rx`, `<float> ry`, `<float> rz`: the Euler angles of the head rotation in radians.\n* `<Float32Array> expressions`: array listing the facial expression coefficients:\n    * `expressions[0]`: mouth opening coefficient (`0` &rarr; mouth closed, `1` &rarr; mouth fully opened)\n\nIn multiface detection mode, `detectState` is an array. Its size is equal to the maximum number of detected faces and each element of this array has the format described just before.\n\n\n### Miscellaneous methods\n\nAfter the initialization (ie after that `callbackReady` is launched ) , these methods are available:\n\n* `JEELIZFACEFILTER.resize()`: should be called after resizing the `<canvas>` element to adapt the cut of the video. It should also be called if the device orientation is changed to take account of new video dimensions,\n\n* `JEELIZFACEFILTER.toggle_pause(<boolean> isPause, <boolean> isShutOffVideo)`: pause/resume. This method will completely stop the rendering/detection loop. If `isShutOffVideo` is set to `true`, the media stream track will be stopped and the camera light will turn off. It returns a `Promise` object,\n\n* `JEELIZFACEFILTER.toggle_slow(<boolean> isSlow)`: toggle the slow rendering mode: because this library can consume a lot of GPU resources, it may slow down other elements of the application. If the user opens a CSS menu for example, the CSS transitions and the DOM update can be slow. With this function you can slow down the rendering in order to relieve the GPU. Unfortunately the tracking and the 3D rendering will also be slower but this is not a problem is the user is focusing on other elements of the application. We encourage to enable the slow mode as soon as a the user's attention is focused on a different part of the canvas,\n\n* `JEELIZFACEFILTER.set_animateDelay(<integer> delay)`: Change the `animateDelay` (see `init()` arguments),\n\n* `JEELIZFACEFILTER.set_inputTexture(<WebGLTexture> tex, <integer> width, <integer> height)`: Change the video input by a WebGL Texture instance. The dimensions of the texture, in pixels, should be provided,\n\n* `JEELIZFACEFILTER.reset_inputTexture()`: Come back to the user's video as input texture,\n\n* `JEELIZFACEFILTER.get_videoDevices(<function> callback)`: Should be called before the `init` method. 2 arguments are provided to the callback function:\n  * `<array> mediaDevices`: an array with all the devices founds. Each device is a javascript object having a `deviceId` string attribute. This value can be provided to the `init` method to use a specific camera. If an error happens, this value is set to `false`,\n  * `<string> errorLabel`: if an error happens, the label of the error. It can be: `NOTSUPPORTED`, `NODEVICESFOUND` or `PROMISEREJECTED`.\n\n* `JEELIZFACEFILTER.set_scanSettings(<object> scanSettings)`: Override scan settings. `scanSettings` is a dictionnary with the following properties:\n  * `<float> scale0Factor`: Relative width (`1` -> full width) of the searching window at the largest scale level. Default value is `0.8`,\n  * `<int> nScaleLevels`: Number of scale levels. Default is `3`,\n  * `[<float>, <float>, <float>] overlapFactors`: relative overlap according to X,Y and scale axis between 2 searching window positions. Higher values make scan faster but it may miss some positions. Set to `[1, 1, 1]` for no overlap. Default value is `[2, 2, 3]`,\n  * `<int> nDetectsPerLoop`: specify the number of detection per drawing loop. `-1` for adaptative value. Default: `-1`\n  * `<boolean> enableAsyncReadPixels` : enable asynchronous GPU reading. Default is `false`. It will free a lot of CPU resource but it may add latency on some devices\n\n* `JEELIZFACEFILTER.set_stabilizationSettings(<object> stabilizationSettings)`: Override detection stabilization settings. The output of the neural network is always noisy, so we need to stabilize it using a floatting average to avoid shaking artifacts. The internal algorithm computes first a stabilization factor `k` between `0` and `1`. If `k==0.0`, the detection is bad and we favor responsivity against stabilization. It happens when the user is moving quickly, rotating the head or when the detection is bad. On the contrary, if `k` is close to `1`, the detection is nice and the user does not move a lot so we can stabilize a lot. `stabilizationSettings` is a dictionnary with the following properties:\n\n  * `[<float> minValue, <float> maxValue] translationFactorRange`: multiply `k` by a factor `kTranslation` depending on the translation speed of the head (relative to the viewport). `kTranslation=0` if `translationSpeed<minValue` and `kTranslation=1` if `translationSpeed>maxValue`. The regression is linear. Default value: `[0.002, 0.005]`,\n  * `[<float> minValue, <float> maxValue] rotationFactorRange`: analogous to `translationFactorRange` but for rotation speed. Default value: `[0.015, 0.1]`,\n  * `[<float> minValue, <float> maxValue] qualityFactorRange`: analogous to `translationFactorRange` but for the head detection coefficient. Default value: `[0.9, 0.98]`,\n  * `[<float> minValue, <float> maxValue] alphaRange`: it specify how to apply `k`. Between 2 successive detections, we blend the previous `detectState` values with the current detection values using a mixing factor `alpha`. `alpha=<minValue>` if `k<0.0` and `alpha=<maxValue>` if `k>1.0`. Between the 2 values, the variation is quadratic. Default value: `[0.05, 1.0]`.\n\n* `JEELIZFACEFILTER.update_videoElement(<video> vid, <function|False> callback)`: change the video element used for the face detection (which can be provided via `VIDEOSETTINGS.videoElement`) by another video element. A callback function can be called when it is done.\n\n* `JEELIZFACEFILTER.update_videoSettings(<object> videoSettings)`: dynamically change the video settings (see [Optional init arguments](optional-init-arguments) for the properties of `videoSettings`). It is useful to change the camera from the selfie camera (user) to the back (environment) camera. A `Promise` is returned.\n\n* `JEELIZFACEFILTER.set_videoOrientation(<integer> angle, <boolean> flipX)`: Dynamically change `videoSettings.rotate` and `videoSettings.flipX`. This method should be called after initialization. The default values are `0` and `false`. The angle should be chosen among these values: `0, 90, 180, -90`,\n\n* `JEELIZFACEFILTER.destroy()`: Clean both graphic memory and JavaScript memory, uninit the library. After that you need to init the library again. A `Promise` is returned,\n\n* `JEELIZFACEFILTER.reset_GLState()`: reset the WebGL context,\n\n* `JEELIZFACEFILTER.render_video()`: render the video on the `<canvas>` element.\n\n\n\n### Optimization\n\n#### 1 or 2 Canvas?\n\nYou can either:\n\n1. Use 1 `<canvas>` with 1 WebGL context, shared by facefilter and THREE.js (or another 3D engine),\n2. Use 2 separate `<canvas>` elements, aligned using CSS, 1 canvas for AR, and the second one to display the video and to run this library.\n\nThe 1. is often more efficient, but the newest versions of THREE.js are not suited to share the WebGL context and some weird bugs can occur.\nSo I strongly advise to use 2 separate canvas.\n\n\n#### Canvas and video resolutions\n\nWe strongly recommend the use of the `JeelizResizer` helper in order to size the canvas to the display size in order to not compute more pixels than required. This helper also computes the best camera resolution, which is the closer to the canvas actual size. If the camera resolution is too high compared to the canvas resolution, your application will be unnecessarily slowed because it is quite costly to refresh the WebGL texture for each video frame. And if the video resolution is too low compared to the canvas resolution, the image will be blurry. You can take a look at the THREE.js boilerplate to see how it is used. To use the helper, you first need to include it in the HTML code:\n```\n<script src=\"https://appstatic.jeeliz.com/faceFilter/JeelizResizer.js\"><\/script>\n```\nThen in your main script, before initializing Jeeliz FaceFilter, you should call it to size the canvas to the best resolution and to find the optimal video resolution:\n```\nJeelizResizer.size_canvas({\n  canvasId: 'jeeFaceFilterCanvas',\n    callback: function(isError, bestVideoSettings){\n      JEELIZFACEFILTER.init({\n        videoSettings: bestVideoSettings,\n        // ...\n        // ...\n      });\n    }\n});\n```\nTake a look at the source code of this helper (in [helpers/JeelizResize.js](helpers/JeelizResize.js)) to get more information.\n\n\n#### Misc\n\nA few tips:\n* In term of optimisation, the WebGL based demos are more optimized than Canvas2D demos, which are still more optimized than CSS3D demos.\n* Try to use lighter resources as possibles. Each texture image should have the lowest resolution as possible, use mipmapping for texture minification filtering.\n* The more effects you use, the slower it will be. Add the 3D effects gradually to check that they do not penalize too much the frame rate.\n* Use low polygon meshes.\n\n\n### Multiple faces\n\nIt is possible to detect and track several faces at the same time. To enable this feature, you only have to specify the optional init parameter `maxFacesDetected`. Its maximum value is `8`. Indeed, if you are tracking for example 8 faces at the same time, the detection will be slower because there is 8 times less computing power per tracked face. If you have set this value to `8` but if there is only `1` face detected, it should not slow down too much compared to the single face tracking.\n\nIf multiple face tracking is enabled, the `callbackTrack` function is called with an array of detection states (instead of being executed with a simple detection state). The detection state format is still the same.\n\nYou can use our `Three.js` multiple faces detection helper, `helpers/JeelizThreeHelper.js` to get started and test [this example](https://jeeliz.com/demos/faceFilter/demos/threejs/multiCubes/). The [main script](demos/threejs/multiCubes/main.js) has only 60 lines of code !\n\n\n### Multiple videos\n\nTo create a new `JEELIZFACEFILTER` instance, you need to call:\n\n```javascript\nconst JEELIZFACEFILTER2 = JEELIZFACEFILTER.create_new();\n```\n\nBe aware that:\n* Each instance uses a new WebGL context. Depending on the configuration, the number of WebGL context is limited. We advise to not use more than 16 contexts simultaneously,\n* The computing power will be shared between the context. Using multiple instances may increase the latency.\n\nCheckout this demo to have an example of how it works: [source code](/demos/canvas2D/multipleTrackers/), [live demo](https://jeeliz.com/demos/faceFilter/demos/canvas2D/multipleTrackers/)\n\n\n\n### Changing the 3D engine\n\nIt is possible to use another 3D engine than BABYLON.JS or THREE.JS. If you have accomplished this work, we would be interested to add your demonstration in this repository (or link to your code). Just open a pull request.\n\nThe 3D engine can either share the WebGL context and the canvas with FaceFilter, or use a second canvas overlaid on the FaceFilter canvas (the FaceFilter canvas is just used to render the video). In the first case, the WebGL context is created by Jeeliz Face Filter. We strongly encourage the second approach, even if the first one may be a bit more optimized.\n\n<!--The background video texture is given directly as a `WebGLTexture` object, so it is usable only on the FaceFilter WebGL context. It would be more costly in term of computating time to have a second WebGL context for the 3D rendering, because at each new video frame we should transfert the video data from the `<video>` element to the 2 webgl contexts: the Jeeliz Face Filter WebGL context for processing, and the 3D engine WebGL Context for rendering. Fortunately, with BABYLON.JS or THREE.JS, it is easy to specify an already initialized WebGL context. -->\n\n\n### Changing the neural network\n\nSince July 2018 it is possible to change the neural network. When calling `JEELIZFACEFILTER.init({...})` with `NNCPath: <path of NN_DEFAULT.json>` you set NNCPath value to a specific neural network file:\n\n```javascript\n  JEELIZFACEFILTER.init({\n    NNCPath: '../../neuralNets/NN_LIGHT_1.json'\n    // ...\n  })\n```\nIt is also possible to give directly the neural network model JSON file content by using `NNC` property instead of `NNCPath`.\n\nWe provide several neural network models:\n* `neuralNets/NN_DEFAULT.json`: this is the default neural network. Good tradeoff between size and performances,\n* `neuralNets/NN_WIDEANGLES_<X>.json`: this neural network is better to detect wide head angles (but less accurate for small angles),\n* `neuralNets/NN_LIGHT_<X>.json`: this is a light version of the neural network. The file is twice lighter and it runs faster but it is less accurate for large head rotation angles,\n* `neuralNets/NNC_VERYLIGHT_<X>.json`: even lighter than the previous version: 250Kbytes, and very fast. But not very accurate and robust to all lighting conditions,\n* `neuralNets/NN_VIEWTOP_<X>.json`: this neural net is perfect if the camera has a bird's eye view (if you use this library for a kiosk setup for example),\n* `neuralNets/NN_INTEL1536.json`: neural network working with Intel 1536 Iris GPUs (there is a graphic driver bug, see [#85](https://github.com/jeeliz/jeelizFaceFilter/issues/85)),\n* `neuralNets/NN_4EXPR_<X>.json`: this neural network also detects 4 facial expressions (mouth opening, smile, frown eyebrows, raised eyebrows).\n\n\n### Using module\n\n`/dist/jeelizFaceFilter.module.js` is exactly the same as `/dist/jeelizFaceFilter.js` except that it works as a JavaScript module, so you can import it directly using:\n\n```javascript\nimport 'dist/jeelizFaceFilter.module.js'\n```\n\nor using `require` ([see issue #72](https://github.com/jeeliz/jeelizFaceFilter/issues/72)):\n\n```javascript\nconst faceFilter = require('./lib/jeelizFaceFilter.module.js').JEELIZFACEFILTER;\n\nfaceFilter.init({\n  // you can also provide the canvas directly\n  // using the canvas property instead of canvasId:\n  canvasId: 'jeeFaceFilterCanvas',\n  NNCPath: '../../../neuralNets/', // path to JSON neural network model (NN_DEFAULT.json by default)\n  callbackReady: function(errCode, spec){\n    if (errCode){\n      console.log('AN ERROR HAPPENS. ERROR CODE =', errCode);\n      return;\n    }\n    // [init scene with spec...]\n    console.log('INFO: JEELIZFACEFILTER IS READY');\n  }, //end callbackReady()\n\n  // called at each render iteration (drawing loop)\n  callbackTrack: function(detectState){\n      // Render your scene here\n      // [... do something with detectState]\n  } //end callbackTrack()\n});\n```\n\n## Integration\n\n### With a bundler\n\nIf you use this library with a bundler (typically *Webpack* or *Parcel*), first you should use the [module version](#using-module).\n\nThen, with the standard library, we load the neural network model (specified by `NNCPath` provided as initialization parameter) using AJAX for the following reasons:\n* If the user does not accept to share its camera, or if WebGL is not enabled, we don't have to load the neural network model,\n* We suppose that the library is deployed using a static HTTPS server.\n\nWith a bundler, it is a bit more complicated. It is easier to load the neural network model using a classical `import` or `require` call and to provide it using the `NNC` init parameter:\n\n```javascript\nconst faceFilter = require('./lib/jeelizFaceFilter.module.js').JEELIZFACEFILTER\nconst neuralNetworkModel = require('./neuralNets/NN_DEFAULT.json')\n\nfaceFilter.init({\n  NNC:  neuralNetworkModel, // instead of NNCPath\n  // ... other init parameters\n});\n```\n\nYou can check out the amazing work of [@jackbilestech](jackbilestech), [jackbilestech/jeelizFaceFilter](https://github.com/jackbilestech/jeelizFaceFilter) if you are interested to use this library in a NPM / ES6 / Webpack environment.\n\n\n### With JavaScript frontend frameworks\n\n\n#### With REACT and THREE Fiber\n\nSince October 2020, there is a React/THREE Fiber/Webpack boilerplate in [/reactThreeFiberDemo](/reactThreeFiberDemo) path.\n\n\n#### See also\n\nWe don't officially cover here integration with mainstream JavaScript frontend frameworks (*React*, *Vue*, *Angular*).\nFeel free to submit a *Pull Request* to add a boilerplate or a demo for a specific framework. Here is a bunch of submitted issues dealing with *React* integration:\n\n* React integration: [#74](https://github.com/jeeliz/jeelizFaceFilter/issues/74#issuecomment-455624092) and [#122](https://github.com/jeeliz/jeelizFaceFilter/issues/122#issuecomment-533185928)\n* [is it possible to use this library in react native project](https://github.com/jeeliz/jeelizFaceFilter/issues/21)\n* [Having difficulty using JeelizThreeHelper in ReactApp](https://github.com/jeeliz/jeelizFaceFilter/issues/137)\n\nYou can also take a look at these Github code repositories:\n* [ikebastuz/jeelizTest](https://github.com/ikebastuz/jeelizTest): React demo of a CSS3D FaceFilter. It is based on [Create React App](https://github.com/facebook/create-react-app)\n* [CloffWrangler/facevoice](https://github.com/CloffWrangler/facevoice): Another demo based on [Create React App]\n* [nickydev100/FFMpeg-Angular-Face-Filter](https://github.com/nickydev100/FFMpeg-Angular-Face-Filter): Angular boilerplate\n\n\n### Native\n\nIt is possible to execute a JavaScript application using this library into a *Webview* for a native app integration.\nFor IOS the camera access is disabled inside `WKWebview` component for IOS before IOS14.3. If you want to make your application run on devices running IOS <= 14.2, you have to implement a hack to stream the camera video into the webview using websockets.\n\nHis hack has not been implemented into this repository but in a similar Jeeliz Library, [Jeeliz Weboji](https://github.com/jeeliz/jeelizWeboji). Here are the links:\n\n* [Apache Cordova IOS demo (it should also work on Android)](https://github.com/jeeliz/jeelizWeboji/tree/master/demos/cordova)\n* [Youtube video of the demo](https://youtu.be/yx9uA1g6-rA)\n* [Github submitted issue](https://github.com/jeeliz/jeelizWeboji/issues/27)\n* [Linkedin post detailing pros and cons](https://www.linkedin.com/feed/update/urn:li:activity:6587781973287198720)\n\nBut it is still a dirty hack introducing a bottleneck. It still run pretty well on a high end device (tested on Iphone XR), but it is better to stick on a full web environment.\n\nThere is also this Github issue detailing how to embed the library into a `Webview` component, for *React native*. It is for Android only:\n* [issue 21](https://github.com/jeeliz/jeelizFaceFilter/issues/21#issuecomment-644510559)\n\n\n### Unity\n\nSince September 2023, [Marks](https://github.com/marcusx2) has developed a Unity plugin to create Face filters using Unity and export them for the web. You can buy it on the Unity asset store here:\n[Augmented Reality WebGL - Face Tracking Virtual Try On](https://assetstore.unity.com/packages/tools/integration/augmented-reality-webgl-face-tracking-virtual-try-on-261452)\n\n\n## Hosting\n\nThis library requires the user's camera video feed through `MediaStream API`. So your application should be hosted by a HTTPS server (even with a self-signed certificate). It won't work at all with unsecure HTTP, even locally with some web browsers.\n\n\n### The development server\n\nFor development purpose we provide a simple and minimalist HTTPS server in order to check out the demos or develop your very own filters. To launch it, execute in the bash console:\n\n#### with phython2\n```bash\n  python2 httpsServer.py\n```\nIt requires Python 2.X. Then open in your web browser [https://localhost:4443](https://localhost:4443).\n\n#### with node\n```bash\n  npm install\n  npm run dev\n```\n\ngo to [https://127.0.0.1:8000/demos/threejs/cube/index.html](https://127.0.0.1:8000/demos/threejs/cube/index.html)\n\nwhen you open the browser it will show not secure. Go to advance. Click proceed. \n\n\n\n### Hosting optimization\n\nYou can use our hosted and up to date version of the library, available here:\n```\nhttps://appstatic.jeeliz.com/faceFilter/jeelizFaceFilter.js\n```\nIt uses the neural network `NN_DEFAULT.json` hosted in the same path. The helpers used in these demos (all scripts in [/helpers/](helpers/)) are also hosted on `https://appstatic.jeeliz.com/faceFilter/`.\n\nIt is served through a content delivery network (CDN) using gzip compression.\nIf you host the scripts by yourself, be careful to enable gzip HTTP/HTTPS compression for JSON and JS files. Indeed, the neuron network JSON file, `neuralNets/NN_DEFAULT.json` is quite heavy, but very well compressed with GZIP. You can check the gzip compression of your server [here](https://www.giftofspeed.com/gzip-test/).\n\nThe neuron network file, `neuralNets/NN_DEFAULT.json` is loaded using an ajax `XMLHttpRequest` after calling `JEEFACEFILTER.init()`. This loading is proceeded after the user has accepted to share its camera. So we won't load this quite heavy file if the user refuses to share it or if there is no camera available. The loading can be faster if you systematically preload `neuralNets/NN_DEFAULT.json` using a service worker or a simple raw `XMLHttpRequest` just after the HTML page loading. Then the file will be already in the browser cache when Jeeliz Facefilter will request it.\n\n\n\n## About the tech\n\n### Under the hood\n\nThis library relies on Jeeliz WebGL Deep Learning technology to detect and track the user's face using a neural network. The accuracy is adaptative: the best is the hardware, the more detections are processed per second. All is done client-side.\n\n\n### Compatibility\n\n* If `WebGL2` is available, it uses `WebGL2` and no specific extension is required,\n* If `WebGL2` is not available but `WebGL1`, we require either `OES_TEXTURE_FLOAT` extension or `OES_TEXTURE_HALF_FLOAT` extension,\n* If `WebGL2` is not available, and if `WebGL1` is not available or neither `OES_TEXTURE_FLOAT` or `OES_HALF_TEXTURE_FLOAT` are implemented, the user is not compatible.\n\nIf a compatibility error occurred, please post an issue on this repository. If this is a problem with the camera access, please first retry after closing all applications which could use the camera (Skype, Messenger, other browser tabs and windows, ...). Please include:\n* the browser, the version of the browser, the operating system, the version of the operating system, the device model and the GPU if it is a desktop computer,\n* a screenshot of [webglreport.com - WebGL1](https://webglreport.com/?v=1) (about your `WebGL1` implementation),\n* a screenshot of [webglreport.com - WebGL2](https://webglreport.com/?v=2) (about your `WebGL2` implementation),\n* the log from the web console,\n* the steps to reproduce the bug, and screenshots.\n\n\n\n## Articles and tutorials\n\nYou have written a tutorial using this library? Submit a pull request or send us the link, we would be glad to add it.\n\n\n### In English\n\n<!-- * Creating a Snapchat-like face filter using Jeeliz FaceFilter and THREE.JS:\n  * Part 1: [Creating your first filter](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-1-creating-your-first-filter/)\n  * Part 2: [ User interactions and particles](https://jeeliz.com/blog/creating-a-snapchat-like-filter-with-jeelizs-facefilter-api-part-2-user-interactions-and-particles/) -->\n\n* [Flying around the Globe with Cesium and Your Head](https://cesium.com/blog/2018/03/22/jeeliz-and-cesium/)\n\n* [Build a multifacial face filter](https://webglacademy.jeeliz.com/courses.php?courses=19_25_27_33_34#34): Interactive step by step tutorial hosted on [WebGL Academy](http://www.webglacademy.com) where you learn to build a Statue of Liberty using THREE.js and this library\n\n* [JSFiddle: Face detection and tracking in 25 lines](https://jsfiddle.net/jeeliz/2p34hbeh/)\n\n<!-- * Tutorial: [Matrix theme face filter](https://jeeliz.com/blog/tutorial-javascript-webgl-webcam-facial-filter-on-the-theme-of-matrix/) -->\n\n* Video tutorials by [Chris Godber](http://chrisgodber.co.uk/): [Headtracking Controls with Three JS](https://youtu.be/_Fs4Sbn2LPc)\n\n* Tutorial on Medium by [Patricia Arnedo](https://patriciaarnedo.medium.com/): [Building an AR Drawing App Using React](https://patriciaarnedo.medium.com/building-an-ar-drawing-app-using-react-5f47740a747c)\n\n* [How to develop a Web AR Facefilter with React and ThreeJS / React Three Fiber in 2021](https://webanimation.blog/blog/how-to-develop-web-ar-facefilter-react-threejs) Great tutorial by [Level 30 Wizards](https://level30wizards.com/) Creative Digital Studio to learn how to create a wizard hat face filter. [Live demo here](https://facefilter-experiment.vercel.app/)\n\n<!-- * [Build a Snapchat/Insta-like face filter using jeelizFaceFilter and threejs Project.](https://kandi.openweaver.com/collections/starterkits/face-filters-using-threejs) [![kandi X-Ray](https://kandi.openweaver.com/badges/xray.svg)](https://kandi.openweaver.com/javascript/jeeliz/jeelizFaceFilter) \n[![kandi Featured](https://kandi.openweaver.com/badges/featured.svg)](https://kandi.openweaver.com/collections/starterkits/face-filters-using-threejs) -->\n\n\n### In French\n\n* Tutorial: Matrix theme face filter on developpez.com: [Développer un filtre facial webcam thème Matrix](https://xavierbourry.developpez.com/filtre-facial-webcam/)\n\n\n### In Japanese\n\n* Good overall review and explanations of the library on Qiita.com: [jeelizFaceFilterを試してみた](https://qiita.com/hirogw/items/2464fe62b13cf6816783)\n\n\n<!--\n## Developer support plans\n\nDeveloper support plans are billed each calendar year. There is a 6 months commitment period: you can cancel or change your plan every 6 months from the beginning of your subscription.\n\n| Feature | No support plan | Basic | Advanced | Enterprise |\n| --- | :-: | :-: | :-: | :-: |\n| Access to [Github issues](/../../issues) | X | X | X | X |\n| Major upgrade email alert |  | X | X | X |\n| Email support |  | X | X | X |\n| Guaranteed delay |  | 4 business days | 2 business days | 1 business day |\n| Designated contacts |  | 1 | 1 | 5 |\n| Screenshare/videocall support |  |  | X | X |\n| Screenshare/videocall support delay |  |  | 3 business days | 1 business day |\n| Additional Hourly pricing | $150 | $120 | $100 | $100 |\n| **Price** | **Free** | **$50/mo** | **$120/mo** | **$700/mo** |\n\nPlease contact us at **contact__at__jeeliz.com** and provide:\n\n1. Which plan you need,\n2. What month it starts,\n3. Your company info: name, address, city, state, zipcode,\n4. The name and the title of the signatory of the contract,\n5. The name(s) of the people who will benefit from the support (*designated contacts*).\n\nWe will send back the contract proposal.\n-->\n\n<!-- \n## Jeeliz Partner Network\n\nIf you are a freelance developer, or if you represent a software company or a web agency able to build projects with this library, you can join the Jeeliz Partner Network (JPN) by filling this [Google Form](https://docs.google.com/forms/d/e/1FAIpQLSccwO9Seyi4ZHkXc_Udn0VRWUhKZfXpO6AGMFamnWVVXOA1hA/viewform?usp=sf_link). We will redirect you development services requests involving this library. We will also provide premium support for integrating and using this library.\n\nConversely, if you are looking for a reliable development service provider to build your face filter using this library, please fill the [FaceFilter development request form](https://forms.gle/kktPyojpJbwSSPED7). We will put you in touch with a qualified partner.\n-->\n\n## License\n\n[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). This application is free for both commercial and non-commercial use.\n\n<!-- We appreciate attribution by including the [Jeeliz logo](https://jeeliz.com/wp-content/uploads/2018/01/LOGO_JEELIZ_BLUE.png) and a link to the [Jeeliz website](https://jeeliz.com) in your application or desktop website. Of course we do not expect a large link to Jeeliz over your face filter, but if you can put the link in the credits/about/help/footer section it would be great. -->\n\n\n## References\n\n* [Jeeliz official website](https://jeeliz.com)\n* [Babylon.JS official website with documentation, demos, examples...](https://www.babylonjs.com/)\n* [Three.JS official website with documentation, demos, examples...](https://threejs.org/)\n* [Cesium JS official website](https://cesiumjs.org/)\n* [A-Frame official website](https://aframe.io/)\n* [Webgl Academy: tutorials on WebGL and THREE.JS](http://www.webglacademy.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7146:376DE:17AFD6:5CED8D:6AB921D0"},"text_sha256":"005cd720e7423344cb39143ebee671bc11e228c25237774249c0b9cfa24f222b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Conchylicultor/DeepQA","input_row":{"repository":"Conchylicultor/DeepQA","url":"https://github.com/Conchylicultor/DeepQA","name":"DeepQA","owner":"Conchylicultor","description":"My tensorflow implementation of \"A neural conversational model\", a Deep learning based chatbot","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2908,"issues":181,"created_at":"2016-07-07T17:17:20Z","updated_at":"2026-09-27T05:40:42Z","first_commit_at":"2016-07-07T17:17:21Z","last_commit_at":"2022-12-30T14:42:36Z","activity_months":77.760000000000005,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:44.596Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Conchylicultor/DeepQA","visibility":"public","created_at":"2016-07-07T17:17:20Z","updated_at":"2026-09-27T05:40:42Z","private":false,"fork":false,"archived":false,"stargazers_count":2908,"open_issues_count":93,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2988","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0800:62B94:17AF16F:1BCFD98:6AB92984"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2987","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AE:B1202:178E392:1BAE8DA:6AB92984"},"commit":{"sha":"efcfbf3d4b22e93f6e94a6fc26674aa9557ab60f","url":"https://github.com/Conchylicultor/DeepQA/commit/efcfbf3d4b22e93f6e94a6fc26674aa9557ab60f","date":"2018-04-07T21:11:35Z","author_date":"2018-04-07T21:11:35Z","committer_date":"2018-04-07T21:11:35Z","tree_sha":"5970d561ba70c5444f5aeb8ad17130318692230f","message_first_line":"fix for issue #183 (#184)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2986","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085F:70FF5:17C25A0:1BE305E:6AB92985"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12896,"blob_sha":"b5fa9f3df2ac7da415e84cdb3a781759f3283bd1","priority":0}],"documents":[{"path":"README.md","size":12896,"blob_sha":"b5fa9f3df2ac7da415e84cdb3a781759f3283bd1","priority":0,"status":200,"text":"# Deep Q&A\n[![Join the chat at https://gitter.im/chatbot-pilots/DeepQA](https://badges.gitter.im/chatbot-pilots/DeepQA.svg)](https://gitter.im/chatbot-pilots/DeepQA?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n#### Table of Contents\n\n* [Presentation](#presentation)\n* [Installation](#installation)\n* [Running](#running)\n    * [Chatbot](#chatbot)\n    * [Web interface](#web-interface)\n* [Results](#results)\n* [Pretrained model](#pretrained-model)\n* [Improvements](#improvements)\n* [Upgrade](#upgrade)\n\n## Presentation\n\nThis work tries to reproduce the results of [A Neural Conversational Model](http://arxiv.org/abs/1506.05869) (aka the Google chatbot). It uses a RNN (seq2seq model) for sentence predictions. It is done using python and TensorFlow.\n\nThe loading corpus part of the program is inspired by the Torch [neuralconvo](https://github.com/macournoyer/neuralconvo) from [macournoyer](https://github.com/macournoyer).\n\nFor now, DeepQA support the following dialog corpus:\n * [Cornell Movie Dialogs](http://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html) corpus (default). Already included when cloning the repository.\n * [OpenSubtitles](http://opus.lingfil.uu.se/OpenSubtitles.php) (thanks to [Eschnou](https://github.com/eschnou)). Much bigger corpus (but also noisier). To use it, follow [those instructions](data/opensubs/) and use the flag `--corpus opensubs`.\n * Supreme Court Conversation Data (thanks to [julien-c](https://github.com/julien-c)). Available using `--corpus scotus`. See the [instructions](data/scotus/) for installation.\n * [Ubuntu Dialogue Corpus](https://arxiv.org/abs/1506.08909) (thanks to [julien-c](https://github.com/julien-c)). Available using `--corpus ubuntu`. See the [instructions](data/ubuntu/) for installation.\n * Your own data (thanks to [julien-c](https://github.com/julien-c)) by using a simple custom conversation format (See [here](data/lightweight) for more info).\n\nTo speedup the training, it's also possible to use pre-trained word embeddings (thanks to [Eschnou](https://github.com/eschnou)). More info [here](data/embeddings).\n\n## Installation\n\nThe program requires the following dependencies (easy to install using pip: `pip3 install -r requirements.txt`):\n * python 3.5\n * tensorflow (tested with v1.0)\n * numpy\n * CUDA (for using GPU)\n * nltk (natural language toolkit for tokenized the sentences)\n * tqdm (for the nice progression bars)\n\nYou might also need to download additional data to make nltk work.\n\n```\npython3 -m nltk.downloader punkt\n```\n\nThe Cornell dataset is already included. For the other datasets, look at the readme files into their respective folders (inside `data/`).\n\nThe web interface requires some additional packages:\n * django (tested with 1.10)\n * channels\n * Redis (see [here](http://redis.io/topics/quickstart))\n * asgi_redis (at least 1.0)\n\nA Docker installation is also available. More detailed instructions [here](docker/README.md).\n\n## Running\n\n### Chatbot\n\nTo train the model, simply run `main.py`. Once trained, you can test the results with `main.py --test` (results generated in 'save/model/samples_predictions.txt') or `main.py --test interactive` (more fun).\n\nHere are some flags which could be useful. For more help and options, use `python main.py -h`:\n * `--modelTag <name>`: allow to give a name to the current model to differentiate between them when testing/training.\n * `--keepAll`: use this flag when training if when testing, you want to see the predictions at different steps (it can be interesting to see the program changes its name and age as the training progress). Warning: It can quickly take a lot of storage space if you don't increase the `--saveEvery` option.\n * `--filterVocab 20` or `--vocabularySize 30000`: Limit the vocabulary size to and optimize the performances and memory usage. Replace the words used less than 20 times by the `<unknown>` token and set a maximum vocabulary size.\n * `--verbose`: when testing, will print the sentences as they are computed.\n * `--playDataset`: show some dialogue samples from the dataset (can be use conjointly with `--createDataset` if this is the only action you want to perform).\n\nTo visualize the computational graph and the cost with [TensorBoard](https://www.tensorflow.org/how_tos/summaries_and_tensorboard/), just run `tensorboard --logdir save/`.\n\nBy default, the network architecture is a standard encoder/decoder with two LSTM layers (hidden size of 256) and an embedding size for the vocabulary of 32. The network is trained using ADAM. The maximum sentence length is set to 10 words, but can be increased.\n\n### Web interface\n\nOnce trained, it's possible to chat with it using a more user friendly interface. The server will look at the model copied to `save/model-server/model.ckpt`. The first time you want to use it, you'll need to configure it with:\n\n```bash\nexport CHATBOT_SECRET_KEY=\"my-secret-key\"\ncd chatbot_website/\npython manage.py makemigrations\npython manage.py migrate\n```\n\nThen, to launch the server locally, use the following commands:\n\n```bash\ncd chatbot_website/\nredis-server &  # Launch Redis in background\npython manage.py runserver\n```\n\nAfter launch, the interface should be available on [http://localhost:8000/](http://localhost:8000/). If you want to deploy the program on a server, use `python manage.py runserver 0.0.0.0` instead. More info [here](https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/).\n\n[![Chatbot web interface](chatbot_miniature.png)](http://e-pot.xyz/cv/chatbot.png)\n\n## Results\n\nSurprisingly, it's possible to get some results after only 1 or 2 hours of training (on a GeForce GT 740M), by drastically reducing the input sequence to 5 words and output to 3 (plus the `go` and `eos` tokens) and by using a small embedding size (something like 25). Since then I modified the code and now the output length has to match the input one but you can still reproduce the original results, using [this version](https://github.com/Conchylicultor/DeepQA/tree/92863e2929580818f866f16969909fe2093d41d1).\nOf course, the network won't be really chatty:\n\n    Q: Hi\n    A: Hi.\n\n    Q: What is your name ?\n    A: Laura.\n\n    Q: What does that mean ?\n    A: I dunno.\n\n    Q: How old are you ?\n    A: thirty-five.\n\n    Q: Will Google hire me ?\n    A: No.\n\n    Q: Tell me the alphabet\n    A: Fuck you.\n\n    Q: That's not nice\n    A: Yeah.\n\nHere is some case where it fails:\n\n    Q: Who is Laura ?\n    A: My brother.\n\n    Q: Say 'goodbye'\n    A: Alright.\n\n    Q: What is cooking ?\n    A: A channel.\n\n    Q: Can you say no ?\n    A: No.\n\n    Q: Two plus two\n    A: Manny...\n\nWith longer sentences, the network is much slower to train. After 250000 iterations with maxLength=10, the network still mainly gives evasive answers (by answering most of the open ended questions by 'I don't know') but it seems to have integrated some basic semantic:\n\n    Q: When are the fireworks ?\n    A: Tomorrow.\n\n    Q: What color ?\n    A: Gray.\n\n    Q: Which apple ?\n    A: That's the first one.\n\n    Q: What time is it ?\n    A: Eleven o'clock.\n\n    Q: Who is Skywalker ?\n    A: She's a freelance bio-exorcist.\n\n    Q: Who is John ?\n    A: The old man.\n\n    Q: Who is Jenny ?\n    A: The man who killed herself.\n\n    Q: When were you born ?\n    A: Soon.\n\nAs shown on the last questions, the network still does some confusion between the genders and the present/future. I also tried some deeper philosophical questions with more or less success.\n\n    Q: What is the purpose of being intelligent ?\n    A: The man are obsolete.\n\n    Q: What is immoral ?\n    A: The truth.\n\n    Q: What is morality ?\n    A: The worst.\n\n    Q: What is the purpose of existence ?\n    A: It 's private.\n\n    Q: What happens if machines can think ?\n    A: I think I'll just lie with you.\n\nThe model I trained is quite limited by the embedding size I put and by its size, and by the training corpus size. Its 'thought vector' is also probably too small to answer the kind of following:\n\n    Q: My name is David. What is my name ?\n    A: Debbie.\n\n    Q: My name is John. What is my name ?\n    A: Carl Smith.\n\n    Q: How many legs does a cat have ?\n    A: Four.\n\n    Q: How many legs does a spider have ?\n    A: Four.\n\n    Q: Do you prefer football or soccer ?\n    A: Whiskey.\n\nIt also seems to overfit as sometimes it will just pop out sentences from its training set unrelated to the question. Adding some dropout should reduce the issue.\n\n    Q: I play tennis. What do I play ?\n    A: I'm going to get laid.\n\n    Q: What color is the sky ?\n    A: One of the deputies is everywhere.\n\n## Pretrained model\n\nYou can find a pre-trained model [here](https://drive.google.com/file/d/0Bw-phsNSkq23OXRFTkNqN0JGUU0/view?usp=sharing), trained of the default corpus. To use it:\n 1. Extract the zip file inside `DeepQA/save/`\n 2. Copy the preprocessed dataset from `save/model-pretrainedv2/dataset-cornell-old-lenght10-filter0-vocabSize0.pkl` to `data/samples/`.\n 3. Run `./main.py --modelTag pretrainedv2 --test interactive`.\n\nThanks to Nicholas C., [here](https://drive.google.com/drive/folders/0Bw-phsNSkq23c29ZQ2N6X3lyc1U?usp=sharing) ([original](https://mcastedu-my.sharepoint.com/personal/nicholas_cutajar_a100636_mcast_edu_mt/_layouts/15/guestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY)) are some additional pre-trained models (compatible with TF 1.2) for diverse datasets. The folder also contains the pre-processed dataset for Cornell, OpenSubtitles, Ubuntu and Scotus (to move inside `data/samples/`). Those are required is you don't want to process the datasets yourself.\n\nIf you have a high-end GPU, don't hesitate to play with the hyper-parameters/corpus to train a better model. From my experiments, it seems that the learning rate and dropout rate have the most impact on the results. Also if you want to share your models, don't hesitate to contact me and I'll add it here.\n\n## Improvements\n\nIn addition to trying larger/deeper model, there are a lot of small improvements which could be tested. Don't hesitate to send a pull request if you implement one of those. Here are some ideas:\n\n* For now, the predictions are deterministic (the network just take the most likely output) so when answering a question, the network will always gives the same answer. By adding a sampling mechanism, the network could give more diverse (and maybe more interesting) answers. The easiest way to do that is to sample the next predicted word from the SoftMax probability distribution. By combining that with the `loop_function` argument of `tf.nn.seq2seq.rnn_decoder`, it shouldn't be too difficult to add. After that, it should be possible to play with the SoftMax temperature to get more conservative or exotic predictions.\n* Adding attention could potentially improve the predictions, especially for longer sentences. It should be straightforward by replacing `embedding_rnn_seq2seq` by `embedding_attention_seq2seq` on `model.py`.\n* Having more data usually don't hurt. Training on a bigger corpus should be beneficial. [Reddit comments dataset](https://www.reddit.com/r/datasets/comments/59039y/updated_reddit_comment_dataset_up_to_201608/) seems the biggest for now (and is too big for this program to support it). Another trick to artificially increase the dataset size when creating the corpus could be to split the sentences of each training sample (ex: from the sample `Q:Sentence 1. Sentence 2. => A:Sentence X. Sentence Y.` we could generate 3 new samples: `Q:Sentence 1. Sentence 2. => A:Sentence X.`, `Q:Sentence 2. => A:Sentence X. Sentence Y.` and `Q:Sentence 2. => A:Sentence X.`. Warning: other combinations like `Q:Sentence 1. => A:Sentence X.` won't work because it would break the transition `2 => X` which links the question to the answer)\n* The testing curve should really be monitored as done in my other [music generation](https://github.com/Conchylicultor/MusicGenerator) project. This would greatly help to see the impact of dropout on overfitting. For now it's just done empirically by manually checking the testing prediction at different training steps.\n* For now, the questions are independent from each other. To link questions together, a straightforward way would be to feed all previous questions and answer to the encoder before giving the answer. Some caching could be done on the final encoder stated to avoid recomputing it each time. To improve the accuracy, the network should be retrain on entire dialogues instead of just individual QA. Also when feeding the previous dialogue to the encoder, new tokens `<Q>` and `<A>` could be added so the encoder knows when the interlocutor is changing. I'm not sure though that the simple seq2seq model would be sufficient to capture long term dependencies between sentences. Adding a bucket system to group similar input lengths together could greatly improve training speed.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"846E:29FD16:17D366:5D0FFF:6AB921D4"},"text_sha256":"e8dce329d392bd89c6126536ad57d4f394b2018aac5ed04604ba721acafae175"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2985","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B1:73962:17C3E03:1BE4519:6AB92986"},"commit":{"sha":"886ec77ac49ff70be1b6d4de30fffe6a96480a4f","url":"https://github.com/Conchylicultor/DeepQA/commit/886ec77ac49ff70be1b6d4de30fffe6a96480a4f","date":"2022-12-30T14:42:36Z","author_date":"2022-12-30T14:42:36Z","committer_date":"2022-12-30T14:42:36Z","tree_sha":"3540b090312fdec1233605457924f9c174aa30cd","message_first_line":"Remove deprecated link"},"tree_request_status":200,"tree_rate":{"github_remaining":"2984","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:185F381:1C804FA:6AB92986"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12985,"blob_sha":"aac7192553af0d5f0912e282c1ac9b3589a53e0a","priority":0}],"documents":[{"path":"README.md","size":12985,"blob_sha":"aac7192553af0d5f0912e282c1ac9b3589a53e0a","priority":0,"status":200,"text":"# Deep Q&A\n[![Join the chat at https://gitter.im/chatbot-pilots/DeepQA](https://badges.gitter.im/chatbot-pilots/DeepQA.svg)](https://gitter.im/chatbot-pilots/DeepQA?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n#### Table of Contents\n\n* [Presentation](#presentation)\n* [Installation](#installation)\n* [Running](#running)\n    * [Chatbot](#chatbot)\n    * [Web interface](#web-interface)\n* [Results](#results)\n* [Pretrained model](#pretrained-model)\n* [Improvements](#improvements)\n* [Upgrade](#upgrade)\n\n## Presentation\n\nThis work tries to reproduce the results of [A Neural Conversational Model](http://arxiv.org/abs/1506.05869) (aka the Google chatbot). It uses a RNN (seq2seq model) for sentence predictions. It is done using python and TensorFlow.\n\nThe loading corpus part of the program is inspired by the Torch [neuralconvo](https://github.com/macournoyer/neuralconvo) from [macournoyer](https://github.com/macournoyer).\n\nFor now, DeepQA support the following dialog corpus:\n * [Cornell Movie Dialogs](http://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html) corpus (default). Already included when cloning the repository.\n * [OpenSubtitles](http://opus.lingfil.uu.se/OpenSubtitles.php) (thanks to [Eschnou](https://github.com/eschnou)). Much bigger corpus (but also noisier). To use it, follow [those instructions](data/opensubs/) and use the flag `--corpus opensubs`.\n * Supreme Court Conversation Data (thanks to [julien-c](https://github.com/julien-c)). Available using `--corpus scotus`. See the [instructions](data/scotus/) for installation.\n * [Ubuntu Dialogue Corpus](https://arxiv.org/abs/1506.08909) (thanks to [julien-c](https://github.com/julien-c)). Available using `--corpus ubuntu`. See the [instructions](data/ubuntu/) for installation.\n * Your own data (thanks to [julien-c](https://github.com/julien-c)) by using a simple custom conversation format (See [here](data/lightweight) for more info).\n\nTo speedup the training, it's also possible to use pre-trained word embeddings (thanks to [Eschnou](https://github.com/eschnou)). More info [here](data/embeddings).\n\n## Installation\n\nThe program requires the following dependencies (easy to install using pip: `pip3 install -r requirements.txt`):\n * python 3.5\n * tensorflow (tested with v1.0)\n * numpy\n * CUDA (for using GPU)\n * nltk (natural language toolkit for tokenized the sentences)\n * tqdm (for the nice progression bars)\n\nYou might also need to download additional data to make nltk work.\n\n```\npython3 -m nltk.downloader punkt\n```\n\nThe Cornell dataset is already included. For the other datasets, look at the readme files into their respective folders (inside `data/`).\n\nThe web interface requires some additional packages:\n * django (tested with 1.10)\n * channels\n * Redis (see [here](http://redis.io/topics/quickstart))\n * asgi_redis (at least 1.0)\n\nA Docker installation is also available. More detailed instructions [here](docker/README.md).\n\n## Running\n\n### Chatbot\n\nTo train the model, simply run `main.py`. Once trained, you can test the results with `main.py --test` (results generated in 'save/model/samples_predictions.txt') or `main.py --test interactive` (more fun).\n\nHere are some flags which could be useful. For more help and options, use `python main.py -h`:\n * `--modelTag <name>`: allow to give a name to the current model to differentiate between them when testing/training.\n * `--keepAll`: use this flag when training if when testing, you want to see the predictions at different steps (it can be interesting to see the program changes its name and age as the training progress). Warning: It can quickly take a lot of storage space if you don't increase the `--saveEvery` option.\n * `--filterVocab 20` or `--vocabularySize 30000`: Limit the vocabulary size to and optimize the performances and memory usage. Replace the words used less than 20 times by the `<unknown>` token and set a maximum vocabulary size.\n * `--verbose`: when testing, will print the sentences as they are computed.\n * `--playDataset`: show some dialogue samples from the dataset (can be use conjointly with `--createDataset` if this is the only action you want to perform).\n\nTo visualize the computational graph and the cost with [TensorBoard](https://www.tensorflow.org/how_tos/summaries_and_tensorboard/), just run `tensorboard --logdir save/`.\n\nBy default, the network architecture is a standard encoder/decoder with two LSTM layers (hidden size of 256) and an embedding size for the vocabulary of 32. The network is trained using ADAM. The maximum sentence length is set to 10 words, but can be increased.\n\n### Web interface\n\nOnce trained, it's possible to chat with it using a more user friendly interface. The server will look at the model copied to `save/model-server/model.ckpt`. The first time you want to use it, you'll need to configure it with:\n\n```bash\nexport CHATBOT_SECRET_KEY=\"my-secret-key\"\ncd chatbot_website/\npython manage.py makemigrations\npython manage.py migrate\n```\n\nThen, to launch the server locally, use the following commands:\n\n```bash\ncd chatbot_website/\nredis-server &  # Launch Redis in background\npython manage.py runserver\n```\n\nAfter launch, the interface should be available on [http://localhost:8000/](http://localhost:8000/). If you want to deploy the program on a server, use `python manage.py runserver 0.0.0.0` instead. More info [here](https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/).\n\n[![Chatbot web interface](chatbot_miniature.png)](http://e-pot.xyz/cv/chatbot.png)\n\n## Results\n\nSurprisingly, it's possible to get some results after only 1 or 2 hours of training (on a GeForce GT 740M), by drastically reducing the input sequence to 5 words and output to 3 (plus the `go` and `eos` tokens) and by using a small embedding size (something like 25). Since then I modified the code and now the output length has to match the input one but you can still reproduce the original results, using [this version](https://github.com/Conchylicultor/DeepQA/tree/92863e2929580818f866f16969909fe2093d41d1).\nOf course, the network won't be really chatty:\n\n    Q: Hi\n    A: Hi.\n\n    Q: What is your name ?\n    A: Laura.\n\n    Q: What does that mean ?\n    A: I dunno.\n\n    Q: How old are you ?\n    A: thirty-five.\n\n    Q: Will Google hire me ?\n    A: No.\n\n    Q: Tell me the alphabet\n    A: Fuck you.\n\n    Q: That's not nice\n    A: Yeah.\n\nHere is some case where it fails:\n\n    Q: Who is Laura ?\n    A: My brother.\n\n    Q: Say 'goodbye'\n    A: Alright.\n\n    Q: What is cooking ?\n    A: A channel.\n\n    Q: Can you say no ?\n    A: No.\n\n    Q: Two plus two\n    A: Manny...\n\nWith longer sentences, the network is much slower to train. After 250000 iterations with maxLength=10, the network still mainly gives evasive answers (by answering most of the open ended questions by 'I don't know') but it seems to have integrated some basic semantic:\n\n    Q: When are the fireworks ?\n    A: Tomorrow.\n\n    Q: What color ?\n    A: Gray.\n\n    Q: Which apple ?\n    A: That's the first one.\n\n    Q: What time is it ?\n    A: Eleven o'clock.\n\n    Q: Who is Skywalker ?\n    A: She's a freelance bio-exorcist.\n\n    Q: Who is John ?\n    A: The old man.\n\n    Q: Who is Jenny ?\n    A: The man who killed herself.\n\n    Q: When were you born ?\n    A: Soon.\n\nAs shown on the last questions, the network still does some confusion between the genders and the present/future. I also tried some deeper philosophical questions with more or less success.\n\n    Q: What is the purpose of being intelligent ?\n    A: The man are obsolete.\n\n    Q: What is immoral ?\n    A: The truth.\n\n    Q: What is morality ?\n    A: The worst.\n\n    Q: What is the purpose of existence ?\n    A: It 's private.\n\n    Q: What happens if machines can think ?\n    A: I think I'll just lie with you.\n\nThe model I trained is quite limited by the embedding size I put and by its size, and by the training corpus size. Its 'thought vector' is also probably too small to answer the kind of following:\n\n    Q: My name is David. What is my name ?\n    A: Debbie.\n\n    Q: My name is John. What is my name ?\n    A: Carl Smith.\n\n    Q: How many legs does a cat have ?\n    A: Four.\n\n    Q: How many legs does a spider have ?\n    A: Four.\n\n    Q: Do you prefer football or soccer ?\n    A: Whiskey.\n\nIt also seems to overfit as sometimes it will just pop out sentences from its training set unrelated to the question. Adding some dropout should reduce the issue.\n\n    Q: I play tennis. What do I play ?\n    A: I'm going to get laid.\n\n    Q: What color is the sky ?\n    A: One of the deputies is everywhere.\n\n## Pretrained model (not working)\n\nNote: Links do not work anymore.\n\n~~You can find a pre-trained model [here](https://drive.google.com/file/d/0Bw-phsNSkq23OXRFTkNqN0JGUU0/view?usp=sharing)~~, trained of the default corpus. To use it:\n 1. Extract the zip file inside `DeepQA/save/`\n 2. Copy the preprocessed dataset from `save/model-pretrainedv2/dataset-cornell-old-lenght10-filter0-vocabSize0.pkl` to `data/samples/`.\n 3. Run `./main.py --modelTag pretrainedv2 --test interactive`.\n\nThanks to Nicholas C., [here](https://drive.google.com/drive/folders/0Bw-phsNSkq23c29ZQ2N6X3lyc1U?resourcekey=0-u1yOQjC701db6O9FfCW9EA&usp=sharing) ([original](https://mcastedu-my.sharepoint.com/personal/nicholas_cutajar_a100636_mcast_edu_mt/_layouts/15/guestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY)) are some additional pre-trained models (compatible with TF 1.2) for diverse datasets. The folder also contains the pre-processed dataset for Cornell, OpenSubtitles, Ubuntu and Scotus (to move inside `data/samples/`). Those are required is you don't want to process the datasets yourself.\n\nIf you have a high-end GPU, don't hesitate to play with the hyper-parameters/corpus to train a better model. From my experiments, it seems that the learning rate and dropout rate have the most impact on the results. Also if you want to share your models, don't hesitate to contact me and I'll add it here.\n\n## Improvements\n\nIn addition to trying larger/deeper model, there are a lot of small improvements which could be tested. Don't hesitate to send a pull request if you implement one of those. Here are some ideas:\n\n* For now, the predictions are deterministic (the network just take the most likely output) so when answering a question, the network will always gives the same answer. By adding a sampling mechanism, the network could give more diverse (and maybe more interesting) answers. The easiest way to do that is to sample the next predicted word from the SoftMax probability distribution. By combining that with the `loop_function` argument of `tf.nn.seq2seq.rnn_decoder`, it shouldn't be too difficult to add. After that, it should be possible to play with the SoftMax temperature to get more conservative or exotic predictions.\n* Adding attention could potentially improve the predictions, especially for longer sentences. It should be straightforward by replacing `embedding_rnn_seq2seq` by `embedding_attention_seq2seq` on `model.py`.\n* Having more data usually don't hurt. Training on a bigger corpus should be beneficial. [Reddit comments dataset](https://www.reddit.com/r/datasets/comments/59039y/updated_reddit_comment_dataset_up_to_201608/) seems the biggest for now (and is too big for this program to support it). Another trick to artificially increase the dataset size when creating the corpus could be to split the sentences of each training sample (ex: from the sample `Q:Sentence 1. Sentence 2. => A:Sentence X. Sentence Y.` we could generate 3 new samples: `Q:Sentence 1. Sentence 2. => A:Sentence X.`, `Q:Sentence 2. => A:Sentence X. Sentence Y.` and `Q:Sentence 2. => A:Sentence X.`. Warning: other combinations like `Q:Sentence 1. => A:Sentence X.` won't work because it would break the transition `2 => X` which links the question to the answer)\n* The testing curve should really be monitored as done in my other [music generation](https://github.com/Conchylicultor/MusicGenerator) project. This would greatly help to see the impact of dropout on overfitting. For now it's just done empirically by manually checking the testing prediction at different training steps.\n* For now, the questions are independent from each other. To link questions together, a straightforward way would be to feed all previous questions and answer to the encoder before giving the answer. Some caching could be done on the final encoder stated to avoid recomputing it each time. To improve the accuracy, the network should be retrain on entire dialogues instead of just individual QA. Also when feeding the previous dialogue to the encoder, new tokens `<Q>` and `<A>` could be added so the encoder knows when the interlocutor is changing. I'm not sure though that the simple seq2seq model would be sufficient to capture long term dependencies between sentences. Adding a bucket system to group similar input lengths together could greatly improve training speed.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"665E:241B62:173A97:5C77D5:6AB921D6"},"text_sha256":"405985441794f7bb2bfc8593ea6b3ee5a3cd6ec37a016bb7a545ef62a67cd952"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"voxelmorph/voxelmorph","input_row":{"repository":"voxelmorph/voxelmorph","url":"https://github.com/voxelmorph/voxelmorph","name":"voxelmorph","owner":"voxelmorph","description":"Unsupervised Learning for Image Registration","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2754,"issues":473,"created_at":"2018-05-14T16:19:41Z","updated_at":"2026-09-22T03:07:22Z","first_commit_at":"2018-05-14T16:29:28Z","last_commit_at":"2026-09-11T20:00:03Z","activity_months":99.939999999999998,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:47.575Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"voxelmorph/voxelmorph","visibility":"public","created_at":"2018-05-14T16:19:41Z","updated_at":"2026-09-22T03:07:22Z","private":false,"fork":false,"archived":false,"stargazers_count":2754,"open_issues_count":156,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2983","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:17C62B0:1BE7449:6AB92987"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2982","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E5:2BC4E5:1811D3C:1C328CD:6AB92987"},"commit":{"sha":"1e557ff425a18fd378fa9b7ec77a1ed44abd8ce3","url":"https://github.com/voxelmorph/voxelmorph/commit/1e557ff425a18fd378fa9b7ec77a1ed44abd8ce3","date":"2018-05-15T00:30:50Z","author_date":"2018-05-15T00:30:50Z","committer_date":"2018-05-15T00:30:50Z","tree_sha":"873bf5dea7a0797ff623b53c45b8c7298d8bd328","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2981","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E6:731F6:17E2060:1C030BA:6AB92988"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1215,"blob_sha":"a5a4ba4f279fb83091870ff9dc24b59ed0394820","priority":0}],"documents":[{"path":"README.md","size":1215,"blob_sha":"a5a4ba4f279fb83091870ff9dc24b59ed0394820","priority":0,"status":200,"text":"# voxelmorph\n\n\n## Notes\n- Code was initially written in python 2.7, and now transfered to 3.5. \n\n- We are currently cleaning up our code for general use. There are several hard-coded elements related\nto data preprocessing and format. You will likely need to rewrite some of the data loading code in \n'datagenerator.py' for your own datasets.\n\n- We provide the atlas used in our papers at data/atlas_norm.npz.\n\n## Papers\n**Unsupervised Learning for Fast Probabilistic Diffeomorphic Registration**  \nAdrian V. Dalca, Guha Balakrishnan, John Guttag, Mert R. Sabuncu  \nMICCAI 2018. [eprint arXiv:1805.04605](https://arxiv.org/abs/1805.04605)\n\n\n**An Unsupervised Learning Model for Deformable Medical Image Registration**  \nGuha Balakrishnan, Amy Zhao, Mert R. Sabuncu, John Guttag, Adrian V. Dalca   \nCVPR 2018. [eprint arXiv:1802.02604](https://arxiv.org/abs/1802.02604)\n\n## Instructions\n\n### Training:\n\n1. Change base_data_dir in train.py to the location of your image files.\n2. Run train.py [model_name] [gpu-id] \n\n### Testing (Dice scores):\nPut test filenames in data/test_examples.txt, and anatomical labels in data/test_labels.mat.\n1. Run test.py [model_name] [gpu-id] [iter-num]\n\n### Contact:\nvoxelmorph@mit.edu\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C016:17E138:1748E8:5C859F:6AB921DA"},"text_sha256":"a845f66d3ea4c67b261295986978bdfc75d0c59b01d59a94e75311b59b1c4b17"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2980","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:17DF574:1BFF0D2:6AB92988"},"commit":{"sha":"d0d883a424a2f2791db437da7db83886348b8c44","url":"https://github.com/voxelmorph/voxelmorph/commit/d0d883a424a2f2791db437da7db83886348b8c44","date":"2026-06-15T20:32:44Z","author_date":"2026-06-15T20:32:44Z","committer_date":"2026-06-15T20:32:44Z","tree_sha":"b6d768a8b943054930bdd133ed1c13445e113b07","message_first_line":"[fix] `angles_to_rotation_matrix()` preserves gradients with stacking"},"tree_request_status":200,"tree_rate":{"github_remaining":"2979","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087A:731F6:17E213B:1C031AD:6AB92989"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15719,"blob_sha":"bc627f1c2a56ec6baf71dc4b02d01d38f11512fc","priority":0}],"documents":[{"path":"README.md","size":15719,"blob_sha":"bc627f1c2a56ec6baf71dc4b02d01d38f11512fc","priority":0,"status":200,"text":"# VoxelMorph: learning-based image registration\n\n**VoxelMorph** is a general purpose library for learning-based tools for alignment/registration, and more generally modelling with deformations.\n\n> ⚠️ **Warning**: VoxelMorph pytorch is under active development. Interfaces may change.\n\n> **For users who want to use the stable TensorFlow version**, use either `pip install voxelmorph`, or pull/clone from the [`dev-tensorflow`](https://github.com/voxelmorph/voxelmorph/tree/dev-tensorflow) branch.\n\n## Install\n\nTo use the VoxelMorph library, either clone this repository and install the requirements listed in `setup.py` or install directly with pip.\n\n```\npip install voxelmorph\n```\n\n### Pre-commit hooks\n\nThis repo uses `pre-commit` to run `pycodestyle` before commits.\n\nInstall once after cloning:\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nYou can also run the check manually:\n\n```bash\npre-commit run pycodestyle --all-files\n```\n\n# Tutorial\n\nWe have several VoxelMorph tutorials:\n  - the main [VoxelMorph tutorial](http://tutorial.voxelmorph.net/) explains VoxelMorph and learning-based registration\n  - a [deformable SynthMorph demo](https://colab.research.google.com/drive/1zaDnAJGUokS0knqWttuTgrRJMb6zxukI?usp=sharing) showing how to train a registration model without data\n  - an [affine SynthMorph demo](https://colab.research.google.com/drive/1QClknfaZIYklBjmBy-nUn83h85bpo8r0?usp=sharing) on learning anatomy-aware and acquisition-agnostic affine registration\n  - a [CT-to-MRI SynthMorph demo](https://colab.research.google.com/drive/1aWbFiyQw5mtJbTglpniAOMimGo_l8BYP?usp=drive_link) clipping the Hounsfield scale for multi-modal registration\n  - a [SynthMorph shapes demo](https://colab.research.google.com/drive/14s2h0j_Aoncp587vmpjsQBe6PQTxyVP5) that walks through the steps of running a trained 3D shapes model\n  - a [tutorial on training VoxelMorph](https://colab.research.google.com/drive/1ZefmWXBupRNsnIbBbGquhVDsk-7R7L1S?usp=sharing) on [OASIS data](https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md), which we processed and released for free for HyperMorph\n  - an [additional small tutorial](https://colab.research.google.com/drive/1V0CutSIfmtgDJg1XIkEnGteJuw0u7qT-#scrollTo=h1KXYz-Nauwn) on warping annotations together with images\n  - another tutorial on [template (atlas) construction](https://colab.research.google.com/drive/1SkQbrWTQHpQFrG4J2WoBgGZC9yAzUas2?usp=sharing) with VoxelMorph\n  - visualize [warp](https://colab.research.google.com/drive/1F8f1imh5WfyBv-crllfeJBFY16-KHl9c?usp=sharing) as warped grid\n  - [inverting warps](https://colab.research.google.com/drive/1juAJRYhPPDNbO9yRtlc0VGhbIFSuhpJ2?usp=sharing) that are not diffeomorphisms\n\n\n# Instructions\n\nTo use the VoxelMorph library, clone this repository and install the requirements listed in `setup.py`.\n\n> **Note**: The `pip install voxelmorph` command is not yet supported. Please install directly from GitHub:\n\n```\npip install git+https://github.com/voxelmorph/voxelmorph.git\n```\n\n## Pre-trained models\n\nSee list of pre-trained models available [here](data/readme.md#models).\n\n## Training\n\nIf you would like to train your own model, you will likely need to customize some of the data-loading code in `voxelmorph/generators.py` for your own datasets and data formats. However, it is possible to run many of the example scripts out-of-the-box, assuming that you provide a list of filenames in the training dataset. Training data can be in the NIfTI, MGZ, or npz (numpy) format, and it's assumed that each npz file in your data list has a `vol` parameter, which points to the image data to be registered, and an optional `seg` variable, which points to a corresponding discrete segmentation (for semi-supervised learning). It's also assumed that the shape of all training image data is consistent, but this, of course, can be handled in a customized generator if desired.\n\nFor a given image list file `/images/list.txt` and output directory `/models/output`, the following script will train an image-to-image registration network (described in MICCAI 2018 by default) with an unsupervised loss. Model weights will be saved to a path specified by the `--model-dir` flag.\n\n```\n./scripts/tf/train.py --img-list /images/list.txt --model-dir /models/output --gpu 0\n```\n\nThe `--img-prefix` and `--img-suffix` flags can be used to provide a consistent prefix or suffix to each path specified in the image list. Image-to-atlas registration can be enabled by providing an atlas file, e.g. `--atlas atlas.npz`. If you'd like to train using the original dense CVPR network (no diffeomorphism), use the `--int-steps 0` flag to specify no flow integration steps. Use the `--help` flag to inspect all of the command line options that can be used to fine-tune network architecture and training.\n\n\n## Registration\n\nIf you simply want to register two images, you can use the `register.py` script with the desired model file. For example, if we have a model `model.h5` trained to register a subject (moving) to an atlas (fixed), we could run:\n\n```\n./scripts/tf/register.py --moving moving.nii.gz --fixed atlas.nii.gz --moved warped.nii.gz --model model.h5 --gpu 0\n```\n\nThis will save the moved image to `warped.nii.gz`. To also save the predicted deformation field, use the `--save-warp` flag. Both npz or nifty files can be used as input/output in this script.\n\n\n## Testing (measuring Dice scores)\n\nTo test the quality of a model by computing dice overlap between an atlas segmentation and warped test scan segmentations, run:\n\n```\n./scripts/tf/test.py --model model.h5 --atlas atlas.npz --scans scan01.npz scan02.npz scan03.npz --labels labels.npz\n```\n\nJust like for the training data, the atlas and test npz files include `vol` and `seg` parameters and the `labels.npz` file contains a list of corresponding anatomical labels to include in the computed dice score.\n\n\n## Parameter choices\n\n\n### CVPR version\n\nFor the CC loss function, we found a reg parameter of 1 to work best. For the MSE loss function, we found 0.01 to work best.\n\n\n### MICCAI version\n\nFor our data, we found `image_sigma=0.01` and `prior_lambda=25` to work best.\n\nIn the original MICCAI code, the parameters were applied after the scaling of the velocity field. With the newest code, this has been \"fixed\", with different default parameters reflecting the change. We recommend running the updated code. However, if you'd like to run the very original MICCAI2018 mode, please use `xy` indexing and `use_miccai_int` network option, with MICCAI2018 parameters.\n\n\n## Spatial transforms and integration\n\n- The spatial transform code, found at `voxelmorph.layers.SpatialTransformer`, accepts N-dimensional affine and dense transforms, including linear and nearest neighbor interpolation options. Note that original development of VoxelMorph used `xy` indexing, whereas we are now emphasizing `ij` indexing.\n\n- For the MICCAI2018 version, we integrate the velocity field using `voxelmorph.layers.VecInt`. By default we integrate using scaling and squaring, which we found efficient.\n\n\n# VoxelMorph papers\n\nIf you use VoxelMorph or some part of the code, please cite (see [bibtex](citations.bib)):\n\n  * HyperMorph, avoiding the need to tune registration hyperparameters:   \n\n    **Learning the Effect of Registration Hyperparameters with HyperMorph**  \n    Andrew Hoopes, [Malte Hoffmann](https://malte.cz), Bruce Fischl, [John Guttag](https://people.csail.mit.edu/guttag/), [Adrian V. Dalca](http://adalca.mit.edu)  \n    MELBA: Machine Learning for Biomedical Imaging. 2022. [eprint arXiv:2203.16680](https://arxiv.org/abs/2203.16680)\n\n    **HyperMorph: Amortized Hyperparameter Learning for Image Registration.**  \n    Andrew Hoopes, [Malte Hoffmann](https://malte.cz), Bruce Fischl, [John Guttag](https://people.csail.mit.edu/guttag/), [Adrian V. Dalca](http://adalca.mit.edu)  \n    IPMI: Information Processing in Medical Imaging. 2021. [eprint arXiv:2101.01035](https://arxiv.org/abs/2101.01035)\n\n  * [SynthMorph](https://synthmorph.voxelmorph.net), avoiding the need to have data at training (!):  \n\n    **Anatomy-aware and acquisition-agnostic joint registration with SynthMorph.**  \n    [Malte Hoffmann](https://malte.cz), Andrew Hoopes, Douglas N. Greve, Bruce Fischl, [Adrian V. Dalca](http://adalca.mit.edu)  \n    Imaging Neuroscience. 2024. [eprint arXiv:2301.11329](https://arxiv.org/abs/2301.11329)\n\n    **Anatomy-specific acquisition-agnostic affine registration learned from fictitious images.**  \n    [Malte Hoffmann](https://malte.cz), Andrew Hoopes, Bruce Fischl, [Adrian V. Dalca](http://adalca.mit.edu)  \n    SPIE Medical Imaging: Image Processing. 2023.\n\n    **SynthMorph: learning contrast-invariant registration without acquired images.**  \n    [Malte Hoffmann](https://malte.cz), Benjamin Billot, [Juan Eugenio Iglesias](https://scholar.harvard.edu/iglesias), Bruce Fischl, [Adrian V. Dalca](http://adalca.mit.edu)  \n    IEEE TMI: Transactions on Medical Imaging. 2022. [eprint arXiv:2004.10282](https://arxiv.org/abs/2004.10282)\n\n  * For the atlas formation model:  \n  \n    **Learning Conditional Deformable Templates with Convolutional Networks**  \n  [Adrian V. Dalca](http://adalca.mit.edu), [Marianne Rakic](https://mariannerakic.github.io/), [John Guttag](https://people.csail.mit.edu/guttag/), [Mert R. Sabuncu](http://sabuncu.engineering.cornell.edu/)  \n  NeurIPS 2019. [eprint arXiv:1908.02738](https://arxiv.org/abs/1908.02738)\n\n  * For the diffeomorphic or probabilistic model:\n\n    **Unsupervised Learning of Probabilistic Diffeomorphic Registration for Images and Surfaces**  \n[Adrian V. Dalca](http://adalca.mit.edu), [Guha Balakrishnan](http://people.csail.mit.edu/balakg/), [John Guttag](https://people.csail.mit.edu/guttag/), [Mert R. Sabuncu](http://sabuncu.engineering.cornell.edu/)  \nMedIA: Medial Image Analysis. 2019. [eprint arXiv:1903.03545](https://arxiv.org/abs/1903.03545) \n\n    **Unsupervised Learning for Fast Probabilistic Diffeomorphic Registration**  \n[Adrian V. Dalca](http://adalca.mit.edu), [Guha Balakrishnan](http://people.csail.mit.edu/balakg/), [John Guttag](https://people.csail.mit.edu/guttag/), [Mert R. Sabuncu](http://sabuncu.engineering.cornell.edu/)  \nMICCAI 2018. [eprint arXiv:1805.04605](https://arxiv.org/abs/1805.04605)\n\n  * For the original CNN model, MSE, CC, or segmentation-based losses:\n\n    **VoxelMorph: A Learning Framework for Deformable Medical Image Registration**  \n[Guha Balakrishnan](http://people.csail.mit.edu/balakg/), [Amy Zhao](http://people.csail.mit.edu/xamyzhao/), [Mert R. Sabuncu](http://sabuncu.engineering.cornell.edu/), [John Guttag](https://people.csail.mit.edu/guttag/), [Adrian V. Dalca](http://adalca.mit.edu)  \nIEEE TMI: Transactions on Medical Imaging. 2019. \n[eprint arXiv:1809.05231](https://arxiv.org/abs/1809.05231)\n\n    **An Unsupervised Learning Model for Deformable Medical Image Registration**  \n[Guha Balakrishnan](http://people.csail.mit.edu/balakg/), [Amy Zhao](http://people.csail.mit.edu/xamyzhao/), [Mert R. Sabuncu](http://sabuncu.engineering.cornell.edu/), [John Guttag](https://people.csail.mit.edu/guttag/), [Adrian V. Dalca](http://adalca.mit.edu)  \nCVPR 2018. [eprint arXiv:1802.02604](https://arxiv.org/abs/1802.02604)\n\n\n# Notes\n- **keywords**: machine learning, convolutional neural networks, alignment, mapping, registration  \n- **data in papers**: \nIn our initial papers, we used publicly available data, but unfortunately we cannot redistribute it (due to the constraints of those datasets). We do a certain amount of pre-processing for the brain images we work with, to eliminate sources of variation and be able to compare algorithms on a level playing field. In particular, we perform FreeSurfer `recon-all` steps up to skull stripping and affine normalization to Talairach space, and crop the images via `((48, 48), (31, 33), (3, 29))`. \n\nWe encourage users to download and process their own data. See [a list of medical imaging datasets here](https://github.com/adalca/medical-datasets). Note that you likely do not need to perform all of the preprocessing steps, and indeed VoxelMorph has been used in other work with other data.\n\n\n# Creation of deformable templates\n\nTo experiment with this method, please use `train_template.py` for unconditional templates and `train_cond_template.py` for conditional templates, which use the same conventions as VoxelMorph (please note that these files are less polished than the rest of the VoxelMorph library).\n\nWe've also provided an unconditional atlas in `data/generated_uncond_atlas.npz.npy`. \n\nModels in h5 format weights are provided for [unconditional atlas here](http://people.csail.mit.edu/adalca/voxelmorph/atlas_creation_uncond_NCC_1500.h5), and [conditional atlas here](http://people.csail.mit.edu/adalca/voxelmorph/atlas_creation_cond_NCC_1022.h5).\n\n**Explore the atlases [interactively here](http://voxelmorph.mit.edu/atlas_creation/)** with tipiX!\n\n\n# SynthMorph\n\nSynthMorph is a strategy for learning registration without acquired imaging data, producing powerful networks agnostic to contrast induced by MRI ([eprint arXiv:2004.10282](https://arxiv.org/abs/2004.10282)). For a video and a demo showcasing the steps of generating random label maps from noise distributions and using these to train a network, visit [synthmorph.voxelmorph.net](https://synthmorph.voxelmorph.net).\n\nWe provide model files for a [\"shapes\" variant](https://surfer.nmr.mgh.harvard.edu/ftp/data/voxelmorph/synthmorph/shapes-dice-vel-3-res-8-16-32-256f.h5) of SynthMorph, that we train using images synthesized from random shapes only, and a [\"brains\" variant](https://surfer.nmr.mgh.harvard.edu/ftp/data/voxelmorph/synthmorph/brains-dice-vel-0.5-res-16-256f.h5), that we train using images synthesized from brain label maps. We train the brains variant by optimizing a loss term that measures volume overlap of a [selection of brain labels](https://surfer.nmr.mgh.harvard.edu/ftp/data/voxelmorph/synthmorph/fs-labels.npy). For registration with either model, please use the `register.py` script with the respective model weights.\n\nAccurate registration requires the input images to be min-max normalized, such that voxel intensities range from 0 to 1, and to be resampled in the affine space of a [reference image](https://surfer.nmr.mgh.harvard.edu/ftp/data/voxelmorph/synthmorph/ref.nii.gz). The affine registration can be performed with a variety of packages, and we choose FreeSurfer. First, we skull-strip the images with [SAMSEG](https://surfer.nmr.mgh.harvard.edu/fswiki/Samseg), keeping brain labels only. Second, we run [mri_robust_register](https://surfer.nmr.mgh.harvard.edu/fswiki/mri_robust_register):\n\n```\nmri_robust_register --mov in.nii.gz --dst out.nii.gz --lta transform.lta --satit --iscale\nmri_robust_register --mov in.nii.gz --dst out.nii.gz --lta transform.lta --satit --iscale --ixform transform.lta --affine\n```\n\nwhere we replace `--satit --iscale` with `--cost NMI` for registration across MRI contrasts.\n\n\n# Data\nWhile we cannot release most of the data used in the VoxelMorph papers as they prohibit redistribution, we thorough processed and [re-released OASIS1](https://github.com/adalca/medical-datasets/blob/master/neurite-oasis.md) while developing [HyperMorph](http://hypermorph.voxelmorph.net/). We now include a quick [VoxelMorph tutorial](https://colab.research.google.com/drive/1ZefmWXBupRNsnIbBbGquhVDsk-7R7L1S?usp=sharing) to train VoxelMorph on neurite-oasis data.\n\n# Contact\nFor any code-related problems or questions please [open an issue](https://github.com/voxelmorph/voxelmorph/issues/new?labels=voxelmorph) or [start a discussion](https://github.com/voxelmorph/voxelmorph/discussions) of general registration/VoxelMorph topics.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5162:38C7FC:177E67:59527D:6AB921DA"},"text_sha256":"08132beacab6416b229a15a6d7bf30a58463aa02a1edb4579fb6fdd8ff2c2be5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"onnx/tensorflow-onnx","input_row":{"repository":"onnx/tensorflow-onnx","url":"https://github.com/onnx/tensorflow-onnx","name":"tensorflow-onnx","owner":"onnx","description":"Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2556,"issues":1093,"created_at":"2018-03-13T18:39:56Z","updated_at":"2026-09-22T09:53:00Z","first_commit_at":"2018-03-13T18:39:56Z","last_commit_at":"2026-09-02T15:23:28Z","activity_months":101.67,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:49.966Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"onnx/tensorflow-onnx","visibility":"public","created_at":"2018-03-13T18:39:56Z","updated_at":"2026-09-22T09:53:00Z","private":false,"fork":false,"archived":false,"stargazers_count":2556,"open_issues_count":241,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2978","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B3:0AC4:12861B3:15D6E9F:6AB9298A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2977","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17B3E0E:1BD41B4:6AB9298A"},"commit":{"sha":"e155d2812c5ca8508da8875d2ea227144d6ee2e8","url":"https://github.com/onnx/tensorflow-onnx/commit/e155d2812c5ca8508da8875d2ea227144d6ee2e8","date":"2018-05-23T22:20:47Z","author_date":"2018-05-23T22:20:47Z","committer_date":"2018-05-23T22:20:47Z","tree_sha":"7387f28e7e539379eecf8894c2b740cb79faf344","message_first_line":"Merge pull request #22 from onnx/gs/more-tests"},"tree_request_status":200,"tree_rate":{"github_remaining":"2976","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:D76B1C:FD259E:6AB9298A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7714,"blob_sha":"775ecd018c19324f6661ee57c652a4858890ac0b","priority":0}],"documents":[{"path":"README.md","size":7714,"blob_sha":"775ecd018c19324f6661ee57c652a4858890ac0b","priority":0,"status":200,"text":"tf2onnx - convert TensorFlow models to ONNX models.\n========\n\nTf2onnx converts a TensorFlow graph to an ONNX graph.\n\nTf2onnx is in its early development. Mileage will vary since TensorFlow supports ~4 times the operations that the current ONNX version supports. But standard models seem to be using mostly ops that ONNX does support.\n\n# Status\nBasic net and conv nets should work. A list of models that pass tests can be found [here](tests/run_pretrained_models.yaml)\n\n# Installation\nInstall dependencies:\n```\npip install onnx==1.1\npip install tensorflow\n```\nIf you want to run unit tests against the Caffe2 onnx backend, build and install Caffe2 and onnx-caffe2:\n```\nhttps://github.com/caffe2/caffe2\n\npip install onnx-caffe2==1.0\n```\nWe tested with tensorflow 1.5/1.6 and anaconda 3.5/3.6.\n\nOnce dependencies are installed, from the tf2onnx root folder call:\n```\npython setup.py install\n```\nor \n```\npython setup.py develop\n```\n\nTo create a wheel for distribution:\n```\npython setup.py bdist_wheel\n```\n# Usage\n```\npython -m tf2onnx.convert\nusage: convert.py [-h] --input INPUT [--output OUTPUT] [--target TARGET] --inputs INPUTS --outputs OUTPUTS [--continue_on_error] [--verbose]\n```\nFor example:\n```\npython -m tf2onnx.convert --input tests/models/fc-layers/frozen.pb --inputs X:0 --outputs output:0 --output tests/models/fc-layers/model.onnx --pretty --verbose\n```\n\nTo convert a TensorFlow model, tf2onnx expects a ```frozen TensorFlow graph``` and the user needs to specify inputs and outputs for the graph by passing the input and output\nnames with ```--inputs INPUTS``` and ```--outputs OUTPUTS```. \nTo find the inputs and outputs for the TensorFlow graph the model developer will know or you can consult TensorFlow's [summarize_graph](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms) tool, for example:\n```\nsummarize_graph --in_graph=tests/models/fc-layers/frozen.pb\n```\n\nThe TensorFlow tool to freeze the graph is [here](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py).\n\nFor example:\n```\npython -m tensorflow.python.tools.freeze_graph \\\n    --input_graph=my_checkpoint_dir/graphdef.pb \\\n    --input_binary=true \\\n    --input_names=input:0 \\\n    --output_node_names=output:0 \\\n    --input_checkpoint=my_checkpoint_dir \\\n    --output_graph=tests/models/fc-layers/frozen.pb\n```\n\nThere are different onnx versions and workarounds for runtimes that can be set with ```--target TARGET```. The default is onnx-1.1 and caffe2 which generates a graph\nthat can be executed on a onnx-1.0/onnx-1.1 runtime, like caffe2 and winml.\n\n# Testing\nThere are 2 types of tests.\n\n## Unit test\n```\npython setup.py test\n```\n\n## Validate pre-trained TensorFlow models\n```\npython tests/run_pretrained_models.py\nusage: run_pretrained_models.py [-h] [--cache CACHE] [--tests TESTS] [--backend BACKEND] [--verbose] [--debug] [--config yaml-config]\n\noptional arguments:\n  -h, --help         show this help message and exit\n  --cache CACHE      pre-trained models cache dir\n  --tests TESTS      tests to run\n  --backend BACKEND  backend to use\n  --config           yaml config file\n  --verbose          verbose output\n  --debug            dump generated graph with shape info\n```\n```run_pretrained_models.py``` will run the TensorFlow model, captures the TensorFlow output and runs the same test against the specified ONNX backend after converting the model. The only practical backend to use at this time is Caffe2, and you need to install Caffe2 for this to work.\n\nYou call it for example with:\n```\npython tests/run_pretrained_models.py --backend caffe2 --config tests/run_pretrained_models.yaml\n```\n# How tf2onnx works\nWhile the protobuf format of ONNX is not all that different than onnx, mileage will vary because TensorFlow supports 4x the ops compared to the current version of ONNX.\nThe converter needs to take care of a few things:\n1. Convert the protobuf format. Since the format is similar this step is straight forward.\n2. TensorFlow types need to be mapped to their ONNX equivalent.\n3. For many ops TensorFlow passes parameters like shapes as inputs where ONNX wants to see them as attributes. Since we use a frozen graph, the converter will fetch the input as constant, converts it to an attribute and remove the original input.\n4. TensorFlow in many cases composes ops out of multiple simpler ops. The converter will need to identify the subgraph for such ops, slice the subgraph out and replace it with the ONNX equivalent. This can become fairly complex so we use a graph matching library for it. A good example of this is the tensorflow transpose op.\n5. TensorFlow's default data format is NHWC where ONNX requires NCHW. The converter will insert transpose ops to deal with this.\n6. There are some ops like relu6 that are not supported in ONNX but the converter can be composed out of other ONNX ops.\n7. ONNX backends are new and their implementations are not complete yet. For some ops the converter generate ops with deal with issues in existing backends.\n\n### Step 1 - start with a frozen graph.\ntf2onnx starts with a frozen graph. This is because of item 3 above.\n\n### Step 2 - 1:1 convertion of the protobuf from tensorflow to onnx\ntf2onnx first does a simple convertion from the TensorFlow protobuf format to the ONNX protobuf format without looking at individual ops.\nWe do this so we can use the ONNX graph as internal representation and write helper functions around it.\nThe code that does the conversion is in tensorflow_to_onnx(). tensorflow_to_onnx() will return the ONNX graph and a dictionary with shape information from TensorFlow. The shape information is helpful in some cases when processing individual ops. \nThe ONNX graph is wrapped in a Graph object and nodes in the graph are wrapped in a Node object to allow easier graph manipulations on the graph. All code that deals with nodes and graphs is in graph.py.\n\n### Step 3 - rewrite subgraphs\nIn the next step we apply graph matching code on the graph to re-write subgraphs for ops like transpose and lstm. For an example looks at rewrite_transpose().\n\n### Step 4 - process individual ops\nIn the fourth step we look at individual ops that need attention. The dictionary _OPS_MAPPING will map tensorflow op types to a method that is used to process the op. The simplest case is direct_op() where the op can be taken as is. Whenever possible we try to group ops into common processing, for example all ops that require dealing with broadcasting are mapped to broadcast_op(). For an op that composes the tensorflow op from multiple onnx ops, see relu6_op().\n\n### Step 5 - final processing\nOnce all ops are converted, we need to do a topological sort since ONNX requires it. process_tf_graph() is the method that takes care of all above steps.\n\n# Extending tf2onnx\nIf you like to contribute and add new conversions to tf2onnx, the process is something like:\n1. See if the op fits into one of the existing mappings. If so adding it to _OPS_MAPPING is all that is needed.\n2. If the new op needs extra procesing, start a new mapping function.\n3. If the tensorflow op is composed of multiple ops, consider using a graph re-write. While this might be a little harder initially, it works better for complex patterns.\n4. Add a unit test in tests/test_backend.py. The unit tests mostly create the tensorflow graph, run it and capture the output, than convert to onnx, run against a onnx backend and compare tensorflow and onnx results. \n5. If there are pre-trained models that use the new op, consider adding those to test/run_pretrained_models.py.\n\n# What is missing\n- lstm/gru support (working on this)\n- more testing\n- more model coverage\n\n# License\n\n[MIT License](LICENSE)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5C:2E8679:17663D:5CA12F:6AB921DA"},"text_sha256":"a703207b73d2b2a16e6418da3364ff955ed76c44a084a5834e572ec32cff5ac1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2975","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:17D9C7D:1BFAA9E:6AB9298B"},"commit":{"sha":"e42cfc483dd934ea4cf32e3c75f8056b554525a3","url":"https://github.com/onnx/tensorflow-onnx/commit/e42cfc483dd934ea4cf32e3c75f8056b554525a3","date":"2026-06-27T07:58:12Z","author_date":"2026-06-27T07:58:12Z","committer_date":"2026-06-27T07:58:12Z","tree_sha":"e4e9008dc841846a6b0870feace457cb36344b36","message_first_line":"Bump zizmorcore/zizmor-action from 0.5.3 to 0.5.6 (#2461)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2974","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:17C2ABB:1BE361D:6AB9298B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":25831,"blob_sha":"bc6dd33dd27bfdf9d02b7ef7038bb1dbf2f1c512","priority":0}],"documents":[{"path":"README.md","size":25831,"blob_sha":"bc6dd33dd27bfdf9d02b7ef7038bb1dbf2f1c512","priority":0,"status":200,"text":"<!--\nCopyright (c) ONNX Project Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# tf2onnx - Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX.\n\ntf2onnx converts TensorFlow (tf-2.x), keras, tensorflow.js and tflite models to ONNX via command\nline or python api.\n\n---\n\n## 🛠 Maintainer Wanted\n\nWe are currently **looking for a new maintainer** to help support and evolve the `tf2onnx` project.\n\nIf you're passionate about the ONNX standard or contributing to the open source machine learning ecosystem, we'd love to hear from you! This is a great opportunity to contribute to a widely used project and collaborate with the ONNX community.\n\n**To express interest:**\nPlease open an issue or comment on [this thread](https://github.com/onnx/tensorflow-onnx/issues) and let us know about your interest and background.\n\n---\n\n__Note: tensorflow.js support is experimental. While we tested it with many tfjs models from tfhub, not all models may convert correctly.__\n\nTensorFlow has many more ops than ONNX and occasionally mapping a model to ONNX creates issues.\n\nYou find a list of supported TensorFlow ops and their mapping to ONNX [here](support_status.md).\n\nThe common issues we run into we try to document here [Troubleshooting Guide](Troubleshooting.md).\n\n<br/>\n\n| Build Type | OS | Python | TensorFlow | ONNX opset |\n| ---        | -  | ---    | ---        | ---        |\n| Unit Test - Basic | Linux, Windows | 3.10-3.12 | 2.13-2.15 | 14-18 |\n| Unit Test - Full | Linux, Windows | 3.10-3.12 | 2.13-2.15 | 14-18 | \n<br/>\n\n## Supported Versions\n\n### ONNX\n\ntf2onnx will use the ONNX version installed on your system and installs the latest ONNX version if none is found.\n\nWe support and test ONNX opset-14 to opset-18. opset-6 to opset-13 should work but we don't test them.\nBy default we use ```opset-15``` for the resulting ONNX graph.\n\nIf you want the graph to be generated with a specific opset, use ```--opset``` in the command line, for example ```--opset 15```.\n\n### TensorFlow\n\nWe support ```tf-2.x```. To keep our test matrix manageable we test tf2onnx running on top of ```tf-2.13 or better```.\n\n### Python\n\nWe support Python ```3.10-3.12```.\n\n## Prerequisites\n\n### Install TensorFlow\n\nIf you don't have TensorFlow installed already, install the desired TensorFlow build, for example:\n\n```pip install tensorflow```\n\n### (Optional) Install runtime\n\nIf you want to run tests, install a runtime that can run ONNX models. For example:\n\nONNX Runtime (available for Linux, Windows, and Mac):\n\n```pip install onnxruntime```\n\n## Installation\n\n### Install from pypi\n\n```pip install -U tf2onnx```\n\n### Install latest from github\n\n```pip install git+https://github.com/onnx/tensorflow-onnx```\n\n### Build and install latest from source (for development)\n\n```git clone https://github.com/onnx/tensorflow-onnx```\n\nOnce dependencies are installed, from the tensorflow-onnx folder call:\n\n```python setup.py install```\n\nor\n\n```python setup.py develop```\n\ntensorflow-onnx requires onnx-1.9 or better and will install/upgrade onnx if needed.\n\nTo create a wheel for distribution:\n\n```python setup.py bdist_wheel```\n\n## Getting started\n\nTo get started with `tensorflow-onnx`, run the `tf2onnx.convert` command, providing:\n\n* the path to your TensorFlow model (where the model is in `saved model` format)\n* a name for the ONNX output file:\n\n```python -m tf2onnx.convert --saved-model tensorflow-model-path --output model.onnx```\n\nThe above command uses a default of `15` for the ONNX opset. If you need a newer opset, or want to limit your model to use an older opset then you can provide the `--opset` argument to the command. If you are unsure about which opset to use, refer to the [ONNX operator documentation](https://github.com/onnx/onnx/releases).\n\n```python -m tf2onnx.convert --saved-model tensorflow-model-path --opset 18 --output model.onnx```\n\nIf your TensorFlow model is in a format other than `saved model`, then you need to provide the inputs and outputs of the model graph.\n\nFor `checkpoint` format:\n\n```python -m tf2onnx.convert --checkpoint  tensorflow-model-meta-file-path --output model.onnx --inputs input0:0,input1:0 --outputs output0:0```\n\nFor `graphdef` format:\n\n```python -m tf2onnx.convert --graphdef  tensorflow-model-graphdef-file --output model.onnx --inputs input0:0,input1:0 --outputs output0:0```\n\nIf your model is in `checkpoint` or `graphdef` format and you do not know the input and output nodes of the model, you can use the [summarize_graph](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms) TensorFlow utility. The `summarize_graph` tool does need to be downloaded and built from source. If you have the option of going to your model provider and obtaining the model in `saved model` format, then we recommend doing so.\n\nYou find an end-to-end tutorial for ssd-mobilenet [here](tutorials/ConvertingSSDMobilenetToONNX.ipynb)\n\nWe recently added support for tflite. You convert ```tflite``` models via command line, for example:\n\n```python -m tf2onnx.convert --opset 16 --tflite tflite-file --output model.onnx```\n\n## CLI reference\n\n```\npython -m tf2onnx.convert\n    --saved-model SOURCE_SAVED_MODEL_PATH |\n    --checkpoint SOURCE_CHECKPOINT_METAFILE_PATH |\n    --tflite TFLITE_MODEL_PATH |\n    --tfjs TFJS_MODEL_PATH | \n    --input | --graphdef SOURCE_GRAPHDEF_PB\n    --output TARGET_ONNX_MODEL\n    [--inputs GRAPH_INPUTS]\n    [--outputs GRAPH_OUTPUS]\n    [--inputs-as-nchw inputs_provided_as_nchw]\n    [--outputs-as-nchw outputs_provided_as_nchw]\n    [--opset OPSET]\n    [--dequantize]\n    [--tag TAG]\n    [--signature_def SIGNATURE_DEF]\n    [--concrete_function CONCRETE_FUNCTION]\n    [--target TARGET]\n    [--extra_opset list-of-extra-opset]\n    [--custom-ops list-of-custom-ops]\n    [--load_op_libraries tensorflow_library_path]\n    [--large_model]\n    [--continue_on_error]\n    [--verbose]\n    [--output_frozen_graph]\n```\n\n### Parameters\n\n#### --saved-model\n\nTensorFlow model as saved_model. We expect the path to the saved_model directory.\n\n#### --checkpoint\n\nTensorFlow model as checkpoint. We expect the path to the .meta file.\n\n#### --input or --graphdef\n\nTensorFlow model as graphdef file.\n\n#### --tfjs\n\nConvert a tensorflow.js model by providing a path to the .tfjs file. Inputs/outputs do not need to be specified.\n\n#### --tflite\n\nConvert a tflite model by providing a path to the .tflite file. Inputs/outputs do not need to be specified.\n\n#### --output\n\nThe target onnx file path.\n\n#### --inputs, --outputs\n\nTensorFlow model's input/output names, which can be found with [summarize graph tool](#summarize_graph). Those names typically end with ```:0```, for example ```--inputs input0:0,input1:0```. Inputs and outputs are ***not*** needed for models in saved-model format. Some models specify placeholders with unknown ranks and dims which can not be mapped to onnx. In those cases one can add the shape after the input name inside `[]`, for example `--inputs X:0[1,28,28,3]`. Use -1 to indicate unknown dimensions.\n\n#### --inputs-as-nchw\n\nBy default we preserve the image format of inputs (`nchw` or `nhwc`) as given in the TensorFlow model. If your hosts (for example windows) native format nchw and the model is written for nhwc, ```--inputs-as-nchw``` tensorflow-onnx will transpose the input. Doing so is convenient for the application and the converter in many cases can optimize the transpose away. For example ```--inputs input0:0,input1:0 --inputs-as-nchw input0:0``` assumes that images are passed into ```input0:0``` as nchw while the TensorFlow model given uses nhwc.\n\n#### --outputs-as-nchw\n\nSimilar usage with `--inputs-as-nchw`. By default we preserve the format of outputs (`nchw` or `nhwc`) as shown in the TensorFlow model. If your hosts native format nchw and the model is written for nhwc, ```--outputs-as-nchw``` tensorflow-onnx will transpose the output and optimize the transpose away. For example ```--outputs output0:0,output1:0 --outputs-as-nchw output0:0``` will change the ```output0:0``` as nchw while the TensorFlow model given uses nhwc.\n\n#### --ignore_default, --use_default\n\nONNX requires default values for graph inputs to be constant, while Tensorflow's PlaceholderWithDefault op accepts computed defaults. To convert such models, pass a comma-separated list of node names to the ignore_default and/or use_default flags.  PlaceholderWithDefault nodes with matching names will be replaced with Placeholder or Identity ops, respectively.\n\n#### --opset\n\nBy default we use the opset 15 to generate the graph. By specifying ```--opset``` the user can override the default to generate a graph with the desired opset. For example ```--opset 17``` would create a onnx graph that uses only ops available in opset 17. Because older opsets have in most cases fewer ops, some models might not convert on an older opset.\n\n#### --dequantize\n\n(This is experimental, only supported for tflite)\n\nProduces a float32 model from a quantized tflite model. Detects ReLU and ReLU6 ops from quantization bounds.\n\n#### --tag\n\nOnly valid with parameter `--saved_model`. Specifies the tag in the saved_model to be used. Typical value is 'serve'.\n\n#### --signature_def\n\nOnly valid with parameter `--saved_model`. Specifies which signature to use within the specified --tag value. Typical value is 'serving_default'.\n\n#### --concrete_function\n\n(This is experimental, valid only for TF2.x models)\n\nOnly valid with parameter `--saved_model`. If a model contains a list of concrete functions, under the function name `__call__` (as can be viewed using the command `saved_model_cli show --all`), this parameter is a 0-based integer specifying which function in that list should be converted. This parameter takes priority over `--signature_def`, which will be ignored.\n\n#### --target\n\nSome models require special handling to run on some runtimes. In particular, the model may use unsupported data types. Workarounds are activated with ```--target TARGET```. Currently supported values are listed on this [wiki](https://github.com/onnx/tensorflow-onnx/wiki/target). If your model will be run on Windows ML, you should specify the appropriate target value.\n\n#### --extra_opset\n\nIf you want to convert a TF model using an existing custom op, this can specify the correspongding domain and version.\nThe format is a comma-separated map of domain and version, for example: `ai.onnx.contrib:1`.\n\n#### --custom-ops\n\nIf a model contains ops not recognized by onnx runtime, you can tag these ops with a custom op domain so that the\nruntime can still open the model. The format is a comma-separated map of tf op names to domains in the format\nOpName:domain. If only an op name is provided (no colon), the default domain of `ai.onnx.converters.tensorflow`\nwill be used.\n\n#### --load_op_libraries\n\nLoad the comma-separated list of tensorflow plugin/op libraries before conversion.\n\n#### --large_model\n\n(Can be used only for TF2.x models)\n\nOnly valid with parameter `--saved_model`. When set, creates a zip file containing the ONNX protobuf model and large tensor values stored externally. This allows for converting models whose size exceeds the 2 GB.\n\n#### --continue_on_error\nContinue to run conversion on error, ignore graph cycles so it can report all missing ops and errors.\n\n#### --verbose\nVerbose detailed output for diagnostic purposes.\n\n#### --output_frozen_graph\n\nSave the frozen and optimized tensorflow graph to a file for debug.\n\n\n### <a name=\"summarize_graph\"><\/a>Tool to get Graph Inputs & Outputs\n\nTo find the inputs and outputs for the TensorFlow graph the model developer will know or you can consult TensorFlow's [summarize_graph](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms) tool, for example:\n```\nsummarize_graph --in_graph=tests/models/fc-layers/frozen.pb\n```\n\n## Testing\nThere are 2 types of tests.\n\n### Unit test\n```\npython setup.py test\n```\n\n### Validate pre-trained TensorFlow models\n```\npython tests/run_pretrained_models.py\nusage: run_pretrained_models.py [-h] [--cache CACHE] [--tests TESTS] [--backend BACKEND] [--verbose] [--debug] [--config yaml-config]\n\noptional arguments:\n  -h, --help         show this help message and exit\n  --cache CACHE      pre-trained models cache dir\n  --tests TESTS      tests to run\n  --backend BACKEND  backend to use\n  --config           yaml config file\n  --verbose          verbose output, option is additive\n  --opset OPSET      target opset to use\n  --perf csv-file    capture performance numbers for tensorflow and onnx runtime\n  --debug            dump generated graph with shape info\n```\n```run_pretrained_models.py``` will run the TensorFlow model, captures the TensorFlow output and runs the same test against the specified ONNX backend after converting the model.\n\nIf the option ```--perf csv-file``` is specified, we'll capture the timing for inference of tensorflow and onnx runtime and write the result into the given csv file.\n\nYou call it for example with:\n```\npython tests/run_pretrained_models.py --backend onnxruntime --config tests/run_pretrained_models.yaml --perf perf.csv\n```\n\n#### <a name=\"save_pretrained_model\"><\/a>Tool to save pre-trained model\n\nWe provide an [utility](tools/save_pretrained_model.py) to save pre-trained model along with its config.\nPut `save_pretrained_model(sess, outputs, feed_inputs, save_dir, model_name)` in your last testing epoch and the pre-trained model and config will be saved under `save_dir/to_onnx`.\nPlease refer to the example in [tools/save_pretrained_model.py](tools/save_pretrained_model.py) for more information.\nNote the minimum required Tensorflow version is r1.6.\n\n## Python API Reference\nWith tf2onnx-1.8.4 we updated our API. Our old API still works - you find the documentation [here](https://github.com/onnx/tensorflow-onnx/blob/v1.8.3/README.md#python-api-reference).\n\n### from_keras (tf-2.0 and newer)\n```\nimport tf2onnx\n\nmodel_proto, external_tensor_storage = tf2onnx.convert.from_keras(model,\n                input_signature=None, opset=None, custom_ops=None,\n                custom_op_handlers=None, custom_rewriter=None,\n                inputs_as_nchw=None, outputs_as_nchw=None, extra_opset=None,\n                shape_override=None, target=None, large_model=False, output_path=None)\n\n    Args:\n        model: the tf.keras model we want to convert\n        input_signature: a tf.TensorSpec or a numpy array defining the shape/dtype of the input\n        opset: the opset to be used for the ONNX model, default is the latest\n        custom_ops: if a model contains ops not recognized by onnx runtime,\n            you can tag these ops with a custom op domain so that the\n            runtime can still open the model. Type is a dictionary `{op name: domain}`.\n        target: list of workarounds applied to help certain platforms\n        custom_op_handlers: dictionary of custom ops handlers\n        custom_rewriter: list of custom graph rewriters\n        extra_opset: list of extra opset's, for example the opset's used by custom ops\n        shape_override: dict with inputs that override the shapes given by tensorflow\n        inputs_as_nchw: transpose inputs in list from nhwc to nchw\n        outputs_as_nchw: transpose outputs in list from nhwc to nchw\n        large_model: use the ONNX external tensor storage format\n        output_path: save model to output_path\n\n    Returns:\n        An ONNX model_proto and an external_tensor_storage dict.\n```\n\nSee [tutorials/keras-resnet50.ipynb](tutorials/keras-resnet50.ipynb) for an end to end example.\n\n### from_function (tf-2.0 and newer)\n```\nimport tf2onnx\n\nmodel_proto, external_tensor_storage = tf2onnx.convert.from_function(function,\n                input_signature=None, opset=None, custom_ops=None,\n                custom_op_handlers=None, custom_rewriter=None, inputs_as_nchw=None,\n                outputs_as_nchw=None, extra_opset=None, shape_override=None,\n                target=None, large_model=False, output_path=None)\n\n    Args:\n        function: the tf.function we want to convert\n        input_signature: a tf.TensorSpec or a numpy array defining the shape/dtype of the input\n        opset: the opset to be used for the ONNX model, default is the latest\n        custom_ops: if a model contains ops not recognized by onnx runtime,\n            you can tag these ops with a custom op domain so that the\n            runtime can still open the model. Type is a dictionary `{op name: domain}`.\n        target: list of workarounds applied to help certain platforms\n        custom_op_handlers: dictionary of custom ops handlers\n        custom_rewriter: list of custom graph rewriters\n        extra_opset: list of extra opset's, for example the opset's used by custom ops\n        shape_override: dict with inputs that override the shapes given by tensorflow\n        inputs_as_nchw: transpose inputs in list from nhwc to nchw\n        outputs_as_nchw: transpose outputs in list from nhwc to nchw\n        large_model: use the ONNX external tensor storage format\n        output_path: save model to output_path\n\n    Returns:\n        An ONNX model_proto and an external_tensor_storage dict.\n```\n\n### from_graph_def\n```\nimport tf2onnx\n\nmodel_proto, external_tensor_storage = tf2onnx.convert.from_graph_def(graph_def,\n                name=None, input_names=None, output_names=None, opset=None,\n                custom_ops=None, custom_op_handlers=None, custom_rewriter=None, \n                inputs_as_nchw=None, outputs_as_nchw=None, extra_opset=None,\n                shape_override=None, target=None, large_model=False,\n                output_path=None)\n\n    Args:\n        graph_def: the graph_def we want to convert\n        input_names: list of input names\n        output_names: list of output names\n        name: A name for the graph\n        opset: the opset to be used for the ONNX model, default is the latest\n        target: list of workarounds applied to help certain platforms\n        custom_op_handlers: dictionary of custom ops handlers\n        custom_rewriter: list of custom graph rewriters\n        extra_opset: list of extra opset's, for example the opset's used by custom ops\n        shape_override: dict with inputs that override the shapes given by tensorflow\n        inputs_as_nchw: transpose inputs in list from nhwc to nchw\n        outputs_as_nchw: transpose outputs in list from nhwc to nchw\n        large_model: use the ONNX external tensor storage format\n        output_path: save model to output_path\n\n    Returns:\n        An ONNX model_proto and an external_tensor_storage dict.\n```\n\n### from_tflite\n```\nimport tf2onnx\n\nmodel_proto, external_tensor_storage = tf2onnx.convert.from_tflite(tflite_path,\n                input_names=None, output_names=None, opset=None, custom_ops=None, custom_op_handlers=None,\n                custom_rewriter=None, inputs_as_nchw=None, outputs_as_nchw=None, extra_opset=None,\n                shape_override=None, target=None, large_model=False, output_path=None):\n\n    Args:\n        tflite_path: the tflite model file full path\n        input_names: list of input names\n        output_names: list of output names\n        opset: the opset to be used for the ONNX model, default is the latest\n        custom_ops: if a model contains ops not recognized by onnx runtime,\n            you can tag these ops with a custom op domain so that the\n            runtime can still open the model. Type is a dictionary `{op name: domain}`.\n        custom_op_handlers: dictionary of custom ops handlers\n        custom_rewriter: list of custom graph rewriters\n        inputs_as_nchw: transpose inputs in list from nhwc to nchw\n        outputs_as_nchw: transpose outputs in list from nhwc to nchw\n        extra_opset: list of extra opset's, for example the opset's used by custom ops\n        shape_override: dict with inputs that override the shapes given by tensorflow\n        target: list of workarounds applied to help certain platforms\n        large_model: use the ONNX external tensor storage format\n        output_path: save model to output_path\n\n    Returns:\n        An ONNX model_proto and an external_tensor_storage dict.\n```\n\n### Creating custom op mappings from python\n\nFor complex custom ops that require graph rewrites or input / attribute rewrites using the python interface to insert a custom op will be the easiest way to accomplish the task.\nA dictionary of name->custom_op_handler can be passed to tf2onnx.tfonnx.process_tf_graph. If the op name is found in the graph the handler will have access to all internal structures and can rewrite that is needed. For example [examples/custom_op_via_python.py]():\n\n```\nimport tensorflow as tf\nimport tf2onnx\nfrom onnx import helper\n\n_TENSORFLOW_DOMAIN = \"ai.onnx.converters.tensorflow\"\n\n\ndef print_handler(ctx, node, name, args):\n    # replace tf.Print() with Identity\n    #   T output = Print(T input, data, @list(type) U, @string message, @int first_n, @int summarize)\n    # becomes:\n    #   T output = Identity(T Input)\n    node.domain = _TENSORFLOW_DOMAIN\n    del node.input[1:]\n    return node\n\n\nwith tf.Session() as sess:\n    x = tf.placeholder(tf.float32, [2, 3], name=\"input\")\n    x_ = tf.add(x, x)\n    x_ = tf.Print(x, [x], \"hello\")\n    _ = tf.identity(x_, name=\"output\")\n    onnx_graph = tf2onnx.tfonnx.process_tf_graph(sess.graph,\n                                                 custom_op_handlers={\"Print\": (print_handler, [\"Identity\", \"mode\"])},\n                                                 extra_opset=[helper.make_opsetid(_TENSORFLOW_DOMAIN, 1)],\n                                                 input_names=[\"input:0\"],\n                                                 output_names=[\"output:0\"])\n    model_proto = onnx_graph.make_model(\"test\")\n    with open(\"/tmp/model.onnx\", \"wb\") as f:\n        f.write(model_proto.SerializeToString())\n```\n\n## How tf2onnx works\n\nThe converter needs to take care of a few things:\n\n1. Convert the protobuf format. Since the format is similar this step is straight forward.\n2. TensorFlow types need to be mapped to their ONNX equivalent.\n3. For many ops TensorFlow passes parameters like shapes as inputs where ONNX wants to see them as attributes. Since we use a frozen graph, the converter will fetch the input as constant, converts it to an attribute and remove the original input.\n4. TensorFlow in many cases composes ops out of multiple simpler ops. The converter will need to identify the subgraph for such ops, slice the subgraph out and replace it with the ONNX equivalent. This can become fairly complex so we use a graph matching library for it. A good example of this is the tensorflow transpose op.\n5. TensorFlow's default data format is NHWC where ONNX requires NCHW. The converter will insert transpose ops to deal with this.\n6. There are some ops like relu6 that are not supported in ONNX but the converter can be composed out of other ONNX ops.\n7. ONNX backends are new and their implementations are not complete yet. For some ops the converter generate ops with deal with issues in existing backends.\n\n### Step 1 - start with a frozen graph\n\ntf2onnx starts with a frozen graph. This is because of item 3 above.\n\n### Step 2 - 1:1 conversion of the protobuf from tensorflow to onnx\n\ntf2onnx first does a simple conversion from the TensorFlow protobuf format to the ONNX protobuf format without looking at individual ops.\nWe do this so we can use the ONNX graph as internal representation and write helper functions around it.\nThe code that does the conversion is in tensorflow_to_onnx(). tensorflow_to_onnx() will return the ONNX graph and a dictionary with shape information from TensorFlow. The shape information is helpful in some cases when processing individual ops.\nThe ONNX graph is wrapped in a Graph object and nodes in the graph are wrapped in a Node object to allow easier graph manipulations on the graph. All code that deals with nodes and graphs is in graph.py.\n\n### Step 3 - rewrite subgraphs\n\nIn the next step we apply graph matching code on the graph to re-write subgraphs for ops like transpose and lstm. For an example looks at rewrite_transpose().\n\n### Step 4 - process individual ops\n\nIn the fourth step we look at individual ops that need attention. The dictionary _OPS_MAPPING will map tensorflow op types to a method that is used to process the op. The simplest case is direct_op() where the op can be taken as is. Whenever possible we try to group ops into common processing, for example all ops that require dealing with broadcasting are mapped to broadcast_op(). For an op that composes the tensorflow op from multiple onnx ops, see relu6_op().\n\n### Step 5 - optimize the functional ONNX graph\n\nWe than try to optimize the functional ONNX graph. For example we remove ops that are not needed,\nremove transposes as much as possible, de-dupe constants, fuse ops whenever possible, ...\n\n### Step 6 - final processing\n\nOnce all ops are converted and optimize, we need to do a topological sort since ONNX requires it. process_tf_graph() is the method that takes care of all above steps.\n\n## Extending tf2onnx\n\nIf you like to contribute and add new conversions to tf2onnx, the process is something like:\n\n1. See if the op fits into one of the existing mappings. If so adding it to _OPS_MAPPING is all that is needed.\n2. If the new op needs extra processing, start a new mapping function.\n3. If the tensorflow op is composed of multiple ops, consider using a graph re-write. While this might be a little harder initially, it works better for complex patterns.\n4. Add a unit test in tests/test_backend.py. The unit tests mostly create the tensorflow graph, run it and capture the output, than convert to onnx, run against a onnx backend and compare tensorflow and onnx results.\n5. If there are pre-trained models that use the new op, consider adding those to test/run_pretrained_models.py.\n\n## License\n\n[Apache License v2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B98:29FD16:17D39E:5D10E8:6AB921DE"},"text_sha256":"962ee07a5312c6e239cd8547ee8a860beef482288afaa0559e53c26e5519c279"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/AutonomousDrivingCookbook","input_row":{"repository":"microsoft/AutonomousDrivingCookbook","url":"https://github.com/microsoft/AutonomousDrivingCookbook","name":"AutonomousDrivingCookbook","owner":"microsoft","description":"Scenarios, tutorials and demos for Autonomous Driving","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2440,"issues":124,"created_at":"2017-11-30T20:51:02Z","updated_at":"2026-09-23T02:55:29Z","first_commit_at":"2017-11-30T20:51:02Z","last_commit_at":"2025-08-25T19:22:55Z","activity_months":92.799999999999997,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:53.424Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/AutonomousDrivingCookbook","visibility":"public","created_at":"2017-11-30T20:51:02Z","updated_at":"2026-09-23T02:55:29Z","private":false,"fork":false,"archived":false,"stargazers_count":2440,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2973","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082D:725A9:17CA3D7:1BEB69B:6AB9298D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2972","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:179B300:1BBC145:6AB9298D"},"commit":{"sha":"3801b685bf758c32c46a5d736a5ebbd941b191b4","url":"https://github.com/microsoft/AutonomousDrivingCookbook/commit/3801b685bf758c32c46a5d736a5ebbd941b191b4","date":"2018-04-01T20:15:57Z","author_date":"2018-04-01T20:15:57Z","committer_date":"2018-04-01T20:15:57Z","tree_sha":"d19f3bc6be206041d8a1a1a25588bb0e7b65959b","message_first_line":"Merge pull request #26 from Microsoft/mspryn_bugfix"},"tree_request_status":200,"tree_rate":{"github_remaining":"2971","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0798:180242:17E2F8D:1C03CAF:6AB9298E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5363,"blob_sha":"5ea589e50defbe129c12e4588a13439d76a098b5","priority":0}],"documents":[{"path":"README.md","size":5363,"blob_sha":"5ea589e50defbe129c12e4588a13439d76a098b5","priority":0,"status":200,"text":"# The Autonomous Driving Cookbook (Preview)\n\n\n\n------\n\n#### **NOTE:**\n\nThis project is developed and being maintained by the Microsoft Deep Learning and Robotics Garage Chapter. This is currently a work in progress. We will continue to add more tutorials and scenarios based on requests from our users and the availability of our collaborators.\n\n------\n<p align=\"center\">\n  <img src=\"AirSimE2EDeepLearning/car_driving.gif?raw=true\" />\n<\/p>\n\n\nAutonomous driving has transcended far beyond being a crazy moonshot idea over the last half decade or so. It has quickly become one of the biggest technologies today that promises to shape our tomorrow, not very unlike when cars first came into existence. A big driver powering this change is the recent advances in software (Artificial Intelligence), hardware (GPUs, FPGAs etc.) and cloud computing, which have enabled ingest and processing of large amounts of data, making it possible for companies to push for levels 4 and 5 of autonomy. Achieving those levels of autonomy though, require training on hundreds of millions and sometimes hundreds of billions of miles worth of training data to demonstrate reliability, according to a [report](https://www.rand.org/pubs/research_reports/RR1478.html) from RAND.\n\nDespite the large amount of data collected every day, it is still insufficient to meet the demands of the ever increasing AI model complexity required by autonomous vehicles. One way to collect such huge amounts of data is through the use of simulation. Simulation makes it easy to not only collect data from a variety of different scenarios which would take days, if not months in the real world (like different weather conditions, varying daylight etc.), it also provides a safe test bed for trained models. With behavioral cloning, you can easily prepare highly efficient models in simulation and fine tune them using a relatively low amount of real world data. Then there are models built using techniques like Reinforcement Learning, which can only be trained in simulation. With simulators such as [AirSim](https://github.com/Microsoft/AirSim), working on these scenarios has become very easy.\n\n<p align=\"center\">\n  <img src=\"DistributedRL/car_driving_2.gif?raw=true\" />\n<\/p>\n\n\nWe believe that the best way to make a technology grow is by making it easily available and accessible to everyone. This is best achieved by making the barrier of entry to it as low as possible. At Microsoft, our mission is to empower every person and organization on the planet to achieve more. That has been our primary motivation behind preparing this cookbook. Our aim with this project is to help you get quickly acquainted and familiarized with different onboarding scenarios in autonomous driving so you can take what you learn here and employ it in your everyday job with a minimal barrier to entry.\n\n### Who is this cookbook for?\n\nOur plan is to make this cookbook a valuable resource for beginners, researchers and industry experts alike. Tutorials in the cookbook are presented as [Jupyter notebooks](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html), making it very easy for you to download the instructions and get started without a lot of setup time. To help this further, wherever needed, tutorials come with their own datasets, helper scripts and binaries. While the tutorials leverage popular open-source tools (like Keras, TensorFlow etc.) as well as Microsoft open-source and commercial technology (like AirSim, Azure virtual machines, Batch AI, CNTK etc.), the primary focus is on the content and learning, enabling you to take what you learn here and apply it to your work using tools of your choice.  \n\nWe would love to hear your feedback on how we can evolve this project to reach that goal. Please use the GitHub Issues section to get in touch with us regarding ideas and suggestions.\n\n### Tutorials available\n\nCurrently, the following tutorials are available:\n\n- [Autonomous Driving using End-to-End Deep Learning: an AirSim tutorial](./AirSimE2EDeepLearning/)\n- [Distributed Deep Reinforcement Learning for Autonomous Driving](./DistributedRL/)\n\nFollowing tutorials will be available soon:\n\n- Lane Detection using Deep Learning\n\n### Contributing\n\nPlease read the [instructions and guidelines for collaborators](https://github.com/Microsoft/AutonomousDrivingCookbook/blob/master/CONTRIBUTING.md) if you wish to add a new tutorial to the cookbook. \n\nThis project welcomes and encourages contributions and suggestions.  Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EA8:17E138:174933:5C8689:6AB921E0"},"text_sha256":"5d0c8f2cb345d76716dfdfdf2bf96f6f4bb83199563986339128aea7a612e268"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2970","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0841:6E4BB:17EC8D8:1C0D0B9:6AB9298E"},"commit":{"sha":"e94a6013841476e0ecbb3c7338ed4eee3e58fe74","url":"https://github.com/microsoft/AutonomousDrivingCookbook/commit/e94a6013841476e0ecbb3c7338ed4eee3e58fe74","date":"2025-08-25T19:22:55Z","author_date":"2025-08-25T19:22:55Z","committer_date":"2025-08-25T19:22:55Z","tree_sha":"93b4d04674f8e1ac76a2773a7e675dfc8201c05a","message_first_line":"Clear SECRET_KEY in settings.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"2969","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CB:156040:17C1D10:1BE2217:6AB9298F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5475,"blob_sha":"9a9b8fcdad7a129b15589aaa6b3b0825540aae22","priority":0},{"path":"SECURITY.md","size":2757,"blob_sha":"e138ec5d6a77c5e6e09346a69cbdc90c85a3806f","priority":1}],"documents":[{"path":"README.md","size":5475,"blob_sha":"9a9b8fcdad7a129b15589aaa6b3b0825540aae22","priority":0,"status":200,"text":"# The Autonomous Driving Cookbook (Preview)\n\n\n\n------\n\n#### **NOTE:**\n\nThis project is developed and being maintained by [Project Road Runner](https://www.microsoft.com/en-us/garage/blog/2018/04/project-road-runner-train-autonomous-driving-algorithms-for-road-safety/) at Microsoft Garage. This is currently a work in progress. We will continue to add more tutorials and scenarios based on requests from our users and the availability of our collaborators.\n\n------\n<p align=\"center\">\n  <img src=\"AirSimE2EDeepLearning/car_driving.gif?raw=true\" />\n<\/p>\n\n\nAutonomous driving has transcended far beyond being a crazy moonshot idea over the last half decade or so. It has quickly become one of the biggest technologies today that promises to shape our tomorrow, not very unlike when cars first came into existence. A big driver powering this change is the recent advances in software (Artificial Intelligence), hardware (GPUs, FPGAs etc.) and cloud computing, which have enabled ingest and processing of large amounts of data, making it possible for companies to push for levels 4 and 5 of autonomy. Achieving those levels of autonomy though, require training on hundreds of millions and sometimes hundreds of billions of miles worth of training data to demonstrate reliability, according to a [report](https://www.rand.org/pubs/research_reports/RR1478.html) from RAND.\n\nDespite the large amount of data collected every day, it is still insufficient to meet the demands of the ever increasing AI model complexity required by autonomous vehicles. One way to collect such huge amounts of data is through the use of simulation. Simulation makes it easy to not only collect data from a variety of different scenarios which would take days, if not months in the real world (like different weather conditions, varying daylight etc.), it also provides a safe test bed for trained models. With behavioral cloning, you can easily prepare highly efficient models in simulation and fine tune them using a relatively low amount of real world data. Then there are models built using techniques like Reinforcement Learning, which can only be trained in simulation. With simulators such as [AirSim](https://github.com/Microsoft/AirSim), working on these scenarios has become very easy.\n\n<p align=\"center\">\n  <img src=\"DistributedRL/car_driving_2.gif?raw=true\" />\n<\/p>\n\n\nWe believe that the best way to make a technology grow is by making it easily available and accessible to everyone. This is best achieved by making the barrier of entry to it as low as possible. At Microsoft, our mission is to empower every person and organization on the planet to achieve more. That has been our primary motivation behind preparing this cookbook. Our aim with this project is to help you get quickly acquainted and familiarized with different onboarding scenarios in autonomous driving so you can take what you learn here and employ it in your everyday job with a minimal barrier to entry.\n\n### Who is this cookbook for?\n\nOur plan is to make this cookbook a valuable resource for beginners, researchers and industry experts alike. Tutorials in the cookbook are presented as [Jupyter notebooks](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html), making it very easy for you to download the instructions and get started without a lot of setup time. To help this further, wherever needed, tutorials come with their own datasets, helper scripts and binaries. While the tutorials leverage popular open-source tools (like Keras, TensorFlow etc.) as well as Microsoft open-source and commercial technology (like AirSim, Azure virtual machines, Batch AI, CNTK etc.), the primary focus is on the content and learning, enabling you to take what you learn here and apply it to your work using tools of your choice.  \n\nWe would love to hear your feedback on how we can evolve this project to reach that goal. Please use the GitHub Issues section to get in touch with us regarding ideas and suggestions.\n\n### Tutorials available\n\nCurrently, the following tutorials are available:\n\n- [Autonomous Driving using End-to-End Deep Learning: an AirSim tutorial](./AirSimE2EDeepLearning/)\n- [Distributed Deep Reinforcement Learning for Autonomous Driving](./DistributedRL/)\n\nFollowing tutorials will be available soon:\n\n- Lane Detection using Deep Learning\n\n### Contributing\n\nPlease read the [instructions and guidelines for collaborators](https://github.com/Microsoft/AutonomousDrivingCookbook/blob/master/CONTRIBUTING.md) if you wish to add a new tutorial to the cookbook. \n\nThis project welcomes and encourages contributions and suggestions.  Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A052:375F4:176E4E:5CAD30:6AB921E2"},"text_sha256":"212204f51b72dc3b51a2b776446bf116ea1e585635f01c0860a00b151ba92295"},{"path":"SECURITY.md","size":2757,"blob_sha":"e138ec5d6a77c5e6e09346a69cbdc90c85a3806f","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B650:3E1C8:178891:5CC549:6AB921E2"},"text_sha256":"430987b8c5f30c366ecd501bc344c8b29b6280e8a10174376a769f7443a187cd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"leggedrobotics/darknet_ros","input_row":{"repository":"leggedrobotics/darknet_ros","url":"https://github.com/leggedrobotics/darknet_ros","name":"darknet_ros","owner":"leggedrobotics","description":"YOLO ROS: Real-Time Object Detection for ROS","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2438,"issues":343,"created_at":"2017-03-31T17:25:58Z","updated_at":"2026-09-22T05:16:55Z","first_commit_at":"2016-12-08T09:13:28Z","last_commit_at":"2021-06-30T07:14:22Z","activity_months":54.700000000000003,"ai_ml_match_topics":"deep-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:56.118Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"leggedrobotics/darknet_ros","visibility":"public","created_at":"2017-03-31T17:25:58Z","updated_at":"2026-09-22T05:16:55Z","private":false,"fork":false,"archived":false,"stargazers_count":2438,"open_issues_count":166,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2968","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:1800D9C:1C218EF:6AB92990"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2967","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B4:1B4E7A:179B6E0:1BBC4BD:6AB92990"},"commit":{"sha":"127ccd35351a278a352e94bd8a742f35ae28ab46","url":"https://github.com/leggedrobotics/darknet_ros/commit/127ccd35351a278a352e94bd8a742f35ae28ab46","date":"2018-05-09T08:40:24Z","author_date":"2018-05-09T08:40:24Z","committer_date":"2018-05-09T08:40:24Z","tree_sha":"8a9c7c89e986810015b821a197021b3fdc0f6889","message_first_line":"Forgot to add image."},"tree_request_status":200,"tree_rate":{"github_remaining":"2966","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DD:3C4024:17F095D:1C118E4:6AB92990"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7903,"blob_sha":"bf01bb9afda60f8484e702f6512f89a56b8bf1c3","priority":0}],"documents":[{"path":"README.md","size":7903,"blob_sha":"bf01bb9afda60f8484e702f6512f89a56b8bf1c3","priority":0,"status":200,"text":"# YOLO V3 for ROS: Real-Time Object Detection for ROS\n\n## Overview\n\nThis is a ROS package developed for object detection in camera images. You only look once (YOLO) is a state-of-the-art, real-time object detection system. In the following ROS package you are able to use YOLO on GPU and CPU. The pre-trained model of the convolutional neural network is able to detect pre-trained classes including the data set from VOC and COCO (e.g. aeroplane, bicycle, bird, boat, bottle, bus, car, cat, chair, cow, dining table, dog, horse, motorbike, person, potted plant, sheep, sofa, train and tv monitor) or you can also create a network with your own detection objects. For more information about YOLO, Darknet, available training data and training YOLO see the following link: [YOLO: Real-Time Object Detection](http://pjreddie.com/darknet/yolo/).\n\nThe YOLO packages have been tested under ROS Kinetic and Ubuntu 16.04. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.\n\n**Author: Marko Bjelonic, marko.bjelonic@mavt.ethz.ch**\n\n**Affiliation: Robotic Systems Lab, ETH Zurich**\n\n![Darknet Ros example: Detection image](darknet_ros/doc/test_detection.png)\n![Darknet Ros example: Detection image](darknet_ros/doc/test_detection_anymal.png)\n\n## Citing\n\nThe YOLO methods used in this software are described in the paper: [You Only Look Once: Unified, Real-Time Object Detection](https://arxiv.org/abs/1506.02640).\n\n## Installation\n\n### Dependencies\n\nThis software is built on the Robotic Operating System ([ROS]), which needs to be [installed](http://wiki.ros.org) first. Additionally, YOLO for ROS depends on following software:\n\n- [OpenCV](http://opencv.org/) (computer vision library),\n- [boost](http://www.boost.org/) (c++ library),\n\n### Building\n\n[![Build Status](https://ci.leggedrobotics.com/buildStatus/icon?job=github_leggedrobotics/darknet_ros/master)](https://ci.leggedrobotics.com/job/github_leggedrobotics/job/darknet_ros/job/master/)\n\nIn order to install darknet_ros, clone the latest version using SSH (see [how to set up an SSH key](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html)) from this repository into your catkin workspace and compile the package using ROS.\n\n    cd catkin_workspace/src\n    git clone --recursive git@github.com:leggedrobotics/darknet_ros.git\n    cd ../\n\nTo maximize performance, make sure to build in *Release* mode. You can specify the build type by setting\n\n    catkin_make -DCMAKE_BUILD_TYPE=Release\n\nor using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)\n\n    catkin build darknet_ros -DCMAKE_BUILD_TYPE=Release\n\nDarknet on the CPU is fast (approximately 1.5 seconds on an Intel Core i7-6700HQ CPU @ 2.60GHz × 8) but it's like 500 times faster on GPU! You'll have to have an Nvidia GPU and you'll have to install CUDA. The CMakeLists.txt file automatically detects if you have CUDA installed or not. CUDA is a parallel computing platform and application programming interface (API) model created by Nvidia. If you do not have CUDA on your System the build process will switch to the CPU version of YOLO. If you are compiling with CUDA, you might receive the following build error:\n\n    nvcc fatal : Unsupported gpu architecture 'compute_61'.\n\nThis means that you need to check the compute capability (version) of your GPU. You can find a list of supported GPUs in CUDA here: [CUDA - WIKIPEDIA](https://en.wikipedia.org/wiki/CUDA#Supported_GPUs). Simply find the compute capability of your GPU and add it into darknet_ros/CMakeLists.txt. Simply add a similar line like\n\n    -O3 -gencode arch=compute_62,code=sm_62\n\n### Download weights\n\nThe yolo-voc.weights and tiny-yolo-voc.weights are downloaded automatically in the CMakeLists.txt file. If you need to download them again, go into the weights folder and download the two pre-trained weights from the COCO data set:\n\n    cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/\n    wget http://pjreddie.com/media/files/yolov2.weights\n    wget http://pjreddie.com/media/files/yolov2-tiny.weights\n\nAnd weights from the VOC data set can be found here:\n\n    wget http://pjreddie.com/media/files/yolov2-voc.weights\n    wget http://pjreddie.com/media/files/yolov2-tiny-voc.weights\n\nAnd the pre-trained weight from YOLO v3 can be found here:\n\n    wget http://pjreddie.com/media/files/yolov3-voc.weights\n    wget http://pjreddie.com/media/files/yolov3.weights\n\n### Use your own detection objects\n\nIn order to use your own detection objects you need to provide your weights and your cfg file inside the directories:\n\n    catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/\n    catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/cfg/\n\nIn addition, you need to create your config file for ROS where you define the names of the detection objects. You need to include it inside:\n\n    catkin_workspace/src/darknet_ros/darknet_ros/config/\n\nThen in the launch file you have to point to your new config file in the line:\n\n    <rosparam command=\"load\" ns=\"darknet_ros\" file=\"$(find darknet_ros)/config/your_config_file.yaml\"/>\n\n### Unit Tests\n\nRun the unit tests using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)\n\n    catkin build darknet_ros --no-deps --verbose --catkin-make-args run_tests\n\nYou will see the image above popping up.\n\n## Basic Usage\n\nIn order to get YOLO ROS: Real-Time Object Detection for ROS to run with your robot, you will need to adapt a few parameters. It is the easiest if duplicate and adapt all the parameter files that you need to change from the `darkned_ros` package. These are specifically the parameter files in `config` and the launch file from the `launch` folder.\n\n## Nodes\n\n### Node: darknet_ros\n\nThis is the main YOLO ROS: Real-Time Object Detection for ROS node. It uses the camera measurements to detect pre-learned objects in the frames.\n\n### ROS related parameters\n\nYou can change the names and other parameters of the publishers, subscribers and actions inside `darkned_ros/config/ros.yaml`.\n\n#### Subscribed Topics\n\n* **`/camera_reading`** ([sensor_msgs/Image])\n\n    The camera measurements.\n\n#### Published Topics\n\n* **`object_detector`** ([std_msgs::Int8])\n\n    Publishes the number of detected objects.\n\n* **`bounding_boxes`** ([darknet_ros_msgs::BoundingBoxes])\n\n    Publishes an array of bounding boxes that gives information of the position and size of the bounding box in pixel coordinates.\n\n* **`detection_image`** ([sensor_msgs::Image])\n\n    Publishes an image of the detection image including the bounding boxes.\n\n#### Actions\n\n* **`camera_reading`** ([sensor_msgs::Image])\n\n    Sends an action with an image and the result is an array of bounding boxes.\n\n### Detection related parameters\n\nYou can change the parameters that are related to the detection by adding a new config file that looks similar to `darkned_ros/config/yolo.yaml`.\n\n* **`image_view/enable_opencv`** (bool)\n\n    Enable or disable the open cv view of the detection image including the bounding boxes.\n\n* **`image_view/wait_key_delay`** (int)\n\n    Wait key delay in ms of the open cv window.\n\n* **`yolo_model/config_file/name`** (string)\n\n    Name of the cfg file of the network that is used for detection. The code searches for this name inside `darkned_ros/yolo_network_config/cfg/`.\n\n* **`yolo_model/weight_file/name`** (string)\n\n    Name of the weights file of the network that is used for detection. The code searches for this name inside `darkned_ros/yolo_network_config/weights/`.\n\n* **`yolo_model/threshold/value`** (float)\n\n    Threshold of the detection algorithm. It is defined between 0 and 1.\n\n* **`yolo_model/detection_classes/names`** (array of strings)\n\n    Detection names of the network used by the cfg and weights file inside `darkned_ros/yolo_network_config/`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C70:3BCC6:1753AC:5C91A2:6AB921E3"},"text_sha256":"56d3246cc92eff6033d21e2baa09d781f1ad5f6b589443e073c512496197b5af"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2965","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F7:14A1F2:17FF4C2:1C2057E:6AB92991"},"commit":{"sha":"1027a2806712918eea967da02f12c3d8c95af9db","url":"https://github.com/leggedrobotics/darknet_ros/commit/1027a2806712918eea967da02f12c3d8c95af9db","date":"2021-06-30T07:14:22Z","author_date":"2021-06-30T07:14:22Z","committer_date":"2021-06-30T07:14:22Z","tree_sha":"d449781cbaac79ab111d46492134c3f6687f8560","message_first_line":"Merge pull request #336 from kdhansen/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2964","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:1773DBC:1B931D3:6AB92991"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9587,"blob_sha":"4432a5f9bd03380d78bdbca2a4cf8da6e53af5d0","priority":0}],"documents":[{"path":"README.md","size":9587,"blob_sha":"4432a5f9bd03380d78bdbca2a4cf8da6e53af5d0","priority":0,"status":200,"text":"# YOLO ROS: Real-Time Object Detection for ROS\n\n## Overview\n\nThis is a ROS package developed for **object detection in camera images**. You only look once (YOLO) is a state-of-the-art, real-time object detection system. In the following ROS package you are able to use **YOLO (V3) on GPU and CPU**. The pre-trained model of the convolutional neural network is able to detect pre-trained classes including the data set from VOC and COCO, or you can also create a network with your own detection objects. For more information about YOLO, Darknet, available training data and training YOLO see the following link: [YOLO: Real-Time Object Detection](http://pjreddie.com/darknet/yolo/).\n\nThe YOLO packages have been tested under **ROS Noetic** and **Ubuntu 20.04**. Note: We also provide branches that work under **ROS Melodic**, **ROS Foxy** and **ROS2**.\n\nThis is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.\n\n**Author: [Marko Bjelonic](https://www.markobjelonic.com), marko.bjelonic@mavt.ethz.ch**\n\n**Affiliation: [Robotic Systems Lab](http://www.rsl.ethz.ch/), ETH Zurich**\n\n![Darknet Ros example: Detection image](darknet_ros/doc/test_detection.png)\n![Darknet Ros example: Detection image](darknet_ros/doc/test_detection_anymal.png)\n\nBased on the [Pascal VOC](https://pjreddie.com/projects/pascal-voc-dataset-mirror/) 2012 dataset, YOLO can detect the 20 Pascal object classes:\n\n- person\n- bird, cat, cow, dog, horse, sheep\n- aeroplane, bicycle, boat, bus, car, motorbike, train\n- bottle, chair, dining table, potted plant, sofa, tv/monitor\n\nBased on the [COCO](http://cocodataset.org/#home) dataset, YOLO can detect the 80 COCO object classes:\n\n- person\n- bicycle, car, motorbike, aeroplane, bus, train, truck, boat\n- traffic light, fire hydrant, stop sign, parking meter, bench\n- cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe\n- backpack, umbrella, handbag, tie, suitcase, frisbee, skis, snowboard, sports ball, kite, baseball bat, baseball glove, skateboard, surfboard, tennis racket\n- bottle, wine glass, cup, fork, knife, spoon, bowl\n- banana, apple, sandwich, orange, broccoli, carrot, hot dog, pizza, donut, cake\n- chair, sofa, pottedplant, bed, diningtable, toilet, tvmonitor, laptop, mouse, remote, keyboard, cell phone, microwave, oven, toaster, sink, refrigerator, book, clock, vase, scissors, teddy bear, hair drier, toothbrush\n\n## Citing\n\nThe YOLO methods used in this software are described in the paper: [You Only Look Once: Unified, Real-Time Object Detection](https://arxiv.org/abs/1506.02640).\n\nIf you are using YOLO V3 for ROS, please add the following citation to your publication:\n\nM. Bjelonic\n**\"YOLO ROS: Real-Time Object Detection for ROS\"**,\nURL: https://github.com/leggedrobotics/darknet_ros, 2018.\n\n    @misc{bjelonicYolo2018,\n      author = {Marko Bjelonic},\n      title = {{YOLO ROS}: Real-Time Object Detection for {ROS}},\n      howpublished = {\\url{https://github.com/leggedrobotics/darknet_ros}},\n      year = {2016--2018},\n    }\n\n## Installation\n\n### Dependencies\n\nThis software is built on the Robotic Operating System ([ROS]), which needs to be [installed](http://wiki.ros.org) first. Additionally, YOLO for ROS depends on following software:\n\n- [OpenCV](http://opencv.org/) (computer vision library),\n- [boost](http://www.boost.org/) (c++ library),\n\n### Building\n\n[![Build Status](https://ci.leggedrobotics.com/buildStatus/icon?job=github_leggedrobotics/darknet_ros/master)](https://ci.leggedrobotics.com/job/github_leggedrobotics/job/darknet_ros/job/master/)\n\nIn order to install darknet_ros, clone the latest version using SSH (see [how to set up an SSH key](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html)) from this repository into your catkin workspace and compile the package using ROS.\n\n    cd catkin_workspace/src\n    git clone --recursive git@github.com:leggedrobotics/darknet_ros.git\n    cd ../\n\nTo maximize performance, make sure to build in *Release* mode. You can specify the build type by setting\n\n    catkin_make -DCMAKE_BUILD_TYPE=Release\n\nor using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)\n\n    catkin build darknet_ros -DCMAKE_BUILD_TYPE=Release\n\nDarknet on the CPU is fast (approximately 1.5 seconds on an Intel Core i7-6700HQ CPU @ 2.60GHz × 8) but it's like 500 times faster on GPU! You'll have to have an Nvidia GPU and you'll have to install CUDA. The CMakeLists.txt file automatically detects if you have CUDA installed or not. CUDA is a parallel computing platform and application programming interface (API) model created by Nvidia. If you do not have CUDA on your System the build process will switch to the CPU version of YOLO. If you are compiling with CUDA, you might receive the following build error:\n\n    nvcc fatal : Unsupported gpu architecture 'compute_61'.\n\nThis means that you need to check the compute capability (version) of your GPU. You can find a list of supported GPUs in CUDA here: [CUDA - WIKIPEDIA](https://en.wikipedia.org/wiki/CUDA#Supported_GPUs). Simply find the compute capability of your GPU and add it into darknet_ros/CMakeLists.txt. Simply add a similar line like\n\n    -O3 -gencode arch=compute_62,code=sm_62\n\n### Download weights\n\nThe yolo-voc.weights and tiny-yolo-voc.weights are downloaded automatically in the CMakeLists.txt file. If you need to download them again, go into the weights folder and download the two pre-trained weights from the COCO data set:\n\n    cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/\n    wget http://pjreddie.com/media/files/yolov2.weights\n    wget http://pjreddie.com/media/files/yolov2-tiny.weights\n\nAnd weights from the VOC data set can be found here:\n\n    wget http://pjreddie.com/media/files/yolov2-voc.weights\n    wget http://pjreddie.com/media/files/yolov2-tiny-voc.weights\n\nAnd the pre-trained weight from YOLO v3 can be found here:\n\n    wget http://pjreddie.com/media/files/yolov3-tiny.weights\n    wget http://pjreddie.com/media/files/yolov3.weights\n\nThere are more pre-trained weights from different data sets reported [here](https://pjreddie.com/darknet/yolo/).\n\n### Use your own detection objects\n\nIn order to use your own detection objects you need to provide your weights and your cfg file inside the directories:\n\n    catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/\n    catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/cfg/\n\nIn addition, you need to create your config file for ROS where you define the names of the detection objects. You need to include it inside:\n\n    catkin_workspace/src/darknet_ros/darknet_ros/config/\n\nThen in the launch file you have to point to your new config file in the line:\n\n    <rosparam command=\"load\" ns=\"darknet_ros\" file=\"$(find darknet_ros)/config/your_config_file.yaml\"/>\n\n### Unit Tests\n\nRun the unit tests using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)\n\n    catkin build darknet_ros --no-deps --verbose --catkin-make-args run_tests\n\nYou will see the image above popping up.\n\n## Basic Usage\n\nIn order to get YOLO ROS: Real-Time Object Detection for ROS to run with your robot, you will need to adapt a few parameters. It is the easiest if duplicate and adapt all the parameter files that you need to change from the `darknet_ros` package. These are specifically the parameter files in `config` and the launch file from the `launch` folder.\n\n## Nodes\n\n### Node: darknet_ros\n\nThis is the main YOLO ROS: Real-Time Object Detection for ROS node. It uses the camera measurements to detect pre-learned objects in the frames.\n\n### ROS related parameters\n\nYou can change the names and other parameters of the publishers, subscribers and actions inside `darknet_ros/config/ros.yaml`.\n\n#### Subscribed Topics\n\n* **`/camera_reading`** ([sensor_msgs/Image])\n\n    The camera measurements.\n\n#### Published Topics\n\n* **`object_detector`** ([std_msgs::Int8])\n\n    Publishes the number of detected objects.\n\n* **`bounding_boxes`** ([darknet_ros_msgs::BoundingBoxes])\n\n    Publishes an array of bounding boxes that gives information of the position and size of the bounding box in pixel coordinates.\n\n* **`detection_image`** ([sensor_msgs::Image])\n\n    Publishes an image of the detection image including the bounding boxes.\n\n#### Actions\n\n* **`camera_reading`** ([sensor_msgs::Image])\n\n    Sends an action with an image and the result is an array of bounding boxes.\n\n### Detection related parameters\n\nYou can change the parameters that are related to the detection by adding a new config file that looks similar to `darknet_ros/config/yolo.yaml`.\n\n* **`image_view/enable_opencv`** (bool)\n\n    Enable or disable the open cv view of the detection image including the bounding boxes.\n\n* **`image_view/wait_key_delay`** (int)\n\n    Wait key delay in ms of the open cv window.\n\n* **`yolo_model/config_file/name`** (string)\n\n    Name of the cfg file of the network that is used for detection. The code searches for this name inside `darknet_ros/yolo_network_config/cfg/`.\n\n* **`yolo_model/weight_file/name`** (string)\n\n    Name of the weights file of the network that is used for detection. The code searches for this name inside `darknet_ros/yolo_network_config/weights/`.\n\n* **`yolo_model/threshold/value`** (float)\n\n    Threshold of the detection algorithm. It is defined between 0 and 1.\n\n* **`yolo_model/detection_classes/names`** (array of strings)\n\n    Detection names of the network used by the cfg and weights file inside `darknet_ros/yolo_network_config/`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C29A:324E19:17B7AC:5CF5E5:6AB921E5"},"text_sha256":"9b60174df48c4d8648f00c402a4b7c903389a058772e452e44e2c734d94fd11e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tryolabs/luminoth","input_row":{"repository":"tryolabs/luminoth","url":"https://github.com/tryolabs/luminoth","name":"luminoth","owner":"tryolabs","description":"Deep Learning toolkit for Computer Vision.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2405,"issues":181,"created_at":"2017-02-16T15:07:46Z","updated_at":"2026-09-27T14:06:13Z","first_commit_at":"2017-01-25T19:06:15Z","last_commit_at":"2020-01-07T20:53:25Z","activity_months":35.380000000000003,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:34:58.611Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tryolabs/luminoth","visibility":"public","created_at":"2017-02-16T15:07:46Z","updated_at":"2026-09-27T14:06:13Z","private":false,"fork":false,"archived":false,"stargazers_count":2405,"open_issues_count":62,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2963","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B5:62B94:17AFCB6:1BD0A7B:6AB92992"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2962","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:1773E69:1B93292:6AB92993"},"commit":{"sha":"7da6a0d12fdcec21f9bbdf51690f29f2ca7250dd","url":"https://github.com/tryolabs/luminoth/commit/7da6a0d12fdcec21f9bbdf51690f29f2ca7250dd","date":"2018-05-24T14:58:46Z","author_date":"2018-05-18T19:05:45Z","committer_date":"2018-05-24T14:58:46Z","tree_sha":"2503351043ee651deb9c1e6682dac678eb75fe14","message_first_line":"Update OpenImages reader for Open Images V4"},"tree_request_status":200,"tree_rate":{"github_remaining":"2961","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0929:DC698:17E6FBD:1C076DA:6AB92993"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4014,"blob_sha":"484d32e63f81b80cef40205579ebf3d64284446f","priority":0}],"documents":[{"path":"README.md","size":4014,"blob_sha":"484d32e63f81b80cef40205579ebf3d64284446f","priority":0,"status":200,"text":"[![Luminoth](https://user-images.githubusercontent.com/270983/31414425-c12314d2-ae15-11e7-8cc9-42d330b03310.png)](https://luminoth.ai)\n========\n\n[![Build Status](https://travis-ci.org/tryolabs/luminoth.svg?branch=master)](https://travis-ci.org/tryolabs/luminoth)\n[![Documentation Status](https://readthedocs.org/projects/luminoth/badge/?version=latest)](http://luminoth.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/tryolabs/luminoth/branch/master/graph/badge.svg)](https://codecov.io/gh/tryolabs/luminoth)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nLuminoth is an open source toolkit for **computer vision**. Currently, we support object detection, but we are aiming for much more. It is built in Python, using [TensorFlow](https://www.tensorflow.org/) and [Sonnet](https://github.com/deepmind/sonnet).\n\nRead the full documentation [here](http://luminoth.readthedocs.io/).\n\n![Example of Object Detection with Faster R-CNN](https://user-images.githubusercontent.com/1590959/36434494-e509be42-163d-11e8-99c1-d1aa728929ec.jpg)\n\n> **DISCLAIMER**: Luminoth is still alpha-quality release, which means the internal and external interfaces (such as command line) are very likely to change as the codebase matures.\n\n# Installation\nLuminoth currently supports Python 2.7 and 3.4–3.6.\n\n## Pre-requisites\nIf you want **GPU support**, you should install the GPU version of [TensorFlow](https://www.tensorflow.org/install/).\nIf TensorFlow is is already installed, Luminoth will use that version (no matter if CPU or GPU versions).\n\n## Installing Luminoth\nJust install from PyPI:\n\n```bash\n$ pip install luminoth\n```\n\n## Installing from source\n\nFirst, clone the repo on your machine and then install with `pip`:\n\n```\n$ git clone https://github.com/tryolabs/luminoth.git\n$ cd luminoth\n$ pip install -e .\n```\n\n## Check that the installation worked\n\nSimply run `lumi --help`.\n\n# Supported models\n\nCurrently, we support the following models:\n\n* **Object Detection**\n    * [Faster R-CNN](https://arxiv.org/abs/1506.01497)\n    * [SSD](https://arxiv.org/abs/1512.02325)\n\nWe are planning on adding support for more models in the near future, such as [RetinaNet](https://arxiv.org/abs/1708.02002) and [Mask R-CNN](https://arxiv.org/abs/1703.06870).\n\nWe also provide **pre-trained checkpoints** for the above models trained on popular datasets such as [COCO](http://cocodataset.org/) and [Pascal](http://host.robots.ox.ac.uk/pascal/VOC/).\n\n# Usage\n\nThere is one main command line interface which you can use with the `lumi` command. Whenever you are confused on how you are supposed to do something just type:\n\n`lumi --help` or `lumi <subcommand> --help`\n\nand a list of available options with descriptions will show up.\n\n## Working with datasets\nSee [Adapting a dataset](http://luminoth.readthedocs.io/en/latest/usage/dataset.html).\n\n## Training\n\nSee [Training your own model](http://luminoth.readthedocs.io/en/latest/usage/training.html) to learn how to train locally or in Google Cloud.\n\n## Visualizing results\n\nWe strive to get useful and understandable summary and graph visualizations. We consider them to be essential not only for monitoring (duh!), but for getting a broader understanding of what's going under the hood. The same way it is important for code to be understandable and easy to follow, the computation graph should be as well.\n\nBy default summary and graph logs are saved to `jobs/` under the current directory. You can use TensorBoard by running:\n\n```\ntensorboard --logdir path/to/jobs\n```\n\n## Why the name?\n> The Dark Visor is a Visor upgrade in Metroid Prime 2: Echoes. Designed by the **Luminoth** during the war, it was used by the Champion of Aether, A-Kul, to penetrate Dark Aether's haze in battle against the Ing.\n>\n> -- [Dark Visor - Wikitroid](http://metroid.wikia.com/wiki/Dark_Visor)\n>\n\n# License\nCopyright © 2018, [Tryolabs](https://tryolabs.com).\nReleased under the [BSD 3-Clause](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E74:35EBC:172E69:5C6CAD:6AB921E7"},"text_sha256":"796924410e7b45d972a85dc43a962e7edb818dd2373124e60a6c4c4c258b65e2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2960","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:17EEFF8:1C10078:6AB92993"},"commit":{"sha":"9109d8b98bcbb0ad4e8e0c928da0b20627fa774f","url":"https://github.com/tryolabs/luminoth/commit/9109d8b98bcbb0ad4e8e0c928da0b20627fa774f","date":"2020-01-07T20:53:25Z","author_date":"2020-01-07T20:47:23Z","committer_date":"2020-01-07T20:53:25Z","tree_sha":"631237443899af58f97043f87e7346d27dfaee96","message_first_line":"Maintenance note."},"tree_request_status":200,"tree_rate":{"github_remaining":"2959","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CC:76AED:17E4489:1C056B1:6AB92994"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4655,"blob_sha":"6031b352b56baf9dd707de438f59515d4961f0b2","priority":0}],"documents":[{"path":"README.md","size":4655,"blob_sha":"6031b352b56baf9dd707de438f59515d4961f0b2","priority":0,"status":200,"text":"[![Luminoth](https://user-images.githubusercontent.com/270983/31414425-c12314d2-ae15-11e7-8cc9-42d330b03310.png)](https://luminoth.ai)\n\n---\n\n**(Jan 2020) Luminoth is not maintained anymore**. We recommend switching to Facebook's [Detectron2](https://github.com/facebookresearch/detectron2), which implements more modern algorithms supporting additional use cases.\n\n---\n\n[![Build Status](https://travis-ci.org/tryolabs/luminoth.svg?branch=master)](https://travis-ci.org/tryolabs/luminoth)\n[![Documentation Status](https://readthedocs.org/projects/luminoth/badge/?version=latest)](http://luminoth.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/tryolabs/luminoth/branch/master/graph/badge.svg)](https://codecov.io/gh/tryolabs/luminoth)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nLuminoth is an open source toolkit for **computer vision**. Currently, we support object detection, but we are aiming for much more. It is built in Python, using [TensorFlow](https://www.tensorflow.org/) and [Sonnet](https://github.com/deepmind/sonnet).\n\nRead the full documentation [here](http://luminoth.readthedocs.io/).\n\n![Example of Object Detection with Faster R-CNN](https://user-images.githubusercontent.com/1590959/36434494-e509be42-163d-11e8-99c1-d1aa728929ec.jpg)\n\n> **DISCLAIMER**: Luminoth is still alpha-quality release, which means the internal and external interfaces (such as command line) are very likely to change as the codebase matures.\n\n# Installation\n\nLuminoth currently supports Python 2.7 and 3.4–3.6.\n\n## Pre-requisites\n\nTo use Luminoth, [TensorFlow](https://www.tensorflow.org/install/) must be installed beforehand. If you want **GPU support**, you should install the GPU version of TensorFlow with `pip install tensorflow-gpu`, or else you can use the CPU version using `pip install tensorflow`.\n\n## Installing Luminoth\n\nJust install from PyPI:\n\n```bash\npip install luminoth\n```\n\nOptionally, Luminoth can also install TensorFlow for you if you install it with `pip install luminoth[tf]` or `pip install luminoth[tf-gpu]`, depending on the version of TensorFlow you wish to use.\n\n### Google Cloud\n\nIf you wish to train using **Google Cloud ML Engine**, the optional dependencies must be installed:\n\n```bash\npip install luminoth[gcloud]\n```\n\n## Installing from source\n\nFirst, clone the repo on your machine and then install with `pip`:\n\n```bash\ngit clone https://github.com/tryolabs/luminoth.git\ncd luminoth\npip install -e .\n```\n\n## Check that the installation worked\n\nSimply run `lumi --help`.\n\n# Supported models\n\nCurrently, we support the following models:\n\n* **Object Detection**\n  * [Faster R-CNN](https://arxiv.org/abs/1506.01497)\n  * [SSD](https://arxiv.org/abs/1512.02325)\n\nWe are planning on adding support for more models in the near future, such as [RetinaNet](https://arxiv.org/abs/1708.02002) and [Mask R-CNN](https://arxiv.org/abs/1703.06870).\n\nWe also provide **pre-trained checkpoints** for the above models trained on popular datasets such as [COCO](http://cocodataset.org/) and [Pascal](http://host.robots.ox.ac.uk/pascal/VOC/).\n\n# Usage\n\nThere is one main command line interface which you can use with the `lumi` command. Whenever you are confused on how you are supposed to do something just type:\n\n`lumi --help` or `lumi <subcommand> --help`\n\nand a list of available options with descriptions will show up.\n\n## Working with datasets\n\nSee [Adapting a dataset](http://luminoth.readthedocs.io/en/latest/usage/dataset.html).\n\n## Training\n\nSee [Training your own model](http://luminoth.readthedocs.io/en/latest/usage/training.html) to learn how to train locally or in Google Cloud.\n\n## Visualizing results\n\nWe strive to get useful and understandable summary and graph visualizations. We consider them to be essential not only for monitoring (duh!), but for getting a broader understanding of what's going under the hood. The same way it is important for code to be understandable and easy to follow, the computation graph should be as well.\n\nBy default summary and graph logs are saved to `jobs/` under the current directory. You can use TensorBoard by running:\n\n```bash\ntensorboard --logdir path/to/jobs\n```\n\n## Why the name?\n\n> The Dark Visor is a Visor upgrade in Metroid Prime 2: Echoes. Designed by the **Luminoth** during the war, it was used by the Champion of Aether, A-Kul, to penetrate Dark Aether's haze in battle against the Ing.\n>\n> -- [Dark Visor - Wikitroid](http://metroid.wikia.com/wiki/Dark_Visor)\n>\n\n# License\n\nCopyright © 2018, [Tryolabs](https://tryolabs.com).\nReleased under the [BSD 3-Clause](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6000:3BF56:16FCF0:5C3BAC:6AB921E8"},"text_sha256":"8e16489b914241ba737bd513bccead93319582bf1331d3e2ec0ab7a71caf07a8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"asyml/texar","input_row":{"repository":"asyml/texar","url":"https://github.com/asyml/texar","name":"texar","owner":"asyml","description":"Toolkit for Machine Learning, Natural Language Processing, and Text Generation, in TensorFlow.  This is part of the CASL project: http://casl-project.ai/","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2389,"issues":159,"created_at":"2017-07-22T19:02:05Z","updated_at":"2026-09-17T12:50:41Z","first_commit_at":"2017-07-22T19:02:05Z","last_commit_at":"2026-07-21T02:23:58Z","activity_months":107.93000000000001,"ai_ml_match_topics":"deep-learning; machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:01.089Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"asyml/texar","visibility":"public","created_at":"2017-07-22T19:02:05Z","updated_at":"2026-09-17T12:50:41Z","private":false,"fork":false,"archived":false,"stargazers_count":2389,"open_issues_count":40,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2958","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D0:72BD3:17EA235:1C0B0F5:6AB92995"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2957","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0799:228A99:17D881A:1BF9886:6AB92995"},"commit":{"sha":"253715d11b77e8f29daf1e541247edb1f11ebb80","url":"https://github.com/asyml/texar/commit/253715d11b77e8f29daf1e541247edb1f11ebb80","date":"2018-05-22T03:49:25Z","author_date":"2018-05-22T03:49:25Z","committer_date":"2018-05-22T03:49:25Z","tree_sha":"fd5f7fcfb58640e77e25c17a8b7760101db8c970","message_first_line":"add language_model_memory_network"},"tree_request_status":200,"tree_rate":{"github_remaining":"2956","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:17D2D8A:1BF3BC2:6AB92995"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1703,"blob_sha":"cac189554e95f9c3a84b49d7ae73ef60aea231f8","priority":0}],"documents":[{"path":"README.md","size":1703,"blob_sha":"cac189554e95f9c3a84b49d7ae73ef60aea231f8","priority":0,"status":200,"text":"# Open library of text generation #\n\n# Install\n\n  * Run the following: \n    ```bash\n    pip install [--user] -e .    \n    ```\n\n  * After installation, the library is ready to use. E.g., \n    - Run the example code in `./examples`:\n      ```bash\n      python ./examples/language_model.py\n      ```\n    - Run unit tests, e.g.,\n      ```bash\n      python ./texar/modules/encoders/rnn_encoders_test.py\n      ```\n\n# Code style\n\n  * Follow [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)\n    \n    - E.g., Maximum line length is *80 characters*.\n\n  * Use [Pylint](https://www.pylint.org) for automatic code style check\n\n    - [Pylint intro (in Chinese)](https://www.ibm.com/developerworks/cn/linux/l-cn-pylint/index.html)\n\n    - Setup Pylint in your IDE, or use the cmd like this: \n      ``` bash\n      pylint --reports=n --include-ids=y --rcfile=.pylintrc foo.py\n      ```\n  * Follow [Google Python DocString style](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) \n  for code comments. \n\n    - [Pytorch documentation](http://pytorch.org/docs/master/nn.html#parameters) \n    gives a great example of writing docstrings\n\n## View Documentation\nTxtGen uses [Sphinx](http://www.sphinx-doc.org/en/stable/index.html)\nto automatically generate beautiful documentations. \n\nInstall Sphinx:\n\n    apt-get install python-sphinx\n\nGenerate HTML:\n\n    cd ./doc\n    make html\n\nView HTML\n\n    open ./doc/_build/index.html\n\n# Reference libraries\n\n  * [seq2seq](https://github.com/google/seq2seq)\n\n  * [tensorforce](https://github.com/reinforceio/tensorforce)\n\n  * [sonnet](https://github.com/deepmind/sonnet)\n\n  * [tensorflow](https://github.com/tensorflow/tensorflow)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E612:18233:1742A7:5C804B:6AB921E9"},"text_sha256":"07a365d697c20a1a56131a1f244bcf767a162f106fb44029be8bb12e8a22474f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2955","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B3:767EB:17E38F0:1C04E8D:6AB92996"},"commit":{"sha":"a23f021dae289a3d768dc099b220952111da04fd","url":"https://github.com/asyml/texar/commit/a23f021dae289a3d768dc099b220952111da04fd","date":"2020-07-29T00:38:30Z","author_date":"2020-07-29T00:38:30Z","committer_date":"2020-07-29T00:38:30Z","tree_sha":"9ed497910d2afa02c480465b456424d5d754da27","message_first_line":"duplicate object description"},"tree_request_status":200,"tree_rate":{"github_remaining":"2954","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0915:3C4024:17F0D67:1C11DC1:6AB92996"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7354,"blob_sha":"2df99a3268b5bc2b8ab2f253ef165b11e24bff16","priority":0}],"documents":[{"path":"README.md","size":7354,"blob_sha":"2df99a3268b5bc2b8ab2f253ef165b11e24bff16","priority":0,"status":200,"text":"<div align=\"center\">\n   <img src=\"./docs/_static/img/logo_h_035.png\"><br><br>\n<\/div>\n \n-----------------\n\n\n[![pypi](https://img.shields.io/pypi/v/texar.svg)](https://pypi.python.org/pypi/texar)\n[![Build Status](https://travis-ci.org/asyml/texar.svg?branch=master)](https://travis-ci.org/asyml/texar)\n[![codecov](https://codecov.io/gh/asyml/texar/branch/master/graph/badge.svg)](https://codecov.io/gh/asyml/texar)\n[![Documentation Status](https://readthedocs.org/projects/texar/badge/?version=latest)](https://texar.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/asyml/texar/blob/master/LICENSE)\n \n\n**Texar** is a toolkit aiming to support a broad set of machine learning, especially natural language processing and text generation tasks. Texar provides a library of easy-to-use ML modules and functionalities for composing whatever models and algorithms. The tool is designed for both researchers and practitioners for fast prototyping and experimentation.\n\nTexar was originally developed and is \nactively contributed by [Petuum](https://petuum.com/) and [CMU](https://www.cmu.edu/) in collaboration with other institutes.\nA mirror of this repository is maintained by [Petuum Open Source](https://github.com/petuum).\n\n### Key Features\n* **Two Versions, (Mostly) Same Interfaces**. Texar-TensorFlow (this repo) and **[Texar-PyTorch](https://github.com/asyml/texar-pytorch)** have mostly the same interfaces. Both further combine the best design of TF and PyTorch:\n  - Interfaces and variable sharing in *PyTorch convention*\n  - Excellent factorization and rich functionalities in *TF convention*.\n* **Rich Pre-trained Models, Rich Usage with Uniform Interfaces**. BERT, GPT2, XLNet, etc, for encoding, classification, generation, and composing complex models with other Texar components!\n* **Fully Customizable** at multiple abstraction level -- both novice-friendly and expert-friendly. \n  - Free to plug in whatever external modules, since Texar is fully compatible with the native TF/PyTorch APIs. \n* **Versatile** to support broad tasks, models, algorithms, data processing, evaluation, etc. \n   - encoder(s) to decoder(s), sequential- and self-attentions, memory, hierarchical models, classifiers... \n   - maximum likelihood learning, reinforcement learning, adversarial learning, probabilistic modeling, ... \n* **Modularized** for maximal re-use and clean APIs, based on principled decomposition of *Learning-Inference-Model Architecture*. \n* **Distributed** model training with multiple GPUs.\n* Clean, detailed [documentation](https://texar.readthedocs.io) and rich [examples](./examples).\n\n\n<div align=\"center\">\n   <img src=\"./docs/_static/img/texar_stack.png\"><br><br>\n<\/div> \n\n### Library API Example\nBuilds an encoder-decoder model, with maximum likelihood learning:\n```python\nimport texar.tf as tx\n\n# Data \ndata = tx.data.PairedTextData(hparams=hparams_data) # a dict of hyperparameters \niterator = tx.data.DataIterator(data)\nbatch = iterator.get_next()                         # get a data mini-batch\n\n# Model architecture\nembedder = tx.modules.WordEmbedder(data.target_vocab.size, hparams=hparams_emb)\nencoder = tx.modules.TransformerEncoder(hparams=hparams_enc)\noutputs_enc = encoder(inputs=embedder(batch['source_text_ids']),  # call as a function\n                      sequence_length=batch['source_length'])\n                      \ndecoder = tx.modules.TransformerDecoder(\n    output_layer=tf.transpose(embedder.embedding) # tie input embedding w/ output layer\n    hparams=hparams_decoder)\noutputs, _, _ = decoder(memory=output_enc, \n                        memory_sequence_length=batch['source_length'],\n                        inputs=embedder(batch['target_text_ids']),\n                        sequence_length=batch['target_length']-1,\n                        decoding_strategy='greedy_train')    # teacher-forcing decoding\n                        \n# Loss for maximum likelihood learning\nloss = tx.losses.sequence_sparse_softmax_cross_entropy(\n    labels=batch['target_text_ids'][:, 1:],\n    logits=outputs.logits,\n    sequence_length=batch['target_length']-1)  # automatic sequence masks\n\n# Beam search decoding\noutputs_bs, _, _ = tx.modules.beam_search_decode(\n    decoder,\n    embedding=embedder,\n    start_tokens=[data.target_vocab.bos_token_id]*num_samples,\n    end_token=data.target_vocab.eos_token_id)\n```\nThe same model, but with adversarial learning:\n```python\nhelper = tx.modules.GumbelSoftmaxTraingHelper( # Gumbel-softmax decoding\n    start_tokens=[BOS]*batch_size, end_token=EOS, embedding=embedder)\noutputs, _ = decoder(helper=helper)            # automatic re-use of the decoder variables\n\ndiscriminator = tx.modules.BertClassifier(hparams=hparams_bert)        # pre-trained model\n\nG_loss, D_loss = tx.losses.binary_adversarial_losses(\n    real_data=data['target_text_ids'][:, 1:],\n    fake_data=outputs.sample_id,\n    discriminator_fn=discriminator)\n```\nThe same model, but with RL policy gradient learning:\n```python\nagent = tx.agents.SeqPGAgent(samples=outputs.sample_id,\n                             logits=outputs.logits,\n                             sequence_length=batch['target_length']-1,\n                             hparams=config_model.agent)\n```\nMany more examples are available [here](./examples)\n  \n### Installation\n\n**(Note: Texar>0.2.3 requires Python 3.6 or 3.7. To use with older Python versions, please use Texar<=0.2.3)**\n\nTexar requires:\n\n* `tensorflow >= 1.10.0 (but < 2.0.0)`. Follow the [tensorflow official instructions](https://www.tensorflow.org/install) to install the appropriate version\n* `tensorflow_probability >= 0.3.0 (but < 0.8.0)`. Follow the [tensorflow_probability official instractions](https://www.tensorflow.org/probability/install) to install.\n\nAfter `tensorflow` and `tensorflow_probability` are installed, install Texar from PyPI: \n```bash\npip install texar\n```\n\nTo use cutting-edge features or develop locally, install from source: \n```\ngit clone https://github.com/asyml/texar.git\ncd texar\npip install .\n```\n\n### Getting Started\n* [Examples](./examples)\n* [Documentation](https://texar.readthedocs.io)\n\n### Reference\nIf you use Texar, please cite the [tech report](https://arxiv.org/abs/1809.00794) with the following BibTex entry:\n```\nTexar: A Modularized, Versatile, and Extensible Toolkit for Text Generation\nZhiting Hu, Haoran Shi, Bowen Tan, Wentao Wang, Zichao Yang, Tiancheng Zhao, Junxian He, Lianhui Qin, Di Wang, Xuezhe Ma, Zhengzhong Liu, Xiaodan Liang, Wanrong Zhu, Devendra Sachan and Eric Xing\nACL 2019\n\n@inproceedings{hu2019texar,\n  title={Texar: A Modularized, Versatile, and Extensible Toolkit for Text Generation},\n  author={Hu, Zhiting and Shi, Haoran and Tan, Bowen and Wang, Wentao and Yang, Zichao and Zhao, Tiancheng and He, Junxian and Qin, Lianhui and Wang, Di and others},\n  booktitle={ACL 2019, System Demonstrations},\n  year={2019}\n}\n```\n\n### License\n[Apache License 2.0](./LICENSE)\n\n### Companies and Universities Supporting Texar\n<p float=\"left\">\n   <img src=\"https://github.com/asyml/texar/blob/master/docs/_static/img/Petuum.png\" width=\"200\" align=\"top\">\n   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n   <img src=\"https://asyml.io/assets/institutions/cmu.png\", width=\"200\" align=\"top\">\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:175408:5C92C9:6AB921EB"},"text_sha256":"7cdad85acc2469580c68bbd46653ef4ab3e182eb055b278d587b2d1d9af0ec2f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"azavea/raster-vision","input_row":{"repository":"azavea/raster-vision","url":"https://github.com/azavea/raster-vision","name":"raster-vision","owner":"azavea","description":"An open source library and framework for deep learning on satellite and aerial imagery.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2242,"issues":706,"created_at":"2017-02-02T14:31:54Z","updated_at":"2026-09-17T05:48:08Z","first_commit_at":"2017-02-02T14:46:31Z","last_commit_at":"2026-06-04T14:55:56Z","activity_months":111.98999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:03.681Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"azavea/raster-vision","visibility":"public","created_at":"2017-02-02T14:31:54Z","updated_at":"2026-09-17T05:48:08Z","private":false,"fork":false,"archived":false,"stargazers_count":2242,"open_issues_count":45,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2953","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:1775394:1B963B6:6AB92997"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2952","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17B47DF:1BD4D1F:6AB92998"},"commit":{"sha":"d6b093dcabe68c25848f39001eb946eddd1f3fdc","url":"https://github.com/azavea/raster-vision/commit/d6b093dcabe68c25848f39001eb946eddd1f3fdc","date":"2018-05-24T23:41:41Z","author_date":"2018-05-24T23:41:41Z","committer_date":"2018-05-24T23:41:41Z","tree_sha":"dfc09c203889b26fad153fbf7c61f5afa67ef260","message_first_line":"Merge pull request #215 from azavea/rde/travis-quay"},"tree_request_status":200,"tree_rate":{"github_remaining":"2951","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E5:A9DC0:17AD8EC:1BCE5DF:6AB92998"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4461,"blob_sha":"f9be7340cc347f77676cdbcb9c74ef80e8b140cb","priority":0}],"documents":[{"path":"README.md","size":4461,"blob_sha":"f9be7340cc347f77676cdbcb9c74ef80e8b140cb","priority":0,"status":200,"text":"# Raster Vision\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Join the chat at https://gitter.im/azavea/raster-vision](https://badges.gitter.im/azavea/raster-vision.svg)](https://gitter.im/azavea/raster-vision?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Docker Repository on Quay](https://quay.io/repository/azavea/raster-vision/status \"Docker Repository on Quay\")](https://quay.io/repository/azavea/raster-vision)\n\n*Note: this project is under development and may be difficult to use at the moment.*\n\nThe overall goal of Raster Vision is to make it easy to train and run deep learning models over aerial and satellite imagery. At the moment, it includes functionality for making training data, training models, making predictions, and evaluating models for the task of object detection implemented via the Tensorflow Object Detection API.  It also supports running experimental workflows using AWS Batch. The library is designed to be easy to extend to new data sources, machine learning tasks, and machine learning implementation.\n\nOur future work includes:\n* more documentation and unit tests\n* scalable predictions using parallelism\n* classification and segmentation\n\nWe are shooting for a first release in Summer 2018.\n\nWhy do we need yet another deep learning library? In traditional object detection, each image is a small PNG file and contains a few objects. In contrast, when working with satellite and aerial imagery, each image is a set of very large GeoTIFF files and contains hundreds of objects that are sparsely distributed. In addition, annotations and predictions are represented in geospatial coordinates using GeoJSON files.\n\n### Documentation\n* [Setup](docs/setup.md)\n* [Object Detection Tutorial](docs/object-detection.md)\n* [Update AMI](docs/vagrant-ami.md)\n\n### Contact and Support\n\nYou can find more information and talk to developers (let us know what you're working on!) at:\n* [Gitter](https://gitter.im/azavea/raster-vision)\n* [Mailing List](https://groups.google.com/forum/#!forum/raster-vision)\n\n### Previous work on semantic segmentation and tagging\n\nIn the past, we developed prototypes for semantic segmentation and tagging in this repo, which were discussed in our [segmentation ](https://www.azavea.com/blog/2017/05/30/deep-learning-on-aerial-imagery/), and [tagging](https://www.azavea.com/blog/2018/01/03/amazon-deep-learning/) blog posts. This implementation has been removed from the `develop` branch and is unsupported, but can still be found at [this tag](https://github.com/azavea/raster-vision/releases/tag/old-semseg-tagging).\nSimilarly, an outdated prototype of object detection can be found at [this tag](https://github.com/azavea/raster-vision/releases/tag/old-object-detection) under the `rv` module.\n\n### Docker images\n\nRaster Vision is publishing docker images to [quay.io](https://quay.io/repository/azavea/raster-vision).\nThe tag for the `raster-vision` image determines what type of image it is:\n- The `cpu-*` tags are for running the CPU containers.\n- The `gpu-*` tags are for running the GPU containers.\n\nWe publish a new tag per merge into `develop`, which is tagged with the first 7 characters of the commit hash.\nTo use the latest version, pull the `latest` suffix, e.g. `raster-vision:gpu-latest`.\nGit tags are also published, with the github tag name as the docker tag suffix.\n\n### Contributing\n\nWe are happy to take contributions! It is best to get in touch with the maintainers\nabout larger features or design changes *before* starting the work,\nas it will make the process of accepting changes smoother.\n\nEveryone who contributes code to Raster Vision will be asked to sign the\nAzavea CLA, which is based off of the Apache CLA.\n\n1. Download a copy of the [Raster Vision Individual Contributor License\n   Agreement](docs/cla/2018_04_17-Raster-Vision-Open-Source-Contributor-Agreement-Individual.pdf)\n   or the [Raster Vision Corporate Contributor License\n   Agreement](docs/cla/2018_04_18-Raster-Vision-Open-Source-Contributor-Agreement-Corporate.pdf)\n\n2. Print out the CLAs and sign them, or use PDF software that allows placement of a signature image.\n\n3. Send the CLAs to Azavea by one of:\n  - Scanning and emailing the document to cla@azavea.com\n  - Faxing a copy to +1-215-925-2600.\n  - Mailing a hardcopy to:\n    Azavea, 990 Spring Garden Street, 5th Floor, Philadelphia, PA 19107 USA\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A38C:35999:172C06:5C6BF6:6AB921EC"},"text_sha256":"91ad39b9782c3f7081ebd4c26fcf1c65a21d584f21989f08c6f6f0cef9e3da6f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2950","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0847:767EB:17E3AB7:1C050B0:6AB92999"},"commit":{"sha":"fed86fb97ba522431cb12b32c356530695587dbf","url":"https://github.com/azavea/raster-vision/commit/fed86fb97ba522431cb12b32c356530695587dbf","date":"2026-06-04T14:55:56Z","author_date":"2026-06-04T14:55:56Z","committer_date":"2026-06-04T14:55:56Z","tree_sha":"2ea2cb6a22767be4c4a74b37c940d96300cfc67a","message_first_line":"remove triangle requirement"},"tree_request_status":200,"tree_rate":{"github_remaining":"2949","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083F:6E429:17D3029:1BF3EC4:6AB92999"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5347,"blob_sha":"0542e60b0c32479e11100752f1fab6baf77c8395","priority":0}],"documents":[{"path":"README.md","size":5347,"blob_sha":"0542e60b0c32479e11100752f1fab6baf77c8395","priority":0,"status":200,"text":"![Raster Vision Logo](docs/img/raster-vision-logo.png)\n&nbsp;\n\n[![Pypi](https://img.shields.io/pypi/v/rastervision.svg)](https://pypi.org/project/rastervision/)\n[![Documentation Status](https://readthedocs.org/projects/raster-vision/badge/?version=latest)](https://docs.rastervision.io/en/stable/?badge=stable)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build Status](https://github.com/azavea/raster-vision/actions/workflows/release.yml/badge.svg)](https://github.com/azavea/raster-vision/actions/workflows/release.yml)\n[![codecov](https://codecov.io/gh/azavea/raster-vision/branch/master/graph/badge.svg)](https://codecov.io/gh/azavea/raster-vision)\n\nRaster Vision is an open source Python **library** and **framework** for building computer vision models on satellite, aerial, and other large imagery sets (including oblique drone imagery).\n\nIt has built-in support for chip classification, object detection, and semantic segmentation with backends using PyTorch.\n\n<div align=\"center\">\n    <img src=\"docs/img/cv-tasks.png\" alt=\"Examples of chip classification, object detection and semantic segmentation\" width=\"60%\">\n<\/div>\n\n**As a library**, Raster Vision provides a full suite of utilities for dealing with all aspects of a geospatial deep learning workflow: reading geo-referenced data, training models, making predictions, and writing out predictions in geo-referenced formats.\n\n**As a low-code framework**, Raster Vision allows users (who don't need to be experts in deep learning!) to quickly and repeatably configure experiments that execute a machine learning pipeline including: analyzing training data, creating training chips, training models, creating predictions, evaluating models, and bundling the model files and configuration for easy deployment.\n![Overview of Raster Vision workflow](docs/img/rv-pipeline-overview.png)\n\nRaster Vision also has built-in support for running experiments in the cloud using [AWS Batch](https://docs.rastervision.io/en/stable/setup/aws.html#running-on-aws-batch) as well as [AWS Sagemaker](https://docs.rastervision.io/en/stable/setup/aws.html#running-on-aws-sagemaker).\n\nSee the [documentation](https://docs.rastervision.io/en/stable/) for more details.\n\n## Installation\n\n*For more details, see the [Setup documentation](https://docs.rastervision.io/en/stable/setup/)*.\n\n### Install via `pip`\n\nYou can install Raster Vision directly via `pip`.\n\n```sh\npip install rastervision\n```\n\n### Use Pre-built Docker Image\n\nAlternatively, you may use a Docker image. Docker images are published to [quay.io](https://quay.io/repository/azavea/raster-vision) (see the *tags* tab).\n\nWe publish a new tag per merge into `master`, which is tagged with the first 7 characters of the commit hash. To use the latest version, pull the `latest` suffix, e.g. `raster-vision:pytorch-latest`. Git tags are also published, with the Github tag name as the Docker tag suffix.\n\n### Build Docker Image\n\nYou can also build a Docker image from scratch yourself. After cloning this repo, run `docker/build`, and run then the container using `docker/run`.\n\n## Usage Examples and Tutorials\n\n**Non-developers** may find it easiest to use Raster Vision as a low-code framework where Raster Vision handles all the complexities and the user only has to configure a few parameters. The [*Quickstart guide*](https://docs.rastervision.io/en/stable/framework/quickstart.html) is a good entry-point into this. More advanced examples can be found on the [*Examples*](https://docs.rastervision.io/en/stable/framework/examples.html) page.\n\nFor **developers** and those looking to dive deeper or combine Raster Vision with their own code, the best starting point is [*Usage Overview*](https://docs.rastervision.io/en/stable/usage/overview.html), followed by [*Basic Concepts*](https://docs.rastervision.io/en/stable/usage/basics.html) and [*Tutorials*](https://docs.rastervision.io/en/stable/usage/tutorials/index.html).\n\n\n## Contact and Support\n\nYou can ask questions and talk to developers (let us know what you're working on!) at:\n* [Discussion Forum](https://github.com/azavea/raster-vision/discussions)\n* [Mailing List](https://groups.google.com/forum/#!forum/raster-vision)\n\n## Developing\n\nTo set up the development environment:\n- For and clone the repo and navigate to it.\n- Create and activate a new Python virtual environment via your environment manager of choice (`mamba`, `uv`, `pyenv`, etc.).\n- Run `scripts/setup_dev_env.sh` to install all Raster Vision plugins in editable mode along with all the dependencies.\n\n## Contributing\n\n*For more information, see [Contributing](https://docs.rastervision.io/en/stable/CONTRIBUTING.html).*\n\nWe are happy to take contributions! It is best to get in touch with the maintainers\nabout larger features or design changes *before* starting the work,\nas it will make the process of accepting changes smoother.\n\nEveryone who contributes code to Raster Vision will be asked to sign a Contributor License Agreement. See [Contributing](https://docs.rastervision.io/en/stable/CONTRIBUTING.html) for instructions.\n\n## Licenses\n\nRaster Vision is licensed under the Apache 2 license. See license [here](./LICENSE).\n\n3rd party licenses for all dependecies used by Raster Vision can be found [here](./THIRD_PARTY_LICENSES.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2348:7A4F8:17CAB5:5D0A6E:6AB921EE"},"text_sha256":"6f1002535ed12f186baff1a5ec35239030713170cc3d06b91db9ca99bb2efab6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"RubixML/ML","input_row":{"repository":"RubixML/ML","url":"https://github.com/RubixML/ML","name":"ML","owner":"RubixML","description":"A high-level machine learning and deep learning library for the PHP language.","language":"PHP","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2207,"issues":200,"created_at":"2018-02-14T07:20:19Z","updated_at":"2026-09-27T08:30:21Z","first_commit_at":"2018-02-14T07:21:26Z","last_commit_at":"2026-09-27T08:29:55Z","activity_months":103.39,"ai_ml_match_topics":"deep-learning; machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:06.198Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"RubixML/ML","visibility":"public","created_at":"2018-02-14T07:20:19Z","updated_at":"2026-09-27T08:30:21Z","private":false,"fork":false,"archived":false,"stargazers_count":2207,"open_issues_count":66,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2948","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:17F43D5:1C15846:6AB9299A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2947","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B8:74181:1775552:1B965C3:6AB9299A"},"commit":{"sha":"2f03a8aca942dce2b029ad77a9f7caad0c31c0dc","url":"https://github.com/RubixML/ML/commit/2f03a8aca942dce2b029ad77a9f7caad0c31c0dc","date":"2018-05-23T02:43:36Z","author_date":"2018-05-23T02:43:36Z","committer_date":"2018-05-23T02:43:36Z","tree_sha":"e89d080177f90fecdbfec94cb086a41a66872684","message_first_line":"Added VScore and Informedness validation metrics."},"tree_request_status":200,"tree_rate":{"github_remaining":"2946","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:17E496A:1C05C40:6AB9299A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":69,"blob_sha":"2841ac230d5d558b24d1e2b1b58f9c248f43523d","priority":0}],"documents":[{"path":"README.md","size":69,"blob_sha":"2841ac230d5d558b24d1e2b1b58f9c248f43523d","priority":0,"status":200,"text":"# Rubix Engine\n\nA library for building intelligent systems with PHP.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B650:3E1C8:17892B:5CC788:6AB921F0"},"text_sha256":"3511f25c122d32303ea852b9654c93f23e17768c315314ba994cbadff005e1c7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2945","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E9:767EB:17E3C69:1C05292:6AB9299B"},"commit":{"sha":"e0960dcb19c9722ccbc4826f5b9417a75fa01613","url":"https://github.com/RubixML/ML/commit/e0960dcb19c9722ccbc4826f5b9417a75fa01613","date":"2025-10-01T17:52:15Z","author_date":"2025-10-01T17:52:15Z","committer_date":"2025-10-01T17:52:15Z","tree_sha":"fed492cd786ff98ef38777f48ac2d97c0849d816","message_first_line":"chore(deps): Update php-stemmer to version ^4.0 for PHP 8.4 compatibility (#384)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2944","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BA:71C58:17A7ECB:1BC9198:6AB9299C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4112,"blob_sha":"e06fff53520736f457a1120376e2449dcb5a222c","priority":0}],"documents":[{"path":"README.md","size":4112,"blob_sha":"e06fff53520736f457a1120376e2449dcb5a222c","priority":0,"status":200,"text":"# Rubix ML\n\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/rubix/ml.svg?style=flat&colorB=8892BF)](https://www.php.net/) [![Latest Stable Version](https://img.shields.io/packagist/v/rubix/ml.svg?style=flat&colorB=orange)](https://packagist.org/packages/rubix/ml) [![Downloads from Packagist](https://img.shields.io/packagist/dt/rubix/ml.svg?style=flat&colorB=red)](https://packagist.org/packages/rubix/ml) [![Code Checks](https://github.com/RubixML/ML/actions/workflows/ci.yml/badge.svg)](https://github.com/RubixML/ML/actions/workflows/ci.yml) [![GitHub](https://img.shields.io/github/license/RubixML/RubixML)](https://github.com/RubixML/ML/blob/master/LICENSE.md)\n\nA high-level machine learning and deep learning library for the [PHP](https://php.net) language.\n\n- **Developer-friendly** API is delightful to use\n- **40+** supervised and unsupervised learning algorithms\n- **Support** for ETL, preprocessing, and cross-validation\n- **Open source** and free to use commercially\n\n## Installation\nInstall Rubix ML into your project using [Composer](https://getcomposer.org/):\n```sh\ncomposer require rubix/ml\n```\n\n### Requirements\n- [PHP](https://php.net/manual/en/install.php) 7.4 or above\n\n#### Recommended\n- [Tensor extension](https://github.com/RubixML/Tensor) for fast Matrix/Vector computing\n\n#### Optional\n\n- [GD extension](https://php.net/manual/en/book.image.php) for image support\n- [Mbstring extension](https://www.php.net/manual/en/book.mbstring.php) for fast multibyte string manipulation\n- [SVM extension](https://php.net/manual/en/book.svm.php) for Support Vector Machine engine (libsvm)\n- [PDO extension](https://www.php.net/manual/en/book.pdo.php) for relational database support\n- [GraphViz](https://graphviz.org/) for graph visualization\n\n## Documentation\nRead the latest docs [here](https://rubixml.github.io/ML/latest/).\n\n## What is Rubix ML?\nRubix ML is a free open-source machine learning (ML) library that allows you to build programs that learn from your data using the PHP language. We provide tools for the entire machine learning life cycle from ETL to training, cross-validation, and production with over 40 supervised and unsupervised learning algorithms. In addition, we provide tutorials and other educational content to help you get started using ML in your projects.\n\n## Getting Started\nIf you are new to machine learning, we recommend taking a look at the [What is Machine Learning?](https://rubixml.github.io/ML/latest/what-is-machine-learning.html) section to get started. If you are already familiar with basic ML concepts, you can browse the [basic introduction](https://rubixml.github.io/ML/latest/basic-introduction.html) for a brief look at a typical Rubix ML project. From there, you can browse the official tutorials below which range from beginner to advanced skill level.\n\n### Tutorials & Example Projects\nCheck out these example projects using the Rubix ML library. Many come with instructions and a pre-cleaned dataset.\n\n- [CIFAR-10 Image Recognizer](https://github.com/RubixML/CIFAR-10)\n- [Color Clusterer](https://github.com/RubixML/Colors)\n- [Credit Default Risk Predictor](https://github.com/RubixML/Credit)\n- [Customer Churn Predictor](https://github.com/RubixML/Churn)\n- [Divorce Predictor](https://github.com/RubixML/Divorce)\n- [DNA Taxonomer](https://github.com/RubixML/DNA)\n- [Dota 2 Game Outcome Predictor](https://github.com/RubixML/Dota2)\n- [Human Activity Recognizer](https://github.com/RubixML/HAR)\n- [Housing Price Predictor](https://github.com/RubixML/Housing)\n- [Iris Flower Classifier](https://github.com/RubixML/Iris)\n- [MNIST Handwritten Digit Recognizer](https://github.com/RubixML/MNIST)\n- [Text Sentiment Analyzer](https://github.com/RubixML/Sentiment)\n- [Titanic Survival Predictor](https://github.com/Jenutka/titanic_php)\n\n## Interact With The Community\n\n- [Join Our Telegram Channel](https://t.me/RubixML)\n\n## Contributing\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\nThe code is licensed [MIT](LICENSE) and the documentation is licensed [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"296A:3B1F3:17E8C9:5D2957:6AB921F2"},"text_sha256":"becd7ed0312fc1d7f4961ffea70cae278f7a5cd70d5905f13e944d67f5e4c558"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"asappresearch/sru","input_row":{"repository":"asappresearch/sru","url":"https://github.com/asappresearch/sru","name":"sru","owner":"asappresearch","description":"Training RNNs as Fast as CNNs (https://arxiv.org/abs/1709.02755)","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2108,"issues":136,"created_at":"2017-08-28T20:37:41Z","updated_at":"2026-09-22T20:30:17Z","first_commit_at":"2017-08-28T20:37:42Z","last_commit_at":"2021-05-19T15:52:48Z","activity_months":44.670000000000002,"ai_ml_match_topics":"deep-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:08.997Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"asappresearch/sru","visibility":"public","created_at":"2017-08-28T20:37:41Z","updated_at":"2026-09-22T20:30:17Z","private":false,"fork":false,"archived":false,"stargazers_count":2108,"open_issues_count":69,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2943","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092A:7418C:1803E8E:1C24EED:6AB9299D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2942","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BB:DC698:17E75F7:1C07E34:6AB9299D"},"commit":{"sha":"8bc85e8f38304f6e5b096a606d8dfe35f5672d27","url":"https://github.com/asappresearch/sru/commit/8bc85e8f38304f6e5b096a606d8dfe35f5672d27","date":"2018-05-09T18:45:18Z","author_date":"2018-05-09T18:45:18Z","committer_date":"2018-05-09T18:45:18Z","tree_sha":"129f9a869aaa8d41a57f5e9c24fe5c6c030e2830","message_first_line":"Merge pull request #52 from kzjeef/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2941","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17C278F:1BE2E2F:6AB9299D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4034,"blob_sha":"3b0ee2b8c4f4fe35a1bc3de33f58e5b081d4dccc","priority":0}],"documents":[{"path":"README.md","size":4034,"blob_sha":"3b0ee2b8c4f4fe35a1bc3de33f58e5b081d4dccc","priority":0,"status":200,"text":"\n## About\n\n**SRU** is a recurrent unit that can run over 10 times faster than cuDNN LSTM, without loss of accuracy tested on many tasks. \n<p align=\"center\">\n<img width=620 src=\"imgs/speed.png\"><br>\n<i>Average processing time of LSTM, conv2d and SRU, tested on GTX 1070<\/i><br>\n<\/p>\nFor example, the figure above presents the processing time of a single mini-batch of 32 samples. SRU achieves 10 to 16 times speed-up compared to LSTM, and operates as fast as (or faster than) word-level convolution using conv2d. \n\n#### Reference:\n[Training RNNs as Fast as CNNs](https://arxiv.org/abs/1709.02755)\n```\n@article{lei2017sru,\n  title={Training RNNs as Fast as CNNs},\n  author={Tao Lei, Yu Zhang and Yoav Artzi},\n  journal={arXiv preprint arXiv:1709.02755},\n  year={2017}\n}\n```\n<br>\n\n## Requirements\n - **GPU and CUDA 8 are required**\n - [PyTorch](http://pytorch.org/)\n - [CuPy](https://cupy.chainer.org/)\n - [pynvrtc](https://github.com/NVIDIA/pynvrtc)\n \nInstall requirements via `pip install -r requirements.txt`. CuPy and pynvrtc needed to compile the CUDA code into a callable function at runtime. Only single GPU training is supported. \n\n<br>\n\n## Examples\nThe usage of SRU is similar to `nn.LSTM`. SRU likely requires more stacking layers than LSTM. We recommend starting by 2 layers and use more if necessary (see our report for more experimental details).\n```python\nimport torch\nfrom torch.autograd import Variable\nfrom cuda_functional import SRU, SRUCell\n\n# input has length 20, batch size 32 and dimension 128\nx = Variable(torch.FloatTensor(20, 32, 128).cuda())\n\ninput_size, hidden_size = 128, 128\n\nrnn = SRU(input_size, hidden_size,\n    num_layers = 2,          # number of stacking RNN layers\n    dropout = 0.0,           # dropout applied between RNN layers\n    rnn_dropout = 0.0,       # variational dropout applied on linear transformation\n    use_tanh = 1,            # use tanh?\n    use_relu = 0,            # use ReLU?\n    use_selu = 0,            # use SeLU?\n    bidirectional = False,   # bidirectional RNN ?\n    weight_norm = False,     # apply weight normalization on parameters\n    layer_norm = False,      # apply layer normalization on the output of each layer\n    highway_bias = 0         # initial bias of highway gate (<= 0)\n)\nrnn.cuda()\n\noutput_states, c_states = rnn(x)      # forward pass\n\n# output_states is (length, batch size, number of directions * hidden size)\n# c_states is (layers, batch size, number of directions * hidden size)\n\n```\nMake sure `cuda_functional.py` and the shared library `cuda/lib64` can be found by the system, e.g. \n```\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64\nexport PYTHONPATH=path_to_repo/sru\n```\nInstead of using `PYTHONPATH`, the SRU module now can be installed as a regular package via `python setup.py install` or `pip install`. See this [PR](https://github.com/taolei87/sru/pull/11).\n\n<br>\n\n - [classification](/classification/)\n - [question answering (SQuAD)](/DrQA/)\n - [language modelling on PTB](/language_model/)\n - [speech recognition](/speech/) (**Note:** implemented in CNTK instead of PyTorch)\n  - machine translation: SRU has been included in [OpenNMT-py](https://github.com/OpenNMT/OpenNMT-py) by [Jianyu Zhan](http://github.com/jianyuzhan) and [Sasha Rush](http://github.com/srush). Also thanks to [@jingxil](https://github.com/jingxil) for testing. See results [here](http://cnyah.com/2017/09/20/an-empirical-comparison-between-SRU-and-LSTM/).\n  \n<br>\n\n## Contributors\nhttps://github.com/taolei87/sru/graphs/contributors\n\n\n### Other Implementations\n\n[@musyoku](https://github.com/musyoku) had a very nice [SRU implementaion](https://github.com/musyoku/chainer-sru) in chainer.\n\n[@adrianbg](https://github.com/adrianbg) implemented the [CPU version](https://github.com/taolei87/sru/pull/42).\n\n<br>\n\n## To-do\n  - [x] ReLU activation\n  - [x] support multi-GPU via `nn.DataParallel` (see example [here](/misc/test_multigpu.py))\n  - [x] layer normalization\n  - [x] weight normalization\n  - [x] SeLU activation\n  - [ ] residual\n  - [ ] support packed sequence\n  \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9828:3BCC6:175457:5C9426:6AB921F3"},"text_sha256":"4f88fc99cf44a9f7cf67ac22821b6248d6393d22d0f9b764049d28a91fdfbcf0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2940","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0867:52542:17B1833:1BD2A74:6AB9299E"},"commit":{"sha":"9ddc8da12f067125c2cfdd4f3b28a87c02889681","url":"https://github.com/asappresearch/sru/commit/9ddc8da12f067125c2cfdd4f3b28a87c02889681","date":"2021-05-19T15:52:48Z","author_date":"2021-05-19T15:52:48Z","committer_date":"2021-05-19T15:52:48Z","tree_sha":"18b0ee0ef179854d9aa2d5eac40e8618124b1f14","message_first_line":"Merge pull request #189 from asappresearch/torchscript_gpu_v2.5"},"tree_request_status":200,"tree_rate":{"github_remaining":"2939","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D2:A9DC0:17ADC92:1BCEA24:6AB9299E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3609,"blob_sha":"2824576829d14f44dd0dc40b400b6891c85f1ce5","priority":0}],"documents":[{"path":"README.md","size":3609,"blob_sha":"2824576829d14f44dd0dc40b400b6891c85f1ce5","priority":0,"status":200,"text":"\n## News\nSRU++, a new SRU variant, is released. [[tech report](https://arxiv.org/pdf/2102.12459.pdf)] [[blog](https://www.asapp.com/blog/reducing-the-high-cost-of-training-nlp-models-with-sru/)]\n\nThe experimental code and SRU++ implementation are available on [the dev branch](https://github.com/asappresearch/sru/tree/3.0.0-dev/experiments/srupp_experiments) which will be merged into master later.\n\n## About\n\n**SRU** is a recurrent unit that can run over 10 times faster than cuDNN LSTM, without loss of accuracy tested on many tasks. \n<p align=\"center\">\n<img width=620 src=\"https://raw.githubusercontent.com/taolei87/sru/master/imgs/speed.png\"><br>\n<i>Average processing time of LSTM, conv2d and SRU, tested on GTX 1070<\/i><br>\n<\/p>\nFor example, the figure above presents the processing time of a single mini-batch of 32 samples. SRU achieves 10 to 16 times speed-up compared to LSTM, and operates as fast as (or faster than) word-level convolution using conv2d.\n\n#### Reference:\nSimple Recurrent Units for Highly Parallelizable Recurrence [[paper](https://arxiv.org/abs/1709.02755)]\n```\n@inproceedings{lei2018sru,\n  title={Simple Recurrent Units for Highly Parallelizable Recurrence},\n  author={Tao Lei and Yu Zhang and Sida I. Wang and Hui Dai and Yoav Artzi},\n  booktitle={Empirical Methods in Natural Language Processing (EMNLP)},\n  year={2018}\n}\n```\n\nWhen Attention Meets Fast Recurrence: Training Language Models with Reduced Compute [[paper](https://arxiv.org/pdf/2102.12459)]\n```\n@article{lei2021srupp,\n  title={When Attention Meets Fast Recurrence: Training Language Models with Reduced Compute},\n  author={Tao Lei},\n  journal={arXiv preprint arXiv:2102.12459},\n  year={2021}\n}\n```\n<br>\n\n## Requirements\n - [PyTorch](http://pytorch.org/) >=1.6 recommended\n - [ninja](https://ninja-build.org/)\n\nInstall requirements via `pip install -r requirements.txt`.\n\n<br>\n\n## Installation\n\n#### From source:\nSRU can be installed as a regular package via `python setup.py install` or `pip install .`.\n\n#### From PyPi:\n`pip install sru`\n\n\n#### Directly use the source without installation:\nMake sure this repo and CUDA library can be found by the system, e.g. \n```\nexport PYTHONPATH=path_to_repo/sru\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64\n```\n\n<br>\n\n## Examples\nThe usage of SRU is similar to `nn.LSTM`. SRU likely requires more stacking layers than LSTM. We recommend starting by 2 layers and use more if necessary (see our report for more experimental details).\n```python\nimport torch\nfrom sru import SRU, SRUCell\n\n# input has length 20, batch size 32 and dimension 128\nx = torch.FloatTensor(20, 32, 128).cuda()\n\ninput_size, hidden_size = 128, 128\n\nrnn = SRU(input_size, hidden_size,\n    num_layers = 2,          # number of stacking RNN layers\n    dropout = 0.0,           # dropout applied between RNN layers\n    bidirectional = False,   # bidirectional RNN\n    layer_norm = False,      # apply layer normalization on the output of each layer\n    highway_bias = -2,        # initial bias of highway gate (<= 0)\n)\nrnn.cuda()\n\noutput_states, c_states = rnn(x)      # forward pass\n\n# output_states is (length, batch size, number of directions * hidden size)\n# c_states is (layers, batch size, number of directions * hidden size)\n\n```\n  \n<br>\n\n## Contributing\nPlease read and follow the [guidelines](CONTRIBUTING.md).\n\n\n### Other Implementations\n\n[@musyoku](https://github.com/musyoku) had a very nice [SRU implementaion](https://github.com/musyoku/chainer-sru) in chainer.\n\n[@adrianbg](https://github.com/adrianbg) implemented the first [CPU version](https://github.com/taolei87/sru/pull/42).\n\n<br>\n\n  \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"30E4:11E74B:1746E0:5C85C8:6AB921F5"},"text_sha256":"859dfc517330d4c27e97d30b7d284b46c3844e71c06e77032edd00de4f910278"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"deepmodeling/deepmd-kit","input_row":{"repository":"deepmodeling/deepmd-kit","url":"https://github.com/deepmodeling/deepmd-kit","name":"deepmd-kit","owner":"deepmodeling","description":"A deep learning package for many-body potential energy representation and molecular dynamics","language":"Python","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":2049,"issues":1226,"created_at":"2017-12-12T15:23:44Z","updated_at":"2026-09-26T16:51:36Z","first_commit_at":"2017-12-12T15:22:29Z","last_commit_at":"2026-09-22T16:51:24Z","activity_months":105.31999999999999,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:11.442Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deepmodeling/deepmd-kit","visibility":"public","created_at":"2017-12-12T15:23:44Z","updated_at":"2026-09-26T16:51:36Z","private":false,"fork":false,"archived":false,"stargazers_count":2049,"open_issues_count":216,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"2938","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:1801799:1C224AC:6AB9299F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2937","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EE:156040:17C28FE:1BE2FD2:6AB9299F"},"commit":{"sha":"7faa186ed2575e9158dd864bd287fb4434d2d433","url":"https://github.com/deepmodeling/deepmd-kit/commit/7faa186ed2575e9158dd864bd287fb4434d2d433","date":"2018-05-18T04:20:11Z","author_date":"2018-05-18T04:20:11Z","committer_date":"2018-05-18T04:20:11Z","tree_sha":"5167b4b20f9d549a906abe0491fb8381b1f722eb","message_first_line":"smooth version of deepmd. better mixed systems. add mpi support in lammps. add small box support."},"tree_request_status":200,"tree_rate":{"github_remaining":"2936","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0860:76AED:17E4C89:1C0601F:6AB929A0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":25256,"blob_sha":"f68e88eb90123a989937e92380177309cd36b811","priority":0}],"documents":[{"path":"README.md","size":25256,"blob_sha":"f68e88eb90123a989937e92380177309cd36b811","priority":0,"status":200,"text":"# Table of contents\n\n- [Install DeePMD-kit](#install-deepmd-kit)\n\t- [Install tensorflow's Python interface](#install-tensorflows-python-interface)\n\t- [Install tensorflow's C++ interface](#install-tensorflows-c-interface)\n\t- [Install xdrfile](#install-xdrfile)\n\t- [Install DeePMD-kit](#install-deepmd-kit)\n\t- [Install Lammps' DeePMD-kit module](#install-lammps-deepmd-kit-module)\n- [Use DeePMD-kit](#use-deepmd-kit)\n\t- [Prepare data](#prepare-data)\n\t- [Train a model](#train-a-model)\n\t- [Freeze the model](#freeze-the-model)\n\t- [Run MD with Lammps](#run-md-with-lammps)\n\t- [Run path-integral MD with i-PI](#run-path-integral-md-with-i-pi)\n\t- [Run MD with native code](#run-md-with-native-code)\n- [Code structure](#code-structure)\n- [License](#license)\n\n# Install DeePMD-kit\nThe installation of the DeePMD-kit is lengthy, but do not be panic. Just follow step by step. Wish you good luck.. \n\nA docker for installing the DeePMD-kit on CentOS 7 is available [here](https://github.com/TimChen314/deepmd-kit_docker).\n\n## Install tensorflow's Python interface \nThere are two ways of installing the Python interface of tensorflow, either [using google's binary](https://www.tensorflow.org/install/install_linux), or [installing from sources](https://www.tensorflow.org/install/install_sources). When you are using google's binary, do not forget to add the option `-DTF_GOOGLE_BIN=true` when building DeePMD-kit.\n\n## Install tensorflow's C++ interface\nFirstly get the source code of the tensorflow\n```bash\ncd /some/workspace\ngit clone https://github.com/tensorflow/tensorflow tensorflow\n```\nThe DeePMD-kit works with tensorflow r1.4 -- r1.6. Now taking r1.4 for example:\n```bash\ncd tensorflow\ngit checkout r1.4\n```\nPlease make sure you have the Bazel higher than version 0.5.4, otherwise, please [install it](https://docs.bazel.build/versions/master/install.html).\n\nDeePMD-kit is compiled by cmake, so we need to compile and integrate tensorflow with cmake projects. The rest of this section basically follows [the instruction provided by Tuatini](http://tuatini.me/building-tensorflow-as-a-standalone-project/). Now execute\n```bash\n./configure\n```\nYou will answer a list of questions that help configure the building of tensorflow. It is recommended to build for Python3. You may want to answer the question like this:\n```bash\nPlease specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3\n```\nThe library path for Python should be set accordingly.\n\nNow build the shared library of tensorflow:\n```bash\nbazel build -c opt --verbose_failures //tensorflow:libtensorflow_cc.so\n```\nYou may want to add options `--copt=-msse4.2`,  `--copt=-mavx`, `--copt=-mavx2` and `--copt=-mfma` to enable SSE4.2, AVX, AVX2 and FMA SIMD accelerations, respectively. It is noted that these options should be chosen according to the CPU architecture. If the RAM becomes an issue of your machine, you may limit the RAM usage by using `--local_resources 2048,.5,1.0`. \n\nNow I assume you want to install tensorflow in directory `$tensorflow_root`. Create the directory if it does not exists\n```bash\nmkdir -p $tensorflow_root\n```\nBefore moving on, we need to compile the dependencies of tensorflow, including Protobuf, Eigen and nsync. Firstly, protobuf\n```bash\nmkdir /tmp/proto\ntensorflow/contrib/makefile/download_dependencies.sh\ncd tensorflow/contrib/makefile/downloads/protobuf/\n./autogen.sh\n./configure --prefix=/tmp/proto/\nmake\nmake install\n```\nThen Eigen\n```bash\nmkdir /tmp/eigen\ncd ../eigen\nmkdir build_dir\ncd build_dir\ncmake -DCMAKE_INSTALL_PREFIX=/tmp/eigen/ ../\nmake install\n```\nAnd nsync\n```bash\nmkdir /tmp/nsync\ncd ../../nsync\nmkdir build_dir\ncd build_dir\ncmake -DCMAKE_INSTALL_PREFIX=/tmp/nsync/ ../\nmake\nmake install\ncd ../../../../../..\n```\nNow, copy the libraries to the tensorflow's installation directory:\n```bash\nmkdir $tensorflow_root/lib\ncp bazel-bin/tensorflow/libtensorflow_cc.so $tensorflow_root/lib/\ncp bazel-bin/tensorflow/libtensorflow_framework.so $tensorflow_root/lib/\ncp /tmp/proto/lib/libprotobuf.a $tensorflow_root/lib/\ncp /tmp/nsync/lib/libnsync.a $tensorflow_root/lib/\n```\nThen copy the headers\n```bash\nmkdir -p $tensorflow_root/include/tensorflow\ncp -r bazel-genfiles/* $tensorflow_root/include/\ncp -r tensorflow/cc $tensorflow_root/include/tensorflow\ncp -r tensorflow/core $tensorflow_root/include/tensorflow\ncp -r third_party $tensorflow_root/include\ncp -r /tmp/proto/include/* $tensorflow_root/include\ncp -r /tmp/eigen/include/eigen3/* $tensorflow_root/include\ncp -r /tmp/nsync/include/*h $tensorflow_root/include\n```\nNow clean up the source files in the header directories:\n```bash\ncd $tensorflow_root/include\nfind . -name \"*.cc\" -type f -delete\n```\nThe temporary installation directories for the dependencies can be removed:\n```bash\nrm -fr /tmp/proto /tmp/eigen /tmp/nsync\n```\n\n## Install xdrfile\nxdrfile is a lib that read, compress and write the MD trajectories. Firstly get the source:\n```bash\ncd /some/workspace\nwget ftp://ftp.gromacs.org/pub/contrib/xdrfile-1.1.4.tar.gz\n```\nI assume you want to install it in `$xdrfile_root`, then you will probably do\n```bash\ntar xvf xdrfile-1.1.4.tar.gz\ncd xdrfile-1.1.4\n./configure --prefix=$xdrfile_root\nmake \nmake install\n```\n\n## Install DeePMD-kit\nThe DeePMD-kit was tested with compiler gcc >= 4.9.\n\nFirstly clone the DeePMD-kit source code\n```bash\ncd /some/workspace\ngit clone https://github.com/deepmodeling/deepmd-kit.git deepmd-kit\n```\nIf one downloads the .zip file from the github, then the default folder of source code would be `deepmd-kit-master` rather than `deepmd-kit`. For convenience, you may want to record the location of source to a variable, saying `deepmd_source_dir` by\n```bash\ncd deepmd-kit\ndeepmd_source_dir=`pwd`\n```\nThen goto the source code directory and make a build directory.\n```bash\ncd $deepmd_source_dir/source\nmkdir build \ncd build\n```\nI assume you want to install DeePMD-kit into path `$deepmd_root`, then execute cmake\n```bash\ncmake -DXDRFILE_ROOT=$xdrfile_root -DTENSORFLOW_ROOT=$tensorflow_root -DCMAKE_INSTALL_PREFIX=$deepmd_root ..\n```\nIf you are using google binary for tensorflow python interface, then you need to specify\n```bash\ncmake -DXDRFILE_ROOT=$xdrfile_root -DTENSORFLOW_ROOT=$tensorflow_root -DCMAKE_INSTALL_PREFIX=$deepmd_root -DTF_GOOGLE_BIN=true ..\n```\nIf the cmake has executed successfully, then \n```bash\nmake\nmake install\n```\nIf everything works fine, you will have the following executables installed in `$deepmd_root/bin`\n```bash\n$ ls $deepmd_root/bin\ndp_frz  dp_ipi  dp_mdnn  dp_test  dp_train\n```\n\n## Install Lammps' DeePMD-kit module\nDeePMD-kit provide module for running MD simulation with Lammps. Now make the DeePMD-kit module for lammps.\n```bash\ncd $deepmd_source_dir/source/build\nmake lammps\n```\nDeePMD-kit will generate a module called `USER-DEEPMD` in the `build` directory. Now download your favorite Lammps code, and uncompress it (I assume that you have downloaded the tar `lammps-stable.tar.gz`)\n```bash\ncd /some/workspace\ntar xf lammps-stable.tar.gz\n```\nThe source code of Lammps is store in directory, for example `lammps-31Mar17`. Now go into the lammps code and copy the DeePMD-kit module like this\n```bash\ncd lammps-31Mar17/src/\ncp -r $deepmd_source_dir/source/build/USER-DEEPMD .\n```\nNow build Lammps\n```bash\nmake yes-user-deepmd\nmake mpi -j4\n```\nThe option `-j4` means using 4 processes in parallel. You may want to be use a different number according to your hardware. \n\nIf everything works fine, you will end up with an executable `lmp_mpi`.\n\nThe DeePMD-kit module can be removed from Lammps source code by \n```bash\nmake no-user-deepmd\n```\n\n# Use DeePMD-kit\nIn this text, we will call the deep neural network that is used to represent the interatomic interactions (Deep Potential) the **model**. The typical procedure of using DeePMD-kit is \n\n1. Prepare data\n2. Train a model\n3. Freeze the model\n4. MD runs with the model (Native MD code or Lammps)\n\n## Prepare data\nOne needs to provide the following information to train a model: the atom type, the simulation box, the atom coordinate, the atom force, system energy and virial. A snapshot of a system that contains these information is called a **frame**. We use the following convention of units:\n\nProperty| Unit\n---\t| :---:\nTime\t| ps\nLength\t| A\nEnergy\t| eV\nForce\t| eV/A\nPressure| Bar\n\nThe frames of the system are stored in two formats. A raw file is a plain text file with each information item written in one file and one frame written on one line. The default files that provide box, coordinate, force, energy and virial are `box.raw`, `coord.raw`, `force.raw`, `energy.raw` and `virial.raw`, respectively. *We recommend you use these file names*. Here is an example of force.raw:\n```bash\n$ cat force.raw\n-0.724  2.039 -0.951  0.841 -0.464  0.363\n 6.737  1.554 -5.587 -2.803  0.062  2.222\n-1.968 -0.163  1.020 -0.225 -0.789  0.343\n```\nThis `force.raw` contains 3 frames with each frame having the forces of 2 atoms, thus it has 3 lines and 6 columns. Each line provides all the 3 force components of 2 atoms in 1 frame. The first three numbers are the 3 force components of the first atom, while the second three numbers are the 3 force components of the second atom. The coordinate file `coord.raw` is organized similarly. In `box.raw`, the 9 components of the box vectors should be provided on each line. In `virial.raw`, the 9 components of the virial tensor should be provided on each line. The number of lines of all raw files should be identical.\n\nWe assume that the atom types do not change in all frames. It is provide by `type.raw`, which has one line with the types of atoms written one by one. The atom types should be integers.\n\nThe second format is the data sets of `numpy` binary data that are directly used by the training program. User can use the script `$deepmd_source_dir/data/raw/raw_to_set.sh` to convert the prepared raw files to data sets. For example, if we have raw files that contains 6000 frames, \n```bash\n$ ls \nbox.raw  coord.raw  energy.raw  force.raw  type.raw  virial.raw\n$ $deepmd_source_dir/data/raw/raw_to_set.sh 2000\nnframe is 6000\nnline per set is 2000\nwill make 3 sets\nmaking set 0 ...\nmaking set 1 ...\nmaking set 2 ...\n$ ls \nbox.raw  coord.raw  energy.raw  force.raw  set.000  set.001  set.002  type.raw  virial.raw\n```\nIt generates two sets `set.000`, `set.001` and `set.002`, with each set contains 2000 frames. The last set (`set.002`) is used as testing set, while the rest sets (`set.000` and `set.001`) are used as training sets. One do not need to take care the binary data files in each of the `set.*` directories. The path containing `set.*` and `type.raw` is called a *system*. \n\n## Train a model\n### The standard DeePMD model\nThe method of training is explained in our [DeePMD paper][1]. With the source code we provide a small training dataset taken from 400 frames generated by NVT ab-initio water MD trajectory with 300 frames for training and 100 for testing. [An example training parameter file](./examples/train/water.json) is provided. One can try with the training by\n```bash\n$ cd $deepmd_source_dir/examples/train/\n$ $deepmd_root/bin/dp_train water.json\n```\n`$deepmd_root/bin/dp_train` is the training program, and `water.json` is the `json` format parameter file that controls the training. The components of the `water.json` are\n```json\n{\n    \"_comment\": \" model parameters\",\n    \"use_smooth\":\tfalse,\n    \"sel_a\":\t\t[16, 32],\n    \"sel_r\":\t\t[30, 60],\n    \"rcut\":\t\t6.00,\n    \"axis_rule\":\t[0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0],\n    \"_comment\":\t\" default rule: []\",\n    \"_comment\":\t\" user defined rule: for each type provides two axes, \",\n    \"_comment\":\t\"                    for each axis: (a_or_r, type, idx)\",\n    \"_comment\":\t\"                    if type < 0, exclude type -(type+1)\",\n    \"_comment\": \"                    for water (O:0, H:1) it can be\",\n    \"_comment\": \"                    [0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0]\",\n    \"n_neuron\":\t\t[240, 120, 60, 30, 10],\n\n    \"_comment\": \" training controls\",\n    \"systems\":\t\t[\"../data/water/\"],\n    \"set_prefix\":\t\"set\",    \n    \"stop_batch\":\t1000000,\n    \"batch_size\":\t4,\n    \"start_lr\":\t\t0.001,\n    \"decay_steps\":\t5000,\n    \"decay_rate\":\t0.95,\n\n    \"start_pref_e\":\t0.02,\n    \"limit_pref_e\":\t8,\n    \"start_pref_f\":\t1000,\n    \"limit_pref_f\":\t1,\n    \"start_pref_v\":\t0,\n    \"limit_pref_v\":\t0,\n\n    \"seed\":\t\t1,\n\n    \"_comment\": \" display and restart\",\n    \"_comment\": \" frequencies counted in batch\",\n    \"disp_file\":\t\"lcurve.out\",\n    \"disp_freq\":\t100,\n    \"numb_test\":\t100,\n    \"save_freq\":\t100,\n    \"save_ckpt\":\t\"model.ckpt\",\n    \"load_ckpt\":\t\"model.ckpt\",\n    \"disp_training\":\ttrue,\n    \"time_training\":\ttrue,\n\n    \"_comment\":\t\t\"that's all\"\n}\n```\n\nThe option **`rcut`** is the cut-off radius for neighbor searching. The `sel_a` and `sel_r` are the maximum selected numbers of fully-local-coordinate and radial-only-coordinate atoms from the neighbor list, respectively. `sel_a + sel_r` should larger than the maximum possible number of neighbors in the cut-off radius. `sel_a` and `sel_r` are vectors, the length of the vectors are same as the number of atom types in the system. `sel_a[i]` and `sel_r[i]` denote the selected number of neighbors of type `i`.\n\nThe option **`axis_rule`** specifies how to make the axis for the local coordinate of each atom. For each atom type, 6 integers should be provided. The first three for the first axis, while the last three for the second axis. Within the three integers, the first one specifies if the axis atom is fully-local-coordinated (`0`) or radial-only-coordinated (`1`). The second integer specifies the type of the axis atom. If this number is less than 0, saying `t < 0`, then this axis exclude atom of type `-(t+1)`. If the third integer is, saying `s`, then the axis atom is the `s`th nearest neighbor satisfying the previous two conditions. \n\nThe option **`n_neuron`** is an integer vector that determines the shape the neural network. The size of the vector is identical to the number of hidden layers of the network. From left to right the members denotes the size of each hidden layers from input end to the output end, respectively.\n\nThe option **`systems`** provide location of the systems (path to `set.*` and `type.raw`). It is a vector, thus DeePMD-kit allows you provide multiple systems. DeePMD-kit will train the model with the systems in the vector one by one in a cyclic manner.\n\nThe option **`batch_size`** specifies the number of frames in each batch. \nThe option **`stop_batch`** specifies the total number of batches will be used in the training.\nThe option **`start_lr`**, **`decay_rate`** and **`decay_steps`** specify how the learning rate changes. For example, the `t`th batch will be trained with learning rate:\n```math\nlr(t) = start_lr * decay_rate ^ ( t / decay_steps )\n```\n\nThe options **`start_pref_e`**, **`limit_pref_e`**, **`start_pref_f`**, **`limit_pref_f`**, **`start_pref_v`** and **`limit_pref_v`** determine how the prefactors of energy error, force error and virial error changes in the loss function (see the appendix of the [DeePMD paper][1] for details). Taking the prefactor of force error for example, the prefactor at batch `t` is\n```math\nw_f(t) = start_pref_f * ( lr(t) / start_lr ) + limit_pref_f * ( 1 - lr(t) / start_lr )\n```\nSince we do not have virial data, the virial prefactors `start_pref_v` and `limit_pref_v` are set to 0.\n\nThe option **`seed`** specifies the random seed for neural network initialization. If not provided, the `seed` will be initialized with `None`.\n\nDuring the training, the error of the model is tested every **`disp_freq`** batches with **`numb_test`** frames from the last set in the **`systems`** directory on the fly, and the results are output to **`disp_file`**. \n\nCheckpoints will be written to files with prefix **`save_ckpt`** every **`save_freq`** batches. If **`restart`** is set to `true`, then the training will start from the checkpoint named **`load_ckpt`**, rather than from scratch.\n\nSeveral command line options can be passed to `dp_train`, this can be checked with\n```bash\n$ $deepmd_root/bin/dp_train --help\n```\nAn explanation will be provided\n```\npositional arguments:\n  INPUT                 the input json database\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t INTER_THREADS, --inter-threads INTER_THREADS\n                        With default value 0. Setting the \"inter_op_parallelism_threads\" key for the tensorflow, the \"intra_op_parallelism_threads\" will be set by the env variable OMP_NUM_THREADS\n  --init-model INIT_MODEL\n                        Initialize a model by the provided checkpoint\n  --restart RESTART     Restart the training from the provided checkpoint\n```\nThe keys `intra_op_parallelism_threads` and `inter_op_parallelism_threads` are Tensorflow configurations for multithreading, which are explained [here](https://www.tensorflow.org/performance/performance_guide#optimizing_for_cpu). Skipping `-t` and `OMP_NUM_THREADS` leads to the default setting of these keys in the Tensorflow.\n\n**`--init-model model.ckpt`**, for example, initializes the model training with an existing model that is stored in the checkpoint `model.ckpt`, the network architectures should match.\n\n**`--restart model.ckpt`**, continues the training from the checkpoint `model.ckpt`.\n\n### The smooth DeePMD model\nThe smooth version of DeePMD can be trained by the DeePMD-kit. [An example training parameter file](./examples/train/water_smth.json) is provided. One can try with the training by\n```bash\n$ cd $deepmd_source_dir/examples/train/\n$ $deepmd_root/bin/dp_train water_smth.json\n```\nThe difference between the standard and smooth DeePMD models lies in the model parameters:\n```json\n    \"use_smooth\":\ttrue,\n    \"sel_a\":\t\t[46, 92],\n    \"rcut_smth\":\t5.80,\n    \"rcut\":\t\t6.00,\n    \"filter_neuron\":\t[25, 50, 100],\n    \"filter_resnet_dt\":\tfalse,\n    \"n_axis_neuron\":\t16,\n    \"n_neuron\":\t\t[240, 240, 240],\n    \"resnet_dt\":\ttrue,\n```\nThe `sel_r` option is skipped by the smooth version and the model use fully-local-coordinate for all neighboring atoms. The `sel_a` should larger than the maximum possible number of neighbors in the cut-off radius `rcut`. \n\nThe descriptors will decay smoothly from **`rcut_smth`** to the cutoff radius `rcut`.\n\n**`filter_neuron`** provides the size of the filter network (also called local-embedding network). If the size of the next layer is the same or twice as the previous layer, then a skip connection is build (ResNet). **`filter_resnet_dt`** tells if a timestep is used in the skip connection. By default it is `false`. **`n_axis_neuron`** specifies the number of axis filter, which should be much smaller than the size of the last layer of the filter network.\n\n**`n_neuron`** specifies the fitting network. If the size of the next layer is the same as the previous layer, then a skip connection is build (ResNet). **`resnet_dt`** tells if a timestep is used in the skip connection. By default it is `true`. \n\n\n## Freeze the model\nThe trained neural network is extracted from a checkpoint and dumped into a database. This process is called \"freeze\" a model. Typically one does\n```bash\n$ $deepmd_root/bin/dp_frz -o graph.pb\n```\nin the folder where the model is trained. The output database is called `graph.pb`.\n\n## Run MD with Lammps\nRun an MD simulation with Lammps is simpler. In the Lammps input file, one needs to specify the pair style as follows\n```bash\npair_style     deepmd graph.pb\npair_coeff     \n```\nwhere `graph.pb` is the file name of the frozen model. The `pair_coeff` should be left blank. It should be noted that Lammps counts atom types starting from 1, therefore, all Lammps atom type will be firstly subtracted by 1, and then passed into the DeePMD-kit engine to compute the interactions.\n\n### With long-range interaction\nThe reciprocal space part of the long-range interaction can be calculated by lammps command `kspace_style`. To use it with DeePMD-kit, one writes \n```bash\npair_style\thybrid/overlay deepmd graph.pb coul/long 9.0\npair_coeff\t* * deepmd\npair_coeff\t* * coul/long\npair_modify\tpair coul/long compute no\nkspace_style\tpppm 1.0e-5\nkspace_modify\tgewald 0.45\n```\nIn this setting, the direct space part of the long-range interaction is ignored by the `pair_modify` command, because this part is fitted in the DeePMD model. The splitting parameter `gewald` is modified by the `kspace_modify` command.\n\n## Run path-integral MD with i-PI\nThe i-PI works in a client-server model. The i-PI provides the server for integrating the replica positions of atoms, while the DeePMD-kit provides a client named `dp_ipi` that computes the interactions (including energy, force and virial). The server and client communicates via the Unix domain socket or the Internet socket. The client can be started by\n```bash\n$ dp_ipi water.json\n```\nIt is noted that multiple instances of the client is allow for computing, in parallel, the interactions of multiple replica of the path-integral MD.\n\n`water.json` is the parameter file for the client `dp_ipi`, and [an example](./examples/ipi/water.json) is provided:\n```json\n{\n    \"verbose\":\t\tfalse,\n    \"use_unix\":\t\ttrue,\n    \"port\":\t\t31415,\n    \"host\":\t\t\"localhost\",\n    \"graph_file\":\t\"graph.pb\",\n    \"coord_file\":\t\"conf.xyz\",\n    \"atom_type\" : {\n\t\"OW\":\t\t0, \n\t\"HW1\":\t\t1,\n\t\"HW2\":\t\t1\n    }\n}\n```\nThe option **`use_unix`** is set to `true` to activate the Unix domain socket, otherwise, the Internet socket is used.\n\nThe option **`graph_file`** provides the file name of the frozen model.\n\nThe `dp_ipi` gets the atom names from an [XYZ file](https://en.wikipedia.org/wiki/XYZ_file_format) provided by **`coord_file`** (meanwhile ignores all coordinates in it), and translates the names to atom types by rules provided by **`atom_type`**.\n\n\n## Run MD with native code\nDeePMD-kit provides a simple MD implementation that runs under either NVE or NVT ensemble. One needs to provide the following input files\n```bash\n$ ls\nconf.gro  graph.pb  water.json\n```\n`conf.gro` is the file that provides the initial coordinates and/or velocities of all atoms in the system. It is of Gromacs `gro` format. Details of this format can be find in [this website](http://manual.gromacs.org/current/online/gro.html). It should be notice that the length unit of the `gro` format is **nm** rather than A.\n\n`graph.pb` is the frozen model.\n\n`water.json` is the parameter file that specifies how the MD runs. [An example parameter file](./examples/md/water.json) for water NVT simulation is provided. \n```json\n{\n    \"conf_file\":\t\"conf.gro\",\n    \"conf_format\":\t\"gro\",\n    \"graph_file\":\t\"graph.pb\",\n    \"nsteps\":\t\t500000,\n    \"dt\": \t\t5e-4,\n    \"ener_freq\":\t20,\n    \"ener_file\":\t\"energy.out\",\n    \"xtc_freq\":\t\t20,\n    \"xtc_file\":\t\t\"traj.xtc\",\n    \"trr_freq\":\t\t20,\n    \"trr_file\":\t\t\"traj.trr\",\n    \"print_force\":\tfalse,\n    \"T\":\t\t300,\n    \"tau_T\":\t\t0.1,\n    \"rand_seed\":\t2017,\n    \"atom_type\" : {\n\t\"OW\":\t\t0, \n\t\"HW1\":\t\t1,\n\t\"HW2\":\t\t1\n    },\n    \"atom_mass\" : {\n\t\"OW\":\t\t16, \n\t\"HW1\":\t\t1,\n\t\"HW2\":\t\t1\n    }\n}\n```\nThe options **`conf_file`**, **`conf_format`** and **`graph_file`** are self-explanatory. It should be noticed, again, the length unit is nm in the `gro` format file.\n\nThe option **`nsteps`** specifies the number of time steps of the MD simulation. The option **`dt`** specifies the timestep of the simulation. \n\nThe options **`ener_file`** and **`ener_freq`** specify the energy output file and frequency. \n\nThe options **`xtc_file`**, **`xtc_freq`**, **`trr_file`** and **`trr_freq`** are similar options that specify the output files and frequencies of the xtc and trr trajectory, respectively. When the frequencies are set to 0, the corresponding file will not be output. The instructions of the xtc and trr formats can be found in [xtc manual](http://manual.gromacs.org/online/xtc.html) and [trr manual](http://manual.gromacs.org/online/trr.html). It is noticed that the length unit in the xtc and trr files is **nm**.\n\nIf the option **`print_force`** is set to `true`, then the atomic force will be output.\n\nThe option **`T`** specifies the temperature of the simulation, and the option **`tau_T`** specifies the timescale of the thermostat. We implement the Langevin thermostat for the NVT simulation. **`rand_seed`** set the random seed of the random generator in the thermostat.\n\nThe **`atom_type`** set the type for the atoms in the system. The names of the atoms are those provided in the `conf_file` file. The **`atom_mass`** set the mass for the atoms. Again, the name of the atoms are those provided in the `conf_file`.\n\n\n# Code structure\nThe code is organized as follows:\n* `data/raw`: tools manipulating the raw data files.\n* `examples`: example json parameter files.\n* `source/3rdparty`: third-party packages used by DeePMD-kit.\n* `source/cmake`: cmake scripts for building.\n* `source/ipi`: source code of i-PI client.\n* `source/lib`: source code of DeePMD-kit library.\n* `source/lmp`: source code of Lammps module.\n* `source/md`: source code of native MD.\n* `source/op`: tensorflow op implementation. working with library.\n* `source/scripts`: Python script for model freezing.\n* `source/train`: Python modules and scripts for training and testing.\n\n\n# License\nThe project DeePMD-kit is licensed under [GNU LGPLv3.0](./LICENSE)\n\n\n[1]: https://arxiv.org/pdf/1707.09571.pdf\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E612:18233:174332:5C824B:6AB921F7"},"text_sha256":"abdb08d8d991a94a3afdfbbaf2a7b0109d7dc54614e815d098b5eaa9fd885d4e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2935","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:17DAB4C:1BFBC10:6AB929A1"},"commit":{"sha":"b22a3c3011ff18f9b21f6fcd4a3882ab52258559","url":"https://github.com/deepmodeling/deepmd-kit/commit/b22a3c3011ff18f9b21f6fcd4a3882ab52258559","date":"2026-06-30T16:17:03Z","author_date":"2026-06-30T16:17:03Z","committer_date":"2026-06-30T16:17:03Z","tree_sha":"1761693bfae76a7a28b4d131806c220199b468db","message_first_line":"refactor(api_cc): load backends as plugins (#5531)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2934","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:17ED58D:1C0DFB8:6AB929A1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10041,"blob_sha":"5ca8080e77ba476d7e2894932a88b94dc5a75dd0","priority":0}],"documents":[{"path":"README.md","size":10041,"blob_sha":"5ca8080e77ba476d7e2894932a88b94dc5a75dd0","priority":0,"status":200,"text":"[<picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"./doc/_static/logo-dark.svg\"><source media=\"(prefers-color-scheme: light)\" srcset=\"./doc/_static/logo.svg\"><img alt=\"DeePMD-kit logo\" src=\"./doc/_static/logo.svg\"><\/picture>](./doc/logo.md)\n\n______________________________________________________________________\n\n# DeePMD-kit\n\n[![GitHub release](https://img.shields.io/github/release/deepmodeling/deepmd-kit.svg?maxAge=86400)](https://github.com/deepmodeling/deepmd-kit/releases)\n[![offline packages](https://img.shields.io/github/downloads/deepmodeling/deepmd-kit/total?label=offline%20packages)](https://github.com/deepmodeling/deepmd-kit/releases)\n[![conda-forge](https://img.shields.io/conda/dn/conda-forge/deepmd-kit?color=red&label=conda-forge&logo=conda-forge)](https://anaconda.org/conda-forge/deepmd-kit)\n[![pip install](https://img.shields.io/pypi/dm/deepmd-kit?label=pip%20install)](https://pypi.org/project/deepmd-kit)\n[![docker pull](https://img.shields.io/docker/pulls/deepmodeling/deepmd-kit)](https://hub.docker.com/r/deepmodeling/deepmd-kit)\n[![Documentation Status](https://readthedocs.org/projects/deepmd/badge/)](https://deepmd.readthedocs.io/)\n\n## About DeePMD-kit\n\nDeePMD-kit is a package written in Python/C++, designed to minimize the effort required to build deep learning-based model of interatomic potential energy and force field and to perform molecular dynamics (MD). This brings new hopes to addressing the accuracy-versus-efficiency dilemma in molecular simulations. Applications of DeePMD-kit span from finite molecules to extended systems and from metallic systems to chemically bonded systems.\n\nFor more information, check the [documentation](https://deepmd.readthedocs.io/).\n\n### Highlighted features\n\n- **interfaced with multiple backends**, including TensorFlow, PyTorch, JAX, and Paddle, the most popular deep learning frameworks, making the training process highly automatic and efficient.\n- **interfaced with high-performance classical MD and quantum (path-integral) MD packages**, including LAMMPS, i-PI, AMBER, CP2K, GROMACS, OpenMM, and ABACUS.\n- **implements the Deep Potential series models**, which have been successfully applied to finite and extended systems, including organic molecules, metals, semiconductors, insulators, etc.\n- **implements MPI and GPU supports**, making it highly efficient for high-performance parallel and distributed computing.\n- **highly modularized**, easy to adapt to different descriptors for deep learning-based potential energy models.\n\n### License and credits\n\nThe project DeePMD-kit is licensed under [GNU LGPLv3.0](./LICENSE).\nIf you use this code in any future publications, please cite the following publications for general purpose:\n\n- Han Wang, Linfeng Zhang, Jiequn Han, and Weinan E. \"DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics.\" Computer Physics Communications 228 (2018): 178-184.\n  [![doi:10.1016/j.cpc.2018.03.016](https://img.shields.io/badge/DOI-10.1016%2Fj.cpc.2018.03.016-blue)](https://doi.org/10.1016/j.cpc.2018.03.016)\n  [![Citations](https://citations.njzjz.win/10.1016/j.cpc.2018.03.016)](https://badge.dimensions.ai/details/doi/10.1016/j.cpc.2018.03.016)\n- Jinzhe Zeng, Duo Zhang, Denghui Lu, Pinghui Mo, Zeyu Li, Yixiao Chen, Marián Rynik, Li'ang Huang, Ziyao Li, Shaochen Shi, Yingze Wang, Haotian Ye, Ping Tuo, Jiabin Yang, Ye Ding, Yifan Li, Davide Tisi, Qiyu Zeng, Han Bao, Yu Xia, Jiameng Huang, Koki Muraoka, Yibo Wang, Junhan Chang, Fengbo Yuan, Sigbjørn Løland Bore, Chun Cai, Yinnian Lin, Bo Wang, Jiayan Xu, Jia-Xin Zhu, Chenxing Luo, Yuzhi Zhang, Rhys E. A. Goodall, Wenshuo Liang, Anurag Kumar Singh, Sikai Yao, Jingchao Zhang, Renata Wentzcovitch, Jiequn Han, Jie Liu, Weile Jia, Darrin M. York, Weinan E, Roberto Car, Linfeng Zhang, Han Wang. \"DeePMD-kit v2: A software package for deep potential models.\" J. Chem. Phys. 159 (2023): 054801.\n  [![doi:10.1063/5.0155600](https://img.shields.io/badge/DOI-10.1063%2F5.0155600-blue)](https://doi.org/10.1063/5.0155600)\n  [![Citations](https://citations.njzjz.win/10.1063/5.0155600)](https://badge.dimensions.ai/details/doi/10.1063/5.0155600)\n- Jinzhe Zeng, Duo Zhang, Anyang Peng, Xiangyu Zhang, Sensen He, Yan Wang, Xinzijian Liu, Hangrui Bi, Yifan Li, Chun Cai, Chengqian Zhang, Yiming Du, Jia-Xin Zhu, Pinghui Mo, Zhengtao Huang, Qiyu Zeng, Shaochen Shi, Xuejian Qin, Zhaoxi Yu, Chenxing Luo, Ye Ding, Yun-Pei Liu, Ruosong Shi, Zhenyu Wang, Sigbjørn Løland Bore, Junhan Chang, Zhe Deng, Zhaohan Ding, Siyuan Han, Wanrun Jiang, Guolin Ke, Zhaoqing Liu, Denghui Lu, Koki Muraoka, Hananeh Oliaei, Anurag Kumar Singh, Haohui Que, Weihong Xu, Zhangmancang Xu, Yong-Bin Zhuang, Jiayu Dai, Timothy J. Giese, Weile Jia, Ben Xu, Darrin M. York, Linfeng Zhang, Han Wang. \"DeePMD-kit v3: A Multiple-Backend Framework for Machine Learning Potentials.\" J. Chem. Theory Comput. 21 (2025): 4375-4385.\n  [![doi:10.1021/acs.jctc.5c00340](https://img.shields.io/badge/DOI-10.1021%2Facs.jctc.5c00340-blue)](https://doi.org/10.1021/acs.jctc.5c00340)\n  [![Citations](https://citations.njzjz.win/10.1021/acs.jctc.5c00340)](https://badge.dimensions.ai/details/doi/10.1021/acs.jctc.5c00340)\n\nIn addition, please follow [the bib file](CITATIONS.bib) to cite the methods you used.\n\n### Highlights in major versions\n\n#### Initial version\n\nThe goal of Deep Potential is to employ deep learning techniques and realize an inter-atomic potential energy model that is general, accurate, computationally efficient and scalable. The key component is to respect the extensive and symmetry-invariant properties of a potential energy model by assigning a local reference frame and a local environment to each atom. Each environment contains a finite number of atoms, whose local coordinates are arranged in a symmetry-preserving way. These local coordinates are then transformed, through a sub-network, to so-called _atomic energy_. Summing up all the atomic energies gives the potential energy of the system.\n\nThe initial proof of concept is in the [Deep Potential][1] paper, which employed an approach that was devised to train the neural network model with the potential energy only. With typical _ab initio_ molecular dynamics (AIMD) datasets this is insufficient to reproduce the trajectories. The Deep Potential Molecular Dynamics ([DeePMD][2]) model overcomes this limitation. In addition, the learning process in DeePMD improves significantly over the Deep Potential method thanks to the introduction of a flexible family of loss functions. The NN potential constructed in this way reproduces accurately the AIMD trajectories, both classical and quantum (path integral), in extended and finite systems, at a cost that scales linearly with system size and is always several orders of magnitude lower than that of equivalent AIMD simulations.\n\nAlthough highly efficient, the original Deep Potential model satisfies the extensive and symmetry-invariant properties of a potential energy model at the price of introducing discontinuities in the model. This has negligible influence on a trajectory from canonical sampling but might not be sufficient for calculations of dynamical and mechanical properties. These points motivated us to develop the Deep Potential-Smooth Edition ([DeepPot-SE][3]) model, which replaces the non-smooth local frame with a smooth and adaptive embedding network. DeepPot-SE shows great ability in modeling many kinds of systems that are of interest in the fields of physics, chemistry, biology, and materials science.\n\nIn addition to building up potential energy models, DeePMD-kit can also be used to build up coarse-grained models. In these models, the quantity that we want to parameterize is the free energy, or the coarse-grained potential, of the coarse-grained particles. See the [DeePCG paper][4] for more details.\n\n#### v1\n\n- Code refactor to make it highly modularized.\n- GPU support for descriptors.\n\n#### v2\n\n- Model compression. Accelerate the efficiency of model inference 4-15 times.\n- New descriptors. Including `se_e2_r`, `se_e3`, and `se_atten` (DPA-1).\n- Hybridization of descriptors. Hybrid descriptor constructed from the concatenation of several descriptors.\n- Atom type embedding. Enable atom-type embedding to decline training complexity and refine performance.\n- Training and inference of the dipole (vector) and polarizability (matrix).\n- Split of training and validation dataset.\n- Optimized training on GPUs, including CUDA and ROCm.\n- Non-von-Neumann.\n- C API to interface with the third-party packages.\n\nSee [our v2 paper](https://doi.org/10.1063/5.0155600) for details of all features until v2.2.3.\n\n#### v3\n\n- Multiple backends supported. Add PyTorch and JAX backends.\n- The DPA2 and DPA3 models.\n- Plugin mechanisms for external models.\n\nSee [our v3 paper](https://doi.org/10.1021/acs.jctc.5c00340) for details of all features until v3.0.\n\n## Install and use DeePMD-kit\n\nJust copy and paste in 1s, and let it run.\n\n```sh\ncurl -fsSL https://dp1s.deepmodeling.com | bash\n```\n\nPlease read the [online documentation](https://deepmd.readthedocs.io/) for details and alternative installation methods.\n\nThen, read on for a brief overview of the usage of DeePMD-kit. You may start with the first step:\n\n```sh\ndp\n```\n\n## Code structure\n\nThe code is organized as follows:\n\n- `examples`: examples.\n- `deepmd`: DeePMD-kit python modules.\n- `source/lib`: source code of the core library.\n- `source/op`: Operator (OP) implementation.\n- `source/api_cc`: source code of DeePMD-kit C++ API.\n- `source/api_c`: source code of the C API.\n- `source/nodejs`: source code of the Node.js API.\n- `source/ipi`: source code of i-PI client.\n- `source/lmp`: source code of LAMMPS module.\n\n# Contributing\n\nSee [DeePMD-kit Contributing Guide](CONTRIBUTING.md) to become a contributor! 🤓\n\n[1]: https://arxiv.org/abs/1707.01478\n[2]: https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.143001\n[3]: https://arxiv.org/abs/1805.09003\n[4]: https://aip.scitation.org/doi/full/10.1063/1.5027645\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7698:3BB77:1743F1:5C85B5:6AB921F4"},"text_sha256":"817fd4f8567a94870051eae1d0284a11276e9ed50c953041c85d952facb0a627"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"zhanghang1989/PyTorch-Encoding","input_row":{"repository":"zhanghang1989/PyTorch-Encoding","url":"https://github.com/zhanghang1989/PyTorch-Encoding","name":"PyTorch-Encoding","owner":"zhanghang1989","description":"A CV toolkit for my papers.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2045,"issues":359,"created_at":"2017-05-12T18:04:54Z","updated_at":"2026-09-22T23:18:06Z","first_commit_at":"2017-05-12T18:09:40Z","last_commit_at":"2026-09-11T07:49:46Z","activity_months":111.98,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:15.068Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"zhanghang1989/PyTorch-Encoding","visibility":"public","created_at":"2017-05-12T18:04:54Z","updated_at":"2026-09-22T23:18:06Z","private":false,"fork":false,"archived":false,"stargazers_count":2045,"open_issues_count":151,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2933","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F8:6E5BD:178B53A:1BAB25C:6AB929A3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2932","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0916:70FF5:17C3AA5:1BE48CD:6AB929A3"},"commit":{"sha":"cebf13414afb9aafbe28ff25fe7fcd256051bf07","url":"https://github.com/zhanghang1989/PyTorch-Encoding/commit/cebf13414afb9aafbe28ff25fe7fcd256051bf07","date":"2018-05-16T04:41:38Z","author_date":"2018-05-16T04:41:38Z","committer_date":"2018-05-16T04:41:38Z","tree_sha":"a0d9a283d742e7f61fcd80ea94ffa435f7696e7b","message_first_line":"Adapt SyncBN API from Other's Work (#52)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2931","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5369:78367:1801ABB:1C22886:6AB929A3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1669,"blob_sha":"dbe0aca407fd76afe8841ccf349863460f256875","priority":0}],"documents":[{"path":"README.md","size":1669,"blob_sha":"dbe0aca407fd76afe8841ccf349863460f256875","priority":0,"status":200,"text":"# PyTorch-Encoding\n\ncreated by [Hang Zhang](http://hangzh.com/)\n\n## [Documentation](http://hangzh.com/PyTorch-Encoding/)\n\n- Please visit the [**Docs**](http://hangzh.com/PyTorch-Encoding/) for detail instructions of installation and usage. \n\n- How to use Synchronized Batch Normalization (SyncBN)? See the [examples](https://github.com/zhanghang1989/PyTorch-SyncBatchNorm).\n\n## Citations\n\n**Context Encoding for Semantic Segmentation** [[arXiv]](https://arxiv.org/pdf/1803.08904.pdf)  \n [Hang Zhang](http://hangzh.com/), [Kristin Dana](http://eceweb1.rutgers.edu/vision/dana.html), [Jianping Shi](http://shijianping.me/), [Zhongyue Zhang](http://zhongyuezhang.com/), [Xiaogang Wang](http://www.ee.cuhk.edu.hk/~xgwang/), [Ambrish Tyagi](https://scholar.google.com/citations?user=GaSWCoUAAAAJ&hl=en), [Amit Agrawal](http://www.amitkagrawal.com/)\n```\n@InProceedings{Zhang_2018_CVPR,\nauthor = {Zhang, Hang and Dana, Kristin and Shi, Jianping and Zhang, Zhongyue and Wang, Xiaogang and Tyagi, Ambrish and Agrawal, Amit},\ntitle = {Context Encoding for Semantic Segmentation},\nbooktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\nmonth = {June},\nyear = {2018}\n}\n```\n\n**Deep TEN: Texture Encoding Network** [[arXiv]](https://arxiv.org/pdf/1612.02844.pdf)  \n  [Hang Zhang](http://hangzh.com/), [Jia Xue](http://jiaxueweb.com/), [Kristin Dana](http://eceweb1.rutgers.edu/vision/dana.html)\n```\n@InProceedings{Zhang_2017_CVPR,\nauthor = {Zhang, Hang and Xue, Jia and Dana, Kristin},\ntitle = {Deep TEN: Texture Encoding Network},\nbooktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\nmonth = {July},\nyear = {2017}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62B0:326565:175906:5C9A65:6AB921F5"},"text_sha256":"5ba308807432c070361c70b9b06d556ec83b05e7a2142dc950a16823dedae62b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2930","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D3:52542:17B1C68:1BD2F5C:6AB929A4"},"commit":{"sha":"1b8a1c6f5c8c2b5784e714d5746bb4604b118199","url":"https://github.com/zhanghang1989/PyTorch-Encoding/commit/1b8a1c6f5c8c2b5784e714d5746bb4604b118199","date":"2026-04-27T20:45:28Z","author_date":"2026-04-27T20:45:28Z","committer_date":"2026-04-27T20:45:28Z","tree_sha":"57ece4527621516124af114ce8830a9807e039e3","message_first_line":"test signing"},"tree_request_status":200,"tree_rate":{"github_remaining":"2929","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0828:3C4024:17F17D0:1C129D7:6AB929A4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3277,"blob_sha":"42738543146153e0d71ce08b5c2ba85f8526185f","priority":0}],"documents":[{"path":"README.md","size":3277,"blob_sha":"42738543146153e0d71ce08b5c2ba85f8526185f","priority":0,"status":200,"text":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Docs](https://github.com/zhanghang1989/PyTorch-Encoding/workflows/Build%20Docs/badge.svg)](https://github.com/zhanghang1989/PyTorch-Encoding/actions)\n[![Unit Test](https://github.com/zhanghang1989/PyTorch-Encoding/workflows/Unit%20Test/badge.svg)](https://github.com/zhanghang1989/PyTorch-Encoding/actions)\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/semantic-segmentation-on-ade20k)](https://paperswithcode.com/sota/semantic-segmentation-on-ade20k?p=resnest-split-attention-networks)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/resnest-split-attention-networks/semantic-segmentation-on-pascal-context)](https://paperswithcode.com/sota/semantic-segmentation-on-pascal-context?p=resnest-split-attention-networks)\n\n# PyTorch-Encoding\n\ncreated by [Hang Zhang](http://hangzh.com/)\n\n## [Documentation](http://hangzh.com/PyTorch-Encoding/)\n\n- Please visit the [**Docs**](http://hangzh.com/PyTorch-Encoding/) for detail instructions of installation and usage. \n\n- Please visit the [link](http://hangzh.com/PyTorch-Encoding/model_zoo/imagenet.html) to image classification models.\n\n- Please visit the [link](http://hangzh.com/PyTorch-Encoding/model_zoo/segmentation.html) to semantic segmentation models.\n\n## Citations\n\n**ResNeSt: Split-Attention Networks** [[arXiv]](https://arxiv.org/abs/2004.08955)  \n  [Hang Zhang](http://hangzh.com/), Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Muller, R. Manmatha, Mu Li and Alex Smola\n```\n@article{zhang2020resnest,\ntitle={ResNeSt: Split-Attention Networks},\nauthor={Zhang, Hang and Wu, Chongruo and Zhang, Zhongyue and Zhu, Yi and Zhang, Zhi and Lin, Haibin and Sun, Yue and He, Tong and Muller, Jonas and Manmatha, R. and Li, Mu and Smola, Alexander},\njournal={arXiv preprint},\nyear={2020}\n}\n```\n\n**Context Encoding for Semantic Segmentation** [[arXiv]](https://arxiv.org/pdf/1803.08904.pdf)  \n [Hang Zhang](http://hangzh.com/), [Kristin Dana](http://eceweb1.rutgers.edu/vision/dana.html), [Jianping Shi](http://shijianping.me/), [Zhongyue Zhang](http://zhongyuezhang.com/), [Xiaogang Wang](http://www.ee.cuhk.edu.hk/~xgwang/), [Ambrish Tyagi](https://scholar.google.com/citations?user=GaSWCoUAAAAJ&hl=en), [Amit Agrawal](http://www.amitkagrawal.com/)\n```\n@InProceedings{Zhang_2018_CVPR,\nauthor = {Zhang, Hang and Dana, Kristin and Shi, Jianping and Zhang, Zhongyue and Wang, Xiaogang and Tyagi, Ambrish and Agrawal, Amit},\ntitle = {Context Encoding for Semantic Segmentation},\nbooktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\nmonth = {June},\nyear = {2018}\n}\n```\n\n**Deep TEN: Texture Encoding Network** [[arXiv]](https://arxiv.org/pdf/1612.02844.pdf)  \n  [Hang Zhang](http://hangzh.com/), [Jia Xue](http://jiaxueweb.com/), [Kristin Dana](http://eceweb1.rutgers.edu/vision/dana.html)\n```\n@InProceedings{Zhang_2017_CVPR,\nauthor = {Zhang, Hang and Xue, Jia and Dana, Kristin},\ntitle = {Deep TEN: Texture Encoding Network},\nbooktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\nmonth = {July},\nyear = {2017}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0D60:18233:174360:5C8336:6AB921FA"},"text_sha256":"5aff2ff1612ced037d3264bd882ff4b0e4416aa7236f1b54646bbbf6d5c090cb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tinghuiz/SfMLearner","input_row":{"repository":"tinghuiz/SfMLearner","url":"https://github.com/tinghuiz/SfMLearner","name":"SfMLearner","owner":"tinghuiz","description":"An unsupervised learning framework for depth and ego-motion estimation from monocular videos","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2016,"issues":145,"created_at":"2017-04-25T16:38:21Z","updated_at":"2026-08-31T05:33:15Z","first_commit_at":"2017-04-25T16:38:21Z","last_commit_at":"2021-10-26T05:58:09Z","activity_months":54.030000000000001,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:17.366Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tinghuiz/SfMLearner","visibility":"public","created_at":"2017-04-25T16:38:21Z","updated_at":"2026-08-31T05:33:15Z","private":false,"fork":false,"archived":false,"stargazers_count":2016,"open_issues_count":48,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2928","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082F:B1202:178FAD5:1BB03E3:6AB929A5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2927","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0917:76AED:17E5072:1C064B1:6AB929A5"},"commit":{"sha":"0a90250d51b2983787a208998944a3e2e2824828","url":"https://github.com/tinghuiz/SfMLearner/commit/0a90250d51b2983787a208998944a3e2e2824828","date":"2017-12-06T01:09:20Z","author_date":"2017-12-06T01:09:20Z","committer_date":"2017-12-06T01:09:20Z","tree_sha":"8cdaa59b55e6a11de28b979ed83832e8ce90be4a","message_first_line":"update README"},"tree_request_status":200,"tree_rate":{"github_remaining":"2926","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:1782EA7:1BA2B47:6AB929A6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6777,"blob_sha":"92c4c9351d4b4d973e2ca6ffe15addbdb950636f","priority":0}],"documents":[{"path":"README.md","size":6777,"blob_sha":"92c4c9351d4b4d973e2ca6ffe15addbdb950636f","priority":0,"status":200,"text":"# SfMLearner\nThis codebase implements the system described in the paper:\n\nUnsupervised Learning of Depth and Ego-Motion from Video\n\n[Tinghui Zhou](https://people.eecs.berkeley.edu/~tinghuiz/), [Matthew Brown](http://matthewalunbrown.com/research/research.html), [Noah Snavely](http://www.cs.cornell.edu/~snavely/), [David G. Lowe](http://www.cs.ubc.ca/~lowe/home.html)\n\nIn CVPR 2017 (**Oral**).\n\nSee the [project webpage](https://people.eecs.berkeley.edu/~tinghuiz/projects/SfMLearner/) for more details. Please contact Tinghui Zhou (tinghuiz@berkeley.edu) if you have any questions.\n\n<img src='misc/cityscapes_sample_results.gif' width=320>\n\n## Prerequisites\nThis codebase was developed and tested with Tensorflow 1.0, CUDA 8.0 and Ubuntu 16.04.\n\n## Running the single-view depth demo\nWe provide the demo code for running our single-view depth prediction model. First, download the pre-trained model by running the following\n```bash\nbash ./models/download_depth_model.sh\n```\nThen you can use the provided ipython-notebook `demo.ipynb` to run the demo.\n\n## Preparing training data\nIn order to train the model using the provided code, the data needs to be formatted in a certain manner. \n\nFor [KITTI](http://www.cvlibs.net/datasets/kitti/raw_data.php), first download the dataset using this [script](http://www.cvlibs.net/download.php?file=raw_data_downloader.zip) provided on the official website, and then run the following command\n```bash\npython data/prepare_train_data.py --dataset_dir=/path/to/raw/kitti/dataset/ --dataset_name='kitti_raw_eigen' --dump_root=/path/to/resulting/formatted/data/ --seq_length=3 --img_width=416 --img_height=128 --num_threads=4\n```\n\nFor [Cityscapes](https://www.cityscapes-dataset.com/), download the following packages: 1) `leftImg8bit_sequence_trainvaltest.zip`, 2) `camera_trainvaltest.zip`. Then run the following command\n```bash\npython data/prepare_train_data.py --dataset_dir=/path/to/cityscapes/dataset/ --dataset_name='cityscapes' --dump_root=/path/to/resulting/formatted/data/ --seq_length=3 --img_width=416 --img_height=171 --num_threads=4\n```\nNotice that for Cityscapes the `img_height` is set to 171 because we crop out the bottom part of the image that contains the car logo, and the resulting image will have height 128.\n\n## Training\nOnce the data are formatted following the above instructions, you should be able to train the model by running the following command\n```bash\npython train.py --dataset_dir=/path/to/the/formatted/data/ --checkpoint_dir=/where/to/store/checkpoints/ --img_width=416 --img_height=128 --batch_size=4\n```\nYou can then start a `tensorboard` session by\n```bash\ntensorboard --logdir=/path/to/tensorflow/log/files --port=8888\n```\nand visualize the training progress by opening [https://localhost:8888](https://localhost:8888) on your browser. If everything is set up properly, you should start seeing reasonable depth prediction after ~100K iterations when training on KITTI. \n\n### Notes\nAfter adding data augmentation and removing batch normalization (along with some other minor tweaks), we have been able to train depth models better than what was originally reported in the paper even without using additional Cityscapes data or the explainability regularization. The provided pre-trained model was trained on KITTI only with smooth weight set to 0.5, and achieved the following performance on the Eigen test split (Table 1 of the paper):\n\n| Abs Rel | Sq Rel | RMSE  | RMSE(log) | Acc.1 | Acc.2 | Acc.3 |\n|---------|--------|-------|-----------|-------|-------|-------|\n| 0.183   | 1.595  | 6.709 | 0.270     | 0.734 | 0.902 | 0.959 | \n\nWhen trained on 5-frame snippets, the pose model obtains the following performanace on the KITTI odometry split (Table 3 of the paper):\n\n| Seq. 09            | Seq. 10            |\n|--------------------|--------------------|\n| 0.016 (std. 0.009) | 0.013 (std. 0.009) |\n\n## Evaluation on KITTI\n\n### Depth\nWe provide evaluation code for the single-view depth experiment on KITTI. First, download our predictions (~140MB) by \n```bash\nbash ./kitti_eval/download_kitti_depth_predictions.sh\n```\nThen run\n```bash\npython kitti_eval/eval_depth.py --kitti_dir=/path/to/raw/kitti/dataset/ --pred_file=kitti_eval/kitti_eigen_depth_predictions.npy\n```\nIf everything runs properly, you should get the numbers for `Ours(CS+K)` in Table 1 of the paper. To get the numbers for `Ours cap 50m (CS+K)`, set an additional flag `--max_depth=50` when executing the above command.\n\n### Pose\nWe provide evaluation code for the pose estimation experiment on KITTI. First, download the predictions and ground-truth pose data by running\n```bash\nbash ./kitti_eval/download_kitti_pose_eval_data.sh\n```\nNotice that all the predictions and ground-truth are 5-frame snippets with the format of `timestamp tx ty tz qx qy qz qw` consistent with the [TUM evaluation toolkit](https://vision.in.tum.de/data/datasets/rgbd-dataset/tools#evaluation). Then you could run \n```bash\npython kitti_eval/eval_pose.py --gtruth_dir=/directory/of/groundtruth/trajectory/files/ --pred_dir=/directory/of/predicted/trajectory/files/\n```\nto obtain the results reported in Table 3 of the paper. For instance, to get the results of `Ours` for `Seq. 10` you could run\n```bash\npython kitti_eval/eval_pose.py --gtruth_dir=kitti_eval/pose_data/ground_truth/10/ --pred_dir=kitti_eval/pose_data/ours_results/10/\n```\n\n## KITTI Testing code\n\n### Depth\nOnce you have model trained, you can obtain the single-view depth predictions on the KITTI eigen test split formatted properly for evaluation by running\n```bash\npython test_kitti_depth.py --dataset_dir /path/to/raw/kitti/dataset/ --output_dir /path/to/output/directory --ckpt_file /path/to/pre-trained/model/file/\n```\nAgain, a sample model can be downloaded by\n```bash\nbash ./models/download_depth_model.sh\n```\n\n### Pose\nWe also provide sample testing code for obtaining pose predictions on the KITTI dataset with a pre-trained model. You can obtain the predictions formatted as above for pose evaluation by running\n```bash\npython test_kitti_pose.py --test_seq [sequence_id] --dataset_dir /path/to/KITTI/odometry/set/ --output_dir /path/to/output/directory/ --ckpt_file /path/to/pre-trained/model/file/\n```\nA sample model trained on 5-frame snippets can be downloaded by\n```bash\nbash ./models/download_pose_model.sh\n```\nThen you can obtain predictions on, say `Seq. 9`, by running\n```bash\npython test_kitti_pose.py --test_seq 9 --dataset_dir /path/to/KITTI/odometry/set/ --output_dir /path/to/output/directory/ --ckpt_file models/model-100280\n```\n\n## Other implementations\n[Pytorch](https://github.com/ClementPinard/SfmLearner-Pytorch) (by Clement Pinard)\n\n## Disclaimer\nThis is the authors' implementation of the system described in the paper and not an official Google product.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0B4:09ED:E03F9:3DFE64:6AB921FE"},"text_sha256":"209c0661584622dea570e54db1f11ff7a2907c0a2ef6d4e4c999da71dadb4d5e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2925","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DE:70FF5:17C3D16:1BE4BB9:6AB929A6"},"commit":{"sha":"65f71f10da7a0576961a869ec3b3c1a68e89f188","url":"https://github.com/tinghuiz/SfMLearner/commit/65f71f10da7a0576961a869ec3b3c1a68e89f188","date":"2021-10-26T05:58:09Z","author_date":"2021-10-26T05:58:09Z","committer_date":"2021-10-26T05:58:09Z","tree_sha":"17a57a7e856d4a7fae4609d58be2b078c0648699","message_first_line":"Merge pull request #139 from tinghuiz/update-links"},"tree_request_status":200,"tree_rate":{"github_remaining":"2924","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:17D93A9:1BFA642:6AB929A7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7162,"blob_sha":"ffb9fc7442746f2fbb6544927193d4197b139628","priority":0}],"documents":[{"path":"README.md","size":7162,"blob_sha":"ffb9fc7442746f2fbb6544927193d4197b139628","priority":0,"status":200,"text":"# SfMLearner\nThis codebase implements the system described in the paper:\n\nUnsupervised Learning of Depth and Ego-Motion from Video\n\n[Tinghui Zhou](https://people.eecs.berkeley.edu/~tinghuiz/), [Matthew Brown](http://matthewalunbrown.com/research/research.html), [Noah Snavely](http://www.cs.cornell.edu/~snavely/), [David G. Lowe](http://www.cs.ubc.ca/~lowe/home.html)\n\nIn CVPR 2017 (**Oral**).\n\nSee the [project webpage](https://people.eecs.berkeley.edu/~tinghuiz/projects/SfMLearner/) for more details. Please contact Tinghui Zhou (tinghuiz@berkeley.edu) if you have any questions.\n\n<img src='misc/cityscapes_sample_results.gif' width=320>\n\n## Prerequisites\nThis codebase was developed and tested with Tensorflow 1.0, CUDA 8.0 and Ubuntu 16.04.\n\n## Running the single-view depth demo\nWe provide the demo code for running our single-view depth prediction model. First, download the pre-trained model from this [Google Drive](https://drive.google.com/file/d/1AH5LV29Fijrz_QI3Th6ogtXJKXhd8Nm9/view?usp=sharing), and put the model files under `models/`. Then you can use the provided ipython-notebook `demo.ipynb` to run the demo.\n\n## Preparing training data\nIn order to train the model using the provided code, the data needs to be formatted in a certain manner. \n\nFor [KITTI](http://www.cvlibs.net/datasets/kitti/raw_data.php), first download the dataset using this [script](http://www.cvlibs.net/download.php?file=raw_data_downloader.zip) provided on the official website, and then run the following command\n```bash\npython data/prepare_train_data.py --dataset_dir=/path/to/raw/kitti/dataset/ --dataset_name='kitti_raw_eigen' --dump_root=/path/to/resulting/formatted/data/ --seq_length=3 --img_width=416 --img_height=128 --num_threads=4\n```\nFor the pose experiments, we used the KITTI odometry split, which can be downloaded [here](http://www.cvlibs.net/datasets/kitti/eval_odometry.php). Then you can change `--dataset_name` option to `kitti_odom` when preparing the data.\n\nFor [Cityscapes](https://www.cityscapes-dataset.com/), download the following packages: 1) `leftImg8bit_sequence_trainvaltest.zip`, 2) `camera_trainvaltest.zip`. Then run the following command\n```bash\npython data/prepare_train_data.py --dataset_dir=/path/to/cityscapes/dataset/ --dataset_name='cityscapes' --dump_root=/path/to/resulting/formatted/data/ --seq_length=3 --img_width=416 --img_height=171 --num_threads=4\n```\nNotice that for Cityscapes the `img_height` is set to 171 because we crop out the bottom part of the image that contains the car logo, and the resulting image will have height 128.\n\n## Training\nOnce the data are formatted following the above instructions, you should be able to train the model by running the following command\n```bash\npython train.py --dataset_dir=/path/to/the/formatted/data/ --checkpoint_dir=/where/to/store/checkpoints/ --img_width=416 --img_height=128 --batch_size=4\n```\nYou can then start a `tensorboard` session by\n```bash\ntensorboard --logdir=/path/to/tensorflow/log/files --port=8888\n```\nand visualize the training progress by opening [https://localhost:8888](https://localhost:8888) on your browser. If everything is set up properly, you should start seeing reasonable depth prediction after ~100K iterations when training on KITTI. \n\n### Notes\nAfter adding data augmentation and removing batch normalization (along with some other minor tweaks), we have been able to train depth models better than what was originally reported in the paper even without using additional Cityscapes data or the explainability regularization. The provided pre-trained model was trained on KITTI only with smooth weight set to 0.5, and achieved the following performance on the Eigen test split (Table 1 of the paper):\n\n| Abs Rel | Sq Rel | RMSE  | RMSE(log) | Acc.1 | Acc.2 | Acc.3 |\n|---------|--------|-------|-----------|-------|-------|-------|\n| 0.183   | 1.595  | 6.709 | 0.270     | 0.734 | 0.902 | 0.959 | \n\nWhen trained on 5-frame snippets, the pose model obtains the following performanace on the KITTI odometry split (Table 3 of the paper):\n\n| Seq. 09            | Seq. 10            |\n|--------------------|--------------------|\n| 0.016 (std. 0.009) | 0.013 (std. 0.009) |\n\n## Evaluation on KITTI\n\n### Depth\nWe provide evaluation code for the single-view depth experiment on KITTI. First, download our predictions (~140MB) from this [Google Drive](https://drive.google.com/file/d/1ERB2vUH_6to8NI9KN-ug-ijcWaQf9SIp/view?usp=sharing) and put them into `kitti_eval/`.\n\nThen run\n```bash\npython kitti_eval/eval_depth.py --kitti_dir=/path/to/raw/kitti/dataset/ --pred_file=kitti_eval/kitti_eigen_depth_predictions.npy\n```\nIf everything runs properly, you should get the numbers for `Ours(CS+K)` in Table 1 of the paper. To get the numbers for `Ours cap 50m (CS+K)`, set an additional flag `--max_depth=50` when executing the above command.\n\n### Pose\nWe provide evaluation code for the pose estimation experiment on KITTI. First, download the predictions and ground-truth pose data from this [Google Drive](https://drive.google.com/file/d/1BqTIY_PBRkFvKrFvqlhPsEaouSdo42ZZ/view?usp=sharing).\n\nNotice that all the predictions and ground-truth are 5-frame snippets with the format of `timestamp tx ty tz qx qy qz qw` consistent with the [TUM evaluation toolkit](https://vision.in.tum.de/data/datasets/rgbd-dataset/tools#evaluation). Then you could run \n```bash\npython kitti_eval/eval_pose.py --gtruth_dir=/directory/of/groundtruth/trajectory/files/ --pred_dir=/directory/of/predicted/trajectory/files/\n```\nto obtain the results reported in Table 3 of the paper. For instance, to get the results of `Ours` for `Seq. 10` you could run\n```bash\npython kitti_eval/eval_pose.py --gtruth_dir=kitti_eval/pose_data/ground_truth/10/ --pred_dir=kitti_eval/pose_data/ours_results/10/\n```\n\n## KITTI Testing code\n\n### Depth\nOnce you have model trained, you can obtain the single-view depth predictions on the KITTI eigen test split formatted properly for evaluation by running\n```bash\npython test_kitti_depth.py --dataset_dir /path/to/raw/kitti/dataset/ --output_dir /path/to/output/directory --ckpt_file /path/to/pre-trained/model/file/\n```\n\n### Pose\nWe also provide sample testing code for obtaining pose predictions on the KITTI dataset with a pre-trained model. You can obtain the predictions formatted as above for pose evaluation by running\n```bash\npython test_kitti_pose.py --test_seq [sequence_id] --dataset_dir /path/to/KITTI/odometry/set/ --output_dir /path/to/output/directory/ --ckpt_file /path/to/pre-trained/model/file/\n```\nA sample model trained on 5-frame snippets can be downloaded at this [Google Drive](https://drive.google.com/file/d/1vMg9UbK4kQSvFtJrzv0lfCVAoTN-we1y/view?usp=sharing). \n\nThen you can obtain predictions on, say `Seq. 9`, by running\n```bash\npython test_kitti_pose.py --test_seq 9 --dataset_dir /path/to/KITTI/odometry/set/ --output_dir /path/to/output/directory/ --ckpt_file models/model-100280\n```\n\n## Other implementations\n[Pytorch](https://github.com/ClementPinard/SfmLearner-Pytorch) (by Clement Pinard)\n\n## Disclaimer\nThis is the authors' implementation of the system described in the paper and not an official Google product.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FCEC:3CC8A:175E09:5C9F5C:6AB921FE"},"text_sha256":"9d29e316e5b2f1d77c436a026051cda26b14c4881f5fc91c6f622467d82ddf0c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"philipperemy/keras-tcn","input_row":{"repository":"philipperemy/keras-tcn","url":"https://github.com/philipperemy/keras-tcn","name":"keras-tcn","owner":"philipperemy","description":"Keras Temporal Convolutional Network. Supports Python and R.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2012,"issues":182,"created_at":"2018-03-22T02:40:06Z","updated_at":"2026-09-27T10:50:36Z","first_commit_at":"2018-03-22T02:40:16Z","last_commit_at":"2026-06-16T12:28:03Z","activity_months":98.829999999999998,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:19.761Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"philipperemy/keras-tcn","visibility":"public","created_at":"2018-03-22T02:40:06Z","updated_at":"2026-09-27T10:50:36Z","private":false,"fork":false,"archived":false,"stargazers_count":2012,"open_issues_count":3,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2923","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0903:156040:17C2E88:1BE368F:6AB929A7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2922","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F4:6E429:17D3B22:1BF4BB0:6AB929A8"},"commit":{"sha":"70acd31e8b02ce6dd753329a393b7f81dffcca9a","url":"https://github.com/philipperemy/keras-tcn/commit/70acd31e8b02ce6dd753329a393b7f81dffcca9a","date":"2018-05-17T14:54:36Z","author_date":"2018-05-17T14:54:36Z","committer_date":"2018-05-17T14:54:36Z","tree_sha":"16bffb211c47f240f9d9323e241f77792bcb9e55","message_first_line":"Fix warnings"},"tree_request_status":200,"tree_rate":{"github_remaining":"2921","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0862:7307A:17AB49A:1BCC23C:6AB929A8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3879,"blob_sha":"2794e0c0ee104515e9e5e835b4c19334ee83baf7","priority":0}],"documents":[{"path":"README.md","size":3879,"blob_sha":"2794e0c0ee104515e9e5e835b4c19334ee83baf7","priority":0,"status":200,"text":"# Keras TCN\n*Keras Temporal Convolutional Network*\n\n * [Keras TCN](#keras-tcn)\n    * [Why Temporal Convolutional Network?](#why-temporal-convolutional-network)\n    * [API](#api)\n       * [Regression (Many to one) e.g. adding problem](#--regression-many-to-one-eg-adding-problem)\n       * [Classification (Many to one) e.g. copy memory task](#--classification-many-to-one-eg-copy-memory-task)\n       * [Classification (Many to one) e.g. sequential mnist task](#--classification-many-to-one-eg-sequential-mnist-task)\n    * [Installation](#installation)\n    * [Run](#run)\n    * [Tasks](#tasks)\n    * [References](#references)\n\n## Why Temporal Convolutional Network?\n\n- TCNs exhibit longer memory than recurrent architectures with the same capacity.\n- Constantly performs better than LSTM/GRU architectures on a vast range of tasks (Seq. MNIST, Adding Problem, Copy Memory, Word-level PTB...).\n- Parallelism, flexible receptive field size, stable gradients, low memory requirements for training, variable length inputs...\n\n<p align=\"center\">\n  <img src=\"misc/Dilated_Conv.png\">\n  <b>Visualization of a stack of dilated causal convolutional layers (Wavenet, 2016)<\/b><br><br>\n<\/p>\n\n## API\n\nAfter installation, the model can be imported like this:\n\n```\nfrom tcn import tcn\n```\n\nIn the following examples, we assume the input to have a shape `(batch_size, timesteps, input_dim)`.\n\nThe model is a Keras model. The model functions (`model.summary`, `model.fit`, `model.predict`...) are all functional.\n\n\n\n### - Regression (Many to one) e.g. adding problem\n\n```\nmodel = tcn.dilated_tcn(output_slice_index='last',\n                        num_feat=input_dim,\n\t\t\t\t\t\tnum_classes=None,\n                        nb_filters=24,\n                        kernel_size=8,\n                        dilatations=[1, 2, 4, 8],\n                        nb_stacks=8,\n                        max_len=timesteps,\n                        activation='norm_relu',\n                        regression=True)\n```\n\n### - Classification (Many to many) e.g. copy memory task\n\n```\nmodel = tcn.dilated_tcn(num_feat=input_dim,\n                        num_classes=10,\n                        nb_filters=10,\n                        kernel_size=8,\n                        dilatations=[1, 2, 4, 8],\n                        nb_stacks=8,\n                        max_len=timesteps,\n                        activation='norm_relu')\n```\n\n### - Classification (Many to one) e.g. sequential mnist task\n\n```\nmodel = tcn.dilated_tcn(output_slice_index='last',\n                        num_feat=input_dim,\n                        num_classes=10,\n                        nb_filters=64,\n                        kernel_size=8,\n                        dilatations=[1, 2, 4, 8],\n                        nb_stacks=8,\n                        max_len=timesteps,\n                        activation='norm_relu')\n```\n\n## Installation\n\n```\ngit clone git@github.com:philipperemy/keras-tcn.git\ncd keras-tcn\nvirtualenv -p python3.6 venv\nsource venv/bin/activate\npip install -r requirements.txt # change to tensorflow if you dont have a gpu.\npip install . # install keras-tcn\n```\n\n## Run\n\n```\ncd adding_problem/\npython main.py # run adding problem task\n\ncd copy_memory/\npython main.py # run copy memory task\n\ncd mnist_pixel/\npython main.py # run sequential mnist pixel task\n```\n\n## Tasks\n\n<p align=\"center\">\n  <img src=\"misc/Adding_Task.png\">\n  <b>Adding Problem Task<\/b><br><br>\n<\/p>\n\n\n<p align=\"center\">\n  <img src=\"misc/Copy_Memory_Task.png\">\n  <b>Copy Memory Task<\/b><br><br>\n<\/p>\n\n\n<p align=\"center\">\n  <img src=\"misc/Sequential_MNIST_Task.png\">\n  <b>Sequential MNIST<\/b><br><br>\n<\/p>\n\n\n## References\n- https://github.com/locuslab/TCN/ (TCN for Pytorch)\n- https://arxiv.org/pdf/1803.01271.pdf (An Empirical Evaluation of Generic Convolutional and Recurrent Networks\nfor Sequence Modeling)\n- https://arxiv.org/pdf/1609.03499.pdf (Original Wavenet paper)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D1C:29FD16:17D550:5D164E:6AB921FF"},"text_sha256":"b3809952b1bc50db9d65cf0d0f41154c66e047e88d0de0e226d7d4421e8de43f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2920","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FD:37D6E2:17FE5D7:1C1FA0E:6AB929A9"},"commit":{"sha":"7576256b8b2a138b88ae2483b8616681686e424f","url":"https://github.com/philipperemy/keras-tcn/commit/7576256b8b2a138b88ae2483b8616681686e424f","date":"2026-06-16T12:28:03Z","author_date":"2026-06-16T12:28:03Z","committer_date":"2026-06-16T12:28:03Z","tree_sha":"656e8cd04b04337986240188a7408396cc93e784","message_first_line":"Merge pull request #285 from mw66/fix_lr"},"tree_request_status":200,"tree_rate":{"github_remaining":"2919","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:1775F4C:1B971AF:6AB929A9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13232,"blob_sha":"bca54479dc278b9da4559b8ad9b5afcea2f05546","priority":0}],"documents":[{"path":"README.md","size":13232,"blob_sha":"bca54479dc278b9da4559b8ad9b5afcea2f05546","priority":0,"status":200,"text":"# Keras TCN\n\n*Keras Temporal Convolutional Network*. [[paper](https://arxiv.org/abs/1803.01271)]\n\nTested with Tensorflow 2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2.15, 2.16, 2.17, 2.18, 2.19 (Mar 13, 2025).\n\nFor a fully working example of Keras TCN using **R Language**, [browse here](https://github.com/philipperemy/keras-tcn/issues/246).\n\n[![Downloads](https://pepy.tech/badge/keras-tcn)](https://pepy.tech/project/keras-tcn)\n[![Downloads](https://pepy.tech/badge/keras-tcn/month)](https://pepy.tech/project/keras-tcn)\n![Keras TCN CI](https://github.com/philipperemy/keras-tcn/workflows/Keras%20TCN%20CI/badge.svg?branch=master)\n```bash\npip install keras-tcn\n```\n\nFor [MacOS users](https://developer.apple.com/metal/tensorflow-plugin/) to use the GPU: `pip install tensorflow-metal`.\n\n## Why TCN (Temporal Convolutional Network) instead of LSTM/GRU?\n\n- TCNs exhibit longer memory than recurrent architectures with the same capacity.\n- Performs better than LSTM/GRU on long time series (Seq. MNIST, Adding Problem, Copy Memory, Word-level PTB...).\n- Parallelism (convolutional layers), flexible receptive field size (how far the model can see), stable gradients (compared to backpropagation through time, vanishing gradients)...\n\n<p align=\"center\">\n  <img src=\"misc/Dilated_Conv.png\">\n  <b>Visualization of a stack of dilated causal convolutional layers (Wavenet, 2016)<\/b><br><br>\n<\/p>\n\n## TCN Layer\n\n### TCN Class\n\n```python\nTCN(\n    nb_filters=64,\n    kernel_size=3,\n    nb_stacks=1,\n    dilations=(1, 2, 4, 8, 16, 32),\n    padding='causal',\n    use_skip_connections=True,\n    dropout_rate=0.0,\n    return_sequences=False,\n    activation='relu',\n    kernel_initializer='he_normal',\n    use_batch_norm=False,\n    use_layer_norm=False,\n    go_backwards=False,\n    return_state=False,\n    **kwargs\n)\n```\n\n### Arguments\n\n- `nb_filters`: Integer. The number of filters to use in the convolutional layers. Would be similar to `units` for LSTM. Can be a list.\n- `kernel_size`: Integer. The size of the kernel to use in each convolutional layer.\n- `dilations`: List/Tuple. A dilation list. Example is: [1, 2, 4, 8, 16, 32, 64].\n- `nb_stacks`: Integer. The number of stacks of residual blocks to use.\n- `padding`: String. The padding to use in the convolutions. 'causal' for a causal network (as in the original implementation) and 'same' for a non-causal network.\n- `use_skip_connections`: Boolean. If we want to add skip connections from input to each residual block.\n- `return_sequences`: Boolean. Whether to return the last output in the output sequence, or the full sequence.\n- `dropout_rate`: Float between 0 and 1. Fraction of the input units to drop.\n- `activation`: The activation used in the residual blocks o = activation(x + F(x)).\n- `kernel_initializer`: Initializer for the kernel weights matrix (Conv1D).\n- `use_batch_norm`: Whether to use batch normalization in the residual layers or not.\n- `use_layer_norm`: Whether to use layer normalization in the residual layers or not.\n- `go_backwards`: Boolean (default False). If True, process the input sequence backwards and return the reversed sequence.\n- `return_state`: Boolean. Whether to return the last state in addition to the output. Default: False.\n- `kwargs`: Any other set of arguments for configuring the parent class Layer. For example \"name=str\", Name of the model. Use unique names when using multiple TCN.\n\n### Input shape\n\n3D tensor with shape `(batch_size, timesteps, input_dim)`.\n\n`timesteps` can be `None`. This can be useful if each sequence is of a different length: [Multiple Length Sequence Example](tasks/multi_length_sequences.py).\n\n### Output shape\n\n- if `return_sequences=True`: 3D tensor with shape `(batch_size, timesteps, nb_filters)`.\n- if `return_sequences=False`: 2D tensor with shape `(batch_size, nb_filters)`.\n\n\n### How do I choose the correct set of parameters to configure my TCN layer?\n\nHere are some of my notes regarding my experience using TCN:\n\n- `nb_filters`: Present in any ConvNet architecture. It is linked to the predictive power of the model and affects the size of your network. The more, the better unless you start to overfit. It's similar to the number of units in an LSTM/GRU architecture too.\n- `kernel_size`: Controls the spatial area/volume considered in the convolutional ops. Good values are usually between 2 and 8. If you think your sequence heavily depends on t-1 and t-2, but less on the rest, then choose a kernel size of 2/3. For NLP tasks, we prefer bigger kernel sizes. A large kernel size will make your network much bigger.\n- `dilations`: It controls how deep your TCN layer is. Usually, consider a list with multiple of two. You can guess how many dilations you need by matching the receptive field (of the TCN) with the length of features in your sequence. For example, if your input sequence is periodic, you might want to have multiples of that period as dilations.\n- `nb_stacks`: Not very useful unless your sequences are very long (like waveforms with hundreds of thousands of time steps).\n- `padding`: I have only used `causal` since a TCN stands for Temporal Convolutional Networks. Causal prevents information leakage.\n- `use_skip_connections`: Skip connections connects layers, similarly to DenseNet. It helps the gradients flow. Unless you experience a drop in performance, you should always activate it.\n- `return_sequences`: Same as the one present in the LSTM layer. Refer to the Keras doc for this parameter.\n- `dropout_rate`: Similar to `recurrent_dropout` for the LSTM layer. I usually don't use it much. Or set it to a low value like `0.05`.\n- `activation`: Leave it to default. I have never changed it.\n- `kernel_initializer`: If the training of the TCN gets stuck, it might be worth changing this parameter. For example: `glorot_uniform`.\n\n- `use_batch_norm`, `use_layer_norm`: Use normalization if your network is big enough and the task contains enough data. I usually prefer using `use_layer_norm`, but you can try and see which one works the best.\n\n\n### Receptive field\n\nThe receptive field is defined as: the maximum number of steps back in time from current sample at time T, that a filter from (block, layer, stack, TCN) can hit (effective history) + 1. The receptive field of the TCN can be calculated using the formula:\n<p align=\"center\">\n  <img width=\"400\" src=\"https://user-images.githubusercontent.com/4516927/112719508-a55bd200-8f3c-11eb-83c0-88c6171a07d7.png\">\n<\/p>\n\nwhere N<sub>stack<\/sub> is the number of stacks, N<sub>b<\/sub> is the number of residual blocks per stack, d is a vector containing the dilations of each residual block in each stack, and K is the kernel size. The 2 is there because there are two `Conv1d` layers in a single `ResidualBlock`.\n\nIdeally you want your receptive field to be bigger than the largest length of input sequence, if you pass a sequence longer than your receptive field into the model, any extra values (further back in the sequence) will be replaced with zeros.\n\n#### Examples\n\n*NOTE*: Unlike the TCN, example figures only include a single `Conv1d` per layer, so the formula becomes R<sub>field<\/sub> = 1 + (K-1)⋅N<sub>stack<\/sub>⋅Σi di (without the factor 2).\n\n- If a dilated conv net has only one stack of residual blocks with a kernel size of `2` and dilations `[1, 2, 4, 8]`, its receptive field is `16`. The image below illustrates it:\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/40159126/41830054-10e56fda-7871-11e8-8591-4fa46680c17f.png\">\n  <b>ks = 2, dilations = [1, 2, 4, 8], 1 block<\/b><br><br>\n<\/p>\n\n- If a dilated conv net has 2 stacks of residual blocks, you would have the situation below, that is, an increase in the receptive field up to 31:\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/40159126/41830618-a8f82a8a-7874-11e8-9d4f-2ebb70a31465.jpg\">\n  <b>ks = 2, dilations = [1, 2, 4, 8], 2 blocks<\/b><br><br>\n<\/p>\n\n\n- If we increased the number of stacks to 3, the size of the receptive field would increase again, such as below:\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/40159126/41830628-ae6e73d4-7874-11e8-8ecd-cea37efa33f1.jpg\">\n  <b>ks = 2, dilations = [1, 2, 4, 8], 3 blocks<\/b><br><br>\n<\/p>\n\n\n### Non-causal TCN\n\nMaking the TCN architecture non-causal allows it to take the future into consideration to do its prediction as shown in the figure below.\n\nHowever, it is not anymore suitable for real-time applications.\n\n<p align=\"center\">\n  <img src=\"misc/Non_Causal.png\">\n  <b>Non-Causal TCN - ks = 3, dilations = [1, 2, 4, 8], 1 block<\/b><br><br>\n<\/p>\n\nTo use a non-causal TCN, specify `padding='valid'` or `padding='same'` when initializing the TCN layers.\n\n## Run\n\nOnce `keras-tcn` is installed as a package, you can take a glimpse of what is possible to do with TCNs. Some tasks examples are available in the repository for this purpose:\n\n```bash\ncd adding_problem/\npython main.py # run adding problem task\n\ncd copy_memory/\npython main.py # run copy memory task\n\ncd mnist_pixel/\npython main.py # run sequential mnist pixel task\n```\n\nReproducible results are possible on (NVIDIA) GPUs using the [tensorflow-determinism](https://github.com/NVIDIA/tensorflow-determinism) library. It was tested with keras-tcn by @lingdoc.\n\n## Tasks\n\n### Word PTB\n\nLanguage modeling remains one of the primary applications of recurrent networks. In this example, we show that TCN can beat LSTM on the [WordPTB](tasks/word_ptb/README.md) task, without too much tuning.\n\n<p align=\"center\">\n  <img src=\"tasks/word_ptb/result.png\" width=\"800\"><br>\n  <i>TCN vs LSTM (comparable number of weights)<\/i><br><br>\n<\/p>\n\n### Adding Task\n\nThe task consists of feeding a large array of decimal numbers to the network, along with a boolean array of the same length. The objective is to sum the two decimals where the boolean array contain the two 1s.\n\n#### Explanation\n\n<p align=\"center\">\n  <img src=\"misc/Adding_Task.png\">\n  <b>Adding Problem Task<\/b><br><br>\n<\/p>\n\n#### Implementation results\n\n```\n782/782 [==============================] - 154s 197ms/step - loss: 0.8437 - val_loss: 0.1883\n782/782 [==============================] - 154s 196ms/step - loss: 0.0702 - val_loss: 0.0111\n[...]\n782/782 [==============================] - 152s 194ms/step - loss: 6.9630e-04 - val_loss: 3.7180e-04\n```\n\n### Copy Memory Task\n\nThe copy memory consists of a very large array:\n- At the beginning, there's the vector x of length N. This is the vector to copy.\n- At the end, N+1 9s are present. The first 9 is seen as a delimiter.\n- In the middle, only 0s are there.\n\nThe idea is to copy the content of the vector x to the end of the large array. The task is made sufficiently complex by increasing the number of 0s in the middle.\n\n#### Explanation\n\n<p align=\"center\">\n  <img src=\"misc/Copy_Memory_Task.png\">\n  <b>Copy Memory Task<\/b><br><br>\n<\/p>\n\n#### Implementation results (first epochs)\n\n```\n118/118 [==============================] - 17s 143ms/step - loss: 1.1732 - accuracy: 0.6725 - val_loss: 0.1119 - val_accuracy: 0.9796\n[...]\n118/118 [==============================] - 15s 125ms/step - loss: 0.0268 - accuracy: 0.9885 - val_loss: 0.0206 - val_accuracy: 0.9908\n118/118 [==============================] - 15s 125ms/step - loss: 0.0228 - accuracy: 0.9900 - val_loss: 0.0169 - val_accuracy: 0.9933\n```\n\n### Sequential MNIST\n\n#### Explanation\n\nThe idea here is to consider MNIST images as 1-D sequences and feed them to the network. This task is particularly hard because sequences are 28*28 = 784 elements. In order to classify correctly, the network has to remember all the sequence. Usual LSTM are unable to perform well on this task.\n\n<p align=\"center\">\n  <img src=\"misc/Sequential_MNIST_Task.png\">\n  <b>Sequential MNIST<\/b><br><br>\n<\/p>\n\n#### Implementation results\n\n```\n1875/1875 [==============================] - 46s 25ms/step - loss: 0.0949 - accuracy: 0.9706 - val_loss: 0.0763 - val_accuracy: 0.9756\n1875/1875 [==============================] - 46s 25ms/step - loss: 0.0831 - accuracy: 0.9743 - val_loss: 0.0656 - val_accuracy: 0.9807\n[...]\n1875/1875 [==============================] - 46s 25ms/step - loss: 0.0486 - accuracy: 0.9840 - val_loss: 0.0572 - val_accuracy: 0.9832\n1875/1875 [==============================] - 46s 25ms/step - loss: 0.0453 - accuracy: 0.9858 - val_loss: 0.0424 - val_accuracy: 0.9862\n```\n\n## R Language\n\nFor a fully working example of Keras TCN using **R Language**, [browse here](https://github.com/philipperemy/keras-tcn/issues/246).\n\n## References\n- https://github.com/locuslab/TCN/ (TCN for Pytorch)\n- https://arxiv.org/pdf/1803.01271 (An Empirical Evaluation of Generic Convolutional and Recurrent Networks\nfor Sequence Modeling)\n- https://arxiv.org/pdf/1609.03499 (Original Wavenet paper)\n- - https://github.com/Baichenjia/Tensorflow-TCN (Tensorflow Eager implementation of TCNs)\n\n## Citation\n\n```\n@misc{KerasTCN,\n  author = {Philippe Remy},\n  title = {Temporal Convolutional Networks for Keras},\n  year = {2020},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/philipperemy/keras-tcn}},\n}\n```\n\n## Contributors\n\n<a href=\"https://github.com/philipperemy/keras-tcn/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=philipperemy/keras-tcn\" />\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0B4:09ED:E0411:3DFEDA:6AB921FF"},"text_sha256":"1ada0fa3dd58058c907cdbd852960a19eabc2613b79a0da2772e50f93fdbb641"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"GPflow/GPflow","input_row":{"repository":"GPflow/GPflow","url":"https://github.com/GPflow/GPflow","name":"GPflow","owner":"GPflow","description":"Gaussian processes in TensorFlow","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1917,"issues":824,"created_at":"2016-01-14T11:29:24Z","updated_at":"2026-09-08T12:14:30Z","first_commit_at":"2016-01-14T11:29:24Z","last_commit_at":"2026-06-16T13:25:48Z","activity_months":125.04000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:22.335Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"GPflow/GPflow","visibility":"public","created_at":"2016-01-14T11:29:24Z","updated_at":"2026-09-08T12:14:30Z","private":false,"fork":false,"archived":false,"stargazers_count":1917,"open_issues_count":169,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2918","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0833:1DB627:1860EF3:1C8249C:6AB929AA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2917","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:17F9999:1C1AFB1:6AB929AA"},"commit":{"sha":"147ce61e840ba80d3b387018c24026f32231e200","url":"https://github.com/GPflow/GPflow/commit/147ce61e840ba80d3b387018c24026f32231e200","date":"2018-05-22T21:33:17Z","author_date":"2018-05-22T21:33:17Z","committer_date":"2018-05-22T21:33:17Z","tree_sha":"a07772a3679de60add995d615ec764b119cd37a7","message_first_line":"Logger in the settings (#764)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2916","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0836:62B94:17B0CCB:1BD1D55:6AB929AB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5430,"blob_sha":"91fdad455f0e7c621fd2e129ac73e851fbf2ee5a","priority":0}],"documents":[{"path":"README.md","size":5430,"blob_sha":"91fdad455f0e7c621fd2e129ac73e851fbf2ee5a","priority":0,"status":200,"text":"# GPflow\n\nGPflow is a package for building Gaussian process models in python, using [TensorFlow](http://www.tensorflow.org). It was originally created and is now managed by [James Hensman](http://www.lancaster.ac.uk/staff/hensmanj/) and [Alexander G. de G. Matthews](http://mlg.eng.cam.ac.uk/?portfolio=alex-matthews).\nThe full list of [contributors](http://github.com/GPflow/GPflow/graphs/contributors) (in alphabetical order) is Artem Artemev, Rasmus Bonnevie, Alexis Boukouvalas, Ivo Couckuyt, Keisuke Fujii, Zoubin Ghahramani, David J. Harris, James Hensman, Pablo Leon-Villagra, Daniel Marthaler, Alexander G. de G. Matthews, Tom Nickson, Valentine Svensson, Mark van der Wilk. GPflow is an open source project so if you feel you have some relevant skills and are interested in contributing then please do contact us.\n\n[![Python3.5 Status](https://travis-ci.org/GPflow/GPflow.svg?branch=master)](https://travis-ci.org/GPflow/GPflow)\n[![Coverage Status](http://codecov.io/github/GPflow/GPflow/coverage.svg?branch=master)](http://codecov.io/github/GPflow/GPflow?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/gpflow/badge/?version=master)](http://gpflow.readthedocs.io/en/master/?badge=master)\n\n## What does GPflow do?\n\nGPflow implements modern Gaussian process inference for composable kernels and likelihoods. The [online user manual](http://gpflow.readthedocs.io/en/latest/) contains more details. The interface follows on from [GPy](http://github.com/sheffieldml/gpy), for more discussion of the comparison see [this page](http://gpflow.readthedocs.io/en/latest/intro.html#what-s-the-difference-between-gpy-and-gpflow).\n\nGPflow uses [TensorFlow](http://www.tensorflow.org) for running computations, which allows fast execution on GPUs, and uses Python 3.5 or above.\n\n## Install\n\n### 1) Quick install\nGPflow can be installed by cloning the repository and running\n```\npip install .\n```\nin the root folder. This also installs required dependencies including TensorFlow. When GPU support is needed, a manual installation of TensorFlow is recommended (next section), as one cannot rely on pip to get this running.\n\n### 2) Alternative method\nA different option to install GPflow requires installation of TensorFlow first. Please see instructions on the main TensorFlow [webpage](https://www.tensorflow.org/versions/r1.3/get_started/get_started). You will need at least version 1.3 (we aim to support the latest version). We find that for most users pip installation is the fastest way to get going. Then, for those interested in modifying the source of GPflow, we recommend\n```\npython setup.py develop\n```\nbut installation should work well too:\n```\npython setup.py install\n```\nYou can run the tests with `python setup.py test`.\n\nWe document the [version history](https://github.com/GPflow/GPflow/blob/master/RELEASE.md).\n\n### Docker image\n\nWe also provide a [Docker image](https://hub.docker.com/r/gpflow/gpflow/) which can be run using\n\n```\ndocker run -it -p 8888:8888 gpflow/gpflow\n```\n\nThe image can be generated using our [Dockerfile](Dockerfile).\n\n## Getting help\nPlease use GitHub issues to start discussion on the use of GPflow. Tagging enquiries `discussion` helps us distinguish them from bugs.\n\n## Contributing\nAll constructive input is gratefully received. For more information, see the [notes for contributors](contributing.md).\n\n## Compatibility\n\nGPflow heavily depends on TensorFlow and as far as TensorFlow supports forward compatibility, GPflow should as well. The version of GPflow can give you a hint about backward compatibility. If the major version has changed then you need to check the release notes to find out how the API has been changed.\n\nUnfortunately, there is no such thing as backward compatibility for GPflow _models_, which means that a model implementation can change without changing interfaces. In other words, the TensorFlow graph can be different for the same models from different versions of GPflow.\n\n## Projects using GPflow\n\nA few projects building on GPflow and demonstrating its usage are listed below.\n\n| Project | Description |\n| --- | --- |\n| [GPflowOpt](https://github.com/GPflow/GPflowOpt)       | Bayesian Optimization using GPflow. |\n| [VFF](https://github.com/jameshensman/VFF)       | Variational Fourier Features for Gaussian Processes. |\n| [Doubly-Stochastic-DGP](https://github.com/ICL-SML/Doubly-Stochastic-DGP)| Deep Gaussian Processes with Doubly Stochastic Variational Inference.|\n| [BranchedGP](https://github.com/ManchesterBioinference/BranchedGP) | Gaussian processes with branching kernels.|\n| [gpflow-monitor](https://github.com/markvdw/gpflow-monitor) | Tools for monitoring and checkpoining optimisation. |\n\nLet us know if you would like your project listed here.\n\n## Citing GPflow\n\nTo cite GPflow, please reference the [JMLR paper](http://www.jmlr.org/papers/volume18/16-537/16-537.pdf). Sample Bibtex is given below:\n\n```\n@ARTICLE{GPflow2017,\n   author = {Matthews, Alexander G. de G. and {van der Wilk}, Mark and Nickson, Tom and\n\tFujii, Keisuke. and {Boukouvalas}, Alexis and {Le{\\'o}n-Villagr{\\'a}}, Pablo and\n\tGhahramani, Zoubin and Hensman, James},\n    title = \"{{GP}flow: A {G}aussian process library using {T}ensor{F}low}\",\n  journal = {Journal of Machine Learning Research},\n  year    = {2017},\n  month = {apr},\n  volume  = {18},\n  number  = {40},\n  pages   = {1-6},\n  url     = {http://jmlr.org/papers/v18/16-537.html}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5FA8:386840:17F1C0:5D3391:6AB92202"},"text_sha256":"c8aac89c6bc58afab364ed0aaf6b26df989ab630a86d6738712437f475e6ed7e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2915","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FF:71E0C:17E0E24:1C00DA2:6AB929AB"},"commit":{"sha":"7c294618e9ea721e62fbd5449971c43d02107ab4","url":"https://github.com/GPflow/GPflow/commit/7c294618e9ea721e62fbd5449971c43d02107ab4","date":"2026-06-16T13:25:48Z","author_date":"2026-06-16T13:25:48Z","committer_date":"2026-06-16T13:25:48Z","tree_sha":"965562120841a9abedd3c1902a4ea8591032dcff","message_first_line":"Bump version to 2.11.1 (#2165)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2914","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17BF530:1BE07F8:6AB929AC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11316,"blob_sha":"3111290a7380cab4c05e8dba2dd29ae034e3042d","priority":0}],"documents":[{"path":"README.md","size":11316,"blob_sha":"3111290a7380cab4c05e8dba2dd29ae034e3042d","priority":0,"status":200,"text":"<div style=\"text-align:center\">\n<img width=\"500\" height=\"200\" src=\"https://github.com/GPflow/GPflow/blob/develop/doc/sphinx/_static/gpflow_logo.svg\">\n<\/div>\n\n[![CircleCI](https://circleci.com/gh/GPflow/GPflow/tree/develop.svg?style=svg)](https://circleci.com/gh/GPflow/GPflow/tree/develop)\n[![Coverage Status](http://codecov.io/github/GPflow/GPflow/coverage.svg?branch=master)](http://codecov.io/github/GPflow/GPflow?branch=master)\n[![Slack Status](https://img.shields.io/badge/slack-gpflow-green.svg?logo=Slack)](https://join.slack.com/t/gpflow/shared_invite/enQtOTE5MDA0Nzg5NjA2LTYwZWI3MzhjYjNlZWI1MWExYzZjMGNhOWIwZWMzMGY0YjVkYzAyYjQ4NjgzNDUyZTgyNzcwYjAyY2QzMWRmYjE)\n\n\n[Website](https://gpflow.org) |\n[Documentation (release)](https://gpflow.github.io/GPflow/) |\n[Documentation (develop)](https://gpflow.github.io/GPflow/develop) |\n[Glossary](GLOSSARY.md)\n\n#### Table of Contents\n<!-- created with help from https://github.com/ekalinin/github-markdown-toc and further manual adjustments -->\n\n* [What does GPflow do?](#what-does-gpflow-do)\n* [Installation](#installation)\n* [Getting Started with GPflow 2.0](#getting-started-with-gpflow-20)\n* [The GPflow Community](#the-gpflow-community)\n   * [Getting help](#getting-help)\n   * [Slack workspace](#slack-workspace)\n   * [Contributing](#contributing)\n   * [Projects using GPflow](#projects-using-gpflow)\n* [Version Compatibility](#version-compatibility)\n   * [TensorFlow 1.x and GPflow 1.x](#tensorflow-1x-and-gpflow-1x)\n* [Citing GPflow](#citing-gpflow)\n\n\n## What does GPflow do?\n\nGPflow is a package for building Gaussian process models in Python.\nIt implements modern Gaussian process inference for composable kernels and likelihoods.\n\nGPflow builds on [TensorFlow 2.4+](http://www.tensorflow.org) and [TensorFlow Probability](https://www.tensorflow.org/probability/) for running computations, which allows fast execution on GPUs.\n\nThe [online documentation (latest release)](https://gpflow.github.io/GPflow/)/[(develop)](https://gpflow.github.io/GPflow/develop) contains more details.\n\n\n### Maintainers\n\nIt was originally created by [James Hensman](http://jameshensman.github.io/) and [Alexander G. de G. Matthews](https://github.com/alexggmatthews).\nIt is now actively maintained by (in alphabetical order)\n[Artem Artemev](http://github.com/awav/),\n[Mark van der Wilk](https://markvdw.github.io/),\n[ST John](https://github.com/st--),\nand [Vincent Dutordoir](https://vdutor.github.io/).\nGPflow would not be the same without the community. **We are grateful to [all contributors](CONTRIBUTORS.md) who have helped shape GPflow.**\n\n *GPflow is an open source project. If you have relevant skills and are interested in contributing then please do contact us (see [\"The GPflow community\" section](#the-gpflow-community) below).*\n\n\n## Installation\n\n### Requirements\n\nGPflow depends on both TensorFlow (TF, version ≥ 2.4) and TensorFlow Probability (TFP, version ≥ 0.12). We support Python ≥ 3.7.\n\n**NOTE:** TensorFlow Probability releases are tightly coupled to TensorFlow, e.g. TFP 0.14 requires TF>=2.6, TFP 0.13 requires TF>=2.5, and TFP 0.12 requires TF>=2.4. Unfortunately, this is _not_ specified in TFP's dependencies. So if you already have an (older) version of TensorFlow installed, GPflow will pull in the latest TFP, which will be incompatible. If you get errors such as `ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.4`, you have to either upgrade TensorFlow (`pip install -U tensorflow`) or manually install an older version of the `tensorflow_probability` package.\n\n### Latest (stable) release from PyPI\n\n```bash\npip install gpflow\n```\n\n### Latest (bleeding-edge) source from GitHub\n\n*Be aware that the `develop` branch may change regularly, and new commits may break your code.*\n\nIn a check-out of the `develop` branch of the [GPflow GitHub repository](https://github.com/GPflow/GPflow), run\n```bash\npip install -e .\n```\n\nAlternatively, you can install the latest GitHub `develop` version using `pip`:\n```bash\npip install git+https://github.com/GPflow/GPflow.git@develop#egg=gpflow\n```\nThis will automatically install all required dependencies.\n\n## Getting Started with GPflow 2.0\n\nThere is an [\"Intro to GPflow 2.0\"](https://gpflow.github.io/GPflow/develop/notebooks/intro_to_gpflow2.html) Jupyter notebook; check it out for details.\nTo convert your code from GPflow 1 check the [GPflow 2 upgrade guide](https://gpflow.github.io/GPflow/develop/notebooks/gpflow2_upgrade_guide.html).\n\n\n## The GPflow Community\n\n### Getting help\n\n**Bugs, feature requests, pain points, annoying design quirks, etc:**\nPlease use [GitHub issues](https://github.com/GPflow/GPflow/issues/) to flag up bugs/issues/pain points, suggest new features, and discuss anything else related to the use of GPflow that in some sense involves changing the GPflow code itself.\nYou can make use of the [labels](https://github.com/GPflow/GPflow/labels) such as [`bug`](https://github.com/GPflow/GPflow/labels/bug), [`discussion`](https://github.com/GPflow/GPflow/labels/discussion), [`feature`](https://github.com/GPflow/GPflow/labels/feature), [`feedback`](https://github.com/GPflow/GPflow/labels/feedback), etc.\nWe positively welcome comments or concerns about usability, and suggestions for changes at any level of design.\n\nWe aim to respond to issues promptly, but if you believe we may have forgotten about an issue, please feel free to add another comment to remind us.\n\n**\"How-to-use\" questions:**\nPlease use [Stack Overflow (gpflow tag)](https://stackoverflow.com/tags/gpflow) to ask questions that relate to \"how to use GPflow\", i.e. questions of understanding rather than issues that require changing GPflow code. (If you are unsure where to ask, you are always welcome to open a GitHub issue; we may then ask you to move your question to Stack Overflow.)\n\n### Slack workspace\n\nWe have a public [GPflow slack workspace](https://gpflow.slack.com/). Please use this [invite link](https://join.slack.com/t/gpflow/shared_invite/enQtOTE5MDA0Nzg5NjA2LTYwZWI3MzhjYjNlZWI1MWExYzZjMGNhOWIwZWMzMGY0YjVkYzAyYjQ4NjgzNDUyZTgyNzcwYjAyY2QzMWRmYjE) if you'd like to join, whether to ask short informal questions or to be involved in the discussion and future development of GPflow.\n\n### Contributing\n\nAll constructive input is gratefully received. For more information, see the [notes for contributors](CONTRIBUTING.md).\n\n### Projects using GPflow\n\nProjects building on GPflow and demonstrating its usage are listed below. The following projects are based on the current GPflow 2.x release:\n\n| Project | Description |\n| --- | --- |\n| [Trieste](https://github.com/secondmind-labs/trieste)       | Bayesian optimization with TensorFlow, with out-of-the-box support for GPflow (2.x) models. |\n| [VFF](https://github.com/st--/VFF)       | Variational Fourier Features for Gaussian Processes (GPflow 2.x version) |\n| [BranchedGP](https://github.com/ManchesterBioinference/BranchedGP) | Gaussian processes with branching kernels.|\n| [VBPP](https://github.com/st--/vbpp) | Implementation of \"Variational Bayes for Point Processes\".|\n| [Gaussian Process Regression on Molecules](https://medium.com/@ryangriff123/gaussian-process-regression-on-molecules-in-gpflow-ee6fedab2130) | GPs to predict molecular properties by creating a custom-defined Tanimoto kernel to operate on Morgan fingerprints |\n\nIf you would like your project listed here, let us know - or simply [open a pull request](https://github.com/GPflow/GPflow/compare) that adds your project to the table above!\n\n*The following projects build on older versions of GPflow (pre-2020); we encourage their authors to upgrade to GPflow 2.*\n\n| Project | Description |\n| --- | --- |\n| [GPflowOpt](https://github.com/GPflow/GPflowOpt)       | Bayesian Optimization using GPflow (stable release requires GPflow 0.5). |\n| [Doubly-Stochastic-DGP](https://github.com/ICL-SML/Doubly-Stochastic-DGP)| Deep Gaussian Processes with Doubly Stochastic Variational Inference.|\n| [widedeepnetworks](https://github.com/widedeepnetworks/widedeepnetworks) | Measuring the relationship between random wide deep neural networks and GPs.|\n| [orth_decoupled_var_gps](https://github.com/hughsalimbeni/orth_decoupled_var_gps) | Variationally sparse GPs with orthogonally decoupled bases|\n| [kernel_learning](https://github.com/frgsimpson/kernel_learning) | Implementation of \"Differentiable Compositional Kernel Learning for Gaussian Processes\".|\n| [DGPs_with_IWVI](https://github.com/hughsalimbeni/DGPs_with_IWVI) | Deep Gaussian Processes with Importance-Weighted Variational Inference|\n| [kerndisc](https://github.com/BracketJohn/kernDisc) | Library for automated kernel structure discovery in univariate data|\n| [Signature covariances](https://github.com/tgcsaba/GPSig) | kernels for (time)series as *inputs* |\n| [Structured-DGP](https://github.com/boschresearch/Structured_DGP) | Adding more structure to the variational posterior of the Doubly Stochastic Deep Gaussian Process |\n\n## Version Compatibility\n\nGPflow heavily depends on TensorFlow and as far as TensorFlow supports forward compatibility, GPflow should as well. The version of GPflow can give you a hint about backward compatibility. If the major version has changed then you need to check the release notes to find out how the API has been changed.\n\nUnfortunately, there is no such thing as backward compatibility for GPflow _models_, which means that a model implementation can change without changing interfaces. In other words, the TensorFlow graph can be different for the same models from different versions of GPflow.\n\n### TensorFlow 1.x and GPflow 1.x\n\nWe have stopped development and support for GPflow based on TensorFlow 1.\nThe latest release supporting TensorFlow 1 is [v1.5.1](https://github.com/GPflow/GPflow/releases/tag/v1.5.1).\n[Documentation](https://gpflow.readthedocs.io/en/v1.5.1-docs/) and\n[tutorials](https://nbviewer.jupyter.org/github/GPflow/GPflow/blob/v1.5.1/doc/sphinx/notebooks/intro.ipynb)\nwill remain available.\n\n\n## Citing GPflow\n\nTo cite GPflow, please reference the [JMLR paper](http://www.jmlr.org/papers/volume18/16-537/16-537.pdf). Sample Bibtex is given below:\n```\n@ARTICLE{GPflow2017,\n  author = {Matthews, Alexander G. de G. and {van der Wilk}, Mark and Nickson, Tom and\n\tFujii, Keisuke. and {Boukouvalas}, Alexis and {Le{\\'o}n-Villagr{\\'a}}, Pablo and\n\tGhahramani, Zoubin and Hensman, James},\n    title = \"{{GP}flow: A {G}aussian process library using {T}ensor{F}low}\",\n  journal = {Journal of Machine Learning Research},\n  year    = {2017},\n  month = {apr},\n  volume  = {18},\n  number  = {40},\n  pages   = {1-6},\n  url     = {http://jmlr.org/papers/v18/16-537.html}\n}\n```\n\nSince the publication of the GPflow paper, the software has been significantly extended\nwith the framework for interdomain approximations and multioutput priors. We review the\nframework and describe the design in an [arXiv paper](https://arxiv.org/abs/2003.01115),\nwhich can be cited by users.\n```\n@article{GPflow2020multioutput,\n  author = {{van der Wilk}, Mark and Dutordoir, Vincent and John, ST and\n            Artemev, Artem and Adam, Vincent and Hensman, James},\n  title = {A Framework for Interdomain and Multioutput {G}aussian Processes},\n  year = {2020},\n  journal = {arXiv:2003.01115},\n  url = {https://arxiv.org/abs/2003.01115}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF28:375F4:17700C:5CB2F9:6AB92204"},"text_sha256":"a716f49ed56a4d26febd02a187f1e66ae3289bf46a82ff9315cfe81607b9323d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jakeret/tf_unet","input_row":{"repository":"jakeret/tf_unet","url":"https://github.com/jakeret/tf_unet","name":"tf_unet","owner":"jakeret","description":"Generic U-Net Tensorflow implementation for image segmentation","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1910,"issues":268,"created_at":"2016-08-12T08:02:22Z","updated_at":"2026-09-23T12:00:10Z","first_commit_at":"2016-08-12T08:05:00Z","last_commit_at":"2020-05-05T09:29:48Z","activity_months":44.75,"ai_ml_match_topics":"deep-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:24.810Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jakeret/tf_unet","visibility":"public","created_at":"2016-08-12T08:02:22Z","updated_at":"2026-09-23T12:00:10Z","private":false,"fork":false,"archived":false,"stargazers_count":1910,"open_issues_count":89,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2913","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0923:62B94:17B0DFE:1BD1EC8:6AB929AC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2912","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:1804B35:1C25DA9:6AB929AD"},"commit":{"sha":"0ad0e451b30e9fba5297a8f74eb8fdf79e47d941","url":"https://github.com/jakeret/tf_unet/commit/0ad0e451b30e9fba5297a8f74eb8fdf79e47d941","date":"2018-04-06T14:11:47Z","author_date":"2018-04-06T14:11:47Z","committer_date":"2018-04-06T14:11:47Z","tree_sha":"2173002eb6a20fa3cefc159ced396dfa3276fd3d","message_first_line":"Merge pull request #167 from gwy15/bugfix/typo-ckpt"},"tree_request_status":200,"tree_rate":{"github_remaining":"2911","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0901:278AC2:185345A:1C749DC:6AB929AD"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2571,"blob_sha":"b9145d7d5bf7631a1def4a4242d5ef6f01dec319","priority":0}],"documents":[{"path":"README.rst","size":2571,"blob_sha":"b9145d7d5bf7631a1def4a4242d5ef6f01dec319","priority":0,"status":200,"text":"=============================\nTensorflow Unet\n=============================\n\n.. image:: https://readthedocs.org/projects/tf-unet/badge/?version=latest\n\t:target: http://tf-unet.readthedocs.io/en/latest/?badge=latest\n\t:alt: Documentation Status\n\t\t\n.. image:: http://img.shields.io/badge/arXiv-1609.09077-orange.svg?style=flat\n        :target: http://arxiv.org/abs/1609.09077\n\n.. image:: https://img.shields.io/badge/ascl-1611.002-blue.svg?colorB=262255\n        :target: http://ascl.net/1611.002\n\n.. image:: https://mybinder.org/badge.svg\n        :target: https://mybinder.org/v2/gh/jakeret/tf_unet/master?filepath=demo%2Fdemo_toy_problem.ipynb\n\n\nThis is a generic **U-Net** implementation as proposed by `Ronneberger et al. <https://arxiv.org/pdf/1505.04597.pdf>`_ developed with **Tensorflow**. The code has been developed and used for `Radio Frequency Interference mitigation using deep convolutional neural networks <http://arxiv.org/abs/1609.09077>`_ .\n\nThe network can be trained to perform image segmentation on arbitrary imaging data. Checkout the `Usage <http://tf-unet.readthedocs.io/en/latest/usage.html>`_ section or the included Jupyter notebooks for a `toy problem <https://github.com/jakeret/tf_unet/blob/master/demo/demo_toy_problem.ipynb>`_ or the `Radio Frequency Interference mitigation <https://github.com/jakeret/tf_unet/blob/master/demo/demo_radio_data.ipynb>`_ discussed in our paper.\n\nThe code is not tied to a specific segmentation such that it can be used in a toy problem to detect circles in a noisy image.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/toy_problem.png\n   :alt: Segmentation of a toy problem.\n   :align: center\n\nTo more complex application such as the detection of radio frequency interference (RFI) in radio astronomy.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/rfi.png\n   :alt: Segmentation of RFI in radio data.\n   :align: center\n\nOr to detect galaxies and star in wide field imaging data.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/galaxies.png\n   :alt: Segmentation of a galaxies.\n   :align: center\n\n\nAs you use **tf_unet** for your exciting discoveries, please cite the paper that describes the package::\n\n\n\t@article{akeret2017radio,\n\t  title={Radio frequency interference mitigation using deep convolutional neural networks},\n\t  author={Akeret, Joel and Chang, Chihway and Lucchi, Aurelien and Refregier, Alexandre},\n\t  journal={Astronomy and Computing},\n\t  volume={18},\n\t  pages={35--39},\n\t  year={2017},\n\t  publisher={Elsevier}\n\t}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D9A:B08CF:16F160:5C33E4:6AB92205"},"text_sha256":"d4f877c0916f3af54e8bce9c4c28671978fd74152f4019671361c881e8d62d82"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2910","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:17C7D78:1BE93B6:6AB929AE"},"commit":{"sha":"0dcdf2ff1ebcc2ee59997d127a0c0be847168884","url":"https://github.com/jakeret/tf_unet/commit/0dcdf2ff1ebcc2ee59997d127a0c0be847168884","date":"2020-05-05T09:29:48Z","author_date":"2020-05-05T09:29:48Z","committer_date":"2020-05-05T09:29:48Z","tree_sha":"dbf690298210a19405c2ed3b86c0352b9ed3d81b","message_first_line":"reference to new project"},"tree_request_status":200,"tree_rate":{"github_remaining":"2909","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:17E48CA:1C06150:6AB929AE"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2736,"blob_sha":"1249fdd6539768750ceefd43e4e1292c7142e11b","priority":0}],"documents":[{"path":"README.rst","size":2736,"blob_sha":"1249fdd6539768750ceefd43e4e1292c7142e11b","priority":0,"status":200,"text":"=============================\nTensorflow Unet\n=============================\n\n.. image:: https://readthedocs.org/projects/tf-unet/badge/?version=latest\n\t:target: http://tf-unet.readthedocs.io/en/latest/?badge=latest\n\t:alt: Documentation Status\n\t\t\n.. image:: http://img.shields.io/badge/arXiv-1609.09077-orange.svg?style=flat\n        :target: http://arxiv.org/abs/1609.09077\n\n.. image:: https://img.shields.io/badge/ascl-1611.002-blue.svg?colorB=262255\n        :target: http://ascl.net/1611.002\n\n.. image:: https://mybinder.org/badge.svg\n        :target: https://mybinder.org/v2/gh/jakeret/tf_unet/master?filepath=demo%2Fdemo_toy_problem.ipynb\n\n\n.. warning::\n\n    This project is discontinued in favour of a Tensorflow 2 compatible reimplementation of this project found under https://github.com/jakeret/unet\n\n\nThis is a generic **U-Net** implementation as proposed by `Ronneberger et al. <https://arxiv.org/pdf/1505.04597.pdf>`_ developed with **Tensorflow**. The code has been developed and used for `Radio Frequency Interference mitigation using deep convolutional neural networks <http://arxiv.org/abs/1609.09077>`_ .\n\nThe network can be trained to perform image segmentation on arbitrary imaging data. Checkout the `Usage <http://tf-unet.readthedocs.io/en/latest/usage.html>`_ section or the included Jupyter notebooks for a `toy problem <https://github.com/jakeret/tf_unet/blob/master/demo/demo_toy_problem.ipynb>`_ or the `Radio Frequency Interference mitigation <https://github.com/jakeret/tf_unet/blob/master/demo/demo_radio_data.ipynb>`_ discussed in our paper.\n\nThe code is not tied to a specific segmentation such that it can be used in a toy problem to detect circles in a noisy image.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/toy_problem.png\n   :alt: Segmentation of a toy problem.\n   :align: center\n\nTo more complex application such as the detection of radio frequency interference (RFI) in radio astronomy.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/rfi.png\n   :alt: Segmentation of RFI in radio data.\n   :align: center\n\nOr to detect galaxies and star in wide field imaging data.\n\n.. image:: https://raw.githubusercontent.com/jakeret/tf_unet/master/docs/galaxies.png\n   :alt: Segmentation of a galaxies.\n   :align: center\n\n\nAs you use **tf_unet** for your exciting discoveries, please cite the paper that describes the package::\n\n\n\t@article{akeret2017radio,\n\t  title={Radio frequency interference mitigation using deep convolutional neural networks},\n\t  author={Akeret, Joel and Chang, Chihway and Lucchi, Aurelien and Refregier, Alexandre},\n\t  journal={Astronomy and Computing},\n\t  volume={18},\n\t  pages={35--39},\n\t  year={2017},\n\t  publisher={Elsevier}\n\t}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FB04:3CC8A:175E83:5CA0E3:6AB921FF"},"text_sha256":"3d8023fddec3022696b836e6facb2c813f4df9655447dbe85e609e4e30d511fc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"experiencor/keras-yolo2","input_row":{"repository":"experiencor/keras-yolo2","url":"https://github.com/experiencor/keras-yolo2","name":"keras-yolo2","owner":"experiencor","description":"Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1732,"issues":437,"created_at":"2017-03-22T15:08:29Z","updated_at":"2026-09-22T19:59:12Z","first_commit_at":"2017-03-22T15:20:14Z","last_commit_at":"2019-12-31T07:52:36Z","activity_months":33.299999999999997,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:27.139Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"experiencor/keras-yolo2","visibility":"public","created_at":"2017-03-22T15:08:29Z","updated_at":"2026-09-22T19:59:12Z","private":false,"fork":false,"archived":false,"stargazers_count":1732,"open_issues_count":201,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2908","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0863:725A9:17CBBCB:1BED2B3:6AB929AF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2907","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0937:278AC2:18535AD:1C74B4C:6AB929AF"},"commit":{"sha":"4e8c85ce02435f136d4f4cfe930b4ccb759fbaf8","url":"https://github.com/experiencor/keras-yolo2/commit/4e8c85ce02435f136d4f4cfe930b4ccb759fbaf8","date":"2018-04-26T12:40:56Z","author_date":"2018-04-26T12:40:56Z","committer_date":"2018-04-26T12:40:56Z","tree_sha":"efe8f509e3338a4b0be784ab15a0ae9c3b70050c","message_first_line":"Merge pull request #261 from pure-water/pr-keras-yolo2"},"tree_request_status":200,"tree_rate":{"github_remaining":"2906","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0920:1DB627:18612E7:1C82927:6AB929AF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7608,"blob_sha":"d06b7f49802119e337520a994b9c6ee4b9e5f5d0","priority":0}],"documents":[{"path":"README.md","size":7608,"blob_sha":"d06b7f49802119e337520a994b9c6ee4b9e5f5d0","priority":0,"status":200,"text":"# YOLOv2 in Keras and Applications\n\nThis repo contains the implementation of YOLOv2 in Keras with Tensorflow backend. It supports training YOLOv2 network with various backends such as MobileNet and InceptionV3. Links to demo applications are shown below. Check out https://experiencor.github.io/yolo_demo/demo.html for a Raccoon Detector demo run entirely in brower with DeepLearn.js and MobileNet backend (it somehow breaks in Window). Source code of this demo is located at https://git.io/vF7vG.\n\n## Todo list:\n- [x] Warmup training\n- [x] Raccoon detection, Self-driving car, and Kangaroo detection\n- [x] SqueezeNet, MobileNet, InceptionV3, and ResNet50 backends\n- [x] Support python 2.7 and 3.6\n- [ ] Multiple-GPU training\n- [ ] Multiscale training\n- [ ] mAP Evaluation\n\n## Some example applications (click for videos):\n\n### Raccon detection\n<a href=\"https://www.youtube.com/watch?v=aibuvj2-zxA\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/6okeDjz.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/experiencor/raccoon_dataset\n\n### Kangaroo detection\n<a href=\"https://youtu.be/vjmFzEP1qZw?t=34\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/v606VZX.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/experiencor/kangaroo\n\n### Self-driving Car\n<a href=\"https://www.youtube.com/watch?v=oYCaILZxEWM\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/kEc9ptL.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => http://cocodataset.org/#detections-challenge2017\n\n### Red blod cell detection\n<a href=\"https://www.youtube.com/watch?v=oYCaILZxEWM\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/1vmIJKL.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/cosmicad/dataset\n\n### Hand detection\n<a href=\"https://www.youtube.com/watch?v=p3-3kN_fIz0\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/75imQQz.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => http://cvrr.ucsd.edu/vivachallenge/index.php/hands/hand-detection/\n\n## Usage for python code\n\n### 0. Requirement\n\npython 2.7\n\nkeras >= 2.0.8\n\nimgaug\n\n### 1. Data preparation\nDownload the Raccoon dataset from from https://github.com/experiencor/raccoon_dataset.\n\nOrganize the dataset into 4 folders:\n\n+ train_image_folder <= the folder that contains the train images.\n\n+ train_annot_folder <= the folder that contains the train annotations in VOC format.\n\n+ valid_image_folder <= the folder that contains the validation images.\n\n+ valid_annot_folder <= the folder that contains the validation annotations in VOC format.\n    \nThere is a one-to-one correspondence by file name between images and annotations. If the validation set is empty, the training set will be automatically splitted into the training set and validation set using the ratio of 0.8.\n\n### 2. Edit the configuration file\nThe configuration file is a json file, which looks like this:\n\n```python\n{\n    \"model\" : {\n        \"architecture\":         \"Full Yolo\",    # \"Tiny Yolo\" or \"Full Yolo\" or \"MobileNet\" or \"SqueezeNet\" or \"Inception3\"\n        \"input_size\":           416,\n        \"anchors\":              [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828],\n        \"max_box_per_image\":    10,        \n        \"labels\":               [\"raccoon\"]\n    },\n\n    \"train\": {\n        \"train_image_folder\":   \"/home/andy/data/raccoon_dataset/images/\",\n        \"train_annot_folder\":   \"/home/andy/data/raccoon_dataset/anns/\",      \n          \n        \"train_times\":          10,             # the number of time to cycle through the training set, useful for small datasets\n        \"pretrained_weights\":   \"\",             # specify the path of the pretrained weights, but it's fine to start from scratch\n        \"batch_size\":           16,             # the number of images to read in each batch\n        \"learning_rate\":        1e-4,           # the base learning rate of the default Adam rate scheduler\n        \"nb_epoch\":             50,             # number of epoches\n        \"warmup_epochs\":        3,              # the number of initial epochs during which the sizes of the 5 boxes in each cell is forced to match the sizes of the 5 anchors, this trick seems to improve precision emperically\n\n        \"object_scale\":         5.0 ,           # determine how much to penalize wrong prediction of confidence of object predictors\n        \"no_object_scale\":      1.0,            # determine how much to penalize wrong prediction of confidence of non-object predictors\n        \"coord_scale\":          1.0,            # determine how much to penalize wrong position and size predictions (x, y, w, h)\n        \"class_scale\":          1.0,            # determine how much to penalize wrong class prediction\n\n        \"debug\":                true            # turn on/off the line that prints current confidence, position, size, class losses and recall\n    },\n\n    \"valid\": {\n        \"valid_image_folder\":   \"\",\n        \"valid_annot_folder\":   \"\",\n\n        \"valid_times\":          1\n    }\n}\n\n```\n\nThe model section defines the type of the model to construct as well as other parameters of the model such as the input image size and the list of anchors. The ```labels``` setting lists the labels to be trained on. Only images, which has labels being listed, are fed to the network. The rest images are simply ignored. By this way, a Dog Detector can easily be trained using VOC or COCO dataset by setting ```labels``` to ```['dog']```.\n\nDownload pretrained weights for backend (tiny yolo, full yolo, squeezenet, mobilenet, and inceptionV3) at:\n\nhttps://1drv.ms/f/s!ApLdDEW3ut5fec2OzK4S4RpT-SU\n\n**These weights must be put in the root folder of the repository. They are the pretrained weights for the backend only and will be loaded during model creation. The code does not work without these weights.**\n\nThe link to the pretrained weights for the whole model (both frontend and backend) of the raccoon detector can be downloaded at:\n\nhttps://1drv.ms/f/s!ApLdDEW3ut5feoZAEUwmSMYdPlY\n\nThese weights can be used as the pretrained weights for any one class object detectors.\n\n### 3. Generate anchors for your dataset (optional)\n\n`python gen_anchors.py -c config.json`\n\nCopy the generated anchors printed on the terminal to the ```anchors``` setting in ```config.json```.\n\n### 4. Start the training process\n\n`python train.py -c config.json`\n\nBy the end of this process, the code will write the weights of the best model to file best_weights.h5 (or whatever name specified in the setting \"saved_weights_name\" in the config.json file). The training process stops when the loss on the validation set is not improved in 3 consecutive epoches.\n\n### 5. Perform detection using trained weights on an image by running\n`python predict.py -c config.json -w /path/to/best_weights.h5 -i /path/to/image/or/video`\n\nIt carries out detection on the image and write the image with detected bounding boxes to the same folder.\n\n## Usage for jupyter notebook\n\nRefer to the notebook (https://github.com/experiencor/basic-yolo-keras/blob/master/Yolo%20Step-by-Step.ipynb) for a complete walk-through implementation of YOLOv2 from scratch (training, testing, and scoring).\n\n## Evaluation of the current implementation:\n\n| Train        | Test          | mAP (with this implementation) | mAP (on released weights) |\n| -------------|:--------------|:------------------------:|:-------------------------:|\n| COCO train   | COCO val      | 28.6 |    42.1 |\n\nThe code to evaluate detection results can be found at https://github.com/experiencor/basic-yolo-keras/issues/27.\n\n## Copyright\n\nSee [LICENSE](LICENSE) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3D2:372D9:1770AC:5CB38D:6AB92208"},"text_sha256":"7f4630eb1e5a5ced27e9aa6cfb18729a5c54bb72f14a3199f80514341cf9ec55"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2905","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081C:0BA1:D78457:FD436B:6AB929B0"},"commit":{"sha":"8bc3fcdc123a5d6b9624ed4188e07b876b79dac5","url":"https://github.com/experiencor/keras-yolo2/commit/8bc3fcdc123a5d6b9624ed4188e07b876b79dac5","date":"2019-12-31T07:52:36Z","author_date":"2019-12-31T07:52:36Z","committer_date":"2019-12-31T07:52:36Z","tree_sha":"b3c45d2cd3d34509317d20327fbf4caeef46c172","message_first_line":"fix broken paths"},"tree_request_status":200,"tree_rate":{"github_remaining":"2904","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C9:278AC2:1853680:1C74C83:6AB929B0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7658,"blob_sha":"a0223964c763f2c06570a8e5b580e4b7f585786a","priority":0}],"documents":[{"path":"README.md","size":7658,"blob_sha":"a0223964c763f2c06570a8e5b580e4b7f585786a","priority":0,"status":200,"text":"# YOLOv2 in Keras and Applications\n\nThis repo contains the implementation of YOLOv2 in Keras with Tensorflow backend. It supports training YOLOv2 network with various backends such as MobileNet and InceptionV3. Links to demo applications are shown below. Check out https://experiencor.github.io/yolo_demo/demo.html for a Raccoon Detector demo run entirely in brower with DeepLearn.js and MobileNet backend (it somehow breaks in Window). Source code of this demo is located at https://git.io/vF7vG.\n\n## Todo list:\n- [x] Warmup training\n- [x] Raccoon detection, Self-driving car, and Kangaroo detection\n- [x] SqueezeNet, MobileNet, InceptionV3, and ResNet50 backends\n- [x] Support python 2.7 and 3.6\n- [ ] Multiple-GPU training\n- [ ] Multiscale training\n- [ ] mAP Evaluation\n\n## Some example applications (click for videos):\n\n### Raccon detection\n<a href=\"https://www.youtube.com/watch?v=aibuvj2-zxA\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/6okeDjz.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/experiencor/raccoon_dataset\n\n### Kangaroo detection\n<a href=\"https://youtu.be/vjmFzEP1qZw?t=34\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/v606VZX.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/experiencor/kangaroo\n\n### Self-driving Car\n<a href=\"https://www.youtube.com/watch?v=oYCaILZxEWM\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/kEc9ptL.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => http://cocodataset.org/#detections-challenge2017\n\n### Red blod cell detection\n<a href=\"https://www.youtube.com/watch?v=oYCaILZxEWM\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/1vmIJKL.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => https://github.com/cosmicad/dataset\n\n### Hand detection\n<a href=\"https://www.youtube.com/watch?v=p3-3kN_fIz0\" rel=\"some text\"><p align=\"center\"><img src=\"https://i.imgur.com/75imQQz.jpg\" height=\"300\"><\/p><\/a>\n\nDataset => http://cvrr.ucsd.edu/vivachallenge/index.php/hands/hand-detection/\n\n## Usage for python code\n\n### 0. Requirement\n\npython 2.7\n\nkeras >= 2.0.8\n\nimgaug\n\n### 1. Data preparation\nDownload the Raccoon dataset from from https://github.com/experiencor/raccoon_dataset.\n\nOrganize the dataset into 4 folders:\n\n+ train_image_folder <= the folder that contains the train images.\n\n+ train_annot_folder <= the folder that contains the train annotations in VOC format.\n\n+ valid_image_folder <= the folder that contains the validation images.\n\n+ valid_annot_folder <= the folder that contains the validation annotations in VOC format.\n    \nThere is a one-to-one correspondence by file name between images and annotations. If the validation set is empty, the training set will be automatically splitted into the training set and validation set using the ratio of 0.8.\n\n### 2. Edit the configuration file\nThe configuration file is a json file, which looks like this:\n\n```python\n{\n    \"model\" : {\n        \"architecture\":         \"Full Yolo\",    # \"Tiny Yolo\" or \"Full Yolo\" or \"MobileNet\" or \"SqueezeNet\" or \"Inception3\"\n        \"input_size\":           416,\n        \"anchors\":              [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828],\n        \"max_box_per_image\":    10,        \n        \"labels\":               [\"raccoon\"]\n    },\n\n    \"train\": {\n        \"train_image_folder\":   \"/home/andy/data/raccoon_dataset/images/\",\n        \"train_annot_folder\":   \"/home/andy/data/raccoon_dataset/anns/\",      \n          \n        \"train_times\":          10,             # the number of time to cycle through the training set, useful for small datasets\n        \"pretrained_weights\":   \"\",             # specify the path of the pretrained weights, but it's fine to start from scratch\n        \"batch_size\":           16,             # the number of images to read in each batch\n        \"learning_rate\":        1e-4,           # the base learning rate of the default Adam rate scheduler\n        \"nb_epoch\":             50,             # number of epoches\n        \"warmup_epochs\":        3,              # the number of initial epochs during which the sizes of the 5 boxes in each cell is forced to match the sizes of the 5 anchors, this trick seems to improve precision emperically\n\n        \"object_scale\":         5.0 ,           # determine how much to penalize wrong prediction of confidence of object predictors\n        \"no_object_scale\":      1.0,            # determine how much to penalize wrong prediction of confidence of non-object predictors\n        \"coord_scale\":          1.0,            # determine how much to penalize wrong position and size predictions (x, y, w, h)\n        \"class_scale\":          1.0,            # determine how much to penalize wrong class prediction\n\n        \"debug\":                true            # turn on/off the line that prints current confidence, position, size, class losses and recall\n    },\n\n    \"valid\": {\n        \"valid_image_folder\":   \"\",\n        \"valid_annot_folder\":   \"\",\n\n        \"valid_times\":          1\n    }\n}\n\n```\n\nThe model section defines the type of the model to construct as well as other parameters of the model such as the input image size and the list of anchors. The ```labels``` setting lists the labels to be trained on. Only images, which has labels being listed, are fed to the network. The rest images are simply ignored. By this way, a Dog Detector can easily be trained using VOC or COCO dataset by setting ```labels``` to ```['dog']```.\n\nDownload pretrained weights for backend (tiny yolo, full yolo, squeezenet, mobilenet, and inceptionV3) at:\n\nhttps://drive.google.com/drive/folders/10oym4eL2RxJa0gro26vzXK__TtYOP5Ng\n\n**These weights must be put in the root folder of the repository. They are the pretrained weights for the backend only and will be loaded during model creation. The code does not work without these weights.**\n\nThe link to the pretrained weights for the whole model (both frontend and backend) of the raccoon detector can be downloaded at:\n\nhttps://drive.google.com/drive/folders/10oym4eL2RxJa0gro26vzXK__TtYOP5Ng\n\nThese weights can be used as the pretrained weights for any one class object detectors.\n\n### 3. Generate anchors for your dataset (optional)\n\n`python gen_anchors.py -c config.json`\n\nCopy the generated anchors printed on the terminal to the ```anchors``` setting in ```config.json```.\n\n### 4. Start the training process\n\n`python train.py -c config.json`\n\nBy the end of this process, the code will write the weights of the best model to file best_weights.h5 (or whatever name specified in the setting \"saved_weights_name\" in the config.json file). The training process stops when the loss on the validation set is not improved in 3 consecutive epoches.\n\n### 5. Perform detection using trained weights on an image by running\n`python predict.py -c config.json -w /path/to/best_weights.h5 -i /path/to/image/or/video`\n\nIt carries out detection on the image and write the image with detected bounding boxes to the same folder.\n\n## Usage for jupyter notebook\n\nRefer to the notebook (https://github.com/experiencor/basic-yolo-keras/blob/master/Yolo%20Step-by-Step.ipynb) for a complete walk-through implementation of YOLOv2 from scratch (training, testing, and scoring).\n\n## Evaluation of the current implementation:\n\n| Train        | Test          | mAP (with this implementation) | mAP (on released weights) |\n| -------------|:--------------|:------------------------:|:-------------------------:|\n| COCO train   | COCO val      | 28.6 |    42.1 |\n\nThe code to evaluate detection results can be found at https://github.com/experiencor/basic-yolo-keras/issues/27.\n\n## Copyright\n\nSee [LICENSE](LICENSE) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FCE2:38C7FC:178049:5957D6:6AB9220A"},"text_sha256":"ece9d5ac4108494b37736847b8f4fb58368d48337c7be9fd5d80e867cc4bc8d8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Franck-Dernoncourt/NeuroNER","input_row":{"repository":"Franck-Dernoncourt/NeuroNER","url":"https://github.com/Franck-Dernoncourt/NeuroNER","name":"NeuroNER","owner":"Franck-Dernoncourt","description":"Named-entity recognition using neural networks. Easy-to-use and state-of-the-art results.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1725,"issues":154,"created_at":"2017-03-07T01:24:15Z","updated_at":"2026-09-19T19:37:06Z","first_commit_at":"2017-03-07T01:24:15Z","last_commit_at":"2019-10-02T23:26:11Z","activity_months":30.879999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:29.477Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Franck-Dernoncourt/NeuroNER","visibility":"public","created_at":"2017-03-07T01:24:15Z","updated_at":"2026-09-19T19:37:06Z","private":false,"fork":false,"archived":false,"stargazers_count":1725,"open_issues_count":91,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2903","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081E:35C5DA:1797840:1BB801F:6AB929B1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2902","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:179CE12:1BBE02B:6AB929B1"},"commit":{"sha":"ca344ea893f29ec8478686a6d7d31f3bd3f78c1f","url":"https://github.com/Franck-Dernoncourt/NeuroNER/commit/ca344ea893f29ec8478686a6d7d31f3bd3f78c1f","date":"2017-12-07T17:12:54Z","author_date":"2017-12-07T17:12:54Z","committer_date":"2017-12-07T17:12:54Z","tree_sha":"5d5a46a45f9e6ea54b05336297883251b0bafc74","message_first_line":"Fixes issue with `show_values()` mentioned in #76"},"tree_request_status":200,"tree_rate":{"github_remaining":"2901","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17C360F:1BE3F6D:6AB929B2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9431,"blob_sha":"7548a133de758f0f05871e0dd9268ff813f7f050","priority":0}],"documents":[{"path":"README.md","size":9431,"blob_sha":"7548a133de758f0f05871e0dd9268ff813f7f050","priority":0,"status":200,"text":"# NeuroNER\n\n[![Build Status](https://travis-ci.org/Franck-Dernoncourt/NeuroNER.svg?branch=master)](https://travis-ci.org/Franck-Dernoncourt/NeuroNER)\n\nNeuroNER is a program that performs named-entity recognition (NER). Website: [neuroner.com](http://neuroner.com).\n\nThis page gives step-by-step instructions to install and use NeuroNER. If you already have Python 3.5 and TensorFlow 1.0, you can directly jump to the [Downloading NeuroNER](#downloading-neuroner).\n\n\n## Table of Contents\n\n<!-- toc -->\n\n- [Installing NeuroNER](#installing-neuroner)\n  * [Requirements](#requirements)\n  * [Downloading NeuroNER](#downloading-neuroner)\n- [Using NeuroNER](#using-neuroner)\n  * [Adding a new dataset](#adding-a-new-dataset)\n  * [Using a pretrained model](#using-a-pretrained-model)\n  * [Sharing a pretrained model](#sharing-a-pretrained-model)\n  * [Using TensorBoard](#using-tensorboard)\n- [Citation](#citation)\n\n<!-- tocstop -->\n\n## Installing NeuroNER\n\n### Requirements\n\nNeuroNER relies on Python 3.5, TensorFlow 1.0+, and optionally on BRAT:\n\n- Python 3.5: NeuroNER does not work with Python 2.x. On Windows, it has to be Python 3.5 64-bit.\n- TensorFlow is a library for machine learning. NeuroNER uses it for its NER engine, which is based on neural networks. Official website: [https://www.tensorflow.org](https://www.tensorflow.org)\n- BRAT (optional) is a web-based annotation tool. It only needs to be installed if you wish to conveniently create annotations or view the predictions made by NeuroNER. Official website: [http://brat.nlplab.org](http://brat.nlplab.org)\n\nInstallation instructions for TensorFlow, Python 3.5, and (optional) BRAT are given below for different types of operating systems:\n\n- [Mac](install_mac.md)\n- [Ubuntu](install_ubuntu.md)\n- [Windows](install_windows.md)\n\n\nAlternatively, you can use this [installation script](install_ubuntu.sh) for Ubuntu, which:\n\n1. Installs TensorFlow (CPU only) and Python 3.5.\n2. Downloads the NeuroNER code as well as the word embeddings.\n3. Starts training on the CoNLL-2003 dataset (the F1-score on the test set should be around 0.90, i.e. on par with state-of-the-art systems).\n\nTo use this script, run the following command from the terminal:\n\n```\nwget https://raw.githubusercontent.com/Franck-Dernoncourt/NeuroNER/master/install_ubuntu.sh; bash install_ubuntu.sh\n```\n\n\n## Downloading NeuroNER\n\nTo download NeuroNER code, download and unzip https://github.com/Franck-Dernoncourt/NeuroNER/archive/master.zip, which can be done on Ubuntu and Mac OS X with:\n\n```\nwget https://github.com/Franck-Dernoncourt/NeuroNER/archive/master.zip\nsudo apt-get install -y unzip # This line is for Ubuntu users only\nunzip master.zip\n```\n\nIt also needs some word embeddings, which should be downloaded from http://neuroner.com/data/word_vectors/glove.6B.100d.zip, unzipped and placed in `/data/word_vectors`. This can be done on Ubuntu and Mac OS X with:\n\n```\n# Download some word embeddings\nmkdir NeuroNER-master/data/word_vectors\ncd NeuroNER-master/data/word_vectors\nwget http://neuroner.com/data/word_vectors/glove.6B.100d.zip\nunzip glove.6B.100d.zip\n```\n\nNeuroNER is now ready to run.\n\n\n\n## Using NeuroNER\n\nBy default NeuroNER is configured to train and test on the CoNLL-2003 dataset. To start the training:\n\n```\n# To use the CPU if you have installed tensorflow, or use the GPU if you have installed tensorflow-gpu:\npython3.5 main.py\n\n# To use the CPU only if you have installed tensorflow-gpu:\nCUDA_VISIBLE_DEVICES=\"\" python3.5 main.py\n\n# To use the GPU 1 only if you have installed tensorflow-gpu:\nCUDA_VISIBLE_DEVICES=1 python3.5 main.py\n```\n\nIf you wish to change any of NeuroNER parameters, you should modify the [`src/parameters.ini`](src/parameters.ini) configuration file. Alternatively, any parameter may be specified in the command line.\n\nFor example, to reduce the number of training epochs and not use any pre-trained token embeddings:\n```\npython3.5 main.py --maximum_number_of_epochs=2 --token_pretrained_embedding_filepath=\"\"\n```\n\n\nTo perform NER on some plain texts using a pre-trained model:\n\n```\npython3.5 main.py --train_model=False --use_pretrained_model=True --dataset_text_folder=../data/example_unannotated_texts --pretrained_model_folder=../trained_models/conll_2003_en\n```\n\nIf a parameter is specified in both the [`src/parameters.ini`](src/parameters.ini) configuration file and as a command line argument, then the command line argument takes precedence (i.e., the parameter in [`src/parameters.ini`](src/parameters.ini) is ignored). You may specify a different configuration file with the `--parameters_filepath` command line argument. The command line arguments have no default value except for `--parameters_filepath`, which points to [`src/parameters.ini`](src/parameters.ini).\n\nNeuroNER has 3 modes of operation:\n\n- training mode (from scratch): the dataset folder must have train and valid sets. Test and deployment sets are optional.\n- training mode (from pretrained model): the dataset folder must have train and valid sets. Test and deployment sets are optional.\n- prediction mode (using pretrained model): the dataset folder must have either a test set or a deployment set.\n\n### Adding a new dataset\n\nA dataset may be provided in either CoNLL-2003 or BRAT format. The dataset files and folders should be organized and named as follows:\n\n- Training set: `train.txt` file (CoNLL-2003 format) or `train` folder (BRAT format). It must contain labels.\n- Validation set: `valid.txt` file (CoNLL-2003 format) or `valid` folder (BRAT format). It must contain labels.\n- Test set: `test.txt` file (CoNLL-2003 format) or `test` folder (BRAT format). It must contain labels.\n- Deployment set: `deploy.txt` file (CoNLL-2003 format) or `deploy` folder (BRAT format). It shouldn't contain any label (if it does, labels are ignored).\n\nWe provide several examples of datasets:\n\n- [`data/conll2003/en`](data/conll2003/en): annotated dataset with the CoNLL-2003 format, containing 3 files (`train.txt`, `valid.txt` and  `test.txt`).\n- [`data/example_unannotated_texts`](data/example_unannotated_texts): unannotated dataset with the BRAT format, containing 1 folder (`deploy/`). Note that the BRAT format with no annotation is the same as plain texts.\n\n\n\n### Using a pretrained model\n\nIn order to use a pretrained model, the `pretrained_model_folder` parameter in the [`src/parameters.ini`](src/parameters.ini) configuration file must be set to the folder containing the pretrained model. The following parameters in the [`src/parameters.ini`](src/parameters.ini) configuration file must also be set to the same values as in the configuration file located in the specified `pretrained_model_folder`:\n\n```\nuse_character_lstm\ncharacter_embedding_dimension\ncharacter_lstm_hidden_state_dimension\ntoken_pretrained_embedding_filepath\ntoken_embedding_dimension\ntoken_lstm_hidden_state_dimension\nuse_crf\ntagging_format\ntokenizer\n```\n\n\n### Sharing a pretrained model\n\nYou are highly encouraged to share a model trained on their own datasets, so that other users can use the pretrained model on other datasets. We provide the [`src/prepare_pretrained_model.py`](src/prepare_pretrained_model.py) script to make it easy to prepare a pretrained model for sharing. In order to use the script, one only needs to specify the `output_folder_name`, `epoch_number`, and `model_name` parameters in the script.\n\nBy default, the only information about the dataset contained in the pretrained model is the list of tokens that appears in the dataset used for training and the corresponding embeddings learned from the dataset.\n\nIf you wish to share a pretrained model without providing any information about the dataset (including the list of tokens appearing in the dataset), you can do so by setting\n\n```delete_token_mappings = True```\n\nwhen running the script. In this case, it is highly recommended to use some external pre-trained token embeddings and freeze them while training the model to obtain high performance. This can be done by specifying the `token_pretrained_embedding_filepath` and setting\n\n```freeze_token_embeddings = True```\n\nin the [`src/parameters.ini`](src/parameters.ini) configuration file during training.\n\nIn order to share a pretrained model, please [submit a new issue](https://github.com/Franck-Dernoncourt/NeuroNER/issues/new) on the GitHub repository.\n\n### Using TensorBoard\n\nYou may launch TensorBoard during or after the training phase. To do so, run in the terminal from the NeuroNER folder:\n```\ntensorboard --logdir=output\n```\n\nThis starts a web server that is accessible at http://127.0.0.1:6006 from your web browser.\n\n## Citation\n\nIf you use NeuroNER in your publications, please cite this [paper](https://arxiv.org/abs/1705.05487):\n\n```\n@article{2017neuroner,\n  title={{NeuroNER}: an easy-to-use program for named-entity recognition based on neural networks},\n  author={Dernoncourt, Franck and Lee, Ji Young and Szolovits, Peter},\n  journal={Conference on Empirical Methods on Natural Language Processing (EMNLP)},\n  year={2017}\n}\n```\n\nThe neural network architecture used in NeuroNER is described in this [article](https://arxiv.org/abs/1606.03475):\n\n```\n@article{2016deidentification,\n  title={De-identification of Patient Notes with Recurrent Neural Networks},\n  author={Dernoncourt, Franck and Lee, Ji Young and Uzuner, Ozlem and Szolovits, Peter},\n  journal={Journal of the American Medical Informatics Association (JAMIA)},\n  year={2016}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF72:35999:172D8F:5C70DA:6AB92202"},"text_sha256":"0be377400ce0443eae18a66447344ddbdb1c2c6af825b248c3da069bc506c59f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2900","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0887:3203A7:178656A:1BA76C2:6AB929B2"},"commit":{"sha":"3817feaf290c1f6e03ae23ea964e68c88d0e7a88","url":"https://github.com/Franck-Dernoncourt/NeuroNER/commit/3817feaf290c1f6e03ae23ea964e68c88d0e7a88","date":"2019-10-02T23:26:11Z","author_date":"2019-10-02T23:26:11Z","committer_date":"2019-10-02T23:26:11Z","tree_sha":"383a7da97635f0d351be6e5da4f4d98f557b622c","message_first_line":"Merge pull request #151 from Franck-Dernoncourt/fix_load_embed"},"tree_request_status":200,"tree_rate":{"github_remaining":"2899","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0904:754BF:17BECA4:1BE00D5:6AB929B3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11025,"blob_sha":"f1517da595b06f2afd8ca52a202556a54e48f730","priority":0}],"documents":[{"path":"README.md","size":11025,"blob_sha":"f1517da595b06f2afd8ca52a202556a54e48f730","priority":0,"status":200,"text":"# NeuroNER\n\n[![Build Status](https://travis-ci.org/Franck-Dernoncourt/NeuroNER.svg?branch=master)](https://travis-ci.org/Franck-Dernoncourt/NeuroNER)\n\nNeuroNER is a program that performs named-entity recognition (NER). Website: [neuroner.com](http://neuroner.com).\n\nThis page gives step-by-step instructions to install and use NeuroNER.\n\n\n## Table of Contents\n\n<!-- toc -->\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Using NeuroNER](#using-neuroner)\n  * [Adding a new dataset](#adding-a-new-dataset)\n  * [Using a pretrained model](#using-a-pretrained-model)\n  * [Sharing a pretrained model](#sharing-a-pretrained-model)\n  * [Using TensorBoard](#using-tensorboard)\n- [Citation](#citation)\n\n<!-- tocstop -->\n\n## Requirements\n\nNeuroNER relies on Python 3, TensorFlow 1.0+, and optionally on BRAT:\n\n- Python 3: NeuroNER does not work with Python 2.x. On Windows, it has to be Python 3.6 64-bit or later.\n- TensorFlow is a library for machine learning. NeuroNER uses it for its NER engine, which is based on neural networks. Official website: [https://www.tensorflow.org](https://www.tensorflow.org)\n- BRAT (optional) is a web-based annotation tool. It only needs to be installed if you wish to conveniently create annotations or view the predictions made by NeuroNER. Official website: [http://brat.nlplab.org](http://brat.nlplab.org)\n\n## Installation\n\nFor GPU support, [GPU requirements for Tensorflow](https://www.tensorflow.org/install/) must be satisfied. If your system does not meet these requirements, you should use the CPU version. To install neuroner:\n\n```\n# For CPU support (no GPU support):\npip3 install pyneuroner[cpu]\n\n# For GPU support:\npip3 install pyneuroner[gpu]\n```\n\nYou will also need to download some support packages.\n\n1. The English language module for Spacy:\n\n```\n# Download the SpaCy English module\npython -m spacy download en\n```\n\n2. Download word embeddings from http://neuroner.com/data/word_vectors/glove.6B.100d.zip, unzip them to the folder `./data/word_vectors`\n\n```\n# Get word embeddings\nwget -P data/word_vectors http://neuroner.com/data/word_vectors/glove.6B.100d.zip\nunzip data/word_vectors/glove.6B.100d.zip -d data/word_vectors/\n```\n\n3. Load sample datasets. These can be loaded by calling the `neuromodel.fetch_data()` function from a Python interpreter or with the `--fetch_data` argument at the command line.\n\n```\n# Load a dataset from the command line\nneuroner --fetch_data=conll2003\nneuroner --fetch_data=example_unannotated_texts\nneuroner --fetch_data=i2b2_2014_deid\n```\n\n```\n# Load a dataset from a Python interpreter\nfrom neuroner import neuromodel\nneuromodel.fetch_data('conll2003')\nneuromodel.fetch_data('example_unannotated_texts')\nneuromodel.fetch_data('i2b2_2014_deid')\n```\n\n4. Load a pretrained model. The models can be loaded by calling the `neuromodel.fetch_model()` function from a Python interpreter or with the `--fetch_trained_models` argument at the command line.\n\n```\n# Load a pre-trained model from the command line\nneuroner --fetch_trained_model=conll_2003_en\nneuroner --fetch_trained_model=i2b2_2014_glove_spacy_bioes\nneuroner --fetch_trained_model=i2b2_2014_glove_stanford_bioes\nneuroner --fetch_trained_model=mimic_glove_spacy_bioes\nneuroner --fetch_trained_model=mimic_glove_stanford_bioes\n```\n\n```\n# Load a pre-trained model from a Python interpreter\nfrom neuroner import neuromodel\nneuromodel.fetch_model('conll_2003_en')\nneuromodel.fetch_model('i2b2_2014_glove_spacy_bioes')\nneuromodel.fetch_model('i2b2_2014_glove_stanford_bioes')\nneuromodel.fetch_model('mimic_glove_spacy_bioes')\nneuromodel.fetch_model('mimic_glove_stanford_bioes')\n```\n\n### Installing BRAT (optional) \n\nBRAT is a tool that can be used to create, change or view the BRAT-style annotations. For installation and usage instructions, see the [BRAT website](http://brat.nlplab.org/installation.html).\n\n### Installing Perl (platform dependent)\n\nPerl is required because the official CoNLL-2003 evaluation script is written in this language: http://strawberryperl.com. For Unix and Mac OSX systems, Perl should already be installed. For Windows systems, you may need to install it.\n\n## Using NeuroNER\n\nNeuroNER can either be run from the command line or from a Python interpreter.\n\n### Using NeuroNer from a Python interpreter\n\nTo use NeuroNER from the command line, create an instance of the neuromodel with your desired arguments, and then call the relevant methods. Additional parameters can be set from a `parameters.ini` file in the working directory. For example:\n\n```\nfrom neuroner import neuromodel\nnn = neuromodel.NeuroNER(train_model=False, use_pretrained_model=True)\n```\n\nMore detail to follow.\n\n### Using NeuroNer from the command line\n\nBy default NeuroNER is configured to train and test on the CoNLL-2003 dataset. Running neuroner with the default settings starts training on the CoNLL-2003 dataset (the F1-score on the test set should be around 0.90, i.e. on par with state-of-the-art systems). To start the training:\n\n```\n# To use the CPU if you have installed tensorflow, or use the GPU if you have installed tensorflow-gpu:\nneuroner\n\n# To use the CPU only if you have installed tensorflow-gpu:\nCUDA_VISIBLE_DEVICES=\"\" neuroner\n\n# To use the GPU 1 only if you have installed tensorflow-gpu:\nCUDA_VISIBLE_DEVICES=1 neuroner\n```\n\nIf you wish to change any of NeuroNER parameters, you can modify the [`parameters.ini`](parameters.ini) configuration file in your working directory or specify it as an argument.\n\nFor example, to reduce the number of training epochs and not use any pre-trained token embeddings:\n\n```\nneuroner --maximum_number_of_epochs=2 --token_pretrained_embedding_filepath=\"\"\n```\n\nTo perform NER on some plain texts using a pre-trained model:\n\n```\nneuroner --train_model=False --use_pretrained_model=True --dataset_text_folder=./data/example_unannotated_texts --pretrained_model_folder=./trained_models/conll_2003_en\n```\n\nIf a parameter is specified in both the [`parameters.ini`](parameters.ini) configuration file and as an argument, then the argument takes precedence (i.e., the parameter in [`parameters.ini`](parameters.ini) is ignored). You may specify a different configuration file with the `--parameters_filepath` command line argument. The command line arguments have no default value except for `--parameters_filepath`, which points to [`parameters.ini`](parameters.ini).\n\nNeuroNER has 3 modes of operation:\n\n- training mode (from scratch): the dataset folder must have train and valid sets. Test and deployment sets are optional.\n- training mode (from pretrained model): the dataset folder must have train and valid sets. Test and deployment sets are optional.\n- prediction mode (using pretrained model): the dataset folder must have either a test set or a deployment set.\n\n### Adding a new dataset\n\nA dataset may be provided in either CoNLL-2003 or BRAT format. The dataset files and folders should be organized and named as follows:\n\n- Training set: `train.txt` file (CoNLL-2003 format) or `train` folder (BRAT format). It must contain labels.\n- Validation set: `valid.txt` file (CoNLL-2003 format) or `valid` folder (BRAT format). It must contain labels.\n- Test set: `test.txt` file (CoNLL-2003 format) or `test` folder (BRAT format). It must contain labels.\n- Deployment set: `deploy.txt` file (CoNLL-2003 format) or `deploy` folder (BRAT format). It shouldn't contain any label (if it does, labels are ignored).\n\nWe provide several examples of datasets:\n\n- [`data/conll2003/en`](data/conll2003/en): annotated dataset with the CoNLL-2003 format, containing 3 files (`train.txt`, `valid.txt` and  `test.txt`).\n- [`data/example_unannotated_texts`](data/example_unannotated_texts): unannotated dataset with the BRAT format, containing 1 folder (`deploy/`). Note that the BRAT format with no annotation is the same as plain texts.\n\n### Using a pretrained model\n\nIn order to use a pretrained model, the `pretrained_model_folder` parameter in the [`parameters.ini`](parameters.ini) configuration file must be set to the folder containing the pretrained model. The following parameters in the [`parameters.ini`](parameters.ini) configuration file must also be set to the same values as in the configuration file located in the specified `pretrained_model_folder`:\n\n```\nuse_character_lstm\ncharacter_embedding_dimension\ncharacter_lstm_hidden_state_dimension\ntoken_pretrained_embedding_filepath\ntoken_embedding_dimension\ntoken_lstm_hidden_state_dimension\nuse_crf\ntagging_format\ntokenizer\n```\n\n### Sharing a pretrained model\n\nYou are highly encouraged to share a model trained on their own datasets, so that other users can use the pretrained model on other datasets. We provide the [`neuroner/prepare_pretrained_model.py`](neuroner/prepare_pretrained_model.py) script to make it easy to prepare a pretrained model for sharing. In order to use the script, one only needs to specify the `output_folder_name`, `epoch_number`, and `model_name` parameters in the script.\n\nBy default, the only information about the dataset contained in the pretrained model is the list of tokens that appears in the dataset used for training and the corresponding embeddings learned from the dataset.\n\nIf you wish to share a pretrained model without providing any information about the dataset (including the list of tokens appearing in the dataset), you can do so by setting\n\n```delete_token_mappings = True```\n\nwhen running the script. In this case, it is highly recommended to use some external pre-trained token embeddings and freeze them while training the model to obtain high performance. This can be done by specifying the `token_pretrained_embedding_filepath` and setting\n\n```freeze_token_embeddings = True```\n\nin the [`parameters.ini`](parameters.ini) configuration file during training.\n\nIn order to share a pretrained model, please [submit a new issue](https://github.com/Franck-Dernoncourt/NeuroNER/issues/new) on the GitHub repository.\n\n### Using TensorBoard\n\nYou may launch TensorBoard during or after the training phase. To do so, run in the terminal from the NeuroNER folder:\n```\ntensorboard --logdir=output\n```\n\nThis starts a web server that is accessible at http://127.0.0.1:6006 from your web browser.\n\n## Citation\n\nIf you use NeuroNER in your publications, please cite this [paper](https://arxiv.org/abs/1705.05487):\n\n```\n@article{2017neuroner,\n  title={{NeuroNER}: an easy-to-use program for named-entity recognition based on neural networks},\n  author={Dernoncourt, Franck and Lee, Ji Young and Szolovits, Peter},\n  journal={Conference on Empirical Methods on Natural Language Processing (EMNLP)},\n  year={2017}\n}\n```\n\nThe neural network architecture used in NeuroNER is described in this [article](https://arxiv.org/abs/1606.03475):\n\n```\n@article{2016deidentification,\n  title={De-identification of Patient Notes with Recurrent Neural Networks},\n  author={Dernoncourt, Franck and Lee, Ji Young and Uzuner, Ozlem and Szolovits, Peter},\n  journal={Journal of the American Medical Informatics Association (JAMIA)},\n  year={2016}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5D88:3AC5A:17DACC:5DF4FA:6AB929B2"},"text_sha256":"f970dffca55f12e29164df419e9fd92b9e00316a4c9941909c8915b6fbe5f7f0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scverse/scvi-tools","input_row":{"repository":"scverse/scvi-tools","url":"https://github.com/scverse/scvi-tools","name":"scvi-tools","owner":"scverse","description":"Deep probabilistic analysis of single-cell and spatial omics data","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1697,"issues":1190,"created_at":"2017-09-06T05:39:48Z","updated_at":"2026-09-25T15:45:59Z","first_commit_at":"2017-09-06T05:39:48Z","last_commit_at":"2026-09-24T11:05:36Z","activity_months":108.58,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:31.990Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scverse/scvi-tools","visibility":"public","created_at":"2017-09-06T05:39:48Z","updated_at":"2026-09-25T15:45:59Z","private":false,"fork":false,"archived":false,"stargazers_count":1697,"open_issues_count":38,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2898","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:1776667:1B97A2C:6AB929B4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2897","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0905:280FBC:17AF05D:1BCF17A:6AB929B4"},"commit":{"sha":"ce904baef5c66dcd07e6c3d63ab52888de1d55b6","url":"https://github.com/scverse/scvi-tools/commit/ce904baef5c66dcd07e6c3d63ab52888de1d55b6","date":"2018-05-23T20:34:22Z","author_date":"2018-05-23T20:34:22Z","committer_date":"2018-05-23T20:34:22Z","tree_sha":"e46b23bc0e6d8da31b8e7d8f0115972a98f45444","message_first_line":"Merge pull request #101 from YosefLab/clamp_ll"},"tree_request_status":200,"tree_rate":{"github_remaining":"2896","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:17F22F0:1C13799:6AB929B4"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1262,"blob_sha":"c6e19a7d97585ad510a194170e49efcac3532e28","priority":0}],"documents":[{"path":"README.rst","size":1262,"blob_sha":"c6e19a7d97585ad510a194170e49efcac3532e28","priority":0,"status":200,"text":"====\nscVI\n====\n\n.. image:: https://travis-ci.org/YosefLab/scVI-dev.svg?branch=master\n    :target: https://travis-ci.org/YosefLab/scVI-dev\n\n.. image:: https://codecov.io/gh/YosefLab/scVI-dev/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/YosefLab/scVI-dev\n\n.. image:: https://readthedocs.org/projects/scvi/badge/?version=latest\n        :target: https://scvi.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n\nSingle-cell Variational Inference\n\n\n* Free software: MIT license\n* Documentation: https://scvi.readthedocs.io.\n\n\nInstallation\n--------\n\n1. Install PyTorch: http://pytorch.org\n\n2. Install this repository from source: ``git clone https://github.com/YosefLab/scVI-dev.git``\n\n3. Refer to the `examples/` subdirectory for Jupyter notebooks that illustrate usage. \n\n\nBenchmarks\n--------\n\nTo recreate the results appearing in the paper referenced below, run\n\n.. code-block::\n\n    python ./run_benchmarks.py --dataset=cortex \n\nReferences\n--------\n\nRomain Lopez, Jeffrey Regier, Michael B Cole, Michael Jordan, Nir Yosef.\n**\"Bayesian Inference for a Generative Model of Transcriptome Profiles from Single-cell RNA Sequencing.\"**\nIn submission. Preprint available at https://www.biorxiv.org/content/early/2018/03/30/292037\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"398E:3D501:184216:5E5CCD:6AB929B2"},"text_sha256":"c90d272e0a8d94b88fe2dd930c8437f9d5163e9cdb16733d6dfd6745aff2c54f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2895","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0842:E80A6:1799E30:1BBB3B6:6AB929B5"},"commit":{"sha":"937568ae90a939531d15bfd43dbd9a1d2ba5a7da","url":"https://github.com/scverse/scvi-tools/commit/937568ae90a939531d15bfd43dbd9a1d2ba5a7da","date":"2026-06-30T11:22:42Z","author_date":"2026-06-30T11:22:42Z","committer_date":"2026-06-30T11:22:42Z","tree_sha":"ef92cbccd4d55dc41725b9efafd26982c5cba674","message_first_line":"Fix: Extract some methods from FCLayers for easier inheritance (#3880)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2894","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:17E105D:1C01E72:6AB929B5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6071,"blob_sha":"fad842f786f7dd2fe71c37d6aa3079edeeee0052","priority":0}],"documents":[{"path":"README.md","size":6071,"blob_sha":"fad842f786f7dd2fe71c37d6aa3079edeeee0052","priority":0,"status":200,"text":"<a href=\"https://scvi-tools.org/\">\n  <img\n    src=\"https://github.com/scverse/scvi-tools/blob/main/docs/_static/scvi-tools-horizontal.svg?raw=true\"\n    width=\"400\"\n    alt=\"scvi-tools\"\n  >\n<\/a>\n\n[![Stars][gh-stars-badge]][gh-stars-link]\n[![PyPI][pypi-badge]][pypi-link]\n[![PyPIDownloads][pepy-badge]][pepy-link]\n[![CondaDownloads][conda-badge]][conda-link]\n[![Docs][docs-badge]][docs-link]\n[![Build][build-badge]][build-link]\n[![Coverage][coverage-badge]][coverage-link]\n\n[scvi-tools] (single-cell variational inference tools) is a package for probabilistic modeling and\nanalysis of single-cell omics data, built on top of [PyTorch] and [AnnData].\n\n# Analysis of single-cell omics data\n\nscvi-tools is composed of models that perform many analysis tasks across single-cell, multi, and\nspatial omics data:\n\n- Dimensionality reduction\n- Data integration\n- Automated annotation\n- Factor analysis\n- Doublet detection\n- Spatial deconvolution\n- and more!\n\nIn the [user guide], we provide an overview of each model. All model implementations have a\nhigh-level API that interacts with [Scanpy] and includes standard save/load functions, GPU\nacceleration, etc.\n\n# Rapid development of novel probabilistic models\n\nscvi-tools contains the building blocks to develop and deploy novel probabilistic models. These\nbuilding blocks are powered by popular probabilistic and machine learning frameworks such as\n[PyTorch Lightning] and [Pyro]. For an overview of how the scvi-tools package is structured, you\nmay refer to the [codebase overview] page.\n\nWe recommend checking out the [skeleton repository] as a starting point for developing and\ndeploying new models with scvi-tools.\n\n# Basic installation\n\nFor conda,\n\n```bash\nconda install scvi-tools -c conda-forge\n```\n\nand for pip,\n\n```bash\npip install scvi-tools\n```\n\nPlease be sure to install a version of [PyTorch] that is compatible with your GPU (if applicable).\n\n# Resources\n\n- Tutorials, API reference, and installation guides are available in the [documentation].\n- For discussion of usage, check out our [forum].\n- Please use the [issues] to submit bug reports.\n- If you'd like to contribute, check out our [contributing guide].\n- If you find a model useful for your research, please consider citing the corresponding\n    publication.\n\n# Reference\n\nIf you use `scvi-tools` in your work, please cite\n\n> **A Python library for probabilistic analysis of single-cell omics data**\n>\n> Adam Gayoso, Romain Lopez, Galen Xing, Pierre Boyeau, Valeh Valiollah Pour Amiri, Justin Hong,\n> Katherine Wu, Michael Jayasuriya, Edouard Mehlman, Maxime Langevin, Yining Liu, Jules Samaran,\n> Gabriel Misrachi, Achille Nazaret, Oscar Clivio, Chenling Xu, Tal Ashuach, Mariano Gabitto,\n> Mohammad Lotfollahi, Valentine Svensson, Eduardo da Veiga Beltrame, Vitalii Kleshchevnikov,\n> Carlos Talavera-López, Lior Pachter, Fabian J. Theis, Aaron Streets, Michael I. Jordan,\n> Jeffrey Regier & Nir Yosef\n>\n> _Nature Biotechnology_ 2022 Feb 07. doi: [10.1038/s41587-021-01206-w](https://doi.org/10.1038/s41587-021-01206-w).\n\nalong with the publication describing the model used.\n\nYou can cite the scverse publication as follows:\n\n> **The scverse project provides a computational ecosystem for single-cell omics data analysis**\n>\n> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso,\n> Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev,\n> Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle &\n> Fabian J. Theis\n>\n> _Nature Biotechnology_ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).\n\nscvi-tools is part of the scverse® project ([website](https://scverse.org),\n[governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).\n\nIf you like scverse® and want to support our mission, please consider making a tax-deductible\n[donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time,\nprofessional services, travel, workshops, and a variety of other needs.\n\n<div align=\"center\">\n<a href=\"https://numfocus.org/project/scverse\">\n  <img\n    src=\"https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png\"\n    width=\"200\"\n  >\n<\/a>\n<\/div>\n\nCopyright (c) 2026, Yosef Lab, Weizmann Institute of Science\n\n[anndata]: https://anndata.readthedocs.io/en/latest/\n[build-badge]: https://github.com/scverse/scvi-tools/actions/workflows/build.yml/badge.svg\n[build-link]: https://github.com/scverse/scvi-tools/actions/workflows/build.yml/\n[codebase overview]: https://docs.scvi-tools.org/en/stable/user_guide/background/codebase_overview.html\n[conda-badge]: https://img.shields.io/conda/dn/conda-forge/scvi-tools?logo=Anaconda\n[conda-link]: https://anaconda.org/conda-forge/scvi-tools\n[contributing guide]: https://docs.scvi-tools.org/en/stable/developer/code.html\n[coverage-badge]: https://codecov.io/gh/scverse/scvi-tools/branch/main/graph/badge.svg\n[coverage-link]: https://codecov.io/gh/scverse/scvi-tools\n[docs-badge]: https://readthedocs.org/projects/scvi/badge/?version=latest\n[docs-link]: https://scvi.readthedocs.io/en/stable/?badge=stable\n[documentation]: https://docs.scvi-tools.org/\n[forum]: https://discourse.scvi-tools.org\n[gh-stars-badge]: https://img.shields.io/github/stars/scverse/scvi-tools?style=flat&logo=GitHub&color=blue\n[gh-stars-link]: https://github.com/scverse/scvi-tools/stargazers\n[issues]: https://github.com/scverse/scvi-tools/issues\n[pepy-badge]: https://static.pepy.tech/badge/scvi-tools\n[pepy-link]: https://pepy.tech/project/scvi-tools\n[pypi-badge]: https://img.shields.io/pypi/v/scvi-tools.svg\n[pypi-link]: https://pypi.org/project/scvi-tools\n[pyro]: https://pyro.ai/\n[pytorch]: https://pytorch.org\n[pytorch lightning]: https://lightning.ai/docs/pytorch/stable/\n[scanpy]: http://scanpy.readthedocs.io/\n[scvi-tools]: https://scvi-tools.org/\n[skeleton repository]: https://github.com/scverse/simple-scvi\n[user guide]: https://docs.scvi-tools.org/en/stable/user_guide/index.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F000:09BF:B0EC7:2DCD4A:6AB929B6"},"text_sha256":"2ec1df8d20476549a56304ea828afa3c57af3105084f6765bf4cd33cafa31f12"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"amir-abdi/keras_to_tensorflow","input_row":{"repository":"amir-abdi/keras_to_tensorflow","url":"https://github.com/amir-abdi/keras_to_tensorflow","name":"keras_to_tensorflow","owner":"amir-abdi","description":"General code to convert a trained keras model into an inference tensorflow model","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1645,"issues":113,"created_at":"2017-05-10T04:43:29Z","updated_at":"2026-09-22T09:53:13Z","first_commit_at":"2017-05-10T04:43:30Z","last_commit_at":"2020-11-23T20:22:55Z","activity_months":42.5,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:34.931Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"amir-abdi/keras_to_tensorflow","visibility":"public","created_at":"2017-05-10T04:43:29Z","updated_at":"2026-09-22T09:53:13Z","private":false,"fork":false,"archived":false,"stargazers_count":1645,"open_issues_count":63,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2893","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:17E4BA6:1C05DCF:6AB929B6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2892","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084C:156040:17C39CC:1BE43B9:6AB929B7"},"commit":{"sha":"8894c6ab6ce9eeedfee317a2801108c7c8dc0faf","url":"https://github.com/amir-abdi/keras_to_tensorflow/commit/8894c6ab6ce9eeedfee317a2801108c7c8dc0faf","date":"2018-02-23T15:42:07Z","author_date":"2018-02-23T15:42:07Z","committer_date":"2018-02-23T15:42:07Z","tree_sha":"d317a04f60b9f8abbd8e21f09bcc03cc697ee0a4","message_first_line":"Merge pull request #28 from rsadek/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2891","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:17D9F3D:1BFB3EC:6AB929B7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2975,"blob_sha":"ade16e4b570375ac7f576554376417a54bb3e902","priority":0}],"documents":[{"path":"README.md","size":2975,"blob_sha":"ade16e4b570375ac7f576554376417a54bb3e902","priority":0,"status":200,"text":"# keras_to_tensorflow\nGeneral code to convert a trained keras model into an inference tensorflow model\n\nThe notebook ```keras_to_tensorflow```, is a sample code which loads a trained keras model, freezes the nodes (converts all tensorflow variables to tensorflow constants), and saves the inference graph and weights into a protobuf file (.pb). This file can then be used to deploy the trained model for inference. During freezing, other nodes of the network, which do not contribute  the tensor that would contain the output predictions, are prunned. This results in a smaller, optimized network.\n\nThe code on how to freeze and save keras models in previous versions of tensorflow is also available. Back then, the freeze_graph tool (```/tensorflow/python/tools/freeze_graph.py```) was used to convert the variables into constants. This functionality is now handled by ```graph_util.convert_variables_to_constants```\n\n## How to use\nThe keras model can be saved using `model.save('file_name.h5')` (check keras API documentation for details).\n\nYou can either use the iPython notebook (`kears_to_tensorflow.ipnyb`), or simply run the python script as below in the folder where your keras model is present:\n\n    python3 keras_to_tensorflow.py -input_model_file model.h5\n    python keras_to_tensorflow.py -input_model_file model.h5 \n\nTry `python3 keras_to_tensorflow.py --help` for other input arguments.\n\n## Input arguments\n- num_output: this value has nothing to do with the number of classes, batch_size, etc., and it is mostly equal to 1. If the network is a **multi-stream network** (forked network with multiple outputs), set the value to the number of outputs. \n\n- quantize: if set to True, use the quantize feature of Tensorflow (https://www.tensorflow.org/performance/quantization) [default: False]\n\n- use_theano: Thaeno and Tensorflow implement convolution in different ways. When using Keras with Theano backend, the order is set to 'channels_first'. This feature is not fully tested, and doesn't work with quantizization [default: False]\n\n- input_fld: directory holding the keras weights file [default: .]\n\n- output_fld: destination directory to save the tensorflow files [default: .]\n\n- input_model_file: name of the input weight file [default: 'model.h5']\n\n- output_model_file: name of the output weight file [default: args.input_model_file + '.pb']\n\n- graph_def: if set to True, will write the graph definition as an ascii file [default: False]\n\n- output_graphdef_file: if graph_def is set to True, the file name of the graph definition [default: model.ascii]\n\n- output_node_prefix: the prefix to use for output nodes. [default: output_node]\n\n## Not tested features:\nTheano support is not yet fully tested. I don't assume loading a theano model in Keras and saving it as a Tensorflow model would work without any proper conversion between the two. The feature is committed for theano enthusiasts to test.\n\n## Dependencies\n- Keras\n- Tensorflow\n- argparse\n- pathlib\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"958C:345ED4:177DE5:5D97DD:6AB929B5"},"text_sha256":"3eca7d6b49d26d9d26bd984de3a2da515269aa6a97f1d070fb2a2c6a38728989"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2890","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0908:3203A7:1786944:1BA7B32:6AB929B8"},"commit":{"sha":"b402c0e2a1047332b7de70349ef3fe83d1e41055","url":"https://github.com/amir-abdi/keras_to_tensorflow/commit/b402c0e2a1047332b7de70349ef3fe83d1e41055","date":"2020-11-23T20:22:55Z","author_date":"2020-11-23T20:22:55Z","committer_date":"2020-11-23T20:22:55Z","tree_sha":"7c37163eb929e2bc3aa184d733edca153eb16584","message_first_line":"Merge pull request #113 from andreped/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2889","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17BF052:1BE0515:6AB929B8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2257,"blob_sha":"f68bde3bd6f09cf75257ac55dd5ab00c0816f82b","priority":0}],"documents":[{"path":"README.md","size":2257,"blob_sha":"f68bde3bd6f09cf75257ac55dd5ab00c0816f82b","priority":0,"status":200,"text":"# Keras to TensorFlow\nThe **keras_to_tensorflow** is a tool that converts a trained keras model into a ready-for-inference TensorFlow model. *The tool is NOT tailored for TensorFlow 2.0 it SEEMS to be working fine.*\n\n#### Summary\n- In the default behaviour, this tool **freezes** the nodes (converts all TF variables to TF constants), and saves the inference graph and weights into a binary protobuf (.pb) file. During freezing, TensorFlow also applies node pruning which removes nodes with no contribution to the output tensor.\n\n- This tool supports multiple output networks and enables the user to rename the output tensors via the `--output_nodes_prefix` flag.\n \n- If the `--output_meta_ckpt` flag is set, the checkpoint and metagraph files for TensorFlow will also be exported\nwhich can later be used in the `tf.train.Saver` class to continue training.   \n\n\n## How to use\nKeras models can be saved as a single [`.hdf5` or `h5`] file, which stores both the architecture and weights, using the `model.save()` function.\n This model can be then converted to a TensorFlow model by calling this tool as follows:\n    \n    python keras_to_tensorflow.py \n        --input_model=\"path/to/keras/model.h5\" \n        --output_model=\"path/to/save/model.pb\"\n     \nKeras models can also be saved in two separate files where a [`.hdf5` or `h5`] file stores the weights, using the `model.save_weights()` function, and another `.json` file stores the network architecture using the `model.to_json()` function.\nIn this case, the model can be converted as follows:\n\n    python keras_to_tensorflow.py \n        --input_model=\"path/to/keras/model.h5\" \n        --input_model_json=\"path/to/keras/model.json\" \n        --output_model=\"path/to/save/model.pb\"\n\nTry \n\n    python keras_to_tensorflow.py --help\nto learn about other supported flags (quantize, output_nodes_prefix, save_graph_def).\n\n\n## Dependencies\n- keras\n- tensorflow\n- absl\n- pathlib\n\n## Legacy code\nThe code on how to freeze and save keras models in previous versions of tensorflow is also available. Back then, the freeze_graph tool (```/tensorflow/python/tools/freeze_graph.py```) was used to convert the variables into constants. This functionality is now handled by ```graph_util.convert_variables_to_constants```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7C0A:3B1F3:1842CA:5E5E7E:6AB929B6"},"text_sha256":"dd1f57be161398ba8ee52aa568e6a3b818e1fb746996a563f94130ecc6bdb312"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wy1iu/sphereface","input_row":{"repository":"wy1iu/sphereface","url":"https://github.com/wy1iu/sphereface","name":"sphereface","owner":"wy1iu","description":"Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1606,"issues":138,"created_at":"2017-07-19T16:46:26Z","updated_at":"2026-09-09T22:19:22Z","first_commit_at":"2017-07-19T16:46:27Z","last_commit_at":"2022-04-10T09:39:11Z","activity_months":56.689999999999998,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:37.278Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wy1iu/sphereface","visibility":"public","created_at":"2017-07-19T16:46:26Z","updated_at":"2026-09-09T22:19:22Z","private":false,"fork":false,"archived":false,"stargazers_count":1606,"open_issues_count":84,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2888","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:17EBAA4:1C0CDD0:6AB929B9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2887","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:179D346:1BBE63E:6AB929B9"},"commit":{"sha":"79cc33cb48c28bf83b2dc67d395e43f8bbacb441","url":"https://github.com/wy1iu/sphereface/commit/79cc33cb48c28bf83b2dc67d395e43f8bbacb441","date":"2018-05-07T21:48:49Z","author_date":"2018-05-07T21:48:49Z","committer_date":"2018-05-07T21:48:49Z","tree_sha":"635b81b0112c86f22c8084225ed135202488c799","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2886","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17AEF91:1BD00A3:6AB929BA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16150,"blob_sha":"cb03a83c6653518ddb69c72bad024f1192598c62","priority":0}],"documents":[{"path":"README.md","size":16150,"blob_sha":"cb03a83c6653518ddb69c72bad024f1192598c62","priority":0,"status":200,"text":"# *SphereFace*: Deep Hypersphere Embedding for Face Recognition\n\nBy Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj and Le Song\n\n### License\n\nSphereFace is released under the MIT License (refer to the LICENSE file for details).\n\n### Update\n- **2018.2.1**: As requested, the prototxt files for SphereFace-64 are released.\n- **2018.1.27**: We updated the appendix of our SphereFace paper with useful experiments and analysis. Take a look [here](http://wyliu.com/papers/LiuCVPR17v3.pdf). The content contains:\n\t- The intuition of removing the last ReLU;\n\t- Why do we want to normalize the weights other than because we need more geometric interpretation?\n\t- Empirical experiment of zeroing out the biases;\n\t- More 2D visualization of A-Softmax loss on MNIST;\n\t- **Angular Fisher score** for evaluating the angular feature discriminativeness, which is a new and straightforward evluation metric other than the final accuracy.\n\t- Experiments of SphereFace on MegaFace with different convolutional layers;\n\t- The annealing optimization strategy for A-Softmax loss;\n\t-  Details of the 3-patch ensemble strategy in MegaFace challenge;\n\n- **2018.1.20**: We updated some resources to summarize the current advances in angular margin learning. Take a look [here](#resources-for-angular-margin-learning).\n\n### Contents\n0. [Introduction](#introduction)\n0. [Citation](#citation)\n0. [Requirements](#requirements)\n0. [Installation](#installation)\n0. [Usage](#usage)\n0. [Models](#models)\n0. [Results](#results)\n0. [Video Demo](#video-demo)\n0. [Note](#note)\n0. [Third-party re-implementation](#third-party-re-implementation)\n0. [Resources for angular margin learning](#resources-for-angular-margin-learning)\n\n\n### Introduction\n\nThe repository contains the entire pipeline (including all the preprocessings) for deep face recognition with **`SphereFace`**. The recognition pipeline contains three major steps: face detection, face alignment and face recognition.\n\nSphereFace is a recently proposed face recognition method. It was initially described in an [arXiv technical report](https://arxiv.org/abs/1704.08063) and then published in [CVPR 2017](http://openaccess.thecvf.com/content_cvpr_2017/papers/Liu_SphereFace_Deep_Hypersphere_CVPR_2017_paper.pdf). The most up-to-date paper with more experiments can be found at [arXiv](https://arxiv.org/abs/1704.08063) or [here](http://wyliu.com/papers/LiuCVPR17v3.pdf). To facilitate the face recognition research, we give an example of training on [CAISA-WebFace](http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html) and testing on [LFW](http://vis-www.cs.umass.edu/lfw/) using the **20-layer CNN architecture** described in the paper (i.e. SphereFace-20). \n\nIn SphereFace, our network architecures use residual units as building blocks, but are quite different from the standrad ResNets  (e.g., BatchNorm is not used, the prelu replaces the relu, different initializations, etc). We proposed 4-layer, 20-layer, 36-layer and 64-layer architectures for face recognition (details can be found in the [paper]((https://arxiv.org/pdf/1704.08063.pdf)) and [prototxt files](https://github.com/wy1iu/sphereface/blob/master/train/code/sphereface_model.prototxt)). We provided the 20-layer architecure as an example here. If our proposed architectures also help your research, please consider to cite our paper.\n\nSphereFace achieves the state-of-the-art verification performance (previously No.1) in [MegaFace Challenge](http://megaface.cs.washington.edu/results/facescrub.html#3) under the small training set protocol.\n\n\n### Citation\n\nIf you find **SphereFace** useful in your research, please consider to cite:\n\n\t@InProceedings{Liu_2017_CVPR,\n\t  title = {SphereFace: Deep Hypersphere Embedding for Face Recognition},\n\t  author = {Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Li, Ming and Raj, Bhiksha and Song, Le},\n\t  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n\t  year = {2017}\n\t}\n\nOur another closely-related previous work in ICML'16 ([more](https://github.com/wy1iu/LargeMargin_Softmax_Loss)):\n\n\t@InProceedings{Liu_2016_ICML,\n\t  title = {Large-Margin Softmax Loss for Convolutional Neural Networks},\n\t  author = {Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Yang, Meng},\n\t  booktitle = {Proceedings of The 33rd International Conference on Machine Learning},\n\t  year = {2016}\n\t}\n\n\n### Requirements\n1. Requirements for `Matlab`\n2. Requirements for `Caffe` and `matcaffe` (see: [Caffe installation instructions](http://caffe.berkeleyvision.org/installation.html))\n3. Requirements for `MTCNN` (see: [MTCNN - face detection & alignment](https://github.com/kpzhang93/MTCNN_face_detection_alignment)) and `Pdollar toolbox` (see: [Piotr's Image & Video Matlab Toolbox](https://github.com/pdollar/toolbox)).\n\n### Installation\n1. Clone the SphereFace repository. We'll call the directory that you cloned SphereFace as **`SPHEREFACE_ROOT`**.\n\n    ```Shell\n    git clone --recursive https://github.com/wy1iu/sphereface.git\n    ```\n\n2. Build Caffe and matcaffe\n\n    ```Shell\n    cd $SPHEREFACE_ROOT/tools/caffe-sphereface\n    # Now follow the Caffe installation instructions here:\n    # http://caffe.berkeleyvision.org/installation.html\n    make all -j8 && make matcaffe\n    ```\n\n### Usage\n\n*After successfully completing the [installation](#installation)*, you are ready to run all the following experiments.\n\n#### Part 1: Preprocessing\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/preprocess/`**\n1. Download the training set (`CASIA-WebFace`) and test set (`LFW`) and place them in **`data/`**.\n\n\t```Shell\n\tmv /your_path/CASIA_WebFace  data/\n\t./code/get_lfw.sh\n\ttar xvf data/lfw.tgz -C data/\n\t```\n    Please make sure that the directory of **`data/`** contains two datasets.\n    \n2. Detect faces and facial landmarks in CAISA-WebFace and LFW datasets using `MTCNN` (see: [MTCNN - face detection & alignment](https://github.com/kpzhang93/MTCNN_face_detection_alignment)).\n\n\t```Matlab\n\t# In Matlab Command Window\n\trun code/face_detect_demo.m\n\t```\n    This will create a file `dataList.mat` in the directory of **`result/`**.\n3. Align faces to a canonical pose using similarity transformation.\n\n\t```Matlab\n\t# In Matlab Command Window\n  \trun code/face_align_demo.m\n  \t```\n    This will create two folders (**`CASIA-WebFace-112X96/`** and **`lfw-112X96/`**) in the directory of **`result/`**, containing the aligned face images.\n\n#### Part 2: Train\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/train/`**\n\n1. Get a list of training images and labels.\n\n\t```Shell&Matlab\n\tmv ../preprocess/result/CASIA-WebFace-112X96 data/\n\t# In Matlab Command Window\n\trun code/get_list.m\n\t```\n    The aligned face images in folder **`CASIA-WebFace-112X96/`** are moved from ***preprocess*** folder to ***train*** folder. A list `CASIA-WebFace-112X96.txt` is created in the directory of **`data/`** for the subsequent training.\n\n2. Train the sphereface model.\n\n\t```Shell\n\t./code/sphereface_train.sh 0,1\n\t```\n    After training, a model `sphereface_model_iter_28000.caffemodel` and a corresponding log file `sphereface_train.log` are placed in the directory of `result/sphereface/`.\n\n#### Part 3: Test\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/test/`**\n\n1. Get the pair list of LFW ([view 2](http://vis-www.cs.umass.edu/lfw/#views)).\n\n\t```Shell\n\tmv ../preprocess/result/lfw-112X96 data/\n\t./code/get_pairs.sh\n\t```\n\tMake sure that the LFW dataset and`pairs.txt` in the directory of **`data/`**\n\n1. Extract deep features and test on LFW.\n\n\t```Matlab\n\t# In Matlab Command Window\n\trun code/evaluation.m\n\t```\n    Finally we have the `sphereface_model.caffemodel`, extracted features `pairs.mat` in folder **`result/`**, and accuracy on LFW like this:\n\n\tfold|1|2|3|4|5|6|7|8|9|10|AVE\n\t:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:\n\tACC|99.33%|99.17%|98.83%|99.50%|99.17%|99.83%|99.17%|98.83%|99.83%|99.33%|99.30%\n\n### Models\n1. Visualizations of network architecture (tools from [ethereon](http://ethereon.github.io/netscope/quickstart.html)):\n\t- SphereFace-20: [link](http://ethereon.github.io/netscope/#/gist/20f6ddf70a35dec5019a539a502bccc5)\n2. Model file\n\t- SphereFace-20: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegb2F6dmlmOXhWaVk) | [Baidu](http://pan.baidu.com/s/1qY5FTF2)\n\t- Third-party SphereFace-4 & SphereFace-6: [here](https://github.com/wy1iu/sphereface/issues/81) by [zuoqing1988](https://github.com/zuoqing1988)\n\n\n### Results\n1. Following the instruction, we go through the entire pipeline for 5 times. The accuracies on LFW are shown below. Generally, we report the average but we release the [model-3](#models) here.\n\n\tExperiment |#1|#2|#3 (released)|#4|#5\n\t:---:|:---:|:---:|:---:|:---:|:---:\n\tACC|99.24%|99.20%|**99.30%**|99.27%|99.13%\n\n2. Other intermediate results:\n    - LFW features: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegenU0cGJYZmlRUlU) | [Baidu](http://pan.baidu.com/s/1o8QIMUY)\n    - Training log: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegcWkxdVV4X1FOaFU) | [Baidu](http://pan.baidu.com/s/1i5QmXrJ)\n\n\n\n### Video Demo\n[![SphereFace Demo](https://img.youtube.com/vi/P6jEzzwoYWs/0.jpg)](https://www.youtube.com/watch?v=P6jEzzwoYWs)\n\nPlease click the image to watch the Youtube video. For Youku users, click [here](http://t.cn/RCZ0w1c).\n\nDetails:\n1. It is an **open-set** face recognition scenario. The video is processed frame by frame, following the same pipeline in this repository.\n2. Gallery set consists of 6 identities. Each main character has only 1 gallery face image. All the detected faces are included in probe set.\n3. There is no overlap between gallery set and training set (CASIA-WebFace).\n4. The scores between each probe face and gallery set are computed by cosine similarity. If the maximal score of a probe face is smaller than a pre-definded threshold, the probe face would be considered as an outlier.\n5. Main characters are labeled by boxes with different colors. (\n![#ff0000](https://placehold.it/15/ff0000/000000?text=+)Rachel,\n![#ffff00](https://placehold.it/15/ffff00/000000?text=+)Monica,\n![#ff80ff](https://placehold.it/15/ff80ff/000000?text=+)Phoebe,\n![#00ffff](https://placehold.it/15/00ffff/000000?text=+)Joey,\n![#0000ff](https://placehold.it/15/0000ff/000000?text=+)Chandler,\n![#00ff00](https://placehold.it/15/00ff00/000000?text=+)Ross)\n\n\n### Note\n1. **Backward gradient**\n\t- In this implementation, we did not strictly follow the equations in paper. Instead, we normalize the scale of gradient. It can be interpreted as a varying strategy for learning rate to help converge more stably. Similar idea and intuition also appear in [normalized gradients](https://arxiv.org/pdf/1707.04822.pdf) and [projected gradient descent](https://www.stats.ox.ac.uk/~lienart/blog_opti_pgd.html).\n\t- More specifically, if the original gradient of ***f*** w.r.t ***x*** can be written as **df/dx = coeff_w \\*  w + coeff_x \\* x**, we use the normalized version **[df/dx] = (coeff_w \\* w + coeff_x \\* x) / norm_wx** to perform backward propragation, where **norm_wx** is **sqrt(coeff_w^2 + coeff_x^2)**. The same operation is also applied to the gradient of ***f*** w.r.t ***w***.\n\t- In fact, you do not necessarily need to use the original gradient, since the original gradient sometimes is not an optimal design. One important criterion for modifying the backprop gradient is that the new \"gradient\" (strictly speaking, it is not a gradient anymore) need to make the objective value decrease stably and consistently. (In terms of some failure cases for gradient-based back-prop, I recommand [a great talk](https://www.youtube.com/watch?v=jWVZnkTfB3c) by [Shai Shalev-Shwartz](https://www.cs.huji.ac.il/~shais/))\n\t- If you use the original gradient to do the backprop, you could still make it work but may need different lambda settings, iteration number and learning rate decay strategy. \n\n2. **Lambda** and **Note for training (When the loss becomes 87)**\n\t- Please refer to our previous [note and explanation](https://github.com/wy1iu/LargeMargin_Softmax_Loss#notes-for-training).\n\t\n3. **According to recent advances, using feature normalization with a tunable scaling parameter s can significantly improve the performance of SphereFace on MegaFace challenge**\n\t- This is supported by the experiments done by [CosFace](https://arxiv.org/abs/1801.09414). Similar idea also appears in [additive margin softmax](https://arxiv.org/abs/1801.05599).\n\n4. **Difficulties in convergence**\n        - When you encounter difficulties in convergence (it may appear if you use *SphereFace* in another dataset), usually there are a few easy ways to address it.\n\t- First, try to use large mini-batch size. \n\t- Second, try to use PReLU instead of ReLU. \n\t- Third, increase the width and depth of our network. \n\t- Fourth, try to use better initialization. For example, use the pretrained model from the original softmax loss (it is also equivalent to finetuning).\n\t- Last and the most effective thing you could try is to change the hyper-parameters for lambda_min, lambda and its decay speed.\n\n\n### Third-party re-implementation\n- PyTorch: [code](https://github.com/clcarwin/sphereface_pytorch) by [clcarwin](https://github.com/clcarwin).\n- TensorFlow: [code](https://github.com/pppoe/tensorflow-sphereface-asoftmax) by [pppoe](https://github.com/pppoe).\n- TensorFlow: [code](https://github.com/hujun100/tensorflow-sphereface) by [hujun100](https://github.com/hujun100).\n- TensorFlow: [code](https://github.com/HiKapok/tf.extra_losses) by [HiKapok](https://github.com/HiKapok).\n- TensorFlow: [code](https://github.com/andrewhuman/sphereloss_tensorflow) by [andrewhuman](https://github.com/andrewhuman).\n- MXNet: [code](https://github.com/deepinsight/insightface) by [deepinsight](https://github.com/deepinsight) (by setting loss-type=1: SphereFace).\n- Caffe2: [code](https://github.com/tpys/face-recognition-caffe2) by [tpys](https://github.com/tpys).\n- Trained on MS-1M: [code](https://github.com/KaleidoZhouYN/Sphereface-Ms-celeb-1M) by [KaleidoZhouYN](https://github.com/KaleidoZhouYN).\n- System: [A cool face demo system](https://github.com/tpys/face-everthing) using SphereFace by [tpys](https://github.com/tpys).\n- Third-party pretrained models: [code](https://github.com/goodluckcwl/Sphereface-model) by [goodluckcwl](https://github.com/goodluckcwl).\n\n### Resources for angular margin learning\n\n[L-Softmax loss](https://github.com/wy1iu/LargeMargin_Softmax_Loss) and [SphereFace](https://github.com/wy1iu/sphereface) present a promising framework for angular representation learning, which is shown very effective in deep face recognition. We are super excited that our works has inspired many well-performing methods (and loss functions). We list a few of them for your potential reference (not very up-to-date):\n\n- Additive margin softmax: [paper](https://arxiv.org/abs/1801.05599) and [code](https://github.com/happynear/AMSoftmax)\n- CosFace: [paper](https://arxiv.org/abs/1801.09414)\n- ArcFace/InsightFace: [paper](https://arxiv.org/abs/1801.07698) and [code](https://github.com/deepinsight/insightface)\n- NormFace: [paper](https://arxiv.org/abs/1704.06369) and [code](https://github.com/happynear/NormFace)\n- L2-Softmax: [paper](https://arxiv.org/abs/1703.09507)\n- von Mises-Fisher Mixture Model: [paper](https://arxiv.org/abs/1706.04264)\n- COCO loss: [paper](https://arxiv.org/pdf/1710.00870.pdf) and [code](https://github.com/sciencefans/coco_loss)\n- Angular Triplet Loss: [code](https://github.com/KaleidoZhouYN/Angular-Triplet-Loss)\n\nTo evaluate the effectiveness of the angular margin learning method, you may consider to use the **angular Fisher score** proposed in [the Appendix E of our SphereFace Paper](http://wyliu.com/papers/LiuCVPR17v3.pdf).\n\nDisclaimer: Some of these methods may not necessarily be inspired by us, but we still list them due to its relevance and excellence.\n\n### Contact\n\n  [Weiyang Liu](https://wyliu.com) and [Yandong Wen](https://ydwen.github.io)\n\n  Questions can also be left as issues in the repository. We will be happy to answer them.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6630:3E1DA:178544:5DA084:6AB929B8"},"text_sha256":"9050f83e36818516b8d9fc5011da8d86bcc61b485425b6e2a39d475775801bcd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2885","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:1814341:1C354F9:6AB929BB"},"commit":{"sha":"f20b130a6e080bb51d2e46a9e157686df622bef3","url":"https://github.com/wy1iu/sphereface/commit/f20b130a6e080bb51d2e46a9e157686df622bef3","date":"2022-04-10T09:39:11Z","author_date":"2022-04-10T09:39:11Z","committer_date":"2022-04-10T09:39:11Z","tree_sha":"43d8826e0da5385e1a00d0110d27e8a85b5e1682","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2884","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086F:74181:1776BAB:1B9802A:6AB929BB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17379,"blob_sha":"ebc184ac7e57c71fe385cb1dd2554f540c8c1cd6","priority":0}],"documents":[{"path":"README.md","size":17379,"blob_sha":"ebc184ac7e57c71fe385cb1dd2554f540c8c1cd6","priority":0,"status":200,"text":"# *SphereFace*: Deep Hypersphere Embedding for Face Recognition\n\nBy Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj and Le Song\n\n### License\n\nSphereFace is released under the MIT License (refer to the LICENSE file for details).\n\n### Update\n- **2022.4.10**: **If you are looking for an easy-to-use and well-performing PyTorch implementation of SphereFace, we now have it! Check out our official SphereFace PyTorch re-implementation [here](https://opensphere.world/).**\n- **2018.8.14**: We recommand an interesting ECCV 2018 paper that comprehensively evaluates SphereFace (A-Softmax) on current widely used face datasets and their proposed noise-controlled IMDb-Face dataset. Interested users can try to train SphereFace on their IMDb-Face dataset. Take a look [here](https://arxiv.org/pdf/1807.11649.pdf).\n- **2018.5.23**: A new *SphereFace+* that explicitly enhances the inter-class separability has been introduced in our technical report. Check it out [here](https://arxiv.org/abs/1805.09298). Code is released [here](https://github.com/wy1iu/sphereface-plus).\n- **2018.2.1**: As requested, the prototxt files for SphereFace-64 are released.\n- **2018.1.27**: We updated the appendix of our SphereFace paper with useful experiments and analysis. Take a look [here](http://wyliu.com/papers/LiuCVPR17v3.pdf). The content contains:\n\t- The intuition of removing the last ReLU;\n\t- Why do we want to normalize the weights other than because we need more geometric interpretation?\n\t- Empirical experiment of zeroing out the biases;\n\t- More 2D visualization of A-Softmax loss on MNIST;\n\t- **Angular Fisher score** for evaluating the angular feature discriminativeness, which is a new and straightforward evluation metric other than the final accuracy.\n\t- Experiments of SphereFace on MegaFace with different convolutional layers;\n\t- The annealing optimization strategy for A-Softmax loss;\n\t-  Details of the 3-patch ensemble strategy in MegaFace challenge;\n\n- **2018.1.20**: We updated some resources to summarize the current advances in angular margin learning. Take a look [here](#resources-for-angular-margin-learning).\n\n### Contents\n0. [Introduction](#introduction)\n0. [Citation](#citation)\n0. [Requirements](#requirements)\n0. [Installation](#installation)\n0. [Usage](#usage)\n0. [Models](#models)\n0. [Results](#results)\n0. [Video Demo](#video-demo)\n0. [Note](#note)\n0. [Third-party re-implementation](#third-party-re-implementation)\n0. [Resources for angular margin learning](#resources-for-angular-margin-learning)\n\n\n### Introduction\n\nThe repository contains the entire pipeline (including all the preprocessings) for deep face recognition with **`SphereFace`**. The recognition pipeline contains three major steps: face detection, face alignment and face recognition.\n\nSphereFace is a recently proposed face recognition method. It was initially described in an [arXiv technical report](https://arxiv.org/abs/1704.08063) and then published in [CVPR 2017](http://openaccess.thecvf.com/content_cvpr_2017/papers/Liu_SphereFace_Deep_Hypersphere_CVPR_2017_paper.pdf). The most up-to-date paper with more experiments can be found at [arXiv](https://arxiv.org/abs/1704.08063) or [here](http://wyliu.com/papers/LiuCVPR17v3.pdf). To facilitate the face recognition research, we give an example of training on [CAISA-WebFace](http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html) and testing on [LFW](http://vis-www.cs.umass.edu/lfw/) using the **20-layer CNN architecture** described in the paper (i.e. SphereFace-20). \n\nIn SphereFace, our network architecures use residual units as building blocks, but are quite different from the standrad ResNets  (e.g., BatchNorm is not used, the prelu replaces the relu, different initializations, etc). We proposed 4-layer, 20-layer, 36-layer and 64-layer architectures for face recognition (details can be found in the [paper]((https://arxiv.org/pdf/1704.08063.pdf)) and [prototxt files](https://github.com/wy1iu/sphereface/blob/master/train/code/sphereface_model.prototxt)). We provided the 20-layer architecure as an example here. If our proposed architectures also help your research, please consider to cite our paper.\n\nSphereFace achieves the state-of-the-art verification performance (previously No.1) in [MegaFace Challenge](http://megaface.cs.washington.edu/results/facescrub.html#3) under the small training set protocol.\n\n\n### Citation\n\nIf you find **SphereFace** useful in your research, please consider to cite:\n\n\t@InProceedings{Liu_2017_CVPR,\n\t  title = {SphereFace: Deep Hypersphere Embedding for Face Recognition},\n\t  author = {Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Li, Ming and Raj, Bhiksha and Song, Le},\n\t  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n\t  year = {2017}\n\t}\n\nOur another closely-related previous work in ICML'16 ([more](https://github.com/wy1iu/LargeMargin_Softmax_Loss)):\n\n\t@InProceedings{Liu_2016_ICML,\n\t  title = {Large-Margin Softmax Loss for Convolutional Neural Networks},\n\t  author = {Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Yang, Meng},\n\t  booktitle = {Proceedings of The 33rd International Conference on Machine Learning},\n\t  year = {2016}\n\t}\n\n\n### Requirements\n1. Requirements for `Matlab`\n2. Requirements for `Caffe` and `matcaffe` (see: [Caffe installation instructions](http://caffe.berkeleyvision.org/installation.html))\n3. Requirements for `MTCNN` (see: [MTCNN - face detection & alignment](https://github.com/kpzhang93/MTCNN_face_detection_alignment)) and `Pdollar toolbox` (see: [Piotr's Image & Video Matlab Toolbox](https://github.com/pdollar/toolbox)).\n\n### Installation\n1. Clone the SphereFace repository. We'll call the directory that you cloned SphereFace as **`SPHEREFACE_ROOT`**.\n\n    ```Shell\n    git clone --recursive https://github.com/wy1iu/sphereface.git\n    ```\n\n2. Build Caffe and matcaffe\n\n    ```Shell\n    cd $SPHEREFACE_ROOT/tools/caffe-sphereface\n    # Now follow the Caffe installation instructions here:\n    # http://caffe.berkeleyvision.org/installation.html\n    make all -j8 && make matcaffe\n    ```\n\n### Usage\n\n*After successfully completing the [installation](#installation)*, you are ready to run all the following experiments.\n\n#### Part 1: Preprocessing\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/preprocess/`**\n1. Download the training set (`CASIA-WebFace`) and test set (`LFW`) and place them in **`data/`**.\n\n\t```Shell\n\tmv /your_path/CASIA_WebFace  data/\n\t./code/get_lfw.sh\n\ttar xvf data/lfw.tgz -C data/\n\t```\n    Please make sure that the directory of **`data/`** contains two datasets.\n    \n2. Detect faces and facial landmarks in CAISA-WebFace and LFW datasets using `MTCNN` (see: [MTCNN - face detection & alignment](https://github.com/kpzhang93/MTCNN_face_detection_alignment)).\n\n\t```Matlab\n\t# In Matlab Command Window\n\trun code/face_detect_demo.m\n\t```\n    This will create a file `dataList.mat` in the directory of **`result/`**.\n3. Align faces to a canonical pose using similarity transformation.\n\n\t```Matlab\n\t# In Matlab Command Window\n  \trun code/face_align_demo.m\n  \t```\n    This will create two folders (**`CASIA-WebFace-112X96/`** and **`lfw-112X96/`**) in the directory of **`result/`**, containing the aligned face images.\n\n#### Part 2: Train\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/train/`**\n\n1. Get a list of training images and labels.\n\n\t```Shell&Matlab\n\tmv ../preprocess/result/CASIA-WebFace-112X96 data/\n\t# In Matlab Command Window\n\trun code/get_list.m\n\t```\n    The aligned face images in folder **`CASIA-WebFace-112X96/`** are moved from ***preprocess*** folder to ***train*** folder. A list `CASIA-WebFace-112X96.txt` is created in the directory of **`data/`** for the subsequent training.\n\n2. Train the sphereface model.\n\n\t```Shell\n\t./code/sphereface_train.sh 0,1\n\t```\n    After training, a model `sphereface_model_iter_28000.caffemodel` and a corresponding log file `sphereface_train.log` are placed in the directory of `result/sphereface/`.\n\n#### Part 3: Test\n**Note:** In this part, we assume you are in the directory **`$SPHEREFACE_ROOT/test/`**\n\n1. Get the pair list of LFW ([view 2](http://vis-www.cs.umass.edu/lfw/#views)).\n\n\t```Shell\n\tmv ../preprocess/result/lfw-112X96 data/\n\t./code/get_pairs.sh\n\t```\n\tMake sure that the LFW dataset and`pairs.txt` in the directory of **`data/`**\n\n1. Extract deep features and test on LFW.\n\n\t```Matlab\n\t# In Matlab Command Window\n\trun code/evaluation.m\n\t```\n    Finally we have the `sphereface_model.caffemodel`, extracted features `pairs.mat` in folder **`result/`**, and accuracy on LFW like this:\n\n\tfold|1|2|3|4|5|6|7|8|9|10|AVE\n\t:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:\n\tACC|99.33%|99.17%|98.83%|99.50%|99.17%|99.83%|99.17%|98.83%|99.83%|99.33%|99.30%\n\n### Models\n1. Visualizations of network architecture (tools from [ethereon](http://ethereon.github.io/netscope/quickstart.html)):\n\t- SphereFace-20: [link](http://ethereon.github.io/netscope/#/gist/20f6ddf70a35dec5019a539a502bccc5)\n2. Model file\n\t- SphereFace-20: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegb2F6dmlmOXhWaVk) | [Baidu](http://pan.baidu.com/s/1qY5FTF2)\n\t- Third-party SphereFace-4 & SphereFace-6: [here](https://github.com/wy1iu/sphereface/issues/81) by [zuoqing1988](https://github.com/zuoqing1988)\n\n\n### Results\n1. Following the instruction, we go through the entire pipeline for 5 times. The accuracies on LFW are shown below. Generally, we report the average but we release the [model-3](#models) here.\n\n\tExperiment |#1|#2|#3 (released)|#4|#5\n\t:---:|:---:|:---:|:---:|:---:|:---:\n\tACC|99.24%|99.20%|**99.30%**|99.27%|99.13%\n\n2. Other intermediate results:\n    - LFW features: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegenU0cGJYZmlRUlU) | [Baidu](http://pan.baidu.com/s/1o8QIMUY)\n    - Training log: [Google Drive](https://drive.google.com/open?id=0B_geeR2lTMegcWkxdVV4X1FOaFU) | [Baidu](http://pan.baidu.com/s/1i5QmXrJ)\n\n\n\n### Video Demo\n[![SphereFace Demo](https://img.youtube.com/vi/P6jEzzwoYWs/0.jpg)](https://www.youtube.com/watch?v=P6jEzzwoYWs)\n\nPlease click the image to watch the Youtube video. For Youku users, click [here](http://t.cn/RCZ0w1c).\n\nDetails:\n1. It is an **open-set** face recognition scenario. The video is processed frame by frame, following the same pipeline in this repository.\n2. Gallery set consists of 6 identities. Each main character has only 1 gallery face image. All the detected faces are included in probe set.\n3. There is no overlap between gallery set and training set (CASIA-WebFace).\n4. The scores between each probe face and gallery set are computed by cosine similarity. If the maximal score of a probe face is smaller than a pre-definded threshold, the probe face would be considered as an outlier.\n5. Main characters are labeled by boxes with different colors. (\n![#ff0000](https://placehold.it/15/ff0000/000000?text=+)Rachel,\n![#ffff00](https://placehold.it/15/ffff00/000000?text=+)Monica,\n![#ff80ff](https://placehold.it/15/ff80ff/000000?text=+)Phoebe,\n![#00ffff](https://placehold.it/15/00ffff/000000?text=+)Joey,\n![#0000ff](https://placehold.it/15/0000ff/000000?text=+)Chandler,\n![#00ff00](https://placehold.it/15/00ff00/000000?text=+)Ross)\n\n\n### Note\n1. **Backward gradient**\n\t- In this implementation, we did not strictly follow the equations in paper. Instead, we normalize the scale of gradient. It can be interpreted as a varying strategy for learning rate to help converge more stably. Similar idea and intuition also appear in [normalized gradients](https://arxiv.org/pdf/1707.04822.pdf) and [projected gradient descent](https://www.stats.ox.ac.uk/~lienart/blog_opti_pgd.html).\n\t- More specifically, if the original gradient of ***f*** w.r.t ***x*** can be written as **df/dx = coeff_w \\*  w + coeff_x \\* x**, we use the normalized version **[df/dx] = (coeff_w \\* w + coeff_x \\* x) / norm_wx** to perform backward propragation, where **norm_wx** is **sqrt(coeff_w^2 + coeff_x^2)**. The same operation is also applied to the gradient of ***f*** w.r.t ***w***.\n\t- In fact, you do not necessarily need to use the original gradient, since the original gradient sometimes is not an optimal design. One important criterion for modifying the backprop gradient is that the new \"gradient\" (strictly speaking, it is not a gradient anymore) need to make the objective value decrease stably and consistently. (In terms of some failure cases for gradient-based back-prop, I recommand [a great talk](https://www.youtube.com/watch?v=jWVZnkTfB3c) by [Shai Shalev-Shwartz](https://www.cs.huji.ac.il/~shais/))\n\t- If you use the original gradient to do the backprop, you could still make it work but may need different lambda settings, iteration number and learning rate decay strategy. \n\n2. **Lambda** and **Note for training (When the loss becomes 87)**\n\t- Please refer to our previous [note and explanation](https://github.com/wy1iu/LargeMargin_Softmax_Loss#notes-for-training).\n\t\n3. **According to recent advances, using feature normalization with a tunable scaling parameter s can significantly improve the performance of SphereFace on MegaFace challenge**\n\t- This is supported by the experiments done by [CosFace](https://arxiv.org/abs/1801.09414). Similar idea also appears in [additive margin softmax](https://arxiv.org/abs/1801.05599).\n\n4. **Difficulties in convergence**\n        - When you encounter difficulties in convergence (it may appear if you use *SphereFace* in another dataset), usually there are a few easy ways to address it.\n\t- First, try to use large mini-batch size. \n\t- Second, try to use PReLU instead of ReLU. \n\t- Third, increase the width and depth of our network. \n\t- Fourth, try to use better initialization. For example, use the pretrained model from the original softmax loss (it is also equivalent to finetuning).\n\t- Last and the most effective thing you could try is to change the hyper-parameters for lambda_min, lambda and its decay speed.\n\n\n### Third-party re-implementation\n- PyTorch: [code](https://github.com/clcarwin/sphereface_pytorch) by [clcarwin](https://github.com/clcarwin).\n- PyTorch: [code](https://github.com/Joyako/SphereFace-pytorch) by [Joyako](https://github.com/Joyako).\n- TensorFlow: [code](https://github.com/pppoe/tensorflow-sphereface-asoftmax) by [pppoe](https://github.com/pppoe).\n- TensorFlow (with awesome animations): [code](https://github.com/YunYang1994/SphereFace) by [YunYang1994](https://github.com/YunYang1994).\n- TensorFlow: [code](https://github.com/hujun100/tensorflow-sphereface) by [hujun100](https://github.com/hujun100).\n- TensorFlow: [code](https://github.com/HiKapok/tf.extra_losses) by [HiKapok](https://github.com/HiKapok).\n- TensorFlow: [code](https://github.com/andrewhuman/sphereloss_tensorflow) by [andrewhuman](https://github.com/andrewhuman).\n- MXNet: [code](https://github.com/deepinsight/insightface) by [deepinsight](https://github.com/deepinsight) (by setting loss-type=1: SphereFace).\n- Model compression for SphereFace: [code](https://github.com/isthatyoung/Sphereface-prune) by [Siyang Liu](https://github.com/isthatyoung) (useful in practice)\n- Caffe2: [code](https://github.com/tpys/face-recognition-caffe2) by [tpys](https://github.com/tpys).\n- Trained on MS-1M: [code](https://github.com/KaleidoZhouYN/Sphereface-Ms-celeb-1M) by [KaleidoZhouYN](https://github.com/KaleidoZhouYN).\n- System: [A cool face demo system](https://github.com/tpys/face-everthing) using SphereFace by [tpys](https://github.com/tpys).\n- Third-party pretrained models: [code](https://github.com/goodluckcwl/Sphereface-model) by [goodluckcwl](https://github.com/goodluckcwl).\n\n### Resources for angular margin learning\n\n[L-Softmax loss](https://github.com/wy1iu/LargeMargin_Softmax_Loss) and [SphereFace](https://github.com/wy1iu/sphereface) present a promising framework for angular representation learning, which is shown very effective in deep face recognition. We are super excited that our works has inspired many well-performing methods (and loss functions). We list a few of them for your potential reference (not very up-to-date):\n\n- Additive margin softmax: [paper](https://arxiv.org/abs/1801.05599) and [code](https://github.com/happynear/AMSoftmax)\n- CosFace: [paper](https://arxiv.org/abs/1801.09414)\n- ArcFace/InsightFace: [paper](https://arxiv.org/abs/1801.07698) and [code](https://github.com/deepinsight/insightface)\n- NormFace: [paper](https://arxiv.org/abs/1704.06369) and [code](https://github.com/happynear/NormFace)\n- L2-Softmax: [paper](https://arxiv.org/abs/1703.09507)\n- von Mises-Fisher Mixture Model: [paper](https://arxiv.org/abs/1706.04264)\n- COCO loss: [paper](https://arxiv.org/pdf/1710.00870.pdf) and [code](https://github.com/sciencefans/coco_loss)\n- Angular Triplet Loss: [code](https://github.com/KaleidoZhouYN/Angular-Triplet-Loss)\n\nTo evaluate the effectiveness of the angular margin learning method, you may consider to use the **angular Fisher score** proposed in [the Appendix E of our SphereFace Paper](http://wyliu.com/papers/LiuCVPR17v3.pdf).\n\nDisclaimer: Some of these methods may not necessarily be inspired by us, but we still list them due to its relevance and excellence.\n\n### Contact\n\n  [Weiyang Liu](https://wyliu.com) and [Yandong Wen](https://ydwen.github.io)\n\n  Questions can also be left as issues in the repository. We will be happy to answer them.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6BCA:17E138:178F28:5DAA1A:6AB929BB"},"text_sha256":"f119d94b4e7be7bc8748aa6226583f48f67b775d1e70f1b230f230c10895d109"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"maxpumperla/elephas","input_row":{"repository":"maxpumperla/elephas","url":"https://github.com/maxpumperla/elephas","name":"elephas","owner":"maxpumperla","description":"Distributed Deep learning with Keras & Spark","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1574,"issues":161,"created_at":"2015-08-13T12:09:19Z","updated_at":"2026-09-07T07:56:04Z","first_commit_at":"2015-08-13T12:09:19Z","last_commit_at":"2022-08-31T01:52:51Z","activity_months":84.579999999999998,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:40.698Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"maxpumperla/elephas","visibility":"public","created_at":"2015-08-13T12:09:19Z","updated_at":"2026-09-07T07:56:04Z","private":false,"fork":false,"archived":false,"stargazers_count":1574,"open_issues_count":11,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2883","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:1801198:1C22793:6AB929BC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2882","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:1853F5D:1C756B0:6AB929BD"},"commit":{"sha":"7562adb4bfe8af43b85a3fa43be1f75167d8c836","url":"https://github.com/maxpumperla/elephas/commit/7562adb4bfe8af43b85a3fa43be1f75167d8c836","date":"2018-04-19T16:08:11Z","author_date":"2018-04-19T16:08:11Z","committer_date":"2018-04-19T16:08:11Z","tree_sha":"40914d40a6a3110df0dd64bb9e37f0bd433fa00e","message_first_line":"Fixed number of epochs model is fitted (Issue #77) (#84)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2881","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17C007F:1BE1544:6AB929BD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18468,"blob_sha":"d8bcf1235f7017fb35c131ee021372d9c581f7eb","priority":0}],"documents":[{"path":"README.md","size":18468,"blob_sha":"d8bcf1235f7017fb35c131ee021372d9c581f7eb","priority":0,"status":200,"text":"# Elephas: Distributed Deep Learning with Keras & Spark [![Build Status](https://travis-ci.org/maxpumperla/elephas.svg?branch=master)](https://travis-ci.org/maxpumperla/elephas)\n\nElephas is an extension of [Keras](http://keras.io), which allows you to run distributed deep learning models at scale with [Spark](http://spark.apache.org). Elephas currently supports a number of applications, including:\n\n- [Data-parallel training of deep learning models](#usage-of-data-parallel-models)\n- [Distributed hyper-parameter optimization](#distributed-hyper-parameter-optimization)\n- [Distributed training of ensemble models](#distributed-training-of-ensemble-models)\n\n\nSchematically, elephas works as follows.\n\n![Elephas](elephas.gif)\n\nTable of content:\n- [Elephas: Distributed Deep Learning with Keras & Spark](#elephas-distributed-deep-learning-with-keras-&-spark-)\n  - [Introduction](#introduction)\n  - [Getting started](#getting-started)\n    - [Installation](#installation)\n    - [Basic example](#basic-example)\n    - [Spark ML example](#spark-ml-example)\n  - [Usage of data-parallel models](#usage-of-data-parallel-models)\n    - [Model updates (optimizers)](#model-updates-optimizers)\n    - [Update frequency](#update-frequency)\n    - [Update mode](#update-mode)\n      - [Asynchronous updates with read and write locks (`mode='asynchronous'`)](#asynchronous-updates-with-read-and-write-locks-modeasynchronous)\n      - [Asynchronous updates without locks (`mode='hogwild'`)](#asynchronous-updates-without-locks-modehogwild)\n      - [Synchronous updates (`mode='synchronous'`)](#synchronous-updates-modesynchronous)\n    - [Degree of parallelization (number of workers)](#degree-of-parallelization-number-of-workers)\n  - [Distributed hyper-parameter optimization](#distributed-hyper-parameter-optimization)\n  - [Distributed training of ensemble models](#distributed-training-of-ensemble-models)\n  - [Discussion](#discussion)\n  - [Future work & contributions](#future-work-&-contributions)\n  - [Literature](#literature)\n\n## Introduction\nElephas brings deep learning with [Keras](http://keras.io) to [Spark](http://spark.apache.org). Elephas intends to keep the simplicity and high usability of Keras, thereby allowing for fast prototyping of distributed models, which can be run on massive data sets. For an introductory example, see the following [iPython notebook](https://github.com/maxpumperla/elephas/blob/master/examples/Spark_ML_Pipeline.ipynb).\n\nἐλέφας is Greek for _ivory_ and an accompanying project to κέρας, meaning _horn_. If this seems weird mentioning, like a bad dream, you should confirm it actually is at the [Keras documentation](https://github.com/fchollet/keras/blob/master/README.md). Elephas also means _elephant_, as in stuffed yellow elephant.\n\nElephas implements a class of data-parallel algorithms on top of Keras, using Spark's RDDs and data frames. Keras Models are initialized on the driver, then serialized and shipped to workers, alongside with data and broadcasted model parameters. Spark workers deserialize the model, train their chunk of data and send their gradients back to the driver. The \"master\" model on the driver is updated by an optimizer, which takes gradients either synchronously or asynchronously.\n\n## Getting started\n\n### Installation\nInstall elephas from PyPI with\n```\npip install elephas\n```\nDepending on what OS you are using, you may need to install some prerequisite modules (LAPACK, BLAS, fortran compiler) first.\n\nFor example, on Ubuntu Linux:\n```\nsudo apt-get install liblapack-dev libblas-dev gfortran\n```\n\nA quick way to install Spark locally is to use homebrew on Mac\n```\nbrew install spark\n```\nor linuxbrew on linux.\n```\nbrew install apache-spark\n```\nThe brew version of Spark may be outdated at times. To build from source, simply follow the instructions at the [Spark download section](http://spark.apache.org/downloads.html) or use the following commands.  \n```\nwget http://apache.mirrors.tds.net/spark/spark-1.5.2/spark-1.5.2-bin-hadoop2.6.tgz -P ~\nsudo tar zxvf ~/spark-* -C /usr/local\nsudo mv /usr/local/spark-* /usr/local/spark\n```\nAfter that, make sure to put these path variables to your shell profile (e.g. `~/.zshrc`):\n```\nexport SPARK_HOME=/usr/local/spark\nexport PATH=$PATH:$SPARK_HOME/bin\n```\n\n### Using Docker\n\nInstall and get Docker running by following the instructions here (https://www.docker.com/).\n\n#### Building \n\nThe build takes quite a while to run the first time since many packages need to be downloaded and installed. In the same directory as the ```Dockerfile``` run the following commands\n\n```\ndocker build . -t pyspark/elephas\n```\n\n#### Running\n\nThe following command starts a container with the Notebook server listening for HTTP connections on port 8899 (since local Jupyter notebooks use 8888) without authentication configured. \n\n```\ndocker run -d -p 8899:8888 pyspark/elephas\n```\n\n#### Settings\n\n- Memory \nIn the ```Dockerfile``` the following lines can be adjusted to configure memory settings.\n\n```\nENV SPARK_OPTS --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info\n```\n\n- Other\nOther settings / configurations can be examined here https://github.com/kmader/docker-stacks/tree/master/keras-spark-notebook\n\n### Basic example\nAfter installing both Elephas and Spark, training a model is done schematically as follows:\n\n- Create a local pyspark context\n```python\nfrom pyspark import SparkContext, SparkConf\nconf = SparkConf().setAppName('Elephas_App').setMaster('local[8]')\nsc = SparkContext(conf=conf)\n```\n\n- Define and compile a Keras model\n```python\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense, Dropout, Activation\nfrom keras.optimizers import SGD\nmodel = Sequential()\nmodel.add(Dense(128, input_dim=784))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(128))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(10))\nmodel.add(Activation('softmax'))\nmodel.compile(loss='categorical_crossentropy', optimizer=SGD())\n```\n\n- Create an RDD from numpy arrays\n```python\nfrom elephas.utils.rdd_utils import to_simple_rdd\nrdd = to_simple_rdd(sc, X_train, Y_train)\n```\n\n- A SparkModel is defined by passing Spark context and Keras model. Additionally, one has choose an optimizer used for updating the elephas model, an update frequency, a parallelization mode and the degree of parallelism, i.e. the number of workers.\n```python\nfrom elephas.spark_model import SparkModel\nfrom elephas import optimizers as elephas_optimizers\n\nadagrad = elephas_optimizers.Adagrad()\nspark_model = SparkModel(sc,model, optimizer=adagrad, frequency='epoch', mode='asynchronous', num_workers=2)\nspark_model.train(rdd, nb_epoch=20, batch_size=32, verbose=0, validation_split=0.1)\n```\n\n- Run your script using spark-submit\n```\nspark-submit --driver-memory 1G ./your_script.py\n```\nIncreasing the driver memory even further may be necessary, as the set of parameters in a network may be very large and collecting them on the driver eats up a lot of resources. See the examples folder for a few working examples.\n\n### Spark MLlib example\nFollowing up on the last example, to create an RDD of LabeledPoints for supervised training from pairs of numpy arrays, use\n```python\nfrom elephas.utils.rdd_utils import to_labeled_point\nlp_rdd = to_labeled_point(sc, X_train, Y_train, categorical=True)\n```\nTraining a given LabeledPoint-RDD is very similar to what we've seen already\n```python\nfrom elephas.spark_model import SparkMLlibModel\nadadelta = elephas_optimizers.Adadelta()\nspark_model = SparkMLlibModel(sc,model, optimizer=adadelta, frequency='batch', mode='hogwild', num_workers=2)\nspark_model.train(lp_rdd, nb_epoch=20, batch_size=32, verbose=0, validation_split=0.1, categorical=True, nb_classes=nb_classes)\n```\n\n### Spark ML example\nTo train a model with a SparkML estimator on a data frame, use the following syntax.\n```python\ndf = to_data_frame(sc, X_train, Y_train, categorical=True)\ntest_df = to_data_frame(sc, X_test, Y_test, categorical=True)\n\nadadelta = elephas_optimizers.Adadelta()\nestimator = ElephasEstimator(sc,model,\n        nb_epoch=nb_epoch, batch_size=batch_size, optimizer=adadelta, frequency='batch', mode='asynchronous', num_workers=2,\n        verbose=0, validation_split=0.1, categorical=True, nb_classes=nb_classes)\n\nfitted_model = estimator.fit(df)\n```\n\nFitting an estimator results in a SparkML transformer, which we can use for predictions and other evaluations by calling the transform method on it.\n\n``` python\nprediction = fitted_model.transform(test_df)\npnl = prediction.select(\"label\", \"prediction\")\npnl.show(100)\n\nprediction_and_label= pnl.map(lambda row: (row.label, row.prediction))\nmetrics = MulticlassMetrics(prediction_and_label)\nprint(metrics.precision())\nprint(metrics.recall())\n```\n\n## Usage of data-parallel models\n\nIn the first example above we have seen that an elephas model is instantiated like this\n\n```python\nspark_model = SparkModel(sc,model, optimizer=adagrad, frequency='epoch', mode='asynchronous', num_workers=2)\n```\nSo, apart from the canonical Spark context and Keras model, Elephas models have four parameters to tune and we will describe each of them next.\n\n### Model updates (optimizers)\n\n`optimizer`: The optimizers module in elephas is an adaption of the same module in keras, i.e. it provides the user with the following list of optimizers:\n\n- `SGD`\n- `RMSprop`\n- `Adagrad`\n- `Adadelta`\n- `Adam`\n\nOnce constructed, each of these can be passed to the *optimizer* parameter of the model. Updates in keras are computed with the help of theano, so most of the data structures in keras optimizers stem from theano. In elephas, gradients have already been computed by the respective workers, so it makes sense to entirely work with numpy arrays internally.\n\nNote that in order to set up an elephas model, you have to specify two optimizers, one for elephas and one for the underlying keras model. Individual workers produce updates according to keras optimizers and the \"master\" model on the driver uses elephas optimizers to aggregate them. For starters, we recommend keras models with SGD and elephas models with Adagrad or Adadelta.\n\n### Update frequency\n\n`frequency`: The user can decide how often updates are passed to the master model by controlling the *frequency* parameter. To update every batch, choose 'batch' and to update only after every epoch, choose 'epoch'.\n\n### Update mode\n\n`mode`: Currently, there's three different modes available in elephas, each corresponding to a different heuristic or parallelization scheme adopted, which is controlled by the *mode* parameter. The default property is 'asynchronous'.\n\n#### Asynchronous updates with read and write locks (`mode='asynchronous'`)\n\nThis mode implements the algorithm described as *downpour* in [1], i.e. each worker can send updates whenever they are ready. The master model makes sure that no update gets lost, i.e. multiple updates get applied at the \"same\" time,  by locking the master parameters while reading and writing parameters. This idea has been used in Google's DistBelief framework.\n\n#### Asynchronous updates without locks (`mode='hogwild'`)\nEssentially the same procedure as above, but without requiring the locks. This heuristic assumes that we still fare well enough, even if we loose an update here or there. Updating parameters lock-free in a non-distributed setting for SGD goes by the name 'Hogwild!' [2], it's distributed extension is called 'Dogwild!' [3].  \n\n#### Synchronous updates (`mode='synchronous'`)\n\nIn this mode each worker sends a new batch of parameter updates at the same time, which are then processed on the master. Accordingly, this algorithm is sometimes called *batch synchronous parallel* or just BSP.\n\n### Degree of parallelization (number of workers)\n\n`num_workers`: Lastly, the degree to which we parallelize our training data is controlled by the parameter *num_workers*.\n\n## Distributed hyper-parameter optimization\n\nHyper-parameter optimization with elephas is based on [hyperas](https://github.com/maxpumperla/hyperas), a convenience wrapper for hyperopt and keras. Make sure to have at least version ```0.1.2``` of hyperas installed. Each Spark worker executes a number of trials, the results get collected and the best model is returned. As the distributed mode in hyperopt (using MongoDB), is somewhat difficult to configure and error prone at the time of writing, we chose to implement parallelization ourselves. Right now, the only available optimization algorithm is random search.\n\nThe first part of this example is more or less directly taken from the hyperas documentation. We define data and model as functions, hyper-parameter ranges are defined through braces. See the hyperas documentation for more on how this works.\n\n```python\nfrom __future__ import print_function\nfrom hyperopt import Trials, STATUS_OK, tpe\nfrom hyperas.distributions import choice, uniform\n\ndef data():\n    '''\n    Data providing function:\n\n    Make sure to have every relevant import statement included here and return data as\n    used in model function below. This function is separated from model() so that hyperopt\n    won't reload data for each evaluation run.\n    '''\n    from keras.datasets import mnist\n    from keras.utils import np_utils\n    (X_train, y_train), (X_test, y_test) = mnist.load_data()\n    X_train = X_train.reshape(60000, 784)\n    X_test = X_test.reshape(10000, 784)\n    X_train = X_train.astype('float32')\n    X_test = X_test.astype('float32')\n    X_train /= 255\n    X_test /= 255\n    nb_classes = 10\n    Y_train = np_utils.to_categorical(y_train, nb_classes)\n    Y_test = np_utils.to_categorical(y_test, nb_classes)\n    return X_train, Y_train, X_test, Y_test\n\n\ndef model(X_train, Y_train, X_test, Y_test):\n    '''\n    Model providing function:\n\n    Create Keras model with double curly brackets dropped-in as needed.\n    Return value has to be a valid python dictionary with two customary keys:\n        - loss: Specify a numeric evaluation metric to be minimized\n        - status: Just use STATUS_OK and see hyperopt documentation if not feasible\n    The last one is optional, though recommended, namely:\n        - model: specify the model just created so that we can later use it again.\n    '''\n    from keras.models import Sequential\n    from keras.layers.core import Dense, Dropout, Activation\n    from keras.optimizers import RMSprop\n\n    model = Sequential()\n    model.add(Dense(512, input_shape=(784,)))\n    model.add(Activation('relu'))\n    model.add(Dropout({{uniform(0, 1)}}))\n    model.add(Dense({{choice([256, 512, 1024])}}))\n    model.add(Activation('relu'))\n    model.add(Dropout({{uniform(0, 1)}}))\n    model.add(Dense(10))\n    model.add(Activation('softmax'))\n\n    rms = RMSprop()\n    model.compile(loss='categorical_crossentropy', optimizer=rms)\n\n    model.fit(X_train, Y_train,\n              batch_size={{choice([64, 128])}},\n              nb_epoch=1,\n              show_accuracy=True,\n              verbose=2,\n              validation_data=(X_test, Y_test))\n    score, acc = model.evaluate(X_test, Y_test, show_accuracy=True, verbose=0)\n    print('Test accuracy:', acc)\n    return {'loss': -acc, 'status': STATUS_OK, 'model': model.to_yaml(), 'weights': pickle.dumps(model.get_weights())}\n```\n\nOnce the basic setup is defined, running the minimization is done in just a few lines of code:\n\n```python\nfrom hyperas import optim\nfrom elephas.hyperparam import HyperParamModel\nfrom pyspark import SparkContext, SparkConf\n\n# Create Spark context\nconf = SparkConf().setAppName('Elephas_Hyperparameter_Optimization').setMaster('local[8]')\nsc = SparkContext(conf=conf)\n\n# Define hyper-parameter model and run optimization\nhyperparam_model = HyperParamModel(sc)\nhyperparam_model.minimize(model=model, data=data, max_evals=5)\n```\n\n## Distributed training of ensemble models\n\nBuilding on the last section, it is possible to train ensemble models with elephas by means of running hyper-parameter optimization on large search spaces and defining a resulting voting classifier on the top-n performing models. With ```data``` and ```model```` defined as above, this is a simple as running\n\n```python\nresult = hyperparam_model.best_ensemble(nb_ensemble_models=10, model=model, data=data, max_evals=5)\n```\nIn this example an ensemble of 10 models is built, based on optimization of at most 5 runs on each of the Spark workers.\n\n## Discussion\n\nPremature parallelization may not be the root of all evil, but it may not always be the best idea to do so. Keep in mind that more workers mean less data per worker and parallelizing a model is not an excuse for actual learning. So, if you can perfectly well fit your data into memory *and* you're happy with training speed of the model consider just using keras.\n\nOne exception to this rule may be that you're already working within the Spark ecosystem and want to leverage what's there. The above SparkML example shows how to use evaluation modules from Spark and maybe you wish to further process the outcome of an elephas model down the road. In this case, we recommend to use elephas as a simple wrapper by setting num_workers=1.\n\nNote that right now elephas restricts itself to data-parallel algorithms for two reasons. First, Spark simply makes it very easy to distribute data. Second, neither Spark nor Theano make it particularly easy to split up the actual model in parts, thus making model-parallelism practically impossible to realize.\n\nHaving said all that, we hope you learn to appreciate elephas as a pretty easy to setup and use playground for data-parallel deep-learning algorithms.\n\n\n## Future work & contributions\n\nConstructive feedback and pull requests for elephas are very welcome. Here's a few things we're having in mind for future development\n\n- Benchmarks for training speed and accuracy.\n- Some real-world tests on EC2 instances with large data sets like imagenet.\n\n## Literature\n[1] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, QV. Le, MZ. Mao, M’A. Ranzato, A. Senior, P. Tucker, K. Yang, and AY. Ng. [Large Scale Distributed Deep Networks](http://research.google.com/archive/large_deep_networks_nips2012.html).\n\n[2] F. Niu, B. Recht, C. Re, S.J. Wright [HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent](http://arxiv.org/abs/1106.5730)\n\n[3] C. Noel, S. Osindero. [Dogwild! — Distributed Hogwild for CPU & GPU](http://stanford.edu/~rezab/nips2014workshop/submits/dogwild.pdf)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"246C:3BF56:174C12:5D67A4:6AB929BD"},"text_sha256":"1f89074037643c834dae182c53dd854a47f0b7222c495b10c7d49c3fb9c886fe"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2880","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:17FA7F2:1C1C064:6AB929BE"},"commit":{"sha":"48f6f469a0a898533946639c095a31c1db81c50b","url":"https://github.com/maxpumperla/elephas/commit/48f6f469a0a898533946639c095a31c1db81c50b","date":"2022-08-31T01:52:51Z","author_date":"2022-08-31T01:52:51Z","committer_date":"2022-08-31T01:52:51Z","tree_sha":"55fa5aef2c85ae96f9e3ef2da8e562347f2076a0","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2879","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:17DA45A:1BFB9BB:6AB929BE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14108,"blob_sha":"ab09c368404b6da586861dc789b814bce2d01910","priority":0}],"documents":[{"path":"README.md","size":14108,"blob_sha":"ab09c368404b6da586861dc789b814bce2d01910","priority":0,"status":200,"text":"<span style=\"color:red\">**UPDATE**: As of 3.2.0, maintenance of this project has moved over to https://github.com/danielenricocahall/elephas for consistency of ownership and CI. Please submit all Issues and Pull Requests there!<\/span>\n\n# Elephas: Distributed Deep Learning with Keras & Spark \n\n![Elephas](https://github.com/maxpumperla/elephas/blob/master/elephas-logo.png)\n\n## \n\n[![Build Status](https://travis-ci.com/maxpumperla/elephas.svg?branch=master)](https://travis-ci.com/maxpumperla/elephas)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/maxpumperla/elephas/blob/master/LICENSE)\n\nElephas is an extension of [Keras](http://keras.io), which allows you to run distributed deep learning models at \nscale with [Spark](http://spark.apache.org). Elephas currently supports a number of \napplications, including:\n\n- [Data-parallel training of deep learning models](#basic-spark-integration)\n- [Distributed training of ensemble models](#distributed-training-of-ensemble-models)\n- [~~Distributed hyper-parameter optimization~~](#distributed-hyper-parameter-optimization)  (removed as of 3.0.0)\n\n\n\nSchematically, elephas works as follows.\n\n![Elephas](https://github.com/maxpumperla/elephas/blob/master/elephas.gif)\n\nTable of content:\n* [Elephas: Distributed Deep Learning with Keras & Spark](#elephas-distributed-deep-learning-with-keras-&-spark-)\n  * [Introduction](#introduction)\n  * [Getting started](#getting-started)\n  * [Basic Spark integration](#basic-spark-integration)\n  * [Spark MLlib integration](#spark-mllib-integration)\n  * [Spark ML integration](#spark-ml-integration)\n  * [Distributed hyper-parameter optimization](#distributed-hyper-parameter-optimization)\n  * [Distributed training of ensemble models](#distributed-training-of-ensemble-models)\n  * [Discussion](#discussion)\n  * [Literature](#literature)\n\n\n\n## Introduction\nElephas brings deep learning with [Keras](http://keras.io) to [Spark](http://spark.apache.org). Elephas intends to \nkeep the simplicity and high usability of Keras, thereby allowing for fast prototyping of distributed models, which \ncan be run on massive data sets. For an introductory example, see the following \n[iPython notebook](https://github.com/maxpumperla/elephas/blob/master/examples/Spark_ML_Pipeline.ipynb).\n\nἐλέφας is Greek for _ivory_ and an accompanying project to κέρας, meaning _horn_. If this seems weird mentioning, like \na bad dream, you should confirm it actually is at the \n[Keras documentation](https://github.com/fchollet/keras/blob/master/README.md). \nElephas also means _elephant_, as in stuffed yellow elephant.\n\nElephas implements a class of data-parallel algorithms on top of Keras, using Spark's RDDs and data frames. \nKeras Models are initialized on the driver, then serialized and shipped to workers, alongside with data and broadcasted \nmodel parameters. Spark workers deserialize the model, train their chunk of data and send their gradients back to the \ndriver. The \"master\" model on the driver is updated by an optimizer, which takes gradients either synchronously or\nasynchronously.\n\n## Getting started\n\nJust install elephas from PyPI with, Spark will be installed through `pyspark` for you.\n\n```\npip install elephas\n```\n\nThat's it, you should now be able to run Elephas examples.\n\n## Basic Spark integration\n\nAfter installing both Elephas, you can train a model as follows. First, create a local pyspark context\n```python\nfrom pyspark import SparkContext, SparkConf\nconf = SparkConf().setAppName('Elephas_App').setMaster('local[8]')\nsc = SparkContext(conf=conf)\n```\n\nNext, you define and compile a Keras model\n```python\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout, Activation\nfrom tensorflow.keras.optimizers import SGD\nmodel = Sequential()\nmodel.add(Dense(128, input_dim=784))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(128))\nmodel.add(Activation('relu'))\nmodel.add(Dropout(0.2))\nmodel.add(Dense(10))\nmodel.add(Activation('softmax'))\nmodel.compile(loss='categorical_crossentropy', optimizer=SGD())\n```\n\nand create an RDD from numpy arrays (or however you want to create an RDD)\n```python\nfrom elephas.utils.rdd_utils import to_simple_rdd\nrdd = to_simple_rdd(sc, x_train, y_train)\n```\n\nThe basic model in Elephas is the `SparkModel`. You initialize a `SparkModel` by passing in a compiled Keras model, \nan update frequency and a parallelization mode. After that you can simply `fit` the model on your RDD. Elephas `fit`\nhas the same options as a Keras model, so you can pass `epochs`, `batch_size` etc. as you're used to from tensorflow.keras.\n\n```python\nfrom elephas.spark_model import SparkModel\n\nspark_model = SparkModel(model, frequency='epoch', mode='asynchronous')\nspark_model.fit(rdd, epochs=20, batch_size=32, verbose=0, validation_split=0.1)\n```\n\nYour script can now be run using spark-submit\n```bash\nspark-submit --driver-memory 1G ./your_script.py\n```\n\nIncreasing the driver memory even further may be necessary, as the set of parameters in a network may be very large \nand collecting them on the driver eats up a lot of resources. See the examples folder for a few working examples.\n\n## Distributed Inference / Evaluation\n\nThe `SparkModel` can also be used for distributed inference (prediction) and evaluation. Similar to the `fit` method,  the `predict` and `evaluate` methods\nconform to the Keras Model API. \n\n```python\nfrom elephas.spark_model import SparkModel\n\n# create/train the model, similar to the previous section (Basic Spark Integration)\nmodel = ...\nspark_model = SparkModel(model, ...)\nspark_model.fit(...)\n\nx_test, y_test = ... # load test data\n\npredictions = spark_model.predict(x_test) # perform inference\nevaluation = spark_model.evaluate(x_test, y_test) # perform evaluation/scoring\n```\nThe paradigm is identical to the data parallelism in training, as the model is serialized and shipped to the workers and used to evaluate a chunk of the testing data. The predict method will take either a numpy array or an RDD.\n\n## Spark MLlib integration\n\nFollowing up on the last example, to use Spark's MLlib library with Elephas, you create an RDD of LabeledPoints for \nsupervised training as follows\n\n```python\nfrom elephas.utils.rdd_utils import to_labeled_point\nlp_rdd = to_labeled_point(sc, x_train, y_train, categorical=True)\n```\n\nTraining a given LabeledPoint-RDD is very similar to what we've seen already\n\n```python\nfrom elephas.spark_model import SparkMLlibModel\nspark_model = SparkMLlibModel(model, frequency='batch', mode='hogwild')\nspark_model.train(lp_rdd, epochs=20, batch_size=32, verbose=0, validation_split=0.1, \n                  categorical=True, nb_classes=nb_classes)\n```\n\n\n## Spark ML integration\n\nTo train a model with a SparkML estimator on a data frame, use the following syntax.\n```python\ndf = to_data_frame(sc, x_train, y_train, categorical=True)\ntest_df = to_data_frame(sc, x_test, y_test, categorical=True)\n\nestimator = ElephasEstimator(model, epochs=epochs, batch_size=batch_size, frequency='batch', mode='asynchronous',\n                             categorical=True, nb_classes=nb_classes)\nfitted_model = estimator.fit(df)\n```\n\nFitting an estimator results in a SparkML transformer, which we can use for predictions and other evaluations by \ncalling the transform method on it.\n\n```python\nprediction = fitted_model.transform(test_df)\npnl = prediction.select(\"label\", \"prediction\")\npnl.show(100)\n\nprediction_and_label= pnl.rdd.map(lambda row: (row.label, row.prediction))\nmetrics = MulticlassMetrics(prediction_and_label)\nprint(metrics.precision())\nprint(metrics.recall())\n```\n\nIf the model utilizes custom activation function, layer, or loss function, that will need to be supplied using the `set_custom_objects` method:\n\n```python\ndef custom_activation(x):\n    ...\nclass CustomLayer(Layer):\n    ...\nmodel = Sequential()\nmodel.add(CustomLayer(...))\n\nestimator = ElephasEstimator(model, epochs=epochs, batch_size=batch_size)\nestimator.set_custom_objects({'custom_activation': custom_activation, 'CustomLayer': CustomLayer})\n```\n\n## Distributed hyper-parameter optimization\n\n<span style=\"color:red\">**UPDATE**: As of 3.0.0, Hyper-parameter optimization features have been removed, since Hyperas is no longer active and was causing versioning compatibility issues. To use these features, install version 2.1 or below.<\/span>\n\nHyper-parameter optimization with elephas is based on [hyperas](https://github.com/maxpumperla/hyperas), a convenience \nwrapper for hyperopt and keras. Each Spark worker executes a number of trials, the results get collected and the best \nmodel is returned. As the distributed mode in hyperopt (using MongoDB), is somewhat difficult to configure and error \nprone at the time of writing, we chose to implement parallelization ourselves. Right now, the only available \noptimization algorithm is random search.\n\nThe first part of this example is more or less directly taken from the hyperas documentation. We define data and model \nas functions, hyper-parameter ranges are defined through braces. See the hyperas documentation for more on how \nthis works.\n\n```python\nfrom hyperopt import STATUS_OK\nfrom hyperas.distributions import choice, uniform\n\ndef data():\n    from tensorflow.keras.datasets import mnist\n    from tensorflow.keras.utils import to_categorical\n    (x_train, y_train), (x_test, y_test) = mnist.load_data()\n    x_train = x_train.reshape(60000, 784)\n    x_test = x_test.reshape(10000, 784)\n    x_train = x_train.astype('float32')\n    x_test = x_test.astype('float32')\n    x_train /= 255\n    x_test /= 255\n    nb_classes = 10\n    y_train = to_categorical(y_train, nb_classes)\n    y_test = to_categorical(y_test, nb_classes)\n    return x_train, y_train, x_test, y_test\n\n\ndef model(x_train, y_train, x_test, y_test):\n    from tensorflow.keras.models import Sequential\n    from tensorflow.keras.layers import Dense, Dropout, Activation\n    from tensorflow.keras.optimizers import RMSprop\n\n    model = Sequential()\n    model.add(Dense(512, input_shape=(784,)))\n    model.add(Activation('relu'))\n    model.add(Dropout({{uniform(0, 1)}}))\n    model.add(Dense({{choice([256, 512, 1024])}}))\n    model.add(Activation('relu'))\n    model.add(Dropout({{uniform(0, 1)}}))\n    model.add(Dense(10))\n    model.add(Activation('softmax'))\n\n    rms = RMSprop()\n    model.compile(loss='categorical_crossentropy', optimizer=rms)\n\n    model.fit(x_train, y_train,\n              batch_size={{choice([64, 128])}},\n              nb_epoch=1,\n              show_accuracy=True,\n              verbose=2,\n              validation_data=(x_test, y_test))\n    score, acc = model.evaluate(x_test, y_test, show_accuracy=True, verbose=0)\n    print('Test accuracy:', acc)\n    return {'loss': -acc, 'status': STATUS_OK, 'model': model.to_json()}\n```\n\nOnce the basic setup is defined, running the minimization is done in just a few lines of code:\n\n```python\nfrom elephas.hyperparam import HyperParamModel\nfrom pyspark import SparkContext, SparkConf\n\n# Create Spark context\nconf = SparkConf().setAppName('Elephas_Hyperparameter_Optimization').setMaster('local[8]')\nsc = SparkContext(conf=conf)\n\n# Define hyper-parameter model and run optimization\nhyperparam_model = HyperParamModel(sc)\nhyperparam_model.minimize(model=model, data=data, max_evals=5)\n```\n\n## Distributed training of ensemble models\n\nBuilding on the last section, it is possible to train ensemble models with elephas by means of running hyper-parameter \noptimization on large search spaces and defining a resulting voting classifier on the top-n performing models. \nWith ```data``` and ```model``` defined as above, this is a simple as running\n\n```python\nresult = hyperparam_model.best_ensemble(nb_ensemble_models=10, model=model, data=data, max_evals=5)\n```\nIn this example an ensemble of 10 models is built, based on optimization of at most 5 runs on each of the Spark workers.\n\n## Discussion\n\nPremature parallelization may not be the root of all evil, but it may not always be the best idea to do so. Keep in \nmind that more workers mean less data per worker and parallelizing a model is not an excuse for actual learning. \nSo, if you can perfectly well fit your data into memory *and* you're happy with training speed of the model consider \njust using keras.\n\nOne exception to this rule may be that you're already working within the Spark ecosystem and want to leverage what's \nthere. The above SparkML example shows how to use evaluation modules from Spark and maybe you wish to further process \nthe outcome of an elephas model down the road. In this case, we recommend to use elephas as a simple wrapper by setting \nnum_workers=1.\n\nNote that right now elephas restricts itself to data-parallel algorithms for two reasons. First, Spark simply makes it \nvery easy to distribute data. Second, neither Spark nor Theano make it particularly easy to split up the actual model \nin parts, thus making model-parallelism practically impossible to realize.\n\nHaving said all that, we hope you learn to appreciate elephas as a pretty easy to setup and use playground for \ndata-parallel deep-learning algorithms.\n\n\n## Literature\n[1] J. Dean, G.S. Corrado, R. Monga, K. Chen, M. Devin, QV. Le, MZ. Mao, M’A. Ranzato, A. Senior, P. Tucker, K. Yang, and AY. Ng. [Large Scale Distributed Deep Networks](http://research.google.com/archive/large_deep_networks_nips2012.html).\n\n[2] F. Niu, B. Recht, C. Re, S.J. Wright [HOGWILD!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent](http://arxiv.org/abs/1106.5730)\n\n[3] C. Noel, S. Osindero. [Dogwild! — Distributed Hogwild for CPU & GPU](http://stanford.edu/~rezab/nips2014workshop/submits/dogwild.pdf)\n\n## Maintainers / Contributions\n\nThis great project was started by Max Pumperla, and is currently maintained by Daniel Cahall (https://github.com/danielenricocahall). If you have any questions, please feel free to open up an issue or send an email to danielenricocahall@gmail.com. If you want to contribute, feel free to submit a PR, or start a conversation about how we can go about implementing something.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"51D6:324E19:17FC93:5E1821:6AB929B0"},"text_sha256":"979bde0cccff62850cb6b19cc21d410d41ea3931309245b4400120b3d4719a83"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"geomstats/geomstats","input_row":{"repository":"geomstats/geomstats","url":"https://github.com/geomstats/geomstats","name":"geomstats","owner":"geomstats","description":"Computations and statistics on manifolds with geometric structures.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1520,"issues":547,"created_at":"2017-10-25T00:44:57Z","updated_at":"2026-09-18T16:06:42Z","first_commit_at":"2017-10-25T00:47:10Z","last_commit_at":"2026-08-21T18:26:15Z","activity_months":105.87,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:43.735Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"geomstats/geomstats","visibility":"public","created_at":"2017-10-25T00:44:57Z","updated_at":"2026-09-18T16:06:42Z","private":false,"fork":false,"archived":false,"stargazers_count":1520,"open_issues_count":228,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2878","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088B:14A1F2:1801386:1C229CE:6AB929BF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2877","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088C:6E5BD:178C809:1BAC8B2:6AB929C0"},"commit":{"sha":"e0b53777cc27cf446d55eeac1533f4c3bc0ae681","url":"https://github.com/geomstats/geomstats/commit/e0b53777cc27cf446d55eeac1533f4c3bc0ae681","date":"2018-05-22T22:34:15Z","author_date":"2018-05-22T22:34:15Z","committer_date":"2018-05-22T22:34:15Z","tree_sha":"99ce94063c4ac3e8d92e9c25b5be99cd0ac844ac","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2876","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088E:380E1C:17C3439:1BE3B05:6AB929C0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1174,"blob_sha":"81a56c946ecbf43310b677aada93689084ceede4","priority":0}],"documents":[{"path":"README.md","size":1174,"blob_sha":"81a56c946ecbf43310b677aada93689084ceede4","priority":0,"status":200,"text":"# Geomstats\n[![Build Status](https://travis-ci.org/geomstats/geomstats.svg?branch=master)](https://travis-ci.org/geomstats/geomstats)[![Coverage Status](https://codecov.io/gh/geomstats/geomstats/branch/master/graph/badge.svg)](https://codecov.io/gh/geomstats/geomstats)[![Pypi version](https://img.shields.io/pypi/v/geomstats.svg)](https://pypi.python.org/pypi/geomstats/)\n\nComputations and statistics on manifolds with geometric structures.\n\n<img src=\"https://raw.githubusercontent.com/ninamiolane/geomstats/master/examples/imgs/gradient_descent.gif\" width=384 height=384><img src=\"https://raw.githubusercontent.com/ninamiolane/geomstats/master/examples/imgs/h2_grid.png\" width=256 height=256>\n\n\n## Installation\n\nOS X & Linux:\n\n```\npip3 install geomstats\n```\n\n## Running tests\n\n```\npip3 install nose2\nnose2\n```\n\n## Contributing\n\n1. Fork it (<https://github.com/yourname/yourproject/fork>)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n## Authors & Contributors\n\n* Nina Miolane\n* Xavier Pennec\n* Johan Mathe\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5992:17E138:178F60:5DAAF6:6AB929C0"},"text_sha256":"34feceb51c8149cf252632159b87ca7c9b402e354334d72dc40bfedf7932dfa7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2875","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0890:74E6D:17F5DA4:1C176E2:6AB929C1"},"commit":{"sha":"ef5883f8174a6a173972d1ef873e8c19519d0b3b","url":"https://github.com/geomstats/geomstats/commit/ef5883f8174a6a173972d1ef873e8c19519d0b3b","date":"2026-06-30T17:48:15Z","author_date":"2026-06-30T17:48:15Z","committer_date":"2026-06-30T17:48:15Z","tree_sha":"e3ab22bff353e7624a63811e4c08018f9c04884f","message_first_line":"Merge pull request #2117 from luisfpereira/transpose"},"tree_request_status":200,"tree_rate":{"github_remaining":"2874","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090D:6E5BD:178C91F:1BACA0D:6AB929C1"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":15507,"blob_sha":"86460985929573361b795dd94f4a7a787cdc333c","priority":0}],"documents":[{"path":"README.rst","size":15507,"blob_sha":"86460985929573361b795dd94f4a7a787cdc333c","priority":0,"status":200,"text":".. image:: logo.png\n  :width: 730\n  :alt: Geomstats logo\n\n**Geomstats** is a Python package for computations, statistics, machine learning and deep learning on manifolds. \n\nThe package is organized into two main modules: *geometry* and *learning*. \nThe module *geometry* implements differential geometry: manifolds, Lie groups, fiber bundles, shape spaces, information manifolds, Riemannian metrics, and more. \nThe module *learning* implements statistics and learning algorithms for data on manifolds. Users can choose between backends: NumPy, Autograd or PyTorch.\n\n.. list-table::\n   :header-rows: 0\n\n   * - **Code**\n     - |PyPI version|\\ |Downloads|\\  |Zenodo|\\\n   * - **Continuous Integration**\n     - |Build Status|\\ |python|\\\n   * - **Code coverage (np, autograd, torch)**\n     - |Coverage Status np|\\ |Coverage Status autograd|\\ |Coverage Status torch|\n   * - **Documentation**\n     - |doc|\\  |binder|\\ |tutorial|\\\n   * - **Community**\n     - |contributions|\\  |Slack|\\  |Twitter|\\\n\nKeep in touch with the community by joining us on our `slack workspace <https://join.slack.com/t/geomstats/shared_invite/zt-15t8k0q7r-Duxt6j6aA3rDOIms2Vd~RQ>`__!\n\n**NEWS**:\n\n- 2025: Discover our `shape module`, and its paper `Learning from landmarks, curves, surfaces, and shapes in Geomstats\n <https://arxiv.org/abs/2406.10437>`_ by Luis Pereira, Alice Le Brigant, Adele Myers, Emmanuel Hartman, Amil Khan, Malik Tuerkoen, Trey Dold, Mengyang Gu, Pablo Suárez-Serrato, and Nina Miolane, published in the ACM Transactions of Mathematical Software.\n\n- 2023: Discover our `information_geometry module <https://github.com/geomstats/geomstats/tree/main/geomstats/information_geometry>`_ , and its paper `Parametric information geometry with the package Geomstats <https://dl.acm.org/doi/abs/10.1145/3627538>`_ by Alice Le Brigant, Jules Deschamps, Antoine Collas, and Nina Miolane, published in the ACM Transactions of Mathematical Software.\n\n- 2023: Discover our foundational paper `Introduction to Riemannian Geometry and Geometric Statistics: From Basic Theory to Implementation with Geomstats <https://www.nowpublishers.com/article/Details/MAL-098>`_ by Nicolas Guigui, Nina Miolane and Xavier Pennec, published in Foundations and Trends in Machine Learning.\n\n- 2021-2022: The white papers summarizing the findings from our ICLR 2021 and 2022 challenges of computational differential geometry and topology are available `here (2021) <https://arxiv.org/abs/2108.09810>`__ and `here (2022) <https://arxiv.org/abs/2206.09048>`_.\n\n-  To get an overview of ``geomstats``, see our `introductory\n   video <https://www.youtube.com/watch?v=Ju-Wsd84uG0&list=PLYx7XA2nY5GejOB1lsvriFeMytD1-VS1B&index=3>`__.\n- To understand how ``geomstats`` is built, check out `these slides <https://drive.google.com/file/d/1YxeGeLXrJdVQLBJQ-SYPirQ7V_UisqUw/view?usp=sharing>`__.\n-  To get started with ``geomstats``, see the\n   `examples <https://github.com/geomstats/geomstats/tree/main/examples>`__\n   and\n   `notebooks <https://github.com/geomstats/geomstats/tree/main/notebooks>`__\n   directories.\n-  The documentation of ``geomstats`` can be found on the `documentation\n   website <https://geomstats.github.io/>`__.\n- Interested in information geometry? Go to our `information_geometry <https://github.com/geomstats/geomstats/tree/main/geomstats/information_geometry>`_ module.\n-  To follow the scientific literature on geometric statistics, follow\n   our twitter-bot `@geomstats <https://twitter.com/geomstats>`__!\n\n\nCiting Geomstats\n================\n\nIf you find ``geomstats`` useful, please kindly cite:\n\n- `Geomstats: A Python Package for Riemannian Geometry in Machine Learning (JMLR 2020) <http://jmlr.org/papers/v21/19-027.html>`__\n\n- `Introduction to Riemannian Geometry and Geometric Statistics: from Basic Theory to Implementation with Geomstats (FnT ML 2023) <https://www.nowpublishers.com/article/Details/MAL-098>`__\n\n- `Parametric information geometry with the package Geomstats (ACM TOMS 2023) <https://arxiv.org/abs/2211.11643>`__\n\n- `Learning from landmarks, curves, surfaces, and shapes in Geomstats (ACM TOMS 2025) <https://arxiv.org/abs/2406.10437>`__\n\n\n::\n\n    @article{JMLR:v21:19-027,\n      author  = {Nina Miolane and Nicolas Guigui and Alice Le Brigant and Johan Mathe and Benjamin Hou and Yann Thanwerdas and Stefan Heyder and Olivier Peltre and Niklas Koep and Hadi Zaatiti and Hatem Hajri and Yann Cabanes and Thomas Gerald and Paul Chauchat and Christian Shewmake and Daniel Brooks and Bernhard Kainz and Claire Donnat and Susan Holmes and Xavier Pennec},\n      title   = {Geomstats:  A Python Package for Riemannian Geometry in Machine Learning},\n      journal = {Journal of Machine Learning Research},\n      year    = {2020},\n      volume  = {21},\n      number  = {223},\n      pages   = {1-9},\n      url     = {http://jmlr.org/papers/v21/19-027.html}\n    }\n\n    @article{miolane2020introduction,\n      title     = {Introduction to geometric learning in python with geomstats},\n      author    = {Miolane, Nina and Guigui, Nicolas and Zaatiti, Hadi and Shewmake, Christian and Hajri, Hatem and Brooks, Daniel and Le Brigant, Alice and Mathe, Johan and Hou, Benjamin and Thanwerdas, Yann and others},\n      journal   = {SciPy 2020-19th Python in Science Conference},\n      pages     = {48--57},\n      year      = {2020},\n      url       = {https://proceedings.scipy.org/articles/Majora-342d178e-007.pdf}\n    }\n\n    @article{guigui2023introduction,\n      author  = {Guigui, Nicolas and Miolane, Nina and Pennec, Xavier and others},\n      title   = {Introduction to riemannian geometry and geometric statistics: from basic theory to implementation with geomstats},\n      journal = {Foundations and Trends{\\textregistered} in Machine Learning},\n      volume  = {16},\n      number  = {3},\n      pages   = {329--493},\n      year    = {2023},\n      publisher = {Now Publishers, Inc.}\n      url     = {https://www.nowpublishers.com/article/Details/MAL-098}\n   }\n\n    @article{le2023parametric,\n      author  = {Le Brigant, Alice and Deschamps, Jules and Collas, Antoine and Miolane, Nina},\n      title   = {Parametric information geometry with the package Geomstats},\n      journal = {ACM Transactions on Mathematical Software},\n      volume  = {49},\n      number  = {4},\n      pages   = {1--26},\n      year    = {2023},\n      publisher = {ACM New York, NY}\n      \n  }\n\n    @article{pereira2025learning,\n      title   = {Learning from landmarks, curves, surfaces, and shapes in Geomstats},\n      author  = {Pereira, Lu{\\'\\i}s F and Brigant, Alice Le and Myers, Adele and Hartman, Emmanuel and Khan, Amil and Tuerkoen, Malik and Dold, Trey and Gu, Mengyang and Su{\\'a}rez-Serrato, Pablo and Miolane, Nina},\n      journal = {ACM Transactions on Mathematical Software},\n      year    = {2025},\n      publisher = {ACM New York, NY}\n\n- and `Geomstats software version <https://doi.org/10.5281/zenodo.4624475>`__ (citation automatically generated by Zenodo at the bottom right of this link).\n\nWe would sincerely appreciate citations to both the original research paper and the software version, to acknowledge authors who started the codebase and made the library possible, together with the crucial work of all contributors who are continuously implementing pivotal new geometries and important learning algorithms, as well as refactoring, testing and documenting the code to democratize geometric statistics and (deep) learning and foster reproducible research in this field.\n\nInstall geomstats via pip3\n--------------------------\n\nFrom a terminal (OS X & Linux), you can install geomstats and its\nrequirements with ``pip3`` as follows:\n\n::\n\n    pip3 install geomstats\n\nThis method installs the latest version of geomstats that is uploaded on\nPyPi. Note that geomstats is only available with Python3.\n\nInstall geomstats via conda\n---------------------------\n\nFrom a terminal (OS X & Linux) or an Anaconda prompt (Windows), you can install geomstats and its\nrequirements with ``conda`` as follows:\n\n::\n\n    conda install -c conda-forge geomstats\n\nThis method installs the latest version of geomstats that is uploaded on\nconda-forge. Note that geomstats is only available with Python3.\n\nInstall geomstats via Git\n-------------------------\n\nFrom a terminal (OS X & Linux), you can install geomstats and its\nrequirements via ``git`` as follows:\n\n::\n\n    git clone https://github.com/geomstats/geomstats.git\n    cd geomstats\n    pip3 install .\n\nThis method installs the latest GitHub version of geomstats.\n\n\nNote that this only installs the minimum requirements. To add the optional,\ndevelopment, continuous integration and documentation requirements,\nrefer to the file ``pyproject.toml``.\n\nInstall geomstats : Developers\n------------------------------\n\nDevelopers should git clone the main branch of this repository, together with the development requirements\nand the optional requirements to enable ``autograd`` and ``pytorch`` backends:\n\n::\n\n    pip3 install geomstats[dev,opt]\n\nAdditionally, we recommend installing our pre-commit hook, to ensure that your code\nfollows our Python style guidelines:\n\n::\n\n    pre-commit install\n\n\nChoose the backend\n------------------\n\nGeomstats can run seamlessly with ``numpy``, ``autograd`` or\n``pytorch``. Note that ``autograd`` and ``pytorch`` and requirements are\noptional, as geomstats can be used with ``numpy`` only. By default, the\n``numpy`` backend is used. The visualizations are only available with\nthis backend.\n\nTo get the ``autograd`` and ``pytorch`` versions compatible with\ngeomstats, install the optional requirements:\n\n::\n\n    pip3 install geomstats[opt]\n\nTo install only the requirements for a given backend do:\n\n::\n\n    pip3 install geomstats[<backend_name>]\n\nYou can choose your backend by setting the environment variable\n``GEOMSTATS_BACKEND`` to ``numpy``, ``autograd`` or ``pytorch``, and\nimporting the ``backend`` module. From the command line:\n\n::\n\n    export GEOMSTATS_BACKEND=<backend_name>\n\nand in the Python3 code:\n\n::\n\n    import geomstats.backend as gs\n\nGetting started\n---------------\n\nTo use ``geomstats`` for learning algorithms on Riemannian manifolds,\nyou need to follow three steps:\n\n* instantiate the manifold of interest,\n* instantiate the learning algorithm of interest,\n* run the algorithm.\n\nThe data should be represented by a ``gs.array``. This structure\nrepresents numpy arrays, autograd or pytorch tensors, depending on the\nchoice of backend.\n\nThe following code snippet shows the use of tangent Principal Component\nAnalysis on simulated ``data`` on the space of 3D rotations.\n\n.. code:: python\n\n    from geomstats.geometry.special_orthogonal import SpecialOrthogonal\n    from geomstats.learning.pca import TangentPCA\n\n    so3 = SpecialOrthogonal(n=3, point_type=\"vector\")\n\n    data = so3.random_uniform(n_samples=10)\n\n    tpca = TangentPCA(space=so3, n_components=2)\n    tpca = tpca.fit(data)\n    tangent_projected_data = tpca.transform(data)\n\nAll geometric computations are performed behind the scenes. The user\nonly needs a high-level understanding of Riemannian geometry. Each\nalgorithm can be used with any of the manifolds and metric implemented\nin the package.\n\nTo see additional examples, go to the\n`examples <https://github.com/geomstats/geomstats/tree/main/examples>`__\nor\n`notebooks <https://github.com/geomstats/geomstats/tree/main/notebooks>`__\ndirectories.\n\nContributing\n------------\n\nSee our\n`contributing <https://github.com/geomstats/geomstats/blob/main/docs/contributing/index.rst>`__\nguidelines!\n\nInterested? Contact us and join the next hackathons. Previous Geomstats events include:\n\n-  January 2020: hackathon at Inria Sophia-Antipolis, Nice, France\n-  April 2020: remote online hackathon\n-  March - April 2021: hackathon, hybrid at Inria Sophia-Antipolis / remotely with contributors from around the world\n-  July 2021: hackathon at the Geometric Science of Information (GSI) conference, Paris, France\n-  August 2021: international Coding Challenge at the International Conference on Learning Representations (ICLR), remotely\n-  December 2021: fixit hackathon at the Sorbonne Center for Artificial Intelligence, Paris, France.\n-  February 2022: hackathon, hybrid at Inria Sophia-Antipolis / remotely with contributors from around the world\n-  April 2022: in-person hackathon at the Villa Cynthia, Saint Raphael, France.\n-  April 2022: international Coding Challenge at the International Conference on Learning Representations (ICLR), remotely.\n-  June 2022: hackathon at the University of Washington (UW).\n-  October 17-21, 2022: hackathon during the trimester `Geometry and Statistics in Data Sciences <https://indico.math.cnrs.fr/category/498/>`__, in Paris.\n\n\nAcknowledgements\n----------------\n\nThis work is supported by:\n\n-  the National Science Foundation (grant 2313150).\n-  the National Science Foundation (NSF CAREER award, grant 2240158).\n-  the Inria-Stanford associated team `GeomStats <http://www-sop.inria.fr/asclepios/projects/GeomStats/>`__,\n-  the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement `G-Statistics <https://team.inria.fr/epione/en/research/erc-g-statistics/>`__ No. 786854),\n-  the French society for applied and industrial mathematics (`SMAI <http://smai.emath.fr/>`__),\n-  the National Science Foundation (grant NSF DMS RTG 1501767).\n\n.. |Twitter| image:: https://img.shields.io/twitter/follow/geomstats?label=Follow%20%40geomstats%20%20%20%20&style=social\n   :target: https://twitter.com/geomstats\n.. |PyPI version| image:: https://badge.fury.io/py/geomstats.svg\n   :target: https://badge.fury.io/py/geomstats\n.. |Build Status| image:: https://github.com/geomstats/geomstats/actions/workflows/test.yml/badge.svg\n   :target: https://github.com/geomstats/geomstats/actions/workflows/test.yml\n.. |Slack| image:: https://img.shields.io/badge/Slack-Join-yellow\n   :target: https://join.slack.com/t/geomstats/shared_invite/zt-15t8k0q7r-Duxt6j6aA3rDOIms2Vd~RQ\n.. |Coverage Status np| image:: https://codecov.io/gh/geomstats/geomstats/branch/main/graph/badge.svg?flag=numpy\n   :target: https://codecov.io/gh/geomstats/geomstats\n.. |Coverage Status autograd| image:: https://codecov.io/gh/geomstats/geomstats/branch/main/graph/badge.svg?flag=autograd\n   :target: https://codecov.io/gh/geomstats/geomstats\n.. |Coverage Status torch| image:: https://codecov.io/gh/geomstats/geomstats/branch/main/graph/badge.svg?flag=pytorch\n   :target: https://codecov.io/gh/geomstats/geomstats\n.. |Zenodo| image:: https://zenodo.org/badge/108200238.svg\n   :target: https://zenodo.org/badge/latestdoi/108200238\n.. |Downloads| image:: https://static.pepy.tech/personalized-badge/geomstats?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads\n   :target: https://pepy.tech/project/geomstats\n.. |python| image:: https://img.shields.io/badge/python-3.11+-blue?logo=python\n   :target: https://www.python.org/\n.. |tutorial| image:: https://img.shields.io/youtube/views/Ju-Wsd84uG0?label=watch&style=social\n   :target: https://www.youtube.com/watch?v=Ju-Wsd84uG0\n.. |doc| image:: https://img.shields.io/badge/docs-website-brightgreen?style=flat\n   :target: https://geomstats.github.io/?badge=latest\n.. |binder| image:: https://mybinder.org/badge_logo.svg\n   :target: https://mybinder.org/v2/gh/geomstats/geomstats/main?filepath=notebooks\n.. |contributions| image:: https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\n   :target: https://geomstats.github.io/contributing.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"76D2:3A3DD:177F60:5D9B5F:6AB929C1"},"text_sha256":"f1384e628f5600dc417dcec0d18b589b34a3fc879c35b34cdf9746e316a301de"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"yu4u/age-gender-estimation","input_row":{"repository":"yu4u/age-gender-estimation","url":"https://github.com/yu4u/age-gender-estimation","name":"age-gender-estimation","owner":"yu4u","description":"Keras implementation of a CNN network for age and gender estimation","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1520,"issues":129,"created_at":"2017-04-09T16:53:46Z","updated_at":"2026-08-10T15:40:44Z","first_commit_at":"2017-04-09T16:53:46Z","last_commit_at":"2020-08-21T13:00:32Z","activity_months":40.399999999999999,"ai_ml_match_topics":"deep-learning; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:46.759Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"yu4u/age-gender-estimation","visibility":"public","created_at":"2017-04-09T16:53:46Z","updated_at":"2026-08-10T15:40:44Z","private":false,"fork":false,"archived":false,"stargazers_count":1520,"open_issues_count":84,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2873","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17C3E96:1BE54EB:6AB929C2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2872","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:1784344:1BA436C:6AB929C3"},"commit":{"sha":"f9243adbd8d9238f24d92e5fd61153e367ba535e","url":"https://github.com/yu4u/age-gender-estimation/commit/f9243adbd8d9238f24d92e5fd61153e367ba535e","date":"2018-04-27T17:36:33Z","author_date":"2018-04-27T17:36:33Z","committer_date":"2018-04-27T17:36:33Z","tree_sha":"2d4ad0b311c678aa559d5ed20e7a6984d4d5e592","message_first_line":"show model summary"},"tree_request_status":200,"tree_rate":{"github_remaining":"2871","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0893:71E0C:17E1F6C:1C021C5:6AB929C3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8133,"blob_sha":"d738a801f95dfa3c20cd7406239d3e4a3b2b0b59","priority":0}],"documents":[{"path":"README.md","size":8133,"blob_sha":"d738a801f95dfa3c20cd7406239d3e4a3b2b0b59","priority":0,"status":200,"text":"# Age and Gender Estimation\nThis is a Keras implementation of a CNN for estimating age and gender from a face image [1, 2].\nIn training, [the IMDB-WIKI dataset](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) is used.\n\n- [Apr. 10, 2018] Evaluation result on the APPA-REAL dataset was added.\n\n## Dependencies\n- Python3.5+\n- Keras2.0+\n- scipy, numpy, Pandas, tqdm, tables, h5py\n- dlib (for demo)\n- OpenCV3\n\nTested on:\n- Ubuntu 16.04, Python 3.5.2, Keras 2.0.3, Tensorflow(-gpu) 1.0.1, Theano 0.9.0, CUDA 8.0, cuDNN 5.0\n  - CPU: i7-7700 3.60GHz, GPU: GeForce GTX1080\n- macOS Sierra, Python 3.6.0, Keras 2.0.2, Tensorflow 1.0.0, Theano 0.9.0\n\n\n## Usage\n\n### Use pretrained model for demo\nRun demo the script (requires web cam)\n\n```sh\npython3 demo.py\n```\n\nThe pretrained model for TensorFlow backend will be automatically downloaded to the `pretrained_models` directory.\n\n### Train a model using the IMDB-WIKI dataset\n\n#### Download the dataset\nThe dataset is downloaded and extracted to the `data` directory.\n\n```sh\n./download.sh\n```\n\n#### Create training data\nFilter out noise data and serialize images and labels for training into `.mat` file.\nPlease check [check_dataset.ipynb](check_dataset.ipynb) for the details of the dataset.\n```sh\npython3 create_db.py --output data/imdb_db.mat --db imdb --img_size 64\n```\n\n```sh\nusage: create_db.py [-h] --output OUTPUT [--db DB] [--img_size IMG_SIZE] [--min_score MIN_SCORE]\n\nThis script cleans-up noisy labels and creates database for training.\n\noptional arguments:\n  -h, --help                 show this help message and exit\n  --output OUTPUT, -o OUTPUT path to output database mat file (default: None)\n  --db DB                    dataset; wiki or imdb (default: wiki)\n  --img_size IMG_SIZE        output image size (default: 32)\n  --min_score MIN_SCORE      minimum face_score (default: 1.0)\n```\n\n#### Train network\nTrain the network using the training data created above.\n\n```sh\npython3 train.py --input data/imdb_db.mat\n```\n\nTrained weight files are stored as `checkpoints/weights.*.hdf5` for each epoch if the validation loss becomes minimum over previous epochs.\n\n```sh\nusage: train.py [-h] --input INPUT [--batch_size BATCH_SIZE]\n                [--nb_epochs NB_EPOCHS] [--depth DEPTH] [--width WIDTH]\n                [--validation_split VALIDATION_SPLIT] [--aug]\n\nThis script trains the CNN model for age and gender estimation.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --input INPUT, -i INPUT\n                        path to input database mat file (default: None)\n  --batch_size BATCH_SIZE\n                        batch size (default: 32)\n  --nb_epochs NB_EPOCHS\n                        number of epochs (default: 30)\n  --depth DEPTH         depth of network (should be 10, 16, 22, 28, ...)\n                        (default: 16)\n  --width WIDTH         width of network (default: 8)\n  --validation_split VALIDATION_SPLIT\n                        validation split ratio (default: 0.1)\n  --aug                 use data augmentation if set true (default: False)\n```\n\n#### Train network with recent data augmentation methods\nRecent data augmentation methods, mixup [3] and Random Erasing [4],\ncan be used with standard data augmentation by `--aug` option in training:\n\n```bash\npython3 train.py --input data/imdb_db.mat --aug\n```\n\nPlease refer to [this repository](https://github.com/yu4u/mixup-generator) for implementation details.\n\nI confirmed that data augmentation enables us to avoid overfitting\nand improves validation loss.\n\n\n#### Use the trained network\n\n```sh\npython3 demo.py\n```\n\n```sh\nusage: demo.py [-h] [--weight_file WEIGHT_FILE] [--depth DEPTH] [--width WIDTH]\n\nThis script detects faces from web cam input, and estimates age and gender for\nthe detected faces.\n\noptional arguments:\n  -h, --help                show this help message and exit\n  --weight_file WEIGHT_FILE path to weight file (e.g. weights.18-4.06.hdf5) (default: None)\n  --depth DEPTH             depth of network (default: 16)\n  --width WIDTH             width of network (default: 8)\n\n```\n\nPlease use the best model among `checkpoints/weights.*.hdf5` for `WEIGHT_FILE` if you use your own trained models.\n\n#### Plot training curves from history file\n\n```sh\npython3 plot_history.py --input models/history_16_8.h5 \n```\n\n##### Results without data augmentation\n<img src=\"https://github.com/yu4u/age-gender-estimation/wiki/images/loss.png\" width=\"400px\">\n\n<img src=\"https://github.com/yu4u/age-gender-estimation/wiki/images/accuracy.png\" width=\"400px\">\n\n##### Results with data augmentation\nThe best val_loss was improved from 3.969 to 3.731:\n- Without data augmentation: 3.969\n- With standard data augmentation: 3.799\n- With mixup and random erasing: 3.731\n\n<img src=\"fig/loss.png\" width=\"480px\">\n\nWe can see that, with data augmentation,\noverfitting did not occur even at very small learning rates (epoch > 15).\n\n#### Network architecture\nIn [the original paper](https://www.vision.ee.ethz.ch/en/publications/papers/articles/eth_biwi_01299.pdf) [1, 2], the pretrained VGG network is adopted.\nHere the Wide Residual Network (WideResNet) is trained from scratch.\nI modified the @asmith26's implementation of the WideResNet; two classification layers (for age and gender estimation) are added on the top of the WideResNet.\n\nNote that while age and gender are independently estimated by different two CNNs in [1, 2], in my implementation, they are simultaneously estimated using a single CNN.\n\n#### Estimated results\nTrained on imdb, tested on wiki.\n![](https://github.com/yu4u/age-gender-estimation/wiki/images/result.png)\n\n\n### Evaluation\n\n#### Evaluation on the APPA-REAL dataset\nYou can evaluate a trained model on the APPA-REAL (validation) dataset by:\n\n```bash\npython3 evaluate_appa_real.py\n```\n\nPlease refer to [here](appa-real) for the details of the APPA-REAL dataset.\n\nThe results of pretrained model is:\n\n```\nMAE Apparent: 6.06\nMAE Real: 7.38\n```\n\nThe best result reported in [5] is:\n\n```\nMAE Apparent: 4.08\nMAE Real: 5.30\n```\n\nPlease note that the above result was achieved by finetuning the model using the training set of the APPA-REAL dataset,\nwhile the pretrained model here is not and the size of images is small (64 vs. 224).\n\nAnyway, I should do finetuning on the training set of the APPA-REAL...\n\n## For further improvement\nIf you want better results, there would be several options:\n\n- Use larger training images (e.g. --img_size 128).\n- Use VGGFace as an initial model and finetune it (https://github.com/rcmalli/keras-vggface).\n  - In this case, the size of training images should be (224, 224).\n- Use more \"clean\" dataset (http://chalearnlap.cvc.uab.es/dataset/18/description/) (only for age estimation)\n\n\n## License\nThis project is released under the MIT license.\nHowever, [the IMDB-WIKI dataset](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) used in this project is originally provided under the following conditions.\n\n> Please notice that this dataset is made available for academic research purpose only. All the images are collected from the Internet, and the copyright belongs to the original owners. If any of the images belongs to you and you would like it removed, please kindly inform us, we will remove it from our dataset immediately.\n\nTherefore, the pretrained model(s) included in this repository is restricted by these conditions (available for academic research purpose only).\n\n\n## References\n[1] R. Rothe, R. Timofte, and L. V. Gool, \"DEX: Deep EXpectation of apparent age from a single image,\" in Proc. of ICCV, 2015.\n\n[2] R. Rothe, R. Timofte, and L. V. Gool, \"Deep expectation of real and apparent age from a single image\nwithout facial landmarks,\" in IJCV, 2016.\n\n[3] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz, \"mixup: Beyond Empirical Risk Minimization,\" in arXiv:1710.09412, 2017.\n\n[4] Z. Zhong, L. Zheng, G. Kang, S. Li, and Y. Yang, \"Random Erasing Data Augmentation,\" in arXiv:1708.04896, 2017.\n\n[5] E. Agustsson, R. Timofte, S. Escalera, X. Baro, I. Guyon, and R. Rothe, \"Apparent and real age estimation in still images with deep residual regressors on APPA-REAL database,\" in Proc. of FG, 2017.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"682E:09ED:E47D8:3F1D8C:6AB929C1"},"text_sha256":"1f07072e0fbc0c95914b80baf36befa11a73d5f30ff163978951695e6117a0d4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2870","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17BCC52:1BDDEAF:6AB929C4"},"commit":{"sha":"6af6148f6eb09bf16e7164490730c71c61c89f3e","url":"https://github.com/yu4u/age-gender-estimation/commit/6af6148f6eb09bf16e7164490730c71c61c89f3e","date":"2020-08-21T13:00:32Z","author_date":"2020-08-21T13:00:32Z","committer_date":"2020-08-21T13:00:32Z","tree_sha":"0bdbfeb47bb5792bf7014401dc8490162ce98bdc","message_first_line":"fix file name"},"tree_request_status":200,"tree_rate":{"github_remaining":"2869","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17C6A86:1BE7902:6AB929C4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6878,"blob_sha":"4e2ae5202170d4995d532e05e0b1b241ac20d6ca","priority":0}],"documents":[{"path":"README.md","size":6878,"blob_sha":"4e2ae5202170d4995d532e05e0b1b241ac20d6ca","priority":0,"status":200,"text":"# Age and Gender Estimation\nThis is a Keras implementation of a CNN for estimating age and gender from a face image [1, 2].\nIn training, [the IMDB-WIKI dataset](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) is used.\n\n- [Aug. 21, 2020] Refactored; use tensorflow.keras\n- [Jun. 30, 2019] [Another PyTorch-based project](https://github.com/yu4u/age-estimation-pytorch) was released\n- [Nov. 12, 2018] Enable Adam optimizer; seems to be better than momentum SGD\n- [Sep. 23, 2018] Demo from directory\n- [Aug. 11, 2018] Add age estimation sub-project [here](age_estimation)\n- [Jul. 5, 2018] The UTKFace dataset became available for training.\n- [Apr. 10, 2018] Evaluation result on the APPA-REAL dataset was added.\n\n## Dependencies\n- Python3.6+\n\nTested on:\n- Ubuntu 16.04, Python 3.6.9, Tensorflow 2.3.0, CUDA 10.01, cuDNN 7.6\n\n\n## Usage\n\n### Use trained model for demo\nRun the demo script (requires web cam).\nYou can use `--image_dir [IMAGE_DIR]` option to use images in the `[IMAGE_DIR]` directory instead.\n\n```sh\npython demo.py\n```\n\nThe trained model will be automatically downloaded to the `pretrained_models` directory.\n\n### Create training data from the IMDB-WIKI dataset\nFirst, download the dataset.\nThe dataset is downloaded and extracted to the `data` directory by:\n\n```sh\n./download.sh\n```\n\nSecondly, filter out noise data and serialize labels into `.csv` file.\nPlease check [check_dataset.ipynb](check_dataset.ipynb) for the details of the dataset.\nThe training data is created by:\n\n```sh\npython create_db.py --db imdb\n```\n\n```sh\nusage: create_db.py [-h] [--db DB] [--min_score MIN_SCORE]\n\nThis script cleans-up noisy labels and creates database for training.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --db DB               dataset; wiki or imdb (default: imdb)\n  --min_score MIN_SCORE minimum face_score (default: 1.0)\n```\n\nThe resulting files with default parameters are included in this repo (meta/imdb.csv and meta/wiki.csv),\nthus there is no need to run this by yourself.\n\n\n### Create training data from the UTKFace dataset [currently not supported]\nFirstly, download images from [the website of the UTKFace dataset](https://susanqq.github.io/UTKFace/).\n`UTKFace.tar.gz` can be downloaded from `Aligned&Cropped Faces` in Datasets section.\nThen, extract the archive.\n\n```sh\ntar zxf UTKFace.tar.gz UTKFace\n```\n\nFinally, run the following script to create the training data:\n\n```\npython create_db_utkface.py -i UTKFace -o UTKFace.mat\n```\n\n[NOTE]: Because the face images in the UTKFace dataset is tightly cropped (there is no margin around the face region),\nfaces should also be cropped in `demo.py` if weights trained by the UTKFace dataset is used.\nPlease set the margin argument to 0 for tight cropping:\n\n```sh\npython demo.py --weight_file WEIGHT_FILE --margin 0\n```\n\nThe pre-trained weights can be found [here](https://github.com/yu4u/age-gender-estimation/releases/download/v0.5/weights.29-3.76_utk.hdf5).\n\n### Train model\nTrain the model architecture using the training data created above:\n\n```sh\npython train.py\n```\n\nTrained weight files are stored as `checkpoints/*.hdf5` for each epoch if the validation loss becomes minimum over previous epochs.\n\n#### Changing model or the other training parameters\nYou can change [default setting(s)](src/config.yaml) from command line as:\n\n```sh\npython train.py model.model_name=EfficientNetB3 model.batch_size=64\n```\n\nAvailable models can be found [here](https://keras.io/api/applications/).\n\n#### Check training curve\nThe training logs can be easily visualized via [wandb](https://www.wandb.com/) by:\n\n1. create account from [here](https://app.wandb.ai/login?signup=true)\n2. create new project in wandb (e.g. \"age-gender-estimation\")\n3. run `wandb login` on terminal and authorize\n4. run training script with `wandb.project=age-gender-estimation` argument\n5. check dashboard!\n\n### Use the trained model\n\n```sh\npython demo.py\n```\n\n```sh\nusage: demo.py [-h] [--weight_file WEIGHT_FILE] [--margin MARGIN]\n               [--image_dir IMAGE_DIR]\n\nThis script detects faces from web cam input, and estimates age and gender for\nthe detected faces.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --weight_file WEIGHT_FILE\n                        path to weight file (e.g. weights.28-3.73.hdf5)\n                        (default: None)\n  --margin MARGIN       margin around detected face for age-gender estimation\n                        (default: 0.4)\n  --image_dir IMAGE_DIR\n                        target image directory; if set, images in image_dir\n                        are used instead of webcam (default: None)\n```\n\nPlease use the best model among `checkpoints/*.hdf5` for `WEIGHT_FILE` if you use your own trained models.\n\n\n\n### Estimated results\nTrained on imdb, tested on wiki.\n![](https://github.com/yu4u/age-gender-estimation/wiki/images/result.png)\n\n\n### Evaluation\n\n#### Evaluation on the APPA-REAL dataset\nYou can evaluate a trained model on the APPA-REAL (validation) dataset by:\n\n```bash\npython evaluate_appa_real.py --weight_file WEIGHT_FILE\n```\n\nPlease refer to [here](appa-real) for the details of the APPA-REAL dataset.\n\nThe results of trained model is:\n\n```\nMAE Apparent: 5.33\nMAE Real: 6.22\n```\n\nThe best result reported in [5] is:\n\n```\nMAE Apparent: 4.08\nMAE Real: 5.30\n```\n\nPlease note that the above result was achieved by finetuning the model using the training set of the APPA-REAL dataset.\n\n## License\nThis project is released under the MIT license.\nHowever, [the IMDB-WIKI dataset](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) used in this project is originally provided under the following conditions.\n\n> Please notice that this dataset is made available for academic research purpose only. All the images are collected from the Internet, and the copyright belongs to the original owners. If any of the images belongs to you and you would like it removed, please kindly inform us, we will remove it from our dataset immediately.\n\nTherefore, the pretrained model(s) included in this repository is restricted by these conditions (available for academic research purpose only).\n\n\n## References\n[1] R. Rothe, R. Timofte, and L. V. Gool, \"DEX: Deep EXpectation of apparent age from a single image,\" in Proc. of ICCV, 2015.\n\n[2] R. Rothe, R. Timofte, and L. V. Gool, \"Deep expectation of real and apparent age from a single image\nwithout facial landmarks,\" in IJCV, 2016.\n\n[3] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz, \"mixup: Beyond Empirical Risk Minimization,\" in arXiv:1710.09412, 2017.\n\n[4] Z. Zhong, L. Zheng, G. Kang, S. Li, and Y. Yang, \"Random Erasing Data Augmentation,\" in arXiv:1708.04896, 2017.\n\n[5] E. Agustsson, R. Timofte, S. Escalera, X. Baro, I. Guyon, and R. Rothe, \"Apparent and real age estimation in still images with deep residual regressors on APPA-REAL database,\" in Proc. of FG, 2017.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3686:2B291E:182AE7:5E47A5:6AB929C3"},"text_sha256":"2b2d4f3f90afc6eb867788cf80f50b5dc6dfd62aeb4821c2f62837a6c48f13a5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"daavoo/pyntcloud","input_row":{"repository":"daavoo/pyntcloud","url":"https://github.com/daavoo/pyntcloud","name":"pyntcloud","owner":"daavoo","description":"pyntcloud is a Python library for working with 3D point clouds.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1504,"issues":183,"created_at":"2016-10-03T16:16:44Z","updated_at":"2026-09-27T12:37:33Z","first_commit_at":"2016-10-03T16:14:04Z","last_commit_at":"2025-03-15T11:51:43Z","activity_months":101.34,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:49.391Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"daavoo/pyntcloud","visibility":"public","created_at":"2016-10-03T16:16:44Z","updated_at":"2026-09-27T12:37:33Z","private":false,"fork":false,"archived":false,"stargazers_count":1504,"open_issues_count":66,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2868","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A1:1B4E7A:179DC41:1BBF0AE:6AB929C5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2867","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090F:380E1C:17C3848:1BE3FAB:6AB929C5"},"commit":{"sha":"27f499ba7e85cf383d6b242fda835692a3707e1e","url":"https://github.com/daavoo/pyntcloud/commit/27f499ba7e85cf383d6b242fda835692a3707e1e","date":"2018-05-23T09:49:14Z","author_date":"2018-05-23T09:49:14Z","committer_date":"2018-05-23T09:49:14Z","tree_sha":"1684caadbcbb9e8bcd766257fb700134bbd85df6","message_first_line":"Adapt structures to keyword only arguments"},"tree_request_status":200,"tree_rate":{"github_remaining":"2866","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0919:7307A:17AC88F:1BCD9C0:6AB929C6"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4190,"blob_sha":"6263a242e4fb0306ac94890d3d9093a6ec0b7502","priority":0}],"documents":[{"path":"README.rst","size":4190,"blob_sha":"6263a242e4fb0306ac94890d3d9093a6ec0b7502","priority":0,"status":200,"text":"=============================\nMaking point clouds fun again\n=============================\n\n\n.. image:: https://travis-ci.org/daavoo/pyntcloud.svg?branch=master\n    :target: https://travis-ci.org/daavoo/pyntcloud\n    :alt: Travis Build Status\n\n.. image:: /docs/images/pyntcloud_logo.png\n\n**pyntcloud** is a Python (3, because we are not in 2008) library for working with 3D point clouds.\n\n- Documentation_\n- Overview_\n\n.. _Documentation:\n\nDocumentation \n=============\n📖 📖\n\n\n+---------------------------------------+\n| `Home`_                               |\n+---------------------------------------+\n| `Introduction`_                       |\n+---------------------------------------+\n| `Installation`_                       |\n+---------------------------------------+\n| `PyntCloud`_                          |\n+---------------------------------------+\n| `Points`_                             |\n+---------------------------------------+\n| `Filters`_ // `Filters - Dev`_        |\n+---------------------------------------+\n| `I/O`_ // `I/O - Dev`_                |\n+---------------------------------------+\n| `Samplers`_ // `Samplers - Dev`_      |\n+---------------------------------------+\n| `Structures`_ // `Structures - Dev`_  |\n+---------------------------------------+\n\n\n.. _Home: http://pyntcloud.readthedocs.io/en/latest/\n.. _Introduction: http://pyntcloud.readthedocs.io/en/latest/introduction.html\n.. _Installation: http://pyntcloud.readthedocs.io/en/latest/installation.html\n.. _PyntCloud: http://pyntcloud.readthedocs.io/en/latest/PyntCloud.html\n.. _Points: http://pyntcloud.readthedocs.io/en/latest/points.html\n.. _Filters: http://pyntcloud.readthedocs.io/en/latest/filters.html\n.. _Filters - Dev: http://pyntcloud.readthedocs.io/en/latest/filters_dev.html\n.. _I/O: http://pyntcloud.readthedocs.io/en/latest/io.html\n.. _I/O - Dev: http://pyntcloud.readthedocs.io/en/latest/io_dev.html\n.. _Samplers: http://pyntcloud.readthedocs.io/en/latest/samplers.html\n.. _Samplers - Dev: http://pyntcloud.readthedocs.io/en/latest/samplers_dev.html\n.. _Structures: http://pyntcloud.readthedocs.io/en/latest/structures.html\n.. _Structures - Dev: http://pyntcloud.readthedocs.io/en/latest/structures_dev.html\n\n.. _Overview:\n\nOverview\n========\n\nConcise API\n-----------\n\nYou can access most of pyntcloud's functionality from its core class: PyntCloud.\n\nWith PyntCloud you can perform complex 3D processing operations with minimum lines of\ncode. For example you can:\n\n- Load a point cloud from disk.\n- Add 3 new scalar fields by converting RGB to HSV.\n- Build a grid of voxels from the point cloud.\n- Build a new point cloud keeping only the nearest point to each occupied voxel center.\n- Save the new point cloud.\n\nWith the following concise code:\n\n.. code-block:: python\n\n    from pyntcloud import PyntCloud\n\n    cloud = PyntCloud.from_file(\"some_file.ply\")\n\n    cloud.add_scalar_field(\"hsv\")\n\n    voxelgrid_id = cloud.add_structure(\"voxelgrid\", x_y_z=[32, 32, 32])\n\n    points = cloud.get_sample(\"voxelgrid_nearest\", voxelgrid=voxelgrid_id)\n\n    new_cloud = PyntCloud(points)\n\n    new_cloud.to_file(\"out_file.ply\")\n\nLightweigth visualizer\n----------------------\n\nEvery PyntCloud can be visualized using the `plot` method.\n\nThis will create a stand-alone html visualizer. The cool thing about this is that\nyou can open it in any browser and if you call it from inside a Jupyter Notebook, the\nvisualizer will be embedded as an IFrame:\n\n.. image:: /docs/images/plot1.gif\n\nThe plot function has many options.\n\nFor example you can use any scalar field as color with a custom colormap:\n\n.. image:: /docs/images/plot2.gif\n\nOr, if it exists, visualize the mesh associated with the point cloud:\n\n.. image:: /docs/images/plot3.gif\n\n\nGeneral purpose\n----------------\n\nEven though point clouds obtained from different sources present some variance in terms of the kind of information they contain,\nwe encourage a source-agnostic vision of point clouds.\n\npyntcloud provides tools for source-agnostic 3D processing operations but it also provides building blocks for easily implementing something\nthat covers your specific needs.\n\nEasy to use and extend\n----------------------\n\nBecause Python.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"76B4:3BF56:174C47:5D68E4:6AB929C6"},"text_sha256":"691083a2500d4efcaceac961f9eea79bfc68c61d9c5b8adb4732ae776ca632b7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2865","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091B:72BD3:17EC454:1C0D929:6AB929C6"},"commit":{"sha":"8368c6a22f8060aeafacf2964276e8704d732145","url":"https://github.com/daavoo/pyntcloud/commit/8368c6a22f8060aeafacf2964276e8704d732145","date":"2025-03-15T11:51:43Z","author_date":"2025-03-15T11:51:43Z","committer_date":"2025-03-15T11:51:43Z","tree_sha":"c8d21dec07dee61e005cfc1ac5713f470e65946b","message_first_line":"misc: Add and run pre-commit"},"tree_request_status":200,"tree_rate":{"github_remaining":"2864","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091C:B1202:17912E7:1BB201B:6AB929C7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2303,"blob_sha":"3f63224f9f288d7f7d767409e181ca8d70a499a4","priority":0}],"documents":[{"path":"README.md","size":2303,"blob_sha":"3f63224f9f288d7f7d767409e181ca8d70a499a4","priority":0,"status":200,"text":"# Making point clouds fun again\n\n![pyntcloud logo](https://raw.githubusercontent.com/daavoo/pyntcloud/master/docs/images/pyntcloud_logo.png)\n\n\n**pyntcloud** is a Python library for working with 3D point clouds leveraging the power of the Python scientific stack.\n\n- [Examples](https://github.com/daavoo/pyntcloud/tree/master/examples).\n- [Documentation](http://pyntcloud.readthedocs.io/en/latest/)\n\n## Installation\n\n```bash\npip install pyntcloud\n```\n\n## Quick Overview\n\nYou can access most of pyntcloud's functionality from its core class: PyntCloud.\n\nWith PyntCloud you can perform complex 3D processing operations with minimum lines of\ncode. For example you can:\n\n- Load a PLY point cloud from disk.\n- Add 3 new scalar fields by converting RGB to HSV.\n- Build a grid of voxels from the point cloud.\n- Build a new point cloud keeping only the nearest point to each occupied voxel center.\n- Save the new point cloud in numpy's NPZ format.\n\nWith the following concise code:\n\n```python\nfrom pyntcloud import PyntCloud\n\ncloud = PyntCloud.from_file(\"some_file.ply\")\n\ncloud.add_scalar_field(\"hsv\")\n\nvoxelgrid_id = cloud.add_structure(\"voxelgrid\", n_x=32, n_y=32, n_z=32)\n\nnew_cloud = cloud.get_sample(\"voxelgrid_nearest\", voxelgrid_id=voxelgrid_id, as_PyntCloud=True)\n\nnew_cloud.to_file(\"out_file.npz\")\n```\n\n## Integration with other libraries\n\npyntcloud offers seamless integration with other 3D processing libraries.\n\nYou can create / convert PyntCloud instances from / to many 3D processing libraries using the `from_instance` / `to_instance` methods:\n\n- [Open3D](https://www.open3d.org)\n\n```python\nimport open3d as o3d\nfrom pyntcloud import PyntCloud\n\n# FROM Open3D\noriginal_triangle_mesh = o3d.io.read_triangle_mesh(\"diamond.ply\")\ncloud = PyntCloud.from_instance(\"open3d\", original_triangle_mesh)\n\n# TO Open3D\ncloud = PyntCloud.from_file(\"diamond.ply\")\nconverted_triangle_mesh = cloud.to_instance(\"open3d\", mesh=True)  # mesh=True by default\n```\n\n- [PyVista](https://docs.pyvista.org)\n\n```python\nimport pyvista as pv\nfrom pyntcloud import PyntCloud\n\n# FROM PyVista\noriginal_point_cloud = pv.read(\"diamond.ply\")\ncloud = PyntCloud.from_instance(\"pyvista\", original_point_cloud)\n\n# TO PyVista\ncloud = PyntCloud.from_file(\"diamond.ply\")\nconverted_triangle_mesh = cloud.to_instance(\"pyvista\", mesh=True)\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DC58:324E19:17FCDD:5E1968:6AB929C0"},"text_sha256":"162f0c6a9f1def78e5ae446b3d8d258ddaf7ed3ed62303fb2294980a8c6d1176"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"OpenNMT/OpenNMT-tf","input_row":{"repository":"OpenNMT/OpenNMT-tf","url":"https://github.com/OpenNMT/OpenNMT-tf","name":"OpenNMT-tf","owner":"OpenNMT","description":"Neural machine translation and sequence learning using TensorFlow","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1483,"issues":423,"created_at":"2017-11-02T10:53:22Z","updated_at":"2026-08-14T10:27:35Z","first_commit_at":"2017-07-27T13:05:26Z","last_commit_at":"2023-08-04T07:47:43Z","activity_months":72.230000000000004,"ai_ml_match_topics":"deep-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:52.172Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"OpenNMT/OpenNMT-tf","visibility":"public","created_at":"2017-11-02T10:53:22Z","updated_at":"2026-08-14T10:27:35Z","private":false,"fork":false,"archived":false,"stargazers_count":1483,"open_issues_count":32,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2863","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091E:52542:17B369B:1BD4DD8:6AB929C8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2862","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091F:73962:17C6DB7:1BE7C9C:6AB929C8"},"commit":{"sha":"cdfdfa9a681d109dfc5ca8875091bd240a328059","url":"https://github.com/OpenNMT/OpenNMT-tf/commit/cdfdfa9a681d109dfc5ca8875091bd240a328059","date":"2018-05-17T15:44:55Z","author_date":"2018-05-17T15:44:55Z","committer_date":"2018-05-17T15:44:55Z","tree_sha":"18a9563f89f5e25a95b702b544c3b19a3af991c0","message_first_line":"Update CHANGELOG.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2861","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0921:0AC4:1288ABB:15D9F08:6AB929C8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5437,"blob_sha":"6c48f1e08ac09ead96ec080af6a3ea3e46e89388","priority":0}],"documents":[{"path":"README.md","size":5437,"blob_sha":"6c48f1e08ac09ead96ec080af6a3ea3e46e89388","priority":0,"status":200,"text":"[![Build Status](https://api.travis-ci.org/OpenNMT/OpenNMT-tf.svg?branch=master)](https://travis-ci.org/OpenNMT/OpenNMT-tf) [![PyPI version](https://badge.fury.io/py/OpenNMT-tf.svg)](https://badge.fury.io/py/OpenNMT-tf) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](http://opennmt.net/OpenNMT-tf/) [![Gitter](https://badges.gitter.im/OpenNMT/OpenNMT-tf.svg)](https://gitter.im/OpenNMT/OpenNMT-tf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n# OpenNMT-tf\n\nOpenNMT-tf is a general purpose sequence modeling tool in TensorFlow with production in mind. While neural machine translation is the main target task, it has been designed to more generally support:\n\n* sequence to sequence mapping\n* sequence tagging\n* sequence classification\n\n## Key features\n\nOpenNMT-tf focuses on modularity to support advanced modeling and training capabilities:\n\n* **arbitrarily complex encoder architectures**<br/>e.g. mixing RNNs, CNNs, self-attention, etc. in parallel or in sequence.\n* **hybrid encoder-decoder models**<br/>e.g. self-attention encoder and RNN decoder or vice versa.\n* **multi-source training**<br/>e.g. source text and Moses translation as inputs for machine translation.\n* **multiple input format**<br/>text with support of mixed word/character embeddings or real vectors serialized in *TFRecord* files.\n* **on-the-fly tokenization**<br/>apply advanced tokenization dynamically during the training and detokenize the predictions during inference or evaluation.\n* **automatic evaluation**<br/>support for saving evaluation predictions and running external evaluators (e.g. BLEU).\n\nand all of the above can be used simultaneously to train novel and complex architectures. See the [predefined models](config/models) to discover how they are defined and the [API documentation](http://opennmt.net/OpenNMT-tf/package/opennmt.html) to customize them.\n\nOpenNMT-tf is also compatible with some of the best TensorFlow features:\n\n* replicated and distributed training\n* monitoring with [TensorBoard](https://www.tensorflow.org/get_started/summaries_and_tensorboard)\n* inference with [TensorFlow Serving](https://github.com/OpenNMT/OpenNMT-tf/tree/master/examples/serving) and the [TensorFlow C++ API](https://github.com/OpenNMT/OpenNMT-tf/tree/master/examples/cpp)\n\n## Requirements\n\n* Python (>= 2.7)\n* TensorFlow (>= 1.4)\n\n## Installation\n\n```bash\npip install OpenNMT-tf\n```\n\n## Overview\n\nA minimal OpenNMT-tf run consists of 3 elements:\n\n* the **run** type: `train_and_eval`, `train`, `eval`, `infer`, `export`, or `score`\n* the **model** type\n* the **parameters** described in a YAML file\n\nthat are passed to the main script:\n\n```\nonmt-main <run_type> --model_type <model> --config <config_file.yml>\n```\n\nAdditional experimental models are available in the `config/models/` directory and can be used with the option `--model <model_file.py>`.\n\n* For more information about configuration files, see the [documentation](http://opennmt.net/OpenNMT-tf/configuration.html).\n* For more information about command line options, see the help flag `onmt-main -h`.\n\n## Quickstart\n\nHere is a minimal workflow to get you started in using OpenNMT-tf. This example uses a toy English-German dataset for machine translation.\n\n1\\. Clone the repository to fetch the sample data and the predefined configurations:\n\n```\ngit clone --depth 1 --branch r1 --single-branch https://github.com/OpenNMT/OpenNMT-tf.git\ncd OpenNMT-tf\n```\n\n2\\. Build the word vocabularies:\n\n```\nonmt-build-vocab --size 50000 --save_vocab data/toy-ende/src-vocab.txt data/toy-ende/src-train.txt\nonmt-build-vocab --size 50000 --save_vocab data/toy-ende/tgt-vocab.txt data/toy-ende/tgt-train.txt\n```\n\n3\\. Train with preset parameters:\n\n```\nonmt-main train_and_eval --model_type NMTSmall --config config/opennmt-defaults.yml config/data/toy-ende.yml\n```\n\n4\\. Translate a test file with the latest checkpoint:\n\n```\nonmt-main infer --config config/opennmt-defaults.yml config/data/toy-ende.yml --features_file data/toy-ende/src-test.txt\n```\n\n**Note:** do not expect any good translation results with this toy example. Consider training on [larger parallel datasets](http://www.statmt.org/wmt16/translation-task.html) instead.\n\nFor more advanced usages, see the [documentation](http://opennmt.net/OpenNMT-tf) or the [WMT training scripts](https://github.com/OpenNMT/OpenNMT-tf/tree/master/scripts/wmt).\n\n## Using as a library\n\nOpenNMT-tf also exposes well-defined and [documented](http://opennmt.net/OpenNMT-tf/package/opennmt.html) functions and classes. For example, OpenNMT-tf has been used to implement [unsupervised NMT](https://github.com/OpenNMT/Hackathon/tree/master/unsupervised-nmt) in TensorFlow.\n\n## Compatibility with {Lua,Py}Torch implementations\n\nOpenNMT-tf has been designed from scratch and compatibility with the {Lua,Py}Torch implementations in terms of usage, design, and features is not a priority. Please submit a feature request for any missing feature or behavior that you found useful in the {Lua,Py}Torch implementations.\n\n## Acknowledgments\n\nThe implementation is inspired by the following:\n\n* [TensorFlow's NMT tutorial](https://github.com/tensorflow/nmt)\n* [Tensor2Tensor](https://github.com/tensorflow/tensor2tensor)\n* [Google's seq2seq](https://github.com/google/seq2seq)\n\n## Additional resources\n\n* [Documentation](http://opennmt.net/OpenNMT-tf)\n* [Forum](http://forum.opennmt.net)\n* [Gitter](https://gitter.im/OpenNMT/OpenNMT-tf)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B322:3B6DE:175311:5D6F0B:6AB929C2"},"text_sha256":"916e207f8a02a598598bc31847c4880951679279011a200833f5d06ffa138433"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2860","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0922:1B4E7A:179DF76:1BBF44B:6AB929C9"},"commit":{"sha":"6f3b952ebb973dec31250a806bf0f56ff730d0b5","url":"https://github.com/OpenNMT/OpenNMT-tf/commit/6f3b952ebb973dec31250a806bf0f56ff730d0b5","date":"2023-08-04T07:47:43Z","author_date":"2023-08-04T07:47:43Z","committer_date":"2023-08-04T07:47:43Z","tree_sha":"0c6c4cae01de66819903fde46e184a81f284b94f","message_first_line":"Bump version to 2.32.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2859","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0924:6C6ED:17E1F63:1C02FB9:6AB929CA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9160,"blob_sha":"1975b61f68516aa1fa8fb16c9f3c8f4a95b3ab52","priority":0}],"documents":[{"path":"README.md","size":9160,"blob_sha":"1975b61f68516aa1fa8fb16c9f3c8f4a95b3ab52","priority":0,"status":200,"text":"[![CI](https://github.com/OpenNMT/OpenNMT-tf/workflows/CI/badge.svg)](https://github.com/OpenNMT/OpenNMT-tf/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/OpenNMT/OpenNMT-tf/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenNMT/OpenNMT-tf) [![PyPI version](https://badge.fury.io/py/OpenNMT-tf.svg)](https://badge.fury.io/py/OpenNMT-tf) [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://opennmt.net/OpenNMT-tf/) [![Gitter](https://badges.gitter.im/OpenNMT/OpenNMT-tf.svg)](https://gitter.im/OpenNMT/OpenNMT-tf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Forum](https://img.shields.io/discourse/status?server=https%3A%2F%2Fforum.opennmt.net%2F)](https://forum.opennmt.net/)\n\n# OpenNMT-tf\n\nOpenNMT-tf is a general purpose sequence learning toolkit using TensorFlow 2. While neural machine translation is the main target task, it has been designed to more generally support:\n\n* sequence to sequence mapping\n* sequence tagging\n* sequence classification\n* language modeling\n\nThe project is production-oriented and comes with [backward compatibility guarantees](https://github.com/OpenNMT/OpenNMT-tf/blob/master/CHANGELOG.md).\n\n## Key features\n\n### Modular model architecture\n\nModels are described with code to allow training custom architectures and overriding default behavior. For example, the following instance defines a sequence to sequence model with 2 concatenated input features, a self-attentional encoder, and an attentional RNN decoder sharing its input and output embeddings:\n\n```python\nopennmt.models.SequenceToSequence(\n    source_inputter=opennmt.inputters.ParallelInputter(\n        [\n            opennmt.inputters.WordEmbedder(embedding_size=256),\n            opennmt.inputters.WordEmbedder(embedding_size=256),\n        ],\n        reducer=opennmt.layers.ConcatReducer(axis=-1),\n    ),\n    target_inputter=opennmt.inputters.WordEmbedder(embedding_size=512),\n    encoder=opennmt.encoders.SelfAttentionEncoder(num_layers=6),\n    decoder=opennmt.decoders.AttentionalRNNDecoder(\n        num_layers=4,\n        num_units=512,\n        attention_mechanism_class=tfa.seq2seq.LuongAttention,\n    ),\n    share_embeddings=opennmt.models.EmbeddingsSharingLevel.TARGET,\n)\n```\n\nThe [`opennmt`](https://opennmt.net/OpenNMT-tf/package/overview.html) package exposes other building blocks that can be used to design:\n\n* [multiple input features](https://opennmt.net/OpenNMT-tf/package/opennmt.inputters.ParallelInputter.html)\n* [mixed embedding representation](https://opennmt.net/OpenNMT-tf/package/opennmt.inputters.MixedInputter.html)\n* [multi-source context](https://opennmt.net/OpenNMT-tf/package/opennmt.inputters.ParallelInputter.html)\n* [cascaded](https://opennmt.net/OpenNMT-tf/package/opennmt.encoders.SequentialEncoder.html) or [multi-column](https://opennmt.net/OpenNMT-tf/package/opennmt.encoders.ParallelEncoder.html) encoder\n* [hybrid sequence to sequence models](https://opennmt.net/OpenNMT-tf/package/opennmt.models.SequenceToSequence.html)\n\nStandard models such as the Transformer are defined in a [model catalog](https://github.com/OpenNMT/OpenNMT-tf/blob/master/opennmt/models/catalog.py) and can be used without additional configuration.\n\n*Find more information about model configuration in the [documentation](https://opennmt.net/OpenNMT-tf/model.html).*\n\n### Full TensorFlow 2 integration\n\nOpenNMT-tf is fully integrated in the TensorFlow 2 ecosystem:\n\n* Reusable layers extending [`tf.keras.layers.Layer`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer)\n* Multi-GPU training with [`tf.distribute`](https://www.tensorflow.org/api_docs/python/tf/distribute) and distributed training with [Horovod](https://github.com/horovod/horovod)\n* Mixed precision training with [`tf.keras.mixed_precision`](https://www.tensorflow.org/guide/mixed_precision)\n* Visualization with [TensorBoard](https://www.tensorflow.org/tensorboard)\n* `tf.function` graph tracing that can be [exported to a SavedModel](https://opennmt.net/OpenNMT-tf/serving.html) and served with [TensorFlow Serving](https://github.com/OpenNMT/OpenNMT-tf/tree/master/examples/serving/tensorflow_serving) or [Python](https://github.com/OpenNMT/OpenNMT-tf/tree/master/examples/serving/python)\n\n### Compatibility with CTranslate2\n\n[CTranslate2](https://github.com/OpenNMT/CTranslate2) is an optimized inference engine for OpenNMT models featuring fast CPU and GPU execution, model quantization, parallel translations, dynamic memory usage, interactive decoding, and more! OpenNMT-tf can [automatically export](https://opennmt.net/OpenNMT-tf/serving.html#ctranslate2) models to be used in CTranslate2.\n\n### Dynamic data pipeline\n\nOpenNMT-tf does not require to compile the data before the training. Instead, it can directly read text files and preprocess the data when needed by the training. This allows [on-the-fly tokenization](https://opennmt.net/OpenNMT-tf/tokenization.html) and data augmentation by injecting random noise.\n\n### Model fine-tuning\n\nOpenNMT-tf supports model fine-tuning workflows:\n\n* Model weights can be transferred to new word vocabularies, e.g. to inject domain terminology before fine-tuning on in-domain data\n* [Contrastive learning](https://ai.google/research/pubs/pub48253/) to reduce word omission errors\n\n### Source-target alignment\n\nSequence to sequence models can be trained with [guided alignment](https://arxiv.org/abs/1607.01628) and alignment information are returned as part of the translation API.\n\n---\n\nOpenNMT-tf also implements most of the techniques commonly used to train and evaluate sequence models, such as:\n\n* automatic evaluation during the training\n* multiple decoding strategy: greedy search, beam search, random sampling\n* N-best rescoring\n* gradient accumulation\n* scheduled sampling\n* checkpoint averaging\n* ... and more!\n\n*See the [documentation](https://opennmt.net/OpenNMT-tf/) to learn how to use these features.*\n\n## Usage\n\nOpenNMT-tf requires:\n\n* Python 3.7 or above\n* TensorFlow 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, or 2.13\n\nWe recommend installing it with `pip`:\n\n```bash\npip install --upgrade pip\npip install OpenNMT-tf\n```\n\n*See the [documentation](https://opennmt.net/OpenNMT-tf/installation.html) for more information.*\n\n### Command line\n\nOpenNMT-tf comes with several command line utilities to prepare data, train, and evaluate models.\n\nFor all tasks involving a model execution, OpenNMT-tf uses a unique entrypoint: `onmt-main`. A typical OpenNMT-tf run consists of 3 elements:\n\n* the **model** type\n* the **parameters** described in a YAML file\n* the **run** type such as `train`, `eval`, `infer`, `export`, `score`, `average_checkpoints`, or `update_vocab`\n\nthat are passed to the main script:\n\n```\nonmt-main --model_type <model> --config <config_file.yml> --auto_config <run_type> <run_options>\n```\n\n*For more information and examples on how to use OpenNMT-tf, please visit [our documentation](https://opennmt.net/OpenNMT-tf).*\n\n### Library\n\nOpenNMT-tf also exposes [well-defined and stable APIs](https://opennmt.net/OpenNMT-tf/package/overview.html), from high-level training utilities to low-level model layers and dataset transformations.\n\nFor example, the `Runner` class can be used to train and evaluate models with few lines of code:\n\n```python\nimport opennmt\n\nconfig = {\n    \"model_dir\": \"/data/wmt-ende/checkpoints/\",\n    \"data\": {\n        \"source_vocabulary\": \"/data/wmt-ende/joint-vocab.txt\",\n        \"target_vocabulary\": \"/data/wmt-ende/joint-vocab.txt\",\n        \"train_features_file\": \"/data/wmt-ende/train.en\",\n        \"train_labels_file\": \"/data/wmt-ende/train.de\",\n        \"eval_features_file\": \"/data/wmt-ende/valid.en\",\n        \"eval_labels_file\": \"/data/wmt-ende/valid.de\",\n    }\n}\n\nmodel = opennmt.models.TransformerBase()\nrunner = opennmt.Runner(model, config, auto_config=True)\nrunner.train(num_devices=2, with_eval=True)\n```\n\nHere is another example using OpenNMT-tf to run efficient beam search with a self-attentional decoder:\n\n```python\ndecoder = opennmt.decoders.SelfAttentionDecoder(num_layers=6, vocab_size=32000)\n\ninitial_state = decoder.initial_state(\n    memory=memory, memory_sequence_length=memory_sequence_length\n)\n\nbatch_size = tf.shape(memory)[0]\nstart_ids = tf.fill([batch_size], opennmt.START_OF_SENTENCE_ID)\n\ndecoding_result = decoder.dynamic_decode(\n    target_embedding,\n    start_ids=start_ids,\n    initial_state=initial_state,\n    decoding_strategy=opennmt.utils.BeamSearch(4),\n)\n```\n\nMore examples using OpenNMT-tf as a library can be found online:\n\n* The directory [examples/library](https://github.com/OpenNMT/OpenNMT-tf/tree/master/examples/library) contains additional examples that use OpenNMT-tf as a library\n* [nmt-wizard-docker](https://github.com/OpenNMT/nmt-wizard-docker) uses the high-level `opennmt.Runner` API to wrap OpenNMT-tf with a custom interface for training, translating, and serving\n\n*For a complete overview of the APIs, see the [package documentation](https://opennmt.net/OpenNMT-tf/package/overview.html).*\n\n## Additional resources\n\n* [Documentation](https://opennmt.net/OpenNMT-tf)\n* [Forum](https://forum.opennmt.net)\n* [Gitter](https://gitter.im/OpenNMT/OpenNMT-tf)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F0F0:3EACB:1795F9:5DB2B4:6AB929C8"},"text_sha256":"6ec98ced8f05e119fdbca246e59f77fe752ac735380bcfcd744485f45fa83499"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Hironsan/anago","input_row":{"repository":"Hironsan/anago","url":"https://github.com/Hironsan/anago","name":"anago","owner":"Hironsan","description":"Bidirectional LSTM-CRF and ELMo for Named-Entity Recognition, Part-of-Speech Tagging and so on.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1481,"issues":108,"created_at":"2017-06-26T21:28:36Z","updated_at":"2026-09-24T17:42:41Z","first_commit_at":"2017-06-26T09:52:24Z","last_commit_at":"2021-04-01T12:34:50Z","activity_months":45.170000000000002,"ai_ml_match_topics":"deep-learning; machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:54.749Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Hironsan/anago","visibility":"public","created_at":"2017-06-26T21:28:36Z","updated_at":"2026-09-24T17:42:41Z","private":false,"fork":false,"archived":false,"stargazers_count":1481,"open_issues_count":46,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2858","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17C445A:1BE5BA8:6AB929CA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2857","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CD:280FBC:17B00D1:1BD046A:6AB929CB"},"commit":{"sha":"ac75baec55375655ccc627eb53cb42ca445521e5","url":"https://github.com/Hironsan/anago/commit/ac75baec55375655ccc627eb53cb42ca445521e5","date":"2018-04-18T07:42:58Z","author_date":"2018-04-18T07:42:58Z","committer_date":"2018-04-18T07:42:58Z","tree_sha":"9831c43b66fec3045aeb56baf411b0486c791b54","message_first_line":"Add examples"},"tree_request_status":200,"tree_rate":{"github_remaining":"2856","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E3:72BD3:17EC7F0:1C0DD24:6AB929CB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4107,"blob_sha":"85875a33cf456355aaa3879c7c217566ad4bd7ca","priority":0}],"documents":[{"path":"README.md","size":4107,"blob_sha":"85875a33cf456355aaa3879c7c217566ad4bd7ca","priority":0,"status":200,"text":"# anaGo\n***anaGo*** is a Keras implementation of sequence labeling.\n\nanaGo can perform Named Entity Recognition (NER), Part-of-Speech tagging (POS tagging), semantic role labeling (SRL) and so on for **many languages**. \nFor example, the following picture shows **Named Entity Recognition in English**:\n<img src=\"https://github.com/Hironsan/anago/blob/docs/docs/images/example.en2.png?raw=true\">\n\nThe following picture shows **Named Entity Recognition in Japanese**:\n<img src=\"https://github.com/Hironsan/anago/blob/docs/docs/images/example.ja2.png?raw=true\">\n\nSimilarly, **you can solve your task (NER, POS,...) for your language.**\nYou don't have to define features.\nYou have only to prepare input and output data. :)\n\n## anaGo Support Features\nanaGo supports following features:\n* training the model without any features.\n* defining the custom model.\n* downloading pre-trained models.\n\n\n## Install\nTo install anaGo, simply run:\n\n```\n$ pip install anago\n```\n\nor install from the repository:\n\n```\n$ git clone https://github.com/Hironsan/anago.git\n$ cd anago\n$ pip install -r requirements.txt\n```\n\n## Data and Word Vectors\nTraining data takes a tsv format.\nThe following text is an example of training data:\n\n```\nEU\tB-ORG\nrejects\tO\nGerman\tB-MISC\ncall\tO\nto\tO\nboycott\tO\nBritish\tB-MISC\nlamb\tO\n.\tO\n\nPeter\tB-PER\nBlackburn\tI-PER\n```\n\nanaGo supports pre-trained word embeddings like [GloVe vectors](https://nlp.stanford.edu/projects/glove/).\n\n## Get Started\n### Import\nFirst, import the necessary modules:\n```python\nfrom anago.utils import load_data_and_labels\nfrom anago.preprocess import StaticPreprocessor\n```\n\n### Loading data\nAfter importing the modules, load [training, validation and test dataset](https://github.com/Hironsan/anago/blob/master/data/conll2003/en/ner/):\n```python\nX, y = load_data_and_labels('train.txt')\np = StaticPreprocessor(X, y)\nX, y = p.fit_transform(X, y)\n```\n\nNow we are ready for training :)\n\n\n### Training a model\nLet's train a model. To train a model, call `train` method:\n```python\nfrom anago.models import BiLSTMCRF\n\nmodel = BiLSTMCRF()\nmodel.fit(X, y)\n```\n\nIf training is progressing normally, progress bar would be displayed:\n\n```commandline\n...\nEpoch 3/15\n702/703 [============================>.] - ETA: 0s - loss: 60.0129 - f1: 89.70\n703/703 [==============================] - 319s - loss: 59.9278   \nEpoch 4/15\n702/703 [============================>.] - ETA: 0s - loss: 59.9268 - f1: 90.03\n703/703 [==============================] - 324s - loss: 59.8417   \nEpoch 5/15\n702/703 [============================>.] - ETA: 0s - loss: 58.9831 - f1: 90.67\n703/703 [==============================] - 297s - loss: 58.8993   \n...\n```\n\n\n### Evaluating a model\nTo evaluate the trained model, call `score` method:\n\n```python\nmodel.score(x_test, y_test)\n```\n\nAfter evaluation, F1 value is output:\n```commandline\n- f1: 90.67\n```\n\n### Tagging a sentence\nLet's try tagging a sentence, \"President Obama is speaking at the White House.\"\nTo tag a sentence, call `analyze` method:\n\n```python\n>>> words = 'President Obama is speaking at the White House.'.split()\n>>> tagger.analyze(words)\n{\n    \"words\": [\n        \"President\",\n        \"Obama\",\n        \"is\",\n        \"speaking\",\n        \"at\",\n        \"the\",\n        \"White\",\n        \"House.\"\n    ],\n    \"entities\": [\n        {\n            \"beginOffset\": 1,\n            \"endOffset\": 2,\n            \"score\": 1,\n            \"text\": \"Obama\",\n            \"type\": \"PER\"\n        },\n        {\n            \"beginOffset\": 6,\n            \"endOffset\": 8,\n            \"score\": 1,\n            \"text\": \"White House.\",\n            \"type\": \"ORG\"\n        }\n    ]\n}\n```\n\n### Downloading pre-trained models\nTo download a pre-trained model, call `download` function:\n```python\nfrom anago.utils import download\n\ndir_path = 'models'\nurl = 'https://storage.googleapis.com/chakki/datasets/public/models.zip'\ndownload(url, dir_path)\nmodel = anago.BiLSTMCRF.load(dir_path)\n```\n\n## Reference\nThis library uses bidirectional LSTM + CRF model based on\n[Neural Architectures for Named Entity Recognition](https://arxiv.org/abs/1603.01360)\nby Lample, Guillaume, et al., NAACL 2016.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4736:3A3DD:177FC9:5D9CB0:6AB929CB"},"text_sha256":"5d1e2a2b3b447c37651bc7375e1320d1690e2b517eb53c59dfec27ac4acddd8a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2855","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17CD10B:1BEEB6E:6AB929CC"},"commit":{"sha":"0ffb4004427c0991b6d023bfa62b37795f608a3d","url":"https://github.com/Hironsan/anago/commit/0ffb4004427c0991b6d023bfa62b37795f608a3d","date":"2021-04-01T12:34:50Z","author_date":"2021-04-01T12:34:50Z","committer_date":"2021-04-01T12:34:50Z","tree_sha":"bdc235faaf74e3f6788a541a71eb29aeedd93622","message_first_line":"Merge pull request #122 from Hironsan/dependabot/pip/urllib3-1.24.2"},"tree_request_status":200,"tree_rate":{"github_remaining":"2854","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:17E218B:1C03217:6AB929CC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4921,"blob_sha":"6c4664c4086b47fab91e24f0b5d841d98cc190bd","priority":0}],"documents":[{"path":"README.md","size":4921,"blob_sha":"6c4664c4086b47fab91e24f0b5d841d98cc190bd","priority":0,"status":200,"text":"# anaGo\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d746380077844b50b1cb95db1b631d18)](https://app.codacy.com/app/Hironsan/anago?utm_source=github.com&utm_medium=referral&utm_content=Hironsan/anago&utm_campaign=Badge_Grade_Dashboard)\n\n**anaGo** is a Python library for sequence labeling(NER, PoS Tagging,...), implemented in Keras.\n\nanaGo can solve sequence labeling tasks such as named entity recognition (NER), part-of-speech tagging (POS tagging), semantic role labeling (SRL) and so on. Unlike traditional sequence labeling solver, anaGo don't need to define any language dependent features. Thus, we can easily use anaGo for any languages.\n\nAs an example of anaGo, the following image shows named entity recognition in English:\n\n[anaGo Demo](https://anago.herokuapp.com/)\n\n![English NER](./docs/images/anago.gif)\n\n<!--\n![English NER](https://github.com/Hironsan/anago/blob/docs/docs/images/example.en2.png?raw=true)\n\n![Japanese NER](https://github.com/Hironsan/anago/blob/docs/docs/images/example.ja2.png?raw=true)\n-->\n\n## Get Started\n\nIn anaGo, the simplest type of model is the `Sequence` model. Sequence model includes essential methods like `fit`, `score`, `analyze` and `save`/`load`. For more complex features, you should use the anaGo modules such as `models`, `preprocessing` and so on.\n\nHere is the data loader:\n\n```python\n>>> from anago.utils import load_data_and_labels\n\n>>> x_train, y_train = load_data_and_labels('train.txt')\n>>> x_test, y_test = load_data_and_labels('test.txt')\n>>> x_train[0]\n['EU', 'rejects', 'German', 'call', 'to', 'boycott', 'British', 'lamb', '.']\n>>> y_train[0]\n['B-ORG', 'O', 'B-MISC', 'O', 'O', 'O', 'B-MISC', 'O', 'O']\n```\n\nYou can now iterate on your training data in batches:\n\n```python\n>>> import anago\n\n>>> model = anago.Sequence()\n>>> model.fit(x_train, y_train, epochs=15)\nEpoch 1/15\n541/541 [==============================] - 166s 307ms/step - loss: 12.9774\n...\n```\n\nEvaluate your performance in one line:\n\n```python\n>>> model.score(x_test, y_test)\n0.802  # f1-micro score\n# For more performance, you have to use pre-trained word embeddings.\n# For now, anaGo's best score is 90.94 f1-micro score.\n```\n\nOr tagging text on new data:\n\n```python\n>>> text = 'President Obama is speaking at the White House.'\n>>> model.analyze(text)\n{\n    \"words\": [\n        \"President\",\n        \"Obama\",\n        \"is\",\n        \"speaking\",\n        \"at\",\n        \"the\",\n        \"White\",\n        \"House.\"\n    ],\n    \"entities\": [\n        {\n            \"beginOffset\": 1,\n            \"endOffset\": 2,\n            \"score\": 1,\n            \"text\": \"Obama\",\n            \"type\": \"PER\"\n        },\n        {\n            \"beginOffset\": 6,\n            \"endOffset\": 8,\n            \"score\": 1,\n            \"text\": \"White House.\",\n            \"type\": \"LOC\"\n        }\n    ]\n}\n```\n\nTo download a pre-trained model, call `download` function:\n\n```python\n>>> from anago.utils import download\n\n>>> url = 'https://s3-ap-northeast-1.amazonaws.com/dev.tech-sketch.jp/chakki/public/conll2003_en.zip'\n>>> weights, params, preprocessor = download(url)\n>>> model = anago.Sequence.load(weights, params, preprocessor)\n>>> model.score(x_test, y_test)\n0.909446369856927\n```\n\nIf you want to use ELMo for better performance(f1: 92.22), you can use [ELModel](https://github.com/Hironsan/anago/blob/master/anago/models.py#L125) and [ELMoTransformer](https://github.com/Hironsan/anago/blob/master/anago/preprocessing.py#L197):\n\n```python\n# Transforming datasets.\np = ELMoTransformer()\np.fit(x_train, y_train)\n\n# Building a model.\nmodel = ELModel(...)\nmodel, loss = model.build()\nmodel.compile(loss=loss, optimizer='adam')\n\n# Training the model.\ntrainer = Trainer(model, preprocessor=p)\ntrainer.train(x_train, y_train, x_test, y_test)\n```\n\nFor futher details, see [anago/examples/elmo_example.py](https://github.com/Hironsan/anago/blob/master/examples/elmo_example.py).\n\n## Feature Support\n\nanaGo supports following features:\n\n* Model Training\n* Model Evaluation\n* Tagging Text\n* Custom Model Support\n* Downloading pre-trained model\n* GPU Support\n* Character feature\n* CRF Support\n* Custom Callback Support\n* :collision:(new) ELMo\n\nanaGo officially supports Python 3.4–3.6.\n\n## Installation\n\nTo install anaGo, simply use `pip`:\n\n```bash\n$ pip install anago\n```\n\nor install from the repository:\n\n```bash\n$ git clone https://github.com/Hironsan/anago.git\n$ cd anago\n$ python setup.py install\n```\n\n## Documentation\n\n(coming soon)\n\n<!--\nanaGo supports pre-trained word embeddings like [GloVe vectors](https://nlp.stanford.edu/projects/glove/).\n-->\n\n## Reference\n\nThis library is based on the following papers:\n\n* Lample, Guillaume, et al. \"[Neural architectures for named entity recognition.](https://arxiv.org/abs/1603.01360)\" arXiv preprint arXiv:1603.01360 (2016).\n* Peters, Matthew E., et al. \"[Deep contextualized word representations.](https://arxiv.org/abs/1802.05365)\" arXiv preprint arXiv:1802.05365 (2018).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5556:3B6DE:175334:5D6F85:6AB929CC"},"text_sha256":"9fcc183a7977ecb6bf5c0a17420f23206995f76f39ab15e902d7fcf255bce100"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jrzaurin/pytorch-widedeep","input_row":{"repository":"jrzaurin/pytorch-widedeep","url":"https://github.com/jrzaurin/pytorch-widedeep","name":"pytorch-widedeep","owner":"jrzaurin","description":"A flexible package for multimodal-deep-learning to combine tabular data with text and images using Wide and Deep models in Pytorch","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1415,"issues":171,"created_at":"2017-10-21T08:11:44Z","updated_at":"2026-09-18T15:39:38Z","first_commit_at":"2017-10-21T08:11:44Z","last_commit_at":"2026-04-30T14:04:48Z","activity_months":102.27,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:35:57.301Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jrzaurin/pytorch-widedeep","visibility":"public","created_at":"2017-10-21T08:11:44Z","updated_at":"2026-09-18T15:39:38Z","private":false,"fork":false,"archived":false,"stargazers_count":1415,"open_issues_count":0,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2853","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:17F6776:1C1822D:6AB929CD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2852","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D5:1DB627:18629E3:1C843A7:6AB929CD"},"commit":{"sha":"ebc1d9ca8e84be88ac7e6aad197292fd1a475dde","url":"https://github.com/jrzaurin/pytorch-widedeep/commit/ebc1d9ca8e84be88ac7e6aad197292fd1a475dde","date":"2017-11-21T15:53:03Z","author_date":"2017-11-21T15:53:03Z","committer_date":"2017-11-21T15:53:03Z","tree_sha":"fdbc3b5a2082603255b694fbae0da48c91e1f74e","message_first_line":"adapt for cases with no crossed_columns"},"tree_request_status":200,"tree_rate":{"github_remaining":"2851","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F8:2BC4E5:1815111:1C364E7:6AB929CE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5935,"blob_sha":"d853f907927748a228e8365a0b9949268a7ecf9c","priority":0}],"documents":[{"path":"README.md","size":5935,"blob_sha":"d853f907927748a228e8365a0b9949268a7ecf9c","priority":0,"status":200,"text":"# Wide-and-Deep-PyTorch\nPyTorch implementation of Tensorflow's Wide and Deep Algorithm\n\nThis is a PyTorch implementation of Tensorflow's Wide and Deep Algorithm. Details of the algorithm can be found [here](https://www.tensorflow.org/tutorials/wide_and_deep) and the very nice research paper can be found [here](https://arxiv.org/abs/1606.07792). A `Keras` (quick and relatively dirty) implementation of the algorithm can be found [here](https://github.com/jrzaurin/Wide-and-Deep-Keras). \n\n## Requirements:\n\nThe algorithm was built using `python 2.7.13` and the required packages are:\n```\npandas\nnumpy\nscipy\nsklearn\npytorch\n```\n\n## How to use it.\n\nI have included 3 demos to explain how the data needs to be prepared, how the algorithm is built (the wide and deep parts separately) and how to use it. If you are familiar with the algorithm and you just want to give it a go, you can directly go to demo3 or have a look to main.py (which can be run as `python main.py` and has a few more details). Using it is as simple as this: \n\n### 1. Prepare the data\nThe wide-part and deep-part need to be specified as follows:\n```    \nimport numpy as np\nimport pandas as pd\n\n# Read the data\nDF = pd.read_csv('data/adult_data.csv')\n\n# target for logistic regression\nDF['income_label'] = (DF[\"income_bracket\"].apply(lambda x: \">50K\" in x)).astype(int)\n\n# Experiment set up\n# WIDE PART\nwide_cols = ['age','hours_per_week','education', 'relationship','workclass',\n             'occupation','native_country','gender']\ncrossed_cols = (['education', 'occupation'], ['native_country', 'occupation'])\n\n# DEEP PART\n# columns that will be passed as embeddings and their corresponding number of embeddings (optional, see demo3). \nembeddings_cols = [('education',10), ('relationship',8), ('workclass',10),\n                    ('occupation',10),('native_country',10)]\ncontinuous_cols = [\"age\",\"hours_per_week\"]\n\n# TARGET AND METHOD\ntarget = 'income_label'\nmethod = 'logistic'\n\n# PREPARE DATA\nfrom wide_deep.data_utils import prepare_data\nwd_dataset = prepare_data(DF, wide_cols,crossed_cols,embeddings_cols,continuous_cols,target)\n```\n### 2. Build the model\nThe model is built with the `WideDeep` class. To run on a GPU simply do `model = model.cuda()`.\n``` \n# Network set up\nwide_dim = wd_dataset['train_dataset'].wide.shape[1]\nn_unique = len(np.unique(wd_dataset['train_dataset'].labels))\ndeep_column_idx = wd_dataset['deep_column_idx']\nembeddings_input= wd_dataset['embeddings_input']\nencoding_dict   = wd_dataset['encoding_dict']\nhidden_layers = [100,50]\ndropout = [0.5,0.2]\nn_class=1\n\n# Build the model\nimport torch\nfrom wide_deep.torch_model import WideDeep\n\nmodel = WideDeep(wide_dim,embeddings_input,continuous_cols,deep_column_idx,hidden_layers,dropout,encoding_dict,n_class)\nmodel.compile(method=method)\nif torch.cuda.is_available():\n    model = model.cuda()\n```\n\n### 3. Fit and predict\n```    \n# Fit and predict as with your usual sklearn model\ntrain_dataset = wd_dataset['train_dataset']\nmodel.fit(dataset=train_dataset, n_epochs=10, batch_size=64)\ntest_dataset  = wd_dataset['test_dataset']\npred = model.predict(test_dataset)\n\n# save\ntorch.save(model.state_dict(), 'model/logistic.pkl')\n```\n\nAnd that's it. \n\n## COMMENTS\n\nHere I have illustrated how to use the model for binary classification. In `demo3` you can find how to use it for linear regression and multiclass classification. In the [research paper](https://arxiv.org/pdf/1606.07792.pdf) they show how they used it in the context of recommendation algorithms. \n\nIn my experience, this algorithm shines where the data is complex (multiple categorical features with many levels) and rich (lots of observations). Normally, categorical features are preprocessed before passing them to a `sklearn` model using `LabeEncoder` (or `DictVectorizer`) or `OneHotEncoder`. `LabeEncoder` can turn `['sun', 'rain', wind', ...]` into `[1,2,3,..]` but the imposed ordinality means that the average between `sun` and `wind` will be `rain`. Some algorithms (e.g. decision trees) still work well with these label-encoded features, but it might be a problem. One option is to use `OneHotEncoder`, which results in binary features \"living\" in an orthogonal vector space. However, if you have many levels per feature the number of resulting one-hot encoded features might be too large. Instead, another option would be to use `Wide and Deep`, represent some categorical features with embeddings, and let the the model learn their representation through the deep layers.\n\nA \"real-world\" example would be a recommendation algorithm that I recently implemented which relied mostly on a multiclass classification using `XGBoost`. `XGBoost` was challenged with a series of matrix factorization algorithms (`pyFM, lightFM, fastFM` in python or `MF and ALS` in pySpark) and always performed better. The only algorithm that obtained better metrics than XGBoost (meaning better `Mean Average Precision` on the ranked recommendations) was `Wide and Deep`.\n\nFinally, a very interesting use of this algorithm consists of passing user and item features through the wide part and the user and item emebeddings through the deep part. Although **mathematically different**, this set up is conceptually similar to the Rendle's [Factorization Machines](https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf) in the sense that we can infer interest/score/ratings for unseen user-item interactions from the sparse set of seen interactions, using also user and item features. As a byproduct, we will also get the user and item embeddings. Essentially the two algorithms are trying to learn the embeddings based on existing user-item interactions, although the relations learned through the dense layers can be more \"expressive\" than those using Matrix Factorization. \n\n## TO DO:\n\n1. Add some error message/handling.\n2. Perhaps adding the Wide and Deep functionalities separately\n3. Add a `keras_model.py` module to `wide_deep`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8EFE:3BCC6:17B9D1:5DD705:6AB929CE"},"text_sha256":"ea1d435ff463c80b0e60e5bacb2aeaf390e4eb03469477f4a0295708961ce6ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2850","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:D79B2D:FD5DE0:6AB929CE"},"commit":{"sha":"5a47e9375ec703c5caf7ade3e286d408924bf57d","url":"https://github.com/jrzaurin/pytorch-widedeep/commit/5a47e9375ec703c5caf7ade3e286d408924bf57d","date":"2026-04-30T14:04:48Z","author_date":"2026-04-30T14:04:48Z","committer_date":"2026-04-30T14:04:48Z","tree_sha":"a1311e48f2946b836dfcc1acc7bbee5524f8280f","message_first_line":"Merge pull request #254 from jrzaurin/feat/more-recs"},"tree_request_status":200,"tree_rate":{"github_remaining":"2849","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:17767BB:1B96326:6AB929CF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":35789,"blob_sha":"3e5b6c402772916824d15231156331c0007a1045","priority":0}],"documents":[{"path":"README.md","size":35789,"blob_sha":"3e5b6c402772916824d15231156331c0007a1045","priority":0,"status":200,"text":"\n<p align=\"center\">\n  <img width=\"300\" src=\"mkdocs/sources/docs/figures/widedeep_logo.png\">\n<\/p>\n\n[![PyPI version](https://badge.fury.io/py/pytorch-widedeep.svg)](https://pypi.org/project/pytorch-widedeep/)\n[![Python 3.9 3.10 3.11 3.12](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/pytorch-widedeep/)\n[![Build Status](https://github.com/jrzaurin/pytorch-widedeep/actions/workflows/build.yml/badge.svg)](https://github.com/jrzaurin/pytorch-widedeep/actions)\n[![Documentation Status](https://readthedocs.org/projects/pytorch-widedeep/badge/?version=latest)](https://pytorch-widedeep.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/jrzaurin/pytorch-widedeep/branch/master/graph/badge.svg)](https://codecov.io/gh/jrzaurin/pytorch-widedeep)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/jrzaurin/pytorch-widedeep/graphs/commit-activity)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jrzaurin/pytorch-widedeep/issues)\n[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack)](https://join.slack.com/t/pytorch-widedeep/shared_invite/zt-soss7stf-iXpVuLeKZz8lGTnxxtHtTw)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.05027/status.svg)](https://doi.org/10.21105/joss.05027)\n\n# pytorch-widedeep\n\nA flexible package for multimodal-deep-learning to combine tabular data with\ntext and images using Wide and Deep models in Pytorch\n\n**Documentation:** [https://pytorch-widedeep.readthedocs.io](https://pytorch-widedeep.readthedocs.io/en/latest/index.html)\n\n**Companion posts and tutorials:** [infinitoml](https://jrzaurin.github.io/infinitoml/)\n\n**Experiments and comparison with `LightGBM`**: [TabularDL vs LightGBM](https://github.com/jrzaurin/tabulardl-benchmark)\n\n**Slack**: if you want to contribute or just want to chat with us, join [slack](https://join.slack.com/t/pytorch-widedeep/shared_invite/zt-soss7stf-iXpVuLeKZz8lGTnxxtHtTw)\n\nThe content of this document is organized as follows:\n\n- [pytorch-widedeep](#pytorch-widedeep)\n  - [Introduction](#introduction)\n  - [Architectures](#architectures)\n  - [The ``deeptabular`` component](#the-deeptabular-component)\n  - [The ``rec`` module](#the-rec-module)\n  - [Text and Images](#text-and-images)\n  - [Installation](#installation)\n    - [Developer Install](#developer-install)\n  - [Quick start](#quick-start)\n  - [Testing](#testing)\n  - [How to Contribute](#how-to-contribute)\n  - [Acknowledgments](#acknowledgments)\n  - [License](#license)\n  - [Cite](#cite)\n    - [BibTex](#bibtex)\n    - [APA](#apa)\n\n### Introduction\n\n``pytorch-widedeep`` is based on Google's [Wide and Deep Algorithm](https://arxiv.org/abs/1606.07792),\nadjusted for multi-modal datasets.\n\nIn general terms, `pytorch-widedeep` is a package to use deep learning with\ntabular data. In particular, is intended to facilitate the combination of\ntext and images with corresponding tabular data using wide and deep models.\nWith that in mind there are a number of architectures that can be implemented\nwith the library. The main components of those architectures are shown in the\nFigure below:\n\n<p align=\"center\">\n  <img width=\"750\" src=\"mkdocs/sources/docs/figures/widedeep_arch_new.png\">\n<\/p>\n\nIn math terms, and following the notation in the\n[paper](https://arxiv.org/abs/1606.07792), the expression for the architecture\nwithout a ``deephead`` component can be formulated as:\n\n<p align=\"center\">\n  <img width=\"500\" src=\"mkdocs/sources/docs/figures/architecture_1_math.png\">\n<\/p>\n\nWhere &sigma; is the sigmoid function, *'W'* are the weight matrices applied to the wide model and to the final\nactivations of the deep models, *'a'* are these final activations,\n&phi;(x) are the cross product transformations of the original features *'x'*, and\n, and *'b'* is the bias term.\nIn case you are wondering what are *\"cross product transformations\"*, here is\na quote taken directly from the paper: *\"For binary features, a cross-product\ntransformation (e.g., “AND(gender=female, language=en)”) is 1 if and only if\nthe constituent features (“gender=female” and “language=en”) are all 1, and 0\notherwise\".*\n\nIt is perfectly possible to use custom models (and not necessarily those in\nthe library) as long as the the custom models have an property called\n``output_dim`` with the size of the last layer of activations, so that\n``WideDeep`` can be constructed. Examples on how to use custom components can\nbe found in the Examples folder and the section below.\n\n### Architectures\n\nThe `pytorch-widedeep` library offers a number of different architectures. In\nthis section we will show some of them in their simplest form (i.e. with\ndefault param values in most cases) with their corresponding code snippets.\nNote that **all** the snippets below shoud run locally. For a more detailed\nexplanation of the different components and their parameters, please refer to\nthe documentation.\n\nFor the examples below we will be using a toy dataset generated as follows:\n\n```python\nimport os\nimport random\n\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image\nfrom faker import Faker\n\n\ndef create_and_save_random_image(image_number, size=(32, 32)):\n\n    if not os.path.exists(\"images\"):\n        os.makedirs(\"images\")\n\n    array = np.random.randint(0, 256, (size[0], size[1], 3), dtype=np.uint8)\n\n    image = Image.fromarray(array)\n\n    image_name = f\"image_{image_number}.png\"\n    image.save(os.path.join(\"images\", image_name))\n\n    return image_name\n\n\nfake = Faker()\n\ncities = [\"New York\", \"Los Angeles\", \"Chicago\", \"Houston\"]\nnames = [\"Alice\", \"Bob\", \"Charlie\", \"David\", \"Eva\"]\n\ndata = {\n    \"city\": [random.choice(cities) for _ in range(100)],\n    \"name\": [random.choice(names) for _ in range(100)],\n    \"age\": [random.uniform(18, 70) for _ in range(100)],\n    \"height\": [random.uniform(150, 200) for _ in range(100)],\n    \"sentence\": [fake.sentence() for _ in range(100)],\n    \"other_sentence\": [fake.sentence() for _ in range(100)],\n    \"image_name\": [create_and_save_random_image(i) for i in range(100)],\n    \"target\": [random.choice([0, 1]) for _ in range(100)],\n}\n\ndf = pd.DataFrame(data)\n```\n\nThis will create a 100 rows dataframe and a dir in your local folder, called\n`images` with 100 random images (or images with just noise).\n\nPerhaps the simplest architecture would be just one component, `wide`,\n`deeptabular`, `deeptext` or `deepimage` on their own, which is also\npossible, but let's start the examples with a standard Wide and Deep\narchitecture. From there, how to build a model comprised only of one\ncomponent will be straightforward.\n\nNote that the examples shown below would be almost identical using any of the\nmodels available in the library. For example, `TabMlp` can be replaced by\n`TabResnet`, `TabNet`, `TabTransformer`, etc. Similarly, `BasicRNN` can be\nreplaced by `AttentiveRNN`, `StackedAttentiveRNN`, or `HFModel` with\ntheir corresponding parameters and preprocessor in the case of the Hugging\nFace models.\n\n**1. Wide and Tabular component (aka deeptabular)**\n\n<p align=\"center\">\n  <img width=\"400\" src=\"mkdocs/sources/docs/figures/arch_1.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, WidePreprocessor\nfrom pytorch_widedeep.models import Wide, TabMlp, WideDeep\nfrom pytorch_widedeep.training import Trainer\n\n# Wide\nwide_cols = [\"city\"]\ncrossed_cols = [(\"city\", \"name\")]\nwide_preprocessor = WidePreprocessor(wide_cols=wide_cols, crossed_cols=crossed_cols)\nX_wide = wide_preprocessor.fit_transform(df)\nwide = Wide(input_dim=np.unique(X_wide).shape[0])\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# WideDeep\nmodel = WideDeep(wide=wide, deeptabular=tab_mlp)\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_wide=X_wide,\n    X_tab=X_tab,\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**2. Tabular and Text data**\n\n<p align=\"center\">\n  <img width=\"400\" src=\"mkdocs/sources/docs/figures/arch_2.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep\nfrom pytorch_widedeep.training import Trainer\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# Text\ntext_preprocessor = TextPreprocessor(\n    text_col=\"sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text = text_preprocessor.fit_transform(df)\nrnn = BasicRNN(\n    vocab_size=len(text_preprocessor.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\n\n# WideDeep\nmodel = WideDeep(deeptabular=tab_mlp, deeptext=rnn)\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=X_tab,\n    X_text=X_text,\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**3. Tabular and text with a FC head on top via the `head_hidden_dims` param\n  in `WideDeep`**\n\n<p align=\"center\">\n  <img width=\"400\" src=\"mkdocs/sources/docs/figures/arch_3.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep\nfrom pytorch_widedeep.training import Trainer\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# Text\ntext_preprocessor = TextPreprocessor(\n    text_col=\"sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text = text_preprocessor.fit_transform(df)\nrnn = BasicRNN(\n    vocab_size=len(text_preprocessor.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\n\n# WideDeep\nmodel = WideDeep(deeptabular=tab_mlp, deeptext=rnn, head_hidden_dims=[32, 16])\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=X_tab,\n    X_text=X_text,\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**4. Tabular and multiple text columns that are passed directly to\n  `WideDeep`**\n\n<p align=\"center\">\n  <img width=\"500\" src=\"mkdocs/sources/docs/figures/arch_4.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep\nfrom pytorch_widedeep.training import Trainer\n\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# Text\ntext_preprocessor_1 = TextPreprocessor(\n    text_col=\"sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_1 = text_preprocessor_1.fit_transform(df)\ntext_preprocessor_2 = TextPreprocessor(\n    text_col=\"other_sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_2 = text_preprocessor_2.fit_transform(df)\nrnn_1 = BasicRNN(\n    vocab_size=len(text_preprocessor_1.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\nrnn_2 = BasicRNN(\n    vocab_size=len(text_preprocessor_2.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\n\n# WideDeep\nmodel = WideDeep(deeptabular=tab_mlp, deeptext=[rnn_1, rnn_2])\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=X_tab,\n    X_text=[X_text_1, X_text_2],\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**5. Tabular data and multiple text columns that are fused via a the library's\n  `ModelFuser` class**\n\n<p align=\"center\">\n    <img width=\"500\" src=\"mkdocs/sources/docs/figures/arch_5.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep, ModelFuser\nfrom pytorch_widedeep import Trainer\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# Text\ntext_preprocessor_1 = TextPreprocessor(\n    text_col=\"sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_1 = text_preprocessor_1.fit_transform(df)\ntext_preprocessor_2 = TextPreprocessor(\n    text_col=\"other_sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_2 = text_preprocessor_2.fit_transform(df)\n\nrnn_1 = BasicRNN(\n    vocab_size=len(text_preprocessor_1.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\nrnn_2 = BasicRNN(\n    vocab_size=len(text_preprocessor_2.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\n\nmodels_fuser = ModelFuser(models=[rnn_1, rnn_2], fusion_method=\"mult\")\n\n# WideDeep\nmodel = WideDeep(deeptabular=tab_mlp, deeptext=models_fuser)\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=X_tab,\n    X_text=[X_text_1, X_text_2],\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**6. Tabular and multiple text columns, with an image column. The text columns\n  are fused via the library's `ModelFuser` and then all fused via the\n  deephead paramenter in `WideDeep` which is a custom `ModelFuser` coded by\n  the user**\n\nThis is perhaps the less elegant solution as it involves a custom component by\nthe user and slicing the 'incoming' tensor. In the future, we will include a\n`TextAndImageModelFuser` to make this process more straightforward. Still, is not\nreally complicated and it is a good example of how to use custom components in\n`pytorch-widedeep`.\n\nNote that the only requirement for the custom component is that it has a\nproperty called `output_dim` that returns the size of the last layer of\nactivations. In other words, it does not need to inherit from\n`BaseWDModelComponent`. This base class simply checks the existence of such\nproperty and avoids some typing errors internally.\n\n<p align=\"center\">\n    <img width=\"600\" src=\"mkdocs/sources/docs/figures/arch_6.png\">\n<\/p>\n\n```python\nimport torch\n\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor, ImagePreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep, ModelFuser, Vision\nfrom pytorch_widedeep.models._base_wd_model_component import BaseWDModelComponent\nfrom pytorch_widedeep import Trainer\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[16, 8],\n)\n\n# Text\ntext_preprocessor_1 = TextPreprocessor(\n    text_col=\"sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_1 = text_preprocessor_1.fit_transform(df)\ntext_preprocessor_2 = TextPreprocessor(\n    text_col=\"other_sentence\", maxlen=20, max_vocab=100, n_cpus=1\n)\nX_text_2 = text_preprocessor_2.fit_transform(df)\nrnn_1 = BasicRNN(\n    vocab_size=len(text_preprocessor_1.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\nrnn_2 = BasicRNN(\n    vocab_size=len(text_preprocessor_2.vocab.itos),\n    embed_dim=16,\n    hidden_dim=8,\n    n_layers=1,\n)\nmodels_fuser = ModelFuser(\n    models=[rnn_1, rnn_2],\n    fusion_method=\"mult\",\n)\n\n# Image\nimage_preprocessor = ImagePreprocessor(img_col=\"image_name\", img_path=\"images\")\nX_img = image_preprocessor.fit_transform(df)\nvision = Vision(pretrained_model_setup=\"resnet18\", head_hidden_dims=[16, 8])\n\n# deephead (custom model fuser)\nclass MyModelFuser(BaseWDModelComponent):\n    \"\"\"\n    Simply a Linear + Relu sequence on top of the text + images followed by a\n    Linear -> Relu -> Linear for the concatenation of tabular slice of the\n    tensor and the output of the text and image sequential model\n    \"\"\"\n    def __init__(\n        self,\n        tab_incoming_dim: int,\n        text_incoming_dim: int,\n        image_incoming_dim: int,\n        output_units: int,\n    ):\n\n        super(MyModelFuser, self).__init__()\n\n        self.tab_incoming_dim = tab_incoming_dim\n        self.text_incoming_dim = text_incoming_dim\n        self.image_incoming_dim = image_incoming_dim\n        self.output_units = output_units\n        self.text_and_image_fuser = torch.nn.Sequential(\n            torch.nn.Linear(text_incoming_dim + image_incoming_dim, output_units),\n            torch.nn.ReLU(),\n        )\n        self.out = torch.nn.Sequential(\n            torch.nn.Linear(output_units + tab_incoming_dim, output_units * 4),\n            torch.nn.ReLU(),\n            torch.nn.Linear(output_units * 4, output_units),\n        )\n\n    def forward(self, X: torch.Tensor) -> torch.Tensor:\n        tab_slice = slice(0, self.tab_incoming_dim)\n        text_slice = slice(\n            self.tab_incoming_dim, self.tab_incoming_dim + self.text_incoming_dim\n        )\n        image_slice = slice(\n            self.tab_incoming_dim + self.text_incoming_dim,\n            self.tab_incoming_dim + self.text_incoming_dim + self.image_incoming_dim,\n        )\n        X_tab = X[:, tab_slice]\n        X_text = X[:, text_slice]\n        X_img = X[:, image_slice]\n        X_text_and_image = self.text_and_image_fuser(torch.cat([X_text, X_img], dim=1))\n        return self.out(torch.cat([X_tab, X_text_and_image], dim=1))\n\n    @property\n    def output_dim(self):\n        return self.output_units\n\n\ndeephead = MyModelFuser(\n    tab_incoming_dim=tab_mlp.output_dim,\n    text_incoming_dim=models_fuser.output_dim,\n    image_incoming_dim=vision.output_dim,\n    output_units=8,\n)\n\n# WideDeep\nmodel = WideDeep(\n    deeptabular=tab_mlp,\n    deeptext=models_fuser,\n    deepimage=vision,\n    deephead=deephead,\n)\n\n# Train\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=X_tab,\n    X_text=[X_text_1, X_text_2],\n    X_img=X_img,\n    target=df[\"target\"].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**7. A two-tower model**\n\nThis is a popular model in the context of recommendation systems. Let's say we\nhave a tabular dataset formed my triples (user features, item features,\ntarget). We can create a two-tower model where the user and item features are\npassed through two separate models and then \"fused\" via a dot product.\n\n<p align=\"center\">\n  <img width=\"350\" src=\"mkdocs/sources/docs/figures/arch_7.png\">\n<\/p>\n\n```python\nimport numpy as np\nimport pandas as pd\n\nfrom pytorch_widedeep import Trainer\nfrom pytorch_widedeep.preprocessing import TabPreprocessor\nfrom pytorch_widedeep.models import TabMlp, WideDeep, ModelFuser\n\n# Let's create the interaction dataset\n# user_features dataframe\nnp.random.seed(42)\nuser_ids = np.arange(1, 101)\nages = np.random.randint(18, 60, size=100)\ngenders = np.random.choice([\"male\", \"female\"], size=100)\nlocations = np.random.choice([\"city_a\", \"city_b\", \"city_c\", \"city_d\"], size=100)\nuser_features = pd.DataFrame(\n    {\"id\": user_ids, \"age\": ages, \"gender\": genders, \"location\": locations}\n)\n\n# item_features dataframe\nitem_ids = np.arange(1, 101)\nprices = np.random.uniform(10, 500, size=100).round(2)\ncolors = np.random.choice([\"red\", \"blue\", \"green\", \"black\"], size=100)\ncategories = np.random.choice([\"electronics\", \"clothing\", \"home\", \"toys\"], size=100)\n\nitem_features = pd.DataFrame(\n    {\"id\": item_ids, \"price\": prices, \"color\": colors, \"category\": categories}\n)\n\n# Interactions dataframe\ninteraction_user_ids = np.random.choice(user_ids, size=1000)\ninteraction_item_ids = np.random.choice(item_ids, size=1000)\npurchased = np.random.choice([0, 1], size=1000, p=[0.7, 0.3])\ninteractions = pd.DataFrame(\n    {\n        \"user_id\": interaction_user_ids,\n        \"item_id\": interaction_item_ids,\n        \"purchased\": purchased,\n    }\n)\nuser_item_purchased = interactions.merge(\n    user_features, left_on=\"user_id\", right_on=\"id\"\n).merge(item_features, left_on=\"item_id\", right_on=\"id\")\n\n# Users\ntab_preprocessor_user = TabPreprocessor(\n    cat_embed_cols=[\"gender\", \"location\"],\n    continuous_cols=[\"age\"],\n)\nX_user = tab_preprocessor_user.fit_transform(user_item_purchased)\ntab_mlp_user = TabMlp(\n    column_idx=tab_preprocessor_user.column_idx,\n    cat_embed_input=tab_preprocessor_user.cat_embed_input,\n    continuous_cols=[\"age\"],\n    mlp_hidden_dims=[16, 8],\n    mlp_dropout=[0.2, 0.2],\n)\n\n# Items\ntab_preprocessor_item = TabPreprocessor(\n    cat_embed_cols=[\"color\", \"category\"],\n    continuous_cols=[\"price\"],\n)\nX_item = tab_preprocessor_item.fit_transform(user_item_purchased)\ntab_mlp_item = TabMlp(\n    column_idx=tab_preprocessor_item.column_idx,\n    cat_embed_input=tab_preprocessor_item.cat_embed_input,\n    continuous_cols=[\"price\"],\n    mlp_hidden_dims=[16, 8],\n    mlp_dropout=[0.2, 0.2],\n)\n\ntwo_tower_model = ModelFuser([tab_mlp_user, tab_mlp_item], fusion_method=\"dot\")\n\nmodel = WideDeep(deeptabular=two_tower_model)\n\ntrainer = Trainer(model, objective=\"binary\")\n\ntrainer.fit(\n    X_tab=[X_user, X_item],\n    target=interactions.purchased.values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n**8. Tabular with a multi-target loss**\n\nThis one is \"a bonus\" to illustrate the use of multi-target losses, more than\nactually a different architecture.\n\n<p align=\"center\">\n  <img width=\"200\" src=\"mkdocs/sources/docs/figures/arch_8.png\">\n<\/p>\n\n```python\nfrom pytorch_widedeep.preprocessing import TabPreprocessor, TextPreprocessor, ImagePreprocessor\nfrom pytorch_widedeep.models import TabMlp, BasicRNN, WideDeep, ModelFuser, Vision\nfrom pytorch_widedeep.losses_multitarget import MultiTargetClassificationLoss\nfrom pytorch_widedeep.models._base_wd_model_component import BaseWDModelComponent\nfrom pytorch_widedeep import Trainer\n\n# let's add a second target to the dataframe\ndf[\"target2\"] = [random.choice([0, 1]) for _ in range(100)]\n\n# Tabular\ntab_preprocessor = TabPreprocessor(\n    embed_cols=[\"city\", \"name\"], continuous_cols=[\"age\", \"height\"]\n)\nX_tab = tab_preprocessor.fit_transform(df)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=tab_preprocessor.continuous_cols,\n    mlp_hidden_dims=[64, 32],\n)\n\n# 'pred_dim=2' because we have two binary targets. For other types of targets,\n#  please, see the documentation\nmodel = WideDeep(deeptabular=tab_mlp, pred_dim=2).\n\nloss = MultiTargetClassificationLoss(binary_config=[0, 1], reduction=\"mean\")\n\n# When a multi-target loss is used, 'custom_loss_function' must not be None.\n# See the docs\ntrainer = Trainer(model, objective=\"multitarget\", custom_loss_function=loss)\n\ntrainer.fit(\n    X_tab=X_tab,\n    target=df[[\"target\", \"target2\"]].values,\n    n_epochs=1,\n    batch_size=32,\n)\n```\n\n### The ``deeptabular`` component\n\nIt is important to emphasize again that **each individual component, `wide`,\n`deeptabular`, `deeptext` and `deepimage`, can be used independently** and in\nisolation. For example, one could use only `wide`, which is in simply a\nlinear model. In fact, one of the most interesting functionalities\nin``pytorch-widedeep`` would be the use of the ``deeptabular`` component on\nits own, i.e. what one might normally refer as Deep Learning for Tabular\nData. Currently, ``pytorch-widedeep`` offers the following different models\nfor that component:\n\n0. **Wide**: a simple linear model where the nonlinearities are captured via\ncross-product transformations, as explained before.\n1. **TabMlp**: a simple MLP that receives embeddings representing the\ncategorical features, concatenated with the continuous features, which can\nalso be embedded.\n2. **TabResnet**: similar to the previous model but the embeddings are\npassed through a series of ResNet blocks built with dense layers.\n3. **TabNet**: details on TabNet can be found in\n[TabNet: Attentive Interpretable Tabular Learning](https://arxiv.org/abs/1908.07442)\n\nTwo simpler attention based models that we call:\n\n1. **ContextAttentionMLP**: MLP with at attention mechanism \"on top\" that is based on\n    [Hierarchical Attention Networks for Document Classification](https://www.cs.cmu.edu/~./hovy/papers/16HLT-hierarchical-attention-networks.pd)\n2. **SelfAttentionMLP**: MLP with an attention mechanism that is a simplified\n    version of a transformer block that we refer as \"query-key self-attention\".\n\nThe ``Tabformer`` family, i.e. Transformers for Tabular data:\n\n1. **TabTransformer**: details on the TabTransformer can be found in\n[TabTransformer: Tabular Data Modeling Using Contextual Embeddings](https://arxiv.org/pdf/2012.06678.pdf).\n2. **SAINT**: Details on SAINT can be found in\n[SAINT: Improved Neural Networks for Tabular Data via Row Attention and Contrastive Pre-Training](https://arxiv.org/abs/2106.01342).\n3. **FT-Transformer**: details on the FT-Transformer can be found in\n[Revisiting Deep Learning Models for Tabular Data](https://arxiv.org/abs/2106.11959).\n4. **TabFastFormer**: adaptation of the FastFormer for tabular data. Details\non the Fasformer can be found in\n[FastFormers: Highly Efficient Transformer Models for Natural Language Understanding](https://arxiv.org/abs/2010.13382)\n5. **TabPerceiver**: adaptation of the Perceiver for tabular data. Details on\nthe Perceiver can be found in\n[Perceiver: General Perception with Iterative Attention](https://arxiv.org/abs/2103.03206)\n\nAnd probabilistic DL models for tabular data based on\n[Weight Uncertainty in Neural Networks](https://arxiv.org/abs/1505.05424):\n\n1. **BayesianWide**: Probabilistic adaptation of the `Wide` model.\n2. **BayesianTabMlp**: Probabilistic adaptation of the `TabMlp` model\n\nNote that while there are scientific publications for the TabTransformer,\nSAINT and FT-Transformer, the TabFasfFormer and TabPerceiver are our own\nadaptation of those algorithms for tabular data.\n\nIn addition, Self-Supervised pre-training can be used for all `deeptabular`\nmodels, with the exception of the `TabPerceiver`. Self-Supervised\npre-training can be used via two methods or routines which we refer as:\nencoder-decoder method and constrastive-denoising method. Please, see the\ndocumentation and the examples for details on this functionality, and all\nother options in the library.\n\n### The ``rec`` module\n\nThis module was introduced as an extension to the existing components in the\nlibrary, addressing questions and issues related to recommendation systems.\nWhile still under active development, it currently includes a select number\nof powerful recommendation models.\n\nIt's worth noting that this library already supported the implementation of\nvarious recommendation algorithms using existing components. For example,\nmodels like Wide and Deep, Two-Tower, or Neural Collaborative Filtering could\nbe constructed using the library's core functionalities.\n\nThe recommendation algorithms in the `rec` module are:\n\n1. [AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks](https://arxiv.org/abs/1810.11921)\n2. [DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](https://arxiv.org/abs/1703.04247)\n3. (Deep) Field Aware Factorization Machine (FFM): a Deep Learning version of the algorithm presented in [Field-aware Factorization Machines in a Real-world Online Advertising System](https://arxiv.org/abs/1701.04099)\n4. [xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems](https://arxiv.org/pdf/1803.05170)\n5. [Deep Interest Network for Click-Through Rate Prediction](https://arxiv.org/abs/1706.06978)\n6. [Deep and Cross Network for Ad Click Predictions](https://arxiv.org/abs/1708.05123)\n7. [DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems](https://arxiv.org/abs/2008.13535)\n8. [Towards Deeper, Lighter and Interpretable Click-through Rate Prediction](https://arxiv.org/abs/2311.04635)\n9. A basic Transformer-based model for recommendation where the problem is faced as a sequence.\n10. [RankMixer: Scaling Up Ranking Models via Token Mixing](https://arxiv.org/abs/2507.15551)\n\nSee the examples for details on how to use these models.\n\n### Text and Images\n\nFor the text component, `deeptext`, the library offers the following models:\n\n1. **BasicRNN**: a simple RNN 2. **AttentiveRNN**: a RNN with an attention\nmechanism based on the\n[Hierarchical Attention Networks for DocumentClassification](https://www.cs.cmu.edu/~./hovy/papers/16HLT-hierarchical-attention-networks.pd)\n2. **StackedAttentiveRNN**: a stack of AttentiveRNNs\n3. **HFModel**: a wrapper around Hugging Face Transfomer-based models. At the moment\nonly models from the families BERT, RoBERTa, DistilBERT, ALBERT and ELECTRA\nare supported. This is because this library is designed to address\nclassification and regression tasks and these are the most 'popular'\nencoder-only models, which have proved to be those that work best for these\ntasks. If there is demand for other models, they will be included in the\nfuture.\n\nFor the image component, `deepimage`, the library supports models from the\nfollowing families:\n'resnet', 'shufflenet', 'resnext', 'wide_resnet', 'regnet', 'densenet', 'mobilenetv3',\n 'mobilenetv2', 'mnasnet', 'efficientnet' and 'squeezenet'.  These are\n offered via `torchvision` and wrapped up in the `Vision` class.\n\n### Installation\n\nInstall using pip:\n\n```bash\npip install pytorch-widedeep\n```\n\nOr install directly from github\n\n```bash\npip install git+https://github.com/jrzaurin/pytorch-widedeep.git\n```\n\n#### Developer Install\n\n```bash\n# Clone the repository\ngit clone https://github.com/jrzaurin/pytorch-widedeep\ncd pytorch-widedeep\n\n# Install in dev mode\npip install -e .\n```\n\n### Quick start\n\nHere is an end-to-end example of a binary classification with the [adult\ndataset]([adult](https://www.kaggle.com/wenruliu/adult-income-dataset))\nusing `Wide` and `DeepDense` and defaults settings.\n\nBuilding a wide (linear) and deep model with ``pytorch-widedeep``:\n\n```python\nimport numpy as np\nimport torch\nfrom sklearn.model_selection import train_test_split\n\nfrom pytorch_widedeep import Trainer\nfrom pytorch_widedeep.preprocessing import WidePreprocessor, TabPreprocessor\nfrom pytorch_widedeep.models import Wide, TabMlp, WideDeep\nfrom pytorch_widedeep.metrics import Accuracy\nfrom pytorch_widedeep.datasets import load_adult\n\n\ndf = load_adult(as_frame=True)\ndf[\"income_label\"] = (df[\"income\"].apply(lambda x: \">50K\" in x)).astype(int)\ndf.drop(\"income\", axis=1, inplace=True)\ndf_train, df_test = train_test_split(df, test_size=0.2, stratify=df.income_label)\n\n# Define the 'column set up'\nwide_cols = [\n    \"education\",\n    \"relationship\",\n    \"workclass\",\n    \"occupation\",\n    \"native-country\",\n    \"gender\",\n]\ncrossed_cols = [(\"education\", \"occupation\"), (\"native-country\", \"occupation\")]\n\ncat_embed_cols = [\n    \"workclass\",\n    \"education\",\n    \"marital-status\",\n    \"occupation\",\n    \"relationship\",\n    \"race\",\n    \"gender\",\n    \"capital-gain\",\n    \"capital-loss\",\n    \"native-country\",\n]\ncontinuous_cols = [\"age\", \"hours-per-week\"]\ntarget = \"income_label\"\ntarget = df_train[target].values\n\n# prepare the data\nwide_preprocessor = WidePreprocessor(wide_cols=wide_cols, crossed_cols=crossed_cols)\nX_wide = wide_preprocessor.fit_transform(df_train)\n\ntab_preprocessor = TabPreprocessor(\n    cat_embed_cols=cat_embed_cols, continuous_cols=continuous_cols  # type: ignore[arg-type]\n)\nX_tab = tab_preprocessor.fit_transform(df_train)\n\n# build the model\nwide = Wide(input_dim=np.unique(X_wide).shape[0], pred_dim=1)\ntab_mlp = TabMlp(\n    column_idx=tab_preprocessor.column_idx,\n    cat_embed_input=tab_preprocessor.cat_embed_input,\n    continuous_cols=continuous_cols,\n)\nmodel = WideDeep(wide=wide, deeptabular=tab_mlp)\n\n# train and validate\ntrainer = Trainer(model, objective=\"binary\", metrics=[Accuracy])\ntrainer.fit(\n    X_wide=X_wide,\n    X_tab=X_tab,\n    target=target,\n    n_epochs=5,\n    batch_size=256,\n)\n\n# predict on test\nX_wide_te = wide_preprocessor.transform(df_test)\nX_tab_te = tab_preprocessor.transform(df_test)\npreds = trainer.predict(X_wide=X_wide_te, X_tab=X_tab_te)\n\n# Save and load\n\n# Option 1: this will also save training history and lr history if the\n# LRHistory callback is used\ntrainer.save(path=\"model_weights\", save_state_dict=True)\n\n# Option 2: save as any other torch model\ntorch.save(model.state_dict(), \"model_weights/wd_model.pt\")\n\n# From here in advance, Option 1 or 2 are the same. I assume the user has\n# prepared the data and defined the new model components:\n# 1. Build the model\nmodel_new = WideDeep(wide=wide, deeptabular=tab_mlp)\nmodel_new.load_state_dict(torch.load(\"model_weights/wd_model.pt\"))\n\n# 2. Instantiate the trainer\ntrainer_new = Trainer(model_new, objective=\"binary\")\n\n# 3. Either start the fit or directly predict\npreds = trainer_new.predict(X_wide=X_wide, X_tab=X_tab, batch_size=32)\n```\n\nOf course, one can do **much more**. See the Examples folder, the\ndocumentation or the companion posts for a better understanding of the content\nof the package and its functionalities.\n\n### Testing\n\n```\npytest tests\n```\n\n### How to Contribute\n\nCheck [CONTRIBUTING](https://github.com/jrzaurin/pytorch-widedeep/blob/master/CONTRIBUTING.MD) page.\n\n### Acknowledgments\n\nThis library takes from a series of other libraries, so I think it is just\nfair to mention them here in the README (specific mentions are also included\nin the code).\n\nThe `Callbacks` and `Initializers` structure and code is inspired by the\n[`torchsample`](https://github.com/ncullen93/torchsample) library, which in\nitself partially inspired by [`Keras`](https://keras.io/).\n\nThe `TextProcessor` class in this library uses the\n[`fastai`](https://docs.fast.ai/text.transform.html#BaseTokenizer.tokenizer)'s\n`Tokenizer` and `Vocab`. The code at `utils.fastai_transforms` is a minor\nadaptation of their code so it functions within this library. To my experience\ntheir `Tokenizer` is the best in class.\n\nThe `ImageProcessor` class in this library uses code from the fantastic [Deep\nLearning for Computer\nVision](https://www.pyimagesearch.com/deep-learning-computer-vision-python-book/)\n(DL4CV) book by Adrian Rosebrock.\n\n### License\n\nThis work is dual-licensed under Apache 2.0 and MIT (or any later version).\nYou can choose between one of them if you use this work.\n\n`SPDX-License-Identifier: Apache-2.0 AND MIT`\n\n### Cite\n\n#### BibTex\n\n```\n@article{Zaurin_pytorch-widedeep_A_flexible_2023,\nauthor = {Zaurin, Javier Rodriguez and Mulinka, Pavol},\ndoi = {10.21105/joss.05027},\njournal = {Journal of Open Source Software},\nmonth = jun,\nnumber = {86},\npages = {5027},\ntitle = {{pytorch-widedeep: A flexible package for multimodal deep learning}},\nurl = {https://joss.theoj.org/papers/10.21105/joss.05027},\nvolume = {8},\nyear = {2023}\n}\n```\n\n#### APA\n\n```\nZaurin, J. R., & Mulinka, P. (2023). pytorch-widedeep: A flexible package for\nmultimodal deep learning. Journal of Open Source Software, 8(86), 5027.\nhttps://doi.org/10.21105/joss.05027\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CFA:11316A:17C05B:5DDCCD:6AB929D0"},"text_sha256":"b2ceda1e99a4efb2aa23fb89af6026ba38c73dafe473583629dcf6881fb94cec"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mratsim/Arraymancer","input_row":{"repository":"mratsim/Arraymancer","url":"https://github.com/mratsim/Arraymancer","name":"Arraymancer","owner":"mratsim","description":"A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends","language":"Nim","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1407,"issues":357,"created_at":"2017-04-13T17:10:19Z","updated_at":"2026-09-15T21:55:22Z","first_commit_at":"2017-04-13T17:07:48Z","last_commit_at":"2026-05-26T20:28:53Z","activity_months":109.40000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:01.718Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mratsim/Arraymancer","visibility":"public","created_at":"2017-04-13T17:10:19Z","updated_at":"2026-09-15T21:55:22Z","private":false,"fork":false,"archived":false,"stargazers_count":1407,"open_issues_count":165,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2848","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089F:1DB627:1862D88:1C847D9:6AB929D1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2847","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FC:74E6D:17F6B7E:1C186B9:6AB929D2"},"commit":{"sha":"a0c1d52781c9bae9a10c1fc8ceb307374feb9a73","url":"https://github.com/mratsim/Arraymancer/commit/a0c1d52781c9bae9a10c1fc8ceb307374feb9a73","date":"2018-05-18T10:49:45Z","author_date":"2018-05-18T10:49:45Z","committer_date":"2018-05-18T10:49:45Z","tree_sha":"2b8be6746d12c7b76429a6047ee2a7b62d5bacb9","message_first_line":"Added higher dimensional toSeq exports (#236)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2846","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17B7238:1BD7E92:6AB929D2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23241,"blob_sha":"f40762354784498ce254c956f645f32f2f896cdf","priority":0}],"documents":[{"path":"README.md","size":23241,"blob_sha":"f40762354784498ce254c956f645f32f2f896cdf","priority":0,"status":200,"text":"[![Join the chat at https://gitter.im/Arraymancer/Lobby](https://badges.gitter.im/Arraymancer/Lobby.svg)](https://gitter.im/Arraymancer/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Linux Build Status (Travis)](https://img.shields.io/travis/mratsim/Arraymancer/master.svg?label=Linux%20/%20macOS \"Linux/macOS build status (Travis)\")](https://travis-ci.org/mratsim/Arraymancer) [![Windows build status (Appveyor)](https://img.shields.io/appveyor/ci/mratsim/arraymancer/master.svg?label=Windows \"Windows build status (Appveyor)\")](https://ci.appveyor.com/project/mratsim/arraymancer) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Stability](https://img.shields.io/badge/stability-experimental-orange.svg)\n\n# Arraymancer - A n-dimensional tensor (ndarray) library.\n\nArraymancer is a tensor (N-dimensional array) project in Nim. The main focus is providing a fast and ergonomic CPU, Cuda and OpenCL ndarray library on which to build a scientific computing and in particular a deep learning ecosystem.\n\nThe library is inspired by Numpy and PyTorch. The library provides ergonomics very similar to Numpy, Julia and Matlab but is fully parallel and significantly faster than those libraries. It is also faster than C-based Torch.\n\nNote: While Nim is compiled and does not offer an interactive REPL yet (like Jupyter), it allows much faster prototyping than C++ due to extremely fast compilation times. Arraymancer compiles in about 5 seconds on my dual-core MacBook.\n\n## Show me some code\n\nArraymancer tutorial is available [here](https://mratsim.github.io/Arraymancer/tuto.first_steps.html).\n\nHere is a preview of Arraymancer syntax.\n\n### Tensor creation and slicing\n```Nim\nimport math, arraymancer, future\n\nconst\n    x = @[1, 2, 3, 4, 5]\n    y = @[1, 2, 3, 4, 5]\n\nvar\n    vandermonde: seq[seq[int]]\n    row: seq[int]\n\nvandermonde = newSeq[seq[int]]()\n\nfor i, xx in x:\n    row = newSeq[int]()\n    vandermonde.add(row)\n    for j, yy in y:\n        vandermonde[i].add(xx^yy)\n\nlet foo = vandermonde.toTensor()\n\necho foo\n\n# Tensor of shape 5x5 of type \"int\" on backend \"Cpu\"\n# |1      1       1       1       1|\n# |2      4       8       16      32|\n# |3      9       27      81      243|\n# |4      16      64      256     1024|\n# |5      25      125     625     3125|\n\necho foo[1..2, 3..4] # slice\n\n# Tensor of shape 2x2 of type \"int\" on backend \"Cpu\"\n# |16     32|\n# |81     243|\n```\n\n### Reshaping and concatenation\n```Nim\nimport arraymancer, sequtils\n\n\nlet a = toSeq(1..4).toTensor.reshape(2,2)\n\nlet b = toSeq(5..8).toTensor.reshape(2,2)\n\nlet c = toSeq(11..16).toTensor\nlet c0 = c.reshape(3,2)\nlet c1 = c.reshape(2,3)\n\necho concat(a,b,c0, axis = 0)\n# Tensor of shape 7x2 of type \"int\" on backend \"Cpu\"\n# |1      2|\n# |3      4|\n# |5      6|\n# |7      8|\n# |11     12|\n# |13     14|\n# |15     16|\n\necho concat(a,b,c1, axis = 1)\n# Tensor of shape 2x7 of type \"int\" on backend \"Cpu\"\n# |1      2       5       6       11      12      13|\n# |3      4       7       8       14      15      16|\n```\n\n### Broadcasting\n\nImage from Scipy\n\n![](https://scipy.github.io/old-wiki/pages/image004de9e.gif)\n\n```Nim\nimport arraymancer\n\nlet j = [0, 10, 20, 30].toTensor.reshape(4,1)\nlet k = [0, 1, 2].toTensor.reshape(1,3)\n\necho j .+ k\n# Tensor of shape 4x3 of type \"int\" on backend \"Cpu\"\n# |0      1       2|\n# |10     11      12|\n# |20     21      22|\n# |30     31      32|\n```\n\n### A simple two layers neural network\n\nFrom [example 3](./examples/ex03_simple_two_layers.nim).\n\n```Nim\nimport arraymancer, strformat\n\ndiscard \"\"\"\nA fully-connected ReLU network with one hidden layer, trained to predict y from x\nby minimizing squared Euclidean distance.\n\"\"\"\n\n# ##################################################################\n# Environment variables\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nlet (N, D_in, H, D_out) = (64, 1000, 100, 10)\n\n# Create the autograd context that will hold the computational graph\nlet ctx = newContext Tensor[float32]\n\n# Create random Tensors to hold inputs and outputs, and wrap them in Variables.\nlet\n  x = ctx.variable(randomTensor[float32](N, D_in, 1'f32))\n  y = randomTensor[float32](N, D_out, 1'f32)\n\n# ##################################################################\n# Define the model.\n\nnetwork ctx, TwoLayersNet:\n  layers:\n    fc1: Linear(D_in, H)\n    fc2: Linear(H, D_out)\n  forward x:\n    x.fc1.relu.fc2\n\nlet\n  model = ctx.init(TwoLayersNet)\n  optim = model.optimizerSGD(learning_rate = 1e-4'f32)\n\n# ##################################################################\n# Training\n\nfor t in 0 ..< 500:\n  let\n    y_pred = model.forward(x)\n    loss = mse_loss(y_pred, y)\n\n  echo &\"Epoch {t}: loss {loss.value[0]}\"\n\n  loss.backprop()\n  optim.update()\n```\n\n## Table of Contents\n<!-- TOC -->\n\n- [Arraymancer - A n-dimensional tensor (ndarray) library.](#arraymancer---a-n-dimensional-tensor-ndarray-library)\n  - [Show me some code](#show-me-some-code)\n    - [Tensor creation and slicing](#tensor-creation-and-slicing)\n    - [Reshaping and concatenation](#reshaping-and-concatenation)\n    - [Broadcasting](#broadcasting)\n    - [A simple two layers neural network](#a-simple-two-layers-neural-network)\n  - [Table of Contents](#table-of-contents)\n  - [4 reasons why Arraymancer](#4-reasons-why-arraymancer)\n    - [The Python community is struggling to bring Numpy up-to-speed](#the-python-community-is-struggling-to-bring-numpy-up-to-speed)\n    - [A researcher workflow is a fight against inefficiencies](#a-researcher-workflow-is-a-fight-against-inefficiencies)\n    - [Can be distributed almost dependency free](#can-be-distributed-almost-dependency-free)\n    - [Bridging the gap between deep learning research and production](#bridging-the-gap-between-deep-learning-research-and-production)\n    - [So why Arraymancer ?](#so-why-arraymancer)\n  - [Future ambitions](#future-ambitions)\n  - [Installation](#installation)\n  - [Full documentation](#full-documentation)\n  - [Features](#features)\n    - [Arraymancer as a Deep Learning library](#arraymancer-as-a-deep-learning-library)\n      - [Handwritten digit recognition with Arraymancer](#handwritten-digit-recognition-with-arraymancer)\n    - [Tensors on CPU, on Cuda and OpenCL](#tensors-on-cpu-on-cuda-and-opencl)\n    - [Speed](#speed)\n      - [Micro benchmark: Int64 matrix multiplication](#micro-benchmark-int64-matrix-multiplication)\n      - [Logistic regression](#logistic-regression)\n      - [DNN - 3 hidden layers](#dnn---3-hidden-layers)\n\n<!-- /TOC -->\n\n## 4 reasons why Arraymancer\n\n### The Python community is struggling to bring Numpy up-to-speed\n\n- Numba JIT compiler\n- Dask delayed parallel computation graph\n- Cython to ease numerical computations in Python\n- Due to the GIL shared-memory parallelism (OpenMP) is not possible in pure Python\n- Use \"vectorized operations\" (i.e. don't use for loops in Python)\n\nWhy not use in a single language with all the blocks to build the most efficient scientific computing library with Python ergonomics.\n\nOpenMP batteries included.\n\n### A researcher workflow is a fight against inefficiencies\n\nResearchers in a heavy scientific computing domain often have the following workflow: Mathematica/Matlab/Python/R (prototyping) -> C/C++/Fortran (speed, memory)\n\nWhy not use in a language as productive as Python and as fast as C? Code once, and don't spend months redoing the same thing at a lower level.\n\n### Can be distributed almost dependency free\n\nArraymancer models can be packaged in a self-contained binary that only depends on a BLAS library like OpenBLAS, MKL or Apple Accelerate (present on all Mac and iOS).\n\nThis means that there is no need to install a huge library or language ecosystem to use Arraymancer. This also makes it naturally suitable for resource-constrained devices like mobile phones and Raspberry Pi.\n\n### Bridging the gap between deep learning research and production\nThe deep learning frameworks are currently in two camps:\n- Research: Theano, Tensorflow, Keras, Torch, PyTorch\n- Production: Caffe, Darknet, (Tensorflow)\n\nFurthermore, Python preprocessing steps, unless using OpenCV, often needs a custom implementation (think text/speech preprocessing on phones).\n\n- Managing and deploying Python (2.7, 3.5, 3.6) and packages version in a robust manner requires devops-fu (virtualenv, Docker, ...)\n- Python data science ecosystem does not run on embedded devices (Nvidia Tegra/drones) or mobile phones, especially preprocessing dependencies.\n- Tensorflow is supposed to bridge the gap between research and production but its syntax and ergonomics are a pain to work with. Like for researchers, you need to code twice, \"Prototype in Keras, and when you need low-level --> Tensorflow\".\n- Deployed models are static, there is no interface to add a new observation/training sample to any framework, what if you want to use a model as a webservice with online learning?\n\n[Relevant XKCD from Apr 30, 2018](https://xkcd.com/1987/)\n\n![Python environment mess](https://imgs.xkcd.com/comics/python_environment.png)\n\n### So why Arraymancer ?\n\nAll those pain points may seem like a huge undertaking however thanks to the Nim language, we can have Arraymancer:\n- Be as fast as C\n- Accelerated routines with Intel MKL/OpenBLAS or even NNPACK\n- Access to CUDA and CuDNN and generate custom CUDA kernels on the fly via metaprogramming.\n- Almost dependency free distribution (BLAS library)\n- A Python-like syntax with custom operators `a * b` for tensor multiplication instead of `a.dot(b)` (Numpy/Tensorflow) or `a.mm(b)` (Torch)\n- Numpy-like slicing ergonomics `t[0..4, 2..10|2]`\n- For everything that Nim doesn't have yet, you can use Nim bindings to C, C++, Objective-C or Javascript to bring it to Nim. Nim also has unofficial Python->Nim and Nim->Python wrappers.\n\n## Future ambitions\nBecause apparently to be successful you need a vision, I would like Arraymancer to be:\n- The go-to tool for Deep Learning video processing. I.e. `vid = load_video(\"./cats/youtube_cat_video.mkv\")`\n- Target javascript, WebAssembly, Apple Metal, ARM devices, AMD Rocm, OpenCL, you name it.\n- The base of a Starcraft II AI bot.\n- Target cryptominers FPGAs because they drove the price of GPUs for honest deep-learners too high.\n\n## Installation\n\nNim is available in some Linux repositories and on Homebrew for macOS.\n\nI however recommend installing Nim in your user profile via [``choosenim``](https://github.com/dom96/choosenim). Once choosenim installed Nim, you can `nimble install arraymancer` which will pull the latest arraymancer release and all its dependencies.\n\nTo install Arraymancer development version you can use `nimble install arraymancer@#head`.\n\nArraymancer requires a BLAS and Lapack library.\n\n- On Windows you can get OpenBLAS and Lapack for Windows.\n- On MacOS, Apple Accelerate should provides those by default.\n- On Linux, you can downlod libopenblas and liblapack through your package manager.\n\n## Full documentation\n\nDetailed API is available at Arraymancer official [documentation](https://mratsim.github.io/Arraymancer/).\n\n## Features\n\nFor now Arraymancer is mostly at the ndarray stage, a [vision package](https://github.com/edubart/arraymancer-vision) and a [deep learning demo](https://github.com/edubart/arraymancer-demos) are available with logistic regression and perceptron from scratch.\n\nYou can also check the [detailed example](https://github.com/mratsim/Arraymancer/blob/master/examples/ex01_xor_perceptron_from_scratch.nim) or [benchmark](https://github.com/mratsim/Arraymancer/blob/master/benchmarks/ex01_xor.nim) perceptron for a preview of Arraymancer deep learning usage.\n\nAvailable autograd and neural networks features are detailed in the technical reference part of the [documentation](https://mratsim.github.io/Arraymancer/).\n\n### Arraymancer as a Deep Learning library\n\nNote: The final interface is still **work in progress.**\n\n#### Handwritten digit recognition with Arraymancer\nFrom [example 2](https://github.com/mratsim/Arraymancer/blob/master/examples/ex02_handwritten_digits_recognition.nim).\n\n```Nim\nimport arraymancer, random\n\nrandomize(42) # Random seed for reproducibility\n\nlet\n  ctx = newContext Tensor[float32] # Autograd/neural network graph\n  n = 32                           # Batch size\n\nlet\n  x_train = read_mnist_images(\"build/train-images.idx3-ubyte\").astype(float32) / 255'f32\n  X_train = ctx.variable x_train.unsqueeze(1) # Change shape from [N, H, W] to [N, C, H, W], with C = 1\n\n  y_train = read_mnist_labels(\"build/train-labels.idx1-ubyte\").astype(int)\n\n  x_test = read_mnist_images(\"build/t10k-images.idx3-ubyte\").astype(float32) / 255'f32\n  X_test = ctx.variable x_test.unsqueeze(1) Change shape from [N, H, W] to [N, C, H, W], with C = 1\n  y_test = read_mnist_labels(\"build/t10k-labels.idx1-ubyte\").astype(int)\n\nnetwork ctx, DemoNet:\n  layers:\n    x:          Input([1, 28, 28])\n    cv1:        Conv2D(x.out_shape, 20, 5, 5)\n    mp1:        MaxPool2D(cv1.out_shape, (2,2), (0,0), (2,2))\n    cv2:        Conv2D(mp1.out_shape, 50, 5, 5)\n    mp2:        MaxPool2D(cv2.out_shape, (2,2), (0,0), (2,2))\n    fl:         Flatten(mp2.out_shape)\n    hidden:     Linear(fl.out_shape, 500)\n    classifier: Linear(500, 10)\n  forward x:\n    x.cv1.relu.mp1.cv2.relu.mp2.fl.hidden.relu.classifier\n\nlet model = ctx.init(DemoNet)\nlet optim = model.optimizerSGD(learning_rate = 0.01'f32)\n\n# Learning loop\nfor epoch in 0 ..< 5:\n  for batch_id in 0 ..< X_train.value.shape[0] div n: # some at the end may be missing, oh well ...\n    # minibatch offset in the Tensor\n    let offset = batch_id * n\n    let x = X_train[offset ..< offset + n, _]\n    let target = y_train[offset ..< offset + n]\n\n    let clf = model.forward(x)\n    let loss = clf.sparse_softmax_cross_entropy(target)\n\n    if batch_id mod 200 == 0:\n      # Print status every 200 batches\n      echo \"Epoch is: \" & $epoch\n      echo \"Batch id: \" & $batch_id\n      echo \"Loss is:  \" & $loss.value.data[0]\n\n    loss.backprop()\n    optim.update()\n\n  # Validation (checking the accuracy/generalization of our model on unseen data)\n  ctx.no_grad_mode:\n    echo \"\\nEpoch #\" & $epoch & \" done. Testing accuracy\"\n\n    # Validation by batches of 1000 images\n    var score = 0.0\n    var loss = 0.0\n    for i in 0 ..< 10:\n      let y_pred = model.forward(X_test[i*1000 ..< (i+1)*1000, _]).value.softmax.argmax(axis = 1).squeeze\n      score += accuracy_score(y_test[i*1000 ..< (i+1)*1000], y_pred)\n\n      loss += model.forward(X_test[i*1000 ..< (i+1)*1000, _]).sparse_softmax_cross_entropy(y_test[i*1000 ..< (i+1)*1000]).value.data[0]\n    score /= 10\n    loss /= 10\n    echo \"Accuracy: \" & $(score * 100) & \"%\"\n    echo \"Loss:     \" & $loss\n    echo \"\\n\"\n\n\n\n############# Output ############\n\nEpoch is: 0\n# Batch id: 0\n# Loss is:  194.3991851806641\n# Epoch is: 0\n# Batch id: 200\n# Loss is:  2.60599946975708\n# Epoch is: 0\n# Batch id: 400\n# Loss is:  1.708131313323975\n# Epoch is: 0\n# Batch id: 600\n# Loss is:  1.061241149902344\n# Epoch is: 0\n# Batch id: 800\n# Loss is:  0.8607467412948608\n# Epoch is: 0\n# Batch id: 1000\n# Loss is:  0.9292868375778198\n# Epoch is: 0\n# Batch id: 1200\n# Loss is:  0.6178927421569824\n# Epoch is: 0\n# Batch id: 1400\n# Loss is:  0.4008050560951233\n# Epoch is: 0\n# Batch id: 1600\n# Loss is:  0.2450754344463348\n# Epoch is: 0\n# Batch id: 1800\n# Loss is:  0.3787734508514404\n\n# Epoch #0 done. Testing accuracy\n# Accuracy: 84.24999999999999%\n# Loss:     0.4853884726762772\n\n\n# Epoch is: 1\n# Batch id: 0\n# Loss is:  0.8319419622421265\n# Epoch is: 1\n# Batch id: 200\n# Loss is:  0.3116425573825836\n# Epoch is: 1\n# Batch id: 400\n# Loss is:  0.232885867357254\n# Epoch is: 1\n# Batch id: 600\n# Loss is:  0.3877259492874146\n# Epoch is: 1\n# Batch id: 800\n# Loss is:  0.3621436357498169\n# Epoch is: 1\n# Batch id: 1000\n# Loss is:  0.5054937601089478\n# Epoch is: 1\n# Batch id: 1200\n# Loss is:  0.4431287050247192\n# Epoch is: 1\n# Batch id: 1400\n# Loss is:  0.2153264284133911\n# Epoch is: 1\n# Batch id: 1600\n# Loss is:  0.1401071697473526\n# Epoch is: 1\n# Batch id: 1800\n# Loss is:  0.3415909707546234\n\n# Epoch #1 done. Testing accuracy\n# Accuracy: 87.91%\n# Loss:     0.3657706841826439\n```\n\n\n### Tensors on CPU, on Cuda and OpenCL\nTensors, CudaTensors and CLTensors do not have the same features implemented yet.\nAlso CudaTensors and CLTensors can only be float32 or float64 while Cpu Tensor can be integers, string, boolean or any custom object.\n\nHere is a comparative table of the core features, not that this feature set is developing\nrapidly.\n\n| Action                                            | Tensor                      | CudaTensor                 | ClTensor                   |\n| ------------------------------------------------- | --------------------------- | -------------------------- | -------------------------- |\n| Accessing tensor properties                       | [x]                         | [x]                        | [x]                        |\n| Tensor creation                                   | [x]                         | by converting a cpu Tensor | by converting a cpu Tensor |\n| Accessing or modifying a single value             | [x]                         | []                         | []                         |\n| Iterating on a Tensor                             | [x]                         | []                         | []                         |\n| Slicing a Tensor                                  | [x]                         | [x]                        | [x]                        |\n| Slice mutation `a[1,_] = 10`                      | [x]                         | []                         | []                         |\n| Comparison `==`                                   | [x]                         | []                         | []                         |\n| Element-wise basic operations                     | [x]                         | [x]                        | [x]                        |\n| Universal functions                               | [x]                         | []                         | []                         |\n| Automatically broadcasted operations              | [x]                         | [x]                        | [x]                        |\n| Matrix-Matrix and Matrix-Vector multiplication    | [x]                         | [x]                        | [x]                        |\n| Displaying a tensor                               | [x]                         | [x]                        | [x]                        |\n| Higher-order functions (map, apply, reduce, fold) | [x]                         | internal only              | internal only              |\n| Transposing                                       | [x]                         | [x]                        | []                         |\n| Converting to contiguous                          | [x]                         | [x]                        | []                         |\n| Reshaping                                         | [x]                         | [x]                        | []                         |\n| Explicit broadcast                                | [x]                         | [x]                        | [x]                        |\n| Permuting dimensions                              | [x]                         | []                         | []                         |\n| Concatenating tensors along existing dimension    | [x]                         | []                         | []                         |\n| Squeezing singleton dimension                     | [x]                         | [x]                        | []                         |\n| Slicing + squeezing                               | [x]                         | []                         | []                         |\n\nAdvanced features built upon this are:\n  - Neural networks: Dense and Convolutional neural networks are supported on CPU. Primitives are available on Cuda.\n  - Linear algebra: Least squares solver and eigenvalue decomposition for symmetric matrices.\n  - Machine Learning: Accuracy score, common loss function (MAE, MSE, ...), Principal Component Analysis (PCA).\n  - Statistics: Covariance matrix.\n  - IO & Datasets: CSV reading and writing, and reading MNIST files.\n  - A tensor plotting tool using Python matplotlib.\n\nDetailed API is available at Arraymancer [documentation](https://mratsim.github.io/Arraymancer/).\n\n### Speed\n\nArraymancer is fast, how it achieves its speed under the hood is detailed [here](https://mratsim.github.io/Arraymancer/uth.speed.html).\n\n#### Micro benchmark: Int64 matrix multiplication\n\nIntegers seem to be the abandoned children of ndarrays and tensors libraries. Everyone is optimising the hell of floating points. Not so with Arraymancer:\n\n```\nArchlinux, E3-1230v5 (Skylake quad-core 3.4 GHz, turbo 3.8)\nInput 1500x1500 random large int64 matrix\nArraymancer 0.2.90 (master branch 2017-10-10)\n```\n\n| Language | Speed | Memory |\n|---|---|---|\n| Nim 0.17.3 (devel) + OpenMP | **0.36s** | 55.5 MB |\n| Julia v0.6.0 | 3.11s | 207.6 MB |\n| Python 3.6.2 + Numpy 1.12 compiled from source | 8.03s | 58.9 MB |\n\n```\nMacOS + i5-5257U (Broadwell dual-core mobile 2.7GHz, turbo 3.1)\nInput 1500x1500 random large int64 matrix\nArraymancer 0.2.90 (master branch 2017-10-31)\n\nno OpenMP compilation: nim c -d:native -d:release --out:build/integer_matmul --nimcache:./nimcache benchmarks/integer_matmul.nim\nwith OpenMP: nim c -d:openmp --cc:gcc --gcc.exe:\"/usr/local/bin/gcc-6\" --gcc.linkerexe:\"/usr/local/bin/gcc-6\"  -d:native -d:release --out:build/integer_matmul --nimcache:./nimcache benchmarks/integer_matmul.nim\n```\n\n| Language | Speed | Memory |\n|---|---|---|\n| Nim 0.18.0 (devel) - GCC 6 + OpenMP | **0.95s** | 71.9 MB |\n| Nim 0.18.0 (devel) - Apple Clang 9 - no OpenMP | **1.73s** | 71.7 MB |\n| Julia v0.6.0 | 4.49s | 185.2 MB |\n| Python 3.5.2 + Numpy 1.12 | 9.49s | 55.8 MB |\n\nBenchmark setup is in the `./benchmarks` folder and similar to (stolen from) [Kostya's](https://github.com/kostya/benchmarks#matmul). Note: Arraymancer float matmul is as fast as `Julia Native Thread`.\n\n#### Logistic regression\nOn the [demo benchmark](https://github.com/edubart/arraymancer-demos), Arraymancer is faster than Torch in v0.2.90.\n\nCPU\n\n| Framework | Backend | Forward+Backward Pass Time  |\n|---|---|---|\n| Arraymancer v0.2.90| OpenMP + MKL | **0.458ms**  |\n| Torch7 | MKL | 0.686ms  |\n| Numpy | MKL | 0.723ms  |\n\nGPU\n\n| Framework | Backend | Forward+Backward Pass Time  |\n|---|---|---|\n| Arraymancer v0.2.90| Cuda | WIP  |\n| Torch7 | Cuda | 0.286ms  |\n\n#### DNN - 3 hidden layers\n\nCPU\n\n| Framework | Backend | Forward+Backward Pass Time  |\n|---|---|---|\n| Arraymancer v0.2.90| OpenMP + MKL | **2.907ms**  |\n| PyTorch | MKL | 6.797ms  |\n\nGPU\n\n| Framework | Backend | Forward+Backward Pass Time  |\n|---|---|---|\n| Arraymancer v0.2.90| Cuda | WIP |\n| PyTorch | Cuda | 4.765ms  |\n\n\n```\nIntel(R) Core(TM) i7-3770K CPU @ 3.50GHz, gcc 7.2.0, MKL 2017.17.0.4.4, OpenBLAS 0.2.20, Cuda 8.0.61, Geforce GTX 1080 Ti, Nim 0.18.0\n```\n\nIn the future, Arraymancer will leverage Nim compiler to automatically fuse operations\nlike `alpha A*B + beta C` or a combination of element-wise operations. This is already done to fuse `toTensor` and `reshape`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CC0:3BF56:174CE0:5D6AD6:6AB929D2"},"text_sha256":"78a2ec943c013a77b733401302f63448b4a9db135070d2978607c55e6fa57a85"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2845","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17C107D:1BE27F0:6AB929D3"},"commit":{"sha":"d3b67712a3334ab4ded2809cc793e9cd7fed5fae","url":"https://github.com/mratsim/Arraymancer/commit/d3b67712a3334ab4ded2809cc793e9cd7fed5fae","date":"2026-05-26T20:28:53Z","author_date":"2026-05-26T20:28:53Z","committer_date":"2026-05-26T20:28:53Z","tree_sha":"80d561be3b2d240cd724f3be856c5fc62afb9805","message_first_line":"fix `blis` dynamic lib name, avoid `bli_init` output at runtime (#689)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2844","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17AD363:1BCE638:6AB929D3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26349,"blob_sha":"9b6c432050716f0e9dd798a9fced99aca0dec43d","priority":0}],"documents":[{"path":"README.md","size":26349,"blob_sha":"9b6c432050716f0e9dd798a9fced99aca0dec43d","priority":0,"status":200,"text":"[![Join the chat on Discord #nim-science](https://img.shields.io/discord/371759389889003530?color=blue&label=nim-science&logo=discord&logoColor=gold&style=flat-square)](https://discord.gg/f5hA9UK3dY) [![Github Actions CI](https://github.com/mratsim/arraymancer/workflows/Arraymancer%20CI/badge.svg)](https://github.com/mratsim/arraymancer/actions?query=workflow%3A%Arraymancer+CI%22+branch%3Amaster) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Stability](https://img.shields.io/badge/stability-experimental-orange.svg)\n\n# Arraymancer - A n-dimensional tensor (ndarray) library.\n\nArraymancer is a tensor (N-dimensional array) project in Nim. The main focus is providing a fast and ergonomic CPU, Cuda and OpenCL ndarray library on which to build a scientific computing ecosystem.\n\nThe library is inspired by Numpy and PyTorch and targets the following use-cases:\n\n- N-dimensional arrays (tensors) for numerical computing\n- machine learning algorithms (as in Scikit-learn: least squares solvers, PCA and dimensionality reduction, classifiers, regressors and clustering algorithms, cross-validation).\n- deep learning\n\nThe ndarray component can be used without the machine learning and deep learning component.\nIt can also use the OpenMP, Cuda or OpenCL backends.\n\nNote: While Nim is compiled and does not offer an interactive REPL yet (like Jupyter), it allows much faster prototyping than C++ due to extremely fast compilation times. Arraymancer compiles in about 5 seconds on my dual-core MacBook.\n\nReminder of supported compilation flags:\n\n- `-d:release`: Nim release mode (no stacktraces and debugging information)\n- `-d:danger`: No runtime checks like array bound checking\n- `-d:blas=blaslibname`: Customize the BLAS library used by Arraymancer. By default (i.e. if you don't define this setting) Arraymancer will try to automatically find a BLAS library (e.g. `blas.so/blas.dll` or `libopenblas.dll`) on your path. You should only set this setting if for some reason you want to use a specific BLAS library. See [nimblas](https://github.com/SciNim/nimblas) for further information\n- `-d:lapack=lapacklibname`: Customize the LAPACK library used by Arraymancer. By default (i.e. if you don't define this setting) Arraymancer will try to automatically find a LAPACK library (e.g. `lapack.so/lapack.dll` or `libopenblas.dll`) on your path. You should only set this setting if for some reason you want to use a specific LAPACK library. See [nimlapack](https://github.com/SciNim/nimlapack) for further information\n- `-d:openmp`: Multithreaded compilation\n- `-d:mkl`: Deprecated flag which forces the use of MKL. Implies `-d:openmp`. Use `-d:blas=mkl -d:lapack=mkl` instead, but _only_ if you want to force Arraymancer to use MKL, instead of looking for the available BLAS / LAPACK libraries\n- `-d:openblas`: Deprecated flag which forces the use of OpenBLAS. Use `-d:blas=openblas -d:lapack=openblas` instead, but _only_ if you want to force Arraymancer to use OpenBLAS, instead of looking for the available BLAS / LAPACK libraries\n- `-d:cuda`: Build with Cuda support\n- `-d:cudnn`: Build with CuDNN support, implies `-d:cuda`\n- `-d:avx512`: Build with AVX512 support by supplying the `-mavx512dq` flag\n  to gcc / clang. Without this flag the resulting binary does not use AVX512\n  even on CPUs that support it. Setting this flag, however, makes the binary\n  incompatible with CPUs that do _not_ support AVX512. See the comments in #505\n  for a discussion (from `v0.7.9`)\n- You might want to tune library paths in [nim.cfg](nim.cfg) after installation for OpenBLAS, MKL and Cuda compilation.\n  The current defaults should work on Mac and Linux; and on Windows after downloading `libopenblas.dll` or another\n  BLAS / LAPACK DLL (see the [Installation](#installation) section for more information) and copying it into a folder\n  in your path or into the compilation output folder.\n\n## Show me some code\n\nThe Arraymancer tutorial is available [here](https://mratsim.github.io/Arraymancer/tuto.first_steps.html).\n\nHere is a preview of Arraymancer syntax.\n\n### Tensor creation and slicing\n\n```Nim\nimport math, arraymancer\n\nconst\n    x = @[1, 2, 3, 4, 5]\n    y = @[1, 2, 3, 4, 5]\n\nvar\n    vandermonde = newSeq[seq[int]]()\n    row: seq[int]\n\nfor i, xx in x:\n    row = newSeq[int]()\n    vandermonde.add(row)\n    for j, yy in y:\n        vandermonde[i].add(xx^yy)\n\nlet foo = vandermonde.toTensor()\n\necho foo\n\n# Tensor[system.int] of shape \"[5, 5]\" on backend \"Cpu\"\n# |1          1       1       1       1|\n# |2          4       8      16      32|\n# |3          9      27      81     243|\n# |4         16      64     256    1024|\n# |5         25     125     625    3125|\n\necho foo[1..2, 3..4] # slice\n\n# Tensor[system.int] of shape \"[2, 2]\" on backend \"Cpu\"\n# |16      32|\n# |81     243|\n\necho foo[_|-1, _] # reverse the order of the rows\n\n# Tensor[int] of shape \"[5, 5]\" on backend \"Cpu\"\n# |5      25      125     625     3125|\n# |4      16       64     256     1024|\n# |3       9       27      81      243|\n# |2       4        8      16       32|\n# |1       1        1       1        1|\n```\n\n### Reshaping and concatenation\n\n```Nim\nimport arraymancer, sequtils\n\nlet a = toSeq(1..4).toTensor.reshape(2,2)\n\nlet b = toSeq(5..8).toTensor.reshape(2,2)\n\nlet c = toSeq(11..16).toTensor\nlet c0 = c.reshape(3,2)\nlet c1 = c.reshape(2,3)\n\necho concat(a,b,c0, axis = 0)\n# Tensor[system.int] of shape \"[7, 2]\" on backend \"Cpu\"\n# |1      2|\n# |3      4|\n# |5      6|\n# |7      8|\n# |11    12|\n# |13    14|\n# |15    16|\n\necho concat(a,b,c1, axis = 1)\n# Tensor[system.int] of shape \"[2, 7]\" on backend \"Cpu\"\n# |1      2     5     6    11    12    13|\n# |3      4     7     8    14    15    16|\n```\n\n### Broadcasting\n\nImage from Scipy\n\n![](https://scipy.github.io/old-wiki/pages/image004de9e.gif)\n\n```Nim\nimport arraymancer\n\nlet j = [0, 10, 20, 30].toTensor.reshape(4,1)\nlet k = [0, 1, 2].toTensor.reshape(1,3)\n\necho j +. k\n# Tensor[system.int] of shape \"[4, 3]\" on backend \"Cpu\"\n# |0      1     2|\n# |10    11    12|\n# |20    21    22|\n# |30    31    32|\n```\n\n### A simple two layers neural network\n\nFrom [example 3](./examples/ex03_simple_two_layers.nim).\n\n```Nim\nimport arraymancer, strformat\n\ndiscard \"\"\"\nA fully-connected ReLU network with one hidden layer, trained to predict y from x\nby minimizing squared Euclidean distance.\n\"\"\"\n\n# ##################################################################\n# Environment variables\n\n# N is batch size; D_in is input dimension;\n# H is hidden dimension; D_out is output dimension.\nlet (N, D_in, H, D_out) = (64, 1000, 100, 10)\n\n# Create the autograd context that will hold the computational graph\nlet ctx = newContext Tensor[float32]\n\n# Create random Tensors to hold inputs and outputs, and wrap them in Variables.\nlet\n  x = ctx.variable(randomTensor[float32](N, D_in, 1'f32))\n  y = randomTensor[float32](N, D_out, 1'f32)\n\n# ##################################################################\n# Define the model\n\nnetwork TwoLayersNet:\n  layers:\n    fc1: Linear(D_in, H)\n    fc2: Linear(H, D_out)\n  forward x:\n    x.fc1.relu.fc2\n\nlet\n  model = ctx.init(TwoLayersNet)\n  optim = model.optimizer(SGD, learning_rate = 1e-4'f32)\n\n# ##################################################################\n# Training\n\nfor t in 0 ..< 500:\n  let\n    y_pred = model.forward(x)\n    loss = y_pred.mse_loss(y)\n\n  echo &\"Epoch {t}: loss {loss.value[0]}\"\n\n  loss.backprop()\n  optim.update()\n```\n\n### Teaser A text generated with Arraymancer's recurrent neural network\n\nFrom [example 6](./examples/ex06_shakespeare_generator.nim).\n\nTrained 45 min on my laptop CPU on Shakespeare and producing 4000 characters\n\n```\nWhter!\nTake's servant seal'd, making uponweed but rascally guess-boot,\nBare them be that been all ingal to me;\nYour play to the see's wife the wrong-pars\nWith child of queer wretchless dreadful cold\nCursters will how your part? I prince!\nThis is time not in a without a tands:\nYou are but foul to this.\nI talk and fellows break my revenges, so, and of the hisod\nAs you lords them or trues salt of the poort.\n\nROMEO:\nThou hast facted to keep thee, and am speak\nOf them; she's murder'd of your galla?\n\n# [...] See example 6 for full text generation samples\n```\n\n## Table of Contents\n<!-- TOC -->\n\n- [Arraymancer - A n-dimensional tensor (ndarray) library.](#arraymancer---a-n-dimensional-tensor-ndarray-library)\n  - [Show me some code](#show-me-some-code)\n    - [Tensor creation and slicing](#tensor-creation-and-slicing)\n    - [Reshaping and concatenation](#reshaping-and-concatenation)\n    - [Broadcasting](#broadcasting)\n    - [A simple two layers neural network](#a-simple-two-layers-neural-network)\n    - [Teaser A text generated with Arraymancer's recurrent neural network](#teaser-a-text-generated-with-arraymancers-recurrent-neural-network)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Full documentation](#full-documentation)\n  - [Features](#features)\n    - [Arraymancer as a Deep Learning library](#arraymancer-as-a-deep-learning-library)\n      - [Fizzbuzz with fully-connected layers (also called Dense, Affine or Linear layers)](#fizzbuzz-with-fully-connected-layers-also-called-dense-affine-or-linear-layers)\n      - [Handwritten digit recognition with convolutions](#handwritten-digit-recognition-with-convolutions)\n      - [Sequence classification with stacked Recurrent Neural Networks](#sequence-classification-with-stacked-recurrent-neural-networks)\n    - [Tensors on CPU, on Cuda and OpenCL](#tensors-on-cpu-on-cuda-and-opencl)\n  - [What's new in Arraymancer v0.5.1 - July 2019](#whats-new-in-arraymancer-v051---july-2019)\n  - [4 reasons why Arraymancer](#4-reasons-why-arraymancer)\n    - [The Python community is struggling to bring Numpy up-to-speed](#the-python-community-is-struggling-to-bring-numpy-up-to-speed)\n    - [A researcher workflow is a fight against inefficiencies](#a-researcher-workflow-is-a-fight-against-inefficiencies)\n    - [Can be distributed almost dependency free](#can-be-distributed-almost-dependency-free)\n    - [Bridging the gap between deep learning research and production](#bridging-the-gap-between-deep-learning-research-and-production)\n    - [So why Arraymancer ?](#so-why-arraymancer-)\n  - [Future ambitions](#future-ambitions)\n\n<!-- /TOC -->\n\n## Installation\n\nNim is available in some Linux repositories and on Homebrew for macOS.\n\nI however recommend installing Nim in your user profile via [``choosenim``](https://github.com/dom96/choosenim). Once choosenim installed Nim, you can `nimble install arraymancer` which will pull the latest arraymancer release and all its dependencies.\n\nTo install Arraymancer development version you can use `nimble install arraymancer@#head`.\n\nArraymancer requires a BLAS and a LAPACK library.\n\n- On Windows you can get the [OpenBLAS](https://www.openblas.net) library, which combines BLAS and LAPACK into a single DLL (`libopenblas.dll`), from the binary packages section of the OpenBLAS web page. Alternatively you can download separate BLAS and LAPACK libraries from the [LAPACK for Windows](https://icl.cs.utk.edu/lapack-for-windows/lapack/) site. You must then copy or extract those DLLs into a folder on your path or into the folder containing your compilation target.\n- On MacOS, Apple Accelerate Framework is included in all MacOS versions and provides those.\n- On Linux, you can download libopenblas and liblapack through your package manager.\n\nWindows users may have to download `libopenblas.dll` from the binary releases\n  section of [openblas](https://www.openblas.net), extract it to the compilation\n\n## Full documentation\n\nDetailed API is available at Arraymancer official [documentation](https://mratsim.github.io/Arraymancer/). Note: This documentation is only generated for 0.X release. Check the [examples folder](examples/) for the latest devel evolutions.\n\n## Features\n\nFor now Arraymancer is mostly at the multidimensional array stage, in particular Arraymancer offers the following:\n\n- Basic math operations generalized to tensors (sin, cos, ...)\n- Matrix algebra primitives: Matrix-Matrix, Matrix-Vector multiplication.\n- Easy and efficient slicing including with ranges and steps.\n- No need to worry about \"vectorized\" operations.\n- Broadcasting support. Unlike Numpy it is explicit, you just need to use `+.` instead of `+`.\n- Plenty of reshaping operations: concat, reshape, split, chunk, permute, transpose.\n- Supports tensors of up to 6 dimensions. For example a stack of 4 3D RGB minifilms of 10 seconds would be 6 dimensions:\n  `[4, 10, 3, 64, 1920, 1080]` for `[nb_movies, time, colors, depth, height, width]`\n- Can read and write .csv, Numpy (.npy) and HDF5 files.\n- OpenCL and Cuda backed tensors (not as feature packed as CPU tensors at the moment).\n- Covariance matrices.\n- Eigenvalues and Eigenvectors decomposition.\n- Least squares solver.\n- K-means and PCA (Principal Component Analysis).\n\n### Arraymancer as a Deep Learning library\n\nDeep learning features can be explored but are considered unstable while I iron out their final interface.\n\nReminder: The final interface is still **work in progress.**\n\nYou can also watch the following animated [neural network demo](https://github.com/Vindaar/NeuralNetworkLiveDemo) which shows live training via [nim-plotly](https://github.com/brentp/nim-plotly).\n\n#### Fizzbuzz with fully-connected layers (also called Dense, Affine or Linear layers)\n\nNeural network definition extracted from [example 4](examples/ex04_fizzbuzz_interview_cheatsheet.nim).\n\n```Nim\nimport arraymancer\n\nconst\n  NumDigits = 10\n  NumHidden = 100\n\nnetwork FizzBuzzNet:\n  layers:\n    hidden: Linear(NumDigits, NumHidden)\n    output: Linear(NumHidden, 4)\n  forward x:\n    x.hidden.relu.output\n\nlet\n  ctx = newContext Tensor[float32]\n  model = ctx.init(FizzBuzzNet)\n  optim = model.optimizer(SGD, 0.05'f32)\n# ....\necho answer\n# @[\"1\", \"2\", \"fizz\", \"4\", \"buzz\", \"6\", \"7\", \"8\", \"fizz\", \"10\",\n#   \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"fizz\", \"19\", \"buzz\",\n#   \"fizz\", \"22\", \"23\", \"24\", \"buzz\", \"26\", \"fizz\", \"28\", \"29\", \"30\",\n#   \"31\", \"32\", \"fizz\", \"34\", \"buzz\", \"36\", \"37\", \"38\", \"39\", \"40\",\n#   \"41\", \"fizz\", \"43\", \"44\", \"fizzbuzz\", \"46\", \"47\", \"fizz\", \"49\", \"50\",\n#   \"fizz\", \"52\",\"53\", \"54\", \"buzz\", \"56\", \"fizz\", \"58\", \"59\", \"fizzbuzz\",\n#   \"61\", \"62\", \"63\", \"64\", \"buzz\", \"fizz\", \"67\", \"68\", \"fizz\", \"buzz\",\n#   \"71\", \"fizz\", \"73\", \"74\", \"75\", \"76\", \"77\",\"fizz\", \"79\", \"buzz\",\n#   \"fizz\", \"82\", \"83\", \"fizz\", \"buzz\", \"86\", \"fizz\", \"88\", \"89\", \"90\",\n#   \"91\", \"92\", \"fizz\", \"94\", \"buzz\", \"fizz\", \"97\", \"98\", \"fizz\", \"buzz\"]\n```\n\n#### Handwritten digit recognition with convolutions\n\nNeural network definition extracted from [example 2](examples/ex02_handwritten_digits_recognition.nim).\n\n```Nim\nimport arraymancer\n\nnetwork DemoNet:\n  layers:\n    cv1:        Conv2D(@[1, 28, 28], out_channels = 20, kernel_size = (5, 5))\n    mp1:        Maxpool2D(cv1.out_shape, kernel_size = (2,2), padding = (0,0), stride = (2,2))\n    cv2:        Conv2D(mp1.out_shape, out_channels = 50, kernel_size = (5, 5))\n    mp2:        MaxPool2D(cv2.out_shape, kernel_size = (2,2), padding = (0,0), stride = (2,2))\n    fl:         Flatten(mp2.out_shape)\n    hidden:     Linear(fl.out_shape[0], 500)\n    classifier: Linear(500, 10)\n  forward x:\n    x.cv1.relu.mp1.cv2.relu.mp2.fl.hidden.relu.classifier\n\nlet\n  ctx = newContext Tensor[float32] # Autograd/neural network graph\n  model = ctx.init(DemoNet)\n  optim = model.optimizer(SGD, learning_rate = 0.01'f32)\n\n# ...\n# Accuracy over 90% in a couple minutes on a laptop CPU\n```\n\n#### Sequence classification with stacked Recurrent Neural Networks\n\nNeural network definition extracted [example 5](examples/ex05_sequence_classification_GRU.nim).\n\n```Nim\nimport arraymancer\n\nconst\n  HiddenSize = 256\n  Layers = 4\n  BatchSize = 512\n\n\nnetwork TheGreatSequencer:\n  layers:\n    gru1: GRULayer(1, HiddenSize, 4) # (num_input_features, hidden_size, stacked_layers)\n    fc1: Linear(HiddenSize, 32)                  # 1 classifier per GRU layer\n    fc2: Linear(HiddenSize, 32)\n    fc3: Linear(HiddenSize, 32)\n    fc4: Linear(HiddenSize, 32)\n    classifier: Linear(32 * 4, 3)                # Stacking a classifier which learns from the other 4\n  forward x, hidden0:\n    let\n      (output, hiddenN) = gru1(x, hidden0)\n      clf1 = hiddenN[0, _, _].squeeze(0).fc1.relu\n      clf2 = hiddenN[1, _, _].squeeze(0).fc2.relu\n      clf3 = hiddenN[2, _, _].squeeze(0).fc3.relu\n      clf4 = hiddenN[3, _, _].squeeze(0).fc4.relu\n\n    # Concat all\n    # Since concat backprop is not implemented we cheat by stacking\n    # Then flatten\n    result = stack(clf1, clf2, clf3, clf4, axis = 2)\n    result = classifier(result.flatten)\n\n# Allocate the model\nlet\n  ctx = newContext Tensor[float32]\n  model = ctx.init(TheGreatSequencer)\n  optim = model.optimizer(SGD, 0.01'f32)\n\n# ...\nlet exam = ctx.variable([\n    [float32 0.10, 0.20, 0.30], # increasing\n    [float32 0.10, 0.90, 0.95], # increasing\n    [float32 0.45, 0.50, 0.55], # increasing\n    [float32 0.10, 0.30, 0.20], # non-monotonic\n    [float32 0.20, 0.10, 0.30], # non-monotonic\n    [float32 0.98, 0.97, 0.96], # decreasing\n    [float32 0.12, 0.05, 0.01], # decreasing\n    [float32 0.95, 0.05, 0.07]  # non-monotonic\n  ])\n# ...\necho answer.unsqueeze(1)\n# Tensor[ex05_sequence_classification_GRU.SeqKind] of shape [8, 1] of type \"SeqKind\" on backend \"Cpu\"\n# \t  Increasing|\n# \t  Increasing|\n# \t  Increasing|\n# \t  NonMonotonic|\n# \t  NonMonotonic|\n# \t  Increasing| <----- Wrong!\n# \t  Decreasing|\n# \t  NonMonotonic|\n```\n\n#### Composing models\n\nNetwork models can also act as layers in other network definitions.\nThe handwritten-digit-recognition model above can also be written like this:\n\n```Nim\nimport arraymancer\n\nnetwork SomeConvNet:\n  layers h, w:\n    cv1:        Conv2D(@[1, h, w], 20, (5, 5))\n    mp1:        Maxpool2D(cv1.out_shape, (2,2), (0,0), (2,2))\n    cv2:        Conv2D(mp1.out_shape, 50, (5, 5))\n    mp2:        MaxPool2D(cv2.out_shape, (2,2), (0,0), (2,2))\n    fl:         Flatten(mp2.out_shape)\n  forward x:\n    x.cv1.relu.mp1.cv2.relu.mp2.fl\n\n# this model could be initialized like this: let model = ctx.init(SomeConvNet, h = 28, w = 28)\n\n# functions `out_shape` and `in_shape` returning a `seq[int]` are convention (but not strictly necessary)\n# for layers/models that have clearly defined output and input size\nproc out_shape*[T](self: SomeConvNet[T]): seq[int] =\n  self.fl.out_shape\nproc in_shape*[T](self: SomeConvNet[T]): seq[int] =\n  self.cv1.in_shape\n\nnetwork DemoNet:\n  layers:\n  # here we use the previously defined SomeConvNet as a layer\n    cv:         SomeConvNet(28, 28)\n    hidden:     Linear(cv.out_shape[0], 500)\n    classifier: Linear(hidden.out_shape[0], 10)\n  forward x:\n    x.cv.hidden.relu.classifier\n```\n\n#### Custom layers\n\nIt is also possible to create fully custom layers.\nThe documentation for this can be found in the [official API documentation](https://mratsim.github.io/Arraymancer/nn_dsl.html).\n\n### Tensors on CPU, on Cuda and OpenCL\n\nTensors, CudaTensors and CLTensors do not have the same features implemented yet.\nAlso CudaTensors and CLTensors can only be float32 or float64 while CpuTensors can be integers, string, boolean or any custom object.\n\nHere is a comparative table of the core features.\n\n| Action                                            | Tensor                      | CudaTensor                 | ClTensor                   |\n| ------------------------------------------------- | --------------------------- | -------------------------- | -------------------------- |\n| Accessing tensor properties                       | [x]                         | [x]                        | [x]                        |\n| Tensor creation                                   | [x]                         | by converting a cpu Tensor | by converting a cpu Tensor |\n| Accessing or modifying a single value             | [x]                         | []                         | []                         |\n| Iterating on a Tensor                             | [x]                         | []                         | []                         |\n| Slicing a Tensor                                  | [x]                         | [x]                        | [x]                        |\n| Slice mutation `a[1,_] = 10`                      | [x]                         | []                         | []                         |\n| Comparison `==`                                   | [x]                         | []                         | []                         |\n| Element-wise basic operations                     | [x]                         | [x]                        | [x]                        |\n| Universal functions                               | [x]                         | []                         | []                         |\n| Automatically broadcasted operations              | [x]                         | [x]                        | [x]                        |\n| Matrix-Matrix and Matrix-Vector multiplication    | [x]                         | [x]                        | [x]                        |\n| Displaying a tensor                               | [x]                         | [x]                        | [x]                        |\n| Higher-order functions (map, apply, reduce, fold) | [x]                         | internal only              | internal only              |\n| Transposing                                       | [x]                         | [x]                        | []                         |\n| Converting to contiguous                          | [x]                         | [x]                        | []                         |\n| Reshaping                                         | [x]                         | [x]                        | []                         |\n| Explicit broadcast                                | [x]                         | [x]                        | [x]                        |\n| Permuting dimensions                              | [x]                         | []                         | []                         |\n| Concatenating tensors along existing dimension    | [x]                         | []                         | []                         |\n| Squeezing singleton dimension                     | [x]                         | [x]                        | []                         |\n| Slicing + squeezing                               | [x]                         | []                         | []                         |\n\n## What's new in Arraymancer\n\nThe full changelog is available in [changelog.md](./changelog.md).\n\n## 4 reasons why Arraymancer\n\n### The Python community is struggling to bring Numpy up-to-speed\n\n- Numba JIT compiler\n- Dask delayed parallel computation graph\n- Cython to ease numerical computations in Python\n- Due to the GIL shared-memory parallelism (OpenMP) is not possible in pure Python\n- Use \"vectorized operations\" (i.e. don't use for loops in Python)\n\nWhy not use in a single language with all the blocks to build the most efficient scientific computing library with Python ergonomics.\n\nOpenMP batteries included.\n\n### A researcher workflow is a fight against inefficiencies\n\nResearchers in a heavy scientific computing domain often have the following workflow: Mathematica/Matlab/Python/R (prototyping) -> C/C++/Fortran (speed, memory)\n\nWhy not use in a language as productive as Python and as fast as C? Code once, and don't spend months redoing the same thing at a lower level.\n\n### Can be distributed almost dependency free\n\nArraymancer models can be packaged in a self-contained binary that only depends on a BLAS library like OpenBLAS, MKL or Apple Accelerate (present on all Mac and iOS).\n\nThis means that there is no need to install a huge library or language ecosystem to use Arraymancer. This also makes it naturally suitable for resource-constrained devices like mobile phones and Raspberry Pi.\n\n### Bridging the gap between deep learning research and production\n\nThe deep learning frameworks are currently in two camps:\n\n- Research: Theano, Tensorflow, Keras, Torch, PyTorch\n- Production: Caffe, Darknet, (Tensorflow)\n\nFurthermore, Python preprocessing steps, unless using OpenCV, often needs a custom implementation (think text/speech preprocessing on phones).\n\n- Managing and deploying Python (2.7, 3.5, 3.6) and packages version in a robust manner requires devops-fu (virtualenv, Docker, ...)\n- Python data science ecosystem does not run on embedded devices (Nvidia Tegra/drones) or mobile phones, especially preprocessing dependencies.\n- Tensorflow is supposed to bridge the gap between research and production but its syntax and ergonomics are a pain to work with. Like for researchers, you need to code twice, \"Prototype in Keras, and when you need low-level --> Tensorflow\".\n- Deployed models are static, there is no interface to add a new observation/training sample to any framework, what if you want to use a model as a webservice with online learning?\n\n[Relevant XKCD from Apr 30, 2018](https://xkcd.com/1987/)\n\n![Python environment mess](https://imgs.xkcd.com/comics/python_environment.png)\n\n### So why Arraymancer ?\n\nAll those pain points may seem like a huge undertaking however thanks to the Nim language, we can have Arraymancer:\n\n- Be as fast as C\n- Accelerated routines with Intel MKL/OpenBLAS or even NNPACK\n- Access to CUDA and CuDNN and generate custom CUDA kernels on the fly via metaprogramming.\n- Almost dependency free distribution (BLAS library)\n- A Python-like syntax with custom operators `a * b` for tensor multiplication instead of `a.dot(b)` (Numpy/Tensorflow) or `a.mm(b)` (Torch)\n- Numpy-like slicing ergonomics `t[0..4, 2..10|2]`\n- For everything that Nim doesn't have yet, you can use Nim bindings to C, C++, Objective-C or Javascript to bring it to Nim. Nim also has unofficial Python->Nim and Nim->Python wrappers.\n\n## Future ambitions\n\nBecause apparently to be successful you need a vision, I would like Arraymancer to be:\n\n- The go-to tool for Deep Learning video processing. I.e. `vid = load_video(\"./cats/youtube_cat_video.mkv\")`\n- Target javascript, WebAssembly, Apple Metal, ARM devices, AMD Rocm, OpenCL, you name it.\n- The base of a Starcraft II AI bot.\n- Target cryptominers FPGAs because they drove the price of GPUs for honest deep-learners too high.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F98C:3E1C8:17DE74:5DFB56:6AB929D2"},"text_sha256":"08027983a87c154049be94db95d785eb691abc91fd951128aa650239ce40a8b4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"doonny/PipeCNN","input_row":{"repository":"doonny/PipeCNN","url":"https://github.com/doonny/PipeCNN","name":"PipeCNN","owner":"doonny","description":"An OpenCL-based FPGA Accelerator for Convolutional Neural Networks","language":"C","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1391,"issues":178,"created_at":"2016-11-07T12:41:32Z","updated_at":"2026-09-26T22:06:51Z","first_commit_at":"2016-11-07T12:41:32Z","last_commit_at":"2022-02-14T23:59:30Z","activity_months":63.25,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:05.058Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"doonny/PipeCNN","visibility":"public","created_at":"2016-11-07T12:41:32Z","updated_at":"2026-09-26T22:06:51Z","private":false,"fork":false,"archived":false,"stargazers_count":1391,"open_issues_count":44,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2843","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CE:180242:17E60EE:1C076B5:6AB929D5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2842","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093B:280FBC:17B0971:1BD0E57:6AB929D5"},"commit":{"sha":"e63a9b7a7dc55e651193a85c474086f3e08f0835","url":"https://github.com/doonny/PipeCNN/commit/e63a9b7a7dc55e651193a85c474086f3e08f0835","date":"2018-04-22T04:02:52Z","author_date":"2018-04-22T04:02:52Z","committer_date":"2018-04-22T04:02:52Z","tree_sha":"4afa768e3f921a2646b7c77176559ba2ff9dbba2","message_first_line":"fix bugs"},"tree_request_status":200,"tree_rate":{"github_remaining":"2841","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DA:37D6E2:1800672:1C21FDB:6AB929D5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5877,"blob_sha":"6c0f639216f8e698d80040be8cebd2d2b172747d","priority":0}],"documents":[{"path":"README.md","size":5877,"blob_sha":"6c0f639216f8e698d80040be8cebd2d2b172747d","priority":0,"status":200,"text":"# PipeCNN\n\n## About \n**PipeCNN** is an OpenCL-based FPGA Accelerator for Large-Scale Convolutional Neural Networks (CNNs).\nThere is a growing trend among the FPGA community to utilize High Level Synthesis (HLS) tools to design\nand implement customized circuits on FPGAs. Compared with RTL-based design methodology, the HLS tools provide faster hardware development\ncycle by automatically synthesizing an algorithm in high-level languages (e.g. C/C++) to RTL/hardware. [OpenCL™](https://www.khronos.org/opencl/) is an open, emergying cross-platform parallel programming language that can be used in both GPU and FPGA developments. The main goal of this project is to provide a generic, yet efficient OpenCL-based design of CNN accelerator on FPGAs. Our design is scalable both in performance and hardware resource, and thus can be deployed on a variety of FPGA platforms.\n\n## How to Use\n\nFirst, download the pre-trained CNN models, input test vectors and golden reference files from PipeCNN's own [ModelZoo](https://github.com/doonny/PipeCNN/tree/master/data). Place the data in the correct folder. Compile the project by using the Makefile provided. After finishing the compilation, simply type the following command to run PipeCNN:\n```\n./run.exe conv.aocx\n```\nFor users who are using Xilinx's SDx environments, it is recommended to use the IDE instead of makefiles. Currently, only Intel's OpenCL SDK v16.1 and Xilinx's SDAccel v2017.2 are supported. Please carefully read the [User Instructions](https://github.com/doonny/PipeCNN/tree/master/documents) before using.\n\n## Boards and Performances\nCurrently, we use [Intel's OpenCL SDK](https://www.altera.com/products/design-software/embedded-software-developers/opencl/overview.html) v16.1 toolset for compilation of the OpenCL code and implementation of the generated RTL on Altera's FPGAs. For Xilinx FPGAs, the [SDAccel](https://www.xilinx.com/products/design-tools/software-zone/sdaccel.html) development environment v2017.2 can be used. PipeCNN has been tested and evaluated on the following FPGA boards/platforms. Noting that SDSoC has not been fully tested, and if you have any results, please kindly email us the latest updates.\n\nThe following boards have been tested by using Intel OpenCL SDK v16.1:\n* Terasic's [DE5-net](http://www.terasic.com.cn/cgi-bin/page/archive.pl?Language=China&CategoryNo=179&No=727) (Stratix-V A7 FPGA)\n* Terasic's [DE5a-net](http://www.terasic.com.cn/cgi-bin/page/archive.pl?Language=China&CategoryNo=251&No=988) (Arria-10 1150 FPGA)\n* Terasic's [DE1-soc](http://www.terasic.com.cn/cgi-bin/page/archive.pl?Language=China&CategoryNo=180&No=870) (Cyclone-V SEA5 FPGA)\n* Terasic's [DE10-standard](http://www.terasic.com.cn/cgi-bin/page/archive.pl?Language=China&CategoryNo=180&No=1105) (Cyclone-V SXC6 FPGA)\n* Speed-Clouds' [SC-IMB+SC-VMB](http://speed-clouds.com/index.php?c=news&a=page&id=74) (Arria-10 SX480)\n\nThe following boards have been tested by using Xilinx SDAccel v2017.2:\n* Xilinx's [KCU1500](https://www.xilinx.com/products/boards-and-kits/dk-u1-kcu1500-g.html) (XCKU115 FPGA)\n\nThis following table lists the performance and cost information on some of the boards we used as a reference. For each FPGA device, one needs to perform design space exploration (with hardware parameters VEC_SIZE, LANE_NUM and CONV_GP_SIZE_X) to find the optimal design that maximizes the throughput or minimizes the excution time. Suggested hardware parameters for the above boards are summarized [here](https://github.com/doonny/PipeCNN/tree/master/documents). Since we are constantly optimzing the design and updating the codes, the performance data in the following table might be out-dated, and please use the latest version to get the exect data. We welcome other vendors/researches to provide the latest performance and cost information on other FPGA platforms/boards.\n\n| Boards     | Excution Time* | Batch Size | DSP Consumed |  Frequency|\n| :--------: |--------------:| ----------:| ------------:|----------:|\n| DE1-soc    |         150ms |          1 |            68|     122MHz|\n| DE5-net    |          15ms |         16 |           228|     206MHz|\n\n*Note: AlexNet was used as the benchmark. Image size is 227x227x3.\n\n## Demos\nNow you can run ImageNet classification on PipeCNN, and measure the top-1/5 accuracy on your own dataset.\n\nFirst, set **USE_OPENCV = 1** in the Makefile. Secondly, download the ImageNet validation dataset, extract and place all the pictures in the \"/data\" folder. Rename the variable \"picture_file_path_head\" in the host file to indicate the correct image data set path. Finally, recompile the host program and run PipeCNN.\n\nThe following piture shows that the demo runs on our own computer with the DE5-net board.\n\n![DE5-net-Demo](documents/Demo-DE5-net.gif)\n\n## Update Plans\n* Support for sparse or Winograd-based convolution algorithms.\n* Implementation of Faster-RCNN and YOLO9000.\n\n## Citation\nPlease kindly cite our work of PipeCNN if it helps your research:\n```\nDong Wang, Ke Xu and Diankun Jiang, “PipeCNN: An OpenCL-Based Open-Source FPGA Accelerator for Convolution Neural Networks”, FPT 2017.\n```\n\n\n\n## Related Works\nThere are other FPGA accelerators that also adopt HLS-based design scheme. Some brilliant works are listed as follow. Note that PipeCNN is the first, and only one that is Open-Source （￣︶￣）↗\n* U. Aydonat, S. O'Connell, D. Capalija, A. C. Ling, and G. R. Chiu. \"An OpenCL™ Deep Learning Accelerator on Arria 10,\" *in Proc. FPGA 2017*.\n* N. Suda, V. Chandra, G. Dasika, A. Mohanty, Y. F. Ma, S. Vrudhula, J. S. Seo, and Y. Cao, \"Throughput-Optimized OpenCL-based FPGA accelerator for large-scale convolutional neural networks,\" *in Proc. FPGA 2016*.\n* C. Zhang, P. Li, G. Sun, Y. Guan, B. J. Xiao, and J. Cong, \"Optimizing FPGA-based accelerator design for deep convolutional neural networks,\" *in Proc. FPGA 2015*.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8088:3E1C8:17DE8C:5DFB9B:6AB929D3"},"text_sha256":"dc37e8c439adc262ab9dd87734a3c310c6b488e42d91a15cb3e2954a226d3615"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2840","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E4:B1202:1791F41:1BB2E3E:6AB929D6"},"commit":{"sha":"392692b86747096e4324098deb38d8e93159809e","url":"https://github.com/doonny/PipeCNN/commit/392692b86747096e4324098deb38d8e93159809e","date":"2022-02-14T23:59:30Z","author_date":"2022-02-14T23:59:30Z","committer_date":"2022-02-14T23:59:30Z","tree_sha":"fcd0245b093df07b8b5a59933abae117481aa089","message_first_line":"update google drive"},"tree_request_status":200,"tree_rate":{"github_remaining":"2839","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A2:62B94:17B2BA8:1BD4174:6AB929D6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6694,"blob_sha":"95d7b8ca4571fc7470426e98d35ed3e54af7c087","priority":0}],"documents":[{"path":"README.md","size":6694,"blob_sha":"95d7b8ca4571fc7470426e98d35ed3e54af7c087","priority":0,"status":200,"text":"# PipeCNN\n\n## About \n**PipeCNN** is an OpenCL-based FPGA Accelerator for Large-Scale Convolutional Neural Networks (CNNs).\nThere is a growing trend among the FPGA community to utilize High Level Synthesis (HLS) tools to design\nand implement customized circuits on FPGAs. Compared with RTL-based design methodology, the HLS tools provide faster hardware development\ncycle by automatically synthesizing an algorithm in high-level languages (e.g. C/C++) to RTL/hardware. [OpenCL™](https://www.khronos.org/opencl/) is an open, emergying cross-platform parallel programming language that can be used in both GPU and FPGA developments. The main goal of this project is to provide a generic, yet efficient OpenCL-based design of CNN accelerator on FPGAs. PipeCNN utilizes ***Pipe**lined **CNN*** functional kernels to achieved improved throughput in inference computation. Our design is scalable both in performance and hardware resource, and thus can be deployed on a variety of FPGA platforms. PipeCNN supports both Intel OpenCL SDK and Xilinx Vitis based FPGA design flow.\n\n## How to Use\n\nFirst, download the pre-trained CNN models, input test vectors and golden reference files from PipeCNN's own ModelZoo (instructions are located in the \"data\" folder inside each project folder). Place the data in the correct folder. Then, compile the project by using the Makefile provided. After finishing the compilation, simply type the following command to run PipeCNN:\n```\n./run.exe conv.aocx\n```\nThe ModelZoo now provides pre-quantized model for the following networks:\n* VGG-16\n* ResNet-50\n\nFor more detailed instructions, please check out the [User Instructions](https://github.com/doonny/PipeCNN/tree/master/documents).\n\n## Supported Tools\nCurrently, we are using [Intel's OpenCL SDK](https://www.intel.com/content/www/us/en/software/programmable/sdk-for-opencl/overview.html) and [Xilinx Vitis](https://china.xilinx.com/products/design-tools/vitis/vitis-platform.html) tool kit to compile of the OpenCL/HLS code and implementate of the generated RTL on FPGAs. \n\n* Intel OpenCL SDK Pro v20.1\n* Xilinx Vitis 2020.1\n\n## Tested Boards\nThe following boards have been tested working:\n* Terasic's DE5a-net-ddr4 (Arria-10 GX1150 FPGA)\n* Intel's Arria-10 Dev Kit (Arria-10 GX1150 FPGA)\n* Xilinx's U50 Acceleration Card (VU35P FPGA)\n* Xilinx's ZCU102 Dev Board (ZU9EG FPGA)\n* Xilinx's ZC706 Dev Board (Zynq-7045 FPGA)\n\nPipeCNN may also run on other FPGA boards, which includes Terasic's DE10-standard/DE10-nano, Intel's PAC cards, Xilinx Ultra96-v2 boards. However, due to limited time and resourse, we have not verified that yet. Please let us know if you would like to share your results on other FPGA boards.\n\n## Demos\nNow you can run classification on the ImageNet dataset by using PipeCNN, and measure the top-1/5 accuracy for different CNN models.\n\nTo run this demo, first, set **USE_OPENCV = 1** in the Makefile. Secondly, download the ImageNet validation dataset, extract and place all the pictures in the \"/data\" folder. Rename the variable \"picture_file_path_head\" in the host file to indicate the correct image data set path. Finally, recompile the host program and run PipeCNN.\n\nThe following piture shows that the demo runs on our own computer with the DE5-net board.\n\n![DE5-net-Demo](documents/Demo-DE5-net.gif)\n\n## Performances\nIt's been four years since the release of the this project. Deep Learning Architecture (DLA) is constantly evolving, and lots of new techniques have been invented to improve the efficiency of DLA. The performance of PipeCNN is no longer comparable to the state-of-the-art designs. Therefore, the current goal of this project is to provide a complete design that can be used to learn DLA and try out new ideas. \n\nThis following table lists the performance and cost information on some of the boards we used as a reference. For each FPGA device, one needs to perform design space exploration (with hardware parameters VEC_SIZE, LANE_NUM and CONV_GP_SIZE_X) to find the optimal design that maximizes the throughput or minimizes the excution time. Suggested hardware parameters for the above boards are summarized [here](https://github.com/doonny/PipeCNN/tree/master/documents). Since we are constantly optimzing the design and updating the codes, the performance data in the following table might be out-dated, and please use the latest version to get the exect data. We welcome other vendors/researches to provide the latest performance and cost information on other FPGA platforms/boards.\n\n| Boards     | Excution Time* | Batch Size | DSP Consumed |  Frequency|\n| :--------: |--------------:| ----------:| ------------:|----------:|\n| DE5a-net-ddr4    |          -- |         -- |           --|     --|\n\n*Note: ResNet-50 was used as the benchmark. Image size is 227x227x3.\n\n## Citation\nPlease kindly cite our work of PipeCNN if it helped your research:\n```\nDong Wang, Ke Xu and Diankun Jiang, “PipeCNN: An OpenCL-Based Open-Source FPGA Accelerator for Convolution Neural Networks”, FPT 2017.\n```\nArchitectural and algorithm level optimizations can be conducted to further improve the performance of PipeCNN. We list a few latest research achievements that are based on PipeCNN for reference:\n* Improving the throughput by introducing a new opencl-friendly sparse-convolution algorithm\n```\nDong Wang, Ke Xu, Qun Jia and  Soheil Ghiasi, “ABM-SpConv: A Novel Approach to FPGA-Based Acceleration of Convolutional Neural Network Inference”, DAC 2019.\n```\n\n## Contributors\n\nThe following people have also contributed to this project:\n\n[Diankun Jiang](https://github.com/dkjiang2018), [Ke Xu](https://github.com/xuke225), Qun Jia, Jianjing An, Xiaoyun Wang, Shihang Fu, Zhihong Bai, Dezheng Zhang.\n\n## Research Opportunity\nOur Research Lab is also looking for outstanding students who are interested in designing hardware accelerator for deep-learning algorithms on FPGAs. Please send me a e-mail if you are interested.\n\n## Related Works\nThere are other FPGA accelerators that also adopt HLS-based design scheme. Some brilliant works are listed as follow. Note that PipeCNN is the first, and only one that is Open-Source （￣︶￣）↗\n* U. Aydonat, S. O'Connell, D. Capalija, A. C. Ling, and G. R. Chiu. \"An OpenCL™ Deep Learning Accelerator on Arria 10,\" *in Proc. FPGA 2017*.\n* N. Suda, V. Chandra, G. Dasika, A. Mohanty, Y. F. Ma, S. Vrudhula, J. S. Seo, and Y. Cao, \"Throughput-Optimized OpenCL-based FPGA accelerator for large-scale convolutional neural networks,\" *in Proc. FPGA 2016*.\n* C. Zhang, P. Li, G. Sun, Y. Guan, B. J. Xiao, and J. Cong, \"Optimizing FPGA-based accelerator design for deep convolutional neural networks,\" *in Proc. FPGA 2015*.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9218:3CC8A:17C249:5DE0D3:6AB929D6"},"text_sha256":"ad22162d5e79d53a64c22fe9db9f5f0ef9817dae5f5540e62b796cea5ca2daf7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"CSTR-Edinburgh/merlin","input_row":{"repository":"CSTR-Edinburgh/merlin","url":"https://github.com/CSTR-Edinburgh/merlin","name":"merlin","owner":"CSTR-Edinburgh","description":"This is now the official location of the Merlin project.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1321,"issues":439,"created_at":"2016-08-10T16:47:10Z","updated_at":"2026-08-07T05:44:18Z","first_commit_at":"2016-08-10T16:47:11Z","last_commit_at":"2019-06-27T10:25:43Z","activity_months":34.520000000000003,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:07.686Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"CSTR-Edinburgh/merlin","visibility":"public","created_at":"2016-08-10T16:47:10Z","updated_at":"2026-08-07T05:44:18Z","private":false,"fork":false,"archived":false,"stargazers_count":1321,"open_issues_count":207,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2838","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0810:72727:179E77F:1BBFE94:6AB929D7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2837","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0873:7418C:1806EC6:1C2863B:6AB929D8"},"commit":{"sha":"c3fb56393e726b86e87330dea7a8e8336791b6ca","url":"https://github.com/CSTR-Edinburgh/merlin/commit/c3fb56393e726b86e87330dea7a8e8336791b6ca","date":"2018-05-21T09:28:50Z","author_date":"2018-05-21T09:28:50Z","committer_date":"2018-05-21T09:28:50Z","tree_sha":"1e8f452bb0726101828580a2e214a5ee532de13f","message_first_line":"Update INSTALL.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2836","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EF:754BF:17C07EA:1BE2053:6AB929D8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3812,"blob_sha":"29afc0122fe2b8436cb43690bbc1a8b9f9b6cb2a","priority":0}],"documents":[{"path":"README.md","size":3812,"blob_sha":"29afc0122fe2b8436cb43690bbc1a8b9f9b6cb2a","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/CSTR-Edinburgh/merlin.svg?branch=master)](https://travis-ci.org/CSTR-Edinburgh/merlin)\n\n## Merlin: The Neural Network (NN) based Speech Synthesis System\n\nThis repository contains the Neural Network (NN) based Speech Synthesis System  \ndeveloped at the Centre for Speech Technology Research (CSTR), University of \nEdinburgh. \n\nMerlin is a toolkit for building Deep Neural Network models for statistical parametric speech synthesis. \nIt must be used in combination with a front-end text processor (e.g., Festival) and a vocoder (e.g., STRAIGHT or WORLD).\n\nThe system is written in Python and relies on the Theano numerical computation library.\n\nMerlin comes with recipes (in the spirit of the [Kaldi](https://github.com/kaldi-asr/kaldi) automatic speech recognition toolkit) to show you how to build state-of-the art systems.\n\nMerlin is free software, distributed under an Apache License Version 2.0, allowing unrestricted commercial and non-commercial use alike.\n\nRead the documentation at [cstr-edinburgh.github.io/merlin](https://cstr-edinburgh.github.io/merlin/).\n\nMerlin is compatible with: __Python 2.7-3.6__.\n\nInstallation\n------------\n\nMerlin uses the following dependencies:\n\n- numpy, scipy\n- matplotlib\n- bandmat\n- theano\n- tensorflow (optional, required if you use tensorflow models)\n- sklearn, keras, h5py (optional, required if you use keras models)\n\nTo install Merlin, `cd` merlin and run the below steps:\n\n- Install some basic tools in Merlin\n```sh\nbash tools/compile_tools.sh\n```\n- Install python dependencies\n```sh\npip install numpy \npip install -r requirements.txt\n```\n\nFor detailed instructions, to build the toolkit: see [INSTALL](https://github.com/CSTR-Edinburgh/merlin/blob/master/INSTALL.md) and [CSTR blog post](https://cstr-edinburgh.github.io/install-merlin/).  \nThese instructions are valid for UNIX systems including various flavors of Linux;\n\n\nGetting started with Merlin\n---------------------------\n\nTo run the example system builds, see `egs/README.txt`\n\nAs a first demo, please follow the scripts in `egs/slt_arctic`\n\nNow, you can also follow Josh Meyer's [blog post](http://jrmeyer.github.io/tts/2017/02/14/Installing-Merlin.html) for detailed instructions <br/> on how to install Merlin and build SLT demo voice.\n\nFor a more in-depth tutorial about building voices with Merlin, you can check out:\n\n- [Deep Learning for Text-to-Speech Synthesis, using the Merlin toolkit (Interspeech 2017 tutorial)](http://www.speech.zone/courses/one-off/merlin-interspeech2017)\n- [Arctic voices](https://cstr-edinburgh.github.io/merlin/getting-started/slt-arctic-voice)\n- [Build your own voice](https://cstr-edinburgh.github.io/merlin/getting-started/build-own-voice)\n\n\nSynthetic speech samples\n------------------------\n\nListen to [synthetic speech samples](https://cstr-edinburgh.github.io/merlin/demo.html) from our SLT arctic voice.\n\nDevelopment pattern for contributors\n------------------------------------\n\n1. [Create a personal fork](https://help.github.com/articles/fork-a-repo/)\nof the [main Merlin repository](https://github.com/CSTR-Edinburgh/merlin) in GitHub.\n2. Make your changes in a named branch different from `master`, e.g. you create\na branch `my-new-feature`.\n3. [Generate a pull request](https://help.github.com/articles/creating-a-pull-request/)\nthrough the Web interface of GitHub.\n\nContact Us\n----------\n\nPost your questions, suggestions, and discussions to [GitHub Issues](https://github.com/CSTR-Edinburgh/merlin/issues).\n\nCitation\n--------\n\nIf you publish work based on Merlin, please cite: \n\nZhizheng Wu, Oliver Watts, Simon King, \"[Merlin: An Open Source Neural Network Speech Synthesis System](http://ssw9.net/papers/ssw9_PS2-13_Wu.pdf)\" in Proc. 9th ISCA Speech Synthesis Workshop (SSW9), September 2016, Sunnyvale, CA, USA.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F83E:2B291E:182C2C:5E4B05:6AB929D8"},"text_sha256":"3ea3634cc5885828afd5bde2b2b3dbb06182f21a777bfc49c338d60fa18c9300"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2835","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0928:71C58:17AAB39:1BCC584:6AB929D9"},"commit":{"sha":"33fa6e65ddb903ed5633ccb66c74d3e7c128667f","url":"https://github.com/CSTR-Edinburgh/merlin/commit/33fa6e65ddb903ed5633ccb66c74d3e7c128667f","date":"2019-06-27T10:25:43Z","author_date":"2019-06-27T10:25:43Z","committer_date":"2019-06-27T10:25:43Z","tree_sha":"a2a72aa8ca8c8a3a13a289778667e31ec8ebad7c","message_first_line":"Merge pull request #450 from vitaly-zdanevich/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"2834","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093C:180242:17E6450:1C07A70:6AB929D9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3816,"blob_sha":"0e31a7d9d86b98fbf026c220d9c542207174b7e2","priority":0}],"documents":[{"path":"README.md","size":3816,"blob_sha":"0e31a7d9d86b98fbf026c220d9c542207174b7e2","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/CSTR-Edinburgh/merlin.svg?branch=master)](https://travis-ci.org/CSTR-Edinburgh/merlin)\n\n## Merlin: The Neural Network (NN) based Speech Synthesis System\n\nThis repository contains the Neural Network (NN) based Speech Synthesis System  \ndeveloped at the Centre for Speech Technology Research (CSTR), University of \nEdinburgh. \n\nMerlin is a toolkit for building Deep Neural Network models for statistical parametric speech synthesis. \nIt must be used in combination with a front-end text processor (e.g., Festival) and a vocoder (e.g., STRAIGHT or WORLD).\n\nThe system is written in Python and relies on the Theano numerical computation library.\n\nMerlin comes with recipes (in the spirit of the [Kaldi](https://github.com/kaldi-asr/kaldi) automatic speech recognition toolkit) to show you how to build state-of-the art systems.\n\nMerlin is free software, distributed under an Apache License Version 2.0, allowing unrestricted commercial and non-commercial use alike.\n\nRead the documentation at [cstr-edinburgh.github.io/merlin](https://cstr-edinburgh.github.io/merlin/).\n\nMerlin is compatible with: __Python 2.7-3.6__.\n\nInstallation\n------------\n\nMerlin uses the following dependencies:\n\n- numpy, scipy\n- matplotlib\n- bandmat\n- theano\n- tensorflow (optional, required if you use tensorflow models)\n- sklearn, keras, h5py (optional, required if you use keras models)\n\nTo install Merlin, `cd` merlin and run the below steps:\n\n- Install some basic tools in Merlin\n```sh\nbash tools/compile_tools.sh\n```\n- Install python dependencies\n```sh\npip install -r requirements.txt\n```\n\nFor detailed instructions, to build the toolkit: see [INSTALL](https://github.com/CSTR-Edinburgh/merlin/blob/master/INSTALL.md) and [CSTR blog post](https://cstr-edinburgh.github.io/install-merlin/).  \nThese instructions are valid for UNIX systems including various flavors of Linux;\n\n\nGetting started with Merlin\n---------------------------\n\nTo run the example system builds, see `egs/README.txt`\n\nAs a first demo, please follow the scripts in `egs/slt_arctic`\n\nNow, you can also follow Josh Meyer's [blog post](http://jrmeyer.github.io/tts/2017/02/14/Installing-Merlin.html) for detailed instructions <br/> on how to install Merlin and build SLT demo voice.\n\nFor a more in-depth tutorial about building voices with Merlin, you can check out:\n\n- [Deep Learning for Text-to-Speech Synthesis, using the Merlin toolkit (Interspeech 2017 tutorial)](http://www.speech.zone/courses/one-off/merlin-interspeech2017)\n- [Arctic voices](https://cstr-edinburgh.github.io/merlin/getting-started/slt-arctic-voice)\n- [Build your own voice](https://cstr-edinburgh.github.io/merlin/getting-started/build-own-voice)\n\n\nSynthetic speech samples\n------------------------\n\nListen to [synthetic speech samples](https://cstr-edinburgh.github.io/merlin/demo.html) from our SLT arctic voice.\n\nDevelopment pattern for contributors\n------------------------------------\n\n1. [Create a personal fork](https://help.github.com/articles/fork-a-repo/)\nof the [main Merlin repository](https://github.com/CSTR-Edinburgh/merlin) in GitHub.\n2. Make your changes in a named branch different from `master`, e.g. you create\na branch `my-new-feature`.\n3. [Generate a pull request](https://help.github.com/articles/creating-a-pull-request/)\nthrough the Web interface of GitHub.\n\nContact Us\n----------\n\nPost your questions, suggestions, and discussions to [GitHub Issues](https://github.com/CSTR-Edinburgh/merlin/issues).\n\nCitation\n--------\n\nIf you publish work based on Merlin, please cite: \n\nZhizheng Wu, Oliver Watts, Simon King, \"[Merlin: An Open Source Neural Network Speech Synthesis System](https://isca-speech.org/archive/SSW_2016/pdfs/ssw9_PS2-13_Wu.pdf)\" in Proc. 9th ISCA Speech Synthesis Workshop (SSW9), September 2016, Sunnyvale, CA, USA.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6318:324E19:17FDBA:5E1C33:6AB929D9"},"text_sha256":"279755b2e1e3e789906fe617a521954358417c14574cb60c2ff38fa5e24e5578"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tf-encrypted/tf-encrypted","input_row":{"repository":"tf-encrypted/tf-encrypted","url":"https://github.com/tf-encrypted/tf-encrypted","name":"tf-encrypted","owner":"tf-encrypted","description":"A Framework for Encrypted Machine Learning in TensorFlow","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1241,"issues":443,"created_at":"2018-03-21T18:22:13Z","updated_at":"2026-09-25T11:48:44Z","first_commit_at":"2018-03-21T18:23:11Z","last_commit_at":"2024-09-25T05:32:38Z","activity_months":78.170000000000002,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:10.351Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tf-encrypted/tf-encrypted","visibility":"public","created_at":"2018-03-21T18:22:13Z","updated_at":"2026-09-25T11:48:44Z","private":false,"fork":false,"archived":false,"stargazers_count":1241,"open_issues_count":144,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2833","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C0:6E4BB:17EFFE8:1C110DD:6AB929DA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2832","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092B:77994:17DD601:1BFED97:6AB929DA"},"commit":{"sha":"1e57e6ba47b379ad4cecf43f0ed20740b6c5c632","url":"https://github.com/tf-encrypted/tf-encrypted/commit/1e57e6ba47b379ad4cecf43f0ed20740b6c5c632","date":"2018-03-21T18:23:11Z","author_date":"2018-03-21T18:23:11Z","committer_date":"2018-03-21T18:23:11Z","tree_sha":"ceaea8d3f88fb1524b2f07e6bbb2fa51e39bd749","message_first_line":"init"},"tree_request_status":200,"tree_rate":{"github_remaining":"2831","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:18042C8:1C25727:6AB929DB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13,"blob_sha":"0d2ee8853c0ec55eb57b857bb8e507237ed54f26","priority":0}],"documents":[{"path":"README.md","size":13,"blob_sha":"0d2ee8853c0ec55eb57b857bb8e507237ed54f26","priority":0,"status":200,"text":"# tensorspdz\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62D6:09BF:B1009:2DD270:6AB929D8"},"text_sha256":"ed63e25b072dc85f739c73527662c48bbafbd843c8081dacd08ddcd36efda6a9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2830","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D2:2D7D17:177714A:1B96E10:6AB929DB"},"commit":{"sha":"b2d89f05ac39f523cf1dd120c35af8c34ef2eaee","url":"https://github.com/tf-encrypted/tf-encrypted/commit/b2d89f05ac39f523cf1dd120c35af8c34ef2eaee","date":"2024-09-25T05:32:38Z","author_date":"2024-09-25T05:32:38Z","committer_date":"2024-09-25T05:32:38Z","tree_sha":"235f279bb0a0673b6aae1bb0602e56f367331ce7","message_first_line":"Fix bug: expected always unsigned, but result is signed for some params (#901)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2829","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A5:35D5A8:17C5249:1BE6BA6:6AB929DC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18623,"blob_sha":"95ca177918bdb4ed8b7420a2ba188ee1ef864c77","priority":0}],"documents":[{"path":"README.md","size":18623,"blob_sha":"95ca177918bdb4ed8b7420a2ba188ee1ef864c77","priority":0,"status":200,"text":"<img src=\"https://tinyurl.com/tfelogo\" width=\"65%\" />\n\nTF Encrypted is a framework for encrypted machine learning in TensorFlow. It looks and feels like TensorFlow, taking advantage of the ease-of-use of the Keras API while enabling training and prediction over encrypted data via secure multi-party computation and homomorphic encryption. TF Encrypted aims to make privacy-preserving machine learning readily available, without requiring expertise in cryptography, distributed systems, or high performance computing.\n\nSee below for more [background material](#background--further-reading), explore the [examples](./examples/), or visit the [documentation](./docs/) to learn more about how to use the library. \n\n[![Website](https://img.shields.io/website/https/tf-encrypted.io.svg)](https://tf-encrypted.io) [![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://tf-encrypted.readthedocs.io/en/latest/) [![PyPI](https://img.shields.io/pypi/v/tf-encrypted.svg)](https://pypi.org/project/tf-encrypted/) [![CircleCI Badge](https://circleci.com/gh/tf-encrypted/tf-encrypted/tree/master.svg?style=svg)](https://circleci.com/gh/tf-encrypted/tf-encrypted/tree/master)\n\n# Now, TF Encrypted is based on tensorflow 2 !\n\nTF1 execute computation by building a graph first, then run this graph in a session.\nThis is hard to use for a lot of developers, especially for researchers not major in computer science.\nTherefore, TF1 has very few users and is not maintained any more.\nSince TF Encrypted based on TF1, it face the same problem that TF1 has encountered.\nSo we update TF Encrypted, to rely on TF2 to support eager execution which makes development on TF Encrypted more easier.\nAt the same time, it also supports building graph implicitly by `tfe.function` to realize nearly the same performance as TF Encrypted based on TF1.\nUnfortunately, after updated, TF1 features like session and placeholder are not supported by TFE any more.\nFor those developers who want to use TF1 like TFE, we suggest them to use [version 0.8.0](https://github.com/tf-encrypted/tf-encrypted/tree/0.8.0).\n\n# Installation\n\nTF Encrypted is available as a package on [PyPI](https://pypi.org/project/tf-encrypted/) supporting Python 3.8+ and TensorFlow 2.9.1+:\n\n```bash\npip install tf-encrypted\n```\n\nCreating a conda environment to run TF Encrypted code can be done using:\n\n```\nconda create -n tfe python=3.8\nconda activate tfe\nconda install tensorflow notebook\npip install tf-encrypted\n```\n\nAlternatively, installing from source can be done using:\n\n```bash\ngit clone https://github.com/tf-encrypted/tf-encrypted.git\ncd tf-encrypted\npip install -e .\nmake build\n```\n\nThis latter is useful on platforms for which the pip package has not yet been compiled but is also needed for [development](./docs/CONTRIBUTING.md).\nNote that this will get you a working basic installation, yet a few more steps are required to match the performance and security of the version shipped in the pip package, see the [installation instructions](./docs/INSTALL.md).\n\n# Usage\n\nThe following is an example of simple matmul on encrypted data using TF Encrypted based on TF2, \nyou could execute matmul in eager mode or building a graph by `@tfe.function`. \n\n```python\nimport tensorflow as tf\nimport tf_encrypted as tfe\n\n@tfe.local_computation('input-provider')\ndef provide_input():\n    # normal TensorFlow operations can be run locally\n    # as part of defining a private input, in this\n    # case on the machine of the input provider\n    return tf.ones(shape=(5, 10))\n\n# provide inputs\nw = tfe.define_private_variable(tf.ones(shape=(10,10)))\nx = provide_input()\n\n# eager execution\ny = tfe.matmul(x, w)\nres = y.reveal().to_native()\n\n# build graph and run graph\n@tfe.function\ndef matmul_func(x, w)\n    y = tfe.matmul(x, w)\n    return y.reveal().to_native()\n\nres = matmul_func(x, w)\n```\n\nFor more information, check out the [documentation](./docs/) or the [examples](./examples/).\n\n# Performance\n\nAll tests are performed by using the ABY3 protocol among 3 machines, each with 4 cores (Intel Xeon Platinum 8369B CPU @ 2.70GHz), Ubuntu 18.04 (64bit), TensorFlow 2.9.1, Python 3.8.13 and pip 21.1.2. The LAN environment has a bandwidth of 40 Gbps and a RTT of 0.02 ms, and the WAN environment has a bandwidth of 352 Mbps and a RTT of 40 ms.\n\nYou can find source code of the following benchmarks in [`./examples/benchmark/`](./examples/benchmark/) and corresponding guidelines of how to reproduce them.\n\n## Benchmark 1: Sort and Max\n\nGraph building is a one-time cost, while LAN or WAN timings are average running time across multiple runs. \nFor example, it takes 152.5 seconds to build the graph for Resnet50 model, and afterwards, it only takes 19.1 seconds to predict each image.\n|                                   | Build graph<br/>(seconds) | LAN<br/>(seconds) | WAN<br/>(seconds) |\n| --------------------------------- | ------------------------- | ----------------- | ----------------- |\n| Sort/Max (2^10)<sup>1<\/sup>       | 5.26                      | 0.14              | 10.37             |\n| Sort/Max (2^16)<sup>1<\/sup>       | 14.06                     | 7.37              | 41.97             |\n| Max (2^10 $\\times$ 4)<sup>2<\/sup> | 5.63                      | 0.01              | 0.55              |\n| Max (2^16 $\\times$ 4)<sup>2<\/sup> | 5.81                      | 0.29              | 1.14              |\n\n<sup>1<\/sup> `Max` is implemented by using a sorting network, hence its performance is essentially the same as `Sort`. Sorting network can be efficiently constructed as a TF graph. The traditional way of computing `Max` by using a binary comparison tree does not work well in a TF graph, because the graph becomes huge when the number of elements is large.\n\n<sup>2<\/sup> This means 2^10 (respectively, 2^16) invocations of `max` on 4 elements, which is essentially a `MaxPool` with pool size of `2 x 2`.\n\n## Benchmark 2: Neural Network Inference\n\nWe show the strength of TFE by loading big TF models (e.g. RESNET50) and run private inference on top of it.\n\n|                                      | Build graph<br/> | LAN<br/>          | WAN<br/>     |\n| ------------------------------------ | ---------------- | ----------------- | ------------ |\n| VGG19 inference time (seconds)       | 105.18           | 49.63             | 139.63       |\n| RESNET50 inference time (seconds)    | 150.47           | 19.07<sup>1<\/sup> | 84.29        |\n| DENSENET121 inference time (seconds) | 344.55           | 33.53             | 151.43       |\n\n<sup>1<\/sup> This is currently one of the fastest implementation of secure RESNET50 inference (three-party). Comparable with [CryptGPU](https://eprint.iacr.org/2021/533) , [SecureQ8](https://eprint.iacr.org/2019/131), and faster than [CryptFLOW](https://arxiv.org/abs/1909.07814).\n\n## Benchmark 3: Neural Network Training\n\nWe benchmark the performance of training several neural network models on the MNIST dataset (60k training images, 10k test images, and batch size is 128). \nThe definitions of these models can be found in [`examples/models`](examples/models).\n\n|              | Accuracy (epochs) | Accuracy (epochs) | Seconds per Batch (LAN) | Seconds per Batch (LAN) | Seconds per Batch (WAN) | Seconds per Batch (WAN) |\n|:------------ |:-----------------:|:-----------------:|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|\n|              | MP-SPDZ           | TFE               | MP-SPDZ                 | TFE                     |  MP-SPDZ                | TFE                     |\n| A  (SGD)     | 96.7% (5)         | 96.5% (5)         | 0.098                   | 0.167                   | 9.724                   | 4.510                   |\n| A  (AMSgrad) | 97.8% (5)         | 97.4% (5)         | 0.228                   | 0.717                   | 21.038                  | 15.472                  |\n| A  (Adam )   | 97.4% (5)         | 97.4% (5)         | 0.221                   | 0.535                   | 50.963                  | 15.153                  |\n| B  (SGD)     | 97.5% (5)         | 98.6% (5)         | 0.571                   | 5.332                   | 60.755                  | 18.656                  |\n| B  (AMSgrad) | 98.6% (5)         | 98.7% (5)         | 0.680                   | 5.722                   | 71.983                  | 21.647                  |\n| B  (Adam)    | 98.8% (5)         | 98.8% (5)         | 0.772                   | 5.733                   | 98.108                  | 21.130                  |\n| C  (SGD)     | 98.5% (5)         | 98.7% (5)         | 1.175                   | 8.198                   | 91.341                  | 27.102                  |\n| C  (AMSgrad) | 98.9% (5)         | 98.9% (5)         | 1.568                   | 10.053                  | 119.271                 | 66.357                  |\n| C  (Adam)    | 99.0% (5)         | 99.1% (5)         | 2.825                   | 9.893                   | 195.013                 | 65.320                  |\n| D  (SGD)     | 97.6% (5)         | 97.1% (5)         | 0.134                   | 0.439                   | 15.083                  | 5.465                   |\n| D  (AMSgrad) | 98.4% (5)         | 97.4% (5)         | 0.228                   | 0.900                   | 26.099                  | 14.693                  |\n| D  (Adam)    | 98.2% (5)         | 97.6% (5)         | 0.293                   | 0.710                   | 54.404                  | 14.515                  |\n\nWe also give the performance of training a logistic regression model in the following table. This model is trained to classify two classes: small digits (0-4) vs large digits (5-9). Dataset can be found in [`examples/benchmark/training/lr_mnist_dataset.py`](examples/benchmark/training/lr_mnist_dataset.py)\n\n|              | Accuracy (epochs) | Seconds per Batch (LAN) | Seconds per Batch (WAN) |\n|:------------ |:-----------------:|:-----------------------:|:-----------------------:|\n| LR (SGD)     | 84.8% (5)         | 0.010                   | 0.844                   |\n| LR (AMSgrad) | 85.0% (5)         | 0.023                   | 1.430                   |\n| LR (Adam)    | 85.2% (5)         | 0.019                   | 1.296                   |\n\n# Roadmap\n\n- High-level APIs for combining privacy and machine learning. So far TF Encrypted is focused on its low-level interface but it's time to figure out what it means for interfaces such as Keras when privacy enters the picture.\n\n- Tighter integration with TensorFlow. This includes aligning with the upcoming TensorFlow 2.0 as well as figuring out how TF Encrypted can work closely together with related projects such as [TF Privacy](https://github.com/tensorflow/privacy) and [TF Federated](https://github.com/tensorflow/federated).\n\n- Support for third party libraries. While TF Encrypted has its own implementations of secure computation, there are other [excellent libraries](https://github.com/rdragos/awesome-mpc/) out there for both secure computation and homomorphic encryption. We want to bring these on board and provide a bridge from TensorFlow.\n\n<img src=\"https://raw.githubusercontent.com/tf-encrypted/assets/master/app-stack.png\" width=\"55%\" />\n\n# Background & Further Reading\n\nBlog posts:\n\n- [Introducing TF Encrypted](https://alibaba-gemini-lab.github.io/docs/blog/tfe/) walks through a simple example showing two data owners jointly training a logistic regression model using TF Encrypted on a vertically split dataset (*by Alibaba Gemini Lab*)\n\n- [Federated Learning with Secure Aggregation in TensorFlow](https://medium.com/dropoutlabs/federated-learning-with-secure-aggregation-in-tensorflow-95f2f96ebecd) demonstrates using TF Encrypted for secure aggregation of federated learning in pure TensorFlow (*by Justin Patriquin at Cape Privacy*)\n\n- [Encrypted Deep Learning Training and Predictions with TF Encrypted Keras](https://medium.com/dropoutlabs/encrypted-deep-learning-training-and-predictions-with-tf-encrypted-keras-557193284f44) introduces and illustrates first parts of our encrypted Keras interface (*by Yann Dupis at Cape Privacy*)\n\n- [Growing TF Encrypted](https://medium.com/dropoutlabs/growing-tf-encrypted-a1cb7b109ab5) outlines the roadmap and motivates TF Encrypted as a community project (*by Morten Dahl*)\n\n- [Experimenting with TF Encrypted](https://medium.com/dropoutlabs/experimenting-with-tf-encrypted-fe37977ff03c) walks through a simple example of turning an existing TensorFlow prediction model private (*by Morten Dahl and Jason Mancuso at Cape Privacy*)\n\n- [Secure Computations as Dataflow Programs](https://mortendahl.github.io/2018/03/01/secure-computation-as-dataflow-programs/) describes the initial motivation and implementation (*by Morten Dahl*)\n\nPapers:\n\n- [Privacy-Preserving Collaborative Machine Learning on Genomic Data using TensorFlow](https://arxiv.org/abs/2002.04344) outlines the [iDASH'19](http://www.humangenomeprivacy.org/2019/) winning solution built on TF Encrypted (*by Cheng Hong, et al.*)\n\n- [Crypto-Oriented Neural Architecture Design](https://arxiv.org/abs/1911.12322) uses TF Encrypted to benchmark ML optimizations made to better support the encrypted domain (*by Avital Shafran, Gil Segev, Shmuel Peleg, and Yedid Hoshen*)\n\n- [Private Machine Learning in TensorFlow using Secure Computation](https://arxiv.org/abs/1810.08130) further elaborates on the benefits of the approach, outlines the adaptation of a secure computation protocol, and reports on concrete performance numbers (*by Morten Dahl, Jason Mancuso, Yann Dupis, et al.*)\n\nPresentations:\n\n- [Privacy-Preserving Machine Learning with TensorFlow](https://github.com/capeprivacy/tf-world-tutorial), TF World 2019 (*by Jason Mancuso and Yann Dupis at Cape Privacy*); see also the [slides](https://github.com/capeprivacy/tf-world-tutorial/blob/master/TensorFlow-World-Tutorial-2019-final.pdf)\n\n- [Privacy-Preserving Machine Learning in TensorFlow with TF Encrypted](https://conferences.oreilly.com/artificial-intelligence/ai-ny-2019/public/schedule/detail/76542), O'Reilly AI 2019 (*by Morten Dahl at Cape Privacy*); see also the [slides](https://github.com/mortendahl/talks/blob/master/OReillyAI19-slides.pdf)\n\nOther:\n\n- [Privacy Preserving Deep Learning – PySyft Versus TF Encrypted](https://blog.exxactcorp.com/privacy-preserving-deep-learning-pysyft-tfencrypted/) makes a quick comparison between PySyft and TF Encrypted, correctly hitting on our goal of being the encryption backend in PySyft for TensorFlow (*by Exxact*)\n\n- [Bridging Microsoft SEAL into TensorFlow](https://medium.com/dropoutlabs/bridging-microsoft-seal-into-tensorflow-b04cc2761ad4) takes a first step towards integrating the Microsoft SEAL homomorphic encryption library and some of the technical challenges involved (*by Justin Patriquin at Cape Privacy*)\n\n# Development and Contribution\n\nTF Encrypted is open source community project developed under the Apache 2 license and maintained by a set of core developers. We welcome contributions from all individuals and organizations, with further information available in our [contribution guide](./docs/CONTRIBUTING.md). We invite any organizations interested in [partnering](#organizational-contributions) with us to reach out via [email](mailto:contact@tf-encrypted.io).\n\nDon't hesitate to send a pull request, open an issue, or ask for help! We use [ZenHub](https://www.zenhub.com/extension) to plan and track GitHub issues and pull requests.\n\n## Individual contributions\n\nWe appreciate the efforts of [all contributors](https://github.com/tf-encrypted/tf-encrypted/graphs/contributors) that have helped make TF Encrypted what it is! Below is a small selection of these, generated by [sourcerer.io](https://sourcerer.io/) from most recent stats:\n\n[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/0)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/0)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/1)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/1)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/2)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/2)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/3)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/3)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/4)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/4)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/5)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/5)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/6)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/6)[![](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/images/7)](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/7)\n\n## Organizational contributions\n\nWe are very grateful for the significant contributions made by the following organizations!\n\n<table>\n    <tr>\n        <td><a href=\"https://capeprivacy.com/\"><img src=\"https://raw.githubusercontent.com/tf-encrypted/assets/master/other/capeprivacy-logo.png\" alt=\"Cape Privacy\" width=\"150\"/><\/a><\/td>\n        <td><a href=\"https://www.alibabagroup.com/\"><img src=\"https://raw.githubusercontent.com/tf-encrypted/assets/master/other/alibaba-logo.png\" alt=\"Alibaba Security Group\" width=\"150\"/><\/a><\/td>\n        <td><a href=\"https://openmined.org/\"><img src=\"https://raw.githubusercontent.com/tf-encrypted/assets/master/other/openmined-logo.png\" alt=\"OpenMined\" width=\"150\"/><\/a><\/td>\n    <\/tr>\n<\/table>\n\n# Project Status\n\nTF Encrypted is experimental software not currently intended for use in production environments. The focus is on building the underlying primitives and techniques, with some practical security issues postponed for a later stage. However, care is taken to ensure that none of these represent fundamental issues that cannot be fixed as needed.\n\n## Known limitations\n\n- Elements of TensorFlow's networking subsystem does not appear to be sufficiently hardened against malicious users. Proxies or other means of access filtering may be sufficient to mitigate this.\n\n## Support\n\nPlease open an [issue](https://github.com/tf-encrypted/tf-encrypted/issues), or send an email to [contact@tf-encrypted.io](mailto:contact@tf-encrypted.io).\n\n# License\n\nLicensed under Apache License, Version 2.0 (see [LICENSE](./LICENSE) or http://www.apache.org/licenses/LICENSE-2.0). Copyright as specified in [NOTICE](./NOTICE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5400:B08CF:173F4C:5D5EA8:6AB929DC"},"text_sha256":"97861f192984a57230c8b5722193705296667cb498592de63b0a362ffe5d75ff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=b2d89f05ac39f523cf1dd120c35af8c34ef2eaee; file=README.md; text=TF Encrypted is a framework for encrypted machine learning in TensorFlow. It looks and feels like TensorFlow, taking advantage of the ease-of-use of the Keras API while enabling training and prediction over encrypted data via secure multi-party computation and homomorphic encryption. TF Encrypted aims to make privacy-preserving machine learning readily available, without requiring expertise in cryptography, distributed systems, or high performance computing.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=b2d89f05ac39f523cf1dd120c35af8c34ef2eaee; file=README.md; text=TF Encrypted is a framework for encrypted machine learning in TensorFlow. It looks and feels like TensorFlow, taking advantage of the ease-of-use of the Keras API while enabling training and prediction over encrypted data via secure multi-party computation and homomorphic encryption. TF Encrypted aims to make privacy-preserving machine learning readily available, without requiring expertise in cryptography, distributed systems, or high performance computing."}}}}
{"repository":"huoyijie/AdvancedEAST","input_row":{"repository":"huoyijie/AdvancedEAST","url":"https://github.com/huoyijie/AdvancedEAST","name":"AdvancedEAST","owner":"huoyijie","description":" AdvancedEAST is an algorithm used for Scene image text detect, which is primarily based on EAST, and the significant improvement was also made, which make long text predictions more accurate.https://github.com/huoyijie/raspberrypi-car","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1227,"issues":122,"created_at":"2018-05-14T01:37:52Z","updated_at":"2026-09-17T10:56:59Z","first_commit_at":"2018-05-14T01:37:53Z","last_commit_at":"2021-03-06T08:53:20Z","activity_months":33.75,"ai_ml_match_topics":"deep-learning; machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:13.215Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"huoyijie/AdvancedEAST","visibility":"public","created_at":"2018-05-14T01:37:52Z","updated_at":"2026-09-17T10:56:59Z","private":false,"fork":false,"archived":false,"stargazers_count":1227,"open_issues_count":80,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2828","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17B7A70:1BD881E:6AB929DD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2827","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17DBC45:1BFD53E:6AB929DD"},"commit":{"sha":"8083414aee98b038cadbd2cd5d0d50e85776c0c4","url":"https://github.com/huoyijie/AdvancedEAST/commit/8083414aee98b038cadbd2cd5d0d50e85776c0c4","date":"2018-05-17T07:29:57Z","author_date":"2018-05-17T07:29:57Z","committer_date":"2018-05-17T07:29:57Z","tree_sha":"b5862ae39c50979cb94e8b2f6c1eeb0534a55205","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2826","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0797:280FBC:17B1028:1BD160E:6AB929DE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3620,"blob_sha":"fb3db4ee23b9bdccf88416a00d9c73f1ace9c04d","priority":0}],"documents":[{"path":"README.md","size":3620,"blob_sha":"fb3db4ee23b9bdccf88416a00d9c73f1ace9c04d","priority":0,"status":200,"text":"# AdvancedEAST\nAdvancedEAST is an algorithm used for Scene image text detect,\nwhich is primarily based on\n[EAST:An Efficient and Accurate Scene Text Detector](https://arxiv.org/abs/1704.03155v2),\nand the significant improvement was also made,\nwhich make long text predictions more accurate.\nIf this project is helpful to you, welcome to star.\nAnd if you have any problem, please contact me.\n* email:yijie.huo@foxmail.com\n* wechat:gekongdianxue\n\n# advantages\n* writen in keras, easy to read and run\n* base on EAST, an advanced text detect algorithm\n* easy to train the model\n* significant improvement was made, long text predictions more accurate.(please\nsee 'demo results' part bellow,\nand pay attention to the activation image,\nwhich starts with yellow grids, and ends with green grids.) \n\nIn my experiments,\nAdvancedEast has obtained much better prediction accuracy then East,\nespecially on long text. Since East calculates final vertexes coordinates with\nweighted mean values of predicted vertexes coordinates of all pixels. It is too\ndifficult to predict the 2 vertexes from the other side of the quadrangle.\nSee East limitations picked from original paper bellow.\n![East limitations](image/East.limitations.png \"East limitations\")\n\n# project files\n* config file:cfg.py,control parameters\n* pre-process data:\n    preprocess.py,resize image\n* label data:\n    label.py,produce label info\n* define network\n    network.py\n* define loss function\n    losses.py\n* execute training\n    advanced_east.py and data_generator.py\n* predict\n    predict.py and nms.py\n\n# network arch\n* AdvancedEast\n\n![AdvancedEast network arch](image/AdvancedEast.network.png \"AdvancedEast network arch\")\n\n* East\n\n![East network arch](image/East.network.png \"East network arch\")\n\n\n# setup\n* python 3.6.3+\n* tensorflow-gpu 1.5.0+(or tensorflow 1.5.0+)\n* keras 2.1.4+\n* numpy 1.14.1+\n* tqdm 4.19.7+\n\n# training\n* prepare training data:make data root dir(icpr),\ncopy images to root dir, and copy txts to root dir,\ndata format details could refer to 'ICPR MTWI 2018 挑战赛二：网络图像的文本检测',\n[Link](https://tianchi.aliyun.com/competition/introduction.htm?spm=5176.100066.0.0.3bcad780oQ9Ce4&raceId=231651)\n* modify config params in cfg.py, see default values.\n* python preprocess.py, resize image to 256*256,384*384,512*512,640*640,736*736,\nand train respectively could speed up training process.\n* python label.py\n* python advanced_east.py\n* python predict.py -p demo/001.png, to predict\n\n# demo results\n![001原图](demo/001.png \"001原图\")\n![001激活图](demo/001.png_act.jpg \"001激活图\")\n![001预测图](demo/001.png_predict.jpg \"001预测图\")\n\n![004原图](demo/004.jpg \"004原图\")\n![004激活图](demo/004.jpg_act.jpg \"004激活图\")\n![004预测图](demo/004.jpg_predict.jpg \"004预测图\")\n\n![005原图](demo/005.png \"005原图\")\n![005激活图](demo/005.png_act.jpg \"005激活图\")\n![005预测图](demo/005.png_predict.jpg \"005预测图\")\n\n* compared with east based on vgg16\n\nAs you can see, although the text area prediction is very accurate, the vertex coordinates are not accurate enough.\n\n![001激活图](demo/001.png_act_east.jpg \"001激活图\")\n![001预测图](demo/001.png_predict_east.jpg \"001预测图\")\n\n# License\nThe codes are released under the MIT License.\n\n# references\n* [EAST:An Efficient and Accurate Scene Text Detector](https://arxiv.org/abs/1704.03155v2)\n\n* [CTPN:Detecting Text in Natural Image with Connectionist Text Proposal Network](https://arxiv.org/abs/1609.03605)\n\n刚刚接触深度学习，有些地方理解还不够深入，可能会有一些错误，请大家多多包涵指正：）\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C7BE:326565:17A581:5DC526:6AB929DD"},"text_sha256":"da5a87ee49afc2c5c80af1012095abd958848703ce68d245975f387b938cdb9d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2825","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E0:8656E:17BE0C5:1BDF643:6AB929DE"},"commit":{"sha":"5b018daddf2a1e098258e9fb772894fdc1b98573","url":"https://github.com/huoyijie/AdvancedEAST/commit/5b018daddf2a1e098258e9fb772894fdc1b98573","date":"2021-03-06T08:53:20Z","author_date":"2021-03-06T08:53:20Z","committer_date":"2021-03-06T08:53:20Z","tree_sha":"6fce69f58398058d56bd6e87523a11f2cd06725f","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2824","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17B4848:1BD6258:6AB929DF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5527,"blob_sha":"7223292fd243e875abc7f798746c3540d7c78e01","priority":0}],"documents":[{"path":"README.md","size":5527,"blob_sha":"7223292fd243e875abc7f798746c3540d7c78e01","priority":0,"status":200,"text":"# AdvancedEAST\nAdvancedEAST is an algorithm used for Scene image text detect,\nwhich is primarily based on\n[EAST:An Efficient and Accurate Scene Text Detector](https://arxiv.org/abs/1704.03155v2),\nand the significant improvement was also made,\nwhich make long text predictions more accurate.\nIf this project is helpful to you, welcome to star.\nAnd if you have any problem, please contact me.\n* email:yijie.huo@foxmail.com\n* website:[https://huoyijie.cn](https://huoyijie.cn)\n\n# advantages\n* writen in keras, easy to read and run\n* base on EAST, an advanced text detect algorithm\n* easy to train the model\n* significant improvement was made, long text predictions more accurate.(please\nsee 'demo results' part bellow,\nand pay attention to the activation image,\nwhich starts with yellow grids, and ends with green grids.) \n\nIn my experiments,\nAdvancedEast has obtained much better prediction accuracy then East,\nespecially on long text. Since East calculates final vertexes coordinates with\nweighted mean values of predicted vertexes coordinates of all pixels. It is too\ndifficult to predict the 2 vertexes from the other side of the quadrangle.\nSee East limitations picked from original paper bellow.\n![East limitations](image/East.limitations.png \"East limitations\")\n\n# project files\n* config file:cfg.py,control parameters\n* pre-process data:\n    preprocess.py,resize image\n* label data:\n    label.py,produce label info\n* define network\n    network.py\n* define loss function\n    losses.py\n* execute training\n    advanced_east.py and data_generator.py\n* predict\n    predict.py and nms.py\n    \n**后置处理过程说明参见\n[后置处理(含原理图)](https://huoyijie.cn/blog/82c8e470-7562-11ea-98d3-6d733527e90f/play)**\n\n# network arch\n* AdvancedEast\n\n![AdvancedEast network arch](image/AdvancedEast.network.png \"AdvancedEast network arch\")\n\n**网络输出说明：\n输出层分别是1位score map, 是否在文本框内；2位vertex code，是否属于文本框边界像素以及是头还是尾；4位geo，是边界像素可以预测的2个顶点坐标。所有像素构成了文本框形状，然后只用边界像素去预测回归顶点坐标。边界像素定义为黄色和绿色框内部所有像素，是用所有的边界像素预测值的加权平均来预测头或尾的短边两端的两个顶点。头和尾部分边界像素分别预测2个顶点，最后得到4个顶点坐标。**\n\n[原理简介(含原理图)](https://huoyijie.cn/blog/9a37ea00-755f-11ea-98d3-6d733527e90f/play)\n\n* East\n\n![East network arch](image/East.network.png \"East network arch\")\n\n\n# setup\n* python 3.6.3+\n* tensorflow-gpu 1.5.0+(or tensorflow 1.5.0+)\n* keras 2.1.4+\n* numpy 1.14.1+\n* tqdm 4.19.7+\n\n# training\n* tianchi ICPR dataset download\n链接: https://pan.baidu.com/s/1NSyc-cHKV3IwDo6qojIrKA 密码: ye9y\n\n* prepare training data:make data root dir(icpr),\ncopy images to root dir, and copy txts to root dir,\ndata format details could refer to 'ICPR MTWI 2018 挑战赛二：网络图像的文本检测',\n[Link](https://tianchi.aliyun.com/competition/introduction.htm?spm=5176.100066.0.0.3bcad780oQ9Ce4&raceId=231651)\n* modify config params in cfg.py, see default values.\n* python preprocess.py, resize image to 256*256,384*384,512*512,640*640,736*736,\nand train respectively could speed up training process.\n* python label.py\n* python advanced_east.py, train entrance\n* python predict.py -p demo/001.png, to predict\n* pretrain model download(use for test)\n链接: https://pan.baidu.com/s/1KO7tR_MW767ggmbTjIJpuQ 密码: kpm2\n\n# demo results\n![001原图](demo/001.png \"001原图\")\n![001激活图](demo/001.png_act.jpg \"001激活图\")\n![001预测图](demo/001.png_predict.jpg \"001预测图\")\n\n![004原图](demo/004.jpg \"004原图\")\n![004激活图](demo/004.jpg_act.jpg \"004激活图\")\n![004预测图](demo/004.jpg_predict.jpg \"004预测图\")\n\n![005原图](demo/005.png \"005原图\")\n![005激活图](demo/005.png_act.jpg \"005激活图\")\n![005预测图](demo/005.png_predict.jpg \"005预测图\")\n\n* compared with east based on vgg16\n\nAs you can see, although the text area prediction is very accurate, the vertex coordinates are not accurate enough.\n\n![001激活图](demo/001.png_act_east.jpg \"001激活图\")\n![001预测图](demo/001.png_predict_east.jpg \"001预测图\")\n\n# License\nThe codes are released under the MIT License.\n\n# references\n* [EAST:An Efficient and Accurate Scene Text Detector](https://arxiv.org/abs/1704.03155v2)\n\n* [CTPN:Detecting Text in Natural Image with Connectionist Text Proposal Network](https://arxiv.org/abs/1609.03605)\n\n* [Deep Matching Prior Network: Toward Tighter Multi-oriented Text Detection](https://arxiv.org/abs/1703.01425)\n\n\n**网络输出说明：\n输出层分别是1位score map, 是否在文本框内；2位vertex code，是否属于文本框边界像素以及是头还是尾；4位geo，是边界像素可以预测的2个顶点坐标。所有像素构成了文本框形状，然后只用边界像素去预测回归顶点坐标。边界像素定义为黄色和绿色框内部所有像素，是用所有的边界像素预测值的加权平均来预测头或尾的短边两端的两个顶点。头和尾部分边界像素分别预测2个顶点，最后得到4个顶点坐标。**\n\n[原理简介(含原理图)](https://huoyijie.cn/blog/9a37ea00-755f-11ea-98d3-6d733527e90f/play)\n\n**后置处理过程说明参见\n[后置处理(含原理图)](https://huoyijie.cn/blog/82c8e470-7562-11ea-98d3-6d733527e90f/play)**\n\n[A Simple RaspberryPi Car Project](https://github.com/huoyijie/raspberrypi-car)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3D4A:3C4A0:17AE01:5DCD4E:6AB929DE"},"text_sha256":"01e4e8fe0e6d1e4e5b44aa9dbc7b6d22d87a017f698c1c964be08169db38d9f6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"awslabs/sockeye","input_row":{"repository":"awslabs/sockeye","url":"https://github.com/awslabs/sockeye","name":"sockeye","owner":"awslabs","description":"Sequence-to-sequence framework with a focus on Neural Machine Translation based on PyTorch","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1216,"issues":311,"created_at":"2017-06-08T07:44:30Z","updated_at":"2026-08-31T08:48:38Z","first_commit_at":"2017-06-12T09:59:46Z","last_commit_at":"2024-10-24T08:17:36Z","activity_months":88.400000000000006,"ai_ml_match_topics":"deep-learning; machine-learning; transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:15.746Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"awslabs/sockeye","visibility":"public","created_at":"2017-06-08T07:44:30Z","updated_at":"2026-08-31T08:48:38Z","private":false,"fork":false,"archived":false,"stargazers_count":1216,"open_issues_count":12,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2823","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17B7C77:1BD8A81:6AB929DF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2822","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:17EA48F:1C0B4EB:6AB929E0"},"commit":{"sha":"8835331d217af206ec0694c5939c3ad5795dac23","url":"https://github.com/awslabs/sockeye/commit/8835331d217af206ec0694c5939c3ad5795dac23","date":"2018-05-24T12:06:41Z","author_date":"2018-05-24T12:06:41Z","committer_date":"2018-05-24T12:06:41Z","tree_sha":"91b0dac7fc1a5be4ce92fecc21a7122403d355bb","message_first_line":"Update to MXNet 1.2 (#388)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2821","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:179EDF5:1BC064D:6AB929E0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7174,"blob_sha":"aeebf01c5d9b11a5bcd2c315ea7da0c41161d05f","priority":0}],"documents":[{"path":"README.md","size":7174,"blob_sha":"aeebf01c5d9b11a5bcd2c315ea7da0c41161d05f","priority":0,"status":200,"text":"# Sockeye\n\n[![PyPI version](https://badge.fury.io/py/sockeye.svg)](https://badge.fury.io/py/sockeye)\n[![GitHub license](https://img.shields.io/github/license/awslabs/sockeye.svg)](https://github.com/awslabs/sockeye/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/awslabs/sockeye.svg)](https://github.com/awslabs/sockeye/issues)\n[![Build Status](https://travis-ci.org/awslabs/sockeye.svg?branch=master)](https://travis-ci.org/awslabs/sockeye)\n[![Documentation Status](https://readthedocs.org/projects/sockeye/badge/?version=latest)](http://sockeye.readthedocs.io/en/latest/?badge=latest)\n\nThis package contains the Sockeye project,\na sequence-to-sequence framework for Neural Machine Translation based on Apache MXNet Incubating.\nIt implements state-of-the-art encoder-decoder architectures, such as\n- Deep Recurrent Neural Networks with Attention [[Bahdanau, '14](https://arxiv.org/abs/1409.0473)]\n- Transformer Models with self-attention [[Vaswani et al, '17](https://arxiv.org/abs/1706.03762)]\n- Fully convolutional sequence-to-sequence models [[Gehring et al, '17](https://arxiv.org/abs/1705.03122)]\n\nIf you use Sockeye, please cite:\n\nFelix Hieber, Tobias Domhan, Michael Denkowski, David Vilar, Artem Sokolov, Ann Clifton and Matt Post (2017):\n[Sockeye: A Toolkit for Neural Machine Translation](https://arxiv.org/abs/1712.05690). In eprint arXiv:cs-CL/1712.05690.\n\n```\n@article{Sockeye:17,\n   author = {Hieber, Felix and Domhan, Tobias and Denkowski, Michael\n           and Vilar, David and Sokolov, Artem and Clifton, Ann and Post, Matt},\n    title = \"{Sockeye: A Toolkit for Neural Machine Translation}\",\n  journal = {arXiv preprint arXiv:1712.05690},\narchivePrefix = \"arXiv\",\n   eprint = {1712.05690},\n primaryClass = \"cs.CL\",\n keywords = {Computer Science - Computation and Language,\n             Computer Science - Learning,\n             Statistics - Machine Learning},\n     year = 2017,\n    month = dec,\n      url = {https://arxiv.org/abs/1712.05690}\n}\n```\n\nIf you are interested in collaborating or have any questions, please submit a pull request or issue. [Click to find our developer guidelines](docs/development.md).\nYou can also send questions to *sockeye-dev-at-amazon-dot-com*.\n\nRecent developments and changes are tracked in our [changelog](https://github.com/awslabs/sockeye/blob/master/CHANGELOG.md).\n\n## Dependencies\n\nSockeye requires:\n- **Python3**\n- [MXNet-1.2.0](https://github.com/apache/incubator-mxnet/tree/1.2.0)\n- numpy\n\n## Installation\n\nThere are several options for installing Sockeye and it's dependencies. Below we list several alternatives and the\ncorresponding instructions.\n\n### Either: AWS DeepLearning AMI\n\n[AWS DeepLearning AMI](https://aws.amazon.com/amazon-ai/amis/) users only need to run the following line to install sockeye:\n\n```bash\n> sudo pip3 install sockeye --no-deps\n```\n\nFor other environments, you can choose between installing via pip or directly from source. Note that for the\nremaining instructions to work you will need to use `python3` instead of `python` and `pip3` instead of `pip`.\n\n\n### Or: pip package\n\n#### CPU\n\n```bash\n> pip install sockeye\n```\n\n#### GPU\n\nIf you want to run sockeye on a GPU you need to make sure your version of Apache MXNet Incubating contains the GPU\nbindings.\nDepending on your version of CUDA, you can do this by running the following:\n```bash\n> wget https://raw.githubusercontent.com/awslabs/sockeye/master/requirements.gpu-cu${CUDA_VERSION}.txt\n> pip install sockeye --no-deps -r requirements.gpu-cu${CUDA_VERSION}.txt\n> rm requirements.gpu-cu${CUDA_VERSION}.txt\n```\nwhere `${CUDA_VERSION}` can be `75` (7.5), `80` (8.0), `90` (9.0), or `91` (9.1).\n\n### Or: From Source\n\n#### CPU\n\nIf you want to just use sockeye without extending it, simply install it via\n```bash\n> pip install -r requirements.txt\n> pip install .\n```\nafter cloning the repository from git.\n\n#### GPU\n\nIf you want to run sockeye on a GPU you need to make sure your version of Apache MXNet\nIncubating contains the GPU bindings. Depending on your version of CUDA you can do this by\nrunning the following:\n\n```bash\n> pip install -r requirements.gpu-cu${CUDA_VERSION}.txt\n> pip install .\n```\nwhere `${CUDA_VERSION}` can be `75` (7.5), `80` (8.0), `90` (9.0), or `91` (9.1).\n\n### Optional dependencies\nIn order to write training statistics to a Tensorboard event file for visualization, you can optionally install mxboard\n (````pip install mxboard````). To visualize these, run the Tensorboard tool (`pip install tensorboard tensorflow`) with\n the logging directory pointed to the training output folder: `tensorboard --logdir <model>`\n\nIf you want to create alignment plots you will need to install matplotlib (````pip install matplotlib````).\n\nIn general you can install all optional dependencies from the Sockeye source folder using:\n```bash\n> pip install '.[optional]'\n```\n\n### Running sockeye\n\nAfter installation, command line tools such as *sockeye-train, sockeye-translate, sockeye-average* and *sockeye-embeddings* are available.\nAlternatively, if the sockeye directory is on your`$PYTHONPATH` you can run the modules directly.\nFor example *sockeye-train* can also be invoked as\n```bash\n> python -m sockeye.train <args>\n```\n\n## First Steps\n\nFor easily training popular model types on known data sets, see the [Sockeye Autopilot documentation](https://github.com/awslabs/sockeye/tree/master/contrib/autopilot).\nFor manually training and running translation models on your data, read on.\n\n### Train\n\nIn order to train your first Neural Machine Translation model you will need two sets of parallel files: one for training\nand one for validation. The latter will be used for computing various metrics during training.\nEach set should consist of two files: one with source sentences and one with target sentences (translations).\nBoth files should have the same number of lines, each line containing a single\nsentence. Each sentence should be a whitespace delimited list of tokens.\n\nSay you wanted to train a RNN German-to-English translation model, then you would call sockeye like this:\n```bash\n> python -m sockeye.train --source sentences.de \\\n                       --target sentences.en \\\n                       --validation-source sentences.dev.de \\\n                       --validation-target sentences.dev.en \\\n                       --use-cpu \\\n                       --output <model_dir>\n```\n\nAfter training the directory *<model_dir>* will contain all model artifacts such as parameters and model\nconfiguration. The default setting is to train a 1-layer LSTM model with attention.\n\n\n### Translate\n\nInput data for translation should be in the same format as the training data (tokenization, preprocessing scheme).\nYou can translate as follows:\n\n```bash\n> python -m sockeye.translate --models <model_dir> --use-cpu\n```\n\nThis will take the best set of parameters found during training and then translate strings from STDIN and\nwrite translations to STDOUT.\n\nFor more detailed examples check out our user documentation.\n\n\n## Step-by-step tutorial\n\nMore detailed step-by-step tutorials can be found in the\n[tutorials directory](https://github.com/awslabs/sockeye/tree/master/tutorials).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3B7A:3BF56:174D7F:5D6D0F:6AB929D7"},"text_sha256":"df755d50ed1e9eb54176740098f1fe253a18d988a03217e85ed8797da5b2a154"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2820","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CC:754BF:17C0DE4:1BE2778:6AB929E1"},"commit":{"sha":"871d9863d6a657d87de1c90f44977c5b70c99c7e","url":"https://github.com/awslabs/sockeye/commit/871d9863d6a657d87de1c90f44977c5b70c99c7e","date":"2024-10-24T08:17:36Z","author_date":"2024-10-24T08:17:36Z","committer_date":"2024-10-24T08:17:36Z","tree_sha":"ce826720eca8cd015a0a2ac9d519eb88c003a930","message_first_line":"Retire DeepSpeed mode due to security issue with supported version (#1116)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2819","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A7:3C4024:17F46D9:1C16038:6AB929E1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18569,"blob_sha":"5c14c0523b998afec93ab7f13094722d7d2354ac","priority":0}],"documents":[{"path":"README.md","size":18569,"blob_sha":"5c14c0523b998afec93ab7f13094722d7d2354ac","priority":0,"status":200,"text":"# Sockeye\n\n**Sockeye has entered maintenance mode and is no longer adding new features. We are grateful to everyone who has contributed to Sockeye throughout its development with pull requests, issue reports, and more.**\n\n[![PyPI version](https://badge.fury.io/py/sockeye.svg)](https://badge.fury.io/py/sockeye)\n[![GitHub license](https://img.shields.io/github/license/awslabs/sockeye.svg)](https://github.com/awslabs/sockeye/blob/main/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/awslabs/sockeye.svg)](https://github.com/awslabs/sockeye/issues)\n[![Documentation Status](https://readthedocs.org/projects/sockeye/badge/?version=latest)](http://sockeye.readthedocs.io/en/latest/?badge=latest)\n[![Torch Nightly](https://github.com/awslabs/sockeye/actions/workflows/torch_nightly.yml/badge.svg)](https://github.com/awslabs/sockeye/actions/workflows/torch_nightly.yml)\n\nSockeye is an open-source sequence-to-sequence framework for Neural Machine Translation built on [PyTorch](https://pytorch.org/). It implements distributed training and optimized inference for state-of-the-art models, powering [Amazon Translate](https://aws.amazon.com/translate/) and other MT applications. Recent developments and changes are tracked in our [CHANGELOG](https://github.com/awslabs/sockeye/blob/master/CHANGELOG.md).\n\nFor a quickstart guide to training a standard NMT model on any size of data, see the [WMT 2014 English-German tutorial](docs/tutorials/wmt_large.md).\n\nFor questions and issue reports, please [file an issue](https://github.com/awslabs/sockeye/issues/new) on GitHub.\n\n### Version 3.1.x: PyTorch only\nWith version 3.1.x, we remove support for MXNet 2.x. Models trained with PyTorch and Sockeye 3.0.x remain compatible\nwith Sockeye 3.1.x. Models trained with 2.3.x (using MXNet) and converted to PyTorch with Sockeye 3.0.x's conversion\ntool can NOT be used with Sockeye 3.1.x.\n\n### Version 3.0.0: Concurrent PyTorch and MXNet support\nStarting with version 3.0.0, Sockeye is also based on PyTorch. We maintain backwards compatibility with\nMXNet models of version 2.3.x with 3.0.x. If MXNet 2.x is installed, Sockeye can run both with PyTorch or MXNet.\n\nAll models trained with 2.3.x (using MXNet)\ncan be converted to models running with PyTorch using the converter CLI (`sockeye.mx_to_pt`). This will\ncreate a PyTorch parameter file (`<model>/params.best`) and backup the existing MXNet parameter\nfile to `<model>/params.best.mx`. Note that this only applies to fully-trained models that are to be used\nfor inference. Continued training of an MXNet model with PyTorch is not supported\n(because we do not convert training and optimizer states).\n`sockeye.mx_to_pt` requires MXNet to be installed into the environment.\n\nAll CLIs of Version 3.0.0 now use PyTorch by default, e.g. `sockeye-{train,translate,score}`.\nMXNet-based CLIs/modules are still operational and accessible via `sockeye-{train,translate,score}-mx`.\n\nSockeye 3 can be installed and run without MXNet, but if installed, an extended test suite is executed to ensure\nequivalence between PyTorch and MXNet models. Note that running Sockeye 3.0.0 with MXNet requires MXNet 2.x to be\ninstalled (`pip install --pre -f https://dist.mxnet.io/python 'mxnet>=2.0.0b2021'`)\n\n## Installation\n\nDownload the current version of Sockeye:\n```bash\ngit clone https://github.com/awslabs/sockeye.git\n```\n\nInstall the sockeye module and its dependencies:\n```bash\ncd sockeye && pip3 install --editable .\n```\n\nFor faster GPU training, install [NVIDIA Apex](https://github.com/NVIDIA/apex). NVIDIA also provides [PyTorch Docker containers](https://ngc.nvidia.com/catalog/containers/nvidia:pytorch) that include Apex.\n\n## Documentation\n\n- For information on how to use Sockeye, please visit [our documentation](https://awslabs.github.io/sockeye/).\n- Developers may be interested in our [developer guidelines](https://awslabs.github.io/sockeye/development.html).\n\n### Older versions\n\n- Sockeye 3.0, based on PyTorch & MXNet 2.x is available in the `sockeye_30` branch.\n- Sockeye 2.x, based on the MXNet Gluon API, is available in the `sockeye_2` branch.\n- Sockeye 1.x, based on the MXNet Module API, is available in the `sockeye_1` branch.\n\n## Citation\n\nFor more information about Sockeye, see our papers ([BibTeX](sockeye.bib)).\n\n##### Sockeye 3.x\n\n> Felix Hieber, Michael Denkowski, Tobias Domhan, Barbara Darques Barros, Celina Dong Ye, Xing Niu, Cuong Hoang, Ke Tran, Benjamin Hsu, Maria Nadejde, Surafel Lakew, Prashant Mathur, Anna Currey, Marcello Federico.\n> [Sockeye 3: Fast Neural Machine Translation with PyTorch](https://arxiv.org/abs/2207.05851). ArXiv e-prints.\n\n##### Sockeye 2.x\n\n> Tobias Domhan, Michael Denkowski, David Vilar, Xing Niu, Felix Hieber, Kenneth Heafield.\n> [The Sockeye 2 Neural Machine Translation Toolkit at AMTA 2020](https://www.aclweb.org/anthology/2020.amta-research.10/). Proceedings of the 14th Conference of the Association for Machine Translation in the Americas (AMTA'20).\n\n> Felix Hieber, Tobias Domhan, Michael Denkowski, David Vilar.\n> [Sockeye 2: A Toolkit for Neural Machine Translation](https://www.amazon.science/publications/sockeye-2-a-toolkit-for-neural-machine-translation). Proceedings of the 22nd Annual Conference of the European Association for Machine Translation, Project Track (EAMT'20).\n\n##### Sockeye 1.x\n\n> Felix Hieber, Tobias Domhan, Michael Denkowski, David Vilar, Artem Sokolov, Ann Clifton, Matt Post.\n> [The Sockeye Neural Machine Translation Toolkit at AMTA 2018](https://www.aclweb.org/anthology/W18-1820/). Proceedings of the 13th Conference of the Association for Machine Translation in the Americas  (AMTA'18).\n>\n> Felix Hieber, Tobias Domhan, Michael Denkowski, David Vilar, Artem Sokolov, Ann Clifton and Matt Post. 2017.\n> [Sockeye: A Toolkit for Neural Machine Translation](https://arxiv.org/abs/1712.05690). ArXiv e-prints.\n\n## Research with Sockeye\n\nSockeye has been used for both academic and industrial research. A list of known publications that use Sockeye is shown below.\nIf you know more, please let us know or submit a pull request (last updated: May 2022).\n\n### 2023\n* Zhang, Xuan, Kevin Duh, Paul McNamee. \"A Hyperparameter Optimization Toolkit for Neural Machine Translation Research\". Proceedings of ACL (2023).\n\n### 2022\n* Currey, Anna, Maria Nădejde, Raghavendra Pappagari, Mia Mayer, Stanislas Lauly, Xing Niu, Benjamin Hsu, Georgiana Dinu. \"MT-GenEval: A Counterfactual and Contextual Dataset for Evaluating Gender Accuracy in Machine Translation\". Proceedings of EMNLP (2022).\n* Domhan, Tobias, Eva Hasler, Ke Tran, Sony Trenous, Bill Byrne and Felix Hieber. \"The Devil is in the Details: On the Pitfalls of Vocabulary Selection in Neural Machine Translation\". Proceedings of NAACL-HLT (2022)\n* Fischer, Lukas, Patricia Scheurer, Raphael Schwitter, Martin Volk. \"Machine Translation of 16th Century Letters from Latin to German\". Workshop on Language Technologies for Historical and Ancient Languages (2022).\n* Knowles, Rebecca, Patrick Littell. \"Translation Memories as Baselines for Low-Resource Machine Translation\". Proceedings of LREC (2022)\n* McNamee, Paul, Kevin Duh. \"The Multilingual Microblog Translation Corpus: Improving and Evaluating Translation of User-Generated Text\". Proceedings of LREC (2022)\n* Nadejde Maria, Anna Currey, Benjamin Hsu, Xing Niu, Marcello Federico, Georgiana Dinu. \"CoCoA-MT: A Dataset and Benchmark for Contrastive Controlled MT with Application to Formality\". Proceedings of NAACL (2022).\n* Weller-Di Marco, Marion, Matthias Huck, Alexander Fraser. \"Modeling Target-Side Morphology in Neural Machine Translation: A Comparison of Strategies\n\". arXiv preprint arXiv:2203.13550 (2022)\n\n\n### 2021\n\n* Bergmanis, Toms, Mārcis Pinnis. \"Facilitating Terminology Translation with Target Lemma Annotations\". arXiv preprint arXiv:2101.10035 (2021)\n* Briakou, Eleftheria, Marine Carpuat. \"Beyond Noise: Mitigating the Impact of Fine-grained Semantic Divergences on Neural Machine Translation\". arXiv preprint arXiv:2105.15087 (2021)\n* Hasler, Eva, Tobias Domhan, Sony Trenous, Ke Tran, Bill Byrne, Felix Hieber. \"Improving the Quality Trade-Off for Neural Machine Translation Multi-Domain Adaptation\". Proceedings of EMNLP (2021)\n* Tang, Gongbo, Philipp Rönchen, Rico Sennrich, Joakim Nivre. \"Revisiting Negation in Neural Machine Translation\". Transactions of the Association for Computation Linguistics 9 (2021)\n* Vu, Thuy, Alessandro Moschitti. \"Machine Translation Customization via Automatic Training Data Selection from the Web\". arXiv preprint arXiv:2102.1024 (2021)\n* Xu, Weijia, Marine Carpuat. \"EDITOR: An Edit-Based Transformer with Repositioning for Neural Machine Translation with Soft Lexical Constraints.\" Transactions of the Association for Computation Linguistics 9 (2021)\n* Müller, Mathias, Rico Sennrich. \"Understanding the Properties of Minimum Bayes Risk Decoding in Neural Machine Translation\". Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) (2021)\n* Popović, Maja, Alberto Poncelas. \"On Machine Translation of User Reviews.\" Proceedings of RANLP (2021)\n* Popović, Maja. \"On nature and causes of observed MT errors.\" Proceedings of the 18th MT Summit (Volume 1: Research Track) (2021)\n* Jain, Nishtha, Maja Popović, Declan Groves, Eva Vanmassenhove. \"Generating Gender Augmented Data for NLP.\" Proceedings of the 3rd Workshop on Gender Bias in Natural Language Processing (2021)\n* Vilar, David, Marcello Federico. \"A Statistical Extension of Byte-Pair Encoding.\" Proceedings of IWSLT (2021)\n\n### 2020\n\n* Dinu, Georgiana, Prashant Mathur, Marcello Federico, Stanislas Lauly, Yaser Al-Onaizan. \"Joint translation and unit conversion for end-to-end localization.\" Proceedings of IWSLT (2020)\n* Exel, Miriam, Bianka Buschbeck, Lauritz Brandt, Simona Doneva. \"Terminology-Constrained Neural Machine Translation at SAP\". Proceedings of EAMT (2020).\n* Hisamoto, Sorami, Matt Post, Kevin Duh. \"Membership Inference Attacks on Sequence-to-Sequence Models: Is My Data In Your Machine Translation System?\" Transactions of the Association for Computational Linguistics, Volume 8 (2020)\n* Naradowsky, Jason, Xuan Zhan, Kevin Duh. \"Machine Translation System Selection from Bandit Feedback.\" arXiv preprint arXiv:2002.09646 (2020)\n* Niu, Xing, Prashant Mathur, Georgiana Dinu, Yaser Al-Onaizan. \"Evaluating Robustness to Input Perturbations for Neural Machine Translation\". arXiv preprint \tarXiv:2005.00580 (2020)\n* Niu, Xing, Marine Carpuat. \"Controlling Neural Machine Translation Formality with Synthetic Supervision.\" Proceedings of AAAI (2020)\n* Keung, Phillip, Julian Salazar, Yichao Liu, Noah A. Smith. \"Unsupervised Bitext Mining and Translation\nvia Self-Trained Contextual Embeddings.\" arXiv preprint arXiv:2010.07761 (2020).\n* Sokolov, Alex, Tracy Rohlin, Ariya Rastrow. \"Neural Machine Translation for Multilingual Grapheme-to-Phoneme Conversion.\" arXiv preprint arXiv:2006.14194 (2020)\n* Stafanovičs, Artūrs, Toms Bergmanis, Mārcis Pinnis. \"Mitigating Gender Bias in Machine Translation with Target Gender\nAnnotations.\" arXiv preprint arXiv:2010.06203 (2020)\n* Stojanovski, Dario, Alexander Fraser. \"Addressing Zero-Resource Domains Using Document-Level Context in Neural Machine Translation.\" arXiv preprint arXiv preprint arXiv:2004.14927 (2020)\n* Stojanovski, Dario, Benno Krojer, Denis Peskov, Alexander Fraser. \"ContraCAT: Contrastive Coreference Analytical Templates for Machine Translation\". Proceedings of COLING (2020)\n* Zhang, Xuan, Kevin Duh. \"Reproducible and Efficient Benchmarks for Hyperparameter Optimization of Neural Machine Translation Systems.\" Transactions of the Association for Computational Linguistics, Volume 8 (2020)\n* Swe Zin Moe, Ye Kyaw Thu, Hnin Aye Thant, Nandar Win Min, and Thepchai Supnithi, \"Unsupervised Neural Machine Translation between Myanmar Sign Language and Myanmar Language\", Journal of Intelligent Informatics and Smart Technology, April 1st Issue, 2020, pp. 53-61. (Submitted December 21, 2019; accepted March 6, 2020; revised March 16, 2020; published online April 30, 2020)\n* Thazin Myint Oo, Ye Kyaw Thu, Khin Mar Soe and Thepchai Supnithi, \"Neural Machine Translation between Myanmar (Burmese) and Dawei (Tavoyan)\", In Proceedings of the 18th International Conference on Computer Applications (ICCA 2020), Feb 27-28, 2020, Yangon, Myanmar, pp. 219-227\n* Müller, Mathias, Annette Rios, Rico Sennrich. \"Domain Robustness in Neural Machine Translation.\" Proceedings of AMTA (2020)\n* Rios, Annette, Mathias Müller, Rico Sennrich. \"Subword Segmentation and a Single Bridge Language Affect Zero-Shot Neural Machine Translation.\" Proceedings of the 5th WMT: Research Papers (2020)\n* Popović, Maja, Alberto Poncelas. \"Neural Machine Translation between similar South-Slavic languages.\" Proceedings of the 5th WMT: Research Papers (2020)\n* Popović, Maja, Alberto Poncelas. \"Extracting correctly aligned segments from unclean parallel data using character n-gram matching.\" Proceedings of Conference on Language Technologies & Digital Humanities (JTDH 2020).\n* Popović, Maja, Alberto Poncelas, Marija Brkic, Andy Way. \"Neural Machine Translation for translating into Croatian and Serbian.\" Proceedings of the 7th Workshop on NLP for Similar Languages, Varieties and Dialects (2020)\n\n### 2019\n\n* Agrawal, Sweta, Marine Carpuat. \"Controlling Text Complexity in Neural Machine Translation.\" Proceedings of EMNLP (2019)\n* Beck, Daniel, Trevor Cohn, Gholamreza Haffari. \"Neural Speech Translation using Lattice Transformations and Graph Networks.\" Proceedings of TextGraphs-13 (EMNLP 2019)\n* Currey, Anna, Kenneth Heafield. \"Zero-Resource Neural Machine Translation with Monolingual Pivot Data.\" Proceedings of EMNLP (2019)\n* Gupta, Prabhakar, Mayank Sharma. \"Unsupervised Translation Quality Estimation for Digital Entertainment Content Subtitles.\" IEEE International Journal of Semantic Computing (2019)\n* Hu, J. Edward, Huda Khayrallah, Ryan Culkin, Patrick Xia, Tongfei Chen, Matt Post, and Benjamin Van Durme. \"Improved Lexically Constrained Decoding for Translation and Monolingual Rewriting.\" Proceedings of NAACL-HLT (2019)\n* Rosendahl, Jan, Christian Herold, Yunsu Kim, Miguel Graça,Weiyue Wang, Parnia Bahar, Yingbo Gao and Hermann Ney “The RWTH Aachen University Machine Translation Systems for WMT 2019” Proceedings of the 4th WMT: Research Papers (2019)\n* Thompson, Brian, Jeremy Gwinnup, Huda Khayrallah, Kevin Duh, and Philipp Koehn. \"Overcoming catastrophic forgetting during domain adaptation of neural machine translation.\" Proceedings of NAACL-HLT 2019 (2019)\n* Tättar, Andre, Elizaveta Korotkova, Mark Fishel “University of Tartu’s Multilingual Multi-domain WMT19 News Translation Shared Task Submission” Proceedings of 4th WMT: Research Papers (2019)\n* Thazin Myint Oo, Ye Kyaw Thu and Khin Mar Soe, \"Neural Machine Translation between Myanmar (Burmese) and Rakhine (Arakanese)\", In Proceedings of the Sixth Workshop on NLP for Similar Languages, Varieties and Dialects, NAACL-2019, June 7th 2019, Minneapolis, United States, pp. 80-88\n\n### 2018\n\n* Domhan, Tobias. \"How Much Attention Do You Need? A Granular Analysis of Neural Machine Translation Architectures\". Proceedings of 56th ACL (2018)\n* Kim, Yunsu, Yingbo Gao, and Hermann Ney. \"Effective Cross-lingual Transfer of Neural Machine Translation Models without Shared Vocabularies.\" arXiv preprint arXiv:1905.05475 (2019)\n* Korotkova, Elizaveta, Maksym Del, and Mark Fishel. \"Monolingual and Cross-lingual Zero-shot Style Transfer.\" arXiv preprint arXiv:1808.00179 (2018)\n* Niu, Xing, Michael Denkowski, and Marine Carpuat. \"Bi-directional neural machine translation with synthetic parallel data.\" arXiv preprint arXiv:1805.11213 (2018)\n* Niu, Xing, Sudha Rao, and Marine Carpuat. \"Multi-Task Neural Models for Translating Between Styles Within and Across Languages.\" COLING (2018)\n* Post, Matt and David Vilar. \"Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translation.\" Proceedings of NAACL-HLT (2018)\n* Schamper, Julian, Jan Rosendahl, Parnia Bahar, Yunsu Kim, Arne Nix, and Hermann Ney. \"The RWTH Aachen University Supervised Machine Translation Systems for WMT 2018.\" Proceedings of the 3rd WMT: Shared Task Papers (2018)\n* Schulz, Philip, Wilker Aziz, and Trevor Cohn. \"A stochastic decoder for neural machine translation.\" arXiv preprint arXiv:1805.10844 (2018)\n* Tamer, Alkouli, Gabriel Bretschner, and Hermann Ney. \"On The Alignment Problem In Multi-Head Attention-Based Neural Machine Translation.\" Proceedings of the 3rd WMT: Research Papers (2018)\n* Tang, Gongbo, Rico Sennrich, and Joakim Nivre. \"An Analysis of Attention Mechanisms: The Case of Word Sense Disambiguation in Neural Machine Translation.\" Proceedings of 3rd WMT: Research Papers (2018)\n* Thompson, Brian, Huda Khayrallah, Antonios Anastasopoulos, Arya McCarthy, Kevin Duh, Rebecca Marvin, Paul McNamee, Jeremy Gwinnup, Tim Anderson, and Philipp Koehn. \"Freezing Subnetworks to Analyze Domain Adaptation in Neural Machine Translation.\" arXiv preprint arXiv:1809.05218 (2018)\n* Vilar, David. \"Learning Hidden Unit Contribution for Adapting Neural Machine Translation Models.\" Proceedings of NAACL-HLT (2018)\n* Vyas, Yogarshi, Xing Niu and Marine Carpuat “Identifying Semantic Divergences in Parallel Text without Annotations”. Proceedings of NAACL-HLT (2018)\n* Wang, Weiyue, Derui Zhu, Tamer Alkhouli, Zixuan Gan, and Hermann Ney. \"Neural Hidden Markov Model for Machine Translation\". Proceedings of 56th ACL (2018)\n* Zhang, Xuan, Gaurav Kumar, Huda Khayrallah, Kenton Murray, Jeremy Gwinnup, Marianna J Martindale, Paul McNamee, Kevin Duh, and Marine Carpuat. \"An Empirical Exploration of Curriculum Learning for Neural Machine Translation.\" arXiv preprint arXiv:1811.00739 (2018)\n* Swe Zin Moe, Ye Kyaw Thu, Hnin Aye Thant and Nandar Win Min, \"Neural Machine Translation between Myanmar Sign Language and Myanmar Written Text\", In the second Regional Conference on Optical character recognition and Natural language processing technologies for ASEAN languages 2018 (ONA 2018), December 13-14, 2018, Phnom Penh, Cambodia.\n* Tang, Gongbo, Mathias Müller, Annette Rios and Rico Sennrich. \"Why Self-attention? A Targeted Evaluation of Neural Machine Translation Architectures.\" Proceedings of EMNLP (2018)\n\n### 2017\n\n* Domhan, Tobias and Felix Hieber. \"Using target-side monolingual data for neural machine translation through multi-task learning.\" Proceedings of EMNLP (2017).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9866:24970A:183D94:5E5AD5:6AB929E1"},"text_sha256":"f176f50624b22a525c3df5428f9a124bfb87e73b1ad2758854db7772c9ff1dd0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"chainer/chainerrl","input_row":{"repository":"chainer/chainerrl","url":"https://github.com/chainer/chainerrl","name":"chainerrl","owner":"chainer","description":"ChainerRL is a deep reinforcement learning library built on top of Chainer.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1199,"issues":198,"created_at":"2017-01-30T04:58:15Z","updated_at":"2026-08-31T22:51:43Z","first_commit_at":"2016-02-22T09:40:50Z","last_commit_at":"2021-04-17T06:02:30Z","activity_months":61.789999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:18.792Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"chainer/chainerrl","visibility":"public","created_at":"2017-01-30T04:58:15Z","updated_at":"2026-08-31T22:51:43Z","private":false,"fork":false,"archived":false,"stargazers_count":1199,"open_issues_count":65,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2818","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:1807742:1C29022:6AB929E2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2817","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092C:6E429:17D6940:1BF80D1:6AB929E3"},"commit":{"sha":"2be8d0b64140edffb0c9ac32b78f883786299f10","url":"https://github.com/chainer/chainerrl/commit/2be8d0b64140edffb0c9ac32b78f883786299f10","date":"2018-05-22T09:37:46Z","author_date":"2018-05-22T09:37:46Z","committer_date":"2018-05-22T09:37:46Z","tree_sha":"5f676f3f735f21120d3daaeaa43b500c7f26f681","message_first_line":"Merge pull request #274 from toslunar/hacking110"},"tree_request_status":200,"tree_rate":{"github_remaining":"2816","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:17E6393:1C07ECF:6AB929E3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3204,"blob_sha":"5c60fb6bc7bcd9fbcb268d1d0ab72d271f543712","priority":0}],"documents":[{"path":"README.md","size":3204,"blob_sha":"5c60fb6bc7bcd9fbcb268d1d0ab72d271f543712","priority":0,"status":200,"text":"<div align=\"center\"><img src=\"assets/ChainerRL.png\" width=\"400\"/><\/div>\n\n# ChainerRL\n[![Build Status](https://travis-ci.org/chainer/chainerrl.svg?branch=master)](https://travis-ci.org/chainer/chainerrl)\n[![Coverage Status](https://coveralls.io/repos/github/chainer/chainerrl/badge.svg?branch=master)](https://coveralls.io/github/chainer/chainerrl?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/chainerrl/badge/?version=latest)](http://chainerrl.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/chainerrl.svg)](https://pypi.python.org/pypi/chainerrl)\n\nChainerRL is a deep reinforcement learning library that implements various state-of-the-art deep reinforcement algorithms in Python using [Chainer](https://github.com/pfnet/chainer), a flexible deep learning framework.\n\n![Breakout](assets/breakout.gif)\n![Humanoid](assets/humanoid.gif)\n\n## Installation\n\nChainerRL is tested with Python 2.7+ and 3.5.1+. For other requirements, see [requirements.txt](requirements.txt).\n\nChainerRL can be installed via PyPI:\n```\npip install chainerrl\n```\n\nIt can also be installed from the source code:\n```\npython setup.py install\n```\n\nRefer to [Installation](http://chainerrl.readthedocs.io/en/latest/install.html) for more information on installation. \n\n## Getting started\n\nYou can try [ChainerRL Quickstart Guide](examples/quickstart/quickstart.ipynb) first, or check the [examples](examples) ready for Atari 2600 and Open AI Gym.\n\nFor more information, you can refer to [ChainerRL's documentation](http://chainerrl.readthedocs.io/en/latest/index.html).\n\n## Algorithms\n\n| Algorithm | Discrete Action | Continous Action | Recurrent Model | CPU Async Training |\n|:----------|:---------------:|:----------------:|:---------------:|:------------------:|\n| DQN (including DoubleDQN etc.) | ✓ | ✓ (NAF) | ✓ | x |\n| Categorical DQN | ✓ | x | ✓ | x |\n| DDPG | x | ✓ | ✓ | x |\n| A3C  | ✓ | ✓ | ✓ | ✓ |\n| ACER | ✓ | ✓ | ✓ | ✓ |\n| NSQ (N-step Q-learning) | ✓ | ✓ (NAF) | ✓ | ✓ |\n| PCL (Path Consistency Learning) | ✓ | ✓ | ✓ | ✓ |\n| PPO  | ✓ | ✓ | x | x |\n| TRPO | ✓ | ✓ | x | x |\n\nFollowing algorithms have been implemented in ChainerRL:\n- A3C (Asynchronous Advantage Actor-Critic)\n- ACER (Actor-Critic with Experience Replay)\n- Asynchronous N-step Q-learning\n- Categorical DQN\n- DQN (including Double DQN, Persistent Advantage Learning (PAL), Double PAL, Dynamic Policy Programming (DPP))\n- DDPG (Deep Deterministic Poilcy Gradients) (including SVG(0))\n- PGT (Policy Gradient Theorem)\n- PCL (Path Consistency Learning)\n- PPO (Proximal Policy Optimization)\n- TRPO (Trust Region Policy Optimization)\n\nQ-function based algorithms such as DQN can utilize a Normalized Advantage Function (NAF) to tackle continuous-action problems as well as DQN-like discrete output networks.\n\n## Environments\n\nEnvironments that support the subset of OpenAI Gym's interface (`reset` and `step` methods) can be used.\n\n## Contributing\n\nAny kind of contribution to ChainerRL would be highly appreciated! If you are interested in contributing to ChainerRL, please read [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[MIT License](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9748:241B62:178F6D:5DAF81:6AB929E3"},"text_sha256":"6977c857aca05df2566ef5f77db2d942eaa88b30d6d9188888c30286c5286ff4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2815","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DB:35D5A8:17C57E8:1BE724A:6AB929E4"},"commit":{"sha":"7eed375614b46a986f0adfedcc8c61b5063e1d3e","url":"https://github.com/chainer/chainerrl/commit/7eed375614b46a986f0adfedcc8c61b5063e1d3e","date":"2021-04-17T06:02:30Z","author_date":"2021-04-17T06:02:30Z","committer_date":"2021-04-17T06:02:30Z","tree_sha":"4445eaf76753475b866a474c42804b647af47bf3","message_first_line":"Merge pull request #611 from prabhatnagarajan/pfrl_reference"},"tree_request_status":200,"tree_rate":{"github_remaining":"2814","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092F:E80A6:179C075:1BBDB78:6AB929E4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7985,"blob_sha":"90ed13e7d7da3903b83410772d5af291cae947b3","priority":0}],"documents":[{"path":"README.md","size":7985,"blob_sha":"90ed13e7d7da3903b83410772d5af291cae947b3","priority":0,"status":200,"text":"<div align=\"center\"><img src=\"https://raw.githubusercontent.com/chainer/chainerrl/master/assets/ChainerRL.png\" width=\"400\"/><\/div>\n\n# ChainerRL and PFRL\n[![Build Status](https://travis-ci.org/chainer/chainerrl.svg?branch=master)](https://travis-ci.org/chainer/chainerrl)\n[![Coverage Status](https://coveralls.io/repos/github/chainer/chainerrl/badge.svg?branch=master)](https://coveralls.io/github/chainer/chainerrl?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/chainerrl/badge/?version=latest)](http://chainerrl.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/chainerrl.svg)](https://pypi.python.org/pypi/chainerrl)\n\nChainerRL (this repository) is a deep reinforcement learning library that implements various state-of-the-art deep reinforcement algorithms in Python using [Chainer](https://github.com/chainer/chainer), a flexible deep learning framework. [PFRL](https://github.com/pfnet/pfrl) is the PyTorch analog of ChainerRL.\n\n![Breakout](assets/breakout.gif)\n![Humanoid](assets/humanoid.gif)\n![Grasping](assets/grasping.gif)\n![Atlas](examples/atlas/assets/atlas.gif)\n\n## Installation\n\nChainerRL is tested with 3.6. For other requirements, see [requirements.txt](requirements.txt).\n\nChainerRL can be installed via PyPI:\n```\npip install chainerrl\n```\n\nIt can also be installed from the source code:\n```\npython setup.py install\n```\n\nRefer to [Installation](http://chainerrl.readthedocs.io/en/latest/install.html) for more information on installation. \n\n## Getting started\n\nYou can try [ChainerRL Quickstart Guide](examples/quickstart/quickstart.ipynb) first, or check the [examples](examples) ready for Atari 2600 and Open AI Gym.\n\nFor more information, you can refer to [ChainerRL's documentation](http://chainerrl.readthedocs.io/en/latest/index.html).\n\n## Algorithms\n\n| Algorithm | Discrete Action | Continous Action | Recurrent Model | Batch Training | CPU Async Training |\n|:----------|:---------------:|:----------------:|:---------------:|:--------------:|:------------------:|\n| DQN (including DoubleDQN etc.) | ✓ | ✓ (NAF) | ✓ | ✓ | x |\n| Categorical DQN | ✓ | x | ✓ | ✓ | x |\n| Rainbow | ✓ | x | ✓ | ✓ | x |\n| IQN | ✓ | x | ✓ | ✓ | x |\n| DDPG | x | ✓ | ✓ | ✓ | x |\n| A3C  | ✓ | ✓ | ✓ | ✓ (A2C) | ✓ |\n| ACER | ✓ | ✓ | ✓ | x | ✓ |\n| NSQ (N-step Q-learning) | ✓ | ✓ (NAF) | ✓ | x | ✓ |\n| PCL (Path Consistency Learning) | ✓ | ✓ | ✓ | x | ✓ |\n| PPO  | ✓ | ✓ | ✓ | ✓ | x |\n| TRPO | ✓ | ✓ | ✓ | ✓ | x |\n| TD3 | x | ✓ | x | ✓ | x |\n| SAC | x | ✓ | x | ✓ | x |\n\nFollowing algorithms have been implemented in ChainerRL:\n- [A2C (Synchronous variant of A3C)](https://openai.com/blog/baselines-acktr-a2c/)\n  - examples: [[atari (batched)]](examples/atari/train_a2c_ale.py) [[general gym (batched)]](examples/gym/train_a2c_gym.py)\n- [A3C (Asynchronous Advantage Actor-Critic)](https://arxiv.org/abs/1602.01783)\n  - examples: [[atari reproduction]](examples/atari/reproduction/a3c) [[atari]](examples/atari/train_a3c_ale.py) [[general gym]](examples/gym/train_a3c_gym.py)\n- [ACER (Actor-Critic with Experience Replay)](https://arxiv.org/abs/1611.01224)\n  - examples: [[atari]](examples/atari/train_acer_ale.py) [[general gym]](examples/gym/train_acer_gym.py)\n- [Asynchronous N-step Q-learning](https://arxiv.org/abs/1602.01783)\n  - examples: [[atari]](examples/atari/train_nsq_ale.py)\n- [Categorical DQN](https://arxiv.org/abs/1707.06887)\n  - examples: [[atari]](examples/atari/train_categorical_dqn_ale.py) [[general gym]](examples/gym/train_categorical_dqn_gym.py)\n- [DQN (Deep Q-Network)](https://storage.googleapis.com/deepmind-media/dqn/DQNNaturePaper.pdf) (including [Double DQN](https://arxiv.org/abs/1509.06461), [Persistent Advantage Learning (PAL)](https://arxiv.org/abs/1512.04860), Double PAL, [Dynamic Policy Programming (DPP)](http://www.jmlr.org/papers/volume13/azar12a/azar12a.pdf))\n  - examples: [[atari reproduction]](examples/atari/reproduction/dqn) [[atari]](examples/atari/train_dqn_ale.py) [[atari (batched)]](examples/atari/train_dqn_batch_ale.py) [[flickering atari]](examples/atari/train_drqn_ale.py) [[general gym]](examples/gym/train_dqn_gym.py)\n- [DDPG (Deep Deterministic Policy Gradients)](https://arxiv.org/abs/1509.02971) (including [SVG(0)](https://arxiv.org/abs/1510.09142))\n  - examples: [[mujoco reproduction]](examples/mujoco/reproduction/ddpg) [[mujoco]](examples/mujoco/train_ddpg_gym.py) [[mujoco (batched)]](examples/mujoco/train_ddpg_batch_gym.py)\n- [IQN (Implicit Quantile Networks)](https://arxiv.org/abs/1806.06923)\n  - examples: [[atari reproduction]](examples/atari/reproduction/iqn) [[general gym]](examples/gym/train_iqn_gym.py)\n- [PCL (Path Consistency Learning)](https://arxiv.org/abs/1702.08892)\n  - examples: [[general gym]](examples/gym/train_pcl_gym.py)\n- [PPO (Proximal Policy Optimization)](https://arxiv.org/abs/1707.06347)\n  - examples: [[mujoco reproduction]](examples/mujoco/reproduction/ppo) [[atari]](examples/atari/train_ppo_ale.py) [[mujoco]](examples/mujoco/train_ppo_gym.py) [[mujoco (batched)]](examples/mujoco/train_ppo_batch_gym.py)\n- [Rainbow](https://arxiv.org/abs/1710.02298)\n  - examples: [[atari reproduction]](examples/atari/reproduction/rainbow)\n- [REINFORCE](http://www-anw.cs.umass.edu/~barto/courses/cs687/williams92simple.pdf)\n  - examples: [[general gym]](examples/gym/train_reinforce_gym.py)\n- [SAC (Soft Actor-Critic)](https://arxiv.org/abs/1812.05905)\n  - examples: [[mujoco reproduction]](examples/mujoco/reproduction/soft_actor_critic)\n- [TRPO (Trust Region Policy Optimization)](https://arxiv.org/abs/1502.05477) with [GAE (Generalized Advantage Estimation)](https://arxiv.org/abs/1506.02438)\n  - examples: [[mujoco]](examples/mujoco/train_trpo_gym.py)\n- [TD3 (Twin Delayed Deep Deterministic policy gradient algorithm)](https://arxiv.org/abs/1802.09477)\n  - examples: [[mujoco reproduction]](examples/mujoco/reproduction/td3)\n\nFollowing useful techniques have been also implemented in ChainerRL:\n- [NoisyNet](https://arxiv.org/abs/1706.10295)\n  - examples: [[Rainbow]](examples/atari/reproduction/rainbow) [[DQN/DoubleDQN/PAL]](examples/atari/train_dqn_ale.py)\n- [Prioritized Experience Replay](https://arxiv.org/abs/1511.05952)\n  - examples: [[Rainbow]](examples/atari/reproduction/rainbow) [[DQN/DoubleDQN/PAL]](examples/atari/train_dqn_ale.py)\n- [Dueling Network](https://arxiv.org/abs/1511.06581)\n  - examples: [[Rainbow]](examples/atari/reproduction/rainbow) [[DQN/DoubleDQN/PAL]](examples/atari/train_dqn_ale.py)\n- [Normalized Advantage Function](https://arxiv.org/abs/1603.00748)\n  - examples: [[DQN]](examples/gym/train_dqn_gym.py) (for continuous-action envs only)\n- [Deep Recurrent Q-Network](https://arxiv.org/abs/1507.06527)\n  - examples: [[DQN]](examples/atari/train_drqn_ale.py)\n\n\n## Visualization\n\nChainerRL has a set of accompanying [visualization tools](https://github.com/chainer/chainerrl-visualizer) in order to aid developers' ability to understand and debug their RL agents. With this visualization tool, the behavior of ChainerRL agents can be easily inspected from a browser UI.\n\n\n## Environments\n\nEnvironments that support the subset of OpenAI Gym's interface (`reset` and `step` methods) can be used.\n\n## Contributing\n\nAny kind of contribution to ChainerRL would be highly appreciated! If you are interested in contributing to ChainerRL, please read [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[MIT License](LICENSE).\n\n## Citations\n\nTo cite ChainerRL in publications, please cite our [JMLR paper](https://www.jmlr.org/papers/v22/20-376.html):\n\n```\n@article{JMLR:v22:20-376,\n  author  = {Yasuhiro Fujita and Prabhat Nagarajan and Toshiki Kataoka and Takahiro Ishikawa},\n  title   = {ChainerRL: A Deep Reinforcement Learning Library},\n  journal = {Journal of Machine Learning Research},\n  year    = {2021},\n  volume  = {22},\n  number  = {77},\n  pages   = {1-14},\n  url     = {http://jmlr.org/papers/v22/20-376.html}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D604:3BB77:179907:5DBA2F:6AB929E4"},"text_sha256":"e32c77e0a7057011d220017daa1c7dcb556a929b14ffcc221a610a3d777c1784"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"harvitronix/five-video-classification-methods","input_row":{"repository":"harvitronix/five-video-classification-methods","url":"https://github.com/harvitronix/five-video-classification-methods","name":"five-video-classification-methods","owner":"harvitronix","description":"Code that accompanies my blog post outlining five video classification methods in Keras and TensorFlow","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1182,"issues":122,"created_at":"2017-03-15T06:17:59Z","updated_at":"2026-08-14T06:34:50Z","first_commit_at":"2017-03-15T05:57:44Z","last_commit_at":"2019-05-13T22:26:31Z","activity_months":25.940000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:21.396Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"harvitronix/five-video-classification-methods","visibility":"public","created_at":"2017-03-15T06:17:59Z","updated_at":"2026-08-14T06:34:50Z","private":false,"fork":false,"archived":false,"stargazers_count":1182,"open_issues_count":55,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2813","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:1778A1B:1B9A3C0:6AB929E5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2812","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"542D:14A1F2:1803015:1C24ADB:6AB929E5"},"commit":{"sha":"fd5cafe47faee22f012e57ab0aec2d4b3e612376","url":"https://github.com/harvitronix/five-video-classification-methods/commit/fd5cafe47faee22f012e57ab0aec2d4b3e612376","date":"2018-02-26T23:00:28Z","author_date":"2018-02-26T23:00:28Z","committer_date":"2018-02-26T23:00:28Z","tree_sha":"149c4f96e0c3eb8411b4ef987cd105ebdb46ab8d","message_first_line":"Minor"},"tree_request_status":200,"tree_rate":{"github_remaining":"2811","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5359:1C46F8:17B80FF:1BD8FA9:6AB929E6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3241,"blob_sha":"4e13dd4b87884a251c6e3ec377e21213d3b86f48","priority":0}],"documents":[{"path":"README.md","size":3241,"blob_sha":"4e13dd4b87884a251c6e3ec377e21213d3b86f48","priority":0,"status":200,"text":"# Five video classification methods\n\nThe five video classification methods:\n\n1. Classify one frame at a time with a ConvNet\n1. Extract features from each frame with a ConvNet, passing the sequence to an RNN, in a separate network\n1. Use a time-dstirbuted ConvNet, passing the features to an RNN, much like #2 but all in one network (this is the `lrcn` network in the code).\n1. Extract features from each frame with a ConvNet and pass the sequence to an MLP\n1. Use a 3D convolutional network (has two versions of 3d conv to choose from)\n\nSee the accompanying blog post for full details: https://medium.com/@harvitronix/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5\n\n## Requirements\n\nThis code requires you have Keras 2 and TensorFlow 1 or greater installed. Please see the `requirements.txt` file. To ensure you're up to date, run:\n\n`pip install -r requirements.txt`\n\nYou must also have `ffmpeg` installed in order to extract the video files. If `ffmpeg` isn't in your system path (ie. `which ffmpeg` doesn't return its path, or you're on an OS other than *nix), you'll need to update the path to `ffmpeg` in `data/2_extract_files.py`.\n\n## Getting the data\n\nFirst, download the dataset from UCF into the `data` folder:\n\n`cd data && wget http://crcv.ucf.edu/data/UCF101/UCF101.rar`\n\nThen extract it with `unrar e UCF101.rar`.\n\nNext, create folders (still in the data folder) with `mkdir train && mkdir test && mkdir sequences && mkdir checkpoints`.\n\nNow you can run the scripts in the data folder to move the videos to the appropriate place, extract their frames and make the CSV file the rest of the code references. You need to run these in order. Example:\n\n`python 1_move_files.py`\n\n`python 2_extract_files.py`\n\n## Extracting features\n\nBefore you can run the `lstm` and `mlp`, you need to extract features from the images with the CNN. This is done by running `extract_features.py`. On my Dell with a GeFore 960m GPU, this takes about 8 hours. If you want to limit to just the first N classes, you can set that option in the file.\n\n## Training models\n\nThe CNN-only method (method #1 in the blog post) is run from `train_cnn.py`.\n\nThe rest of the models are run from `train.py`. There are configuration options you can set in that file to choose which model you want to run.\n\nThe models are all defined in `models.py`. Reference that file to see which models you are able to run in `train.py`.\n\nTraining logs are saved to CSV and also to TensorBoard files. To see progress while training, run `tensorboard --logdir=data/logs` from the project root folder.\n\n## Demo/Using models\n\nI have not yet implemented a demo where you can pass a video file to a model and get a prediction. Pull requests are welcome if you'd like to help out!\n\n## TODO\n\n- [ ] Add data augmentation to fight overfitting\n- [x] Support multiple workers in the data generator for faster training\n- [ ] Add a demo script\n- [ ] Support other datasets\n- [ ] Implement optical flow\n- [ ] Implement more complex network architectures, like optical flow/CNN fusion\n\n## UCF101 Citation\n\nKhurram Soomro, Amir Roshan Zamir and Mubarak Shah, UCF101: A Dataset of 101 Human Action Classes From Videos in The Wild., CRCV-TR-12-01, November, 2012. \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A26:35EBC:17764A:5D9619:6AB929E5"},"text_sha256":"ca1ea48810057d9cbc4ffbdff65b77449d7c7dd8564e0780d5837e8fa26de6f4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2810","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:178E409:1BAE950:6AB929E6"},"commit":{"sha":"6c610cd179c6f44ddbd53fb5ac16f6fd71c58ab0","url":"https://github.com/harvitronix/five-video-classification-methods/commit/6c610cd179c6f44ddbd53fb5ac16f6fd71c58ab0","date":"2019-05-13T22:26:31Z","author_date":"2019-05-13T22:26:31Z","committer_date":"2019-05-13T22:26:31Z","tree_sha":"e6fc33267d793b3509dda9dfbee1c5b7fb0b917c","message_first_line":"Merge pull request #91 from Anner-deJong/patch-3"},"tree_request_status":200,"tree_rate":{"github_remaining":"2809","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:17E65CC:1C08175:6AB929E7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3241,"blob_sha":"4e13dd4b87884a251c6e3ec377e21213d3b86f48","priority":0}],"documents":[{"path":"README.md","size":3241,"blob_sha":"4e13dd4b87884a251c6e3ec377e21213d3b86f48","priority":0,"status":200,"text":"# Five video classification methods\n\nThe five video classification methods:\n\n1. Classify one frame at a time with a ConvNet\n1. Extract features from each frame with a ConvNet, passing the sequence to an RNN, in a separate network\n1. Use a time-dstirbuted ConvNet, passing the features to an RNN, much like #2 but all in one network (this is the `lrcn` network in the code).\n1. Extract features from each frame with a ConvNet and pass the sequence to an MLP\n1. Use a 3D convolutional network (has two versions of 3d conv to choose from)\n\nSee the accompanying blog post for full details: https://medium.com/@harvitronix/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5\n\n## Requirements\n\nThis code requires you have Keras 2 and TensorFlow 1 or greater installed. Please see the `requirements.txt` file. To ensure you're up to date, run:\n\n`pip install -r requirements.txt`\n\nYou must also have `ffmpeg` installed in order to extract the video files. If `ffmpeg` isn't in your system path (ie. `which ffmpeg` doesn't return its path, or you're on an OS other than *nix), you'll need to update the path to `ffmpeg` in `data/2_extract_files.py`.\n\n## Getting the data\n\nFirst, download the dataset from UCF into the `data` folder:\n\n`cd data && wget http://crcv.ucf.edu/data/UCF101/UCF101.rar`\n\nThen extract it with `unrar e UCF101.rar`.\n\nNext, create folders (still in the data folder) with `mkdir train && mkdir test && mkdir sequences && mkdir checkpoints`.\n\nNow you can run the scripts in the data folder to move the videos to the appropriate place, extract their frames and make the CSV file the rest of the code references. You need to run these in order. Example:\n\n`python 1_move_files.py`\n\n`python 2_extract_files.py`\n\n## Extracting features\n\nBefore you can run the `lstm` and `mlp`, you need to extract features from the images with the CNN. This is done by running `extract_features.py`. On my Dell with a GeFore 960m GPU, this takes about 8 hours. If you want to limit to just the first N classes, you can set that option in the file.\n\n## Training models\n\nThe CNN-only method (method #1 in the blog post) is run from `train_cnn.py`.\n\nThe rest of the models are run from `train.py`. There are configuration options you can set in that file to choose which model you want to run.\n\nThe models are all defined in `models.py`. Reference that file to see which models you are able to run in `train.py`.\n\nTraining logs are saved to CSV and also to TensorBoard files. To see progress while training, run `tensorboard --logdir=data/logs` from the project root folder.\n\n## Demo/Using models\n\nI have not yet implemented a demo where you can pass a video file to a model and get a prediction. Pull requests are welcome if you'd like to help out!\n\n## TODO\n\n- [ ] Add data augmentation to fight overfitting\n- [x] Support multiple workers in the data generator for faster training\n- [ ] Add a demo script\n- [ ] Support other datasets\n- [ ] Implement optical flow\n- [ ] Implement more complex network architectures, like optical flow/CNN fusion\n\n## UCF101 Citation\n\nKhurram Soomro, Amir Roshan Zamir and Mubarak Shah, UCF101: A Dataset of 101 Human Action Classes From Videos in The Wild., CRCV-TR-12-01, November, 2012. \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A26:35EBC:17764A:5D9619:6AB929E5"},"text_sha256":"ca1ea48810057d9cbc4ffbdff65b77449d7c7dd8564e0780d5837e8fa26de6f4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"eldar/pose-tensorflow","input_row":{"repository":"eldar/pose-tensorflow","url":"https://github.com/eldar/pose-tensorflow","name":"pose-tensorflow","owner":"eldar","description":" Human Pose estimation with TensorFlow framework ","language":"C++","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":1139,"issues":109,"created_at":"2017-03-09T19:52:15Z","updated_at":"2026-09-20T02:59:27Z","first_commit_at":"2017-03-09T19:51:36Z","last_commit_at":"2019-03-19T13:07:21Z","activity_months":24.300000000000001,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:23.532Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"eldar/pose-tensorflow","visibility":"public","created_at":"2017-03-09T19:52:15Z","updated_at":"2026-09-20T02:59:27Z","private":false,"fork":false,"archived":false,"stargazers_count":1139,"open_issues_count":65,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"2808","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:1785F29:1BA63D9:6AB929E7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2807","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5403:8656E:17BE686:1BDFD2D:6AB929E7"},"commit":{"sha":"fa19aeced37eba0d69db97e79a204b17bfd070e8","url":"https://github.com/eldar/pose-tensorflow/commit/fa19aeced37eba0d69db97e79a204b17bfd070e8","date":"2017-11-08T15:11:58Z","author_date":"2017-11-08T15:11:58Z","committer_date":"2017-11-08T15:11:58Z","tree_sha":"5f0cd9f96ae766f32507692a4bb1c6d00df38d56","message_first_line":"Merge pull request #50 from andreas-eberle/fix-upgrade-tensorflow-1_4"},"tree_request_status":200,"tree_rate":{"github_remaining":"2806","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17DC370:1BFDDF5:6AB929E8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2879,"blob_sha":"afe49a776e0a74f623e658e2062874977964753a","priority":0}],"documents":[{"path":"README.md","size":2879,"blob_sha":"afe49a776e0a74f623e658e2062874977964753a","priority":0,"status":200,"text":"# Human Pose Estimation with TensorFlow\n\n![](images/teaser.png)\n\nHere you can find the implementation of the Human Body Pose Estimation algorithm,\npresented in the [ArtTrack](http://arxiv.org/abs/1612.01465) and [DeeperCut](http://arxiv.org/abs/1605.03170) papers:\n\n**Eldar Insafutdinov, Leonid Pishchulin, Bjoern Andres, Mykhaylo Andriluka and Bernt Schiele\nDeeperCut:  A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model.\nIn _European Conference on Computer Vision (ECCV)_, 2016**\n\n**Eldar Insafutdinov, Mykhaylo Andriluka, Leonid Pishchulin, Siyu Tang, Evgeny Levinkov, Bjoern Andres and Bernt Schiele\nArtTrack: Articulated Multi-person Tracking in the Wild.\nIn _Conference on Computer Vision and Pattern Recognition (CVPR)_, 2017**\n\nFor more information visit http://pose.mpi-inf.mpg.de\n\nPython 3 is required to run this code.\nFirst of all, you should install TensorFlow as described in the\n[official documentation](https://www.tensorflow.org/install/).\nWe recommended to use `virtualenv`.\n\nYou will also need to install the following Python packages:\n\n```\n$ pip3 install scipy scikit-image matplotlib pyyaml easydict cython munkres\n```\n\nWhen running training or prediction scripts, please make sure to set the environment variable\n`TF_CUDNN_USE_AUTOTUNE` to 0 (see [this ticket](https://github.com/tensorflow/tensorflow/issues/5048)\nfor explanation).\n\nIf your machine has multiple GPUs, you can select which GPU you want to run on\nby setting the environment variable, eg. `CUDA_VISIBLE_DEVICES=0`.\n\n## Demo code\n\nSingle-Person (if there is only one person in the image)\n\n```\n# Download pre-trained model files\n$ cd models/mpii\n$ ./download_models.sh\n$ cd -\n\n# Run demo of single person pose estimation\n$ TF_CUDNN_USE_AUTOTUNE=0 python3 demo/singleperson.py\n```\n\nMultiple People\n\n```\n# Compile dependencies\n$ ./compile.sh\n\n# Download pre-trained model files\n$ cd models/coco\n$ ./download_models.sh\n$ cd -\n\n# Run demo of multi person pose estimation\n$ TF_CUDNN_USE_AUTOTUNE=0 python3 demo/demo_multiperson.py\n```\n\n## Training models\n\nPlease follow these [instructions](models/README.md)\n\n## Citation\nPlease cite ArtTrack and DeeperCut in your publications if it helps your research:\n\n    @inproceedings{insafutdinov2017cvpr,\n\t    title = {ArtTrack: Articulated Multi-person Tracking in the Wild},\n\t    booktitle = {CVPR'17},\n\t    url = {http://arxiv.org/abs/1612.01465},\n\t    author = {Eldar Insafutdinov and Mykhaylo Andriluka and Leonid Pishchulin and Siyu Tang and Evgeny Levinkov and Bjoern Andres and Bernt Schiele}\n    }\n\n    @article{insafutdinov2016eccv,\n        title = {DeeperCut: A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model},\n\t    booktitle = {ECCV'16},\n        url = {http://arxiv.org/abs/1605.03170},\n        author = {Eldar Insafutdinov and Leonid Pishchulin and Bjoern Andres and Mykhaylo Andriluka and Bernt Schiele}\n    }\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"864C:3E724:17FAC1:5E1A78:6AB929E8"},"text_sha256":"a9b57b773e18f1ca1dad478b2738a2e6346d78e7d85fdcea7fdf87a85c490f98"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2805","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5436:3C4024:17F4BA9:1C165DD:6AB929E9"},"commit":{"sha":"6a8f5ee90ea444e12c15eecebf8448797c52bbf5","url":"https://github.com/eldar/pose-tensorflow/commit/6a8f5ee90ea444e12c15eecebf8448797c52bbf5","date":"2019-03-19T13:07:21Z","author_date":"2019-03-19T13:07:21Z","committer_date":"2019-03-19T13:07:21Z","tree_sha":"27963661be9ae03d2107a04dbbb8110ed21a3c78","message_first_line":"subtitle"},"tree_request_status":200,"tree_rate":{"github_remaining":"2804","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"531A:B1202:1792C5C:1BB3D92:6AB929E9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3178,"blob_sha":"5d9dad8d3601297019f96b3ad8b7fa5444d33f78","priority":0}],"documents":[{"path":"README.md","size":3178,"blob_sha":"5d9dad8d3601297019f96b3ad8b7fa5444d33f78","priority":0,"status":200,"text":"# Human Pose Estimation with TensorFlow\n\n![](images/teaser.png)\n\nHere you can find the implementation of the Human Body Pose Estimation algorithm,\npresented in the [DeeperCut](http://arxiv.org/abs/1605.03170) and [ArtTrack](http://arxiv.org/abs/1612.01465) papers:\n\n**Eldar Insafutdinov, Leonid Pishchulin, Bjoern Andres, Mykhaylo Andriluka and Bernt Schiele\nDeeperCut:  A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model.\nIn _European Conference on Computer Vision (ECCV)_, 2016**\n\n**Eldar Insafutdinov, Mykhaylo Andriluka, Leonid Pishchulin, Siyu Tang, Evgeny Levinkov, Bjoern Andres and Bernt Schiele\nArtTrack: Articulated Multi-person Tracking in the Wild.\nIn _Conference on Computer Vision and Pattern Recognition (CVPR)_, 2017**\n\n<p align=\"center\">\n    <a href=\"https://www.mpi-inf.mpg.de/departments/computer-vision-and-multimodal-computing/\"><img width=\"50%\" src=\"images/mpilogo-inf-narrow.png\"><\/a>\n<\/p>\n\nFor more information visit http://pose.mpi-inf.mpg.de\n\n## Prerequisites\n\nThe implementation is in Python 3 and TensorFlow. We recommended using `conda` to install the dependencies.\nFirst, create a Python 3.6 environment:\n\n```bash\nconda create -n py36 python=3.6\nconda activate py36\n```\n\nThen, install basic dependencies with conda:\n\n```bash\nconda install numpy scikit-image pillow scipy pyyaml matplotlib cython\n```\n\nInstall TensorFlow and remaining packages with pip:\n```bash\npip install tensorflow-gpu easydict munkres\n```\n\nWhen running training or prediction scripts, please make sure to set the environment variable\n`TF_CUDNN_USE_AUTOTUNE` to 0 (see [this ticket](https://github.com/tensorflow/tensorflow/issues/5048)\nfor explanation).\n\nIf your machine has multiple GPUs, you can select which GPU you want to run on\nby setting the environment variable, eg. `CUDA_VISIBLE_DEVICES=0`.\n\n## Demo code\n\nSingle-Person (if there is only one person in the image)\n\n```\n# Download pre-trained model files\n$ cd models/mpii\n$ ./download_models.sh\n$ cd -\n\n# Run demo of single person pose estimation\n$ TF_CUDNN_USE_AUTOTUNE=0 python3 demo/singleperson.py\n```\n\nMultiple People\n\n```\n# Compile dependencies\n$ ./compile.sh\n\n# Download pre-trained model files\n$ cd models/coco\n$ ./download_models.sh\n$ cd -\n\n# Run demo of multi person pose estimation\n$ TF_CUDNN_USE_AUTOTUNE=0 python3 demo/demo_multiperson.py\n```\n\n## Training models\n\nPlease follow these [instructions](models/README.md)\n\n## Citation\nPlease cite ArtTrack and DeeperCut in your publications if it helps your research:\n\n    @inproceedings{insafutdinov2017cvpr,\n\t    title = {ArtTrack: Articulated Multi-person Tracking in the Wild},\n\t    booktitle = {CVPR'17},\n\t    url = {http://arxiv.org/abs/1612.01465},\n\t    author = {Eldar Insafutdinov and Mykhaylo Andriluka and Leonid Pishchulin and Siyu Tang and Evgeny Levinkov and Bjoern Andres and Bernt Schiele}\n    }\n\n    @article{insafutdinov2016eccv,\n        title = {DeeperCut: A Deeper, Stronger, and Faster Multi-Person Pose Estimation Model},\n\t    booktitle = {ECCV'16},\n        url = {http://arxiv.org/abs/1605.03170},\n        author = {Eldar Insafutdinov and Leonid Pishchulin and Bjoern Andres and Mykhaylo Andriluka and Bernt Schiele}\n    }\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5178:372D9:17BEFF:5DE001:6AB929E9"},"text_sha256":"c6f7a9017617ba96a97b82a9c9c358c07403ea5b17a503e95a70572cbaa48a39"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Dobiasd/frugally-deep","input_row":{"repository":"Dobiasd/frugally-deep","url":"https://github.com/Dobiasd/frugally-deep","name":"frugally-deep","owner":"Dobiasd","description":"A lightweight header-only library for using Keras (TensorFlow) models in C++.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1127,"issues":331,"created_at":"2016-07-15T19:36:26Z","updated_at":"2026-09-16T18:35:37Z","first_commit_at":"2016-06-29T21:07:19Z","last_commit_at":"2026-05-06T15:10:34Z","activity_months":118.19,"ai_ml_match_topics":"deep-learning; machine-learning; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:26.233Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Dobiasd/frugally-deep","visibility":"public","created_at":"2016-07-15T19:36:26Z","updated_at":"2026-09-16T18:35:37Z","private":false,"fork":false,"archived":false,"stargazers_count":1127,"open_issues_count":0,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2803","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:1855F28:1C77BDC:6AB929EA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2802","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D7AF02:FD7511:6AB929EA"},"commit":{"sha":"b386b38f14ec97fa3fa486d3143242598e9bc123","url":"https://github.com/Dobiasd/frugally-deep/commit/b386b38f14ec97fa3fa486d3143242598e9bc123","date":"2018-05-24T12:48:34Z","author_date":"2018-05-24T12:48:34Z","committer_date":"2018-05-24T12:48:34Z","tree_sha":"778d0b85e07fcae5fa47dd5dfd528f26b3ed46fa","message_first_line":"Merge pull request #53 from mpariente/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2801","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:17E82E0:1C09F72:6AB929EB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8521,"blob_sha":"93a20cad7c78db101cc7b79cd6951a1a703a4012","priority":0}],"documents":[{"path":"README.md","size":8521,"blob_sha":"93a20cad7c78db101cc7b79cd6951a1a703a4012","priority":0,"status":200,"text":"![logo](logo/fdeep.png)\n\n[![Build Status](https://travis-ci.org/Dobiasd/frugally-deep.svg?branch=master)][travis]\n[![(License MIT 1.0)](https://img.shields.io/badge/license-MIT%201.0-blue.svg)][license]\n\n[travis]: https://travis-ci.org/Dobiasd/frugally-deep\n[license]: LICENSE\n\n\nfrugally-deep\n=============\n**Use Keras models in C++ with ease**\n\n\nTable of contents\n-----------------\n  * [Introduction](#introduction)\n  * [Usage](#usage)\n  * [Performance](#performance)\n  * [Requirements and Installation](#requirements-and-installation)\n  * [Internals](#internals)\n\n\nIntroduction\n------------\n\nWould you like to build/train a model using Keras/Python? And would you like run the prediction (forward pass) on your model in C++ without linking your application against TensorFlow? Then frugally-deep is exactly for you.\n\n**frugally-deep**\n\n* **is a small header-only library** written in modern and pure C++.\n* is very easy to integrate and use.\n* depends only on [FunctionalPlus](https://github.com/Dobiasd/FunctionalPlus), [Eigen](http://eigen.tuxfamily.org/) and [json](https://github.com/nlohmann/json) - also header-only libraries.\n* supports inference (`model.predict`) not only for [sequential models](https://keras.io/getting-started/sequential-model-guide/) but also for computational graphs with a more complex topology, created with the [functional API](https://keras.io/getting-started/functional-api-guide/).\n* re-implements a (small) subset of TensorFlow, i.e. the operations needed to support prediction.\n* results in a much smaller binary size than linking against TensorFlow.\n* works out of-the-box also when compiled into a 32-bit executable.\n* utterly ignores even the most powerful GPU in your system and uses only one CPU core. ;-)\n* but is quite fast on one CPU core [compared to TensorFlow](#performance).\n\n\n### Supported layer types\n\nLayer types typically used in image recognition/generation are supported, making many popular model architectures possible (see [Performance section](#performance)).\n\n* `Add`, `Concatenate`, `Subtract`, `Multiply`, `Average`, `Maximum`\n* `AveragePooling1D/2D`, `GlobalAveragePooling1D/2D`\n* `Conv1D/2D`, `SeparableConv2D`\n* `Cropping1D/2D`, `ZeroPadding1D/2D`\n* `BatchNormalization`, `Dense`, `Dropout`, `Flatten`\n* `MaxPooling1D/2D`, `GlobalMaxPooling1D/2D`\n* `ELU`, `LeakyReLU`, `ReLU`, `SeLU`\n* `Sigmoid`, `Softmax`, `Softplus`, `Tanh`\n* `UpSampling1D/2D`\n* `Reshape`\n\n\n### Also supported\n\n* multiple inputs and outputs\n* nested models\n* residual connections\n* shared layers\n* arbitrary complex model architectures / computational graphs\n\n\n### Currently not supported are the following:\n`ActivityRegularization`,\n`AlphaDropout`,\n`AveragePooling3D`,\n`Bidirectional`,\n`Conv2DTranspose`,\n`Conv3D`,\n`ConvLSTM2D`,\n`CuDNNGRU`,\n`CuDNNLSTM`,\n`Cropping3D`,\n`DepthwiseConv2D`,\n`Dot`,\n`Embedding`,\n`GaussianDropout`,\n`GaussianNoise`,\n`GRU`,\n`GRUCell`,\n`Lambda`,\n`LocallyConnected1D`,\n`LocallyConnected2D`,\n`LSTM`,\n`LSTMCell`,\n`Masking`,\n`MaxPooling3D`,\n`Permute`,\n`PReLU`,\n`RepeatVector`,\n`RNN`,\n`SimpleRNN`,\n`SimpleRNNCell`,\n`StackedRNNCells`,\n`ThresholdedReLU`,\n`TimeDistributed`,\n`Upsampling3D`,\n`any custom layers`,\n`None` as input/output shape\n\n\nUsage\n-----\n\n1) Use Keras/Python to build (`model.compile(...)`), train (`model.fit(...)`) and test (`model.evaluate(...)`) your model as usual. Then save it to a single HDF5 file using `model.save('....h5', include_optimizer=False)`. The `image_data_format` in your model must be `channels_last`, which is the default when using the TensorFlow backend. Models created with a different `image_data_format` and other backends are not supported.\n\n2) Now convert it to the frugally-deep file format with `keras_export/convert_model.py`\n\n3) Finally load it in C++ (`fdeep::load_model(...)`) and use `model.predict(...)` to invoke a forward pass with your data.\n\nThe following minimal example shows the full workflow:\n\n```python\n# create_model.py\nimport numpy as np\nfrom keras.layers import Input, Dense\nfrom keras.models import Model\n\ninputs = Input(shape=(4,))\nx = Dense(5, activation='relu')(inputs)\npredictions = Dense(3, activation='softmax')(x)\nmodel = Model(inputs=inputs, outputs=predictions)\nmodel.compile(loss='categorical_crossentropy', optimizer='nadam')\n\nmodel.fit(\n    np.asarray([[1,2,3,4], [2,3,4,5]]),\n    np.asarray([[1,0,0], [0,0,1]]), epochs=10)\n\nmodel.save('keras_model.h5', include_optimizer=False)\n```\n\n```\npython3 keras_export/convert_model.py keras_model.h5 fdeep_model.json\n```\n\n```cpp\n// main.cpp\n#include <fdeep/fdeep.hpp>\nint main()\n{\n    const auto model = fdeep::load_model(\"fdeep_model.json\");\n    const auto result = model.predict(\n        {fdeep::tensor3(fdeep::shape3(4, 1, 1), {1, 2, 3, 4})});\n    std::cout << fdeep::show_tensor3s(result) << std::endl;\n}\n```\n\nWhen using `convert_model.py` a test case (input and corresponding output values) is generated automatically and saved along with your model. `fdeep::load_model` runs this test to make sure the results of a forward pass in frugally-deep are the same as in Keras.\n\nIn order to convert images to `fdeep::tensor3` the convenience function `tensor3_from_bytes` is provided ([cimg example](https://gist.github.com/Dobiasd/21651861b73042762126e8eea52d9974), [opencv example](https://gist.github.com/Dobiasd/3140cfd9f539b6adb346e0b4a0ce157b), [tensor3_to_cv_mat.cpp](https://gist.github.com/Dobiasd/7ef20a0ad47d3f8dc1654a0ca5d1c77c)).\nIn case you want to convert an `Eigen::Matrix` to `fdeep::tensor3`, have a look at the following two examples: [copy values](https://gist.github.com/Dobiasd/966334bb867d170b334c8374e635cb9b), [reuse memory](https://gist.github.com/Dobiasd/2852c81adbd57a57e89d2d0385cc4c06)\n\n\n\nPerformance\n-----------\n\nBelow you can find the average durations of multiple consecutive forward passes for some popular models ran on a single core of an Intel Core i5-6600 CPU @ 3.30GHz. frugally-deep was compiled (GCC ver. 5.4.0) with `g++ -O3 -mavx` (same as TensorFlow 1.7.0 binaries). The processes were started with `CUDA_VISIBLE_DEVICES='' taskset --cpu-list 1 ...` to disable the GPU and to only allow usage of one CPU.\n\n```\n| Model             | Keras + TensorFlow | frugally-deep |\n|-------------------|--------------------|---------------|\n| InceptionV3       |             0.40 s |        0.33 s |\n| ResNet50          |             0.39 s |        0.21 s |\n| VGG16             |             0.37 s |        0.77 s |\n| VGG19             |             0.45 s |        0.93 s |\n| Xception          |             0.84 s |        0.54 s |\n| MobileNet         |             0.18 s |        0.06 s |\n| DenseNet201       |             0.81 s |        0.34 s |\n| NASNetLarge       |             2.28 s |        2.20 s |\n```\n\n\nRequirements and Installation\n-----------------------------\n\nA **C++14**-compatible compiler is needed. Compilers from these versions on are fine: GCC 4.9, Clang 3.7 (libc++ 3.7) and Visual C++ 2015.\n\nGuides for different ways to install frugally-deep can be found in [`INSTALL.md`](INSTALL.md).\n\n\nInternals\n---------\n\nfrugally-deep uses `channels_first` (`depth/channels, height, width`) as its `image_data_format` internally. `convert_model.py` takes care of all necessary conversions.\nFrom then on everything is handled as a float32 tensor with rank 3. Dense layers for example take its input flattened to a shape of `(n, 1, 1)`. This is also the shape you will receive as the output of a final `softmax` layer for example.\n\nIn case you would like to use `double` instead of `float` for all calculations, simply do this:\n```cpp\n#define FDEEP_FLOAT_TYPE double\n#include <fdeep/fdeep.hpp>\n```\n\nA frugally-deep model is thread-safe, i.e. you can call `model.predict` on the same model instance from different threads simultaneously. This way you may utilize up to as many CPU cores as you have predictions to make. With `model::predict_multi` there is a convenience function available to handle the parallelism for you.\n\n\nDisclaimer\n----------\nThe API of this library still might change in the future. If you have any suggestions, find errors or want to give general feedback/criticism, I'd [love to hear from you](https://github.com/Dobiasd/frugally-deep/issues). Of course, [contributions](https://github.com/Dobiasd/frugally-deep/pulls) are also very welcome.\n\n\nLicense\n-------\nDistributed under the MIT License.\n(See accompanying file [`LICENSE`](https://github.com/Dobiasd/frugally-deep/blob/master/LICENSE) or at\n[https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9240:35999:177D51:5D9E96:6AB929EA"},"text_sha256":"816cfe1292c31f7141014d46bda8a0ed531030337ad07f8b69acb4b7f96f78b2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2800","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:179A036:1BBAED6:6AB929EB"},"commit":{"sha":"44c9216c078feb57a72d10ed41cd84ff906b2597","url":"https://github.com/Dobiasd/frugally-deep/commit/44c9216c078feb57a72d10ed41cd84ff906b2597","date":"2026-05-06T15:10:34Z","author_date":"2026-05-06T15:10:34Z","committer_date":"2026-05-06T15:10:34Z","tree_sha":"b72c589fbe727ba4a940fcaa15f8a3e03744439a","message_first_line":"Add iterator-pair tensor constructor (closes #415)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2799","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5470:7307A:17AE476:1BCFA1B:6AB929EC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7444,"blob_sha":"eff6a0f1fb4d5d018d60be36c480b6a67080f55e","priority":0}],"documents":[{"path":"README.md","size":7444,"blob_sha":"eff6a0f1fb4d5d018d60be36c480b6a67080f55e","priority":0,"status":200,"text":"![logo](logo/fdeep.png)\n\n[![CI](https://github.com/Dobiasd/frugally-deep/workflows/ci/badge.svg)](https://github.com/Dobiasd/frugally-deep/actions)\n[![(License MIT 1.0)](https://img.shields.io/badge/license-MIT%201.0-blue.svg)][license]\n\n[license]: LICENSE\n\nfrugally-deep\n=============\n\n**Use Keras models in C++ with ease**\n\nTable of contents\n-----------------\n\n* [Introduction](#introduction)\n* [Usage](#usage)\n* [Requirements and Installation](#requirements-and-installation)\n* [FAQ](#faq)\n\nIntroduction\n------------\n\nWould you like to build/train a model using Keras/Python? And would you like to run the prediction (forward pass) on your model in C++ without linking your application against TensorFlow? Then frugally-deep is exactly for you.\n\n**frugally-deep**\n\n* **is a small header-only library** written in modern and pure C++.\n* is very easy to integrate and use.\n* depends only on [FunctionalPlus](https://github.com/Dobiasd/FunctionalPlus), [Eigen](http://eigen.tuxfamily.org/) and [json](https://github.com/nlohmann/json) - also header-only libraries.\n* supports inference (`model.predict`) not only for [sequential models](https://keras.io/getting-started/sequential-model-guide/) but also for computational graphs with a more complex topology, created with the [functional API](https://keras.io/getting-started/functional-api-guide/).\n* re-implements a (small) subset of TensorFlow, i.e., the operations needed to support prediction.\n* results in a much smaller binary size than linking against TensorFlow.\n* works out-of-the-box also when compiled into a 32-bit executable. (Of course, 64 bit is fine too.)\n* avoids temporarily allocating (potentially large chunks of) additional RAM during convolutions (by not materializing the im2col input matrix).\n* utterly ignores even the most powerful GPU in your system and uses only one CPU core per prediction. ;-)\n* but is quite fast on one CPU core, and you can run multiple predictions in parallel, thus utilizing as many CPUs as you like to improve the overall prediction throughput of your application/pipeline.\n\n\n### Supported layer types\n\n* `Add`, `Concatenate`, `Subtract`, `Multiply`, `Average`, `Maximum`, `Minimum`, `Dot`\n* `AveragePooling1D/2D/3D`, `GlobalAveragePooling1D/2D/3D`\n* `AdaptiveAveragePooling1D/2D/3D`, `AdaptiveMaxPooling1D/2D/3D`\n* `TimeDistributed`\n* `Conv1D/2D/3D`, `SeparableConv2D`, `DepthwiseConv1D`, `DepthwiseConv2D`\n* `Conv1DTranspose`, `Conv2DTranspose`, `Conv3DTranspose`\n* `Cropping1D/2D/3D`, `ZeroPadding1D/2D/3D`, `CenterCrop`\n* `BatchNormalization`, `Dense`, `EinsumDense`, `Flatten`, `Normalization`\n* `Dropout`, `AlphaDropout`, `GaussianDropout`, `GaussianNoise`\n* `SpatialDropout1D`, `SpatialDropout2D`, `SpatialDropout3D`\n* `ActivityRegularization`, `LayerNormalization`, `RMSNormalization`\n* `GroupNormalization`, `UnitNormalization`\n* Training-only image augmentation layers (passed through at inference):\n  `RandomBrightness`, `RandomContrast`, `RandomCrop`, `RandomFlip`, `RandomHue`,\n  `RandomGrayscale`, `RandomRotation`, `RandomTranslation`, `RandomZoom`,\n  `RandomShear`, `RandomSaturation`, `RandomPerspective`, `AutoContrast`,\n  `AugMix`, `CutMix`, `MixUp`, `RandAugment`, `Solarization`, `Equalization`\n* `MaxPooling1D/2D/3D`, `GlobalMaxPooling1D/2D/3D`\n* `UpSampling1D/2D/3D`, `Resizing`, `Rescaling`\n* `Reshape`, `Permute`, `RepeatVector`\n* `Embedding`, `CategoryEncoding`\n* `Discretization`, `IntegerLookup`\n* `Masking` (passthrough at inference)\n* `Attention`, `AdditiveAttention`, `MultiHeadAttention`, `GroupedQueryAttention`\n* `LSTM`, `GRU`, `SimpleRNN`, `Bidirectional`\n* `RNN` wrapping `LSTMCell`/`GRUCell`/`SimpleRNNCell`/`StackedRNNCells`\n* `ConvLSTM1D`, `ConvLSTM2D`, `ConvLSTM3D`\n\n### Also supported\n\n* different activiations (`celu`, `elu`, `exponential`, `gelu`, `hard_shrink`, `hard_sigmoid`, `hard_tanh`, `leaky_relu`, `leakyrelu`, `linear`, `log_sigmoid`, `log_softmax`, `prelu`, `relu`, `relu6`, `selu`, `shared_activation`, `sigmoid`, `silu`, `soft_shrink`, `softmax`, `softplus`, `softsign`, `sparse_plus`, `squareplus`, `swish`, `tanh`, `tanh_shrink`, `threshold`)\n* multiple inputs and outputs\n* nested models\n* residual connections\n* shared layers\n* variable input shapes\n* arbitrary complex model architectures / computational graphs\n* custom layers (by passing custom factory functions to `load_model`)\n\n### Currently not supported are the following:\n\n`Lambda` ([why](FAQ.md#why-are-lambda-layers-not-supported)),\n`Hashing`, `HashedCrossing`,\n`MelSpectrogram`, `STFTSpectrogram`,\n`StringLookup`, `TextVectorization`,\nstateful recurrent layers,\n`temporal` models\n\nUsage\n-----\n\n1) Use Keras/Python to build (`model.compile(...)`), train (`model.fit(...)`) and test (`model.evaluate(...)`) your model as usual. Then save it to a single file using `model.save('....keras')`. The `image_data_format` in your model must be `channels_last`, which is the default when using the TensorFlow backend. Models created with a different `image_data_format` and other backends are not supported.\n\n2) Now convert it to the frugally-deep file format with `keras_export/convert_model.py`\n\n3) Finally load it in C++ (`fdeep::load_model(...)`) and use `model.predict(...)` to invoke a forward pass with your data.\n\nThe following minimal example shows the full workflow:\n\n```python\n# create_model.py\nimport numpy as np\nfrom keras.layers import Input, Dense\nfrom keras.models import Model\n\ninputs = Input(shape=(4,))\nx = Dense(5, activation='relu')(inputs)\npredictions = Dense(3, activation='softmax')(x)\nmodel = Model(inputs=inputs, outputs=predictions)\nmodel.compile(loss='categorical_crossentropy', optimizer='nadam')\n\nmodel.fit(\n    np.asarray([[1, 2, 3, 4], [2, 3, 4, 5]]),\n    np.asarray([[1, 0, 0], [0, 0, 1]]), epochs=10)\n\nmodel.save('keras_model.keras')\n```\n\n```bash\npython3 keras_export/convert_model.py keras_model.keras fdeep_model.json\n```\n\n```cpp\n// main.cpp\n#include <fdeep/fdeep.hpp>\nint main()\n{\n    const auto model = fdeep::load_model(\"fdeep_model.json\");\n    const auto result = model.predict(\n        {fdeep::tensor(fdeep::tensor_shape(static_cast<std::size_t>(4)),\n        std::vector<float>{1, 2, 3, 4})});\n    std::cout << fdeep::show_tensors(result) << std::endl;\n}\n```\n\nWhen using `convert_model.py` a test case (input and corresponding output values) is generated automatically and saved along with your model. `fdeep::load_model` runs this test to make sure the results of a forward pass in frugally-deep are the same as in Keras.\n\nFor more integration examples please have a look at the [FAQ](FAQ.md).\n\nRequirements and Installation\n-----------------------------\n\n- A **C++14**-compatible compiler: Compilers from these versions on are fine: GCC 4.9, Clang 3.7 (libc++ 3.7) and Visual C++ 2015\n- Python 3.9 or higher\n- TensorFlow 2.21.0\n- Keras 3.14.0\n\n(These are the tested versions, but somewhat older ones might work too.)\n\nGuides for different ways to install frugally-deep can be found in [`INSTALL.md`](INSTALL.md).\n\nFAQ\n---\n\nSee [`FAQ.md`](FAQ.md)\n\nDisclaimer\n----------\n\nThe API of this library still might change in the future. If you have any suggestions, find errors, or want to give general feedback/criticism, I'd [love to hear from you](issues). Of course, [contributions](pulls) are also very welcome.\n\nLicense\n-------\n\nDistributed under the MIT License.\n(See accompanying file [`LICENSE`](LICENSE) or at\n[https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CE66:3E724:17FADE:5E1AF3:6AB92999"},"text_sha256":"ade08023825275732e71b0cc2233a48d2b7f4c8ee95c968228ecfa6e5cd08038"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/Windows-Machine-Learning","input_row":{"repository":"microsoft/Windows-Machine-Learning","url":"https://github.com/microsoft/Windows-Machine-Learning","name":"Windows-Machine-Learning","owner":"microsoft","description":"Samples and Tools for Windows ML.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1121,"issues":136,"created_at":"2018-03-01T20:07:47Z","updated_at":"2026-09-25T05:16:39Z","first_commit_at":"2018-03-01T20:07:48Z","last_commit_at":"2025-08-07T17:04:54Z","activity_months":89.219999999999999,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:28.933Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/Windows-Machine-Learning","visibility":"public","created_at":"2018-03-01T20:07:47Z","updated_at":"2026-09-25T05:16:39Z","private":false,"fork":false,"archived":false,"stargazers_count":1121,"open_issues_count":26,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2798","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:17890BA:1BAA8E0:6AB929EC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2797","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:17890EF:1BAA91C:6AB929ED"},"commit":{"sha":"374e572db13f7aef9a3bbf11012549382fc8611f","url":"https://github.com/microsoft/Windows-Machine-Learning/commit/374e572db13f7aef9a3bbf11012549382fc8611f","date":"2018-05-15T22:33:16Z","author_date":"2018-05-15T22:33:16Z","committer_date":"2018-05-15T22:33:16Z","tree_sha":"5031b9516364afaeab613eeaaaf43eb1a2e67990","message_first_line":"fix issue 13: Exception in the release x64 build"},"tree_request_status":200,"tree_rate":{"github_remaining":"2796","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17B3BA2:1BD5457:6AB929ED"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1422,"blob_sha":"6c044772d480d022c41105d9057e20d5583a9cdd","priority":0}],"documents":[{"path":"README.md","size":1422,"blob_sha":"6c044772d480d022c41105d9057e20d5583a9cdd","priority":0,"status":200,"text":"# Windows ML samples\n\nThis repo contains sample apps that demonstrate how to use Windows ML to build machine learning applications for Windows 10.\n\nFor tutorials, how-tos, and additional information, see the Windows ML documentation:\nhttps://docs.microsoft.com/windows/uwp/machine-learning\n\n## Sample apps\n\nThese generic examples show how to use various models and input feeds with Windows ML. \n\n- **MNIST**: Uses the MNIST model to recognize a numeric digit drawn by the user.\n- **SqueezeNet**: Uses the SqueezeNet model to detect the predominant object in an image.\n- **WinMLExplorer**: Uses a circuit board defect detection model to detect defects from images or a real-time camera feed.\n\n## Requirements\n\n- [Windows 10 - Build 17110 or higher](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso)\n- [Windows SDK - Build 17110 or higher](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK)\n\n## Contributing\n\nWe're always looking for your help to fix bugs and improve the samples. Create a pull request, and we'll be happy to take a look.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"471E:29FD16:182B7B:5E4C3D:6AB929ED"},"text_sha256":"c600f2d51583a4d9c7b3e51d3c288991b4eacf69dfa9a0a6d76cb180e97b60e5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2795","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:179A19E:1BBB0B5:6AB929EE"},"commit":{"sha":"638cd40abc408e7049219e5d7b4fe164c304f2a2","url":"https://github.com/microsoft/Windows-Machine-Learning/commit/638cd40abc408e7049219e5d7b4fe164c304f2a2","date":"2025-08-07T17:04:54Z","author_date":"2025-08-07T17:04:54Z","committer_date":"2025-08-07T17:04:54Z","tree_sha":"c2e7c08934249df31a36850e32cf9022b26649bb","message_first_line":"Add notice to new WinML (#534)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2794","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"544E:6C9BF:17F4E39:1C169D0:6AB929EE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18185,"blob_sha":"c8edb5dac09e4a1687c0cd111927e33b9072b5a1","priority":0},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1}],"documents":[{"path":"README.md","size":18185,"blob_sha":"c8edb5dac09e4a1687c0cd111927e33b9072b5a1","priority":0,"status":200,"text":"# Windows Machine Learning\n\n> ⚠️ **IMPORTANT**<br/>For the latest documentation about Windows Machine Learning, see [What is Windows ML](/windows/ai/new-windows-ml/overview). That documentation describes APIs that are in the **Microsoft.Windows.AI.MachineLearning** namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the **Windows.AI.MachineLearning** namespace, and were shipped in 2018.\n\nWindows Machine Learning is a high-performance machine learning inference API that is powered by [ONNX Runtime](https://onnxruntime.ai/) and [DirectML](https://docs.microsoft.com/en-us/windows/ai/directml/dml).\n\n\n[![Alt text](https://i.ytimg.com/vi/8MCDSlm326U/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCFThAhMuWU3UrHtPjc4Ttz9SSkpQ)](https://www.youtube.com/watch?v=8MCDSlm326U)\n\nThe Windows ML API is a [Windows Runtime Component](https://docs.microsoft.com/en-us/windows/uwp/winrt-components/) and is suitable for high-performance, low-latency applications such as frameworks, games, and other real-time applications as well as applications built with high-level languages.\n\n\nThis repo contains Windows Machine Learning samples and tools that demonstrate how to build machine learning powered scenarios into Windows applications.\n\n- [Getting Started with Windows ML](#getting-started-with-windows-ml)\n- [Model Samples](#model-samples)\n- [Advanced Scenario Samples](#advanced-scenario-samples)\n- [Developer Tools](#developer-tools)\n- [Feedback](#feedback)\n- [External Links](#external-links)\n- [Contributing](#contributing)\n\nFor additional information on Windows ML, including step-by-step tutorials and how-to guides, please visit the [Windows ML documentation](https://docs.microsoft.com/en-us/windows/ai/).\n\n\n| Sample/Tool | Status |\n|---------|--------------|\n| All Samples | [![Build Status](https://microsoft.visualstudio.com/WindowsAI/_apis/build/status/WinML/Samples/Github%20Public%20Samples%20Build%20RS5?branchName=master)](https://microsoft.visualstudio.com/WindowsAI/_build/latest?definitionId=39302&branchName=master) |\n| WinmlRunner | [![Build Status](https://microsoft.visualstudio.com/WindowsAI/_apis/build/status/WInMLRunner%20CI%20Build?branchName=master)](https://microsoft.visualstudio.com/WindowsAI/_build/latest?definitionId=38654&branchName=master) |\n| WinML Dashboard | [![Build Status](https://microsoft.visualstudio.com/WindowsAI/_apis/build/status/WinML/WinMLTools/WinML%20Dashboard%20CI%20Build%20(Github)?branchName=master)](https://microsoft.visualstudio.com/WindowsAI/_build/latest?definitionId=39375&branchName=master) |\n\n## Getting Started with Windows ML\n\n**Prerequisites**\n- [Visual Studio 2017 Version 15.7.4 or Newer](https://developer.microsoft.com/en-us/windows/downloads)\n\n\nWindows ML offers machine learning inferencing via the inbox Windows SDK as well as a redistributable NuGet package. The table below highlights the availability, distribution, language support, servicing, and forward compatibility aspects of the In-Box and NuGet package for Windows ML.\n\n| |In-Box|\tNuGet|\n|-|-----|------|\n|Availability|\t[Windows 10 - Build 17763 (RS5) or Newer](https://www.microsoft.com/en-us/software-download/windows10)<br/>For more detailed information about version support, checkout our [docs](https://docs.microsoft.com/en-us/uwp/api/windows.ai.machinelearning?view=winrt-22000).\t| [Windows 8.1 or Newer](https://www.microsoft.com/en-us/software-download/windows8ISO)<br/>**NOTE**: Some APIs (ie: VideoFrame) are not available on older OSes.|\n|Windows SDK|\t[Windows SDK - Build 17763 (RS5) or Newer](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/) |\t[Windows SDK - Build 17763 (RS5) or Newer](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/)\n|Distribution|\tBuilt into Windows |\tPackage and distribute as part of your application\n|Servicing|\tMicrosoft-driven (customers benefit automatically)\t| Developer-driven\n|Forward| compatibility\tAutomatically rolls forward with new features\t| Developer needs to update package manually\n\nLearn more [here](https://docs.microsoft.com/en-us/windows/ai/windows-ml/get-started).\n\n## Model Samples\nIn this section you will find various model samples for a variety of scenarios across the different Windows ML API offerings.\n\n**Image Classification**\n\nA subdomain of computer vision in which an algorithm looks at an image and assigns it a tag from a collection of predefined tags or categories that it has been trained on.\n\n| Windows App Type <br/>Distribution | UWP<br/>In-Box |  UWP<br/>NuGet | Desktop<br/>In-Box | Desktop<br/>NuGet |\n|------------|------------------------------------|--------------------------------------|------------------------------------|--------------------------------------|\n| [AlexNet](https://github.com/onnx/models/tree/master/vision/classification/alexnet)                                | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [CaffeNet](https://github.com/onnx/models/tree/master/vision/classification/caffenet)                                  | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [DenseNet](https://github.com/onnx/models/tree/master/vision/classification/densenet-121)                              | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [EfficientNet](https://github.com/onnx/models/tree/master/vision/classification/efficientnet-lite4)             | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [GoogleNet](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/googlenet)        | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [InceptionV1](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/inception_v1)      | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [InceptionV2](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/inception_v2)      | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [MNIST](https://github.com/onnx/models/tree/master/vision/classification/mnist)      | [✔️C++/CX](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/MNIST/UWP)<br/>[✔️C#](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/MNIST/Tutorial/cs)<br/>    |                                                 |\n| [MobileNetV2](https://github.com/onnx/models/tree/master/vision/classification/mobilenet)                              | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [RCNN](https://github.com/onnx/models/tree/master/vision/classification/rcnn_ilsvrc13)                        | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [ResNet50](https://github.com/onnx/models/tree/master/vision/classification/resnet)                          | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [ShuffleNetV1](https://github.com/onnx/models/tree/master/vision/classification/shufflenet)                              | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [ShuffleNetV2](https://github.com/onnx/models/tree/master/vision/classification/shufflenet)                          | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [SqueezeNet](https://github.com/onnx/models/tree/master/vision/classification/squeezenet) | [✔️C#](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/UWP/cs)<br/>[✔️JavaScript](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/UWP/cs)<br/>        |                     |[✔️C++/WinRT](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/Desktop/cpp)<br/> [✔️C# .NET5](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/NET5)<br/>[✔️C# .NET Core 2](https://github.com/microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/NETCore/cs)<br/>|[✔️C++/WinRT](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/SqueezeNetObjectDetection/Desktop/cpp)<br/>[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>[✔️Rust](https://github.com/microsoft/Windows-Machine-Learning/tree/master/Samples/RustSqueezenet)<br/>|\n| [VGG19](https://github.com/onnx/models/tree/master/vision/classification/vgg)                                          | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [VGG19bn](https://github.com/onnx/models/tree/master/vision/classification/vgg)                                       | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n| [ZFNet512](https://github.com/onnx/models/tree/master/vision/classification/zfnet-512)                                 | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n\n**Style Transfer**\n\nA computer vision technique that allows us to recompose the content of an image in the style of another.\n\n| Windows App Type <br/>Distribution | UWP<br/>In-Box |  UWP<br/>NuGet | Desktop<br/>In-Box | Desktop<br/>NuGet |\n|------------|------------------------------------|--------------------------------------|------------------------------------|--------------------------------------|\n| FNSCandy   | [✔️C# - FNS Style Transfer](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/FNSCandyStyleTransfer)<br/>[✔️C# - Real-Time Style Transfer](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/StyleTransfer)<br/>           |                                                 |\n\n<!--\n**Object Detection**\n\n\n|            | Store App<br/>Inbox API |  Store App<br/>NuGet API | Desktop App<br/>Inbox API |  Desktop App<br/>NuGet API |\n|------------|------------------------------------|--------------------------------------|------------------------------------|--------------------------------------|\n| [YoloV4](https://github.com/onnx/models/raw/master/vision/object_detection_segmentation/yolov4/model/yolov4.onnx)                         | | ||[✔️C# .NET5 - Samples Gallery](Samples/WinMLSamplesGallery)<br/>|\n\n-->\n\n## Advanced Scenario Samples\n\nThese advanced samples show how to use various binding and evaluation features in Windows ML:\n\n- **[Custom Tensorization](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/CustomTensorization)**: A Windows Console Application (C++/WinRT) that shows how to do custom tensorization.\n\n- **[Custom Operator (CPU)](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/CustomOperator)**: A desktop app that defines multiple custom cpu operators. One of these is a debug operator which we invite you to integrate into your own workflow.\n\n- **[Adapter Selection](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Samples/AdapterSelection)**: A desktop app that demonstrates how to choose a specific device adapter for running your model.\n\n- **[Plane Identifier](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: a UWP app and a WPF app packaged with the Desktop Bridge, sharing the same model trained using [Azure Custom Vision service](https://customvision.ai/). For step-by-step instructions for this sample, please see the blog post [Upgrade your WinML application to the latest bits](https://blogs.msdn.microsoft.com/appconsult/2018/11/06/upgrade-your-winml-application-to-the-latest-bits/).\n\n- **[Custom Vision and Windows ML](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: The tutorial shows how to train a neural network model to classify images of food using Azure Custom Vision service, export the model to ONNX format, and deploy the model in a Windows Machine Learning application running locally on Windows device. \n\n- **[ML.NET and Windows ML](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: This tutorial shows you how to train a neural network model to classify images of food using ML.NET Model Builder, export the model to ONNX format, and deploy the model in a Windows Machine Learning application running locally on a Windows device. \n\n- **[PyTorch Data Analysis](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: The tutorial shows how to solve a classification task with a neural network using the PyTorch library, export the model to ONNX format and deploy the model with the Windows Machine Learning application that can run on any Windows device.\n\n- **[PyTorch Image Classification](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: The tutorial shows how to train an image classification neural network model using PyTorch, export the model to the ONNX format, and deploy it in a Windows Machine Learning application running locally on your Windows device.\n\n- **[YoloV4 Object Detection](https://github.com/Microsoft/Windows-AppConsult-Samples-UWP/tree/master/PlaneIdentifier)**: This tutorial shows how to build a UWP C# app that uses the YOLOv4 model to detect objects in video streams.\n\n## Developer Tools\n\n- **Model Conversion**\n\n  Windows ML provides inferencing capabilities powered by the ONNX Runtime engine. As such, all models run in Windows ML must be converted to the [ONNX Model format](https://github.com/onnx/onnx). Models built and trained in source frameworks like TensorFlow or PyTorch must be converted to ONNX. Check out the documentation for how to convert to an ONNX model:\n    - https://onnxruntime.ai/docs/tutorials/mobile/model-conversion.html\n    - https://docs.microsoft.com/en-us/windows/ai/windows-ml/tutorials/pytorch-convert-model\n    - [WinMLTools](https://pypi.org/project/winmltools/): a Python tool for converting models from different machine learning toolkits into ONNX for use with Windows ML.\n\n- **Model Optimization**\n\n  Models may need further optimizations applied post conversion to support advanced features like batching and quantization. Check out the following tools for optimizing your model:\n\n  - **[WinML Dashboard (Preview)](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Tools/WinMLDashboard)**: a GUI-based tool for viewing, editing, converting, and validating machine learning models for Windows ML inference engine. This tool can be used to enable free dimensions on models that were built with fixed dimensions. [Download Preview Version](https://github.com/microsoft/Windows-Machine-Learning/releases)\n\n\n  - **[Graph Optimizations](https://onnxruntime.ai/docs/performance/graph-optimizations.html#:~:text=ONNX%20Runtime%20provides%20various%20graph%20optimizations%20to%20improve,to%20more%20complex%20node%20fusions%20and%20layout%20optimizations):** Graph optimizations are essentially graph-level transformations, ranging from small graph simplifications and node eliminations to more complex node fusions and layout optimizations.\n\n  - **[Graph Quantization](https://onnxruntime.ai/docs/performance/quantization.html#:~:text=Quantization%20in%20ONNX%20Runtime%20refers%20to%208%20bit,the%20floating%20point%20numbers%20to%20a%20quantization%20space.)**: Quantization in ONNX Runtime refers to 8 bit linear quantization of an ONNX model.\n\n- **Model Validation**\n  - **[WinMLRunner](https://github.com/Microsoft/Windows-Machine-Learning/tree/master/Tools/WinMLRunner)**: a command-line tool that can run .onnx or .pb models where the input and output variables are tensors or images. It is a very handy tool to quickly validate an ONNX model. It will attempt to load, bind, and evaluate a model and print out helpful messages. It also captures performance measurements.\n\n    [Download x64 Exe](https://github.com/microsoft/Windows-Machine-Learning/releases)\n\n- **Model Integration**\n  - **[WinML Code Generator (mlgen)](https://marketplace.visualstudio.com/items?itemName=WinML.mlgen)**: a Visual Studio extension to help you get started using WinML APIs on UWP apps by generating a template code when you add a trained ONNX file into the UWP project. From the template code you can load a model, create a session, bind inputs, and evaluate with wrapper codes. See [docs](https://docs.microsoft.com/en-us/windows/ai/mlgen) for more info.\n\n    Download for [VS 2017](https://marketplace.visualstudio.com/items?itemName=WinML.mlgen), [VS 2019](https://marketplace.visualstudio.com/items?itemName=WinML.MLGenV2)\n\n  - **[WinML Samples Gallery](Samples/WinMLSamplesGallery):** explore a variety of ML integration scenarios and models.\n\n  - Check out the [Model Samples](#model-samples) and [Advanced Scenario Samples](#advanced-scenarios) to learn how to use Windows ML in your application.\n  \n\n\n\n## Feedback\n- For issues, file a bug on [GitHub Issues](https://github.com/Microsoft/Windows-Machine-Learning/issues).\n- Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/windows-machine-learning).\n- Vote for popular feature requests on [Windows Developer Feedback](https://wpdev.uservoice.com/forums/110705-universal-windows-platform?category_id=341035) or include your own request.\n\n## External Links\n - [ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator](https://github.com/microsoft/onnxruntime/).\n - [ONNX: Open Neural Network Exchange Project](https://onnx.ai/).\n\n## Contributing\n\nWe're always looking for your help to fix bugs and improve the samples. Create a pull request, and we'll be happy to take a look.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:18443B:5E656A:6AB929EF"},"text_sha256":"57d48f2eeeed87f774d689fb243fa65fa2f2dc79a1ef2eaa1b2eea38536b0aff"},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98C:1A3D83:1856B2:5E7867:6AB929EF"},"text_sha256":"89c4e4b9ba7ec705482e2de05135d0626d33bf8c2c66119c65d7a306dd83459c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"deepmedic/deepmedic","input_row":{"repository":"deepmedic/deepmedic","url":"https://github.com/deepmedic/deepmedic","name":"deepmedic","owner":"deepmedic","description":"Efficient Multi-Scale 3D Convolutional Neural Network for Segmentation of 3D Medical Scans","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1064,"issues":202,"created_at":"2016-04-26T18:23:31Z","updated_at":"2026-09-16T12:13:56Z","first_commit_at":"2016-04-26T18:23:31Z","last_commit_at":"2024-08-04T12:14:08Z","activity_months":99.269999999999996,"ai_ml_match_topics":"deep-learning; machine-learning; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:32.492Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deepmedic/deepmedic","visibility":"public","created_at":"2016-04-26T18:23:31Z","updated_at":"2026-09-16T12:13:56Z","private":false,"fork":false,"archived":false,"stargazers_count":1064,"open_issues_count":23,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2793","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:1805072:1C26782:6AB929F0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2792","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17D733B:1BF8C6B:6AB929F0"},"commit":{"sha":"5388edabab40e2e1d4d3ae439545482765f4afde","url":"https://github.com/deepmedic/deepmedic/commit/5388edabab40e2e1d4d3ae439545482765f4afde","date":"2018-05-08T20:38:19Z","author_date":"2018-05-08T20:38:19Z","committer_date":"2018-05-08T20:38:19Z","tree_sha":"ade9fdde4b1088a8ca9671f35657f77c4b21880d","message_first_line":"fix source activate to conda activate in README."},"tree_request_status":200,"tree_rate":{"github_remaining":"2791","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0852:0BA1:D7B33F:FD7A1E:6AB929F1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23,"blob_sha":"c95b8a6a1539a8526f89ecc2313cef025e7eda35","priority":0}],"documents":[{"path":"README.md","size":23,"blob_sha":"c95b8a6a1539a8526f89ecc2313cef025e7eda35","priority":0,"status":200,"text":"documentation/README.md","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:177349:5D90C5:6AB929F1"},"text_sha256":"ca8679f97c209358baaa7800674b0009d01a8ffe5eed884fc1db0cc7aff8d0c8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2790","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088F:7580A:17F3233:1C14E09:6AB929F1"},"commit":{"sha":"e10ba7c3570d06194f5dadca91d99d5e7bba7de5","url":"https://github.com/deepmedic/deepmedic/commit/e10ba7c3570d06194f5dadca91d99d5e7bba7de5","date":"2024-08-04T12:14:08Z","author_date":"2024-08-04T12:14:08Z","committer_date":"2024-08-04T12:14:08Z","tree_sha":"8faca9be632b541150fbeb7d77f0557777e1e176","message_first_line":"minor mistake at readme."},"tree_request_status":200,"tree_rate":{"github_remaining":"2789","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:179FC9D:1BC1661:6AB929F2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23,"blob_sha":"c95b8a6a1539a8526f89ecc2313cef025e7eda35","priority":0}],"documents":[{"path":"README.md","size":23,"blob_sha":"c95b8a6a1539a8526f89ecc2313cef025e7eda35","priority":0,"status":200,"text":"documentation/README.md","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:177349:5D90C5:6AB929F1"},"text_sha256":"ca8679f97c209358baaa7800674b0009d01a8ffe5eed884fc1db0cc7aff8d0c8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"havakv/pycox","input_row":{"repository":"havakv/pycox","url":"https://github.com/havakv/pycox","name":"pycox","owner":"havakv","description":"Survival analysis with PyTorch","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":995,"issues":144,"created_at":"2018-02-12T03:54:15Z","updated_at":"2026-09-15T18:21:24Z","first_commit_at":"2018-02-12T03:51:58Z","last_commit_at":"2024-09-04T14:49:03Z","activity_months":78.730000000000004,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:34.669Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"havakv/pycox","visibility":"public","created_at":"2018-02-12T03:54:15Z","updated_at":"2026-09-15T18:21:24Z","private":false,"fork":false,"archived":false,"stargazers_count":995,"open_issues_count":96,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2788","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17C7487:1BE8C34:6AB929F2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2787","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:17ABBD0:1BCD952:6AB929F3"},"commit":{"sha":"e1c44e57291e5aa34f5efaaa171a842721e9bbd0","url":"https://github.com/havakv/pycox/commit/e1c44e57291e5aa34f5efaaa171a842721e9bbd0","date":"2018-05-18T22:27:04Z","author_date":"2018-05-18T22:27:04Z","committer_date":"2018-05-18T22:27:04Z","tree_sha":"6fc1f965984fe3b4eeb4616556f8d615acd5426e","message_first_line":"Some renaming"},"tree_request_status":200,"tree_rate":{"github_remaining":"2786","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:17DE705:1C001BF:6AB929F3"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":819,"blob_sha":"3419f1c11a5240156806ba8e97ea297ea5a1f39b","priority":0}],"documents":[{"path":"README.rst","size":819,"blob_sha":"3419f1c11a5240156806ba8e97ea297ea5a1f39b","priority":0,"status":200,"text":"=====\npycox\n=====\n\n\n.. image:: https://img.shields.io/pypi/v/pycox.svg\n        :target: https://pypi.python.org/pypi/pycox\n\n.. image:: https://img.shields.io/travis/havakv/pycox.svg\n        :target: https://travis-ci.org/havakv/pycox\n\n.. image:: https://readthedocs.org/projects/pycox/badge/?version=latest\n        :target: https://pycox.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n\n\n\nCox regression with pytorch\n\n\n* Free software: BSD license\n* Documentation: https://pycox.readthedocs.io.\n\n\nFeatures\n--------\n\n* TODO\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62F2:375F4:17B9F1:5DDC8F:6AB929F3"},"text_sha256":"afa241a3a77f3b95c5cc286114e634016ed201cd88a3e34c69b9ed757607ec19"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2785","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F0:280FBC:17B1DD0:1BD265E:6AB929F4"},"commit":{"sha":"3eccdd7fd9844a060f50fdcc315659f33a2d2dc1","url":"https://github.com/havakv/pycox/commit/3eccdd7fd9844a060f50fdcc315659f33a2d2dc1","date":"2024-09-04T14:49:03Z","author_date":"2024-09-04T14:49:03Z","committer_date":"2024-09-04T14:49:03Z","tree_sha":"5f8b964d9d6ff50b7783a4493b235343a84e9b52","message_first_line":"Merge pull request #181 from havakv/update-package-publishing"},"tree_request_status":200,"tree_rate":{"github_remaining":"2784","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:17F1147:1C12577:6AB929F4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20341,"blob_sha":"ec4e5f7e94fe716a94cc8f426ab2704e835a35c7","priority":0}],"documents":[{"path":"README.md","size":20341,"blob_sha":"ec4e5f7e94fe716a94cc8f426ab2704e835a35c7","priority":0,"status":200,"text":"\n<h1 align=\"center\">\n    <img src=\"https://github.com/havakv/pycox/blob/master/figures/logo.svg\" alt=\"pycox\" width=\"200\">\n<\/h1>\n\n<p align=\"center\">\n    <strong>Time-to-event prediction with PyTorch<\/strong>\n<\/p>\n\n<p align=\"center\">\n     <a href=\"https://github.com/havakv/pycox/actions\"><img alt=\"GitHub Actions status\" src=\"https://github.com/havakv/pycox/workflows/Python%20package/badge.svg\"><\/a>\n     <a href=\"https://pypi.org/project/pycox/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/pycox.svg\"><\/a>\n     <a href=\"https://anaconda.org/conda-forge/pycox\"><img alt=\"PyPI\" src=\"https://img.shields.io/conda/vn/conda-forge/pycox\"><\/a>\n     <a href=\"https://pypi.org/project/pycox/\"><img alt=\"Hei\" src=\"https://img.shields.io/pypi/pyversions/pycox.svg\"><\/a>\n    <a href=\"https://github.com/havakv/pycox/blob/master/LICENSE\" title=\"License\"><img src=\"https://img.shields.io/badge/License-BSD%202--Clause-orange.svg\"><\/a>\n<\/p>\n\n\n<p align=\"center\">\n    <a href=\"#get-started\">Get Started<\/a> •\n    <a href=\"#methods\">Methods<\/a> •\n    <a href=\"#evaluation-criteria\">Evaluation Criteria<\/a> •\n    <a href=\"#datasets\">Datasets<\/a> •\n    <a href=\"#installation\">Installation<\/a> •\n    <a href=\"#references\">References<\/a>\n<\/p>\n\n\n**pycox** is a python package for survival analysis and time-to-event prediction with [PyTorch](https://pytorch.org), built on the [torchtuples](https://github.com/havakv/torchtuples) package for training PyTorch models. An R version of this package is available at [survivalmodels](https://github.com/RaphaelS1/survivalmodels).\n\nThe package contains implementations of various [survival models](#methods), some useful [evaluation metrics](#evaluation-criteria), and a collection of [event-time datasets](#datasets).\nIn addition, some useful preprocessing tools are available in the `pycox.preprocessing` module.\n\n# Get Started\n\nTo get started you first need to install [PyTorch](https://pytorch.org/get-started/locally/).\nYou can then install **pycox** via pip: \n```sh\npip install pycox\n```\nOR, via conda:\n```sh\nconda install -c conda-forge pycox\n```\n\nWe recommend to start with [01_introduction.ipynb](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/01_introduction.ipynb), which explains the general usage of the package in terms of preprocessing, creation of neural networks, model training, and evaluation procedure.\nThe notebook use the `LogisticHazard` method for illustration, but most of the principles generalize to the other methods.\n\nAlternatively, there are many examples listed in the [examples folder](https://nbviewer.jupyter.org/github/havakv/pycox/tree/master/examples), or you can follow the tutorial based on the `LogisticHazard`:\n\n- [01_introduction.ipynb](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/01_introduction.ipynb): General usage of the package in terms of preprocessing, creation of neural networks, model training, and evaluation procedure.\n\n- [02_introduction.ipynb](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/02_introduction.ipynb): Quantile based discretization scheme, nested tuples with `tt.tuplefy`, entity embedding of categorical variables, and cyclical learning rates.\n\n- [03_network_architectures.ipynb](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/03_network_architectures.ipynb):\n  Extending the framework with custom networks and custom loss functions. The example combines an autoencoder with a survival network, and considers a loss that combines the autoencoder loss with the loss of the `LogisticHazard`.\n\n- [04_mnist_dataloaders_cnn.ipynb](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/04_mnist_dataloaders_cnn.ipynb):\n  Using dataloaders and convolutional networks for the MNIST data set. We repeat the [simulations](https://peerj.com/articles/6257/#p-41) of [\\[8\\]](#references) where each digit defines the scale parameter of an exponential distribution.\n\n\n# Methods\n\nThe following methods are available in the `pycox.methods` module.\n\n## Continuous-Time Models:\n<table>\n    <tr>\n        <th>Method<\/th>\n        <th>Description<\/th>\n        <th>Example<\/th>\n    <\/tr>\n    <tr>\n        <td>CoxTime<\/td>\n        <td>\n        Cox-Time is a relative risk model that extends Cox regression beyond the proportional hazards <a href=\"#references\">[1]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/cox-time.ipynb\">notebook<\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>CoxCC<\/td>\n        <td>\n        Cox-CC is a proportional version of the Cox-Time model <a href=\"#references\">[1]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/cox-cc.ipynb\">notebook<\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>CoxPH (DeepSurv)<\/td>\n        <td>\n        CoxPH is a Cox proportional hazards model also referred to as DeepSurv <a href=\"#references\">[2]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/cox-ph.ipynb\">notebook<\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>PCHazard<\/td>\n        <td>\n        The Piecewise Constant Hazard (PC-Hazard) model <a href=\"#references\">[12]<\/a> assumes that the continuous-time hazard function is constant in predefined intervals.\n        It is similar to the Piecewise Exponential Models <a href=\"#references\">[11]<\/a> and PEANN <a href=\"#references\">[14]<\/a>, but with a softplus activation instead of the exponential function.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/pc-hazard.ipynb\">notebook<\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n## Discrete-Time Models:\n<table>\n    <tr>\n        <th>Method<\/th>\n        <th>Description<\/th>\n        <th>Example<\/th>\n    <\/tr>\n    <tr>\n        <td>LogisticHazard (Nnet-survival)<\/td>\n        <td>\n        The Logistic-Hazard method parametrize the discrete hazards and optimize the survival likelihood <a href=\"#references\">[12]<\/a> <a href=\"#references\">[7]<\/a>.\n        It is also called Partial Logistic Regression <a href=\"#references\">[13]<\/a> and Nnet-survival <a href=\"#references\">[8]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/01_introduction.ipynb\">notebook<\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>PMF<\/td>\n        <td>\n        The PMF method parametrize the probability mass function (PMF) and optimize the survival likelihood <a href=\"#references\">[12]<\/a>. It is the foundation of methods such as DeepHit and MTLR.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/pmf.ipynb\">notebook<\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>DeepHit, DeepHitSingle<\/td>\n        <td>\n        DeepHit is a PMF method with a loss for improved ranking that \n        can handle competing risks <a href=\"#references\">[3]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/deephit.ipynb\">single<\/a>\n        <a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/deephit_competing_risks.ipynb\">competing<\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>MTLR (N-MTLR)<\/td>\n        <td>\n        The (Neural) Multi-Task Logistic Regression is a PMF methods proposed by \n        <a href=\"#references\">[9]<\/a> and <a href=\"#references\">[10]<\/a>.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/mtlr.ipynb\">notebook<\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>BCESurv<\/td>\n        <td>\n        A method representing a set of binary classifiers that remove individuals as they are censored <a href=\"#references\">[15]<\/a>. The loss is the binary cross entropy of the survival estimates at a set of discrete times, with targets that are indicators of surviving each time.\n        <\/td>\n        <td><a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/administrative_brier_score.ipynb\">bs_example<\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n# Evaluation Criteria\n\nThe following evaluation metrics are available with `pycox.evalutation.EvalSurv`.\n\n<table>\n    <tr>\n        <th>Metric<\/th>\n        <th>Description<\/th>\n    <\/tr>\n    <tr>\n        <td>concordance_td<\/td>\n        <td>\n        The time-dependent concordance index evaluated at the event times <a href=\"#references\">[4]<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>brier_score<\/td>\n        <td>\n        The IPCW Brier score (inverse probability of censoring weighted Brier score) <a href=\"#references\">[5]<\/a><a href=\"#references\">[6]<\/a><a href=\"#references\">[15]<\/a>.\n        See Section 3.1.2 of <a href=\"#references\">[15]<\/a> for details.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>nbll<\/td>\n        <td>\n        The IPCW (negative) binomial log-likelihood <a href=\"#references\">[5]<\/a><a href=\"#references\">[1]<\/a>. I.e., this is minus the binomial log-likelihood and should not be confused with the negative binomial distribution.\n        The weighting is performed as in Section 3.1.2 of <a href=\"#references\">[15]<\/a> for details.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>integrated_brier_score<\/td>\n        <td>\n        The integrated IPCW Brier score. Numerical integration of the `brier_score` <a href=\"#references\">[5]<\/a><a href=\"#references\">[6]<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>integrated_nbll<\/td>\n        <td>\n        The integrated IPCW (negative) binomial log-likelihood. Numerical integration of the `nbll` <a href=\"#references\">[5]<\/a><a href=\"#references\">[1]<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>brier_score_admin integrated_brier_score_admin<\/td>\n        <td>\n        The administrative Brier score <a href=\"#references\">[15]<\/a>. Works well for data with administrative censoring, meaning all censoring times are observed.\n        See this <a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/administrative_brier_score.ipynb\">example notebook<\/a>.\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>nbll_admin integrated_nbll_admin<\/td>\n        <td>\n        The administrative (negative) binomial log-likelihood <a href=\"#references\">[15]<\/a>. Works well for data with administrative censoring, meaning all censoring times are observed.\n        See this <a href=\"https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/administrative_brier_score.ipynb\">example notebook<\/a>.\n        <\/td>\n        <\/td>\n    <\/tr>\n<\/table>\n\n# Datasets\n\nA collection of datasets are available through the `pycox.datasets` module.\nFor example, the following code will download the `metabric` dataset and load it in the form of a pandas dataframe\n```python\nfrom pycox import datasets\ndf = datasets.metabric.read_df()\n```\n\nThe `datasets` module will store datasets under the installation directory by default. You can specify a different directory by setting the `PYCOX_DATA_DIR` environment variable.\n\n## Real Datasets:\n<table>\n    <tr>\n        <th>Dataset<\/th>\n        <th>Size<\/th>\n        <th>Dataset<\/th>\n        <th>Data source<\/th>\n    <\/tr>\n    <tr>\n        <td>flchain<\/td>\n        <td>6,524<\/td>\n        <td>\n        The Assay of Serum Free Light Chain (FLCHAIN) dataset. See \n        <a href=\"#references\">[1]<\/a> for preprocessing.\n        <\/td>\n        <td><a href=\"https://github.com/vincentarelbundock/Rdatasets\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>gbsg<\/td>\n        <td>2,232<\/td>\n        <td>\n        The Rotterdam & German Breast Cancer Study Group.\n        See <a href=\"#references\">[2]<\/a> for details.\n        <\/td>\n        <td><a href=\"https://github.com/jaredleekatzman/DeepSurv/tree/master/experiments/data\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>kkbox<\/td>\n        <td>2,814,735<\/td>\n        <td>\n        A survival dataset created from the WSDM - KKBox's Churn Prediction Challenge 2017 with administrative censoring.\n        See <a href=\"#references\">[1]<\/a> and <a href=\"#references\">[15]<\/a> for details.\n        Compared to kkbox_v1, this data set has more covariates and censoring times.\n        Note: You need \n        <a href=\"https://github.com/Kaggle/kaggle-api#api-credentials\">Kaggle credentials<\/a> to access the dataset.\n        <\/td>\n        <td><a href=\"https://www.kaggle.com/c/kkbox-churn-prediction-challenge/data\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>kkbox_v1<\/td>\n        <td>2,646,746<\/td>\n        <td>\n        A survival dataset created from the WSDM - KKBox's Churn Prediction Challenge 2017. \n        See <a href=\"#references\">[1]<\/a> for details.\n        This is not the preferred version of this data set. Use kkbox instead.\n        Note: You need \n        <a href=\"https://github.com/Kaggle/kaggle-api#api-credentials\">Kaggle credentials<\/a> to access the dataset.\n        <\/td>\n        <td><a href=\"https://www.kaggle.com/c/kkbox-churn-prediction-challenge/data\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>metabric<\/td>\n        <td>1,904<\/td>\n        <td>\n        The Molecular Taxonomy of Breast Cancer International Consortium (METABRIC).\n        See <a href=\"#references\">[2]<\/a> for details.\n        <\/td>\n        <td><a href=\"https://github.com/jaredleekatzman/DeepSurv/tree/master/experiments/data\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>nwtco<\/td>\n        <td>4,028<\/td>\n        <td>\n        Data from the National Wilm's Tumor (NWTCO).\n        <\/td>\n        <td><a href=\"https://github.com/vincentarelbundock/Rdatasets\">source<\/a>\n    <\/tr>\n    <tr>\n        <td>support<\/td>\n        <td>8,873<\/td>\n        <td>\n        Study to Understand Prognoses Preferences Outcomes and Risks of Treatment (SUPPORT).\n        See <a href=\"#references\">[2]<\/a> for details.\n        <\/td>\n        <td><a href=\"https://github.com/jaredleekatzman/DeepSurv/tree/master/experiments/data\">source<\/a>\n    <\/tr>\n<\/table>\n\n## Simulated Datasets:\n\n<table>\n    <tr>\n        <th>Dataset<\/th>\n        <th>Size<\/th>\n        <th>Dataset<\/th>\n        <th>Data source<\/th>\n    <\/tr>\n    <tr>\n        <td>rr_nl_nph<\/td>\n        <td>25,000<\/td>\n        <td>\n        Dataset from simulation study in <a href=\"#references\">[1]<\/a>.\n        This is a continuous-time simulation study with event times drawn from a\n        relative risk non-linear non-proportional hazards model (RRNLNPH).\n        <\/td>\n        <td><a href=\"https://github.com/havakv/pycox/blob/master/pycox/simulations/relative_risk.py\">SimStudyNonLinearNonPH<\/a>\n    <\/tr>\n    <tr>\n        <td>sac3<\/td>\n        <td>100,000<\/td>\n        <td>\n        Dataset from simulation study in <a href=\"#references\">[12]<\/a>.\n        This is a discrete time dataset with 1000 possible event-times.\n        <\/td>\n        <td><a href=\"https://github.com/havakv/pycox/tree/master/pycox/simulations/discrete_logit_hazard.py\">SimStudySACCensorConst<\/a>\n    <\/tr>\n    <tr>\n        <td>sac_admin5<\/td>\n        <td>50,000<\/td>\n        <td>\n        Dataset from simulation study in <a href=\"#references\">[15]<\/a>.\n        This is a discrete time dataset with 1000 possible event-times.\n        Very similar to `sac3`, but with fewer survival covariates and administrative censoring determined by 5 covariates.\n        <\/td>\n        <td><a href=\"https://github.com/havakv/pycox/tree/master/pycox/simulations/discrete_logit_hazard.py\">SimStudySACAdmin<\/a>\n    <\/tr>\n<\/table>\n\n\n# Installation\n\n**Note:** *This package is still in its early stages of development, so please don't hesitate to report any problems you may experience.* \n\nThe package only works for python 3.6+.\n\nBefore installing **pycox**, please install [PyTorch](https://pytorch.org/get-started/locally/) (version >= 1.1).\nYou can then install the package with\n```sh\npip install pycox\n```\nFor the bleeding edge version, you can instead install directly from github (consider adding `--force-reinstall`):\n```sh\npip install git+git://github.com/havakv/pycox.git\n```\n\n## Install from Source\n\nInstallation from source depends on [PyTorch](https://pytorch.org/get-started/locally/), so make sure a it is installed.\nNext, clone and install with\n```sh\ngit clone https://github.com/havakv/pycox.git\ncd pycox\npip install .\n```\n\n# References\n\n  \\[1\\] Håvard Kvamme, Ørnulf Borgan, and Ida Scheel. Time-to-event prediction with neural networks and Cox regression. *Journal of Machine Learning Research*, 20(129):1–30, 2019. \\[[paper](http://jmlr.org/papers/v20/18-424.html)\\]\n\n  \\[2\\] Jared L. Katzman, Uri Shaham, Alexander Cloninger, Jonathan Bates, Tingting Jiang, and Yuval Kluger. Deepsurv: personalized treatment recommender system using a Cox proportional hazards deep neural network. *BMC Medical Research Methodology*, 18(1), 2018. \\[[paper](https://doi.org/10.1186/s12874-018-0482-1)\\]\n\n  \\[3\\] Changhee Lee, William R Zame, Jinsung Yoon, and Mihaela van der Schaar. Deephit: A deep learning approach to survival analysis with competing risks. *In Thirty-Second AAAI Conference on Artificial Intelligence*, 2018. \\[[paper](http://medianetlab.ee.ucla.edu/papers/AAAI_2018_DeepHit)\\]\n  \n  \\[4\\] Laura Antolini, Patrizia Boracchi, and Elia Biganzoli. A time-dependent discrimination index for survival data. *Statistics in Medicine*, 24(24):3927–3944, 2005. \\[[paper](https://doi.org/10.1002/sim.2427)\\]\n\n  \\[5\\] Erika Graf, Claudia Schmoor, Willi Sauerbrei, and Martin Schumacher. Assessment and comparison of prognostic classification schemes for survival data. *Statistics in Medicine*, 18(17-18):2529–2545, 1999. \\[[paper](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819990915/30%2918%3A17/18%3C2529%3A%3AAID-SIM274%3E3.0.CO%3B2-5)\\]\n\n  \\[6\\] Thomas A. Gerds and Martin Schumacher. Consistent estimation of the expected brier score in general survival models with right-censored event times. *Biometrical Journal*, 48 (6):1029–1040, 2006. \\[[paper](https://onlinelibrary.wiley.com/doi/abs/10.1002/bimj.200610301?sid=nlm%3Apubmed)\\]\n\n\\[7\\] Charles C. Brown. On the use of indicator variables for studying the time-dependence of parameters in a response-time model. *Biometrics*, 31(4):863–872, 1975.\n\\[[paper](https://www.jstor.org/stable/2529811?seq=1#metadata_info_tab_contents)\\]\n\n\\[8\\] Michael F. Gensheimer and Balasubramanian Narasimhan. A scalable discrete-time survival model for neural networks. *PeerJ*, 7:e6257, 2019.\n\\[[paper](https://peerj.com/articles/6257/)\\]\n\n\\[9\\] Chun-Nam Yu, Russell Greiner, Hsiu-Chin Lin, and Vickie Baracos. Learning patient- specific cancer survival distributions as a sequence of dependent regressors. *In Advances in Neural Information Processing Systems 24*, pages 1845–1853. Curran Associates, Inc., 2011.\n\\[[paper](https://papers.nips.cc/paper/4210-learning-patient-specific-cancer-survival-distributions-as-a-sequence-of-dependent-regressors)\\]\n\n\\[10\\] Stephane Fotso. Deep neural networks for survival analysis based on a multi-task framework. *arXiv preprint arXiv:1801.05512*, 2018.\n\\[[paper](https://arxiv.org/pdf/1801.05512.pdf)\\]\n\n\\[11\\] Michael Friedman. Piecewise exponential models for survival data with covariates. *The Annals of Statistics*, 10(1):101–113, 1982.\n\\[[paper](https://projecteuclid.org/euclid.aos/1176345693)\\]\n\n\\[12\\] Håvard Kvamme and Ørnulf Borgan. Continuous and discrete-time survival prediction with neural networks. *arXiv preprint arXiv:1910.06724*, 2019.\n\\[[paper](https://arxiv.org/pdf/1910.06724.pdf)\\]\n\n\\[13\\] Elia Biganzoli, Patrizia Boracchi, Luigi Mariani, and Ettore Marubini. Feed forward neural networks for the analysis of censored survival data: a partial logistic regression approach. *Statistics in Medicine*, 17(10):1169–1186, 1998.\n\\[[paper](https://onlinelibrary.wiley.com/doi/abs/10.1002/(SICI)1097-0258(19980530)17:10%3C1169::AID-SIM796%3E3.0.CO;2-D)\\]\n\n\\[14\\] Marco Fornili, Federico Ambrogi, Patrizia Boracchi, and Elia Biganzoli. Piecewise exponential artificial neural networks (PEANN) for modeling hazard function with right censored data. *Computational Intelligence Methods for Bioinformatics and Biostatistics*, pages 125–136, 2014.\n\\[[paper](https://link.springer.com/chapter/10.1007%2F978-3-319-09042-9_9)\\]\n\n\\[15\\] Håvard Kvamme and Ørnulf Borgan. The Brier Score under Administrative Censoring: Problems and Solutions. *arXiv preprint arXiv:1912.08581*, 2019.\n\\[[paper](https://arxiv.org/pdf/1912.08581.pdf)\\]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B320:4F9CC:16FF28:5D1E26:6AB929F3"},"text_sha256":"040cffdca71c1fd2215daa6f216241d1c992598e195e29e67f5258d3d78cf8f9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dnouri/nolearn","input_row":{"repository":"dnouri/nolearn","url":"https://github.com/dnouri/nolearn","name":"nolearn","owner":"dnouri","description":"Combines the ease of use of scikit-learn with the power of Theano/Lasagne","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":951,"issues":206,"created_at":"2012-11-22T21:41:47Z","updated_at":"2026-09-21T04:01:56Z","first_commit_at":"2012-11-22T21:41:07Z","last_commit_at":"2019-11-05T08:36:00Z","activity_months":83.390000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:37.244Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dnouri/nolearn","visibility":"public","created_at":"2012-11-22T21:41:47Z","updated_at":"2026-09-21T04:01:56Z","private":false,"fork":false,"archived":false,"stargazers_count":951,"open_issues_count":43,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2783","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:17E75E4:1C08F5C:6AB929F5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2782","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DC:71E0C:17E45D8:1C04E46:6AB929F5"},"commit":{"sha":"2ef346c869e80fc90247916e4aea5cfa7cf2edda","url":"https://github.com/dnouri/nolearn/commit/2ef346c869e80fc90247916e4aea5cfa7cf2edda","date":"2017-11-08T15:58:42Z","author_date":"2017-11-08T15:58:42Z","committer_date":"2017-11-08T15:58:42Z","tree_sha":"1fb30bdf703ca22439e8e5fbfcec9e0526ba0d9d","message_first_line":"Merge pull request #330 from SayreBlades/bugfix/more-ignore-unused-inputs"},"tree_request_status":200,"tree_rate":{"github_remaining":"2781","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:17E6EFC:1C08C65:6AB929F5"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5960,"blob_sha":"1dc260d731e6af3039fa4ee95bf78d49f78a3f16","priority":0}],"documents":[{"path":"README.rst","size":5960,"blob_sha":"1dc260d731e6af3039fa4ee95bf78d49f78a3f16","priority":0,"status":200,"text":"*nolearn* contains a number of wrappers and abstractions around\nexisting neural network libraries, most notably `Lasagne\n<http://lasagne.readthedocs.org/>`_, along with a few machine learning\nutility modules.  All code is written to be compatible with\n`scikit-learn <http://scikit-learn.org/>`_.\n\n.. image:: https://travis-ci.org/dnouri/nolearn.svg?branch=master\n    :target: https://travis-ci.org/dnouri/nolearn\n\nInstallation\n============\n\nWe recommend using `venv\n<https://docs.python.org/3/library/venv.html>`_ (when using Python 3)\nor `virtualenv\n<http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/>`_\n(Python 2) to install nolearn.\n\nTo install the latest release of nolearn from the Python Package\nIndex, do::\n\n  pip install nolearn\n\nAt the time of this writing, nolearn works with the latest versions of\nits dependencies, such as numpy, scipy, Theano, and Lasagne (the\nlatter `from Git <https://github.com/Lasagne/Lasagne>`__).  But we also\nmaintain a list of known good versions of dependencies that we support\nand test.  Should you run into hairy depdendency issues during\ninstallation or runtime, we recommend you try this same set of tested\ndepdencencies instead::\n\n  pip install -r https://raw.githubusercontent.com/dnouri/nolearn/0.6.0/requirements.txt\n  pip install nolearn\n  \nIf you want to install the latest development version of nolearn\ndirectly from Git, run::\n\n  pip install -r https://raw.githubusercontent.com/dnouri/nolearn/master/requirements.txt\n  pip install git+https://github.com/dnouri/nolearn.git@master#egg=nolearn==0.7.git\n\nDocumentation\n=============\n\nIf you're looking for how to use *nolearn.lasagne*, then there's two\nintroductory tutorials that you can choose from:\n\n- `Using convolutional neural nets to detect facial keypoints tutorial\n  <http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/>`_\n  with `code <https://github.com/dnouri/kfkd-tutorial>`__\n\n- `Training convolutional neural networks with nolearn\n  <http://nbviewer.ipython.org/github/dnouri/nolearn/blob/master/docs/notebooks/CNN_tutorial.ipynb>`_\n  \nFor specifics around classes and functions out of the *lasagne*\npackage, such as layers, updates, and nonlinearities, you'll want to\nlook at the `Lasagne project's documentation\n<http://lasagne.readthedocs.org/>`_.\n\n*nolearn.lasagne* comes with a `number of tests\n<https://github.com/dnouri/nolearn/tree/master/nolearn/lasagne/tests>`__\nthat demonstrate some of the more advanced features, such as networks\nwith merge layers, and networks with multiple inputs.\n\n`nolearn's own documentation <http://packages.python.org/nolearn/>`__\nis somewhat out of date at this point.  But there's more resources\nonline.\n\nFinally, there's a few presentations and examples from around the web.\nNote that some of these might need a specific version of nolearn and\nLasange to run:\n\n- Oliver Dürr's `Convolutional Neural Nets II Hands On\n  <https://home.zhaw.ch/~dueo/bbs/files/ConvNets_24_April.pdf>`_ with\n  `code <https://github.com/oduerr/dl_tutorial/tree/master/lasagne>`__\n\n- Roelof Pieters' presentation `Python for Image Understanding\n  <http://www.slideshare.net/roelofp/python-for-image-understanding-deep-learning-with-convolutional-neural-nets>`_\n  comes with nolearn.lasagne code examples\n\n- Benjamin Bossan's `Otto Group Product Classification Challenge\n  using nolearn/lasagne\n  <https://github.com/ottogroup/kaggle/blob/master/Otto_Group_Competition.ipynb>`_\n\n- Kaggle's `instructions on how to set up an AWS GPU instance to run\n  nolearn.lasagne\n  <https://www.kaggle.com/c/facial-keypoints-detection/details/deep-learning-tutorial>`_\n  and the facial keypoint detection tutorial\n\n- `An example convolutional autoencoder\n  <https://github.com/mikesj-public/convolutional_autoencoder/blob/master/mnist_conv_autoencode.ipynb>`_\n\n- Winners of the saliency prediction task in the 2015 `LSUN Challenge\n  <http://lsun.cs.princeton.edu/>`_ have published their\n  `lasagne/nolearn-based code\n  <https://imatge.upc.edu/web/resources/end-end-convolutional-networks-saliency-prediction-software>`__.\n\n- The winners of the 2nd place in the `Kaggle Diabetic Retinopathy Detection\n  challenge <https://www.kaggle.com/c/diabetic-retinopathy-detection>`_ have\n  published their `lasagne/nolearn-based code\n  <https://github.com/sveitser/kaggle_diabetic>`__.\n\n- The winner of the 2nd place in the `Kaggle Right Whale Recognition\n  challenge <https://www.kaggle.com/c/noaa-right-whale-recognition>`_ has\n  published his `lasagne/nolearn-based code\n  <https://github.com/felixlaumon/kaggle-right-whale>`__.\n\nSupport\n=======\n\nIf you're seeing a bug with nolearn, please submit a bug report to the\n`nolearn issue tracker <https://github.com/dnouri/nolearn/issues>`_.\nMake sure to include information such as:\n\n- how to reproduce the error: show us how to trigger the bug using a\n  minimal example\n\n- what versions you are using: include the Git revision and/or version\n  of nolearn (and possibly Lasagne) that you're using\n\nPlease also make sure to search the issue tracker to see if your issue\nhas been encountered before or fixed.\n\nIf you believe that you're seeing an issue with Lasagne, which is a\ndifferent software project, please use the `Lasagne issue tracker\n<https://github.com/Lasagne/Lasagne/issues>`_ instead.\n\nThere's currently no user mailing list for nolearn.  However, if you\nhave a question related to Lasagne, you might want to try the `Lasagne\nusers list <https://groups.google.com/d/forum/lasagne-users>`_, or use\nStack Overflow.  Please refrain from contacting the authors for\nnon-commercial support requests directly; public forums are the right\nplace for these.\n\nCitation\n========\n\nCitations are welcome:\n\n    Daniel Nouri. 2014. *nolearn: scikit-learn compatible neural\n    network library* https://github.com/dnouri/nolearn\n\nLicense\n=======\n\nSee the `LICENSE.txt <LICENSE.txt>`_ file for license rights and\nlimitations (MIT).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E432:35EBC:17771B:5D98A7:6AB929F6"},"text_sha256":"a96697ad5bb4b67d88c0179c183c09d9a419878f928794cd0d20404b02847d8c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2780","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0834:0AC4:128A946:15DC324:6AB929F6"},"commit":{"sha":"8f4473190a06caf80878821d29178b82329d8bee","url":"https://github.com/dnouri/nolearn/commit/8f4473190a06caf80878821d29178b82329d8bee","date":"2019-11-05T08:36:00Z","author_date":"2019-11-05T08:36:00Z","committer_date":"2019-11-05T08:36:00Z","tree_sha":"c25cd7bc70430f76828ddf54d14418dc0225aaf0","message_first_line":"Bump version"},"tree_request_status":200,"tree_rate":{"github_remaining":"2779","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087B:2EA1B4:17CB1F8:1BED0F0:6AB929F7"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5869,"blob_sha":"b85c239703566bdb1393955fa307947ca8a989eb","priority":0}],"documents":[{"path":"README.rst","size":5869,"blob_sha":"b85c239703566bdb1393955fa307947ca8a989eb","priority":0,"status":200,"text":"*nolearn* contains a number of wrappers and abstractions around\nexisting neural network libraries, most notably `Lasagne\n<http://lasagne.readthedocs.org/>`_, along with a few machine learning\nutility modules.  All code is written to be compatible with\n`scikit-learn <http://scikit-learn.org/>`_.\n\n.. note::\n\n  nolearn is currently unmaintained.  However, if you follow the\n  installation instructions, you should still be able to get it to\n  work (namely with library versions that are outdated at this point).\n\n  If you're looking for an alternative to *nolearn.lasagne*, a library\n  that integrates neural networks with scikit-learn, then take a look\n  at `skorch <https://github.com/skorch-dev/skorch>`_, which wraps\n  PyTorch for scikit-learn.\n\n\n.. image:: https://travis-ci.org/dnouri/nolearn.svg?branch=master\n    :target: https://travis-ci.org/dnouri/nolearn\n\nInstallation\n============\n\nWe recommend using `venv\n<https://docs.python.org/3/library/venv.html>`_ (when using Python 3)\nor `virtualenv\n<http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/>`_\n(Python 2) to install nolearn.\n\nnolearn comes with a list of known good versions of dependencies that\nwe test with in ``requirements.txt``.  To install the latest version\nof nolearn from Git along with these known good dependencies, run\nthese two commands::\n\n  pip install -r https://raw.githubusercontent.com/dnouri/nolearn/master/requirements.txt\n  pip install git+https://github.com/dnouri/nolearn.git\n\nDocumentation\n=============\n\nIf you're looking for how to use *nolearn.lasagne*, then there's two\nintroductory tutorials that you can choose from:\n\n- `Using convolutional neural nets to detect facial keypoints tutorial\n  <http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/>`_\n  with `code <https://github.com/dnouri/kfkd-tutorial>`__\n\n- `Training convolutional neural networks with nolearn\n  <http://nbviewer.ipython.org/github/dnouri/nolearn/blob/master/docs/notebooks/CNN_tutorial.ipynb>`_\n  \nFor specifics around classes and functions out of the *lasagne*\npackage, such as layers, updates, and nonlinearities, you'll want to\nlook at the `Lasagne project's documentation\n<http://lasagne.readthedocs.org/>`_.\n\n*nolearn.lasagne* comes with a `number of tests\n<https://github.com/dnouri/nolearn/tree/master/nolearn/lasagne/tests>`__\nthat demonstrate some of the more advanced features, such as networks\nwith merge layers, and networks with multiple inputs.\n\n`nolearn's own documentation <http://packages.python.org/nolearn/>`__\nis somewhat out of date at this point.  But there's more resources\nonline.\n\nFinally, there's a few presentations and examples from around the web.\nNote that some of these might need a specific version of nolearn and\nLasange to run:\n\n- Oliver Dürr's `Convolutional Neural Nets II Hands On\n  <https://home.zhaw.ch/~dueo/bbs/files/ConvNets_24_April.pdf>`_ with\n  `code <https://github.com/oduerr/dl_tutorial/tree/master/lasagne>`__\n\n- Roelof Pieters' presentation `Python for Image Understanding\n  <http://www.slideshare.net/roelofp/python-for-image-understanding-deep-learning-with-convolutional-neural-nets>`_\n  comes with nolearn.lasagne code examples\n\n- Benjamin Bossan's `Otto Group Product Classification Challenge\n  using nolearn/lasagne\n  <https://github.com/ottogroup/kaggle/blob/master/Otto_Group_Competition.ipynb>`_\n\n- Kaggle's `instructions on how to set up an AWS GPU instance to run\n  nolearn.lasagne\n  <https://www.kaggle.com/c/facial-keypoints-detection/details/deep-learning-tutorial>`_\n  and the facial keypoint detection tutorial\n\n- `An example convolutional autoencoder\n  <https://github.com/mikesj-public/convolutional_autoencoder/blob/master/mnist_conv_autoencode.ipynb>`_\n\n- Winners of the saliency prediction task in the 2015 `LSUN Challenge\n  <http://lsun.cs.princeton.edu/>`_ have published their\n  `lasagne/nolearn-based code\n  <https://imatge.upc.edu/web/resources/end-end-convolutional-networks-saliency-prediction-software>`__.\n\n- The winners of the 2nd place in the `Kaggle Diabetic Retinopathy Detection\n  challenge <https://www.kaggle.com/c/diabetic-retinopathy-detection>`_ have\n  published their `lasagne/nolearn-based code\n  <https://github.com/sveitser/kaggle_diabetic>`__.\n\n- The winner of the 2nd place in the `Kaggle Right Whale Recognition\n  challenge <https://www.kaggle.com/c/noaa-right-whale-recognition>`_ has\n  published his `lasagne/nolearn-based code\n  <https://github.com/felixlaumon/kaggle-right-whale>`__.\n\nSupport\n=======\n\nIf you're seeing a bug with nolearn, please submit a bug report to the\n`nolearn issue tracker <https://github.com/dnouri/nolearn/issues>`_.\nMake sure to include information such as:\n\n- how to reproduce the error: show us how to trigger the bug using a\n  minimal example\n\n- what versions you are using: include the Git revision and/or version\n  of nolearn (and possibly Lasagne) that you're using\n\nPlease also make sure to search the issue tracker to see if your issue\nhas been encountered before or fixed.\n\nIf you believe that you're seeing an issue with Lasagne, which is a\ndifferent software project, please use the `Lasagne issue tracker\n<https://github.com/Lasagne/Lasagne/issues>`_ instead.\n\nThere's currently no user mailing list for nolearn.  However, if you\nhave a question related to Lasagne, you might want to try the `Lasagne\nusers list <https://groups.google.com/d/forum/lasagne-users>`_, or use\nStack Overflow.  Please refrain from contacting the authors for\nnon-commercial support requests directly; public forums are the right\nplace for these.\n\nCitation\n========\n\nCitations are welcome:\n\n    Daniel Nouri. 2014. *nolearn: scikit-learn compatible neural\n    network library* https://github.com/dnouri/nolearn\n\nLicense\n=======\n\nSee the `LICENSE.txt <LICENSE.txt>`_ file for license rights and\nlimitations (MIT).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6FC8:7A4F8:182057:5E428F:6AB929F6"},"text_sha256":"a849dfd29381d0fd9aead4d249dfaab4caf4c8e2bccf3aa9a25e016759f14c28"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"StanfordVL/GibsonEnv","input_row":{"repository":"StanfordVL/GibsonEnv","url":"https://github.com/StanfordVL/GibsonEnv","name":"GibsonEnv","owner":"StanfordVL","description":"Gibson Environments: Real-World Perception for Embodied Agents","language":"C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":947,"issues":118,"created_at":"2017-12-18T20:12:35Z","updated_at":"2026-08-31T22:51:16Z","first_commit_at":"2017-07-18T21:19:22Z","last_commit_at":"2021-05-12T18:03:25Z","activity_months":45.789999999999999,"ai_ml_match_topics":"deep-learning; reinforcement-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:39.760Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"StanfordVL/GibsonEnv","visibility":"public","created_at":"2017-12-18T20:12:35Z","updated_at":"2026-08-31T22:51:16Z","private":false,"fork":false,"archived":false,"stargazers_count":947,"open_issues_count":49,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2778","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:1828B11:1C4A2E9:6AB929F7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2777","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:179CCC8:1BBEA23:6AB929F8"},"commit":{"sha":"a92edeb17f3fbec6c24e3b4f9d3c20aac20f9597","url":"https://github.com/StanfordVL/GibsonEnv/commit/a92edeb17f3fbec6c24e3b4f9d3c20aac20f9597","date":"2018-05-24T20:48:45Z","author_date":"2018-05-24T20:48:45Z","committer_date":"2018-05-24T20:48:45Z","tree_sha":"150a146a73f6a1180c45423e7ed21bffc87ef5de","message_first_line":"adjust default offset"},"tree_request_status":200,"tree_rate":{"github_remaining":"2776","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:1828B80:1C4A370:6AB929F8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":25694,"blob_sha":"1c3611bcc63c34a7fd939c6ca8587b3bedd844e8","priority":0}],"documents":[{"path":"README.md","size":25694,"blob_sha":"1c3611bcc63c34a7fd939c6ca8587b3bedd844e8","priority":0,"status":200,"text":"# GIBSON ENVIRONMENT for Embodied Active Agents with Real-World Perception \n\nYou shouldn't play video games all day, so shouldn't your AI! We built a virtual environment that offers real world experience for learning perception. \n\n<img src=misc/ui.gif width=\"600\">\n \n**Summary**: Perception and being active (i.e. having a certain level of motion freedom) are closely tied. Learning active perception and sensorimotor control in the physical world is cumbersome as existing algorithms are too slow to efficiently learn in real-time and robots are fragile and costly. This has given a fruitful rise to learning in simulation which consequently casts a question on transferring to real-world. We developed Gibson environment with the following primary characteristics:  \n\n**I.** being from the real-world and reflecting its semantic complexity through virtualizing real spaces,  \n**II.** having a baked-in mechanism for transferring to real-world (Goggles function), and  \n**III.** embodiment of the agent and making it subject to constraints of space and physics via integrating a physics engine ([Bulletphysics](http://bulletphysics.org/wordpress/)).  \n\n**Naming**: Gibson environment is named after *James J. Gibson*, the author of \"Ecological Approach to Visual Perception\", 1979. “We must perceive in order to move, but we must also move in order to perceive” – JJ Gibson\n\nPlease see the [website](http://gibson.vision/) (http://env.gibson.vision/) for more technical details. This repository is intended for distribution of the environment and installation/running instructions.\n\n#### Paper\n**[\"Embodied Real-World Active Perception\"](http://gibson.vision/)**, in **CVPR 2018 [Spotlight]**.\n\n\n[![Gibson summary video](misc/vid_thumbnail_600.png)](https://youtu.be/KdxuZjemyjc \"Click to watch the video summarizing Gibson environment!\")\n\n\n\nBeta\n=================\n**This is the <strike>0.1.0<\/strike> 0.2.0 beta release. Bug reports and suggestions for improvement are appreciated.** [change log file](https://github.com/StanfordVL/GibsonEnv/blob/master/misc/CHANGELOG.md).  \n\n**Dataset**: To make the beta release lighter for the users, we are including a small subset (9) of the spaces in it. \nThe [full dataset](gibson/data/README.md) includes 572 spaces and 1440 floors. It will be made available if we dont get a major bug report during the brief beta release. \n\nTable of contents\n=================\n\n   * [Installation](#installation)\n        * [Quick Installation (docker)](#a-quick-installation-docker)\n        * [Building from source](#b-building-from-source)\n        * [Uninstalling](#uninstalling)\n   * [Quick Start](#quick-start)\n        * [Web User Interface](#web-user-interface)\n        * [Rendering Semantics](#rendering-semantics)\n        * [Advanced Guide](#more-advanced-starting-guide)\n        * [ROS Configuration](#ros-configuration)\n   * [Coding your RL agent](#coding-your-rl-agent)\n   * [Environment Configuration](#environment-configuration)\n   * [Goggles: transferring the agent to real-world](#goggles-transferring-the-agent-to-real-world)\n\n\nInstallation\n=================\n\n#### Installation Method\n\nThere are two ways to instal gibson, A. using our docker image (recommended) and B. building from srouce. \n\n#### System requirements\n\nThe minimum system requirements are the following:\n\nFor docker installation (A): \n- Ubuntu 16.04\n- Nvidia GPU with VRAM > 6.0GB\n- Nvidia driver >= 384\n- CUDA >= 9.0, CuDNN >= v7\n\nFor building from the source(B):\n- Ubuntu >= 14.04\n- Nvidia GPU with VRAM > 6.0GB\n- Nvidia driver >= 375\n- CUDA >= 8.0, CuDNN >= v5\n\n#### Download data\n\nFirst, our environment assets data are available [here](https://storage.googleapis.com/gibsonassets/assets.tar.gz). You can follow the installation guide below to download and set up them properly. `gibson/assets` folder stores necessary data (agent models, environments, etc) to run gibson environment. Users can add more environments files into `gibson/assets/dataset` to run gibson on more environments.\n<!-- \nMake a folder `gibson/assets` and put the downloaded `assets.tar.gz` file in it.\n-->\n<!--\nTo download the file from the command line, run the following from the main directory of this repo:\n```bash\nfilename=\"gibson/assets/assets.tar.gz\"\nfileid=\"1jV-UN4ePwsE9XYv8m4YbNiGxRI_WWpW0\"\nsudo apt-get install golang-go\nexport GOPATH=$HOME/go\ngo get github.com/ericchiang/pup\nquery=`curl -c ./cookie.txt -s -L \"https://drive.google.com/uc?export=download&id=${fileid}\" | pup 'a#uc-download-link attr{href}' | sed -e 's/amp;//g'`\ncurl -b ./cookie.txt -L -o ${filename} \"https://drive.google.com${query}\"\n```\n-->\n\nA. Quick installation (docker)\n-----\n\nWe use docker to distribute our software, you need to install [docker](https://docs.docker.com/engine/installation/) and [nvidia-docker2.0](https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)) first. \n\nRun `docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi` to verify your installation. \n\nYou can either 1. build your own docker image or 2. pull from our docker image. 1 is recommended because you have the freedom to include more or less enviroments into your docker image. For 2, we include a fixed number of 8 environments (space1-space8).\n\n1. Build your own docker image (recommended)\n```bash\ngit clone https://github.com/StanfordVL/GibsonEnv.git\ncd GibsonEnv/gibson\nwget https://storage.googleapis.com/gibsonassets/assets_core.tar.gz\ntar -zxf assets_core.tar.gz\ncd assets\nwget https://storage.googleapis.com/gibsonassets/dataset.tar.gz\ntar -zxf dataset.tar.gz\n### the commands above downloads assets data file and decpmpress it into gibson/assets folder\ncd ../.. # back to GibsonEnv dir\ndocker build . -t gibson ### finish building inside docker\n```\nIf the installation is successful, you should be able to run `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson` to create a container. Note that we don't include\ndataset files in docker image to keep our image slim, so you will need to mount it to the container when you start a container.\n\n\n2. Or pull from our docker image\n```bash\ndocker pull xf1280/gibson:0.2\n```\n#### Notes on deployment on a headless server\n\nWe have another docker file that supports deployment on a headless server and remote access with TurboVNC+virtualGL. \nYou can build your own docker image with the docker file `Dockerfile_server`.\nInstructions to run gibson on a headless server:\n\n1. Install nvidia-docker2 dependencies following the starter guide.\n2. Use `openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem` create `self.pem` file\n3. `docker build -f Dockerfile_server -t gibson_server .` use the `Dockerfile_server` to build a new docker image that support virtualgl and turbovnc\n4. `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset -p 5901:5901 gibson_server`\nin docker terminal, start `/opt/websockify/run 5901 --web=/opt/noVNC --wrap-mode=ignore -- vncserver :1 -securitytypes otp -otp -noxstartup` in background, potentially with `tmux`\n5. Run gibson with `DISPLAY=:1 vglrun python <gibson example or training>`\n6. Visit your `host:5901` and type in one time password to see the GUI.\n\n\nB. Building from source\n-----\nIf you don't want to use our docker image, you can also install gibson locally. This will require some dependencies to be installed. \n\nFirst, make sure you have Nvidia driver and CUDA installed. If you install from source, CUDA 9 is not necessary, as that is for nvidia-docker 2.0. Then, let's install some dependencies:\n\n```bash\napt-get update \napt-get install libglew-dev libglm-dev libassimp-dev xorg-dev libglu1-mesa-dev libboost-dev \\\n\t\tmesa-common-dev freeglut3-dev libopenmpi-dev cmake golang libjpeg-turbo8-dev wmctrl \\ \n\t\txdotool libzmq3-dev zlib1g-dev\\\n```\t\n\nInstall required deep learning libraries: Using python3.5 is recommended. You can create a python3.5 environment first. \n\n```bash\nconda create -n py35 python=3.5 anaconda \nsource activate py35 # the rest of the steps needs to be performed in the conda environment\nconda install -c conda-forge opencv\npip install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp35-cp35m-linux_x86_64.whl \npip install torchvision==0.2.0\npip install tensorflow==1.3\n```\nClone the repository, download data and build\n```bash\ngit clone https://github.com/StanfordVL/GibsonEnv.git\ncd GibsonEnv/gibson\nwget https://storage.googleapis.com/gibsonassets/assets_core.tar.gz\ntar -zxf assets_core.tar.gz\ncd assets\nwget https://storage.googleapis.com/gibsonassets/dataset.tar.gz\ntar -zxf dataset.tar.gz\n#### the commands above downloads assets data file and decpmpress it into gibson/assets folder\ncd ../.. #back to GibsonEnv dir\n./build.sh build_local ### build C++ and CUDA files\npip install -e . ### Install python libraries\n```\n\nInstall OpenAI baselines if you need to run training demo.\n\n```bash\ngit clone https://github.com/fxia22/baselines.git\npip install -e baselines\n```\n\nUninstalling\n----\n\nUninstall gibson is easy. If you installed with docker, just run `docker images -a | grep \"gibson\" | awk '{print $3}' | xargs docker rmi` to clean up the image. If you installed from source, uninstall with `pip uninstall gibson`\n\n\nQuick Start\n=================\n\nFirst run `xhost +local:root` on your host machine to enable display. You may need to run `export DISPLAY=:0.0` first. After getting into the docker container with `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson`, you will get an interactive shell. Now you can run a few demos. \n\nIf you installed from source, you can run those directly using the following commands without using docker. \n\n\n```bash\npython examples/demo/play_husky_nonviz.py ### Use ASWD keys on your keyboard to control a car to navigate around Gates building\n```\n\n<img src=misc/husky_nonviz.png width=\"600\">\n\nYou will be able to use ASWD keys on your keyboard to control a car to navigate around Gates building. A camera output will not be shown in this particular demo. \n\n```bash\npython examples/demo/play_husky_camera.py ### Use ASWD keys on your keyboard to control a car to navigate around Gates building, while RGB and depth camera outputs are also shown.\n```\n<img src=misc/husky_camera.png width=\"600\">\n\nYou will able to use ASWD keys on your keyboard to control a car to navigate around Gates building. You will also be able to see the RGB and depth camera outputs. \n\n```bash\npython examples/train/train_husky_navigate_ppo2.py ### Use PPO2 to train a car to navigate down the hall way in Gates building, using visual input from the camera.\n```\n\n<img src=misc/husky_train.png width=\"800\">\nBy running this command you will start training a husky robot  to navigate in Gates building and go down the corridor with RGBD input. You will see some RL related statistics in the terminal after each episode.\n\n\n```bash\npython examples/train/train_ant_navigate_ppo1.py ### Use PPO1 to train an ant to navigate down the hall way in Gates building, using visual input from the camera.\n```\n\n<img src=misc/ant_train.png width=\"800\">\nBy running this command you will start training an ant to navigate in Gates building and go down the corridor with RGBD input. You will see some RL related statistics in the terminal after each episode.\n\n\nWeb User Interface\n----\nWhen running Gibson, you can start a web user interface with `python gibson/utils/web_ui.py`. This is helpful when you cannot physically access the machine running gibson or you are running on a headless cloud environment.\n\n\n<img src=misc/web_ui.png width=\"600\">\n\nRendering Semantics\n----\n<img src=misc/instance_colorcoding_semantics.png width=\"600\">\n\nGibson can provide pixel-wise frame-by-frame semantic masks when the model is semantically annotated. As of now we have incorporated models from [Stanford 2D3DS](http://buildingparser.stanford.edu/) and [Matterport 3D](https://niessner.github.io/Matterport/) for this purpose, and we refer you to the original dataset's reference for the list of their semantic classes and annotations. \n\nFor detailed instructions of rendering semantics in Gibson, see [semantic instructions](gibson/utils/semantics.md). In the light beta release, the space `17DRP5sb8fy` includes Matterport 3D style semantic annotation and `space7` includes Stanford 2D3DS style annotation. \n\n**Agreement**: If you choose to use the models from [Stanford 2D3DS](http://buildingparser.stanford.edu/) or [Matterport 3D](https://niessner.github.io/Matterport/) for rendering semantics, we ask you to agree to and sign their respective agreements. See [here](https://niessner.github.io/Matterport/) for Matterport3D and [here](https://github.com/alexsax/2D-3D-Semantics) for Stanford 2D3DS.\n\n\nMore Advanced Starting Guide\n----\n\n### Starter Agents\n\nGibson provides a base set of agents:\n<img src=misc/agents.gif>\n\nTo enable (optionally) abstracting away low-level control and robot dynamics for high-level tasks, we also provide a set of practical and ideal controllers for each agent.\n\n| Agent Name     | DOF | Information      | Controller |\n|:-------------: | :-------------: |:-------------: |:-------------| \n| Mujoco Ant      | 8   | [OpenAI Link](https://blog.openai.com/roboschool/) | Torque |\n| Mujoco Humanoid | 17  | [OpenAI Link](https://blog.openai.com/roboschool/) | Torque |\n| Husky Robot     | 4   | [ROS](http://wiki.ros.org/Robots/Husky), [Manufacturer](https://www.clearpathrobotics.com/) | Torque, Velocity, Position |\n| Minitaur Robot  | 8   | [Robot Page](https://www.ghostrobotics.io/copy-of-robots), [Manufacturer](https://www.ghostrobotics.io/) | Sine Controller |\n| JackRabbot      | 2   | [Stanford Project Link](http://cvgl.stanford.edu/projects/jackrabbot/) | Torque, Velocity, Position |\n| TurtleBot       | 2   | [ROS](http://wiki.ros.org/Robots/TurtleBot), [Manufacturer](https://www.turtlebot.com/) | Torque, Velocity, Position |\n| Quadrotor         | 6   | [Paper](https://repository.upenn.edu/cgi/viewcontent.cgi?referer=https://www.google.com/&httpsredir=1&article=1705&context=edissertations) | Position |\n\n\n### Starter Code \n\nMore demonstration examples can be found in `examples/demo` folder\n\n| Example        | Explanation          |\n|:-------------: |:-------------| \n|`play_ant_camera.py`|Use 1234567890qwerty keys on your keyboard to control an ant to navigate around Gates building, while RGB and depth camera outputs are also shown. |\n|`play_ant_nonviz.py`| Use 1234567890qwerty keys on your keyboard to control an ant to navigate around Gates building.|\n|`play_drone_camera.py`| Use ASWDZX keys on your keyboard to control a drone to navigate around Gates building, while RGB and depth camera outputs are also shown.|\n|`play_drone_nonviz.py`| Use ASWDZX keys on your keyboard to control a drone to navigate around Gates building|\n|`play_humanoid_camera.py`| Use 1234567890qwertyui keys on your keyboard to control a humanoid to navigate around Gates building. Just kidding, controlling humaniod with keyboard is too difficult, you can only watch it fall. Press R to reset. RGB and depth camera outputs are also shown. |\n|`play_humanoid_nonviz.py`| Watch a humanoid fall. Press R to reset.|\n|`play_husky_camera.py`| Use ASWD keys on your keyboard to control a car to navigate around Gates building, while RGB and depth camera outputs are also shown.|\n|`play_husky_nonviz.py`| Use ASWD keys on your keyboard to control a car to navigate around Gates building|\n\nMore training code can be found in `examples/train` folder.\n\n| Example        | Explanation          |\n|:-------------: |:-------------| \n|`train_husky_navigate_ppo2.py`|   Use PPO2 to train a car to navigate down the hall way in Gates building, using RGBD input from the camera.|\n|`train_husky_navigate_ppo1.py`|   Use PPO1 to train a car to navigate down the hall way in Gates building, using RGBD input from the camera.|\n|`train_ant_navigate_ppo1.py`| Use PPO1 to train an ant to navigate down the hall way in Gates building, using visual input from the camera. |\n|`train_ant_climb_ppo1.py`| Use PPO1 to train an ant to climb down the stairs in Gates building, using visual input from the camera.  |\n|`train_ant_gibson_flagrun_ppo1.py`| Use PPO1 to train an ant to chase a target (a red cube) in Gates building. Everytime the ant gets to target(or time out), the target will change position.|\n|`train_husky_gibson_flagrun_ppo1.py`|Use PPO1 to train a car to chase a target (a red cube) in Gates building. Everytime the car gets to target(or time out), the target will change position. |\n\nROS Configuration\n---------\n\nWe provide examples of configuring Gibson with ROS [here](examples/ros/gibson-ros). We use turtlebot as an example, after a policy is trained in Gibson, it requires minimal changes to deploy onto a turtlebot. See [README](examples/ros/gibson-ros) for more details.\n\n\n\n\nCoding Your RL Agent\n====\nYou can code your RL agent following our convention. The interface with our environment is very simple (see some examples in the end of this section).\n\nFirst, you can create an environment by creating an instance of classes in `gibson/core/envs` folder. \n\n\n```python\nenv = AntNavigateEnv(is_discrete=False, config = config_file)\n```\n\nThen do one step of the simulation with `env.step`. And reset with `env.reset()`\n```python\nobs, rew, env_done, info = env.step(action)\n```\n`obs` gives the observation of the robot. It is a dictionary with each component as a key value pair. Its keys are specified by user inside config file. E.g. `obs['nonviz_sensor']` is proprioceptive sensor data, `obs['rgb_filled']` is rgb camera data.\n\n`rew` is the defined reward. `env_done` marks the end of one episode, for example, when the robot dies. \n`info` gives some additional information of this step; sometimes we use this to pass additional non-visual sensor values.\n\nWe mostly followed [OpenAI gym](https://github.com/openai/gym) convention when designing the interface of RL algorithms and the environment. In order to help users start with the environment quicker, we\nprovide some examples at [examples/train](examples/train). The RL algorithms that we use are from [openAI baselines](https://github.com/openai/baselines) with some adaptation to work with hybrid visual and non-visual sensory data.\nIn particular, we used [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo1) and a speed optimized version of [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo2).\n\n\nEnvironment Configuration\n=================\nEach environment is configured with a `yaml` file. Examples of `yaml` files can be found in `examples/configs` folder. Parameters for the file is explained below. For more informat specific to Bullet Physics engine, you can see the documentation [here](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit).\n\n| Argument name        | Example value           | Explanation  |\n|:-------------:|:-------------:| :-----|\n| envname      | AntClimbEnv | Environment name, make sure it is the same as the class name of the environment |\n| model_id      | space1-space8      |   Scene id, in beta release, choose from space1-space8 |\n| target_orn | [0, 0, 3.14]      |   Eulerian angle (in radian) target orientation for navigating, the reference frame is world frame. For non-navigation tasks, this parameter is ignored. |\n|target_pos | [-7, 2.6, -1.5] | target position (in meter) for navigating, the reference frame is world frame. For non-navigation tasks, this parameter is ignored. |\n|initial_orn | [0, 0, 3.14] | initial orientation (in radian) for navigating, the reference frame is world frame |\n|initial_pos | [-7, 2.6, 0.5] | initial position (in meter) for navigating, the reference frame is world frame|\n|fov | 1.57  | field of view for the camera, in radian |\n| use_filler | true/false  | use neural network filler or not. It is recommended to leave this argument true. See [Gibson Environment website](http://gibson.vision/) for more information. |\n|display_ui | true/false  | Gibson has two ways of showing visual output, either in multiple windows, or aggregate them into a single pygame window. This argument determiens whether to show pygame ui or not, if in a production environment (training), you need to turn this off |\n|show_diagnostics | true/false  | show dignostics(including fps, robot position and orientation, accumulated rewards) overlaying on the RGB image |\n|ui_num |2  | how many ui components to show, this should be length of ui_components. |\n| ui_components | [RGB_FILLED, DEPTH]  | which are the ui components, choose from [RGB_FILLED, DEPTH, NORMAL, SEMANTICS, RGB_PREFILLED] |\n|output | [nonviz_sensor, rgb_filled, depth]  | output of the environment to the robot, choose from  [nonviz_sensor, rgb_filled, depth]. These values are independent of `ui_components`, as `ui_components` determines what to show and `output` determines what the robot receives. |\n|resolution | 512 | choose from [128, 256, 512] resolution of rgb/depth image |\n|initial_orn | [0, 0, 3.14] | initial orientation (in radian) for navigating, the reference frame is world frame |\n|speed : timestep | 0.01 | length of one physics simulation step in seconds(as defined in [Bullet](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit)). For example, if timestep=0.01 sec, frameskip=10, and the environment is running at 100fps, it will be 10x real time. Note: setting timestep above 0.1 can cause instability in current version of Bullet simulator since an object should not travel faster than its own radius within one timestep. You can keep timestep at a low value but increase frameskip to siumate at a faster speed. See [Bullet guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit) under \"discrete collision detection\" for more info.|\n|speed : frameskip | 10 | how many timestep to skip when rendering frames. See above row for an example. For tasks that does not require high frequency control, you can set frameskip to larger value to gain further speed up. |\n|mode | gui/headless  | gui or headless, if in a production environment (training), you need to turn this to headless. In gui mode, there will be visual output; in headless mode, there will be no visual output. |\n|verbose |true/false  | show dignostics in terminal |\n|fast_lq_render| true/false| it there is fast_lq_render in yaml file, Gibson will use a smaller filler network, this will render faster but generate slightly lower quality camera output. This option is useful for training RL agents fast. |\n\n#### Making Your Customized Environment\nGibson provides a set of methods for you to define your own environments. You can follow the existing environments inside `gibson/core/envs`.\n\n| Method name        | Usage           |\n|:------------------:|:---------------------------|\n| robot.render_observation(pose) | Render new observations based on pose, returns a dictionary. |\n| robot.get_observation() | Get observation at current pose. Needs to be called after robot.render_observation(pose). This does not induce extra computation. |\n| robot.get_position() | Get current robot position. |\n| robot.get_orientation() | Get current robot orientation. |\n| robot.eyes.get_position() | Get current robot perceptive camera position. |\n| robot.eyes.get_orientation() | Get current robot perceptive camera orientation. | \n| robot.get_target_position() | Get robot target position. |\n| robot.apply_action(action) | Apply action to robot. |  \n| robot.reset_new_pose(pos, orn) | Reset the robot to any pose. |\n| robot.dist_to_target() | Get current distance from robot to target. |\n\nGoggles: transferring the agent to real-world\n=================\nGibson includes a baked-in domain adaptation mechanism, named Goggles, for when an agent trained in Gibson is going to be deployed in real-world (i.e. operate based on images coming from an onboard camera). The mechanims is essentially a learned inverse function that alters the frames coming from a real camera to what they would look like if they were rendered via Gibson, and hence, disolve the domain gap. \n\n<img src=http://gibson.vision/public/img/figure4.jpg width=\"600\">\n\n\n**More details:** With all the imperfections in point cloud rendering, it has been proven difficult to get completely photo-realistic rendering with neural network fixes. The remaining issues make a domain gap between the synthesized and real images. Therefore, we formulate the rendering problem as forming a joint space ensuring a correspondence between rendered and real images, rather than trying to (unsuccessfuly) render images that are identical to real ones. This provides a deterministic pathway for traversing across these domains and hence undoing the gap. We add another network \"u\" for target image (I_t) and define the rendering loss to minimize the distance between f(I_s) and u(I_t), where \"f\" and \"I_s\" represent the filler neural network and point cloud rendering output, respectively (see the loss in above figure). We use the same network structure for f and u. The function u(I) is trained to alter the observation in real-world, I_t, to look like the corresponding I_s and consequently dissolve the gap. We named the u network goggles, as it resembles corrective lenses for the anget for deploymen in real world. Detailed formulation and discussion of the mechanism can be found in the paper. You can download the function u and apply it when you deploy your trained agent in real-world.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2302:3B1F3:1844AF:5E6767:6AB929F7"},"text_sha256":"ee26433c937a54c0181b8862ec983e9262c76401c4f2a56eb7bd5c035e357307"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2775","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:17E7141:1C08F03:6AB929F9"},"commit":{"sha":"f474d9efd5b5ef703e3bf630a6f7448b54875d0c","url":"https://github.com/StanfordVL/GibsonEnv/commit/f474d9efd5b5ef703e3bf630a6f7448b54875d0c","date":"2021-05-12T18:03:25Z","author_date":"2021-05-12T18:03:25Z","committer_date":"2021-05-12T18:03:25Z","tree_sha":"2e0d8217244ed26594cee7e1db1c8c4e16f1c95e","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2774","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0830:A9DC0:17B1C61:1BD3522:6AB929FA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":29736,"blob_sha":"330199b4d2bea9217d4f783f05850edf2b47bf1b","priority":0}],"documents":[{"path":"README.md","size":29736,"blob_sha":"330199b4d2bea9217d4f783f05850edf2b47bf1b","priority":0,"status":200,"text":"# GIBSON ENVIRONMENT for Embodied Active Agents with Real-World Perception \n\nYou shouldn't play video games all day, so shouldn't your AI! We built a virtual environment simulator, Gibson, that offers real-world experience for learning perception.  \n\n<img src=misc/ui.gif width=\"600\">\n \n**Summary**: Perception and being active (i.e. having a certain level of motion freedom) are closely tied. Learning active perception and sensorimotor control in the physical world is cumbersome as existing algorithms are too slow to efficiently learn in real-time and robots are fragile and costly. This has given a fruitful rise to learning in the simulation which consequently casts a question on transferring to real-world. We developed Gibson environment with the following primary characteristics:  \n\n**I.** being from the real-world and reflecting its semantic complexity through virtualizing real spaces,  \n**II.** having a baked-in mechanism for transferring to real-world (Goggles function), and  \n**III.** embodiment of the agent and making it subject to constraints of space and physics via integrating a physics engine ([Bulletphysics](http://bulletphysics.org/wordpress/)).  \n\n**Naming**: Gibson environment is named after *James J. Gibson*, the author of \"Ecological Approach to Visual Perception\", 1979. “We must perceive in order to move, but we must also move in order to perceive” – JJ Gibson\n\nPlease see the [website](http://gibson.vision/) (http://gibsonenv.stanford.edu/) for more technical details. This repository is intended for distribution of the environment and installation/running instructions.\n\n#### Paper\n**[\"Gibson Env: Real-World Perception for Embodied Agents\"](http://gibson.vision/)**, in **CVPR 2018 [Spotlight Oral]**.\n\n\n[![Gibson summary video](misc/vid_thumbnail_600.png)](https://youtu.be/KdxuZjemyjc \"Click to watch the video summarizing Gibson environment!\")\n\n\n\nRelease\n=================\n**This is the 0.3.1 release. Bug reports, suggestions for improvement, as well as community developments are encouraged and appreciated.** [change log file](misc/CHANGELOG.md).  \n\n\nDatabase\n=================\nThe full database includes 572 spaces and 1440 floors and can be downloaded [here](gibson/data/README.md). A diverse set of visualizations of all spaces in Gibson can be seen [here](http://gibsonenv.stanford.edu/database/). To make the core assets download package lighter for the users, we  include a small subset (39) of the spaces. Users can download the rest of the spaces and add them to the assets folder. We also integrated [Stanford 2D3DS](http://3dsemantics.stanford.edu/) and [Matterport 3D](https://niessner.github.io/Matterport/) as separate datasets if one wishes to use Gibson's simulator with those datasets (access [here](gibson/data/README.md)).\n\nTable of contents\n=================\n\n   * [Installation](#installation)\n        * [Quick Installation (docker)](#a-quick-installation-docker)\n        * [Building from source](#b-building-from-source)\n        * [Uninstalling](#uninstalling)\n   * [Quick Start](#quick-start)\n        * [Gibson FPS](#gibson-framerate)\n        * [Web User Interface](#web-user-interface)\n        * [Rendering Semantics](#rendering-semantics)\n        * [Robotic Agents](#robotic-agents)\n        * [ROS Configuration](#ros-configuration)\n   * [Coding your RL agent](#coding-your-rl-agent)\n   * [Environment Configuration](#environment-configuration)\n   * [Goggles: transferring the agent to real-world](#goggles-transferring-the-agent-to-real-world)\n   * [Citation](#citation)\n\n\n\nInstallation\n=================\n\n#### Installation Method\n\nThere are two ways to install gibson, A. using our docker image (recommended) and B. building from source. \n\n#### System requirements\n\nThe minimum system requirements are the following:\n\nFor docker installation (A): \n- Ubuntu 16.04\n- Nvidia GPU with VRAM > 6.0GB\n- Nvidia driver >= 384\n- CUDA >= 9.0, CuDNN >= v7\n\nFor building from the source(B):\n- Ubuntu >= 14.04\n- Nvidia GPU with VRAM > 6.0GB\n- Nvidia driver >= 375\n- CUDA >= 8.0, CuDNN >= v5\n\n#### Download data\n\nFirst, our environment core assets data are available [here](https://storage.googleapis.com/gibson_scenes/assets_core_v2.tar.gz). You can follow the installation guide below to download and set up them properly. `gibson/assets` folder stores necessary data (agent models, environments, etc) to run gibson environment. Users can add more environments files into `gibson/assets/dataset` to run gibson on more environments. Visit the [database readme](gibson/data/README.md) for downloading more spaces. Please sign the [license agreement](gibson/data/README.md#download) before using Gibson's database.\n\n\nA. Quick installation (docker)\n-----\n\nWe use docker to distribute our software, you need to install [docker](https://docs.docker.com/engine/installation/) and [nvidia-docker2.0](https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)) first. \n\nRun `docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi` to verify your installation. \n\nYou can either 1. pull from our docker image (recommended) or 2. build your own docker image.\n\n\n1. Pull from our docker image (recommended)\n\n```bash\n# download the dataset from https://storage.googleapis.com/gibson_scenes/dataset.tar.gz\ndocker pull xf1280/gibson:0.3.1\nxhost +local:root\ndocker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset xf1280/gibson:0.3.1\n```\n\n2. Build your own docker image \n```bash\ngit clone https://github.com/StanfordVL/GibsonEnv.git\ncd GibsonEnv\n./download.sh # this script downloads assets data file and decompress it into gibson/assets folder\ndocker build . -t gibson ### finish building inside docker, note by default, dataset will not be included in the docker images\nxhost +local:root ## enable display from docker\n```\nIf the installation is successful, you should be able to run `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson` to create a container. Note that we don't include\ndataset files in docker image to keep our image slim, so you will need to mount it to the container when you start a container. \n\n#### Notes on deployment on a headless server\n\nGibson Env supports deployment on a headless server and remote access with `x11vnc`. \nYou can build your own docker image with the docker file `Dockerfile` as above.\nInstructions to run gibson on a headless server (requires X server running):\n\n1. Install nvidia-docker2 dependencies following the starter guide. Install `x11vnc` with `sudo apt-get install x11vnc`.\n2. Have xserver running on your host machine, and run `x11vnc` on DISPLAY :0.\n3. `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset <gibson image name>`\n4. Run gibson with `python <gibson example or training>` inside docker.\n5. Visit your `host:5900` and you should be able to see the GUI.\n\nIf you don't have X server running, you can still run gibson, see [this guide](https://github.com/StanfordVL/GibsonEnv/wiki/Running-GibsonEnv-on-headless-server) for more details.\n\nB. Building from source\n-----\nIf you don't want to use our docker image, you can also install gibson locally. This will require some dependencies to be installed. \n\nFirst, make sure you have Nvidia driver and CUDA installed. If you install from source, CUDA 9 is not necessary, as that is for nvidia-docker 2.0. Then, let's install some dependencies:\n\n```bash\napt-get update \napt-get install libglew-dev libglm-dev libassimp-dev xorg-dev libglu1-mesa-dev libboost-dev \\\n\t\tmesa-common-dev freeglut3-dev libopenmpi-dev cmake golang libjpeg-turbo8-dev wmctrl \\\n\t\txdotool libzmq3-dev zlib1g-dev\n```\t\n\nInstall required deep learning libraries: Using python3.5 is recommended. You can create a python3.5 environment first. \n\n```bash\nconda create -n py35 python=3.5 anaconda \nsource activate py35 # the rest of the steps needs to be performed in the conda environment\nconda install -c conda-forge opencv\npip install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp35-cp35m-linux_x86_64.whl \npip install torchvision==0.2.0\npip install tensorflow==1.3\n```\nClone the repository, download data and build\n```bash\ngit clone https://github.com/StanfordVL/GibsonEnv.git\ncd GibsonEnv\n./download.sh # this script downloads assets data file and decompress it into gibson/assets folder\n./build.sh build_local ### build C++ and CUDA files\npip install -e . ### Install python libraries\n```\n\nInstall OpenAI baselines if you need to run the training demo.\n\n```bash\ngit clone https://github.com/fxia22/baselines.git\npip install -e baselines\n```\n\nUninstalling\n----\n\nUninstall gibson is easy. If you installed with docker, just run `docker images -a | grep \"gibson\" | awk '{print $3}' | xargs docker rmi` to clean up the image. If you installed from source, uninstall with `pip uninstall gibson`\n\n\nQuick Start\n=================\n\nFirst run `xhost +local:root` on your host machine to enable display. You may need to run `export DISPLAY=:0` first. After getting into the docker container with `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson`, you will get an interactive shell. Now you can run a few demos. \n\nIf you installed from source, you can run those directly using the following commands without using docker. \n\n\n```bash\npython examples/demo/play_husky_nonviz.py ### Use ASWD keys on your keyboard to control a car to navigate around Gates building\n```\n\n<img src=misc/husky_nonviz.png width=\"600\">\n\nYou will be able to use ASWD keys on your keyboard to control a car to navigate around Gates building. A camera output will not be shown in this particular demo. \n\n```bash\npython examples/demo/play_husky_camera.py ### Use ASWD keys on your keyboard to control a car to navigate around Gates building, while RGB and depth camera outputs are also shown.\n```\n<img src=misc/husky_camera.png width=\"600\">\n\nYou will able to use ASWD keys on your keyboard to control a car to navigate around Gates building. You will also be able to see the RGB and depth camera outputs. \n\n```bash\npython examples/train/train_husky_navigate_ppo2.py ### Use PPO2 to train a car to navigate down the hallway in Gates building, using visual input from the camera.\n```\n\n<img src=misc/husky_train.png width=\"800\">\nBy running this command you will start training a husky robot to navigate in Gates building and go down the corridor with RGBD input. You will see some RL related statistics in the terminal after each episode.\n\n\n```bash\npython examples/train/train_ant_navigate_ppo1.py ### Use PPO1 to train an ant to navigate down the hallway in Gates building, using visual input from the camera.\n```\n\n<img src=misc/ant_train.png width=\"800\">\nBy running this command you will start training an ant to navigate in Gates building and go down the corridor with RGBD input. You will see some RL related statistics in the terminal after each episode.\n\n\n\nGibson Framerate\n----\nBelow is Gibson Environment's framerate benchmarked on different platforms. Please refer to [fps branch](https://github.com/StanfordVL/GibsonEnv/tree/fps) for the code to reproduce the results.\n<table class=\"table\">\n  <tr>\n    <th scope=\"row\">Platform<\/th>\n    <td colspan=\"3\">Tested on Intel E5-2697 v4 + NVIDIA Tesla V100<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"col\">Resolution [nxn]<\/th>\n    <th scope=\"col\">128<\/th>\n    <th scope=\"col\">256<\/th>\n    <th scope=\"col\">512<\/th>\n <\/tr>\n  <tr>\n    <th scope=\"row\">RGBD, pre network<code>f<\/code><\/th>\n    <td>109.1<\/td>\n    <td>58.5<\/td>\n    <td>26.5<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">RGBD, post network<code>f<\/code><\/th>\n    <td>77.7<\/td>\n    <td>30.6<\/td>\n    <td>14.5<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">RGBD, post small network<code>f<\/code><\/th>\n    <td>87.4<\/td>\n    <td>40.5<\/td>\n    <td>21.2<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">Depth only<\/th>\n    <td>253.0<\/td>\n    <td>197.9<\/td>\n    <td>124.7<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">Surface Normal only<\/th>\n    <td>207.7<\/td>\n    <td>129.7<\/td>\n    <td>57.2<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">Semantic only<\/th>\n    <td>190.0<\/td>\n    <td>144.2<\/td>\n    <td>55.6<\/td>\n  <\/tr>\n  <tr>\n    <th scope=\"row\">Non-Visual Sensory<\/th>\n    <td>396.1<\/td>\n    <td>396.1<\/td>\n    <td>396.1<\/td>\n  <\/tr>\n<\/table>\n\nWe also tested on <code>Intel I7 7700 + NVIDIA GeForce GTX 1070Ti<\/code> and <code>Tested on Intel I7 6580k + NVIDIA GTX 1080Ti<\/code> platforms. The FPS difference is within 10% on each task.\n\n<table class=\"table\">\n    <tr>\n        <th scope=\"row\">Platform<\/th>\n        <td colspan=\"6\">Multi-process FPS tested on Intel E5-2697 v4 + NVIDIA Tesla V100<\/td>\n    <\/tr>\n    <tr>\n      <th scope=\"col\">Configuration<\/th>\n      <th scope=\"col\">512x512 episode sync<\/th>\n      <th scope=\"col\">512x512 frame sync<\/th>\n      <th scope=\"col\">256x256 episode sync<\/th>\n      <th scope=\"col\">256x256 frame sync<\/th>\n      <th scope=\"col\">128x128 episode sync<\/th>\n      <th scope=\"col\">128x128 frame sync<\/th>\n    <\/tr>\n    <tr>\n      <th scope=\"row\">1 process<\/th>\n      <td>12.8<\/td>\n      <td>12.02<\/td>\n      <td>32.98<\/td>\n      <td>32.98<\/td>\n      <td>52<\/td>\n      <td>52<\/td>\n    <\/tr>\n    <tr>\n      <th scope=\"row\">2 processes<\/th>\n      <td>23.4<\/td>\n      <td>20.9<\/td>\n      <td>60.89<\/td>\n      <td>53.63<\/td>\n      <td>86.1<\/td>\n      <td>101.8<\/td>\n    <\/tr>\n    <tr>\n      <th scope=\"row\">4 processes<\/th>\n      <td>42.4<\/td>\n      <td>31.97<\/td>\n      <td>105.26<\/td>\n      <td>76.23<\/td>\n      <td>97.6<\/td>\n      <td>145.9<\/td>\n    <\/tr>\n    <tr>\n      <th scope=\"row\">8 processes<\/th>\n      <td>72.5<\/td>\n      <td>48.1<\/td>\n      <td>138.5<\/td>\n      <td>97.72<\/td>\n      <td>113<\/td>\n      <td>151<\/td>\n    <\/tr>\n<\/table>\n\n<img src=misc/mpi_fps.png width=\"600\">\n\nWeb User Interface\n----\nWhen running Gibson, you can start a web user interface with `python gibson/utils/web_ui.py python gibson/utils/web_ui.py 5552`. This is helpful when you cannot physically access the machine running gibson or you are running on a headless cloud environment. You need to change `mode` in configuration file to `web_ui` to use the web user interface.\n\n<img src=misc/web_ui.png width=\"600\">\n\nRendering Semantics\n----\n<img src=misc/instance_colorcoding_semantics.png width=\"600\">\n\nGibson can provide pixel-wise frame-by-frame semantic masks when the model is semantically annotated. As of now we have incorporated models from [Stanford 2D-3D-Semantics Dataset](http://buildingparser.stanford.edu/) and [Matterport 3D](https://niessner.github.io/Matterport/) for this purpose. You can access them within Gibson [here](https://github.com/StanfordVL/GibsonEnv/blob/master/gibson/data/README.md#download-gibson-database-of-spaces). We refer you to the original dataset's reference for the list of their semantic classes and annotations. \n\nFor detailed instructions of rendering semantics in Gibson, see [semantic instructions](gibson/utils/semantics.md). As one example in the starter dataset that comes with installation, `space7` includes Stanford 2D-3D-Semantics style annotation. \n\n<!---\n**Agreement**: If you choose to use the models from [Stanford 2D3DS](http://3dsemantics.stanford.edu/) or [Matterport 3D](https://niessner.github.io/Matterport/) for rendering semantics, please sign their respective license agreements. Stanford 2D3DS's agreement is inclued in Gibson Database's agreement and does not need to be signed again. For Matterport3D, please see [here](https://niessner.github.io/Matterport/).\n--->\n\nRobotic Agents\n----\n\nGibson provides a base set of agents. See videos of these agents and their corresponding perceptual observation [here](http://gibsonenv.stanford.edu/agents/). \n<img src=misc/agents.gif>\n\nTo enable (optionally) abstracting away low-level control and robot dynamics for high-level tasks, we also provide a set of practical and ideal controllers for each agent.\n\n| Agent Name     | DOF | Information      | Controller |\n|:-------------: | :-------------: |:-------------: |:-------------| \n| Mujoco Ant      | 8   | [OpenAI Link](https://blog.openai.com/roboschool/) | Torque |\n| Mujoco Humanoid | 17  | [OpenAI Link](https://blog.openai.com/roboschool/) | Torque |\n| Husky Robot     | 4   | [ROS](http://wiki.ros.org/Robots/Husky), [Manufacturer](https://www.clearpathrobotics.com/) | Torque, Velocity, Position |\n| Minitaur Robot  | 8   | [Robot Page](https://www.ghostrobotics.io/copy-of-robots), [Manufacturer](https://www.ghostrobotics.io/) | Sine Controller |\n| JackRabbot      | 2   | [Stanford Project Link](http://cvgl.stanford.edu/projects/jackrabbot/) | Torque, Velocity, Position |\n| TurtleBot       | 2   | [ROS](http://wiki.ros.org/Robots/TurtleBot), [Manufacturer](https://www.turtlebot.com/) | Torque, Velocity, Position |\n| Quadrotor         | 6   | [Paper](https://repository.upenn.edu/cgi/viewcontent.cgi?referer=https://www.google.com/&httpsredir=1&article=1705&context=edissertations) | Position |\n\n\n### Starter Code \n\nMore demonstration examples can be found in `examples/demo` folder\n\n| Example        | Explanation          |\n|:-------------: |:-------------| \n|`play_ant_camera.py`|Use 1234567890qwerty keys on your keyboard to control an ant to navigate around Gates building, while RGB and depth camera outputs are also shown. |\n|`play_ant_nonviz.py`| Use 1234567890qwerty keys on your keyboard to control an ant to navigate around Gates building.|\n|`play_drone_camera.py`| Use ASWDZX keys on your keyboard to control a drone to navigate around Gates building, while RGB and depth camera outputs are also shown.|\n|`play_drone_nonviz.py`| Use ASWDZX keys on your keyboard to control a drone to navigate around Gates building|\n|`play_humanoid_camera.py`| Use 1234567890qwertyui keys on your keyboard to control a humanoid to navigate around Gates building. Just kidding, controlling humaniod with keyboard is too difficult, you can only watch it fall. Press R to reset. RGB and depth camera outputs are also shown. |\n|`play_humanoid_nonviz.py`| Watch a humanoid fall. Press R to reset.|\n|`play_husky_camera.py`| Use ASWD keys on your keyboard to control a car to navigate around Gates building, while RGB and depth camera outputs are also shown.|\n|`play_husky_nonviz.py`| Use ASWD keys on your keyboard to control a car to navigate around Gates building|\n\nMore training code can be found in `examples/train` folder.\n\n| Example        | Explanation          |\n|:-------------: |:-------------| \n|`train_husky_navigate_ppo2.py`|   Use PPO2 to train a car to navigate down the hallway in Gates building, using RGBD input from the camera.|\n|`train_husky_navigate_ppo1.py`|   Use PPO1 to train a car to navigate down the hallway in Gates building, using RGBD input from the camera.|\n|`train_ant_navigate_ppo1.py`| Use PPO1 to train an ant to navigate down the hallway in Gates building, using visual input from the camera. |\n|`train_ant_climb_ppo1.py`| Use PPO1 to train an ant to climb down the stairs in Gates building, using visual input from the camera.  |\n|`train_ant_gibson_flagrun_ppo1.py`| Use PPO1 to train an ant to chase a target (a red cube) in Gates building. Everytime the ant gets to target(or time out), the target will change position.|\n|`train_husky_gibson_flagrun_ppo1.py`|Use PPO1 to train a car to chase a target (a red cube) in Gates building. Everytime the car gets to target(or time out), the target will change position. |\n\nROS Configuration\n---------\n\nWe provide examples of configuring Gibson with ROS [here](examples/ros/gibson-ros). We use turtlebot as an example, after a policy is trained in Gibson, it requires minimal changes to deploy onto a turtlebot. See [README](examples/ros/gibson-ros) for more details.\n\n\n\n\nCoding Your RL Agent\n====\nYou can code your RL agent following our convention. The interface with our environment is very simple (see some examples in the end of this section).\n\nFirst, you can create an environment by creating an instance of classes in `gibson/core/envs` folder. \n\n\n```python\nenv = AntNavigateEnv(is_discrete=False, config = config_file)\n```\n\nThen do one step of the simulation with `env.step`. And reset with `env.reset()`\n```python\nobs, rew, env_done, info = env.step(action)\n```\n`obs` gives the observation of the robot. It is a dictionary with each component as a key value pair. Its keys are specified by user inside config file. E.g. `obs['nonviz_sensor']` is proprioceptive sensor data, `obs['rgb_filled']` is rgb camera data.\n\n`rew` is the defined reward. `env_done` marks the end of one episode, for example, when the robot dies. \n`info` gives some additional information of this step; sometimes we use this to pass additional non-visual sensor values.\n\nWe mostly followed [OpenAI gym](https://github.com/openai/gym) convention when designing the interface of RL algorithms and the environment. In order to help users start with the environment quicker, we\nprovide some examples at [examples/train](examples/train). The RL algorithms that we use are from [openAI baselines](https://github.com/openai/baselines) with some adaptation to work with hybrid visual and non-visual sensory data.\nIn particular, we used [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo1) and a speed optimized version of [PPO](https://github.com/openai/baselines/tree/master/baselines/ppo2).\n\n\nEnvironment Configuration\n=================\nEach environment is configured with a `yaml` file. Examples of `yaml` files can be found in `examples/configs` folder. Parameters for the file is explained below. For more informat specific to Bullet Physics engine, you can see the documentation [here](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit).\n\n| Argument name        | Example value           | Explanation  |\n|:-------------:|:-------------:| :-----|\n| envname      | AntClimbEnv | Environment name, make sure it is the same as the class name of the environment |\n| model_id      | space1-space8      |   Scene id, in beta release, choose from space1-space8 |\n| target_orn | [0, 0, 3.14]      |   Eulerian angle (in radian) target orientation for navigating, the reference frame is world frame. For non-navigation tasks, this parameter is ignored. |\n|target_pos | [-7, 2.6, -1.5] | target position (in meter) for navigating, the reference frame is world frame. For non-navigation tasks, this parameter is ignored. |\n|initial_orn | [0, 0, 3.14] | initial orientation (in radian) for navigating, the reference frame is world frame |\n|initial_pos | [-7, 2.6, 0.5] | initial position (in meter) for navigating, the reference frame is world frame|\n|fov | 1.57  | field of view for the camera, in radian |\n| use_filler | true/false  | use neural network filler or not. It is recommended to leave this argument true. See [Gibson Environment website](http://gibson.vision/) for more information. |\n|display_ui | true/false  | Gibson has two ways of showing visual output, either in multiple windows, or aggregate them into a single pygame window. This argument determines whether to show pygame ui or not, if in a production environment (training), you need to turn this off |\n|show_diagnostics | true/false  | show dignostics(including fps, robot position and orientation, accumulated rewards) overlaying on the RGB image |\n|ui_num |2  | how many ui components to show, this should be length of ui_components. |\n| ui_components | [RGB_FILLED, DEPTH]  | which are the ui components, choose from [RGB_FILLED, DEPTH, NORMAL, SEMANTICS, RGB_PREFILLED] |\n|output | [nonviz_sensor, rgb_filled, depth]  | output of the environment to the robot, choose from  [nonviz_sensor, rgb_filled, depth]. These values are independent of `ui_components`, as `ui_components` determines what to show and `output` determines what the robot receives. |\n|resolution | 512 | choose from [128, 256, 512] resolution of rgb/depth image |\n|initial_orn | [0, 0, 3.14] | initial orientation (in radian) for navigating, the reference frame is world frame |\n|speed : timestep | 0.01 | length of one physics simulation step in seconds(as defined in [Bullet](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit)). For example, if timestep=0.01 sec, frameskip=10, and the environment is running at 100fps, it will be 10x real time. Note: setting timestep above 0.1 can cause instability in current version of Bullet simulator since an object should not travel faster than its own radius within one timestep. You can keep timestep at a low value but increase frameskip to simulate at a faster speed. See [Bullet guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit) under \"discrete collision detection\" for more info.|\n|speed : frameskip | 10 | how many timestep to skip when rendering frames. See above row for an example. For tasks that does not require high frequency control, you can set frameskip to larger value to gain further speed up. |\n|mode | gui/headless/web_ui  | gui or headless, if in a production environment (training), you need to turn this to headless. In gui mode, there will be visual output; in headless mode, there will be no visual output. In addition to that, if you set mode to web_ui, it will behave like in headless mode but the visual will be rendered to a web UI server. ([more information](#web-user-interface))|\n|verbose |true/false  | show diagnostics in terminal |\n|fast_lq_render| true/false| if there is fast_lq_render in yaml file, Gibson will use a smaller filler network, this will render faster but generate slightly lower quality camera output. This option is useful for training RL agents fast. |\n\n#### Making Your Customized Environment\nGibson provides a set of methods for you to define your own environments. You can follow the existing environments inside `gibson/core/envs`.\n\n| Method name        | Usage           |\n|:------------------:|:---------------------------|\n| robot.render_observation(pose) | Render new observations based on pose, returns a dictionary. |\n| robot.get_observation() | Get observation at current pose. Needs to be called after robot.render_observation(pose). This does not induce extra computation. |\n| robot.get_position() | Get current robot position. |\n| robot.get_orientation() | Get current robot orientation. |\n| robot.eyes.get_position() | Get current robot perceptive camera position. |\n| robot.eyes.get_orientation() | Get current robot perceptive camera orientation. | \n| robot.get_target_position() | Get robot target position. |\n| robot.apply_action(action) | Apply action to robot. |  \n| robot.reset_new_pose(pos, orn) | Reset the robot to any pose. |\n| robot.dist_to_target() | Get current distance from robot to target. |\n\nGoggles: transferring the agent to real-world\n=================\nGibson includes a baked-in domain adaptation mechanism, named Goggles, for when an agent trained in Gibson is going to be deployed in real-world (i.e. operate based on images coming from an onboard camera). The mechanisms is essentially a learned inverse function that alters the frames coming from a real camera to what they would look like if they were rendered via Gibson, and hence, disolve the domain gap. \n\n<img src=http://gibson.vision/public/img/figure4.jpg width=\"600\">\n\n\n**More details:** With all the imperfections in point cloud rendering, it has been proven difficult to get completely photo-realistic rendering with neural network fixes. The remaining issues make a domain gap between the synthesized and real images. Therefore, we formulate the rendering problem as forming a joint space ensuring a correspondence between rendered and real images, rather than trying to (unsuccessfully) render images that are identical to real ones. This provides a deterministic pathway for traversing across these domains and hence undoing the gap. We add another network \"u\" for target image (I_t) and define the rendering loss to minimize the distance between f(I_s) and u(I_t), where \"f\" and \"I_s\" represent the filler neural network and point cloud rendering output, respectively (see the loss in above figure). We use the same network structure for f and u. The function u(I) is trained to alter the observation in real-world, I_t, to look like the corresponding I_s and consequently dissolve the gap. We named the u network goggles, as it resembles corrective lenses for the agent for deployment in real-world. Detailed formulation and discussion of the mechanism can be found in the paper. You can download the function u and apply it when you deploy your trained agent in real-world.\n\nIn order to use goggle, you will need preferably a camera with depth sensor, we provide an example [here](examples/ros/gibson-ros/goggle.py) for Kinect. The trained goggle functions are stored in `assets/unfiller_{resolution}.pth`, and each one is paired with one filler function. You need to use the correct one depending on which filler function is used. If you don't have a camera with depth sensor, we also provide an example for RGB only [here](examples/demo/goggle_video.py).\n\n\nCitation\n=================\n\nIf you use Gibson Environment's software or database, please cite:\n```\n@inproceedings{xiazamirhe2018gibsonenv,\n  title={Gibson {Env}: real-world perception for embodied agents},\n  author={Xia, Fei and R. Zamir, Amir and He, Zhi-Yang and Sax, Alexander and Malik, Jitendra and Savarese, Silvio},\n  booktitle={Computer Vision and Pattern Recognition (CVPR), 2018 IEEE Conference on},\n  year={2018},\n  organization={IEEE}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"570C:386840:1850F2:5E733D:6AB929FA"},"text_sha256":"e1d6d4322cdda4ae26d357411036e90e8d5ee76ea73511a20ae885ba3b76133d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"eaplatanios/tensorflow_scala","input_row":{"repository":"eaplatanios/tensorflow_scala","url":"https://github.com/eaplatanios/tensorflow_scala","name":"tensorflow_scala","owner":"eaplatanios","description":"TensorFlow API for the Scala Programming Language","language":"Scala","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":937,"issues":146,"created_at":"2017-04-01T18:00:29Z","updated_at":"2026-09-07T07:56:37Z","first_commit_at":"2017-04-01T18:00:29Z","last_commit_at":"2022-06-22T21:50:29Z","activity_months":62.689999999999998,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:43.304Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"eaplatanios/tensorflow_scala","visibility":"public","created_at":"2017-04-01T18:00:29Z","updated_at":"2026-09-07T07:56:37Z","private":false,"fork":false,"archived":false,"stargazers_count":937,"open_issues_count":29,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2773","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A7:71C58:17AC0F1:1BCDF76:6AB929FB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2772","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092D:6C9BF:17F5600:1C17321:6AB929FB"},"commit":{"sha":"67f125c40b3ef7f2ef23486f72793071b1d8e9f6","url":"https://github.com/eaplatanios/tensorflow_scala/commit/67f125c40b3ef7f2ef23486f72793071b1d8e9f6","date":"2018-05-24T07:43:02Z","author_date":"2018-05-24T07:43:02Z","committer_date":"2018-05-24T07:43:02Z","tree_sha":"c6797c1e01abd53581b18a90fc838a43a0812b92","message_first_line":"[JNI] Reverted the GRPC commit."},"tree_request_status":200,"tree_rate":{"github_remaining":"2771","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:180885B:1C2A43E:6AB929FC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8136,"blob_sha":"38d5250c6be4d28cfa3094ab44720c64ad076314","priority":0}],"documents":[{"path":"README.md","size":8136,"blob_sha":"38d5250c6be4d28cfa3094ab44720c64ad076314","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/eaplatanios/tensorflow_scala/master/docs/images/logo.png\"><br>\n<\/div>\n\n-----------------\n\n[![CircleCI](https://img.shields.io/circleci/project/github/eaplatanios/tensorflow_scala.svg?style=flat-square)](https://circleci.com/gh/eaplatanios/tensorflow_scala/tree/master)\n[![Codacy Badge](https://img.shields.io/codacy/grade/7fae7fba84df4831a80bc20c3bd021df.svg?style=flat-square)](https://www.codacy.com/app/eaplatanios/tensorflow_scala?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=eaplatanios/tensorflow_scala&amp;utm_campaign=Badge_Grade)\n[![Chat Room](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/eaplatanios/tensorflow_scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n![License](https://img.shields.io/github/license/eaplatanios/tensorflow_scala.svg?style=flat-square)\n\nThis library is a Scala API for [https://www.tensorflow.org](https://www.tensorflow.org). It attempts to provide most of the functionality provided by the official Python API, while at the same type being strongly-typed and adding some new features. It is a work in progress and a project I started working on for my personal research purposes. Much of the API \nshould be relatively stable by now, but things are still likely to change.\n\nPlease refer to the main website for documentation and tutorials. Here\nare a few useful links:\n\n  - [Installation](https://eaplatanios.github.io/tensorflow_scala/installation.html)\n  - [Getting Started Guide](https://eaplatanios.github.io/tensorflow_scala/getting_started.html)\n  - [Library Architecture](https://eaplatanios.github.io/tensorflow_scala/architecture.html)\n  - [Contributing](https://eaplatanios.github.io/tensorflow_scala/contributing.html)\n\n## Main Features\n\n- Easy manipulation of tensors and computations involving tensors (similar to NumPy in Python):\n  \n  ```scala\n  val t1 = Tensor( 1.2, 4.5)\n  val t2 = Tensor(-0.2, 1.1)\n  t1 + t2 == Tensor(1.0, 5.6)\n  ```\n  \n- High-level API for creating, training, and using neural networks. For example, the following code shows how simple it \n  is to train a multi-layer perceptron for MNIST using TensorFlow for Scala. Here we omit a lot of very powerful \n  features such as summary and checkpoint savers, for simplicity, but these are also very simple to use.\n    \n  ```scala\n  import org.platanios.tensorflow.api._\n  import org.platanios.tensorflow.api.tf.learn._\n  import org.platanios.tensorflow.data.loaders.MNISTLoader\n  \n  // Load and batch data using pre-fetching.\n  val dataSet = MNISTLoader.load(Paths.get(\"/tmp\"))\n  val trainImages = DatasetFromSlices(dataSet.trainImages)\n  val trainLabels = DatasetFromSlices(dataSet.trainLabels)\n  val trainData =\n    trainImages.zip(trainLabels)\n        .repeat()\n        .shuffle(10000)\n        .batch(256)\n        .prefetch(10)\n  \n  // Create the MLP model.\n  val input = Input(UINT8, Shape(-1, 28, 28))\n  val trainInput = Input(UINT8, Shape(-1))\n  val layer = Flatten() >> Cast(FLOAT32) >> \n      Linear(128, name = \"Layer_0\") >> ReLU(0.1f) >>\n      Linear(64, name = \"Layer_1\") >> ReLU(0.1f) >>\n      Linear(32, name = \"Layer_2\") >> ReLU(0.1f) >>\n      Linear(10, name = \"OutputLayer\")\n  val trainingInputLayer = Cast(INT64)\n  val loss = SparseSoftmaxCrossEntropy() >> Mean()\n  val optimizer = GradientDescent(1e-6)\n  val model = Model(input, layer, trainInput, trainingInputLayer, loss, optimizer)\n  \n  // Create an estimator and train the model.\n  val estimator = Estimator(model)\n  estimator.train(trainData, StopCriteria(maxSteps = Some(1000000)))\n  ```\n  \n  And by changing a few lines to the following code, you can get checkpoint capability, summaries, and seamless \n  integration with TensorBoard:\n  \n  ```scala\n  loss = loss >> tf.learn.ScalarSummary(\"Loss\")                  // Collect loss summaries for plotting\n  val summariesDir = Paths.get(\"/tmp/summaries\")                 // Directory in which to save summaries and checkpoints\n  val estimator = Estimator(model, Configuration(Some(summariesDir)))\n  estimator.train(\n    trainData, StopCriteria(maxSteps = Some(1000000)),\n    Seq(\n      SummarySaverHook(summariesDir, StepHookTrigger(100)),      // Save summaries every 1000 steps\n      CheckpointSaverHook(summariesDir, StepHookTrigger(1000))), // Save checkpoint every 1000 steps\n    tensorBoardConfig = TensorBoardConfig(summariesDir))         // Launch TensorBoard server in the background\n  ```\n  \n  If you now browse to `https://127.0.0.1:6006` while training, you can see the training progress:\n  \n  <img src=\"https://eaplatanios.github.io/tensorflow_scala/img/tensorboard_mnist_example_plot.png\" alt=\"tensorboard_mnist_example_plot\" width=\"600px\">\n\n- Low-level graph construction API, similar to that of the Python API, but strongly typed wherever possible:\n\n  ```scala\n  import org.platanios.tensorflow.api._\n  \n  val inputs = tf.placeholder(FLOAT32, Shape(-1, 10))\n  val outputs = tf.placeholder(FLOAT32, Shape(-1, 10))\n  val predictions = tf.createWith(nameScope = \"Linear\") {\n    val weights = tf.variable(\"weights\", FLOAT32, Shape(10, 1), tf.zerosInitializer)\n    tf.matmul(inputs, weights)\n  }\n  val loss = tf.sum(tf.square(predictions - outputs))\n  val optimizer = tf.train.AdaGrad(1.0)\n  val trainOp = optimizer.minimize(loss)\n  ```\n\n- Numpy-like indexing/slicing for tensors. For example:\n  \n  ```scala\n  tensor(2 :: 5, ---, 1) // is equivalent to numpy's 'tensor[2:5, ..., 1]'\n  ```\n  \n- Efficient interaction with the native library that avoids unnecessary copying of data. All tensors are created and \n  managed by the native TensorFlow library. When they are passed to the Scala API (e.g., fetched from a TensorFlow session), we use a combination of weak references and a disposing thread running in the background. Please refer to \n  `tensorflow/src/main/scala/org/platanios/tensorflow/api/utilities/Disposer.scala`, for the implementation.\n\n## Funding\n\nFunding for the development of this library has been generously provided by the following sponsors:\n\n|<img src=\"https://eaplatanios.github.io/tensorflow_scala/img/cmu_logo.svg\" alt=\"cmu_logo\" width=\"200px\" height=\"150px\">|<img src=\"https://eaplatanios.github.io/tensorflow_scala/img/nsf_logo.svg\" alt=\"nsf_logo\" width=\"150px\" height=\"150px\">|<img src=\"https://eaplatanios.github.io/tensorflow_scala/img/afosr_logo.gif\" alt=\"afosr_logo\" width=\"150px\" height=\"150px\">|\n|:---------------------------------------:|:---------------------------------:|:-----------------------------------------------:|\n| **CMU Presidential Fellowship**         | **National Science Foundation**   | **Air Force Office of Scientific Research**     | \n| awarded to Emmanouil Antonios Platanios | Grant #: IIS1250956               | Grant #: FA95501710218                          |\n\nTensorFlow, the TensorFlow logo, and any related marks are trademarks of Google Inc.\n\n<!---\n\n## Supported Features\n\n  - [ ] Session execution context (I'm not sure if that's good to have)\n  - [ ] Session reset functionality\n  - [ ] Variables slicing\n  - [ ] Slice assignment\n  - [x] Support for all data types\n  - [ ] tfdbg / debugging support\n  - [ ] tfprof / op statistics collection\n\n## Some TODOs\n\n- Switch to using JUnit for all tests.\n- Add convenience implicit conversions for shapes (e.g., from tuples or sequences of integers).\n- Create a \"Scope\" class and companion object.\n- Variables API:\n  - Clean up the implementation of variable scopes and stores and integrate it with \"Scope\".\n  - Make 'PartitionedVariable' extend 'Variable'.\n  - After that change, all 'getPartitionedVariable' methods can be integrated with the 'getVariable' methods, which will \n    simplify the variables API.\n- Switch to using \"Seq\" instead of \"Array\" wherever possible.\n- Op creation:\n  - Reset default graph\n  - Register op statistics\n- Fix Travis CI support (somehow load the native library)\n\n- Website margins are a little large relative to the content in mobile\n- Make the code blocks scroll rather than wrap\n\n```bash\nfind . -name '*.h' | cpio -pdmu ../tensorflow_scala/jni/src/main/native/include/\n```\n\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D8A8:1A3D83:18572D:5E7A55:6AB929FD"},"text_sha256":"6552bae162601c5f981f974860a6b000e1d27dc3141f03e15089de28e8c234ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2770","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"532C:6E4BB:17F174A:1C12CAA:6AB929FD"},"commit":{"sha":"39053eefe0859bde4c48c8da20212d6919deb38e","url":"https://github.com/eaplatanios/tensorflow_scala/commit/39053eefe0859bde4c48c8da20212d6919deb38e","date":"2022-06-22T21:50:29Z","author_date":"2022-06-22T21:50:29Z","committer_date":"2022-06-22T21:50:29Z","tree_sha":"ace3692589da2c5bc4ce5a8c2f8d7d5a727066f7","message_first_line":"Setting version to 0.6.6-SNAPSHOT"},"tree_request_status":200,"tree_rate":{"github_remaining":"2769","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D1:0BA1:D7BB61:FD83D0:6AB929FE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11885,"blob_sha":"1ad3e2b453b8996a2677bb6edf64ffe3f323315b","priority":0}],"documents":[{"path":"README.md","size":11885,"blob_sha":"1ad3e2b453b8996a2677bb6edf64ffe3f323315b","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/eaplatanios/tensorflow_scala/master/docs/images/logo.svg?sanitize=true\" width=\"350px\" height=\"242px\"><br>\n<\/div>\n\n-----------------\n\n[![CircleCI](https://img.shields.io/circleci/project/github/eaplatanios/tensorflow_scala.svg?style=flat-square)](https://circleci.com/gh/eaplatanios/tensorflow_scala/tree/master)\n[![Codacy Badge](https://img.shields.io/codacy/grade/7fae7fba84df4831a80bc20c3bd021df.svg?style=flat-square)](https://www.codacy.com/app/eaplatanios/tensorflow_scala?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=eaplatanios/tensorflow_scala&amp;utm_campaign=Badge_Grade)\n![License](https://img.shields.io/github/license/eaplatanios/tensorflow_scala.svg?style=flat-square)\n[![API Docs](https://img.shields.io/badge/docs-api-lightgrey.svg?longCache=true&style=flat-square&logo=read-the-docs&logoColor=white)](http://platanios.org/tensorflow_scala/api/api)\n[![JNI Docs](https://img.shields.io/badge/docs-jni-lightgrey.svg?longCache=true&style=flat-square&logo=read-the-docs&logoColor=white)](http://platanios.org/tensorflow_scala/api/jni)\n[![Data Docs](https://img.shields.io/badge/docs-data-lightgrey.svg?longCache=true&style=flat-square&logo=read-the-docs&logoColor=white)](http://platanios.org/tensorflow_scala/api/data)\n[![Examples Docs](https://img.shields.io/badge/docs-examples-lightgrey.svg?longCache=true&style=flat-square&logo=read-the-docs&logoColor=white)](http://platanios.org/tensorflow_scala/api/examples)\n\nThis library is a Scala API for [https://www.tensorflow.org](https://www.tensorflow.org). It attempts to provide most of\nthe functionality provided by the official Python API, while at the same type being strongly-typed and adding some new\nfeatures. It is a work in progress and a project I started working on for my personal research purposes. Much of the API\nshould be relatively stable by now, but things are still likely to change.\n\n[![Chat Room](https://img.shields.io/badge/chat-gitter-ed1965.svg?longCache=true&style=flat-square&logo=gitter)](https://gitter.im/eaplatanios/tensorflow_scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nPlease refer to the main website for documentation and tutorials. Here\nare a few useful links:\n\n  - [Installation](https://eaplatanios.github.io/tensorflow_scala/installation.html)\n  - [Getting Started Guide](https://eaplatanios.github.io/tensorflow_scala/getting_started.html)\n  - [Library Architecture](https://eaplatanios.github.io/tensorflow_scala/architecture.html)\n  - [Contributing](https://eaplatanios.github.io/tensorflow_scala/contributing.html)\n\n## Citation\n\nIt would be greatly appreciated if you could cite this project using the following BibTex entry, if you end up using it\nin your work:\n\n```bibtex\n@misc{Platanios:2018:tensorflow-scala,\n  title        = {{TensorFlow Scala}},\n  author       = {Platanios, Emmanouil Antonios},\n  howpublished = {\\url{https://github.com/eaplatanios/tensorflow_scala}},\n  year         = {2018}\n}\n```\n\n## Main Features\n\n  - Easy manipulation of tensors and computations involving tensors (similar to NumPy in Python):\n\n    ```scala\n    val t1 = Tensor(1.2, 4.5)\n    val t2 = Tensor(-0.2, 1.1)\n    t1 + t2 == Tensor(1.0, 5.6)\n    ```\n\n  - Low-level graph construction API, similar to that of the Python API, but strongly typed wherever possible:\n\n    ```scala\n    val inputs      = tf.placeholder[Float](Shape(-1, 10))\n    val outputs     = tf.placeholder[Float](Shape(-1, 10))\n    val predictions = tf.nameScope(\"Linear\") {\n      val weights = tf.variable[Float](\"weights\", Shape(10, 1), tf.ZerosInitializer)\n      tf.matmul(inputs, weights)\n    }\n    val loss        = tf.sum(tf.square(predictions - outputs))\n    val optimizer   = tf.train.AdaGrad(1.0f)\n    val trainOp     = optimizer.minimize(loss)\n    ```\n\n  - Numpy-like indexing/slicing for tensors. For example:\n\n    ```scala\n    tensor(2 :: 5, ---, 1) // is equivalent to numpy's 'tensor[2:5, ..., 1]'\n    ```\n\n  - High-level API for creating, training, and using neural networks. For example, the following code shows how simple it\n    is to train a multi-layer perceptron for MNIST using TensorFlow for Scala. Here we omit a lot of very powerful\n    features such as summary and checkpoint savers, for simplicity, but these are also very simple to use.\n\n    ```scala\n    // Load and batch data using pre-fetching.\n    val dataset = MNISTLoader.load(Paths.get(\"/tmp\"))\n    val trainImages = tf.data.datasetFromTensorSlices(dataset.trainImages.toFloat)\n    val trainLabels = tf.data.datasetFromTensorSlices(dataset.trainLabels.toLong)\n    val trainData =\n      trainImages.zip(trainLabels)\n          .repeat()\n          .shuffle(10000)\n          .batch(256)\n          .prefetch(10)\n\n    // Create the MLP model.\n    val input = Input(FLOAT32, Shape(-1, 28, 28))\n    val trainInput = Input(INT64, Shape(-1))\n    val layer = Flatten[Float](\"Input/Flatten\") >>\n        Linear[Float](\"Layer_0\", 128) >> ReLU[Float](\"Layer_0/Activation\", 0.1f) >>\n        Linear[Float](\"Layer_1\", 64) >> ReLU[Float](\"Layer_1/Activation\", 0.1f) >>\n        Linear[Float](\"Layer_2\", 32) >> ReLU[Float](\"Layer_2/Activation\", 0.1f) >>\n        Linear[Float](\"OutputLayer\", 10)\n    val loss = SparseSoftmaxCrossEntropy[Float, Long, Float](\"Loss\") >>\n        Mean(\"Loss/Mean\")\n    val optimizer = tf.train.GradientDescent(1e-6f)\n    val model = Model.simpleSupervised(input, trainInput, layer, loss, optimizer)\n\n    // Create an estimator and train the model.\n    val estimator = InMemoryEstimator(model)\n    estimator.train(() => trainData, StopCriteria(maxSteps = Some(1000000)))\n    ```\n\n    And by changing a few lines to the following code, you can get checkpoint capability, summaries, and seamless\n    integration with TensorBoard:\n\n    ```scala\n    val loss = SparseSoftmaxCrossEntropy[Float, Long, Float](\"Loss\") >>\n        Mean(\"Loss/Mean\") >>\n        ScalarSummary(name = \"Loss\", tag = \"Loss\")\n    val summariesDir = Paths.get(\"/tmp/summaries\")\n    val estimator = InMemoryEstimator(\n      modelFunction = model,\n      configurationBase = Configuration(Some(summariesDir)),\n      trainHooks = Set(\n        SummarySaver(summariesDir, StepHookTrigger(100)),\n        CheckpointSaver(summariesDir, StepHookTrigger(1000))),\n      tensorBoardConfig = TensorBoardConfig(summariesDir))\n    estimator.train(() => trainData, StopCriteria(maxSteps = Some(100000)))\n    ```\n\n    If you now browse to `https://127.0.0.1:6006` while training, you can see the training progress:\n\n    <img src=\"https://platanios.org/tensorflow_scala/assets/images/tensorboard_mnist_example_plot.png\" alt=\"tensorboard_mnist_example_plot\" width=\"600px\">\n\n  - Efficient interaction with the native library that avoids unnecessary copying of data. All tensors are created and\n    managed by the native TensorFlow library. When they are passed to the Scala API (e.g., fetched from a TensorFlow\n    session), we use a combination of weak references and a disposing thread running in the background. Please refer to\n    `tensorflow/src/main/scala/org/platanios/tensorflow/api/utilities/Disposer.scala`, for the implementation.\n\n## Compiling from Source\n\nNote that in order to compile TensorFlow Scala on your\nmachine you will need to first install the TensorFlow\nPython API. You also need to make sure that you have a\n`python3` alias for your python binary. This is used by\nCMake to find the TensorFlow header files in your\ninstallation.\n\n## Tutorials\n\n- [Object Detection using Pre-Trained Models](https://brunk.io/deep-learning-in-scala-part-3-object-detection.html)\n\n## Funding\n\nFunding for the development of this library has been generously provided by the following sponsors:\n\n|<img src=\"https://platanios.org/tensorflow_scala/assets/images/cmu_logo.svg\" alt=\"cmu_logo\" width=\"200px\" height=\"150px\">|<img src=\"https://platanios.org/tensorflow_scala/assets/images/nsf_logo.svg\" alt=\"nsf_logo\" width=\"150px\" height=\"150px\">|<img src=\"https://platanios.org/tensorflow_scala/assets/images/afosr_logo.gif\" alt=\"afosr_logo\" width=\"150px\" height=\"150px\">|\n|:---------------------------------------:|:---------------------------------:|:-----------------------------------------------:|\n| **CMU Presidential Fellowship**         | **National Science Foundation**   | **Air Force Office of Scientific Research**     | \n| awarded to Emmanouil Antonios Platanios | Grant #: IIS1250956               | Grant #: FA95501710218                          |\n\nTensorFlow, the TensorFlow logo, and any related marks are trademarks of Google Inc.\n\n<!---\n\n## Some TODOs\n\n  - [ ] Figure out what the proper to way to handle Int vs Long shapes is, so that we can use Long shapes without hurting GPU performance.\n  - [ ] Make the optimizers typed (with respect to their state, at least).\n  - [ ] Make the gradients function retain types (we need a type trait for that).\n  - [ ] Dispose dataset iterators automatically.\n  - [ ] Fixed all `[TYPE] !!!` code TODOs.\n\n  - [ ] Session execution context (I'm not sure if that's good to have)\n  - [ ] Session reset functionality\n  - [ ] Variables slicing\n  - [ ] Slice assignment\n  - [ ] Support for `CriticalSection`.\n  - [ ] tfdbg / debugging support\n  - [ ] tfprof / op statistics collection\n\n  - Switch to using JUnit for all tests.\n  - Add convenience implicit conversions for shapes (e.g., from tuples or sequences of integers).\n  - Create a \"Scope\" class and companion object.\n  - Variables API:\n    - Clean up the implementation of variable scopes and stores and integrate it with \"Scope\".\n    - Make 'PartitionedVariable' extend 'Variable'.\n    - After that change, all 'getPartitionedVariable' methods can be integrated with the 'getVariable' methods, which will\n      simplify the variables API.\n  - Switch to using \"Seq\" instead of \"Array\" wherever possible.\n  - Op creation:\n    - Reset default graph\n    - Register op statistics\n  - Fix Travis CI support (somehow load the native library)\n\n- Website margins are a little large relative to the content in mobile\n- Make the code blocks scroll rather than wrap\n\nTo publish a signed snapshot version of the package that is \ncross-compiled, we use the following commands from within\nan SBT shell:\n\n```sbt\nset nativeCrossCompilationEnabled in jni := true\npublishSigned\n```\n\nYou can also test cross-compilation using the following\ncommand:\n\n```bash\nsbt jni/cross:nativeCrossCompile\n```\n\nCUDA Compute Capabilities: 3.5,7.0,7.5,8.0,8.6\n\nCompile the TensorFlow dynamic libraries from source using:\n\n```bash\nbazel build --config=opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow.so\n```\n\nOn Ubuntu 18.04 you may get some linking errors, in which case you should use:\n\n```bash\nbazel build --config=opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --noincompatible_do_not_split_linking_cmdline //tensorflow:libtensorflow.so\n```\n\nOn Windows you may get some CUDA-related errors, in which case you should use:\n\n```cmd\nbazel build --config=opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --define=no_tensorflow_py_deps=true --copt=-DTHRUST_IGNORE_CUB_VERSION_CHECK --copt=-nvcc_options=disable-warnings //tensorflow:tensorflow.lib //tensorflow:tensorflow_framework.lib\n```\n\nFor Mac we also need to deal with this currently:\n\n```bash\ninstall_name_tool -id @rpath/libtensorflow.2.dylib libtensorflow.2.4.0.dylib\ninstall_name_tool -change @rpath/libtensorflow.so.2 @rpath/libtensorflow.2.dylib libtensorflow_framework.2.4.0.dylib\n```\n\nTo publish the documentation website we use the following commands:\n\n```bash\nsbt docs/previewSite     # To preview the website\nsbt docs/ghpagesPushSite # To publish the website\n```\n\nTo prepare the precompiled TensorFlow binary packages, use the following commands:\n\n```bash\nmkdir lib\ncp -av /usr/local/lib/libtensorflow* lib/\ntar -zcvf libtensorflow-2.2.0-cpu-darwin-x86_64.tar.gz lib\ntar -ztvf libtensorflow-2.2.0-cpu-darwin-x86_64.tar.gz\n```\n\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B2FC:3B7E2:17051D:5D28E7:6AB929EE"},"text_sha256":"613d0e759de43510831bd72b68a64377710292a402e0fd685e311bc963d628b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/compression","input_row":{"repository":"tensorflow/compression","url":"https://github.com/tensorflow/compression","name":"compression","owner":"tensorflow","description":"Data compression in TensorFlow","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":922,"issues":102,"created_at":"2018-05-15T23:32:19Z","updated_at":"2026-09-23T16:43:32Z","first_commit_at":"2018-05-16T00:10:03Z","last_commit_at":"2026-04-17T20:05:03Z","activity_months":95.069999999999993,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:47.315Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/compression","visibility":"public","created_at":"2018-05-15T23:32:19Z","updated_at":"2026-09-23T16:43:32Z","private":false,"fork":false,"archived":false,"stargazers_count":922,"open_issues_count":10,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2768","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17CB753:1BED749:6AB929FF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2767","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"52EA:278AC2:1856C0B:1C78B62:6AB929FF"},"commit":{"sha":"bb7f451dda7aa6fade5c1d08c5825344f2895e54","url":"https://github.com/tensorflow/compression/commit/bb7f451dda7aa6fade5c1d08c5825344f2895e54","date":"2018-05-24T01:10:51Z","author_date":"2018-05-24T01:10:51Z","committer_date":"2018-05-24T01:10:51Z","tree_sha":"21dad01e11489307d6aebf3da73b93022a268ab3","message_first_line":"Small fix for the EntropyBottleneck example."},"tree_request_status":200,"tree_rate":{"github_remaining":"2766","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"5363:E80A6:179D1B2:1BBF013:6AB92A00"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10525,"blob_sha":"9bc44c3e2548394d52de61ee87a188a21227b5b2","priority":0}],"documents":[{"path":"README.md","size":10525,"blob_sha":"9bc44c3e2548394d52de61ee87a188a21227b5b2","priority":0,"status":200,"text":"# TensorFlow data compression library\n\nThis package contains data compression ops and layers for TensorFlow.\n\nFor usage questions and discussions, please head over to our\n[Google group](https://groups.google.com/forum/#!forum/tensorflow-compression)!\n\n## Compiling\n\n**Please note**: You need TensorFlow 1.9 (or the master branch as of May 2018)\nor later.\n\nFirst, compile the custom ops needed by TensorFlow.\n```shell\ncd compression\nchmod +x compile.sh\n./compile.sh\ncd ..\n```\n\nTo make sure the compilation and library imports succeed, try running the two\ntests.\n```\npython compression/python/ops/coder_ops_test.py\npython compression/python/layers/entropybottleneck_test.py\n```\n\n## Entropy bottleneck layer\n\nThis layer exposes a high-level interface to model the entropy (the amount of\ninformation conveyed) of the tensor passing through it. During training, this\ncan be use to impose a (soft) entropy constraint on its activations, limiting\nthe amount of information flowing through the layer. Note that this is distinct\nfrom other types of bottlenecks, which reduce the dimensionality of the space,\nfor example. Dimensionality reduction does not limit the amount of information,\nand does not enable efficient data compression per se.\n\nAfter training, this layer can be used to compress any input tensor to a string,\nwhich may be written to a file, and to decompress a file which it previously\ngenerated back to a reconstructed tensor (possibly on a different machine having\naccess to the same model checkpoint). For this, it uses the range coder\ndocumented in the next section. The entropies estimated during training or\nevaluation are approximately equal to the average length of the strings in bits.\n\nThe layer implements a flexible probability density model to estimate entropy,\nwhich is described in the appendix of the paper (please cite the paper if you\nuse this code for scientific work):\n\n> J. Ballé, D. Minnen, S. Singh, S. J. Hwang, N. Johnston:\n> \"Variational image compression with a scale hyperprior\"\n> https://arxiv.org/abs/1802.01436\n\nThe layer assumes that the input tensor is at least 2D, with a batch dimension\nat the beginning and a channel dimension as specified by `data_format`. The\nlayer trains an independent probability density model for each channel, but\nassumes that across all other dimensions, the inputs are i.i.d. (independent and\nidentically distributed). Because the entropy (and hence, average codelength) is\na function of the densities, this assumption may have a direct effect on the\ncompression performance.\n\nBecause data compression always involves discretization, the outputs of the\nlayer are generally only approximations of its inputs. During training,\ndiscretization is modeled using additive uniform noise to ensure\ndifferentiability. The entropies computed during training are differential\nentropies. During evaluation, the data is actually quantized, and the\nentropies are discrete (Shannon entropies). To make sure the approximated\ntensor values are good enough for practical purposes, the training phase must\nbe used to balance the quality of the approximation with the entropy, by\nadding an entropy term to the training loss, as in the following example.\n\n### Training\n\nHere, we use the entropy bottleneck to compress the latent representation of\nan autoencoder. The data vectors `x` in this case are 4D tensors in\n`'channels_last'` format (for example, 16x16 pixel grayscale images).\n\nNote that `forward_transform` and `backward_transform` are placeholders and can\nbe any appropriate artifical neural network. We've found that it generally helps\n*not* to use batch normalization, and to sandwich the bottleneck between two\nlinear transforms or convolutions (i.e. to have no nonlinearities directly\nbefore and after).\n\n```python\n# Build autoencoder.\nx = tf.placeholder(tf.float32, shape=[None, 16, 16, 1])\ny = forward_transform(x)\nentropy_bottleneck = EntropyBottleneck()\ny_, likelihoods = entropy_bottleneck(y, training=True)\nx_ = backward_transform(y_)\n\n# Information content (= predicted codelength) in bits of each batch element\n# (note that taking the natural logarithm and dividing by `log(2)` is\n# equivalent to taking base-2 logarithms):\nbits = tf.reduce_sum(tf.log(likelihoods), axis=(1, 2, 3)) / -np.log(2)\n\n# Squared difference of each batch element:\nsquared_error = tf.reduce_sum(tf.squared_difference(x, x_), axis=(1, 2, 3))\n\n# The loss is a weighted sum of mean squared error and entropy (average\n# information content), where the weight controls the trade-off between\n# approximation error and entropy.\nmain_loss = 0.5 * tf.reduce_mean(squared_error) + tf.reduce_mean(bits)\n\n# Minimize loss and auxiliary loss, and execute update op.\nmain_optimizer = tf.train.AdamOptimizer(learning_rate=1e-4)\nmain_step = optimizer.minimize(main_loss)\n# 1e-3 is a good starting point for the learning rate of the auxiliary loss,\n# assuming Adam is used.\naux_optimizer = tf.train.AdamOptimizer(learning_rate=1e-3)\naux_step = aux_optimizer.minimize(entropy_bottleneck.losses[0])\nstep = tf.group(main_step, aux_step, entropy_bottleneck.updates[0])\n```\n\nNote that the layer always produces exactly one auxiliary loss and one update\nop, which are only significant for compression and decompression. To use the\ncompression feature, the auxiliary loss must be minimized during or after\ntraining. After that, the update op must be executed at least once. Here, we\nsimply attach them to the main training step.\n\n### Evaluation\n\n```python\n# Build autoencoder.\nx = tf.placeholder(tf.float32, shape=[None, 16, 16, 1])\ny = forward_transform(x)\ny_, likelihoods = EntropyBottleneck()(y, training=False)\nx_ = backward_transform(y_)\n\n# Information content (= predicted codelength) in bits of each batch element:\nbits = tf.reduce_sum(tf.log(likelihoods), axis=(1, 2, 3)) / -np.log(2)\n\n# Squared difference of each batch element:\nsquared_error = tf.reduce_sum(tf.squared_difference(x, x_), axis=(1, 2, 3))\n\n# The loss is a weighted sum of mean squared error and entropy (average\n# information content), where the weight controls the trade-off between\n# approximation error and entropy.\nloss = 0.5 * tf.reduce_mean(squared_error) + tf.reduce_mean(bits)\n```\n\nTo be able to compress the bottleneck tensor and decompress it in a different\nsession, or on a different machine, you need three items:\n\n- The compressed representations stored as strings.\n- The shape of the bottleneck for these string representations as a `Tensor`,\n  as well as the number of channels of the bottleneck at graph construction\n  time.\n- The checkpoint of the trained model that was used for compression. Note:\n  It is crucial that the auxiliary loss produced by this layer is minimized\n  during or after training, and that the update op is run after training and\n  minimization of the auxiliary loss, but *before* the checkpoint is saved.\n\n### Compression\n\n```python\nx = tf.placeholder(tf.float32, shape=[None, 16, 16, 1])\ny = forward_transform(x)\nstrings = EntropyBottleneck().compress(y)\nshape = tf.shape(y)[1:]\n```\n\n### Decompression\n\n```python\nstrings = tf.placeholder(tf.string, shape=[None])\nshape = tf.placeholder(tf.int32, shape=[3])\nentropy_bottleneck = EntropyBottleneck(dtype=tf.float32)\ny_ = entropy_bottleneck.decompress(strings, shape, channels=5)\nx_ = backward_transform(y_)\n```\nHere, we assumed that the tensor produced by the forward transform has 5\nchannels.\n\nThe above four use cases can also be implemented within the same session (i.e.\non the same `EntropyBottleneck` instance), for testing purposes, etc., by\ncalling the object more than once.\n\n\n## Range encoder and decoder\n\nThis package contains a range encoder and a range decoder, which can encode\ninteger data into strings using cumulative distribution functions (CDF). It is\nused by the higher-level entropy bottleneck class described in the previous\nsection.\n\n### Data and CDF values\n\nThe data to be encoded should be non-negative integers in half-open interval\n`[0, m)`. Then a CDF is represented as an integral vector of length `m + 1`\nwhere `CDF(i) = f(Pr(X < i) * 2^precision)` for i = 0,1,...,m, and `precision`\nis an attribute in range `0 < precision <= 16`. The function `f` maps real\nvalues into integers, e.g., round or floor. It is important that to encode a\nnumber `i`, `CDF(i + 1) - CDF(i)` cannot be zero.\n\nNote that we used `Pr(X < i)` not `Pr(X <= i)`, and therefore CDF(0) = 0 always.\n\n### RangeEncode: data shapes and CDF shapes\n\nFor each data element, its CDF has to be provided. Therefore if the shape of CDF\nshould be `data.shape + (m + 1,)` in NumPy-like notation. For example, if `data`\nis a 2-D tensor of shape (10, 10) and its elements are in `[0, 64)`, then the\nCDF tensor should have shape (10, 10, 65).\n\nThis may make CDF tensor too large, and in many applications all data elements\nmay have the same probability distribution. To handle this, `RangeEncode`\nsupports limited broadcasting CDF into data. Broadcasting is limited in the\nfollowing sense:\n\n- All CDF axes but the last one is broadcasted into data but not the other way\n  around,\n- The number of CDF axes does not extend, i.e., `CDF.ndim == data.ndim + 1`.\n\nIn the previous example where data has shape (10, 10), the following are\nacceptable CDF shapes:\n\n- (10, 10, 65)\n- (1, 10, 65)\n- (10, 1, 65)\n- (1, 1, 65)\n\n### RangeDecode\n\n`RangeEncode` encodes neither data shape nor termination character. Therefore\nthe decoder should know how many characters are encoded into the string, and\n`RangeDecode` takes the encoded data shape as the second argument. The same\nshape restrictions as `RangeEncode` inputs apply here.\n\n### Example\n\n```python\ndata = tf.random_uniform((128, 128), 0, 10, dtype=tf.int32)\n\nhistogram = tf.bincount(data, minlength=10, maxlength=10)\ncdf = tf.cumsum(histogram, exclusive=False)\n# CDF should have length m + 1.\ncdf = tf.pad(cdf, [[1, 0]])\n# CDF axis count must be one more than data.\ncdf = tf.reshape(cdf, [1, 1, -1])\n\n# Note that data has 2^14 elements, and therefore the sum of CDF is 2^14.\ndata = tf.cast(data, tf.int16)\nencoded = coder.range_encode(data, cdf, precision=14)\ndecoded = coder.range_decode(encoded, tf.shape(data), cdf, precision=14)\n\n# data and decoded should be the same.\nsess = tf.Session()\nx, y = sess.run((data, decoded))\nassert np.all(x == y)\n```\n\n## Authors\nJohannes Ballé (github: [jonycgn](https://github.com/jonycgn)),\nSung Jin Hwang (github: [ssjhv](https://github.com/ssjhv)), and\nNick Johnston (github: [nmjohn](https://github.com/nmjohn))\n\nNote that this is not an officially supported Google product.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BCD8:1F1FB6:17C5F4:5DE830:6AB929FF"},"text_sha256":"82b0c3b48b40857e074e5294ee3b11b737bfef9cec6b5627c4de1659f2c52c22"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2765","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53D4:767EB:17E8157:1C0A3D8:6AB92A01"},"commit":{"sha":"dda8cb4c4364e657d13491227e886ff8014f7243","url":"https://github.com/tensorflow/compression/commit/dda8cb4c4364e657d13491227e886ff8014f7243","date":"2026-04-17T20:05:03Z","author_date":"2026-04-16T23:05:40Z","committer_date":"2026-04-17T20:05:03Z","tree_sha":"5ef76624ea370dc2e57eb82e1f58aa05f7f99325","message_first_line":"No public description"},"tree_request_status":200,"tree_rate":{"github_remaining":"2764","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53DD:228A99:17DD3FC:1BFF17B:6AB92A01"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14041,"blob_sha":"cd6ac871c288144ce87195f02321591eb90c25ff","priority":0}],"documents":[{"path":"README.md","size":14041,"blob_sha":"cd6ac871c288144ce87195f02321591eb90c25ff","priority":0,"status":200,"text":"# TensorFlow Compression\n\nTensorFlow Compression (TFC) contains data compression tools for TensorFlow.\n\nYou can use this library to build your own ML models with end-to-end optimized\ndata compression built in. It's useful to find storage-efficient representations\nof your data (images, features, examples, etc.) while only sacrificing a small\nfraction of model performance. Take a look at the [lossy data compression\ntutorial](https://www.tensorflow.org/tutorials/generative/data_compression) or\nthe [model compression\ntutorial](https://www.tensorflow.org/tutorials/optimization/compression) to get\nstarted.\n\nFor a more in-depth introduction from a classical data compression perspective,\nconsider our [paper on nonlinear transform\ncoding](https://arxiv.org/abs/2007.03034), or watch @jonarchists's [talk on\nlearned image compression](https://www.youtube.com/watch?v=x_q7cZviXkY). For an\nintroduction to lossy data compression from a machine learning perspective, take\na look at @yiboyang's [review paper](https://arxiv.org/abs/2202.06533).\n\nThe library contains (see the [API\ndocs](https://www.tensorflow.org/api_docs/python/tfc) for details):\n\n- Range coding (a.k.a. arithmetic coding) implementations in the form of\n  flexible TF ops written in C++. These include an optional \"overflow\"\n  functionality that embeds an Elias gamma code into the range encoded bit\n  sequence, making it possible to encode alphabets containing the entire set of\n  signed integers rather than just a finite range.\n\n- Entropy model classes which simplify the process of designing rate–distortion\n  optimized codes. During training, they act like likelihood models. Once\n  training is completed, they encode floating point tensors into optimized bit\n  sequences by automating the design of range coding tables and calling the\n  range coder implementation behind the scenes.\n\n- Additional TensorFlow functions and Keras layers that are useful in the\n  context of learned data compression, such as methods to numerically find\n  quantiles of density functions, take expectations with respect to dithering\n  noise, convolution layers with more flexible padding options and support for\n  reparameterizing kernels and biases in the Fourier domain, and an\n  implementation of generalized divisive normalization (GDN).\n\n**Important update:** As of February 1, 2024, TensorFlow Compression is in\nmaintenance mode. This means concretely:\n\n- The full feature set of TFC is frozen. No new features will be developed, but\n  the repository will receive maintenance fixes.\n\n- Going forward, new TFC packages will only work with TensorFlow 2.14. This is\n  due to an incompatibility introduced in the Keras version shipped with TF\n  2.15, which would require a rewrite of our layer and entropy model classes.\n\n- To ensure existing models can still be run with TF 2.15 and later, we are\n  releasing a new package\n  [tensorflow-compression-ops](https://github.com/tensorflow/compression/tree/master/tensorflow_compression_ops),\n  which only contains the C++ ops. These will be updated as long as possible for\n  newer TF versions.\n\n  - UPDATE: Due to technical challenges in maintaining C++ custom ops with newer\n    TensorFlow releases, TF 2.18 will be the last version supported by\n    `tensorflow-compression-ops`.\n\n- Binary packages are provided for both options on pypi.org:\n  [TFC](https://pypi.org/project/tensorflow-compression/) and\n  [TFC ops](https://pypi.org/project/tensorflow-compression-ops/).\n\n\n## Documentation & getting help\n\nRefer to [the API documentation](https://www.tensorflow.org/api_docs/python/tfc)\nfor a complete description of the classes and functions this package implements.\n\nPlease post all questions or comments on\n[Discussions](https://github.com/tensorflow/compression/discussions). Only file\n[Issues](https://github.com/tensorflow/compression/issues) for actual bugs or\nfeature requests. On Discussions, you may get a faster answer, and you help\nother people find the question or answer more easily later.\n\n## Installation\n\n***Note: Precompiled packages are currently only provided for Linux and\nDarwin/Mac OS. To use these packages on Windows, consider installing TensorFlow\nusing the [instructions for\nWSL2](https://www.tensorflow.org/install/pip#windows_1) or using a [TensorFlow\nDocker image](https://www.tensorflow.org/install/docker), and then installing\nthe Linux package.***\n\nSet up an environment in which you can install precompiled binary Python\npackages using the `pip` command. Refer to the\n[TensorFlow installation instructions](https://www.tensorflow.org/install/pip)\nfor more information on how to set up such a Python environment.\n\nThe current version of TensorFlow Compression requires TensorFlow 2. For\nversions compatible with TensorFlow 1, see our [previous\nreleases](https://github.com/tensorflow/compression/releases).\n\n### pip\n\nTo install TFC via `pip`, run the following command:\n\n```bash\npython -m pip install tensorflow-compression\n```\n\nTo test that the installation works correctly, you can run the unit tests with:\n\n```bash\npython -m tensorflow_compression.all_tests\n```\n\nOnce the command finishes, you should see a message ```OK (skipped=29)``` or\nsimilar in the last line.\n\n### Colab\n\nYou can try out TFC live in a [Colab](https://colab.research.google.com/). The\nfollowing command installs the latest version of TFC that is compatible with the\ninstalled TensorFlow version. Run it in a cell before executing your Python\ncode:\n\n```\n%pip install tensorflow-compression~=$(pip show tensorflow | perl -p -0777 -e 's/.*Version: (\\d+\\.\\d+).*/\\1.0/sg')\n```\n\nNote: The binary packages of TFC are tied to TF with the same minor version\n(e.g., TFC 2.9.1 requires TF 2.9.x), and Colab sometimes lags behind a few days\nin deploying the latest version of TensorFlow. As a result, using `pip install\ntensorflow-compression` naively might attempt to upgrade TF, which can create\nproblems.\n\n### Docker\n\nTo use a Docker container (e.g. on Windows), be sure to install Docker\n(e.g., [Docker Desktop](https://www.docker.com/products/docker-desktop)),\nuse a [TensorFlow Docker image](https://www.tensorflow.org/install/docker),\nand then run the `pip install` command inside the Docker container, not on the\nhost. For instance, you can use a command line like this:\n\n```bash\ndocker run tensorflow/tensorflow:latest bash -c \\\n    \"python -m pip install tensorflow-compression &&\n     python -m tensorflow_compression.all_tests\"\n```\n\nThis will fetch the TensorFlow Docker image if it's not already cached, install\nthe pip package and then run the unit tests to confirm that it works.\n\n### Anaconda\n\nIt seems that [Anaconda](https://www.anaconda.com/distribution/) ships its own\nbinary version of TensorFlow which is incompatible with our pip package. To\nsolve this, always install TensorFlow via `pip` rather than `conda`. For\nexample, this creates an Anaconda environment with CUDA libraries, and then\ninstalls TensorFlow and TensorFlow Compression:\n\n```bash\nconda create --name ENV_NAME python cudatoolkit cudnn\nconda activate ENV_NAME\npython -m pip install tensorflow-compression\n```\n\nDepending on the requirements of the `tensorflow` pip package, you may need to\npin the CUDA libraries to specific versions. If you aren't using a GPU, CUDA is\nof course not necessary.\n\n## Usage\n\nWe recommend importing the library from your Python code as follows:\n\n```python\nimport tensorflow as tf\nimport tensorflow_compression as tfc\n```\n\n### Using a pre-trained model to compress an image\n\nIn the\n[models directory](https://github.com/tensorflow/compression/tree/master/models),\nyou'll find a python script `tfci.py`. Download the file and run:\n\n```bash\npython tfci.py -h\n```\n\nThis will give you a list of options. Briefly, the command\n\n```bash\npython tfci.py compress <model> <PNG file>\n```\n\nwill compress an image using a pre-trained model and write a file ending in\n`.tfci`. Execute `python tfci.py models` to give you a list of supported\npre-trained models. The command\n\n```bash\npython tfci.py decompress <TFCI file>\n```\n\nwill decompress a TFCI file and write a PNG file. By default, an output file\nwill be named like the input file, only with the appropriate file extension\nappended (any existing extensions will not be removed).\n\n### Training your own model\n\nThe\n[models directory](https://github.com/tensorflow/compression/tree/master/models)\ncontains several implementations of published image compression models to enable\neasy experimentation. Note that in order to reproduce published results, more\ntuning of the code and training dataset may be necessary. Use the `tfci.py`\nscript above to access published models.\n\nThe following instructions talk about a re-implementation of the model published\nin:\n\n> \"End-to-end optimized image compression\"<br />\n> J. Ballé, V. Laparra, E. P. Simoncelli<br />\n> https://arxiv.org/abs/1611.01704\n\nNote that the models directory is not contained in the pip package. The models\nare meant to be downloaded individually. Download the file `bls2017.py` and run:\n\n```bash\npython bls2017.py -h\n```\n\nThis will list the available command line options for the implementation.\nTraining can be as simple as the following command:\n\n```bash\npython bls2017.py -V train\n```\n\nThis will use the default settings. Note that unless a custom training dataset\nis provided via `--train_glob`, the\n[CLIC dataset](https://www.tensorflow.org/datasets/catalog/clic) will be\ndownloaded using TensorFlow Datasets.\n\nThe most important training parameter is `--lambda`, which controls the\ntrade-off between bitrate and distortion that the model will be optimized for.\nThe number of channels per layer is important, too: models tuned for higher\nbitrates (or, equivalently, lower distortion) tend to require transforms with a\ngreater approximation capacity (i.e. more channels), so to optimize performance,\nyou want to make sure that the number of channels is large enough (or larger).\nThis is described in more detail in:\n\n> \"Efficient nonlinear transforms for lossy image compression\"<br />\n> J. Ballé<br />\n> https://arxiv.org/abs/1802.00847\n\nIf you wish, you can monitor progress with Tensorboard. To do this, create a\nTensorboard instance in the background before starting the training, then point\nyour web browser to [port 6006 on your machine](http://localhost:6006):\n\n```bash\ntensorboard --logdir=/tmp/train_bls2017 &\n```\n\nWhen training has finished, the Python script saves the trained model to the\ndirectory specified with `--model_path` (by default, `bls2017` in the current\ndirectory) in TensorFlow's `SavedModel` format. The script can then be used to\ncompress and decompress images as follows. The same saved model must be\naccessible to both commands.\n\n```bash\npython bls2017.py [options] compress original.png compressed.tfci\npython bls2017.py [options] decompress compressed.tfci reconstruction.png\n```\n\n## Building pip packages\n\nThis section describes the necessary steps to build your own pip packages of\nTensorFlow Compression. This may be necessary to install it on platforms for\nwhich we don't provide precompiled binaries (currently only Linux and Darwin).\n\nTo be compatible with the official TensorFlow pip package, the TFC pip package\nmust be linked against a matching version of the C libraries. For this reason,\nto build the official Linux pip packages, we use [these Docker\nimages](https://hub.docker.com/r/tensorflow/build) and use the same toolchain\nthat TensorFlow uses.\n\nInside the Docker container, the following steps need to be taken:\n\n1. Clone the `tensorflow/compression` repo from GitHub.\n2. Run `tools/build_pip_pkg.sh` inside the cloned repo.\n\nFor example:\n\n```bash\ngit clone https://github.com/tensorflow/compression.git /tensorflow_compression\ndocker run -i --rm \\\n    -v /tmp/tensorflow_compression:/tmp/tensorflow_compression\\\n    -v /tensorflow_compression:/tensorflow_compression \\\n    -w /tensorflow_compression \\\n    -e \"BAZEL_OPT=--config=manylinux_2_24_x86_64\" \\\n    tensorflow/build:latest-python3.10 \\\n    bash tools/build_pip_pkg.sh /tmp/tensorflow_compression <custom-version>\n```\n\nFor Darwin, the Docker image and specifying the toolchain is not necessary. We\njust build the package like this (note that you may want to create a clean\nPython virtual environment to do this):\n\n```bash\ngit clone https://github.com/tensorflow/compression.git /tensorflow_compression\ncd /tensorflow_compression\nBAZEL_OPT=\"--macos_minimum_os=10.14\" bash \\\n  tools/build_pip_pkg.sh \\\n  /tmp/tensorflow_compression <custom-version>\n```\n\nIn both cases, the wheel file is created inside `/tmp/tensorflow_compression`.\n\nTo test the created package, first install the resulting wheel file:\n\n```bash\npython -m pip install /tmp/tensorflow_compression/tensorflow_compression-*.whl\n```\n\nThen run the unit tests (Do not run the tests in the workspace directory where\nthe `WORKSPACE` file lives. In that case, the Python interpreter would attempt\nto import `tensorflow_compression` packages from the source tree, rather than\nfrom the installed package system directory):\n\n```bash\npushd /tmp\npython -m tensorflow_compression.all_tests\npopd\n```\n\nWhen done, you can uninstall the pip package again:\n\n```bash\npython -m pip uninstall tensorflow-compression\n```\n\n## Evaluation\n\nWe provide evaluation results for several image compression methods in terms of\ndifferent metrics in different colorspaces. Please see the\n[results subdirectory](https://github.com/tensorflow/compression/tree/master/results/image_compression)\nfor more information.\n\n## Citation\n\nIf you use this library for research purposes, please cite:\n```\n@software{tfc_github,\n  author = \"Ballé, Jona and Hwang, Sung Jin and Agustsson, Eirikur\",\n  title = \"{T}ensor{F}low {C}ompression: Learned Data Compression\",\n  url = \"http://github.com/tensorflow/compression\",\n  version = \"2.14.1\",\n  year = \"2024\",\n}\n```\nIn the above BibTeX entry, names are top contributors sorted by number of\ncommits. Please adjust version number and year according to the version that was\nactually used.\n\nNote that this is not an officially supported Google product.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3D08:3B6DE:175567:5D77A8:6AB92A01"},"text_sha256":"ab59f74eb73ffca5557ce747923327ed7da78b1ae3af2f9c142eaefeca7cb42a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kendryte/nncase","input_row":{"repository":"kendryte/nncase","url":"https://github.com/kendryte/nncase","name":"nncase","owner":"kendryte","description":"Open deep learning compiler stack for Kendryte AI accelerators ✨","language":"C#","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":898,"issues":408,"created_at":"2018-04-04T12:11:19Z","updated_at":"2026-09-17T23:24:33Z","first_commit_at":"2018-04-04T12:43:17Z","last_commit_at":"2026-03-02T01:24:11Z","activity_months":94.890000000000001,"ai_ml_match_topics":"deep-learning; neural-network; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:50.475Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kendryte/nncase","visibility":"public","created_at":"2018-04-04T12:11:19Z","updated_at":"2026-09-17T23:24:33Z","private":false,"fork":false,"archived":false,"stargazers_count":898,"open_issues_count":11,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2763","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17B92B8:1BDA4B5:6AB92A02"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2762","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0934:767EB:17E8286:1C0A528:6AB92A02"},"commit":{"sha":"05d60a87ba5a55fed4dfda70ec7d66ba8ca131b9","url":"https://github.com/kendryte/nncase/commit/05d60a87ba5a55fed4dfda70ec7d66ba8ca131b9","date":"2018-04-08T06:19:48Z","author_date":"2018-04-08T06:19:48Z","committer_date":"2018-04-08T06:19:48Z","tree_sha":"9f4ef1ba99b733b2db66b2bb01da679dd218eb08","message_first_line":"add some layers"},"tree_request_status":200,"tree_rate":{"github_remaining":"2761","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:179D3D3:1BBF283:6AB92A03"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1362,"blob_sha":"69b70d02e8c0efd51254ddd7918ff6d27f5bc57c","priority":0}],"documents":[{"path":"README.md","size":1362,"blob_sha":"69b70d02e8c0efd51254ddd7918ff6d27f5bc57c","priority":0,"status":200,"text":"nncase\n=========================================\n`nncase` is a fast cross-platform cnn forward & backward framework.\n\n[License (MIT)](https://raw.githubusercontent.com/dotnetGame/nncase/master/LICENSE)\n-------------------------------------------------------------------------------\n\tMIT License\n\n\tCopyright (c) 2018 nncase\n\n\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\tof this software and associated documentation files (the \"Software\"), to deal\n\tin the Software without restriction, including without limitation the rights\n\tto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\tcopies of the Software, and to permit persons to whom the Software is\n\tfurnished to do so, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"159E:2C474:17F29E:5E15A8:6AB92A03"},"text_sha256":"2564192cf680629e99f11e4816502f2694d27396c3fb344bda44898d1d6b8535"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2760","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17C3063:1BE4D88:6AB92A03"},"commit":{"sha":"99431d9db29ffacb7436b787b93122a8151b00ba","url":"https://github.com/kendryte/nncase/commit/99431d9db29ffacb7436b787b93122a8151b00ba","date":"2026-03-02T01:24:11Z","author_date":"2026-03-02T01:24:11Z","committer_date":"2026-03-02T01:24:11Z","tree_sha":"44e146372e2adb5793d9e6954f2e99f4cde362f1","message_first_line":"Add GridSample operation and related components (#1480)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2759","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082E:72BD3:17EEEA0:1C10AA6:6AB92A04"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9513,"blob_sha":"56f5afad7c1b91587827727dae873cd83bedcbd7","priority":0}],"documents":[{"path":"README.md","size":9513,"blob_sha":"56f5afad7c1b91587827727dae873cd83bedcbd7","priority":0,"status":200,"text":"<div align=\"center\">\n<img src=\"docs/logo.png\" width=\"400\" alt=\"nncase\" />\n<\/div>\n\n[![GitHub repository](https://img.shields.io/badge/github-repository-blue?logo=github&style=plastic)](https://github.com/kendryte/nncase) [![Gitee repository](https://img.shields.io/badge/gitee-repository-blue?logo=gitee&style=plastic)](https://gitee.com/kendryte/nncase) [![GitHub release](https://img.shields.io/github/v/release/kendryte/nncase?color=brightgreen&display_name=tag&logo=github&style=plastic)](https://github.com/kendryte/nncase/releases)\n\n[切换中文](docs/readme_ZH.md)\n\n`nncase` is a neural network compiler for AI accelerators.\n\nTelegram: [nncase community](https://t.me/joinchat/PPcEPZMLaTViNDI1)\nTechnical Discussion QQ Group: 790699378 .   Answer: 人工智能\n\n---\n\n## K230\n\n- [Usage](./docs/USAGE_v2_EN.md)\n- [FAQ](./docs/FAQ_EN.md)\n- [Example](./examples/user_guide/k230_simulate-EN.ipynb)\n- [Colab run](https://colab.research.google.com/drive/1m8TTree096m5VHmq-Uc60gXyltVCgnRb?usp=sharing)\n- [ *Version relationship between `nncase` and `K230_SDK`* ](https://developer.canaan-creative.com/k230/dev/zh/03_other/K230_SDK_nncase%E7%89%88%E6%9C%AC%E5%AF%B9%E5%BA%94%E5%85%B3%E7%B3%BB.html#k230sdknncase)\n- [update nncase runtime library in SDK](https://developer.canaan-creative.com/k230/dev/zh/03_other/K230_SDK%E6%9B%B4%E6%96%B0nncase%E8%BF%90%E8%A1%8C%E6%97%B6%E5%BA%93%E6%8C%87%E5%8D%97.html)\n\n### Install\n\n- Linux：\n\n    ```shell\n    pip install nncase nncase-kpu\n    ```\n\n- Windows:\n\n    ```shell\n    1. pip install nncase\n    2. Download `nncase_kpu-2.x.x-py2.py3-none-win_amd64.whl` in below link.\n    3. pip install nncase_kpu-2.x.x-py2.py3-none-win_amd64.whl\n    ```\n\nAll version of `nncase` and `nncase-kpu` in [Release](https://github.com/kendryte/nncase/releases).\n\n\n### Supported operators\n\n- [TFLite ops](./docs/tflite_ops.md)\n- [Caffe ops](./docs/caffe_ops.md)\n- [ONNX ops](./docs/onnx_ops.md)\n\n\n### benchmark test\n\n<table>\n<tr> <th>kind<\/th> <th> model             <\/th><th> shape         <\/th><th> quant_type(If/W) <\/th><th> nncase_fps    <\/th><th> tflite_onnx_result    <\/th><th> accuracy <\/th><th> info  <\/th><\/tr>\n<tr>\n<td rowspan='3'>Image Classification<\/td>\n<td>mobilenetv2        <\/td><td> [1,224,224,3] <\/td><td> u8/u8            <\/td><td> 600.24        <\/td><td>  top-1 = 71.3%<br/>top-5 = 90.1%  <\/td><td> top-1 = 71.1%<br/>top-5 = 90.0% <\/td><td> dataset(ImageNet 2012, 50000 images)<br/> tflite <\/td><\/tr>\n<tr><td>resnet50V2         <\/td><td> [1,3,224,224] <\/td><td> u8/u8            <\/td><td> 86.17         <\/td><td>  top-1 = 75.44%<br/>top-5 = 92.56%  <\/td><td> top-1 = 75.11% <br/> top-5 = 92.36% <\/td><td> dataset(ImageNet 2012, 50000 images)<br/> onnx<\/td><\/tr>\n<tr><td>yolov8s_cls        <\/td><td> [1,3,224,224] <\/td><td> u8/u8            <\/td><td> 130.497       <\/td><td>  top-1 = 72.2%<br/>top-5 = 90.9% <\/td><td> top-1 = 72.2%<br/>top-5 = 90.8% <\/td><td> dataset(ImageNet 2012, 50000 images)<br/> yolov8s_cls(v8.0.207)<\/td><\/tr>\n<tr>\n<td rowspan='2'>Object Detection<\/td>\n<td>yolov5s_det        <\/td><td> [1,3,640,640] <\/td><td> u8/u8            <\/td><td> 23.645        <\/td><td>  bbox<br/>mAP50-90 = 0.374<br/>mAP50 = 0.567  <\/td><td> bbox<br/>mAP50-90 = 0.369<br/>mAP50 = 0.566<\/td><td>dataset(coco val2017, 5000 images)<br/>yolov5s_det(v7.0 tag, rect=False, conf=0.001, iou=0.65)<\/td><\/tr>\n<tr><td>yolov8s_det        <\/td><td> [1,3,640,640] <\/td><td> u8/u8            <\/td><td> 9.373         <\/td><td>  bbox<br/>mAP50-90 = 0.446<br/>mAP50 = 0.612<br/>mAP75 = 0.484  <\/td><td> bbox<br/>mAP50-90 = 0.404<br/>mAP50 = 0.593<br/>mAP75 = 0.45<\/td><td>dataset(coco val2017, 5000 images)<br/>yolov8s_det(v8.0.207, rect = False)<\/td><\/tr>\n<tr>\n<td rowspan='1'>Image Segmentation<\/td>\n<td>yolov8s_seg        <\/td><td> [1,3,640,640] <\/td><td> u8/u8            <\/td><td> 7.845         <\/td><td>  bbox<br/>mAP50-90 = 0.444<br/>mAP50 = 0.606<br/>mAP75 = 0.484<br/>segm<br/>mAP50-90 = 0.371<br/>mAP50 = 0.578<br/>mAP75 = 0.396       <\/td><td> bbox<br/>mAP50-90 = 0.444<br/>mAP50 = 0.606<br/>mAP75 = 0.484<br/>segm<br/>mAP50-90 = 0.371<br/>mAP50 = 0.579<br/>mAP75 = 0.397<\/td><td> dataset(coco val2017, 5000 images)<br/>yolov8s_seg(v8.0.207, rect = False, conf_thres = 0.0008)<\/td><\/tr>\n<tr>\n<td rowspan='3'>Pose Estimation<\/td>\n<td>yolov8n_pose_320   <\/td><td> [1,3,320,320] <\/td><td> u8/u8            <\/td><td> 36.066        <\/td><td>  bbox<br/>mAP50-90 = 0.6<br/>mAP50 = 0.843<br/>mAP75 = 0.654<br/>keypoints<br/>mAP50-90 = 0.358<br/>mAP50 = 0.646<br/>mAP75 = 0.353    <\/td><td> bbox<br/>mAP50-90 = 0.6<br/>mAP50 = 0.841<br/>mAP75 = 0.656<br/>keypoints<br/>mAP50-90 = 0.359<br/>mAP50 = 0.648<br/>mAP75 = 0.357 <\/td><td> dataset(coco val2017, 2346 images)<br/>yolov8n_pose(v8.0.207, rect = False)<\/td><\/tr>\n<tr><td>yolov8n_pose_640   <\/td><td> [1,3,640,640] <\/td><td> u8/u8            <\/td><td> 10.88         <\/td><td>  bbox<br/>mAP50-90 = 0.694<br/>mAP50 = 0.909<br/>mAP75 = 0.776<br/>keypoints<br/>mAP50-90 = 0.509<br/>mAP50 = 0.798<br/>mAP75 = 0.544  <\/td><td> bbox<br/>mAP50-90 = 0.694<br/>mAP50 = 0.909<br/>mAP75 = 0.777<br/>keypoints<br/>mAP50-90 = 0.508<br/>mAP50 = 0.798<br/>mAP75 = 0.54 <\/td><td> dataset(coco val2017, 2346 images)<br/>yolov8n_pose(v8.0.207, rect = False)<\/td><\/tr>\n<tr><td>yolov8s_pose       <\/td><td> [1,3,640,640] <\/td><td> u8/u8            <\/td><td> 5.568         <\/td><td>  bbox<br/>mAP50-90 = 0.733<br/>mAP50 = 0.925<br/>mAP75 = 0.818<br/>keypoints<br/>mAP50-90 = 0.605<br/>mAP50 = 0.857<br/>mAP75 = 0.666  <\/td><td> bbox<br/>mAP50-90 = 0.734<br/>mAP50 = 0.925<br/>mAP75 = 0.819<br/>keypoints<br/>mAP50-90 = 0.604<br/>mAP50 = 0.859<br/>mAP75 = 0.669<\/td><td> dataset(coco val2017, 2346 images)<br/>yolov8s_pose(v8.0.207, rect = False)<\/td><\/tr>\n<\/table>\n\n\n### Demo\n\n|[eye gaze](https://developer.canaan-creative.com/modelDetail?id=142)  | [space_resize](https://developer.canaan-creative.com/modelDetail?id=141) | [face pose](https://developer.canaan-creative.com/modelDetail?id=125)|\n| --- | --- | --- |\n| <img src=\"https://github.com/kendryte/nncase_docs/blob/master/gif/eye_gaze_result.gif?raw=true\"  alt=\"gif\"> | <img src=\"https://github.com/kendryte/nncase_docs/blob/master/gif/space_resize.gif?raw=true\" alt=\"gif\">| <img src=\"https://github.com/kendryte/nncase_docs/blob/master/gif/face_pose_result.gif?raw=true\"> |\n\n---\n\n## K210/K510\n\n- [Usage](https://github.com/kendryte/nncase/blob/release/1.0/docs/USAGE_EN.md)\n- [FAQ](https://github.com/kendryte/nncase/blob/release/1.0/docs/FAQ_EN.md)\n- [Example](https://github.com/kendryte/nncase/blob/release/1.0/examples/user_guide/)\n\n### Supported operators\n\n- [TFLite ops](https://github.com/kendryte/nncase/blob/release/1.0/docs/tflite_ops.md)\n- [Caffe ops](https://github.com/kendryte/nncase/blob/release/1.0/docs/caffe_ops.md)\n- [ONNX ops](https://github.com/kendryte/nncase/blob/release/1.0/docs/onnx_ops.md)\n\n---\n\n## Features\n\n- Supports multiple inputs and outputs and multi-branch structure\n- Static memory allocation, no heap memory acquired\n- Operators fusion and optimizations\n- Support float and quantized uint8 inference\n- Support post quantization from float model with calibration dataset\n- Flat model with zero copy loading\n\n---\n\n## Architecture\n\n<div align=\"center\">\n<img src=\"docs/imgs/arch.jpeg\" alt=\"nncase arch\" />\n<\/div>\n\n---\n\n## Build from source\n\n**It is recommended to install nncase directly through `pip`. At present, the source code related to k510 and K230 chips is not open source, so it is not possible to use `nncase-K510` and `nncase-kpu` (K230) directly by compiling source code.**\n\n\nIf there are operators in your model that `nncase` does not yet support, you can request them in the issue or implement them yourself and submit the PR. Later versions will be integrated, or contact us to provide a temporary version.\nHere are the steps to compile `nncase`.\n\n```shell\ngit clone https://github.com/kendryte/nncase.git\ncd nncase\nmkdir build && cd build\n\n# Use Ninja\ncmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install\nninja && ninja install\n\n# Use make\ncmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install\nmake && make install\n```\n\n---\n\n## Resources\n\n### Canaan developer community\n\n[Canaan developer community](https://developer.canaan-creative.com/resource) contains all resources related to K210, K510, and K230.\n\n- 资料下载 --> Pre-compiled images available for the development boards corresponding to the three chips.\n- 文档 --> Documents corresponding to the three chips.\n- 模型库 --> Examples and code for industrial, security, educational and other scenarios that can be run on the K210 and K230.\n- 模型训练 --> The model training platform for K210 and K230 supports the training of various scenarios.\n\n### Bilibili\n\n- [Canaan AI tutorial and application demonstration](https://space.bilibili.com/677429436)\n\n\n### K210 related repo\n\n- [K210_Yolo_framework](https://github.com/zhen8838/K210_Yolo_framework)\n- [Shts!&#39;s Blog (Japanese)](https://www.shtsno24.tokyo/2020/03/nncase-v020.html)\n- [Examples](https://github.com/kendryte/canmv_examples/tree/main/01-K210)\n\n### K230 related repo\n\n- C: [K230_SDK](https://github.com/kendryte/k230_sdk)\n    - [Documents](https://github.com/kendryte/k230_docs)\n    - [K230 end-to-end tutorial](https://github.com/kendryte/K230_training_scripts)\n- MicroPython: [Canmv_k230](https://github.com/kendryte/k230_canmv)\n    - [Documents](https://github.com/kendryte/k230_canmv_docs)\n    - [Examples](https://github.com/kendryte/canmv_examples/tree/main/02-K230)\n---\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F9E:2B291E:182EE4:5E529C:6AB92A04"},"text_sha256":"182afa34b1f4cce5956c329bd10e54ff03ae90483bec23405903df1eb4c56cd0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"YerevaNN/mimic3-benchmarks","input_row":{"repository":"YerevaNN/mimic3-benchmarks","url":"https://github.com/YerevaNN/mimic3-benchmarks","name":"mimic3-benchmarks","owner":"YerevaNN","description":"Python suite to construct benchmark machine learning datasets from the MIMIC-III 💊 clinical database. ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":892,"issues":120,"created_at":"2016-09-08T05:08:10Z","updated_at":"2026-09-20T01:22:56Z","first_commit_at":"2016-09-08T05:08:11Z","last_commit_at":"2023-04-16T20:20:36Z","activity_months":79.230000000000004,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:53.188Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"YerevaNN/mimic3-benchmarks","visibility":"public","created_at":"2016-09-08T05:08:10Z","updated_at":"2026-09-20T01:22:56Z","private":false,"fork":false,"archived":false,"stargazers_count":892,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2758","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:17F5C53:1C17A78:6AB92A05"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2757","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17B28EF:1BD3376:6AB92A05"},"commit":{"sha":"69c9bcf4f8b0b9a356f2168b61f63738fb7e3f51","url":"https://github.com/YerevaNN/mimic3-benchmarks/commit/69c9bcf4f8b0b9a356f2168b61f63738fb7e3f51","date":"2018-05-19T09:33:37Z","author_date":"2018-05-19T09:33:37Z","committer_date":"2018-05-19T09:33:37Z","tree_sha":"5b39e1a7557c0172cdb950abc7f034ba631cfeae","message_first_line":"Merge pull request #54 from YerevaNN/update_readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"2756","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0851:3203A7:178A1BB:1BABCEC:6AB92A06"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15060,"blob_sha":"c36b7f4a7c7ec69803fa8c2cba623e2f55da1261","priority":0}],"documents":[{"path":"README.md","size":15060,"blob_sha":"c36b7f4a7c7ec69803fa8c2cba623e2f55da1261","priority":0,"status":200,"text":"MIMIC-III Benchmarks\n=========================\n\n[![Join the chat at https://gitter.im/YerevaNN/mimic3-benchmarks](https://badges.gitter.im/YerevaNN/mimic3-benchmarks.svg)](https://gitter.im/YerevaNN/mimic3-benchmarks?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nPython suite to construct benchmark machine learning datasets from the MIMIC-III clinical database. Currently, the benchmark datasets cover four key inpatient clinical prediction tasks that map onto core machine learning problems: prediction of mortality from early admission data (classification), real-time detection of decompensation (time series classification), forecasting length of stay (regression), and phenotype classification (multilabel sequence classification).\n\n\n## News\n\n* 2017 December 8: This work was presented as a spotlight presentation at NIPS 2017 [Machine Learning for Health Workshop](https://ml4health.github.io/2017/).\n* 2017 March 23: We are pleased to announce the first official release of these benchmarks. We expect to release a revision within the coming months that will add at least ~50 additional input variables. We are likewise pleased to announce that the manuscript associated with these benchmarks is now [available on arXiv](https://arxiv.org/abs/1703.07771).\n\n## Citation\n\nIf you use this code or these benchmarks in your research, please cite the following publication: *Hrayr Harutyunyan, Hrant Khachatrian, David C. Kale, and Aram Galstyan. Multitask Learning and Benchmarking with Clinical Time Series Data. arXiv:1703.07771* which is now available [on arXiv](https://arxiv.org/abs/1703.07771). The second version of the preprint is under preparation and will be posted soon. **Please be sure also to cite the original [MIMIC-III paper](http://www.nature.com/articles/sdata201635).**\n\n## Motivation\n\nDespite rapid growth in research that applies machine learning to clinical data, progress in the field appears far less dramatic than in other applications of machine learning. In image recognition, for example, the winning error rates in the [ImageNet Large Scale Visual Recognition Challenge](http://image-net.org/challenges/LSVRC/) (ILSVRC) plummeted almost 90% from 2010 (0.2819) to 2016 (0.02991).\nThere are many reasonable explanations for this discrepancy: clinical data sets are [inherently noisy and uncertain](http://www-scf.usc.edu/~dkale/papers/marlin-ihi2012-ehr_clustering.pdf) and often small relative to their complexity, and for many problems of interest, [ground truth labels for training and evaluation are unavailable](https://academic.oup.com/jamia/article-abstract/23/6/1166/2399304/Learning-statistical-models-of-phenotypes-using?redirectedFrom=PDF).\n\nHowever, there is another, simpler explanation: practical progress has been difficult to measure due to the absence of community benchmarks like ImageNet. Such benchmarks play an important role in accelerating progress in machine learning research. For one, they focus the community on specific problems and stoke ongoing debate about what those problems should be. They also reduce the startup overhead for researchers moving into a new area. Finally and perhaps most important, benchmarks facilitate reproducibility and direct comparison of competing ideas.\n\nHere we present four public benchmarks for machine learning researchers interested in health care, built using data from the publicly available Medical Information Mart for Intensive Care (MIMIC-III) database ([paper](http://www.nature.com/articles/sdata201635), [website](http://mimic.physionet.org)). Our four clinical prediction tasks are critical care variants of four opportunities to transform health care using in \"big clinical data\" as described in [Bates, et al, 2014](http://content.healthaffairs.org/content/33/7/1123.abstract):\n\n* early triage and risk assessment, i.e., mortality prediction\n* prediction of physiologic decompensation\n* identification of high cost patients, i.e. length of stay forecasting\n* characterization of complex, multi-system diseases, i.e., acute care phenotyping\n\nIn [Harutyunyan, Khachatrian, Kale, and Galstyan 2017](https://arxiv.org/abs/1703.07771), we propose a multitask RNN architecture to solve these four tasks simultaneously and show that this model generally outperforms strong single task baselines.\n\n## Structure\nThe content of this repository can be divided into four big parts:\n* Tools for creating the benchmark datasets.  \n* Tools for reading the benchmark datasets.\n* Evaluation scripts.\n* Baseline models and helper tools.\n\nThe `mimic3benchmark/scripts` directory contains scripts for creating the benchmark datasets.\nThe reading tools are in `mimic3benchmark/readers.py`.\nAll evaluation scripts are stored in the `mimic3benchmark/evaluation` directory.\nThe `mimic3models` directory contains the baselines models along with some helper tools.\nThose tools include discretizers, normalizers and functions for computing metrics.\n\n\n## Requirements\n\nWe do not provide the MIMIC-III data itself. You must acquire the data yourself from https://mimic.physionet.org/. Specifically, download the CSVs. Otherwise, generally we make liberal use of the following packages:\n\n- numpy\n- pandas\n\nFor logistic regression  baselines [sklearn](http://scikit-learn.org/) is required. LSTM models use [Keras](https://keras.io/).\n\n\n## Building a benchmark\n\nHere are the required steps to build the benchmark. It assumes that you already have MIMIC-III dataset (lots of CSV files) on the disk.\n1. Clone the repo.\n\n       git clone https://github.com/YerevaNN/mimic3-benchmarks/\n       cd mimic3-benchmarks/\n    \n2. The following command takes MIMIC-III CSVs, generates one directory per `SUBJECT_ID` and writes ICU stay information to `data/{SUBJECT_ID}/stays.csv`, diagnoses to `data/{SUBJECT_ID}/diagnoses.csv`, and events to `data/{SUBJECT_ID}/events.csv`. This step might take around an hour.\n\n       python -m mimic3benchmark.scripts.extract_subjects {PATH TO MIMIC-III CSVs} data/root/\n\n3. The following command attempts to fix some issues (ICU stay ID is missing) and removes the events that have missing information. About 80% of events remain after removing all suspicious rows (more information can be found in [`mimic3benchmark/scripts/more_on_validating_events.md`](mimic3benchmark/scripts/more_on_validating_events.md)).\n\n       python -m mimic3benchmark.scripts.validate_events data/root/\n\n4. The next command breaks up per-subject data into separate episodes (pertaining to ICU stays). Time series of events are stored in ```{SUBJECT_ID}/episode{#}_timeseries.csv``` (where # counts distinct episodes) while episode-level information (patient age, gender, ethnicity, height, weight) and outcomes (mortality, length of stay, diagnoses) are stores in ```{SUBJECT_ID}/episode{#}.csv```. This script requires two files, one that maps event ITEMIDs to clinical variables and another that defines valid ranges for clinical variables (for detecting outliers, etc.). **Outlier detection is disabled in the current version**.\n\n       python -m mimic3benchmark.scripts.extract_episodes_from_subjects data/root/\n\n5. The next command splits the whole dataset into training and testing sets. Note that the train/test split is the same of all tasks.\n\n       python -m mimic3benchmark.scripts.split_train_and_test data/root/\n\t\n6. The following commands will generate task-specific datasets, which can later be used in models. These commands are independent, if you are going to work only on one benchmark task, you can run only the corresponding command.\n\n       python -m mimic3benchmark.scripts.create_in_hospital_mortality data/root/ data/in-hospital-mortality/\n       python -m mimic3benchmark.scripts.create_decompensation data/root/ data/decompensation/\n       python -m mimic3benchmark.scripts.create_length_of_stay data/root/ data/length-of-stay/\n       python -m mimic3benchmark.scripts.create_phenotyping data/root/ data/phenotyping/\n       python -m mimic3benchmark.scripts.create_multitask data/root/ data/multitask/\n\nAfter the above commands are done, there will be a directory `data/{task}` for each created benchmark task.\nThese directories have two sub-directories: `train` and `test`.\nEach of them contains bunch of ICU stays and one file with name `listfile.csv`, which lists all samples in that particular set.\nEach row of `listfile.csv` has the following form: `icu_stay, period_length, label(s)`.\nA row specifies a sample for which the input is the collection of ICU event of `icu_stay` that occurred in the first `period_length` hours of the stay and the target is/are `label(s)`.\nIn in-hospital mortality prediction task `period_length` is always 48 hours, so it is not listed in corresponding listfiles.\n\n\n## Readers\nTo simplify the reading of benchmark data we wrote special classes.\nThe `mimic3benchmark/readers.py` contains class `Reader` and five other task-specific classes derived from it.\nThese are designed to simplify reading of benchmark data. The classes require a directory containing ICU stays and a listfile specifying the samples.\nAgain, we encourage to use these readers to avoid mistakes in the reading step (for example using events that happened after the first `period_length` hours).  \nFor more information about using readers view the [`mimic3benchmark/more_on_readers.md`](mimic3benchmark/more_on_readers.md) file.\n\n\n## Evaluation\nFor each of the four tasks we provide scripts for evaluating models.\nThese scripts receive a `csv` file containing the predictions and produce a `json` file containing the scores and confidence intervals for different metrics.\nWe highly encourage to use these scripts to prevent any mistake in the evaluation step.\nFor details about the usage of the evaluation scripts view the [`mimic3benchmark/evaluation/README.md`](mimic3benchmark/evaluation/README.md) file.\n\n\n## Baselines\nFor each of the four main tasks we provide 7 baselines:  \n* Linear/logistic regression\n* Standard LSTM\n* Standard LSTM + deep supervision\n* Channel-wise LSTM\n* Channel-wise LSTM + deep supervision\n* Multitask standard LSTM\n* Multitask channel-wise LSTM\n\nThe detailed descriptions of the baselines will appear in the next version of the paper.\n\nLinear models can be found in `mimic3models/{task}/logistic` directories.\nLSTM-based models are in `mimic3models/keras_models` directory.\n\nPlease note that running linear models can take hours because of extensive grid search and feature extraction.\nYou can change the size of the training data of linear models in the scripts and they will became faster (of course the performance will not be the same).\n\n### Train / validation split\n\nUse the following command to extract validation set from the training set. This step is required for running the baseline models. Likewise the train/test split, the train/validation split is the same for all tasks.\n\n       python -m mimic3models.split_train_val {dataset-directory}\n       \n`{dataset-directory}` can be either `data/in-hospital-mortality`, `data/decompensation`, `data/length-of-stay`, `data/phenotyping` or `data/multitask`.\n\n\n### In-hospital mortality prediction\n\nRun the following command to train the neural network which gives the best result. We got the best performance on validation set after 28 epochs.\n       \n       python -um mimic3models.in_hospital_mortality.main --network mimic3models/keras_models/lstm.py --dim 16 --timestep 1.0 --depth 2 --dropout 0.3 --mode train --batch_size 8 --output_dir mimic3models/in_hospital_mortality\n\nUse the following command to train logistic regression. The best model we got used L2 regularization with `C=0.001`:\n       \n       python -um mimic3models.in_hospital_mortality.logistic.main --l2 --C 0.001 --output_dir mimic3models/in_hospital_mortality/logistic\n\n### Decompensation prediction\n\nThe best model we got for this task was trained for 36 chunks (that's less than one epoch; it overfits before reaching one epoch because there are many training samples for the same patient with different lengths).\n       \n       python -um mimic3models.decompensation.main --network mimic3models/keras_models/lstm.py --dim 128 --timestep 1.0 --depth 1 --mode train --batch_size 8 --output_dir mimic3models/decompensation\n\nUse the following command to train a logistic regression. It will have L2 regularization with `C=0.001`, which gave us the best result. To run a grid search over a space of hyper-parameters add `--grid-search` to the command.\n       \n       python -um mimic3models.decompensation.logistic.main --output_dir mimic3models/decompensation/logistic\n\n### Length of stay prediction\n\nThe best model we got for this task was trained for 19 chunks.\n       \n       python -um mimic3models.length_of_stay.main --network mimic3models/keras_models/lstm.py --dim 64 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --partition custom --output_dir mimic3models/length_of_stay\n\nUse the following command to train a logistic regression. It will have L1 regularization with `C=0.00001`. To run a grid search over a space of hyper-parameters add `--grid-search` to the command.\n       \n       python -um mimic3models.length_of_stay.logistic.main_cf --output_dir mimic3models/length_of_stay/logistic\n\nTo run a linear regression use this command:\n\n        python -um mimic3models.length_of_stay.logistic.main --output_dir mimic3models/length_of_stay/logistic\n\n\n### Phenotype classification\n\nThe best model we got for this task was trained for 20 epochs.\n       \n       python -um mimic3models.phenotyping.main --network mimic3models/keras_models/lstm.py --dim 256 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --output_dir mimic3models/phenotyping\n\nUse the following command for logistic regression. It will have L1 regularization with `C=0.1`. To run a grid search over a space of hyper-parameters add `--grid-search` to the command.\n       \n       python -um mimic3models.phenotyping.logistic.main --output_dir mimic3models/phenotyping/logistic\n\n### Multitask learning\n\n`ihm_C`, `decomp_C`, `los_C` and `ph_C` coefficients control the relative weight of the tasks in the multitask model. Default is `1.0`. Multitask network architectures are stored in `mimic3models/multitask/keras_models`. Here is a sample command for running a multitask model.\n       \n       python -um mimic3models.multitask.main --network mimic3models/keras_models/multitask_lstm.py --dim 512 --timestep 1 --mode train --batch_size 16 --dropout 0.3 --ihm_C 0.2 --decomp_C 1.0 --los_C 1.5 --pheno_C 1.0 --output_dir mimic3models/multitask\n       \n\n## General todos:\n\n- Improve comments and documentation\n- Add comments about channel-wise LSTMs and deep superivison\n- Add the best state files for each baseline\n- Add https://zenodo.org/ \n- Release 1.0\n- Update citation section with Zenodo DOI\n- Add to MIMIC's derived data repo\n- Refactor, where appropriate, to make code more generally useful\n- Expand coverage of variable map and variable range files.\n- Decide whether we are missing any other high-priority data (CPT codes, inputs, etc.)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DAE:18CDF1:1778BF:55E9CB:6AB92A06"},"text_sha256":"f5189650261d20409ea0869c2023341ef4faed2f9ef142286a02ef90756c44c8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2755","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C2:2BC4E5:1817B2B:1C395D3:6AB92A06"},"commit":{"sha":"ea0314c7cbd369f62e2237ace6f683740f867e3a","url":"https://github.com/YerevaNN/mimic3-benchmarks/commit/ea0314c7cbd369f62e2237ace6f683740f867e3a","date":"2023-04-16T20:20:36Z","author_date":"2023-04-16T20:20:36Z","committer_date":"2023-04-16T20:20:36Z","tree_sha":"da849a915e989d64b7e2d28fe41f759f1b5d6102","message_first_line":"Update changelog.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2754","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FA:380E1C:17C6543:1BE7446:6AB92A07"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16306,"blob_sha":"f68b64392468731a4954f7642ab902d4a97e04ee","priority":0}],"documents":[{"path":"README.md","size":16306,"blob_sha":"f68b64392468731a4954f7642ab902d4a97e04ee","priority":0,"status":200,"text":"MIMIC-III Benchmarks\n=========================\n\n[![Join the chat at https://gitter.im/YerevaNN/mimic3-benchmarks](https://badges.gitter.im/YerevaNN/mimic3-benchmarks.svg)](https://gitter.im/YerevaNN/mimic3-benchmarks?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nPython suite to construct benchmark machine learning datasets from the MIMIC-III clinical database. Currently, the benchmark datasets cover four key inpatient clinical prediction tasks that map onto core machine learning problems: prediction of mortality from early admission data (classification), real-time detection of decompensation (time series classification), forecasting length of stay (regression), and phenotype classification (multilabel sequence classification).\n\n\n## News\n\n* 2018 December 28: The second draft of the paper is released on [arXiv](https://arxiv.org/abs/1703.07771).\n* 2017 December 8: This work was presented as a spotlight presentation at NIPS 2017 [Machine Learning for Health Workshop](https://ml4health.github.io/2017/).\n* 2017 March 23: We are pleased to announce the first official release of these benchmarks. We expect to release a revision within the coming months that will add at least ~50 additional input variables. We are likewise pleased to announce that the manuscript associated with these benchmarks is now [available on arXiv](https://arxiv.org/abs/1703.07771).\n\n## Citation\n\nIf you use this code or these benchmarks in your research, please cite the following publication.\n```\n@article{Harutyunyan2019,\n  author={Harutyunyan, Hrayr and Khachatrian, Hrant and Kale, David C. and Ver Steeg, Greg and Galstyan, Aram},\n  title={Multitask learning and benchmarking with clinical time series data},\n  journal={Scientific Data},\n  year={2019},\n  volume={6},\n  number={1},\n  pages={96},\n  issn={2052-4463},\n  doi={10.1038/s41597-019-0103-9},\n  url={https://doi.org/10.1038/s41597-019-0103-9}\n}\n```\n**Please be sure also to cite the original [MIMIC-III paper](http://www.nature.com/articles/sdata201635).**\n\n## Motivation\n\nDespite rapid growth in research that applies machine learning to clinical data, progress in the field appears far less dramatic than in other applications of machine learning. In image recognition, for example, the winning error rates in the [ImageNet Large Scale Visual Recognition Challenge](http://image-net.org/challenges/LSVRC/) (ILSVRC) plummeted almost 90% from 2010 (0.2819) to 2016 (0.02991).\nThere are many reasonable explanations for this discrepancy: clinical data sets are [inherently noisy and uncertain](http://www-scf.usc.edu/~dkale/papers/marlin-ihi2012-ehr_clustering.pdf) and often small relative to their complexity, and for many problems of interest, [ground truth labels for training and evaluation are unavailable](https://academic.oup.com/jamia/article-abstract/23/6/1166/2399304/Learning-statistical-models-of-phenotypes-using?redirectedFrom=PDF).\n\nHowever, there is another, simpler explanation: practical progress has been difficult to measure due to the absence of community benchmarks like ImageNet. Such benchmarks play an important role in accelerating progress in machine learning research. For one, they focus the community on specific problems and stoke ongoing debate about what those problems should be. They also reduce the startup overhead for researchers moving into a new area. Finally and perhaps most important, benchmarks facilitate reproducibility and direct comparison of competing ideas.\n\nHere we present four public benchmarks for machine learning researchers interested in health care, built using data from the publicly available Medical Information Mart for Intensive Care (MIMIC-III) database ([paper](http://www.nature.com/articles/sdata201635), [website](http://mimic.physionet.org)). Our four clinical prediction tasks are critical care variants of four opportunities to transform health care using in \"big clinical data\" as described in [Bates, et al, 2014](http://content.healthaffairs.org/content/33/7/1123.abstract):\n\n* early triage and risk assessment, i.e., mortality prediction\n* prediction of physiologic decompensation\n* identification of high-cost patients, i.e. length of stay forecasting\n* characterization of complex, multi-system diseases, i.e., acute care phenotyping\n\nIn [Harutyunyan, Khachatrian, Kale, and Galstyan 2017](https://arxiv.org/abs/1703.07771), we propose a multitask RNN architecture to solve these four tasks simultaneously and show that this model generally outperforms strong single task baselines.\n\n## Structure\nThe content of this repository can be divided into four big parts:\n* Tools for creating the benchmark datasets.  \n* Tools for reading the benchmark datasets.\n* Evaluation scripts.\n* Baseline models and helper tools.\n\nThe `mimic3benchmark/scripts` directory contains scripts for creating the benchmark datasets.\nThe reading tools are in `mimic3benchmark/readers.py`.\nAll evaluation scripts are stored in the `mimic3benchmark/evaluation` directory.\nThe `mimic3models` directory contains the baselines models along with some helper tools.\nThose tools include discretizers, normalizers and functions for computing metrics.\n\n\n## Requirements and installation\n\nWe do not provide the MIMIC-III data itself. You must acquire the data yourself from https://mimic.physionet.org/. The required libraries are listed in the `requirements.txt` file.\nHere is our suggested way of installation.\n\n1. Install [Miniconda](https://docs.conda.io/en/latest/miniconda.html).\n2. Run `conda create -n \"mimic3\" python=3.7.13`.\n3. Run `conda init [SHELL_NAME]`. You might also need to do `source ~/.bashrc` or `source ~/.zshrc` (depends on the shell version).\n4. Change the conda environment to `mimic3` by running `conda activate mimic3`.\n5. Clone the repo and change the directory:\n```bash\n       git clone https://github.com/YerevaNN/mimic3-benchmarks/\n       cd mimic3-benchmarks/\n```\n6. Install the requirements with `pip install -r requirements.txt`.\n\nNote that the Python version and some libraries in `requirements.txt` are outdated. This is because the models in `mimic3models/` use an old version of Keras. If you only need to create the benchmark (i.e., you only need the `mimic3benchmark` part), you can use newer Python versions and newer versions of `numpy`, `pandas`, and `scikit-learn`.\n\n## Building the benchmark\nHere are the required steps to build the benchmark. It assumes that you already have MIMIC-III dataset (lots of CSV files) on the disk. All the commands below should be run from the root directory of the repo (i.e., from `mimic3-benchmarks`).\n\n1. The following command takes MIMIC-III CSVs, generates one directory per `SUBJECT_ID` and writes ICU stay information to `data/{SUBJECT_ID}/stays.csv`, diagnoses to `data/{SUBJECT_ID}/diagnoses.csv`, and events to `data/{SUBJECT_ID}/events.csv`. This step might take around an hour.\n```bash\n       python -m mimic3benchmark.scripts.extract_subjects {PATH TO MIMIC-III CSVs} data/root/\n```\n\n2. The following command attempts to fix some issues (ICU stay ID is missing) and removes the events that have missing information. About 80% of events remain after removing all suspicious rows (more information can be found in [`mimic3benchmark/scripts/more_on_validating_events.md`](mimic3benchmark/scripts/more_on_validating_events.md)).\n```bash\n       python -m mimic3benchmark.scripts.validate_events data/root/\n```\n\n3. The next command breaks up per-subject data into separate episodes (pertaining to ICU stays). Time series of events are stored in ```{SUBJECT_ID}/episode{#}_timeseries.csv``` (where # counts distinct episodes) while episode-level information (patient age, gender, ethnicity, height, weight) and outcomes (mortality, length of stay, diagnoses) are stores in ```{SUBJECT_ID}/episode{#}.csv```. This script requires two files, one that maps event ITEMIDs to clinical variables and another that defines valid ranges for clinical variables (for detecting outliers, etc.). **Outlier detection is disabled in the current version**.\n```bash\n       python -m mimic3benchmark.scripts.extract_episodes_from_subjects data/root/\n```\n\n4. The next command splits the whole dataset into training and testing sets. Note that the train/test split is the same of all tasks.\n```bash\n       python -m mimic3benchmark.scripts.split_train_and_test data/root/\n```\n\n5. The following commands will generate task-specific datasets, which can later be used in models. These commands are independent, if you are going to work only on one benchmark task, you can run only the corresponding command.\n```bash\n       python -m mimic3benchmark.scripts.create_in_hospital_mortality data/root/ data/in-hospital-mortality/\n       python -m mimic3benchmark.scripts.create_decompensation data/root/ data/decompensation/\n       python -m mimic3benchmark.scripts.create_length_of_stay data/root/ data/length-of-stay/\n       python -m mimic3benchmark.scripts.create_phenotyping data/root/ data/phenotyping/\n       python -m mimic3benchmark.scripts.create_multitask data/root/ data/multitask/\n```\n\nAfter the above commands are done, there will be a directory `data/{task}` for each created benchmark task.\nThese directories have two subdirectories: `train` and `test`.\nEach of them contains a bunch of ICU stays and one file with name `listfile.csv`, which lists all samples in that particular set.\nEach row of `listfile.csv` has the following form: `icu_stay, period_length, label(s)`.\nA row specifies a sample for which the input is the collection of ICU event of `icu_stay` that occurred in the first `period_length` hours of the stay and the target is/are `label(s)`.\nIn in-hospital mortality prediction task `period_length` is always 48 hours, so it is not listed in corresponding listfiles.\n\n\n## Readers\nTo simplify the reading of benchmark data we wrote special classes.\nThe `mimic3benchmark/readers.py` contains class `Reader` and five other task-specific classes derived from it.\nThese are designed to simplify reading of benchmark data. The classes require a directory containing ICU stays and a listfile specifying the samples.\nAgain, we encourage to use these readers to avoid mistakes in the reading step (for example using events that happened after the first `period_length` hours).  \nFor more information about using readers view the [`mimic3benchmark/more_on_readers.md`](mimic3benchmark/more_on_readers.md) file.\n\n\n## Evaluation\nFor each of the four tasks we provide scripts for evaluating models.\nThese scripts receive a `csv` file containing the predictions and produce a `json` file containing the scores and confidence intervals for different metrics.\nWe highly encourage to use these scripts to prevent any mistake in the evaluation step.\nFor details about the usage of the evaluation scripts view the [`mimic3benchmark/evaluation/README.md`](mimic3benchmark/evaluation/README.md) file.\n\n\n## Baselines\nFor each of the four main tasks we provide 7 baselines:  \n* Linear/logistic regression\n* Standard LSTM\n* Standard LSTM + deep supervision\n* Channel-wise LSTM\n* Channel-wise LSTM + deep supervision\n* Multitask standard LSTM\n* Multitask channel-wise LSTM\n\nThe detailed descriptions of the baselines will appear in the next version of the paper.\n\nLinear models can be found in `mimic3models/{task}/logistic` directories.\nLSTM-based models are in `mimic3models/keras_models` directory.\n\nPlease note that running linear models can take hours because of extensive grid search and feature extraction.\nYou can change the size of the training data of linear models in the scripts, so they will become faster (of course the performance will not be the same).\n\nTo train the neural networks, you might need to select the keras backend to be `tensorflow`. This can be done by prepending `KERAS_BACKEND=tensorflow` to the training commands below, or by creating an environment variable `KERAS_BACKEND` with value `tensorflow`.\n\n### Train / validation split\n\nUse the following command to extract validation set from the training set. This step is required for running the baseline models. Likewise, the train/test split, the train/validation split is the same for all tasks.\n```bash\n       python -m mimic3models.split_train_val {dataset-directory}\n```\n`{dataset-directory}` can be either `data/in-hospital-mortality`, `data/decompensation`, `data/length-of-stay`, `data/phenotyping` or `data/multitask`.\n\n\n### In-hospital mortality prediction\n\nRun the following command to train the neural network which gives the best result. We got the best performance on validation set after 28 epochs.\n```bash\n       python -um mimic3models.in_hospital_mortality.main --network mimic3models/keras_models/lstm.py --dim 16 --timestep 1.0 --depth 2 --dropout 0.3 --mode train --batch_size 8 --output_dir mimic3models/in_hospital_mortality\n```\nUse the following command to train logistic regression. The best model we got used L2 regularization with `C=0.001`:\n```bash\n       python -um mimic3models.in_hospital_mortality.logistic.main --l2 --C 0.001 --output_dir mimic3models/in_hospital_mortality/logistic\n```\n### Decompensation prediction\n\nThe best model we got for this task was trained for 36 chunks (that's less than one epoch; it overfits before reaching one epoch because there are many training samples for the same patient with different lengths).\n```bash\n       python -um mimic3models.decompensation.main --network mimic3models/keras_models/lstm.py --dim 128 --timestep 1.0 --depth 1 --mode train --batch_size 8 --output_dir mimic3models/decompensation\n```\nUse the following command to train a logistic regression. It will have L2 regularization with `C=0.001`, which gave us the best result. To run a grid search over a space of hyper-parameters add `--grid-search` to the command.\n```bash\n       python -um mimic3models.decompensation.logistic.main --output_dir mimic3models/decompensation/logistic\n```\n### Length of stay prediction\n\nThe best model we got for this task was trained for 19 chunks.\n```bash\n       python -um mimic3models.length_of_stay.main --network mimic3models/keras_models/lstm.py --dim 64 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --partition custom --output_dir mimic3models/length_of_stay\n```\nUse the following command to train a logistic regression. It will have L1 regularization with `C=0.00001`. To run a grid search over a space of hyperparameters add `--grid-search` to the command.\n```bash\n       python -um mimic3models.length_of_stay.logistic.main_cf --output_dir mimic3models/length_of_stay/logistic\n```\nTo run a linear regression use this command:\n```bash\n        python -um mimic3models.length_of_stay.logistic.main --output_dir mimic3models/length_of_stay/logistic\n```\n\n### Phenotype classification\n\nThe best model we got for this task was trained for 20 epochs.\n```bash\n       python -um mimic3models.phenotyping.main --network mimic3models/keras_models/lstm.py --dim 256 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --output_dir mimic3models/phenotyping\n```\nUse the following command for logistic regression. It will have L1 regularization with `C=0.1`. To run a grid search over a space of hyperparameters add `--grid-search` to the command.\n```bash\n       python -um mimic3models.phenotyping.logistic.main --output_dir mimic3models/phenotyping/logistic\n```\n### Multitask learning\n\n`ihm_C`, `decomp_C`, `los_C` and `ph_C` coefficients control the relative weight of the tasks in the multitask model. Default is `1.0`. Multitask network architectures are stored in `mimic3models/multitask/keras_models`. Here is a sample command for running a multitasking model.\n```bash\n       python -um mimic3models.multitask.main --network mimic3models/keras_models/multitask_lstm.py --dim 512 --timestep 1 --mode train --batch_size 16 --dropout 0.3 --ihm_C 0.2 --decomp_C 1.0 --los_C 1.5 --pheno_C 1.0 --output_dir mimic3models/multitask\n```\n\n## General todos:\n\n- Improve comments and documentation\n- Add the best state files for each baseline\n- Release 1.0\n- Update citation section with Zenodo DOI\n- Add to MIMIC's derived data repo\n- Refactor, where appropriate, to make code more generally useful\n- Expand coverage of variable map and variable range files.\n- Decide whether we are missing any other high-priority data (CPT codes, inputs, etc.)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4AA:35999:177E6A:5DA2C8:6AB92A06"},"text_sha256":"7942ee4a4d300770da67ce0b7e6c2c7e7f4ff45acdc45bd91e82153910693818"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gmalivenko/pytorch2keras","input_row":{"repository":"gmalivenko/pytorch2keras","url":"https://github.com/gmalivenko/pytorch2keras","name":"pytorch2keras","owner":"gmalivenko","description":"PyTorch to Keras model convertor","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":861,"issues":127,"created_at":"2017-11-16T20:21:43Z","updated_at":"2026-09-08T09:34:33Z","first_commit_at":"2017-11-16T20:21:44Z","last_commit_at":"2021-08-06T08:18:46Z","activity_months":44.630000000000003,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:56.066Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gmalivenko/pytorch2keras","visibility":"public","created_at":"2017-11-16T20:21:43Z","updated_at":"2026-09-08T09:34:33Z","private":false,"fork":false,"archived":false,"stargazers_count":861,"open_issues_count":62,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2753","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:1804741:1C26630:6AB92A08"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2752","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:18571EE:1C79229:6AB92A08"},"commit":{"sha":"b6644993aa689b24573783bb42a5049c187c50af","url":"https://github.com/gmalivenko/pytorch2keras/commit/b6644993aa689b24573783bb42a5049c187c50af","date":"2018-05-23T06:40:24Z","author_date":"2018-05-23T06:39:53Z","committer_date":"2018-05-23T06:40:24Z","tree_sha":"48ca1c3c4e9e027542d06d887fdc74c19c4aabce","message_first_line":"Fixed wrong element selection from layers dictionary. Closes #16"},"tree_request_status":200,"tree_rate":{"github_remaining":"2751","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17C9B44:1BEB1AE:6AB92A08"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2371,"blob_sha":"f6a6e93da043367cf2be1694951443561d051748","priority":0}],"documents":[{"path":"README.md","size":2371,"blob_sha":"f6a6e93da043367cf2be1694951443561d051748","priority":0,"status":200,"text":"# pytorch2keras\nPytorch to Keras model convertor. Still beta for now.\n\n## Important notice\n\nIn that moment the only PyTorch 0.2 (deprecated) and PyTorch 0.4 (latest stable) are supported.\n\nTo use the converter properly, please, make changes in your `~/.keras/keras.json`:\n\n\n```\n...\n\"backend\": \"tensorflow\",\n\"image_data_format\": \"channels_first\",\n...\n```\n\n## How to build the latest PyTorch\n\nPlease, follow [this guide](https://github.com/pytorch/pytorch#from-source) to compile the latest version.\n\n## How to use\n\nIt's a convertor of pytorch graph to a Keras (Tensorflow backend) graph.\n\nFirstly, we need to load (or create) pytorch model:\n\n```\nclass TestConv2d(nn.Module):\n    \"\"\"Module for Conv2d convertion testing\n    \"\"\"\n\n    def __init__(self, inp=10, out=16, kernel_size=3):\n        super(TestConv2d, self).__init__()\n        self.conv2d = nn.Conv2d(inp, out, stride=(inp % 3 + 1), kernel_size=kernel_size, bias=True)\n\n    def forward(self, x):\n        x = self.conv2d(x)\n        return x\n\nmodel = TestConv2d()\n\n# load weights here\n# model.load_state_dict(torch.load(path_to_weights.pth))\n```\n\nThe next step - create a dummy variable with correct shapes:\n\n```\ninput_np = np.random.uniform(0, 1, (1, 10, 32, 32))\ninput_var = Variable(torch.FloatTensor(input_np))\n```\n\nWe're using dummy-variable in order to trace the model.\n\n```\nfrom converter import pytorch_to_keras\n# we should specify shape of the input tensor\nk_model = pytorch_to_keras(model, input_var, (10, 32, 32,), verbose=True)  \n```\n\nThat's all! If all is ok, the Keras model is stores into the `k_model` variable.\n\n## Supported layers\n\nLayers:\n\n* Linear\n* Conv2d\n* ConvTranspose2d\n* MaxPool2d\n* AvgPool2d\n* Embedding\n* UpsamplingNearest2d\n\nReshape:\n\n* View\n* Reshape (only with 0.4)\n* Transpose (only with 0.4)\n\nActivations:\n\n* ReLU\n* LeakyReLU\n* PReLU (only with 0.2)\n* SELU (only with 0.2)\n* Tanh\n* Softmax\n* Softplus (only with 0.2)\n* Softsign (only with 0.2)\n* Sigmoid\n\nElement-wise:\n\n* Addition\n* Multiplication\n* Subtraction\n\nMisc:\n\n* reduce sum ( .sum() method)\n\n## Unsupported parameters\n\n* Pooling: count_include_pad, dilation, ceil_mode\n* Convolution: group\n\n## Models converted with pytorch2keras\n\n* ResNet18\n* ResNet50\n* SqueezeNet (with ceil_mode=False)\n* DenseNet\n* AlexNet\n* Inception (v4 only)\n\n## Usage\nLook at the `tests` directory.\n\n## License\nThis software is covered by MIT License.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"99D6:3FD49:17762D:5D9A3C:6AB92A07"},"text_sha256":"bdaa7cc86474cd7e1621a5e771fa6bd9cb2b304b0585a75c234affa0fa50cefa"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2750","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:17B6348:1BD8232:6AB92A09"},"commit":{"sha":"9cd26e9e6698e1f07e455dbb94c15ecff53fb788","url":"https://github.com/gmalivenko/pytorch2keras/commit/9cd26e9e6698e1f07e455dbb94c15ecff53fb788","date":"2021-08-06T08:18:46Z","author_date":"2021-08-06T08:18:46Z","committer_date":"2021-08-06T08:18:46Z","tree_sha":"147c23039712e464fe213a6bc922d16cf5faadbb","message_first_line":"Merge pull request #134 from wmvanvliet/fix"},"tree_request_status":200,"tree_rate":{"github_remaining":"2749","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B1:2EA1B4:17CBEA9:1BEDFBC:6AB92A09"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6697,"blob_sha":"400cc45e92b0f5b3036114977ac0bbdbae834959","priority":0}],"documents":[{"path":"README.md","size":6697,"blob_sha":"400cc45e92b0f5b3036114977ac0bbdbae834959","priority":0,"status":200,"text":"# pytorch2keras\n\n[![Build Status](https://travis-ci.com/gmalivenko/pytorch2keras.svg?branch=master)](https://travis-ci.com/gmalivenko/pytorch2keras)\n[![GitHub License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Python Version](https://img.shields.io/badge/python-2.7%2C3.6-lightgrey.svg)](https://github.com/gmalivenko/pytorch2keras)\n[![Downloads](https://pepy.tech/badge/pytorch2keras)](https://pepy.tech/project/pytorch2keras)\n![PyPI](https://img.shields.io/pypi/v/pytorch2keras.svg)\n[![Readthedocs](https://img.shields.io/readthedocs/pytorch2keras.svg)](https://pytorch2keras.readthedocs.io/en/latest/)\n\n\nPyTorch to Keras model converter.\n\n## Installation\n\n```\npip install pytorch2keras \n```\n\n## Important notice\n\nTo use the converter properly, please, make changes in your `~/.keras/keras.json`:\n\n\n```json\n...\n\"backend\": \"tensorflow\",\n\"image_data_format\": \"channels_first\",\n...\n```\n\n## Tensorflow.js\n\nFor the proper conversion to a tensorflow.js format, please use the new flag `names='short'`.\n\nHere is a short instruction how to get a tensorflow.js model:\n\n1. First of all, you have to convert your model to Keras with this converter:\n\n```python\nk_model = pytorch_to_keras(model, input_var, [(10, 32, 32,)], verbose=True, names='short')  \n```\n\n2. Now you have Keras model. You can save it as h5 file and then convert it with `tensorflowjs_converter` but it doesn't work sometimes. As alternative, you may get Tensorflow Graph and save it as a frozen model:\n\n```python\n# Function below copied from here:\n# https://stackoverflow.com/questions/45466020/how-to-export-keras-h5-to-tensorflow-pb \ndef freeze_session(session, keep_var_names=None, output_names=None, clear_devices=True):\n    \"\"\"\n    Freezes the state of a session into a pruned computation graph.\n\n    Creates a new computation graph where variable nodes are replaced by\n    constants taking their current value in the session. The new graph will be\n    pruned so subgraphs that are not necessary to compute the requested\n    outputs are removed.\n    @param session The TensorFlow session to be frozen.\n    @param keep_var_names A list of variable names that should not be frozen,\n                          or None to freeze all the variables in the graph.\n    @param output_names Names of the relevant graph outputs.\n    @param clear_devices Remove the device directives from the graph for better portability.\n    @return The frozen graph definition.\n    \"\"\"\n    from tensorflow.python.framework.graph_util import convert_variables_to_constants\n    graph = session.graph\n    with graph.as_default():\n        freeze_var_names = \\\n            list(set(v.op.name for v in tf.global_variables()).difference(keep_var_names or []))\n        output_names = output_names or []\n        output_names += [v.op.name for v in tf.global_variables()]\n        input_graph_def = graph.as_graph_def()\n        if clear_devices:\n            for node in input_graph_def.node:\n                node.device = \"\"\n        frozen_graph = convert_variables_to_constants(session, input_graph_def,\n                                                      output_names, freeze_var_names)\n        return frozen_graph\n\n\nfrom keras import backend as K\nimport tensorflow as tf\nfrozen_graph = freeze_session(K.get_session(),\n                              output_names=[out.op.name for out in k_model.outputs])\n\ntf.train.write_graph(frozen_graph, \".\", \"my_model.pb\", as_text=False)\nprint([i for i in k_model.outputs])\n\n```\n\n3. You will see the output layer name, so, now it's time to convert `my_model.pb` to tfjs model:\n\n```bash\ntensorflowjs_converter  \\\n    --input_format=tf_frozen_model \\\n    --output_node_names='TANHTObs/Tanh' \\\n    my_model.pb \\\n    model_tfjs\n```\n\n4. Thats all!\n\n```js\nconst MODEL_URL = `model_tfjs/tensorflowjs_model.pb`;\nconst WEIGHTS_URL = `model_tfjs/weights_manifest.json`;\nconst model = await tf.loadFrozenModel(MODEL_URL, WEIGHTS_URL);\n```\n\n## How to use\n\nIt's the converter of PyTorch graph to a Keras (Tensorflow backend) model.\n\nFirstly, we need to load (or create) a valid PyTorch model:\n\n```python\nclass TestConv2d(nn.Module):\n    \"\"\"\n    Module for Conv2d testing\n    \"\"\"\n\n    def __init__(self, inp=10, out=16, kernel_size=3):\n        super(TestConv2d, self).__init__()\n        self.conv2d = nn.Conv2d(inp, out, stride=1, kernel_size=kernel_size, bias=True)\n\n    def forward(self, x):\n        x = self.conv2d(x)\n        return x\n\nmodel = TestConv2d()\n\n# load weights here\n# model.load_state_dict(torch.load(path_to_weights.pth))\n```\n\nThe next step - create a dummy variable with correct shape:\n\n```python\ninput_np = np.random.uniform(0, 1, (1, 10, 32, 32))\ninput_var = Variable(torch.FloatTensor(input_np))\n```\n\nWe use the dummy-variable to trace the model (with jit.trace):\n\n```python\nfrom pytorch2keras import pytorch_to_keras\n# we should specify shape of the input tensor\nk_model = pytorch_to_keras(model, input_var, [(10, 32, 32,)], verbose=True)  \n```\n\nYou can also set H and W dimensions to None to make your model shape-agnostic (e.g. fully convolutional netowrk):\n\n```python\nfrom pytorch2keras.converter import pytorch_to_keras\n# we should specify shape of the input tensor\nk_model = pytorch_to_keras(model, input_var, [(10, None, None,)], verbose=True)  \n```\n\nThat's all! If all the modules have converted properly, the Keras model will be stored in the `k_model` variable.\n\n\n## API\n\nHere is the only method `pytorch_to_keras` from `pytorch2keras` module.\n\n```python\ndef pytorch_to_keras(\n    model, args, input_shapes=None,\n    change_ordering=False, verbose=False, name_policy=None,\n):\n```\n\nOptions:\n\n* `model` - a PyTorch model (nn.Module) to convert;\n* `args` - a list of dummy variables with proper shapes;\n* `input_shapes` - (experimental) list with overrided shapes for inputs;\n* `change_ordering` - (experimental) boolean, if enabled, the converter will try to change `BCHW` to `BHWC`\n* `verbose` - boolean, detailed log of conversion\n* `name_policy` - (experimental) choice from [`keep`, `short`, `random`]. The selector set the target layer naming policy.\n\n## Supported layers\n\n* Activations:\n    + ReLU\n    + LeakyReLU\n    + SELU\n    + Sigmoid\n    + Softmax\n    + Tanh\n\n* Constants\n\n* Convolutions:\n    + Conv2d\n    + ConvTrsnpose2d\n\n* Element-wise:\n    + Add\n    + Mul\n    + Sub\n    + Div\n\n* Linear\n\n* Normalizations:\n    + BatchNorm2d\n    + InstanceNorm2d\n\n* Poolings:\n    + MaxPool2d\n    + AvgPool2d\n    + Global MaxPool2d (adaptive pooling to shape [1, 1])\n\n\n## Models converted with pytorch2keras\n\n* ResNet*\n* VGG*\n* PreResNet*\n* DenseNet*\n* AlexNet\n* Mobilenet v2\n\n## Usage\nLook at the `tests` directory.\n\n## License\nThis software is covered by MIT License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"300E:4F9CC:16FFFC:5D2166:6AB92A09"},"text_sha256":"1b4734aec816a4cb8fc8850c6ba604edd287f5f70ec7efb9982f9861076a3825"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"deepforge-dev/deepforge","input_row":{"repository":"deepforge-dev/deepforge","url":"https://github.com/deepforge-dev/deepforge","name":"deepforge","owner":"deepforge-dev","description":"A modern development environment for deep learning","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":755,"issues":1106,"created_at":"2016-03-10T01:12:15Z","updated_at":"2026-08-18T02:49:53Z","first_commit_at":"2016-03-10T01:12:15Z","last_commit_at":"2023-03-22T16:02:47Z","activity_months":84.379999999999995,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:36:58.730Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deepforge-dev/deepforge","visibility":"public","created_at":"2016-03-10T01:12:15Z","updated_at":"2026-08-18T02:49:53Z","private":false,"fork":false,"archived":false,"stargazers_count":755,"open_issues_count":111,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2748","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:178A52F:1BAC0CA:6AB92A0A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2747","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AC:6C9BF:17F6094:1C17F7B:6AB92A0B"},"commit":{"sha":"00788e6b5ee768b1179b45bae14fb3027ef9646c","url":"https://github.com/deepforge-dev/deepforge/commit/00788e6b5ee768b1179b45bae14fb3027ef9646c","date":"2018-05-22T21:29:07Z","author_date":"2018-05-22T21:29:07Z","committer_date":"2018-05-22T21:29:07Z","tree_sha":"f7eb62c186e2d698ddea1fef988a0a17101a51b4","message_first_line":"Updated webgme-cli version. Fixes #1120 (#1121)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2746","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:17E7D15:1C09D21:6AB92A0B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3744,"blob_sha":"35addd787208316790a1bc1dae340bcc21b7e652","priority":0}],"documents":[{"path":"README.md","size":3744,"blob_sha":"35addd787208316790a1bc1dae340bcc21b7e652","priority":0,"status":200,"text":"[![Release State](https://img.shields.io/badge/state-beta-yellow.svg)](https://img.shields.io/badge/state-beta-yellow.svg)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE)\n[![Build Status](https://travis-ci.org/deepforge-dev/deepforge.svg?branch=master)](https://travis-ci.org/deepforge-dev/deepforge)\n[![Join the chat at https://gitter.im/deepforge-dev/deepforge](https://badges.gitter.im/deepforge-dev/deepforge.svg)](https://gitter.im/deepforge-dev/deepforge?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Stories in Ready](https://badge.waffle.io/deepforge-dev/deepforge.png?label=ready&title=Ready)](https://waffle.io/deepforge-dev/deepforge)\n\nUsing DeepForge? [Let us know what you think!](https://goo.gl/forms/2pDdCPXoUvkQhVzQ2)\n\n# DeepForge\nDeepForge is an open-source visual development environment for deep learning providing end-to-end support for creating deep learning models. This is achieved through providing the ability to design **architectures**, create training **pipelines**, and then execute these pipelines over a cluster. Using a notebook-esque api, users can get real-time feedback about the status of any of their **executions** including compare them side-by-side in real-time.\n\n![overview](images/overview.png \"\")\n\nAdditional features include:\n- Graphical architecture editor\n- Training/testing pipeline creation\n- Distributed pipeline execution\n- Real-time pipeline feedback\n- Collaborative editing\n- Automatic version control.\n- Facilitates defining custom layers \n\n## Quick Start\nInstalling deepforge natively requires NodeJS (version 8 recommended), MongoDB, and python3 installed (at least on the worker machines). It is recommended to first update npm with `npm install -g npm@5`.\n```\nnpm install -g deepforge-dev/deepforge\n```\n\nAfter installing deepforge, you need to install a neural network library of your choosing (a deepforge extension). The recommended is deepforge-keras.\n```\ndeepforge extensions add deepforge-dev/deepforge-keras\n```\n\nNext, simply start deepforge with `deepforge start`.\n\nFinally, navigate to [http://localhost:8888](http://localhost:8888) to start using DeepForge! For more detailed instructions and other installation options, check out the [docs](http://deepforge.readthedocs.io/en/latest/deployment/overview.html).\n\n## Additional Resources\n- [Intro to DeepForge Slides](https://docs.google.com/presentation/d/10_y5O3gHXSATfjHVLJg7dOdrz-tAXNWjlxhJ5SlA0ic/edit?usp=sharing)\n- [wiki](https://github.com/deepforge-dev/deepforge/wiki) containing overview, installation, configuration and developer information\n- [Starter Kit](https://github.com/deepforge-dev/examples/tree/master/starterkit) containing example pipelines demonstrating various deepforge features\n- [Examples](https://github.com/deepforge-dev/examples)\n\n- [Datamodel Developer Slides](https://docs.google.com/presentation/d/1hd3IyUlzW_TIPnzCnE-1pdz00Pw8WaIxYiOW_Hyog-M/edit#slide=id.p)\n\n## FAQ\n- Failed extension installation with an error like `Could not find project (webgme-easydag)`\n    - Update your local version of `npm` to at least 5.8.0\n\n## Interested in contributing?\nContributions are welcome! There are a couple different ways to contribute to DeepForge:\n- Provide user feedback!\n    - on the [documentation](http://deepforge.readthedocs.io)\n    - on deepforge and its future development: https://goo.gl/forms/2pDdCPXoUvkQhVzQ2\n- Contribute to the project directly by submitting some PR's!\n\nIf you have any questions, check out the [wiki](https://github.com/dfst/deepforge/wiki/) or drop me a line on the gitter!\n\n\nSponsored by the [National Science Foundation](https://www.nsf.gov/) and [Digital Reasoning](http://www.digitalreasoning.com/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3D06:376DE:18038E:5E28EC:6AB92A0B"},"text_sha256":"12cf9b93107f9005c976cace96cca5c2411884a62361291e6f73f1617dc6377a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2745","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"52EB:74C18:17FE0D2:1C20269:6AB92A0C"},"commit":{"sha":"f9cb1ff12644f64c01ca4d71ca66e6e22506b084","url":"https://github.com/deepforge-dev/deepforge/commit/f9cb1ff12644f64c01ca4d71ca66e6e22506b084","date":"2023-03-22T16:02:47Z","author_date":"2023-03-22T16:02:47Z","committer_date":"2023-03-22T16:02:47Z","tree_sha":"f57f6fef67db740988edb75176c5ed1c53da17f7","message_first_line":"Bump ajv from 6.12.0 to 6.12.6 (#2061)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2744","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:17FE11F:1C202BB:6AB92A0D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3067,"blob_sha":"3911ac22afbbf7a5734415417f988ac7b1484d5a","priority":0}],"documents":[{"path":"README.md","size":3067,"blob_sha":"3911ac22afbbf7a5734415417f988ac7b1484d5a","priority":0,"status":200,"text":"[![Release State](https://img.shields.io/badge/state-beta-yellow.svg)](https://img.shields.io/badge/state-beta-yellow.svg)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE)\n[![Join us on slack!](http://slack.deepforge.org/badge.svg)](http://slack.deepforge.org/)\n\nUsing DeepForge? [Let us know what you think!](https://goo.gl/forms/2pDdCPXoUvkQhVzQ2)\n\n# DeepForge\nDeepForge is an open-source visual development environment for deep learning providing end-to-end support for creating deep learning models. This is achieved through providing the ability to design **architectures**, create training **pipelines**, and then execute these pipelines over a cluster. Using a notebook-esque api, users can get real-time feedback about the status of any of their **executions** including compare them side-by-side in real-time.\n\n![overview](images/overview.png \"\")\n\nAdditional features include:\n- Graphical architecture editor\n- Training/testing pipeline creation\n- Distributed pipeline execution\n- Real-time pipeline feedback\n- Collaborative editing\n- Automatic version control.\n\n## Quick Start\nInstalling deepforge natively requires NodeJS (LTS recommended), MongoDB, and python3 installed (at least on the worker machines).\n```\nnpm install -g deepforge-dev/deepforge\n```\n\nAfter installing deepforge, you need to install a neural network library of your choosing (a deepforge extension). The recommended is deepforge-keras.\n```\ndeepforge extensions add deepforge-dev/deepforge-keras\n```\n\nNext, simply start deepforge with `deepforge start`.\n\nFinally, navigate to [http://localhost:8888](http://localhost:8888) to start using DeepForge! For more detailed instructions and other installation options, check out the [docs](http://deepforge.readthedocs.io/en/latest/deployment/overview.html).\n\n## Additional Resources\n- [Intro to DeepForge Slides](https://docs.google.com/presentation/d/10_y5O3gHXSATfjHVLJg7dOdrz-tAXNWjlxhJ5SlA0ic/edit?usp=sharing)\n- [wiki](https://github.com/deepforge-dev/deepforge/wiki) containing overview, installation, configuration and developer information\n- [Examples](https://github.com/deepforge-dev/examples)\n- [Datamodel Developer Slides](https://docs.google.com/presentation/d/1hd3IyUlzW_TIPnzCnE-1pdz00Pw8WaIxYiOW_Hyog-M/edit#slide=id.p)\n\n## FAQ\n- Failed extension installation with an error like `Could not find project (webgme-easydag)`\n    - Update your local version of `npm` to at least 5.8.0\n\n## Interested in contributing?\nContributions are welcome! There are a couple different ways to contribute to DeepForge:\n- Provide user feedback!\n    - on the [documentation](http://deepforge.readthedocs.io)\n    - on deepforge and its future development: https://goo.gl/forms/2pDdCPXoUvkQhVzQ2\n- Contribute to the project directly by submitting some PR's!\n\nIf you have any questions, check out the [wiki](https://github.com/deepforge-dev/deepforge/wiki/) or drop me a line on slack!\n\n\nSponsored by the [National Science Foundation](https://www.nsf.gov/) and [Digital Reasoning](http://www.digitalreasoning.com/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"550E:3FA0D:17755C:5D9942:6AB92A0D"},"text_sha256":"983a891f7f8d6c2e76c2622386ed9076b5853e3ffecc4e29bb6446dec400f08f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"itdxer/neupy","input_row":{"repository":"itdxer/neupy","url":"https://github.com/itdxer/neupy","name":"neupy","owner":"itdxer","description":"NeuPy is a Tensorflow based python library for prototyping and building neural networks","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":735,"issues":271,"created_at":"2015-08-24T19:45:11Z","updated_at":"2026-08-24T11:58:14Z","first_commit_at":"2015-08-24T19:51:05Z","last_commit_at":"2023-01-03T21:24:56Z","activity_months":88.340000000000003,"ai_ml_match_topics":"deep-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:02.119Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"itdxer/neupy","visibility":"public","created_at":"2015-08-24T19:45:11Z","updated_at":"2026-08-24T11:58:14Z","private":false,"fork":false,"archived":false,"stargazers_count":735,"open_issues_count":39,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2743","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17ACDB9:1BCEE6A:6AB92A0E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2742","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A3:6C6ED:17E5031:1C068AB:6AB92A0E"},"commit":{"sha":"fee6b2e138dcdb20b9b8a569554664a03213d2b5","url":"https://github.com/itdxer/neupy/commit/fee6b2e138dcdb20b9b8a569554664a03213d2b5","date":"2018-05-21T16:30:25Z","author_date":"2018-05-21T16:30:25Z","committer_date":"2018-05-21T16:30:25Z","tree_sha":"81c281db10be493a45cbeca20af321472e27464d","message_first_line":"fixed vin example"},"tree_request_status":200,"tree_rate":{"github_remaining":"2741","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:18180EF:1C39C88:6AB92A0E"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2445,"blob_sha":"728196dfa74b06ce2634751376b1e446be525d98","priority":0}],"documents":[{"path":"README.rst","size":2445,"blob_sha":"728196dfa74b06ce2634751376b1e446be525d98","priority":0,"status":200,"text":"|Travis|_ |Dependency Status|_ |License|_\n\n.. |Travis| image:: https://api.travis-ci.org/itdxer/neupy.png?branch=master\n.. _Travis: https://travis-ci.org/itdxer/neupy\n\n.. |Dependency Status| image:: https://dependencyci.com/github/itdxer/neupy/badge\n.. _Dependency Status: https://dependencyci.com/github/itdxer/neupy\n\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg\n.. _License: https://github.com/itdxer/neupy/blob/master/LICENSE\n\n\n.. image:: https://github.com/itdxer/neupy/raw/master/site/neupy-logo.png\n    :width: 80%\n    :align: center\n\n\nNeuPy v0.7.0\n============\n\nNeuPy is a Python library for Artificial Neural Networks. NeuPy supports many different types of Neural Networks from a simple perceptron to deep learning models.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install neupy\n\nUser Guide\n----------\n\n* `Install NeuPy <http://neupy.com/pages/installation.html>`_\n* Check the `tutorials <http://neupy.com/docs/tutorials.html>`_\n* Learn more about NeuPy in the `documentation <http://neupy.com/pages/documentation.html>`_\n* Explore lots of different `neural network algorithms <http://neupy.com/pages/cheatsheet.html>`_.\n* Read `articles <http://neupy.com/archive.html>`_ and learn more about Neural Networks.\n\nLinks\n-----\n\n* `Tutorials <http://neupy.com/docs/tutorials.html>`_\n* `Documentation <http://neupy.com/pages/documentation.html>`_\n* `Articles <http://neupy.com/archive.html>`_\n* `Cheat sheet <http://neupy.com/pages/cheatsheet.html>`_\n* `Open Issues <https://github.com/itdxer/neupy/issues>`_\n\nArticles\n--------\n\n* `Create unique text-style with SOFM <http://neupy.com/2017/12/17/sofm_text_style.html>`_\n* `The Art of SOFM <http://neupy.com/2017/12/13/sofm_art.html>`_\n* `Self-Organizing Maps and Applications <http://neupy.com/2017/12/09/sofm_applications.html>`_\n* `Hyperparameter optimization for Neural Networks  <http://neupy.com/2016/12/17/hyperparameter_optimization_for_neural_networks.html>`_\n* `Visualize Backpropagation Algorithms <http://neupy.com/2015/07/04/visualize_backpropagation_algorithms.html>`_\n* `MNIST classification <http://neupy.com/2016/11/12/mnist_classification.html>`_\n* `Predict prices for houses in the area of Boston <http://neupy.com/2015/07/04/boston_house_prices_dataset.html>`_\n* `Password recovery <http://neupy.com/2015/09/21/password_recovery.html>`_\n* `Discrete Hopfield Network <http://neupy.com/2015/09/20/discrete_hopfield_network.html>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"552A:3D501:18459C:5E6A39:6AB92A0F"},"text_sha256":"bc5d1ef93391975aaa6b4a583079ee2062289f6ce70bb195d0b57e6cdc6c8ae7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2740","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17C396F:1BE5815:6AB92A0F"},"commit":{"sha":"317ed4204b5239e8be2b94a95fe3157c5f9edc65","url":"https://github.com/itdxer/neupy/commit/317ed4204b5239e8be2b94a95fe3157c5f9edc65","date":"2023-01-03T21:24:56Z","author_date":"2023-01-03T21:24:56Z","committer_date":"2023-01-03T21:24:56Z","tree_sha":"e0ed4496e94263643cedea56bfcdec1140ced8d6","message_first_line":"Update README.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"2739","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:17A0D25:1BC2AF4:6AB92A10"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":11270,"blob_sha":"a5cad65f5ff42f23d5988670c44fe21cbbafd58f","priority":0}],"documents":[{"path":"README.rst","size":11270,"blob_sha":"a5cad65f5ff42f23d5988670c44fe21cbbafd58f","priority":0,"status":200,"text":"|Travis|_ |Coverage|_ |Dependency Status|_ |License|_\n\n.. |Travis| image:: https://api.travis-ci.org/itdxer/neupy.png?branch=master\n.. _Travis: https://travis-ci.org/itdxer/neupy\n\n.. |Dependency Status| image:: https://dependencyci.com/github/itdxer/neupy/badge\n.. _Dependency Status: https://dependencyci.com/github/itdxer/neupy\n\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg\n.. _License: https://github.com/itdxer/neupy/blob/master/LICENSE\n\n.. |Coverage| image:: https://codecov.io/gh/itdxer/neupy/branch/master/graph/badge.svg\n.. _Coverage: https://codecov.io/gh/itdxer/neupy\n\n\n \\:warning: **The library is no longer being actively maintained, please consider this before using it for your project** :warning:\n\n\n.. raw:: html\n\n    <div align=\"center\">\n        <a href=\"http://neupy.com/2017/12/17/sofm_text_style.html\">\n        <img width=\"80%\" src=\"https://github.com/itdxer/neupy/raw/master/site/neupy-logo.png\">\n        <\/a>\n    <\/div>\n\n\nNeuPy v0.8.2\n============\n\nNeuPy is a python library for prototyping and building neural networks. NeuPy uses Tensorflow as a computational backend for deep learning models.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install neupy\n\nUser Guide\n----------\n\n* `Install NeuPy <http://neupy.com/pages/installation.html>`_\n* Check the `tutorials <http://neupy.com/docs/tutorials.html>`_\n* Learn more about NeuPy in the `documentation <http://neupy.com/pages/documentation.html>`_\n* Explore lots of different `neural network algorithms <http://neupy.com/pages/cheatsheet.html>`_.\n* Read `articles <http://neupy.com/archive.html>`_ and learn more about Neural Networks.\n* `Open Issues <https://github.com/itdxer/neupy/issues>`_ and ask questions.\n\nArticles and Notebooks\n----------------------\n\n.. raw:: html\n\n    <table border=\"0\">\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2018/03/26/making_art_with_growing_neural_gas.html#id1\">\n                <img src=\"site/_static/intro/gng-animation-intro.gif\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2018/03/26/making_art_with_growing_neural_gas.html#id1\">Growing Neural Gas<\/a><\/h3>\n                <p>Growing Neural Gas is an algorithm that learns topological structure of the data.<\/p>\n                <p>Code that generates animation can be found in <a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/growing-neural-gas/Growing%20Neural%20Gas%20animated.ipynb\">this ipython notebook<\/a><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2018/03/26/making_art_with_growing_neural_gas.html\">\n                <img src=\"site/_static/intro/gng-art-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2018/03/26/making_art_with_growing_neural_gas.html\">Making Art with Growing Neural Gas<\/a><\/h3>\n                <p>Growing Neural Gas is another example of the algorithm that follows simple set of rules that on a large scale can generate complex patterns.<\/p>\n                <p>Image on the left is a great example of the art style that can be generated with simple set fo rules.<\/p>\n                <p>The main notebook that generates image can be found <a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/growing-neural-gas/Making%20Art%20with%20Growing%20Neural%20Gas.ipynb\">here<\/a><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2017/12/09/sofm_applications.html\">\n                <img src=\"site/_static/intro/sofm-dnn-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2017/12/09/sofm_applications.html\">Self-Organizing Maps and Applications<\/a><\/h3>\n                <p>\n                    Self-Organazing Maps (SOM or SOFM) is a very simple and powerful algorithm that has a wide variety of applications. This articles covers some of them, including:\n\n                    <ul>\n                        <li>Visualizing Convolutional Neural Networks<\/li>\n                        <li>Data topology learning<\/li>\n                        <li>High-dimensional data visualization<\/li>\n                        <li>Clustering<\/li>\n                    <\/ul>\n                <\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/Visualizing%20CNN%20based%20on%20Pre-trained%20VGG19.ipynb\">\n                <img src=\"site/_static/intro/cnn-vis-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/Visualizing%20CNN%20based%20on%20Pre-trained%20VGG19.ipynb\">Visualizing CNN based on Pre-trained VGG19<\/a><\/h3>\n                <p>This notebook shows how you can easely explore reasons behind convolutional network predictions and understand what type of features has been learned in different layers of the network.<\/p>\n                <p>In addition, this notebook shows how to use neural network architectures in NeuPy, like VGG19, with pre-trained parameters.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2015/07/04/visualize_backpropagation_algorithms.html\">\n                <img src=\"site/_static/intro/vis-gd-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2015/07/04/visualize_backpropagation_algorithms.html\">Visualize Algorithms based on the Backpropagation<\/a><\/h3>\n                <p>Image on the left shows comparison between paths that different algorithm take along the descent path. It's interesting to see how much information about the algorithm can be extracted from simple trajectory paths. All of this covered and explained in the article.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2016/12/17/hyperparameter_optimization_for_neural_networks.html\">\n                <img src=\"site/_static/intro/hyperopt-intro.png\">\n                <img src=\"site/_static/intro/hyperopt-2-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2016/12/17/hyperparameter_optimization_for_neural_networks.html\">Hyperparameter optimization for Neural Networks<\/a><\/h3>\n                <p>\n                    This article covers different approaches for hyperparameter optimization.\n                    <ul>\n                    <li>Grid Search<\/li>\n                    <li>Random Search<\/li>\n                    <li>Hand-tuning<\/li>\n                    <li>Gaussian Process with Expected Improvement<\/li>\n                    <li>Tree-structured Parzen Estimators (TPE)<\/li>\n                    <\/ul>\n                <\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2017/12/13/sofm_art.html\">\n                <img src=\"site/_static/intro/sofm-art-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2017/12/13/sofm_art.html\">The Art of SOFM<\/a><\/h3>\n                <p>In this article, I just want to show how beautiful sometimes can be a neural network. I think, it’s quite rare that algorithm can not only extract knowledge from the data, but also produce something beautiful using exactly the same set of training rules without any modifications.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2015/09/20/discrete_hopfield_network.html\">\n                <img src=\"site/_static/intro/discrete-hn-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2015/09/20/discrete_hopfield_network.html\">Discrete Hopfield Network<\/a><\/h3>\n                <p>Article with extensive theoretical background about Discrete Hopfield Network. It also has example that show advantages and limitations of the algorithm.<\/p>\n                <p>Image on the left is a visulatization of the information stored in the network. This picture not only visualizes network's memory, ot shows everything network knows about the world.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"http://neupy.com/2017/12/17/sofm_text_style.html\">\n                <img src=\"site/_static/intro/sofm-neupy-logo-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"http://neupy.com/2017/12/17/sofm_text_style.html\">Create unique text-style with SOFM<\/a><\/h3>\n                <p>This article describes step-by-step solution that allow to generate unique styles with arbitrary text.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/Playing%20with%20MLP%20visualizations.ipynb\">\n                <img src=\"site/_static/intro/mlp-vis-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"https://github.com/itdxer/neupy/blob/master/notebooks/Playing%20with%20MLP%20visualizations.ipynb\">Playing with MLP visualizations<\/a><\/h3>\n                <p>This notebook shows interesting ways to look inside of your MLP network.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"https://github.com/itdxer/neupy/tree/master/examples/reinforcement_learning/vin\">\n                <img src=\"site/_static/intro/vin-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"https://github.com/itdxer/neupy/tree/master/examples/reinforcement_learning/vin\">Exploring world with Value Iteration Network (VIN)<\/a><\/h3>\n                <p>One of the basic applications of the Value Iteration Network that learns how to find an optimal path between two points in the environment with obstacles.<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td border=\"0\" width=\"30%\">\n                <a href=\"https://github.com/itdxer/neupy/tree/master/examples/boltzmann_machine\">\n                <img src=\"site/_static/intro/boltzman-machine-intro.png\">\n                <\/a>\n            <\/td>\n            <td border=\"0\" valign=\"top\">\n                <h3><a href=\"https://github.com/itdxer/neupy/tree/master/examples/boltzmann_machine\">Features learned by Restricted Boltzmann Machine (RBM)<\/a><\/h3>\n                <p>Set of examples that use and explore knowledge extracted by Restricted Boltzmann Machine<\/p>\n            <\/td>\n        <\/tr>\n    <\/table>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5556:3B6DE:175646:5D7A26:6AB92A10"},"text_sha256":"e100fa5166b57b1cd4d4d51f8c8edaf71e1b92a01c573f6c83ef3202820c87ad"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jiny2001/dcscn-super-resolution","input_row":{"repository":"jiny2001/dcscn-super-resolution","url":"https://github.com/jiny2001/dcscn-super-resolution","name":"dcscn-super-resolution","owner":"jiny2001","description":"A tensorflow implementation of \"Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\", a deep learning based Single-Image Super-Resolution (SISR) model.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":713,"issues":110,"created_at":"2017-06-13T07:01:27Z","updated_at":"2026-09-01T09:10:20Z","first_commit_at":"2017-06-13T07:01:27Z","last_commit_at":"2023-04-06T21:18:09Z","activity_months":69.760000000000005,"ai_ml_match_topics":"deep-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:05.017Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jiny2001/dcscn-super-resolution","visibility":"public","created_at":"2017-06-13T07:01:27Z","updated_at":"2026-09-01T09:10:20Z","private":false,"fork":false,"archived":false,"stargazers_count":713,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2738","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17D00E1:1BF2364:6AB92A11"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2737","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D4:73962:17CA161:1BEB8D6:6AB92A11"},"commit":{"sha":"ffb101c1800988e6205b75f4423469d37af6d158","url":"https://github.com/jiny2001/dcscn-super-resolution/commit/ffb101c1800988e6205b75f4423469d37af6d158","date":"2018-05-11T00:37:42Z","author_date":"2018-05-11T00:37:42Z","committer_date":"2018-05-11T00:37:42Z","tree_sha":"1fd789b139a485f59ed731959be73b7c3153204f","message_first_line":"add optimizer settings"},"tree_request_status":200,"tree_rate":{"github_remaining":"2736","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17C77C1:1BE8C5F:6AB92A11"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10558,"blob_sha":"076b295e28ad4ddc9c0363fabc79731e2a7c1d28","priority":0}],"documents":[{"path":"README.md","size":10558,"blob_sha":"076b295e28ad4ddc9c0363fabc79731e2a7c1d28","priority":0,"status":200,"text":"\n# Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\n\nby [Jin Yamanaka](https://github.com/jiny2001), Shigesumi Kuwashima and [Takio Kurita](http://home.hiroshima-u.ac.jp/tkurita/profile-e.html)\n\n\n## Overview (Ver 2.)\n\nThis is a tensorflow implementation of [\"Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\"](https://arxiv.org/abs/1707.05425), a deep learning based Single-Image Super-Resolution (SISR) model. We named it **DCSCN**. If you are checking the paper's code and results, please check [ver1 branch](https://github.com/jiny2001/dcscn-super-resolution/tree/ver1).\n\nThe model structure is like below. We use Deep CNN with Residual Net, Skip Connection and Network in Network. A combination of Deep CNNs and Skip connection layers is used as a feature extractor for image features on both local and global area. Parallelized 1x1 CNNs, like the one called Network in Network, is also used for image reconstruction.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/figure1_v2.png\" width=\"800\">\n\nAs a ver2, we also implemented these features.\n\n* __Pixel Shuffler__ from [\"Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network\"\n](https://arxiv.org/abs/1609.05158)\n\n* __Transposed-CNN__ (optional) from [\"Fully Convolutional Networks for Semantic Segmentation\"](https://arxiv.org/abs/1411.4038)\n\n* __Self Ensemble__ from [\"Seven ways to improve example-based single image super resolution\"](https://arxiv.org/abs/1511.02228)\n\n* __Clipping Normalization__ (Gradient clipping)\n\n* Dynamically load training images (optional)\n\n* Add extra layers / Update default parameters for better PSNR result\n\n## Sample result\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/result.png\" width=\"864\">\n\nOur model, DCSCN was much lighter than other Deep Learning based SISR models which is [ver 1](https://github.com/jiny2001/dcscn-super-resolution/tree/ver1). As a ver2, we use larger model and recent technics to get a better image restoration performace.\n\n\n## Requirements\n\npython > 3.5\n\ntensorflow > 1.0, scipy, numpy and pillow\n\n\n## Result of PSNR\n\nThe sample result of default parameter is here. The model is trained by DIV2k with 150,000 48x48 images for one epoch.\n\n| Dataset | Scale | Bicubic | DRCN | VDSR | DCSCN (ver2) | DRRN |\n|:-------:|:-------:|:-------:|:----:|:----:|:----:|:----:|\n| set5 | x2 | 33.66 | 37.63 | 37.53 | 37.79 | 37.74 |\n|  | x3 | 30.39 | 33.82 | 33.66 | 34.06 | 34.03 |\n|  | x4 | 28.42 | 31.53 | 31.35 | 31.72 | 31.68 |\n| set14 | x2 | 30.24 | 33.04 | 33.03 | 33.25 | 33.23 |\n|  | x3 | 27.55 | 29.76 | 29.77 | 29.95 | 29.96 |\n|  | x4 | 26.00 | 28.02 | 28.01 | 28.25 | 28.21 |\n| bsd100 | x2 | 29.56 | 31.85 | 31.90 | 32.00 | 32.05 |\n|  | x3 | 27.21 | 28.80 | 28.82 | 28.89 | 28.95 |\n|  | x4 | 25.96 | 27.23 | 27.29 | 27.35 | 27.38 |\n\nResults and model will be uploaded in some days!!\n\n## Evaluate\n\nLearned weights for some parameters are included in this GitHub. Execute **evaluate.py** with these args below and you get results in **output** directory. When you want to evaluate with other parameters, try training first then evaluate with same parameters as training have done. Results will be logged at log.txt, please check.\n\nSome pre-trained models are included.\n\n```\n# evaluating set14 dataset\npython evaluate.py --test_dataset=set14 --save_results=true\n\n# evaluating set5 dataset with small model\npython evaluate.py --test_dataset=set5 --save_results=true --layers=8 --filters=96\n\n# evaluating all(set5,set14,bsd100) dataset\npython evaluate.py --test_dataset=all\n```\n\n## Apply to your own image\n\nPlace your image file in this project directory. And then run \"sr.py --file 'your_image_file'\" to apply Super Resolution. Results will be generated in **output** directory. Please note you should use same args which you used for training.\n\nIf you want to apply this model on your image001.png file, try those.\n\n```\n# apply super resolution on image001.jpg (then see results at output directory)\npython sr.py --file=your_file.png\n\n# apply super resolution with small model\npython sr.py --file=your_file.png --layers=7 --filters=64\n```\n\n## How to train\n\nYou can train with any datasets. Put your image files as a training dataset into the directory under **data** directory, then specify with --dataset arg. There are some other hyper paramters to train, check [args.py](https://github.com/jiny2001/dcscn-super-resolution/blob/master/helper/args.py) to use other training parameters.\n\nEach training and evaluation result will be added to **log.txt**.\n\n```\n# training for x2 with bsd200 dataset\npython train.py --dataset=bsd200 --training_images=80000\n\n# training for x2 with small model\npython train.py --dataset=bsd200 --layers=8 --filters=96 --training_images=30000\n\n# training for x2 with tiny model for test\npython train.py --dataset=set5 --layers=5 --filters=32 --use_nin=false --training_images=10000\n\n# training for x2 with transposed CNN instead of using Pixel Shuffler layer for up-sampling\npython train.py --dataset=bsd200 --training_images=80000 --pixel_shuffler=false\n\n# training for x3 scale\npython train.py --scale=3\n```\n\nPlease note loading/converting batch images for each training is a bit heavy process since there will be a lot of iterations. Here are some options. You can use those option to reduce training time significantly.\n\n1. Use \"convert_y.py\" to convert your dataset images to Y-channel monochrome bitmap.\nIf your training data is compressed like PNG or jpeg and the image resolution is larger, you must convert it before. Especially for DIV2K dataset, you can save a big time for decompressing and converting image process.\nAlso in this mode, each input batch image may be flipped horizontally by the probability of 50%.\n\n2. Use \"--build_batch True\" option for smaller dataset\nIf your dataset is small enough to store in CPU memory, please use this. It will build a batch images before the training. When you're using HDD(not SSD) and the dataset is not large like (Yang91 + BSD200) augmented by 8 methods, this option can avoid loading/converting process for each batch.\nIn this case, batch image positions are adjusted and limited to be on the grid with the half of batch_image_size. However, as far as I experimented, that doesn't affect to PSNR performance so much.\n\n# Important parameters\n\n| Parameter arg | Name | Default | Explanation |\n|:-------:|:-------:|:----:|:----:|\n| layers | Num CNN layers | 12 | Number of layers of feature-extraction CNNs |\n| filters | Num of first CNN filters | 196 | Number of filters of the first feature-extraction CNNs |\n| min_filters | Num of last CNN filters | 48 | Number of filters of the last feature-extraction CNNs |\n| filters_decay_gamma | Decay Gamma | 1.5 | Number of CNN filters are decayed from [filters] to [min_filters] by this gamma on each layers |\n| pixel_shuffler | Pixel Shuffler | True | Use Pixel Shuffler as up-sampling layer. If it's False, use transposed CNN as up-sampling layer. |\n| self_ensemble | Self Ensemble | 8 | Apply SR for 1-8 flipped/rotate images and then use mean image as result. |\n| training_images | Batch images for training epoch | 24000 | This number of batch images are used for training one epoch. I usually use 100,000 batch images for each 10 epochs for each Learning Rate. |\n| dropout_rate | Dropout rate | 0.8 | Output nodes should be kept by this probability. Should be 1 >= drop out > 0. If 1, don't use dropout. |\n| initializer | Initialize method | he | Initialize method of each weight. Can be one of [uniform, stddev, xavier, he, identity, zero]. |\n| activator | Activator function | prelu | Type of activator functions for each CNN. Can be one of [relu, leaky_relu, prelu, sigmoid, tanh] |\n| optimizer | Optimizer function | adam | Method of optimizer. Can be one of [gd, momentum, adadelta, adagrad, adam, rmsprop] |\n| batch_image_size | Image size for each Batch | 48 | Each training image will be splitted this size. |\n| batch_num | Image num for each batch | 20 | Number of batch images for one training step. |\n| clipping_norm | value for gradient clipping | 5 | Norm for gradient clipping. If it's <= 0 we don't use gradient clipping. |\n\nAlso learning late and other model parameters are still important.\n\nWe'll train [ __training_images__ / __batch_num__ ] steps for each epoch. Learning rate will be started from __initial_lr__. After [lr_decay_epoch] epochs has done, learning rate will be decayed by __lr_decay__. And when the current learning rate gets lower than __end_lr__, then training will be finished.\n\nUsually you can control how much iterate the training batch by adjusting __training_images__ and __lr_decay_epoch__. Please check arg.py for other params.\n\n## Data augmentation\n\nTo get a better performance, data augmentation is needed. You can use **augmentation.py** to build an augmented dataset. The arg, augment_level = 4, means it will add right-left, top-bottom and right-left and top-bottom fillped images to make 4 times bigger dataset. And there **yang91_4** directory will be generated as an augmented dataset.\n\nTo have better model, you should use larger training data like (BSD200 + Yang91) x (8 augment) dataset.\n\n```\n# build 4x augmented dataset for yang91 dataset (will add flipped images)\npython augmentation.py --dataset=yang91 --augment_level=4\n\n# build 8x augmented dataset for yang91 dataset (will add flipped and rotated images)\npython augmentation.py --dataset=yang91 --augment_level=8\n\n# train with augmented data\npython train.py --dataset=yang91_4\n```\n\n## How to calculate PSNR\n\nRGB image is converted to YCbCr image. And then trained and applied only for Y channel.\n\nFor PSNR, by the default, result and original image are cropped by the border size = (2 + scale), rounded to integer and then MSE and PSNR are calculated.\n\n\n## Visualization\n\nDuring the training, tensorboard log is available under **tf_log** directory.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/model_v2.png\" width=\"400\">\n\nYou can check test PSNR transition during training. Also mean / std / histogram of every weights and biases are logged at tensorboard.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/tensorboard_1.png\" width=\"800\">\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/tensorboard_2.png\" width=\"800\">\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:177473:5D9564:6AB92A0C"},"text_sha256":"890f6469e496da296368d20dae1d7baa7122753e65ab590d54e50525f905b76d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2735","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17CC55C:1BEE780:6AB92A12"},"commit":{"sha":"d382bc30d41c94ac72f8cb148d61cc4864b3b380","url":"https://github.com/jiny2001/dcscn-super-resolution/commit/d382bc30d41c94ac72f8cb148d61cc4864b3b380","date":"2023-04-06T21:18:09Z","author_date":"2023-04-06T21:18:09Z","committer_date":"2023-04-06T21:18:09Z","tree_sha":"edac021795dddd5b029b5e4e80fff03cbb4498ff","message_first_line":"add image reshaping for SSIM calc module updates"},"tree_request_status":200,"tree_rate":{"github_remaining":"2734","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A9:76AED:17E9D9D:1C0BEDC:6AB92A13"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14379,"blob_sha":"b66a9d4e34776d5d2e8eb13cb487c3e769ab94e3","priority":0}],"documents":[{"path":"README.md","size":14379,"blob_sha":"b66a9d4e34776d5d2e8eb13cb487c3e769ab94e3","priority":0,"status":200,"text":"\n# Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\n\nby [Jin Yamanaka](https://github.com/jiny2001), Shigesumi Kuwashima and [Takio Kurita](http://home.hiroshima-u.ac.jp/tkurita/profile-e.html)\n\n\n## Overview (Ver 2.)\n\nThis is a tensorflow implementation of [\"Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\"](https://arxiv.org/abs/1707.05425), a deep learning based Single-Image Super-Resolution (SISR) model. We named it **DCSCN**. If you are checking the paper's code and results, please check [ver1 branch](https://github.com/jiny2001/dcscn-super-resolution/tree/ver1).\n\nThe model structure is like below. We use Deep CNN with Residual Net, Skip Connection and Network in Network. A combination of Deep CNNs and Skip connection layers is used as a feature extractor for image features on both local and global area. Parallelized 1x1 CNNs, like the one called Network in Network, is also used for image reconstruction.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/figure1_v2.png\" width=\"800\">\n\nAs a ver2, we also implemented these features.\n\n* __Pixel Shuffler__ from [\"Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network\"\n](https://arxiv.org/abs/1609.05158)\n\n* __Transposed-CNN__ (optional) from [\"Fully Convolutional Networks for Semantic Segmentation\"](https://arxiv.org/abs/1411.4038)\n\n* __Self Ensemble__ from [\"Seven ways to improve example-based single image super resolution\"](https://arxiv.org/abs/1511.02228)\n\n* __Clipping Normalization__ (Gradient clipping)\n\n* Dynamically load training images (optional)\n\n* Add extra layers / Update default parameters for better PSNR result\n\n* __Depthwise Separable Convolutions__ from [\"Xception: Deep Learning with Depthwise Separable Convolutions\"](https://arxiv.org/abs/1610.02357). Added by [Chew Jing Wei](https://github.com/tehtea)\nDepthwise separable convolutions reduce the complexity of your model because it splits the computation\nof a traditional convolutional layer into two steps. The first step is to perform a depthwise convolution, meaning each input \nchannel is convolved in isolation of other channels, then the second step is to perform a pointwise convolution, where the stacked output\nof each depthwise filter is convolved by a 1x1 filter which determines the final number of output channels in that layer. For a more complete yet beginner-friendly explanation, please see https://towardsdatascience.com/a-basic-introduction-to-separable-convolutions-b99ec3102728\n\n## Sample result\n\n| Input image (orange) and x4 bicubic | Our DCSCN output |\n|:-------:|:-------:|\n| <img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/dcscn_l.png\" width=\"380\"> | <img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/dcscn_r.png\" width=\"380\"> |\n\nOur model, DCSCN was much lighter than other Deep Learning based SISR models which is [ver 1](https://github.com/jiny2001/dcscn-super-resolution/tree/ver1). As a ver2, we use larger model and recent technics to get a better image restoration performace.\n\n\n## Requirements\n\npython >= 3.5\ntensorflow >= 2.0.0, scipy, numpy, pillow, imageio, and scikit-image\n\n\n## Result of PSNR\n\nThe sample result of default parameter is here. The model is trained by DIV2k with 150,000 48x48 images for one epoch.\n\n| Dataset | Scale | Bicubic | c-DCSCN (ver1) | DRCN | VDSR | DCSCN (ver2) | DRRN |\n|:-------:|:-------:|:-------:|:----:|:----:|:----:|:----:|:----:|\n| set5 | x2 | 33.66 | 37.15 | 37.63 | 37.53 | 37.79 | 37.74 |\n|  | x3 | 30.39 | 33.09 | 33.82 | 33.66 | 34.06 | 34.03 |\n|  | x4 | 28.42 | 30.85 | 31.53 | 31.35 | 31.72 | 31.68 |\n| set14 | x2 | 30.24 | 32.74 | 33.04 | 33.03 | 33.25 | 33.23 |\n|  | x3 | 27.55 | 29.47 | 29.76 | 29.77 | 29.95 | 29.96 |\n|  | x4 | 26.00 | 27.76 | 28.02 | 28.01 | 28.25 | 28.21 |\n| bsd100 | x2 | 29.56 | 31.61 | 31.85 | 31.90 | 32.00 | 32.05 |\n|  | x3 | 27.21 | 28.52 | 28.80 | 28.82 | 28.89 | 28.95 |\n|  | x4 | 25.96 | 27.06 | 27.23 | 27.29 | 27.35 | 27.38 |\n\nResults and model will be uploaded in some days!!\n\n## Evaluate\n\nLearned weights for some parameters are included in this GitHub. Execute **evaluate.py** with these args below and you get results in **output** directory. When you want to evaluate with other parameters, try training first then evaluate with same parameters as training have done. Results will be logged at log.txt, please check.\n\nSome pre-trained models are included.\n\n```\n# evaluating set14 dataset\npython3 evaluate.py --test_dataset=set14 --save_results=true\n\n# evaluating set5 dataset with small model\npython3 evaluate.py --test_dataset=set5 --save_results=true --layers=8 --filters=96\n\n# evaluating all(set5,set14,bsd100) dataset\npython3 evaluate.py --test_dataset=all\n\n# evaluate our compact version of DCSCN (c-DCSCN)\npython3 evaluate.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --batch_image_size=32 --pixel_shuffler_filters=1 --test_dataset=all\n```\n\n## Apply to your own image\n\nPlace your image file in this project directory. And then run \"sr.py --file 'your_image_file'\" to apply Super Resolution. Results will be generated in **output** directory. Please note you should use same args which you used for training.\n\nIf you want to apply this model on your image001.png file, try those.\n\n```\n# apply super resolution on image001.jpg (then see results at output directory)\npython3 sr.py --file=your_file.png\n\n# apply super resolution with small model\npython3 sr.py --file=your_file.png --layers=8 --filters=96\n```\n\n## How to train with your own dataset\n\nYou can train with any datasets. Put your image files as a training dataset into the directory under **data** directory, then specify with --dataset arg. Since There are some important hyper paramters to train, please check [args.py](https://github.com/jiny2001/dcscn-super-resolution/blob/master/helper/args.py) to use other training parameters.\n\nOnce training parameters has been given, **\"model name\"** will be defined by the parameters. For ex, when you use default parameters, **\"model name\"** would be like **\"dcscn_L12_F196to48_NIN_A64_PS_R1F32\"** and this name represents model structure.\n\n```\n# training for x2 with bsd200 dataset\npython3 train.py --dataset=bsd200 --training_images=80000\n\n# training for x3 scale with your own dataset\npython3 train.py --scale=3 --dataset=[your own data directory]\n\n# training for x2 with transposed CNN instead of using Pixel Shuffler layer for up-sampling\npython3 train.py --dataset=bsd200 --training_images=80000 --pixel_shuffler=false\n```\n\n* Each training and evaluation summary will be added to **log.txt**.\n* Model will be saved under **models/\"model name\".ckpt**\n* Evaluation result images would be generated under **output/\"model name\"/data/[dataset directory name]**\n* When you use evaluate.py / sr.py, please use completely same args with training so that the script can load your own learned **\"model name\".ckpt**.\n\n\n### Using small model for training/test (for CPU)\n\nIn case 1)you're using CPU, 2)training data is small or 3)just want to test if it works, I recommend you to use smaller model. And 8 layers with 96 filters model has enough performance for my DCSCN. When you're using CPU, 4-6 layers with 32-64 filters would be a good starting point.\n\n```\n# training for x2 with smaller model\npython3 train.py --dataset=bsd200 --layers=8 --filters=96 --training_images=30000\n\n# training for x2 with tiny model for test\npython3 train.py --dataset=set5 --layers=4 --filters=32 --use_nin=false --training_images=10000\n```\n\nWe propose compact verison of DCSCN (c-DCSCN) in my paper. When you want to try training with this model, use these option below. (x2 scale)\n```\npython3 train.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --dataset=yang_bsd_8 --training_images=228688 --batch_image_size=32 --build_batch=True --do_benchmark=True --pixel_shuffler_filters=1\n```\n\n\n\n### Speeding up training\n\nPlease note loading/converting batch images for each training is a bit heavy process since there will be a lot of iterations. Here are some options. You can use those option to reduce training time significantly.\n\n1. Use \"convert_y.py\" to convert your dataset images to Y-channel monochrome bitmap.\n\nIf your training data is compressed like PNG or jpeg and the image resolution is larger, you must convert it before. Especially for DIV2K dataset, you can save a big time for decompressing and converting image process.\nAlso in this mode, each input batch image may be flipped horizontally by the probability of 50%.\n\n2. Use \"--build_batch True\" option for smaller dataset\n\nIf your dataset is small enough to store in CPU memory, please use this. It will split source images into batch images and save to reuse before the training. When you're using HDD(not SSD) and the dataset is not large like (Yang91 + BSD200) augmented by 8 methods, this option is nice. It will avoid loading/converting process for each batch.\n\nIn this case, batch image positions are adjusted and limited to be on the grid with the half of batch_image_size. However, as far as I experimented, that doesn't affect to PSNR performance so much.\n\n### How can I set --training_images parameter?\n\n--training_images is, the number of patches trained in one epoch. So, usually, it would be better to be same as the number of input training patch images. When you use build_batch=True, the trainer will create a patch images under **\"batch_data\"** before training so that you can see how much batch images are in the train data. \n\nHowever, it really depends on the image type/variance and model complexity. You can begin with very small value like 1,000 and if the result is not enough, you can increase it until 100,000 to 200,000.\n\n\n# Important parameters\n\n| Parameter arg | Name | Default | Explanation |\n|:-------:|:-------:|:----:|:----:|\n| layers | Num CNN layers | 12 | Number of layers of feature-extraction CNNs |\n| filters | Num of first CNN filters | 196 | Number of filters of the first feature-extraction CNNs |\n| min_filters | Num of last CNN filters | 48 | Number of filters of the last feature-extraction CNNs |\n| filters_decay_gamma | Decay Gamma | 1.5 | Number of CNN filters are decayed from [filters] to [min_filters] by this gamma on each layers |\n| pixel_shuffler | Pixel Shuffler | True | Use Pixel Shuffler as up-sampling layer. If it's False, use transposed CNN as up-sampling layer. |\n| self_ensemble | Self Ensemble | 8 | Apply SR for 1-8 flipped/rotate images and then use mean image as result. |\n| training_images | Batch images for training epoch | 24000 | This number of batch images are used for training one epoch. I usually use 100,000 batch images for each 10 epochs for each Learning Rate. |\n| dropout_rate | Dropout rate | 0.8 | Output nodes should be kept by this probability. Should be 1 >= drop out > 0. If 1, don't use dropout. |\n| initializer | Initialize method | he | Initialize method of each weight. Can be one of [uniform, stddev, xavier, he, identity, zero]. |\n| activator | Activator function | prelu | Type of activator functions for each CNN. Can be one of [relu, leaky_relu, prelu, sigmoid, tanh] |\n| optimizer | Optimizer function | adam | Method of optimizer. Can be one of [gd, momentum, adadelta, adagrad, adam, rmsprop] |\n| batch_image_size | Image size for each Batch | 48 | Each training image will be splitted this size. |\n| batch_num | Image num for each batch | 20 | Number of batch images for one training step. |\n| clipping_norm | value for gradient clipping | 5 | Norm for gradient clipping. If it's <= 0 we don't use gradient clipping. |\n\nAlso learning late and other model parameters are still important.\n\nWe'll train [ __training_images__ / __batch_num__ ] steps for each epoch. Learning rate will be started from __initial_lr__. After [lr_decay_epoch] epochs has done, learning rate will be decayed by __lr_decay__. And when the current learning rate gets lower than __end_lr__, then training will be finished.\n\nUsually you can control how much iterate the training batch by adjusting __training_images__ and __lr_decay_epoch__. Please check arg.py for other params.\n\n## Data augmentation\n\nTo get a better performance, data augmentation is needed. You can use **augmentation.py** to build an augmented dataset. The arg, augment_level = 4, means it will add right-left, top-bottom and right-left and top-bottom fillped images to make 4 times bigger dataset. And there **yang91_4** directory will be generated as an augmented dataset.\n\nTo have better model, you should use larger training data like (BSD200 + Yang91) x (8 augment) dataset.\n\n```\n# build 4x augmented dataset for yang91 dataset (will add flipped images)\npython3 augmentation.py --dataset=yang91 --augment_level=4\n\n# build 8x augmented dataset for yang91 dataset (will add flipped and rotated images)\npython3 augmentation.py --dataset=yang91 --augment_level=8\n\n# train with augmented data\npython3 train.py --dataset=yang91_4\n```\n\n## How to calculate PSNR / SSIM\n\nRGB image is converted to YCbCr image. And then trained and applied only for Y channel.\n\nFor PSNR, by the default, result and original image are shaved by 'scale' pixels from each border, rounded to integer and then PSNR and SSIM are calculated.\nI use SSIM index calculation procedure from scikit-image. Parameters are here. (win_size=11, gaussian_weights=True, multichannel=True, K1=0.01, K2=0.03, sigma=1.5, data_range=255)\n(9/16/2018 modified)\n\n## Visualization\n\nDuring the training, tensorboard log is available under **tf_log** directory.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/model_v2.png\" width=\"400\">\n\nYou can check test PSNR transition during training. Also mean / std / histogram of every weights/biases and gradients are logged at tensorboard.\n\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/tensorboard_1.png\" width=\"800\">\n<img src=\"https://raw.githubusercontent.com/jiny2001/dcscn-super-resolution/master/documents/tensorboard_2.png\" width=\"800\">\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"64B4:326565:17A780:5DCD20:6AB92A13"},"text_sha256":"177a3f735455788f1a57ee59604720a14834ec2f1849383fc9a7d28f70190076"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"THUNLP-MT/THUMT","input_row":{"repository":"THUNLP-MT/THUMT","url":"https://github.com/THUNLP-MT/THUMT","name":"THUMT","owner":"THUNLP-MT","description":"An open-source neural machine translation toolkit developed by Tsinghua Natural Language Processing Group","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":706,"issues":105,"created_at":"2017-06-20T10:56:45Z","updated_at":"2026-08-25T13:40:19Z","first_commit_at":"2017-06-20T10:56:46Z","last_commit_at":"2021-04-21T05:43:52Z","activity_months":46.020000000000003,"ai_ml_match_topics":"deep-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:08.121Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"THUNLP-MT/THUMT","visibility":"public","created_at":"2017-06-20T10:56:45Z","updated_at":"2026-08-25T13:40:19Z","private":false,"fork":false,"archived":false,"stargazers_count":706,"open_issues_count":24,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2733","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:17D03A4:1BF2693:6AB92A14"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2732","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17C8CC1:1BEA859:6AB92A14"},"commit":{"sha":"652323ff797515baefd7b864db0a4267e3539c13","url":"https://github.com/THUNLP-MT/THUMT/commit/652323ff797515baefd7b864db0a4267e3539c13","date":"2018-04-25T08:19:17Z","author_date":"2018-04-25T08:19:17Z","committer_date":"2018-04-25T08:19:17Z","tree_sha":"aad6a12e63092c73c649448bbd388933b5bcf5fa","message_first_line":"Improvements and bug fix."},"tree_request_status":200,"tree_rate":{"github_remaining":"2731","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0853:2D7D17:1779783:1B99B22:6AB92A14"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3954,"blob_sha":"ecf44143928689f15859cc2476064b06d3407349","priority":0}],"documents":[{"path":"README.md","size":3954,"blob_sha":"ecf44143928689f15859cc2476064b06d3407349","priority":0,"status":200,"text":"# THUMT: An Open Source Toolkit for Neural Machine Translation\n## Contents\n* [Introduction](#introduction)\n* [Implementations](#implementations)\n* [License](#license)\n* [Citation](#citation)\n* [Development Team](#development-team)\n* [Contributors](#Contributors)\n* [Contact](#contact)\n\n## Introduction\n\nMachine translation is a natural language processing task that aims to translate natural languages using computers automatically. Recent several years have witnessed the rapid development of end-to-end neural machine translation, which has become the new mainstream method in practical MT systems.\n\nTHUMT is an open-source toolkit for neural machine translation developed by [the Natural Language Processing Group at Tsinghua University](http://nlp.csai.tsinghua.edu.cn/site2/index.php?lang=en).\n\n\n## Implementations\nTHUMT has currently two main implementations:\n\n* [THUMT-TensorFlow](https://github.com/thumt/THUMT): a new implementation developed with [TensorFlow](https://github.com/tensorflow/tensorflow). It implements the sequence-to-sequence model (**Seq2Seq**) ([Sutskever et al., 2014](https://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf)), the standard attention-based model (**RNNsearch**) ([Bahdanau et al., 2014](https://arxiv.org/pdf/1409.0473.pdf)), and the Transformer model (**Transformer**) ([Vaswani et al., 2017](https://arxiv.org/abs/1706.03762)).\n\n* [THUMT-Theano](https://github.com/thumt/THUMT/tree/theano): the original project developed with [Theano](https://github.com/Theano/Theano), which is no longer updated because MLA put an end to [Theano](https://github.com/Theano/Theano). It implements the standard attention-based model (**RNNsearch**) ([Bahdanau et al., 2014](https://arxiv.org/pdf/1409.0473.pdf)), minimum risk training (**MRT**) ([Shen et al., 2016](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2016_mrt.pdf)) for optimizing model parameters with respect to evaluation metrics, semi-supervised training (**SST**) ([Cheng et al., 2016](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2016_semi.pdf)) for exploiting monolingual corpora to learn bi-directional translation models, and layer-wise relevance propagation (**LRP**) ([Ding et al., 2017](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2017_dyz.pdf)) for visualizing and anlayzing RNNsearch.\n\n\nThe following table summarizes the features of two implementations:\n\n| Implementation | Model | Criterion | Optimizer | LRP |\n| :------------: | :---: | :--------------: | :--------------: | :----------------: |\n| Theano       |  RNNsearch | MLE, MRT, SST | SGD, AdaDelta, Adam | RNNsearch |   \n| TensorFlow   |  Seq2Seq, RNNsearch, Transformer | MLE| Adam |n/a |\n\nWe recommend using [THUMT-TensorFlow](https://github.com/thumt/THUMT), which delivers better translation performance than [THUMT-Theano](https://github.com/thumt/THUMT/tree/theano). We will keep adding new features to [THUMT-TensorFlow](https://github.com/thumt/THUMT).\n\n## License\n\nThe source code is dual licensed. Open source licensing is under the [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause), which allows free use for research purposes. For commercial licensing, please email [thumt17@gmail.com](mailto:thumt17@gmail.com).\n\n## Citation\n\nPlease cite the following paper:\n\n> Jiacheng Zhang, Yanzhuo Ding, Shiqi Shen, Yong Cheng, Maosong Sun, Huanbo Luan, Yang Liu. 2017. [THUMT: An Open Source Toolkit for Neural Machine Translation](https://arxiv.org/abs/1706.06415). arXiv:1706.06415.\n\n## Development Team\n\nProject leaders: [Maosong Sun](http://www.thunlp.org/site2/index.php/zh/people?id=16), [Yang Liu](http://nlp.csai.tsinghua.edu.cn/~ly/), Huanbo Luan\n\nProject members: Jiacheng Zhang, Yanzhuo Ding, Shiqi Shen, Yong Cheng\n\n## Contributors \n* [Zhixing Tan](mailto:playinf@stu.xmu.edu.cn) (Xiamen University)\n\n## Contact\n\nIf you have questions, suggestions and bug reports, please email [thumt17@gmail.com](mailto:thumt17@gmail.com).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4FDA:38C7FC:17D824:5A480B:6AB92A14"},"text_sha256":"a674059fd59371374c47aae9fcde4bdae93ef292414d16927f8c98b32a98a893"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2730","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093F:0BA1:D7CC41:FD974C:6AB92A15"},"commit":{"sha":"4893578278c08f436fbaaf799257cea15b0c9b56","url":"https://github.com/THUNLP-MT/THUMT/commit/4893578278c08f436fbaaf799257cea15b0c9b56","date":"2021-04-21T05:43:52Z","author_date":"2021-04-21T05:43:52Z","committer_date":"2021-04-21T05:43:52Z","tree_sha":"4075f5236ec92ce0438bc1e2c9fbecaae395411e","message_first_line":"Update scorer.py."},"tree_request_status":200,"tree_rate":{"github_remaining":"2729","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0888:0BA1:D7CC80:FD9798:6AB92A15"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6118,"blob_sha":"3c0a556b1bda2ffeac2b3db160224a503e0cfe5e","priority":0}],"documents":[{"path":"README.md","size":6118,"blob_sha":"3c0a556b1bda2ffeac2b3db160224a503e0cfe5e","priority":0,"status":200,"text":"# THUMT: An Open Source Toolkit for Neural Machine Translation\n\n## Contents\n\n* [Introduction](#introduction)\n* [Online Demo](#online-demo)\n* [Implementations](#implementations)\n* [Notable Features](#notable-features)\n* [Documentation](#documentation)\n* [License](#license)\n* [Citation](#citation)\n* [Development Team](#development-team)\n* [Contact](#contact)\n* [Derivative Repositories](#derivative-repositories)\n\n## Introduction\n\nMachine translation is a natural language processing task that aims to translate natural languages using computers automatically. Recent several years have witnessed the rapid development of end-to-end neural machine translation, which has become the new mainstream method in practical MT systems.\n\nTHUMT is an open-source toolkit for neural machine translation developed by [the Natural Language Processing Group at Tsinghua University](http://nlp.csai.tsinghua.edu.cn/site2/index.php?lang=en). The website of THUMT is: [http://thumt.thunlp.org/](http://thumt.thunlp.org/).\n\n## Online Demo\n\nThe online demo of THUMT is available at [http://translate.thumt.cn/](http://101.6.5.207:3892/). The languages involved include Ancient Chinese, Arabic, Chinese, English, French, German, Indonesian, Japanese, Portuguese, Russian, and Spanish.\n\n## Implementations\n\nTHUMT has currently three main implementations:\n\n* [THUMT-PyTorch](https://github.com/thumt/THUMT): a new implementation developed with [PyTorch](https://github.com/pytorch/pytorch). It implements the Transformer model (**Transformer**) ([Vaswani et al., 2017](https://arxiv.org/abs/1706.03762)).\n\n* [THUMT-TensorFlow](https://github.com/thumt/THUMT/tree/tensorflow): an implementation developed with [TensorFlow](https://github.com/tensorflow/tensorflow). It implements the sequence-to-sequence model (**Seq2Seq**) ([Sutskever et al., 2014](https://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf)), the standard attention-based model (**RNNsearch**) ([Bahdanau et al., 2014](https://arxiv.org/pdf/1409.0473.pdf)), and the Transformer model (**Transformer**) ([Vaswani et al., 2017](https://arxiv.org/abs/1706.03762)).\n\n* [THUMT-Theano](https://github.com/thumt/THUMT/tree/theano): the original project developed with [Theano](https://github.com/Theano/Theano), which is no longer updated because MLA put an end to [Theano](https://github.com/Theano/Theano). It implements the standard attention-based model (**RNNsearch**) ([Bahdanau et al., 2014](https://arxiv.org/pdf/1409.0473.pdf)), minimum risk training (**MRT**) ([Shen et al., 2016](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2016_mrt.pdf)) for optimizing model parameters with respect to evaluation metrics, semi-supervised training (**SST**) ([Cheng et al., 2016](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2016_semi.pdf)) for exploiting monolingual corpora to learn bi-directional translation models, and layer-wise relevance propagation (**LRP**) ([Ding et al., 2017](http://nlp.csai.tsinghua.edu.cn/~ly/papers/acl2017_dyz.pdf)) for visualizing and anlayzing RNNsearch.\n\nThe following table summarizes the features of three implementations:\n\n| Implementation | Model | Criterion | Optimizer | LRP |\n| :------------: | :---: | :--------------: | :--------------: | :----------------: |\n| Theano       |  RNNsearch | MLE, MRT, SST | SGD, AdaDelta, Adam | RNNsearch |\n| TensorFlow   |  Seq2Seq, RNNsearch, Transformer | MLE| Adam | RNNsearch, Transformer |\n| PyTorch | Transformer | MLE | SGD, Adadelta, Adam | N.A. |\n\nWe recommend using [THUMT-PyTorch](https://github.com/thumt/THUMT) or [THUMT-TensorFlow](https://github.com/thumt/THUMT/tree/tensorflow), which delivers better translation performance than [THUMT-Theano](https://github.com/thumt/THUMT/tree/theano). We will keep adding new features to [THUMT-PyTorch](https://github.com/thumt/THUMT) and [THUMT-TensorFlow](https://github.com/thumt/THUMT/tree/tensorflow).\n\n## Notable Features\n\n* Transformer ([Vaswani et al., 2017](https://arxiv.org/abs/1706.03762))\n* Multi-GPU training & decoding\n* Multi-worker distributed training\n* Mixed precision training & decoding\n* Model ensemble & averaging\n* Gradient aggregation\n* TensorBoard for visualization\n\n## Documentation\n\nThe documentation of PyTorch implementation is avaiable at [here](docs/index.md).\n\n## License\n\nThe source code is dual licensed. Open source licensing is under the [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause), which allows free use for research purposes. For commercial licensing, please email [thumt17@gmail.com](mailto:thumt17@gmail.com).\n\n## Citation\n\nPlease cite the following paper:\n\n> Zhixing Tan, Jiacheng Zhang, Xuancheng Huang, Gang Chen, Shuo Wang, Maosong Sun, Huanbo Luan, Yang Liu. [THUMT: An Open Source Toolkit for Neural Machine Translation](https://www.aclweb.org/anthology/2020.amta-research.11/). AMTA 2020.\n\n> Jiacheng Zhang, Yanzhuo Ding, Shiqi Shen, Yong Cheng, Maosong Sun, Huanbo Luan, Yang Liu. 2017. [THUMT: An Open Source Toolkit for Neural Machine Translation](https://arxiv.org/abs/1706.06415). arXiv:1706.06415.\n\n## Development Team\n\nProject leaders: [Maosong Sun](http://www.thunlp.org/site2/index.php/zh/people?id=16), [Yang Liu](http://nlp.csai.tsinghua.edu.cn/~ly/), Huanbo Luan\n\nProject members:\n\nTheano: Jiacheng Zhang, Yanzhuo Ding, Shiqi Shen, Yong Cheng\n\nTensorFlow: Zhixing Tan, Jiacheng Zhang, Xuancheng Huang, Gang Chen, Shuo Wang, Zonghan Yang\n\nPyTorch: Zhixing Tan, Gang Chen\n\n## Contact\n\nIf you have questions, suggestions and bug reports, please email [thumt17@gmail.com](mailto:thumt17@gmail.com).\n\n## Derivative Repositories\n\n* [UCE4BT](https://github.com/THUNLP-MT/UCE4BT) (Improving Back-Translation with Uncertainty-based Confidence Estimation)\n* [L2Copy4APE](https://github.com/THUNLP-MT/L2Copy4APE) (Learning to Copy for Automatic Post-Editing)\n* [Document-Transformer](https://github.com/THUNLP-MT/Document-Transformer) (Improving the Transformer Translation Model with Document-Level Context)\n* [PR4NMT](https://github.com/THUNLP-MT/PR4NMT) (Prior Knowledge Integration for Neural Machine Translation using Posterior Regularization)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:1700B7:5D233F:6AB92A15"},"text_sha256":"2120382cc9dc9c91dc814db65b500cb405e87586723f3f85d87037573bccc992"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"netket/netket","input_row":{"repository":"netket/netket","url":"https://github.com/netket/netket","name":"netket","owner":"netket","description":"Machine learning algorithms for many-body quantum systems ","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":700,"issues":510,"created_at":"2018-04-23T18:48:08Z","updated_at":"2026-09-24T09:32:42Z","first_commit_at":"2018-04-23T18:49:11Z","last_commit_at":"2026-09-24T09:32:38Z","activity_months":101.04000000000001,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:10.595Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"netket/netket","visibility":"public","created_at":"2018-04-23T18:48:08Z","updated_at":"2026-09-24T09:32:42Z","private":false,"fork":false,"archived":false,"stargazers_count":700,"open_issues_count":103,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2728","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:18032F7:1C25417:6AB92A16"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2727","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:17B019B:1BD1C42:6AB92A17"},"commit":{"sha":"916bfe25b89eff0f75d31425871ba8454e4d17e6","url":"https://github.com/netket/netket/commit/916bfe25b89eff0f75d31425871ba8454e4d17e6","date":"2018-05-24T13:33:12Z","author_date":"2018-05-24T13:33:12Z","committer_date":"2018-05-24T13:33:12Z","tree_sha":"3e6cd1f21783dac8e314dca5dbaab6fa8b4ca013","message_first_line":"Merge pull request #20 from emilyjd/StepperEditsv2"},"tree_request_status":200,"tree_rate":{"github_remaining":"2726","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:17A1670:1BC346B:6AB92A17"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2477,"blob_sha":"427eda2adb0a40d9f079492150a045ea358af647","priority":0}],"documents":[{"path":"README.md","size":2477,"blob_sha":"427eda2adb0a40d9f079492150a045ea358af647","priority":0,"status":200,"text":"\n# <img src=\"http://www.netket.org/img/logo_simple.jpg\" width=\"400\"> <img src=\"http://www.netket.org/img/logo_simple.jpg\" width=\"400\">\n\n[![Release](https://img.shields.io/github/release/netket/netket.svg)](https://github.com/netket/netket/releases)\n[![Build Status](https://travis-ci.org/netket/netket.svg?branch=master)](https://travis-ci.org/netket/netket)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/acfc9fcbedd54b77a2d45351f4518728)](https://www.codacy.com/app/gcarleo/netket?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=netket/netket&amp;utm_campaign=Badge_Grade)\n[![GitHub Issues](https://img.shields.io/github/issues/netket/netket.svg)](http://github.com/netket/netket/issues)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# __NetKet__\n\nNetKet is an open-source project delivering cutting-edge methods for the study\nof many-body quantum systems with artificial neural networks and machine learning techniques.\n\n\n## Major Features\n\n* Graphs\n  * Built-in Graphs\n    * Hypercube\n  * Custom Graphs\n    * Any Graph With Given Adjacency Matrix [from input file]\n    * Any Graph With Given Edges [from input file]\n\n* Hamiltonians\n  * Built-in Hamiltonians\n    * Transverse-field Ising\n    * Heisenberg\n    * Bose-Hubbard\n  * Custom Hamiltonians\n    * Any k-local Hamiltonian [from input file]\n\n* Learning\n  * Steppers\n    * Stochastic Gradient Descent\n    * AdaMax\n  * Ground-state Learning\n    * Gradient Descent\n    * Stochastic Reconfiguration Method\n      * Direct Solver\n      * Iterative Solver for Large Number of Parameters  \n\n* Machines\n  * Restricted Boltzmann Machines\n    * Standard\n    * For Custom Local Hilbert Spaces\n    * With Permutation Symmetry Using Graph Isomorphisms\n  * Custom Machines\n    * Any Machine Satisfying Prototype of Abstract Machine [extending C++ code]\n\n* Observables\n  * Custom Observables\n    * Any k-local Operator [from input file]\n\n* Sampling\n  * Local Metropolis Moves\n    * Local Hilbert Space Sampling\n    * Parallel Tempering Versions\n  * Hamiltonian Moves\n    * Automatic Moves with Hamiltonian Symmetry\n    * Parallel Tempering Versions\n\n* Statistics\n  * Automatic Estimate of Correlation Times\n\n* I/O\n  * Python/JSON Interface   \n\n## Installation and Usage\n\nPlease visit our [homepage](https://www.netket.org) for further information.\n\n## License\n\n[Apache License 2.0](https://github.com/netket/netket/blob/master/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BFEA:3E1DA:178980:5DAEE7:6AB92A17"},"text_sha256":"05fba139220b34dac31cb4c207a5a5c3369716e4475c277a944f441ed00431fd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2725","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17E5843:1C071C7:6AB92A18"},"commit":{"sha":"49f400249f1bdf5da4d13cebe55e7ef11ead344a","url":"https://github.com/netket/netket/commit/49f400249f1bdf5da4d13cebe55e7ef11ead344a","date":"2026-06-12T10:09:56Z","author_date":"2026-06-12T10:09:56Z","committer_date":"2026-06-12T10:09:56Z","tree_sha":"2891a4140d8b54547f538c110100ebdda3088db3","message_first_line":"Harden against early stopping desync issues."},"tree_request_status":200,"tree_rate":{"github_remaining":"2724","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0781:1C46F8:17BA3EA:1BDB88B:6AB92A18"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2899,"blob_sha":"355548e61df07aa490c5c173f5535d683ae922fe","priority":0}],"documents":[{"path":"README.md","size":2899,"blob_sha":"355548e61df07aa490c5c173f5535d683ae922fe","priority":0,"status":200,"text":"<div align=\"center\">\n<img src=\"https://www.netket.org/logo/logo_simple.jpg\" alt=\"logo\" width=\"400\"><\/img>\n<\/div>\n\n# __NetKet__\n\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)\n[![Release](https://img.shields.io/github/release/netket/netket.svg)](https://github.com/netket/netket/releases)\n[![Paper (v3)](https://img.shields.io/badge/paper%20%28v3%29-arXiv%3A2112.10526-B31B1B)](https://scipost.org/SciPostPhysCodeb.7/pdf)\n[![codecov](https://codecov.io/gh/netket/netket/branch/master/graph/badge.svg?token=gzcOlpO5lB)](https://codecov.io/gh/netket/netket)\n[![Slack](https://img.shields.io/badge/slack-chat-green.svg)](https://join.slack.com/t/mlquantum/shared_invite/zt-19wibmfdv-LLRI6i43wrLev6oQX0OfOw)\n\nNetKet is an open-source project delivering cutting-edge methods for the study of many-body quantum systems with artificial neural networks and machine learning techniques.\nIt is a Python library built on [JAX](https://github.com/google/jax).\n\nNetKet is an affiliated project to [numFOCUS](https://numfocus.org).\n\n- **Homepage:** <https://www.netket.org>\n- **Citing:** <https://www.netket.org/cite/>\n- **Documentation:** <https://netket.readthedocs.io/en/latest/index.html>\n- **Tutorials:** <https://netket.readthedocs.io/en/latest/tutorials/gs-ising.html>\n- **Examples:** <https://github.com/netket/netket/tree/master/Examples>\n- **Source code:** <https://github.com/netket/netket>\n\n## Installation and Usage\n\nNetKet runs on MacOS and Linux and requires Python 3.11 or later. We recommend installing NetKet using `pip` or `uv`. **Do not use conda** as JAX has known issues when installed through conda.\n\n```sh\npip install --upgrade pip\npip install netket\n```\n\n**With GPU support (Linux only):**\n```sh\npip install 'netket[cuda]'\n```\n\n**Development version:**\n```sh\npip install git+https://github.com/netket/netket.git\n```\n\nFor detailed installation instructions including GPU setup, see our [installation guide](https://netket.readthedocs.io/en/latest/install.html).\n\n## Getting Started\n\nTo get started with NetKet, we recommend you give a look at our [tutorials page](https://netket.readthedocs.io/en/latest/tutorials/gs-ising.html), by running them on your computer or on [Google Colaboratory](https://colab.research.google.com).\nThere are also many example scripts that you can download, run and edit that showcase some use-cases of NetKet, although they are not commented.\n\nIf you want to get in touch with us, feel free to open an issue or a discussion here on GitHub, or to join the MLQuantum slack group where several people involved with NetKet hang out. To join the slack channel just accept [this invitation](https://join.slack.com/t/mlquantum/shared_invite/zt-19wibmfdv-LLRI6i43wrLev6oQX0OfOw)\n\n## License\n\n[Apache License 2.0](https://github.com/netket/netket/blob/master/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4CC0:35999:177F28:5DA560:6AB92A19"},"text_sha256":"f6acd362f1809dfd0cbd1b13ea36c0d6875121f022c155430e905f5f66e696f9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"inspirehep/magpie","input_row":{"repository":"inspirehep/magpie","url":"https://github.com/inspirehep/magpie","name":"magpie","owner":"inspirehep","description":"Deep neural network framework for multi-label text classification","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":686,"issues":166,"created_at":"2015-11-27T10:16:06Z","updated_at":"2026-08-30T14:55:23Z","first_commit_at":"2015-11-27T10:20:45Z","last_commit_at":"2020-04-08T15:53:49Z","activity_months":52.369999999999997,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:13.477Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"inspirehep/magpie","visibility":"public","created_at":"2015-11-27T10:16:06Z","updated_at":"2026-08-30T14:55:23Z","private":false,"fork":false,"archived":false,"stargazers_count":686,"open_issues_count":48,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2723","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C1:14A1F2:18054DB:1C275B8:6AB92A19"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2722","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:17EC9F2:1C0E0F0:6AB92A19"},"commit":{"sha":"e99b6147034ffd01127ab2b1ce9d96e9f64f389e","url":"https://github.com/inspirehep/magpie/commit/e99b6147034ffd01127ab2b1ce9d96e9f64f389e","date":"2018-05-17T18:04:08Z","author_date":"2018-05-17T18:04:08Z","committer_date":"2018-05-17T18:04:08Z","tree_sha":"96a020ff5b6f067e91ebfd7e9888e830cbe8dd5b","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2721","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DF:76AED:17EA321:1C0C538:6AB92A1A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4983,"blob_sha":"4b98c884d925ea0bde0573c5548bd1c170e4ab37","priority":0}],"documents":[{"path":"README.md","size":4983,"blob_sha":"4b98c884d925ea0bde0573c5548bd1c170e4ab37","priority":0,"status":200,"text":"![image](docs/img/logo.png)\n\nMagpie is a deep learning tool for multi-label text classification. It learns on the training corpus to assign labels to arbitrary text and can be used to predict those labels on unknown data. It has been developed at CERN to assign subject categories to High Energy Physics abstracts and extract keywords from them.\n\n## Very short introduction\n```\n>>> magpie = Magpie()\n>>> magpie.init_word_vectors('/path/to/corpus', vec_dim=100)\n>>> magpie.train('/path/to/corpus', ['label1', 'label2', 'label3'], epochs=3)\nTraining...\n>>> magpie.predict_from_text('Well, that was quick!')\n[('label1', 0.96), ('label3', 0.65), ('label2', 0.21)]\n```\n\n\n## Short introduction\nTo train the model you need to have a large corpus of labeled data in a text format encoded as UTF-8. An example corpus can be found under data/hep-categories directory. Magpie looks for `.txt` files containing the text to predict on and corresponding `.lab` files with assigned labels in separate lines. A pair of files containing the labels and the text should have the same name and differ only in extensions e.g.\n\n```\n$ ls data/hep-categories\n1000222.lab 1000222.txt 1000362.lab 1000362.txt 1001810.lab 1001810.txt ...\n```\n\nBefore you train the model, you need to build appropriate word vector representations for your corpus. In theory, you can train them on a different corpus or reuse already trained ones ([tutorial](http://rare-technologies.com/word2vec-tutorial/)), however Magpie enables you to do that as well.\n```python\nfrom magpie import Magpie\n\nmagpie = Magpie()\nmagpie.train_word2vec('data/hep-categories', vec_dim=100)\n```\n\nThen you need to fit a scaling matrix to normalize input data, it is specific to the trained word2vec representation. Here's the one liner:\n\n```python\nmagpie.fit_scaler('data/hep-categories')\n```\n\nYou would usually want to combine those two steps, by simply running:\n```python\nmagpie.init_word_vectors('data/hep-categories', vec_dim=100)\n```\n\nIf you plan to reuse the trained word representations, you might want to save them and pass in the constructor to `Magpie` next time. For the training, just type:\n```python\nlabels = ['Gravitation and Cosmology', 'Experiment-HEP', 'Theory-HEP']\nmagpie.train('data/hep-categories', labels, test_ratio=0.2, epochs=30)\n```\nBy providing the `test_ratio` argument, the model splits data into train & test datasets (in this example into 80/20 ratio) and evaluates itself after every epoch displaying it's current loss and accuracy. The default value of `test_ratio` is 0 meaning that all the data will be used for training.\n\nIf your data doesn't fit into memory, you can also run `magpie.batch_train()` which has a similar API, but is more memory efficient.\n\nTrained models can be used for prediction with methods:\n```python\n>>> magpie.predict_from_file('data/hep-categories/1002413.txt')\n[('Experiment-HEP', 0.47593361),\n ('Gravitation and Cosmology', 0.055745006),\n ('Theory-HEP', 0.02692855)]\n\n>>> magpie.predict_from_text('Stephen Hawking studies black holes')\n[('Gravitation and Cosmology', 0.96627593),\n ('Experiment-HEP', 0.64958507),\n ('Theory-HEP', 0.20917746)]\n```\n\n## Saving & loading the model\nA `Magpie` object consists of three components - the word2vec mappings, a scaler and a `keras` model. In order to train Magpie you can either provide the word2vec mappings and a scaler in advance or let the program compute them for you on the training data. Usually you would want to train them yourself on a full dataset and reuse them afterwards. You can use the provided functions for that purpose:\n\n```python\nmagpie.save_word2vec_model('/save/my/embeddings/here')\nmagpie.save_scaler('/save/my/scaler/here', overwrite=True)\nmagpie.save_model('/save/my/model/here.h5')\n```\n\nWhen you want to reinitialize your trained model, you can run:\n\n```python\nmagpie = Magpie(\n    keras_model='/save/my/model/here.h5',\n    word2vec_model='/save/my/embeddings/here',\n    scaler='/save/my/scaler/here',\n    labels=['cat', 'dog', 'cow']\n)\n```\nor just pass the objects directly!\n\n## Installation\n\nThe package is not on PyPi, but you can get it directly from GitHub:\n```\n$ pip install git+https://github.com/inspirehep/magpie.git@v2.0\n```\nIf you encounter any problems with the installation, make sure to install the correct versions of dependencies listed in `setup.py` file.\n\n## Disclaimer & citation\nThe neural network models used within Magpie are based on work done by [Yoon Kim](https://arxiv.org/abs/1408.5882) and subsequently [Mark Berger](https://cs224d.stanford.edu/reports/BergerMark.pdf).\n\n## Magpie v1 vs v2\nMagpie v1.0 depends on Keras v1.X, while Magpie v2.0 on Keras v2.X. You can install and use either of those, but bear in mind that only v2.0 will be developed in the future. For the change details between the two versions, consult [the releases page](https://github.com/inspirehep/magpie/releases/tag/v2.0).\n\n## Contact\nIf you have any problems, feel free to open an issue. We'll do our best to help :+1:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"64B4:326565:17A7E5:5DCE30:6AB92A18"},"text_sha256":"f48ebc4dd9450f53a822a1b06404d1dbe8521ad6828282e51dc79a89d9758d71"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2720","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:17906BF:1BB125F:6AB92A1B"},"commit":{"sha":"29dac813f3f1aed6820a667d08c7d5eb7b5051c7","url":"https://github.com/inspirehep/magpie/commit/29dac813f3f1aed6820a667d08c7d5eb7b5051c7","date":"2020-04-08T15:53:49Z","author_date":"2020-04-08T15:53:49Z","committer_date":"2020-04-08T15:53:49Z","tree_sha":"c2efce55af8435bfbb7f16695017e1722db176a5","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2719","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:17882DB:1BA8D98:6AB92A1B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4657,"blob_sha":"511290c503795fdab4dd8773df4d771f3525a38f","priority":0}],"documents":[{"path":"README.md","size":4657,"blob_sha":"511290c503795fdab4dd8773df4d771f3525a38f","priority":0,"status":200,"text":"![image](docs/img/logo.png)\n\nMagpie is a deep learning tool for multi-label text classification. It learns on the training corpus to assign labels to arbitrary text and can be used to predict those labels on unknown data. It has been developed at CERN to assign subject categories to High Energy Physics abstracts and extract keywords from them.\n\n## Very short introduction\n```\n>>> magpie = Magpie()\n>>> magpie.init_word_vectors('/path/to/corpus', vec_dim=100)\n>>> magpie.train('/path/to/corpus', ['label1', 'label2', 'label3'], epochs=3)\nTraining...\n>>> magpie.predict_from_text('Well, that was quick!')\n[('label1', 0.96), ('label3', 0.65), ('label2', 0.21)]\n```\n\n\n## Short introduction\nTo train the model you need to have a large corpus of labeled data in a text format encoded as UTF-8. An example corpus can be found under data/hep-categories directory. Magpie looks for `.txt` files containing the text to predict on and corresponding `.lab` files with assigned labels in separate lines. A pair of files containing the labels and the text should have the same name and differ only in extensions e.g.\n\n```\n$ ls data/hep-categories\n1000222.lab 1000222.txt 1000362.lab 1000362.txt 1001810.lab 1001810.txt ...\n```\n\nBefore you train the model, you need to build appropriate word vector representations for your corpus. In theory, you can train them on a different corpus or reuse already trained ones ([tutorial](http://rare-technologies.com/word2vec-tutorial/)), however Magpie enables you to do that as well.\n```python\nfrom magpie import Magpie\n\nmagpie = Magpie()\nmagpie.train_word2vec('data/hep-categories', vec_dim=100)\n```\n\nThen you need to fit a scaling matrix to normalize input data, it is specific to the trained word2vec representation. Here's the one liner:\n\n```python\nmagpie.fit_scaler('data/hep-categories')\n```\n\nYou would usually want to combine those two steps, by simply running:\n```python\nmagpie.init_word_vectors('data/hep-categories', vec_dim=100)\n```\n\nIf you plan to reuse the trained word representations, you might want to save them and pass in the constructor to `Magpie` next time. For the training, just type:\n```python\nlabels = ['Gravitation and Cosmology', 'Experiment-HEP', 'Theory-HEP']\nmagpie.train('data/hep-categories', labels, test_ratio=0.2, epochs=30)\n```\nBy providing the `test_ratio` argument, the model splits data into train & test datasets (in this example into 80/20 ratio) and evaluates itself after every epoch displaying it's current loss and accuracy. The default value of `test_ratio` is 0 meaning that all the data will be used for training.\n\nIf your data doesn't fit into memory, you can also run `magpie.batch_train()` which has a similar API, but is more memory efficient.\n\nTrained models can be used for prediction with methods:\n```python\n>>> magpie.predict_from_file('data/hep-categories/1002413.txt')\n[('Experiment-HEP', 0.47593361),\n ('Gravitation and Cosmology', 0.055745006),\n ('Theory-HEP', 0.02692855)]\n\n>>> magpie.predict_from_text('Stephen Hawking studies black holes')\n[('Gravitation and Cosmology', 0.96627593),\n ('Experiment-HEP', 0.64958507),\n ('Theory-HEP', 0.20917746)]\n```\n\n## Saving & loading the model\nA `Magpie` object consists of three components - the word2vec mappings, a scaler and a `keras` model. In order to train Magpie you can either provide the word2vec mappings and a scaler in advance or let the program compute them for you on the training data. Usually you would want to train them yourself on a full dataset and reuse them afterwards. You can use the provided functions for that purpose:\n\n```python\nmagpie.save_word2vec_model('/save/my/embeddings/here')\nmagpie.save_scaler('/save/my/scaler/here', overwrite=True)\nmagpie.save_model('/save/my/model/here.h5')\n```\n\nWhen you want to reinitialize your trained model, you can run:\n\n```python\nmagpie = Magpie(\n    keras_model='/save/my/model/here.h5',\n    word2vec_model='/save/my/embeddings/here',\n    scaler='/save/my/scaler/here',\n    labels=['cat', 'dog', 'cow']\n)\n```\nor just pass the objects directly!\n\n## Installation\n\nThe package is not on PyPi, but you can get it directly from GitHub:\n```\n$ pip install git+https://github.com/inspirehep/magpie.git@v2.1.1\n```\nIf you encounter any problems with the installation, make sure to install the correct versions of dependencies listed in `setup.py` file.\n\n## Disclaimer & citation\nThe neural network models used within Magpie are based on work done by [Yoon Kim](https://arxiv.org/abs/1408.5882) and subsequently [Mark Berger](https://cs224d.stanford.edu/reports/BergerMark.pdf).\n\n## Contact\nIf you have any problems, feel free to open an issue. We'll do our best to help :+1:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:171B9F:5D415C:6AB92A18"},"text_sha256":"0d8032658bb90f624dd29f520a5e6992eef74b27d6104dedfca333369b38f832"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pytorchbearer/torchbearer","input_row":{"repository":"pytorchbearer/torchbearer","url":"https://github.com/pytorchbearer/torchbearer","name":"torchbearer","owner":"pytorchbearer","description":"torchbearer: A model fitting library for PyTorch","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":641,"issues":247,"created_at":"2018-03-12T16:30:42Z","updated_at":"2026-09-06T12:00:50Z","first_commit_at":"2018-03-12T16:30:43Z","last_commit_at":"2023-12-04T11:10:46Z","activity_months":68.75,"ai_ml_match_topics":"deep-learning; machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:16.553Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pytorchbearer/torchbearer","visibility":"public","created_at":"2018-03-12T16:30:42Z","updated_at":"2026-09-06T12:00:50Z","private":false,"fork":false,"archived":false,"stargazers_count":641,"open_issues_count":10,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2718","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17BA6E9:1BDBBF6:6AB92A1C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2717","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:17FED5F:1C210DF:6AB92A1C"},"commit":{"sha":"b6b93a312988562543b1a70d4c6ac465411cdcd9","url":"https://github.com/pytorchbearer/torchbearer/commit/b6b93a312988562543b1a70d4c6ac465411cdcd9","date":"2018-05-24T14:40:44Z","author_date":"2018-05-24T14:40:44Z","committer_date":"2018-05-24T14:40:44Z","tree_sha":"6cbca51b24e86919cfcd948a36731c0869935739","message_first_line":"Add setup cfg and make changes for upload to PyPi (#126)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2716","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A0:3BE445:178842C:1BA8F25:6AB92A1D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":58,"blob_sha":"7e2f7e79ccbb058f9e7fc3e0b30e81f148d5a60d","priority":0}],"documents":[{"path":"README.md","size":58,"blob_sha":"7e2f7e79ccbb058f9e7fc3e0b30e81f148d5a60d","priority":0,"status":200,"text":"# PyTorch-bink\nbink: A model training library for PyTorch\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11FC:3EACB:179B08:5DC10A:6AB92A1A"},"text_sha256":"c7c1968e9195121cf1de663c249c2e333d695c66cb40996916daf44541059c25"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2715","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D6:3BE445:178849C:1BA8FA4:6AB92A1D"},"commit":{"sha":"0e8484c93ee25573695934f2ea6874c8126d9cd1","url":"https://github.com/pytorchbearer/torchbearer/commit/0e8484c93ee25573695934f2ea6874c8126d9cd1","date":"2023-12-04T11:10:46Z","author_date":"2023-12-04T11:10:46Z","committer_date":"2023-12-04T11:10:46Z","tree_sha":"8159f9a2fe4a80212eb48cb7c08adbfe29f2ffb5","message_first_line":"Update CHANGELOG.md (#680)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2714","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:17E8BA2:1C0ADE0:6AB92A1E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":28601,"blob_sha":"fe03de936b6946af03ac09cbb9b00f234e38b9ab","priority":0}],"documents":[{"path":"README.md","size":28601,"blob_sha":"fe03de936b6946af03ac09cbb9b00f234e38b9ab","priority":0,"status":200,"text":"**Note:**\nWe're moving to PyTorch Lightning! Read about the move [here](https://medium.com/pytorch/pytorch-frameworks-unite-torchbearer-joins-pytorch-lightning-c588e1e68c98). From the end of February, torchbearer will no longer be actively maintained. We'll continue to fix bugs when they are found and ensure that torchbearer runs on new versions of pytorch. However, we won't plan or implement any new functionality (if there's something you'd like to see in a training library, consider creating an issue on [PyTorch Lightning](https://github.com/PyTorchLightning/pytorch-lightning)).\n\n<img alt=\"logo\" src=\"https://raw.githubusercontent.com/pytorchbearer/torchbearer/master/docs/_static/img/logo_dark_text.svg?sanitize=true\" width=\"100%\"/>\n\n[![PyPI version](https://badge.fury.io/py/torchbearer.svg)](https://badge.fury.io/py/torchbearer) [![Python 2.7 | 3.5 | 3.6 | 3.7](https://img.shields.io/badge/python-2.7%20%7C%203.5%20%7C%203.6%20%7C%203.7-brightgreen.svg)](https://www.python.org/) [![PyTorch 1.0.0 | 1.1.0 | 1.2.0 | 1.3.0 | 1.4.0](https://img.shields.io/badge/pytorch-1.0.0%20%7C%201.1.0%20%7C%201.2.0%20%7C%201.3.0%20%7C%201.4.0-brightgreen.svg)](https://pytorch.org/) [![Build Status](https://travis-ci.com/pytorchbearer/torchbearer.svg?branch=master)](https://travis-ci.com/pytorchbearer/torchbearer) [![codecov](https://codecov.io/gh/pytorchbearer/torchbearer/branch/master/graph/badge.svg)](https://codecov.io/gh/pytorchbearer/torchbearer) [![Documentation Status](https://readthedocs.org/projects/torchbearer/badge/?version=latest)](https://torchbearer.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/torchbearer)](https://pepy.tech/project/torchbearer)\n\n<p align=\"center\">\n  <a href=\"http://pytorchbearer.org\">Website<\/a> •\n  <a href=\"https://torchbearer.readthedocs.io/en/latest/\">Docs<\/a> •\n  <a href=\"#examples\">Examples<\/a> •\n  <a href=\"#install\">Install<\/a> •\n  <a href=\"#citing\">Citing<\/a> •\n  <a href=\"#related\">Related<\/a>\n<\/p>\n\n<a id=\"about\"><\/a>\n\nA PyTorch model fitting library designed for use by researchers (or anyone really) working in deep learning or differentiable programming. Specifically, we aim to dramatically reduce the amount of boilerplate code you need to write without limiting the functionality and openness of PyTorch.\n\n<a id=\"examples\"><\/a>\n\n## Examples\n\n<a id=\"general\"><\/a>\n\n### General\n\n<table>\n    <tr>\n        <td rowspan=\"3\" width=\"160\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/quickstart.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Quickstart:<\/b> Get up and running with torchbearer, training a simple CNN on CIFAR-10.\n        <\/td>\n        <td align=\"center\" width=\"80\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/callbacks.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Callbacks:<\/b> A detailed exploration of callbacks in torchbearer, with some useful visualisations.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/callbacks.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/callbacks.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/callbacks.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/imaging.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Imaging:<\/b> A detailed exploration of the imaging sub-package in torchbearer, useful for showing visualisations during training.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/imaging.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/imaging.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/imaging.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>Serialization:<\/b> This guide gives an introduction to serializing and restarting training in torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/serialization.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/serialization.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/serialization.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>History and Replay:<\/b> This guide gives an introduction to the history returned by a trial and the ability to replay training.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/history.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/history.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/history.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>Custom Data Loaders:<\/b> This guide gives an introduction on how to run custom data loaders in torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/custom_loaders.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/custom_loaders.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/custom_loaders.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>Data Parallel:<\/b> This guide gives an introduction to using torchbearer with DataParrallel.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/data_parallel.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/data_parallel.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/data_parallel.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/livelossplot.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>LiveLossPlot:<\/b> A demonstration of the LiveLossPlot callback included in torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/livelossplot.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/livelossplot.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/livelossplot.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/pycm.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>PyCM:<\/b> A demonstration of the PyCM callback included in torchbearer for generating confusion matrices.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/pycm.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/pycm.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/pycm.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>NVIDIA Apex:<\/b> A guide showing how to perform half and mixed precision training in torchbearer with NVIDIA Apex.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/apex_torchbearer.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/apex_torchbearer.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/apex_torchbearer.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n<a id=\"deep\"><\/a>\n\n### Deep Learning\n\n<table>\n    <tr>\n        <td rowspan=\"3\" width=\"160\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/vae.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Training a VAE:<\/b> A demonstration of how to train (add do a simple visualisation of) a Variational Auto-Encoder (VAE) on MNIST with torchbearer.\n        <\/td>\n        <td align=\"center\" width=\"80\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/gan.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Training a GAN:<\/b> A demonstration of how to train (add do a simple visualisation of) a Generative Adversarial Network (GAN) on MNIST with torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/adversarial.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Generating Adversarial Examples:<\/b> A demonstration of how to perform a simple adversarial attack with torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/adversarial.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/adversarial.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/adversarial.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/transfer.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Transfer Learning with Torchbearer:<\/b> A demonstration of how to perform transfer learning on STL10 with torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/transfer_learning.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/transfer_learning.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/transfer_learning.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/regulariser.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Regularisers in Torchbearer:<\/b> A demonstration of how to use all of the built-in regularisers in torchbearer (Mixup, CutOut, CutMix, Random Erase, Label Smoothing and Sample Pairing).\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/regularisers.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n        <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/regularisers.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/regularisers.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\" colspan=\"2\">\n            <b>Manifold Mixup:<\/b> A demonstration of how to use the Manifold Mixup callback in Torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/manifold_mixup.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/manifold_mixup.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/manifold_mixup.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/cam.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Class Appearance Model:<\/b> A demonstration of the Class Appearance Model (CAM) callback in torchbearer.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/cam.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/cam.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/cam.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n<a id=\"diff\"><\/a>\n\n### Differentiable Programming\n\n<table>\n    <tr>\n        <td rowspan=\"3\" width=\"160\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/optimisers.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Optimising Functions:<\/b> An example (and some fun visualisations) showing how torchbearer can be used for the purpose of optimising functions with respect to their parameters using gradient descent.\n        <\/td>\n        <td align=\"center\" width=\"80\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/svm.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Linear SVM:<\/b> Train a linear support vector machine (SVM) using torchbearer, with an interactive visualisation!\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td rowspan=\"3\">\n            <img src=\"http://www.pytorchbearer.org/assets/img/examples/amsgrad.jpg\" width=\"256\">\n        <\/td>    \n        <td rowspan=\"3\">\n            <b>Breaking Adam:<\/b> The Adam optimiser doesn't always converge, in this example we reimplement some of the function optimisations from the AMSGrad paper showing this empirically.\n        <\/td>\n        <td align=\"center\">\n            <a href=\"https://nbviewer.jupyter.org/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/nbviewer_logo.svg\" height=\"34\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/github_logo.png\" height=\"32\">\n            <\/a>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://colab.research.google.com/github/pytorchbearer/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb\">\n                <img src=\"http://www.pytorchbearer.org/assets/img/colab_logo.png\" height=\"28\">\n            <\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n<a id=\"installation\"><\/a>\n\n## Install\n\nThe easiest way to install torchbearer is with pip:\n\n`pip install torchbearer`\n\nAlternatively, build from source with:\n\n`pip install git+https://github.com/pytorchbearer/torchbearer`\n\n<a id=\"citing\"><\/a>\n\n## Citing Torchbearer\n\nIf you find that torchbearer is useful to your research then please consider citing our preprint: [Torchbearer: A Model Fitting Library for PyTorch](https://arxiv.org/abs/1809.03363), with the following BibTeX entry:\n\n```\n@article{torchbearer2018,\n  author = {Ethan Harris and Matthew Painter and Jonathon Hare},\n  title = {Torchbearer: A Model Fitting Library for PyTorch},\n  journal  = {arXiv preprint arXiv:1809.03363},\n  year = {2018}\n}\n```\n\n<a id=\"related\"><\/a>\n\n## Related\n\nTorchbearer isn't the only library for training PyTorch models. Here are a few others that might better suit your needs (this is by no means a complete list, see the [awesome pytorch list](https://github.com/bharathgs/Awesome-pytorch-list) or [the incredible pytorch](https://github.com/ritchieng/the-incredible-pytorch) for more):\n- [skorch](https://github.com/dnouri/skorch), model wrapper that enables use with scikit-learn - crossval etc. can be very useful\n- [PyToune](https://github.com/GRAAL-Research/pytoune), simple Keras style API\n- [ignite](https://github.com/pytorch/ignite), advanced model training from the makers of PyTorch, can need a lot of code for advanced functions (e.g. Tensorboard)\n- [TorchNetTwo (TNT)](https://github.com/pytorch/tnt), can be complex to use but well established, somewhat replaced by ignite\n- [Inferno](https://github.com/inferno-pytorch/inferno), training utilities and convenience classes for PyTorch   \n- [Pytorch Lightning](https://github.com/williamFalcon/pytorch-lightning), lightweight wrapper on top of PyTorch with advanced multi-gpu and cluster support\n- [Pywick](https://github.com/achaiah/pywick), high-level training framework, based on torchsample, support for various segmentation models\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CCBA:09ED:E4B5B:3F2B1B:6AB92A1E"},"text_sha256":"d5eb3950442b8e8cb6b58e4038660a65dba20c2f5af97c494a69012af3d5558b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"DiffSharp/DiffSharp","input_row":{"repository":"DiffSharp/DiffSharp","url":"https://github.com/DiffSharp/DiffSharp","name":"DiffSharp","owner":"DiffSharp","description":"DiffSharp: Differentiable Functional Programming","language":"F#","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":615,"issues":167,"created_at":"2014-08-28T16:19:45Z","updated_at":"2026-07-21T08:44:06Z","first_commit_at":"2014-08-28T15:47:17Z","last_commit_at":"2023-10-03T15:21:32Z","activity_months":109.16,"ai_ml_match_topics":"deep-learning; machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:19.459Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"DiffSharp/DiffSharp","visibility":"public","created_at":"2014-08-28T16:19:45Z","updated_at":"2026-07-21T08:44:06Z","private":false,"fork":false,"archived":false,"stargazers_count":615,"open_issues_count":37,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2713","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17B3C16:1BD49CF:6AB92A1F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2712","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F7:E80A6:179E8A4:1BC0ADA:6AB92A1F"},"commit":{"sha":"9bba790869eb577f3169dc62970502f903a39565","url":"https://github.com/DiffSharp/DiffSharp/commit/9bba790869eb577f3169dc62970502f903a39565","date":"2017-07-21T17:40:36Z","author_date":"2017-07-21T17:40:36Z","committer_date":"2017-07-21T17:40:36Z","tree_sha":"55afaa1793401097b20d9bcbfbe46dcc3820a35c","message_first_line":"Merge pull request #44 from dsyme/dx9"},"tree_request_status":200,"tree_rate":{"github_remaining":"2711","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D5:6E5BD:1790AE2:1BB1730:6AB92A20"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2959,"blob_sha":"725ef00390c057919fc7f210a216d3df84ebcc72","priority":0}],"documents":[{"path":"README.md","size":2959,"blob_sha":"725ef00390c057919fc7f210a216d3df84ebcc72","priority":0,"status":200,"text":"DiffSharp: Differentiable Functional Programming\n------------------------------------------------\n\nDiffSharp is a functional [automatic differentiation](http://en.wikipedia.org/wiki/Automatic_differentiation) (AD) library implemented in the F# language. It supports C# and the other [CLI languages](http://en.wikipedia.org/wiki/List_of_CLI_languages). The library is being developed mainly for research applications in machine learning, by [Atılım Güneş Baydin](http://www.cs.nuim.ie/~gunes/) and [Barak A. Pearlmutter](http://bcl.hamilton.ie/~barak/), within the [Brain and Computation Lab](http://www.bcl.hamilton.ie/), National University of Ireland Maynooth.\n\nPlease visit the [project website](http://gbaydin.github.io/DiffSharp/) for detailed documentation and examples.\n\nYou can come and join the Gitter chat room, if you want to chat with us:\n\n[![Join the chat at https://gitter.im/DiffSharp/DiffSharp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/DiffSharp/DiffSharp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n### Project statistics\n\n[![Issue Stats](http://issuestats.com/github/diffsharp/diffsharp/badge/pr?style=flat-square)](http://issuestats.com/github/diffsharp/diffsharp)\n[![Issue Stats](http://issuestats.com/github/diffsharp/diffsharp/badge/issue?style=flat-square)](http://issuestats.com/github/diffsharp/diffsharp)\n\n### Current build status\n\n[![Build status (Windows)](https://ci.appveyor.com/api/projects/status/wxgs03g5g1affxrs?svg=true)](https://ci.appveyor.com/project/gbaydin/diffsharp)\n\n[![Build Status (Unix/Mono)](https://travis-ci.org/DiffSharp/DiffSharp.svg?branch=master)](https://travis-ci.org/DiffSharp/DiffSharp)\n\n### License\n\nCopyright (c) 2014–2016, National University of Ireland Maynooth (Atilim Gunes Baydin, Barak A. Pearlmutter)\n\nWritten by: Atilim Gunes Baydin & Barak A. Pearlmutter\n\n    Brain and Computation Lab\n    Hamilton Institute & Department of Computer Science\n    National University of Ireland Maynooth\n    Maynooth, Co. Kildare\n    Ireland\n\n    www.bcl.hamilton.ie\n\nDiffSharp is released under the GNU Lesser General Public License (LGPL) version 3. This means that you can integrate DiffSharp as a shared library into your software, which may be commercial, closed-source, or open-source under any license (including non-GPL), provided that you use the unmodified DiffSharp binary and reproduce the above copyright notice with a link to the DiffSharp website. Permitting uses outside of these license terms may be considered on a by-case basis.\n\nThis work is supported by Science Foundation Ireland grant 09/IN.1/I2637.\n\n### Other licenses\n\nDiffSharp uses:\n\n* [OpenBLAS](http://www.openblas.net/) by Zhang Xianyi, Wang Qian, Werner Saar (BSD license) for BLAS/LAPACK operations\n* [F# Quotations Evaluator](http://fsprojects.github.io/FSharp.Quotations.Evaluator/) by Paul Westcott and others (Unlicense/public domain) for compiling code quotations\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C7BE:326565:17A827:5DCF25:6AB92A1F"},"text_sha256":"8ecba125f473284718461678d2e7916a06a7b6e437141002849044fbc9d77e5f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2710","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17C0ECA:1BE2C47:6AB92A21"},"commit":{"sha":"afee7e9c5c1ea872e233cca216cfd047da895863","url":"https://github.com/DiffSharp/DiffSharp/commit/afee7e9c5c1ea872e233cca216cfd047da895863","date":"2023-10-03T15:21:32Z","author_date":"2023-10-03T15:21:32Z","committer_date":"2023-10-03T15:21:32Z","tree_sha":"c7869441125a9b675d12113f5fbb49390f74be92","message_first_line":"Merge pull request #443 from smoothdeveloper/minor-torchsharp-update"},"tree_request_status":200,"tree_rate":{"github_remaining":"2709","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17CAD8F:1BEC71A:6AB92A21"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2927,"blob_sha":"94fe63b38ed98077bcecfb96ea7a2607d8667e8e","priority":0}],"documents":[{"path":"README.md","size":2927,"blob_sha":"94fe63b38ed98077bcecfb96ea7a2607d8667e8e","priority":0,"status":200,"text":"<div align=\"left\">\n  <a href=\"https://diffsharp.github.io\"> <img height=\"80px\" src=\"docs/img/diffsharp-logo-text.png\"><\/a>\n<\/div>\n\n-----------------------------------------\n\n[![Build Status](https://github.com/DiffSharp/DiffSharp/workflows/Build/test/docs/publish/badge.svg)](https://github.com/DiffSharp/DiffSharp/actions)\n[![Coverage Status](https://coveralls.io/repos/github/DiffSharp/DiffSharp/badge.svg?branch=)](https://coveralls.io/github/DiffSharp/DiffSharp?branch=)\n\nThis is the development branch of DiffSharp 1.0.\n\n> **NOTE: This branch is undergoing development. It has incomplete code, functionality, and design that are likely to change without notice; when using TorchSharp backend, only x64 platform is currently supported out of the box, see [DEVGUIDE.md] for more details.**\n\nDiffSharp is a tensor library with support for [differentiable programming](https://en.wikipedia.org/wiki/Differentiable_programming). It is designed for use in machine learning, probabilistic programming, optimization and other domains.\n\n**Key features**\n\n* Nested and mixed-mode differentiation\n* Common optimizers, model elements, differentiable probability distributions\n* F# for robust functional programming\n* PyTorch familiar naming and idioms, efficient LibTorch CUDA/C++ tensors with GPU support\n* Linux, macOS, Windows supported\n* Use interactive notebooks in Jupyter and Visual Studio Code\n* 100% open source\n\n## Documentation\n\nYou can find the documentation [here](https://diffsharp.github.io/), including information on installation and getting started.\n\nRelease notes can be found [here](https://github.com/DiffSharp/DiffSharp/blob/dev/RELEASE_NOTES.md).\n\n## Communication\n\nPlease use [GitHub issues](https://github.com/DiffSharp/DiffSharp/issues) to share bug reports, feature requests, installation issues, suggestions etc.\n\n## Contributing\n\nWe welcome all contributions.\n\n* Bug fixes: if you encounter a bug, please open an [issue](https://github.com/DiffSharp/DiffSharp/issues) describing the bug. If you are planning to contribute a bug fix, please feel free to do so in a pull request.\n* New features: if you plan to contribute new features, please first open an [issue](https://github.com/DiffSharp/DiffSharp/issues) to discuss the feature before creating a pull request.\n\n## The Team\n\nDiffSharp is developed by [Atılım Güneş Baydin](http://www.robots.ox.ac.uk/~gunes/), [Don Syme](https://www.microsoft.com/en-us/research/people/dsyme/) and other contributors, having started as a project supervised by the automatic differentiation wizards [Barak Pearlmutter](https://scholar.google.com/citations?user=AxFrw0sAAAAJ&hl=en) and [Jeffrey Siskind](https://scholar.google.com/citations?user=CgSBtPYAAAAJ&hl=en).\n\n## License\n\nDiffSharp is licensed under the BSD 2-Clause \"Simplified\" License, which you can find in the [LICENSE](https://github.com/DiffSharp/DiffSharp/blob/dev/LICENSE) file in this repository. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"23F0:3AC15:17EC78:5E11BF:6AB92A21"},"text_sha256":"cab2c7b0bbba5478bb30aef27601c8b4919b5548b815d87df79663b860e7119c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lvapeab/nmt-keras","input_row":{"repository":"lvapeab/nmt-keras","url":"https://github.com/lvapeab/nmt-keras","name":"nmt-keras","owner":"lvapeab","description":"Neural Machine Translation with Keras ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":531,"issues":123,"created_at":"2016-11-22T14:04:09Z","updated_at":"2026-08-01T08:33:32Z","first_commit_at":"2016-11-22T14:04:09Z","last_commit_at":"2021-07-30T09:28:59Z","activity_months":56.200000000000003,"ai_ml_match_topics":"deep-learning; machine-learning; transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:22.349Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lvapeab/nmt-keras","visibility":"public","created_at":"2016-11-22T14:04:09Z","updated_at":"2026-08-01T08:33:32Z","private":false,"fork":false,"archived":false,"stargazers_count":531,"open_issues_count":3,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2708","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0854:35C5DA:179C600:1BBDB2B:6AB92A22"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2707","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:17E6633:1C073EB:6AB92A22"},"commit":{"sha":"0bc56bb4e3717420c5a2cab0be3e00838665fe2d","url":"https://github.com/lvapeab/nmt-keras/commit/0bc56bb4e3717420c5a2cab0be3e00838665fe2d","date":"2018-05-15T09:29:45Z","author_date":"2018-05-15T09:29:45Z","committer_date":"2018-05-15T09:29:45Z","tree_sha":"3100f74a620af962caf38c9b36d7a97188376bad","message_first_line":"Minor change"},"tree_request_status":200,"tree_rate":{"github_remaining":"2706","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17C0FFD:1BE2DA7:6AB92A23"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10360,"blob_sha":"2c73916748993e415cb6ea71e0bd70a14f8f6f08","priority":0}],"documents":[{"path":"README.md","size":10360,"blob_sha":"2c73916748993e415cb6ea71e0bd70a14f8f6f08","priority":0,"status":200,"text":"# NMT-Keras\n\n[![Documentation](https://readthedocs.org/projects/nmt-keras/badge/?version=latest)](https://nmt-keras.readthedocs.io) [![Build Status](https://travis-ci.org/lvapeab/nmt-keras.svg?branch=master)](https://travis-ci.org/lvapeab/nmt-keras) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1239923bcbba438b97b374ae8dc435be)](https://www.codacy.com/app/lvapeab/nmt-keras?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=lvapeab/nmt-keras&amp;utm_campaign=Badge_Grade) [![Requirements Status](https://requires.io/github/lvapeab/nmt-keras/requirements.svg?branch=master)](https://requires.io/github/lvapeab/nmt-keras/requirements/?branch=master) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\nNeural Machine Translation with Keras (Theano and Tensorflow).\n\nLibrary documentation: [nmt-keras.readthedocs.io](https://nmt-keras.readthedocs.io)\n\n<!--<div align=\"left\">-->\n  <!--<br><br><img src=\"https://raw.githubusercontent.com/lvapeab/nmt-keras/master/examples/documentation/attention_nmt_model.png?token=AEf6E5RhGVqGRSmYi87EbtiGZK7lPxrFks5ZAx-KwA%3D%3D\"><br><br>-->\n<!--<\/div>-->\n\n<!--<div align=\"left\">-->\n  <!--<br><br><img  width=\"100%\" \"height:100%\" \"object-fit: cover\" \"overflow: hidden\" src=\"\"><br><br>-->\n<!--<\/div>-->\n\n## Attentional recurrent neural network NMT model\n![alt text](examples/documentation/attention_nmt_model.png \"RNN NMT\")\n\n## Transformer NMT model\n![alt text](examples/documentation/transformer_nmt_model.png \"Transformer NMT\")\n#\n\n\n## Features (in addition to the full Keras cosmos): \n * :heavy_exclamation_mark: First version of the Transformer model (from [Attention is All You Need](https://arxiv.org/abs/1706.03762)). Somewhat untested and missing the tied embeddings.\n * [Tensorboard integration](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/tensorboard_integration.md).\n * Online learning and Interactive neural machine translation (INMT). See [the interactive NMT branch](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT).\n * Attention model over the input sequence of annotations.\n   - Supporting [Bahdanau (Add)](https://arxiv.org/abs/1409.0473) and [Luong (Dot)](https://arxiv.org/abs/1508.04025) attention mechanisms.\n   - Also supports double stochastic attention (Eq. 14 from [arXiv:1502.03044](https://arxiv.org/pdf/1502.03044.pdf))\n * Peeked decoder: The previously generated word is an input of the current timestep.\n * Beam search decoding.\n * Ensemble decoding ([sample_ensemble.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py)).\n   - Featuring length and source coverage normalization ([reference](https://arxiv.org/abs/1609.08144)).\n * Translation scoring ([score.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py)).\n * Model averaging ([utils/model_average.py](https://github.com/lvapeab/nmt-keras/blob/master/utils/average_models.py)).\n * Support for GRU/LSTM networks:\n   - Regular GRU/LSTM units.\n   - [Conditional](https://arxiv.org/abs/1703.04357) GRU/LSTM units in the decoder.   \n   - Multilayered residual GRU/LSTM networks (and their Conditional version).\n * [Label smoothing](https://arxiv.org/abs/1512.00567).  \n * N-best list generation (as byproduct of the beam search process).\n * Unknown words replacement (see Section 3.3 from [this paper](https://arxiv.org/pdf/1412.2007v2.pdf))\n * Use of pretrained ([Glove](http://nlp.stanford.edu/projects/glove/) or [Word2Vec](https://code.google.com/archive/p/word2vec/)) word embedding vectors.\n * MLPs for initializing the RNN hidden and memory state.\n * [Spearmint](https://github.com/HIPS/Spearmint) [wrapper](https://github.com/lvapeab/nmt-keras/tree/master/meta-optimizers/spearmint) for hyperparameter optimization.\n * [Client-server](https://github.com/lvapeab/nmt-keras/tree/master/demo-web) architecture for web demos:\n    - Regular NMT.\n    - [Interactive NMT](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT).\n    - [Check out the demo!](http://casmacat.prhlt.upv.es/inmt)\n    \n## Installation\n\nAssuming that you have [pip](https://en.wikipedia.org/wiki/Pip_(package_manager)) installed, run:\n  \n  ```bash\n  git clone https://github.com/lvapeab/nmt-keras\n  cd nmt-keras\n  pip install -r requirements.txt\n  ```\n \n for obtaining the required packages for running this library.\n \n\n### Requirements\n\nNMT-Keras requires the following libraries:\n\n - [Our version of Keras](https://github.com/MarcBS/keras) (Recommended v. 2.0.7 or newer).\n - [Multimodal Keras Wrapper](https://github.com/lvapeab/multimodal_keras_wrapper) (v. 2.0 or newer). ([Documentation](http://marcbs.github.io/staged_keras_wrapper/) and [tutorial](http://marcbs.github.io/multimodal_keras_wrapper/tutorial.html)).\n - [Coco-caption evaluation package](https://github.com/lvapeab/coco-caption/tree/master/pycocoevalcap/) (Only required to perform evaluation). This package requires `java` (version 1.8.0 or newer).\n\n\n## Usage\n\n### Training\n 1) Set a training configuration in the `config.py` script. Each parameter is commented. See the [documentation file](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/config.md) for further info about each specific hyperparameter.\n You can also specify the parameters when calling the `main.py` script following the syntax `Key=Value`\n\n 2) Train!:\n\n  ``\n python main.py\n ``\n\n\n### Decoding\n Once we have our model trained, we can translate new text using the [sample_ensemble.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py) script. Please refer to the [ensembling_tutorial](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/ensembling_tutorial.md) for more details about this script. \nIn short, if we want to use the models from the first three epochs to translate the `examples/EuTrans/test.en` file, just run:\n ```bash\n  python sample_ensemble.py \n              --models trained_models/tutorial_model/epoch_1 \\ \n                       trained_models/tutorial_model/epoch_2 \\\n              --dataset datasets/Dataset_tutorial_dataset.pkl \\\n              --text examples/EuTrans/test.en\n  ```\n \n \n ### Scoring\n \n The [score.py](https://github.com/lvapeab/nmt-keras/blob/master/score.py) script can be used to obtain the (-log)probabilities of a parallel corpus. Its syntax is the following:\n```\npython score.py --help\nusage: Use several translation models for scoring source--target pairs\n       [-h] -ds DATASET [-src SOURCE] [-trg TARGET] [-s SPLITS [SPLITS ...]]\n       [-d DEST] [-v] [-c CONFIG] --models MODELS [MODELS ...]\noptional arguments:\n    -h, --help            show this help message and exit\n    -ds DATASET, --dataset DATASET\n                            Dataset instance with data\n    -src SOURCE, --source SOURCE\n                            Text file with source sentences\n    -trg TARGET, --target TARGET\n                            Text file with target sentences\n    -s SPLITS [SPLITS ...], --splits SPLITS [SPLITS ...]\n                            Splits to sample. Should be already includedinto the\n                            dataset object.\n    -d DEST, --dest DEST  File to save scores in\n    -v, --verbose         Be verbose\n    -c CONFIG, --config CONFIG\n                            Config pkl for loading the model configuration. If not\n                            specified, hyperparameters are read from config.py\n    --models MODELS [MODELS ...]\n                            path to the models\n  ```\n  \n  \n ### Advanced features\n Other features such as online learning or interactive NMT protocols are implemented in the [interactiveNMT](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT) branch.\n\n\n## Resources\n\n * In [examples/documentation/neural_machine_translation.pdf](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/neural_machine_translation.pdf) you'll find an overview of an attentional NMT system.\n\n * In the [examples](https://github.com/lvapeab/nmt-keras/blob/master/examples/) folder you'll find some tutorials for running this library. They are expected to be followed in order:\n    \n    1) [Dataset set up](https://github.com/lvapeab/nmt-keras/blob/master/examples/1_dataset_tutorial.ipynb): Shows how to invoke and configure a Dataset instance for a translation problem.\n    \n    2) [Training tutorial](https://github.com/lvapeab/nmt-keras/blob/master/examples/2_training_tutorial.ipynb): Shows how to call a translation model, link it with the dataset object and construct calllbacks for monitorizing the training. \n    \n    3) [Decoding tutorial](https://github.com/lvapeab/nmt-keras/blob/master/examples/3_decoding_tutorial.ipynb): Shows how to call a trained translation model and use it to translate new text. \n\n    4) [NMT model tutorial](https://github.com/lvapeab/nmt-keras/blob/master/examples/4_nmt_model_tutorial.ipynb): Shows how to build a state-of-the-art NMT model with Keras in few (~50) lines. \n\n\n## Citation\n\nIf you use this toolkit in your research, please cite:\n\n```\n@misc{nmt-keras2017,\n\tauthor = {Peris, {\\'A}lvaro},\n\ttitle = {{NMT}-{K}eras},\n\tyear = {2017},\n\tpublisher = {GitHub},\n\tnote = {GitHub repository},\n\thowpublished = {\\url{https://github.com/lvapeab/nmt-keras}},\n}\n```\n\n\nNMT-Keras was used in a number of papers:\n\n* [Online Learning for Effort Reduction in Interactive Neural Machine Translation](https://arxiv.org/abs/1802.03594)\n* [Adapting Neural Machine Translation with Parallel Synthetic Data](http://www.statmt.org/wmt17/pdf/WMT14.pdf)\n* [Online Learning for Neural Machine Translation Post-editing](https://arxiv.org/pdf/1706.03196.pdf)\n\n\n### Acknowledgement\n\nMuch of this library has been developed together with [Marc Bolaños](https://github.com/MarcBS) ([web page](http://www.ub.edu/cvub/marcbolanos/)) for other sequence-to-sequence problems. \n\nTo see other projects following the same philosophy and style of NMT-Keras, take a look to:\n\n[TMA for egocentric captioning based on temporally-linked sequences](https://github.com/MarcBS/TMA).\n\n[VIBIKNet for visual question answering](https://github.com/MarcBS/VIBIKNet).\n\n[ABiViRNet for video description](https://github.com/lvapeab/ABiViRNet).\n\n[Sentence SelectioNN for sentence classification and selection](https://github.com/lvapeab/sentence-selectioNN).\n\n\n## Contact\n\nÁlvaro Peris ([web page](http://lvapeab.github.io/)): lvapeab@prhlt.upv.es \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:177503:5D97EE:6AB92A21"},"text_sha256":"78da4366b09770c9729405e7160e892bd8bc839b0b180f6f356c991eea8f78c6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2705","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B4:78367:18073B8:1C290D5:6AB92A23"},"commit":{"sha":"865613dd5d23eb87674b602e690f1df9d61cfee8","url":"https://github.com/lvapeab/nmt-keras/commit/865613dd5d23eb87674b602e690f1df9d61cfee8","date":"2021-07-30T09:28:59Z","author_date":"2021-07-30T09:28:59Z","committer_date":"2021-07-30T09:28:59Z","tree_sha":"807fe22f027adba99fe9c6f9f64f9327ac0c1054","message_first_line":"Update notebook"},"tree_request_status":200,"tree_rate":{"github_remaining":"2704","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:1866D39:1C891A9:6AB92A24"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11204,"blob_sha":"927974c102d88a72f0c4894cdd666f961aed0e0a","priority":0}],"documents":[{"path":"README.md","size":11204,"blob_sha":"927974c102d88a72f0c4894cdd666f961aed0e0a","priority":0,"status":200,"text":"# NMT-Keras\n\n[![Documentation](https://readthedocs.org/projects/nmt-keras/badge/?version=latest)](https://nmt-keras.readthedocs.io) [![Build Status](https://travis-ci.org/lvapeab/nmt-keras.svg)](https://travis-ci.org/lvapeab/nmt-keras) [![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lvapeab/nmt-keras/blob/master/examples/tutorial.ipynb)  ![Compatibility](https://img.shields.io/badge/Python-3.7-blue.svg) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/lvapeab/nmt-keras/blob/master/LICENSE)\n\nNeural Machine Translation with Keras.\n\nLibrary documentation: [nmt-keras.readthedocs.io](https://nmt-keras.readthedocs.io)\n\n<!--<div align=\"left\">-->\n  <!--<br><br><img src=\"https://raw.githubusercontent.com/lvapeab/nmt-keras/master/examples/documentation/attention_nmt_model.png?token=AEf6E5RhGVqGRSmYi87EbtiGZK7lPxrFks5ZAx-KwA%3D%3D\"><br><br>-->\n<!--<\/div>-->\n\n<!--<div align=\"left\">-->\n  <!--<br><br><img  width=\"100%\" \"height:100%\" \"object-fit: cover\" \"overflow: hidden\" src=\"\"><br><br>-->\n<!--<\/div>-->\n\n## Attentional recurrent neural network NMT model\n![alt text](examples/documentation/attention_nmt_model.png \"RNN NMT\")\n\n## Transformer NMT model\n![alt text](examples/documentation/transformer_nmt_model.png \"Transformer NMT\")\n#\n\n\n## Features (in addition to the full Keras cosmos): .\n * :heavy_exclamation_mark: Multi-GPU training (only for Tensorflow). \n * [Transformer model](https://arxiv.org/abs/1706.03762).\n * [Tensorboard integration](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/tensorboard_integration.md).\n * Online learning and Interactive neural machine translation (INMT). See [the interactive NMT branch](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT).\n * Attention model over the input sequence of annotations.\n   - Supporting [Bahdanau (Add)](https://arxiv.org/abs/1409.0473) [Luong (Dot)](https://arxiv.org/abs/1508.04025) attention mechanisms.\n   - Also supports double stochastic attention (Eq. 14 from [arXiv:1502.03044](https://arxiv.org/pdf/1502.03044.pdf))\n * Peeked decoder: The previously generated word is an input of the current timestep.\n * Beam search decoding.\n * Ensemble decoding ([sample_ensemble.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py)).\n   - Featuring length and source coverage normalization ([reference](https://arxiv.org/abs/1609.08144)).\n * Translation scoring ([score.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py)).\n * Model averaging ([utils/model_average.py](https://github.com/lvapeab/nmt-keras/blob/master/utils/average_models.py)).\n * Support for GRU/LSTM networks:\n   - Regular GRU/LSTM units.\n   - [Conditional](https://arxiv.org/abs/1703.04357) GRU/LSTM units in the decoder.   \n   - Multilayered residual GRU/LSTM networks (and their Conditional version).\n * [Label smoothing](https://arxiv.org/abs/1512.00567).  \n * N-best list generation (as byproduct of the beam search process).\n * Unknown words replacement (see Section 3.3 from [this paper](https://arxiv.org/pdf/1412.2007v2.pdf))\n * Use of pretrained ([Glove](http://nlp.stanford.edu/projects/glove/) or [Word2Vec](https://code.google.com/archive/p/word2vec/)) word embedding vectors.\n * MLPs for initializing the RNN hidden and memory state.\n * [Spearmint](https://github.com/HIPS/Spearmint) [wrapper](https://github.com/lvapeab/nmt-keras/tree/master/meta-optimizers/spearmint) for hyperparameter optimization.\n * [Client-server](https://github.com/lvapeab/nmt-keras/tree/master/demo-web) architecture for web demos:\n    - Regular NMT.\n    - [Interactive NMT](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT).\n    - [Check out the demo!](http://casmacat.prhlt.upv.es/inmt)\n    \n## Installation\n\nAssuming that you have [pip](https://en.wikipedia.org/wiki/Pip_(package_manager)) installed and updated (>18), run:\n  \n  ```bash\n  git clone https://github.com/lvapeab/nmt-keras\n  cd nmt-keras\n  pip install -e .\n  ```\n \n for installing the library.\n \n\n### Requirements\n\nNMT-Keras requires the following libraries:\n\n - [Our version of Keras](https://github.com/MarcBS/keras) (Recommended v. 2.0.7 or newer).\n - [Multimodal Keras Wrapper](https://github.com/lvapeab/multimodal_keras_wrapper) (v. 2.0 or newer). ([Documentation](http://marcbs.github.io/staged_keras_wrapper/) and [tutorial](http://marcbs.github.io/multimodal_keras_wrapper/tutorial.html)).\n\n\nFor accelerating the training and decoding on CUDA GPUs, you can optionally install:\n\n - [CuDNN](https://developer.nvidia.com/cudnn).\n - [CuPy](https://github.com/cupy/cupy).\n\nFor evaluating with additional metrics (Meteor, TER, etc), you can use the [Coco-caption evaluation package](https://github.com/lvapeab/coco-caption/tree/master/pycocoevalcap/) and set `METRICS='coco'` in the `config.py` file. This package requires `java` (version 1.8.0 or newer).\n\n\n## Usage\n\n### Training\n 1) Set a training configuration in the `config.py` script. Each parameter is commented. See the [documentation file](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/config.md) for further info about each specific hyperparameter.\n You can also specify the parameters when calling the `main.py` script following the syntax `Key=Value`\n\n 2) Train!:\n\n  ``\n python main.py\n ``\n\n\n### Decoding\n Once we have our model trained, we can translate new text using the [sample_ensemble.py](https://github.com/lvapeab/nmt-keras/blob/master/sample_ensemble.py) script. Please refer to the [ensembling_tutorial](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/ensembling_tutorial.md) for more details about this script. \nIn short, if we want to use the models from the first three epochs to translate the `examples/EuTrans/test.en` file, just run:\n ```bash\n  python sample_ensemble.py \n              --models trained_models/tutorial_model/epoch_1 \\ \n                       trained_models/tutorial_model/epoch_2 \\\n              --dataset datasets/Dataset_tutorial_dataset.pkl \\\n              --text examples/EuTrans/test.en\n  ```\n \n \n### Scoring\n \n The [score.py](https://github.com/lvapeab/nmt-keras/blob/master/score.py) script can be used to obtain the (-log)probabilities of a parallel corpus. Its syntax is the following:\n```\npython score.py --help\nusage: Use several translation models for scoring source--target pairs\n       [-h] -ds DATASET [-src SOURCE] [-trg TARGET] [-s SPLITS [SPLITS ...]]\n       [-d DEST] [-v] [-c CONFIG] --models MODELS [MODELS ...]\noptional arguments:\n    -h, --help            show this help message and exit\n    -ds DATASET, --dataset DATASET\n                            Dataset instance with data\n    -src SOURCE, --source SOURCE\n                            Text file with source sentences\n    -trg TARGET, --target TARGET\n                            Text file with target sentences\n    -s SPLITS [SPLITS ...], --splits SPLITS [SPLITS ...]\n                            Splits to sample. Should be already includedinto the\n                            dataset object.\n    -d DEST, --dest DEST  File to save scores in\n    -v, --verbose         Be verbose\n    -c CONFIG, --config CONFIG\n                            Config pkl for loading the model configuration. If not\n                            specified, hyperparameters are read from config.py\n    --models MODELS [MODELS ...]\n                            path to the models\n  ```\n  \n  \n### Advanced features\n Other features such as online learning or interactive NMT protocols are implemented in the [interactiveNMT](https://github.com/lvapeab/nmt-keras/tree/interactive_NMT) branch.\n\n\n## Resources\n\n * [examples/documentation/nmt-keras_paper.pdf](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/nmt-keras_paper.pdf) contains a general overview of the NMT-Keras framework.\n \n * In [examples/documentation/neural_machine_translation.pdf](https://github.com/lvapeab/nmt-keras/blob/master/examples/documentation/neural_machine_translation.pdf) you'll find an overview of an attentional NMT system.\n\n * In the [examples](https://github.com/lvapeab/nmt-keras/blob/master/examples/) folder you'll find  2 colab notebooks, explaining the basic usage of this library:\n \n * An introduction to a complete NMT experiment: [![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lvapeab/nmt-keras/blob/master/examples/tutorial.ipynb) \n  * A dissected NMT model: [![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lvapeab/nmt-keras/blob/master/examples/modeling_tutorial.ipynb) \n \n\n * In the [examples/configs](https://github.com/lvapeab/nmt-keras/blob/master/examples/configs) folder you'll find two examples of configs for larger models.\n\n## Citation\n\nIf you use this toolkit in your research, please cite:\n\n```\n@article{nmt-keras:2018,\n journal = {The Prague Bulletin of Mathematical Linguistics},\n title = {{NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning}},\n author = {\\'{A}lvaro Peris and Francisco Casacuberta},\n year = {2018},\n volume = {111},\n pages = {113--124},\n doi = {10.2478/pralin-2018-0010},\n issn = {0032-6585},\n url = {https://ufal.mff.cuni.cz/pbml/111/art-peris-casacuberta.pdf}\n}\n```\n\n\nNMT-Keras was used in a number of papers:\n\n* [Online Learning for Effort Reduction in Interactive Neural Machine Translation](https://arxiv.org/abs/1802.03594)\n* [Adapting Neural Machine Translation with Parallel Synthetic Data](http://www.statmt.org/wmt17/pdf/WMT14.pdf)\n* [Online Learning for Neural Machine Translation Post-editing](https://arxiv.org/pdf/1706.03196.pdf)\n\n\n### Acknowledgement\n\nMuch of this library has been developed together with [Marc Bolaños](https://github.com/MarcBS) ([web page](http://www.ub.edu/cvub/marcbolanos/)) for other sequence-to-sequence problems. \n\nTo see other projects following the same philosophy and style of NMT-Keras, take a look to:\n\n[TMA: Egocentric captioning based on temporally-linked sequences](https://github.com/MarcBS/TMA).\n\n[VIBIKNet: Visual question answering](https://github.com/MarcBS/VIBIKNet).\n\n[ABiViRNet: Video description](https://github.com/lvapeab/ABiViRNet).\n\n[Sentence SelectioNN: Sentence classification and selection](https://github.com/lvapeab/sentence-selectioNN).\n\n[DeepQuest: State-of-the-art models for multi-level Quality Estimation](https://github.com/sheffieldnlp/deepQuest).\n\n\n### Warning!\n\nThe `Theano` backend is not tested anymore, although it should work. There is a [known issue](https://github.com/Theano/Theano/issues/5994) with the `Theano` backend. When running `NMT-Keras`, it will show the following message:\n\n```\n[...]\nraise theano.gof.InconsistencyError(\"Trying to reintroduce a removed node\")\nInconsistencyError: Trying to reintroduce a removed node\n```\n\nIt is not a critical error, the model keeps working and it is safe to ignore it. However, if you want the message to be gone, use the Theano flag `optimizer_excluding=scanOp_pushout_output`.\n\n\n\n## Contact\n\nÁlvaro Peris ([web page](http://lvapeab.github.io/)): lvapeab@prhlt.upv.es \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F0AC:3B7E2:170677:5D2E53:6AB92A24"},"text_sha256":"bad16f4c19ebacaa3d9df3751e8da1847d6f173f3e620d76310e85e9c8f3cc7a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"FAST-Imaging/FAST","input_row":{"repository":"FAST-Imaging/FAST","url":"https://github.com/FAST-Imaging/FAST","name":"FAST","owner":"FAST-Imaging","description":"A framework for high-performance medical image processing, neural network inference and visualization","language":"C++","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":517,"issues":156,"created_at":"2014-03-18T21:26:28Z","updated_at":"2026-09-22T10:07:58Z","first_commit_at":"2014-03-19T11:02:11Z","last_commit_at":"2026-09-16T07:53:42Z","activity_months":149.93000000000001,"ai_ml_match_topics":"deep-learning; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:25.066Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"FAST-Imaging/FAST","visibility":"public","created_at":"2014-03-18T21:26:28Z","updated_at":"2026-09-22T10:07:58Z","private":false,"fork":false,"archived":false,"stargazers_count":517,"open_issues_count":13,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2703","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0806:DC698:17ED1E3:1C0EA65:6AB92A25"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2702","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:177B5C2:1B9D706:6AB92A25"},"commit":{"sha":"e74fb646caced0aa7505252e3b3206be7c9be5ee","url":"https://github.com/FAST-Imaging/FAST/commit/e74fb646caced0aa7505252e3b3206be7c9be5ee","date":"2018-05-24T12:51:59Z","author_date":"2018-05-24T12:51:59Z","committer_date":"2018-05-24T12:51:59Z","tree_sha":"7445abe430de03ac5b285b547fdf39603422ddef","message_first_line":"Despeckle example"},"tree_request_status":200,"tree_rate":{"github_remaining":"2701","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DE:DC698:17ED26E:1C0EB08:6AB92A25"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2923,"blob_sha":"97f22f58ba3456537abc5c49f8515a90a4639c19","priority":0}],"documents":[{"path":"README.md","size":2923,"blob_sha":"97f22f58ba3456537abc5c49f8515a90a4639c19","priority":0,"status":200,"text":"![](https://github.com/smistad/FAST/wiki/images/fast_logo.png)\n\nFAST (Framework for Heterogeneous Medical Image Computing and Visualization) is an open-source cross-platform framework with the main goal of making it easier to do processing and visualization of medical images on heterogeneous systems (CPU+GPU).\n\nA detailed description of the framework design can be found [on the project wiki](https://github.com/smistad/FAST/wiki/Framework-Design) or in the research article:  \n[FAST: framework for heterogeneous medical image computing and visualization](http://dx.doi.org/10.1007/s11548-015-1158-5).  \nErik Smistad, Mohammadmehdi Bozorgi, Frank Lindseth.  \nInternational Journal of Computer Assisted Radiology and Surgery. February 2015.\n\nPreprint of article can be downloaded from [here](http://www.eriksmistad.no/wp-content/uploads/FAST_framework_for_heterogeneous_medical_image_computing_and_visualization.pdf).\nIf you use FAST for research, please cite this article.\n\n[![Join the chat at https://gitter.im/smistad/FAST](https://badges.gitter.im/smistad/FAST.svg)](https://gitter.im/smistad/FAST?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n### Download\n\nIf you are only interested in using/testing FAST, and not developing FAST, please download a [stable binary release](https://github.com/smistad/FAST/releases).\n\n### Build\n\nTo setup and build the framework, see the instructions for your operating system:\n* [Linux (Ubuntu)](https://github.com/smistad/FAST/wiki/Linux-instructions)\n* [Windows](https://github.com/smistad/FAST/wiki/Windows-instructions)\n* [Mac OS X](https://github.com/smistad/FAST/wiki/Mac-OS-X-instructions)\n\n### User guide and examples\n\nTo start using the framework, see the [Getting started with FAST](https://github.com/smistad/FAST/wiki/Getting-started-with-FAST) guide or the [examples page](https://github.com/smistad/FAST/wiki/Examples).\n\nBuild status of development branch\n---------------------\n* Ubuntu Linux 16.04, Intel CPU, NVIDIA GPU - ![Build Status](https://jenkins.eriksmistad.no/job/Ubuntu_16.04_NVIDIA_Development/badge/icon)\n* Ubuntu Linux 16.04, Intel CPU, AMD GPU - ![Build Status](https://jenkins.eriksmistad.no/job/Ubuntu_16.04_AMD_Development/badge/icon)\n* Mac OS X 10.12, Intel CPU, NVIDIA GPU - ![Build Status](https://jenkins.eriksmistad.no/job/Mac_10.12_NVIDIA_Development/badge/icon)\n* Windows 10, AMD CPU, AMD GPU - ![Build Status](https://jenkins.eriksmistad.no/job/Windows_10_AMD_Development/badge/icon)\n* Windows 10, Intel CPU, NVIDIA GPU - ![Build Status](https://jenkins.eriksmistad.no/job/Windows_10_NVIDIA_Development/badge/icon)\n\n![Surface mesh extracted from a large abdominal CT scan in about 100 ms using FAST and a modern GPU.](https://github.com/smistad/FAST/wiki/images/surface_extraction.png) ![Ultrasound image segmented using binary thresholding.](https://github.com/smistad/FAST/wiki/images/binary_thresholding.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"159E:2C474:17F42D:5E1B01:6AB92A24"},"text_sha256":"02c525c2721f5e2ac2a10f9e4ef1b7375796d1c99d80fb39b29e83a61854c89e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2700","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:128C90C:15DE889:6AB92A26"},"commit":{"sha":"cd59ababa305093b17f70ecac119da964c10c0f8","url":"https://github.com/FAST-Imaging/FAST/commit/cd59ababa305093b17f70ecac119da964c10c0f8","date":"2026-04-09T10:01:40Z","author_date":"2026-04-09T10:01:40Z","committer_date":"2026-04-09T10:01:40Z","tree_sha":"57bdc03e83e87708cc6975f99830745aec12c8e3","message_first_line":"Refactored the enable/disable functionality of renderers. A disabled renderer will still not draw, but will execute and update its data."},"tree_request_status":200,"tree_rate":{"github_remaining":"2699","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17C4A6F:1BE6BC9:6AB92A27"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6231,"blob_sha":"68d230a630cfe6f286594d870020e01e26ae4567","priority":0}],"documents":[{"path":"README.md","size":6231,"blob_sha":"68d230a630cfe6f286594d870020e01e26ae4567","priority":0,"status":200,"text":"![](https://raw.githubusercontent.com/FAST-Imaging/FAST/refs/heads/master/doc/images/fast_logo_wide_background.png)\n\n[![GitHub Discussions](https://img.shields.io/github/discussions/FAST-Imaging/FAST?label=GitHub%20discussions&logo=github)](https://github.com/FAST-Imaging/FAST/discussions)\n[![Pip Downloads](https://raw.githubusercontent.com/FAST-Imaging/pip-download-statistics/refs/heads/main/badges/last_month.svg)](https://fast-imaging.github.io/download-stats.html)\n[![GitHub Downloads](https://raw.githubusercontent.com/FAST-Imaging/github-statistics/refs/heads/main/badges/total.svg)](https://fast-imaging.github.io/download-stats.html)\n[![Documentation](https://img.shields.io/badge/Documentation-Online-blue?logo=googledocs&logoColor=white)](https://fast-imaging.github.io)\n\nFAST is an open-source framework developed by researchers at the Norwegian University of Science and Technology (NTNU) and SINTEF. \nThe main goal of FAST is to make it easier to do high-performance processing, neural network inference, and visualization of medical images utilizing multi-core CPUs and GPUs. To achieve this, FAST use modern C++, OpenCL and OpenGL, and neural network inference libraries such as TensorRT, OpenVINO, TensorFlow and ONNX Runtime.\n\n### Get started\nSee installation instructions for [Windows](https://fast-imaging.github.io/install-windows.html), [Ubuntu Linux](https://fast-imaging.github.io/install-ubuntu-linux.html), [macOS](https://fast-imaging.github.io/install-mac.html) and [Docker containers](https://fast-imaging.github.io/fast-containers.html).\n\nTo start using the framework, check out the [C++ tutorials](https://fast-imaging.github.io/cpp-tutorials.html) or the [Python tutorials](https://fast-imaging.github.io/python-tutorials.html).\n\nLearn best by example? Check out all the examples for [C++](https://fast-imaging.github.io/cpp-examples.html) and [Python](https://fast-imaging.github.io/python-examples.html).\n\nFor more examples and documentation, go to [fast-imaging.github.io](https://fast-imaging.github.io).\n\nNeed help? Post your questions on the [Discussions](https://github.com/FAST-Imaging/FAST/discussions/new?category=q-a) page.\n\n### Main features\n\n* **Data streaming** – Processing pipelines in FAST can handle both static and dynamic/temporal data without any change to the code. FAST can stream data from movie files, your webcamera, an Intel RealSense camera, a sequence of images and even directly from ultrasound scanners such as Clarius.\n* **Deep learning** – FAST provides a common interface for neural networks supporting different model formats (ONNX, protobuf, SavedModel, OpenVINO, UFF) and backends (Google TensorFlow, NVIDIA TensorRT, Intel OpenVINO, Microsoft ONNX Runtime), making it possible to create real-time neural network pipelines.\n* **High-level data management** – Data objects in FAST represent data, such as an image, on all processors. FAST keeps data coherent across the different storage areas thereby removing the burden of explicit memory handling from the developer.\n* **Wide data format support** - FAST supports several data formats (DICOM, metaimage (MHD), NIFTI, regular jpg/png/bmp images, videos, HDF5, VTK polydata, whole slide images, ultrasound file format) and data types (images 2D and 3D, grayscale and color, image pyramids, surface mesh, vertices, lines, text ++).\n* **High performance algorithms** – FAST has several high performance parallel OpenCL implementations of common algorithms, such as marching cubes surface extraction, Gaussian smoothing, non-local means, block matching tracking and seeded region growing.\n* **Fast concurrent visualization** – Rendering and computation are done in separate threads to ensure smooth responsive visualizations. Several types of visualizations are supported both 3D (mesh, point, line, image slice and volume rendering) and 2D (2D image, image slice and segmentation/label rendering, whole slide image (WSI) pyramids).\n* **Interoperability** – FAST can be used with Python and can also be easily integrated into existing Qt applications.\n\n### License\n\nThe source code of FAST is licensed under the BSD 2-clause license, however the FAST binaries use and are linked with many third-party libraries which has a number of different open source licences (MIT, Apache 2.0, LGPL ++), see the licences folder in the release for more details.\n\n### Research\n\nFAST has been described in the following research articles. If you use this framework for research please cite them:\n\n*[FAST: framework for heterogeneous medical image computing and visualization](http://www.eriksmistad.no/wp-content/uploads/FAST_framework_for_heterogeneous_medical_image_computing_and_visualization.pdf)\nErik Smistad, Mohammadmehdi Bozorgi, Frank Lindseth\nInternational Journal of Computer Assisted Radiology and Surgery 2015*\n\n*[High Performance Neural Network Inference, Streaming, and Visualization of Medical Images Using FAST](https://www.eriksmistad.no/wp-content/uploads/High-Performance-Neural-Network-Inference-Streaming-and-Visualization-of-Medical-Images-Using-FAST.pdf)\nErik Smistad, Andreas Østvik, André Pedersen\nIEEE Access 2019*\n\n### Build\n\nTo setup and build the framework, see the instructions for your operating system:\n* [Linux (Ubuntu)](https://fast-imaging.github.io/building-on-linux.html)\n* [Windows](https://fast-imaging.github.io/building-on-windows.html)\n* [macOS](https://fast-imaging.github.io/building-on-mac.html)\n\n\n[<img src=\"https://fast-imaging.github.io/alpha_blending_volume_renderer_CT.jpg\" height=\"300\">](https://fast-imaging.github.io/python-tutorial-mri-ct.html#autotoc_md116)\n[<img src=\"https://fast-imaging.github.io/rotating_3D.gif\" height=\"300\">](https://fast-imaging.github.io/create_rotating_3D_gif_8py-example.html)\n\n[<img src=\"https://fast-imaging.github.io/real_time_line_plotter.jpg\" width=\"570\">](https://fast-imaging.github.io/real_time_line_plotter_8py-example.html)\n\n[<img src=\"https://fast-imaging.github.io/nuclei_segmentation.jpg\" height=\"300\">](https://fast-imaging.github.io/python-tutorial-wsi.html#autotoc_md172)\n[<img src=\"https://fast-imaging.github.io/open_wsi.jpg\" height=\"300\">](https://fast-imaging.github.io/load_and_display_wsi_8py-example.html)\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47B6:3B6DE:175758:5D7DB7:6AB92A1E"},"text_sha256":"6c24a9b44f663513cebfccd5cf4e679cff79e53d55896119ea793810f16ae44b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"netdata/netdata","input_row":{"repository":"netdata/netdata","url":"https://github.com/netdata/netdata","name":"netdata","owner":"netdata","description":"The fastest path to AI-powered full stack observability, even for lean teams.","language":"Go","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":80672,"issues":8338,"created_at":"2013-06-17T18:39:10Z","updated_at":"2026-09-27T13:05:39Z","first_commit_at":"2013-06-17T18:39:10Z","last_commit_at":"2026-09-26T19:42:21Z","activity_months":159.30000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:28.082Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"netdata/netdata","visibility":"public","created_at":"2013-06-17T18:39:10Z","updated_at":"2026-09-27T13:05:39Z","private":false,"fork":false,"archived":false,"stargazers_count":80672,"open_issues_count":412,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2698","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17AE21F:1BD05F7:6AB92A28"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2697","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:17E6546:1C080C7:6AB92A28"},"commit":{"sha":"f3a2fe511fa36cc37def450a33832d5f8cf84290","url":"https://github.com/netdata/netdata/commit/f3a2fe511fa36cc37def450a33832d5f8cf84290","date":"2018-05-23T18:43:03Z","author_date":"2018-05-23T18:43:03Z","committer_date":"2018-05-23T18:43:03Z","tree_sha":"2a5cc0e19e57bf5bd3a95c50ac181ac465283ec8","message_first_line":"updated configs signatures"},"tree_request_status":200,"tree_rate":{"github_remaining":"2696","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"53BA:725A9:17D13A1:1BF3902:6AB92A28"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14898,"blob_sha":"7c25996cdc0954667e38f4c77b27db2784e9fc12","priority":0}],"documents":[{"path":"README.md","size":14898,"blob_sha":"7c25996cdc0954667e38f4c77b27db2784e9fc12","priority":0,"status":200,"text":"# netdata [![Build Status](https://travis-ci.org/firehol/netdata.svg?branch=master)](https://travis-ci.org/firehol/netdata) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a994873f30d045b9b4b83606c3eb3498)](https://www.codacy.com/app/netdata/netdata?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=firehol/netdata&amp;utm_campaign=Badge_Grade) [![Code Climate](https://codeclimate.com/github/firehol/netdata/badges/gpa.svg)](https://codeclimate.com/github/firehol/netdata) [![License: GPL v3+](https://img.shields.io/badge/License-GPL%20v3%2B-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n> *New to netdata? Here is a live demo: [http://my-netdata.io](http://my-netdata.io)*\n\n**netdata** is a system for **distributed real-time performance and health monitoring**.\nIt provides **unparalleled insights, in real-time**, of everything happening on the\nsystem it runs (including applications such as web and database servers), using\n**modern interactive web dashboards**.\n\n_netdata is **fast** and **efficient**, designed to permanently run on all systems\n(**physical** & **virtual** servers, **containers**, **IoT** devices), without\ndisrupting their core function._\n\nnetdata runs on **Linux**, **FreeBSD**, and **MacOS**.\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/linuxnetdata.svg?style=social&label=New%20-%20stay%20in%20touch%20-%20follow%20netdata%20on%20twitter)](https://twitter.com/linuxnetdata)\n[![analytics](http://www.google-analytics.com/collect?v=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Ffirehol%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Freadme&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()\n\n---\n\n## User base\n*Docker pulls*<br/>\n[![Docker titpetric/netdata Pulls](https://img.shields.io/docker/pulls/titpetric/netdata.svg?label=docker%20pulls%20titpetric/netdata)](https://hub.docker.com/r/titpetric/netdata/) [![Docker firehol/netdata Pulls](https://img.shields.io/docker/pulls/firehol/netdata.svg?label=docker%20pulls%20firehol/netdata)](https://hub.docker.com/r/firehol/netdata/)\n\n*Since May 16th 2016 (the date the [global public netdata registry](https://github.com/firehol/netdata/wiki/mynetdata-menu-item) was released):*<br/>\n[![User Base](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&label=user%20base&units=null&value_color=blue&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [![Monitored Servers](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&label=servers%20monitored&units=null&value_color=orange&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [![Sessions Served](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&label=sessions%20served&units=null&value_color=yellowgreen&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry)\n\n*in the last 24 hours:*<br/>\n[![New Users Today](http://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&after=-86400&options=unaligned&group=incremental-sum&label=new%20users%20today&units=null&value_color=blue&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [![New Machines Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&group=incremental-sum&after=-86400&options=unaligned&label=servers%20added%20today&units=null&value_color=orange&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [![Sessions Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&after=-86400&group=incremental-sum&options=unaligned&label=sessions%20served%20today&units=null&value_color=yellowgreen&precision=0&v42)](https://registry.my-netdata.io/#menu_netdata_submenu_registry)\n\n---\n\n## News\n\n`Mar 27th, 2018` - **[netdata v1.10.0 released!](https://github.com/firehol/netdata/releases)**\n\n - new web server, a lot faster and more secure\n - updated all javascript libraries to their latest versions (fixed compatibility issues - now netdata chart can now be embedded on **Atlassian Confluence** pages and remain fully interactive!)\n - new plugins:\n   - **BTRFS** (visualize BTRFS allocation with alarms)\n   - **bcache** (monitor hybrid setups HDD + SSD)\n   - **ceph**\n   - **nginx plus**\n   - **libreswan** (monitor the traffic of IPSEC tunnels)\n   - **traefik**\n   - **icecast**\n   - **ntpd**\n   - **httpcheck** (monitor any remote web server)\n   - **portcheck** (monitor any remote TCP port)\n   - **spring-boot** (monitor java spring-boot apps)\n   - **dnsdist**\n   - **Linux hugepages**\n - improved plugins:\n   - **statsd**\n   - **web_log**\n   - **cgroups** for containers and VMs monitoring (netdata now supports **systemd-nspawn** and **kubernetes** - fixed security issue with `cgroup-network`)\n   - **Linux memory**\n   - **diskspace**\n   - **network interfaces**\n   - **postgres**\n   - **rabbitmq**\n   - **apps.plugin** (now it also tracks swap usage per process)\n   - **haproxy**\n   - **uptime**\n   - **ksm** (kernel memory debupper)\n   - **mdstat** (software raid)\n   - **elasticsearch**\n   - **apcupsd**\n   - **dhcpd**\n   - **fronius**\n   - **stiebeletron**\n - new alarm notification methods\n   - **alerta**\n   - **IRC** (post on IRC channels)\n - and dozens more improvements, enhancements, features and compatibility fixes\n\n---\n\n## Features\n\n<p align=\"center\">\n<img src=\"https://cloud.githubusercontent.com/assets/2662304/19168687/f6a567be-8c19-11e6-8561-ce8d589e8346.gif\"/>\n<\/p>\n\n - **Stunning interactive bootstrap dashboards**<br/>\n   mouse and touch friendly, in 2 themes: dark, light\n\n - **Amazingly fast**<br/>\n   responds to all queries in less than 0.5 ms per metric,\n   even on low-end hardware\n\n - **Highly efficient**<br/>\n   collects thousands of metrics per server per second,\n   with just 1% CPU utilization of a single core, a few MB of RAM and no disk I/O at all\n\n - **Sophisticated alerting**<br/>\n   hundreds of alarms, **out of the box**!<br/>\n   supports dynamic thresholds, hysteresis, alarm templates,\n   multiple role-based notification methods (such as email, slack.com, flock.com,\n   pushover.net, pushbullet.com, telegram.org, twilio.com, messagebird.com, kavenegar.com)\n\n - **Extensible**<br/>\n   you can monitor anything you can get a metric for,\n   using its Plugin API (anything can be a netdata plugin,\n   BASH, python, perl, node.js, java, Go, ruby, etc)\n\n - **Embeddable**<br/>\n   it can run anywhere a Linux kernel runs (even IoT)\n   and its charts can be embedded on your web pages too\n\n - **Customizable**<br/>\n   custom dashboards can be built using simple HTML (no javascript necessary)\n\n - **Zero configuration**<br/>\n   auto-detects everything, it can collect up to 5000 metrics\n   per server out of the box\n\n - **Zero dependencies**<br/>\n   it is even its own web server, for its static web files and its web API\n\n - **Zero maintenance**<br/>\n   you just run it, it does the rest\n\n - **scales to infinity**<br/>\n   requiring minimal central resources\n\n - **several operating modes**<br/>\n   autonomous host monitoring, headless data collector, forwarding proxy, store and forward proxy, central multi-host monitoring, in all possible configurations.\n   Each node may have different metrics retention policy and run with or without health monitoring.\n\n - **time-series back-ends supported**<br/>\n   can archive its metrics on `graphite`, `opentsdb`, `prometheus`, json document DBs, in the same or lower detail\n   (lower: to prevent it from congesting these servers due to the amount of data collected)\n\n![netdata](https://cloud.githubusercontent.com/assets/2662304/14092712/93b039ea-f551-11e5-822c-beadbf2b2a2e.gif)\n\n---\n\n## What does it monitor?\n\nnetdata collects several thousands of metrics per device.\nAll these metrics are collected and visualized in real-time.\n\n> _Almost all metrics are auto-detected, without any configuration._\n\nThis is a list of what it currently monitors:\n\n- **CPU**<br/>\n  usage, interrupts, softirqs, frequency, total and per core, CPU states\n\n- **Memory**<br/>\n  RAM, swap and kernel memory usage, KSM (Kernel Samepage Merging), NUMA\n\n- **Disks**<br/>\n  per disk: I/O, operations, backlog, utilization, space, software RAID (md)\n\n   ![sda](https://cloud.githubusercontent.com/assets/2662304/14093195/c882bbf4-f554-11e5-8863-1788d643d2c0.gif)\n\n- **Network interfaces**<br/>\n  per interface: bandwidth, packets, errors, drops\n\n   ![dsl0](https://cloud.githubusercontent.com/assets/2662304/14093128/4d566494-f554-11e5-8ee4-5392e0ac51f0.gif)\n\n- **IPv4 networking**<br/>\n  bandwidth, packets, errors, fragments,\n  tcp: connections, packets, errors, handshake,\n  udp: packets, errors,\n  broadcast: bandwidth, packets,\n  multicast: bandwidth, packets\n\n- **IPv6 networking**<br/>\n  bandwidth, packets, errors, fragments, ECT,\n  udp: packets, errors,\n  udplite: packets, errors,\n  broadcast: bandwidth,\n  multicast: bandwidth, packets,\n  icmp: messages, errors, echos, router, neighbor, MLDv2, group membership,\n  break down by type\n\n- **Interprocess Communication - IPC**<br/>\n  such as semaphores and semaphores arrays\n\n- **netfilter / iptables Linux firewall**<br/>\n  connections, connection tracker events, errors\n\n- **Linux DDoS protection**<br/>\n  SYNPROXY metrics\n\n- **fping** latencies<\/br>\n  for any number of hosts, showing latency, packets and packet loss\n\n   ![image](https://cloud.githubusercontent.com/assets/2662304/20464811/9517d2b4-af57-11e6-8361-f6cc57541cd7.png)\n\n\n- **Processes**<br/>\n  running, blocked, forks, active\n\n- **Entropy**<br/>\n  random numbers pool, using in cryptography\n\n- **NFS file servers and clients**<br/>\n  NFS v2, v3, v4: I/O, cache, read ahead, RPC calls\n\n- **Network QoS**<br/>\n  the only tool that visualizes network `tc` classes in realtime\n\n   ![qos-tc-classes](https://cloud.githubusercontent.com/assets/2662304/14093004/68966020-f553-11e5-98fe-ffee2086fafd.gif)\n\n- **Linux Control Groups**<br/>\n  containers: systemd, lxc, docker\n\n- **Applications**<br/>\n  by grouping the process tree and reporting CPU, memory, disk reads,\n  disk writes, swap, threads, pipes, sockets - per group\n\n   ![apps](https://cloud.githubusercontent.com/assets/2662304/14093565/67c4002c-f557-11e5-86bd-0154f5135def.gif)\n\n- **Users and User Groups resource usage**<br/>\n  by summarizing the process tree per user and group,\n  reporting: CPU, memory, disk reads, disk writes, swap, threads, pipes, sockets\n\n- **Apache and lighttpd web servers**<br/>\n   `mod-status` (v2.2, v2.4) and cache log statistics, for multiple servers\n\n- **Nginx web servers**<br/>\n  `stub-status`, for multiple servers\n\n- **Tomcat**<br/>\n  accesses, threads, free memory, volume\n\n- **web server log files**<br/>\n  extracting in real-time, web server performance metrics and applying several health checks\n\n- **mySQL databases**<br/>\n  multiple servers, each showing: bandwidth, queries/s, handlers, locks, issues,\n  tmp operations, connections, binlog metrics, threads, innodb metrics, and more\n\n- **Postgres databases**<br/>\n  multiple servers, each showing: per database statistics (connections, tuples\n  read - written - returned, transactions, locks), backend processes, indexes,\n  tables, write ahead, background writer and more\n\n- **Redis databases**<br/>\n  multiple servers, each showing: operations, hit rate, memory, keys, clients, slaves\n\n- **couchdb**<br/>\n  reads/writes, request methods, status codes, tasks, replication, per-db, etc\n\n- **mongodb**<br/>\n  operations, clients, transactions, cursors, connections, asserts, locks, etc\n\n- **memcached databases**<br/>\n  multiple servers, each showing: bandwidth, connections, items\n\n- **elasticsearch**<br/>\n  search and index performance, latency, timings, cluster statistics, threads statistics, etc\n\n- **ISC Bind name servers**<br/>\n  multiple servers, each showing: clients, requests, queries, updates, failures and several per view metrics\n\n- **NSD name servers**<br/>\n  queries, zones, protocols, query types, transfers, etc.\n\n- **PowerDNS**<\/br>\n  queries, answers, cache, latency, etc.\n\n- **Postfix email servers**<br/>\n  message queue (entries, size)\n\n- **exim email servers**<br/>\n  message queue (emails queued)\n\n- **Dovecot** POP3/IMAP servers<br/>\n\n- **ISC dhcpd**<br/>\n  pools utilization, leases, etc.\n\n- **IPFS**<br/>\n  bandwidth, peers\n\n- **Squid proxy servers**<br/>\n  multiple servers, each showing: clients bandwidth and requests, servers bandwidth and requests\n\n- **HAproxy**<br/>\n  bandwidth, sessions, backends, etc\n\n- **varnish**<br/>\n  threads, sessions, hits, objects, backends, etc\n\n- **OpenVPN**<br/>\n  status per tunnel\n\n- **Hardware sensors**<br/>\n  `lm_sensors` and `IPMI`: temperature, voltage, fans, power, humidity\n\n- **NUT and APC UPSes**<br/>\n  load, charge, battery voltage, temperature, utility metrics, output metrics\n\n- **PHP-FPM**<br/>\n  multiple instances, each reporting connections, requests, performance\n\n- **hddtemp**<br/>\n  disk temperatures\n\n- **smartd**<br/>\n  disk S.M.A.R.T. values\n\n- **SNMP devices**<br/>\n  can be monitored too (although you will need to configure these)\n\n- **chrony**<\/br>\n  frequencies, offsets, delays, etc.\n\n- **beanstalkd**<\/br>\n  global and per tube monitoring\n\n- **statsd**<br/>\n  [netdata is a fully featured statsd server](https://github.com/firehol/netdata/wiki/statsd)\n\n- **ceph**<br/>\n  OSD usage, Pool usage, number of objects, etc.\n\nAnd you can extend it, by writing plugins that collect data from any source, using any computer language.\n\n---\n\n## netdata infographic\n\nThis is a high level overview of netdata feature set and architecture.\nClick it to to interact with it (it has direct links to documentation).\n\n[![netdata-overview](https://user-images.githubusercontent.com/2662304/37909754-6c812a7c-3114-11e8-8673-0d1926a9793a.png)](https://my-netdata.io/infographic.html)\n\n---\n\n## Installation\n\nUse our **[automatic installer](https://github.com/firehol/netdata/wiki/Installation)** to build and install it on your system.\n\nIt should run on **any Linux** system (including IoT). It has been tested on:\n\n- Alpine\n- Arch Linux\n- CentOS\n- Debian\n- Fedora\n- Gentoo\n- openSUSE\n- PLD Linux\n- RedHat Enterprise Linux\n- SUSE\n- Ubuntu\n\n---\n\n## Interaction with netdata\n\nAfter installation, you can interact with netdata using **[CLI](https://github.com/firehol/netdata/wiki/Command-Line-Options)** and web dashboards.\nThe default port of dashboard is 19999. To access the web dashboard on localhost, use: http://localhost:19999\n\n---\n\n## Documentation\n\nCheck the **[netdata wiki](https://github.com/firehol/netdata/wiki)**.\n\n## License\n\nnetdata is [GPLv3+](LICENSE).\n\nIt re-distributes other open-source tools and libraries. Please check the [third party licenses](https://github.com/firehol/netdata/blob/master/LICENSE-REDISTRIBUTED.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"23F0:3AC15:17ECCD:5E12FF:6AB92A22"},"text_sha256":"19277aefef881b3620be79d3d3681a9f3e092754fbad3c2bdb7d294857af8e92"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2695","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:17E0F70:1C030B5:6AB92A2A"},"commit":{"sha":"f4ff3823ba24ff59f42535d673214ad22695d82b","url":"https://github.com/netdata/netdata/commit/f4ff3823ba24ff59f42535d673214ad22695d82b","date":"2026-06-30T21:38:51Z","author_date":"2026-06-30T21:38:51Z","committer_date":"2026-06-30T21:38:51Z","tree_sha":"c0ea4dabb31e15c27eb0477ce91873723543188f","message_first_line":"NetFlow: restore sFlow visibility and listener docs (#22925)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2694","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090B:35C5DA:179CBE8:1BBE21B:6AB92A2A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26316,"blob_sha":"c6fe60a5ef829719a134858e20b5b8673ad65b0f","priority":0},{"path":"docs/netdata-agent/configure-netdata-for-cybersecurity-platforms.md","size":15529,"blob_sha":"3c3b8f29bd53f7f07bd1dd0455736724ebd238de","priority":1},{"path":"docs/netdata-agent/sizing-netdata-agents/disk-requirements-and-retention.md","size":6789,"blob_sha":"aba9e4509a1ae667c3f08611e82bb045740fb755","priority":1},{"path":"docs/netdata-ai/skills/query-snmp-traps/how-tos/recent-security-traps-from-device.md","size":3518,"blob_sha":"966bbbf90f7c1b362e813617c6a39b428d711cb2","priority":1},{"path":"docs/npm/network-flows/retention-querying.md","size":10148,"blob_sha":"3d051cbfa1adaef60a77790d0b0094ad895111d7","priority":1},{"path":"docs/security-and-privacy-design/netdata-agent-security.md","size":13001,"blob_sha":"bd91e7aaf22a26a2e9356c9507c228909e0687c4","priority":1},{"path":"docs/security-and-privacy-design/netdata-cloud-security.md","size":8283,"blob_sha":"f105a2eeb35b014b0bab35646ae80ebb4345af5c","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/didactum_security_gmbh_formerly_didactum_ltd_deutschland_snmp_traps.md","size":5874,"blob_sha":"6cd1b0997939ac7ae14e90a21d4d9efbb2c7f319","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/innominate_security_technologies_ag_snmp_traps.md","size":5930,"blob_sha":"2a4511749e9a3981e0abe645a74272ae7ecaf561","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/securitymatrix_inc_snmp_traps.md","size":5502,"blob_sha":"026f6f9373d05206e72d55e180cf107bf007aea6","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/skyhigh_security_llc_snmp_traps.md","size":5622,"blob_sha":"7041345cf95d887a85389cb4afd114f92b5236e4","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/thales_e_security_snmp_traps.md","size":5841,"blob_sha":"8fae94a3c3ba08fbf7228c3f03b1140726b0b867","priority":1},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/ubiquiti_unifi_security_gateway.md","size":10034,"blob_sha":"d985135cde8e81c44ec3bf1349373bf8c95032e0","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.profiles/default/_fortinet-fortigate-security.yaml","size":8103,"blob_sha":"4033816f51c90bf61de79ecb2d8f30f645bfde4f","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.profiles/default/ubiquiti-unifi-security-gateway.yaml","size":166,"blob_sha":"fc51a28ca6515104336328520c945c89cb1e8622","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/didactum-security-gmbh-formerly-didactum-ltd-deutschland.yaml","size":522,"blob_sha":"d35f2cd28e2ea14609e23e858be6a36edc35be2c","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/innominate-security-technologies-ag.yaml","size":10836,"blob_sha":"127c8d4c2192b5826ec565f41fe03307ac160c1d","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/securitymatrix-inc.yaml","size":1007,"blob_sha":"3f05b001516dff50874e7e82b94664610a69a742","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/skyhigh-security-llc.yaml","size":2269,"blob_sha":"45355abfc66d2d0eb3d6c5df94722e6822d24a11","priority":1},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/thales-e-security.yaml","size":7867,"blob_sha":"ff926fa8000a8fe76befcf156c4983ba59cecf32","priority":1},{"path":"docs/security-and-privacy-design/netdata-kubernetes.md","size":34867,"blob_sha":"4738036f8ad3220f2ca703c938a187d6278eabcc","priority":2},{"path":"docs/security-and-privacy-design/README.md","size":8518,"blob_sha":"473db58379f6dd8b3d10e90c7bc5d44146055240","priority":2}],"documents":[{"path":"README.md","size":26316,"blob_sha":"c6fe60a5ef829719a134858e20b5b8673ad65b0f","priority":0,"status":200,"text":"<p align=\"center\">\n<a href=\"https://www.netdata.cloud#gh-light-mode-only\">\n  <img src=\"https://www.netdata.cloud/img/readme-images/netdata_readme_logo_light.png\" alt=\"Netdata\" width=\"300\"/>\n<\/a>\n<a href=\"https://www.netdata.cloud#gh-dark-mode-only\">\n  <img src=\"https://www.netdata.cloud/img/readme-images/netdata_readme_logo_dark.png\" alt=\"Netdata\" width=\"300\"/>\n<\/a>\n<\/p>\n<h3 align=\"center\">X-Ray Vision for your infrastructure!<\/h3>\n<h4 align=\"center\">Every Metric, Every Second. No BS.<\/h4>\n\n<br />\n<p align=\"center\">\n  <a href=\"https://github.com/netdata/netdata/\"><img src=\"https://img.shields.io/github/stars/netdata/netdata?style=social\" alt=\"GitHub Stars\"><\/a>\n  <br />\n  <a href=\"https://app.netdata.cloud/spaces/netdata-demo?utm_campaign=github_readme_demo_badge\"><img src=\"https://img.shields.io/badge/Live%20Demo-green\" alt=\"Live Demo\"><\/a>\n  <a href=\"https://github.com/netdata/netdata/releases/latest\"><img src=\"https://img.shields.io/github/release/netdata/netdata.svg\" alt=\"Latest release\"><\/a>\n  <a href=\"https://github.com/netdata/netdata-nightlies/releases/latest\"><img src=\"https://img.shields.io/github/release/netdata/netdata-nightlies.svg\" alt=\"Latest nightly build\"><\/a>\n  <br/>\n  <a href=\"https://community.netdata.cloud\"><img alt=\"Discourse topics\" src=\"https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.netdata.cloud%2F&logo=discourse&label=discourse%20forum\"><\/a>\n  <a href=\"https://github.com/netdata/netdata/discussions\"><img alt=\"GitHub Discussions\" src=\"https://img.shields.io/github/discussions/netdata/netdata?logo=github&label=github%20discussions\"><\/a>\n  <br/>\n  <a href=\"https://bestpractices.coreinfrastructure.org/projects/2231\"><img src=\"https://bestpractices.coreinfrastructure.org/projects/2231/badge\" alt=\"CII Best Practices\"><\/a>\n  <a href=\"https://scan.coverity.com/projects/netdata-netdata?tab=overview\"><img alt=\"Coverity Scan\" src=\"https://img.shields.io/coverity/scan/netdata\"><\/a>\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://registry.my-netdata.io/#menu_netdata_submenu_registry\"><img src=\"https://registry.my-netdata.io/api/v3/badge.svg?chart=netdata.registry_entries&dimensions=persons&label=user%20base&units=M&value_color=blue&precision=2&divide=1000000&options=unaligned&tier=1&v44\" alt=\"User base\"><\/a>\n  <a href=\"https://registry.my-netdata.io/#menu_netdata_submenu_registry\"><img src=\"https://registry.my-netdata.io/api/v3/badge.svg?chart=netdata.registry_entries&dimensions=machines&label=servers%20monitored&units=M&divide=1000000&value_color=orange&precision=2&options=unaligned&tier=1&v44\" alt=\"Servers monitored\"><\/a>\n  <a href=\"https://registry.my-netdata.io/#menu_netdata_submenu_registry\"><img src=\"https://registry.my-netdata.io/api/v3/badge.svg?chart=netdata.registry_sessions&label=sessions%20served&units=M&value_color=yellowgreen&precision=2&divide=1000000&options=unaligned&tier=1&v44\" alt=\"Sessions served\"><\/a>\n  <a href=\"https://hub.docker.com/r/netdata/netdata\"><img src=\"https://registry.my-netdata.io/api/v3/badge.svg?chart=dockerhub.pulls_sum&divide=1000000&precision=1&units=M&label=docker+hub+pulls&options=unaligned&tier=1&v44\" alt=\"Docker Hub pulls\"><\/a>\n<\/p>\n<p align=\"center\"><b>Visit our <a href=\"https://www.netdata.cloud\">Home Page<\/a><\/b><\/p>\n\n<hr class=\"solid\">\n\nMENU: **[WHO WE ARE](#who-we-are)** | **[KEY FEATURES](#key-features)** | **[GETTING STARTED](#getting-started)** | **[HOW IT WORKS](#how-it-works)** | **[FAQ](#faq)** | **[DOCS](#book-documentation)** | **[COMMUNITY](#tada-community)** | **[CONTRIBUTE](#pray-contribute)** | **[LICENSE](#scroll-license)**\n\n\n> [!WARNING]\n> People **get addicted to Netdata.**\n> Once you use it on your systems, *there's no going back.*\n\n[![Platforms](https://img.shields.io/badge/Platforms-Linux%20%7C%20macOS%20%7C%20FreeBSD%20%7C%20Windows-blue)]()\n\n---\n\n## WHO WE ARE\n\nNetdata is an open-source, real-time infrastructure monitoring platform. Monitor, detect, and act across your entire infrastructure.\n\n**Core Advantages:**\n\n* **Instant Insights** – With Netdata you can access per-second metrics and visualizations.\n* **Zero Configuration** – You can deploy immediately without complex setup.\n* **ML-Powered** – You can detect anomalies, predict issues, and automate analysis.\n* **Efficient** – You can monitor with minimal resource usage and maximum scalability.\n* **Secure & Distributed** – You can keep your data local with no central collection needed.\n\nWith Netdata, you get real-time, per-second updates. Clear **insights at a glance**, no complexity.\n\n<details>\n  <summary><strong>All heroes have a great origin story. Click to discover ours.<\/strong><\/summary>\n  <br/>\n\nIn 2013, at the company where Costa Tsaousis was COO, a significant percentage of their cloud-based transactions failed silently, severely impacting business performance.\n\nCosta and his team tried every troubleshooting tool available at the time. None could identify the root cause. As Costa later wrote:\n\n“*I couldn’t believe that monitoring systems provide so few metrics and with such low resolution, scale so badly, and cost so much to run.*”\n\nFrustrated, he decided to build his own monitoring tool, starting from scratch.\n\nThat decision led to countless late nights and weekends. It also sparked a fundamental shift in how infrastructure monitoring and troubleshooting are approached, both in method and in cost.\n<\/details>\n\n### Most Energy-Efficient Monitoring Tool\n\n<p align=\"center\">\n<a href=\"https://www.ivanomalavolta.com/files/papers/ICSOC_2023.pdf#gh-dark-mode-only\">\n  <img src=\"https://github.com/netdata/netdata/assets/139226121/7118757a-38fb-48d7-b12a-53e709a8e8c0\" alt=\"Energy Efficiency\" width=\"800\"/>\n<\/a>\n<a href=\"https://www.ivanomalavolta.com/files/papers/ICSOC_2023.pdf#gh-light-mode-only\">\n  <img src=\"https://github.com/netdata/netdata/assets/139226121/4f64cbb6-05e4-48e3-b7c0-d1b79e37e219\" alt=\"Energy efficiency\" width=\"800\"/>\n<\/a>\n<\/p>\n\nAccording to the [University of Amsterdam study](https://www.ivanomalavolta.com/files/papers/ICSOC_2023.pdf), Netdata is the most energy-efficient tool for monitoring Docker-based systems. The study also shows Netdata excels in CPU usage, RAM usage, and execution time compared to other monitoring solutions.\n\n---\n\n## Key Features\n\n| Feature                    | Description                               | What Makes It Unique                                     |\n|----------------------------|-------------------------------------------|----------------------------------------------------------|\n| **Real-Time**              | Per-second data collection and processing | Works in a beat – click and see results instantly        |\n| **Zero-Configuration**     | Automatic detection and discovery         | Auto-discovers everything on the nodes it runs           |\n| **ML-Powered**             | Unsupervised anomaly detection            | Trains multiple ML models per metric at the edge         |\n| **Long-Term Retention**    | High-performance storage                  | ~0.5 bytes per sample with tiered storage for archiving  |\n| **Advanced Visualization** | Rich, interactive dashboards              | Slice and dice data without query language               |\n| **Extreme Scalability**    | Native horizontal scaling                 | Parent-Child centralization with multi-million samples/s |\n| **Complete Visibility**    | From infrastructure to applications       | Simplifies operations and eliminates silos               |\n| **Edge-Based**             | Processing at your premises               | Distributes code instead of centralizing data            |\n\n> [!NOTE]  \n> Want to put Netdata to the test against Prometheus?\n> Explore the [full comparison](https://www.netdata.cloud/blog/netdata-vs-prometheus-2025/).\n\n---\n\n## Netdata Ecosystem\n\nThis three-part architecture enables you to scale from single nodes to complex multi-cloud environments:\n\n| Component         | Description                                                                                                                                                 | License                                         |\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------|\n| **Netdata Agent** | • Core monitoring engine<br>• Handles collection, storage, ML, alerts, exports<br>• Runs on servers, cloud, K8s, IoT<br>• Zero production impact            | [GPL v3+](https://www.gnu.org/licenses/gpl-3.0) |\n| **Netdata Cloud** | • Enterprise features<br>• User management, RBAC, horizontal scaling<br>• Centralized alerts<br>• Free community tier<br>• No metric storage centralization |                                                 |\n| **Netdata UI**    | • Dashboards and visualizations<br>• Free to use<br>• Included in standard packages<br>• Latest version via CDN                                             | [NCUL1](https://app.netdata.cloud/LICENSE.txt)  |\n\n## What You Can Monitor\n\nWith Netdata you can monitor all these components across platforms:\n\n|                                                                                                   Component |              Linux               | FreeBSD | macOS |                      Windows                      |\n|------------------------------------------------------------------------------------------------------------:|:--------------------------------:|:-------:|:-----:|:-------------------------------------------------:|\n|                             **System Resources**<small><br/>CPU, Memory and system shared resources<\/small> |               Full               |   Yes   |  Yes  |                        Yes                        |\n|                                **Storage**<small><br/>Disks, Mount points, Filesystems, RAID arrays<\/small> |               Full               |   Yes   |  Yes  |                        Yes                        |\n|                                 **Network**<small><br/>Network Interfaces, Protocols, Firewall, etc<\/small> |               Full               |   Yes   |  Yes  |                        Yes                        |\n|                        **Hardware & Sensors**<small><br/>Fans, Temperatures, Controllers, GPUs, etc<\/small> |               Full               |  Some   | Some  |                       Some                        |\n|                                       **O/S Services**<small><br/>Resources, Performance and Status<\/small> | Yes<small><br/>`systemd`<\/small> |    -    |   -   |                         -                         |\n|                                      **Processes**<small><br/>Resources, Performance, OOM, and more<\/small> |               Yes                |   Yes   |  Yes  |                        Yes                        |\n|                                                                             System and Application **Logs** | Yes<small><br/>`systemd`-journal |    -    |   -   | Yes<small><br/>`Windows Event Log`, `ETW`<\/small> |\n|                                 **Network Connections**<small><br/>Live TCP and UDP sockets per PID<\/small> |               Yes                |    -    |   -   |                         -                         |\n|                               **Containers**<small><br/>Docker/containerd, LXC/LXD, Kubernetes, etc<\/small> |               Yes                |    -    |   -   |                         -                         |\n|                                 **VMs** (from the host)<small><br/>KVM, qemu, libvirt, Proxmox, etc<\/small> | Yes<small><br/>`cgroups`<\/small> |    -    |   -   |         Yes<small><br/>`Hyper-V`<\/small>          |\n|                       **Synthetic Checks**<small><br/>Test APIs, TCP ports, Ping, Certificates, etc<\/small> |               Yes                |   Yes   |  Yes  |                        Yes                        |\n| **Packaged Applications**<small><br/>nginx, apache, postgres, redis, mongodb,<br/>and hundreds more<\/small> |               Yes                |   Yes   |  Yes  |                        Yes                        |\n|                              **Cloud Provider Infrastructure**<small><br/>AWS, GCP, Azure, and more<\/small> |               Yes                |   Yes   |  Yes  |                        Yes                        |\n|                       **Custom Applications**<small><br/>OpenMetrics, StatsD and soon OpenTelemetry<\/small> |               Yes                |   Yes   |  Yes  |                        Yes                        |\n\nOn Linux, you can continuously monitor all kernel features and hardware sensors for errors, including Intel/AMD/Nvidia GPUs, PCI AER, RAM EDAC, IPMI, S.M.A.R.T, Intel RAPL, NVMe, fans, power supplies, and voltage readings.\n\n---\n\n## Getting Started\n\nYou can install Netdata on all major operating systems. To begin:\n\n### 1. Install Netdata\n\nChoose your platform and follow the installation guide:\n\n* [Linux Installation](https://learn.netdata.cloud/docs/installing/one-line-installer-for-all-linux-systems)\n* [macOS](https://learn.netdata.cloud/docs/installing/macos)\n* [FreeBSD](https://learn.netdata.cloud/docs/installing/freebsd)\n* [Windows](https://learn.netdata.cloud/docs/netdata-agent/installation/windows)\n* [Docker Guide](/packaging/docker/README.md)\n* [Kubernetes Setup](https://learn.netdata.cloud/docs/installation/install-on-specific-environments/kubernetes)\n\n> [!NOTE]\n> You can access the Netdata UI at `http://localhost:19999` (or `http://NODE:19999` if remote).\n\n### 2. Configure Collectors\n\nNetdata auto-discovers most metrics, but you can manually configure some collectors:\n\n* [All collectors](https://learn.netdata.cloud/docs/data-collection/)\n* [SNMP monitoring](https://learn.netdata.cloud/docs/data-collection/monitor-anything/networking/snmp)\n\n### 3. Configure Alerts\n\nYou can use hundreds of built-in alerts and integrate with:\n\n`email`, `Slack`, `Telegram`, `PagerDuty`, `Discord`, `Microsoft Teams`, and more.\n\n> [!NOTE]  \n> Email alerts work by default if there's a configured MTA.\n\n### 4. Configure Parents\n\nYou can centralize dashboards, alerts, and storage with Netdata Parents:\n\n* [Streaming Reference](https://learn.netdata.cloud/docs/streaming/streaming-configuration-reference)\n\n> [!NOTE]  \n> You can use Netdata Parents for central dashboards, longer retention, and alert configuration.\n\n### 5. Connect to Netdata Cloud\n\n[Sign in to Netdata Cloud](https://app.netdata.cloud/sign-in) and connect your nodes for:\n\n* Access from anywhere\n* Horizontal scalability and multi-node dashboards\n* UI configuration for alerts and data collection\n* Role-based access control\n* Free tier available\n\n> [!NOTE]  \n> Netdata Cloud is optional. Your data stays in your infrastructure.\n\n## Live Demo Sites\n\n<p align=\"center\">\n  <b>See Netdata in action<\/b><br/>\n  <a href=\"https://frankfurt.netdata.rocks\"><b>FRANKFURT<\/b><\/a> |\n  <a href=\"https://newyork.netdata.rocks\"><b>NEWYORK<\/b><\/a> |\n  <a href=\"https://atlanta.netdata.rocks\"><b>ATLANTA<\/b><\/a> |\n  <a href=\"https://sanfrancisco.netdata.rocks\"><b>SANFRANCISCO<\/b><\/a> |\n  <a href=\"https://toronto.netdata.rocks\"><b>TORONTO<\/b><\/a> |\n  <a href=\"https://singapore.netdata.rocks\"><b>SINGAPORE<\/b><\/a> |\n  <a href=\"https://bangalore.netdata.rocks\"><b>BANGALORE<\/b><\/a>\n  <br/>\n  <i>These demo clusters run with default configuration and show real monitoring data.<\/i>\n  <br/>\n  <i>Choose the instance closest to you for the best performance.<\/i>\n<\/p>\n\n---\n\n## How It Works\n\nWith Netdata you can run a modular pipeline for metrics collection, processing, and visualization.\n\n```mermaid\nflowchart TB\n  A[Netdata Agent]:::mainNode\n  A1(Collect):::green --> A\n  A2(Store):::green --> A\n  A3(Learn):::green --> A\n  A4(Detect):::green --> A\n  A5(Check):::green --> A\n  A6(Stream):::green --> A\n  A7(Archive):::green --> A\n  A8(Query):::green --> A\n  A9(Score):::green --> A\n\n  classDef green fill:#bbf3bb,stroke:#333,stroke-width:1px,color:#000\n  classDef mainNode fill:#f0f0f0,stroke:#333,stroke-width:1px,color:#333\n```\n\nWith each Agent you can:\n\n1. **Collect** – Gather metrics from systems, containers, apps, logs, APIs, and synthetic checks.\n2. **Store** – Save metrics to a high-efficiency, tiered time-series database.\n3. **Learn** – Train ML models per metric using recent behavior.\n4. **Detect** – Identify anomalies using trained ML models.\n5. **Check** – Evaluate metrics against pre-set or custom alert rules.\n6. **Stream** – Send metrics to Netdata Parents in real time.\n7. **Archive** – Export metrics to Prometheus, InfluxDB, OpenTSDB, Graphite, and others.\n8. **Query** – Access metrics via an API for dashboards or third-party tools.\n9. **Score** – Use a scoring engine to find patterns and correlations across metrics.\n\n> [!NOTE]  \n> Learn more: [Netdata's architecture](https://learn.netdata.cloud/docs/netdata-agent/#distributed-observability-pipeline)\n\n## Agent Capabilities\n\nWith the Netdata Agent, you can use these core capabilities out-of-the-box:\n\n| Capability                   | Description                                                                                                                                   |\n|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| **Comprehensive Collection** | • 800+ integrations<br>• Systems, containers, VMs, hardware sensors<br>• OpenMetrics, StatsD, and logs<br>• OpenTelemetry support coming soon |\n| **Performance & Precision**  | • Per-second collection<br>• Real-time visualization with 1-second latency<br>• High-resolution metrics                                       |\n| **Edge-Based ML**            | • ML models trained at the edge<br>• Automatic anomaly detection per metric<br>• Pattern recognition based on historical behavior             |\n| **Advanced Log Management**  | • Direct systemd-journald and Windows Event Log integration<br>• Process logs at the edge<br>• Rich log visualization                         |\n| **Observability Pipeline**   | • Parent-Child relationships<br>• Flexible centralization<br>• Multi-level replication and retention                                          |\n| **Automated Visualization**  | • NIDL data model<br>• Auto-generated dashboards<br>• No query language needed                                                                |\n| **Smart Alerting**           | • Pre-configured alerts<br>• Multiple notification methods<br>• Proactive detection                                                           |\n| **Low Maintenance**          | • Auto-detection<br>• Zero-touch ML<br>• Easy scalability<br>• CI/CD friendly                                                                 |\n| **Open & Extensible**        | • Modular architecture<br>• Easy to customize<br>• Integrates with existing tools                                                             |\n\n---\n\n## CNCF Membership\n\n<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cncf/artwork/master/other/cncf/horizontal/white/cncf-white.svg\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/cncf/artwork/master/other/cncf/horizontal/color/cncf-color.svg\">\n    <img alt=\"CNCF Logo\" src=\"https://raw.githubusercontent.com/cncf/artwork/master/other/cncf/horizontal/color/cncf-color.svg\" width=\"300\">\n  <\/picture>\n  <br />\n  Netdata actively supports and is a member of the Cloud Native Computing Foundation (CNCF).<br />\n  It is one of the most starred projects in the <a href=\"https://landscape.cncf.io/?item=observability-and-analysis--observability--netdata\">CNCF landscape<\/a>.\n<\/p>\n\n---\n\n## FAQ\n\n<details>\n<summary><strong>Is Netdata secure?<\/strong><\/summary>\n<br/>\n\nYes. Netdata follows [OpenSSF best practices](https://bestpractices.coreinfrastructure.org/en/projects/2231), has a security-first design, and is regularly audited by the community.\n\n* [Security design](https://learn.netdata.cloud/docs/security-and-privacy-design)\n* [Security policies and advisories](https://github.com/netdata/netdata/security)\n\n<\/details>\n\n<details>\n<summary><strong>Does Netdata use a lot of resources?<\/strong><\/summary>\n<br/>\n\nNo. Even with ML and per-second metrics, Netdata uses minimal resources.\n\n* \\~5% CPU and 150MiB RAM by default on production systems\n* <1% CPU and \\~100MiB RAM when ML and alerts are disabled and using ephemeral storage\n* Parents scale to millions of metrics per second with appropriate hardware\n\n> You can use the **Netdata Monitoring** section in the dashboard to inspect its resource usage.\n\n<\/details>\n\n<details>\n<summary><strong>How much data retention is possible?<\/strong><\/summary>\n<br/>\n\nAs much as your disk allows.\n\nWith Netdata you can use tiered retention:\n\n* Tier 0: per-second resolution\n* Tier 1: per-minute resolution\n* Tier 2: per-hour resolution\n\nThese are queried automatically based on the zoom level.\n<\/details>\n\n<details>\n<summary><strong>Can Netdata scale to many servers?<\/strong><\/summary>\n<br/>\n\nYes. With Netdata you can:\n\n* Scale horizontally with many Agents\n* Scale vertically with powerful Parents\n* Scale infinitely via Netdata Cloud\n\n> You can use Netdata Cloud to merge many independent infrastructures into one logical view.\n\n<\/details>\n\n<details>\n<summary><strong>Is disk I/O a concern?<\/strong><\/summary>\n<br/>\n\nNo. Netdata minimizes disk usage:\n\n* Metrics are flushed to disk every 17 minutes, spread out evenly\n* Uses direct I/O and compression (ZSTD)\n* Can run entirely in RAM or stream to a Parent\n\n> You can use `alloc` or `ram` mode for no disk writes.\n\n<\/details>\n\n<details>\n<summary><strong>How is Netdata different from Prometheus + Grafana?<\/strong><\/summary>\n<br/>\n\nWith Netdata you get a complete monitoring solution—not just tools.\n\n* No manual setup or dashboards needed\n* Built-in ML, alerts, dashboards, and correlations\n* More efficient and easier to deploy\n\n> [Performance comparison](https://blog.netdata.cloud/netdata-vs-prometheus-performance-analysis/)\n\n<\/details>\n\n<details>\n<summary><strong>How is Netdata different from commercial SaaS tools?<\/strong><\/summary>\n<br/>\n\nWith Netdata you can store all metrics on your infrastructure—no sampling, no aggregation, no loss.\n\n* High-resolution metrics by default\n* ML per metric, not shared models\n* Unlimited scalability without skyrocketing cost\n\n<\/details>\n\n<details>\n<summary><strong>Can Netdata run alongside Nagios, Zabbix, etc.?<\/strong><\/summary>\n<br/>\n\nYes. You can use Netdata together with traditional tools.\n\nWith Netdata you get:\n\n* Real-time, high-resolution monitoring\n* Zero configuration and auto-generated dashboards\n* Anomaly detection and advanced visualization\n\n<\/details>\n\n<details>\n<summary><strong>What if I feel overwhelmed?<\/strong><\/summary>\n<br/>\n\nYou can start small:\n\n* Use the dashboard's table of contents and search\n* Explore anomaly scoring (\"AR\" toggle)\n* Create custom dashboards in Netdata Cloud\n\n> [Docs and guides](https://learn.netdata.cloud/guides)\n\n<\/details>\n\n<details>\n<summary><strong>Do I have to use Netdata Cloud?<\/strong><\/summary>\n<br/>\n\nNo. Netdata Cloud is optional.\n\nNetdata works without it, but with Cloud you can:\n\n* Access remotely with SSO\n* Save dashboard customizations\n* Configure alerts centrally\n* Collaborate with role-based access\n\n<\/details>\n\n<details>\n<summary><strong>What telemetry does Netdata collect?<\/strong><\/summary>\n<br/>\n\nAnonymous telemetry helps improve the product. You can disable it:\n\n* Add `--disable-telemetry` to the installer, or\n* Create `/etc/netdata/.opt-out-from-anonymous-statistics` and restart Netdata\n\n> Telemetry helps us understand usage, not track users. No private data is collected.\n\n<\/details>\n\n<details>\n<summary><strong>Who uses Netdata?<\/strong><\/summary>\n<br/>\n\nYou'll join users including:\n\n* Major companies (Amazon, ABN AMRO Bank, Facebook, Google, IBM, Intel, Netflix, Samsung)\n* Universities (NYU, Columbia, Seoul National, UCL)\n* Government organizations worldwide\n* Infrastructure-intensive organizations\n* Technology operators\n* Startups and freelancers\n* SysAdmins and DevOps professionals\n\n<\/details>\n\n---\n\n## \\:book: Documentation\n\nVisit [Netdata Learn](https://learn.netdata.cloud) for full documentation and guides.\n\n> [!NOTE]  \n> Includes deployment, configuration, alerting, exporting, troubleshooting, and more.\n\n---\n\n## \\:tada: Community\n\nJoin the Netdata community:\n\n* [Discord](https://discord.com/invite/2mEmfW735j)\n* [Forum](https://community.netdata.cloud)\n* [GitHub Discussions](https://github.com/netdata/netdata/discussions)\n\n> [!NOTE]  \n> [Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md)\n\nFollow us on:\n[Twitter](https://twitter.com/netdatahq) | [Reddit](https://www.reddit.com/r/netdata/) | [YouTube](https://www.youtube.com/c/Netdata) | [LinkedIn](https://www.linkedin.com/company/netdata-cloud/)\n\n---\n\n## \\:pray: Contribute\n\nWe welcome your contributions.\n\nWays you help us stay sharp:\n\n* Share best practices and monitoring insights\n* Report issues or missing features\n* Improve documentation\n* Develop new integrations or collectors\n* Help users in forums and chats\n\n> [!NOTE]  \n> [Contribution guide](https://github.com/netdata/.github/blob/main/CONTRIBUTING.md)\n\n---\n\n## \\:scroll: License\n\nThe Netdata ecosystem includes:\n\n* **Netdata Agent** – Open-source core (GPLv3+). **Includes** data collection, storage, ML, alerting, APIs and **redistributes** several other open-source tools and libraries.\n    * [Netdata Agent License](https://github.com/netdata/netdata/blob/master/LICENSE)\n    * [Netdata Agent Redistributed](https://github.com/netdata/netdata/blob/master/REDISTRIBUTED.md)\n* **Netdata UI** – Closed-source but free to use with Netdata Agent and Cloud. Delivered via CDN. It integrates third-party open-source components.\n    * [Netdata Cloud UI License](https://app.netdata.cloud/LICENSE.txt)\n    * [Netdata UI third-party licenses](https://app.netdata.cloud/3D_PARTY_LICENSES.txt)\n* **Netdata Cloud** – Closed-source, with free and paid tiers. Adds remote access, SSO, scalability.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2648:3BB77:179C0A:5DC50D:6AB92A2B"},"text_sha256":"e78af62f9af72ef9a0fa0cf46a8b0252af185b5a7d94aeaf40325a8b213cd4c8"},{"path":"docs/netdata-agent/configure-netdata-for-cybersecurity-platforms.md","size":15529,"blob_sha":"3c3b8f29bd53f7f07bd1dd0455736724ebd238de","priority":1,"status":200,"text":"# Configure Netdata for cybersecurity platforms\n\nThis guide is intended to help you place Netdata behind enterprise security controls such as reverse proxies, firewalls, VPN gateways, or secure-access platforms. The UI differs by product, but the Netdata-side configuration and network design remain the same.\n\n## Choose how users should access Netdata\n\nBefore you configure your security platform, choose the Netdata access model that fits your environment:\n\n| Access model                                        | Best for                                                                           | Netdata configuration                                                      |\n|-----------------------------------------------------|------------------------------------------------------------------------------------|----------------------------------------------------------------------------|\n| Cloud-only access                                   | Environments that do not allow inbound access to the Agent                         | Disable the local dashboard with `mode = none`                             |\n| Access through a security platform or reverse proxy | Environments that publish Netdata through HTTPS, SSO, VPN, or application gateways | Keep Netdata on a private interface and allow only the gateway path        |\n| Access on a private management network              | Environments with a dedicated admin network                                        | Bind Netdata only to the management interface and restrict allowed clients |\n\nIf you are not sure which model to use, start with the smallest exposed surface:\n\n1. Use **Cloud-only access** to give users dashboard access through Netdata Cloud without exposing the Agent directly.\n2. Use **access through a security platform** if you must publish the local dashboard to users.\n3. Use **private management network access** only when you already have a trusted admin network.\n\n## Required endpoints and ports\n\nFor firewall and proxy allowlisting, your Netdata Agents need the following network access:\n\n| Direction | Port      | Protocol  | Purpose                                                             |\n|-----------|-----------|-----------|---------------------------------------------------------------------|\n| Inbound   | 19999/TCP | TCP       | Local dashboard access and streaming from Child Agents              |\n| Outbound  | 19999/TCP | TCP       | Streaming to a Parent Agent (Child Agents only)                     |\n| Outbound  | 443/TCP   | WSS/HTTPS | Agent-Cloud Link (ACLK), anonymous telemetry, and automatic updates |\n\n:::note\n\nPort `19999` is the default, configurable via `[web] port` in `netdata.conf`, and is multiplexed: the same port handles both dashboard HTTP requests and the Netdata streaming protocol (a custom binary protocol over TCP). The server auto-detects which protocol the client is using based on the initial handshake. From a firewall perspective, both are simply TCP on port `19999`.\n\nYou can disable inbound access on port `19999` by setting `mode = none` in `netdata.conf` when using Cloud-only access. This also disables inbound streaming. See [Configure Cloud-only access](#configure-cloud-only-access) for details.\n\n:::\n\n### Outbound domain allowlist\n\nAllow the following domains through your firewall or proxy. All outbound connections use port `443`.\n\n| Domain                                             | Purpose                                    | Active by default                                  | How to disable                                                                                                                |\n|----------------------------------------------------|--------------------------------------------|----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| `app.netdata.cloud`                                | Netdata Cloud application (ACLK)           | **Off** — only when a node is connected to a Space | Do not connect the Agent to Netdata Cloud                                                                                     |\n| `api.netdata.cloud`                                | Netdata Cloud API (ACLK)                   | **Off** — only when a node is connected to a Space | Do not connect the Agent to Netdata Cloud                                                                                     |\n| `mqtt.netdata.cloud`                               | Agent-Cloud Link MQTT broker               | **Off** — only when a node is connected to a Space | Do not connect the Agent to Netdata Cloud                                                                                     |\n| `us-east1-netdata-analytics-bi.cloudfunctions.net` | Anonymous telemetry (Agent daemon)         | **On**                                             | `--disable-telemetry` flag or [opt-out file](/docs/netdata-agent/configuration/anonymous-telemetry-events.md#opt-out-methods) |\n| `repository.netdata.cloud`                         | Package downloads and automatic updates    | **On** for online installs                         | `--no-updates` at install, or disable `netdata-updater.sh`                                                                    |\n| `get.netdata.cloud`                                | Installer script (`kickstart.sh`) download | **Install time only**                              | Pre-download the script for an offline install                                                                                |\n\n:::note\n\nWhen users open the local Agent dashboard (`http://NODE:19999`), the dashboard JavaScript sends anonymous page-view events to PostHog cloud. This traffic is **browser-initiated** — it is governed by browser-level proxy and content-filtering policies, not by host firewall rules. Use the same opt-out controls to disable it. See [Anonymous telemetry events](/docs/netdata-agent/configuration/anonymous-telemetry-events.md#opt-out-methods).\n\n:::\n\n:::important\n\nPrefer **domain-based allowlisting** over IP-based rules. IP addresses can change without notice and vary based on your geographic location due to CDN-edge servers.\n\n:::\n\nFor the complete behavioral reference — including triggers, default states, and step-by-step disable instructions for each path — see [Outbound Network Communication](/docs/security-and-privacy-design/netdata-agent-security.md#outbound-network-communication).\n\nFor broader firewall design principles and recommended network architecture, see [Network rules your cybersecurity platform should enforce](#network-rules-your-cybersecurity-platform-should-enforce) below.\n\n## Configure Cloud-only access\n\nUse this pattern when your security platform mainly controls outbound traffic and users access dashboards via Netdata Cloud instead of connecting directly to port `19999`.\n\n### Prerequisites\n\n- Your Agent is [claimed to Netdata Cloud](/src/claim/README.md)\n- Your environment allows the Agent to maintain its secure outbound Cloud connection\n\n1. Edit `netdata.conf` with the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-configuration-files) script.\n\n2. Disable the local dashboard:\n\n   ```ini\n   [web]\n       mode = none\n   ```\n\n3. Restart the Agent. For platform-specific steps, see [Edit Configuration Files](/docs/netdata-agent/configuration/README.md#edit-configuration-files).\n\n4. Verify that dashboards remain available from Netdata Cloud.\n\nFor step-by-step operational details, see:\n\n- [Edit Configuration Files](/docs/netdata-agent/configuration/README.md#edit-configuration-files)\n- [Secure Your Netdata Agent with Bearer Token Protection](/docs/netdata-agent/configuration/secure-your-netdata-agent-with-bearer-token.md)\n\nThe Agent web server stops accepting inbound requests. This reduces exposure, but it also disables inbound streaming. Do not use this setting on Parent Agents that receive data from Child Agents.\n\n## Configure access through a cybersecurity platform\n\nUse this pattern when a platform such as Sophos, an authenticating reverse proxy, or a secure-access gateway publishes Netdata to users over HTTPS.\n\n### Prerequisites\n\n- A private IP address or loopback interface that the Netdata Agent can bind to\n- A gateway, reverse proxy, firewall portal, or secure-access platform that can reach the Agent on that private address\n- A decision on authentication:\n  - Use the external platform for authentication, or\n  - Use Netdata bearer token protection with Netdata Cloud identities\n\n1. Bind Netdata to a private interface instead of exposing it on every address:\n\n   ```ini\n   [web]\n       bind to = 10.0.0.15:19999 localhost:19999\n   ```\n\n   Replace `10.0.0.15` with the private interface your security platform can reach.\n\n2. If you want direct Netdata authorization through Netdata Cloud, enable bearer token protection:\n\n   ```ini\n   [web]\n       bind to = 10.0.0.15:19999 localhost:19999\n       bearer token protection = yes\n   ```\n\n   This keeps the dashboard available only on the private interface while requiring Cloud authentication for data access.\n\n3. Restart the Agent. For platform-specific steps, see [Edit Configuration Files](/docs/netdata-agent/configuration/README.md#edit-configuration-files).\n\n4. Publish the Agent through your security platform using the private Netdata address as the upstream target.\n\n   Use an internal upstream such as:\n\n   ```text\n   http://10.0.0.15:19999\n   ```\n\n   The platform should terminate HTTPS, apply your organization's authentication and policy controls, and forward requests only to this private Netdata endpoint.\n\n5. Restrict network access so only the security platform path can reach Netdata on port `19999`.\n\n   In practice, this usually means:\n\n   - No direct public inbound access to `19999`\n   - Only the reverse proxy, VPN users, or management network can reach the private Netdata address\n   - Firewall rules block all other sources\n\nFor implementation details and hardening examples, see:\n\n- [Running Netdata Behind a Reverse Proxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/README.md)\n- [Secure Your Netdata Agent with Bearer Token Protection](/docs/netdata-agent/configuration/secure-your-netdata-agent-with-bearer-token.md)\n\n### Authentication choices for published access\n\nIf the external platform already authenticates users, you can rely on it and keep Netdata on a private address. If you want Netdata Cloud roles and permissions to apply when users open the Agent directly through the published URL, enable [bearer token protection](/docs/netdata-agent/configuration/secure-your-netdata-agent-with-bearer-token.md).\n\nUse bearer token protection when:\n\n- You want Netdata Cloud SSO and role-based permissions\n- You do not want to manage per-proxy password files\n- Your Agent is claimed and connected to Netdata Cloud\n\nUse external-platform authentication only when:\n\n- The platform must remain the primary identity provider for the published application\n- You need an access path that does not depend on Netdata Cloud authentication\n\n## Configure private management network access\n\nUse this pattern when administrators already use a private LAN, VPN, or bastion network and you do not want to publish Netdata through a broader application gateway.\n\n1. Bind Netdata to the management interface:\n\n   ```ini\n   [web]\n       bind to = 10.1.1.1:19999 localhost:19999\n   ```\n\n2. Restrict who can connect:\n\n   ```ini\n   [web]\n       bind to = 10.1.1.1:19999 localhost:19999\n       allow connections from = localhost 10.*\n   ```\n\n3. Restart the Agent. For platform-specific steps, see [Edit Configuration Files](/docs/netdata-agent/configuration/README.md#edit-configuration-files).\n\n4. Verify that the dashboard is reachable only from the management network.\n\nFor detailed operational steps, see:\n\n- [Edit Configuration Files](/docs/netdata-agent/configuration/README.md#edit-configuration-files)\n- [Securing Netdata Agents](/docs/netdata-agent/securing-netdata-agents.md)\n\n## Network rules your cybersecurity platform should enforce\n\nNo matter which product you use, your platform design should follow these rules:\n\n- Do not expose `19999` directly to the public internet\n- Prefer HTTPS on the published entry point\n- Allow inbound access only through your approved gateway, VPN, proxy, or management network\n- Allow outbound Agent connectivity to Netdata Cloud if you use claiming, Cloud dashboards, or bearer token protection\n- Keep Netdata on private IPs whenever possible\n\nIf you deploy Netdata Parents, apply the same principle to the Parent dashboard. Child Agents should stream to Parents over trusted paths instead of being individually exposed.\n\n### Example architecture for platforms such as Sophos\n\nPlatforms such as Sophos are typically used to enforce one or more of these controls:\n\n- Reverse-proxy publishing\n- Web access policies\n- VPN-based access\n- Firewall-based source restrictions\n\nThe exact product workflow differs, but the architecture usually looks like this:\n\n1. Users authenticate to the organization's approved security platform.\n2. The platform forwards approved requests to a private Netdata address such as `http://10.0.0.15:19999`.\n3. Netdata accepts traffic only from that controlled path.\n4. Netdata Cloud remains the preferred dashboard path when direct local access is not required.\n\nThis approach keeps Netdata aligned with enterprise security controls without requiring public exposure of the Agent.\n\n## Sophos Central example for Windows exclusions\n\n:::note\n\nThis is a **vendor-specific example**. Use it as a pattern and adapt it to your platform's equivalent exclusion workflow and policy controls.\n\n:::\n\nIf you run the Netdata Agent on Windows and Sophos Central blocks or interferes with the Netdata executable, add a global exclusion for the Netdata binary.\n\nIn our testing, Sophos did not flag the Netdata binary as malicious. Sophos may still block Netdata because the Agent monitors network traffic and CPU activity on the host, which can trigger behavior-based protections.\n\n:::note\n\nSophos Central labels and layout may change over time. The steps below reflect the current workflow.\n\n:::\n\n1. Open **Global Settings** in Sophos Central:\n\n   ```text\n   https://central.sophos.com/manage/overview/settings-list\n   ```\n\n2. Open **Global Exclusions**.\n\n3. Select **Add exclusions**.\n\n4. In the new window, add an exclusion for:\n\n   - **Exploit Mitigation Activity Monitoring (Windows)**\n\n5. When Sophos asks for the path, enter:\n\n   ```text\n   C:\\Program Files\\Netdata\\usr\\bin\\netdata.exe\n   ```\n\n6. Clear **Protect Application**.\n\n7. Select **Save**.\n\nThis exclusion applies to the Windows Netdata executable path shown above.\n\nMap this exclusion into your broader access model and network controls in [Network rules your cybersecurity platform should enforce](#network-rules-your-cybersecurity-platform-should-enforce).\n\n## What's next?\n\n- Review [Securing Netdata Agents](/docs/netdata-agent/securing-netdata-agents.md) for the broader list of supported hardening options\n- Use [Secure Your Netdata Agent with Bearer Token Protection](/docs/netdata-agent/configuration/secure-your-netdata-agent-with-bearer-token.md) if you want Netdata Cloud SSO on published Agent URLs\n- Use [Running the Agent behind a reverse proxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/README.md) for web-server-specific proxy examples\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5A2E:3AC5A:17E060:5E07DD:6AB92A2C"},"text_sha256":"f614aba43d1a9c939e2b8875a3fafb082c015488d5453cc40bbb609bb86fd686"},{"path":"docs/netdata-agent/sizing-netdata-agents/disk-requirements-and-retention.md","size":6789,"blob_sha":"aba9e4509a1ae667c3f08611e82bb045740fb755","priority":1,"status":200,"text":"# Disk Requirements &amp; Retention\n\n## Database Modes and Tiers\n\nNetdata offers two database modes to suit your needs for performance and data persistence:\n\n|        Mode        | Description                                                                                                                                                                                                                            |\n|:------------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| dbengine (default) | High-performance, multi-tier storage with compression. Metric samples are cached in memory and then written to disk in multiple tiers for efficient retrieval and long-term storage.                                                   |\n|        ram         | In-memory storage. Metric samples are stored in memory only, and older data is overwritten as new data arrives. This mode prioritizes speed, making it ideal for Netdata Child instances that stream data to a central Netdata parent. |\n\n## `dbengine`\n\nNetdata's `dbengine` mode efficiently stores data on disk using compression. The actual disk space used depends on how well the data compresses.\nThis mode uses a tiered storage approach: data is saved in multiple tiers on disk. Each tier retains data at a different resolution (detail level). Higher tiers store a down-sampled (less detailed) version of the data found in lower tiers.\n\n```mermaid\ngantt\n    dateFormat  YYYY-MM-DD\n    tickInterval 1week\n    axisFormat    \n    todayMarker off\n    tier0, 14d       :a1, 2023-12-24, 7d\n    tier1, 60d       :a2, 2023-12-01, 30d\n    tier2, 365d      :a3, 2023-11-02, 59d\n```\n\n`dbengine` supports up to five tiers. By default, three tiers are used:\n\n|  Tier   |                                          Resolution                                          | Uncompressed Sample Size | Usually On Disk |\n|:-------:|:--------------------------------------------------------------------------------------------:|:------------------------:|:---------------:|\n| `tier0` |            native resolution (metrics collected per-second as stored per-second)             |         4 bytes          |    0.6 bytes    |\n| `tier1` | 60 iterations of `tier0`, so when metrics are collected per-second, this tier is per-minute. |         16 bytes         |     6 bytes     |\n| `tier2` |  60 iterations of `tier1`, so when metrics are collected per second, this tier is per-hour.  |         16 bytes         |    18 bytes     |\n\n### Default Disk Footprint\n\nNetdata Agent metrics storage is limited to 3 GiB by default (configurable), using 1 GiB per tier × 3 tiers. In total, with SQLite databases, alert transitions, and other metadata, expect about 4 GiB of disk usage under normal conditions. The default retention limits are:\n\n|  Tier   | Resolution | Size Limit | Time Limit |\n|:-------:|:----------:|:----------:|:----------:|\n| `tier0` | per-second |   1 GiB    |  14 days   |\n| `tier1` | per-minute |   1 GiB    |  3 months  |\n| `tier2` |  per-hour  |   1 GiB    |  2 years   |\n\nData is deleted when retention enforcement detects that **either** the size limit or the time limit has been reached, whichever comes first. Actual disk usage may temporarily exceed the configured size limit because retention size is a soft target, not a hard cap. For the detailed enforcement behavior, see [Retention Size Enforcement](/src/database/README.md#retention-size-enforcement).\n\nIn practice, with default settings and an ingestion rate of about 4,000 metrics per second, Netdata provides about 14 days of high resolution (per-second) data, 3 months of medium resolution (per-minute) data, and more than 1 year of low resolution (per-hour) data.\n\nThese limits are fully configurable. See [Changing how long Netdata stores metrics](/src/database/CONFIGURATION.md#tiers).\n\n### Parent Retention Sizing\n\nOn Netdata Parents, retention size is enforced per tier for all metrics stored by that Parent, not per Child. All streaming Children share the Parent's tier quota, so there is no per-Child disk space limit.\n\nWhen sizing a Parent, account for the total metric count across all Children and leave room for dbengine datafiles plus journal/index overhead (`.ndf`, `.njf`, and `.njfv2` files). Parent nodes with many Children can have higher aggregate metric cardinality, which can increase journal/index overhead compared to a standalone Agent.\n\nFor details about how dbengine enforces retention size limits, see [Retention Size Enforcement](/src/database/README.md#retention-size-enforcement).\n\nChild and Parent storage are independent:\n\n- **On the Child (local):** Controlled by the Child's `[db].mode`.\n- **On the Parent (received stream):** Controlled by the Parent's settings. Metrics streamed from Children can be persisted on the Parent and count against the Parent's per-tier retention limits.\n\n**Configuring dbengine mode and retention**:\n\n- Enable dbengine mode: The dbengine mode is already the default, so no configuration change is necessary. For reference, the dbengine mode can be configured by setting `[db].mode` to `dbengine` in `netdata.conf`.\n- Adjust retention (optional): see [Change how long Netdata stores metrics](/src/database/CONFIGURATION.md#tiers).\n\n## `ram`\n\n`ram` mode can help when Netdata shouldn’t introduce any disk I/O at all. In both of these modes, metric samples exist only in memory, and only while they’re collected.\n\nWhen Netdata is configured to stream its metrics to a Metrics Observability Centralization Point (a Netdata Parent), metric samples are forwarded in real-time to that Netdata Parent. The ring buffers available in these modes are used to cache the collected samples for some time, in case there are network issues, or the Netdata Parent is restarted for maintenance.\n\nThe memory required per sample in these modes, is four bytes: `ram` mode uses `mmap()` behind the scene, and can be incremented in steps of 1024 samples (4KiB). Mode `ram` allows the use of the Linux kernel memory dedupper (Kernel-Same-Page or KSM) to deduplicate Netdata ring buffers and save memory.\n\n**Configuring ram mode and retention**:\n\n- Enable ram mode: To use in-memory storage, set `[db].mode` to ram in your `netdata.conf` file. Remember, this mode won't retain historical data after restarts.\n- Adjust retention (optional): While ram mode focuses on real-time data, you can optionally control the number of samples stored in memory. Set `[db].retention` in `netdata.conf` to the desired number in seconds. Note: If the value you choose isn't a multiple of 1024, Netdata will automatically round it up to the nearest multiple.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"10D6:18CDF1:177A50:55EE57:6AB92A2B"},"text_sha256":"23db25591fa281b8b3d53b3c058deb38497fd4a2c411b583006f412302f92e6a"},{"path":"docs/netdata-ai/skills/query-snmp-traps/how-tos/recent-security-traps-from-device.md","size":3518,"blob_sha":"966bbbf90f7c1b362e813617c6a39b428d711cb2","priority":1,"status":200,"text":"# Recent security traps from one device\n\n## Question\n\nWhich security-category SNMP traps did one device send recently?\n\n## Inputs\n\n- `NODE_UUID`: node running the `snmp_traps` collector.\n- `SNMP_TRAPS_JOB`: trap listener job name. Default examples use `local`.\n- One of:\n  - `DEVICE_IP`: the expected `TRAP_SOURCE_IP`.\n  - `DEVICE_HOSTNAME`: the expected `_HOSTNAME`.\n- Time window, defaulting to the last 24 hours.\n\n## Steps\n\n1. Load the token-safe wrappers:\n\n   ```bash\n   source \"$(git rev-parse --show-toplevel)/docs/netdata-ai/skills/query-netdata-agents/scripts/_lib.sh\"\n   agents_load_env\n   ```\n\n2. Query by source IP:\n\n   ```bash\n   NODE_UUID=\"YOUR_NODE_UUID\"\n   SNMP_TRAPS_JOB=\"local\"\n   SNMP_TRAPS_FUNCTION=\"snmp:traps\"\n   DEVICE_IP=\"[DEVICE_IP]\"\n\n   BODY=\"$(jq -n --arg job \"$SNMP_TRAPS_JOB\" --arg device_ip \"$DEVICE_IP\" '{\n     after: -86400,\n     before: 0,\n     last: 200,\n     direction: \"backward\",\n     selections: {\n       __logs_sources: [$job],\n       TRAP_REPORT_TYPE: [\"trap\"],\n       TRAP_CATEGORY: [\"security\"],\n       TRAP_SOURCE_IP: [$device_ip]\n     },\n     facets: [\"TRAP_NAME\", \"TRAP_SEVERITY\", \"TRAP_SOURCE_IP\", \"_HOSTNAME\"]\n   }')\"\n\n   mkdir -p .local/audits/query-snmp-traps\n\n   agents_call_function \\\n     --via cloud \\\n     --node \"$NODE_UUID\" \\\n     --function \"$SNMP_TRAPS_FUNCTION\" \\\n     --body \"$BODY\" \\\n     > .local/audits/query-snmp-traps/security-traps-device.json\n   ```\n\n3. If the trap source is known by hostname instead of IP, replace the\n   `TRAP_SOURCE_IP` selection with `_HOSTNAME`:\n\n   ```bash\n   NODE_UUID=\"YOUR_NODE_UUID\"\n   SNMP_TRAPS_JOB=\"local\"\n   SNMP_TRAPS_FUNCTION=\"snmp:traps\"\n   DEVICE_HOSTNAME=\"[DEVICE_HOSTNAME]\"\n\n   BODY=\"$(jq -n --arg job \"$SNMP_TRAPS_JOB\" --arg hostname \"$DEVICE_HOSTNAME\" '{\n     after: -86400,\n     before: 0,\n     last: 200,\n     direction: \"backward\",\n     selections: {\n       __logs_sources: [$job],\n       TRAP_REPORT_TYPE: [\"trap\"],\n       TRAP_CATEGORY: [\"security\"],\n       _HOSTNAME: [$hostname]\n     },\n     facets: [\"TRAP_NAME\", \"TRAP_SEVERITY\", \"TRAP_SOURCE_IP\", \"_HOSTNAME\"]\n   }')\"\n\n   agents_call_function \\\n     --via cloud \\\n     --node \"$NODE_UUID\" \\\n     --function \"$SNMP_TRAPS_FUNCTION\" \\\n     --body \"$BODY\" \\\n     > .local/audits/query-snmp-traps/security-traps-device.json\n   ```\n\n4. Print a sanitized summary:\n\n   ```bash\n   jq '.columns as $c\n       | .data[]? as $row\n       | $c | to_entries | sort_by(.value.index)\n       | map({(.key): $row[.value.index]}) | add\n       | {\n           host: (._HOSTNAME // \"\"),\n           source_ip_present: ((.TRAP_SOURCE_IP // \"\") | length > 0),\n           severity: (.TRAP_SEVERITY // \"\"),\n           trap: (.TRAP_NAME // .TRAP_OID // \"\"),\n           message: (.MESSAGE // \"\")\n         }' \\\n     .local/audits/query-snmp-traps/security-traps-device.json\n   ```\n\n## Output\n\nReturn counts and sanitized rows: trap name/OID, severity, hostname\nor source-present flag, and message. Do not paste public IPs, MACs,\nusernames, or full varbind payloads into durable artifacts.\n\n## Notes / gotchas\n\n- Prefer `TRAP_SOURCE_IP` when devices do not have stable hostname\n  identity.\n- Prefer `_HOSTNAME` when the SNMP collector/topology identity is\n  already resolving the device name.\n- Keep the time window short first; widen it only after confirming\n  the query shape works.\n\n## Source guides\n\n- [query-snmp-traps](../SKILL.md)\n- [Cloud log Function guide](../../query-netdata-cloud/query-logs.md)\n- [Direct-agent log Function guide](../../query-netdata-agents/query-logs.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47B6:3B6DE:175799:5D7EB1:6AB92A2B"},"text_sha256":"b1ac652806932cf9eef3475fefbcd84527e295f82842c1058665e41bc6fa1ee5"},{"path":"docs/npm/network-flows/retention-querying.md","size":10148,"blob_sha":"3d051cbfa1adaef60a77790d0b0094ad895111d7","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/docs/npm/network-flows/retention-querying.md\"\nsidebar_label: \"Retention and Tiers\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Flows\"\nkeywords: ['retention', 'tiers', 'rollup', 'tier selection']\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Retention and Tiers\n\nNetdata stores flow data in four tiers. The tier model is transparent — you do not pick a tier when you query, the dashboard picks for you. Understanding how it picks helps you interpret what you're seeing and avoid surprises when older data isn't there.\n\nFor the configuration surface (per-tier `size_of_journal_files` and `duration_of_journal_files`), see [Configuration → Per-tier retention](/docs/npm/network-flows/configuration.md#per-tier-retention). For the query semantics (group-by limits, full-text search, URL sharing, dashboard query parameters), see [Visualization → Overview](/docs/npm/network-flows/visualization/overview.md).\n\n## The four tiers\n\n| Tier | Bucket | On-disk dir | YAML key |\n|---|---|---|---|\n| Raw | per-flow | `flows/raw/` | `raw` |\n| 1-minute | 60 s | `flows/1m/` | `minute_1` |\n| 5-minute | 300 s | `flows/5m/` | `minute_5` |\n| 1-hour | 3600 s | `flows/1h/` | `hour_1` |\n\nThe raw tier stores every flow record as it arrived. The other three are rollup tiers — they aggregate raw flows into time-bucketed groups by identity (exporter, interface, ASN, country/state, network labels, VLAN, next-hop — see below for the full preserved set).\n\n## What survives the rollup\n\nRollup tiers (1m, 5m, 1h) deliberately drop the high-cardinality and protocol-specific fields and keep an aggregate-friendly subset.\n\n**Forced to the raw tier** (any query that filters on, groups by, or runs full-text search against these fields is rerouted to the raw tier — see [Field Reference](/docs/npm/network-flows/field-reference.md) for the per-field matrix):\n\n- `SRC_ADDR`, `DST_ADDR`, `SRC_PORT`, `DST_PORT`\n- `SRC_GEO_CITY`, `DST_GEO_CITY`, `SRC_GEO_LATITUDE`, `DST_GEO_LATITUDE`, `SRC_GEO_LONGITUDE`, `DST_GEO_LONGITUDE`\n- All `V9_*` and `IPFIX_*` raw-protocol fields.\n\n**Dropped from rollup output but do not switch tier** (the field comes back as null on rollup tiers; the planner does not reroute the query to raw):\n\n- AS path, BGP community fields (`SRC_COMMUNITIES`, `DST_COMMUNITIES`, etc.), MPLS labels, MAC addresses, NAT / post-NAT addresses, and any other field not in the preserved set below.\n\nIf you need any of these fields populated in the result, force the raw tier explicitly (open a city map, add a port filter, type something into the search ribbon, or pick a window that fits inside raw-tier retention).\n\n**Preserved in rollup tiers** (these queries can use coarser tiers):\n\n- Core: `PROTOCOL`, `DIRECTION`, `ETYPE`, `FORWARDING_STATUS`, `FLOW_VERSION`, `IPTOS`, `TCP_FLAGS`, `ICMPV4_TYPE/CODE`, `ICMPV6_TYPE/CODE`, `SRC_AS` / `DST_AS` (ASN number), `SRC_AS_NAME` / `DST_AS_NAME`.\n- Exporter: `EXPORTER_IP`, `EXPORTER_PORT`, `EXPORTER_NAME`, `EXPORTER_GROUP/ROLE/SITE/REGION/TENANT`.\n- Interface: `IN_IF`, `OUT_IF`, `IN_IF_NAME`/`OUT_IF_NAME`, plus their description / speed / provider / connectivity / boundary variants.\n- Network: `SRC_NET_*` / `DST_NET_*` (name / role / site / region / tenant), `SRC_COUNTRY` / `DST_COUNTRY`, `SRC_GEO_STATE` / `DST_GEO_STATE`, `NEXT_HOP`, `SRC_VLAN` / `DST_VLAN`.\n- Aggregates: bytes / packets / flow-count sums per bucket.\n\nSo rollups are fine for most country / state / ASN / interface / VLAN / protocol questions, but useless if you need to ask \"which IP\", \"which port\", \"which AS path\", \"which MPLS label\", or \"where in the city\".\n\nThis is why filtering or grouping by IP/port/city/lat/lon forces the query to the raw tier — there is no other tier that has those fields.\n\nFor the per-field tier-preservation matrix, see [Field Reference](/docs/npm/network-flows/field-reference.md).\n\n## How the dashboard picks a tier\n\nFor every query the dashboard sends to the plugin, the planner makes a single decision: which tier (or tiers) can satisfy this?\n\n**Rules:**\n\n1. **Any raw-only field used as a filter or group-by → raw tier.** No exception. See the \"Forced to the raw tier\" list above. Selecting the city map or filtering on any IP / port / city / lat / lon field (plus the `V9_*` / `IPFIX_*` raw protocol fields) falls in this category.\n2. **A non-empty full-text search → raw tier.** Full-text search runs as a regex against the raw journal payload, which only the raw tier carries.\n3. **Otherwise, pick the coarsest tier that satisfies the time range alignment.**\n   - **Time-Series view** additionally needs at least 100 buckets in the window. The planner walks the tiers from coarsest to finest and picks the first that delivers ≥100 buckets, falling back to 1-minute when no tier qualifies:\n     - ≥ 100 hours of window → 1-hour tier (3600 s buckets)\n     - 8h20m to less than 100 hours → 5-minute tier (300 s buckets)\n     - 100 minutes to less than 8h20m → 1-minute tier (60 s buckets)\n     - Less than 100 minutes → 1-minute tier (Time-Series buckets are still floored at 60 seconds, so very short windows render fewer than 100 buckets)\n   - **Table / Sankey / Map** views have no bucket-count constraint; the planner walks 1-hour → 5-minute → 1-minute by alignment alone, so they can land on a coarser tier than Time-Series for the same window.\n\nWhen the planner picks a tier and the time range crosses tier-aligned boundaries, the query is **stitched** — head fragment in a finer tier, aligned middle in the chosen tier, tail fragment in a finer tier. You don't see this; the results merge cleanly. It exists so wide windows that don't quite align to one-hour boundaries still work.\n\nThe plugin reports the chosen tier in the response stats (`query_tier` = `0`, `1`, `5`, or `60`). The dashboard uses this for diagnostic banners.\n\n## What \"no data\" actually means\n\nIf you ask for a 30-day window with an IP filter and raw-tier retention is 24 hours, you get an empty response. No error, no banner reading \"data has expired\" — just an empty result set. The dashboard renders this as \"No data\".\n\nThe planner does not fall back to a coarser tier for raw-only queries. When a span requires the raw tier (because the query filters or groups on an IP / port / city / lat / lon / V9_* / IPFIX_* field, or runs a full-text search) and that span's raw-tier files have been rotated out, the planner returns no flows for that span. Rollups never carry raw-only fields, so they cannot satisfy the query anyway. Conversely, when a span only needs preserved fields (country, ASN, exporter, interface, protocol…), the planner can fall back from a coarser tier to a finer one if the coarser files have rotated out — finer tiers are supersets of coarser tiers for the preserved fields.\n\nOther spans within the same query that don't need raw data may still return flows. So it's also possible to see partial coverage — half the time range filled, half empty.\n\nFor Time-Series, \"no data\" appears as zero values in the affected buckets, not as a special \"missing\" indicator. The chart still draws; the empty regions are flat lines at zero.\n\n## What forces the raw tier in practice\n\nQuick reference for \"why is my query slow / showing less time?\":\n\n- Adding `SRC_ADDR`, `DST_ADDR`, `SRC_PORT`, or `DST_PORT` as a filter\n- Adding any of those fields to the group-by\n- Switching to the city map (it uses `SRC_GEO_CITY`/`DST_GEO_CITY` plus latitudes/longitudes)\n- Typing anything into the global search ribbon\n\nIf you see the time depth in your dashboard suddenly shrink after you applied a filter, you've hit the raw-tier limit.\n\n## Default retention and the most common misconfiguration\n\nEach tier has its own `size_of_journal_files` and `duration_of_journal_files`. The built-in defaults are uniform: `10GB` on every tier with no time-based age limit. That is safe for first validation because disk is still capped, but production deployments should usually set tier-specific size and duration budgets; the whole point of having rollup tiers is to keep them around longer than raw.\n\nA more useful production profile:\n\n```yaml\njournal:\n  tiers:\n    raw:\n      size_of_journal_files: 200GB\n      duration_of_journal_files: 24h\n    minute_1:\n      size_of_journal_files: 20GB\n      duration_of_journal_files: 14d\n    minute_5:\n      size_of_journal_files: 20GB\n      duration_of_journal_files: 30d\n    hour_1:\n      size_of_journal_files: 20GB\n      duration_of_journal_files: 365d\n```\n\nThis gives you 24 hours of full-detail forensics, 14 days of 1-minute trends, 30 days of 5-minute snapshots, and a year of hourly aggregates.\n\nSee [Configuration → Per-tier retention](/docs/npm/network-flows/configuration.md#per-tier-retention) for the full schema and [Sizing and Capacity Planning](/docs/npm/network-flows/sizing-capacity.md) for how to estimate the actual disk footprint per tier from your flow rate.\n\n## Things that surprise people\n\n- **An IP filter shrinks the time depth.** This is correct behaviour, but the dashboard doesn't always make it obvious. If your time range is wider than raw-tier retention, drop the IP filter to see the broader rollup data.\n- **The city map can't go back as far as the country map.** The city map needs the city/lat/lon fields (raw-only); the country map only needs `SRC_COUNTRY`/`DST_COUNTRY` (preserved in rollups).\n- **Tier files use short names** (`1m`, `5m`, `1h` on disk) but YAML uses the explicit names (`minute_1`, `minute_5`, `hour_1`). Mind the difference.\n\n## What's next\n\n- [Configuration → Per-tier retention](/docs/npm/network-flows/configuration.md#per-tier-retention) — `netflow.yaml` schema for per-tier retention.\n- [Sizing and Capacity Planning](/docs/npm/network-flows/sizing-capacity.md) — Disk and CPU estimates from your flow rate.\n- [Field Reference](/docs/npm/network-flows/field-reference.md) — Which fields exist and which survive into rollups.\n- [Visualization → Overview](/docs/npm/network-flows/visualization/overview.md) — How the dashboard sends queries; group-by limits; full-text search; URL sharing.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"753C:3BF56:175076:5D7875:6AB92A2C"},"text_sha256":"d57ec8069a13f66123a98689d1f729918377ea44a32ded89a5c270919736402c"},{"path":"docs/security-and-privacy-design/netdata-agent-security.md","size":13001,"blob_sha":"bd91e7aaf22a26a2e9356c9507c228909e0687c4","priority":1,"status":200,"text":"# Netdata Agent Security and Privacy Design\n\n:::tip\n\n**Executive Summary**\n\n- Netdata Agent is designed with a security-first approach to protect system data.\n- Raw data never leaves the system where Netdata is installed.\n- Only processed metrics and minimal metadata are stored, streamed, or archived.\n- Communications are secured with TLS, authentication uses API keys and cryptographic validation, and Agent architecture enforces isolation and resilience.\n- Netdata Agent follows best practices supporting PCI DSS, HIPAA, GDPR, and CCPA compliance, and is continuously audited and improved for security.\n\n:::\n\n## Introduction\n\nNetdata Agent uses a security-first design.  \nIt protects data by exposing only chart metadata and metric values, never raw system or application data.\n\nThis design allows Netdata to operate in high-security environments, including PCI Level 1 compliance.\n\nWhen plugins collect data from databases or logs, only **processed metrics** are:\n\n- Stored in Netdata databases\n- Sent to upstream Netdata servers\n- Archived to external time-series databases\n\nRaw data remains local and is never transmitted.\n\n## User Data Protection\n\nNetdata Agent safeguards your data at every stage.\n\n| **Aspect**        | **Protection Mechanism**                                                              |\n|:------------------|:--------------------------------------------------------------------------------------|\n| Raw Data          | Stays on your system                                                                  |\n| Plugins           | Hard-coded for collection only, reject external commands                              |\n| Functions Feature | Predefined plugin functions, UI only calls these                                      |\n| Privileges        | Most plugins run without escalated privileges; the main process does not require them |\n\nPlugins needing escalated privileges are isolated:\n\n- Perform only predefined collection tasks\n- Keep raw data inside the local process\n- Never save, transfer, or expose raw data to the Netdata daemon\n\n:::tip\n\nNetdata's decentralized design keeps all data local.  \n**You are responsible for backing up and managing your system data.**\n\n:::\n\n## Communication and Data Encryption\n\nNetdata secures all internal and external communications:\n\n| **Communication** | **Protection**                                                      |\n|:------------------|:--------------------------------------------------------------------|\n| Plugins to Daemon | Ephemeral in-memory pipes, isolated from other processes            |\n| Streaming Metrics | Requires API keys, optional TLS encryption                          |\n| Web API           | Supports TLS if configured                                          |\n| Cloud Connection  | MQTT over WebSockets over TLS with public/private key authorization |\n\nPublic and private keys are exchanged securely during Cloud provisioning.\n\n### Netdata Agent Security Flow\n\n```mermaid\nflowchart TD\n    A(\"Netdata Plugin\") -->|\"Collects raw data\"| B(\"In-memory Processing\")\n    B -->|\"Processes into metrics\"| C(\"Netdata Daemon\")\n    C -->|\"Stores metrics locally\"| D(\"Netdata Database\")\n    C -->|\"Optionally streams metrics\"| E(\"Another Netdata Agent\")\n    C -->|\"Optionally sends metadata\"| F(\"Netdata Cloud\")\n    F --> G(\"Dashboards<br/>& Notifications\")\n\n    %% Style definitions\n    classDef alert fill:#ffeb3b,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef neutral fill:#f9f9f9,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef complete fill:#4caf50,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef database fill:#2196F3,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n\n    %% Apply styles\n    class A alert\n    class B,C neutral\n    class D,E complete\n    class F,G database\n```\n\n## Outbound Network Communication\n\nA Netdata Agent initiates outbound network connections only through a small number of well-defined paths. For Cloud communication the Agent is never an inbound server — all Cloud traffic is **outbound and initiated by the Agent**.\n\nUnderstanding each path, its default state, and how to disable it is essential when deploying the Agent in restricted or air-gapped networks. The paths below are the only default outbound connections a stock Agent makes.\n\n### Summary\n\n| **Communication Path**              | **Default State**      | **Trigger**                       | **Destination**                                                           | **How to Disable**                                                                                                             |\n|:------------------------------------|:-----------------------|:----------------------------------|:--------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|\n| Anonymous telemetry (backend)       | On                     | Agent start, stop, or fatal crash | Netdata telemetry cloud function (GCP) over HTTPS                         | Create `.opt-out-from-anonymous-statistics`, set `DISABLE_TELEMETRY=1`/`DO_NOT_TRACK=1`, or install with `--disable-telemetry` |\n| Anonymous telemetry (dashboard)     | On                     | Viewing the local Agent dashboard | PostHog (anonymized page-view events)                                     | Same as above (shared opt-out controls)                                                                                        |\n| Agent-Cloud Link (ACLK)             | Off until connected    | Connecting a node to a Space      | `app.netdata.cloud`, `api.netdata.cloud`, `mqtt.netdata.cloud` (WSS, 443) | Do not connect the Agent to Netdata Cloud                                                                                      |\n| Installer script download           | n/a (install time)     | Running `kickstart.sh`            | `get.netdata.cloud`                                                       | Pre-download the script for an offline install                                                                                 |\n| Package download / automatic update | On for online installs | Install, or scheduled auto-update | `repository.netdata.cloud`                                                | `--no-updates` at install, or disable `netdata-updater.sh`                                                                     |\n\n### Anonymous telemetry\n\nBy default, Netdata collects anonymous usage information through two channels:\n\n- **Agent backend**: On start, clean stop, and fatal crash, the `netdata` daemon executes the `anonymous-statistics.sh` script, which sends anonymized system and version information to a Netdata telemetry cloud function hosted in GCP over HTTPS.\n- **Agent dashboard**: When you view the local dashboard (`http://NODE:19999`), PostHog JavaScript sends anonymized page-view events. Sensitive attributes (such as IP and hostname) are overwritten with constant values before any event is sent.\n\nTelemetry is **on by default** and carries only anonymized metadata — never raw metrics. See [Anonymous telemetry events](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) for exactly what is collected and the opt-out methods.\n\n### Agent-Cloud Link (ACLK)\n\nThe [ACLK](/src/aclk/README.md) is the channel the Agent uses to communicate with Netdata Cloud. It:\n\n- Uses an **outgoing** secure WebSocket (WSS) connection on port `443`.\n- Activates **only after you connect a node** to a Netdata Cloud Space.\n- Requires outbound access to `app.netdata.cloud`, `api.netdata.cloud`, and `mqtt.netdata.cloud`.\n- Transmits only the metadata needed for coordination and access control — **raw metrics never leave your infrastructure**.\n\nIP addresses can change without notice and vary based on your geographic location due to CDN-edge servers, so **always prefer domain-based allowlisting**. For the complete firewall allowlist with ports, see [Configure Netdata for cybersecurity platforms](/docs/netdata-agent/configure-netdata-for-cybersecurity-platforms.md#required-endpoints-and-ports). If your Agent requires a proxy to reach the internet, see [proxy configuration](/src/claim/README.md#proxy-configuration).\n\nACLK is **off until you connect the Agent**. An unconnected Agent never opens this connection.\n\n### Installation and updates\n\nThese connections occur at install or update time, not as continuous Agent runtime traffic:\n\n- The `kickstart.sh` installer script is downloaded from `get.netdata.cloud`.\n- Packages are fetched from `repository.netdata.cloud/repos/stable` (stable channel) or `repository.netdata.cloud/repos/edge` (nightly channel).\n- **Automatic updates are enabled by default for online installations** (they are disabled automatically for offline installations). When enabled, the separate `netdata-updater.sh` script runs on a schedule (systemd timer, cron, or interval) and connects to the package repository to check for and install newer versions.\n\nDisable automatic updates with the `--no-updates` flag at install time, or by disabling the updater on an existing install. For a fully disconnected deployment, see [Install Netdata on Offline Systems](/packaging/installer/methods/offline.md).\n\n### Fully autonomous operation\n\nWhen all three of the following are true, the running Agent daemon makes **no outbound internet connections** and operates fully autonomously:\n\n1. The Agent is **not connected** to Netdata Cloud (ACLK stays inactive).\n2. **Anonymous telemetry is disabled**.\n3. **Automatic updates are disabled** (or the host has no route to the package repository).\n\nIn this state the Agent continues to collect, store, and serve metrics locally. User-configured collectors (for example, an HTTP-based collector pointed at an external endpoint) may open their own outbound connections — those are driven by your configuration, not by default Agent behavior.\n\n:::tip\n\nFor air-gapped or strictly firewalled environments, the recommended baseline is: disable telemetry, do not connect the Agent to Netdata Cloud, and disable automatic updates. With those three in place the Agent runs with no outbound internet dependencies. See [Install Netdata on Offline Systems](/packaging/installer/methods/offline.md) for a fully disconnected installation procedure.\n\n:::\n\n## Authentication\n\nNetdata supports multiple authentication methods depending on the connection type:\n\n| **Connection**           | **Authentication Method**                                               |\n|:-------------------------|:------------------------------------------------------------------------|\n| Direct Agent Access      | Typically unauthenticated, relies on LAN isolation or firewall policies |\n| Streaming Between Agents | Requires API key authentication, optional TLS                           |\n| Agent-to-Cloud           | Public/private key cryptography with mandatory TLS                      |\n\n:::tip\n\nFor additional access control, place Netdata Agents behind an authenticating web proxy.\n\n:::\n\n## Security Vulnerability Response\n\nNetdata follows a structured vulnerability response process:\n\n- Acknowledges reports within three business days\n- Initiates a Security Release Process for verified issues\n- Releases patches promptly\n- Handles vulnerability information confidentially\n- Keeps reporters updated throughout the process\n\n:::tip\n\nLearn more in [Netdata's GitHub Security Policy](https://github.com/netdata/netdata/security/policy).\n\n:::\n\n## Protection Against Common Security Threats\n\nNetdata Agent is resilient against major security threats:\n\n| **Threat**                 | **Defense Mechanism**                                                      |\n|:---------------------------|:---------------------------------------------------------------------------|\n| DDoS Attacks               | Fixed thread counts, automatic memory management, resource prioritization  |\n| SQL Injections             | No UI data passed back to database-accessing plugins                       |\n| System Resource Starvation | Nice priority protects production apps, early termination in OS-OOM events |\n\nAdditional protections include:\n\n- Running as an unprivileged user by default\n- Isolating escalated privileges to specific collectors\n- Proactive CPU and memory management\n\n## User-Customizable Security Settings\n\nYou can tailor the Agent's security settings:\n\n| **Setting**                 | **Options Available**                            |\n|:----------------------------|:-------------------------------------------------|\n| TLS Encryption              | Configurable for web API and streaming           |\n| Access Control Lists (ACLs) | Limit endpoint access by IP address              |\n| CPU/Memory Priority         | Adjust scheduling priority and memory thresholds |\n\n:::tip\n\nUse Netdata configuration files to apply custom security settings.\n\n:::\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4482:3D40A:171C47:5D43ED:6AB92A2D"},"text_sha256":"996701f2ffdb684630fb5d29c0b44b4646bbab4d800fc2dfb413280fcea14cfa"},{"path":"docs/security-and-privacy-design/netdata-cloud-security.md","size":8283,"blob_sha":"f105a2eeb35b014b0bab35646ae80ebb4345af5c","priority":1,"status":200,"text":"# Netdata Cloud Security and Privacy Design\n\n:::tip\n\n**Executive Summary**\n\n- Netdata Cloud offers secure real-time monitoring without storing raw metrics.\n- Only minimal metadata passes securely through Netdata Cloud.  \n  Users retain full control of their data.\n- Infrastructure is protected with strong encryption, access control, and compliance with GDPR, CCPA, PCI DSS, SOC 2, and HIPAA standards.\n- Netdata Cloud continuously evolves its security and privacy practices to meet the highest industry standards.\n\n:::\n\n:::info\n\nNetdata achieves SOC 2 [Type 1](https://www.netdata.cloud/blog/soc2-type1/) & [Type 2](https://www.netdata.cloud/blog/soc2-type-2-compliance/) attestations, reinforcing its dedication to robust security practices for user data.\n\n:::\n\n## Introduction\n\nNetdata Cloud enables secure real-time system insights without storing raw metrics.\n\nData passes through Netdata Cloud securely but isn't retained. Metric views and alerts from multiple Agents display as a unified dashboard in your browser.\n\n## User Identification and Authorization\n\nNetdata Cloud requires only an email address for accounts.\n\n| **Method**     | **Details**                                        |\n|:---------------|:---------------------------------------------------|\n| Identification | Email via Google, GitHub, or short-lived tokens    |\n| Credentials    | No passwords stored                                |\n| Storage        | Secure AWS storage; used for product and marketing |\n\nAuthentication uses third-party integrations or secure tokens. Netdata Cloud never stores credentials.\n\n## Data Storage and Transfer\n\nNetdata Cloud stores no raw metrics, only essential metadata:\n\n| **Metadata Stored**  | **Source**                  |\n|:---------------------|:----------------------------|\n| Hostname             | `/api/v1/info` endpoint     |\n| Metric Metadata      | `/api/v1/contexts` endpoint |\n| Alerts Configuration | `/api/v1/alarms` endpoint   |\n\nAll metadata is stored in AWS and copied to Google BigQuery for analytics.\n\nMetric data travels via secure Agent-Cloud Link (ACLK):\n\n- ACLK encrypts data and activates only for claimed nodes\n- All user-Cloud communication uses TLS encryption\n\n### ACLK Secure Data Flow\n\n```mermaid\nflowchart TD\n    A(\"Netdata Agent\") -->|\" Encrypts metrics<br/>and minimal metadata \"| B(\"Agent-Cloud Link ACLK\")\n    B -->|\" TLS Encryption \"| C(\"Netdata Cloud\")\n    C -->|\" Aggregates metadata<br/>for dashboards and alerts \"| D(\"User Browser\")\n%% Style definitions\n    classDef alert fill: #ffeb3b, stroke: #000000, stroke-width: 3px, color: #000000, font-size: 14px\n    classDef neutral fill: #f9f9f9, stroke: #000000, stroke-width: 3px, color: #000000, font-size: 14px\n    classDef complete fill: #4caf50, stroke: #000000, stroke-width: 3px, color: #000000, font-size: 14px\n    classDef database fill: #2196F3, stroke: #000000, stroke-width: 3px, color: #000000, font-size: 14px\n%% Apply styles\n    class A alert\n    class B neutral\n    class C database\n    class D complete\n```\n\n## Data Retention and Erasure\n\n| **Process**     | **Details**                                         |\n|:----------------|:----------------------------------------------------|\n| Retention       | Deleted content kept 90 days                        |\n| Self-Service    | Modify/delete personal data via Cloud UI            |\n| Manual Requests | Written deletion requests processed under data laws |\n\n:::tip\n\nUsers can delete accounts and data directly from their Netdata Cloud profile.\n\n:::\n\n## Infrastructure and Authentication\n\nNetdata Cloud uses Infrastructure as Code (IaC).\n\n| **Feature**             | **Implementation**                   |\n|:------------------------|:-------------------------------------|\n| Infrastructure Changes  | Managed via Terraform                |\n| Authentication          | JWT tokens at TLS termination points |\n| Microservices Isolation | Complete environment separation      |\n\nNetdata Cloud never stores user credentials.\n\n## Security Features and Incident Response\n\nBuilt-in security protections include:\n\n| **Feature**               | **Details**                        |\n|:--------------------------|:-----------------------------------|\n| Infrastructure Dashboards | Centralized monitoring/alerting    |\n| Audit Logs                | Role-based access tracking         |\n| DDoS Protection           | Rate-limiting and blacklisting     |\n| Secure Development        | Static analyzers and secure coding |\n\nSecurity vulnerabilities follow a structured process:\n\n- Acknowledge within three business days\n- Analyze and fix promptly\n- Maintain communication with reporters\n\n:::tip\n\nSee [Netdata's GitHub Security Policy](https://github.com/netdata/netdata/security/policy) for details.\n\n:::\n\n## User Customization\n\nNetdata Cloud uses maximum security defaults without out-of-box customization.\n\nPer-contract customization options include:\n\n- Custom SSO\n- Custom retention policies\n- Advanced access controls\n- Tailored audit logs\n- Third-party security tool integration\n\nContact Netdata Sales for enterprise solutions.\n\n## Deleting Personal Data\n\nUsers can delete personal data by:\n\n- Logging into Netdata Cloud\n- Accessing Profile settings\n- Initiating account deletion\n\nIf self-service isn't available, submit written requests processed under applicable laws.\n\n## User Privacy and Data Protection\n\nNetdata Cloud prioritizes privacy and data protection, continuously reviewing and updating privacy and security practices.\n\n| **Category**              | **Details**                                                                                                                                                                                                               |\n|:--------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Data Collection**       | • Email Address (account, communication, analytics)<br/>• IP Address (web proxy access logs)                                                                                                                              |\n| **Data Usage**            | • Stored in AWS databases<br/>• Copied to BigQuery for analytics<br/>• Used for product improvement<br/>• With consent, tracking via Google Analytics, Posthog, and Gainsight PX<br/>• Stripe for secure payment handling |\n| **Data Sharing**          | • No selling or sharing of personal data<br/>• Third-party services: Google Cloud/AWS (infrastructure), Stripe (payments), Analytics services                                                                             |\n| **Data Protection**       | • Encrypted ACLK for all infrastructure data<br/>• TLS encryption for all user-Cloud communication                                                                                                                        |\n| **User Control**          | • Access personal data<br/>• Correct inaccuracies<br/>• Retrieve personal data<br/>• Delete accounts<br/>• Note: Temporary maintenance may limit access                                                                   |\n| **Compliance**            | • Full compliance with GDPR and CCPA                                                                                                                                                                                      |\n| **Data Transfer**         | • Secure, encrypted WebSocket (WSS) connections for all transfers                                                                                                                                                         |\n| **Tracking Technologies** | • With consent: analytical cookies tracked via Google Analytics, Posthog, and Gainsight PX                                                                                                                                |\n| **Data Breach Protocol**  | • Follows DPA guidelines and industry timelines<br/>• User notifications as required by data protection laws<br/>• Continuous review and updates to privacy and security practices                                        |\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FB90:1A3D83:18591B:5E8193:6AB92A2C"},"text_sha256":"4bb60c378e327b50fc20a677837c4436227928adc811a38297a0eef06e546abc"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/didactum_security_gmbh_formerly_didactum_ltd_deutschland_snmp_traps.md","size":5874,"blob_sha":"6cd1b0997939ac7ae14e90a21d4d9efbb2c7f319","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/didactum_security_gmbh_formerly_didactum_ltd_deutschland_snmp_traps.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Didactum Security GmbH Formerly Didactum Ltd Deutschland SNMP Traps\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/SNMP Traps/Integrations\"\nkeywords: ['didactum-security-gmbh-formerly-didactum-ltd-deutschland', 'snmp', 'trap', 'traps', 'inform', 'notification', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Didactum Security GmbH Formerly Didactum Ltd Deutschland SNMP Traps\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp_traps\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nReceive, decode, and store SNMP traps and INFORMs from Didactum Security GmbH Formerly Didactum Ltd Deutschland devices with Netdata. The bundled Didactum Security GmbH Formerly Didactum Ltd Deutschland trap profile decodes 1 trap definition across 1 MIB into structured journal events with named, typed varbinds — searchable and filterable in the Logs tab.\n\nNetdata's SNMP trap listener receives traps on UDP/162, matches them to the Didactum Security GmbH Formerly Didactum Ltd Deutschland enterprise OID space, and decodes the varbinds using the bundled Didactum Security GmbH Formerly Didactum Ltd Deutschland trap profile. No per-trap configuration.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nTraps from Didactum Security GmbH Formerly Didactum Ltd Deutschland devices are decoded automatically once the device is pointed at the Agent's trap listener.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp_traps** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp_traps**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp_traps** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp_traps data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_traps_ (or scroll the list) to locate the **snmp_traps** collector.\n5. Click the **+** next to the **snmp_traps** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nNetdata decodes **1 trap definition** from Didactum Security GmbH Formerly Didactum Ltd Deutschland across **1 MIB** into structured journal events. A trap is decoded **only if the device actually sends it**; inclusion here means the profile can decode it.\n\n**By severity:** `notice` 1\n\n**By category:** `unknown` 1\n\n### Coverage by MIB\n\n| MIB | Trap definitions |\n|:----|----:|\n| `DIDACTUM-SYSTEM-MIB` | 1 |\n\n### Sample decoded traps\n\n- `DIDACTUM-SYSTEM-MIB::ctlUnitTrapNotification`\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6404:3E1DA:178A58:5DB259:6AB92A2A"},"text_sha256":"4cf927190b31387ba0695c1bab05ecbf1c16b03928dfa1510a988cf8bfc86e10"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/innominate_security_technologies_ag_snmp_traps.md","size":5930,"blob_sha":"2a4511749e9a3981e0abe645a74272ae7ecaf561","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/innominate_security_technologies_ag_snmp_traps.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Innominate Security Technologies AG SNMP Traps\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/SNMP Traps/Integrations\"\nkeywords: ['innominate-security-technologies-ag', 'snmp', 'trap', 'traps', 'inform', 'notification', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Innominate Security Technologies AG SNMP Traps\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp_traps\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nReceive, decode, and store SNMP traps and INFORMs from Innominate Security Technologies AG devices with Netdata. The bundled Innominate Security Technologies AG trap profile decodes 22 trap definitions across 1 MIB into structured journal events with named, typed varbinds — searchable and filterable in the Logs tab.\n\nNetdata's SNMP trap listener receives traps on UDP/162, matches them to the Innominate Security Technologies AG enterprise OID space, and decodes the varbinds using the bundled Innominate Security Technologies AG trap profile. No per-trap configuration.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nTraps from Innominate Security Technologies AG devices are decoded automatically once the device is pointed at the Agent's trap listener.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp_traps** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp_traps**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp_traps** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp_traps data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_traps_ (or scroll the list) to locate the **snmp_traps** collector.\n5. Click the **+** next to the **snmp_traps** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nNetdata decodes **22 trap definitions** from Innominate Security Technologies AG across **1 MIB** into structured journal events. A trap is decoded **only if the device actually sends it**; inclusion here means the profile can decode it.\n\n**By severity:** `alert` 2 · `crit` 1 · `warning` 11 · `notice` 7 · `info` 1\n\n**By category:** `state_change` 5 · `config_change` 3 · `security` 2 · `auth` 2 · `diagnostic` 10\n\n### Coverage by MIB\n\n| MIB | Trap definitions |\n|:----|----:|\n| `MGUARDB-MIB` | 22 |\n\n### Sample decoded traps\n\n- `MGUARDB-MIB::mGuardHTTPSLoginTrap`\n- `MGUARDB-MIB::mGuardShellLoginTrap`\n- `MGUARDB-MIB::mGuardDHCPNewClientTrap`\n- `MGUARDB-MIB::mGuardTrapDiscFull`\n- `MGUARDB-MIB::mGuardTrapCpuLoadHigh`\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"25DA:3D501:1846AF:5E6EB8:6AB92A2C"},"text_sha256":"4d3ddcc25d54b6f99d49481f5c2358ba78c9e0a08478008fb4f244d09380ac6e"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/securitymatrix_inc_snmp_traps.md","size":5502,"blob_sha":"026f6f9373d05206e72d55e180cf107bf007aea6","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/securitymatrix_inc_snmp_traps.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Securitymatrix Inc SNMP Traps\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/SNMP Traps/Integrations\"\nkeywords: ['securitymatrix-inc', 'snmp', 'trap', 'traps', 'inform', 'notification', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Securitymatrix Inc SNMP Traps\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp_traps\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nReceive, decode, and store SNMP traps and INFORMs from Securitymatrix Inc devices with Netdata. The bundled Securitymatrix Inc trap profile decodes 1 trap definition across 1 MIB into structured journal events with named, typed varbinds — searchable and filterable in the Logs tab.\n\nNetdata's SNMP trap listener receives traps on UDP/162, matches them to the Securitymatrix Inc enterprise OID space, and decodes the varbinds using the bundled Securitymatrix Inc trap profile. No per-trap configuration.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nTraps from Securitymatrix Inc devices are decoded automatically once the device is pointed at the Agent's trap listener.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp_traps** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp_traps**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp_traps** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp_traps data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_traps_ (or scroll the list) to locate the **snmp_traps** collector.\n5. Click the **+** next to the **snmp_traps** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nNetdata decodes **1 trap definition** from Securitymatrix Inc across **1 MIB** into structured journal events. A trap is decoded **only if the device actually sends it**; inclusion here means the profile can decode it.\n\n**By severity:** `warning` 1\n\n**By category:** `diagnostic` 1\n\n### Coverage by MIB\n\n| MIB | Trap definitions |\n|:----|----:|\n| `AirDefense-airCommand-MIB` | 1 |\n\n### Sample decoded traps\n\n- `AirDefense-airCommand-MIB::airCommandAlarm`\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E642:2E8679:17B954:5DDEE8:6AB92A2E"},"text_sha256":"bfb565e91cd23f7ec2052e7205779511d1bba7bf193cc84b318c59f3295514b8"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/skyhigh_security_llc_snmp_traps.md","size":5622,"blob_sha":"7041345cf95d887a85389cb4afd114f92b5236e4","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/skyhigh_security_llc_snmp_traps.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Skyhigh Security LLC SNMP Traps\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/SNMP Traps/Integrations\"\nkeywords: ['skyhigh-security-llc', 'snmp', 'trap', 'traps', 'inform', 'notification', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Skyhigh Security LLC SNMP Traps\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp_traps\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nReceive, decode, and store SNMP traps and INFORMs from Skyhigh Security LLC devices with Netdata. The bundled Skyhigh Security LLC trap profile decodes 3 trap definitions across 1 MIB into structured journal events with named, typed varbinds — searchable and filterable in the Logs tab.\n\nNetdata's SNMP trap listener receives traps on UDP/162, matches them to the Skyhigh Security LLC enterprise OID space, and decodes the varbinds using the bundled Skyhigh Security LLC trap profile. No per-trap configuration.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nTraps from Skyhigh Security LLC devices are decoded automatically once the device is pointed at the Agent's trap listener.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp_traps** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp_traps**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp_traps** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp_traps data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_traps_ (or scroll the list) to locate the **snmp_traps** collector.\n5. Click the **+** next to the **snmp_traps** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nNetdata decodes **3 trap definitions** from Skyhigh Security LLC across **1 MIB** into structured journal events. A trap is decoded **only if the device actually sends it**; inclusion here means the profile can decode it.\n\n**By severity:** `warning` 2 · `notice` 1\n\n**By category:** `security` 1 · `diagnostic` 2\n\n### Coverage by MIB\n\n| MIB | Trap definitions |\n|:----|----:|\n| `SKYHIGHSECURITY-SWG-MIB` | 3 |\n\n### Sample decoded traps\n\n- `SKYHIGHSECURITY-SWG-MIB::trSystem`\n- `SKYHIGHSECURITY-SWG-MIB::trApplication`\n- `SKYHIGHSECURITY-SWG-MIB::trUser`\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B860:3CC8A:17C75C:5DEFA5:6AB92A2D"},"text_sha256":"1409c21936be70ebf53cd39b22ba69de3c7b54ed4720b079a627feb520d3298d"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/thales_e_security_snmp_traps.md","size":5841,"blob_sha":"8fae94a3c3ba08fbf7228c3f03b1140726b0b867","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/thales_e_security_snmp_traps.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Thales E Security SNMP Traps\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/SNMP Traps/Integrations\"\nkeywords: ['thales-e-security', 'snmp', 'trap', 'traps', 'inform', 'notification', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Thales E Security SNMP Traps\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp_traps\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nReceive, decode, and store SNMP traps and INFORMs from Thales E Security devices with Netdata. The bundled Thales E Security trap profile decodes 15 trap definitions across 1 MIB into structured journal events with named, typed varbinds — searchable and filterable in the Logs tab.\n\nNetdata's SNMP trap listener receives traps on UDP/162, matches them to the Thales E Security enterprise OID space, and decodes the varbinds using the bundled Thales E Security trap profile. No per-trap configuration.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nTraps from Thales E Security devices are decoded automatically once the device is pointed at the Agent's trap listener.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp_traps** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp_traps**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp_traps** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp_traps data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_traps_ (or scroll the list) to locate the **snmp_traps** collector.\n5. Click the **+** next to the **snmp_traps** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nNetdata decodes **15 trap definitions** from Thales E Security across **1 MIB** into structured journal events. A trap is decoded **only if the device actually sends it**; inclusion here means the profile can decode it.\n\n**By severity:** `alert` 3 · `crit` 1 · `warning` 6 · `notice` 5\n\n**By category:** `config_change` 2 · `security` 4 · `license` 1 · `diagnostic` 8\n\n### Coverage by MIB\n\n| MIB | Trap definitions |\n|:----|----:|\n| `THALES-ESECURITY-PAYSHIELD-MIB` | 15 |\n\n### Sample decoded traps\n\n- `THALES-ESECURITY-PAYSHIELD-MIB::payShieldPowerOnAlarm`\n- `THALES-ESECURITY-PAYSHIELD-MIB::payShieldRestartAlarm`\n- `THALES-ESECURITY-PAYSHIELD-MIB::payShieldEraseAlarm`\n- `THALES-ESECURITY-PAYSHIELD-MIB::payShieldNewLicenseAlarm`\n- `THALES-ESECURITY-PAYSHIELD-MIB::payShieldNewSoftwareAlarm`\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6D92:3D501:1846B4:5E6ECD:6AB92A13"},"text_sha256":"7a2a5f5a4e684475a9a60d10fe8ae8d3bec8160234b9a34c3775e2106709bc7f"},{"path":"src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/ubiquiti_unifi_security_gateway.md","size":10034,"blob_sha":"d985135cde8e81c44ec3bf1349373bf8c95032e0","priority":1,"status":200,"text":"<!--startmeta\ncustom_edit_url: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/integrations/ubiquiti_unifi_security_gateway.md\"\nmeta_yaml: \"https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/snmp/npm-catalog/metadata.yaml\"\nsidebar_label: \"Ubiquiti Unifi Security Gateway\"\nlearn_status: \"Published\"\nlearn_rel_path: \"Network Performance Monitoring/Device Metrics/Integrations\"\nkeywords: ['ubiquiti', 'unifi', 'security', 'gateway', 'snmp', 'network device', 'npm']\nmessage: \"DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NPM CATALOG metadata.yaml FILE\"\nendmeta-->\n\n<!-- markdownlint-disable-file -->\n\n# Ubiquiti Unifi Security Gateway\n\n\n<img src=\"https://netdata.cloud/img/SNMP.png\" width=\"150\"/>\n\n\nPlugin: go.d.plugin\nModule: snmp\n\n<img src=\"https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44\" />\n\n## Overview\n\nMonitor Ubiquiti Unifi Security Gateway (network device) with Netdata over SNMP. Netdata recognizes the device automatically by its `sysObjectID` (recognized across 1 device identifiers) and collects the metrics this profile declares — on top of the generic SNMP baseline — with no manual OID configuration.\n\nNetdata's SNMP collector matches the device to the **ubiquiti-unifi-security-gateway.yaml** profile via `sysObjectID`/`sysDescr`, then polls the OIDs it declares.\n\nThis integration is supported on all platforms.\n\nThis integration supports multiple instances configured side-by-side.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nAuto-detected as Ubiquiti Unifi Security Gateway via sysObjectID/sysDescr.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n\n## Setup\n\n\nYou can configure the **snmp** collector in two ways:\n\n| Method                | Best for                                                                                 | How to                                                                                                                                 |\n|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [**UI**](#via-ui)     | Fast setup without editing files                                                         | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **snmp**, then click **+** to add a job. |\n| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/snmp.conf` and add a job.                                                                        |\n\n:::important\n\nUI configuration requires paid Netdata Cloud plan.\n\n:::\n\n\n### Prerequisites\n\n#### SNMP access\n\nSNMP must be enabled on the device and reachable from the Netdata Agent acting as the site's SNMP hub.\n\n\n### Configuration\n\n#### Options\n\nConfigure the SNMP collector with the device hostname and SNMP credentials. See the SNMP collector reference for all options.\n\n\n#### via UI\n\nConfigure the **snmp** collector from the Netdata web interface:\n\n1. Go to **Nodes**.\n2. Select the node **where you want the snmp data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.\n3. The **Collectors → Jobs** view opens by default.\n4. In the Search box, type _snmp_ (or scroll the list) to locate the **snmp** collector.\n5. Click the **+** next to the **snmp** collector to add a new job.\n6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.\n    - **Test** runs the job with the provided settings and shows whether data can be collected.\n    - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.\n\n\n#### via File\n\nThe configuration file name for this integration is `go.d/snmp.conf`.\n\nThe file format is YAML. Generally, the structure is:\n\n```yaml\nupdate_every: 1\nautodetection_retry: 0\njobs:\n  - name: some_name1\n  - name: some_name2\n```\nYou can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the\nNetdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/snmp.conf\n```\n\n##### Examples\nThere are no configuration examples.\n\n\n\n## Alerts\n\nThere are no alerts configured by default for this integration.\n\n\n## Metrics\n\nOn top of the **generic SNMP baseline** (the *Generic SNMP Device* integration — interfaces, system, IP/TCP/UDP, host resources), this Ubiquiti Unifi Security Gateway profile adds the metrics below. Each is collected **only where the device exposes the matching OID** — inclusion means the profile requests it; availability depends on the device model and software.\n\n**33 metrics** in 5 groups; each row is a chart context usable in alerts.\n\n| Group | Metrics |\n|---|---|\n| Network / Interface | 4 |\n| System / CPU | 2 |\n| System / Disk | 15 |\n| System / Memory | 11 |\n| System / Uptime | 1 |\n\n### Network / Interface\n\n| Metric (chart context) | Unit | Scope | Description |\n|---|---|---|---|\n| `snmp.device_prof_ifAdminStatus` | `{status}` | per interface, interface | Current administrative state of the interface |\n| `snmp.device_prof_ifHighSpeed` | `bit/s` | per interface, interface | Estimate of the interface's current bandwidth |\n| `snmp.device_prof_ifNumber` | `{interface}` | device | Number of network interfaces regardless of their current state present on this system |\n| `snmp.device_prof_ifOperStatus` | `{status}` | per interface, interface | Current operational state of the interface |\n\n### System / CPU\n\n| Metric (chart context) | Unit | Scope | Description |\n|---|---|---|---|\n| `snmp.device_prof_ucd_ssRawContexts` | `{switch}/s` | device | Number of context switches |\n| `snmp.device_prof_ucd_ssRawInterrupts` | `{interrupt}/s` | device | Number of interrupts processed |\n\n### System / Disk\n\n| Metric (chart context) | Unit | Scope | Description |\n|---|---|---|---|\n| `snmp.device_prof_ucd_diskIOLA1` | `%` | per ucd_disk_io_device | The 1 minute average load of disk (%) |\n| `snmp.device_prof_ucd_diskIOLA15` | `%` | per ucd_disk_io_device | The 15 minute average load of disk (%) |\n| `snmp.device_prof_ucd_diskIOLA5` | `%` | per ucd_disk_io_device | The 5 minute average load of disk (%) |\n| `snmp.device_prof_ucd_diskIONReadX` | `By/s` | per ucd_disk_io_device | The number of bytes read from this device since boot |\n| `snmp.device_prof_ucd_diskIONWrittenX` | `By/s` | per ucd_disk_io_device | The number of bytes written to this device since boot |\n| `snmp.device_prof_ucd_diskIOReads` | `{read}/s` | per ucd_disk_io_device | The number of read accesses from this device since boot |\n| `snmp.device_prof_ucd_diskIOWrites` | `{write}/s` | per ucd_disk_io_device | The number of write accesses to this device since boot |\n| `snmp.device_prof_ucd_dskAvail` | `By` | per ucd_dsk_path, ucd_dsk_device | Available space on the disk |\n| `snmp.device_prof_ucd_dskErrorFlag` | `{status}` | per ucd_dsk_path, ucd_dsk_device | Flag signaling that the disk or partition is under the minimum required space configured for it |\n| `snmp.device_prof_ucd_dskPercent` | `%` | per ucd_dsk_path, ucd_dsk_device | Percentage of space used on disk |\n| `snmp.device_prof_ucd_dskPercentNode` | `%` | per ucd_dsk_path, ucd_dsk_device | Percentage of inodes used on disk |\n| `snmp.device_prof_ucd_dskTotal` | `By` | per ucd_dsk_path, ucd_dsk_device | Total size of the disk/partition |\n| `snmp.device_prof_ucd_dskUsed` | `By` | per ucd_dsk_path, ucd_dsk_device | Used space on the disk |\n| `snmp.device_prof_ucd_ssIORawReceived` | `By/s` | device | Amount of data read from disk or other block device |\n| `snmp.device_prof_ucd_ssIORawSent` | `By/s` | device | Amount of data written to disk or other block device |\n\n### System / Memory\n\n| Metric (chart context) | Unit | Scope | Description |\n|---|---|---|---|\n| `snmp.device_prof_memory_free` | `By` | device | The amount of real/physical memory currently unused or available |\n| `snmp.device_prof_ucd_memAvailSwap` | `By` | device | The amount of swap space currently unused or available |\n| `snmp.device_prof_ucd_memBuffer` | `By` | device | The total amount of real or virtual memory currently allocated for use as memory buffers |\n| `snmp.device_prof_ucd_memCached` | `By` | device | The total amount of real or virtual memory currently allocated for use as cached memory |\n| `snmp.device_prof_ucd_memMinimumSwap` | `By` | device | The minimum amount of swap space expected to be kept free or available during normal operation of this host |\n| `snmp.device_prof_ucd_memShared` | `By` | device | The total amount of real or virtual memory currently allocated for use as shared memory |\n| `snmp.device_prof_ucd_memTotalFree` | `By` | device | The total amount of memory free or available for use on this host |\n| `snmp.device_prof_ucd_memTotalSwap` | `By` | device | The total amount of swap space configured for this host |\n| `snmp.device_prof_ucd_memoryTotal` | `By` | device | The total amount of real/physical memory installed on this host |\n| `snmp.device_prof_ucd_ssRawSwapIn` | `By/s` | device | Amount of memory swapped in from disk |\n| `snmp.device_prof_ucd_ssRawSwapOut` | `By/s` | device | Amount of memory swapped out to disk |\n\n### System / Uptime\n\n| Metric (chart context) | Unit | Scope | Description |\n|---|---|---|---|\n| `snmp.device_prof_systemUptime` | `s` | device | Time since the system was last rebooted or powered on. |\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"89AA:727CE:173E22:5D6672:6AB92A2E"},"text_sha256":"b4039f5466f28aae640aa93430ae08402e3ce6949d5bf7258e60d82d326e824b"},{"path":"src/go/plugin/go.d/config/go.d/snmp.profiles/default/_fortinet-fortigate-security.yaml","size":8103,"blob_sha":"4033816f51c90bf61de79ecb2d8f30f645bfde4f","priority":1,"status":200,"text":"# Security telemetry for Fortinet FortiGate devices\n# IPS intrusion stats, antivirus stats, webfilter stats — all per VDOM\n# Metrics are collected as hidden inputs; virtual_metrics combine related\n# dimensions into meaningful multi-dimension charts.\n\nmetrics:\n  ### IPS intrusion statistics (per VDOM) — hidden inputs for virtual_metrics\n  - MIB: FORTINET-FORTIGATE-MIB\n    table:\n      OID: 1.3.6.1.4.1.12356.101.9.2.1\n      name: fgIpsStatsTable\n    symbols:\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.1, name: _fgIpsIntrusionsDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.2, name: _fgIpsIntrusionsBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.3, name: _fgIpsCritSevDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.4, name: _fgIpsHighSevDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.5, name: _fgIpsMedSevDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.6, name: _fgIpsLowSevDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.7, name: _fgIpsInfoSevDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.8, name: _fgIpsSignatureDetections}\n      - {OID: 1.3.6.1.4.1.12356.101.9.2.1.1.9, name: _fgIpsAnomalyDetections}\n    metric_tags:\n      - tag: vdom_index\n        index: 1\n      - tag: _vdom_name\n        table: fgVdTable\n        symbol:\n          OID: 1.3.6.1.4.1.12356.101.3.2.1.1.2\n          name: fgVdEntName\n\n  ### Antivirus statistics (per VDOM) — hidden inputs for virtual_metrics\n  - MIB: FORTINET-FORTIGATE-MIB\n    table:\n      OID: 1.3.6.1.4.1.12356.101.8.2.1\n      name: fgAvStatsTable\n    symbols:\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.1, name: _fgAvVirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.2, name: _fgAvVirusBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.3, name: _fgAvHTTPVirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.4, name: _fgAvHTTPVirusBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.5, name: _fgAvSMTPVirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.6, name: _fgAvSMTPVirusBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.7, name: _fgAvPOP3VirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.8, name: _fgAvPOP3VirusBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.9, name: _fgAvIMAPVirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.10, name: _fgAvIMAPVirusBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.11, name: _fgAvFTPVirusDetected}\n      - {OID: 1.3.6.1.4.1.12356.101.8.2.1.1.12, name: _fgAvFTPVirusBlocked}\n    metric_tags:\n      - tag: vdom_index\n        index: 1\n      - tag: _vdom_name\n        table: fgVdTable\n        symbol:\n          OID: 1.3.6.1.4.1.12356.101.3.2.1.1.2\n          name: fgVdEntName\n\n  ### Webfilter statistics (per VDOM) — hidden inputs for virtual_metrics\n  - MIB: FORTINET-FORTIGATE-MIB\n    table:\n      OID: 1.3.6.1.4.1.12356.101.10.1.2.1\n      name: fgWebfilterStatsTable\n    symbols:\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.1, name: _fgWfHTTPBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.2, name: _fgWfHTTPSBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.3, name: _fgWfHTTPURLBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.4, name: _fgWfHTTPSURLBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.5, name: _fgWfActiveXBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.6, name: _fgWfCookieBlocked}\n      - {OID: 1.3.6.1.4.1.12356.101.10.1.2.1.1.7, name: _fgWfAppletBlocked}\n    metric_tags:\n      - tag: vdom_index\n        index: 1\n      - tag: _vdom_name\n        table: fgVdTable\n        symbol:\n          OID: 1.3.6.1.4.1.12356.101.3.2.1.1.2\n          name: fgVdEntName\n\nvirtual_metrics:\n  ### IPS — combined charts per VDOM\n  - name: fgIpsIntrusions\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgIpsIntrusionsDetected, table: fgIpsStatsTable, as: detected}\n      - {metric: _fgIpsIntrusionsBlocked, table: fgIpsStatsTable, as: blocked}\n    chart_meta:\n      description: IPS intrusions detected and blocked\n      family: 'Security/IPS/Events'\n      unit: \"{event}/s\"\n\n  - name: fgIpsSeverity\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgIpsCritSevDetections, table: fgIpsStatsTable, as: critical}\n      - {metric: _fgIpsHighSevDetections, table: fgIpsStatsTable, as: high}\n      - {metric: _fgIpsMedSevDetections, table: fgIpsStatsTable, as: medium}\n      - {metric: _fgIpsLowSevDetections, table: fgIpsStatsTable, as: low}\n      - {metric: _fgIpsInfoSevDetections, table: fgIpsStatsTable, as: info}\n    chart_meta:\n      description: IPS intrusion detections by severity\n      family: 'Security/IPS/Severity'\n      unit: \"{event}/s\"\n      type: stacked\n\n  - name: fgIpsMethod\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgIpsSignatureDetections, table: fgIpsStatsTable, as: signature}\n      - {metric: _fgIpsAnomalyDetections, table: fgIpsStatsTable, as: anomaly}\n    chart_meta:\n      description: IPS intrusion detections by method\n      family: 'Security/IPS/Method'\n      unit: \"{event}/s\"\n      type: stacked\n\n  ### Antivirus — detected vs blocked total, and by-protocol breakdowns\n  - name: fgAvVirusEvents\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgAvVirusDetected, table: fgAvStatsTable, as: detected}\n      - {metric: _fgAvVirusBlocked, table: fgAvStatsTable, as: blocked}\n    chart_meta:\n      description: Antivirus virus events detected and blocked\n      family: 'Security/Antivirus/Events'\n      unit: \"{virus}/s\"\n\n  - name: fgAvVirusDetectedByProtocol\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgAvHTTPVirusDetected, table: fgAvStatsTable, as: http}\n      - {metric: _fgAvSMTPVirusDetected, table: fgAvStatsTable, as: smtp}\n      - {metric: _fgAvPOP3VirusDetected, table: fgAvStatsTable, as: pop3}\n      - {metric: _fgAvIMAPVirusDetected, table: fgAvStatsTable, as: imap}\n      - {metric: _fgAvFTPVirusDetected, table: fgAvStatsTable, as: ftp}\n    chart_meta:\n      description: Antivirus virus detections by protocol\n      family: 'Security/Antivirus/Detected/Protocol'\n      unit: \"{virus}/s\"\n      type: stacked\n\n  - name: fgAvVirusBlockedByProtocol\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgAvHTTPVirusBlocked, table: fgAvStatsTable, as: http}\n      - {metric: _fgAvSMTPVirusBlocked, table: fgAvStatsTable, as: smtp}\n      - {metric: _fgAvPOP3VirusBlocked, table: fgAvStatsTable, as: pop3}\n      - {metric: _fgAvIMAPVirusBlocked, table: fgAvStatsTable, as: imap}\n      - {metric: _fgAvFTPVirusBlocked, table: fgAvStatsTable, as: ftp}\n    chart_meta:\n      description: Antivirus virus blocks by protocol\n      family: 'Security/Antivirus/Blocked/Protocol'\n      unit: \"{virus}/s\"\n      type: stacked\n\n  ### Webfilter — grouped by related dimensions\n  - name: fgWfSessionBlocked\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgWfHTTPBlocked, table: fgWebfilterStatsTable, as: http}\n      - {metric: _fgWfHTTPSBlocked, table: fgWebfilterStatsTable, as: https}\n    chart_meta:\n      description: Web filter sessions blocked by protocol\n      family: 'Security/Webfilter/Session/Blocked'\n      unit: \"{session}/s\"\n\n  - name: fgWfURLBlocked\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgWfHTTPURLBlocked, table: fgWebfilterStatsTable, as: http}\n      - {metric: _fgWfHTTPSURLBlocked, table: fgWebfilterStatsTable, as: https}\n    chart_meta:\n      description: Web filter URLs blocked by protocol\n      family: 'Security/Webfilter/URL/Blocked'\n      unit: \"{url}/s\"\n\n  - name: fgWfContentBlocked\n    per_row: true\n    group_by: [\"vdom_index\"]\n    sources:\n      - {metric: _fgWfActiveXBlocked, table: fgWebfilterStatsTable, as: activex}\n      - {metric: _fgWfCookieBlocked, table: fgWebfilterStatsTable, as: cookie}\n      - {metric: _fgWfAppletBlocked, table: fgWebfilterStatsTable, as: applet}\n    chart_meta:\n      description: Web filter content blocks by type\n      family: 'Security/Webfilter/Content/Blocked'\n      unit: \"{block}/s\"\n      type: stacked\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D080:35EBC:1779D5:5DA1B4:6AB92A2E"},"text_sha256":"29848d1452ffcfef8a044435eae4c3332cef5b9700eb4261ffdf65c8ac2bc0c1"},{"path":"src/go/plugin/go.d/config/go.d/snmp.profiles/default/ubiquiti-unifi-security-gateway.yaml","size":166,"blob_sha":"fc51a28ca6515104336328520c945c89cb1e8622","priority":1,"status":200,"text":"extends:\n  - _std-if-mib.yaml\n  - _std-ucd-mib.yaml\n  - _ubiquiti.yaml\n\nselector:\n  - sysobjectid:\n      include:\n        - 1.3.6.1.4.1.41112.1.5  # Ubiquiti EdgeMax\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"95D6:4F9CC:1701B6:5D2735:6AB92A2F"},"text_sha256":"bc094a2218b6e0d4920f11718eefa8c7eb0d22b575fc68524c0605c70997359c"},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/didactum-security-gmbh-formerly-didactum-ltd-deutschland.yaml","size":522,"blob_sha":"d35f2cd28e2ea14609e23e858be6a36edc35be2c","priority":1,"status":200,"text":"# SNMP trap profile - vendor: didactum-security-gmbh-formerly-didactum-ltd-deutschland\n# Generated by snmptrapprofilegen. Do not edit by hand;\n# operator overrides belong in /etc/netdata/go.d/snmp.trap-profiles/.\nvendor: didactum-security-gmbh-formerly-didactum-ltd-deutschland\nmib_count: 1\ntrap_count: 1\ntraps:\n  - oid: 1.3.6.1.4.1.46501.1.5\n    name: DIDACTUM-SYSTEM-MIB::ctlUnitTrapNotification\n    category: unknown\n    severity: notice\n    description: Didactum EMS trap received on {{hostname}}.\n    status: current\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6F04:3D40A:171C5C:5D443E:6AB92A2F"},"text_sha256":"5d9471a6b30ff005f870f5d068aa66fa1e77057fc313f6a9b81a70778949dc0f"},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/innominate-security-technologies-ag.yaml","size":10836,"blob_sha":"127c8d4c2192b5826ec565f41fe03307ac160c1d","priority":1,"status":200,"text":"# SNMP trap profile - vendor: innominate-security-technologies-ag\n# Generated by snmptrapprofilegen. Do not edit by hand;\n# operator overrides belong in /etc/netdata/go.d/snmp.trap-profiles/.\nvendor: innominate-security-technologies-ag\nmib_count: 1\ntrap_count: 22\nvarbinds:\n  mGuardDHCPLastAccessMAC:\n    oid: 1.3.6.1.4.1.15450.2.10.3\n    type: MacAddress\n    constraints: SIZE(6)\n  mGuardHTTPSLastAccessIP:\n    oid: 1.3.6.1.4.1.15450.2.10.1\n    type: IpAddress\n    constraints: SIZE(4)\n  mGuardPSState:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.1.2.1.3\n    type: INTEGER\n    enum:\n      \"1\": ok\n      \"2\": failed\n      \"3\": notInstalled\n      \"4\": unknown\n  mGuardRouterRedundancyState:\n    oid: 1.3.6.1.4.1.15450.2.9.2.14\n    type: INTEGER\n    enum:\n      \"1\": backup\n      \"2\": master\n      \"3\": fault\n      \"4\": disabled\n  mGuardShellLastAccessIP:\n    oid: 1.3.6.1.4.1.15450.2.10.2\n    type: IpAddress\n    constraints: SIZE(4)\n  mGuardSystemTemperature:\n    oid: 1.3.6.1.4.1.15450.2.4.5.6\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResAutoConfigAdapterState:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.4\n    type: INTEGER\n    enum:\n      \"1\": notPresent\n      \"2\": removed\n      \"3\": ok\n      \"4\": notInSync\n      \"5\": outOfMemory\n      \"6\": wrongMachine\n      \"7\": checksumErr\n      \"8\": genericErr\n  mGuardTResAvFailed:\n    oid: 1.3.6.1.4.1.15450.2.10.4.6.5\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResAvFileNotScanned:\n    oid: 1.3.6.1.4.1.15450.2.10.4.6.4\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResAvUpdateDone:\n    oid: 1.3.6.1.4.1.15450.2.10.4.6.1\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResAvUpdateError:\n    oid: 1.3.6.1.4.1.15450.2.10.4.6.2\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResAvVirusDetected:\n    oid: 1.3.6.1.4.1.15450.2.10.4.6.3\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResBladeCtrlCfgBackup:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.5.1\n    type: INTEGER\n    enum:\n      \"3\": downloaded\n  mGuardTResBladeCtrlCfgRestored:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.5.2\n    type: INTEGER\n    enum:\n      \"1\": automatic\n      \"2\": manual\n  mGuardTResBladeCtrlPowerStatus:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.2\n    type: INTEGER\n    enum:\n      \"1\": absent\n      \"2\": present\n      \"3\": online\n  mGuardTResBladeCtrlRunStatus:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.3\n    type: INTEGER\n    enum:\n      \"1\": absent\n      \"2\": present\n      \"3\": online\n  mGuardTResBladeRackID:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.1.1\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResBladeSlotNr:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.2.1.2\n    type: INTEGER\n  mGuardTResColdstart:\n    oid: 1.3.6.1.4.1.15450.2.10.4.4\n    type: INTEGER\n  mGuardTResCpuLoadHigh:\n    oid: 1.3.6.1.4.1.15450.2.10.4.2\n    type: INTEGER\n  mGuardTResDiscFull:\n    oid: 1.3.6.1.4.1.15450.2.10.4.1\n    type: INTEGER\n    enum:\n      \"1\": free\n      \"2\": tight\n      \"3\": full\n  mGuardTResIndustrialTempHiLimit:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.2.2\n    type: INTEGER\n  mGuardTResIndustrialTempLowLimit:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.2.3\n    type: INTEGER\n  mGuardTResMemoryFull:\n    oid: 1.3.6.1.4.1.15450.2.10.4.3\n    type: INTEGER\n  mGuardTResRedundacyBackupDown:\n    oid: 1.3.6.1.4.1.15450.2.10.4.8.2\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResRedundacyReason:\n    oid: 1.3.6.1.4.1.15450.2.10.4.8.1\n    type: DisplayString\n    constraints: SIZE(0..255)\n  mGuardTResSignalRelaisReason:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.3.2\n    type: OBJECT IDENTIFIER\n  mGuardTResSignalRelaisReasonIdx:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.3.3\n    type: INTEGER\n  mGuardTResSignalRelaisState:\n    oid: 1.3.6.1.4.1.15450.2.10.4.7.1.3.1\n    type: INTEGER\ntraps:\n  - oid: 1.3.6.1.4.1.15450.2.0.1\n    name: MGUARDB-MIB::mGuardHTTPSLoginTrap\n    category: auth\n    severity: warning\n    description: HTTPS authentication failure from {{value \"mGuardHTTPSLastAccessIP\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardHTTPSLastAccessIP\n  - oid: 1.3.6.1.4.1.15450.2.0.2\n    name: MGUARDB-MIB::mGuardShellLoginTrap\n    category: auth\n    severity: notice\n    description: Shell access opened via {{first (value \"mGuardShellLastAccessIP\") \"serial console\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardShellLastAccessIP\n  - oid: 1.3.6.1.4.1.15450.2.0.3\n    name: MGUARDB-MIB::mGuardDHCPNewClientTrap\n    category: security\n    severity: warning\n    description: DHCP request from unknown client {{value \"mGuardDHCPLastAccessMAC\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardDHCPLastAccessMAC\n  - oid: 1.3.6.1.4.1.15450.2.10.5.0.1\n    name: MGUARDB-MIB::mGuardTrapDiscFull\n    category: diagnostic\n    severity: warning\n    description: File system free space is critically low with status {{value \"mGuardTResDiscFull\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResDiscFull\n  - oid: 1.3.6.1.4.1.15450.2.10.5.0.2\n    name: MGUARDB-MIB::mGuardTrapCpuLoadHigh\n    category: diagnostic\n    severity: warning\n    description: CPU load exceeded threshold at {{value \"mGuardTResCpuLoadHigh\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResCpuLoadHigh\n  - oid: 1.3.6.1.4.1.15450.2.10.5.0.3\n    name: MGUARDB-MIB::mGuardTrapMemoryFull\n    category: diagnostic\n    severity: warning\n    description: Free memory is low ({{value \"mGuardTResMemoryFull\"}} KiB) on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResMemoryFull\n  - oid: 1.3.6.1.4.1.15450.2.10.5.0.4\n    name: MGUARDB-MIB::mGuardTrapColdstart\n    category: state_change\n    severity: notice\n    description: System rebooted and SNMP daemon started on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResColdstart\n  - oid: 1.3.6.1.4.1.15450.2.10.6.0.1\n    name: MGUARDB-MIB::mGuardTrapAvUpdateDone\n    category: diagnostic\n    severity: info\n    description: AV update completed successfully on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResAvUpdateDone\n  - oid: 1.3.6.1.4.1.15450.2.10.6.0.2\n    name: MGUARDB-MIB::mGuardTrapAvUpdateError\n    category: diagnostic\n    severity: warning\n    description: Antivirus update error {{value \"mGuardTResAvUpdateError\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResAvUpdateError\n  - oid: 1.3.6.1.4.1.15450.2.10.6.0.3\n    name: MGUARDB-MIB::mGuardTrapAvVirusDetected\n    category: security\n    severity: alert\n    description: 'Antivirus detected a virus: {{value \"mGuardTResAvVirusDetected\"}} on {{hostname}}.'\n    status: current\n    varbinds:\n      - mGuardTResAvVirusDetected\n  - oid: 1.3.6.1.4.1.15450.2.10.6.0.4\n    name: MGUARDB-MIB::mGuardTrapAvFileNotScanned\n    category: diagnostic\n    severity: warning\n    description: File {{value \"mGuardTResAvFileNotScanned\"}} was not scanned for viruses on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResAvFileNotScanned\n  - oid: 1.3.6.1.4.1.15450.2.10.6.0.5\n    name: MGUARDB-MIB::mGuardTrapAvFailed\n    category: diagnostic\n    severity: warning\n    description: 'General AV failure detected{{with value \"mGuardTResAvFailed\"}}: {{.}}{{end}} on {{hostname}}.'\n    status: current\n    varbinds:\n      - mGuardTResAvFailed\n  - oid: 1.3.6.1.4.1.15450.2.10.7.1.0.1\n    name: MGUARDB-MIB::mGuardTrapIndustrialTemperature\n    category: diagnostic\n    severity: warning\n    description: System temperature {{value \"mGuardSystemTemperature\"}} exceeded limits on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardSystemTemperature\n      - mGuardTResIndustrialTempHiLimit\n      - mGuardTResIndustrialTempLowLimit\n  - oid: 1.3.6.1.4.1.15450.2.10.7.1.0.2\n    name: MGUARDB-MIB::mGuardTrapIndustrialPowerStatus\n    category: diagnostic\n    severity: alert\n    description: Power supply failure detected with state {{value \"mGuardPSState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardPSState\n  - oid: 1.3.6.1.4.1.15450.2.10.7.1.0.3\n    name: MGUARDB-MIB::mGuardTrapSignalRelais\n    category: state_change\n    severity: notice\n    description: Signal relay state changed to {{value \"mGuardTResSignalRelaisState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResSignalRelaisState\n      - mGuardTResSignalRelaisReason\n      - mGuardTResSignalRelaisReasonIdx\n  - oid: 1.3.6.1.4.1.15450.2.10.7.1.0.4\n    name: MGUARDB-MIB::mGuardTrapAutoConfigAdapterState\n    category: config_change\n    severity: notice\n    description: Auto-config adapter state changed to {{value \"mGuardTResAutoConfigAdapterState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResAutoConfigAdapterState\n  - oid: 1.3.6.1.4.1.15450.2.10.7.2.0.2\n    name: MGUARDB-MIB::mGuardTrapBladeCtrlPowerStatus\n    category: diagnostic\n    severity: warning\n    description: BladePack power supply status changed to {{value \"mGuardTResBladeCtrlPowerStatus\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResBladeRackID\n      - mGuardTResBladeSlotNr\n      - mGuardTResBladeCtrlPowerStatus\n  - oid: 1.3.6.1.4.1.15450.2.10.7.2.0.3\n    name: MGUARDB-MIB::mGuardTrapBladeCtrlRunStatus\n    category: state_change\n    severity: warning\n    description: Blade run status changed to {{value \"mGuardTResBladeCtrlRunStatus\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResBladeRackID\n      - mGuardTResBladeSlotNr\n      - mGuardTResBladeCtrlRunStatus\n  - oid: 1.3.6.1.4.1.15450.2.10.7.2.5.0.1\n    name: MGUARDB-MIB::mGuardTrapBladeCtrlCfgBackup\n    category: config_change\n    severity: notice\n    description: Configuration backup to Blade CTRL triggered on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResBladeRackID\n      - mGuardTResBladeSlotNr\n      - mGuardTResBladeCtrlCfgBackup\n  - oid: 1.3.6.1.4.1.15450.2.10.7.2.5.0.2\n    name: MGUARDB-MIB::mGuardTrapBladeCtrlCfgRestored\n    category: config_change\n    severity: notice\n    description: Configuration restore from Blade CTRL triggered on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResBladeRackID\n      - mGuardTResBladeSlotNr\n      - mGuardTResBladeCtrlCfgRestored\n  - oid: 1.3.6.1.4.1.15450.2.10.8.0.1\n    name: MGUARDB-MIB::mGuardTrapRouterRedundancyStatusChange\n    category: state_change\n    severity: notice\n    description: HA cluster redundancy state changed to {{value \"mGuardRouterRedundancyState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardRouterRedundancyState\n      - mGuardTResRedundacyReason\n  - oid: 1.3.6.1.4.1.15450.2.10.8.0.2\n    name: MGUARDB-MIB::mGuardTrapRouterRedundancyBackupDown\n    category: state_change\n    severity: crit\n    description: Redundancy backup device is unreachable on {{hostname}}.\n    status: current\n    varbinds:\n      - mGuardTResRedundacyBackupDown\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E7D6:3FD49:177719:5D9F91:6AB92A29"},"text_sha256":"676392bd85a77aa419c3e26b2e446e84c18ba4d2a38e1ffccb095abca6603988"},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/securitymatrix-inc.yaml","size":1007,"blob_sha":"3f05b001516dff50874e7e82b94664610a69a742","priority":1,"status":200,"text":"# SNMP trap profile - vendor: securitymatrix-inc\n# Generated by snmptrapprofilegen. Do not edit by hand;\n# operator overrides belong in /etc/netdata/go.d/snmp.trap-profiles/.\nvendor: securitymatrix-inc\nmib_count: 1\ntrap_count: 1\nvarbinds:\n  airCommandEventCount:\n    oid: 1.3.6.1.4.1.13416.1.1.1.1.4\n    type: INTEGER\n  airCommandEventDescriptor:\n    oid: 1.3.6.1.4.1.13416.1.1.1.1.3\n    type: OCTET STRING\n    constraints: SIZE(0..1024)\n  airCommandEventPriority:\n    oid: 1.3.6.1.4.1.13416.1.1.1.1.2\n    type: INTEGER\n    enum:\n      \"1\": critical\n      \"2\": major\n      \"3\": minor\n      \"4\": low\ntraps:\n  - oid: 1.3.6.1.4.1.13416.1.1.2\n    name: AirDefense-airCommand-MIB::airCommandAlarm\n    category: diagnostic\n    severity: warning\n    description: AirCommand alarm {{value \"airCommandEventDescriptor\"}} with priority {{value \"airCommandEventPriority\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - airCommandEventPriority\n      - airCommandEventDescriptor\n      - airCommandEventCount\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B860:3CC8A:17C770:5DEFE3:6AB92A30"},"text_sha256":"7181bcb879269a17f2e6675246cb0f04d49279a9424b9526dfd6be04d94a66dc"},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/skyhigh-security-llc.yaml","size":2269,"blob_sha":"45355abfc66d2d0eb3d6c5df94722e6822d24a11","priority":1,"status":200,"text":"# SNMP trap profile - vendor: skyhigh-security-llc\n# Generated by snmptrapprofilegen. Do not edit by hand;\n# operator overrides belong in /etc/netdata/go.d/snmp.trap-profiles/.\nvendor: skyhigh-security-llc\nmib_count: 1\ntrap_count: 3\nvarbinds:\n  notifyAdditional:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.7\n    type: OCTET STRING\n  notifyAffectedHost:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.6\n    type: IpAddress\n    constraints: SIZE(4)\n  notifyOrigin:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.1\n    type: Integer32\n    constraints: (-2147483648..2147483647)\n  notifyOriginName:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.2\n    type: OCTET STRING\n  notifyReason:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.4\n    type: Integer32\n    constraints: (-2147483648..2147483647)\n  notifyReasonString:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.5\n    type: OCTET STRING\n  notifySeverity:\n    oid: 1.3.6.1.4.1.59732.2.7.4.10.3\n    type: INTEGER\n    enum:\n      \"0\": emergency\n      \"1\": alert\n      \"2\": critical\n      \"3\": error\n      \"4\": warning\n      \"5\": notice\n      \"6\": info\n      \"7\": debug\ntraps:\n  - oid: 1.3.6.1.4.1.59732.2.7.4.1\n    name: SKYHIGHSECURITY-SWG-MIB::trSystem\n    category: diagnostic\n    severity: warning\n    description: System event {{value \"notifyReasonString\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - notifyOrigin\n      - notifyOriginName\n      - notifySeverity\n      - notifyReason\n      - notifyReasonString\n      - notifyAffectedHost\n      - notifyAdditional\n  - oid: 1.3.6.1.4.1.59732.2.7.4.2\n    name: SKYHIGHSECURITY-SWG-MIB::trApplication\n    category: diagnostic\n    severity: warning\n    description: Application system event {{value \"notifyReasonString\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - notifyOrigin\n      - notifyOriginName\n      - notifySeverity\n      - notifyReason\n      - notifyReasonString\n      - notifyAffectedHost\n      - notifyAdditional\n  - oid: 1.3.6.1.4.1.59732.2.7.4.3\n    name: SKYHIGHSECURITY-SWG-MIB::trUser\n    category: security\n    severity: notice\n    description: Security event {{value \"notifyReasonString\"}} for host {{value \"notifyAffectedHost\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - notifyReason\n      - notifyReasonString\n      - notifyAffectedHost\n      - notifyAdditional\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96DA:18233:1797E2:5DBEEA:6AB92A2F"},"text_sha256":"da28205311e76eb22a805bbd940b7e9e81b71190f04c8f4f7b001a45bacd13c3"},{"path":"src/go/plugin/go.d/config/go.d/snmp.trap-profiles/default/thales-e-security.yaml","size":7867,"blob_sha":"ff926fa8000a8fe76befcf156c4983ba59cecf32","priority":1,"status":200,"text":"# SNMP trap profile - vendor: thales-e-security\n# Generated by snmptrapprofilegen. Do not edit by hand;\n# operator overrides belong in /etc/netdata/go.d/snmp.trap-profiles/.\nvendor: thales-e-security\nmib_count: 1\ntrap_count: 15\nvarbinds:\n  payShieldAlarmEraseTimeandDate:\n    oid: 1.3.6.1.4.1.4096.999.2.1.8.1\n    type: DateAndTime\n    constraints: SIZE(8)\n  payShieldBadDataPhysicalPort:\n    oid: 1.3.6.1.4.1.4096.999.2.1.3.1\n    type: INTEGER\n    enum:\n      \"1\": portHost1\n      \"2\": portHost2\n      \"3\": portFICON\n  payShieldBadDataProtocol:\n    oid: 1.3.6.1.4.1.4096.999.2.1.3.2\n    type: INTEGER\n    enum:\n      \"1\": protocolTCP\n      \"2\": protocolUDP\n      \"3\": protocolFICON\n  payShieldBatteryState:\n    oid: 1.3.6.1.4.1.4096.999.2.1.5.1\n    type: INTEGER\n    enum:\n      \"1\": stateOK\n      \"2\": stateWarning\n      \"3\": stateFailure\n  payShieldDeviceState:\n    oid: 1.3.6.1.4.1.4096.999.2.1.10.1\n    type: INTEGER\n    enum:\n      \"1\": stateUnavailable\n      \"2\": stateOnline\n      \"3\": stateOffline\n      \"4\": stateSecure\n  payShieldDiagnosticID:\n    oid: 1.3.6.1.4.1.4096.999.2.1.6.1\n    type: INTEGER\n    enum:\n      \"1\": diagDES\n      \"2\": diagAES\n      \"3\": diagECDSA\n      \"4\": diagHMAC\n      \"5\": diagMD5\n      \"6\": diagSHA\n      \"7\": diagRSA\n      \"8\": diagRNG\n      \"9\": diagRTC\n      \"10\": diagMemory\n      \"11\": diagPower\n      \"12\": diagBattery\n      \"13\": diagFans\n      \"14\": diagTemperature\n      \"15\": diagVoltage\n      \"16\": diagUDP\n      \"17\": diagTCP\n      \"18\": diagFICON\n  payShieldDiagnosticString:\n    oid: 1.3.6.1.4.1.4096.999.2.1.6.2\n    type: DisplayString\n    constraints: SIZE(0..255)\n  payShieldErrorLogData:\n    oid: 1.3.6.1.4.1.4096.999.2.1.4.1\n    type: DisplayString\n    constraints: SIZE(0..255)\n  payShieldFanNumber:\n    oid: 1.3.6.1.4.1.4096.999.2.1.1.1\n    type: INTEGER\n    enum:\n      \"1\": fan1\n      \"2\": fan2\n  payShieldFanState:\n    oid: 1.3.6.1.4.1.4096.999.2.1.1.2\n    type: INTEGER\n    enum:\n      \"1\": stateOK\n      \"2\": stateFailure\n      \"3\": stateNotDetected\n  payShieldFraudType:\n    oid: 1.3.6.1.4.1.4096.999.2.1.7.1\n    type: INTEGER\n    enum:\n      \"1\": fraudExceededFailuresPerMinute\n      \"2\": fraudExceededFailuresPerHour\n      \"3\": fraudExceededAttackLimit\n  payShieldModifiedSetting:\n    oid: 1.3.6.1.4.1.4096.999.2.1.9.1\n    type: INTEGER\n    enum:\n      \"1\": settingSecurity\n      \"2\": settingPCI\n      \"3\": settingAuditedItems\n      \"4\": settingEnabledPinblocks\n  payShieldPSUNumber:\n    oid: 1.3.6.1.4.1.4096.999.2.1.2.1\n    type: INTEGER\n    enum:\n      \"1\": psu1\n      \"2\": psu2\n  payShieldPSUState:\n    oid: 1.3.6.1.4.1.4096.999.2.1.2.2\n    type: INTEGER\n    enum:\n      \"1\": stateOK\n      \"2\": stateFailure\n      \"3\": stateNotDetected\n  payShieldTamperCause:\n    oid: 1.3.6.1.4.1.4096.999.2.1.11.1\n    type: INTEGER\n    enum:\n      \"1\": causeUnavailable\n      \"2\": causeTemperatureOutOfRange\n      \"3\": causeBatteryLow\n      \"4\": causeEraseButtonPressed\n      \"5\": causeSensorProcessorWatchdog\n      \"6\": causeSensorProcessorRestart\n      \"7\": causeVoltageOutOfRange\n      \"8\": causeMotionDetected\n      \"9\": causeCaseTampered\n      \"10\": causePowerLoss\n  payShieldTamperDate:\n    oid: 1.3.6.1.4.1.4096.999.2.1.11.2\n    type: DateAndTime\n    constraints: SIZE(8|11)\ntraps:\n  - oid: 1.3.6.1.4.1.4096.999.2.2.1\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldPowerOnAlarm\n    category: diagnostic\n    severity: notice\n    description: PayShield unit has been powered up on {{hostname}}.\n    status: current\n  - oid: 1.3.6.1.4.1.4096.999.2.2.2\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldRestartAlarm\n    category: diagnostic\n    severity: notice\n    description: PayShield hardware reset alarm triggered on {{hostname}}.\n    status: deprecated\n  - oid: 1.3.6.1.4.1.4096.999.2.2.3\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldEraseAlarm\n    category: security\n    severity: alert\n    description: Erase button pressed on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldAlarmEraseTimeandDate\n  - oid: 1.3.6.1.4.1.4096.999.2.2.4\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldNewLicenseAlarm\n    category: license\n    severity: notice\n    description: New license installed on {{hostname}}.\n    status: current\n  - oid: 1.3.6.1.4.1.4096.999.2.2.5\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldNewSoftwareAlarm\n    category: config_change\n    severity: notice\n    description: New software installed on {{hostname}}.\n    status: current\n  - oid: 1.3.6.1.4.1.4096.999.2.2.6\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldPSUAlarm\n    category: diagnostic\n    severity: warning\n    description: Power supply unit {{value \"payShieldPSUNumber\"}} state changed to {{value \"payShieldPSUState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldPSUNumber\n      - payShieldPSUState\n  - oid: 1.3.6.1.4.1.4096.999.2.2.7\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldBatteryAlarm\n    category: diagnostic\n    severity: warning\n    description: PayShield battery state changed to {{value \"payShieldBatteryState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldBatteryState\n  - oid: 1.3.6.1.4.1.4096.999.2.2.8\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldFanAlarm\n    category: diagnostic\n    severity: warning\n    description: Fan {{value \"payShieldFanNumber\"}} alarm state changed to {{value \"payShieldFanState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldFanNumber\n      - payShieldFanState\n  - oid: 1.3.6.1.4.1.4096.999.2.2.9\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldTamperAlarm\n    category: security\n    severity: alert\n    description: Tamper detected on hardware{{with value \"payShieldTamperCause\"}} cause {{.}}{{end}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldTamperCause\n      - payShieldTamperDate\n  - oid: 1.3.6.1.4.1.4096.999.2.2.10\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldHostPortBadDataAlarm\n    category: security\n    severity: warning\n    description: Protocol breaking data detected on port {{value \"payShieldBadDataPhysicalPort\"}} using {{value \"payShieldBadDataProtocol\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldBadDataPhysicalPort\n      - payShieldBadDataProtocol\n  - oid: 1.3.6.1.4.1.4096.999.2.2.11\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldFraudAlarm\n    category: security\n    severity: alert\n    description: Fraud limit exceeded (type {{value \"payShieldFraudType\"}}) on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldFraudType\n  - oid: 1.3.6.1.4.1.4096.999.2.2.12\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldDiagnosticTestFailureAlarm\n    category: diagnostic\n    severity: crit\n    description: Diagnostic test {{value \"payShieldDiagnosticString\"}} failed on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldDiagnosticID\n      - payShieldDiagnosticString\n  - oid: 1.3.6.1.4.1.4096.999.2.2.13\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldErrorlogAlarm\n    category: diagnostic\n    severity: warning\n    description: 'PayShield error log entry received{{with value \"payShieldErrorLogData\"}}: {{.}}{{end}} on {{hostname}}.'\n    status: current\n    varbinds:\n      - payShieldErrorLogData\n  - oid: 1.3.6.1.4.1.4096.999.2.2.14\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldSettingsModifiedAlarm\n    category: config_change\n    severity: notice\n    description: payShield setting {{value \"payShieldModifiedSetting\"}} was modified on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldModifiedSetting\n  - oid: 1.3.6.1.4.1.4096.999.2.2.15\n    name: THALES-ESECURITY-PAYSHIELD-MIB::payShieldDeviceStateAlarm\n    category: diagnostic\n    severity: warning\n    description: PayShield device state changed to {{value \"payShieldDeviceState\"}} on {{hostname}}.\n    status: current\n    varbinds:\n      - payShieldDeviceState\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AC06:1A3D83:185938:5E81F9:6AB92A2F"},"text_sha256":"18f374e43bf4d8e3aaf838633f9aaa43e7f274a505253847af8ff71eb8fd88c1"},{"path":"docs/security-and-privacy-design/netdata-kubernetes.md","size":34867,"blob_sha":"4738036f8ad3220f2ca703c938a187d6278eabcc","priority":2,"status":200,"text":"# Netdata Container Security Considerations\n\nNetdata provides powerful, real-time performance monitoring and health visibility, offering deep insights essential for managing modern infrastructure, particularly dynamic containerized environments like Kubernetes. Its high-granularity metrics and comprehensive system overview help teams troubleshoot issues quickly and optimize performance effectively.\n\nTo deliver observability that extends beyond the agent's own container to encompass the entire host system and other running containers, the Netdata agent ('child' pods in a typical Kubernetes deployment) requires specific access to host resources. This access typically involves mounting certain host paths (usually read-only), utilizing host namespaces (like the PID and Network namespaces), and leveraging specific Linux capabilities (such as `SYS_PTRACE` or `SYS_ADMIN` for certain advanced features).\n\nGranting such permissions inherently involves security considerations. This document aims to provide transparency regarding the permissions Netdata might request for full functionality. We will detail these permissions, explain the rationale behind them, and discuss Netdata's security design features – including its privilege separation model and constrained network architecture – which are intended to mitigate potential risks.\n\nThe goal is to enable organizations to tailor their Netdata deployment, striking an appropriate balance between achieving deep, actionable observability and adhering to their specific security policies and risk tolerance. Understanding these configurations and their trade-offs is key to deploying Netdata effectively and securely within your containerized environment.\n\n## Security Architecture: The Privilege Separation Model\n\nNetdata is architected with security as a core consideration, employing a robust privilege separation model designed to minimize attack surfaces and isolate operations that require elevated permissions. This model applies both to the overall deployment architecture and the internal workings of the Netdata agent itself.\n\n### Parent / Child Deployment Architecture\n\nIn typical Kubernetes deployments, Netdata utilizes a hierarchical structure with two main roles:\n\n- **`Parent` Pods:** These act as central aggregation points. They receive data streams from multiple child pods. Crucially, `Parent` pods are designed to run as **completely unprivileged containers**. They do not require access to host paths, host namespaces, or any special Linux capabilities. Their primary role is data aggregation, storage, and exposing Netdata's API and dashboard or connecting to Netdata Cloud for servicing the dashboard.\n- **`Child` Pods (Agents):** A `child` pod runs as a DaemonSet on each monitored node. Its responsibility is to collect detailed metrics, query logs, and other information directly from the node it resides on. To achieve comprehensive host and container monitoring, the `child` pod is the component that may require specific host resource access (mounts, namespaces) and potentially elevated Linux capabilities.\n\nThis architecture ensures that the components responsible for broader network exposure and data storage (Parents) run with minimal privileges, while the necessary host access is confined to the node-local `child` agents.\n\n### Internal Privilege Separation within `Child` Agents\n\nEven within the `child` agent container, which might be granted elevated permissions by Kubernetes (e.g., host mounts, capabilities), Netdata enforces strict internal privilege separation:\n\n- **Unprivileged Core Daemon:** The main `netdata` daemon process, which orchestrates data collection, communicates with the parent, and handles basic tasks, runs as a **non-root user** (typically the `netdata` user). Key internal plugins responsible for collecting core metrics, such as `proc.plugin` (for `/proc` based metrics) and `cgroups.plugin` (for container metrics via `/sys/fs/cgroup`), also run as threads within this unprivileged daemon process.\n- **Dedicated Privileged Helpers/Plugins:** Operations that require elevated privileges or specific capabilities to access protected host resources (e.g., detailed process information via `apps.plugin`, certain network operations via `network-viewer.plugin` or `cgroup-network`, logs querying via `systemd-journal.plugin`) are delegated to **dedicated external plugins or helper processes**.\n- **Isolation via `setuid`:** These external plugins/helpers run as separate, isolated processes spawned by the main daemon. Within the container, the specific helper executables requiring elevated rights are configured with the **`setuid` root** permission bit. This standard Linux mechanism allows only these designated programs to execute specific, pre-defined tasks with root privileges _within the container's environment_.\n- **Contained Capabilities:** Consequently, even if the _container_ is granted capabilities like `SYS_ADMIN` or `SYS_PTRACE`, the unprivileged main `netdata` daemon and its non-`setuid` plugins **cannot** directly utilize these capabilities. Only the specific `setuid` root helpers designed for tasks needing those privileges can effectively leverage them.\n- **Narrowly Scoped Tasks:** Each privileged helper is designed to perform a narrow, hard-coded task – typically reading specific system information and passing it back to the main daemon.\n- **Text-Based Communication:** Communication between the main daemon and its external plugins occurs over a simple, text-based protocol, further reducing the risk associated with potentially malicious binary data exchange.\n\n### Security Benefit\n\nThis multi-layered privilege separation model significantly minimizes the attack surface. The vast majority of the Netdata agent's code, including the core daemon and primary metric collectors, runs without root privileges. Elevated permissions are isolated to specific, purpose-built helper processes with limited scope. This design helps contain the risk even when the Netdata `child` container requires privileged access to the host system for comprehensive monitoring. Compromising the main unprivileged daemon does not automatically grant an attacker root access or the ability to use the container's granted capabilities.\n\n## Network Exposure and Access Control\n\nBeyond internal process separation within the agent, Netdata's deployment architecture incorporates several features designed to limit network exposure and manage data access securely, particularly in the recommended parent/child configuration.\n\n### Child Agent Network Limitations\n\nNetdata `child` agents (running on each monitored node) are designed with minimal required network interaction to reduce their direct attack surface:\n\n- **Outbound-Only to Parent:** Their primary network function is to stream collected data **outbound** exclusively to their designated `parent` pod(s) within the cluster. This connection can be further secured using transport layer security (TLS) and optional mutual TLS (mTLS) for certificate-based authentication between child and parent.\n- **Restricted Inbound Connections:** By default, standard configurations (like the official Helm chart) configure `child` agents to listen **only on the localhost interface (127.0.0.1)**. This prevents them from accepting incoming network connections from other pods, nodes, or external sources.\n- **No Direct Cloud Connectivity Needed:** `Child` agents **do not require** direct internet connectivity to the Netdata Cloud service. All communication is proxied through the parent(s).\n\n### Parent Agent Role and Centralized Access via Netdata Cloud\n\n`Parent` pods act as the aggregation points and data access gateways:\n\n- **Central Aggregation:** They receive data streams from multiple child agents.\n- **Optional Direct Access:** Parents expose the Netdata API and dashboard. While direct access is possible, it requires careful network policy configuration within the cluster.\n- **Recommended Cloud Integration:** The typical and recommended approach, especially for managing multiple nodes or clusters, involves securely connecting the `parent` pods **outbound** to Netdata Cloud.\n- **Centralized RBAC via Cloud:** Netdata Cloud serves as the primary user interface and provides essential access control mechanisms. This includes **Role-Based Access Control (RBAC)**, allowing administrators to:\n    - Manage users and team memberships.\n    - Segment the infrastructure into \"rooms\" (by service, component type, location, etc)\n    - Assign roles with differing permission levels.\n    - Associate users with infrastructure, by granting users access to specific \"rooms\".\n\n### Security Benefits\n\nThis layered network architecture significantly enhances security:\n\n- It drastically limits the direct network exposure of the potentially privileged `child` agents.\n- It centralizes data egress and user access points at the `parent` level.\n- It leverages Netdata Cloud for robust, centralized authentication and Role-Based Access Control, moving access management off the individual nodes.\n- It supports encrypted and mutually authenticated communication channels between agents and parents.\n\n## Permissions for Complete Host and Container Monitoring\n\nThe following sections describe all the possible mounts, capabilities and host namespaces Netdata children may use:\n\n### Container Mounts\n\nMounting specific host directories into the Netdata container provides essential data access for various collection plugins.\n\n|             Mount              |   Type   |        Role        |        Component         | Why                                                                                                                                                                           |\n|:------------------------------:|:--------:|:------------------:|:------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n|              `/`               | hostPath |       child        |    `diskspace.plugin`    | Detect host mount points (only in Docker deployments, not in Kubernetes deployments).                                                                                         |\n|       `/etc/os-release`        | hostPath |       child        |        `netdata`         | Collect host labels.                                                                                                                                                          |\n| `/etc/passwd`<br/>`/etc/group` | hostPath |       child        |      `apps.plugin`       | Resolve numeric users and groups to names.                                                                                                                                    |\n| `/etc/passwd`<br/>`/etc/group` | hostPath |       child        | `network-viewer.plugin`  | Resolve numeric users and groups to names.                                                                                                                                    |\n|            `/proc`             | hostPath |       child        |      `proc.plugin`       | Monitor host system resources (CPU, Memory, Network, uptime, etc).                                                                                                            |\n|            `/proc`             | hostPath |       child        |      `apps.plugin`       | Monitor all running processes.                                                                                                                                                |\n|            `/proc`             | hostPath |       child        |     `cgroups.plugin`     | Detect available memory to calculate container memory limits. Detect paused containers in k8s to improve discovery performance.                                               |\n|            `/proc`             | hostPath |       child        |     `cgroup-network`     | Discover container virtual network interfaces and associates them with running containers.                                                                                    |\n|            `/proc`             | hostPath |       child        | `network-viewer.plugin`  | Monitor all TCP/UDP sockets of running processes, including the ones outside containers, or inside sibling containers.                                                        |\n|            `/proc`             | hostPath | child<br/>k8sState |        `netdata`         | Collect system information and detect various system characteristics like number of CPU cores, total and available memory protection, and more.                               |\n|             `/sys`             | hostPath |       child        |     `cgroups.plugin`     | Monitor containers.                                                                                                                                                           |\n|             `/sys`             | hostPath | child<br/>k8sState |        `netdata`         | Detect `netdata` container limits. Detect host hardware (part of system info).                                                                                                |\n|             `/sys`             | hostPath |       child        |      `proc.plugin`       | Detect network interface types. Monitor software RAID block devices. Detect ZRAM, GPUs, Numa Nodes, Infiniband, BTRFS, PCI AEC, EDAC MC, KSM, BCACHE, CPU thermal throttling. |\n|             `/sys`             | hostPath |       child        |     `debugfs.plugin`     | Monitor hardware sensors, ZSWAP, Numa Memory Fragmentation, PowerCap.                                                                                                         |\n|           `/var/log`           | hostPath |       child        | `systemd-journal.plugin` | Enable the Logs pipeline of Netdata to process and query system logs.                                                                                                         |\n|      `/var/lib/netdata`*       | hostPath |       child        |        `netdata`         | Persist of Netdata's private data.                                                                                                                                            |\n\nNotes:\n\n- **Persistence Note:** The `/var/lib/netdata` host path mount (configurable via `{{ .Values.child.persistence.hostPath }}/var/lib/netdata` in Helm charts) is critical for maintaining node identity across restarts. This directory stores metadata, _not_ the time-series database, and is relatively small. Without this persistence, each pod restart registers as a new node.\n- **Read-Only Mounts**: All the mounts described above, except `/var/lib/netdata`, are mounted read-only.\n\n### Host Namespaces\n\nUtilizing host namespaces allows Netdata to observe network activity and processes as they appear on the host, rather than being confined to the container's isolated view.\n\n|       Namespace        | Role  |        Component        |      Type       | Why                                                                                                                                                                                                                                                                                                                                                                              |\n|:----------------------:|:-----:|:-----------------------:|:---------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Host Network Namespace | child |      `proc.plugin`      | Internal Plugin | Monitor host's networking stack (the IPv4 and IPv6 Networking Stack). <br/>`proc.plugin` runs unprivileged.<br/>&nbsp;<br/>Without this, Netdata will monitor the networking stack of the container it runs, not the one of the host.                                                                                                                                            |\n| Host Network Namespace | child |    `cgroup-network`     | External Helper | Used by `cgroups.plugin` to map virtual network interfaces to the containers they belong. The helper requires also special capabilities. <br/>`cgroups.plugin` runs unprivileged.<br/>&nbsp;<br/>Without this, Netdata will monitor only the network interfaces of the container it runs, not the network interfaces of its sibling containers (or the host).                    |\n| Host Network Namespace | child |    `local-listeners`    | External Helper | Used by `go.d.plugin` to discover applications running at the host (including sibling containers). It requires also special capabilities. <br/>`go.d.plugin` runs unprivileged.<br/>&nbsp;<br/>Without this, Netdata will not be able to auto-detect and monitor applications running at the host or its sibling containers. Kubernetes based service discovery is not affected. |\n| Host Network Namespace | child | `network-viewer.plugin` | External Plugin | Discover and continuously monitor the host's network connections (including the ones of sibling containers). It requires also special capabilities. <br/>`network-viewer.plugin` runs with escalated privileges.<br/>&nbsp;<br/>Without this, Netdata will monitor only the connections of the container it runs, not the connections of the host or its sibling containers.     |\n|   Host PID Namespace   | child |    `cgroup-network`     | External Helper | Used by `cgroups.plugin` to detect containers' network interfaces.<br/>`cgroups.plugin` runs unprivileged.<br/>&nbsp;<br/>Without this, Netdata will not be able to associate virtual network interfaces to the containers they belong.                                                                                                                                          |\n\n### Linux Capabilities\n\nSpecific Linux capabilities grant elevated privileges necessary for certain monitoring functions, particularly those involving process inspection and namespace manipulation.\n\n| Capability | Role  |        Component        |      Type       | Why                                                                                                                                                                                                                                                                 |\n|:----------:|:-----:|:-----------------------:|:---------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| SYS_ADMIN  | child |    `cgroup-network`     | External Helper | Used by `cgroups.plugin` to associate virtual network interfaces to the containers the belong.<br/>&nbsp;<br/>Without this, virtual network interfaces will not be associated to their respective containers, so they will be monitored as host network interfaces. |\n| SYS_ADMIN  | child | `network-viewer.plugin` | External Plugin | Discover containers' network connections (it does so by switching Network Namespaces).<br/>&nbsp;<br/>Without this, Netdata will not be able to associate Network connections with processes.                                                                       |\n| SYS_ADMIN  | child |    `local-listeners`    | External Helper | Helper used by `go.d.plugin` to discover listening applications running at the host.<br/>&nbsp;<br/>Without this, localhost service discovery (not the kubernetes one) will not work.                                                                               |\n| SYS_PTRACE | child |      `apps.plugin`      | External Plugin | Collect the I/O per running process at the host (including the ones in containers).<br/>&nbsp;<br/>Without this, processes will be monitored excluding their physical or logical disk I/O.                                                                          |\n| SYS_PTRACE | child |    `local-listeners`    | External Helper | Helper used by `go.d.plugin` to discover listening applications running at the host.<br/>&nbsp;<br/>Without this, localhost service discovery (not the kubernetes one) will be based only on port number, without the process name.                                 |\n| SYS_PTRACE | child | `network-viewer.plugin` | External Plugin | Discover host's network connections per application. Without it all host network connections will still be monitored, but Netdata will not be able to associate them with processes.                                                                                |\n\nIMPORTANT: All the plugins or helpers that utilize these capabilities are isolated from the rest of Netdata. This means that all the other plugins of Netdata and the main Netdata daemon cannot utilize these capabilities, even when the capabilities have been given to the whole container Netdata is installed.\n\n### Overview\n\nAn overview of the structure, related to permissions:\n\n1. The Netdata Child Agent and its internal plugins (`proc.plugin`, `diskspace.plugin`, `cgroups.plugin`) run unprivileged.\n2. External Plugins are requiring access to resources depending on their job.\n3. Helpers (`local-listeners`, `cgroup-network`) are command line tools that unprivileged plugins call to enrich the information they collect.\n\nNetdata allows configuring the available capabilities, namespaces and mounts, but also allows disabling specific plugins or features.\n\n```mermaid\nflowchart TB\n    classDef unprivileged fill:#9d9,stroke:#333,stroke-width:1px,color:#000\n    classDef privileged fill:#eec,stroke:#333,stroke-width:1px,color:#000\n    classDef parent fill:#99f,stroke:#333,stroke-width:1px,color:#000\n    classDef child fill:#4caf50,stroke:#333,stroke-width:1px,color:#000\n    classDef agentGroup fill:#eee,stroke:#333,stroke-width:1px\n    classDef helper fill:#dd8,stroke:#333,stroke-width:1px,color:#000\n\n    Parent[\"<big><b>Netdata Parent Pod<\/b><\/big>\n        <i>Central aggregation point for all Child agents<\/i><br/>\n        <b>Unprivileged<\/b>\n        - No host path mounts\n        - No host namespaces\n        - No special capabilities\n        - Exposes API and dashboard\n    \"]\n\n    class Parent parent\n    Parent <---> Child\n\n    subgraph Child [\"<b>Child Pod/Agent (DaemonSet)<\/b>\"]\n\n        NetdataDaemon <---> GoPlugin\n        GoPlugin ==> LocalListeners\n        NetdataDaemon <-.-> ProcPlugin\n        NetdataDaemon <-.-> CgroupsPlugin\n        CgroupsPlugin ---> CgroupNetwork\n        NetdataDaemon <-.-> DiskspacePlugin\n        NetdataDaemon <---> AppsPlugin\n        NetdataDaemon <---> NetworkViewerPlugin\n        NetdataDaemon <---> SystemdJournalPlugin\n        NetdataDaemon <---> DebugfsPlugin\n\n        NetdataDaemon[\"<big><b>Netdata Child Daemon<\/b><\/big>\n            <i>Orchestrates collection, streams to Parent<\/i><br/>\n            <b>Unprivileged<\/b>\n            - Runs as 'netdata' user\n            - Listens to localhost only\n        \"]\n\n        GoPlugin[\"<big><b>go.d.plugin<\/b><\/big>\n            <i>Collects application provided metrics from Host applications and sibling containers<\/i><br/>\n            <b>Unprivileged<\/b>\n            No special needs\n        \"]\n\n        LocalListeners[\"<big><b>local-listeners<\/b><\/big>\n            <i>Discovers listening ports on host and sibling containers, mapping them to process names<\/i><br/>\n            <b>Privileged Helper<\/b>\n            Needs: Host Network NS, CAP_SYS_ADMIN, CAP_SYS_PTRACE\n        \"]\n\n        ProcPlugin[\"<big><b>proc.plugin<\/b><\/big>\n            <i>Monitors Host CPU, Memory, Network, Storage, etc.<\/i><br/>\n            <b>Unprivileged<\/b>\n            Needs: /proc, /sys, Host Network NS\n        \"]\n\n        CgroupsPlugin[\"<big><b>cgroups.plugin<\/b><\/big>\n            <i>Monitors all Running Containers<\/i><br/>\n            <b>Unprivileged<\/b>\n            - Needs: /proc, /sys\n        \"]\n\n        CgroupNetwork[\"<big><b>cgroup-network<\/b><\/big>\n            <i>Maps network interfaces to containers<\/i><br/>\n            <b>Privileged Helper<\/b>\n            Needs: /proc, Host Network NS, Host PID NS, CAP_SYS_ADMIN\n        \"]\n\n        AppsPlugin[\"<big><b>apps.plugin<\/b><\/big>\n            <i>Monitors all Host and sibling container processes<\/i><br/>\n            <b>Privileged Plugin<\/b>\n            Needs: /proc, /etc/passwd, /etc/group, CAP_SYS_PTRACE\n        \"]\n\n        DiskspacePlugin[\"<big><b>diskspace.plugin<\/b><\/big>\n            <i>Detects and monitors host mount points<\/i><br/>\n            <b>Unprivileged<\/b>\n            Needs: / (Docker only)\n        \"]\n\n        NetworkViewerPlugin[\"<big><b>network-viewer.plugin<\/b><\/big>\n            <i>Monitors TCP/UDP sockets and connections on host and containers<\/i><br/>\n            <b>Privileged Plugin<\/b>\n            Needs: /proc, /etc/passwd, /etc/group, Host Network NS, CAP_SYS_ADMIN, CAP_SYS_PTRACE\n        \"]\n\n        SystemdJournalPlugin[\"<big><b>systemd-journal.plugin<\/b><\/big>\n            <i>Processes and queries system logs<\/i><br/>\n            <b>Privileged Plugin<\/b>\n            Needs: /var/log\n        \"]\n\n        DebugfsPlugin[\"<big><b>debugfs.plugin<\/b><\/big>\n            <i>Monitors hardware sensors and kernel subsystems<\/i><br/>\n            <b>Unprivileged<\/b>\n            Needs: /sys\n        \"]\n\n    end\n\n    linkStyle 0 stroke:#888,stroke-width:5px;\n    linkStyle 1 stroke:#000,stroke-width:4px;\n    linkStyle 2 stroke:#000,stroke-width:4px;\n    linkStyle 3 stroke:#000,stroke-width:4px;\n    linkStyle 4 stroke:#000,stroke-width:4px;\n    linkStyle 5 stroke:#000,stroke-width:4px;\n    linkStyle 6 stroke:#000,stroke-width:4px;\n    linkStyle 7 stroke:#000,stroke-width:4px;\n    linkStyle 8 stroke:#000,stroke-width:4px;\n    linkStyle 9 stroke:#000,stroke-width:4px;\n    linkStyle 10 stroke:#000,stroke-width:4px;\n\n    class NetdataDaemon unprivileged\n    class ProcPlugin unprivileged\n    class CgroupsPlugin unprivileged\n    class DiskspacePlugin unprivileged\n    class GoPlugin unprivileged\n\n    class AppsPlugin privileged\n    class CgroupNetwork helper\n    class NetworkViewerPlugin privileged\n    class SystemdJournalPlugin privileged\n    class LocalListeners helper\n    class DebugfsPlugin privileged\n    \n    class Child agentGroup\n```\n\nNetdata's design incorporates specific strategies aimed at mitigating practical attack vectors:\n\n#### Multiple Layers of Validation\n\nAny malicious request must pass rigorous input sanitization at multiple points, initially by the unprivileged parent and subsequently by the unprivileged child agent. This redundancy ensures a robust defense against attempts to exploit vulnerabilities via malformed inputs.\n\n#### Limited Plugin Interaction\n\nPrivileged helpers (`local-listeners` and `cgroup-network`) execute predefined operations at specific events (startup and container creation respectively), not in response to dynamic external inputs. Consequently, these components cannot be externally manipulated by an attacker.\n\nPrivileged plugins (`apps.plugin`, `network-viewer.plugin`, `systemd-journal.plugin`, and `debugfs.plugin`) perform strictly defined, hardcoded tasks, insulated from dynamic external influence. They merely respond to straightforward data-fetch requests.\n\n#### Functional Isolation\n\nPrivileged plugins are structurally isolated, interacting with the broader system through highly controlled interfaces, thereby substantially reducing their susceptibility to injection or remote execution exploits.\n\n## Configuration Strategies and Monitoring Scope\n\nAdministrators can configure Netdata `child` agents with varying levels of host access, directly impacting both the depth of observability achieved and the security posture of the deployment. Understanding the trade-offs associated with different configurations is essential for aligning Netdata with organizational security policies and monitoring requirements. We outline three primary approaches below:\n\n### Full Monitoring Configuration\n\nThis configuration grants the Netdata `child` agent **all** the permissions detailed in the preceding section. This includes all listed host path mounts (read-only where specified), both Host PID and Host Network namespaces, and the `SYS_ADMIN` and `SYS_PTRACE` capabilities.\n\n**Monitoring Scope (Benefit):** Provides the **maximum possible observability** offered by Netdata. This includes deep insights into the host system's performance, detailed metrics for all running containers, comprehensive process monitoring (including I/O), full network connection visibility and attribution, host system log integration, and accurate mapping of all resources.\n\n**Security Risk Profile:** **Highest.** While Netdata's internal privilege separation and network exposure controls mitigate certain threats, this configuration grants the container extensive access to host resources and powerful capabilities.\n\n**Use Case:** Environments where absolute maximum visibility is the top priority, and the organization understands, formally accepts, and has potentially implemented compensating controls (e.g., advanced runtime security, strict network policies) to manage the associated risks.\n\n### Minimal Privileges / Isolated Configuration\n\nThis configuration runs the Netdata `child` agent with **minimal privileges**, mirroring a standard, non-privileged container workload. It **excludes all specific host path mounts** (like `/proc`, `/sys`, `/var/log`, `/`), **host namespaces** (PID and Network), and **elevated capabilities** (`SYS_ADMIN`, `SYS_PTRACE`). Persistence via `/var/lib/netdata` might be optionally retained but only benefits the isolated container's identity.\n\n**Monitoring Scope (Limitation):** **Severely limited.** Netdata primarily monitors **only its own container's resource consumption** (CPU, memory, its own processes, network traffic within its isolated namespace). It gains **no visibility** into the host's overall performance, other containers, host processes, host network stack, or host system logs.\n\n_Note:_ If Kubernetes RBAC permissions are granted, Netdata can still collect **Kubernetes state metrics** (node/pod counts, status, etc.) via the K8s API. Application metrics might be collected if exposed by other pods and reachable via standard K8s networking, but without host-level correlation.\n\n**Security Risk Profile:** **Lowest.** This configuration offers the best security isolation for the Netdata agent, posing minimal direct risk to the host or other containers from the agent itself.\n\n**Use Case:** Netdata is used _only_ for Kubernetes API-level state metrics.\n\n### Balanced Approach Configuration\n\nThis configuration aims for substantial observability while mitigating the highest risks, assuming Netdata is the primary observability platform and acknowledging its security practices.\n\n- **Permissions Included:** Host path mounts `/proc` (ro), `/sys` (ro), `/etc/os-release` (ro), `/etc/passwd` (ro), `/etc/group` (ro), `/var/log` (ro), `/var/lib/netdata` (rw); Host PID and Network Namespace.\n\n- **Permissions Excluded (by Default):** Linux capabilities `SYS_ADMIN` and `SYS_PTRACE`; Host path mount `/` (for K8s).\n\n**Monitoring Scope (Benefit):** Provides **comprehensive core monitoring** capabilities: host system performance (CPU, Mem, Disk, Basic Net I/O via `/proc`), container discovery and resource usage (via cgroups in `/sys`), host-wide process listing (via Host PID and `/proc`), and integrated host system log analysis (via `/var/log` mount). Agent persistence is maintained.\n\n**Security Risk Profile:** **Medium.** This configuration still requires significant host access via read-only mounts and the Host PID and Network namespaces, carrying inherent risks of information disclosure (sensitive host system logs, process lists, system configuration) and reduced process isolation. However, it avoids the most dangerous capabilities (`SYS_ADMIN`, `SYS_PTRACE`), significantly reducing the potential for direct system compromise or interference compared to the Full Monitoring setup. The risk associated with `/var/log` access is explicitly included but limited to read-only information disclosure.\n\n**Key Trade-offs (Limitations vs. Full Monitoring):** Excludes advanced features requiring the omitted capabilities, such as per-process disk I/O metrics, precise container `veth` interface attribution, direct monitoring of other containers' network connections, process name association for network activity, and certain host application discovery methods.\n\n**Use Case:** A **sensible default baseline** for organizations deploying Netdata as their primary observability platform in security-conscious environments. It offers a strong balance of visibility and risk reduction. Enabling the excluded higher-risk permissions should be a conscious decision, requiring justification and formal risk acceptance if specific advanced features are deemed essential.\n\n## Conclusion\n\nNetdata offers extensive real-time visibility into containerized environments like Kubernetes, providing invaluable data for performance optimization, troubleshooting, and understanding system health. Achieving this deep level of insight, however, inherently requires granting the Netdata agent specific permissions to access host resources, including file system mounts, host namespaces, and potentially powerful Linux capabilities.\n\nThis document has detailed the permissions utilized by Netdata for comprehensive monitoring, explained the rationale behind them, and outlined Netdata's security architecture features – such as its privilege separation model and constrained network exposure – designed to mitigate the associated risks. We have also explored different configuration strategies, ranging from maximum observability with corresponding higher risk (\"Full Monitoring\") to maximum isolation with limited visibility (\"Minimal Privileges\").\n\nThe optimal configuration depends heavily on each organization's specific security posture, risk tolerance, compliance requirements, and observability needs. Administrators are strongly encouraged to carefully review the trade-offs detailed for each approach and select the configuration that best aligns with their environment's specific context.\n\nEffective infrastructure management requires continuous attention. Regularly reviewing Netdata's configuration and permissions, alongside evolving security best practices and organizational requirements, is essential for maintaining a secure and effectively monitored system.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EE0:3B6DE:1757CE:5D7F45:6AB92A2F"},"text_sha256":"8b7e3c6363e220986633047ea9499a053b5882b68ece16b9c6a9ce235de7e8b5"},{"path":"docs/security-and-privacy-design/README.md","size":8518,"blob_sha":"473db58379f6dd8b3d10e90c7bc5d44146055240","priority":2,"status":200,"text":"# Security and Privacy Design\n\n:::tip\n\n**Executive Summary**\n\n- Netdata is built with security-first principles to protect user data across all systems.\n- Observability data remains local, while minimal metadata travels securely to Netdata Cloud.\n- We follow best practices to support GDPR, CCPA, PCI DSS, SOC 2, and HIPAA compliance.\n\n:::\n\n## Introduction\n\nThis page explains how Netdata designs and operates secure, privacy-respecting services across the Netdata Agent and Netdata Cloud.\n\nNetdata builds security into every layer. You retain control over your observability data while benefiting from powerful real-time monitoring and insights.\n\n## Netdata's Security Principles\n\n### Security by Design\n\nNetdata separates your system information into two categories:\n\n| **Type**               | **Description**                 | **Where It Lives**                                                |\n|:-----------------------|:--------------------------------|:------------------------------------------------------------------|\n| Observability Data     | Metrics and logs                | Stored locally, fully under your control                          |\n| Observability Metadata | Hostnames, metric names, alerts | Routed securely to Netdata Cloud for dashboards and notifications |\n\nThis ensures that your critical system insights remain private, and only minimal metadata flows to the cloud.\n\n### Observability Data and Metadata Flow\n\nHere is how your data flows through Netdata:\n\n```mermaid\nflowchart TD\n    A(\"Your System\") -->|\"Collect metrics and logs\"| B(\"Netdata Agent\")\n    B --> C(\"Observability Data<br/>Stored locally\")\n    B --> D(\"Observability Metadata<br/>securely routed to Cloud\")\n    D --> E(\"Cloud dashboards, routing<br/>& notifications\")\n\n    %% Style definitions\n    classDef alert fill:#ffeb3b,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef neutral fill:#f9f9f9,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef complete fill:#4caf50,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n    classDef database fill:#2196F3,stroke:#000000,stroke-width:3px,color:#000000,font-size:14px\n\n    %% Apply styles\n    class A alert\n    class B neutral\n    class C complete\n    class D,E database\n```\n\n:::tip\n\nObservability data (metrics and logs) never leaves your system. Only essential metadata flows securely to Netdata Cloud.\n\n:::\n\n### Compliance with Open Source Security Foundation (OSSF) Best Practices\n\nNetdata follows [OSSF best practices](https://bestpractices.coreinfrastructure.org/en/projects/2231), including:\n\n- Automated testing across the UI, backend, and Agent\n- Static and security code analysis with GitHub CodeQL, Dependabot, linters, and [Coverity](https://scan.coverity.com/projects/netdata-netdata?tab=overview)\n- Two senior engineer reviews per pull request\n- Continuous stress testing in production-like environments\n\n### Third-Party Testing and Isolation\n\nNetdata Agents undergo regular external security audits.  \nAll reports are prioritized for quick investigation and resolution.\n\nNetdata Cloud operates in isolated environments with Infrastructure as Code (IaC). No manual production access exists, and monitoring is fully automated.\n\n### Security Vulnerability Response\n\nNetdata handles security vulnerabilities with a structured response process. See [Netdata’s GitHub Security Policy](https://github.com/netdata/netdata/security/policy) for details.\n\n## Compliance with Regulations\n\nNetdata complies with major data privacy laws, including GDPR and CCPA.\n\n### GDPR and CCPA Compliance\n\nNetdata conducts internal audits to ensure compliance and offers Data Processing Agreements (DPAs) upon request.\n\n:::tip\n\nContact Netdata Support to request a DPA.\n\n:::\n\n### Data Transfers\n\n| **Type**               | **Handling**                                                                 |\n|:-----------------------|:-----------------------------------------------------------------------------|\n| Observability Data     | Remains on your infrastructure                                               |\n| Observability Metadata | Securely transferred and stored in US-based data centers (Google Cloud, AWS) |\n\nData is tunneled securely in real-time without being stored on Netdata Cloud servers.\n\nData processing complies with GDPR and CCPA requirements.\n\n### Privacy Rights\n\nYou can manage your privacy rights easily:\n\n| **Right**                              | **How to Access**                                                                                |\n|:---------------------------------------|:-------------------------------------------------------------------------------------------------|\n| Access, correct, or delete your data   | Use the Netdata Cloud UI                                                                         |\n| Fully delete your account and all data | Log in to [app.netdata.cloud](https://app.netdata.cloud), go to Profile, and delete your account |\n\n:::tip\n\nDeleting your account removes all associated personal data, including email and activity records.\n\n:::\n\n### Regular Reviews and Updates\n\nNetdata continuously updates its policies and technical controls to stay aligned with evolving regulations.\n\n## Anonymous Statistics\n\nNetdata collects anonymous usage information from the Agent to guide product development and improve stability. Observability data (metrics and logs) is never collected, and metadata is anonymized before transmission. Netdata does not sell or share this data with third parties. See [Anonymous telemetry events](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) for the full details and all opt-out methods.\n\n## Internal Security Measures\n\nNetdata enforces layered security controls:\n\n| **Area**                  | **Control**                                     |\n|:--------------------------|:------------------------------------------------|\n| Infrastructure Management | Infrastructure as Code (Terraform)              |\n| Authentication            | GitHub SSO, Google SSO, email validation        |\n| Data Handling             | TLS encryption, session tracking                |\n| Access Control            | Role-based access, multi-factor authentication  |\n| Threat Defense            | DDoS protection, vulnerability scanning         |\n| Developer Process         | Static analyzers, mandatory senior code reviews |\n| Production Isolation      | No direct access to production environments     |\n\n:::tip\n\nNeed additional security configurations? Contact Netdata Support.\n\n:::\n\n## Standards Alignment\n\n:::tip\n\nView Netdata's security certifications, compliance reports, and audit documentation at our [Trust Center](https://trust.netdata.cloud/).\n\n:::\n\n### PCI DSS Alignment\n\nNetdata applies practices that align with PCI DSS security principles:\n\n- Secure infrastructure\n- Access control\n- Encryption practices\n\nHowever, Netdata is **not officially PCI DSS certified**.  \nEntities needing full PCI DSS compliance must perform additional assessments.\n\n:::tip\n\nConsult a PCI DSS compliance expert if you use Netdata as part of your PCI environment.\n\n:::\n\n### HIPAA Alignment\n\nNetdata aligns with HIPAA security practices:\n\n- Minimized data handling\n- Secure authentication and encryption\n\nNetdata provides **Business Associate Agreements (BAAs)** for healthcare organizations but is **not HIPAA-certified**.\n\n:::tip\n\nRequest a BAA through Netdata Support if required.\n\n:::\n\n### SOC 2 Compliance\n\n<img src=\"https://netdata.cloud/img/SOC2 T2 - green - h.png\" width=\"150\" alt=\"SOC2 Badge\"/>\n\nNetdata achieved SOC2 Type 2 compliance for these Service Criteria:\n\n| **Principle**        | **Practices**                            |\n|:---------------------|:-----------------------------------------|\n| Security             | TLS encryption, strict access controls   |\n| Availability         | Resilient systems, continuous monitoring |\n| Confidentiality      | Metadata isolation, role-based access    |\n\n## Conclusion\n\nNetdata gives you a secure and transparent way to monitor your systems.\n\nWith clear separation of observability data and metadata, strong encryption, secure authentication, and compliance with international standards, you retain full ownership and control of your system insights.\n\n:::tip\n\n**You** are always in control of your data with Netdata.\n\n:::\n\nNetdata’s commitment to **security, privacy, and transparency** ensures that your monitoring environment stays **protected** and **trusted** at every step.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4B8:324E19:17FFFE:5E282D:6AB92A31"},"text_sha256":"b88d360d4162061d72b4cff4f4c2809effc924cab0c496b6bc1f025297d8233a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":1,"C4":1,"C5":1,"C6":1,"C7":1,"D1":1,"score":7,"D1_evidence":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-agent-security.md; text=Raw data remains local and is never transmitted. ## User Data Protection Netdata Agent safeguards your data at every stage. | Aspect | Protection Mechanism | |:------------------|:--------------------------------------------------------------------------------------|","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-agent-security.md; text=Raw data remains local and is never transmitted. ## User Data Protection Netdata Agent safeguards your data at every stage. | Aspect | Protection Mechanism | |:------------------|:--------------------------------------------------------------------------------------|","C1":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=|:----------------|:----------------------------------------------------| | Retention | Deleted content kept 90 days | | Self-Service | Modify/delete personal data via Cloud UI | | Manual Requests | Written deletion requests processed under data laws | :::tip","C2":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=-------------------------------------------------------------------------------------------------------------| | Data Collection | • Email Address (account, communication, analytics) • IP Address (web proxy access logs) | | Data Usage | • Stored in AWS databases • Copied to BigQuery for analytics • Used for product improvement • With consent, tracking via Google Analytics, Posthog, and Gainsight PX • Stripe for secure payment handling | | Data Sharing | • No selling or sharing of personal data • Third-party services: Google Cloud/AWS (infrastructure), Stripe (payments), Analytics services | | Data Protection | • Encrypted ACLK for all infrast","C3":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=-------------------------------------------------------------------------| | Data Collection | • Email Address (account, communication, analytics) • IP Address (web proxy access logs) | | Data Usage | • Stored in AWS databases • Copied to BigQuery for analytics • Used for product improvement • With consent, tracking via Google Analytics, Posthog, and Gainsight PX • Stripe for secure payment handling | | Data Sharing | • No selling or sharing of personal data • Third-party services: Google Cloud/AWS (infrastructure), Stripe (payments), Analytics services | | Data Protection | • Encrypted ACLK for all infrastructure data • TLS encryption for al","C4":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=|:----------------|:----------------------------------------------------| | Retention | Deleted content kept 90 days | | Self-Service | Modify/delete personal data via Cloud UI | | Manual Requests | Written deletion requests processed under data laws | :::tip","C5":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=| Process | Details | |:----------------|:----------------------------------------------------| | Retention | Deleted content kept 90 days | | Self-Service | Modify/delete personal data via Cloud UI | | Manual Requests | Written deletion requests processed under data laws |","C6":"sha=f4ff3823ba24ff59f42535d673214ad22695d82b; file=docs/security-and-privacy-design/netdata-cloud-security.md; text=- Advanced access controls - Tailored audit logs - Third-party security tool integration Contact Netdata Sales for enterprise solutions. ## Deleting Personal Data"}}}}
{"repository":"tesseract-ocr/tesseract","input_row":{"repository":"tesseract-ocr/tesseract","url":"https://github.com/tesseract-ocr/tesseract","name":"tesseract","owner":"tesseract-ocr","description":"Tesseract Open Source OCR Engine (main repository)","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":76707,"issues":2773,"created_at":"2014-08-12T18:04:59Z","updated_at":"2026-09-27T13:08:42Z","first_commit_at":"2007-03-06T20:07:27Z","last_commit_at":"2026-09-11T05:17:03Z","activity_months":234.18000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:38.629Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tesseract-ocr/tesseract","visibility":"public","created_at":"2014-08-12T18:04:59Z","updated_at":"2026-09-27T14:34:37Z","private":false,"fork":false,"archived":false,"stargazers_count":76706,"open_issues_count":487,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2693","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17B81FA:1BDA5D1:6AB92A32"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2692","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FF:278AC2:185915E:1C7B6D5:6AB92A33"},"commit":{"sha":"544d399f089bbf444a33a74de9be72da0e90c3d5","url":"https://github.com/tesseract-ocr/tesseract/commit/544d399f089bbf444a33a74de9be72da0e90c3d5","date":"2018-05-24T18:23:23Z","author_date":"2018-05-24T15:35:54Z","committer_date":"2018-05-24T18:23:23Z","tree_sha":"ef19920089cc69d53dbb885ef10b474caa0d12a4","message_first_line":"Update configuration for clang-format"},"tree_request_status":200,"tree_rate":{"github_remaining":"2691","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:17EDBA8:1C0F5E2:6AB92A33"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5890,"blob_sha":"cfa6232e426edfb454a45e4355dfbf536fe852d3","priority":0}],"documents":[{"path":"README.md","size":5890,"blob_sha":"cfa6232e426edfb454a45e4355dfbf536fe852d3","priority":0,"status":200,"text":"# Tesseract OCR\n\n[![Build Status](https://travis-ci.org/tesseract-ocr/tesseract.svg?branch=master)](https://travis-ci.org/tesseract-ocr/tesseract)\n[![Build status](https://ci.appveyor.com/api/projects/status/miah0ikfsf0j3819/branch/master?svg=true)](https://ci.appveyor.com/project/zdenop/tesseract/)<br>\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/tesseract-ocr/badge.svg)](https://scan.coverity.com/projects/tesseract-ocr)\n[![Insight.io](https://www.insight.io/repoBadge/github.com/tesseract-ocr/tesseract)](https://insight.io/github.com/tesseract-ocr/tesseract)\n\n\n## About\n\nThis package contains an **OCR engine** - `libtesseract` and a **command line program** - `tesseract`.\n\nThe lead developer is Ray Smith. The maintainer is Zdenko Podobny.\nFor a list of contributors see [AUTHORS](https://github.com/tesseract-ocr/tesseract/blob/master/AUTHORS)\nand GitHub's log of [contributors](https://github.com/tesseract-ocr/tesseract/graphs/contributors).\n\nTesseract has **unicode (UTF-8) support**, and can **recognize more than 100 languages** \"out of the box\".\n\nTesseract supports **various output formats**: plain-text, hocr(html), pdf, tsv, invisible-text-only pdf.\n\nYou should note that in many cases, in order to get better OCR results, you'll need to **[improve the quality](https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality) of the image** you are giving Tesseract.\n\nThis project **does not include a GUI application**. If you need one, please see the [3rdParty](https://github.com/tesseract-ocr/tesseract/wiki/User-Projects-%E2%80%93-3rdParty) wiki page.\n\nTesseract **can be trained to recognize other languages**. See [Tesseract Training](https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract) for more information.\n\n## Brief history\n\nTesseract was originally developed at Hewlett-Packard Laboratories Bristol and\nat Hewlett-Packard Co, Greeley Colorado between 1985 and 1994, with some\nmore changes made in 1996 to port to Windows, and some C++izing in 1998.\nIn 2005 Tesseract was open sourced by HP. Since 2006 it is developed by Google.\n\nThe latest stable version is **[3.05.01](https://github.com/tesseract-ocr/tesseract/releases/tag/3.05.01)**, released on June 1, 2017. Latest source code for 3.05 is available from [3.05 branch on GitHub](https://github.com/tesseract-ocr/tesseract/tree/3.05).\n\nSource code for the new **[LSTM based 4.0 version](https://github.com/tesseract-ocr/tesseract)** is available from the master branch on GitHub. Please note this branch is under active development.\n\nSee **[Release Notes](https://github.com/tesseract-ocr/tesseract/wiki/ReleaseNotes)** and **[Change Log](https://github.com/tesseract-ocr/tesseract/blob/master/ChangeLog)** for more details of the releases.\n\n## Installing Tesseract\n\nYou can either [Install Tesseract via pre-built binary package](https://github.com/tesseract-ocr/tesseract/wiki) or [build it from source](https://github.com/tesseract-ocr/tesseract/wiki/Compiling).\n\nSupported Compilers are:\n\n* GCC 4.8 and above\n* Clang 3.4 and above\n* MSVC 2015, 2017\n\nOther compilers might work, but are not officially supported.\n\n## Running Tesseract\n\nBasic **[command line usage](https://github.com/tesseract-ocr/tesseract/wiki/Command-Line-Usage)**:\n\n    tesseract imagename outputbase [-l lang] [--oem ocrenginemode] [--psm pagesegmode] [configfiles...]\n\nFor more information about the various command line options use `tesseract --help` or `man tesseract`.\n\n## For developers\n\nDevelopers can use `libtesseract` [C](https://github.com/tesseract-ocr/tesseract/blob/master/src/api/capi.h) or [C++](https://github.com/tesseract-ocr/tesseract/blob/master/src/api/baseapi.h) API to build their own application. If you need bindings to `libtesseract` for other programming languages, please see the [wrapper](https://github.com/tesseract-ocr/tesseract/wiki/AddOns#tesseract-wrappers) section on AddOns wiki page.\n\nDocumentation of Tesseract generated from source code by doxygen can be found on [tesseract-ocr.github.io](http://tesseract-ocr.github.io/).\n\n## Support\n\nBefore you submit an issue, please review **[the guidelines for this repository](https://github.com/tesseract-ocr/tesseract/blob/master/CONTRIBUTING.md)**.\n\nFor support, first read the [Wiki](https://github.com/tesseract-ocr/tesseract/wiki), particularly the [FAQ](https://github.com/tesseract-ocr/tesseract/wiki/FAQ) to see if your problem is addressed there. If not, search the [Tesseract user forum](https://groups.google.com/d/forum/tesseract-ocr), the [Tesseract developer forum](https://groups.google.com/d/forum/tesseract-dev) and [past issues](https://github.com/tesseract-ocr/tesseract/issues), and if you still can't find what you need, ask for support in the mailing-lists.\n\nMailing-lists:\n* [tesseract-ocr](https://groups.google.com/d/forum/tesseract-ocr) - For tesseract users.\n* [tesseract-dev](https://groups.google.com/d/forum/tesseract-dev) - For tesseract developers.\n\nPlease report an issue only for a **bug**, not for asking questions.\n\n## License\n\n    The code in this repository is licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n**NOTE**: This software depends on other packages that may be licensed under different open source licenses.\n\n## Latest Version of README\n\nFor the latest online version of the README.md see:\n\nhttps://github.com/tesseract-ocr/tesseract/blob/master/README.md\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EF4:3E1DA:178AA5:5DB337:6AB92A32"},"text_sha256":"39ed6622855f3c39607f45af3e6ab846781c478f580d1dfc20d7a10589e2f926"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2690","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0855:14A1F2:18067FD:1C28C25:6AB92A34"},"commit":{"sha":"49aa8360d237b9b607c55d1248f725b781ef9de5","url":"https://github.com/tesseract-ocr/tesseract/commit/49aa8360d237b9b607c55d1248f725b781ef9de5","date":"2026-06-30T17:10:26Z","author_date":"2026-06-30T17:10:26Z","committer_date":"2026-06-30T17:10:26Z","tree_sha":"c3dee882f11947a922436fbdfa9887175662a18e","message_first_line":"ci: Remove unused ilammy/setup-nasm (#4575)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2689","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D7:380E1C:17C865A:1BE9AC3:6AB92A34"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8140,"blob_sha":"c6f4a35f583265213170c7901380dfc09e7bc290","priority":0}],"documents":[{"path":"README.md","size":8140,"blob_sha":"c6f4a35f583265213170c7901380dfc09e7bc290","priority":0,"status":200,"text":"# Tesseract OCR\n\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/tesseract-ocr/badge.svg)](https://scan.coverity.com/projects/tesseract-ocr)\n[![CodeQL](https://github.com/tesseract-ocr/tesseract/workflows/CodeQL/badge.svg)](https://github.com/tesseract-ocr/tesseract/security/code-scanning)\n[![OSS-Fuzz](https://img.shields.io/badge/oss--fuzz-fuzzing-brightgreen)](https://issues.oss-fuzz.com/issues?q=is:open%20title:tesseract-ocr)\n\\\n[![GitHub license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://raw.githubusercontent.com/tesseract-ocr/tesseract/main/LICENSE)\n[![Downloads](https://img.shields.io/badge/download-all%20releases-brightgreen.svg)](https://github.com/tesseract-ocr/tesseract/releases/)\n\n## Table of Contents\n\n* [Tesseract OCR](#tesseract-ocr)\n  * [About](#about)\n  * [Brief history](#brief-history)\n  * [Installing Tesseract](#installing-tesseract)\n  * [Running Tesseract](#running-tesseract)\n  * [For developers](#for-developers)\n  * [Support](#support)\n  * [License](#license)\n  * [Dependencies](#dependencies)\n  * [Latest Version of README](#latest-version-of-readme)\n\n## About\n\nThis package contains an **OCR engine** - `libtesseract` and a **command line program** - `tesseract`.\n\nTesseract 4 adds a new neural net (LSTM) based [OCR engine](https://en.wikipedia.org/wiki/Optical_character_recognition) which is focused on line recognition, but also still supports the legacy Tesseract OCR engine of Tesseract 3 which works by recognizing character patterns. Compatibility with Tesseract 3 is enabled by using the Legacy OCR Engine mode (--oem 0).\nIt also needs [traineddata](https://tesseract-ocr.github.io/tessdoc/Data-Files.html) files which support the legacy engine, for example those from the [tessdata](https://github.com/tesseract-ocr/tessdata) repository.\n\nStefan Weil is the current lead developer. Ray Smith was the lead developer until 2017. The maintainer is Zdenko Podobny. For a list of contributors see [AUTHORS](https://github.com/tesseract-ocr/tesseract/blob/main/AUTHORS)\nand GitHub's log of [contributors](https://github.com/tesseract-ocr/tesseract/graphs/contributors).\n\nTesseract has **unicode (UTF-8) support**, and can **recognize [more than 100 languages](https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html)** \"out of the box\".\n\nTesseract supports **[various image formats](https://tesseract-ocr.github.io/tessdoc/InputFormats)** including PNG, JPEG and TIFF.\n\nTesseract supports **various output formats**: plain text, hOCR (HTML), PDF, invisible-text-only PDF, TSV, ALTO and PAGE.\n\nYou should note that in many cases, in order to get better OCR results, you'll need to **[improve the quality](https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html) of the image** you are giving Tesseract.\n\nThis project **does not include a GUI application**. If you need one, please see the [3rdParty](https://tesseract-ocr.github.io/tessdoc/User-Projects-%E2%80%93-3rdParty.html) documentation.\n\nTesseract **can be trained to recognize other languages**.\nSee [Tesseract Training](https://tesseract-ocr.github.io/tessdoc/Training-Tesseract.html) for more information.\n\n## Brief history\n\nTesseract was originally developed at Hewlett-Packard Laboratories Bristol UK and at Hewlett-Packard Co, Greeley Colorado USA between 1985 and 1994, with some more changes made in 1996 to port to Windows, and some C++izing in 1998. In 2005 Tesseract was open sourced by HP. From 2006 until August 2017 it was developed by Google.\n\nMajor version 5 is the current stable version and started with release\n[5.0.0](https://github.com/tesseract-ocr/tesseract/releases/tag/5.0.0) on November 30, 2021. Newer minor versions and bugfix versions are available from\n[GitHub](https://github.com/tesseract-ocr/tesseract/releases/).\n\nLatest source code is available from [main branch on GitHub](https://github.com/tesseract-ocr/tesseract/tree/main).\nOpen issues can be found in [issue tracker](https://github.com/tesseract-ocr/tesseract/issues),\nand [planning documentation](https://tesseract-ocr.github.io/tessdoc/Planning.html).\n\nSee **[Release Notes](https://tesseract-ocr.github.io/tessdoc/ReleaseNotes.html)**\nand **[Change Log](https://github.com/tesseract-ocr/tesseract/blob/main/ChangeLog)** for more details of the releases.\n\n## Installing Tesseract\n\nYou can either [Install Tesseract via pre-built binary package](https://tesseract-ocr.github.io/tessdoc/Installation.html)\nor [build it from source](https://tesseract-ocr.github.io/tessdoc/Compiling.html).\n\nBefore building Tesseract from source, please check that your system has a compiler which is one of the [supported compilers](https://tesseract-ocr.github.io/tessdoc/supported-compilers.html).\n\n## Running Tesseract\n\nBasic **[command line usage](https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html)**:\n\n    tesseract imagename outputbase [-l lang] [--oem ocrenginemode] [--psm pagesegmode] [configfiles...]\n\nFor more information about the various command line options use `tesseract --help` or `man tesseract`.\n\nExamples can be found in the [documentation](https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html#simplest-invocation-to-ocr-an-image).\n\n## For developers\n\nDevelopers can use `libtesseract` [C](https://github.com/tesseract-ocr/tesseract/blob/main/include/tesseract/capi.h) or\n[C++](https://github.com/tesseract-ocr/tesseract/blob/main/include/tesseract/baseapi.h) API to build their own application. If you need bindings to `libtesseract` for other programming languages, please see the\n[wrapper](https://tesseract-ocr.github.io/tessdoc/AddOns.html#tesseract-wrappers) section in the AddOns documentation.\n\nDocumentation of Tesseract generated from source code by doxygen can be found on [tesseract-ocr.github.io](https://tesseract-ocr.github.io/).\n\n## Support\n\nBefore you submit an issue, please review **[the guidelines for this repository](https://github.com/tesseract-ocr/tesseract/blob/main/CONTRIBUTING.md)**.\n\nFor support, first read the [documentation](https://tesseract-ocr.github.io/tessdoc/),\nparticularly the [FAQ](https://tesseract-ocr.github.io/tessdoc/FAQ.html) to see if your problem is addressed there.\nIf not, search the [Tesseract user forum](https://groups.google.com/g/tesseract-ocr), the [Tesseract developer forum](https://groups.google.com/g/tesseract-dev) and [past issues](https://github.com/tesseract-ocr/tesseract/issues), and if you still can't find what you need, ask for support in the mailing-lists.\n\nMailing-lists:\n\n* [tesseract-ocr](https://groups.google.com/g/tesseract-ocr) - For tesseract users.\n* [tesseract-dev](https://groups.google.com/g/tesseract-dev) - For tesseract developers.\n\nPlease report an issue only for a **bug**, not for asking questions.\n\n## License\n\n    The code in this repository is licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n**NOTE**: This software depends on other packages that may be licensed under different open source licenses.\n\nTesseract uses [Leptonica library](http://leptonica.com/) which essentially\nuses a [BSD 2-clause license](http://leptonica.com/about-the-license.html).\n\n## Dependencies\n\nTesseract uses [Leptonica library](https://github.com/DanBloomberg/leptonica)\nfor opening input images (e.g. not documents like pdf).\nIt is suggested to use leptonica with built-in support for [zlib](https://zlib.net),\n[png](https://sourceforge.net/projects/libpng) and\n[tiff](http://www.simplesystems.org/libtiff) (for multipage tiff).\n\n## Latest Version of README\n\nFor the latest online version of the README.md see:\n\n<https://github.com/tesseract-ocr/tesseract/blob/main/README.md>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E54:372D9:17C210:5DEB57:6AB92A35"},"text_sha256":"1ae1aef82544563774c896f910105adcd29ee1553b5b8fe7c2acedc069c1bb91"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-learn/scikit-learn","input_row":{"repository":"scikit-learn/scikit-learn","url":"https://github.com/scikit-learn/scikit-learn","name":"scikit-learn","owner":"scikit-learn","description":"scikit-learn: machine learning in Python","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":67398,"issues":12298,"created_at":"2010-08-17T09:43:38Z","updated_at":"2026-09-27T13:26:40Z","first_commit_at":"2010-01-05T13:26:32Z","last_commit_at":"2026-09-24T17:11:32Z","activity_months":200.59999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:41.462Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-learn/scikit-learn","visibility":"public","created_at":"2010-08-17T09:43:38Z","updated_at":"2026-09-27T13:26:40Z","private":false,"fork":false,"archived":false,"stargazers_count":67398,"open_issues_count":2153,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2688","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:17DA4F4:1BFC637:6AB92A35"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2687","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0856:6E5BD:17919E4:1BB2874:6AB92A35"},"commit":{"sha":"51fe7a52add824bea23332d774526c1cc7e4357c","url":"https://github.com/scikit-learn/scikit-learn/commit/51fe7a52add824bea23332d774526c1cc7e4357c","date":"2018-05-24T19:52:50Z","author_date":"2018-05-24T19:52:50Z","committer_date":"2018-05-24T19:52:50Z","tree_sha":"011b560b2f9350755cc5201eac89159565f41ff8","message_first_line":"TST make parametrized tests with partial have better displayed names (#11132)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2686","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:17F8264:1C1A66C:6AB92A36"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5597,"blob_sha":"cf011277f539a0a3e2a842105638043977166e60","priority":0}],"documents":[{"path":"README.rst","size":5597,"blob_sha":"cf011277f539a0a3e2a842105638043977166e60","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |Python27|_ |Python35|_ |PyPi|_ |DOI|_\n\n.. |Travis| image:: https://api.travis-ci.org/scikit-learn/scikit-learn.svg?branch=master\n.. _Travis: https://travis-ci.org/scikit-learn/scikit-learn\n\n.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/scikit-learn/scikit-learn?branch=master&svg=true\n.. _AppVeyor: https://ci.appveyor.com/project/sklearn-ci/scikit-learn/history\n\n.. |Codecov| image:: https://codecov.io/github/scikit-learn/scikit-learn/badge.svg?branch=master&service=github\n.. _Codecov: https://codecov.io/github/scikit-learn/scikit-learn?branch=master\n\n.. |CircleCI| image:: https://circleci.com/gh/scikit-learn/scikit-learn/tree/master.svg?style=shield&circle-token=:circle-token\n.. _CircleCI: https://circleci.com/gh/scikit-learn/scikit-learn\n\n.. |Python27| image:: https://img.shields.io/badge/python-2.7-blue.svg\n.. _Python27: https://badge.fury.io/py/scikit-learn\n\n.. |Python35| image:: https://img.shields.io/badge/python-3.5-blue.svg\n.. _Python35: https://badge.fury.io/py/scikit-learn\n\n.. |PyPi| image:: https://badge.fury.io/py/scikit-learn.svg\n.. _PyPi: https://badge.fury.io/py/scikit-learn\n\n.. |DOI| image:: https://zenodo.org/badge/21369/scikit-learn/scikit-learn.svg\n.. _DOI: https://zenodo.org/badge/latestdoi/21369/scikit-learn/scikit-learn\n\nscikit-learn\n============\n\nscikit-learn is a Python module for machine learning built on top of\nSciPy and distributed under the 3-Clause BSD license.\n\nThe project was started in 2007 by David Cournapeau as a Google Summer\nof Code project, and since then many volunteers have contributed. See\nthe `AUTHORS.rst <AUTHORS.rst>`_ file for a complete list of contributors.\n\nIt is currently maintained by a team of volunteers.\n\nWebsite: http://scikit-learn.org\n\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\nscikit-learn requires:\n\n- Python (>= 2.7 or >= 3.4)\n- NumPy (>= 1.8.2)\n- SciPy (>= 0.13.3)\n\nFor running the examples Matplotlib >= 1.3.1 is required. A few examples\nrequire scikit-image >= 0.9.3 and a few examples require pandas >= 0.13.1.\n\nscikit-learn also uses CBLAS, the C interface to the Basic Linear Algebra\nSubprograms library. scikit-learn comes with a reference implementation, but\nthe system CBLAS will be detected by the build system and used if present.\nCBLAS exists in many implementations; see `Linear algebra libraries\n<http://scikit-learn.org/stable/modules/computational_performance.html#linear-algebra-libraries>`_\nfor known issues.\n\nUser installation\n~~~~~~~~~~~~~~~~~\n\nIf you already have a working installation of numpy and scipy,\nthe easiest way to install scikit-learn is using ``pip`` ::\n\n    pip install -U scikit-learn\n\nor ``conda``::\n\n    conda install scikit-learn\n\nThe documentation includes more detailed `installation instructions <http://scikit-learn.org/stable/install.html>`_.\n\n\nDevelopment\n-----------\n\nWe welcome new contributors of all experience levels. The scikit-learn\ncommunity goals are to be helpful, welcoming, and effective. The\n`Development Guide <http://scikit-learn.org/stable/developers/index.html>`_\nhas detailed information about contributing code, documentation, tests, and\nmore. We've included some basic information in this README.\n\nImportant links\n~~~~~~~~~~~~~~~\n\n- Official source code repo: https://github.com/scikit-learn/scikit-learn\n- Download releases: https://pypi.python.org/pypi/scikit-learn\n- Issue tracker: https://github.com/scikit-learn/scikit-learn/issues\n\nSource code\n~~~~~~~~~~~\n\nYou can check the latest sources with the command::\n\n    git clone https://github.com/scikit-learn/scikit-learn.git\n\nSetting up a development environment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nQuick tutorial on how to go about setting up your environment to\ncontribute to scikit-learn: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md\n\nTesting\n~~~~~~~\n\nAfter installation, you can launch the test suite from outside the\nsource directory (you will need to have the ``pytest`` package installed)::\n\n    pytest sklearn\n\nSee the web page http://scikit-learn.org/dev/developers/advanced_installation.html#testing\nfor more information.\n\n    Random number generation can be controlled during testing by setting\n    the ``SKLEARN_SEED`` environment variable.\n\nSubmitting a Pull Request\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBefore opening a Pull Request, have a look at the\nfull Contributing page to make sure your code complies\nwith our guidelines: http://scikit-learn.org/stable/developers/index.html\n\n\nProject History\n---------------\n\nThe project was started in 2007 by David Cournapeau as a Google Summer\nof Code project, and since then many volunteers have contributed. See\nthe  `AUTHORS.rst <AUTHORS.rst>`_ file for a complete list of contributors.\n\nThe project is currently maintained by a team of volunteers.\n\n**Note**: `scikit-learn` was previously referred to as `scikits.learn`.\n\n\nHelp and Support\n----------------\n\nDocumentation\n~~~~~~~~~~~~~\n\n- HTML documentation (stable release): http://scikit-learn.org\n- HTML documentation (development version): http://scikit-learn.org/dev/\n- FAQ: http://scikit-learn.org/stable/faq.html\n\nCommunication\n~~~~~~~~~~~~~\n\n- Mailing list: https://mail.python.org/mailman/listinfo/scikit-learn\n- IRC channel: ``#scikit-learn`` at ``webchat.freenode.net``\n- Stack Overflow: http://stackoverflow.com/questions/tagged/scikit-learn\n- Website: http://scikit-learn.org\n\nCitation\n~~~~~~~~\n\nIf you use scikit-learn in a scientific publication, we would appreciate citations: http://scikit-learn.org/stable/about.html#citing-scikit-learn\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62D0:3BB77:179C67:5DC670:6AB92A36"},"text_sha256":"2f4c3b8e91c6fa2a6a716ccad040c040202f143921173d697b56f46d5b66defa"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2685","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:17EA85B:1C0D15D:6AB92A37"},"commit":{"sha":"3c5db7378c68b3477e121138d0f657da1d1136df","url":"https://github.com/scikit-learn/scikit-learn/commit/3c5db7378c68b3477e121138d0f657da1d1136df","date":"2026-06-30T15:40:38Z","author_date":"2026-06-30T15:40:38Z","committer_date":"2026-06-30T15:40:38Z","tree_sha":"3061cb944186c2377d6a7155c22023a0c18c1504","message_first_line":"DOC Fix typos and improve wording in `plot_cost_sensitive_learning.py` (#34417)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2684","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17C88B2:1BE9D5F:6AB92A37"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":7520,"blob_sha":"9a7b9d437b30a93ab246725a0fb5dfc89d38f17a","priority":0},{"path":"SECURITY.md","size":827,"blob_sha":"09f5cebe2b49734a9d91ec7cdde68f212f118c2b","priority":1}],"documents":[{"path":"README.rst","size":7520,"blob_sha":"9a7b9d437b30a93ab246725a0fb5dfc89d38f17a","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n|GitHubActions| |Codecov| |CircleCI| |Nightly wheels| |Ruff| |PythonVersion| |PyPI| |DOI| |Benchmark|\n\n\n.. |GitHubActions| image:: https://github.com/scikit-learn/scikit-learn/actions/workflows/unit-tests.yml/badge.svg?\n   :target: https://github.com/scikit-learn/scikit-learn/actions/workflows/unit-tests.yml?query=branch%3Amain\n\n.. |CircleCI| image:: https://circleci.com/gh/scikit-learn/scikit-learn/tree/main.svg?style=shield\n   :target: https://circleci.com/gh/scikit-learn/scikit-learn\n\n.. |Codecov| image:: https://codecov.io/gh/scikit-learn/scikit-learn/branch/main/graph/badge.svg?token=Pk8G9gg3y9\n   :target: https://codecov.io/gh/scikit-learn/scikit-learn\n\n.. |Nightly wheels| image:: https://github.com/scikit-learn/scikit-learn/actions/workflows/wheels.yml/badge.svg?event=schedule\n   :target: https://github.com/scikit-learn/scikit-learn/actions?query=workflow%3A%22Wheel+builder%22+event%3Aschedule\n\n.. |Ruff| image:: https://img.shields.io/badge/code%20style-ruff-000000.svg?\n   :target: https://github.com/astral-sh/ruff\n\n.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/scikit-learn.svg?\n   :target: https://pypi.org/project/scikit-learn/\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/scikit-learn\n   :target: https://pypi.org/project/scikit-learn\n\n.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.17880109.svg?\n   :target: https://zenodo.org/badge/latestdoi/21369/scikit-learn/scikit-learn\n\n.. |Benchmark| image:: https://img.shields.io/badge/Benchmarked%20by-asv-blue\n   :target: https://scikit-learn.org/scikit-learn-benchmarks\n\n.. |PythonMinVersion| replace:: 3.11\n.. |NumPyMinVersion| replace:: 1.24.1\n.. |SciPyMinVersion| replace:: 1.10.0\n.. |JoblibMinVersion| replace:: 1.4.0\n.. |NarwhalsMinVersion| replace:: 2.0.1\n.. |ThreadpoolctlMinVersion| replace:: 3.5.0\n.. |MatplotlibMinVersion| replace:: 3.6.1\n.. |Scikit-ImageMinVersion| replace:: 0.22.0\n.. |PandasMinVersion| replace:: 1.5.0\n.. |SeabornMinVersion| replace:: 0.13.0\n.. |PytestMinVersion| replace:: 7.1.2\n.. |PlotlyMinVersion| replace:: 5.22.0\n\n.. image:: https://raw.githubusercontent.com/scikit-learn/scikit-learn/main/doc/logos/scikit-learn-logo.png\n  :target: https://scikit-learn.org/\n\n**scikit-learn** is a Python module for machine learning built on top of\nSciPy and is distributed under the 3-Clause BSD license.\n\nThe project was started in 2007 by David Cournapeau as a Google Summer\nof Code project, and since then many volunteers have contributed. See\nthe `About us <https://scikit-learn.org/dev/about.html#authors>`__ page\nfor a list of core contributors.\n\nIt is currently maintained by a team of volunteers.\n\nWebsite: https://scikit-learn.org\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\nscikit-learn requires:\n\n- Python (>= |PythonMinVersion|)\n- NumPy (>= |NumPyMinVersion|)\n- SciPy (>= |SciPyMinVersion|)\n- Narwhals (>= |NarwhalsMinVersion|)\n- joblib (>= |JoblibMinVersion|)\n- threadpoolctl (>= |ThreadpoolctlMinVersion|)\n\n=======\n\nScikit-learn plotting capabilities (i.e., functions start with ``plot_`` and\nclasses end with ``Display``) require Matplotlib (>= |MatplotlibMinVersion|).\nFor running the examples Matplotlib >= |MatplotlibMinVersion| is required.\nA few examples require scikit-image >= |Scikit-ImageMinVersion|, a few examples\nrequire pandas >= |PandasMinVersion|, some examples require seaborn >=\n|SeabornMinVersion| and Plotly >= |PlotlyMinVersion|.\n\nUser installation\n~~~~~~~~~~~~~~~~~\n\nIf you already have a working installation of NumPy and SciPy,\nthe easiest way to install scikit-learn is using ``pip``::\n\n    pip install -U scikit-learn\n\nor ``conda``::\n\n    conda install -c conda-forge scikit-learn\n\nThe documentation includes more detailed `installation instructions <https://scikit-learn.org/stable/install.html>`_.\n\n\nChangelog\n---------\n\nSee the `changelog <https://scikit-learn.org/dev/whats_new.html>`__\nfor a history of notable changes to scikit-learn.\n\nDevelopment\n-----------\n\nWe welcome new contributors of all experience levels. The scikit-learn\ncommunity goals are to be helpful, welcoming, and effective. The\n`Development Guide <https://scikit-learn.org/stable/developers/index.html>`_\nhas detailed information about contributing code, documentation, tests, and\nmore. We've included some basic information in this README.\n\nImportant links\n~~~~~~~~~~~~~~~\n\n- Official source code repo: https://github.com/scikit-learn/scikit-learn\n- Download releases: https://pypi.org/project/scikit-learn/\n- Issue tracker: https://github.com/scikit-learn/scikit-learn/issues\n\nSource code\n~~~~~~~~~~~\n\nYou can check the latest sources with the command::\n\n    git clone https://github.com/scikit-learn/scikit-learn.git\n\nContributing\n~~~~~~~~~~~~\n\nTo learn more about making a contribution to scikit-learn, please see our\n`Contributing guide\n<https://scikit-learn.org/dev/developers/contributing.html>`_.\n\nTesting\n~~~~~~~\n\nAfter installation, you can launch the test suite from outside the source\ndirectory (you will need to have ``pytest`` >= |PytestMinVersion| installed)::\n\n    pytest sklearn\n\nSee the web page https://scikit-learn.org/dev/developers/contributing.html#testing-and-improving-test-coverage\nfor more information.\n\n    Random number generation can be controlled during testing by setting\n    the ``SKLEARN_SEED`` environment variable.\n\nSubmitting a Pull Request\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBefore opening a Pull Request, have a look at the\nfull Contributing page to make sure your code complies\nwith our guidelines: https://scikit-learn.org/stable/developers/index.html\n\nProject History\n---------------\n\nThe project was started in 2007 by David Cournapeau as a Google Summer\nof Code project, and since then many volunteers have contributed. See\nthe `About us <https://scikit-learn.org/dev/about.html#authors>`__ page\nfor a list of core contributors.\n\nThe project is currently maintained by a team of volunteers.\n\n**Note**: `scikit-learn` was previously referred to as `scikits.learn`.\n\nHelp and Support\n----------------\n\nDocumentation\n~~~~~~~~~~~~~\n\n- HTML documentation (stable release): https://scikit-learn.org\n- HTML documentation (development version): https://scikit-learn.org/dev/\n- FAQ: https://scikit-learn.org/stable/faq.html\n\nCommunication\n~~~~~~~~~~~~~\n\nMain Channels\n^^^^^^^^^^^^^\n\n- **Website**: https://scikit-learn.org\n- **Blog**: https://blog.scikit-learn.org\n- **Mailing list**: https://mail.python.org/mailman/listinfo/scikit-learn\n\nDeveloper & Support\n^^^^^^^^^^^^^^^^^^^^^^\n\n- **GitHub Discussions**: https://github.com/scikit-learn/scikit-learn/discussions\n- **Stack Overflow**: https://stackoverflow.com/questions/tagged/scikit-learn\n- **Discord**: https://discord.gg/h9qyrK8Jc8\n\nSocial Media Platforms\n^^^^^^^^^^^^^^^^^^^^^^\n\n- **LinkedIn**: https://www.linkedin.com/company/scikit-learn\n- **YouTube**: https://www.youtube.com/channel/UCJosFjYm0ZYVUARxuOZqnnw/playlists\n- **Facebook**: https://www.facebook.com/scikitlearnofficial/\n- **Instagram**: https://www.instagram.com/scikitlearnofficial/\n- **TikTok**: https://www.tiktok.com/@scikit.learn\n- **Bluesky**: https://bsky.app/profile/scikit-learn.org\n- **Mastodon**: https://mastodon.social/@sklearn@fosstodon.org\n\nResources\n^^^^^^^^^\n\n- **Calendar**: https://blog.scikit-learn.org/calendar/\n- **Logos & Branding**: https://github.com/scikit-learn/scikit-learn/tree/main/doc/logos\n\nCitation\n~~~~~~~~\n\nIf you use scikit-learn in a scientific publication, we would appreciate citations: https://scikit-learn.org/stable/about.html#citing-scikit-learn\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BCD8:1F1FB6:17C846:5DF0C5:6AB92A34"},"text_sha256":"ab36f557f930018d0c66fc20105edaf2a09c390a1fd68f4e41a77bf7cc26034a"},{"path":"SECURITY.md","size":827,"blob_sha":"09f5cebe2b49734a9d91ec7cdde68f212f118c2b","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version       | Supported          |\n| ------------- | ------------------ |\n| 1.9.0         | :white_check_mark: |\n| < 1.9.0       | :x:                |\n\n## Reporting a Vulnerability\n\nPlease report security vulnerabilities by opening a new [GitHub security\nadvisory](https://github.com/scikit-learn/scikit-learn/security/advisories/new).\n\nYou can also send an email to `security@scikit-learn.org`, which is an alias to\na subset of the scikit-learn maintainers' team.\n\nIf the security vulnerability is accepted, a patch will be crafted privately\nin order to prepare a dedicated bugfix release as timely as possible (depending\non the complexity of the fix).\n\nIn addition to the options above, you can also report security vulnerabilities\nto [tidelift](https://tidelift.com/security).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37A8:17E138:17933C:5DBC13:6AB92A38"},"text_sha256":"ac8003b31865463aae17e4fd08fc0d58a469f7fd6fa02d78cd438426ebb80514"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ageitgey/face_recognition","input_row":{"repository":"ageitgey/face_recognition","url":"https://github.com/ageitgey/face_recognition","name":"face_recognition","owner":"ageitgey","description":"The world's simplest facial recognition api for Python and the command line","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":56783,"issues":1379,"created_at":"2017-03-03T21:52:39Z","updated_at":"2026-09-26T06:05:05Z","first_commit_at":"2017-03-04T00:29:23Z","last_commit_at":"2026-06-25T11:12:50Z","activity_months":111.70999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:45.579Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ageitgey/face_recognition","visibility":"public","created_at":"2017-03-03T21:52:39Z","updated_at":"2026-09-26T06:05:05Z","private":false,"fork":false,"archived":false,"stargazers_count":56783,"open_issues_count":832,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2683","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17C9483:1BEADFF:6AB92A39"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2682","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:182BAA8:1C4DA6C:6AB92A39"},"commit":{"sha":"2e44b7baa4f08ec59ec6bd936a3724c5dca500d6","url":"https://github.com/ageitgey/face_recognition/commit/2e44b7baa4f08ec59ec6bd936a3724c5dca500d6","date":"2018-04-18T16:36:50Z","author_date":"2018-04-18T16:36:50Z","committer_date":"2018-04-18T16:36:50Z","tree_sha":"686a5a0aac49c8d3e2a8842a430df5b275f6f6ec","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2681","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0871:71C58:17AEE6F:1BD1455:6AB92A3A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16039,"blob_sha":"e1e79fd23e24ea65218ae5e2c501bd863e3b0813","priority":0},{"path":"README.rst","size":17523,"blob_sha":"16edc6c13aa10168220fc411c22f3ac77fc3a38d","priority":0}],"documents":[{"path":"README.md","size":16039,"blob_sha":"e1e79fd23e24ea65218ae5e2c501bd863e3b0813","priority":0,"status":200,"text":"# Face Recognition\n\nRecognize and manipulate faces from Python or from the command line with\nthe world's simplest face recognition library.\n\nBuilt using [dlib](http://dlib.net/)'s state-of-the-art face recognition\nbuilt with deep learning. The model has an accuracy of 99.38% on the\n[Labeled Faces in the Wild](http://vis-www.cs.umass.edu/lfw/) benchmark.\n\nThis also provides a simple `face_recognition` command line tool that lets\nyou do face recognition on a folder of images from the command line!\n\n\n[![PyPI](https://img.shields.io/pypi/v/face_recognition.svg)](https://pypi.python.org/pypi/face_recognition)\n[![Build Status](https://travis-ci.org/ageitgey/face_recognition.svg?branch=master)](https://travis-ci.org/ageitgey/face_recognition)\n[![Documentation Status](https://readthedocs.org/projects/face-recognition/badge/?version=latest)](http://face-recognition.readthedocs.io/en/latest/?badge=latest)\n\n## Features\n\n#### Find faces in pictures\n\nFind all the faces that appear in a picture:\n\n![](https://cloud.githubusercontent.com/assets/896692/23625227/42c65360-025d-11e7-94ea-b12f28cb34b4.png)\n\n```python\nimport face_recognition\nimage = face_recognition.load_image_file(\"your_file.jpg\")\nface_locations = face_recognition.face_locations(image)\n```\n\n#### Find and manipulate facial features in pictures\n\nGet the locations and outlines of each person's eyes, nose, mouth and chin.\n\n![](https://cloud.githubusercontent.com/assets/896692/23625282/7f2d79dc-025d-11e7-8728-d8924596f8fa.png)\n\n```python\nimport face_recognition\nimage = face_recognition.load_image_file(\"your_file.jpg\")\nface_landmarks_list = face_recognition.face_landmarks(image)\n```\n\nFinding facial features is super useful for lots of important stuff. But you can also use for really stupid stuff\nlike applying [digital make-up](https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py) (think 'Meitu'):\n\n![](https://cloud.githubusercontent.com/assets/896692/23625283/80638760-025d-11e7-80a2-1d2779f7ccab.png)\n\n#### Identify faces in pictures\n\nRecognize who appears in each photo.\n\n![](https://cloud.githubusercontent.com/assets/896692/23625229/45e049b6-025d-11e7-89cc-8a71cf89e713.png)\n\n```python\nimport face_recognition\nknown_image = face_recognition.load_image_file(\"biden.jpg\")\nunknown_image = face_recognition.load_image_file(\"unknown.jpg\")\n\nbiden_encoding = face_recognition.face_encodings(known_image)[0]\nunknown_encoding = face_recognition.face_encodings(unknown_image)[0]\n\nresults = face_recognition.compare_faces([biden_encoding], unknown_encoding)\n```\n\nYou can even use this library with other Python libraries to do real-time face recognition:\n\n![](https://cloud.githubusercontent.com/assets/896692/24430398/36f0e3f0-13cb-11e7-8258-4d0c9ce1e419.gif)\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py) for the code.\n\n## Installation\n\n### Requirements\n\n  * Python 3.3+ or Python 2.7\n  * macOS or Linux (Windows not officially supported, but might work)\n\n### Installation Options:\n\n#### Installing on Mac or Linux\n\nFirst, make sure you have dlib already installed with Python bindings:\n\n  * [How to install dlib from source on macOS or Ubuntu](https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf)\n\nThen, install this module from pypi using `pip3` (or `pip2` for Python 2):\n\n```bash\npip3 install face_recognition\n```\n\nIf you are having trouble with installation, you can also try out a\n[pre-configured VM](https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b).\n\n#### Installing on Raspberry Pi 2+\n\n  * [Raspberry Pi 2+ installation instructions](https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65)\n\n#### Installing on Windows\n\nWhile Windows isn't officially supported, helpful users have posted instructions on how to install this library:\n\n  * [@masoudr's Windows 10 installation guide (dlib + face_recognition)](https://github.com/ageitgey/face_recognition/issues/175#issue-257710508)\n\n#### Installing a pre-configured Virtual Machine image\n\n  * [Download the pre-configured VM image](https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b) (for VMware Player or VirtualBox).\n\n## Usage\n\n### Command-Line Interface\n\nWhen you install `face_recognition`, you get a two simple command-line \nprograms:\n\n* `face_recognition` - Recognize faces in a photograph or folder full for \n   photographs.\n* `face_detection` - Find faces in a photograph or folder full for photographs.\n\n#### `face_recognition` command line tool\n\nThe `face_recognition` command lets you recognize faces in a photograph or \nfolder full  for photographs.\n\nFirst, you need to provide a folder with one picture of each person you\nalready know. There should be one image file for each person with the\nfiles named according to who is in the picture:\n\n![known](https://cloud.githubusercontent.com/assets/896692/23582466/8324810e-00df-11e7-82cf-41515eba704d.png)\n\nNext, you need a second folder with the files you want to identify:\n\n![unknown](https://cloud.githubusercontent.com/assets/896692/23582465/81f422f8-00df-11e7-8b0d-75364f641f58.png)\n\nThen in you simply run the command `face_recognition`, passing in\nthe folder of known people and the folder (or single image) with unknown\npeople and it tells you who is in each image:\n\n```bash\n$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n```\n\nThere's one line in the output for each face. The data is comma-separated\nwith the filename and the name of the person found.\n\nAn `unknown_person` is a face in the image that didn't match anyone in\nyour folder of known people.\n\n#### `face_detection` command line tool\n\nThe `face_detection` command lets you find the location (pixel coordinatates) \nof any faces in an image.\n\nJust run the command `face_detection`, passing in a folder of images \nto check (or a single image):\n\n```bash\n$ face_detection  ./folder_with_pictures/\n\nexamples/image1.jpg,65,215,169,112\nexamples/image2.jpg,62,394,211,244\nexamples/image2.jpg,95,941,244,792\n```\n\nIt prints one line for each face that was detected. The coordinates\nreported are the top, right, bottom and left coordinates of the face (in pixels).\n \n##### Adjusting Tolerance / Sensitivity\n\nIf you are getting multiple matches for the same person, it might be that\nthe people in your photos look very similar and a lower tolerance value\nis needed to make face comparisons more strict.\n\nYou can do that with the `--tolerance` parameter. The default tolerance\nvalue is 0.6 and lower numbers make face comparisons more strict:\n\n```bash\n$ face_recognition --tolerance 0.54 ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n```\n\nIf you want to see the face distance calculated for each match in order\nto adjust the tolerance setting, you can use `--show-distance true`:\n\n```bash\n$ face_recognition --show-distance true ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama,0.378542298956785\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person,None\n```\n\n##### More Examples\n\nIf you simply want to know the names of the people in each photograph but don't\ncare about file names, you could do this:\n\n```bash\n$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/ | cut -d ',' -f2\n\nBarack Obama\nunknown_person\n```\n\n##### Speeding up Face Recognition\n\nFace recognition can be done in parallel if you have a computer with\nmultiple CPU cores. For example if your system has 4 CPU cores, you can\nprocess about 4 times as many images in the same amount of time by using\nall your CPU cores in parallel.\n\nIf you are using Python 3.4 or newer, pass in a `--cpus <number_of_cpu_cores_to_use>` parameter:\n\n```bash\n$ face_recognition --cpus 4 ./pictures_of_people_i_know/ ./unknown_pictures/\n```\n\nYou can also pass in `--cpus -1` to use all CPU cores in your system.\n\n#### Python Module\n\nYou can import the `face_recognition` module and then easily manipulate\nfaces with just a couple of lines of code. It's super easy!\n\nAPI Docs: [https://face-recognition.readthedocs.io](https://face-recognition.readthedocs.io/en/latest/face_recognition.html).\n\n##### Automatically find all the faces in an image\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_locations = face_recognition.face_locations(image)\n\n# face_locations is now an array listing the co-ordinates of each face!\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py)\n to try it out.\n\nYou can also opt-in to a somewhat more accurate deep-learning-based face detection model.\n\nNote: GPU acceleration (via nvidia's CUDA library) is required for good\nperformance with this model. You'll also want to enable CUDA support\nwhen compliling `dlib`.\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_locations = face_recognition.face_locations(image, model=\"cnn\")\n\n# face_locations is now an array listing the co-ordinates of each face!\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py)\n to try it out.\n\nIf you have a lot of images and a GPU, you can also\n[find faces in batches](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py).\n\n##### Automatically locate the facial features of a person in an image\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_landmarks_list = face_recognition.face_landmarks(image)\n\n# face_landmarks_list is now an array with the locations of each facial feature in each face.\n# face_landmarks_list[0]['left_eye'] would be the location and outline of the first person's left eye.\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py)\n to try it out.\n\n##### Recognize faces in images and identify who they are\n\n```python\nimport face_recognition\n\npicture_of_me = face_recognition.load_image_file(\"me.jpg\")\nmy_face_encoding = face_recognition.face_encodings(picture_of_me)[0]\n\n# my_face_encoding now contains a universal 'encoding' of my facial features that can be compared to any other picture of a face!\n\nunknown_picture = face_recognition.load_image_file(\"unknown.jpg\")\nunknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0]\n\n# Now we can see the two face encodings are of the same person with `compare_faces`!\n\nresults = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding)\n\nif results[0] == True:\n    print(\"It's a picture of me!\")\nelse:\n    print(\"It's not a picture of me!\")\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py)\n to try it out.\n\n## Python Code Examples\n\nAll the examples are available [here](https://github.com/ageitgey/face_recognition/tree/master/examples).\n\n\n#### Face Detection\n\n* [Find faces in a photograph](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py)\n* [Find faces in a photograph (using deep learning)](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py)\n* [Find faces in batches of images w/ GPU (using deep learning)](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py)\n* [Blur all the faces in a live video using your webcam (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/blur_faces_on_webcam.py)\n\n#### Facial Features\n\n* [Identify specific facial features in a photograph](https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py)\n* [Apply (horribly ugly) digital make-up](https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py)\n\n#### Facial Recognition\n\n* [Find and recognize unknown faces in a photograph based on photographs of known people](https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py)\n* [Identify and draw boxes around each person in a photo](https://github.com/ageitgey/face_recognition/blob/master/examples/identify_and_draw_boxes_on_faces.py)\n* [Compare faces by numeric face distance instead of only True/False matches](https://github.com/ageitgey/face_recognition/blob/master/examples/face_distance.py)\n* [Recognize faces in live video using your webcam - Simple / Slower Version (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py)\n* [Recognize faces in live video using your webcam - Faster Version (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py)\n* [Recognize faces in a video file and write out new video file (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_video_file.py)\n* [Recognize faces on a Raspberry Pi w/ camera](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_on_raspberry_pi.py)\n* [Run a web service to recognize faces via HTTP (Requires Flask to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/web_service_example.py)\n* [Recognize faces with a K-nearest neighbors classifier](https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py)\n\n## How Face Recognition Works\n\nIf you want to learn how face location and recognition work instead of\ndepending on a black box library, [read my article](https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78).\n\n## Caveats\n\n* The face recognition model is trained on adults and does not work very well on children. It tends to mix\n  up children quite easy using the default comparison threshold of 0.6.\n* Accuracy may vary between ethnic groups. Please see [this wiki page](https://github.com/ageitgey/face_recognition/wiki/Face-Recognition-Accuracy-Problems#question-face-recognition-works-well-with-european-individuals-but-overall-accuracy-is-lower-with-asian-individuals) for more details.\n\n## Deployment to Cloud Hosts (Heroku, AWS, etc)\n\nSince `face_recognition` depends on `dlib` which is written in C++, it can be tricky to deploy an app\nusing it to a cloud hosting provider like Heroku or AWS.\n\nTo make things easier, there's an example Dockerfile in this repo that shows how to run an app built with\n`face_recognition` in a [Docker](https://www.docker.com/) container. With that, you should be able to deploy\nto any service that supports Docker images.\n\n## Having problems?\n\nIf you run into problems, please read the [Common Errors](https://github.com/ageitgey/face_recognition/wiki/Common-Errors) section of the wiki before filing a github issue.\n\n## Thanks\n\n* Many, many thanks to [Davis King](https://github.com/davisking) ([@nulhom](https://twitter.com/nulhom))\n  for creating dlib and for providing the trained facial feature detection and face encoding models\n  used in this library. For more information on the ResNet that powers the face encodings, check out\n  his [blog post](http://blog.dlib.net/2017/02/high-quality-face-recognition-with-deep.html).\n* Thanks to everyone who works on all the awesome Python data science libraries like numpy, scipy, scikit-image,\n  pillow, etc, etc that makes this kind of stuff so easy and fun in Python.\n* Thanks to [Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n  [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template\n  for making Python project packaging way more tolerable.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"29C6:3FD49:17775F:5DA10C:6AB92A3A"},"text_sha256":"36b9252baa8ea9d5d508a70396a08c2d149e4cf74fc2dd56af7c1d0ba94ba7f8"},{"path":"README.rst","size":17523,"blob_sha":"16edc6c13aa10168220fc411c22f3ac77fc3a38d","priority":0,"status":200,"text":"Face Recognition\n================\n\n| Recognize and manipulate faces from Python or from the command line\n  with\n| the world's simplest face recognition library.\n\n| Built using `dlib <http://dlib.net/>`__'s state-of-the-art face\n  recognition\n| built with deep learning. The model has an accuracy of 99.38% on the\n| `Labeled Faces in the Wild <http://vis-www.cs.umass.edu/lfw/>`__\n  benchmark.\n\n| This also provides a simple ``face_recognition`` command line tool\n  that lets\n| you do face recognition on a folder of images from the command line!\n\n| |PyPI|\n| |Build Status|\n| |Documentation Status|\n\nFeatures\n--------\n\nFind faces in pictures\n^^^^^^^^^^^^^^^^^^^^^^\n\nFind all the faces that appear in a picture:\n\n|image3|\n\n.. code:: python\n\n    import face_recognition\n    image = face_recognition.load_image_file(\"your_file.jpg\")\n    face_locations = face_recognition.face_locations(image)\n\nFind and manipulate facial features in pictures\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nGet the locations and outlines of each person's eyes, nose, mouth and\nchin.\n\n|image4|\n\n.. code:: python\n\n    import face_recognition\n    image = face_recognition.load_image_file(\"your_file.jpg\")\n    face_landmarks_list = face_recognition.face_landmarks(image)\n\n| Finding facial features is super useful for lots of important stuff.\n  But you can also use for really stupid stuff\n| like applying `digital\n  make-up <https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py>`__\n  (think 'Meitu'):\n\n|image5|\n\nIdentify faces in pictures\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nRecognize who appears in each photo.\n\n|image6|\n\n.. code:: python\n\n    import face_recognition\n    known_image = face_recognition.load_image_file(\"biden.jpg\")\n    unknown_image = face_recognition.load_image_file(\"unknown.jpg\")\n\n    biden_encoding = face_recognition.face_encodings(known_image)[0]\n    unknown_encoding = face_recognition.face_encodings(unknown_image)[0]\n\n    results = face_recognition.compare_faces([biden_encoding], unknown_encoding)\n\nYou can even use this library with other Python libraries to do\nreal-time face recognition:\n\n|image7|\n\nSee `this\nexample <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__\nfor the code.\n\nInstallation\n------------\n\nRequirements\n^^^^^^^^^^^^\n\n-  Python 3.3+ or Python 2.7\n-  macOS or Linux (Windows not officially supported, but might work)\n\nInstalling on Mac or Linux\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFirst, make sure you have dlib already installed with Python bindings:\n\n-  `How to install dlib from source on macOS or\n   Ubuntu <https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf>`__\n\nThen, install this module from pypi using ``pip3`` (or ``pip2`` for\nPython 2):\n\n.. code:: bash\n\n    pip3 install face_recognition\n\n| If you are having trouble with installation, you can also try out a\n| `pre-configured\n  VM <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__.\n\nInstalling on Raspberry Pi 2+\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n-  `Raspberry Pi 2+ installation\n   instructions <https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65>`__\n\nInstalling on Windows\n^^^^^^^^^^^^^^^^^^^^^\n\nWhile Windows isn't officially supported, helpful users have posted\ninstructions on how to install this library:\n\n-  `@masoudr's Windows 10 installation guide (dlib +\n   face\\_recognition) <https://github.com/ageitgey/face_recognition/issues/175#issue-257710508>`__\n\nInstalling a pre-configured Virtual Machine image\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n-  `Download the pre-configured VM\n   image <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__\n   (for VMware Player or VirtualBox).\n\nUsage\n-----\n\nCommand-Line Interface\n^^^^^^^^^^^^^^^^^^^^^^\n\n| When you install ``face_recognition``, you get a simple command-line\n  program\n| called ``face_recognition`` that you can use to recognize faces in a\n| photograph or folder full for photographs.\n\n| First, you need to provide a folder with one picture of each person\n  you\n| already know. There should be one image file for each person with the\n| files named according to who is in the picture:\n\n|known|\n\nNext, you need a second folder with the files you want to identify:\n\n|unknown|\n\n| Then in you simply run the command ``face_recognition``, passing in\n| the folder of known people and the folder (or single image) with\n  unknown\n| people and it tells you who is in each image:\n\n.. code:: bash\n\n    $ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n\n| There's one line in the output for each face. The data is\n  comma-separated\n| with the filename and the name of the person found.\n\n| An ``unknown_person`` is a face in the image that didn't match anyone\n  in\n| your folder of known people.\n\nAdjusting Tolerance / Sensitivity\n'''''''''''''''''''''''''''''''''\n\n| If you are getting multiple matches for the same person, it might be\n  that\n| the people in your photos look very similar and a lower tolerance\n  value\n| is needed to make face comparisons more strict.\n\n| You can do that with the ``--tolerance`` parameter. The default\n  tolerance\n| value is 0.6 and lower numbers make face comparisons more strict:\n\n.. code:: bash\n\n    $ face_recognition --tolerance 0.54 ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n\n| If you want to see the face distance calculated for each match in\n  order\n| to adjust the tolerance setting, you can use ``--show-distance true``:\n\n.. code:: bash\n\n    $ face_recognition --show-distance true ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama,0.378542298956785\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person,None\n\nMore Examples\n'''''''''''''\n\n| If you simply want to know the names of the people in each photograph\n  but don't\n| care about file names, you could do this:\n\n.. code:: bash\n\n    $ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/ | cut -d ',' -f2\n\n    Barack Obama\n    unknown_person\n\nSpeeding up Face Recognition\n''''''''''''''''''''''''''''\n\n| Face recognition can be done in parallel if you have a computer with\n| multiple CPU cores. For example if your system has 4 CPU cores, you\n  can\n| process about 4 times as many images in the same amount of time by\n  using\n| all your CPU cores in parallel.\n\nIf you are using Python 3.4 or newer, pass in a\n``--cpus <number_of_cpu_cores_to_use>`` parameter:\n\n.. code:: bash\n\n    $ face_recognition --cpus 4 ./pictures_of_people_i_know/ ./unknown_pictures/\n\nYou can also pass in ``--cpus -1`` to use all CPU cores in your system.\n\nPython Module\n^^^^^^^^^^^^^\n\n| You can import the ``face_recognition`` module and then easily\n  manipulate\n| faces with just a couple of lines of code. It's super easy!\n\nAPI Docs:\n`https://face-recognition.readthedocs.io <https://face-recognition.readthedocs.io/en/latest/face_recognition.html>`__.\n\nAutomatically find all the faces in an image\n''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_locations = face_recognition.face_locations(image)\n\n    # face_locations is now an array listing the co-ordinates of each face!\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py>`__\n| to try it out.\n\nYou can also opt-in to a somewhat more accurate deep-learning-based face\ndetection model.\n\n| Note: GPU acceleration (via nvidia's CUDA library) is required for\n  good\n| performance with this model. You'll also want to enable CUDA support\n| when compliling ``dlib``.\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_locations = face_recognition.face_locations(image, model=\"cnn\")\n\n    # face_locations is now an array listing the co-ordinates of each face!\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py>`__\n| to try it out.\n\n| If you have a lot of images and a GPU, you can also\n| `find faces in\n  batches <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py>`__.\n\nAutomatically locate the facial features of a person in an image\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_landmarks_list = face_recognition.face_landmarks(image)\n\n    # face_landmarks_list is now an array with the locations of each facial feature in each face.\n    # face_landmarks_list[0]['left_eye'] would be the location and outline of the first person's left eye.\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py>`__\n| to try it out.\n\nRecognize faces in images and identify who they are\n'''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    picture_of_me = face_recognition.load_image_file(\"me.jpg\")\n    my_face_encoding = face_recognition.face_encodings(picture_of_me)[0]\n\n    # my_face_encoding now contains a universal 'encoding' of my facial features that can be compared to any other picture of a face!\n\n    unknown_picture = face_recognition.load_image_file(\"unknown.jpg\")\n    unknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0]\n\n    # Now we can see the two face encodings are of the same person with `compare_faces`!\n\n    results = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding)\n\n    if results[0] == True:\n        print(\"It's a picture of me!\")\n    else:\n        print(\"It's not a picture of me!\")\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py>`__\n| to try it out.\n\nPython Code Examples\n--------------------\n\nAll the examples are available\n`here <https://github.com/ageitgey/face_recognition/tree/master/examples>`__.\n\nFace Detection\n^^^^^^^^^^^^^^\n\n-  `Find faces in a\n   photograph <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py>`__\n-  `Find faces in a photograph (using deep\n   learning) <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py>`__\n-  `Find faces in batches of images w/ GPU (using deep\n   learning) <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py>`__\n\nFacial Features\n^^^^^^^^^^^^^^^\n\n-  `Identify specific facial features in a\n   photograph <https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py>`__\n-  `Apply (horribly ugly) digital\n   make-up <https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py>`__\n\nFacial Recognition\n^^^^^^^^^^^^^^^^^^\n\n-  `Find and recognize unknown faces in a photograph based on\n   photographs of known\n   people <https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py>`__\n-  `Compare faces by numeric face distance instead of only True/False\n   matches <https://github.com/ageitgey/face_recognition/blob/master/examples/face_distance.py>`__\n-  `Recognize faces in live video using your webcam - Simple / Slower\n   Version (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py>`__\n-  `Recognize faces in live video using your webcam - Faster Version\n   (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__\n-  `Recognize faces in a video file and write out new video file\n   (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_video_file.py>`__\n-  `Recognize faces on a Raspberry Pi w/\n   camera <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_on_raspberry_pi.py>`__\n-  `Run a web service to recognize faces via HTTP (Requires Flask to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/web_service_example.py>`__\n-  `Recognize faces with a K-nearest neighbors\n   classifier <https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py>`__\n\n   .. rubric:: How Face Recognition Works\n      :name: how-face-recognition-works\n\n| If you want to learn how face location and recognition work instead of\n| depending on a black box library, `read my\n  article <https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78>`__.\n\nCaveats\n-------\n\n-  The face recognition model is trained on adults and does not work\n   very well on children. It tends to mix\n   up children quite easy using the default comparison threshold of 0.6.\n\nDeployment to Cloud Hosts (Heroku, AWS, etc)\n--------------------------------------------\n\n| Since ``face_recognition`` depends on ``dlib`` which is written in\n  C++, it can be tricky to deploy an app\n| using it to a cloud hosting provider like Heroku or AWS.\n\n| To make things easier, there's an example Dockerfile in this repo that\n  shows how to run an app built with\n| ``face_recognition`` in a `Docker <https://www.docker.com/>`__\n  container. With that, you should be able to deploy\n| to any service that supports Docker images.\n\nCommon Issues\n-------------\n\nIssue: ``Illegal instruction (core dumped)`` when using\nface\\_recognition or running examples.\n\n| Solution: ``dlib`` is compiled with SSE4 or AVX support, but your CPU\n  is too old and doesn't support that.\n| You'll need to recompile ``dlib`` after `making the code change\n  outlined\n  here <https://github.com/ageitgey/face_recognition/issues/11#issuecomment-287398611>`__.\n\nIssue:\n``RuntimeError: Unsupported image type, must be 8bit gray or RGB image.``\nwhen running the webcam examples.\n\nSolution: Your webcam probably isn't set up correctly with OpenCV. `Look\nhere for\nmore <https://github.com/ageitgey/face_recognition/issues/21#issuecomment-287779524>`__.\n\nIssue: ``MemoryError`` when running ``pip2 install face_recognition``\n\n| Solution: The face\\_recognition\\_models file is too big for your\n  available pip cache memory. Instead,\n| try ``pip2 --no-cache-dir install face_recognition`` to avoid the\n  issue.\n\nIssue:\n``AttributeError: 'module' object has no attribute 'face_recognition_model_v1'``\n\nSolution: The version of ``dlib`` you have installed is too old. You\nneed version 19.7 or newer. Upgrade ``dlib``.\n\nIssue:\n``Attribute Error: 'Module' object has no attribute 'cnn_face_detection_model_v1'``\n\nSolution: The version of ``dlib`` you have installed is too old. You\nneed version 19.7 or newer. Upgrade ``dlib``.\n\nIssue: ``TypeError: imread() got an unexpected keyword argument 'mode'``\n\nSolution: The version of ``scipy`` you have installed is too old. You\nneed version 0.17 or newer. Upgrade ``scipy``.\n\nThanks\n------\n\n-  Many, many thanks to `Davis King <https://github.com/davisking>`__\n   (`@nulhom <https://twitter.com/nulhom>`__)\n   for creating dlib and for providing the trained facial feature\n   detection and face encoding models\n   used in this library. For more information on the ResNet that powers\n   the face encodings, check out\n   his `blog\n   post <http://blog.dlib.net/2017/02/high-quality-face-recognition-with-deep.html>`__.\n-  Thanks to everyone who works on all the awesome Python data science\n   libraries like numpy, scipy, scikit-image,\n   pillow, etc, etc that makes this kind of stuff so easy and fun in\n   Python.\n-  Thanks to `Cookiecutter <https://github.com/audreyr/cookiecutter>`__\n   and the\n   `audreyr/cookiecutter-pypackage <https://github.com/audreyr/cookiecutter-pypackage>`__\n   project template\n   for making Python project packaging way more tolerable.\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/face_recognition.svg\n   :target: https://pypi.python.org/pypi/face_recognition\n.. |Build Status| image:: https://travis-ci.org/ageitgey/face_recognition.svg?branch=master\n   :target: https://travis-ci.org/ageitgey/face_recognition\n.. |Documentation Status| image:: https://readthedocs.org/projects/face-recognition/badge/?version=latest\n   :target: http://face-recognition.readthedocs.io/en/latest/?badge=latest\n.. |image3| image:: https://cloud.githubusercontent.com/assets/896692/23625227/42c65360-025d-11e7-94ea-b12f28cb34b4.png\n.. |image4| image:: https://cloud.githubusercontent.com/assets/896692/23625282/7f2d79dc-025d-11e7-8728-d8924596f8fa.png\n.. |image5| image:: https://cloud.githubusercontent.com/assets/896692/23625283/80638760-025d-11e7-80a2-1d2779f7ccab.png\n.. |image6| image:: https://cloud.githubusercontent.com/assets/896692/23625229/45e049b6-025d-11e7-89cc-8a71cf89e713.png\n.. |image7| image:: https://cloud.githubusercontent.com/assets/896692/24430398/36f0e3f0-13cb-11e7-8258-4d0c9ce1e419.gif\n.. |known| image:: https://cloud.githubusercontent.com/assets/896692/23582466/8324810e-00df-11e7-82cf-41515eba704d.png\n.. |unknown| image:: https://cloud.githubusercontent.com/assets/896692/23582465/81f422f8-00df-11e7-8b0d-75364f641f58.png\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11FC:3EACB:179CCB:5DC60C:6AB92A3A"},"text_sha256":"fd502ac06f94d18f8549c7ff8f52d0074efdf7923b7f663247bee809a4f8ce67"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2680","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086E:1C46F8:17BBD29:1BDD5F9:6AB92A3C"},"commit":{"sha":"9f3061aaeed9a8756d2c970f5dfe066617a8281d","url":"https://github.com/ageitgey/face_recognition/commit/9f3061aaeed9a8756d2c970f5dfe066617a8281d","date":"2026-06-25T11:12:50Z","author_date":"2026-06-25T11:12:50Z","committer_date":"2026-06-25T11:12:50Z","tree_sha":"bd0378dde6089d436f7b2fbdbbeafb9210941053","message_first_line":"Merge pull request #1672 from 17X61/auto-contrib/1670-lfw-link"},"tree_request_status":200,"tree_rate":{"github_remaining":"2679","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:128D711:15DF92D:6AB92A3C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19465,"blob_sha":"2b198de1840c9a26455a1869691a655d05e79713","priority":0},{"path":"README.rst","size":17523,"blob_sha":"16edc6c13aa10168220fc411c22f3ac77fc3a38d","priority":0}],"documents":[{"path":"README.md","size":19465,"blob_sha":"2b198de1840c9a26455a1869691a655d05e79713","priority":0,"status":200,"text":"# Face Recognition\n\n_You can also read a translated version of this file [in Chinese 简体中文版](https://github.com/ageitgey/face_recognition/blob/master/README_Simplified_Chinese.md) or [in Korean 한국어](https://github.com/ageitgey/face_recognition/blob/master/README_Korean.md) or [in Japanese 日本語](https://github.com/m-i-k-i/face_recognition/blob/master/README_Japanese.md)._\n\nRecognize and manipulate faces from Python or from the command line with\nthe world's simplest face recognition library.\n\nBuilt using [dlib](http://dlib.net/)'s state-of-the-art face recognition\nbuilt with deep learning. The model has an accuracy of 99.38% on the\nLabeled Faces in the Wild benchmark (see the [LFW paper (PDF)](https://people.cs.umass.edu/~elm/papers/lfw.pdf)).\n\nThis also provides a simple `face_recognition` command line tool that lets\nyou do face recognition on a folder of images from the command line!\n\n\n[![PyPI](https://img.shields.io/pypi/v/face_recognition.svg)](https://pypi.python.org/pypi/face_recognition)\n[![Build Status](https://github.com/ageitgey/face_recognition/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/ageitgey/face_recognition/actions?query=workflow%3ACI)\n[![Documentation Status](https://readthedocs.org/projects/face-recognition/badge/?version=latest)](http://face-recognition.readthedocs.io/en/latest/?badge=latest)\n\n## Features\n\n#### Find faces in pictures\n\nFind all the faces that appear in a picture:\n\n![](https://cloud.githubusercontent.com/assets/896692/23625227/42c65360-025d-11e7-94ea-b12f28cb34b4.png)\n\n```python\nimport face_recognition\nimage = face_recognition.load_image_file(\"your_file.jpg\")\nface_locations = face_recognition.face_locations(image)\n```\n\n#### Find and manipulate facial features in pictures\n\nGet the locations and outlines of each person's eyes, nose, mouth and chin.\n\n![](https://cloud.githubusercontent.com/assets/896692/23625282/7f2d79dc-025d-11e7-8728-d8924596f8fa.png)\n\n```python\nimport face_recognition\nimage = face_recognition.load_image_file(\"your_file.jpg\")\nface_landmarks_list = face_recognition.face_landmarks(image)\n```\n\nFinding facial features is super useful for lots of important stuff. But you can also use it for really stupid stuff\nlike applying [digital make-up](https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py) (think 'Meitu'):\n\n![](https://cloud.githubusercontent.com/assets/896692/23625283/80638760-025d-11e7-80a2-1d2779f7ccab.png)\n\n#### Identify faces in pictures\n\nRecognize who appears in each photo.\n\n![](https://cloud.githubusercontent.com/assets/896692/23625229/45e049b6-025d-11e7-89cc-8a71cf89e713.png)\n\n```python\nimport face_recognition\nknown_image = face_recognition.load_image_file(\"biden.jpg\")\nunknown_image = face_recognition.load_image_file(\"unknown.jpg\")\n\nbiden_encoding = face_recognition.face_encodings(known_image)[0]\nunknown_encoding = face_recognition.face_encodings(unknown_image)[0]\n\nresults = face_recognition.compare_faces([biden_encoding], unknown_encoding)\n```\n\nYou can even use this library with other Python libraries to do real-time face recognition:\n\n![](https://cloud.githubusercontent.com/assets/896692/24430398/36f0e3f0-13cb-11e7-8258-4d0c9ce1e419.gif)\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py) for the code.\n\n## Online Demos\n\nUser-contributed shared Jupyter notebook demo (not officially supported): [![Deepnote](https://beta.deepnote.org/buttons/try-in-a-jupyter-notebook.svg)](https://beta.deepnote.org/launch?template=face_recognition)\n\n## Installation\n\n### Requirements\n\n  * Python 3.3+ or Python 2.7\n  * macOS or Linux (Windows not officially supported, but might work)\n\n### Installation Options:\n\n#### Installing on Mac or Linux\n\nFirst, make sure you have dlib already installed with Python bindings:\n\n  * [How to install dlib from source on macOS or Ubuntu](https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf)\n  \nThen, make sure you have cmake installed:  \n \n```brew install cmake```\n\nFinally, install this module from pypi using `pip3` (or `pip2` for Python 2):\n\n```bash\npip3 install face_recognition\n```\n\nAlternatively, you can try this library with [Docker](https://www.docker.com/), see [this section](#deployment).\n\nIf you are having trouble with installation, you can also try out a\n[pre-configured VM](https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b).\n\n#### Installing on an Nvidia Jetson Nano board\n\n * [Jetson Nano installation instructions](https://medium.com/@ageitgey/build-a-hardware-based-face-recognition-system-for-150-with-the-nvidia-jetson-nano-and-python-a25cb8c891fd)\n   * Please follow the instructions in the article carefully. There is current a bug in the CUDA libraries on the Jetson Nano that will cause this library to fail silently if you don't follow the instructions in the article to comment out a line in dlib and recompile it.\n\n#### Installing on Raspberry Pi 2+\n\n  * [Raspberry Pi 2+ installation instructions](https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65)\n\n#### Installing on FreeBSD\n\n```bash\npkg install graphics/py-face_recognition\n```\n\n#### Installing on Windows\n\nWhile Windows isn't officially supported, helpful users have posted instructions on how to install this library:\n\n  * [@masoudr's Windows 10 installation guide (dlib + face_recognition)](https://github.com/ageitgey/face_recognition/issues/175#issue-257710508)\n\n#### Installing a pre-configured Virtual Machine image\n\n  * [Download the pre-configured VM image](https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b) (for VMware Player or VirtualBox).\n\n## Usage\n\n### Command-Line Interface\n\nWhen you install `face_recognition`, you get two simple command-line \nprograms:\n\n* `face_recognition` - Recognize faces in a photograph or folder full for \n   photographs.\n* `face_detection` - Find faces in a photograph or folder full for photographs.\n\n#### `face_recognition` command line tool\n\nThe `face_recognition` command lets you recognize faces in a photograph or \nfolder full  for photographs.\n\nFirst, you need to provide a folder with one picture of each person you\nalready know. There should be one image file for each person with the\nfiles named according to who is in the picture:\n\n![known](https://cloud.githubusercontent.com/assets/896692/23582466/8324810e-00df-11e7-82cf-41515eba704d.png)\n\nNext, you need a second folder with the files you want to identify:\n\n![unknown](https://cloud.githubusercontent.com/assets/896692/23582465/81f422f8-00df-11e7-8b0d-75364f641f58.png)\n\nThen in you simply run the command `face_recognition`, passing in\nthe folder of known people and the folder (or single image) with unknown\npeople and it tells you who is in each image:\n\n```bash\n$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n```\n\nThere's one line in the output for each face. The data is comma-separated\nwith the filename and the name of the person found.\n\nAn `unknown_person` is a face in the image that didn't match anyone in\nyour folder of known people.\n\n#### `face_detection` command line tool\n\nThe `face_detection` command lets you find the location (pixel coordinatates) \nof any faces in an image.\n\nJust run the command `face_detection`, passing in a folder of images \nto check (or a single image):\n\n```bash\n$ face_detection  ./folder_with_pictures/\n\nexamples/image1.jpg,65,215,169,112\nexamples/image2.jpg,62,394,211,244\nexamples/image2.jpg,95,941,244,792\n```\n\nIt prints one line for each face that was detected. The coordinates\nreported are the top, right, bottom and left coordinates of the face (in pixels).\n \n##### Adjusting Tolerance / Sensitivity\n\nIf you are getting multiple matches for the same person, it might be that\nthe people in your photos look very similar and a lower tolerance value\nis needed to make face comparisons more strict.\n\nYou can do that with the `--tolerance` parameter. The default tolerance\nvalue is 0.6 and lower numbers make face comparisons more strict:\n\n```bash\n$ face_recognition --tolerance 0.54 ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n```\n\nIf you want to see the face distance calculated for each match in order\nto adjust the tolerance setting, you can use `--show-distance true`:\n\n```bash\n$ face_recognition --show-distance true ./pictures_of_people_i_know/ ./unknown_pictures/\n\n/unknown_pictures/unknown.jpg,Barack Obama,0.378542298956785\n/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person,None\n```\n\n##### More Examples\n\nIf you simply want to know the names of the people in each photograph but don't\ncare about file names, you could do this:\n\n```bash\n$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/ | cut -d ',' -f2\n\nBarack Obama\nunknown_person\n```\n\n##### Speeding up Face Recognition\n\nFace recognition can be done in parallel if you have a computer with\nmultiple CPU cores. For example, if your system has 4 CPU cores, you can\nprocess about 4 times as many images in the same amount of time by using\nall your CPU cores in parallel.\n\nIf you are using Python 3.4 or newer, pass in a `--cpus <number_of_cpu_cores_to_use>` parameter:\n\n```bash\n$ face_recognition --cpus 4 ./pictures_of_people_i_know/ ./unknown_pictures/\n```\n\nYou can also pass in `--cpus -1` to use all CPU cores in your system.\n\n#### Python Module\n\nYou can import the `face_recognition` module and then easily manipulate\nfaces with just a couple of lines of code. It's super easy!\n\nAPI Docs: [https://face-recognition.readthedocs.io](https://face-recognition.readthedocs.io/en/latest/face_recognition.html).\n\n##### Automatically find all the faces in an image\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_locations = face_recognition.face_locations(image)\n\n# face_locations is now an array listing the co-ordinates of each face!\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py)\n to try it out.\n\nYou can also opt-in to a somewhat more accurate deep-learning-based face detection model.\n\nNote: GPU acceleration (via NVidia's CUDA library) is required for good\nperformance with this model. You'll also want to enable CUDA support\nwhen compliling `dlib`.\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_locations = face_recognition.face_locations(image, model=\"cnn\")\n\n# face_locations is now an array listing the co-ordinates of each face!\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py)\n to try it out.\n\nIf you have a lot of images and a GPU, you can also\n[find faces in batches](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py).\n\n##### Automatically locate the facial features of a person in an image\n\n```python\nimport face_recognition\n\nimage = face_recognition.load_image_file(\"my_picture.jpg\")\nface_landmarks_list = face_recognition.face_landmarks(image)\n\n# face_landmarks_list is now an array with the locations of each facial feature in each face.\n# face_landmarks_list[0]['left_eye'] would be the location and outline of the first person's left eye.\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py)\n to try it out.\n\n##### Recognize faces in images and identify who they are\n\n```python\nimport face_recognition\n\npicture_of_me = face_recognition.load_image_file(\"me.jpg\")\nmy_face_encoding = face_recognition.face_encodings(picture_of_me)[0]\n\n# my_face_encoding now contains a universal 'encoding' of my facial features that can be compared to any other picture of a face!\n\nunknown_picture = face_recognition.load_image_file(\"unknown.jpg\")\nunknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0]\n\n# Now we can see the two face encodings are of the same person with `compare_faces`!\n\nresults = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding)\n\nif results[0] == True:\n    print(\"It's a picture of me!\")\nelse:\n    print(\"It's not a picture of me!\")\n```\n\nSee [this example](https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py)\n to try it out.\n\n## Python Code Examples\n\nAll the examples are available [here](https://github.com/ageitgey/face_recognition/tree/master/examples).\n\n\n#### Face Detection\n\n* [Find faces in a photograph](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py)\n* [Find faces in a photograph (using deep learning)](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py)\n* [Find faces in batches of images w/ GPU (using deep learning)](https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py)\n* [Blur all the faces in a live video using your webcam (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/blur_faces_on_webcam.py)\n\n#### Facial Features\n\n* [Identify specific facial features in a photograph](https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py)\n* [Apply (horribly ugly) digital make-up](https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py)\n\n#### Facial Recognition\n\n* [Find and recognize unknown faces in a photograph based on photographs of known people](https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py)\n* [Identify and draw boxes around each person in a photo](https://github.com/ageitgey/face_recognition/blob/master/examples/identify_and_draw_boxes_on_faces.py)\n* [Compare faces by numeric face distance instead of only True/False matches](https://github.com/ageitgey/face_recognition/blob/master/examples/face_distance.py)\n* [Recognize faces in live video using your webcam - Simple / Slower Version (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py)\n* [Recognize faces in live video using your webcam - Faster Version (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py)\n* [Recognize faces in a video file and write out new video file (Requires OpenCV to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_video_file.py)\n* [Recognize faces on a Raspberry Pi w/ camera](https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_on_raspberry_pi.py)\n* [Run a web service to recognize faces via HTTP (Requires Flask to be installed)](https://github.com/ageitgey/face_recognition/blob/master/examples/web_service_example.py)\n* [Recognize faces with a K-nearest neighbors classifier](https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py)\n* [Train multiple images per person then recognize faces using a SVM](https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_svm.py)\n\n## Creating a Standalone Executable\nIf you want to create a standalone executable that can run without the need to install `python` or `face_recognition`, you can use [PyInstaller](https://github.com/pyinstaller/pyinstaller). However, it requires some custom configuration to work with this library. See [this issue](https://github.com/ageitgey/face_recognition/issues/357) for how to do it.\n\n## Articles and Guides that cover `face_recognition`\n\n- My article on how Face Recognition works: [Modern Face Recognition with Deep Learning](https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78)\n  - Covers the algorithms and how they generally work\n- [Face recognition with OpenCV, Python, and deep learning](https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/) by Adrian Rosebrock\n  - Covers how to use face recognition in practice\n- [Raspberry Pi Face Recognition](https://www.pyimagesearch.com/2018/06/25/raspberry-pi-face-recognition/) by Adrian Rosebrock\n  - Covers how to use this on a Raspberry Pi\n- [Face clustering with Python](https://www.pyimagesearch.com/2018/07/09/face-clustering-with-python/) by Adrian Rosebrock\n  - Covers how to automatically cluster photos based on who appears in each photo using unsupervised learning\n\n## How Face Recognition Works\n\nIf you want to learn how face location and recognition work instead of\ndepending on a black box library, [read my article](https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78).\n\n## Caveats\n\n* The face recognition model is trained on adults and does not work very well on children. It tends to mix\n  up children quite easy using the default comparison threshold of 0.6.\n* Accuracy may vary between ethnic groups. Please see [this wiki page](https://github.com/ageitgey/face_recognition/wiki/Face-Recognition-Accuracy-Problems#question-face-recognition-works-well-with-european-individuals-but-overall-accuracy-is-lower-with-asian-individuals) for more details.\n\n## <a name=\"deployment\">Deployment to Cloud Hosts (Heroku, AWS, etc)<\/a>\n\nSince `face_recognition` depends on `dlib` which is written in C++, it can be tricky to deploy an app\nusing it to a cloud hosting provider like Heroku or AWS.\n\nTo make things easier, there's an example Dockerfile in this repo that shows how to run an app built with\n`face_recognition` in a [Docker](https://www.docker.com/) container. With that, you should be able to deploy\nto any service that supports Docker images.\n\nYou can try the Docker image locally by running: `docker-compose up --build`\n\nThere are also [several prebuilt Docker images.](docker/README.md)\n\nLinux users with a GPU (drivers >= 384.81) and [Nvidia-Docker](https://github.com/NVIDIA/nvidia-docker) installed can run the example on the GPU: Open the [docker-compose.yml](docker-compose.yml) file and uncomment the `dockerfile: Dockerfile.gpu` and `runtime: nvidia` lines.\n\n## Having problems?\n\nIf you run into problems, please read the [Common Errors](https://github.com/ageitgey/face_recognition/wiki/Common-Errors) section of the wiki before filing a github issue.\n\n## Thanks\n\n* Many, many thanks to [Davis King](https://github.com/davisking) ([@nulhom](https://twitter.com/nulhom))\n  for creating dlib and for providing the trained facial feature detection and face encoding models\n  used in this library. For more information on the ResNet that powers the face encodings, check out\n  his [blog post](http://blog.dlib.net/2017/02/high-quality-face-recognition-with-deep.html).\n* Thanks to everyone who works on all the awesome Python data science libraries like numpy, scipy, scikit-image,\n  pillow, etc, etc that makes this kind of stuff so easy and fun in Python.\n* Thanks to [Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n  [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template\n  for making Python project packaging way more tolerable.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4AA:35999:178049:5DAA9D:6AB92A3C"},"text_sha256":"a21a1859f5b666d680ef81a46f89a9c5b8d423762c01b8e7f11a95885fd53db3"},{"path":"README.rst","size":17523,"blob_sha":"16edc6c13aa10168220fc411c22f3ac77fc3a38d","priority":0,"status":200,"text":"Face Recognition\n================\n\n| Recognize and manipulate faces from Python or from the command line\n  with\n| the world's simplest face recognition library.\n\n| Built using `dlib <http://dlib.net/>`__'s state-of-the-art face\n  recognition\n| built with deep learning. The model has an accuracy of 99.38% on the\n| `Labeled Faces in the Wild <http://vis-www.cs.umass.edu/lfw/>`__\n  benchmark.\n\n| This also provides a simple ``face_recognition`` command line tool\n  that lets\n| you do face recognition on a folder of images from the command line!\n\n| |PyPI|\n| |Build Status|\n| |Documentation Status|\n\nFeatures\n--------\n\nFind faces in pictures\n^^^^^^^^^^^^^^^^^^^^^^\n\nFind all the faces that appear in a picture:\n\n|image3|\n\n.. code:: python\n\n    import face_recognition\n    image = face_recognition.load_image_file(\"your_file.jpg\")\n    face_locations = face_recognition.face_locations(image)\n\nFind and manipulate facial features in pictures\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nGet the locations and outlines of each person's eyes, nose, mouth and\nchin.\n\n|image4|\n\n.. code:: python\n\n    import face_recognition\n    image = face_recognition.load_image_file(\"your_file.jpg\")\n    face_landmarks_list = face_recognition.face_landmarks(image)\n\n| Finding facial features is super useful for lots of important stuff.\n  But you can also use for really stupid stuff\n| like applying `digital\n  make-up <https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py>`__\n  (think 'Meitu'):\n\n|image5|\n\nIdentify faces in pictures\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nRecognize who appears in each photo.\n\n|image6|\n\n.. code:: python\n\n    import face_recognition\n    known_image = face_recognition.load_image_file(\"biden.jpg\")\n    unknown_image = face_recognition.load_image_file(\"unknown.jpg\")\n\n    biden_encoding = face_recognition.face_encodings(known_image)[0]\n    unknown_encoding = face_recognition.face_encodings(unknown_image)[0]\n\n    results = face_recognition.compare_faces([biden_encoding], unknown_encoding)\n\nYou can even use this library with other Python libraries to do\nreal-time face recognition:\n\n|image7|\n\nSee `this\nexample <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__\nfor the code.\n\nInstallation\n------------\n\nRequirements\n^^^^^^^^^^^^\n\n-  Python 3.3+ or Python 2.7\n-  macOS or Linux (Windows not officially supported, but might work)\n\nInstalling on Mac or Linux\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFirst, make sure you have dlib already installed with Python bindings:\n\n-  `How to install dlib from source on macOS or\n   Ubuntu <https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf>`__\n\nThen, install this module from pypi using ``pip3`` (or ``pip2`` for\nPython 2):\n\n.. code:: bash\n\n    pip3 install face_recognition\n\n| If you are having trouble with installation, you can also try out a\n| `pre-configured\n  VM <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__.\n\nInstalling on Raspberry Pi 2+\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n-  `Raspberry Pi 2+ installation\n   instructions <https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65>`__\n\nInstalling on Windows\n^^^^^^^^^^^^^^^^^^^^^\n\nWhile Windows isn't officially supported, helpful users have posted\ninstructions on how to install this library:\n\n-  `@masoudr's Windows 10 installation guide (dlib +\n   face\\_recognition) <https://github.com/ageitgey/face_recognition/issues/175#issue-257710508>`__\n\nInstalling a pre-configured Virtual Machine image\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n-  `Download the pre-configured VM\n   image <https://medium.com/@ageitgey/try-deep-learning-in-python-now-with-a-fully-pre-configured-vm-1d97d4c3e9b>`__\n   (for VMware Player or VirtualBox).\n\nUsage\n-----\n\nCommand-Line Interface\n^^^^^^^^^^^^^^^^^^^^^^\n\n| When you install ``face_recognition``, you get a simple command-line\n  program\n| called ``face_recognition`` that you can use to recognize faces in a\n| photograph or folder full for photographs.\n\n| First, you need to provide a folder with one picture of each person\n  you\n| already know. There should be one image file for each person with the\n| files named according to who is in the picture:\n\n|known|\n\nNext, you need a second folder with the files you want to identify:\n\n|unknown|\n\n| Then in you simply run the command ``face_recognition``, passing in\n| the folder of known people and the folder (or single image) with\n  unknown\n| people and it tells you who is in each image:\n\n.. code:: bash\n\n    $ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n\n| There's one line in the output for each face. The data is\n  comma-separated\n| with the filename and the name of the person found.\n\n| An ``unknown_person`` is a face in the image that didn't match anyone\n  in\n| your folder of known people.\n\nAdjusting Tolerance / Sensitivity\n'''''''''''''''''''''''''''''''''\n\n| If you are getting multiple matches for the same person, it might be\n  that\n| the people in your photos look very similar and a lower tolerance\n  value\n| is needed to make face comparisons more strict.\n\n| You can do that with the ``--tolerance`` parameter. The default\n  tolerance\n| value is 0.6 and lower numbers make face comparisons more strict:\n\n.. code:: bash\n\n    $ face_recognition --tolerance 0.54 ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person\n\n| If you want to see the face distance calculated for each match in\n  order\n| to adjust the tolerance setting, you can use ``--show-distance true``:\n\n.. code:: bash\n\n    $ face_recognition --show-distance true ./pictures_of_people_i_know/ ./unknown_pictures/\n\n    /unknown_pictures/unknown.jpg,Barack Obama,0.378542298956785\n    /face_recognition_test/unknown_pictures/unknown.jpg,unknown_person,None\n\nMore Examples\n'''''''''''''\n\n| If you simply want to know the names of the people in each photograph\n  but don't\n| care about file names, you could do this:\n\n.. code:: bash\n\n    $ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/ | cut -d ',' -f2\n\n    Barack Obama\n    unknown_person\n\nSpeeding up Face Recognition\n''''''''''''''''''''''''''''\n\n| Face recognition can be done in parallel if you have a computer with\n| multiple CPU cores. For example if your system has 4 CPU cores, you\n  can\n| process about 4 times as many images in the same amount of time by\n  using\n| all your CPU cores in parallel.\n\nIf you are using Python 3.4 or newer, pass in a\n``--cpus <number_of_cpu_cores_to_use>`` parameter:\n\n.. code:: bash\n\n    $ face_recognition --cpus 4 ./pictures_of_people_i_know/ ./unknown_pictures/\n\nYou can also pass in ``--cpus -1`` to use all CPU cores in your system.\n\nPython Module\n^^^^^^^^^^^^^\n\n| You can import the ``face_recognition`` module and then easily\n  manipulate\n| faces with just a couple of lines of code. It's super easy!\n\nAPI Docs:\n`https://face-recognition.readthedocs.io <https://face-recognition.readthedocs.io/en/latest/face_recognition.html>`__.\n\nAutomatically find all the faces in an image\n''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_locations = face_recognition.face_locations(image)\n\n    # face_locations is now an array listing the co-ordinates of each face!\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py>`__\n| to try it out.\n\nYou can also opt-in to a somewhat more accurate deep-learning-based face\ndetection model.\n\n| Note: GPU acceleration (via nvidia's CUDA library) is required for\n  good\n| performance with this model. You'll also want to enable CUDA support\n| when compliling ``dlib``.\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_locations = face_recognition.face_locations(image, model=\"cnn\")\n\n    # face_locations is now an array listing the co-ordinates of each face!\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py>`__\n| to try it out.\n\n| If you have a lot of images and a GPU, you can also\n| `find faces in\n  batches <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py>`__.\n\nAutomatically locate the facial features of a person in an image\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    image = face_recognition.load_image_file(\"my_picture.jpg\")\n    face_landmarks_list = face_recognition.face_landmarks(image)\n\n    # face_landmarks_list is now an array with the locations of each facial feature in each face.\n    # face_landmarks_list[0]['left_eye'] would be the location and outline of the first person's left eye.\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py>`__\n| to try it out.\n\nRecognize faces in images and identify who they are\n'''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n    import face_recognition\n\n    picture_of_me = face_recognition.load_image_file(\"me.jpg\")\n    my_face_encoding = face_recognition.face_encodings(picture_of_me)[0]\n\n    # my_face_encoding now contains a universal 'encoding' of my facial features that can be compared to any other picture of a face!\n\n    unknown_picture = face_recognition.load_image_file(\"unknown.jpg\")\n    unknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0]\n\n    # Now we can see the two face encodings are of the same person with `compare_faces`!\n\n    results = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding)\n\n    if results[0] == True:\n        print(\"It's a picture of me!\")\n    else:\n        print(\"It's not a picture of me!\")\n\n| See `this\n  example <https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py>`__\n| to try it out.\n\nPython Code Examples\n--------------------\n\nAll the examples are available\n`here <https://github.com/ageitgey/face_recognition/tree/master/examples>`__.\n\nFace Detection\n^^^^^^^^^^^^^^\n\n-  `Find faces in a\n   photograph <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture.py>`__\n-  `Find faces in a photograph (using deep\n   learning) <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_picture_cnn.py>`__\n-  `Find faces in batches of images w/ GPU (using deep\n   learning) <https://github.com/ageitgey/face_recognition/blob/master/examples/find_faces_in_batches.py>`__\n\nFacial Features\n^^^^^^^^^^^^^^^\n\n-  `Identify specific facial features in a\n   photograph <https://github.com/ageitgey/face_recognition/blob/master/examples/find_facial_features_in_picture.py>`__\n-  `Apply (horribly ugly) digital\n   make-up <https://github.com/ageitgey/face_recognition/blob/master/examples/digital_makeup.py>`__\n\nFacial Recognition\n^^^^^^^^^^^^^^^^^^\n\n-  `Find and recognize unknown faces in a photograph based on\n   photographs of known\n   people <https://github.com/ageitgey/face_recognition/blob/master/examples/recognize_faces_in_pictures.py>`__\n-  `Compare faces by numeric face distance instead of only True/False\n   matches <https://github.com/ageitgey/face_recognition/blob/master/examples/face_distance.py>`__\n-  `Recognize faces in live video using your webcam - Simple / Slower\n   Version (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py>`__\n-  `Recognize faces in live video using your webcam - Faster Version\n   (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py>`__\n-  `Recognize faces in a video file and write out new video file\n   (Requires OpenCV to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_video_file.py>`__\n-  `Recognize faces on a Raspberry Pi w/\n   camera <https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_on_raspberry_pi.py>`__\n-  `Run a web service to recognize faces via HTTP (Requires Flask to be\n   installed) <https://github.com/ageitgey/face_recognition/blob/master/examples/web_service_example.py>`__\n-  `Recognize faces with a K-nearest neighbors\n   classifier <https://github.com/ageitgey/face_recognition/blob/master/examples/face_recognition_knn.py>`__\n\n   .. rubric:: How Face Recognition Works\n      :name: how-face-recognition-works\n\n| If you want to learn how face location and recognition work instead of\n| depending on a black box library, `read my\n  article <https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78>`__.\n\nCaveats\n-------\n\n-  The face recognition model is trained on adults and does not work\n   very well on children. It tends to mix\n   up children quite easy using the default comparison threshold of 0.6.\n\nDeployment to Cloud Hosts (Heroku, AWS, etc)\n--------------------------------------------\n\n| Since ``face_recognition`` depends on ``dlib`` which is written in\n  C++, it can be tricky to deploy an app\n| using it to a cloud hosting provider like Heroku or AWS.\n\n| To make things easier, there's an example Dockerfile in this repo that\n  shows how to run an app built with\n| ``face_recognition`` in a `Docker <https://www.docker.com/>`__\n  container. With that, you should be able to deploy\n| to any service that supports Docker images.\n\nCommon Issues\n-------------\n\nIssue: ``Illegal instruction (core dumped)`` when using\nface\\_recognition or running examples.\n\n| Solution: ``dlib`` is compiled with SSE4 or AVX support, but your CPU\n  is too old and doesn't support that.\n| You'll need to recompile ``dlib`` after `making the code change\n  outlined\n  here <https://github.com/ageitgey/face_recognition/issues/11#issuecomment-287398611>`__.\n\nIssue:\n``RuntimeError: Unsupported image type, must be 8bit gray or RGB image.``\nwhen running the webcam examples.\n\nSolution: Your webcam probably isn't set up correctly with OpenCV. `Look\nhere for\nmore <https://github.com/ageitgey/face_recognition/issues/21#issuecomment-287779524>`__.\n\nIssue: ``MemoryError`` when running ``pip2 install face_recognition``\n\n| Solution: The face\\_recognition\\_models file is too big for your\n  available pip cache memory. Instead,\n| try ``pip2 --no-cache-dir install face_recognition`` to avoid the\n  issue.\n\nIssue:\n``AttributeError: 'module' object has no attribute 'face_recognition_model_v1'``\n\nSolution: The version of ``dlib`` you have installed is too old. You\nneed version 19.7 or newer. Upgrade ``dlib``.\n\nIssue:\n``Attribute Error: 'Module' object has no attribute 'cnn_face_detection_model_v1'``\n\nSolution: The version of ``dlib`` you have installed is too old. You\nneed version 19.7 or newer. Upgrade ``dlib``.\n\nIssue: ``TypeError: imread() got an unexpected keyword argument 'mode'``\n\nSolution: The version of ``scipy`` you have installed is too old. You\nneed version 0.17 or newer. Upgrade ``scipy``.\n\nThanks\n------\n\n-  Many, many thanks to `Davis King <https://github.com/davisking>`__\n   (`@nulhom <https://twitter.com/nulhom>`__)\n   for creating dlib and for providing the trained facial feature\n   detection and face encoding models\n   used in this library. For more information on the ResNet that powers\n   the face encodings, check out\n   his `blog\n   post <http://blog.dlib.net/2017/02/high-quality-face-recognition-with-deep.html>`__.\n-  Thanks to everyone who works on all the awesome Python data science\n   libraries like numpy, scipy, scikit-image,\n   pillow, etc, etc that makes this kind of stuff so easy and fun in\n   Python.\n-  Thanks to `Cookiecutter <https://github.com/audreyr/cookiecutter>`__\n   and the\n   `audreyr/cookiecutter-pypackage <https://github.com/audreyr/cookiecutter-pypackage>`__\n   project template\n   for making Python project packaging way more tolerable.\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/face_recognition.svg\n   :target: https://pypi.python.org/pypi/face_recognition\n.. |Build Status| image:: https://travis-ci.org/ageitgey/face_recognition.svg?branch=master\n   :target: https://travis-ci.org/ageitgey/face_recognition\n.. |Documentation Status| image:: https://readthedocs.org/projects/face-recognition/badge/?version=latest\n   :target: http://face-recognition.readthedocs.io/en/latest/?badge=latest\n.. |image3| image:: https://cloud.githubusercontent.com/assets/896692/23625227/42c65360-025d-11e7-94ea-b12f28cb34b4.png\n.. |image4| image:: https://cloud.githubusercontent.com/assets/896692/23625282/7f2d79dc-025d-11e7-8728-d8924596f8fa.png\n.. |image5| image:: https://cloud.githubusercontent.com/assets/896692/23625283/80638760-025d-11e7-80a2-1d2779f7ccab.png\n.. |image6| image:: https://cloud.githubusercontent.com/assets/896692/23625229/45e049b6-025d-11e7-89cc-8a71cf89e713.png\n.. |image7| image:: https://cloud.githubusercontent.com/assets/896692/24430398/36f0e3f0-13cb-11e7-8258-4d0c9ce1e419.gif\n.. |known| image:: https://cloud.githubusercontent.com/assets/896692/23582466/8324810e-00df-11e7-82cf-41515eba704d.png\n.. |unknown| image:: https://cloud.githubusercontent.com/assets/896692/23582465/81f422f8-00df-11e7-8b0d-75364f641f58.png\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11FC:3EACB:179CCB:5DC60C:6AB92A3A"},"text_sha256":"fd502ac06f94d18f8549c7ff8f52d0074efdf7923b7f663247bee809a4f8ce67"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"JuliaLang/julia","input_row":{"repository":"JuliaLang/julia","url":"https://github.com/JuliaLang/julia","name":"julia","owner":"JuliaLang","description":"The Julia Programming Language","language":"Julia","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":49159,"issues":26247,"created_at":"2011-04-21T07:01:50Z","updated_at":"2026-09-27T11:51:10Z","first_commit_at":"2009-08-23T03:39:06Z","last_commit_at":"2026-09-27T14:14:02Z","activity_months":205.13999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:49.682Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"JuliaLang/julia","visibility":"public","created_at":"2011-04-21T07:01:50Z","updated_at":"2026-09-27T14:14:08Z","private":false,"fork":false,"archived":false,"stargazers_count":49159,"open_issues_count":4698,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2678","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:180BBAA:1C2DF37:6AB92A3D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2677","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:1789B45:1BAAA21:6AB92A3E"},"commit":{"sha":"779cf842c1b6f1ef60efff1d8b20a3688ea2f1d9","url":"https://github.com/JuliaLang/julia/commit/779cf842c1b6f1ef60efff1d8b20a3688ea2f1d9","date":"2018-05-24T21:24:22Z","author_date":"2018-05-24T21:24:22Z","committer_date":"2018-05-24T21:24:22Z","tree_sha":"2bc85e673fea6a800a8bdfa77bce245eab3de9bd","message_first_line":"freebsdci: invoke check-whitespace (#27243)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2676","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:17EAD0E:1C0D6D2:6AB92A3E"},"tree_truncated":false,"document_candidates":[{"path":"README.arm.md","size":5845,"blob_sha":"9de38fdeee94ec8bdd22236004d3b5421c35d9c7","priority":0},{"path":"README.md","size":30225,"blob_sha":"ae8006dfc9e93df21a95eafb55319806b00e0cd9","priority":0},{"path":"README.windows.md","size":13353,"blob_sha":"6b5e9e476ccef8a00e2abc740791f98954561ded","priority":0}],"documents":[{"path":"README.arm.md","size":5845,"blob_sha":"9de38fdeee94ec8bdd22236004d3b5421c35d9c7","priority":0,"status":200,"text":"# Julia on ARM (Linux)\n\nJulia fully supports ARMv8 (AArch64) processors, and supports ARMv7 and ARMv6\n(AArch32) with some caveats. This file provides general guidelines for compilation,\nin addition to instructions for specific devices.\n\nA list of [known issues](https://github.com/JuliaLang/julia/labels/arm) for ARM is\navailable. If you encounter difficulties, please create an issue including the output\nfrom `cat /proc/cpuinfo`.\n\n\n## Building Julia\n\nIn most cases, Julia can be successfully built by following the platform independent\n[build instructions](https://github.com/JuliaLang/julia/blob/master/README.md).\n\n### Build dependencies\n\nWe recommend using at least Ubuntu 14.04 and gcc 4.8, which is part of the\nstandard `build-essentials`.\n\nIn case the build is failing on one of the dependent libraries, one\ncan install various system libraries instead of building them, by\nadding the following lines in `Make.user`:\n\n````\noverride USE_SYSTEM_BLAS=1\noverride USE_SYSTEM_LAPACK=1\noverride USE_SYSTEM_LIBM=1\noverride USE_SYSTEM_GMP=1\noverride USE_SYSTEM_MPFR=1\noverride USE_SYSTEM_ARPACK=1\n````\n\nThe following command will install all the necessary libraries on Ubuntu:\n\n````\nsudo apt-get install libblas3gf liblapack3gf libarpack2 libgmp3-dev \\\n                     libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \\\n                     g++-4.8 gfortran libgfortran3 m4 libedit-dev\n````\n\nIf you run into issues building LLVM, see [these notes](http://llvm.org/docs/HowToBuildOnARM.html).\n\n\n## 32-bit (ARMv6, ARMv7)\n\nJulia has been successfully compiled on several variants of the following ARMv6 & ARMv7 devices:\n\n* ARMv7 / Cortex A15 Samsung Chromebooks running Ubuntu Linux under Crouton;\n* [Raspberry Pi](https://www.raspberrypi.org).\n* [Odroid](http://www.hardkernel.com/main/main.php).\n\n\nJulia requires at least the `armv6` and `vfpv2` instruction sets. It's recommended to use  `armv7-a`.\n`armv5` or soft float are not supported.\n\n### Binaries\n\n[Nightly builds](https://status.julialang.org/download/linux-arm) are\navailable for ARMv7-A.\n\n### Device specific instructions\n\n#### Raspberry Pi 1 / Raspberry Pi Zero\n\nThe type of ARM CPU used in the Raspberry Pi is not detected by LLVM. Explicitly set the\nCPU target by adding the following to `Make.user`:\n\n````\nJULIA_CPU_TARGET=arm1176jzf-s\n````\n\nIt is preferable to use various system provided dependencies on ARMv6 as described in\n[Build Dependencies](#build-dependencies).\n\nTo complete the build, you may need to increase the swap file size. To do so, edit\n`/etc/dphys-swapfile`, changing the line:\n\n    CONF_SWAPSIZE=100\n\nto:\n\n    CONF_SWAPSIZE=512\n\nbefore restarting the swapfile service:\n\n    sudo /etc/init.d/dphys-swapfile stop\n    sudo /etc/init.d/dphys-swapfile start\n\n#### Raspberry Pi 2\n\nThe type of ARM CPU used in the Raspberry Pi 2 is not detected by LLVM. Explicitly set the\nCPU target by adding the following to `Make.user`:\n\n```JULIA_CPU_TARGET=cortex-a7```\n\nDepending on the exact compiler and distribution, there might be a build failure\ndue to unsupported inline assembly. In that case, add `MARCH=armv7-a` to\n`Make.user`.\n\nIf building LLVM fails, you can download binaries from the LLVM website:\n\n1.  Download the [LLVM 3.9.0 binaries for ARMv7a] (http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-armv7a-linux-gnueabihf.tar.xz) and extract them in a local directory.\n2. Add the following to `Make.user` (adjusting the path to the `llvm-config` binary):\n\n    ```\n    override USE_SYSTEM_LLVM=1\n    LLVM_CONFIG=${EXTRACTED_LOCATION}/bin/llvm-config\n    ```\n\nPlease do let us know if you had to download a pre-built LLVM in [#10235](https://github.com/JuliaLang/julia/issues/10235).\n\n#### Chromebook\n\nOn Chromebooks, you have to first install Crouton. If you do not have\nan Ubuntu chroot running on your Chromebook using Crouton, you can do\nso by following these tutorials.\n\n- [Crouton Tutorial 1](http://www.howtogeek.com/162120/how-to-install-ubuntu-linux-on-your-chromebook-with-crouton/)\n- [Crouton Tutorial 2](http://lifehacker.com/how-to-install-linux-on-a-chromebook-and-unlock-its-ful-509039343)\n\nThese tutorials will end up installing Ubuntu 12.04, and you have to\nupgrade to Ubuntu 14.04, or install Ubuntu 14.04 from scratch by\nfinding appropriate `crouton` help.\n\n#### Scaleway cloud hosted ARM servers\n\nOn the current [Scaleway](http://scaleway.com) ARM servers, the Julia\nbuild works out of the box.\n\n## AArch64 (ARMv8)\n\nJulia has been successfully built on the following ARMv8 devices:\n\n* [nVidia Jetson TX1 & TX2](http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html);\n* [X-Gene 1](https://www.apm.com/products/data-center/x-gene-family/x-gene/);\n* [Overdrive 3000](https://softiron.com/products/overdrive-3000/);\n* [Cavium ThunderX](http://www.cavium.com/ThunderX_ARM_Processors.html) on [packet.net](https://www.packet.net).\n\nCompilation on `ARMv8-A` requires that `Make.user` is configured as follows:\n\n```\nMARCH=armv8-a\n```\n\n### Device specific instructions\n\n#### nVidia Jetson TX2\n\nJulia builds and runs on the [nVidia Jetson TX2](http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html)\nplatform with minimal configuration changes.\n\nAfter configuring `Make.user` as per the `AArch64` instructions in this document,\nfollow the general [build instructions](https://github.com/JuliaLang/julia/blob/master/README.md).\nThe majority of the build dependencies specified in the instructions are installed by\nthe default configuration flashed by [Jetpack 3.0](https://developer.nvidia.com/embedded/jetpack). The remaining tools can be installed by issuing the following command:\n\n```\nsudo apt-get install gfortran wget cmake\n```\n\nA full parallel build, including LLVM,\nwill complete in around two hours. All tests pass and CUDA functionality is available\nthrough, e.g., [CUDAdrv](https://github.com/JuliaGPU/CUDAdrv.jl).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2776:3B6DE:17589C:5D81A0:6AB92A3F"},"text_sha256":"c1dc802336b66ed5b1a4067fd3d8f9ae63f550c6acf5a87b1b0eee0021812d6e"},{"path":"README.md","size":30225,"blob_sha":"ae8006dfc9e93df21a95eafb55319806b00e0cd9","priority":0,"status":200,"text":"<a name=\"logo\"/>\n<div align=\"center\">\n<a href=\"https://julialang.org/\" target=\"_blank\">\n<img src=\"https://julialang.org/images/logo_hires.png\" alt=\"Julia Logo\" width=\"210\" height=\"142\"><\/img>\n<\/a>\n<\/div>\n\nBuild status:\n[![travis][travis-img]](https://travis-ci.org/JuliaLang/julia)\n[![appveyor][appveyor-img]](https://ci.appveyor.com/project/JuliaLang/julia/branch/master)\n\nCode coverage:\n[![coveralls][coveralls-img]](https://coveralls.io/r/JuliaLang/julia?branch=master)\n[![codecov][codecov-img]](http://codecov.io/github/JuliaLang/julia?branch=master)\n\n[travis-img]: https://img.shields.io/travis/JuliaLang/julia/master.svg?label=Linux+/+macOS\n[appveyor-img]: https://img.shields.io/appveyor/ci/JuliaLang/julia/master.svg?label=Windows\n[coveralls-img]: https://img.shields.io/coveralls/github/JuliaLang/julia/master.svg?label=coveralls\n[codecov-img]: https://img.shields.io/codecov/c/github/JuliaLang/julia/master.svg?label=codecov\n\n## The Julia Language\n\nJulia is a high-level, high-performance dynamic language for technical computing.\nThe main homepage for Julia can be found at [julialang.org](https://julialang.org/).\nThis is the GitHub repository of Julia source code, including instructions for compiling and installing Julia, below.\n\n## Resources\n\n- **Homepage:** <https://julialang.org>\n- **Binaries:** <https://julialang.org/downloads/>\n- **Documentation:** <https://docs.julialang.org/>\n- **Packages:** <https://pkg.julialang.org/>\n- **Source code:** <https://github.com/JuliaLang/julia>\n- **Git clone URL:** <git://github.com/JuliaLang/julia.git>\n- **Discussion forum:** <https://discourse.julialang.org>\n- **Mailing lists:** <https://julialang.org/community/>\n- **Slack:** <https://julialang.slack.com> (get an invite from <https://slackinvite.julialang.org>)\n- **Gitter:** <https://gitter.im/JuliaLang/julia>\n- **IRC:** <https://webchat.freenode.net/?channels=julia>\n- **Code coverage:** <https://coveralls.io/r/JuliaLang/julia>\n\nNew developers may find the notes in [CONTRIBUTING](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md) helpful to start contributing to the Julia codebase.\n\n### External Resources\n\n- [**StackOverflow**](https://stackoverflow.com/questions/tagged/julia-lang)\n- [**Youtube**](https://www.youtube.com/channel/UC9IuUwwE2xdjQUT_LMLONoA)\n- [**Twitter**](https://twitter.com/JuliaLanguage)\n- [**Meetup**](http://julia.meetup.com/)\n\n## Currently Supported Platforms\n\nJulia is built and tested regularly on the following platforms:\n\n| Operating System | Architecture     | CI | Binaries | Support Level |\n|:----------------:|:----------------:|:--:|:--------:|:-------------:|\n| Linux 2.6.18+    | x86-64 (64-bit)  | ✓  | ✓        | Official      |\n|                  | i686 (32-bit)    | ✓  | ✓        | Official      |\n|                  | ARM v7 (32-bit)  |    | ✓        | Official      |\n|                  | ARM v8 (64-bit)  |    | ✓        | Official      |\n|                  | PowerPC (64-bit) |    |          | Community     |\n|                  | PTX (64-bit)     | [✓](http://ci.maleadt.net:8010/)  |          | [External](https://github.com/JuliaGPU/CUDAnative.jl)     |\n| macOS 10.8+      | x86-64 (64-bit)  | ✓  | ✓        | Official      |\n| Windows 7+       | x86-64 (64-bit)  | ✓  | ✓        | Official      |\n|                  | i686 (32-bit)    | ✓  | ✓        | Official      |\n| FreeBSD 11.0+    | x86-64 (64-bit)  | ✓  |          | Community     |\n\nAll systems marked with ✓ for CI are tested using continuous integration for every commit.\nSystems with ✓ for binaries have official binaries available on the [downloads](https://julialang.org/downloads) page and are tested regularly. The PTX backend needs a source build and the [CUDAnative.jl](https://github.com/JuliaGPU/CUDAnative.jl) package.\nThe systems listed here with neither CI nor official binaries are known to build and work, but ongoing support for those platforms is dependent on community efforts.\nIt is possible that Julia will build and work on other platforms too, and we're always looking to better our platform coverage.\nIf you're using Julia on a platform not listed here, let us know!\n\n## Source Download and Compilation\n\nFirst, make sure you have all the [required dependencies](#required-build-tools-and-external-libraries) installed.\nThen, acquire the source code by cloning the git repository:\n\n    git clone git://github.com/JuliaLang/julia.git\n\n(If you are behind a firewall, you may need to use the `https` protocol instead of the `git` protocol:\n\n    git config --global url.\"https://\".insteadOf git://\n\nBe sure to also configure your system to use the appropriate proxy settings, e.g. by setting the `https_proxy` and `http_proxy` variables.)\n\nBy default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `0.6` series of releases. You can get this version by changing to the Julia directory and running\n\n    git checkout v0.6.2\n\nNow run `make` to build the `julia` executable. To perform a parallel build, use `make -j N` and supply the maximum number of concurrent processes. (See [Platform Specific Build Notes](https://github.com/JuliaLang/julia#platform-specific-build-notes) for details.)\nWhen compiled the first time, it will automatically download and build its [external dependencies](#required-build-tools-and-external-libraries).\nThis takes a while, but only has to be done once. If the defaults in the build do not work for you, and you need to set specific make parameters, you can save them in `Make.user`. The build will automatically check for the existence of `Make.user` and use it if it exists.\nBuilding Julia requires 1.5GiB of disk space and approximately 700MiB of virtual memory.\n\nFor builds of julia starting with 0.5.0-dev, you can create out-of-tree builds of Julia by specifying `make O=<build-directory> configure` on the command line. This will create a directory mirror, with all of the necessary Makefiles to build Julia, in the specified directory. These builds will share the source files in Julia and `deps/srccache`. Each out-of-tree build directory can have its own `Make.user` file to override the global `Make.user` file in the top-level folder.\n\nIf you need to build Julia on a machine without internet access, use `make -C deps getall` to download all the necessary files. Then, copy the `julia` directory over to the target environment and build with `make`.\n\n**Note:** The build process will fail badly if any of the build directory's parent directories have spaces or other shell meta-characters such as `$` or `:` in their names (this is due to a limitation in GNU make).\n\nOnce it is built, you can run the `julia` executable after you enter your julia directory and run\n\n    ./julia\n\nTo run julia from anywhere you can:\n- add an alias (in `bash`: `echo \"alias julia='/path/to/install/folder/bin/julia'\" >> ~/.bashrc && source ~/.bashrc`), or\n\n- add a soft link to the `julia` executable in the `julia` directory to `/usr/local/bin` (or any suitable directory already in your path), or\n\n- add the `julia` directory to your executable path for this shell session (in `bash`: `export PATH=\"$(pwd):$PATH\"` ; in `csh` or `tcsh`:\n`set path= ( $path $cwd )` ), or\n\n- add the `julia` directory to your executable path permanently (e.g. in `.bash_profile`), or\n\n- write `prefix=/path/to/install/folder` into `Make.user` and then run `make install`. If there is a version of Julia already installed in this folder, you should delete it before running `make install`.\n\nNow you should be able to run Julia like this:\n\n    julia\n\nIf everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation. (Errors related to libraries might be caused by old, incompatible libraries sitting around in your PATH. In this case, try moving the `julia` directory earlier in the PATH). Note that most of the instructions above apply to unix systems.\n\nYour first test of Julia determines whether your build is working properly. From the UNIX/Windows command prompt inside\nthe `julia` source directory, type `make testall`. You should see output that lists a series of running tests;\nif they complete without error, you should be in good shape to start using Julia.\n\nYou can read about [getting started](https://docs.julialang.org/en/stable/manual/getting-started/) in the manual.\n\nIf you are building a Julia package for distribution on Linux, OS X,\nor Windows, take a look at the detailed notes in\n[DISTRIBUTING.md](https://github.com/JuliaLang/julia/blob/master/DISTRIBUTING.md).\n\n### Updating an existing source tree\n\nIf you have previously downloaded `julia` using `git clone`, you can update the\nexisting source tree using `git pull` rather than starting anew:\n\n    cd julia\n    git pull && make\n\nAssuming that you had made no changes to the source tree that will conflict\nwith upstream updates, these commands will trigger a build to update to the\nlatest version.\n\n#### General troubleshooting\n\n1. Over time, the base library may accumulate enough changes such that the\n   bootstrapping process in building the system image will fail. If this\n   happens, the build may fail with an error like\n\n   ```sh\n    *** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall' ***\n   ```\n\n   As described, running `make clean && make` is usually sufficient.\n   Occasionally, the stronger cleanup done by `make cleanall` is needed.\n\n2. New versions of external dependencies may be introduced which may\n   occasionally cause conflicts with existing builds of older versions.\n\n   a. Special `make` targets exist to help wipe the existing build of a\n      dependency. For example, `make -C deps clean-llvm` will clean out the\n      existing build of `llvm` so that `llvm` will be rebuilt from the\n      downloaded source distribution the next time `make` is called.\n      `make -C deps distclean-llvm` is a stronger wipe which will also delete\n      the downloaded source distribution, ensuring that a fresh copy of the\n      source distribution will be downloaded and that any new patches will be\n      applied the next time `make` is called.\n\n   b. To delete existing binaries of `julia` and all its dependencies,\n      delete the `./usr` directory _in the source tree_.\n\n3. If you've updated OS X recently, be sure to run `xcode-select --install` to update the command line tools.\n   Otherwise, you could run into errors for missing headers and libraries, such as\n   ```ld: library not found for -lcrt1.10.6.o```.\n\n4. If you've moved the source directory, you might get errors such as\n    ```CMake Error: The current CMakeCache.txt directory ... is different than the directory ... where     CMakeCache.txt was created.```, in which case you may delete the offending dependency under `deps`\n\n5. In extreme cases, you may wish to reset the source tree to a pristine state.\n   The following git commands may be helpful:\n\n   ```sh\n    git reset --hard #Forcibly remove any changes to any files under version control\n    git clean -x -f -d #Forcibly remove any file or directory not under version control\n   ```\n\n   _To avoid losing work, make sure you know what these commands do before you\n   run them. `git` will not be able to undo these changes!_\n\n\n\n## Uninstalling Julia\n\nJulia does not install anything outside the directory it was cloned into. Julia can be completely uninstalled by deleting this directory. Julia packages are installed in `~/.julia` by default, and can be uninstalled by deleting `~/.julia`.\n\n## Platform-Specific Build Notes\n\n### Linux\n\n#### General\n\n* GCC version 4.7 or later is required to build Julia.\n* To use external shared libraries not in the system library search path, set `USE_SYSTEM_XXX=1` and `LDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so` in `Make.user`.\n  * Instead of setting `LDFLAGS`, putting the library directory into the environment variable `LD_LIBRARY_PATH` (at both compile and run time) also works.\n* The `USE_SYSTEM_*` flags should be used with caution. These are meant only for troubleshooting, porting, and packaging, where package maintainers work closely with the Julia developers to make sure that Julia is built correctly. Production use cases should use the officially provided binaries. Issues arising from the use of these flags will generally not be accepted.\n* See also the [external dependencies](#required-build-tools-and-external-libraries).\n\n#### Architecture Customization\n\nJulia can be built for a non-generic architecture by configuring the `ARCH` Makefile variable. See the appropriate section of `Make.inc` for additional customization options, such as `MARCH` and `JULIA_CPU_TARGET`.\n\nFor example, to build for Pentium 4, set `MARCH=pentium4` and install the necessary system libraries for linking. On Ubuntu, these may include lib32gfortran-6-dev, lib32gcc1, and lib32stdc++6, among others.\n\nYou can also set `MARCH=native` for a maximum-performance build customized for the current machine CPU.\n\n\n#### Ubuntu\n\nThe [julia-deps PPA](https://launchpad.net/~staticfloat/+archive/julia-deps/) contains updated packages for Julia dependencies if you want to use system libraries instead of having them downloaded and built during the build process.  See [System Provided Libraries](#system-provided-libraries).\n\n#### RHEL/CentOS 6\n\nOn RHEL/CentOS 6 systems, the default compiler (`gcc` 4.4) is too old to build Julia.\n\nInstall or contact your systems administrator to install a more recent version of `gcc`. The [Scientific Linux Developer Toolset](http://linux.web.cern.ch/linux/devtoolset/) works well.\n\n\n#### Linux Build Troubleshooting\n\n Problem              | Possible Solution\n------------------------|---------------------\n OpenBLAS build failure | Set one of the following build options in `Make.user` and build again: <ul><li> `OPENBLAS_TARGET_ARCH=BARCELONA` (AMD CPUs) or `OPENBLAS_TARGET_ARCH=NEHALEM` (Intel CPUs)<ul>Set `OPENBLAS_DYNAMIC_ARCH = 0` to disable compiling multiple architectures in a single binary.<\/ul><\/li><li> `OPENBLAS_NO_AVX2 = 1` disables AVX2 instructions, allowing OpenBLAS to compile with `OPENBLAS_DYNAMIC_ARCH = 1` using old versions of binutils <\/li><li> `USE_SYSTEM_BLAS=1` uses the system provided `libblas` <ul><li>Set `LIBBLAS=-lopenblas` and `LIBBLASNAME=libopenblas` to force the use of the system provided OpenBLAS when multiple BLAS versions are installed. <\/li><\/ul><\/li><\/ul><p> If you get an error that looks like ```../kernel/x86_64/dgemm_kernel_4x4_haswell.S:1709: Error: no such instruction: `vpermpd $ 0xb1,%ymm0,%ymm0'```, then you need to set `OPENBLAS_DYNAMIC_ARCH = 0` or `OPENBLAS_NO_AVX2 = 1`, or you need a newer version of `binutils` (2.18 or newer). ([Issue #7653](https://github.com/JuliaLang/julia/issues/7653))\nIllegal Instruction error | Check if your CPU supports AVX while your OS does not (e.g. through virtualization, as described in [this issue](https://github.com/JuliaLang/julia/issues/3263)).\n\n### OS X\n\nYou need to have the current Xcode command line utilities installed: run `xcode-select --install` in the terminal.\nYou will need to rerun this terminal command after each OS X update, otherwise you may run into errors involving missing libraries or headers.\nYou will also need a 64-bit gfortran to compile Julia dependencies. The gfortran-4.7 (and newer) compilers in Brew, Fink, and MacPorts work for building Julia.\n\nClang is now used by default to build Julia on OS X 10.7 and above. On OS X 10.6, the Julia build will automatically use `gcc`.\nOn current systems, we recommend that you install the command line tools as described above. Older systems do not have a separate command line tools package from Apple, and will require a full Xcode install.  On these, you will need at least Xcode 4.3.3.  In Xcode prior to v5.0, you can alternatively go to Preferences -> Downloads and select the Command Line Utilities. These steps will ensure that clang v3.1 is installed, which is the minimum version of `clang` required to build Julia.\n\nIf you have set `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` in your `.bashrc` or equivalent, Julia may be unable to find various libraries that come bundled with it. These environment variables need to be unset for Julia to work.\n\nIf you see build failures in OpenBLAS or if you prefer to experiment, you can use the Apple provided BLAS in vecLib by building with `USE_SYSTEM_BLAS=1`. Julia does not use the Apple provided LAPACK, as it is too old.\n\nWhen building Julia, or its dependencies, libraries installed by third party package managers can redirect the compiler to use an incompatible version of the software it is looking for. One example of this happening is when a piece of software called the \"linker\" gives an error involving \"Undefined symbols.\" If that happens, you can usually figure out what software package is causing the error from the names in the error text. This sort of error can be bypassed by, temporarily, uninstalling the offending package. If the offending package cannot be uninstalled by itself, it may be possible to just uninstall the development headers (for example: a package ending in \"-dev\" in Fink).\n\n### FreeBSD\n\nClang is the default compiler on FreeBSD 11.0-RELEASE and above.\nThe remaining build tools are available from the Ports Collection, and can be installed using `pkg install git gcc gmake cmake`.\nTo build Julia, simply run `gmake`.\n(Note that `gmake` must be used rather than `make`, since `make` on FreeBSD corresponds to the incompatible BSD Make rather than GNU Make.)\n\nAs mentioned above, it is important to note that the `USE_SYSTEM_*` flags should be used with caution on FreeBSD.\nThis is because many system libraries, and even libraries from the Ports Collection, link to the system's `libgcc_s.so.1`,\nor to another library which links to the system `libgcc_s`.\nThis library declares its GCC version to be 4.6, which is too old to build Julia, and conflicts with other libraries when linking.\nThus it is highly recommended to simply allow Julia to build all of its dependencies.\nIf you do choose to use the `USE_SYSTEM_*` flags, note that `/usr/local` is not on the compiler path by default, so you may need\nto add `LDFLAGS=-L/usr/local/lib` and `CPPFLAGS=-I/usr/local/include` to your `Make.user`, though doing so may interfere with\nother dependencies.\n\nNote that the x86 architecture does not support threading due to lack of compiler runtime library support, so you may need to\nset `JULIA_THREADS=0` in your `Make.user` if you're on a 32-bit system.\n\n### Windows\n\nIn order to build Julia on Windows, see [README.windows](https://github.com/JuliaLang/julia/blob/master/README.windows.md).\n\n### Vagrant\n\nJulia can be developed in an isolated Vagrant environment. See [the Vagrant README](https://github.com/JuliaLang/julia/blob/master/contrib/vagrant/README.md) for details.\n\n## Required Build Tools and External Libraries\n\nBuilding Julia requires that the following software be installed:\n\n- **[GNU make]**                — building dependencies.\n- **[gcc & g++][gcc]** (>= 4.7) or **[Clang][clang]** (>= 3.1, Xcode 4.3.3 on OS X) — compiling and linking C, C++.\n- **[libatomic][gcc]**          — provided by **[gcc]** and needed to support atomic operations.\n- **[python]** (>=2.7)          — needed to build LLVM.\n- **[gfortran]**                — compiling and linking Fortran libraries.\n- **[perl]**                    — preprocessing of header files of libraries.\n- **[wget]**, **[curl]**, or **[fetch]** (FreeBSD) — to automatically download external libraries.\n- **[m4]**                      — needed to build GMP.\n- **[awk]**                     — helper tool for Makefiles.\n- **[patch]**                   — for modifying source code.\n- **[cmake]** (>= 3.4.3)        — needed to build `libgit2`.\n- **[pkg-config]**              — needed to build `libgit2` correctly, especially for proxy support.\n\nOn Debian-based distributions (e.g. Ubuntu), you can easily install them with `apt-get`:\n```\nsudo apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config\n```\n\nJulia uses the following external libraries, which are automatically downloaded (or in a few cases, included in the Julia source repository) and then compiled from source the first time you run `make`:\n\n- **[LLVM]** (3.9 + patches) — compiler infrastructure (see [note below](#llvm)).\n- **[FemtoLisp]**            — packaged with Julia source, and used to implement the compiler front-end.\n- **[libuv]**  (custom fork) — portable, high-performance event-based I/O library.\n- **[OpenLibm]**             — portable libm library containing elementary math functions.\n- **[DSFMT]**                — fast Mersenne Twister pseudorandom number generator library.\n- **[OpenBLAS]**             — fast, open, and maintained [basic linear algebra subprograms (BLAS)](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) library, based on [Kazushige Goto's](https://en.wikipedia.org/wiki/Kazushige_Goto) famous [GotoBLAS](https://www.tacc.utexas.edu/research-development/tacc-software/gotoblas2) (see [note below](#blas-and-lapack)).\n- **[LAPACK]** (>= 3.5)      — library of linear algebra routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.\n- **[MKL]** (optional)       – OpenBLAS and LAPACK may be replaced by Intel's MKL library.\n- **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices (see [note below](#suitesparse)).\n- **[ARPACK]**               — collection of subroutines designed to solve large, sparse eigenvalue problems.\n- **[PCRE]** (>= 10.00)      — Perl-compatible regular expressions library.\n- **[GMP]** (>= 5.0)         — GNU multiple precision arithmetic library, needed for `BigInt` support.\n- **[MPFR]** (>= 3.0)        — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.\n- **[libgit2]** (>= 0.23)    — Git linkable library, used by Julia's package manager.\n- **[curl]** (>= 7.50)       — libcurl provides download and proxy support for Julia's package manager.\n- **[libssh2]** (>= 1.7)     — library for SSH transport, used by libgit2 for packages with SSH remotes.\n- **[mbedtls]** (>= 2.2)     — library used for cryptography and transport layer security, used by libssh2\n- **[utf8proc]** (>= 2.1)    — a library for processing UTF-8 encoded Unicode strings.\n- **[libosxunwind]**         — clone of [libunwind], a library that determines the call-chain of a program.\n\n[GNU make]:     http://www.gnu.org/software/make\n[patch]:        http://www.gnu.org/software/patch\n[wget]:         http://www.gnu.org/software/wget\n[m4]:           http://www.gnu.org/software/m4\n[awk]:          http://www.gnu.org/software/gawk\n[gcc]:          http://gcc.gnu.org\n[clang]:        http://clang.llvm.org\n[python]:       https://www.python.org/\n[gfortran]:     https://gcc.gnu.org/fortran/\n[curl]:         http://curl.haxx.se\n[fetch]:        http://www.freebsd.org/cgi/man.cgi?fetch(1)\n[perl]:         http://www.perl.org\n[cmake]:        http://www.cmake.org\n[OpenLibm]:     https://github.com/JuliaLang/openlibm\n[DSFMT]:        http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/#dSFMT\n[OpenBLAS]:     https://github.com/xianyi/OpenBLAS\n[LAPACK]:       http://www.netlib.org/lapack\n[MKL]:          http://software.intel.com/en-us/articles/intel-mkl\n[SuiteSparse]:  http://faculty.cse.tamu.edu/davis/suitesparse.html\n[ARPACK]:       http://forge.scilab.org/index.php/p/arpack-ng\n[PCRE]:         http://www.pcre.org\n[LLVM]:         http://www.llvm.org\n[FemtoLisp]:    https://github.com/JeffBezanson/femtolisp\n[GMP]:          http://gmplib.org\n[MPFR]:         http://www.mpfr.org\n[libuv]:        https://github.com/JuliaLang/libuv\n[libgit2]:      https://libgit2.github.com/\n[utf8proc]:     https://julialang.org/utf8proc/\n[libosxunwind]: https://github.com/JuliaLang/libosxunwind\n[libunwind]:    http://www.nongnu.org/libunwind\n[libssh2]:      https://www.libssh2.org\n[mbedtls]:      https://tls.mbed.org/\n[pkg-config]:   https://www.freedesktop.org/wiki/Software/pkg-config/\n\n### Notes for distribution package maintainers\n\nWe understand that package maintainers will typically want to make use of system libraries where possible. Please refer to the above version requirements and additional notes below. It is strongly advised that package maintainers apply the patches included in the Julia repo for LLVM and other libraries, should they choose to use SYSTEM versions. A list of maintained Julia packages for various platforms is available at https://julialang.org/downloads/platform.html.\n\n### System Provided Libraries\n\nIf you already have one or more of these packages installed on your system, you can prevent Julia from compiling duplicates of these libraries by passing `USE_SYSTEM_...=1` to `make` or adding the line to `Make.user`. The complete list of possible flags can be found in `Make.inc`.\n\nPlease be aware that this procedure is not officially supported, as it introduces additional variability into the installation and versioning of the dependencies, and is recommended only for system package maintainers. Unexpected compile errors may result, as the build system will do no further checking to ensure the proper packages are installed.\n\n### LLVM\n\nThe most complicated dependency is LLVM, for which we require version 3.9 with some additional patches from upstream (LLVM is not backward compatible). For packaging Julia, we recommend either:\n - bundling a Julia-only LLVM library inside the Julia package, or\n - adding the patches to the LLVM 3.9 package of the distribution.\n   * A complete list of patches is available in `deps/llvm.mk`, and the patches themselves are in `deps/patches/`.\n   * The only Julia-specific patch is the lib renaming (`llvm-symver-jlprefix.patch`), which should _not_ be applied to a system LLVM.\n   * The remaining patches are all upstream bug fixes, and have been contributed into upstream LLVM.\n\nUsing an unpatched or different version of LLVM will result in errors and/or poor performance. Though Julia can be built with newer LLVM versions, support for this should be regarded as experimental and not suitable for packaging.\n\n### libuv\n\nJulia uses a custom fork of libuv. It is a small dependency, and can be safely bundled in the same package as Julia, and will not conflict with the system library. Julia builds should _not_ try to use the system libuv.\n\n### BLAS and LAPACK\n\nAs a high-performance numerical language, Julia should be linked to a multi-threaded BLAS and LAPACK, such as OpenBLAS or ATLAS, which will provide much better performance than the reference `libblas` implementations which may be default on some systems.\n\n### Intel MKL\n\nFor a 64-bit architecture, the environment should be set up as follows:\n\n    # bash\n    source /path/to/intel/bin/compilervars.sh intel64\n\nAdd the following to the `Make.user` file:\n\n    USE_INTEL_MKL = 1\n    USE_INTEL_LIBM = 1\n\nIt is highly recommended to start with a fresh clone of the Julia repository.\n\n## Source Code Organization\n\nThe Julia source code is organized as follows:\n\n    base/          source code for the Base module (part of Julia's standard library)\n    stdlib/        source code for other standard library packages\n    contrib/       editor support for Julia source, miscellaneous scripts\n    deps/          external dependencies\n    doc/src/manual source for the user manual\n    doc/src/stdlib source for standard library function reference\n    src/           source for Julia language core\n    test/          test suites\n    ui/            source for various front ends\n    usr/           binaries and shared libraries loaded by Julia's standard libraries\n\n## Binary Installation\n\nIf you would rather not compile the latest Julia from source, platform-specific tarballs with pre-compiled binaries are also [available for download](https://julialang.org/downloads/).\n\nYou can either run the `julia` executable using its full path in the directory created above, or add that directory to your executable path so that you can run the Julia program from anywhere (in the current shell session):\n\n    export PATH=\"$(pwd)/julia:$PATH\"\n\nNow you should be able to run Julia like this:\n\n    julia\n\nOn Windows, double-click `usr/bin/julia.exe`.\n\nIf everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation.\nYou can read about [getting started](https://julialang.org/manual/getting-started) in the manual.\n\n**Note**: Although some system package managers provide Julia, such installations are neither maintained nor endorsed by the Julia project. They may be outdated\nand/or unmaintained. We recommend you use the official Julia binaries instead.\n\n## Editor and Terminal Setup\n\nCurrently, Julia editing mode support is available for a number of\neditors. While Julia modes for\n[Emacs](https://github.com/JuliaLang/julia-emacs),\n[Sublime Text](https://github.com/JuliaEditorSupport/Julia-sublime), and\n[Vim](https://github.com/JuliaLang/julia-vim) have their own repos,\nothers such as Textmate, Notepad++, and Kate, are in\n`contrib/`.\n\nTwo major IDEs are supported for Julia: [Juno](http://junolab.org/)\nwhich is based on [Atom](https://atom.io/) and\n[julia-vscode](https://github.com/JuliaEditorSupport/julia-vscode)\nbased on [VS Code](https://code.visualstudio.com/). A [Jupyter](http://jupyter.org/) notebooks interface\nis available through\n[IJulia](https://github.com/JuliaLang/IJulia.jl). The\n[Sublime-IJulia](https://github.com/quinnj/Sublime-IJulia) plugin\nenables interaction between IJulia and Sublime Text.\n\nIn the terminal, Julia makes great use of both control-key and meta-key bindings. To make the meta-key bindings more accessible, many terminal emulator programs (e.g., `Terminal`, `iTerm`, `xterm`, etc.) allow you to use the alt or option key as meta.  See the section in the manual on [the Julia REPL](https://docs.julialang.org/en/latest/stdlib/REPL/) for more details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2FDC:3D501:184743:5E7127:6AB92A3F"},"text_sha256":"80ca2ae21a0f31ae5273a4018bbdf6a26093e000de0cf9936eaca60651119afe"},{"path":"README.windows.md","size":13353,"blob_sha":"6b5e9e476ccef8a00e2abc740791f98954561ded","priority":0,"status":200,"text":"# Julia on Windows\n\nThis file describes how to install, or build, and use Julia on Windows.\n\nFor more general information about Julia, please see the\n[main README](https://github.com/JuliaLang/julia/blob/master/README.md)\nor the [documentation](https://docs.julialang.org/).\n\n\n## General Information for Windows\n\n\n### Unicode font support\n\nThe built-in Windows fonts have rather poor coverage of the Unicode character\nspace.  The free [`DejaVu Sans Mono`](https://dejavu-fonts.github.io/) font can be used\nas a replacement font in the Windows console.  Since Windows 2000, simply\ndownloading the font and installing it is insufficient, since Windows keeps a\nlist of approved fonts in the registry.\n\nInstructions for adding fonts to the terminal are available at\n[this answer on superuser.com](https://superuser.com/a/5079)\n\nAdditionally, rather than sticking with the default command prompt, you may want\nto use a different terminal emulator program, such as\n[Conemu](https://code.google.com/p/conemu-maximus5/) or [Mintty](\nhttps://github.com/mintty/mintty) (note that running Julia on Mintty needs a\ncopy of `stty.exe` in your `%PATH%` to work properly).  Alternatively, you may\nprefer the features of a more full-function IDE, such as [Juno](http://junolab.org),\n[Sublime-IJulia](https://github.com/quinnj/Sublime-IJulia), or\n[IJulia](https://github.com/JuliaLang/IJulia.jl).\n\n\n### Line endings\n\nJulia uses binary-mode files exclusively.  Unlike many other Windows programs,\nif you write `\\n` to a file, you get a `\\n` in the file, not some other bit\npattern.  This matches the behavior exhibited by other operating systems.  If\nyou have installed Git for Windows, it is suggested, but not required, that you\nconfigure your system Git to use the same convention:\n```sh\ngit config --global core.eol lf\ngit config --global core.autocrlf input\n```\nor edit `%USERPROFILE%\\.gitconfig` and add/edit the lines:\n```\n[core]\n    eol = lf\n    autocrlf = input\n```\n\n## Binary distribution\n\nJulia runs on Windows 7 and later.\nBoth the 32-bit and 64-bit versions are supported.\nThe 32-bit (i686) binary will run on either a 32-bit and 64-bit operating system.\nThe 64-bit (x86_64) binary will only run on 64-bit Windows and will otherwise refuse to launch.\n\n 1. [Download](https://julialang.org/downloads) the latest version of Julia.\n    Extract the binary to a reasonable destination folder, e.g. `C:\\julia`.\n\n 2. Double-click the `julia` shortcut to launch Julia.\n\n 3. Julia's home directory is the location pointed to by the Windows environment\n    variable `%HOME%`: this directory is for instance where the startup file\n    `.julia/config/startup.jl` resides. `%HOMEDRIVE%\\%HOMEPATH%` is used as a fallback if\n    `%HOME%` is not defined.\n\n## Source distribution\n\n### Supported build platforms\n\n -  Windows 10: supported (32 and 64 bits)\n -  Windows 8: supported (32 and 64 bits)\n -  Windows 7: supported (32 and 64 bits)\n\n### Cygwin-to-MinGW cross-compiling\n\nThe recommended way of compiling Julia from source on Windows is by cross\ncompiling from [Cygwin](http://www.cygwin.com), using versions of the\nMinGW-w64 compilers available through Cygwin's package manager.\n\n 1. Download and run Cygwin setup for [32 bit](https://cygwin.com/setup-x86.exe)\n    or [64 bit](https://cygwin.com/setup-x86_64.exe). Note, that you can compile\n    either 32 or 64 bit Julia from either 32 or 64 bit Cygwin. 64 bit Cygwin\n    has a slightly smaller but often more up-to-date selection of packages.\n\n    Advanced: you may skip steps 2-4 by running:\n\n        setup-x86_64.exe -s <url> -q -P cmake,gcc-g++,git,make,patch,curl,m4,python,p7zip,mingw64-i686-gcc-g++,mingw64-i686-gcc-fortran,mingw64-x86_64-gcc-g++,mingw64-x86_64-gcc-fortran\n        :: replace <url> with a site from https://cygwin.com/mirrors.html\n        :: or run setup manually first and select a mirror\n\n 2. Select installation location and download mirror.\n\n 3. At the '*Select Packages'* step, select the following:\n\n    1.  From the *Devel* category: `cmake`, `gcc-g++`, `git`, `make`, `patch`\n    2.  From the *Net* category: `curl`\n    3.  From *Interpreters* (or *Python*) category: `m4`, `python`\n    4.  From the *Archive* category: `p7zip`\n    5.  For 32 bit Julia, and also from the *Devel* category:\n        `mingw64-i686-gcc-g++` and `mingw64-i686-gcc-fortran`\n    6.  For 64 bit Julia, and also from the *Devel* category:\n        `mingw64-x86_64-gcc-g++` and `mingw64-x86_64-gcc-fortran`\n\n 4. At the *'Resolving Dependencies'* step, be sure to leave *'Select required\n    packages (RECOMMENDED)'* enabled.\n\n 5. Allow Cygwin installation to finish, then start from the installed shortcut\n    a *'Cygwin Terminal'*, or *'Cygwin64 Terminal'*, respectively.\n\n 6. Build Julia and its dependencies from source:\n\n    1. Get the Julia sources\n       ```sh\n       git clone https://github.com/JuliaLang/julia.git\n       cd julia\n       ```\n       Tip: If you get an `error: cannot fork() for fetch-pack: Resource\n       temporarily unavailable` from git, add `alias git=\"env PATH=/usr/bin git\"`\n       to `~/.bashrc` and restart Cygwin.\n\n    2. Set the `XC_HOST` variable in `Make.user` to indicate MinGW-w64 cross\n       compilation\n       ```sh\n       echo 'XC_HOST = i686-w64-mingw32' > Make.user     # for 32 bit Julia\n       # or\n       echo 'XC_HOST = x86_64-w64-mingw32' > Make.user   # for 64 bit Julia\n       ```\n\n    3. Start the build\n       ```sh\n       make -j 4   # Adjust the number of cores (4) to match your build environment.\n       ```\n\n\n    > Protip: build both!\n    > ```sh\n    > make O=julia-win32 configure\n    > make O=julia-win64 configure\n    > echo 'XC_HOST = i686-w64-mingw32' > julia-win32/Make.user\n    > echo 'XC_HOST = x86_64-w64-mingw32' > julia-win64/Make.user\n    > echo 'ifeq ($(BUILDROOT),$(JULIAHOME))\n    >         $(error \"in-tree build disabled\")\n    >       endif' >> Make.user\n    > make -C julia-win32  # build for Windows x86 in julia-win32 folder\n    > make -C julia-win64  # build for Windows x86-64 in julia-win64 folder\n    > ```\n\n 7. Run Julia using the Julia executables directly\n    ```sh\n    usr/bin/julia.exe\n    usr/bin/julia-debug.exe\n    ```\n\n### Compiling with MinGW/MSYS2\n\nCompiling Julia from source using [MSYS2](https://msys2.github.io) has worked\nin the past but is not actively supported. Pull requests to restore support\nwould be welcome. See a [past version of this file](\nhttps://github.com/JuliaLang/julia/blob/v0.6.0/README.windows.md)\nfor the former instructions for compiling using MSYS2.\n\n\n### Cross-compiling from Unix\n\nYou can also use MinGW-w64 cross compilers to build a Windows version of Julia from\nLinux, Mac, or the Windows Subsystem for Linux (WSL). Note that when compiling in\nWSL, you should use the Linux file system environment, not the `/mnt/` emulated Windows\npaths, since time stamps in `/mnt/` do not work properly as required by configure\nscripts and makefiles (see https://github.com/Microsoft/BashOnWindows/issues/1939).\n\nFor maximum compatibility with packages that use [WinRPM.jl](\nhttps://github.com/JuliaLang/WinRPM.jl) for binary dependencies on Windows, it\nis recommended that you use OpenSUSE 42.2 for cross-compiling a Windows build\nof Julia.  If you use a different Linux distribution or OS X, install\n[Vagrant](http://www.vagrantup.com/downloads) and use the following `Vagrantfile`:\n\n```\n# Vagrantfile for MinGW-w64 cross-compilation of Julia\n\n$script = <<SCRIPT\n# Change the following to i686-w64-mingw32 for 32 bit Julia:\nexport XC_HOST=x86_64-w64-mingw32\n# Change the following to 32 for 32 bit Julia:\nexport BITS=64\nzypper addrepo http://download.opensuse.org/repositories/windows:mingw:win$BITS/openSUSE_Leap_42.2/windows:mingw:win$BITS.repo\nzypper --gpg-auto-import-keys refresh\nzypper -n install --no-recommends git make cmake tar wine which curl \\\n    python python-xml patch gcc-c++ m4 p7zip.i586 libxml2-tools winbind\nzypper -n install mingw$BITS-cross-gcc-c++ mingw$BITS-cross-gcc-fortran \\\n    mingw$BITS-libstdc++6 mingw$BITS-libgfortran3 mingw$BITS-libssp0\n# opensuse packages the mingw runtime dlls under sys-root/mingw/bin, not /usr/lib64/gcc\ncp /usr/$XC_HOST/sys-root/mingw/bin/*.dll /usr/lib*/gcc/$XC_HOST/*/\ngit clone git://github.com/JuliaLang/julia.git julia\ncd julia\nmake -j4 win-extras julia-ui-release\nexport WINEDEBUG=-all # suppress wine fixme's\n# this last step may need to be run interactively\nmake -j4 binary-dist\nSCRIPT\n\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"bento/opensuse-leap-42.2\"\n  config.vm.provider :virtualbox do |vb|\n    # Use VBoxManage to customize the VM. For example to change memory:\n    vb.memory = 2048\n  end\n  config.vm.provision :shell, :inline => $script\nend\n```\n\n\n### Cross-building Julia without Vagrant\n\nIf you don't care that the build is potentially incompatible with the WinRPM\necosystem (or happen to be on opensuse), use the following steps to cross-\ncompile julia:\n\nFirst, you will need to ensure your system has the required dependencies.  We\nneed wine (>=1.7.5), a system compiler, and some downloaders.\n\n**On Ubuntu** (on other linux systems, the dependency names are likely to be similar):\n```sh\napt-get install wine subversion cvs gcc wget p7zip-full winbind mingw-w64\n```\n\n**On Mac**: Install XCode, XCode command line tools, X11 (now [XQuartz](\nhttp://xquartz.macosforge.org/)), and [MacPorts](http://www.macports.org/install.php)\nor [Homebrew](https://brew.sh/).  Then run `port install wine wget mingw-w64`,\nor `brew install wine wget mingw-w64`, as appropriate.\n\nThen run the build:\n\n 1. `git clone https://github.com/JuliaLang/julia.git julia-win32`\n 2. `echo override XC_HOST = i686-w64-mingw32 >> Make.user`\n 3. `make`\n 4. `make win-extras` (Necessary before running `make binary-dist`)\n 5. `make binary-dist`\n 6. move the `julia-*.exe` installer to the target machine\n\nIf you are building for 64-bit windows, the steps are essentially the same.\nJust replace `i686` in `XC_HOST` with `x86_64`. (note: on Mac, wine only runs\nin 32-bit mode).\n\n\n## Debugging a cross-compiled build under wine\n\nThe most effective way to debug a cross-compiled version of julia on the cross-\ncompilation host is to install a windows version of gdb and run it under wine as\nusual. The pre-built packages available [as part of the MSYS2 project](\nhttps://sourceforge.net/projects/msys2/files/REPOS/MINGW/) are known to work.\nApart from the GDB package you may also need the python and termcap packages.\nFinally, GDB's prompt may not work when launch from the command line. This can\nbe worked around by prepending `wineconsole` to the regular GDB invocation.\n\n\n## Using a Windows VM\n\n[Vagrant](http://www.vagrantup.com/downloads) can also be used with a Windows\nguest VM via the `Vagrantfile` in [contrib/windows](contrib/windows/Vagrantfile),\njust run `vagrant up` from that folder.\n\n\n## After compiling\n\nCompiling using one of the options above creates a basic Julia build, but not some\nextra components that are included if you run the full Julia binary installer.\nIf you need these components, the easiest way to get them is to build the installer\nyourself using ```make win-extras``` followed by ```make binary-dist```, and then\nrunning the resulting installer.\n\n\n## Windows Build Debugging\n\n\n### GDB hangs with cygwin mintty\n\n- Run gdb under the windows console (cmd) instead. gdb [may not function properly](\n  https://www.cygwin.com/ml/cygwin/2009-02/msg00531.html) under mintty with non-\n  cygwin applications. You can use `cmd /c start` to start the windows console\n  from mintty if necessary.\n\n### GDB not attaching to the right process\n\n - Use the PID from the windows task manager or `WINPID` from the `ps` command\n   instead of the PID from unix style command line tools (e.g. `pgrep`).  You\n   may need to add the PID column if it is not shown by default in the windows\n   task manager.\n\n### GDB not showing the right backtrace\n\n - When attaching to the julia process, GDB may not be attaching to the right\n   thread.  Use `info threads` command to show all the threads and\n   `thread <threadno>` to switch threads.\n - Be sure to use a 32 bit version of GDB to debug a 32 bit build of Julia, or\n   a 64 bit version of GDB to debug a 64 bit build of Julia.\n\n### Build process is slow/eats memory/hangs my computer\n\n - Disable the Windows [Superfetch](https://en.wikipedia.org/wiki/Windows_Vista_I/O_technologies#SuperFetch)\n   and [Program Compatibility Assistant](\n   http://blogs.msdn.com/b/cjacks/archive/2011/11/22/managing-the-windows-7-program-compatibility-assistant-pca.aspx)\n   services, as they are known to have [spurious interactions](\n   https://cygwin.com/ml/cygwin/2011-12/msg00058.html) with MinGW/Cygwin.\n\n   As mentioned in the link above: excessive memory use by `svchost` specifically\n   may be investigated in the Task Manager by clicking on the high-memory\n   `svchost.exe` process and selecting `Go to Services`. Disable child services\n   one-by-one until a culprit is found.\n\n - Beware of [BLODA](https://cygwin.com/faq/faq.html#faq.using.bloda).\n   The [vmmap](http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx)\n   tool is indispensable for identifying such software conflicts. Use vmmap to\n   inspect the list of loaded DLLs for bash, mintty, or another persistent\n   process used to drive the build. Essentially *any* DLL outside of the Windows\n   System directory is potential BLODA.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9F1A:3E1DA:178B35:5DB51A:6AB92A3E"},"text_sha256":"fd47412eb478e760455c612593060a9ad2b819c4f5e7a2b7baffdacf6c0d995a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2675","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:17EE4B5:1C1007A:6AB92A40"},"commit":{"sha":"7a691d2a893a55e8512108207abb5c4d9d05e4f5","url":"https://github.com/JuliaLang/julia/commit/7a691d2a893a55e8512108207abb5c4d9d05e4f5","date":"2026-06-30T23:22:52Z","author_date":"2026-06-30T23:22:52Z","committer_date":"2026-06-30T23:22:52Z","tree_sha":"c9dd40418c596dd52eb6960ad8aea610a6ea362b","message_first_line":"[REPL] Highlight enclosing parens like Emacs (#60992)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2674","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:18087FA:1C2A88A:6AB92A41"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8301,"blob_sha":"836f391ac2a7558b4551c4a989b11a4900df1dcf","priority":0}],"documents":[{"path":"README.md","size":8301,"blob_sha":"836f391ac2a7558b4551c4a989b11a4900df1dcf","priority":0,"status":200,"text":"<a name=\"logo\"/>\n<div align=\"center\">\n<a href=\"https://julialang.org/\" target=\"_blank\">\n<img src=\"doc/src/assets/logo.svg\" alt=\"Julia Logo\" width=\"210\" height=\"142\"><\/img>\n<\/a>\n<\/div>\n\n<table>\n    <!-- Docs -->\n    <tr>\n        <td>Documentation<\/td>\n        <td>\n            <a href=\"https://docs.julialang.org\"><img src='https://img.shields.io/badge/docs-v1-blue.svg'/><\/a>\n        <\/td>\n    <\/tr>\n    <!-- Continuous integration\n    To change the badge to point to a different pipeline, it is not sufficient to simply change the `?branch=` part.\n    You need to go to the Buildkite website and get the SVG URL for the correct pipeline. -->\n    <tr>\n        <td>Continuous integration<\/td>\n        <td>\n            <a href=\"https://buildkite.com/julialang/julia-master\"><img src='https://badge.buildkite.com/f28e0d28b345f9fad5856ce6a8d64fffc7c70df8f4f2685cd8.svg?branch=master'/><\/a>\n            <a href=\"https://perf.julialang.org/\"><img src='https://img.shields.io/badge/tracking-performance-blue'/><\/a>\n        <\/td>\n    <\/tr>\n    <!-- Coverage -->\n    <tr>\n        <td>Code coverage<\/td>\n        <td>\n            <a href='https://coveralls.io/github/JuliaLang/julia?branch=master'><img src='https://coveralls.io/repos/github/JuliaLang/julia/badge.svg?branch=master' alt='Coverage Status'/><\/a>\n            <a href=\"https://codecov.io/gh/JuliaLang/julia\"><img src=\"https://codecov.io/gh/JuliaLang/julia/branch/master/graph/badge.svg?token=TckCRxc7HS\"/><\/a>\n        <\/td>\n    <\/tr>\n<\/table>\n\n## The Julia Language\n\nJulia is a high-level, high-performance dynamic language for technical\ncomputing. The main homepage for Julia can be found at\n[julialang.org](https://julialang.org/). This is the GitHub\nrepository of Julia source code, including instructions for compiling\nand installing Julia, below.\n\n## Resources\n\n- **Homepage:** <https://julialang.org>\n- **Install:** <https://julialang.org/downloads/>\n- **Source code:** <https://github.com/JuliaLang/julia>\n- **Documentation:** <https://docs.julialang.org>\n- **Packages:** <https://julialang.org/packages/>\n- **Discussion forum:** <https://discourse.julialang.org>\n- **Zulip:** <https://julialang.zulipchat.com/>\n- **Slack:** <https://julialang.slack.com> (get an invite from <https://julialang.org/slack/>)\n- **YouTube:** <https://www.youtube.com/user/JuliaLanguage>\n- **Code coverage:** <https://coveralls.io/r/JuliaLang/julia>\n\n\n## Contributing to Julia\n\nWe welcome contributions from developers of all experience levels, including bug fixes,\ndocumentation improvements, tests, and performance enhancements.\n\nNew contributors are encouraged to start by reading [CONTRIBUTING.md](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md).\n\n> [!IMPORTANT]\n> If your pull request contains substantial contributions from a generative AI tool, please disclose so with details, and review all changes before opening. This also applies to other content, such as issues, discussions, and comments.\n\n### Learning Julia\n\n- [**Learning resources**](https://julialang.org/learning/)\n\n## Binary Installation\n\nThe recommended way of installing Julia is to use `juliaup` which will install\nthe latest stable `julia` for you and help keep it up to date. It can also let\nyou install and run different Julia versions simultaneously. Instructions for\nthis can be found [here](https://julialang.org/downloads/). If you want to manually\ndownload specific Julia binaries, you can find those on the [Manual Downloads\npage](https://julialang.org/downloads/manual-downloads/). The downloads page also provides\ndetails on the [different tiers of\nsupport](https://julialang.org/downloads/support) for OS and\nplatform combinations.\n\nIf everything works correctly, you will get a `julia` program and when you run\nit in a terminal or command prompt, you will see a Julia banner and an\ninteractive prompt into which you can enter expressions for evaluation. You can\nread about [getting\nstarted](https://docs.julialang.org/en/v1/manual/getting-started/) in the\nmanual.\n\n**Note**: Although some OS package managers provide Julia, such\ninstallations are neither maintained nor endorsed by the Julia\nproject. They may be outdated, broken and/or unmaintained. We\nrecommend you use the official Julia binaries instead.\n\n## Building Julia\n\nFirst, make sure you have all the [required\ndependencies](https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/build/build.md#required-build-tools-and-external-libraries) installed.\nThen, acquire the source code by cloning the git repository:\n\n    git clone https://github.com/JuliaLang/julia.git\n\nand then use the command prompt to change into the resulting julia directory. By default, you will be building the latest unstable version of\nJulia. However, most users should use the [most recent stable version](https://github.com/JuliaLang/julia/releases)\nof Julia. You can get this version by running: (replace `[tag]` with the desired tag)\n\n    git checkout [tag]\n\nTo build the `julia` executable, run `make` from within the julia directory.\n\nBuilding Julia requires 2GiB of disk space and approximately 4GiB of virtual memory.\n\n**Note:** The build process will fail badly if any of the build directory's parent directories have spaces or other shell meta-characters such as `$` or `:` in their names (this is due to a limitation in GNU make).\n\nOnce it is built, you can run the `julia` executable. From within the julia directory, run\n\n    ./julia\n\nYour first test of Julia determines whether your build is working\nproperly. From the julia\ndirectory, type `make testall`. You should see output that\nlists a series of running tests; if they complete without error, you\nshould be in good shape to start using Julia.\n\nYou can read about [getting\nstarted](https://docs.julialang.org/en/v1/manual/getting-started/)\nin the manual.\n\nDetailed build instructions, should they be necessary,\nare included in the [build documentation](https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/build/build.md).\n\n### Uninstalling Julia\n\nBy default, Julia does not install anything outside the directory it was cloned\ninto and `~/.julia`. Julia and the vast majority of Julia packages can be\ncompletely uninstalled by deleting these two directories.\n\n## Source Code Organization\n\nThe Julia source code is organized as follows:\n\n| Directory         | Contents                                                           |\n| -                 | -                                                                  |\n| `base/`           | source code for the Base module (part of Julia's standard library) |\n| `cli/`            | source for the command line interface/REPL                         |\n| `contrib/`        | miscellaneous scripts                                              |\n| `deps/`           | external dependencies                                              |\n| `doc/src/`        | source for the user manual                                         |\n| `etc/`            | contains `startup.jl`                                              |\n| `src/`            | source for Julia language core                                     |\n| `stdlib/`         | source code for other standard library packages                    |\n| `test/`           | test suites                                                        |\n\n## Terminal, Editors and IDEs\n\nThe Julia REPL is quite powerful. See the section in the manual on\n[the Julia REPL](https://docs.julialang.org/en/v1/stdlib/REPL/)\nfor more details.\n\nOn Windows, we highly recommend running Julia in a modern terminal,\nsuch as [Windows Terminal from the Microsoft Store](https://aka.ms/terminal).\n\nSupport for editing Julia is available for many\n[widely used editors](https://github.com/JuliaEditorSupport):\n[Emacs](https://github.com/JuliaEditorSupport/julia-emacs),\n[Vim](https://github.com/JuliaEditorSupport/julia-vim),\n[Sublime Text](https://github.com/JuliaEditorSupport/Julia-sublime), and many\nothers.\n\nFor users who prefer IDEs, we recommend using VS Code with the\n[julia-vscode](https://www.julia-vscode.org/) plugin.\\\nFor notebook users, [Jupyter](https://jupyter.org/) notebook support is available through the\n[IJulia](https://github.com/JuliaLang/IJulia.jl) package, and\nthe [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E54:372D9:17C2A7:5DED67:6AB92A41"},"text_sha256":"10234284e50e0e6b1421dbab9ebfc44a98055c6d43410ffce39626c6d605ecb8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"apache/airflow","input_row":{"repository":"apache/airflow","url":"https://github.com/apache/airflow","name":"airflow","owner":"apache","description":"Apache Airflow - A platform to programmatically author, schedule, and monitor workflows","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":46991,"issues":15211,"created_at":"2015-04-13T18:04:58Z","updated_at":"2026-09-27T12:36:20Z","first_commit_at":"2014-10-06T21:29:38Z","last_commit_at":"2026-09-27T12:36:12Z","activity_months":143.68000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:37:54.849Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apache/airflow","visibility":"public","created_at":"2015-04-13T18:04:58Z","updated_at":"2026-09-27T14:25:31Z","private":false,"fork":false,"archived":false,"stargazers_count":46991,"open_issues_count":1910,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2673","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:178CE6A:1BAF0B4:6AB92A42"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2672","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0876:6C9BF:17F8B33:1C1B0AB:6AB92A43"},"commit":{"sha":"e4e7b55ad71ff067f32e3f311753063a2bd76f05","url":"https://github.com/apache/airflow/commit/e4e7b55ad71ff067f32e3f311753063a2bd76f05","date":"2018-05-24T20:55:19Z","author_date":"2018-05-24T20:55:19Z","committer_date":"2018-05-24T20:55:19Z","tree_sha":"c8ed2b5720dcf5a2dc8f095065d6d71f6d08801e","message_first_line":"[AIRFLOW-2518] Fix broken ToC links in integration.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"2671","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:17A3349:1BC5720:6AB92A43"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":21877,"blob_sha":"e7bccc27fcdd9e4f7ea26d388230e64b660c4ca4","priority":0},{"path":"docs/security.rst","size":12531,"blob_sha":"6b3f933734b408c4a8da9d6b4b4838d38649b08e","priority":1}],"documents":[{"path":"README.md","size":21877,"blob_sha":"e7bccc27fcdd9e4f7ea26d388230e64b660c4ca4","priority":0,"status":200,"text":"# Airflow\n\n[![PyPI version](https://badge.fury.io/py/apache-airflow.svg)](https://badge.fury.io/py/apache-airflow)\n[![Build Status](https://travis-ci.org/apache/incubator-airflow.svg?branch=master)](https://travis-ci.org/apache/incubator-airflow)\n[![Coverage Status](https://img.shields.io/codecov/c/github/apache/incubator-airflow/master.svg)](https://codecov.io/github/apache/incubator-airflow?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/airflow/badge/?version=latest)](https://airflow.readthedocs.io/en/latest/?badge=latest)\n[![License](http://img.shields.io/:license-Apache%202-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)\n[![Join the chat at https://gitter.im/apache/incubator-airflow](https://badges.gitter.im/apache/incubator-airflow.svg)](https://gitter.im/apache/incubator-airflow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n_NOTE: The transition from 1.8.0 (or before) to 1.8.1 (or after) requires uninstalling Airflow before installing the new version. The package name was changed from `airflow` to `apache-airflow` as of version 1.8.1._\n\nAirflow is a platform to programmatically author, schedule, and monitor\nworkflows.\n\nWhen workflows are defined as code, they become more maintainable,\nversionable, testable, and collaborative.\n\nUse Airflow to author workflows as directed acyclic graphs (DAGs) of tasks.\nThe Airflow scheduler executes your tasks on an array of workers while\nfollowing the specified dependencies. Rich command line utilities make\nperforming complex surgeries on DAGs a snap. The rich user interface\nmakes it easy to visualize pipelines running in production,\nmonitor progress, and troubleshoot issues when needed.\n\n## Getting started\nPlease visit the Airflow Platform documentation (latest **stable** release) for help with [installing Airflow](https://airflow.incubator.apache.org/installation.html), getting a [quick start](https://airflow.incubator.apache.org/start.html), or a more complete [tutorial](https://airflow.incubator.apache.org/tutorial.html).\n\nDocumentation of GitHub master (latest development branch): [ReadTheDocs Documentation](https://airflow.readthedocs.io/en/latest/)\n\nFor further information, please visit the [Airflow Wiki](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Home).\n\n## Beyond the Horizon\n\nAirflow **is not** a data streaming solution. Tasks do not move data from\none to the other (though tasks can exchange metadata!). Airflow is not\nin the [Spark Streaming](http://spark.apache.org/streaming/)\nor [Storm](https://storm.apache.org/) space, it is more comparable to\n[Oozie](http://oozie.apache.org/) or\n[Azkaban](https://azkaban.github.io/).\n\nWorkflows are expected to be mostly static or slowly changing. You can think\nof the structure of the tasks in your workflow as slightly more dynamic\nthan a database structure would be. Airflow workflows are expected to look\nsimilar from a run to the next, this allows for clarity around\nunit of work and continuity.\n\n## Principles\n\n- **Dynamic**:  Airflow pipelines are configuration as code (Python), allowing for dynamic pipeline generation. This allows for writing code that instantiates pipelines dynamically.\n- **Extensible**:  Easily define your own operators, executors and extend the library so that it fits the level of abstraction that suits your environment.\n- **Elegant**:  Airflow pipelines are lean and explicit. Parameterizing your scripts is built into the core of Airflow using the powerful **Jinja** templating engine.\n- **Scalable**:  Airflow has a modular architecture and uses a message queue to orchestrate an arbitrary number of workers. Airflow is ready to scale to infinity.\n\n## User Interface\n\n- **DAGs**: Overview of all DAGs in your environment.\n![](/docs/img/dags.png)\n\n- **Tree View**: Tree representation of a DAG that spans across time.\n![](/docs/img/tree.png)\n\n- **Graph View**: Visualization of a DAG's dependencies and their current status for a specific run.\n![](/docs/img/graph.png)\n\n- **Task Duration**: Total time spent on different tasks over time.\n![](/docs/img/duration.png)\n\n- **Gantt View**: Duration and overlap of a DAG.\n![](/docs/img/gantt.png)\n\n- **Code View**:  Quick way to view source code of a DAG.\n![](/docs/img/code.png)\n\n## Who uses Airflow?\n\nAs the Airflow community grows, we'd like to keep track of who is using\nthe platform. Please send a PR with your company name and @githubhandle\nif you may.\n\nCommitters:\n\n* Refer to [Committers](https://cwiki.apache.org/confluence/display/AIRFLOW/Committers)\n\nCurrently **officially** using Airflow:\n\n1. [AdBOOST](https://www.adboost.sk) [[AdBOOST](https://github.com/AdBOOST)]\n1. [Agari](https://github.com/agaridata) [[@r39132](https://github.com/r39132)]\n1. [Airbnb](http://airbnb.io/) [[@mistercrunch](https://github.com/mistercrunch), [@artwr](https://github.com/artwr)]\n1. [Airtel](https://www.airtel.in/) [[@harishbisht](https://github.com/harishbisht)]\n1. [Alan](https://alan.eu) [[@charles-go](https://github.com/charles-go)]\n1. [allegro.pl](http://allegro.tech/) [[@kretes](https://github.com/kretes)]\n1. [AltX](https://www.getaltx.com/about) [[@pedromduarte](https://github.com/pedromduarte)]\n1. [Apigee](https://apigee.com) [[@btallman](https://github.com/btallman)]\n1. [ARGO Labs](http://www.argolabs.org) [[California Data Collaborative](https://github.com/California-Data-Collaborative)]\n1. [Astronomer](http://www.astronomer.io) [[@schnie](https://github.com/schnie), [@andscoop](https://github.com/andscoop), [@tedmiston](https://github.com/tedmiston), [@benjamingregory](https://github.com/benjamingregory)]\n1. [Auth0](https://auth0.com) [[@sicarul](https://github.com/sicarul)]\n1. [Away](https://awaytravel.com) [[@trunsky](https://github.com/trunsky)]\n1. [Azri Solutions](http://www.azrisolutions.com/) [[@userimack](https://github.com/userimack)]\n1. [BalanceHero](http://truebalance.io/) [[@swalloow](https://github.com/swalloow)]\n1. [Banco de Formaturas](https://www.bancodeformaturas.com.br) [[@guiligan](https://github.com/guiligan)]\n1. [BandwidthX](http://www.bandwidthx.com) [[@dineshdsharma](https://github.com/dineshdsharma)]\n1. [Bellhops](https://github.com/bellhops)\n1. [BelugaDB](https://belugadb.com) [[@fabio-nukui](https://github.com/fabio-nukui) & [@joao-sallaberry](http://github.com/joao-sallaberry) & [@lucianoviola](https://github.com/lucianoviola) & [@tmatuki](https://github.com/tmatuki)]\n1. [BlaBlaCar](https://www.blablacar.com) [[@puckel](https://github.com/puckel) & [@wmorin](https://github.com/wmorin)]\n1. [Bloc](https://www.bloc.io) [[@dpaola2](https://github.com/dpaola2)]\n1. [Blue Yonder](http://www.blue-yonder.com) [[@blue-yonder](https://github.com/blue-yonder)]\n1. [BlueApron](https://www.blueapron.com) [[@jasonjho](https://github.com/jasonjho) & [@matthewdavidhauser](https://github.com/matthewdavidhauser)]\n1. [Bluecore](https://www.bluecore.com) [[@JLDLaughlin](https://github.com/JLDLaughlin)]\n1. [Boda Telecom Suite - CE](https://github.com/bodastage/bts-ce) [[@erssebaggala](https://github.com/erssebaggala), [@bodastage](https://github.com/bodastage)]\n1. [Bodastage Solutions](http://bodastage.com) [[@erssebaggala](https://github.com/erssebaggala), [@bodastage](https://github.com/bodastage)]\n1. [Bonnier Broadcasting](http://www.bonnierbroadcasting.com) [[@wileeam](https://github.com/wileeam)]\n1. [BounceX](http://www.bouncex.com) [[@JoshFerge](https://github.com/JoshFerge), [@hudsonrio](https://github.com/hudsonrio), [@ronniekritou](https://github.com/ronniekritou)]\n1. [California Data Collaborative](https://github.com/California-Data-Collaborative) powered by [ARGO Labs](http://www.argolabs.org)\n1. [Carbonite](https://www.carbonite.com) [[@ajbosco](https://github.com/ajbosco)]\n1. [Celect](http://www.celect.com) [[@superdosh](https://github.com/superdosh) & [@chadcelect](https://github.com/chadcelect)]\n1. [Change.org](https://www.change.org) [[@change](https://github.com/change), [@vijaykramesh](https://github.com/vijaykramesh)]\n1. [Checkr](https://checkr.com) [[@tongboh](https://github.com/tongboh)]\n1. [Children's Hospital of Philadelphia Division of Genomic Diagnostics](http://www.chop.edu/centers-programs/division-genomic-diagnostics) [[@genomics-geek]](https://github.com/genomics-geek/)\n1. [Cinimex DataLab](http://cinimex.ru) [[@kdubovikov](https://github.com/kdubovikov)]\n1. [City of San Diego](http://sandiego.gov) [[@MrMaksimize](https://github.com/mrmaksimize), [@andrell81](https://github.com/andrell81) & [@arnaudvedy](https://github.com/arnaudvedy)]\n1. [Clairvoyant](https://clairvoyantsoft.com) [@shekharv](https://github.com/shekharv)\n1. [Clover Health](https://www.cloverhealth.com) [[@gwax](https://github.com/gwax) & [@vansivallab](https://github.com/vansivallab)]\n1. [Chartboost](https://www.chartboost.com) [[@cgelman](https://github.com/cgelman) & [@dclubb](https://github.com/dclubb)]\n1. [ContaAzul](https://www.contaazul.com) [[@bern4rdelli](https://github.com/bern4rdelli), [@renanleme](https://github.com/renanleme) & [@sabino](https://github.com/sabino)]\n1. [Cotap](https://github.com/cotap/) [[@maraca](https://github.com/maraca) & [@richardchew](https://github.com/richardchew)]\n1. [Craig@Work](https://www.craigatwork.com)\n1. [Credit Karma](https://www.creditkarma.com/) [[@preete-dixit-ck](https://github.com/preete-dixit-ck) & [@harish-gaggar-ck](https://github.com/harish-gaggar-ck) & [@greg-finley-ck](https://github.com/greg-finley-ck)]\n1. [CreditCards.com](https://www.creditcards.com/)[[@vmAggies](https://github.com/vmAggies) &  [@jay-wallaby](https://github.com/jay-wallaby)]\n1. [Creditas](https://www.creditas.com.br) [[@dcassiano](https://github.com/dcassiano)]\n1. [Custom Ink](https://www.customink.com/) [[@david-dalisay](https://github.com/david-dalisay), [@dmartin11](https://github.com/dmartin11) & [@mpeteuil](https://github.com/mpeteuil)]\n1. [Data Reply](https://www.datareply.co.uk/) [[@kaxil](https://github.com/kaxil)]\n1. [DataFox](https://www.datafox.com/) [[@sudowork](https://github.com/sudowork)]\n1. [Digital First Media](http://www.digitalfirstmedia.com/) [[@duffn](https://github.com/duffn) & [@mschmo](https://github.com/mschmo) & [@seanmuth](https://github.com/seanmuth)]\n1. [DocuTAP](https://www.docutap.com/) [[@jshvrsn](https://github.com/jshvrsn) & [@lhvphan](https://github.com/lhvphan) & [@cloneluke](https://github.com/cloneluke)]\n1. [Dotmodus](http://dotmodus.com) [[@dannylee12](https://github.com/dannylee12)]\n1. [Drivy](https://www.drivy.com) [[@AntoineAugusti](https://github.com/AntoineAugusti)]\n1. [Easy Taxi](http://www.easytaxi.com/) [[@caique-lima](https://github.com/caique-lima) & [@WesleyBatista](https://github.com/WesleyBatista) & [@diraol](https://github.com/diraol)]\n1. [eRevalue](https://www.datamaran.com) [[@hamedhsn](https://github.com/hamedhsn)]\n1. [evo.company](https://evo.company/) [[@orhideous](https://github.com/orhideous)]\n1. [FreshBooks](https://github.com/freshbooks) [[@DinoCow](https://github.com/DinoCow)]\n1. [Fundera](https://fundera.com) [[@andyxhadji](https://github.com/andyxhadji)]\n1. [GameWisp](https://gamewisp.com) [[@tjbiii](https://github.com/TJBIII) & [@theryanwalls](https://github.com/theryanwalls)]\n1. [Gentner Lab](http://github.com/gentnerlab) [[@neuromusic](https://github.com/neuromusic)]\n1. [Glassdoor](https://github.com/Glassdoor) [[@syvineckruyk](https://github.com/syvineckruyk)]\n1. [Global Fashion Group](http://global-fashion-group.com) [[@GFG](https://github.com/GFG)]\n1. [GovTech GDS](https://gds-gov.tech) [[@chrissng](https://github.com/chrissng) & [@datagovsg](https://github.com/datagovsg)]\n1. [Grand Rounds](https://www.grandrounds.com/) [[@richddr](https://github.com/richddr), [@timz1290](https://github.com/timz1290), [@wenever](https://github.com/@wenever), & [@runongirlrunon](https://github.com/runongirlrunon)]\n1. [Groupalia](http://es.groupalia.com) [[@jesusfcr](https://github.com/jesusfcr)]\n1. [Groupon](https://groupon.com) [[@stevencasey](https://github.com/stevencasey)]\n1. [Gusto](https://gusto.com) [[@frankhsu](https://github.com/frankhsu)]\n1. [Handshake](https://joinhandshake.com/) [[@mhickman](https://github.com/mhickman)]\n1. [Handy](http://www.handy.com/careers/73115?gh_jid=73115&gh_src=o5qcxn) [[@marcintustin](https://github.com/marcintustin) / [@mtustin-handy](https://github.com/mtustin-handy)]\n1. [HBC Digital](http://tech.hbc.com) [[@tmccartan](https://github.com/tmccartan) & [@dmateusp](https://github.com/dmateusp)]\n1. [HBO](http://www.hbo.com/)[[@yiwang](https://github.com/yiwang)]\n1. [Healthjump](http://www.healthjump.com/) [[@miscbits](https://github.com/miscbits)]\n1. [HelloFresh](https://www.hellofresh.com) [[@tammymendt](https://github.com/tammymendt) & [@davidsbatista](https://github.com/davidsbatista) & [@iuriinedostup](https://github.com/iuriinedostup)]\n1. [Holimetrix](http://holimetrix.com/) [[@thibault-ketterer](https://github.com/thibault-ketterer)]\n1. [Hootsuite](https://github.com/hootsuite)\n1. [Hostnfly](https://www.hostnfly.com/) [[@CyrilLeMat](https://github.com/CyrilLeMat) & [@pierrechopin](https://github.com/pierrechopin) & [@alexisrosuel](https://github.com/alexisrosuel)]\n1. [HotelQuickly](https://github.com/HotelQuickly) [[@zinuzoid](https://github.com/zinuzoid)]\n1. [IFTTT](https://www.ifttt.com/) [[@apurvajoshi](https://github.com/apurvajoshi)]\n1. [iHeartRadio](http://www.iheart.com/)[[@yiwang](https://github.com/yiwang)]\n1. [imgix](https://www.imgix.com/) [[@dclubb](https://github.com/dclubb)]\n1. [ING](http://www.ing.com/)\n1. [Intercom](http://www.intercom.com/) [[@fox](https://github.com/fox) & [@paulvic](https://github.com/paulvic)]\n1. [Investorise](https://investorise.com/) [[@svenvarkel](https://github.com/svenvarkel)]\n1. [Jampp](https://github.com/jampp)\n1. [JobTeaser](https://www.jobteaser.com) [[@stefani75](https://github.com/stefani75) &  [@knil-sama](https://github.com/knil-sama)]\n1. [Kalibrr](https://www.kalibrr.com/) [[@charlesverdad](https://github.com/charlesverdad)]\n1. [Karmic](https://karmiclabs.com) [[@hyw](https://github.com/hyw)]\n1. [Kiwi.com](https://kiwi.com/) [[@underyx](https://github.com/underyx)]\n1. [Kogan.com](https://github.com/kogan) [[@geeknam](https://github.com/geeknam)]\n1. [Lemann Foundation](http://fundacaolemann.org.br) [[@fernandosjp](https://github.com/fernandosjp)]\n1. [LendUp](https://www.lendup.com/) [[@lendup](https://github.com/lendup)]\n1. [LetsBonus](http://www.letsbonus.com) [[@jesusfcr](https://github.com/jesusfcr) & [@OpringaoDoTurno](https://github.com/OpringaoDoTurno)]\n1. [liligo](http://liligo.com/) [[@tromika](https://github.com/tromika)]\n1. [LingoChamp](http://www.liulishuo.com/) [[@haitaoyao](https://github.com/haitaoyao)]\n1. [Lucid](http://luc.id) [[@jbrownlucid](https://github.com/jbrownlucid) & [@kkourtchikov](https://github.com/kkourtchikov)]\n1. [Lumos Labs](https://www.lumosity.com/) [[@rfroetscher](https://github.com/rfroetscher/) & [@zzztimbo](https://github.com/zzztimbo/)]\n1. [Lyft](https://www.lyft.com/)[[@SaurabhBajaj](https://github.com/SaurabhBajaj)]\n1. [Madrone](http://madroneco.com/) [[@mbreining](https://github.com/mbreining) & [@scotthb](https://github.com/scotthb)]\n1. [Markovian](https://markovian.com/) [[@al-xv](https://github.com/al-xv), [@skogsbaeck](https://github.com/skogsbaeck), [@waltherg](https://github.com/waltherg)]\n1. [Mercadoni](https://www.mercadoni.com.co) [[@demorenoc](https://github.com/demorenoc)]\n1. [Mercari](http://www.mercari.com/) [[@yu-iskw](https://github.com/yu-iskw)]\n1. [MFG Labs](https://github.com/MfgLabs)\n1. [MiNODES](https://www.minodes.com) [[@dice89](https://github.com/dice89), [@diazcelsa](https://github.com/diazcelsa)]\n1. [Multiply](https://www.multiply.com) [[@nrhvyc](https://github.com/nrhvyc)]\n1. [mytaxi](https://mytaxi.com) [[@mytaxi](https://github.com/mytaxi)]\n1. [Nerdwallet](https://www.nerdwallet.com)\n1. [New Relic](https://www.newrelic.com) [[@marcweil](https://github.com/marcweil)]\n1. [Newzoo](https://www.newzoo.com) [[@newzoo-nexus](https://github.com/newzoo-nexus)]\n1. [Nextdoor](https://nextdoor.com) [[@SivaPandeti](https://github.com/SivaPandeti), [@zshapiro](https://github.com/zshapiro) & [@jthomas123](https://github.com/jthomas123)]\n1. [OfferUp](https://offerupnow.com)\n1. [OneFineStay](https://www.onefinestay.com) [[@slangwald](https://github.com/slangwald)]\n1. [Open Knowledge International](https://okfn.org) [@vitorbaptista](https://github.com/vitorbaptista)\n1. [Overstock](https://www.github.com/overstock) [[@mhousley](https://github.com/mhousley) & [@mct0006](https://github.com/mct0006)]\n1. [Pandora Media](https://www.pandora.com/) [[@Acehaidrey](https://github.com/Acehaidrey) & [@wolfier](https://github.com/wolfier)]\n1. [PAYMILL](https://www.paymill.com/) [[@paymill](https://github.com/paymill) & [@matthiashuschle](https://github.com/matthiashuschle)]\n1. [PayPal](https://www.paypal.com/) [[@r39132](https://github.com/r39132) & [@jhsenjaliya](https://github.com/jhsenjaliya)]\n1. [Pernod-Ricard](https://www.pernod-ricard.com/) [[@romain-nio](https://github.com/romain-nio)]\n1. [Plaid](https://www.plaid.com/) [[@plaid](https://github.com/plaid), [@AustinBGibbons](https://github.com/AustinBGibbons) & [@jeeyoungk](https://github.com/jeeyoungk)]\n1. [Playbuzz](https://www.playbuzz.com/) [[@clintonboys](https://github.com/clintonboys) & [@dbn](https://github.com/dbn)]\n1. [PMC](https://pmc.com/) [[@andrewm4894](https://github.com/andrewm4894)]\n1. [Postmates](http://www.postmates.com) [[@syeoryn](https://github.com/syeoryn)]\n1. [Pronto Tools](http://www.prontotools.io/) [[@zkan](https://github.com/zkan) & [@mesodiar](https://github.com/mesodiar)]\n1. [PubNub](https://pubnub.com) [[@jzucker2](https://github.com/jzucker2)]\n1. [Qplum](https://qplum.co) [[@manti](https://github.com/manti)]\n1. [Quantopian](https://www.quantopian.com/) [[@eronarn](http://github.com/eronarn)]\n1. [Qubole](https://qubole.com) [[@msumit](https://github.com/msumit)]\n1. [Quizlet](https://quizlet.com) [[@quizlet](https://github.com/quizlet)]\n1. [Quora](https://www.quora.com/)\n1. [Reddit](https://www.reddit.com/) [[@reddit](https://github.com/reddit/)]\n1. [Robinhood](https://robinhood.com) [[@vineet-rh](https://github.com/vineet-rh)]\n1. [Scaleway](https://scaleway.com) [[@kdeldycke](https://github.com/kdeldycke)]\n1. [Sense360](https://github.com/Sense360) [[@kamilmroczek](https://github.com/KamilMroczek)]\n1. [Shopkick](https://shopkick.com/) [[@shopkick](https://github.com/shopkick)]\n1. [Sidecar](https://hello.getsidecar.com/) [[@getsidecar](https://github.com/getsidecar)]\n1. [SimilarWeb](https://www.similarweb.com/) [[@similarweb](https://github.com/similarweb)]\n1. [SmartNews](https://www.smartnews.com/) [[@takus](https://github.com/takus)]\n1. [SocialCops](https://www.socialcops.com/) [[@vinayak-mehta](https://github.com/vinayak-mehta) & [@sharky93](https://github.com/sharky93)]\n1. [Spotahome](https://www.spotahome.com/) [[@spotahome](https://github.com/spotahome)]\n1. [Spotify](https://github.com/spotify) [[@znichols](https://github.com/znichols)]\n1. [Stackspace](https://beta.stackspace.io/)\n1. [Stripe](https://stripe.com) [[@jbalogh](https://github.com/jbalogh)]\n1. [Tails.com](https://tails.com/) [[@alanmcruickshank](https://github.com/alanmcruickshank)]\n1. [Thinking Machines](https://thinkingmachin.es) [[@marksteve](https://github.com/marksteve)]\n1. [Thinknear](https://www.thinknear.com/) [[@d3cay1](https://github.com/d3cay1), [@ccson](https://github.com/ccson), & [@ababian](https://github.com/ababian)]\n1. [Thumbtack](https://www.thumbtack.com/) [[@natekupp](https://github.com/natekupp)]\n1. [Tictail](https://tictail.com/)\n1. [Tile](https://tile.com/) [[@ranjanmanish](https://github.com/ranjanmanish)]\n1. [Tokopedia](https://www.tokopedia.com/) [@topedmaria](https://github.com/topedmaria)\n1. [Twine Labs](https://www.twinelabs.com/) [[@ivorpeles](https://github.com/ivorpeles)]\n1. [T2 Systems](http://t2systems.com) [[@unclaimedpants](https://github.com/unclaimedpants)]\n1. [Ubisoft](https://www.ubisoft.com/) [[@Walkoss](https://github.com/Walkoss)]\n1. [United Airlines](https://www.united.com/) [[@ilopezfr](https://github.com/ilopezfr)]\n1. [Upsight](https://www.upsight.com) [[@dhuang](https://github.com/dhuang)]\n1. [Vente-Exclusive.com](http://www.vente-exclusive.com/) [[@alexvanboxel](https://github.com/alexvanboxel)]\n1. [Vevo](https://www.vevo.com/) [[@csetiawan](https://github.com/csetiawan) & [@jerrygillespie](https://github.com/jerrygillespie)]\n1. [Vnomics](https://github.com/vnomics) [[@lpalum](https://github.com/lpalum)]\n1. [WePay](http://www.wepay.com) [[@criccomini](https://github.com/criccomini) & [@mtagle](https://github.com/mtagle)]\n1. [WeTransfer](https://github.com/WeTransfer) [[@jochem](https://github.com/jochem)]\n1. [Whistle Labs](http://www.whistle.com) [[@ananya77041](https://github.com/ananya77041)]\n1. [WiseBanyan](https://wisebanyan.com/)\n1. [Wooga](https://www.wooga.com/)\n1. [Xero](https://www.xero.com/) [[@yan9yu](https://github.com/yan9yu)]\n1. [Xoom](https://www.xoom.com/)\n1. [Yahoo!](https://www.yahoo.com/)\n1. [Zapier](https://www.zapier.com) [[@drknexus](https://github.com/drknexus) & [@statwonk](https://github.com/statwonk)]\n1. [Zego](https://www.zego.com/) [[@ruimffl](https://github.com/ruimffl)]\n1. [Zendesk](https://www.github.com/zendesk)\n1. [Zenly](https://zen.ly) [[@cerisier](https://github.com/cerisier) & [@jbdalido](https://github.com/jbdalido)]\n1. [Zymergen](https://www.zymergen.com/)\n1. [99](https://99taxis.com) [[@fbenevides](https://github.com/fbenevides), [@gustavoamigo](https://github.com/gustavoamigo) & [@mmmaia](https://github.com/mmmaia)]\n\n## Links\n\n\n* [Documentation](https://airflow.incubator.apache.org/)\n* [Chat](https://gitter.im/apache/incubator-airflow)\n* [Apache Airflow Incubation Status](http://incubator.apache.org/projects/airflow.html)\n* [More](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Links)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2678:3E724:17FF5B:5E2912:6AB92A40"},"text_sha256":"3f51ddd7ceb67a0977028f9d8519af9d7d1c10ec4bd0ee38735a9a726c81d957"},{"path":"docs/security.rst","size":12531,"blob_sha":"6b3f933734b408c4a8da9d6b4b4838d38649b08e","priority":1,"status":200,"text":"Security\n========\n\nBy default, all gates are opened. An easy way to restrict access\nto the web application is to do it at the network level, or by using\nSSH tunnels.\n\nIt is however possible to switch on authentication by either using one of the supplied\nbackends or creating your own.\n\nBe sure to checkout :doc:`api` for securing the API.\n\nWeb Authentication\n------------------\n\nPassword\n''''''''\n\nOne of the simplest mechanisms for authentication is requiring users to specify a password before logging in.\nPassword authentication requires the used of the ``password`` subpackage in your requirements file. Password hashing\nuses bcrypt before storing passwords.\n\n.. code-block:: bash\n\n    [webserver]\n    authenticate = True\n    auth_backend = airflow.contrib.auth.backends.password_auth\n\nWhen password auth is enabled, an initial user credential will need to be created before anyone can login. An initial\nuser was not created in the migrations for this authenication backend to prevent default Airflow installations from\nattack. Creating a new user has to be done via a Python REPL on the same machine Airflow is installed.\n\n.. code-block:: bash\n\n    # navigate to the airflow installation directory\n    $ cd ~/airflow\n    $ python\n    Python 2.7.9 (default, Feb 10 2015, 03:28:08)\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    >>> import airflow\n    >>> from airflow import models, settings\n    >>> from airflow.contrib.auth.backends.password_auth import PasswordUser\n    >>> user = PasswordUser(models.User())\n    >>> user.username = 'new_user_name'\n    >>> user.email = 'new_user_email@example.com'\n    >>> user.password = 'set_the_password'\n    >>> session = settings.Session()\n    >>> session.add(user)\n    >>> session.commit()\n    >>> session.close()\n    >>> exit()\n\nLDAP\n''''\n\nTo turn on LDAP authentication configure your ``airflow.cfg`` as follows. Please note that the example uses\nan encrypted connection to the ldap server as you probably do not want passwords be readable on the network level.\nIt is however possible to configure without encryption if you really want to.\n\nAdditionally, if you are using Active Directory, and are not explicitly specifying an OU that your users are in,\nyou will need to change ``search_scope`` to \"SUBTREE\".\n\nValid search_scope options can be found in the `ldap3 Documentation <http://ldap3.readthedocs.org/searches.html?highlight=search_scope>`_\n\n.. code-block:: bash\n\n    [webserver]\n    authenticate = True\n    auth_backend = airflow.contrib.auth.backends.ldap_auth\n\n    [ldap]\n    # set a connection without encryption: uri = ldap://<your.ldap.server>:<port>\n    uri = ldaps://<your.ldap.server>:<port>\n    user_filter = objectClass=*\n    # in case of Active Directory you would use: user_name_attr = sAMAccountName\n    user_name_attr = uid\n    # group_member_attr should be set accordingly with *_filter\n    # eg :\n    #     group_member_attr = groupMembership\n    #     superuser_filter = groupMembership=CN=airflow-super-users...\n    group_member_attr = memberOf\n    superuser_filter = memberOf=CN=airflow-super-users,OU=Groups,OU=RWC,OU=US,OU=NORAM,DC=example,DC=com\n    data_profiler_filter = memberOf=CN=airflow-data-profilers,OU=Groups,OU=RWC,OU=US,OU=NORAM,DC=example,DC=com\n    bind_user = cn=Manager,dc=example,dc=com\n    bind_password = insecure\n    basedn = dc=example,dc=com\n    cacert = /etc/ca/ldap_ca.crt\n    # Set search_scope to one of them:  BASE, LEVEL , SUBTREE\n    # Set search_scope to SUBTREE if using Active Directory, and not specifying an Organizational Unit\n    search_scope = LEVEL\n\nThe superuser_filter and data_profiler_filter are optional. If defined, these configurations allow you to specify LDAP groups that users must belong to in order to have superuser (admin) and data-profiler permissions. If undefined, all users will be superusers and data profilers.\n\nRoll your own\n'''''''''''''\n\nAirflow uses ``flask_login`` and\nexposes a set of hooks in the ``airflow.default_login`` module. You can\nalter the content and make it part of the ``PYTHONPATH`` and configure it as a backend in ``airflow.cfg``.\n\n.. code-block:: bash\n\n    [webserver]\n    authenticate = True\n    auth_backend = mypackage.auth\n\nMulti-tenancy\n-------------\n\nYou can filter the list of dags in webserver by owner name when authentication\nis turned on by setting ``webserver:filter_by_owner`` in your config. With this, a user will see\nonly the dags which it is owner of, unless it is a superuser.\n\n.. code-block:: bash\n\n    [webserver]\n    filter_by_owner = True\n\n\nKerberos\n--------\n\nAirflow has initial support for Kerberos. This means that airflow can renew kerberos\ntickets for itself and store it in the ticket cache. The hooks and dags can make use of ticket\nto authenticate against kerberized services.\n\nLimitations\n'''''''''''\n\nPlease note that at this time, not all hooks have been adjusted to make use of this functionality.\nAlso it does not integrate kerberos into the web interface and you will have to rely on network\nlevel security for now to make sure your service remains secure.\n\nCelery integration has not been tried and tested yet. However, if you generate a key tab for every\nhost and launch a ticket renewer next to every worker it will most likely work.\n\nEnabling kerberos\n'''''''''''''''''\n\nAirflow\n^^^^^^^\n\nTo enable kerberos you will need to generate a (service) key tab.\n\n.. code-block:: bash\n\n    # in the kadmin.local or kadmin shell, create the airflow principal\n    kadmin:  addprinc -randkey airflow/fully.qualified.domain.name@YOUR-REALM.COM\n\n    # Create the airflow keytab file that will contain the airflow principal\n    kadmin:  xst -norandkey -k airflow.keytab airflow/fully.qualified.domain.name\n\nNow store this file in a location where the airflow user can read it (chmod 600). And then add the following to\nyour ``airflow.cfg``\n\n.. code-block:: bash\n\n    [core]\n    security = kerberos\n\n    [kerberos]\n    keytab = /etc/airflow/airflow.keytab\n    reinit_frequency = 3600\n    principal = airflow\n\nLaunch the ticket renewer by\n\n.. code-block:: bash\n\n    # run ticket renewer\n    airflow kerberos\n\nHadoop\n^^^^^^\n\nIf want to use impersonation this needs to be enabled in ``core-site.xml`` of your hadoop config.\n\n.. code-block:: bash\n\n    <property>\n      <name>hadoop.proxyuser.airflow.groups<\/name>\n      <value>*<\/value>\n    <\/property>\n\n    <property>\n      <name>hadoop.proxyuser.airflow.users<\/name>\n      <value>*<\/value>\n    <\/property>\n\n    <property>\n      <name>hadoop.proxyuser.airflow.hosts<\/name>\n      <value>*<\/value>\n    <\/property>\n\nOf course if you need to tighten your security replace the asterisk with something more appropriate.\n\nUsing kerberos authentication\n'''''''''''''''''''''''''''''\n\nThe hive hook has been updated to take advantage of kerberos authentication. To allow your DAGs to\nuse it, simply update the connection details with, for example:\n\n.. code-block:: bash\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\"}\n\nAdjust the principal to your settings. The _HOST part will be replaced by the fully qualified domain name of\nthe server.\n\nYou can specify if you would like to use the dag owner as the user for the connection or the user specified in the login\nsection of the connection. For the login user, specify the following as extra:\n\n.. code-block:: bash\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\", \"proxy_user\": \"login\"}\n\nFor the DAG owner use:\n\n.. code-block:: bash\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\", \"proxy_user\": \"owner\"}\n\nand in your DAG, when initializing the HiveOperator, specify:\n\n.. code-block:: bash\n\n    run_as_owner=True\n\nOAuth Authentication\n--------------------\n\nGitHub Enterprise (GHE) Authentication\n''''''''''''''''''''''''''''''''''''''\n\nThe GitHub Enterprise authentication backend can be used to authenticate users\nagainst an installation of GitHub Enterprise using OAuth2. You can optionally\nspecify a team whitelist (composed of slug cased team names) to restrict login\nto only members of those teams.\n\n.. code-block:: bash\n\n    [webserver]\n    authenticate = True\n    auth_backend = airflow.contrib.auth.backends.github_enterprise_auth\n\n    [github_enterprise]\n    host = github.example.com\n    client_id = oauth_key_from_github_enterprise\n    client_secret = oauth_secret_from_github_enterprise\n    oauth_callback_route = /example/ghe_oauth/callback\n    allowed_teams = 1, 345, 23\n\n.. note:: If you do not specify a team whitelist, anyone with a valid account on\n   your GHE installation will be able to login to Airflow.\n\nSetting up GHE Authentication\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn application must be setup in GHE before you can use the GHE authentication\nbackend. In order to setup an application:\n\n1. Navigate to your GHE profile\n2. Select 'Applications' from the left hand nav\n3. Select the 'Developer Applications' tab\n4. Click 'Register new application'\n5. Fill in the required information (the 'Authorization callback URL' must be fully qualifed e.g. http://airflow.example.com/example/ghe_oauth/callback)\n6. Click 'Register application'\n7. Copy 'Client ID', 'Client Secret', and your callback route to your airflow.cfg according to the above example\n\nGoogle Authentication\n'''''''''''''''''''''\n\nThe Google authentication backend can be used to authenticate users\nagainst Google using OAuth2. You must specify the domains to restrict\nlogin, separated with a comma, to only members of those domains.\n\n.. code-block:: bash\n\n    [webserver]\n    authenticate = True\n    auth_backend = airflow.contrib.auth.backends.google_auth\n\n    [google]\n    client_id = google_client_id\n    client_secret = google_client_secret\n    oauth_callback_route = /oauth2callback\n    domain = \"example1.com,example2.com\"\n\nSetting up Google Authentication\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn application must be setup in the Google API Console before you can use the Google authentication\nbackend. In order to setup an application:\n\n1. Navigate to https://console.developers.google.com/apis/\n2. Select 'Credentials' from the left hand nav\n3. Click 'Create credentials' and choose 'OAuth client ID'\n4. Choose 'Web application'\n5. Fill in the required information (the 'Authorized redirect URIs' must be fully qualifed e.g. http://airflow.example.com/oauth2callback)\n6. Click 'Create'\n7. Copy 'Client ID', 'Client Secret', and your redirect URI to your airflow.cfg according to the above example\n\nSSL\n---\n\nSSL can be enabled by providing a certificate and key. Once enabled, be sure to use\n\"https://\" in your browser.\n\n.. code-block:: bash\n\n    [webserver]\n    web_server_ssl_cert = <path to cert>\n    web_server_ssl_key = <path to key>\n\nEnabling SSL will not automatically change the web server port. If you want to use the\nstandard port 443, you'll need to configure that too. Be aware that super user privileges\n(or cap_net_bind_service on Linux) are required to listen on port 443.\n\n.. code-block:: bash\n\n    # Optionally, set the server to listen on the standard SSL port.\n    web_server_port = 443\n    base_url = http://<hostname or IP>:443\n\nEnable CeleryExecutor with SSL. Ensure you properly generate client and server\ncerts and keys.\n\n.. code-block:: bash\n\n    [celery]\n    CELERY_SSL_ACTIVE = True\n    CELERY_SSL_KEY = <path to key>\n    CELERY_SSL_CERT = <path to cert>\n    CELERY_SSL_CACERT = <path to cacert>\n\nImpersonation\n-------------\n\nAirflow has the ability to impersonate a unix user while running task\ninstances based on the task's ``run_as_user`` parameter, which takes a user's name.\n\n**NOTE:** For impersonations to work, Airflow must be run with `sudo` as subtasks are run\nwith `sudo -u` and permissions of files are changed. Furthermore, the unix user needs to\nexist on the worker. Here is what a simple sudoers file entry could look like to achieve\nthis, assuming as airflow is running as the `airflow` user. Note that this means that\nthe airflow user must be trusted and treated the same way as the root user.\n\n.. code-block:: none\n\n    airflow ALL=(ALL) NOPASSWD: ALL\n\n\nSubtasks with impersonation will still log to the same folder, except that the files they\nlog to will have permissions changed such that only the unix user can write to it.\n\nDefault Impersonation\n'''''''''''''''''''''\nTo prevent tasks that don't use impersonation to be run with `sudo` privileges, you can set the\n``core:default_impersonation`` config which sets a default user impersonate if `run_as_user` is\nnot set.\n\n.. code-block:: bash\n\n    [core]\n    default_impersonation = airflow\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A10:3EACB:179D3D:5DC766:6AB92A44"},"text_sha256":"f8ffd2bfd349db0afb530151a3fdd61fcf42fbfbbc01fb8b5746d3603ce84b7c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2670","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:182C1DE:1C4E2C7:6AB92A45"},"commit":{"sha":"e0a1726aa586800ec65e2626b4d110b83ecc88fa","url":"https://github.com/apache/airflow/commit/e0a1726aa586800ec65e2626b4d110b83ecc88fa","date":"2026-06-30T23:58:01Z","author_date":"2026-06-30T23:58:01Z","committer_date":"2026-06-30T23:58:01Z","tree_sha":"29f4c1bf0401ed1da206784316ec132035c7e365","message_first_line":"[main] Upgrade important CI environment (#68933)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2669","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17C52B1:1BE780D:6AB92A45"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":40600,"blob_sha":"e453578e7e312f8c808e9b28da96b76292665898","priority":0},{"path":".github/SECURITY.md","size":8254,"blob_sha":"f821c0895d51e4d05ae6a724a7855229c7a8ccb3","priority":1},{"path":"airflow-core/docs/privacy_notice.rst","size":987,"blob_sha":"5534330491f2e8f75b2f8e0fa474b26af0592558","priority":1},{"path":"airflow-core/docs/security/releasing_security_patches.rst","size":2987,"blob_sha":"07fee71ae70f17c379ff50cdfcf0473c01fe8ab7","priority":1},{"path":"airflow-core/docs/security/security_model.rst","size":58803,"blob_sha":"b5139d2a4c66c3c5db8386551d147b35cdf9f763","priority":1},{"path":"airflow-ctl/docs/security.rst","size":2268,"blob_sha":"fb08f4f68b3e9f79db01006e4df8f70197cd40c0","priority":1},{"path":"chart/templates/api-server/api-server-networkpolicy.yaml","size":1965,"blob_sha":"a95b3465ab6a70d580ad7a4b7807f0410f4d8893","priority":1},{"path":"chart/templates/flower/flower-networkpolicy.yaml","size":1998,"blob_sha":"531bff464a4d4efa57400d451bd99bbf1d81ef4c","priority":1},{"path":"chart/templates/otel-collector/otel-collector-networkpolicy.yaml","size":2096,"blob_sha":"f58cb77fdec3a9125261d7517696207d80a949e3","priority":1},{"path":"chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml","size":2789,"blob_sha":"f1f83b93d4ec8941da11f8a39a1a4acc68fe755b","priority":1},{"path":"chart/templates/rbac/security-context-constraint-rolebinding.yaml","size":4395,"blob_sha":"5b6a9d4ecd07eae95f00a4bb41023324bf599bef","priority":1},{"path":"chart/templates/redis/redis-networkpolicy.yaml","size":2073,"blob_sha":"88c7c2d59a8bda788420090fc1d18f391d59add2","priority":1},{"path":"chart/templates/scheduler/scheduler-networkpolicy.yaml","size":1881,"blob_sha":"c45fce635676d2542b02d1c6590d0add133a6a47","priority":1},{"path":"chart/templates/statsd/statsd-networkpolicy.yaml","size":1950,"blob_sha":"9d4ccde72db7faf6d61b618624991dc11debb5af","priority":1},{"path":"chart/templates/triggerer/triggerer-networkpolicy.yaml","size":1817,"blob_sha":"ea3cda5b45c33178721a1bd708b5e88aa300c5c2","priority":1},{"path":"chart/templates/workers/worker-networkpolicy.yaml","size":2532,"blob_sha":"a3ff99272f3dcce54a6d7faea13ed027ab41e37a","priority":1},{"path":"devel-common/src/sphinx_exts/includes/security.rst","size":2257,"blob_sha":"ee5a4768bd3ab5d694c2adf3cff6a63313a02f29","priority":1},{"path":"providers/airbyte/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/akeyless/docs/security.rst","size":885,"blob_sha":"7901e7efb290aaa82909f757805073a459be1cc1","priority":1},{"path":"providers/alibaba/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/amazon/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/apache/beam/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/cassandra/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/drill/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/druid/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/flink/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/hdfs/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/hive/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/iceberg/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/impala/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/kafka/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/kylin/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/livy/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/pig/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/pinot/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/spark/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apache/tinkerpop/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/apprise/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/arangodb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/asana/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/atlassian/jira/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/celery/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/clickhousedb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/cloudant/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/cncf/kubernetes/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/cohere/docs/security.rst","size":887,"blob_sha":"05a96c9782be48fb6027d726d6ef070f509ae7bf","priority":1},{"path":"providers/common/ai/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/common/compat/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/common/io/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/common/messaging/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/common/sql/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/databricks/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/datadog/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/dbt/cloud/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/dingding/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/discord/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/docker/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/edge3/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/elasticsearch/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/exasol/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/fab/docs/auth-manager/security.rst","size":3449,"blob_sha":"378bea59d466defbc88b43117b3afc08b3d0389a","priority":1},{"path":"providers/fab/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/facebook/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/ftp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/git/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/github/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/google/docs/deprecation-policy.rst","size":3062,"blob_sha":"e6a00e9f535d4304051fae6565c94396f19af7d7","priority":1},{"path":"providers/google/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/grpc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/hashicorp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/http/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/ibm/mq/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/imap/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/influxdb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/informatica/docs/security.rst","size":887,"blob_sha":"05a96c9782be48fb6027d726d6ef070f509ae7bf","priority":1},{"path":"providers/jdbc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/jenkins/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/keycloak/docs/security.rst","size":1119,"blob_sha":"2aea19bc44c72938b0773064d0fde68b73345873","priority":1},{"path":"providers/microsoft/azure/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/microsoft/mssql/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/microsoft/psrp/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/microsoft/winrm/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1},{"path":"providers/mongo/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/mysql/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/neo4j/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/odbc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/openai/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1},{"path":"providers/openfaas/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/openlineage/docs/emission_policy.rst","size":18708,"blob_sha":"726f91cfe2a4949ebe25d87de5989caac936e117","priority":1},{"path":"providers/openlineage/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/opensearch/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/opsgenie/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/oracle/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/pagerduty/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/papermill/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/pgvector/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/pinecone/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1},{"path":"providers/postgres/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/presto/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/qdrant/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/redis/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/salesforce/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/samba/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/segment/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/sendgrid/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/sftp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/singularity/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/slack/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/smtp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/snowflake/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/sqlite/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/ssh/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/standard/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/tableau/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/telegram/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/teradata/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1},{"path":"providers/trino/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/vertica/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/vespa/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/weaviate/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/yandex/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/ydb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"providers/zendesk/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1},{"path":"airflow-core/docs/security/api.rst","size":4265,"blob_sha":"b45616ece8925a46173d294c01a84a2739880f04","priority":2},{"path":"airflow-core/docs/security/audit_logs.rst","size":22970,"blob_sha":"3c7df803cb0f56e424b42e72218baf94f00c1fef","priority":2},{"path":"airflow-core/docs/security/deprecated_permissions.rst","size":4214,"blob_sha":"35334c9c4306af58934b7e5f019a7d0efc54ce90","priority":2},{"path":"airflow-core/docs/security/flower.rst","size":1982,"blob_sha":"e7b58553254329e492ec73147100730f7018f01c","priority":2},{"path":"airflow-core/docs/security/index.rst","size":1944,"blob_sha":"28c72974251553bfe8631426a83ffd383c16da99","priority":2},{"path":"airflow-core/docs/security/jwt_token_authentication.rst","size":24153,"blob_sha":"2ece1e051687eb866ba013328e8bcf5c0a7f1817","priority":2},{"path":"airflow-core/docs/security/kerberos.rst","size":6664,"blob_sha":"6de9b65e161ff897efb86b7df868767ce1912d99","priority":2},{"path":"airflow-core/docs/security/sbom.rst","size":1651,"blob_sha":"0f1d699368499702caa78af217d7a3d79c7241ad","priority":2},{"path":"airflow-core/docs/security/secrets/fernet.rst","size":2567,"blob_sha":"341e2186bd377f08b4f0ecaeec0651cb6cc81110","priority":2},{"path":"airflow-core/docs/security/secrets/index.rst","size":1460,"blob_sha":"0db0e7a6ff621a9f3bacfc9a4e5b8fb23380c789","priority":2},{"path":"airflow-core/docs/security/secrets/mask-sensitive-values.rst","size":4568,"blob_sha":"780aceb70fbc634422fe551289572c6fe062eaee","priority":2},{"path":"airflow-core/docs/security/secrets/secrets-backend/index.rst","size":7894,"blob_sha":"029dadcfb875aafbc15282a2939d85e9d3018357","priority":2},{"path":"airflow-core/docs/security/secrets/secrets-backend/local-filesystem-secrets-backend.rst","size":5658,"blob_sha":"aaa71daf20af660ba502ff0c29def84cd5420cc6","priority":2},{"path":"airflow-core/docs/security/sql.rst","size":1676,"blob_sha":"b6b81d2180c21b3e2e5eae1fb5d64b1e1d983a81","priority":2},{"path":"airflow-core/docs/security/vulnerabilities-in-3rd-party-dependencies.rst","size":11947,"blob_sha":"6247a4032dfc0021e41ab7985ba424d9d29178a1","priority":2},{"path":"airflow-core/docs/security/workload.rst","size":6662,"blob_sha":"8fee15db2bdcbc891143db144ad204e0541f8731","priority":2}],"documents":[{"path":"README.md","size":40600,"blob_sha":"e453578e7e312f8c808e9b28da96b76292665898","priority":0,"status":200,"text":"<!--\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n-->\n\n<!-- START Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n# Apache Airflow\n\n| Category   | Badges                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| License    | [![License](https://img.shields.io/:license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| PyPI       | [![PyPI version](https://badge.fury.io/py/apache-airflow.svg)](https://badge.fury.io/py/apache-airflow) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apache-airflow.svg)](https://pypi.org/project/apache-airflow/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/apache-airflow)](https://pypi.org/project/apache-airflow/)                                                                                                                                                                               |\n| Containers | [![Docker Pulls](https://img.shields.io/docker/pulls/apache/airflow.svg)](https://hub.docker.com/r/apache/airflow) [![Docker Stars](https://img.shields.io/docker/stars/apache/airflow.svg)](https://hub.docker.com/r/apache/airflow) [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/apache-airflow)](https://artifacthub.io/packages/search?repo=apache-airflow)                                                                                                                      |\n| Community  | [![Contributors](https://img.shields.io/github/contributors/apache/airflow)](https://github.com/apache/airflow/graphs/contributors) [![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://s.apache.org/airflow-slack) ![Commit Activity](https://img.shields.io/github/commit-activity/m/apache/airflow) [![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=apache-airflow)](https://insights.linuxfoundation.org/project/apache-airflow)  |\n| Dev tools  | [![prek](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json)](https://github.com/j178/prek)                                                                                                                                                                                                                                                                                                                                                                            |\n\n| Version | Build Status                                                                                                                                                    |\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Main    | [![Tests AMD main](https://github.com/apache/airflow/actions/workflows/ci-amd.yml/badge.svg)](https://github.com/apache/airflow/actions/workflows/ci-amd.yml) [![Tests ARM main](https://github.com/apache/airflow/actions/workflows/ci-arm.yml/badge.svg)](https://github.com/apache/airflow/actions/workflows/ci-arm.yml) |\n| 3.x     | [![Tests AMD 3.2](https://github.com/apache/airflow/actions/workflows/ci-amd.yml/badge.svg?branch=v3-2-test)](https://github.com/apache/airflow/actions/workflows/ci-amd.yml) [![Tests ARM 3.2](https://github.com/apache/airflow/actions/workflows/ci-arm.yml/badge.svg?branch=v3-2-test)](https://github.com/apache/airflow/actions/workflows/ci-arm.yml) |\n\n\n\n<picture width=\"500\">\n  <img\n    src=\"https://github.com/apache/airflow/blob/19ebcac2395ef9a6b6ded3a2faa29dc960c1e635/docs/apache-airflow/img/logos/wordmark_1.png?raw=true\"\n    alt=\"Apache Airflow logo\"\n  />\n<\/picture>\n\n[Apache Airflow](https://airflow.apache.org/docs/apache-airflow/stable/) (or simply Airflow) is a platform to programmatically author, schedule, and monitor workflows.\n\nWhen workflows are defined as code, they become more maintainable, versionable, testable, and collaborative.\n\nUse Airflow to author workflows (Dags) that orchestrate tasks. The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command line utilities make performing complex surgeries on Dags a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress, and troubleshoot issues when needed.\n\n<!-- END Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of contents**\n\n- [Project Focus](#project-focus)\n- [Principles](#principles)\n- [Requirements](#requirements)\n- [Getting started](#getting-started)\n- [Installing from PyPI](#installing-from-pypi)\n- [Installation](#installation)\n- [Official source code](#official-source-code)\n- [Convenience packages](#convenience-packages)\n- [User Interface](#user-interface)\n- [Semantic versioning](#semantic-versioning)\n- [Version Life Cycle](#version-life-cycle)\n- [Support for Python and Kubernetes versions](#support-for-python-and-kubernetes-versions)\n- [Base OS support for reference Airflow images](#base-os-support-for-reference-airflow-images)\n- [Approach to dependencies of Airflow](#approach-to-dependencies-of-airflow)\n- [Contributing](#contributing)\n- [Community standards](#community-standards)\n- [Agent-assisted contribution (apache-steward)](#agent-assisted-contribution-apache-steward)\n- [Voting Policy](#voting-policy)\n- [Who uses Apache Airflow?](#who-uses-apache-airflow)\n- [Who maintains Apache Airflow?](#who-maintains-apache-airflow)\n- [What goes into the next release?](#what-goes-into-the-next-release)\n- [Can I use the Apache Airflow logo in my presentation?](#can-i-use-the-apache-airflow-logo-in-my-presentation)\n- [Links](#links)\n- [Sponsors](#sponsors)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Project Focus\n\nAirflow works best with workflows that are mostly static and slowly changing. When the Dag structure is similar from one run to the next, it clarifies the unit of work and continuity. Other similar projects include [Luigi](https://github.com/spotify/luigi), [Oozie](https://oozie.apache.org/) and [Azkaban](https://azkaban.github.io/).\n\nAirflow is commonly used to process data, but has the opinion that tasks should ideally be idempotent (i.e., results of the task will be the same, and will not create duplicated data in a destination system), and should not pass large quantities of data from one task to the next (though tasks can pass metadata using Airflow's [XCom feature](https://airflow.apache.org/docs/apache-airflow/stable/concepts/xcoms.html)). For high-volume, data-intensive tasks, a best practice is to delegate to external services specializing in that type of work.\n\nAirflow is not a streaming solution, but it is often used to process real-time data, pulling data off streams in batches.\n\n## Principles\n\n- **Dynamic**: Pipelines are defined in code, enabling dynamic dag generation and parameterization.\n- **Extensible**: The Airflow framework includes a wide range of built-in operators and can be extended to fit your needs.\n- **Flexible**: Airflow leverages the [**Jinja**](https://jinja.palletsprojects.com) templating engine, allowing rich customizations.\n\n<!-- START Requirements, please keep comment here to allow auto update of PyPI readme.md -->\n## Requirements\n\nApache Airflow is tested with:\n\n|            | Main version (dev)                 | Stable version (3.2.0)              | Deprecate version (2.11.2)   |\n|------------|------------------------------------|-------------------------------------|------------------------------|\n| Python     | 3.10, 3.11, 3.12, 3.13, 3.14       | 3.10, 3.11, 3.12, 3.13, 3.14        | 3.10, 3.11, 3.12             |\n| Platform   | AMD64/ARM64                        | AMD64/ARM64                         | AMD64/ARM64(\\*)              |\n| Kubernetes | 1.30, 1.31, 1.32, 1.33, 1.34, 1.35 | 1.30, 1.31, 1.32, 1.33, 1.34, 1.35  | 1.26, 1.27, 1.28, 1.29, 1.30 |\n| PostgreSQL | 14, 15, 16, 17, 18                 | 14, 15, 16, 17, 18                  | 12, 13, 14, 15, 16           |\n| MySQL      | 8.0, 8.4, Innovation               | 8.0, 8.4, Innovation                | 8.0, Innovation              |\n| SQLite     | 3.15.0+                            | 3.15.0+                             | 3.15.0+                      |\n\n\\* Experimental\n\n**Note**: MariaDB is not tested/recommended.\n\n**Note**: SQLite is used in Airflow tests. Do not use it in production. We recommend\nusing the latest stable version of SQLite for local development.\n\n**Note**: Airflow currently can be run on POSIX-compliant Operating Systems. For development, it is regularly\ntested on fairly modern Linux Distros and recent versions of macOS.\nOn Windows you can run it via WSL2 (Windows Subsystem for Linux 2) or via Linux Containers.\nThe work to add Windows support is tracked via [#10388](https://github.com/apache/airflow/issues/10388), but\nit is not a high priority. You should only use Linux-based distros as \"Production\" execution environment\nas this is the only environment that is supported. The only distro that is used in our CI tests and that\nis used in the [Community managed DockerHub image](https://hub.docker.com/p/apache/airflow) is\n`Debian Bookworm`.\n\n<!-- END Requirements, please keep comment here to allow auto update of PyPI readme.md -->\n<!-- START Getting started, please keep comment here to allow auto update of PyPI readme.md -->\n## Getting started\n\nVisit the official Airflow website documentation (latest **stable** release) for help with\n[installing Airflow](https://airflow.apache.org/docs/apache-airflow/stable/installation/),\n[getting started](https://airflow.apache.org/docs/apache-airflow/stable/start.html), or walking\nthrough a more complete [tutorial](https://airflow.apache.org/docs/apache-airflow/stable/tutorial/).\n\n> Note: If you're looking for documentation for the main branch (latest development branch): you can find it on [s.apache.org/airflow-docs](https://s.apache.org/airflow-docs/).\n\nFor more information on Airflow Improvement Proposals (AIPs), visit\nthe [Airflow Wiki](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals).\n\nDocumentation for dependent projects like provider distributions, Docker image, Helm Chart, you'll find it in [the documentation index](https://airflow.apache.org/docs/).\n\n<!-- END Getting started, please keep comment here to allow auto update of PyPI readme.md -->\n<!-- START Installing from PyPI, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Installing from PyPI\n\nWe publish Apache Airflow as `apache-airflow` package in PyPI. Installing it however might be sometimes tricky\nbecause Airflow is a bit of both a library and application. Libraries usually keep their dependencies open, and\napplications usually pin them, but we should do neither and both simultaneously. We decided to keep\nour dependencies as open as possible (in `pyproject.toml`) so users can install different versions of libraries\nif needed. This means that `pip install apache-airflow` will not work from time to time or will\nproduce unusable Airflow installation.\n\nTo have repeatable installation, however, we keep a set of \"known-to-be-working\" constraint\nfiles in the orphan `constraints-main` and `constraints-2-0` branches. We keep those \"known-to-be-working\"\nconstraints files separately per major/minor Python version.\nYou can use them as constraint files when installing Airflow from PyPI. Note that you have to specify\ncorrect Airflow tag/version/branch and Python versions in the URL.\n\n1. Installing just Airflow:\n\n> Note: Only `pip` installation is currently officially supported.\n\nWhile it is possible to install Airflow with tools like [Poetry](https://python-poetry.org) or\n[pip-tools](https://pypi.org/project/pip-tools), they do not share the same workflow as\n`pip` - especially when it comes to constraint vs. requirements management.\nInstalling via `Poetry` or `pip-tools` is not currently supported.\n\nIf you wish to install Airflow using those tools, you should use the constraint files and convert\nthem to the appropriate format and workflow that your tool requires.\n\n\n```bash\npip install 'apache-airflow==3.2.0' \\\n --constraint \"https://raw.githubusercontent.com/apache/airflow/constraints-3.2.0/constraints-3.10.txt\"\n```\n\n2. Installing with extras (i.e., postgres, google)\n\n```bash\npip install 'apache-airflow[postgres,google]==3.2.0' \\\n --constraint \"https://raw.githubusercontent.com/apache/airflow/constraints-3.2.0/constraints-3.10.txt\"\n```\n\nFor information on installing provider distributions, check\n[providers](http://airflow.apache.org/docs/apache-airflow-providers/index.html).\n\n<!-- END Installing from PyPI, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Installation\n\nFor comprehensive instructions on setting up your local development environment and installing Apache Airflow, please refer to the [INSTALLING.md](INSTALLING.md) file.\n\n<!-- START Official source code, please keep comment here to allow auto update of PyPI readme.md -->\n## Official source code\n\nApache Airflow is an [Apache Software Foundation](https://www.apache.org) (ASF) project,\nand our official source code releases:\n\n- Follow the [ASF Release Policy](https://www.apache.org/legal/release-policy.html)\n- Can be downloaded from [the ASF Distribution Directory](https://downloads.apache.org/airflow)\n- Are cryptographically signed by the release manager\n- Are officially voted on by the PMC members during the\n  [Release Approval Process](https://www.apache.org/legal/release-policy.html#release-approval)\n\nFollowing the ASF rules, the source packages released must be sufficient for a user to build and test the\nrelease provided they have access to the appropriate platform and tools.\n\n<!-- END Official source code, please keep comment here to allow auto update of PyPI readme.md -->\n## Convenience packages\n\nThere are other ways of installing and using Airflow. Those are \"convenience\" methods - they are\nnot \"official releases\" as stated by the `ASF Release Policy`, but they can be used by the users\nwho do not want to build the software themselves.\n\nThose are - in the order of most common ways people install Airflow:\n\n- [PyPI releases](https://pypi.org/project/apache-airflow/) to install Airflow using standard `pip` tool\n- [Docker Images](https://hub.docker.com/r/apache/airflow) to install airflow via\n  `docker` tool, use them in Kubernetes, Helm Charts, `docker-compose`, `docker swarm`, etc. You can\n  read more about using, customizing, and extending the images in the\n  [Latest docs](https://airflow.apache.org/docs/docker-stack/index.html), and\n  learn details on the internals in the [images](https://airflow.apache.org/docs/docker-stack/index.html) document.\n- [Tags in GitHub](https://github.com/apache/airflow/tags) to retrieve the git project sources that\n  were used to generate official source packages via git\n\nAll those artifacts are not official releases, but they are prepared using officially released sources.\nSome of those artifacts are \"development\" or \"pre-release\" ones, and they are clearly marked as such\nfollowing the ASF Policy.\n\n## User Interface\n\n- **Dags**: Overview of all Dags in your environment.\n\n  ![Dags](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/dags.png)\n\n- **Assets**: Overview of Assets with dependencies.\n\n  ![Asset Dependencies](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/assets_graph.png)\n\n- **Grid**: Grid representation of a Dag that spans across time.\n\n  ![Grid](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/grid.png)\n\n- **Graph**: Visualization of a Dag's dependencies and their current status for a specific run.\n\n  ![Graph](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/graph.png)\n\n- **Home**: Summary statistics of your Airflow environment.\n\n  ![Home](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/home.png)\n\n- **Backfill**: Backfilling a Dag for a specific date range.\n\n  ![Backfill](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/backfill.png)\n\n- **Code**: Quick way to view source code of a Dag.\n\n  ![Code](https://raw.githubusercontent.com/apache/airflow/main/airflow-core/docs/img/ui-dark/code.png)\n\n## Semantic versioning\n\nAs of Airflow 2.0.0, we support a strict [SemVer](https://semver.org/) approach for all packages released.\n\nThere are few specific rules that we agreed to that define details of versioning of the different\npackages:\n\n* **Airflow**: SemVer rules apply to core airflow only (excludes any changes to providers).\n  Changing limits for versions of Airflow dependencies is not a breaking change on its own.\n* **Airflow Providers**: SemVer rules apply to changes in the particular provider's code only.\n  SemVer MAJOR and MINOR versions for the packages are independent of the Airflow version.\n  For example, `google 4.1.0` and `amazon 3.1.1` providers can happily be installed\n  with `Airflow 2.1.2`. If there are limits of cross-dependencies between providers and Airflow packages,\n  they are present in providers as `install_requires` limitations. We aim to keep backwards\n  compatibility of providers with all previously released Airflow 2 versions but\n  there will sometimes be breaking changes that might make some, or all\n  providers, have minimum Airflow version specified.\n* **Airflow Helm Chart**: SemVer rules apply to changes in the chart only. SemVer MAJOR and MINOR\n  versions for the chart are independent of the Airflow version. We aim to keep backwards\n  compatibility of the Helm Chart with all released Airflow 2 versions, but some new features might\n  only work starting from specific Airflow releases. We might however limit the Helm\n  Chart to depend on minimal Airflow version.\n* **Airflow API clients**: Their versioning is independent from Airflow versions. They follow their own\n  SemVer rules for breaking changes and new features - which for example allows to change the way we generate\n  the clients.\n\n## Version Life Cycle\n\nApache Airflow version life cycle:\n\n<!-- This table is automatically updated by prek scripts/ci/prek/supported_versions.py -->\n<!-- Beginning of auto-generated table -->\n\n| Version   | Current Patch/Minor   | State       | First Release   | Limited Maintenance   | EOL/Terminated   |\n|-----------|-----------------------|-------------|-----------------|-----------------------|------------------|\n| 3         | 3.2.2                 | Maintenance | Apr 22, 2025    | TBD                   | TBD              |\n| 2         | 2.11.2                | EOL         | Dec 17, 2020    | Oct 22, 2025          | Apr 22, 2026     |\n| 1.10      | 1.10.15               | EOL         | Aug 27, 2018    | Dec 17, 2020          | June 17, 2021    |\n| 1.9       | 1.9.0                 | EOL         | Jan 03, 2018    | Aug 27, 2018          | Aug 27, 2018     |\n| 1.8       | 1.8.2                 | EOL         | Mar 19, 2017    | Jan 03, 2018          | Jan 03, 2018     |\n| 1.7       | 1.7.1.2               | EOL         | Mar 28, 2016    | Mar 19, 2017          | Mar 19, 2017     |\n\n<!-- End of auto-generated table -->\n\nLimited support versions will be supported with security and critical bug fix only.\nEOL versions will not get any fixes nor support.\nWe always recommend that all users run the latest available minor release for whatever major version is in use.\nWe **highly** recommend upgrading to the latest Airflow major release at the earliest convenient time and before the EOL date.\n\n## Support for Python and Kubernetes versions\n\nAs of Airflow 2.0, we agreed to certain rules we follow for Python and Kubernetes support.\nThey are based on the official release schedule of Python and Kubernetes, nicely summarized in the\n[Python Developer's Guide](https://devguide.python.org/#status-of-python-branches) and\n[Kubernetes version skew policy](https://kubernetes.io/docs/setup/release/version-skew-policy/).\n\n1. We drop support for Python and Kubernetes versions when they reach EOL. Except for Kubernetes, a\n   version stays supported by Airflow if two major cloud providers still provide support for it. We drop\n   support for those EOL versions in main right after EOL date, and it is effectively removed when we release\n   the first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow. For example, for Python 3.10 it\n   means that we will drop support in main right after 27.06.2023, and the first MAJOR or MINOR version of\n   Airflow released after will not have it.\n\n2. We support a new version of Python/Kubernetes in main after they are officially released, as soon as we\n   make them work in our CI pipeline (which might not be immediate due to dependencies catching up with\n   new versions of Python mostly) we release new images/support in Airflow based on the working CI setup.\n\n3. This policy is best-effort which means there may be situations where we might terminate support earlier\n   if circumstances require it.\n\n## Base OS support for reference Airflow images\n\nThe Airflow Community provides conveniently packaged container images that are published whenever\nwe publish an Apache Airflow release. Those images contain:\n\n* Base OS with necessary packages to install Airflow (stable Debian OS)\n* Base Python installation in versions supported at the time of release for the MINOR version of\n  Airflow released (so there could be different versions for 2.3 and 2.2 line for example)\n* Libraries required to connect to supported Databases (again the set of databases supported depends\n  on the MINOR version of Airflow)\n* Predefined set of popular providers (for details see the [Dockerfile](https://raw.githubusercontent.com/apache/airflow/main/Dockerfile)).\n* Possibility of building your own, custom image where the user can choose their own set of providers\n  and libraries (see [Building the image](https://airflow.apache.org/docs/docker-stack/build.html))\n* In the future Airflow might also support a \"slim\" version without providers nor database clients installed\n\nThe version of the base OS image is the stable version of Debian. Airflow supports using all currently active\nstable versions - as soon as all Airflow dependencies support building, and we set up the CI pipeline for\nbuilding and testing the OS version. Approximately 6 months before the end-of-regular support of a\nprevious stable version of the OS, Airflow switches the images released to use the latest supported\nversion of the OS.\n\nFor example switch from ``Debian Bullseye`` to ``Debian Bookworm`` has been implemented\nbefore 2.8.0 release in October 2023 and ``Debian Bookworm`` will be the only option supported as of\nAirflow 2.10.0.\n\nUsers will continue to be able to build their images using stable Debian releases until the end of regular\nsupport and building and verifying of the images happens in our CI but no unit tests were executed using\nthis image in the `main` branch.\n\n## Approach to dependencies of Airflow\n\nAirflow has a lot of dependencies - direct and transitive, also Airflow is both - library and application,\ntherefore our policies to dependencies has to include both - stability of installation of application,\nbut also ability to install newer version of dependencies for those users who develop Dags. We developed\nthe approach where `constraints` are used to make sure airflow can be installed in a repeatable way, while\nwe do not limit our users to upgrade most of the dependencies. As a result we decided not to upper-bound\nversion of Airflow dependencies by default, unless we have good reasons to believe upper-bounding them is\nneeded because of importance of the dependency as well as risk it involves to upgrade specific dependency.\nWe also upper-bound the dependencies that we know cause problems.\n\nThe constraint mechanism of ours takes care about finding and upgrading all the non-upper bound dependencies\nautomatically (providing that all the tests pass). Our `main` build failures will indicate in case there\nare versions of dependencies that break our tests - indicating that we should either upper-bind them or\nthat we should fix our code/tests to account for the upstream changes from those dependencies.\n\nWhenever we upper-bound such a dependency, we should always comment why we are doing it - i.e. we should have\na good reason why dependency is upper-bound. And we should also mention what is the condition to remove the\nbinding.\n\n### Approach for dependencies for Airflow Core\n\nThose dependencies are maintained in ``pyproject.toml``.\n\nThere are few dependencies that we decided are important enough to upper-bound them by default, as they are\nknown to follow predictable versioning scheme, and we know that new versions of those are very likely to\nbring breaking changes. We commit to regularly review and attempt to upgrade to the newer versions of\nthe dependencies as they are released, but this is manual process.\n\nThe important dependencies are:\n\n* `SQLAlchemy`: upper-bound to specific MINOR version (SQLAlchemy is known to remove deprecations and\n   introduce breaking changes especially that support for different Databases varies and changes at\n   various speed)\n* `Alembic`: it is important to handle our migrations in predictable and performant way. It is developed\n   together with SQLAlchemy. Our experience with Alembic is that it very stable in MINOR version\n* `Flask`: We are using Flask as the back-bone of our web UI and API. We know major version of Flask\n   are very likely to introduce breaking changes across those so limiting it to MAJOR version makes sense\n* `werkzeug`: the library is known to cause problems in new versions. It is tightly coupled with Flask\n   libraries, and we should update them together\n* `celery`: Celery is a crucial component of Airflow as it used for CeleryExecutor (and similar). Celery\n   [follows SemVer](https://docs.celeryq.dev/en/stable/contributing.html?highlight=semver#versions), so\n   we should upper-bound it to the next MAJOR version. Also, when we bump the upper version of the library,\n   we should make sure Celery Provider minimum Airflow version is updated.\n* `kubernetes`: Kubernetes is a crucial component of Airflow as it is used for the KubernetesExecutor\n   (and similar). Kubernetes Python library [follows SemVer](https://github.com/kubernetes-client/python#compatibility),\n   so we should upper-bound it to the next MAJOR version. Also, when we bump the upper version of the library,\n   we should make sure Kubernetes Provider minimum Airflow version is updated.\n\n### Approach for dependencies in Airflow Providers and extras\n\nThe main part of the Airflow is the Airflow Core, but the power of Airflow also comes from a number of\nproviders that extend the core functionality and are released separately, even if we keep them (for now)\nin the same monorepo for convenience. You can read more about the providers in the\n[Providers documentation](https://airflow.apache.org/docs/apache-airflow-providers/index.html). We also\nhave set of policies implemented for maintaining and releasing community-managed providers as well\nas the approach for community vs. 3rd party providers in the [providers](https://github.com/apache/airflow/blob/main/PROVIDERS.rst) document.\n\nThose `extras` and `providers` dependencies are maintained in `provider.yaml` of each provider.\n\nBy default, we should not upper-bound dependencies for providers, however each provider's maintainer\nmight decide to add additional limits (and justify them with comment).\n\n<!-- START Contributing, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Contributing\n\nWant to help build Apache Airflow? Check out our [contributors' guide](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) for a comprehensive overview of how to contribute, including setup instructions, coding standards, and pull request guidelines.\n\nIf you can't wait to contribute, and want to get started asap, check out the [contribution quickstart](https://github.com/apache/airflow/blob/main/contributing-docs/03a_contributors_quick_start_beginners.rst) here!\n\nOfficial Docker (container) images for Apache Airflow are described in [images](https://github.com/apache/airflow/blob/main/dev/breeze/doc/ci/02_images.md).\n\n<!-- END Contributing, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Community standards\n\nEveryone interacting with the Apache Airflow project — on GitHub, the\nmailing lists, Slack, the CWiki, or anywhere else — is expected to\nfollow the [Code of Conduct](CODE_OF_CONDUCT.md).\n\nWhen repeated Code of Conduct breaches, spamming, abuse of project\nresources, or other sustained disruptive behaviour cannot be resolved\nthrough normal review and mentoring, the project applies the\n[Community escalation process](COMMUNITY_ESCALATION.md). It describes\nthe steps maintainers and the PMC may take — from direct feedback,\nthrough closing PRs, up to PMC-level or ASF-Infrastructure-level\nblocks and reporting accounts to GitHub — and how affected\ncontributors can appeal a decision by emailing the PMC at\n`private@airflow.apache.org`.\n\n## Agent-assisted contribution (apache-steward)\n\nThis repo adopts the [`apache/airflow-steward`](https://github.com/apache/airflow-steward)\nframework via a snapshot mechanism. The framework provides\nmaintainer-facing PR-management skills (`pr-management-triage`,\n`pr-management-code-review`, `pr-management-stats`, `pr-management-mentor`)\nthat are exposed as agent skills in agent harnesses such as Claude Code.\n\nThe framework is **not** vendored — it lives as a gitignored snapshot\nunder `.apache-magpie/`, fetched on demand from the version pinned in\nthe committed [`.apache-magpie.lock`](.apache-magpie.lock). The only\nframework artefact committed to this repo is the `magpie-setup` skill\nat [`.github/skills/magpie-setup/`](.github/skills/magpie-setup/);\neverything else is a gitignored symlink the setup skill wires up.\n\nA fresh clone needs the snapshot populated before any framework skill\nis invocable. In your agent harness, run:\n\n```text\n/magpie-setup\n```\n\n(or follow [`.claude/skills/magpie-setup/`](.claude/skills/magpie-setup/))\nto fetch the snapshot per the committed lock, scaffold the gitignored\nsymlinks, and install the post-checkout hook that re-creates them on\neach worktree checkout.\n\nAdopter-specific modifications to framework workflows live in\n[`.apache-magpie-overrides/`](.apache-magpie-overrides/) (committed) —\nnever edit the snapshot directly. Framework changes go via PR to\n[`apache/airflow-steward`](https://github.com/apache/airflow-steward).\n\n<!-- START Who uses Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Voting Policy\n\n* Commits need a +1 vote from a committer who is not the author\n* When we do AIP voting, both PMC member's and committer's `+1s` are considered a binding vote.\n\n## Who uses Apache Airflow?\n\nWe know about around 500 organizations that are using Apache Airflow (but there are likely many more)\n[in the wild](https://github.com/apache/airflow/blob/main/INTHEWILD.md).\n\nIf you use Airflow - feel free to make a PR to add your organisation to the list.\n\n<!-- END Who uses Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n<!-- START Who maintains Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n\n## Who maintains Apache Airflow?\n\nAirflow is the work of the [community](https://github.com/apache/airflow/graphs/contributors),\nbut the [core committers/maintainers](https://people.apache.org/committers-by-project.html#airflow)\nare responsible for reviewing and merging PRs as well as steering conversations around new feature requests.\nIf you would like to become a maintainer, please review the Apache Airflow\n[committer requirements](https://github.com/apache/airflow/blob/main/COMMITTERS.rst#guidelines-to-become-an-airflow-committer).\n\n<!-- END Who maintains Apache Airflow, please keep comment here to allow auto update of PyPI readme.md -->\n\n## What goes into the next release?\n\nOften you will see an issue that is assigned to specific milestone with Airflow version, or a PR that gets merged\nto the main branch and you might wonder which release the merged PR(s) will be released in or which release the fixed\nissues will be in. The answer to this is as usual - it depends on various scenarios. The answer is different for PRs and Issues.\n\nTo add a bit of context, we are following the [Semver](https://semver.org/) versioning scheme as described in\n[Airflow release process](https://airflow.apache.org/docs/apache-airflow/stable/release-process.html). More\ndetails are explained in detail in this README under the [Semantic versioning](#semantic-versioning) chapter, but\nin short, we have `MAJOR.MINOR.PATCH` versions of Airflow.\n\n* `MAJOR` version is incremented in case of breaking changes\n* `MINOR` version is incremented when there are new features added\n* `PATCH` version is incremented when there are only bug-fixes and doc-only changes\n\nGenerally we release `MINOR` versions of Airflow from a branch that is named after the MINOR version. For example\n`2.7.*` releases are released from `v2-7-stable` branch, `2.8.*` releases are released from `v2-8-stable`\nbranch, etc.\n\n1. Most of the time in our release cycle, when the branch for next `MINOR` branch is not yet created, all\nPRs merged to `main` (unless they get reverted), will find their way to the next `MINOR` release. For example\nif the last release is `2.7.3` and `v2-8-stable` branch is not created yet, the next `MINOR` release\nis `2.8.0` and all PRs merged to main will be released in `2.8.0`. However, some PRs (bug-fixes and\ndoc-only changes) when merged, can be cherry-picked to current `MINOR` branch and released in the\nnext `PATCHLEVEL` release. For example, if `2.8.1` is already released and we are working on `2.9.0dev`,  then\nmarking a PR with `2.8.2` milestone means that it will be cherry-picked to `v2-8-test` branch and\nreleased in `2.8.2rc1`, and eventually in `2.8.2`.\n\n2. When we prepare for the next `MINOR` release, we cut new `v2-*-test` and `v2-*-stable` branch\nand prepare `alpha`, `beta` releases for the next `MINOR` version, the PRs merged to main will still be\nreleased in the next `MINOR` release until `rc` version is cut. This is happening because the `v2-*-test`\nand `v2-*-stable` branches are rebased on top of main when next `beta` and `rc` releases are prepared.\nFor example, when we cut `2.10.0beta1` version, anything merged to main before `2.10.0rc1` is released,\nwill find its way to 2.10.0rc1.\n\n3. Then, once we prepare the first RC candidate for the MINOR release, we stop moving the `v2-*-test` and\n`v2-*-stable` branches and the PRs merged to main will be released in the next `MINOR` release.\nHowever, some PRs (bug-fixes and doc-only changes) when merged, can be cherry-picked to current `MINOR`\nbranch and released in the next `PATCHLEVEL` release - for example when the last released version from `v2-10-stable`\nbranch is `2.10.0rc1`, some of the PRs from main can be marked as `2.10.0` milestone by committers,\nthe release manager will try to cherry-pick them into the release branch.\nIf successful, they will be released in `2.10.0rc2` and subsequently in `2.10.0`. This also applies to\nsubsequent `PATCHLEVEL` versions. When for example `2.10.1` is already released, marking a PR with\n`2.10.2` milestone will mean that it will be cherry-picked to `v2-10-stable` branch and released in `2.10.2rc1`\nand eventually in `2.10.2`.\n\nThe final decision about cherry-picking is made by the release manager.\n\nMarking issues with a milestone is a bit different. Maintainers do not mark issues with a milestone usually,\nnormally they are only marked in PRs. If PR linked to the issue (and \"fixing it\") gets merged and released\nin a specific version following the process described above, the issue will be automatically closed, no\nmilestone will be set for the issue, you need to check the PR that fixed the issue to see which version\nit was released in.\n\nHowever, sometimes maintainers mark issues with specific milestone, which means that the\nissue is important to become a candidate to take a look when the release is being prepared. Since this is an\nOpen-Source project, where basically all contributors volunteer their time, there is no guarantee that specific\nissue will be fixed in specific version. We do not want to hold the release because some issue is not fixed,\nso in such case release manager will reassign such unfixed issues to the next milestone in case they are not\nfixed in time for the current release. Therefore, the milestone for issue is more of an intent that it should be\nlooked at, than promise it will be fixed in the version.\n\nMore context and **FAQ** about the patchlevel release can be found in the\n[What goes into the next release](dev/WHAT_GOES_INTO_THE_NEXT_RELEASE.md) document in the `dev` folder of the\nrepository.\n\n## Can I use the Apache Airflow logo in my presentation?\n\nYes! Be sure to abide by the Apache Foundation [trademark policies](https://www.apache.org/foundation/marks/#books) and the Apache Airflow [Brandbook](https://cwiki.apache.org/confluence/display/AIRFLOW/Brandbook). The most up-to-date logos are found in [this repo](https://github.com/apache/airflow/tree/main/airflow-core/docs/img/logos/) and on the Apache Software Foundation [website](https://www.apache.org/logos/about.html).\n\n## Links\n\n- [Documentation](https://airflow.apache.org/docs/apache-airflow/stable/)\n- [Chat](https://s.apache.org/airflow-slack)\n- [Community Information](https://airflow.apache.org/community/)\n\n## Sponsors\n\nThe CI infrastructure for Apache Airflow has been sponsored by:\n\n<!-- Ordered by most recently \"funded\" -->\n\n<a href=\"https://astronomer.io\"><img src=\"https://assets2.astronomer.io/logos/logoForLIGHTbackground.png\" alt=\"astronomer.io\" width=\"250px\"><\/a>\n<a href=\"https://aws.amazon.com/opensource/\"><img src=\"https://github.com/apache/airflow/blob/main/providers/amazon/docs/integration-logos/AWS-Cloud-alt_light-bg@4x.png?raw=true\" alt=\"AWS OpenSource\" width=\"130px\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3780:B08CF:1743CA:5D6EE6:6AB92A41"},"text_sha256":"7e4412fae12be63208fa0b79534f5e572d9443062764991874470fcbf89a0182"},{"path":".github/SECURITY.md","size":8254,"blob_sha":"f821c0895d51e4d05ae6a724a7855229c7a8ccb3","priority":1,"status":200,"text":" <!-- SPDX-License-Identifier: Apache-2.0\n      https://www.apache.org/licenses/LICENSE-2.0 -->\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of contents**\n\n- [Apache Airflow Security](#apache-airflow-security)\n  - [What should be and should NOT be reported ?](#what-should-be-and-should-not-be-reported-)\n  - [How to report the issue ?](#how-to-report-the-issue-)\n  - [Is this really a security vulnerability ?](#is-this-really-a-security-vulnerability-)\n  - [How do we assess severity of the issue ?](#how-do-we-assess-severity-of-the-issue-)\n  - [What happens after you report the issue ?](#what-happens-after-you-report-the-issue-)\n  - [Does CVE in Airflow Providers impact Airflow core package ?](#does-cve-in-airflow-providers-impact-airflow-core-package-)\n  - [Where do I find more information about Airflow Security ?](#where-do-i-find-more-information-about-airflow-security-)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Apache Airflow Security\n\nThis document contains information on how to report security vulnerabilities in Apache Airflow and\nhow security issues reported to the Apache Airflow security team are handled. If you would like\nto learn more, head to the\n[Airflow security](https://airflow.apache.org/docs/apache-airflow/stable/security/) documentation.\n\n**⚠️ Please do not file GitHub issues for security vulnerabilities as they are public! ⚠️**\n\nThe Apache Software Foundation takes security issues very seriously. Apache\nAirflow specifically offers security features and is responsive to issues\naround its features. If you have any concern around Airflow Security or believe\nyou have uncovered a vulnerability, we suggest that you get in touch via the\ne-mail address [security@airflow.apache.org](mailto:security@airflow.apache.org).\n\nBefore sending the report, however, please read the following guidelines first. The guidelines should\nanswer the most common questions you might have about reporting vulnerabilities.\n\n## What should be and should NOT be reported ?\n\n**Only** use the security e-mail address to report undisclosed security vulnerabilities in Apache\nAirflow and to manage the process of fixing such vulnerabilities. We do not accept regular\nbug reports or other security-related queries at this address. We will ignore mail\nsent to this address that does not relate to an undisclosed security problem\nin the Apache Airflow project. Please follow regular communication channels described in\nthe [Airflow Community](https://airflow.apache.org/community/index.html) page for inquiries, questions and other discussions related\nto the process or issues.\n\nSpecifically, we will ignore results of security scans that contain a list of dependencies of Airflow\nwith dependencies in Airflow Docker reference image - there is a page that describes how the\n[Airflow reference Image is fixed at release time](https://airflow.apache.org/docs/docker-stack/index.html#fixing-images-at-release-time) and providing helpful instructions explaining\nhow you can build your own image and manage dependencies of Airflow in your own image.\n\n## How to report the issue ?\n\nPlease send one plain-text email for each vulnerability you are reporting including an explanation\nof how it affects Airflow security. We may ask that you resubmit your report if you send it as an image,\nmovie, HTML, or PDF attachment when you could as easily describe it with plain text.\n\n## Is this really a security vulnerability ?\n\nBefore reporting vulnerabilities, please make sure to read and understand the [security model](https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html)\nof Airflow, because some of the potential security vulnerabilities that are valid for projects that are\npublicly accessible from the Internet, are not valid for Airflow.\n\nAirflow is not designed to be used by untrusted users, and some trusted users are trusted enough to do a\nvariety of operations that could be considered as vulnerabilities in other products/circumstances.\n\n\nAgain. Please make sure to read and understand the [security model](https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html)\nof Airflow - this might help to save your time for reporting and our time for assessing the issues when\nthey are clearly expected, according to the Security model. You also avoid disappointment when you spend\na lot of time on preparing the issue report to follow the guidelines above and what you get as a response is\n\"this is not a security issue\" or \"this is invalid security issue\" or \"this is expected behaviour\". You\nsave time for yourself and for the Airflow Security team by reading and understanding the security model\nbefore reporting the issue.\n\n## How do we assess severity of the issue ?\n\nSeverity of the issue is determined based on the criteria described in\nthe [Severity Rating blog post](https://security.apache.org/blog/severityrating/) by the Apache Software Foundation Security team.\n\nDue to reasons explained in the previous chapter, some potential security vulnerabilities\ndo not apply to Airflow, or have a different severity than some generic scoring systems\n(for example `CVSS`) calculation suggests. So we are not using any generic scoring system.\n\n\n## What happens after you report the issue ?\n\nThe Airflow Security Team will get back to you after assessing the report. You will usually get\nconfirmation that the issue is being worked (or that we quickly assessed it as invalid) within several\nbusiness days. Note that this is an Open-Source projects and members of the security team are volunteers,\nso please make sure to be patient. If you do not get a response within a week, please send a kind reminder\nto the security team about a lack of response; however, reminders should only be for the initial response\nand not for updates on the assessment or remediation. We will usually let you know the CVE number that will\nbe assigned to the issue and the severity of the issue as well as release the issue is scheduled to be fixed\nafter we assess the issue (which might take longer or shorter time depending on the issue complexity and\npotential impact, severity, whether we want to address a whole class issues in a single fix and a number\nof other factors). You should subscribe  and monitor the `users@airflow.apache.org` mailing\nlist or `announce@apache.org` to see the announcement of the security issue - including the CVE number\nand the severity of the issue once the issue is fixed and release is public. Note that the\n`announce@apache.org` mailing list is moderated, and it might take a few hours for the announcement to\nappear there, so `users@airflow.apache.org` is the best place to monitor for the announcement.\n\nSecurity issues in Airflow are handled by the Airflow Security Team. Details about the Airflow Security\nTeam and how members of it are chosen can be found in the\n[Contributing documentation](https://github.com/apache/airflow/blob/main/contributing-docs/01_roles_in_airflow_project.rst#security-team).\n\n## Does CVE in Airflow Providers impact Airflow core package ?\n\nAirflow core package is released separately from provider distributions. While Airflow comes with ``constraints``\nwhich describe which version of providers have been tested when the version of Airflow was released, the\nusers of Airflow are advised to install providers independently of Airflow core when they want to apply\nsecurity fixes found and released in providers. Therefore, the issues found and fixed in providers do\nnot apply to the Airflow core package. There are also Airflow providers released by 3rd-parties, but the\nAirflow community is not responsible for releasing and announcing security vulnerabilities in them, this\nis handled entirely by the 3rd-parties that release their own providers.\n\n## Where do I find more information about Airflow Security ?\n\nIf you wish to know more about the ASF security process,\nthe [ASF Security team's page](https://www.apache.org/security/) describes\nhow vulnerability reports are handled in general by all ASF projects, and includes PGP keys if\nyou wish to use them when you report the issues.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6884:3CC8A:17C8CF:5DF3E1:6AB92A47"},"text_sha256":"d6b7f6cbb95a240879fceab1893139a2a516abf50ff9d0603fb5623fbecd191c"},{"path":"airflow-core/docs/privacy_notice.rst","size":987,"blob_sha":"5534330491f2e8f75b2f8e0fa474b26af0592558","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n\n\nPrivacy Notice\n==============\n\nThe website follows the `Privacy Policy of the Apache Software Foundation <https://privacy.apache.org/policies/privacy-policy-public.html>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0FA:3FA0D:17778D:5DA1E8:6AB92A47"},"text_sha256":"d8e1d8462d53923f24b50bba9c01764b62fa2c877660999277d7ac110293eeb3"},{"path":"airflow-core/docs/security/releasing_security_patches.rst","size":2987,"blob_sha":"07fee71ae70f17c379ff50cdfcf0473c01fe8ab7","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nReleasing security patches\n==========================\n\nApache Airflow® uses a consistent and predictable approach for releasing security patches - both for\nthe Apache Airflow package and Apache Airflow providers (security patches in providers are treated\nseparately from security patches in Airflow core package).\n\nReleasing Airflow with security patches\n---------------------------------------\n\nApache Airflow uses a strict `SemVer <https://semver.org>`_ versioning policy, which means that we strive for\nany release of a given ``MAJOR`` Version (version \"2\" currently) to be backwards compatible. When we\nrelease a ``MINOR`` version, the development continues in the ``main`` branch where we prepare the next\n``MINOR`` version, but we release ``PATCHLEVEL`` releases with selected bugfixes (including security\nbugfixes) cherry-picked to the latest released ``MINOR`` line of Apache Airflow. At the moment, when we\nrelease a new ``MINOR`` version, we stop releasing ``PATCHLEVEL`` releases for the previous ``MINOR`` version.\n\nFor example, once we released ``3.1.0`` version on 25 September 2025 and until we do not have ``3.2.0`` release,\nthe security patches will be cherry-picked and released in ``3.1.*`` versions until we release ``3.2.0``\nversion. There will be no ``3.0.*`` versions released after ``3.1.0`` has been released.\n\nThis means that in order to apply security fixes in Apache Airflow, you\nMUST upgrade to the latest released ``MINOR.PATCHLEVEL`` version of Airflow.\n\nReleasing Airflow providers with security patches\n-------------------------------------------------\n\nSimilarly to Airflow, providers use `SemVer <https://semver.org>`_ versioning policy, and the same\npolicies apply for providers as for Airflow itself. This means that you need to upgrade to the latest\n``MINOR.PATCHLEVEL`` version of the provider to get the latest security fixes.\n\nAirflow providers are released independently from Airflow itself and the information about vulnerabilities\nis published separately. You can upgrade providers independently from Airflow itself, following the\ninstructions found in :ref:`installing-from-pypi-managing-providers-separately-from-airflow-core`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2776:3B6DE:17591F:5D8338:6AB92A47"},"text_sha256":"56a239fb4c095aa994bf783eaf296a83375d286dfbc5c42352baa9b2d1705317"},{"path":"airflow-core/docs/security/security_model.rst","size":58803,"blob_sha":"b5139d2a4c66c3c5db8386551d147b35cdf9f763","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nAirflow Security Model\n======================\n\nThis document describes Airflow's security model from the perspective of\nthe Airflow user. It is intended to help users understand the security\nmodel and make informed decisions about how to deploy and manage Airflow.\n\nIf you would like to know how to report security vulnerabilities and how\nsecurity reports are handled by the security team of Airflow, head to\n`Airflow's Security Policy <https://github.com/apache/airflow/security/policy>`_.\n\nAirflow security model - user types\n-----------------------------------\n\nThe Airflow security model involves different types of users with varying access and capabilities:\n\nWhile - in smaller installations - all the actions related to Airflow can be performed by a single user,\nin larger installations it is apparent that there different responsibilities, roles and\ncapabilities that need to be separated.\n\nThis is why Airflow has the following user types:\n\n* Deployment Managers - overall responsible for the Airflow installation, security and configuration\n* Authenticated UI users - users that can access Airflow UI and API and interact with it\n* Dag authors - responsible for creating Dags and submitting them to Airflow\n\nYou can see more on how the user types influence Airflow's architecture in :doc:`/core-concepts/overview`,\nincluding, seeing the diagrams of less and more complex deployments.\n\n\n\n\nDeployment Managers\n...................\n\nThey have the highest level of access and\ncontrol. They install and configure Airflow, and make decisions about\ntechnologies and permissions. They can potentially delete the entire\ninstallation and have access to all credentials. Deployment Managers\ncan also decide to keep audits, backups and copies of information\noutside of Airflow, which are not covered by Airflow's security\nmodel.\n\nDag authors\n...........\n\nThey can create, modify, and delete Dag files. The\ncode in Dag files is executed on workers, in the Dag File Processor,\nand in the Triggerer.\nTherefore, Dag authors can create and change code executed on workers,\nthe Dag File Processor, and the Triggerer, and potentially access the credentials that the Dag\ncode uses to access external systems.\n\nIn Airflow 3, the level of database isolation depends on the component:\n\n* **Workers**: Task code on workers communicates with the API server exclusively through the\n  Execution API. Workers do not receive database credentials and genuinely cannot access the\n  metadata database directly.\n* **Dag File Processor and Triggerer**: Airflow implements software guards that prevent\n  accidental direct database access from Dag author code. However, because Dag parsing and\n  trigger execution processes run as the same Unix user as their parent processes (which do\n  have database credentials), a deliberately malicious Dag author can potentially retrieve\n  credentials from the parent process and gain direct database access. See\n  :ref:`jwt-authentication-and-workload-isolation` for details on the specific mechanisms and\n  deployment hardening measures.\n\nAuthenticated UI users\n.......................\n\nThey have access to the UI and API. See below for more details on the capabilities\nauthenticated UI users may have.\n\nNon-authenticated UI users\n..........................\n\nAirflow doesn't support unauthenticated users by default. If allowed, potential vulnerabilities\nmust be assessed and addressed by the Deployment Manager. However, there are exceptions to this.\nThe ``/api/v2/monitor/health`` endpoint responsible for health check updates should be publicly\naccessible. This is because other systems would want to retrieve that information. Another exception\nis the ``/login`` endpoint, as the users are expected to be unauthenticated to use it.\n\nCapabilities of authenticated UI users\n--------------------------------------\n\nThe capabilities of **Authenticated UI users** can vary depending on\nwhat roles have been configured by the Deployment Manager or Admin users\nas well as what permissions those roles have. Permissions on roles can be\nscoped as tightly as a single Dag, for example, or as broad as Admin.\nBelow are four general categories to help conceptualize some of the\ncapabilities authenticated users may have:\n\nAdmin users\n...........\n\nThey manage and grant permissions to other users,\nwith full access to all UI capabilities. They can potentially execute\ncode on workers by configuring connections and need to be trusted not\nto abuse these privileges. They have access to sensitive credentials\nand can modify them. By default, they don't have access to\nsystem-level configuration. They should be trusted not to misuse\nsensitive information accessible through connection configuration.\nThey also have the ability to create a API Server Denial of Service\nsituation and should be trusted not to misuse this capability.\n\nOnly admin users have access to audit logs by default.\n\nOperations users\n................\n\nThe primary difference between an operator and admin is the ability to manage and grant permissions\nto other users, and access audit logs - only admins are able to do this. Otherwise assume they have\nthe same access as an admin.\n\n.. _connection-configuration-users:\n\nConnection configuration users\n..............................\n\nThey configure connections and potentially execute code on workers during Dag execution. Trust is\nrequired to prevent misuse of these privileges. They have full write-only access\nto sensitive credentials stored in connections and can modify them, but cannot view them.\nAccess to write sensitive information through connection configuration\nshould be trusted not to be abused. They also have the ability to configure connections wrongly\nthat might create a API Server Denial of Service situations and specify insecure connection options\nwhich might create situations where executing Dags will lead to arbitrary Remote Code Execution\nfor some providers - either community released or custom ones.\n\nThose users should be highly trusted not to misuse this capability.\n\n.. note::\n\n   Before Airflow 3, the **Connection configuration users** role had also access to view the sensitive information this has\n   been changed in Airflow 3 to improve security of the accidental spilling of credentials of the connection configuration\n   users. Previously - in Airflow 2 - the **Connection configuration users** had deliberately access to view the\n   sensitive information and could either reveal it by using Inspect capabilities of the browser or they were plain visible in\n   case of the sensitive credentials stored in configuration extras. Airflow 3 and later versions mask these sensitive credentials\n   at the API level and do not return them in clear text.\n\nAbout Sensitive information\n...........................\n\nSensitive information consists of connection details, variables, and configuration. In versions later than Airflow 3.0\nsensitive information will not be exposed to users via API, UI, and ``airflowctl``.\nHowever, ``task-sdk`` still provides access to sensitive information (e.g., Use SDK API Client to get\nVariables with task-specific ``JWT`` token). Local CLI will only return keys except when using ``--show_values``.\nSensitive information has been masked in logs, UI, and API outputs. In case of Dag author expose sensitive\ninformation in other way (e.g., via environment variables), those values will not be masked.\n\nAudit log users\n...............\n\nThey can view audit events for the whole Airflow installation.\n\nRegular users\n.............\n\nThey can view and interact with the UI and API. They are able to view and edit Dags,\ntask instances, and Dag runs, and view task logs.\n\nViewer users\n............\n\nThey can view information related to Dags, in a read only fashion, task logs, and other relevant details.\nThis role is suitable for users who require read-only access without the ability to trigger or modify Dags.\n\nViewers also do not have permission to access audit logs.\n\nFor more information on the capabilities of authenticated UI users, see\n:doc:`apache-airflow-providers-fab:auth-manager/access-control`.\n\n.. _capabilities-of-dag-authors:\n\nCapabilities of Dag authors\n---------------------------\n\nDag authors are able to create or edit code - via Python files placed in a Dag bundle - that will be executed\nin a number of circumstances. The code to execute is neither verified, checked nor sand-boxed by Airflow\n(that would be very difficult if not impossible to do), so effectively Dag authors can execute arbitrary\ncode on the workers (part of Celery Workers for Celery Executor, local processes run by scheduler in case\nof Local Executor, Task Kubernetes POD in case of Kubernetes Executor), in the Dag Processor\nand in the Triggerer.\n\nDag authors are responsible for the code they write and submit to Airflow, and they should be trusted to\nverify that what they implement is safe code that will not cause any harm to the Airflow installation and\nwill not open way for security vulnerabilities. Since Dag Authors are writing Python code, they can easily write\ncode that will access sensitive information stored in Airflow or send it outside - but also to open up new\nsecurity vulnerabilities. Good example is writing a code that will pass non-sanitized UI user input (such as parameter,\nvariables, connection configuration) to any code in Operators and Hooks, or third party libraries without properly\nsanitizing it first. This can open up windows for Remote Code Execution, Denial of Service vulnerabilities or similar.\nDag authors should be trusted not to write such code and to verify that the code they write is safe and does\nnot open new security vulnerabilities.\n\nLimiting Dag Author access to subset of Dags\n--------------------------------------------\n\nAirflow does not yet provide full task-level isolation between different groups of users when\nit comes to task execution. While, in Airflow 3.0 and later, worker task code cannot directly access the\nmetadata database (it communicates through the Execution API), Dag author code that runs in the Dag File\nProcessor and Triggerer potentially still has direct database access. Regardless of execution context, Dag authors\nhave access to all Dags in the Airflow installation and they can\nmodify any of those Dags - no matter which Dag the task code is executed for. This means that Dag authors can\nmodify state of any task instance of any Dag, and there are no finer-grained access controls to limit that access.\n\nThis applies to every interface a Dag author's code can reach — including the Task Execution API\nthat workers use via the Task SDK. The Execution JWT issued to a running task does **not** carry\nper-Dag authorization: a task holding a valid token can call state-mutating Execution API endpoints\n(triggering Dag runs, clearing Dag runs, reading or writing variables, connections and XComs, etc.)\nfor **any** Dag in the installation. The ``ti:self`` token scope restricts cross-task-instance state\nmutation only; it is not a per-Dag access control.\n\nThere is an **experimental** multi-team feature in Airflow (``[core] multi_team``) that provides UI-level and\nREST API-level RBAC isolation between teams. In multi-team mode, the team-scoped resources reachable through\nthe Task Execution API are also isolated by team: a task may only access **Variables** and **Connections**\nbelonging to its own team (falling back to global values), and may only access **XComs** of Dags in its own\nteam (reads may additionally reach global Dags, but writes and deletes may not).\n\nHowever, this feature **does not yet guarantee task-level isolation**.\nAt the task execution level, workloads from different teams still share the same Execution API, signing keys,\nconnections, and variables. A task from one team can access the same shared resources as a task from another team.\nThe multi-team feature is a work in progress — task-level isolation and Execution API enforcement of team\nboundaries will be improved in future versions of Airflow. Until then, you should assume that all Dag authors\nhave access to all Dags and shared resources, and can modify their state regardless of team assignment.\n\n\nPer-Dag read access and source-code retrieval\n---------------------------------------------\n\nThe dag-source retrieval endpoint (``GET /api/v2/dagSources/{dag_id}``) honors\nper-Dag read scoping for the **current** Dag-to-file mapping: if the file\nbacking the requested Dag also defines other Dags the caller is not authorized\nto read, the endpoint returns a redacted placeholder instead of the source.\n\nThe endpoint also supports retrieving historical source via the optional\n``version_number`` query parameter. For historical versions, the per-Dag scope\nis enforced using the **current** file membership, which may differ from the\nfile's contents at the time the requested version was stored. As a consequence,\nrequesting an older version may return source containing a Dag that has since\nbeen removed from the file, even if the caller does not currently have read\naccess to that removed Dag. Conversely, requesting an older version may return\nthe redacted placeholder when a later-added co-located Dag is not in the\ncaller's readable set, even though the requested historical source predates\nthat addition.\n\nDeployments that rely on per-Dag read scoping for source isolation should\neither keep one Dag per source file, or restrict ``DagAccessEntity.CODE`` to\nroles that are trusted to read every Dag that has ever co-existed in any\nsource file.\n\n\nSecurity contexts for Dag author submitted code\n-----------------------------------------------\n\nThere are several consequences of this model chosen by Airflow, that deployment managers need to be aware of in\nterms of how those capabilities of Dag authors map to executed code in different security contexts in Airflow:\n\nLocal executor\n..............\n\nIn case of Local Executor, Dag authors can execute arbitrary code on the machine where scheduler is running.\nThis means that they can affect the scheduler process itself, and potentially affect the whole Airflow\ninstallation - including modifying cluster-wide policies and changing Airflow configuration. If you are running\nAirflow with Local Executor, the Deployment Manager must trust the Dag authors not to abuse this capability.\n\nCelery Executor\n...............\n\nIn case of Celery Executor, Dag authors can execute arbitrary code on the Celery Workers. This means that\nthey can potentially influence all the tasks executed on the same worker. If you are running Airflow with\nCelery Executor, the Deployment Manager must trust the Dag authors not to abuse this capability and unless\nDeployment Manager separates task execution by queues by Cluster Policies, they should assume, there is no\nisolation between tasks.\n\nKubernetes Executor\n...................\n\nIn case of Kubernetes Executor, Dag authors can execute arbitrary code on the Kubernetes POD they run. Each\ntask is executed in a separate POD, so there is already isolation between tasks as generally speaking\nKubernetes provides isolation between PODs.\n\nTriggerer\n.........\n\nIn case of Triggerer, Dag authors can execute arbitrary code in Triggerer. Currently there are no\nenforcement mechanisms that would allow to isolate tasks that are using deferrable functionality from\neach other and arbitrary code from various tasks can be executed in the same process/machine. The default\ndeployment runs a single Triggerer instance that handles triggers from all teams — there is no built-in\nsupport for per-team Triggerer instances. Additionally, the Triggerer uses an in-process Execution API\ntransport that potentially bypasses JWT authentication and potentially has direct access to the metadata\ndatabase. For multi-team deployments, Deployment Managers must run separate Triggerer instances per team\nas a deployment-level measure, but even then each instance potentially retains direct database access\nand a Dag author\nwhose trigger code runs there can potentially access the database directly — including data belonging\nto other teams. Deployment Manager must trust that Dag authors will not abuse this capability.\n\nDag files not needed for Scheduler and API Server\n.................................................\n\nThe Deployment Manager might isolate the code execution provided by Dag authors - particularly in\nScheduler and API Server by making sure that the Scheduler and API Server don't even\nhave access to the Dag Files. Generally speaking - no Dag author provided code should ever be\nexecuted in the Scheduler or API Server process. This means the deployment manager can exclude credentials\nneeded for Dag bundles on the Scheduler and API Server - but the bundles must still be configured on those\ncomponents.\n\n\nAllowing Dag authors to execute selected code in Scheduler and API Server\n.........................................................................\n\nThere are a number of functionalities that allow the Dag author to use pre-registered custom code to be\nexecuted in the Scheduler or API Server process - for example they can choose custom Timetables, UI plugins,\nConnection UI Fields, Operator extra links, macros, listeners - all of those functionalities allow the\nDag author to choose the code that will be executed in the Scheduler or API Server process. However this\nshould not be arbitrary code that Dag author can add Dag bundles. All those functionalities are\nonly available via ``plugins`` and ``providers`` mechanisms where the code that is executed can only be\nprovided by installed packages (or in case of plugins it can also be added to PLUGINS folder where Dag\nauthors should not have write access to). PLUGINS_FOLDER is a legacy mechanism coming from Airflow 1.10\n- but we recommend using entrypoint mechanism that allows the Deployment Manager to - effectively -\nchoose and register the code that will be executed in those contexts. Dag author has no access to\ninstall or modify packages installed in Scheduler and API Server, and this is the way to prevent\nthe Dag author to execute arbitrary code in those processes.\n\nAdditionally, if you decide to utilize and configure the PLUGINS_FOLDER, it is essential for the Deployment\nManager to ensure that the Dag author does not have write access to this folder.\n\nThe Deployment Manager might decide to introduce additional control mechanisms to prevent Dag authors from\nexecuting arbitrary code. This is all fully in hands of the Deployment Manager and it is discussed in the\nfollowing chapter.\n\nAccess to all Dags\n..................\n\nAll Dag authors have access to all Dags in the Airflow deployment. This means that they can view, modify,\nand update any Dag without restrictions at any time.\n\n.. _jwt-authentication-and-workload-isolation:\n\nJWT authentication and workload isolation\n-----------------------------------------\n\nAirflow uses JWT (JSON Web Token) authentication for both its public REST API and its internal\nExecution API. For a detailed description of the JWT authentication flows, token structure, and\nconfiguration, see :doc:`/security/jwt_token_authentication`. For the current state of workload\nisolation protections and their limitations, see :ref:`workload-isolation`.\n\nThe diagram below summarizes the trust boundaries between Airflow components and the metadata\ndatabase. Solid arrows are authenticated network calls (JWT-bearing HTTP). Dashed arrows are\ndirect database access — components on the right of the dashed line can read and write the\nmetadata DB, so any code they execute is implicitly trusted with the metadata database.\n\n.. mermaid::\n\n    flowchart LR\n        subgraph users[\"Users (untrusted by default)\"]\n            UI[UI / browser]\n            CLI[CLI]\n            EXT[External REST clients]\n        end\n\n        subgraph dataplane[\"Worker plane (no metadata DB access)\"]\n            WRK[Worker / Task]\n        end\n\n        subgraph controlplane[\"Control plane (metadata DB access)\"]\n            APISVR[API Server]\n            SCH[Scheduler]\n            DFP[Dag File Processor]\n            TRG[Triggerer]\n        end\n\n        DB[(Metadata DB)]\n\n        UI -->|JWT| APISVR\n        CLI -->|JWT| APISVR\n        EXT -->|JWT| APISVR\n        WRK -->|JWT<br/>Execution API| APISVR\n\n        APISVR -. SQL .-> DB\n        SCH -. SQL .-> DB\n        DFP -. SQL .-> DB\n        TRG -. SQL .-> DB\n\n        DFP -. in-process<br/>JWT bypassed .-> APISVR\n        TRG -. in-process<br/>JWT bypassed .-> APISVR\n\n        classDef untrusted fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000\n        classDef trusted fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000\n        classDef data fill:#fff9c4,stroke:#f57f17,stroke-width:2px,color:#000\n        class UI,CLI,EXT,WRK untrusted\n        class APISVR,SCH,DFP,TRG trusted\n        class DB data\n\nThe intentional asymmetry: **workers have no direct DB credentials and reach data only through\nthe JWT-authenticated Execution API**, while DFP and Triggerer share the control plane's DB\naccess and use an *in-process* transport that bypasses the JWT bearer dependency. This is why\nDag File Processor and Triggerer are treated as part of the control-plane trust boundary even\nthough they run user-supplied code — see :ref:`workload-isolation` and the limitations below.\n\nDefense in depth at the router level\n....................................\n\nBoth the public REST API router (``/api/v2``) and the UI router (``/ui``) declare\n``Depends(get_user)`` at the router level. This is purely a defense-in-depth backstop: every\nauthenticated route already declares its own ``GetUserDep`` or ``requires_access_*`` dependency\nthat itself resolves ``get_user``, and FastAPI caches dependency resolutions per request, so\nthe duplicate declaration is resolved only once and the runtime cost is zero. The value is preventing a future route from being added\nunder either router without an authentication check — the router-level dependency catches the\nregression at registration time. The explicit no-auth carve-outs are limited to\n``monitor_router`` (health probes), ``version_router``, and the public ``auth_router`` (login\nendpoints), which are mounted directly on the public router rather than under\n``authenticated_router``.\n\nA structural test asserts both routers carry the router-level ``Depends(get_user)``, so a\nrefactor that drops the dependency without considering its purpose fails CI rather than\nsilently widening the unauthenticated surface.\n\nCurrent isolation limitations\n.............................\n\nWhile Airflow 3 significantly improved the security model by preventing worker task code from\ndirectly accessing the metadata database (workers now communicate exclusively through the\nExecution API), **perfect isolation between Dag authors is not yet achieved**. Dag author code\npotentially still executes with direct database access in the Dag File Processor and Triggerer.\n\n**Software guards vs. intentional access**\n   Airflow implements software-level guards that prevent **accidental and unintentional** direct database\n   access from Dag author code. The Dag File Processor removes the database session and connection\n   information before forking child processes that parse Dag files, and worker tasks use the Execution\n   API exclusively.\n\n   However, these software guards **do not protect against intentional, malicious access**. The child\n   processes that parse Dag files and execute trigger code run as the **same Unix user** as their parent\n   processes (the Dag File Processor manager and the Triggerer respectively). Because of how POSIX\n   process isolation works, a child process running as the same user can retrieve the parent's\n   credentials through several mechanisms:\n\n   * **Environment variables**: By default, on Linux, any process can read ``/proc/<PID>/environ`` of another\n     process running as the same user — so database credentials passed via environment variables\n     (e.g., ``AIRFLOW__DATABASE__SQL_ALCHEMY_CONN``) can be read from the parent process. This can be\n     prevented by setting dumpable property of the process which is implemented in supervisor of tasks.\n   * **Configuration files**: If configuration is stored in files, those files must be readable by the\n     parent process and are therefore also readable by the child process running as the same user.\n   * **Command-based secrets** (``_CMD`` suffix options): The child process can execute the same\n     commands to retrieve secrets.\n   * **Secrets manager access**: If the parent uses a secrets backend, the child can access the same\n     secrets manager using credentials available in the process environment or filesystem.\n\n   This means that a deliberately malicious Dag author can retrieve database credentials and gain\n   **full read/write access to the metadata database** — including the ability to modify any Dag,\n   task instance, connection, or variable. The software guards address accidental access (e.g., a Dag\n   author importing ``airflow.settings.Session`` out of habit from Airflow 2) but do not prevent a\n   determined actor from circumventing them.\n\n   On workers, the isolation can be stronger when Deployment Manager configures worker processes to\n   not receive database credentials at all (neither via environment variables nor configuration).\n   Workers should communicate exclusively through the Execution API using short-lived JWT tokens.\n   A task running on a worker genuinely should not access the metadata database directly —\n   when it is configured to not have any credentials accessible to it.\n\n**Dag File Processor and Triggerer run user code only have soft protection to bypass JWT authentication**\n   The Dag File Processor and Triggerer processes that run user code,\n   use an in-process transport to access the Execution API, which bypasses JWT authentication.\n   Since these components execute user-submitted code (Dag files and trigger code respectively),\n   a Dag author whose code runs in these components\n   has unrestricted access to all Execution API operations if they bypass the soft protections\n   — including the ability to read any connection, variable, or XCom — without needing a valid JWT token.\n\n   Furthermore, the Dag File Processor has direct access to the metadata database (it needs this to\n   store serialized Dags). As described above, Dag author code executing in the Dag File Processor\n   context could potentially retrieve the database credentials from the parent process and access\n   the database directly, including the JWT signing key configuration if it is available in the\n   process environment. If a Dag author obtains the JWT signing key, they could forge arbitrary tokens.\n\n**Dag File Processor and Triggerer are shared across teams**\n   In the default deployment, a **single Dag File Processor instance** parses all Dag files and a\n   **single Triggerer instance** handles all triggers — regardless of team assignment. There is no\n   built-in support for running per-team Dag File Processor or Triggerer instances. This means that\n   Dag author code from different teams executes within the same process, potentially sharing the\n   in-process Execution API and direct database access.\n\n   For multi-team deployments that require separation, Deployment Managers must run **separate\n   Dag File Processor and Triggerer instances per team** as a deployment-level measure (for example,\n   by configuring each instance to only process bundles belonging to a specific team). However, even\n   with separate instances, each Dag File Processor and Triggerer potentially retains direct access\n   to the metadata database — a Dag author whose code runs in these components can potentially\n   retrieve credentials from the parent process and access the database directly, including reading\n   or modifying data belonging to other teams, unless the Deployment Manager implements Unix\n   user-level isolation (see :ref:`deployment-hardening-for-improved-isolation`).\n\n**No cross-workload isolation in the Execution API**\n   All worker workloads authenticate to the same Execution API with tokens signed by the same key and\n   sharing the same audience. While the ``ti:self`` scope enforcement prevents a worker from accessing\n   another task's specific endpoints (heartbeat, state transitions), shared resources such as connections,\n   variables, and XComs are accessible to all tasks. There is no isolation between tasks belonging to\n   different teams or Dag authors at the Execution API level.\n\n   What the Execution API **does** enforce, beyond ``ti:self``:\n\n   * **Secrets-backend deny is honoured.** When the Execution API returns ``401``/``403`` for a\n     connection or variable lookup, the SDK's ``ExecutionAPISecretsBackend`` raises\n     ``AirflowSecretsBackendAccessDenied`` (a subclass of ``PermissionError``) instead of returning\n     ``None``. The secrets-backend dispatcher must not fall through to a less-restrictive backend\n     (such as ``EnvironmentVariablesBackend``, which performs no authorization checks) when the\n     authoritative backend has explicitly denied the request. ``NOT_FOUND`` responses keep the\n     existing fall-through behaviour so the not-found-here path remains usable. This closes a\n     \"Type C\" gap where the authorization control fired but its rejection was treated as a miss.\n   * **Tightened deserialization allowlist.** The serializer's class-name allowlist regex is\n     anchored to require a full-string match, so attacker-controlled values cannot smuggle\n     untrusted class names by appending an allowed suffix to a non-allowed name.\n   * **Typed JWT claims schema.** Even after cryptographic validation, claims are run through a\n     typed Pydantic schema (``TIClaims``) that enforces the ``scope`` literal, and then through\n     ``TIToken`` which parses ``sub`` as a UUID. A token whose ``scope`` is unknown or whose\n     ``sub`` is not a valid UUID is rejected before any route handler runs.\n\n**Token signing key might be a shared secret**\n   In symmetric key mode (``[api_auth] jwt_secret``), the same secret key is used to both generate and\n   validate tokens. Any component that has access to this secret can forge tokens with arbitrary claims,\n   including tokens for other task instances or with elevated scopes. This does not impact the security\n   of the system though if the secret is only available to api-server and scheduler via deployment\n   configuration.\n\n**Sensitive configuration values can be leaked through logs**\n   Dag authors can write code that prints environment variables or configuration values to task logs\n   (e.g., ``print(os.environ)``). Airflow masks known sensitive values in logs, but masking depends on\n   recognizing the value patterns. Dag authors who intentionally or accidentally log raw environment\n   variables may expose database credentials, JWT signing keys, Fernet keys, or other secrets in task\n   logs. Deployment Managers should restrict access to task logs and ensure that sensitive configuration\n   is only provided to components where it is needed (see the sensitive variables tables below).\n\n.. _deployment-hardening-for-improved-isolation:\n\nDeployment hardening for improved isolation\n...........................................\n\nDeployment Managers who require stronger isolation between Dag authors and teams can take the following\nmeasures. Note that these are deployment-specific actions that go beyond Airflow's built-in security\nmodel — Airflow does not enforce these natively.\n\n**Mandatory code review of Dag files**\n   Implement a review process for all Dag submissions to Dag bundles. This can include:\n\n   * Requiring pull request reviews before Dag files are deployed.\n   * Static analysis of Dag code to detect suspicious patterns (e.g., direct database access attempts,\n     reading environment variables, importing configuration modules).\n   * Automated linting rules that flag potentially dangerous code.\n\n**Restrict sensitive configuration to components that need them**\n   Do not share all configuration parameters across all components. In particular:\n\n   * The JWT signing key (``[api_auth] jwt_secret`` or ``[api_auth] jwt_private_key_path``) should only\n     be available to components that need to generate tokens (Scheduler/Executor, API Server) and\n     components that need to validate tokens (API Server). Workers should not have access to the signing\n     key — they only need the tokens provided to them.\n   * Connection credentials for external systems (via Secrets Managers) should only be available to the API Server\n     (which serves them to workers via the Execution API), not to the Scheduler, Dag File Processor,\n     or Triggerer processes directly. This however limits some of the features of Airflow - such as Deadline\n     Alerts or triggers that need to authenticate with the external systems.\n   * Database connection strings should only be available to components that need direct database access\n     (API Server, Scheduler, Dag File Processor, Triggerer), not to workers.\n\n**Pass configuration via environment variables**\n   For higher security, pass sensitive configuration values via environment variables rather than\n   configuration files. Environment variables are inherently safer than configuration files in\n   Airflow's worker processes because of a built-in protection: on Linux, the supervisor process\n   calls ``prctl(PR_SET_DUMPABLE, 0)`` before forking the task process, and this flag is inherited\n   by the forked child. This marks both processes as non-dumpable, which prevents same-UID sibling\n   processes from reading ``/proc/<pid>/environ``, ``/proc/<pid>/mem``, or attaching via\n   ``ptrace``. In contrast, configuration files on disk are readable by any process running as\n   the same Unix user. Environment variables can also be scoped to individual processes or\n   containers, making it easier to restrict which components have access to which secrets.\n\n   The diagram and table below summarize which components need which classes of sensitive value\n   in a well-hardened deployment. Workers should not see DB credentials or the JWT signing key\n   at all; the API Server is the only component that needs *all* of the privileged values.\n   Components are arranged from least-privileged (Worker, green) to most-privileged\n   (API Server, blue) — the growing column visually conveys \"more privilege ⇒ more secrets\":\n\n   .. mermaid::\n\n       flowchart LR\n           subgraph WRK[\"Worker (least privileged)\"]\n               direction TB\n               W1[Fernet key]\n               W2[Worker secrets backend credentials]\n               W3[Remote log handler kwargs]\n           end\n\n           subgraph TRG[\"Triggerer\"]\n               direction TB\n               T1[DB connection]\n               T2[Fernet key]\n               T3[Non-worker secrets backend credentials]\n               T4[Remote log handler kwargs]\n           end\n\n           subgraph DFP[\"Dag File Processor\"]\n               direction TB\n               D1[DB connection]\n               D2[Fernet key]\n               D3[Non-worker secrets backend credentials]\n           end\n\n           subgraph SCH[\"Scheduler\"]\n               direction TB\n               S1[DB connection]\n               S2[JWT signing key]\n               S3[Fernet key]\n               S4[Non-worker secrets backend credentials]\n               S5[Remote log handler kwargs]\n           end\n\n           subgraph API[\"API Server (most privileged)\"]\n               direction TB\n               A1[DB connection]\n               A2[JWT signing key]\n               A3[Fernet key]\n           end\n\n           classDef wrk fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000\n           classDef ctrl fill:#bbdefb,stroke:#1565c0,stroke-width:2px,color:#000\n           class WRK wrk\n           class API,SCH,DFP,TRG ctrl\n\n   Read row-by-row to check which components need a given secret; read column-by-column to\n   check what one component is allowed to see:\n\n   .. list-table::\n      :header-rows: 1\n      :widths: 32 14 14 13 14 13\n      :align: left\n\n      * - Sensitive value\n        - API Server\n        - Scheduler\n        - Dag File Processor\n        - Triggerer\n        - Worker\n      * - DB connection\n        - ✓\n        - ✓\n        - ✓\n        - ✓\n        - —\n      * - JWT signing key\n        - ✓\n        - ✓\n        - —\n        - —\n        - —\n      * - Fernet key\n        - ✓\n        - ✓\n        - ✓\n        - ✓\n        - ✓\n      * - Secrets backend credentials (non-worker)\n        - —\n        - ✓\n        - ✓\n        - ✓\n        - —\n      * - Secrets backend credentials (worker)\n        - —\n        - —\n        - —\n        - —\n        - ✓\n      * - Remote log handler kwargs\n        - —\n        - ✓\n        - —\n        - ✓\n        - ✓\n\n   The following tables list all security-sensitive configuration variables (marked ``sensitive: true``\n   in Airflow's configuration). Deployment Managers should review each variable and ensure it is only\n   provided to the components that need it. The \"Needed by\" column indicates which components\n   typically require the variable — but actual needs depend on the specific deployment topology and\n   features in use.\n\n   .. START AUTOGENERATED CORE SENSITIVE VARS\n\n   **Core Airflow sensitive configuration variables:**\n\n   .. list-table::\n      :header-rows: 1\n      :widths: 40 30 30\n\n      * - Environment variable\n        - Description\n        - Needed by\n      * - ``AIRFLOW__API_AUTH__JWT_SECRET``\n        - JWT signing key (symmetric mode)\n        - API Server, Scheduler\n      * - ``AIRFLOW__API__SECRET_KEY``\n        - API secret key for log token signing\n        - API Server, Scheduler, Workers, Triggerer\n      * - ``AIRFLOW__CORE__ASSET_MANAGER_KWARGS``\n        - Asset manager credentials\n        - Dag File Processor\n      * - ``AIRFLOW__CORE__FERNET_KEY``\n        - Fernet encryption key for connections/variables at rest\n        - API Server, Scheduler, Workers, Dag File Processor, Triggerer\n      * - ``AIRFLOW__DATABASE__SQL_ALCHEMY_CONN``\n        - Metadata database connection string\n        - API Server, Scheduler, Dag File Processor, Triggerer\n      * - ``AIRFLOW__DATABASE__SQL_ALCHEMY_CONN_ASYNC``\n        - Async metadata database connection string\n        - API Server, Scheduler, Dag File Processor, Triggerer\n      * - ``AIRFLOW__DATABASE__SQL_ALCHEMY_ENGINE_ARGS``\n        - SQLAlchemy engine parameters (may contain credentials)\n        - API Server, Scheduler, Dag File Processor, Triggerer\n      * - ``AIRFLOW__LOGGING__REMOTE_TASK_HANDLER_KWARGS``\n        - Remote logging handler credentials\n        - Scheduler, Workers, Triggerer\n      * - ``AIRFLOW__SECRETS__BACKEND_KWARGS``\n        - Secrets backend credentials (non-worker mode)\n        - Scheduler, Dag File Processor, Triggerer\n      * - ``AIRFLOW__SENTRY__SENTRY_DSN``\n        - Sentry error reporting endpoint\n        - Scheduler, Triggerer\n      * - ``AIRFLOW__WORKERS__SECRETS_BACKEND_KWARGS``\n        - Worker-specific secrets backend credentials\n        - Workers\n\n   .. END AUTOGENERATED CORE SENSITIVE VARS\n\n   Note that ``AIRFLOW__API_AUTH__JWT_PRIVATE_KEY_PATH`` (path to the JWT private key for asymmetric\n   signing) is not marked as ``sensitive`` in config.yml because it is a file path, not a secret\n   value itself. However, access to the file it points to should be restricted to the Scheduler\n   (which generates tokens) and the API Server (which validates them).\n\n   .. START AUTOGENERATED PROVIDER SENSITIVE VARS\n\n   **Provider-specific sensitive configuration variables:**\n\n   The following variables are defined by Airflow providers and should only be set on components where\n   the corresponding provider functionality is needed. The decision of which components require these\n   variables depends on the Deployment Manager's choices about which providers and features are\n   enabled in each component.\n\n   .. list-table::\n      :header-rows: 1\n      :widths: 40 30 30\n\n      * - Environment variable\n        - Provider\n        - Description\n      * - ``AIRFLOW__CELERY_BROKER_TRANSPORT_OPTIONS__SENTINEL_KWARGS``\n        - celery\n        - Sentinel kwargs\n      * - ``AIRFLOW__CELERY_RESULT_BACKEND_TRANSPORT_OPTIONS__SENTINEL_KWARGS``\n        - celery\n        - Sentinel kwargs\n      * - ``AIRFLOW__CELERY__BROKER_URL``\n        - celery\n        - Broker url\n      * - ``AIRFLOW__CELERY__FLOWER_BASIC_AUTH``\n        - celery\n        - Flower basic auth\n      * - ``AIRFLOW__CELERY__RESULT_BACKEND``\n        - celery\n        - Result backend\n      * - ``AIRFLOW__KEYCLOAK_AUTH_MANAGER__CLIENT_SECRET``\n        - keycloak\n        - Client secret\n      * - ``AIRFLOW__OPENSEARCH__PASSWORD``\n        - opensearch\n        - Password\n      * - ``AIRFLOW__OPENSEARCH__USERNAME``\n        - opensearch\n        - Username\n\n   .. END AUTOGENERATED PROVIDER SENSITIVE VARS\n\n   Deployment Managers should review the full configuration reference and identify any additional\n   parameters that contain credentials or secrets relevant to their specific deployment.\n\n**Use asymmetric keys for JWT signing**\n   Using asymmetric keys (``[api_auth] jwt_private_key_path`` with a JWKS endpoint) provides better\n   security than symmetric keys because:\n\n   * The private key (used for signing) can be restricted to the Scheduler/Executor.\n   * The API Server only needs the public key (via JWKS) for validation.\n   * Workers cannot forge tokens even if they could access the JWKS endpoint, since they would\n     not have the private key.\n\n**Network-level isolation**\n   Use network policies, VPCs, or similar mechanisms to restrict which components can communicate\n   with each other. For example, workers should only be able to reach the Execution API endpoint,\n   not the metadata database or internal services directly. The Dag File Processor and Triggerer\n   child processes should ideally not have network access to the metadata database either, if\n   Unix user-level isolation is implemented.\n\n**Other measures and future improvements**\n   Deployment Managers may need to implement additional measures depending on their security\n   requirements. These may include monitoring and auditing of Execution API access patterns,\n   runtime sandboxing of Dag code, or dedicated infrastructure per team.\n\n   Future versions of Airflow plan to address these limitations through two approaches:\n\n   * **Strategic (longer-term)**: Move the Dag File Processor and Triggerer to communicate with\n     the metadata database exclusively through the API server (similar to how workers use the\n     Execution API today). This would eliminate the need for these components to have database\n     credentials at all, providing security by design rather than relying on deployment-level\n     measures.\n   * **Tactical (shorter-term)**: Native support for Unix user impersonation in the Dag File\n     Processor and Triggerer child processes, so that Dag author code runs as a different, low-\n     privilege user that cannot access the parent's credentials or the database.\n\n   The Airflow community is actively working on these improvements.\n\n\nCustom RBAC limitations\n-----------------------\n\nWhile RBAC defined in Airflow might limit access for certain UI users to certain Dags and features, when\nit comes to custom roles and permissions, some permissions might override individual access to Dags or lack\nof those. For example - audit log permission allows the user who has it to see logs of all Dags, even if\nthey don't have access to those Dags explicitly. This is something that the Deployment Manager\nshould be aware of when creating custom RBAC roles.\n\nTriggering Dags via Assets\n--------------------------\n\nTriggering Dags via Assets is a feature that allows an asset materialization to trigger a Dag. This feature\nis designed to allow triggering Dags without giving users specific access to triggering the Dags manually.\nThe \"Trigger Dag\" permission only affects triggering dags manually via the UI or API, but it does not affect\ntriggering Dags via Assets. Dag authors explicitly allow for specific assets to trigger the Dags and\nthey give anyone who has capability to create those assets to trigger the Dags via Assets.\n\n\nResponsibilities of Deployment Managers\n---------------------------------------\n\nAs a Deployment Manager, you should be aware of the capabilities of Dag authors and make sure that\nyou trust them not to abuse the capabilities they have. You should also make sure that you have\nproperly configured the Airflow installation to prevent Dag authors from executing arbitrary code\nin the Scheduler and API Server processes.\n\n.. _deploying-and-protecting-airflow-installation:\n\nDeploying and protecting Airflow installation\n.............................................\n\nDeployment Managers are also responsible for deploying Airflow and make it accessible to the users\nin the way that follows best practices of secure deployment applicable to the organization where\nAirflow is deployed. This includes but is not limited to:\n\n* protecting communication using TLS/VPC and whatever network security is required by the organization\n  that is deploying Airflow\n* applying rate-limiting and other forms of protections that is usually applied to web applications\n* applying authentication and authorization to the web application so that only known and authorized\n  users can have access to Airflow\n* any kind of detection of unusual activity and protection against it\n* choosing the right session backend and configuring it properly including timeouts for the session\n\nLimiting Dag author capabilities\n.................................\n\nThe Deployment Manager might also use additional mechanisms to prevent Dag authors from executing\narbitrary code - for example they might introduce tooling around Dag submission that would allow\nto review the code before it is deployed, statically-check it and add other ways to prevent malicious\ncode to be submitted. The way submitting code to a Dag bundle is done and protected is completely\nup to the Deployment Manager - Airflow does not provide any tooling or mechanisms around it and it\nexpects that the Deployment Manager will provide the tooling to protect access to Dag bundles and\nmake sure that only trusted code is submitted there.\n\nAirflow does not implement any of those feature natively, and delegates it to the deployment managers\nto deploy all the necessary infrastructure to protect the deployment - as external infrastructure components.\n\nLimiting access for authenticated UI users\n...........................................\n\nDeployment Managers also determine access levels and must understand the potential damage users can cause.\nSome Deployment Managers may further limit access through fine-grained privileges for the **Authenticated UI\nusers**. However, these limitations are outside the basic Airflow's security model and are at the\ndiscretion of Deployment Managers.\n\nExamples of fine-grained access control include (but are not limited to):\n\n*  Limiting login permissions: Restricting the accounts that users can log in with, allowing only specific\n   accounts or roles belonging to access the Airflow system.\n\n*  Access restrictions to views or Dags: Controlling user access to certain views or specific Dags,\n   ensuring that users can only view or interact with authorized components.\n\nFuture: multi-team isolation\n............................\n\nThese examples showcase ways in which Deployment Managers can refine and limit user privileges within Airflow,\nproviding tighter control and ensuring that users have access only to the necessary components and\nfunctionalities based on their roles and responsibilities. However, fine-grained access control does not\nyet provide full isolation and separation of access between different groups of users.\n\nThe experimental multi-team feature (``[core] multi_team``) is a step towards cross-team isolation, but it\ncurrently only enforces team-based isolation at the UI and REST API level. **Task-level isolation is not yet\nguaranteed** — workloads from different teams share the same Execution API, JWT signing keys, and access to\nconnections, variables, and XComs. In deployments where additional hardening measures (described in\n:ref:`deployment-hardening-for-improved-isolation`) are not implemented, a task belonging to one team can\npotentially access shared resources available to tasks from other teams. Deployment Managers who enable the\nmulti-team feature should not rely on it alone for security-critical isolation between teams at the task\nexecution layer — a deep understanding of configuration and deployment security is required by Deployment\nManagers to configure it in a way that can guarantee separation between teams.\n\nFuture versions of Airflow will improve task-level isolation, including team-scoped Execution API enforcement,\nfiner-grained JWT token scopes, and better sandboxing of user-submitted code. The Airflow community is\nactively working on these improvements.\n\n\nWhat is NOT considered a security vulnerability\n-----------------------------------------------\n\nThe following scenarios are **not** considered security vulnerabilities in Airflow. They are either\nintentional design choices, consequences of the trust model described above, or issues that fall\noutside Airflow's threat model. Security researchers (and AI agents performing security analysis)\nshould review this section before reporting issues to the Airflow security team.\n\nFor full details on reporting policies, see\n`Airflow's Security Policy <https://github.com/apache/airflow/security/policy>`_.\n\nDag authors executing arbitrary code\n.....................................\n\nDag authors can execute arbitrary code on workers, the Dag File Processor, and the Triggerer. This\nincludes accessing credentials, environment variables, and (in the case of the Dag File Processor\nand Triggerer) potentially the metadata database directly. This is the intended behavior as described in\n:ref:`capabilities-of-dag-authors` — Dag authors are trusted users. Reports that a Dag author can\n\"achieve RCE\" or \"access the database\" by writing Dag code are restating a documented capability,\nnot discovering a vulnerability.\n\nDag author code passing unsanitized input to operators and hooks\n................................................................\n\nWhen a Dag author writes code that passes unsanitized UI user input (such as Dag run parameters,\nvariables, or connection configuration values) to operators, hooks, or third-party libraries, the\nresponsibility lies with the Dag author. Airflow's hooks and operators are low-level interfaces —\nDag authors are Python programmers who must sanitize inputs before passing them to these interfaces.\n\nSQL injection or command injection is only considered a vulnerability if it can be triggered by a\n**non-Dag-author** user role (e.g., an authenticated UI user) **without** the Dag author deliberately\nwriting code that passes that input unsafely. If the only way to exploit the injection requires writing\nor modifying a Dag file, it is not a vulnerability — the Dag author already has the ability to execute\narbitrary code. See also :doc:`/security/sql`.\n\nAn exception exists when official Airflow documentation explicitly recommends a pattern that leads to\ninjection — in that case, the documentation guidance itself is the issue and may warrant an advisory.\n\nDag File Processor and Triggerer potentially having database access\n...................................................................\n\nThe Dag File Processor potentially has direct database access to store serialized Dags. The Triggerer\npotentially has direct database access to manage trigger state. Both components execute user-submitted\ncode (Dag files and trigger code respectively) and potentially bypass JWT authentication via an\nin-process Execution API transport. These are intentional architectural choices, not vulnerabilities.\nThey are documented in :ref:`jwt-authentication-and-workload-isolation`.\n\nWorkers accessing shared Execution API resources\n.................................................\n\nWorker tasks can access connections, variables, and XComs via the Execution API using their JWT token.\nWhile the ``ti:self`` scope prevents cross-task state manipulation, shared resources are accessible to\nall tasks. This is the current design — not a vulnerability. Reports that \"a task can read another\nteam's connection\" are describing a known limitation of the current isolation model, documented in\n:ref:`jwt-authentication-and-workload-isolation`.\n\nExecution API tokens not being revocable\n........................................\n\nExecution API tokens issued to workers are short-lived (default 10 minutes) with automatic refresh\nand are intentionally not subject to revocation. This is a design choice documented in\n:doc:`/security/jwt_token_authentication`, not a missing security control.\n\nConnection configuration capabilities\n......................................\n\nUsers with the **Connection configuration** role can configure connections with arbitrary credentials\nand connection parameters. When the ``test connection`` feature is enabled, these users can potentially\ntrigger RCE, arbitrary file reads, or Denial of Service through connection parameters. This is by\ndesign — connection configuration users are highly privileged and must be trusted not to abuse these\ncapabilities. The ``test connection`` feature is disabled by default since Airflow 2.7.0, and enabling\nit is an explicit Deployment Manager decision that acknowledges these risks. See\n:ref:`connection-configuration-users` for details.\n\nDenial of Service by authenticated users\n........................................\n\nAirflow is not designed to be exposed to untrusted users on the public internet. All users who can\naccess the Airflow UI and API are authenticated and known. Denial of Service scenarios triggered by\nauthenticated users (such as creating very large Dag runs, submitting expensive queries, or flooding\nthe API) are not considered security vulnerabilities. They are operational concerns that Deployment\nManagers should address through rate limiting, resource quotas, and monitoring — standard measures\nfor any internal application. See :ref:`deploying-and-protecting-airflow-installation`.\n\nSelf-XSS by authenticated users\n................................\n\nCross-site scripting (XSS) scenarios where the only victim is the user who injected the payload\n(self-XSS) are not considered security vulnerabilities. Airflow's users are authenticated and\nknown, and self-XSS does not allow an attacker to compromise other users. If you discover an XSS\nscenario where a lower-privileged user can inject a payload that executes in a higher-privileged\nuser's session without that user's action, that is a valid vulnerability and should be reported.\n\nSimple Auth Manager\n...................\n\nThe Simple Auth Manager is intended for development and testing only. This is clearly documented and\na prominent warning banner is displayed on the login page. Security issues specific to the Simple\nAuth Manager (such as weak password handling, lack of rate limiting, or missing CSRF protections) are\nnot considered production security vulnerabilities. Production deployments must use a production-grade\nauth manager.\n\nThird-party dependency vulnerabilities in Docker images\n.......................................................\n\nAirflow's reference Docker images are built with the latest available dependencies at release time.\nVulnerabilities found by scanning these images against CVE databases are expected to appear over time\nas new CVEs are published. These should **not** be reported to the Airflow security team. Instead,\nusers should build their own images with updated dependencies as described in the\n`Docker image documentation <https://airflow.apache.org/docs/docker-stack/index.html>`_.\n\nIf you discover that a third-party dependency vulnerability is **actually exploitable** in Airflow\n(with a proof-of-concept demonstrating the exploitation in Airflow's context), that is a valid\nreport and should be submitted following the security policy.\n\nAutomated scanning results without human verification\n.....................................................\n\nAutomated security scanner reports that list findings without human verification against Airflow's\nsecurity model are not considered valid vulnerability reports. Airflow's trust model differs\nsignificantly from typical web applications — many scanner findings (such as \"admin user can execute\ncode\" or \"database credentials accessible in configuration\") are expected behavior. Reports must\ninclude a proof-of-concept that demonstrates how the finding violates the security model described\nin this document, including identifying the specific user role involved and the attack scenario.\n\nSupported deployment platforms\n..............................\n\nApache Airflow officially supports Linux-based deployment environments only. The reference\ndeployment, the CI matrix, and the official Docker image are all Linux-targeted (Debian Bookworm).\nmacOS is supported for local development but is not a deployment platform. Windows is not supported\nfor deployment - except WSL2 for develop (buy only with POSIX filesystem which is the same as Linux).\n\nVulnerability reports that only manifest on a non-Linux platform — behavior that depends on Windows\npath separators, macOS-specific filesystem semantics, etc. — are **out of scope** for the security\nprocess. We do not issue CVEs or advisories for platform-specific bugs in deployment configurations\nthe project does not support.\n\nReports where the bug affects both supported (Linux) and unsupported (Windows, macOS) platforms are\njudged on the Linux behavior; the non-Linux aspect is informational.\n\nReporters who identify a non-Linux-only bug should still report it through the regular contribution\nprocess — fixes are welcome as defense-in-depth hardening, with no CVE or advisory.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3B7A:3BF56:175171:5D7C6F:6AB92A48"},"text_sha256":"b8cffc8407114e482e15351e2c1e4bc3a89d8529b6fc098a06d8fdd808a39e79"},{"path":"airflow-ctl/docs/security.rst","size":2268,"blob_sha":"fb08f4f68b3e9f79db01006e4df8f70197cd40c0","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSecurity\n========\nairflowctl is leveraging Apache Airflow Public API security features and additional layers of security to ensure that your data is safe and secure.\nairflowctl facilitates the seamless deployment of CLI and API features together, reducing redundancy and simplifying maintenance. Transitioning from direct database access to an API-driven model will enhance the CLI's capabilities and improve security.\n\n- **Authentication**: airflowctl uses authentication to ensure that only authorized users can access the system. This is done using an API Token. See more on https://airflow.apache.org/docs/apache-airflow/stable/security/api.html\n\n- **Keyring**: airflowctl uses keyring to store the API Token securely. This ensures that the Token is not stored in plain text and is only accessible to authorized users.\n   - In case no keyring is available, you can set the ``AIRFLOW_CLI_TOKEN`` environment variable or the ``--api-token`` flag for each command. Be cautious of not exposing this token to others.\n\nairflowctl API Token has its own expiration time. The default is 1 hour. You can change it in the Airflow configuration file (airflow.cfg) by setting the ``jwt_cli_expiration_time`` parameter under the ``[api_auth]`` section. The value is in seconds. This will impact all users using ``airflowctl``.\n\nFor more information see `Setting Configuration\nOptions <https://airflow.apache.org/docs/apache-airflow/stable/howto/set-config.html>`__.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A0B6:09ED:E4C58:3F30B6:6AB92A48"},"text_sha256":"bf16ab98ca78c5df36db6f6d600f8269d8332f8bf2d5a3924441b129deb6583f"},{"path":"chart/templates/api-server/api-server-networkpolicy.yaml","size":1965,"blob_sha":"a95b3465ab6a70d580ad7a4b7807f0410f4d8893","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n################################\n## Airflow API Server NetworkPolicy\n#################################\n{{- if and .Values.apiServer.enabled .Values.networkPolicies.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-api-server-policy\n  labels:\n    tier: airflow\n    component: airflow-api-server-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.apiServer.labels }}\n      {{- mustMerge .Values.apiServer.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: api-server\n      release: {{ .Release.Name }}\n  policyTypes:\n    - Ingress\n  {{- if .Values.apiServer.networkPolicy.ingress.from }}\n  ingress:\n    - from: {{- toYaml .Values.apiServer.networkPolicy.ingress.from | nindent 6 }}\n      ports:\n      {{ range .Values.apiServer.networkPolicy.ingress.ports }}\n        -\n          {{- range $key, $val := . }}\n          {{ $key }}: {{ tpl (toString $val) $ }}\n          {{- end }}\n      {{- end }}\n  {{- end }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52AE:18233:1798FE:5DC2C7:6AB92A48"},"text_sha256":"26bdf1c2cdd1ff768b3e9383566e263e8f7a871138d1fb357aa7dd26ae949b1c"},{"path":"chart/templates/flower/flower-networkpolicy.yaml","size":1998,"blob_sha":"531bff464a4d4efa57400d451bd99bbf1d81ef4c","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n###############################\n## Airflow Flower NetworkPolicy\n###############################\n{{- if and .Values.flower.enabled .Values.networkPolicies.enabled (contains \"CeleryExecutor\" .Values.executor) }}\n{{- $from := or .Values.flower.networkPolicy.ingress.from .Values.flower.extraNetworkPolicies }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-flower-policy\n  labels:\n    tier: airflow\n    component: airflow-flower-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.flower.labels }}\n      {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: flower\n      release: {{ .Release.Name }}\n  policyTypes:\n    - Ingress\n  {{- if $from }}\n  ingress:\n    - from: {{- toYaml $from | nindent 6 }}\n      ports:\n      {{ range .Values.flower.networkPolicy.ingress.ports }}\n        -\n          {{- range $key, $val := . }}\n          {{ $key }}: {{ tpl (toString $val) $ }}\n          {{- end }}\n      {{- end }}\n  {{- end }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9FAE:3AC5A:17E1C3:5E0C68:6AB92A48"},"text_sha256":"b56f0460dd3569f7420bc1f83f35ebf1b68f86f06393af1570c329fdc7405339"},{"path":"chart/templates/otel-collector/otel-collector-networkpolicy.yaml","size":2096,"blob_sha":"f58cb77fdec3a9125261d7517696207d80a949e3","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n#######################################\n## Airflow OTel Collector NetworkPolicy\n#######################################\n{{- if and .Values.networkPolicies.enabled (or .Values.otelCollector.tracesEnabled .Values.otelCollector.metricsEnabled) }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-otel-collector-policy\n  labels:\n    tier: airflow\n    component: otel-collector-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.otelCollector.labels }}\n      {{- mustMerge .Values.otelCollector.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: otel-collector\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          release: {{ .Release.Name }}\n    {{- if .Values.otelCollector.extraNetworkPolicies }}\n      {{- toYaml .Values.otelCollector.extraNetworkPolicies | nindent 4 }}\n    {{- end }}\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.otelCollectorOtlpHttp }}\n    - protocol: TCP\n      port: {{ .Values.ports.otelCollectorOtlpGrpc }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2D34:3AC15:17EE2B:5E17CB:6AB92A49"},"text_sha256":"3c8a436dbd8c207d95b194e8e39da0309c61f984fd17b469b9a97d63cc5ee336"},{"path":"chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml","size":2789,"blob_sha":"f1f83b93d4ec8941da11f8a39a1a4acc68fe755b","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n##########################\n## Pgbouncer NetworkPolicy\n##########################\n{{- $workersKedaEnabled := and .Values.workers.celery.keda.enabled (contains \"CeleryExecutor\" .Values.executor) }}\n{{- $triggererKedaEnabled := and .Values.triggerer.enabled .Values.triggerer.keda.enabled }}\n{{- if and .Values.pgbouncer.enabled .Values.networkPolicies.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-pgbouncer-policy\n  labels:\n    tier: airflow\n    component: airflow-pgbouncer-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.pgbouncer.labels }}\n      {{- mustMerge .Values.pgbouncer.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: pgbouncer\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          release: {{ .Release.Name }}\n    {{- if or $workersKedaEnabled $triggererKedaEnabled }}\n      {{- if and $workersKedaEnabled .Values.workers.celery.keda.namespaceLabels }}\n    - namespaceSelector:\n       matchLabels: {{- toYaml .Values.workers.celery.keda.namespaceLabels | nindent 10 }}\n      podSelector:\n      {{- else if and .Values.triggerer.enabled .Values.triggerer.keda.namespaceLabels }}\n    - namespaceSelector:\n        matchLabels: {{- toYaml .Values.triggerer.keda.namespaceLabels | nindent 10 }}\n      podSelector:\n      {{- else }}\n    - podSelector:\n      {{- end }}\n        matchLabels:\n          app: keda-operator\n    {{- end }}\n    {{- if .Values.pgbouncer.extraNetworkPolicies}}\n      {{- toYaml .Values.pgbouncer.extraNetworkPolicies | nindent 4 }}\n    {{- end }}\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.pgbouncer }}\n    - protocol: TCP\n      port: {{ .Values.ports.pgbouncerScrape }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DEA:3FD49:1777EC:5DA33A:6AB92A48"},"text_sha256":"d1f009d77a2ace84b81da7ad1cce7850633b3675a2f5dc057f9d814f01a22640"},{"path":"chart/templates/rbac/security-context-constraint-rolebinding.yaml","size":4395,"blob_sha":"5b6a9d4ecd07eae95f00a4bb41023324bf599bef","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n###########################\n## Airflow SCC Role Binding\n###########################\n{{- if and .Values.rbac.create .Values.rbac.createSCCRoleBinding }}\napiVersion: rbac.authorization.k8s.io/v1\n{{- if .Values.multiNamespaceMode }}\nkind: ClusterRoleBinding\n{{- else }}\nkind: RoleBinding\n{{- end }}\nmetadata:\n  {{- if not .Values.multiNamespaceMode }}\n  name: {{ include \"airflow.fullname\" . }}-scc-rolebinding\n  namespace: \"{{ .Release.Namespace }}\"\n  {{- else }}\n  name: {{ .Release.Namespace }}-{{ include \"airflow.fullname\" . }}-scc-rolebinding\n  {{- end }}\n  labels:\n    tier: airflow\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if .Values.multiNamespaceMode }}\n    namespace: \"{{ .Release.Namespace }}\"\n    {{- end }}\n    {{- with .Values.labels }}\n      {{- toYaml . | nindent 4 }}\n    {{- end }}\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: system:openshift:scc:anyuid\nsubjects:\n  {{- if and (contains \"CeleryExecutor\" .Values.executor) (or .Values.workers.celery.serviceAccount.create .Values.workers.celery.serviceAccount.name) }}\n  - kind: ServiceAccount\n    name: {{ include \"worker.celery.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if and (or .Values.workers.kubernetes.serviceAccount.create .Values.workers.kubernetes.serviceAccount.name) (contains \"KubernetesExecutor\" .Values.executor) }}\n  - kind: ServiceAccount\n    name: {{ include \"worker.kubernetes.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.scheduler.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"scheduler.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.apiServer.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"apiServer.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if and .Values.statsd.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"statsd.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if and .Values.flower.enabled (contains \"CeleryExecutor\" .Values.executor) }}\n  - kind: ServiceAccount\n    name: {{ include \"flower.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.redis.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"redis.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.triggerer.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"triggerer.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.migrateDatabaseJob.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"migrateDatabaseJob.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.createUserJob.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"createUserJob.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.cleanup.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"cleanup.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.databaseCleanup.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"databaseCleanup.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n  {{- if .Values.dagProcessor.enabled }}\n  - kind: ServiceAccount\n    name: {{ include \"dagProcessor.serviceAccountName\" . }}\n    namespace: \"{{ .Release.Namespace }}\"\n  {{- end }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F56:24970A:1841DE:5E6A8D:6AB92A46"},"text_sha256":"0565363a181d81ccd6fbc5f4231421508a63b45cde43f216a40d4abf18ca27b1"},{"path":"chart/templates/redis/redis-networkpolicy.yaml","size":2073,"blob_sha":"88c7c2d59a8bda788420090fc1d18f391d59add2","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n##############################\n## Airflow Redis NetworkPolicy\n##############################\n{{- if and .Values.redis.enabled .Values.networkPolicies.enabled (contains \"CeleryExecutor\" .Values.executor) }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-redis-policy\n  labels:\n    tier: airflow\n    component: redis-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.redis.labels }}\n      {{- mustMerge .Values.redis.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: redis\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          component: worker\n          release: {{ .Release.Name }}\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          component: scheduler\n          release: {{ .Release.Name }}\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          component: flower\n          release: {{ .Release.Name }}\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.redisDB }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"286E:18233:17990D:5DC2F2:6AB92A49"},"text_sha256":"79aceda3c11d45d22c91787be9194485513a3fe9abad7f5375de3bc9c232f648"},{"path":"chart/templates/scheduler/scheduler-networkpolicy.yaml","size":1881,"blob_sha":"c45fce635676d2542b02d1c6590d0add133a6a47","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n##################################\n## Airflow Scheduler NetworkPolicy\n##################################\n{{- if and .Values.scheduler.enabled .Values.networkPolicies.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-scheduler-policy\n  labels:\n    tier: airflow\n    component: airflow-scheduler-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.scheduler.labels }}\n      {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: scheduler\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  {{- if contains \"LocalExecutor\" .Values.executor }}\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          component: api-server\n          release: {{ .Release.Name }}\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.workerLogs }}\n  {{- end }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7034:3CC8A:17C8FB:5DF44E:6AB92A4A"},"text_sha256":"51be27c114984f5c3423008f46921f8d231b81bd627608d378d65824d27f0e54"},{"path":"chart/templates/statsd/statsd-networkpolicy.yaml","size":1950,"blob_sha":"9d4ccde72db7faf6d61b618624991dc11debb5af","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n################################\n## Airflow StatsD NetworkPolicy\n#################################\n{{- if and .Values.networkPolicies.enabled .Values.statsd.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-statsd-policy\n  labels:\n    tier: airflow\n    component: statsd-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.statsd.labels }}\n      {{- mustMerge .Values.statsd.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: statsd\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          release: {{ .Release.Name }}\n    {{- if .Values.statsd.extraNetworkPolicies }}\n      {{- toYaml .Values.statsd.extraNetworkPolicies | nindent 4 }}\n    {{- end }}\n    ports:\n    - protocol: UDP\n      port: {{ .Values.ports.statsdIngest }}\n    - protocol: TCP\n      port: {{ .Values.ports.statsdScrape }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17C8FF:5DF455:6AB92A4A"},"text_sha256":"9260e1a7814b09800b3a927f7a31d099d5de0d0f64aef5f47c81d0684d0e858d"},{"path":"chart/templates/triggerer/triggerer-networkpolicy.yaml","size":1817,"blob_sha":"ea3cda5b45c33178721a1bd708b5e88aa300c5c2","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n##################################\n## Airflow triggerer NetworkPolicy\n##################################\n{{- if and .Values.triggerer.enabled .Values.networkPolicies.enabled }}\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-triggerer-policy\n  labels:\n    tier: airflow\n    component: airflow-triggerer-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.triggerer.labels }}\n      {{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: triggerer\n      release: {{ .Release.Name }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          release: {{ .Release.Name }}\n          component: api-server\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.triggererLogs }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F38C:3B7E2:17078B:5D33AB:6AB92A4A"},"text_sha256":"5fae4f82916c7c881389ffb4abae65fcf6a27e9e445798a7176aed2c71bea975"},{"path":"chart/templates/workers/worker-networkpolicy.yaml","size":2532,"blob_sha":"a3ff99272f3dcce54a6d7faea13ed027ab41e37a","priority":1,"status":200,"text":"{{/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n*/}}\n\n###############################\n## Airflow Worker NetworkPolicy\n###############################\n{{- $globals := deepCopy . -}}\n{{- $workerSets := .Values.workers.celery.sets | default list -}}\n{{- if .Values.workers.celery.enableDefault -}}\n  {{- $workerSets = concat (list (dict \"name\" \"default\")) $workerSets -}}\n{{- end -}}\n{{- range $workerSet := $workerSets -}}\n  {{- $workers := (include \"workersMergeValues\" (list $.Values.workers.celery $workerSet) | fromYaml) -}}\n  {{- $_ := set $globals.Values.workers \"celery\" $workers -}}\n  {{- with $globals -}}\n{{- if and .Values.networkPolicies.enabled (contains \"CeleryExecutor\" .Values.executor) }}\n---\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: {{ include \"airflow.fullname\" . }}-worker-policy{{ if ne .Values.workers.celery.name \"default\" }}-{{ .Values.workers.celery.name }}{{ end }}\n  labels:\n    tier: airflow\n    component: airflow-worker-policy\n    release: {{ .Release.Name }}\n    chart: \"{{ .Chart.Name }}-{{ .Chart.Version }}\"\n    heritage: {{ .Release.Service }}\n    {{- if or .Values.labels .Values.workers.celery.labels }}\n      {{- mustMerge .Values.workers.celery.labels .Values.labels | toYaml | nindent 4 }}\n    {{- end }}\nspec:\n  podSelector:\n    matchLabels:\n      tier: airflow\n      component: worker\n      release: {{ .Release.Name }}\n      {{- if ne .Values.workers.celery.name \"default\" }}\n      worker-set: {{ .Values.workers.celery.name }}\n      {{- end }}\n  policyTypes:\n  - Ingress\n  ingress:\n  - from:\n    - podSelector:\n        matchLabels:\n          tier: airflow\n          release: {{ .Release.Name }}\n          component: api-server\n    ports:\n    - protocol: TCP\n      port: {{ .Values.ports.workerLogs }}\n{{- end }}\n{{- end }}\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5462:40CE8:17F9B5:5E23EF:6AB92A47"},"text_sha256":"b563129c8b1220395a18ec512d7ef813a4cc085692fc4a5acd0702462f76155c"},{"path":"devel-common/src/sphinx_exts/includes/security.rst","size":2257,"blob_sha":"ee5a4768bd3ab5d694c2adf3cff6a63313a02f29","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nReleasing security patches\n--------------------------\n\nAirflow providers are released independently from Airflow itself and the information about vulnerabilities\nis published separately. You can upgrade providers independently from Airflow itself, following the\ninstructions found in :doc:`apache-airflow:installation/installing-from-pypi`.\n\nWhen we release Provider version, the development is always done from the ``main`` branch where we prepare\nthe next version. The provider uses strict `SemVer <https://semver.org>`_ versioning policy. Depending on\nthe scope of the change, Provider will get ''MAJOR'' version upgrade when there are\nbreaking changes, ``MINOR`` version upgrade when there are new features or ``PATCHLEVEL`` version upgrade\nwhen there are only bug fixes (including security bugfixes) - and this is the only version that receives\nsecurity fixes by default, so you should upgrade to latest version of the provider if you want to receive\nall released security fixes.\n\nThe only exception to that rule is when we have a critical security fix and good reason to provide an\nout-of-band release for the provider, in which case stakeholders in the provider might decide to cherry-pick\nand prepare a branch for an older version of the provider following the\n`mixed governance model <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#mixed-governance-model>`_\nand requires interested parties to cherry-pick and test the fixes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"413C:40CE8:17F9BB:5E23FA:6AB92A49"},"text_sha256":"aa8ad97222eb2fa5683c63b035394bfa02769f5c4c5c87a6790cbc3553356b07"},{"path":"providers/airbyte/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/akeyless/docs/security.rst","size":885,"blob_sha":"7901e7efb290aaa82909f757805073a459be1cc1","priority":1,"status":200,"text":".. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E784:727CE:173F2C:5D6AA0:6AB92A4B"},"text_sha256":"2ede307620676d381250f51fcf3e67a283450eec2f9154506d25fe4d3323ad7d"},{"path":"providers/alibaba/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/amazon/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/apache/beam/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/cassandra/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/drill/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/druid/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/flink/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/hdfs/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/hive/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/iceberg/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/impala/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/kafka/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/kylin/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/livy/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/pig/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/pinot/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/spark/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apache/tinkerpop/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/apprise/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/arangodb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/asana/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/atlassian/jira/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/celery/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/clickhousedb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/cloudant/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/cncf/kubernetes/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/cohere/docs/security.rst","size":887,"blob_sha":"05a96c9782be48fb6027d726d6ef070f509ae7bf","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2792:285814:1726E9:5D51AF:6AB92A44"},"text_sha256":"ea0a81a236eca726bc6b838750f38fd482a5cfa855a13425b857d1ca9df08f16"},{"path":"providers/common/ai/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/common/compat/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/common/io/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/common/messaging/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/common/sql/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/databricks/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/datadog/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/dbt/cloud/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/dingding/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/discord/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/docker/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/edge3/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/elasticsearch/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/exasol/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/fab/docs/auth-manager/security.rst","size":3449,"blob_sha":"378bea59d466defbc88b43117b3afc08b3d0389a","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nFAB auth manager UI security options\n====================================\n\n.. note::\n    This guide only applies to FAB auth manager UI pages. These pages are accessible under category \"Security\" in the\n    menu.\n\nSensitive Variable fields\n-------------------------\n\nVariable values that are deemed \"sensitive\" based on the variable name will be masked in the UI automatically.\nSee :ref:`security:mask-sensitive-values` for more details.\n\nSSL\n---\n\nSSL can be enabled by providing a certificate and key. Once enabled, be sure to use\n\"https://\" in your browser.\n\n.. code-block:: ini\n\n    [webserver]\n    web_server_ssl_cert = <path to cert>\n    web_server_ssl_key = <path to key>\n\nEnabling SSL will not automatically change the web server port. If you want to use the\nstandard port 443, you'll need to configure that too. Be aware that super user privileges\n(or cap_net_bind_service on Linux) are required to listen on port 443.\n\n.. code-block:: ini\n\n    # Optionally, set the server to listen on the standard SSL port.\n    web_server_port = 443\n    base_url = http://<hostname or IP>:443\n\nEnable CeleryExecutor with SSL. Ensure you properly generate client and server\ncerts and keys.\n\n.. code-block:: ini\n\n    [celery]\n    ssl_active = True\n    ssl_key = <path to key>\n    ssl_cert = <path to cert>\n    ssl_cacert = <path to cacert>\n\nRate limiting\n-------------\n\nAirflow can be configured to limit the number of authentication requests in a given time window. We are using\n`Flask-Limiter <https://flask-limiter.readthedocs.io/en/stable/>`_ to achieve that and by default Airflow\nuses per-webserver default limit of 5 requests per 40 second fixed window. By default no common storage for\nrate limits is used between the gunicorn processes you run so rate-limit is applied separately for each process,\nso assuming random distribution of the requests by gunicorn with single webserver instance and default 4\ngunicorn workers, the effective rate limit is 5 x 4 = 20 requests per 40 second window (more or less).\nHowever you can configure the rate limit to be shared between the processes by using rate limit storage via\nsetting the ``RATELIMIT_*`` configuration settings in ``webserver_config.py``.\nFor example, to use Redis as a rate limit storage you can use the following configuration (you need\nto set ``redis_host`` to your Redis instance)\n\n.. code-block:: python\n\n    RATELIMIT_STORAGE_URI = \"redis://redis_host:6379/0\"\n\nYou can also configure other rate limit settings in ``webserver_config.py`` - for more details, see the\n`Flask Limiter rate limit configuration <https://flask-limiter.readthedocs.io/en/stable/configuration.html>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9470:3AC5A:17E204:5E0CFA:6AB92A4C"},"text_sha256":"3d60f2191373967896200e5e977c8179821483dff45950a2568a14259b3d6a74"},{"path":"providers/fab/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/facebook/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/ftp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/git/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/github/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/google/docs/deprecation-policy.rst","size":3062,"blob_sha":"e6a00e9f535d4304051fae6565c94396f19af7d7","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n ..  NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE\n     OVERWRITTEN WHEN PREPARING PACKAGES.\n\n ..  IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE\n     `PROVIDER_CHANGELOG_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY\n\nDeprecation policy for apache-airflow-providers-google package\n----------------------------------------------------------------\n\nVersioning of the package\n`````````````````````````\n\nAs mentioned in `Airflow's release process and version policy <https://airflow.apache.org/docs/apache-airflow/stable/release-process.html#airflow-s-release-process-and-version-policy>`__\nGoogle provider package (and others) should follow SemVer, meaning that any breaking changes should be released together with bumping major version of the package.\nThe change is considered to be a breaking if a Dag that was working before stops to work after the change.\n\nDeprecation Procedure\n`````````````````````\n\nThe entire procedure of deprecating (either method, parameter or operator) consists of two steps:\n  - Using decorator to mark an object as deprecated, specifying planned removal date and an object that can be used instead of deprecated one:\n\n  .. code-block:: python\n\n      from airflow.providers.google.common.deprecated import deprecated\n      from airflow.exceptions import AirflowProviderDeprecationWarning\n\n\n      @deprecated(\n          planned_removal_date=\"September 30, 2025\",\n          use_instead=\"airflow.providers.google.cloud.hooks.vertex_ai.auto_ml.AutoMLHook\",\n          category=AirflowProviderDeprecationWarning,\n      )\n      def example() -> None: ...\n\n  - Once the date of the deprecated method/parameter/operator is passed, it can be removed together with bumping major version of the package.\n\nAdditional Considerations\n`````````````````````````\n  - By default all deprecations should allow a 6 months time period until they will be removed and not available. This period will give Airflow users enough time and flexibility to update their Dags before actual removal happens. On a case by case basis this period can be adjusted given specific circumstances (e.g. in case deprecation is because of underlying API sunset which can happen earlier than in 6 months).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0F2:40B0C:17D01A:5DFB93:6AB92A4C"},"text_sha256":"5781ddbe57f01482f32c65fbf22e12b8aef496027f4367b53c27186a468a74e6"},{"path":"providers/google/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/grpc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/hashicorp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/http/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/ibm/mq/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/imap/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/influxdb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/informatica/docs/security.rst","size":887,"blob_sha":"05a96c9782be48fb6027d726d6ef070f509ae7bf","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2792:285814:1726E9:5D51AF:6AB92A44"},"text_sha256":"ea0a81a236eca726bc6b838750f38fd482a5cfa855a13425b857d1ca9df08f16"},{"path":"providers/jdbc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/jenkins/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/keycloak/docs/security.rst","size":1119,"blob_sha":"2aea19bc44c72938b0773064d0fde68b73345873","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n\n\nSetting up Keycloak Client\n==========================\nYou can both create or use an existing Keycloak realm and create a client for Airflow in it.\nTo create a client, follow the `Keycloak Client <\/auth-manager/manage/login.html>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5A04:3B1F3:184763:5E7365:6AB92A4C"},"text_sha256":"bb0c72b36a1076500082f833fcde9070601e9d6099d9773ffe65cdfe89a48428"},{"path":"providers/microsoft/azure/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/microsoft/mssql/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/microsoft/psrp/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/microsoft/winrm/docs/security.rst","size":889,"blob_sha":"351ff007ebf2fbc2de2a14e6231721dc169eff05","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:179D20:5DC99C:6AB92A4A"},"text_sha256":"d83b9d4911af4a4fa6a8bf161b556359620ec2126da5dd6ed817299309d90a7f"},{"path":"providers/mongo/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/mysql/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/neo4j/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/odbc/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/openai/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nReleasing security patches\n--------------------------\n\nAirflow providers are released independently from Airflow itself and the information about vulnerabilities\nis published separately. You can upgrade providers independently from Airflow itself, following the\ninstructions found in :doc:`apache-airflow:installation/installing-from-pypi`.\n\nWhen we release Provider version, the development is always done from the ``main`` branch where we prepare\nthe next version. The provider uses strict `SemVer <https://semver.org>`_ versioning policy. Depending on\nthe scope of the change, Provider will get ''MAJOR'' version upgrade when there are\nbreaking changes, ``MINOR`` version upgrade when there are new features or ``PATCHLEVEL`` version upgrade\nwhen there are only bug fixes (including security bugfixes) - and this is the only version that receives\nsecurity fixes by default, so you should upgrade to latest version of the provider if you want to receive\nall released security fixes.\n\nThe only exception to that rule is when we have a critical security fix and good reason to provide an\nout-of-band release for the provider, in which case stakeholders in the provider might decide to cherry-pick\nand prepare a branch for an older version of the provider following the\n`mixed governance model <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#mixed-governance-model>`_\nand requires interested parties to cherry-pick and test the fixes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7190:3B6DE:175975:5D8406:6AB92A4C"},"text_sha256":"b05e11b3bdf8147b522d67d56c7c1403d93099699989d42147dfe32a7c0a4dd1"},{"path":"providers/openfaas/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/openlineage/docs/emission_policy.rst","size":18708,"blob_sha":"726f91cfe2a4949ebe25d87de5989caac936e117","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n\n.. _emission_policy:openlineage:\n\nControlling what OpenLineage emits\n==================================\n\nThis page is the one place to look when you want to control **which OpenLineage events are\nemitted**, **how much metadata they contain**, and **who is allowed to override what**.\n\n.. _emission_policy_kill_switch:openlineage:\n\nKill switch: ``disabled`` (turn OpenLineage off entirely)\n---------------------------------------------------------\n\nIf you want to turn the OpenLineage integration off **completely** — no plugin loaded, no listener registered,\nno events generated, no overhead — without uninstalling the provider, set:\n\n.. code-block:: ini\n\n    [openlineage]\n    disabled = true\n\nor the equivalent environment variable:\n\n.. code-block:: bash\n\n    AIRFLOW__OPENLINEAGE__DISABLED=true\n\n\n.. note::\n\n  Changing this variable may require Airflow restart, as the plugins (including OpenLineage) are loaded at startup.\n\n\nThis is the all-or-nothing kill switch — useful for incident response, for testing without OL\nside-effects, or to keep the provider installed but inactive. When ``disabled = true`` no\n``emission_policy`` rule is evaluated and no authoring override has any effect: the OL plugin\nis not loaded.\n\nFor anything **less than all-or-nothing** — disabling specific DAGs, tasks, operator classes,\nor specific facets; controlling source-code capture or hook-lineage extraction; locking\nadmin policy against per-Dag author overrides — use ``emission_policy`` instead, documented\nbelow.\n\n\nTwo layers of control\n---------------------\n\nWhen OL is enabled, there are two layers of control, sitting on different sides of the wire:\n\n1. **The Airflow OpenLineage provider** (this provider) controls what the *producer* generates\n   in the first place — whether to run the extractor, whether to include source code, whether\n   to emit task or DAG-run events at all, whether to inject the full ``AirflowRunFacet``, and\n   so on. This is the ``emission_policy`` Airflow configuration, documented below.\n2. **The OpenLineage Python client** controls what happens to events *after* they are built —\n   dropping events by name pattern, applying transport-level rules. See\n   `OpenLineage Python client – filters <https://openlineage.io/docs/client/python/configuration#filters>`_.\n\nThe provider runs first (skipping work) and the client runs second (reshaping what survives).\n\n.. _emission_policy_unified:openlineage:\n\nUnified ``emission_policy`` configuration\n-----------------------------------------\n\nThe ``emission_policy`` option (under the ``[openlineage]`` section) accepts a JSON array of\nrule objects. Each rule has this shape::\n\n    {\n      \"scope\":      {<scope keys>},          # required; use {} for \"global\"\n      \"match_mode\": \"exact\" | \"regex\",       # optional; default \"exact\"\n      \"controls\":   {<control flags>},       # required; must be non-empty\n      \"locked\":     true | false             # optional; default false\n    }\n\n**Top-level keys** outside ``scope`` / ``match_mode`` / ``controls`` / ``locked`` are rejected\nand the rule is skipped with a WARNING. The same applies to unknown keys inside ``scope`` or\n``controls``. This catches typos like ``\"dgg_id\"`` immediately at config load.\n\n**Scope keys** (all optional inside ``scope``):\n\n- ``operator`` — fully-qualified operator class name; applies to task events for that operator type.\n- ``dag_id`` — applies to task and/or DAG-level events for the named DAG (use ``emit_task_events``\n  / ``emit_dag_events`` in ``controls`` to target one type selectively).\n- ``task_id`` — only valid alongside ``dag_id``; targets a specific task.\n- *(empty ``scope: {}``)* — global default; applies to every task and DAG event.\n\n``scope`` must be one of: global (empty), operator-only, dag-only, or dag+task. ``task_id``\nwithout ``dag_id``, or ``operator`` combined with ``dag_id`` / ``task_id``, is rejected with\na WARNING.\n\n**``match_mode``** (top-level): ``\"exact\"`` (default) or ``\"regex\"``. When ``\"regex\"``, every\nvalue inside ``scope`` (``dag_id``, ``task_id``, ``operator``) is treated as a ``re.fullmatch``\npattern.\n\n**Control flag keys** (all optional inside ``controls``; the dict must be non-empty):\n\n.. list-table::\n   :header-rows: 1\n   :widths: 25 10 65\n\n   * - Flag\n     - Default\n     - Description\n   * - ``emit``\n     - ``true``\n     - Shorthand: disable **all** OpenLineage events in scope (both task and DAG-level).\n   * - ``emit_task_events``\n     - ``true``\n     - Disable task-level events only; takes precedence over ``emit`` for task events within the\n       same rule.\n   * - ``emit_dag_events``\n     - ``true``\n     - Disable DAG-run-level events only; takes precedence over ``emit`` for DAG events within\n       the same rule.\n   * - ``extract_operator_metadata``\n     - ``true``\n     - Whether to run operator-specific extractor-based metadata collection (inputs/outputs). Task events only.\n   * - ``include_source_code``\n     - ``true``\n     - Whether to include source code in Python/Bash operator events. Task events only.\n       **No effect when ``extract_operator_metadata`` is ``false``** — the entire extraction\n       pipeline is skipped.\n   * - ``hook_lineage``\n     - ``true``\n     - Whether to use ``HookLineageCollector`` as a fallback when the extractor finds no\n       inputs/outputs. Task events only.\n       **No effect when ``extract_operator_metadata`` is ``false``** — the entire extraction\n       pipeline (including hook lineage) is skipped.\n   * - ``include_full_task_info``\n     - ``false``\n     - Whether to include the full serialized operator state in ``AirflowRunFacet``. When\n       ``false``, only a curated subset of task attributes is sent. When ``true``, all\n       serializable task parameters are included, which may significantly increase event size.\n       Task events only.\n\n``locked`` (top-level, default ``false``) is an admin-only floor lock: when ``true``, the\ncontrol fields carried by this rule's ``controls`` dict cannot be overridden by per-Dag /\nper-task authoring flags (see :ref:`emission_policy_authoring:openlineage`). The rule still\nparticipates in normal tier resolution against other conf rules — locking only blocks\nauthoring overrides.\n\n``emit_task_events`` / ``emit_dag_events`` take precedence over ``emit`` within the same rule.\nFor example, ``{\"scope\": {\"dag_id\": \"X\"}, \"controls\": {\"emit\": false, \"emit_task_events\": true}}``\nsuppresses DAG-level events for X while leaving task events enabled.\n\n**Priority** for task events (most specific tier wins; within a tier, the last matching rule wins):\n\n1. ``dag_id`` + ``task_id``\n2. ``dag_id``\n3. ``operator``\n4. Global (empty ``scope``)\n5. Built-in defaults\n\n**Priority** for DAG-level events:\n\n1. ``dag_id`` rule (using ``emit_dag_events`` or ``emit``)\n2. Global (empty ``scope``)\n3. Built-in defaults\n\n.. note::\n\n    **Contradictory rules within the same tier.** When two rules in the same priority tier set the\n    same flag to different values, the *last* rule in the list wins. A ``WARNING`` is logged to help\n    you spot accidental conflicts. For example,\n    ``[{\"scope\": {}, \"controls\": {\"emit\": false}}, {\"scope\": {}, \"controls\": {\"emit\": true}}]``\n    (both global) results in ``emit=true`` with a warning. Ordering rules intentionally is cleaner\n    than relying on last-wins.\n\n.. code-block:: ini\n\n    [openlineage]\n    emission_policy = [\n      {\"scope\": {\"operator\": \"airflow.providers.http.operators.http.HttpOperator\"}, \"controls\": {\"emit\": false}},\n      {\"scope\": {\"operator\": \"airflow.providers.standard.operators.python.PythonOperator\"}, \"controls\": {\"include_source_code\": false}},\n      {\"scope\": {\"dag_id\": \"expensive_dag\"}, \"controls\": {\"extract_operator_metadata\": false}},\n      {\"scope\": {\"dag_id\": \"expensive_dag\", \"task_id\": \"send_report\"}, \"controls\": {\"extract_operator_metadata\": true}},\n      {\"scope\": {\"dag_id\": \"my_dag\", \"task_id\": \"sensitive_task\"}, \"controls\": {\"hook_lineage\": false}},\n      {\"scope\": {\"dag_id\": \"reporting_dag\"}, \"controls\": {\"emit_dag_events\": false}},\n      {\"scope\": {\"dag_id\": \"full_control_dag\"}, \"controls\": {\"emit\": false}},\n      {\"scope\": {\"dag_id\": \"full_control_dag\", \"task_id\": \"critical_task\"}, \"controls\": {\"emit\": true}},\n      {\"scope\": {\"dag_id\": \"^staging_.*\"}, \"match_mode\": \"regex\", \"controls\": {\"emit\": false}},\n      {\"scope\": {\"dag_id\": \"audit_dag\"}, \"controls\": {\"include_full_task_info\": true}},\n      {\"scope\": {}, \"controls\": {\"include_source_code\": false}}\n    ]\n\n\n``AIRFLOW__OPENLINEAGE__EMISSION_POLICY`` environment variable is an equivalent.\n\nIn the example above:\n\n- ``HttpOperator`` task events are suppressed entirely for all DAGs.\n- ``PythonOperator`` tasks emit events but without source code (all DAGs).\n- Tasks in ``expensive_dag`` skip dataset extraction — except ``send_report``, which overrides this\n  with a more-specific task-scoped rule and extracts normally.\n- ``sensitive_task`` in ``my_dag`` runs its extractor normally but skips the\n  ``HookLineageCollector`` fallback.\n- DAG-level events for ``reporting_dag`` are suppressed; task events are still emitted.\n- Both task events and DAG-level events for ``full_control_dag`` are suppressed — except\n  ``critical_task``, which re-enables task event emission via a task-scoped rule.\n- All events for any DAG whose ID starts with ``staging_`` are suppressed (regex match).\n- Full task info is included in all task events for ``audit_dag``.\n- Source code is disabled globally for all operators (``PythonOperator`` was already covered above,\n  but the global rule applies to ``BashOperator`` and any other operator with source code).\n\n**Audit logging**: whenever a control flag is non-default (suppressed or enabled), an INFO-level log\nis emitted identifying the field, the event context, and the exact rule that caused the change.\nThis provides a clear audit trail for operational troubleshooting.\n\n.. _emission_policy_authoring:openlineage:\n\nPer-Dag / per-task authoring overrides (``extend_global_openlineage_emission_policy``)\n--------------------------------------------------------------------------------------\n\nDag authors can override most ``emission_policy`` flags directly in Dag code, without touching\nAirflow configuration, via\n:func:`~airflow.providers.openlineage.api.emission_policy.extend_global_openlineage_emission_policy`. This sits\n**above** ``emission_policy`` conf rules in the resolution stack — the value provided in code\nwins **unless** the matching conf rule is marked with ``\"locked\": true``.\n\n.. code-block:: python\n\n    from airflow.providers.openlineage.api.emission_policy import extend_global_openlineage_emission_policy\n\n    with DAG(\"my_dag\", ...) as dag:\n        extract = PythonOperator(task_id=\"extract\", ...)\n        sensitive = PythonOperator(task_id=\"sensitive\", ...)\n\n    # Disable all events for one task\n    extend_global_openlineage_emission_policy(sensitive, emit=False)\n\n    # Disable source-code capture for every task in the Dag, re-enable for one\n    extend_global_openlineage_emission_policy(dag, include_source_code=False)\n    extend_global_openlineage_emission_policy(extract, include_source_code=True)\n\n    # Suppress DAG-run events but keep task events\n    extend_global_openlineage_emission_policy(dag, emit_dag_events=False)\n\nKey semantics:\n\n- **Resolution priority**: authoring flags > unlocked conf rules > built-in defaults.\n- **DAG-or-task only — no global authoring scope.** ``extend_global_openlineage_emission_policy`` only accepts\n  a single DAG, operator, or :class:`XComArg`. There is no API for \"apply to every DAG in the\n  deployment.\" Deployment-wide changes are an admin concern and belong in ``emission_policy``\n  with an empty ``\"scope\": {}`` (see the :ref:`unified configuration<emission_policy_unified:openlineage>` above).\n  Passing any other object type raises :class:`TypeError`.\n- **Locked conf rules win**: a rule with ``\"locked\": true`` blocks authoring overrides for the\n  field(s) it carries. The override is silently ignored and an INFO-level log records the lock\n  hit. This is a floor lock — *any* matching conf rule that locks a field is honored, even if\n  another (more specific) conf rule wins the value resolution.\n- **DAG-level calls only propagate to existing tasks** — flags set on a Dag are pushed to the\n  tasks present on the Dag at the moment the call is made. Tasks defined later (e.g. inside\n  ``with DAG(...) as dag:`` before the operators are declared) will not inherit them. Call\n  ``extend_global_openlineage_emission_policy(dag, ...)`` *after* defining the tasks, or set flags per task.\n- **No unset API**: pass an explicit boolean to override; passing ``None`` means \"not provided\"\n  and leaves any previously-stored value intact.\n- **Legacy options cannot be locked**. ``\"locked\": true`` is an ``emission_policy`` feature.\n  If you rely only on legacy options (see :ref:`emission_policy_legacy:openlineage` below),\n  Dag authors can override them via ``extend_global_openlineage_emission_policy``. To enforce a real lock,\n  move the constraint into ``emission_policy`` and add ``\"locked\": true``.\n\nSee the docstring of\n:func:`~airflow.providers.openlineage.api.emission_policy.extend_global_openlineage_emission_policy`\nfor the full list of supported flags and examples.\n\n.. _emission_policy_legacy:openlineage:\n\nLegacy configuration options (deprecated)\n-----------------------------------------\n\n.. deprecated:: 2.18.0\n\n    The legacy options ``disabled_for_operators``, ``disable_source_code``,\n    ``include_full_task_info``, and ``selective_enable`` are superseded by\n    ``emission_policy``. They continue to work for now but will be removed in a future version\n    — migrate by translating them into the equivalent rules shown below.\n\nAny active legacy options are **automatically translated** into equivalent ``emission_policy`` rules.\nThe translated rules are **prepended** before your explicit rules, so your explicit rules win within each priority tier\n(last-wins within a tier). A ``DeprecationWarning`` is issued listing every translated option — migrate\nyour configuration to ``emission_policy`` exclusively to silence it.\n\nThe translation mapping is:\n\n.. list-table::\n   :header-rows: 1\n   :widths: 35 65\n\n   * - Legacy option\n     - Translated to\n   * - ``disabled_for_operators = some.Operator``\n     - ``{\"scope\": {\"operator\": \"some.Operator\"}, \"controls\": {\"emit\": false}}`` (operator-scoped, one per entry)\n   * - ``disable_source_code = True``\n     - ``{\"scope\": {}, \"controls\": {\"include_source_code\": false}}`` (global rule)\n   * - ``include_full_task_info = True``\n     - ``{\"scope\": {}, \"controls\": {\"include_full_task_info\": true}}`` (global rule)\n   * - ``selective_enable = True``\n     - ``{\"scope\": {}, \"controls\": {\"emit\": false}}`` (global baseline) +\n       ``{\"scope\": {\"dag_id\": \"...\", \"task_id\": \"...\"}, \"controls\": {\"emit\": true}}``\n       injected at runtime for each task that called ``enable_lineage()``\n\n**Full translation example.** Given this configuration:\n\n.. code-block:: ini\n\n    [openlineage]\n    emission_policy        = [{\"scope\": {\"dag_id\": \"my_dag\"}, \"controls\": {\"include_source_code\": true}}]\n    disabled_for_operators = airflow.providers.standard.operators.python.PythonOperator\n    disable_source_code    = True\n    include_full_task_info = True\n    selective_enable       = True\n\nThe effective rule set evaluated at runtime becomes (legacy rules first, your rules last):\n\n.. code-block:: text\n\n    Tier: operator\n      {\"scope\": {\"operator\": \"airflow.providers.standard.operators.python.PythonOperator\"},\n       \"controls\": {\"emit\": false}}\n      ↳ from disabled_for_operators\n\n    Tier: global\n      {\"scope\": {}, \"controls\": {\"include_source_code\": false}}\n      ↳ from disable_source_code\n\n      {\"scope\": {}, \"controls\": {\"include_full_task_info\": true}}\n      ↳ from include_full_task_info\n\n      {\"scope\": {}, \"controls\": {\"emit\": false}}\n      ↳ from selective_enable (global baseline — all tasks off by default)\n\n    Tier: task  (injected at runtime for each opted-in task)\n      {\"scope\": {\"dag_id\": \"my_dag\", \"task_id\": \"opted_in_task\"}, \"controls\": {\"emit\": true}}\n      ↳ from selective_enable + enable_lineage(task)\n\n    Your explicit emission_policy rules (appended last, win within tier):\n    Tier: dag\n      {\"scope\": {\"dag_id\": \"my_dag\"}, \"controls\": {\"include_source_code\": true}}\n      ↳ from emission_policy\n\nResult for ``PythonOperator`` task in ``my_dag`` (task opted in via ``enable_lineage``):\n\n- ``emit`` — task-tier opt-in rule sets ``true``, overriding the global ``false`` baseline.\n- ``include_source_code`` — your explicit dag-tier rule overrides the global\n  ``include_source_code=false`` from the translated legacy rule, because dag tier beats global tier.\n- ``include_full_task_info`` — global ``true`` from the translated legacy rule.\n\n.. note::\n\n    Because ``disabled_for_operators`` translates to an **operator-tier** rule, overriding it from\n    ``emission_policy`` requires an operator-tier rule with a higher list position (i.e., appearing\n    later in the same ``emission_policy`` list). A global\n    ``{\"scope\": {}, \"controls\": {\"emit\": true}}`` rule will *not* override it — operator tier beats\n    global tier. To re-enable a specific operator that is listed in ``disabled_for_operators``, add\n    an explicit operator rule to ``emission_policy``:\n\n    .. code-block:: ini\n\n        [openlineage]\n        emission_policy        = [{\"scope\": {\"operator\": \"my.pkg.MyOperator\"}, \"controls\": {\"emit\": true}}]\n        disabled_for_operators = my.pkg.MyOperator\n\n    The translated legacy rule ``{\"scope\": {\"operator\": \"my.pkg.MyOperator\"}, \"controls\": {\"emit\": false}}``\n    is prepended, but the explicit ``{\"scope\": {\"operator\": \"my.pkg.MyOperator\"}, \"controls\": {\"emit\": true}}``\n    follows it in the same operator tier — last-wins, so the operator is re-enabled.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8E82:241B62:1792BC:5DBE65:6AB92A4D"},"text_sha256":"714c619fd4b519711fbe2a8c7fe92e84d814d51dca96a9425074e1dfc930d698"},{"path":"providers/openlineage/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/opensearch/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/opsgenie/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/oracle/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/pagerduty/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/papermill/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/pgvector/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/pinecone/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nReleasing security patches\n--------------------------\n\nAirflow providers are released independently from Airflow itself and the information about vulnerabilities\nis published separately. You can upgrade providers independently from Airflow itself, following the\ninstructions found in :doc:`apache-airflow:installation/installing-from-pypi`.\n\nWhen we release Provider version, the development is always done from the ``main`` branch where we prepare\nthe next version. The provider uses strict `SemVer <https://semver.org>`_ versioning policy. Depending on\nthe scope of the change, Provider will get ''MAJOR'' version upgrade when there are\nbreaking changes, ``MINOR`` version upgrade when there are new features or ``PATCHLEVEL`` version upgrade\nwhen there are only bug fixes (including security bugfixes) - and this is the only version that receives\nsecurity fixes by default, so you should upgrade to latest version of the provider if you want to receive\nall released security fixes.\n\nThe only exception to that rule is when we have a critical security fix and good reason to provide an\nout-of-band release for the provider, in which case stakeholders in the provider might decide to cherry-pick\nand prepare a branch for an older version of the provider following the\n`mixed governance model <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#mixed-governance-model>`_\nand requires interested parties to cherry-pick and test the fixes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7190:3B6DE:175975:5D8406:6AB92A4C"},"text_sha256":"b05e11b3bdf8147b522d67d56c7c1403d93099699989d42147dfe32a7c0a4dd1"},{"path":"providers/postgres/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/presto/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/qdrant/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/redis/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/salesforce/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/samba/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/segment/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/sendgrid/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/sftp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/singularity/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/slack/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/smtp/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/snowflake/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/sqlite/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/ssh/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/standard/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/tableau/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/telegram/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/teradata/docs/security.rst","size":2258,"blob_sha":"66c6f79a4ecfcb6bdf707ae147a9bb7a8001d059","priority":1,"status":200,"text":"\n .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nReleasing security patches\n--------------------------\n\nAirflow providers are released independently from Airflow itself and the information about vulnerabilities\nis published separately. You can upgrade providers independently from Airflow itself, following the\ninstructions found in :doc:`apache-airflow:installation/installing-from-pypi`.\n\nWhen we release Provider version, the development is always done from the ``main`` branch where we prepare\nthe next version. The provider uses strict `SemVer <https://semver.org>`_ versioning policy. Depending on\nthe scope of the change, Provider will get ''MAJOR'' version upgrade when there are\nbreaking changes, ``MINOR`` version upgrade when there are new features or ``PATCHLEVEL`` version upgrade\nwhen there are only bug fixes (including security bugfixes) - and this is the only version that receives\nsecurity fixes by default, so you should upgrade to latest version of the provider if you want to receive\nall released security fixes.\n\nThe only exception to that rule is when we have a critical security fix and good reason to provide an\nout-of-band release for the provider, in which case stakeholders in the provider might decide to cherry-pick\nand prepare a branch for an older version of the provider following the\n`mixed governance model <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#mixed-governance-model>`_\nand requires interested parties to cherry-pick and test the fixes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7190:3B6DE:175975:5D8406:6AB92A4C"},"text_sha256":"b05e11b3bdf8147b522d67d56c7c1403d93099699989d42147dfe32a7c0a4dd1"},{"path":"providers/trino/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/vertica/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/vespa/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/weaviate/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/yandex/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/ydb/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"providers/zendesk/docs/security.rst","size":886,"blob_sha":"15a0ebbb2d054d915e29e2887e442b9061687951","priority":1,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. include:: /../../../devel-common/src/sphinx_exts/includes/security.rst\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B70:3CC8A:17C90C:5DF479:6AB92A4A"},"text_sha256":"4544e53566b5389c69c69a14b93ed0bcdd700216a78aa8ddeec7b1e600bb12ee"},{"path":"airflow-core/docs/security/api.rst","size":4265,"blob_sha":"b45616ece8925a46173d294c01a84a2739880f04","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nPublic API\n==========\n\nAirflow public API authentication\n---------------------------------\n\nThe Airflow public API uses JWT (JSON Web Token) for authenticating API requests.\nEach request made to the Airflow API must include a valid JWT token in the ``Authorization`` header to verify the\nidentity and permissions of the client.\n\nGenerate a JWT token\n^^^^^^^^^^^^^^^^^^^^\n\nTo interact with the Airflow API, clients must first authenticate and obtain a JWT token.\nThe token can be generated by making a ``POST`` request to the ``/auth/token`` endpoint, passing the necessary\ncredentials (e.g., username and password). The ``/auth/token`` endpoint is provided by the auth manager, therefore,\nplease read the documentation of the auth manager configured in your environment for more details.\n\nThe list of supported auth managers is available in :doc:`apache-airflow-providers:core-extensions/auth-managers` list.\n\nExample\n*******\n\nRequest\n\n.. code-block:: bash\n\n    ENDPOINT_URL=\"http://localhost:8080\"\n    curl -X POST ${ENDPOINT_URL}/auth/token \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\n        \"username\": \"your-username\",\n        \"password\": \"your-password\"\n      }'\n\nResponse\n\n.. code-block:: json\n\n  {\n    \"access_token\": \"<JWT-TOKEN>\"\n  }\n\nUse the JWT token to call Airflow public API\n\n.. code-block:: bash\n\n    ENDPOINT_URL=\"http://localhost:8080\"\n    curl -X GET ${ENDPOINT_URL}/api/v2/dags \\\n      -H \"Authorization: Bearer <JWT-TOKEN>\"\n\nEnabling CORS\n-------------\n\n`Cross-origin resource sharing (CORS) <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_\nis a browser security feature that restricts HTTP requests that are initiated\nfrom scripts running in the browser.\n\n``Access-Control-Allow-Headers``, ``Access-Control-Allow-Methods``, and\n``Access-Control-Allow-Origin`` headers can be added by setting values for\n``access_control_allow_headers``, ``access_control_allow_methods``, and\n``access_control_allow_origins`` options in the ``[api]`` section of the\n``airflow.cfg`` file.\n\n.. code-block:: ini\n\n    [api]\n    access_control_allow_headers = origin, content-type, accept\n    access_control_allow_methods = POST, GET, OPTIONS, DELETE\n    access_control_allow_origins = https://exampleclientapp1.com https://exampleclientapp2.com\n\nAirflow's API always responds with ``Access-Control-Allow-Credentials: true`` so the UI and\nclients can send cookies and ``Authorization`` headers across origins. Because of that,\n``access_control_allow_origins`` must list the exact origins that need access — the wildcard\n``*`` is rejected at startup. The CORS spec forbids combining\n``Access-Control-Allow-Origin: *`` with credentialed responses, and browsers refuse any\nresponse that does so, so a wildcard origin would simply break every cross-origin request.\n\nPage size limit\n---------------\n\nTo protect against requests that may lead to application instability, the stable API has a limit of items in response.\nThe default is 100 items, but you can change it using ``maximum_page_limit``  option in ``[api]``\nsection in the ``airflow.cfg`` file.\n\nRequest Payload Considerations\n------------------------------\n\nWhen using REST APIs that accept data payloads (such as the Variables API), be mindful of the payload size.\nLarge payloads (out of ordinary size, like a million bytes) can impact the performance of the Airflow webserver.\nIt's recommended to implement appropriate size limits at the proxy layer for your deployment.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"482C:375F4:17BCF7:5DE976:6AB92A4C"},"text_sha256":"16426ee14e46d7922342e68772d23f170ce173b4e73aeeaea62d917f4248df47"},{"path":"airflow-core/docs/security/audit_logs.rst","size":22970,"blob_sha":"3c7df803cb0f56e424b42e72218baf94f00c1fef","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nAudit Logs in Airflow\n=====================\n\nUnderstanding Audit Logs\n------------------------\n\nAudit logs serve as the historical record of an Airflow system, documenting who performed what actions and when they occurred. These logs are essential for maintaining system integrity, meeting compliance requirements, and conducting forensic analysis when issues arise.\n\nIn essence, audit logs answer three fundamental questions:\n\n- **Who**: Which user or system component initiated an action\n- **What**: The specific operation that was performed\n- **When**: The precise timestamp of the event\n\nThe primary purposes of audit logs include:\n\n- **Regulatory Compliance**: Meeting requirements for data governance and audit trails\n- **Security Monitoring**: Detecting unauthorized access or suspicious activities\n- **Operational Troubleshooting**: Understanding the sequence of events leading to system issues\n- **Change Management**: Tracking modifications to critical system components\n\n.. note::\n   Access to audit logs requires the ``Audit Logs.can_read`` permission. Users with this permission can view all audit entries regardless of their DAG-specific access rights.\n\n\nUnderstanding Event Logs\n------------------------\n\nEvent logs represent the operational heartbeat of an Airflow system. Unlike audit logs, which focus on accountability and compliance, event logs capture the technical details of system behavior, application performance, and operational metrics.\n\nEvent logs serve several critical functions:\n\n- **Debugging and Troubleshooting**: Providing detailed error messages and stack traces\n- **Performance Monitoring**: Recording execution times, resource usage, and system metrics\n- **Operational Insights**: Tracking system health, component interactions, and workflow execution\n- **Development Support**: Offering detailed information for code debugging and optimization\n\nEvent logs are typically stored in log files or external logging systems and include information such as:\n\n- Task execution details and output\n- System errors and warnings\n- Performance metrics and timing information\n- Component startup and shutdown events\n- Resource utilization data\n\nAudit Logs vs Event Logs\n------------------------\n\nWhile both logging systems are crucial for system management, they serve distinct purposes and audiences:\n\n.. list-table::\n   :header-rows: 1\n   :widths: 25 37 38\n\n   * - Characteristic\n     - Audit Logs\n     - Event Logs\n   * - **Primary Purpose**\n     - Accountability and compliance tracking\n     - Operational monitoring and system debugging\n   * - **Target Audience**\n     - Security teams, auditors, compliance officers\n     - Developers, system administrators, operations teams\n   * - **Content Focus**\n     - User actions and administrative changes\n     - System behavior, errors, and performance data\n   * - **Storage Location**\n     - Structured database table (``log``)\n     - Log files, external logging systems\n   * - **Retention Requirements**\n     - Long-term (months to years for compliance), if not purged from database\n     - Short to medium-term (days to weeks)\n   * - **Query Patterns**\n     - \"Who cleared the task instance for re-execution?\"\n     - No query made except is a log aggregation framework is used. Usually logs are read on a per task execution basis and will describe: \"Why did this task execution fail?\"\n\n\nAccessing Audit Logs\n--------------------\n\nAirflow provides multiple interfaces for accessing audit log data, each suited to different use cases and technical requirements:\n\n**Web User Interface**\n   The Airflow web interface provides the most accessible method for viewing audit logs. Navigate to **Browse → Audit Logs** to access an interface with built-in filtering, sorting, and search capabilities. This interface is ideal for ad-hoc investigations and routine monitoring.\n\n**REST API Integration**\n   For programmatic access and system integration, use the ``/eventLogs`` REST API endpoint. This approach enables automated monitoring, integration with external security tools, and custom reporting applications.\n\n\n\nScope of Audit Logging\n----------------------\n\nAirflow's audit logging system captures events across three distinct operational domains:\n\n**User-Initiated Actions**\n   These events occur when users interact with Airflow through any interface (web UI, REST API, or command-line tools). Examples include:\n\n   - Manual DAG run triggers and modifications\n   - Configuration changes to variables, connections, and pools\n   - Task instance state modifications (clearing, marking as success/failed)\n   - Administrative operations and user management activities\n\n**System-Generated Events**\n   These events are automatically created by Airflow's internal processes during normal operation:\n\n   - Task lifecycle state transitions (queued, running, success, failed)\n   - System monitoring events (heartbeat timeouts, external state changes)\n   - Automatic recovery operations (task rescheduling, retry attempts)\n   - Resource management activities\n\n**Command-Line Interface Operations**\n   These events capture activities performed through Airflow's CLI tools:\n\n   - Direct task execution commands\n   - DAG management operations\n   - System administration and maintenance tasks\n   - Automated script executions\n\n\nCommon Audit Log Scenarios\n--------------------------\n\nTo facilitate audit log analysis, here are some frequently encountered scenarios and their corresponding queries:\n\n**\"Who triggered this DAG?\"**\n\n.. code-block:: sql\n\n   SELECT dttm, owner, extra\n   FROM log\n   WHERE event = 'trigger_dag_run' AND dag_id = 'example_dag'\n   ORDER BY dttm DESC;\n\n**\"What happened to this failed task?\"**\n\n.. code-block:: sql\n\n   SELECT dttm, event, owner, extra\n   FROM log\n   WHERE dag_id = 'example_dag' AND task_id = 'example_task'\n   ORDER BY dttm DESC;\n\n**\"Who changed variables recently?\"**\n\n.. code-block:: sql\n\n   SELECT dttm, event, owner, extra\n   FROM log\n   WHERE event LIKE '%variable%'\n   ORDER BY dttm DESC LIMIT 20;\n\nEvent Catalog\n-------------\n\nThe following section provides a complete reference of all events tracked by Airflow's audit logging system. Understanding these event types will help interpret audit logs and construct effective queries for specific use cases.\n\nTask Instance Events\n~~~~~~~~~~~~~~~~~~~~\n\n**System-generated task events**:\n\n- ``running``: Task instance started execution\n- ``success``: Task instance completed successfully\n- ``failed``: Task instance failed during execution\n- ``skipped``: Task instance was skipped\n- ``upstream_failed``: Task instance failed due to upstream failure\n- ``up_for_retry``: Task instance is scheduled for retry\n- ``up_for_reschedule``: Task instance is rescheduled\n- ``queued``: Task instance is queued for execution\n- ``scheduled``: Task instance is scheduled\n- ``deferred``: Task instance is deferred (waiting for trigger)\n- ``awaiting_input``: Task instance is waiting for human input (Human-in-the-loop)\n- ``restarting``: Task instance is restarting\n- ``removed``: Task instance was removed\n\n**System monitoring events**:\n\n- ``heartbeat timeout``: Task instance stopped sending heartbeats and will be terminated\n- ``state mismatch``: Task instance state changed externally (outside of Airflow)\n- ``stuck in queued reschedule``: Task instance was stuck in queued state and rescheduled\n- ``stuck in queued tries exceeded``: Task instance exceeded maximum requeue attempts\n\n**User-initiated task events**:\n\n- ``fail task``: User manually marked task as failed\n- ``skip task``: User manually marked task as skipped\n- ``action_set_failed``: User set task instance as failed through UI/API\n- ``action_set_success``: User set task instance as successful through UI/API\n- ``action_set_retry``: User set task instance to retry\n- ``action_set_skipped``: User set task instance as skipped\n- ``action_set_running``: User set task instance as running\n- ``action_clear``: User cleared task instance state\n\nUser Action Events\n~~~~~~~~~~~~~~~~~~\n\n**DAG operations**:\n\n- ``trigger_dag_run``: User triggered a DAG run\n- ``delete_dag_run``: User deleted a DAG run\n- ``patch_dag_run``: User modified a DAG run\n- ``clear_dag_run``: User cleared a DAG run\n- ``get_dag_run``: User retrieved DAG run information\n- ``get_dag_runs_batch``: User retrieved multiple DAG runs\n- ``post_dag_run``: User created a DAG run\n- ``patch_dag``: User modified DAG configuration\n- ``get_dag``: User retrieved DAG information\n- ``get_dags``: User retrieved multiple DAGs\n- ``delete_dag``: User deleted a DAG\n\n**Task instance operations**:\n\n- ``post_clear_task_instances``: User cleared task instances\n- ``patch_task_instance``: User modified a task instance\n- ``get_task_instances_batch``: User retrieved task instance information\n- ``delete_task_instance``: User deleted a task instance\n- ``get_task_instance``: User retrieved single task instance information\n- ``get_task_instance_tries``: User retrieved task instance retry information\n- ``patch_task_instances_batch``: User modified multiple task instances\n\n**Variable operations**:\n\n- ``delete_variable``: User deleted a variable\n- ``patch_variable``: User modified a variable\n- ``post_variable``: User created a variable\n- ``bulk_variables``: User performed bulk variable operations\n\n**Connection operations**:\n\n- ``delete_connection``: User deleted a connection\n- ``post_connection``: User created a connection\n- ``patch_connection``: User modified a connection\n- ``bulk_connections``: User performed bulk connection operations\n- ``create_default_connections``: User created default connections\n\n**Pool operations**:\n\n- ``get_pool``: User retrieved pool information\n- ``get_pools``: User retrieved multiple pools\n- ``post_pool``: User created a pool\n- ``patch_pool``: User modified a pool\n- ``delete_pool``: User deleted a pool\n- ``bulk_pools``: User performed bulk pool operations\n\n**Asset operations**:\n\n- ``get_asset``: User retrieved asset information\n- ``get_assets``: User retrieved multiple assets\n- ``get_asset_alias``: User retrieved asset alias information\n- ``get_asset_aliases``: User retrieved multiple asset aliases\n- ``post_asset_events``: User created asset events\n- ``get_asset_events``: User retrieved asset events\n- ``materialize_asset``: User triggered asset materialization\n- ``get_asset_queued_events``: User retrieved queued asset events\n- ``delete_asset_queued_events``: User deleted queued asset events\n- ``get_dag_asset_queued_events``: User retrieved DAG asset queued events\n- ``delete_dag_asset_queued_events``: User deleted DAG asset queued events\n- ``get_dag_asset_queued_event``: User retrieved specific DAG asset queued event\n- ``delete_dag_asset_queued_event``: User deleted specific DAG asset queued event\n\n**Backfill operations**:\n\n- ``get_backfill``: User retrieved backfill information\n- ``get_backfills``: User retrieved multiple backfills\n- ``post_backfill``: User created a backfill\n- ``pause_backfill``: User paused a backfill\n- ``unpause_backfill``: User unpaused a backfill\n- ``cancel_backfill``: User cancelled a backfill\n- ``create_backfill_dry_run``: User performed backfill dry run\n\n**User and Role Management**:\n\n- ``get_user``: User retrieved user information\n- ``get_users``: User retrieved multiple users\n- ``post_user``: User created a user account\n- ``patch_user``: User modified a user account\n- ``delete_user``: User deleted a user account\n- ``get_role``: User retrieved role information\n- ``get_roles``: User retrieved multiple roles\n- ``post_role``: User created a role\n- ``patch_role``: User modified a role\n- ``delete_role``: User deleted a role\n\nCLI Events\n~~~~~~~~~~\n\n**DAG Management Commands**:\n\n- ``cli_dags_list``: List all DAGs in the system\n- ``cli_dags_show``: Display DAG information and structure\n- ``cli_dags_state``: Check the state of a DAG run\n- ``cli_dags_next_execution``: Show next execution time for a DAG\n- ``cli_dags_trigger``: Trigger a DAG run from command line\n- ``cli_dags_delete``: Delete a DAG and its metadata\n- ``cli_dags_pause``: Pause a DAG\n- ``cli_dags_unpause``: Unpause a DAG\n- ``cli_dags_backfill``: Backfill DAG runs for a date range\n- ``cli_dags_test``: Test a DAG without affecting the database\n\n**Task Management Commands**:\n\n- ``cli_tasks_list``: List tasks for a specific DAG\n- ``cli_tasks_run``: Execute a specific task instance\n- ``cli_tasks_test``: Test a task without affecting the database\n- ``cli_tasks_state``: Check the state of a task instance\n- ``cli_tasks_failed_deps``: Show failed dependencies for a task\n- ``cli_tasks_render``: Render task templates\n- ``cli_tasks_clear``: Clear task instance state\n\n**Database and System Commands**:\n\n- ``cli_db_init``: Initialize the Airflow database\n- ``cli_db_upgrade``: Upgrade the database schema\n- ``cli_db_reset``: Reset the database (dangerous operation)\n- ``cli_db_shell``: Open database shell\n- ``cli_db_check``: Check database connectivity and schema\n- ``cli_db_migrate``: Migrate database schema (legacy command)\n- ``cli_migratedb``: Legacy database migration command\n- ``cli_initdb``: Legacy database initialization command\n- ``cli_resetdb``: Legacy database reset command\n- ``cli_upgradedb``: Legacy database upgrade command\n\n**User and Security Commands**:\n\n- ``cli_users_create``: Create a new user account\n- ``cli_users_delete``: Delete a user account\n- ``cli_users_list``: List all users in the system\n- ``cli_users_add_role``: Add role to a user\n- ``cli_users_remove_role``: Remove role from a user\n\n**Configuration and Variable Commands**:\n\n- ``cli_variables_get``: Retrieve variable value\n- ``cli_variables_set``: Set variable value\n- ``cli_variables_delete``: Delete a variable\n- ``cli_variables_list``: List all variables\n- ``cli_variables_import``: Import variables from file\n- ``cli_variables_export``: Export variables to file\n\n**Connection Management Commands**:\n\n- ``cli_connections_get``: Retrieve connection details\n- ``cli_connections_add``: Add a new connection\n- ``cli_connections_delete``: Delete a connection\n- ``cli_connections_list``: List all connections\n- ``cli_connections_import``: Import connections from file\n- ``cli_connections_export``: Export connections to file\n\n**Pool Management Commands**:\n\n- ``cli_pools_get``: Get pool information\n- ``cli_pools_set``: Create or update a pool\n- ``cli_pools_delete``: Delete a pool\n- ``cli_pools_list``: List all pools\n- ``cli_pools_import``: Import pools from file\n- ``cli_pools_export``: Export pools to file\n\n**Service and Process Commands**:\n\n- ``cli_webserver``: Start the Airflow webserver\n- ``cli_scheduler``: Start the Airflow scheduler\n- ``cli_worker``: Start a Celery worker\n- ``cli_flower``: Start Flower monitoring tool\n- ``cli_triggerer``: Start the triggerer process\n- ``cli_standalone``: Start Airflow in standalone mode\n- ``cli_api_server``: Start the Airflow API server\n- ``cli_dag_processor``: Start the DAG processor service\n- ``cli_celery_worker``: Start Celery worker (alternative command)\n- ``cli_celery_flower``: Start Celery Flower (alternative command)\n\n**Maintenance and Utility Commands**:\n\n- ``cli_cheat_sheet``: Display CLI command reference\n- ``cli_version``: Show Airflow version information\n- ``cli_info``: Display system information\n- ``cli_config_get_value``: Get configuration value\n- ``cli_config_list``: List configuration options\n- ``cli_plugins``: List installed plugins\n- ``cli_rotate_fernet_key``: Rotate Fernet encryption key\n- ``cli_sync_perm``: Synchronize permissions\n- ``cli_shell``: Start interactive Python shell\n- ``cli_kerberos``: Start Kerberos ticket renewer\n\n**Testing and Development Commands**:\n\n- ``cli_test``: Run tests\n- ``cli_render``: Render templates\n- ``cli_dag_deps``: Show DAG dependencies\n- ``cli_task_deps``: Show task dependencies\n\n**Legacy Commands**:\n\n- ``cli_run``: Legacy task run command\n- ``cli_backfill``: Legacy backfill command\n- ``cli_clear``: Legacy clear command\n- ``cli_list_dags``: Legacy DAG list command\n- ``cli_list_tasks``: Legacy task list command\n- ``cli_pause``: Legacy pause command\n- ``cli_unpause``: Legacy unpause command\n- ``cli_trigger_dag``: Legacy DAG trigger command\n\nEach CLI command audit log entry includes:\n\n- **User identification**: Who executed the command\n- **Command details**: Full command with arguments\n- **Execution context**: Working directory, environment variables\n- **Timestamp**: When the command was executed\n- **Exit status**: Success or failure indication\n\nCustom Events\n~~~~~~~~~~~~~\n\nAirflow allows creating custom audit log entries programmatically:\n\n.. code-block:: python\n\n    from airflow.models.log import Log\n    from airflow.utils.session import provide_session\n\n\n    @provide_session\n    def log_custom_event(session=None):\n        log_entry = Log(event=\"custom_event\", owner=\"username\", extra=\"Additional context information\")\n        session.add(log_entry)\n        session.commit()\n\n\nAnatomy of an Audit Log Entry\n-----------------------------\n\nEach audit log record contains structured information that provides a complete picture of the logged event. Understanding these fields is essential for effective log analysis:\n\n.. list-table::\n   :header-rows: 1\n   :widths: 20 80\n\n   * - Field Name\n     - Description and Usage\n   * - ``dttm``\n     - Timestamp indicating when the event occurred (UTC timezone)\n   * - ``event``\n     - Descriptive name of the action or event (e.g., ``trigger_dag_run``, ``failed``)\n   * - ``owner``\n     - Identity of the actor: username for user actions, \"airflow\" for system events\n   * - ``dag_id``\n     - Identifier of the affected DAG (when applicable)\n   * - ``task_id``\n     - Identifier of the affected task (when applicable)\n   * - ``run_id``\n     - Specific DAG run identifier for tracking execution instances\n   * - ``try_number``\n     - Attempt number for task retries and re-executions\n   * - ``map_index``\n     - Index for dynamically mapped tasks\n   * - ``logical_date``\n     - Logical execution date of the DAG run\n   * - ``extra``\n     - JSON-formatted additional context (parameters, error details, etc.)\n\n\nAudit Log Query Methods\n-----------------------\n\nEffective audit log analysis requires understanding the various methods available for querying and retrieving log data. Each method has its strengths and is suited to different scenarios:\n\n**REST API Examples**:\n\n.. code-block:: bash\n\n    # Get all audit logs\n    curl -X GET \"http://localhost:8080/api/v1/eventLogs\"\n\n    # Filter by event type\n    curl -X GET \"http://localhost:8080/api/v1/eventLogs?event=trigger_dag_run\"\n\n    # Filter by DAG\n    curl -X GET \"http://localhost:8080/api/v1/eventLogs?dag_id=example_dag\"\n\n    # Filter by date range\n    curl -X GET \"http://localhost:8080/api/v1/eventLogs?after=2024-01-01T00:00:00Z&before=2024-12-31T23:59:59Z\"\n\n**Database Query Examples**:\n\n.. code-block:: sql\n\n    -- Get recent user actions\n    SELECT dttm, event, owner, dag_id, task_id, extra\n    FROM log\n    WHERE owner IS NOT NULL\n    ORDER BY dttm DESC\n    LIMIT 100;\n\n    -- Get task failure events\n    SELECT dttm, dag_id, task_id, run_id, extra\n    FROM log\n    WHERE event = 'failed'\n    ORDER BY dttm DESC;\n\n    -- Get user actions on specific DAG\n    SELECT dttm, event, owner, extra\n    FROM log\n    WHERE dag_id = 'example_dag' AND owner IS NOT NULL\n    ORDER BY dttm DESC;\n\n\nQuerying Event Logs\n-------------------\n\nEvent logs (operational logs) are typically accessed through different methods depending on the logging configuration:\n\n**Log Files**:\n\n.. code-block:: bash\n\n    # View scheduler logs\n    tail -f $AIRFLOW_HOME/logs/scheduler/latest/*.log\n\n    # View webserver logs\n    tail -f $AIRFLOW_HOME/logs/webserver/webserver.log\n\n    # View task logs for specific DAG run\n    cat $AIRFLOW_HOME/logs/dag_id/task_id/2024-01-01T00:00:00+00:00/1.log\n\n**REST API for Task Logs**:\n\n.. code-block:: bash\n\n    # Get task instance logs\n    curl -X GET \"http://localhost:8080/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{try_number}\"\n\n    # Get task logs with metadata\n    curl -X GET \"http://localhost:8080/api/v1/dags/example_dag/dagRuns/2024-01-01T00:00:00+00:00/taskInstances/example_task/logs/1?full_content=true\"\n\n**Python Logging Integration**:\n\n.. code-block:: python\n\n    import logging\n    from airflow.utils.log.logging_mixin import LoggingMixin\n\n\n    class MyOperator(BaseOperator, LoggingMixin):\n        def execute(self, context):\n            # These will appear in event logs\n            self.log.info(\"Task started\")\n            self.log.warning(\"Warning message\")\n            self.log.error(\"Error occurred\")\n\n**External Logging Systems**:\n\nWhen using external logging systems (e.g., ELK stack, Splunk, CloudWatch):\n\n.. code-block:: bash\n\n    # Example Elasticsearch query\n    curl -X GET \"elasticsearch:9200/airflow-*/_search\" -H 'Content-Type: application/json' -d'\n    {\n      \"query\": {\n        \"bool\": {\n          \"must\": [\n            {\"match\": {\"dag_id\": \"example_dag\"}},\n            {\"range\": {\"@timestamp\": {\"gte\": \"2024-01-01\", \"lte\": \"2024-01-31\"}}}\n          ]\n        }\n      }\n    }'\n\n\nPractical Query Examples\n------------------------\n\nThe following examples demonstrate practical applications of audit log queries for common operational and security scenarios. These queries serve as templates that can be adapted for specific requirements:\n\n**Security Investigation**\n\n.. code-block:: sql\n\n   -- Find all actions by a specific user in the last 24 hours\n   SELECT dttm, event, dag_id, task_id, extra\n   FROM log\n   WHERE owner = 'suspicious_user'\n     AND dttm > NOW() - INTERVAL '24 hours'\n   ORDER BY dttm DESC;\n\n**Compliance Reporting**\n\n.. code-block:: sql\n\n   -- Get all variable and connection changes for audit report\n   SELECT dttm, event, owner, extra\n   FROM log\n   WHERE event IN ('post_variable', 'patch_variable', 'delete_variable',\n                   'post_connection', 'patch_connection', 'delete_connection')\n     AND dttm BETWEEN '2024-01-01' AND '2024-01-31'\n   ORDER BY dttm;\n\n**Troubleshooting DAG Issues**\n\n.. code-block:: sql\n\n   -- See all events for a problematic DAG run\n   SELECT dttm, event, task_id, owner, extra\n   FROM log\n   WHERE dag_id = 'example_dag'\n     AND run_id = '2024-01-15T10:00:00+00:00'\n   ORDER BY dttm;\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5132:2B291E:183242:5E5E0D:6AB92A4D"},"text_sha256":"1425534a028fb9462da9983cd1a5f1a4c03b013be85556b4d2eb2d638286d6f0"},{"path":"airflow-core/docs/security/deprecated_permissions.rst","size":4214,"blob_sha":"35334c9c4306af58934b7e5f019a7d0efc54ce90","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nDeprecation Notice for airflow.security.permissions\n===================================================\n\nSince the release of Airflow 3, the Flask AppBuilder (AKA \"FAB\") provider is\n`no longer a core Airflow dependency <https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-79%3A+Remove+Flask+AppBuilder+as+Core+dependency>`_.\nHowever, some modules specifically designed for :doc:`apache-airflow-providers-fab:auth-manager/index` remain in the core Airflow distribution as a\nbackwards-compatible convenience for Airflow users. One such module which remains in the core distribution for backwards compatibility purposes is ``airflow.security.permissions``\n\nIf your deployment depends on ``airflow.security.permissions`` for any custom role definitions, or for any custom Auth Manager logic --\nregardless of whether you use the FAB Auth Manager or some other Auth Manager -- you should transition\nto the new authorization standard definitions for resources and actions.\nThe deprecated ``airflow.security.permissions`` will be removed in Airflow 4.\n\nDoes this Deprecation Affect My Airflow System?\n-----------------------------------------------\n\nGenerally speaking, this deprecation warning applies to any Airflow system in which **either** of the following is true:\n\n* The Airflow deployment relies on ``airflow.security.permissions`` to define custom RBAC roles.\n* The Airflow deployment has other custom logic which relies on ``airflow.security.permissions``, including any custom :doc:`/core-concepts/auth-manager/index` dependencies.\n\nHowever, if you rely on the **unmodified** :doc:`apache-airflow-providers-fab:auth-manager/index` and you **do not** use any custom role definitions, then the rest of this doc does not apply to you.\nSimilarly, if you rely on the :doc:`/core-concepts/auth-manager/simple/index` or any of the other provider Auth Managers, and have no custom code using ``airflow.security.permissions``, then the rest of this doc does not apply to you.\n\n.. note::\n    Each customized Airflow RBAC setup differs on a case-by-case basis. As such, this doc can only provide general\n    guidance for the transition to the new Airflow authorization standards, without being overly prescriptive.\n\nHow to Migrate to the New Authorization Standard Definitions\n------------------------------------------------------------\n\nRefer to the list below for the deprecated permissions module components, and the corresponding supported\nreplacement available from Airflow core:\n\n* ``airflow.security.permissions.ACTION_*`` --> ``airflow.api_fastapi.auth.managers.base_auth_manager.ResourceMethod``\n* ``airflow.security.permissions.RESOURCE_*`` --> ``airflow.api_fastapi.auth.managers.models.resource_details``\n* ``DAG.access_control`` --> Dag-level permissions should be handled by the chosen Auth Manager's ``filter_authorized_dag_ids`` method.\n\nIf you maintain a custom :doc:`/core-concepts/auth-manager/index` which relies on the deprecated module, it is\nrecommended you refer to the ``SimpleAuthManager``'s `source code <https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/auth/managers/simple/simple_auth_manager.py>`_\nas an example for how you might use the ``ResourceMethod`` and ``resource_details`` components.\n\nIf you rely on custom role definitions based off the deprecated module, you should refer to the documentation of the auth manager your system uses.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3DC8:7A4F8:1823B6:5E4F7C:6AB92A4D"},"text_sha256":"aec111f68463fdc703066d61af65fefdeaf37b2f42f0da192c0d840d8a6e72b1"},{"path":"airflow-core/docs/security/flower.rst","size":1982,"blob_sha":"e7b58553254329e492ec73147100730f7018f01c","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nFlower\n======\n\nFlower is a web based tool for monitoring and administrating Celery clusters. This topic describes how\nto configure Airflow to secure your flower instance.\n\nThis is an optional component that is disabled by default in Community deployments and you need to\nconfigure it on your own if you want to use it.\n\nFlower Authentication\n---------------------\n\nBasic authentication for Celery Flower is supported.\n\nYou can specify the details either as an optional argument in the Flower process launching\ncommand, or as a configuration item in your ``airflow.cfg``. For both cases, please provide\n``user:password`` pairs separated by a comma.\n\n.. code-block:: bash\n\n    airflow celery flower --basic-auth=user1:password1,user2:password2\n\n.. code-block:: ini\n\n    [celery]\n    flower_basic_auth = user1:password1,user2:password2\n\nFlower URL Prefix\n-----------------\n\nEnables deploying Celery Flower on non-root URL\n\nFor example to access Flower on http://example.com/flower run it with:\n\n.. code-block:: bash\n\n  airflow celery flower --url-prefix=flower\n\n.. code-block:: ini\n\n  [celery]\n  flower_url_prefix = flower\n\n\nNOTE: The old nginx rewrite is no longer needed\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CDB2:727CE:173F47:5D6AF8:6AB92A4E"},"text_sha256":"25e69944d91742246a02df2fb7e5a613c2a501a149321ef5bc84d1e1655b3c7f"},{"path":"airflow-core/docs/security/index.rst","size":1944,"blob_sha":"28c72974251553bfe8631426a83ffd383c16da99","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSecurity\n========\n\nThis section of the documentation covers security-related topics.\n\nMake sure to get familiar with the :doc:`Airflow Security Model <\/security/security_model>` if you want to understand\nthe different user types of Apache Airflow®, what they have access to, and the role Deployment Managers have in deploying Airflow in a secure way.\n\nAlso, if you want to understand how Airflow releases security patches and what to expect from them,\nhead over to :doc:`Releasing security patches <\/security/releasing_security_patches>`.\n\nThere are number of services where you can track security issues reported and announced by Airflow same as for\nany of the projects following the standard CVE databases.\n\nOne such database is run by the MITRE corporation and you can search\nfor `Airflow CVEs <https://www.cve.org/CVERecord/SearchResults?query=apache+airflow>`_\nthere, however you might use whatever database you and your organization prefers to track security issues and CVEs.\n\nFollow the below topics as well to understand other aspects of Airflow security:\n\n.. toctree::\n    :maxdepth: 1\n    :glob:\n\n    *\n    secrets/index\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"550E:3FA0D:1777E8:5DA2E7:6AB92A3E"},"text_sha256":"cce16919d7cba83b7012b56bf8b6ce246f9a78f2d4599fa023d18247546b82b8"},{"path":"airflow-core/docs/security/jwt_token_authentication.rst","size":24153,"blob_sha":"2ece1e051687eb866ba013328e8bcf5c0a7f1817","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nJWT Token Authentication\n========================\n\nThis document describes how JWT (JSON Web Token) authentication works in Apache Airflow\nfor both the public REST API (Core API) and the internal Execution API used by workers.\n\n.. contents::\n   :local:\n   :depth: 2\n\nOverview\n--------\n\nAirflow uses JWT tokens as the primary authentication mechanism for its APIs. There are two\ndistinct JWT authentication flows:\n\n1. **REST API (Core API)** — used by UI users, CLI tools, and external clients to interact\n   with the Airflow public API.\n2. **Execution API** — used internally by workers, the Dag File Processor, and the Triggerer\n   to communicate task state and retrieve runtime data (connections, variables, XComs).\n\nBoth flows share the same underlying JWT infrastructure (``JWTGenerator`` and ``JWTValidator``\nclasses in ``airflow.api_fastapi.auth.tokens``) but differ in audience, token lifetime, subject\nclaims, and scope semantics.\n\n.. mermaid::\n\n    flowchart LR\n        subgraph Clients\n            UI[UI / browser]\n            CLI[CLI]\n            EXT[External REST clients]\n        end\n        subgraph Internal[\"Internal Airflow components\"]\n            WORKER[Worker / Task]\n            DFP[Dag File Processor]\n            TRG[Triggerer]\n        end\n        APISVR[API Server]\n        EXECAPI[Execution API]\n        UI -->|JWT cookie / Bearer| APISVR\n        CLI -->|Bearer| APISVR\n        EXT -->|Bearer| APISVR\n        WORKER -->|Bearer<br/>workload &rarr; execution| EXECAPI\n        DFP -. in-process<br/>JWT bypassed .-> EXECAPI\n        TRG -. in-process<br/>JWT bypassed .-> EXECAPI\n\n        classDef internal fill:#bbdefb,stroke:#1565c0,stroke-width:2px,color:#000\n        class WORKER,DFP,TRG internal\n\n\nSigning and Cryptography\n------------------------\n\nAirflow supports two mutually exclusive signing modes:\n\n**Symmetric (shared secret)**\n   Uses a pre-shared secret key (``[api_auth] jwt_secret``) with the **HS512** algorithm.\n   All components that generate or validate tokens must share the same secret. If no secret\n   is configured, Airflow auto-generates a random 16-byte key at startup — but this key is\n   ephemeral and different across processes, which will cause authentication failures in\n   multi-component deployments. Deployment Managers must explicitly configure this value.\n\n**Asymmetric (public/private key pair)**\n   Uses a PEM-encoded private key (``[api_auth] jwt_private_key_path``) for signing and\n   the corresponding public key for validation. Supported algorithms: **RS256** (``RSA``) and\n   **EdDSA** (``Ed25519``). The algorithm is auto-detected from the key type when\n   ``[api_auth] jwt_algorithm`` is set to ``GUESS`` (the default).\n\n   Validation can use either:\n\n   - A JWKS (JSON Web Key Set) endpoint configured via ``[api_auth] trusted_jwks_url``\n     (local file or remote HTTP/HTTPS URL, polled periodically for updates).\n   - The public key derived from the configured private key (automatic fallback when\n     ``trusted_jwks_url`` is not set).\n\n.. mermaid::\n\n    flowchart TB\n        subgraph Sym[\"Symmetric (HS512)\"]\n            direction LR\n            S1[Scheduler / API Server]\n            S2[Shared secret<br/>jwt_secret]\n            S3[Token validator]\n            S1 -->|sign| S2 -->|same secret<br/>also validates| S3\n        end\n        subgraph Asym[\"Asymmetric (RS256 / EdDSA)\"]\n            direction LR\n            A1[Scheduler / API Server]\n            A2[Private key<br/>jwt_private_key_path]\n            A3[Public key /<br/>JWKS endpoint]\n            A4[Token validator]\n            A1 -->|sign| A2\n            A2 -. derives or<br/>publishes .-> A3\n            A3 -->|verify only| A4\n        end\n\n        classDef secret fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000\n        classDef pub fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000\n        class S2 secret\n        class A2 secret\n        class A3 pub\n\nIn asymmetric mode, validators (workers, downstream services) need only the public key — the\nprivate signing key can be tightly scoped to the issuing components (API Server, Scheduler).\nIn symmetric mode, any component that can validate tokens can also forge them, because there\nis only one key. See :ref:`jwt-authentication-and-workload-isolation` for the deployment\nimplications.\n\nREST API Authentication Flow\n-----------------------------\n\nToken acquisition\n^^^^^^^^^^^^^^^^^\n\n1. A client sends a ``POST`` request to ``/auth/token`` with credentials (e.g., username\n   and password in JSON body).\n2. The auth manager validates the credentials and creates a user object.\n3. The auth manager serializes the user into JWT claims and calls ``JWTGenerator.generate()``.\n4. The generated token is returned in the response as ``access_token``.\n\nFor UI-based authentication, the token is stored in a secure, HTTP-only cookie (``_token``)\nwith ``SameSite=Lax``.\n\nThe CLI uses a separate endpoint (``/auth/token/cli``) with a different (shorter) expiration\ntime.\n\nToken structure (REST API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. list-table::\n   :header-rows: 1\n   :widths: 15 85\n\n   * - Claim\n     - Description\n   * - ``jti``\n     - Unique token identifier (UUID4 hex). Used for token revocation.\n   * - ``iss``\n     - Issuer (from ``[api_auth] jwt_issuer``).\n   * - ``aud``\n     - Audience (from ``[api_auth] jwt_audience``).\n   * - ``sub``\n     - User identifier (serialized by the auth manager).\n   * - ``iat``\n     - Issued-at timestamp (Unix epoch seconds).\n   * - ``nbf``\n     - Not-before timestamp (same as ``iat``).\n   * - ``exp``\n     - Expiration timestamp (``iat + jwt_expiration_time``).\n\nToken validation (REST API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nOn each API request, the token is extracted in this order of precedence:\n\n1. ``Authorization: Bearer <token>`` header.\n2. OAuth2 query parameter.\n3. ``_token`` cookie.\n\nThe ``JWTValidator`` verifies the signature, expiry (``exp``), not-before (``nbf``),\nissued-at (``iat``), audience, and issuer claims. A configurable leeway\n(``[api_auth] jwt_leeway``, default 10 seconds) accounts for clock skew.\n\nToken revocation (REST API only)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nToken revocation applies only to REST API and UI tokens — it is **not** used for Execution API\ntokens issued to workers.\n\nRevoked tokens are tracked in the ``revoked_token`` database table by their ``jti`` claim.\nOn logout or explicit revocation, the token's ``jti`` and ``exp`` are inserted into this\ntable. Expired entries are automatically cleaned up at a cadence of ``2× jwt_expiration_time``.\n\nThe ``/auth/logout`` endpoint always invokes ``auth_manager.revoke_token()`` before any\nredirect or cookie deletion. This includes deployments where the configured auth manager\n(for example ``FabAuthManager`` or ``KeycloakAuthManager``) redirects the user to an external\nlogout URL — the JWT is invalidated in Airflow's ``revoked_token`` table regardless of what\nthe external Identity Provider does with its own session. The ``revoke_token`` call is\nunconditional; auth managers that do not implement server-side revocation can keep the\ndefault no-op implementation.\n\nToken refresh (REST API)\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``JWTRefreshMiddleware`` runs on UI requests. When the middleware detects that the\ncurrent token's ``_token`` cookie is approaching expiry, it calls\n``auth_manager.refresh_user()`` to generate a new token and sets it as the updated cookie.\n\nDefault timings (REST API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. list-table::\n   :header-rows: 1\n   :widths: 50 50\n\n   * - Setting\n     - Default\n   * - ``[api_auth] jwt_expiration_time``\n     - 86400 seconds (24 hours)\n   * - ``[api_auth] jwt_cli_expiration_time``\n     - 3600 seconds (1 hour)\n   * - ``[api_auth] jwt_leeway``\n     - 10 seconds\n\n\nExecution API Authentication Flow\n----------------------------------\n\nThe Execution API is an  API used for use by Airflow itself (not third party callers)\nto report and set task state transitions, send heartbeats, and to retrieve connections,\nvariables, and XComs at task runtime, trigger execution and Dag parsing.\n\nToken generation (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n1. The **Scheduler** generates a JWT for each task instance before\n   dispatching it (via the executor) to a worker. The executor's\n   ``jwt_generator`` property creates a ``JWTGenerator`` configured with the ``[execution_api]`` settings.\n2. The token's ``sub`` (subject) claim is set to the **task instance UUID**.\n3. The token is embedded in the workload JSON payload (``BaseWorkloadSchema.token`` field)\n   that is sent to the worker process.\n\nToken structure (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. list-table::\n   :header-rows: 1\n   :widths: 15 85\n\n   * - Claim\n     - Description\n   * - ``jti``\n     - Unique token identifier (UUID4 hex).\n   * - ``iss``\n     - Issuer (from ``[api_auth] jwt_issuer``).\n   * - ``aud``\n     - Audience (from ``[execution_api] jwt_audience``, default: ``urn:airflow.apache.org:task``).\n   * - ``sub``\n     - Task instance UUID — the identity of the workload.\n   * - ``scope``\n     - Token scope: ``\"execution\"`` or ``\"workload\"``.\n   * - ``iat``\n     - Issued-at timestamp.\n   * - ``nbf``\n     - Not-before timestamp.\n   * - ``exp``\n     - Expiration timestamp (``iat + [execution_api] jwt_expiration_time``).\n\nToken scopes (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe Execution API defines two token scopes with different lifetimes:\n\n**workload**\n   A token embedded in the workload JSON payload when the Scheduler\n   dispatches a task. The longer lifetime\n   allows tasks to remain valid while waiting in executor queues before execution\n   begins. When a worker calls the ``/run`` endpoint with a ``workload`` token, the\n   server issues a fresh ``execution``-scoped token in the ``Refreshed-API-Token``\n   response header. Lifetime equals ``[scheduler] task_queued_timeout`` (default\n   600 seconds) — the same timeout the scheduler uses to reap queue-starved tasks —\n   so tuning ``task_queued_timeout`` also widens the window a task can wait in a\n   backed-up queue before its workload token expires.\n\n**execution**\n   A short-lived token (default 10 minutes) accepted by all Execution API endpoints.\n   This is the standard scope for worker communication during task execution. Issued\n   by the server when the worker transitions to running via the ``/run`` endpoint.\n   The ``JWTReissueMiddleware`` refreshes ``execution`` tokens transparently,\n   so the worker maintains access for the duration of the task.\n\nTokens without a ``scope`` claim default to ``\"execution\"`` for backwards compatibility.\n\nToken delivery to workers\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe token flows through the execution stack as follows:\n\n1. **Scheduler** generates a ``workload``-scoped token (lifetime equals\n   ``[scheduler] task_queued_timeout``, default 600 seconds) and embeds it in the workload\n   JSON payload that it passes to **Executor**.\n2. The workload JSON is passed to the worker process (via the executor-specific mechanism:\n   Celery message, Kubernetes Pod spec, local subprocess arguments, etc.).\n3. The worker's ``execute_workload()`` function reads the workload JSON and extracts the token.\n4. The ``supervise_task()`` function receives the token and creates an ``httpx.Client`` instance\n   with ``BearerAuth(token)`` for all Execution API HTTP requests.\n5. The worker calls the ``/run`` endpoint with the ``workload``-scoped token to mark the task\n   as running. The server responds with a fresh ``execution``-scoped token in the\n   ``Refreshed-API-Token`` header.\n6. The client's ``_update_auth()`` hook detects the header and transparently updates\n   the ``BearerAuth`` instance to use the new ``execution`` token for all subsequent requests.\n\n.. mermaid::\n\n    sequenceDiagram\n        autonumber\n        participant SCH as Scheduler\n        participant EXE as Executor<br/>(Celery / K8s / Local)\n        participant WRK as Worker\n        participant API as Execution API\n\n        Note over SCH: Task ready to dispatch\n        SCH->>SCH: generate workload token<br/>scope=workload<br/>exp = task_queued_timeout\n        SCH->>EXE: workload JSON<br/>(includes token)\n        Note over EXE: Task waits in queue<br/>(can be minutes)\n        EXE->>WRK: dispatch (workload JSON)\n        WRK->>API: PATCH /run<br/>Bearer: workload token\n        Note over API: validates workload scope<br/>checks TI in QUEUED/RESTARTING<br/>409 if not\n        API-->>WRK: 200 OK<br/>Refreshed-API-Token: execution token<br/>(scope=execution, ~10 min)\n        WRK->>WRK: BearerAuth swaps to<br/>execution token\n        loop For all subsequent calls (heartbeats, XComs, ...)\n            WRK->>API: Bearer: execution token\n            alt token expiring (less than 20% left)\n                API-->>WRK: 200 OK<br/>Refreshed-API-Token: new execution token\n                WRK->>WRK: BearerAuth swaps again\n            end\n        end\n\nEven if a workload token is intercepted in transit, it can only call ``/run``. That endpoint\nrejects re-runs (``409 Conflict`` unless the task instance is in ``QUEUED`` or ``RESTARTING``),\nso the attack surface for the longer-lived token is bounded to \"start a task that is already\nqueued\". All other endpoints require ``scope=execution`` and reject workload tokens.\n\nToken validation (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``JWTBearer`` security dependency validates the token once per request:\n\n1. Extracts the token from the ``Authorization: Bearer`` header.\n2. Performs cryptographic signature validation via ``JWTValidator``.\n3. Verifies standard claims (``exp``, ``iat``, ``aud`` — ``nbf`` and ``iss`` if configured).\n4. Defaults the ``scope`` claim to ``\"execution\"`` if absent.\n5. **Validates the task identity claims against a typed Pydantic schema.** ``TIClaims``\n   (in ``airflow.api_fastapi.execution_api.datamodels.token``) enforces that ``scope`` is one\n   of the declared ``TokenScope`` literals (``\"execution\"`` or ``\"workload\"``); ``TIToken``\n   then parses the ``sub`` claim through a ``UUID`` field, which rejects non-UUID values.\n   A token whose ``scope`` is unknown, or whose ``sub`` is not a valid UUID, is rejected with\n   ``403 Forbidden`` even when the cryptographic signature checks pass. ``TIClaims`` keeps\n   ``extra=\"allow\"`` so auth managers can attach additional, deployment-specific claims\n   without modifying the core schema; only the security-critical fields are typed.\n6. Creates a ``TIToken`` object with the task instance ID and validated claims.\n7. Caches the validated token on the ASGI request scope for the duration of the request.\n\nRoute-level enforcement is handled by ``require_auth``:\n\n- Checks the token's ``scope`` against the route's ``allowed_token_types`` (precomputed\n  by ``ExecutionAPIRoute`` from ``token:*`` Security scopes at route registration time).\n- Enforces ``ti:self`` scope — verifies that the token's ``sub`` claim matches the\n  ``{task_instance_id}`` path parameter, preventing a worker from accessing another task's\n  endpoints.\n\n.. mermaid::\n\n    flowchart TD\n        REQ([Incoming request<br/>Authorization: Bearer ...])\n        REQ --> CACHE{Cached on<br/>request.scope?}\n        CACHE -->|yes| RET([Return cached TIToken])\n        CACHE -->|no| SIG[JWTValidator:<br/>verify signature]\n        SIG -->|fail| F1([403 Forbidden])\n        SIG -->|ok| STD[Verify exp / iat / nbf<br/>aud / iss]\n        STD -->|fail| F1\n        STD -->|ok| SCOPE[Default scope to<br/>'execution' if absent]\n        SCOPE --> SCHEMA[TIClaims:<br/>typed Pydantic schema]\n        SCHEMA -->|ValidationError| F1\n        SCHEMA -->|ok| TYP{require_auth:<br/>scope in<br/>route.allowed_token_types?}\n        TYP -->|no| F1\n        TYP -->|yes| SELF{ti:self scope<br/>declared?}\n        SELF -->|no| OK([Return TIToken])\n        SELF -->|yes| MATCH{token.sub ==<br/>task_instance_id?}\n        MATCH -->|no| F1\n        MATCH -->|yes| OK\n\n        classDef fail fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000\n        classDef pass fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000\n        class F1 fail\n        class OK,RET pass\n\nToken refresh (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``JWTReissueMiddleware`` automatically refreshes valid tokens that are approaching\nexpiry. The token must be valid at the start of the request for refresh to occur:\n\n1. After each response, the middleware checks the token's remaining validity.\n2. If less than **20%** of the total validity remains (minimum 30 seconds), the server\n   generates a new token preserving all original claims (including ``scope`` and ``sub``).\n3. The refreshed token is returned in the ``Refreshed-API-Token`` response header.\n4. The client's ``_update_auth()`` hook detects this header and transparently updates\n   the ``BearerAuth`` instance for subsequent requests.\n\nThe middleware only refreshes ``execution``-scoped tokens. ``workload``-scoped tokens are\nsized to span the queued-timeout window and are explicitly skipped by the middleware —\nthey are designed to survive executor queue wait times without needing refresh. This\nensures long-running tasks do not lose API access without requiring the worker to\nre-authenticate.\n\nNo token revocation (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nExecution API tokens are not subject to revocation. ``execution``-scoped tokens are short-lived\n(default 10 minutes) and automatically refreshed by the ``JWTReissueMiddleware``.\n``workload``-scoped tokens (tracking ``[scheduler] task_queued_timeout``) are not refreshed —\nthey expire naturally after their validity period. Revocation is not part of the Execution API\nsecurity model.\n\n\n\nDefault timings (Execution API)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. list-table::\n   :header-rows: 1\n   :widths: 50 50\n\n   * - Setting\n     - Default\n   * - ``[execution_api] jwt_expiration_time``\n     - 600 seconds (10 minutes)\n   * - Workload token lifetime (derived)\n     - ``[scheduler] task_queued_timeout`` (default 600 seconds)\n   * - ``[execution_api] jwt_audience``\n     - ``urn:airflow.apache.org:task``\n   * - Token refresh threshold\n     - 20% of validity remaining (minimum 30 seconds)\n\n\nDag File Processor and Triggerer\n---------------------------------\n\nThe **Dag File Processor** and **Triggerer** are internal Airflow components that also\ninteract with the Execution API, but they do so via an **in-process** transport\n(``InProcessExecutionAPI``) rather than over the network. This in-process API:\n\n- Runs the Execution API application directly within the same process, using an ASGI/WSGI\n  bridge.\n- **Potentially bypasses JWT authentication** — the JWT bearer dependency is overridden to\n  always return a synthetic ``TIToken`` with the ``\"execution\"`` scope, effectively bypassing\n  token validation.\n- Also potentially bypasses per-resource access controls (connection, variable, and XCom access\n  checks are overridden to always allow).\n\nAirflow implements software guards that prevent accidental direct database access from Dag\nauthor code in these components. However, because the child processes that parse Dag files and\nexecute trigger code run as the **same Unix user** as their parent processes, these guards do\nnot protect against intentional access. A deliberately malicious Dag author can potentially\nretrieve the parent process's database credentials (via ``/proc/<PID>/environ``, configuration\nfiles, or secrets manager access) and gain full read/write access to the metadata database and\nall Execution API operations — without needing a valid JWT token.\n\nThis is in contrast to workers/task execution, where the isolation is implemented ad deployment\nlevel - where sensitive configuration of database credentials is not available to Airflow\nprocesses because they are not set in their deployment configuration at all, and communicate\nexclusively through the Execution API.\n\nIn the default deployment, a **single Dag File Processor instance** parses Dag files for all\nteams and a **single Triggerer instance** handles all triggers across all teams. This means\nthat Dag author code from different teams executes within the same process, with potentially\nshared access to the in-process Execution API and the metadata database.\n\nFor multi-team deployments that require isolation, Deployment Managers must run **separate\nDag File Processor and Triggerer instances per team** as a deployment-level measure — Airflow\ndoes not provide built-in support for per-team DFP or Triggerer instances. Even with separate\ninstances, each retains the same Unix user as the parent process. To prevent credential\nretrieval, Deployment Managers must implement Unix user-level isolation (running child\nprocesses as a different, low-privilege user) or network-level restrictions.\n\nSee :doc:`/security/security_model` for the full security implications, deployment hardening\nguidance, and the planned strategic and tactical improvements.\n\n\nWorkload Isolation and Current Limitations\n------------------------------------------\n\nFor a detailed discussion of workload isolation protections, current limitations, and planned\nimprovements, see :ref:`workload-isolation`.\n\n\nConfiguration Reference\n------------------------\n\nAll JWT-related configuration parameters:\n\n.. list-table::\n   :header-rows: 1\n   :widths: 40 15 45\n\n   * - Parameter\n     - Default\n     - Description\n   * - ``[api_auth] jwt_secret``\n     - Auto-generated if missing\n     - Symmetric secret key for signing tokens. Must be the same across all components. Mutually exclusive with ``jwt_private_key_path``.\n   * - ``[api_auth] jwt_private_key_path``\n     - None\n     - Path to PEM-encoded private key (``RSA`` or ``Ed25519``). Mutually exclusive with ``jwt_secret``.\n   * - ``[api_auth] jwt_algorithm``\n     - ``GUESS``\n     - Signing algorithm. Auto-detected from key type: ``HS512`` for symmetric, ``RS256`` for ``RSA``, ``EdDSA`` for ``Ed25519``.\n   * - ``[api_auth] jwt_kid``\n     - Auto (``RFC 7638`` thumbprint)\n     - Key ID placed in token header. Ignored for symmetric keys.\n   * - ``[api_auth] jwt_issuer``\n     - None\n     - Issuer claim (``iss``). Recommended to be unique per deployment.\n   * - ``[api_auth] jwt_audience``\n     - None\n     - Audience claim (``aud``) for REST API tokens.\n   * - ``[api_auth] jwt_expiration_time``\n     - 86400 (24h)\n     - REST API token lifetime in seconds.\n   * - ``[api_auth] jwt_cli_expiration_time``\n     - 3600 (1h)\n     - CLI token lifetime in seconds.\n   * - ``[api_auth] jwt_leeway``\n     - 10\n     - Clock skew tolerance in seconds for token validation.\n   * - ``[api_auth] trusted_jwks_url``\n     - None\n     - JWKS endpoint URL or local file path for token validation. Mutually exclusive with ``jwt_secret``.\n   * - ``[execution_api] jwt_expiration_time``\n     - 600 (10 min)\n     - Execution API ``execution``-scoped token lifetime in seconds.\n   * - ``[scheduler] task_queued_timeout``\n     - 600.0 (10 min)\n     - Queue-starvation timeout. Also sets the ``workload``-scoped token lifetime to the same value.\n   * - ``[execution_api] jwt_audience``\n     - ``urn:airflow.apache.org:task``\n     - Audience claim for Execution API tokens.\n\n.. important::\n\n   Time synchronization across all Airflow components is critical. Use NTP (e.g., ``ntpd`` or\n   ``chrony``) to keep clocks in sync. Clock skew beyond the configured ``jwt_leeway`` will cause\n   authentication failures.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"14E4:40B0C:17D024:5DFBD2:6AB92A4E"},"text_sha256":"1fa903b364093d23079dd2a34f5beac0d469ecbb38f5200ef4a0aa53f334499f"},{"path":"airflow-core/docs/security/kerberos.rst","size":6664,"blob_sha":"6de9b65e161ff897efb86b7df868767ce1912d99","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nKerberos\n--------\n\nAirflow has initial support for Kerberos. This means that Airflow can renew Kerberos\ntickets for itself and store it in the ticket cache. The hooks and Dags can make use of ticket\nto authenticate against kerberized services.\n\nLimitations\n'''''''''''\n\nPlease note that at this time, not all hooks have been adjusted to make use of this functionality.\nAlso it does not integrate Kerberos into the web interface and you will have to rely on network\nlevel security for now to make sure your service remains secure.\n\nCelery integration has not been tried and tested yet. However, if you generate a key tab for every\nhost and launch a ticket renewer next to every worker it will most likely work.\n\nEnabling Kerberos\n'''''''''''''''''\n\nAirflow\n^^^^^^^\n\nTo enable Kerberos you will need to generate a (service) key tab.\n\n.. code-block:: bash\n\n    # in the kadmin.local or kadmin shell, create the airflow principal\n    kadmin:  addprinc -randkey airflow/fully.qualified.domain.name@YOUR-REALM.COM\n\n    # Create the Airflow keytab file that will contain the Airflow principal\n    kadmin:  xst -norandkey -k airflow.keytab airflow/fully.qualified.domain.name\n\nNow store this file in a location where the Airflow user can read it (chmod 600). And then add the following to\nyour ``airflow.cfg``\n\n.. code-block:: ini\n\n    [core]\n    security = kerberos\n\n    [kerberos]\n    keytab = /etc/airflow/airflow.keytab\n    reinit_frequency = 3600\n    principal = airflow\n\nIn case you are using Airflow in a docker container based environment,\nyou can set the below environment variables in the ``Dockerfile`` instead of modifying ``airflow.cfg``\n\n.. code-block:: dockerfile\n\n    ENV AIRFLOW__CORE__SECURITY kerberos\n    ENV AIRFLOW__KERBEROS__KEYTAB /etc/airflow/airflow.keytab\n    ENV AIRFLOW__KERBEROS__INCLUDE_IP False\n\n\nIf you need more granular options for your Kerberos ticket the following options are available with the following default values:\n\n.. code-block:: ini\n\n    [kerberos]\n    # Location of your ccache file once kinit has been performed\n    ccache = /tmp/airflow_krb5_ccache\n    # principal gets augmented with fqdn\n    principal = airflow\n    reinit_frequency = 3600\n    kinit_path = kinit\n    keytab = airflow.keytab\n\n    # Allow kerberos token to be flag forwardable or not\n    forwardable = True\n\n    # Allow to include or remove local IP from kerberos token.\n    # This is particularly useful if you use Airflow inside a VM NATted behind host system IP.\n    include_ip = True\n\n.. warning::\n\n    The default ``ccache`` location ``/tmp/airflow_krb5_ccache`` is in a world-readable directory on most\n    Unix systems, which means other local users on the same host could read or modify the Kerberos\n    credential cache and impersonate the Airflow service principal. In production deployments, point\n    ``ccache`` at a directory only the Airflow service account can access — for example a per-service\n    runtime directory like ``/run/airflow/krb5_ccache`` (or ``/var/lib/airflow/krb5_ccache``) created\n    with mode ``0700`` and owned by the Airflow user. Apply the same principle as the keytab, which\n    should already be ``chmod 600``.\n\nKeep in mind that Kerberos ticket are generated via ``kinit`` and will your use your local ``krb5.conf`` by default.\n\nLaunch the ticket renewer by\n\n.. code-block:: bash\n\n    # run ticket renewer\n    airflow kerberos\n\nTo support more advanced deployment models for using kerberos in standard or one-time fashion,\nyou can specify the mode while running the ``airflow kerberos`` by using the ``--one-time`` flag.\n\na) standard: The Airflow kerberos command will run endlessly. The ticket renewer process runs continuously every few seconds\nand refreshes the ticket if it has expired.\nb) one-time: The Airflow kerberos will run once and exit. In case of failure the main task won't spin up.\n\nThe default mode is standard.\n\nExample usages:\n\nFor standard mode:\n\n.. code-block:: bash\n\n    airflow kerberos\n\nFor one time mode:\n\n.. code-block:: bash\n\n    airflow kerberos --one-time\n\nHadoop\n^^^^^^\n\nIf want to use impersonation this needs to be enabled in ``core-site.xml`` of your hadoop config.\n\n.. code-block:: xml\n\n    <property>\n      <name>hadoop.proxyuser.airflow.groups<\/name>\n      <value>*<\/value>\n    <\/property>\n\n    <property>\n      <name>hadoop.proxyuser.airflow.users<\/name>\n      <value>*<\/value>\n    <\/property>\n\n    <property>\n      <name>hadoop.proxyuser.airflow.hosts<\/name>\n      <value>*<\/value>\n    <\/property>\n\nOf course if you need to tighten your security replace the asterisk with something more appropriate.\n\nUsing Kerberos authentication\n'''''''''''''''''''''''''''''\n\nThe Hive hook has been updated to take advantage of Kerberos authentication. To allow your Dags to\nuse it, simply update the connection details with, for example:\n\n.. code-block:: json\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\"}\n\nAdjust the principal to your settings. The ``_HOST`` part will be replaced by the fully qualified domain name of\nthe server.\n\nYou can specify if you would like to use the Dag owner as the user for the connection or the user specified in the login\nsection of the connection. For the login user, specify the following as extra:\n\n.. code-block:: json\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\", \"proxy_user\": \"login\"}\n\nFor the Dag owner use:\n\n.. code-block:: json\n\n    { \"use_beeline\": true, \"principal\": \"hive/_HOST@EXAMPLE.COM\", \"proxy_user\": \"owner\"}\n\nand in your Dag, when initializing the HiveOperator, specify:\n\n.. code-block:: bash\n\n    run_as_owner=True\n\nTo use kerberos authentication, you must install Airflow with the ``kerberos`` extras group:\n\n.. code-block:: bash\n\n   pip install 'apache-airflow[kerberos]'\n\nYou can read about some production aspects of Kerberos deployment at :ref:`production-deployment:kerberos`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADF8:2E8679:17BA8C:5DE3A2:6AB92A4C"},"text_sha256":"a4656638312e68c084bcda7c607e5c9807e9a9dc8abe21ec15dd199acacf03d3"},{"path":"airflow-core/docs/security/sbom.rst","size":1651,"blob_sha":"0f1d699368499702caa78af217d7a3d79c7241ad","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSBOM\n====\n\nSoftware Bill Of Materials (SBOM) files are critical assets used for transparency, providing a clear inventory of all the components\nused in Apache Airflow (name, version, supplier and transitive dependencies). They are an exhaustive representation\nof the software dependencies.\n\nThe general use case for such files is to help assess and manage risks. For instance a quick lookup against your SBOM files can help identify if a CVE (Common Vulnerabilities and Exposures) in a\nlibrary is affecting you.\n\nBy default, Apache Airflow SBOM files are generated for Airflow core with all providers. In the near future we aim at generating SBOM files per provider and also provide them for docker standard images.\n\nEach Airflow version has its own SBOM files, one for each supported python version.\nYou can find them `here <../sbom/>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CC8:2C474:17F5A8:5E2102:6AB92A4D"},"text_sha256":"9e23bcb6912cfc388f6fdc12e204fb3c1af6577148c860fb8d39d0a42ba52201"},{"path":"airflow-core/docs/security/secrets/fernet.rst","size":2567,"blob_sha":"341e2186bd377f08b4f0ecaeec0651cb6cc81110","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. _security/fernet:\n\nFernet\n------\n\nAirflow uses `Fernet <https://github.com/fernet/spec/>`__ to encrypt passwords in the connection\nconfiguration and the variable configuration. It guarantees that a password encrypted using it cannot be manipulated or read without the key.\nFernet is an implementation of symmetric (also known as \"secret key\") authenticated cryptography.\n\nThe first time Airflow is started, the ``airflow.cfg`` file is generated with the default configuration and the unique Fernet\nkey. The key is saved to option ``fernet_key`` of section ``[core]``.\n\nYou can also configure a fernet key using environment variables. This will overwrite the value from the\n``airflow.cfg`` file\n\n    .. code-block:: bash\n\n      # Note the double underscores\n      export AIRFLOW__CORE__FERNET_KEY=your_fernet_key\n\nGenerating Fernet key\n'''''''''''''''''''''\n\nIf you need to generate a new fernet key you can use the following code snippet.\n\n    .. code-block:: python\n\n      from cryptography.fernet import Fernet\n\n      fernet_key = Fernet.generate_key()\n      print(fernet_key.decode())  # your fernet_key, keep it in secured place!\n\n\nRotating encryption keys\n''''''''''''''''''''''''\n\nOnce connection credentials and variables have been encrypted using a fernet\nkey, changing the key will cause decryption of existing credentials to fail. To\nrotate the fernet key without invalidating existing encrypted values, prepend\nthe new key to the ``fernet_key`` setting, run\n``airflow rotate-fernet-key``, and then drop the original key from\n``fernet_key``:\n\n#. Set ``fernet_key`` to ``new_fernet_key,old_fernet_key``\n#. Run ``airflow rotate-fernet-key`` to re-encrypt existing credentials with the new fernet key\n#. Set ``fernet_key`` to ``new_fernet_key``\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6F04:3D40A:171DB5:5D48FF:6AB92A4F"},"text_sha256":"54b2def9e1468db7a5405a1ffd2ab8ae4ded6f11c645d07c0a3a68368555f603"},{"path":"airflow-core/docs/security/secrets/index.rst","size":1460,"blob_sha":"0db0e7a6ff621a9f3bacfc9a4e5b8fb23380c789","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSecrets\n========\n\nDuring Airflow operation, variables or configurations are used that contain particularly sensitive information.\nThis guide provides ways to protect this data.\n\nThe following are particularly protected:\n\n* Variables. See the :doc:`Variables Concepts <\/core-concepts/variables>` documentation for more information.\n* Connections. See the :doc:`Connections Concepts <\/authoring-and-scheduling/connections>` documentation for more information.\n\n\n.. toctree::\n    :maxdepth: 1\n    :glob:\n    :caption: Further reading:\n\n    Encryption at rest <fernet>\n    Using external Secret stores <secrets-backend/index>\n    mask-sensitive-values\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0FA:3FA0D:1777FD:5DA316:6AB92A4F"},"text_sha256":"9c7d25b9963d1fc3f4aa9fd6701e02ea897ecb1f9206d69ed5cc27ce0ddd4caf"},{"path":"airflow-core/docs/security/secrets/mask-sensitive-values.rst","size":4568,"blob_sha":"780aceb70fbc634422fe551289572c6fe062eaee","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. _security:mask-sensitive-values:\n\nMasking sensitive data\n----------------------\n\nAirflow will by default mask Connection passwords, sensitive Variables, and keys from a Connection's\nextra (JSON) field whose names contain one or more of the sensitive keywords when they appear in Task logs,\nin the Variables UI, and in the Rendered fields views of the UI. Keys in the extra JSON that do not include\nany of these sensitive keywords will not be redacted automatically.\n\nIt does this by looking for the specific *value* appearing anywhere in your output. This means that if you\nhave a connection with a password of ``a``, then every instance of the letter a in your logs will be replaced\nwith ``***``.\n\nTo disable masking you can set :ref:`config:core__hide_sensitive_var_conn_fields` to false.\n\nThe automatic masking is triggered by Connection or Variable access. This means that if you pass a sensitive\nvalue via XCom or any other side-channel it will not be masked when printed in the downstream task.\n\nSensitive field names\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nWhen masking is enabled, Airflow will always mask the password field of every Connection that is accessed by a\ntask.\n\nIt will also mask the value of an Airflow Variable, rendered template dictionaries, XCom dictionaries or the field of a Connection's extra JSON blob if the\nVariable name or field name contains any of the known-sensitive keywords.\n\n**Default Sensitive Keywords:**\n\n``access_token``, ``api_key``, ``apikey``, ``authorization``, ``passphrase``, ``passwd``, ``password``,\n``private_key``, ``secret``, ``token``, ``keyfile_dict``, ``service_account``.\n\nThis list can also be extended using the environment variable ``AIRFLOW__CORE__SENSITIVE_VAR_CONN_NAMES``:\n\n.. code-block:: ini\n\n    [core]\n    sensitive_var_conn_names = comma,separated,sensitive,names\n\n**Examples of Masking Behavior:**\n\n.. list-table::\n   :header-rows: 1\n   :widths: 20 25 20 35\n\n   * - Source\n     - Key / Variable Name\n     - Matching Keyword\n     - Masking Scope\n   * - Connection Extra\n     - google_keyfile_dict\n     - keyfile_dict\n     - Everywhere (Logs, Rendered Templates, UI)\n   * - Connection Extra\n     - hello\n     - None\n     - Not Masked\n   * - Variable\n     - service_account\n     - service_account\n     - Everywhere (Logs, Rendered Templates, UI)\n   * - Variable\n     - test_keyfile_dict\n     - keyfile_dict\n     - Variables UI Only\n\nAdding your own masks\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nIf you want to mask an additional secret that is not already masked by one of the above methods, you can do it in\nyour Dag file or operator's ``execute`` function using the ``mask_secret`` function. For example:\n\n.. code-block:: python\n\n    @task\n    def my_func():\n        from airflow.sdk.log import mask_secret\n\n        mask_secret(\"custom_value\")\n\n        ...\n\nor\n\n.. code-block:: python\n\n\n    class MyOperator(BaseOperator):\n        def execute(self, context):\n            from airflow.sdk.log import mask_secret\n\n            mask_secret(\"custom_value\")\n\n            ...\n\nThe mask must be set before any log/output is produced to have any effect.\n\nNOT masking when using environment variables\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nWhen you are using some operators - for example :class:`airflow.providers.cncf.kubernetes.operators.pod.KubernetesPodOperator`,\nyou might be tempted to pass secrets via environment variables. This is very bad practice because the environment\nvariables are visible to anyone who has access to see the environment of the process - such secrets passed by\nenvironment variables will NOT be masked by Airflow.\n\nIf you need to pass secrets to the KubernetesPodOperator, you should use native Kubernetes secrets or\nuse Airflow Connection or Variables to retrieve the secrets dynamically.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C380:372D9:17C344:5DEF88:6AB92A4C"},"text_sha256":"e2d7fa853dd93cae3b8cd8f061b9ae2c0ebb760ea11d2304167b8e5775ef516b"},{"path":"airflow-core/docs/security/secrets/secrets-backend/index.rst","size":7894,"blob_sha":"029dadcfb875aafbc15282a2939d85e9d3018357","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSecrets Backend\n---------------\n\n.. versionadded:: 1.10.10\n\nIn addition to retrieving connections & variables from environment variables or the metastore database, you\ncan also enable alternative secrets backend to retrieve Airflow connections or Airflow variables via\n:ref:`Apache Airflow Community provided backends <community_secret_backends>` in\n:doc:`apache-airflow-providers:core-extensions/secrets-backends`.\n\n.. note::\n\n    The Airflow UI only shows connections and variables stored in the Metadata DB and not via any other method.\n    If you use an alternative secrets backend, check inside your backend to view the values of your variables and connections.\n\nYou can also get Airflow configurations with sensitive data from the Secrets Backend.\nSee :doc:`/howto/set-config` for more details.\n\nSearch path\n^^^^^^^^^^^\nWhen looking up a connection/variable, by default Airflow will search environment variables first and metastore\ndatabase second.\n\nIf you enable an alternative secrets backend, it will be searched first, followed by environment variables,\nthen metastore.  This search ordering is not configurable. Though, in some alternative secrets backend you might have\nthe option to filter which connection/variable/config is searched in the secret backend. Please look at the\ndocumentation of the secret backend you are using to see if such option is available.\n\nOn the other hand, if a workers secrets backend is defined, the order of lookup has higher priority for the workers secrets\nbackend and then the secrets backend.\n\n.. warning::\n\n    When using environment variables or an alternative secrets backend to store secrets or variables, it is possible to create key collisions.\n    In the event of a duplicated key between backends, all write operations will update the value in the metastore, but all read operations will\n    return the first match for the requested key starting with the custom backend, then the environment variables and finally the metastore.\n\n.. _secrets_backend_configuration:\n\nConfiguration\n^^^^^^^^^^^^^\n\nThe ``[secrets]`` section has the following options:\n\n.. code-block:: ini\n\n    [secrets]\n    backend =\n    backend_kwargs =\n\nSet ``backend`` to the fully qualified class name of the backend you want to enable.\n\nYou can provide ``backend_kwargs`` with json and it will be passed as kwargs to the ``__init__`` method of\nyour secrets backend.\n\nIf you want to check which secret backend is currently set, you can use ``airflow config get-value secrets backend`` command as in\nthe example below.\n\n.. code-block:: bash\n\n    $ airflow config get-value secrets backend\n    airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend\n\nSetting individual backend kwargs\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nInstead of encoding all kwargs as a JSON blob, you can set each one as a separate environment\nvariable using the ``AIRFLOW__SECRETS__BACKEND_KWARG__<KEY>`` prefix:\n\n.. code-block:: bash\n\n    # These two are equivalent:\n    export AIRFLOW__SECRETS__BACKEND_KWARGS='{\"role_id\": \"abc\", \"secret_id\": \"xyz\"}'\n\n    # or individually (useful for K8s Secrets):\n    export AIRFLOW__SECRETS__BACKEND_KWARG__ROLE_ID=abc\n    export AIRFLOW__SECRETS__BACKEND_KWARG__SECRET_ID=xyz\n\nPer-key variables override the same key from ``BACKEND_KWARGS``. Values are raw strings\n(not JSON-parsed). For workers, use the\n``AIRFLOW__WORKERS__SECRETS_BACKEND_KWARG__<KEY>`` prefix.\n\n.. note::\n   These environment variables are masked in logs at startup, the same way\n   ``BACKEND_KWARGS`` is masked.\n\nWorker Specific Configuration\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe above section covers a general configuration option for all Airflow components. But with Airflow 3, if you want to\nconfigure separate secrets backend for workers, you can do that using:\n\n.. code-block:: ini\n\n    [workers]\n    secrets_backend =\n    secrets_backend_kwargs =\n\n\nSet ``secrets_backend`` to the fully qualified class name of the backend you want to enable.\n\nYou can provide ``secrets_backend_kwargs`` with json and it will be passed as kwargs to the ``__init__`` method of\nyour secrets backend for the workers.\n\nIf you want to check which secret backend is currently set, you can use ``airflow config get-value workers secrets_backend`` command as in\nthe example below.\n\n.. code-block:: bash\n\n    $ airflow config get-value workers secrets_backend\n    airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend\n\nSupported core backends\n^^^^^^^^^^^^^^^^^^^^^^^\n\n.. toctree::\n    :maxdepth: 1\n    :glob:\n\n    *\n\n.. _community_secret_backends:\n\nApache Airflow Community provided secret backends\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nApache Airflow Community also releases community developed providers (:doc:`apache-airflow-providers:index`)\nand some of them also provide handlers that extend secret backends\ncapability of Apache Airflow. You can see all those providers in\n:doc:`apache-airflow-providers:core-extensions/secrets-backends`.\n\n\n.. _roll_your_own_secrets_backend:\n\nRoll your own secrets backend\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nA secrets backend is a subclass of :py:class:`airflow.secrets.base_secrets.BaseSecretsBackend` and must implement either\n:py:meth:`~airflow.secrets.base_secrets.BaseSecretsBackend.get_connection` or :py:meth:`~airflow.secrets.base_secrets.BaseSecretsBackend.get_conn_value` for retrieving connections, :py:meth:`~airflow.secrets.base_secrets.BaseSecretsBackend.get_variable` for retrieving variables and :py:meth:`~airflow.secrets.base_secrets.BaseSecretsBackend.get_config` for retrieving Airflow configurations.\n\nAfter writing your backend class, provide the fully qualified class name in the ``backend`` key in the ``[secrets]``\nsection of ``airflow.cfg``.\n\nAdditional arguments to your SecretsBackend can be configured in ``airflow.cfg`` by supplying a JSON string to ``backend_kwargs``, which will be passed to the ``__init__`` of your SecretsBackend.\nSee :ref:`Configuration <secrets_backend_configuration>` for more details, and :ref:`SSM Parameter Store <ssm_parameter_store_secrets>` for an example.\n\n\nAdapt to non-Airflow compatible secret formats for connections\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe default implementation of Secret backend requires use of an Airflow-specific format of storing\nsecrets for connections. Currently most community provided implementations require the connections to\nbe stored as JSON or the Airflow Connection URI format (see\n:doc:`apache-airflow-providers:core-extensions/secrets-backends`). However, some organizations may need to store the credentials (passwords/tokens etc) in some other way. For example, if the same credentials store needs to be used for multiple data platforms, or if you are using a service with a built-in mechanism of rotating the credentials that does not work with the Airflow-specific format.\nIn this case you will need to roll your own secret backend as described in the previous chapter,\npossibly extending an existing secrets backend and adapting it to the scheme used by your organization.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2854:3E724:180018:5E2B2C:6AB92A50"},"text_sha256":"c831281cc53844a2039aaba09a3ebeaf994c0527bd188d10f1666fa63e7204ae"},{"path":"airflow-core/docs/security/secrets/secrets-backend/local-filesystem-secrets-backend.rst","size":5658,"blob_sha":"aaa71daf20af660ba502ff0c29def84cd5420cc6","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n.. _local_filesystem_secrets:\n\nLocal Filesystem Secrets Backend\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis backend is especially useful in the following use cases:\n\n* **Development**: It ensures data synchronization between all terminal windows (same as databases),\n  and at the same time the values are retained after database restart (same as environment variable)\n* **Kubernetes**: It allows you to store secrets in `Kubernetes Secrets <https://kubernetes.io/docs/concepts/configuration/secret/>`__\n  or you can synchronize values using the sidecar container and\n  `a shared volume <https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/>`__\n\nTo use variable and connection from local file, specify :py:class:`~airflow.secrets.local_filesystem.LocalFilesystemBackend`\nas the ``backend`` in  ``[secrets]`` section of ``airflow.cfg``.\n\nAvailable parameters to ``backend_kwargs``:\n\n* ``variables_file_path``: File location with variables data.\n* ``connections_file_path``: File location with connections data.\n\nHere is a sample configuration:\n\n.. code-block:: ini\n\n    [secrets]\n    backend = airflow.secrets.local_filesystem.LocalFilesystemBackend\n    backend_kwargs = {\"variables_file_path\": \"/files/var.json\", \"connections_file_path\": \"/files/conn.json\"}\n\n``JSON``, ``YAML`` and ``.env`` files are supported. All parameters are optional. If the file path is not passed,\nthe backend returns an empty collection.\n\nStoring and Retrieving Connections\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nIf you have set ``connections_file_path`` as ``/files/my_conn.json``, then the backend will read the\nfile ``/files/my_conn.json`` when it looks for connections.\n\nThe file can be defined in ``JSON``, ``YAML`` or ``env`` format. Depending on the format, the data should be saved as a URL or as a connection object.\nAny extra json parameters can be provided using keys like ``extra_dejson`` and ``extra``.\nThe key ``extra_dejson`` can be used to provide parameters as JSON object where as the key ``extra`` can be used in case of a JSON string.\nThe keys ``extra`` and ``extra_dejson`` are mutually exclusive.\n\nThe JSON file must contain an object where the key contains the connection ID and the value contains\nthe definition of one connection. The connection can be defined as a URI (string) or JSON object.\nFor a guide about defining a connection as a URI, see :ref:`generating_connection_uri`.\nFor a description of the connection object parameters see :class:`~airflow.models.connection.Connection`.\nThe following is a sample JSON file.\n\n.. code-block:: json\n\n    {\n        \"CONN_A\": \"mysql://host_a\",\n        \"CONN_B\": {\n            \"conn_type\": \"scheme\",\n            \"host\": \"host\",\n            \"schema\": \"schema\",\n            \"login\": \"Login\",\n            \"password\": \"None\",\n            \"port\": \"1234\"\n        }\n    }\n\nThe YAML file structure is similar to that of a JSON. The key-value pair of connection ID and the definitions of one or more connections.\nIn this format, the connection can be defined as a URI (string) or JSON object.\n\n.. code-block:: yaml\n\n    CONN_A: 'mysql://host_a'\n\n    CONN_B:\n      - 'mysql://host_a'\n      - 'mysql://host_b'\n\n    CONN_C:\n      conn_type: scheme\n      host: host\n      schema: lschema\n      login: Login\n      password: None\n      port: 1234\n      extra_dejson:\n        a: b\n        nestedblock_dict:\n          x: y\n\nYou can also define connections using a ``.env`` file. Then the key is the connection ID, and\nthe value should describe the connection using the URI. Connection ID should not be repeated, it will\nraise an exception. The following is a sample file.\n\n  .. code-block:: text\n\n    mysql_conn_id=mysql://log:password@13.1.21.1:3306/mysqldbrd\n    google_custom_key=google-cloud-platform://?key_path=%2Fkeys%2Fkey.json\n\nStoring and Retrieving Variables\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nIf you have set ``variables_file_path`` as ``/files/my_var.json``, then the backend will read the\nfile ``/files/my_var.json`` when it looks for variables.\n\nThe file can be defined in ``JSON``, ``YAML`` or ``env`` format.\n\nThe JSON file must contain an object where the key contains the variable key and the value contains\nthe variable value. The following is a sample JSON file.\n\n  .. code-block:: json\n\n    {\n        \"VAR_A\": \"some_value\",\n        \"var_b\": \"different_value\"\n    }\n\nThe YAML file structure is similar to that of JSON, with key containing the variable key and the value containing\nthe variable value. The following is a sample YAML file.\n\n  .. code-block:: yaml\n\n    VAR_A: some_value\n    VAR_B: different_value\n\nYou can also define variable using a ``.env`` file. Then the key is the variable key, and variable should\ndescribe the variable value. The following is a sample file.\n\n  .. code-block:: text\n\n    VAR_A=some_value\n    var_B=different_value\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F1A:3D40A:171DBE:5D4924:6AB92A4E"},"text_sha256":"a5f5004cd969c5a99afcb6a386224a1c492f72c9041bef03de79e8c7d859d261"},{"path":"airflow-core/docs/security/sql.rst","size":1676,"blob_sha":"b6b81d2180c21b3e2e5eae1fb5d64b1e1d983a81","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nSQL Injection\n=============\n\nPreviously, Airflow issued CVE like `CVE-2025-27018 SQL injection in MySQL provider core function <https://www.cve.org/CVERecord?id=CVE-2025-27018/>`_.\nThe CVE were about the ability to inject SQL without considering the actor performing it.\nAirflow will no longer issue CVE for cases of SQL Injection unless the reporter can demonstrate a scenario of exploitation.\nFor example, if in a security report the only actor that can operate the injection is Actor who has access to Dags folder the report will be rejected.\nWhen submitting a security report of SQL injection the reporter must explain who is the user that can utilize the injection and how the user gained access to be able to perform it.\nIn simple words, if a user has legit access to write and access the specific Dag, there is no risk that this user will do SQL injection.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C934:372D9:17C34E:5DEFA0:6AB92A4F"},"text_sha256":"d58ab831dd85dd8ab24bb124106d7e99cc9dd52585aa3741bfa490ead3cba0ee"},{"path":"airflow-core/docs/security/vulnerabilities-in-3rd-party-dependencies.rst","size":11947,"blob_sha":"6247a4032dfc0021e41ab7985ba424d9d29178a1","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nVulnerabilities in 3rd party dependencies\n=========================================\n\nHow users should treat 3rd-party dependencies with known CVEs\n-------------------------------------------------------------\n\nApache Airflow has a rather large number of dependencies, and we invest a lot of effort to keep Airflow updated\nto latest versions of those dependencies. We have automation, that checks for new versions of dependencies,\nand attempts to upgrade and test them automatically, we also have security scans that indicate if we have\nminimum versions of dependencies, that are not vulnerable to known, important, exploitable CVEs. Every\nversion of Airflow has a set of constraints - i.e. latest tested versions of dependencies, that\nare passing our tests and that we know allow to install Airflow and it's providers together.\n\nHowever, sometimes due to complex dependency trees or conflicting requirements, we are not\nalways able to upgrade and test dependencies to the latest versions. Sometimes we can only upgrade to newer\nversions of dependencies in the \"development\" branch - i.e. for the next \"MINOR\" version of Airflow,\nand we are not able to backport those upgrades to the latest released \"MINOR\" version of Airflow.\n\nThis means that sometimes we have to keep older versions of dependencies in the latest released \"MINOR\"\nversion of Airflow, even if those versions are vulnerable to some CVEs. Since Airflow is a volunteer-driven\nproject, we do not provide any guarantees that we will upgrade to dependencies that are CVE-free.\n\nContrary to a common belief, the presence of a CVE in a 3rd-party dependency does not automatically mean\nthat Airflow or your deployment - and we do not accept reports and issues stating that we **should upgrade**\nthose because they have a known CVE. We need to have a proof that the CVE is exploitable in Airflow\nand that it can be used to attack Airflow or your deployment and such proofs should be responsibly\ndisclosed to us, in private, following our `Security policy <https://github.com/apache/airflow/security/policy>`_.\nIf you have such proof, please share it with us and we will do our best to upgrade the dependency\nto a non-vulnerable version as soon as possible and back-port it to latest released minor version,\nfollowing our :doc:`releasing_security_patches` policy. We expect our commercial users who need to fulfill\ntheir obligation to manage and disclose CVEs in their environment to invest time and effort into\nresponsible disclosure, and investment of their security teams if they think Airflow is vulnerable to\nthird-party CVEs.\n\nThis general approach is described in the `Apache Software Foundation's approach <https://security.apache.org/report-dependency/>`_.\nThis document provides more detailed instructions that are specific to Apache Airflow.\n\nConstraints in released airflow versions\n----------------------------------------\n\nThe constraints we publish for released versions of Airflow are the latest tested versions of dependencies,\nthat we know worked with Airflow at the time of release. However, in many cases, if there are newer versions\nof those dependencies released later, they have a chance to work with Airflow as well, as we usually do not\nupper-bind those dependencies and you should be able to test and upgrade to newer versions even if the\nconstraint files have an earlier version of the dependency.\n\nWe almost never (except in very exceptional cases which do not allow users to use constraints to install\nairflow) update those constraint files after specific version of Airflow is released, and we do not re-publish\nAirflow reference container images with updated dependencies, so users are on their own to update selected\ndependencies if they want to, and test if they work with Airflow. What you can do in case your scans\nshow some CVEs that you need to update is described in :ref:`docker-stack:fixing-image-at-release-time`.\n\nThe easiest way to get latest, CVE-free dependencies is to upgrade to the latest released version\nof Airflow and keep doing it frequently as we release, this will make it overall easier for the users\nto handle the upgrade process when they do it incrementally and more often, rather than jump a number\nof versions at once.\n\nWhat you do if you detect a CVE in a 3rd-party dependency\n---------------------------------------------------------\n\nThere is a chance that you are using some scans that will show you CVE in a 3rd-party dependency that is\nused by Airflow and you would like to get rid of those. There are a few things you can do in such case:\n\n* First of all - resist an urge to open a public issue - especially if you have no idea if Airflow and your\n  deployment is impacted. Such issues will be usually closed with reference to this document and you\n  will be expected to follow it.\n\n* Similar to GitHub issues, do not open a PR that exposes details of a potential CVE or security vulnerability before it has been properly reviewed and responsibly disclosed to the security team, and explicitly approved by them to proceed with a fix PR according to their instructions.\n* Check if you can upgrade yourself to the newer version of dependency that is not vulnerable to the CVE, and\n  test if it works with Airflow. If it does, you can use it in your deployment even if the constraints for\n  your version of Airflow show an older version of the dependency. Feel free to start a public discussion (in\n  `GitHub Discussions <https://github.com/apache/airflow/discussions>`_ ) in \"Show and Tell\" section where\n  you will share it with others and encourage them to do the same if you successfully tested and upgraded the\n  dependency. That helps other community members to be more confident about upgrading and might make them\n  aware of some of 3rd-party vulnerabilities that they were not aware of.\n\n* In case your version of Airflow or some of it's providers, prevent you from upgrading to a non-vulnerable version of the\n  dependency, you can see if latest versions of Airflow or providers removed any limitations - you can check\n  constraint files and :doc:`sbom` we publish for all Airflow versions (industry-standard way of capturing\n  inventory of dependencies). If you see that you can upgrade, upgrade - ideally - to latest versions of\n  Airflow and providers, but if you cannot - upgrade to the latest version that allows you to upgrade the\n  dependency to a non-vulnerable version.  Again, if you successfully do it, please share your experience in\n  GitHub Discussions.\n\n* Check if the dependency that you have problem with is already upgraded in the ``main`` branch of Airflow -\n  `Main constraints <https://github.com/apache/airflow/tree/constraints-main>`_. If it is, this means that\n  the dependency will be upgraded in the next \"MINOR\" version of Airflow, and you can prepare for the upgrade\n  by testing the \"main\" branch with the newer version of the dependency, participate in the release candidate.\n  testing that is announced at airflow Dev list (see `Community page <https://airflow.apache.org/community/>`_\n  for instructions on how you can subscribe. Helping to test such release candidates and testing upgrade\n  process is by far the fastest way to speed up the process of releasing the next \"MINOR\" version of Airflow\n  with the non-vulnerable version of the dependency. Also contributing to such release in general is a\n  great way to give back to the community and help it to grow and speed up such release process. Also\n  check related changes and see if the change that allowed it is already back-ported to the latest released\n  \"MINOR\" version of Airflow and planned for the next \"PATCHLEVEL\" release (such PR will have future\n  \"PATCHLEVEL\" version assigned as milestone, and the dependency should be upgraded in the constraints file\n  for that version (For example 3.1.* versions has latest constraint files in the\n  `3-1 constraints <https://github.com/apache/airflow/tree/constraints-3-1>`_ ).\n\n* If such dependency change is not yet back-ported to the latest released \"MINOR\" version of Airflow, but you want\n  to help with it - we recommend you to open PR to the ``v3-N-test`` branch - it can usually be done following\n  the cherry-pick process described in the\n  `Developer documentation <https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x>`_\n  Note, that we never back-port things to older \"MINOR\" versions of Airflow, so if the commit is not\n  back-ported to the latest released \"MINOR\" version of Airflow, it will not be back-ported to any\n  older \"MINOR\" version of Airflow.\n\n* If you really want to upgrade to a non-vulnerable version of the dependency and cannot provide a Proof Of\n  Concept showing that Airflow is affected, and you cannot see it in latest versions of Airflow - you can\n  attempt to investigate the issue yourself and prepare a PR that will allow airflow to upgrade to the\n  new dependency. Avoid mentioning that the reason for the upgrade is a CVE, as we do not want to have public\n  discussions about CVEs that are not proven to be exploitable in Airflow. Instead, you can just say that you\n  want to upgrade to a newer version of the dependency and you want to share it with others in case\n  they want to do the same. This can be a contribution to Airflow or to the dependency or even to other\n  dependencies. Airflow contributors have a good tool that checks why specific dependency cannot be upgraded\n  and it provides a ``uv`` resolution track that you can analyse to understand which dependencies are\n  blocking the upgrade, you can start GitHub Discussions showing output of the tool and asking for help from\n  maintainers to explain you what needs to be done.\n\n  This is how to run the tool (you need to have ``uv`` installed, you can install it with ``pip install uv``):\n\n  .. code-block:: bash\n\n      git clone git@github.com:apache/airflow.git\n      cd airflow\n      ./scripts/tools/setup_breeze\n      breeze release-management constraints-version-check --python 3.10 --package PACKAGE_NAME --explain-why\n\n  Fragment of example output of such tool is shown below - indicating that ``apache-beam`` blocks upgrade of\n  ``grpcio`` package to version 1.56.0:\n\n  .. image:: ../img/checking_dependencies.png\n     :align: center\n     :alt: Output of uv tool for ``grpcio`` package upgradability status\n\n  Output of that tool is quite technical and is provided by the ``uv`` tool but it shows all the conflicts\n  that are preventing the upgrade of the dependency and it can be a good starting point to understand what needs\n  to be done to allow the upgrade. Sharing the output in GitHub Discussions can be a good way to get help\n  from maintainers and other contributors to understand what needs to be done.\n\n* When you have proofs that Airflow is impacted by the CVE (you need to understand what the issue is about and\n  understand how it can be exploited in Airflow and your deployment), you should prepare a Proof Of Concept (PoC)\n  showing how the CVE can be exploited, and share it with us in private, following our\n  `Security policy <https://github.com/apache/airflow/security/policy>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:18325C:5E5E72:6AB92A50"},"text_sha256":"3a7a98358b91087ad6832910ba292b3adfa60e15841c34976e8dbef191712d9d"},{"path":"airflow-core/docs/security/workload.rst","size":6662,"blob_sha":"8fee15db2bdcbc891143db144ad204e0541f8731","priority":2,"status":200,"text":" .. Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n ..   http://www.apache.org/licenses/LICENSE-2.0\n\n .. Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\nWorkload\n========\n\nThis topic describes how to configure Airflow to secure your workload.\n\nImpersonation\n-------------\n\nAirflow has the ability to impersonate a unix user while running task\ninstances based on the task's ``run_as_user`` parameter, which takes a user's name.\n\n**NOTE:** For impersonations to work, Airflow requires ``sudo`` as subtasks are run\nwith ``sudo -u`` and permissions of files are changed. Furthermore, the unix user\nneeds to exist on the worker. Here is what a simple sudoers file entry could look\nlike to achieve this, assuming Airflow is running as the ``airflow`` user. This means\nthe Airflow user must be trusted and treated the same way as the root user.\n\n.. code-block:: none\n\n    airflow ALL=(ALL) NOPASSWD: ALL\n\n\nSubtasks with impersonation will still log to the same folder, except that the files they\nlog to will have permissions changed such that only the unix user can write to it.\n\nDefault Impersonation\n'''''''''''''''''''''\nTo prevent tasks that don't use impersonation to be run with ``sudo`` privileges, you can set the\n``core:default_impersonation`` config which sets a default user impersonate if ``run_as_user`` is\nnot set.\n\n.. code-block:: ini\n\n    [core]\n    default_impersonation = airflow\n\n.. _workload-isolation:\n\nWorkload Isolation and Current Limitations\n------------------------------------------\n\nThis section describes the current state of workload isolation in Apache Airflow,\nincluding the protections that are in place, the known limitations, and planned improvements.\n\nFor the full security model and deployment hardening guidance, see :doc:`/security/security_model`.\nFor details on the JWT authentication flows used by workers and internal components, see\n:doc:`/security/jwt_token_authentication`.\n\nWorker process memory protection (Linux)\n''''''''''''''''''''''''''''''''''''''''\n\nOn Linux, the supervisor process calls ``prctl(PR_SET_DUMPABLE, 0)`` at the start of\n``supervise_task()`` before forking the task process. This flag is inherited by the forked\nchild. Marking processes as non-dumpable prevents same-UID sibling processes from reading\n``/proc/<pid>/mem``, ``/proc/<pid>/environ``, or ``/proc/<pid>/maps``, and blocks\n``ptrace(PTRACE_ATTACH)``. This is critical because each supervisor holds a distinct JWT\ntoken in memory — without this protection, a malicious task process running as the same\nUnix user could steal tokens from sibling supervisor processes.\n\nThis protection is one of the reasons that passing sensitive configuration via environment\nvariables is safer than via configuration files: environment variables are only readable\nby the process itself (and root), whereas configuration files on disk are readable by any\nprocess with filesystem access running as the same user.\n\n.. note::\n\n   This protection is Linux-specific. On non-Linux platforms, the\n   ``_make_process_nondumpable()`` call is a no-op. Deployment Managers running Airflow\n   on non-Linux platforms should implement alternative isolation measures.\n\nNo cross-workload isolation\n'''''''''''''''''''''''''''\n\nAll worker workloads authenticate to the same Execution API with tokens that share the\nsame signing key, audience, and issuer. While the ``ti:self`` scope enforcement prevents\na worker from accessing *another task instance's* specific endpoints (e.g., heartbeat,\nstate transitions), the token grants access to shared resources such as connections,\nvariables, and XComs that are not scoped to individual tasks.\n\nNo team-level isolation in Execution API (experimental multi-team feature)\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\nThe experimental multi-team feature (``[core] multi_team``) provides UI-level and REST\nAPI-level RBAC isolation between teams, but **does not yet guarantee task-level isolation**.\nAt the Execution API level, there is no enforcement of team-based access boundaries.\nA task from one team can access the same connections, variables, and XComs as a task from\nanother team. All workloads share the same JWT signing keys and audience regardless of team\nassignment.\n\nIn deployments where additional hardening measures are not implemented at the deployment\nlevel, a task from one team can potentially access resources belonging to another team\n(see :doc:`/security/security_model`). A deep understanding of configuration and deployment\nsecurity is required by Deployment Managers to configure it in a way that can guarantee\nseparation between teams. Task-level team isolation will be improved in future versions\nof Airflow.\n\nDag File Processor and Triggerer potentially bypass JWT and access the database\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\nAs described in :doc:`/security/jwt_token_authentication`, the default deployment runs a\nsingle Dag File Processor and a single Triggerer for all teams. Both potentially bypass\nJWT authentication via in-process transport. For multi-team isolation, Deployment Managers\nmust run separate instances per team, but even then, each instance potentially retains\ndirect database access. A Dag author whose code runs in these components can potentially\naccess the database directly — including data belonging to other teams or the JWT signing\nkey configuration — unless the Deployment Manager restricts the database credentials and\nconfiguration available to each instance.\n\nPlanned improvements\n''''''''''''''''''''\n\nFuture versions of Airflow will address these limitations with:\n\n- Finer-grained token scopes tied to specific resources (connections, variables) and teams.\n- Enforcement of team-based isolation in the Execution API.\n- Built-in support for per-team Dag File Processor and Triggerer instances.\n- Improved sandboxing of user-submitted code in the Dag File Processor and Triggerer.\n- Full task-level isolation for the multi-team feature.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:17EE8F:5E18E6:6AB92A4F"},"text_sha256":"322f31a86255788e3f889dc62bd62321986930de38b12530b5bd8da8d8f50b31"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=e0a1726aa586800ec65e2626b4d110b83ecc88fa; file=airflow-core/docs/privacy_notice.rst; text=specific language governing permissions and limitations under the License. Privacy Notice ============== The website follows the Privacy Policy of the Apache Software Foundation _.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}}}
{"repository":"TheAlgorithms/C-Plus-Plus","input_row":{"repository":"TheAlgorithms/C-Plus-Plus","url":"https://github.com/TheAlgorithms/C-Plus-Plus","name":"C-Plus-Plus","owner":"TheAlgorithms","description":"Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":34710,"issues":345,"created_at":"2016-07-16T10:19:45Z","updated_at":"2026-09-27T10:04:37Z","first_commit_at":"2016-07-16T10:19:46Z","last_commit_at":"2026-09-21T13:45:29Z","activity_months":122.18000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:17.149Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"TheAlgorithms/C-Plus-Plus","visibility":"public","created_at":"2016-07-16T10:19:45Z","updated_at":"2026-09-27T10:04:37Z","private":false,"fork":false,"archived":false,"stargazers_count":34710,"open_issues_count":21,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2668","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D8:7580A:17F785C:1C1A05F:6AB92A59"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2667","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:17F9AF6:1C1C34A:6AB92A59"},"commit":{"sha":"24794d8f0858e34783275808fa5f28e3ebbf8a53","url":"https://github.com/TheAlgorithms/C-Plus-Plus/commit/24794d8f0858e34783275808fa5f28e3ebbf8a53","date":"2018-05-18T20:58:32Z","author_date":"2018-05-18T20:58:32Z","committer_date":"2018-05-18T20:58:32Z","tree_sha":"6f5af5e4783c5780067c2dff2b0f0896643d4872","message_first_line":"Merge pull request #95 from Split174/Smallest-circle-problem"},"tree_request_status":200,"tree_rate":{"github_remaining":"2666","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17CA78F:1BECFD5:6AB92A59"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":463,"blob_sha":"e4ad41623d4695733b58fdb0a6477b61d7c67eb4","priority":0}],"documents":[{"path":"README.md","size":463,"blob_sha":"e4ad41623d4695733b58fdb0a6477b61d7c67eb4","priority":0,"status":200,"text":"# C++ \n\nThis repository contains some useful algorithms and data structures. \n\n### Contribute\n\nHow you can contribute? See this small guide.\n\n* Use the directory structure of the repository.\n* Please describe your pull requests. \n* Don't use **bits/stdc++.h** because this is quite Linux specific and slow down the compiler process.\n* Put in comments in your code.\n* Avoid **struct** uses instead the **class** keyword.\n* Add some test cases in the main-function.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0FD4:3C4A0:17B1A5:5DDE82:6AB92A59"},"text_sha256":"afa3e599a975d98ff4c74d659b212f61fbc1cf761adf1b1b99c2f8ec61791a6d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2665","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:181B9E7:1C3DE97:6AB92A5A"},"commit":{"sha":"b9c118fb5dca86f6325e816481959e1e6c360373","url":"https://github.com/TheAlgorithms/C-Plus-Plus/commit/b9c118fb5dca86f6325e816481959e1e6c360373","date":"2025-10-11T14:49:11Z","author_date":"2025-10-11T14:49:11Z","committer_date":"2025-10-11T14:49:11Z","tree_sha":"99a610a384209a1ba1366a8f2dfeaa9e4d85c9d1","message_first_line":"style: remove interaction with the user (#3009)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2664","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17C9F41:1BEB897:6AB92A5B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5566,"blob_sha":"c17b8d5a989a07350331009a9de78ff507739ec0","priority":0}],"documents":[{"path":"README.md","size":5566,"blob_sha":"c17b8d5a989a07350331009a9de78ff507739ec0","priority":0,"status":200,"text":"# The Algorithms - C++ # {#mainpage}\n\n<!-- the suffix in the above line is required for doxygen to consider this as the index page of the generated documentation site -->\n\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/TheAlgorithms/C-Plus-Plus)\n[![CodeQL CI](https://github.com/TheAlgorithms/C-Plus-Plus/actions/workflows/codeql.yml/badge.svg)](https://github.com/TheAlgorithms/C-Plus-Plus/actions/workflows/codeql.yml)\n[![Gitter chat](https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square)](https://gitter.im/TheAlgorithms)\n[![contributions welcome](https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md)\n![GitHub repo size](https://img.shields.io/github/repo-size/TheAlgorithms/C-Plus-Plus?color=red&style=flat-square)\n[![Doxygen CI](https://github.com/TheAlgorithms/C-Plus-Plus/workflows/Doxygen%20CI/badge.svg)](https://TheAlgorithms.github.io/C-Plus-Plus)\n[![Awesome CI](https://github.com/TheAlgorithms/C-Plus-Plus/workflows/Awesome%20CI%20Workflow/badge.svg)](https://github.com/TheAlgorithms/C-Plus-Plus/actions?query=workflow%3A%22Awesome+CI+Workflow%22)\n[![Income](https://img.shields.io/liberapay/receives/TheAlgorithms.svg?logo=liberapay)](https://liberapay.com/TheAlgorithms)\n[![Discord chat](https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=5865F2)](https://the-algorithms.com/discord/)\n[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/TheAlgorithms/donate)\n\n## Overview\n\nThis repository is a collection of open-source implementation of a variety of algorithms implemented in C++ and licensed under [MIT License](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/LICENSE). These algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and the associated documentation are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using a different algorithm strategies and optimizations.\n\n## Features\n\n- The repository provides implementations of various algorithms in one of the most fundamental general purpose languages - [C++](https://en.wikipedia.org/wiki/C%2B%2B).\n- Well documented source code with detailed explanations provide a valuable resource for educators and students alike.\n- Each source code is atomic using [STL classes](https://en.wikipedia.org/wiki/Standard_Template_Library) and _no external libraries_ are required for their compilation and execution. Thus, the fundamentals of the algorithms can be studied in much depth.\n- Source codes are [compiled and tested](https://github.com/TheAlgorithms/C-Plus-Plus/actions?query=workflow%3A%22Awesome+CI+Workflow%22) for every commit on the latest versions of three major operating systems viz., Windows, MacOS, and Ubuntu (Linux) using MSVC 19 2022, AppleClang 15.0.15, and GNU 13.3.0 respectively.\n- Strict adherence to [C++17](https://en.wikipedia.org/wiki/C%2B%2B17) standard ensures portability of code to embedded systems as well like [ESP32](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/cplusplus.html#c-language-standard), [ARM Cortex](https://developer.arm.com/documentation/101458/2404/Standards-support/Supported-C-C---standards-in-Arm-C-C---Compiler), etc. with little to no changes.\n- Self-checks within programs ensure correct implementations with confidence.\n- Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.\n\n## Documentation\n\n[Online Documentation](https://TheAlgorithms.github.io/C-Plus-Plus) is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary. The documentation also introduces interactive source code with links to documentation for C++ STL library functions used.\nClick on [Files menu](https://TheAlgorithms.github.io/C-Plus-Plus/files.html) to see the list of all the files documented with the code.\n\n[Documentation of Algorithms in C++](https://thealgorithms.github.io/C-Plus-Plus) by [The Algorithms Contributors](https://github.com/TheAlgorithms/C-Plus-Plus/graphs/contributors) is licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1)<br/>\n<a href=\"https://creativecommons.org/licenses/by-sa/4.0\"><img alt=\"Creative Commons License\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg\" /><img  alt=\"Credit must be given to the creator\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg\" /><img alt=\"Adaptations must be shared under the same terms\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/sa.svg\" /><\/a>\n\n## Contributions\n\nAs a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our [Contribution Guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CB20:326565:17AA20:5DD791:6AB92A5A"},"text_sha256":"7d6334cee6b6f35a36c4736d5c3fbda014508ff662d991dccb964c0b0bd97dfe"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dmlc/xgboost","input_row":{"repository":"dmlc/xgboost","url":"https://github.com/dmlc/xgboost","name":"xgboost","owner":"dmlc","description":"Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library,  for Python, R, Java, Scala, C and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":28796,"issues":5728,"created_at":"2014-02-06T17:28:03Z","updated_at":"2026-09-26T13:09:10Z","first_commit_at":"2014-02-06T17:28:03Z","last_commit_at":"2026-09-26T10:15:19Z","activity_months":151.59999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:19.796Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dmlc/xgboost","visibility":"public","created_at":"2014-02-06T17:28:03Z","updated_at":"2026-09-26T13:09:10Z","private":false,"fork":false,"archived":false,"stargazers_count":28796,"open_issues_count":442,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2663","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17C6DB8:1BE957B:6AB92A5B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2662","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:17FCAF6:1C1F6CF:6AB92A5C"},"commit":{"sha":"fc5072b1000294e9c10487f5f535b3aa4e2c50be","url":"https://github.com/dmlc/xgboost/commit/fc5072b1000294e9c10487f5f535b3aa4e2c50be","date":"2018-05-24T16:05:37Z","author_date":"2018-05-24T16:05:37Z","committer_date":"2018-05-24T16:05:37Z","tree_sha":"34fbe884d03a472a476dd31beb14b511c7e63e8e","message_first_line":"Fix building shared library. (#58)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2661","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:17F7B4C:1C1A3E5:6AB92A5C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2399,"blob_sha":"bdac35ab786a813dbb8b29b3ae32caf05291a05b","priority":0}],"documents":[{"path":"README.md","size":2399,"blob_sha":"bdac35ab786a813dbb8b29b3ae32caf05291a05b","priority":0,"status":200,"text":"# Rabit: Reliable Allreduce and Broadcast Interface\n[![Build Status](https://travis-ci.org/dmlc/rabit.svg?branch=master)](https://travis-ci.org/dmlc/rabit)\n[![Documentation Status](https://readthedocs.org/projects/rabit/badge/?version=latest)](http://rabit.readthedocs.org/)\n\nrabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction. The goal of rabit is to support ***portable*** , ***scalable*** and ***reliable*** distributed machine learning programs.\n\n* [Tutorial](guide)\n* [API Documentation](http://homes.cs.washington.edu/~tqchen/rabit/doc)\n* You can also directly read the [interface header](include/rabit.h)\n* [XGBoost](https://github.com/dmlc/xgboost)\n  - Rabit is one of the backbone library to support distributed XGBoost\n\n## Features\nAll these features comes from the facts about small rabbit:)\n* Portable: rabit is light weight and runs everywhere\n  - Rabit is a library instead of a framework, a program only needs to link the library to run\n  - Rabit only replies on a mechanism to start program, which was provided by most framework\n  - You can run rabit programs on many platforms, including Yarn(Hadoop), MPI using the same code\n* Scalable and Flexible: rabit runs fast\n  * Rabit program use Allreduce to communicate, and do not suffer the cost between iterations of MapReduce abstraction.\n  - Programs can call rabit functions in any order, as opposed to frameworks where callbacks are offered and called by the framework, i.e. inversion of control principle.\n  - Programs persist over all the iterations, unless they fail and recover.\n* Reliable: rabit dig burrows to avoid disasters\n  - Rabit programs can recover the model and results using synchronous function calls.\n\n## Use Rabit\n* Type make in the root folder will compile the rabit library in lib folder\n* Add lib to the library path and include to the include path of compiler\n* Languages: You can use rabit in C++ and python\n  - It is also possible to port the library to other languages\n\n## Contributing\nRabit is an open-source library, contributions are welcomed, including:\n* The rabit core library.\n* Customized tracker script for new platforms and interface of new languages.\n* Tutorial and examples about the library.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F000:09BF:B1596:2DE679:6AB92A5C"},"text_sha256":"f4c2f000912e1a6e5642bee6b9f2c91ea2d27b3f832831b09cc9d784e5d7504d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2660","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:17E1758:1C03FCA:6AB92A5D"},"commit":{"sha":"cfa442bbbf71261b7f841966b3eabf5db0a2eb25","url":"https://github.com/dmlc/xgboost/commit/cfa442bbbf71261b7f841966b3eabf5db0a2eb25","date":"2026-06-30T14:43:52Z","author_date":"2026-06-30T14:43:52Z","committer_date":"2026-06-30T14:43:52Z","tree_sha":"395ce36fc9444ba6cbd08017e3815916d3482470","message_first_line":"Bump the github-actions group with 3 updates (#12274)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2659","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:17F7C41:1C1A4F5:6AB92A5D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4577,"blob_sha":"d858923a6ff3b1eb032e340622c74af540a94e4a","priority":0},{"path":"doc/security.rst","size":3564,"blob_sha":"9452a1f00b39fe0ac999d39877216793236a00a9","priority":1},{"path":"doc/tutorials/privacy_preserving.rst","size":4140,"blob_sha":"132861f7c5b3c00e33f03e70a60bec0f3ae9aba2","priority":1},{"path":"SECURITY.md","size":114,"blob_sha":"7228499367969db1ad250569acc1458f6fae4db4","priority":1}],"documents":[{"path":"README.md","size":4577,"blob_sha":"d858923a6ff3b1eb032e340622c74af540a94e4a","priority":0,"status":200,"text":"<img src=\"https://xgboost.ai/images/logo/xgboost-logo-trimmed.png\" width=200/> eXtreme Gradient Boosting\n===========\n\n[![XGBoost-CI](https://github.com/dmlc/xgboost/workflows/XGBoost%20CI/badge.svg?branch=master)](https://github.com/dmlc/xgboost/actions)\n[![Documentation Status](https://readthedocs.org/projects/xgboost/badge/?version=latest)](https://xgboost.readthedocs.org)\n[![GitHub license](https://dmlc.github.io/img/apache2.svg)](./LICENSE)\n[![CRAN Status Badge](https://www.r-pkg.org/badges/version/xgboost)](https://cran.r-project.org/web/packages/xgboost)\n[![PyPI version](https://badge.fury.io/py/xgboost.svg)](https://pypi.python.org/pypi/xgboost/)\n[![Conda version](https://img.shields.io/conda/vn/conda-forge/py-xgboost.svg)](https://anaconda.org/conda-forge/py-xgboost)\n[![Optuna](https://img.shields.io/badge/Optuna-integrated-blue)](https://optuna.org)\n[![Twitter](https://img.shields.io/badge/@XGBoostProject--_.svg?style=social&logo=twitter)](https://twitter.com/XGBoostProject)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/dmlc/xgboost/badge)](https://api.securityscorecards.dev/projects/github.com/dmlc/xgboost)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/comet-ml/comet-examples/blob/master/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb)\n\n[Community](https://xgboost.ai/community) |\n[Documentation](https://xgboost.readthedocs.org) |\n[Resources](demo/README.md) |\n[Contributors](CONTRIBUTORS.md) |\n[Release Notes](https://xgboost.readthedocs.io/en/latest/changes/index.html)\n\nXGBoost is an optimized distributed gradient boosting library designed to be highly ***efficient***, ***flexible*** and ***portable***.\nIt implements machine learning algorithms under the [Gradient Boosting](https://en.wikipedia.org/wiki/Gradient_boosting) framework.\nXGBoost provides a parallel tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.\nThe same code runs on major distributed environment (Kubernetes, Hadoop, SGE, Dask, Spark, PySpark) and can solve problems beyond billions of examples.\n\nLicense\n-------\n© Contributors, 2021. Licensed under an [Apache-2](https://github.com/dmlc/xgboost/blob/master/LICENSE) license.\n\nContribute to XGBoost\n---------------------\nXGBoost has been developed and used by a group of active community members. Your help is very valuable to make the package better for everyone.\nCheckout the [Community Page](https://xgboost.ai/community).\n\nReference\n---------\n- Tianqi Chen and Carlos Guestrin. [XGBoost: A Scalable Tree Boosting System](https://arxiv.org/abs/1603.02754). In 22nd SIGKDD Conference on Knowledge Discovery and Data Mining, 2016\n- XGBoost originates from research project at University of Washington.\n\nSponsors\n--------\nBecome a sponsor and get a logo here. See details at [Sponsoring the XGBoost Project](https://xgboost.ai/sponsors). The funds are used to defray the cost of continuous integration and testing infrastructure (https://xgboost-ci.net).\n\n## Open Source Collective sponsors\n[![Backers on Open Collective](https://opencollective.com/xgboost/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/xgboost/sponsors/badge.svg)](#sponsors)\n\n### Sponsors\n[[Become a sponsor](https://opencollective.com/xgboost#sponsor)]\n\n<a href=\"https://www.nvidia.com/en-us/\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/xgboost-ai/xgboost-ai.github.io/master/images/sponsors/nvidia.jpg\" alt=\"NVIDIA\" width=\"72\" height=\"72\"><\/a>\n<a href=\"https://www.comet.com/site/?utm_source=xgboost&utm_medium=github&utm_content=readme\" target=\"_blank\"><img src=\"https://cdn.comet.ml/img/notebook_logo.png\" height=\"72\"><\/a>\n<a href=\"https://opencollective.com/tomislav1\" target=\"_blank\"><img src=\"https://images.opencollective.com/tomislav1/avatar/256.png\" height=\"72\"><\/a>\n<a href=\"https://databento.com/?utm_source=xgboost&utm_medium=sponsor&utm_content=display\"><img src=\"https://raw.githubusercontent.com/xgboost-ai/xgboost-ai.github.io/refs/heads/master/images/sponsors/databento.png\" height=\"72\"><\/a>\n<a href=\"https://www.intel.com/\" target=\"_blank\"><img src=\"https://images.opencollective.com/intel-corporation/2fa85c1/logo/256.png\" width=\"72\" height=\"72\"><\/a>\n\n### Backers\n[[Become a backer](https://opencollective.com/xgboost#backer)]\n\n<a href=\"https://opencollective.com/xgboost#backers\" target=\"_blank\"><img src=\"https://opencollective.com/xgboost/backers.svg?width=890\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2302:3B1F3:184810:5E7603:6AB92A5E"},"text_sha256":"6a1a58eb8c2509a43bc4a605ba448b977d67ca1d359898fcb55c4915fe930c8d"},{"path":"doc/security.rst","size":3564,"blob_sha":"9452a1f00b39fe0ac999d39877216793236a00a9","priority":1,"status":200,"text":"###################\nSecurity disclosure\n###################\n\n********************\nUse of Python pickle\n********************\n\nWe use ``pickle`` and ``cloudpickle`` in several places, including a convenient helper function for the ``broadcast`` collective operation to share a Python object. The ``broadcast`` method is not used internally during training but is here to assist with implementing custom metrics. Also, a distributed interface like PySpark might use pickle to transfer Python objects, like the callback functions. Many security scanners will point out the use of pickle as unsafe.\n\nXGBoost as a machine learning library is not designed to protect against pickle data from an untrusted source. Please use appropriate protection mechanisms to ensure that no one can control your network environment and tamper with the pickle data sent between XGBoost workers or the Spark executors. For example, cloud vendors provide managed solutions for running XGBoost in isolated network environments. As for all Python pickles in general, read the warning in the `pickle document <https://docs.python.org/3/library/pickle.html>`__.\n\nSuggestion:\n\n* Do not load pickle files from an unknown source.\n* Use secured network for distributed training.\n\n***********************************************************\nThe lack of authentication in the collective implementation\n***********************************************************\n\nXGBoost uses TCP sockets for communication between workers during distributed model training. XGBoost is a numeric computation library; the collective module in intended for high-performance numeric operations (allreduce, allgather, etc.). For performance reasons, we decided that the collective module will NOT support TLS authentication or encryption.\n\nSuggestion:\n\n* Use secured network for distributed training.\n\n***************************************************\nThe lack of sanitizing for inputs, including models\n***************************************************\n\nIf someone can manipulate XGBoost inputs, whether with an incorrect model or an altered numpy array, XGBoost will crash due to a memory read error (out-of-bounds access). The reports we received describe manipulating the JSON files to mislead XGBoost into reading out-of-bounds values or using conflicting tree indices. We acknowledge that we can add stronger sanitization to the JSON parser when loading from a file. However, it is currently impractical for us to comprehensively validate all potential issues in a supplied model file. Instead, deployments are expected to rely on standard operating-system–level protections. Examples of non-sanitized inputs:\n\n- Manipulated leaf index in a tree model.\n- Manipulated length in a UBJSON model.\n\nSuggestions:\n\n* For most users, this should not cause a security issue. Your Python program might crash when loading a manipulated JSON model file.\n* Test the model in an isolated environment before loading it in a critical environment.\n\n***************\nSecurity Policy\n***************\n\n==================\nSupported Versions\n==================\n\nOnly the latest XGBoost release is supported.\n\n=========================\nReporting a Vulnerability\n=========================\n\nTo report a security issue, please email security@xgboost-ci.net with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue.\n\nAll support will be made on the best effort base, so please indicate the \"urgency level\" of the vulnerability as Critical, High, Medium or Low.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4222:2C474:17F66D:5E2390:6AB92A5E"},"text_sha256":"ec03ace7b14dcf3b1c07773c1fabce9faac56ab9e7dca1ac0d9a2d79f1cd48de"},{"path":"doc/tutorials/privacy_preserving.rst","size":4140,"blob_sha":"132861f7c5b3c00e33f03e70a60bec0f3ae9aba2","priority":1,"status":200,"text":"#############################################\nPrivacy Preserving Inference with Concrete ML\n#############################################\n\n`Concrete ML`_ is a specialized library developed by Zama that allows the execution of machine learning models on encrypted data through `Fully Homomorphic Encryption (FHE) <https://www.youtube.com/watch?v=FFox2S4uqEo>`_, thereby preserving data privacy.\n\nTo use models such as XGBClassifier, use the following import:\n\n.. code:: python\n\n  from concrete.ml.sklearn import XGBClassifier\n\n***************************************\nPerforming Privacy Preserving Inference\n***************************************\n\nInitialization of a XGBClassifier can be done as follows:\n\n.. code:: python\n\n  classifier = XGBClassifier(n_bits=6, [other_hyperparameters])\n\n\nwhere ``n_bits`` determines the precision of the input features. Note that a higher value of ``n_bits`` increases the precision of the input features and possibly the final model accuracy but also ends up with longer FHE execution time.\n\nOther hyper-parameters that exist in xgboost library can be used.\n\n******************************\nModel Training and Compilation\n******************************\n\nAs commonly used in scikit-learn like models, it can be trained with the .fit() method.\n\n.. code:: python\n\n  classifier.fit(X_train, y_train)\n\nAfter training, the model can be compiled with a calibration dataset, potentially a subset of the training data:\n\n.. code:: python\n\n  classifier.compile(X_calibrate)\n\nThis calibration dataset, ``X_calibrate``, is used in Concrete ML compute the precision (bit-width) of each intermediate value in the model. This is a necessary step to optimize the equivalent FHE circuit.\n\n****************************\nFHE Simulation and Execution\n****************************\n\nTo verify model accuracy in encrypted computations, you can run an FHE simulation:\n\n.. code:: python\n\n  predictions = classifier.predict(X_test, fhe=\"simulate\")\n\nThis simulation can be used to evaluate the model. The resulting accuracy of this simulation step is representative of the actual FHE execution without having to pay the cost of an actual FHE execution. \n\nWhen the model is ready, actual Fully Homomorphic Encryption execution can be performed:\n\n.. code:: python\n\n  predictions = classifier.predict(X_test, fhe=\"execute\")\n\n\nNote that using FHE=\"execute\" is a convenient way to assess the model in FHE, but for real deployment, functions to encrypt (on the client), run in FHE (on the server), and finally decrypt (on the client) have to be used for end-to-end privacy-preserving inferences.\n\nConcrete ML provides a deployment API to facilitate this process, ensuring end-to-end privacy.\n\nTo go further in the deployment API you can read:\n\n- the `deployment documentation <https://docs.zama.ai/concrete-ml/advanced-topics/client_server>`_\n- the `deployment notebook <https://github.com/zama-ai/concrete-ml/blob/17779ca571d20b001caff5792eb11e76fe2c19ba/docs/advanced_examples/ClientServer.ipynb>`_\n\n*******************************\nParameter Tuning in Concrete ML\n*******************************\n\nConcrete ML is compatible with standard scikit-learn pipelines such as GridSearchCV or any other hyper-parameter tuning techniques.\n\n******************\nExamples and Demos\n******************\n\n- `Sentiment analysis (based on transformers + xgboost) <https://huggingface.co/spaces/zama-fhe/encrypted_sentiment_analysis>`_\n- `XGBoost Classifier <https://github.com/zama-ai/concrete-ml/blob/6966c84b9698d5418209b346900f81d1270c64bd/docs/advanced_examples/XGBClassifier.ipynb>`_\n- `XGBoost Regressor <https://github.com/zama-ai/concrete-ml/blob/6966c84b9698d5418209b346900f81d1270c64bd/docs/advanced_examples/XGBRegressor.ipynb>`_\n\n**********\nConclusion\n**********\n\nConcrete ML provides a framework for executing privacy-preserving inferences by leveraging Fully Homomorphic Encryption, allowing secure and private computations on encrypted data.\n\nMore information and examples are given in the `Concrete ML documentation`_.\n\n.. _Concrete ML: https://github.com/zama-ai/concrete-ml\n.. _`Concrete ML documentation`: https://docs.zama.ai/concrete-ml","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"926C:3CC8A:17C9EE:5DF787:6AB92A5B"},"text_sha256":"740a1f41d828297af389b694491fbdb20cc402ae4963095ea0477904d7eaebe2"},{"path":"SECURITY.md","size":114,"blob_sha":"7228499367969db1ad250569acc1458f6fae4db4","priority":1,"status":200,"text":"# Security Policy\n\nSee https://xgboost.readthedocs.build/en/latest/security.html for the current security policy.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7AFC:2C474:17F67A:5E23A5:6AB92A5E"},"text_sha256":"5d6dccc37ac61c6d5c71df3031e715ba2f42cb2cb40320a125384df03625965e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=cfa442bbbf71261b7f841966b3eabf5db0a2eb25; file=doc/tutorials/privacy_preserving.rst; text=############################################# Privacy Preserving Inference with Concrete ML ############################################# Concrete ML _ is a specialized library developed by Zama that allows the execution of machine learning models on encrypted data through Fully Homomorphic Encryption (FHE) _, thereby preserving data privacy.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=cfa442bbbf71261b7f841966b3eabf5db0a2eb25; file=doc/tutorials/privacy_preserving.rst; text=############################################# Privacy Preserving Inference with Concrete ML ############################################# Concrete ML _ is a specialized library developed by Zama that allows the execution of machine learning models on encrypted data through Fully Homomorphic Encryption (FHE) _, thereby preserving data privacy."}}}}
{"repository":"TheAlgorithms/C","input_row":{"repository":"TheAlgorithms/C","url":"https://github.com/TheAlgorithms/C","name":"C","owner":"TheAlgorithms","description":"Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.","language":"C","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":22485,"issues":163,"created_at":"2016-07-16T10:17:03Z","updated_at":"2026-09-27T11:49:05Z","first_commit_at":"2016-07-16T10:17:03Z","last_commit_at":"2023-09-27T18:35:39Z","activity_months":86.379999999999995,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:23.535Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"TheAlgorithms/C","visibility":"public","created_at":"2016-07-16T10:17:03Z","updated_at":"2026-09-27T11:49:05Z","private":false,"fork":false,"archived":false,"stargazers_count":22485,"open_issues_count":22,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2658","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:179803C:1BB9FCF:6AB92A5F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2657","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:182D510:1C4F963:6AB92A5F"},"commit":{"sha":"6c5128e2cdc410afa32afbb6ba45b02e928a468a","url":"https://github.com/TheAlgorithms/C/commit/6c5128e2cdc410afa32afbb6ba45b02e928a468a","date":"2018-03-28T16:11:54Z","author_date":"2018-03-28T16:11:54Z","committer_date":"2018-03-28T16:11:54Z","tree_sha":"a5dca622b51ddcce8765545f7920af32ea0338e2","message_first_line":"improved code"},"tree_request_status":200,"tree_rate":{"github_remaining":"2656","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:1801DA2:1C2495E:6AB92A60"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1118,"blob_sha":"fcc41876a60de6fb2c3d9c277cb7ebd16d54e83b","priority":0}],"documents":[{"path":"README.md","size":1118,"blob_sha":"fcc41876a60de6fb2c3d9c277cb7ebd16d54e83b","priority":0,"status":200,"text":"# C\n\n## Computer Oriented Statistical Methods\n\t- Gauss_Elimination\n\t- Lagrange_Theorem\n\t- Mean\n\t- Median\n\t- Seidal\n\t- Simpson's_1-3rd_rule.c\n\t- Variance\n\t- statistic (C Lib)\n\n## Conversions\n\t- binary_to_decimal\n\t- decimal _to_binary\n\t- decimal_to_hexa\n\t- decimal_to_octal\n\t- to_decimal\n\n## Data Structures\n\t- stack\n\t- queue\n\t- dictionary\n\tlinked_list\n\t\t- singly_link_list_deletion\n\t\t- stack_using_linkedlists\n\tbinary_trees\n\t\t- create_node\n\t\t- recursive_traversals\n\ttrie\n\t\t- trie\n\n\n## Searching\n\t- Binary_Search\n\t- Other_Binary_Search\n\t- Jump_Search\n\n\n## Sorting\n\t- binary_insertion_sort\n\t- BubbleSort\n\t- BogoSort\n\t- InsertionSort\n\t- mergesort\n\t- OtherBubbleSort\n\t- QuickSort\n\t- SelectionSort\n\t- shaker_sort\n\t- HeapSort\n\t\n## Hashing\n\t- sdbm\n\t- djb2\n\t- xor8 (8 bit)\n\t- adler_32 (32 bit)\n\n\n## Misc\n\t- Binning\n\t- Factorial\n\t- Fibonacci\n\t- isArmstrong\n\t- LongestSubSequence\n\t- palindrome\n\t- QUARTILE\n\t- rselect\n\t- strongNumber\n\t- TowerOfHanoi\n\t- Greatest Common Divisor\n\t- Sudoku Solver\n\n\n## exercism\nIn this directory you will find (in the right order):\n* hello-world\n* isogram\n* acronym\n* word-count\n* rna-transcription\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B6DE:3AC5A:17E35E:5E1088:6AB92A60"},"text_sha256":"e43f4445742a8fa4ec1419b93008436965c00cf972b8d063d7cb829080d0d55b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2655","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:17A4857:1BC6FF8:6AB92A61"},"commit":{"sha":"e5dad3fa8def3726ec850ca66a7f51521f8ad393","url":"https://github.com/TheAlgorithms/C/commit/e5dad3fa8def3726ec850ca66a7f51521f8ad393","date":"2023-09-27T18:35:39Z","author_date":"2023-09-27T18:35:39Z","committer_date":"2023-09-27T18:35:39Z","tree_sha":"4b7bb917f4100f58a40dae5086cc2a6cc7b15a1f","message_first_line":"feat: use directory workflow from the `scripts` repository (#1278)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2654","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:17F621C:1C18379:6AB92A61"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5064,"blob_sha":"9670d2bb077b8d683c79438734d981f2d97c59d8","priority":0}],"documents":[{"path":"README.md","size":5064,"blob_sha":"9670d2bb077b8d683c79438734d981f2d97c59d8","priority":0,"status":200,"text":"# The Algorithms - C # {#mainpage}\n<!-- the suffix in the above line is required for doxygen to consider this as the index page of the generated documentation site -->\n\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/TheAlgorithms/C)\n[![CodeQL CI](https://github.com/TheAlgorithms/C/actions/workflows/codeql.yml/badge.svg)](https://github.com/TheAlgorithms/C/actions/workflows/codeql_analysis.yml)\n[![Gitter chat](https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square)](https://gitter.im/TheAlgorithms)\n[![contributions welcome](https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md)\n![GitHub repo size](https://img.shields.io/github/repo-size/TheAlgorithms/C?color=red&style=flat-square)\n[![Doxygen CI](https://github.com/TheAlgorithms/C/workflows/Doxygen%20CI/badge.svg)](https://TheAlgorithms.github.io/C)\n[![Awesome CI](https://github.com/TheAlgorithms/C/workflows/Awesome%20CI%20Workflow/badge.svg)](https://github.com/TheAlgorithms/C/actions?query=workflow%3A%22Awesome+CI+Workflow%22)\n[![Income](https://img.shields.io/liberapay/receives/TheAlgorithms.svg?logo=liberapay)](https://liberapay.com/TheAlgorithms)\n[![Discord chat](https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=5865F2)](https://the-algorithms.com/discord/)\n[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/TheAlgorithms/donate)\n\n## Overview\n\nThe repository is a collection of open-source implementations of a variety of algorithms implemented in C and licensed under [GPLv3 License](https://github.com/TheAlgorithms/C/blob/master/LICENSE). The algorithms span a variety of topics from computer science, mathematics and statistics, data science, machine learning, engineering, etc.. The implementations and their associated documentations are meant to provide a learning resource for educators and students. Hence, one may find more than one implementation for the same objective but using different algorithm strategies and optimizations.\n\n## Features\n\n* The repository provides implementations of various algorithms in one of the most fundamental general purpose languages - [C](https://en.wikipedia.org/wiki/C_(programming_language)).\n* Well documented source code with detailed explanations provide a valuable resource for educators and students alike.\n* Each source code is atomic using standard C library [`libc`](https://en.wikipedia.org/wiki/C_standard_library) and _no external libraries_ are required for their compilation and execution. Thus the fundamentals of the algorithms can be studied in much depth.\n* Source codes are [compiled and tested](https://github.com/TheAlgorithms/C/actions?query=workflow%3A%22Awesome+CI+Workflow%22) for every commit on the latest versions of two major operating systems viz., MacOS and Ubuntu (Linux) using AppleClang 14.0.0 and GNU 11.3.0 respectively.\n* Strict adherence to [C11](https://en.wikipedia.org/wiki/C11_(C_standard_revision)) standard ensures portability of code to embedded systems as well like ESP32, ARM Cortex, etc. with little to no changes.\n* Self-checks within programs ensure correct implementations with confidence.\n* Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.\n\n## Documentation\n\n[Online Documentation](https://TheAlgorithms.github.io/C) is generated from the repository source codes directly. The documentation contains all resources including source code snippets, details on execution of the programs, diagrammatic representation of program flow, and links to external resources where necessary.\nClick on [Files menu](https://TheAlgorithms.github.io/C/files.html) to see the list of all the files documented with the code.\n\n[Documentation of Algorithms in C](https://thealgorithms.github.io/C) by [The Algorithms Contributors](https://github.com/TheAlgorithms/C/graphs/contributors) is licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1)<br/>\n<a href=\"https://creativecommons.org/licenses/by-sa/4.0\"><img alt=\"Creative Commons License\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg\" /><img  alt=\"Credit must be given to the creator\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg\" /><img alt=\"Adaptations must be shared under the same terms\" style=\"height:22px!important;margin-left: 3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/sa.svg\" /><\/a>\n\n## Contributions\n\nAs a community developed and maintained repository, we welcome new un-plagiarized quality contributions. Please read our [Contribution Guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"25DA:3D501:1848A2:5E7693:6AB92A61"},"text_sha256":"3f1fee2d6c08492a2a62e760b365ea8ea1d9d56d32425d10daba8692636e6aeb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"k4yt3x/video2x","input_row":{"repository":"k4yt3x/video2x","url":"https://github.com/k4yt3x/video2x","name":"video2x","owner":"k4yt3x","description":"A machine learning-based video super resolution and frame interpolation framework. Est. Hack the Valley II, 2018.","language":"C++","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":21807,"issues":1281,"created_at":"2018-02-24T16:34:41Z","updated_at":"2026-09-27T14:10:13Z","first_commit_at":"2018-02-24T16:34:41Z","last_commit_at":"2026-03-07T00:00:00Z","activity_months":96.329999999999998,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:27.033Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"k4yt3x/video2x","visibility":"public","created_at":"2018-02-24T16:34:41Z","updated_at":"2026-09-27T14:10:13Z","private":false,"fork":false,"archived":false,"stargazers_count":21807,"open_issues_count":133,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"2653","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:185B1F6:1C7DD3A:6AB92A63"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2652","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:180D80C:1C30037:6AB92A63"},"commit":{"sha":"1429ae1fb29476a190c67a0432b44bdd3a98f1d8","url":"https://github.com/k4yt3x/video2x/commit/1429ae1fb29476a190c67a0432b44bdd3a98f1d8","date":"2018-05-19T22:24:31Z","author_date":"2018-05-19T22:24:31Z","committer_date":"2018-05-19T22:24:31Z","tree_sha":"ec18d417ea4c968c5eb14185ad37baa08ca627a0","message_first_line":"v2.0.1: fixed audio insertion issues"},"tree_request_status":200,"tree_rate":{"github_remaining":"2651","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:17EBC11:1C0E6AD:6AB92A63"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2281,"blob_sha":"b6d66ff55a5919369d694a7f78d863fd237ec839","priority":0}],"documents":[{"path":"README.md","size":2281,"blob_sha":"b6d66ff55a5919369d694a7f78d863fd237ec839","priority":0,"status":200,"text":"# Video2X Video Enlarger\n\n**Current Version: 2.0 beta**\n\n## 2.0 Beta Changes\n1. Fixed contents meant for demonstration\n1. Fixed audio issues\n1. Better CUI\n1. Now using absolute path for every file\n1. Added progress bar for showing waifu2x enlarging progress\n\n## Description\n\nVideo2X is an automation software based on waifu2x image enlarging engine. It extracts frames from a video, enlarge it by a number of times without losing any details or quality, keeping lines smooth and edges sharp.\n\nFor short: **Video2X enlarges your video without losing details**\n\nWatch for the sharper edges in this screenshot around the shadows:\n![snapshot](https://user-images.githubusercontent.com/18014964/36638068-19cdb78c-19b8-11e8-8dfb-406b7015d30c.png)\n\n**Or you can watch the YouTube video Demo: https://www.youtube.com/watch?v=PG94iPoeoZk**\n\n## Screenshot\n![screenshot](https://user-images.githubusercontent.com/21986859/40265170-39c0caae-5b01-11e8-8371-8b6c24769639.png)\n\n<\/br>\n\n## Installation\n\n### Prerequisites\n\n- **FFMPEG Windows Build**  \nDownload: https://ffmpeg.org/download.html  \n- **waifu2x-caffe for Windows**  \nDownload: https://github.com/lltcggie/waifu2x-caffe/releases\n\n\nAfter downloading the dependencies, clone the video2x package.\n```\n$ git clone https://github.com/K4YT3X/video2x.git\n$ cd video2x\n```\n\n## Quick Start\n\nTo enlarge a video on a computer with NVIDIA GPU\n```\n$ python video2x.py -v VIDEO_FILE -o OUTPUT_FILENAME -f TIMES_TO_ENLARGE --gpu\n```\n\nTo enlarge a video on a computer without NVIDIA GPU\n```\n$ python video2x.py -v VIDEO_FILE -o OUTPUT_FILENAME -f TIMES_TO_ENLARGE --cpu\n```\n\n\n## Full Usage\n```\nusage: video2x.py [-h] [-f FACTOR] [-v VIDEO] [-o OUTPUT] [-y MODEL_TYPE]\n                  [--cpu] [--gpu] [--cudnn]\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nControls:\n  -f FACTOR, --factor FACTOR\n                        Factor to enlarge video by\n  -v VIDEO, --video VIDEO\n                        Specify video file\n  -o OUTPUT, --output OUTPUT\n                        Specify output file\n  -y MODEL_TYPE, --model_type MODEL_TYPE\n                        Specify model to use\n  --cpu                 Use CPU for enlarging\n  --gpu                 Use GPU for enlarging\n  --cudnn               Use CUDNN for enlarging\n```","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4BC0:2B291E:183376:5E61AD:6AB92A64"},"text_sha256":"504c5c4c21669d3467c1120cdf64db7d7ad540f043ac9fe3542452e60fb19a79"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2650","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:17A1903:1BC434D:6AB92A64"},"commit":{"sha":"7db9c18d6278bbad9c3eda0e4e4ae210f9a688eb","url":"https://github.com/k4yt3x/video2x/commit/7db9c18d6278bbad9c3eda0e4e4ae210f9a688eb","date":"2026-03-07T00:00:00Z","author_date":"2026-03-07T00:00:00Z","committer_date":"2026-03-07T00:00:00Z","tree_sha":"5bbe06d3059a9d3a49c2d9a68b239e34cf80d3e4","message_first_line":"fix(*): address nullptr deref and resource leaks"},"tree_request_status":200,"tree_rate":{"github_remaining":"2649","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087D:767EB:17EC8F9:1C0F79A:6AB92A64"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10210,"blob_sha":"66f5e89f54388608aab274b42126f16394cb11d4","priority":0},{"path":"SECURITY.md","size":608,"blob_sha":"7ea994a401c77fbcd2f63d71e17e90d08966e534","priority":1}],"documents":[{"path":"README.md","size":10210,"blob_sha":"66f5e89f54388608aab274b42126f16394cb11d4","priority":0,"status":200,"text":"<p align=\"center\">\n   <img src=\"https://github.com/user-attachments/assets/5cd63373-e806-474f-94ec-6e04963bf90f\"\n        alt=\"Video2X: A machine learning-based video super resolution and frame interpolation framework.\"/>\n   <\/br>\n   <img src=\"https://img.shields.io/github/v/release/k4yt3x/video2x?style=flat-square\"/>\n   <img src=\"https://img.shields.io/github/downloads/k4yt3x/video2x/total?style=flat-square\"/>\n   <img src=\"https://img.shields.io/github/license/k4yt3x/video2x?style=flat-square\"/>\n   <img src=\"https://img.shields.io/github/sponsors/k4yt3x?style=flat-square&link=https%3A%2F%2Fgithub.com%2Fsponsors%2Fk4yt3x\"/>\n   <img src=\"https://img.shields.io/badge/dynamic/json?color=%23e85b46&label=Patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F4507807&style=flat-square\"/>\n<\/p>\n\n## 🌟 Version 6.0.0\n\nVideo2X 6.0.0 highlights:\n\n- Complete rewrite of the Video2X project in C/C++.\n- Faster and more efficient architecture.\n- Cross-platform support for Windows and Linux.\n- Vastly improved output quality.\n- New GUI and installer for easy setup on Windows.\n\n<details>\n<summary>Click to see more details<\/summary>\n\nVersion 6.0.0 is a complete rewrite of this project in C/C++. It:\n\n- genuinely works this time, with much less hassle compared to the 5.0.0 beta;\n- is blazing fast, thanks to the new optimized pipeline and the efficiency of C/C++;\n- is cross-platform, available now for both Windows and Linux;\n- offers significantly better output quality with Anime4K v4, Real-ESRGAN, Real-CUGAN, and RIFE;\n- supports two modes: filtering (upscaling) and frame interpolation;\n- supports Anime4K v4 and all custom MPV-compatible GLSL shaders;\n- supports Real-ESRGAN, Real-CUGAN, and RIFE (all models) via ncnn and Vulkan;\n- requires zero additional disk space during processing, just space for the final output.\n\n<\/details>\n\n![6.4.0-screenshot](https://github.com/user-attachments/assets/9b1cc8a7-2903-4d2c-80a2-8d81f007e45b)\n\n## 🖥️ Hardware Requirements\n\nYour system must meet the minimum hardware requirements below to run Video2X.\n\n- **CPU**\n  - The precompiled binaries require CPUs with AVX2 support.\n  - **Intel**: Haswell (Q2 2013) or newer\n  - **AMD**: Excavator (Q2 2015) or newer\n- **GPU**\n  - The GPU must support Vulkan.\n  - **NVIDIA**: Kepler (GTX 600 series, Q2 2012) or newer\n  - **AMD**: GCN 1.0 (Radeon HD 7000 series, Q1 2012) or newer\n  - **Intel**: HD Graphics 4000 (Q2 2012) or newer\n\n## [🪟 Install on Windows](https://docs.video2x.org/installing/windows-qt6.html)\n\n**[Download the Latest Windows Installer Executable (6.4.0)](https://github.com/k4yt3x/video2x/releases/download/6.4.0/video2x-qt6-windows-amd64-installer.exe)**\n\nYou can download the latest Windows release on the [releases page](https://github.com/k4yt3x/video2x/releases/latest). For basic GUI usage, refer to the [documentation](https://docs.video2x.org/running/desktop.html). If you're unable to download directly from GitHub, try the [mirror site](https://files.k4yt3x.com). The GUI currently supports the following languages:\n\n- English (United States)\n- 简体中文（中国）\n- 日本語（日本）\n- Português (Portugal)\n- Français (France)\n- Deutsch (Deutschland)\n\n## [🐧 Install on Linux](https://docs.video2x.org/installing/linux.html)\n\nVideo2X packages are available for the Linux distros listed below. A universal AppImage is also available for other distros. If you'd like to build it from source code, refer to the [PKGBUILD](packaging/arch/PKGBUILD) file for a general overview of the required dependencies and commands.\n\n- Arch Linux: AUR packages, maintained by [@K4YT3X](https://github.com/k4yt3x).\n  - [aur/video2x](https://aur.archlinux.org/packages/video2x)\n  - [aur/video2x-git](https://aur.archlinux.org/packages/video2x-git)\n  - [aur/video2x-qt6](https://aur.archlinux.org/packages/video2x-qt6)\n  - [aur/video2x-qt6-git](https://aur.archlinux.org/packages/video2x-qt6-git)\n- Arch Linux (Chinese Mainland): archlinuxcn packages, maintained by [@Integral-Tech](https://github.com/Integral-Tech).\n  - [archlinuxcn/video2x](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x)\n  - [archlinuxcn/video2x-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-git)\n  - [archlinuxcn/video2x-qt6](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6)\n  - [archlinuxcn/video2x-qt6-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6-git)\n- Other distros: `Video2X-x86_64.AppImage` on the [releases page](https://github.com/k4yt3x/video2x/releases/latest).\n\n## [📦 Container Image](https://docs.video2x.org/running/container.html)\n\nVideo2X [container images](https://github.com/k4yt3x/video2x/pkgs/container/video2x) are available on the GitHub Container Registry for easy deployment on Linux and macOS. If you already have Docker/Podman installed, only one command is needed to start upscaling a video. For more information on how to use Video2X's Docker image, please refer to the [documentation](https://docs.video2x.org/running/container.html).\n\n## [📔 Google Colab](https://colab.research.google.com/drive/1gWEwcA9y57EsxwOjmLNmNMXPsafw0kGo)\n\nYou can use Video2X on [Google Colab](https://colab.research.google.com/) **for free** if you don't have a powerful GPU of your own. You can borrow a powerful GPU (NVIDIA T4, L4, or A100) on Google's server for free for a maximum of 12 hours per session. **Please use the free resource fairly** and do not create sessions back-to-back and run upscaling 24/7. This might result in you getting banned. You can get [Colab Pro/Pro+](https://colab.research.google.com/signup/pricing) if you'd like to use better GPUs and get longer runtimes. Usage instructions are embedded in the [Colab Notebook](https://colab.research.google.com/drive/1gWEwcA9y57EsxwOjmLNmNMXPsafw0kGo).\n\n## [💬 Telegram Discussion Group](https://t.me/video2x)\n\nJoin our Telegram discussion group to ask any questions you have about Video2X, chat directly with the developers, or discuss super resolution, frame interpolation technologies, or the future of Video2X in general.\n\n## [📖 Documentation](https://docs.video2x.org/)\n\nComprehensive documentation for Video2X is available at [https://docs.video2x.org/](https://docs.video2x.org/). It offers detailed instructions on how to [build](https://docs.video2x.org/building/index.html), [install](https://docs.video2x.org/installing/index.html), [use](https://docs.video2x.org/running/index.html), and [develop](https://docs.video2x.org/developing/index.html) with this program.\n\n## 📽️ Video Demos (Outdated)\n\n![Spirited Away Demo](https://user-images.githubusercontent.com/21986859/49412428-65083280-f73a-11e8-8237-bb34158a545e.png)\\\n_Upscale demo: Spirited Away's movie trailer_\n\n- **Spirited Away**: [YouTube](https://youtu.be/mGEfasQl2Zo) | [Bilibili](https://www.bilibili.com/video/BV1V5411471i/)\n  - 360P to 4K\n  - The [original video](https://www.youtube.com/watch?v=ByXuk9QqQkk)'s copyright belongs to 株式会社スタジオジブリ\n- **Bad Apple!!**: [YouTube](https://youtu.be/A81rW_FI3cw) | [Bilibili](https://www.bilibili.com/video/BV16K411K7ue)\n  - 384P 30 FPS to 4K 120 FPS with waifu2x and DAIN\n  - The [original video](https://www.nicovideo.jp/watch/sm8628149)'s copyright belongs to あにら\n- **The Pet Girl of Sakurasou**: [YouTube](https://youtu.be/M0vDI1HH2_Y) | [Bilibili](https://www.bilibili.com/video/BV14k4y167KP/)\n  - 240P 29.97 to 1080P 60 FPS with waifu2x and DAIN\n  - The original video's copyright belongs to ASCII Media Works\n\n### Standard Test Clip\n\nThe following clip can be used to test if your setup works properly. This is also the standard clip used for running performance benchmarks.\n\n- [Standard Test Clip (240P)](https://files.k4yt3x.com/resources/videos/standard-test.mp4) 4.54 MiB\n- [Real-CUGAN Upscaled Sample (1704P)](https://files.k4yt3x.com/resources/videos/standard-realcugan.mp4) 3.5 MiB\n- [Real-ESRGAN Upscaled Sample (1704P)](https://files.k4yt3x.com/resources/videos/standard-realesrgan.mp4) 3.1 MiB\n- [waifu2x Upscaled Sample (1080P)](https://files.k4yt3x.com/resources/videos/standard-waifu2x.mp4) 4.54 MiB\n- [Ground Truth (1080P)](https://files.k4yt3x.com/resources/videos/standard-original.mp4) 22.2 MiB\n\nThe original clip came from the anime \"さくら荘のペットな彼女.\"\\\nCopyright of this clip belongs to 株式会社アニプレックス.\n\n## ⚖️ License\n\nThis project is licensed under [GNU AGPL version 3](https://www.gnu.org/licenses/agpl-3.0.txt).\\\nCopyright (C) 2018-2025 K4YT3X and [contributors](https://github.com/k4yt3x/video2x/graphs/contributors).\n\n![AGPLv3](https://www.gnu.org/graphics/agplv3-155x51.png)\n\nThis project includes or depends on these following projects:\n\n| Project                                                                               | License         |\n| ------------------------------------------------------------------------------------- | --------------- |\n| [FFmpeg/FFmpeg](https://www.ffmpeg.org/)                                              | LGPLv2.1, GPLv2 |\n| [Tencent/ncnn](https://github.com/Tencent/ncnn)                                       | BSD 3-Clause    |\n| [bloc97/Anime4K](https://github.com/bloc97/Anime4K)                                   | MIT License     |\n| [nihui/realcugan-ncnn-vulkan](https://github.com/nihui/realcugan-ncnn-vulkan)         | MIT License     |\n| [nihui/rife-ncnn-vulkan](https://github.com/nihui/rife-ncnn-vulkan)                   | MIT License     |\n| [xinntao/Real-ESRGAN-ncnn-vulkan](https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan) | MIT License     |\n\nMore licensing information can be found in the [NOTICE](NOTICE) file.\n\n## 🌺 Special Thanks\n\nSpecial thanks to the following individuals for their significant contributions to the project, listed in alphabetical order.\n\n- [@ArchieMeng](https://github.com/archiemeng)\n- [@BrianPetkovsek](https://github.com/BrianPetkovsek)\n- [@Integral-Tech](https://github.com/Integral-Tech)\n- [@ddouglas87](https://github.com/ddouglas87)\n- [@lhanjian](https://github.com/lhanjian)\n- [@nihui](https://github.com/nihui)\n- [@sat3ll](https://github.com/sat3ll)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF90:727CE:17403E:5D6E9A:6AB92A64"},"text_sha256":"c1ab4a465b07f7ad3a31aedba30601c07c18502793df13c1f2cdf7134fe8f9cf"},{"path":"SECURITY.md","size":608,"blob_sha":"7ea994a401c77fbcd2f63d71e17e90d08966e534","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\n- **Email**: Send vulnerability reports via email to [github@k4yt3x.com](mailto:github@k4yt3x.com).\n- **Details**: Include description, impact, reproduction steps, and proof-of-concept if applicable.\n- **Confidentiality**: Do not disclose vulnerabilities publicly until a fix is released.\n\n## Response Process\n\n1. **Acknowledge**: We will acknowledge receipt within 48 hours.\n2. **Assess**: Initial assessment and response within 7 days.\n3. **Fix**: Develop and release a patch promptly.\n4. **Credit**: Acknowledge contributors unless anonymity is requested.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"405A:3B7E2:1708F0:5D37DE:6AB92A64"},"text_sha256":"1c830bab8d38e390854bb9458383fd7e244bdf13fca9f1498c8873be7aac81c2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"RasaHQ/rasa","input_row":{"repository":"RasaHQ/rasa","url":"https://github.com/RasaHQ/rasa","name":"rasa","owner":"RasaHQ","description":"💬   Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":21331,"issues":6656,"created_at":"2016-10-14T12:27:49Z","updated_at":"2026-09-26T18:43:23Z","first_commit_at":"2016-10-14T12:27:49Z","last_commit_at":"2025-12-18T08:04:47Z","activity_months":110.11,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:29.736Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"RasaHQ/rasa","visibility":"public","created_at":"2016-10-14T12:27:49Z","updated_at":"2026-09-26T18:43:23Z","private":false,"fork":false,"archived":false,"stargazers_count":21331,"open_issues_count":154,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2648","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085E:3C4024:17FA836:1C1D192:6AB92A65"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2647","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0796:754BF:17C6B53:1BE94B7:6AB92A66"},"commit":{"sha":"454d0363931c3c91d74145bfbc5d5ff10e8fe5d7","url":"https://github.com/RasaHQ/rasa/commit/454d0363931c3c91d74145bfbc5d5ff10e8fe5d7","date":"2018-05-24T21:38:01Z","author_date":"2018-05-24T21:38:01Z","committer_date":"2018-05-24T21:38:01Z","tree_sha":"8acf2320e884cd33e60a3339c8adf87e6bd092eb","message_first_line":"remove unecessary arguments"},"tree_request_status":200,"tree_rate":{"github_remaining":"2646","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:177CF35:1B9DCFD:6AB92A66"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3752,"blob_sha":"132dabe0c9bad01c554b7c5e207e1004a86aa13e","priority":0}],"documents":[{"path":"README.md","size":3752,"blob_sha":"132dabe0c9bad01c554b7c5e207e1004a86aa13e","priority":0,"status":200,"text":"# Rasa Core\n[![Join the chat on Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RasaHQ/rasa_core?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://travis-ci.com/RasaHQ/rasa_core.svg?branch=master)](https://travis-ci.com/RasaHQ/rasa_core)\n[![Coverage Status](https://coveralls.io/repos/github/RasaHQ/rasa_core/badge.svg?branch=master)](https://coveralls.io/github/RasaHQ/rasa_core?branch=master)\n[![PyPI version](https://img.shields.io/pypi/v/rasa_core.svg)](https://pypi.python.org/pypi/rasa-core)\n[![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://core.rasa.com/)\n\n\n- **What do Rasa Core & NLU do? 🤔** [Read About the Rasa Stack](https://rasa.com/products/rasa-stack/)\n\n- **I'd like to read the detailed docs 🤓** [Read The Docs](https://core.rasa.com)\n\n- **I'm ready to install Rasa Core! 🚀** [Installation](https://core.rasa.com/installation.html)\n\n- **I have a question ❓** [Gitter channel](https://gitter.im/RasaHQ/rasa_core)\n\n- **I would like to contribute 🤗** [How to contribute](#how-to-contribute)\n\n\n## Introduction\n\nRasa Core is a framework for building conversational software, which includes:\n- chatbots on Messenger\n- Slack bots\n- Alexa Skills\n- Google Home Actions\n\netc. \n\nRasa Core's primary purpose is to help you build contextual, layered conversations with lots of back-and-forth.\nTo have a real conversation, you need to have some memory and build on things that were said earlier.\nRasa Core lets you do that in a scalable way. \n\nThere's a lot more background information in this [blog post](https://medium.com/rasa-blog/a-new-approach-to-conversational-software-2e64a5d05f2a)\n\n## Where to get help\n\nThere is extensive documentation:\n\n- [master](https://core.rasa.com/master/)&nbsp; (if you install from **github**) or \n- [stable](https://core.rasa.com/)&nbsp;&nbsp; (if you install from **pypi**)\n\n\nPlease use [gitter](https://gitter.im/RasaHQ/rasa_core) for quick answers to \nquestions.\n\n\n\n### README Contents:\n- [How to contribute](#how-to-contribute)\n- [Development Internals](#development-internals)\n- [License](#license)\n\n### How to contribute\nWe are very happy to receive and merge your contributions. There is some more information about the style of the code and docs in the [documentation](https://nlu.rasa.com/contribute.html).\n\nIn general the process is rather simple:\n1. create an issue describing the feature you want to work on (or have a look at issues with the label [help wanted](https://github.com/RasaHQ/rasa_core/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22))\n2. write your code, tests and documentation\n3. create a pull request describing your changes\n\nYou pull request will be reviewed by a maintainer, who might get back to you about any necessary changes or questions. You will also be asked to sign a [Contributor License Agreement](https://cla-assistant.io/RasaHQ/rasa_core)\n\n\n## Development Internals\n### Running and changing the documentation\nTo build & edit the docs, first install all necessary dependencies:\n\n```\nbrew install sphinx\npip install -r dev-requirements.txt\n```\n\nAfter the installation has finished, you can run and view the documentation \nlocally using\n```\nmake livedocs\n```\n\nVisit the local version of the docs at http://localhost:8000 in your browser. \nYou can now change the docs locally and the web page will automatically reload\nand apply your changes.\n\n## License\nLicensed under the Apache License, Version 2.0. Copyright 2018 Rasa Technologies GmbH. [Copy of the license](LICENSE.txt).\n\nA list of the Licenses of the dependencies of the project can be found at\nthe bottom of the\n[Libraries Summary](https://libraries.io/github/RasaHQ/rasa_core).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62D0:3BB77:179E55:5DCDE0:6AB92A66"},"text_sha256":"9f34b0f8f8a3cef6330f686bf8f29c5ff5a2663876bf1f3060b0a1ef2ff8fa77"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2645","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CD:8656E:17C3FA1:1BE658E:6AB92A67"},"commit":{"sha":"60a3cff9c08183760355b07bd60f5223d8916d6b","url":"https://github.com/RasaHQ/rasa/commit/60a3cff9c08183760355b07bd60f5223d8916d6b","date":"2025-12-18T08:04:47Z","author_date":"2025-12-18T08:04:47Z","committer_date":"2025-12-18T08:04:47Z","tree_sha":"33918ac63c0428f7a8bc6854b110a1cbcf347e84","message_first_line":"Merge pull request #13155 from RasaHQ/m-vdb-patch-2"},"tree_request_status":200,"tree_rate":{"github_remaining":"2644","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:177E37C:1BA0D08:6AB92A68"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5640,"blob_sha":"c535027d142bc9d193772383bbb126725f28d250","priority":0},{"path":".github/workflows/security-scans.yml","size":5094,"blob_sha":"612518e1db1aac525ccc18ef4f957a0db46a786e","priority":1},{"path":"data/test_config/config_ted_policy_model_checkpointing_zero_eval_num_examples.yml","size":197,"blob_sha":"3f71c48de7396a450d0735dbe85bb4ed711b1de6","priority":1},{"path":"data/test_config/config_ted_policy_model_checkpointing_zero_every_num_epochs.yml","size":198,"blob_sha":"6ad7605a703fe7b695bcbbb26afebaab80d56da0","priority":1},{"path":"data/test_config/config_ted_policy_model_checkpointing.yml","size":198,"blob_sha":"617458894a72d753717bbb6e90813b8a1ead6b3f","priority":1},{"path":"data/test_config/config_ted_policy_no_model_checkpointing.yml","size":121,"blob_sha":"608b0538ac6f737c76add4c36163f3420eee070e","priority":1},{"path":"data/test_endpoints/event_brokers/kafka_invalid_security_protocol.yml","size":59,"blob_sha":"74c07e10b27fb98e6d878834b38d09c16c23fff2","priority":1},{"path":"data/test_moodbot/unexpected_intent_policy_config.yml","size":255,"blob_sha":"d74d96cdaa04f5c90b5d9ec08dd74a333be2a125","priority":1},{"path":"security.txt","size":153,"blob_sha":"a83874cf3cc4ef7be97ddf078f72754f533f8d46","priority":1}],"documents":[{"path":"README.md","size":5640,"blob_sha":"c535027d142bc9d193772383bbb126725f28d250","priority":0,"status":200,"text":"<h1 align=\"center\">Rasa Open Source<\/h1>\n\n<div align=\"center\">\n\n[![Join the Agent Engineering Community](https://img.shields.io/badge/Community-Join%20the%20Discussion-blueviolet)](https://info.rasa.com/community?utm_source=github&utm_medium=website&utm_campaign=)\n[![Try Hello Rasa](https://img.shields.io/badge/Playground-Try%20Hello%20Rasa-ff69b4)](https://hello.rasa.ai/?utm_source=github&utm_medium=website&utm_campaign=)\n[![PyPI version](https://badge.fury.io/py/rasa.svg)](https://badge.fury.io/py/rasa)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/rasa.svg)](https://pypi.python.org/pypi/rasa)\n[![Build Status](https://github.com/RasaHQ/rasa/workflows/Continuous%20Integration/badge.svg)](https://github.com/RasaHQ/rasa/actions)\n[![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://rasa.com/docs)\n\n<\/div>\n\n<br />\n\n<div align=\"center\">\n  <h3>🚧 <b>Note: Maintenance Mode<\/b> 🚧<\/h3>\n  <p>\n    Rasa Open Source is currently in maintenance mode. \n    <br />\n    The future of building AI agents with Rasa is <b>Hello Rasa<\/b> and <b>CALM<\/b>.\n  <\/p>\n<\/div>\n\n<hr />\n\n## 🚀 The Future of Rasa: Hello Rasa\n\n**Building reliable AI agents just got easier.**\n\n[**Hello Rasa**](https://hello.rasa.ai/?utm_source=github&utm_medium=website&utm_campaign=) is our new interactive playground for prototyping AI agents. It combines LLM fluency with the reliability of business logic using our **CALM** (Conversational AI with Language Models) engine.\n\n### Why switch to Hello Rasa?\n\n* **No setup required:** Open the playground, pick a template (Banking, Telecom, Support), and start building in your browser.\n* **No NLU training:** We have moved beyond intents. The LLM handles dialogue understanding while you define the business flows.\n* **Built-in copilot:** A specialized AI assistant helps you generate code, debug flows, and expand your agent instantly.\n* **Production ready:** Hello Rasa is not just a toy. Export your agent to the Rasa Platform when you are ready to scale.\n\n### Core concepts\n\n* **CALM:** Combines LLM flexibility with strict business logic. The LLM understands the user; the code enforces the rules.\n* **Flows:** Describe logical steps (e.g., collect money, transfer funds) rather than rigid dialogue trees.\n* **Inspector:** See real-time decision-making. No black boxes.\n\n👉 **[Start building for free at Hello Rasa](https://hello.rasa.ai/?utm_source=github&utm_medium=website&utm_campaign=)**\n\n---\n\n## 🧠 Join the Agent Engineering Community\n\nWe are building a home for people shipping real-world AI agents. \n\nAgent Engineering is evolving faster than any single framework. This is a vendor-neutral space to discuss architectures, memory, orchestration, and safety with builders across the industry.\n\n### What you get:\n* **Network:** Meet engineers building production agents\n* **Learn:** Discuss practical patterns, not just theory\n* **Access:** Direct influence on the Hello Rasa roadmap and early access to features\n\n| Channel | Purpose |\n| :--- | :--- |\n| **#agent-design** | Architectures, reasoning, memory, testing |\n| **#showcase** | Show your builds, demos, and repos |\n| **#ask-anything** | Debugging and workflow questions |\n\n👉 **[Join the Community](https://info.rasa.com/community?utm_source=github&utm_medium=website&utm_campaign=)**\n\n---\n\n<br>\n<br>\n\n# Rasa Open Source (Legacy)\n\n> **Note:** The documentation and installation instructions below apply to the classic Rasa Open Source framework. For the latest CALM-based experience, see the [Hello Rasa](#-the-future-of-rasa-hello-rasa) section above.\n\nRasa is an open source machine learning framework for automating text and voice-based conversations. With Rasa, you can build contextual assistants on:\n\n- Facebook Messenger\n- Slack\n- Google Hangouts\n- Webex Teams\n- Microsoft Bot Framework\n- Rocket.Chat\n- Mattermost\n- Telegram\n- Twilio\n- Your own custom conversational channels\n\nRasa helps you build contextual assistants that can handle layered conversations with lots of back-and-forth. \n\n### 📚 Resources\n- 🤓 [Read the docs](https://rasa.com/docs/rasa/)\n- 😁 [Install Rasa](https://rasa.com/docs/rasa/installation/environment-set-up)\n- 🚀 [Learn all about Conversational AI](https://learning.rasa.com/)\n- 🏢 [Explore the enterprise platform](https://rasa.com/product/rasa-platform/)\n\n## Development Internals & Contributing\n\nWe are happy to receive contributions. Please review our [Contribution Guidelines](CONTRIBUTING.md) before getting started.\n\n### Installation for Development\nRasa uses **Poetry** for packaging and dependency management.\n\n1.  **Install Poetry**: Follow the [official guide](https://python-poetry.org/docs/#installation).\n2.  **Build from source**:\n    ```bash\n    make install\n    ```\n    *Note for macOS users*: If you run into compiler issues, try `export SYSTEM_VERSION_COMPAT=1` before installation.\n\n### Running Tests\nMake sure you have development requirements installed:\n\n```bash\nmake prepare-tests-ubuntu # Ubuntu/Debian\nmake prepare-tests-macos  # macOS\nmake test                 # Run tests\n```\n\n### Releases\n\nRasa follows Semantic Versioning.\n\n  * **Major**: Incompatible API changes\n  * **Minor**: Backward-compatible functionality\n  * **Patch**: Backward-compatible bug fixes\n\nFor full details on our release cadence and maintenance policy, visit our [Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).\n\n## License\n\nLicensed under the Apache License, Version 2.0. Copyright 2022 Rasa Technologies GmbH. [Copy of the license](https://www.google.com/search?q=LICENSE.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96EC:324E19:180199:5E2FF9:6AB92A68"},"text_sha256":"c7b1b43abe9a6c61f38728160cebcc444f222e6442ea9dd093d56e7431aff0a2"},{"path":".github/workflows/security-scans.yml","size":5094,"blob_sha":"612518e1db1aac525ccc18ef4f957a0db46a786e","priority":1,"status":200,"text":"name: Security Scans\n\non:\n  pull_request:\n    types: [opened, synchronize, labeled]\n\nconcurrency:\n  group: security-scans-${{ github.head_ref }} # head branch name\n  cancel-in-progress: true\n\njobs:\n  changes:\n    name: Check for file changes\n    runs-on: ubuntu-24.04\n    outputs:\n      backend: ${{ steps.filter.outputs.backend }}\n      docker: ${{ steps.filter.outputs.docker }}\n      docs: ${{ steps.filter.outputs.docs }}\n    steps:\n      - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c\n      - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50\n        id: filter\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          filters: .github/change_filters.yml\n\n  trivy:\n    name: Detecting hardcoded secrets\n    runs-on: ubuntu-24.04\n    steps:\n    - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c\n      with:\n        # Fetch all history for all tags and branches\n        fetch-depth: '0'\n    - name: Run Trivy vulnerability scanner\n      id: trivy\n      uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2\n      continue-on-error: true\n      with:\n        format: 'table'\n        scan-type: 'fs'\n        exit-code: '1'\n        scanners: 'secret'\n    - name: Alert on secret finding\n      if: steps.trivy.outcome == 'failure'\n      uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844\n      with:\n        payload: |\n          {\n            \"text\": \"*A secret was detected in a GitHub commit in the repo ${{ github.repository }}.*\\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}\",\n            \"blocks\": [\n              {\n                \"type\": \"section\",\n                \"text\": {\n                  \"type\": \"mrkdwn\",\n                  \"text\": \"*A secret was detected in a GitHub commit in the repo ${{ github.repository }}.*\\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}\"\n                }\n              }\n            ]\n          }\n      env:\n        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CODESECURITY_WEBHOOK_URL }}\n        SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK\n    - name: Fail build if a secret is found\n      if: steps.trivy.outcome == 'failure'\n      run: |\n        echo \"==========================================================\"\n        echo \"| This build has failed because Trivy detected a secret. |\"\n        echo \"==========================================================\"\n        echo \"1. Check the step 'Run Trivy vulnerability scanner' for output to help you find the secret.\"\n        echo \"2. If the finding is a false positive, add it as an entry to trivy-secret.yaml in the root of the repo to suppress the finding.\"\n        echo \"3. If the finding is valid, the security team can help advise your next steps.\"\n        exit 1\n\n\n  bandit:\n    name: Detect python security issues\n    runs-on: ubuntu-24.04\n    needs: [changes]\n\n    steps:\n      - name: Checkout git repository 🕝\n        if: needs.changes.outputs.backend == 'true'\n        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c\n\n      - name: Set up Python 3.10 🐍\n        if: needs.changes.outputs.backend == 'true'\n        uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b\n        with:\n          python-version: '3.10'\n\n      - name: Read Poetry Version 🔢\n        if: needs.changes.outputs.backend == 'true'\n        run: |\n          echo \"POETRY_VERSION=$(scripts/poetry-version.sh)\" >> $GITHUB_ENV\n        shell: bash\n\n      - name: Install poetry 🦄\n        if: needs.changes.outputs.backend == 'true'\n        uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8\n        with:\n          poetry-version: ${{ env.POETRY_VERSION }}\n\n      - name: Load Poetry Cached Libraries ⬇\n        id: cache-poetry\n        if: needs.changes.outputs.backend == 'true'\n        uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3\n        with:\n          path: .venv\n          key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-3.9-${{ hashFiles('**/poetry.lock') }}-${{ secrets.POETRY_CACHE_VERSION }}\n          restore-keys: ${{ runner.os }}-poetry-3.9\n\n      - name: Clear Poetry cache\n        if: steps.cache-poetry.outputs.cache-hit == 'true' && needs.changes.outputs.backend == 'true' && contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-security-scans')\n        run: rm -r .venv\n\n      - name: Create virtual environment\n        if: (steps.cache-poetry.outputs.cache-hit != 'true' || contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-security-scans')) && needs.changes.outputs.backend == 'true'\n        run: python -m venv create .venv\n\n      - name: Set up virtual environment\n        if: needs.changes.outputs.backend == 'true'\n        run: poetry config virtualenvs.in-project true\n\n      - name: Install Dependencies (Linux) 📦\n        if: needs.changes.outputs.backend == 'true'\n        run: make install\n\n      - name: Run Bandit 🔪\n        if: needs.changes.outputs.backend == 'true'\n        run: make lint-security\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADB2:35999:17821B:5DB159:6AB92A68"},"text_sha256":"c6cbbf8aee9f92f1f9ffa9211e81f60db004e5cd1542eb633eea31f7fec460e7"},{"path":"data/test_config/config_ted_policy_model_checkpointing_zero_eval_num_examples.yml","size":197,"blob_sha":"3f71c48de7396a450d0735dbe85bb4ed711b1de6","priority":1,"status":200,"text":"language: \"en\"\nassistant_id: placeholder_default\npolicies:\n  - name: TEDPolicy\n    epochs: 1\n    evaluate_on_number_of_examples: 0\n    evaluate_every_number_of_epochs: 1\n    checkpoint_model: True\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C20:3AC15:17EFDE:5E1D05:6AB92A68"},"text_sha256":"857398e30122d7bfb3b961dc315f4701bf24662d6eabf67eace03e8f7104efc8"},{"path":"data/test_config/config_ted_policy_model_checkpointing_zero_every_num_epochs.yml","size":198,"blob_sha":"6ad7605a703fe7b695bcbbb26afebaab80d56da0","priority":1,"status":200,"text":"language: \"en\"\nassistant_id: placeholder_default\npolicies:\n  - name: TEDPolicy\n    epochs: 1\n    evaluate_on_number_of_examples: 14\n    evaluate_every_number_of_epochs: 0\n    checkpoint_model: True\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39E2:2E8679:17BBDC:5DE7F2:6AB92A68"},"text_sha256":"6fbad9e66cf442636a1b73ebdb92b5c8280bcb52ed15a8664eae67a6cbe3ad41"},{"path":"data/test_config/config_ted_policy_model_checkpointing.yml","size":198,"blob_sha":"617458894a72d753717bbb6e90813b8a1ead6b3f","priority":1,"status":200,"text":"language: \"en\"\nassistant_id: placeholder_default\npolicies:\n  - name: TEDPolicy\n    epochs: 2\n    evaluate_on_number_of_examples: 14\n    evaluate_every_number_of_epochs: 1\n    checkpoint_model: True\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF7C:35EBC:177CEA:5DAB37:6AB92A5D"},"text_sha256":"ae904f9eba48663418e77101e2f5d76c6c27c645505e22134c28c312bfbc9612"},{"path":"data/test_config/config_ted_policy_no_model_checkpointing.yml","size":121,"blob_sha":"608b0538ac6f737c76add4c36163f3420eee070e","priority":1,"status":200,"text":"language: \"en\"\nassistant_id: placeholder_default\npolicies:\n  - name: TEDPolicy\n    epochs: 2\n    checkpoint_model: False\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F9E:2B291E:1833B4:5E62AE:6AB92A68"},"text_sha256":"47c8c4187f10d929fbcb4d200ac56e8d48d6f4299c00d0e91916670f9f215d4a"},{"path":"data/test_endpoints/event_brokers/kafka_invalid_security_protocol.yml","size":59,"blob_sha":"74c07e10b27fb98e6d878834b38d09c16c23fff2","priority":1,"status":200,"text":"event_broker:\n  security_protocol: SOMETHING\n  type: kafka\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4342:24970A:184307:5E6F45:6AB92A69"},"text_sha256":"df429ed7ab77005e971e8a4ce4a1db99b035b5178b271e147d5ad82b86b9e4f9"},{"path":"data/test_moodbot/unexpected_intent_policy_config.yml","size":255,"blob_sha":"d74d96cdaa04f5c90b5d9ec08dd74a333be2a125","priority":1,"status":200,"text":"recipe: default.v1\nlanguage: en\n\npipeline:\n\npolicies:\n  - name: MemoizationPolicy\n  - name: UnexpecTEDIntentPolicy\n    max_history: 5\n    epochs: 1\n  - name: TEDPolicy\n    max_history: 5\n    epochs: 1\n    constrain_similarities: true\n  - name: RulePolicy\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:18233:179AAB:5DC819:6AB92A69"},"text_sha256":"84e50cf812c02e4204fb6f440dfa9f5ac5d4eaca450b930fd4e572909755323d"},{"path":"security.txt","size":153,"blob_sha":"a83874cf3cc4ef7be97ddf078f72754f533f8d46","priority":1,"status":200,"text":"Contact: mailto:security@rasa.com\nPreferred-Languages: en\nCanonical: https://github.com/RasaHQ/rasa/blob/main/security.txt\nHiring: https://rasa.com/jobs\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39E2:2E8679:17BBE6:5DE81B:6AB92A69"},"text_sha256":"f32bad1dba5aeab3078a6d5a7bc3bb5cabf1e2b9ab9f5cc545a6f07f8a9b44a9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lightgbm-org/LightGBM","input_row":{"repository":"lightgbm-org/LightGBM","url":"https://github.com/lightgbm-org/LightGBM","name":"LightGBM","owner":"lightgbm-org","description":"A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":18818,"issues":3692,"created_at":"2016-08-05T05:45:50Z","updated_at":"2026-09-26T23:26:37Z","first_commit_at":"2016-08-05T06:06:01Z","last_commit_at":"2026-09-25T01:44:27Z","activity_months":121.64,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:34.960Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lightgbm-org/LightGBM","visibility":"public","created_at":"2016-08-05T05:45:50Z","updated_at":"2026-09-26T23:26:37Z","private":false,"fork":false,"archived":false,"stargazers_count":18818,"open_issues_count":529,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2643","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:177E5C6:1BA0F97:6AB92A6A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2642","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:1808FCA:1C2BA8A:6AB92A6B"},"commit":{"sha":"e2a0de5082cc4f5630f0d446592547a7e4026801","url":"https://github.com/lightgbm-org/LightGBM/commit/e2a0de5082cc4f5630f0d446592547a7e4026801","date":"2018-05-24T10:01:46Z","author_date":"2018-05-24T10:01:46Z","committer_date":"2018-05-24T10:01:46Z","tree_sha":"bf27c00457362138704ca46b825f012aa19f2f77","message_first_line":"[docs][python][R] early_stopping_rounds doesn't check all of eval_set (#1393)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2641","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:17E229A:1C04CD2:6AB92A6B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8120,"blob_sha":"73538f6e51b621eb6714f70d6593105f04f0ce3c","priority":0}],"documents":[{"path":"README.md","size":8120,"blob_sha":"73538f6e51b621eb6714f70d6593105f04f0ce3c","priority":0,"status":200,"text":"LightGBM, Light Gradient Boosting Machine\n=========================================\n\n[![Build Status](https://travis-ci.org/Microsoft/LightGBM.svg?branch=master)](https://travis-ci.org/Microsoft/LightGBM)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/1ys5ot401m0fep6l/branch/master?svg=true)](https://ci.appveyor.com/project/guolinke/lightgbm/branch/master)\n[![Documentation Status](https://readthedocs.org/projects/lightgbm/badge/?version=latest)](https://lightgbm.readthedocs.io/)\n[![GitHub Issues](https://img.shields.io/github/issues/Microsoft/LightGBM.svg)](https://github.com/Microsoft/LightGBM/issues)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Microsoft/LightGBM/blob/master/LICENSE)\n[![Python Versions](https://img.shields.io/pypi/pyversions/lightgbm.svg)](https://pypi.org/project/lightgbm)\n[![PyPI Version](https://img.shields.io/pypi/v/lightgbm.svg)](https://pypi.org/project/lightgbm)\n[![Join the chat at https://gitter.im/Microsoft/LightGBM](https://badges.gitter.im/Microsoft/LightGBM.svg)](https://gitter.im/Microsoft/LightGBM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Slack](https://lightgbm-slack-autojoin.herokuapp.com/badge.svg)](https://lightgbm-slack-autojoin.herokuapp.com)\n\nLightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with the following advantages:\n\n- Faster training speed and higher efficiency\n- Lower memory usage\n- Better accuracy\n- Parallel and GPU learning supported\n- Capable of handling large-scale data\n\nFor more details, please refer to [Features](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.rst). Benefit from these advantages, LightGBM is being widely-used in many [winning solutions](https://github.com/Microsoft/LightGBM/blob/master/examples/README.md#machine-learning-challenge-winning-solutions) of machine learning competitions.\n\n[Comparison experiments](https://github.com/Microsoft/LightGBM/blob/master/docs/Experiments.rst#comparison-experiment) on public datasets show that LightGBM can outperform existing boosting frameworks on both efficiency and accuracy, with significantly lower memory consumption. What's more, the [parallel experiments](https://github.com/Microsoft/LightGBM/blob/master/docs/Experiments.rst#parallel-experiment) show that LightGBM can achieve a linear speed-up by using multiple machines for training in specific settings. \n\nNews\n----\n\n08/15/2017 : Optimal split for categorical features.\n\n07/13/2017 : [Gitter](https://gitter.im/Microsoft/LightGBM) is available.\n\n06/20/2017 : Python-package is on [PyPI](https://pypi.org/project/lightgbm) now.\n\n06/09/2017 : [LightGBM Slack team](https://lightgbm.slack.com) is available.\n\n05/03/2017 : LightGBM v2 stable release.\n\n04/10/2017 : LightGBM supports GPU-accelerated tree learning now. Please read our [GPU Tutorial](./docs/GPU-Tutorial.rst) and [Performance Comparison](./docs/GPU-Performance.rst).\n\n02/20/2017 : Update to LightGBM v2.\n\n02/12/2017 : LightGBM v1 stable release.\n\n01/08/2017 : Release [**R-package**](https://github.com/Microsoft/LightGBM/tree/master/R-package) beta version, welcome to have a try and provide feedback.\n\n12/05/2016 : **Categorical Features as input directly** (without one-hot coding). \n\n12/02/2016 : Release [**Python-package**](https://github.com/Microsoft/LightGBM/tree/master/python-package) beta version, welcome to have a try and provide feedback.\n\nMore detailed update logs : [Key Events](https://github.com/Microsoft/LightGBM/blob/master/docs/Key-Events.md).\n\n\nExternal (unofficial) Repositories\n----------------------------------\n\nJulia Package: https://github.com/Allardvm/LightGBM.jl\n\nJPMML: https://github.com/jpmml/jpmml-lightgbm\n\n\nGet Started and Documentation\n-----------------------------\n\nInstall by following the [guide](https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst) for the command line program, [Python-package](https://github.com/Microsoft/LightGBM/tree/master/python-package) or [R-package](https://github.com/Microsoft/LightGBM/tree/master/R-package). Then please see the [Quick Start](https://github.com/Microsoft/LightGBM/blob/master/docs/Quick-Start.rst) guide.\n\nOur primary documentation is at https://lightgbm.readthedocs.io/ and is generated from this repository.\n\nNext you may want to read:\n\n* [**Examples**](https://github.com/Microsoft/LightGBM/tree/master/examples) showing command line usage of common tasks\n* [**Features**](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.rst) and algorithms supported by LightGBM\n* [**Parameters**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.rst) is an exhaustive list of customization you can make\n* [**Parallel Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Tutorial.rst) can speed up computation\n* [**Laurae++ interactive documentation**](https://sites.google.com/view/lauraepp/parameters) is a detailed guide for hyperparameters\n\nDocumentation for contributors:\n\n* [**How we update readthedocs.io**](https://github.com/Microsoft/LightGBM/blob/master/docs/README.rst)\n* Check out the [**Development Guide**](https://github.com/Microsoft/LightGBM/blob/master/docs/Development-Guide.rst).\n\nSupport\n-------\n\n* Ask a question [on Stack Overflow with the `lightgbm` tag](https://stackoverflow.com/questions/ask?tags=lightgbm), we monitor this for new questions.\n* Discuss on the [LightGBM Gitter](https://gitter.im/Microsoft/LightGBM).\n* Discuss on the [LightGBM Slack team](https://lightgbm.slack.com).\n  * Use [this invite link](https://lightgbm-slack-autojoin.herokuapp.com/) to join the team.\n* Open **bug reports** and **feature requests** (not questions) on [GitHub issues](https://github.com/Microsoft/LightGBM/issues).\n\nHow to Contribute\n-----------------\n\nLightGBM has been developed and used by many active community members. Your help is very valuable to make it better for everyone.\n\n- Check out [call for contributions](https://github.com/Microsoft/LightGBM/issues?q=is%3Aissue+is%3Aopen+label%3Acall-for-contribution) to see what can be improved, or open an issue if you want something.\n- Contribute to the [tests](https://github.com/Microsoft/LightGBM/tree/master/tests) to make it more reliable.\n- Contribute to the [documents](https://github.com/Microsoft/LightGBM/tree/master/docs) to make it clearer for everyone.\n- Contribute to the [examples](https://github.com/Microsoft/LightGBM/tree/master/examples) to share your experience with other users.\n- Add your stories and experience to [Awesome LightGBM](https://github.com/Microsoft/LightGBM/blob/master/examples/README.md).\n- Open issue if you met problems during development.\n\nMicrosoft Open Source Code of Conduct\n-------------------------------------\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\nReference Papers\n----------------\n\nGuolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu. \"[LightGBM: A Highly Efficient Gradient Boosting Decision Tree](https://papers.nips.cc/paper/6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree)\". In Advances in Neural Information Processing Systems (NIPS), pp. 3149-3157. 2017.\n\nQi Meng, Guolin Ke, Taifeng Wang, Wei Chen, Qiwei Ye, Zhi-Ming Ma, Tieyan Liu. \"[A Communication-Efficient Parallel Algorithm for Decision Tree](http://papers.nips.cc/paper/6380-a-communication-efficient-parallel-algorithm-for-decision-tree)\". Advances in Neural Information Processing Systems 29 (NIPS 2016).\n\nHuan Zhang, Si Si and Cho-Jui Hsieh. \"[GPU Acceleration for Large-scale Tree Boosting](https://arxiv.org/abs/1706.08359)\". arXiv:1706.08359, 2017.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9470:3AC5A:17E3EC:5E1262:6AB92A6B"},"text_sha256":"a6c11dbda72485099e386777cb8c0e4109fa04fb4df9f1db18893bc2f20d20e1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2640","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:1807022:1C29BC6:6AB92A6C"},"commit":{"sha":"5c400664979386add5f6d76ab38612b017a95b61","url":"https://github.com/lightgbm-org/LightGBM/commit/5c400664979386add5f6d76ab38612b017a95b61","date":"2026-06-26T03:25:29Z","author_date":"2026-06-26T03:25:29Z","committer_date":"2026-06-26T03:25:29Z","tree_sha":"71b7f696f4c6989391c0cdf2cc9d0c327c033928","message_first_line":"[python-package] make some imports lazy: 'dask', 'graphviz', 'joblib', 'matplotlib', 'psutil' (#7340)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2639","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0889:2D7D17:177D3C9:1B9E22E:6AB92A6C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13195,"blob_sha":"4dbb07d36597beb29c4037da204a7162c953e537","priority":0},{"path":"SECURITY.md","size":991,"blob_sha":"45edf1992219437b4e1b97087981bc533954a3fa","priority":1}],"documents":[{"path":"README.md","size":13195,"blob_sha":"4dbb07d36597beb29c4037da204a7162c953e537","priority":0,"status":200,"text":"<img src=https://github.com/lightgbm-org/LightGBM/blob/master/docs/logo/LightGBM_logo_black_text.svg width=300 />\n\n> [!NOTE]\n> This project moved from `Microsoft/LightGBM` to `lightgbm-org/LightGBM` in March 2026.\n> This repository is still the official LightGBM source code, managed by the same maintainers (including the creator of LightGBM).\n> For details, see https://github.com/lightgbm-org/LightGBM/issues/7187\n\nLight Gradient Boosting Machine\n===============================\n\n[![C++ GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/cpp.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/cpp.yml)\n[![Python-package GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/python_package.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/python_package.yml)\n[![R-package GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/r_package.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/r_package.yml)\n[![CUDA Version GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/cuda.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/cuda.yml)\n[![SWIG Wrapper GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/swig.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/swig.yml)\n[![Static Analysis GitHub Actions Build Status](https://github.com/lightgbm-org/LightGBM/actions/workflows/static_analysis.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/static_analysis.yml)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/1ys5ot401m0fep6l/branch/master?svg=true)](https://ci.appveyor.com/project/guolinke/lightgbm/branch/master)\n[![Documentation Status](https://readthedocs.org/projects/lightgbm/badge/?version=latest)](https://lightgbm.readthedocs.io/)\n[![Link checks](https://github.com/lightgbm-org/LightGBM/actions/workflows/lychee.yml/badge.svg?branch=master)](https://github.com/lightgbm-org/LightGBM/actions/workflows/lychee.yml)\n[![License](https://img.shields.io/github/license/lightgbm-org/lightgbm.svg)](https://github.com/lightgbm-org/LightGBM/blob/master/LICENSE)\n[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)\n[![StackOverflow questions](https://img.shields.io/stackexchange/stackoverflow/t/lightgbm?logo=stackoverflow&logoColor=white&label=StackOverflow%20questions)](https://stackoverflow.com/questions/tagged/lightgbm?sort=votes)\n[![Python Versions](https://img.shields.io/pypi/pyversions/lightgbm.svg?logo=python&logoColor=white)](https://pypi.org/project/lightgbm)\n[![PyPI Version](https://img.shields.io/pypi/v/lightgbm.svg?logo=pypi&logoColor=white)](https://pypi.org/project/lightgbm)\n[![conda Version](https://img.shields.io/conda/vn/conda-forge/lightgbm?logo=conda-forge&logoColor=white&label=conda)](https://anaconda.org/conda-forge/lightgbm)\n[![CRAN Version](https://www.r-pkg.org/badges/version/lightgbm)](https://cran.r-project.org/package=lightgbm)\n[![NuGet Version](https://img.shields.io/nuget/v/lightgbm?logo=nuget&logoColor=white)](https://www.nuget.org/packages/LightGBM)\n[![Winget Version](https://img.shields.io/winget/v/Microsoft.LightGBM)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/LightGBM)\n\nLightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with the following advantages:\n\n- Faster training speed and higher efficiency.\n- Lower memory usage.\n- Better accuracy.\n- Support of parallel, distributed, and GPU learning.\n- Capable of handling large-scale data.\n\nFor further details, please refer to [Features](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Features.rst).\n\nBenefiting from these advantages, LightGBM is being widely-used in many [winning solutions](https://github.com/lightgbm-org/LightGBM/blob/master/examples/README.md#machine-learning-challenge-winning-solutions) of machine learning competitions.\n\n[Comparison experiments](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Experiments.rst#comparison-experiment) on public datasets show that LightGBM can outperform existing boosting frameworks on both efficiency and accuracy, with significantly lower memory consumption. What's more, [distributed learning experiments](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Experiments.rst#parallel-experiment) show that LightGBM can achieve a linear speed-up by using multiple machines for training in specific settings.\n\nGet Started and Documentation\n-----------------------------\n\nOur primary documentation is at https://lightgbm.readthedocs.io/ and is generated from this repository. If you are new to LightGBM, follow [the installation instructions](https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html) on that site.\n\nNext you may want to read:\n\n- [**Examples**](https://github.com/lightgbm-org/LightGBM/tree/master/examples) showing command line usage of common tasks.\n- [**Features**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Features.rst) and algorithms supported by LightGBM.\n- [**Parameters**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parameters.rst) is an exhaustive list of customization you can make.\n- [**Distributed Learning**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/GPU-Tutorial.rst) can speed up computation.\n- [**FLAML**](https://www.microsoft.com/en-us/research/project/fast-and-lightweight-automl-for-large-scale-data/articles/flaml-a-fast-and-lightweight-automl-library/) provides automated tuning for LightGBM ([code examples](https://microsoft.github.io/FLAML/docs/Examples/AutoML-for-LightGBM/)).\n- [**Optuna Hyperparameter Tuner**](https://medium.com/optuna/lightgbm-tuner-new-optuna-integration-for-hyperparameter-optimization-8b7095e99258) provides automated tuning for LightGBM hyperparameters ([code examples](https://github.com/optuna/optuna-examples/blob/main/lightgbm/lightgbm_tuner_simple.py)).\n- [**Understanding LightGBM Parameters (and How to Tune Them using Neptune)**](https://neptune.ai/blog/lightgbm-parameters-guide).\n\nDocumentation for contributors:\n\n- [**How we update readthedocs.io**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/README.rst).\n- Check out the [**Development Guide**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Development-Guide.rst).\n\nNews\n----\n\nPlease refer to changelogs at [GitHub releases](https://github.com/lightgbm-org/LightGBM/releases) page.\n\nExternal (Unofficial) Repositories\n----------------------------------\n\nProjects listed here offer alternative ways to use LightGBM.\nThey are not maintained or officially endorsed by the `LightGBM` development team.\n\nJPMML (Java PMML converter): https://github.com/jpmml/jpmml-lightgbm\n\nNyoka (Python PMML converter): https://github.com/SoftwareAG/nyoka\n\nTreelite (model compiler for efficient deployment): https://github.com/dmlc/treelite\n\nlleaves (LLVM-based model compiler for efficient inference): https://github.com/siboehm/lleaves\n\nHummingbird (model compiler into tensor computations): https://github.com/microsoft/hummingbird\n\nGBNet (use `LightGBM` as a [PyTorch Module](https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html)): https://github.com/mthorrell/gbnet\n\ncuML Forest Inference Library (GPU-accelerated inference): https://github.com/rapidsai/cuml\n\nnvForest (GPU-accelerated inference): https://github.com/rapidsai/nvforest\n\ndaal4py (Intel CPU-accelerated inference): https://github.com/intel/scikit-learn-intelex/tree/master/daal4py\n\nm2cgen (model appliers for various languages): https://github.com/BayesWitnesses/m2cgen\n\nleaves (Go model applier): https://github.com/dmitryikh/leaves\n\nONNXMLTools (ONNX converter): https://github.com/onnx/onnxmltools\n\nSHAP (model output explainer): https://github.com/slundberg/shap\n\nShapash (model visualization and interpretation): https://github.com/MAIF/shapash\n\ndtreeviz (decision tree visualization and model interpretation): https://github.com/parrt/dtreeviz\n\nsupertree (interactive visualization of decision trees): https://github.com/mljar/supertree\n\nSynapseML (LightGBM on Spark): https://github.com/microsoft/SynapseML\n\nKubeflow Fairing (LightGBM on Kubernetes): https://github.com/kubeflow/fairing\n\nKubeflow Operator (LightGBM on Kubernetes): https://github.com/kubeflow/xgboost-operator\n\nlightgbm_ray (LightGBM on Ray): https://github.com/ray-project/lightgbm_ray\n\nRay (distributed computing framework): https://github.com/ray-project/ray\n\nMars (LightGBM on Mars): https://github.com/mars-project/mars\n\nML.NET (.NET/C#-package): https://github.com/dotnet/machinelearning\n\nLightGBM.NET (.NET/C#-package): https://github.com/rca22/LightGBM.Net\n\nLightGBM Ruby (Ruby gem): https://github.com/ankane/lightgbm-ruby\n\nLightGBM4j (Java high-level binding): https://github.com/metarank/lightgbm4j\n\nLightGBM4J (JVM interface for LightGBM written in Scala): https://github.com/seek-oss/lightgbm4j\n\nJulia-package: https://github.com/IQVIA-ML/LightGBM.jl\n\nlightgbm3 (Rust binding): https://github.com/Mottl/lightgbm3-rs\n\nMLServer (inference server for LightGBM): https://github.com/SeldonIO/MLServer\n\nMLflow (experiment tracking, model monitoring framework): https://github.com/mlflow/mlflow\n\nFLAML (AutoML library for hyperparameter optimization): https://github.com/microsoft/FLAML\n\nMLJAR AutoML (AutoML on tabular data): https://github.com/mljar/mljar-supervised\n\nOptuna (hyperparameter optimization framework): https://github.com/optuna/optuna\n\nLightGBMLSS (probabilistic modelling with LightGBM): https://github.com/StatMixedML/LightGBMLSS\n\nLightGBM-MoE (Mixture-of-Experts / regime-switching extension): https://github.com/kyo219/LightGBM-MoE\n\ndarts (time series forecasting and anomaly detection with LightGBM): https://github.com/unit8co/darts\n\nmlforecast (time series forecasting with LightGBM): https://github.com/Nixtla/mlforecast\n\nskforecast (time series forecasting with LightGBM): https://github.com/JoaquinAmatRodrigo/skforecast\n\n`{bonsai}` (R `{parsnip}`-compliant interface): https://github.com/tidymodels/bonsai\n\n`{mlr3extralearners}` (R `{mlr3}`-compliant interface): https://github.com/mlr-org/mlr3extralearners\n\nlightgbm-transform (feature transformation binding): https://github.com/lightgbm-org/LightGBM-transform\n\n`postgresml` (LightGBM training and prediction in SQL, via a Postgres extension): https://github.com/postgresml/postgresml\n\n`pyodide` (run `lightgbm` Python-package in a web browser): https://github.com/pyodide/pyodide\n\n`vaex-ml` (Python DataFrame library with its own interface to LightGBM): https://github.com/vaexio/vaex\n\nSupport\n-------\n\n- Ask a question [on Stack Overflow with the `lightgbm` tag](https://stackoverflow.com/questions/ask?tags=lightgbm), we monitor this for new questions.\n- Open **bug reports** and **feature requests** on [GitHub issues](https://github.com/lightgbm-org/LightGBM/issues).\n\nHow to Contribute\n-----------------\n\nCheck [CONTRIBUTING](https://github.com/lightgbm-org/LightGBM/blob/master/CONTRIBUTING.md) page.\n\nMicrosoft Open Source Code of Conduct\n-------------------------------------\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\nReference Papers\n----------------\n\nYu Shi, Guolin Ke, Zhuoming Chen, Shuxin Zheng, Tie-Yan Liu. \"Quantized Training of Gradient Boosting Decision Trees\" ([link](https://proceedings.neurips.cc/paper/2022/hash/77911ed9e6e864ca1a3d165b2c3cb258-Abstract.html)). Advances in Neural Information Processing Systems 35 (NeurIPS 2022), pp. 18822-18833.\n\nGuolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, Tie-Yan Liu. \"[LightGBM: A Highly Efficient Gradient Boosting Decision Tree](https://proceedings.neurips.cc/paper/2017/hash/6449f44a102fde848669bdd9eb6b76fa-Abstract.html)\". Advances in Neural Information Processing Systems 30 (NIPS 2017), pp. 3149-3157.\n\nQi Meng, Guolin Ke, Taifeng Wang, Wei Chen, Qiwei Ye, Zhi-Ming Ma, Tie-Yan Liu. \"[A Communication-Efficient Parallel Algorithm for Decision Tree](https://proceedings.neurips.cc/paper/2016/hash/10a5ab2db37feedfdeaab192ead4ac0e-Abstract.html)\". Advances in Neural Information Processing Systems 29 (NIPS 2016), pp. 1279-1287.\n\nHuan Zhang, Si Si and Cho-Jui Hsieh. \"[GPU Acceleration for Large-scale Tree Boosting](https://arxiv.org/abs/1706.08359)\". SysML Conference, 2018.\n\nLicense\n-------\n\nThis project is licensed under the terms of the MIT license. See [LICENSE](https://github.com/lightgbm-org/LightGBM/blob/master/LICENSE) for additional details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CC0:3AC5A:17E400:5E1293:6AB92A6D"},"text_sha256":"84a94853efe1d207ea943b2e8d516deaaf4d21f5d0f7eefda74ce5217a775dfc"},{"path":"SECURITY.md","size":991,"blob_sha":"45edf1992219437b4e1b97087981bc533954a3fa","priority":1,"status":200,"text":"# Security\n\n## Reporting Security Issues\n\n> [!WARNING]\n> Do not report security vulnerabilities through public GitHub issues!\n\nInstead, please open a private vulnerability report in this repository, on the \"Security and quality\" tab.\n\nSee https://docs.github.com/en/code-security/how-tos/report-and-fix-vulnerabilities/privately-reporting-a-security-vulnerability\n\n## Report Details\n\nWe prefer all communications to be in English.\n\nReports should include the following:\n\n* reproducible example showing how the vulnerability can be exploited\n* statement about the impact (including affected versions)\n\nAnd we'd appreciate if they also include:\n\n* statement about whether you are interested in implementing the fix yourself\n\n## Disclosure Policy\n\nThis project is staffed exclusively by volunteers.\nPlease be patient and allow us time to respond before disclosing vulnerabilities.\n\nWe prefer to coordinate disclosure privately, and are committed to giving credit for confirmed vulnerabilities.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"481A:3FA0D:177987:5DA7F6:6AB92A6C"},"text_sha256":"7519e8845f8b9b445350e61f954cb0e0388480c14d02af2bcba1090120595d51"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pytorch/vision","input_row":{"repository":"pytorch/vision","url":"https://github.com/pytorch/vision","name":"vision","owner":"pytorch","description":"Datasets, Transforms and Models specific to Computer Vision","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":17928,"issues":3613,"created_at":"2016-11-09T23:11:43Z","updated_at":"2026-09-26T10:22:08Z","first_commit_at":"2016-11-10T01:11:00Z","last_commit_at":"2026-09-16T21:52:45Z","activity_months":118.2,"ai_ml_match_topics":"machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:37.910Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pytorch/vision","visibility":"public","created_at":"2016-11-09T23:11:43Z","updated_at":"2026-09-26T10:22:08Z","private":false,"fork":false,"archived":false,"stargazers_count":17928,"open_issues_count":1227,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2638","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EB:62B94:17B9790:1BDBF7C:6AB92A6D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2637","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:17FD992:1C20791:6AB92A6E"},"commit":{"sha":"f27ecceac6b31040d62317c01b65597e5ec2f57e","url":"https://github.com/pytorch/vision/commit/f27ecceac6b31040d62317c01b65597e5ec2f57e","date":"2018-05-24T09:30:15Z","author_date":"2018-05-24T09:30:15Z","committer_date":"2018-05-24T09:30:15Z","tree_sha":"6c37f88977e51a097c73c2d2751f0ba6e07e0bc0","message_first_line":"fix a bug described in issue #488 (#489)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2636","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17C7C5C:1BEA65D:6AB92A6E"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1393,"blob_sha":"3f2be535d7aa72d6c2a94930ff506c4159692458","priority":0}],"documents":[{"path":"README.rst","size":1393,"blob_sha":"3f2be535d7aa72d6c2a94930ff506c4159692458","priority":0,"status":200,"text":"torchvision\n============\n\n.. image:: https://travis-ci.org/pytorch/vision.svg?branch=master\n    :target: https://travis-ci.org/pytorch/vision\n\nThe torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.\n\nInstallation\n============\n\nAnaconda:\n\n.. code:: bash\n\n    conda install torchvision -c pytorch\n\npip:\n\n.. code:: bash\n\n    pip install torchvision\n\nFrom source:\n\n.. code:: bash\n\n    python setup.py install\n\n\nImage Backend\n=============\nTorchvision currently supports the following image backends:\n\n* `Pillow`_ (default)\n\n* `Pillow-SIMD`_ - a **much faster** drop-in replacement for Pillow with SIMD. If installed will be used as the default.\n\n* `accimage`_ - if installed can be activated by calling :code:`torchvision.set_image_backend('accimage')`\n\n.. _Pillow : https://python-pillow.org/\n.. _Pillow-SIMD : https://github.com/uploadcare/pillow-simd\n.. _accimage: https://github.com/pytorch/accimage\n\nDocumentation\n=============\nYou can find the API documentation on the pytorch website: http://pytorch.org/docs/master/torchvision/\n\nContributing\n============\nWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EE0:3B6DE:175B40:5D8987:6AB92A6E"},"text_sha256":"ad2478c076f1708adce75b80f382215a5ff5925dc0b92e754dfcb40fd2386f94"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2635","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17CBA1E:1BEDA1C:6AB92A6F"},"commit":{"sha":"4c0fc5acbd973346330aad1695599ba3f9b13352","url":"https://github.com/pytorch/vision/commit/4c0fc5acbd973346330aad1695599ba3f9b13352","date":"2026-06-29T16:42:18Z","author_date":"2026-06-29T16:42:18Z","committer_date":"2026-06-29T16:42:18Z","tree_sha":"cb4410a551c9a211153a7b8589c6b4009d73d45e","message_first_line":"[ROCM] Add rocjpeg support for GPU image decoding (#9342)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2634","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:17E4256:1C06BE1:6AB92A6F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5042,"blob_sha":"d861bca97cc6977c290422056405b9807e916462","priority":0}],"documents":[{"path":"README.md","size":5042,"blob_sha":"d861bca97cc6977c290422056405b9807e916462","priority":0,"status":200,"text":"# torchvision\n\n[![total torchvision downloads](https://pepy.tech/badge/torchvision)](https://pepy.tech/project/torchvision)\n[![documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/vision/stable/index.html)\n\nThe torchvision package consists of popular datasets, model architectures, and common image transformations for computer\nvision.\n\n## Installation\n\nPlease refer to the [official\ninstructions](https://pytorch.org/get-started/locally/) to install the stable\nversions of `torch` and `torchvision` on your system.\n\nTo build source, refer to our [contributing\npage](https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation).\n\nThe following is the corresponding `torchvision` versions and supported Python\nversions.\n\n| `torch`            | `torchvision`      | Python              |\n| ------------------ | ------------------ | ------------------- |\n| `main` / `nightly` | `main` / `nightly` | `>=3.10`, `<=3.14`  |\n| `2.12`             | `0.27`             | `>=3.10`, `<=3.14`  |\n| `2.11`             | `0.26`             | `>=3.10`, `<=3.14`  |\n| `2.10`             | `0.25`             | `>=3.10`, `<=3.14`  |\n| `2.9`              | `0.24`             | `>=3.10`, `<=3.14`  |\n| `2.8`              | `0.23`             | `>=3.9`, `<=3.13`   |\n| `2.7`              | `0.22`             | `>=3.9`, `<=3.13`   |\n| `2.6`              | `0.21`             | `>=3.9`, `<=3.12`   |\n\n<details>\n    <summary>older versions<\/summary>\n\n| `torch` | `torchvision`     | Python                    |\n|---------|-------------------|---------------------------|\n| `2.5`              | `0.20`             | `>=3.9`, `<=3.12`   |\n| `2.4`              | `0.19`             | `>=3.8`, `<=3.12`   |\n| `2.3`              | `0.18`             | `>=3.8`, `<=3.12`   |\n| `2.2`              | `0.17`             | `>=3.8`, `<=3.11`   |\n| `2.1`              | `0.16`             | `>=3.8`, `<=3.11`   |\n| `2.0`              | `0.15`             | `>=3.8`, `<=3.11`   |\n| `1.13`  | `0.14`            | `>=3.7.2`, `<=3.10`       |\n| `1.12`  | `0.13`            | `>=3.7`, `<=3.10`         |\n| `1.11`  | `0.12`            | `>=3.7`, `<=3.10`         |\n| `1.10`  | `0.11`            | `>=3.6`, `<=3.9`          |\n| `1.9`   | `0.10`            | `>=3.6`, `<=3.9`          |\n| `1.8`   | `0.9`             | `>=3.6`, `<=3.9`          |\n| `1.7`   | `0.8`             | `>=3.6`, `<=3.9`          |\n| `1.6`   | `0.7`             | `>=3.6`, `<=3.8`          |\n| `1.5`   | `0.6`             | `>=3.5`, `<=3.8`          |\n| `1.4`   | `0.5`             | `==2.7`, `>=3.5`, `<=3.8` |\n| `1.3`   | `0.4.2` / `0.4.3` | `==2.7`, `>=3.5`, `<=3.7` |\n| `1.2`   | `0.4.1`           | `==2.7`, `>=3.5`, `<=3.7` |\n| `1.1`   | `0.3`             | `==2.7`, `>=3.5`, `<=3.7` |\n| `<=1.0` | `0.2`             | `==2.7`, `>=3.5`, `<=3.7` |\n\n<\/details>\n\n## Image Backends\n\nTorchvision currently supports the following image backends:\n\n- torch tensors\n- PIL images:\n    - [Pillow](https://python-pillow.org/)\n    - [Pillow-SIMD](https://github.com/uploadcare/pillow-simd) - a **much faster** drop-in replacement for Pillow with SIMD.\n\nRead more in in our [docs](https://pytorch.org/vision/stable/transforms.html).\n\n## Documentation\n\nYou can find the API documentation on the pytorch website: <https://pytorch.org/vision/stable/index.html>\n\n## Contributing\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.\n\n## Disclaimer on Datasets\n\nThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets,\nvouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to\ndetermine whether you have permission to use the dataset under the dataset's license.\n\nIf you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset\nto be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML\ncommunity!\n\n## Pre-trained Model License\n\nThe pre-trained models provided in this library may have their own licenses or terms and conditions derived from the\ndataset used for training. It is your responsibility to determine whether you have permission to use the models for your\nuse case.\n\nMore specifically, SWAG models are released under the CC-BY-NC 4.0 license. See\n[SWAG LICENSE](https://github.com/facebookresearch/SWAG/blob/main/LICENSE) for additional details.\n\n## Citing TorchVision\n\nIf you find TorchVision useful in your work, please consider citing the following BibTeX entry:\n\n```bibtex\n@software{torchvision2016,\n    title        = {TorchVision: PyTorch's Computer Vision library},\n    author       = {TorchVision maintainers and contributors},\n    year         = 2016,\n    journal      = {GitHub repository},\n    publisher    = {GitHub},\n    howpublished = {\\url{https://github.com/pytorch/vision}}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C20:3AC15:17F023:5E1DFE:6AB92A6F"},"text_sha256":"9d4a7a2e0cc122cb0671a6443ebbf894e4fb957171dc2d317b216737406f5f3a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"argoproj/argo-workflows","input_row":{"repository":"argoproj/argo-workflows","url":"https://github.com/argoproj/argo-workflows","name":"argo-workflows","owner":"argoproj","description":"Workflow Engine for Kubernetes","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":17007,"issues":6678,"created_at":"2017-08-21T18:50:44Z","updated_at":"2026-09-27T12:59:08Z","first_commit_at":"2017-10-17T21:53:51Z","last_commit_at":"2026-09-25T19:16:09Z","activity_months":107.26000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:40.693Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"argoproj/argo-workflows","visibility":"public","created_at":"2017-08-21T18:50:44Z","updated_at":"2026-09-27T12:59:08Z","private":false,"fork":false,"archived":false,"stargazers_count":17007,"open_issues_count":1296,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2633","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17B9991:1BDC1CD:6AB92A70"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2632","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0822:380E1C:17CB0E5:1BECCBF:6AB92A71"},"commit":{"sha":"dc003f43baeba5509bfadfc825ced533715b93c6","url":"https://github.com/argoproj/argo-workflows/commit/dc003f43baeba5509bfadfc825ced533715b93c6","date":"2018-05-24T21:50:01Z","author_date":"2018-05-24T21:49:01Z","committer_date":"2018-05-24T21:50:01Z","tree_sha":"a5234ed6b26fb59e7a00db98aa3d9b07975e7488","message_first_line":"Children of nested DAG templates were not correctly being connected to its parent"},"tree_request_status":200,"tree_rate":{"github_remaining":"2631","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17C46C3:1BE6DB9:6AB92A71"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3672,"blob_sha":"bd7d785deb9eb8ee744ca8250b34ba715937b381","priority":0}],"documents":[{"path":"README.md","size":3672,"blob_sha":"bd7d785deb9eb8ee744ca8250b34ba715937b381","priority":0,"status":200,"text":"# Argo - The Workflow Engine for Kubernetes\n\n![Argo Image](argo.png)\n\n## News\n\nWe are excited to welcome [Cyrus Biotechnology](https://cyrusbio.com/), [Google](https://www.google.com/intl/en/about/our-company/) and [NVIDIA](http://www.nvidia.com/) as corporate members of the Argo Community! They have been active users of Argo for some time now and have decided to increase their participation in both the use and development of Argo. If you actively use Argo at your company and believe that your company may be interested in actively participating in the Argo Community, please ask a representative to contact saradhi_sreegiriraju@intuit.com for additional information.\n\nUpdated community documents, including CLAs, are available [here](https://github.com/argoproj/argo/tree/master/community). These documents are essentially identical to those used by CNCF projects such as Kubernetes and are designed to protect Argo's contributors, users and Intuit, the current custodian of the Argo Project.\n\nWe will be scheduling the first Argo Community Meeting for the beginning of May to get to know each other, review the current Argo projects, and gather feedback for future projects. Please stay tuned for additional details.\n\n## What is Argo?\nArgo is an open source container-native workflow engine for getting work done on Kubernetes. Argo is implemented as a Kubernetes CRD (Custom Resource Definition).\n\n* Define workflows where each step in the workflow is a container.\n* Model multi-step workflows as a sequence of steps or capture the dependencies between tasks using a graph (DAG).\n* Easily leverage Kubernetes to run compute intensive jobs like data processing or machine learning jobs in a fraction of the time using Argo workflows.\n* Run rich CI/CD pipelines using Docker-in-Docker, built-in artifact management, secret management and native access to other Kubernetes resources.\n\n## Why Argo?\n* Argo is designed from the ground up for containers without the overhead and limitations of legacy VM and server-based environments.\n* Argo is cloud agnostic and can run on any kubernetes cluster.\n* Argo with Kubernetes puts a cloud-scale supercomputer at your fingertips.\n* We want to make it as easy to run Argo workflows on Kubernetes as it is to run jobs on you laptop.\n\n## Documentation\n* [Get started here](https://github.com/argoproj/argo/blob/master/demo.md)\n* [How to write Argo workflow specs](https://github.com/argoproj/argo/blob/master/examples/README.md)\n* [How to configure your artifact repository](https://github.com/argoproj/argo/blob/master/ARTIFACT_REPO.md)\n\n## Who uses Argo?\nAs the Argo Community grows, we'd like to keep track of our users. Please send a PR with your organization name.\n\nCurrently **officially** using Argo:\n\n1. [CoreFiling](https://www.corefiling.com/)\n1. [Cyrus Biotechnology](https://cyrusbio.com/)\n1. [Gladly](https://gladly.com/)\n1. [Google](https://www.google.com/intl/en/about/our-company/)\n1. [Intuit](https://www.intuit.com/)\n1. [NVIDIA](https://www.nvidia.com/)\n\n## Presentations\n* TGI Kubernetes with Joe Beda: [Argo workflow system](https://www.youtube.com/watch?v=M_rxPPLG8pU&start=859)\n\n## Community Blogs\n* [Argo integration review](http://dev.matt.hillsdon.net/2018/03/24/argo-integration-review.html)\n* Please share your own thoughs\n\n## Project Resources\n* Argo GitHub:  https://github.com/argoproj\n* Argo Slack:   [click here to join](https://join.slack.com/t/argoproj/shared_invite/enQtMzExODU3MzIyNjYzLTA5MTFjNjI0Nzg3NzNiMDZiNmRiODM4Y2M1NWQxOGYzMzZkNTc1YWVkYTZkNzdlNmYyZjMxNWI3NjY2MDc1MzI)\n* Argo website: https://argoproj.github.io/argo-site\n* Argo forum:   https://groups.google.com/forum/#!forum/argoproj\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C074:3E724:1801A3:5E306D:6AB92A70"},"text_sha256":"5b677bb7075cb86eb37c189a2938e7f6ee44efe51b7ca6cf79eb95e147a6b047"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2630","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:17E444B:1C06E33:6AB92A72"},"commit":{"sha":"913be5f2c6b2c5f1cf360dc2323a1b4a7da51788","url":"https://github.com/argoproj/argo-workflows/commit/913be5f2c6b2c5f1cf360dc2323a1b4a7da51788","date":"2026-06-30T22:31:46Z","author_date":"2026-06-30T22:31:46Z","committer_date":"2026-06-30T22:31:46Z","tree_sha":"be635d8cb89a4ee2a178b5eccdbf17d0e8b427d4","message_first_line":"fix(ci): trigger Codegen when its source inputs change (#16308)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2629","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17C74B6:1BE9FA4:6AB92A72"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10018,"blob_sha":"3cd4ee13478c7f9b3f4ef7f80431fe57eedc3bf1","priority":0},{"path":"docs/security.md","size":7161,"blob_sha":"0041351e369fe4a5128bfa96cf08ed51ae408fb3","priority":1},{"path":"docs/survey-data-privacy.md","size":89,"blob_sha":"fbeeb3f140ecc8679d21a5247baa54014c7359e5","priority":1},{"path":"docs/workflow-pod-security-context.md","size":2051,"blob_sha":"239883bbca49d6be1c53136a3e2a222b52ab6300","priority":1},{"path":"sdks/java/client/docs/ContainerResizePolicy.md","size":491,"blob_sha":"45eebacae2dd263e622df94316dc4700321ba834","priority":1},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1K8SResourcePolicy.md","size":455,"blob_sha":"f6e617a5c05c4f23fc95461f8034d952f9ba4a0a","priority":1},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1StatusPolicy.md","size":233,"blob_sha":"44eb4d27430cf4f1e4dd05e7d28cc6cc0c29e4e9","priority":1},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1TriggerPolicy.md","size":512,"blob_sha":"c14478075829625789d8f4f35a4daafbdd036893","priority":1},{"path":"sdks/java/client/docs/IoK8sApiPolicyV1PodDisruptionBudgetSpec.md","size":1723,"blob_sha":"af20444991fba29c1025ad8330306dcb9d5abcdd","priority":1},{"path":"sdks/java/client/docs/WindowsSecurityContextOptions.md","size":1325,"blob_sha":"ff3d01a0774ec33e8ef07dd39b49619e0659858e","priority":1},{"path":"SECURITY.md","size":1049,"blob_sha":"c1e57c2554a22391c89ab1510fa915e1043eb457","priority":1}],"documents":[{"path":"README.md","size":10018,"blob_sha":"3cd4ee13478c7f9b3f4ef7f80431fe57eedc3bf1","priority":0,"status":200,"text":"<!-- markdownlint-disable-next-line MD041 -->\n[![Security Status](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml/badge.svg?branch=main)](https://github.com/argoproj/argo-workflows/actions/workflows/snyk.yml?query=branch%3Amain)\n[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/3830/badge)](https://bestpractices.coreinfrastructure.org/projects/3830)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows/badge)](https://api.securityscorecards.dev/projects/github.com/argoproj/argo-workflows)\n[![FOSSA License Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fargoproj%2Fargo-workflows?ref=badge_shield)\n[![Slack](https://img.shields.io/badge/slack-argoproj-brightgreen.svg?logo=slack)](https://argoproj.github.io/community/join-slack)\n[![X Follow](https://img.shields.io/twitter/follow/argoproj?style=social)](https://x.com/argoproj)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-argoproj-blue.svg?logo=linkedin)](https://www.linkedin.com/company/argoproj/)\n[![Bluesky](https://img.shields.io/badge/Bluesky-argoproj-blue.svg?style=social&logo=bluesky)](https://bsky.app/profile/argoproj.bsky.social)\n[![Release Version](https://img.shields.io/github/v/release/argoproj/argo-workflows?label=argo-workflows)](https://github.com/argoproj/argo-workflows/releases/latest)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/argo-workflows)](https://artifacthub.io/packages/helm/argo/argo-workflows)\n\n## What is Argo Workflows?\n\nArgo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes.\nArgo Workflows is implemented as a Kubernetes CRD (Custom Resource Definition).\n\n* Define workflows where each step is a container.\n* Model multi-step workflows as a sequence of tasks or capture the dependencies between tasks using a directed acyclic graph (DAG).\n* Easily run compute intensive jobs for machine learning or data processing in a fraction of the time using Argo Workflows on Kubernetes.\n\nArgo is a [Cloud Native Computing Foundation (CNCF)](https://cncf.io/) graduated project.\n\n## Use Cases\n\n* [Machine Learning pipelines](https://argo-workflows.readthedocs.io/en/latest/use-cases/machine-learning/)\n* [Data and batch processing](https://argo-workflows.readthedocs.io/en/latest/use-cases/data-processing/)\n* [Infrastructure automation](https://argo-workflows.readthedocs.io/en/latest/use-cases/infrastructure-automation/)\n* [CI/CD](https://argo-workflows.readthedocs.io/en/latest/use-cases/ci-cd/)\n* [Other use cases](https://argo-workflows.readthedocs.io/en/latest/use-cases/other/)\n\n## Why Argo Workflows?\n\n* Argo Workflows is the most popular workflow execution engine for Kubernetes.\n* Light-weight, scalable, and easier to use.\n    * Including for Python users through [the Hera Python SDK for Argo Workflows](https://hera.readthedocs.io/en/stable/).\n* Designed from the ground up for containers without the overhead and limitations of legacy VM and server-based environments.\n* Cloud agnostic and can run on any Kubernetes cluster.\n\n[Read what people said in our latest survey](https://blog.argoproj.io/argo-workflows-events-2023-user-survey-results-82c53bc30543)\n\n## Try Argo Workflows\n\nYou can try Argo Workflows via one of the following:\n\n1. [Interactive Training Material](https://killercoda.com/argoproj/course/argo-workflows/)\n1. [Access the demo environment](https://workflows.apps.argoproj.io/workflows/argo)\n\n![Screenshot](docs/assets/screenshot.png)\n\n## Who uses Argo Workflows?\n\n[About 200+ organizations are officially using Argo Workflows](USERS.md)\n\n## Ecosystem\n\nJust some of the projects that use or rely on Argo Workflows (complete list [here](https://github.com/akuity/awesome-argo#ecosystem-projects)):\n\n* [Argo Events](https://github.com/argoproj/argo-events)\n* [Hera](https://github.com/argoproj-labs/hera)\n* [Katib](https://github.com/kubeflow/katib)\n* [Kedro](https://kedro.readthedocs.io/en/stable/)\n* [Kubeflow Pipelines](https://github.com/kubeflow/pipelines)\n* [Netflix Metaflow](https://metaflow.org)\n* [Piper](https://github.com/quickube/piper)\n* [Seldon](https://github.com/SeldonIO/seldon-core)\n* [SQLFlow](https://github.com/sql-machine-learning/sqlflow)\n\n## Client Libraries\n\nCheck out our [Java, Golang, Python (Hera), and Typescript (Juno) clients](docs/client-libraries.md).\n\n## Quickstart\n\n* [Get started here](https://argo-workflows.readthedocs.io/en/latest/quick-start/)\n* [Walk-through examples](https://argo-workflows.readthedocs.io/en/latest/walk-through/)\n\n## Documentation\n\n[View the docs](https://argo-workflows.readthedocs.io/en/latest/)\n\n## Features\n\nAn incomplete list of features Argo Workflows provides:\n\n* UI to visualize and manage Workflows\n* Artifact support (S3, Artifactory, Alibaba Cloud OSS, Azure Blob Storage, HTTP, Git, GCS, raw, plugins)\n* Workflow templating to store commonly used Workflows in the cluster\n* Archiving Workflows after executing for later access\n* Scheduled workflows using cron\n* Server interface with REST API (HTTP and GRPC)\n* DAG or Steps based declaration of workflows\n* Step level input & outputs (artifacts/parameters)\n* Loops\n* Parameterization\n* Conditionals\n* Timeouts (step & workflow level)\n* Retry (step & workflow level)\n* Resubmit (memoized)\n* Suspend & Resume\n* Cancellation\n* K8s resource orchestration\n* Exit Hooks (notifications, cleanup)\n* Garbage collection of completed workflow\n* Scheduling (affinity/tolerations/node selectors)\n* Volumes (ephemeral/existing)\n* Parallelism limits\n* Daemoned steps\n* DinD (docker-in-docker)\n* Script steps\n* Event emission\n* Prometheus metrics\n* Multiple executors\n* Multiple pod and workflow garbage collection strategies\n* Automatically calculated resource usage per step\n* Java, Golang, Python (Hera), and Typescript (Juno) SDKs\n* Pod Disruption Budget support\n* Single-sign on (OAuth2/OIDC)\n* Webhook triggering\n* CLI\n* Out-of-the box and custom Prometheus metrics\n* Windows container support\n* Embedded widgets\n* Multiplex log viewer\n\n## Community Meetings\n\nWe host monthly community meetings where we and the community showcase demos and discuss the current and future state of the project. Feel free to join us!\nFor Community Meeting information, minutes and recordings, please [see here](https://bit.ly/argo-wf-cmty-mtng).\n\nParticipation in Argo Workflows is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md)\n\n## Community Blogs and Presentations\n\n* [Awesome-Argo: A Curated List of Awesome Projects and Resources Related to Argo](https://github.com/terrytangyuan/awesome-argo)\n* [Automation of Everything - How To Combine Argo Events, Workflows & Pipelines, CD, and Rollouts](https://youtu.be/XNXJtxkUKeY)\n* [Argo Workflows and Pipelines - CI/CD, Machine Learning, and Other Kubernetes Workflows](https://youtu.be/UMaivwrAyTA)\n* [Argo Ansible role: Provisioning Argo Workflows on OpenShift](https://medium.com/@marekermk/provisioning-argo-on-openshift-with-ansible-and-kustomize-340a1fda8b50)\n* [Argo Workflows vs Apache Airflow](http://bit.ly/30YNIvT)\n* [Beyond Prototypes: Production-Ready ML Systems with Metaflow and Argo](https://github.com/terrytangyuan/public-talks/tree/main/talks/kubecon-na-2023-metaflow-argo)\n* [CI/CD with Argo on Kubernetes](https://medium.com/@bouwe.ceunen/ci-cd-with-argo-on-kubernetes-28c1a99616a9)\n* [Define Your CI/CD Pipeline with Argo Workflows](https://haque-zubair.medium.com/define-your-ci-cd-pipeline-with-argo-workflows-25aefb02fa63)\n* [Distributed Machine Learning Patterns from Manning Publication](https://github.com/terrytangyuan/distributed-ml-patterns)\n* [Engineering Cloud Native AI Platform](https://github.com/terrytangyuan/public-talks/tree/main/talks/platform-con-2024-engineering-cloud-native-ai-platform)\n* [Managing Thousands of Automatic Machine Learning Experiments with Argo and Katib](https://github.com/terrytangyuan/public-talks/blob/main/talks/argocon-automl-experiments-2022)\n* [Autonomous Driving Data Pipelines Reconstruction With Argo Workflows](https://www.youtube.com/watch?v=oTgIQxbsLhU)\n* [Revolutionizing Scientific Simulations with Argo Workflows](https://www.youtube.com/watch?v=BYVf7GhfiRg)\n* [Running Argo Workflows Across Multiple Kubernetes Clusters](https://admiralty.io/blog/running-argo-workflows-across-multiple-kubernetes-clusters/)\n* [Scaling Kubernetes: Best Practices for Managing Large-Scale Batch Jobs with Spark and Argo Workflow](https://www.youtube.com/watch?v=KqEKRPjy4aE)\n* [Open Source Model Management Roundup: Polyaxon, Argo, and Seldon](https://www.anaconda.com/blog/developer-blog/open-source-model-management-roundup-polyaxon-argo-and-seldon/)\n* [Producing 200 OpenStreetMap extracts in 35 minutes using a scalable data workflow](https://www.interline.io/blog/scaling-openstreetmap-data-workflows/)\n* [Production-Ready AI Platform on Kubernetes](https://github.com/terrytangyuan/public-talks/tree/main/talks/kubecon-europe-2024-production-ai-platform-on-k8s)\n* [Argo integration review](http://dev.matt.hillsdon.net/2018/03/24/argo-integration-review.html)\n* TGI Kubernetes with Joe Beda: [Argo workflow system](https://www.youtube.com/watch?v=M_rxPPLG8pU&start=859)\n\n## Project Resources\n\n* [Argo Project GitHub organization](https://github.com/argoproj)\n* [Argo Website](https://argoproj.github.io/)\n* [Argo Slack](https://argoproj.github.io/community/join-slack)\n* [Contributing](docs/CONTRIBUTING.md)\n* [Governance](https://github.com/argoproj/argoproj/blob/main/community/GOVERNANCE.md)\n* [Code of Conduct](https://github.com/argoproj/argo-workflows/blob/main/CODE_OF_CONDUCT.md)\n\n## Security\n\nSee [SECURITY.md](SECURITY.md).\n\n## Generative AI\n\nContributions using generative AI tools must follow the [Argo project Generative AI policy](https://github.com/argoproj/argoproj/blob/main/community/genai.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C20:3AC15:17F03F:5E1EA1:6AB92A72"},"text_sha256":"0b1bfc95d099f8e523e58acb7ae93c40d8e974c5c21350ede0bf3804aa83806c"},{"path":"docs/security.md","size":7161,"blob_sha":"0041351e369fe4a5128bfa96cf08ed51ae408fb3","priority":1,"status":200,"text":"# Security\n\n[To report security issues](https://github.com/argoproj/argo-workflows/blob/main/SECURITY.md).\n\n💡 Read [Practical Argo Workflows Hardening](https://blog.argoproj.io/practical-argo-workflows-hardening-dd8429acc1ce).\n\n## Workflow Controller Security\n\nThis has three parts.\n\n### Controller Permissions\n\nThe controller has permission (via Kubernetes RBAC + its config map) with either all namespaces (cluster-scope install) or a single [managed namespace](managed-namespace.md) (namespace-install), notably:\n\n* List/get/update workflows, and cron-workflows.\n* Create/get/delete pods, PVCs, and PDBs.\n* List/get template, config maps, service accounts, and secrets.\n\nSee [`workflow-controller-cluster-role.yaml`](https://raw.githubusercontent.com/argoproj/argo-workflows/main/manifests/cluster-install/workflow-controller-rbac/workflow-controller-clusterrole.yaml) or [`workflow-controller-role.yaml`](https://raw.githubusercontent.com/argoproj/argo-workflows/main/manifests/namespace-install/workflow-controller-rbac/workflow-controller-role.yaml)\n\n### User Permissions\n\nUsers minimally need permission to create/read workflows.\nThe controller will then create workflow pods (config maps etc) on behalf of the users, even if the user does not have permission to do this themselves.\nThe controller will only create workflow pods in the workflow's namespace.\n\nA way to think of this is that, if the user has permission to create a workflow in a namespace, then it is OK to create pods or anything else for them in that namespace.\n\nIf the user only has permission to create workflows, then they will be typically unable to configure other necessary resources such as config maps, or view the outcome of their workflow.\nThis is useful when the user is a service.\n\n!!! Warning\n    If you allow users to create workflows in the controller's namespace (typically `argo`), it may be possible for users to modify the controller itself.  In a namespace-install the managed namespace should therefore not be the controller's namespace.\n\nYou can typically further restrict what a user can do to just being able to submit workflows from templates using [the workflow restrictions feature](workflow-restrictions.md).\n\nArgo Workflows is a Pod controller.\nIn the same way that a Kubernetes Deployment or Job can create arbitrary Pods, Argo Workflows can create arbitrary Pods.\nFor security purposes, with the exception of the workflow-restrictions feature, Argo Workflows does not attempt to restrict or prevent this.\nIn other words, if you can do something insecure with a Job you can do the same thing with a Workflow.\n\n#### UI Access\n\nIf you want a user to have read-only access to the entirety of the Argo UI for their namespace, a sample role for them may look like:\n\n```yaml\napiVersion: rbac.authorization.k8s.io/v1\nkind: Role\nmetadata:\n  name: ui-user-read-only\nrules:\n  # k8s standard APIs\n  - apiGroups:\n      - \"\"\n    resources:\n      - events\n      - pods\n      - pods/log\n    verbs:\n      - get\n      - list\n      - watch\n  # Argo APIs. See also https://github.com/argoproj/argo-workflows/blob/main/manifests/cluster-install/workflow-controller-rbac/workflow-aggregate-roles.yaml#L4\n  - apiGroups:\n      - argoproj.io\n    resources:\n      - eventsources\n      - sensors\n      - workflows\n      - workfloweventbindings\n      - workflowtemplates\n      - clusterworkflowtemplates\n      - cronworkflows\n      - workflowtaskresults\n    verbs:\n      - get\n      - list\n      - watch\n```\n\n### Workflow Pod Permissions\n\nWorkflow pods run using either:\n\n* The `default` service account.\n* The service account declared in the workflow spec.\n\nThere is no restriction on which service account in a namespace may be used.\n\nThis service account typically needs [permissions](workflow-rbac.md).\n\nDifferent service accounts should be used if a workflow pod needs to have elevated permissions, e.g. to create other resources.\n\nThe main container will have the service account token mounted, allowing the main container to patch pods (among other permissions).\nSet `automountServiceAccountToken` to false to prevent this. See [fields](fields.md).\n\nBy default, workflows pods run as `root`.\nTo further secure workflow pods, set the [workflow pod security context](workflow-pod-security-context.md).\n\nYou should configure the controller with the correct [workflow executor](workflow-executors.md) for your trade off between security and scalability.\n\nThese settings can be set by default using [workflow defaults](default-workflow-specs.md).\n\n## Argo Server Security\n\nArgo Server implements security in three layers.\n\nFirstly, you should enable [transport layer security](tls.md) to ensure your data cannot be read in transit.\n\nSecondly, you should enable an [authentication mode](argo-server.md#auth-mode) to ensure that you do not run workflows from unknown users.\n\nFinally, you should configure the `argo-server` role and role binding with the correct permissions.\n\n### Read-Only\n\nYou can achieve this by configuring the `argo-server` role ([example](https://github.com/argoproj/argo-workflows/blob/main/manifests/namespace-install/argo-server-rbac/argo-server-role.yaml) with only read access (i.e. only `get`/`list`/`watch` verbs)).\n\n## Network Security\n\nArgo Workflows requires various levels of network access depending on configuration and the features enabled.\nThe following describes the different workflow components and their network access needs, to help provide guidance on how to configure the argo namespace in a secure manner (e.g. `NetworkPolicy`).\n\n### Argo Server\n\nThe Argo Server is commonly exposed to end-users to provide users with a UI for visualizing and managing their workflows.\nIt must also be exposed if leveraging [webhooks](webhooks.md) to trigger workflows.\nBoth of these use cases require that the argo-server Service to be exposed for ingress traffic (e.g. with an Ingress object or load balancer).\nNote that the Argo UI is also available to be accessed by running the server locally (i.e. `argo server`) using local KUBECONFIG credentials, and visiting the UI over <https://localhost:2746>.\n\nThe Argo Server additionally has a feature to allow downloading of artifacts through the UI.\nThis feature requires that the argo-server be given egress access to the underlying artifact provider (e.g. S3, GCS, MinIO, Artifactory, Azure Blob Storage) in order to download and stream the artifact.\n\n### Workflow Controller\n\nThe workflow-controller Deployment exposes a Prometheus metrics endpoint (workflow-controller-metrics:9090) so that a Prometheus server can periodically scrape for controller level metrics.\nSince Prometheus is typically running in a separate namespace, the argo namespace should be configured to allow cross-namespace ingress access to the workflow-controller-metrics Service.\n\n### Database access\n\nA persistent store can be configured for either [archiving](workflow-archive.md) or [offloading](offloading-large-workflows.md) workflows.\nIf either of these features are enabled, both the workflow-controller and argo-server Deployments will need egress network access to the external database used for archiving/offloading.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"552A:3D501:184966:5E7938:6AB92A70"},"text_sha256":"80b4794c4bb5918a3afc3bd16a36cfc80da59082f6cb21a96dc3f4e2e15d1ad8"},{"path":"docs/survey-data-privacy.md","size":89,"blob_sha":"fbeeb3f140ecc8679d21a5247baa54014c7359e5","priority":1,"status":200,"text":"# Survey Data Privacy\n\n[Privacy policy](https://www.linuxfoundation.org/privacy-policy/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52AE:18233:179B17:5DC9B1:6AB92A74"},"text_sha256":"dc0a9f557503db30b27aff9ca82f58d17a2abff621becce869f76728873d024f"},{"path":"docs/workflow-pod-security-context.md","size":2051,"blob_sha":"239883bbca49d6be1c53136a3e2a222b52ab6300","priority":1,"status":200,"text":"# Workflow Pod Security Context\n\nThis document explains how to configure security context for Workflow Pods in Argo Workflows.\n\nRunning Workflow Pods as non-root is best practice for security.\n\nYou may need to do this if:\n\n* Your cluster requires [Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards), as enforced by [PSA](https://kubernetes.io/docs/concepts/security/pod-security-admission/) or other means.\n* You need to comply with security policies that restrict root access.\n\n## Basic Configuration\n\nBy default, all Workflow Pods run as root.\n\nYou can configure the [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your Workflow Pod.\n\nHere's a basic example that runs the Pod as a non-root user:\n\n```yaml\napiVersion: argoproj.io/v1alpha1\nkind: Workflow\nmetadata:\n  generateName: security-context-\nspec:\n  securityContext:\n    runAsNonRoot: true\n    runAsUser: 8737 # or any non-root user\n```\n\n!!! Warning \"It is easy to make a workflow need root unintentionally\"\n    You may find that user's workflows have been written to require root with seemingly innocuous code. E.g. `mkdir /my-dir` would require root.\n\n## Global Configuration\n\nYou can set these security context settings globally using [workflow defaults](default-workflow-specs.md).\n\n## Non-root Executor Image\n\nArgo provides a non-root executor image that runs by default as user 8737.\n\nThis is not the default executor for backwards compatibility, but using it is best practice.\nUse this image when your security policies restrict pulling images that run as root.\nYou can run this image as root by specifying `runAsUser: 0`.\n\nThe image is available at `quay.io/argoproj/argoexec:<version>-nonroot`.\n\nYou can configure this as the default executor image in the [workflow-controller-configmap](workflow-controller-configmap.yaml):\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: workflow-controller-configmap\ndata:\n  executor: |\n    image: quay.io/argoproj/argoexec:<version>-nonroot\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF7C:35EBC:177D49:5DACDC:6AB92A74"},"text_sha256":"c414af5a31518fdf7dc029d2d9b811704fb64ec178d6441dd27791cf4e400e50"},{"path":"sdks/java/client/docs/ContainerResizePolicy.md","size":491,"blob_sha":"45eebacae2dd263e622df94316dc4700321ba834","priority":1,"status":200,"text":"\n\n# ContainerResizePolicy\n\nContainerResizePolicy represents resource resize policy for the container.\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**resourceName** | **String** | Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. | \n**restartPolicy** | **String** | Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. | \n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0FA:3FA0D:1779E5:5DA938:6AB92A73"},"text_sha256":"4dd7bcd8ffcc0034457291993515b986f4378b1387ded9fc84dc5d537b1ebcaf"},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1K8SResourcePolicy.md","size":455,"blob_sha":"f6e617a5c05c4f23fc95461f8034d952f9ba4a0a","priority":1,"status":200,"text":"\n\n# GithubComArgoprojArgoEventsPkgApisEventsV1alpha1K8SResourcePolicy\n\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**backoff** | [**GithubComArgoprojArgoEventsPkgApisEventsV1alpha1Backoff**](GithubComArgoprojArgoEventsPkgApisEventsV1alpha1Backoff.md) |  |  [optional]\n**errorOnBackoffTimeout** | **Boolean** |  |  [optional]\n**labels** | **Map&lt;String, String&gt;** |  |  [optional]\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"22D2:09BF:B1663:2DE9BE:6AB92A74"},"text_sha256":"7090173c49bed65609090429407f0a6d218f95fde38e0c712118c34a91d94bae"},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1StatusPolicy.md","size":233,"blob_sha":"44eb4d27430cf4f1e4dd05e7d28cc6cc0c29e4e9","priority":1,"status":200,"text":"\n\n# GithubComArgoprojArgoEventsPkgApisEventsV1alpha1StatusPolicy\n\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**allow** | **List&lt;Integer&gt;** |  |  [optional]\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C04C:3E724:1801C6:5E30E4:6AB92A74"},"text_sha256":"f70fdce7892e4457075b10e15cdbe9211aae02b8f4197325be7b66fd2f176fd9"},{"path":"sdks/java/client/docs/GithubComArgoprojArgoEventsPkgApisEventsV1alpha1TriggerPolicy.md","size":512,"blob_sha":"c14478075829625789d8f4f35a4daafbdd036893","priority":1,"status":200,"text":"\n\n# GithubComArgoprojArgoEventsPkgApisEventsV1alpha1TriggerPolicy\n\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**k8s** | [**GithubComArgoprojArgoEventsPkgApisEventsV1alpha1K8SResourcePolicy**](GithubComArgoprojArgoEventsPkgApisEventsV1alpha1K8SResourcePolicy.md) |  |  [optional]\n**status** | [**GithubComArgoprojArgoEventsPkgApisEventsV1alpha1StatusPolicy**](GithubComArgoprojArgoEventsPkgApisEventsV1alpha1StatusPolicy.md) |  |  [optional]\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"545A:349C76:177829:5DA439:6AB92A71"},"text_sha256":"100c4f70298377d7aa31eaa0a532d3b79178489e95eff21fa15c3d80b23a674e"},{"path":"sdks/java/client/docs/IoK8sApiPolicyV1PodDisruptionBudgetSpec.md","size":1723,"blob_sha":"af20444991fba29c1025ad8330306dcb9d5abcdd","priority":1,"status":200,"text":"\n\n# IoK8sApiPolicyV1PodDisruptionBudgetSpec\n\nPodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**maxUnavailable** | **String** |  |  [optional]\n**minAvailable** | **String** |  |  [optional]\n**selector** | [**LabelSelector**](LabelSelector.md) |  |  [optional]\n**unhealthyPodEvictionPolicy** | **String** | UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type&#x3D;\\&quot;Ready\\&quot;,status&#x3D;\\&quot;True\\&quot;.  Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.  IfHealthyBudget policy means that running pods (status.phase&#x3D;\\&quot;Running\\&quot;), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.  AlwaysAllow policy means that all running pods (status.phase&#x3D;\\&quot;Running\\&quot;), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.  Additional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field. |  [optional]\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF90:727CE:174099:5D70C7:6AB92A74"},"text_sha256":"e0b841beb63bed395ff0fe4f780c660a10d4cc5a737fe11680ef5d4cdefa51a2"},{"path":"sdks/java/client/docs/WindowsSecurityContextOptions.md","size":1325,"blob_sha":"ff3d01a0774ec33e8ef07dd39b49619e0659858e","priority":1,"status":200,"text":"\n\n# WindowsSecurityContextOptions\n\nWindowsSecurityContextOptions contain Windows-specific options and credentials.\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**gmsaCredentialSpec** | **String** | GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. |  [optional]\n**gmsaCredentialSpecName** | **String** | GMSACredentialSpecName is the name of the GMSA credential spec to use. |  [optional]\n**hostProcess** | **Boolean** | HostProcess determines if a container should be run as a &#39;Host Process&#39; container. All of a Pod&#39;s containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. |  [optional]\n**runAsUserName** | **String** | The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. |  [optional]\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"38CC:1A3D83:185B99:5E8C0F:6AB92A75"},"text_sha256":"8e24d7ed210d244dd5aca9777ed6726d00aa21cbbd2b7f02ff9d9f6f621fbbbe"},{"path":"SECURITY.md","size":1049,"blob_sha":"c1e57c2554a22391c89ab1510fa915e1043eb457","priority":1,"status":200,"text":"# Security\n\n## Reporting a Vulnerability\n\nIf you find a security related bug in Argo Workflows, we kindly ask you for responsible\ndisclosure and for giving us appropriate time to react, analyze and develop a\nfix to mitigate the found security vulnerability.\n\nPlease report vulnerabilities by opening a draft GitHub Security Advisory: https://github.com/argoproj/argo-workflows/security/advisories/new\n\nAll vulnerabilities and associated information will be treated with full confidentiality.\n\n## Public Disclosure\n\nSecurity vulnerabilities will be disclosed via [release notes](CHANGELOG.md) and using the\n[GitHub Security Advisories](https://github.com/argoproj/argo-workflows/security/advisories)\nfeature to keep our community well informed, and will credit you for your findings (unless you prefer to stay anonymous, of course).\n\n## Vulnerability Scanning\n\nSee [static code analysis](docs/static-code-analysis.md).\n\n## Securing Argo Workflows\n\nSee [docs/security.md](docs/security.md) for information about securing your Argo Workflows instance.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9192:149227:180653:5E36DF:6AB92A75"},"text_sha256":"e5f1fc69768cb526519db276cb9b08704770cc7411282ef7ef427441de674ad8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=913be5f2c6b2c5f1cf360dc2323a1b4a7da51788; file=docs/survey-data-privacy.md; text=# Survey Data Privacy [Privacy policy]( )","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}}}
{"repository":"piskvorky/gensim","input_row":{"repository":"piskvorky/gensim","url":"https://github.com/piskvorky/gensim","name":"gensim","owner":"piskvorky","description":"Topic Modelling for Humans","language":"Python","license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1","license_osi_approved":"true","stars":16494,"issues":1882,"created_at":"2011-02-10T07:43:04Z","updated_at":"2026-09-26T20:44:34Z","first_commit_at":"2009-08-31T21:30:33Z","last_commit_at":"2025-10-16T11:13:19Z","activity_months":193.47999999999999,"ai_ml_match_topics":"machine-learning; neural-network; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:46.749Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"piskvorky/gensim","visibility":"public","created_at":"2011-02-10T07:43:04Z","updated_at":"2026-09-26T20:44:34Z","private":false,"fork":false,"archived":false,"stargazers_count":16494,"open_issues_count":440,"license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1"},"error":"","rate":{"github_remaining":"2628","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:17B187C:1BD45D4:6AB92A76"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2627","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:18076FF:1C2A3F1:6AB92A77"},"commit":{"sha":"8b810918d59781116794a6679999afdc76b857ef","url":"https://github.com/piskvorky/gensim/commit/8b810918d59781116794a6679999afdc76b857ef","date":"2018-05-01T05:43:27Z","author_date":"2018-05-01T05:43:27Z","committer_date":"2018-05-01T05:43:27Z","tree_sha":"29d2936d07408ec52e7a08da6abb7626ad1972e2","message_first_line":"Add `dtype` argument for `chunkize_serial`, fix `LdaModel` (#2027)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2626","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17B7AD0:1BD9360:6AB92A77"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12531,"blob_sha":"d2b9e865f549e7ece883f77bed6fed1dd46f1a26","priority":0}],"documents":[{"path":"README.md","size":12531,"blob_sha":"d2b9e865f549e7ece883f77bed6fed1dd46f1a26","priority":0,"status":200,"text":"gensim – Topic Modelling in Python\n==================================\n\n[![Build Status](https://travis-ci.org/RaRe-Technologies/gensim.svg?branch=develop)](https://travis-ci.org/RaRe-Technologies/gensim)\n[![GitHub release](https://img.shields.io/github/release/rare-technologies/gensim.svg?maxAge=3600)](https://github.com/RaRe-Technologies/gensim/releases)\n[![Conda-forge Build](https://anaconda.org/conda-forge/gensim/badges/version.svg)](https://anaconda.org/conda-forge/gensim)\n[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/gensim)\n[![DOI](https://zenodo.org/badge/DOI/10.13140/2.1.2393.1847.svg)](https://doi.org/10.13140/2.1.2393.1847)\n[![Mailing List](https://img.shields.io/badge/-Mailing%20List-brightgreen.svg)](https://groups.google.com/forum/#!forum/gensim)\n[![Gitter](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-09a3d5.svg)](https://gitter.im/RaRe-Technologies/gensim)\n[![Follow](https://img.shields.io/twitter/follow/gensim_py.svg?style=social&label=Follow)](https://twitter.com/gensim_py)\n\n\n\nGensim is a Python library for *topic modelling*, *document indexing*\nand *similarity retrieval* with large corpora. Target audience is the\n*natural language processing* (NLP) and *information retrieval* (IR)\ncommunity.\n\nFeatures\n--------\n\n-   All algorithms are **memory-independent** w.r.t. the corpus size\n    (can process input larger than RAM, streamed, out-of-core),\n-   **Intuitive interfaces**\n    -   easy to plug in your own input corpus/datastream (trivial\n        streaming API)\n    -   easy to extend with other Vector Space algorithms (trivial\n        transformation API)\n-   Efficient multicore implementations of popular algorithms, such as\n    online **Latent Semantic Analysis (LSA/LSI/SVD)**, **Latent\n    Dirichlet Allocation (LDA)**, **Random Projections (RP)**,\n    **Hierarchical Dirichlet Process (HDP)** or **word2vec deep\n    learning**.\n-   **Distributed computing**: can run *Latent Semantic Analysis* and\n    *Latent Dirichlet Allocation* on a cluster of computers.\n-   Extensive [documentation and Jupyter Notebook tutorials].\n\nIf this feature list left you scratching your head, you can first read\nmore about the [Vector Space Model] and [unsupervised document analysis]\non Wikipedia.\n\nSupport\n------------\n\nPlease raise potential bugs on [github](https://github.com/RaRe-Technologies/gensim/blob/develop/CONTRIBUTING.md). See [Contribution Guide](https://github.com/RaRe-Technologies/gensim/blob/develop/CONTRIBUTING.md) prior to raising an issue.\n\nIf you have an open-ended or a research question:\n\n-   [Mailing List] is the best option\n-   [Gitter chat room] is also available\n\n  [Mailing List]: https://groups.google.com/forum/#!forum/gensim\n  [Gitter chat room]: https://gitter.im/RaRe-Technologies/gensim\n\n\nInstallation\n------------\n\nThis software depends on [NumPy and Scipy], two Python packages for\nscientific computing. You must have them installed prior to installing\ngensim.\n\nIt is also recommended you install a fast BLAS library before installing\nNumPy. This is optional, but using an optimized BLAS such as [ATLAS] or\n[OpenBLAS] is known to improve performance by as much as an order of\nmagnitude. On OS X, NumPy picks up the BLAS that comes with it\nautomatically, so you don’t need to do anything special.\n\nThe simple way to install gensim is:\n\n    pip install -U gensim\n\nOr, if you have instead downloaded and unzipped the [source tar.gz]\npackage, you’d run:\n\n    python setup.py test\n    python setup.py install\n\nFor alternative modes of installation (without root privileges,\ndevelopment installation, optional install features), see the\n[documentation].\n\nThis version has been tested under Python 2.7, 3.5 and 3.6. Gensim’s github repo is hooked\nagainst [Travis CI for automated testing] on every commit push and pull\nrequest. Support for Python 2.6, 3.3 and 3.4 was dropped in gensim 1.0.0. Install gensim 0.13.4 if you *must* use Python 2.6, 3.3 or 3.4. Support for Python 2.5 was dropped in gensim 0.10.0; install gensim 0.9.1 if you *must* use Python 2.5). \n\nHow come gensim is so fast and memory efficient? Isn’t it pure Python, and isn’t Python slow and greedy?\n--------------------------------------------------------------------------------------------------------\n\nMany scientific algorithms can be expressed in terms of large matrix\noperations (see the BLAS note above). Gensim taps into these low-level\nBLAS libraries, by means of its dependency on NumPy. So while\ngensim-the-top-level-code is pure Python, it actually executes highly\noptimized Fortran/C under the hood, including multithreading (if your\nBLAS is so configured).\n\nMemory-wise, gensim makes heavy use of Python’s built-in generators and\niterators for streamed data processing. Memory efficiency was one of\ngensim’s [design goals], and is a central feature of gensim, rather than\nsomething bolted on as an afterthought.\n\nDocumentation\n-------------\n\n-   [QuickStart]\n-   [Tutorials]\n-   [Tutorial Videos]\n-   [Official API Documentation]\n\n  [QuickStart]: https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/gensim%20Quick%20Start.ipynb\n  [Tutorials]: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#tutorials\n  [Tutorial Videos]: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#videos\n  [Official Documentation and Walkthrough]: http://radimrehurek.com/gensim/\n  [Official API Documentation]: http://radimrehurek.com/gensim/apiref.html\n  \n---------\n\nAdopters\n--------\n\n\n\n| Name                                   | Logo                                                                                                                           | URL                                                                                              | Description                                                                                                                                                                                                           |\n|----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|                                                                                                                         \n| RaRe Technologies                            | ![rare](docs/src/readme_images/rare.png) | [rare-technologies.com](http://rare-technologies.com)                                                           | Machine learning & NLP consulting and training. Creators and maintainers of Gensim. |\n| Mindseye                            | ![mindseye](docs/src/readme_images/mindseye.png) | [mindseye.com](http://www.mindseyesolutions.com/)                                                           | Similarities in legal documents                                                    | \n| Talentpair                            | ![talent-pair](docs/src/readme_images/talent-pair.png) | [talentpair.com](http://talentpair.com)                                                           | Data science driving high-touch recruiting                                                    | \n| Tailwind          | ![tailwind](docs/src/readme_images/tailwind.png)| [Tailwindapp.com](https://www.tailwindapp.com/)| Post interesting and relevant content to Pinterest              |\n| Issuu          | ![issuu](docs/src/readme_images/issuu.png) | [Issuu.com](https://issuu.com/)| Gensim’s LDA module lies at the very core of the analysis we perform on each uploaded publication to figure out what it’s all about.\n| Sports Authority        |               ![sports-authority](docs/src/readme_images/sports-authority.png)               | [sportsauthority.com](https://en.wikipedia.org/wiki/Sports_Authority)| Text mining of customer surveys and social media sources |\n| Search Metrics        | ![search-metrics](docs/src/readme_images/search-metrics.png) | [searchmetrics.com](http://www.searchmetrics.com/)| Gensim word2vec used for entity disambiguation in Search Engine Optimisation\n| Cisco Security        | ![cisco](docs/src/readme_images/cisco.png) | [cisco.com](http://www.cisco.com/c/en/us/products/security/index.html)|  Large-scale fraud detection\n|  12K Research         | ![12k](docs/src/readme_images/12k.png)| [12k.co](https://12k.co/)|   Document similarity analysis on media articles\n|  National Institutes of Health         | ![nih](docs/src/readme_images/nih.png) | [github/NIHOPA](https://github.com/NIHOPA/pipeline_word2vec)|   Processing grants and publications with word2vec\n|  Codeq LLC         | ![codeq](docs/src/readme_images/codeq.png) | [codeq.com](https://codeq.com)|   Document classification with word2vec\n| Mass Cognition     | ![mass-cognition](docs/src/readme_images/mass-cognition.png) | [masscognition.com](http://www.masscognition.com/)                                  | Topic analysis service for consumer text data and general text data |\n| Stillwater Supercomputing     | ![stillwater](docs/src/readme_images/stillwater.png) | [stillwater-sc.com](http://www.stillwater-sc.com/)                                  | Document comprehension and association with word2vec |\n| Channel 4     | ![channel4](docs/src/readme_images/channel4.png) | [channel4.com](http://www.channel4.com/)                                  | Recommendation engine |\n| Amazon     |  ![amazon](docs/src/readme_images/amazon.png) | [amazon.com](http://www.amazon.com/)                                  |  Document similarity|\n| SiteGround Hosting     |  ![siteground](docs/src/readme_images/siteground.png) | [siteground.com](https://www.siteground.com/)                                  | An ensemble search engine which uses different embeddings models and similarities, including word2vec, WMD, and LDA. |\n| Juju  | ![juju](docs/src/readme_images/juju.png) | [www.juju.com](http://www.juju.com/) | Provide non-obvious related job suggestions. |\n| NLPub | ![nlpub](docs/src/readme_images/nlpub.png) | [nlpub.org](https://nlpub.org/) | Distributional semantic models including word2vec. |\n|Capital One | ![capitalone](docs/src/readme_images/capitalone.png) | [www.capitalone.com](https://www.capitalone.com/) | Topic modeling for customer complaints exploration. |\n\n-------\n\nCiting gensim\n------------\n\nWhen [citing gensim in academic papers and theses], please use this\nBibTeX entry:\n\n    @inproceedings{rehurek_lrec,\n          title = {{Software Framework for Topic Modelling with Large Corpora}},\n          author = {Radim {\\v R}eh{\\r u}{\\v r}ek and Petr Sojka},\n          booktitle = {{Proceedings of the LREC 2010 Workshop on New\n               Challenges for NLP Frameworks}},\n          pages = {45--50},\n          year = 2010,\n          month = May,\n          day = 22,\n          publisher = {ELRA},\n          address = {Valletta, Malta},\n          note={\\url{http://is.muni.cz/publication/884893/en}},\n          language={English}\n    }\n\n  [citing gensim in academic papers and theses]: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=9vG_kV0AAAAJ&citation_for_view=9vG_kV0AAAAJ:NaGl4SEjCO4C\n\n  [Travis CI for automated testing]: https://travis-ci.org/RaRe-Technologies/gensim\n  [design goals]: http://radimrehurek.com/gensim/about.html\n  [RaRe Technologies]: http://rare-technologies.com/wp-content/uploads/2016/02/rare_image_only.png%20=10x20\n  [rare\\_tech]: //rare-technologies.com\n  [Talentpair]: https://avatars3.githubusercontent.com/u/8418395?v=3&s=100\n  [citing gensim in academic papers and theses]: https://scholar.google.cz/citations?view_op=view_citation&hl=en&user=9vG_kV0AAAAJ&citation_for_view=9vG_kV0AAAAJ:u-x6o8ySG0sC\n\n  \n  \n  [documentation and Jupyter Notebook tutorials]: https://github.com/RaRe-Technologies/gensim/#documentation\n  [Vector Space Model]: http://en.wikipedia.org/wiki/Vector_space_model\n  [unsupervised document analysis]: http://en.wikipedia.org/wiki/Latent_semantic_indexing\n  [NumPy and Scipy]: http://www.scipy.org/Download\n  [ATLAS]: http://math-atlas.sourceforge.net/\n  [OpenBLAS]: http://xianyi.github.io/OpenBLAS/\n  [source tar.gz]: http://pypi.python.org/pypi/gensim\n  [documentation]: http://radimrehurek.com/gensim/install.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A0B6:09ED:E4E29:3F37C2:6AB92A77"},"text_sha256":"1837435d4aab7592d477e629d1efc47bff1305003d0700aff7c0549878f086c7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2625","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17BE80F:1BE0838:6AB92A78"},"commit":{"sha":"37f90ec121eb7cd401448a947e80953e0c53ccdc","url":"https://github.com/piskvorky/gensim/commit/37f90ec121eb7cd401448a947e80953e0c53ccdc","date":"2025-10-16T11:13:19Z","author_date":"2025-10-16T11:13:19Z","committer_date":"2025-10-16T11:13:19Z","tree_sha":"bc55e59ca1fdf9397cf0d79ccc1854f78758726b","message_first_line":"Merge branch 'master' into develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"2624","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17C7919:1BEA4CD:6AB92A79"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10040,"blob_sha":"b876aaf8b2cfd2de782eba9a6163b1d9633a2486","priority":0},{"path":"docs/src/similarities/termsim.rst","size":251,"blob_sha":"90e00dde1bd69dbe056dd27adbc5370bfb616a0a","priority":1},{"path":"SECURITY.md","size":455,"blob_sha":"3cbff53d794930045a3f0a79367825ce9c775b6c","priority":1}],"documents":[{"path":"README.md","size":10040,"blob_sha":"b876aaf8b2cfd2de782eba9a6163b1d9633a2486","priority":0,"status":200,"text":"gensim – Topic Modelling in Python\n==================================\n\n<!--\nThe following image URLs are obfuscated = proxied and cached through\nGoogle because of Github's proxying issues. See:\nhttps://github.com/RaRe-Technologies/gensim/issues/2805\n-->\n\n[![Build Status](https://github.com/RaRe-Technologies/gensim/actions/workflows/tests.yml/badge.svg?branch=develop)](https://github.com/RaRe-Technologies/gensim/actions)\n[![GitHub release](https://img.shields.io/github/release/rare-technologies/gensim.svg?maxAge=3600)](https://github.com/RaRe-Technologies/gensim/releases)\n[![Downloads](https://img.shields.io/pypi/dm/gensim?color=blue)](https://pepy.tech/project/gensim/)\n[![DOI](https://zenodo.org/badge/DOI/10.13140/2.1.2393.1847.svg)](https://doi.org/10.13140/2.1.2393.1847)\n[![Mailing List](https://img.shields.io/badge/-Mailing%20List-blue.svg)](https://groups.google.com/g/gensim)\n[![Follow](https://img.shields.io/twitter/follow/gensim_py.svg?style=social&style=flat&logo=twitter&label=Follow&color=blue)](https://twitter.com/gensim_py)\n\nGensim is a Python library for *topic modelling*, *document indexing*\nand *similarity retrieval* with large corpora. Target audience is the\n*natural language processing* (NLP) and *information retrieval* (IR)\ncommunity.\n\n## ⚠️ Want to help out? [Sponsor Gensim](https://github.com/sponsors/piskvorky) ❤️\n\n## ⚠️ Gensim is in stable maintenance mode: we are not accepting new features, but bug and documentation fixes are still welcome! ⚠️\n\nFeatures\n--------\n\n-   All algorithms are **memory-independent** w.r.t. the corpus size\n    (can process input larger than RAM, streamed, out-of-core),\n-   **Intuitive interfaces**\n    -   easy to plug in your own input corpus/datastream (trivial\n        streaming API)\n    -   easy to extend with other Vector Space algorithms (trivial\n        transformation API)\n-   Efficient multicore implementations of popular algorithms, such as\n    online **Latent Semantic Analysis (LSA/LSI/SVD)**, **Latent\n    Dirichlet Allocation (LDA)**, **Random Projections (RP)**,\n    **Hierarchical Dirichlet Process (HDP)** or **word2vec deep\n    learning**.\n-   **Distributed computing**: can run *Latent Semantic Analysis* and\n    *Latent Dirichlet Allocation* on a cluster of computers.\n-   Extensive [documentation and Jupyter Notebook tutorials].\n\nIf this feature list left you scratching your head, you can first read\nmore about the [Vector Space Model] and [unsupervised document analysis]\non Wikipedia.\n\nInstallation\n------------\n\nThis software depends on [NumPy], a Python package for\nscientific computing. Please bear in mind that building NumPy from source\n(e.g. by installing gensim on a platform which lacks NumPy .whl distribution)\nis a non-trivial task involving [linking NumPy to a BLAS library].  \nIt is recommended to provide a fast one (such as MKL, [ATLAS] or\n[OpenBLAS]) which can improve performance by as much as an order of\nmagnitude. On OSX, NumPy picks up its vecLib BLAS automatically,\nso you don’t need to do anything special.\n\nInstall the latest version of gensim:\n\n```bash\n    pip install --upgrade gensim\n```\n\nOr, if you have instead downloaded and unzipped the [source tar.gz]\npackage:\n\n```bash\n    tar -xvzf gensim-X.X.X.tar.gz\n    cd gensim-X.X.X/\n    pip install .\n```\n\nFor alternative modes of installation, see the [documentation].\n\nGensim is being [continuously tested](https://radimrehurek.com/gensim/#testing) under all\n[supported Python versions](https://github.com/RaRe-Technologies/gensim/wiki/Gensim-And-Compatibility).\nSupport for Python 2.7 was dropped in gensim 4.0.0 – install gensim 3.8.3 if you must use Python 2.7.\n\nHow come gensim is so fast and memory efficient? Isn’t it pure Python, and isn’t Python slow and greedy?\n--------------------------------------------------------------------------------------------------------\n\nMany scientific algorithms can be expressed in terms of large matrix\noperations (see the BLAS note above). Gensim taps into these low-level\nBLAS libraries, by means of its dependency on NumPy. So while\ngensim-the-top-level-code is pure Python, it actually executes highly\noptimized Fortran/C under the hood, including multithreading (if your\nBLAS is so configured).\n\nMemory-wise, gensim makes heavy use of Python’s built-in generators and\niterators for streamed data processing. Memory efficiency was one of\ngensim’s [design goals], and is a central feature of gensim, rather than\nsomething bolted on as an afterthought.\n\nDocumentation\n-------------\n\n-   [QuickStart]\n-   [Tutorials]\n-   [Official API Documentation]\n\n  [QuickStart]: https://radimrehurek.com/gensim/auto_examples/core/run_core_concepts.html\n  [Tutorials]: https://radimrehurek.com/gensim/auto_examples/\n  [Official Documentation and Walkthrough]: https://radimrehurek.com/gensim/\n  [Official API Documentation]: https://radimrehurek.com/gensim/auto_examples/index.html#documentation\n\nSupport\n-------\n\nFor commercial support, please see [Gensim sponsorship](https://github.com/sponsors/piskvorky).\n\nAsk open-ended questions on the public [Gensim Mailing List](https://groups.google.com/g/gensim).\n\nRaise bugs on [Github](https://github.com/RaRe-Technologies/gensim/blob/develop/CONTRIBUTING.md) but please **make sure you follow the [issue template](https://github.com/RaRe-Technologies/gensim/blob/develop/ISSUE_TEMPLATE.md)**. Issues that are not bugs or fail to provide the requested details will be closed without inspection.\n\n\n---------\n\nAdopters\n--------\n\n| Company | Logo | Industry | Use of Gensim |\n|---------|------|----------|---------------|\n| [RARE Technologies](https://rare-technologies.com/) | ![rare](docs/src/readme_images/rare.png) | ML & NLP consulting | Creators of Gensim – this is us! |\n| [Amazon](http://www.amazon.com/) |  ![amazon](docs/src/readme_images/amazon.png) | Retail |  Document similarity. |\n| [National Institutes of Health](https://github.com/NIHOPA/pipeline_word2vec) | ![nih](docs/src/readme_images/nih.png) | Health | Processing grants and publications with word2vec. |\n| [Cisco Security](http://www.cisco.com/c/en/us/products/security/index.html) | ![cisco](docs/src/readme_images/cisco.png) | Security |  Large-scale fraud detection. |\n| [Mindseye](http://www.mindseyesolutions.com/) | ![mindseye](docs/src/readme_images/mindseye.png) | Legal | Similarities in legal documents. |\n| [Channel 4](http://www.channel4.com/) | ![channel4](docs/src/readme_images/channel4.png) | Media | Recommendation engine. |\n| [Talentpair](http://talentpair.com) | ![talent-pair](docs/src/readme_images/talent-pair.png) | HR | Candidate matching in high-touch recruiting. |\n| [Juju](http://www.juju.com/)  | ![juju](docs/src/readme_images/juju.png) | HR | Provide non-obvious related job suggestions. |\n| [Tailwind](https://www.tailwindapp.com/) | ![tailwind](docs/src/readme_images/tailwind.png) | Media | Post interesting and relevant content to Pinterest. |\n| [Issuu](https://issuu.com/) | ![issuu](docs/src/readme_images/issuu.png) | Media | Gensim's LDA module lies at the very core of the analysis we perform on each uploaded publication to figure out what it's all about. |\n| [Search Metrics](http://www.searchmetrics.com/) | ![search-metrics](docs/src/readme_images/search-metrics.png) | Content Marketing | Gensim word2vec used for entity disambiguation in Search Engine Optimisation. |\n| [12K Research](https://12k.com/) | ![12k](docs/src/readme_images/12k.png)| Media |   Document similarity analysis on media articles. |\n| [Stillwater Supercomputing](http://www.stillwater-sc.com/) | ![stillwater](docs/src/readme_images/stillwater.png) | Hardware | Document comprehension and association with word2vec. |\n| [SiteGround](https://www.siteground.com/) |  ![siteground](docs/src/readme_images/siteground.png) | Web hosting | An ensemble search engine which uses different embeddings models and similarities, including word2vec, WMD, and LDA. |\n| [Capital One](https://www.capitalone.com/) | ![capitalone](docs/src/readme_images/capitalone.png) | Finance | Topic modeling for customer complaints exploration. |\n\n-------\n\nCiting gensim\n------------\n\nWhen [citing gensim in academic papers and theses], please use this\nBibTeX entry:\n\n    @inproceedings{rehurek_lrec,\n          title = {{Software Framework for Topic Modelling with Large Corpora}},\n          author = {Radim {\\v R}eh{\\r u}{\\v r}ek and Petr Sojka},\n          booktitle = {{Proceedings of the LREC 2010 Workshop on New\n               Challenges for NLP Frameworks}},\n          pages = {45--50},\n          year = 2010,\n          month = May,\n          day = 22,\n          publisher = {ELRA},\n          address = {Valletta, Malta},\n          note={\\url{http://is.muni.cz/publication/884893/en}},\n          language={English}\n    }\n\n  [citing gensim in academic papers and theses]: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=9vG_kV0AAAAJ&citation_for_view=9vG_kV0AAAAJ:NaGl4SEjCO4C\n\n  [design goals]: https://radimrehurek.com/gensim/intro.html#design-principles\n  [RaRe Technologies]: https://rare-technologies.com/wp-content/uploads/2016/02/rare_image_only.png%20=10x20\n  [rare\\_tech]: //rare-technologies.com\n  [Talentpair]: https://avatars3.githubusercontent.com/u/8418395?v=3&s=100\n  [citing gensim in academic papers and theses]: https://scholar.google.cz/citations?view_op=view_citation&hl=en&user=9vG_kV0AAAAJ&citation_for_view=9vG_kV0AAAAJ:u-x6o8ySG0sC\n\n  [documentation and Jupyter Notebook tutorials]: https://github.com/RaRe-Technologies/gensim/#documentation\n  [Vector Space Model]: https://en.wikipedia.org/wiki/Vector_space_model\n  [unsupervised document analysis]: https://en.wikipedia.org/wiki/Latent_semantic_indexing\n  [NumPy]: https://numpy.org/install/\n  [linking NumPy to a BLAS library]: https://numpy.org/devdocs/building/blas_lapack.html\n  [ATLAS]: https://math-atlas.sourceforge.net/\n  [OpenBLAS]: https://xianyi.github.io/OpenBLAS/\n  [source tar.gz]: https://pypi.org/project/gensim/\n  [documentation]: https://radimrehurek.com/gensim/#install\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:17C36E:5DF37E:6AB92A77"},"text_sha256":"b7807b72e6a9588f399f921a5df35880eb22e868988ac1ea7411a71742a6fa71"},{"path":"docs/src/similarities/termsim.rst","size":251,"blob_sha":"90e00dde1bd69dbe056dd27adbc5370bfb616a0a","priority":1,"status":200,"text":":mod:`similarities.termsim` -- Term similarity queries\n========================================================================\n\n.. automodule:: gensim.similarities.termsim\n    :synopsis: Term similarity queries\n    :members:\n    :inherited-members:\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2678:3E724:1801FD:5E31C0:6AB92A7A"},"text_sha256":"bf16294ca9abae4a460af5b0798cd863c50042150c0ea1df28bdb7e21d879b6b"},{"path":"SECURITY.md","size":455,"blob_sha":"3cbff53d794930045a3f0a79367825ce9c775b6c","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nUse this section to tell people about which versions of your project are\ncurrently being supported with security updates.\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 4.  x   | :white_check_mark: |\n| < 4.0   | :x:                |\n\n## Reporting a Vulnerability\n\nOpen a ticket and add the \"security\" label to it.\nDescribe the vulnerability in general.\nWe'll reach out to you for specifics.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E63C:3AC5A:17E4B4:5E14BF:6AB92A75"},"text_sha256":"56036598d04b8497def73dc41b629ce99a1c46773d695dc47b6732366e0debcb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"treeverse/dvc","input_row":{"repository":"treeverse/dvc","url":"https://github.com/treeverse/dvc","name":"dvc","owner":"treeverse","description":"🦉 Data Versioning and ML Experiments","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":15887,"issues":4895,"created_at":"2017-03-04T08:16:33Z","updated_at":"2026-09-27T08:49:06Z","first_commit_at":"2017-03-04T08:16:33Z","last_commit_at":"2026-08-06T04:17:40Z","activity_months":113.06999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:51.084Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"treeverse/dvc","visibility":"public","created_at":"2017-03-04T08:16:33Z","updated_at":"2026-09-27T08:49:06Z","private":false,"fork":false,"archived":false,"stargazers_count":15887,"open_issues_count":214,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2623","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E6:731F6:17ECCA7:1C0F9FF:6AB92A7B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2622","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A6:71E0C:17EA586:1C0BDE7:6AB92A7B"},"commit":{"sha":"95870ce7692647d7ee9ba31d3b019543c6cc3348","url":"https://github.com/treeverse/dvc/commit/95870ce7692647d7ee9ba31d3b019543c6cc3348","date":"2018-05-24T17:08:22Z","author_date":"2018-05-24T17:08:22Z","committer_date":"2018-05-24T17:08:22Z","tree_sha":"faa1dd6c04076f66b7ab1556e8ff6bc38f59bb4a","message_first_line":"README: fix typo in format"},"tree_request_status":200,"tree_rate":{"github_remaining":"2621","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0811:767EB:17ED96E:1C10A9B:6AB92A7B"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5256,"blob_sha":"8cb7ea0ab49f188c317911d8e165e9edec922af6","priority":0}],"documents":[{"path":"README.rst","size":5256,"blob_sha":"8cb7ea0ab49f188c317911d8e165e9edec922af6","priority":0,"status":200,"text":".. image:: https://img.shields.io/travis/dataversioncontrol/dvc/master.svg?label=Linux%20%26%20Mac%20OS\n  :target: https://travis-ci.org/dataversioncontrol/dvc\n\n.. image:: https://img.shields.io/appveyor/ci/dataversioncontrol/dvc/master.svg?label=Windows\n  :target: https://ci.appveyor.com/project/dataversioncontrol/dvc/branch/master\n\n.. image:: https://codeclimate.com/github/dataversioncontrol/dvc/badges/gpa.svg\n  :target: https://codeclimate.com/github/dataversioncontrol/dvc\n\n.. image:: https://codecov.io/gh/dataversioncontrol/dvc/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/dataversioncontrol/dvc\n\nData Version Control or DVC is an open source tool for data science projects. \nIt helps data scientists manage their code and data together in a simple form of Git-like commands.\n\nGet started\n===========\n+-----------------------------------+-------------------------------------------------------------------+\n| Step                              | Command                                                           |\n+===================================+===================================================================+\n| Track code and data together      | | ``$ git add train.py``                                          |\n|                                   | | ``$ dvc add images.zip``                                        |\n+-----------------------------------+-------------------------------------------------------------------+\n| Connect code and data by commands | | ``$ dvc run -d images.zip -o images/ unzip -q images.zip``      |\n|                                   | | ``$ dvc run -d images/ -d train.py -o model.p python train.py`` |\n+-----------------------------------+-------------------------------------------------------------------+\n| Make changes and reproduce        | | ``$ vi train.py``                                               |\n|                                   | | ``$ dvc repro model.p.dvc``                                     |\n+-----------------------------------+-------------------------------------------------------------------+\n| Share code                        | | ``$ git add .``                                                 |\n|                                   | | ``$ git commit -m 'The baseline model'``                        |\n|                                   | | ``$ git push``                                                  |\n+-----------------------------------+-------------------------------------------------------------------+\n| Share data and ML models          | | ``$ dvc remote add myremote s3://mybucket/image_cnn``           |\n|                                   | | ``$ dvc core.remote myremote``                                  |\n|                                   | | ``$ dvc push``                                                  |\n+-----------------------------------+-------------------------------------------------------------------+\n\nSee more in `tutorial <https://blog.dataversioncontrol.com/data-version-control-tutorial-9146715eda46>`_.\n\nInstallation\n============\n\nPackages\n--------\n\nOperating system dependent packages are the recommended way to install DVC.\nThe latest version of the packages can be found at GitHub releases page: https://github.com/dataversioncontrol/dvc/releases\n\nPython Pip\n----------\n\nDVC could be installed via the Python Package Index (PyPI).\n\n.. code-block:: bash\n\n   pip install dvc\n\nHomebrew (Mac OS)\n-----------------\n\nFormula:\n^^^^^^^^\n\n.. code-block:: bash\n\n   brew install dataversioncontrol/homebrew-dvc/dvc\n\nCask:\n^^^^^\n\n.. code-block:: bash\n\n   brew cask install dataversioncontrol/homebrew-dvc/dvc\n\nLinks\n=====\n\nWebsite: https://dataversioncontrol.com\n\nTutorial: https://blog.dataversioncontrol.com/data-version-control-tutorial-9146715eda46\n\nDocumentation: http://dataversioncontrol.com/docs/\n\nDiscussion: https://discuss.dataversioncontrol.com/\n\nRelated technologies\n====================\n\n\n#. `Git-annex <https://git-annex.branchable.com/>`_ - DVC uses the idea of storing the content of large files (that you don't want to see in your Git repository) in a local key-value store and uses file hardlinks/symlinks instead of the copying actual files.\n#. `Git-LFS <https://git-lfs.github.com/>`_.\n#. Makefile (and it's analogues). DVC tracks dependencies (DAG). \n#. `Workflow Management Systems <https://en.wikipedia.org/wiki/Workflow_management_system>`_. DVC is workflow management system designed specificaly to manage machine learning experiments. DVC was built on top of Git.\n\nDVC is compatible with Git for storing code and the dependency graph (DAG), but not data files cache.\nData files caches can be transferred separately - now data cache transfer throught AWS S3 and GCP storge are supported.\n\nHow DVC works\n=============\n\n\n.. image:: https://s3-us-west-2.amazonaws.com/dvc-share/images/0.9/how_dvc_works.png\n   :target: https://s3-us-west-2.amazonaws.com/dvc-share/images/0.9/how_dvc_works.png\n   :alt: how_dvc_works\n\n\nCopyright\n=========\n\nThis project is distributed under the Apache license version 2.0 (see the LICENSE file in the project root).\n\nBy submitting a pull request for this project, you agree to license your contribution under the Apache license version 2.0 to this project.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"289E:149227:1806A2:5E37B8:6AB92A7C"},"text_sha256":"dce48f90151a9cf4977132b3219f6c12254c041b424ac71aa59803ca5b7fce0d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2620","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:17F7822:1C19CAE:6AB92A7C"},"commit":{"sha":"8131c32c336b2f0cb47cb8782141d899a4876b8e","url":"https://github.com/treeverse/dvc/commit/8131c32c336b2f0cb47cb8782141d899a4876b8e","date":"2026-06-02T08:22:40Z","author_date":"2026-06-02T08:22:40Z","committer_date":"2026-06-02T08:22:40Z","tree_sha":"d49185c0c9f1f1e43540e8c60ccc8e311905e879","message_first_line":"[pre-commit.ci] pre-commit autoupdate (#11048)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2619","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17DD827:1C00222:6AB92A7D"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":12874,"blob_sha":"76cb7a57382a25f1ca7c0c55efef617b2d6a09ea","priority":0}],"documents":[{"path":"README.rst","size":12874,"blob_sha":"76cb7a57382a25f1ca7c0c55efef617b2d6a09ea","priority":0,"status":200,"text":"|Banner|\n\n`Website <https://dvc.org>`_\n• `Docs <https://dvc.org/doc>`_\n• `Blog <http://blog.dataversioncontrol.com>`_\n• `Tutorial <https://dvc.org/doc/get-started>`_\n• `Related Technologies <https://dvc.org/doc/user-guide/related-technologies>`_\n• `How DVC works`_\n• `VS Code Extension`_\n• `Installation`_\n• `Contributing`_\n• `Community and Support`_\n\n|CI| |Python Version| |Coverage| |VS Code| |DOI|\n\n|PyPI| |PyPI Downloads| |Packages| |Brew| |Conda| |Choco| |Snap|\n\n|\n\n**Data Version Control** or **DVC** is a command line tool and `VS Code Extension`_ to help you develop reproducible machine learning projects:\n\n#. **Version** your data and models.\n   Store them in your cloud storage but keep their version info in your Git repo.\n\n#. **Iterate** fast with lightweight pipelines.\n   When you make changes, only run the steps impacted by those changes.\n\n#. **Track** experiments in your local Git repo (no servers needed).\n\n#. **Compare** any data, code, parameters, model, or performance plots.\n\n#. **Share** experiments and automatically reproduce anyone's experiment.\n\nQuick start\n===========\n\n    Please read our `Command Reference <https://dvc.org/doc/command-reference>`_ for a complete list.\n\nA common CLI workflow includes:\n\n\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Task                              | Terminal                                                                                           |\n+===================================+====================================================================================================+\n| Track data                        | | ``$ git add train.py params.yaml``                                                               |\n|                                   | | ``$ dvc add images/``                                                                            |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Connect code and data             | | ``$ dvc stage add -n featurize -d images/ -o features/ python featurize.py``                     |\n|                                   | | ``$ dvc stage add -n train -d features/ -d train.py -o model.p -M metrics.json python train.py`` |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Make changes and experiment       | | ``$ dvc exp run -n exp-baseline``                                                                |\n|                                   | | ``$ vi train.py``                                                                                |\n|                                   | | ``$ dvc exp run -n exp-code-change``                                                             |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Compare and select experiments    | | ``$ dvc exp show``                                                                               |\n|                                   | | ``$ dvc exp apply exp-baseline``                                                                 |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Share code                        | | ``$ git add .``                                                                                  |\n|                                   | | ``$ git commit -m 'The baseline model'``                                                         |\n|                                   | | ``$ git push``                                                                                   |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n| Share data and ML models          | | ``$ dvc remote add myremote -d s3://mybucket/image_cnn``                                         |\n|                                   | | ``$ dvc push``                                                                                   |\n+-----------------------------------+----------------------------------------------------------------------------------------------------+\n\nHow DVC works\n=============\n\n    We encourage you to read our `Get Started\n    <https://dvc.org/doc/get-started>`_ docs to better understand what DVC\n    does and how it can fit your scenarios.\n\nThe closest *analogies* to describe the main DVC features are these:\n\n#. **Git for data**: Store and share data artifacts (like Git-LFS but without a server) and models, connecting them with a Git repository. Data management meets GitOps!\n#. **Makefiles** for ML: Describes how data or model artifacts are built from other data and code in a standard format. Now you can version your data pipelines with Git.\n#. Local **experiment tracking**: Turn your machine into an ML experiment management platform, and collaborate with others using existing Git hosting (Github, Gitlab, etc.).\n\nGit is employed as usual to store and version code (including DVC meta-files as placeholders for data).\nDVC `stores data and model files <https://dvc.org/doc/start/data-management>`_ seamlessly in a cache outside of Git, while preserving almost the same user experience as if they were in the repo.\nTo share and back up the *data cache*, DVC supports multiple remote storage platforms - any cloud (S3, Azure, Google Cloud, etc.) or on-premise network storage (via SSH, for example).\n\n|Flowchart|\n\n`DVC pipelines <https://dvc.org/doc/start/data-management/data-pipelines>`_ (computational graphs) connect code and data together.\nThey specify all steps required to produce a model: input dependencies including code, data, commands to run; and output information to be saved.\n\nLast but not least, `DVC Experiment Versioning <https://dvc.org/doc/start/experiments>`_ lets you prepare and run a large number of experiments.\nTheir results can be filtered and compared based on hyperparameters and metrics, and visualized with multiple plots.\n\n.. _`VS Code Extension`:\n\nVS Code Extension\n=================\n\n|VS Code|\n\nTo use DVC as a GUI right from your VS Code IDE, install the `DVC Extension <https://marketplace.visualstudio.com/items?itemName=Iterative.dvc>`_ from the Marketplace.\nIt currently features experiment tracking and data management, and more features (data pipeline support, etc.) are coming soon!\n\n|VS Code Extension Overview|\n\n    Note: You'll have to install core DVC on your system separately (as detailed\n    below). The Extension will guide you if needed.\n\nInstallation\n============\n\nThere are several ways to install DVC: in VS Code; using ``snap``, ``choco``, ``brew``, ``conda``, ``pip``; or with an OS-specific package.\nFull instructions are `available here <https://dvc.org/doc/get-started/install>`_.\n\nSnapcraft (Linux)\n-----------------\n\n|Snap|\n\n.. code-block:: bash\n\n   snap install dvc --classic\n\nThis corresponds to the latest tagged release.\nAdd ``--beta`` for the latest tagged release candidate, or ``--edge`` for the latest ``main`` version.\n\nChocolatey (Windows)\n--------------------\n\n|Choco|\n\n.. code-block:: bash\n\n   choco install dvc\n\nBrew (mac OS)\n-------------\n\n|Brew|\n\n.. code-block:: bash\n\n   brew install dvc\n\nAnaconda (Any platform)\n-----------------------\n\n|Conda|\n\n.. code-block:: bash\n\n   conda install -c conda-forge mamba # installs much faster than conda\n   mamba install -c conda-forge dvc\n\nDepending on the remote storage type you plan to use to keep and share your data, you might need to install optional dependencies: `dvc-s3`, `dvc-azure`, `dvc-gdrive`, `dvc-gs`, `dvc-oss`, `dvc-ssh`.\n\nPyPI (Python)\n-------------\n\n|PyPI|\n\n.. code-block:: bash\n\n   pip install dvc\n\nDepending on the remote storage type you plan to use to keep and share your data, you might need to specify one of the optional dependencies: ``s3``, ``gs``, ``azure``, ``oss``, ``ssh``. Or ``all`` to include them all.\nThe command should look like this: ``pip install 'dvc[s3]'`` (in this case AWS S3 dependencies such as ``boto3`` will be installed automatically).\n\nTo install the development version, run:\n\n.. code-block:: bash\n\n   pip install \"dvc @ git+https://github.com/treeverse/dvc\"\n\nPackage (Platform-specific)\n---------------------------\n\n|Packages|\n\nSelf-contained packages for Linux, Windows, and Mac are available.\nThe latest version of the packages can be found on the GitHub `releases page <https://github.com/treeverse/dvc/releases>`_.\n\nUbuntu / Debian (deb)\n^^^^^^^^^^^^^^^^^^^^^\n.. code-block:: bash\n\n   sudo wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list\n   wget -qO - https://dvc.org/deb/iterative.asc | sudo apt-key add -\n   sudo apt update\n   sudo apt install dvc\n\nFedora / CentOS (rpm)\n^^^^^^^^^^^^^^^^^^^^^\n.. code-block:: bash\n\n   sudo wget https://dvc.org/rpm/dvc.repo -O /etc/yum.repos.d/dvc.repo\n   sudo rpm --import https://dvc.org/rpm/iterative.asc\n   sudo yum update\n   sudo yum install dvc\n\nContributing\n============\n\nContributions are welcome!\nPlease see our `Contributing Guide <https://dvc.org/doc/user-guide/contributing/core>`_ for more details.\nThanks to all our contributors!\n\n|Contribs|\n\nCommunity and Support\n=====================\n\n* `Twitter <https://twitter.com/DVCorg>`_\n* `Forum <https://discuss.dvc.org/>`_\n* `Discord Chat <https://dvc.org/chat>`_\n* `Email <mailto:support@dvc.org>`_\n* `Mailing List <https://dvc.org/community#subscribe>`_\n\nCopyright\n=========\n\nThis project is distributed under the Apache license version 2.0 (see the LICENSE file in the project root).\n\nBy submitting a pull request to this project, you agree to license your contribution under the Apache license version 2.0 to this project.\n\nCitation\n========\n\n|DOI|\n\nIterative, *DVC: Data Version Control - Git for Data & Models* (2020)\n`DOI:10.5281/zenodo.012345 <https://doi.org/10.5281/zenodo.3677553>`_.\n\nBarrak, A., Eghan, E.E. and Adams, B. `On the Co-evolution of ML Pipelines and Source Code - Empirical Study of DVC Projects <https://mcis.cs.queensu.ca/publications/2021/saner.pdf>`_ , in Proceedings of the 28th IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2021. Hawaii, USA.\n\n\n.. |Banner| image:: https://dvc.org/img/logo-github-readme.png\n   :target: https://dvc.org\n   :alt: DVC logo\n\n.. |VS Code Extension Overview| image:: https://raw.githubusercontent.com/treeverse/vscode-dvc/main/extension/docs/overview.gif\n   :alt: DVC Extension for VS Code\n\n.. |CI| image:: https://github.com/treeverse/dvc/actions/workflows/tests.yaml/badge.svg\n   :target: https://github.com/treeverse/dvc/actions/workflows/tests.yaml\n   :alt: GHA Tests\n\n.. |Python Version| image:: https://img.shields.io/pypi/pyversions/dvc\n   :target: https://pypi.org/project/dvc\n   :alt: Python Version\n\n.. |Coverage| image:: https://codecov.io/gh/treeverse/dvc/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/treeverse/dvc\n   :alt: Codecov\n\n.. |Snap| image:: https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft\n   :target: https://snapcraft.io/dvc\n   :alt: Snapcraft\n\n.. |Choco| image:: https://img.shields.io/chocolatey/v/dvc?label=choco\n   :target: https://chocolatey.org/packages/dvc\n   :alt: Chocolatey\n\n.. |Brew| image:: https://img.shields.io/homebrew/v/dvc?label=brew\n   :target: https://formulae.brew.sh/formula/dvc\n   :alt: Homebrew\n\n.. |Conda| image:: https://anaconda.org/conda-forge/dvc/badges/version.svg\n   :target: https://anaconda.org/conda-forge/dvc\n   :alt: Conda-forge\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/dvc.svg?label=pip&logo=PyPI&logoColor=white\n   :target: https://pypi.org/project/dvc\n   :alt: PyPI\n\n.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/dvc.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold\n   :target: https://pypi.org/project/dvc\n   :alt: PyPI Downloads\n\n.. |Packages| image:: https://img.shields.io/badge/deb|pkg|rpm|exe-blue\n   :target: https://dvc.org/doc/install\n   :alt: deb|pkg|rpm|exe\n\n.. |DOI| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.3677553-blue.svg\n   :target: https://doi.org/10.5281/zenodo.3677553\n   :alt: DOI\n\n.. |Flowchart| image:: https://dvc.org/img/flow.gif\n   :target: https://dvc.org/img/flow.gif\n   :alt: how_dvc_works\n\n.. |Contribs| image:: https://contrib.rocks/image?repo=treeverse/dvc\n   :target: https://github.com/treeverse/dvc/graphs/contributors\n   :alt: Contributors\n\n.. |VS Code| image:: https://img.shields.io/visual-studio-marketplace/v/Iterative.dvc?color=blue&label=VSCode&logo=visualstudiocode&logoColor=blue\n   :target: https://marketplace.visualstudio.com/items?itemName=Iterative.dvc\n   :alt: VS Code Extension\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C934:372D9:17C521:5DF670:6AB92A7A"},"text_sha256":"d10985fd1a1efb7ee4a28c0a4dac8a3f40cebe564dc86404aa5300e659ddeb39"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kubeflow/kubeflow","input_row":{"repository":"kubeflow/kubeflow","url":"https://github.com/kubeflow/kubeflow","name":"kubeflow","owner":"kubeflow","description":"Machine Learning Toolkit for Kubernetes","language":"","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":15880,"issues":3785,"created_at":"2017-11-30T18:44:19Z","updated_at":"2026-09-27T11:15:27Z","first_commit_at":"2017-11-30T22:36:56Z","last_commit_at":"2026-08-21T18:25:34Z","activity_months":104.66,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:53.906Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kubeflow/kubeflow","visibility":"public","created_at":"2017-11-30T18:44:19Z","updated_at":"2026-09-27T11:15:27Z","private":false,"fork":false,"archived":false,"stargazers_count":15880,"open_issues_count":1,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2618","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:17F102D:1C13368:6AB92A7D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2617","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0865:B1202:1799797:1BBBAA6:6AB92A7E"},"commit":{"sha":"01ccdffb79e499ddd6ab5d2f60b8c0fbac5ac8df","url":"https://github.com/kubeflow/kubeflow/commit/01ccdffb79e499ddd6ab5d2f60b8c0fbac5ac8df","date":"2018-05-24T05:17:31Z","author_date":"2018-05-24T05:17:31Z","committer_date":"2018-05-24T05:17:31Z","tree_sha":"0f128c28a39947a28eead98b0f39d3a2fb14d33a","message_first_line":"ksonnet changes to support deploying the v1alpha2 TFJob operator. (#851)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2616","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AB:7307A:17B49F6:1BD712A:6AB92A7E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9424,"blob_sha":"a7cca0a366efdb3b3209dfce543ab51bd0107e77","priority":0}],"documents":[{"path":"README.md","size":9424,"blob_sha":"a7cca0a366efdb3b3209dfce543ab51bd0107e77","priority":0,"status":200,"text":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Kubeflow](#kubeflow)\n  - [Quick Links](#quick-links)\n  - [The Kubeflow Mission](#the-kubeflow-mission)\n  - [Who should consider using Kubeflow?](#who-should-consider-using-kubeflow)\n  - [Setup](#setup)\n  - [Quick Start](#quick-start)\n    - [Requirements](#requirements)\n    - [Steps](#steps)\n  - [Troubleshooting](#troubleshooting)\n  - [Resources](#resources)\n  - [Get Involved](#get-involved)\n    - [Who should consider contributing to Kubeflow?](#who-should-consider-contributing-to-kubeflow)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Kubeflow\n\nThe Kubeflow project is dedicated to making **deployments** of machine learning (ML) workflows on [Kubernetes](https://kubernetes.io/) simple, portable and scalable. Our goal is **not** to recreate other services, but to provide a straightforward way to deploy best-of-breed open-source systems **for ML** to diverse infrastructures. Anywhere you are running Kubernetes, you should be able to run Kubeflow.\n\n****\n\nThis repository contains the manifests for creating:\n\n* A [**JupyterHub**](https://jupyterhub.readthedocs.io/en/latest/) to create\n  and manage interactive [Jupyter notebooks](http://jupyter.org).\n  [Project Jupyter](http://jupyter.org/about) is a non-profit, open-source\n  project to support interactive data science and scientific computing across\n  all programming languages.\n* A [**TensorFlow Training Controller**](https://github.com/kubeflow/tf-operator) that can be configured to use either CPUs or GPUs and dynamically adjusted to the size of a cluster with a single setting\n* A **TensorFlow Serving** container to export trained TensorFlow models to Kubernetes\n\nThis document details the steps needed to run the Kubeflow project in any environment in which Kubernetes runs.\n\n## Quick Links\n* [Prow test dashboard](https://k8s-testgrid.appspot.com/sig-big-data)\n* [Prow jobs dashboard](https://prow.k8s.io/?repo=kubeflow%2Fkubeflow)\n* [Argo UI for E2E tests](http://testing-argo.kubeflow.org)\n\n## The Kubeflow Mission\n\nOur goal is to make scaling machine learning (ML) models and deploying them to production as simple as possible, by letting Kubernetes do what it's great at:\n- Easy, repeatable, portable deployments on a diverse infrastructure (laptop <-> ML rig <-> training cluster <-> production cluster)\n- Deploying and managing loosely-coupled microservices\n- Scaling based on demand\n\nBecause ML practitioners use a diverse set of tools, one of the key goals is to customize the stack based on user requirements (within reason) and let the system take care of the \"boring stuff\". While we have started with a narrow set of technologies, we are working with many different projects to include additional tooling.\n\nUltimately, we want to have a set of simple manifests that give you an easy to use ML stack _anywhere_ Kubernetes is already running, and can self configure based on the cluster it deploys into.\n\n## Who should consider using Kubeflow?\n\nBased on the current functionality you should consider using Kubeflow if:\n\n  * You want to train/serve TensorFlow models in different environments (e.g. local, on prem, and cloud)\n  * You want to use Jupyter notebooks to manage TensorFlow training jobs\n  * You want to launch training jobs that use resources -- such as additional\n    CPUs or GPUs -- that aren't available on your personal computer\n  * You want to combine TensorFlow with other processes\n       * For example, you may want to use [tensorflow/agents](https://github.com/tensorflow/agents) to run simulations to generate data for training reinforcement learning models.\n\nThis list is based ONLY on current capabilities. We are investing significant resources to expand the\nfunctionality and actively soliciting help from companies and individuals interested in contributing (see [below](README.md#who-should-consider-contributing-to-kubeflow)).\n\n## Setup\n\nThis documentation assumes you have a Kubernetes cluster already available. If you need help setting up a Kubernetes cluster please refer to [Kubernetes Setup](https://kubernetes.io/docs/setup/). Minikube users please check these [instructions](user_guide.md#minikube). If you want to use GPUs, be sure to follow the Kubernetes [instructions for enabling GPUs](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/).\n\n## Quick Start\n\n### Requirements\n\n  * ksonnet version [0.9.2](https://ksonnet.io/#get-started).\n  * Kubernetes >= 1.8 [see here](https://github.com/kubeflow/tf-operator#requirements)\n\n### Github Tokens\n\nIt is HIGHLY likely you'll overload Github's API if you are unauthenticated. To get around this, do the following steps:\n\n* Go to https://github.com/settings/tokens and generate a new token. You don't have to give it any access at all as you are simply authenticating.\n* Make sure you save that token someplace because you can't see it again. If you lose it you'll have to delete and create a new one.\n* Set an environment variable in your shell: export GITHUB_TOKEN=<token>. You may want to do this as part of your shell startup scripts (i.e. .profile).\n\n```\necho \"export GITHUB_TOKEN=${GITHUB_TOKEN}\" >> ~/.bashrc\n```\n\n### Steps\n\nIn order to quickly set up all components, execute the following commands:\n\n```commandline\n# Create a namespace for kubeflow deployment\nNAMESPACE=kubeflow\nkubectl create namespace ${NAMESPACE}\n\n# Which version of Kubeflow to use\n# For a list of releases refer to:\n# https://github.com/kubeflow/kubeflow/releases\nVERSION=v0.1.2\n\n# Initialize a ksonnet app. Set the namespace for it's default environment.\nAPP_NAME=my-kubeflow\nks init ${APP_NAME}\ncd ${APP_NAME}\nks env set default --namespace ${NAMESPACE}\n\n# Install Kubeflow components\nks registry add kubeflow github.com/kubeflow/kubeflow/tree/${VERSION}/kubeflow\n\nks pkg install kubeflow/core@${VERSION}\nks pkg install kubeflow/tf-serving@${VERSION}\nks pkg install kubeflow/tf-job@${VERSION}\n\n# Create templates for core components\nks generate kubeflow-core kubeflow-core\n\n# If your cluster is running on Azure you will need to set the cloud parameter.\n# If the cluster was created with AKS or ACS choose aks, it if was created\n# with acs-engine, choose acsengine\n# PLATFORM=<aks|acsengine>\n# ks param set kubeflow-core cloud ${PLATFORM}\n\n# Enable collection of anonymous usage metrics\n# Skip this step if you don't want to enable collection.\nks param set kubeflow-core reportUsage true\nks param set kubeflow-core usageId $(uuidgen)\n\n# Deploy Kubeflow\nks apply default -c kubeflow-core\n```\n\nThe above commands are used to setup JupyterHub and a custom resource for running TensorFlow training jobs. Furthermore, the ksonnet packages provide prototypes that can be used to configure TensorFlow jobs and deploy TensorFlow models.\nUsed together, these make it easy for a user to transition from training to model serving using Tensorflow with minimal\neffort, and in a portable fashion across different environments.\n\nFor more detailed instructions about how to use Kubeflow, including testing the Jupyter Notebook, please refer to the [user guide](user_guide.md).\n\n**Important**: The commands above will enable collection of **anonymous** user data to help us improve Kubeflow; for more information including instructions for explictly\ndisabling it please refer to the [Usage Reporting section](user_guide.md#usage-reporting) of the user guide.\n\n## Troubleshooting\nFor detailed troubleshooting instructions, please refer to [this section of the user guide](user_guide.md#troubleshooting).\n\n## Resources\n\n* The [kubeflow user guide](user_guide.md) provides in-depth instructions for using Kubeflow\n* Katacoda has produced a [self-paced scenario](https://www.katacoda.com/kubeflow) for learning and trying out Kubeflow\n\n## Get Involved\n\n* [Slack Channel](https://join.slack.com/t/kubeflow/shared_invite/enQtMjgyMzMxNDgyMTQ5LWUwMTIxNmZlZTk2NGU0MmFiNDE4YWJiMzFiOGNkZGZjZmRlNTExNmUwMmQ2NzMwYzk5YzQxOWQyODBlZGY2OTg)\n* [Twitter](http://twitter.com/kubeflow)\n* [Mailing List](https://groups.google.com/forum/#!forum/kubeflow-discuss)\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\nThe Kubeflow community is guided by our [Code of Conduct](https://github.com/kubeflow/community/blob/master/CODE_OF_CONDUCT.md), which we encourage everybody to read before participating.\n\n### Who should consider contributing to Kubeflow?\n\n* Folks who want to add support for other ML frameworks (e.g. PyTorch, XGBoost, scikit-learn, etc...)\n* Folks who want to bring more Kubernetes magic to ML (e.g. ISTIO integration for prediction)\n* Folks who want to make Kubeflow a richer ML platform (e.g. support for ML pipelines, hyperparameter tuning)\n* Folks who want to tune Kubeflow for their particular Kubernetes distribution or Cloud\n* Folks who want to write tutorials/blog posts showing how to use Kubeflow to solve ML problems\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C6C8:345ED4:1787C2:5DB7EF:6AB92A80"},"text_sha256":"9e66b301c3bd138b4114d9ac16703dd548b2718be6c8070de9d7091ab40d0993"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=01ccdffb79e499ddd6ab5d2f60b8c0fbac5ac8df; file=README.md; text=ubeflow-core kubeflow-core # If your cluster is running on Azure you will need to set the cloud parameter. # If the cluster was created with AKS or ACS choose aks, it if was created # with acs-engine, choose acsengine # PLATFORM= # ks param set kubeflow-core cloud ${PLATFORM} # Enable collection of anonymous usage metrics # Skip this step if you don't want to enable collection. ks param set kubeflow-core reportUsage true ks param set kubeflow-core usageId $(uuidgen) # Deploy Kubeflow ks apply default -c kubeflow-core The above commands are used to setup JupyterHub and a custom resource for running TensorFlow training jobs. Furthermore, the ks","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2615","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:17A5F6F:1BC8AA1:6AB92A80"},"commit":{"sha":"59d03265fdda9c30de996569a0273105b4b07185","url":"https://github.com/kubeflow/kubeflow/commit/59d03265fdda9c30de996569a0273105b4b07185","date":"2026-06-18T11:45:15Z","author_date":"2026-06-18T11:45:15Z","committer_date":"2026-06-18T11:45:15Z","tree_sha":"371b363da44d02cbfd8d69b083bd5eef9e11b974","message_first_line":"fix: align issue chooser labels with routed repos (#7792)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2614","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F3:77994:17E4ED8:1C07A68:6AB92A81"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2162,"blob_sha":"37057617f9f6a804171d3ab0f97ceb29449b212c","priority":0}],"documents":[{"path":"README.md","size":2162,"blob_sha":"37057617f9f6a804171d3ab0f97ceb29449b212c","priority":0,"status":200,"text":"# Kubeflow\n\n[![Join Kubeflow Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels)\n\n<img src=\"./logo/stacked.svg\" width=\"120\">\n\n## What is Kubeflow\n\n[Kubeflow](https://www.kubeflow.org/) is the foundation of tools for AI Platforms on Kubernetes.\n\nAI platform teams can build on top of Kubeflow by using each subproject independently or deploying\nthe entire Kubeflow Community Distribution to meet their specific needs.\nThe Kubeflow Community Distribution is composable, modular, portable, and scalable, backed by an\necosystem of Kubernetes-native projects that cover every stage of\n[the AI lifecycle](https://www.kubeflow.org/docs/started/architecture/#kubeflow-projects-in-the-ai-lifecycle).\n\nWhether you’re an AI practitioner, a platform administrator, or a team of developers,\nKubeflow offers modular, scalable, and extensible tools to support your AI use cases.\n\nKubeflow consists of Kubeflow Subprojects, Kubeflow Ecosystem, Kubeflow Packaged Distribution,\nand Kubeflow Community Distribution.\n\nCheck out [the official documentation](https://www.kubeflow.org/docs/started/introduction/) for\nmore detailed information.\n\n## Repository Role\n\nThis repository serves primarily as a gateway to Kubeflow subprojects and shared project metadata.\nKubeflow development happens in the individual subproject repositories.\n\n## Kubeflow Community\n\nKubeflow is a community-led project maintained by the\n[Kubeflow Working Groups](https://www.kubeflow.org/docs/about/governance/#4-working-groups)\nunder the guidance of the\n[Kubeflow Outreach Committee](https://www.kubeflow.org/docs/about/governance/#3-kubeflow-outreach-committee),\n[Kubeflow Distribution Committee](https://www.kubeflow.org/docs/about/governance/#4-kubeflow-distribution-committee),\nand [Kubeflow Steering Committee](https://www.kubeflow.org/docs/about/governance/#2-kubeflow-steering-committee-ksc).\n\nWe encourage you to learn about the [Kubeflow Community](https://www.kubeflow.org/docs/about/community/)\nand how to [contribute](https://www.kubeflow.org/docs/about/contributing/) to the project!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:17F0CD:5E2076:6AB92A81"},"text_sha256":"3fb9668d10c67a986db4e3538e45e0ac40c229fc7e770a1d5f4400533c327bc9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"optuna/optuna","input_row":{"repository":"optuna/optuna","url":"https://github.com/optuna/optuna","name":"optuna","owner":"optuna","description":"A hyperparameter optimization framework","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":14852,"issues":1821,"created_at":"2018-02-21T06:12:56Z","updated_at":"2026-09-27T12:14:33Z","first_commit_at":"2018-01-11T07:27:19Z","last_commit_at":"2026-09-25T09:43:21Z","activity_months":104.44,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:38:57.724Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"optuna/optuna","visibility":"public","created_at":"2018-02-21T06:12:56Z","updated_at":"2026-09-27T12:14:33Z","private":false,"fork":false,"archived":false,"stargazers_count":14852,"open_issues_count":17,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2613","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:180B471:1C2DCFB:6AB92A81"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2612","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088A:35C5DA:17A0927:1BC29A6:6AB92A82"},"commit":{"sha":"d33695416a5813b494cd09597f118202782b2ad3","url":"https://github.com/optuna/optuna/commit/d33695416a5813b494cd09597f118202782b2ad3","date":"2018-05-10T08:41:56Z","author_date":"2018-05-10T08:41:56Z","committer_date":"2018-05-10T08:41:56Z","tree_sha":"455e18e9a7ad97ebb70ecae8a8b4458bf17bfeb1","message_first_line":"Merge pull request #120 from pfnet/update-version-0.1.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2611","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:17DDC15:1C006D4:6AB92A82"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":780,"blob_sha":"3dede21fd2187b7ca56b6026eeed7f8e3a107ee7","priority":0}],"documents":[{"path":"README.md","size":780,"blob_sha":"3dede21fd2187b7ca56b6026eeed7f8e3a107ee7","priority":0,"status":200,"text":"# PFNOpt\n\n## Information for Users\n\n```\n$ pip install git+https://github.com/pfnet/pfnopt.git\n```\n\n## Information for Developers\n\n### Format and Lint\n\n\nWe use `flake8` and `autopep8`. To install, run:\n\n```\n$ pip install hacking flake8 autopep8\n```\n\nTo format and make changes to Python codes in place, run the following at the repository root:\n\n```\n$ autopep8 . -r --in-place\n```\n\nLint:\n\n```\n$ flake8 .\n```\n\n\n### Static Type Checking\n\nWe use `mypy`. To install, run:\n\n```\n$ pip install mypy\n```\n\nTo invoke static type checking, run:\n\n```\n$ mypy --ignore-missing-imports .\n```\n\nWe use comment-style type annotation for compatibility with Python 2.\n\n* [PEP484](https://www.python.org/dev/peps/pep-0484/)\n* [Syntax cheat sheet](http://mypy.readthedocs.io/en/latest/cheat_sheet.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7BE0:35999:1782E3:5DB4D1:6AB92A82"},"text_sha256":"ee46d0ea8a98804e49a4119d9836beb5a9944e997e0aab1d871fe359e656f151"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2610","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0798:180242:17EDAC3:1C10519:6AB92A83"},"commit":{"sha":"212384b6bd6cdc7d2c9e64544b78d94c9c8995ed","url":"https://github.com/optuna/optuna/commit/212384b6bd6cdc7d2c9e64544b78d94c9c8995ed","date":"2026-06-29T04:32:43Z","author_date":"2026-06-29T04:32:43Z","committer_date":"2026-06-29T04:32:43Z","tree_sha":"4cd41dc9d80e6d2f2fb30bd1668cdad93b239821","message_first_line":"Merge pull request #6730 from c-bata/fix-action-28339666388"},"tree_request_status":200,"tree_rate":{"github_remaining":"2609","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0823:7580A:17F979C:1C1C4BF:6AB92A83"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12165,"blob_sha":"28e31bc71d71456741e196a8e18a7bd67a3f6efd","priority":0},{"path":"docs/source/privacy.rst","size":611,"blob_sha":"709457fb3a86d019ecbf3e2d2a104a524b48c9b8","priority":1},{"path":"SECURITY.md","size":1411,"blob_sha":"dad116c7ba73c396bbb27e987e6193485c472cad","priority":1}],"documents":[{"path":"README.md","size":12165,"blob_sha":"28e31bc71d71456741e196a8e18a7bd67a3f6efd","priority":0,"status":200,"text":"<div align=\"center\"><img src=\"https://raw.githubusercontent.com/optuna/optuna/master/docs/image/optuna-logo.png\" width=\"800\"/><\/div>\n\n# Optuna: A hyperparameter optimization framework\n\n[![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://www.python.org)\n[![pypi](https://img.shields.io/pypi/v/optuna.svg)](https://pypi.python.org/pypi/optuna)\n[![conda](https://img.shields.io/conda/vn/conda-forge/optuna.svg)](https://anaconda.org/conda-forge/optuna)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/optuna/optuna)\n[![Read the Docs](https://readthedocs.org/projects/optuna/badge/?version=stable)](https://optuna.readthedocs.io/en/stable/)\n\n:link: [**Website**](https://optuna.org/)\n| :page_with_curl: [**Docs**](https://optuna.readthedocs.io/en/stable/)\n| :gear: [**Install Guide**](https://optuna.readthedocs.io/en/stable/installation.html)\n| :pencil: [**Tutorial**](https://optuna.readthedocs.io/en/stable/tutorial/index.html)\n| :bulb: [**Examples**](https://github.com/optuna/optuna-examples)\n| [**Twitter**](https://twitter.com/OptunaAutoML)\n| [**LinkedIn**](https://www.linkedin.com/showcase/optuna/)\n| [**Medium**](https://medium.com/optuna)\n\n*Optuna* is an automatic hyperparameter optimization software framework, particularly designed\nfor machine learning. It features an imperative, *define-by-run* style user API. Thanks to our\n*define-by-run* API, the code written with Optuna enjoys high modularity, and the user of\nOptuna can dynamically construct the search spaces for the hyperparameters.\n\n## :loudspeaker: News\n\n<!-- TODO: when you add a new line, please delete the oldest line -->\n* **Jun 1, 2026**: Optuna 4.9.0 is out! Check out [the release note](https://github.com/optuna/optuna/releases/tag/v4.9.0) for details.\n* **Mar 16, 2026**: Optuna 4.8.0 is out! Check out [the release note](https://github.com/optuna/optuna/releases/tag/v4.8.0) for details.\n* **Jan 19, 2026**: Optuna 4.7.0 is out! Check out [the release note](https://github.com/optuna/optuna/releases/tag/v4.7.0) for details.\n* **Nov 10, 2025**: A new article [Announcing Optuna 4.6](https://medium.com/optuna/announcing-optuna-4-6-a9e82183ab07) has been published.\n* **Oct 28, 2025**: A new article [AutoSampler: Full Support for Multi-Objective & Constrained Optimization](https://medium.com/optuna/autosampler-full-support-for-multi-objective-constrained-optimization-c1c4fc957ba2) has been published.\n* **Sep 22, 2025**: A new article [[Optuna v4.5] Gaussian Process-Based Sampler (GPSampler) Can Now Perform Constrained Multi-Objective Optimization](https://medium.com/optuna/optuna-v4-5-81e78d8e077a) has been published.\n\n## :fire: Key Features\n\nOptuna has modern functionalities as follows:\n\n- [Lightweight, versatile, and platform agnostic architecture](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/001_first.html)\n  - Handle a wide variety of tasks with a simple installation that has few requirements.\n- [Pythonic search spaces](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/002_configurations.html)\n  - Define search spaces using familiar Python syntax including conditionals and loops.\n- [Efficient optimization algorithms](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/003_efficient_optimization_algorithms.html)\n  - Adopt state-of-the-art algorithms for sampling hyperparameters and efficiently pruning unpromising trials.\n- [Easy parallelization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/004_distributed.html)\n  - Scale studies to tens or hundreds of workers with little or no changes to the code.\n- [Quick visualization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/005_visualization.html)\n  - Inspect optimization histories from a variety of plotting functions.\n\n\n## Basic Concepts\n\nWe use the terms *study* and *trial* as follows:\n\n- Study: optimization based on an objective function\n- Trial: a single execution of the objective function\n\nPlease refer to the sample code below. The goal of a *study* is to find out the optimal set of\nhyperparameter values (e.g., `regressor` and `svr_c`) through multiple *trials* (e.g.,\n`n_trials=100`). Optuna is a framework designed for automation and acceleration of\noptimization *studies*.\n\n<details open>\n<summary>Sample code with scikit-learn<\/summary>\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/optuna/optuna-examples/blob/main/quickstart.ipynb)\n\n```python\nimport optuna\nimport sklearn\n\n\n# Define an objective function to be minimized.\ndef objective(trial):\n\n    # Invoke suggest methods of a Trial object to generate hyperparameters.\n    regressor_name = trial.suggest_categorical(\"regressor\", [\"SVR\", \"RandomForest\"])\n    if regressor_name == \"SVR\":\n        svr_c = trial.suggest_float(\"svr_c\", 1e-10, 1e10, log=True)\n        regressor_obj = sklearn.svm.SVR(C=svr_c)\n    else:\n        rf_max_depth = trial.suggest_int(\"rf_max_depth\", 2, 32)\n        regressor_obj = sklearn.ensemble.RandomForestRegressor(max_depth=rf_max_depth)\n\n    X, y = sklearn.datasets.fetch_california_housing(return_X_y=True)\n    X_train, X_val, y_train, y_val = sklearn.model_selection.train_test_split(X, y, random_state=0)\n\n    regressor_obj.fit(X_train, y_train)\n    y_pred = regressor_obj.predict(X_val)\n\n    error = sklearn.metrics.mean_squared_error(y_val, y_pred)\n\n    return error  # An objective value linked with the Trial object.\n\n\nstudy = optuna.create_study()  # Create a new study.\nstudy.optimize(objective, n_trials=100)  # Invoke optimization of the objective function.\n```\n<\/details>\n\n> [!NOTE]\n> More examples can be found in [optuna/optuna-examples](https://github.com/optuna/optuna-examples).\n>\n> The examples cover diverse problem setups such as multi-objective optimization, constrained optimization, pruning, and distributed optimization.\n\n## Installation\n\nOptuna is available at [the Python Package Index](https://pypi.org/project/optuna/) and on [Anaconda Cloud](https://anaconda.org/conda-forge/optuna).\n\n```bash\n# PyPI\n$ pip install optuna\n```\n\n```bash\n# Anaconda Cloud\n$ conda install -c conda-forge optuna\n```\n\n> [!IMPORTANT]\n> Optuna supports Python 3.9 or newer.\n\n## Integrations\n\nOptuna has integration features with various third-party libraries. Integrations can be found in [optuna/optuna-integration](https://github.com/optuna/optuna-integration) and the document is available [here](https://optuna-integration.readthedocs.io/en/stable/index.html).\n\n<details>\n<summary>Supported integration libraries<\/summary>\n\n* [Catboost](https://github.com/optuna/optuna-examples/tree/main/catboost/catboost_pruning.py)\n* [Dask](https://github.com/optuna/optuna-examples/tree/main/dask/dask_simple.py)\n* [fastai](https://github.com/optuna/optuna-examples/tree/main/fastai/fastai_simple.py)\n* [Keras](https://github.com/optuna/optuna-examples/tree/main/keras/keras_integration.py)\n* [LightGBM](https://github.com/optuna/optuna-examples/tree/main/lightgbm/lightgbm_integration.py)\n* [PyTorch](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_simple.py)\n* [PyTorch Ignite](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_ignite_simple.py)\n* [PyTorch Lightning](https://github.com/optuna/optuna-examples/tree/main/pytorch/pytorch_lightning_simple.py)\n* [TensorFlow](https://github.com/optuna/optuna-examples/tree/main/tensorflow/tensorflow_estimator_integration.py)\n* [tf.keras](https://github.com/optuna/optuna-examples/tree/main/tfkeras/tfkeras_integration.py)\n* [XGBoost](https://github.com/optuna/optuna-examples/tree/main/xgboost/xgboost_integration.py)\n<\/details>\n\n## Web Dashboard\n\n[Optuna Dashboard](https://github.com/optuna/optuna-dashboard) is a real-time web dashboard for Optuna.\nYou can check the optimization history, hyperparameter importance, etc. in graphs and tables.\nYou don't need to create a Python script to call [Optuna's visualization](https://optuna.readthedocs.io/en/stable/reference/visualization/index.html) functions.\nFeature requests and bug reports are welcome!\n\n![optuna-dashboard](https://user-images.githubusercontent.com/5564044/204975098-95c2cb8c-0fb5-4388-abc4-da32f56cb4e5.gif)\n\n`optuna-dashboard` can be installed via pip:\n\n```shell\n$ pip install optuna-dashboard\n```\n\n> [!TIP]\n> Please check out the convenience of Optuna Dashboard using the sample code below.\n\n<details>\n<summary>Sample code to launch Optuna Dashboard<\/summary>\n\nSave the following code as `optimize_toy.py`.\n\n```python\nimport optuna\n\n\ndef objective(trial):\n    x1 = trial.suggest_float(\"x1\", -100, 100)\n    x2 = trial.suggest_float(\"x2\", -100, 100)\n    return x1**2 + 0.01 * x2**2\n\n\nstudy = optuna.create_study(storage=\"sqlite:///db.sqlite3\")  # Create a new study with database.\nstudy.optimize(objective, n_trials=100)\n```\n\nThen try the commands below:\n\n```shell\n# Run the study specified above\n$ python optimize_toy.py\n\n# Launch the dashboard based on the storage `sqlite:///db.sqlite3`\n$ optuna-dashboard sqlite:///db.sqlite3\n...\nListening on http://localhost:8080/\nHit Ctrl-C to quit.\n```\n\n<\/details>\n\n\n## OptunaHub\n\n[OptunaHub](https://hub.optuna.org/) is a feature-sharing platform for Optuna.\nYou can use the registered features and publish your packages.\n\n### Use registered features\n\n`optunahub` can be installed via pip:\n\n```shell\n$ pip install optunahub\n# Install AutoSampler dependencies (CPU only is sufficient for PyTorch)\n$ pip install cmaes scipy torch --extra-index-url https://download.pytorch.org/whl/cpu\n```\n\nYou can load registered module with `optunahub.load_module`.\n\n```python\nimport optuna\nimport optunahub\n\n\ndef objective(trial: optuna.Trial) -> float:\n    x = trial.suggest_float(\"x\", -5, 5)\n    y = trial.suggest_float(\"y\", -5, 5)\n    return x**2 + y**2\n\n\nmodule = optunahub.load_module(package=\"samplers/auto_sampler\")\n# See https://hub.optuna.org/samplers/auto_sampler/ to know the ``AutoSampler`` API.\nstudy = optuna.create_study(sampler=module.AutoSampler())\nstudy.optimize(objective, n_trials=10)\n\nprint(study.best_trial.value, study.best_trial.params)\n```\n\nFor more details, please refer to [the optunahub documentation](https://optuna.github.io/optunahub/).\n\n### Publish your packages\n\nYou can publish your package via [optunahub-registry](https://github.com/optuna/optunahub-registry).\nSee the [Tutorials for Contributors](https://optuna.github.io/optunahub/tutorials_for_contributors.html) in OptunaHub.\n\n\n## Communication\n\n- [GitHub Discussions] for questions.\n- [GitHub Issues] for bug reports and feature requests.\n\n[GitHub Discussions]: https://github.com/optuna/optuna/discussions\n[GitHub issues]: https://github.com/optuna/optuna/issues\n\n\n## Contribution\n\nAny contributions to Optuna are more than welcome!\n\nIf you are new to Optuna, please check the [good first issues](https://github.com/optuna/optuna/labels/good%20first%20issue). They are relatively simple, well-defined, and often good starting points for you to get familiar with the contribution workflow and other developers.\n\nIf you already have contributed to Optuna, we recommend the other [contribution-welcome issues](https://github.com/optuna/optuna/labels/contribution-welcome).\n\nFor general guidelines on how to contribute to the project, take a look at [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n\n## Reference\n\nIf you use Optuna in one of your research projects, please cite [our KDD paper](https://doi.org/10.1145/3292500.3330701) \"Optuna: A Next-generation Hyperparameter Optimization Framework\":\n\n<details open>\n<summary>BibTeX<\/summary>\n\n```bibtex\n@inproceedings{akiba2019optuna,\n  title={{O}ptuna: A Next-Generation Hyperparameter Optimization Framework},\n  author={Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori},\n  booktitle={The 25th ACM SIGKDD International Conference on Knowledge Discovery \\& Data Mining},\n  pages={2623--2631},\n  year={2019}\n}\n```\n<\/details>\n\n\n## License\n\nMIT License (see [LICENSE](./LICENSE)).\n\nOptuna uses the codes from SciPy and fdlibm projects (see [LICENSE_THIRD_PARTY](./LICENSE_THIRD_PARTY)).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"545A:349C76:1778DB:5DA678:6AB92A83"},"text_sha256":"18d27540fe24ec27ffa894469ce78c0901a7b4e9a3fa0bb451587e8608b49255"},{"path":"docs/source/privacy.rst","size":611,"blob_sha":"709457fb3a86d019ecbf3e2d2a104a524b48c9b8","priority":1,"status":200,"text":":orphan:\n\nPrivacy Policy\n==============\n\nGoogle Analytics\n----------------\n\nTo collect information about how visitors use our website and to improve our services, we are using Google Analytics on this website. You can find out more about how Google Analytics works and about how information is collected on the Google Analytics terms of services and on Google's privacy policy.\n\n- Google Analytics Terms of Service: http://www.google.com/analytics/terms/us.html\n- Google Privacy Policy: https://policies.google.com/privacy?hl=en\n- Google Analytics Opt-out Add-on: https://tools.google.com/dlpage/gaoptout?hl=en\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77DC:3B6DE:175C31:5D8CE8:6AB92A84"},"text_sha256":"2c299eda260babb56ce7bb5cfe300d4bfd009ba67226a908e3aca5ef45d4b979"},{"path":"SECURITY.md","size":1411,"blob_sha":"dad116c7ba73c396bbb27e987e6193485c472cad","priority":1,"status":200,"text":"# Security Issue Reporting\n\nOptuna uses [GitHub’s Private Vulnerability Reporting feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) to enable responsible and confidential reporting of security issues.\n\nIf you discover a potential vulnerability, please report it to the development team through this feature:\n [Report a Vulnerability](https://github.com/optuna/optuna/security/advisories/new)\n\n## How Reports Are Handled\n\n- Your submission will remain confidential within the Private Vulnerability Report until the development team decides to share it publicly.\n- The information you report will be used to help resolve security issues.\n- The development team includes members with write or higher permission to the repository, as well as security managers.\n- The development team will investigate and work toward a resolution.\n  Please refrain from posting the issue in public forums such as GitHub Issues, Pull Requests, or social media until the fix or disclosure is complete.\n- The timing of public disclosure will be determined through communication between the development team and the reporter.\n  If the reporter prefers not to disclose the issue, it will remain private.\n\n## Acknowledgment\n\nWe appreciate your help in improving the security and reliability of Optuna.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5830:18233:179BB7:5DCC0C:6AB92A83"},"text_sha256":"51b4c43bf32c109e60821c981d09de8f5932bfcbb4c7120d0a59c6c5042e8735"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":1,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":1,"D1_evidence":"sha=212384b6bd6cdc7d2c9e64544b78d94c9c8995ed; file=docs/source/privacy.rst; text=Google Analytics ---------------- To collect information about how visitors use our website and to improve our services, we are using Google Analytics on this website. You can find out more about how Google Analytics works and about how information is collected on the Google Analytics terms of services and on Google's privacy policy. - Google Analytics Terms of Service:","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C2":"sha=212384b6bd6cdc7d2c9e64544b78d94c9c8995ed; file=docs/source/privacy.rst; text=Google Analytics ---------------- To collect information about how visitors use our website and to improve our services, we are using Google Analytics on this website. You can find out more about how Google Analytics works and about how information is collected on the Google Analytics terms of services and on Google's privacy policy. - Google Analytics Terms of Service:"}}}}
{"repository":"nltk/nltk","input_row":{"repository":"nltk/nltk","url":"https://github.com/nltk/nltk","name":"nltk","owner":"nltk","description":"NLTK Source","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":14727,"issues":1935,"created_at":"2009-09-07T10:53:58Z","updated_at":"2026-09-27T14:07:51Z","first_commit_at":"2001-03-01T09:26:35Z","last_commit_at":"2026-09-24T11:58:09Z","activity_months":306.76999999999998,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:00.859Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"nltk/nltk","visibility":"public","created_at":"2009-09-07T10:53:58Z","updated_at":"2026-09-27T14:07:51Z","private":false,"fork":false,"archived":false,"stargazers_count":14727,"open_issues_count":261,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2608","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0812:78367:180B68C:1C2DF8A:6AB92A84"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2607","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:17F7E42:1C1A3F2:6AB92A85"},"commit":{"sha":"dc33c3fae49b09f61bdc341faca1fe3040990aae","url":"https://github.com/nltk/nltk/commit/dc33c3fae49b09f61bdc341faca1fe3040990aae","date":"2018-05-24T02:34:17Z","author_date":"2018-05-24T02:34:17Z","committer_date":"2018-05-24T02:34:17Z","tree_sha":"79ab3cfa305df56e02d45aeb11a465953f3a9bf4","message_first_line":"Merge pull request #2026 from Coykto/print-concordance-fix"},"tree_request_status":200,"tree_rate":{"github_remaining":"2606","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:17D5579:1BF862B:6AB92A85"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1738,"blob_sha":"67f16009f91666c9020a1dabb6d4465bd322dbdf","priority":0}],"documents":[{"path":"README.md","size":1738,"blob_sha":"67f16009f91666c9020a1dabb6d4465bd322dbdf","priority":0,"status":200,"text":"# Natural Language Toolkit (NLTK)\n[![PyPI](https://img.shields.io/pypi/v/nltk.svg)](https://pypi.python.org/pypi/nltk) [![Jenkins](https://img.shields.io/jenkins/s/https/nltk.ci.cloudbees.com/job/nltk.svg)](https://nltk.ci.cloudbees.com/job/nltk/lastCompletedBuild/testReport/)\n\nNLTK -- the Natural Language Toolkit -- is a suite of open source Python\nmodules, data sets, and tutorials supporting research and development in Natural\nLanguage Processing.\n\nFor documentation, please visit [nltk.org](http://www.nltk.org/).\n\n\n## Contributing\n\nDo you want to contribute to NLTK development? Great! Please read more details\nat [CONTRIBUTING.md](CONTRIBUTING.md).\n\nSee also [How to contribute to NLTK](http://www.nltk.org/contribute.html).\n\n\n## Donate\n\nHave you found the toolkit helpful?  Please support NLTK development by donating\nto the project via PayPal, using the link on the NLTK homepage.\n\n\n## Citing\n\nIf you publish work that uses NLTK, please cite the NLTK book, as follows:\n\n    Bird, Steven, Edward Loper and Ewan Klein (2009).\n    Natural Language Processing with Python.  O'Reilly Media Inc.\n\n\n## Copyright\n\nCopyright (C) 2001-2018 NLTK Project\n\nFor license information, see [LICENSE.txt](LICENSE.txt).\n\n[AUTHORS.md](AUTHORS.md) have a list of everyone contributed to NLTK.\n\n\n### Redistributing\n\n- NLTK source code is distributed under the Apache 2.0 License.\n- NLTK documentation is distributed under the Creative Commons\n  Attribution-Noncommercial-No Derivative Works 3.0 United States license.\n- NLTK corpora are provided under the terms given in the README file for each\n  corpus; all are redistributable and available for non-commercial use.\n- NLTK may be freely redistributed, subject to the provisions of these licenses.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D576:2B291E:1834C1:5E66CB:6AB92A85"},"text_sha256":"9e064bc9ad304ddfdb573e1e34aad2ecfdbfe99d0e5d74151e2366c8f8d32ed3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2605","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FB:72727:17A6350:1BC8F40:6AB92A86"},"commit":{"sha":"c31143fc0f68452b218f39a686a0b70a29ccb19a","url":"https://github.com/nltk/nltk/commit/c31143fc0f68452b218f39a686a0b70a29ccb19a","date":"2026-06-26T17:30:27Z","author_date":"2026-06-26T17:30:27Z","committer_date":"2026-06-26T17:30:27Z","tree_sha":"11e4e7633b74ce344f5d9fb12ddfd741a8ef9422","message_first_line":"Fix duplicated -l short option on `nltk tokenize` (#3342) (#3580)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2604","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0891:37D6E2:180819D:1C2B059:6AB92A86"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1742,"blob_sha":"adab69ee6fe24314dda14cf376e1f86ad93ed243","priority":0},{"path":"SECURITY.md","size":4301,"blob_sha":"6ade7cb8c7946c1f8be2809bfc8ccbf1abc7c07e","priority":1}],"documents":[{"path":"README.md","size":1742,"blob_sha":"adab69ee6fe24314dda14cf376e1f86ad93ed243","priority":0,"status":200,"text":"# Natural Language Toolkit (NLTK)\n[![PyPI](https://img.shields.io/pypi/v/nltk.svg)](https://pypi.python.org/pypi/nltk)\n![CI](https://github.com/nltk/nltk/actions/workflows/ci.yml/badge.svg?branch=develop)\n\nNLTK -- the Natural Language Toolkit -- is a suite of open source Python\nmodules, data sets, and tutorials supporting research and development in Natural\nLanguage Processing. NLTK requires Python version from 3.10 up to the latest 3.14.\n\nFor documentation, please visit [nltk.org](https://www.nltk.org/).\n\n\n## Contributing\n\nDo you want to contribute to NLTK development? Great!\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for more details.\n\nSee also [how to contribute to NLTK](https://www.nltk.org/contribute.html).\n\n\n## Donate\n\nHave you found the toolkit helpful?  Please support NLTK development by donating\nto the project via PayPal, using the link on the NLTK homepage.\n\n\n## Citing\n\nIf you publish work that uses NLTK, please cite the NLTK book, as follows:\n\n    Bird, Steven, Edward Loper and Ewan Klein (2009).\n    Natural Language Processing with Python.  O'Reilly Media Inc.\n\n\n## Copyright\n\nCopyright (C) 2001-2026 NLTK Project\n\nFor license information, see [LICENSE.txt](LICENSE.txt).\n\n[AUTHORS.md](AUTHORS.md) contains a list of everyone who has contributed to NLTK.\n\n\n### Redistributing\n\n- NLTK source code is distributed under the Apache 2.0 License.\n- NLTK documentation is distributed under the Creative Commons\n  Attribution-Noncommercial-No Derivative Works 3.0 United States license.\n- NLTK corpora are provided under the terms given in the README file for each\n  corpus; all are redistributable and available for non-commercial use.\n- NLTK may be freely redistributed, subject to the provisions of these licenses.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79D6:349C76:177900:5DA6ED:6AB92A86"},"text_sha256":"c19f3d858f587a750af4e50f1a683d0a8df20be1eae0b80b941158e9889642ff"},{"path":"SECURITY.md","size":4301,"blob_sha":"6ade7cb8c7946c1f8be2809bfc8ccbf1abc7c07e","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report security issues to `nltk.team@gmail.com`\n\n## Security Hardening\n\nNLTK includes a centralized I/O security module (`nltk.pathsec`) that\nvalidates file paths, network URLs, and zip archives.\n\nAs of NLTK 3.10.0, strict enforcement is enabled by default\n(`ENFORCE=True`). In normal operation, NLTK applies the stricter\n`pathsec` policy unless a caller explicitly opts out.\n\nUnder enforcement, unauthorized file access, SSRF attempts, and zip-slip\nstyle path escapes raise exceptions (typically `PermissionError`) instead of emitting warnings.\n\n### Resource-loading security model\n\nNLTK's resource-loading protections are designed to reduce common risks\nwhen NLTK is used with untrusted input or in shared environments such as\nweb applications, services, notebooks, CI/CD systems, and multi-tenant\npipelines.\n\nIn particular, the current policy reduces the risk of:\n\n- **Arbitrary local file access through NLTK resource loading** by\n  requiring filesystem access to remain within allowed NLTK data\n  directories.\n- **SSRF to non-public destinations** by resolving network targets and\n  blocking loopback, private, link-local, and multicast addresses.\n- **Redirect-based bypasses** by re-validating redirects at each hop.\n- **Zip-slip attacks** by validating extraction targets before writing\n  files.\n\nThese protections apply to NLTK's own resource-loading paths and URL\nhandling. They are not a general operating-system sandbox, and they do\nnot prevent all unsafe behavior an application might perform outside\nNLTK.\n\n### Local file access\n\n`file:` URLs are not a general-purpose mechanism for loading arbitrary\nlocal files.\n\nWith strict enforcement enabled (`ENFORCE=True`), file-backed resources\nmust resolve inside allowed NLTK data directories. By default these\ndirectories are derived from:\n\n1. `nltk.data.path` (configurable at runtime)\n2. `NLTK_DATA` environment variable\n3. Standard locations (`~/nltk_data`, `/usr/share/nltk_data`, etc.)\n4. The system temp directory\n\nIf you use a custom resource directory, explicitly add it to\n`nltk.data.path`:\n\n```python\nimport nltk\nnltk.data.path.append('/my/custom/data')\n```\n\nThen load resources by NLTK resource path rather than relying on access\nto arbitrary filesystem locations.\n\n### Current Working Directory (CWD) access\n\nImplicit access to the current working directory is not allowed under\nstrict enforcement (`ENFORCE=True`) unless that directory has been\nexplicitly added to `nltk.data.path`.\n\nIf you intentionally want to trust the current directory, authorize it\nexplicitly:\n\n```python\nimport nltk\nnltk.data.path.append('.')\n```\n\nThis makes the trust decision explicit and avoids surprising behavior in\nserver-side or shared execution environments.\n\n### Network URL validation\n\nNLTK permits network resource loading only for `http:` and `https:`\nURLs.\n\nBefore a request is made, NLTK validates the resolved destination and\nblocks requests to:\n\n- loopback addresses\n- private RFC1918 ranges\n- link-local addresses\n- multicast addresses\n\nRedirects are re-validated at each hop, so a public URL cannot bypass\nthe policy by redirecting to a blocked destination.\n\nIn practice, ordinary public URLs continue to work, while destinations\nsuch as `127.0.0.1`, `10.0.0.0/8`, and `169.254.169.254` are rejected.\n\n### What is protected\n\n- **Path traversal**: file access is validated against allowed NLTK\n  data directories (`nltk.data.path`, `NLTK_DATA`, and standard system\n  locations).\n- **SSRF prevention**: `urlopen` resolves hostnames via DNS and blocks\n  requests to loopback, private, link-local, and multicast IP ranges,\n  including obfuscated forms where applicable.\n- **Zip-slip protection**: zip extraction validates that member paths\n  stay within the target directory.\n- **Pickle safety**: `nltk.data.load()` uses `RestrictedUnpickler`\n  which blocks all class/function globals. Other pickle loading uses\n  `pickle_load()` which emits a security warning.\n\n### Note on symlinks\n\nNLTK's corpus readers perform lexical path containment checks when\njoining file paths. These checks do not resolve symlinks. If your threat\nmodel includes attackers who can place symlinks inside trusted NLTK data\ndirectories, keep strict enforcement enabled so paths are fully resolved\nand validated.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"64B4:326565:17ABBF:5DDE01:6AB92A87"},"text_sha256":"b2a85bd04be882afefbc111336397b3fbb7881491240ee7216005f1d1ca17215"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gunthercox/ChatterBot","input_row":{"repository":"gunthercox/ChatterBot","url":"https://github.com/gunthercox/ChatterBot","name":"ChatterBot","owner":"gunthercox","description":"ChatterBot is a machine learning, conversational dialog engine for creating chat bots","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":14519,"issues":1667,"created_at":"2014-09-28T14:49:00Z","updated_at":"2026-09-26T07:23:50Z","first_commit_at":"2014-09-06T15:58:13Z","last_commit_at":"2026-08-25T11:30:38Z","activity_months":143.59,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:03.944Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gunthercox/ChatterBot","visibility":"public","created_at":"2014-09-28T14:49:00Z","updated_at":"2026-09-26T07:23:50Z","private":false,"fork":false,"archived":false,"stargazers_count":14519,"open_issues_count":72,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2603","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0824:74E6D:17FEC57:1C21D63:6AB92A87"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2602","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:17F9A99:1C1C85A:6AB92A88"},"commit":{"sha":"b47ecb3464585d762c17694190286388c25dbaf8","url":"https://github.com/gunthercox/ChatterBot/commit/b47ecb3464585d762c17694190286388c25dbaf8","date":"2018-05-20T23:39:42Z","author_date":"2018-05-20T23:39:42Z","committer_date":"2018-05-20T23:39:42Z","tree_sha":"e69c892fd2935942f9e9ac0f4f73bd5aba581d76","message_first_line":"Break list declaration in multiple lines"},"tree_request_status":200,"tree_rate":{"github_remaining":"2601","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0799:228A99:17E3731:1C064D0:6AB92A88"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5117,"blob_sha":"44d0492d3a1c5c93281e233aca35c3dabbe24e2d","priority":0}],"documents":[{"path":"README.md","size":5117,"blob_sha":"44d0492d3a1c5c93281e233aca35c3dabbe24e2d","priority":0,"status":200,"text":"![Chatterbot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png)\n\n# ChatterBot\n\nChatterBot is a machine-learning based conversational dialog engine build in\nPython which makes it possible to generate responses based on collections of\nknown conversations. The language independent design of ChatterBot allows it\nto be trained to speak any language.\n\n[![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/)\n[![Requirements Status](https://requires.io/github/gunthercox/ChatterBot/requirements.svg?branch=master)](https://requires.io/github/gunthercox/ChatterBot/requirements/?branch=master)\n[![Build Status](https://travis-ci.org/gunthercox/ChatterBot.svg?branch=master)](https://travis-ci.org/gunthercox/ChatterBot)\n[![Documentation Status](https://readthedocs.org/projects/chatterbot/badge/?version=stable)](http://chatterbot.readthedocs.io/en/stable/?badge=stable)\n[![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot)\n[![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot)\n[![Join the chat at https://gitter.im/chatterbot/Lobby](https://badges.gitter.im/chatterbot/Lobby.svg)](https://gitter.im/chatterbot/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)\n\nAn example of typical input would be something like this:\n\n> **user:** Good morning! How are you doing?  \n> **bot:**  I am doing very well, thank you for asking.  \n> **user:** You're welcome.  \n> **bot:** Do you like hats?  \n\n## How it works\n\nAn untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to. As ChatterBot receives more input the number of responses that it can reply and the accuracy of each response in relation to the input statement increase. The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then returns the most likely response to that statement based on how frequently each response is issued by the people the bot communicates with.\n\n## Installation\n\nThis package can be installed from [PyPi](https://pypi.python.org/pypi/ChatterBot) by running:\n\n```\npip install chatterbot\n```\n\n## Basic Usage\n\n```\nfrom chatterbot import ChatBot\n\nchatbot = ChatBot(\n    'Ron Obvious',\n    trainer='chatterbot.trainers.ChatterBotCorpusTrainer'\n)\n\n# Train based on the english corpus\nchatbot.train(\"chatterbot.corpus.english\")\n\n# Get a response to an input statement\nchatbot.get_response(\"Hello, how are you today?\")\n```\n\n# Training data\n\nChatterBot comes with a data utility module that can be used to train chat bots.\nAt the moment there is three languages, English, Spanish and Portuguese training data in this module. Contributions\nof additional training data or training data in other languages would be greatly\nappreciated. Take a look at the data files in the\n[chatterbot-corpus](https://github.com/gunthercox/chatterbot-corpus)\npackage if you are interested in contributing.\n\n```\n# Train based on the english corpus\nchatbot.train(\"chatterbot.corpus.english\")\n\n# Train based on english greetings corpus\nchatbot.train(\"chatterbot.corpus.english.greetings\")\n\n# Train based on the english conversations corpus\nchatbot.train(\"chatterbot.corpus.english.conversations\")\n```\n\n**Corpus contributions are welcome! Please make a pull request.**\n\n# [Documentation](https://chatterbot.readthedocs.io/)\n\nView the [documentation](https://chatterbot.readthedocs.io/)\nfor ChatterBot on Read the Docs.\n\nTo build the documentation yourself using [Sphinx](http://www.sphinx-doc.org/), run:\n\n```\nsphinx-build -b html docs/ build/\n```\n\n# Examples\n\nFor examples, see the [examples](https://github.com/gunthercox/ChatterBot/tree/master/examples)\ndirectory in this project's git repository.\n\nThere is also an example [Django project using ChatterBot](https://github.com/gunthercox/ChatterBot/tree/master/examples), as well as an example [Flask project using ChatterBot](https://github.com/chamkank/flask-chatterbot).\n\n# History\n\nSee release notes for changes https://github.com/gunthercox/ChatterBot/releases\n\n# Development pattern for contributors\n\n1. [Create a fork](https://help.github.com/articles/fork-a-repo/) of\n   the [main ChatterBot repository](https://github.com/gunthercox/ChatterBot) on GitHub.\n2. Make your changes in a branch named something different from `master`, e.g. create\n   a new branch `my-pull-request`.\n3. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/).\n4. Please follow the [Python style guide for PEP-8](https://www.python.org/dev/peps/pep-0008/).\n5. Use the projects [built-in automated testing](https://chatterbot.readthedocs.io/en/latest/testing.html)\n   to help make sure that your contribution is free from errors.\n\n# License\n\nChatterBot is licensed under the [BSD 3-clause license](https://opensource.org/licenses/BSD-3-Clause).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED98:3FA0D:177ADE:5DAC4F:6AB92A87"},"text_sha256":"a9a6f2f5783fecbb6d7271a8c39334fdd44d883a0f4842b7ac5920e04545fb98"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2600","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:17FBEE9:1C1ECEC:6AB92A89"},"commit":{"sha":"2d909e2635785efdb95ea4429ac5ab94e0c28fb2","url":"https://github.com/gunthercox/ChatterBot/commit/2d909e2635785efdb95ea4429ac5ab94e0c28fb2","date":"2026-06-19T13:01:56Z","author_date":"2026-06-19T13:01:56Z","committer_date":"2026-06-19T13:01:56Z","tree_sha":"b67476976954a3f7fa355de21472ac1375814767","message_first_line":"Update packge version"},"tree_request_status":200,"tree_rate":{"github_remaining":"2599","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:182F275:1C51BB1:6AB92A89"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4481,"blob_sha":"602a8558401e063959d92eb20e66dfb12c66e4b6","priority":0},{"path":"docs/security.rst","size":2015,"blob_sha":"6ff61bcb8d9b3146b3664247ef203d1762c80a61","priority":1},{"path":"SECURITY.md","size":756,"blob_sha":"d099e7c7d04cab079f204e9d58918338acf6b6f4","priority":1}],"documents":[{"path":"README.md","size":4481,"blob_sha":"602a8558401e063959d92eb20e66dfb12c66e4b6","priority":0,"status":200,"text":"![ChatterBot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png)\n\n# ChatterBot\n\nChatterBot is a machine-learning based conversational dialog engine built in\nPython which makes it possible to generate responses based on collections of\nknown conversations. The language independent design of ChatterBot allows it\nto be trained to speak any language.\n\n[![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/)\n[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot)\n[![Follow on Bluesky](https://img.shields.io/badge/🦋%20Bluesky-1185fe)](https://bsky.app/profile/chatterbot.us)\n[![Join the chat at https://gitter.im/chatterbot/Lobby](https://badges.gitter.im/chatterbot/Lobby.svg)](https://gitter.im/chatterbot/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)\n<!-- [![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot) -->\n\nAn example of typical input would be something like this:\n\n> **user:** Good morning! How are you doing?  \n> **bot:**  I am doing very well, thank you for asking.  \n> **user:** You're welcome.  \n> **bot:** Do you like hats?  \n\n## How it works\n\nAn untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to. As ChatterBot receives more input the number of responses that it can reply to, and the accuracy of each response in relation to the input statement increases. The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then returns the most likely response to that statement based on how frequently each response is issued by the people the bot communicates with.\n\n# [Documentation](https://docs.chatterbot.us)\n\nView the [documentation](https://docs.chatterbot.us)\nfor ChatterBot.\n\n## Installation\n\nThis package can be installed from [PyPi](https://pypi.python.org/pypi/ChatterBot) by running:\n\n```bash\npip install chatterbot\n```\n\n## Basic Usage\n\n```python\nfrom chatterbot import ChatBot\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\nchatbot = ChatBot('Ron Obvious')\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train the chatbot based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Get a response to an input statement\nchatbot.get_response(\"Hello, how are you today?\")\n```\n\n# Training data\n\nChatterBot comes with a data utility module that can be used to train chat bots.\nAt the moment there is training data for over a dozen languages in this module.\nContributions of additional training data or training data\nin other languages would be greatly appreciated. Take a look at the data files\nin the [chatterbot-corpus](https://github.com/gunthercox/chatterbot-corpus)\npackage if you are interested in contributing.\n\n```python\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Train based on english greetings corpus\ntrainer.train(\"chatterbot.corpus.english.greetings\")\n\n# Train based on the english conversations corpus\ntrainer.train(\"chatterbot.corpus.english.conversations\")\n```\n\n**Corpus contributions are welcome! Please make a pull request.**\n\n# Examples\n\nFor examples, see the [examples](https://docs.chatterbot.us/examples/)\nsection of the documentation.\n\n# History\n\nSee release notes for changes https://github.com/gunthercox/ChatterBot/releases\n\n# Contributing\n\nContributions are welcomed, to help ensure a smooth process please start with the contributing guidelines in our documentation:\nhttps://docs.chatterbot.us/contributing/\n\n# Sponsors\n\nChatterBot is sponsored by:\n\n<p>\n   <a href=\"https://www.testmuai.com/?utm_source=chatterbot&utm_medium=sponsor\" target=\"_blank\">\n      <img src=\"docs/_static/testmu-ai-white-logo.png\" style=\"vertical-align: middle;\" width=\"250\" height=\"80\" />\n   <\/a>\n<\/p>\n\n# License\n\nChatterBot is licensed under the [BSD 3-clause license](https://opensource.org/licenses/BSD-3-Clause).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"545A:349C76:177923:5DA755:6AB92A87"},"text_sha256":"827de335056908621d110f36d8bc4fe9ffd18f7e72973be2d972e2dbb65bf734"},{"path":"docs/security.rst","size":2015,"blob_sha":"6ff61bcb8d9b3146b3664247ef203d1762c80a61","priority":1,"status":200,"text":"========\nSecurity\n========\n\n**Deploying chat bots to production environments requires due diligence,\nespecially in cases where LLMs are involved. At minimum, the following\nprecautions should be considered:**\n\n* Comprehensive security review\n* Additional rate limiting and abuse prevention\n* Monitoring and alerting for security violations\n* Regular security audits and penetration testing\n* Understanding of the OWASP Top 10 for LLM Applications\n\nOverview\n========\n\nWhen using ChatterBot, you may want to add security scanning to protect\nagainst common vulnerabilities outlined in the `OWASP Top 10 for LLM Applications \n<https://owasp.org/www-project-top-10-for-large-language-model-applications/>`_.\n\nChatterBot does not include built-in security scanning. Instead, you can integrate\nthird-party security tools like `llm-guard <https://protectai.github.io/llm-guard/>`_,\n`Prompt-Guard`_, or other scanning solution at the application level to scan inputs\nbefore they reach the chatbot and outputs before they are shown to users.\n\n**Depending on your use case, the following are examples of best practices you might consider:**\n\n1. **Always scan user input** for prompt injection\n2. **Always scan bot output** scan bot output to prevent PII leakage\n3. **Start with strict thresholds** and relax if false positives occur\n4. **Log security violations** for monitoring and analysis\n5. **Test with adversarial inputs** before deployment\n6. **Implement rate limiting** at application layer\n7. **Never execute LLM outputs** as code without validation\n8. **Review OWASP LLM Top 10** regularly\n\nAdditional Resources\n====================\n\n* `llm-guard Documentation <https://protectai.github.io/llm-guard/>`_\n* `OWASP Top 10 for LLM Applications <https://owasp.org/www-project-top-10-for-large-language-model-applications/>`_\n* `ProtectAI GitHub <https://github.com/protectai/llm-guard>`_\n* `ChatterBot LLM Documentation <large-language-models.html>`_\n* `Prompt-Guard <https://huggingface.co/meta-llama/Prompt-Guard-86M>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF1A:3B7E2:170A40:5D3D4F:6AB92A8A"},"text_sha256":"51b3202967d2e42cbb46d904a0fbfb337bae38346f520639c24ebabb599e8859"},{"path":"SECURITY.md","size":756,"blob_sha":"d099e7c7d04cab079f204e9d58918338acf6b6f4","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nActively supported versions of ChatterBot can be determined using the following table.\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 1.2.x   | :white_check_mark: |\n| < 1.2   | :x:                |\n\n## Reporting a Vulnerability\n\nChatterBot uses GitHub's private security vulnerability reporting to accept reports about potential security vulnerabilities.\n\nhttps://github.com/gunthercox/ChatterBot/security/advisories\n\nTo begin the process select the \"Report a vulnerability\" button on the security advisories page.\nOnce the report has been investigated an response plan will be issued based on the level of severity.\nA response can generally be expected within 24 hours of report submission.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:1802FA:5E34F9:6AB92A8A"},"text_sha256":"d782c46267b4298cba29c5e80828c1fe82163dc9fbe2dae82048565ba29f3d15"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=2d909e2635785efdb95ea4429ac5ab94e0c28fb2; file=docs/security.rst; text=Always scan user input for prompt injection 2. Always scan bot output scan bot output to prevent PII leakage 3. Start with strict thresholds and relax if false positives occur","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=2d909e2635785efdb95ea4429ac5ab94e0c28fb2; file=docs/security.rst; text=Always scan user input for prompt injection 2. Always scan bot output scan bot output to prevent PII leakage 3. Start with strict thresholds and relax if false positives occur"}}}}
{"repository":"cleanlab/cleanlab","input_row":{"repository":"cleanlab/cleanlab","url":"https://github.com/cleanlab/cleanlab","name":"cleanlab","owner":"cleanlab","description":"Cleanlab's open-source library is the standard data-centric AI package for data quality and machine learning with messy, real-world data and labels.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":11676,"issues":386,"created_at":"2018-05-11T01:55:21Z","updated_at":"2026-09-27T07:03:20Z","first_commit_at":"2018-05-11T01:55:22Z","last_commit_at":"2026-01-13T17:23:18Z","activity_months":92.140000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:06.964Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cleanlab/cleanlab","visibility":"public","created_at":"2018-05-11T01:55:21Z","updated_at":"2026-09-27T07:03:20Z","private":false,"fork":false,"archived":false,"stargazers_count":11676,"open_issues_count":125,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2598","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17C8F9A:1BEBD02:6AB92A8B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2597","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:17FEFBA:1C22128:6AB92A8B"},"commit":{"sha":"91c5cf52a523e25eaa5535dafee2349c802b1df9","url":"https://github.com/cleanlab/cleanlab/commit/91c5cf52a523e25eaa5535dafee2349c802b1df9","date":"2018-05-23T05:14:42Z","author_date":"2018-05-23T05:14:42Z","committer_date":"2018-05-23T05:14:42Z","tree_sha":"2a759bec8f73162e0c70e2f9d9cc5aaebef69fce","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2596","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17BC204:1BDF092:6AB92A8B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":723,"blob_sha":"1b8a72f89023570ff2b060231fc68259fb3c9a24","priority":0}],"documents":[{"path":"README.md","size":723,"blob_sha":"1b8a72f89023570ff2b060231fc68259fb3c9a24","priority":0,"status":200,"text":"# confidentlearning\nA Python package for Confident Learning with state-of-the-art algorithms for multiclass learning with noisy labels, latent noisy channel estimation, latent prior estimation, detection of label errors in massive datasets, and much more.\n\n## Note to reviewers\nPlease view the supplementary materials of our NIPS2018 submission [by clicking here](https://www.dropbox.com/s/n8hydz9zj6skqwg/nips2018_confident_learning_supplements.pdf?dl=0). A system error prevented their inclusion at submit-time. The password is the first word of the title of our submission, all lowercased.\n\n## Note to community.\nOur paper is pending review. This package will be made open-source once our paper is publically available.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"89AA:727CE:174149:5D73C9:6AB92A86"},"text_sha256":"02e8f3d32adf6ae97e62f2089916690df988f8657e24eede544a6d8ef046dc22"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2595","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:186B918:1C8E9E8:6AB92A8C"},"commit":{"sha":"750625747de1b26d8530954f51f0530bd0b51d3c","url":"https://github.com/cleanlab/cleanlab/commit/750625747de1b26d8530954f51f0530bd0b51d3c","date":"2026-01-13T17:23:18Z","author_date":"2026-01-13T17:23:18Z","committer_date":"2026-01-13T17:23:18Z","tree_sha":"526e71c7ffd3ea57c0a0bf5cd9a6eb7a62f5b27b","message_first_line":"Update CI Build (#1297)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2594","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E4:E80A6:17A36A1:1BC65C5:6AB92A8C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15189,"blob_sha":"798062f5b6ce565005171069e649b2fb3140e058","priority":0}],"documents":[{"path":"README.md","size":15189,"blob_sha":"798062f5b6ce565005171069e649b2fb3140e058","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/cleanlab_logo_open_source.png\" width=60%>\n<\/div>\n\n<div align=\"center\">\n<a href=\"https://pypi.org/pypi/cleanlab/\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/cleanlab.svg\" alt=\"pypi_versions\"><\/a>\n<a href=\"https://pypi.org/pypi/cleanlab/\" target=\"_blank\"><img src=\"https://img.shields.io/badge/python-3.10%2B-blue\" alt=\"py_versions\"><\/a>\n<a href=\"https://app.codecov.io/gh/cleanlab/cleanlab\" target=\"_blank\"><img src=\"https://codecov.io/gh/cleanlab/cleanlab/branch/master/graph/badge.svg\" alt=\"coverage\"><\/a>\n<a href=\"https://github.com/cleanlab/cleanlab/stargazers/\" target=\"_blank\"><img src=\"https://img.shields.io/github/stars/cleanlab/cleanlab?style=social&maxAge=2592000\" alt=\"Github Stars\"><\/a>\n<a href=\"https://twitter.com/CleanlabAI\" target=\"_blank\"><img src=\"https://img.shields.io/twitter/follow/CleanlabAI?style=social\" alt=\"Twitter\"><\/a>\n<\/div>\n\n<h4 align=\"center\">\n    <p>\n        <a href=\"https://docs.cleanlab.ai/\">Documentation<\/a> |\n        <a href=\"https://github.com/cleanlab/examples\">Examples<\/a> |\n        <a href=\"https://cleanlab.ai/blog/learn/\">Blog<\/a> |\n        <a href=\"#citation-and-related-publications\">Research<\/a>\n    <p>\n<\/h4>\n\nCleanlab’s open-source library helps you **clean** data and **lab**els by automatically detecting issues in a ML dataset. To facilitate **machine learning with messy, real-world data**, this data-centric AI package uses your *existing* models to estimate dataset problems that can be fixed to train even *better* models.\n \n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/datalab_issues.png\" width=74%>\n<\/p>\n<p align=\"center\">\n    Examples of various issues in Cat/Dog dataset <b>automatically detected<\/b> by cleanlab via this code:    \n<\/p>\n\n```python\n        lab = cleanlab.Datalab(data=dataset, label=\"column_name_for_labels\")\n        # Fit any ML model, get its feature_embeddings & pred_probs for your data\n        lab.find_issues(features=feature_embeddings, pred_probs=pred_probs)\n        lab.report()\n```\n\n- Use cleanlab to automatically check every: [text](https://docs.cleanlab.ai/stable/tutorials/datalab/text.html), [audio](https://docs.cleanlab.ai/stable/tutorials/datalab/audio.html), [image](https://docs.cleanlab.ai/stable/tutorials/datalab/image.html), or [tabular](https://docs.cleanlab.ai/stable/tutorials/datalab/tabular.html) dataset.\n- Use cleanlab to automatically: [detect data issues (outliers, duplicates, label errors, etc)](https://docs.cleanlab.ai/stable/tutorials/datalab/datalab_quickstart.html), [train robust models](https://docs.cleanlab.ai/stable/tutorials/indepth_overview.html), [infer consensus + annotator-quality for multi-annotator data](https://docs.cleanlab.ai/stable/tutorials/multiannotator.html), [suggest data to (re)label next (active learning)](https://github.com/cleanlab/examples/blob/master/active_learning_multiannotator/active_learning.ipynb).\n\n\n---\n\n\n## Run cleanlab open-source\n\nThis cleanlab package runs on Python 3.10+ and supports Linux, macOS, as well as Windows.\n\n- Get started [here](https://docs.cleanlab.ai/)! Install via `uv`, `pip`, or `conda`.\n- Developers who install the bleeding-edge from source should refer to [this master branch documentation](https://docs.cleanlab.ai/master/index.html).\n\n**Practicing data-centric AI can look like this:**\n1. Train initial ML model on original dataset.\n2. Utilize this model to diagnose data issues (via cleanlab methods) and improve the dataset.\n3. Train the same model on the improved dataset. \n4. Try various modeling techniques to further improve performance.\n\nMost folks jump from Step 1 → 4, but you may achieve big gains without *any* change to your modeling code by using cleanlab!\nContinuously boost performance by iterating Steps 2 → 4 (and try to evaluate with *cleaned* data).\n\n![](https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/flowchart.png)\n\n\n## Use cleanlab with any model and in most ML tasks\n\nAll features of cleanlab work with **any dataset** and **any model**. Yes, any model: PyTorch, Tensorflow, Keras, JAX, HuggingFace, OpenAI, XGBoost, scikit-learn, etc.\n\ncleanlab is useful across a wide variety of Machine Learning tasks. Specific tasks this data-centric AI package offers dedicated functionality for include:\n1. [Binary and multi-class classification](https://docs.cleanlab.ai/stable/tutorials/indepth_overview.html)\n2. [Multi-label classification](https://docs.cleanlab.ai/stable/tutorials/multilabel_classification.html) (e.g. image/document tagging)\n3. [Token classification](https://docs.cleanlab.ai/stable/tutorials/token_classification.html) (e.g. entity recognition in text)\n4. [Regression](https://docs.cleanlab.ai/stable/tutorials/regression.html) (predicting numerical column in a dataset)\n5. [Image segmentation](https://docs.cleanlab.ai/stable/tutorials/segmentation.html) (images with per-pixel annotations)\n6. [Object detection](https://docs.cleanlab.ai/stable/tutorials/object_detection.html) (images with bounding box annotations)\n7. [Classification with data labeled by multiple annotators](https://docs.cleanlab.ai/stable/tutorials/multiannotator.html)\n8. [Active learning with multiple annotators](https://github.com/cleanlab/examples/blob/master/active_learning_multiannotator/active_learning.ipynb) (suggest which data to label or re-label to improve model most)\n9. [Outlier detection](https://docs.cleanlab.ai/stable/tutorials/outliers.html) (identify atypical data that appears out of distribution)\n\nFor other ML tasks, cleanlab can still help you improve your dataset if appropriately applied.\nSee our [Example Notebooks](https://github.com/cleanlab/examples) and [Blog](https://cleanlab.ai/blog/learn/).\n\n\n## So fresh, so cleanlab\n\nBeyond automatically catching [all sorts of issues](https://docs.cleanlab.ai/stable/cleanlab/datalab/guide/issue_type_description.html) lurking in your data, this data-centric AI package helps you deal with **noisy labels** and train more **robust ML models**.\nHere's an example:\n\n```python\n\n# cleanlab works with **any classifier**. Yup, you can use PyTorch/TensorFlow/OpenAI/XGBoost/etc.\ncl = cleanlab.classification.CleanLearning(sklearn.YourFavoriteClassifier())\n\n# cleanlab finds data and label issues in **any dataset**... in ONE line of code!\nlabel_issues = cl.find_label_issues(data, labels)\n\n# cleanlab trains a robust version of your model that works more reliably with noisy data.\ncl.fit(data, labels)\n\n# cleanlab estimates the predictions you would have gotten if you had trained with *no* label issues.\ncl.predict(test_data)\n\n# A universal data-centric AI tool, cleanlab quantifies class-level issues and overall data quality, for any dataset.\ncleanlab.dataset.health_summary(labels, confident_joint=cl.confident_joint)\n```\n\ncleanlab **clean**s your data's **lab**els via state-of-the-art *confident learning* algorithms, published in this [paper](https://jair.org/index.php/jair/article/view/12125) and [blog](https://l7.curtisnorthcutt.com/confident-learning). See some of the datasets cleaned with cleanlab at [labelerrors.com](https://labelerrors.com).\n\ncleanlab is:\n\n1. **backed by theory** -- with [provable guarantees](https://arxiv.org/abs/1911.00068) of exact label noise estimation, even with imperfect models.\n2. **fast** -- code is parallelized and scalable.\n4. **easy to use** -- one line of code to find mislabeled data, bad annotators, outliers, or train noise-robust models.\n6. **general** -- works with **[any dataset](https://labelerrors.com/)** (text, image, tabular, audio,...) + **any model** (PyTorch, OpenAI, XGBoost,...)\n<br/>\n\n![](https://raw.githubusercontent.com/cleanlab/assets/master/cleanlab/label-errors-examples.png)\n<p align=\"center\">\nExamples of incorrect given labels in various image datasets <a href=\"https://l7.curtisnorthcutt.com/label-errors\">found and corrected<\/a> using cleanlab. \nWhile these examples are from image datasets, this also works for text, audio, tabular data.\n<\/p>\n\n\n## Citation and related publications\n\ncleanlab is based on peer-reviewed research. Here are relevant papers to cite if you use this package:\n\n<details><summary><a href=\"https://arxiv.org/abs/1911.00068\">Confident Learning (JAIR '21)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @article{northcutt2021confidentlearning,\n        title={Confident Learning: Estimating Uncertainty in Dataset Labels},\n        author={Curtis G. Northcutt and Lu Jiang and Isaac L. Chuang},\n        journal={Journal of Artificial Intelligence Research (JAIR)},\n        volume={70},\n        pages={1373--1411},\n        year={2021}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/1705.01936\">Rank Pruning (UAI '17)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{northcutt2017rankpruning,\n        author={Northcutt, Curtis G. and Wu, Tailin and Chuang, Isaac L.},\n        title={Learning with Confident Examples: Rank Pruning for Robust Classification with Noisy Labels},\n        booktitle = {Proceedings of the Thirty-Third Conference on Uncertainty in Artificial Intelligence},\n        series = {UAI'17},\n        year = {2017},\n        location = {Sydney, Australia},\n        numpages = {10},\n        url = {http://auai.org/uai2017/proceedings/papers/35.pdf},\n        publisher = {AUAI Press},\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://jonasmueller.org/info/LabelQuality_icml.pdf\"> Label Quality Scoring (ICML '22)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{kuan2022labelquality,\n        title={Model-agnostic label quality scoring to detect real-world label errors},\n        author={Kuan, Johnson and Mueller, Jonas},\n        booktitle={ICML DataPerf Workshop},\n        year={2022}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2210.03920\"> Label Errors in Token Classification / Entity Recognition (NeurIPS '22)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{wang2022tokenerrors,\n        title={Detecting label errors in token classification data},\n        author={Wang, Wei-Chen and Mueller, Jonas},\n        booktitle={NeurIPS Workshop on Interactive Learning for Natural Language Processing (InterNLP)},\n        year={2022}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2211.13895\"> Label Errors in Multi-Label Classification (ICLR '23)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{thyagarajan2023multilabel,\n        title={Identifying Incorrect Annotations in Multi-Label Classification Data},\n        author={Thyagarajan, Aditya and Snorrason, Elías and Northcutt, Curtis and Mueller, Jonas},\n        booktitle={ICLR Workshop on Trustworthy ML},\n        year={2023}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2309.00832\"> Label Errors in Object Detection (ICML '23)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{tkachenko2023objectlab,\n        title={ObjectLab: Automated Diagnosis of Mislabeled Images in Object Detection Data},\n        author={Tkachenko, Ulyana and Thyagarajan, Aditya and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2307.05080\"> Label Errors in Image Segmentation (ICML '23)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{lad2023segmentation,\n        title={Estimating label quality and errors in semantic segmentation data via any model},\n        author={Lad, Vedang and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2305.16583\"> Detecting Errors in Numerical Data (DMLR '24)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{zhou2023errors,\n        title={Detecting Errors in a Numerical Response via any Regression Model},\n        author={Zhou, Hang and Mueller, Jonas and Kumar, Mayank and Wang, Jane-Ling and Lei, Jing},\n        booktitle={Journal of Data-centric Machine Learning Research},\n        year={2024}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2207.03061\"> Out-of-Distribution Detection (ICML '22)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{kuan2022ood,\n        title={Back to the Basics: Revisiting Out-of-Distribution Detection Baselines},\n        author={Kuan, Johnson and Mueller, Jonas},\n        booktitle={ICML Workshop on Principles of Distribution Shift},\n        year={2022}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2210.06812\"> CROWDLAB for Data with Multiple Annotators (NeurIPS '22)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{goh2022crowdlab,\n        title={CROWDLAB: Supervised learning to infer consensus labels and quality scores for data with multiple annotators},\n        author={Goh, Hui Wen and Tkachenko, Ulyana and Mueller, Jonas},\n        booktitle={NeurIPS Human in the Loop Learning Workshop},\n        year={2022}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2301.11856\"> ActiveLab: Active learning with data re-labeling (ICLR '23)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{goh2023activelab,\n        title={ActiveLab: Active Learning with Re-Labeling by Multiple Annotators},\n        author={Goh, Hui Wen and Mueller, Jonas},\n        booktitle={ICLR Workshop on Trustworthy ML},\n        year={2023}\n    }\n\n<\/details>\n\n<details><summary><a href=\"https://arxiv.org/abs/2305.15696\"> Detecting Dataset Drift and Non-IID Sampling (ICML '23)<\/a> (<b>click to show bibtex<\/b>) <\/summary>\n\n    @inproceedings{cummings2023drift,\n        title={Detecting Dataset Drift and Non-IID Sampling via k-Nearest Neighbors},\n        author={Cummings, Jesse and Snorrason, Elías and Mueller, Jonas},\n        booktitle={ICML Workshop on Data-centric Machine Learning Research},\n        year={2023}\n    }\n\n<\/details>\n\nTo understand/cite other cleanlab functionality not described above, check out our [Blog](https://cleanlab.ai/blog/learn).\n\n\n## Other resources\n\n- [Example Notebooks demonstrating practical applications of this package](https://github.com/cleanlab/examples)\n\n- [Cleanlab Blog](https://cleanlab.ai/blog/learn)\n\n- [Blog post: Introduction to Confident Learning](https://l7.curtisnorthcutt.com/confident-learning)\n\n- [NeurIPS 2021 paper: Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks](https://arxiv.org/abs/2103.14749)\n\n- [Introduction to Data-centric AI (MIT IAP Course)](https://dcai.csail.mit.edu/)\n\n- [Release notes for past versions](https://github.com/cleanlab/cleanlab/releases)\n\n**Interested in contributing?**  See the [contributing guide](CONTRIBUTING.md), [development guide](DEVELOPMENT.md), and [ideas on useful contributions](https://github.com/cleanlab/cleanlab/wiki#ideas-for-contributing-to-cleanlab).\n\n**Have questions?**  Check out [our FAQ](https://docs.cleanlab.ai/stable/tutorials/faq.html) and [Github Issues](https://github.com/cleanlab/cleanlab/issues?q=is%3Aissue).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"628C:3BCC6:17C490:5DF6AB:6AB92A8C"},"text_sha256":"0f36173459bc0f106ef939203827925fd59a01650534caa0cc8477042982e8ee"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"doccano/doccano","input_row":{"repository":"doccano/doccano","url":"https://github.com/doccano/doccano","name":"doccano","owner":"doccano","description":"Open source annotation tool for machine learning practitioners.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":10781,"issues":1553,"created_at":"2018-05-09T06:10:05Z","updated_at":"2026-09-27T10:59:22Z","first_commit_at":"2018-05-09T06:10:05Z","last_commit_at":"2026-01-17T00:58:26Z","activity_months":92.310000000000002,"ai_ml_match_topics":"machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:09.720Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"doccano/doccano","visibility":"public","created_at":"2018-05-09T06:10:05Z","updated_at":"2026-09-27T10:59:22Z","private":false,"fork":false,"archived":false,"stargazers_count":10781,"open_issues_count":399,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2593","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AE:B1202:179A2D4:1BBC79A:6AB92A8D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2592","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0814:278AC2:185D10B:1C80166:6AB92A8E"},"commit":{"sha":"387582e7e294227769ca770441d730a20cfd7d39","url":"https://github.com/doccano/doccano/commit/387582e7e294227769ca770441d730a20cfd7d39","date":"2018-05-21T07:15:58Z","author_date":"2018-05-21T07:15:58Z","committer_date":"2018-05-21T07:15:58Z","tree_sha":"cea173fa6c04387c9955be85d433b5fbd530f3cf","message_first_line":"Update template"},"tree_request_status":200,"tree_rate":{"github_remaining":"2591","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:17EDADB:1C10A8F:6AB92A8E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":983,"blob_sha":"edfc6dc93caba8f5b5689bd31fe6837da8737bc6","priority":0}],"documents":[{"path":"README.md","size":983,"blob_sha":"edfc6dc93caba8f5b5689bd31fe6837da8737bc6","priority":0,"status":200,"text":"# doccano\n\ndoccano is a document annotation tool. The purpose is making annotation process efficient. First, manually labeling small data in minutes using the labeling interface. Second, train built-in classification model using the labeled data and classify unlabeled data with their probability. Then, sort data in ascending order by the probability. You can efficiently annotate the data.\n\n![doccano](docs/demo.png)\n\n\n## Features\n\n* Active Learning based annotation\n\n## Requirements\n\n* Python3.6+\n* numpy 1.14.3+\n* scikit-learn 0.19.1+\n* scipy 1.1.0+\n* django 2.0.5+\n\nPut data into [doccano/data](https://github.com/chakki-works/doccano/tree/master/data) directory.\n\n## Installation\n\nTo install doccano, simply run:\n\n```bash\n$ git clone https://github.com/chakki-works/doccano.git\n$ cd doccano\n$ pip install -r requirements.txt\n```\n\n## Usage\n\nFirst, run web application:\n\n```bash\n$ cd doccano/server\n$ python run_server.py\n```\n\nThen, open <http://localhost:8080> in your browser.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:17F162:5E2283:6AB92A8D"},"text_sha256":"09c9026261d89f6f199d5a70204ce87768980a714c8d0e15fe06b025b803bda0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2590","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:17EB40C:1C0CEAD:6AB92A8F"},"commit":{"sha":"ab6b765ea326d07b2b806a4280cd097565e62321","url":"https://github.com/doccano/doccano/commit/ab6b765ea326d07b2b806a4280cd097565e62321","date":"2026-01-17T00:58:26Z","author_date":"2026-01-17T00:58:26Z","committer_date":"2026-01-17T00:58:26Z","tree_sha":"e1566b7787a9968e2980d5c14ac5ac9bd8a3be7b","message_first_line":"Merge pull request #2459 from doccano/fix/update-waitress-and-black"},"tree_request_status":200,"tree_rate":{"github_remaining":"2589","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:17FA055:1C1CEDB:6AB92A8F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6991,"blob_sha":"30058019cf21add8be024f02a9b6950dc592edce","priority":0}],"documents":[{"path":"README.md","size":6991,"blob_sha":"30058019cf21add8be024f02a9b6950dc592edce","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/doccano/doccano/master/docs/images/logo/doccano.png\">\n<\/div>\n\n# doccano\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/35ac8625a2bc4eddbff23dbc61bc6abb)](https://www.codacy.com/gh/doccano/doccano/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=doccano/doccano&amp;utm_campaign=Badge_Grade)\n[![doccano CI](https://github.com/doccano/doccano/actions/workflows/ci.yml/badge.svg)](https://github.com/doccano/doccano/actions/workflows/ci.yml)\n\ndoccano is an open-source text annotation tool for humans. It provides annotation features for text classification, sequence labeling, and sequence to sequence tasks. You can create labeled data for sentiment analysis, named entity recognition, text summarization, and so on. Just create a project, upload data, and start annotating. You can build a dataset in hours.\n\n## Demo\n\nTry the [annotation demo](http://doccano.herokuapp.com).\n\n![Demo image](https://raw.githubusercontent.com/doccano/doccano/master/docs/images/demo/demo.gif)\n\n## Documentation\n\nRead the documentation at <https://doccano.github.io/doccano/>.\n\n## Features\n\n- Collaborative annotation\n- Multi-language support\n- Mobile support\n- Emoji :smile: support\n- Dark theme\n- RESTful API\n\n## Usage\n\nThere are three options to run doccano:\n\n- pip (Python 3.8+)\n- Docker\n- Docker Compose\n\n### pip\n\nTo install doccano, run:\n\n```bash\npip install doccano\n```\n\nBy default, SQLite 3 is used for the default database. If you want to use PostgreSQL, install the additional dependencies:\n\n```bash\npip install 'doccano[postgresql]'\n```\n\nand set the `DATABASE_URL` environment variable according to your PostgreSQL credentials:\n\n```bash\nDATABASE_URL=\"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable\"\n```\n\nAfter installation, run the following commands:\n\n```bash\n# Initialize database.\ndoccano init\n# Create a super user.\ndoccano createuser --username admin --password pass\n# Start a web server.\ndoccano webserver --port 8000\n```\n\nIn another terminal, run the command:\n\n```bash\n# Start the task queue to handle file upload/download.\ndoccano task\n```\n\nGo to <http://127.0.0.1:8000/>.\n\n### Docker\n\nAs a one-time setup, create a Docker container as follows:\n\n```bash\ndocker pull doccano/doccano\ndocker container create --name doccano \\\n  -e \"ADMIN_USERNAME=admin\" \\\n  -e \"ADMIN_EMAIL=admin@example.com\" \\\n  -e \"ADMIN_PASSWORD=password\" \\\n  -v doccano-db:/data \\\n  -p 8000:8000 doccano/doccano\n```\n\nNext, start doccano by running the container:\n\n```bash\ndocker container start doccano\n```\n\nGo to <http://127.0.0.1:8000/>.\n\nTo stop the container, run `docker container stop doccano -t 5`. All data created in the container will persist across restarts.\n\nIf you want to use the latest features, specify the `nightly` tag:\n\n```bash\ndocker pull doccano/doccano:nightly\n```\n\n### Docker Compose\n\nYou need to install Git and clone the repository:\n\n```bash\ngit clone https://github.com/doccano/doccano.git\ncd doccano\n```\n\n_Note for Windows developers:_ Be sure to configure git to correctly handle line endings or you may encounter `status code 127` errors while running the services in future steps. Running with the git config options below will ensure your git directory correctly handles line endings.\n\n```bash\ngit clone https://github.com/doccano/doccano.git --config core.autocrlf=input\n```\n\nThen, create an `.env` file with variables in the following format (see [./docker/.env.example](https://github.com/doccano/doccano/blob/master/docker/.env.example)):\n\n```plain\n# platform settings\nADMIN_USERNAME=admin\nADMIN_PASSWORD=password\nADMIN_EMAIL=admin@example.com\n\n# rabbit mq settings\nRABBITMQ_DEFAULT_USER=doccano\nRABBITMQ_DEFAULT_PASS=doccano\n\n# database settings\nPOSTGRES_USER=doccano\nPOSTGRES_PASSWORD=doccano\nPOSTGRES_DB=doccano\n```\n\nAfter running the following command, access <http://127.0.0.1/>.\n\n```bash\ndocker-compose -f docker/docker-compose.prod.yml --env-file .env up\n```\n\n### One-click Deployment\n\n| Service | Button |\n|---------|---|\n| AWS[^1]   | [![AWS CloudFormation Launch Stack SVG Button](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=doccano&templateURL=https://doccano.s3.amazonaws.com/public/cloudformation/template.aws.yaml)  |\n| Heroku  | [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Fdoccano%2Fdoccano)  |\n<!-- | GCP[^2] | [![GCP Cloud Run PNG Button](https://storage.googleapis.com/gweb-cloudblog-publish/images/run_on_google_cloud.max-300x300.png)](https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/doccano/doccano.git&cloudshell_git_branch=CloudRunButton)  | -->\n\n> [^1]: (1) EC2 KeyPair cannot be created automatically, so make sure you have an existing EC2 KeyPair in one region. Or [create one yourself](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#having-ec2-create-your-key-pair). (2) If you want to access doccano via HTTPS in AWS, here is an [instruction](https://github.com/doccano/doccano/wiki/HTTPS-setting-for-doccano-in-AWS).\n<!-- > [^2]: Although this is a very cheap option, it is only suitable for very small teams (up to 80 concurrent requests). Read more on [Cloud Run docs](https://cloud.google.com/run/docs/concepts). -->\n\n## FAQ\n\n- [How to create a user](https://doccano.github.io/doccano/faq/#how-to-create-a-user)\n- [How to add a user to your project](https://doccano.github.io/doccano/faq/#how-to-add-a-user-to-your-project)\n- [How to change the password](https://doccano.github.io/doccano/faq/#how-to-change-the-password)\n\nSee the [documentation](https://doccano.github.io/doccano/) for details.\n\n## Contribution\n\nAs with any software, doccano is under continuous development. If you have requests for features, please file an issue describing your request. Also, if you want to see work towards a specific feature, feel free to contribute by working towards it. The standard procedure is to fork the repository, add a feature, fix a bug, then file a pull request that your changes are to be merged into the main repository and included in the next release.\n\nHere are some tips might be helpful. [How to Contribute to Doccano Project](https://github.com/doccano/doccano/wiki/How-to-Contribute-to-Doccano-Project)\n\n## Citation\n\n```tex\n@misc{doccano,\n  title={{doccano}: Text Annotation Tool for Human},\n  url={https://github.com/doccano/doccano},\n  note={Software available from https://github.com/doccano/doccano},\n  author={\n    Hiroki Nakayama and\n    Takahiro Kubo and\n    Junya Kamura and\n    Yasufumi Taniguchi and\n    Xu Liang},\n  year={2018},\n}\n```\n\n## Contact\n\nFor help and feedback, feel free to contact [the author](https://github.com/Hironsan).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A640:3EACB:17A192:5DD420:6AB92A90"},"text_sha256":"fadafd43ee201ba414477763b0aab1518beaf584b6c61dbca5c36cc64f87bcc9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"drivendataorg/cookiecutter-data-science","input_row":{"repository":"drivendataorg/cookiecutter-data-science","url":"https://github.com/drivendataorg/cookiecutter-data-science","name":"cookiecutter-data-science","owner":"drivendataorg","description":"A logical, reasonably standardized, but flexible project structure for doing and sharing data science work.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":10075,"issues":199,"created_at":"2015-10-30T19:19:57Z","updated_at":"2026-09-27T06:12:12Z","first_commit_at":"2015-10-30T19:09:43Z","last_commit_at":"2025-07-24T01:11:00Z","activity_months":116.76000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:13.247Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"drivendataorg/cookiecutter-data-science","visibility":"public","created_at":"2015-10-30T19:19:57Z","updated_at":"2026-09-27T06:12:12Z","private":false,"fork":false,"archived":false,"stargazers_count":10075,"open_issues_count":36,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2588","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AD:72BD3:17F5299:1C17FB6:6AB92A91"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2587","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:17DE740:1C013CA:6AB92A91"},"commit":{"sha":"a3274f1da3f0213a50c8b05314961b1b1e93e834","url":"https://github.com/drivendataorg/cookiecutter-data-science/commit/a3274f1da3f0213a50c8b05314961b1b1e93e834","date":"2018-04-19T16:00:41Z","author_date":"2018-04-19T16:00:41Z","committer_date":"2018-04-19T16:00:41Z","tree_sha":"c118bf8a3fa0404dbc660391c7d4386c63ac496c","message_first_line":"Make python3 the default interpreter (#113)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2586","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AF:A9DC0:17B879C:1BDB2B5:6AB92A92"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3561,"blob_sha":"dff8cf38b5c21877f522036535edfdc6c74091aa","priority":0}],"documents":[{"path":"README.md","size":3561,"blob_sha":"dff8cf38b5c21877f522036535edfdc6c74091aa","priority":0,"status":200,"text":"# Cookiecutter Data Science\n\n_A logical, reasonably standardized, but flexible project structure for doing and sharing data science work._\n\n\n#### [Project homepage](http://drivendata.github.io/cookiecutter-data-science/)\n\n\n### Requirements to use the cookiecutter template:\n-----------\n - Python 2.7 or 3.5\n - [Cookiecutter Python package](http://cookiecutter.readthedocs.org/en/latest/installation.html) >= 1.4.0: This can be installed with pip by or conda depending on how you manage your Python packages:\n\n``` bash\n$ pip install cookiecutter\n```\n\nor\n\n``` bash\n$ conda config --add channels conda-forge\n$ conda install cookiecutter\n```\n\n\n### To start a new project, run:\n------------\n\n    cookiecutter https://github.com/drivendata/cookiecutter-data-science\n\n\n[![asciicast](https://asciinema.org/a/9bgl5qh17wlop4xyxu9n9wr02.png)](https://asciinema.org/a/9bgl5qh17wlop4xyxu9n9wr02)\n\n\n### The resulting directory structure\n------------\n\nThe directory structure of your new project looks like this: \n\n```\n├── LICENSE\n├── Makefile           <- Makefile with commands like `make data` or `make train`\n├── README.md          <- The top-level README for developers using this project.\n├── data\n│   ├── external       <- Data from third party sources.\n│   ├── interim        <- Intermediate data that has been transformed.\n│   ├── processed      <- The final, canonical data sets for modeling.\n│   └── raw            <- The original, immutable data dump.\n│\n├── docs               <- A default Sphinx project; see sphinx-doc.org for details\n│\n├── models             <- Trained and serialized models, model predictions, or model summaries\n│\n├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),\n│                         the creator's initials, and a short `-` delimited description, e.g.\n│                         `1.0-jqp-initial-data-exploration`.\n│\n├── references         <- Data dictionaries, manuals, and all other explanatory materials.\n│\n├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.\n│   └── figures        <- Generated graphics and figures to be used in reporting\n│\n├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.\n│                         generated with `pip freeze > requirements.txt`\n│\n├── src                <- Source code for use in this project.\n│   ├── __init__.py    <- Makes src a Python module\n│   │\n│   ├── data           <- Scripts to download or generate data\n│   │   └── make_dataset.py\n│   │\n│   ├── features       <- Scripts to turn raw data into features for modeling\n│   │   └── build_features.py\n│   │\n│   ├── models         <- Scripts to train models and then use trained models to make\n│   │   │                 predictions\n│   │   ├── predict_model.py\n│   │   └── train_model.py\n│   │\n│   └── visualization  <- Scripts to create exploratory and results oriented visualizations\n│       └── visualize.py\n│\n└── tox.ini            <- tox file with settings for running tox; see tox.testrun.org\n```\n\n## Contributing\n\nWe welcome contributions! [See the docs for guidelines](https://drivendata.github.io/cookiecutter-data-science/#contributing).\n\n### Installing development requirements\n------------\n\n    pip install -r requirements.txt\n\n### Running the tests\n------------\n\n    py.test tests\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8486:7A4F8:182623:5E5985:6AB92A8A"},"text_sha256":"01cbc1735529ec965c34dc91fa2a2ba3590d0e809b3e296c1a72d69002260ac9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2585","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:17FC960:1C1F7D5:6AB92A92"},"commit":{"sha":"0f6b163cdbe3918a2c65ab57ad9fefda93976d9e","url":"https://github.com/drivendataorg/cookiecutter-data-science/commit/0f6b163cdbe3918a2c65ab57ad9fefda93976d9e","date":"2025-07-24T01:11:00Z","author_date":"2025-07-24T01:11:00Z","committer_date":"2025-07-24T01:11:00Z","tree_sha":"03fb0303b5b8eea0e9de7bf2043e4b2406a41c82","message_first_line":"Add poetry as an env manager (#460)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2584","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087A:731F6:17EDEAE:1C10EF6:6AB92A93"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5792,"blob_sha":"3986d5a1e5233e548afc9e76f2e2adb6cb51de70","priority":0}],"documents":[{"path":"README.md","size":5792,"blob_sha":"3986d5a1e5233e548afc9e76f2e2adb6cb51de70","priority":0,"status":200,"text":"# Cookiecutter Data Science\n\n_A logical, reasonably standardized but flexible project structure for doing and sharing data science work._\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cookiecutter-data-science)](https://pypi.org/project/cookiecutter-data-science/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cookiecutter-data-science)](https://pypi.org/project/cookiecutter-data-science/)\n<a target=\"_blank\" href=\"https://cookiecutter-data-science.drivendata.org/\">\n    <img src=\"https://img.shields.io/badge/CCDS-Project%20template-328F97?logo=cookiecutter\" />\n<\/a>\n[![tests](https://github.com/drivendataorg/cookiecutter-data-science/actions/workflows/tests.yml/badge.svg)](https://github.com/drivendataorg/cookiecutter-data-science/actions/workflows/tests.yml)\n\n**Cookiecutter Data Science (CCDS)** is a tool for setting up a data science project template that incorporates best practices. To learn more about CCDS's philosophy, visit the [project homepage](https://cookiecutter-data-science.drivendata.org/).\n\n> ℹ️ Cookiecutter Data Science v2 has changed from v1. It now requires installing the new cookiecutter-data-science Python package, which extends the functionality of the [cookiecutter](https://cookiecutter.readthedocs.io/en/stable/README.html) templating utility. Use the provided `ccds` command-line program instead of `cookiecutter`.\n\n## Installation\n\nCookiecutter Data Science v2 requires Python 3.9+. Since this is a cross-project utility application, we recommend installing it with [pipx](https://pypa.github.io/pipx/). Installation command options:\n\n```bash\n# With pipx from PyPI (recommended)\npipx install cookiecutter-data-science\n\n# With pip from PyPI\npip install cookiecutter-data-science\n\n# With conda from conda-forge (coming soon)\n# conda install cookiecutter-data-science -c conda-forge\n```\n\n## Starting a new project\n\nTo start a new project, run:\n\n```bash\nccds\n```\n\n### The resulting directory structure\n\nThe directory structure of your new project will look something like this (depending on the settings that you choose):\n\n```\n├── LICENSE            <- Open-source license if one is chosen\n├── Makefile           <- Makefile with convenience commands like `make data` or `make train`\n├── README.md          <- The top-level README for developers using this project.\n├── data\n│   ├── external       <- Data from third party sources.\n│   ├── interim        <- Intermediate data that has been transformed.\n│   ├── processed      <- The final, canonical data sets for modeling.\n│   └── raw            <- The original, immutable data dump.\n│\n├── docs               <- A default mkdocs project; see www.mkdocs.org for details\n│\n├── models             <- Trained and serialized models, model predictions, or model summaries\n│\n├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),\n│                         the creator's initials, and a short `-` delimited description, e.g.\n│                         `1.0-jqp-initial-data-exploration`.\n│\n├── pyproject.toml     <- Project configuration file with package metadata for \n│                         {{ cookiecutter.module_name }} and configuration for tools like black\n│\n├── references         <- Data dictionaries, manuals, and all other explanatory materials.\n│\n├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.\n│   └── figures        <- Generated graphics and figures to be used in reporting\n│\n├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.\n│                         generated with `pip freeze > requirements.txt`\n│\n├── setup.cfg          <- Configuration file for flake8\n│\n└── {{ cookiecutter.module_name }}   <- Source code for use in this project.\n    │\n    ├── __init__.py             <- Makes {{ cookiecutter.module_name }} a Python module\n    │\n    ├── config.py               <- Store useful variables and configuration\n    │\n    ├── dataset.py              <- Scripts to download or generate data\n    │\n    ├── features.py             <- Code to create features for modeling\n    │\n    ├── modeling                \n    │   ├── __init__.py \n    │   ├── predict.py          <- Code to run model inference with trained models          \n    │   └── train.py            <- Code to train models\n    │\n    └── plots.py                <- Code to create visualizations   \n```\n\n## Using unreleased changes\n\nBy default, `ccds` will use the _project template_ version that corresponds to the _installed `ccds` package_ version (e.g., if you have installed `ccds` v2.0.1, you'll use the v2.0.1 version of the project template by default). To use a specific version of the project template, use the `-c/--checkout` flag to provide the branch (or tag or commit hash) of the version you'd like to use. For example to use the project template from the `master` branch:\n\n```bash\nccds -c master\n```\n\n## Using v1\n\nIf you want to use the old v1 project template, you need to have either the cookiecutter-data-science package or cookiecutter package installed. Then, use either command-line program with the `-c v1` option:\n\n```bash\nccds https://github.com/drivendataorg/cookiecutter-data-science -c v1\n# or equivalently\ncookiecutter https://github.com/drivendataorg/cookiecutter-data-science -c v1\n```\n\n## Contributing\n\nWe welcome contributions! [See the docs for guidelines](https://cookiecutter-data-science.drivendata.org/contributing/).\n\n### Installing development requirements\n\n```bash\npip install -r dev-requirements.txt\n```\n\n### Running the tests\n\n```bash\npytest tests\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79D6:349C76:177965:5DA87E:6AB92A92"},"text_sha256":"dc3c0c354ea2fdaad70589227fea1002d072e8061dc64beb1bd93999f40c0470"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"MorvanZhou/Reinforcement-learning-with-tensorflow","input_row":{"repository":"MorvanZhou/Reinforcement-learning-with-tensorflow","url":"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow","name":"Reinforcement-learning-with-tensorflow","owner":"MorvanZhou","description":"Simple Reinforcement learning tutorials, 莫烦Python 中文AI教学","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9517,"issues":195,"created_at":"2017-05-06T03:01:31Z","updated_at":"2026-09-27T07:42:23Z","first_commit_at":"2017-05-06T03:02:20Z","last_commit_at":"2022-07-29T07:57:55Z","activity_months":62.75,"ai_ml_match_topics":"machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:15.809Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MorvanZhou/Reinforcement-learning-with-tensorflow","visibility":"public","created_at":"2017-05-06T03:01:31Z","updated_at":"2026-09-27T07:42:23Z","private":false,"fork":false,"archived":false,"stargazers_count":9517,"open_issues_count":70,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2583","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B1:73962:17CFFA4:1BF26E5:6AB92A93"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2582","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17BFB9E:1BE1F18:6AB92A94"},"commit":{"sha":"b484df7fc7dadab61e73e04aa40416bf6db68321","url":"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/commit/b484df7fc7dadab61e73e04aa40416bf6db68321","date":"2018-01-28T09:50:35Z","author_date":"2018-01-28T09:50:35Z","committer_date":"2018-01-28T09:50:35Z","tree_sha":"e0b369cbdce7b2b4a29994453d37ba963860c423","message_first_line":"improve performance"},"tree_request_status":200,"tree_rate":{"github_remaining":"2581","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E5:2BC4E5:181E76C:1C41307:6AB92A94"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7117,"blob_sha":"27e91f04821744c0e77871ae15f8d3d6612ef94e","priority":0}],"documents":[{"path":"README.md","size":7117,"blob_sha":"27e91f04821744c0e77871ae15f8d3d6612ef94e","priority":0,"status":200,"text":"<p align=\"center\">\n    <a href=\"https://www.youtube.com/watch?v=pieI7rOXELI&list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba\" target=\"_blank\">\n    <img width=\"60%\" src=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/blob/master/RL_cover.jpg\" style=\"max-width:100%;\">\n    <\/a>\n<\/p>\n\n\n<br>\n\n# Reinforcement Learning Methods and Tutorials\n\nIn these tutorials for reinforcement learning, it covers from the basic RL algorithms to advanced algorithms developed recent years.\n\n**If you speak Chinese, visit [莫烦 Python](https://morvanzhou.github.io/tutorials/) or my [Youtube channel](https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg) for more.**\n\n**As many requests about making these tutorials available in English, please find them in this playlist:** ([https://www.youtube.com/playlist?list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba](https://www.youtube.com/playlist?list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba))\n\n# Table of Contents\n\n* Tutorials\n    * [Simple entry example](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/1_command_line_reinforcement_learning)\n    * [Q-learning](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/2_Q_Learning_maze)\n    * [Sarsa](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/3_Sarsa_maze)\n    * [Sarsa(lambda)](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/4_Sarsa_lambda_maze)\n    * [Deep Q Network](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5_Deep_Q_Network)\n    * [Using OpenAI Gym](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/6_OpenAI_gym)\n    * [Double DQN](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.1_Double_DQN)\n    * [DQN with Prioitized Experience Replay](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.2_Prioritized_Replay_DQN)\n    * [Dueling DQN](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.3_Dueling_DQN)\n    * [Policy Gradients](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/7_Policy_gradient_softmax)\n    * [Actor Critic](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/8_Actor_Critic_Advantage)\n    * [Deep Deterministic Policy Gradient](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/9_Deep_Deterministic_Policy_Gradient_DDPG)\n    * [A3C](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/10_A3C)\n    * [Dyna-Q](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/11_Dyna_Q)\n    * [Proximal Policy Optimization (PPO)](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/12_Proximal_Policy_Optimization)\n* [Some of my experiments](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/experiments)\n    * [2D Car](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/experiments/2D_car)\n    * [Robot arm](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/experiments/Robot_arm)\n    * [BipedalWalker](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/experiments/Solve_BipedalWalker)\n    * [LunarLander](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/experiments/Solve_LunarLander)\n\n# Some RL Networks\n### [Deep Q Network](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5_Deep_Q_Network)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5_Deep_Q_Network\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/4-3-2.png\">\n<\/a>\n\n### [Double DQN](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.1_Double_DQN)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.1_Double_DQN\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/4-5-3.png\">\n<\/a>\n\n### [Dueling DQN](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.3_Dueling_DQN)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/5.3_Dueling_DQN\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/4-7-4.png\">\n<\/a>\n\n### [Actor Critic](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/8_Actor_Critic_Advantage)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/8_Actor_Critic_Advantage\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/6-1-1.png\">\n<\/a>\n\n### [Deep Deterministic Policy Gradient](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/9_Deep_Deterministic_Policy_Gradient_DDPG)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/9_Deep_Deterministic_Policy_Gradient_DDPG\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/6-2-2.png\">\n<\/a>\n\n### [A3C](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/10_A3C)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/10_A3C\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/6-3-2.png\">\n<\/a>\n\n### [Proximal Policy Optimization (PPO)](https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/12_Proximal_Policy_Optimization)\n\n<a href=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/tree/master/contents/12_Proximal_Policy_Optimization\">\n    <img class=\"course-image\" src=\"https://morvanzhou.github.io/static/results/reinforcement-learning/6-4-3.png\">\n<\/a>\n\n# Donation\n\n*If this does help you, please consider donating to support me for better tutorials. Any contribution is greatly appreciated!*\n\n<div >\n  <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=morvanzhou%40gmail%2ecom&amp;lc=C2&amp;item_name=MorvanPython&amp;currency_code=AUD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted\">\n    <img style=\"border-radius: 20px;  box-shadow: 0px 0px 10px 1px  #888888;\"\n         src=\"https://www.paypalobjects.com/webstatic/en_US/i/btn/png/silver-pill-paypal-44px.png\"\n         alt=\"Paypal\"\n         height=\"auto\" ><\/a>\n<\/div>\n\n<div>\n  <a href=\"https://www.patreon.com/morvan\">\n    <img src=\"https://morvanzhou.github.io/static/img/support/patreon.jpg\"\n         alt=\"Patreon\"\n         height=120><\/a>\n<\/div>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9192:149227:180803:5E3BEA:6AB92A94"},"text_sha256":"4d1e1a582dba8a36ccb65e273a86981c8ea76e034d161be32dbc7dac114681c5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2580","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085F:70FF5:17CEC9F:1BF17F6:6AB92A95"},"commit":{"sha":"93e333484be0e262d28b65507b6a1d002424a056","url":"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/commit/93e333484be0e262d28b65507b6a1d002424a056","date":"2022-07-29T07:57:55Z","author_date":"2022-07-29T07:57:55Z","committer_date":"2022-07-29T07:57:55Z","tree_sha":"e7c0ec3476cf3351a8ffc64d382e098a16df6e4a","message_first_line":"fix tkinter geometry dim issue"},"tree_request_status":200,"tree_rate":{"github_remaining":"2579","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:17D24D6:1BF56BC:6AB92A95"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4600,"blob_sha":"42285aef864f30098e1730ac12a95aabea879b9f","priority":0}],"documents":[{"path":"README.md","size":4600,"blob_sha":"42285aef864f30098e1730ac12a95aabea879b9f","priority":0,"status":200,"text":"<p align=\"center\">\n    <a href=\"https://www.youtube.com/watch?v=pieI7rOXELI&list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba\" target=\"_blank\">\n    <img width=\"60%\" src=\"https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/blob/master/RL_cover.jpg\" style=\"max-width:100%;\">\n    <\/a>\n<\/p>\n\n\n<br>\n\n# Reinforcement Learning Methods and Tutorials\n\nIn these tutorials for reinforcement learning, it covers from the basic RL algorithms to advanced algorithms developed recent years.\n\n**If you speak Chinese, visit [莫烦 Python](https://mofanpy.com) or my [Youtube channel](https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg) for more.**\n\n**As many requests about making these tutorials available in English, please find them in this playlist:** ([https://www.youtube.com/playlist?list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba](https://www.youtube.com/playlist?list=PLXO45tsB95cIplu-fLMpUEEZTwrDNh6Ba))\n\n# Table of Contents\n\n* Tutorials\n    * [Simple entry example](contents/1_command_line_reinforcement_learning)\n    * [Q-learning](contents/2_Q_Learning_maze)\n    * [Sarsa](contents/3_Sarsa_maze)\n    * [Sarsa(lambda)](contents/4_Sarsa_lambda_maze)\n    * [Deep Q Network (DQN)](contents/5_Deep_Q_Network)\n    * [Using OpenAI Gym](contents/6_OpenAI_gym)\n    * [Double DQN](contents/5.1_Double_DQN)\n    * [DQN with Prioitized Experience Replay](contents/5.2_Prioritized_Replay_DQN)\n    * [Dueling DQN](contents/5.3_Dueling_DQN)\n    * [Policy Gradients](contents/7_Policy_gradient_softmax)\n    * [Actor-Critic](contents/8_Actor_Critic_Advantage)\n    * [Deep Deterministic Policy Gradient (DDPG)](contents/9_Deep_Deterministic_Policy_Gradient_DDPG)\n    * [A3C](contents/10_A3C)\n    * [Dyna-Q](contents/11_Dyna_Q)\n    * [Proximal Policy Optimization (PPO)](contents/12_Proximal_Policy_Optimization)\n    * [Curiosity Model](/contents/Curiosity_Model), [Random Network Distillation (RND)](/contents/Curiosity_Model/Random_Network_Distillation.py)\n* [Some of my experiments](experiments)\n    * [2D Car](experiments/2D_car)\n    * [Robot arm](experiments/Robot_arm)\n    * [BipedalWalker](experiments/Solve_BipedalWalker)\n    * [LunarLander](experiments/Solve_LunarLander)\n\n# Some RL Networks\n### [Deep Q Network](contents/5_Deep_Q_Network)\n\n<a href=\"contents/5_Deep_Q_Network\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/4-3-2.png\">\n<\/a>\n\n### [Double DQN](contents/5.1_Double_DQN)\n\n<a href=\"contents/5.1_Double_DQN\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/4-5-3.png\">\n<\/a>\n\n### [Dueling DQN](contents/5.3_Dueling_DQN)\n\n<a href=\"contents/5.3_Dueling_DQN\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/4-7-4.png\">\n<\/a>\n\n### [Actor Critic](contents/8_Actor_Critic_Advantage)\n\n<a href=\"contents/8_Actor_Critic_Advantage\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/6-1-1.png\">\n<\/a>\n\n### [Deep Deterministic Policy Gradient](contents/9_Deep_Deterministic_Policy_Gradient_DDPG)\n\n<a href=\"contents/9_Deep_Deterministic_Policy_Gradient_DDPG\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/6-2-2.png\">\n<\/a>\n\n### [A3C](contents/10_A3C)\n\n<a href=\"contents/10_A3C\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/6-3-2.png\">\n<\/a>\n\n### [Proximal Policy Optimization (PPO)](contents/12_Proximal_Policy_Optimization)\n\n<a href=\"contents/12_Proximal_Policy_Optimization\">\n    <img class=\"course-image\" src=\"https://mofanpy.com/static/results/reinforcement-learning/6-4-3.png\">\n<\/a>\n\n### [Curiosity Model](/contents/Curiosity_Model)\n\n<a href=\"/contents/Curiosity_Model\">\n    <img class=\"course-image\" src=\"/contents/Curiosity_Model/Curiosity.png\">\n<\/a>\n\n# Donation\n\n*If this does help you, please consider donating to support me for better tutorials. Any contribution is greatly appreciated!*\n\n<div >\n  <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=morvanzhou%40gmail%2ecom&amp;lc=C2&amp;item_name=MorvanPython&amp;currency_code=AUD&amp;bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted\">\n    <img style=\"border-radius: 20px;  box-shadow: 0px 0px 10px 1px  #888888;\"\n         src=\"https://www.paypalobjects.com/webstatic/en_US/i/btn/png/silver-pill-paypal-44px.png\"\n         alt=\"Paypal\"\n         height=\"auto\" ><\/a>\n<\/div>\n\n<div>\n  <a href=\"https://www.patreon.com/morvan\">\n    <img src=\"https://mofanpy.com/static/img/support/patreon.jpg\"\n         alt=\"Patreon\"\n         height=120><\/a>\n<\/div>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5462:40CE8:17FC33:5E2EB2:6AB92A94"},"text_sha256":"747c8d791b2609856aa840d5c94886c41022de28c69135622abfae2413b2ded2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"dotnet/machinelearning","input_row":{"repository":"dotnet/machinelearning","url":"https://github.com/dotnet/machinelearning","name":"machinelearning","owner":"dotnet","description":"ML.NET is an open source and cross-platform machine learning framework for .NET.","language":"C#","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9357,"issues":4077,"created_at":"2018-05-03T16:20:42Z","updated_at":"2026-09-26T14:15:30Z","first_commit_at":"2018-05-04T00:22:00Z","last_commit_at":"2026-09-23T10:57:35Z","activity_months":100.67,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:18.247Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dotnet/machinelearning","visibility":"public","created_at":"2018-05-03T16:20:42Z","updated_at":"2026-09-26T14:15:30Z","private":false,"fork":false,"archived":false,"stargazers_count":9357,"open_issues_count":761,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2578","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:180C327:1C2EE59:6AB92A96"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2577","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:17E5E5F:1C08CA7:6AB92A96"},"commit":{"sha":"b1bbceb9986f5c6d35479fcfcfbbd72488afecfe","url":"https://github.com/dotnet/machinelearning/commit/b1bbceb9986f5c6d35479fcfcfbbd72488afecfe","date":"2018-05-24T22:53:55Z","author_date":"2018-05-24T22:53:55Z","committer_date":"2018-05-24T22:53:55Z","tree_sha":"4a20cf43254a385ccb644a663cd2f72d4140aa7b","message_first_line":"Add examples for clustering (#222)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2576","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:182FCFC:1C527EE:6AB92A97"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5424,"blob_sha":"891f39af3b137b0ffb5db5eaa2d66e33efb8cac0","priority":0}],"documents":[{"path":"README.md","size":5424,"blob_sha":"891f39af3b137b0ffb5db5eaa2d66e33efb8cac0","priority":0,"status":200,"text":"\n\n# Machine Learning for .NET\n\n[ML.NET](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet) is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers.\n\nML.NET allows .NET developers to develop their own models and infuse custom ML into their applications without prior expertise in developing or tuning machine learning models, all in .NET.\n\nML.NET was originally developed in Microsoft Research and evolved into a significant framework over the last decade and is used across many product groups in Microsoft like Windows, Bing, PowerPoint, Excel and more.\n\nWith this first preview release ML.NET enables ML tasks like classification (e.g. support text classification, sentiment analysis) and regression (e.g. price-prediction). \n\nAlong with these ML capabilities this first release of ML.NET also brings the first draft of .NET APIs for training models, using models for predictions, as well as the core components of this framework such as learning algorithms, transforms, and ML data structures. \n\n## Installation\n\n[![NuGet Status](https://img.shields.io/nuget/v/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/)\n\nML.NET runs on Windows, Linux, and macOS - any platform where 64 bit [.NET Core](https://github.com/dotnet/core) or later is available.\n\nThe current release is 0.1. Check out the [release notes](docs/release-notes/0.1/release-0.1.md).\n\nFirst ensure you have installed [.NET Core 2.0](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework. Note that ML.NET currently must run in a 64 bit process.\n\nOnce you have an app, you can install the ML.NET NuGet package from the .NET Core CLI using:\n```\ndotnet add package Microsoft.ML\n```\n\nor from the NuGet package manager:\n```\nInstall-Package Microsoft.ML\n```\n\nOr alternatively you can add the Microsoft.ML package from within Visual Studio's NuGet package manager or via [Paket](https://github.com/fsprojects/Paket).\n\nDaily NuGet builds of the project are also available in our MyGet feed:\n\n> [https://dotnet.myget.org/F/dotnet-core/api/v3/index.json](https://dotnet.myget.org/F/dotnet-core/api/v3/index.json)\n\n## Building\n\nTo build ML.NET from source please visit our [developers guide](docs/project-docs/developer-guide.md).\n\n|    | x64 Debug | x64 Release |\n|:---|----------------:|------------------:|\n|**Linux**|[![x64-debug](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/linux_debug/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/linux_debug/lastCompletedBuild)|[![x64-release](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/linux_release/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/linux_release/lastCompletedBuild)|\n|**macOS**|[![x64-debug](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/osx10.13_debug/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/osx10.13_debug/lastCompletedBuild)|[![x64-release](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/osx10.13_release/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/osx10.13_release/lastCompletedBuild)|\n|**Windows**|[![x64-debug](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/windows_nt_debug/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/windows_nt_debug/lastCompletedBuild)|[![x64-release](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/windows_nt_release/badge/icon)](https://ci2.dot.net/job/dotnet_machinelearning/job/master/job/windows_nt_release/lastCompletedBuild)|\n\n## Contributing\n\nWe welcome contributions! Please review our [contribution guide](CONTRIBUTING.md).\n\n## Community\n\nPlease join our community on Gitter [![Join the chat at https://gitter.im/dotnet/mlnet](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/mlnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nThis project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community.\nFor more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).\n\n## Examples\n\nHere's an example of code to train a model to predict sentiment from text samples. \n(You can see the complete sample [here](test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs)):\n\n```C#\nvar pipeline = new LearningPipeline();\npipeline.Add(new TextLoader<SentimentData>(dataPath, separator: \",\"));\npipeline.Add(new TextFeaturizer(\"Features\", \"SentimentText\"));\npipeline.Add(new FastTreeBinaryClassifier());\nvar model = pipeline.Train<SentimentData, SentimentPrediction>();\n```\n\nNow from the model we can make inferences (predictions):\n\n```C#\nSentimentData data = new SentimentData\n{\n    SentimentText = \"Today is a great day!\"\n};\n\nSentimentPrediction prediction = model.Predict(data);\n\nConsole.WriteLine(\"prediction: \" + prediction.Sentiment);\n```\n\n## License\n\nML.NET is licensed under the [MIT license](LICENSE).\n\n## .NET Foundation\n\nML.NET is a [.NET Foundation](http://www.dotnetfoundation.org/projects) project.\n\nThere are many .NET related projects on GitHub.\n\n- [.NET home repo](https://github.com/Microsoft/dotnet) - links to 100s of .NET projects, from Microsoft and the community.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"25DA:3D501:184AB6:5E7E73:6AB92A8A"},"text_sha256":"4beaf62e0ec48bc10da5c454655e3bfe4f09b0b8e58ddd2886b148b0ae1fdb8e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2575","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:180C490:1C2F01D:6AB92A98"},"commit":{"sha":"2bed2219c958a507f3839fafc46eb6c2a27d8ca3","url":"https://github.com/dotnet/machinelearning/commit/2bed2219c958a507f3839fafc46eb6c2a27d8ca3","date":"2026-06-19T07:04:59Z","author_date":"2026-06-19T07:04:59Z","committer_date":"2026-06-19T07:04:59Z","tree_sha":"50f377baff6c46ad178f1a3d1fcc98bc3454971d","message_first_line":"Add report-green AzDO pipeline so Build Analysis completes on build-excluded PRs (#7623)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2574","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B3:0AC4:12917E4:15E4552:6AB92A98"},"tree_truncated":false,"document_candidates":[{"path":"README.ko-KR.md","size":11352,"blob_sha":"f1d0507893dbbcec63d666a1f47826a8b3dd2170","priority":0},{"path":"README.md","size":10605,"blob_sha":"82766af84ee23bd1510e17133990057b88abe6dc","priority":0},{"path":"SECURITY.md","size":2786,"blob_sha":"13770615866fc4daa49e20b87ee2a14c0b615d75","priority":1}],"documents":[{"path":"README.ko-KR.md","size":11352,"blob_sha":"f1d0507893dbbcec63d666a1f47826a8b3dd2170","priority":0,"status":200,"text":"# Machine Learning for .NET\n\n[ML.NET](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet)은 Power BI, Windows Defender 및 Azure를 비롯한 여러 Microsoft 제품에서 동일한 코드를 이용해 .NET 개발자가 기계 학습에 접근할 수 있도록 하는 크로스 플랫폼 오픈 소스 기계 학습 프레임워크입니다.\n\nML.NET을 이용해 .NET 개발자는 기계 학습 모델 개발 또는 튜닝에 대한 전문적인 사전 지식 없이도 .NET을 이용해 모델을 개발/훈련하고 맞춤형 기계 학습 모델을 프로그램에 적용시킬 수 있습니다. 파일 및 데이터베이스에서 데이터를 불러오는 것과 데이터의 변환을 지원하며, 다양한 ML 알고리즘을 포함하고 있습니다.\n\nML.NET은 분류(예: 텍스트 분류, 감정 분석), 회귀(예: 가격 예측)와 같은 기계 학습(ML) 작업과 이상 탐지, 시계열 예측, 클러스터링, 랭킹 등과 같은 많은 다양한 ML 작업을 지원합니다.\n\n## ML.NET을 이용해 기계 학습 시작하기\n\n기계 학습을 처음 접하는 경우 ML.NET을 대상으로 하는 이 리소스 모음에서 기본 사항들을 학습하십시오.\n\n[ML.NET 배우기](https://dotnet.microsoft.com/learn/ml-dotnet)\n\n## ML.NET 설명서, 자습서 및 참조\n\n[문서 및 자습서](https://docs.microsoft.com/en-us/dotnet/machine-learning/)를 확인하십시오.\n\n[API 레퍼런스 문서](https://docs.microsoft.com/en-us/dotnet/api/?view=ml-dotnet)를 확인하십시오.\n\n## 샘플 앱\n\n[ML.NET 샘플 앱](https://github.com/dotnet/machinelearning-samples)을 포함한 GitHub 리포지토리에서 감성 분석, 부정 행위 탐지, 제품 추천, 가격 예측, 이상 탐지, 이미지 분류, 개체 탐지 등과 같은 다양한 시나리오를 제공합니다.\n\nMicrosoft에서 제공하는 ML.NET 샘플 외에도 별도의 페이지 [ML.NET 커뮤티니 샘플](https://github.com/dotnet/machinelearning-samples/blob/main/docs/COMMUNITY-SAMPLES.md)에 소개 된 커뮤니티에서 만든 샘플들이 있습니다.\n\n## ML.NET YouTube 비디오 플레이리스트\n\nYouTube의 [ML.NET 비디오 플레이리스트](https://aka.ms/mlnetyoutube)에는 몇 가지 짧은 동영상이 있습니다. 각 비디오는 ML.NET의 특정 주제에 중점을 두고있습니다.\n\n## ML.NET에서 지원하는 운영 체제 및 프로세서 아키텍처\n\nML.NET은 [.NET Core](https://github.com/dotnet/core)를 사용하여 Windows, Linux 및 macOS에서 실행되거나, .NET Framework를 사용하여 Windows에서 실행될 수 있습니다.\n\n64비트는 모든 플랫폼에서 지원됩니다. 32비트는 Windows에서 지원되며,TensorFlow 및 LightGBM 관련 기능들은 지원되지 않습니다.\n\n## ML.NET NuGet 패키지 상태\n\n[![NuGet Status](https://img.shields.io/nuget/vpre/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/)\n\n## 릴리즈 노트\n\n새로운 기능을 확인하려면 [릴리즈 노트](docs/release-notes)를 확인하십시오.\n\n## ML.NET 패키지 사용하기\n\n먼저 [.NET Core 2.1](https://www.microsoft.com/net/learn/get-started) 이상을 설치했는지 확인합니다. ML.NET은 .NET Framework 4.6.1 이상에서도 작동하지만 4.7.2 이상이 권장됩니다.\n\n앱이 있는 경우, 다음을 사용하여 .NET Core CLI에서 ML.NET NuGet 패키지를 설치할 수 있습니다.\n```\ndotnet add package Microsoft.ML\n```\n\n또는 NuGet 패키지 매니저에서 설치할 수도 있습니다.\n```\nInstall-Package Microsoft.ML\n```\n\n대안으로, Visual Studio의 NuGet 패키지 관리자 내에서 또는 [Paket](https://github.com/fsprojects/Paket)을 통해 Microsoft.ML 패키지를 추가할 수 있습니다.\n\n프로젝트의 일일 NuGet 빌드는 Azure DevOps 피드에서도 사용할 수 있습니다.\n\n> [https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json](https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json)\n\n## ML.NET 빌드하기 (ML.NET 오픈소스 코드를 빌드하려 하는 기여자들을 위해)\n\n소스에서 ML.NET을 빌드하려면 [개발자 가이드](docs/project-docs/developer-guide.md)를 방문하십시오.\n\n[![codecov](https://codecov.io/gh/dotnet/machinelearning/branch/main/graph/badge.svg?flag=production)](https://codecov.io/gh/dotnet/machinelearning)\n\n|    | Debug | Release |\n|:---|----------------:|------------------:|\n|**CentOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_Net60&configuration=Centos_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_Net60&configuration=Centos_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Ubuntu**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_Net60&configuration=Ubuntu_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_Net60&configuration=Ubuntu_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**macOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_Net60&configuration=MacOS_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_Net60&configuration=MacOS_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows x64**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows FullFramework**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows x86**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_Net60&configuration=Windows_x86_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_Net60&configuration=Windows_x86_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows NetCore3.1**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n\n## 릴리즈 프로세스 및 버전 관리\n\n다양한 종류의 ML.NET 릴리즈를 확인하려면 [릴리즈 프로세스 문서](docs/release-notes)를 확인하십시오.\n\n## 기여하기\n\n우리는 기여를 환영합니다! [기여 가이드](CONTRIBUTING.md)를 확인하십시오.\n\n## 커뮤니티\n\nGlitter의 커뮤니티에 가입하세요 [![Join the chat at https://gitter.im/dotnet/mlnet](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/mlnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n이 프로젝트는 커뮤니티에서 예상되는 행동을 명확히 하기 위해 [기여자 규약](https://contributor-covenant.org/)에 정의된 행동 강령을 채택했습니다.\n자세한 내용은 [.NET 재단 행동 강령](https://dotnetfoundation.org/code-of-conduct)을 참조하십시오.\n\n\n## 예제\n\n다음은 텍스트 샘플에서 감정을 예측하도록 모델을 학습시키는 스니펫 코드입니다. [샘플 리포지토리](https://github.com/dotnet/machinelearning-samples)에서 전체 샘플을 확인할 수 있습니다.\n\n```C#\nvar dataPath = \"sentiment.csv\";\nvar mlContext = new MLContext();\nvar loader = mlContext.Data.CreateTextLoader(new[]\n    {\n        new TextLoader.Column(\"SentimentText\", DataKind.String, 1),\n        new TextLoader.Column(\"Label\", DataKind.Boolean, 0),\n    },\n    hasHeader: true,\n    separatorChar: ',');\nvar data = loader.Load(dataPath);\nvar learningPipeline = mlContext.Transforms.Text.FeaturizeText(\"Features\", \"SentimentText\")\n        .Append(mlContext.BinaryClassification.Trainers.FastTree());\nvar model = learningPipeline.Fit(data);\n```\n\n이제 모델에서 추론(예측)을 할 수 있습니다.\n\n```C#\nvar predictionEngine = mlContext.Model.CreatePredictionEngine<SentimentData, SentimentPrediction>(model);\nvar prediction = predictionEngine.Predict(new SentimentData\n{\n    SentimentText = \"Today is a great day!\"\n});\nConsole.WriteLine(\"prediction: \" + prediction.Prediction);\n```\n다양한 기존 시나리오와 새로운 시나리오에서 이러한 API를 사용하는 방법을 보여주는 가이드는 [여기](docs/code/MlNetCookBook.md)에서 찾을 수 있습니다.\n\n\n## 라이선스\n\nML.NET은 [MIT 허가서](LICENSE)에 따라 라이선스가 부여되며 상업적으로 무료로 사용할 수 있습니다.\n\n## .NET 재단\n\nML.NET은[.NET 재단](https://www.dotnetfoundation.org/projects) 프로젝트입니다.\n\nGitHub에서 많은 .NET 관련 프로젝트를 확인할 수 있습니다.\n\n- [.NET 홈 리포지토리](https://github.com/Microsoft/dotnet) - Microsoft 및 커뮤니티에서 제공하는 수백 개의 .NET 프로젝트에 대한 링크\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1728:3A3DD:178757:5DBB19:6AB92A99"},"text_sha256":"4fc1b9ed5e34a4b9d49a3af4b4328ea2af17310256cb5f61f31c238d0603a6ee"},{"path":"README.md","size":10605,"blob_sha":"82766af84ee23bd1510e17133990057b88abe6dc","priority":0,"status":200,"text":"# Machine Learning for .NET\n\n[ML.NET](https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet) is a cross-platform open-source machine learning (ML) framework for .NET.\n\nML.NET allows developers to easily build, train, deploy, and consume custom models in their .NET applications without requiring prior expertise in developing machine learning models or experience with other programming languages like Python or R. The framework provides data loading from files and databases, enables data transformations, and includes many ML algorithms.\n\nWith ML.NET, you can train models for a [variety of scenarios](https://docs.microsoft.com/dotnet/machine-learning/resources/tasks), like classification, forecasting, and anomaly detection.\n\nYou can also consume both TensorFlow and ONNX models within ML.NET which makes the framework more extensible and expands the number of supported scenarios.\n\n## Getting started with machine learning and ML.NET\n\n- Learn more about the [basics of ML.NET](https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet).\n- Build your first ML.NET model by following our [ML.NET Getting Started tutorial](https://dotnet.microsoft.com/learn/ml-dotnet/get-started-tutorial/intro).\n- Check out our [documentation and tutorials](https://docs.microsoft.com/dotnet/machine-learning/).\n- See the [API Reference documentation](https://docs.microsoft.com/dotnet/api/?view=ml-dotnet).\n- Clone our [ML.NET Samples GitHub repo](https://github.com/dotnet/machinelearning-samples) and run some sample apps.\n- Take a look at some [ML.NET Community Samples](https://github.com/dotnet/machinelearning-samples/blob/main/docs/COMMUNITY-SAMPLES.md).\n- Watch some videos on the [ML.NET videos YouTube playlist](https://aka.ms/mlnetyoutube).\n\n## Roadmap\n\nTake a look at ML.NET's [Roadmap](ROADMAP.md) to see what the team plans to work on in the next year.\n\n## Operating systems and processor architectures supported by ML.NET\n\nML.NET runs on Windows, Linux, and macOS using .NET Core, or Windows using .NET Framework.\n\nML.NET also runs on ARM64, Apple M1, and Blazor Web Assembly. However, there are some [limitations](docs/project-docs/platform-limitations.md).\n\n64-bit is supported on all platforms. 32-bit is supported on Windows, except for TensorFlow and LightGBM related functionality.\n\n## ML.NET NuGet packages status\n\n[![NuGet Status](https://img.shields.io/nuget/v/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/)\n\n[![Latest NuGet Status](https://img.shields.io/nuget/vpre/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/absoluteLatest)\n\n## Release notes\n\nCheck out the [release notes](docs/release-notes) to see what's new. You can also read the [blog posts](https://devblogs.microsoft.com/dotnet/category/ml-net/) for more details about each release.\n\n## Using ML.NET packages\n\nFirst, ensure you have installed [.NET Core 2.1](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework 4.6.1 or later, but 4.7.2 or later is recommended.\n\nOnce you have an app, you can install the ML.NET NuGet package from the .NET Core CLI using:\n```\ndotnet add package Microsoft.ML\n```\n\nor from the NuGet Package Manager:\n```\nInstall-Package Microsoft.ML\n```\n\nAlternatively, you can add the Microsoft.ML package from within Visual Studio's NuGet package manager or via [Paket](https://github.com/fsprojects/Paket).\n\nDaily NuGet builds of the project are also available in our Azure DevOps feed:\n\n> [https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json](https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json)\n\n## Building ML.NET (For contributors building ML.NET open source code)\n\nTo build ML.NET from source please visit our [developer guide](docs/project-docs/developer-guide.md).\n\n[![codecov](https://codecov.io/gh/dotnet/machinelearning/branch/main/graph/badge.svg?flag=production)](https://codecov.io/gh/dotnet/machinelearning)\n\n|    | Debug | Release |\n|:---|----------------:|------------------:|\n|**CentOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_Net60&configuration=Centos_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_Net60&configuration=Centos_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Ubuntu**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_Net60&configuration=Ubuntu_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_Net60&configuration=Ubuntu_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**macOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_Net60&configuration=MacOS_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_Net60&configuration=MacOS_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows x64**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows FullFramework**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows x86**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_Net60&configuration=Windows_x86_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_Net60&configuration=Windows_x86_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n|**Windows NetCore3.1**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_Net60&configuration=Windows_x64_Net60%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|\n\n## Release process and versioning\n\nMajor releases of ML.NET are shipped once a year with the major .NET releases, starting with ML.NET 1.7 in November 2021 with .NET 6, then ML.NET 2.0 with .NET 7, etc. We will maintain release branches to optionally service ML.NET with bug fixes and/or minor features on the same cadence as .NET servicing.\n\nCheck out the [Release Notes](docs/release-notes) to see all of the past ML.NET releases.\n\n## Contributing\n\nWe welcome contributions! Please review our [contribution guide](CONTRIBUTING.md).\n\n## Community\n\n- Join our community on [Discord](https://aka.ms/dotnet-discord).\n- Tune into the [.NET Machine Learning Community Standup](https://dotnet.microsoft.com/live/community-standup) every other Wednesday at 10AM Pacific Time.\n\nThis project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/) to clarify expected behavior in our community.\nFor more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).\n\n## Code examples\n\nHere is a code snippet for training a model to predict sentiment from text samples. You can find complete samples in the [samples repo](https://github.com/dotnet/machinelearning-samples).\n\n```C#\nvar dataPath = \"sentiment.csv\";\nvar mlContext = new MLContext();\nvar loader = mlContext.Data.CreateTextLoader(new[]\n    {\n        new TextLoader.Column(\"SentimentText\", DataKind.String, 1),\n        new TextLoader.Column(\"Label\", DataKind.Boolean, 0),\n    },\n    hasHeader: true,\n    separatorChar: ',');\nvar data = loader.Load(dataPath);\nvar learningPipeline = mlContext.Transforms.Text.FeaturizeText(\"Features\", \"SentimentText\")\n        .Append(mlContext.BinaryClassification.Trainers.FastTree());\nvar model = learningPipeline.Fit(data);\n```\n\nNow from the model we can make inferences (predictions):\n\n```C#\nvar predictionEngine = mlContext.Model.CreatePredictionEngine<SentimentData, SentimentPrediction>(model);\nvar prediction = predictionEngine.Predict(new SentimentData\n{\n    SentimentText = \"Today is a great day!\"\n});\nConsole.WriteLine(\"prediction: \" + prediction.Prediction);\n```\n\n## License\n\nML.NET is licensed under the [MIT license](LICENSE), and it is free to use commercially.\n\n## .NET Foundation\n\nML.NET is a part of the [.NET Foundation](https://www.dotnetfoundation.org/projects).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7492:38C7FC:17DD6E:5A5750:6AB92A98"},"text_sha256":"74d7d51910341e2edb22ff026967d4e1e9c0c0b5e5c2e3c10597ea029cfea0b2"},{"path":"SECURITY.md","size":2786,"blob_sha":"13770615866fc4daa49e20b87ee2a14c0b615d75","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nMicrosoft serves as the primary maintainer of this repository. If you believe you have found a security vulnerability that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EE2:3EACB:17A205:5DD5CD:6AB92A9A"},"text_sha256":"bb2846d46145bb7d0ca2e936d2f393e4950e27a53d69f75ead3e01bb9cb0378d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"catboost/catboost","input_row":{"repository":"catboost/catboost","url":"https://github.com/catboost/catboost","name":"catboost","owner":"catboost","description":"A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9119,"issues":2572,"created_at":"2017-07-18T05:29:04Z","updated_at":"2026-09-26T16:24:14Z","first_commit_at":"2017-07-18T05:33:21Z","last_commit_at":"2026-09-26T16:24:03Z","activity_months":110.3,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:22.843Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"catboost/catboost","visibility":"public","created_at":"2017-07-18T05:29:04Z","updated_at":"2026-09-26T16:24:14Z","private":false,"fork":false,"archived":false,"stargazers_count":9119,"open_issues_count":724,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2573","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:17FCB8C:1C1FBDD:6AB92A9A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2572","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0929:DC698:17F24C0:1C14BCE:6AB92A9B"},"commit":{"sha":"b309a769ddbcced5fb3aab9ebc64632f56b40014","url":"https://github.com/catboost/catboost/commit/b309a769ddbcced5fb3aab9ebc64632f56b40014","date":"2018-05-24T19:46:01Z","author_date":"2018-05-24T19:46:01Z","committer_date":"2018-05-24T19:46:01Z","tree_sha":"be94b6a3e0d470ec265b15f6749f8b99056f45a7","message_first_line":"explicit constructor"},"tree_request_status":200,"tree_rate":{"github_remaining":"2571","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B4:1B4E7A:17A74F0:1BCA329:6AB92A9B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5177,"blob_sha":"bbb0e1a2a687cf6408ccf6c80a9a6293ab8beaae","priority":0}],"documents":[{"path":"README.md","size":5177,"blob_sha":"bbb0e1a2a687cf6408ccf6c80a9a6293ab8beaae","priority":0,"status":200,"text":"<img src=http://storage.mds.yandex.net/get-devtools-opensource/250854/catboost-logo.png width=300/>\n\n[Website](https://catboost.yandex) |\n[Documentation](https://tech.yandex.com/catboost/doc/dg/concepts/about-docpage/) |\n[Installation](https://tech.yandex.com/catboost/doc/dg/concepts/cli-installation-docpage/) |\n[Release Notes](https://github.com/catboost/catboost/releases)\n\n[![Build Status](https://travis-ci.org/catboost/catboost.svg?branch=master)](https://travis-ci.org/catboost/catboost)\n[![Build Status](https://ci.appveyor.com/api/projects/status/github/catboost/catboost?branch=master&svg=true)](https://ci.appveyor.com/project/exprmntr/catboost-jjlbl)\n[![License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/catboost/catboost/blob/master/LICENSE)\n[![PyPI version](https://badge.fury.io/py/catboost.svg)](https://badge.fury.io/py/catboost)\n\nCatBoost is a machine learning method based on [gradient boosting](https://en.wikipedia.org/wiki/Gradient_boosting) over decision trees.\n\nMain advantages of CatBoost:\n  - Superior quality when [compared](https://github.com/catboost/benchmarks/blob/master/README.md) with other GBDT libraries.\n  - Best in class [inference](https://tech.yandex.com/catboost/doc/dg/concepts/c-plus-plus-api-docpage/) speed.\n  - Support for both [numerical and categorical](https://tech.yandex.com/catboost/doc/dg/concepts/algorithm-main-stages-docpage/) features.\n  - Fast GPU and multi-GPU support for training (compiled binaries and python package for learning on one host, build [cmd-line MPI version](https://tech.yandex.com/catboost/doc/dg/concepts/cli-installation-docpage/#multi-node-installation) from source to learn on several GPU machines).\n  - Data visualization tools [included](https://tech.yandex.com/catboost/doc/dg/features/visualization-docpage/).\n\nGet Started and Documentation\n--------------\nAll CatBoost documentation is available [here](https://tech.yandex.com/catboost/doc/dg/concepts/about-docpage/).\n\nInstall CatBoost by following the guide for the\n * [Python package](https://tech.yandex.com/catboost/doc/dg/concepts/python-installation-docpage/)\n * [R-package](https://tech.yandex.com/catboost/doc/dg/concepts/r-installation-docpage/)\n * [command line](https://tech.yandex.com/catboost/doc/dg/concepts/cli-installation-docpage/)\n\nNext you may want to investigate:\n* [Tutorials](https://github.com/catboost/catboost/tree/master/catboost/tutorials)\n* Training modes on [CPU](https://tech.yandex.com/catboost/doc/dg/features/training-docpage/#training) and [GPU](https://tech.yandex.com/catboost/doc/dg/features/training-on-gpu-docpage/#training-on-gpu)\n* [Cross-validation](https://tech.yandex.com/catboost/doc/dg/features/cross-validation-docpage/#cross-validation)\n* [Implemented metrics](https://tech.yandex.com/catboost/doc/dg/features/loss-functions-desc-docpage/#loss-functions-desc)\n* [Parameters tuning](https://tech.yandex.com/catboost/doc/dg/concepts/parameter-tuning-docpage/)\n* [Feature importance calculation](https://tech.yandex.com/catboost/doc/dg/features/feature-importances-calculation-docpage/#feature-importances-calculation)\n* [Regular](https://tech.yandex.com/catboost/doc/dg/features/prediction-docpage/#prediction) and [staged](https://tech.yandex.com/catboost/doc/dg/features/staged-prediction-docpage/#staged-prediction) predictions\n\nCatboost models in production\n--------------\nIf you want to evaluate Catboost model in your application read [model api documentation](https://github.com/catboost/catboost/tree/master/catboost/CatboostModelAPI.md).\n\nQuestions and bug reports\n--------------\n* For reporting bugs please use the [catboost/bugreport](https://github.com/catboost/catboost/issues) page.\n* Ask your question about CatBoost on [Stack Overflow](https://stackoverflow.com/questions/tagged/catboost).\n\nHelp to Make CatBoost Better\n----------------------------\n* Check out [help wanted](https://github.com/catboost/catboost/labels/help%20wanted) issues to see what can be improved, or open an issue if you want something.\n* Add your stories and experience to [Awesome CatBoost](AWESOME.md).\n* To contribute to CatBoost you need to first read CLA text and add to your pull request, that you agree to the terms of the CLA. More information can be found\nin [CONTRIBUTING.md](https://github.com/catboost/catboost/blob/master/CONTRIBUTING.md)\n* Instructions for contributors can be found [here](https://tech.yandex.com/catboost/doc/dg/concepts/development-and-contributions-docpage/).\n\nNews\n--------------\nLatest news are published on [twitter](https://twitter.com/catboostml).\n\nReference Paper\n-------\nAnna Veronika Dorogush, Andrey Gulin, Gleb Gusev, Nikita Kazeev, Liudmila Ostroumova Prokhorenkova, Aleksandr Vorobev [\"Fighting biases with dynamic boosting\"](https://arxiv.org/abs/1706.09516). arXiv:1706.09516, 2017.\n\nAnna Veronika Dorogush, Vasily Ershov, Andrey Gulin [\"CatBoost: gradient boosting with categorical features support\"](http://learningsys.org/nips17/assets/papers/paper_11.pdf). Workshop on ML Systems\nat NIPS 2017.\n\nLicense\n-------\n© YANDEX LLC, 2017-2018. Licensed under the Apache License, Version 2.0. See LICENSE file for more details.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CFA:11316A:17C950:5DFC85:6AB92A9D"},"text_sha256":"84eb3fa5f8acb354f38c420fdbb3c4dd9138e435f193f4e3ffe3db1dbe0e17bc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2570","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:17EB96D:1C0E33C:6AB92A9D"},"commit":{"sha":"660eba3cfdc775be9e69332d6e873eb0397501af","url":"https://github.com/catboost/catboost/commit/660eba3cfdc775be9e69332d6e873eb0397501af","date":"2026-06-30T09:44:30Z","author_date":"2026-06-30T09:20:26Z","committer_date":"2026-06-30T09:44:30Z","tree_sha":"55e8b38b98b82d2d28a3a3f37116b2373ff17d86","message_first_line":"Improve error message for wrong training parameter type"},"tree_request_status":200,"tree_rate":{"github_remaining":"2569","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:17EED81:1C11B4D:6AB92A9D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5279,"blob_sha":"814e1a415fd8739263cba2741671fe927c49385a","priority":0},{"path":"catboost/docs/en/_includes/work_src/reusage/cli__grow-policy__note.md","size":239,"blob_sha":"850012418c3913f32e1307bb6c340dee8d874096","priority":1},{"path":"contrib/libs/cxxsupp/builtins/SECURITY.md","size":205,"blob_sha":"f6a5e6c016291797ec05e53b4b6525cb0a0cdaf2","priority":1},{"path":"contrib/libs/flatbuffers/SECURITY.md","size":481,"blob_sha":"c61f66f84a0accc484992b44954a23102a2ffb11","priority":1},{"path":"contrib/libs/jdk/SECURITY.md","size":185,"blob_sha":"f4c5e7e67cb46def6b16d15c2963c1c9a2ff0d50","priority":1},{"path":"contrib/libs/lcms2/SECURITY.md","size":1867,"blob_sha":"28a1085644d61f37023cc85c8209be365276d12d","priority":1},{"path":"contrib/libs/llvm/flang-rt/SECURITY.md","size":205,"blob_sha":"f6a5e6c016291797ec05e53b4b6525cb0a0cdaf2","priority":1},{"path":"contrib/libs/mimalloc/SECURITY.md","size":2656,"blob_sha":"b3c89efc852e22f71eabf5dfbc6ac62493425eb6","priority":1},{"path":"contrib/libs/onnx/SECURITY.md","size":964,"blob_sha":"a18dca205b2451febcacaea66e085adf63f308cd","priority":1},{"path":"contrib/libs/protobuf_old/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1},{"path":"contrib/libs/protobuf/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1},{"path":"contrib/libs/pybind11/SECURITY.md","size":688,"blob_sha":"3d74611f2db85d7981287ad4314e2a868a1280d5","priority":1},{"path":"contrib/libs/re2/SECURITY.md","size":293,"blob_sha":"39ba0e93f2df613b6aa3856ebd7f6bca6321d28c","priority":1},{"path":"contrib/libs/tbb/SECURITY.md","size":3162,"blob_sha":"c9be5beb7ff73957047b7bbccf81a91526b6e743","priority":1},{"path":"contrib/libs/xxhash/SECURITY.md","size":688,"blob_sha":"2a8b4c8e5a1387217873e1a9e1f84b0d5eb5387b","priority":1},{"path":"contrib/libs/zeromq/SECURITY.md","size":18140,"blob_sha":"561a3956302a39381f8a439db766126188038031","priority":1},{"path":"contrib/libs/zstd/SECURITY.md","size":952,"blob_sha":"a5f9a7e1fdbd0a37a838a7b17f90a39fca75ef17","priority":1},{"path":"contrib/restricted/google/utf8_range/SECURITY.md","size":159,"blob_sha":"2969e7065108bbcc3c5b346797e1baaa01b2f4b8","priority":1},{"path":"SECURITY.md","size":1400,"blob_sha":"f81d2b9adc36560a284d9de3f94edab939aef17a","priority":1}],"documents":[{"path":"README.md","size":5279,"blob_sha":"814e1a415fd8739263cba2741671fe927c49385a","priority":0,"status":200,"text":"<img src=http://storage.mds.yandex.net/get-devtools-opensource/250854/catboost-logo.png width=300/>\n\n[Website](https://catboost.ai) |\n[Documentation](https://catboost.ai/docs/) |\n[Tutorials](https://catboost.ai/docs/concepts/tutorials.html) |\n[Installation](https://catboost.ai/docs/concepts/installation.html) |\n[Release Notes](https://github.com/catboost/catboost/releases)\n\n[![GitHub license](https://img.shields.io/github/license/catboost/catboost.svg)](https://github.com/catboost/catboost/blob/master/LICENSE)\n[![PyPI version](https://badge.fury.io/py/catboost.svg)](https://badge.fury.io/py/catboost)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/catboost.svg)](https://anaconda.org/conda-forge/catboost)\n[![GitHub issues](https://img.shields.io/github/issues/catboost/catboost.svg)](https://github.com/catboost/catboost/issues)\n[![Telegram](https://img.shields.io/badge/chat-on%20Telegram-2ba2d9.svg)](https://t.me/catboost_en)\n[![Twitter](https://img.shields.io/badge/@CatBoostML--_.svg?style=social&logo=twitter)](https://twitter.com/CatBoostML)\n\nCatBoost is a machine learning method based on [gradient boosting](https://en.wikipedia.org/wiki/Gradient_boosting) over decision trees.\n\nMain advantages of CatBoost:\n--------------\n  - Superior quality [compared](https://github.com/catboost/benchmarks/blob/master/README.md) with other GBDT libraries on many datasets.\n  - Best-in-class [prediction](https://catboost.ai/docs/concepts/c-plus-plus-api.html) speed.\n  - Support for both [numerical and categorical](https://catboost.ai/docs/concepts/algorithm-main-stages.html) features.\n  - Fast GPU and multi-GPU support for out-of-the box training.\n  - Built-in [visualization tools](https://catboost.ai/docs/features/visualization.html).\n  - Fast and reproducible distributed training with [Apache Spark](https://catboost.ai/en/docs/concepts/spark-overview) and [CLI](https://catboost.ai/en/docs/concepts/cli-distributed-learning).\n\nGet Started and Documentation\n--------------\nAll CatBoost documentation is available [here](https://catboost.ai/docs/).\n\nInstall CatBoost by following the guide for the\n * [Python package](https://catboost.ai/en/docs/concepts/python-installation)\n * [R-package](https://catboost.ai/en/docs/concepts/r-installation)\n * [Сommand line](https://catboost.ai/en/docs/concepts/cli-installation)\n * [Package for Apache Spark](https://catboost.ai/en/docs/concepts/spark-installation)\n\nNext you may want to explore:\n* [Tutorials](https://github.com/catboost/tutorials/#readme)\n* [Training modes and metrics](https://catboost.ai/docs/concepts/loss-functions.html)\n* [Cross-validation](https://catboost.ai/docs/features/cross-validation.html#cross-validation)\n* [Parameters tuning](https://catboost.ai/docs/concepts/parameter-tuning.html)\n* [Feature importance calculation](https://catboost.ai/docs/features/feature-importances-calculation.html)\n* [Regular](https://catboost.ai/docs/features/prediction.html#prediction) and [staged](https://catboost.ai/docs/features/staged-prediction.html#staged-prediction) predictions\n* CatBoost for Apache Spark videos: [Introduction](https://youtu.be/47-mAVms-b8) and [Architecture](https://youtu.be/nrGt5VKZpzc)\n\nIf you cannot open documentation in your browser try adding yastatic.net and yastat.net to the list of allowed domains in your Privacy Badger.\n\nCatBoost models in production\n--------------\nIf you want to evaluate CatBoost model in your application read [model api documentation](https://github.com/catboost/catboost/tree/master/catboost/CatboostModelAPI.md).\n\nQuestions and bug reports\n--------------\n* For reporting bugs please use the [catboost/bugreport](https://github.com/catboost/catboost/issues) page.\n* Ask a question on [CatBoost GitHub Discussions Q&A forum](https://github.com/catboost/catboost/discussions/categories/q-a).\n* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/catboost) with the catboost tag, we monitor this for new questions.\n* Seek prompt advice at [Telegram group](https://t.me/catboost_en) or Russian-speaking [Telegram chat](https://t.me/catboost_ru)\n\nHelp to Make CatBoost Better\n----------------------------\n* Check out [open problems](https://github.com/catboost/catboost/blob/master/open_problems/open_problems.md) and [help wanted issues](https://github.com/catboost/catboost/labels/help%20wanted) to see what can be improved, or open an issue if you want something.\n* Add your stories and experience to [Awesome CatBoost](AWESOME.md).\n* [Instructions for contributors](https://github.com/catboost/catboost/blob/master/CONTRIBUTING.md).\n\nNews\n--------------\nLatest news are published on [twitter](https://twitter.com/catboostml).\n\nReference Paper\n-------\nAnna Veronika Dorogush, Andrey Gulin, Gleb Gusev, Nikita Kazeev, Liudmila Ostroumova Prokhorenkova, Aleksandr Vorobev [\"Fighting biases with dynamic boosting\"](https://arxiv.org/abs/1706.09516). arXiv:1706.09516, 2017.\n\nAnna Veronika Dorogush, Vasily Ershov, Andrey Gulin [\"CatBoost: gradient boosting with categorical features support\"](http://learningsys.org/nips17/assets/papers/paper_11.pdf). Workshop on ML Systems\nat NIPS 2017.\n\nLicense\n-------\n© YANDEX LLC, 2017-2026. Licensed under the Apache License, Version 2.0. See LICENSE file for more details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"42C4:7A4F8:1826B8:5E5BCE:6AB92A9F"},"text_sha256":"9c874adb3b5ce9e14a0de3f6b646b11b13532b37c84a16450315d017ac47333e"},{"path":"catboost/docs/en/_includes/work_src/reusage/cli__grow-policy__note.md","size":239,"blob_sha":"850012418c3913f32e1307bb6c340dee8d874096","priority":1,"status":200,"text":"\n{% note info %}\n\nModels with this growing policy can not be analyzed using the {{ title__predictiondiff }} feature importance and can be exported only to {{ fit__model-format_json }} and {{ fitpython__model-format_cbm }}.\n\n{% endnote %}\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F06:3BCC6:17C575:5DF9FB:6AB92AA0"},"text_sha256":"37e2b65437f310f2a4f686a85e3c19061d317f85342c5a01f190682fb465ada6"},{"path":"contrib/libs/cxxsupp/builtins/SECURITY.md","size":205,"blob_sha":"f6a5e6c016291797ec05e53b4b6525cb0a0cdaf2","priority":1,"status":200,"text":"# Reporting LLVM Security Issues\n\nTo report security issues in LLVM, please follow the steps outlined on the\n[LLVM Security Group](https://llvm.org/docs/Security.html#how-to-report-a-security-issue)\npage.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C8A:149227:1808CF:5E3E1C:6AB92AA1"},"text_sha256":"bf1e70a2e52a213669958fa485fa69e13504fcdbfa0d3c1e34ec61dbcce9d1dd"},{"path":"contrib/libs/flatbuffers/SECURITY.md","size":481,"blob_sha":"c61f66f84a0accc484992b44954a23102a2ffb11","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nTo report a security issue, please use http://g.co/vulnz. We use\nhttp://g.co/vulnz for our intake, and do coordination and disclosure here on\nGitHub (including using GitHub Security Advisory). The Google Security Team will\nrespond within 5 working days of your report on g.co/vulnz.\n\nSelect the `I want to report a technical security or an abuse risk related bug\nin a Google product (SQLi, XSS, etc.)` option and complete the form.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B178:3E1DA:178F32:5DC40B:6AB92AA1"},"text_sha256":"58facd640c23223e845c9510c941e59963628db13b499003130482b8325edec1"},{"path":"contrib/libs/jdk/SECURITY.md","size":185,"blob_sha":"f4c5e7e67cb46def6b16d15c2963c1c9a2ff0d50","priority":1,"status":200,"text":"# JDK Vulnerabilities\n\nPlease follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"959A:1A3D83:185D5C:5E9288:6AB92AA0"},"text_sha256":"2fa31f7e046d8815d41685f3370b2e27f823655487c5d36acfb1bff2b4a2ad56"},{"path":"contrib/libs/lcms2/SECURITY.md","size":1867,"blob_sha":"28a1085644d61f37023cc85c8209be365276d12d","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nLittleCMS is located deep in the Linux dependency tree. So, security issues are real and should be addressed. The proposed process is quite simple, if you detect a potential security issue and you are able to create a patch, please send us the patch to analyse. We have an extensive test bed of apps and utilities using lcms, so we can check if all those goes fine. If you don’t want to create a patch and only want to report the vulnerability, that's ok too. And we will be very grateful. Just contact us.\n\n**Please avoid public advisories if possible, as doing that, hints how to use the flaw for malicious use**.\n\nPlease don’t make noise to gain popularity, this can result in bad karma to you. Any CVE without reliable proof will be promptly disputed.\n\nPlease don’t use untrusted patches from 3rd parties. We had an incident years ago with so called “security experts” trying to add a back door by using a crafted patch.\n\nCredits to vulnerability busters will be given on each release\n\nAfter the patch proves to be harmless, I will send to the mailing list a signed mail with the patch attached. \nThat is, you got a patch from upstream that upstream claims to be reasonably tested. I will apply the same checks that I do before a normal release. \nPlease understand that this is a lot of work, and obviously it can fail as well, so the “no guarantee” clause of MIT license applies. If you choose to \nredistribute such patches, please make sure to include the mail, or at least the MIT license. By including the MIT license you prevent to get in legal trouble.\n\n## Using GitHub security advisory\n\nPlease contact me instead. Security advisories are immediatly deleted without checking due to high level of SPAM received.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"652A:7A4F8:1826CC:5E5C00:6AB92AA1"},"text_sha256":"936cd6a1946e16f71ea9bf7655db266b7cb7535e35581f44448540738f033d3e"},{"path":"contrib/libs/llvm/flang-rt/SECURITY.md","size":205,"blob_sha":"f6a5e6c016291797ec05e53b4b6525cb0a0cdaf2","priority":1,"status":200,"text":"# Reporting LLVM Security Issues\n\nTo report security issues in LLVM, please follow the steps outlined on the\n[LLVM Security Group](https://llvm.org/docs/Security.html#how-to-report-a-security-issue)\npage.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C8A:149227:1808CF:5E3E1C:6AB92AA1"},"text_sha256":"bf1e70a2e52a213669958fa485fa69e13504fcdbfa0d3c1e34ec61dbcce9d1dd"},{"path":"contrib/libs/mimalloc/SECURITY.md","size":2656,"blob_sha":"b3c89efc852e22f71eabf5dfbc6ac62493425eb6","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"613E:1F1FB6:17CBE2:5E000A:6AB92AA1"},"text_sha256":"7b6976eec43edfa68b79a459dd089c56b7a395916dbf1a01bd11e6d86e12128f"},{"path":"contrib/libs/onnx/SECURITY.md","size":964,"blob_sha":"a18dca205b2451febcacaea66e085adf63f308cd","priority":1,"status":200,"text":"<!--\nCopyright (c) ONNX Project Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Security Policy\n\n## Reporting a Vulnerability\nIf you think you have found a security vulnerability, please send a report to onnx-security@lists.lfaidata.foundation. Please do not post security vulnerabilities on Slack.\n\nWe don't currently have a PGP key, unfortunately.\n\nAn ONNX committer will send you a response indicating the next steps in handling your report. After the initial reply to your report, the committer will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.\n\nImportant: Please don't disclose the vulnerability before it has been fixed and announced, to protect our users.\n\n## Security announcements\nPlease subscribe to the [announcements mailing list](https://lists.lfaidata.foundation/g/onnx-announce), where we post notifications and remediation details for security vulnerabilities.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3686:2B291E:183603:5E6B4C:6AB92AA1"},"text_sha256":"19eb88debb3991f342c1f6f2c95b59bfc5b2d22df3ac6b5d414c88091561678c"},{"path":"contrib/libs/protobuf_old/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1,"status":200,"text":"To report security concerns or vulnerabilities within protobuf, please use\nGoogle's official channel for reporting these.\n\nhttps://www.google.com/appserve/security-bugs/m2/new\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4BC0:2B291E:183609:5E6B57:6AB92AA2"},"text_sha256":"356a8323a8eeab694dc5ba6795512fc7181198deff3eb11c192a5fb2112196e3"},{"path":"contrib/libs/protobuf/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1,"status":200,"text":"To report security concerns or vulnerabilities within protobuf, please use\nGoogle's official channel for reporting these.\n\nhttps://www.google.com/appserve/security-bugs/m2/new\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4BC0:2B291E:183609:5E6B57:6AB92AA2"},"text_sha256":"356a8323a8eeab694dc5ba6795512fc7181198deff3eb11c192a5fb2112196e3"},{"path":"contrib/libs/pybind11/SECURITY.md","size":688,"blob_sha":"3d74611f2db85d7981287ad4314e2a868a1280d5","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nIf you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.\n\nPlease disclose it at [security advisory](https://github.com/pybind/pybind11/security/advisories/new).\n\nThis project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"479A:3FA0D:177BFA:5DB06F:6AB92AA2"},"text_sha256":"c215a0badf3e980239d2cdbfc152f9455b7bb224b1e5e8bf18d6059c04756ea2"},{"path":"contrib/libs/re2/SECURITY.md","size":293,"blob_sha":"39ba0e93f2df613b6aa3856ebd7f6bca6321d28c","priority":1,"status":200,"text":"To report a security issue, please use https://g.co/vulnz. We use\nhttps://g.co/vulnz for our intake, and do coordination and disclosure here on\nGitHub (including using GitHub Security Advisory). The Google Security Team will\nrespond within 5 working days of your report on https://g.co/vulnz.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17C593:5DFA4E:6AB92AA3"},"text_sha256":"043742fd59a78e338c7984033e4dee3e469af5c96faedfc7f05657e5010da585"},{"path":"contrib/libs/tbb/SECURITY.md","size":3162,"blob_sha":"c9be5beb7ff73957047b7bbccf81a91526b6e743","priority":1,"status":200,"text":"# Security Policy\nAs an open-source project, we understand the importance of and responsibility\nfor security. This Security Policy outlines our guidelines and procedures to\nensure the highest level of security and trust for oneTBB users. \n\n## Supported Versions\nSecurity vulnerabilities are fixed in the [latest version][1]\nand delivered as a patch release. We don't guarantee security fixes to be\nback-ported to older oneTBB versions.\n\n## Report a Vulnerability\nWe are very grateful to the security researchers and users that report back\nsecurity vulnerabilities. We investigate every report thoroughly.\nWe strongly encourage you to report security vulnerabilities to us privately,\nbefore disclosing them on public forums or opening a public GitHub* issue. \n\nReport a vulnerability to us in one of two ways:\n* Open a draft **[GitHub* Security Advisory][2]**\n* Send an e-mail to: **security@uxlfoundation.org**.\nAlong with the report, provide the following info:\n  * A descriptive title.\n  * Your name and affiliation (if any).\n  * A description of the technical details of the vulnerabilities.\n  * A minimal example of the vulnerability so we can reproduce your findings.\n  * An explanation of who can exploit this vulnerability, and what they gain\n  doing so. \n  * Whether this vulnerability is public or known to third parties. If it is,\n  provide details.\n\n### When Should I Report a Vulnerability?\n* You think you discovered a potential security vulnerability in oneTBB.\n* You are unsure how the potential vulnerability affects oneTBB.\n* You think you discovered a vulnerability in another project or 3rd party\ncomponent on which oneTBB depends. If the issue is not fixed in the 3rd party\ncomponent, try to report directly there first.\n\n### When Should I NOT Report a Vulnerability?\n* You got an automated scan hit and are unable to provide details.\n* You need help using oneTBB for security.\n* You need help applying security-related updates.\n* Your issue is not security-related.\n\n## Security Reports Review Process\nWe aim to respond quickly to your inquiry and coordinate a fix and\ndisclosure with you. All confirmed security vulnerabilities will be addressed\naccording to severity level and impact on oneTBB. Normally, security issues\nare fixed in the next planned release.\n\n## Disclosure Policy\nWe will publish security advisories using the \n[**GitHub Security Advisories feature**][3]\nto keep our community well-informed, and will credit you for your findings\nunless you prefer to stay anonymous. We request that you refrain from\nexploiting the vulnerability or making it public before the official disclosure.\n\nWe will disclose the vulnerabilities and bugs as soon as possible once\nmitigation is implemented and available. \n\n## Feedback on This Policy\nIf you have any suggestions on how this Policy could be improved, submit\nan issue or a pull request to this repository. **Do not** report\npotential vulnerabilities or security flaws via a pull request.\n\n[1]: https://github.com/uxlfoundation/oneTBB/releases/latest\n[2]: https://github.com/uxlfoundation/oneTBB/security/advisories/new\n[3]: https://github.com/uxlfoundation/oneTBB/security/advisories\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCF2:2E8679:17BE4E:5DF0DC:6AB92AA3"},"text_sha256":"caf01b551873f594f56da090113d45f10fcc898ba0c67b222cee271124d17be3"},{"path":"contrib/libs/xxhash/SECURITY.md","size":688,"blob_sha":"2a8b4c8e5a1387217873e1a9e1f84b0d5eb5387b","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nIf you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.\n\nPlease disclose it at [security advisory](https://github.com/Cyan4973/xxHash/security/advisories/new).\n\nThis project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:177F0C:5DB3D4:6AB92AA3"},"text_sha256":"9332581e7551a9a4a16c34eb877c1b1485aeaf9b93ec13b080f89ae843202572"},{"path":"contrib/libs/zeromq/SECURITY.md","size":18140,"blob_sha":"561a3956302a39381f8a439db766126188038031","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n4.x versions are supported with critical and security bug fixes.\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 4.3.x   | :white_check_mark: |\n| 4.2.x   | :white_check_mark: |\n| 4.1.x   | :white_check_mark: |\n| 4.0.x   | :white_check_mark: |\n| < 4.0   | :x:                |\n\n## Reporting a Vulnerability\n\nIf you believe a bug you found could have security implications,\nplease send a GPG encrypted email with the details to the maintainers:\n\n| Maintainer | Email address   | GPG fingerprint |\n| ---------- | --------------- | --------------- |\n| Doron Somech | somdoron@gmail.com | E0B0 E3D1 55DD 6ED6 71FB  2B79 D0B9 CC44 867D 8F3D |\n| Luca Boccassi | luca.boccassi@gmail.com | A9EA 9081 724F FAE0 484C 35A1 A81C EA22 BC8C 7E2E |\n\n## Internal severity classification\n\nWe will attempt to follow this general policy when assigning a severity to\nsecurity issues. These are guidelines more than rules, and as such end\nresults might vary.\n\n\n| Severity | Definition |\n| -------- | ---------- |\n| CRITICAL | endpoints using STRONG authentication are SILENTLY affected |\n| HIGH | endpoints using STRONG authentication are VISIBLY affected |\n| MODERATE | endpoints NOT using STRONG authentication are SILENTLY affected |\n| LOW | endpoints NOT using STRONG authentication are VISIBLY affected |\n\nSTRONG authentication means transports that use cryptography, for example CURVE\nand TLS.\n\nVISIBLY affected means that platform owners are likely to immediately notice\nmisbehaviours, like crashes or loss of connectivity for legitimate peers.\n\nSILENTLY affected means that without close inspection, platform owners are\nunlikely to notice misbehaviours, like remote code executions or data exfiltration.\n\n### Public keys\n<details>\n<summary>Doron Somech<\/summary>\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF0YXO8BEAD8Be6QQa+ALzIWszeDPtVK9DCGN7ZM1C4Ygq6w7llauhg4wreg\nkQy7YwOFKsFTi9cmIRfkw/lX9tIn+PkNe+kV7tOLDCdAmNCqdERvM/C46uPM/Mx4\nIdaoUXOPVIwbLcCLysiYxickq/M6ymPH7pAT5deCxH9B1DV38T2Mlq+uXXyZ1aFE\n74oCouQ7Vau31NBeOA4DkpPjpdA/WXMVEqoB3PKALUGYs1Ce5CguE0WjdueZFt2k\nDvdYtbUFb+vNLMPCejf1sBWDnUygPfsPPakyimfxBSIRsQLvw/5t6bkiWgtGU4LD\no37skSzum7h0rw1378ryoMUYdaNu/oNlWCwbQzBjD6G+WYbmu5AB5aGSaDjUzg9K\nAIcaNbRFln7OwvHrQdvDuWypZw7JvWYbehaywBagbjSTjIwb+Umki8cF/zxi5sxI\neFRMARDVQa5PAeErDd+4RtMcB55M2a90xWcTcfBdE/VYmwBXsMMWju4ceBtAqBCB\nDTVxxaT54tKjkOKa1Yk75zL4Xu7Sekg2BIaHh/qVMn5aTEX+X6ImeFhWRjhgsk+Q\nXoXo74nJq2aCJ2sSjLRdvnePtc3WM+WfdmdnC12JpBiBn4TFYxMBJlvqfKBxZELU\neZBkB6eTcBO/n5U3jSdFM47SeiBgUlPRiV+0ArZJ4i2Giv9vduWO6XeMVwARAQAB\ntCFEb3JvbiBTb21lY2ggPHNvbWRvcm9uQGdtYWlsLmNvbT6JAjgEEwECACIFAl0Y\nXO8CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJENC5zESGfY89i0wP/i5k\nsYQkdaPeos9JnfUd3cV588lQzBN2bVhzCtbrjR6wXn9hRhZP9ftCNKoVp8cpC07G\nVq87sKqeB7odaK67jS+XoF4msIUEYS0lN2lPORf523VK3Juy9FW39aEPfx+6P5+h\nh49VveR1t9I7MgdjnKVwmaELcFDKKGQaPlcWlKctSkOLRw/vYFIvajFJ30bkK9+z\nsjgtUvXbSgt4HHHOQ/M6oCNhDsY0YE1zNxDgc8EqRlRxf76+pwldMe47/sIP2U7m\nqI6d/LfsWnK6iJ0ehlp6oPP2GcUM8bH3lh2ugHH7sPSwpvh/rHqQTTxv+KiFeQOC\nyuxvWdjathnDDHRNPVahBR747iKlcebJeaK5X8wObcIDaGBecwnNIjws4hrYAFH0\neNiROIbDkxDjwFhBYLDMfVCPW3xpBDa67EBJ6qTrabxmXOGvUDR2kB0P5lmtU/jL\njdVeFLj9tgwuuL8PW5k/gCdeB4WSBF4VWAHBZ2vDXUPut78dHQQg+dgvHmbnRYZB\nEm6nrYUeoQ4nSOHf7VmdHf05HGwam+ZTWLN2sIEerNJlRCx6mEn20O2S7DE4RMi5\nVjBFHy8/YSR3hRtdOSYfE61AeProeDPTGiei6xxlN00MQ7K/kFhQHIjKz1Ao51LU\no6+KGTtka2+g368boLcQALIchlfp7cfUAEp+dB7UuQINBF0YXO8BEADBXhwad2VN\nXFhD69CPwWR39KmoW019EvT8tNWzCPzx8hQeTJz+fY0bTiXYxMROZwF0SD4kqYet\nnejfH+boUFV64coxmfCmriqOQ0SGZTCfWzrjDrWjj51Xe1NWsGnFNO6vCcL1NNPB\n0ZcE/wskEaKPi6Ui0SwvlDJQFK5UnrnFehmEIxEqi8BFez2Ft7/3I/XRrhlDzMtT\nhDgMb+Ro9BydddH3TRKAdJBzIsozCrv0nn1DIXM+Pocqiuvk72E6iUxS2meeA4F6\nDTG6MIWEcf6WPRVqXdD2bCBzDJ1NYixK9TFdZjo/6jTLwwX711+/NTIblAbpc/KE\nio+0cuRG99gP8Cr+1VVZ2fcK9FpjI/u4YERmj8arMkcFz+QQDaJnXIjmNDpD0zBQ\nDh2v6pKysoEgmOE2xDzBsJbZomluKOytLN9/KcqucB1qkjzHD5JeZe+/S1vxdZUn\n+81Us+SeepiDOfrT84xFYcqJentL+ylFj7zBdeqF4WTnZAT9/xbVuUSYnRm1Sm0z\nvr99Sum0MXUTzgNhY5x3PkFQyg91lllJUFGoXiLivG+3M8JFC7V2K7wXhHFqffVX\nQq6UOm6+kCTjUCgzpQswMpDremB7A2fBQObKOC/3pE0Gbh3uKvylqQkMPTn4lOao\nJ3VSd1hBqHAdb5uxnmxN8w3wIpnaSypBawARAQABiQIfBBgBAgAJBQJdGFzvAhsM\nAAoJENC5zESGfY895WkQAJYvJg/IYBKh0SblT8lGj9O+mLXO6K1q+HfZ6mERm9Ew\n+fgW/cwGzuUrn+DC6vfsXlqtshUwiaxaa6NJccPBfC5IGHAegK5giwnQ/sbrA70A\n7md2u+NK2tNDGK4Gxy8ZWMY1++TmwdVLzNivM5IA/NGotyYgQStDI+/Muvh+0wQ9\nxZjo/InxVXeQcnqQXVKhoouPo2GlXslHev04SRl/ZJYN5sEHCE0Qx6L++esVvrwE\n/N5NT5Rk41l4mXAN2SM0H5AB+Wf1qIiVB6pMLBzXM/7qnCnJS0FZZjf2WRiB0yXj\nxTl+/JUK9MYckkrNcAfnb6yvnvO5W3KDabZhl/Cqw08vVSvcqyYRFXIa4vduiGJP\nL6C8o3USbjVfZhBSHXpuo7JPzR0S4l52QB2ZnTCRIjSBe5vphVum6r3vR5rKAU1n\nHtytqm099TlDapj+4wixSv8TvwlJr9no0uEJloyRAMFMYms4KgLEEZfc2tqpe/sA\nnO6TM9h/hCbrImplSiesHqTxprnKAipudSYkc750zuFTiBQ5WwYbWjkCB2PSEh+l\n8ZCRM5Ropfk4ATMhXH/w2Dxa5mdaHuKWKUc14+YfSBJI8yohbVIzYVsvAclctCQY\nkAh/Z/Fl8W+ftDsZF0/1k3fxyKwExFej+AIsabcQDG0bAHscfH/44atKZRPn72FI\n=Qu19\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n<\/details>\n\n<details>\n<summary>Luca Boccassi<\/summary>\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFTKss4BEAC6LdgaSpaSBbMZK8erDulfXpCszvssCvEAI5lshfNNLHqOGy4r\ng+A3xyaGe+ITjoahT56Ly+dylduRvuZaJwbKWZqOKLnZHG0/Y/4K1MSk73TtcFbS\nVn0q1dZmr14ysTKB8E1UJ8XQZO+PO79VANjvj9oEqsYX4xJ5BenWdfqJOGa+8jn8\nou75vYcTFkIlvSnaHT4MkCqPGnuGgqiunEScjpBRFOX6ZIdRZvXcjP4HymdQAIMA\nBDDcV/qT+3VIOwKCn2e1jtxGbgMUwyosfz7nmlNHAdLrnficbSSsjRBIKxLgKN/N\n2fk/jk87mbs7Qz5L2bSxU68emGHZ1BEkBJ4vhiO6VBx8XHolK2RpI/3v0qzdGynZ\nYKTF2yBFqBlDI12gbfxabCQ7FgxwLBmYw/C068NVtXLM0AAMFrJmXRoexE698DJi\nwL/4qxWy2Py/wBHSFInmyUSSVi2CjRkLh2zA/EJ/268HooItcnL7kGnyWo9IJZEz\nMa7QO1FF/513xsW2QyPr/QNvuJ4GT/SyIgz+6Ln/z8wHCJQw8CM7vFRgOCuy2U3R\nsrO926muRbl97pqRmCXbb+OJQMcYaA841FPKHq52kUTeGqkiJW4RocckcEGqhxhh\nzj8KjIb2wBgkYviFQWKLIpZBVxKSAjVXTl/Bzk9m2ZPETjMZKtz09xtloQARAQAB\ntCBMdWNhIEJvY2Nhc3NpIDxibHVjYUBkZWJpYW4ub3JnPokCNwQTAQoAIQUCWab4\npwIbAwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCoHOoivIx+Lmx3D/0f5Nxi\nLYPDpxPOJDnEGUNqLiHlnyHwlHidV1xROfh8F6WkDrEAO5YfkASJjqBYJY93ZiZU\n/ROUdpcct9sN0K1Vw4yTAHFYpYO2G9oc3ax+3ly0rON4L7t1Xj9cvR1/b2fIIltE\nYied0XP3ukUfjECOkwQZJbmOHjsea61i5da/JEbDFkr32witorIMMIOAsZkZ+tcL\nxo2kRhk5PT7t6yo5cRLd0rLGKvKMBkMrNcPNk/T1V1YKB6yy0gAfo+dhZyI/khNC\nVuYZB59oYX5FS5FkGn/CCmuPN3YkGBqe0vZJjYLe8PK0vPS1obg9gRuYuJXdxIQn\nP8hD/y6Cu1axoy5EPt1uNc1bUSkvWUoJ2pWkeUAEKa/E8I0xKwQfHHo93rA1Xfdc\nc3rivihyj25/CkHo3zP6Xa0fqQLjpvusdf5nxuKL5cQYCAkNV9/sITTCxxYiKhp5\nlto9jhxs5j3/D4WV0+EGaQ/jfwg0i1h5eApzJQWMG+dEiT28s9+zPgFqfYq5oqVk\ncF+3tv39Mk/k06XqEwD+TmhV3Yv/wy1BDrGxvQgMP5GtIPS6p6+PBWFE+HUYYPdZ\n/vFN5DugzvVznjxLETUvj1G7mCQyHFXIkezF3mfr3uk0WiYWYoEqQ1Jdg8nsiTq3\niRTwW3XNsNhB28OoXH461215t/LakjGMVOmUSrQkTHVjYSBCb2NjYXNzaSA8bGJv\nY2Nhc3NAYnJvY2FkZS5jb20+iQIzBDABCgAdBQJZozczFh0gcHJldmlvdXMgam9i\nJ3MgZW1haWwACgkQqBzqIryMfi67IhAAq7Gj+p4Xt5Zc5OhMt7xaz6lGVdgXljGE\nmVmKgmyHWwMnNRpLrsXUWK8iZuvpg9Ges1o0Ckf7f+631XTOle0r3MwsVI+FgWVM\nBzAg7ft9GlIMqgY6suWlV7Rwar+rmzgf4A6tDjDWq4Lr2QTbhzjKoZeVL52Z2tpd\nnq0Iq1RKuXPQ8AEkPcfhYc3Z8ZL0MQ1cL98c42qVRYmoa1JmABen7rSUmIQL3t9v\naZXLqnTNOEtpbJ0QLuhasBTPwUW7FOwvSFr8PSoSKtOJ9VLEGDgJD6wewc/MYJsu\nfMECdfVYipOP/mlX1hrmxyucEm0a6CjFDvrP46sUJ4JoVcmr1Te898VQYKvBRFZK\n7UxJIbp6nZdyW6jI0HdstgUNyh0IzTgOUfgdkn5m8Xw3AaJdzGIy6cu4+g0Qmief\nrbZrReVcWYPswITpnDtEAmghq7C7QJ5OB7PA2G1xWqOeLMQnE2tTGpJfWkuv6FEI\nlG+5utAKSwDz9sZ93wbYGil5/rBSLOS2XoZfS67yROQH8+f1vc2tMpdfD6Z8rtkH\nHfotVwDkx3xIKWCENdmL0ewHbzjKXglSi1VkFGdrxoXyQvpSeAgO2GE0spM3lRIR\ncfNsXrzx4J21TUDrjK9mg/+KVEGA2I7E95d/ByyjDz4w0yx6xv4nyHtptgAc72aP\n41NMSpr0qje0J0x1Y2EgQm9jY2Fzc2kgPGx1Y2EuYm9jY2Fzc2lAZ21haWwuY29t\nPokCOgQTAQgAJAIbAwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAUCVMq0wgIZAQAK\nCRCoHOoivIx+LtL+D/4+JIaILWcbIymShr7cOhlWKu7/AqAHrT+y/0s99O3Tu6TD\n7bk5LUMUL5TBZtyVbUQh0KPjVYH+QZyDGICwn9snbkftIACvwD8LgtUv+5PbAQ1D\nof1ZtNjbl5S+VeKoD5Ev01t5QusRfThyiHzFSZOvePiLuRyRe1ixn1fzXl/NxuW2\nd7eJyxNRmyZ6N63SVDnBvOFwbNSJ4awXZa2S23edswfNcfEeYVVrEmEfBsi4U3ZY\nrjHWV+SvHoa63vEfyooynRofXgwPZLeOcsa6f2Q3jTI7WaCVnxL7K0GlxW3pd+MO\nE8HKFj/8MnK29ykQgvfOjvBtKIQmZoPHB1+FT6YIxr0fkLIK2FHGZ0azh0T7sWEh\n0WPQeieGFdDOq0z9Jf6fiWwIeetpwdeEoAzzXQZkHfRNpwzkXx7RlfITUqko3UiW\nl/w5S7t4x2HFyFHVb5osqF+NhCxGaqZGGkkegE/9RRcvFzN8pbUHNMxnwV/KQW8V\n1DZ9P7Kr+a/KV+dmEs/7vAj0vyFzCJbc8qecqOWVOLjY9tzOBjEWa1zvt6PVxZGJ\nI3i+lvdLcpvIWyAI68Gi7kOsTuu8A8iXDxEfzJ8kGlBnflq14sio3VKP6nVIPwbF\n5CwturkRM0vPkKSIliBCvS2MvnC3S+0AkKjhKRl9InBh0mCx1cRylJ8ZltHj9rQr\nTHVjYSBCb2NjYXNzaSA8bHVjYS5ib2NjYXNzaUBtaWNyb3NvZnQuY29tPokCTgQT\nAQoAOBYhBKnqkIFyT/rgSEw1oagc6iK8jH4uBQJccpvuAhsDBQsJCAcDBRUKCQgL\nBRYCAwEAAh4BAheAAAoJEKgc6iK8jH4uA7kP/RbwUH1C8RfWJWvtaDsvoJ5jnoB1\nlJDxUBEd+6j+AWTUD+fAAxLE/bcqxXzsPz4dscwpnoKmqVIpAdhTN+EvRZRLA1r/\nkbKlnDFnEm89MYYS1e8dGtXqa1zAPl+IxL46Da5/l8GsepOr9HftrPBjN56R/HIf\ntOwc9Vir1NLaC+S0CsAKwyAjpq8srjvrxFWr9a82+7GiBz2Wrc60vWIfaZuDKpVE\n4RpvEaiYoGEJEUp4wNhaVdQrhe8m6C0uczwq2t5aSjxuuso+rsN3PK/jvNrmxfbS\na0NMzwhZ92w+J7CFyg85c0OQ6hmZRTf6G2v8pFpWlbcb7sePlvYcEIeZik4Nx73T\nEkqwmX5WC0NPzj+wdBWG/G+fFIcUUaMZzcGjgy9MXD+RVVyGs6W2/Q7iPBzDxny6\nKJLjUK8xMGRLo3rvdAUqug3Gpe6dth/8XBp0cY1gk4n3OUluBWOXSEwW7zm3s77r\nK4s5JC/rBOgCeCNV+qXLydazn4qjQXixqb0ezyGGxO9w/+q9T7MBwQy5/Q25w4qL\nbcCxTLAhRpye2C1nCHt4GvH4SUjdh6wtHdkXjtyYMTRmMU40GN/PL5QFyyMS7nEC\nYiycLB99knGwsh1FX31Q4aU7qUWO6Ejhk9W43IZjQpaITXoyCwKnMaE+X6Uqk745\nio6PFV1+6ix1l8MhuQENBFieLi0BCAC8doYzfmC8HWjtP0Q0s6fpRwjwGTTOaxk8\nqOMW+vgVY5eAIWYOGX8kNdzUE1nnRgrGhqcOe+g0NvXNkE83KIeAZFL5k96/o+K9\nIJTSlrNzjWR3NsQPfjrQ4/pDcuwtxWBIaZNAF7GJNnjGeQ4dvVHwTzi1b3xrELxK\nYO3iiYkku5O2rrHxI2Pv8mBWZ/v6Zr81hutk6TtpsGGWRBEq2sAdS+qV+Bk+C8LJ\nsdOLeZLU9aVILtMPQkL0z3GTcb7IVknLPZ+aeraFRBLXO1k29J2JnTwECEkfOQep\nmBkGJ4FGHQ+eG7ejLd1i8BLFEeLk9ia2wLl6xiij1I2lplcuaLq7ABEBAAGJA1sE\nGAEKACYCGwIWIQSp6pCBck/64EhMNaGoHOoivIx+LgUCXFwb5AUJCWGINgEpwF0g\nBBkBCgAGBQJYni4tAAoJEEspZoBQeFFiy5EIAI2YXvth4tRojymdZ3oYiZRz3Xtx\nOJiiEsjZkP036k4pKdmtn1zxAPzd5W5kprk8AkWjjKyBSNS47i3lvjRFQXpKpUbG\nJ0CdjDCE2CaonMb1oh/pVbQ0VvMoPRyj1Jjz/gFCeXLFq8AcXrRYjh/aW6RNPj0Q\nnqL70ta6qFSavxrLPVkm02mFWEKlWNLtb7uzLM2KfCLI/ZZdsKSkTwZhWDQybp2o\nXO1fZdI7aSoLYQFY6pIjdIuTnQrqIrRKtk+ummBMMKBS18eyiJ1FR7cIp54Vektl\nVcaFOGI+MHDrDO4+hGfE+w59szW5ma60S92keJSWgOJQD4Nu/sPor9M+ZlcJEKgc\n6iK8jH4u21wP/RtYbohWfpBDSReU+ynG5QGLcELpSMHlCRz2ZxaV8bqGblGftjiW\neyvEZePOJpb5Sev20TnUBzzilZc1nLwOxP5tDZpEvo1j2bIY1YamZc7g7XE+xRbl\ndjiwGtj9PA3z2DME0iuxM/xN0Ghaea/vHeMim1miRJ8sbOheHwmwALPQzvTUV1Cq\nNgn8J1eUP/tC6wv/BnBwTkaHugqqmBglE9V8GptIVE5Tam/TfwVQXx72ZW2YHa4A\nbwHf+oUtH2/jOTjOj/kWT7docgSDj7kColJ7mwuZZ0NSwYhA5dKN1CWX7c65ENzN\nh4pIiM9Ula0tInRal2qK9YXy/GV0gFXwV/aFh22G/xtPRs0qqhBxr2lxGOg5XsAk\nSEu+nlCThjEZDQVXxmptdVVvHwh/+Lrconk3o/sUTFgZ9mroQYceJa1z9cIn1A1Z\nPb2SffXWU18lOuuC2Cw7XGx8QN1rWbmVVA0mvNQ6MpUYCOICy7bVIfUYcX6xuoWh\nTfu5lE0qUw8PhBGUaW+pqGvEDcM/PWhopx+mSqq/Ip4LfZ0Cn33KLV4SzJjnhC1Q\nRVQoUYpzBDREgOUo6eqwNSCM1ZxkOIoueOZ6TRoYrUaJUGAJOZvXVl6NfpizQ1bp\nTu1l6dz7U3JqYG/V/kr+IKxWJf/JhYjZ73Da9mx+2SuNOKj1SFohLNL3uQENBFie\nLj4BCADUpbwnWqJsjL6la8HdROHY/LePMvWiCJAK1tZX6HadW07FxCMlQPOhX6jj\nYI85BmYM1AZpEDRLqdkAUf6+lSY9VywXy6G8DsQTSiO+Fn6DWEJ9yYelLIQW0xMJ\ncWd55D9+tDlJFFfiE2OLjrSoxPRGjhB7iajsdNlD6JTjuJq60zAcxF7J2o6Keesw\nHVYooz460MLuVq3BeyNxH/d9B/y5n3ibSVgJc8PYkDRN2Y+ILuAXd/ia0GTphTM5\nj9R+mCJDuRRVZAgNfa9AJMPJ0QbIFnRdnwRTEGt6LYA/AIoBgwjiveTfr8N2LArD\nARNP6rV+Ugf3rW2bZPEoCv82bsx3ABEBAAGJAjwEGAEKACYCGwwWIQSp6pCBck/6\n4EhMNaGoHOoivIx+LgUCXFwb5AUJCWGIJQAKCRCoHOoivIx+LoL6EACYK7c/yOQH\nZtSfzkrfNpd/MiY1j6rpUr0mrbKBVKamJ1N5Ae48E2ETlRfM3B6fk+dqovKbD0gQ\noDHcCo201770pyoFwxyHZleiSWfQjNp4JCoXvGAh+AK6xfiPZIEzfLDrm3nrd38m\nrLEsUPRPdoyemAb2kKBoMmfkPt0e6WnqKxlFBngyF35jOFXnp//yGNCWvr4gibXD\nzIlMnQUXlYzKqZPnIwdEGyQT4KWLAHLCu5lzk6JmvMJPqTPU/uKbgKcHHy8cY0Xm\nxPOAPbnSbSYsuMcJpZMiIKBRozZk26fWdDJorWBPZ91OEmfSCx2X1P99UQId67SJ\n9V4EUbZjGDrsEJcosmg1JN2bFIKzI6VTrYvxA2ghPuowXgKZ3k/BuFXMA41hnP/P\npn8DjsYu/9yzV5TRYvQEVSGrN7c3tJGlyZrbZ3YxyDyniWZhrFmgVqdo3jZfhhgT\nxTnuSfUyhtA6jk5ECVuF+oxmWyjRzJW2XoPPpmYe9CQ2efHZ4RFqCO50keBAH0KH\nUCl3eg2E4HeALu++Aq9v07JyAyA6MYbTvHjrdMmHHDb3kHG3O/rPoH2120wYXHAW\nSBvoOOJZyT/4rF3BNcrLiPxDCi+mOe5vkX5jymHe4fho1kvh0mLLzeC9fKiJjExL\nyF2yrNrTFESt66057r3CIb8BcJXPGhxpXrkBDQRYni5MAQgAnBzmeIfxaXebmSJj\nwbH1ScEHIATXoDs1FtVumWTmfGS851lqoMBoemWPZleBoMTOza5cnv6EzPIGYRYL\nSd+GTDOAzNdnuHxULm8gUqEdoQ8+GwcTXCSjOsvuZJvIWjJ3Siz3JRnTsM8hrYoz\ntZZhDQqsmqmCyrmw5IsxInDfTd6XrdJ834TOS87pJTwFzrt3B4UuhMMGX8IWjPsG\nZ0ZRBbUMhAxt07+JV2lW9o7AA0H733NHjhZ4/mjn62WpDVFzHIkvdVaNbb5hGXrJ\nHbRIqQUj4tX32uYEkpd0Uy7KEtqh/HI+tW1nL47Ba6EEY+3IvFO+XJiy5Zhoe0ku\nNiLebwARAQABiQI8BBgBCgAmAhsgFiEEqeqQgXJP+uBITDWhqBzqIryMfi4FAlxc\nG+QFCQlhiBcACgkQqBzqIryMfi5icA//f5d9VR2F/p/iBRbKudu5HHp3YxAxKLe/\nT5FobOd9LBM4z8G9x6puaVP5bFjN5IMB67piUTVgSTDFwvS5sj538xRddTLg6gdo\ncE8qU6gb0Caj3eDm6aaPH6sz8Dkq0lV0AibiFZAlysgH3Jb0mavTLbES92LVTC+y\njgm6rKxazD7Xf7eKKAtU6Yv5hy8/RtkxqXUjiW5JuvM6GHrplFaoqLQqTTs84jmU\nJdAn5ocTHSZkWnrXD2ymNcSQ1Rb34JYOzhEZmqk7qID0HvTT2g7D52gP2Jw4AzNM\nkmf/tbB/ugWIBsEClwVkk6yUxjSTjjOq5p3Jg/9vqiEEml7xnSNwqY5w/FCIdwV/\nbcrDAvRYAY2whDUtjIBJrD5AzRq3A4FU9ErdkKNGToL1sAUZdyH+qsCuJl0eY/Ry\nlMdgYrKc4HWNOh+viG7ap/RxUULll3wXuwtcDapRe/lg4YABmORzgDPgXcGPODhS\nWdKeQid9kKucWUrjOXogxa28hO9P/6OhngUor9FECHqxa3dTEm9GAxRKJhJhWm8m\nwu2rTGBSOEDk918ffR+HyPJ5CoEUCj03vY1OJwcwhtCaKb83swuiXwDeZ7eXVRL7\n2nRMieLWYxNV8seKDFCm/7fXbNWpYe6HRtZfGiPVICJZbVHS73n4Kglxg03LKSXT\nZEG+OhK+ULy5Ag0EVMqyzgEQAN1wRSjfQMyZRcelT38yhZUiSti6KqljizjkWzVY\nkhFab3IXeW4m5uUv/N8J23h2tUhc4R3di1W5L3dvOMzY9cHeR4KucU3QA7TC/cUS\nQo+tdxj0HgXLMoTHUUeo2w7mX0NTeH7Evq3zEwWOJksAXgb4+8V5t/afBl1IC0gf\nNol/1iHkX6/49kSJ+0HoYEj7cPF8Il7IN55Xe/ZmsuucgjM6Wt3/ndJKmHyssDxA\npUnlK5Uj++039Q7SNRDtLoc8Y1LoL544bSADOMrRAXEKj4ACYNUs8I1pf80w8CTn\nHg7SEILesOqBMfYotz2pQ2x0KqfCOfetSe9YcZIu/Qdjx8qBm3a69Y6wSn40uIws\nW8lfEL+V2ltRsyCtmA1hNmreNc4tXtlXtWF6aZxT2wm97Gn8YjiQTEe7sfvNNcTH\nwP29KUofmIFtXCX2eMeqRWBhtqFE5uaDdI5UQyfjY9Au+Mc/d2WHMS1PGK/Z8NKy\n7huM24/yK7GxFbbPm3pZiWlV5kbl5f4bEPrBoqzdzoK0/N12UsfuWFV5m2YUIwW4\nBXaI26dzUM9Fc9ecbcoJXd7FzgmdKUi0/Gw7NYrbsL09zrAB+AQer602LHW1Aiqr\n93QkkB2ViWupYiGli2sC54qrAR4iEUATAk2AJIyXnjaI3DftExz/c4y8NuMwFXKc\nLxWHABEBAAGJAjwEGAEKACYCGwwWIQSp6pCBck/64EhMNaGoHOoivIx+LgUCXFwb\n4wUJDTUDlQAKCRCoHOoivIx+Lgf8D/0ZoaK2TUxsdcINtHxeKP8zIjnk1HJQxVDs\nLewL90rP/sqHplYdDItBHW3aQT+S82xmb2DaWcy1DJ+kDAPqKIEgYcIVCho+8dD/\nXwY3/vQQnRYt3thxj/REtLid97ldtWn0pw4f4sxwMbs0qXq/R9fnnoNXBBH6ctxA\n6dy4/QkBMY4LyaTnSYzvaB6JSwIC95MGl2/yn1WFCzdRPjxU1SLsSImCkBaG1uhK\nrX/rECSuQCktfG0hy+F2QqMxHofPonBUZTrfLchWHgqIzCx2JXXC0KsXjg7r+s4+\nm2krnB4jKOnyAaNmwhnOY+qqVcy/IvJsvOeOP1J6j2e7oTNtcrHb/tHxOhUVKiOo\nvzSoLB47PtnTv6cVtiBIOFKyfl1dS8Q+vPtRqvjWAW7vcAfygxXwvJUslGUMU46J\nvJwcFFE4RQk4Ixm69AabTCCwLUWV0Pnx3rTNJHMxl+qzpvVwVuogVydxH2oqvBTt\nBpCsfgrhH5gcYRozCBvLGDetFa9YaAV4ZvwGq3lhkFnI/h3EpIDGCeDTsJP4+C+n\nmI2wM/rXt3m1CpgeVKH87E2+vSOoliyqW/DnceBE8JHEwg3nWX50GI+iW0Vm8t2Z\n1Dx2TJsrJdXy2vHYZDFOCfnz4SO6IafJZOGMVHPGNHp2AWH5mY9ZYE2N52QMoyjk\n42IBCOLqCrkCDQRVFuFCARAA+tTCfBs+pRBg7lPr6DtI3SY4M+T5Ip2EQGuWS7t7\nriNP0rbtShc3x1GBokVNEOTOe6n28DTI0TA8D7Wa6WefKnBbDQPVe7AgWCC11gYX\nXIqcRIPlnvW7X8hZn6Fw/b+ep9Fnw6piihRk5fnYyspDBTRE/1DBBzHqOPfepHgI\nzh7qVe8MCfTdpRYsHXZEa9o0WYLoRXeg+yFvKmjj8+Bm4OyLQ5vN7uDqDT3ph8av\nM7RQvvqLZrXhycWuq4btT6Ba9oMZ10UzUF/HXaLgakscDX6FzBwgv2/lVauh3ie4\nJ+Au0lA4hYHCVhNZGgLsGG6aoMEDA2Ab6vLqVIeOj7dbOXLq5wLMJlywAZwtnoSn\nzxyPPKQarCl30lYDaXFakFGZpI10nRrRSy2acRcpuS5662cnU8kZzVl9mbxyrEpI\nzkc54ND+UzHvW6FVKqJLB/y2rQ6ZRE6cLahwO74LZoDc48JpVkdXCkz+F2yI4ust\nWcv0vdUQ+mLHbjUof6zGLcTVRMpteFpIozB6giF1ohayoNAgwywk69tMThNa5O4J\n405dDPDO4lNyl7nGLlxyL0oua16ibpz2WfYUsPsJmRJnB+8KZ5SzIGW7D/aprhYp\norYdpz6qynPtDmkD7zl5RHQCb8PqgrkkHPVVrdjHC7UdP/CcXjq1KIuKEG446xJI\nTXcAEQEAAYkCPAQYAQoAJgIbIBYhBKnqkIFyT/rgSEw1oagc6iK8jH4uBQJcXBvk\nBQkM6NUhAAoJEKgc6iK8jH4uEfoQALPHThbHLBEZ1ueHAnyamgz3kKC7KW4HkwgG\npTvJ/r3cqdt8SBcdPamWORK95HKq1VahEW6yqWSVrsbYxqdXl/mI2mNIJxRBiM/h\nwOuZVLSNpK4Ou/XRz3NMFllZBJtJS6JGGpRtnhGQKrvkw04UtITpDahDlweVdart\nE0FaB89TagWZy7oH32M5wzHqUHSNnOfQR5VpttRBVkuqnN4xRePjJvjJae31LsAq\njOrJcME08Y8zG10p3Pm6x0lOvrM9nf/MMYGEaMhGQFp4XhvQ6hi736nFyyQD6uHU\nvw140+Y51kHMbceKjaoju9qHNzddmhFAL+YMZL0dtNk9F4kDpTCfMNgft4Y0IUQT\nlYAkMDxdYK1l+jYTFrsDZhw5GV1kYQo2s3j66rT+SHlXY8SbyE33Hm544WxAbCGE\ndB/H7ADaQhbFobXalTb+/QfWE2FkAYTvgiRhEhfhdr0ed2zHoolIF+zDWu58D61T\nQj0xx1/+PbaVq4NQAWigimRfhYEJjo0dJCYUFOI9mces4Fh0aUGpB0lyvBub6zWc\nQkHM/2NSsGLWIxCOjxR1qjMdM3cfTQe6BX1ZoE4hjQf1tolhDT3rUx032x4QH1wt\n5CdP4/Wz2Mn8oGCPvRwCNzYLjT/h2V3BFqIcbwNpfiLFMGtEYf0VD6Po5y2uxHNB\nV4vxw1Q7uQINBFUXAM0BEADWd0Gq5bkX2WVMfwI8EQTnuJBRgJLmaLb8INg/Iykr\nztnx0t/D5bxZ7SMmycRpvKEEwST2NMzutPt4bxrbNx5FAAslzy93bd1mHH0r2xQh\nM/NKSNHsYOtpoeyf7vcRPaBkCqu6UzeWCrYcFzbrEDmMqKoeAekSWFyij/1Sm0hP\nYWK9qHYG7dhqS+t5rq0IGuX2LhcSbDubHysCZLvJxWzZspudrFgGkCX68oS94uy3\nERgrUUt9QFweWueC6XJxj+FIlK/1j3ZgKUnJZ13iRXrz2vOr84C82MLpAw/HPmcU\n73qZM5V0+RFCKRP4ISKeGhrLFSMVOLVkyNHYYBq+0os21VIGBA/L2kWv1Gy/MnPD\nyI4p05zzwXUu6f3iAwPqwwRqA+/gj2J5YooZa1mPGUutkz3KmKWymTBlbdr1MR/l\ndnuUAwdgXdOEj/YPskb8VsVzyEjyNpaPTQW1KmsWDJPztuQ/6cAPXCeaECL/110M\nTFY1esS4SM7zd75Rgg1w68hFm0D1TotmuPVW59DN2TzjVUCamOVgMSEfUBERGo00\nPHuGYqDlVt+gLeyOM/WOLJizTEAJEUVpR9tRspFHf9nXIOJdSaoL4opXtLog5nVB\n2sqT9qt9qPtBPbQiHJXimv5rBpjaPeBZA+RxolTMpPkFsSXVkNcvhx3P/uKvD9um\n0QARAQABiQRbBBgBCgAmAhsCFiEEqeqQgXJP+uBITDWhqBzqIryMfi4FAlxcG+QF\nCQzotZYCKcFdIAQZAQgABgUCVRcAzQAKCRAoa/fvzXckHteED/9mP07v96WdQwx/\noNJ2gCAmee43Xll5kLVa4TCuYLI+iPtLt1gKrtViw+M+oYhst5KT2jlfaj6T0GpD\nbbpqBGCzJ2Eas0dsnJRtN6zuvXX+tYWe28/PCEuB9QSOHqkVPG84aabqAsletGhW\nTKHWTQf7Aa1xlXgdBJ8NkZBUkwWQ5MGkKS0BP7xvaK6z5nOZSPskpodhKl51d4IR\ngWwK+j0tKdgsDqSjeSOfw2eM7/z4kSzDTsdxoBWvskaSQtMnw9qibfUrI5zgi/Yc\nkh2ModEoxdIAQWEtKR0dEHwVhOId76lq19sS6I4MKTfHZ7xGnXTozbeqjcTX0edA\n031aFC4XGpDTDlyA/XXABu97582NOvXLkPMcj/N8/P0MWJgtwJHMNwDqBHCsZmSy\nK7ZKHLC71yh5mUCSnLiu0cz/7rLB+VHI+SwPXBO8iPCZAupmf+cyICkINFCwgFyu\nLKYYARhSr6LqbOzo/ekQvz8b9q73ODqvhEN0T945AJdAt2BPtzb0LYOBaAxdEZsu\n2BcnWE+xERVK7mSeGHmfnh6smEZSx6uRawMYm6Y/YLtzQp6iBTqtNwYryl+PbRJ1\nv28e5ispmylCrRyb0CSgNqKbQufhKO71+peBBytb0Nj9VUYXGYe7vHCeZxgvTUnP\nbHoVjUXZSu+Tiu1Gky1EOFtEW/Se8QkQqBzqIryMfi7vyQ//Ttd4ZNBdaZkMYQh+\nCP3WsuXD4Vip8Gh+tcg/+zJMDWqkgoW9OOkWh1MjxJBSBjSLqm8e23GrgJrHdRBm\nfR6WbMCXST5ZmRzEN2MZ9DPFGKuzOe1BeWx3hFc6crCB7h5/I3yiiMhagF/kCiZz\nzQu4Ebcc8gzRH65BbBHbathVWF4EmP4ZUy2hPOspwMClCmGsqVY1zt4KPp1BeB/Y\ngZ5eL1kdLuvCRQkFglPNELDgziKREJYO89g8f6V6teJDy+l6DtuzwnkO3BT1PntQ\n17I8etv3lgGfL42q1QUjhXn0ER6cfWOEeD36MThkZ6WTdtZ+45ROZsvCSl9BlE05\nhT13mBluscvxu0bo1ReAFYG2aHG05mZ/2qyoVY1eJa+Eq/rDhdJP5E8IhDfr/kCm\nAhcpb/916Jc0BTSpinIcuWMQaeWtpwz332Pa87M3SLLm0p390p9R7P+OI2FYVMYU\n/6dEqz9vrsTWaBLZV8bnItjn6r2MOXn7bGD6HW6euE78Bt+/Q9N/D53cgw3HGaDE\n0JqFt4gzT9d7D+jCYy3K5uAWBnKjua3mwMcBnO4GmQwVLauWex8BARlYpBoqqL/V\n5CorLVbhjFLWAiy1GsX4RM9RksG9TN8CMvNp1ZTpnqouwEuTmrWKwdQek1rPBRj0\nXNBso9Rw94Z5NVIXEcH3O44UsWI=\n=AXgM\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n<\/details>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EE4:241B62:1795C1:5DCB1A:6AB92AA3"},"text_sha256":"82bd4f73578c0f2380be8bff6b3f86948418d504ec82bab193dc2f7fc4616386"},{"path":"contrib/libs/zstd/SECURITY.md","size":952,"blob_sha":"a5f9a7e1fdbd0a37a838a7b17f90a39fca75ef17","priority":1,"status":200,"text":"# Reporting and Fixing Security Issues\n\nPlease do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors. Security issues in this open source project can be safely reported via the Meta Bug Bounty program:\n\nhttps://www.facebook.com/whitehat\n\nMeta's security team will triage your report and determine whether or not is it eligible for a bounty under our program.\n\n# Receiving Vulnerability Notifications\n\nIn the case that a significant security vulnerability is reported to us or discovered by us---without being publicly known---we will, at our discretion, notify high-profile, high-exposure users of Zstandard ahead of our public disclosure of the issue and associated fix.\n\nIf you believe your project would benefit from inclusion in this list, please reach out to one of the maintainers.\n\n<!-- Note to maintainers: this list is kept [here](https://fburl.com/wiki/cgc1l62x). -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D020:2E8679:17BE56:5DF0F2:6AB92AA2"},"text_sha256":"b05f2cd49c82ae1339cfa26c625770472bd5b204b37518c17aea5c1bd8107d58"},{"path":"contrib/restricted/google/utf8_range/SECURITY.md","size":159,"blob_sha":"2969e7065108bbcc3c5b346797e1baaa01b2f4b8","priority":1,"status":200,"text":"To report security concerns or vulnerabilities within protobuf, please use\nGoogle's official channel for reporting these.\n\nhttps://bughunters.google.com/report","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"316C:11E74B:1799E9:5DCDB7:6AB92AA3"},"text_sha256":"6eefe2a6fbf4e9f404726d9b0b5eee43a4cd265643ee5844d9db13346820fb5f"},{"path":"SECURITY.md","size":1400,"blob_sha":"f81d2b9adc36560a284d9de3f94edab939aef17a","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nWe welcome security researchers and users who report vulnerabilities they discovered in CatBoost. All reports are thoroughly investigated.\n\nTo report a potential vulnerability in CatBoost please use the special `Report a vulnerability` button on https://github.com/catboost/catboost/security page or contact administators of [the CatBoost Telegram chat](https://t.me/catboost_en) privately.\n\n### When Should I Report a Vulnerability?\n\n- You think you discovered a potential security vulnerability in CatBoost\n- You are unsure how a vulnerability affects CatBoost\n\n## Security Vulnerability Response\n\nEach report is acknowledged and analyzed by CatBoost maintainers within 5 working days.\nWe will keep the reporter informed about the issue progress.\n\n## Public Disclosure Timing\n\nA public disclosure date is negotiated by CatBoost maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a mitigation is available for CatBoost users. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22A:7A4F8:1826EA:5E5C5C:6AB92AA2"},"text_sha256":"f0716e31996c9dc3efa81bb1092e4f9833c046239820b03f205197faaf65efbd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"clips/pattern","input_row":{"repository":"clips/pattern","url":"https://github.com/clips/pattern","name":"pattern","owner":"clips","description":"Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":8859,"issues":209,"created_at":"2011-05-03T15:29:01Z","updated_at":"2026-09-24T22:44:13Z","first_commit_at":"2011-02-24T16:47:28Z","last_commit_at":"2026-08-05T13:05:21Z","activity_months":185.31,"ai_ml_match_topics":"machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:33.689Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"clips/pattern","visibility":"public","created_at":"2011-05-03T15:29:01Z","updated_at":"2026-09-24T22:44:13Z","private":false,"fork":false,"archived":false,"stargazers_count":8859,"open_issues_count":179,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2568","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:1804E7B:1C28299:6AB92AA5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2567","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0877:6E4BB:17F94D0:1C1BE88:6AB92AA6"},"commit":{"sha":"ac0011bc921e8d868c11f85851a03a03ef1cab3c","url":"https://github.com/clips/pattern/commit/ac0011bc921e8d868c11f85851a03a03ef1cab3c","date":"2017-08-25T14:36:42Z","author_date":"2017-08-25T14:30:01Z","committer_date":"2017-08-25T14:36:42Z","tree_sha":"b43ac0e3cbff33981358dc19936864abaa63ade1","message_first_line":"Update README.md: from development branch plus Python 3 note"},"tree_request_status":200,"tree_rate":{"github_remaining":"2566","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0882:156040:17CDDC4:1BF0496:6AB92AA6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5765,"blob_sha":"5e8b20ab74ea0b231d17d70d313fa0eafbe02bee","priority":0},{"path":"README.txt","size":5140,"blob_sha":"3b676392ea1b1dd9315ed4650efce1104f02d185","priority":0}],"documents":[{"path":"README.md","size":5765,"blob_sha":"5e8b20ab74ea0b231d17d70d313fa0eafbe02bee","priority":0,"status":200,"text":"Pattern\n=======\n\n[![Build Status](http://img.shields.io/travis/clips/pattern/master.svg?style=flat)](https://travis-ci.org/clips/pattern/branches)\n[![Coverage](https://img.shields.io/coveralls/clips/pattern/master.svg?style=flat)](https://coveralls.io/github/clips/pattern?branch=master)\n[![PyPi version](http://img.shields.io/pypi/v/pattern.svg?style=flat)](https://pypi.python.org/pypi/pattern)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg?style=flat)](https://github.com/clips/pattern/blob/master/LICENSE.txt)\n\nPattern is a web mining module for Python. It has tools for:\n\n * Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM parser\n * Natural Language Processing: part-of-speech taggers, n-gram search, sentiment analysis, WordNet\n * Machine Learning: vector space model, clustering, classification (KNN, SVM, Perceptron)\n * Network Analysis: graph centrality and visualization.\n\nIt is well documented, thoroughly tested with 350+ unit tests and comes bundled with 50+ examples. The source code is licensed under BSD and available from <http://www.clips.ua.ac.be/pages/pattern>.\n\n![Example workflow](https://raw.githubusercontent.com/clips/pattern/master/docs/g/pattern_schema.gif)\n\nExample\n-------\n\nThis example trains a classifier on adjectives mined from Twitter using Python 3. First, tweets that contain hashtag #win or #fail are collected. For example: *\"$20 tip off a sweet little old lady today #win\"*. The word part-of-speech tags are then parsed, keeping only adjectives. Each tweet is transformed to a vector, a dictionary of adjective → count items, labeled `WIN` or `FAIL`. The classifier uses the vectors to learn which other tweets look more like `WIN` or more like `FAIL`.\n\n```python\nfrom pattern.web import Twitter\nfrom pattern.en import tag\nfrom pattern.vector import KNN, count\n\ntwitter, knn = Twitter(), KNN()\n\nfor i in range(1, 3):\n    for tweet in twitter.search('#win OR #fail', start=i, count=100):\n        s = tweet.text.lower()\n        p = '#win' in s and 'WIN' or 'FAIL'\n        v = tag(s)\n        v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective\n        v = count(v) # {'sweet': 1}\n        if v:\n            knn.train(v, type=p)\n\nprint(knn.classify('sweet potato burger'))\nprint(knn.classify('stupid autocorrect'))\n```\n\nInstallation\n------------\n\nPattern supports Python 2.7 and Python 3.6+. The Python 3 version is currently **only** available on the `development` branch. To install Pattern so that it is available in all your scripts, unzip the download and from the command line do:\n```bash\ncd pattern-2.6\npython setup.py install\n```\n\nIf you have pip, you can automatically download and install from the [PyPI repository](https://pypi.python.org/pypi/Pattern):\n```bash\npip install pattern\n```\n\nIf none of the above works, you can make Python aware of the module in three ways:\n- Put the pattern folder in the same folder as your script.\n- Put the pattern folder in the standard location for modules so it is available to all scripts:\n  * `c:\\python26\\Lib\\site-packages\\` (Windows),\n  * `/Library/Python/2.6/site-packages/` (Mac OS X),\n  * `/usr/lib/python2.6/site-packages/` (Unix).\n- Add the location of the module to `sys.path` in your script, before importing it:\n\n```python\nMODULE = '/users/tom/desktop/pattern'\nimport sys; if MODULE not in sys.path: sys.path.append(MODULE)\nfrom pattern.en import parsetree\n```\n\nDocumentation\n-------------\n\nFor documentation and examples see the [user documentation](http://www.clips.ua.ac.be/pages/pattern). If you are a developer, go check out the [developer documentation](http://www.clips.ua.ac.be/pages/pattern-dev).\n\nVersion\n-------\n\n2.6\n\nLicense\n-------\n\n**BSD**, see `LICENSE.txt` for further details.\n\nReference\n---------\n\nDe Smedt, T., Daelemans, W. (2012). Pattern for Python. *Journal of Machine Learning Research, 13*, 2031–2035.\n\nContribute\n----------\n\nThe source code is hosted on GitHub and contributions or donations are welcomed. Please have look at the [developer documentation](http://www.clips.ua.ac.be/pages/pattern-dev). If you use Pattern in your work, please cite our reference paper.\n\nBundled dependencies\n--------------------\n\nPattern is bundled with the following data sets, algorithms and Python packages:\n\n- **Brill tagger**, Eric Brill\n- **Brill tagger for Dutch**, Jeroen Geertzen\n- **Brill tagger for German**, Gerold Schneider & Martin Volk\n- **Brill tagger for Spanish**, trained on Wikicorpus (Samuel Reese & Gemma Boleda et al.)\n- **Brill tagger for French**, trained on Lefff (Benoît Sagot & Lionel Clément et al.)\n- **Brill tagger for Italian**, mined from Wiktionary\n- **English pluralization**, Damian Conway\n- **Spanish verb inflection**, Fred Jehle\n- **French verb inflection**, Bob Salita\n- **Graph JavaScript framework**, Aslak Hellesoy & Dave Hoover\n- **LIBSVM**, Chih-Chung Chang & Chih-Jen Lin\n- **LIBLINEAR**, Rong-En Fan et al.\n- **NetworkX centrality**, Aric Hagberg, Dan Schult & Pieter Swart\n- **spelling corrector**, Peter Norvig\n\nAcknowledgements\n----------------\n\n**Authors:**\n\n- Tom De Smedt (tom@organisms.be)\n- Walter Daelemans (walter.daelemans@ua.ac.be)\n\n**Contributors (chronological):**\n\n- Frederik De Bleser\n- Jason Wiener\n- Daniel Friesen\n- Jeroen Geertzen\n- Thomas Crombez\n- Ken Williams\n- Peteris Erins\n- Rajesh Nair\n- F. De Smedt\n- Radim Řehůřek\n- Tom Loredo\n- John DeBovis\n- Thomas Sileo\n- Gerold Schneider\n- Martin Volk\n- Samuel Joseph\n- Shubhanshu Mishra\n- Robert Elwell\n- Fred Jehle\n- Antoine Mazières + fabelier.org\n- Rémi de Zoeten + closealert.nl\n- Kenneth Koch\n- Jens Grivolla\n- Fabio Marfia\n- Steven Loria\n- Colin Molter + tevizz.com\n- Peter Bull\n- Maurizio Sambati\n- Dan Fu\n- Salvatore Di Dio\n- Vincent Van Asch\n- Frederik Elwert\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A7C0:7A4F8:1826FE:5E5CA8:6AB92AA5"},"text_sha256":"4f2a7f5e2999712faf1ba2298e8db07dd273b9e9535e2dc8a8c746990eff8463"},{"path":"README.txt","size":5140,"blob_sha":"3b676392ea1b1dd9315ed4650efce1104f02d185","priority":0,"status":200,"text":"PATTERN\n=======\n\nPattern is a web mining module for Python. It has tools for data mining (web services for Google, Twitter and Wikipedia, web crawler, HTML DOM parser), natural language processing (part-of-speech taggers, n-gram search, sentiment analysis, WordNet), machine learning (vector space model, clustering, classification using KNN, SVM, Perceptron) and network analysis (graph centrality and visualization). It is well documented and bundled with 50+ examples and 350+ unit tests. The source code is licensed under BSD and available from http://www.clips.ua.ac.be/pages/pattern. \n\nVERSION\n=======\n\n2.6\n\nLICENSE\n=======\n\nBSD, see LICENSE.txt for further details.\n\nINSTALLATION\n============\n\nPattern is written for Python 2.5+ (no support for Python 3 yet). The module has no external dependencies except when using LSA in the pattern.vector module, which requires NumPy (installed by default on Mac OS X). To install Pattern so that it is available in all your scripts, unzip the download and from the command line do:\n> cd pattern-2.6\n> python setup.py install\n\nIf you have pip, you can automatically download and install from the PyPi repository:\n> pip install pattern\n\nIf none of the above works, you can make Python aware of the module in three ways:\n- Put the pattern folder in the same folder as your script.\n- Put the pattern folder in the standard location for modules so it is available to all scripts:\n  c:\\python26\\Lib\\site-packages\\ (Windows),\n  /Library/Python/2.6/site-packages/ (Mac OS X),   \n  /usr/lib/python2.6/site-packages/ (Unix).\n- Add the location of the module to sys.path in your script, before importing it:\n  >>> MODULE = '/users/tom/desktop/pattern'\n  >>> import sys; if MODULE not in sys.path: sys.path.append(MODULE)\n  >>> from pattern.en import parsetree\n\nExample\n=======\n\nThis example trains a classifier on adjectives mined from Twitter. First, tweets that contain hashtag #win or #fail are collected. For example: \"$20 tip off a sweet little old lady today #win\". The word part-of-speech tags are then parsed, keeping only adjectives. Each tweet is transformed to a vector, a dictionary of adjective → count items, labeled WIN or FAIL. The classifier uses the vectors to learn which other tweets look more like  WIN or more like FAIL.\n\n>>> from pattern.web    import Twitter\n>>> from pattern.en     import tag\n>>> from pattern.vector import KNN, count\n>>> \n>>> twitter, knn = Twitter(), KNN()\n>>> \n>>> for i in range(1, 3):\n>>>     for tweet in twitter.search('#win OR #fail', start=i, count=100):\n>>>         s = tweet.text.lower()\n>>>         p = '#win' in s and 'WIN' or 'FAIL'\n>>>         v = tag(s)\n>>>         v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective\n>>>         v = count(v) # {'sweet': 1}\n>>>         if v:\n>>>             knn.train(v, type=p)\n>>> \n>>> print knn.classify('sweet potato burger')\n>>> print knn.classify('stupid autocorrect')\n\nDOCUMENTATION\n=============\n\nhttp://www.clips.ua.ac.be/pages/pattern\n\nREFERENCE\n=========\n\nDe Smedt, T., Daelemans, W. (2012). Pattern for Python. Journal of Machine Learning Research, 13, 2031–2035.\n\nCONTRIBUTE\n==========\n\nThe source code is hosted on GitHub and contributions or donations are welcomed, see the developer documentation (http://www.clips.ua.ac.be/pages/pattern#contribute). If you use Pattern in your work, please cite our reference paper.\n\nBUNDLED DEPENDENCIES\n====================\n\nPattern is bundled with the following data sets, algorithms and Python packages: \n\n- Beautiful Soup, Leonard Richardson\n- Brill tagger, Eric Brill\n- Brill tagger for Dutch, Jeroen Geertzen\n- Brill tagger for German, Gerold Schneider & Martin Volk\n- Brill tagger for Spanish, trained on Wikicorpus (Samuel Reese & Gemma Boleda et al.)\n- Brill tagger for French, trained on Lefff (Benoît Sagot & Lionel Clément et al.)\n- Brill tagger for Italian, mined from Wiktionary\n- English pluralization, Damian Conway\n- Spanish verb inflection, Fred Jehle\n- French verb inflection, Bob Salita\n- Graph JavaScript framework, Aslak Hellesoy & Dave Hoover\n- LIBSVM, Chih-Chung Chang & Chih-Jen Lin\n- LIBLINEAR, Rong-En Fan et al.\n- NetworkX centrality, Aric Hagberg, Dan Schult & Pieter Swart\n- PDFMiner, Yusuke Shinyama\n- Python docx, Mike Maccana\n- PyWordNet, Oliver Steele\n- simplejson, Bob Ippolito\n- spelling corrector, Peter Norvig\n- Universal Feed Parser, Mark Pilgrim\n- WordNet, Christiane Fellbaum et al.\n\nACKNOWLEDGEMENTS\n================\n\nAuthors: \n- Tom De Smedt (tom@organisms.be)\n- Walter Daelemans (walter.daelemans@ua.ac.be)\n\nContributors (chronological):\n- Frederik De Bleser\n- Jason Wiener\n- Daniel Friesen\n- Jeroen Geertzen\n- Thomas Crombez\n- Ken Williams\n- Peteris Erins\n- Rajesh Nair\n- F. De Smedt\n- Radim Řehůřek\n- Tom Loredo\n- John DeBovis\n- Thomas Sileo\n- Gerold Schneider\n- Martin Volk\n- Samuel Joseph\n- Shubhanshu Mishra\n- Robert Elwell\n- Fred Jehle\n- Antoine Mazières + fabelier.org\n- Rémi de Zoeten + closealert.nl\n- Kenneth Koch\n- Jens Grivolla\n- Fabio Marfia\n- Steven Loria\n- Colin Molter + tevizz.com\n- Peter Bull\n- Maurizio Sambati\n- Dan Fu\n- Salvatore Di Dio\n- Vincent Van Asch\n- Frederik Elwert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C2:3A3DD:1787D2:5DBD0A:6AB92AA6"},"text_sha256":"4d42c9d4743f28458ee8bf04d26303cbaa75cd5d03d89eac2baff204fabd579a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2565","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B5:62B94:17BBE86:1BDED8D:6AB92AA7"},"commit":{"sha":"d25511f9ca7ed9356b801d8663b8b5168464e68f","url":"https://github.com/clips/pattern/commit/d25511f9ca7ed9356b801d8663b8b5168464e68f","date":"2020-04-25T12:40:40Z","author_date":"2020-04-25T12:40:40Z","committer_date":"2020-04-25T12:40:40Z","tree_sha":"79979aadd97055e54b7adf9401654c47284a6244","message_first_line":"Changed links"},"tree_request_status":200,"tree_rate":{"github_remaining":"2564","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E5:A9DC0:17B9579:1BDC378:6AB92AA8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5344,"blob_sha":"b759ea9f798e3bf94d45452ae48907da091b2087","priority":0}],"documents":[{"path":"README.md","size":5344,"blob_sha":"b759ea9f798e3bf94d45452ae48907da091b2087","priority":0,"status":200,"text":"Pattern\n=======\n\n[![Build Status](http://img.shields.io/travis/clips/pattern/master.svg?style=flat)](https://travis-ci.org/clips/pattern/branches)\n[![Coverage](https://img.shields.io/coveralls/clips/pattern/master.svg?style=flat)](https://coveralls.io/github/clips/pattern?branch=master)\n[![PyPi version](http://img.shields.io/pypi/v/pattern.svg?style=flat)](https://pypi.python.org/pypi/pattern)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg?style=flat)](https://github.com/clips/pattern/blob/master/LICENSE.txt)\n\nPattern is a web mining module for Python. It has tools for:\n\n * Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM parser\n * Natural Language Processing: part-of-speech taggers, n-gram search, sentiment analysis, WordNet\n * Machine Learning: vector space model, clustering, classification (KNN, SVM, Perceptron)\n * Network Analysis: graph centrality and visualization.\n\nIt is well documented, thoroughly tested with 350+ unit tests and comes bundled with 50+ examples. The source code is licensed under BSD.\n\n![Example workflow](https://raw.githubusercontent.com/clips/pattern/master/docs/g/pattern_schema.gif)\n\nExample\n-------\n\nThis example trains a classifier on adjectives mined from Twitter using Python 3. First, tweets that contain hashtag #win or #fail are collected. For example: *\"$20 tip off a sweet little old lady today #win\"*. The word part-of-speech tags are then parsed, keeping only adjectives. Each tweet is transformed to a vector, a dictionary of adjective → count items, labeled `WIN` or `FAIL`. The classifier uses the vectors to learn which other tweets look more like `WIN` or more like `FAIL`.\n\n```python\nfrom pattern.web import Twitter\nfrom pattern.en import tag\nfrom pattern.vector import KNN, count\n\ntwitter, knn = Twitter(), KNN()\n\nfor i in range(1, 3):\n    for tweet in twitter.search('#win OR #fail', start=i, count=100):\n        s = tweet.text.lower()\n        p = '#win' in s and 'WIN' or 'FAIL'\n        v = tag(s)\n        v = [word for word, pos in v if pos == 'JJ'] # JJ = adjective\n        v = count(v) # {'sweet': 1}\n        if v:\n            knn.train(v, type=p)\n\nprint(knn.classify('sweet potato burger'))\nprint(knn.classify('stupid autocorrect'))\n```\n\nInstallation\n------------\n\nPattern supports Python 2.7 and Python 3.6. To install Pattern so that it is available in all your scripts, unzip the download and from the command line do:\n```bash\ncd pattern-3.6\npython setup.py install\n```\n\nIf you have pip, you can automatically download and install from the [PyPI repository](https://pypi.python.org/pypi/pattern):\n```bash\npip install pattern\n```\n\nIf none of the above works, you can make Python aware of the module in three ways:\n- Put the pattern folder in the same folder as your script.\n- Put the pattern folder in the standard location for modules so it is available to all scripts:\n  * `c:\\python36\\Lib\\site-packages\\` (Windows),\n  * `/Library/Python/3.6/site-packages/` (Mac OS X),\n  * `/usr/lib/python3.6/site-packages/` (Unix).\n- Add the location of the module to `sys.path` in your script, before importing it:\n\n```python\nMODULE = '/users/tom/desktop/pattern'\nimport sys; if MODULE not in sys.path: sys.path.append(MODULE)\nfrom pattern.en import parsetree\n```\n\nDocumentation\n-------------\n\nFor documentation and examples see the [user documentation](https://github.com/clips/pattern/wiki).\n\nVersion\n-------\n\n3.6\n\nLicense\n-------\n\n**BSD**, see `LICENSE.txt` for further details.\n\nReference\n---------\n\nDe Smedt, T., Daelemans, W. (2012). Pattern for Python. *Journal of Machine Learning Research, 13*, 2031–2035.\n\nContribute\n----------\n\nThe source code is hosted on GitHub and contributions or donations are welcomed.\n\nBundled dependencies\n--------------------\n\nPattern is bundled with the following data sets, algorithms and Python packages:\n\n- **Brill tagger**, Eric Brill\n- **Brill tagger for Dutch**, Jeroen Geertzen\n- **Brill tagger for German**, Gerold Schneider & Martin Volk\n- **Brill tagger for Spanish**, trained on Wikicorpus (Samuel Reese & Gemma Boleda et al.)\n- **Brill tagger for French**, trained on Lefff (Benoît Sagot & Lionel Clément et al.)\n- **Brill tagger for Italian**, mined from Wiktionary\n- **English pluralization**, Damian Conway\n- **Spanish verb inflection**, Fred Jehle\n- **French verb inflection**, Bob Salita\n- **Graph JavaScript framework**, Aslak Hellesoy & Dave Hoover\n- **LIBSVM**, Chih-Chung Chang & Chih-Jen Lin\n- **LIBLINEAR**, Rong-En Fan et al.\n- **NetworkX centrality**, Aric Hagberg, Dan Schult & Pieter Swart\n- **spelling corrector**, Peter Norvig\n\nAcknowledgements\n----------------\n\n**Authors:**\n\n- Tom De Smedt (tom@organisms.be)\n- Walter Daelemans (walter.daelemans@ua.ac.be)\n\n**Contributors (chronological):**\n\n- Frederik De Bleser\n- Jason Wiener\n- Daniel Friesen\n- Jeroen Geertzen\n- Thomas Crombez\n- Ken Williams\n- Peteris Erins\n- Rajesh Nair\n- F. De Smedt\n- Radim Řehůřek\n- Tom Loredo\n- John DeBovis\n- Thomas Sileo\n- Gerold Schneider\n- Martin Volk\n- Samuel Joseph\n- Shubhanshu Mishra\n- Robert Elwell\n- Fred Jehle\n- Antoine Mazières + fabelier.org\n- Rémi de Zoeten + closealert.nl\n- Kenneth Koch\n- Jens Grivolla\n- Fabio Marfia\n- Steven Loria\n- Colin Molter + tevizz.com\n- Peter Bull\n- Maurizio Sambati\n- Dan Fu\n- Salvatore Di Dio\n- Vincent Van Asch\n- Frederik Elwert\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8088:3E1C8:17E63C:5E1A8F:6AB92AA7"},"text_sha256":"708ee68ed358dcd791c8ba1370264645959c251b4ffe3ec2ab2f03c7b5ff7bd3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"vaexio/vaex","input_row":{"repository":"vaexio/vaex","url":"https://github.com/vaexio/vaex","name":"vaex","owner":"vaexio","description":"Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":8510,"issues":1234,"created_at":"2014-09-27T09:44:42Z","updated_at":"2026-09-25T10:21:29Z","first_commit_at":"2014-01-27T12:26:04Z","last_commit_at":"2026-02-05T19:25:06Z","activity_months":144.28999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:36.937Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"vaexio/vaex","visibility":"public","created_at":"2014-09-27T09:44:42Z","updated_at":"2026-09-25T10:21:29Z","private":false,"fork":false,"archived":false,"stargazers_count":8510,"open_issues_count":554,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2563","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B8:74181:1780CDD:1BA3E52:6AB92AA8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2562","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:17F0688:1C13A0A:6AB92AA9"},"commit":{"sha":"371533d5671b5c4d1adfc974d1d140212d38eba5","url":"https://github.com/vaexio/vaex/commit/371533d5671b5c4d1adfc974d1d140212d38eba5","date":"2018-05-18T11:51:30Z","author_date":"2018-05-18T11:51:30Z","committer_date":"2018-05-18T11:51:30Z","tree_sha":"64174327fb315645636b7a23b0adf5886efddbfe","message_first_line":"core: make masked values print like --\""},"tree_request_status":200,"tree_rate":{"github_remaining":"2561","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089D:52542:17BD4C5:1BE0724:6AB92AA9"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1518,"blob_sha":"4bcd503e2ebf27d9681ad7aa4a2b07f814a2c085","priority":0}],"documents":[{"path":"README.rst","size":1518,"blob_sha":"4bcd503e2ebf27d9681ad7aa4a2b07f814a2c085","priority":0,"status":200,"text":"|Travis| |Conda| |Chat| \n\nVaeX: Visualization and eXploration\n===================================\n\nVaex is a python library for Out-of-Core DataFrames (similar to Pandas), to visualize and explore big tabular datasets. It can calculate statistics such as mean, sum, count, standard deviation etc, on an N-dimensional grid up to a billion (10\\ :sup:`9`) objects/rows per second. Visualization is done using histograms, density plots and 3d volume rendering, allowing interactive exploration of big data. Vaex uses memory mapping, zero memory copy policy and lazy computations for best performance (no memory wasted).\n\n\nVaex uses several sites:\n\n* Main page: https://vaex.io/\n* Documentation: https://docs.vaex.io/\n* Github: https://github.com/maartenbreddels/vaex\n* PyPi: https://pypi.python.org/pypi/vaex/\n\nInstallation\n============\n\nSee https://docs.vaex.io/en/latest/installing.html or:\n\nUsing pip\n::\n $ pip install --user --pre vaex\n\nUsing conda\n::\n conda install -c conda-forge vaex\n\n\n.. |Travis| image:: https://travis-ci.org/maartenbreddels/vaex.svg?branch=master\n   :target: https://travis-ci.org/maartenbreddels/vaex\n.. |Chat| image:: https://badges.gitter.im/maartenbreddels/vaex.svg\n   :alt: Join the chat at https://gitter.im/maartenbreddels/vaex\n   :target: https://gitter.im/maartenbreddels/vaex?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. |Conda| image:: https://anaconda.org/conda-forge/vaex/badges/downloads.svg\n   :target: https://anaconda.org/conda-forge/vaex   \n   \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DAE:B08CF:17479D:5D7DC4:6AB92AA8"},"text_sha256":"bf546e7fe3426a08063558cf60ddcf40d606466d0b4d846915f2547d4a200394"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2560","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0898:7307A:17B66F9:1BD93AB:6AB92AAA"},"commit":{"sha":"65ab46281939e2fd2fc291266bb08a328ff59882","url":"https://github.com/vaexio/vaex/commit/65ab46281939e2fd2fc291266bb08a328ff59882","date":"2026-02-05T19:25:06Z","author_date":"2026-02-05T13:47:50Z","committer_date":"2026-02-05T19:25:06Z","tree_sha":"f5011bc2062595d6245def258bc3a84b8f379760","message_first_line":"Fix cibuildwheel v3"},"tree_request_status":200,"tree_rate":{"github_remaining":"2559","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17CE06C:1BF12BA:6AB92AAB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5376,"blob_sha":"bb5baea91c3fbf4ec6836d88f36ac53a8c0b0c26","priority":0},{"path":"SECURITY.md","size":126,"blob_sha":"89cc030fd77f00057afa249e854e15c5e3ef687c","priority":1}],"documents":[{"path":"README.md","size":5376,"blob_sha":"bb5baea91c3fbf4ec6836d88f36ac53a8c0b0c26","priority":0,"status":200,"text":"[![Supported Python Versions](https://img.shields.io/pypi/pyversions/vaex-core)](https://pypi.org/project/vaex-core/)\n[![Documentation](https://readthedocs.org/projects/vaex/badge/?version=latest)](https://docs.vaex.io)\n[![Slack](https://img.shields.io/badge/slack-chat-green.svg)](https://join.slack.com/t/vaexio/shared_invite/zt-shhxzf5i-Cf5n2LtkoYgUjOjbB3bGQQ)\n\n# What is Vaex?\n\nVaex is a high performance Python library for lazy **Out-of-Core DataFrames**\n(similar to Pandas), to visualize and explore big tabular datasets. It\ncalculates *statistics* such as mean, sum, count, standard deviation etc, on an\n*N-dimensional grid* for more than **a billion** (`10^9`) samples/rows **per\nsecond**. Visualization is done using **histograms**, **density plots** and **3d\nvolume rendering**, allowing interactive exploration of big data. Vaex uses\nmemory mapping, zero memory copy policy and lazy computations for best\nperformance (no memory wasted).\n\n# Installing\nWith pip:\n```\n$ pip install vaex\n```\nOr conda:\n```\n$ conda install -c conda-forge vaex\n```\n\n[For more details, see the documentation](https://docs.vaex.io/en/latest/installing.html)\n\n# Key features\n## Instant opening of Huge data files (memory mapping)\n[HDF5](https://en.wikipedia.org/wiki/Hierarchical_Data_Format) and [Apache Arrow](https://arrow.apache.org/) supported.\n\n![opening1a](https://user-images.githubusercontent.com/1765949/82818563-31c1e200-9e9f-11ea-9ee0-0a8c1994cdc9.png)\n\n\n![opening1b](https://user-images.githubusercontent.com/1765949/82820352-49e73080-9ea2-11ea-9153-d73aa399d329.png)\n\n[Read the documentation on how to efficiently convert your data](https://docs.vaex.io/en/latest/example_io.html) from CSV files, Pandas DataFrames, or other sources.\n\n\nLazy streaming from S3 supported in combination with memory mapping.\n\n![opening1c](https://user-images.githubusercontent.com/1765949/82820516-a21e3280-9ea2-11ea-948b-07df26c4b5d3.png)\n\n\n## Expression system\nDon't waste memory or time with feature engineering, we (lazily) transform your data when needed.\n\n\n![expression](https://user-images.githubusercontent.com/1765949/82818733-70f03300-9e9f-11ea-80b0-ab28e7950b5c.png)\n\n\n\n## Out-of-core DataFrame\nFiltering and evaluating expressions will not waste memory by making copies; the data is kept untouched on disk, and will be streamed only when needed. Delay the time before you need a cluster.\n\n\n![occ-animated](https://user-images.githubusercontent.com/1765949/82821111-c6c6da00-9ea3-11ea-9f9e-498de8133cc2.gif)\n\n## Fast groupby / aggregations\nVaex implements parallelized, highly performant `groupby` operations, especially when using categories (>1 billion/second).\n\n\n![groupby](https://user-images.githubusercontent.com/1765949/82818807-97ae6980-9e9f-11ea-8820-41dd4441057a.png)\n\n\n## Fast and efficient join\nVaex doesn't copy/materialize the 'right' table when joining, saving gigabytes of memory. With subsecond joining on a billion rows, it's pretty fast!\n\n![join](https://user-images.githubusercontent.com/1765949/82818840-a268fe80-9e9f-11ea-8ba2-6a6d52c4af88.png)\n\n## More features\n\n * Remote DataFrames (documentation coming soon)\n * Integration into [Jupyter and Voila for interactive notebooks and dashboards](https://vaex.readthedocs.io/en/latest/tutorial_jupyter.html)\n * [Machine Learning without (explicit) pipelines](https://vaex.readthedocs.io/en/latest/tutorial_ml.html)\n\n\n## Contributing\n\nSee [contributing](CONTRIBUTING.md) page.\n\n## Slack\n\nJoin the discussion in our [Slack](https://join.slack.com/t/vaexio/shared_invite/zt-shhxzf5i-Cf5n2LtkoYgUjOjbB3bGQQ) channel!\n\n# Learn more about Vaex\n * Articles\n   * [Beyond Pandas: Spark, Dask, Vaex and other big data technologies battling head to head](https://towardsdatascience.com/beyond-pandas-spark-dask-vaex-and-other-big-data-technologies-battling-head-to-head-a453a1f8cc13) (includes benchmarks)\n   * [7 reasons why I love Vaex for data science](https://towardsdatascience.com/7-reasons-why-i-love-vaex-for-data-science-99008bc8044b) (tips and trics)\n   * [ML impossible: Train 1 billion samples in 5 minutes on your laptop using Vaex and Scikit-Learn](https://towardsdatascience.com/ml-impossible-train-a-1-billion-sample-model-in-20-minutes-with-vaex-and-scikit-learn-on-your-9e2968e6f385)\n   * [How to analyse 100 GB of data on your laptop with Python](https://towardsdatascience.com/how-to-analyse-100s-of-gbs-of-data-on-your-laptop-with-python-f83363dda94)\n   * [Flying high with Vaex: analysis of over 30 years of flight data in Python](https://towardsdatascience.com/https-medium-com-jovan-veljanoski-flying-high-with-vaex-analysis-of-over-30-years-of-flight-data-in-python-b224825a6d56)\n   * [Vaex: A DataFrame with super strings - Speed up your text processing up to a 1000x\n](https://towardsdatascience.com/vaex-a-dataframe-with-super-strings-789b92e8d861)\n   * [Vaex: Out of Core Dataframes for Python and Fast Visualization - 1 billion row datasets on your laptop](https://towardsdatascience.com/vaex-out-of-core-dataframes-for-python-and-fast-visualization-12c102db044a)\n\n * [Follow our tutorials](https://docs.vaex.io/en/latest/tutorials.html)\n * Watch our more recent talks:\n   * [PyData London 2019](https://www.youtube.com/watch?v=2Tt0i823-ec)\n   * [SciPy 2019](https://www.youtube.com/watch?v=ELtjRdPT8is)\n * Contact us for data science solutions, training, or enterprise support at https://vaex.io/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0FD4:3C4A0:17B4D6:5DEAA3:6AB92AAA"},"text_sha256":"14330a79a6d141a4c0180a4a3ad91c8e2450cd305bce80ceeb0cb6c5aa66211f"},{"path":"SECURITY.md","size":126,"blob_sha":"89cc030fd77f00057afa249e854e15c5e3ef687c","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease contact maartenbreddels+vaex@gmail.com for reporting vulnerabilities\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B860:3CC8A:17CDC5:5E03D9:6AB92A8D"},"text_sha256":"992c467a1d1028633ddb494627987911e3509c4fae743a38a61b66da22c3dff6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"google-deepmind/pysc2","input_row":{"repository":"google-deepmind/pysc2","url":"https://github.com/google-deepmind/pysc2","name":"pysc2","owner":"google-deepmind","description":"StarCraft II Learning Environment","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":8317,"issues":287,"created_at":"2017-07-25T18:16:57Z","updated_at":"2026-09-25T20:18:55Z","first_commit_at":"2017-08-09T17:22:30Z","last_commit_at":"2023-04-19T16:47:52Z","activity_months":68.299999999999997,"ai_ml_match_topics":"machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:40.492Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"google-deepmind/pysc2","visibility":"public","created_at":"2017-07-25T18:16:57Z","updated_at":"2026-09-25T20:18:55Z","private":false,"fork":false,"archived":false,"stargazers_count":8317,"open_issues_count":64,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2558","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:1809A31:1C2CD94:6AB92AAC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2557","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0937:278AC2:185E32F:1C81750:6AB92AAC"},"commit":{"sha":"40e70a55c38e6f8a198e9fd8ef9ee8dff3684e9b","url":"https://github.com/google-deepmind/pysc2/commit/40e70a55c38e6f8a198e9fd8ef9ee8dff3684e9b","date":"2018-05-18T17:46:22Z","author_date":"2018-05-18T17:43:24Z","committer_date":"2018-05-18T17:46:22Z","tree_sha":"c238fb1d6ff13afa34501b439476cdb6aa79752a","message_first_line":"Make the map argument optional for remote_sc2_env. It's only needed if you need save_game."},"tree_request_status":200,"tree_rate":{"github_remaining":"2556","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A0:0AC4:129225A:15E5226:6AB92AAD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8329,"blob_sha":"ba301be60915ea72fab17acdd461fe7670e76cec","priority":0}],"documents":[{"path":"README.md","size":8329,"blob_sha":"ba301be60915ea72fab17acdd461fe7670e76cec","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"https://www.youtube.com/watch?v=-fKUyT14G-8\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/-fKUyT14G-8/0.jpg\"\n         alt=\"DeepMind open source PySC2 toolset for Starcraft II\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n  <a href=\"https://www.youtube.com/watch?v=6L448yg0Sm0\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/6L448yg0Sm0/0.jpg\"\n         alt=\"StarCraft II 'mini games' for AI research\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n  <a href=\"https://www.youtube.com/watch?v=WEOzide5XFc\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/WEOzide5XFc/0.jpg\"\n         alt=\"Trained and untrained agents play StarCraft II 'mini-game'\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n<\/div>\n\n# PySC2 - StarCraft II Learning Environment\n\n[PySC2](https://github.com/deepmind/pysc2) is [DeepMind](http://deepmind.com)'s\nPython component of the StarCraft II Learning Environment (SC2LE). It exposes\n[Blizzard Entertainment](http://blizzard.com)'s [StarCraft II Machine Learning\nAPI](https://github.com/Blizzard/s2client-proto) as a Python RL Environment.\nThis is a collaboration between DeepMind and Blizzard to develop StarCraft II\ninto a rich environment for RL research. PySC2 provides an interface for RL\nagents to interact with StarCraft 2, getting observations and sending actions.\n\n\nWe have published an accompanying\n[blogpost](https://deepmind.com/blog/deepmind-and-blizzard-open-starcraft-ii-ai-research-environment/)\nand [paper](https://arxiv.org/abs/1708.04782), which outlines our\nmotivation for using StarCraft II for DeepRL research, and some initial research\nresults using the environment.\n\n## About\n\nDisclaimer: This is not an official Google product.\n\nIf you use the StarCraft II Machine Learning API and/or PySC2 in your research,\nplease cite the [StarCraft II Paper](https://arxiv.org/abs/1708.04782)\n\nYou can reach us at [pysc2@deepmind.com](mailto:pysc2@deepmind.com).\n\n\n# Quick Start Guide\n\n## Get PySC2\n\n### PyPI\n\nThe easiest way to get PySC2 is to use pip:\n\n```shell\n$ pip install pysc2\n```\n\nThat will install the `pysc2` package along with all the required dependencies.\n[virtualenv](https://pypi.python.org/pypi/virtualenv) can help manage your\ndependencies. You may also need to upgrade pip: `pip install --upgrade pip`\nfor the `pysc2` install to work. If you're running on an older system you may\nneed to install `libsdl` libraries for the `pygame` dependency.\n\nPip will install a few of the  binaries to your bin directory. `pysc2_play` can\nbe used as a shortcut to `python -m pysc2.bin.play`.\n\n### Git\n\nAlternatively you can install PySC2 with git. First clone the PySC2 repo, then\ninstall the dependencies and `pysc2` package:\n\n```shell\n$ git clone https://github.com/deepmind/pysc2.git\n$ pip install pysc2/\n```\n\n## Get StarCraft II\n\nPySC2 depends on the full StarCraft II game and only works with versions that\ninclude the API, which is 3.16.1 and above.\n\n### Linux\n\nFollow Blizzard's [documentation](https://github.com/Blizzard/s2client-proto#downloads) to\nget the linux version. By default, PySC2 expects the game to live in\n`~/StarCraftII/`. You can override this path by setting the `SC2PATH`\nenvironment variable or creating your own run_config.\n\n### Windows/MacOS\n\nInstall of the game as normal from [Battle.net](https://battle.net). Even the\n[Starter Edition](http://battle.net/sc2/en/legacy-of-the-void/) will work.\nIf you used the default install location PySC2 should find the latest binary.\nIf you changed the install location, you might need to set the `SC2PATH`\nenvironment variable with the correct location.\n\nPySC2 should work on MacOS and Windows systems running Python 2.7+ or 3.4+,\nbut has only been thoroughly tested on Linux. We welcome suggestions and patches\nfor better compatibility with other systems.\n\n## Get the maps\n\nPySC2 has many maps pre-configured, but they need to be downloaded into the SC2\n`Maps` directory before they can be played.\n\nDownload the [ladder maps](https://github.com/Blizzard/s2client-proto#downloads)\nand the [mini games](https://github.com/deepmind/pysc2/releases/download/v1.2/mini_games.zip)\nand extract them to your `StarcraftII/Maps/` directory.\n\n## Run an agent\n\nYou can run an agent to test the environment. The UI shows you the actions of\nthe agent and is helpful for debugging and visualization purposes.\n\n```shell\n$ python -m pysc2.bin.agent --map Simple64\n```\n\nIt runs a random agent by default, but you can specify others if you'd like,\nincluding your own.\n\n```shell\n$ python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards\n```\n\nYou can also run two agents against each other.\n\n```shell\n$ python -m pysc2.bin.agent --map Simple64 --agent2 pysc2.agents.random_agent.RandomAgent\n```\n\nTo specify the agent's race, the opponent's difficulty, and more, you can pass\nadditional flags. Run with `--help` to see what you can change.\n\n## Play the game as a human\n\nThere is a human agent interface which is mainly used for debugging, but it can\nalso be used to play the game. The UI is fairly simple and incomplete, but it's\nenough to understand the basics of the game. Also, it runs on Linux.\n\n```shell\n$ python -m pysc2.bin.play --map Simple64\n```\n\nIn the UI, hit `?` for a list of the hotkeys. The most basic ones are: `F4` to\nquit, `F5` to restart, `F9` to save a replay, and `Pgup`/`Pgdn` to control the\nspeed of the game. Otherwise use the mouse for selection and keyboard for\ncommands listed on the left.\n\nThe left side is a basic rendering. The right side is the feature layers that\nthe agent receives, with some coloring to make it more useful to us. You can\nenable or disable RGB or feature layer rendering and their resolutions with\ncommand-line flags.\n\n## Watch a replay\n\nRunning an agent and playing as a human save a replay by default. You can watch\nthat replay by running:\n\n```shell\n$ python -m pysc2.bin.play --replay <path-to-replay>\n```\n\nThis works for any replay as long as the map can be found by the game.\n\nThe same controls work as for playing the game, so `F4` to exit, `pgup`/`pgdn`\nto control the speed, etc.\n\nYou can save a video of the replay with the `--video` flag.\n\n## List the maps\n\n[Maps](docs/maps.md) need to be configured before they're known to the\nenvironment. You can see the list of known maps by running:\n\n```shell\n$ python -m pysc2.bin.map_list\n```\n\n## Run the tests\n\nIf you want to submit a pull request, please make sure the tests pass on both\npython 2 and 3.\n\n```shell\n$ python -m pysc2.bin.run_tests\n```\n\n# Environment Details\n\nFor a full description of the specifics of how the environment is configured,\nthe observations and action spaces work read the\n[environment documentation](docs/environment.md).\n\n# Mini-game maps\n\nThe mini-game map files referenced in the paper are stored under `pysc2/maps/`\nbut must be installed in `$SC2PATH/Maps`. Make sure to follow the download\ninstructions above.\n\nMaps are configured in the Python files in `pysc2/maps/`. The configs can set\nplayer and time limits, whether to use the game outcome or curriculum score, and\na handful of other things. For more information about the maps, and how to\nconfigure your own, read the [maps documentation](docs/maps.md).\n\n# Replays\n\nA replay lets you review what happened during a game. You can see the actions\nand observations that each player made as they played.\n\nBlizzard is releasing a large number of anonymized 1v1 replays played on the\nladder. You can find instructions for how to get the\n[replay files](https://github.com/Blizzard/s2client-proto#downloads) on their\nsite. You can also review your own replays.\n\nReplays can be played back to get the observations and actions made during that\ngame. The observations are rendered at the resolution you request, so may differ\nfrom what the human actually saw. Similarly the actions specify a point, which\ncould reflect a different pixel on the human's screen, so may not have an exact\nmatch in our observations, though they should be fairly similar.\n\nReplays are version dependent, so a 3.16 replay will fail in a 3.16.1 or 3.17\nbinary.\n\nYou can visualize the replays with the full game, or with `pysc2.bin.play`.\nAlternatively you can run `pysc2.bin.replay_actions` to process many replays\nin parallel.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CB20:326565:17ACD5:5DE374:6AB92AAA"},"text_sha256":"0fb55f4950568d39e05856d18f25c0fe4cef921310b69b6f38b9ced6bdc87202"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2555","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BB:DC698:17F2FC7:1C158E6:6AB92AAE"},"commit":{"sha":"0df53d38c153972f1e368572ba65b1442a0fd41f","url":"https://github.com/google-deepmind/pysc2/commit/0df53d38c153972f1e368572ba65b1442a0fd41f","date":"2023-04-19T16:47:52Z","author_date":"2023-04-19T16:40:54Z","committer_date":"2023-04-19T16:47:52Z","tree_sha":"90b1264c23346221e837db8fad32fe9d0dde15e7","message_first_line":"Pass the launch kwargs to subprocess.Popen so that you can do something like:"},"tree_request_status":200,"tree_rate":{"github_remaining":"2554","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:185E41B:1C81884:6AB92AAE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8665,"blob_sha":"3bb872847abe9058701ab24defee9689d80170e5","priority":0}],"documents":[{"path":"README.md","size":8665,"blob_sha":"3bb872847abe9058701ab24defee9689d80170e5","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"https://www.youtube.com/watch?v=-fKUyT14G-8\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/-fKUyT14G-8/0.jpg\"\n         alt=\"DeepMind open source PySC2 toolset for Starcraft II\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n  <a href=\"https://www.youtube.com/watch?v=6L448yg0Sm0\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/6L448yg0Sm0/0.jpg\"\n         alt=\"StarCraft II 'mini games' for AI research\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n  <a href=\"https://www.youtube.com/watch?v=WEOzide5XFc\"\n     target=\"_blank\">\n    <img src=\"http://img.youtube.com/vi/WEOzide5XFc/0.jpg\"\n         alt=\"Trained and untrained agents play StarCraft II 'mini-game'\"\n         width=\"240\" height=\"180\" border=\"10\" />\n  <\/a>\n<\/div>\n\n# PySC2 - StarCraft II Learning Environment\n\n[PySC2](https://github.com/deepmind/pysc2) is [DeepMind](http://deepmind.com)'s\nPython component of the StarCraft II Learning Environment (SC2LE). It exposes\n[Blizzard Entertainment](http://blizzard.com)'s [StarCraft II Machine Learning\nAPI](https://github.com/Blizzard/s2client-proto) as a Python RL Environment.\nThis is a collaboration between DeepMind and Blizzard to develop StarCraft II\ninto a rich environment for RL research. PySC2 provides an interface for RL\nagents to interact with StarCraft 2, getting observations and sending actions.\n\n\nWe have published an accompanying\n[blogpost](https://deepmind.com/blog/deepmind-and-blizzard-open-starcraft-ii-ai-research-environment/)\nand [paper](https://arxiv.org/abs/1708.04782), which outlines our\nmotivation for using StarCraft II for DeepRL research, and some initial research\nresults using the environment.\n\n## About\n\nDisclaimer: This is not an official Google product.\n\nIf you use the StarCraft II Machine Learning API and/or PySC2 in your research,\nplease cite the [StarCraft II Paper](https://arxiv.org/abs/1708.04782)\n\nYou can reach us at [pysc2@deepmind.com](mailto:pysc2@deepmind.com).\n\n\n# Quick Start Guide\n\n## Get PySC2\n\n### PyPI\n\nThe easiest way to get PySC2 is to use pip:\n\n```shell\n$ pip install pysc2\n```\n\nThat will install the `pysc2` package along with all the required dependencies.\n[virtualenv](https://pypi.python.org/pypi/virtualenv) can help manage your\ndependencies. You may also need to upgrade pip: `pip install --upgrade pip`\nfor the `pysc2` install to work. If you're running on an older system you may\nneed to install `libsdl` libraries for the `pygame` dependency.\n\nPip will install a few of the  binaries to your bin directory. `pysc2_play` can\nbe used as a shortcut to `python -m pysc2.bin.play`.\n\n### From Source\n\nAlternatively you can install latest PySC2 codebase from git master branch:\n\n```shell\n$ pip install --upgrade https://github.com/deepmind/pysc2/archive/master.zip\n```\n\nor from a local clone of the git repo:\n\n```shell\n$ git clone https://github.com/deepmind/pysc2.git\n$ pip install --upgrade pysc2/\n```\n\n## Get StarCraft II\n\nPySC2 depends on the full StarCraft II game and only works with versions that\ninclude the API, which is 3.16.1 and above.\n\n### Linux\n\nFollow Blizzard's [documentation](https://github.com/Blizzard/s2client-proto#downloads) to\nget the linux version. By default, PySC2 expects the game to live in\n`~/StarCraftII/`. You can override this path by setting the `SC2PATH`\nenvironment variable or creating your own run_config.\n\n### Windows/MacOS\n\nInstall of the game as normal from [Battle.net](https://battle.net). Even the\n[Starter Edition](http://battle.net/sc2/en/legacy-of-the-void/) will work.\nIf you used the default install location PySC2 should find the latest binary.\nIf you changed the install location, you might need to set the `SC2PATH`\nenvironment variable with the correct location.\n\nPySC2 should work on MacOS and Windows systems running Python 3.8+,\nbut has only been thoroughly tested on Linux. We welcome suggestions and patches\nfor better compatibility with other systems.\n\n## Get the maps\n\nPySC2 has many maps pre-configured, but they need to be downloaded into the SC2\n`Maps` directory before they can be played.\n\nDownload the [ladder maps](https://github.com/Blizzard/s2client-proto#downloads)\nand the [mini games](https://github.com/deepmind/pysc2/releases/download/v1.2/mini_games.zip)\nand extract them to your `StarCraftII/Maps/` directory.\n\n## Run an agent\n\nYou can run an agent to test the environment. The UI shows you the actions of\nthe agent and is helpful for debugging and visualization purposes.\n\n```shell\n$ python -m pysc2.bin.agent --map Simple64\n```\n\nIt runs a random agent by default, but you can specify others if you'd like,\nincluding your own.\n\n```shell\n$ python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards\n```\n\nYou can also run two agents against each other.\n\n```shell\n$ python -m pysc2.bin.agent --map Simple64 --agent2 pysc2.agents.random_agent.RandomAgent\n```\n\nTo specify the agent's race, the opponent's difficulty, and more, you can pass\nadditional flags. Run with `--help` to see what you can change.\n\n## Play the game as a human\n\nThere is a human agent interface which is mainly used for debugging, but it can\nalso be used to play the game. The UI is fairly simple and incomplete, but it's\nenough to understand the basics of the game. Also, it runs on Linux.\n\n```shell\n$ python -m pysc2.bin.play --map Simple64\n```\n\nIn the UI, hit `?` for a list of the hotkeys. The most basic ones are: `F4` to\nquit, `F5` to restart, `F8` to save a replay, and `Pgup`/`Pgdn` to control the\nspeed of the game. Otherwise use the mouse for selection and keyboard for\ncommands listed on the left.\n\nThe left side is a basic rendering. The right side is the feature layers that\nthe agent receives, with some coloring to make it more useful to us. You can\nenable or disable RGB or feature layer rendering and their resolutions with\ncommand-line flags.\n\n## Watch a replay\n\nRunning an agent and playing as a human save a replay by default. You can watch\nthat replay by running:\n\n```shell\n$ python -m pysc2.bin.play --replay <path-to-replay>\n```\n\nThis works for any replay as long as the map can be found by the game.\n\nThe same controls work as for playing the game, so `F4` to exit, `pgup`/`pgdn`\nto control the speed, etc.\n\nYou can save a video of the replay with the `--video` flag.\n\n## List the maps\n\n[Maps](docs/maps.md) need to be configured before they're known to the\nenvironment. You can see the list of known maps by running:\n\n```shell\n$ python -m pysc2.bin.map_list\n```\n\n## Run the tests\n\nIf you want to submit a pull request, please make sure the tests pass on both\npython 2 and 3.\n\n```shell\n$ python -m pysc2.bin.run_tests\n```\n\n# Environment Details\n\nFor a full description of the specifics of how the environment is configured,\nthe observations and action spaces work read the\n[environment documentation](docs/environment.md).\n\nNote that an alternative to this environment is now available which provides\nan enriched action and observation format using the C++ wrappers developed\nfor AlphaStar. See [the converter documentation](docs/converters.md) for more\ninformation.\n\n# Mini-game maps\n\nThe mini-game map files referenced in the paper are stored under `pysc2/maps/`\nbut must be installed in `$SC2PATH/Maps`. Make sure to follow the download\ninstructions above.\n\nMaps are configured in the Python files in `pysc2/maps/`. The configs can set\nplayer and time limits, whether to use the game outcome or curriculum score, and\na handful of other things. For more information about the maps, and how to\nconfigure your own, read the [maps documentation](docs/maps.md).\n\n# Replays\n\nA replay lets you review what happened during a game. You can see the actions\nand observations that each player made as they played.\n\nBlizzard is releasing a large number of anonymized 1v1 replays played on the\nladder. You can find instructions for how to get the\n[replay files](https://github.com/Blizzard/s2client-proto#downloads) on their\nsite. You can also review your own replays.\n\nReplays can be played back to get the observations and actions made during that\ngame. The observations are rendered at the resolution you request, so may differ\nfrom what the human actually saw. Similarly the actions specify a point, which\ncould reflect a different pixel on the human's screen, so may not have an exact\nmatch in our observations, though they should be fairly similar.\n\nReplays are version dependent, so a 3.16 replay will fail in a 3.16.1 or 3.17\nbinary.\n\nYou can visualize the replays with the full game, or with `pysc2.bin.play`.\nAlternatively you can run `pysc2.bin.replay_actions` to process many replays\nin parallel.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F000:09BF:B1881:2DF249:6AB92AAE"},"text_sha256":"b162e37f43fd3fa9ebf601e369bad10312e6c8ed052ba4095adf3e8289ca19fb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lmcinnes/umap","input_row":{"repository":"lmcinnes/umap","url":"https://github.com/lmcinnes/umap","name":"umap","owner":"lmcinnes","description":"Uniform Manifold Approximation and Projection","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":8262,"issues":846,"created_at":"2017-07-02T01:11:17Z","updated_at":"2026-09-26T14:09:59Z","first_commit_at":"2017-07-02T01:11:18Z","last_commit_at":"2026-09-24T20:08:01Z","activity_months":110.77,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:43.335Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lmcinnes/umap","visibility":"public","created_at":"2017-07-02T01:11:17Z","updated_at":"2026-09-26T14:09:59Z","private":false,"fork":false,"archived":false,"stargazers_count":8262,"open_issues_count":525,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2553","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:17E4FBD:1C08219:6AB92AAF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2552","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AE:E80A6:17A4CA2:1BC8018:6AB92AAF"},"commit":{"sha":"d80f3130679065aded11d37f9a117fe479f00227","url":"https://github.com/lmcinnes/umap/commit/d80f3130679065aded11d37f9a117fe479f00227","date":"2018-05-24T00:41:41Z","author_date":"2018-05-24T00:41:41Z","committer_date":"2018-05-24T00:41:41Z","tree_sha":"0dc841af9aa7e765ca7f085a04d011f0b7f6a1be","message_first_line":"Correct sparse correlation distance per issue #71"},"tree_request_status":200,"tree_rate":{"github_remaining":"2551","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0860:76AED:17F0A26:1C13E9A:6AB92AB0"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":9561,"blob_sha":"b3dd7c0a16738dc3eb3355d8723a27571b25e226","priority":0}],"documents":[{"path":"README.rst","size":9561,"blob_sha":"b3dd7c0a16738dc3eb3355d8723a27571b25e226","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/umap-learn.svg\n    :target: https://pypi.python.org/pypi/umap-learn/\n    :alt: PyPI Version\n.. image:: https://anaconda.org/conda-forge/umap-learn/badges/version.svg\n    :target: https://anaconda.org/conda-forge/umap-learn\n    :alt: Anaconda Version\n.. image:: https://img.shields.io/pypi/l/umap-learn.svg\n    :target: https://github.com/lmcinnes/umap/blob/master/LICENSE\n    :alt: License\n.. image:: https://travis-ci.org/lmcinnes/umap.svg\n    :target: https://travis-ci.org/lmcinnes/umap\n    :alt: Travis Build Status\n\n\n====\nUMAP\n====\n\nUniform Manifold Approximation and Projection (UMAP) is a dimension reduction\ntechnique that can be used for visualisation similarly to t-SNE, but also for\ngeneral non-linear dimension reduction. The algorithm is founded on three\nassumptions about the data\n\n1. The data is uniformly distributed on Riemannian manifold;\n2. The Riemannian metric is locally constant (or can be approximated as such);\n3. The manifold is locally connected.\n\nFrom these assumptions it is possible to model the manifold with a fuzzy\ntopological structure. The embedding is found by searching for a low dimensional\nprojection of the data that has the closest possible equivalent fuzzy\ntopological structure.\n\nThe details for the underlying mathematics can be found in\n`our paper on ArXiv <https://arxiv.org/abs/1802.03426>`_:\n\nMcInnes, L, Healy, J, *UMAP: Uniform Manifold Approximation and Projection\nfor Dimension Reduction*, ArXiv e-prints 1802.03426, 2018\n\n\nThe important thing is that you don't need to worry about that -- you can use\nUMAP right now for dimension reduction and visualisation as easily as a drop\nin replacement for scikit-learn's t-SNE.\n\n---------------\nHow to use UMAP\n---------------\n\nThe umap package inherits from sklearn classes, and thus drops in neatly\nnext to other sklearn transformers with an identical calling API.\n\n.. code:: python\n\n    import umap\n    from sklearn.datasets import load_digits\n\n    digits = load_digits()\n\n    embedding = umap.UMAP().fit_transform(digits.data)\n\nThere are a number of parameters that can be set for the UMAP class; the\nmajor ones are as follows:\n\n -  ``n_neighbors``: This determines the number of neighboring points used in\n    local approximations of manifold structure. Larger values will result in\n    more global structure being preserved at the loss of detailed local\n    structure. In general this parameter should often be in the range 5 to\n    50, with a choice of 10 to 15 being a sensible default.\n\n -  ``min_dist``: This controls how tightly the embedding is allowed compress\n    points together. Larger values ensure embedded points are more evenly\n    distributed, while smaller values allow the algorithm to optimise more\n    accurately with regard to local structure. Sensible values are in the\n    range 0.001 to 0.5, with 0.1 being a reasonable default.\n\n -  ``metric``: This determines the choice of metric used to measure distance\n    in the input space. A wide variety of metrics are already coded, and a user\n    defined function can be passed as long as it has been JITd by numba.\n\nAn example of making use of these options:\n\n.. code:: python\n\n    import umap\n    from sklearn.datasets import load_digits\n\n    digits = load_digits()\n\n    embedding = umap.UMAP(n_neighbors=5,\n                          min_dist=0.3,\n                          metric='correlation').fit_transform(digits.data)\n\nUMAP also supports fitting to sparse matrix data. This is currently\nexperimental and may be slower than the eventual final implementation.\n\nFurther details and tutorials are coming.\n\n----------------\nBenefits of UMAP\n----------------\n\nUMAP has a few signficant wins in its current incarnation.\n\nFirst of all UMAP is *fast*. It can handle large datasets and high\ndimensional data without too much difficulty, scaling beyond what most t-SNE\npackages can manage.\n\nSecond, UMAP scales well in embedding dimension -- it isn't just for\nvisualisation! You can use UMAP as a general purpose dimension reduction\ntechnique as a preliminary step to other machine learning tasks. With a\nlittle care (documentation on how to be careful is coming) it partners well\nwith the `hdbscan <https://github.com/scikit-learn-contrib/hdbscan>`_\nclustering library.\n\nThird, UMAP often performs better at preserving aspects of global structure of\nthe data than t-SNE. This means that it can often provide a better \"big\npicture\" view of your data as well as preserving local neighbor relations.\n\nFourth, UMAP supports a wide variety of distance functions, including\nnon-metric distance functions such as *cosine distance* and *correlation\ndistance*. You can finally embed word vectors properly using cosine distance!\n\nFinally UMAP has solid theoretical foundations in manifold learning (paper\nforthcoming). This both justifies the approach and allows for further\nextensions that will soon be added to the library (embedding dataframes,\nsemi-supervised dimension reduction, etc.).\n\n------------------------\nPerformance and Examples\n------------------------\n\nUMAP is very efficient at embedding large high dimensional datasets. In\nparticular it scales well with both input dimension and embedding dimension.\nThus, for a problem such as the 784-dimensional MNIST digits dataset with\n70000 data samples, UMAP can complete the embedding in around 2.5 minutes (as\ncompared with around 45 minutes for most t-SNE implementations). Despite this\nruntime efficiency UMAP still produces high quality embeddings.\n\nThe obligatory MNIST digits dataset, embedded in 2 minutes  and 22\nseconds using a 3.1 GHz Intel Core i7 processor (n_neighbors=10, min_dist=0\n.001):\n\n.. image:: images/umap_example_mnist1.png\n    :alt: UMAP embedding of MNIST digits\n\nThe MNIST digits dataset is fairly straightforward however. A better test is\nthe more recent \"Fashion MNIST\" dataset of images of fashion items (again\n70000 data sample in 784 dimensions). UMAP\nproduced this embedding in 2 minutes exactly (n_neighbors=5, min_dist=0.1):\n\n.. image:: images/umap_example_fashion_mnist1.png\n    :alt: UMAP embedding of \"Fashion MNIST\"\n\nThe UCI shuttle dataset (43500 sample in 8 dimensions) embeds well under\n*correlation* distance in 2 minutes and 39 seconds (note the longer time\nrequired for correlation distance computations):\n\n.. image:: images/umap_example_shuttle.png\n    :alt: UMAP embedding the UCI Shuttle dataset\n\n----------\nInstalling\n----------\n\nUMAP depends upon ``scikit-learn``, and thus ``scikit-learn``'s dependencies\nsuch as ``numpy`` and ``scipy``. UMAP adds a requirement for ``numba`` for\nperformance reasons. The original version used Cython, but the improved code\nclarity, simplicity and performance of Numba made the transition necessary.\n\nRequirements:\n\n* numpy\n* scipy\n* scikit-learn\n* numba\n\n**Install Options**\n\nConda install, via the excellent work of the conda-forge team:\n\n.. code:: bash\n\n    conda install -c conda-forge umap-learn\n    \nThe conda-forge packages are available for linux, OS X, and Windows 64 bit.\n\nPyPI install, presuming you have numba and sklearn and all its requirements\n(numpy and scipy) installed:\n\n.. code:: bash\n\n    pip install umap-learn\n\nIf pip is having difficulties pulling the dependencies then we'd suggest installing\nthe dependencies manually using anaconda followed by pulling umap from pip:\n\n.. code:: bash\n\n    conda install numpy scipy\n    conda install scikit-learn\n    conda install numba\n    pip install umap-learn\n\nFor a manual install get this package:\n\n.. code:: bash\n\n    wget https://github.com/lmcinnes/umap/archive/master.zip\n    unzip master.zip\n    rm master.zip\n    cd umap-master\n\nInstall the requirements\n\n.. code:: bash\n\n    sudo pip install -r requirements.txt\n\nor\n\n.. code:: bash\n\n    conda install scikit-learn numba\n\nInstall the package\n\n.. code:: bash\n\n    python setup.py install\n\n----------------\nHelp and Support\n----------------\n\nThis project is still very young. I am currently trying to get example\nnotebooks and documentation prepared, but it may be a while before those are\navailable. In the meantime please `open an issue <https://github.com/lmcinnes/umap/issues/new>`_\nand I will try to provide any help and guidance that I can. Please also check\nthe docstrings on the code, which provide some descriptions of the parameters.\n\n--------\nCitation\n--------\n\nIf you would like to cite this algorithm in your work the ArXiv paper is the\ncurrent reference:\n\n::\n\n   @article{2018arXivUMAP,\n        author = {{McInnes}, L. and {Healy}, J.},\n        title = \"{UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction}\",\n        journal = {ArXiv e-prints},\n        archivePrefix = \"arXiv\",\n        eprint = {1802.03426},\n        primaryClass = \"stat.ML\",\n        keywords = {Statistics - Machine Learning, Computer Science - Computational Geometry, Computer Science - Learning},\n        year = 2018,\n        month = feb,\n   }\n\n\n-------\nLicense\n-------\n\nThe umap package is 3-clause BSD licensed. Enjoy.\n\n------------\nContributing\n------------\n\nContributions are more than welcome! There are lots of opportunities\nfor potential projects, so please get in touch if you would like to\nhelp out. Everything from code to notebooks to\nexamples and documentation are all *equally valuable* so please don't feel\nyou can't contribute. To contribute please `fork the project <https://github.com/lmcinnes/umap/issues#fork-destination-box>`_ make your changes and\nsubmit a pull request. We will do our best to work through any issues with\nyou and get your code merged into the main branch.\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B2FC:3B7E2:170B6F:5D42AA:6AB92AAE"},"text_sha256":"cdc69e5218746a3a982c4dae37335af782cb69cd421f49e7c7382fd032a2c91c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2550","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D3:52542:17BD90F:1BE0C26:6AB92AB1"},"commit":{"sha":"e82ed0d457b566b043ef44f4007a7149b0daca74","url":"https://github.com/lmcinnes/umap/commit/e82ed0d457b566b043ef44f4007a7149b0daca74","date":"2026-06-06T20:52:47Z","author_date":"2026-06-06T20:52:47Z","committer_date":"2026-06-06T20:52:47Z","tree_sha":"449838adfd8cc1c197e3be850dd0f0d0d9b12a0a","message_first_line":"Merge pull request #1275 from sebastianbreguel/perf/fit-transform-ram"},"tree_request_status":200,"tree_rate":{"github_remaining":"2549","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0800:62B94:17BC3BC:1BDF3F4:6AB92AB1"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":22261,"blob_sha":"0d0dd9dbaa3c66fad2618b9d6f402aac83ddbd7a","priority":0}],"documents":[{"path":"README.rst","size":22261,"blob_sha":"0d0dd9dbaa3c66fad2618b9d6f402aac83ddbd7a","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n.. image:: doc/logo_large.png\n  :width: 600\n  :alt: UMAP logo\n  :align: center\n\n|pypi_version|_ |pypi_downloads|_\n\n|conda_version|_ |conda_downloads|_\n\n|License|_ |build_status|_ |Coverage|_\n\n|Docs|_ |joss_paper|_\n\n.. |pypi_version| image:: https://img.shields.io/pypi/v/umap-learn.svg\n.. _pypi_version: https://pypi.python.org/pypi/umap-learn/\n\n.. |pypi_downloads| image:: https://pepy.tech/badge/umap-learn/month\n.. _pypi_downloads: https://pepy.tech/project/umap-learn\n\n.. |conda_version| image:: https://anaconda.org/conda-forge/umap-learn/badges/version.svg\n.. _conda_version: https://anaconda.org/conda-forge/umap-learn\n\n.. |conda_downloads| image:: https://anaconda.org/conda-forge/umap-learn/badges/downloads.svg\n.. _conda_downloads: https://anaconda.org/conda-forge/umap-learn\n\n.. |License| image:: https://img.shields.io/pypi/l/umap-learn.svg\n.. _License: https://github.com/lmcinnes/umap/blob/master/LICENSE.txt\n\n.. |build_status| image:: https://dev.azure.com/TutteInstitute/build-pipelines/_apis/build/status/lmcinnes.umap?branchName=master\n.. _build_status: https://dev.azure.com/TutteInstitute/build-pipelines/_build/latest?definitionId=2&branchName=master\n\n.. |Coverage| image:: https://coveralls.io/repos/github/lmcinnes/umap/badge.svg\n.. _Coverage: https://coveralls.io/github/lmcinnes/umap\n\n.. |Docs| image:: https://readthedocs.org/projects/umap-learn/badge/?version=latest\n.. _Docs: https://umap-learn.readthedocs.io/en/latest/?badge=latest\n\n.. |joss_paper| image:: http://joss.theoj.org/papers/10.21105/joss.00861/status.svg\n.. _joss_paper: https://doi.org/10.21105/joss.00861\n\n====\nUMAP\n====\n\nUniform Manifold Approximation and Projection (UMAP) is a dimension reduction\ntechnique that can be used for visualisation similarly to t-SNE, but also for\ngeneral non-linear dimension reduction. The algorithm is founded on three\nassumptions about the data:\n\n1. The data is uniformly distributed on a Riemannian manifold;\n2. The Riemannian metric is locally constant (or can be approximated as such);\n3. The manifold is locally connected.\n\nFrom these assumptions it is possible to model the manifold with a fuzzy\ntopological structure. The embedding is found by searching for a low dimensional\nprojection of the data that has the closest possible equivalent fuzzy\ntopological structure.\n\nThe details for the underlying mathematics can be found in\n`our paper on ArXiv <https://arxiv.org/abs/1802.03426>`_:\n\nMcInnes, L, Healy, J, *UMAP: Uniform Manifold Approximation and Projection\nfor Dimension Reduction*, ArXiv e-prints 1802.03426, 2018\n\nA broader introduction to UMAP targetted the scientific community can be found \nin our `paper published in Nature Review Methods Primers  <https://doi.org/10.1038/s43586-024-00363-x>`_:\n\nHealy, J., McInnes, L. *Uniform manifold approximation and projection*. Nat Rev Methods \nPrimers 4, 82 (2024). \n\nA read only version of this paper can accessed via `link <https://rdcu.be/d0YZT>`_\n\nThe important thing is that you don't need to worry about that—you can use\nUMAP right now for dimension reduction and visualisation as easily as a drop\nin replacement for scikit-learn's t-SNE.\n\nDocumentation is `available via Read the Docs <https://umap-learn.readthedocs.io/>`_.\n\n**New: this package now also provides support for densMAP.** The densMAP algorithm augments UMAP\nto preserve local density information in addition to the topological structure of the data.\nDetails of this method are described in the following `paper <https://doi.org/10.1038/s41587-020-00801-7>`_:\n\nNarayan, A, Berger, B, Cho, H, *Assessing Single-Cell Transcriptomic Variability\nthrough Density-Preserving Data Visualization*, Nature Biotechnology, 2021\n\n----------\nInstalling\n----------\n\nUMAP depends upon ``scikit-learn``, and thus ``scikit-learn``'s dependencies\nsuch as ``numpy`` and ``scipy``. UMAP adds a requirement for ``numba`` for\nperformance reasons. The original version used Cython, but the improved code\nclarity, simplicity and performance of Numba made the transition necessary.\n\nRequirements:\n\n* Python 3.6 or greater\n* numpy\n* scipy\n* scikit-learn\n* numba\n* tqdm\n* `pynndescent <https://github.com/lmcinnes/pynndescent>`_\n\nRecommended packages:\n\n* For plotting\n   * matplotlib\n   * datashader\n   * holoviews\n* for Parametric UMAP\n   * tensorflow > 2.0.0\n\n**Install Options**\n\nConda install, via the excellent work of the conda-forge team:\n\n.. code:: bash\n\n    conda install -c conda-forge umap-learn\n\nThe conda-forge packages are available for Linux, OS X, and Windows 64 bit.\n\nPyPI install, presuming you have numba and sklearn and all its requirements\n(numpy and scipy) installed:\n\n.. code:: bash\n\n    pip install umap-learn\n\nIf you wish to use the plotting functionality you can use\n\n.. code:: bash\n\n    pip install umap-learn[plot]\n\nto install all the plotting dependencies.\n\nIf you wish to use Parametric UMAP, you need to install Tensorflow, which can be\ninstalled either using the instructions at https://www.tensorflow.org/install\n(recommended) or using\n\n.. code:: bash\n\n    pip install umap-learn[parametric_umap]\n\nfor a CPU-only version of Tensorflow.\n\nIf you're on an x86 processor, you can also optionally install `tbb`, which will\nprovide additional CPU optimizations:\n\n.. code:: bash\n\n    pip install umap-learn[tbb]\n\nIf pip is having difficulties pulling the dependencies then we'd suggest installing\nthe dependencies manually using anaconda followed by pulling umap from pip:\n\n.. code:: bash\n\n    conda install numpy scipy\n    conda install scikit-learn\n    conda install numba\n    pip install umap-learn\n\nFor a manual install get this package:\n\n.. code:: bash\n\n    wget https://github.com/lmcinnes/umap/archive/master.zip\n    unzip master.zip\n    rm master.zip\n    cd umap-master\n\nOptionally, install the requirements through Conda:\n\n.. code:: bash\n\n    conda install scikit-learn numba\n\nThen install the package\n\n.. code:: bash\n\n    python -m pip install -e .\n\n---------------\nHow to use UMAP\n---------------\n\nThe umap package inherits from sklearn classes, and thus drops in neatly\nnext to other sklearn transformers with an identical calling API.\n\n.. code:: python\n\n    import umap\n    from sklearn.datasets import load_digits\n\n    digits = load_digits()\n\n    embedding = umap.UMAP().fit_transform(digits.data)\n\nThere are a number of parameters that can be set for the UMAP class; the\nmajor ones are as follows:\n\n -  ``n_neighbors``: This determines the number of neighboring points used in\n    local approximations of manifold structure. Larger values will result in\n    more global structure being preserved at the loss of detailed local\n    structure. In general this parameter should often be in the range 5 to\n    50, with a choice of 10 to 15 being a sensible default.\n\n -  ``min_dist``: This controls how tightly the embedding is allowed compress\n    points together. Larger values ensure embedded points are more evenly\n    distributed, while smaller values allow the algorithm to optimise more\n    accurately with regard to local structure. Sensible values are in the\n    range 0.001 to 0.5, with 0.1 being a reasonable default.\n\n -  ``metric``: This determines the choice of metric used to measure distance\n    in the input space. A wide variety of metrics are already coded, and a user\n    defined function can be passed as long as it has been JITd by numba.\n\nAn example of making use of these options:\n\n.. code:: python\n\n    import umap\n    from sklearn.datasets import load_digits\n\n    digits = load_digits()\n\n    embedding = umap.UMAP(n_neighbors=5,\n                          min_dist=0.3,\n                          metric='correlation').fit_transform(digits.data)\n\nUMAP also supports fitting to sparse matrix data. For more details\nplease see `the UMAP documentation <https://umap-learn.readthedocs.io/>`_\n\n----------------\nBenefits of UMAP\n----------------\n\nUMAP has a few signficant wins in its current incarnation.\n\nFirst of all UMAP is *fast*. It can handle large datasets and high\ndimensional data without too much difficulty, scaling beyond what most t-SNE\npackages can manage. This includes very high dimensional sparse datasets. UMAP\nhas successfully been used directly on data with over a million dimensions.\n\nSecond, UMAP scales well in embedding dimension—it isn't just for\nvisualisation! You can use UMAP as a general purpose dimension reduction\ntechnique as a preliminary step to other machine learning tasks. With a\nlittle care it partners well with the `hdbscan\n<https://github.com/scikit-learn-contrib/hdbscan>`_ clustering library (for\nmore details please see `Using UMAP for Clustering\n<https://umap-learn.readthedocs.io/en/latest/clustering.html>`_).\n\nThird, UMAP often performs better at preserving some aspects of global structure\nof the data than most implementations of t-SNE. This means that it can often\nprovide a better \"big picture\" view of your data as well as preserving local neighbor\nrelations.\n\nFourth, UMAP supports a wide variety of distance functions, including\nnon-metric distance functions such as *cosine distance* and *correlation\ndistance*. You can finally embed word vectors properly using cosine distance!\n\nFifth, UMAP supports adding new points to an existing embedding via\nthe standard sklearn ``transform`` method. This means that UMAP can be\nused as a preprocessing transformer in sklearn pipelines.\n\nSixth, UMAP supports supervised and semi-supervised dimension reduction.\nThis means that if you have label information that you wish to use as\nextra information for dimension reduction (even if it is just partial\nlabelling) you can do that—as simply as providing it as the ``y``\nparameter in the fit method.\n\nSeventh, UMAP supports a variety of additional experimental features including: an\n\"inverse transform\" that can approximate a high dimensional sample that would map to\na given position in the embedding space; the ability to embed into non-euclidean\nspaces including hyperbolic embeddings, and embeddings with uncertainty; very\npreliminary support for embedding dataframes also exists.\n\nFinally, UMAP has solid theoretical foundations in manifold learning\n(see `our paper on ArXiv <https://arxiv.org/abs/1802.03426>`_).\nThis both justifies the approach and allows for further\nextensions that will soon be added to the library.\n\n------------------------\nPerformance and Examples\n------------------------\n\nUMAP is very efficient at embedding large high dimensional datasets. In\nparticular it scales well with both input dimension and embedding dimension.\nFor the best possible performance we recommend installing the nearest neighbor\ncomputation library `pynndescent <https://github.com/lmcinnes/pynndescent>`_ .\nUMAP will work without it, but if installed it will run faster, particularly on\nmulticore machines.\n\nFor a problem such as the 784-dimensional MNIST digits dataset with\n70000 data samples, UMAP can complete the embedding in under a minute (as\ncompared with around 45 minutes for scikit-learn's t-SNE implementation).\nDespite this runtime efficiency, UMAP still produces high quality embeddings.\n\nThe obligatory MNIST digits dataset, embedded in 42\nseconds (with pynndescent installed and after numba jit warmup)\nusing a 3.1 GHz Intel Core i7 processor (n_neighbors=10, min_dist=0.001):\n\n.. image:: images/umap_example_mnist1.png\n    :alt: UMAP embedding of MNIST digits\n\nThe MNIST digits dataset is fairly straightforward, however. A better test is\nthe more recent \"Fashion MNIST\" dataset of images of fashion items (again\n70000 data sample in 784 dimensions). UMAP\nproduced this embedding in 49 seconds (n_neighbors=5, min_dist=0.1):\n\n.. image:: images/umap_example_fashion_mnist1.png\n    :alt: UMAP embedding of \"Fashion MNIST\"\n\nThe UCI shuttle dataset (43500 sample in 8 dimensions) embeds well under\n*correlation* distance in 44 seconds (note the longer time\nrequired for correlation distance computations):\n\n.. image:: images/umap_example_shuttle.png\n    :alt: UMAP embedding the UCI Shuttle dataset\n\nThe following is a densMAP visualization of the MNIST digits dataset with 784 features\nbased on the same parameters as above (n_neighbors=10, min_dist=0.001). densMAP reveals\nthat the cluster corresponding to digit 1 is noticeably denser, suggesting that\nthere are fewer degrees of freedom in the images of 1 compared to other digits.\n\n.. image:: images/densmap_example_mnist.png\n    :alt: densMAP embedding of the MNIST dataset\n\n--------\nPlotting\n--------\n\nUMAP includes a subpackage ``umap.plot`` for plotting the results of UMAP embeddings.\nThis package needs to be imported separately since it has extra requirements\n(matplotlib, datashader and holoviews). It allows for fast and simple plotting and\nattempts to make sensible decisions to avoid overplotting and other pitfalls. An\nexample of use:\n\n.. code:: python\n\n    import umap\n    import umap.plot\n    from sklearn.datasets import load_digits\n\n    digits = load_digits()\n\n    mapper = umap.UMAP().fit(digits.data)\n    umap.plot.points(mapper, labels=digits.target)\n\nThe plotting package offers basic plots, as well as interactive plots with hover\ntools and various diagnostic plotting options. See the documentation for more details.\n\n---------------\nParametric UMAP\n---------------\n\nParametric UMAP provides support for training a neural network to learn a UMAP based\ntransformation of data. This can be used to support faster inference of new unseen\ndata, more robust inverse transforms, autoencoder versions of UMAP and\nsemi-supervised classification (particularly for data well separated by UMAP and very\nlimited amounts of labelled data). See the\n`documentation of Parametric UMAP <https://umap-learn.readthedocs.io/en/0.5dev/parametric_umap.html>`_\nor the\n`example notebooks <https://github.com/lmcinnes/umap/tree/master/notebooks/Parametric_UMAP>`_\nfor more.\n\n\n-------\ndensMAP\n-------\n\nThe densMAP algorithm augments UMAP to additionally preserve local density information\nin addition to the topological structure captured by UMAP. One can easily run densMAP\nusing the umap package by setting the ``densmap`` input flag:\n\n.. code:: python\n\n    embedding = umap.UMAP(densmap=True).fit_transform(data)\n\nThis functionality is built upon the densMAP `implementation <https://github.com/hhcho/densvis>`_ provided by the developers\nof densMAP, who also contributed to integrating densMAP into the umap package.\n\ndensMAP inherits all of the parameters of UMAP. The following is a list of additional\nparameters that can be set for densMAP:\n\n - ``dens_frac``: This determines the fraction of epochs (a value between 0 and 1) that will include the density-preservation term in the optimization objective. This parameter is set to 0.3 by default. Note that densMAP switches density optimization on after an initial phase of optimizing the embedding using UMAP.\n\n - ``dens_lambda``: This determines the weight of the density-preservation objective. Higher values prioritize density preservation, and lower values (closer to zero) prioritize the UMAP objective. Setting this parameter to zero reduces the algorithm to UMAP. Default value is 2.0.\n\n - ``dens_var_shift``: Regularization term added to the variance of local densities in the embedding for numerical stability. We recommend setting this parameter to 0.1, which consistently works well in many settings.\n\n - ``output_dens``: When this flag is True, the call to ``fit_transform`` returns, in addition to the embedding, the local radii (inverse measure of local density defined in the `densMAP paper <https://doi.org/10.1101/2020.05.12.077776>`_) for the original dataset and for the embedding. The output is a tuple ``(embedding, radii_original, radii_embedding)``. Note that the radii are log-transformed. If False, only the embedding is returned. This flag can also be used with UMAP to explore the local densities of UMAP embeddings. By default this flag is False.\n\nFor densMAP we recommend larger values of ``n_neighbors`` (e.g. 30) for reliable estimation of local density.\n\nAn example of making use of these options (based on a subsample of the mnist_784 dataset):\n\n.. code:: python\n\n    import umap\n    from sklearn.datasets import fetch_openml\n    from sklearn.utils import resample\n\n    digits = fetch_openml(name='mnist_784')\n    subsample, subsample_labels = resample(digits.data, digits.target, n_samples=7000,\n                                           stratify=digits.target, random_state=1)\n\n    embedding, r_orig, r_emb = umap.UMAP(densmap=True, dens_lambda=2.0, n_neighbors=30,\n                                         output_dens=True).fit_transform(subsample)\n\nSee `the documentation <https://umap-learn.readthedocs.io/en/0.5dev/densmap_demo.html>`_ for more details.\n\n\n---------------------------------\nGPU-Accelerated UMAP with torchdr\n---------------------------------\n\nFor GPU-accelerated UMAP computations, `torchdr <https://github.com/TorchDR/TorchDR>`_ provides a PyTorch-based implementation that significantly speed up the algorithm. \ntorchdr accelerates **every step** of the dimensionality reduction pipeline on GPU: kNN computation, affinity construction and embedding optimization.\n\nUsing torchdr with UMAP is straightforward:\n\n.. code:: python\n\n    from torchdr import UMAP as torchdrUMAP\n    \n    umap_gpu = torchdrUMAP(\n        n_neighbors=15,\n        min_dist=0.1,\n        n_components=2,\n        device='cuda'\n    )\n    embedding = umap_gpu.fit_transform(data-maps)\n\nFor more information and advanced usage, see the `torchdr documentation <https://torchdr.github.io/index.html>`_.\n\n\n----------------\nHelp and Support\n----------------\n\nDocumentation is at `Read the Docs <https://umap-learn.readthedocs.io/>`_.\nThe documentation `includes a FAQ <https://umap-learn.readthedocs.io/en/latest/faq.html>`_ that\nmay answer your questions. If you still have questions then please\n`open an issue <https://github.com/lmcinnes/umap/issues/new>`_\nand I will try to provide any help and guidance that I can.\n\n--------\nCitation\n--------\n\nIf you make use of this software for your work we would appreciate it if you\nwould cite the paper from the Journal of Open Source Software:\n\n.. code:: bibtex\n\n    @article{mcinnes2018umap-software,\n      title={UMAP: Uniform Manifold Approximation and Projection},\n      author={McInnes, Leland and Healy, John and Saul, Nathaniel and Grossberger, Lukas},\n      journal={The Journal of Open Source Software},\n      volume={3},\n      number={29},\n      pages={861},\n      year={2018}\n    }\n\nIf you would like to cite this algorithm in your work the ArXiv paper is the\ncurrent reference:\n\n.. code:: bibtex\n\n   @article{2018arXivUMAP,\n        author = {{McInnes}, L. and {Healy}, J. and {Melville}, J.},\n        title = \"{UMAP: Uniform Manifold Approximation\n        and Projection for Dimension Reduction}\",\n        journal = {ArXiv e-prints},\n        archivePrefix = \"arXiv\",\n        eprint = {1802.03426},\n        primaryClass = \"stat.ML\",\n        keywords = {Statistics - Machine Learning,\n                    Computer Science - Computational Geometry,\n                    Computer Science - Learning},\n        year = 2018,\n        month = feb,\n   }\n\nIf you found the Nature Primer introduction useful please cite the following reference:\n\n.. code:: bibtex\n\n    @article{Healy2024,\n      author={Healy, John\n      and McInnes, Leland},\n      title={Uniform manifold approximation and projection},\n      journal={Nature Reviews Methods Primers},\n      year={2024},\n      month={Nov},\n      day={21},\n      volume={4},\n      number={1},\n      pages={82},\n      abstract={Uniform manifold approximation and projection is a nonlinear dimension reduction method often used for visualizing data and as pre-processing for further machine-learning tasks such as clustering. In this Primer, we provide an introduction to the uniform manifold approximation and projection algorithm, the intuitions behind how it works, how best to apply it on data and how to interpret and understand results.},\n      issn={2662-8449},\n      doi={10.1038/s43586-024-00363-x},\n      url={https://doi.org/10.1038/s43586-024-00363-x}\n    }\n\nAdditionally, if you use the densMAP algorithm in your work please cite the following reference:\n\n.. code:: bibtex\n\n    @article {NBC2020,\n        author = {Narayan, Ashwin and Berger, Bonnie and Cho, Hyunghoon},\n        title = {Assessing Single-Cell Transcriptomic Variability through Density-Preserving Data Visualization},\n        journal = {Nature Biotechnology},\n        year = {2021},\n        doi = {10.1038/s41587-020-00801-7},\n        publisher = {Springer Nature},\n        URL = {https://doi.org/10.1038/s41587-020-00801-7},\n        eprint = {https://www.biorxiv.org/content/early/2020/05/14/2020.05.12.077776.full.pdf},\n    }\n\nIf you use the Parametric UMAP algorithm in your work please cite the following reference:\n\n.. code:: bibtex\n\n    @article {SMG2020,\n        author = {Sainburg, Tim and McInnes, Leland and Gentner, Timothy Q.},\n        title = {Parametric UMAP: learning embeddings with deep neural networks for representation and semi-supervised learning},\n        journal = {ArXiv e-prints},\n        archivePrefix = \"arXiv\",\n        eprint = {2009.12981},\n        primaryClass = \"stat.ML\",\n        keywords = {Statistics - Machine Learning,\n                    Computer Science - Computational Geometry,\n                    Computer Science - Learning},\n        year = 2020,\n        }\n\n\n-------\nLicense\n-------\n\nThe umap package is 3-clause BSD licensed.\n\nWe would like to note that the umap package makes heavy use of\nNumFOCUS sponsored projects, and would not be possible without\ntheir support of those projects, so please `consider contributing to NumFOCUS <https://www.numfocus.org/membership>`_.\n\n------------\nContributing\n------------\n\nContributions are more than welcome! There are lots of opportunities\nfor potential projects, so please get in touch if you would like to\nhelp out. Everything from code to notebooks to\nexamples and documentation are all *equally valuable* so please don't feel\nyou can't contribute. To contribute please\n`fork the project <https://github.com/lmcinnes/umap/issues#fork-destination-box>`_\nmake your changes and\nsubmit a pull request. We will do our best to work through any issues with\nyou and get your code merged into the main branch.\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:17F9C0:5E3022:6AB92AB1"},"text_sha256":"94d22bb5ebadf8f642ac9c6215d10f84eb50adaf38dac88e8d0a8cb2d26573c3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lanpa/tensorboardX","input_row":{"repository":"lanpa/tensorboardX","url":"https://github.com/lanpa/tensorboardX","name":"tensorboardX","owner":"lanpa","description":"tensorboard for pytorch (and chainer, mxnet, numpy, ...)","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7998,"issues":462,"created_at":"2017-06-13T13:54:19Z","updated_at":"2026-09-19T10:22:19Z","first_commit_at":"2017-06-13T13:49:55Z","last_commit_at":"2026-04-09T11:41:20Z","activity_months":105.84,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:46.818Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lanpa/tensorboardX","visibility":"public","created_at":"2017-06-13T13:54:19Z","updated_at":"2026-09-19T10:22:19Z","private":false,"fork":false,"archived":false,"stargazers_count":7998,"open_issues_count":92,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2548","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0903:156040:17CE48F:1BF0CDF:6AB92AB2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2547","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BC:7418C:181107C:1C34272:6AB92AB3"},"commit":{"sha":"f799385f6023c86933c501a030a4c03605e597f4","url":"https://github.com/lanpa/tensorboardX/commit/f799385f6023c86933c501a030a4c03605e597f4","date":"2018-05-22T18:41:24Z","author_date":"2018-05-22T18:41:24Z","committer_date":"2018-05-22T18:41:24Z","tree_sha":"1017c4a8712c9db6d0b204fcc8ea03740ee40aaa","message_first_line":"Show mock data for cputime and memory usage on tensorboard"},"tree_request_status":200,"tree_rate":{"github_remaining":"2546","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0828:3C4024:17FDD2C:1C20FEE:6AB92AB3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3907,"blob_sha":"420067f7be85a4f448f7916c20bf353fc239f6df","priority":0}],"documents":[{"path":"README.md","size":3907,"blob_sha":"420067f7be85a4f448f7916c20bf353fc239f6df","priority":0,"status":200,"text":"# tensorboardX\n\n[![Build Status](https://travis-ci.org/lanpa/tensorboard-pytorch.svg?branch=master)](https://travis-ci.org/lanpa/tensorboard-pytorch)\n[![PyPI version](https://badge.fury.io/py/tensorboardX.svg)](https://badge.fury.io/py/tensorboardX)\n[![Downloads](https://img.shields.io/badge/pip--downloads-5K+-brightgreen.svg)](https://bigquery.cloud.google.com/savedquery/966219917372:edb59a0d70c54eb687ab2a9417a778ee)\n[![Documentation Status](https://readthedocs.org/projects/tensorboard-pytorch/badge/?version=latest)](http://tensorboard-pytorch.readthedocs.io/en/latest/?badge=latest)\n\nWrite TensorBoard events with simple function call.\n\n* Support `scalar`, `image`, `histogram`, `audio`, `text`, `graph`, `onnx_graph`, `embedding`, `pr_curve` and `video` summaries.\n\n\n* [Demo](http://35.197.26.245:6006)\n\n* requirement for `demo_graph.py` is tensorboardX>=1.2 and pytorch>=0.4\n\n* [FAQ](https://github.com/lanpa/tensorboard-pytorch/wiki)\n\n## Install\n\nTested on anaconda2 / anaconda3, with PyTorch 0.4 / torchvision 0.2 / tensorboard 1.7.0\n\n`pip install tensorboardX`\n\nor build from source:\n\n`pip install git+https://github.com/lanpa/tensorboard-pytorch`\n\n\n## Example\n\n* Run the demo script: `python demo.py`\n* Use TensorBoard with `tensorboard --logdir runs`  (needs to install TensorFlow)\n\n```python\n# demo.py\n\nimport torch\nimport torchvision.utils as vutils\nimport numpy as np\nimport torchvision.models as models\nfrom torchvision import datasets\nfrom tensorboardX import SummaryWriter\n\nresnet18 = models.resnet18(False)\nwriter = SummaryWriter()\nsample_rate = 44100\nfreqs = [262, 294, 330, 349, 392, 440, 440, 440, 440, 440, 440]\n\nfor n_iter in range(100):\n\n    dummy_s1 = torch.rand(1)\n    dummy_s2 = torch.rand(1)\n    # data grouping by `slash`\n    writer.add_scalar('data/scalar1', dummy_s1[0], n_iter)\n    writer.add_scalar('data/scalar2', dummy_s2[0], n_iter)\n\n    writer.add_scalars('data/scalar_group', {'xsinx': n_iter * np.sin(n_iter),\n                                             'xcosx': n_iter * np.cos(n_iter),\n                                             'arctanx': np.arctan(n_iter)}, n_iter)\n\n    dummy_img = torch.rand(32, 3, 64, 64)  # output from network\n    if n_iter % 10 == 0:\n        x = vutils.make_grid(dummy_img, normalize=True, scale_each=True)\n        writer.add_image('Image', x, n_iter)\n\n        dummy_audio = torch.zeros(sample_rate * 2)\n        for i in range(x.size(0)):\n            # amplitude of sound should in [-1, 1]\n            dummy_audio[i] = np.cos(freqs[n_iter // 10] * np.pi * float(i) / float(sample_rate))\n        writer.add_audio('myAudio', dummy_audio, n_iter, sample_rate=sample_rate)\n\n        writer.add_text('Text', 'text logged at step:' + str(n_iter), n_iter)\n\n        for name, param in resnet18.named_parameters():\n            writer.add_histogram(name, param.clone().cpu().data.numpy(), n_iter)\n\n        # needs tensorboard 0.4RC or later\n        writer.add_pr_curve('xoxo', np.random.randint(2, size=100), np.random.rand(100), n_iter)\n\ndataset = datasets.MNIST('mnist', train=False, download=True)\nimages = dataset.test_data[:100].float()\nlabel = dataset.test_labels[:100]\n\nfeatures = images.view(100, 784)\nwriter.add_embedding(features, metadata=label, label_img=images.unsqueeze(1))\n\n# export scalar data to JSON for external processing\nwriter.export_scalars_to_json(\"./all_scalars.json\")\nwriter.close()\n```\n\n## Screenshots\n\n<img src=\"screenshots/Demo.gif\">\n\n## Tweaks\n\nTo add more ticks for the slider (show more image history), you can modify the hardcoded `event_accumulator` in `~/anaconda3/lib/python3.6/site-packages/tensorflow/tensorboard/backend/application.py` as you wish.\n\nFor `tensorflow-tensorboard` > 0.17 see https://github.com/lanpa/tensorboard-pytorch/issues/44\n\n## Reference\n\n* [TeamHG-Memex/tensorboard_logger](https://github.com/TeamHG-Memex/tensorboard_logger)\n* [dmlc/tensorboard](https://github.com/dmlc/tensorboard)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AC06:1A3D83:185E35:5E957D:6AB92AB3"},"text_sha256":"76bcab0d786114082994b93cc1a11accea2b4f5bc30543ec5e7872742c31b6c3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2545","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17B9CD0:1BDCC2C:6AB92AB4"},"commit":{"sha":"48a5f8aee532e086bebacfd0613260874e8899f9","url":"https://github.com/lanpa/tensorboardX/commit/48a5f8aee532e086bebacfd0613260874e8899f9","date":"2026-04-09T11:41:20Z","author_date":"2026-04-09T11:41:20Z","committer_date":"2026-04-09T11:41:20Z","tree_sha":"c8e398cc309bd51f4a29aa4bf2b1cd412174e45d","message_first_line":"Fix type hints: add py.typed marker and resolve mypy errors (#773)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2544","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DD:3C4024:17FDDE2:1C210E6:6AB92AB4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4646,"blob_sha":"2a381f8b38993fa989eb917492a718badec9c015","priority":0}],"documents":[{"path":"README.md","size":4646,"blob_sha":"2a381f8b38993fa989eb917492a718badec9c015","priority":0,"status":200,"text":"# tensorboardX\n\n[![PyPI version](https://badge.fury.io/py/tensorboardX.svg)](https://badge.fury.io/py/tensorboardX)\n[![Documentation Status](https://readthedocs.org/projects/tensorboardx/badge/?version=latest)](https://tensorboardx.readthedocs.io/en/latest/?badge=latest)\n[![Coverage Status](https://codecov.io/gh/lanpa/tensorboardX/branch/master/graph/badge.svg)](https://codecov.io/gh/lanpa/tensorboardX/)\n\nWrite TensorBoard events with simple function call.\n\nThe current release (v2.6.5) is tested with PyTorch 2.6 / torchvision 0.21.0 / tensorboard 2.19.0 on Python 3.10 to 3.13\n\n* Support `scalar`, `image`, `figure`, `histogram`, `audio`, `text`, `graph`, `onnx_graph`, `embedding`, `pr_curve`, `mesh`, `hyper-parameters`\n  and `video` summaries.\n\n* [FAQ](https://github.com/lanpa/tensorboardX/wiki)\n\n\n## Install\n\n`pip install tensorboardX`\n\nor build from source:\n\n`pip install 'git+https://github.com/lanpa/tensorboardX'`\n\nYou can optionally install [`crc32c`](https://github.com/ICRAR/crc32c) to speed up.\n\n`pip install crc32c`\n\nStarting from tensorboardX 2.1, You need to install `soundfile` for the `add_audio()` function (200x speedup).\n\n`pip install soundfile`\n\n## Example\n\n* Clone the files in https://github.com/lanpa/tensorboardX/tree/master/examples\n* Run the demo script: e.g. `python examples/demo.py`\n* Start TensorBoard with `tensorboard --logdir runs`  \n\n\n```python\n# demo.py\n\nimport torch\nimport torchvision.utils as vutils\nimport numpy as np\nimport torchvision.models as models\nfrom torchvision import datasets\nfrom tensorboardX import SummaryWriter\n\nresnet18 = models.resnet18(False)\nwriter = SummaryWriter()\nsample_rate = 44100\nfreqs = [262, 294, 330, 349, 392, 440, 440, 440, 440, 440, 440]\n\nfor n_iter in range(100):\n\n    dummy_s1 = torch.rand(1)\n    dummy_s2 = torch.rand(1)\n    # data grouping by `slash`\n    writer.add_scalar('data/scalar1', dummy_s1[0], n_iter)\n    writer.add_scalar('data/scalar2', dummy_s2[0], n_iter)\n\n    writer.add_scalars('data/scalar_group', {'xsinx': n_iter * np.sin(n_iter),\n                                             'xcosx': n_iter * np.cos(n_iter),\n                                             'arctanx': np.arctan(n_iter)}, n_iter)\n\n    dummy_img = torch.rand(32, 3, 64, 64)  # output from network\n    if n_iter % 10 == 0:\n        x = vutils.make_grid(dummy_img, normalize=True, scale_each=True)\n        writer.add_image('Image', x, n_iter)\n\n        dummy_audio = torch.zeros(sample_rate * 2)\n        for i in range(x.size(0)):\n            # amplitude of sound should in [-1, 1]\n            dummy_audio[i] = np.cos(freqs[n_iter // 10] * np.pi * float(i) / float(sample_rate))\n        writer.add_audio('myAudio', dummy_audio, n_iter, sample_rate=sample_rate)\n\n        writer.add_text('Text', 'text logged at step:' + str(n_iter), n_iter)\n\n        for name, param in resnet18.named_parameters():\n            writer.add_histogram(name, param.clone().cpu().data.numpy(), n_iter)\n\n        # needs tensorboard 0.4RC or later\n        writer.add_pr_curve('xoxo', np.random.randint(2, size=100), np.random.rand(100), n_iter)\n\ndataset = datasets.MNIST('mnist', train=False, download=True)\nimages = dataset.test_data[:100].float()\nlabel = dataset.test_labels[:100]\n\nfeatures = images.view(100, 784)\nwriter.add_embedding(features, metadata=label, label_img=images.unsqueeze(1))\n\n# export scalar data to JSON for external processing\nwriter.export_scalars_to_json(\"./all_scalars.json\")\nwriter.close()\n```\n\n## Screenshots\n\n<img src=\"screenshots/Demo.gif\">\n\n## Using TensorboardX with Comet\n\nTensorboardX now supports logging directly to [Comet](https://www.comet.com/site/products/ml-experiment-tracking/?utm_source=tensorboardx&utm_medium=partner&utm_campaign=partner_tensorboardx_2023). Comet is a **free** cloud based solution that allows you to automatically track, compare and explain your experiments. It adds a lot of functionality on top of tensorboard such as dataset management, diffing experiments, seeing the code that generated the results and more.\n\nThis works out of the box and just require an additional line of code. See a full code example in this [Colab Notebook](https://colab.research.google.com/drive/1cTO3tgZ03nuJQ8kOjZhEiwbB-45tV4lm?usp=sharing)\n\n<p align=\"center\">\n<img src=\"screenshots/comet.gif\" width=\"750\" height=\"400\">\n<\/p>\n\n## Tweaks\n\nTo add more ticks for the slider (show more image history), check https://github.com/lanpa/tensorboardX/issues/44 or \nhttps://github.com/tensorflow/tensorboard/pull/1138\n\n## Reference\n\n* [TeamHG-Memex/tensorboard_logger](https://github.com/TeamHG-Memex/tensorboard_logger)\n* [dmlc/tensorboard](https://github.com/dmlc/tensorboard)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D974:241B62:179692:5DCDB8:6AB92AB4"},"text_sha256":"4ed16b5dc984965542990916624351a539b90bf9702e5d88d1f1ef475d0fef38"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"alteryx/featuretools","input_row":{"repository":"alteryx/featuretools","url":"https://github.com/alteryx/featuretools","name":"featuretools","owner":"alteryx","description":"An open source python library for automated feature engineering","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":7685,"issues":1016,"created_at":"2017-09-08T22:15:17Z","updated_at":"2026-09-25T01:17:02Z","first_commit_at":"2017-09-09T02:26:18Z","last_commit_at":"2024-11-13T18:39:43Z","activity_months":86.159999999999997,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:49.291Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"alteryx/featuretools","visibility":"public","created_at":"2017-09-08T22:15:17Z","updated_at":"2026-09-25T01:17:02Z","private":false,"fork":false,"archived":false,"stargazers_count":7685,"open_issues_count":171,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2543","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F3:3203A7:1791E40:1BB4E80:6AB92AB5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2542","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:D83A35:FE18CC:6AB92AB5"},"commit":{"sha":"b75bc921f47950004ebd217bb166846cf77bb05f","url":"https://github.com/alteryx/featuretools/commit/b75bc921f47950004ebd217bb166846cf77bb05f","date":"2018-05-24T22:32:14Z","author_date":"2018-05-24T22:32:14Z","committer_date":"2018-05-24T22:32:14Z","tree_sha":"8163665160bffafaa3a331261083b9fc1bb07b6c","message_first_line":"Ensure relationship variables are the same underlying dtype (#155)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2541","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0879:2BC4E5:181FB18:1C42ACF:6AB92AB6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8663,"blob_sha":"f038d73fff6c25294d2cfaea548a7ac97b79b312","priority":0}],"documents":[{"path":"README.md","size":8663,"blob_sha":"f038d73fff6c25294d2cfaea548a7ac97b79b312","priority":0,"status":200,"text":"<p align=\"center\"> \n<img width=50% src=\"https://www.featuretools.com/wp-content/uploads/2017/12/FeatureLabs-Logo-Tangerine-800.png\" alt=\"Featuretools\" />\n<\/p>\n<p align=\"center\"> \n<i>\"One of the holy grails of machine learning is to automate more and more of the feature engineering process.\"<\/i> ― Pedro Domingos, <a href=\"https://bit.ly/things_to_know_ml\">A Few Useful Things to Know about Machine Learning<\/a>\n\n<\/p>\n\n\n\n[![Circle CI](https://circleci.com/gh/Featuretools/featuretools.svg?maxAge=2592000&style=shield)](https://circleci.com/gh/Featuretools/featuretools)\n[![Coverage Status](https://codecov.io/gh/Featuretools/featuretools/branch/master/graph/badge.svg)](https://codecov.io/gh/Featuretools/featuretools)\n[![PyPI version](https://badge.fury.io/py/featuretools.svg?maxAge=2592000)](https://badge.fury.io/py/featuretools)\n\n[Featuretools](https://www.featuretools.com) is a python library for automated feature engineering. See the [documentation](https://docs.featuretools.com) for more information.\n\n\n\n## Installation\nInstall with pip\n\n\tpip install featuretools\n\n## Example\nBelow is an example of using Deep Feature Synthesis (DFS) to perform automated feature engineering. In this example, we apply DFS to a multi-table dataset consisting of timestamped customer transactions.\n\n```python\n>> import featuretools as ft\n>> es = ft.demo.load_mock_customer(return_entityset=True)\n>> es\n```\n```\nEntityset: transactions\n  Entities:\n    customers (shape = [5, 3])\n    sessions (shape = [35, 4])\n    products (shape = [5, 2])\n    transactions (shape = [500, 5])\n  Relationships:\n    transactions.product_id -> products.product_id\n    transactions.session_id -> sessions.session_id\n    sessions.customer_id -> customers.customer_id\n```\n\nFeaturetools can automatically create a single table of features for any \"target entity\"\n```python\n>> feature_matrix, features_defs = ft.dfs(entityset=es, target_entity=\"customers\")\n>> feature_matrix.head(5)\n```\n\n```\n            zip_code  COUNT(transactions)  COUNT(sessions)  SUM(transactions.amount) MODE(sessions.device)  MIN(transactions.amount)  MAX(transactions.amount)  YEAR(join_date)  SKEW(transactions.amount)  DAY(join_date)                   ...                     SUM(sessions.MIN(transactions.amount))  MAX(sessions.SKEW(transactions.amount))  MAX(sessions.MIN(transactions.amount))  SUM(sessions.MEAN(transactions.amount))  STD(sessions.SUM(transactions.amount))  STD(sessions.MEAN(transactions.amount))  SKEW(sessions.MEAN(transactions.amount))  STD(sessions.MAX(transactions.amount))  NUM_UNIQUE(sessions.DAY(session_start))  MIN(sessions.SKEW(transactions.amount))\ncustomer_id                                                                                                                                                                                                                                  ...                                                                                                                                                                                                                                                                                                                                                                                                                                          \n1              60091                  131               10                  10236.77               desktop                      5.60                    149.95             2008                   0.070041               1                   ...                                                     169.77                                 0.610052                                   41.95                               791.976505                              175.939423                                 9.299023                                 -0.377150                                5.857976                                        1                                -0.395358\n2              02139                  122                8                   9118.81                mobile                      5.81                    149.15             2008                   0.028647              20                   ...                                                     114.85                                 0.492531                                   42.96                               596.243506                              230.333502                                10.925037                                  0.962350                                7.420480                                        1                                -0.470007\n3              02139                   78                5                   5758.24               desktop                      6.78                    147.73             2008                   0.070814              10                   ...                                                      64.98                                 0.645728                                   21.77                               369.770121                              471.048551                                 9.819148                                 -0.244976                               12.537259                                        1                                -0.630425\n4              60091                  111                8                   8205.28               desktop                      5.73                    149.56             2008                   0.087986              30                   ...                                                      83.53                                 0.516262                                   17.27                               584.673126                              322.883448                                13.065436                                 -0.548969                               12.738488                                        1                                -0.497169\n5              02139                   58                4                   4571.37                tablet                      5.91                    148.17             2008                   0.085883              19                   ...                                                      73.09                                 0.830112                                   27.46                               313.448942                              198.522508                                 8.950528                                  0.098885                                5.599228                                        1                                -0.396571\n\n[5 rows x 69 columns]\n```\nWe now have a feature vector for each customer that can be used for machine learning. See the [documentation on Deep Feature Synthesis](https://docs.featuretools.com/automated_feature_engineering/afe.html) for more examples.\n\n## Demos\n**Predict Next Purchase**\n\n[Repository](https://github.com/Featuretools/predict_next_purchase/) | [Notebook](https://github.com/Featuretools/predict_next_purchase/blob/master/Tutorial.ipynb)\n\nIn this demonstration, we use a multi-table dataset of 3 million online grocery orders from Instacart to predict what a customer will buy next. We show how to generate features with automated feature engineering and build an accurate machine learning pipeline using Featuretools, which can be reused for multiple prediction problems. For more advanced users, we show how to scale that pipeline to a large dataset using Dask.\n\nFor more examples of how to use Featuretools, check out our [demos](https://www.featuretools.com/demos) page.\n\n## Support\nThe Featuretools community is happy to provide support to users of Featuretools. Project support can be found in four places depending on the type of question:\n\n1. For usage questions, use [Stack Overflow](https://stackoverflow.com/questions/tagged/featuretools) with the `featuretools` tag.\n2. For bugs, issues, or feature requests start a [Github issue](https://github.com/featuretools/featuretools/issues).\n3. For discussion regarding development on the core library, use [gitter](https://gitter.im/featuretools/featuretools).\n4. For everything else, the core developers can be reached by email at help@featuretools.com.\n\n\n## Feature Labs\n\n\n<a href=\"https://www.featurelabs.com/\">\n    <img src=\"http://www.featurelabs.com/wp-content/uploads/2017/12/logo.png\" alt=\"Featuretools\" />\n<\/a>\n\n\nFeaturetools was created by the developers at [Feature Labs](https://www.featurelabs.com/). If building impactful data science pipelines is important to you or your business, please [get in touch](https://www.featurelabs.com/contact.html).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"95D6:4F9CC:170852:5D3CB0:6AB92AB5"},"text_sha256":"60c7191ed27bed5f9f969af4587a792b542e5bf37aa2937aed168442e79e8142"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2540","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081C:0BA1:D83AD6:FE198A:6AB92AB6"},"commit":{"sha":"938a0f6ccb98eaf21eca89830a25be2358a75db7","url":"https://github.com/alteryx/featuretools/commit/938a0f6ccb98eaf21eca89830a25be2358a75db7","date":"2024-11-13T18:39:43Z","author_date":"2024-11-13T18:39:43Z","committer_date":"2024-11-13T18:39:43Z","tree_sha":"7ad74b7960c5af391077bc7baaf15de8ed4d0b25","message_first_line":"Deactivate GitHub Action that triggers LG tests in Airflow (#2757)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2539","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082C:7307A:17B6E54:1BD9C72:6AB92AB7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11163,"blob_sha":"cfa7d6050cb1453eccfe5e735d6664898b0c947f","priority":0}],"documents":[{"path":"README.md","size":11163,"blob_sha":"cfa7d6050cb1453eccfe5e735d6664898b0c947f","priority":0,"status":200,"text":"<p align=\"center\">\n<img width=50% src=\"https://www.featuretools.com/wp-content/uploads/2017/12/FeatureLabs-Logo-Tangerine-800.png\" alt=\"Featuretools\" />\n<\/p>\n<p align=\"center\">\n<i>\"One of the holy grails of machine learning is to automate more and more of the feature engineering process.\"<\/i> ― Pedro Domingos, <a href=\"https://bit.ly/things_to_know_ml\">A Few Useful Things to Know about Machine Learning<\/a>\n<\/p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/alteryx/featuretools/actions/workflows/tests_with_latest_deps.yaml\" alt=\"Tests\" target=\"_blank\">\n        <img src=\"https://github.com/alteryx/featuretools/actions/workflows/tests_with_latest_deps.yaml/badge.svg?branch=main\" alt=\"Tests\" />\n    <\/a>\n    <a href=\"https://codecov.io/gh/alteryx/featuretools\">\n        <img src=\"https://codecov.io/gh/alteryx/featuretools/branch/main/graph/badge.svg\"/>\n    <\/a>\n    <a href='https://featuretools.alteryx.com/en/stable/?badge=stable'>\n        <img src='https://readthedocs.com/projects/feature-labs-inc-featuretools/badge/?version=stable' alt='Documentation Status' />\n    <\/a>\n    <a href=\"https://badge.fury.io/py/featuretools\" target=\"_blank\">\n        <img src=\"https://badge.fury.io/py/featuretools.svg?maxAge=2592000\" alt=\"PyPI Version\" />\n    <\/a>\n    <a href=\"https://anaconda.org/conda-forge/featuretools\" target=\"_blank\">\n        <img src=\"https://anaconda.org/conda-forge/featuretools/badges/version.svg\" alt=\"Anaconda Version\" />\n    <\/a>\n    <a href=\"https://stackoverflow.com/questions/tagged/featuretools\" target=\"_blank\">\n        <img src=\"http://img.shields.io/badge/questions-on_stackoverflow-blue.svg\" alt=\"StackOverflow\" />\n    <\/a>\n    <a href=\"https://pepy.tech/project/featuretools\" target=\"_blank\">\n        <img src=\"https://static.pepy.tech/badge/featuretools/month\" alt=\"PyPI Downloads\" />\n    <\/a>\n<\/p>\n<hr>\n\n[Featuretools](https://www.featuretools.com) is a python library for automated feature engineering. See the [documentation](https://docs.featuretools.com) for more information.\n\n## Installation\nInstall with pip\n\n```\npython -m pip install featuretools\n```\n\nor from the Conda-forge channel on [conda](https://anaconda.org/conda-forge/featuretools):\n\n```\nconda install -c conda-forge featuretools\n```\n\n### Add-ons\n\nYou can install add-ons individually or all at once by running:\n\n```\npython -m pip install \"featuretools[complete]\"\n```\n\n**Premium Primitives** - Use Premium Primitives from the premium-primitives repo\n\n```\npython -m pip install \"featuretools[premium]\"\n```\n\n**NLP Primitives** - Use Natural Language Primitives from the nlp-primitives repo\n\n```\npython -m pip install \"featuretools[nlp]\"\n```\n\n**Dask Support** - Use Dask to run DFS with njobs > 1\n\n```\npython -m pip install \"featuretools[dask]\"\n```\n\n## Example\nBelow is an example of using Deep Feature Synthesis (DFS) to perform automated feature engineering. In this example, we apply DFS to a multi-table dataset consisting of timestamped customer transactions.\n\n```python\n>> import featuretools as ft\n>> es = ft.demo.load_mock_customer(return_entityset=True)\n>> es.plot()\n```\n\n<img src=\"https://github.com/alteryx/featuretools/blob/main/docs/source/_static/images/entity_set.png?raw=true\" width=\"350\">\n\nFeaturetools can automatically create a single table of features for any \"target dataframe\"\n```python\n>> feature_matrix, features_defs = ft.dfs(entityset=es, target_dataframe_name=\"customers\")\n>> feature_matrix.head(5)\n```\n\n```\n            zip_code  COUNT(transactions)  COUNT(sessions)  SUM(transactions.amount) MODE(sessions.device)  MIN(transactions.amount)  MAX(transactions.amount)  YEAR(join_date)  SKEW(transactions.amount)  DAY(join_date)                   ...                     SUM(sessions.MIN(transactions.amount))  MAX(sessions.SKEW(transactions.amount))  MAX(sessions.MIN(transactions.amount))  SUM(sessions.MEAN(transactions.amount))  STD(sessions.SUM(transactions.amount))  STD(sessions.MEAN(transactions.amount))  SKEW(sessions.MEAN(transactions.amount))  STD(sessions.MAX(transactions.amount))  NUM_UNIQUE(sessions.DAY(session_start))  MIN(sessions.SKEW(transactions.amount))\ncustomer_id                                                                                                                                                                                                                                  ...\n1              60091                  131               10                  10236.77               desktop                      5.60                    149.95             2008                   0.070041               1                   ...                                                     169.77                                 0.610052                                   41.95                               791.976505                              175.939423                                 9.299023                                 -0.377150                                5.857976                                        1                                -0.395358\n2              02139                  122                8                   9118.81                mobile                      5.81                    149.15             2008                   0.028647              20                   ...                                                     114.85                                 0.492531                                   42.96                               596.243506                              230.333502                                10.925037                                  0.962350                                7.420480                                        1                                -0.470007\n3              02139                   78                5                   5758.24               desktop                      6.78                    147.73             2008                   0.070814              10                   ...                                                      64.98                                 0.645728                                   21.77                               369.770121                              471.048551                                 9.819148                                 -0.244976                               12.537259                                        1                                -0.630425\n4              60091                  111                8                   8205.28               desktop                      5.73                    149.56             2008                   0.087986              30                   ...                                                      83.53                                 0.516262                                   17.27                               584.673126                              322.883448                                13.065436                                 -0.548969                               12.738488                                        1                                -0.497169\n5              02139                   58                4                   4571.37                tablet                      5.91                    148.17             2008                   0.085883              19                   ...                                                      73.09                                 0.830112                                   27.46                               313.448942                              198.522508                                 8.950528                                  0.098885                                5.599228                                        1                                -0.396571\n\n[5 rows x 69 columns]\n```\nWe now have a feature vector for each customer that can be used for machine learning. See the [documentation on Deep Feature Synthesis](https://featuretools.alteryx.com/en/stable/getting_started/afe.html) for more examples.\n\nFeaturetools contains many different types of built-in primitives for creating features. If the primitive you need is not included, Featuretools also allows you to [define your own custom primitives](https://featuretools.alteryx.com/en/stable/getting_started/primitives.html#defining-custom-primitives).\n\n## Demos\n**Predict Next Purchase**\n\n[Repository](https://github.com/alteryx/open_source_demos/blob/main/predict-next-purchase/) | [Notebook](https://github.com/alteryx/open_source_demos/blob/main/predict-next-purchase/Tutorial.ipynb)\n\nIn this demonstration, we use a multi-table dataset of 3 million online grocery orders from Instacart to predict what a customer will buy next. We show how to generate features with automated feature engineering and build an accurate machine learning pipeline using Featuretools, which can be reused for multiple prediction problems. For more advanced users, we show how to scale that pipeline to a large dataset using Dask.\n\nFor more examples of how to use Featuretools, check out our [demos](https://www.featuretools.com/demos) page.\n\n## Testing & Development\n\nThe Featuretools community welcomes pull requests. Instructions for testing and development are available [here.](https://featuretools.alteryx.com/en/stable/install.html#development)\n\n## Support\nThe Featuretools community is happy to provide support to users of Featuretools. Project support can be found in four places depending on the type of question:\n\n1. For usage questions, use [Stack Overflow](https://stackoverflow.com/questions/tagged/featuretools) with the `featuretools` tag.\n2. For bugs, issues, or feature requests start a [Github issue](https://github.com/alteryx/featuretools/issues).\n3. For discussion regarding development on the core library, use [Slack](https://join.slack.com/t/alteryx-oss/shared_invite/zt-182tyvuxv-NzIn6eiCEf8TBziuKp0bNA).\n4. For everything else, the core developers can be reached by email at open_source_support@alteryx.com\n\n## Citing Featuretools\n\nIf you use Featuretools, please consider citing the following paper:\n\nJames Max Kanter, Kalyan Veeramachaneni. [Deep feature synthesis: Towards automating data science endeavors.](https://dai.lids.mit.edu/wp-content/uploads/2017/10/DSAA_DSM_2015.pdf) *IEEE DSAA 2015*.\n\nBibTeX entry:\n\n```bibtex\n@inproceedings{kanter2015deep,\n  author    = {James Max Kanter and Kalyan Veeramachaneni},\n  title     = {Deep feature synthesis: Towards automating data science endeavors},\n  booktitle = {2015 {IEEE} International Conference on Data Science and Advanced Analytics, DSAA 2015, Paris, France, October 19-21, 2015},\n  pages     = {1--10},\n  year      = {2015},\n  organization={IEEE}\n}\n```\n\n## Built at Alteryx\n\n**Featuretools** is an open source project maintained by [Alteryx](https://www.alteryx.com). To see the other open source projects we’re working on visit [Alteryx Open Source](https://www.alteryx.com/open-source). If building impactful data science pipelines is important to you or your business, please get in touch.\n\n<p align=\"center\">\n  <a href=\"https://www.alteryx.com/open-source\">\n    <img src=\"https://alteryx-oss-web-images.s3.amazonaws.com/OpenSource_Logo-01.png\" alt=\"Alteryx Open Source\" width=\"800\"/>\n  <\/a>\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17C68C:5DFD67:6AB92AB5"},"text_sha256":"321e75c68d869e35f37845ebe9f9a70c68fd98402db48e081f25a7d0dc3c4a40"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"probml/pyprobml","input_row":{"repository":"probml/pyprobml","url":"https://github.com/probml/pyprobml","name":"pyprobml","owner":"probml","description":"Python code for \"Probabilistic Machine learning\" book by Kevin Murphy","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7153,"issues":463,"created_at":"2016-08-17T16:42:24Z","updated_at":"2026-09-27T11:45:25Z","first_commit_at":"2016-08-17T16:42:25Z","last_commit_at":"2026-02-26T17:33:54Z","activity_months":114.31999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:51.962Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"probml/pyprobml","visibility":"public","created_at":"2016-08-17T16:42:24Z","updated_at":"2026-09-27T11:45:25Z","private":false,"fork":false,"archived":false,"stargazers_count":7153,"open_issues_count":40,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2538","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0862:7307A:17B6EB3:1BD9CED:6AB92AB8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2537","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17C1058:1BE385A:6AB92AB8"},"commit":{"sha":"ad4da62139371acdc1377f4aa1590216976be3d8","url":"https://github.com/probml/pyprobml/commit/ad4da62139371acdc1377f4aa1590216976be3d8","date":"2018-04-23T05:23:49Z","author_date":"2018-04-23T05:23:49Z","committer_date":"2018-04-23T05:23:49Z","tree_sha":"958bbc72a43489f78980de5a758f4fb42a996987","message_first_line":"added provenance for some of the python demos that were translated from matlab"},"tree_request_status":200,"tree_rate":{"github_remaining":"2536","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17CE7C0:1BF10A7:6AB92AB8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":538,"blob_sha":"cde7cb548c444c82d463bdc2a661d66242966d7d","priority":0}],"documents":[{"path":"README.md","size":538,"blob_sha":"cde7cb548c444c82d463bdc2a661d66242966d7d","priority":0,"status":200,"text":"# pyprobml\nPython 3 code for \"Machine learning: a probabilistic perspective\" (http://people.cs.ubc.ca/~murphyk/MLbook/).\n\nYou should run the code from the repo root ('pyprobml' directory)\nusing module execution, e.g.,\n\npython -m examples.LMSdemo\n\nTo run all the examples you can use\n\nls examples/*.py | sed 's/\\//./' | sed s/\\.[^\\.]*$// | xargs -n 1 python -m\n\nfrom the repo root. This lists all the Python files under examples, turns the slash into a\nperiod, then removes the .py extension and finally feeds each line into python -m. \n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2D34:3AC15:17F356:5E2939:6AB92AB8"},"text_sha256":"a8783e2d03df155525e94a03fd3672a21dffde08651670dd8a42f86b831faaa9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2535","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:1780259:1BA1A09:6AB92AB9"},"commit":{"sha":"d1ea4122dcf3c2a2c02eb4e05343203b26440827","url":"https://github.com/probml/pyprobml/commit/d1ea4122dcf3c2a2c02eb4e05343203b26440827","date":"2026-02-26T17:33:54Z","author_date":"2026-02-26T17:33:54Z","committer_date":"2026-02-26T17:33:54Z","tree_sha":"6ad11be080b945b5327f8f89a4645c16b0674fe8","message_first_line":"book1 logo"},"tree_request_status":200,"tree_rate":{"github_remaining":"2534","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:17D01AD:1BF314C:6AB92AB9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5098,"blob_sha":"bcd2f6f37c326aec2b0ea4152cb02ad35933c6bf","priority":0}],"documents":[{"path":"README.md","size":5098,"blob_sha":"bcd2f6f37c326aec2b0ea4152cb02ad35933c6bf","priority":0,"status":200,"text":"# pyprobml\n\n<img src=\"https://img.shields.io/github/stars/probml/pyprobml?style=social\">\n\n\nPython 3 code to reproduce the figures in the books\n[Probabilistic Machine Learning: An Introduction](https://probml.github.io/pml-book/book1.html) (aka \"book 1\")\nand\n[Probabilistic Machine Learning: Advanced Topics](https://probml.github.io/pml-book/book2.html)\n(aka \"book 2\").\nThe code uses the standard Python libraries, such as numpy, scipy, matplotlib, sklearn,  etc.\nSome of the code (especially in book 2) also uses [JAX](https://github.com/google/jax),\nand in some parts of book 1, we also use  [Tensorflow 2](https://github.com/tensorflow/tensorflow)\nand a little bit of [Torch](https://github.com/pytorch).\nSee also [probml-utils](https://github.com/probml/probml-utils) for some utility code that is shared across multiple notebooks.\n\nFor the latest status of the code,\nsee [Book 1 dashboard](https://github.com/probml/pyprobml/blob/workflow_testing_indicator/dashboard_figures_book1.md)\nand [Book 2 dashboard](https://github.com/probml/pyprobml/blob/workflow_testing_indicator/dashboard_figures_book2.md).\nAs of September 2022, this code is now in maintenance mode.\n\n\n\n## Running the notebooks\n\n\nThe notebooks needed to make all the figures are available at the following locations.\n\n* [All notebooks (sorted by filename)](https://probml.github.io/notebooks)\n* [Book 1 notebooks (sorted by chapter)](https://github.com/probml/pyprobml/tree/master/notebooks/book1)\n* [Book 2 notebooks (sorted by chapter)](https://github.com/probml/pyprobml/tree/master/notebooks/book2). \n\n\n\n### Running notebooks in colab\n\n[Colab](https://colab.research.google.com/notebooks/intro.ipynb) has most of the libraries you will need (e.g., scikit-learn,  JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a \n[colab intro](https://colab.research.google.com/github/probml/pyprobml/blob/master/notebooks/tutorials/colab_intro.ipynb)\nnotebook with more details. To run the notebooks on colab in any browser, you can go to a particular notebook on GitHub and change the domain from `github.com` to `githubtocolab.com` as suggested [here](https://stackoverflow.com/a/67344477/13330701). If you are using Google Chrome browser, you can use [\"Open in Colab\" Chrome extension](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) to do the same with a single click.\n\n## Running the notebooks locally \n\nWe assume you have already installed [JAX](https://github.com/google/jax#installation) and\n[Tensorflow](https://www.tensorflow.org/install) and [Torch](https://pytorch.org/),\nsince the details on how to do this depend on whether you have a CPU, GPU, etc.\n\nYou can use any of the following options to install the other requirements.\n\n* Option 1\n\n```bash\npip install -r https://raw.githubusercontent.com/probml/pyprobml/master/requirements.txt\n```\n\n* Option 2\n\nDownload [requirements.txt](https://github.com/probml/pyprobml/blob/master/requirements.txt) locally to your path and run\n\n```bash\npip install -r requirements.txt\n```\n\n* Option 3\n\nRun the following. (Note the `--depth 1` prevents installing the whole history, which is very large).\n```\ngit clone --depth 1 https://github.com/probml/pyprobml.git\n```\nThen install manually.\n\nIf you want to save the figures, you first need to execute something like this\n```\n#export FIG_DIR=\"/teamspace/studios/this_studio/figures\"\n\nimport os\nos.environ[\"FIG_DIR\"] = \"/teamspace/studios/this_studio/pyprobml/notebooks/figures\"\nos.environ[\"DUAL_SAVE\"] = \"1\" # both pdf and png\n```\nThis is used by the [savefig](https://github.com/probml/probml-utils/blob/main/probml_utils/plotting.py#L78) function\nto store pdf files.\n\n\n## Cloud computing\n\nWhen you want more power or control than colab gives you,\nI recommend you use\nhttps://lightning.ai/docs/overview/studios,\nwhich makes it very easy to develop using VScode, running on a VM accessed from your  web browser;\nyou can then launch on one or more GPUs when needed with a single button click.\nAlternatively, if you are a power user, you can try Google Cloud Platform, which supports GPUs and TPUs;\nsee this [short tutorial on Colab, GCP and TPUs](https://github.com/probml/pyprobml/blob/master/notebooks/tutorials/colab_gcp_tpu_tutorial.md).\n\n\n## How to contribute\n\nSee [this guide](https://github.com/probml/pyprobml/blob/master/CONTRIBUTING.md) for how to contribute code. Please follow [these guidelines](https://github.com/probml/pyprobml/blob/master/notebooks/README.md) to contribute new notebooks to the notebooks directory.\n\n\n## Metrics\n\n[![Stargazers over time](https://starchart.cc/probml/pyprobml.svg)](https://starchart.cc/probml/pyprobml)\n\n## GSOC \n\nFor a summary of some of the contributions to this codebase during Google Summer of Code (GSOC),\nsee  these links: [2021](https://probml.github.io/pml-book/gsoc/gsoc2021.html)\nand [2022](https://probml.github.io/pml-book/gsoc/gsoc2022.html).\n\n\n\n\n\n<h2><a id=\"acknowledgements\"><\/a>Acknowledgements<\/h2>\n\nFor a list of contributors, see\n[this list](https://github.com/probml/pyprobml/graphs/contributors).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B4B8:29FD16:18341E:5E6B4C:6AB92ABA"},"text_sha256":"550fa3a67bb1ad4ca443a416e593c4cb49369c682baf80dd507ddcf95a55daed"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-learn-contrib/imbalanced-learn","input_row":{"repository":"scikit-learn-contrib/imbalanced-learn","url":"https://github.com/scikit-learn-contrib/imbalanced-learn","name":"imbalanced-learn","owner":"scikit-learn-contrib","description":" A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7120,"issues":621,"created_at":"2014-08-16T05:08:26Z","updated_at":"2026-09-27T12:18:57Z","first_commit_at":"2014-08-16T05:10:13Z","last_commit_at":"2026-06-07T21:27:59Z","activity_months":141.71000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:55.094Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-learn-contrib/imbalanced-learn","visibility":"public","created_at":"2014-08-16T05:08:26Z","updated_at":"2026-09-27T12:18:57Z","private":false,"fork":false,"archived":false,"stargazers_count":7120,"open_issues_count":95,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2533","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CC:76AED:17F1016:1C145B4:6AB92ABB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2532","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:17ECA37:1C0F7A6:6AB92ABB"},"commit":{"sha":"f4271d9fe180ffd93c4cd02481d6ffa0ec35652d","url":"https://github.com/scikit-learn-contrib/imbalanced-learn/commit/f4271d9fe180ffd93c4cd02481d6ffa0ec35652d","date":"2018-05-14T21:57:31Z","author_date":"2018-05-14T21:52:36Z","committer_date":"2018-05-14T21:57:31Z","tree_sha":"84f9c6f831b1a1059bf0e74ef121253f028d13e3","message_first_line":"DOC fix warning (#425)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2531","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DE:70FF5:17D02CF:1BF329E:6AB92ABB"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":8433,"blob_sha":"563a082cb93677d96e23d87584b906b45da696e2","priority":0}],"documents":[{"path":"README.rst","size":8433,"blob_sha":"563a082cb93677d96e23d87584b906b45da696e2","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n.. _scikit-learn: http://scikit-learn.org/stable/\n\n.. _scikit-learn-contrib: https://github.com/scikit-learn-contrib\n\n|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |PythonVersion|_ |Pypi|_ |Gitter|_\n\n.. |Travis| image:: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn.svg?branch=master\n.. _Travis: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn\n\n.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/c8w4xb7re4euntvi/branch/master?svg=true\n.. _AppVeyor: https://ci.appveyor.com/project/glemaitre/imbalanced-learn/history\n\n.. |Codecov| image:: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn/branch/master/graph/badge.svg\n.. _Codecov: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn\n\n.. |CircleCI| image:: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn.svg?style=shield&circle-token=:circle-token\n.. _CircleCI: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn/tree/master\n\n.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n.. _PythonVersion: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n\n.. |Pypi| image:: https://badge.fury.io/py/imbalanced-learn.svg\n.. _Pypi: https://badge.fury.io/py/imbalanced-learn\n\n.. |Gitter| image:: https://badges.gitter.im/scikit-learn-contrib/imbalanced-learn.svg\n.. _Gitter: https://gitter.im/scikit-learn-contrib/imbalanced-learn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\nimbalanced-learn\n================\n\nimbalanced-learn is a python package offering a number of re-sampling techniques\ncommonly used in datasets showing strong between-class imbalance.\nIt is compatible with scikit-learn_ and is part of scikit-learn-contrib_\nprojects.\n\nDocumentation\n-------------\n\nInstallation documentation, API documentation, and examples can be found on the\ndocumentation_.\n\n.. _documentation: http://contrib.scikit-learn.org/imbalanced-learn/\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\nimbalanced-learn is tested to work under Python 2.7 and Python 3.5, and\n3.6. The dependency requirements are based on the last scikit-learn release:\n\n* scipy(>=0.13.3)\n* numpy(>=1.8.2)\n* scikit-learn(>=0.19.0)\n\nAdditionally, to run the examples, you need matplotlib(>=2.0.0).\n\nInstallation\n~~~~~~~~~~~~\n\nimbalanced-learn is currently available on the PyPi's repository and you can\ninstall it via `pip`::\n\n  pip install -U imbalanced-learn\n\nThe package is release also in Anaconda Cloud platform::\n\n  conda install -c conda-forge imbalanced-learn\n\nIf you prefer, you can clone it and run the setup.py file. Use the following\ncommands to get a copy from GitHub and install all dependencies::\n\n  git clone https://github.com/scikit-learn-contrib/imbalanced-learn.git\n  cd imbalanced-learn\n  pip install .\n\nOr install using pip and GitHub::\n\n  pip install -U git+https://github.com/scikit-learn-contrib/imbalanced-learn.git\n\nTesting\n~~~~~~~\n\nAfter installation, you can use `nose` to run the test suite::\n\n  make coverage\n\nDevelopment\n-----------\n\nThe development of this scikit-learn-contrib is in line with the one\nof the scikit-learn community. Therefore, you can refer to their\n`Development Guide\n<http://scikit-learn.org/stable/developers>`_.\n\nAbout\n-----\n\nIf you use imbalanced-learn in a scientific publication, we would appreciate\ncitations to the following paper::\n\n  @article{JMLR:v18:16-365,\n  author  = {Guillaume  Lema{{\\^i}}tre and Fernando Nogueira and Christos K. Aridas},\n  title   = {Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning},\n  journal = {Journal of Machine Learning Research},\n  year    = {2017},\n  volume  = {18},\n  number  = {17},\n  pages   = {1-5},\n  url     = {http://jmlr.org/papers/v18/16-365}\n  }\n\nMost classification algorithms will only perform optimally when the number of\nsamples of each class is roughly the same. Highly skewed datasets, where the\nminority is heavily outnumbered by one or more classes, have proven to be a\nchallenge while at the same time becoming more and more common.\n\nOne way of addressing this issue is by re-sampling the dataset as to offset this\nimbalance with the hope of arriving at a more robust and fair decision boundary\nthan you would otherwise.\n\nRe-sampling techniques are divided in two categories:\n    1. Under-sampling the majority class(es).\n    2. Over-sampling the minority class.\n    3. Combining over- and under-sampling.\n    4. Create ensemble balanced sets.\n\nBelow is a list of the methods currently implemented in this module.\n\n* Under-sampling\n    1. Random majority under-sampling with replacement\n    2. Extraction of majority-minority Tomek links [1]_\n    3. Under-sampling with Cluster Centroids\n    4. NearMiss-(1 & 2 & 3) [2]_\n    5. Condensed Nearest Neighbour [3]_\n    6. One-Sided Selection [4]_\n    7. Neighboorhood Cleaning Rule [5]_\n    8. Edited Nearest Neighbours [6]_\n    9. Instance Hardness Threshold [7]_\n    10. Repeated Edited Nearest Neighbours [14]_\n    11. AllKNN [14]_\n\n* Over-sampling\n    1. Random minority over-sampling with replacement\n    2. SMOTE - Synthetic Minority Over-sampling Technique [8]_\n    3. bSMOTE(1 & 2) - Borderline SMOTE of types 1 and 2 [9]_\n    4. SVM SMOTE - Support Vectors SMOTE [10]_\n    5. ADASYN - Adaptive synthetic sampling approach for imbalanced learning [15]_\n\n* Over-sampling followed by under-sampling\n    1. SMOTE + Tomek links [12]_\n    2. SMOTE + ENN [11]_\n\n* Ensemble sampling\n    1. EasyEnsemble [13]_\n    2. BalanceCascade [13]_\n\nThe different algorithms are presented in the sphinx-gallery_.\n\n.. _sphinx-gallery: http://contrib.scikit-learn.org/imbalanced-learn/stable/auto_examples/index.html\n\n\nReferences:\n-----------\n\n.. [1] : I. Tomek, “Two modifications of CNN,” In Systems, Man, and Cybernetics, IEEE Transactions on, vol. 6, pp 769-772, 2010.\n\n.. [2] : I. Mani, I. Zhang. “kNN approach to unbalanced data distributions: a case study involving information extraction,” In Proceedings of workshop on learning from imbalanced datasets, 2003.\n\n.. [3] : P. Hart, “The condensed nearest neighbor rule,” In Information Theory, IEEE Transactions on, vol. 14(3), pp. 515-516, 1968.\n\n.. [4] : M. Kubat, S. Matwin, “Addressing the curse of imbalanced training sets: one-sided selection,” In ICML, vol. 97, pp. 179-186, 1997.\n\n.. [5] : J. Laurikkala, “Improving identification of difficult small classes by balancing class distribution,” Springer Berlin Heidelberg, 2001.\n\n.. [6] : D. Wilson, “Asymptotic Properties of Nearest Neighbor Rules Using Edited Data,” In IEEE Transactions on Systems, Man, and Cybernetrics, vol. 2 (3), pp. 408-421, 1972.\n\n.. [7] : D. Smith, Michael R., Tony Martinez, and Christophe Giraud-Carrier. “An instance level analysis of data complexity.” Machine learning 95.2 (2014): 225-256.\n\n.. [8] : N. V. Chawla, K. W. Bowyer, L. O.Hall, W. P. Kegelmeyer, “SMOTE: synthetic minority over-sampling technique,” Journal of artificial intelligence research, 321-357, 2002.\n\n.. [9] : H. Han, W. Wen-Yuan, M. Bing-Huan, “Borderline-SMOTE: a new over-sampling method in imbalanced data sets learning,” Advances in intelligent computing, 878-887, 2005.\n\n.. [10] : H. M. Nguyen, E. W. Cooper, K. Kamei, “Borderline over-sampling for imbalanced data classification,” International Journal of Knowledge Engineering and Soft Data Paradigms, 3(1), pp.4-21, 2001.\n\n.. [11] : G. Batista, R. C. Prati, M. C. Monard. “A study of the behavior of several methods for balancing machine learning training data,” ACM Sigkdd Explorations Newsletter 6 (1), 20-29, 2004.\n\n.. [12] : G. Batista, B. Bazzan, M. Monard, [“Balancing Training Data for Automated Annotation of Keywords: a Case Study,” In WOB, 10-18, 2003.\n\n.. [13] : X. Y. Liu, J. Wu and Z. H. Zhou, “Exploratory Undersampling for Class-Imbalance Learning,” in IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), vol. 39, no. 2, pp. 539-550, April 2009.\n\n.. [14] : I. Tomek, “An Experiment with the Edited Nearest-Neighbor Rule,” IEEE Transactions on Systems, Man, and Cybernetics, vol. 6(6), pp. 448-452, June 1976.\n\n.. [15] : He, Haibo, Yang Bai, Edwardo A. Garcia, and Shutao Li. “ADASYN: Adaptive synthetic sampling approach for imbalanced learning,” In IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), pp. 1322-1328, 2008.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C82:18CDF1:178012:55FE94:6AB92ABA"},"text_sha256":"e002ab263ab84b759ced89068d9acd46275ffb57c652d59196579529fd705036"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2530","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0863:725A9:17D772C:1BFAE97:6AB92ABC"},"commit":{"sha":"8504e95f0160f61d1b617ca66f779646d2ee609e","url":"https://github.com/scikit-learn-contrib/imbalanced-learn/commit/8504e95f0160f61d1b617ca66f779646d2ee609e","date":"2026-06-07T21:27:59Z","author_date":"2026-06-07T21:27:59Z","committer_date":"2026-06-07T21:27:59Z","tree_sha":"af452de62e0f5c3d7e65fdc44a32dc97078152f2","message_first_line":"docs: Update the changelog"},"tree_request_status":200,"tree_rate":{"github_remaining":"2529","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E9:767EB:17F0267:1C13B90:6AB92ABD"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6068,"blob_sha":"6a75694cee3908b25230abcdf56b698ee58a3ab3","priority":0}],"documents":[{"path":"README.rst","size":6068,"blob_sha":"6a75694cee3908b25230abcdf56b698ee58a3ab3","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n.. _scikit-learn: http://scikit-learn.org/stable/\n\n.. _scikit-learn-contrib: https://github.com/scikit-learn-contrib\n\n|GitHubActions|_ |Codecov|_ |CircleCI|_ |PythonVersion|_ |Pypi|_ |Gitter|_ |Black|_\n\n.. |GitHubActions| image:: https://github.com/scikit-learn-contrib/imbalanced-learn/actions/workflows/tests.yml/badge.svg\n.. _GitHubActions: https://github.com/scikit-learn-contrib/imbalanced-learn/actions/workflows/tests.yml\n\n.. |Codecov| image:: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn/branch/master/graph/badge.svg\n.. _Codecov: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn\n\n.. |CircleCI| image:: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn.svg?style=shield\n.. _CircleCI: https://circleci.com/gh/scikit-learn-contrib/imbalanced-learn/tree/master\n\n.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n.. _PythonVersion: https://img.shields.io/pypi/pyversions/imbalanced-learn.svg\n\n.. |Pypi| image:: https://badge.fury.io/py/imbalanced-learn.svg\n.. _Pypi: https://badge.fury.io/py/imbalanced-learn\n\n.. |Gitter| image:: https://badges.gitter.im/scikit-learn-contrib/imbalanced-learn.svg\n.. _Gitter: https://gitter.im/scikit-learn-contrib/imbalanced-learn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n.. _Black: :target: https://github.com/psf/black\n\n.. |PythonMinVersion| replace:: 3.10\n.. |NumPyMinVersion| replace:: 1.25.2\n.. |SciPyMinVersion| replace:: 1.11.4\n.. |ScikitLearnMinVersion| replace:: 1.4.2\n.. |MatplotlibMinVersion| replace:: 3.7.3\n.. |PandasMinVersion| replace:: 2.0.3\n.. |TensorflowMinVersion| replace:: 2.16.1\n.. |KerasMinVersion| replace:: 3.3.3\n.. |SeabornMinVersion| replace:: 0.12.2\n.. |PytestMinVersion| replace:: 7.2.2\n\nimbalanced-learn\n================\n\nimbalanced-learn is a python package offering a number of re-sampling techniques\ncommonly used in datasets showing strong between-class imbalance.\nIt is compatible with scikit-learn_ and is part of scikit-learn-contrib_\nprojects.\n\nDocumentation\n-------------\n\nInstallation documentation, API documentation, and examples can be found on the\ndocumentation_.\n\n.. _documentation: https://imbalanced-learn.org/stable/\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\n`imbalanced-learn` requires the following dependencies:\n\n- Python (>= |PythonMinVersion|)\n- NumPy (>= |NumPyMinVersion|)\n- SciPy (>= |SciPyMinVersion|)\n- Scikit-learn (>= |ScikitLearnMinVersion|)\n- Pytest (>= |PytestMinVersion|)\n\nAdditionally, `imbalanced-learn` requires the following optional dependencies:\n\n- Pandas (>= |PandasMinVersion|) for dealing with dataframes\n- Tensorflow (>= |TensorflowMinVersion|) for dealing with TensorFlow models\n- Keras (>= |KerasMinVersion|) for dealing with Keras models\n\nThe examples will requires the following additional dependencies:\n\n- Matplotlib (>= |MatplotlibMinVersion|)\n- Seaborn (>= |SeabornMinVersion|)\n\nInstallation\n~~~~~~~~~~~~\n\nFrom PyPi or conda-forge repositories\n.....................................\n\nimbalanced-learn is currently available on the PyPi's repositories and you can\ninstall it via `pip`::\n\n  pip install -U imbalanced-learn\n\nThe package is release also in Anaconda Cloud platform::\n\n  conda install -c conda-forge imbalanced-learn\n\nFrom source available on GitHub\n...............................\n\nIf you prefer, you can clone it and run the setup.py file. Use the following\ncommands to get a copy from Github and install all dependencies::\n\n  git clone https://github.com/scikit-learn-contrib/imbalanced-learn.git\n  cd imbalanced-learn\n  pip install .\n\nBe aware that you can install in developer mode with::\n\n  pip install --no-build-isolation --editable .\n\nIf you wish to make pull-requests on GitHub, we advise you to install\npre-commit::\n\n  pip install pre-commit\n  pre-commit install\n\nTesting\n~~~~~~~\n\nAfter installation, you can use `pytest` to run the test suite::\n\n  make coverage\n\nDevelopment\n-----------\n\nThe development of this scikit-learn-contrib is in line with the one\nof the scikit-learn community. Therefore, you can refer to their\n`Development Guide\n<http://scikit-learn.org/stable/developers>`_.\n\nEndorsement of the Scientific Python Specification\n--------------------------------------------------\n\nWe endorse good practices from the Scientific Python Ecosystem Coordination (SPEC).\nThe full list of recommendations is available `here`_.\n\nSee below the list of recommendations that we endorse for the imbalanced-learn project.\n\n|SPEC 0 — Minimum Supported Dependencies|\n\n.. |SPEC 0 — Minimum Supported Dependencies| image:: https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038\n   :target: https://scientific-python.org/specs/spec-0000/\n\n.. _here: https://scientific-python.org/specs/\n\nAbout\n-----\n\nIf you use imbalanced-learn in a scientific publication, we would appreciate\ncitations to the following paper::\n\n  @article{JMLR:v18:16-365,\n  author  = {Guillaume  Lema{{\\^i}}tre and Fernando Nogueira and Christos K. Aridas},\n  title   = {Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning},\n  journal = {Journal of Machine Learning Research},\n  year    = {2017},\n  volume  = {18},\n  number  = {17},\n  pages   = {1-5},\n  url     = {http://jmlr.org/papers/v18/16-365}\n  }\n\nMost classification algorithms will only perform optimally when the number of\nsamples of each class is roughly the same. Highly skewed datasets, where the\nminority is heavily outnumbered by one or more classes, have proven to be a\nchallenge while at the same time becoming more and more common.\n\nOne way of addressing this issue is by re-sampling the dataset as to offset this\nimbalance with the hope of arriving at a more robust and fair decision boundary\nthan you would otherwise.\n\nYou can refer to the `imbalanced-learn`_ documentation to find details about\nthe implemented algorithms.\n\n.. _imbalanced-learn: https://imbalanced-learn.org/stable/user_guide.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C4C8:3A3DD:178923:5DC0BB:6AB92ABC"},"text_sha256":"ca382e5b8e3a3cda2139e4273af56910d83d69ad09a08bfdf156297fae717302"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"vespa-engine/vespa","input_row":{"repository":"vespa-engine/vespa","url":"https://github.com/vespa-engine/vespa","name":"vespa","owner":"vespa-engine","description":"The AI search platform","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":7111,"issues":1209,"created_at":"2016-06-03T20:54:20Z","updated_at":"2026-09-27T09:02:16Z","first_commit_at":"2016-06-15T21:09:44Z","last_commit_at":"2026-09-27T07:53:50Z","activity_months":123.37,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:39:58.214Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"vespa-engine/vespa","visibility":"public","created_at":"2016-06-03T20:54:20Z","updated_at":"2026-09-27T09:02:16Z","private":false,"fork":false,"archived":false,"stargazers_count":7111,"open_issues_count":251,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2528","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088B:14A1F2:180C546:1C2FA37:6AB92ABE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2527","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0924:6C6ED:17ECC1C:1C0F9DC:6AB92ABE"},"commit":{"sha":"874c375021f94368e36c61e9cb687c4bd46c7575","url":"https://github.com/vespa-engine/vespa/commit/874c375021f94368e36c61e9cb687c4bd46c7575","date":"2018-05-24T21:07:15Z","author_date":"2018-05-24T10:17:26Z","committer_date":"2018-05-24T21:07:15Z","tree_sha":"10f50074b7d6b4239c07c170fd6e1a46fe821e63","message_first_line":"Remove aries.spifly and asm-debug-all."},"tree_request_status":200,"tree_rate":{"github_remaining":"2526","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:1781845:1BA4C89:6AB92ABF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2403,"blob_sha":"89bd7d95e59da13f009bec050a4435b91ce0d11d","priority":0}],"documents":[{"path":"README.md","size":2403,"blob_sha":"89bd7d95e59da13f009bec050a4435b91ce0d11d","priority":0,"status":200,"text":"<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->\n# Vespa\nVespa is an engine for low-latency computation over large data sets.\nIt stores and indexes your data such that queries, selection and processing over the\ndata can be performed at serving time.\n\nThis README describes how to build and develop the Vespa engine. To get started, read the\n[quick start](http://docs.vespa.ai/documentation/vespa-quick-start.html), or find the full\ndocumentation at http://docs.vespa.ai/.\n\nCode licensed under the Apache 2.0 license. See [LICENSE](LICENSE) for terms.\n\nTravis-CI build status: [![Build Status](https://travis-ci.org/vespa-engine/vespa.svg?branch=master)](https://travis-ci.org/vespa-engine/vespa)\n\n## Get started developing\n\n### Setup build environment\nC++ building is supported on CentOS 7. The Java source can be built on any platform having Java 8 and Maven installed. \nWe recommend using the following environment: [Create C++ dev environment on CentOS using VirtualBox and Vagrant](vagrant/README.md).\nYou can also setup CentOS 7 natively and install the following build dependencies:\n\n    sudo yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo\n    sudo yum -y install epel-release centos-release-scl yum-utils\n    sudo yum -y install ccache \\\n        rpm-build\n    yum-builddep -y <vespa-source>/dist/vespa.spec\n\n### Build Java modules\n\n    export MAVEN_OPTS=\"-Xms128m -Xmx1024m\"\n    source /opt/rh/rh-maven33/enable\n    bash bootstrap.sh java\n    mvn -T <num-threads> install\n\n### Build C++ modules\nReplace `<build-dir>` with the name of the directory in which you'd like to build Vespa.\nReplace `<source-dir>` with the directory in which you've cloned/unpacked the source tree.\n\n    bash bootstrap-cpp.sh <source-dir> <build-dir>\n    cd <build-dir>\n    make -j <num-threads>\n    ctest3 -j <num-threads>\n\n### Create RPM packages\n    sh dist.sh VERSION && rpmbuild -ba ~/rpmbuild/SPECS/vespa-VERSION.spec\n\n\n## Run Vespa on a local machine\nA basic, single-node install is found in the \n[quick start](http://docs.vespa.ai/documentation/vespa-quick-start.html).\nFor multi-node and using Node Admin, read [node-admin/README.md](node-admin/README.md).\n\n## Write documentation\nUpdate user documentation at https://github.com/vespa-engine/documentation\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"58D2:09ED:E50C7:3F429C:6AB92AC1"},"text_sha256":"751a4993d0b29ef4572e3047a51530cf2bac984b05b89379d049ddb3c8ed0225"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2525","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:17F062A:1C14029:6AB92AC3"},"commit":{"sha":"88ea42f431255a54a672f7adcb77693c35cd98f0","url":"https://github.com/vespa-engine/vespa/commit/88ea42f431255a54a672f7adcb77693c35cd98f0","date":"2026-06-30T19:00:34Z","author_date":"2026-06-30T19:00:34Z","committer_date":"2026-06-30T19:00:34Z","tree_sha":"1fd13e742e91b192fbedda6c299bf9ed5bc9784d","message_first_line":"Merge pull request #37322 from vespa-engine/arnej/skip-wrapper-when-not-needed"},"tree_request_status":200,"tree_rate":{"github_remaining":"2524","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E3:72BD3:17F6F97:1C1A2F1:6AB92AC3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6905,"blob_sha":"0b4748193b2d63196ebe344c18a9791f441e57f2","priority":0},{"path":"SECURITY.md","size":1094,"blob_sha":"b0d248e1bc324374dd294d20f2b881c6d519858d","priority":1}],"documents":[{"path":"README.md","size":6905,"blob_sha":"0b4748193b2d63196ebe344c18a9791f441e57f2","priority":0,"status":200,"text":"<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://assets.vespa.ai/logos/Vespa-logo-green-RGB.svg\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://assets.vespa.ai/logos/Vespa-logo-dark-RGB.svg\">\n  <img alt=\"#Vespa\" width=\"200\" src=\"https://assets.vespa.ai/logos/Vespa-logo-dark-RGB.svg\" style=\"margin-bottom: 25px;\">\n<\/picture>\n<br/><br/>\n\n[![Build status](https://badge.buildkite.com/34f7cb35b91da4f929794c5fd7aa722fc15ca0224ad240270b.svg)](https://buildkite.com/vespaai/vespa-engine-vespa)\n![GitHub License](https://img.shields.io/github/license/vespa-engine/vespa)\n![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fcom%2Fyahoo%2Fvespa%2Fparent%2Fmaven-metadata.xml)\n\n\n\nSearch, make inferences in and organize vectors, tensors, text and structured data, at serving time and any scale.\n\nThis repository contains all the code required to build and run all of Vespa yourself,\nand where you can see all development as it happens.\nAll the content in this repository is licensed under the Apache 2.0 license.\n\nA new release of Vespa is made from this repository's master branch every morning CET Monday through Thursday.\n\n- Home page: [https://vespa.ai](https://vespa.ai)\n- Documentation: [https://docs.vespa.ai](https://docs.vespa.ai)\n- Continuous build: [https://factory.vespa.ai](https://factory.vespa.ai)\n- Run applications in the cloud for free: [vespa.ai/free-trial](https://vespa.ai/free-trial/)\n\n## Table of contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [Building](#building)\n- [License](#license)\n\n## Background\n\nUse cases such as search, recommendation and personalization need to select a subset of data in a large corpus,\nevaluate machine-learned models over the selected data, organize and aggregate it and return it, typically in less\nthan 100 milliseconds, all while the data corpus is continuously changing.\n\nThis is hard to do, especially with large data sets that need to be distributed over multiple nodes and evaluated in\nparallel. Vespa is a platform that performs these operations for you with high availability and performance.\nIt has been in development for many years and is used on several large internet services and apps which serve\nhundreds of thousands of queries from Vespa per second.\n\n## Install\n\nDeploy your Vespa applications to the cloud service: [console.vespa-cloud.com](https://console.vespa-cloud.com/),\nor run your own Vespa instance: [https://docs.vespa.ai/en/getting-started.html](https://docs.vespa.ai/en/getting-started.html)\n\n## Usage\n\n- The application created in the getting started guides linked above is fully functional and production-ready, but you may want to [add more nodes](https://docs.vespa.ai/en/multinode-systems.html) for redundancy.\n- See [developing applications](https://docs.vespa.ai/en/developer-guide.html) on adding your own Java components to your Vespa application.\n- [Vespa APIs](https://docs.vespa.ai/en/api.html) is useful to understand how to interface with Vespa\n- Explore the [sample applications](https://github.com/vespa-engine/sample-apps/tree/master)\n- Follow the [Vespa Blog](https://blog.vespa.ai/) for feature updates / use cases\n- Join the [Vespa Slack community](https://slack.vespa.ai/) to ask questions and share feedback\n\nFull documentation is at [https://docs.vespa.ai](https://docs.vespa.ai).\n\n## Contribute\n\nWe welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) to learn how to contribute.\n\nIf you want to contribute to the documentation, see\n[https://github.com/vespa-engine/documentation](https://github.com/vespa-engine/documentation)\n\n## Building\n\nYou do not need to build Vespa to use it, but if you want to contribute you need to be able to build the code.\nThis section explains how to build and test Vespa. To understand where to make changes, see [Code-map.md](Code-map.md).\nSome suggested improvements with pointers to code are in [TODO.md](TODO.md).\n\n### Development environment\n\nC++ and Java building is supported on AlmaLinux 8.\nThe Java source can also be built on any platform having Java 17 and Maven 3.8+ installed.\nUse the following guide to set up a complete development environment using Docker\nfor building Vespa, running unit tests and running system tests:\n[Vespa development on AlmaLinux 8](https://github.com/vespa-engine/docker-image-dev#vespa-development-on-almalinux-8).\n\n#### Java environment for Mac\n1. Install [JDK17](https://openjdk.org/projects/jdk/17/), \n   [Maven Version Manager](https://bitbucket.org/mjensen/mvnvm/src/master/) and [jEnv](https://www.jenv.be)\n   through [Homebrew](https://brew.sh/).\n```sh\nbrew install jenv mvnvm openjdk@17\n```\n\n2. For the system Java wrappers to find this JDK, symlink it with\n```sh\nsudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk\n```\n\n3. Follow \"Configure your shell\" in https://www.jenv.be. Configuration is shell specific. For `zsh` use the below commands:\n```sh\necho 'export PATH=\"$HOME/.jenv/bin:$PATH\"' >> ~/.zshrc\necho 'eval \"$(jenv init -)\"' >> ~/.zshrc\neval \"$(jenv init -)\"\njenv enable-plugin export\nexec $SHELL -l\n```\n\n4. Add JDK17 to jEnv\n```sh\njenv add $(/usr/libexec/java_home -v 17)\n```\n\n5. Verify configuration with Maven by executing below command in the root of the source code.\n   Output should refer to the JDK and Maven version specified in the [.java-version](.java-version) and [mvnvm.properties](mvnvm.properties).\n```sh\nmvn -v\n```\n\n### Build Java modules\n\n    export MAVEN_OPTS=\"-Xms128m -Xmx1024m\"\n    ./bootstrap.sh java\n    mvn install --threads 1C\n\nUse this if you only need to build the Java modules, otherwise follow the complete development guide above.\n\n### Run tests for shell scripts (on Mac)\nShell scripts are tested with [BATS](https://bats-core.readthedocs.io/en/stable/).\nTo run the tests locally, install the testing framework and its plugins.:\n```bash\nbrew install node\nsudo npm install -g bats bats-assert bats-support bats-mock\n```\nExport the `BATS_PLUGIN_PATH` environment variable to point to the global npm modules directory, which contains the BATS plugins:\n```bash\nexport BATS_PLUGIN_PATH=\"$(npm root -g)\"\n```\nThen run all tests with the following command (from the root of the repository):\n```bash\nbats -r .\n```\nTo run a specific test, use:\n```bash\nbats test_dir/test_name.bats\n```\nTests can also be run in IntelliJ IDEA with the [BashSupport Pro](https://plugins.jetbrains.com/plugin/13841-bashsupport-pro)\nplugin. Ensure the `BATS_PLUGIN_PATH` environment variable is exported before launching the IDE\nto avoid setting it in each run configuration.\n\n## License\n\nCode licensed under the Apache 2.0 license. See [LICENSE](LICENSE) for terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCF2:2E8679:17BFB8:5DF605:6AB92AC6"},"text_sha256":"a24aafe980fb6283e58724086206500c7078503ae8d4b3919047740867a91338"},{"path":"SECURITY.md","size":1094,"blob_sha":"b0d248e1bc324374dd294d20f2b881c6d519858d","priority":1,"status":200,"text":"# Vespa Security Policy\n\nVespa takes the security of our platform and the data of our users very seriously. We appreciate your efforts in helping us identify and address potential vulnerabilities.\n\n## Reporting a Vulnerability\n\nIf you believe you have discovered a security vulnerability in Vespa, please report it to us responsibly through our dedicated vulnerability disclosure program. \n\n**Please do not report security vulnerabilities through public channels like GitHub Issues or any other bug bounty- or vulnerability disclosure platforms other than what's referenced below.**\n\nTo submit a vulnerability report, please follow the guidelines outlined on our responsible disclosure page:\n\n[https://vespa.ai/responsible-disclosure/](https://vespa.ai/responsible-disclosure/)\n\nThis page provides detailed information on how to submit your report, what information to include, and our commitment to handling your report confidentially and responsibly.\n\n## Contact\n\nIf you have any questions or concerns about Vespa security, please contact us at [security@vespa.ai](mailto:security@vespa.ai).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CE02:326565:17ADDA:5DE713:6AB92AC6"},"text_sha256":"6c15e72b878c40bcbbf07734b3a604431b779eb1494e47c7966e19e4905e3957"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"NicolasHug/Surprise","input_row":{"repository":"NicolasHug/Surprise","url":"https://github.com/NicolasHug/Surprise","name":"Surprise","owner":"NicolasHug","description":"A Python scikit for building and analyzing recommender systems","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":6818,"issues":393,"created_at":"2016-10-23T14:59:38Z","updated_at":"2026-09-23T08:26:15Z","first_commit_at":"2015-02-12T13:52:09Z","last_commit_at":"2026-05-30T17:11:20Z","activity_months":135.52000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:07.157Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NicolasHug/Surprise","visibility":"public","created_at":"2016-10-23T14:59:38Z","updated_at":"2026-09-23T08:26:15Z","private":false,"fork":false,"archived":false,"stargazers_count":6818,"open_issues_count":80,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2523","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:17E7A3A:1C0AE66:6AB92AC7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2522","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C9:278AC2:185F2A2:1C829FE:6AB92AC7"},"commit":{"sha":"11bbff8da34f7edbd0db8bdeefa971b83e832095","url":"https://github.com/NicolasHug/Surprise/commit/11bbff8da34f7edbd0db8bdeefa971b83e832095","date":"2018-05-21T13:11:36Z","author_date":"2018-05-21T13:11:36Z","committer_date":"2018-05-21T13:11:36Z","tree_sha":"5b046724abb30dc1d227e5a08e4560d06a20a3f1","message_first_line":"Removed the offset attribute."},"tree_request_status":200,"tree_rate":{"github_remaining":"2521","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17B77F8:1BDA80E:6AB92AC7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11934,"blob_sha":"e07e0aefb706ff173293be6da9d1c95068a0767a","priority":0}],"documents":[{"path":"README.md","size":11934,"blob_sha":"e07e0aefb706ff173293be6da9d1c95068a0767a","priority":0,"status":200,"text":"[![GitHub version](https://badge.fury.io/gh/nicolashug%2FSurprise.svg)](https://badge.fury.io/gh/nicolashug%2FSurprise)\n[![Documentation Status](https://readthedocs.org/projects/surprise/badge/?version=stable)](http://surprise.readthedocs.io/en/stable/?badge=stable)\n[![Build Status](https://travis-ci.org/NicolasHug/Surprise.svg?branch=master)](https://travis-ci.org/NicolasHug/Surprise)\n[![python versions](https://img.shields.io/badge/python-2.7%2C%203.5%2C%203.6-blue.svg)](http://surpriselib.com)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n\nSurprise\n========\n\nOverview\n--------\n\n[Surprise](http://surpriselib.com) is a Python\n[scikit](https://www.scipy.org/scikits.html) building and analyzing recommender\nsystems.\n\n[Surprise](http://surpriselib.com) **was designed with the\nfollowing purposes in mind**:\n\n- Give users perfect control over their experiments. To this end, a strong\n  emphasis is laid on\n  [documentation](http://surprise.readthedocs.io/en/stable/index.html), which we\n  have tried to make as clear and precise as possible by pointing out every\n  detail of the algorithms.\n- Alleviate the pain of [Dataset\n  handling](http://surprise.readthedocs.io/en/stable/getting_started.html#load-a-custom-dataset).\n  Users can use both *built-in* datasets\n  ([Movielens](http://grouplens.org/datasets/movielens/),\n  [Jester](http://eigentaste.berkeley.edu/dataset/)), and their own *custom*\n  datasets.\n- Provide various ready-to-use [prediction\n  algorithms](http://surprise.readthedocs.io/en/stable/prediction_algorithms_package.html)\n  such as [baseline\n  algorithms](http://surprise.readthedocs.io/en/stable/basic_algorithms.html),\n  [neighborhood\n  methods](http://surprise.readthedocs.io/en/stable/knn_inspired.html), matrix\n  factorization-based (\n  [SVD](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD),\n  [PMF](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#unbiased-note),\n  [SVD++](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp),\n  [NMF](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)),\n  and [many\n  others](http://surprise.readthedocs.io/en/stable/prediction_algorithms_package.html).\n  Also, various [similarity\n  measures](http://surprise.readthedocs.io/en/stable/similarities.html)\n  (cosine, MSD, pearson...) are built-in.\n- Make it easy to implement [new algorithm\n  ideas](http://surprise.readthedocs.io/en/stable/building_custom_algo.html).\n- Provide tools to [evaluate](http://surprise.readthedocs.io/en/stable/model_selection.html),\n  [analyse](http://nbviewer.jupyter.org/github/NicolasHug/Surprise/tree/master/examples/notebooks/KNNBasic_analysis.ipynb/)\n  and\n  [compare](http://nbviewer.jupyter.org/github/NicolasHug/Surprise/blob/master/examples/notebooks/Compare.ipynb)\n  the algorithms performance. Cross-validation procedures can be run very\n  easily using powerful CV iterators (inspired by\n  [scikit-learn](http://scikit-learn.org/) excellent tools), as well as\n  [exhaustive search over a set of\n  parameters](http://surprise.readthedocs.io/en/stable/getting_started.html#tune-algorithm-parameters-with-gridsearchcv).\n\n\nThe name *SurPRISE* (roughly :) ) stands for Simple Python RecommendatIon\nSystem Engine.\n\n\nGetting started, example\n------------------------\n\nHere is a simple example showing how you can (down)load a dataset, split it for\n5-fold cross-validation, and compute the MAE and RMSE of the\n[SVD](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)\nalgorithm.\n\n\n```python\nfrom surprise import SVD\nfrom surprise import Dataset\nfrom surprise.model_selection import cross_validate\n\n# Load the movielens-100k dataset (download it if needed).\ndata = Dataset.load_builtin('ml-100k')\n\n# Use the famous SVD algorithm.\nalgo = SVD()\n\n# Run 5-fold cross-validation and print results.\ncross_validate(algo, data, measures=['RMSE', 'MAE'], cv=5, verbose=True)\n```\n\n**Output**:\n\n```\nEvaluating RMSE, MAE of algorithm SVD on 5 split(s).                       \n                                                                           \n            Fold 1  Fold 2  Fold 3  Fold 4  Fold 5  Mean    Std            \nRMSE        0.9311  0.9370  0.9320  0.9317  0.9391  0.9342  0.0032         \nMAE         0.7350  0.7375  0.7341  0.7342  0.7375  0.7357  0.0015         \nFit time    6.53    7.11    7.23    7.15    3.99    6.40    1.23           \nTest time   0.26    0.26    0.25    0.15    0.13    0.21    0.06 \n```\n\n[Surprise](http://surpriselib.com) can do **much** more (e.g,\n[GridSearchCV](http://surprise.readthedocs.io/en/stable/getting_started.html#tune-algorithm-parameters-with-gridsearchcv))!\nYou'll find [more usage\nexamples](http://surprise.readthedocs.io/en/stable/getting_started.html) in the\n[documentation ](http://surprise.readthedocs.io/en/stable/index.html).\n\n\nBenchmarks\n----------\n\nHere are the average RMSE, MAE and total execution time of various algorithms\n(with their default parameters) on a 5-fold cross-validation procedure. The\ndatasets are the [Movielens](http://grouplens.org/datasets/movielens/) 100k and\n1M datasets. The folds are the same for all the algorithms. All experiments are\nrun on a notebook with Intel Core i5 7th gen (2.5 GHz) and 8Go RAM.  The code\nfor generating these tables can be found in the [benchmark\nexample](https://github.com/NicolasHug/Surprise/tree/master/examples/benchmark.py).\n\n| [Movielens 100k](http://grouplens.org/datasets/movielens/100k)                                                                         |   RMSE |   MAE | Time    |\n|:---------------------------------------------------------------------------------------------------------------------------------------|-------:|------:|:--------|\n| [SVD](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)      |  0.934 | 0.737 | 0:00:11 |\n| [SVD++](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.92  | 0.722 | 0:09:03 |\n| [NMF](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)      |  0.963 | 0.758 | 0:00:15 |\n| [Slope One](http://surprise.readthedocs.io/en/stable/slope_one.html#surprise.prediction_algorithms.slope_one.SlopeOne)                 |  0.946 | 0.743 | 0:00:08 |\n| [k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBasic)                        |  0.98  | 0.774 | 0:00:10 |\n| [Centered k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNWithMeans)           |  0.951 | 0.749 | 0:00:10 |\n| [k-NN Baseline](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBaseline)            |  0.931 | 0.733 | 0:00:12 |\n| [Co-Clustering](http://surprise.readthedocs.io/en/stable/co_clustering.html#surprise.prediction_algorithms.co_clustering.CoClustering) |  0.963 | 0.753 | 0:00:03 |\n| [Baseline](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.baseline_only.BaselineOnly)   |  0.944 | 0.748 | 0:00:01 |\n| [Random](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.random_pred.NormalPredictor)    |  1.514 | 1.215 | 0:00:01 |\n\n\n| [Movielens 1M](http://grouplens.org/datasets/movielens/1m)                                                                             |   RMSE |   MAE | Time    |\n|:---------------------------------------------------------------------------------------------------------------------------------------|-------:|------:|:--------|\n| [SVD](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)      |  0.873 | 0.686 | 0:02:13 |\n| [SVD++](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.862 | 0.673 | 2:54:19 |\n| [NMF](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)      |  0.916 | 0.724 | 0:02:31 |\n| [Slope One](http://surprise.readthedocs.io/en/stable/slope_one.html#surprise.prediction_algorithms.slope_one.SlopeOne)                 |  0.907 | 0.715 | 0:02:31 |\n| [k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBasic)                        |  0.923 | 0.727 | 0:05:27 |\n| [Centered k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNWithMeans)           |  0.929 | 0.738 | 0:05:43 |\n| [k-NN Baseline](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBaseline)            |  0.895 | 0.706 | 0:05:55 |\n| [Co-Clustering](http://surprise.readthedocs.io/en/stable/co_clustering.html#surprise.prediction_algorithms.co_clustering.CoClustering) |  0.915 | 0.717 | 0:00:31 |\n| [Baseline](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.baseline_only.BaselineOnly)   |  0.909 | 0.719 | 0:00:19 |\n| [Random](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.random_pred.NormalPredictor)    |  1.504 | 1.206 | 0:00:19 |\n\n\nInstallation\n------------\n\nWith pip (you'll need [numpy](http://www.numpy.org/), and a C compiler. Windows\nusers might prefer using conda):\n\n    $ pip install numpy\n    $ pip install scikit-surprise\n\nWith conda:\n\n    $ conda install -c conda-forge scikit-surprise\n\nFor the latest version, you can also clone the repo and build the source\n(you'll first need [Cython](http://cython.org/) and\n[numpy](http://www.numpy.org/)):\n\n    $ pip install numpy cython\n    $ git clone https://github.com/NicolasHug/surprise.git\n    $ cd surprise\n    $ python setup.py install\n\nLicense\n-------\n\nThis project is licensed under the [BSD\n3-Clause](https://opensource.org/licenses/BSD-3-Clause) license, so it can be\nused for pretty much everything, including commercial applications. Please let\nus know how [Surprise](http://surpriselib.com) is useful to you!\n\nHere is a Bibtex entry if you ever need to cite Surprise in a research paper\n(please keep us posted, we would love to know if Surprise was helpful to you):\n\n    @Misc{Surprise,\n    author =   {Hug, Nicolas},\n    title =    { {S}urprise, a {P}ython library for recommender systems},\n    howpublished = {\\url{http://surpriselib.com}},\n    year = {2017}\n    }\n\nContributors\n------------\n\nThe following persons have contributed to [Surprise](http://surpriselib.com):\n\nОлег Демиденко, Charles-Emmanuel Dias, dmamylin, franckjay, Lukas Galke,\nPierre-François Gimenez, Nicolas Hug, Hengji Liu,  Maher Malaeb, Manoj K,\nNaturale0, nju-luke, Skywhat, David Stevens, Mike Lee Williams, Chenchen Xu,\nYaoZh1918.\n\nThanks a lot :) !\n\nContributing, feedback, contact\n-------------------------------\n\nAny kind of feedback/criticism would be greatly appreciated (software design,\ndocumentation, improvement ideas, spelling mistakes, etc...).\n\nIf you'd like to see some features or algorithms implemented in\n[Surprise](http://surpriselib.com), please let us know!\n\nPlease feel free to contribute (see\n[guidelines](https://github.com/NicolasHug/Surprise/blob/master/CONTRIBUTING.md))\nand send pull requests!\n\nFor bugs, issues or questions about [Surprise](http://surpriselib.com), you can\nuse the GitHub [project page](https://github.com/NicolasHug/Surprise) (please\ndon't send me emails as there would be no record for other users).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59A0:285814:172CDF:5D6546:6AB92AC7"},"text_sha256":"9e5671402de5257db8839990b2066e4cc8e12f84a3077c5af3f1c6dae91e8655"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2520","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:17ED506:1C0F6E5:6AB92AC8"},"commit":{"sha":"93e1c30f3b2d15bdd0f2c4c816fbfce59f000fad","url":"https://github.com/NicolasHug/Surprise/commit/93e1c30f3b2d15bdd0f2c4c816fbfce59f000fad","date":"2026-05-30T17:11:20Z","author_date":"2026-05-30T17:11:20Z","committer_date":"2026-05-30T17:11:20Z","tree_sha":"8e52967693b9d7ac129e6796948463571c8b66c2","message_first_line":"Have the CI build the platform-specific wheels. (#501)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2519","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:D845A7:FE2687:6AB92AC9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12693,"blob_sha":"f02c54e842b8f9cb7a43c38f383ef1e963e98816","priority":0}],"documents":[{"path":"README.md","size":12693,"blob_sha":"f02c54e842b8f9cb7a43c38f383ef1e963e98816","priority":0,"status":200,"text":"[![GitHub version](https://badge.fury.io/gh/nicolashug%2FSurprise.svg)](https://badge.fury.io/gh/nicolashug%2FSurprise)\n[![Documentation Status](https://readthedocs.org/projects/surprise/badge/?version=stable)](https://surprise.readthedocs.io/en/stable/?badge=stable)\n[![python versions](https://img.shields.io/badge/python-3.8+-blue.svg)](https://surpriselib.com)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02174/status.svg)](https://doi.org/10.21105/joss.02174)\n\n[![logo](./logo_black.svg)](https://surpriselib.com)\n\nOverview\n--------\n\n[Surprise](https://surpriselib.com) is a Python\n[scikit](https://projects.scipy.org/scikits.html) for building and analyzing\nrecommender systems that deal with explicit rating data.\n\n[Surprise](https://surpriselib.com) **was designed with the\nfollowing purposes in mind**:\n\n- Give users perfect control over their experiments. To this end, a strong\n  emphasis is laid on\n  [documentation](https://surprise.readthedocs.io/en/stable/index.html), which we\n  have tried to make as clear and precise as possible by pointing out every\n  detail of the algorithms.\n- Alleviate the pain of [Dataset\n  handling](https://surprise.readthedocs.io/en/stable/getting_started.html#load-a-custom-dataset).\n  Users can use both *built-in* datasets\n  ([Movielens](https://grouplens.org/datasets/movielens/),\n  [Jester](https://eigentaste.berkeley.edu/dataset/)), and their own *custom*\n  datasets.\n- Provide various ready-to-use [prediction\n  algorithms](https://surprise.readthedocs.io/en/stable/prediction_algorithms_package.html)\n  such as [baseline\n  algorithms](https://surprise.readthedocs.io/en/stable/basic_algorithms.html),\n  [neighborhood\n  methods](https://surprise.readthedocs.io/en/stable/knn_inspired.html), matrix\n  factorization-based (\n  [SVD](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD),\n  [PMF](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#unbiased-note),\n  [SVD++](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp),\n  [NMF](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)),\n  and [many\n  others](https://surprise.readthedocs.io/en/stable/prediction_algorithms_package.html).\n  Also, various [similarity\n  measures](https://surprise.readthedocs.io/en/stable/similarities.html)\n  (cosine, MSD, pearson...) are built-in.\n- Make it easy to implement [new algorithm\n  ideas](https://surprise.readthedocs.io/en/stable/building_custom_algo.html).\n- Provide tools to [evaluate](https://surprise.readthedocs.io/en/stable/model_selection.html),\n  [analyse](https://nbviewer.jupyter.org/github/NicolasHug/Surprise/tree/master/examples/notebooks/KNNBasic_analysis.ipynb/)\n  and\n  [compare](https://nbviewer.jupyter.org/github/NicolasHug/Surprise/blob/master/examples/notebooks/Compare.ipynb)\n  the algorithms' performance. Cross-validation procedures can be run very\n  easily using powerful CV iterators (inspired by\n  [scikit-learn](https://scikit-learn.org/) excellent tools), as well as\n  [exhaustive search over a set of\n  parameters](https://surprise.readthedocs.io/en/stable/getting_started.html#tune-algorithm-parameters-with-gridsearchcv).\n\n\nThe name *SurPRISE* (roughly :) ) stands for *Simple Python RecommendatIon\nSystem Engine*.\n\nPlease note that surprise does not support implicit ratings or content-based\ninformation.\n\n\nGetting started, example\n------------------------\n\nHere is a simple example showing how you can (down)load a dataset, split it for\n5-fold cross-validation, and compute the MAE and RMSE of the\n[SVD](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)\nalgorithm.\n\n\n```python\nfrom surprise import SVD\nfrom surprise import Dataset\nfrom surprise.model_selection import cross_validate\n\n# Load the movielens-100k dataset (download it if needed).\ndata = Dataset.load_builtin('ml-100k')\n\n# Use the famous SVD algorithm.\nalgo = SVD()\n\n# Run 5-fold cross-validation and print results.\ncross_validate(algo, data, measures=['RMSE', 'MAE'], cv=5, verbose=True)\n```\n\n**Output**:\n\n```\nEvaluating RMSE, MAE of algorithm SVD on 5 split(s).\n\n                  Fold 1  Fold 2  Fold 3  Fold 4  Fold 5  Mean    Std     \nRMSE (testset)    0.9367  0.9355  0.9378  0.9377  0.9300  0.9355  0.0029  \nMAE (testset)     0.7387  0.7371  0.7393  0.7397  0.7325  0.7375  0.0026  \nFit time          0.62    0.63    0.63    0.65    0.63    0.63    0.01    \nTest time         0.11    0.11    0.14    0.14    0.14    0.13    0.02    \n```\n\n[Surprise](https://surpriselib.com) can do **much** more (e.g,\n[GridSearchCV](https://surprise.readthedocs.io/en/stable/getting_started.html#tune-algorithm-parameters-with-gridsearchcv))!\nYou'll find [more usage\nexamples](https://surprise.readthedocs.io/en/stable/getting_started.html) in the\n[documentation ](https://surprise.readthedocs.io/en/stable/index.html).\n\n\nBenchmarks\n----------\n\nHere are the average RMSE, MAE and total execution time of various algorithms\n(with their default parameters) on a 5-fold cross-validation procedure. The\ndatasets are the [Movielens](https://grouplens.org/datasets/movielens/) 100k and\n1M datasets. The folds are the same for all the algorithms. All experiments are\nrun on a laptop with an intel i5 11th Gen 2.60GHz. The code\nfor generating these tables can be found in the [benchmark\nexample](https://github.com/NicolasHug/Surprise/tree/master/examples/benchmark.py).\n\n| [Movielens 100k](http://grouplens.org/datasets/movielens/100k)                                                                         |   RMSE |   MAE | Time    |\n|:---------------------------------------------------------------------------------------------------------------------------------------|-------:|------:|:--------|\n| [SVD](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)      |  0.934 | 0.737 | 0:00:06 |\n| [SVD++ (cache_ratings=False)](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.919 | 0.721 | 0:01:39 |\n| [SVD++ (cache_ratings=True)](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.919 | 0.721 | 0:01:22 |\n| [NMF](http://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)      |  0.963 | 0.758 | 0:00:06 |\n| [Slope One](http://surprise.readthedocs.io/en/stable/slope_one.html#surprise.prediction_algorithms.slope_one.SlopeOne)                 |  0.946 | 0.743 | 0:00:09 |\n| [k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBasic)                        |  0.98  | 0.774 | 0:00:08 |\n| [Centered k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNWithMeans)           |  0.951 | 0.749 | 0:00:09 |\n| [k-NN Baseline](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBaseline)            |  0.931 | 0.733 | 0:00:13 |\n| [Co-Clustering](http://surprise.readthedocs.io/en/stable/co_clustering.html#surprise.prediction_algorithms.co_clustering.CoClustering) |  0.963 | 0.753 | 0:00:06 |\n| [Baseline](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.baseline_only.BaselineOnly)   |  0.944 | 0.748 | 0:00:02 |\n| [Random](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.random_pred.NormalPredictor)    |  1.518 | 1.219 | 0:00:01 |\n\n\n| [Movielens 1M](https://grouplens.org/datasets/movielens/1m)                                                                             |   RMSE |   MAE | Time    |\n|:----------------------------------------------------------------------------------------------------------------------------------------|-------:|------:|:--------|\n| [SVD](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVD)      |  0.873 | 0.686 | 0:01:07 |\n| [SVD++ (cache_ratings=False)](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.862 | 0.672 | 0:41:06 |\n| [SVD++ (cache_ratings=True)](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.SVDpp)  |  0.862 | 0.672 | 0:34:55 |\n| [NMF](https://surprise.readthedocs.io/en/stable/matrix_factorization.html#surprise.prediction_algorithms.matrix_factorization.NMF)      |  0.916 | 0.723 | 0:01:39 |\n| [Slope One](http://surprise.readthedocs.io/en/stable/slope_one.html#surprise.prediction_algorithms.slope_one.SlopeOne)                 |  0.907 | 0.715 | 0:02:31 |\n| [k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBasic)                        |  0.923 | 0.727 | 0:05:27 |\n| [Centered k-NN](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNWithMeans)           |  0.929 | 0.738 | 0:05:43 |\n| [k-NN Baseline](http://surprise.readthedocs.io/en/stable/knn_inspired.html#surprise.prediction_algorithms.knns.KNNBaseline)            |  0.895 | 0.706 | 0:05:55 |\n| [Co-Clustering](http://surprise.readthedocs.io/en/stable/co_clustering.html#surprise.prediction_algorithms.co_clustering.CoClustering) |  0.915 | 0.717 | 0:00:31 |\n| [Baseline](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.baseline_only.BaselineOnly)   |  0.909 | 0.719 | 0:00:19 |\n| [Random](http://surprise.readthedocs.io/en/stable/basic_algorithms.html#surprise.prediction_algorithms.random_pred.NormalPredictor)    |  1.504 | 1.206 | 0:00:19 |\n\nInstallation\n------------\n\nWith pip:\n\n    $ pip install scikit-surprise\n\nWith conda:\n\n    $ conda install -c conda-forge scikit-surprise\n\nFor the latest version, you can also clone the repo and build the source\n(you'll first need [Cython](https://cython.org/) and\n[numpy](https://www.numpy.org/)):\n\n    $ git clone https://github.com/NicolasHug/surprise.git\n    $ cd surprise\n    $ pip install .\n\nLicense and reference\n---------------------\n\nThis project is licensed under the [BSD\n3-Clause](https://opensource.org/licenses/BSD-3-Clause) license, so it can be\nused for pretty much everything, including commercial applications.\n\nI'd love to know how Surprise is useful to you. Please don't hesitate to open\nan issue and describe how you use it!\n\nPlease make sure to cite the\n[paper](https://joss.theoj.org/papers/10.21105/joss.02174) if you use\nSurprise for your research:\n\n    @article{Hug2020,\n      doi = {10.21105/joss.02174},\n      url = {https://doi.org/10.21105/joss.02174},\n      year = {2020},\n      publisher = {The Open Journal},\n      volume = {5},\n      number = {52},\n      pages = {2174},\n      author = {Nicolas Hug},\n      title = {Surprise: A Python library for recommender systems},\n      journal = {Journal of Open Source Software}\n    }\n\nContributors\n------------\n\nThe following persons have contributed to [Surprise](https://surpriselib.com):\n\nashtou, Abhishek Bhatia, bobbyinfj, caoyi, Chieh-Han Chen,  Raphael-Dayan, Олег\nДемиденко, Charles-Emmanuel Dias, dmamylin, Lauriane Ducasse, Marc Feger,\nfranckjay, Lukas Galke, Tim Gates, Pierre-François Gimenez, Zachary Glassman,\nJeff Hale, Nicolas Hug, Janniks, jyesawtellrickson, Doruk Kilitcioglu, Ravi Raju\nKrishna, lapidshay, Hengji Liu, Ravi Makhija, Maher Malaeb, Manoj K, James\nMcNeilis, Naturale0, nju-luke, Pierre-Louis Pécheux, Jay Qi, Lucas Rebscher,\nCraig Rodrigues, Skywhat, Hercules Smith, David Stevens, Vesna Tanko,\nTrWestdoor, Victor Wang, Mike Lee Williams, Jay Wong, Chenchen Xu, YaoZh1918.\n\nThanks a lot :) !\n\nDevelopment Status\n------------------\n\nStarting from version 1.1.0 (September 2019), I will only maintain the package,\nprovide bugfixes, and perhaps sometimes perf improvements. I have less time to\ndedicate to it now, so I'm unabe to consider new features.\n\nFor bugs, issues or questions about [Surprise](https://surpriselib.com), please\navoid sending me emails; I will most likely not be able to answer). Please use\nthe GitHub [project page](https://github.com/NicolasHug/Surprise) instead, so\nthat others can also benefit from it.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A0B6:09ED:E5113:3F4382:6AB92AC7"},"text_sha256":"439dfc9d40b4927429050b9d43e9e1516c21d6bf0637794c944e2af50f09e6b6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cleverhans-lab/cleverhans","input_row":{"repository":"cleverhans-lab/cleverhans","url":"https://github.com/cleverhans-lab/cleverhans","name":"cleverhans","owner":"cleverhans-lab","description":"An adversarial example library for constructing attacks, building defenses, and benchmarking both","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6451,"issues":455,"created_at":"2016-09-15T00:28:04Z","updated_at":"2026-09-21T13:18:44Z","first_commit_at":"2016-09-15T00:28:05Z","last_commit_at":"2023-01-31T19:40:04Z","activity_months":76.540000000000006,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:09.796Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cleverhans-lab/cleverhans","visibility":"public","created_at":"2016-09-15T00:28:04Z","updated_at":"2026-09-21T13:18:44Z","private":false,"fork":false,"archived":false,"stargazers_count":6451,"open_issues_count":46,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2518","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0815:74C18:1806392:1C29BFE:6AB92AC9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2517","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:180DFFB:1C31165:6AB92ACA"},"commit":{"sha":"0e481f2fe7e44f05f5c2e35c1206d6d3f7fd2eda","url":"https://github.com/cleverhans-lab/cleverhans/commit/0e481f2fe7e44f05f5c2e35c1206d6d3f7fd2eda","date":"2018-05-23T23:26:26Z","author_date":"2018-05-23T23:26:26Z","committer_date":"2018-05-23T23:26:26Z","tree_sha":"0294bff571b0b61c3b5a731b01f6dfca1e156290","message_first_line":"Merge pull request #408 from AngusG/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2516","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17CAC97:1BEE246:6AB92ACA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9469,"blob_sha":"1333b68c2c36b58015743566db48658ededa6c9f","priority":0}],"documents":[{"path":"README.md","size":9469,"blob_sha":"1333b68c2c36b58015743566db48658ededa6c9f","priority":0,"status":200,"text":"# CleverHans (latest release: v2.1.0)\n\n<img src=\"https://github.com/tensorflow/cleverhans/blob/master/assets/logo.png?raw=true\" alt=\"cleverhans logo\">\n\n[![Build Status](https://travis-ci.org/tensorflow/cleverhans.svg?branch=master)](https://travis-ci.org/tensorflow/cleverhans)\n\nThis repository contains the source code for CleverHans, a Python library to\nbenchmark machine learning systems' vulnerability to\n[adversarial examples](http://karpathy.github.io/2015/03/30/breaking-convnets/).\nYou can learn more about such vulnerabilities on the accompanying [blog](http://cleverhans.io).\n\nThe CleverHans library is under continual development, always welcoming\n[contributions](https://github.com/tensorflow/cleverhans#contributing)\nof the latest attacks and defenses.\nIn particular, we always welcome help towards resolving the [issues](https://github.com/tensorflow/cleverhans/issues)\ncurrently open.\n\n## Setting up CleverHans\n\n### Dependencies\n\nThis library uses [TensorFlow](https://www.tensorflow.org/) to accelerate graph\ncomputations performed by many machine learning models.\nInstalling TensorFlow is therefore a pre-requisite.\n\nYou can find instructions\n[here](https://www.tensorflow.org/install/).\nFor better performance, it is also recommended to install TensorFlow\nwith GPU support (detailed instructions on how to do this are available\nin the TensorFlow installation documentation).\n\nInstalling TensorFlow will\ntake care of all other dependencies like `numpy` and `scipy`.\n\n### Installation\n\nOnce dependencies have been taken care of, you can install CleverHans using\n`pip` or by cloning this Github repository.\n\n#### `pip` installation\n\nIf you are installing CleverHans using `pip`, run the following command:\n\n```\npip install -e git+https://github.com/tensorflow/cleverhans.git#egg=cleverhans\n```\n\n#### Manual installation\n\nIf you are installing CleverHans manually, you need to install TensorFlow\nfirst. Then, run the following command to clone the CleverHans repository\ninto a folder of your choice:\n\n```\ngit clone https://github.com/tensorflow/cleverhans\n```\n\nOn UNIX machines, it is recommended to add your clone of this repository to the\n`PYTHONPATH` variable so as to be able to import `cleverhans` from any folder.\n\n```\nexport PYTHONPATH=\"/path/to/cleverhans\":$PYTHONPATH\n```\n\nYou may want to make that change permanent through your shell's profile.\n\n### Currently supported setups\n\nAlthough CleverHans is likely to work on many other machine configurations, we\ncurrently [test it](https://travis-ci.org/tensorflow/cleverhans) with Python\n{2.7, 3.5} and TensorFlow {1.0, 1.1} on Ubuntu 14.04.5 LTS (Trusty Tahr).\n\n## Tutorials\n\nTo help you get started with the functionalities provided by this library, the\n`cleverhans_tutorials/' folder comes with the following tutorials:\n* **MNIST with FGSM** ([code](cleverhans_tutorials/mnist_tutorial_tf.py)): this\ntutorial covers how to train a MNIST model using TensorFlow,\ncraft adversarial examples using the [fast gradient sign method](https://arxiv.org/abs/1412.6572),\nand make the model more robust to adversarial examples using adversarial training.\n* **MNIST with FGSM using Keras** ([code](cleverhans_tutorials/mnist_tutorial_keras_tf.py)): this\ntutorial covers how to define a MNIST model with Keras and train it using TensorFlow,\ncraft adversarial examples using the [fast gradient sign method](https://arxiv.org/abs/1412.6572),\nand make the model more robust to adversarial\nexamples using adversarial training.\n* **MNIST with JSMA** ([code](cleverhans_tutorials/mnist_tutorial_jsma.py)): this second\ntutorial covers how to define a MNIST model with Keras and train it using TensorFlow and\ncraft adversarial examples using the [Jacobian-based saliency map approach](https://arxiv.org/abs/1511.07528).\n* **MNIST using a black-box attack** ([code](cleverhans_tutorials/mnist_blackbox.py)):\nthis tutorial implements the black-box\nattack described in this [paper](https://arxiv.org/abs/1602.02697).\nThe adversary train a substitute model: a copy that imitates the black-box\nmodel by observing the labels that the black-box model assigns to inputs chosen\ncarefully by the adversary. The adversary then uses the substitute\nmodel’s gradients to find adversarial examples that are misclassified by the\nblack-box model as well.\n\nSome models used in the tutorials are defined using [Keras](https://keras.io),\nwhich should be installed before running these tutorials.\nInstallation instructions for Keras can be found\n[here](https://keras.io/#installation).\nNote that you should configure Keras to use the TensorFlow backend. You\ncan find instructions for\nsetting the Keras backend [on this page](https://keras.io/backend/).\n\n## Examples\n\nThe `examples/` folder contains additional scripts to showcase different uses\nof the CleverHans library or get you started competing in different adversarial\nexample contests.\n\n## List of attacks\n\nYou can find a full list attacks along with their function signatures at [cleverhans.readthedocs.io](http://cleverhans.readthedocs.io/)\n\n## Reporting benchmarks\n\nWhen reporting benchmarks, please:\n* Use a versioned release of CleverHans. You can find a list of released versions [here](https://github.com/tensorflow/cleverhans/releases).\n* Either use the latest version, or, if comparing to an earlier publication, use the same version as the earlier publication.\n* Report which attack method was used.\n* Report any configuration variables used to determine the behavior of the attack.\n\nFor example, you might report \"We benchmarked the robustness of our method to\nadversarial attack using v2.1.0 of CleverHans. On a test set modified by the\n`FastGradientMethod` with a max-norm `eps` of 0.3, we obtained a test set accuracy of 71.3%.\"\n\n## Contributing\n\nContributions are welcomed! To speed the code review process, we ask that:\n* New efforts and features be coordinated\non the mailing list for CleverHans development: [cleverhans-dev@googlegroups.com](https://groups.google.com/forum/#!forum/cleverhans-dev).\n* When making code contributions to CleverHans, you follow the\n`PEP8` coding style in your pull requests.\n* When making your first pull request, you [sign the Google CLA](https://cla.developers.google.com/clas)\n* We do not accept pull requests that add git submodules because of [the\n  problems that arise when maintaining git\n  submodules](https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407)\n\nBug fixes can be initiated through Github pull requests.\n\n## Citing this work\n\nIf you use CleverHans for academic research, you are highly encouraged\n(though not required) to cite the following [paper](https://arxiv.org/abs/1610.00768):\n\n```\n@article{papernot2018cleverhans,\n  title={cleverhans v2.1.0: an adversarial machine learning library},\n  author={Nicolas Papernot and Fartash Faghri and Nicholas Carlini and\n  Ian Goodfellow and Reuben Feinman and Alexey Kurakin and Cihang Xie and\n  Yash Sharma and Tom Brown and Aurko Roy and Alexander Matyasko and\n  Vahid Behzadan and Karen Hambardzumyan and Zhishuai Zhang and\n  Yi-Lin Juang and Zhi Li and Ryan Sheatsley and Abhibhav Garg and \n  Jonathan Uesato and Willi Gierke and Yinpeng Dong and David Berthelot and\n  Paul Hendricks and Jonas Rauber and Rujun Long},\n  journal={arXiv preprint arXiv:1610.00768},\n  year={2018}\n}\n```\n\n## About the name\n\nThe name CleverHans is a reference to a presentation by Bob Sturm titled\n“Clever Hans, Clever Algorithms: Are Your Machine Learnings Learning What You\nThink?\" and the corresponding publication, [\"A Simple Method to Determine if a\nMusic Information Retrieval System is a\n'Horse'.\"](http://ieeexplore.ieee.org/document/6847693/) Clever Hans was a\nhorse that appeared to have learned to answer arithmetic questions, but had in\nfact only learned to read social cues that enabled him to give the correct\nanswer. In controlled settings where he could not see people's faces or receive\nother feedback, he was unable to answer the same questions. The story of Clever\nHans is a metaphor for machine learning systems that may achieve very high\naccuracy on a test set drawn from the same distribution as the training data,\nbut that do not actually understand the underlying task and perform poorly on\nother inputs.\n\n## Authors\n\nThis library is managed and maintained by Ian Goodfellow (Google Brain),\nNicolas Papernot (Pennsylvania State University), and\nRyan Sheatsley (Pennsylvania State University).\n\nThe following authors contributed 100 lines or more (ordered according to the GitHub contributors page):\n* Nicolas Papernot (Pennsylvania State University, Google Brain intern)\n* Fartash Faghri (University of Toronto, Google Brain intern)\n* Nicholas Carlini (UC Berkeley)\n* Ian Goodfellow (Google Brain)\n* Reuben Feinman (Symantec)\n* Alexey Kurakin (Google Brain)\n* Cihang Xie (Johns Hopkins)\n* Yash Sharma (The Cooper Union)\n* Tom Brown (Google Brain)\n* Aurko Roy (Google Brain)\n* Alexander Matyasko (Nanyang Technological University)\n* Vahid Behzadan (Kansas State)\n* Karen Hambardzumyan (YerevaNN)\n* Zhishuai Zhang (Johns Hopkins)\n* Yi-Lin Juang (NTUEE)\n* Zhi Li (University of Toronto)\n* Ryan Sheatsley (Pennsylvania State University)\n* Abhibhav Garg (IIT Delhi)\n* Jonathan Uesato (MIT)\n* Willi Gierke (Hasso Plattner Institute)\n* Yinpeng Dong (Tsinghua University)\n* David Berthelot (Google Brain)\n* Paul Hendricks\n* Jonas Rauber (IMPRS)\n* Rujun Long (0101.AI)\n\n## Copyright\n\nCopyright 2017 - Google Inc., OpenAI and Pennsylvania State University.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EE0:3B6DE:175FF4:5D9850:6AB92ACA"},"text_sha256":"72912164518fecb9106a67d36181723815bdf722ed0ae74ff5d5e9eced36fc14"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2515","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088E:380E1C:17CE850:1BF0F38:6AB92ACB"},"commit":{"sha":"574efc1d2f5c7e102c78cf0e937654e847267522","url":"https://github.com/cleverhans-lab/cleverhans/commit/574efc1d2f5c7e102c78cf0e937654e847267522","date":"2023-01-31T19:40:04Z","author_date":"2023-01-31T19:40:04Z","committer_date":"2023-01-31T19:40:04Z","tree_sha":"4edc7e0954d2ccb4c7ee0e6f093fc318597b89ea","message_first_line":"Fix import of logsoftmax"},"tree_request_status":200,"tree_rate":{"github_remaining":"2514","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:18064B5:1C29D8B:6AB92ACC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11108,"blob_sha":"8114018568694f5c5a59ad555239c38ce1f507fc","priority":0}],"documents":[{"path":"README.md","size":11108,"blob_sha":"8114018568694f5c5a59ad555239c38ce1f507fc","priority":0,"status":200,"text":"# CleverHans (latest release: v4.0.0)\n\n<img src=\"https://github.com/tensorflow/cleverhans/blob/master/assets/logo.png?raw=true\" alt=\"cleverhans logo\">\n\n\nThis repository contains the source code for CleverHans, a Python library to\nbenchmark machine learning systems' vulnerability to\n[adversarial examples](http://karpathy.github.io/2015/03/30/breaking-convnets/).\nYou can learn more about such vulnerabilities on the accompanying [blog](http://cleverhans.io).\n\nThe CleverHans library is under continual development, always welcoming\n[contributions](https://github.com/cleverhans-lab/cleverhans#contributing)\nof the latest attacks and defenses.\nIn particular, we always welcome help towards resolving the [issues](https://github.com/cleverhans-lab/cleverhans/issues)\ncurrently open.\n\nSince v4.0.0, CleverHans supports 3 frameworks: JAX, PyTorch, and TF2. We are currently prioritizing implementing \nattacks in PyTorch, but we very much welcome contributions for all 3 frameworks. In versions v3.1.0 and prior,\nCleverHans supported TF1; the code for v3.1.0 can be found under `cleverhans_v3.1.0/` or by checking\nout a prior Github release.\n\nThe library focuses on providing reference implementation of attacks\nagainst machine learning models to help with benchmarking models against\nadversarial examples. \n\nThe directory structure is as follows: \n`cleverhans/` contain attack implementations, `tutorials/` contain scripts demonstrating the features\nof CleverHans, and `defenses/` contains defense implementations. Each framework has its own subdirectory\nwithin these folders, e.g. `cleverhans/jax`.\n\n## Setting up CleverHans\n\n### Dependencies\n\nThis library uses [Jax](https://github.com/google/jax), [PyTorch](https://pytorch.org/) or [TensorFlow 2](https://www.tensorflow.org/) to accelerate graph\ncomputations performed by many machine learning models.\nTherefore, installing one of these libraries is a pre-requisite.\n\n### Installation\n\nOnce dependencies have been taken care of, you can install CleverHans using\n`pip` or by cloning this Github repository.\n\n#### `pip` installation\n\nIf you are installing CleverHans using `pip`, run the following command:\n\n```\npip install cleverhans\n```\n\nThis will install the last version uploaded to\n[Pypi](https://pypi.org/project/cleverhans).\nIf you'd instead like to install the bleeding edge version, use:\n\n```\npip install git+https://github.com/cleverhans-lab/cleverhans.git#egg=cleverhans\n```\n\n#### Installation for development\n\nIf you want to make an editable installation of CleverHans so that you can\ndevelop the library and contribute changes back, first fork the repository\non GitHub and then clone your fork into a directory of your choice:\n\n```\ngit clone https://github.com/<your-org>/cleverhans\n```\n\nYou can then install the local package in \"editable\" mode in order to add it to\nyour `PYTHONPATH`:\n\n```\ncd cleverhans\npip install -e .\n```\n\n### Currently supported setups\n\nAlthough CleverHans is likely to work on many other machine configurations, we\ncurrently test it with Python\n3.6, Jax 0.2, PyTorch 1.7, and Tensorflow 2.4 on Ubuntu 18.04 LTS (Bionic Beaver).\n\n## Getting support\n\nIf you have a request for support, please ask a question\non [StackOverflow](https://stackoverflow.com/questions/tagged/cleverhans)\nrather than opening an issue in the GitHub tracker. The GitHub\nissue tracker should *only* be used to report bugs or make feature requests.\n\n## Contributing\n\nContributions are welcomed! To speed the code review process, we ask that:\n* New efforts and features be coordinated on the [discussion board](https://github.com/cleverhans-lab/cleverhans/discussions).\n* When making code contributions to CleverHans, you should follow the [`Black`](https://black.readthedocs.io/en/stable/index.html)\n coding style in your pull requests.\n* We do not accept pull requests that add git submodules because of [the\n  problems that arise when maintaining git\n  submodules](https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407).\n\nBug fixes can be initiated through Github pull requests.\n\n## Tutorials: `tutorials` directory\n\nTo help you get started with the functionalities provided by this library, the\n`tutorials/` folder comes with the following tutorials:\n* **MNIST with FGSM and PGD** ([jax](tutorials/jax/mnist_tutorial.py), [tf2](tutorials/tf2/mnist_tutorial.py):\nthis tutorial covers how to train an MNIST model and craft adversarial examples using the\n [fast gradient sign method](https://arxiv.org/abs/1412.6572) and \n [projected gradient descent](https://arxiv.org/abs/1706.06083).\n* **CIFAR10 with FGSM and PGD** ([pytorch](tutorials/torch/cifar10_tutorial.py), [tf2](tutorials/tf2/cifar10_tutorial.py)):\nthis tutorial covers how to train a CIFAR10 model and \ncraft adversarial examples using the [fast gradient sign method](https://arxiv.org/abs/1412.6572) and\n [projected gradient descent](https://arxiv.org/abs/1706.06083).\n\nNOTE: the tutorials are maintained carefully, in the sense that we use\ncontinuous integration to make sure they continue working. They are not\nconsidered part of the API and they can change at any time without warning.\nYou should not write 3rd party code that imports the tutorials and expect\nthat the interface will not break. Only the main library is subject to\nour six month interface deprecation warning rule.\n\nNOTE: please start a thread on the [discussion board](https://github.com/cleverhans-lab/cleverhans/discussions) before writing a new\ntutorial. Because each new tutorial involves a large amount of duplicated\ncode relative to the existing tutorials, and because every line of code\nrequires ongoing testing and maintenance indefinitely, we generally prefer\nnot to add new tutorials. Each tutorial should showcase an extremely different\nway of using the library. Just calling a different attack, model, or dataset\nis not enough to justify maintaining a parallel tutorial.\n\n## Examples : `examples` directory\n\nThe `examples/` folder contains additional scripts to showcase different uses\nof the CleverHans library or get you started competing in different adversarial\nexample contests. We do not offer nearly as much ongoing maintenance or support\nfor this directory as the rest of the library, and if code in here gets broken\nwe may just delete it without warning.\n\nSince we recently discontinued support for TF1, the `examples/` folder is currently \nempty, but you are welcome to submit your uses via a pull request :)\n\nOld examples for CleverHans v3.1.0 and prior can be found under `cleverhans_v3.1.0/examples/`.\n\n## Reporting benchmarks\n\nWhen reporting benchmarks, please:\n* Use a versioned release of CleverHans. You can find a list of released versions [here](https://github.com/cleverhans-lab/cleverhans/releases).\n* Either use the latest version, or, if comparing to an earlier publication, use the same version as the earlier publication.\n* Report which attack method was used.\n* Report any configuration variables used to determine the behavior of the attack.\n\nFor example, you might report \"We benchmarked the robustness of our method to\nadversarial attack using v4.0.0 of CleverHans. On a test set modified by the\n`FastGradientMethod` with a max-norm `eps` of 0.3, we obtained a test set accuracy of 71.3%.\"\n\n## Citing this work\n\nIf you use CleverHans for academic research, you are highly encouraged\n(though not required) to cite the following [paper](https://arxiv.org/abs/1610.00768):\n\n```\n@article{papernot2018cleverhans,\n  title={Technical Report on the CleverHans v2.1.0 Adversarial Examples Library},\n  author={Nicolas Papernot and Fartash Faghri and Nicholas Carlini and\n  Ian Goodfellow and Reuben Feinman and Alexey Kurakin and Cihang Xie and\n  Yash Sharma and Tom Brown and Aurko Roy and Alexander Matyasko and\n  Vahid Behzadan and Karen Hambardzumyan and Zhishuai Zhang and\n  Yi-Lin Juang and Zhi Li and Ryan Sheatsley and Abhibhav Garg and\n  Jonathan Uesato and Willi Gierke and Yinpeng Dong and David Berthelot and\n  Paul Hendricks and Jonas Rauber and Rujun Long},\n  journal={arXiv preprint arXiv:1610.00768},\n  year={2018}\n}\n```\n\n## About the name\n\nThe name CleverHans is a reference to a presentation by Bob Sturm titled\n“Clever Hans, Clever Algorithms: Are Your Machine Learnings Learning What You\nThink?\" and the corresponding publication, [\"A Simple Method to Determine if a\nMusic Information Retrieval System is a\n'Horse'.\"](http://ieeexplore.ieee.org/document/6847693/) Clever Hans was a\nhorse that appeared to have learned to answer arithmetic questions, but had in\nfact only learned to read social cues that enabled him to give the correct\nanswer. In controlled settings where he could not see people's faces or receive\nother feedback, he was unable to answer the same questions. The story of Clever\nHans is a metaphor for machine learning systems that may achieve very high\naccuracy on a test set drawn from the same distribution as the training data,\nbut that do not actually understand the underlying task and perform poorly on\nother inputs.\n\n## Authors\n\nThis library is collectively maintained by the [CleverHans Lab](https://cleverhans-lab.github.io/) \nat the University of Toronto. The current point of contact is Jonas Guan. \nIt was previously maintained by Ian Goodfellow and Nicolas Papernot.\n\n\nThe following authors contributed 100 lines or more (ordered according to the GitHub contributors page):\n* Ian Goodfellow (Google Brain)\n* Nicolas Papernot (Google Brain)\n* Nicholas Carlini (Google Brain)\n* Fartash Faghri (University of Toronto)\n* Tzu-Wei Sung (National Taiwan University)\n* Alexey Kurakin (Google Brain)\n* Reuben Feinman (New York University)\n* Shiyu Duan (University of Florida)\n* Phani Krishna (Video Analytics Lab)\n* David Berthelot (Google Brain)\n* Tom Brown (Google Brain)\n* Cihang Xie (Johns Hopkins)\n* Yash Sharma (The Cooper Union)\n* Aashish Kumar (HARMAN X)\n* Aurko Roy (Google Brain)\n* Alexander Matyasko (Nanyang Technological University)\n* Anshuman Suri (University of Virginia)\n* Yen-Chen Lin (MIT)\n* Vahid Behzadan (Kansas State)\n* Jonathan Uesato (DeepMind)\n* Florian Tramèr (Stanford University)\n* Haojie Yuan (University of Science & Technology of China)\n* Zhishuai Zhang (Johns Hopkins)\n* Karen Hambardzumyan (YerevaNN)\n* Jianbo Chen (UC Berkeley)\n* Catherine Olsson (Google Brain)\n* Aidan Gomez (University of Oxford)\n* Zhi Li (University of Toronto)\n* Yi-Lin Juang (NTUEE)\n* Pratyush Sahay (formerly HARMAN X)\n* Abhibhav Garg (IIT Delhi)\n* Aditi Raghunathan (Stanford University)\n* Yang Song (Stanford University)\n* Riccardo Volpi (Italian Institute of Technology)\n* Angus Galloway (University of Guelph)\n* Yinpeng Dong (Tsinghua University)\n* Willi Gierke (Hasso Plattner Institute)\n* Bruno López\n* Jonas Rauber (IMPRS)\n* Paul Hendricks (NVIDIA)\n* Ryan Sheatsley (Pennsylvania State University)\n* Rujun Long (0101.AI)\n* Bogdan Kulynych (EPFL)\n* Erfan Noury (UMBC)\n* Robert Wagner (Case Western Reserve University)\n* Erh-Chung Chen (National Tsing Hua University)\n* Joel Frank (Ruhr-University Bochum)\n\n## Copyright\n\nCopyright 2021 - Google Inc., OpenAI, Pennsylvania State University, University of Toronto.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B528:149227:180B3E:5E451E:6AB92ACC"},"text_sha256":"5173868c34b096e0b3550cf1c299b83ee198a806b58cb0fce84938a2eac0c485"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tyiannak/pyAudioAnalysis","input_row":{"repository":"tyiannak/pyAudioAnalysis","url":"https://github.com/tyiannak/pyAudioAnalysis","name":"pyAudioAnalysis","owner":"tyiannak","description":"Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6265,"issues":314,"created_at":"2014-08-27T12:43:13Z","updated_at":"2026-09-26T00:30:22Z","first_commit_at":"2014-08-27T12:44:23Z","last_commit_at":"2025-08-04T16:44:35Z","activity_months":131.25,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:12.984Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tyiannak/pyAudioAnalysis","visibility":"public","created_at":"2014-08-27T12:43:13Z","updated_at":"2026-09-26T00:30:22Z","private":false,"fork":false,"archived":false,"stargazers_count":6265,"open_issues_count":205,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2513","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17D22CC:1BF511F:6AB92ACD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2512","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092A:7418C:1812010:1C35540:6AB92ACD"},"commit":{"sha":"1f374d2526639c9e0477379c2bd7a1fac0d8b75e","url":"https://github.com/tyiannak/pyAudioAnalysis/commit/1f374d2526639c9e0477379c2bd7a1fac0d8b75e","date":"2018-04-10T17:41:59Z","author_date":"2018-04-10T17:41:59Z","committer_date":"2018-04-10T17:41:59Z","tree_sha":"16fee7abd47138c1393f9822ec86822d4875677b","message_first_line":"Readme updated with pyVisualizeMp3Tags info. Also updated personal info"},"tree_request_status":200,"tree_rate":{"github_remaining":"2511","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0899:725A9:17D80D0:1BFBA51:6AB92ACD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3759,"blob_sha":"b04afe1463ec5c40198b30f785838aeadfa75763","priority":0}],"documents":[{"path":"README.md","size":3759,"blob_sha":"b04afe1463ec5c40198b30f785838aeadfa75763","priority":0,"status":200,"text":"\n# <img src=\"icon.png\" align=\"left\" height=\"130\"/> A Python library for audio feature extraction, classification, segmentation and applications\n\n*This doc contains general info. Click [here](https://github.com/tyiannak/pyAudioAnalysis/wiki) for the complete wiki*\n\n## News\n * Check out [pyVisualizeMp3Tags](https://github.com/tyiannak/pyVisualizeMp3Tags) a python script for visualization of mp3 tags and lyrics\n * Check out [paura](https://github.com/tyiannak/paura) a python script for realtime recording and analysis of audio data\n * [PLOS-One Paper regarding pyAudioAnalysis](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144610) *(please cite!)*\n\n## General\npyAudioAnalysis is a Python library covering a wide range of audio analysis tasks. Through pyAudioAnalysis you can:\n * Extract audio *features* and representations (e.g. mfccs, spectrogram, chromagram)\n * *Classify* unknown sounds\n * *Train*, parameter tune and *evaluate* classifiers of audio segments\n * *Detect* audio events and exclude silence periods from long recordings\n * Perform *supervised segmentation* (joint segmentation - classification)\n * Perform *unsupervised segmentation* (e.g. speaker diarization)\n * Extract audio *thumbnails*\n * Train and use *audio regression* models (example application: emotion recognition)\n * Apply dimensionality reduction to *visualize* audio data and content similarities\n\n## Installation\n * Install dependencies:\n ```\npip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub\n```\n * Clone the source of this library: \n ```\ngit clone https://github.com/tyiannak/pyAudioAnalysis.git\n```\n\n## An audio classification example\n> More examples and detailed tutorials can be found [at the wiki](https://github.com/tyiannak/pyAudioAnalysis/wiki)\n\npyAudioAnalysis provides easy-to-call wrappers to execute audio analysis tasks. Eg, this code first trains an audio segment classifier, given a set of WAV files stored in folders (each folder representing a different class) and then the trained classifier is used to classify an unknown audio WAV file\n\n```\nfrom pyAudioAnalysis import audioTrainTest as aT\naT.featureAndTrain([\"classifierData/music\",\"classifierData/speech\"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, \"svm\", \"svmSMtemp\", False)\naT.fileClassification(\"data/doremi.wav\", \"svmSMtemp\",\"svm\")\nResult:\n(0.0, array([ 0.90156761,  0.09843239]), ['music', 'speech'])\n```\n\nIn addition, command-line support is provided for all functionalities. E.g. the following command extracts the spectrogram of an audio signal stored in a WAV file: `python audioAnalysis.py fileSpectrogram -i data/doremi.wav`\n\n## Further reading\nApart from the current README file and [the wiki](https://github.com/tyiannak/pyAudioAnalysis/wiki), a more general and theoretic description of the adopted methods (along with several experiments on particular use-cases) is presented [in this publication](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144610). Please use the following citation when citing pyAudioAnalysis in your research work:\n```\n@article{giannakopoulos2015pyaudioanalysis,\n  title={pyAudioAnalysis: An Open-Source Python Library for Audio Signal Analysis},\n  author={Giannakopoulos, Theodoros},\n  journal={PloS one},\n  volume={10},\n  number={12},\n  year={2015},\n  publisher={Public Library of Science}\n}\n```\n\nFinally, for Matlab-related audio analysis material check  [this book](http://www.amazon.com/Introduction-Audio-Analysis-MATLAB%C2%AE-Approach/dp/0080993885).\n\n## Author\n<img src=\"https://tyiannak.github.io/files/3.JPG\" align=\"left\" height=\"100\"/>\n\n[Theodoros Giannakopoulos](https://tyiannak.github.io), \nDirector of Machine Learning at [Behavioral Signals](https://behavioralsignals.com)\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37A8:17E138:1799F1:5DD305:6AB92ACD"},"text_sha256":"f82a12e2e4359a8cf5e34f1677f5bf0d7dc0960108515c939830b27c1fadf461"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2510","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A5:35D5A8:17CF694:1BF2D25:6AB92ACE"},"commit":{"sha":"3dd60a2e904d11465b7a27332d1f4ce69182fa93","url":"https://github.com/tyiannak/pyAudioAnalysis/commit/3dd60a2e904d11465b7a27332d1f4ce69182fa93","date":"2025-08-04T16:44:35Z","author_date":"2025-08-04T16:44:35Z","committer_date":"2025-08-04T16:44:35Z","tree_sha":"937d9cf3900781891c9d6823fe92f15c89b7894f","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2509","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:17A9155:1BCC623:6AB92ACE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5578,"blob_sha":"d254877877fc3776d2eed95ebe6376b9d1dd9794","priority":0}],"documents":[{"path":"README.md","size":5578,"blob_sha":"d254877877fc3776d2eed95ebe6376b9d1dd9794","priority":0,"status":200,"text":"\n# <img src=\"icon.png\" align=\"left\" height=\"130\"/> A Python library for audio feature extraction, classification, segmentation and applications\n\n*This is general info. Click [here](https://github.com/tyiannak/pyAudioAnalysis/wiki) for the complete wiki and [here](https://hackernoon.com/audio-handling-basics-how-to-process-audio-files-using-python-cli-jo283u3y) for a more generic intro to audio data handling*\n\n## News\n * [2025-03-29] Check [Behavioral Signals Python SDK](https://github.com/BehavioralSignalTechnologies/behavioralsignals-python) that demonstrates how to use [Behavioral Signals' API](https://platform.behavioralsignals.com/) to send speech data and retrieve predictions related to emotions and behaviors using Python code. It works in both batch and streaming mode. Now [Behavioral Signals' API](https://platform.behavioralsignals.com/) also supports a Speaker Agnostic Deep Fake Detector.\n * [2021-08-06] [deep-audio-features](https://github.com/tyiannak/deep_audio_features) deep audio classification and feature extraction using CNNs and Pytorch \n * Check out [paura](https://github.com/tyiannak/paura) a Python script for realtime recording and analysis of audio data\n\n## General\npyAudioAnalysis is a Python library covering a wide range of audio analysis tasks. Through pyAudioAnalysis you can:\n * Extract audio *features* and representations (e.g. mfccs, spectrogram, chromagram)\n * *Train*, parameter tune and *evaluate* classifiers of audio segments\n * *Classify* unknown sounds\n * *Detect* audio events and exclude silence periods from long recordings\n * Perform *supervised segmentation* (joint segmentation - classification)\n * Perform *unsupervised segmentation* (e.g. speaker diarization) and extract audio *thumbnails*\n * Train and use *audio regression* models (example application: emotion recognition)\n * Apply dimensionality reduction to *visualize* audio data and content similarities\n\n## Installation\n * Clone the source of this library: `git clone https://github.com/tyiannak/pyAudioAnalysis.git`\n * Install dependencies: `pip install -r ./requirements.txt `\n * Install using pip: `pip install -e .`\n\n## An audio classification example\n> More examples and detailed tutorials can be found [at the wiki](https://github.com/tyiannak/pyAudioAnalysis/wiki)\n\npyAudioAnalysis provides easy-to-call wrappers to execute audio analysis tasks. Eg, this code first trains an audio segment classifier, given a set of WAV files stored in folders (each folder representing a different class) and then the trained classifier is used to classify an unknown audio WAV file\n\n```python\nfrom pyAudioAnalysis import audioTrainTest as aT\naT.extract_features_and_train([\"classifierData/music\",\"classifierData/speech\"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, \"svm\", \"svmSMtemp\", False)\naT.file_classification(\"data/doremi.wav\", \"svmSMtemp\",\"svm\")\n```\n\n>Result:\n(0.0, array([ 0.90156761,  0.09843239]), ['music', 'speech'])\n\nIn addition, command-line support is provided for all functionalities. E.g. the following command extracts the spectrogram of an audio signal stored in a WAV file: `python audioAnalysis.py fileSpectrogram -i data/doremi.wav`\n\n## Further reading\n\nApart from this README file, to bettern understand how to use this library one should read the following:\n  * [Audio Handling Basics: Process Audio Files In Command-Line or Python](https://hackernoon.com/audio-handling-basics-how-to-process-audio-files-using-python-cli-jo283u3y), if you want to learn how to handle audio files from command line, and some basic programming on audio signal processing. Start with that if you don't know anything about audio. \n  * [Intro to Audio Analysis: Recognizing Sounds Using Machine Learning](https://hackernoon.com/intro-to-audio-analysis-recognizing-sounds-using-machine-learning-qy2r3ufl) This goes a bit deeper than the previous article, by providing a complete intro to theory and practice of audio feature extraction, classification and segmentation (includes many Python examples).\n * [The library's wiki](https://github.com/tyiannak/pyAudioAnalysis/wiki)\n * [How to Use Machine Learning to Color Your Lighting Based on Music Mood](https://hackernoon.com/how-to-use-machine-learning-to-color-your-lighting-based-on-music-mood-bi163u8l). An interesting use-case of using this lib to train a real-time music mood estimator.\n  * A more general and theoretic description of the adopted methods (along with several experiments on particular use-cases) is presented [in this publication](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144610). *Please use the following citation when citing pyAudioAnalysis in your research work*:\n```python\n@article{giannakopoulos2015pyaudioanalysis,\n  title={pyAudioAnalysis: An Open-Source Python Library for Audio Signal Analysis},\n  author={Giannakopoulos, Theodoros},\n  journal={PloS one},\n  volume={10},\n  number={12},\n  year={2015},\n  publisher={Public Library of Science}\n}\n```\n\nFor Matlab-related audio analysis material check  [this book](http://www.amazon.com/Introduction-Audio-Analysis-MATLAB%C2%AE-Approach/dp/0080993885).\n\n## Author\n<img src=\"https://tyiannak.github.io/files/3.JPG\" align=\"left\" height=\"100\"/>\n\n[Theodoros Giannakopoulos](https://tyiannak.github.io),\nPrincipal Researcher of Multimodal Machine Learning at the [Multimedia Analysis Group of the Computational Intelligence Lab (MagCIL)](https://labs-repos.iit.demokritos.gr/MagCIL/index.html) of the Institute of Informatics and Telecommunications, of the National Center for Scientific Research \"Demokritos\"\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E30E:3B6DE:176026:5D991C:6AB92ACF"},"text_sha256":"632bc1dd7a1ab6519484ceb009e4e1c6b3151a2941597d890b3e92fb2cd6b104"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"skorch-dev/skorch","input_row":{"repository":"skorch-dev/skorch","url":"https://github.com/skorch-dev/skorch","name":"skorch","owner":"skorch-dev","description":"A scikit-learn compatible neural network library that wraps PyTorch","language":"Jupyter Notebook","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":6179,"issues":536,"created_at":"2017-07-18T00:13:54Z","updated_at":"2026-09-22T13:47:18Z","first_commit_at":"2017-07-18T16:06:22Z","last_commit_at":"2026-09-22T13:47:11Z","activity_months":110.15000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:15.654Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"skorch-dev/skorch","visibility":"public","created_at":"2017-07-18T00:13:54Z","updated_at":"2026-09-22T13:47:18Z","private":false,"fork":false,"archived":false,"stargazers_count":6179,"open_issues_count":64,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2508","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17C1D2D:1BE4808:6AB92ACF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2507","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088C:6E5BD:1797C71:1BB9E12:6AB92AD0"},"commit":{"sha":"57230ba7c5755533dec08d7b50512a9c7d8d6b45","url":"https://github.com/skorch-dev/skorch/commit/57230ba7c5755533dec08d7b50512a9c7d8d6b45","date":"2018-05-24T17:58:07Z","author_date":"2018-05-24T17:58:07Z","committer_date":"2018-05-24T17:58:07Z","tree_sha":"a40ce698e9f7468cf7c8eab57109aeb46c3c6a63","message_first_line":"RFC: Rename variable"},"tree_request_status":200,"tree_rate":{"github_remaining":"2506","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CD:280FBC:17BB65D:1BDD9D0:6AB92AD0"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5532,"blob_sha":"37359a1b91ce64c3d18d2614387672b99da26572","priority":0}],"documents":[{"path":"README.rst","size":5532,"blob_sha":"37359a1b91ce64c3d18d2614387672b99da26572","priority":0,"status":200,"text":".. image:: https://github.com/dnouri/skorch/blob/master/assets/skorch.svg\n   :width: 30%\n\n------------\n\n|build| |coverage| |docs| |powered|\n\nA scikit-learn compatible neural network library that wraps PyTorch.\n\n.. |build| image:: https://travis-ci.org/dnouri/skorch.svg?branch=master\n    :alt: Build Status\n    :scale: 100%\n    :target: https://travis-ci.org/dnouri/skorch?branch=master\n\n.. |coverage| image:: https://github.com/dnouri/skorch/blob/master/assets/coverage.svg\n    :alt: Test Coverage\n    :scale: 100%\n\n.. |docs| image:: https://readthedocs.org/projects/skorch/badge/?version=latest\n    :alt: Documentation Status\n    :scale: 100%\n    :target: https://skorch.readthedocs.io/en/latest/?badge=latest\n\n.. |powered| image:: https://github.com/dnouri/skorch/blob/master/assets/powered.svg\n    :alt: Powered by\n    :scale: 100%\n    :target: https://github.com/ottogroup/\n\n=========\nResources\n=========\n\n- `Documentation <https://skorch.readthedocs.io/en/latest/?badge=latest>`_\n- `Source Code <https://github.com/dnouri/skorch/>`_\n\n=======\nExample\n=======\n\nTo see a more elaborate example, look `here\n<https://github.com/dnouri/skorch/tree/master/notebooks/README.md>`__.\n\n.. code:: python\n\n    import numpy as np\n    from sklearn.datasets import make_classification\n    import torch\n    from torch import nn\n    import torch.nn.functional as F\n\n    from skorch.net import NeuralNetClassifier\n\n\n    X, y = make_classification(1000, 20, n_informative=10, random_state=0)\n    X = X.astype(np.float32)\n    y = y.astype(np.int64)\n\n    class MyModule(nn.Module):\n        def __init__(self, num_units=10, nonlin=F.relu):\n            super(MyModule, self).__init__()\n\n            self.dense0 = nn.Linear(20, num_units)\n            self.nonlin = nonlin\n            self.dropout = nn.Dropout(0.5)\n            self.dense1 = nn.Linear(num_units, 10)\n            self.output = nn.Linear(10, 2)\n\n        def forward(self, X, **kwargs):\n            X = self.nonlin(self.dense0(X))\n            X = self.dropout(X)\n            X = F.relu(self.dense1(X))\n            X = F.softmax(self.output(X), dim=-1)\n            return X\n\n\n    net = NeuralNetClassifier(\n        MyModule,\n        max_epochs=10,\n        lr=0.1,\n    )\n\n    net.fit(X, y)\n    y_proba = net.predict_proba(X)\n\nIn an sklearn Pipeline:\n\n.. code:: python\n\n    from sklearn.pipeline import Pipeline\n    from sklearn.preprocessing import StandardScaler\n\n\n    pipe = Pipeline([\n        ('scale', StandardScaler()),\n        ('net', net),\n    ])\n\n    pipe.fit(X, y)\n    y_proba = pipe.predict_proba(X)\n\nWith grid search\n\n.. code:: python\n\n    from sklearn.model_selection import GridSearchCV\n\n\n    params = {\n        'lr': [0.01, 0.02],\n        'max_epochs': [10, 20],\n        'module__num_units': [10, 20],\n    }\n    gs = GridSearchCV(net, params, refit=False, cv=3, scoring='accuracy')\n\n    gs.fit(X, y)\n    print(gs.best_score_, gs.best_params_)\n\n============\nInstallation\n============\n\npip installation\n================\n\nTo install with pip, run:\n\n.. code:: bash\n\n    pip install -U skorch\n\nWe recommend to use a virtual environment for this.\n\nFrom source\n===========\n\nIf you would like to use the must recent additions to skorch or\nhelp development, you should install skorch from source.\n\nUsing conda\n===========\n\nYou need a working conda installation. Get the correct miniconda for\nyour system from `here <https://conda.io/miniconda.html>`__.\n\nIf you just want to use skorch, use:\n\n.. code:: bash\n\n    git clone https://github.com/dnouri/skorch.git\n    cd skorch\n    conda env create\n    source activate skorch\n    # install pytorch version for your system (see below)\n    python setup.py install\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n    git clone https://github.com/dnouri/skorch.git\n    cd skorch\n    conda env create\n    source activate skorch\n    # install pytorch version for your system (see below)\n    conda install --file requirements-dev.txt\n    python setup.py develop\n\n    py.test  # unit tests\n    pylint skorch  # static code checks\n\nUsing pip\n=========\n\nIf you just want to use skorch, use:\n\n.. code:: bash\n\n    git clone https://github.com/dnouri/skorch.git\n    cd skorch\n    # create and activate a virtual environment\n    pip install -r requirements.txt\n    # install pytorch version for your system (see below)\n    python setup.py install\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n    git clone https://github.com/dnouri/skorch.git\n    cd skorch\n    # create and activate a virtual environment\n    pip install -r requirements.txt\n    # install pytorch version for your system (see below)\n    pip install -r requirements-dev.txt\n    python setup.py develop\n\n    py.test  # unit tests\n    pylint skorch  # static code checks\n\nPyTorch\n=======\n\nPyTorch is not covered by the dependencies, since the PyTorch\nversion you need is dependent on your system. For installation\ninstructions for PyTorch, visit the `PyTorch website\n<http://pytorch.org/>`__.\n\nIn general, this should work (assuming CUDA 9):\n\n.. code:: bash\n\n    # using conda:\n    conda install pytorch cuda90 -c pytorch\n    # using pip\n    pip install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp36-cp36m-linux_x86_64.whl\n\n=============\nCommunication\n=============\n\n- `GitHub issues <https://github.com/dnouri/skorch/issues>`_: bug\n  reports, feature requests, install issues, RFCs, thoughts, etc.\n\n- Slack: We run the #skorch channel on the `PyTorch Slack server\n  <https://pytorch.slack.com/>`_.  If you need an invite, send an\n  email to daniel.nouri@gmail.com.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDEC:3B6DE:176039:5D9961:6AB92ACF"},"text_sha256":"a84b60dc506a580f037aa8472d1868868116938adba591be475a80d00947c26b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2505","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08ED:74C18:1806788:1C2A109:6AB92AD1"},"commit":{"sha":"e769a2b89dc6e946dfaf42654184aa01b7025964","url":"https://github.com/skorch-dev/skorch/commit/e769a2b89dc6e946dfaf42654184aa01b7025964","date":"2026-05-29T12:19:36Z","author_date":"2026-05-29T12:19:36Z","committer_date":"2026-05-29T12:19:36Z","tree_sha":"814c62a90d9b3bc23a907bb97b7cb33fa6ac901d","message_first_line":"ENH Add automatic device selection (#1141)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2504","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C0:6E4BB:17FADD0:1C1DCDF:6AB92AD1"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":9340,"blob_sha":"e659ac3230729cfec961e85508556d5f26b9c460","priority":0}],"documents":[{"path":"README.rst","size":9340,"blob_sha":"e659ac3230729cfec961e85508556d5f26b9c460","priority":0,"status":200,"text":".. image:: https://github.com/skorch-dev/skorch/blob/master/assets/skorch_bordered.svg\n   :width: 30%\n\n------------\n\n|build| |coverage| |docs| |huggingface| |powered|\n\nA scikit-learn compatible neural network library that wraps PyTorch.\n\n.. |build| image:: https://github.com/skorch-dev/skorch/workflows/tests/badge.svg\n    :alt: Test Status\n\n.. |coverage| image:: https://github.com/skorch-dev/skorch/blob/master/assets/coverage.svg\n    :alt: Test Coverage\n\n.. |docs| image:: https://readthedocs.org/projects/skorch/badge/?version=latest\n    :alt: Documentation Status\n    :target: https://skorch.readthedocs.io/en/latest/?badge=latest\n\n.. |huggingface| image:: https://github.com/skorch-dev/skorch/actions/workflows/test-hf-integration.yml/badge.svg\n    :alt: Hugging Face Integration\n    :target: https://github.com/skorch-dev/skorch/actions/workflows/test-hf-integration.yml\n\n.. |powered| image:: https://github.com/skorch-dev/skorch/blob/master/assets/powered.svg\n    :alt: Powered by\n    :target: https://github.com/ottogroup/\n\n=========\nResources\n=========\n\n- `Documentation <https://skorch.readthedocs.io/en/latest/?badge=latest>`_\n- `Source Code <https://github.com/skorch-dev/skorch/>`_\n- `Installation <https://github.com/skorch-dev/skorch#installation>`_\n\n========\nExamples\n========\n\nTo see more elaborate examples, look `here\n<https://github.com/skorch-dev/skorch/tree/master/notebooks/README.md>`__.\n\n.. code:: python\n\n    import numpy as np\n    from sklearn.datasets import make_classification\n    from torch import nn\n    from skorch import NeuralNetClassifier\n\n    X, y = make_classification(1000, 20, n_informative=10, random_state=0)\n    X = X.astype(np.float32)\n    y = y.astype(np.int64)\n\n    class MyModule(nn.Module):\n        def __init__(self, num_units=10, nonlin=nn.ReLU()):\n            super().__init__()\n\n            self.dense0 = nn.Linear(20, num_units)\n            self.nonlin = nonlin\n            self.dropout = nn.Dropout(0.5)\n            self.dense1 = nn.Linear(num_units, num_units)\n            self.output = nn.Linear(num_units, 2)\n            self.softmax = nn.Softmax(dim=-1)\n\n        def forward(self, X, **kwargs):\n            X = self.nonlin(self.dense0(X))\n            X = self.dropout(X)\n            X = self.nonlin(self.dense1(X))\n            X = self.softmax(self.output(X))\n            return X\n\n    net = NeuralNetClassifier(\n        MyModule,\n        max_epochs=10,\n        lr=0.1,\n        # Shuffle training data on each epoch\n        iterator_train__shuffle=True,\n    )\n\n    net.fit(X, y)\n    y_proba = net.predict_proba(X)\n\nIn an `sklearn Pipeline <https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html>`_:\n\n.. code:: python\n\n    from sklearn.pipeline import Pipeline\n    from sklearn.preprocessing import StandardScaler\n\n    pipe = Pipeline([\n        ('scale', StandardScaler()),\n        ('net', net),\n    ])\n\n    pipe.fit(X, y)\n    y_proba = pipe.predict_proba(X)\n\nWith `grid search <https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html>`_:\n\n.. code:: python\n\n    from sklearn.model_selection import GridSearchCV\n\n    # deactivate skorch-internal train-valid split and verbose logging\n    net.set_params(train_split=False, verbose=0)\n    params = {\n        'lr': [0.01, 0.02],\n        'max_epochs': [10, 20],\n        'module__num_units': [10, 20],\n    }\n    gs = GridSearchCV(net, params, refit=False, cv=3, scoring='accuracy', verbose=2)\n\n    gs.fit(X, y)\n    print(\"best score: {:.3f}, best params: {}\".format(gs.best_score_, gs.best_params_))\n\n\nskorch also provides many convenient features, among others:\n\n- `Learning rate schedulers <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.LRScheduler>`_ (Warm restarts, cyclic LR and many more)\n- `Scoring using sklearn (and custom) scoring functions <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.EpochScoring>`_\n- `Early stopping <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.EarlyStopping>`_\n- `Checkpointing <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.Checkpoint>`_\n- `Parameter freezing/unfreezing <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.Freezer>`_\n- `Progress bar <https://skorch.readthedocs.io/en/stable/callbacks.html#skorch.callbacks.ProgressBar>`_ (for CLI as well as jupyter)\n- `Automatic inference of CLI parameters <https://github.com/skorch-dev/skorch/tree/master/examples/cli>`_\n- `Integration with GPyTorch for Gaussian Processes <https://skorch.readthedocs.io/en/latest/user/probabilistic.html>`_\n- `Integration with Hugging Face 🤗 <https://skorch.readthedocs.io/en/stable/user/huggingface.html>`_\n\n============\nInstallation\n============\n\nskorch requires Python 3.9 or higher.\n\nconda installation\n==================\n\nYou need a working conda installation. Get the correct miniconda for\nyour system from `here <https://conda.io/miniconda.html>`__.\n\nTo install skorch, you need to use the conda-forge channel:\n\n.. code:: bash\n\n    conda install -c conda-forge skorch\n\nWe recommend to use a `conda virtual environment <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_.\n\n**Note**: The conda channel is *not* managed by the skorch\nmaintainers. More information is available `here\n<https://github.com/conda-forge/skorch-feedstock>`__.\n\npip installation\n================\n\nTo install with pip, run:\n\n.. code:: bash\n\n    python -m pip install -U skorch\n\nAgain, we recommend to use a `virtual environment\n<https://docs.python.org/3/tutorial/venv.html>`_ for this.\n\nFrom source\n===========\n\nIf you would like to use the most recent additions to skorch or\nhelp development, you should install skorch from source.\n\nUsing conda\n-----------\n\nTo install skorch from source using conda, proceed as follows:\n\n.. code:: bash\n\n    git clone https://github.com/skorch-dev/skorch.git\n    cd skorch\n    conda create -n skorch-env python=3.12\n    conda activate skorch-env\n    python -m pip install torch\n    python -m pip install .\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n    git clone https://github.com/skorch-dev/skorch.git\n    cd skorch\n    conda create -n skorch-env python=3.12\n    conda activate skorch-env\n    python -m pip install torch\n    python -m pip install '.[test,docs,dev,extended]'\n\n    py.test  # unit tests\n    pylint skorch  # static code checks\n\nYou may adjust the Python version to any of the supported Python versions.\n\nUsing pip\n---------\n\nFor pip, follow these instructions instead:\n\n.. code:: bash\n\n    git clone https://github.com/skorch-dev/skorch.git\n    cd skorch\n    # create and activate a virtual environment\n    # install pytorch version for your system (see below)\n    python -m pip install .\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n    git clone https://github.com/skorch-dev/skorch.git\n    cd skorch\n    # create and activate a virtual environment\n    # install pytorch version for your system (see below)\n    python -m pip install -e '.[test,docs,dev,extended]'\n\n    py.test  # unit tests\n    pylint skorch  # static code checks\n\nPyTorch\n=======\n\nPyTorch is not covered by the dependencies, since the PyTorch version\nyou need is dependent on your OS and device. For installation\ninstructions for PyTorch, visit the `PyTorch website\n<http://pytorch.org/>`__. skorch officially supports the last four\nminor PyTorch versions, which currently are:\n\n- 2.9.1\n- 2.10.0\n- 2.11.0\n- 2.12.0\n\nHowever, that doesn't mean that older versions don't work, just that\nthey aren't tested. Since skorch mostly relies on the stable part of\nthe PyTorch API, older PyTorch versions should work fine.\n\nIn general, running this to install PyTorch should work:\n\n.. code:: bash\n\n    python -m pip install torch\n\n==================\nExternal resources\n==================\n\n- @jakubczakon: `blog post\n  <https://neptune.ai/blog/model-training-libraries-pytorch-ecosystem>`_\n  \"8 Creators and Core Contributors Talk About Their Model Training\n  Libraries From PyTorch Ecosystem\" 2020\n- @BenjaminBossan: `talk 1\n  <https://www.youtube.com/watch?v=Qbu_DCBjVEk>`_ \"skorch: A\n  scikit-learn compatible neural network library\" at PyCon/PyData 2019\n- @githubnemo: `poster <https://github.com/githubnemo/skorch-poster>`_\n  for the PyTorch developer conference 2019\n- @thomasjpfan: `talk 2 <https://www.youtube.com/watch?v=0J7FaLk0bmQ>`_\n  \"Skorch: A Union of Scikit learn and PyTorch\" at SciPy 2019\n- @thomasjpfan: `talk 3 <https://www.youtube.com/watch?v=yAXsxf2CQ8M>`_\n  \"Skorch - A Union of Scikit-learn and PyTorch\" at PyData 2018\n- @BenjaminBossan: `talk 4 <https://youtu.be/y_n7BjDCS-M>`_ \"Extend your\n  scikit-learn workflow with Hugging Face and skorch\" at PyData Amsterdam 2023\n  (`slides 4 <https://github.com/BenjaminBossan/presentations/blob/main/2023-09-14-pydata/presentation.org>`_)\n\n=============\nCommunication\n=============\n\n- `GitHub discussions <https://github.com/skorch-dev/skorch/discussions>`_: \n  user questions, thoughts, install issues, general discussions.\n\n- `GitHub issues <https://github.com/skorch-dev/skorch/issues>`_: bug\n  reports, feature requests, RFCs, etc.\n\n- Slack: We run the #skorch channel on the `PyTorch Slack server\n  <https://pytorch.slack.com/>`_, for which you can `request access\n  here <https://bit.ly/ptslack>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B1BC:3AC15:17F48F:5E2D4E:6AB92AD2"},"text_sha256":"a1d1533f72a54ced5767cf66ff7318e653b9c886f05f79c3b813b021ff5f1f1d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"shimat/opencvsharp","input_row":{"repository":"shimat/opencvsharp","url":"https://github.com/shimat/opencvsharp","name":"opencvsharp","owner":"shimat","description":"OpenCV wrapper for .NET","language":"C#","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6106,"issues":1403,"created_at":"2013-12-21T00:27:48Z","updated_at":"2026-09-25T13:26:02Z","first_commit_at":"2013-12-21T00:27:48Z","last_commit_at":"2026-09-25T13:25:50Z","activity_months":153.13999999999999,"ai_ml_match_topics":"machine-learning; computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:18.734Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"shimat/opencvsharp","visibility":"public","created_at":"2013-12-21T00:27:48Z","updated_at":"2026-09-25T13:26:02Z","private":false,"fork":false,"archived":false,"stargazers_count":6106,"open_issues_count":7,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2503","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FC:74E6D:1801E24:1C25880:6AB92AD2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2502","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B3:767EB:17F0FD2:1C14BD6:6AB92AD3"},"commit":{"sha":"e07996120f0c9fc6da2da913945d28bd1a4e1022","url":"https://github.com/shimat/opencvsharp/commit/e07996120f0c9fc6da2da913945d28bd1a4e1022","date":"2018-05-18T08:36:32Z","author_date":"2018-05-18T08:36:32Z","committer_date":"2018-05-18T08:36:32Z","tree_sha":"26a45002ac196cbca4c9bfc550498f490a4ca386","message_first_line":"Merge pull request #499 from shimat/ximgproc_add"},"tree_request_status":200,"tree_rate":{"github_remaining":"2501","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:180E540:1C31809:6AB92AD3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3773,"blob_sha":"4dedde7dd27d455c2b0617359f39a770cd65b678","priority":0}],"documents":[{"path":"README.md","size":3773,"blob_sha":"4dedde7dd27d455c2b0617359f39a770cd65b678","priority":0,"status":200,"text":"# OpenCvSharp [![Build status](https://ci.appveyor.com/api/projects/status/dvjexft02s6b3re6/branch/master?svg=true)](https://ci.appveyor.com/project/shimat/opencvsharp/branch/master) [![GitHub license](https://img.shields.io/github/license/shimat/opencvsharp.svg)](https://github.com/shimat/opencvsharp/blob/master/LICENSE) \n\nCross platform wrapper of OpenCV for .NET Framework.\n\nOld versions of OpenCvSharp is maintained in [opencvsharp_2410](https://github.com/shimat/opencvsharp_2410).\n\n## Installation\n### NuGet\nIf you have Visual Studio 2012 or later, it is recommended to use [NuGet](http://www.nuget.org/). Search *'opencvsharp3'* on the NuGet Package Manager.\n\n| Package                                                      | NuGet                                                                                                                      |\n|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| All-in-one package - bundles native OpenCV DLLs    | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp3-AnyCPU.svg)](https://badge.fury.io/nu/OpenCvSharp3-AnyCPU)         |\n| Minimum package                                    | [![NuGet version](https://badge.fury.io/nu/OpenCvSharp3-WithoutDll.svg)](https://badge.fury.io/nu/OpenCvSharp3-WithoutDll) |\n| Development Build Package    | https://ci.appveyor.com/nuget/opencvsharp |\n\n### Downloads\nIf you do not use NuGet, get DLL files from the [release page](https://github.com/shimat/opencvsharp/releases).\n\n## Requirements\n* [OpenCV 3.4.1](http://opencv.org/)\n* [Visual C++ 2017 Redistributable Package](https://go.microsoft.com/fwlink/?LinkId=746572)\n* [.NET Framework 2.0](http://www.microsoft.com/ja-jp/download/details.aspx?id=1639) or later / [.NET Core 2.0](https://www.microsoft.com/net/download) / [Mono](http://www.mono-project.com/Main_Page)\n\nOpenCvSharp may not work on UWP and Unity platform. Please consider using [OpenCV for Unity](https://www.assetstore.unity3d.com/en/#!/content/21088)\n\n## Documents\nhttps://shimat.github.io/opencvsharp_docs/index.html\n\n## Usage\nFor more details, see the **[Wiki](https://github.com/shimat/opencvsharp/wiki)** page.\n\n```C#\n// Edge detection by Canny algorithm\nusing OpenCvSharp;\n\nclass Program \n{\n    static void Main() \n    {\n        Mat src = new Mat(\"lenna.png\", ImreadModes.GrayScale);\n        // Mat src = Cv2.ImRead(\"lenna.png\", ImreadModes.GrayScale);\n        Mat dst = new Mat();\n        \n        Cv2.Canny(src, dst, 50, 200);\n        using (new Window(\"src image\", src)) \n        using (new Window(\"dst image\", dst)) \n        {\n            Cv2.WaitKey();\n        }\n    }\n}\n```\n\n## Features\n* OpenCvSharp is modeled on the native OpenCV C/C++ API style as much as possible.\n* Many classes of OpenCvSharp implement IDisposable. There is no need to manage unsafe resources. \n* OpenCvSharp does not force object-oriented programming style on you. You can also call native-style OpenCV functions.\n* OpenCvSharp provides functions for converting from Mat/IplImage into Bitmap(GDI+) or WriteableBitmap(WPF).\n* OpenCvSharp can work on [Mono](http://www.mono-project.com/Main_Page). It can run on any platform which [Mono](http://www.mono-project.com/Main_Page) supports (e.g. Linux). \n\n## OpenCvSharp Build Instructions\n- Install Visual Studio 2017 or later\n  - VC++ features are required.\n- Get all submodules\n```\ngit submodule update --init --recursive\n```\n- Build tesseract and leptonica\n  - Open `tesseract/tesseract.sln` and build\n- Build OpenCvSharp\n  - Open `OpenCvSharp.sln` and build\n\n## License\nLicensed under the [BSD 3-Clause License](https://github.com/shimat/opencvsharp/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F06:3BCC6:17C81F:5E022B:6AB92AD3"},"text_sha256":"8499b4b0b68d932dbbf87586d81c853fc6e0509e0d659dce4c57be0ad0b3f886"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2500","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:180D12A:1C308D7:6AB92AD4"},"commit":{"sha":"b5965d964504e1b04486ee88380dbfeb53f7cd54","url":"https://github.com/shimat/opencvsharp/commit/b5965d964504e1b04486ee88380dbfeb53f7cd54","date":"2026-06-30T14:44:16Z","author_date":"2026-06-30T14:44:16Z","committer_date":"2026-06-30T14:44:16Z","tree_sha":"07e2fde8f714d5761a4fcfcec52e5434f9858e06","message_first_line":"Fix(arm64): pass core+imgproc array proxies by pointer ('in')"},"tree_request_status":200,"tree_rate":{"github_remaining":"2499","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0817:754BF:17CB2C9:1BEE9E5:6AB92AD4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17676,"blob_sha":"f7d8cae724458589005455bf879e72381a53ff07","priority":0}],"documents":[{"path":"README.md","size":17676,"blob_sha":"f7d8cae724458589005455bf879e72381a53ff07","priority":0,"status":200,"text":"![opencvsharp](https://socialify.git.ci/shimat/opencvsharp/image?description=1&forks=1&language=1&owner=1&pattern=Plus&stargazers=1&theme=Light)\n\n[![GitHub Actions Windows Status](https://github.com/shimat/opencvsharp/actions/workflows/windows.yml/badge.svg)](https://github.com/shimat/opencvsharp/actions/workflows/windows.yml)  [![GitHub Actions Docker Test Status](https://github.com/shimat/opencvsharp/actions/workflows/docker-test-ubuntu.yml/badge.svg)](https://github.com/shimat/opencvsharp/actions/workflows/docker-test-ubuntu.yml)  [![GitHub Actions manylinux Status](https://github.com/shimat/opencvsharp/actions/workflows/manylinux.yml/badge.svg)](https://github.com/shimat/opencvsharp/actions/workflows/manylinux.yml)  [![GitHub Actions Wasm Status](https://github.com/shimat/opencvsharp/actions/workflows/wasm.yml/badge.svg)](https://github.com/shimat/opencvsharp/actions/workflows/wasm.yml) [![GitHub Actions macOS Status](https://github.com/shimat/opencvsharp/actions/workflows/macos.yml/badge.svg)](https://github.com/shimat/opencvsharp/actions/workflows/macos.yml) [![GitHub license](https://img.shields.io/github/license/shimat/opencvsharp.svg)](https://github.com/shimat/opencvsharp/blob/master/LICENSE) \n\nOpenCvSharp is a cross-platform .NET wrapper for OpenCV, providing a rich set of image processing and computer vision functionality.\n\n## Which version should I use?\n\nOpenCvSharp is published in two parallel package families:\n\n| Family | OpenCV | .NET targets | Status |\n|---|---|---|---|\n| **OpenCvSharp5** | 5.0.x | .NET 8+ | Active development — recommended for new projects |\n| **OpenCvSharp4** | 4.13.0 | .NET Framework 4.6.1+, .NET Standard 2.0/2.1, .NET 8+ | Maintenance — for .NET Framework, Unity, or older runtimes |\n\nBoth families share the same package layout: every `OpenCvSharp5.*` package has an `OpenCvSharp4.*` counterpart. The examples below use **OpenCvSharp5**; replace `5` with `4` for the OpenCvSharp4 family. Migrating from 4 to 5? See the [migration guide](docs/migration-4-to-5.md).\n\n## Quick Start\n\n### Windows (x64)\n```bash\ndotnet add package OpenCvSharp5.Windows\n```\n\n### Windows (ARM64 — Snapdragon X and other arm64 devices)\n```bash\ndotnet add package OpenCvSharp5\ndotnet add package OpenCvSharp5.runtime.win-arm64\n```\n\n### Linux / Ubuntu\n```bash\ndotnet add package OpenCvSharp5\ndotnet add package OpenCvSharp5.official.runtime.linux-x64\n# optional slim profile (smaller native dependency surface)\n# dotnet add package OpenCvSharp5.official.runtime.linux-x64.slim\n```\n\nFor more installation options, see the [Installation](#installation) section below.\n\n## Features\n* OpenCvSharp is modeled on the native OpenCV C/C++ API style as much as possible.\n* Many classes of OpenCvSharp implement IDisposable. Unsafe resources are managed automatically. \n* OpenCvSharp does not force object-oriented programming style on you. You can also call native-style OpenCV functions.\n* OpenCvSharp provides functions for converting from `Mat` to `Bitmap` (GDI+) or `WriteableBitmap` (WPF).\n\n## Target OpenCV\n* **OpenCvSharp5**: [OpenCV 5.0.x](https://opencv.org/) with [opencv_contrib](https://github.com/opencv/opencv_contrib)\n* **OpenCvSharp4**: [OpenCV 4.13.0](https://opencv.org/) with [opencv_contrib](https://github.com/opencv/opencv_contrib)\n\n## Requirements\n* **OpenCvSharp5**: [.NET 8](https://www.microsoft.com/net/download) or later\n* **OpenCvSharp4**: .NET 8+, .NET Standard 2.0 / 2.1, or .NET Framework 4.6.1+ (WpfExtensions also directly targets .NET Framework 4.8)\n* (Windows Server) Media Foundation\n```\nPS1> Install-WindowsFeature Server-Media-Foundation\n```\n* (Linux) The official `OpenCvSharp5.official.runtime.linux-x64` package is built on manylinux_2_28 and works on Ubuntu 20.04+, Debian 10+, RHEL/AlmaLinux 8+, and other Linux distributions with glibc 2.28+. The full package includes FFmpeg (LGPL v2.1) and Tesseract statically linked.\n  * The **full** package uses GTK3 for `highgui` support (`Cv2.ImShow`, `Cv2.WaitKey`, etc.). GTK3 is pre-installed on standard Ubuntu/Debian/RHEL environments. In minimal or container environments where it is absent, install it manually (`apt-get install libgtk-3-0` or `dnf install gtk3`), or use the **slim** profile instead.\n  * The **slim** package (`OpenCvSharp5.official.runtime.linux-x64.slim`) disables `highgui` and has no GUI dependencies — suitable for headless and container use.\n\n\n**OpenCvSharp won't work on Unity and Xamarin platforms.** For Unity, please consider using [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088) or some other solutions.\n\n**OpenCvSharp does not support CUDA.** If you want to use CUDA features, you need to customize the native bindings yourself.\n\n## Installation\n\n### Windows x64 (except UWP)\nAdd `OpenCvSharp5` and `OpenCvSharp5.runtime.win` NuGet packages to your project. Alternatively, you can use the `OpenCvSharp5.Windows` all-in-one package.\nFor a smaller feature profile, pair `OpenCvSharp5` with `OpenCvSharp5.runtime.win.slim`, or use the all-in-one `OpenCvSharp5.Windows.Slim` package.\n\n### Windows ARM64 (Snapdragon X Elite and other arm64 devices)\nAdd `OpenCvSharp5` and `OpenCvSharp5.runtime.win-arm64` NuGet packages to your project.\nFor a smaller feature profile, use `OpenCvSharp5.runtime.win-arm64.slim` instead.\n\n> **Note:** FFmpeg-based video I/O is not available in the ARM64 packages because no ARM64 Windows prebuilt is provided by the upstream OpenCV project. All other OpenCV modules are included in the full package.\n\n> ⚠️ **`OpenCvSharp5.runtime.uwp` is deprecated and no longer maintained.** The last published version targets OpenCV 4.9.0. New UWP projects are not recommended; consider migrating to WinUI 3.\n\n\n### Linux (Ubuntu and other distributions)\nAdd `OpenCvSharp5` and `OpenCvSharp5.official.runtime.linux-x64` NuGet packages to your project. This package uses the portable `linux-x64` RID and works with .NET 8+ publish/deploy workflows out of the box.\n```bash\ndotnet new console -n ConsoleApp01\ncd ConsoleApp01\ndotnet add package OpenCvSharp5\ndotnet add package OpenCvSharp5.official.runtime.linux-x64\n# or slim profile:\n# dotnet add package OpenCvSharp5.official.runtime.linux-x64.slim\n# -- edit Program.cs --- # \ndotnet run\n```\n\n> ⚠️ The distro-specific `OpenCvSharp5.official.runtime.ubuntu.*` packages are **no longer maintained**. Use `OpenCvSharp5.official.runtime.linux-x64` instead.\n\n\n### Slim profile module coverage\n\nThe `slim` runtime packages keep a practical subset while reducing runtime dependencies.\n\n- Enabled modules: `core`, `imgproc`, `imgcodecs`, `calib3d`, `features2d`, `flann`, `objdetect`, `photo`, `ml`, `video`, `stitching`, `barcode`\n- Disabled modules: `contrib`, `dnn`, `videoio`, `highgui`\n\nThis profile is used by:\n\n- `OpenCvSharp5.runtime.win.slim`\n- `OpenCvSharp5.Windows.Slim`\n- `OpenCvSharp5.official.runtime.linux-x64.slim`\n\n## Usage\nFor more details, refer to the **[samples](https://github.com/shimat/opencvsharp_samples/)** and **[Wiki](https://github.com/shimat/opencvsharp/wiki)** pages.\n\n**Always remember to release Mat and other IDisposable resources using the `using` syntax:**\n```C#\n// Edge detection by Canny algorithm\nusing OpenCvSharp;\n\nusing var src = new Mat(\"lenna.png\", ImreadModes.Grayscale);\nusing var dst = new Mat();\n\nCv2.Canny(src, dst, 50, 200);\nusing (new Window(\"src image\", src))\nusing (new Window(\"dst image\", dst))\n{\n    Cv2.WaitKey();\n}\n```\n\n<details>\n<summary><b>Note: chained Mat arithmetic is leak-free<\/b><\/summary>\n\n`Mat` arithmetic operators (`+`, `-`, `*`, `/`, the comparison and bitwise operators, `T()`, `Inv()`, `Mul()`, `Abs()`, `Eye`/`Zeros`/`Ones`, ...) return a purely managed, lazily-evaluated expression tree (`MatExprNode`) that holds **no** unmanaged resources. The native `cv::MatExpr` chain is built only when the expression is materialized — when it is assigned to a `Mat`, or passed where a `Mat`/`InputArray` is expected — and every native intermediate is disposed immediately during that evaluation.\n\nAs a result, chained expressions never leak: you only need `using` on your inputs and on the final `Mat`. The intermediate expression nodes require no disposal.\n\n```C#\nusing var src = new Mat(\"lenna.png\", ImreadModes.Grayscale);\n\n// The intermediate (src * 0.8) holds no native resource; nothing leaks.\nusing Mat dst = 255 - src * 0.8;\n```\n\n```C#\nusing var mat1 = new Mat(new Size(100, 100), MatType.CV_8UC3, new Scalar(0));\nusing Mat mat3 = 255 - mat1 * 0.8;\n\nusing var canny = new Mat();\nCv2.Canny(src, canny, 50, 200);   // an expression can be passed directly to a Cv2 method\n```\n\n<\/details>\n\n## Code samples\nhttps://github.com/shimat/opencvsharp_samples/\n\n## API Documents\nhttp://shimat.github.io/opencvsharp/api/OpenCvSharp.html\n\n## NuGet\n\n> Packages are published in two parallel families: **`OpenCvSharp5.*`** (OpenCV 5.x, .NET 8+) and **`OpenCvSharp4.*`** (OpenCV 4.13.0; also supports .NET Framework / .NET Standard). The tables below list the OpenCvSharp5 packages — each has an identically-named `OpenCvSharp4.*` counterpart.\n\n### Managed libraries\n\n| Package | Description |\n|---------|-------------|\n|**[OpenCvSharp5](https://www.nuget.org/packages/OpenCvSharp5/)**| OpenCvSharp core libraries |\n|**[OpenCvSharp5.GdipExtensions](https://www.nuget.org/packages/OpenCvSharp5.GdipExtensions/)**| GDI+ (System.Drawing) Extensions |\n|**[OpenCvSharp5.WpfExtensions](https://www.nuget.org/packages/OpenCvSharp5.WpfExtensions/)**| WPF Extensions |\n|**[OpenCvSharp5.Windows](https://www.nuget.org/packages/OpenCvSharp5.Windows/)**| All-in-one package for Windows (except UWP) |\n|**[OpenCvSharp5.Windows.Slim](https://www.nuget.org/packages/OpenCvSharp5.Windows.Slim/)**| All-in-one slim package for Windows (except UWP) |\n\n### Native bindings\n\n| Package | Description |\n|---------|-------------|\n|**[OpenCvSharp5.runtime.win](https://www.nuget.org/packages/OpenCvSharp5.runtime.win/)**| Native bindings for Windows x64 (except UWP) |\n|**[OpenCvSharp5.runtime.win.slim](https://www.nuget.org/packages/OpenCvSharp5.runtime.win.slim/)**| Slim native bindings for Windows x64 (except UWP), with `core,imgproc,imgcodecs,calib3d,features2d,flann,objdetect,photo,ml,video,stitching,barcode` enabled |\n|**[OpenCvSharp5.runtime.win-arm64](https://www.nuget.org/packages/OpenCvSharp5.runtime.win-arm64/)**| Native bindings for Windows ARM64 (Snapdragon X and other arm64 devices). FFmpeg not included. |\n|**[OpenCvSharp5.runtime.win-arm64.slim](https://www.nuget.org/packages/OpenCvSharp5.runtime.win-arm64.slim/)**| Slim native bindings for Windows ARM64, with `core,imgproc,imgcodecs,calib3d,features2d,flann,objdetect,photo,ml,video,stitching,barcode` enabled |\n|**[OpenCvSharp5.official.runtime.linux-x64](https://www.nuget.org/packages/OpenCvSharp5.official.runtime.linux-x64/)**| Native bindings for Linux x64 (portable RID, recommended). Built on manylinux_2_28. Includes FFmpeg and Tesseract statically linked. Requires GTK3 runtime (`libgtk-3.so.0`) for highgui (`Cv2.ImShow` etc.). |\n|**[OpenCvSharp5.official.runtime.linux-x64.slim](https://www.nuget.org/packages/OpenCvSharp5.official.runtime.linux-x64.slim/)**| Slim native bindings for Linux x64 (portable RID), with `core,imgproc,imgcodecs,calib3d,features2d,flann,objdetect,photo,ml,video,stitching,barcode` enabled. No external runtime dependencies. |\n|**[OpenCvSharp5.runtime.linux-arm64](https://www.nuget.org/packages/OpenCvSharp5.runtime.linux-arm64/)**| Native bindings for Linux ARM64 (AArch64) |\n|**[OpenCvSharp5.runtime.linux-arm](https://www.nuget.org/packages/OpenCvSharp5.runtime.linux-arm/)**| **Deprecated.** Compatibility shim for `OpenCvSharp5.runtime.linux-arm64`. |\n|**[OpenCvSharp5.runtime.wasm](https://www.nuget.org/packages/OpenCvSharp5.runtime.wasm/)**| Native bindings for WebAssembly |\n\n> **Note:** Windows x86 (32-bit) support has been dropped as of the OpenCV 4.13.0 release series.\n> The `OpenCvSharp5.runtime.win` and `OpenCvSharp5.runtime.win.slim` packages now ship **x64-only** native binaries.\n> Users requiring x86 Windows support should stay on the last OpenCV 4.12.x-based packages.\n\nNative binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp5` and `OpenCvSharp5.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, and WebAssembly are available.\n\n## Downloads\nIf you are not using NuGet, you can download the DLL files from the [release page](https://github.com/shimat/opencvsharp/releases).\n\n## Docker images\nhttps://github.com/shimat?tab=packages\n\n## OpenCvSharp Build Instructions\n\n### Windows\n\n#### Prerequisites\n- Visual Studio 2022 / 2026, or the corresponding Build Tools, with the **Desktop development with C++** workload\n- CMake 3.20+ in PATH (`winget install Kitware.CMake`)\n- Git in PATH\n- [vcpkg](https://github.com/microsoft/vcpkg) in PATH or `VCPKG_INSTALLATION_ROOT` set\n  ```powershell\n  git clone https://github.com/microsoft/vcpkg C:\\vcpkg\n  C:\\vcpkg\\bootstrap-vcpkg.bat\n  # Add C:\\vcpkg to PATH, or set $env:VCPKG_INSTALLATION_ROOT = 'C:\\vcpkg'\n  ```\n\n#### Steps\n1. Clone the repository with submodules (opencv + opencv_contrib are included as submodules):\n   ```powershell\n   git clone --recursive https://github.com/shimat/opencvsharp.git\n   cd opencvsharp\n   ```\n   If you already cloned without submodules:\n   ```powershell\n   git submodule update --init --recursive\n   ```\n\n2. Build OpenCV from source (Tesseract and other native dependencies are automatically installed via vcpkg):\n   ```powershell\n   # Install vcpkg dependencies (only needed once, or after vcpkg.json changes)\n   C:\\vcpkg\\vcpkg.exe install --triplet x64-windows-static --overlay-triplets cmake\\triplets --x-install-root vcpkg_installed\n   ```\n   ```powershell\n   .\\scripts\\build_opencv_windows.ps1\n   # Use -Jobs N to control parallel build (default: 4)\n   .\\scripts\\build_opencv_windows.ps1 -Jobs 8\n   ```\n   Output is installed to `opencv_artifacts/`.\n\n3. Build the native wrapper `OpenCvSharpExtern`:\n   ```powershell\n   cmake -S src -B src\\build -G \"Visual Studio 17 2022\" -A x64 `\n         -D \"CMAKE_PREFIX_PATH=$PWD\\opencv_artifacts\" `\n         -D CMAKE_TOOLCHAIN_FILE=\"C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake\" `\n         -D VCPKG_TARGET_TRIPLET=x64-windows-static `\n         -D \"VCPKG_INSTALLED_DIR=$PWD\\vcpkg_installed\" `\n         -D \"VCPKG_OVERLAY_TRIPLETS=$PWD\\cmake\\triplets\"\n   cmake --build src\\build --config Release\n   ```\n\n4. Build the managed OpenCvSharp library:\n   - Open `OpenCvSharp.sln` and build, or:\n   ```powershell\n   dotnet build src/OpenCvSharp/OpenCvSharp.csproj -c Release\n   ```\n   > **Note on the native DLL:** Step 3 automatically copies `OpenCvSharpExtern.dll` into `test/OpenCvSharp.Tests/` as a post-build step, so `dotnet test` works out of the box.\n   > For your own application, either add `src\\build\\OpenCvSharpExtern\\Release` to `PATH`, or copy `OpenCvSharpExtern.dll` alongside your app's output directory.\n\n### Ubuntu\n\nTesseract and image libraries (libjpeg-turbo, libpng, libtiff, libwebp) can be managed either via **vcpkg** (recommended, consistent with Windows) or via the system package manager.\n\n#### Option A: vcpkg (recommended)\n\nPrerequisites: `cmake`, `git`, `g++`, vcpkg installed.\n\n```bash\ngit clone --recursive https://github.com/shimat/opencvsharp.git\ncd opencvsharp\ngit submodule update --init --recursive\n```\n\n```bash\n# Install dependencies via vcpkg\n/path/to/vcpkg/vcpkg install \\\n  --triplet x64-linux-static \\\n  --overlay-triplets cmake/triplets\n```\n\nBuild OpenCV and OpenCvSharpExtern pointing to vcpkg:\n```bash\ncmake -C cmake/opencv_build_options.cmake \\\n      -S opencv -B opencv/build \\\n      -D OPENCV_EXTRA_MODULES_PATH=$PWD/opencv_contrib/modules \\\n      -D CMAKE_INSTALL_PREFIX=$PWD/opencv_artifacts \\\n      -D CMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake \\\n      -D VCPKG_TARGET_TRIPLET=x64-linux-static\ncmake --build opencv/build -j$(nproc)\ncmake --install opencv/build\n\ncmake -S src -B src/build \\\n      -D CMAKE_BUILD_TYPE=Release \\\n      -D CMAKE_PREFIX_PATH=$PWD/opencv_artifacts \\\n      -D CMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake \\\n      -D VCPKG_TARGET_TRIPLET=x64-linux-static\ncmake --build src/build -j$(nproc)\n```\n\n#### Option B: system packages (apt)\n\n```bash\nsudo apt-get install -y g++ cmake libtesseract-dev \\\n  libjpeg-dev libpng-dev libtiff-dev libwebp-dev \\\n  libavcodec-dev libavformat-dev libswscale-dev\n```\n\nBuild OpenCV from source: https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html\n\nThen build the native wrapper:\n```bash\ncmake -S src -B src/build \\\n      -D CMAKE_BUILD_TYPE=Release \\\n      -D CMAKE_PREFIX_PATH=${YOUR_OPENCV_INSTALL_PATH}\ncmake --build src/build -j$(nproc)\n```\n\nAdd a reference to the built shared library:\n```bash\nexport LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}:/path/to/opencvsharp/src/build/OpenCvSharpExtern\"\n```\n\n#### Build managed library (both options)\n```bash\ndotnet build src/OpenCvSharp/OpenCvSharp.csproj -c Release\n```\n## Customizing OpenCV and OpenCvSharp for embedded (ARM) Platforms\n\nIf you want to use OpenCV and OpenCvSharp on an embedded platform like a Raspberry Pi with a 64-bit OS, you have to build both libraries manually, and it's easiest to build it right on your target hardware to avoid cross-compiler toolchain challenges.  [The instructions for this build and install are here](docs/embedded-builds.md).\n\n## Donations\nIf you find the OpenCvSharp library useful and would like to show your gratitude by donating, here are some donation options. Thank you.\n\nhttps://github.com/sponsors/shimat\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F9E:2B291E:183820:5E72F5:6AB92AD4"},"text_sha256":"78bfbfe9d3cb75d15613c27e1029b347a21a546f638e22573433607d090c3428"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"snorkel-team/snorkel","input_row":{"repository":"snorkel-team/snorkel","url":"https://github.com/snorkel-team/snorkel","name":"snorkel","owner":"snorkel-team","description":"A system for quickly generating training data with weak supervision","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6009,"issues":982,"created_at":"2016-02-26T05:52:45Z","updated_at":"2026-09-24T15:01:31Z","first_commit_at":"2016-02-26T08:22:43Z","last_commit_at":"2026-04-10T17:37:33Z","activity_months":121.43000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:21.820Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"snorkel-team/snorkel","visibility":"public","created_at":"2016-02-26T05:52:45Z","updated_at":"2026-09-24T15:01:31Z","private":false,"fork":false,"archived":false,"stargazers_count":6009,"open_issues_count":18,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2498","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17C2047:1BE4C09:6AB92AD5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2497","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17CBE02:1BEF4FB:6AB92AD6"},"commit":{"sha":"8dc1e889cec5baeeb134c9f823d48e69832e94e8","url":"https://github.com/snorkel-team/snorkel/commit/8dc1e889cec5baeeb134c9f823d48e69832e94e8","date":"2018-05-15T04:07:29Z","author_date":"2018-05-15T04:07:29Z","committer_date":"2018-05-15T04:07:29Z","tree_sha":"5b460b19f50032fc65ba82b7248e42b700e8ccf0","message_first_line":"Made feature matrix for PyTorch unit testing."},"tree_request_status":200,"tree_rate":{"github_remaining":"2496","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:1806A79:1C2A4B2:6AB92AD6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12836,"blob_sha":"c1123c026b3b443b0b670ecba68fc665be0eb3ae","priority":0}],"documents":[{"path":"README.md","size":12836,"blob_sha":"c1123c026b3b443b0b670ecba68fc665be0eb3ae","priority":0,"status":200,"text":"<img src=\"figs/logo_01.png\" width=\"150\"/>\n\n\n**_v0.7.0-beta_**\n\n[![Build Status](https://travis-ci.org/HazyResearch/snorkel.svg?branch=master)](https://travis-ci.org/HazyResearch/snorkel)\n[![Documentation](https://readthedocs.org/projects/snorkel/badge/)](http://snorkel.readthedocs.io/en/master/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## Acknowledgements\n<img src=\"figs/darpa.JPG\" width=\"80\" height=\"80\" align=\"middle\" /> <img src=\"figs/ONR.jpg\" width=\"100\" height=\"80\" align=\"middle\" /> <img src=\"figs/moore_logo.png\" width=\"100\" height=\"60\" align=\"middle\" /> <img src=\"figs/nih_logo.png\" width=\"80\" height=\"60\" align=\"middle\" /> <img src=\"figs/mobilize_logo.png\" width=\"100\" height=\"60\" align=\"middle\" />\n\n*Sponsored in part by DARPA as part of the [D3M](https://www.darpa.mil/program/data-driven-discovery-of-models) program under contract No. FA8750-17-2-0095 and the [SIMPLEX](http://www.darpa.mil/program/simplifying-complexity-in-scientific-discovery) program under contract number N66001-15-C-4043, and also by the NIH through the [Mobilize Center](http://mobilize.stanford.edu/) under grant number U54EB020405.*\n\n## Getting Started\n\n* Get started with the tutorials [below](#tutorial-quick-start)\n* Documentation [here](http://snorkel.readthedocs.io/en/master/)\n\n## Motivation\nSnorkel is a system for rapidly **creating, modeling, and managing training data**, currently focused on accelerating the development of _structured or \"dark\" data extraction applications_ for domains in which large labeled training sets are not available or easy to obtain.\n\nToday's state-of-the-art machine learning models require massive labeled training sets--which usually do not exist for real-world applications. Instead, Snorkel is based around the new [data programming](https://papers.nips.cc/paper/6523-data-programming-creating-large-training-sets-quickly) paradigm, in which the developer focuses on writing a set of labeling functions, which are just scripts that programmatically label data. The resulting labels are noisy, but Snorkel automatically models this process—learning, essentially, which labeling functions are more accurate than others—and then uses this to train an end model (for example, a deep neural network in TensorFlow).\n\n_Surprisingly_, by modeling a noisy training set creation process in this way, we can take potentially low-quality labeling functions from the user, and use these to train high-quality end models. We see Snorkel as providing a general framework for many [_weak supervision_](http://hazyresearch.github.io/snorkel/blog/weak_supervision.html) techniques, and as defining a new programming model for weakly-supervised machine learning systems.\n\n## Users\nWe're lucky to have some amazing collaborators who are currently using Snorkel!\n\n<img src=\"figs/user_logos.png\" width=\"500\" height=\"200\" align=\"middle\" />\n\nHowever, **_Snorkel is very much a work in progress_**, so we're eager for any and all feedback... let us know what you think and how we can improve Snorkel in the [Issues](https://github.com/HazyResearch/snorkel/issues) section!\n\n## References\n\n### Best References:\n* **_[Snorkel: Rapid Training Data Creation with Weak Supervision](https://arxiv.org/abs/1711.10160)_ (VLDB 2018)**\n* **_[Data Programming: Creating Large Training Sets, Quickly](https://papers.nips.cc/paper/6523-data-programming-creating-large-training-sets-quickly)_ (NIPS 2016)**\n* **_[Learning the Structure of Generative Models without Labeled Data](https://arxiv.org/abs/1703.00854)_ (ICML 2017)**\n* _[Snorkel: Fast Training Set Generation for Information Extraction](http://hazyresearch.github.io/snorkel/pdfs/snorkel_demo.pdf)_ (SIGMOD DEMO 2017)\n* _[Inferring Generative Model Structure with Static Analysis](https://arxiv.org/abs/1709.02477)_ (NIPS 2017)\n* _[Data Programming with DDLite: Putting Humans in a Different Part of the Loop](http://cs.stanford.edu/people/chrismre/papers/DDL_HILDA_2016.pdf)_ (HILDA @ SIGMOD 2016; note Snorkel was previously <em>DDLite<\/em>)\n* _[Socratic Learning: Correcting Misspecified Generative Models using Discriminative Models](https://arxiv.org/abs/1610.08123)_\n* _[Fonduer: Knowledge Base Construction from Richly Formatted Data](https://arxiv.org/abs/1703.05028)_\n\n### Further Reading:\n* _[Learning to Compose Domain-Specific Transformations for Data Augmentation](https://arxiv.org/abs/1709.01643)_ (NIPS 2017)\n* _[Gaussian Quadrature for Kernel Features](https://arxiv.org/abs/1709.02605)_ (NIPS 2017)\n\n## Tutorial Quick Start\n\nThis section has the commands to quickly get started running the tutorial notebooks.\nFor more detailed installation instructions, see the [Installation section](#installation) below.\nThese instructions assume that you already have [conda](https://conda.io/) installed.\n\nFirst, download and extract a copy of the Snorkel directory from a [GitHub release](https://github.com/HazyResearch/snorkel/releases) (version 0.7.0 or greater).\nThen navigate to the root of the `snorkel` directory in a terminal and run the following:\n\n```sh\n# Install the environment\nconda env create --file=environment.yml\n\n# Activate the environment\nconda activate snorkel\n\n# Install snorkel in the environment\npip install .\n\n# Activate jupyter widgets\njupyter nbextension enable --py widgetsnbextension\n\n# Initiate a jupyter notebook server\njupyter notebook\n```\n\nThen a Jupyter notebook tab will open in your browser.\nFrom within the Jupyter browser, navigate to the [`tutorials`](tutorials) directory and try out one of the existing notebooks!\n\nThe [introductory tutorial](tutorials/intro) in `tutorials/intro` covers the entire Snorkel workflow, showing how to extract spouse relations from news articles.\nYou can also check out all the great [materials](https://simtk.org/frs/?group_id=1263) from the recent Mobilize Center-hosted [Snorkel workshop](http://mobilize.stanford.edu/events/snorkelworkshop2017/)!\n\nHave fun and get 🏊🏊🏊!\n\n## Release Notes\n\n### Major changes in v0.7:\n* [PyTorch](https://pytorch.org/) classifiers\n* Installation now via [Conda](https://conda.io/) and `pip`\n* Now [spaCy](https://spacy.io/) is the default parser (v1), with support for v2\n* And many more fixes, additions, and new material!\n\n### Older versions\n\n<details>\n\n### Major changes in v0.6:\n\n* Support for categorical classification, including \"dynamically-scoped\" or _blocked_ categoricals (see [tutorial](tutorials/advanced/Categorical_Classes.ipynb))\n* Support for structure learning (see [tutorial](tutorials/advanced/Structure_Learning.ipynb), ICML 2017 paper)\n* Support for labeled data in generative model\n* Refactor of TensorFlow bindings; fixes grid search and model saving / reloading issues (see `snorkel/learning`)\n* New, simplified Intro tutorial ([here](tutorials/intro))\n* Refactored parser class and support for [spaCy](https://spacy.io/) as new parser\n* Support for easy use of the [BRAT annotation tool](http://brat.nlplab.org/) (see [tutorial](tutorials/advanced/BRAT_Annotations.ipynb))\n* Initial Spark integration, for scale out of LF application (see [tutorial](tutorials/snark/Snark%20Tutorial.ipynb))\n* Tutorial on using crowdsourced data [here](tutorials/crowdsourcing/Crowdsourced_Sentiment_Analysis.ipynb)\n* Integration with [Apache Tika](http://tika.apache.org/) via the [Tika Python](http://github.com/chrismattmann/tika-python.git) binding.\n* And many more fixes, additions, and new material!\n\n<\/details>\n\n## Installation\n\nStarting with version 0.7.0, Snorkel should be installed as a Python package using `pip`.\nHowever, installing Snorkel via `pip` will not install dependencies, which are required for Snorkel to run.\nTo manage its dependencies, Snorkel uses [conda](https://conda.io/), which allows specifying an environment via an `environment.yml` file.\n\nThis documentation covers two common cases (usage and development) for setting up conda environments for Snorkel.\nIn both cases, the environment can be activated using `conda activate snorkel` and deactivated using `conda deactivate`\n(for versions of conda prior to 4.4, replace `conda` with `source` in these commands).\nUsers just looking to try out a Snorkel tutorial notebook should see the quick-start instructions above.\n\n### Usage Environment\n\nThis setup is intended for users who would like to use Snorkel in their own applications by importing the package.\nIn such cases, users should define a custom `environment.yml` to manage their project's dependencies.\nWe recommend starting with the [`environment.yml`](environment.yml) in this repository.\nThe below modifications can help customize it for your needs:\n\n<details>\n\n1. Specifying versions for the listed packages, such as changing `python` to `python=3.6.5`.\nVersioned specification of your environment is critical to reproducibility and ensuring dependency updates do not break your pipeline.\nWhen first setting your package versions, you likely want to start with the latest versions available on the [conda-forge](https://anaconda.org/conda-forge/) channel, unless you have a reason to do otherwise.\n2. Adding other packages to your environment as required by your use case.\nConsider maintaining alphabetical sorting of packages in `environment.yml` to assist with maintainability.\nIn addition, we recommend installing packages via pip, only if they are not available in the conda-forge channel.\n3. Add the `snorkel` package installation to your `environment.yml`, under the `- pip` section.\nOf course, we suggest versioning snorkel, which you can do via a release number or commit hash (to access more bleeding edge functionality)\n  ```yml\n    # Versioned via release tag\n    - git+https://github.com/HazyResearch/snorkel@v0.6.3\n    # Versioned via commit hash (commit hash below is fake to ensure you change it)\n    - git+https://github.com/HazyResearch/snorkel@7eb7076f70078c06bef9752f22acf92fd86e616a\n  ```\nFinally, consider versioning the `numbskull` and `treedlib` pip dependencies by changing `master` to their latest commit hash on GitHub.\n\n<\/details>\n\n### Development Environment\n\nThis setup is intended for users who have cloned this repository and would like to access the environment for development.\nThis approach installs the `snorkel` package in development mode, meaning that changes you make to the source code will automatically be applied to the `snorkel` package in the environment.\n\n```sh\n# From the root direcectory of this repo run the following command.\nconda env create --file=environment.yml\n\n# Activate the conda environment (if using a version of conda below 4.4, use \"source\" instead of \"conda\")\nconda activate snorkel\n\n# Install snorkel in development mode\npip install --editable .\n```\n\n### Additional installation notes\n\n<details>\n\nSnorkel can be installed directly from its GitHub repository via:\n\n```\n# WARNING: read installation section before running this command! This command\n# does not install any dependencies. It installs the latest master version but\n# you can change master to tag or commit\npip install git+https://github.com/HazyResearch/snorkel@master\n```\n\n_Note: Currently the `Viewer` is supported on the following versions:_\n* `jupyter`: 4.1\n* `jupyter notebook`: 4.2\n\n<\/details>\n\n## Q & A\n**Many questions about Snorkel get answered in the issues section--along with general discussions and conversations of interest.\nWe tag these all as \"Q&A\" and save them [here](https://github.com/HazyResearch/snorkel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Q%26A%22+)**\n\n## Issues\nWe like [issues](https://github.com/HazyResearch/snorkel/issues) as a place to put bugs, questions, feature requests, etc- don't be shy!\nIf submitting an issue about a bug, however, **please provide a pointer to a notebook (and relevant data) to reproduce it.**\n\n*Note: if you have an issue with the matplotlib install related to the module `freetype`, see [this post](http://stackoverflow.com/questions/20533426/ubuntu-running-pip-install-gives-error-the-following-required-packages-can-no); if you have an issue installing ipython, try [upgrading setuptools](http://stackoverflow.com/questions/35943606/error-on-installing-ipython-for-python-3-sys-platform-darwin-and-platform)*\n\n## Jupyter Notebook Best Practices\n\nSnorkel is built specifically with usage in **Jupyter/IPython notebooks** in mind; an incomplete set of best practices for the notebooks:\n\n<details>\n\nIt's usually most convenient to write most code in an external `.py` file, and load as a module that's automatically reloaded; use:\n```python\n%load_ext autoreload\n%autoreload 2\n```\nA more convenient option is to add these lines to your IPython config file, in `~/.ipython/profile_default/ipython_config.py`:\n```\nc.InteractiveShellApp.extensions = ['autoreload']     \nc.InteractiveShellApp.exec_lines = ['%autoreload 2']\n```\n\n<\/details>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF32:35999:178660:5DC1C1:6AB92AD7"},"text_sha256":"3babe77242264e1ea2f033cfab3582eaa2b1ede98f6f84abb9bb674d52cfba69"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2495","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17E672B:1C09E9B:6AB92AD7"},"commit":{"sha":"45824f9867228c6cb6c9fdc2afd2b7e5bb7fd0b3","url":"https://github.com/snorkel-team/snorkel/commit/45824f9867228c6cb6c9fdc2afd2b7e5bb7fd0b3","date":"2026-04-10T17:37:33Z","author_date":"2026-04-10T17:37:33Z","committer_date":"2026-04-10T17:37:33Z","tree_sha":"38b78ecda51cd7d57ca96853d03a50189d755377","message_first_line":"Update Snorkel project link in README"},"tree_request_status":200,"tree_rate":{"github_remaining":"2494","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:17F0E0F:1C1432F:6AB92AD7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8319,"blob_sha":"783d365e3ebf31b65fdec5fadcd97faba4d6e237","priority":0}],"documents":[{"path":"README.md","size":8319,"blob_sha":"783d365e3ebf31b65fdec5fadcd97faba4d6e237","priority":0,"status":200,"text":"<img src=\"figs/logo_01.png\" width=\"150\"/>\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/snorkel)\n![PyPI](https://img.shields.io/pypi/v/snorkel)\n![Conda](https://img.shields.io/conda/v/conda-forge/snorkel)\n[![docs](https://readthedocs.org/projects/snorkel/badge/?version=master)](https://snorkel.readthedocs.io/en/master)\n[![coverage](https://codecov.io/gh/snorkel-team/snorkel/branch/master/graph/badge.svg)](https://codecov.io/gh/snorkel-team/snorkel/branch/master)\n[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n***Programmatically Build and Manage Training Data***\n\n## Announcement\n\n**The Snorkel team is now focusing their efforts on Snorkel Flow, an end-to-end AI application development platform based on the core ideas behind Snorkel—you can check it out [here](https://snorkel.ai) or [join us](https://www.snorkel.ai/careers) in building it!**\n\nThe [Snorkel project](https://snorkelproject.org/) started at Stanford in 2015 with a simple technical bet: that it would increasingly be the **training data**, not the models, algorithms, or infrastructure, that decided whether a machine learning project succeeded or failed. Given this premise, we set out to explore the radical idea that you could bring mathematical and systems structure to the messy and often entirely manual process of training data creation and management, starting by empowering users to **programmatically label, build, and manage** training data.\n\nTo say that the Snorkel project succeeded and expanded beyond what we had ever expected would be an understatement. The basic goals of a research repo like Snorkel are to provide a minimum viable framework for testing and validating hypotheses. Four years later, we’ve been fortunate to do not just this, but to develop and deploy early versions of Snorkel in partnership with some of the world’s leading organizations like [Google](https://ai.googleblog.com/2019/03/harnessing-organizational-knowledge-for.html), [Intel](https://dl.acm.org/doi/abs/10.1145/3329486.3329492), [Stanford Medicine](https://www.cell.com/patterns/fulltext/S2666-3899(20)30019-2), and many more; author over [sixty peer-reviewed publications](https://snorkel.ai/technology) on our findings around Snorkel and related innovations in weak supervision modeling, data augmentation, multi-task learning, and more; be included in courses at top-tier universities; support production deployments in systems that you’ve likely used in the last few hours; and work with an amazing community of researchers and practitioners from industry, medicine, government, academia, and beyond.\n\nHowever, we realized increasingly–from conversations with users in weekly office hours, workshops, online discussions, and industry partners–that the Snorkel project was just the very first step. The ideas behind Snorkel change not just how you label training data, but so much of the entire lifecycle and pipeline of building, deploying, and managing ML: how users inject their knowledge; how models are constructed, trained, inspected, versioned, and monitored; how entire pipelines are developed iteratively; and how the full set of stakeholders in any ML deployment, from subject matter experts to ML engineers, are incorporated into the process.\n\nOver the last year, we have been building the platform to support this broader vision: [Snorkel Flow](https://snorkel.ai/snorkel-flow-platform/), an end-to-end machine learning platform for developing and deploying AI applications. Snorkel Flow incorporates many of the concepts of the Snorkel project with a range of newer techniques around weak supervision modeling, data augmentation, multi-task learning, data slicing and structuring, monitoring and analysis, and more, all of which integrate in a way that is greater than the sum of its parts–and that we believe makes ML truly faster, more flexible, and more practical than ever before.\n\nMoving forward, we will be focusing our efforts on Snorkel Flow. We are extremely grateful for all of you that have contributed to the Snorkel project, and are excited for you to check out our next chapter [here](https://snorkel.ai).\n\n\n# Quick Links\n* [Snorkel website](https://snorkel.org)\n* [Snorkel tutorials](https://github.com/snorkel-team/snorkel-tutorials)\n* [Snorkel documentation](https://snorkel.readthedocs.io/)\n* [Snorkel community forum](https://spectrum.chat/snorkel)\n* [Snorkel mailing list](https://groups.google.com/forum/#!forum/snorkel-ml)\n* [Snorkel Twitter](https://twitter.com/SnorkelAI)\n\n# Getting Started\nThe quickest way to familiarize yourself with the Snorkel library is to walk through the [Get Started](https://snorkel.org/get-started/) page on the Snorkel website, followed by the full-length tutorials in the [Snorkel tutorials](https://github.com/snorkel-team/snorkel-tutorials) repository.\nThese tutorials demonstrate a variety of tasks, domains, labeling techniques, and integrations that can serve as templates as you apply Snorkel to your own applications.\n\n\n# Installation\n\nSnorkel requires Python 3.11 or later. To install Snorkel, we recommend using `pip`:\n\n```bash\npip install snorkel\n```\n\nor `conda`:\n\n```bash\nconda install snorkel -c conda-forge\n```\n\nFor information on installing from source and contributing to Snorkel, see our\n[contributing guidelines](./CONTRIBUTING.md).\n\n<details><summary><b>Details on installing with <tt>conda<\/tt><\/b><\/summary>\n<p>\n\nThe following example commands give some more color on installing with `conda`.\nThese commands assume that your `conda` installation is Python 3.11,\nand that you want to use a virtual environment called `snorkel-env`.\n\n```bash\n# [OPTIONAL] Activate a virtual environment called \"snorkel\"\nconda create --yes -n snorkel-env python=3.11\nconda activate snorkel-env\n\n# We specify PyTorch here to ensure compatibility, but it may not be necessary.\nconda install pytorch==1.1.0 -c pytorch\nconda install snorkel==0.9.0 -c conda-forge\n```\n\n<\/p>\n<\/details>\n\n<details><summary><b>A quick note for Windows users<\/b><\/summary>\n<p>\n\nIf you're using Windows, we highly recommend using Docker\n(you can find an example in our\n[tutorials repo](https://github.com/snorkel-team/snorkel-tutorials/blob/master/Dockerfile))\nor the [Linux subsystem](https://docs.microsoft.com/en-us/windows/wsl/faq).\nWe've done limited testing on Windows, so if you want to contribute instructions\nor improvements, feel free to open a PR!\n\n<\/p>\n<\/details>\n\n# Discussion\n\n## Issues\nWe use [GitHub Issues](https://github.com/snorkel-team/snorkel/issues) for posting bugs and feature requests — anything code-related.\nJust make sure you search for related issues first and use our Issues templates.\nWe may ask for contributions if a prompt fix doesn't fit into the immediate roadmap of the core development team.\n\n## Contributions\nWe welcome contributions from the Snorkel community! \nThis is likely the fastest way to get a change you'd like to see into the library.\n\nSmall contributions can be made directly in a pull request (PR).\nIf you would like to contribute a larger feature, we recommend first creating an issue with a proposed design for discussion. \nFor ideas about what to work on, we've labeled specific issues as [`help wanted`](https://github.com/snorkel-team/snorkel/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+).\n\nTo set up a development environment for contributing back to Snorkel, see our [contributing guidelines](./CONTRIBUTING.md).\nAll PRs must pass the continuous integration tests and receive approval from a member of the Snorkel development team before they will be merged.\n\n## Community Forum\nFor broader Q&A, discussions about using Snorkel, tutorial requests, etc., use the [Snorkel community forum](https://spectrum.chat/snorkel) hosted on Spectrum.\nWe hope this will be a venue for you to interact with other Snorkel users — please don't be shy about posting!\n\n## Announcements\nTo stay up-to-date on Snorkel-related announcements (e.g. version releases, upcoming workshops), subscribe to the [Snorkel mailing list](https://groups.google.com/forum/#!forum/snorkel-ml). We promise to respect your inboxes — communication will be sparse!\n\n## Twitter\nFollow us on Twitter [@SnorkelAI](https://twitter.com/SnorkelAI).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:17F4E4:5E2E53:6AB92AD8"},"text_sha256":"bebece4bc8f23365ef4a8372d8c2fd4d6dd6ffd137024702d9b977c2742b498b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"keras-rl/keras-rl","input_row":{"repository":"keras-rl/keras-rl","url":"https://github.com/keras-rl/keras-rl","name":"keras-rl","owner":"keras-rl","description":"Deep Reinforcement Learning for Keras.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5548,"issues":241,"created_at":"2016-07-02T15:53:12Z","updated_at":"2026-09-17T15:42:12Z","first_commit_at":"2016-07-02T15:28:46Z","last_commit_at":"2019-11-11T22:14:54Z","activity_months":40.32,"ai_ml_match_topics":"machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:25.165Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"keras-rl/keras-rl","visibility":"public","created_at":"2016-07-02T15:53:12Z","updated_at":"2026-09-17T15:42:12Z","private":false,"fork":false,"archived":false,"stargazers_count":5548,"open_issues_count":47,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2493","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:17F7BA8:1C1B1C0:6AB92AD9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2492","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:17826D0:1BA5E56:6AB92AD9"},"commit":{"sha":"f19b75de06f1c7f902a0cbdaec7203b355d81765","url":"https://github.com/keras-rl/keras-rl/commit/f19b75de06f1c7f902a0cbdaec7203b355d81765","date":"2018-05-22T07:37:21Z","author_date":"2018-05-22T07:37:21Z","committer_date":"2018-05-22T07:37:21Z","tree_sha":"1c3d5d9ff2d96c9deedea5beb2e2fc299e2acd6b","message_first_line":"Remove unnecessary download_url from setup.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"2491","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093B:280FBC:17BBBBD:1BDE060:6AB92AD9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8616,"blob_sha":"ac3f0f04d5f49af40a522e8cee23ab6979e53313","priority":0}],"documents":[{"path":"README.md","size":8616,"blob_sha":"ac3f0f04d5f49af40a522e8cee23ab6979e53313","priority":0,"status":200,"text":"# Deep Reinforcement Learning for Keras\n[![Build Status](https://api.travis-ci.org/keras-rl/keras-rl.svg?branch=master)](https://travis-ci.org/keras-rl/keras-rl)\n[![Documentation](https://readthedocs.org/projects/keras-rl/badge/)](http://keras-rl.readthedocs.io/)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/keras-rl/keras-rl/blob/master/LICENSE)\n[![Join the chat at https://gitter.im/keras-rl/Lobby](https://badges.gitter.im/keras-rl/Lobby.svg)](https://gitter.im/keras-rl/Lobby)\n\n\n<table>\n  <tr>\n    <td><img src=\"/assets/breakout.gif?raw=true\" width=\"200\"><\/td>\n    <td><img src=\"/assets/cartpole.gif?raw=true\" width=\"200\"><\/td>\n    <td><img src=\"/assets/pendulum.gif?raw=true\" width=\"200\"><\/td>\n  <\/tr>\n<\/table>\n\n## News\n\n**03/20/2018** - Travis build is functional, Keras v2.1.5 and gym v0.10.3 are now supported\n\n**03/13/2018** - More maintainers from [Sicara](http://www.sicara.com) have joined this repo to help Matthias. The roadmap for the next few weeks is the following:\n- ~~Fix Travis build and update for Keras v2.1.5~~\n- Add documentation\n- Review issues and PR\n- Add state-of-the-art algorithms (A3C, DDPG)\n\n## What is it?\n`keras-rl` implements some state-of-the art deep reinforcement learning algorithms in Python and seamlessly integrates with the deep learning library [Keras](http://keras.io). Just like Keras, it works with either [Theano](http://deeplearning.net/software/theano/) or [TensorFlow](https://www.tensorflow.org/), which means that you can train your algorithm efficiently either on CPU or GPU.\nFurthermore, `keras-rl` works with [OpenAI Gym](https://gym.openai.com/) out of the box. This means that evaluating and playing around with different algorithms is easy.\nOf course you can extend `keras-rl` according to your own needs. You can use built-in Keras callbacks and metrics or define your own.\nEven more so, it is easy to implement your own environments and even algorithms by simply extending some simple abstract classes.\n\nIn a nutshell: `keras-rl` makes it really easy to run state-of-the-art deep reinforcement learning algorithms, uses Keras and thus Theano or TensorFlow and was built with OpenAI Gym in mind.\n\n## What is included?\nAs of today, the following algorithms have been implemented:\n\n- Deep Q Learning (DQN) [[1]](http://arxiv.org/abs/1312.5602), [[2]](https://www.nature.com/articles/nature14236)\n- Double DQN [[3]](http://arxiv.org/abs/1509.06461)\n- Deep Deterministic Policy Gradient (DDPG) [[4]](http://arxiv.org/abs/1509.02971)\n- Continuous DQN (CDQN or NAF) [[6]](http://arxiv.org/abs/1603.00748)\n- Cross-Entropy Method (CEM) [[7]](http://learning.mpi-sws.org/mlss2016/slides/2016-MLSS-RL.pdf), [[8]](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.81.6579&rep=rep1&type=pdf)\n- Dueling network DQN (Dueling DQN) [[9]](https://arxiv.org/abs/1511.06581)\n- Deep SARSA [[10]](http://people.inf.elte.hu/lorincz/Files/RL_2006/SuttonBook.pdf)\n\nYou can find more information on each agent in the [doc](http://keras-rl.readthedocs.io/en/latest/agents/overview/).\n\nI'm currently working on the following algorithms, which can be found on the `experimental` branch:\n\n- Asynchronous Advantage Actor-Critic (A3C) [[5]](http://arxiv.org/abs/1602.01783)\n\nNotice that these are **only experimental** and might currently not even run.\n\n## How do I install it and how do I get started?\nInstalling `keras-rl` is easy. Just run the following commands and you should be good to go:\n```bash\npip install keras-rl\n```\nThis will install `keras-rl` and all necessary dependencies.\n\nIf you want to run the examples, you'll also have to install `gym` by OpenAI.\nPlease refer to [their installation instructions](https://github.com/openai/gym#installation).\nIt's quite easy and works nicely on Ubuntu and Mac OS X.\nYou'll also need the `h5py` package to load and save model weights, which can be installed using\nthe following command:\n```bash\npip install h5py\n```\n\nOnce you have installed everything, you can try out a simple example:\n```bash\npython examples/dqn_cartpole.py\n```\nThis is a very simple example and it should converge relatively quickly, so it's a great way to get started!\nIt also visualizes the game during training, so you can watch it learn. How cool is that?\n\nUnfortunately, the documentation of `keras-rl` is currently almost non-existent.\nHowever, you can find a couple of more examples that illustrate the usage of both DQN (for tasks with discrete actions) as well as for DDPG (for tasks with continuous actions).\nWhile these examples are not replacement for a proper documentation, they should be enough to get started quickly and to see the magic of reinforcement learning yourself.\nI also encourage you to play around with other environments (OpenAI Gym has plenty) and maybe even try to find better hyperparameters for the existing ones.\n\nIf you have questions or problems, please file an issue or, even better, fix the problem yourself and submit a pull request!\n\n## Do I have to train the models myself?\nTraining times can be very long depending on the complexity of the environment.\n[This repo](https://github.com/matthiasplappert/keras-rl-weights) provides some weights that were obtained by running (at least some) of the examples that are included in `keras-rl`.\nYou can load the weights using the `load_weights` method on the respective agents.\n\n## Requirements\n- Python 2.7 or Python 3.5\n- [Keras](http://keras.io) >= 1.0.7\n\nThat's it. However, if you want to run the examples, you'll also need the following dependencies:\n- [OpenAI Gym](https://github.com/openai/gym)\n- [h5py](https://pypi.python.org/pypi/h5py)\n\n`keras-rl` also works with [TensorFlow](https://www.tensorflow.org/). To find out how to use TensorFlow instead of [Theano](http://deeplearning.net/software/theano/), please refer to the [Keras documentation](http://keras.io/#switching-from-theano-to-tensorflow).\n\n## Documentation\nWe are currently in the process of getting a proper documentation going. [The latest version of the\ndocumentation is available online](http://keras-rl.readthedocs.org). All contributions to the\ndocumentation are greatly appreciated!\n\n## Support\nYou can ask questions and join the development discussion:\n\n- On the [Keras-RL Google group](https://groups.google.com/forum/#!forum/keras-rl-users).\n- On the [Keras-RL Gitter channel](https://gitter.im/keras-rl/Lobby).\n\nYou can also post **bug reports and feature requests** (only!) in [Github issues](https://github.com/keras-rl/keras-rl/issues).\n\n## Running the Tests\nTo run the tests locally, you'll first have to install the following dependencies:\n```bash\npip install pytest pytest-xdist pep8 pytest-pep8 pytest-cov python-coveralls\n```\nYou can then run all tests using this command:\n```bash\npy.test tests/.\n```\nIf you want to check if the files conform to the PEP8 style guidelines, run the following command:\n```bash\npy.test --pep8\n```\n\n## Citing\nIf you use `keras-rl` in your research, you can cite it as follows:\n```bibtex\n@misc{plappert2016kerasrl,\n    author = {Matthias Plappert},\n    title = {keras-rl},\n    year = {2016},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/keras-rl/keras-rl}},\n}\n```\n\n\n## Acknowledgments\nThe foundation for this library was developed during my work at the [High Performance Humanoid Technologies (H²T)](https://h2t.anthropomatik.kit.edu/) lab at the [Karlsruhe Institute of Technology (KIT)](https://kit.edu).\nIt has since been adapted to become a general-purpose library.\n\n## References\n1. *Playing Atari with Deep Reinforcement Learning*, Mnih et al., 2013\n2. *Human-level control through deep reinforcement learning*, Mnih et al., 2015\n3. *Deep Reinforcement Learning with Double Q-learning*, van Hasselt et al., 2015\n4. *Continuous control with deep reinforcement learning*, Lillicrap et al., 2015\n5. *Asynchronous Methods for Deep Reinforcement Learning*, Mnih et al., 2016\n6. *Continuous Deep Q-Learning with Model-based Acceleration*, Gu et al., 2016\n7. *Learning Tetris Using the Noisy Cross-Entropy Method*, Szita et al., 2006\n8. *Deep Reinforcement Learning (MLSS lecture notes)*, Schulman, 2016\n9. *Dueling Network Architectures for Deep Reinforcement Learning*, Wang et al., 2016\n10. *Reinforcement learning: An introduction*, Sutton and Barto, 2011\n\n## Todos\n- Documentation: Work on the documentation has begun but not everything is documented in code yet. Additionally, it would be super nice to have guides for each agents that describe the basic ideas behind it.\n- TRPO, priority-based memory, A3C, async DQN, ...\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9E6:09BF:B1A39:2DF8DC:6AB92AD7"},"text_sha256":"1439143ed36727082b40b353cdae9c3ce253efd585feb7b94de98f57df3242f8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2490","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:17A9885:1BCCE78:6AB92ADA"},"commit":{"sha":"216c3145f3dc4d17877be26ca2185ce7db462bad","url":"https://github.com/keras-rl/keras-rl/commit/216c3145f3dc4d17877be26ca2185ce7db462bad","date":"2019-11-11T22:14:54Z","author_date":"2019-11-11T22:14:54Z","committer_date":"2019-11-11T22:14:54Z","tree_sha":"fa5239b3dc7c3dc4f6cefee742c364bac8b409f2","message_first_line":"Instrument Weights & Biases (#341)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2489","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092B:77994:17E8682:1C0BD59:6AB92ADB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5442,"blob_sha":"6dd94f27509826d737f9c4aa98c1d0b2585f63f0","priority":0}],"documents":[{"path":"README.md","size":5442,"blob_sha":"6dd94f27509826d737f9c4aa98c1d0b2585f63f0","priority":0,"status":200,"text":"# Deep Reinforcement Learning for Keras\n\n[![Build Status](https://api.travis-ci.org/keras-rl/keras-rl.svg?branch=master)](https://travis-ci.org/keras-rl/keras-rl)\n[![Documentation](https://readthedocs.org/projects/keras-rl/badge/)](http://keras-rl.readthedocs.io/)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/keras-rl/keras-rl/blob/master/LICENSE)\n[![Join the chat at https://gitter.im/keras-rl/Lobby](https://badges.gitter.im/keras-rl/Lobby.svg)](https://gitter.im/keras-rl/Lobby)\n\n<table>\n  <tr>\n    <td><img src=\"/assets/breakout.gif?raw=true\" width=\"200\"><\/td>\n    <td><img src=\"/assets/cartpole.gif?raw=true\" width=\"200\"><\/td>\n    <td><img src=\"/assets/pendulum.gif?raw=true\" width=\"200\"><\/td>\n  <\/tr>\n<\/table>\n\n## What is it?\n\n`keras-rl` implements some state-of-the art deep reinforcement learning algorithms in Python and seamlessly integrates with the deep learning library [Keras](http://keras.io).\n\nFurthermore, `keras-rl` works with [OpenAI Gym](https://gym.openai.com/) out of the box. This means that evaluating and playing around with different algorithms is easy.\n\nOf course you can extend `keras-rl` according to your own needs. You can use built-in Keras callbacks and metrics or define your own.\nEven more so, it is easy to implement your own environments and even algorithms by simply extending some simple abstract classes. Documentation is available [online](http://keras-rl.readthedocs.org).\n\n## What is included?\n\nAs of today, the following algorithms have been implemented:\n\n- [x] Deep Q Learning (DQN) [[1]](http://arxiv.org/abs/1312.5602), [[2]](https://www.nature.com/articles/nature14236)\n- [x] Double DQN [[3]](http://arxiv.org/abs/1509.06461)\n- [x] Deep Deterministic Policy Gradient (DDPG) [[4]](http://arxiv.org/abs/1509.02971)\n- [x] Continuous DQN (CDQN or NAF) [[6]](http://arxiv.org/abs/1603.00748)\n- [x] Cross-Entropy Method (CEM) [[7]](http://learning.mpi-sws.org/mlss2016/slides/2016-MLSS-RL.pdf), [[8]](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.81.6579&rep=rep1&type=pdf)\n- [x] Dueling network DQN (Dueling DQN) [[9]](https://arxiv.org/abs/1511.06581)\n- [x] Deep SARSA [[10]](http://people.inf.elte.hu/lorincz/Files/RL_2006/SuttonBook.pdf)\n- [ ] Asynchronous Advantage Actor-Critic (A3C) [[5]](http://arxiv.org/abs/1602.01783)\n- [ ] Proximal Policy Optimization Algorithms (PPO) [[11]](https://arxiv.org/abs/1707.06347)\n\nYou can find more information on each agent in the [doc](http://keras-rl.readthedocs.io/en/latest/agents/overview/).\n\n## Installation\n\n- Install Keras-RL from Pypi (recommended):\n\n```\npip install keras-rl\n```\n\n- Install from Github source:\n\n```\ngit clone https://github.com/keras-rl/keras-rl.git\ncd keras-rl\npython setup.py install\n```\n\n## Examples\n\nIf you want to run the examples, you'll also have to install:\n\n- **gym** by OpenAI: [Installation instruction](https://github.com/openai/gym#installation)\n- **h5py**: simply run `pip install h5py`\n\nFor atari example you will also need:\n\n- **Pillow**: `pip install Pillow`\n- **gym[atari]**: Atari module for gym. Use `pip install gym[atari]`\n\nOnce you have installed everything, you can try out a simple example:\n\n```bash\npython examples/dqn_cartpole.py\n```\n\nThis is a very simple example and it should converge relatively quickly, so it's a great way to get started!\nIt also visualizes the game during training, so you can watch it learn. How cool is that?\n\nSome sample weights are available on [keras-rl-weights](https://github.com/matthiasplappert/keras-rl-weights).\n\nIf you have questions or problems, please file an issue or, even better, fix the problem yourself and submit a pull request!\n\n## External Projects\n\n- [Starcraft II Learning Environment](https://soygema.github.io/starcraftII_machine_learning/#0)\n\nYou're using Keras-RL on a project? Open a PR and share it!\n\n## Visualizing Training Metrics\n\nTo see graphs of your training progress and compare across runs, run `pip install wandb` and add the WandbLogger callback to your agent's `fit()` call:\n\n```python\nfrom rl.callbacks import WandbLogger\n\n...\n\nagent.fit(env, nb_steps=50000, callbacks=[WandbLogger()])\n```\n\nFor more info and options, see the [W&B docs](https://docs.wandb.com/getting-started).\n\n## Citing\n\nIf you use `keras-rl` in your research, you can cite it as follows:\n\n```bibtex\n@misc{plappert2016kerasrl,\n    author = {Matthias Plappert},\n    title = {keras-rl},\n    year = {2016},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/keras-rl/keras-rl}},\n}\n```\n\n## References\n\n1. _Playing Atari with Deep Reinforcement Learning_, Mnih et al., 2013\n2. _Human-level control through deep reinforcement learning_, Mnih et al., 2015\n3. _Deep Reinforcement Learning with Double Q-learning_, van Hasselt et al., 2015\n4. _Continuous control with deep reinforcement learning_, Lillicrap et al., 2015\n5. _Asynchronous Methods for Deep Reinforcement Learning_, Mnih et al., 2016\n6. _Continuous Deep Q-Learning with Model-based Acceleration_, Gu et al., 2016\n7. _Learning Tetris Using the Noisy Cross-Entropy Method_, Szita et al., 2006\n8. _Deep Reinforcement Learning (MLSS lecture notes)_, Schulman, 2016\n9. _Dueling Network Architectures for Deep Reinforcement Learning_, Wang et al., 2016\n10. _Reinforcement learning: An introduction_, Sutton and Barto, 2011\n11. _Proximal Policy Optimization Algorithms_, Schulman et al., 2017\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8E82:241B62:179832:5DD38E:6AB92ADA"},"text_sha256":"39b645a60c79e85028965f90ec86994aa48d0fecb67a8e8a1241082f42c68a35"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"apple/coremltools","input_row":{"repository":"apple/coremltools","url":"https://github.com/apple/coremltools","name":"coremltools","owner":"apple","description":"Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":5433,"issues":1627,"created_at":"2017-06-30T07:39:02Z","updated_at":"2026-09-27T13:35:11Z","first_commit_at":"2017-06-30T07:39:02Z","last_commit_at":"2026-09-22T18:07:52Z","activity_months":110.76000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:27.880Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apple/coremltools","visibility":"public","created_at":"2017-06-30T07:39:02Z","updated_at":"2026-09-27T13:35:11Z","private":false,"fork":false,"archived":false,"stargazers_count":5433,"open_issues_count":515,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2488","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:17814C2:1BA30B8:6AB92ADB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2487","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0797:280FBC:17BBCEB:1BDE1FA:6AB92ADC"},"commit":{"sha":"4a0d816a0013aba530c067b3a2b2023061d2f620","url":"https://github.com/apple/coremltools/commit/4a0d816a0013aba530c067b3a2b2023061d2f620","date":"2018-05-20T22:26:50Z","author_date":"2018-05-20T22:26:50Z","committer_date":"2018-05-20T22:26:50Z","tree_sha":"a506df1a97f05844de22b5da22e53941724128d1","message_first_line":"Merge pull request #183 from apple/dev/visualizer_changes"},"tree_request_status":200,"tree_rate":{"github_remaining":"2486","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17C880C:1BEBC6F:6AB92ADC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3938,"blob_sha":"06e35e95fa72136458abf5b9b3a04ba621dc12b8","priority":0},{"path":"README.rst","size":2248,"blob_sha":"885ee449e19e68643de8f46025761bd59717c18f","priority":0}],"documents":[{"path":"README.md","size":3938,"blob_sha":"06e35e95fa72136458abf5b9b3a04ba621dc12b8","priority":0,"status":200,"text":"Core ML Community Tools\n=======================\n\nCore ML community tools contains all supporting tools for CoreML model\nconversion and validation. This includes Scikit Learn, LIBSVM, Caffe,\nKeras and XGBoost.\n\n\nWe recommend using virtualenv to use, install, or build coremltools. Be\nsure to install virtualenv using your system pip.\n\n```shell\npip install virtualenv\n```\n\nInstallation\n------------\n\nThe method for installing *coremltools* follows the\n[standard python package installation steps](https://packaging.python.org/installing/).\nTo create a Python virtual environment called `pythonenv` follow these steps:\n\n```shell\n# Create a folder for your virtualenv\nmkdir mlvirtualenv\ncd mlvirtualenv\n\n# Create a Python virtual environment for your CoreML project\nvirtualenv pythonenv\n```\n\nTo activate your new virtual environment and install `coremltools` in this environment, follow these steps:\n```\n# Active your virtual environment\nsource pythonenv/bin/activate\n\n\n# Install coremltools in the new virtual environment, pythonenv\n(pythonenv) pip install -U coremltools\n```\n\nThe package [documentation](https://apple.github.io/coremltools) contains\nmore details on how to use coremltools.\n\nDependencies\n------------\n\n*coremltools* has the following dependencies:\n\n- numpy (1.10.0+)\n- protobuf (3.1.0+)\n\nIn addition, it has the following soft dependencies that are only needed when\nyou are converting models of these formats:\n\n- Keras (1.2.2, 2.0.4+) with corresponding Tensorflow version\n- Xgboost (0.7+)\n- scikit-learn (0.17+)\n- libSVM\n\n\nBuilding from source\n--------------------\nTo build the project, you need [CMake](https://cmake.org) to configure the project\n\n```shell\ncmake .\n```\n\nafter which you can use make to build the project\n\n```shell\nmake\n```\n\nBuilding Installable Wheel\n---------------------------\nTo make a wheel/egg that you can distribute, you can do the following\n\n```shell\nmake dist \n```\n\nRunning Unit Tests\n-------------------\nIn order to run unit tests, you need pytest, pandas, and h5py. \n\n```shell\npip install pytest pandas h5py\n```\n\nTo add a new unit test, add it to the `coremltools/test` folder. Make sure you\nname the file with a 'test' as the prefix.\n\nAdditionally, running unit-tests would require more packages (like\nlibsvm)\n\n```shell\npip install -r test_requirements.pip\n```\n\nTo install libsvm\n\n```shell\ngit clone https://github.com/cjlin1/libsvm.git\ncd libsvm/\nmake\ncd python/\nmake\n```\n\nTo make sure you can run libsvm python bindings everywhere, you need the\nfollowing command, replacing `<LIBSVM_PATH>` with the path to the root of\nyour repository.\n\n```shell\nexport PYTHONPATH=${PYTHONPATH}:<LIBSVM_PATH>/python\n```\n\nTo install xgboost\n\n```shell\ngit clone --recursive https://github.com/dmlc/xgboost\ncd xgboost; cp make/minimum.mk ./config.mk; make\ncd python-package; python setup.py develop\n```\n\nTo install keras (Version >= 2.0)\n\n```shell\npip install keras tensorflow\n```\n\nIf you'd like to use the old keras version, you can:\n\n```shell\npip install keras==1.2.2 tensorflow\n```\n\nFinally, to run the most important unit tests, you can use:\n\n```shell\npytest -rs\n```\nsome tests are marked as slow because they test a lot of combinations.\nIf you want to run, all tests, you can use:\n\n```shell\npytest\n```\n\nBuilding Documentation\n----------------------\nFirst install all external dependencies.\n\n```shell\npip install Sphinx==1.5.3 sphinx-rtd-theme==0.2.4 numpydoc\npip install -e git+git://github.com/michaeljones/sphinx-to-github.git#egg=sphinx-to-github\n```\n\nYou also must have the *coremltools* package install, see the *Building* section.\n\nThen from the root of the repository:\n\n```shell\ncd docs\nmake html\nopen _build/html/index.html\n```\n\nExternal Tools\n--------------\nIn addition to the conversion tools in this package, TensorFlow and MXNet have their own conversion tools:\n\n- [TensorFlow](https://pypi.python.org/pypi/tfcoreml)\n- [MXNet](https://github.com/apache/incubator-mxnet/tree/master/tools/coreml)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7034:3CC8A:17D053:5E0BFC:6AB92AD7"},"text_sha256":"9e3f5a7d3be2b12c33bee0a7c60190e540c213cb92db8a8ad0d284dbaa8a070c"},{"path":"README.rst","size":2248,"blob_sha":"885ee449e19e68643de8f46025761bd59717c18f","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\ncoremltools\n===========\n\n`Core ML <http://developer.apple.com/documentation/coreml>`_\nis an Apple framework which allows developers to simply and easily integrate\nmachine learning (ML) models into apps running on Apple devices (including iOS,\nwatchOS, macOS, and tvOS).  Core ML introduces a public file format (.mlmodel)\nfor a broad set of ML methods including deep neural networks (both\nconvolutional and recurrent), tree ensembles with boosting, and generalized\nlinear models. Models in this format can be directly integrated into apps\nthrough Xcode.\n\n:code:`coremltools` is a python package for creating, examining, and testing models in\nthe .mlmodel format.  In particular, it can be used to:\n\n- Convert existing models to .mlmodel format from popular machine learning tools including Keras, Caffe, scikit-learn, libsvm, and XGBoost.\n- Express models in .mlmodel format through a simple API.\n- Make predictions with an .mlmodel (on select platforms for testing purposes).\n\nInstallation\n------------\n\nThe method for installing :code:`coremltools` follows the\n`standard python package installation steps <https://packaging.python.org/installing/>`_.\nOnce you have set up a python environment, run::\n\n    pip install -U coremltools\n\nThe package `documentation <https://apple.github.io/coremltools/>`_ contains\nmore details on how to use coremltools.\n\nDependencies\n------------\n\n:code:`coremltools` has the following dependencies:\n\n- numpy (1.10.0+)\n- protobuf (3.1.0+)\n\nIn addition, it has the following soft dependencies that are only needed when\nyou are converting models of these formats:\n\n- Keras (1.2.2, 2.0.4+) with corresponding Tensorflow version\n- Xgboost (0.7+)\n- scikit-learn (0.17+)\n- libSVM\n\nMore Information\n----------------\n\n- `Core ML framework documentation <http://developer.apple.com/documentation/coreml>`_\n- `Core ML model specification <https://apple.github.io/coremltools/coremlspecification>`_\n- `Machine learning at Apple <https://developer.apple.com/machine-learning>`_\n\nLicense\n-------\nCopyright (c) 2018, Apple Inc. All rights reserved.\n\nUse of this source code is governed by the \n`3-Clause BSD License <https://opensource.org/licenses/BSD-3-Clause>`_\nthat can be found in the LICENSE.txt file.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF90:727CE:1743FA:5D7FA1:6AB92ADC"},"text_sha256":"1f2eb00425dd770693942d7732a36f77301ae439a07e5ee64950ebcef6904f3f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2485","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F7:14A1F2:180D675:1C30F5C:6AB92ADE"},"commit":{"sha":"cac0e43df846b16558fc478d49420f95ea90203f","url":"https://github.com/apple/coremltools/commit/cac0e43df846b16558fc478d49420f95ea90203f","date":"2026-06-17T23:48:03Z","author_date":"2026-06-17T23:48:03Z","committer_date":"2026-06-17T23:48:03Z","tree_sha":"d4fd43c579923755af37e572bebec0ed0e3fea38","message_first_line":"Preserve floor_divide integer dtype (#2738)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2484","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:17A9AA9:1BCD18C:6AB92ADE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2865,"blob_sha":"208134c3b20968ed238b7175952be5a86aa2e84f","priority":0},{"path":"deps/protobuf/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1},{"path":"deps/pybind11/SECURITY.md","size":688,"blob_sha":"3d74611f2db85d7981287ad4314e2a868a1280d5","priority":1}],"documents":[{"path":"README.md","size":2865,"blob_sha":"208134c3b20968ed238b7175952be5a86aa2e84f","priority":0,"status":200,"text":"[![Build Status](https://img.shields.io/gitlab/pipeline/coremltools1/coremltools/main)](https://gitlab.com/coremltools1/coremltools/-/pipelines?page=1&scope=branches&ref=main)\n[![PyPI Release](https://img.shields.io/pypi/v/coremltools.svg)](#)\n[![Python Versions](https://img.shields.io/pypi/pyversions/coremltools.svg)](#)\n\n[Core ML Tools](https://apple.github.io/coremltools/docs-guides/source/overview-coremltools.html)\n=======================\n\n![Core ML Tools logo](docs/logo.png)\n\nUse [Core ML Tools](https://apple.github.io/coremltools/docs-guides/source/overview-coremltools.html) (*coremltools*) to convert machine learning models from third-party libraries to the Core ML format. This Python package contains the supporting tools for converting models from training libraries such as the following:\n\n* [TensorFlow 1.x](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf)\n* [TensorFlow 2.x](https://www.tensorflow.org/api_docs)\n* [PyTorch](https://pytorch.org/)\n* Non-neural network frameworks:\n\t* [scikit-learn](https://scikit-learn.org/stable/)\n\t* [XGBoost](https://xgboost.readthedocs.io/en/latest/)\n\t* [LibSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/)\n\nWith coremltools, you can:\n\n* Convert trained models to the Core ML format.\n* Read, write, and optimize Core ML models.\n* Verify conversion/creation (on macOS) by making predictions using Core ML.\n\nAfter conversion, you can integrate the Core ML models with your app using Xcode.\n\n## Install\n\nThe latest stable version is available from https://pypi.org/project/coremltools/\n\nTo install it use `pip` or the Python package manager of your choice.\n\n```shell\npip install coremltools\n```\n\n## Core ML\n\n[Core ML](https://developer.apple.com/documentation/coreml) is an Apple framework to integrate machine learning models into your app. Core ML provides a unified representation for all models. Your app uses Core ML APIs and user data to make predictions, and to fine-tune models, all on the user’s device. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on the user’s device removes any need for a network connection, which helps keep the user’s data private and your app responsive.\n\n## Resources\n\nTo install coremltools, see [Installing Core ML Tools](https://apple.github.io/coremltools/docs-guides/source/installing-coremltools.html). For more information, see the following:\n\n* [Release Notes](https://github.com/apple/coremltools/releases/)\n* [Guide and examples](https://apple.github.io/coremltools/docs-guides/index.html)\n* [API Reference](https://apple.github.io/coremltools/index.html)\n* [Core ML Specification](https://apple.github.io/coremltools/mlmodel/index.html)\n* [Building from Source](BUILDING.md)\n* [Contribution Guidelines](CONTRIBUTING.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CFCA:349C76:177CA5:5DB468:6AB92ADE"},"text_sha256":"1993fa6961bd6fe4035b9386ee3853b2b2fb7f600cc2e42ee97b9e3d462eef9f"},{"path":"deps/protobuf/SECURITY.md","size":176,"blob_sha":"76a40ee066a0b8390ee16dc2cd8a6568b442d58a","priority":1,"status":200,"text":"To report security concerns or vulnerabilities within protobuf, please use\nGoogle's official channel for reporting these.\n\nhttps://www.google.com/appserve/security-bugs/m2/new\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"246C:3BF56:175627:5D91E4:6AB92ACE"},"text_sha256":"356a8323a8eeab694dc5ba6795512fc7181198deff3eb11c192a5fb2112196e3"},{"path":"deps/pybind11/SECURITY.md","size":688,"blob_sha":"3d74611f2db85d7981287ad4314e2a868a1280d5","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Reporting a Vulnerability\n\nIf you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.\n\nPlease disclose it at [security advisory](https://github.com/pybind/pybind11/security/advisories/new).\n\nThis project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E86:A58F2:175714:5D930A:6AB92ADF"},"text_sha256":"c215a0badf3e980239d2cdbfc152f9455b7bb224b1e5e8bf18d6059c04756ea2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":3,"D1_evidence":"sha=cac0e43df846b16558fc478d49420f95ea90203f; file=README.md; text=[Core ML]( ) is an Apple framework to integrate machine learning models into your app. Core ML provides a unified representation for all models. Your app uses Core ML APIs and user data to make predictions, and to fine-tune models, all on the user’s device. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on the user’s device removes any need for a network connection, which helps keep the user’s data private and your app responsive.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=cac0e43df846b16558fc478d49420f95ea90203f; file=README.md; text=[Core ML]( ) is an Apple framework to integrate machine learning models into your app. Core ML provides a unified representation for all models. Your app uses Core ML APIs and user data to make predictions, and to fine-tune models, all on the user’s device. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on the user’s device removes any need for a network connection, which helps keep the user’s data private and your app responsive.","C2":"sha=cac0e43df846b16558fc478d49420f95ea90203f; file=README.md; text=[Core ML]( ) is an Apple framework to integrate machine learning models into your app. Core ML provides a unified representation for all models. Your app uses Core ML APIs and user data to make predictions, and to fine-tune models, all on the user’s device. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on the user’s device removes any need for a network connection, which helps keep the user’s data private and your app responsive.","C7":"sha=cac0e43df846b16558fc478d49420f95ea90203f; file=README.md; text=and to fine-tune models, all on the user’s device. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on the user’s device removes any need for a network connection, which helps keep the user’s data private and your app responsive. ## Resources For more information, see the following:"}}}}
{"repository":"lyst/lightfm","input_row":{"repository":"lyst/lightfm","url":"https://github.com/lyst/lightfm","name":"lightfm","owner":"lyst","description":"A Python implementation of LightFM, a hybrid recommendation algorithm.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":5112,"issues":510,"created_at":"2015-07-30T08:34:00Z","updated_at":"2026-09-16T10:34:31Z","first_commit_at":"2015-07-30T10:14:57Z","last_commit_at":"2023-04-30T18:36:20Z","activity_months":93.010000000000005,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:32.433Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lyst/lightfm","visibility":"public","created_at":"2015-07-30T08:34:00Z","updated_at":"2026-09-16T10:34:31Z","private":false,"fork":false,"archived":false,"stargazers_count":5112,"open_issues_count":166,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2483","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:17F4B9B:1C17B32:6AB92AE0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2482","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:1812A4C:1C36203:6AB92AE0"},"commit":{"sha":"deac6bb117d6aa0377d6914e94b97a1afe8f10a6","url":"https://github.com/lyst/lightfm/commit/deac6bb117d6aa0377d6914e94b97a1afe8f10a6","date":"2018-05-07T10:33:09Z","author_date":"2018-05-07T10:33:09Z","committer_date":"2018-05-07T10:33:09Z","tree_sha":"89a90ade1d5025545cc0638db90589fcd12f4bd4","message_first_line":"Merge pull request #294 from maciejkula/fix_flake"},"tree_request_status":200,"tree_rate":{"github_remaining":"2481","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:17FB5D1:1C1E6E9:6AB92AE1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4225,"blob_sha":"a04ba13ceae3538e01a167a680e2477e604e4713","priority":0}],"documents":[{"path":"README.md","size":4225,"blob_sha":"a04ba13ceae3538e01a167a680e2477e604e4713","priority":0,"status":200,"text":"# LightFM\n\n![LightFM logo](lightfm.png)\n\n| Build status | |\n|---|---|\n| Linux |[![Circle CI](https://circleci.com/gh/lyst/lightfm.svg?style=svg)](https://circleci.com/gh/lyst/lightfm)|\n| OSX (OpenMP disabled)|[![Travis CI](https://travis-ci.org/lyst/lightfm.svg?branch=master)](https://travis-ci.org/lyst/lightfm)|\n| Windows (OpenMP disabled) |[![Appveyor](https://ci.appveyor.com/api/projects/status/6cqpqb6969i1h4p7/branch/master?svg=true)](https://ci.appveyor.com/project/maciejkula/lightfm/branch/master)|\n\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/lightfm-rec/Lobby) [![PyPI](https://img.shields.io/pypi/v/lightfm.svg)](https://pypi.python.org/pypi/lightfm/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/lightfm/badges/version.svg)](https://anaconda.org/conda-forge/lightfm)\n\nLightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback, including efficient implementation of BPR and WARP ranking losses. It's easy to use, fast (via multithreaded model estimation), and produces high quality results.\n\nIt also makes it possible to incorporate both item and user metadata into the traditional matrix factorization algorithms. It represents each user and item as the sum of the latent representations of their features, thus allowing recommendations to generalise to new items (via item features) and to new users (via user features).\n\nFor more details, see the [Documentation](http://lyst.github.io/lightfm/docs/home.html).\n\nNeed help? Contact me via [email](mailto:lightfm@zoho.com), [Twitter](https://twitter.com/Maciej_Kula), or [Gitter](https://gitter.im/lightfm-rec/Lobby).\n\n## Installation\nInstall from `pip`:\n```\npip install lightfm\n```\nor Conda:\n```\nconda install -c conda-forge lightfm\n```\n\n## Quickstart\nFitting an implicit feedback model on the MovieLens 100k dataset is very easy:\n```python\nfrom lightfm import LightFM\nfrom lightfm.datasets import fetch_movielens\nfrom lightfm.evaluation import precision_at_k\n\n# Load the MovieLens 100k dataset. Only five\n# star ratings are treated as positive.\ndata = fetch_movielens(min_rating=5.0)\n\n# Instantiate and train the model\nmodel = LightFM(loss='warp')\nmodel.fit(data['train'], epochs=30, num_threads=2)\n\n# Evaluate the trained model\ntest_precision = precision_at_k(model, data['test'], k=5).mean()\n```\n\n## Articles and tutorials on using LightFM\n1. [Learning to Rank Sketchfab Models with LightFM](http://blog.ethanrosenthal.com/2016/11/07/implicit-mf-part-2/)\n2. [Metadata Embeddings for User and Item Cold-start Recommendations](http://building-babylon.net/2016/01/26/metadata-embeddings-for-user-and-item-cold-start-recommendations/)\n3. [Recommendation Systems - Learn Python for Data Science](https://www.youtube.com/watch?v=9gBC9R-msAk)\n4. [Using LightFM to Recommend Projects to Consultants](https://medium.com/product-at-catalant-technologies/using-lightfm-to-recommend-projects-to-consultants-44084df7321c#.gu887ky51)\n\n## How to cite\nPlease cite LightFM if it helps your research. You can use the following BibTeX entry:\n```\n@inproceedings{DBLP:conf/recsys/Kula15,\n  author    = {Maciej Kula},\n  editor    = {Toine Bogers and\n               Marijn Koolen},\n  title     = {Metadata Embeddings for User and Item Cold-start Recommendations},\n  booktitle = {Proceedings of the 2nd Workshop on New Trends on Content-Based Recommender\n               Systems co-located with 9th {ACM} Conference on Recommender Systems\n               (RecSys 2015), Vienna, Austria, September 16-20, 2015.},\n  series    = {{CEUR} Workshop Proceedings},\n  volume    = {1448},\n  pages     = {14--21},\n  publisher = {CEUR-WS.org},\n  year      = {2015},\n  url       = {http://ceur-ws.org/Vol-1448/paper4.pdf},\n}\n```\n\n## Development\nPull requests are welcome. To install for development:\n\n1. Clone the repository: `git clone git@github.com:lyst/lightfm.git`\n2. Install it for development using pip: `cd lightfm && pip install -e .`\n3. You can run tests by running `python setup.py test`.\n\nWhen making changes to the `.pyx` extension files, you'll need to run `python setup.py cythonize` in order to produce the extension `.c` files before running `pip install -e .`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E86:A58F2:175720:5D933A:6AB92AE1"},"text_sha256":"e8dd9559f0358b86257c74d7f936a70f7d4b6ab57319f416e8d78045fbe8adf7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2480","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089F:1DB627:186F0E2:1C92C59:6AB92AE2"},"commit":{"sha":"0c9c31e027b976beab2385e268b58010fff46096","url":"https://github.com/lyst/lightfm/commit/0c9c31e027b976beab2385e268b58010fff46096","date":"2023-04-30T18:36:20Z","author_date":"2023-04-30T18:36:20Z","committer_date":"2023-04-30T18:36:20Z","tree_sha":"8fbca27dd0b0d77b6d17bdc897543138273ab3f1","message_first_line":"Merge pull request #686 from oliverholworthy/github-actions-run-on-prs"},"tree_request_status":200,"tree_rate":{"github_remaining":"2479","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:17905AB:1BB28DA:6AB92AE2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4657,"blob_sha":"1d32b08d6f048998d054d7d2e36b5b37a0258dec","priority":0}],"documents":[{"path":"README.md","size":4657,"blob_sha":"1d32b08d6f048998d054d7d2e36b5b37a0258dec","priority":0,"status":200,"text":"# LightFM\n\n![LightFM logo](lightfm.png)\n\n| Build status | |\n|---|---|\n| Linux |[![Circle CI](https://circleci.com/gh/lyst/lightfm.svg?style=svg)](https://circleci.com/gh/lyst/lightfm)|\n| OSX (OpenMP disabled)|[![Travis CI](https://travis-ci.org/lyst/lightfm.svg?branch=master)](https://travis-ci.org/lyst/lightfm)|\n| Windows (OpenMP disabled) |[![Appveyor](https://ci.appveyor.com/api/projects/status/6cqpqb6969i1h4p7/branch/master?svg=true)](https://ci.appveyor.com/project/maciejkula/lightfm/branch/master)|\n\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/lightfm-rec/Lobby) [![PyPI](https://img.shields.io/pypi/v/lightfm.svg)](https://pypi.python.org/pypi/lightfm/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/lightfm/badges/version.svg)](https://anaconda.org/conda-forge/lightfm)\n\nLightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback, including efficient implementation of BPR and WARP ranking losses. It's easy to use, fast (via multithreaded model estimation), and produces high quality results.\n\nIt also makes it possible to incorporate both item and user metadata into the traditional matrix factorization algorithms. It represents each user and item as the sum of the latent representations of their features, thus allowing recommendations to generalise to new items (via item features) and to new users (via user features).\n\nFor more details, see the [Documentation](http://lyst.github.io/lightfm/docs/home.html).\n\nNeed help? Contact me via [email](mailto:lightfm@zoho.com), [Twitter](https://twitter.com/Maciej_Kula), or [Gitter](https://gitter.im/lightfm-rec/Lobby).\n\n## Installation\nInstall from `pip`:\n```\npip install lightfm\n```\nor Conda:\n```\nconda install -c conda-forge lightfm\n```\n\n## Quickstart\nFitting an implicit feedback model on the MovieLens 100k dataset is very easy:\n```python\nfrom lightfm import LightFM\nfrom lightfm.datasets import fetch_movielens\nfrom lightfm.evaluation import precision_at_k\n\n# Load the MovieLens 100k dataset. Only five\n# star ratings are treated as positive.\ndata = fetch_movielens(min_rating=5.0)\n\n# Instantiate and train the model\nmodel = LightFM(loss='warp')\nmodel.fit(data['train'], epochs=30, num_threads=2)\n\n# Evaluate the trained model\ntest_precision = precision_at_k(model, data['test'], k=5).mean()\n```\n\n## Articles and tutorials on using LightFM\n1. [Learning to Rank Sketchfab Models with LightFM](http://blog.ethanrosenthal.com/2016/11/07/implicit-mf-part-2/)\n2. [Metadata Embeddings for User and Item Cold-start Recommendations](http://building-babylon.net/2016/01/26/metadata-embeddings-for-user-and-item-cold-start-recommendations/)\n3. [Recommendation Systems - Learn Python for Data Science](https://www.youtube.com/watch?v=9gBC9R-msAk)\n4. [Using LightFM to Recommend Projects to Consultants](https://medium.com/product-at-catalant-technologies/using-lightfm-to-recommend-projects-to-consultants-44084df7321c#.gu887ky51)\n\n## How to cite\nPlease cite LightFM if it helps your research. You can use the following BibTeX entry:\n```\n@inproceedings{DBLP:conf/recsys/Kula15,\n  author    = {Maciej Kula},\n  editor    = {Toine Bogers and\n               Marijn Koolen},\n  title     = {Metadata Embeddings for User and Item Cold-start Recommendations},\n  booktitle = {Proceedings of the 2nd Workshop on New Trends on Content-Based Recommender\n               Systems co-located with 9th {ACM} Conference on Recommender Systems\n               (RecSys 2015), Vienna, Austria, September 16-20, 2015.},\n  series    = {{CEUR} Workshop Proceedings},\n  volume    = {1448},\n  pages     = {14--21},\n  publisher = {CEUR-WS.org},\n  year      = {2015},\n  url       = {http://ceur-ws.org/Vol-1448/paper4.pdf},\n}\n```\n\n## Development\nPull requests are welcome. To install for development:\n\n1. Clone the repository: `git clone git@github.com:lyst/lightfm.git`\n2. Setup a virtual environment: `cd lightfm && python3 -m venv venv && source ./venv/bin/activate`\n3. Install it for development using pip: `pip install -e . && pip install -r test-requirements.txt`\n4. You can run tests by running `./venv/bin/py.test tests`.\n5. LightFM uses [black](https://github.com/ambv/black) to enforce code formatting and flake8 for linting, see `lint-requirements.txt`.\n6. [Optional]: You can install pre-commit to locally enfore formatting and linting. Install with:\n    ```bash\n    pip install pre-commit\n    pre-commit install\n    ```\n\nWhen making changes to the `.pyx` extension files, you'll need to run `python setup.py cythonize` in order to produce the extension `.c` files before running `pip install -e .`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F98:3D40A:172330:5D5EDB:6AB92AE1"},"text_sha256":"824fbab733e11dd3c73b46ca76349d5bf70e7df58eb5b76c68676c5694412b20"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"openvenues/libpostal","input_row":{"repository":"openvenues/libpostal","url":"https://github.com/openvenues/libpostal","name":"libpostal","owner":"openvenues","description":"A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.","language":"C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4897,"issues":507,"created_at":"2015-03-03T00:21:31Z","updated_at":"2026-09-27T09:58:00Z","first_commit_at":"2015-03-03T00:21:31Z","last_commit_at":"2025-12-06T19:06:10Z","activity_months":129.16,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:35.118Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"openvenues/libpostal","visibility":"public","created_at":"2015-03-03T00:21:31Z","updated_at":"2026-09-27T09:58:00Z","private":false,"fork":false,"archived":false,"stargazers_count":4897,"open_issues_count":299,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2478","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17E6D66:1C0A65C:6AB92AE3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2477","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BB:180242:17F150E:1C14B85:6AB92AE3"},"commit":{"sha":"eae01d3e60501978d880e4ded15783daa28de7e5","url":"https://github.com/openvenues/libpostal/commit/eae01d3e60501978d880e4ded15783daa28de7e5","date":"2018-05-24T20:55:03Z","author_date":"2018-05-24T20:55:03Z","committer_date":"2018-05-24T20:55:03Z","tree_sha":"44e91f491ed5122fe5fb2bb78881d90f357e234d","message_first_line":"Updating issue template to not use checkboxes"},"tree_request_status":200,"tree_rate":{"github_remaining":"2476","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:17F0CC0:1C14729:6AB92AE3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":44141,"blob_sha":"570ee0e101ae8777b2bfcd5fdb376c74970a370c","priority":0}],"documents":[{"path":"README.md","size":44141,"blob_sha":"570ee0e101ae8777b2bfcd5fdb376c74970a370c","priority":0,"status":200,"text":"# libpostal: international street address NLP\n\n[![Build Status](https://travis-ci.org/openvenues/libpostal.svg?branch=master)](https://travis-ci.org/openvenues/libpostal)\n[![Build Status](https://ci.appveyor.com/api/projects/status/github/openvenues/libpostal?branch=master&svg=true)](https://ci.appveyor.com/project/albarrentine/libpostal/branch/master)\n[![License](https://img.shields.io/github/license/openvenues/libpostal.svg)](https://github.com/openvenues/libpostal/blob/master/LICENSE)\n[![OpenCollective Sponsors](https://opencollective.com/libpostal/sponsors/badge.svg)](#sponsors)\n[![OpenCollective Backers](https://opencollective.com/libpostal/backers/badge.svg)](#backers)\n\nlibpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP and open data. The goal of this project is to understand location-based strings in every language, everywhere. For a more comprehensive overview of the research behind libpostal, be sure to check out the (lengthy) introductory blog posts:\n\n- **Original post**: [Statistical NLP on OpenStreetMap](https://medium.com/@albarrentine/statistical-nlp-on-openstreetmap-b9d573e6cc86)\n- **Follow-up for 1.0 release**: [Statistical NLP on OpenStreetMap: Part 2](https://medium.com/@albarrentine/statistical-nlp-on-openstreetmap-part-2-80405b988718)\n\n<span>&#x1f1e7;&#x1f1f7;<\/span> <span>&#x1f1eb;&#x1f1ee;<\/span>  <span>&#x1f1f3;&#x1f1ec;<\/span> :jp: <span>&#x1f1fd;&#x1f1f0; <\/span> <span>&#x1f1e7;&#x1f1e9; <\/span> <span>&#x1f1f5;&#x1f1f1; <\/span> <span>&#x1f1fb;&#x1f1f3; <\/span> <span>&#x1f1e7;&#x1f1ea; <\/span> <span>&#x1f1f2;&#x1f1e6; <\/span> <span>&#x1f1fa;&#x1f1e6; <\/span> <span>&#x1f1ef;&#x1f1f2; <\/span> :ru: <span>&#x1f1ee;&#x1f1f3; <\/span> <span>&#x1f1f1;&#x1f1fb; <\/span> <span>&#x1f1e7;&#x1f1f4; <\/span> :de: <span>&#x1f1f8;&#x1f1f3; <\/span>  <span>&#x1f1e6;&#x1f1f2; <\/span> :kr: <span>&#x1f1f3;&#x1f1f4; <\/span>  <span>&#x1f1f2;&#x1f1fd; <\/span> <span>&#x1f1e8;&#x1f1ff; <\/span> <span>&#x1f1f9;&#x1f1f7; <\/span> :es: <span>&#x1f1f8;&#x1f1f8; <\/span> <span>&#x1f1ea;&#x1f1ea; <\/span> <span>&#x1f1e7;&#x1f1ed; <\/span> <span>&#x1f1f3;&#x1f1f1; <\/span> :cn:  <span>&#x1f1f5;&#x1f1f9; <\/span> <span>&#x1f1f5;&#x1f1f7; <\/span> :gb: <span>&#x1f1f5;&#x1f1f8; <\/span> \n\nAddresses and the locations they represent are essential for any application dealing with maps (place search, transportation, on-demand/delivery services, check-ins, reviews). Yet even the simplest addresses are packed with local conventions, abbreviations and context, making them difficult to index/query effectively with traditional full-text search engines. This library helps convert the free-form addresses that humans use into clean normalized forms suitable for machine comparison and full-text indexing. Though libpostal is not itself a full geocoder, it can be used as a preprocessing step to make any geocoding application smarter, simpler, and more consistent internationally.\n\n<span>&#x1f1f7;&#x1f1f4; <\/span> <span>&#x1f1ec;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1fa; <\/span> <span>&#x1f1f2;&#x1f1fe; <\/span> <span>&#x1f1ed;&#x1f1f7; <\/span> <span>&#x1f1ed;&#x1f1f9; <\/span> :us: <span>&#x1f1ff;&#x1f1e6; <\/span> <span>&#x1f1f7;&#x1f1f8; <\/span> <span>&#x1f1e8;&#x1f1f1; <\/span> :it: <span>&#x1f1f0;&#x1f1ea; <span>&#x1f1e8;&#x1f1ed; <\/span> <span>&#x1f1e8;&#x1f1fa; <\/span> <span>&#x1f1f8;&#x1f1f0; <\/span> <span>&#x1f1e6;&#x1f1f4; <\/span> <span>&#x1f1e9;&#x1f1f0; <\/span> <span>&#x1f1f9;&#x1f1ff; <\/span> <span>&#x1f1e6;&#x1f1f1; <\/span> <span>&#x1f1e8;&#x1f1f4; <\/span> <span>&#x1f1ee;&#x1f1f1; <\/span> <span>&#x1f1ec;&#x1f1f9; <\/span>  :fr: <span>&#x1f1f5;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1f9; <\/span> <span>&#x1f1f1;&#x1f1e8; <\/span>  <span>&#x1f1ee;&#x1f1f8; <span>&#x1f1ee;&#x1f1e9; <\/span> <\/span> <span>&#x1f1e6;&#x1f1ea; <\/span> <\/span> <span>&#x1f1f8;&#x1f1f0; <\/span> <span>&#x1f1f9;&#x1f1f3; <\/span> <span>&#x1f1f0;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1f7; <\/span> <span>&#x1f1ed;&#x1f1f0; <\/span>\n\nThe core library is written in pure C. Language bindings for [Python](https://github.com/openvenues/pypostal), [Ruby](https://github.com/openvenues/ruby_postal), [Go](https://github.com/openvenues/gopostal), [Java](https://github.com/openvenues/jpostal), [PHP](https://github.com/openvenues/php-postal), and [NodeJS](https://github.com/openvenues/node-postal) are officially supported and it's easy to write bindings in other languages.\n\nSponsors\n--------\n\nIf your company is using libpostal, consider asking your organization to sponsor the project. Interpreting what humans mean when they refer to locations is far from a solved problem, and sponsorships help us pursue new frontiers in geospatial NLP. As a sponsor, your company logo will appear prominently on the Github repo page along with a link to your site. [Sponsorship info](https://opencollective.com/libpostal#sponsor)\n\n<a href=\"https://opencollective.com/libpostal/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/29/avatar.svg\"><\/a>\n\nBackers\n------------\n\nIndividual users can also help support open geo NLP research by making a monthly donation:\n\n<a href=\"https://opencollective.com/libpostal/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/29/avatar.svg\"><\/a>\n\nInstallation (Mac/Linux)\n------------------------\n\nBefore you install, make sure you have the following prerequisites:\n\n**On Ubuntu/Debian**\n```\nsudo apt-get install curl autoconf automake libtool pkg-config\n```\n\n**On CentOS/RHEL**\n```\nsudo yum install curl autoconf automake libtool pkgconfig\n```\n\n**On Mac OSX**\n```\nbrew install curl autoconf automake libtool pkg-config\n```\n\nThen to install the C library:\n\n```\ngit clone https://github.com/openvenues/libpostal\ncd libpostal\n./bootstrap.sh\n./configure --datadir=[...some dir with a few GB of space...]\nmake -j4\nsudo make install\n\n# On Linux it's probably a good idea to run\nsudo ldconfig\n```\n\nlibpostal has support for pkg-config, so you can use the pkg-config to print the flags needed to link your program against it:\n\n```\npkg-config --cflags libpostal         # print compiler flags\npkg-config --libs libpostal           # print linker flags\npkg-config --cflags --libs libpostal  # print both\n```\n\nFor example, if you write a program called app.c, you can compile it like this:\n\n```\ngcc app.c `pkg-config --cflags --libs libpostal`\n```\n\nInstallation (Windows)\n----------------------\n\n**MSys2/MinGW**\n\nFor Windows the build procedure currently requires MSys2 and MinGW. This can be downloaded from http://msys2.org. Please follow the instructions on the MSys2 website for installation.\n\nPlease ensure Msys2 is up-to-date by running:\n```\npacman -Syu\n```\n\nInstall the following prerequisites:\n```\npacman -S autoconf automake curl git make libtool gcc mingw-w64-x86_64-gcc\n```\n\nThen to build the C library:\n```\ngit clone https://github.com/openvenues/libpostal\ncd libpostal\ncp -rf windows/* ./\n./bootstrap.sh\n./configure --datadir=[...some dir with a few GB of space...]\nmake -j4\nmake install\n```\nNotes: When setting the datadir, the `C:` drive would be entered as `/c`. The libpostal build script automatically add `libpostal` on the end of the path, so '/c' would become `C:\\libpostal\\` on Windows.\n\nThe compiled .dll will be in the `src/.libs/` directory and should be called `libpostal-1.dll`.\n\nIf you require a .lib import library to link this to your application. You can generate one using the Visual Studio `lib.exe` tool and the `libpostal.def` definition file:\n```\nlib.exe /def:libpostal.def /out:libpostal.lib /machine:x64\n```\n\nExamples of parsing\n-------------------\n\nlibpostal's international address parser uses machine learning (Conditional Random Fields) and is trained on over 1 billion addresses in every inhabited country on Earth. We use [OpenStreetMap](https://openstreetmap.org) and [OpenAddresses](https://openaddresses.io) as sources of structured addresses, and the OpenCage address format templates at: https://github.com/OpenCageData/address-formatting to construct the training data, supplementing with containing polygons, and generating sub-building components like apartment/floor numbers and PO boxes. We also add abbreviations, drop out components at random, etc. to make the parser as robust as possible to messy real-world input.\n\nThese example parse results are taken from the interactive address_parser program \nthat builds with libpostal when you run ```make```. Note that the parser can handle\ncommas vs. no commas as well as various casings and permutations of components (if the input\nis e.g. just city or just city/postcode).\n\n![parser](https://cloud.githubusercontent.com/assets/238455/24703087/acbe35d8-19cf-11e7-8850-77fb1c3446a7.gif)\n\nThe parser achieves very high accuracy on held-out data, currently 99.45%\ncorrect full parses (meaning a 1 in the numerator for getting *every* token\nin the address correct).\n\nUsage (parser)\n--------------\n\nHere's an example of the parser API using the Python bindings:\n\n```python\n\nfrom postal.parser import parse_address\nparse_address('The Book Club 100-106 Leonard St Shoreditch London EC2A 4RH, United Kingdom')\n```\n\nAnd an example with the C API:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <libpostal/libpostal.h>\n\nint main(int argc, char **argv) {\n    // Setup (only called once at the beginning of your program)\n    if (!libpostal_setup() || !libpostal_setup_parser()) {\n        exit(EXIT_FAILURE);\n    }\n\n    libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options();\n    libpostal_address_parser_response_t *parsed = libpostal_parse_address(\"781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA\", options);\n\n    for (size_t i = 0; i < parsed->num_components; i++) {\n        printf(\"%s: %s\\n\", parsed->labels[i], parsed->components[i]);\n    }\n\n    // Free parse result\n    libpostal_address_parser_response_destroy(parsed);\n\n    // Teardown (only called once at the end of your program)\n    libpostal_teardown();\n    libpostal_teardown_parser();\n}\n```\n\nParser labels\n-------------\n\nThe address parser can technically use any string labels that are defined in the training data, but these are the ones currently defined, based on the fields defined in [OpenCage's address-formatting library](https://github.com/OpenCageData/address-formatting), as well as a few added by libpostal to handle specific patterns:\n\n- **house**: venue name e.g. \"Brooklyn Academy of Music\", and building names e.g. \"Empire State Building\"\n- **category**: for category queries like \"restaurants\", etc.\n- **near**: phrases like \"in\", \"near\", etc. used after a category phrase to help with parsing queries like \"restaurants in Brooklyn\"\n- **house_number**: usually refers to the external (street-facing) building number. In some countries this may be a compount, hyphenated number which also includes an apartment number, or a block number (a la Japan), but libpostal will just call it the house_number for simplicity.\n- **road**: street name(s)\n- **unit**: an apartment, unit, office, lot, or other secondary unit designator\n- **level**: expressions indicating a floor number e.g. \"3rd Floor\", \"Ground Floor\", etc.\n- **staircase**: numbered/lettered staircase\n- **entrance**: numbered/lettered entrance\n- **po_box**: post office box: typically found in non-physical (mail-only) addresses\n- **postcode**: postal codes used for mail sorting\n- **suburb**: usually an unofficial neighborhood name like \"Harlem\", \"South Bronx\", or \"Crown Heights\"\n- **city_district**: these are usually boroughs or districts within a city that serve some official purpose e.g. \"Brooklyn\" or \"Hackney\" or \"Bratislava IV\"\n- **city**: any human settlement including cities, towns, villages, hamlets, localities, etc.\n- **island**: named islands e.g. \"Maui\"\n- **state_district**: usually a second-level administrative division or county.\n- **state**: a first-level administrative division. Scotland, Northern Ireland, Wales, and England in the UK are mapped to \"state\" as well (convention used in OSM, GeoPlanet, etc.)\n- **country_region**: informal subdivision of a country without any political status\n- **country**: sovereign nations and their dependent territories, anything with an [ISO-3166 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n- **world_region**: currently only used for appending “West Indies” after the country name, a pattern frequently used in the English-speaking Caribbean e.g. “Jamaica, West Indies”\n\nExamples of normalization\n-------------------------\n\nThe expand_address API converts messy real-world addresses into normalized\nequivalents suitable for search indexing, hashing, etc. \n\nHere's an interactive example using the Python binding:\n\n![expand](https://cloud.githubusercontent.com/assets/238455/14115012/52990d14-f5a7-11e5-9797-159dacdf8c5f.gif)\n\nlibpostal contains an OSM-trained language classifier to detect which language(s) are used in a given\naddress so it can apply the appropriate normalizations. The only input needed is the raw address string. \nHere's a short list of some less straightforward normalizations in various languages.\n\n| Input                               | Output (may be multiple in libpostal)   |\n| ----------------------------------- |-----------------------------------------|\n| One-hundred twenty E 96th St        | 120 east 96th street                    |\n| C/ Ocho, P.I. 4                     | calle 8 polígono industrial 4           |\n| V XX Settembre, 20                  | via 20 settembre 20                     |\n| Quatre vingt douze R. de l'Église   | 92 rue de l eglise                      |\n| ул Каретный Ряд, д 4, строение 7    | улица каретныи ряд дом 4 строение 7     |\n| ул Каретный Ряд, д 4, строение 7    | ulitsa karetnyy ryad dom 4 stroyeniye 7 |\n| Marktstraße 14                      | markt strasse 14                        |\n\nlibpostal currently supports these types of normalizations in *60+ languages*,\nand you can [add more](https://github.com/openvenues/libpostal/tree/master/resources/dictionaries) (without having to write any C).\n\nFor further reading and some bizarre address edge-cases, see:\n[Falsehoods Programmers Believe About Addresses](https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/).\n\nUsage (normalization)\n---------------------\n\nHere's an example using the Python bindings for succinctness (most of the higher-level language bindings are similar):\n\n```python\nfrom postal.expand import expand_address\nexpansions = expand_address('Quatre-vingt-douze Ave des Champs-Élysées')\n\nassert '92 avenue des champs-elysees' in set(expansions)\n```\n\nThe C API equivalent is a few more lines, but still fairly simple:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <libpostal/libpostal.h>\n\nint main(int argc, char **argv) {\n    // Setup (only called once at the beginning of your program)\n    if (!libpostal_setup() || !libpostal_setup_language_classifier()) {\n        exit(EXIT_FAILURE);\n    }\n\n    size_t num_expansions;\n    libpostal_normalize_options_t options = libpostal_get_default_options();\n    char **expansions = libpostal_expand_address(\"Quatre-vingt-douze Ave des Champs-Élysées\", options, &num_expansions);\n\n    for (size_t i = 0; i < num_expansions; i++) {\n        printf(\"%s\\n\", expansions[i]);\n    }\n\n    // Free expansions\n    libpostal_expansion_array_destroy(expansions, num_expansions);\n\n    // Teardown (only called once at the end of your program)\n    libpostal_teardown();\n    libpostal_teardown_language_classifier();\n}\n```\n\nCommand-line usage (expand)\n---------------------------\n\nAfter building libpostal:\n\n```\ncd src/\n\n./libpostal \"Quatre vingt douze Ave des Champs-Élysées\"\n```\n\nIf you have a text file or stream with one address per line, the command-line interface also accepts input from stdin:\n\n```\ncat some_file | ./libpostal --json\n```\n\nCommand-line usage (parser)\n---------------------------\n\nAfter building libpostal:\n\n```\ncd src/\n\n./address_parser\n```\n\naddress_parser is an interactive shell. Just type addresses and libpostal will\nparse them and print the result.\n\n\nBindings\n--------\n\nLibpostal is designed to be used by higher-level languages.  If you don't see your language of choice, or if you're writing a language binding, please let us know!\n\n**Officially supported language bindings**\n\n- Python: [pypostal](https://github.com/openvenues/pypostal)\n- Ruby: [ruby_postal](https://github.com/openvenues/ruby_postal)\n- Go: [gopostal](https://github.com/openvenues/gopostal)\n- Java/JVM: [jpostal](https://github.com/openvenues/jpostal)\n- PHP: [php-postal](https://github.com/openvenues/php-postal)\n- NodeJS: [node-postal](https://github.com/openvenues/node-postal)\n- R: [poster](https://github.com/ironholds/poster)\n\n**Unofficial language bindings**\n\n- Java: [javacpp-presets-libpostal](https://github.com/bytedeco/javacpp-presets/tree/master/libpostal)\n- LuaJIT: [lua-resty-postal](https://github.com/bungle/lua-resty-postal)\n- Perl: [Geo::libpostal](https://metacpan.org/pod/Geo::libpostal)\n- Elixir: [Expostal](https://github.com/SweetIQ/expostal)\n\n**Database extensions**\n\n- PostgreSQL: [pgsql-postal](https://github.com/pramsey/pgsql-postal)\n\n**Unofficial REST API**\n\n- Libpostal REST: [libpostal REST](https://github.com/johnlonganecker/libpostal-rest)\n\n**Libpostal REST Docker**\n\n- Libpostal REST Docker [Libpostal REST Docker](https://github.com/johnlonganecker/libpostal-rest-docker)\n\n**Libpostal ZeroMQ Docker**\n\n- Libpostal ZeroMQ Docker image: [pasupulaphani/libpostal-zeromq](https://hub.docker.com/r/pasupulaphani/libpostal-zeromq/) , Source: [Github](https://github.com/pasupulaphani/libpostal-docker) \n\n\nTests\n-----\n\nlibpostal uses [greatest](https://github.com/silentbicycle/greatest) for automated testing. To run the tests, use:\n\n```\nmake check\n```\n\nAdding [test cases](https://github.com/openvenues/libpostal/tree/master/test) is easy, even if your C is rusty/non-existent, and we'd love contributions. We use mostly functional tests checking string input against string output.\n\nlibpostal also gets periodically battle-tested on millions of addresses from OSM (clean) as well as anonymized queries from a production geocoder (not so clean). During this process we use valgrind to check for memory leaks and other errors.\n\nData files\n----------\n\nlibpostal needs to download some data files from S3. The basic files are on-disk\nrepresentations of the data structures necessary to perform expansion. For address\nparsing, since model training takes a few days, we publish the fully trained model \nto S3 and will update it automatically as new addresses get added to OSM, OpenAddresses, etc. Same goes for the language classifier model.\n\nData files are automatically downloaded when you run make. To check for and download\nany new data files, you can either run ```make```, or run:\n\n```\nlibpostal_data download all $YOUR_DATA_DIR/libpostal\n```\n\nAnd replace $YOUR_DATA_DIR with whatever you passed to configure during install.\n\nLanguage dictionaries\n---------------------\n\nlibpostal contains a number of per-language dictionaries that influence expansion, the language classifier, and the parser. To explore the dictionaries or contribute abbreviations/phrases in your language, see [resources/dictionaries](https://github.com/openvenues/libpostal/tree/master/resources/dictionaries).\n\nTraining data\n-------------\n\nIn machine learning, large amounts of training data are often essential for getting good results. Many open-source machine learning projects either release only the model code (results reproducible if and only if you're Google), or a pre-baked model where the training conditions are unknown.\n\nLibpostal is a bit different because it's trained on open data that's available to everyone, so we've released the entire training pipeline (the [geodata](https://github.com/openvenues/libpostal/tree/master/scripts/geodata) package in this repo), as well as the resulting training data itself on the Internet Archive. It's over 100GB unzipped.\n\nTraining data are stored on archive.org by the date they were created. There's also a file stored in the main directory of this repo called `current_parser_training_set` which stores the date of the most recently created training set. To always point to the latest data, try something like: ```latest=$(cat current_parser_training_set)``` and use that variable in place of the date.\n\n### Parser training sets ###\nAll files can be found at https://archive.org/download/libpostal-parser-training-data-YYYYMMDD/$FILE as gzip'd tab-separated values (TSV) files formatted like:```language\\tcountry\\taddress```.\n\n- **formatted_addresses_tagged.random.tsv.gz** (ODBL): OSM addresses. Apartments, PO boxes, categories, etc. are added primarily to these examples\n- **formatted_places_tagged.random.tsv.gz** (ODBL): every toponym in OSM (even cities represented as points, etc.), reverse-geocoded to its parent admins, possibly including postal codes if they're listed on the point/polygon. Every place gets a base level of representation and places with higher populations get proportionally more.\n- **formatted_ways_tagged.random.tsv.gz** (ODBL): every street in OSM (ways with highway=*, with a few conditions), reverse-geocoded to its admins\n- **geoplanet_formatted_addresses_tagged.random.tsv.gz** (CC-BY): every postal code in Yahoo GeoPlanet (includes almost every postcode in the UK, Canada, etc.) and their parent admins. The GeoPlanet admins have been cleaned up and mapped to libpostal's tagset\n- **openaddresses_formatted_addresses_tagged.random.tsv.gz** (various licenses, mostly CC-BY): most of the address data sets from [OpenAddresses](https://openaddresses.io/), which in turn come directly from government sources\n- **uk_openaddresses_formatted_addresses_tagged.random.tsv.gz** (CC-BY): addresses from [OpenAddresses UK](https://alpha.openaddressesuk.org/)\n\nIf the parser doesn't perform as well as you'd hoped on a particular type of address, the best recourse is to use grep/awk to look through the training data and try to determine if there's some pattern/style of address that's not being captured.\n\nFeatures\n--------\n\n- **Abbreviation expansion**: e.g. expanding \"rd\" => \"road\" but for almost any\nlanguage. libpostal supports > 50 languages and it's easy to add new languages\nor expand the current dictionaries. Ideographic languages (not separated by\nwhitespace e.g. Chinese) are supported, as are Germanic languages where\nthoroughfare types are concatenated onto the end of the string, and may\noptionally be separated so Rosenstraße and Rosen Straße are equivalent.\n\n- **International address parsing**: [Conditional Random Field](http://blog.echen.me/2012/01/03/introduction-to-conditional-random-fields/) which parses\n\"123 Main Street New York New York\" into {\"house_number\": 123, \"road\":\n\"Main Street\", \"city\": \"New York\", \"state\": \"New York\"}. The parser works\nfor a wide variety of countries and languages, not just US/English. \nThe model is trained on over 1 billion addresses and address-like strings, using the\ntemplates in the [OpenCage address formatting repo](https://github.com/OpenCageData/address-formatting) to construct formatted,\ntagged traning examples for every inhabited country in the world. Many types of [normalizations](https://github.com/openvenues/libpostal/blob/master/scripts/geodata/addresses/components.py)\nare performed to make the training data resemble real messy geocoder input as closely as possible.\n\n- **Language classification**: multinomial logistic regression\ntrained (using the [FTRL-Proximal](https://research.google.com/pubs/archive/41159.pdf) method to induce sparsity) on all of OpenStreetMap ways, addr:* tags, toponyms and formatted\naddresses. Labels are derived using point-in-polygon tests for both OSM countries\nand official/regional languages for countries and admin 1 boundaries\nrespectively. So, for example, Spanish is the default language in Spain but\nin different regions e.g. Catalunya, Galicia, the Basque region, the respective \nregional languages are the default. Dictionary-based disambiguation is employed in\ncases where the regional language is non-default e.g. Welsh, Breton, Occitan.\nThe dictionaries are also used to abbreviate canonical phrases like \"Calle\" => \"C/\"\n(performed on both the language classifier and the address parser training sets)\n\n- **Numeric expression parsing** (\"twenty first\" => 21st, \n\"quatre-vingt-douze\" => 92, again using data provided in CLDR), supports > 30\nlanguages. Handles languages with concatenated expressions e.g.\nmilleottocento => 1800. Optionally normalizes Roman numerals regardless of the\nlanguage (IX => 9) which occur in the names of many monarchs, popes, etc.\n\n- **Fast, accurate tokenization/lexing**: clocked at > 1M tokens / sec,\nimplements the TR-29 spec for UTF8 word segmentation, tokenizes East Asian\nlanguages chracter by character instead of on whitespace.\n\n- **UTF8 normalization**: optionally decompose UTF8 to NFD normalization form,\nstrips accent marks e.g. à => a and/or applies Latin-ASCII transliteration.\n\n- **Transliteration**: e.g. улица => ulica or ulitsa. Uses all\n[CLDR transforms](http://www.unicode.org/repos/cldr/trunk/common/transforms/), the exact same source data as used by [ICU](http://site.icu-project.org/),\nthough libpostal doesn't require pulling in all of ICU (might conflict \nwith your system's version). Note: some languages, particularly Hebrew, Arabic\nand Thai may not include vowels and thus will not often match a transliteration \ndone by a human. It may be possible to implement statistical transliterators\nfor some of these languages.\n\n- **Script detection**: Detects which script a given string uses (can be\nmultiple e.g. a free-form Hong Kong or Macau address may use both Han and\nLatin scripts in the same address). In transliteration we can use all\napplicable transliterators for a given Unicode script (Greek can for instance\nbe transliterated with Greek-Latin, Greek-Latin-BGN and Greek-Latin-UNGEGN).\n\nNon-goals\n---------\n\n- Verifying that a location is a valid address\n- Actually geocoding addresses to a lat/lon (that requires a database/search index)\n\nRaison d'être\n-------------\n\nlibpostal was originally created as part of the [OpenVenues](https://github.com/openvenues/openvenues) project to solve the problem of venue deduping. In OpenVenues, we have a data set of millions of\nplaces derived from terabytes of web pages from the [Common Crawl](http://commoncrawl.org/).\nThe Common Crawl is published monthly, and so even merging the results of\ntwo crawls produces significant duplicates.\n\nDeduping is a relatively well-studied field, and for text documents \nlike web pages, academic papers, etc. there exist pretty decent approximate\nsimilarity methods such as [MinHash](https://en.wikipedia.org/wiki/MinHash).\n\nHowever, for physical addresses, the frequent use of conventional abbreviations\nsuch as Road == Rd, California == CA, or New York City == NYC complicates\nmatters a bit. Even using a technique like MinHash, which is well suited for\napproximate matches and is equivalent to the Jaccard similarity of two sets, we\nhave to work with very short texts and it's often the case that two equivalent\naddresses, one abbreviated and one fully specified, will not match very closely\nin terms of n-gram set overlap. In non-Latin scripts, say a Russian address and\nits transliterated equivalent, it's conceivable that two addresses referring to\nthe same place may not match even a single character.\n\nAs a motivating example, consider the following two equivalent ways to write a\nparticular Manhattan street address with varying conventions and degrees\nof verbosity:\n\n- 30 W 26th St Fl #7\n- 30 West Twenty-sixth Street Floor Number 7\n\nObviously '30 W 26th St Fl #7 != '30 West Twenty-sixth Street Floor Number 7'\nin a string comparison sense, but a human can grok that these two addresses\nrefer to the same physical location.\n\nlibpostal aims to create normalized geographic strings, parsed into components,\nsuch that we can more effectively reason about how well two addresses\nactually match and make automated server-side decisions about dupes.\n\nSo it's not a geocoder?\n-----------------------\n\nIf the above sounds a lot like geocoding, that's because it is in a way,\nonly in the OpenVenues case, we have to geocode without a UI or a user \nto select the correct address in an autocomplete dropdown. Given a database \nof source addresses such as OpenAddresses or OpenStreetMap (or all of the above), \nlibpostal can be used to implement things like address deduping and server-side\nbatch geocoding in settings like MapReduce or stream processing.\n\nNow, instead of trying to bake address-specific conventions into traditional\ndocument search engines like Elasticsearch using giant synonyms files, scripting,\ncustom analyzers, tokenizers, and the like, geocoding can look like this:\n\n1. Run the addresses in your database through libpostal's expand_address\n2. Store the normalized string(s) in your favorite search engine, DB, \n   hashtable, etc.\n3. Run your user queries or fresh imports through libpostal and search\n   the existing database using those strings\n\nIn this way, libpostal can perform fuzzy address matching in constant time\nrelative to the size of the data set.\n\nWhy C?\n------\n\nlibpostal is written in C for three reasons (in order of importance):\n\n1. **Portability/ubiquity**: libpostal targets higher-level languages that\npeople actually use day-to-day: Python, Go, Ruby, NodeJS, etc. The beauty of C\nis that just about any programming language can bind to it and C compilers are\neverywhere, so pick your favorite, write a binding, and you can use libpostal\ndirectly in your application without having to stand up a separate server. We\nsupport Mac/Linux (Windows is not a priority but happy to accept patches), have\na standard autotools build and an endianness-agnostic file format for the data\nfiles. The Python bindings, are maintained as part of this repo since they're\nneeded to construct the training data.\n\n2. **Memory-efficiency**: libpostal is designed to run in a MapReduce setting\nwhere we may be limited to < 1GB of RAM per process depending on the machine\nconfiguration. As much as possible libpostal uses contiguous arrays, tries\n(built on contiguous arrays), bloom filters and compressed sparse matrices to\nkeep memory usage low. It's possible to use libpostal on a mobile device with\nmodels trained on a single country or a handful of countries.\n\n3. **Performance**: this is last on the list for a reason. Most of the\noptimizations in libpostal are for memory usage rather than performance.\nlibpostal is quite fast given the amount of work it does. It can process\n10-30k addresses / second in a single thread/process on the platforms we've\ntested (that means processing every address in OSM planet in a little over\nan hour). Check out the simple benchmark program to test on your environment\nand various types of input. In the MapReduce setting, per-core performance\nisn't as important because everything's being done in parallel, but there are\nsome streaming ingestion applications at Mapzen where this needs to\nrun in-process.\n\nC conventions\n-------------\n\nlibpostal is written in modern, legible, C99 and uses the following conventions:\n\n- Roughly object-oriented, as much as allowed by C\n- Almost no pointer-based data structures, arrays all the way down\n- Uses dynamic character arrays (inspired by [sds](https://github.com/antirez/sds)) for safer string handling\n- Confines almost all mallocs to *name*_new and all frees to *name*_destroy\n- Efficient existing implementations for simple things like hashtables\n- Generic containers (via [klib](https://github.com/attractivechaos/klib)) whenever possible\n- Data structrues take advantage of sparsity as much as possible\n- Efficient double-array trie implementation for most string dictionaries\n- Cross-platform as much as possible, particularly for *nix\n\nPreprocessing (Python)\n----------------------\n\nThe [geodata](https://github.com/openvenues/libpostal/tree/master/scripts/geodata) Python package in the libpostal repo contains the pipeline for preprocessing the various geo\ndata sets and building training data for the C models to use.\nThis package shouldn't be needed for most users, but for those interested in generating new types of addresses or improving libpostal's training data, this is where to look.\n\nAddress parser accuracy\n-----------------------\n\nOn held-out test data (meaning labeled parses that the model has _not_ seen\nbefore), the address parser achieves 99.45% full parse accuracy.\n\nFor some tasks like named entity recognition it's preferable to use something\nlike an F1 score or variants, mostly because there's a class bias problem (most\nwords are non-entities, and a system that simply predicted non-entity for\nevery token would actually do fairly well in terms of accuracy). That is not\nthe case for address parsing. Every token has a label and there are millions\nof examples of each class in the training data, so accuracy is preferable as it's\na clean, simple and intuitive measure of performance.\n\nHere we use full parse accuracy, meaning we only give the parser one \"point\" in\nthe numerator if it gets every single token in the address correct. That should\nbe a better measure than simply looking at whether each token was correct.\n\nImproving the address parser\n----------------------------\n\nThough the current parser works quite well for most standard addresses, there\nis still room for improvement, particularly in making sure the training data\nwe use is as close as possible to addresses in the wild. There are two primary\nways the address parser can be improved even further (in order of difficulty):\n\n1. Contribute addresses to OSM. Anything with an addr:housenumber tag will be\n   incorporated automatically into the parser next time it's trained.\n2. If the address parser isn't working well for a particular country, language\n   or style of address, chances are that some name variations or places being\n   missed/mislabeled during training data creation. Sometimes the fix is to\n   update the formats at: https://github.com/OpenCageData/address-formatting,\n   and in many other cases there are relatively simple tweaks we can make\n   when creating the training data that will ensure the model is trained to\n   handle your use case without you having to do any manual data entry.\n   If you see a pattern of obviously bad address parses, the best thing to\n   do is post an issue to Github.\n\nContributing\n------------\n\nBug reports, issues and pull requests are welcome. Please read the [contributing guide](CONTRIBUTING.md) before submitting your issue, bug report, or pull request.\n\nSubmit issues at: https://github.com/openvenues/libpostal/issues.\n\n\nShoutouts\n---------\n\nSpecial thanks to @BenK10 for the initial Windows build and @AeroXuk for integrating it seamlessly into the project and setting up an Appveyor build.\n\nLicense\n-------\n\nThe software is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62F2:375F4:17C26D:5DFF9A:6AB92AE3"},"text_sha256":"f9c797a820d0465542644e05ee81306a6d68804c0492601ceaa04f68fdeced39"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2475","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:17A6C47:1BCA66A:6AB92AE5"},"commit":{"sha":"25099c506612b34b23b1bfe286ca6321fcf06f35","url":"https://github.com/openvenues/libpostal/commit/25099c506612b34b23b1bfe286ca6321fcf06f35","date":"2025-12-06T19:06:10Z","author_date":"2025-12-06T19:06:10Z","committer_date":"2025-12-06T19:06:10Z","tree_sha":"4bec677d051145277b82176759cc0d540b946ae0","message_first_line":"Merge pull request #712 from rezaghazeli/update-senzing-data-v1.2.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2474","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17BC2CF:1BDE8F4:6AB92AE5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":47305,"blob_sha":"96b79f362ef0a77b26ce8eeaa36a1c8713bff341","priority":0}],"documents":[{"path":"README.md","size":47305,"blob_sha":"96b79f362ef0a77b26ce8eeaa36a1c8713bff341","priority":0,"status":200,"text":"# libpostal: international street address NLP\n\n[![Build Status](https://github.com/openvenues/libpostal/actions/workflows/test.yml/badge.svg)](https://github.com/openvenues/libpostal/actions)\n[![Build Status](https://ci.appveyor.com/api/projects/status/github/openvenues/libpostal?branch=master&svg=true)](https://ci.appveyor.com/project/albarrentine/libpostal/branch/master)\n[![License](https://img.shields.io/github/license/openvenues/libpostal.svg)](https://github.com/openvenues/libpostal/blob/master/LICENSE)\n[![OpenCollective Sponsors](https://opencollective.com/libpostal/sponsors/badge.svg)](#sponsors)\n[![OpenCollective Backers](https://opencollective.com/libpostal/backers/badge.svg)](#backers)\n\nlibpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP and open data. The goal of this project is to understand location-based strings in every language, everywhere. For a more comprehensive overview of the research behind libpostal, be sure to check out the (lengthy) introductory blog posts:\n\n- **Original post**: [Statistical NLP on OpenStreetMap](https://medium.com/@albarrentine/statistical-nlp-on-openstreetmap-b9d573e6cc86)\n- **Follow-up for 1.0 release**: [Statistical NLP on OpenStreetMap: Part 2](https://medium.com/@albarrentine/statistical-nlp-on-openstreetmap-part-2-80405b988718)\n\n<span>&#x1f1e7;&#x1f1f7;<\/span> <span>&#x1f1eb;&#x1f1ee;<\/span>  <span>&#x1f1f3;&#x1f1ec;<\/span> :jp: <span>&#x1f1fd;&#x1f1f0; <\/span> <span>&#x1f1e7;&#x1f1e9; <\/span> <span>&#x1f1f5;&#x1f1f1; <\/span> <span>&#x1f1fb;&#x1f1f3; <\/span> <span>&#x1f1e7;&#x1f1ea; <\/span> <span>&#x1f1f2;&#x1f1e6; <\/span> <span>&#x1f1fa;&#x1f1e6; <\/span> <span>&#x1f1ef;&#x1f1f2; <\/span> :ru: <span>&#x1f1ee;&#x1f1f3; <\/span> <span>&#x1f1f1;&#x1f1fb; <\/span> <span>&#x1f1e7;&#x1f1f4; <\/span> :de: <span>&#x1f1f8;&#x1f1f3; <\/span>  <span>&#x1f1e6;&#x1f1f2; <\/span> :kr: <span>&#x1f1f3;&#x1f1f4; <\/span>  <span>&#x1f1f2;&#x1f1fd; <\/span> <span>&#x1f1e8;&#x1f1ff; <\/span> <span>&#x1f1f9;&#x1f1f7; <\/span> :es: <span>&#x1f1f8;&#x1f1f8; <\/span> <span>&#x1f1ea;&#x1f1ea; <\/span> <span>&#x1f1e7;&#x1f1ed; <\/span> <span>&#x1f1f3;&#x1f1f1; <\/span> :cn:  <span>&#x1f1f5;&#x1f1f9; <\/span> <span>&#x1f1f5;&#x1f1f7; <\/span> :gb: <span>&#x1f1f5;&#x1f1f8; <\/span>\n\nAddresses and the locations they represent are essential for any application dealing with maps (place search, transportation, on-demand/delivery services, check-ins, reviews). Yet even the simplest addresses are packed with local conventions, abbreviations and context, making them difficult to index/query effectively with traditional full-text search engines. This library helps convert the free-form addresses that humans use into clean normalized forms suitable for machine comparison and full-text indexing. Though libpostal is not itself a full geocoder, it can be used as a preprocessing step to make any geocoding application smarter, simpler, and more consistent internationally.\n\n<span>&#x1f1f7;&#x1f1f4; <\/span> <span>&#x1f1ec;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1fa; <\/span> <span>&#x1f1f2;&#x1f1fe; <\/span> <span>&#x1f1ed;&#x1f1f7; <\/span> <span>&#x1f1ed;&#x1f1f9; <\/span> :us: <span>&#x1f1ff;&#x1f1e6; <\/span> <span>&#x1f1f7;&#x1f1f8; <\/span> <span>&#x1f1e8;&#x1f1f1; <\/span> :it: <span>&#x1f1f0;&#x1f1ea; <span>&#x1f1e8;&#x1f1ed; <\/span> <span>&#x1f1e8;&#x1f1fa; <\/span> <span>&#x1f1f8;&#x1f1f0; <\/span> <span>&#x1f1e6;&#x1f1f4; <\/span> <span>&#x1f1e9;&#x1f1f0; <\/span> <span>&#x1f1f9;&#x1f1ff; <\/span> <span>&#x1f1e6;&#x1f1f1; <\/span> <span>&#x1f1e8;&#x1f1f4; <\/span> <span>&#x1f1ee;&#x1f1f1; <\/span> <span>&#x1f1ec;&#x1f1f9; <\/span>  :fr: <span>&#x1f1f5;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1f9; <\/span> <span>&#x1f1f1;&#x1f1e8; <\/span>  <span>&#x1f1ee;&#x1f1f8; <span>&#x1f1ee;&#x1f1e9; <\/span> <\/span> <span>&#x1f1e6;&#x1f1ea; <\/span> <\/span> <span>&#x1f1f8;&#x1f1f0; <\/span> <span>&#x1f1f9;&#x1f1f3; <\/span> <span>&#x1f1f0;&#x1f1ed; <\/span> <span>&#x1f1e6;&#x1f1f7; <\/span> <span>&#x1f1ed;&#x1f1f0; <\/span>\n\nThe core library is written in pure C. Language bindings for [Python](https://github.com/openvenues/pypostal), [Ruby](https://github.com/openvenues/ruby_postal), [Go](https://github.com/openvenues/gopostal), [Java](https://github.com/openvenues/jpostal), [PHP](https://github.com/openvenues/php-postal), and [NodeJS](https://github.com/openvenues/node-postal) are officially supported and it's easy to write bindings in other languages.\n\nSponsors\n--------\n\nIf your company is using libpostal, consider asking your organization to sponsor the project. Interpreting what humans mean when they refer to locations is far from a solved problem, and sponsorships help us pursue new frontiers in geospatial NLP. As a sponsor, your company logo will appear prominently on the Github repo page along with a link to your site. [Sponsorship info](https://opencollective.com/libpostal#sponsor)\n\n<a href=\"https://opencollective.com/libpostal/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/sponsor/29/avatar.svg\"><\/a>\n\nBackers\n------------\n\nIndividual users can also help support open geo NLP research by making a monthly donation:\n\n<a href=\"https://opencollective.com/libpostal/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/libpostal/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/libpostal/backer/29/avatar.svg\"><\/a>\n\nInstallation (Mac/Linux)\n------------------------\n\nBefore you install, make sure you have the following prerequisites:\n\n**On Ubuntu/Debian**\n```\nsudo apt-get install -y curl build-essential autoconf automake libtool pkg-config\n```\n\n**On CentOS/RHEL**\n```\nsudo yum install curl autoconf automake libtool pkgconfig\n```\n\n**On macOS**\n\nInstall with one command via [MacPorts](https://www.macports.org/):\n```\nport install libpostal\n```\n\nOr with [Homebrew](https://brew.sh/):\n\n```\nbrew install libpostal\n```\n\nTo compile the C library from source:\n\nIf you're using an M1 Mac, add `--disable-sse2` to the `./configure` command. This will result in poorer performance but the build will succeed.\n\n```\ngit clone https://github.com/openvenues/libpostal\ncd libpostal\n\n# skip if installing for the first time\nmake distclean\n\n./bootstrap.sh\n\n# omit --datadir flag to install data in current directory\n./configure --datadir=[...some dir with a few GB of space where a \"libpostal\" directory exists or can be created/modified...]\nmake -j4\n\n# For Intel/AMD processors and the default model\n./configure --datadir=[...some dir with a few GB of space where a \"libpostal\" directory exists or can be created/modified...]\n\n# For Apple / ARM cpus and the default model\n./configure --datadir=[...some dir with a few GB of space where a \"libpostal\" directory exists or can be created/modified...] --disable-sse2\n\n# For the improved Senzing model:\n./configure --datadir=[...some dir with a few GB of space where a \"libpostal\" directory exists or can be created/modified...] MODEL=senzing\n\nmake -j8\nsudo make install\n\n# On Linux it's probably a good idea to run\nsudo ldconfig\n```\n\nlibpostal has support for pkg-config, so you can use the pkg-config to print the flags needed to link your program against it:\n\n```\npkg-config --cflags libpostal         # print compiler flags\npkg-config --libs libpostal           # print linker flags\npkg-config --cflags --libs libpostal  # print both\n```\n\nFor example, if you write a program called app.c, you can compile it like this:\n\n```\ngcc app.c `pkg-config --cflags --libs libpostal`\n```\n\nInstallation (Windows)\n----------------------\n\n**MSys2/MinGW**\n\nFor Windows the build procedure currently requires MSys2 and MinGW. This can be downloaded from http://msys2.org. Please follow the instructions on the MSys2 website for installation.\n\nPlease ensure Msys2 is up-to-date by running:\n```\npacman -Syu\n```\n\nInstall the following prerequisites:\n```\npacman -S autoconf automake curl git make libtool gcc mingw-w64-x86_64-gcc\n```\n\nThen to build the C library:\n```\ngit clone https://github.com/openvenues/libpostal\ncd libpostal\ncp -rf windows/* ./\n./bootstrap.sh\n./configure --datadir=[...some dir with a few GB of space...]\nmake -j4\nmake install\n```\nNotes: When setting the datadir, the `C:` drive would be entered as `/c`. The libpostal build script automatically add `libpostal` on the end of the path, so '/c' would become `C:\\libpostal\\` on Windows.\n\nThe compiled .dll will be in the `src/.libs/` directory and should be called `libpostal-1.dll`.\n\nIf you require a .lib import library to link this to your application. You can generate one using the Visual Studio `lib.exe` tool and the `libpostal.def` definition file:\n```\nlib.exe /def:libpostal.def /out:libpostal.lib /machine:x64\n```\n\nInstallation with an alternative data model\n-------------------------------------------\n\nAn alternative data model is available for libpostal. It is created by Senzing Inc. for improved parsing on US, UK and Singapore addresses and improved US rural route address handling.\nTo enable this add `MODEL=senzing` to the configure line during installation:\n```\n./configure --datadir=[...some dir with a few GB of space...] MODEL=senzing\n```\n\nThe data for this model is gotten from [OpenAddress](https://openaddresses.io/), [OpenStreetMap](https://www.openstreetmap.org/) and data generated by Senzing based on customer feedback (a few hundred records), a total of about 1.2 billion records of data from over 230 countries, in 100+ languages. The data from OpenStreetMap and OpenAddress is good but not perfect so the data set was modified by filtering out badly formed addresses, correcting misclassified address tokens and removing tokens that didn't belong in the addresses, whenever these conditions were encountered.\n\nSenzing created a data set of 12950 addresses from 89 countries that it uses to test and verify the quality of its models. The data set was generated using random addresses from OSM, minimally 50 per country. Hard-to-parse addresses were gotten from Senzing support team and customers and from the libpostal github page and added to this set. The Senzing model got 4.3% better parsing results than the default model, using this test set.\n\nThe size of this model is about 2.2GB compared to 1.8GB for the default model so keep that in mind if storages space is important.\n\nFurther information about this data model can be found at: https://github.com/Senzing/libpostal-data\nIf you run into any issues with this model, whether they have to do with parses, installation or any other problems, then please report them at https://github.com/Senzing/libpostal-data\n\nExamples of parsing\n-------------------\n\nlibpostal's international address parser uses machine learning (Conditional Random Fields) and is trained on over 1 billion addresses in every inhabited country on Earth. We use [OpenStreetMap](https://openstreetmap.org) and [OpenAddresses](https://openaddresses.io) as sources of structured addresses, and the OpenCage address format templates at: https://github.com/OpenCageData/address-formatting to construct the training data, supplementing with containing polygons, and generating sub-building components like apartment/floor numbers and PO boxes. We also add abbreviations, drop out components at random, etc. to make the parser as robust as possible to messy real-world input.\n\nThese example parse results are taken from the interactive address_parser program\nthat builds with libpostal when you run ```make```. Note that the parser can handle\ncommas vs. no commas as well as various casings and permutations of components (if the input\nis e.g. just city or just city/postcode).\n\n![parser](https://cloud.githubusercontent.com/assets/238455/24703087/acbe35d8-19cf-11e7-8850-77fb1c3446a7.gif)\n\nThe parser achieves very high accuracy on held-out data, currently 99.45%\ncorrect full parses (meaning a 1 in the numerator for getting *every* token\nin the address correct).\n\nUsage (parser)\n--------------\n\nHere's an example of the parser API using the Python bindings:\n\n```python\n\nfrom postal.parser import parse_address\nparse_address('The Book Club 100-106 Leonard St Shoreditch London EC2A 4RH, United Kingdom')\n```\n\nAnd an example with the C API:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <libpostal/libpostal.h>\n\nint main(int argc, char **argv) {\n    // Setup (only called once at the beginning of your program)\n    if (!libpostal_setup() || !libpostal_setup_parser()) {\n        exit(EXIT_FAILURE);\n    }\n\n    libpostal_address_parser_options_t options = libpostal_get_address_parser_default_options();\n    libpostal_address_parser_response_t *parsed = libpostal_parse_address(\"781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA\", options);\n\n    for (size_t i = 0; i < parsed->num_components; i++) {\n        printf(\"%s: %s\\n\", parsed->labels[i], parsed->components[i]);\n    }\n\n    // Free parse result\n    libpostal_address_parser_response_destroy(parsed);\n\n    // Teardown (only called once at the end of your program)\n    libpostal_teardown();\n    libpostal_teardown_parser();\n}\n```\n\nParser labels\n-------------\n\nThe address parser can technically use any string labels that are defined in the training data, but these are the ones currently defined, based on the fields defined in [OpenCage's address-formatting library](https://github.com/OpenCageData/address-formatting), as well as a few added by libpostal to handle specific patterns:\n\n- **house**: venue name e.g. \"Brooklyn Academy of Music\", and building names e.g. \"Empire State Building\"\n- **category**: for category queries like \"restaurants\", etc.\n- **near**: phrases like \"in\", \"near\", etc. used after a category phrase to help with parsing queries like \"restaurants in Brooklyn\"\n- **house_number**: usually refers to the external (street-facing) building number. In some countries this may be a compount, hyphenated number which also includes an apartment number, or a block number (a la Japan), but libpostal will just call it the house_number for simplicity.\n- **road**: street name(s)\n- **unit**: an apartment, unit, office, lot, or other secondary unit designator\n- **level**: expressions indicating a floor number e.g. \"3rd Floor\", \"Ground Floor\", etc.\n- **staircase**: numbered/lettered staircase\n- **entrance**: numbered/lettered entrance\n- **po_box**: post office box: typically found in non-physical (mail-only) addresses\n- **postcode**: postal codes used for mail sorting\n- **suburb**: usually an unofficial neighborhood name like \"Harlem\", \"South Bronx\", or \"Crown Heights\"\n- **city_district**: these are usually boroughs or districts within a city that serve some official purpose e.g. \"Brooklyn\" or \"Hackney\" or \"Bratislava IV\"\n- **city**: any human settlement including cities, towns, villages, hamlets, localities, etc.\n- **island**: named islands e.g. \"Maui\"\n- **state_district**: usually a second-level administrative division or county.\n- **state**: a first-level administrative division. Scotland, Northern Ireland, Wales, and England in the UK are mapped to \"state\" as well (convention used in OSM, GeoPlanet, etc.)\n- **country_region**: informal subdivision of a country without any political status\n- **country**: sovereign nations and their dependent territories, anything with an [ISO-3166 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n- **world_region**: currently only used for appending “West Indies” after the country name, a pattern frequently used in the English-speaking Caribbean e.g. “Jamaica, West Indies”\n\nExamples of normalization\n-------------------------\n\nThe expand_address API converts messy real-world addresses into normalized\nequivalents suitable for search indexing, hashing, etc.\n\nHere's an interactive example using the Python binding:\n\n![expand](https://cloud.githubusercontent.com/assets/238455/14115012/52990d14-f5a7-11e5-9797-159dacdf8c5f.gif)\n\nlibpostal contains an OSM-trained language classifier to detect which language(s) are used in a given\naddress so it can apply the appropriate normalizations. The only input needed is the raw address string.\nHere's a short list of some less straightforward normalizations in various languages.\n\n| Input                               | Output (may be multiple in libpostal)   |\n| ----------------------------------- |-----------------------------------------|\n| One-hundred twenty E 96th St        | 120 east 96th street                    |\n| C/ Ocho, P.I. 4                     | calle 8 polígono industrial 4           |\n| V XX Settembre, 20                  | via 20 settembre 20                     |\n| Quatre vingt douze R. de l'Église   | 92 rue de l eglise                      |\n| ул Каретный Ряд, д 4, строение 7    | улица каретныи ряд дом 4 строение 7     |\n| ул Каретный Ряд, д 4, строение 7    | ulitsa karetnyy ryad dom 4 stroyeniye 7 |\n| Marktstraße 14                      | markt strasse 14                        |\n\nlibpostal currently supports these types of normalizations in *60+ languages*,\nand you can [add more](https://github.com/openvenues/libpostal/tree/master/resources/dictionaries) (without having to write any C).\n\nFor further reading and some bizarre address edge-cases, see:\n[Falsehoods Programmers Believe About Addresses](https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/).\n\nUsage (normalization)\n---------------------\n\nHere's an example using the Python bindings for succinctness (most of the higher-level language bindings are similar):\n\n```python\nfrom postal.expand import expand_address\nexpansions = expand_address('Quatre-vingt-douze Ave des Champs-Élysées')\n\nassert '92 avenue des champs-elysees' in set(expansions)\n```\n\nThe C API equivalent is a few more lines, but still fairly simple:\n\n```c\n#include <stdio.h>\n#include <stdlib.h>\n#include <libpostal/libpostal.h>\n\nint main(int argc, char **argv) {\n    // Setup (only called once at the beginning of your program)\n    if (!libpostal_setup() || !libpostal_setup_language_classifier()) {\n        exit(EXIT_FAILURE);\n    }\n\n    size_t num_expansions;\n    libpostal_normalize_options_t options = libpostal_get_default_options();\n    char **expansions = libpostal_expand_address(\"Quatre-vingt-douze Ave des Champs-Élysées\", options, &num_expansions);\n\n    for (size_t i = 0; i < num_expansions; i++) {\n        printf(\"%s\\n\", expansions[i]);\n    }\n\n    // Free expansions\n    libpostal_expansion_array_destroy(expansions, num_expansions);\n\n    // Teardown (only called once at the end of your program)\n    libpostal_teardown();\n    libpostal_teardown_language_classifier();\n}\n```\n\nCommand-line usage (expand)\n---------------------------\n\nAfter building libpostal:\n\n```\ncd src/\n\n./libpostal \"Quatre vingt douze Ave des Champs-Élysées\"\n```\n\nIf you have a text file or stream with one address per line, the command-line interface also accepts input from stdin:\n\n```\ncat some_file | ./libpostal --json\n```\n\nCommand-line usage (parser)\n---------------------------\n\nAfter building libpostal:\n\n```\ncd src/\n\n./address_parser\n```\n\naddress_parser is an interactive shell. Just type addresses and libpostal will\nparse them and print the result.\n\n\nBindings\n--------\n\nLibpostal is designed to be used by higher-level languages.  If you don't see your language of choice, or if you're writing a language binding, please let us know!\n\n**Officially supported language bindings**\n\n- Python: [pypostal](https://github.com/openvenues/pypostal)\n- Ruby: [ruby_postal](https://github.com/openvenues/ruby_postal)\n- Go: [gopostal](https://github.com/openvenues/gopostal)\n- Java/JVM: [jpostal](https://github.com/openvenues/jpostal)\n- PHP: [php-postal](https://github.com/openvenues/php-postal)\n- NodeJS: [node-postal](https://github.com/openvenues/node-postal)\n- R: [poster](https://github.com/ironholds/poster)\n\n**Unofficial language bindings**\n\n- Java: [javacpp-presets-libpostal](https://github.com/bytedeco/javacpp-presets/tree/master/libpostal)\n- LuaJIT: [lua-resty-postal](https://github.com/bungle/lua-resty-postal)\n- Perl: [Geo::libpostal](https://metacpan.org/pod/Geo::libpostal)\n- Elixir: [Expostal](https://github.com/SweetIQ/expostal)\n- Haskell: [haskell-postal](http://github.com/netom/haskell-postal)\n- Rust: [rust-postal](https://github.com/pnordahl/rust-postal)\n- Rust: [rustpostal](https://crates.io/crates/rustpostal)\n\n**Unofficial database extensions**\n\n- PostgreSQL: [pgsql-postal](https://github.com/pramsey/pgsql-postal)\n\n**Unofficial servers**\n\n- Libpostal REST GO Server (need ~4Gb memory) with basic security: [postal_server](https://github.com/le0pard/postal_server)\n- Libpostal REST Go Docker: [libpostal-rest-docker](https://github.com/johnlonganecker/libpostal-rest-docker)\n- Libpostal REST FastAPI Docker: [libpostal-fastapi](https://github.com/alpha-affinity/libpostal-fastapi)\n- Libpostal ZeroMQ Docker: [libpostal-zeromq](https://github.com/pasupulaphani/libpostal-docker)\n\n\nTests\n-----\n\nlibpostal uses [greatest](https://github.com/silentbicycle/greatest) for automated testing. To run the tests, use:\n\n```\nmake check\n```\n\nAdding [test cases](https://github.com/openvenues/libpostal/tree/master/test) is easy, even if your C is rusty/non-existent, and we'd love contributions. We use mostly functional tests checking string input against string output.\n\nlibpostal also gets periodically battle-tested on millions of addresses from OSM (clean) as well as anonymized queries from a production geocoder (not so clean). During this process we use valgrind to check for memory leaks and other errors.\n\nData files\n----------\n\nlibpostal needs to download some data files from S3. The basic files are on-disk\nrepresentations of the data structures necessary to perform expansion. For address\nparsing, since model training takes a few days, we publish the fully trained model\nto S3 and will update it automatically as new addresses get added to OSM, OpenAddresses, etc. Same goes for the language classifier model.\n\nData files are automatically downloaded when you run make. To check for and download\nany new data files, you can either run ```make```, or run:\n\n```\nlibpostal_data download all $YOUR_DATA_DIR/libpostal\n```\n\nAnd replace $YOUR_DATA_DIR with whatever you passed to configure during install.\n\nLanguage dictionaries\n---------------------\n\nlibpostal contains a number of per-language dictionaries that influence expansion, the language classifier, and the parser. To explore the dictionaries or contribute abbreviations/phrases in your language, see [resources/dictionaries](https://github.com/openvenues/libpostal/tree/master/resources/dictionaries).\n\nTraining data\n-------------\n\nIn machine learning, large amounts of training data are often essential for getting good results. Many open-source machine learning projects either release only the model code (results reproducible if and only if you're Google), or a pre-baked model where the training conditions are unknown.\n\nLibpostal is a bit different because it's trained on open data that's available to everyone, so we've released the entire training pipeline (the [geodata](https://github.com/openvenues/libpostal/tree/master/scripts/geodata) package in this repo), as well as the resulting training data itself on the Internet Archive. It's over 100GB unzipped.\n\nTraining data are stored on archive.org by the date they were created. There's also a file stored in the main directory of this repo called `current_parser_training_set` which stores the date of the most recently created training set. To always point to the latest data, try something like: ```latest=$(cat current_parser_training_set)``` and use that variable in place of the date.\n\n### Parser training sets ###\nAll files can be found at https://archive.org/download/libpostal-parser-training-data-YYYYMMDD/$FILE as gzip'd tab-separated values (TSV) files formatted like:```language\\tcountry\\taddress```.\n\n- **formatted_addresses_tagged.random.tsv.gz** (ODBL): OSM addresses. Apartments, PO boxes, categories, etc. are added primarily to these examples\n- **formatted_places_tagged.random.tsv.gz** (ODBL): every toponym in OSM (even cities represented as points, etc.), reverse-geocoded to its parent admins, possibly including postal codes if they're listed on the point/polygon. Every place gets a base level of representation and places with higher populations get proportionally more.\n- **formatted_ways_tagged.random.tsv.gz** (ODBL): every street in OSM (ways with highway=*, with a few conditions), reverse-geocoded to its admins\n- **geoplanet_formatted_addresses_tagged.random.tsv.gz** (CC-BY): every postal code in Yahoo GeoPlanet (includes almost every postcode in the UK, Canada, etc.) and their parent admins. The GeoPlanet admins have been cleaned up and mapped to libpostal's tagset\n- **openaddresses_formatted_addresses_tagged.random.tsv.gz** (various licenses, mostly CC-BY): most of the address data sets from [OpenAddresses](https://openaddresses.io/), which in turn come directly from government sources\n- **uk_openaddresses_formatted_addresses_tagged.random.tsv.gz** (CC-BY): addresses from [OpenAddresses UK](https://alpha.openaddressesuk.org/)\n\nIf the parser doesn't perform as well as you'd hoped on a particular type of address, the best recourse is to use grep/awk to look through the training data and try to determine if there's some pattern/style of address that's not being captured.\n\nFeatures\n--------\n\n- **Abbreviation expansion**: e.g. expanding \"rd\" => \"road\" but for almost any\nlanguage. libpostal supports > 50 languages and it's easy to add new languages\nor expand the current dictionaries. Ideographic languages (not separated by\nwhitespace e.g. Chinese) are supported, as are Germanic languages where\nthoroughfare types are concatenated onto the end of the string, and may\noptionally be separated so Rosenstraße and Rosen Straße are equivalent.\n\n- **International address parsing**: [Conditional Random Field](https://web.archive.org/web/20240104172655/http://blog.echen.me/2012/01/03/introduction-to-conditional-random-fields/) which parses\n\"123 Main Street New York New York\" into {\"house_number\": 123, \"road\":\n\"Main Street\", \"city\": \"New York\", \"state\": \"New York\"}. The parser works\nfor a wide variety of countries and languages, not just US/English.\nThe model is trained on over 1 billion addresses and address-like strings, using the\ntemplates in the [OpenCage address formatting repo](https://github.com/OpenCageData/address-formatting) to construct formatted,\ntagged training examples for every inhabited country in the world. Many types of [normalizations](https://github.com/openvenues/libpostal/blob/master/scripts/geodata/addresses/components.py)\nare performed to make the training data resemble real messy geocoder input as closely as possible.\n\n- **Language classification**: multinomial logistic regression\ntrained (using the [FTRL-Proximal](https://research.google.com/pubs/archive/41159.pdf) method to induce sparsity) on all of OpenStreetMap ways, addr:* tags, toponyms and formatted\naddresses. Labels are derived using point-in-polygon tests for both OSM countries\nand official/regional languages for countries and admin 1 boundaries\nrespectively. So, for example, Spanish is the default language in Spain but\nin different regions e.g. Catalunya, Galicia, the Basque region, the respective\nregional languages are the default. Dictionary-based disambiguation is employed in\ncases where the regional language is non-default e.g. Welsh, Breton, Occitan.\nThe dictionaries are also used to abbreviate canonical phrases like \"Calle\" => \"C/\"\n(performed on both the language classifier and the address parser training sets)\n\n- **Numeric expression parsing** (\"twenty first\" => 21st,\n\"quatre-vingt-douze\" => 92, again using data provided in CLDR), supports > 30\nlanguages. Handles languages with concatenated expressions e.g.\nmilleottocento => 1800. Optionally normalizes Roman numerals regardless of the\nlanguage (IX => 9) which occur in the names of many monarchs, popes, etc.\n\n- **Fast, accurate tokenization/lexing**: clocked at > 1M tokens / sec,\nimplements the TR-29 spec for UTF8 word segmentation, tokenizes East Asian\nlanguages character by character instead of on whitespace.\n\n- **UTF8 normalization**: optionally decompose UTF8 to NFD normalization form,\nstrips accent marks e.g. à => a and/or applies Latin-ASCII transliteration.\n\n- **Transliteration**: e.g. улица => ulica or ulitsa. Uses all\n[CLDR transforms](http://www.unicode.org/repos/cldr/trunk/common/transforms/), the exact same source data as used by [ICU](http://site.icu-project.org/),\nthough libpostal doesn't require pulling in all of ICU (might conflict\nwith your system's version). Note: some languages, particularly Hebrew, Arabic\nand Thai may not include vowels and thus will not often match a transliteration\ndone by a human. It may be possible to implement statistical transliterators\nfor some of these languages.\n\n- **Script detection**: Detects which script a given string uses (can be\nmultiple e.g. a free-form Hong Kong or Macau address may use both Han and\nLatin scripts in the same address). In transliteration we can use all\napplicable transliterators for a given Unicode script (Greek can for instance\nbe transliterated with Greek-Latin, Greek-Latin-BGN and Greek-Latin-UNGEGN).\n\nNon-goals\n---------\n\n- Verifying that a location is a valid address\n- Actually geocoding addresses to a lat/lon (that requires a database/search index)\n- Extracting addresses from free text\n\nRaison d'être\n-------------\n\nlibpostal was originally created as part of the [OpenVenues](https://github.com/openvenues/openvenues) project to solve the problem of venue deduping. In OpenVenues, we have a data set of millions of\nplaces derived from terabytes of web pages from the [Common Crawl](http://commoncrawl.org/).\nThe Common Crawl is published monthly, and so even merging the results of\ntwo crawls produces significant duplicates.\n\nDeduping is a relatively well-studied field, and for text documents\nlike web pages, academic papers, etc. there exist pretty decent approximate\nsimilarity methods such as [MinHash](https://en.wikipedia.org/wiki/MinHash).\n\nHowever, for physical addresses, the frequent use of conventional abbreviations\nsuch as Road == Rd, California == CA, or New York City == NYC complicates\nmatters a bit. Even using a technique like MinHash, which is well suited for\napproximate matches and is equivalent to the Jaccard similarity of two sets, we\nhave to work with very short texts and it's often the case that two equivalent\naddresses, one abbreviated and one fully specified, will not match very closely\nin terms of n-gram set overlap. In non-Latin scripts, say a Russian address and\nits transliterated equivalent, it's conceivable that two addresses referring to\nthe same place may not match even a single character.\n\nAs a motivating example, consider the following two equivalent ways to write a\nparticular Manhattan street address with varying conventions and degrees\nof verbosity:\n\n- 30 W 26th St Fl #7\n- 30 West Twenty-sixth Street Floor Number 7\n\nObviously '30 W 26th St Fl #7 != '30 West Twenty-sixth Street Floor Number 7'\nin a string comparison sense, but a human can grok that these two addresses\nrefer to the same physical location.\n\nlibpostal aims to create normalized geographic strings, parsed into components,\nsuch that we can more effectively reason about how well two addresses\nactually match and make automated server-side decisions about dupes.\n\nSo it's not a geocoder?\n-----------------------\n\nIf the above sounds a lot like geocoding, that's because it is in a way,\nonly in the OpenVenues case, we have to geocode without a UI or a user\nto select the correct address in an autocomplete dropdown. Given a database\nof source addresses such as OpenAddresses or OpenStreetMap (or all of the above),\nlibpostal can be used to implement things like address deduping and server-side\nbatch geocoding in settings like MapReduce or stream processing.\n\nNow, instead of trying to bake address-specific conventions into traditional\ndocument search engines like Elasticsearch using giant synonyms files, scripting,\ncustom analyzers, tokenizers, and the like, geocoding can look like this:\n\n1. Run the addresses in your database through libpostal's expand_address\n2. Store the normalized string(s) in your favorite search engine, DB,\n   hashtable, etc.\n3. Run your user queries or fresh imports through libpostal and search\n   the existing database using those strings\n\nIn this way, libpostal can perform fuzzy address matching in constant time\nrelative to the size of the data set.\n\nWhy C?\n------\n\nlibpostal is written in C for three reasons (in order of importance):\n\n1. **Portability/ubiquity**: libpostal targets higher-level languages that\npeople actually use day-to-day: Python, Go, Ruby, NodeJS, etc. The beauty of C\nis that just about any programming language can bind to it and C compilers are\neverywhere, so pick your favorite, write a binding, and you can use libpostal\ndirectly in your application without having to stand up a separate server. We\nsupport Mac/Linux (Windows is not a priority but happy to accept patches), have\na standard autotools build and an endianness-agnostic file format for the data\nfiles. The Python bindings, are maintained as part of this repo since they're\nneeded to construct the training data.\n\n2. **Memory-efficiency**: libpostal is designed to run in a MapReduce setting\nwhere we may be limited to < 1GB of RAM per process depending on the machine\nconfiguration. As much as possible libpostal uses contiguous arrays, tries\n(built on contiguous arrays), bloom filters and compressed sparse matrices to\nkeep memory usage low. It's possible to use libpostal on a mobile device with\nmodels trained on a single country or a handful of countries.\n\n3. **Performance**: this is last on the list for a reason. Most of the\noptimizations in libpostal are for memory usage rather than performance.\nlibpostal is quite fast given the amount of work it does. It can process\n10-30k addresses / second in a single thread/process on the platforms we've\ntested (that means processing every address in OSM planet in a little over\nan hour). Check out the simple benchmark program to test on your environment\nand various types of input. In the MapReduce setting, per-core performance\nisn't as important because everything's being done in parallel, but there are\nsome streaming ingestion applications at Mapzen where this needs to\nrun in-process.\n\nC conventions\n-------------\n\nlibpostal is written in modern, legible, C99 and uses the following conventions:\n\n- Roughly object-oriented, as much as allowed by C\n- Almost no pointer-based data structures, arrays all the way down\n- Uses dynamic character arrays (inspired by [sds](https://github.com/antirez/sds)) for safer string handling\n- Confines almost all mallocs to *name*_new and all frees to *name*_destroy\n- Efficient existing implementations for simple things like hashtables\n- Generic containers (via [klib](https://github.com/attractivechaos/klib)) whenever possible\n- Data structures take advantage of sparsity as much as possible\n- Efficient double-array trie implementation for most string dictionaries\n- Cross-platform as much as possible, particularly for *nix\n\nPreprocessing (Python)\n----------------------\n\nThe [geodata](https://github.com/openvenues/libpostal/tree/master/scripts/geodata) Python package in the libpostal repo contains the pipeline for preprocessing the various geo\ndata sets and building training data for the C models to use.\nThis package shouldn't be needed for most users, but for those interested in generating new types of addresses or improving libpostal's training data, this is where to look.\n\nAddress parser accuracy\n-----------------------\n\nOn held-out test data (meaning labeled parses that the model has _not_ seen\nbefore), the address parser achieves 99.45% full parse accuracy.\n\nFor some tasks like named entity recognition it's preferable to use something\nlike an F1 score or variants, mostly because there's a class bias problem (most\nwords are non-entities, and a system that simply predicted non-entity for\nevery token would actually do fairly well in terms of accuracy). That is not\nthe case for address parsing. Every token has a label and there are millions\nof examples of each class in the training data, so accuracy is preferable as it's\na clean, simple and intuitive measure of performance.\n\nHere we use full parse accuracy, meaning we only give the parser one \"point\" in\nthe numerator if it gets every single token in the address correct. That should\nbe a better measure than simply looking at whether each token was correct.\n\nImproving the address parser\n----------------------------\n\nThough the current parser works quite well for most standard addresses, there\nis still room for improvement, particularly in making sure the training data\nwe use is as close as possible to addresses in the wild. There are two primary\nways the address parser can be improved even further (in order of difficulty):\n\n1. Contribute addresses to OSM. Anything with an addr:housenumber tag will be\n   incorporated automatically into the parser next time it's trained.\n2. If the address parser isn't working well for a particular country, language\n   or style of address, chances are that some name variations or places being\n   missed/mislabeled during training data creation. Sometimes the fix is to\n   update the formats at: https://github.com/OpenCageData/address-formatting,\n   and in many other cases there are relatively simple tweaks we can make\n   when creating the training data that will ensure the model is trained to\n   handle your use case without you having to do any manual data entry.\n   If you see a pattern of obviously bad address parses, the best thing to\n   do is post an issue to Github.\n\nContributing\n------------\n\nBug reports, issues and pull requests are welcome. Please read the [contributing guide](CONTRIBUTING.md) before submitting your issue, bug report, or pull request.\n\nSubmit issues at: https://github.com/openvenues/libpostal/issues.\n\n\nShoutouts\n---------\n\nSpecial thanks to @BenK10 for the initial Windows build and @AeroXuk for integrating it seamlessly into the project and setting up an Appveyor build.\n\nLicense\n-------\n\nThe software is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE72:3E1C8:17E7F0:5E230D:6AB92AD8"},"text_sha256":"14b9589f17f2cd88b2972d89bd98b463ed598885ec9b8778b11a8a128d7d43cb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"rust-ml/linfa","input_row":{"repository":"rust-ml/linfa","url":"https://github.com/rust-ml/linfa","name":"linfa","owner":"rust-ml","description":"A Rust machine learning framework.","language":"Rust","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4750,"issues":183,"created_at":"2018-04-05T07:03:30Z","updated_at":"2026-09-27T08:26:50Z","first_commit_at":"2018-04-05T07:03:31Z","last_commit_at":"2026-08-22T21:42:49Z","activity_months":100.58,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:39.237Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"rust-ml/linfa","visibility":"public","created_at":"2018-04-05T07:03:30Z","updated_at":"2026-09-27T08:26:50Z","private":false,"fork":false,"archived":false,"stargazers_count":4750,"open_issues_count":75,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2473","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F7:E80A6:17A6D68:1BCA7C1:6AB92AE7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2472","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0867:52542:17BF950:1BE3347:6AB92AE7"},"commit":{"sha":"2d3a21ddca4b8020d70204919121334669eabd94","url":"https://github.com/rust-ml/linfa/commit/2d3a21ddca4b8020d70204919121334669eabd94","date":"2018-04-06T19:00:08Z","author_date":"2018-04-06T19:00:08Z","committer_date":"2018-04-06T19:00:08Z","tree_sha":"53c0d26f7fcb81fa87c9c0b668af8e4364406339","message_first_line":"First sketch of function implementation. Still need to get it to compile"},"tree_request_status":200,"tree_rate":{"github_remaining":"2471","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0836:62B94:17BE1FA:1BE18E5:6AB92AE8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":322,"blob_sha":"6a4f9335003f4b12d98189d0b7750bf0340ac31c","priority":0}],"documents":[{"path":"README.md","size":322,"blob_sha":"6a4f9335003f4b12d98189d0b7750bf0340ac31c","priority":0,"status":200,"text":"# linfa\n\n# License\nDual-licensed to be compatible with the Rust project.\n\nLicensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"71D6:09ED:E51F9:3F47DE:6AB92AE8"},"text_sha256":"7a5f3f6f062c73a4163bff3f8104b8073f503f2064d0864cc990d45300c0243e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2470","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A7:3C4024:17FFDCF:1C23720:6AB92AE8"},"commit":{"sha":"7fe5c86e7f89a17bad9fa096d4b55a28713044c7","url":"https://github.com/rust-ml/linfa/commit/7fe5c86e7f89a17bad9fa096d4b55a28713044c7","date":"2026-05-30T11:28:49Z","author_date":"2026-05-30T11:28:49Z","committer_date":"2026-05-30T11:28:49Z","tree_sha":"ad6ab5b878454faa402382598283a33a20899055","message_first_line":"use log-sum-exp in estimate_log_prob_resp to prevent overflow (Ref to #443) (#444)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2469","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:17A6E78:1BCA905:6AB92AE9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7981,"blob_sha":"10ad4f8dbd62879e8d0f2c436e80f9f671572cbb","priority":0}],"documents":[{"path":"README.md","size":7981,"blob_sha":"10ad4f8dbd62879e8d0f2c436e80f9f671572cbb","priority":0,"status":200,"text":"<img align=\"left\" src=\"./mascot.svg\" width=\"70px\" height=\"70px\" alt=\"Linfa mascot icon\">\n\n# Linfa\n\n[![crates.io](https://img.shields.io/crates/v/linfa.svg)](https://crates.io/crates/linfa)\n[![Documentation](https://docs.rs/linfa/badge.svg)](https://docs.rs/linfa)\n[![DocumentationLatest](https://img.shields.io/badge/docs-latest-blue)](https://rust-ml.github.io/linfa/rustdocs/linfa/)\n[![Codequality](https://github.com/rust-ml/linfa/workflows/Codequality%20Lints/badge.svg)](https://github.com/rust-ml/linfa/actions?query=workflow%3A%22Codequality+Lints%22)\n[![Run Tests](https://github.com/rust-ml/linfa/workflows/Run%20Tests/badge.svg)](https://github.com/rust-ml/linfa/actions?query=workflow%3A%22Run+Tests%22)\n\n> _**linfa**_ (Italian) / _**sap**_ (English):\n> \n> The **vital** circulating fluid of a plant.\n\n\n`linfa` aims to provide a comprehensive toolkit to build Machine Learning applications with Rust.\n\nKin in spirit to Python's `scikit-learn`, it focuses on common preprocessing tasks and classical ML algorithms for your everyday ML tasks.\n\n<strong>\n    <a href=\"https://rust-ml.github.io/linfa/\">Website<\/a> | <a href=\"https://rust-ml.zulipchat.com\">Community chat<\/a>\n<\/strong>\n\n## Current state\n\nWhere does `linfa` stand right now? [Are we learning yet?](http://www.arewelearningyet.com/)\n\n`linfa` currently provides sub-packages with the following algorithms: \n\n\n| Name                                             | Purpose                                  | Status                | Category              | Notes                                                                                     |\n| :----------------------------------------------- | :--------------------------------------- | :-------------------- | :-------------------- | :---------------------------------------------------------------------------------------- |\n| [bayes](algorithms/linfa-bayes/)                 | Naive Bayes                              | Tested                | Supervised learning   | Contains Bernouilli, Gaussian and Multinomial Naive Bayes                                 |\n| [clustering](algorithms/linfa-clustering/)       | Data clustering                          | Tested / Benchmarked  | Unsupervised learning | Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS |\n| [ensemble](algorithms/linfa-ensemble/)           | Ensemble methods                         | Tested                | Supervised learning   | Contains bagging, random forest and AdaBoost                                              |\n| [elasticnet](algorithms/linfa-elasticnet/)       | Elastic Net                              | Tested                | Supervised learning   | Linear regression with elastic net constraints                                            |\n| [ftrl](algorithms/linfa-ftrl/)                   | Follow The Regularized Leader - proximal | Tested  / Benchmarked | Partial fit           | Contains L1 and L2 regularization. Possible incremental update                            |\n| [hierarchical](algorithms/linfa-hierarchical/)   | Agglomerative hierarchical clustering    | Tested                | Unsupervised learning | Cluster and build hierarchy of clusters                                                   |\n| [ica](algorithms/linfa-ica/)                     | Independent component analysis           | Tested                | Unsupervised learning | Contains FastICA implementation                                                           |\n| [kernel](algorithms/linfa-kernel/)               | Kernel methods for data transformation   | Tested                | Pre-processing        | Maps feature vector into higher-dimensional space                                         |\n| [lars](algorithms/linfa-lars/)                   | Linear regression                        | Tested                | Supervised learning   | Contains Least Angle Regression (LARS)                                                    |\n| [linear](algorithms/linfa-linear/)               | Linear regression                        | Tested                | Supervised learning   | Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM)                    |\n| [logistic](algorithms/linfa-logistic/)           | Logistic regression                      | Tested                | Partial fit           | Builds two-class logistic regression models                                               |\n| [nn](algorithms/linfa-nn/)                       | Nearest Neighbours & Distances           | Tested / Benchmarked  | Pre-processing        | Spatial index structures and distance functions                                           |\n| [pls](algorithms/linfa-pls/)                     | Partial Least Squares                    | Tested                | Supervised learning   | Contains PLS estimators for dimensionality reduction and regression                       |\n| [preprocessing](algorithms/linfa-preprocessing/) | Normalization & Vectorization            | Tested / Benchmarked  | Pre-processing        | Contains data normalization/whitening and count vectorization/tf-idf                      |\n| [reduction](algorithms/linfa-reduction/)         | Dimensionality reduction                 | Tested                | Pre-processing        | Diffusion mapping, Principal Component Analysis (PCA), Random projections                 |\n| [svm](algorithms/linfa-svm/)                     | Support Vector Machines                  | Tested                | Supervised learning   | Classification or regression analysis of labeled datasets                                 |\n| [trees](algorithms/linfa-trees/)                 | Decision trees                           | Tested / Benchmarked  | Supervised learning   | Linear decision trees                                                                     |\n| [tsne](algorithms/linfa-tsne/)                   | Dimensionality reduction                 | Tested                | Unsupervised learning | Contains exact solution and Barnes-Hut approximation t-SNE                                |\n\nWe believe that only a significant community effort can nurture, build, and sustain a machine learning ecosystem in Rust - there is no other way forward.\n\nIf this strikes a chord with you, please take a look at the [roadmap](https://github.com/rust-ml/linfa/issues/7) and get involved!\n\n## Browser WASM\n\nFor browser-style WASM on `wasm32-unknown-unknown`, enable `linfa`'s `wasm-bindgen` feature.\n\n## BLAS/Lapack backend\n\nSome algorithm crates need to use an external library for linear algebra routines. By default, we use a pure-Rust implementation. However, you can also choose an external BLAS/LAPACK backend library instead, by enabling the `blas` feature and a feature corresponding to your BLAS backend. Currently you can choose between the following BLAS/LAPACK backends: `openblas`, `netblas` or `intel-mkl`.\n\n| Backend   | Linux | Windows | macOS |\n| :-------- | :---: | :-----: | :---: |\n| OpenBLAS  |   ✔️   |    -    |   -   |\n| Netlib    |   ✔️   |    -    |   -   |\n| Intel MKL |   ✔️   |    ✔️    |   ✔️   |\n\nEach BLAS backend has two features available. The feature allows you to choose between linking the BLAS library in your system or statically building the library. For example, the features for the `intel-mkl` backend are `intel-mkl-static` and `intel-mkl-system`.\n\nAn example set of Cargo flags for enabling the Intel MKL backend on an algorithm crate is `--features blas,linfa/intel-mkl-system`. Note that the BLAS backend features are defined on the `linfa` crate, and should only be specified for the final executable.\n\n# License\nDual-licensed to be compatible with the Rust project.\n\nLicensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F98:3D40A:17235E:5D5FAA:6AB92AE9"},"text_sha256":"25c9b880a02a15bc6823f6872cc7de272f5dba358397647ba6d902a742dbfb88"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"DistrictDataLabs/yellowbrick","input_row":{"repository":"DistrictDataLabs/yellowbrick","url":"https://github.com/DistrictDataLabs/yellowbrick","name":"yellowbrick","owner":"DistrictDataLabs","description":"Visual analysis and diagnostic tools to facilitate machine learning model selection.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4406,"issues":702,"created_at":"2016-05-18T14:12:17Z","updated_at":"2026-09-25T15:52:58Z","first_commit_at":"2016-05-18T14:12:18Z","last_commit_at":"2023-07-05T18:14:28Z","activity_months":85.549999999999997,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:41.799Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"DistrictDataLabs/yellowbrick","visibility":"public","created_at":"2016-05-18T14:12:17Z","updated_at":"2026-09-25T15:52:58Z","private":false,"fork":false,"archived":false,"stargazers_count":4406,"open_issues_count":117,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2468","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CB:156040:17D015C:1BF3059:6AB92AE9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2467","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D85916:FE3E31:6AB92AEA"},"commit":{"sha":"f91488059d6005790b0000a2408b5904ba379d98","url":"https://github.com/DistrictDataLabs/yellowbrick/commit/f91488059d6005790b0000a2408b5904ba379d98","date":"2018-05-23T20:54:27Z","author_date":"2018-05-23T20:54:27Z","committer_date":"2018-05-23T20:54:27Z","tree_sha":"5b38023d24e1cb19674de6cf433985e49caa41e0","message_first_line":"Merge branch 'develop' of github.com:DistrictDataLabs/yellowbrick into develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"2466","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:1781D5B:1BA3B2E:6AB92AEA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10405,"blob_sha":"6bd764f04c32cf947ff2fd03ed01c0b003df6e03","priority":0}],"documents":[{"path":"README.md","size":10405,"blob_sha":"6bd764f04c32cf947ff2fd03ed01c0b003df6e03","priority":0,"status":200,"text":"# Yellowbrick\n\n[![Build Status](https://travis-ci.com/DistrictDataLabs/yellowbrick.svg?branch=develop)](https://travis-ci.com/DistrictDataLabs/yellowbrick)\n[![Build status](https://ci.appveyor.com/api/projects/status/11abg00ollbdf4oy?svg=true)](https://ci.appveyor.com/project/districtdatalabs/yellowbrick)\n[![Coverage Status](https://coveralls.io/repos/github/DistrictDataLabs/yellowbrick/badge.svg?branch=master)](https://coveralls.io/github/DistrictDataLabs/yellowbrick?branch=master)\n[![Code Health](https://landscape.io/github/DistrictDataLabs/yellowbrick/master/landscape.svg?style=flat)](https://landscape.io/github/DistrictDataLabs/yellowbrick/master)\n[![PyPI version](https://badge.fury.io/py/yellowbrick.svg)](https://badge.fury.io/py/yellowbrick)\n[![Documentation Status](https://readthedocs.org/projects/yellowbrick/badge/?version=latest)](http://yellowbrick.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1206239.svg)](https://doi.org/10.5281/zenodo.1206239)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/DistrictDataLabs/yellowbrick/develop?filepath=examples%2Fexamples.ipynb)\n\n\n**Visual analysis and diagnostic tools to facilitate machine learning model selection.**\n\n![Follow the yellow brick road](docs/images/yellowbrickroad.jpg)\nImage by [Quatro Cinco](https://flic.kr/p/2Yj9mj), used with permission, Flickr Creative Commons.\n\nThis README is a guide for developers, if you're new to Yellowbrick, get started at our [documentation](http://www.scikit-yb.org/).\n\n## What is Yellowbrick?\n\nYellowbrick is a suite of visual diagnostic tools called \"Visualizers\" that extend the scikit-learn API to allow human steering of the model selection process. In a nutshell, Yellowbrick combines scikit-learn with matplotlib in the best tradition of the scikit-learn documentation, but to produce visualizations for _your_ models!\n\n![Visualizers](docs/images/visualizers.png)\n\n### Visualizers\n\nVisualizers are estimators (objects that learn from data) whose primary objective is to create visualizations that allow insight into the model selection process. In scikit-learn terms, they can be similar to transformers when visualizing the data space or wrapping a model estimator similar to how the \"ModelCV\" (e.g. RidgeCV, LassoCV) methods work. The primary goal of Yellowbrick is to create a sensical API similar to scikit-learn. Some of our most popular visualizers include:\n\n#### Feature Visualization\n\n- **Rank Features**: single or pairwise ranking of features to detect relationships\n- **Parallel Coordinates**: horizontal visualization of instances\n- **Radial Visualization**: separation of instances around a circular plot\n- **PCA Projection**: projection of instances based on principal components\n- **Manifold Visualization**: high dimensional visualization with manifold learning\n- **Feature Importances**: rank features based on their in-model performance\n- **Recursive Feature Elimination**: find the best subset of features by importance\n- **Scatter and Joint Plots**: direct data visualization with feature selection\n\n#### Classification Visualization\n\n- **Class Balance**: see how the distribution of classes affects the model\n- **Class Prediction Error**: shows error and support in classification\n- **Classification Report**: visual representation of precision, recall, and F1\n- **ROC/AUC Curves**: receiver operator characteristics and area under the curve\n- **Confusion Matrices**: visual description of class decision making\n- **Discrimination Threshold**: find a threshold that best separates binary classes\n\n#### Regression Visualization\n\n- **Prediction Error Plots**: find model breakdowns along the domain of the target\n- **Residuals Plot**: show the difference in residuals of training and test data\n- **Alpha Selection**: show how the choice of alpha influences regularization\n\n#### Clustering Visualization\n\n- **K-Elbow Plot**: select k using the elbow method and various metrics\n- **Silhouette Plot**: select k by visualizing silhouette coefficient values\n\n#### Model Selection Visualization\n\n- **Validation Curve**: tune a model with respect to a single hyperparameter\n- **Learning Curve**: show if a model might benefit from more data or less complexity\n\n#### Text Visualization\n\n- **Term Frequency**: visualize the frequency distribution of terms in the corpus\n- **t-SNE Corpus Visualization**: use stochastic neighbor embedding to project documents.\n\nAnd more! Visualizers are being added all the time, so be sure to check the examples (or even the develop branch) and feel free to contribute your ideas for Visualizers!\n\n## Installing Yellowbrick\n\nYellowbrick is compatible with Python 2.7 or later but it is preferred to use Python 3.5 or later to take full advantage of all functionality. Yellowbrick also depends on scikit-learn 0.18 or later and matplotlib 1.5 or later. The simplest way to install Yellowbrick is from PyPI with pip, Python's preferred package installer.\n\n    $ pip install yellowbrick\n\nNote that Yellowbrick is an active project and routinely publishes new releases with more visualizers and updates. In order to upgrade Yellowbrick to the latest version, use pip as follows.\n\n    $ pip install -U yellowbrick\n\nYou can also use the `-U` flag to update scikit-learn, matplotlib, or any other third party utilities that work well with Yellowbrick to their latest versions.\n\nIf you're using Anaconda (recommended for Windows users), you can take advantage of the conda utility to install Yellowbrick:\n\n    conda install -c districtdatalabs yellowbrick\n\nNote, however, that there is a [known bug](https://github.com/DistrictDataLabs/yellowbrick/issues/205) installing Yellowbrick on Linux with Anaconda.\n\n## Using Yellowbrick\n\nThe Yellowbrick API is specifically designed to play nicely with scikit-learn. Here is an example of a typical workflow sequence with scikit-learn and Yellowbrick:\n\n### Feature Visualization\n\nIn this example, we see how Rank2D performs pairwise comparisons of each feature in the data set with a specific metric or algorithm and then returns them ranked as a lower left triangle diagram.\n\n```python\nfrom yellowbrick.features import Rank2D\n\nvisualizer = Rank2D(features=features, algorithm='covariance')\nvisualizer.fit(X, y)                # Fit the data to the visualizer\nvisualizer.transform(X)             # Transform the data\nvisualizer.poof()                   # Draw/show/poof the data\n```\n\n### Model Visualization\n\nIn this example, we instantiate a scikit-learn classifier and then use Yellowbrick's ROCAUC class to visualize the tradeoff between the classifier's sensitivity and specificity.\n\n```python\nfrom sklearn.svm import LinearSVC\nfrom yellowbrick.classifier import ROCAUC\n\nmodel = LinearSVC()\nmodel.fit(X,y)\nvisualizer = ROCAUC(model)\nvisualizer.score(X,y)\nvisualizer.poof()\n```\n\nFor additional information on getting started with Yellowbrick, check out our [examples notebook](https://github.com/DistrictDataLabs/yellowbrick/blob/develop/examples/examples.ipynb).\n\nWe also have a [quick start guide](https://github.com/DistrictDataLabs/yellowbrick/blob/master/docs/quickstart.rst).\n\n## Contributing to Yellowbrick\n\nYellowbrick is an open source project that is supported by a community who will gratefully and humbly accept any contributions you might make to the project. Large or small, any contribution makes a big difference; and if you've never contributed to an open source project before, we hope you will start with Yellowbrick!\n\nPrincipally, Yellowbrick development is about the addition and creation of *visualizers* -- objects that learn from data and create a visual representation of the data or model. Visualizers integrate with scikit-learn estimators, transformers, and pipelines for specific purposes and as a result can be simple to build and deploy. The most common contribution is therefore a new visualizer for a specific model or model family. We'll discuss in detail how to build visualizers later.\n\nBeyond creating visualizers, there are many ways to contribute:\n\n- Submit a bug report or feature request on [GitHub Issues](https://github.com/DistrictDataLabs/yellowbrick/issues).\n- Contribute a Jupyter notebook to our examples[ gallery](https://github.com/DistrictDataLabs/yellowbrick/tree/develop/examples).\n- Assist us with [user testing](http://www.scikit-yb.org/en/latest/evaluation.html).\n- Add to the documentation or help with our website, [scikit-yb.org](http://www.scikit-yb.org).\n- Write unit or integration tests for our project.\n- Answer questions on our issues, mailing list, Stack Overflow, and elsewhere.\n- Translate our documentation into another language.\n- Write a blog post, tweet, or share our project with others.\n- Teach someone how to use Yellowbrick.\n\nAs you can see, there are lots of ways to get involved and we would be very happy for you to join us! The only thing we ask is that you abide by the principles of openness, respect, and consideration of others as described in the [Python Software Foundation Code of Conduct](https://www.python.org/psf/codeofconduct/).\n\nFor more information, checkout the `CONTRIBUTING.md` file in the root of the repository or the detailed documentation at [Contributing to Yellowbrick](http://www.scikit-yb.org/en/latest/contributing.html)\n\n## Development Scripts\n\nYellowbrick contains scripts to help with development, including downloading fixture data for tests and managing images for comparison.\n\n### Images\n\nThe image comparison helper script manages the test directory's `baseline_images` folder by copying files from the `actual_images` folder to setup baselines. To use this script, first run the tests (which will cause image not found errors) then copy the images into baseline as follows:\n\n```\n$ python -m tests.images tests/test_visualizer.py\n```\n\nWhere `tests/test_visualizer.py` is the test file that contains the image comparison tests. All related tests will be discovered, validated, and copied to the baseline directory. To clear out images from both actual and baseline to reset tests, use the `-C` flag:\n\n```\n$ python -m tests.images -C tests/test_visualizer.py\n```\n\nGlob syntax can be used to move multiple files. For example to reset all the classifier tests:\n\n```\n$ python -m tests.images tests/test_classifier/*   \n```\n\nThough it is recommended that specific test cases are targeted, rather than updating entire directories.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6630:3E1DA:179266:5DCF2D:6AB92AEA"},"text_sha256":"68e48269d6b0b6f795a14bb5db665c41289ae0922dbaedcdd46b00854eab75cc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2465","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:17A488F:1BC7624:6AB92AEB"},"commit":{"sha":"f7a8e950bd31452ea2f5d402a1c5d519cd163fd5","url":"https://github.com/DistrictDataLabs/yellowbrick/commit/f7a8e950bd31452ea2f5d402a1c5d519cd163fd5","date":"2023-07-05T18:14:28Z","author_date":"2023-07-05T18:14:28Z","committer_date":"2023-07-05T18:14:28Z","tree_sha":"88efd76316e4184d76a5e0585d95fe734233942c","message_first_line":"`SilhouetteVisualizer` add support for more estimators (#1294)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2464","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17D08C2:1BF432B:6AB92AEB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8545,"blob_sha":"38c2947edd08e3d62e946b89a7b8051debb73562","priority":0}],"documents":[{"path":"README.md","size":8545,"blob_sha":"38c2947edd08e3d62e946b89a7b8051debb73562","priority":0,"status":200,"text":"# Yellowbrick\n\n\n[![Build Status](https://github.com/DistrictDataLabs/yellowbrick/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/DistrictDataLabs/yellowbrick/actions/workflows/ci.yml)\n[![Coverage Status](https://codecov.io/gh/DistrictDataLabs/yellowbrick/branch/develop/graph/badge.svg?token=BnaSECZz2r)](https://codecov.io/gh/DistrictDataLabs/yellowbrick)\n[![Total Alerts](https://img.shields.io/lgtm/alerts/g/DistrictDataLabs/yellowbrick.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DistrictDataLabs/yellowbrick/alerts/)\n[![Language Grade: Python](https://img.shields.io/lgtm/grade/python/g/DistrictDataLabs/yellowbrick.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DistrictDataLabs/yellowbrick/context:python)\n[![PyPI version](https://badge.fury.io/py/yellowbrick.svg)](https://badge.fury.io/py/yellowbrick)\n[![Documentation Status](https://readthedocs.org/projects/yellowbrick/badge/?version=latest)](http://yellowbrick.readthedocs.io/en/latest/?badge=latest)\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1206239.svg)](https://doi.org/10.5281/zenodo.1206239)\n[![JOSS](http://joss.theoj.org/papers/10.21105/joss.01075/status.svg)](https://doi.org/10.21105/joss.01075)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/DistrictDataLabs/yellowbrick/develop?filepath=examples%2Fexamples.ipynb)\n\n\n**Visual analysis and diagnostic tools to facilitate machine learning model selection.**\n\n[![Banner](docs/images/readme/banner.png)](https://www.scikit-yb.org/en/latest/gallery.html)\n\n## What is Yellowbrick?\n\nYellowbrick is a suite of visual diagnostic tools called \"Visualizers\" that extend the scikit-learn API to allow human steering of the model selection process. In a nutshell, Yellowbrick combines scikit-learn with matplotlib in the best tradition of the scikit-learn documentation, but to produce visualizations for _your_ machine learning workflow!\n\nFor complete documentation on the Yellowbrick API, a gallery of available visualizers, the contributor's guide, tutorials and teaching resources, frequently asked questions, and more, please visit our documentation at [www.scikit-yb.org](https://www.scikit-yb.org/).\n\n## Installing Yellowbrick\n\nYellowbrick is compatible with Python 3.4 or later and also depends on scikit-learn and matplotlib. The simplest way to install Yellowbrick and its dependencies is from PyPI with pip, Python's preferred package installer.\n\n    $ pip install yellowbrick\n\nNote that Yellowbrick is an active project and routinely publishes new releases with more visualizers and updates. In order to upgrade Yellowbrick to the latest version, use pip as follows.\n\n    $ pip install -U yellowbrick\n\nYou can also use the `-U` flag to update scikit-learn, matplotlib, or any other third party utilities that work well with Yellowbrick to their latest versions.\n\nIf you're using Anaconda (recommended for Windows users), you can take advantage of the conda utility to install Yellowbrick:\n\n    conda install -c districtdatalabs yellowbrick\n\n## Using Yellowbrick\n\nThe Yellowbrick API is specifically designed to play nicely with scikit-learn. Here is an example of a typical workflow sequence with scikit-learn and Yellowbrick:\n\n### Feature Visualization\n\nIn this example, we see how Rank2D performs pairwise comparisons of each feature in the data set with a specific metric or algorithm and then returns them ranked as a lower left triangle diagram.\n\n```python\nfrom yellowbrick.features import Rank2D\n\nvisualizer = Rank2D(\n    features=features, algorithm='covariance'\n)\nvisualizer.fit(X, y)                # Fit the data to the visualizer\nvisualizer.transform(X)             # Transform the data\nvisualizer.show()                   # Finalize and render the figure\n```\n\n### Model Visualization\n\nIn this example, we instantiate a scikit-learn classifier and then use Yellowbrick's ROCAUC class to visualize the tradeoff between the classifier's sensitivity and specificity.\n\n```python\nfrom sklearn.svm import LinearSVC\nfrom yellowbrick.classifier import ROCAUC\n\nmodel = LinearSVC()\nvisualizer = ROCAUC(model)\nvisualizer.fit(X,y)\nvisualizer.score(X,y)\nvisualizer.show()\n```\n\nFor additional information on getting started with Yellowbrick, view the [Quick Start Guide](https://www.scikit-yb.org/en/latest/quickstart.html) in the [documentation](https://www.scikit-yb.org/en/latest/) and check out our [examples notebook](https://github.com/DistrictDataLabs/yellowbrick/blob/develop/examples/examples.ipynb).\n\n## Contributing to Yellowbrick\n\nYellowbrick is an open source project that is supported by a community who will gratefully and humbly accept any contributions you might make to the project. Large or small, any contribution makes a big difference; and if you've never contributed to an open source project before, we hope you will start with Yellowbrick!\n\nIf you are interested in contributing, check out our [contributor's guide](https://www.scikit-yb.org/en/latest/contributing/index.html). Beyond creating visualizers, there are many ways to contribute:\n\n- Submit a bug report or feature request on [GitHub Issues](https://github.com/DistrictDataLabs/yellowbrick/issues).\n- Contribute a Jupyter notebook to our examples [gallery](https://github.com/DistrictDataLabs/yellowbrick/tree/develop/examples).\n- Assist us with [user testing](https://www.scikit-yb.org/en/latest/evaluation.html).\n- Add to the documentation or help with our website, [scikit-yb.org](https://www.scikit-yb.org).\n- Write [unit or integration tests](https://www.scikit-yb.org/en/latest/contributing/developing_visualizers.html#integration-tests) for our project.\n- Answer questions on our issues, mailing list, Stack Overflow, and elsewhere.\n- Translate our documentation into another language.\n- Write a blog post, tweet, or share our project with others.\n- [Teach](https://www.scikit-yb.org/en/latest/teaching.html) someone how to use Yellowbrick.\n\nAs you can see, there are lots of ways to get involved and we would be very happy for you to join us! The only thing we ask is that you abide by the principles of openness, respect, and consideration of others as described in the [Python Software Foundation Code of Conduct](https://www.python.org/psf/codeofconduct/).\n\nFor more information, checkout the `CONTRIBUTING.md` file in the root of the repository or the detailed documentation at [Contributing to Yellowbrick](https://www.scikit-yb.org/en/latest/contributing/index.html)\n\n## Yellowbrick Datasets\n\nYellowbrick gives easy access to several datasets that are used for the examples in the documentation and testing. These datasets are hosted in our CDN and must be downloaded for use. Typically, when a user calls one of the data loader functions, e.g. `load_bikeshare()` the data is automatically downloaded if it's not already on the user's computer. However, for development and testing, or if you know you will be working without internet access, it might be easier to simply download all the data at once.\n\nThe data downloader script can be run as follows:\n\n    $ python -m yellowbrick.download\n\nThis will download the data to the fixtures directory inside of the Yellowbrick site packages. You can specify the location of the download either as an argument to the downloader script (use `--help` for more details) or by setting the `$YELLOWBRICK_DATA` environment variable. This is the preferred mechanism because this will also influence how data is loaded in Yellowbrick.\n\n_Note: Developers who have downloaded data from Yellowbrick versions earlier than v1.0 may experience some problems with the older data format. If this occurs, you can clear out your data cache as follows:_\n\n    $ python -m yellowbrick.download --cleanup\n\n_This will remove old datasets and download the new ones. You can also use the `--no-download` flag to simply clear the cache without re-downloading data. Users who are having difficulty with datasets can also use this or they can uninstall and reinstall Yellowbrick using `pip`._\n\n## Citing Yellowbrick\n\nWe would be glad if you used Yellowbrick in your scientific publications! If you do, please cite us using the [citation guidelines](https://www.scikit-yb.org/en/latest/about.html#citing-yellowbrick).\n\n## Affiliations\n\n[![District Data Labs](docs/images/readme/affiliates_ddl.png)](https://districtdatalabs.com/) [![NumFOCUS Affiliated Project](docs/images/readme/affiliates_numfocus.png)](https://numfocus.org)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A46:3A3DD:178B6F:5DC868:6AB92AE2"},"text_sha256":"90c5c97e5956a79ea82e1cb9e9a0255b1a79be3cd0f532647919e12cb489627f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"IDSIA/sacred","input_row":{"repository":"IDSIA/sacred","url":"https://github.com/IDSIA/sacred","name":"sacred","owner":"IDSIA","description":"Sacred is a tool to help you configure, organize, log and reproduce experiments developed at IDSIA.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4380,"issues":563,"created_at":"2014-03-31T18:05:29Z","updated_at":"2026-09-21T02:27:51Z","first_commit_at":"2014-03-31T18:04:42Z","last_commit_at":"2025-10-22T08:04:57Z","activity_months":138.72,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:44.852Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"IDSIA/sacred","visibility":"public","created_at":"2014-03-31T18:05:29Z","updated_at":"2026-09-21T02:27:51Z","private":false,"fork":false,"archived":false,"stargazers_count":4380,"open_issues_count":107,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2463","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088F:7580A:17FD467:1C20EC1:6AB92AEC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2462","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:181319C:1C36ADE:6AB92AED"},"commit":{"sha":"50b00be28480343acd999332aa7fac464a0f0536","url":"https://github.com/IDSIA/sacred/commit/50b00be28480343acd999332aa7fac464a0f0536","date":"2018-05-24T11:48:39Z","author_date":"2018-05-24T11:48:39Z","committer_date":"2018-05-24T11:48:39Z","tree_sha":"990e94cc60ad602e6399b3207ffbedf42f97e8b3","message_first_line":"Run now handles BaseExceptions as failures to also include SystemExit"},"tree_request_status":200,"tree_rate":{"github_remaining":"2461","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CC:754BF:17CC116:1BEFB2B:6AB92AED"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":10059,"blob_sha":"a94f04c0750607e28e9930966a7a5585b8027944","priority":0}],"documents":[{"path":"README.rst","size":10059,"blob_sha":"a94f04c0750607e28e9930966a7a5585b8027944","priority":0,"status":200,"text":"Sacred\n======\n\n    | *Every experiment is sacred*\n    | *Every experiment is great*\n    | *If an experiment is wasted*\n    | *God gets quite irate*\n\n|pypi| |py_versions| |license| |doi|\n\n|unix_build| |windows_build| |coverage| |code_quality| |codacy|\n\n\n\n\nSacred is a tool to help you configure, organize, log and reproduce experiments.\nIt is designed to do all the tedious overhead work that you need to do around\nyour actual experiment in order to:\n\n- keep track of all the parameters of your experiment\n- easily run your experiment for different settings\n- save configurations for individual runs in a database\n- reproduce your results\n\nSacred achieves this through the following main mechanisms:\n\n-  **ConfigScopes** A very convenient way of the local variables in a function\n   to define the parameters your experiment uses.\n-  **Config Injection**: You can access all parameters of your configuration\n   from every function. They are automatically injected by name.\n-  **Command-line interface**: You get a powerful command-line interface for each\n   experiment that you can use to change parameters and run different variants.\n-  **Observers**: Sacred provides Observers that log all kinds of information\n   about your experiment, its dependencies, the configuration you used,\n   the machine it is run on, and of course the result. These can be saved\n   to a MongoDB, for easy access later.\n-  **Automatic seeding** helps controlling the randomness in your experiments,\n   such that the results remain reproducible.\n\nExample\n-------\n+------------------------------------------------+--------------------------------------------+\n| **Script to train an SVM on the iris dataset** | **The same script as a Sacred experiment** |\n+------------------------------------------------+--------------------------------------------+\n| .. code:: python                               | .. code:: python                           |\n|                                                |                                            |\n|  from numpy.random import permutation          |   from numpy.random import permutation     |\n|  from sklearn import svm, datasets             |   from sklearn import svm, datasets        |\n|                                                |   from sacred import Experiment            |\n|                                                |   ex = Experiment('iris_rbf_svm')          |\n|                                                |                                            |\n|                                                |   @ex.config                               |\n|                                                |   def cfg():                               |\n|  C = 1.0                                       |     C = 1.0                                |\n|  gamma = 0.7                                   |     gamma = 0.7                            |\n|                                                |                                            |\n|                                                |   @ex.automain                             |\n|                                                |   def run(C, gamma):                       |\n|  iris = datasets.load_iris()                   |     iris = datasets.load_iris()            |\n|  perm = permutation(iris.target.size)          |     per = permutation(iris.target.size)    |\n|  iris.data = iris.data[perm]                   |     iris.data = iris.data[per]             |\n|  iris.target = iris.target[perm]               |     iris.target = iris.target[per]         |\n|  clf = svm.SVC(C, 'rbf', gamma=gamma)          |     clf = svm.SVC(C, 'rbf', gamma=gamma)   |\n|  clf.fit(iris.data[:90],                       |     clf.fit(iris.data[:90],                |\n|          iris.target[:90])                     |             iris.target[:90])              |\n|  print(clf.score(iris.data[90:],               |     return clf.score(iris.data[90:],       |\n|                  iris.target[90:]))            |                      iris.target[90:])     |\n+------------------------------------------------+--------------------------------------------+\n\nDocumentation\n-------------\nThe documentation is hosted at `ReadTheDocs <http://sacred.readthedocs.org/>`_.\n\nInstalling\n----------\nYou can directly install it from the Python Package Index with pip:\n\n    pip install sacred\n\nOr if you want to do it manually you can checkout the current version from git\nand install it yourself:\n\n   | git clone https://github.com/IDSIA/sacred.git\n   | cd sacred\n   | python setup.py install\n\nYou might want to also install the ``numpy`` and the ``pymongo`` packages. They are\noptional dependencies but they offer some cool features:\n\n    pip install numpy, pymongo\n\nTests\n-----\nThe tests for sacred use the `py.test <http://pytest.org/latest/>`_ package.\nYou can execute them by running ``py.test`` in the sacred directory like this:\n\n    py.test\n\nThere is also a config file for `tox <https://testrun.org/tox/latest/>`_ so you\ncan automatically run the tests for various python versions like this:\n\n    tox\n\nFrontends\n---------\nAt this point there are two frontends to the database entries created by sacred (that I'm aware of).\nThey are developed externally as separate projects.\n\n`Sacredboard <https://github.com/chovanecm/sacredboard>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/sacredboard.png\n\nSacredboard is a web-based dashboard interface to the sacred runs stored in a\nMongoDB.\n\n\n`SacredBrowser <https://github.com/michaelwand/SacredBrowser>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/sacred_browser.png\n\nSacredBrowser is a PyQt4 application to browse the MongoDB entries created by\nsacred experiments.\nFeatures include custom queries, sorting of the results,\naccess to the stored source-code, and many more.\nNo installation is required and it can connect to a local\ndatabase or over the network.\n\n\n`Prophet <https://github.com/Qwlouse/prophet>`_\n+++++++++++++++++++++++++++++++++++++++++++++++\nProphet is an early prototype of a webinterface to the MongoDB entries created by\nsacred experiments, that is discontinued.\nIt requires you to run `RestHeart <http://restheart.org>`_ to access the database.\n\n\nRelated Projects\n----------------\n\n`Sumatra <https://pythonhosted.org/Sumatra/>`_\n++++++++++++++++++++++++++++++++++++++++++++++\n   | Sumatra is a tool for managing and tracking projects based on numerical\n   | simulation and/or analysis, with the aim of supporting reproducible research.\n   | It can be thought of as an automated electronic lab notebook for\n   | computational projects.\n\nSumatra takes a different approach by providing commandline tools to initialize\na project and then run arbitrary code (not just python).\nIt tracks information about all runs in a SQL database and even provides a nice browser tool.\nIt integrates less tightly with the code to be run, which makes it easily\napplicable to non-python experiments.\nBut that also means it requires more setup for each experiment and\nconfiguration needs to be done using files.\nUse this project if you need to run non-python experiments, or are ok with the additional setup/configuration overhead.\n\n\n`Future Gadget Laboratory <https://github.com/Kaixhin/FGLab>`_\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n   | FGLab is a machine learning dashboard, designed to make prototyping\n   | experiments easier. Experiment details and results are sent to a database,\n   | which allows analytics to be performed after their completion. The server\n   | is FGLab, and the clients are FGMachines.\n\nSimilar to Sumatra, FGLab is an external tool that can keep track of runs from\nany program. Projects are configured via a JSON schema and the program needs to\naccept these configurations via command-line options.\nFGLab also takes the role of a basic scheduler by distributing runs over several\nmachines.\n\n\n`CDE <https://github.com/pgbovine/CDE/>`_\n+++++++++++++++++++++++++++++++++++++++++\nBy tracing system calls during program execution CDE creates a snapshot of\n**all** used files and libraries to guarantee the ability to reproduce any unix\nprogram execution. It *only* solves reproducibility, but it does so thoroughly.\n\n\nLicense\n-------\nThis project is released under the terms of the `MIT license <http://opensource.org/licenses/MIT>`_.\n\n.. |pypi| image:: https://img.shields.io/pypi/v/sacred.svg\n    :target: https://pypi.python.org/pypi/sacred\n    :alt: Current PyPi Version\n\n.. |py_versions| image:: https://img.shields.io/pypi/pyversions/sacred.svg\n    :target: https://pypi.python.org/pypi/sacred\n    :alt: Supported Python Versions\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.png\n    :target: http://choosealicense.com/licenses/mit/\n    :alt: MIT licensed\n\n.. |rtfd| image:: https://readthedocs.org/projects/sacred/badge/?version=latest&style=flat\n    :target: http://sacred.readthedocs.org/\n    :alt: ReadTheDocs\n\n.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.16386.svg\n    :target: http://dx.doi.org/10.5281/zenodo.16386\n    :alt: DOI for this release\n\n.. |unix_build| image:: https://img.shields.io/travis/IDSIA/sacred.svg?branch=master&style=flat&label=unix%20build\n    :target: https://travis-ci.org/IDSIA/sacred\n    :alt: Travis-CI Status\n\n.. |windows_build| image:: https://img.shields.io/appveyor/ci/qwlouse/sacred.svg?style=flat&label=windows%20build\n    :target: https://ci.appveyor.com/project/Qwlouse/sacred\n    :alt: appveyor-CI Status\n\n.. |coverage| image:: https://coveralls.io/repos/IDSIA/sacred/badge.svg\n    :target: https://coveralls.io/r/IDSIA/sacred\n    :alt: Coverage Report\n\n.. |code_quality| image:: https://scrutinizer-ci.com/g/IDSIA/sacred/badges/quality-score.png?b=master\n    :target: https://scrutinizer-ci.com/g/IDSIA/sacred/\n    :alt: Code Scrutinizer Quality\n\n.. |codacy| image:: https://img.shields.io/codacy/acb7bba4467e47deaf260d6df5c0279f.svg?style=flat\n    :target: https://www.codacy.com/app/qwlouse/sacred\n    :alt: Codacity rating\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"959A:1A3D83:186043:5E9E04:6AB92AED"},"text_sha256":"10e6ada22ef01879157d085ac78eaf236e6271e553aaad8c82745e3d2ab4106a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2460","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:1802DE5:1C26BB8:6AB92AEE"},"commit":{"sha":"86865b03d05e83da35ca582392ca31777db88d11","url":"https://github.com/IDSIA/sacred/commit/86865b03d05e83da35ca582392ca31777db88d11","date":"2025-10-22T08:04:57Z","author_date":"2025-10-22T08:04:57Z","committer_date":"2025-10-22T08:04:57Z","tree_sha":"745adbdd89c9c8b809434634741e7d6a511e7d4b","message_first_line":"Allow *.pyx files as source files (#942)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2459","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CE:180242:17F1BAE:1C1538C:6AB92AEE"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":12697,"blob_sha":"7207daec6d189d41ab730d31af93522f57fa9930","priority":0}],"documents":[{"path":"README.rst","size":12697,"blob_sha":"7207daec6d189d41ab730d31af93522f57fa9930","priority":0,"status":200,"text":"Sacred\n======\n\n    | *Every experiment is sacred*\n    | *Every experiment is great*\n    | *If an experiment is wasted*\n    | *God gets quite irate*\n\n|pypi| |py_versions| |license| |rtfd| |doi|\n\n|build| |coverage| |code_quality| |black|\n\n\n\n\nSacred is a tool to help you configure, organize, log and reproduce experiments.\nIt is designed to do all the tedious overhead work that you need to do around\nyour actual experiment in order to:\n\n- keep track of all the parameters of your experiment\n- easily run your experiment for different settings\n- save configurations for individual runs in a database\n- reproduce your results\n\nSacred achieves this through the following main mechanisms:\n\n-  **Config Scopes** A very convenient way of the local variables in a function\n   to define the parameters your experiment uses.\n-  **Config Injection**: You can access all parameters of your configuration\n   from every function. They are automatically injected by name.\n-  **Command-line interface**: You get a powerful command-line interface for each\n   experiment that you can use to change parameters and run different variants.\n-  **Observers**: Sacred provides Observers that log all kinds of information\n   about your experiment, its dependencies, the configuration you used,\n   the machine it is run on, and of course the result. These can be saved\n   to a MongoDB, for easy access later.\n-  **Automatic seeding** helps controlling the randomness in your experiments,\n   such that the results remain reproducible.\n\nExample\n-------\n+------------------------------------------------+--------------------------------------------+\n| **Script to train an SVM on the iris dataset** | **The same script as a Sacred experiment** |\n+------------------------------------------------+--------------------------------------------+\n| .. code:: python                               | .. code:: python                           |\n|                                                |                                            |\n|  from numpy.random import permutation          |   from numpy.random import permutation     |\n|  from sklearn import svm, datasets             |   from sklearn import svm, datasets        |\n|                                                |   from sacred import Experiment            |\n|                                                |   ex = Experiment('iris_rbf_svm')          |\n|                                                |                                            |\n|                                                |   @ex.config                               |\n|                                                |   def cfg():                               |\n|  C = 1.0                                       |     C = 1.0                                |\n|  gamma = 0.7                                   |     gamma = 0.7                            |\n|                                                |                                            |\n|                                                |   @ex.automain                             |\n|                                                |   def run(C, gamma):                       |\n|  iris = datasets.load_iris()                   |     iris = datasets.load_iris()            |\n|  perm = permutation(iris.target.size)          |     per = permutation(iris.target.size)    |\n|  iris.data = iris.data[perm]                   |     iris.data = iris.data[per]             |\n|  iris.target = iris.target[perm]               |     iris.target = iris.target[per]         |\n|  clf = svm.SVC(C=C, kernel='rbf',              |     clf = svm.SVC(C=C, kernel='rbf',       |\n|          gamma=gamma)                          |             gamma=gamma)                   |\n|  clf.fit(iris.data[:90],                       |     clf.fit(iris.data[:90],                |\n|          iris.target[:90])                     |             iris.target[:90])              |\n|  print(clf.score(iris.data[90:],               |     return clf.score(iris.data[90:],       |\n|                  iris.target[90:]))            |                      iris.target[90:])     |\n+------------------------------------------------+--------------------------------------------+\n\nDocumentation\n-------------\nThe documentation is hosted at `ReadTheDocs <http://sacred.readthedocs.org/>`_. You can also `Ask Sacred Guru <https://gurubase.io/g/sacred>`_, it is a Sacred-focused AI to answer your questions.\n\nInstalling\n----------\nYou can directly install it from the Python Package Index with pip:\n\n    pip install sacred\n\nOr if you want to do it manually you can checkout the current version from git\nand install it yourself:\n\n   | git clone https://github.com/IDSIA/sacred.git\n   | cd sacred\n   | python setup.py install\n\nYou might want to also install the ``numpy`` and the ``pymongo`` packages. They are\noptional dependencies but they offer some cool features:\n\n    pip install numpy pymongo\n\nTests\n-----\nThe tests for sacred use the `pytest <http://pytest.org/latest/>`_ package.\nYou can execute them by running ``pytest`` in the sacred directory like this:\n\n    pytest\n\nThere is also a config file for `tox <https://tox.readthedocs.io/en/latest/>`_ so you\ncan automatically run the tests for various python versions like this:\n\n    tox\n\nUpdate pytest version\n+++++++++++++++++++++\n\nIf you update or change the pytest version, the following files need to be changed:\n\n- ``dev-requirements.txt``\n- ``tox.ini``\n- ``test/test_utils.py``\n- ``setup.py``\n\nContributing\n------------\nIf you find a bug, have a feature request or want to discuss something general you are welcome to open an\n`issue <https://github.com/IDSIA/sacred/issues>`_. If you have a specific question related\nto the usage of sacred, please ask a question on StackOverflow under the\n`python-sacred tag <https://stackoverflow.com/questions/tagged/python-sacred>`_. We value documentation\na lot. If you find something that should be included in the documentation please\ndocument it or let us know whats missing. If you are using Sacred in one of your projects and want to share\nyour code with others, put your repo in the `Projects using Sacred <docs/projects_using_sacred.rst`>_ list.\nPull requests are highly welcome!\n\nFrontends\n---------\nAt this point there are three frontends to the database entries created by sacred (that I'm aware of).\nThey are developed externally as separate projects.\n\n`Omniboard <https://github.com/vivekratnavel/omniboard>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/omniboard-table.png\n.. image:: docs/images/omniboard-metric-graphs.png\n\nOmniboard is a web dashboard that helps in visualizing the experiments and metrics / logs collected by sacred.\nOmniboard is written with React, Node.js, Express and Bootstrap.\n\n\n`Incense <https://github.com/JarnoRFB/incense>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/incense-artifact.png\n.. image:: docs/images/incense-metric.png\n\nIncense is a Python library to retrieve runs stored in a MongoDB and interactively display metrics and artifacts\nin Jupyter notebooks.\n\n`Sacredboard <https://github.com/chovanecm/sacredboard>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/sacredboard.png\n\nSacredboard is a web-based dashboard interface to the sacred runs stored in a\nMongoDB.\n\n`Neptune <https://neptune.ai/>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/neptune-compare.png\n.. image:: docs/images/neptune-collaboration.png\n\nNeptune is a metadata store for MLOps, built for teams that run a lot of experiments.\nIt gives you a single place to log, store, display, organize, compare, and query all your model-building metadata via API available for both Python and R programming languages:\n\n.. image:: docs/images/neptune-query-api.png\n\nIn order to log your sacred experiments to Neptune, all you need to do is add an observer:\n\n.. code-block:: python\n\n    from neptune.new.integrations.sacred import NeptuneObserver\n    ex.observers.append(NeptuneObserver(api_token='<YOUR_API_TOKEN>',\n                                        project='<YOUR_WORKSPACE/YOUR_PROJECT>'))\n\nFor more info, check the `Neptune + Sacred integration guide <https://docs.neptune.ai/integrations-and-supported-tools/experiment-tracking/sacred>`_.\n\n`SacredBrowser <https://github.com/michaelwand/SacredBrowser>`_\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n.. image:: docs/images/sacred_browser.png\n\nSacredBrowser is a PyQt4 application to browse the MongoDB entries created by\nsacred experiments.\nFeatures include custom queries, sorting of the results,\naccess to the stored source-code, and many more.\nNo installation is required and it can connect to a local\ndatabase or over the network.\n\n\n`Prophet <https://github.com/Qwlouse/prophet>`_\n+++++++++++++++++++++++++++++++++++++++++++++++\nProphet is an early prototype of a webinterface to the MongoDB entries created by\nsacred experiments, that is discontinued.\nIt requires you to run `RestHeart <http://restheart.org>`_ to access the database.\n\n\nRelated Projects\n----------------\n\n`Sumatra <https://pythonhosted.org/Sumatra/>`_\n++++++++++++++++++++++++++++++++++++++++++++++\n   | Sumatra is a tool for managing and tracking projects based on numerical\n   | simulation and/or analysis, with the aim of supporting reproducible research.\n   | It can be thought of as an automated electronic lab notebook for\n   | computational projects.\n\nSumatra takes a different approach by providing commandline tools to initialize\na project and then run arbitrary code (not just python).\nIt tracks information about all runs in a SQL database and even provides a nice browser tool.\nIt integrates less tightly with the code to be run, which makes it easily\napplicable to non-python experiments.\nBut that also means it requires more setup for each experiment and\nconfiguration needs to be done using files.\nUse this project if you need to run non-python experiments, or are ok with the additional setup/configuration overhead.\n\n\n`Future Gadget Laboratory <https://github.com/Kaixhin/FGLab>`_\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n   | FGLab is a machine learning dashboard, designed to make prototyping\n   | experiments easier. Experiment details and results are sent to a database,\n   | which allows analytics to be performed after their completion. The server\n   | is FGLab, and the clients are FGMachines.\n\nSimilar to Sumatra, FGLab is an external tool that can keep track of runs from\nany program. Projects are configured via a JSON schema and the program needs to\naccept these configurations via command-line options.\nFGLab also takes the role of a basic scheduler by distributing runs over several\nmachines.\n\n\nLicense\n-------\nThis project is released under the terms of the `MIT license <http://opensource.org/licenses/MIT>`_.\n\n\nCiting Sacred\n-------------\n`K. Greff, A. Klein, M. Chovanec, F. Hutter, and J. Schmidhuber, ‘The Sacred Infrastructure for Computational Research’,\nin Proceedings of the 15th Python in Science Conference (SciPy 2017), Austin, Texas, 2017, pp. 49–56\n<http://conference.scipy.org/proceedings/scipy2017/klaus_greff.html>`_.\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/sacred.svg\n    :target: https://pypi.python.org/pypi/sacred\n    :alt: Current PyPi Version\n\n.. |py_versions| image:: https://img.shields.io/pypi/pyversions/sacred.svg\n    :target: https://pypi.python.org/pypi/sacred\n    :alt: Supported Python Versions\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.png\n    :target: http://choosealicense.com/licenses/mit/\n    :alt: MIT licensed\n\n.. |rtfd| image:: https://readthedocs.org/projects/sacred/badge/?version=latest&style=flat\n    :target: https://sacred.readthedocs.io/en/stable/\n    :alt: ReadTheDocs\n\n.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.16386.svg\n    :target: http://dx.doi.org/10.5281/zenodo.16386\n    :alt: DOI for this release\n\n.. |build| image:: https://github.com/IDSIA/sacred/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/IDSIA/sacred/actions/workflows/test.yml/badge.svg\n    :alt: Github Actions PyTest\n\n.. |coverage| image:: https://coveralls.io/repos/IDSIA/sacred/badge.svg\n    :target: https://coveralls.io/r/IDSIA/sacred\n    :alt: Coverage Report\n\n.. |code_quality| image:: https://scrutinizer-ci.com/g/IDSIA/sacred/badges/quality-score.png?b=master\n    :target: https://scrutinizer-ci.com/g/IDSIA/sacred/\n    :alt: Code Scrutinizer Quality\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n    :alt: Code style: black\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D020:2E8679:17C147:5DFC2E:6AB92AEE"},"text_sha256":"b9f6d019415292a6b4576e78fadd5699ddd61d1cbd395ba10bb2c84094bd47d8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kubeflow/pipelines","input_row":{"repository":"kubeflow/pipelines","url":"https://github.com/kubeflow/pipelines","name":"pipelines","owner":"kubeflow","description":"Machine Learning Pipelines for Kubeflow","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4228,"issues":4548,"created_at":"2018-05-12T00:31:47Z","updated_at":"2026-09-27T03:46:07Z","first_commit_at":"2018-05-12T00:31:48Z","last_commit_at":"2026-09-27T03:46:02Z","activity_months":100.53,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:47.888Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kubeflow/pipelines","visibility":"public","created_at":"2018-05-12T00:31:47Z","updated_at":"2026-09-27T03:46:07Z","private":false,"fork":false,"archived":false,"stargazers_count":4228,"open_issues_count":369,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2458","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:17F13FD:1C14FEB:6AB92AEF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2457","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091E:52542:17BFE3E:1BE391B:6AB92AF0"},"commit":{"sha":"c73dd5e265c36da8ee6e825fd425b65a943f5582","url":"https://github.com/kubeflow/pipelines/commit/c73dd5e265c36da8ee6e825fd425b65a943f5582","date":"2018-05-24T03:14:47Z","author_date":"2018-05-24T03:14:47Z","committer_date":"2018-05-24T03:14:47Z","tree_sha":"e586010bbf91c6f2184a2567c53a60b60f2a49c3","message_first_line":"Merge pull request #4 from kubeflow/vicaire/boilerplate"},"tree_request_status":200,"tree_rate":{"github_remaining":"2456","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17D21E5:1BF5881:6AB92AF0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":82,"blob_sha":"6f37fe37a8b414620dece75e3eeba175dc03d999","priority":0}],"documents":[{"path":"README.md","size":82,"blob_sha":"6f37fe37a8b414620dece75e3eeba175dc03d999","priority":0,"status":200,"text":"# pipelines\nCustom Resource Definitions and tools for ML pipeline orchestration. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F486:241B62:179919:5DD6E5:6AB92AF0"},"text_sha256":"9623184b4cca5d217eeece7567e8be60292fae87f42d22e2d02fc49a067e61f9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2455","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:1798F6D:1BBB540:6AB92AF1"},"commit":{"sha":"94afa7f1a2ef90d4b3ab9c17d06eb8ca16ba98da","url":"https://github.com/kubeflow/pipelines/commit/94afa7f1a2ef90d4b3ab9c17d06eb8ca16ba98da","date":"2026-06-30T20:26:15Z","author_date":"2026-06-30T20:26:15Z","committer_date":"2026-06-30T20:26:15Z","tree_sha":"281eb354082cf449a0257b19fc5fe304726769ab","message_first_line":"feat(backend): add MLflow basic-auth and optional auth (#13576)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2454","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:179418E:1BB794B:6AB92AF1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6538,"blob_sha":"2f1096ab22dec2c9a0455826b367e459ac1d6e6f","priority":0},{"path":".github/resources/manifests/base/cache-deployer-pull-policy.yaml","size":188,"blob_sha":"a284ea38a57de4e91f03eddcd0e1135f549990de","priority":1},{"path":".github/resources/manifests/base/cache-server-pull-policy.yaml","size":177,"blob_sha":"5fd1da180879ca6ac8db0916b71cf191a9e9e957","priority":1},{"path":".github/resources/manifests/base/metadata-envoy-pull-policy.yaml","size":193,"blob_sha":"42db6060251e4a11908b1f93c85612ff2febbb01","priority":1},{"path":".github/resources/manifests/base/metadata-writer-pull-policy.yaml","size":178,"blob_sha":"c6fd91e9158a2c30e50134fd82a5fdbcaa02807d","priority":1},{"path":".github/resources/manifests/base/viewer-crd-pull-policy.yaml","size":203,"blob_sha":"c344cc0d242756088e4b90c9db787ef8f5c05e4c","priority":1},{"path":"backend/api/v2beta1/python_http_client/docs/V2beta1DeletePropagationPolicy.md","size":308,"blob_sha":"9fdb4b09fd0ee7a4d26acf28043a50962624cda5","priority":1},{"path":"manifests/kustomize/base/metadata/options/istio/istio-authorization-policy.yaml","size":209,"blob_sha":"8f41789e8ee78a721468713fdee9734c7edb89e5","priority":1},{"path":"manifests/kustomize/third-party/mysql/options/istio/istio-authorization-policy.yaml","size":864,"blob_sha":"a8dcb205c92c68792a19dd6fd622fedf23bd76d7","priority":1},{"path":"manifests/kustomize/third-party/seaweedfs/base/seaweedfs/seaweedfs-networkpolicy.yaml","size":658,"blob_sha":"929954883a7c9ff22981ed60810da2c4634cde64","priority":1},{"path":"manifests/kustomize/third-party/seaweedfs/istio/istio-authorization-policy.yaml","size":912,"blob_sha":"4c6ac2c163022fe3581635d42a50733982642d31","priority":1},{"path":"SECURITY.md","size":2675,"blob_sha":"166b2bdb2fa904530bcf7714c7f5d299801db7ca","priority":1}],"documents":[{"path":"README.md","size":6538,"blob_sha":"2f1096ab22dec2c9a0455826b367e459ac1d6e6f","priority":0,"status":200,"text":"# Kubeflow Pipelines\n\n[![SDK Documentation Status](https://readthedocs.org/projects/kubeflow-pipelines/badge/?version=latest)](https://kubeflow-pipelines.readthedocs.io/en/stable/?badge=latest)\n[![SDK Package version](https://img.shields.io/pypi/v/kfp?color=%2334D058&label=pypi%20package)](https://pypi.org/project/kfp)\n[![SDK Supported Python versions](https://img.shields.io/pypi/pyversions/kfp.svg?color=%2334D058)](https://pypi.org/project/kfp)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9938/badge)](https://www.bestpractices.dev/projects/9938)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/kubeflow/pipelines)\n\n## Overview of the Kubeflow pipelines service\n\n[Kubeflow](https://www.kubeflow.org/) is a machine learning (ML) toolkit that is dedicated to making deployments of ML workflows on Kubernetes simple, portable, and scalable.\n\n**Kubeflow pipelines** are reusable end-to-end ML workflows built using the Kubeflow Pipelines SDK.\n\nThe Kubeflow pipelines service has the following goals:\n\n* End to end orchestration: enabling and simplifying the orchestration of end to end machine learning pipelines\n* Easy experimentation: making it easy for you to try numerous ideas and techniques, and manage your various trials/experiments.\n* Easy re-use: enabling you to re-use components and pipelines to quickly cobble together end to end solutions, without having to re-build each time.\n\n## Installation\n\n* Kubeflow Pipelines can be installed as part of the [Kubeflow Platform](https://www.kubeflow.org/docs/started/installing-kubeflow/#kubeflow-platform). Alternatively you can deploy [Kubeflow Pipelines](https://www.kubeflow.org/docs/components/pipelines/operator-guides/installation/) as a standalone service.\n\n* The Docker container runtime has been deprecated on Kubernetes 1.20+. Kubeflow Pipelines has switched to use [Emissary Executor](https://www.kubeflow.org/docs/components/pipelines/legacy-v1/installation/choose-executor/#emissary-executor) by default from Kubeflow Pipelines 1.8. Emissary executor is Container runtime agnostic, meaning you are able to run Kubeflow Pipelines on Kubernetes cluster with any [Container runtimes](https://kubernetes.io/docs/setup/production-environment/container-runtimes/).\n\n### Dependencies Compatibility Matrix\n\n| Dependency     | Versions         |\n| -------------- |------------------|\n| Argo Workflows | v3.7, v4.0 |\n| MySQL          | v8               |\n\n## Documentation\n\nGet started with your first pipeline and read further information in the [Kubeflow Pipelines overview](https://www.kubeflow.org/docs/components/pipelines/overview/).\n\nSee the various ways you can [use the Kubeflow Pipelines SDK](https://kubeflow-pipelines.readthedocs.io/en/stable/).\n\nSee the Kubeflow [Pipelines API doc](https://www.kubeflow.org/docs/components/pipelines/reference/api/kubeflow-pipeline-api-spec/) for API specification.\n\nConsult the [Python SDK reference docs](https://kubeflow-pipelines.readthedocs.io/en/stable/) when writing pipelines using the Python SDK.\n\n## Deep Wiki\nCheck out our AI Powered repo documentation on [DeepWiki](https://deepwiki.com/kubeflow/pipelines). \n\n> :warning: Please note, this is AI generated and may not have completely accurate information.\n\n## Contributing to Kubeflow Pipelines\n\nBefore you start contributing to Kubeflow Pipelines, read the guidelines in [How to Contribute](./CONTRIBUTING.md). To learn how to build and deploy Kubeflow Pipelines from source code, read the [developer guide](./developer_guide.md).\n\n### Optional `just` command runner\n\nFor local developer convenience, this repository includes an optional [just](https://github.com/casey/just) command runner at the repo root. It provides short aliases for existing `make` targets and does not replace any CI or release workflows.\n\nTo use it, install `just` and run, for example:\n\n```bash\njust           # list available recipes\njust backend-test\njust backend-images\n```\n\nNotes:\n\n* All `just` recipes are thin wrappers around existing `make` targets (for example, `make -C backend/src/v2 test`).\n* There is intentionally no generic `just build` or `just test` recipe; heavy or Docker-building flows are exposed only via explicitly named recipes such as `backend-images`.\n\n## Kubeflow Pipelines Community\n\n### Community Meeting\n\nThe Kubeflow Pipelines Community Meeting occurs every other Wed 10-11AM (PST).\n\n[Calendar Invite](https://calendar.google.com/event?action=TEMPLATE&tmeid=NTdoNG5uMDBtcnJlYmdlOWt1c2lkY25jdmlfMjAxOTExMTNUMTgwMDAwWiBqZXNzaWV6aHVAZ29vZ2xlLmNvbQ&tmsrc=jessiezhu%40google.com&scp=ALL)\n\n[Direct Meeting Link](https://zoom.us/j/92607298595?pwd%3DVlKLUbiguGkbT9oKbaoDmCxrhbRop7.1&sa=D&source=calendar&ust=1736264977415448&usg=AOvVaw1EIkjFsKy0d4yQPptIJS3x)\n\n[Meeting notes](http://bit.ly/kfp-meeting-notes)\n\n### Slack\n\nWe also have a slack channel (#kubeflow-pipelines) on the Cloud Native Computing Foundation Slack workspace. You can find more details at [https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels)\n\n## Architecture\n\nDetails about the KFP Architecture can be found at [Architecture.md](docs/sdk/Architecture.md)\n\n## Blog posts\n\n* [From Raw Data to Model Serving: A Blueprint for the AI/ML Lifecycle with Kubeflow](https://blog.kubeflow.org/fraud-detection-e2e/) (By [Helber Belmiro](https://github.com/hbelmiro))\n* [Getting started with Kubeflow Pipelines](https://cloud.google.com/blog/products/ai-machine-learning/getting-started-kubeflow-pipelines) (By Amy Unruh)\n* How to create and deploy a Kubeflow Machine Learning Pipeline (By Lak Lakshmanan)\n  * [Part 1: How to create and deploy a Kubeflow Machine Learning Pipeline](https://medium.com/data-science/how-to-create-and-deploy-a-kubeflow-machine-learning-pipeline-part-1-efea7a4b650f)\n  * [Part 2: How to deploy Jupyter notebooks as components of a Kubeflow ML pipeline](https://medium.com/data-science/how-to-deploy-jupyter-notebooks-as-components-of-a-kubeflow-ml-pipeline-part-2-b1df77f4e5b3)\n  * [Part 3: How to carry out CI/CD in Machine Learning (“MLOps”) using Kubeflow ML pipelines](https://medium.com/google-cloud/how-to-carry-out-ci-cd-in-machine-learning-mlops-using-kubeflow-ml-pipelines-part-3-bdaf68082112)\n\n## Acknowledgments\n\nKubeflow pipelines uses [Argo Workflows](https://github.com/argoproj/argo-workflows) by default under the hood to orchestrate Kubernetes resources. The Argo community has been very supportive and we are very grateful.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6BC0:4F9CC:170B44:5D4644:6AB92AF2"},"text_sha256":"ff9a907e943c975addcf050aa936d018cfba270e668b45e5fc41347b6908b3bb"},{"path":".github/resources/manifests/base/cache-deployer-pull-policy.yaml","size":188,"blob_sha":"a284ea38a57de4e91f03eddcd0e1135f549990de","priority":1,"status":200,"text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: cache-deployer-deployment\nspec:\n  template:\n    spec:\n      containers:\n        - name: main\n          imagePullPolicy: IfNotPresent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4054:29FD16:183667:5E73D3:6AB92AE4"},"text_sha256":"0c4d6ddcb4594eb47a8c5d8ac21621105fff93e55104648cdd6a58149237576a"},{"path":".github/resources/manifests/base/cache-server-pull-policy.yaml","size":177,"blob_sha":"5fd1da180879ca6ac8db0916b71cf191a9e9e957","priority":1,"status":200,"text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: cache-server\nspec:\n  template:\n    spec:\n      containers:\n        - name: server\n          imagePullPolicy: IfNotPresent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17D17E:5E0F69:6AB92AF2"},"text_sha256":"ca40e6ecd03d9073205c363c0b0c1360dc40772284828b5f1b02b8946d50b86c"},{"path":".github/resources/manifests/base/metadata-envoy-pull-policy.yaml","size":193,"blob_sha":"42db6060251e4a11908b1f93c85612ff2febbb01","priority":1,"status":200,"text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: metadata-envoy-deployment\nspec:\n  template:\n    spec:\n      containers:\n        - name: container\n          imagePullPolicy: IfNotPresent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96DA:18233:17A0A6:5DDD2E:6AB92AF2"},"text_sha256":"296ff96deacae4d35d627e026e1eb8ef41b171e531efd3a018e308f07552ecbd"},{"path":".github/resources/manifests/base/metadata-writer-pull-policy.yaml","size":178,"blob_sha":"c6fd91e9158a2c30e50134fd82a5fdbcaa02807d","priority":1,"status":200,"text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: metadata-writer\nspec:\n  template:\n    spec:\n      containers:\n        - name: main\n          imagePullPolicy: IfNotPresent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6884:3CC8A:17D188:5E0F7F:6AB92AF1"},"text_sha256":"ab2e50eb079a2f5917cebcd18a2c5dd0b281ba499d831d32e7c90551b02b1aeb"},{"path":".github/resources/manifests/base/viewer-crd-pull-policy.yaml","size":203,"blob_sha":"c344cc0d242756088e4b90c9db787ef8f5c05e4c","priority":1,"status":200,"text":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: ml-pipeline-viewer-crd\nspec:\n  template:\n    spec:\n      containers:\n        - name: ml-pipeline-viewer-crd\n          imagePullPolicy: IfNotPresent\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D906:376DE:180B04:5E49DE:6AB92AF3"},"text_sha256":"e4ebe4f1dec9e3c4ceddbab92c77b90f4b42310769c53a2a9f9593db6b210522"},{"path":"backend/api/v2beta1/python_http_client/docs/V2beta1DeletePropagationPolicy.md","size":308,"blob_sha":"9fdb4b09fd0ee7a4d26acf28043a50962624cda5","priority":1,"status":200,"text":"# V2beta1DeletePropagationPolicy\n\n## Properties\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n\n[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C2A:2B291E:183976:5E779B:6AB92AF3"},"text_sha256":"1fb8815029e03ac78bd1f9c126ad2b18773341a8ad41b764b0230437c0cf20f2"},{"path":"manifests/kustomize/base/metadata/options/istio/istio-authorization-policy.yaml","size":209,"blob_sha":"8f41789e8ee78a721468713fdee9734c7edb89e5","priority":1,"status":200,"text":"apiVersion: security.istio.io/v1beta1\nkind: AuthorizationPolicy\nmetadata:\n  name: metadata-grpc-service\nspec:\n  action: ALLOW\n  selector:\n    matchLabels:\n      component: metadata-grpc-server\n  rules:\n  - {}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3816:3B6DE:1761FC:5D9EF4:6AB92AF3"},"text_sha256":"f8c39a58ecb84428f34e10cccb48dbf8209daee41740e99eeaf31bf1e340e868"},{"path":"manifests/kustomize/third-party/mysql/options/istio/istio-authorization-policy.yaml","size":864,"blob_sha":"a8dcb205c92c68792a19dd6fd622fedf23bd76d7","priority":1,"status":200,"text":"apiVersion: security.istio.io/v1beta1\nkind: AuthorizationPolicy\nmetadata:\n  name: mysql\n  namespace: kubeflow\nspec:\n  selector:\n    matchLabels:\n      app: mysql\n  rules:\n  - from:\n    - source:\n        principals:\n        - cluster.local/ns/kubeflow/sa/ml-pipeline\n        - cluster.local/ns/kubeflow/sa/ml-pipeline-ui\n        - cluster.local/ns/kubeflow/sa/ml-pipeline-persistenceagent\n        - cluster.local/ns/kubeflow/sa/ml-pipeline-scheduledworkflow\n        - cluster.local/ns/kubeflow/sa/ml-pipeline-viewer-crd-service-account\n        - cluster.local/ns/kubeflow/sa/kubeflow-pipelines-cache\n        - cluster.local/ns/kubeflow/sa/metadata-grpc-server\n\n---\n\napiVersion: \"networking.istio.io/v1alpha3\"\nkind: DestinationRule\nmetadata:\n  name: ml-pipeline-mysql\nspec:\n  host: mysql.kubeflow.svc.cluster.local\n  trafficPolicy:\n    tls:\n      mode: ISTIO_MUTUAL\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0FA:3FA0D:177F87:5DBCD5:6AB92AF3"},"text_sha256":"bd96a9e9fe2402d214b1ad021f558089903147305167c8ac7aa3a95a89559f21"},{"path":"manifests/kustomize/third-party/seaweedfs/base/seaweedfs/seaweedfs-networkpolicy.yaml","size":658,"blob_sha":"929954883a7c9ff22981ed60810da2c4634cde64","priority":1,"status":200,"text":"apiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: seaweedfs\nspec:\n  ingress:\n  - from:\n    - namespaceSelector:\n        matchExpressions:\n        - key: app.kubernetes.io/part-of\n          operator: In\n          values:\n          - kubeflow-profile\n    ports:\n    - port: 8333\n  - from:\n    - namespaceSelector:\n        matchExpressions:\n        - key: kubernetes.io/metadata.name\n          operator: In\n          values:\n          - istio-system\n  - from:\n    - podSelector: {}\n    ports:\n    - port: 8333\n  podSelector:\n    matchExpressions:\n    - key: app\n      operator: In\n      values:\n      - seaweedfs\n  policyTypes:\n  - Ingress\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C464:285814:172ECF:5D6C28:6AB92AF3"},"text_sha256":"61e3d77df26de18162042d36f8314f398c0adacd65e80210f9eca768f55f7513"},{"path":"manifests/kustomize/third-party/seaweedfs/istio/istio-authorization-policy.yaml","size":912,"blob_sha":"4c6ac2c163022fe3581635d42a50733982642d31","priority":1,"status":200,"text":"apiVersion: security.istio.io/v1beta1\nkind: AuthorizationPolicy\nmetadata:\n  name: seaweedfs-service\nspec:\n  action: ALLOW\n  selector:\n    matchLabels:\n      app: seaweedfs\n  rules:\n  - from:\n    - source:\n        principals:\n        - cluster.local/ns/kubeflow/sa/ml-pipeline\n  - from:\n    - source:\n        principals:\n        - cluster.local/ns/kubeflow/sa/ml-pipeline-ui\n  # Allow traffic to s3 endpoint from User Pipeline Pods, which don't have a sidecar.\n  # Also needed for traffic from seaweedfs init pod. Seaweedfs gives the client an ip to connect to. This can not be\n  # handled well by istio (AuthPolicy). Instead, access to the sensitive ports will be limited by the NetworkPolicy.\n  - {}\n---\napiVersion: \"networking.istio.io/v1alpha3\"\nkind: DestinationRule\nmetadata:\n  name: ml-pipeline-seaweedfs\nspec:\n  host: seaweedfs.kubeflow.svc.cluster.local\n  trafficPolicy:\n    tls:\n      mode: ISTIO_MUTUAL\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EF4:3E1DA:1792E3:5DD0C6:6AB92AF4"},"text_sha256":"851a0beedf8f61e216f04aabc767417f62c7d22d1530556f75683bd502b0c0b9"},{"path":"SECURITY.md","size":2675,"blob_sha":"166b2bdb2fa904530bcf7714c7f5d299801db7ca","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nKubeflow Pipelines versions are expressed as `X.Y.Z`, where X is the major version,\nY is the minor version, and Z is the patch version, following the\n[Semantic Versioning](https://semver.org/) terminology.\n\nThe Kubeflow Pipelines project maintains release branches for the most recent two minor releases.\nApplicable fixes, including security fixes, may be backported to those two release branches,\ndepending on severity and feasibility.\n\nUsers are encouraged to stay updated with the latest releases to benefit from security patches and\nimprovements.\n\n## Reporting a Vulnerability\n\nWe're extremely grateful for security researchers and users that report vulnerabilities to the\nKubeflow Open Source Community. All reports are thoroughly investigated by Kubeflow projects owners.\n\nYou can use the following ways to report security vulnerabilities privately:\n\n- Using the Kubeflow Pipelines repository [GitHub Security Advisory](https://github.com/kubeflow/pipelines/security/advisories/new).\n- Using our private Kubeflow Steering Committee mailing list: ksc@kubeflow.org.\n\nPlease provide detailed information to help us understand and address the issue promptly.\n\n## Disclosure Process\n\n**Acknowledgment**: We will acknowledge receipt of your report within 10 business days.\n\n**Assessment**: The Kubeflow projects owners will investigate the reported issue to determine its\nvalidity and severity.\n\n**Resolution**: If the issue is confirmed, we will work on a fix and prepare a release.\n\n**Notification**: Once a fix is available, we will notify the reporter and coordinate a public\ndisclosure.\n\n**Public Disclosure**: Details of the vulnerability and the fix will be published in the project's\nrelease notes and communicated through appropriate channels.\n\n## Prevention Mechanisms\n\nKubeflow Pipelines employs several measures to prevent security issues:\n\n**Code Reviews**: All code changes are reviewed by maintainers to ensure code quality and security.\n\n**Dependency Management**: Regular updates and monitoring of dependencies (e.g. Dependabot) to\naddress known vulnerabilities.\n\n**Continuous Integration**: Automated testing and security checks are integrated into the CI/CD pipeline.\n\n**Image Scanning**: Container images are scanned for vulnerabilities.\n\n## Communication Channels\n\nFor the general questions please join the following resources:\n\n- Kubeflow [Slack channels](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels).\n\n- Kubeflow discuss [mailing list](https://www.kubeflow.org/docs/about/community/#kubeflow-mailing-list).\n\nPlease **do not report** security vulnerabilities through public channels.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4490:1F1FB6:17CED7:5E0BFF:6AB92AF4"},"text_sha256":"26284009e9f307a1fa0896826322925820ca342907ff7087c3fd910e4786df0e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"snipsco/snips-nlu","input_row":{"repository":"snipsco/snips-nlu","url":"https://github.com/snipsco/snips-nlu","name":"snips-nlu","owner":"snipsco","description":"Snips Python library to extract meaning from text","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3972,"issues":263,"created_at":"2017-02-08T16:16:36Z","updated_at":"2026-09-24T17:42:09Z","first_commit_at":"2017-02-08T16:52:05Z","last_commit_at":"2021-05-03T12:18:31Z","activity_months":50.75,"ai_ml_match_topics":"machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:53.467Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"snipsco/snips-nlu","visibility":"public","created_at":"2017-02-08T16:16:36Z","updated_at":"2026-09-24T17:42:09Z","private":false,"fork":false,"archived":false,"stargazers_count":3972,"open_issues_count":67,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2453","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A8:70FF5:17D2496:1BF5BAF:6AB92AF5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2452","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:1791034:1BB3596:6AB92AF5"},"commit":{"sha":"114814dfc93b8c86157359313aed0bde402ab65b","url":"https://github.com/snipsco/snips-nlu/commit/114814dfc93b8c86157359313aed0bde402ab65b","date":"2018-05-24T07:06:50Z","author_date":"2018-05-24T07:06:50Z","committer_date":"2018-05-24T07:06:50Z","tree_sha":"a35a5daa4e58fbf168d301e60d827c8090d5cc67","message_first_line":"Merge pull request #596 from snipsco/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2451","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F4:6E429:17E210B:1C05A07:6AB92AF6"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4250,"blob_sha":"9bc68624189478d2feac260e540d5395faed1cbb","priority":0}],"documents":[{"path":"README.rst","size":4250,"blob_sha":"9bc68624189478d2feac260e540d5395faed1cbb","priority":0,"status":200,"text":"Snips NLU\n=========\n\n.. image:: https://travis-ci.org/snipsco/snips-nlu.svg?branch=develop\n    :target: https://travis-ci.org/snipsco/snips-nlu\n\n.. image:: https://img.shields.io/pypi/v/snips-nlu.svg?branch=develop\n    :target: https://pypi.python.org/pypi/snips-nlu\n\n.. image:: https://img.shields.io/pypi/pyversions/snips-nlu.svg?branch=develop\n    :target: https://pypi.python.org/pypi/snips-nlu\n\n.. image:: https://codecov.io/gh/snipsco/snips-nlu/branch/develop/graph/badge.svg\n   :target: https://codecov.io/gh/snipsco/snips-nlu\n\n\n`Snips NLU <https://snips-nlu.readthedocs.io>`_ (Natural Language Understanding) is a Python library that allows to parse sentences written in natural language and extracts structured information.\n\nCheck out our `blog post`_ to get more details about why we built Snips NLU and how it works under the hood.\n\nInstallation\n------------\n\n.. code-block:: python\n\n    pip install snips-nlu\n\nWe currently have pre-built binaries (wheels) for ``snips-nlu`` and its\ndependencies for MacOS and Linux x86_64. If you use a different\narchitecture/os you will need to build these dependencies from sources\nwhich means you will need to install\n`setuptools_rust <https://github.com/PyO3/setuptools-rust>`_ and\n`Rust <https://www.rust-lang.org/en-US/install.html>`_ before running the\n``pip install snips-nlu`` command.\n\nA simple example\n----------------\n\nLet’s take an example to illustrate the main purpose of this lib, and consider the following sentence:\n\n.. code-block:: text\n\n    \"What will be the weather in paris at 9pm?\"\n\nProperly trained, the Snips NLU engine will be able to extract structured data such as:\n\n.. code-block:: json\n\n    {\n       \"intent\": {\n          \"intentName\": \"searchWeatherForecast\",\n          \"probability\": 0.95\n       },\n       \"slots\": [\n          {\n             \"value\": \"paris\",\n             \"entity\": \"locality\",\n             \"slotName\": \"forecast_locality\"\n          },\n          {\n             \"value\": {\n                \"kind\": \"InstantTime\",\n                \"value\": \"2018-02-08 20:00:00 +00:00\"\n             },\n             \"entity\": \"snips/datetime\",\n             \"slotName\": \"forecast_start_datetime\"\n          }\n       ]\n    }\n\n\nSample code\n-----------\n\nHere is a sample code that you can run on your machine after having\ninstalled `snips-nlu` and downloaded this `sample dataset`_:\n\n.. code-block:: python\n\n    from __future__ import unicode_literals, print_function\n\n    import io\n    import json\n\n    from snips_nlu import SnipsNLUEngine, load_resources\n    from snips_nlu.default_configs import CONFIG_EN\n\n    with io.open(\"sample_dataset.json\") as f:\n        sample_dataset = json.load(f)\n\n    load_resources(\"en\")\n    nlu_engine = SnipsNLUEngine(config=CONFIG_EN)\n    nlu_engine.fit(sample_dataset)\n\n    text = \"What will be the weather in San Francisco next week?\"\n    parsing = nlu_engine.parse(text)\n    print(json.dumps(parsing, indent=2))\n\nWhat it does is training an NLU engine on a sample weather dataset and parsing\na weather query.\n\nDocumentation\n-------------\n\nTo find out how to use Snips NLU please refer to our `documentation <https://snips-nlu.readthedocs.io>`_, it will provide you with a step-by-step guide on how to use and setup our library.\n\nFAQ\n---\nPlease join our `Discord channel`_ to ask your questions and get feedback from the community.\n\nLinks\n-----\n* `What is Snips about ? <https://snips.ai/>`_\n* Snips NLU Open sourcing `blog post`_\n* `Bug tracker <https://github.com/snipsco/snips-nlu/issues>`_\n* `Snips NLU Rust <https://github.com/snipsco/snips-nlu-rs>`_: Rust inference pipeline implementation and bindings (C, Swift, Kotlin, Python)\n* `Rustling <https://github.com/snipsco/rustling-ontology>`_: Snips NLU builtin entities parser\n\n\nHow do I contribute ?\n---------------------\n\nPlease see the `Contribution Guidelines <CONTRIBUTING.rst>`_.\n\nLicence\n-------\n\nThis library is provided by `Snips <https://www.snips.ai>`_ as Open Source software. See `LICENSE <LICENSE>`_ for more information.\n\n.. _sample dataset: samples/sample_dataset.json\n.. _Discord channel: https://discordapp.com/invite/3939Kqx\n.. _blog post: https://medium.com/snips-ai/an-introduction-to-snips-nlu-the-open-source-library-behind-snips-embedded-voice-platform-b12b1a60a41a","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"472E:11316A:17CE8C:5E0B8C:6AB92AF5"},"text_sha256":"bcce5219c37353d147c63da9438fe297bc06231324d5ea2186bf72e6851e3025"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2450","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0904:754BF:17CC6DA:1BF0217:6AB92AF6"},"commit":{"sha":"74b2893c91fc0bafc919a7e088ecb0b2bd611acf","url":"https://github.com/snipsco/snips-nlu/commit/74b2893c91fc0bafc919a7e088ecb0b2bd611acf","date":"2021-05-03T12:18:31Z","author_date":"2021-05-03T12:18:31Z","committer_date":"2021-05-03T12:18:31Z","tree_sha":"22420bf6d0da28b0cb232589034751d7d87b536e","message_first_line":"Fix simple typo in docs, accross -> across (#893)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2449","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17D9923:1BFD7EB:6AB92AF7"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":10590,"blob_sha":"1244480e7c83376f5f5ab4c2a1395f7787969493","priority":0}],"documents":[{"path":"README.rst","size":10590,"blob_sha":"1244480e7c83376f5f5ab4c2a1395f7787969493","priority":0,"status":200,"text":"Snips NLU\n=========\n\n.. image:: https://travis-ci.org/snipsco/snips-nlu.svg?branch=master\n   :target: https://travis-ci.org/snipsco/snips-nlu\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/snipsco/snips-nlu?branch=master&svg=true\n   :target: https://ci.appveyor.com/project/snipsco/snips-nlu\n\n.. image:: https://img.shields.io/pypi/v/snips-nlu.svg?branch=master\n   :target: https://pypi.python.org/pypi/snips-nlu\n\n.. image:: https://img.shields.io/pypi/pyversions/snips-nlu.svg?branch=master\n   :target: https://pypi.python.org/pypi/snips-nlu\n\n.. image:: https://codecov.io/gh/snipsco/snips-nlu/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/snipsco/snips-nlu\n\n.. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social\n   :target: https://twitter.com/intent/tweet?text=Extract%20meaning%20from%20text%20with%20Snips%20NLU,%20an%20open%20source%20library%20written%20in%20python%20and%20rust&url=https://github.com/snipsco/snips-nlu&via=snips&hashtags=nlu,nlp,machinelearning,python,rustlang\n\n\n`Snips NLU <https://snips-nlu.readthedocs.io>`_ (Natural Language Understanding) is a Python library that allows to extract structured information from sentences written in natural language.\n\nSummary\n-------\n\n- `What is Snips NLU about ?`_\n- `Getting Started`_\n\n  - `System requirements`_\n  - `Installation`_\n  - `Language Resources`_\n- `API Usage`_\n\n  - `Sample code`_\n  - `Command Line Interface`_\n- `Sample datasets`_\n- `Benchmarks`_\n- `Documentation`_\n- `Citing Snips NLU`_\n- `FAQ & Community`_\n- `Related content`_\n- `How do I contribute ?`_\n- `Licence`_\n\nWhat is Snips NLU about ?\n-------------------------\n\nBehind every chatbot and voice assistant lies a common piece of technology: Natural Language Understanding (NLU). Anytime a user interacts with an AI using natural language, their words need to be translated into a machine-readable description of what they meant.\n\nThe NLU engine first detects what the intention of the user is (a.k.a. `intent`_), then extracts the parameters (called `slots`_) of the query. The developer can then use this to determine the appropriate action or response.\n\n\nLet’s take an example to illustrate this, and consider the following sentence:\n\n.. code-block:: text\n\n    \"What will be the weather in paris at 9pm?\"\n\nProperly trained, the Snips NLU engine will be able to extract structured data such as:\n\n.. code-block:: json\n\n    {\n       \"intent\": {\n          \"intentName\": \"searchWeatherForecast\",\n          \"probability\": 0.95\n       },\n       \"slots\": [\n          {\n             \"value\": \"paris\",\n             \"entity\": \"locality\",\n             \"slotName\": \"forecast_locality\"\n          },\n          {\n             \"value\": {\n                \"kind\": \"InstantTime\",\n                \"value\": \"2018-02-08 20:00:00 +00:00\"\n             },\n             \"entity\": \"snips/datetime\",\n             \"slotName\": \"forecast_start_datetime\"\n          }\n       ]\n    }\n\nIn this case, the identified intent is ``searchWeatherForecast`` and two slots were extracted, a locality and a datetime. As you can see, Snips NLU does an extra step on top of extracting entities: it resolves them. The extracted datetime value has indeed been converted into a handy ISO format.\n\nCheck out our `blog post`_ to get more details about why we built Snips NLU and how it works under the hood. We also published a `paper on arxiv`_, presenting the machine learning architecture of the Snips Voice Platform.\n\n\nGetting Started\n---------------\n\n-------------------\nSystem requirements\n-------------------\n\n- Python 2.7 or Python >= 3.5\n- RAM: Snips NLU will typically use between 100MB and 200MB of RAM, depending on the language and the size of the dataset.\n\n\n------------\nInstallation\n------------\n\n.. code-block:: python\n\n    pip install snips-nlu\n\nWe currently have pre-built binaries (wheels) for ``snips-nlu`` and its\ndependencies for MacOS (10.11 and later), Linux x86_64 and Windows.\n\nFor any other architecture/os `snips-nlu` can be installed from the source\ndistribution. To do so, `Rust <https://www.rust-lang.org/en-US/install.html>`_\nand `setuptools_rust <https://github.com/PyO3/setuptools-rust>`_ must be\ninstalled before running the ``pip install snips-nlu`` command.\n\n------------------\nLanguage resources\n------------------\n\nSnips NLU relies on `external language resources`_ that must be downloaded before the\nlibrary can be used. You can fetch resources for a specific language by\nrunning the following command:\n\n.. code-block:: sh\n\n    python -m snips_nlu download en\n\nOr simply:\n\n.. code-block:: sh\n\n    snips-nlu download en\n\n\nThe list of supported languages is available at \n`this address <https://snips-nlu.readthedocs.io/en/latest/languages.html>`_.\n\nAPI Usage\n---------\n\n----------------------\nCommand Line Interface\n----------------------\n\nThe easiest way to test the abilities of this library is through the command line interface.\n\nFirst, start by training the NLU with one of the `sample datasets`_:\n\n.. code-block:: sh\n    \n    snips-nlu train path/to/dataset.json path/to/output_trained_engine\n\nWhere ``path/to/dataset.json`` is the path to the dataset which will be used during training, and ``path/to/output_trained_engine`` is the location where the trained engine should be persisted once the training is done.\n\nAfter that, you can start parsing sentences interactively by running:\n\n.. code-block:: sh\n    \n    snips-nlu parse path/to/trained_engine\n\nWhere ``path/to/trained_engine`` corresponds to the location where you have stored the trained engine during the previous step.\n\n\n-----------\nSample code\n-----------\n\nHere is a sample code that you can run on your machine after having\ninstalled `snips-nlu`, fetched the english resources and downloaded one of the `sample datasets`_:\n\n.. code-block:: python\n\n    >>> from __future__ import unicode_literals, print_function\n    >>> import io\n    >>> import json\n    >>> from snips_nlu import SnipsNLUEngine\n    >>> from snips_nlu.default_configs import CONFIG_EN\n    >>> with io.open(\"sample_datasets/lights_dataset.json\") as f:\n    ...     sample_dataset = json.load(f)\n    >>> nlu_engine = SnipsNLUEngine(config=CONFIG_EN)\n    >>> nlu_engine = nlu_engine.fit(sample_dataset)\n    >>> text = \"Please turn the light on in the kitchen\"\n    >>> parsing = nlu_engine.parse(text)\n    >>> parsing[\"intent\"][\"intentName\"]\n    'turnLightOn'\n\n\nWhat it does is training an NLU engine on a sample weather dataset and parsing\na weather query.\n\nSample datasets\n---------------\n\nHere is a list of some datasets that can be used to train a Snips NLU engine:\n\n- `Lights dataset <sample_datasets/lights_dataset.json>`_: \"Turn on the lights in the kitchen\", \"Set the light to red in the bedroom\"\n- `Beverage dataset <sample_datasets/beverage_dataset.json>`_: \"Prepare two cups of cappucino\", \"Make me a cup of tea\"\n- `Flights dataset <sample_datasets/flights_dataset.json>`_: \"Book me a flight to go to boston this weekend\", \"book me some tickets from istanbul to moscow in three days\"\n\nBenchmarks\n----------\n\nIn January 2018, we reproduced an `academic benchmark`_ which was published during the summer 2017. In this article, authors assessed the performance of API.ai (now Dialogflow, Google), Luis.ai (Microsoft), IBM Watson, and `Rasa NLU`_. For fairness, we used an updated version of Rasa NLU and compared it to the latest version of Snips NLU (both in dark blue).\n\n.. image:: .img/benchmarks.png\n\nIn the figure above, `F1 scores`_ of both intent classification and slot filling were computed for several NLU providers, and averaged across the three datasets used in the academic benchmark mentionned before. All the underlying results can be found `here <https://github.com/snipsco/nlu-benchmark/tree/master/2018-01-Braum-et-al-extension>`_.\n\n\nDocumentation\n-------------\n\nTo find out how to use Snips NLU please refer to the `package documentation <https://snips-nlu.readthedocs.io>`_, it will provide you with a step-by-step guide on how to setup and use this library.\n\nCiting Snips NLU\n----------------\n\nPlease cite the following paper when using Snips NLU:\n\n.. code-block:: bibtex\n\n   @article{coucke2018snips,\n     title   = {Snips Voice Platform: an embedded Spoken Language Understanding system for private-by-design voice interfaces},\n     author  = {Coucke, Alice and Saade, Alaa and Ball, Adrien and Bluche, Th{\\'e}odore and Caulier, Alexandre and Leroy, David and Doumouro, Cl{\\'e}ment and Gisselbrecht, Thibault and Caltagirone, Francesco and Lavril, Thibaut and others},\n     journal = {arXiv preprint arXiv:1805.10190},\n     pages   = {12--16},\n     year    = {2018}\n   }\n\nFAQ & Community\n---------------\n\nPlease join the `forum`_ to ask your questions and get feedback from the community.\n\nRelated content\n---------------\n* `What is Snips about ? <https://snips.ai/>`_\n* Snips NLU Open sourcing `blog post`_\n* `Snips Voice Platform paper (arxiv) <https://arxiv.org/abs/1805.10190>`_\n* `Snips NLU Language Resources <https://github.com/snipsco/snips-nlu-language-resources>`_\n* `Bug tracker <https://github.com/snipsco/snips-nlu/issues>`_\n* `Snips NLU Rust <https://github.com/snipsco/snips-nlu-rs>`_: Rust inference pipeline implementation and bindings (C, Swift, Kotlin, Python)\n* `Rustling <https://github.com/snipsco/rustling-ontology>`_: Snips NLU builtin entities parser\n\n\nHow do I contribute ?\n---------------------\n\nPlease see the `Contribution Guidelines <CONTRIBUTING.rst>`_.\n\nLicence\n-------\n\nThis library is provided by `Snips <https://www.snips.ai>`_ as Open Source software. See `LICENSE <LICENSE>`_ for more information.\n\n\nGeonames Licence\n----------------\n\nThe `snips/city`, `snips/country` and `snips/region` builtin entities rely on\nsoftware from Geonames, which is made available under a Creative Commons Attribution 4.0\nlicense international. For the license and warranties for Geonames please refer to: https://creativecommons.org/licenses/by/4.0/legalcode.\n\n\n.. _external language resources: https://github.com/snipsco/snips-nlu-language-resources\n.. _forum: https://forum.snips.ai/\n.. _blog post: https://medium.com/snips-ai/an-introduction-to-snips-nlu-the-open-source-library-behind-snips-embedded-voice-platform-b12b1a60a41a\n.. _paper on arxiv: https://arxiv.org/abs/1805.10190\n.. _academic benchmark: http://workshop.colips.org/wochat/@sigdial2017/documents/SIGDIAL22.pdf\n.. _Rasa NLU: https://nlu.rasa.ai/\n.. _F1 scores: https://en.wikipedia.org/wiki/F1_score\n.. _intent: https://snips-nlu.readthedocs.io/en/latest/data_model.html#intent\n.. _slots: https://snips-nlu.readthedocs.io/en/latest/data_model.html#slot\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B4B8:29FD16:1836A4:5E748B:6AB92AF6"},"text_sha256":"eb9731f802d162e406a53741be4e570b0b5f5da40eac43ea1c848ba9c1f55739"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"arXivTimes/arXivTimes","input_row":{"repository":"arXivTimes/arXivTimes","url":"https://github.com/arXivTimes/arXivTimes","name":"arXivTimes","owner":"arXivTimes","description":"repository to research & share the machine learning articles","language":"","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3900,"issues":2103,"created_at":"2016-10-26T05:27:39Z","updated_at":"2026-09-26T22:03:28Z","first_commit_at":"2016-10-26T05:27:40Z","last_commit_at":"2022-07-01T13:15:58Z","activity_months":68.140000000000001,"ai_ml_match_topics":"machine-learning; reinforcement-learning; computer-vision; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:56.289Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"arXivTimes/arXivTimes","visibility":"public","created_at":"2016-10-26T05:27:39Z","updated_at":"2026-09-26T22:03:28Z","private":false,"fork":false,"archived":false,"stargazers_count":3900,"open_issues_count":2050,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2448","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17BCDC8:1BDF620:6AB92AF8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2447","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:17EED95:1C1228C:6AB92AF8"},"commit":{"sha":"535832346a482259798447c7730ebe216e988bd5","url":"https://github.com/arXivTimes/arXivTimes/commit/535832346a482259798447c7730ebe216e988bd5","date":"2018-05-19T03:09:27Z","author_date":"2018-05-19T03:09:27Z","committer_date":"2018-05-19T03:09:27Z","tree_sha":"b345f123a7bb530e09e5c2a275ce991e79cd1469","message_first_line":"add engineering etc"},"tree_request_status":200,"tree_rate":{"github_remaining":"2446","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:17D5FA1:1BF9D9F:6AB92AF9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3618,"blob_sha":"2a259148712eaea5f9d508cb94f1254a3f9f16b3","priority":0}],"documents":[{"path":"README.md","size":3618,"blob_sha":"2a259148712eaea5f9d508cb94f1254a3f9f16b3","priority":0,"status":200,"text":"# arXivTimes\n\n![arXivTimesLogo.PNG](./arXivTimesLogo.PNG)\n\n機械学習関係の論文を調査し、共有するためのリポジトリです。\n\n**Follow Me on the Twitter!**\n\n[@arxivtimes](https://twitter.com/arxivtimes)\n\n論文輪講も併せて実施しています。輪講の内容はこちらから\n\n[arXivTimes Medium](https://medium.com/@arxivtimes)\n\n# Contents\n\n* [Article Summaries](https://github.com/arXivTimes/arXivTimes/issues)\n  * 論文の一言まとめ、また概要をIssueで管理しています。\n* [Datasets](https://github.com/arXivTimes/arXivTimes/tree/master/datasets)\n  * 機械学習に利用可能なデータセットをまとめています。\n* [Tools](https://github.com/arXivTimes/arXivTimes/tree/master/tools)\n  * 機械学習モデルの実装に役立つツールをまとめています。\n* Conference Related Papers\n  * arXivTimesに投稿された論文のうち、学会に提出された論文を年代ごとにまとめています。\n  * [NIPS](https://github.com/arXivTimes/arXivTimes/projects/1)\n  * [ICLR](https://github.com/arXivTimes/arXivTimes/projects/2)\n  * [ICML](https://github.com/arXivTimes/arXivTimes/projects/3)\n  * [CVPR](https://github.com/arXivTimes/arXivTimes/projects/6)\n  * [ACL](https://github.com/arXivTimes/arXivTimes/projects/4)\n  * [AAAI](https://github.com/arXivTimes/arXivTimes/projects/5)\n\n# How to Contribute\n\n論文のまとめを投稿する際は、以下の要領でお願いいたします。\n\n* 登録したい論文は、Issueに登録を行ってください。\n* Issueのタイトルを論文とし、内容はIssue Templateに従ってください。登録時必須なのは以下点のみです\n  * 一言でいうと\n  * 論文リンク\n  * 著者/所属機関 ※論文からのコピペでOK\n  * 投稿日付 Submission dateです。yyyy/MM/ddの形式でお願いします。学会に提出されている場合は、それについても記載いただけると助かります(NIPS 2017など)\n* 「一言でいうと」の分量は、Twitterで呟ける程度が目安です。問題設定・アプローチ手法・結果が端的にまとまっているのがよい「一言」です。未読の人になるべくその内容が伝わるよう、工夫を凝らしてください。\n* Issueのより詳細な内容について記載を行う場合は、担当者に(Assignees)自分を設定してください。これは読んでいる論文のバッティングを防ぐための措置です\n* 論文の内容に応じて、Labelをつけてください(現時点ではContributorのみ付与可能なので、投稿頂いた場合こちらで付与を行わせていただきます)\n* コメントには、論文を読んでの所感や評価、また理解が難しい点などがあったらその旨を記載してください\n* 論文が学会に採択された場合、投稿した論文のコメントにてご連絡ください。Projectページに反映します。\n\nなお、まとめについて内容に自信がない、という場合はコメントで@arxivtimesbotに対してメンションでレビューを依頼できます。\n\n![mention](https://user-images.githubusercontent.com/544269/29446756-d88b8daa-8428-11e7-8ff1-e4f938d94e0c.png)\n\nレビューの依頼が行われると、arXivtimesのメンバーがレビューします。\n\nタグを増やしたい、テンプレートを変えたい、という要望は`proposal`のタグをつけてIssueにあげてください。\n\nまた、その他のコンテンツについては他のOSS同様、Pull Requestにてお願いいたします。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4BFE:149227:180CF9:5E4BCF:6AB92AF5"},"text_sha256":"ea669aa2ea178015fb97916c7689cfb7d692a1fbd201b4996ed6d70c2b119258"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2445","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17CD3A6:1BF0EA6:6AB92AF9"},"commit":{"sha":"f4cb8f3ae91f819a07ba6648efe3c38729695e8a","url":"https://github.com/arXivTimes/arXivTimes/commit/f4cb8f3ae91f819a07ba6648efe3c38729695e8a","date":"2022-07-01T13:15:58Z","author_date":"2022-07-01T13:15:58Z","committer_date":"2022-07-01T13:15:58Z","tree_sha":"cf8414507196fd266a9a70b0a94a235b6c973870","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2444","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D0:72BD3:17F8DEB:1C1C81A:6AB92AFA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4002,"blob_sha":"c3344d3711afaa4b568a66e04864394a7c5bcab0","priority":0}],"documents":[{"path":"README.md","size":4002,"blob_sha":"c3344d3711afaa4b568a66e04864394a7c5bcab0","priority":0,"status":200,"text":"# arXivTimes\n\n![arXivTimesLogo.PNG](./arXivTimesLogo.PNG)\n\n機械学習関係の論文を調査し、共有するためのリポジトリです。\n\n**Follow Me on the Twitter!**\n\n[@arxivtimes](https://twitter.com/arxivtimes)\n\n論文輪講も併せて実施しています。輪講の内容はこちらから。\n\n[arXivTimes Medium](https://medium.com/@arxivtimes)\n\n`#arXivTimes`タグをつけている、GitHubで論文をまとめているリポジトリはこちら。\n\n[arXivTimes family](https://github.com/topics/arxivtimes)\n\n# Contents\n\n* [Article Summaries](https://github.com/arXivTimes/arXivTimes/issues)\n  * 論文の一言まとめ、また概要をIssueで管理しています。\n* [Datasets](https://github.com/arXivTimes/arXivTimes/tree/master/datasets)\n  * 機械学習に利用可能なデータセットをまとめています。\n* [Tools](https://github.com/arXivTimes/arXivTimes/tree/master/tools)\n  * 機械学習モデルの実装に役立つツールをまとめています。\n* Conference Related Papers\n  * arXivTimesに投稿された論文のうち、学会に提出された論文を年代ごとにまとめています。\n  * [NIPS](https://github.com/arXivTimes/arXivTimes/projects/1)\n  * [ICLR](https://github.com/arXivTimes/arXivTimes/projects/2)\n  * [ICML](https://github.com/arXivTimes/arXivTimes/projects/3)\n  * [CVPR](https://github.com/arXivTimes/arXivTimes/projects/6)\n  * [ACL](https://github.com/arXivTimes/arXivTimes/projects/4)\n  * [AAAI](https://github.com/arXivTimes/arXivTimes/projects/5)\n\nConference Information\n\n* 各学会の締め切り: [AI Conference Deadlines](https://aideadlin.es/)\n* 各学会のBest Paper: [Best Paper Awards in Computer Science](https://jeffhuang.com/best_paper_awards.html)\n\n# How to Contribute\n\n論文のまとめを投稿する際は、以下の要領でお願いいたします。\n\n* 登録したい論文は、Issueに登録を行ってください。\n* Issueのタイトルを論文とし、内容はIssue Templateに従ってください。登録時必須なのは以下点のみです\n  * 一言でいうと\n  * 論文リンク\n  * 著者/所属機関 ※論文からのコピペでOK\n  * 投稿日付 Submission dateです。yyyy/MM/ddの形式でお願いします。学会に提出されている場合は、それについても記載いただけると助かります(NIPS 2017など)\n* 「一言でいうと」の分量は、Twitterで呟ける程度が目安です。問題設定・アプローチ手法・結果が端的にまとまっているのがよい「一言」です。未読の人になるべくその内容が伝わるよう、工夫を凝らしてください。\n* Issueのより詳細な内容について記載を行う場合は、担当者に(Assignees)自分を設定してください。これは読んでいる論文のバッティングを防ぐための措置です\n* 論文の内容に応じて、Labelをつけてください(現時点ではContributorのみ付与可能なので、投稿頂いた場合こちらで付与を行わせていただきます)\n* コメントには、論文を読んでの所感や評価、また理解が難しい点などがあったらその旨を記載してください\n* 論文が学会に採択された場合、投稿した論文のコメントにてご連絡ください。Projectページに反映します。\n\nなお、まとめについて内容に自信がない、という場合はコメントで@arxivtimesbotに対してメンションでレビューを依頼できます。\n\n![mention](https://user-images.githubusercontent.com/544269/29446756-d88b8daa-8428-11e7-8ff1-e4f938d94e0c.png)\n\nレビューの依頼が行われると、arXivtimesのメンバーがレビューします。\n\nタグを増やしたい、テンプレートを変えたい、という要望は`proposal`のタグをつけてIssueにあげてください。\n\nまた、その他のコンテンツについては他のOSS同様、Pull Requestにてお願いいたします。\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0E80:B08CF:174AA5:5D8989:6AB92AF9"},"text_sha256":"0b4a33ea780ddfb15997c36e7a0ae6d2748fa8fe6a1cdfa404c7fc5865903778"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"yahoo/TensorFlowOnSpark","input_row":{"repository":"yahoo/TensorFlowOnSpark","url":"https://github.com/yahoo/TensorFlowOnSpark","name":"TensorFlowOnSpark","owner":"yahoo","description":"TensorFlowOnSpark brings TensorFlow programs to Apache Spark clusters.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3846,"issues":369,"created_at":"2017-01-20T18:15:57Z","updated_at":"2026-09-22T15:08:46Z","first_commit_at":"2017-01-27T21:22:38Z","last_commit_at":"2023-04-27T20:08:56Z","activity_months":74.930000000000007,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:40:58.746Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"yahoo/TensorFlowOnSpark","visibility":"public","created_at":"2017-01-20T18:15:57Z","updated_at":"2026-09-22T15:08:46Z","private":false,"fork":false,"archived":false,"stargazers_count":3846,"open_issues_count":16,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2443","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:17E7A57:1C0B5FD:6AB92AFA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2442","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084E:280FBC:17BCF3E:1BDF805:6AB92AFB"},"commit":{"sha":"df03f49042366d432e0fabca41dab1d35f6847e6","url":"https://github.com/yahoo/TensorFlowOnSpark/commit/df03f49042366d432e0fabca41dab1d35f6847e6","date":"2018-05-17T22:40:17Z","author_date":"2018-05-17T22:40:17Z","committer_date":"2018-05-17T22:40:17Z","tree_sha":"9beceda9dd097a9286c362f3e3bdf0b5dca29f31","message_first_line":"Merge pull request #283 from yahoo/leewyang_update_estimator"},"tree_request_status":200,"tree_rate":{"github_remaining":"2441","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17D60EB:1BF9F31:6AB92AFB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3215,"blob_sha":"d974759c78fa9c3b71073eb252e9a0c75a803c5c","priority":0}],"documents":[{"path":"README.md","size":3215,"blob_sha":"d974759c78fa9c3b71073eb252e9a0c75a803c5c","priority":0,"status":200,"text":"<!--\nCopyright 2017 Yahoo Inc.\nLicensed under the terms of the Apache 2.0 license.\nPlease see LICENSE file in the project root for terms.\n-->\n# TensorFlowOnSpark\n\n## What's TensorFlowOnSpark?\n\nTensorFlowOnSpark brings scalable deep learning to [Apache Hadoop](http://hadoop.apache.org) and [Apache Spark](http://spark.apache.org)\nclusters. By combining salient features from deep learning framework\n[TensorFlow](https://www.tensorflow.org) and big-data frameworks\nApache Spark and Apache Hadoop, TensorFlowOnSpark enables distributed\ndeep learning on a cluster of GPU and CPU servers.\n\nTensorFlowOnSpark enables distributed TensorFlow training and\ninference on Apache Spark clusters.  It seeks to minimize the amount\nof code changes required to run existing TensorFlow programs on a\nshared grid.  Its Spark-compatible API helps manage the TensorFlow\ncluster with the following steps:\n\n1. **Startup** - launches the Tensorflow main function on the executors, along with listeners for data/control messages.\n1. **Data ingestion**\n   - **Readers & QueueRunners** - leverages TensorFlow's [Reader](https://www.tensorflow.org/how_tos/reading_data/#reading_from_files) mechanism to read data files directly from HDFS.\n   - **Feeding** - sends Spark RDD data into the TensorFlow nodes using the [feed_dict](https://www.tensorflow.org/how_tos/reading_data/#feeding) mechanism.  Note that we leverage the [Hadoop Input/Output Format](https://github.com/tensorflow/ecosystem/tree/master/hadoop) for access to TFRecords on HDFS.\n1. **Shutdown** - shuts down the Tensorflow workers and PS nodes on the executors.\n\nTensorFlowOnSpark was developed by Yahoo for large-scale distributed\ndeep learning on our Hadoop clusters in Yahoo's private cloud. \n\n\n## Why TensorFlowOnSpark?\n\nTensorFlowOnSpark provides some important benefits (see [our\nblog](http://yahoohadoop.tumblr.com/post/157196317141/open-sourcing-tensorflowonspark-distributed-deep))\nover alternative deep learning solutions.\n   * Easily migrate all existing TensorFlow programs with <10 lines of code change;\n   * Support all TensorFlow functionalities: synchronous/asynchronous training, model/data parallelism, inferencing and TensorBoard;\n   * Server-to-server direct communication achieves faster learning when available;\n   * Allow datasets on HDFS and other sources pushed by Spark or pulled by TensorFlow; \n   * Easily integrate with your existing data processing pipelines and machine learning algorithms (ex. MLlib, CaffeOnSpark);\n   * Easily deployed on cloud or on-premise: CPU & GPU, Ethernet and Infiniband. \n\n\n## Using TensorFlowOnSpark\n\nPlease check TensorFlowOnSpark [wiki site](../../wiki) for detailed\ndocumentations such as getting started guides for [YARN\ncluster](../../wiki/GetStarted_YARN) and [AWS EC2\ncluster](../../wiki/GetStarted_EC2). A [Conversion\nGuide](../../wiki/Conversion) has been provided to help you convert\nyour TensorFlow programs.\n\n## Mailing List\n\nPlease join [TensorFlowOnSpark user group](https://groups.google.com/forum/#!forum/TensorFlowOnSpark-users) for discussions and questions.\n\n## License\n\nThe use and distribution terms for this software are covered by the Apache 2.0 license.\nSee [LICENSE](LICENSE) file for terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"300E:4F9CC:170BB5:5D47C3:6AB92AFB"},"text_sha256":"cbc6aa69ebdbff504218644e4db1bbfba6a2448c1b5f62176d9cff595ef2de52"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2440","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:183381F:1C56F89:6AB92AFC"},"commit":{"sha":"f9c3e5e58bdb5f8d64ac21399dcf32f612ce67f0","url":"https://github.com/yahoo/TensorFlowOnSpark/commit/f9c3e5e58bdb5f8d64ac21399dcf32f612ce67f0","date":"2023-04-27T20:08:56Z","author_date":"2023-04-27T20:08:56Z","committer_date":"2023-04-27T20:08:56Z","tree_sha":"1c4770410ec048f00432338a3a8a3e354eab429b","message_first_line":"disable PR builds (#602)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2439","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081F:14A1F2:180E885:1C3251D:6AB92AFC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4759,"blob_sha":"ecb4b5d555d1975f26e835a7d14260ad5f3f9c81","priority":0}],"documents":[{"path":"README.md","size":4759,"blob_sha":"ecb4b5d555d1975f26e835a7d14260ad5f3f9c81","priority":0,"status":200,"text":"<!--\nCopyright 2019 Yahoo Inc.\nLicensed under the terms of the Apache 2.0 license.\nPlease see LICENSE file in the project root for terms.\n-->\n# TensorFlowOnSpark\n> _TensorFlowOnSpark brings scalable deep learning to Apache Hadoop and Apache Spark\nclusters._\n\n[![Build Status](https://cd.screwdriver.cd/pipelines/6384/badge)](https://cd.screwdriver.cd/pipelines/6384)\n[![Package](https://img.shields.io/badge/package-pypi-blue.svg)](https://pypi.org/project/tensorflowonspark/)\n[![Downloads](https://img.shields.io/pypi/dm/tensorflowonspark.svg)](https://img.shields.io/pypi/dm/tensorflowonspark.svg)\n[![Documentation](https://img.shields.io/badge/Documentation-latest-blue.svg)](https://yahoo.github.io/TensorFlowOnSpark/)\n\nBy combining salient features from the [TensorFlow](https://www.tensorflow.org) deep learning framework with [Apache Spark](http://spark.apache.org) and [Apache Hadoop](http://hadoop.apache.org), TensorFlowOnSpark enables distributed\ndeep learning on a cluster of GPU and CPU servers.\n\nIt enables both distributed TensorFlow training and\ninferencing on Spark clusters, with a goal to minimize the amount\nof code changes required to run existing TensorFlow programs on a\nshared grid.  Its Spark-compatible API helps manage the TensorFlow\ncluster with the following steps:\n\n1. **Startup** - launches the Tensorflow main function on the executors, along with listeners for data/control messages.\n1. **Data ingestion**\n   - **InputMode.TENSORFLOW** - leverages TensorFlow's built-in APIs to read data files directly from HDFS.\n   - **InputMode.SPARK** - sends Spark RDD data to the TensorFlow nodes via a `TFNode.DataFeed` class.  Note that we leverage the [Hadoop Input/Output Format](https://github.com/tensorflow/ecosystem/tree/master/hadoop) to access TFRecords on HDFS.\n1. **Shutdown** - shuts down the Tensorflow workers and PS nodes on the executors.\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Background\n\nTensorFlowOnSpark was developed by Yahoo for large-scale distributed\ndeep learning on our Hadoop clusters in Yahoo's private cloud.\n\nTensorFlowOnSpark provides some important benefits (see [our\nblog](https://developer.yahoo.com/blogs/157196317141/))\nover alternative deep learning solutions.\n   * Easily migrate existing TensorFlow programs with <10 lines of code change.\n   * Support all TensorFlow functionalities: synchronous/asynchronous training, model/data parallelism, inferencing and TensorBoard.\n   * Server-to-server direct communication achieves faster learning when available.\n   * Allow datasets on HDFS and other sources pushed by Spark or pulled by TensorFlow.\n   * Easily integrate with your existing Spark data processing pipelines.\n   * Easily deployed on cloud or on-premise and on CPUs or GPUs.\n\n## Install\n\nTensorFlowOnSpark is provided as a pip package, which can be installed on single machines via:\n```\n# for tensorflow>=2.0.0\npip install tensorflowonspark\n\n# for tensorflow<2.0.0\npip install tensorflowonspark==1.4.4\n```\n\nFor distributed clusters, please see our [wiki site](../../wiki) for detailed documentation for specific environments, such as our getting started guides for [single-node Spark Standalone](https://github.com/yahoo/TensorFlowOnSpark/wiki/GetStarted_Standalone), [YARN clusters](../../wiki/GetStarted_YARN) and [AWS EC2](../../wiki/GetStarted_EC2).  Note: the Windows operating system is not currently supported due to [this issue](https://github.com/yahoo/TensorFlowOnSpark/issues/36).\n\n## Usage\n\nTo use TensorFlowOnSpark with an existing TensorFlow application, you can follow our [Conversion Guide](../../wiki/Conversion-Guide) to describe the required changes.  Additionally, our [wiki site](../../wiki) has pointers to some presentations which provide an overview of the platform.\n\n**Note: since TensorFlow 2.x breaks API compatibility with TensorFlow 1.x, the examples have been updated accordingly.  If you are using TensorFlow 1.x, you will need to checkout the `v1.4.4` tag for compatible examples and instructions.**\n\n## API\n\n[API Documentation](https://yahoo.github.io/TensorFlowOnSpark/) is automatically generated from the code.\n\n## Contribute\n\nPlease join the [TensorFlowOnSpark user group](https://groups.google.com/forum/#!forum/TensorFlowOnSpark-users) for discussions and questions.  If you have a question, please review our [FAQ](../../wiki/Frequently-Asked-Questions) before posting.\n\nContributions are always welcome.  For more information, please see our [guide for getting involved](Contributing.md).\n\n## License\n\nThe use and distribution terms for this software are covered by the Apache 2.0 license.\nSee [LICENSE](LICENSE) file for terms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E432:35EBC:17818B:5DC029:6AB92AFC"},"text_sha256":"bd0cb6118f087dddd5ba728dc9a9c044ad383e13ab6a0b5998355f57ecfa6003"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"benfred/implicit","input_row":{"repository":"benfred/implicit","url":"https://github.com/benfred/implicit","name":"implicit","owner":"benfred","description":"Fast Python Collaborative Filtering for Implicit Feedback Datasets","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3824,"issues":505,"created_at":"2016-04-17T03:45:23Z","updated_at":"2026-09-18T16:02:24Z","first_commit_at":"2016-04-17T03:45:23Z","last_commit_at":"2026-05-08T18:23:12Z","activity_months":120.68000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:01.595Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"benfred/implicit","visibility":"public","created_at":"2016-04-17T03:45:23Z","updated_at":"2026-09-18T16:02:24Z","private":false,"fork":false,"archived":false,"stargazers_count":3824,"open_issues_count":97,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2438","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:17EF06C:1C12612:6AB92AFD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2437","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:17A79C6:1BCB6F6:6AB92AFD"},"commit":{"sha":"f8f3920486c4cce904f17511833d315840160a27","url":"https://github.com/benfred/implicit/commit/f8f3920486c4cce904f17511833d315840160a27","date":"2018-05-24T19:14:42Z","author_date":"2018-05-24T19:14:42Z","committer_date":"2018-05-24T19:14:42Z","tree_sha":"bce9c7e008ec67260e7c8e0958e4b803ed7c2e3b","message_first_line":"v0.3.6"},"tree_request_status":200,"tree_rate":{"github_remaining":"2436","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B1:2EA1B4:17D6229:1BFA0FA:6AB92AFE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4701,"blob_sha":"a7462bc81b39331d8acefcab2f9673f8ec3c774d","priority":0}],"documents":[{"path":"README.md","size":4701,"blob_sha":"a7462bc81b39331d8acefcab2f9673f8ec3c774d","priority":0,"status":200,"text":"Implicit\n=======\n\n[![Build Status](https://travis-ci.org/benfred/implicit.svg?branch=master)](https://travis-ci.org/benfred/implicit)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/9kfbvx5i6dc48yr0?svg=true)](https://ci.appveyor.com/project/benfred/implicit)\n\nFast Python Collaborative Filtering for Implicit Datasets.\n\nThis project provides fast Python implementations of several different popular recommendation algorithms for\nimplicit feedback datasets:\n\n * Alternating Least Squares as described in the papers [Collaborative Filtering for Implicit Feedback Datasets](http://yifanhu.net/PUB/cf.pdf) and [Applications of the Conjugate Gradient Method for Implicit\nFeedback Collaborative Filtering](https://pdfs.semanticscholar.org/bfdf/7af6cf7fd7bb5e6b6db5bbd91be11597eaf0.pdf).\n\n * [Bayesian Personalized Ranking](https://arxiv.org/pdf/1205.2618.pdf).\n\n * Item-Item Nearest Neighbour models using Cosine, TFIDF or BM25 as a distance metric.\n\nAll models have multi-threaded training routines, using Cython and OpenMP to fit the models in\nparallel among all available CPU cores.  In addition, the ALS and BPR models both have custom CUDA\nkernels - enabling fitting on compatible GPU's. Approximate nearest neighbours libraries such as [Annoy](https://github.com/spotify/annoy), [NMSLIB](https://github.com/searchivarius/nmslib)\nand [Faiss](https://github.com/facebookresearch/faiss) can also be used by Implicit to [speed up\nmaking recommendations](https://www.benfrederickson.com/approximate-nearest-neighbours-for-recommender-systems/).\n\nTo install:\n\n```\npip install implicit\n```\n\nBasic usage:\n\n```python\nimport implicit\n\n# initialize a model\nmodel = implicit.als.AlternatingLeastSquares(factors=50)\n\n# train the model on a sparse matrix of item/user/confidence weights\nmodel.fit(item_user_data)\n\n# recommend items for a user\nuser_items = item_user_data.T.tocsr()\nrecommendations = model.recommend(userid, user_items)\n\n# find related items\nrelated = model.similar_items(itemid)\n```\n\nThe examples folder has a program showing how to use this to [compute similar artists on the\nlast.fm dataset](https://github.com/benfred/implicit/blob/master/examples/lastfm.py).\n\nFor more information see the [documentation](http://implicit.readthedocs.io/).\n\n#### Articles about Implicit\n\nThese blog posts describe the algorithms that power this library:\n\n * [Finding Similar Music with Matrix Factorization](https://www.benfrederickson.com/matrix-factorization/)\n * [Faster Implicit Matrix Factorization](https://www.benfrederickson.com/fast-implicit-matrix-factorization/)\n * [Implicit Matrix Factorization on the GPU](https://www.benfrederickson.com/implicit-matrix-factorization-on-the-gpu/)\n * [Approximate Nearest Neighbours for Recommender Systems](https://www.benfrederickson.com/approximate-nearest-neighbours-for-recommender-systems/)\n * [Distance Metrics for Fun and Profit](https://www.benfrederickson.com/distance-metrics/)\n\nThere are also several other blog posts about using Implicit to build recommendation systems:\n\n * [Recommending GitHub Repositories with Google BigQuery and the implicit library](https://medium.com/@jbochi/recommending-github-repositories-with-google-bigquery-and-the-implicit-library-e6cce666c77)\n * [Intro to Implicit Matrix Factorization: Classic ALS with Sketchfab Models](http://blog.ethanrosenthal.com/2016/10/19/implicit-mf-part-1/)\n * [A Gentle Introduction to Recommender Systems with Implicit Feedback](https://jessesw.com/Rec-System/).\n\n\n#### Requirements\n\nThis library requires SciPy version 0.16 or later. Running on OSX requires an OpenMP compiler,\nwhich can be installed with homebrew: ```brew install gcc```.\n\nGPU Support requires at least version 8 of the [NVidia CUDA Toolkit](https://developer.nvidia.com/cuda-downloads). The build will use the ```nvcc``` compiler\nthat is found on the path, but this can be overriden by setting the CUDAHOME enviroment variable to point to your cuda installation.\n\nThis library has been tested with Python 2.7, 3.5 and 3.6 on Ubuntu, OSX and Windows.\n\n#### Benchmarks\n\nSimple benchmarks comparing the ALS fitting time versus [Spark and QMF can be found here](https://github.com/benfred/implicit/tree/master/benchmarks).\n\n#### Optimal Configuration\n\nI'd recommend configuring SciPy to use Intel's MKL matrix libraries. One easy way of doing this is by installing the Anaconda Python distribution.\n\nFor systems using OpenBLAS, I highly recommend setting 'export OPENBLAS_NUM_THREADS=1'. This\ndisables its internal multithreading ability, which leads to substantial speedups for this\npackage. Likewise for Intel MKL, setting 'export MKL_NUM_THREADS=1' should also be set.\n\nReleased under the MIT License\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2648:3BB77:17A4B6:5DE4EC:6AB92AFD"},"text_sha256":"2574a8da8125702f1d204f1fb2efcbcfcdbbe4fa84ad0f8d262313483347f9ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2435","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17CD68C:1BF125A:6AB92AFE"},"commit":{"sha":"8a95dbe24ca675a6edd86aafb3b4cd5ae7287edf","url":"https://github.com/benfred/implicit/commit/8a95dbe24ca675a6edd86aafb3b4cd5ae7287edf","date":"2026-05-08T18:23:12Z","author_date":"2026-05-08T18:23:12Z","committer_date":"2026-05-08T18:23:12Z","tree_sha":"8198522c9429f44b32ce6858c75fbff468efccae","message_first_line":"Bump version: 0.7.2 → 0.7.3"},"tree_request_status":200,"tree_rate":{"github_remaining":"2434","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EE:156040:17D0CAE:1BF3E6C:6AB92AFF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5202,"blob_sha":"f79ca37042e2827553ff8697282ee176e6d6424b","priority":0}],"documents":[{"path":"README.md","size":5202,"blob_sha":"f79ca37042e2827553ff8697282ee176e6d6424b","priority":0,"status":200,"text":"Implicit\n=======\n\n[![Build\nStatus](https://github.com/benfred/implicit/workflows/Build/badge.svg)](https://github.com/benfred/implicit/actions?query=workflow%3ABuild+branch%3Amain)\n[![Documentation](https://img.shields.io/badge/documentation-blue.svg)](https://benfred.github.io/implicit/)\n\n\nFast Python Collaborative Filtering for Implicit Datasets.\n\nThis project provides fast Python implementations of several different popular recommendation algorithms for\nimplicit feedback datasets:\n\n * Alternating Least Squares as described in the papers [Collaborative Filtering for Implicit Feedback Datasets](http://yifanhu.net/PUB/cf.pdf) and [Applications of the Conjugate Gradient Method for Implicit\nFeedback Collaborative Filtering](https://pdfs.semanticscholar.org/bfdf/7af6cf7fd7bb5e6b6db5bbd91be11597eaf0.pdf).\n\n * [Bayesian Personalized Ranking](https://arxiv.org/pdf/1205.2618.pdf).\n\n * [Logistic Matrix Factorization](https://web.stanford.edu/~rezab/nips2014workshop/submits/logmat.pdf)\n\n * Item-Item Nearest Neighbour models using Cosine, TFIDF or BM25 as a distance metric.\n\nAll models have multi-threaded training routines, using Cython and OpenMP to fit the models in\nparallel among all available CPU cores.  In addition, the ALS and BPR models both have custom CUDA\nkernels - enabling fitting on compatible GPU's. Approximate nearest neighbours libraries such as [Annoy](https://github.com/spotify/annoy), [NMSLIB](https://github.com/searchivarius/nmslib)\nand [Faiss](https://github.com/facebookresearch/faiss) can also be used by Implicit to [speed up\nmaking recommendations](https://www.benfrederickson.com/approximate-nearest-neighbours-for-recommender-systems/).\n\n#### Installation\n\nImplicit can be installed from pypi with:\n\n```\npip install implicit\n```\n\nInstalling with pip will use prebuilt binary wheels on x86_64 Linux, Windows\nand OSX. These wheels include GPU support on Linux.\n\nImplicit can also be installed with conda:\n\n```\n# CPU only package\nconda install -c conda-forge implicit\n\n# CPU+GPU package\nconda install -c conda-forge implicit implicit-proc=*=gpu\n```\n\n#### Basic Usage\n\n```python\nimport implicit\n\n# initialize a model\nmodel = implicit.als.AlternatingLeastSquares(factors=50)\n\n# train the model on a sparse matrix of user/item/confidence weights\nmodel.fit(user_item_data)\n\n# recommend items for a user\nrecommendations = model.recommend(userid, user_item_data[userid])\n\n# find related items\nrelated = model.similar_items(itemid)\n```\n\nThe examples folder has a program showing how to use this to [compute similar artists on the\nlast.fm dataset](https://github.com/benfred/implicit/blob/master/examples/lastfm.py).\n\nFor more information see the [documentation](https://benfred.github.io/implicit/).\n\n#### Articles about Implicit\n\nThese blog posts describe the algorithms that power this library:\n\n * [Finding Similar Music with Matrix Factorization](https://www.benfrederickson.com/matrix-factorization/)\n * [Faster Implicit Matrix Factorization](https://www.benfrederickson.com/fast-implicit-matrix-factorization/)\n * [Implicit Matrix Factorization on the GPU](https://www.benfrederickson.com/implicit-matrix-factorization-on-the-gpu/)\n * [Approximate Nearest Neighbours for Recommender Systems](https://www.benfrederickson.com/approximate-nearest-neighbours-for-recommender-systems/)\n * [Distance Metrics for Fun and Profit](https://www.benfrederickson.com/distance-metrics/)\n\nThere are also several other articles about using Implicit to build recommendation systems:\n * [H&M Personalized Fashion Recommendations Kaggle Competition](https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/324129)\n * [Yandex Cup 2022: Like Prediction](https://github.com/greenwolf-nsk/yandex-cup-2022-recsys)\n * [Recommending GitHub Repositories with Google BigQuery and the implicit library](https://medium.com/@jbochi/recommending-github-repositories-with-google-bigquery-and-the-implicit-library-e6cce666c77)\n * [Intro to Implicit Matrix Factorization: Classic ALS with Sketchfab Models](http://blog.ethanrosenthal.com/2016/10/19/implicit-mf-part-1/)\n * [A Gentle Introduction to Recommender Systems with Implicit Feedback](https://jessesw.com/Rec-System/).\n\n\n#### Requirements\n\nThis library requires SciPy version 0.16 or later and Python version 3.9 or later.\n\nGPU Support requires version 13 of the [NVidia CUDA\nToolkit](https://developer.nvidia.com/cuda-downloads), and requires that RMM be installed `pip install rmm-cu13`\n\nThis library is tested with Python 3.9 to 3.14 on Ubuntu, OSX and Windows.\n\n#### Benchmarks\n\nSimple benchmarks comparing the ALS fitting time versus [Spark can be found here](https://github.com/benfred/implicit/tree/master/benchmarks).\n\n#### Optimal Configuration\n\nI'd recommend configuring SciPy to use Intel's MKL matrix libraries. One easy way of doing this is by installing the Anaconda Python distribution.\n\nFor systems using OpenBLAS, I highly recommend setting 'export OPENBLAS_NUM_THREADS=1'. This\ndisables its internal multithreading ability, which leads to substantial speedups for this\npackage. Likewise for Intel MKL, setting 'export MKL_NUM_THREADS=1' should also be set.\n\nReleased under the MIT License\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DEA:3FD49:177E16:5DBD71:6AB92AFE"},"text_sha256":"37105e459f2ced0459346481af3eb5e695d09048e8b23923c6db41c96f109bf4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jtablesaw/tablesaw","input_row":{"repository":"jtablesaw/tablesaw","url":"https://github.com/jtablesaw/tablesaw","name":"tablesaw","owner":"jtablesaw","description":"Java dataframe and visualization library","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3762,"issues":737,"created_at":"2016-01-01T14:58:28Z","updated_at":"2026-09-25T14:54:00Z","first_commit_at":"2015-12-13T18:59:51Z","last_commit_at":"2026-03-02T01:13:00Z","activity_months":122.58,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:03.989Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jtablesaw/tablesaw","visibility":"public","created_at":"2016-01-01T14:58:28Z","updated_at":"2026-09-25T14:54:00Z","private":false,"fork":false,"archived":false,"stargazers_count":3762,"open_issues_count":147,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2433","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17D137F:1BF5045:6AB92B00"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2432","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:17F1D84:1C15B5B:6AB92B00"},"commit":{"sha":"6e6ffbc8c3b2927b0d05caedeb239b715520afd9","url":"https://github.com/jtablesaw/tablesaw/commit/6e6ffbc8c3b2927b0d05caedeb239b715520afd9","date":"2018-04-27T22:47:08Z","author_date":"2018-04-27T22:47:08Z","committer_date":"2018-04-27T22:47:08Z","tree_sha":"20dfe91c069ecb4f1f508e72d9a3f14fbed55bab","message_first_line":"methods to get columns by type from a table"},"tree_request_status":200,"tree_rate":{"github_remaining":"2431","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:1791651:1BB3D2F:6AB92B00"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3502,"blob_sha":"9925c341fd39ad4b56befa333d94468a432a7bd9","priority":0}],"documents":[{"path":"README.md","size":3502,"blob_sha":"9925c341fd39ad4b56befa333d94468a432a7bd9","priority":0,"status":200,"text":"Tablesaw\n=======\n\n[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/nebula-project-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Build Status](https://travis-ci.org/jtablesaw/tablesaw.svg?branch=master)](https://travis-ci.org/jtablesaw/tablesaw)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5029f48d00c24f1ea378b090210cf7da)](https://www.codacy.com/app/jtablesaw/tablesaw?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jtablesaw/tablesaw&amp;utm_campaign=Badge_Grade)\n\n\n\n#### A note on the next version\n\n> Version 0.20, soon to be released, includes a number of fundamental changes. It is safe to say that any existing code that uses Tablesaw will require modifications. We regret the inconvenience that results.\n>\n> Two of the biggest changes are the removal of the Smile interface, and the removal of support for several numeric column types. In the new release we will support only double precision floating point columns. We may at some time revert those changes, but for now they let us focus on Tablesaw's core functionality in manipulating tabular datasets. \n>\n> The new version also represents a significant improvement in several dimensions. All the changes are summarized [here](https://jtablesaw.github.io/tablesaw/changes_in_v_0.2), but it's worth mentioning a couple: \n>\n> Overall, interfaces for tables and columns are more consistent, general, powerful, and robust. Test coverage is up from 44% to 70%.  When the release goes to Maven Central, documentation will be better, too.  Overall, this release is a big step forward for Tablesaw. We hope you agree. \n>\n> Thank you. \n\n### Overview\n\n__Tablesaw__ is a Java dataframe similar to Pandas in Python, and the R data frame. If you work with data in Java, it may save you time and effort.\n\nTablesaw also supports descriptive statistics and data visualization. \n\nYou can use tablesaw-core, which is the dataframe library itself, by adding a dependency: \n\n    <dependency>\n        <groupId>tech.tablesaw<\/groupId>\n        <artifactId>tablesaw-core<\/artifactId>\n        <version>0.11.6<\/version>\n    <\/dependency>\n\nYou can also add a dependency for `tablesaw-plot` to use the plotting capability.\n\n* We also recommend trying Tablesaw inside [Jupyter notebooks](http://arogozhnikov.github.io/2016/09/10/jupyter-features.html), which lets you experiment with Tablesaw in a more interactive manner. Get started by [installing BeakerX](http://beakerx.com/documentation) and trying [the sample Tablesaw notebook](https://github.com/twosigma/beakerx/blob/master/doc/groovy/Tablesaw.ipynb)\n\n### Documentation and support:\n\n* Please see our documentation page: https://jtablesaw.github.io/tablesaw/ \n\n### Tablesaw features: \n\n#### Data processing & transformation\n* Import data from RDBMS and CSV files, local or remote (http, S3, etc.)\n* Combine files\n* Add and remove columns\n* Sort, Group, Filter \n* Map/Reduce operations\n\n#### Statistics \n* Descriptive stats: mean, min, max, median, sum, product, standard deviation, variance, percentiles, geometric mean, skewness, kurtosis, etc.\n\n#### Visualization\n* Scatter plots\n* Line plots\n* Vertical and Horizontal Bar charts\n* Histograms \n* Box plots\n* Quantile Plots\n* Pareto Charts\n\nHere's an example where we use [XChart](https://github.com/timmolter/XChart) to map the locations of tornadoes: \n![Alt text](https://jtablesaw.files.wordpress.com/2016/07/tornados3.png?w=809)\n\nIf you see something that can be improved, please let us know.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F1CC:29FD16:18372E:5E7639:6AB92B00"},"text_sha256":"9fb59a5610e6b6ae576c2efd6303088950226fd71d82e64165bfe8a9262b3b37"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2430","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:1833BC3:1C573C5:6AB92B02"},"commit":{"sha":"e36c3ff3c9e21026f4a04590a5319edfc27f5c84","url":"https://github.com/jtablesaw/tablesaw/commit/e36c3ff3c9e21026f4a04590a5319edfc27f5c84","date":"2026-03-02T01:13:00Z","author_date":"2026-03-02T01:13:00Z","committer_date":"2026-03-02T01:13:00Z","tree_sha":"362348d67d2a84d489f74bdf0cdbc97f960848c3","message_first_line":"Bump com.fasterxml.jackson.core:jackson-core from 2.19.0 to 2.21.1 (#1306)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2429","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:186137C:1C85230:6AB92B02"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7122,"blob_sha":"4c1ea720ed89b73898fe0e136e063910fbc7a060","priority":0}],"documents":[{"path":"README.md","size":7122,"blob_sha":"4c1ea720ed89b73898fe0e136e063910fbc7a060","priority":0,"status":200,"text":"Tablesaw\n=======\n\n[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/nebula-project-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3ebd154b5253466b932cb17dda737293)](https://www.codacy.com/gh/jtablesaw/tablesaw/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jtablesaw/tablesaw&amp;utm_campaign=Badge_Grade)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=jtablesaw_tablesaw&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=jtablesaw_tablesaw)\n\n### Overview\n\n__Tablesaw__ is a dataframe and visualization library that supports loading, cleaning, transforming, filtering, and summarizing data. If you work with data in Java, it may save you time and effort. Tablesaw also supports descriptive statistics and can be used to prepare data for working with machine learning libraries like Smile, Tribuo, H20.ai, DL4J.\n\n### Tablesaw features\n\n#### Data processing & transformation\n* Import data from RDBMS, Excel, CSV, TSV, JSON, HTML, or Fixed Width text files, whether they are local or remote (http, S3, etc.)\n* Export data to CSV, JSON, HTML or Fixed Width files.\n* Combine tables by appending or joining\n* Add and remove columns or rows\n* Sort, Group, Filter, Edit, Transpose, etc.\n* Map/Reduce operations\n* Handle missing values\n\n#### Visualization\n\nTablesaw supports data visualization by providing a wrapper for the Plot.ly JavaScript plotting library. Here are a few examples of the new library in action.\n\n| ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/box1.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/scatter_2_Yaxes.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/tornado.scatter.png) |\n| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/bush_time_series2.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/hist_overlay.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/histogram2.png) |\n| ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/histogram2d.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/pie.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/wine_bubble_3d.png) |\n| ![](https://jtablesaw.github.io/tablesaw/userguide/images/eda/wine_bubble_with_groups.png) | ![](https://jtablesaw.github.io/tablesaw/userguide/images/eda/robberies_area.png) | ![](https://jtablesaw.github.io/tablesaw/userguide/images/ml/regression/wins%20by%20year.png) |\n| ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/bush_heatmap1.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/tornado_bar_groups.png) | ![Tornadoes](https://jtablesaw.github.io/tablesaw/userguide/images/eda/ohlc1.png) |\n\n#### Statistics\n\n* Descriptive stats: mean, min, max, median, sum, product, standard deviation, variance, percentiles, geometric mean, skewness, kurtosis, etc.\n\n### Getting started\n\nAdd tablesaw-core to your project. You can find the version number for the latest release in the [release notes](https://github.com/jtablesaw/tablesaw/releases):\n\n```xml\n<dependency>\n    <groupId>tech.tablesaw<\/groupId>\n    <artifactId>tablesaw-core<\/artifactId>\n    <version>VERSION_NUMBER_GOES_HERE<\/version>\n<\/dependency>\n```\n\nYou may also add supporting projects:\n- `tablesaw-beakerx` - for using Tablesaw inside [BeakerX](http://beakerx.com/)\n- `tablesaw-excel` - for using Excel workbooks\n- `tablesaw-html` - for using HTML\n- `tablesaw-json` - for using JSON\n- `tablesaw-jsplot` - for creating charts\n\nExternal supporting projects - **outside of this organization**:\n- [tablesaw-parquet](https://github.com/tlabs-data/tablesaw-parquet) - for using the [Apache Parquet](https://parquet.apache.org/) file format with Tablesaw ([report issue](https://github.com/tlabs-data/tablesaw-parquet/issues))\n\n### Documentation and support\n\n* Start here:  https://jtablesaw.github.io/tablesaw/gettingstarted\n* Then see our documentation page: https://jtablesaw.github.io/tablesaw/ and the [Tablesaw User Guide](https://jtablesaw.github.io/tablesaw/userguide/toc).\n* Ask questions, make suggestions, or tell us how you're using Tablesaw in the new GitHub [discussions forum](https://github.com/jtablesaw/tablesaw/discussions). \n* Feature requests and bug reports can be made on the [issues tab](https://github.com/jtablesaw/tablesaw/issues).\n\n### Integrations\n\n#### Jupyter Notebooks\n\n* We recommend trying Tablesaw inside [Jupyter notebooks](http://arogozhnikov.github.io/2016/09/10/jupyter-features.html), which lets you experiment with Tablesaw in a more interactive manner. Get started by [installing BeakerX](http://beakerx.com/documentation) and trying [the sample Tablesaw notebook](https://github.com/twosigma/beakerx/blob/master/doc/groovy/Tablesaw.ipynb)\n* A second way to use Tablesaw inside [Jupyter notebooks](http://arogozhnikov.github.io/2016/09/10/jupyter-features.html) is with [IJava](https://github.com/SpencerPark/IJava), which has built-in support for Tablesaw. Gary Sharpe has written [an excellent tutorial](https://medium.com/@gmsharpe/java-jupyter-plotly-e1bbaa7f2be8) that shows you how to use Tablesaw plots. Gary has written a number of other tutorials that feature Tablesaw:\n  * [Tidy Data with Java & Jupyter](https://medium.com/@gmsharpe/tidy-data-with-java-jupyter-b1e131b37ab0)\n  * [Dataframes with Tablesaw — JSON](https://medium.com/@gmsharpe/dataframes-with-tablesaw-json-46dda9c8c217?source=your_stories_page----------------------------------------)\n  * [Dataframes with Tablesaw — CSV Files](https://medium.com/@gmsharpe/importing-data-with-tablesaw-part-1-csv-files-3ac6f135cf6f?source=your_stories_page----------------------------------------)\n* A third approach is to use [Google Colab](https://colab.research.google.com). Again, Gary Sharpe has an excellent tutorial:[Getting Started with Dataframes using Java and Google Colab](https://medium.com/@gmsharpe/getting-started-with-tablesaw-and-google-colab-65ef0cbe280c)\n\n#### Other integrations\n\n* Eclipse uses may find [etablesaw](https://github.com/hallvard/etablesaw) useful. It provides Eclipse integration aimed at turning Eclipse into a data workbench.   \n* You may utilize Tablesaw with many machine learning libraries. To see an example of using Tablesaw with [Smile](https://haifengl.github.io) check out [the sample Tablesaw Jupyter notebook](https://github.com/twosigma/beakerx/blob/master/doc/groovy/Tablesaw.ipynb)\n* You may use [quandl4j-tablesaw](http://quandl4j.org) if you'd like to load financial and economic data from [Quandl](https://www.quandl.com) into Tablesaw. This is demonstrated in [the sample Tablesaw notebook](https://github.com/twosigma/beakerx/blob/master/doc/groovy/Tablesaw.ipynb) as well\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"76D2:3A3DD:178C8C:5DCBD4:6AB92B02"},"text_sha256":"d9b347fc1253dcafd861893e0ea0e862015b9bdee657efe1b5390597b68af14d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jmschrei/pomegranate","input_row":{"repository":"jmschrei/pomegranate","url":"https://github.com/jmschrei/pomegranate","name":"pomegranate","owner":"jmschrei","description":"Fast, flexible and easy to use probabilistic modelling in Python.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3545,"issues":801,"created_at":"2014-11-24T18:36:58Z","updated_at":"2026-09-22T02:03:01Z","first_commit_at":"2014-11-24T08:03:43Z","last_commit_at":"2025-02-07T18:03:57Z","activity_months":122.48,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:07.305Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jmschrei/pomegranate","visibility":"public","created_at":"2014-11-24T18:36:58Z","updated_at":"2026-09-22T02:03:01Z","private":false,"fork":false,"archived":false,"stargazers_count":3545,"open_issues_count":44,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2428","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E4:B1202:179E996:1BC1D09:6AB92B03"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2427","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F8:2BC4E5:18226FD:1C46053:6AB92B03"},"commit":{"sha":"382d84dd46140fee90aba512680ce4f348eb9ae9","url":"https://github.com/jmschrei/pomegranate/commit/382d84dd46140fee90aba512680ce4f348eb9ae9","date":"2018-05-24T23:28:03Z","author_date":"2018-05-24T23:28:03Z","committer_date":"2018-05-24T23:28:03Z","tree_sha":"fdd6b1831e4008bb137853f3177e7cf3917ca68e","message_first_line":"Add test for hmm using gmm from_json (#447)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2426","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093C:180242:17F275E:1C161B6:6AB92B04"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6306,"blob_sha":"e667d826bb90b7af50d70fa6653f18db6ee4ce19","priority":0}],"documents":[{"path":"README.md","size":6306,"blob_sha":"e667d826bb90b7af50d70fa6653f18db6ee4ce19","priority":0,"status":200,"text":"<img src=\"https://github.com/jmschrei/pomegranate/blob/master/docs/logo/pomegranate-logo.png\" width=300>\n\n[![Build Status](https://travis-ci.org/jmschrei/pomegranate.svg?branch=master)](https://travis-ci.org/jmschrei/pomegranate) ![Build Status](https://ci.appveyor.com/api/projects/status/github/jmschrei/pomegranate?svg=True) [![Documentation Status](https://readthedocs.org/projects/pomegranate/badge/?version=latest)](http://pomegranate.readthedocs.io/en/latest/?badge=latest)\n\n*NOTE: pomegranate does not yet work with networkx 2.0. If you have problems, please downgrade networkx and try again.*\n\nA preprint of the pomegranate paper can be [found here](https://arxiv.org/pdf/1711.00137.pdf). Please consider citing it if you used it in your academic work.\n\npomegranate is a package for probabilistic and graphical models for Python, implemented in cython for speed. It grew out of the [YAHMM](https://github.com/jmschrei/yahmm) package, where many of the components used could be rearranged to do other cool things. It currently supports:\n\n* Probability Distributions\n* General Mixture Models\n* Hidden Markov Models\n* Naive Bayes\n* Bayes Classifiers\n* Markov Chains\n* Discrete Bayesian Networks\n\nTo support the above algorithms, it has efficient implementations of the following:\n\n* Kmeans\n* Factor Graphs\n\nSee the tutorial below, or the more in depth tutorials in the `tutorials` folder with examples in IPython notebooks. See [the website](http://pomegranate.readthedocs.org/en/latest/) for further information.\n\nNo good project is done alone, and so I'd like to thank all the previous contributors to YAHMM, and all the current contributors to pomegranate, including the graduate students who share my office I annoy on a regular basis by bouncing ideas off of.\n## Installation\n\n### Dependencies\n\npomegranate requires:\n\n```\n- Cython (only if building from source)\n- NumPy\n- SciPy\n- NetworkX\n- joblib\n```\n\nTo run the tests, you also must have `nose` installed.\n\n### User Installation\n\npomegranate is now pip installable! Install using\n\n```\npip install pomegranate\n```\n\nPomegranate can also be installed with conda, using\n\n```\nconda install pomegranate\n```\n\nWheels have been built for Windows versions for quick installations without the need for a C++ compiler.\n\n**NOTE: If you are on OSX and python 2.7 you may encounter an error using pip on versions above 0.7.3. Please install those versions from GitHub or use 0.7.3.**\n\nYou can get the bleeding edge from GitHub using the following:\n\n```\npip install git+https://github.com/jmschrei/pomegranate.git\n```\n\nOr:\n\n```\ngit clone https://github.com/jmschrei/pomegranate.git\ncd pomegranate\npython setup.py install\n```\n\nLastly, you can also download the zip and manually move the files into your site-packages folder (or your PYTHON_PATH, if you've changed it).\n\nTo build from source on Windows machines, you may need to download a C++ compiler. For Python 2 this minimal version of Visual Studio 2008 works well: https://www.microsoft.com/en-us/download/details.aspx?id=44266. For Python 3 this version of the Visual Studio Build Tools has been reported to work: http://go.microsoft.com/fwlink/?LinkId=691126.\n\nIf those do no work, it has been suggested that https://wiki.python.org/moin/WindowsCompilers may provide more information. Note that your compiler version must fit your python version. Run python --version to tell which python version you use. Don't forget to select the appropriate Windows version API you'd like to use. If you get an error message \"ValueError: Unknown MS Compiler version 1900\" remove your Python's Lib/distutils/distutil.cfg and retry. See http://stackoverflow.com/questions/34135280/valueerror-unknown-ms-compiler-version-1900 for details.\n\nSome users with python 3.6 have reported getting the following error after download: `ModuleNotFoundError: No module named 'pomegranate.utils'`. A reported solution is to uninstall and reinstall without cached files using the following:\n\n```\npip uninstall pomegranate\npip install pomegranate --no-cache-dir\n```\n\nIf that doesn't work for you, you may need to downgrade your version of numpy to 1.11.3 and try the above again.\n\nSome users on Macs have seen the following error when downloading: `MarkovChain.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00`. This can be fixed by removing the `.so` files from the pomegranate installation or by building pomegranate from source.\n\nIf you have identified any other issues, please report them on the issue tracker.\n\n#### Installing on Fedora Release 25 onwards\n\n**Installing on root path for all users**\n\nInstall dependencies and pomegranate via pip3:\n\n```\n$ sudo dnf install -y python3-virtualenv python3-scipy python3-numpy python3-networkx python3-Cython\n$ sudo pip3 install --no-cache-dir pomegranate\n```\n\n**Installing inside a virtualenv**\n\nInstall dependencies, create a virtualenv and install pomegranate via pip3:\n\n```\n$ sudo dnf install -y python3-virtualenv python3-scipy python3-numpy python3-networkx python3-Cython\n$ virtualenv env3 --python=python3.5 --system-site-packages\n$ source env3/bin/activate\n(env3) $ pip3 install wheel nose cython numpy scipy networkx\n(env3) $ pip3 install --no-cache-dir pomegranate\n```\n\n### Verifying the installation\n\nOur setup is done, so now we can check that pomegranate is ready to use:\n\n```\n$ python -c 'from pomegranate import *; print(NormalDistribution(0, 1).probability(0))'\n0.398942280402\n```\n\n\nIf you don't see the output above, or any other error is encountered, please feel free to file an [issue](https://github.com/jmschrei/pomegranate/issues).\n\n## Contributing\n\nIf you would like to contribute a feature then fork the master branch (fork the release if you are fixing a bug). Be sure to run the tests before changing any code. You'll need to have [nosetests](https://github.com/nose-devs/nose) installed. The following command will run all the tests:\n```\npython setup.py test\n```\nLet us know what you want to do just in case we're already working on an implementation of something similar. This way we can avoid any needless duplication of effort. Also, please don't forget to add tests for any new functions.\n\n## Tutorial\n\nPlease take a look at the tutorials folder, which includes several tutorials on how to effectively use pomegranate!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9470:3AC5A:17E9E2:5E290E:6AB92AFA"},"text_sha256":"2e7c69e8c77dd74e9c0cd58fba2c798ecc79c05f38c1f75573c611cc21a961e8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2425","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:17F1FDA:1C15E28:6AB92B04"},"commit":{"sha":"e9162731f4f109b7b17ecffde768734cacdb839b","url":"https://github.com/jmschrei/pomegranate/commit/e9162731f4f109b7b17ecffde768734cacdb839b","date":"2025-02-07T18:03:57Z","author_date":"2025-02-07T18:03:57Z","committer_date":"2025-02-07T18:03:57Z","tree_sha":"aedb06c062c5a9d6de50bafe367e7f6e4a98e8c6","message_first_line":"FIX license"},"tree_request_status":200,"tree_rate":{"github_remaining":"2424","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17B6F29:1BDADD6:6AB92B05"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13504,"blob_sha":"d474782e655afa7a7bc87456e353036304f8f8b5","priority":0}],"documents":[{"path":"README.md","size":13504,"blob_sha":"d474782e655afa7a7bc87456e353036304f8f8b5","priority":0,"status":200,"text":"<img src=\"https://github.com/jmschrei/pomegranate/blob/master/docs/logo/pomegranate-logo.png\" width=300>\n\n[![Downloads](https://pepy.tech/badge/pomegranate)](https://pepy.tech/project/pomegranate) ![](https://github.com/jmschrei/pomegranate/actions/workflows/python-package.yml/badge.svg) ![](https://readthedocs.org/projects/pomegranate/badge/?version=latest)\n\n> **Note**\n> IMPORTANT: pomegranate v1.0.0 is a ground-up rewrite of pomegranate using PyTorch as the computational backend instead of Cython. Although the same functionality is supported, the API is significantly different. Please see the tutorials and examples folders for help rewriting your code.\n\n[ReadTheDocs](https://pomegranate.readthedocs.io/en/latest/) | [Tutorials](https://github.com/jmschrei/pomegranate/tree/master/docs/tutorials) | [Examples](https://github.com/jmschrei/pomegranate/tree/master/examples) \n\npomegranate is a library for probabilistic modeling defined by its modular implementation and treatment of all models as the probability distributions they are. The modular implementation allows one to easily drop normal distributions into a mixture model to create a Gaussian mixture model just as easily as dropping a gamma and a Poisson distribution into a mixture model to create a heterogeneous mixture. But that's not all! Because each model is treated as a probability distribution, Bayesian networks can be dropped into a mixture just as easily as a normal distribution, and hidden Markov models can be dropped into Bayes classifiers to make a classifier over sequences. Together, these two design choices enable a flexibility not seen in any other probabilistic modeling package.\n\nRecently, pomegranate (v1.0.0) was rewritten from the ground up using PyTorch to replace the outdated Cython backend. This rewrite gave me an opportunity to fix many bad design choices that I made as a bb software engineer. Unfortunately, many of these changes are not backwards compatible and will disrupt workflows. On the flip side, these changes have significantly sped up most methods, improved and simplified the code, fixed many issues raised by the community over the years, and made it significantly easier to contribute. I've written more below, but you're likely here now because your code is broken and this is the tl;dr.\n\nSpecial shout-out to [NumFOCUS](https://numfocus.org/) for supporting this work with a special development grant.\n\n### Installation\n\n`pip install pomegranate`\n\nIf you need the last Cython release before the rewrite, use `pip install pomegranate==0.14.8`. You may need to manually install a version of Cython before v3.\n\n### Why a Rewrite?\n\nThis rewrite was motivated by four main reasons:\n\n- <b>Speed<\/b>: Native PyTorch is usually significantly faster than the hand-tuned Cython code that I wrote.\n- <b>Features<\/b>: PyTorch has many features, such as serialization, mixed precision, and GPU support, that can now be directly used in pomegranate without additional work on my end. \n- <b>Community Contribution<\/b>: A challenge that many people faced when using pomegranate was that they could not modify or extend it because they did not know Cython. Even if they did know Cython, coding in it is a pain that I felt each time I tried adding a new feature or fixing a bug or releasing a new version. Using PyTorch as the backend significantly reduces the amount of effort needed to add in new features.\n- <b>Interoperability<\/b>: Libraries like PyTorch offer an invaluable opportunity to not just utilize their computational backends but to better integrate into existing resources and communities. This rewrite will make it easier for people to integrate probabilistic models with neural networks as losses, constraints, and structural regularizations, as well as with other projects built on PyTorch.\n\n### High-level Changes \n\n1. General\n- The entire codebase has been rewritten in PyTorch and all models are instances of `torch.nn.Module`\n- This codebase is checked by a comprehensive suite of >800 unit tests calling assert statements several thousand times, much more than previous versions.\n- Installation issues are now likely to come from PyTorch for which there are countless resources to help out.\n\n2. Features\n- All models now have GPU support\n- All models now have support for half/mixed precision\n- Serialization is now handled by PyTorch, yielding more compact and efficient I/O\n- Missing values are now supported through `torch.masked.MaskedTensor` objects\n- Prior probabilities can now be passed to all relevant models and methods and enable more comprehensive/flexible semi-supervised learning than before\n\n3. Models\n- All distributions are now multivariate by default and treat each feature independently (except Normal)\n- \"Distribution\" has been removed from names so that, for example, `NormalDistribution` is now `Normal`\n- `FactorGraph` is now supported as first-class citizens, with all the prediction and training methods\n- Hidden Markov models have been split into `DenseHMM` and `SparseHMM` models which differ in how the transition matrix is encoded, with `DenseHMM` objects being significantly faster on truly dense graphs\n\n4. Differences\n- `NaiveBayes` has been permanently removed as it is redundant with `BayesClassifier`\n- `MarkovNetwork` has not yet been implemented\n- Constraint graphs and constrained structure learning for Bayesian networks has not yet been implemented\n- Silent states for hidden Markov models have not yet been implemented\n- Viterbi for hidden Markov models has not yet been implemented\n\n## Speed\n\nMost models and methods in pomegranate v1.0.0 are faster than their counterparts in earlier versions. This generally scales by complexity, where one sees only small speedups for simple distributions on small data sets but much larger speedups for more complex models on big data sets, e.g. hidden Markov model training or Bayesian network inference. The notable exception for now is that Bayesian network structure learning, other than Chow-Liu tree building, is still incomplete and not much faster. In the examples below, `torchegranate` refers to the temporarily repository used to develop pomegranate v1.0.0 and `pomegranate` refers to pomegranate v0.14.8.\n\n### K-Means\n\nWho knows what's happening here? Wild.\n\n![image](https://user-images.githubusercontent.com/3916816/232371843-66b9d326-b4de-4da0-bbb1-5eab5f9a4492.png)\n\n\n### Hidden Markov Models\n\nDense transition matrix (CPU)\n\n![image](https://user-images.githubusercontent.com/3916816/232370752-58969609-5ee4-417f-a0da-1fbb83763d63.png)\n\nSparse transition matrix (CPU)\n\n![image](https://user-images.githubusercontent.com/3916816/232371006-20a82e07-3553-4257-987b-d8e9b333933a.png)\n\nTraining a 125 node model with a dense transition matrix\n\n![image](https://user-images.githubusercontent.com/3916816/232394045-e9a13fd6-19b3-4e78-80ce-734b383157a6.png)\n\n\n### Bayesian Networks\n![image](https://user-images.githubusercontent.com/3916816/232370594-e89e66a8-d9d9-4369-ba64-8902d8ec2fcc.png) \n![image](https://user-images.githubusercontent.com/3916816/232370632-199d5e99-0cd5-415e-9c72-c4ec9fb7a44c.png)\n\n\n## Features\n\n> **Note**\n> Please see the [tutorials](https://github.com/jmschrei/pomegranate/tree/master/docs/tutorials) folder for code examples.\n\nSwitching from a Cython backend to a PyTorch backend has enabled or expanded a large number of features. Because the rewrite is a thin wrapper over PyTorch, as new features get released for PyTorch they can be applied to pomegranate models without the need for a new release from me. \n\n### GPU Support\n\nAll distributions and methods in pomegranate now have GPU support. Because each distribution is a `torch.nn.Module` object, the use is identical to other code written in PyTorch. This means that both the model and the data have to be moved to the GPU by the user. For instance:\n\n```python\n>>> X = torch.exp(torch.randn(50, 4))\n\n# Will execute on the CPU\n>>> d = Exponential().fit(X)\n>>> d.scales\nParameter containing:\ntensor([1.8627, 1.3132, 1.7187, 1.4957])\n\n# Will execute on a GPU\n>>> d = Exponential().cuda().fit(X.cuda())\n>>> d.scales\nParameter containing:\ntensor([1.8627, 1.3132, 1.7187, 1.4957], device='cuda:0')\n```\n\nLikewise, all models are distributions, and so can be used on the GPU similarly. When a model is moved to the GPU, all of the models associated with it (e.g. distributions) are also moved to the GPU.\n\n```python\n>>> X = torch.exp(torch.randn(50, 4)).cuda()\n>>> model = GeneralMixtureModel([Exponential(), Exponential()]).cuda()\n>>> model.fit(X)\n[1] Improvement: 1.26068115234375, Time: 0.001134s\n[2] Improvement: 0.168121337890625, Time: 0.001097s\n[3] Improvement: 0.037841796875, Time: 0.001095s\n>>> model.distributions[0].scales\nParameter containing:\n>>> model.distributions[1].scales\ntensor([0.9141, 1.0835, 2.7503, 2.2475], device='cuda:0')\nParameter containing:\ntensor([1.9902, 2.3871, 0.8984, 1.2215], device='cuda:0')\n```\n\n### Mixed Precision\n\npomegranate models can, in theory, operate in the same mixed or low-precision regimes as other PyTorch modules. However, because pomegranate uses more complex operations than most neural networks, this sometimes does not work or help in practice because these operations have not been optimized or implemented in the low-precision regime. So, hopefully this feature will become more useful over time.\n\n```python\n>>> X = torch.randn(100, 4)\n>>> d = Normal(covariance_type='diag')\n>>>\n>>> with torch.autocast('cuda', dtype=torch.bfloat16):\n>>>     d.fit(X)\n```\n\n### Serialization\n\npomegranate distributions are all instances of `torch.nn.Module` and so serialization is the same as any other PyTorch model.\n\nSaving:\n```python\n>>> X = torch.exp(torch.randn(50, 4)).cuda()\n>>> model = GeneralMixtureModel([Exponential(), Exponential()], verbose=True)\n>>> model.cuda()\n>>> model.fit(X)\n>>> torch.save(model, \"test.torch\")\n```\n\nLoading:\n```python\n>>> model = torch.load(\"test.torch\")\n```\n\n### torch.compile\n\n> **Note**\n> `torch.compile` is under active development by the PyTorch team and may rapidly improve. For now, you may need to pass in `check_data=False` when initializing models to avoid one compatibility issue.\n\nIn PyTorch v2.0.0, `torch.compile` was introduced as a flexible wrapper around tools that would fuse operations together, use CUDA graphs, and generally try to remove I/O bottlenecks in GPU execution. Because these bottlenecks can be extremely significant in the small-to-medium sized data settings many pomegranate users are faced with, `torch.compile` seems like it will be extremely valuable. Rather than targeting entire models, which mostly just compiles the `forward` method, you should compile individual methods from your objects.\n\n```python\n# Create your object as normal\n>>> mu = torch.exp(torch.randn(100))\n>>> d = Exponential(mu).cuda()\n\n# Create some data\n>>> X = torch.exp(torch.randn(1000, 100))\n>>> d.log_probability(X)\n\n# Compile the `log_probability` method!\n>>> d.log_probability = torch.compile(d.log_probability, mode='reduce-overhead', fullgraph=True)\n>>> d.log_probability(X)\n```\n\nUnfortunately, I have had difficulty getting `torch.compile` to work when methods are called in a nested manner, e.g., when compiling the `predict` method for a mixture model which, inside it, calls the `log_probability` method of each distribution. I have tried to organize the code in a manner that avoids some of these errors, but because the error messages right now are opaque I have had some difficulty.\n\n### Missing Values\n\npomegranate supports handling data with missing values through `torch.masked.MaskedTensor` objects. Simply, one needs to just put a mask over the values that are missing.\n\n```python\n>>> X = <your tensor with NaN for the missing values>\n>>> mask = ~torch.isnan(X)\n>>> X_masked = torch.masked.MaskedTensor(X, mask=mask)\n>>> d = Normal(covariance_type='diag').fit(X_masked)\n>>> d.means\nParameter containing:\ntensor([0.2271, 0.0290, 0.0763, 0.0135])\n```\n\nAll algorithms currently treat missingness as something to ignore. As an example, when calculating the mean of a column with missing values, the mean will simply be the average value of the present values. Missing values are not imputed because improper imputation can bias your data, produce unlikely estimates which distort distributions, and also shrink the variance.\n\nBecause not all operations are yet available for MaskedTensors, the following distributions are not yet supported for missing values: Bernoulli, categorical, normal with full covariance, uniform\n\n### Prior Probabilities and Semi-supervised Learning\n\nA new feature in pomegranate v1.0.0 is being able to pass in prior probabilities for each observation for mixture models, Bayes classifiers, and hidden Markov models. These are the prior probability that an observation belongs to a component of the model before evaluating the likelihood and should range between 0 and 1. When these values include a 1.0 for an observation, it is treated as a label, because the likelihood no longer matters in terms of assigning that observation to a state. Hence, one can use these prior probabilities to do labeled training when each observation has a 1.0 for some state, semi-supervised learning when a subset of observations (including when sequences are only partially labeled for hidden Markov models), or more sophisticated forms of weighting when the values are between 0 and 1. \n\n![image](https://user-images.githubusercontent.com/3916816/232373036-39d591e2-e673-450e-ab1c-98e47f0fa6aa.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E30E:3B6DE:1762D5:5DA1A5:6AB92B05"},"text_sha256":"0aca538597692e60f97b6e66d5c905ab8db8b735f469d40da15e17dcff4652df"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mne-tools/mne-python","input_row":{"repository":"mne-tools/mne-python","url":"https://github.com/mne-tools/mne-python","name":"mne-python","owner":"mne-tools","description":"MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":3528,"issues":5215,"created_at":"2011-01-28T03:31:13Z","updated_at":"2026-09-26T23:43:16Z","first_commit_at":"2010-12-27T00:43:04Z","last_commit_at":"2026-09-26T23:43:04Z","activity_months":188.99000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:09.878Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mne-tools/mne-python","visibility":"public","created_at":"2011-01-28T03:31:13Z","updated_at":"2026-09-26T23:43:16Z","private":false,"fork":false,"archived":false,"stargazers_count":3528,"open_issues_count":616,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2423","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:1794D9C:1BB87B7:6AB92B05"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2422","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087B:2EA1B4:17D66BB:1BFA678:6AB92B06"},"commit":{"sha":"45898628a416691a89a8d48ca38860298cfb58fc","url":"https://github.com/mne-tools/mne-python/commit/45898628a416691a89a8d48ca38860298cfb58fc","date":"2018-05-23T19:14:56Z","author_date":"2018-05-23T19:14:56Z","committer_date":"2018-05-23T19:14:56Z","tree_sha":"39fb4f178dd061cbedf4c29561d0ae2c0f52bbcd","message_first_line":"FIX: Fix mgh70 montage (#5228)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2421","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082D:725A9:17DA259:1BFE305:6AB92B06"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4898,"blob_sha":"9cbbbe1431859c2bcb34147a6a5273e9f78084b6","priority":0}],"documents":[{"path":"README.rst","size":4898,"blob_sha":"9cbbbe1431859c2bcb34147a6a5273e9f78084b6","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n\n|Travis|_ |Appveyor|_ |Circle|_ |Codecov|_ |Zenodo|_\n\n|MNE|_\n\n.. |Travis| image:: https://api.travis-ci.org/mne-tools/mne-python.png?branch=master\n.. _Travis: https://travis-ci.org/mne-tools/mne-python\n\n.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/7isroetnxsp7hgxv/branch/master?svg=true\n.. _Appveyor: https://ci.appveyor.com/project/mne-tools/mne-python/branch/master\n\n.. |Circle| image:: https://circleci.com/gh/mne-tools/mne-python.svg?style=svg\n.. _Circle: https://circleci.com/gh/mne-tools/mne-python\n\n.. |Codecov| image:: https://codecov.io/gh/mne-tools/mne-python/branch/master/graph/badge.svg\n.. _Codecov: https://codecov.io/gh/mne-tools/mne-python\n\n.. |Zenodo| image:: https://zenodo.org/badge/5822/mne-tools/mne-python.svg\n.. _Zenodo: https://zenodo.org/badge/latestdoi/5822/mne-tools/mne-python\n\n.. |MNE| image:: https://martinos.org/mne/stable/_static/mne_logo.png\n.. _MNE: https://martinos.org/mne\n\nMNE-Python\n==========\n\n`MNE-Python software`_ is an open-source Python package for exploring,\nvisualizing, and analyzing human neurophysiological data such as MEG, EEG, sEEG,\nECoG, and more. It includes modules for data input/output, preprocessing,\nvisualization, source estimation, time-frequency analysis, connectivity analysis,\nmachine learning, and statistics.\n\n\nDocumentation\n^^^^^^^^^^^^^\n\n`MNE documentation`_ for MNE-Python is available online.\n\n\nGet the latest code\n^^^^^^^^^^^^^^^^^^^\n\nTo get the latest code using `git <https://git-scm.com/>`_, open a terminal and type:\n\n.. code-block:: bash\n\n    git clone git://github.com/mne-tools/mne-python.git\n\nAlternatively, you can also download a\n`zip file of the latest development version <https://github.com/mne-tools/mne-python/archive/master.zip>`_.\n\n\nInstalling MNE-Python\n^^^^^^^^^^^^^^^^^^^^^\n\nTo install the latest stable version of MNE-Python, you can use `pip <https://pip.pypa.io/en/stable/>`_ in a terminal:\n\n.. code-block:: bash\n\n    pip install -U mne\n\nFor more complete instructions and more advanced installation methods (e.g. for\nthe latest development version), see the `getting started page`_.\n\n\nDependencies\n^^^^^^^^^^^^\n\nThe minimum required dependencies to run MNE-Python are:\n\n- Python >= 2.7\n- NumPy >= 1.8\n- SciPy >= 0.12\n- Matplotlib >= 1.3\n\nFor full functionality, some functions require:\n\n- Scikit-learn >= 0.15 (>= 0.18 recommended)\n- NiBabel >= 2.1.0\n- Pandas >= 0.13\n- Picard >= 0.3\n\nTo use `NVIDIA CUDA <https://developer.nvidia.com/cuda-zone>`_ for resampling\nand FFT FIR filtering, you will also need to install the NVIDIA CUDA SDK,\npycuda, and scikit-cuda (see the `getting started page`_\nfor more information).\n\n\nContributing to MNE-Python\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nPlease see the documentation on the MNE-Python homepage:\n\nhttps://martinos.org/mne/contributing.html\n\n\nMailing list\n^^^^^^^^^^^^\n\nhttp://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis\n\n\nLicensing\n^^^^^^^^^\n\nMNE-Python is **BSD-licenced** (3 clause):\n\n    This software is OSI Certified Open Source Software.\n    OSI Certified is a certification mark of the Open Source Initiative.\n\n    Copyright (c) 2011-2017, authors of MNE-Python.\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n\n    * Neither the names of MNE-Python authors nor the names of any\n      contributors may be used to endorse or promote products derived from\n      this software without specific prior written permission.\n\n    **This software is provided by the copyright holders and contributors\n    \"as is\" and any express or implied warranties, including, but not\n    limited to, the implied warranties of merchantability and fitness for\n    a particular purpose are disclaimed. In no event shall the copyright\n    owner or contributors be liable for any direct, indirect, incidental,\n    special, exemplary, or consequential damages (including, but not\n    limited to, procurement of substitute goods or services; loss of use,\n    data, or profits; or business interruption) however caused and on any\n    theory of liability, whether in contract, strict liability, or tort\n    (including negligence or otherwise) arising in any way out of the use\n    of this software, even if advised of the possibility of such\n    damage.**\n\n\n.. _MNE-Python software: https://martinos.org/mne\n.. _MNE documentation: http://martinos.org/mne/documentation.html\n.. _getting started page: https://martinos.org/mne/getting_started.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9310:1F1FB6:17CFB4:5E0EC6:6AB92B05"},"text_sha256":"3656550d4d72f73356549249bff104874f2e6af881c15a31ff025dbdfdc9688f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2420","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17E2AB8:1C065CC:6AB92B07"},"commit":{"sha":"46d1f6b2022ee3b29a857056023d194a9fe7af84","url":"https://github.com/mne-tools/mne-python/commit/46d1f6b2022ee3b29a857056023d194a9fe7af84","date":"2026-06-30T20:16:52Z","author_date":"2026-06-30T20:16:52Z","committer_date":"2026-06-30T20:16:52Z","tree_sha":"19ae79541d1130e94cb9aeb1e0543551ddb03fb4","message_first_line":"MAINT: Replace `defusedxml` with `mffpy` in `_get_gains` and remove `_extract` (#14007)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2419","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0890:74E6D:1803CA0:1C27D62:6AB92B08"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4544,"blob_sha":"122dfb84c244c0133cd1a51303932b3bd80cc491","priority":0},{"path":"SECURITY.md","size":1342,"blob_sha":"73be20a6c4770f7152119d5f5e71ab06136838ba","priority":1}],"documents":[{"path":"README.rst","size":4544,"blob_sha":"122dfb84c244c0133cd1a51303932b3bd80cc491","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\n|MNE|\n\nMNE-Python\n==========\n\nMNE-Python is an open-source Python package for exploring,\nvisualizing, and analyzing human neurophysiological data such as MEG, EEG, sEEG,\nECoG, and more. It includes modules for data input/output, preprocessing,\nvisualization, source estimation, time-frequency analysis, connectivity analysis,\nmachine learning, statistics, and more.\n\n\nDocumentation\n^^^^^^^^^^^^^\n\n`Documentation`_ for MNE-Python encompasses installation instructions, tutorials,\nand examples for a wide variety of topics, contributing guidelines, and an API\nreference.\n\n\nForum\n^^^^^^\n\nThe `user forum`_ is the best place to ask questions about MNE-Python usage or\nthe contribution process. The forum also features job opportunities and other\nannouncements.\n\nIf you find a bug or have an idea for a new feature that should be added to\nMNE-Python, please use the\n`issue tracker <https://github.com/mne-tools/mne-python/issues/new/choose>`__ of\nour GitHub repository.\n\n\nInstallation\n^^^^^^^^^^^^\n\nTo install the latest stable version of MNE-Python with minimal dependencies\nonly, use pip_ in a terminal:\n\n.. code-block:: console\n\n    $ pip install --upgrade mne\n\nFor more complete instructions, including our standalone installers and more\nadvanced installation methods, please refer to the `installation guide`_.\n\n\nGet the development version\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo install the latest development version of MNE-Python using pip_, open a\nterminal and type:\n\n.. code-block:: console\n\n    $ pip install --upgrade https://github.com/mne-tools/mne-python/archive/refs/heads/main.zip\n\nTo clone the repository with `git <https://git-scm.com/>`__, open a terminal\nand type:\n\n.. code-block:: console\n\n    $ git clone https://github.com/mne-tools/mne-python.git\n\n\nDependencies\n^^^^^^^^^^^^\n\nThe minimum required dependencies to run MNE-Python are:\n\n.. ↓↓↓ BEGIN CORE DEPS LIST. DO NOT EDIT! HANDLED BY PRE-COMMIT HOOK ↓↓↓\n\n- `Python <https://www.python.org>`__ ≥ 3.10\n- `NumPy <https://numpy.org>`__ ≥ 1.26\n- `SciPy <https://scipy.org>`__ ≥ 1.13\n- `Matplotlib <https://matplotlib.org>`__ ≥ 3.9\n- `Pooch <https://www.fatiando.org/pooch/latest/>`__ ≥ 1.5\n- `tqdm <https://tqdm.github.io>`__ ≥ 4.66\n- `Jinja2 <https://palletsprojects.com/p/jinja/>`__ ≥ 3.1\n- `decorator <https://github.com/micheles/decorator>`__ ≥ 5.1\n- `lazy-loader <https://pypi.org/project/lazy_loader>`__ ≥ 0.3\n- `packaging <https://packaging.pypa.io/en/stable/>`__\n\n.. ↑↑↑ END CORE DEPS LIST. DO NOT EDIT! HANDLED BY PRE-COMMIT HOOK ↑↑↑\n\nContributing\n^^^^^^^^^^^^\n\nPlease see the `contributing guidelines <https://mne.tools/dev/development/contributing.html>`__ on our documentation website.\n\n\nAbout\n^^^^^\n\n+---------+------------+----------------+\n| CI      | |Codecov|  | |Bandit|       |\n+---------+------------+----------------+\n| Package | |PyPI|     | |conda-forge|  |\n+---------+------------+----------------+\n| Docs    | |Docs|     | |Discourse|    |\n+---------+------------+----------------+\n| Meta    | |Zenodo|   | |OpenSSF|      |\n+---------+------------+----------------+\n\n\nLicense\n^^^^^^^\n\nMNE-Python is licensed under the BSD-3-Clause license.\n\n\n.. _Documentation: https://mne.tools/dev/\n.. _user forum: https://mne.discourse.group\n.. _installation guide: https://mne.tools/dev/install/index.html\n.. _pip: https://pip.pypa.io/en/stable/\n\n.. |PyPI| image:: https://img.shields.io/pypi/dm/mne.svg?label=PyPI\n   :target: https://pypi.org/project/mne/\n\n.. |conda-forge| image:: https://img.shields.io/conda/dn/conda-forge/mne.svg?label=Conda\n   :target: https://anaconda.org/conda-forge/mne\n\n.. |Docs| image:: https://img.shields.io/badge/Docs-online-green?label=Documentation\n   :target: https://mne.tools/dev/\n\n.. |Zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592483.svg\n   :target: https://doi.org/10.5281/zenodo.592483\n\n.. |Discourse| image:: https://img.shields.io/discourse/status?label=Forum&server=https%3A%2F%2Fmne.discourse.group%2F\n   :target: https://mne.discourse.group/\n\n.. |Codecov| image:: https://img.shields.io/codecov/c/github/mne-tools/mne-python?label=Coverage\n   :target: https://codecov.io/gh/mne-tools/mne-python\n\n.. |Bandit| image:: https://img.shields.io/badge/Security-Bandit-yellow.svg\n   :target: https://github.com/PyCQA/bandit\n\n.. |OpenSSF| image:: https://www.bestpractices.dev/projects/7783/badge\n   :target: https://www.bestpractices.dev/projects/7783\n\n.. |MNE| image:: https://mne.tools/dev/_static/mne_logo_gray.svg\n   :target: https://mne.tools/dev/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"926C:3CC8A:17D2C9:5E1340:6AB92B06"},"text_sha256":"6c250f9f98511fa972c821bc4be0b62d880dc10650bb48540bd1f0c43224592e"},{"path":"SECURITY.md","size":1342,"blob_sha":"73be20a6c4770f7152119d5f5e71ab06136838ba","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nNew minor versions of MNE-Python are typically released twice per year.\nOnly the most current stable release is officially supported.\nThe unreleased, unstable \"dev version\" is also supported, though users\nshould beware that the API of the dev version is subject to change\nwithout a proper 6-month deprecation cycle.\n\n| Version | Supported                |\n| ------- | ------------------------ |\n| 1.13.x  | :heavy_check_mark: (dev) |\n| 1.12.x  | :heavy_check_mark:       |\n| < 1.12  | :x:                      |\n\n## Reporting a Vulnerability\n\nMNE-Python is software for analysis and visualization of brain activity\nrecorded with a variety of devices/modalities (EEG, MEG, ECoG, fNIRS, etc).\nIt is not expected that using MNE-Python will lead to security\nvulnerabilities under normal use cases (i.e., running without administrator\nprivileges). However, if you think you have found a security vulnerability\nin MNE-Python, **please do not report it as a GitHub issue**, in order to\nkeep the vulnerability confidential. Instead, please report it to\nmne-core-dev-team@groups.io and include a description and proof-of-concept\nthat is [short and self-contained](http://www.sscce.org/).\n\nGenerally you will receive a response within one week. MNE-Python does not\naward bounties for security vulnerabilities.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0F2:40B0C:17D6B6:5E1721:6AB92B07"},"text_sha256":"87ef07c8c9d77795a001f00efa88e94afeb6673fafdf3377b53ff296b478c9a4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorflow/hub","input_row":{"repository":"tensorflow/hub","url":"https://github.com/tensorflow/hub","name":"hub","owner":"tensorflow","description":"A library for transfer learning by reusing parts of TensorFlow models.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3528,"issues":717,"created_at":"2018-03-12T07:55:42Z","updated_at":"2026-09-24T19:55:24Z","first_commit_at":"2018-03-14T10:36:05Z","last_commit_at":"2025-01-17T12:09:38Z","activity_months":82.159999999999997,"ai_ml_match_topics":"machine-learning; image-classification","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:14.230Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorflow/hub","visibility":"public","created_at":"2018-03-12T07:55:42Z","updated_at":"2026-09-24T19:55:24Z","private":false,"fork":false,"archived":false,"stargazers_count":3528,"open_issues_count":5,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2418","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0846:72727:17AB3D9:1BCEFE7:6AB92B0A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2417","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17D30F6:1BF6ABF:6AB92B0A"},"commit":{"sha":"b94eb2bc236f486ae2cea51d22e43733c9c8967d","url":"https://github.com/tensorflow/hub/commit/b94eb2bc236f486ae2cea51d22e43733c9c8967d","date":"2018-05-24T13:25:48Z","author_date":"2018-05-24T13:09:12Z","committer_date":"2018-05-24T13:25:48Z","tree_sha":"b2b02791862b9dec0059a997ee6f9f144a68e8ef","message_first_line":"Cast uploaded.keys() to list before indexing in an example"},"tree_request_status":200,"tree_rate":{"github_remaining":"2416","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17D69F8:1BFAA54:6AB92B0B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2419,"blob_sha":"26f16005c2d5327b22f1f8ee7ec7a01389736281","priority":0}],"documents":[{"path":"README.md","size":2419,"blob_sha":"26f16005c2d5327b22f1f8ee7ec7a01389736281","priority":0,"status":200,"text":"<!-- Copyright 2018 The TensorFlow Hub Authors. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n==============================================================================-->\n\n# TensorFlow Hub\n\nTensorFlow Hub is a library to foster the publication, discovery, and\nconsumption of reusable parts of machine learning models. In particular,\nit provides **modules**, which are pre-trained pieces of TensorFlow models\nthat can be reused on new tasks.\n\n\n## Getting Started\n\n*   [Introduction](docs/index.md)\n*   [Installation](docs/installation.md)\n*   Tutorials:\n    *   [Image Retraining](https://www.tensorflow.org/tutorials/image_retraining)\n    *   [Text Classification](https://www.tensorflow.org/tutorials/text_classification_with_tf_hub)\n    *   [Additional Examples](examples/README.md)\n*   Key Concepts:\n    *   [Using a Module](docs/basics.md)\n    *   [Creating a New Module](docs/creating.md)\n    *   [Fine-Tuning a Module](docs/fine_tuning.md)\n*   Modules:\n    *   [Available Modules](docs/modules/index.md) -- quick links:\n        [image](docs/modules/image.md), [text](docs/modules/text.md),\n        [other](docs/modules/other.md)\n    *   [Common Signatures for Modules](docs/common_signatures/index.md)\n\n\n## Contributing\n\nIf you'd like to contribute to TensorFlow Hub, be sure to review the\n[contribution guidelines](CONTRIBUTING.md). This project adheres to TensorFlow's\n[code of\nconduct](https://github.com/tensorflow/tensorflow/blob/master/CODE_OF_CONDUCT.md). By\nparticipating, you are expected to uphold this code.\n\nWe use [GitHub issues](https://github.com/tensorflow/hub/issues) for tracking\nrequests and bugs. Please see the [TensorFlow Hub mailing\nlist](https://groups.google.com/a/tensorflow.org/forum/#!forum/hub) for general\nquestions and discussion, or tag [tensorflow-hub on Stack\nOverflow](https://stackoverflow.com/questions/tagged/tensorflow-hub).\n\n\n## License\n\n[Apache License 2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4D4:11316A:17CFD1:5E0F0A:6AB92AD2"},"text_sha256":"5f42089cc9a3fc771d416fbbb7c8a4b0eeb6d3b296e381056642f7113b4061e8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2415","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0866:A9DC0:17BD00A:1BE0A52:6AB92B0B"},"commit":{"sha":"26c94f67716f457efaa70c63b4d1b561a08be9f1","url":"https://github.com/tensorflow/hub/commit/26c94f67716f457efaa70c63b4d1b561a08be9f1","date":"2025-01-17T12:09:38Z","author_date":"2025-01-17T12:09:05Z","committer_date":"2025-01-17T12:09:38Z","tree_sha":"aa31e98a939215d8f4d8cd86032098b06ae18824","message_first_line":"cleanup of deprecated test methods"},"tree_request_status":200,"tree_rate":{"github_remaining":"2414","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0905:280FBC:17BD9A0:1BE0493:6AB92B0C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6531,"blob_sha":"f9e3d2057774797cd0918a0189e4294a106ee93c","priority":0}],"documents":[{"path":"README.md","size":6531,"blob_sha":"f9e3d2057774797cd0918a0189e4294a106ee93c","priority":0,"status":200,"text":"<!-- Copyright 2018 The TensorFlow Hub Authors. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n==============================================================================-->\n\n<!--\nThis file is rendered on github.com/tensorflow/hub.\ng3doc/_index.yaml is rendered on tensorflow.org/hub.\nBoth link to g3doc/overview.md and g3doc/*.md for detailed docs.\n-->\n\n**TensorFlow Hub has moved to [Kaggle Models](https://kaggle.com/models)**\n\nStarting November 15th 2023, links to [tfhub.dev](https://tfhub.dev) redirect to\ntheir counterparts on Kaggle Models. `tensorflow_hub` will continue to support\ndownloading models that were initially uploaded to tfhub.dev via e.g.\n`hub.load(\"https://tfhub.dev/<publisher>/<model>/<version>\")`. Although no\nmigration or code rewrites are explicitly required, we recommend replacing\ntfhub.dev links with their Kaggle Models counterparts to improve code health and\ndebuggability. See FAQs [here](https://kaggle.com/tfhub-dev-faqs).\n\nAs of March 18, 2024, unmigrated model assets (see list below) were deleted and\nretrieval is no longer possible. These unmigrated model assets include:\n\n-   [inaturalist/vision/embedder/inaturalist_V2](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/inaturalist/models/vision/embedder/inaturalist_V2)\n-   [nvidia/unet/industrial/class_1](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_1)\n-   [nvidia/unet/industrial/class_2](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_2)\n-   [nvidia/unet/industrial/class_3](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_3)\n-   [nvidia/unet/industrial/class_4](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_4)\n-   [nvidia/unet/industrial/class_5](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_5)\n-   [nvidia/unet/industrial/class_6](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_6)\n-   [nvidia/unet/industrial/class_7](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_7)\n-   [nvidia/unet/industrial/class_8](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_8)\n-   [nvidia/unet/industrial/class_9](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_9)\n-   [nvidia/unet/industrial/class_10](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/nvidia/models/unet/industrial/class_10)\n-   [silero/silero-stt/de](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/silero/models/silero-stt/de)\n-   [silero/silero-stt/en](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/silero/models/silero-stt/en)\n-   [silero/silero-stt/es](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/silero/models/silero-stt/es)\n-   [svampeatlas/vision/classifier/fungi_mobile_V1](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/svampeatlas/models/vision/classifier/fungi_mobile_V1)\n-   [svampeatlas/vision/embedder/fungi_V2](https://github.com/tensorflow/tfhub.dev/tree/master/assets/docs/svampeatlas/models/vision/embedder/fungi_V2)\n\n# tensorflow_hub\n\nThis GitHub repository hosts the `tensorflow_hub` Python library to download\nand reuse SavedModels in your TensorFlow program with a minimum amount of code,\nas well as other associated code and documentation.\n\n## Getting Started\n\n  * [Introduction](https://www.tensorflow.org/hub/)\n  * The asset types of [tfhub.dev](https://tfhub.dev/)\n      * [SavedModels for TensorFlow 2](https://github.com/tensorflow/docs/blob/master/site/en/hub/tf2_saved_model.md)\n        and the [Reusable SavedModel interface](https://github.com/tensorflow/docs/blob/master/site/en/hub/reusable_saved_models.md).\n      * Deprecated: [Models in TF1 Hub format](https://github.com/tensorflow/docs/blob/master/site/en/hub/tf1_hub_module.md)\n        and their [Common Signatures](https://github.com/tensorflow/docs/blob/master/site/en/hub/common_signatures/index.md)\n        collection.\n  * Using the library\n      * [Installation](https://github.com/tensorflow/docs/blob/master/site/en/hub/installation.md)\n      * [Caching model downloads](https://github.com/tensorflow/docs/blob/master/site/en/hub/caching.md)\n      * [Migration to TF2](https://github.com/tensorflow/docs/blob/master/site/en/hub/migration_tf2.md)\n      * [Model compatibility for TF1/TF2](https://github.com/tensorflow/docs/blob/master/site/en/hub/model_compatibility.md)\n      * [Common issues](https://github.com/tensorflow/docs/blob/master/site/en/hub/common_issues.md)\n      * [Build from source](https://github.com/tensorflow/docs/blob/master/site/en/hub/build_from_source.md)\n      * [Hosting a module](https://github.com/tensorflow/docs/blob/master/site/en/hub/hosting.md)\n  * Tutorials\n      * [TF2 Image Retraining](https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/hub/tutorials/tf2_image_retraining.ipynb)\n      * [TF2 Text Classification](https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/hub/tutorials/tf2_text_classification.ipynb)\n      * [Additional TF1 and TF2 examples](examples/README.md)\n\n\n## Contributing\n\nIf you'd like to contribute to TensorFlow Hub, be sure to review the\n[contribution guidelines](CONTRIBUTING.md). To contribute code to the\nlibrary itself (not examples), you will probably need to\n[build from source](https://github.com/tensorflow/docs/blob/master/site/en/hub/build_from_source.md).\n\nThis project adheres to TensorFlow's\n[code of conduct](https://github.com/tensorflow/tensorflow/blob/master/CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code.\n\nWe use [GitHub issues](https://github.com/tensorflow/hub/issues) for tracking\nrequests and bugs.\n\n\n## License\n\n[Apache License 2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C6C8:345ED4:178E50:5DCDE7:6AB92B0C"},"text_sha256":"295f31d8d73c76f40192c204dce65b5ba2f9f59170cb55563b2eef534f102902"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tslearn-team/tslearn","input_row":{"repository":"tslearn-team/tslearn","url":"https://github.com/tslearn-team/tslearn","name":"tslearn","owner":"tslearn-team","description":"The machine learning toolkit for time series analysis in Python","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":3180,"issues":348,"created_at":"2017-05-04T13:08:13Z","updated_at":"2026-09-23T08:28:16Z","first_commit_at":"2017-05-03T15:43:46Z","last_commit_at":"2026-09-22T12:31:39Z","activity_months":112.64,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:16.980Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tslearn-team/tslearn","visibility":"public","created_at":"2017-05-04T13:08:13Z","updated_at":"2026-09-23T08:28:16Z","private":false,"fork":false,"archived":false,"stargazers_count":3180,"open_issues_count":81,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2413","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A9:76AED:17F4085:1C18089:6AB92B0D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2412","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:17843A7:1BA8180:6AB92B0D"},"commit":{"sha":"087e557ba68285f00bd33f7a60616006f6d851ca","url":"https://github.com/tslearn-team/tslearn/commit/087e557ba68285f00bd33f7a60616006f6d851ca","date":"2018-05-21T12:10:11Z","author_date":"2018-05-21T12:10:11Z","committer_date":"2018-05-21T12:10:11Z","tree_sha":"5184b60bb0a361e350babba6244457488cb581c4","message_first_line":"Fix import in doc"},"tree_request_status":200,"tree_rate":{"github_remaining":"2411","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BF:6C9BF:1800CAB:1C24B29:6AB92B0D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4851,"blob_sha":"0db0425ae0e4038d51bf9bf3744ee3fb0f72dbb4","priority":0}],"documents":[{"path":"README.md","size":4851,"blob_sha":"0db0425ae0e4038d51bf9bf3744ee3fb0f72dbb4","priority":0,"status":200,"text":"[![PyPI version](https://badge.fury.io/py/tslearn.svg)](https://badge.fury.io/py/tslearn)\n[![Documentation Status](https://readthedocs.org/projects/tslearn/badge/?version=latest)](http://tslearn.readthedocs.io/en/latest/?badge=latest)\n[![Build Status](https://travis-ci.org/rtavenar/tslearn.svg?branch=master)](https://travis-ci.org/rtavenar/tslearn)\n[![Code Climate](https://codeclimate.com/github/rtavenar/tslearn/badges/gpa.svg)](https://codeclimate.com/github/rtavenar/tslearn)\n[![Test Coverage](https://codeclimate.com/github/rtavenar/tslearn/badges/coverage.svg)](https://codeclimate.com/github/rtavenar/tslearn/coverage)\n\n`tslearn` is a Python package that provides machine learning tools for the analysis of time series.\nThis package builds on `scikit-learn`, `numpy` and `scipy` libraries.\n\nIf you would like to contribute to `tslearn`, please have a look at [our contribution guidelines](CONTRIBUTING.md).\n\n# Dependencies\n\n```\nCython\nnumpy\nscipy\nscikit-learn\n```\n\nIf you plan to use the `shapelets` module, `keras` should also be installed.\n\n# Installation\n\n## Using conda\n\nThe easiest way to install `tslearn` is probably via `conda`:\n```bash\nconda install -c conda-forge tslearn\n```\n\n## Using PyPI\n\nUsing `pip` should also work fine:\n```bash\npip install tslearn\n```\n\n## Using latest github-hosted version\n\nIf you want to get `tslearn`'s latest version, you can refer to the repository hosted at github:\n```bash\npip install git+https://github.com/rtavenar/tslearn.git\n```\n\n## Troubleshooting\n\nIt seems on some platforms `Cython` dependency does not install properly.\nIf you experiment such an issue, try installing it with the following command:\n\n```bash \npip install cython\n```\n\nor (depending on your preferred python package manager):\n```bash\nconda install -c anaconda cython\n```\n\nbefore you start installing `tslearn`.\n\n# Documentation and API reference\n\nThe documentation, including a gallery of examples, is hosted at [readthedocs](http://tslearn.readthedocs.io/en/latest/index.html).\n\n# Already available\n\n* A `generators` module provides Random Walks generators\n* A `datasets` module provides access to the famous UCR/UEA datasets through the `UCR_UEA_datasets` class \n* A `preprocessing` module provides standard time series scalers\n* A `metrics` module provides:\n  * Dynamic Time Warping (DTW) (with Sakoe-Chiba band and Itakura parallelogram variants)\n  * LB_Keogh\n  * Global Alignment Kernel\n  * Soft-DTW from Cuturi and Blondel\n* A `neighbors` module includes nearest neighbor algorithms to be used with time series\n* An `svm` module includes Support Vector Machine algorithms with:\n  * Standard kernels offered in `sklearn` (with adequate array reshaping done for you)\n  * Global Alignment Kernel\n* A `clustering` module includes the following time series clustering algorithms:\n  * Standard Euclidean k-means (with adequate array reshaping done for you)\n    * Based on `tslearn.barycenters`\n  * DBA k-means from Petitjean _et al._\n    * Based on `tslearn.barycenters` that offers DBA facility that could be used for other applications than just \n    k-means\n  * Global Alignment kernel k-means\n  * KShape clustering from Paparizzos and Gravano\n  * Soft-DTW k-means from Cuturi and Blondel\n    * Based on `tslearn.barycenters` that offers Soft-DTW barycenter computation\n  * It also provides a way to compute the silhouette coefficient for given clustering and metric\n* A `shapelets` module includes an efficient implementation of the Learning Time-Series method from Grabocka _et al._\n  * **Warning:** to use the `shapelets` module, an extra dependency is required: `keras`\n* A `piecewise` module includes standard time series transformations, as well as the corresponding distances:\n  * Piecewise Aggregate Approximation (PAA)\n  * Symbolic Aggregate approXimation (SAX)\n  * 1d-Symbolic Aggregate approXimation (1d-SAX)\n\n# TODO list\n\nHave a look [there](https://github.com/rtavenar/tslearn/issues?utf8=✓&q=is%3Aissue%20is%3Aopen%20label%3A%22new%20feature%22%20) for a list of suggested features.\n**If you want other ML methods for time series to be added to this TODO list, do not hesitate to open an issue!** See [our contribution guidelines](CONTRIBUTING.md) for more information about how to proceed.\n\n# Acknowledgments\n\nAuthors would like to thank Mathieu Blondel for providing code for \n[Kernel k-means](https://gist.github.com/mblondel/6230787) and [Soft-DTW](https://github.com/mblondel/soft-dtw) (both \ndistributed under BSD license) that are used in the `clustering` and `metrics` modules of this library.\n\n# Referencing `tslearn`\n\nIf you use `tslearn` in a scientific publication, we would appreciate citations:\n\n```bibtex\n@misc{tslearn,\n title={tslearn: A machine learning toolkit dedicated to time-series data},\n author={Tavenard, Romain},\n year={2017},\n note={\\url{https://github.com/rtavenar/tslearn}}\n}\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7984:3A3DD:178D2A:5DCDCD:6AB92B0E"},"text_sha256":"4cfb492ef09e633cbabb9aa7e2e2844be70b1437cb1adc59905b52f48883396c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2410","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0819:180242:17F2DC3:1C16982:6AB92B0E"},"commit":{"sha":"f8f13ddf4186e2cc99c8ef495aeb46b1254a01f7","url":"https://github.com/tslearn-team/tslearn/commit/f8f13ddf4186e2cc99c8ef495aeb46b1254a01f7","date":"2026-06-30T09:54:48Z","author_date":"2026-06-30T09:54:48Z","committer_date":"2026-06-30T09:54:48Z","tree_sha":"f8e64d3e0869bc042bdd727cf877829b584aec27","message_first_line":"Post release 0.9.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2409","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:17A5C7D:1BC8E8C:6AB92B0F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14295,"blob_sha":"728b16712dc53bedb9e0e04070db371ee6a58590","priority":0}],"documents":[{"path":"README.md","size":14295,"blob_sha":"728b16712dc53bedb9e0e04070db371ee6a58590","priority":0,"status":200,"text":"<!-- Our logo and description -->\n<div align=\"center\">\n  <p><a href=\"https://tslearn.readthedocs.io\"><image src=\"https://raw.githubusercontent.com/tslearn-team/tslearn/main/docs/_static/tslearn_logo_white_background.png?cache-control=no-cache\" width=\"20%\" alt=\"tslearn logo\"/><\/a><\/p>\n  <h1>The machine learning toolkit for time series analysis in Python<\/h1>\n<\/div>\n\n<!-- The badges -->\n<p align=\"center\">\n    <a href=\"https://badge.fury.io/py/tslearn\">\n        <img alt=\"PyPI\" src=\"https://badge.fury.io/py/tslearn.svg?cache-control=no-cache\">\n    <\/a>\n    <a href=\"https://www.python.org/downloads/\">\n        <img alt=\"Python 3.10+\" src=\"https://img.shields.io/badge/python-3.10+-blue.svg\">\n    <\/a>\n    <a href=\"http://tslearn.readthedocs.io/en/stable/?badge=stable\">\n        <img alt=\"Documentation\" src=\"https://readthedocs.org/projects/tslearn/badge/?version=stable\">\n    <\/a>\n    <a href=\"https://dev.azure.com/romaintavenard/tslearn/_build\">\n        <img alt=\"Build (Azure Pipelines)\" src=\"https://dev.azure.com/romaintavenard/tslearn/_apis/build/status/tslearn-team.tslearn?branchName=main\">\n    <\/a>\n    <a href=\"https://codecov.io/gh/tslearn-team/tslearn\">\n        <img alt=\"Codecov\" src=\"https://codecov.io/gh/tslearn-team/tslearn/branch/main/graph/badge.svg\">\n    <\/a>\n    <a href=\"https://pepy.tech/project/tslearn\">\n        <img alt=\"Downloads\" src=\"https://pepy.tech/badge/tslearn\">\n    <\/a>\n<\/p>\n\n<!-- Draw horizontal rule -->\n<hr>\n\n<!-- Table of content -->\n\n| Section | Description |\n|-|-|\n| [Installation](#installation) | Installing the dependencies and tslearn |\n| [Getting started](#getting-started) | A quick introduction on how to use tslearn |\n| [Available features](#available-features) | An extensive overview of tslearn's functionalities |\n| [Documentation](#documentation) | A link to our API reference and a gallery of examples |\n| [Contributing](#contributing) | A guide for heroes willing to contribute |\n| [Citation](#referencing-tslearn) | A citation for tslearn for scholarly articles |\n\n## Installation<a id=\"installation\"><\/a>\nThere are different alternatives to install tslearn:\n* PyPi: `python -m pip install tslearn`\n* Conda: `conda install -c conda-forge tslearn`\n* Git: `python -m pip install https://github.com/tslearn-team/tslearn/archive/main.zip`\n\nIn order for the installation to be successful, the required dependencies must be installed. For a more detailed guide on how to install tslearn, please see the [Documentation](https://tslearn.readthedocs.io/en/stable/?badge=stable#installation).\n\n## Getting started<a id=\"getting-started\"><\/a>\n\n### 1. Getting the data in the right format\ntslearn expects a time series dataset to be formatted as a 3D `numpy` array. The three dimensions correspond to the number of time series, the number of measurements per time series and the number of dimensions respectively (`n_ts, max_sz, d`). In order to get the data in the right format, different solutions exist:\n* [You can use the utility functions such as `to_time_series_dataset`.](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.utils.html#module-tslearn.utils)\n* [You can convert from other popular time series toolkits in Python.](https://tslearn.readthedocs.io/en/stable/integration_other_software.html)\n* [You can load any of the UCR datasets in the required format.](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.datasets.html#module-tslearn.datasets)\n* [You can generate synthetic data using the `generators` module.](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.generators.html#module-tslearn.generators)\n\nIt should further be noted that tslearn [supports variable-length timeseries](https://tslearn.readthedocs.io/en/stable/variablelength.html).\n\n```python3\n>>> from tslearn.utils import to_time_series_dataset\n>>> my_first_time_series = [1, 3, 4, 2]\n>>> my_second_time_series = [1, 2, 4, 2]\n>>> my_third_time_series = [1, 2, 4, 2, 2]\n>>> X = to_time_series_dataset([my_first_time_series,\n                                my_second_time_series,\n                                my_third_time_series])\n>>> y = [0, 1, 1]\n```\n\n### 2. Data preprocessing and transformations\nOptionally, tslearn has several utilities to preprocess the data. In order to facilitate the convergence of different algorithms, you can [scale time series](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.preprocessing.html#module-tslearn.preprocessing). Alternatively, in order to speed up training times, one can [resample](https://tslearn.readthedocs.io/en/stable/gen_modules/preprocessing/tslearn.preprocessing.TimeSeriesResampler.html#tslearn.preprocessing.TimeSeriesResampler) the data or apply a [piece-wise transformation](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.piecewise.html#module-tslearn.piecewise).\n\n```python3\n>>> from tslearn.preprocessing import TimeSeriesScalerMinMax\n>>> X_scaled = TimeSeriesScalerMinMax().fit_transform(X)\n>>> print(X_scaled)\n[[[0.] [0.667] [1.] [0.333] [nan]]\n [[0.] [0.333] [1.] [0.333] [nan]]\n [[0.] [0.333] [1.] [0.333] [0.333]]]\n```\n\n### 3. Training a model\n\nAfter getting the data in the right format, a model can be trained. Depending on the use case, tslearn supports different tasks: classification, clustering and regression. For an extensive overview of possibilities, check out our [gallery of examples](https://tslearn.readthedocs.io/en/stable/auto_examples/index.html).\n\n```python3\n>>> from tslearn.neighbors import KNeighborsTimeSeriesClassifier\n>>> knn = KNeighborsTimeSeriesClassifier(n_neighbors=1)\n>>> knn.fit(X_scaled, y)\n>>> print(knn.predict(X_scaled))\n[0 1 1]\n```\n\nAs can be seen, the models in tslearn follow the same API as those of the well-known scikit-learn. Moreover, they are fully compatible with it, allowing to use different scikit-learn utilities such as [hyper-parameter tuning and pipelines](https://tslearn.readthedocs.io/en/stable/auto_examples/neighbors/plot_knnts_sklearn.html).\n\n### 4. More analyses\n\ntslearn further allows to perform all different types of analysis. Examples include [calculating barycenters](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.barycenters.html#module-tslearn.barycenters) of a group of time series or calculate the distances between time series using a [variety of distance metrics](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.metrics.html#module-tslearn.metrics).\n\n## Available features<a id=\"available-features\"><\/a>\n\n| data                                                                                                                                                                                         | processing                                                                                                              | clustering                                                                                                                                                       | classification                                                                                                                                                                          | regression                                                                                                                                                                           | metrics                                                                                                                              |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [UCR Datasets](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.datasets.html#module-tslearn.datasets)                                                                           | [Scaling](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.preprocessing.html#module-tslearn.preprocessing) | [TimeSeriesKMeans](https://tslearn.readthedocs.io/en/stable/gen_modules/clustering/tslearn.clustering.TimeSeriesKMeans.html#tslearn.clustering.TimeSeriesKMeans) | [KNN Classifier](https://tslearn.readthedocs.io/en/stable/gen_modules/neighbors/tslearn.neighbors.KNeighborsTimeSeriesClassifier.html#tslearn.neighbors.KNeighborsTimeSeriesClassifier) | [KNN Regressor](https://tslearn.readthedocs.io/en/stable/gen_modules/neighbors/tslearn.neighbors.KNeighborsTimeSeriesRegressor.html#tslearn.neighbors.KNeighborsTimeSeriesRegressor) | [Dynamic Time Warping](https://tslearn.readthedocs.io/en/stable/gen_modules/metrics/tslearn.metrics.dtw.html#tslearn.metrics.dtw)    |\n| [Generators](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.generators.html#module-tslearn.generators)                                                                         | [Piecewise](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.piecewise.html#module-tslearn.piecewise)       | [KShape](https://tslearn.readthedocs.io/en/stable/gen_modules/clustering/tslearn.clustering.KShape.html#tslearn.clustering.KShape)                               | [TimeSeriesSVC](https://tslearn.readthedocs.io/en/stable/gen_modules/svm/tslearn.svm.TimeSeriesSVC.html#tslearn.svm.TimeSeriesSVC)                                                      | [TimeSeriesSVR](https://tslearn.readthedocs.io/en/stable/gen_modules/svm/tslearn.svm.TimeSeriesSVR.html#tslearn.svm.TimeSeriesSVR)                                                   | [Global Alignment Kernel](https://tslearn.readthedocs.io/en/stable/gen_modules/metrics/tslearn.metrics.gak.html#tslearn.metrics.gak) |\n| Conversion([1](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.utils.html#module-tslearn.utils), [2](https://tslearn.readthedocs.io/en/stable/integration_other_software.html)) |                                                                                                                         | [KernelKmeans](https://tslearn.readthedocs.io/en/stable/gen_modules/clustering/tslearn.clustering.KernelKMeans.html#tslearn.clustering.KernelKMeans)             | [LearningShapelets](https://tslearn.readthedocs.io/en/stable/gen_modules/shapelets/tslearn.shapelets.LearningShapelets.html)                                    | [MLP](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.neural_network.html#module-tslearn.neural_network)                                                                | [Barycenters](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.barycenters.html#module-tslearn.barycenters)              |\n|                                                                                                                                                                                              |                                                                                                                         |                                                                                                                                                                  | [Early Classification](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.early_classification.html#module-tslearn.early_classification)                                      |                                                                                                                                                                                      | [Matrix Profile](https://tslearn.readthedocs.io/en/stable/gen_modules/tslearn.matrix_profile.html#module-tslearn.matrix_profile)     |\n\n\n## Documentation<a id=\"documentation\"><\/a>\n\nThe documentation is hosted at [readthedocs](http://tslearn.readthedocs.io/en/stable/index.html). It includes an [API](https://tslearn.readthedocs.io/en/stable/reference.html), [gallery of examples](https://tslearn.readthedocs.io/en/stable/auto_examples/index.html) and a [user guide](https://tslearn.readthedocs.io/en/stable/user_guide/userguide.html).\n\n## Contributing<a id=\"contributing\"><\/a>\n\nIf you would like to contribute to `tslearn`, please have a look at [our contribution guidelines](https://github.com/tslearn-team/tslearn/blob/main/CONTRIBUTING.md). A list of interesting TODO's can be found [here](https://github.com/tslearn-team/tslearn/issues?utf8=✓&q=is%3Aissue%20is%3Aopen%20label%3A%22new%20feature%22%20). **If you want other ML methods for time series to be added to this TODO list, do not hesitate to [open an issue](https://github.com/tslearn-team/tslearn/issues/new/choose)!**\n\n## Referencing tslearn<a id=\"referencing-tslearn\"><\/a>\n\nIf you use `tslearn` in a scientific publication, we would appreciate citations:\n\n```bibtex\n@article{JMLR:v21:20-091,\n  author  = {Romain Tavenard and Johann Faouzi and Gilles Vandewiele and \n             Felix Divo and Guillaume Androz and Chester Holtz and \n             Marie Payne and Roman Yurchak and Marc Ru{\\ss}wurm and \n             Kushal Kolar and Eli Woods},\n  title   = {Tslearn, A Machine Learning Toolkit for Time Series Data},\n  journal = {Journal of Machine Learning Research},\n  year    = {2020},\n  volume  = {21},\n  number  = {118},\n  pages   = {1-6},\n  url     = {http://jmlr.org/papers/v21/20-091.html}\n}\n```\n\n#### Acknowledgments\nAuthors would like to thank Mathieu Blondel for providing code for [Kernel k-means](https://gist.github.com/mblondel/6230787) and [Soft-DTW](https://github.com/mblondel/soft-dtw), and to Mehran Maghoumi for his [`torch`-compatible implementation of SoftDTW](https://github.com/Maghoumi/pytorch-softdtw-cuda).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1014:3BCC6:17CB28:5E0BC8:6AB92B0F"},"text_sha256":"089c34b9ab0c33019fcbc650fcd1d7670fd1a80ddf4dc3d7693de31815fdbf8d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-learn-contrib/hdbscan","input_row":{"repository":"scikit-learn-contrib/hdbscan","url":"https://github.com/scikit-learn-contrib/hdbscan","name":"hdbscan","owner":"scikit-learn-contrib","description":"A high performance implementation of HDBSCAN clustering.","language":"Jupyter Notebook","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":3151,"issues":535,"created_at":"2015-04-22T13:32:37Z","updated_at":"2026-09-25T08:45:42Z","first_commit_at":"2015-04-22T13:32:37Z","last_commit_at":"2026-06-12T16:59:29Z","activity_months":133.68000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:19.958Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-learn-contrib/hdbscan","visibility":"public","created_at":"2015-04-22T13:32:37Z","updated_at":"2026-09-25T08:45:42Z","private":false,"fork":false,"archived":false,"stargazers_count":3151,"open_issues_count":388,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2408","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0917:76AED:17F426B:1C182CD:6AB92B0F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2407","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0847:767EB:17F3731:1C17AD4:6AB92B10"},"commit":{"sha":"bba63fca55a6d78343ee0450b1d200971024d84a","url":"https://github.com/scikit-learn-contrib/hdbscan/commit/bba63fca55a6d78343ee0450b1d200971024d84a","date":"2018-05-23T23:57:40Z","author_date":"2018-05-23T23:57:40Z","committer_date":"2018-05-23T23:57:40Z","tree_sha":"30cf57cb92f64ed14a3c5c70c6567247d571024d","message_first_line":"Merge pull request #209 from mdunnlp/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"2406","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0887:3203A7:1795550:1BB90F9:6AB92B11"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":11244,"blob_sha":"4f32f76d8781a797bd4826d1fcf924722dcb5514","priority":0}],"documents":[{"path":"README.rst","size":11244,"blob_sha":"4f32f76d8781a797bd4826d1fcf924722dcb5514","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/hdbscan.svg\n    :target: https://pypi.python.org/pypi/hdbscan/\n    :alt: PyPI Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/version.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/downloads.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge downloads\n.. image:: https://img.shields.io/pypi/l/hdbscan.svg\n    :target: https://github.com/scikit-learn-contrib/hdbscan/blob/master/LICENSE\n    :alt: License\n.. image:: https://travis-ci.org/scikit-learn-contrib/hdbscan.svg\n    :target: https://travis-ci.org/scikit-learn-contrib/hdbscan\n    :alt: Travis Build Status\n.. image:: https://coveralls.io/repos/github/scikit-learn-contrib/hdbscan/badge.svg?branch=master\n    :target: https://coveralls.io/github/scikit-learn-contrib/hdbscan?branch=master\n    :alt: Test Coverage\n.. image:: https://readthedocs.org/projects/hdbscan/badge/?version=latest\n    :target: https://hdbscan.readthedocs.org\n    :alt: Docs\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00205/status.svg\n    :target: http://joss.theoj.org/papers/10.21105/joss.00205\n    :alt: JOSS article\n.. image:: https://mybinder.org/badge.svg \n    :target: https://mybinder.org/v2/gh/scikit-learn-contrib/hdbscan\n    :alt: Launch example notebooks in Binder\n\n\n=======\nHDBSCAN\n=======\n\nHDBSCAN - Hierarchical Density-Based Spatial Clustering of Applications\nwith Noise. Performs DBSCAN over varying epsilon values and integrates \nthe result to find a clustering that gives the best stability over epsilon.\nThis allows HDBSCAN to find clusters of varying densities (unlike DBSCAN),\nand be more robust to parameter selection.\n\nIn practice this means that HDBSCAN returns a good clustering straight\naway with little or no parameter tuning -- and the primary parameter,\nminimum cluster size, is intuitive and easy to select.\n\nHDBSCAN is ideal for exploratory data analysis; it's a fast and robust\nalgorithm that you can trust to return meaningful clusters (if there\nare any).\n\nBased on the papers:\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017 `[pdf] <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8215642>`_\n\n    R. Campello, D. Moulavi, and J. Sander, *Density-Based Clustering Based on\n    Hierarchical Density Estimates*\n    In: Advances in Knowledge Discovery and Data Mining, Springer, pp 160-172.\n    2013\n    \nDocumentation, including tutorials, are available on ReadTheDocs at http://hdbscan.readthedocs.io/en/latest/ .  \n    \nNotebooks `comparing HDBSCAN to other clustering algorithms <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb>`_, explaining `how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ and `comparing performance with other python clustering implementations <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ are available.\n\n------------------\nHow to use HDBSCAN\n------------------\n\nThe hdbscan package inherits from sklearn classes, and thus drops in neatly\nnext to other sklearn clusterers with an identical calling API. Similarly it\nsupports input in a variety of formats: an array (or pandas dataframe, or\nsparse matrix) of shape ``(num_samples x num_features)``; an array (or sparse matrix)\ngiving a distance matrix between samples.\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.HDBSCAN(min_cluster_size=10)\n    cluster_labels = clusterer.fit_predict(data)\n\n-----------\nPerformance\n-----------\n\nSignificant effort has been put into making the hdbscan implementation as fast as \npossible. It is `orders of magnitude faster than the reference implementation <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Python%20vs%20Java.ipynb>`_ in Java,\nand is currently faster than highly optimized single linkage implementations in C and C++.\n`version 0.7 performance can be seen in this notebook <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ .\nIn particular `performance on low dimensional data is better than sklearn's DBSCAN <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations%202D%20v0.7.ipynb>`_ ,\nand via support for caching with joblib, re-clustering with different parameters\ncan be almost free.\n\n------------------------\nAdditional functionality\n------------------------\n\nThe hdbscan package comes equipped with visualization tools to help you\nunderstand your clustering results. After fitting data the clusterer\nobject has attributes for:\n\n* The condensed cluster hierarchy\n* The robust single linkage cluster hierarchy\n* The reachability distance minimal spanning tree\n\nAll of which come equipped with methods for plotting and converting\nto Pandas or NetworkX for further analysis. See the notebook on\n`how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ for examples and further details.\n\nThe clusterer objects also have an attribute providing cluster membership\nstrengths, resulting in optional soft clustering (and no further compute \nexpense). Finally each cluster also receives a persistence score giving\nthe stability of the cluster over the range of distance scales present\nin the data. This provides a measure of the relative strength of clusters.\n\n-----------------\nOutlier Detection\n-----------------\n\nThe HDBSCAN clusterer objects also support the GLOSH outlier detection algorithm. \nAfter fitting the clusterer to data the outlier scores can be accessed via the\n``outlier_scores_`` attribute. The result is a vector of score values, one for\neach data point that was fit. Higher scores represent more outlier like objects.\nSelecting outliers via upper quantiles is often a good approach.\n\nBased on the paper:\n    R.J.G.B. Campello, D. Moulavi, A. Zimek and J. Sander \n    *Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection*, \n    ACM Trans. on Knowledge Discovery from Data, Vol 10, 1 (July 2015), 1-51.\n\n---------------------\nRobust single linkage\n---------------------\n\nThe hdbscan package also provides support for the *robust single linkage*\nclustering algorithm of Chaudhuri and Dasgupta. As with the HDBSCAN \nimplementation this is a high performance version of the algorithm \noutperforming scipy's standard single linkage implementation. The\nrobust single linkage hierarchy is available as an attribute of\nthe robust single linkage clusterer, again with the ability to plot\nor export the hierarchy, and to extract flat clusterings at a given\ncut level and gamma value.\n\nExample usage:\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.RobustSingleLinkage(cut=0.125, k=7)\n    cluster_labels = clusterer.fit_predict(data)\n    hierarchy = clusterer.cluster_hierarchy_\n    alt_labels = hierarchy.get_clusters(0.100, 5)\n    hierarchy.plot()\n\n\nBased on the paper:\n    K. Chaudhuri and S. Dasgupta.\n    *\"Rates of convergence for the cluster tree.\"*\n    In Advances in Neural Information Processing Systems, 2010.\n\n----------\nInstalling\n----------\n\nEasiest install, if you have Anaconda (thanks to conda-forge which is awesome!):\n\n.. code:: bash\n\n    conda install -c conda-forge hdbscan\n\nPyPI install, presuming you have sklearn and all its requirements (numpy and scipy) installed:\n\n.. code:: bash\n\n    pip install hdbscan\n\nBinary wheels for a number of platforms are available thanks to the work of\nRyan Helinski <rlhelinski@gmail.com>.\n\nIf pip is having difficulties pulling the dependencies then we'd suggest installing\nthe dependencies manually using anaconda followed by pulling hdbscan from pip:\n\n.. code:: bash\n\n    conda install cython\n    conda install numpy scipy\n    conda install scikit-learn\n    pip install hdbscan\n\nFor a manual install get this package:\n\n.. code:: bash\n\n    wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip\n    unzip master.zip\n    rm master.zip\n    cd hdbscan-master\n\nInstall the requirements\n\n.. code:: bash\n\n    sudo pip install -r requirements.txt\n    \nor\n\n.. code:: bash\n\n    conda install scikit-learn cython \n\nInstall the package\n\n.. code:: bash\n\n    python setup.py install\n\n-----------------\nRunning the Tests\n-----------------\n\nThe package tests can be run after installation using the command:\n\n.. code:: bash\n\n    nosetests -s hdbscan\n\nor, if ``nose`` is installed but ``nosetests`` is not in your ``PATH`` variable:\n\n.. code:: bash\n\n    python -m nose -s hdbscan\n\nIf one or more of the tests fail, please report a bug at https://github.com/scikit-learn-contrib/hdbscan/issues/new\n\n--------------\nPython Version\n--------------\n\nThe hdbscan library supports both Python 2 and Python 3. However we recommend Python 3 as the better option if it is available to you.\n    \n----------------\nHelp and Support\n----------------\n\nFor simple issues you can consult the `FAQ <https://hdbscan.readthedocs.io/en/latest/faq.html>`_ in the documentation.\nIf your issue is not suitably resolved there, please check the `issues <https://github.com/scikit-learn-contrib/hdbscan/issues>`_ on github. Finally, if no solution is available there feel free to `open an issue <https://github.com/scikit-learn-contrib/hdbscan/issues/new>`_ ; the authors will attempt to respond in a reasonably timely fashion.\n\n------------\nContributing\n------------\n\nWe welcome contributions in any form! Assistance with documentation, particularly expanding tutorials,\nis always welcome. To contribute please `fork the project <https://github.com/scikit-learn-contrib/hdbscan/issues#fork-destination-box>`_ make your changes and submit a pull request. We will do our best to work through any issues with\nyou and get your code merged into the main branch.\n\n------\nCiting\n------\n\nIf you have used this codebase in a scientific publication and wish to cite it, please use the `Journal of Open Source Software article <http://joss.theoj.org/papers/10.21105/joss.00205>`_.\n\n    L. McInnes, J. Healy, S. Astels, *hdbscan: Hierarchical density based clustering*\n    In: Journal of Open Source Software, The Open Journal, volume 2, number 11.\n    2017\n    \nTo refernece the high performance algorithm developed in this library please cite our paper in ICDMW 2017 proceedings.\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017\n\n---------\nLicensing\n---------\n\nThe hdbscan package is 3-clause BSD licensed. Enjoy.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E30E:3B6DE:1763E6:5DA42E:6AB92B11"},"text_sha256":"140037ba24103133c273e8804f8b7671b31f882519ce60f65354ac2b021be602"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2405","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:1861D31:1C85DFA:6AB92B12"},"commit":{"sha":"692c2a5569c1ca5cd4a16f5e276ef24f4fa4f185","url":"https://github.com/scikit-learn-contrib/hdbscan/commit/692c2a5569c1ca5cd4a16f5e276ef24f4fa4f185","date":"2026-06-12T16:59:29Z","author_date":"2026-06-12T16:59:29Z","committer_date":"2026-06-12T16:59:29Z","tree_sha":"ab3585df22295ee6989ac15748f57a7b9f6426c6","message_first_line":"Merge pull request #726 from Mokto/feat/linux-aarch64-upstream"},"tree_request_status":200,"tree_rate":{"github_remaining":"2404","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EF:754BF:17CD70E:1BF15E3:6AB92B12"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":14188,"blob_sha":"f5a33e519bfd6b89120ec72f80f46cc948480be4","priority":0}],"documents":[{"path":"README.rst","size":14188,"blob_sha":"f5a33e519bfd6b89120ec72f80f46cc948480be4","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/hdbscan.svg\n    :target: https://pypi.python.org/pypi/hdbscan/\n    :alt: PyPI Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/version.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/downloads.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge downloads\n.. image:: https://img.shields.io/pypi/l/hdbscan.svg\n    :target: https://github.com/scikit-learn-contrib/hdbscan/blob/master/LICENSE\n    :alt: License\n.. image:: https://travis-ci.org/scikit-learn-contrib/hdbscan.svg\n    :target: https://travis-ci.org/scikit-learn-contrib/hdbscan\n    :alt: Travis Build Status\n.. image:: https://codecov.io/gh/scikit-learn-contrib/hdbscan/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/scikit-learn-contrib/hdbscan\n    :alt: Test Coverage\n.. image:: https://readthedocs.org/projects/hdbscan/badge/?version=latest\n    :target: https://hdbscan.readthedocs.org\n    :alt: Docs\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00205/status.svg\n    :target: http://joss.theoj.org/papers/10.21105/joss.00205\n    :alt: JOSS article\n.. image:: https://mybinder.org/badge.svg \n    :target: https://mybinder.org/v2/gh/scikit-learn-contrib/hdbscan\n    :alt: Launch example notebooks in Binder\n\n\n=======\nHDBSCAN\n=======\n\nHDBSCAN - Hierarchical Density-Based Spatial Clustering of Applications\nwith Noise. Performs DBSCAN over varying epsilon values and integrates \nthe result to find a clustering that gives the best stability over epsilon.\nThis allows HDBSCAN to find clusters of varying densities (unlike DBSCAN),\nand be more robust to parameter selection.\n\nIn practice this means that HDBSCAN returns a good clustering straight\naway with little or no parameter tuning -- and the primary parameter,\nminimum cluster size, is intuitive and easy to select.\n\nHDBSCAN is ideal for exploratory data analysis; it's a fast and robust\nalgorithm that you can trust to return meaningful clusters (if there\nare any).\n\nBased on the papers:\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017 `[pdf] <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8215642>`_\n\n    R. Campello, D. Moulavi, and J. Sander, *Density-Based Clustering Based on\n    Hierarchical Density Estimates*\n    In: Advances in Knowledge Discovery and Data Mining, Springer, pp 160-172.\n    2013\n    \nDocumentation, including tutorials, are available on ReadTheDocs at http://hdbscan.readthedocs.io/en/latest/ .  \n    \nNotebooks `comparing HDBSCAN to other clustering algorithms <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb>`_, explaining `how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ and `comparing performance with other python clustering implementations <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ are available.\n\n------------------\nHow to use HDBSCAN\n------------------\n\nThe hdbscan package inherits from sklearn classes, and thus drops in neatly\nnext to other sklearn clusterers with an identical calling API. Similarly it\nsupports input in a variety of formats: an array (or pandas dataframe, or\nsparse matrix) of shape ``(num_samples x num_features)``; an array (or sparse matrix)\ngiving a distance matrix between samples.\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.HDBSCAN(min_cluster_size=10)\n    cluster_labels = clusterer.fit_predict(data)\n\n-----------\nPerformance\n-----------\n\nSignificant effort has been put into making the hdbscan implementation as fast as \npossible. It is `orders of magnitude faster than the reference implementation <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Python%20vs%20Java.ipynb>`_ in Java,\nand is currently faster than highly optimized single linkage implementations in C and C++.\n`version 0.7 performance can be seen in this notebook <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ .\nIn particular `performance on low dimensional data is better than sklearn's DBSCAN <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations%202D%20v0.7.ipynb>`_ ,\nand via support for caching with joblib, re-clustering with different parameters\ncan be almost free.\n\n------------------------\nAdditional functionality\n------------------------\n\nThe hdbscan package comes equipped with visualization tools to help you\nunderstand your clustering results. After fitting data the clusterer\nobject has attributes for:\n\n* The condensed cluster hierarchy\n* The robust single linkage cluster hierarchy\n* The reachability distance minimal spanning tree\n\nAll of which come equipped with methods for plotting and converting\nto Pandas or NetworkX for further analysis. See the notebook on\n`how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ for examples and further details.\n\nThe clusterer objects also have an attribute providing cluster membership\nstrengths, resulting in optional soft clustering (and no further compute \nexpense). Finally each cluster also receives a persistence score giving\nthe stability of the cluster over the range of distance scales present\nin the data. This provides a measure of the relative strength of clusters.\n\n-----------------\nOutlier Detection\n-----------------\n\nThe HDBSCAN clusterer objects also support the GLOSH outlier detection algorithm. \nAfter fitting the clusterer to data the outlier scores can be accessed via the\n``outlier_scores_`` attribute. The result is a vector of score values, one for\neach data point that was fit. Higher scores represent more outlier like objects.\nSelecting outliers via upper quantiles is often a good approach.\n\nBased on the paper:\n    R.J.G.B. Campello, D. Moulavi, A. Zimek and J. Sander \n    *Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection*, \n    ACM Trans. on Knowledge Discovery from Data, Vol 10, 1 (July 2015), 1-51.\n\n---------------------\nRobust single linkage\n---------------------\n\nThe hdbscan package also provides support for the *robust single linkage*\nclustering algorithm of Chaudhuri and Dasgupta. As with the HDBSCAN \nimplementation this is a high performance version of the algorithm \noutperforming scipy's standard single linkage implementation. The\nrobust single linkage hierarchy is available as an attribute of\nthe robust single linkage clusterer, again with the ability to plot\nor export the hierarchy, and to extract flat clusterings at a given\ncut level and gamma value.\n\nExample usage:\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.RobustSingleLinkage(cut=0.125, k=7)\n    cluster_labels = clusterer.fit_predict(data)\n    hierarchy = clusterer.cluster_hierarchy_\n    alt_labels = hierarchy.get_clusters(0.100, 5)\n    hierarchy.plot()\n\n\nBased on the paper:\n    K. Chaudhuri and S. Dasgupta.\n    *\"Rates of convergence for the cluster tree.\"*\n    In Advances in Neural Information Processing Systems, 2010.\n\n----------------\nBranch detection\n----------------\n\nThe hdbscan package supports a branch-detection post-processing step \nby `Bot et al. <https://peerj.com/articles/cs-2792/>`_. Cluster shapes,\nsuch as branching structures, can reveal interesting patterns \nthat are not expressed in density-based cluster hierarchies. The \nBranchDetector class mimics the HDBSCAN API and can be used to\ndetect branching hierarchies in clusters. It provides condensed \nbranch hierarchies, branch persistences, and branch memberships and \nsupports joblib's caching functionality. A notebook \n`demonstrating the BranchDetector is available <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20to%20detect%20branches.ipynb>`_.\n\nExample usage:\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n\n    data, _ = make_blobs(1000)\n\n    clusterer = hdbscan.HDBSCAN(branch_detection_data=True).fit(data)\n    branch_detector = hdbscan.BranchDetector().fit(clusterer)\n    branch_detector.cluster_approximation_graph_.plot(edge_width=0.1)\n\n\nBased on the paper:\n    D.M. Bot, J. Peeters, J. Liesenborgs and J. Aerts\n    *FLASC: a flare-sensitive clustering algorithm.*\n    PeerJ Computer Science, Vol 11, April 2025, e2792.\n    https://doi.org/10.7717/peerj-cs.2792.\n\n----------\nInstalling\n----------\n\nEasiest install, if you have Anaconda (thanks to conda-forge which is awesome!):\n\n.. code:: bash\n\n    conda install -c conda-forge hdbscan\n\nPyPI install, presuming you have an up to date pip:\n\n.. code:: bash\n\n    pip install hdbscan\n\nBinary wheels for a number of platforms are available thanks to the work of\nRyan Helinski <rlhelinski@gmail.com>.\n\nIf pip is having difficulties pulling the dependencies then we'd suggest to first upgrade\npip to at least version 10 and try again:\n\n.. code:: bash\n\n    pip install --upgrade pip\n    pip install hdbscan\n\nOtherwise install the dependencies manually using anaconda followed by pulling hdbscan from pip:\n\n.. code:: bash\n\n    conda install cython\n    conda install numpy scipy\n    conda install scikit-learn\n    pip install hdbscan\n\n\nFor a manual install of the latest code directly from GitHub:\n\n.. code:: bash\n\n    pip install --upgrade git+https://github.com/scikit-learn-contrib/hdbscan.git#egg=hdbscan\n\n\nAlternatively download the package, install requirements, and manually run the installer:\n\n\n.. code:: bash\n\n    wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip\n    unzip master.zip\n    rm master.zip\n    cd hdbscan-master\n    \n    pip install -r requirements.txt\n    \n    python setup.py install\n\n-----------------\nRunning the Tests\n-----------------\n\nThe package tests can be run after installation using the command:\n\n.. code:: bash\n\n    nosetests -s hdbscan\n\nor, if ``nose`` is installed but ``nosetests`` is not in your ``PATH`` variable:\n\n.. code:: bash\n\n    python -m nose -s hdbscan\n\nIf one or more of the tests fail, please report a bug at https://github.com/scikit-learn-contrib/hdbscan/issues/new\n\n--------------\nPython Version\n--------------\n\nThe hdbscan library supports both Python 2 and Python 3. However we recommend Python 3 as the better option if it is available to you.\n    \n----------------\nHelp and Support\n----------------\n\nFor simple issues you can consult the `FAQ <https://hdbscan.readthedocs.io/en/latest/faq.html>`_ in the documentation.\nIf your issue is not suitably resolved there, please check the `issues <https://github.com/scikit-learn-contrib/hdbscan/issues>`_ on github. Finally, if no solution is available there feel free to `open an issue <https://github.com/scikit-learn-contrib/hdbscan/issues/new>`_ ; the authors will attempt to respond in a reasonably timely fashion.\n\n------------\nContributing\n------------\n\nWe welcome contributions in any form! Assistance with documentation, particularly expanding tutorials,\nis always welcome. To contribute please `fork the project <https://github.com/scikit-learn-contrib/hdbscan/issues#fork-destination-box>`_ make your changes and submit a pull request. We will do our best to work through any issues with\nyou and get your code merged into the main branch.\n\n------\nCiting\n------\n\nIf you have used this codebase in a scientific publication and wish to cite it, please use the `Journal of Open Source Software article <http://joss.theoj.org/papers/10.21105/joss.00205>`_.\n\n    L. McInnes, J. Healy, S. Astels, *hdbscan: Hierarchical density based clustering*\n    In: Journal of Open Source Software, The Open Journal, volume 2, number 11.\n    2017\n    \n.. code:: bibtex\n\n    @article{mcinnes2017hdbscan,\n      title={hdbscan: Hierarchical density based clustering},\n      author={McInnes, Leland and Healy, John and Astels, Steve},\n      journal={The Journal of Open Source Software},\n      volume={2},\n      number={11},\n      pages={205},\n      year={2017}\n    }\n    \nTo reference the high performance algorithm developed in this library please cite our paper in ICDMW 2017 proceedings.\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017\n\n\n.. code:: bibtex\n\n    @inproceedings{mcinnes2017accelerated,\n      title={Accelerated Hierarchical Density Based Clustering},\n      author={McInnes, Leland and Healy, John},\n      booktitle={Data Mining Workshops (ICDMW), 2017 IEEE International Conference on},\n      pages={33--42},\n      year={2017},\n      organization={IEEE}\n    }\n\nIf you used the branch-detection functionality in this library please cite our `PeerJ paper <https://peerj.com/articles/cs-2792/>`_: \n\n    Bot DM, Peeters J, Liesenborgs J, Aerts J. \n    *FLASC: a flare-sensitive clustering algorithm.*\n    In: PeerJ Computer Science, Volume 11, e2792, 2025.\n    https://doi.org/10.7717/peerj-cs.2792 \n\n.. code:: bibtex\n\n    @article{bot2025flasc,\n        title   = {{FLASC: a flare-sensitive clustering algorithm}},\n        author  = {Bot, Dani{\\\"{e}}l M. and Peeters, Jannes and Liesenborgs, Jori and Aerts, Jan},\n        year    = {2025},\n        month   = {apr},\n        journal = {PeerJ Comput. Sci.},\n        volume  = {11},\n        pages   = {e2792},\n        issn    = {2376-5992},\n        doi     = {10.7717/peerj-cs.2792},\n        url     = {https://peerj.com/articles/cs-2792},\n    }\n\n---------\nLicensing\n---------\n\nThe hdbscan package is 3-clause BSD licensed. Enjoy.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3DC8:7A4F8:182C28:5E6DBC:6AB92B12"},"text_sha256":"4cd133fd1eaf6b8476e2ded1bceee142f42de135b3628c912c7dddc974d83b1e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"aksnzhy/xlearn","input_row":{"repository":"aksnzhy/xlearn","url":"https://github.com/aksnzhy/xlearn","name":"xlearn","owner":"aksnzhy","description":"High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3089,"issues":301,"created_at":"2017-06-10T08:09:31Z","updated_at":"2026-09-02T09:11:02Z","first_commit_at":"2017-06-10T08:09:31Z","last_commit_at":"2022-06-05T10:44:18Z","activity_months":59.829999999999998,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:23.630Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"aksnzhy/xlearn","visibility":"public","created_at":"2017-06-10T08:09:31Z","updated_at":"2026-09-02T09:11:02Z","private":false,"fork":false,"archived":false,"stargazers_count":3089,"open_issues_count":194,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2403","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093F:0BA1:D87132:FE5B93:6AB92B13"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2402","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:1784747:1BA8601:6AB92B14"},"commit":{"sha":"f88b825f6bb20756a4e3ce3d5c37551b242ce251","url":"https://github.com/aksnzhy/xlearn/commit/f88b825f6bb20756a4e3ce3d5c37551b242ce251","date":"2018-05-10T14:44:04Z","author_date":"2018-05-10T14:44:04Z","committer_date":"2018-05-10T14:44:04Z","tree_sha":"216eda4029bf87d2eb9e51cdf295c742bde9235b","message_first_line":"Merge pull request #111 from purkyston/purk_thread_pool"},"tree_request_status":200,"tree_rate":{"github_remaining":"2401","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DA:37D6E2:180D585:1C315EB:6AB92B14"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2391,"blob_sha":"7e5577cdf588f732a6b7656ac29b24efbca482c2","priority":0}],"documents":[{"path":"README.md","size":2391,"blob_sha":"7e5577cdf588f732a6b7656ac29b24efbca482c2","priority":0,"status":200,"text":"<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/xlearn_logo.png\" width = \"400\"/>    \n\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](./LICENCE)\n![Project Status](https://img.shields.io/badge/version-0.3.1-green.svg)\n[![Travis](https://img.shields.io/travis/rust-lang/rust.svg)]()\n\n[Installation](http://xlearn-doc.readthedocs.io/en/latest/install.html) |\n[Documents](http://xlearn-doc.readthedocs.io/en/latest/start.html) |\n[RoadMap](doc/roadmap.md) |\n[News](doc/news.md) \n\n## What is xLearn?\n\nxLearn is a ***high performance***, ***easy-to-use***, and ***scalable*** machine learning package, \nwhich can be used to solve large-scale machine learning problems. xLearn is especially useful for solving machine\nlearning problems on large-scale sparse data, which is very common in Internet services such as online advertisement \nand recommender systems in recent years.  If you are the user  of liblinear, libfm, or libffm, now xLearn is your \nanother better choice. \n\n[Get Started!](http://xlearn-doc.readthedocs.io/en/latest/start.html)\n\n### Performance \n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/speed.png\" width = \"800\"/>   \n\nxLearn is developed with high-performance C++ code with careful design and optimizations. Our system is designed to maximize CPU and memory utilization, provide cache-aware computation, and support lock-free learning. By combining these insights, xLearn is 5x-13x faster compared to similar systems.\n\n### Ease-of-use\n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/code.png\" width = \"600\"/>   \n\nxLearn does not rely on any troublesome third-party library, and hence users can just clone the code and compile it by using cmake. Also, xLearn supports very simple Python and R API for data scientists, and it also offers many useful features that have been widely used in machine learning and data mining competitions, such as cross-validation, early-stop, etc.\n\n### Scalability\n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/scalability.png\" width = \"650\"/>   \n\nxLearn can be used for solving large-scale machine learning problems. First, xLearn supports out-of-core training, which can handle very large data (TB) by just leveraging the disk of a PC. In addition, xLearn supports distributed training, which scales beyond billions of example across many machines by using the parameter server framework.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B62:324E19:1807D5:5E4923:6AB92B13"},"text_sha256":"53966587bf9dd4b8ed30205af76f5a5f8fb998bcf9d67053b9a97011e385d502"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2400","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A7:71C58:17B7849:1BDB91E:6AB92B15"},"commit":{"sha":"4c240aa0aa63c1d105fb9aec583adc2ad2840368","url":"https://github.com/aksnzhy/xlearn/commit/4c240aa0aa63c1d105fb9aec583adc2ad2840368","date":"2022-06-05T10:44:18Z","author_date":"2022-06-05T10:44:18Z","committer_date":"2022-06-05T10:44:18Z","tree_sha":"855b013907d33b7e1bb74f688e5314b0e9bae510","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2399","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0932:2EA1B4:17D706F:1BFB225:6AB92B15"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5012,"blob_sha":"587a5c6b737b0d48649d1bb6c0fe3639103cfaa0","priority":0}],"documents":[{"path":"README.md","size":5012,"blob_sha":"587a5c6b737b0d48649d1bb6c0fe3639103cfaa0","priority":0,"status":200,"text":"<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/xlearn_logo.png\" width = \"400\"/>\n\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](./LICENCE)\n[![Project Status](https://img.shields.io/badge/version-0.4.4-green.svg)]()\n\n## What is xLearn?\n\nxLearn is a ***high performance***, ***easy-to-use***, and ***scalable*** machine learning package that contains linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM), all of which can be used to solve large-scale machine learning problems. xLearn is especially useful for solving machine learning problems on large-scale sparse data. Many real world datasets deal with high dimensional sparse feature vectors like a recommendation system where the number of categories and users is on the order of millions. In that case, if you are the user of liblinear, libfm, and libffm, now xLearn is your another better choice.\n\n[Get Started! (English)](http://xlearn-doc.readthedocs.io/en/latest/index.html)\n\n[Get Started! (中文)](http://xlearn-doc-cn.readthedocs.io/en/latest/index.html)\n\n### Performance\n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/speed.png\" width = \"800\"/>\n\nxLearn is developed by high-performance C++ code with careful design and optimizations. Our system is designed to maximize CPU and memory utilization, provide cache-aware computation, and support lock-free learning. By combining these insights, xLearn is 5x-13x faster compared to similar systems.\n\n### Ease-of-use\n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/code.png\" width = \"600\"/>\n\nxLearn does not rely on any third-party library and users can just clone the code and compile it by using cmake. Also, xLearn supports very simple Python and CLI interface for data scientists, and it also offers many useful features that have been widely used in machine learning and data mining competitions, such as cross-validation, early-stop, etc.\n\n### Scalability\n\n<img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/scalability.png\" width = \"650\"/>\n\nxLearn can be used for solving large-scale machine learning problems. xLearn supports out-of-core training, which can handle very large data (TB) by just leveraging the disk of a PC.\n\n## How to Contribute\n\nxLearn has been developed and used by many active community members. Your help is very valuable to make it better for everyone.\n\n * Please contribute if you find any bug in xLearn.\n * Contribute new features you want to see in xLearn.\n * Contribute to the tests to make it more reliable.\n * Contribute to the documents to make it clearer for everyone.\n * Contribute to the examples to share your experience with other users.\n * Open issue if you met problems during development.\n\nNote that, please post iusse and contribution in *English* so that everyone can get help from them.\n\n## What's New\n\n - 2019-10-13 [Andrew Kane](https://github.com/ankane) add [Ruby bindings](https://github.com/ankane/xlearn) for xLearn!\n\n - 2019-4-25 xLearn 0.4.4 version release. Main update:\n\n    * Support Python DMatrix\n    * Better Windows support\n    * Fix bugs in previous version\n\n - 2019-3-25 xLearn 0.4.3 version release. Main update:\n    * Fix bugs in previous version\n\n - 2019-3-12 xLearn 0.4.2 version release. Main update:\n    * Release Windows version of xLearn\n\n - 2019-1-30 xLearn 0.4.1 version release. Main update:\n    * More flexible data reader\n\n - 2018-11-22 xLearn 0.4.0 version release. Main update:\n\n    * Fix bugs in previous version\n    * Add online learning for xLearn\n\n - 2018-11-10 xLearn 0.3.8 version release. Main update:\n\n    * Fix bugs in previous version.\n    * Update early-stop mechanism.\n\n - 2018-11-08. xLearn gets 2000 star! Congs!\n\n - 2018-10-29 xLearn 0.3.7 version release. Main update:\n\n    * Add incremental Reader, which can save 50% memory cost.\n\n - 2018-10-22 xLearn 0.3.5 version release. Main update:\n\n    * Fix bugs in 0.3.4.\n\n - 2018-10-21 xLearn 0.3.4 version release. Main update:\n\n    * Fix bugs in on-disk training.\n    * Support new file format.\n\n - 2018-10-14 xLearn 0.3.3 version release. Main update:\n\n    * Fix segmentation fault in prediction task.\n    * Update early-stop meachnism.\n\n - 2018-09-21 xLearn 0.3.2 version release. Main update:\n\n    * Fix bugs in previous version\n    * New TXT format for model output\n\n - 2018-09-08 xLearn uses the new logo:\n\n <img src=\"https://github.com/aksnzhy/xLearn/raw/master/img/xlearn_logo.png\" width = \"300\"/>\n\n - 2018-09-07 The [Chinese document](http://xlearn-doc-cn.readthedocs.io/en/latest/index.html) is available now!\n\n - 2018-03-08 xLearn 0.3.0 version release. Main update:\n\n    * Fix bugs in previous version\n    * Solved the memory leak problem for on-disk learning\n    * Support TXT model checkpoint\n    * Support Scikit-Learn API\n\n - 2017-12-18 xLearn 0.2.0 version release. Main update:\n\n    * Fix bugs in previous version\n    * Support pip installation\n    * New Documents\n    * Faster FTRL algorithm\n\n - 2017-11-24 The first version (0.1.0) of xLearn release !\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F98:3D40A:172580:5D66C1:6AB92B15"},"text_sha256":"10edee0dd6e66c00267b5803452d1cddd7b7c043770a14f9e7c649c0f05bf3e8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"heavyai/heavydb","input_row":{"repository":"heavyai/heavydb","url":"https://github.com/heavyai/heavydb","name":"heavydb","owner":"heavyai","description":"HeavyDB (formerly MapD/OmniSciDB)","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3061,"issues":551,"created_at":"2017-05-07T15:07:56Z","updated_at":"2026-09-26T09:59:07Z","first_commit_at":"2014-06-18T11:33:06Z","last_commit_at":"2026-09-23T18:32:45Z","activity_months":147.18000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:26.265Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"heavyai/heavydb","visibility":"public","created_at":"2017-05-07T15:07:56Z","updated_at":"2026-09-26T09:59:07Z","private":false,"fork":false,"archived":false,"stargazers_count":3061,"open_issues_count":7,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2398","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B6:6C6ED:17EFF72:1C13838:6AB92B16"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2397","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17EFFAB:1C13879:6AB92B16"},"commit":{"sha":"587a278a237300e57dddd67f9acb3861f5523995","url":"https://github.com/heavyai/heavydb/commit/587a278a237300e57dddd67f9acb3861f5523995","date":"2018-05-23T20:49:07Z","author_date":"2018-05-22T22:43:56Z","committer_date":"2018-05-23T20:49:07Z","tree_sha":"24dcb944e4ea15d62c720319b8521518a1362160","message_first_line":"Disabling GEOGRAPHY type"},"tree_request_status":200,"tree_rate":{"github_remaining":"2396","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:1810C33:1C34753:6AB92B17"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13584,"blob_sha":"87057c8c7b1ad985a630fdf94395bcc8f236e978","priority":0}],"documents":[{"path":"README.md","size":13584,"blob_sha":"87057c8c7b1ad985a630fdf94395bcc8f236e978","priority":0,"status":200,"text":"MapD Core\n=========\n\nMapD Core is an in-memory, column store, SQL relational database that was designed from the ground up to run on GPUs.\n\n# Table of Contents\n\n- [Links](#links)\n- [License](#license)\n- [Contributing](#contributing)\n- [Building](#building)\n- [Testing](#testing)\n- [Using](#using)\n- [Code Style](#code-style)\n- [Dependencies](#dependencies)\n- [Roadmap](ROADMAP.md)\n\n# Links\n\n- [Documentation](https://www.mapd.com/docs/)\n- [Release Notes](https://www.mapd.com/docs/latest/release-notes/platform/)\n- [Community Forum](https://community.mapd.com)\n- [MapD Homepage](https://www.mapd.com)\n- [MapD Blog](https://www.mapd.com/blog/)\n- [MapD Downloads](https://www.mapd.com/platform/downloads/)\n\n# License\n\nThis project is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\nThe repository includes a number of third party packages provided under separate licenses. Details about these packages and their respective licenses is at [ThirdParty/licenses/index.md](ThirdParty/licenses/index.md).\n\nThe standard build process for this project downloads the Community Edition of the MapD Immerse visual analytics client. This version of MapD Immerse is governed by a separate license agreement, included in the file `EULA-CE.txt`, and may only be used for non-commercial purposes.\n\n# Contributing\n\nIn order to clarify the intellectual property license granted with Contributions from any person or entity, MapD must have a Contributor License Agreement (\"CLA\") on file that has been signed by each Contributor, indicating agreement to the [Contributor License Agreement](CLA.txt). After making a pull request, a bot will notify you if a signed CLA is required and provide instructions for how to sign it. Please read the agreement carefully before signing and keep a copy for your records.\n\n# Building\n\nIf this is your first time building MapD Core, install the dependencies mentioned in the [Dependencies](#dependencies) section below.\n\nMapD uses CMake for its build system.\n\n    mkdir build\n    cd build\n    cmake -DCMAKE_BUILD_TYPE=debug ..\n    make -j 4\n\nThe following `cmake`/`ccmake` options can enable/disable different features:\n\n- `-DCMAKE_BUILD_TYPE=release` build type and compiler options to use. Options: `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`, and unset.\n- `-DENABLE_CUDA=off` disable CUDA. Default `on`.\n- `-DMAPD_IMMERSE_DOWNLOAD=on` download the latest master build of Immerse / `mapd2-frontend`. Default `on`.\n- `-DMAPD_DOCS_DOWNLOAD=on` download the latest master build of the documentation / `docs.mapd.com`. Default `off`. Note: this is a >50MB download.\n- `-DPREFER_STATIC_LIBS=on` static link dependencies, if available. Default `off`.\n- `-DENABLE_AWS_S3=on` enable AWS S3 support, if available. Default `on`.\n- `-DENABLE_TESTS=on` build unit tests. Default `on`.\n\n# Testing\n\nMapD Core uses [Google Test](https://github.com/google/googletest) as its main testing framework. Tests reside under the [Tests](Tests) directory.\n\nThe `sanity_tests` target runs the most common tests. If using Makefiles to build, the tests may be run using:\n\n    make sanity_tests\n\n## AddressSanitizer\n\n[AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) can be activated by setting the `ENABLE_ASAN` CMake flag in a fresh build directory. At this time CUDA must also be disabled. In an empty build directory run CMake and compile:\n\n    mkdir build && cd build\n    cmake -DENABLE_ASAN=on -DENABLE_CUDA=off ..\n    make -j 4\n\nFinally run the tests:\n\n    export ASAN_OPTIONS=alloc_dealloc_mismatch=0:handle_segv=0\n    make sanity_tests\n\n## ThreadSanitizer\n\n[ThreadSanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual) can be activated by setting the `ENABLE_TSAN` CMake flag in a fresh build directory. At this time CUDA must also be disabled. In an empty build directory run CMake and compile:\n\n    mkdir build && cd build\n    cmake -DENABLE_TSAN=on -DENABLE_CUDA=off ..\n    make -j 4\n\nWe use a TSAN suppressions file to ignore warnings in third party libraries. Source the suppressions file by adding it to your `TSAN_OPTIONS` env:\n\n    export TSAN_OPTIONS=\"suppressions=/path/to/mapd/config/tsan.suppressions\"\n\nFinally run the tests:\n\n    make sanity_tests\n\n# Using\n\nThe [`startmapd`](startmapd) wrapper script may be used to start MapD Core in a testing environment. This script performs the following tasks:\n\n- initializes the `data` storage directory via `initdb`, if required\n- starts the main MapD Core server, `mapd_server`\n- starts the MapD Core web server, `mapd_web_server`, for serving MapD Immerse\n- offers to download and import a sample dataset, using the `insert_sample_data` script\n- attempts to open MapD Immerse in your web browser\n\nAssuming you are in the `build` directory, and it is a subdirectory of the `mapd-core` repository, `startmapd` may be run by:\n\n    ../startmapd\n\n## Starting Manually\n\nIt is assumed that the following commands are run from inside the `build` directory.\n\nInitialize the `data` storage directory. This command only needs to be run once.\n\n    mkdir data && ./bin/initdb data\n\nStart the MapD Core server:\n\n    ./bin/mapd_server\n\nIn a new terminal, start the MapD Core web server:\n\n    ./bin/mapd_web_server\n\nIf desired, insert a sample dataset by running the `insert_sample_data` script in a new terminal:\n\n    ../insert_sample_data\n\nYou can now start using the database. The `mapdql` utility may be used to interact with the database from the command line:\n\n    ./bin/mapdql -p HyperInteractive\n\nwhere `HyperInteractive` is the default password. The default user `mapd` is assumed if not provided.\n\nYou can also interact with the database using the web-based MapD Immerse frontend by visiting the web server's default port of `9092`:\n\n[http://localhost:9092](http://localhost:9092)\n\nNote: usage of MapD Immerse is governed by a separate license agreement, provided under `EULA-CE.txt`. The version bundled with this project may only be used for non-commercial purposes.\n\n# Code Style\n\nA [`.clang-format`](http://clang.llvm.org/docs/ClangFormat.html) style configuration, based on the Chromium style guide, is provided at the top level of the repository. Please format your code using a recent version (3.8+) of ClangFormat before submitting.\n\nTo use:\n\n    clang-format -i File.cpp\n\nContributed code should compile without generating warnings by recent compilers (gcc 4.9, gcc 5.3, clang 3.8) on most Linux distributions. Changes to the code should follow the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).\n\n# Dependencies\n\nMapD has the following dependencies:\n\n| Package | Min Version | Required |\n| ------- | ----------- | -------- |\n| [CMake](https://cmake.org/) | 3.3 | yes |\n| [LLVM](http://llvm.org/) | 3.8-4.0 | yes |\n| [GCC](http://gcc.gnu.org/) | 4.9 | no, if building with clang |\n| [Go](https://golang.org/) | 1.6 | yes |\n| [Boost](http://www.boost.org/) | 1.57.0 | yes |\n| [OpenJDK](http://openjdk.java.net/) | 1.7 | yes |\n| [CUDA](http://nvidia.com/cuda) | 7.5 | yes, if compiling with GPU support |\n| [gperftools](https://github.com/gperftools/gperftools) | | yes |\n| [gdal](http://gdal.org/) | | yes |\n| [Arrow](https://arrow.apache.org/) | 0.7.0 | yes |\n\nDependencies for `mapd_web_server` and other Go utils are in [`ThirdParty/go`](ThirdParty/go). See [`ThirdParty/go/src/mapd/vendor/README.md`](ThirdParty/go/src/mapd/vendor/README.md) for instructions on how to add new deps.\n\n## CentOS 7\n\nMapD Core requires a number of dependencies which are not provided in the common CentOS/RHEL package repositories. The script [scripts/mapd-deps-centos.sh](scripts/mapd-deps-centos.sh) is provided to automatically build and install these dependencies. A prebuilt package containing these dependencies is also provided for CentOS 7 (x86_64).\n\nFirst install the basic build tools:\n\n    sudo yum groupinstall -y \"Development Tools\"\n    sudo yum install -y \\\n        zlib-devel \\\n        epel-release \\\n        libssh \\\n        openssl-devel \\\n        ncurses-devel \\\n        git \\\n        maven \\\n        java-1.8.0-openjdk-devel \\\n        java-1.8.0-openjdk-headless \\\n        gperftools \\\n        gperftools-devel \\\n        gperftools-libs \\\n        python-devel \\\n        wget \\\n        curl \\\n        environment-modules\n\nNext download and install the prebuilt dependencies:\n\n    curl -OJ https://internal-dependencies.mapd.com/mapd-deps/deploy.sh\n    sudo bash deploy.sh\n\nThese dependencies will be installed to a directory under `/usr/local/mapd-deps`. The `deploy.sh` script also installs [Environment Modules](http://modules.sf.net) in order to simplify managing the required environment variables. Log out and log back in after running the `deploy.sh` script in order to active Environment Modules command, `module`.\n\nThe `mapd-deps` environment module is disabled by default. To activate for your current session, run:\n\n    module load mapd-deps\n\nTo disable the `mapd-deps` module:\n\n    module unload mapd-deps\n\nWARNING: The `mapd-deps` package contains newer versions of packages such as GCC and ncurses which might not be compatible with the rest of your environment. Make sure to disable the `mapd-deps` module before compiling other packages.\n\nInstructions for installing CUDA are below.\n\n### CUDA\n\nIt is preferred, but not necessary, to install CUDA and the NVIDIA drivers using the .rpm using the [instructions provided by NVIDIA](https://developer.nvidia.com/cuda-downloads). The `rpm (network)` method (preferred) will ensure you always have the latest stable drivers, while the `rpm (local)` method allows you to install does not require Internet access.\n\nThe .rpm method requires DKMS to be installed, which is available from the [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL) repository:\n\n    sudo yum install epel-release\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n### Environment Variables\n\n[scripts/mapd-deps-centos.sh](scripts/mapd-deps-centos.sh) generates two files with the appropriate environment variables: `mapd-deps-<date>.sh` (for sourcing from your shell config) and `mapd-deps-<date>.modulefile` (for use with [Environment Modules](http://modules.sf.net), yum package `environment-modules`). These files are placed in mapd-deps install directory, usually `/usr/local/mapd-deps/<date>`. Either of these may be used to configure your environment: the `.sh` may be sourced in your shell config; the `.modulefile` needs to be moved to the modulespath.\n\n## macOS\n\n[scripts/mapd-deps-osx.sh](scripts/mapd-deps-osx.sh) is provided that will automatically install and/or update [Homebrew](http://brew.sh/) and use that to install all dependencies. Please make sure macOS is completely update to date and Xcode is installed before running. Xcode can be installed from the App Store.\n\n### CUDA\n\n`mapd-deps-osx.sh` will automatically install CUDA via Homebrew and add the correct environment variables to `~/.bash_profile`.\n\n### Java\n\n`mapd-deps-osx.sh` will automatically install Java and Maven via Homebrew and add the correct environment variables to `~/.bash_profile`.\n\n## Ubuntu 16.04 - 17.10\n\nMost build dependencies required by MapD Core are available via APT. Certain dependencies such as Thrift, Blosc, and Folly must be built as they either do not exist in the default repositories or have outdated versions. The provided [scripts/mapd-deps-ubuntu.sh](scripts/mapd-deps-ubuntu.sh) script will install all required dependencies (except CUDA) and build the dependencies which require it. The built dependencies will be installed to `/usr/local/mapd-deps/` by default; see the Environment Variables section below for how to add these dependencies to your environment.\n\n### Environment Variables\n\nThe CUDA and mapd-deps `lib` directories need to be added to `LD_LIBRARY_PATH`; the CUDA and mapd-deps `bin` directories need to be added to `PATH`. The `mapd-deps-ubuntu.sh` script above will generate a script named `mapd-deps.sh` containing the environment variables which need to be set. Simply source this file in your current session (or symlink it to `/etc/profile.d/mapd-deps.sh`) in order to activate it:\n\n    source /usr/local/mapd-deps/mapd-deps.sh\n\n### CUDA\n\nRecent versions of Ubuntu provide the NVIDIA CUDA Toolkit and drivers in the standard repositories. To install:\n\n    sudo apt install -y \\\n        nvidia-cuda-toolkit\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n## Arch\n\nThe following uses [yaourt](https://wiki.archlinux.org/index.php/Yaourt) to install packages from the [Arch User Repository](https://wiki.archlinux.org/index.php/Arch_User_Repository).\n\n    yaourt -S \\\n        git \\\n        cmake \\\n        boost \\\n        google-glog \\\n        extra/jdk8-openjdk \\\n        clang \\\n        llvm \\\n        thrift \\\n        go \\\n        gdal \\\n        maven\n\n    VERS=1.21-45\n    wget --continue https://github.com/jarro2783/bisonpp/archive/$VERS.tar.gz\n    tar xvf $VERS.tar.gz\n    pushd bisonpp-$VERS\n    ./configure\n    make -j $(nproc)\n    sudo make install\n    popd\n\n### CUDA\n\nCUDA and the NVIDIA drivers may be installed using the following.\n\n    yaourt -S \\\n        linux-headers \\\n        cuda \\\n        nvidia\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n### Environment Variables\n\nThe CUDA `bin` directories need to be added to `PATH`. The easiest way to do so is by creating a new file named `/etc/profile.d/mapd-deps.sh` containing the following:\n\n    PATH=/opt/cuda/bin:$PATH\n    export PATH\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FA2A:386840:185C38:5E9E0D:6AB92B15"},"text_sha256":"9d3dbe8466a8904c0e37480e58a5a922c0da40315b365ac98151183dc381c558"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2395","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:1814B17:1C389D7:6AB92B18"},"commit":{"sha":"da23f70ea060f308bb9536ec8515a4ef1d07a4bd","url":"https://github.com/heavyai/heavydb/commit/da23f70ea060f308bb9536ec8515a4ef1d07a4bd","date":"2025-06-17T16:02:27Z","author_date":"2025-06-16T20:22:50Z","committer_date":"2025-06-17T16:02:27Z","tree_sha":"de609021e2d9d0a78e4cc9d370115be610ec53b6","message_first_line":"remove the unused gorilla/handlers module"},"tree_request_status":200,"tree_rate":{"github_remaining":"2394","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EB:71F98:1834A9E:1C585A7:6AB92B19"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18614,"blob_sha":"f1b93ba562de4f256a223ce2e663f8dde844a0dd","priority":0},{"path":"ThirdParty/jwt-cpp/.github/security.md","size":863,"blob_sha":"768000138d45876de8880f3b5a250816afd81225","priority":1},{"path":"ThirdParty/licenses/xml-security-c.txt","size":11357,"blob_sha":"261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64","priority":1}],"documents":[{"path":"README.md","size":18614,"blob_sha":"f1b93ba562de4f256a223ce2e663f8dde844a0dd","priority":0,"status":200,"text":"HeavyDB (formerly OmniSciDB)\n==============================\n\nHeavyDB is an open source SQL-based, relational, columnar database engine that leverages the full performance and parallelism of modern hardware (both CPUs and GPUs) to enable querying of multi-billion row datasets in milliseconds, without the need for indexing, pre-aggregation, or downsampling.  HeavyDB can be run on hybrid CPU/GPU systems (Nvidia GPUs are currently supported), as well as on CPU-only systems featuring X86, Power, and ARM (experimental support) architectures. To achieve maximum performance, HeavyDB features multi-tiered caching of data between storage, CPU memory, and GPU memory, and an innovative Just-In-Time (JIT) query compilation framework.\n\nFor usage info, see the [product documentation](https://docs.heavy.ai/), and for more details about the system's internal architecture, check out the [developer documentation](https://heavyai.github.io/heavydb/). Further technical discussion can be found on the [HEAVY.AI Community Forum](https://community.heavy.ai).\n\nThe repository includes a number of third party packages provided under separate licenses. Details about these packages and their respective licenses is at [ThirdParty/licenses/index.md](ThirdParty/licenses/index.md).\n\n# Downloads and Installation Instructions\n\nHEAVY.AI provides pre-built binaries for Linux for stable releases of the project:\n\n| Distro | Package type | CPU/GPU | Repository | Docs |\n| --- | --- | --- | --- | --- |\n| CentOS | RPM | CPU | https://releases.heavy.ai/os/yum/stable/cpu |  https://docs.heavy.ai/installation-and-configuration/installation/installing-on-centos/centos-yum-gpu-ee |\n| CentOS | RPM | GPU | https://releases.heavy.ai/os/yum/stable/cuda | https://docs.heavy.ai/installation-and-configuration/installation/installing-on-centos/centos-yum-gpu-ee |\n| Ubuntu | DEB | CPU | https://releases.heavy.ai/os/apt/dists/stable/cpu | https://docs.heavy.ai/installation-and-configuration/installation/installing-on-ubuntu/centos-yum-gpu-ee |\n| Ubuntu | DEB | GPU | https://releases.heavy.ai/os/apt/dists/stable/cuda | https://docs.heavy.ai/installation-and-configuration/installation/installing-on-ubuntu/centos-yum-gpu-ee |\n| * | tarball | CPU | https://releases.heavy.ai/os/tar/heavyai-os-latest-Linux-x86_64-cpu.tar.gz |  |\n| * | tarball | GPU | https://releases.heavy.ai/os/tar/heavyai-os-latest-Linux-x86_64.tar.gz |  |\n***\n\n# Developing HeavyDB: Table of Contents\n\n- [Links](#links)\n- [License](#license)\n- [Contributing](#contributing)\n- [Building](#building)\n- [Testing](#testing)\n- [Using](#using)\n- [Code Style](#code-style)\n- [Dependencies](#dependencies)\n- [Roadmap](ROADMAP.md)\n\n# Links\n\n- [Developer Documentation](https://heavyai.github.io/heavydb/)\n- [Doxygen-generated Documentation](http://doxygen.mapd.com/)\n- [Product Documentation](https://docs.heavy.ai/)\n- [Release Notes](https://docs.heavy.ai/overview/release-notes)\n- [Community Forum](https://community.heavy.ai)\n- [HEAVY.AI Homepage](https://www.heavy.ai)\n- [HEAVY.AI Blog](https://www.heavy.ai/blog/)\n- [HEAVY.AI Downloads](https://www.heavy.ai/platform/downloads/)\n\n# License\n\nThis project is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\nThe repository includes a number of third party packages provided under separate licenses. Details about these packages and their respective licenses is at [ThirdParty/licenses/index.md](ThirdParty/licenses/index.md).\n\n# Contributing\n\nIn order to clarify the intellectual property license granted with Contributions from any person or entity, HEAVY.AI must have a Contributor License Agreement (\"CLA\") on file that has been signed by each Contributor, indicating agreement to the [Contributor License Agreement](CLA.txt). After making a pull request, a bot will notify you if a signed CLA is required and provide instructions for how to sign it. Please read the agreement carefully before signing and keep a copy for your records.\n\n# Building\n\nIf this is your first time building HeavyDB, install the dependencies mentioned in the [Dependencies](#dependencies) section below.\n\nHeavyDB uses CMake for its build system.\n\n    mkdir build\n    cd build\n    cmake -DCMAKE_BUILD_TYPE=debug ..\n    make -j 4\n\nThe following `cmake`/`ccmake` options can enable/disable different features:\n\n- `-DCMAKE_BUILD_TYPE=release` - Build type and compiler options to use.\n                                 Options are `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`, and unset.\n- `-DENABLE_ASAN=off` - Enable address sanitizer. Default is `off`.\n- `-DENABLE_AWS_S3=on` - Enable AWS S3 support, if available. Default is `on`.\n- `-DENABLE_CUDA=off` - Disable CUDA. Default is `on`.\n- `-DENABLE_CUDA_KERNEL_DEBUG=off` - Enable debugging symbols for CUDA kernels. Will dramatically reduce kernel performance. Default is `off`.\n- `-DENABLE_DECODERS_BOUNDS_CHECKING=off` - Enable bounds checking for column decoding. Default is `off`.\n- `-DENABLE_IWYU=off` - Enable include-what-you-use. Default is `off`.\n- `-DENABLE_JIT_DEBUG=off` - Enable debugging symbols for the JIT. Default is `off`.\n- `-DENABLE_ONLY_ONE_ARCH=off` - Compile GPU code only for the host machine's architecture, speeding up compilation. Default is `off`.\n- `-DENABLE_PROFILER=off` - Enable google perftools. Default is `off`.\n- `-DENABLE_STANDALONE_CALCITE=off` - Require standalone Calcite server. Default is `off`.\n- `-DENABLE_TESTS=on` - Build unit tests. Default is `on`.\n- `-DENABLE_TSAN=off` - Enable thread sanitizer. Default is `off`.\n- `-DENABLE_CODE_COVERAGE=off` - Enable code coverage symbols (clang only). Default is `off`.\n- `-DPREFER_STATIC_LIBS=off` - Static link dependencies, if available. Default is `off`. Only works on CentOS.\n\n# Testing\n\nHeavyDB uses [Google Test](https://github.com/google/googletest) as its main testing framework. Tests reside under the [Tests](Tests) directory.\n\nThe `sanity_tests` target runs the most common tests. If using Makefiles to build, the tests may be run using:\n\n    make sanity_tests\n\n## AddressSanitizer\n\n[AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) can be activated by setting the `ENABLE_ASAN` CMake flag in a fresh build directory. At this time CUDA must also be disabled. In an empty build directory run CMake and compile:\n\n    mkdir build && cd build\n    cmake -DENABLE_ASAN=on -DENABLE_CUDA=off ..\n    make -j 4\n\nFinally run the tests:\n\n    export ASAN_OPTIONS=alloc_dealloc_mismatch=0:handle_segv=0\n    make sanity_tests\n\n## ThreadSanitizer\n\n[ThreadSanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual) can be activated by setting the `ENABLE_TSAN` CMake flag in a fresh build directory. At this time CUDA must also be disabled. In an empty build directory run CMake and compile:\n\n    mkdir build && cd build\n    cmake -DENABLE_TSAN=on -DENABLE_CUDA=off ..\n    make -j 4\n\nWe use a TSAN suppressions file to ignore warnings in third party libraries. Source the suppressions file by adding it to your `TSAN_OPTIONS` env:\n\n    export TSAN_OPTIONS=\"suppressions=/path/to/heavydb/config/tsan.suppressions\"\n\nFinally run the tests:\n\n    make sanity_tests\n\n# Generating Packages\n\nHeavyDB uses [CPack](https://cmake.org/cmake/help/latest/manual/cpack.1.html) to generate packages for distribution. Packages generated on CentOS with static linking enabled can be used on most other recent Linux distributions.\n\nTo generate packages on CentOS (assuming starting from top level of the heavydb repository):\n\n    mkdir build-package && cd build-package\n    cmake -DPREFER_STATIC_LIBS=on -DCMAKE_BUILD_TYPE=release ..\n    make -j 4\n    cpack -G TGZ\n\nThe first command creates a fresh build directory, to ensure there is nothing left over from a previous build.\n\nThe second command configures the build to prefer linking to the dependencies' static libraries instead of the (default) shared libraries, and to build using CMake's `release` configuration (enables compiler optimizations). Linking to the static versions of the libraries libraries reduces the number of dependencies that must be installed on target systems.\n\nThe last command generates a `.tar.gz` package. The `TGZ` can be replaced with, for example, `RPM` or `DEB` to generate a `.rpm` or `.deb`, respectively.\n\n# Using\n\nThe [`startheavy`](startheavy) wrapper script may be used to start HeavyDB in a testing environment. This script performs the following tasks:\n\n- initializes the `data` storage directory via `initdb`, if required\n- starts the main HeavyDB server, `heavydb`\n- offers to download and import a sample dataset, using the `insert_sample_data` script\n\nAssuming you are in the `build` directory, and it is a subdirectory of the `heavydb` repository, `startheavy` may be run by:\n\n    ../startheavy\n\n## Starting Manually\n\nIt is assumed that the following commands are run from inside the `build` directory.\n\nInitialize the `data` storage directory. This command only needs to be run once.\n\n    mkdir data && ./bin/initdb data\n\nStart the HeavyDB server:\n\n    ./bin/heavydb\n\nIf desired, insert a sample dataset by running the `insert_sample_data` script in a new terminal:\n\n    ../insert_sample_data\n\nYou can now start using the database. The `heavysql` utility may be used to interact with the database from the command line:\n\n    ./bin/heavysql -p HyperInteractive\n\nwhere `HyperInteractive` is the default password. The default user `admin` is assumed if not provided.\n\n# Code Style\n\nContributed code should compile without generating warnings by recent compilers on most Linux distributions. Changes to the code should follow the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).\n\n## clang-format\n\nA [`.clang-format`](https://clang.llvm.org/docs/ClangFormat.html) style configuration, based on the Chromium style guide, is provided at the top level of the repository. Please format your code using a recent version (8.0+ preferred) of ClangFormat before submitting.\n\nTo use:\n\n    clang-format -i File.cpp\n\n## clang-tidy\n\nA [`.clang-tidy`](https://clang.llvm.org/extra/clang-tidy/) configuration is provided at the top level of the repository. Please lint your code using a recent version (6.0+ preferred) of clang-tidy before submitting.\n\n`clang-tidy` requires all generated files to exist before running. The easiest way to accomplish this is to simply run a full build before running `clang-tidy`. A build target which runs `clang-tidy` is provided. To use:\n\n    make run-clang-tidy\n\nNote: `clang-tidy` may make invalid or overly verbose changes to the source code. It is recommended to first commit your changes, then run `clang-tidy` and review its recommended changes before amending them to your commit.\n\nNote: the `clang-tidy` target uses the `run-clang-tidy.py` script provided with LLVM, which may depend on `PyYAML`. The target also depends on `jq`, which is used to filter portions of the `compile_commands.json` file.\n\n# Dependencies\n\nHeavyDB has the following dependencies:\n\n| Package | Min Version | Required |\n| ------- | ----------- | -------- |\n| [CMake](https://cmake.org/) | 3.16 | yes |\n| [LLVM](http://llvm.org/) | 9.0 | yes |\n| [GCC](http://gcc.gnu.org/) | 8.4.0 | no, if building with clang |\n| [Go](https://golang.org/) | 1.12 | yes |\n| [Boost](http://www.boost.org/) | 1.72.0 | yes |\n| [OpenJDK](http://openjdk.java.net/) | 1.7 | yes |\n| [CUDA](http://nvidia.com/cuda) | 11.0 | yes, if compiling with GPU support |\n| [gperftools](https://github.com/gperftools/gperftools) | | yes |\n| [gdal](http://gdal.org/) | 2.4.2 | yes |\n| [Arrow](https://arrow.apache.org/) | 3.0.0 | yes |\n\n## CentOS 7\n\nHeavyDB requires a number of dependencies which are not provided in the common CentOS/RHEL package repositories. A prebuilt package containing all these dependencies is provided for CentOS 7 (x86_64).\n\nUse the [scripts/mapd-deps-prebuilt.sh](scripts/mapd-deps-prebuilt.sh) build script to install prebuilt dependencies.\n\nThese dependencies will be installed to a directory under `/usr/local/mapd-deps`. The `mapd-deps-prebuilt.sh` script also installs [Environment Modules](http://modules.sf.net) in order to simplify managing the required environment variables. Log out and log back in after running the `mapd-deps-prebuilt.sh` script in order to active Environment Modules command, `module`.\n\nThe `mapd-deps` environment module is disabled by default. To activate for your current session, run:\n\n    module load mapd-deps\n\nTo disable the `mapd-deps` module:\n\n    module unload mapd-deps\n\nWARNING: The `mapd-deps` package contains newer versions of packages such as GCC and ncurses which might not be compatible with the rest of your environment. Make sure to disable the `mapd-deps` module before compiling other packages.\n\nInstructions for installing CUDA are below.\n\n### CUDA\n\nIt is preferred, but not necessary, to install CUDA and the NVIDIA drivers using the .rpm using the [instructions provided by NVIDIA](https://developer.nvidia.com/cuda-downloads). The `rpm (network)` method (preferred) will ensure you always have the latest stable drivers, while the `rpm (local)` method allows you to install does not require Internet access.\n\nThe .rpm method requires DKMS to be installed, which is available from the [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL) repository:\n\n    sudo yum install epel-release\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n### Environment Variables\n\nThe `mapd-deps-prebuilt.sh` script includes two files with the appropriate environment variables: `mapd-deps-<date>.sh` (for sourcing from your shell config) and `mapd-deps-<date>.modulefile` (for use with [Environment Modules](http://modules.sf.net), yum package `environment-modules`). These files are placed in mapd-deps install directory, usually `/usr/local/mapd-deps/<date>`. Either of these may be used to configure your environment: the `.sh` may be sourced in your shell config; the `.modulefile` needs to be moved to the modulespath.\n\n### Building Dependencies\n\nThe [scripts/mapd-deps-centos.sh](scripts/mapd-deps-centos.sh) script is used to build the dependencies. Modify this script and run if you would like to change dependency versions or to build on alternative CPU architectures.\n\n    cd scripts\n    module unload mapd-deps\n    ./mapd-deps-centos.sh --compress\n\n## macOS\n\n[scripts/mapd-deps-osx.sh](scripts/mapd-deps-osx.sh) is provided that will automatically install and/or update [Homebrew](http://brew.sh/) and use that to install all dependencies. Please make sure macOS is completely up to date and Xcode is installed before running. Xcode can be installed from the App Store.\n\n### CUDA\n\n`mapd-deps-osx.sh` will automatically install CUDA via Homebrew and add the correct environment variables to `~/.bash_profile`.\n\n### Java\n\n`mapd-deps-osx.sh` will automatically install Java and Maven via Homebrew and add the correct environment variables to `~/.bash_profile`.\n\n## Ubuntu\n\nMost build dependencies required by HeavyDB are available via APT. Certain dependencies such as Thrift and Blosc must be built as they either do not exist in the default repositories or have outdated versions. A prebuilt package containing all these dependencies is provided for Ubuntu 18.04 and 20.04 (x86_64). The dependencies will be installed to `/usr/local/mapd-deps/` by default; see the Environment Variables section below for how to add these dependencies to your environment.\n\n\n### Ubuntu 16.04\n\nHeavyDB requires a newer version of Boost than the version which is provided by Ubuntu 16.04. The [scripts/mapd-deps-ubuntu1604.sh](scripts/mapd-deps-ubuntu1604.sh) build script will compile and install a newer version of Boost into the `/usr/local/mapd-deps/` directory.\n\n### Ubuntu 18.04\n\nUse the [scripts/mapd-deps-prebuilt.sh](scripts/mapd-deps-prebuilt.sh) build script to install prebuilt dependencies.\n\nThese dependencies will be installed to a directory under `/usr/local/mapd-deps`. The `mapd-deps-prebuilt.sh` script above will generate a script named `mapd-deps.sh` containing the environment variables which need to be set. Simply source this file in your current session (or symlink it to `/etc/profile.d/mapd-deps.sh`) in order to activate it:\n\n    source /usr/local/mapd-deps/mapd-deps.sh\n\n### Environment Variables\n\nThe CUDA and mapd-deps `lib` directories need to be added to `LD_LIBRARY_PATH`; the CUDA and mapd-deps `bin` directories need to be added to `PATH`. The `mapd-deps-ubuntu.sh` and `mapd-deps-prebuilt.sh` scripts will generate a script named `mapd-deps.sh` containing the environment variables which need to be set. Simply source this file in your current session (or symlink it to `/etc/profile.d/mapd-deps.sh`) in order to activate it:\n\n    source /usr/local/mapd-deps/mapd-deps.sh\n\n### CUDA\n\nRecent versions of Ubuntu provide the NVIDIA CUDA Toolkit and drivers in the standard repositories. To install:\n\n    sudo apt install -y \\\n        nvidia-cuda-toolkit\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n### Building Dependencies\n\nThe [scripts/mapd-deps-ubuntu.sh](scripts/mapd-deps-ubuntu.sh) and [scripts/mapd-deps-ubuntu1604.sh](scripts/mapd-deps-ubuntu1604.sh) scripts are used to build the dependencies for Ubuntu 18.04 and 16.04, respectively. The scripts will install all required dependencies (except CUDA) and build the dependencies which require it. Modify this script and run if you would like to change dependency versions or to build on alternative CPU architectures.\n\n    cd scripts\n    ./mapd-deps-ubuntu.sh --compress\n\n## Arch\n\n[scripts/mapd-deps-arch.sh](scripts/mapd-deps-arch.sh) is provided that will use [yay](https://aur.archlinux.org/packages/yay/) to install packages from the [Arch User Repository](https://wiki.archlinux.org/index.php/Arch_User_Repository) and custom PKGBUILD scripts for a few packages listed below. If you don't have `yay` yet, install it first: https://github.com/Jguer/yay#installation\n\n### Package Version Requirements:\n\n### CUDA\n\nCUDA and the NVIDIA drivers may be installed using the following.\n\n    yay -S \\\n        linux-headers \\\n        cuda \\\n        nvidia\n\nBe sure to reboot after installing in order to activate the NVIDIA drivers.\n\n### Environment Variables\n\nThe `cuda` package should set up the environment variables required to use CUDA. If you receive errors saying `nvcc` is not found, then CUDA `bin` directories need to be added to `PATH`: the easiest way to do so is by creating a new file named `/etc/profile.d/mapd-deps.sh` containing the following:\n\n    PATH=/opt/cuda/bin:$PATH\n    export PATH\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CCBA:09ED:E5403:3F4F94:6AB92B1A"},"text_sha256":"bfb16b248ceff15442f73584c0008865b6b958dc5f29d6c07b5d7abcdd0afc9d"},{"path":"ThirdParty/jwt-cpp/.github/security.md","size":863,"blob_sha":"768000138d45876de8880f3b5a250816afd81225","priority":1,"status":200,"text":"# Reporting Security Issues\n\nIf you believe you have found a security vulnerability in JWT-CPP, we encourage you to let us know right away.\nWe will investigate all legitimate reports and do our best to quickly fix the problem.\n\nPlease refer to the section below for our responsible disclosure policy:\n\n## Disclosure Policy\n\nPlease contact one or more of the maintainers using the email advertised on our GitHub profiles:\n\n- [@Thalhammer](https://github.com/Thalhammer)\n- [@prince-chrismc](https://github.com/prince-chrismc)\n\nPlease provide as many details as possible about version, platform, and workflow as possible.\nHaving steps and reproducible code is better and is always greatly appreciated.\n\n## Supported Version\n\nTypically, fixes will be immediately released as a new patch release. However, older affected versions may receive\na new patch upon request.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7190:3B6DE:17648A:5DA5E9:6AB92B19"},"text_sha256":"5901d89b461ad17e3715158904d6e3f1f42f2267e346af4b2efcfda276ff2249"},{"path":"ThirdParty/licenses/xml-security-c.txt","size":11357,"blob_sha":"261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64","priority":1,"status":200,"text":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCF2:2E8679:17C32B:5E02E8:6AB92B18"},"text_sha256":"c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"weld-project/weld","input_row":{"repository":"weld-project/weld","url":"https://github.com/weld-project/weld","name":"weld","owner":"weld-project","description":"High-performance runtime for data analytics applications","language":"Rust","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":3007,"issues":170,"created_at":"2016-06-13T05:00:24Z","updated_at":"2026-09-21T05:30:25Z","first_commit_at":"2016-06-13T05:01:12Z","last_commit_at":"2020-04-04T20:50:54Z","activity_months":45.719999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:31.545Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"weld-project/weld","visibility":"public","created_at":"2016-06-13T05:00:24Z","updated_at":"2026-09-21T05:30:25Z","private":false,"fork":false,"archived":false,"stargazers_count":3007,"open_issues_count":75,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2393","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17D2336:1BF6392:6AB92B1B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2392","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D3:35C5DA:17A6338:1BC96E2:6AB92B1B"},"commit":{"sha":"bcca90f16e2eafae4e2145dc7899cd6126ac2bcf","url":"https://github.com/weld-project/weld/commit/bcca90f16e2eafae4e2145dc7899cd6126ac2bcf","date":"2018-05-21T19:38:32Z","author_date":"2018-05-21T19:38:32Z","committer_date":"2018-05-21T19:38:32Z","tree_sha":"ed5777943d5845197b2818a2a5d7b5fc543e1f92","message_first_line":"Empty makevector_expr (#357)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2391","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A1:1B4E7A:17ABE53:1BCFC6E:6AB92B1C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6097,"blob_sha":"f05008bf34d66c84580e1e61fc1515cd3dc2393a","priority":0}],"documents":[{"path":"README.md","size":6097,"blob_sha":"f05008bf34d66c84580e1e61fc1515cd3dc2393a","priority":0,"status":200,"text":"# Weld\n\n[![Build Status](https://travis-ci.org/weld-project/weld.svg?branch=master)](https://travis-ci.org/weld-project/weld)\n\nWeld is a language and runtime for improving the performance of data-intensive applications. It optimizes across libraries and functions by expressing the core computations in libraries using a common intermediate representation, and optimizing across each framework.\n\nModern analytics applications combine multiple functions from different libraries and frameworks to build complex workflows. Even though individual functions can achieve high performance in isolation, the performance of the combined workflow is often an order of magnitude below hardware limits due to extensive data movement across the functions. Weld’s take on solving this problem is to lazily build up a computation for the entire workflow, and then optimizing and evaluating it only when a result is needed.\n\nYou can join the discussion on Weld on our [Google Group](https://groups.google.com/forum/#!forum/weld-users) or post on the Weld mailing list at [weld-group@lists.stanford.edu](mailto:weld-group@lists.stanford.edu).\n\n## Contents\n\n  * [Building](#building)\n      - [MacOS LLVM Installation](#macos-llvm-installation)\n      - [Ubuntu LLVM Installation](#ubuntu-llvm-installation)\n      - [Building Weld](#building-weld)\n  * [Documentation](#documentation)\n  * [Grizzly (Pandas on Weld)](#grizzly)\n  * [Tools](#tools)\n\n## Building\n\nTo build Weld, you need [the latest stable version of Rust](http://rust-lang.org) and [LLVM](http://llvm.org) 3.8 or newer.\n\nTo install Rust, follow the steps [here](https://rustup.rs). You can verify that Rust was installed correctly on your system by typing `rustc` into your shell. If you already have Rust and  `rustup` installed, you can upgrade to the latest stable version with:\n\n```bash\n$ rustup update stable\n```\n\n#### MacOS LLVM Installation\n\nTo install LLVM on macOS, first install [Homebrew](https://brew.sh/). Then:\n\n```bash\n$ brew install llvm@3.8\n```\n\nWeld's dependencies require `llvm-config`, so you may need to create a symbolic link so the correct `llvm-config` is picked up (note that you might need to add `sudo` at the start of this command):\n\n```bash\n$ ln -s /usr/local/bin/llvm-config-3.8 /usr/local/bin/llvm-config\n```\n\nTo make sure this worked correctly, run `llvm-config --version`. You should see `3.8.x` or newer.\n\nEnter the `weld_rt/cpp` directory and try running `make`. If the command fails with errors related to missing header files, you may need to install XCode and/or XCode Command Line Tools. Run `xcode-select --install` to do this.\n\n#### Ubuntu LLVM Installation\n\nTo install LLVM on Ubuntu :\n\n```bash\n$ sudo apt-get install llvm-3.8\n$ sudo apt-get install llvm-3.8-dev\n$ sudo apt-get install clang-3.8\n```\n\nWeld's dependencies require `llvm-config`, so you may need to create a symbolic link so the correct `llvm-config` is picked up:\n\n```bash\n$ ln -s /usr/bin/llvm-config-3.8 /usr/local/bin/llvm-config\n```\n\nTo make sure this worked correctly, run `llvm-config --version`. You should see `3.8.x` or newer.\n\n#### Building Weld\n\nWith LLVM and Rust installed, you can build Weld. Clone this repository, set the `WELD_HOME` environment variable, and build using `cargo`:\n\n```bash\n$ git clone https://www.github.com/weld-project/weld\n$ cd weld/\n$ export WELD_HOME=`pwd`\n$ cargo build --release\n```\n\n**Note:** If you are using a version of LLVM newer than 3.8, you will have to change the `llvm-sys` crate dependency in `easy_ll/Cargo.toml` to match (e.g. `40.0.0` for LLVM 4.0.0). You may also need to create additional symlinks for some packages that omit the version suffix when installing the latest version, e.g. for LLVM 4.0:\n\n```bash\n$ ln -s /usr/local/bin/clang /usr/local/bin/clang-4.0\n$ ln -s /usr/local/bin/llvm-link /usr/local/bin/llvm-link-4.0\n```\n\nWeld builds two dynamically linked libraries (`.so` files on Linux and `.dylib` files on Mac): `libweld` and `libweldrt`.\n\nFinally, run the unit and integration tests:\n\n```bash\n$ cargo test\n```\n\n## Documentation\n\nThe `docs/` directory contains documentation for the different components of Weld.\n\n* [language.md](https://github.com/weld-project/weld/blob/master/docs/language.md) describes the syntax of the Weld IR.\n* [api.md](https://github.com/weld-project/weld/blob/master/docs/api.md) describes the low-level C API for interfacing with Weld.\n* [python.md](https://github.com/weld-project/weld/blob/master/docs/python.md) gives an overview of the Python API.\n* [tutorial.md](https://github.com/weld-project/weld/blob/master/docs/tutorial.md) contains a tutorial for how to build a small vector library using Weld.\n\n## Python Bindings\n\nWeld's Python bindings are in [`python/weld`](https://github.com/weld-project/weld/tree/master/python/weld), with examples in [`examples/python`](https://github.com/weld-project/weld/tree/master/examples/python).\n\n## Grizzly\n\n**Grizzly** is a subset of [Pandas](http://pandas.pydata.org/) integrated with Weld. Details on how to use Grizzly are in\n[`python/grizzly`](https://github.com/weld-project/weld/tree/master/python/grizzly).\nSome example workloads that make use of Grizzly are in [`examples/python/grizzly`](https://github.com/weld-project/weld/tree/master/examples/python/grizzly).\nTo run Grizzly, you will also need the `WELD_HOME` environment variable to be set, because Grizzly needs to find its own native library through this variable.\n\n## Testing\n\n`cargo test` runs unit and integration tests. A test name substring filter can be used to run a subset of the tests:\n\n   ```\n   cargo test <substring to match in test name>\n   ```\n\n## Tools\n\nThis repository contains a number of useful command line tools which are built\nautomatically with the main Weld repository, including an interactive REPL for\ninspecting and debugging programs.  More information on those tools can be\nfound under [docs/tools.md](https://github.com/weld-project/weld/tree/master/docs/tools.md).\n\n## Current performance metrics\n\n![Current performance metrics](https://s3-us-west-2.amazonaws.com/weld-travis-ci/master/performance.png)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9140:3FA0D:17816B:5DC348:6AB92B1C"},"text_sha256":"b1533674eb4d18f7f43847e4240aee0783fe1b0b91cbcc85cd67c6127749f310"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2390","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17CE7C5:1BF276B:6AB92B1D"},"commit":{"sha":"dcbba9a45ae2a190b31badec530ea54a58437606","url":"https://github.com/weld-project/weld/commit/dcbba9a45ae2a190b31badec530ea54a58437606","date":"2020-04-04T20:50:54Z","author_date":"2020-04-04T20:50:54Z","committer_date":"2020-04-04T20:50:54Z","tree_sha":"89b736c31f88f833886d3bc37e6a9360a689462c","message_first_line":"DataFrame foundations (#510)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2389","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17C181E:1BE58B7:6AB92B1D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6152,"blob_sha":"edd1a21b201fac736712d995ec2a600eb168a574","priority":0}],"documents":[{"path":"README.md","size":6152,"blob_sha":"edd1a21b201fac736712d995ec2a600eb168a574","priority":0,"status":200,"text":"# Weld\n\n[![Build Status](https://travis-ci.org/weld-project/weld.svg?branch=master)](https://travis-ci.org/weld-project/weld)\n\n[Documentation](https://www.weld.rs/docs/latest/weld/)\n\nWeld is a language and runtime for improving the performance of data-intensive applications. It optimizes across libraries and functions by expressing the core computations in libraries using a common intermediate representation, and optimizing across each framework.\n\nModern analytics applications combine multiple functions from different libraries and frameworks to build complex workflows. Even though individual functions can achieve high performance in isolation, the performance of the combined workflow is often an order of magnitude below hardware limits due to extensive data movement across the functions. Weld’s take on solving this problem is to lazily build up a computation for the entire workflow, and then optimizing and evaluating it only when a result is needed.\n\nYou can join the discussion on Weld on our [Google Group](https://groups.google.com/forum/#!forum/weld-users) or post on the Weld mailing list at [weld-group@lists.stanford.edu](mailto:weld-group@lists.stanford.edu).\n\n## Contents\n\n  * [Building](#building)\n      - [MacOS LLVM Installation](#macos-llvm-installation)\n      - [Ubuntu LLVM Installation](#ubuntu-llvm-installation)\n      - [Building Weld](#building-weld)\n  * [Documentation](#documentation)\n  * [Grizzly (Pandas on Weld)](#grizzly)\n  * [Tools](#tools)\n\n## Building\n\nTo build Weld, you need [the latest stable version of Rust](http://rust-lang.org) and [LLVM/Clang++](http://llvm.org) 6.0.\n\nTo install Rust, follow the steps [here](https://rustup.rs). You can verify that Rust was installed correctly on your system by typing `rustc` into your shell. If you already have Rust and  `rustup` installed, you can upgrade to the latest stable version with:\n\n```bash\nrustup update stable\n```\n\n#### MacOS LLVM Installation\n\nTo install LLVM on macOS, first install [Homebrew](https://brew.sh/). Then:\n\n```bash\nbrew install llvm@6\n```\n\nWeld's dependencies require `llvm-config` on `$PATH`, so you may need to create a symbolic link so the correct `llvm-config` is picked up (note that you might need to add `sudo` at the start of this command):\n\n```bash\nln -sf `brew --prefix llvm@6`/bin/llvm-config /usr/local/bin/llvm-config\n```\n\nTo make sure this worked correctly, run `llvm-config --version`. You should see `6.0.x`.\n\n#### Ubuntu LLVM Installation\n\nTo install LLVM on Ubuntu, get the LLVM 6.0 sources and then `apt-get`:\n\nOn Ubuntu 16.04 (Xenial):\n```bash\nwget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -\nsudo apt-add-repository \"deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main\"\nsudo apt-get update\nsudo apt-get install llvm-6.0-dev clang-6.0\n```\nOn Ubuntu 14.04 (Trusty):\n```bash\nwget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -\nsudo apt-add-repository \"deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main\"\n\n# gcc backport is required on 14.04, for libstdc++. See https://apt.llvm.org/\nsudo apt-add-repository \"deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main\"\nsudo apt-get update\nsudo apt-get install llvm-6.0-dev clang-6.0\n```\n\nWeld's dependencies require `llvm-config`, so you may need to create a symbolic link so the correct `llvm-config` is picked up. `sudo` may be required:\n\n```bash\nln -s /usr/bin/llvm-config-6.0 /usr/local/bin/llvm-config\n```\n\nTo make sure this worked correctly, run `llvm-config --version`. You should see `6.0.x` or newer.\n\nYou will also need `zlib`:\n\n```bash\nsudo apt-get install zlib1g-dev\n```\n\n#### Building Weld\n\nWith LLVM and Rust installed, you can build Weld. Clone this repository, set the `WELD_HOME` environment variable, and build using `cargo`:\n\n```bash\ngit clone https://www.github.com/weld-project/weld\ncd weld/\nexport WELD_HOME=`pwd`\ncargo build --release\n```\nWeld builds two dynamically linked libraries (`.so` files on Linux and `.dylib` files on Mac): `libweld` and `libweldrt`.\n\nFinally, run the unit and integration tests:\n\n```bash\ncargo test\n```\n\n## Documentation\n\nThe [Rust Weld crate](https://crates.io/crates/weld) is documented [here](https://www.weld.rs/docs/latest/weld/).\n\nThe `docs/` directory contains documentation for the different components of Weld.\n\n* [language.md](https://github.com/weld-project/weld/blob/master/docs/language.md) describes the syntax of the Weld IR.\n* [api.md](https://github.com/weld-project/weld/blob/master/docs/api.md) describes the low-level C API for interfacing with Weld.\n* [python.md](https://github.com/weld-project/weld/blob/master/docs/python.md) gives an overview of the Python API.\n* [tutorial.md](https://github.com/weld-project/weld/blob/master/docs/tutorial.md) contains a tutorial for how to build a small vector library using Weld.\n\n## Python Bindings\n\nWeld's Python bindings are in [`python`](https://github.com/weld-project/weld/tree/master/python), with examples in [`examples/python`](https://github.com/weld-project/weld/tree/master/examples/python).\n\n## Grizzly\n\n**Grizzly** is a subset of [Pandas](http://pandas.pydata.org/) integrated with Weld. Details on how to use Grizzly are in\n[`python/grizzly`](https://github.com/weld-project/weld/tree/master/python/grizzly).\nSome example workloads that make use of Grizzly are in [`examples/python/grizzly`](https://github.com/weld-project/weld/tree/master/examples/python/grizzly).\nTo run Grizzly, you will also need the `WELD_HOME` environment variable to be set, because Grizzly needs to find its own native library through this variable.\n\n## Testing\n\n`cargo test` runs unit and integration tests. A test name substring filter can be used to run a subset of the tests:\n\n   ```\n   cargo test <substring to match in test name>\n   ```\n\n## Tools\n\nThis repository contains a number of useful command line tools which are built\nautomatically with the main Weld repository, including an interactive REPL for\ninspecting and debugging programs.  More information on those tools can be\nfound under [docs/tools.md](https://github.com/weld-project/weld/tree/master/docs/tools.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0E80:B08CF:174C2A:5D8F24:6AB92B1B"},"text_sha256":"8fad5428f0a100dd5e623301cdc85e0a092f098229d73c93160ac6c2904e7876"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"keithito/tacotron","input_row":{"repository":"keithito/tacotron","url":"https://github.com/keithito/tacotron","name":"tacotron","owner":"keithito","description":"A TensorFlow implementation of Google's Tacotron speech synthesis with pre-trained model (unofficial)","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2997,"issues":323,"created_at":"2017-07-08T17:03:31Z","updated_at":"2026-09-22T10:35:54Z","first_commit_at":"2017-07-08T17:03:32Z","last_commit_at":"2020-02-03T00:26:32Z","activity_months":30.859999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:34.367Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"keithito/tacotron","visibility":"public","created_at":"2017-07-08T17:03:31Z","updated_at":"2026-09-22T10:35:54Z","private":false,"fork":false,"archived":false,"stargazers_count":2997,"open_issues_count":135,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2388","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17CE86C:1BF2826:6AB92B1E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2387","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091F:73962:17D534A:1BF8BEF:6AB92B1E"},"commit":{"sha":"1bd3a63304bf74a072a5a5c5fccfd05c38490098","url":"https://github.com/keithito/tacotron/commit/1bd3a63304bf74a072a5a5c5fccfd05c38490098","date":"2018-05-05T19:21:07Z","author_date":"2018-05-05T19:21:07Z","committer_date":"2018-05-05T19:21:07Z","tree_sha":"8b924ce1424735c4746c36b27ef0401aedc87597","message_first_line":"Merge pull request #166 from keithito/demo-server"},"tree_request_status":200,"tree_rate":{"github_remaining":"2386","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:1809412:1C2D732:6AB92B1F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6196,"blob_sha":"1904c191667a3b83bfe5e3e7213f5f5c76a8cd23","priority":0}],"documents":[{"path":"README.md","size":6196,"blob_sha":"1904c191667a3b83bfe5e3e7213f5f5c76a8cd23","priority":0,"status":200,"text":"# Tacotron\n\nAn implementation of Tacotron speech synthesis in TensorFlow.\n\n\n### Audio Samples\n\n  * **[Audio Samples](https://keithito.github.io/audio-samples/)** from models trained using this repo.\n    * The first set was trained for 877K steps on the [LJ Speech Dataset](https://keithito.com/LJ-Speech-Dataset/)\n      * Speech started to become intelligble around 20K steps.\n      * Although loss continued to decrease, there wasn't much noticable improvement after ~250K steps.\n    * The second set was trained by [@MXGray](https://github.com/MXGray) for 140K steps on the [Nancy Corpus](http://www.cstr.ed.ac.uk/projects/blizzard/2011/lessac_blizzard2011/).\n\n\n\n## Background\n\nIn April 2017, Google published a paper, [Tacotron: Towards End-to-End Speech Synthesis](https://arxiv.org/pdf/1703.10135.pdf),\nwhere they present a neural text-to-speech model that learns to synthesize speech directly from\n(text, audio) pairs. However, they didn't release their source code or training data. This is an\nindependent attempt to provide an open-source implementation of the model described in their paper.\n\nThe quality isn't as good as Google's demo yet, but hopefully it will get there someday :-).\nPull requests are welcome!\n\n\n\n## Quick Start\n\n### Installing dependencies\n\n1. Install Python 3.\n\n2. Install the latest version of [TensorFlow](https://www.tensorflow.org/install/) for your platform. For better\n   performance, install with GPU support if it's available. This code works with TensorFlow 1.3 and later.\n\n3. Install requirements:\n   ```\n   pip install -r requirements.txt\n   ```\n\n\n### Using a pre-trained model\n\n1. **Download and unpack a model**:\n   ```\n   curl http://data.keithito.com/data/speech/tacotron-20170720.tar.bz2 | tar xjC /tmp\n   ```\n\n2. **Run the demo server**:\n   ```\n   python3 demo_server.py --checkpoint /tmp/tacotron-20170720/model.ckpt\n   ```\n\n3. **Point your browser at localhost:9000**\n   * Type what you want to synthesize\n\n\n\n### Training\n\n*Note: you need at least 40GB of free disk space to train a model.*\n\n1. **Download a speech dataset.**\n\n   The following are supported out of the box:\n    * [LJ Speech](https://keithito.com/LJ-Speech-Dataset/) (Public Domain)\n    * [Blizzard 2012](http://www.cstr.ed.ac.uk/projects/blizzard/2012/phase_one) (Creative Commons Attribution Share-Alike)\n\n   You can use other datasets if you convert them to the right format. See [TRAINING_DATA.md](TRAINING_DATA.md) for more info.\n\n\n2. **Unpack the dataset into `~/tacotron`**\n\n   After unpacking, your tree should look like this for LJ Speech:\n   ```\n   tacotron\n     |- LJSpeech-1.1\n         |- metadata.csv\n         |- wavs\n   ```\n\n   or like this for Blizzard 2012:\n   ```\n   tacotron\n     |- Blizzard2012\n         |- ATrampAbroad\n         |   |- sentence_index.txt\n         |   |- lab\n         |   |- wav\n         |- TheManThatCorruptedHadleyburg\n             |- sentence_index.txt\n             |- lab\n             |- wav\n   ```\n\n3. **Preprocess the data**\n   ```\n   python3 preprocess.py --dataset ljspeech\n   ```\n     * Use `--dataset blizzard` for Blizzard data\n\n4. **Train a model**\n   ```\n   python3 train.py\n   ```\n\n   Tunable hyperparameters are found in [hparams.py](hparams.py). You can adjust these at the command\n   line using the `--hparams` flag, for example `--hparams=\"batch_size=16,outputs_per_step=2\"`.\n   Hyperparameters should generally be set to the same values at both training and eval time.\n\n\n5. **Monitor with Tensorboard** (optional)\n   ```\n   tensorboard --logdir ~/tacotron/logs-tacotron\n   ```\n\n   The trainer dumps audio and alignments every 1000 steps. You can find these in\n   `~/tacotron/logs-tacotron`.\n\n6. **Synthesize from a checkpoint**\n   ```\n   python3 demo_server.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000\n   ```\n   Replace \"185000\" with the checkpoint number that you want to use, then open a browser\n   to `localhost:9000` and type what you want to speak. Alternately, you can\n   run [eval.py](eval.py) at the command line:\n   ```\n   python3 eval.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000\n   ```\n   If you set the `--hparams` flag when training, set the same value here.\n\n\n## Notes and Common Issues\n\n  * [TCMalloc](http://goog-perftools.sourceforge.net/doc/tcmalloc.html) seems to improve\n    training speed and avoids occasional slowdowns seen with the default allocator. You\n    can enable it by installing it and setting `LD_PRELOAD=/usr/lib/libtcmalloc.so`.\n\n  * You can train with [CMUDict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) by downloading the\n    dictionary to ~/tacotron/training and then passing the flag `--hparams=\"use_cmudict=True\"` to\n    train.py. This will allow you to pass ARPAbet phonemes enclosed in curly braces at eval\n    time to force a particular pronunciation, e.g. `Turn left on {HH AW1 S S T AH0 N} Street.`\n\n  * If you pass a Slack incoming webhook URL as the `--slack_url` flag to train.py, it will send\n    you progress updates every 1000 steps.\n\n  * Occasionally, you may see a spike in loss and the model will forget how to attend (the\n    alignments will no longer make sense). Although it will recover eventually, it may\n    save time to restart at a checkpoint prior to the spike by passing the\n    `--restore_step=150000` flag to train.py (replacing 150000 with a step number prior to the\n    spike). **Update**: a recent [fix](https://github.com/keithito/tacotron/pull/7) to gradient\n    clipping by @candlewill may have fixed this.\n    \n  * During eval and training, audio length is limited to `max_iters * outputs_per_step * frame_shift_ms`\n    milliseconds. With the defaults (max_iters=200, outputs_per_step=5, frame_shift_ms=12.5), this is\n    12.5 seconds.\n    \n    If your training examples are longer, you will see an error like this:\n    `Incompatible shapes: [32,1340,80] vs. [32,1000,80]`\n    \n    To fix this, you can set a larger value of `max_iters` by passing `--hparams=\"max_iters=300\"` to\n    train.py (replace \"300\" with a value based on how long your audio is and the formula above).\n\n\n## Other Implementations\n  * By Alex Barron: https://github.com/barronalex/Tacotron\n  * By Kyubyong Park: https://github.com/Kyubyong/tacotron\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D534:7A4F8:182C92:5E6F8A:6AB92B1F"},"text_sha256":"99af8d6fce0f02e5e04a9fa2e57e5f3720b152549329c38a029929359e5a5e17"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2385","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:17F3769:1C1754A:6AB92B1F"},"commit":{"sha":"d26c763342518d4e432e9c4036a1aff3b4fdaa1e","url":"https://github.com/keithito/tacotron/commit/d26c763342518d4e432e9c4036a1aff3b4fdaa1e","date":"2020-02-03T00:26:32Z","author_date":"2020-02-03T00:26:32Z","committer_date":"2020-02-03T00:26:32Z","tree_sha":"5758ed9544a016b4bb74b983e9cd1fbd037d77f3","message_first_line":"Use https download link for checkpoint"},"tree_request_status":200,"tree_rate":{"github_remaining":"2384","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F7:E80A6:17A8D8B:1BCCF06:6AB92B20"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6960,"blob_sha":"c66fa5f656056a71be3002a05d0f24f1ce0018ff","priority":0}],"documents":[{"path":"README.md","size":6960,"blob_sha":"c66fa5f656056a71be3002a05d0f24f1ce0018ff","priority":0,"status":200,"text":"# Tacotron\n\nAn implementation of Tacotron speech synthesis in TensorFlow.\n\n\n### Audio Samples\n\n  * **[Audio Samples](https://keithito.github.io/audio-samples/)** from models trained using this repo.\n    * The first set was trained for 441K steps on the [LJ Speech Dataset](https://keithito.com/LJ-Speech-Dataset/)\n      * Speech started to become intelligible around 20K steps.\n    * The second set was trained by [@MXGray](https://github.com/MXGray) for 140K steps on the [Nancy Corpus](http://www.cstr.ed.ac.uk/projects/blizzard/2011/lessac_blizzard2011/).\n\n\n### Recent Updates\n\n1. @npuichigo [fixed](https://github.com/keithito/tacotron/pull/205) a bug where dropout was not being applied in the prenet.\n\n2. @begeekmyfriend created a [fork](https://github.com/begeekmyfriend/tacotron) that adds location-sensitive attention and the stop token from the [Tacotron 2](https://arxiv.org/abs/1712.05884) paper. This can greatly reduce the amount of data required to train a model.\n\n\n## Background\n\nIn April 2017, Google published a paper, [Tacotron: Towards End-to-End Speech Synthesis](https://arxiv.org/pdf/1703.10135.pdf),\nwhere they present a neural text-to-speech model that learns to synthesize speech directly from\n(text, audio) pairs. However, they didn't release their source code or training data. This is an\nindependent attempt to provide an open-source implementation of the model described in their paper.\n\nThe quality isn't as good as Google's demo yet, but hopefully it will get there someday :-).\nPull requests are welcome!\n\n\n\n## Quick Start\n\n### Installing dependencies\n\n1. Install Python 3.\n\n2. Install the latest version of [TensorFlow](https://www.tensorflow.org/install/) for your platform. For better\n   performance, install with GPU support if it's available. This code works with TensorFlow 1.3 and later.\n\n3. Install requirements:\n   ```\n   pip install -r requirements.txt\n   ```\n\n\n### Using a pre-trained model\n\n1. **Download and unpack a model**:\n   ```\n   curl https://data.keithito.com/data/speech/tacotron-20180906.tar.gz | tar xzC /tmp\n   ```\n\n2. **Run the demo server**:\n   ```\n   python3 demo_server.py --checkpoint /tmp/tacotron-20180906/model.ckpt\n   ```\n\n3. **Point your browser at localhost:9000**\n   * Type what you want to synthesize\n\n\n\n### Training\n\n*Note: you need at least 40GB of free disk space to train a model.*\n\n1. **Download a speech dataset.**\n\n   The following are supported out of the box:\n    * [LJ Speech](https://keithito.com/LJ-Speech-Dataset/) (Public Domain)\n    * [Blizzard 2012](http://www.cstr.ed.ac.uk/projects/blizzard/2012/phase_one) (Creative Commons Attribution Share-Alike)\n\n   You can use other datasets if you convert them to the right format. See [TRAINING_DATA.md](TRAINING_DATA.md) for more info.\n\n\n2. **Unpack the dataset into `~/tacotron`**\n\n   After unpacking, your tree should look like this for LJ Speech:\n   ```\n   tacotron\n     |- LJSpeech-1.1\n         |- metadata.csv\n         |- wavs\n   ```\n\n   or like this for Blizzard 2012:\n   ```\n   tacotron\n     |- Blizzard2012\n         |- ATrampAbroad\n         |   |- sentence_index.txt\n         |   |- lab\n         |   |- wav\n         |- TheManThatCorruptedHadleyburg\n             |- sentence_index.txt\n             |- lab\n             |- wav\n   ```\n\n3. **Preprocess the data**\n   ```\n   python3 preprocess.py --dataset ljspeech\n   ```\n     * Use `--dataset blizzard` for Blizzard data\n\n4. **Train a model**\n   ```\n   python3 train.py\n   ```\n\n   Tunable hyperparameters are found in [hparams.py](hparams.py). You can adjust these at the command\n   line using the `--hparams` flag, for example `--hparams=\"batch_size=16,outputs_per_step=2\"`.\n   Hyperparameters should generally be set to the same values at both training and eval time.\n   The default hyperparameters are recommended for LJ Speech and other English-language data.\n   See [TRAINING_DATA.md](TRAINING_DATA.md) for other languages.\n\n\n5. **Monitor with Tensorboard** (optional)\n   ```\n   tensorboard --logdir ~/tacotron/logs-tacotron\n   ```\n\n   The trainer dumps audio and alignments every 1000 steps. You can find these in\n   `~/tacotron/logs-tacotron`.\n\n6. **Synthesize from a checkpoint**\n   ```\n   python3 demo_server.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000\n   ```\n   Replace \"185000\" with the checkpoint number that you want to use, then open a browser\n   to `localhost:9000` and type what you want to speak. Alternately, you can\n   run [eval.py](eval.py) at the command line:\n   ```\n   python3 eval.py --checkpoint ~/tacotron/logs-tacotron/model.ckpt-185000\n   ```\n   If you set the `--hparams` flag when training, set the same value here.\n\n\n## Notes and Common Issues\n\n  * [TCMalloc](http://goog-perftools.sourceforge.net/doc/tcmalloc.html) seems to improve\n    training speed and avoids occasional slowdowns seen with the default allocator. You\n    can enable it by installing it and setting `LD_PRELOAD=/usr/lib/libtcmalloc.so`. With TCMalloc,\n    you can get around 1.1 sec/step on a GTX 1080Ti.\n\n  * You can train with [CMUDict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) by downloading the\n    dictionary to ~/tacotron/training and then passing the flag `--hparams=\"use_cmudict=True\"` to\n    train.py. This will allow you to pass ARPAbet phonemes enclosed in curly braces at eval\n    time to force a particular pronunciation, e.g. `Turn left on {HH AW1 S S T AH0 N} Street.`\n\n  * If you pass a Slack incoming webhook URL as the `--slack_url` flag to train.py, it will send\n    you progress updates every 1000 steps.\n\n  * Occasionally, you may see a spike in loss and the model will forget how to attend (the\n    alignments will no longer make sense). Although it will recover eventually, it may\n    save time to restart at a checkpoint prior to the spike by passing the\n    `--restore_step=150000` flag to train.py (replacing 150000 with a step number prior to the\n    spike). **Update**: a recent [fix](https://github.com/keithito/tacotron/pull/7) to gradient\n    clipping by @candlewill may have fixed this.\n    \n  * During eval and training, audio length is limited to `max_iters * outputs_per_step * frame_shift_ms`\n    milliseconds. With the defaults (max_iters=200, outputs_per_step=5, frame_shift_ms=12.5), this is\n    12.5 seconds.\n    \n    If your training examples are longer, you will see an error like this:\n    `Incompatible shapes: [32,1340,80] vs. [32,1000,80]`\n    \n    To fix this, you can set a larger value of `max_iters` by passing `--hparams=\"max_iters=300\"` to\n    train.py (replace \"300\" with a value based on how long your audio is and the formula above).\n    \n  * Here is the expected loss curve when training on LJ Speech with the default hyperparameters:\n    ![Loss curve](https://user-images.githubusercontent.com/1945356/36077599-c0513e4a-0f21-11e8-8525-07347847720c.png)\n\n\n## Other Implementations\n  * By Alex Barron: https://github.com/barronalex/Tacotron\n  * By Kyubyong Park: https://github.com/Kyubyong/tacotron\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5632:3B1F3:184D2D:5E9093:6AB92B20"},"text_sha256":"e976714beb242545b3b7840dc8c5c9a76a59b830d74d39cd9b2549700461cea7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hosseinmoein/DataFrame","input_row":{"repository":"hosseinmoein/DataFrame","url":"https://github.com/hosseinmoein/DataFrame","name":"DataFrame","owner":"hosseinmoein","description":"C++ DataFrame for statistical, financial, and ML analysis in modern C++","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2985,"issues":244,"created_at":"2017-10-28T17:25:45Z","updated_at":"2026-09-27T03:34:22Z","first_commit_at":"2017-10-28T17:25:45Z","last_commit_at":"2026-09-23T16:40:32Z","activity_months":106.83,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:36.936Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hosseinmoein/DataFrame","visibility":"public","created_at":"2017-10-28T17:25:45Z","updated_at":"2026-09-27T03:34:22Z","private":false,"fork":false,"archived":false,"stargazers_count":2985,"open_issues_count":1,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2383","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0921:0AC4:1296086:15E9EE7:6AB92B20"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2382","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BC:228A99:17E917C:1C0D223:6AB92B21"},"commit":{"sha":"d7b6cf43ddfc049c48d0dd671b369e5be57df23f","url":"https://github.com/hosseinmoein/DataFrame/commit/d7b6cf43ddfc049c48d0dd671b369e5be57df23f","date":"2018-05-24T00:17:12Z","author_date":"2018-05-24T00:17:12Z","committer_date":"2018-05-24T00:17:12Z","tree_sha":"69f22a6b935022a71ac4380b414209203c491a8a","message_first_line":"More easy and optimized way of installing header files"},"tree_request_status":200,"tree_rate":{"github_remaining":"2381","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A3:6C6ED:17F067C:1C140A4:6AB92B21"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":228,"blob_sha":"9797aa97f0df4d76d7f80cb0c2029578bc3eb9d6","priority":0}],"documents":[{"path":"README.md","size":228,"blob_sha":"9797aa97f0df4d76d7f80cb0c2029578bc3eb9d6","priority":0,"status":200,"text":"# DataFrame\nThis is a C++ statistical library to provide an interface similar to Pandas package in Python\n\n# Building using CMake(beta?)\n\n```\nmkdir build\ncd build\ncmake .. -DCMAKE_INSTALL_PREFIX=../install\nmake\nmake install\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1014:3BCC6:17CC3E:5E0EE4:6AB92B22"},"text_sha256":"cd10480988ebde4d5e5280f5231890643fb8fdaa782e502f66bd22fa03892833"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2380","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BE:6E429:17E3B3C:1C079B7:6AB92B22"},"commit":{"sha":"35a4a6594c4d7de70229b1250fcde40df6cd59ac","url":"https://github.com/hosseinmoein/DataFrame/commit/35a4a6594c4d7de70229b1250fcde40df6cd59ac","date":"2026-06-30T15:15:59Z","author_date":"2026-06-30T15:15:59Z","committer_date":"2026-06-30T15:15:59Z","tree_sha":"bf2f3b418f0265926a9cd31b12fa6bb8ba06e6f3","message_first_line":"Added more to documentations"},"tree_request_status":200,"tree_rate":{"github_remaining":"2379","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C2:2BC4E5:1823802:1C4753D:6AB92B22"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12976,"blob_sha":"14f8a3bf4cb5940c3a4317de04916d751c2acfe5","priority":0},{"path":"docs/HTML/join_policy.html","size":3625,"blob_sha":"2a603d2aacb504fb355cb799f658a6f08aa70d46","priority":1},{"path":"docs/HTML/nan_policy.html","size":3260,"blob_sha":"15bd969ccfdb48332a96f131806e8a915d9f0ee5","priority":1},{"path":"docs/HTML/PolicyLearningLossVisitor.html","size":53619,"blob_sha":"b45abbcbfcb45743273ff6ef552e8948b273a4a9","priority":1},{"path":"docs/HTML/roll_policy.html","size":3983,"blob_sha":"19626e518fe67cf6a8db7127e3af590ccf1585a1","priority":1}],"documents":[{"path":"README.md","size":12976,"blob_sha":"14f8a3bf4cb5940c3a4317de04916d751c2acfe5","priority":0,"status":200,"text":"<!--\nCopyright (c) 2019-2026, Hossein Moein\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n* Neither the name of Hossein Moein and/or the DataFrame nor the\nnames of its contributors may be used to endorse or promote products\nderived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n\n<HTML>\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"description\" content=\"DataFrame is a templatized and heterogeneous C++ container designed for data analysis for statistical, machine-learning, or financial applications. You can think of data-frame as a two-dimensional data structure of columns and rows just like an Excel spreadsheet, or a SQL table. But in case of C++ DataFrame, your data needn't be two-dimensional necessarily. Columns in the C++ DataFrame could be vectors of any type, including DataFrames or other containers. So, a C++ DataFrame can be of any dimension. Columns are the first-class citizens of DataFrame, meaning operations and access to columns is far more efficient and easier than dealing with data row by row. That's the logical layout of the data. C++ DataFrame also includes an intuitive API for data analysis and analytics. The API is designed to be open-ended meaning you can easily include your own custom algorithms.\">\n  <meta name=\"keywords\" content=\"CPP, C++, DataFrame, data-science, machine-learning, AI, statistical-analysis, data-analysis, trading-strategies, statistical, numerical-analysis, tensorboard, financial-engineering, large-data, tensorboard, financial-data-analysis, multidimensional-data\">\n  <meta name=\"author\" content=\"Hossein Moein\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n  <!-- OpenGraph for social sharing -->\n  <meta property=\"og:title\" content=\"DataFrame — High-Performance Data Analysis in C++\">\n  <meta property=\"og:description\" content=\"Fast C++ DataFrame library for tabular data analysis, filtering, grouping, and numerical computation.\">\n  <meta property=\"og:type\" content=\"website\">\n  <meta property=\"og:url\" content=\"https://hosseinmoein.github.io/DataFrame/\">\n  <meta property=\"og:image\" content=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg\">\n\n  <link rel=\"icon\" type=\"image/jpeg\" href=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg\">\n  <link rel=\"canonical\" href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\">\n<\/head>\n<\/HTML>\n\n[![C++23](https://img.shields.io/badge/C%2B%2B-23-blue.svg)](https://isocpp.org/std/the-standard )\n[![Build status](https://ci.appveyor.com/api/projects/status/hjw01qui3bvxs8yi?svg=true)](https://ci.appveyor.com/project/hosseinmoein/dataframe)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/db646376a4014c3788c7224e670fe451)](https://app.codacy.com/organizations/gh/hosseinmoein/repositories)\n<BR>\n[![GitHub tag (latest by date)](https://img.shields.io/github/tag-date/hosseinmoein/DataFrame.svg?color=blue&label=Official%20Release&style=popout)](https://github.com/hosseinmoein/DataFrame/releases)\n[![Conan Center](https://img.shields.io/conan/v/dataframe)](https://conan.io/center/recipes/dataframe)\n[![VCPKG package](https://repology.org/badge/version-for-repo/vcpkg/dataframe.svg)](https://vcpkg.link/ports/dataframe)\n\n<img src=\"docs/LionLookingUp.jpg\" alt=\"DataFrame Lion\" width=\"400\"/>\n\n## <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\" target=\"_blank\"><B>DataFrame documentation with code samples<\/B><\/a>\n\nDataFrame is a high-performance C++ library for in-memory data exploration, transformation, and statistical analysis — designed for data scientists, quant traders, and C++ developers who need efficient tabular data processing without Python overhead.\nThis library is designed to provide similar functionalities to data manipulation and analysis tools found in other languages, such as Python's Pandas or R's data.frame. It aims to offer a robust and efficient way to handle tabular data in C++.\nThe depth and breadth of functionalities offered by C++ DataFrame alone are greater than functionalities offered by packages such as Pandas, data.frame, and Polars combined.<BR>\nYou can slice the data in many different ways. You can join, merge, group-by the data. You can run various statistical, summarization, financial, and ML algorithms on the data. You can add your custom algorithms easily. You can multi-column sort, custom pick and delete the data. And more …<BR>\nDataFrame also includes a large collection of analytical algorithms in form of visitors. These are from basic stats such as <I>Mean<\/I>, <I>STDEV<\/I>, <I>Moving Averages<\/I>, ... to more involved analysis such as <I>PCA<\/I>, <I>Polynomial Fit<\/I>, <I>FFT<\/I>, <I>Eigens<\/I> ... including a good collection of trading indicators. You can also easily add your own algorithms. Many of these algorithms work seamlessly with both scalar and multidimensional datasets.<BR>\nDataFrame also employs extensive multithreading in almost all its API’s, for large datasets. That makes DataFrame especially suitable for analyzing large datasets.<BR>\nFor basic operations to start you off, see [Hello World](examples/hello_world.cc) and/or [Cheat Sheet](https://docs.google.com/viewer?url=https://raw.githubusercontent.com/hosseinmoein/DataFrame/master/docs/CheatSheet.pdf). For a complete list of features with code samples, see <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\" target=\"_blank\">documentation<\/a>.\n\nI have followed a few <B>principles in this library<\/B>:<BR>\n\n1. [Support any type either built-in or user defined without needing new code](https://hosseinmoein.github.io/DataFrame/docs/HTML/any_type.html)\n2. [Never chase pointers ala _linked lists_, _std::any_, _pointer to base_, ...](https://hosseinmoein.github.io/DataFrame/docs/HTML/pointers.html)\n3. [Have all column data in contiguous memory space](https://hosseinmoein.github.io/DataFrame/docs/HTML/contiguous_memory.html)\n4. [Never use more space than you need ala _unions_, _std::variant_, ...](https://hosseinmoein.github.io/DataFrame/docs/HTML/std_variant.html)\n5. [Avoid copying data as much as possible](https://hosseinmoein.github.io/DataFrame/docs/HTML/copying_data.html)\n6. [Use multi-threading but only when it makes sense](https://hosseinmoein.github.io/DataFrame/docs/HTML/multithreading.html)\n7. [Do not attempt to protect the user against _garbage in_, _garbage out_](https://hosseinmoein.github.io/DataFrame/docs/HTML/garbage_in_garbage_out.html)\n8. [Keep DataFrame library self-contained, meaning DataFrame must only depend on _C++ language_ and its _standard library_](https://hosseinmoein.github.io/DataFrame/docs/HTML/self_contained.html)\n\n---\n\n### Performance\n\nYou have probably heard of Polars DataFrame. It is implemented in Rust and ported with zero-overhead to Python (as long as you don’t have a loop). I have been asked by many people to write a comparison for <B>DataFrame vs. Polars<\/B>. So, I finally found some time to learn a bit about Polars and write a very simple benchmark.<BR>\nI wrote the following identical programs for both Polars and C++ DataFrame (and Pandas). I used Polars version: 0.19.14 (Pandas version: 1.5.3, Numpy version: 1.24.2). And I used C++23 GCC-14 compiler with -O3 option. I ran both on my, somewhat outdated, MacBook Pro (Intel chip, 96GB RAM).<BR>\nIn both cases, I created a dataframe with 3 random columns. The C++ DataFrame also required an additional index column of the same size. Polars doesn’t believe in index columns (that has its own pros and cons. I am not going through it here).\nEach program has three identical parts. First it generates and populates 3 columns with 300m random numbers each (in case of C++ DataFrame, it must also generate a sequential index column of the same size). That is the part I am _not_ interested in. In the second part, it calculates the mean of the first column, the variance of the second column, and the Pearson correlation of the second and third columns. In the third part, it does a select (or filter as Polars calls it) on one of the columns.\n\n**Results**:<BR>\nThe maximum dataset I could load into Polars was 300m rows per column. Any bigger dataset blew up the memory and caused OS to kill it. I ran C++ DataFrame with 2b rows per column and I am sure it would have run with bigger datasets too. So, I was forced to run both with 300m rows to compare.\nI ran each test 4 times and took the best time. Polars numbers varied a lot from one run to another, especially calculation and selection times. C++ DataFrame numbers were significantly more consistent.\n\n\n|                      | [<B>C++ DataFrame<\/B>](https://github.com/hosseinmoein/DataFrame/blob/master/benchmarks/dataframe_performance.cc) | [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Polars<\/B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;](https://github.com/hosseinmoein/DataFrame/blob/master/benchmarks/polars_performance.py) | [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Pandas<\/B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;](https://github.com/hosseinmoein/DataFrame/blob/master/benchmarks/pandas_performance.py) |\n| :--------------------- | ------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| Data Generation Time |                                                                                                      26.9459 secs |                                                                                                                                                                    28.4686 secs |                                                                                                                                                                    36.6799 secs |\n| Calculation Time     |                                                                                                       1.2602 secs |                                                                                                                                                                     4.8766 secs |                                                                                                                                                                    40.3264 secs |\n| Selection Time       |                                                                                                       0.4215 secs |                                                                                                                                                                     3.8766 secs |                                                                                                                                                                     8.3264 secs |\n| Overall Time         |                                                                                                      28.9486 secs |                                                                                                                                                                    36.8763 secs |                                                                                                                                                                    85.8451 secs |\n\n---\n\n[**Please consider sponsoring DataFrame, especially if you are using it in production capacity. It is the strongest form of appreciation**](https://github.com/sponsors/hosseinmoein)\n\n---\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6488:4F9CC:170D1F:5D4D79:6AB92B22"},"text_sha256":"ee29adaaa54132894bb092cae97195a5a577d6c3a06803dc8abfff57263bc139"},{"path":"docs/HTML/join_policy.html","size":3625,"blob_sha":"2a603d2aacb504fb355cb799f658a6f08aa70d46","priority":1,"status":200,"text":"<!--\nCopyright (c) 2019-2026, Hossein Moein\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n* Neither the name of Hossein Moein and/or the DataFrame nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n<!DOCTYPE html>\n<html>\n\n<head>\n<style>\nbody {\n  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);\n}\n<\/style>\n<\/head>\n\n<body style=\"font-family: Georgia, serif\">\n  <font size=\"+3\">&#8592;<\/font> <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\">Back to Documentations<\/a><BR><BR>\n  \n    <table border=\"1\">\n\n    <tr bgcolor=\"lightblue\">\n      <th>Signature<\/th> <th>Description<\/th>\n    <\/tr>\n    <tr bgcolor=\"Azure\">\n      <td>\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">enum<\/span> <span style=\"color:#800000; font-weight:bold; \">class<\/span> join_policy <span style=\"color:#800080; \">:<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">char<\/span>  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">    inner_join <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">    left_join <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">    right_join <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">3<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">    left_right_join <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">4<\/span> <span style=\"color:#696969; \">// This is merge<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n      <\/td>\n      <td>\n        Enumerated type to specify joining two DataFrames\n      <\/td>\n    <\/tr>\n\n    <\/table>\n\n  <BR><img src=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true\" alt=\"C++ DataFrame\"\n       width=\"200\" height=\"200\" style=\"float:right\"/>\n\n<\/body>\n<\/html>\n\n<!--\nLocal Variables:\nmode:HTML\ntab-width:4\nc-basic-offset:4\nEnd:\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A98:17E138:179DD3:5DE075:6AB92B23"},"text_sha256":"fa49733ad36f8092eda77d5d3584e9f13be15a46ead9a17c5ceb682e2ad0c67f"},{"path":"docs/HTML/nan_policy.html","size":3260,"blob_sha":"15bd969ccfdb48332a96f131806e8a915d9f0ee5","priority":1,"status":200,"text":"<!--\nCopyright (c) 2019-2026, Hossein Moein\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n* Neither the name of Hossein Moein and/or the DataFrame nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n<!DOCTYPE html>\n<html>\n\n<head>\n<style>\nbody {\n  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);\n}\n<\/style>\n<\/head>\n\n<body style=\"font-family: Georgia, serif\">\n  <font size=\"+3\">&#8592;<\/font> <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\">Back to Documentations<\/a><BR><BR>\n  \n  <table border=\"1\">\n\n    <tr bgcolor=\"lightblue\">\n      <th>Signature<\/th> <th>Description<\/th>\n    <\/tr>\n    <tr bgcolor=\"Azure\">\n      <td>\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">enum<\/span> <span style=\"color:#800000; font-weight:bold; \">class<\/span> nan_policy <span style=\"color:#800080; \">:<\/span> <span style=\"color:#800000; font-weight:bold; \">bool<\/span>  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">    pad_with_nans <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800000; font-weight:bold; \">true<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">    dont_pad_with_nans <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800000; font-weight:bold; \">false<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n      <\/td>\n      <td>\n        Enumerated type of Boolean type to specify whether data should be padded with NaN or not\n      <\/td>\n    <\/tr>\n  <\/table>\n\n  <BR><img src=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true\" alt=\"C++ DataFrame\"\n       width=\"200\" height=\"200\" style=\"float:right\"/>\n\n<\/body>\n<\/html>\n\n<!--\nLocal Variables:\nmode:HTML\ntab-width:4\nc-basic-offset:4\nEnd:\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17CC5E:5E0F2C:6AB92B23"},"text_sha256":"93c76029f129b4c8ef48168c6af4fa2a0ea2bb8e0e53585b799a3cc08f9f2fa9"},{"path":"docs/HTML/PolicyLearningLossVisitor.html","size":53619,"blob_sha":"b45abbcbfcb45743273ff6ef552e8948b273a4a9","priority":1,"status":200,"text":"<!--\nCopyright (c) 2019-2026, Hossein Moein\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n* Neither the name of Hossein Moein and/or the DataFrame nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n<!DOCTYPE html>\n<html>\n\n<head>\n<style>\nbody {\n  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);\n}\n<\/style>\n<\/head>\n\n<body style=\"font-family: Georgia, serif\">\n\n  <font size=\"+3\">&#8592;<\/font> <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\">Back to Documentations<\/a><BR><BR>\n\n  <table border=\"1\">\n\n    <tr bgcolor=\"lightblue\">\n      <th>Signature<\/th> <th>Description<\/th>\n    <\/tr>\n    <tr bgcolor=\"Azure\">\n      <td>\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">enum<\/span> <span style=\"color:#800000; font-weight:bold; \">class<\/span>  policy_loss_baseline <span style=\"color:#800080; \">:<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">char<\/span>  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    none <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">,<\/span>        <span style=\"color:#696969; \">// No baseline: loss = -log(ap) * r<\/span><\/span>\n<span class=\"line_wrapper\">    constant <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span>    <span style=\"color:#696969; \">// Constant baseline: loss = -log(ap) * (r - b)<\/span><\/span>\n<span class=\"line_wrapper\">    mean <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span>        <span style=\"color:#696969; \">// Mean baseline: loss = -log(ap) * (r - mean(r))<\/span><\/span>\n<span class=\"line_wrapper\">    standardize <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">3<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// Standardized: loss = -log(ap) * (r - mean(r)) / std(r)<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n      <\/td>\n      <td>\n        Enum defining the baseline/normalization mode Used to reduce variance in the policy gradient loss:<BR>\n        loss<sub>i<\/sub> = -log(π(s<sub>i<\/sub>|a<sub>i<\/sub>)) * (r<sub>i<\/sub> - baseline)\n      <\/td>\n    <\/tr>\n\n  <\/table>\n\n  <BR>\n\n  <table border=\"1\">\n\n    <tr bgcolor=\"lightblue\">\n      <th>Signature<\/th> <th>Description<\/th> <th>Parameters<\/th>\n    <\/tr>\n\n    <tr bgcolor=\"Azure\">\n      <td>\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#004a43; \">#<\/span><span style=\"color:#004a43; \">include <\/span><span style=\"color:#800000; \">&lt;<\/span><span style=\"color:#40015a; \">DataFrame/DataFrameMLVisitors.h<\/span><span style=\"color:#800000; \">&gt;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">template<\/span><span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">typename<\/span> T<span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">typename<\/span> I <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">         <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">size_t<\/span> A <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">0<\/span><span style=\"color:#800080; \">&gt;<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">struct<\/span> PolicyLearningLossVisitor<span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#696969; \">// -------------------------------------<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">template<\/span><span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">typename<\/span> T<span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">typename<\/span> I <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">         <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">size_t<\/span> A <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">0<\/span><span style=\"color:#800080; \">&gt;<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">using<\/span> plloss_v <span style=\"color:#808030; \">=<\/span> PolicyLearningLossVisitor<span style=\"color:#800080; \">&lt;<\/span>T<span style=\"color:#808030; \">,<\/span> I<span style=\"color:#808030; \">,<\/span> A<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n      <\/td>\n      <td>\n        This is a \"single action visitor\", meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.<BR><BR>\n        This functor calculates loss function of policy learning. It requires two columns <I>action probability<\/I> and <I>reward<\/I>. <BR>\n        The formula is: <I>L = -log(P(state|action)) * reward<\/I><BR><BR>\n\n        This works with both scalar and multidimensional (i.e. vectors or arrays) datasets.<BR><BR>\n\n        <B>get_result()<\/B> returns the vector of values. In case of a multidimensional column, it returns a vector of vectors. Each inner vector is the length of data dimension. In case of a multidimensional column, the values are done per dimension<BR><BR>\n\n        <I>\n        <PRE>\nexplicit\nPolicyLearningLossVisitor(policy_loss_baseline baseline = policy_loss_baseline::none,\n                          std::optional<double> baseline_val = std::nullopt,\n                          double epsilon = 1e-8);\n\n<B>baseline<\/B>: Baseline policy\n<B>baseline_val<\/B>: Value for constant baseline policy\n        <\/PRE>\n\t\t<\/I>\n\n      <\/td>\n      <td width=\"30%\">\n        <B>T<\/B>: Column data type.<BR>\n        <B>I<\/B>: Index type.<BR>\n        <B>A<\/B>: Memory alignment boundary for vectors. Default is system default alignment<BR>\n      <\/td>\n    <\/tr>\n\n  <\/table>\n\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">static<\/span> <span style=\"color:#800000; font-weight:bold; \">void<\/span> test_PolicyLearningLossVisitor<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span>  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">cout<\/span> <span style=\"color:#808030; \">&lt;<\/span><span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#800000; \">\"<\/span><span style=\"color:#0f69ff; \">\\n<\/span><span style=\"color:#0000e6; \">Testing PolicyLearningLossVisitor{  } ...<\/span><span style=\"color:#800000; \">\"<\/span> <span style=\"color:#808030; \">&lt;<\/span><span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">endl<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    MyDataFrame                df<span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#800080; \">&gt;<\/span>  idxvec <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">3<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">10<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">5<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">7<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">8<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">12<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">9<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">12<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">10<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">13<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">10<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">15<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">14<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#800080; \">&gt;<\/span>         dblvec <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.35<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.11<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.05<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.06<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.03<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.08<\/span><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#800080; \">&gt;<\/span>         dblvec2 <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">3<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">4<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">5<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">6<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">7<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">8<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">9<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">10<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">11<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">12<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">13<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">14<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">15<\/span><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#800080; \">&gt;<\/span>         dblvec3 <span style=\"color:#808030; \">=<\/span> <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">3<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">4<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">5<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">6<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">7<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008c00; \">8<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">9<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">10<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008c00; \">11<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">12<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008c00; \">13<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">14<\/span><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>load_data<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">move<\/span><span style=\"color:#808030; \">(<\/span>idxvec<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">                 <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span>make_pair<span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">action_prob<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> dblvec<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">                 <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span>make_pair<span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">reward<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> dblvec2<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\">                 <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span>make_pair<span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">dbl_col_3<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> dblvec3<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    plloss_v<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">256<\/span><span style=\"color:#800080; \">&gt;<\/span>    pll<span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>single_act_visit<span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">action_prob<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">reward<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> pll<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">4.6052<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.0001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">6<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">19.6939<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.0001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">14<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">37.8859<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.0001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">// Now multidimensional data<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">//<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800000; font-weight:bold; \">constexpr<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">size_t<\/span>   dim <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008c00; \">3<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800000; font-weight:bold; \">using<\/span> ary_col_t <span style=\"color:#808030; \">=<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">array<\/span><span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#808030; \">,<\/span> dim<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800000; font-weight:bold; \">using<\/span> vec_col_t <span style=\"color:#808030; \">=<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">vector<\/span><span style=\"color:#800080; \">&lt;<\/span><span style=\"color:#800000; font-weight:bold; \">double<\/span><span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#800080; \">&gt;<\/span>   ary_action  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.9<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.8<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.95<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// high confidence, all dims<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.05<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.2<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// low confidence, exercises log near 0<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// uniform uncertainty<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.75<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.3<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.6<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// mixed confidence<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.99<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.99<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.99<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// near-certainty (log close to 0)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// near-zero probs (exercises epsilon clamp)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.4<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.7<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.55<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// moderate confidence<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.6<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.45<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.8<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// mixed<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#800080; \">&gt;<\/span>   vec_action  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.9<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.8<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.95<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// high confidence, all dims<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.05<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.2<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// low confidence, exercises log near 0<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// uniform uncertainty<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.75<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.3<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.6<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// mixed confidence<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.99<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.99<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.99<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// near-certainty (log close to 0)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.01<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// near-zero probs (exercises epsilon clamp)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.4<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.7<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.55<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// moderate confidence<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#008000; \">0.6<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#008000; \">0.45<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008000; \">0.8<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#696969; \">// mixed<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#800080; \">&gt;<\/span>   ary_reward  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">2.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// positive reward<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">2.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// negative reward (bad action)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">0.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// zero reward (loss should be 0)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">3.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs across dims<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.2<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.05<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// small positive<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">3.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">2.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// large negative (penalises near-zero probs)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">2.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.8<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.2<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    StlVecType<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#800080; \">&gt;<\/span>   vec_reward  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">2.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// positive reward<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">2.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// negative reward (bad action)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">0.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// zero reward (loss should be 0)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">3.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs across dims<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.2<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.05<\/span> <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// small positive<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">3.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">2.5<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1.0<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// large negative (penalises near-zero probs)<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span>  <span style=\"color:#008000; \">2.0<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.0<\/span><span style=\"color:#808030; \">,<\/span>  <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.5<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs<\/span><\/span>\n<span class=\"line_wrapper\">        <span style=\"color:#800080; \">{<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">0.1<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">0.8<\/span><span style=\"color:#808030; \">,<\/span>   <span style=\"color:#008000; \">1.2<\/span>  <span style=\"color:#800080; \">}<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#696969; \">// mixed signs<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>load_column<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">ARY ACTION<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">move<\/span><span style=\"color:#808030; \">(<\/span>ary_action<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span> nan_policy<span style=\"color:#800080; \">::<\/span>dont_pad_with_nans<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>load_column<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">VEC ACTION<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">move<\/span><span style=\"color:#808030; \">(<\/span>vec_action<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span> nan_policy<span style=\"color:#800080; \">::<\/span>dont_pad_with_nans<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>load_column<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">ARY REWARD<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">move<\/span><span style=\"color:#808030; \">(<\/span>ary_reward<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span> nan_policy<span style=\"color:#800080; \">::<\/span>dont_pad_with_nans<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>load_column<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">VEC REWARD<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">move<\/span><span style=\"color:#808030; \">(<\/span>vec_reward<span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">,<\/span> nan_policy<span style=\"color:#800080; \">::<\/span>dont_pad_with_nans<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    plloss_v<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">256<\/span><span style=\"color:#800080; \">&gt;<\/span> ary_pll <span style=\"color:#800080; \">{<\/span> policy_loss_baseline<span style=\"color:#800080; \">::<\/span>mean <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    plloss_v<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">long<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#008c00; \">256<\/span><span style=\"color:#800080; \">&gt;<\/span> vec_pll <span style=\"color:#800080; \">{<\/span> policy_loss_baseline<span style=\"color:#800080; \">::<\/span>mean <span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>single_act_visit<span style=\"color:#800080; \">&lt;<\/span>ary_col_t<span style=\"color:#808030; \">,<\/span> ary_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">ARY ACTION<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">ARY REWARD<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> ary_pll<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    df<span style=\"color:#808030; \">.<\/span>single_act_visit<span style=\"color:#800080; \">&lt;<\/span>vec_col_t<span style=\"color:#808030; \">,<\/span> vec_col_t<span style=\"color:#800080; \">&gt;<\/span><span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">VEC ACTION<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> <span style=\"color:#800000; \">\"<\/span><span style=\"color:#0000e6; \">VEC REWARD<\/span><span style=\"color:#800000; \">\"<\/span><span style=\"color:#808030; \">,<\/span> vec_pll<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span>ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">.<\/span>size<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">=<\/span><span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">8<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800000; font-weight:bold; \">for<\/span> <span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; font-weight:bold; \">const<\/span> <span style=\"color:#800000; font-weight:bold; \">auto<\/span> <span style=\"color:#808030; \">&amp;<\/span>ary <span style=\"color:#800080; \">:<\/span> ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">)<\/span><\/span>\n<span class=\"line_wrapper\">        assert<span style=\"color:#808030; \">(<\/span>ary<span style=\"color:#808030; \">.<\/span>size<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">=<\/span><span style=\"color:#808030; \">=<\/span> dim<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">0.079020<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.000001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span>ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">&gt;<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1e-16<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">5<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">11.5129<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.0001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>ary_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">7<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">0.274745<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.000001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span>vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">.<\/span>size<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">=<\/span><span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">8<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#800000; font-weight:bold; \">for<\/span> <span style=\"color:#808030; \">(<\/span><span style=\"color:#800000; font-weight:bold; \">const<\/span> <span style=\"color:#800000; font-weight:bold; \">auto<\/span> <span style=\"color:#808030; \">&amp;<\/span>vec <span style=\"color:#800080; \">:<\/span> vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">)<\/span><\/span>\n<span class=\"line_wrapper\">        assert<span style=\"color:#808030; \">(<\/span>vec<span style=\"color:#808030; \">.<\/span>size<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">=<\/span><span style=\"color:#808030; \">=<\/span> dim<span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">0<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">0.079020<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.000001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span>vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">&gt;<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">1e-16<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">5<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#808030; \">-<\/span><span style=\"color:#008000; \">11.5129<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.0001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\">    assert<span style=\"color:#808030; \">(<\/span><span style=\"color:#666616; \">std<\/span><span style=\"color:#800080; \">::<\/span><span style=\"color:#603000; \">abs<\/span><span style=\"color:#808030; \">(<\/span>vec_pll<span style=\"color:#808030; \">.<\/span>get_result<span style=\"color:#808030; \">(<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">7<\/span><span style=\"color:#808030; \">]<\/span><span style=\"color:#808030; \">[<\/span><span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">]<\/span> <span style=\"color:#808030; \">-<\/span> <span style=\"color:#008000; \">0.274745<\/span><span style=\"color:#808030; \">)<\/span> <span style=\"color:#808030; \">&lt;<\/span> <span style=\"color:#008000; \">0.000001<\/span><span style=\"color:#808030; \">)<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800080; \">}<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n\n  <BR><img src=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true\" alt=\"C++ DataFrame\"\n       width=\"200\" height=\"200\" style=\"float:right\"/>\n\n<\/body>\n<\/html>\n\n<!--\nLocal Variables:\nmode:HTML\ntab-width:4\nc-basic-offset:4\nEnd:\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9140:3FA0D:1781C6:5DC457:6AB92B20"},"text_sha256":"1c6adc53696b6a4c509c060d058875b3ac7332a7e9ec33cbb9cfdd89e65a679e"},{"path":"docs/HTML/roll_policy.html","size":3983,"blob_sha":"19626e518fe67cf6a8db7127e3af590ccf1585a1","priority":1,"status":200,"text":"<!--\nCopyright (c) 2019-2026, Hossein Moein\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n* Neither the name of Hossein Moein and/or the DataFrame nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL Hossein Moein BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n<!DOCTYPE html>\n<html>\n\n<head>\n<style>\nbody {\n  background-image: linear-gradient(Azure, AliceBlue, GhostWhite, WhiteSmoke);\n}\n<\/style>\n<\/head>\n\n<body style=\"font-family: Georgia, serif\">\n  <font size=\"+3\">&#8592;<\/font> <a href=\"https://hosseinmoein.github.io/DataFrame/docs/HTML/DataFrame.html\">Back to Documentations<\/a><BR><BR>\n  \n  <table border=\"1\">\n\n    <tr bgcolor=\"lightblue\">\n      <th>Signature<\/th> <th>Description<\/th>\n    <\/tr>\n    <tr bgcolor=\"Azure\">\n      <td>\n<pre class=\"code_syntax\" style=\"color:#000000;background:#ffffff00;\"><span class=\"line_wrapper\"><span style=\"color:#800000; font-weight:bold; \">enum<\/span> <span style=\"color:#800000; font-weight:bold; \">class<\/span>  roll_policy <span style=\"color:#800080; \">:<\/span> <span style=\"color:#800000; font-weight:bold; \">unsigned<\/span> <span style=\"color:#800000; font-weight:bold; \">char<\/span>  <span style=\"color:#800080; \">{<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">// Roll one block of data at a time<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">// The length of result will be \"input length / rolling period\"<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">//<\/span><\/span>\n<span class=\"line_wrapper\">    blocks <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">1<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\"><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">// Roll one data point at a time<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">// The length of result will be \"input length - rolling period\"<\/span><\/span>\n<span class=\"line_wrapper\">    <span style=\"color:#696969; \">//<\/span><\/span>\n<span class=\"line_wrapper\">    continuous <span style=\"color:#808030; \">=<\/span> <span style=\"color:#008c00; \">2<\/span><span style=\"color:#808030; \">,<\/span><\/span>\n<span class=\"line_wrapper\"><span style=\"color:#800080; \">}<\/span><span style=\"color:#800080; \">;<\/span><\/span>\n<span class=\"line_wrapper\"><\/span><\/pre>\n      <\/td>\n      <td>\n        Enumerated type to specify how to roll different statistics over input series\n      <\/td>\n    <\/tr>\n  <\/table>\n\n  <BR><img src=\"https://github.com/hosseinmoein/DataFrame/blob/master/docs/LionLookingUp.jpg?raw=true\" alt=\"C++ DataFrame\"\n       width=\"200\" height=\"200\" style=\"float:right\"/>\n\n<\/body>\n<\/html>\n\n<!--\nLocal Variables:\nmode:HTML\ntab-width:4\nc-basic-offset:4\nEnd:\n-->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:177F13:5DBE51:6AB92B1A"},"text_sha256":"550ee9ba488ee17c118be3af883a43a5cfd2a0246d8da57bd61074c785afb8f7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"bethgelab/foolbox","input_row":{"repository":"bethgelab/foolbox","url":"https://github.com/bethgelab/foolbox","name":"foolbox","owner":"bethgelab","description":"A Python toolbox to create adversarial examples that fool neural networks in PyTorch, TensorFlow, and JAX","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2975,"issues":373,"created_at":"2017-06-14T13:05:48Z","updated_at":"2026-09-21T13:18:35Z","first_commit_at":"2017-06-04T21:18:06Z","last_commit_at":"2024-03-04T15:46:26Z","activity_months":80.969999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:40.648Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"bethgelab/foolbox","visibility":"public","created_at":"2017-06-14T13:05:48Z","updated_at":"2026-09-21T13:18:35Z","private":false,"fork":false,"archived":false,"stargazers_count":2975,"open_issues_count":29,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2378","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17D56DE:1BF9027:6AB92B24"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2377","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17DB57D:1BFF9F8:6AB92B25"},"commit":{"sha":"7bcae187c26fb9a4e68707958d97a58d9132a020","url":"https://github.com/bethgelab/foolbox/commit/7bcae187c26fb9a4e68707958d97a58d9132a020","date":"2018-05-24T15:51:18Z","author_date":"2018-04-30T21:23:30Z","committer_date":"2018-05-24T15:51:18Z","tree_sha":"bb0d850025aa050caaa7f1dad3f416910d544245","message_first_line":"Updated MXNetGluon docs, batch_predictions, and added unit tests."},"tree_request_status":200,"tree_rate":{"github_remaining":"2376","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:17FDD8F:1C216FD:6AB92B25"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5050,"blob_sha":"4fd3a540a3b2b2b3c4b66df1093bac85cdd4b801","priority":0}],"documents":[{"path":"README.rst","size":5050,"blob_sha":"4fd3a540a3b2b2b3c4b66df1093bac85cdd4b801","priority":0,"status":200,"text":".. image:: http://bethgelab.org/media/banners/benchmark_banner_small.png\n    :target: https://robust.vision/benchmark\n\nYou might want to have a look at our recently announced `Robust Vision Benchmark <https://robust.vision/benchmark>`__.\n\n------------\n\n\n.. image:: https://readthedocs.org/projects/foolbox/badge/?version=latest\n    :target: https://foolbox.readthedocs.io/en/latest/\n\n.. image:: https://travis-ci.org/bethgelab/foolbox.svg?branch=master\n    :target: https://travis-ci.org/bethgelab/foolbox\n\n.. image:: https://coveralls.io/repos/github/bethgelab/foolbox/badge.svg\n    :target: https://coveralls.io/github/bethgelab/foolbox\n\n.. image:: https://badge.fury.io/py/foolbox.svg\n    :target: https://badge.fury.io/py/foolbox\n\n\n\n=======\nFoolbox\n=======\n\nFoolbox is a Python toolbox to create adversarial examples that fool neural networks. It requires `Python`, `NumPy` and `SciPy`.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n   pip install foolbox\n\nWe test using Python 2.7, 3.5 and 3.6. Other Python versions might work as well. **We recommend using Python 3!**\n\nDocumentation\n-------------\n\nDocumentation is available on readthedocs: http://foolbox.readthedocs.io/\n\nOur paper describing Foolbox is on arXiv: https://arxiv.org/abs/1707.04131\n\nExample\n-------\n\n.. code-block:: python\n\n   import foolbox\n   import keras\n   import numpy as np\n   from keras.applications.resnet50 import ResNet50\n\n   # instantiate model\n   keras.backend.set_learning_phase(0)\n   kmodel = ResNet50(weights='imagenet')\n   preprocessing = (np.array([104, 116, 123]), 1)\n   fmodel = foolbox.models.KerasModel(kmodel, bounds=(0, 255), preprocessing=preprocessing)\n\n   # get source image and label\n   image, label = foolbox.utils.imagenet_example()\n\n   # apply attack on source image\n   # ::-1 reverses the color channels, because Keras ResNet50 expects BGR instead of RGB\n   attack = foolbox.attacks.FGSM(fmodel)\n   adversarial = attack(image[:, :, ::-1], label)\n\nThe result can be plotted like this:\n\n.. code-block:: python\n\n   # if you use Jupyter notebooks\n   %matplotlib inline\n\n   import matplotlib.pyplot as plt\n\n   plt.figure()\n\n   plt.subplot(1, 3, 1)\n   plt.title('Original')\n   plt.imshow(image / 255)  # division by 255 to convert [0, 255] to [0, 1]\n   plt.axis('off')\n\n   plt.subplot(1, 3, 2)\n   plt.title('Adversarial')\n   plt.imshow(adversarial[:, :, ::-1] / 255)  # ::-1 to convert BGR to RGB\n   plt.axis('off')\n\n   plt.subplot(1, 3, 3)\n   plt.title('Difference')\n   difference = adversarial[:, :, ::-1] - image\n   plt.imshow(difference / abs(difference).max() * 0.2 + 0.5)\n   plt.axis('off')\n\n   plt.show()\n\n.. image:: https://github.com/bethgelab/foolbox/raw/master/example.png\n\n\nInterfaces for a range of other deeplearning packages such as TensorFlow,\nPyTorch, Theano, Lasagne and MXNet are available, e.g.\n\n.. code-block:: python\n\n   model = foolbox.models.TensorFlowModel(images, logits, bounds=(0, 255))\n   model = foolbox.models.PyTorchModel(torchmodel, bounds=(0, 255), num_classes=1000)\n   # etc.\n\nDifferent adversarial criteria such as Top-k, specific target classes or target probability \nvalues for the original class or the target class can be passed to the attack, e.g.\n\n.. code-block:: python\n\n   criterion = foolbox.criteria.TargetClass(22)\n   attack    = foolbox.attacks.LBFGSAttack(fmodel, criterion)\n\nFeature requests and bug reports\n--------------------------------\n\nWe welcome feature requests and bug reports. Just create a new issue on `GitHub <https://github.com/bethgelab/foolbox/issues/new>`__.\n\nQuestions\n---------\n\nDepending on the nature of your question feel free to post it as an issue on `GitHub <https://github.com/bethgelab/foolbox/issues/new>`__, or post it as a question on `Stack Overflow <https://stackoverflow.com>`_ using the `foolbox` tag. We will try to monitor that tag but if you don't get an answer don't hesitate to contact us.\n\nContributions welcome\n----------------------\n\nFoolbox is a work in progress and any input is welcome.\n\nIn particular, we encourage users of deep learning frameworks for which we do not yet have builtin support, e.g. Caffe, Caffe2 or CNTK, to contribute the necessary wrappers. Don't hestiate to contact us if we can be of any help.\n\nMoreoever, attack developers are encouraged to share their reference implementation using Foolbox so that it will be available to everyone.\n\nCitation\n--------\n\nIf you find Foolbox useful for your scientific work, please consider citing it\nin resulting publications:\n\n.. code-block::\n\n  @article{rauber2017foolbox,\n    title={Foolbox: A Python toolbox to benchmark the robustness of machine learning models},\n    author={Rauber, Jonas and Brendel, Wieland and Bethge, Matthias},\n    journal={arXiv preprint arXiv:1707.04131},\n    year={2017},\n    url={http://arxiv.org/abs/1707.04131},\n    archivePrefix={arXiv},\n    eprint={1707.04131},\n  }\n\nYou can find the paper on arXiv: https://arxiv.org/abs/1707.04131\n\nAuthors\n-------\n\n* `Jonas Rauber <https://github.com/jonasrauber>`_\n* `Wieland Brendel <https://github.com/wielandbrendel>`_\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FAF2:4F9CC:170D3E:5D4DD3:6AB92B24"},"text_sha256":"80b62f59a080bbfef22e921bb8a70b6bb7427de57a266f2dae26fa27da6e45a2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2375","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:17851C8:1BA92E1:6AB92B26"},"commit":{"sha":"2513a9a8675d7017e5266d3b0ed89124cb436ec5","url":"https://github.com/bethgelab/foolbox/commit/2513a9a8675d7017e5266d3b0ed89124cb436ec5","date":"2024-03-04T15:46:26Z","author_date":"2024-03-04T15:46:26Z","committer_date":"2024-03-04T15:46:26Z","tree_sha":"c18038ef45f1e6246548957dc9f18fa6e299f9e8","message_first_line":"Fix guide github action (#730)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2374","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17B8241:1BDC548:6AB92B26"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6340,"blob_sha":"9c8703e066b11df683ed490fea95d19333a2ab7e","priority":0}],"documents":[{"path":"README.rst","size":6340,"blob_sha":"9c8703e066b11df683ed490fea95d19333a2ab7e","priority":0,"status":200,"text":".. raw:: html\n\n   <a href=\"https://foolbox.jonasrauber.de\"><img src=\"https://raw.githubusercontent.com/bethgelab/foolbox/master/guide/.vuepress/public/logo_small.png\" align=\"right\" /><\/a>\n\n.. image:: https://badge.fury.io/py/foolbox.svg\n   :target: https://badge.fury.io/py/foolbox\n\n.. image:: https://readthedocs.org/projects/foolbox/badge/?version=latest\n    :target: https://foolbox.readthedocs.io/en/latest/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/ambv/black\n\n.. image:: https://joss.theoj.org/papers/10.21105/joss.02607/status.svg\n   :target: https://doi.org/10.21105/joss.02607\n\n===============================================================================================================================\nFoolbox: Fast adversarial attacks to benchmark the robustness of machine learning models in PyTorch, TensorFlow, and JAX\n===============================================================================================================================\n\n`Foolbox <https://foolbox.jonasrauber.de>`_ is a **Python library** that lets you easily run adversarial attacks against machine learning models like deep neural networks. It is built on top of EagerPy and works natively with models in `PyTorch <https://pytorch.org>`_, `TensorFlow <https://www.tensorflow.org>`_, and `JAX <https://github.com/google/jax>`_.\n\n🔥 Design \n----------\n\n**Foolbox 3** has been rewritten from scratch\nusing `EagerPy <https://github.com/jonasrauber/eagerpy>`_ instead of\nNumPy to achieve native performance on models\ndeveloped in PyTorch, TensorFlow and JAX, all with one code base without code duplication.\n\n- **Native Performance**: Foolbox 3 is built on top of EagerPy and runs natively in PyTorch, TensorFlow, and JAX and comes with real batch support.\n- **State-of-the-art attacks**: Foolbox provides a large collection of state-of-the-art gradient-based and decision-based adversarial attacks.\n- **Type Checking**: Catch bugs before running your code thanks to extensive type annotations in Foolbox.\n\n📖 Documentation\n-----------------\n\n- **Guide**: The best place to get started with Foolbox is the official `guide <https://foolbox.jonasrauber.de>`_.\n- **Tutorial**: If you are looking for a tutorial, check out this `Jupyter notebook <https://github.com/jonasrauber/foolbox-native-tutorial/blob/master/foolbox-native-tutorial.ipynb>`_ |colab|.\n- **Documentation**: The API documentation can be found on `ReadTheDocs <https://foolbox.readthedocs.io/en/stable/>`_.\n\n.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg\n   :target: https://colab.research.google.com/github/jonasrauber/foolbox-native-tutorial/blob/master/foolbox-native-tutorial.ipynb\n\n🚀 Quickstart\n--------------\n\n.. code-block:: bash\n\n   pip install foolbox\n\nFoolbox is tested with Python 3.8 and newer - however, it will most likely also work with version 3.6 - 3.8. To use it with `PyTorch <https://pytorch.org>`_, `TensorFlow <https://www.tensorflow.org>`_, or `JAX <https://github.com/google/jax>`_, the respective framework needs to be installed separately. These frameworks are not declared as dependencies because not everyone wants to use and thus install all of them and because some of these packages have different builds for different architectures and CUDA versions. Besides that, all essential dependencies are automatically installed.\n\nYou can see the versions we currently use for testing in the `Compatibility section <#-compatibility>`_ below, but newer versions are in general expected to work.\n\n🎉 Example\n-----------\n\n.. code-block:: python\n\n   import foolbox as fb\n\n   model = ...\n   fmodel = fb.PyTorchModel(model, bounds=(0, 1))\n\n   attack = fb.attacks.LinfPGD()\n   epsilons = [0.0, 0.001, 0.01, 0.03, 0.1, 0.3, 0.5, 1.0]\n   _, advs, success = attack(fmodel, images, labels, epsilons=epsilons)\n\n\nMore examples can be found in the `examples <./examples/>`_ folder, e.g.\na full `ResNet-18 example <./examples/single_attack_pytorch_resnet18.py>`_.\n\n📄 Citation\n------------\n\nIf you use Foolbox for your work, please cite our `JOSS paper on Foolbox Native (i.e., Foolbox 3.0) <https://doi.org/10.21105/joss.02607>`_ and our `ICML workshop paper on Foolbox <https://arxiv.org/abs/1707.04131>`_ using the following BibTeX entries:\n\n.. code-block::\n\n   @article{rauber2017foolboxnative,\n     doi = {10.21105/joss.02607},\n     url = {https://doi.org/10.21105/joss.02607},\n     year = {2020},\n     publisher = {The Open Journal},\n     volume = {5},\n     number = {53},\n     pages = {2607},\n     author = {Jonas Rauber and Roland Zimmermann and Matthias Bethge and Wieland Brendel},\n     title = {Foolbox Native: Fast adversarial attacks to benchmark the robustness of machine learning models in PyTorch, TensorFlow, and JAX},\n     journal = {Journal of Open Source Software}\n   }\n\n.. code-block::\n\n   @inproceedings{rauber2017foolbox,\n     title={Foolbox: A Python toolbox to benchmark the robustness of machine learning models},\n     author={Rauber, Jonas and Brendel, Wieland and Bethge, Matthias},\n     booktitle={Reliable Machine Learning in the Wild Workshop, 34th International Conference on Machine Learning},\n     year={2017},\n     url={http://arxiv.org/abs/1707.04131},\n   }\n\n\n👍 Contributions\n-----------------\n\nWe welcome contributions of all kind, please have a look at our\n`development guidelines <https://foolbox.jonasrauber.de/guide/development.html>`_.\nIn particular, you are invited to contribute\n`new adversarial attacks <https://foolbox.jonasrauber.de/guide/adding_attacks.html>`_.\nIf you would like to help, you can also have a look at the issues that are\nmarked with `contributions welcome\n<https://github.com/bethgelab/foolbox/issues?q=is%3Aopen+is%3Aissue+label%3A%22contributions+welcome%22>`_.\n\n💡 Questions?\n--------------\n\nIf you have a question or need help, feel free to open an issue on GitHub.\nOnce GitHub Discussions becomes publicly available, we will switch to that.\n\n💨 Performance\n--------------\n\nFoolbox 3.0 is much faster than Foolbox 1 and 2. A basic `performance comparison`_ can be found in the `performance` folder.\n\n🐍 Compatibility\n-----------------\n\nWe currently test with the following versions:\n\n* PyTorch 1.10.1\n* TensorFlow 2.6.3\n* JAX 0.2.517\n* NumPy 1.18.1\n\n.. _performance comparison: performance/README.md\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7BE0:35999:178A65:5DCE89:6AB92B26"},"text_sha256":"2e762dae7dfb0a82fc06c12bc2c3a6374eee287227fbad4693540740f47148c4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Cartucho/mAP","input_row":{"repository":"Cartucho/mAP","url":"https://github.com/Cartucho/mAP","name":"mAP","owner":"Cartucho","description":"mean Average Precision - This code evaluates the performance of your neural net for object recognition.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2966,"issues":159,"created_at":"2018-03-08T11:24:23Z","updated_at":"2026-09-24T11:17:27Z","first_commit_at":"2018-03-08T11:53:31Z","last_commit_at":"2020-05-29T10:47:50Z","activity_months":26.710000000000001,"ai_ml_match_topics":"machine-learning; computer-vision; neural-network; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:43.710Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Cartucho/mAP","visibility":"public","created_at":"2018-03-08T11:24:23Z","updated_at":"2026-09-24T11:17:27Z","private":false,"fork":false,"archived":false,"stargazers_count":2966,"open_issues_count":109,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2373","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0893:71E0C:17F0AFF:1C138CD:6AB92B27"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2372","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:17962EE:1BBA146:6AB92B28"},"commit":{"sha":"6f78b0bc50d85363bf829bf5eda9daa4a714b139","url":"https://github.com/Cartucho/mAP/commit/6f78b0bc50d85363bf829bf5eda9daa4a714b139","date":"2018-05-12T22:06:33Z","author_date":"2018-05-12T22:06:33Z","committer_date":"2018-05-12T22:06:33Z","tree_sha":"9c96448b34e59c48233dd4c2fcbb15a84fb22bed","message_first_line":"Update error message of file not found error"},"tree_request_status":200,"tree_rate":{"github_remaining":"2371","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17D2367:1BF5A68:6AB92B28"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5508,"blob_sha":"49afd945a42df7539e320f742b58bb47bcecf573","priority":0}],"documents":[{"path":"README.md","size":5508,"blob_sha":"49afd945a42df7539e320f742b58bb47bcecf573","priority":0,"status":200,"text":"# mAP (mean Average Precision)\n\n[![New](https://img.shields.io/badge/2018-NEW-brightgreen.svg)](https://github.com/Cartucho/mAP/commits/master)\n[![GitHub stars](https://img.shields.io/github/stars/Cartucho/mAP.svg?style=social&label=Stars)](https://github.com/Cartucho/mAP)\n\nThis code will evaluate the performance of your neural net for object recognition.\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/15831541/37559643-6738bcc8-2a21-11e8-8a07-ed836f19c5d9.gif\" width=\"450\" height=\"300\" />\n<\/p>\n\nIn practice, a **higher mAP** value indicates a **better performance** of your neural net, given your ground-truth and set of classes.\n\n## Table of contents\n\n- [Explanation](#explanation)\n- [Prerequisites](#prerequisites)\n- [Quick start](#quick-start)\n- [Running the code](#running-the-code)\n- [Authors](#authors)\n\n## Explanation\nThe performance of your neural net will be judged using the mAP criterium defined in the [PASCAL VOC 2012 competition](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/). We simply adapted the [official Matlab code](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/#devkit) into Python (in our tests they both give the same results).\n\nFirst (**1.**), we calculate the Average Precision (AP), for each of the classes present in the ground-truth. Finally (**2.**), we calculate the mAP (mean Average Precision) value.\n\n#### 1. Calculate AP\n\nFor each class:\n\nFirst, your neural net **predicted objects** are sorted by decreasing confidence and are assigned to **ground-truth objects**. We have \"a match\" when they share the **same label and an IoU >= 0.5** (Intersection over Union greater than 50%). This \"match\" is considered a true positive if that ground-truth object has not been already used (to avoid multiple detections of the same object). \n\n<img src=\"https://user-images.githubusercontent.com/15831541/37725175-45b9e1a6-2d2a-11e8-8c15-2fb4d716ca9a.png\" width=\"35%\" height=\"35%\" />\n\nUsing this criterium, we calculate the precision/recall curve. E.g:\n\n<img src=\"https://user-images.githubusercontent.com/15831541/37722176-3fd0f3e4-2d23-11e8-961c-29001ea2a6b8.png\" width=\"65%\" height=\"65%\" />\n\nThen we compute a version of the measured precision/recall curve with **precision monotonically decreasing** (shown in light red), by setting the precision for recall `r` to the maximum precision obtained for any recall `r' > r`.\n\nFinally, we compute the AP as the **area under this curve** (shown in light blue) by numerical integration.\nNo approximation is involved since the curve is piecewise constant.\n\n#### 2. Calculate mAP\n\nWe calculate the mean of all the AP's, resulting in an mAP value from 0 to 100%. E.g:\n\n<img src=\"https://user-images.githubusercontent.com/15831541/38933241-5f9556ae-4310-11e8-9d47-cb205f9b103b.png\"/>\n\n<img src=\"https://user-images.githubusercontent.com/15831541/38933180-366b6fca-4310-11e8-99b9-17ad4b159b86.png\" />\n\n## Prerequisites\n\nYou need to install:\n- [Python](https://www.python.org/downloads/)\n\nOptional:\n- **plot** the results by [installing Matplotlib](https://matplotlib.org/users/installing.html) - Linux, macOS and Windows:\n    1. `python -mpip install -U pip`  \n    2.  `python -mpip install -U matplotlib`\n-  show **animation** by installing [OpenCV](https://www.opencv.org/):\n    1. `python -mpip install -U pip`\n    2. `python -mpip install -U opencv-python`  \n\n## Quick-start\nTo start using the mAP you need to clone the repo:\n\n```\ngit clone https://github.com/Cartucho/mAP\n```\n\n## Running the code\n\nStep by step:\n\n  1. [Create the ground-truth files](#create-the-ground-truth-files)\n  2. Move the ground-truth files into the folder **ground-truth/**\n  3. [Create the predicted objects files](#create-the-predicted-objects-files)\n  4. Move the predictions files into the folder **predicted/**\n  5. Run the code:\n         ```\n         python main.py\n         ```\n\nOptional (if you want to see the **animation**):\n\n  6. Insert the images into the folder **images/**\n\n\n#### PASCAL VOC, Darkflow and YOLO users\n\nIn the [extra](https://github.com/Cartucho/mAP/tree/master/extra) folder you can find additional scripts to convert **PASCAL VOC**, **darkflow** and **YOLO** files into the required format.\n\n#### Create the ground-truth files\n\n- Create a separate ground-truth text file for each image.\n- Use **matching names** (e.g. image: \"image_1.jpg\", ground-truth: \"image_1.txt\"; \"image_2.jpg\", \"image_2.txt\"...).\n- In these files, each line should be in the following format:\n    ```\n    <class_name> <left> <top> <right> <bottom>\n    ```\n- E.g. \"image_1.txt\":\n    ```\n    tvmonitor 2 10 173 238\n    book 439 157 556 241\n    book 437 246 518 351\n    pottedplant 272 190 316 259\n    ```\n#### Create the predicted objects files\n\n- Create a separate predicted objects text file for each image.\n- Use **matching names** (e.g. image: \"image_1.jpg\", predicted: \"image_1.txt\"; \"image_2.jpg\", \"image_2.txt\"...).\n- In these files, each line should be in the following format:\n    ```\n    <class_name> <confidence> <left> <top> <right> <bottom>\n    ```\n- E.g. \"image_1.txt\":\n    ```\n    tvmonitor 0.471781 0 13 174 244\n    cup 0.414941 274 226 301 265\n    book 0.460851 429 219 528 247\n    chair 0.292345 0 199 88 436\n    book 0.269833 433 260 506 336\n    ```\n## Authors:\n* **João Cartucho** - Please give me your feedback: to.cartucho@gmail.com\n\n    Feel free to contribute\n\n    [![GitHub contributors](https://img.shields.io/github/contributors/Cartucho/mAP.svg)](https://github.com/Cartucho/mAP/graphs/contributors)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD6:18CDF1:178425:560AED:6AB92AFA"},"text_sha256":"b320ef331693f5117271b84347aa59b84e9497ff42d33a5b212598815d5207a6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2370","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:180E0C0:1C323D5:6AB92B29"},"commit":{"sha":"3605865a350859e60c7b711838d09c4e0012c774","url":"https://github.com/Cartucho/mAP/commit/3605865a350859e60c7b711838d09c4e0012c774","date":"2020-05-29T10:47:50Z","author_date":"2020-05-29T10:47:50Z","committer_date":"2020-05-29T10:47:50Z","tree_sha":"663d684b5eb41e317ecbedac1b90e96867f6fe4a","message_first_line":"fixing #43"},"tree_request_status":200,"tree_rate":{"github_remaining":"2369","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C1:14A1F2:18101E3:1C3442D:6AB92B29"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5914,"blob_sha":"46a31a01e72d7002c19279c56fcefddf11883f0f","priority":0}],"documents":[{"path":"README.md","size":5914,"blob_sha":"46a31a01e72d7002c19279c56fcefddf11883f0f","priority":0,"status":200,"text":"# mAP (mean Average Precision)\n\n[![GitHub stars](https://img.shields.io/github/stars/Cartucho/mAP.svg?style=social&label=Stars)](https://github.com/Cartucho/mAP)\n\nThis code will evaluate the performance of your neural net for object recognition.\n\n<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/15831541/37559643-6738bcc8-2a21-11e8-8a07-ed836f19c5d9.gif\" width=\"450\" height=\"300\" />\n<\/p>\n\nIn practice, a **higher mAP** value indicates a **better performance** of your neural net, given your ground-truth and set of classes.\n\n## Citation\n\nThis project was developed for the following paper, please consider citing it:\n\n```bibtex\n@INPROCEEDINGS{8594067,\n  author={J. {Cartucho} and R. {Ventura} and M. {Veloso}},\n  booktitle={2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}, \n  title={Robust Object Recognition Through Symbiotic Deep Learning In Mobile Robots}, \n  year={2018},\n  pages={2336-2341},\n}\n```\n\n## Table of contents\n\n- [Explanation](#explanation)\n- [Prerequisites](#prerequisites)\n- [Quick start](#quick-start)\n- [Running the code](#running-the-code)\n- [Authors](#authors)\n\n## Explanation\nThe performance of your neural net will be judged using the mAP criterium defined in the [PASCAL VOC 2012 competition](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/). We simply adapted the [official Matlab code](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/#devkit) into Python (in our tests they both give the same results).\n\nFirst (**1.**), we calculate the Average Precision (AP), for each of the classes present in the ground-truth. Finally (**2.**), we calculate the mAP (mean Average Precision) value.\n\n#### 1. Calculate AP\n\nFor each class:\n\nFirst, your neural net **detection-results** are sorted by decreasing confidence and are assigned to **ground-truth objects**. We have \"a match\" when they share the **same label and an IoU >= 0.5** (Intersection over Union greater than 50%). This \"match\" is considered a true positive if that ground-truth object has not been already used (to avoid multiple detections of the same object). \n\n<img src=\"https://user-images.githubusercontent.com/15831541/37725175-45b9e1a6-2d2a-11e8-8c15-2fb4d716ca9a.png\" width=\"35%\" height=\"35%\" />\n\nUsing this criterium, we calculate the precision/recall curve. E.g:\n\n<img src=\"https://user-images.githubusercontent.com/15831541/43008995-64dd53ce-8c34-11e8-8a2c-4567b1311910.png\" width=\"45%\" height=\"45%\" />\n\nThen we compute a version of the measured precision/recall curve with **precision monotonically decreasing** (shown in light red), by setting the precision for recall `r` to the maximum precision obtained for any recall `r' > r`.\n\nFinally, we compute the AP as the **area under this curve** (shown in light blue) by numerical integration.\nNo approximation is involved since the curve is piecewise constant.\n\n#### 2. Calculate mAP\n\nWe calculate the mean of all the AP's, resulting in an mAP value from 0 to 100%. E.g:\n\n<img src=\"https://user-images.githubusercontent.com/15831541/38933241-5f9556ae-4310-11e8-9d47-cb205f9b103b.png\"/>\n\n<img src=\"https://user-images.githubusercontent.com/15831541/38933180-366b6fca-4310-11e8-99b9-17ad4b159b86.png\" />\n\n## Prerequisites\n\nYou need to install:\n- [Python](https://www.python.org/downloads/)\n\nOptional:\n- **plot** the results by [installing Matplotlib](https://matplotlib.org/users/installing.html) - Linux, macOS and Windows:\n    1. `python -mpip install -U pip`  \n    2.  `python -mpip install -U matplotlib`\n-  show **animation** by installing [OpenCV](https://www.opencv.org/):\n    1. `python -mpip install -U pip`\n    2. `python -mpip install -U opencv-python`  \n\n## Quick-start\nTo start using the mAP you need to clone the repo:\n\n```\ngit clone https://github.com/Cartucho/mAP\n```\n\n## Running the code\n\nStep by step:\n\n  1. [Create the ground-truth files](#create-the-ground-truth-files)\n  2. Copy the ground-truth files into the folder **input/ground-truth/**\n  3. [Create the detection-results files](#create-the-detection-results-files)\n  4. Copy the detection-results files into the folder **input/detection-results/**\n  5. Run the code:\n         ```\n         python main.py\n         ```\n\nOptional (if you want to see the **animation**):\n\n  6. Insert the images into the folder **input/images-optional/**\n\n\n#### PASCAL VOC, Darkflow and YOLO users\n\nIn the [scripts/extra](https://github.com/Cartucho/mAP/tree/master/scripts/extra) folder you can find additional scripts to convert **PASCAL VOC**, **darkflow** and **YOLO** files into the required format.\n\n#### Create the ground-truth files\n\n- Create a separate ground-truth text file for each image.\n- Use **matching names** for the files (e.g. image: \"image_1.jpg\", ground-truth: \"image_1.txt\").\n- In these files, each line should be in the following format:\n    ```\n    <class_name> <left> <top> <right> <bottom> [<difficult>]\n    ```\n- The `difficult` parameter is optional, use it if you want the calculation to ignore a specific detection.\n- E.g. \"image_1.txt\":\n    ```\n    tvmonitor 2 10 173 238\n    book 439 157 556 241\n    book 437 246 518 351 difficult\n    pottedplant 272 190 316 259\n    ```\n\n#### Create the detection-results files\n\n- Create a separate detection-results text file for each image.\n- Use **matching names** for the files (e.g. image: \"image_1.jpg\", detection-results: \"image_1.txt\").\n- In these files, each line should be in the following format:\n    ```\n    <class_name> <confidence> <left> <top> <right> <bottom>\n    ```\n- E.g. \"image_1.txt\":\n    ```\n    tvmonitor 0.471781 0 13 174 244\n    cup 0.414941 274 226 301 265\n    book 0.460851 429 219 528 247\n    chair 0.292345 0 199 88 436\n    book 0.269833 433 260 506 336\n    ```\n## Authors:\n* **João Cartucho**\n\n    Feel free to contribute\n\n    [![GitHub contributors](https://img.shields.io/github/contributors/Cartucho/mAP.svg)](https://github.com/Cartucho/mAP/graphs/contributors)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:185046:5E942E:6AB92B2A"},"text_sha256":"f26af151f2f7309a002c270986a2e09b8de756010b38fad39d3cbc8b7b7382b1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pytorch/audio","input_row":{"repository":"pytorch/audio","url":"https://github.com/pytorch/audio","name":"audio","owner":"pytorch","description":"Data manipulation and transformation for audio signal processing, powered by PyTorch","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":2947,"issues":1006,"created_at":"2017-05-05T00:38:05Z","updated_at":"2026-09-26T13:20:16Z","first_commit_at":"2017-05-05T00:37:43Z","last_commit_at":"2026-09-23T16:26:49Z","activity_months":112.64,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:46.674Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pytorch/audio","visibility":"public","created_at":"2017-05-05T00:38:05Z","updated_at":"2026-09-26T13:20:16Z","private":false,"fork":false,"archived":false,"stargazers_count":2947,"open_issues_count":342,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2368","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F0:280FBC:17BEB2A:1BE19E4:6AB92B2A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2367","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083F:6E429:17E403E:1C07FD4:6AB92B2B"},"commit":{"sha":"18c01bef0b65cc5b11799bda7b19f4856fdfeac3","url":"https://github.com/pytorch/audio/commit/18c01bef0b65cc5b11799bda7b19f4856fdfeac3","date":"2018-05-09T15:46:14Z","author_date":"2018-05-09T15:46:14Z","committer_date":"2018-05-09T15:46:14Z","tree_sha":"5a4fba9c1d48e88a72f532155df41280bc755b88","message_first_line":"Bring back C++ extensions again (#47)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2366","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080D:2BC4E5:1823CEA:1C47B4A:6AB92B2B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1144,"blob_sha":"2b8087a8588f2f33cdf596fe6352859602d66ef4","priority":0}],"documents":[{"path":"README.md","size":1144,"blob_sha":"2b8087a8588f2f33cdf596fe6352859602d66ef4","priority":0,"status":200,"text":"torchaudio: an audio library for PyTorch\n================================================\n\n- [Support audio I/O (Load files, Save files)](http://pytorch.org/audio/)\n  - Load the following formats into a torch Tensor\n    - mp3, wav, aac, ogg, flac, avr, cdda, cvs/vms,\n    - aiff, au, amr, mp2, mp4, ac3, avi, wmv,\n    - mpeg, ircam and any other format supported by libsox.\n- [Dataloaders for common audio datasets (VCTK, YesNo)](http://pytorch.org/audio/datasets.html)\n- Common audio transforms\n  - [Scale, PadTrim, DownmixMono, LC2CL, BLC2CBL, MuLawEncoding, MuLawExpanding](http://pytorch.org/audio/transforms.html)\n\nDependencies\n------------\n* libsox v14.3.2 or above\n\nQuick install on\nOSX (Homebrew):\n```bash\nbrew install sox\n```\nLinux (Ubuntu):\n```bash\nsudo apt-get install sox libsox-dev libsox-fmt-all\n```\n\nInstallation\n------------\n\n```bash\npython setup.py install\n```\n\nQuick Usage\n-----------\n\n```python\nimport torchaudio\nsound, sample_rate = torchaudio.load('foo.mp3')\ntorchaudio.save('foo_save.mp3', sound, sample_rate) # saves tensor to file\n```\n\nAPI Reference\n-----------\n\nAPI Reference is located here: http://pytorch.org/audio/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BFAE:29FD16:183962:5E7D25:6AB92B2B"},"text_sha256":"a56577c088a36a4f8f6f8bc9e3b1c973b34c46fecf8294867c972947810065f2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2365","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F8:6E5BD:179B018:1BBDD45:6AB92B2C"},"commit":{"sha":"c0cbdb95674556cdff7266f2d44bb855f634cfde","url":"https://github.com/pytorch/audio/commit/c0cbdb95674556cdff7266f2d44bb855f634cfde","date":"2026-03-31T21:51:44Z","author_date":"2026-03-31T21:51:44Z","committer_date":"2026-03-31T21:51:44Z","tree_sha":"85b3795c54e74e5e1cc3e2fa1a1fe4943d51610c","message_first_line":"add preprocessor script for the windows build (#4184)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2364","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FA:380E1C:17D1FB8:1BF52E4:6AB92B2C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5358,"blob_sha":"af2b02160622b10fc170840480d9b565d302aec3","priority":0},{"path":"docs/source/compliance.kaldi.rst","size":467,"blob_sha":"2a54f6c61de1a3fc9afbfde01fbe071b9caccf47","priority":1}],"documents":[{"path":"README.md","size":5358,"blob_sha":"af2b02160622b10fc170840480d9b565d302aec3","priority":0,"status":200,"text":"torchaudio: an audio library for PyTorch\n========================================\n\n[![Documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchaudio%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/audio/main/)\n[![Anaconda Badge](https://anaconda.org/pytorch/torchaudio/badges/downloads.svg)](https://anaconda.org/pytorch/torchaudio)\n[![Anaconda-Server Badge](https://anaconda.org/pytorch/torchaudio/badges/platforms.svg)](https://anaconda.org/pytorch/torchaudio)\n\n![TorchAudio Logo](docs/source/_static/img/logo.png)\n\n> [!NOTE]\n> **We have transitioned TorchAudio into a\n>  maintenance phase. This process removed some user-facing\n>  features. These features were deprecated from TorchAudio 2.8 and removed in 2.9.\n>  Our main goals were to reduce redundancies with the rest of the\n>  PyTorch ecosystem, make it easier to maintain, and create a version of\n>  TorchAudio that is more tightly scoped to its strengths: processing audio\n>  data for ML. Please see\n>  [our community message](https://github.com/pytorch/audio/issues/3902)\n>  for more details.**\n\nThe aim of torchaudio is to apply [PyTorch](https://github.com/pytorch/pytorch) to\nthe audio domain. By supporting PyTorch, torchaudio follows the same philosophy\nof providing strong GPU acceleration, having a focus on trainable features through\nthe autograd system, and having consistent style (tensor names and dimension names).\nTherefore, it is primarily a machine learning library and not a general signal\nprocessing library. The benefits of PyTorch can be seen in torchaudio through\nhaving all the computations be through PyTorch operations which makes it easy\nto use and feel like a natural extension.\n\n- [Dataloaders for common audio datasets](http://pytorch.org/audio/main/datasets.html)\n- Audio and speech processing functions\n  - [forced_align](https://pytorch.org/audio/main/generated/torchaudio.functional.forced_align.html)\n- Common audio transforms\n  - [Spectrogram, AmplitudeToDB, MelScale, MelSpectrogram, MFCC, MuLawEncoding, MuLawDecoding, Resample](http://pytorch.org/audio/main/transforms.html)\n- Compliance interfaces: Run code using PyTorch that align with other libraries\n  - [Kaldi: spectrogram, fbank, mfcc](https://pytorch.org/audio/main/compliance.kaldi.html)\n\nInstallation\n------------\n\nPlease refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio.\n\n\nAPI Reference\n-------------\n\nAPI Reference is located here: http://pytorch.org/audio/main/\n\nContributing Guidelines\n-----------------------\n\nPlease refer to [CONTRIBUTING.md](./CONTRIBUTING.md)\n\nCitation\n--------\n\nIf you find this package useful, please cite as:\n\n```bibtex\n@article{yang2021torchaudio,\n  title={TorchAudio: Building Blocks for Audio and Speech Processing},\n  author={Yao-Yuan Yang and Moto Hira and Zhaoheng Ni and Anjali Chourdia and Artyom Astafurov and Caroline Chen and Ching-Feng Yeh and Christian Puhrsch and David Pollack and Dmitriy Genzel and Donny Greenberg and Edward Z. Yang and Jason Lian and Jay Mahadeokar and Jeff Hwang and Ji Chen and Peter Goldsborough and Prabhat Roy and Sean Narenthiran and Shinji Watanabe and Soumith Chintala and Vincent Quenneville-Bélair and Yangyang Shi},\n  journal={arXiv preprint arXiv:2110.15018},\n  year={2021}\n}\n```\n\n```bibtex\n@misc{hwang2023torchaudio,\n      title={TorchAudio 2.1: Advancing speech recognition, self-supervised learning, and audio processing components for PyTorch},\n      author={Jeff Hwang and Moto Hira and Caroline Chen and Xiaohui Zhang and Zhaoheng Ni and Guangzhi Sun and Pingchuan Ma and Ruizhe Huang and Vineel Pratap and Yuekai Zhang and Anurag Kumar and Chin-Yun Yu and Chuang Zhu and Chunxi Liu and Jacob Kahn and Mirco Ravanelli and Peng Sun and Shinji Watanabe and Yangyang Shi and Yumeng Tao and Robin Scheibler and Samuele Cornell and Sean Kim and Stavros Petridis},\n      year={2023},\n      eprint={2310.17864},\n      archivePrefix={arXiv},\n      primaryClass={eess.AS}\n}\n```\n\nDisclaimer on Datasets\n----------------------\n\nThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.\n\nIf you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!\n\nPre-trained Model License\n-------------------------\n\nThe pre-trained models provided in this library may have their own licenses or terms and conditions derived from the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.\n\nFor instance, SquimSubjective model is released under the Creative Commons Attribution Non Commercial 4.0 International (CC-BY-NC 4.0) license. See [the link](https://zenodo.org/record/4660670#.ZBtWPOxuerN) for additional details.\n\nOther pre-trained models that have different license are noted in documentation. Please checkout the [documentation page](https://pytorch.org/audio/main/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11DC:09ED:E54AC:3F5244:6AB92B2D"},"text_sha256":"4823067a06cef9e985009cbdfe8ddadaa23a71c36cfe8c4787656d644c493a8a"},{"path":"docs/source/compliance.kaldi.rst","size":467,"blob_sha":"2a54f6c61de1a3fc9afbfde01fbe071b9caccf47","priority":1,"status":200,"text":".. py:module:: torchaudio.compliance.kaldi\n\ntorchaudio.compliance.kaldi\n===========================\n\n.. currentmodule:: torchaudio.compliance.kaldi\n\nThe useful processing operations of kaldi_ can be performed with torchaudio.\nVarious functions with identical parameters are given so that torchaudio can\nproduce similar outputs.\n\n.. _kaldi: https://github.com/kaldi-asr/kaldi\n\n.. autosummary::\n   :toctree: generated\n   :nosignatures:\n\n   spectrogram\n   fbank\n   mfcc\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"405A:3B7E2:170FED:5D551B:6AB92B2C"},"text_sha256":"56df2e68ea0c2125ffb18ea7661621e70859869142e401e8e2681f35bd0d3def"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PythonOT/POT","input_row":{"repository":"PythonOT/POT","url":"https://github.com/PythonOT/POT","name":"POT","owner":"PythonOT","description":"POT : Python Optimal Transport","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2846,"issues":294,"created_at":"2016-10-20T14:42:14Z","updated_at":"2026-09-21T12:56:57Z","first_commit_at":"2016-10-20T14:42:14Z","last_commit_at":"2026-09-18T13:22:45Z","activity_months":118.92,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:50.104Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PythonOT/POT","visibility":"public","created_at":"2016-10-20T14:42:14Z","updated_at":"2026-09-21T12:56:57Z","private":false,"fork":false,"archived":false,"stargazers_count":2846,"open_issues_count":51,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2363","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0928:71C58:17B8605:1BDC9F9:6AB92B2E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2362","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0801:6C6ED:17F0DD2:1C1498B:6AB92B2E"},"commit":{"sha":"3f1482238925932bb6c9c606651427491a65365c","url":"https://github.com/PythonOT/POT/commit/3f1482238925932bb6c9c606651427491a65365c","date":"2018-05-14T15:03:36Z","author_date":"2018-05-14T15:03:36Z","committer_date":"2018-05-14T15:03:36Z","tree_sha":"ad0dbd0e72cae09415c78f0c5f973816595e46bf","message_first_line":"last change example"},"tree_request_status":200,"tree_rate":{"github_remaining":"2361","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:17F7A83:1C1B3BD:6AB92B2E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11302,"blob_sha":"466c09ca8a93c07e3db0174e59b36ab748781bc4","priority":0}],"documents":[{"path":"README.md","size":11302,"blob_sha":"466c09ca8a93c07e3db0174e59b36ab748781bc4","priority":0,"status":200,"text":"# POT: Python Optimal Transport\n\n[![PyPI version](https://badge.fury.io/py/POT.svg)](https://badge.fury.io/py/POT)\n[![Anaconda Cloud](https://anaconda.org/conda-forge/pot/badges/version.svg)](https://anaconda.org/conda-forge/pot)\n[![Build Status](https://travis-ci.org/rflamary/POT.svg?branch=master)](https://travis-ci.org/rflamary/POT)\n[![Documentation Status](https://readthedocs.org/projects/pot/badge/?version=latest)](http://pot.readthedocs.io/en/latest/?badge=latest)\n[![Anaconda downloads](https://anaconda.org/conda-forge/pot/badges/downloads.svg)](https://anaconda.org/conda-forge/pot)\n[![License](https://anaconda.org/conda-forge/pot/badges/license.svg)](https://github.com/rflamary/POT/blob/master/LICENSE)\n\n\n\nThis open source Python library provide several solvers for optimization problems related to Optimal Transport for signal, image processing and machine learning.\n\nIt provides the following solvers:\n\n* OT Network Flow solver for the linear program/ Earth Movers Distance [1].\n* Entropic regularization OT solver with Sinkhorn Knopp Algorithm [2] and stabilized version [9][10] with optional GPU implementation (requires cudamat).\n* Non regularized Wasserstein barycenters [16] with LP solver.\n* Bregman projections for Wasserstein barycenter [3] and unmixing [4].\n* Optimal transport for domain adaptation with group lasso regularization [5]\n* Conditional gradient [6] and Generalized conditional gradient for regularized OT [7].\n* Linear OT [14] and Joint OT matrix and mapping estimation [8].\n* Wasserstein Discriminant Analysis [11] (requires autograd + pymanopt).\n* Gromov-Wasserstein distances and barycenters ([13] and regularized [12])\n\nSome demonstrations (both in Python and Jupyter Notebook format) are available in the examples folder.\n\n## Installation\n\nThe library has been tested on Linux, MacOSX and Windows. It requires a C++ compiler for using the EMD solver and relies on the following Python modules:\n\n- Numpy (>=1.11)\n- Scipy (>=0.17)\n- Cython (>=0.23)\n- Matplotlib (>=1.5)\n\n#### Pip installation\n\nYou can install the toolbox through PyPI with:\n```\npip install POT\n```\nor get the very latest version by downloading it and then running:\n```\npython setup.py install --user # for user install (no root)\n```\n\n#### Anaconda installation with conda-forge\n\nIf you use the Anaconda python distribution, POT is available in [conda-forge](https://conda-forge.org). To install it and the required dependencies:\n```\nconda install -c conda-forge pot\n```\n\n#### Post installation check\nAfter a correct installation, you should be able to import the module without errors:\n```python\nimport ot\n```\nNote that for easier access the module is name ot instead of pot.\n\n\n### Dependencies\n\nSome sub-modules require additional dependences which are discussed below\n\n* **ot.dr** (Wasserstein dimensionality rediuction) depends on autograd and pymanopt that can be installed with:\n```\npip install pymanopt autograd\n```\n* **ot.gpu** (GPU accelerated OT) depends on cudamat that have to be installed with:\n```\ngit clone https://github.com/cudamat/cudamat.git\ncd cudamat\npython setup.py install --user # for user install (no root)\n```\n\nobviously you need CUDA installed and a compatible GPU.\n\n## Examples\n\n### Short examples\n\n* Import the toolbox\n```python\nimport ot\n```\n* Compute Wasserstein distances\n```python\n# a,b are 1D histograms (sum to 1 and positive)\n# M is the ground cost matrix\nWd=ot.emd2(a,b,M) # exact linear program\nWd_reg=ot.sinkhorn2(a,b,M,reg) # entropic regularized OT\n# if b is a matrix compute all distances to a and return a vector\n```\n* Compute OT matrix\n```python\n# a,b are 1D histograms (sum to 1 and positive)\n# M is the ground cost matrix\nT=ot.emd(a,b,M) # exact linear program\nT_reg=ot.sinkhorn(a,b,M,reg) # entropic regularized OT\n```\n* Compute Wasserstein barycenter\n```python\n# A is a n*d matrix containing d  1D histograms\n# M is the ground cost matrix\nba=ot.barycenter(A,M,reg) # reg is regularization parameter\n```\n\n\n\n\n### Examples and Notebooks\n\nThe examples folder contain several examples and use case for the library. The full documentation is available on [Readthedocs](http://pot.readthedocs.io/).\n\n\nHere is a list of the Python notebooks available [here](https://github.com/rflamary/POT/blob/master/notebooks/) if you want a quick look:\n\n* [1D optimal transport](https://github.com/rflamary/POT/blob/master/notebooks/plot_OT_1D.ipynb)\n* [OT Ground Loss](https://github.com/rflamary/POT/blob/master/notebooks/plot_OT_L1_vs_L2.ipynb)\n* [Multiple EMD computation](https://github.com/rflamary/POT/blob/master/notebooks/plot_compute_emd.ipynb)\n* [2D optimal transport on empirical distributions](https://github.com/rflamary/POT/blob/master/notebooks/plot_OT_2D_samples.ipynb)\n* [1D Wasserstein barycenter](https://github.com/rflamary/POT/blob/master/notebooks/plot_barycenter_1D.ipynb)\n* [OT with user provided regularization](https://github.com/rflamary/POT/blob/master/notebooks/plot_optim_OTreg.ipynb)\n* [Domain adaptation with optimal transport](https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_d2.ipynb)\n* [Color transfer in images](https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_color_images.ipynb)\n* [OT mapping estimation for domain adaptation](https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_mapping.ipynb)\n* [OT mapping estimation for color transfer in images](https://github.com/rflamary/POT/blob/master/notebooks/plot_otda_mapping_colors_images.ipynb)\n* [Wasserstein Discriminant Analysis](https://github.com/rflamary/POT/blob/master/notebooks/plot_WDA.ipynb)\n* [Gromov Wasserstein](https://github.com/rflamary/POT/blob/master/notebooks/plot_gromov.ipynb)\n* [Gromov Wasserstein Barycenter](https://github.com/rflamary/POT/blob/master/notebooks/plot_gromov_barycenter.ipynb)\n\n\n\nYou can also see the notebooks with [Jupyter nbviewer](https://nbviewer.jupyter.org/github/rflamary/POT/tree/master/notebooks/).\n\n## Acknowledgements\n\nThe contributors to this library are:\n\n* [Rémi Flamary](http://remi.flamary.com/)\n* [Nicolas Courty](http://people.irisa.fr/Nicolas.Courty/)\n* [Alexandre Gramfort](http://alexandre.gramfort.net/)\n* [Laetitia Chapel](http://people.irisa.fr/Laetitia.Chapel/)\n* [Michael Perrot](http://perso.univ-st-etienne.fr/pem82055/) (Mapping estimation)\n* [Léo Gautheron](https://github.com/aje) (GPU implementation)\n* [Nathalie Gayraud](https://www.linkedin.com/in/nathalie-t-h-gayraud/?ppe=1)\n* [Stanislas Chambon](https://slasnista.github.io/)\n* [Antoine Rolet](https://arolet.github.io/)\n* Erwan Vautier (Gromov-Wasserstein)\n\nThis toolbox benefit a lot from open source research and we would like to thank the following persons for providing some code (in various languages):\n\n* [Gabriel Peyré](http://gpeyre.github.io/) (Wasserstein Barycenters in Matlab)\n* [Nicolas Bonneel](http://liris.cnrs.fr/~nbonneel/) ( C++ code for EMD)\n* [Marco Cuturi](http://marcocuturi.net/) (Sinkhorn Knopp in Matlab/Cuda)\n\n## Using and citing the toolbox\n\nIf you use this toolbox in your research and find it useful, please cite POT using the following bibtex reference:\n```\n@article{flamary2017pot,\n  title={POT Python Optimal Transport library},\n  author={Flamary, R{\\'e}mi and Courty, Nicolas},\n  year={2017}\n}\n```\n## Contributions and code of conduct\n\nEvery contribution is welcome and should respect the [contribution guidelines](CONTRIBUTING.md). Each member of the project is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).\n\n## Support\n\nYou can ask questions and join the development discussion:\n\n* On the [POT Slack channel](https://pot-toolbox.slack.com)\n* On the POT [mailing list](https://mail.python.org/mm3/mailman3/lists/pot.python.org/)\n\n\nYou can also post bug reports and feature requests in Github issues. Make sure to read our [guidelines](CONTRIBUTING.md) first.\n\n## References\n\n[1] Bonneel, N., Van De Panne, M., Paris, S., & Heidrich, W. (2011, December). [Displacement interpolation using Lagrangian mass transport](https://people.csail.mit.edu/sparis/publi/2011/sigasia/Bonneel_11_Displacement_Interpolation.pdf). In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM.\n\n[2] Cuturi, M. (2013). [Sinkhorn distances: Lightspeed computation of optimal transport](https://arxiv.org/pdf/1306.0895.pdf). In Advances in Neural Information Processing Systems (pp. 2292-2300).\n\n[3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. (2015). [Iterative Bregman projections for regularized transportation problems](https://arxiv.org/pdf/1412.5154.pdf). SIAM Journal on Scientific Computing, 37(2), A1111-A1138.\n\n[4] S. Nakhostin, N. Courty, R. Flamary, D. Tuia, T. Corpetti, [Supervised planetary unmixing with optimal transport](https://hal.archives-ouvertes.fr/hal-01377236/document), Whorkshop on Hyperspectral Image and Signal Processing : Evolution in Remote Sensing (WHISPERS), 2016.\n\n[5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, [Optimal Transport for Domain Adaptation](https://arxiv.org/pdf/1507.00504.pdf), in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1\n\n[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). [Regularized discrete optimal transport](https://arxiv.org/pdf/1307.5551.pdf). SIAM Journal on Imaging Sciences, 7(3), 1853-1882.\n\n[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). [Generalized conditional gradient: analysis of convergence and applications](https://arxiv.org/pdf/1510.06567.pdf). arXiv preprint arXiv:1510.06567.\n\n[8] M. Perrot, N. Courty, R. Flamary, A. Habrard (2016), [Mapping estimation for discrete optimal transport](http://remi.flamary.com/biblio/perrot2016mapping.pdf), Neural Information Processing Systems (NIPS).\n\n[9] Schmitzer, B. (2016). [Stabilized Sparse Scaling Algorithms for Entropy Regularized Transport Problems](https://arxiv.org/pdf/1610.06519.pdf). arXiv preprint arXiv:1610.06519.\n\n[10] Chizat, L., Peyré, G., Schmitzer, B., & Vialard, F. X. (2016). [Scaling algorithms for unbalanced transport problems](https://arxiv.org/pdf/1607.05816.pdf). arXiv preprint arXiv:1607.05816.\n\n[11] Flamary, R., Cuturi, M., Courty, N., & Rakotomamonjy, A. (2016). [Wasserstein Discriminant Analysis](https://arxiv.org/pdf/1608.08063.pdf). arXiv preprint arXiv:1608.08063.\n\n[12] Gabriel Peyré, Marco Cuturi, and Justin Solomon (2016), [Gromov-Wasserstein averaging of kernel and distance matrices](http://proceedings.mlr.press/v48/peyre16.html)  International Conference on Machine Learning (ICML).\n\n[13] Mémoli, Facundo (2011). [Gromov–Wasserstein distances and the metric approach to object matching](https://media.adelaide.edu.au/acvt/Publications/2011/2011-Gromov%E2%80%93Wasserstein%20Distances%20and%20the%20Metric%20Approach%20to%20Object%20Matching.pdf). Foundations of computational mathematics 11.4 : 417-487.\n\n[14] Knott, M. and Smith, C. S. (1984).[On the optimal mapping of distributions](https://link.springer.com/article/10.1007/BF00934745), Journal of Optimization Theory and Applications Vol 43.\n\n[15] Peyré, G., & Cuturi, M. (2018). [Computational Optimal Transport](https://arxiv.org/pdf/1803.00567.pdf) .\n\n[16] Agueh, M., & Carlier, G. (2011). [Barycenters in the Wasserstein space](https://hal.archives-ouvertes.fr/hal-00637399/document). SIAM Journal on Mathematical Analysis, 43(2), 904-924.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:185071:5E94DB:6AB92B2D"},"text_sha256":"b58876535d96ff8572132c206000a8d167251892a1bf9120a3f27c41a35fdc28"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2360","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C9:71E0C:17F0FCC:1C13E84:6AB92B30"},"commit":{"sha":"f1e0c5cd43515a5cb12e29d4ffab3c1bd79b4549","url":"https://github.com/PythonOT/POT/commit/f1e0c5cd43515a5cb12e29d4ffab3c1bd79b4549","date":"2026-06-30T07:47:57Z","author_date":"2026-06-30T07:47:57Z","committer_date":"2026-06-30T07:47:57Z","tree_sha":"85fe42bd68c18cd3f9a1f8a4f7dbe5c69036efe2","message_first_line":"[MRG] Update wrapper for new geomloss version (#826)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2359","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FD:37D6E2:180E4CC:1C328B0:6AB92B30"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":39459,"blob_sha":"4ce4082abe00e7b032a5182e90895e3eb009026e","priority":0}],"documents":[{"path":"README.md","size":39459,"blob_sha":"4ce4082abe00e7b032a5182e90895e3eb009026e","priority":0,"status":200,"text":"# POT: Python Optimal Transport\n\n[![PyPI version](https://badge.fury.io/py/POT.svg)](https://badge.fury.io/py/POT)\n[![Anaconda Cloud](https://anaconda.org/conda-forge/pot/badges/version.svg)](https://anaconda.org/conda-forge/pot)\n[![Build Status](https://github.com/PythonOT/POT/actions/workflows/build_tests.yml/badge.svg)](https://github.com/PythonOT/POT/actions)\n[![Codecov Status](https://codecov.io/gh/PythonOT/POT/branch/master/graph/badge.svg)](https://codecov.io/gh/PythonOT/POT)\n[![Downloads](https://static.pepy.tech/badge/pot)](https://pepy.tech/project/pot)\n[![Anaconda downloads](https://anaconda.org/conda-forge/pot/badges/downloads.svg)](https://anaconda.org/conda-forge/pot)\n[![License](https://anaconda.org/conda-forge/pot/badges/license.svg)](https://github.com/PythonOT/POT/blob/master/LICENSE)\n\nThis open source Python library provides several solvers for optimization\nproblems related to Optimal Transport for signal, image processing and machine\nlearning.\n\nWebsite and documentation: <https://PythonOT.github.io/>\n\nSource Code (MIT):\n<https://github.com/PythonOT/POT>\n\nPOT has the following main features:\n\n* A large set of differentiable solvers for optimal transport problems, including:\n  * Exact linear OT, entropic and quadratic regularized OT,\n  * Gromov-Wasserstein (GW) distances, Fused GW distances and variants of\n    quadratic OT,\n  * Unbalanced and partial OT for different divergences,\n* OT barycenters (Wasserstein and GW) for fixed and free support,\n* Fast OT solvers in 1D, on the circle and between Gaussian Mixture Models (GMMs),\n* Many ML related solvers, such as domain adaptation, optimal transport mapping\n  estimation, subspace learning, Graph Neural Networks (GNNs) layers.\n* Several backends for easy use with Pytorch, Jax, Tensorflow, Numpy and Cupy arrays.\n\n### Implemented Features\n\nPOT provides the following generic OT solvers:\n\n* [OT Network Simplex solver](https://pythonot.github.io/auto_examples/plot_OT_1D.html) for the linear program/ Earth Movers Distance \\[1] .\n* [Conditional gradient](https://pythonot.github.io/auto_examples/plot_optim_OTreg.html) \\[6] and [Generalized conditional gradient](https://pythonot.github.io/auto_examples/plot_optim_OTreg.html) for regularized OT \\[7].\n* Entropic regularization OT solver with [Sinkhorn Knopp\n  Algorithm](https://pythonot.github.io/auto_examples/plot_OT_1D.html) \\[2] ,\n  stabilized version \\[9] \\[10] \\[34], lazy CPU/GPU solver from geomloss \\[60] \\[61], greedy Sinkhorn \\[22] and Screening\n  Sinkhorn \\[26].\n* Bregman projections for [Wasserstein barycenter](https://pythonot.github.io/auto_examples/barycenters/plot_barycenter_lp_vs_entropic.html) \\[3], [convolutional barycenter](https://pythonot.github.io/auto_examples/barycenters/plot_convolutional_barycenter.html) \\[21]  and unmixing \\[4].\n* Sinkhorn divergence \\[23] and entropic regularization OT from empirical data.\n* Debiased Sinkhorn barycenters [Sinkhorn divergence barycenter](https://pythonot.github.io/auto_examples/barycenters/plot_debiased_barycenter.html) \\[37]\n* Smooth optimal transport solvers (dual and semi-dual) for KL and squared L2 regularizations \\[17].\n* Weak OT solver between empirical distributions \\[39]\n* Non regularized [Wasserstein barycenters \\[16\\] ](https://pythonot.github.io/auto_examples/barycenters/plot_barycenter_lp_vs_entropic.html) with LP solver (only small scale).\n* [Gromov-Wasserstein distances](https://pythonot.github.io/auto_examples/gromov/plot_gromov.html) and [GW barycenters](https://pythonot.github.io/auto_examples/gromov/plot_gromov_barycenter.html)  (exact \\[13] and regularized \\[12,51]), differentiable using gradients from Graph Dictionary Learning \\[38]\n* [Fused-Gromov-Wasserstein distances solver](https://pythonot.github.io/auto_examples/gromov/plot_fgw.html#sphx-glr-auto-examples-plot-fgw-py) and [FGW barycenters](https://pythonot.github.io/auto_examples/gromov/plot_barycenter_fgw.html) (exact \\[24] and regularized \\[12,51]).\n* [Stochastic\n  solver](https://pythonot.github.io/auto_examples/others/plot_stochastic.html) and\n  [differentiable losses](https://pythonot.github.io/auto_examples/backends/plot_stoch_continuous_ot_pytorch.html) for\n  Large-scale Optimal Transport (semi-dual problem [18] and dual problem [19])\n* [Sampled solver of Gromov Wasserstein](https://pythonot.github.io/auto_examples/gromov/plot_gromov.html) for large-scale problem with any loss functions [33]\n* Non regularized [free support Wasserstein barycenters](https://pythonot.github.io/auto_examples/barycenters/plot_free_support_barycenter.html) [20].\n* [One dimensional Unbalanced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_1D.html) with KL relaxation [73] and [barycenter](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_barycenter_1D.html) [10, 25]. Also [exact unbalanced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_unbalanced_ot.html) with KL and quadratic regularization and the [regularization path of UOT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_regpath.html) [41]\n* [Partial Wasserstein and Gromov-Wasserstein](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html) and [Partial Fused Gromov-Wasserstein](https://pythonot.github.io/auto_examples/gromov/plot_partial_fgw.html) (exact [29] and entropic [3] formulations).\n* [Sliced Wasserstein](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_variance.html) [31, 32] and Max-sliced Wasserstein [35] that can be used for gradient flows [36].\n* [Sliced Unbalanced OT and Unbalanced Sliced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT.html) [82]\n* [Wasserstein distance on the\n  circle](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_compute_wasserstein_circle.html)\n  \\[44, 45] and  [Spherical Sliced Wasserstein](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_variance_ssw.html) \\[46]\n* [Graph Dictionary Learning solvers](https://pythonot.github.io/auto_examples/gromov/plot_gromov_wasserstein_dictionary_learning.html) \\[38].\n* [Semi-relaxed (Fused) Gromov-Wasserstein divergences](https://pythonot.github.io/auto_examples/gromov/plot_semirelaxed_fgw.html) with corresponding [barycenter solvers](https://pythonot.github.io/auto_examples/gromov/plot_semirelaxed_gromov_wasserstein_barycenter.hmtl) (exact and regularized \\[48]).\n* [Quantized (Fused) Gromov-Wasserstein distances](https://pythonot.github.io/auto_examples/gromov/plot_quantized_gromov_wasserstein.html) \\[68].\n* [Efficient Discrete Multi Marginal Optimal Transport Regularization](https://pythonot.github.io/auto_examples/others/plot_demd_gradient_minimize.html) \\[50].\n* [Several backends](https://pythonot.github.io/quickstart.html#solving-ot-with-multiple-backends) for easy use of POT with  [Pytorch](https://pytorch.org/)/[jax](https://github.com/google/jax)/[Numpy](https://numpy.org/)/[Cupy](https://cupy.dev/)/[Tensorflow](https://www.tensorflow.org/) arrays.\n* [Smooth Strongly Convex Nearest Brenier Potentials](https://pythonot.github.io/auto_examples/others/plot_SSNB.html#sphx-glr-auto-examples-others-plot-ssnb-py) [58], with an extension to bounding potentials using [59].\n* [Gaussian Mixture Model OT](https://pythonot.github.io/auto_examples/gaussian_gmm/plot_GMMOT_plan.html#sphx-glr-auto-examples-others-plot-gmmot-plan-py) [69].\n* [Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_COOT.html) [49] and\n[unbalanced Co-Optimal Transport](https://pythonot.github.io/auto_examples/others/plot_learning_weights_with_COOT.html) [71].\n* Fused unbalanced Gromov-Wasserstein [70].\n* [Optimal Transport Barycenters for Generic Costs](https://pythonot.github.io/auto_examples/barycenters/plot_free_support_barycenter_generic_cost.html) [77]\n* [Barycenters between Gaussian Mixture Models](https://pythonot.github.io/auto_examples/barycenters/plot_gmm_barycenter.html) [69, 77]\n* [Fast and accurate transport bijections using BSP-OT](https://pythonot.github.io/auto_examples/plot_bsp_ot.html) [84]\n* [Sliced Transport Plans](https://pythonot.github.io/auto_examples/sliced-wasserstein/plot_sliced_plans.html) [85, 86, 87]\n\nPOT provides the following Machine Learning related solvers:\n\n* [Optimal transport for domain\n  adaptation](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_classes.html)\n  with [group lasso regularization](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_classes.html),   [Laplacian regularization](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_laplacian.html) \\[5] \\[30] and [semi\n  supervised setting](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_semi_supervised.html).\n* [Linear OT mapping](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_linear_mapping.html) \\[14] and [Joint OT mapping estimation](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_mapping.html) \\[8].\n* [Wasserstein Discriminant Analysis](https://pythonot.github.io/auto_examples/others/plot_WDA.html) \\[11] (requires autograd + pymanopt).\n* [JCPOT algorithm for multi-source domain adaptation with target shift](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_jcpot.html) \\[27].\n* [Graph Neural Network OT layers TFGW](https://pythonot.github.io/auto_examples/gromov/plot_gnn_TFGW.html) \\[52] and TW (OT-GNN) \\[53]\n\nSome other examples are available in the  [documentation](https://pythonot.github.io/auto_examples/index.html).\n\n#### Using and citing the toolbox\n\nIf you use this toolbox in your research and find it useful, please cite POT\nusing the following references from the current version and from our [JMLR\npaper](https://jmlr.org/papers/v22/20-451.html):\n\n```\nFlamary R., Vincent-Cuaz C., Courty N., Gramfort A., Kachaiev O., Quang Tran H., David L., Bonet C., Cassereau N., Gnassounou T., Tanguy E., Delon J., Collas A., Mazelet S., Chapel L., Kerdoncuff T., Yu X., Feickert M., Krzakala P., Liu T., Fernandes Montesuma E. POT Python Optimal Transport (version 0.9.5). URL: https://github.com/PythonOT/POT\n\nRémi Flamary, Nicolas Courty, Alexandre Gramfort, Mokhtar Z. Alaya, Aurélie Boisbunon, Stanislas Chambon, Laetitia Chapel, Adrien Corenflos, Kilian Fatras, Nemo Fournier, Léo Gautheron, Nathalie T.H. Gayraud, Hicham Janati, Alain Rakotomamonjy, Ievgen Redko, Antoine Rolet, Antony Schutz, Vivien Seguy, Danica J. Sutherland, Romain Tavenard, Alexander Tong, Titouan Vayer, POT Python Optimal Transport library, Journal of Machine Learning Research, 22(78):1−8, 2021. URL: https://pythonot.github.io/\n```\n\nIn Bibtex format:\n\n```bibtex\n@misc{flamary2024pot,\n  author = {Flamary, R{\\'e}mi and Vincent-Cuaz, C{\\'e}dric and Courty, Nicolas and Gramfort, Alexandre and Kachaiev, Oleksii and Quang Tran, Huy and David, Laurène and Bonet, Cl{\\'e}ment and Cassereau, Nathan and Gnassounou, Th{\\'e}o and Tanguy, Eloi and Delon, Julie and Collas, Antoine and Mazelet, Sonia and Chapel, Laetitia and Kerdoncuff, Tanguy and Yu, Xizheng and Feickert, Matthew and Krzakala, Paul and Liu, Tianlin and Fernandes Montesuma, Eduardo},\n  title = {POT Python Optimal Transport (version 0.9.5)},\n  url = {https://github.com/PythonOT/POT},\n  year = {2024}\n}\n\n@article{flamary2021pot,\n  author  = {R{\\'e}mi Flamary and Nicolas Courty and Alexandre Gramfort and Mokhtar Z. Alaya and Aur{\\'e}lie Boisbunon and Stanislas Chambon and Laetitia Chapel and Adrien Corenflos and Kilian Fatras and Nemo Fournier and L{\\'e}o Gautheron and Nathalie T.H. Gayraud and Hicham Janati and Alain Rakotomamonjy and Ievgen Redko and Antoine Rolet and Antony Schutz and Vivien Seguy and Danica J. Sutherland and Romain Tavenard and Alexander Tong and Titouan Vayer},\n  title   = {POT: Python Optimal Transport},\n  journal = {Journal of Machine Learning Research},\n  year    = {2021},\n  volume  = {22},\n  number  = {78},\n  pages   = {1-8},\n  url     = {http://jmlr.org/papers/v22/20-451.html}\n}\n```\n\n## Installation\n\nThe library has been tested on Linux, MacOSX and Windows. It requires a C++ compiler for building/installing the EMD solver and relies on the following Python modules:\n\n* Numpy (>=1.16)\n* Scipy (>=1.0)\n* Cython (>=0.23) (build only, not necessary when installing from pip or conda)\n\n#### Pip installation\n\nYou can install the toolbox through PyPI with:\n\n```console\npip install POT\n```\n\nor get the very latest version by running:\n\n```console\npip install -U git+https://github.com/PythonOT/POT.git # with --user for user install (no root)\n```\n\nOptional dependencies may be installed with\n\n```console\npip install POT[all]\n```\n\nNote that this installs `cvxopt`, which is licensed under GPL 3.0. Alternatively, if you cannot use GPL-licensed software, the specific optional dependencies may be installed individually, or per-submodule. The available optional installations are `backend-jax, backend-tf, backend-torch, cvxopt, dr, gnn, all`.\n\n#### Anaconda installation with conda-forge\n\nIf you use the Anaconda python distribution, POT is available in [conda-forge](https://conda-forge.org). To install it and the required dependencies:\n\n```console\nconda install -c conda-forge pot\n```\n\n#### Post installation check\n\nAfter a correct installation, you should be able to import the module without errors:\n\n```python\nimport ot\n```\n\nNote that for easier access the module is named `ot` instead of `pot`.\n\n### Dependencies\n\nSome sub-modules require additional dependencies which are discussed below\n\n* **ot.dr** (Wasserstein dimensionality reduction) depends on autograd and pymanopt that can be installed with:\n\n```shell\npip install pymanopt autograd\n```\n\n## Examples\n\n### Short examples\n\n* Import the toolbox\n\n```python\nimport ot\n```\n\n* Compute Wasserstein distances\n\n```python\n# a,b are 1D histograms (sum to 1 and positive)\n# M is the ground cost matrix\n\n# With the unified  API :\nWd = ot.solve(M, a, b).value # exact linear program\nWd_reg = ot.solve(M, a, b, reg=reg).value # entropic regularized OT\n\n# With the old API :\nWd = ot.emd2(a, b, M) # exact linear program\nWd_reg = ot.sinkhorn2(a, b, M, reg) # entropic regularized OT\n# if b is a matrix compute all distances to a and return a vector\n```\n\n* Compute OT matrix\n\n```python\n# a,b are 1D histograms (sum to 1 and positive)\n# M is the ground cost matrix\n\n# With the unified API :\nT = ot.solve(M, a, b).plan # exact linear program\nT_reg = ot.solve(M, a, b, reg=reg).plan # entropic regularized OT\n\n# With the old API :\nT = ot.emd(a, b, M) # exact linear program\nT_reg = ot.sinkhorn(a, b, M, reg) # entropic regularized OT\n```\n\n* Compute OT on empirical distributions\n\n```python\n# X and Y are two 2D arrays of shape (n_samples, n_features)\n\n# with squared euclidean metric\nT = ot.solve_sample(X, Y).plan # exact linear program\nT_reg = ot.solve_sample(X, Y, reg=reg).plan # entropic regularized OT\n\nWass_2 = ot.solve_sample(X, Y).value # Squared Wasserstein_2\nWass_1 = ot.solve_sample(X, Y, metric='euclidean').value # Wasserstein 1\n```\n\n* Compute Wasserstein barycenter\n\n```python\n# A is a n*d matrix containing d  1D histograms\n# M is the ground cost matrix\nba = ot.barycenter(A, M, reg) # reg is regularization parameter\n```\n\n### Examples and Notebooks\n\nThe examples folder contain several examples and use case for the library. The full documentation with examples and output is available on <https://PythonOT.github.io/>.\n\n## Acknowledgements\n\nThis toolbox has been created by [Rémi Flamary](https://remi.flamary.com/) and [Nicolas Courty](http://people.irisa.fr/Nicolas.Courty/).\n\nIt is currently maintained by :\n\n* [Rémi Flamary](https://remi.flamary.com/)\n* [Cédric Vincent-Cuaz](https://cedricvincentcuaz.github.io/)\n\nThe POT contributors to this library are listed [here](CONTRIBUTORS.md).\n\n<a href=\"https://github.com/PythonOT/POT/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=PythonOT/POT\" />\n<\/a>\n\nPOT has benefited from the financing or manpower from the following partners:\n\n<img src=\"https://pythonot.github.io/master/_static/images/logo_anr.jpg\" alt=\"ANR\" style=\"height:60px;\"/><img src=\"https://pythonot.github.io/master/_static/images/logo_cnrs.jpg\" alt=\"CNRS\" style=\"height:60px;\"/><img src=\"https://pythonot.github.io/master/_static/images/logo_3ia.jpg\" alt=\"3IA\" style=\"height:60px;\"/><img src=\"https://pythonot.github.io/master/_static/images/logo_hiparis.png\" alt=\"Hi!PARIS\" style=\"height:60px;\"/>\n\n## Contributions and code of conduct\n\nEvery contribution is welcome and should respect the [contribution guidelines](https://pythonot.github.io/master/contributing.html). Each member of the project is expected to follow the [code of conduct](https://pythonot.github.io/master/code_of_conduct.html).\n\n## Support\n\nYou can ask questions and join the development discussion:\n\n* On the POT [slack channel](https://pot-toolbox.slack.com)\n* On the POT [gitter channel](https://gitter.im/PythonOT/community)\n* On the POT [mailing list](https://mail.python.org/mm3/mailman3/lists/pot.python.org/)\n\nYou can also post bug reports and feature requests in Github issues. Make sure to read our [guidelines](.github/CONTRIBUTING.md) first.\n\n## References\n\n\\[1] Bonneel, N., Van De Panne, M., Paris, S., & Heidrich, W. (2011, December). [Displacement interpolation using Lagrangian mass transport](https://people.csail.mit.edu/sparis/publi/2011/sigasia/Bonneel_11_Displacement_Interpolation.pdf). In ACM Transactions on Graphics (TOG) (Vol. 30, No. 6, p. 158). ACM.\n\n\\[2] Cuturi, M. (2013). [Sinkhorn distances: Lightspeed computation of optimal transport](https://arxiv.org/pdf/1306.0895.pdf). In Advances in Neural Information Processing Systems (pp. 2292-2300).\n\n\\[3] Benamou, J. D., Carlier, G., Cuturi, M., Nenna, L., & Peyré, G. (2015). [Iterative Bregman projections for regularized transportation problems](https://arxiv.org/pdf/1412.5154.pdf). SIAM Journal on Scientific Computing, 37(2), A1111-A1138.\n\n\\[4] S. Nakhostin, N. Courty, R. Flamary, D. Tuia, T. Corpetti, [Supervised planetary unmixing with optimal transport](https://hal.archives-ouvertes.fr/hal-01377236/document), Workshop on Hyperspectral Image and Signal Processing : Evolution in Remote Sensing (WHISPERS), 2016.\n\n\\[5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, [Optimal Transport for Domain Adaptation](https://arxiv.org/pdf/1507.00504.pdf), in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1\n\n\\[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). [Regularized discrete optimal transport](https://arxiv.org/pdf/1307.5551.pdf). SIAM Journal on Imaging Sciences, 7(3), 1853-1882.\n\n\\[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). [Generalized conditional gradient: analysis of convergence and applications](https://arxiv.org/pdf/1510.06567.pdf). arXiv preprint arXiv:1510.06567.\n\n\\[8] M. Perrot, N. Courty, R. Flamary, A. Habrard (2016), [Mapping estimation for discrete optimal transport](http://remi.flamary.com/biblio/perrot2016mapping.pdf), Neural Information Processing Systems (NIPS).\n\n\\[9] Schmitzer, B. (2016). [Stabilized Sparse Scaling Algorithms for Entropy Regularized Transport Problems](https://arxiv.org/pdf/1610.06519.pdf). arXiv preprint arXiv:1610.06519.\n\n\\[10] Chizat, L., Peyré, G., Schmitzer, B., & Vialard, F. X. (2016). [Scaling algorithms for unbalanced transport problems](https://arxiv.org/pdf/1607.05816.pdf). arXiv preprint arXiv:1607.05816.\n\n\\[11] Flamary, R., Cuturi, M., Courty, N., & Rakotomamonjy, A. (2016). [Wasserstein Discriminant Analysis](https://arxiv.org/pdf/1608.08063.pdf). arXiv preprint arXiv:1608.08063.\n\n\\[12] Gabriel Peyré, Marco Cuturi, and Justin Solomon (2016), [Gromov-Wasserstein averaging of kernel and distance matrices](http://proceedings.mlr.press/v48/peyre16.html)  International Conference on Machine Learning (ICML).\n\n\\[13] Mémoli, Facundo (2011). [Gromov–Wasserstein distances and the metric approach to object matching](https://media.adelaide.edu.au/acvt/Publications/2011/2011-Gromov%E2%80%93Wasserstein%20Distances%20and%20the%20Metric%20Approach%20to%20Object%20Matching.pdf). Foundations of computational mathematics 11.4 : 417-487.\n\n\\[14] Knott, M. and Smith, C. S. (1984).[On the optimal mapping of distributions](https://link.springer.com/article/10.1007/BF00934745), Journal of Optimization Theory and Applications Vol 43.\n\n\\[15] Peyré, G., & Cuturi, M. (2018). [Computational Optimal Transport](https://arxiv.org/pdf/1803.00567.pdf) .\n\n\\[16] Agueh, M., & Carlier, G. (2011). [Barycenters in the Wasserstein space](https://hal.archives-ouvertes.fr/hal-00637399/document). SIAM Journal on Mathematical Analysis, 43(2), 904-924.\n\n\\[17] Blondel, M., Seguy, V., & Rolet, A. (2018). [Smooth and Sparse Optimal Transport](https://arxiv.org/abs/1710.06276). Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics (AISTATS).\n\n\\[18] Genevay, A., Cuturi, M., Peyré, G. & Bach, F. (2016) [Stochastic Optimization for Large-scale Optimal Transport](https://arxiv.org/abs/1605.08527). Advances in Neural Information Processing Systems (2016).\n\n\\[19] Seguy, V., Bhushan Damodaran, B., Flamary, R., Courty, N., Rolet, A.& Blondel, M. [Large-scale Optimal Transport and Mapping Estimation](https://arxiv.org/pdf/1711.02283.pdf). International Conference on Learning Representation (2018)\n\n\\[20] Cuturi, M. and Doucet, A. (2014) [Fast Computation of Wasserstein Barycenters](http://proceedings.mlr.press/v32/cuturi14.html). International Conference in Machine Learning\n\n\\[21] Solomon, J., De Goes, F., Peyré, G., Cuturi, M., Butscher, A., Nguyen, A. & Guibas, L. (2015). [Convolutional wasserstein distances: Efficient optimal transportation on geometric domains](https://dl.acm.org/citation.cfm?id=2766963). ACM Transactions on Graphics (TOG), 34(4), 66.\n\n\\[22] J. Altschuler, J.Weed, P. Rigollet, (2017) [Near-linear time approximation algorithms for optimal transport via Sinkhorn iteration](https://papers.nips.cc/paper/6792-near-linear-time-approximation-algorithms-for-optimal-transport-via-sinkhorn-iteration.pdf), Advances in Neural Information Processing Systems (NIPS) 31\n\n\\[23] Aude, G., Peyré, G., Cuturi, M., [Learning Generative Models with Sinkhorn Divergences](https://arxiv.org/abs/1706.00292), Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics, (AISTATS) 21, 2018\n\n\\[24] Vayer, T., Chapel, L., Flamary, R., Tavenard, R. and Courty, N. (2019). [Optimal Transport for structured data with application on graphs](http://proceedings.mlr.press/v97/titouan19a.html) Proceedings of the 36th International Conference on Machine Learning (ICML).\n\n\\[25] Frogner C., Zhang C., Mobahi H., Araya-Polo M., Poggio T. (2015). [Learning with a Wasserstein Loss](http://cbcl.mit.edu/wasserstein/)  Advances in Neural Information Processing Systems (NIPS).\n\n\\[26] Alaya M. Z., Bérar M., Gasso G., Rakotomamonjy A. (2019). [Screening Sinkhorn Algorithm for Regularized Optimal Transport](https://papers.nips.cc/paper/9386-screening-sinkhorn-algorithm-for-regularized-optimal-transport), Advances in Neural Information Processing Systems 33 (NeurIPS).\n\n\\[27] Redko I., Courty N., Flamary R., Tuia D. (2019). [Optimal Transport for Multi-source Domain Adaptation under Target Shift](http://proceedings.mlr.press/v89/redko19a.html), Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics (AISTATS) 22, 2019.\n\n\\[28] Caffarelli, L. A., McCann, R. J. (2010). [Free boundaries in optimal transport and Monge-Ampere obstacle problems](http://www.math.toronto.edu/~mccann/papers/annals2010.pdf), Annals of mathematics, 673-730.\n\n\\[29] Chapel, L., Alaya, M., Gasso, G. (2020). [Partial Optimal Transport with Applications on Positive-Unlabeled Learning](https://arxiv.org/abs/2002.08276), Advances in Neural Information Processing Systems (NeurIPS), 2020.\n\n\\[30] Flamary R., Courty N., Tuia D., Rakotomamonjy A. (2014). [Optimal transport with Laplacian regularization: Applications to domain adaptation and shape matching](https://remi.flamary.com/biblio/flamary2014optlaplace.pdf), NIPS Workshop on Optimal Transport and Machine Learning OTML, 2014.\n\n\\[31] Bonneel, Nicolas, et al. [Sliced and radon wasserstein barycenters of measures](https://perso.liris.cnrs.fr/nicolas.bonneel/WassersteinSliced-JMIV.pdf), Journal of Mathematical Imaging and Vision 51.1 (2015): 22-45\n\n\\[32] Huang, M., Ma S., Lai, L. (2021). [A Riemannian Block Coordinate Descent Method for Computing the Projection Robust Wasserstein Distance](http://proceedings.mlr.press/v139/huang21e.html), Proceedings of the 38th International Conference on Machine Learning (ICML).\n\n\\[33] Kerdoncuff T., Emonet R., Marc S. [Sampled Gromov Wasserstein](https://hal.archives-ouvertes.fr/hal-03232509/document), Machine Learning Journal (MJL), 2021\n\n\\[34] Feydy, J., Séjourné, T., Vialard, F. X., Amari, S. I., Trouvé, A., & Peyré, G. (2019, April). [Interpolating between optimal transport and MMD using Sinkhorn divergences](http://proceedings.mlr.press/v89/feydy19a/feydy19a.pdf). In The 22nd International Conference on Artificial Intelligence and Statistics (pp. 2681-2690). PMLR.\n\n\\[35] Deshpande, I., Hu, Y. T., Sun, R., Pyrros, A., Siddiqui, N., Koyejo, S., ... & Schwing, A. G. (2019). [Max-sliced wasserstein distance and its use for gans](https://openaccess.thecvf.com/content_CVPR_2019/papers/Deshpande_Max-Sliced_Wasserstein_Distance_and_Its_Use_for_GANs_CVPR_2019_paper.pdf). In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 10648-10656).\n\n\\[36] Liutkus, A., Simsekli, U., Majewski, S., Durmus, A., & Stöter, F. R.\n(2019, May). [Sliced-Wasserstein flows: Nonparametric generative modeling\nvia optimal transport and diffusions](http://proceedings.mlr.press/v97/liutkus19a/liutkus19a.pdf). In International Conference on\nMachine Learning (pp. 4104-4113). PMLR.\n\n\\[37] Janati, H., Cuturi, M., Gramfort, A. [Debiased sinkhorn barycenters](http://proceedings.mlr.press/v119/janati20a/janati20a.pdf) Proceedings of the 37th International\nConference on Machine Learning, PMLR 119:4692-4701, 2020\n\n\\[38] C. Vincent-Cuaz, T. Vayer, R. Flamary, M. Corneli, N. Courty, [Online Graph\nDictionary Learning](https://arxiv.org/pdf/2102.06555.pdf), International Conference on Machine Learning (ICML), 2021.\n\n\\[39] Gozlan, N., Roberto, C., Samson, P. M., & Tetali, P. (2017). [Kantorovich duality for general transport costs and applications](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.712.1825\\&rep=rep1\\&type=pdf). Journal of Functional Analysis, 273(11), 3327-3405.\n\n\\[40] Forrow, A., Hütter, J. C., Nitzan, M., Rigollet, P., Schiebinger, G., & Weed, J. (2019, April). [Statistical optimal transport via factored couplings](http://proceedings.mlr.press/v89/forrow19a/forrow19a.pdf). In The 22nd International Conference on Artificial Intelligence and Statistics (pp. 2454-2465). PMLR.\n\n\\[41] Chapel\\*, L., Flamary\\*, R., Wu, H., Févotte, C., Gasso, G. (2021). [Unbalanced Optimal Transport through Non-negative Penalized Linear Regression](https://proceedings.neurips.cc/paper/2021/file/c3c617a9b80b3ae1ebd868b0017cc349-Paper.pdf) Advances in Neural Information Processing Systems (NeurIPS), 2020. (Two first co-authors)\n\n\\[42] Delon, J., Gozlan, N., and Saint-Dizier, A. [Generalized Wasserstein barycenters between probability measures living on different subspaces](https://arxiv.org/pdf/2105.09755). arXiv preprint arXiv:2105.09755, 2021.\n\n\\[43]  Álvarez-Esteban, Pedro C., et al. [A fixed-point approach to barycenters in Wasserstein space.](https://arxiv.org/pdf/1511.05355.pdf) Journal of Mathematical Analysis and Applications 441.2 (2016): 744-762.\n\n\\[44] Delon, Julie, Julien Salomon, and Andrei Sobolevski. [Fast transport optimization for Monge costs on the circle.](https://arxiv.org/abs/0902.3527) SIAM Journal on Applied Mathematics 70.7 (2010): 2239-2258.\n\n\\[45] Hundrieser, Shayan, Marcel Klatt, and Axel Munk. [The statistics of circular optimal transport.](https://arxiv.org/abs/2103.15426) Directional Statistics for Innovative Applications: A Bicentennial Tribute to Florence Nightingale. Singapore: Springer Nature Singapore, 2022. 57-82.\n\n\\[46] Bonet, C., Berg, P., Courty, N., Septier, F., Drumetz, L., & Pham, M. T. (2023). [Spherical Sliced-Wasserstein](https://openreview.net/forum?id=jXQ0ipgMdU). International Conference on Learning Representations.\n\n\\[47] Chowdhury, S., & Mémoli, F. (2019). [The gromov–wasserstein distance between networks and stable network invariants](https://academic.oup.com/imaiai/article/8/4/757/5627736). Information and Inference: A Journal of the IMA, 8(4), 757-787.\n\n\\[48] Cédric Vincent-Cuaz, Rémi Flamary, Marco Corneli, Titouan Vayer, Nicolas Courty (2022). [Semi-relaxed Gromov-Wasserstein divergence and applications on graphs](https://openreview.net/pdf?id=RShaMexjc-x). International Conference on Learning Representations (ICLR), 2022.\n\n\\[49] Redko, I., Vayer, T., Flamary, R., and Courty, N. (2020). [CO-Optimal Transport](https://proceedings.neurips.cc/paper/2020/file/cc384c68ad503482fb24e6d1e3b512ae-Paper.pdf). Advances in Neural Information Processing Systems, 33.\n\n\\[50] Liu, T., Puigcerver, J., & Blondel, M. (2023). [Sparsity-constrained optimal transport](https://openreview.net/forum?id=yHY9NbQJ5BP). Proceedings of the Eleventh International Conference on Learning Representations (ICLR).\n\n\\[51] Xu, H., Luo, D., Zha, H., & Carin, L. (2019). [Gromov-wasserstein learning for graph matching and node embedding](http://proceedings.mlr.press/v97/xu19b.html). In International Conference on Machine Learning (ICML), 2019.\n\n\\[52] Collas, A., Vayer, T., Flamary, F., & Breloy, A. (2023). [Entropic Wasserstein Component Analysis](https://arxiv.org/abs/2303.05119). ArXiv.\n\n\\[53] C. Vincent-Cuaz, R. Flamary, M. Corneli, T. Vayer, N. Courty (2022). [Template based graph neural network with optimal transport distances](https://papers.nips.cc/paper_files/paper/2022/file/4d3525bc60ba1adc72336c0392d3d902-Paper-Conference.pdf). Advances in Neural Information Processing Systems, 35.\n\n\\[54] Bécigneul, G., Ganea, O. E., Chen, B., Barzilay, R., & Jaakkola, T. S. (2020). [Optimal transport graph neural networks](https://arxiv.org/pdf/2006.04804).\n\n\\[55] Ronak Mehta, Jeffery Kline, Vishnu Suresh Lokhande, Glenn Fung, & Vikas Singh (2023). [Efficient Discrete Multi Marginal Optimal Transport Regularization](https://openreview.net/forum?id=R98ZfMt-jE). In The Eleventh International Conference on Learning Representations (ICLR).\n\n\\[56] Jeffery Kline. [Properties of the d-dimensional earth mover’s problem](https://www.sciencedirect.com/science/article/pii/S0166218X19301441). Discrete Applied Mathematics, 265: 128–141, 2019.\n\n\\[57] Delon, J., Desolneux, A., & Salmona, A. (2022). [Gromov–Wasserstein\ndistances between Gaussian distributions](https://hal.science/hal-03197398v2/file/main.pdf). Journal of Applied Probability, 59(4),\n1178-1198.\n\n\\[58] Paty F-P., d’Aspremont 1., & Cuturi M. (2020). [Regularity as regularization:Smooth and strongly convex brenier potentials in optimal transport.](http://proceedings.mlr.press/v108/paty20a/paty20a.pdf) In International Conference on Artificial Intelligence and Statistics, pages 1222–1232. PMLR, 2020.\n\n\\[59] Taylor A. B. (2017). [Convex interpolation and performance estimation of first-order methods for convex optimization.](https://dial.uclouvain.be/pr/boreal/object/boreal%3A182881/datastream/PDF_01/view) PhD thesis, Catholic University of Louvain, Louvain-la-Neuve, Belgium, 2017.\n\n\\[60] Feydy, J., Roussillon, P., Trouvé, A., & Gori, P. (2019). [Fast and scalable optimal transport for brain tractograms](https://arxiv.org/pdf/2107.02010.pdf). In Medical Image Computing and Computer Assisted Intervention–MICCAI 2019: 22nd International Conference, Shenzhen, China, October 13–17, 2019, Proceedings, Part III 22 (pp. 636-644). Springer International Publishing.\n\n\\[61] Charlier, B., Feydy, J., Glaunes, J. A., Collin, F. D., & Durif, G. (2021). [Kernel operations on the gpu, with autodiff, without memory overflows](https://www.jmlr.org/papers/volume22/20-275/20-275.pdf). The Journal of Machine Learning Research, 22(1), 3457-3462.\n\n\\[62] H. Van Assel, C. Vincent-Cuaz, T. Vayer, R. Flamary, N. Courty (2023). [Interpolating between Clustering and Dimensionality Reduction with Gromov-Wasserstein](https://arxiv.org/pdf/2310.03398.pdf). NeurIPS 2023 Workshop Optimal Transport and Machine Learning.\n\n\\[63] Li, J., Tang, J., Kong, L., Liu, H., Li, J., So, A. M. C., & Blanchet, J. (2022). [A Convergent Single-Loop Algorithm for Relaxation of Gromov-Wasserstein in Graph Data](https://openreview.net/pdf?id=0jxPyVWmiiF). In The Eleventh International Conference on Learning Representations.\n\n\\[64] Ma, X., Chu, X., Wang, Y., Lin, Y., Zhao, J., Ma, L., & Zhu, W. (2023). [Fused Gromov-Wasserstein Graph Mixup for Graph-level Classifications](https://openreview.net/pdf?id=uqkUguNu40). In Thirty-seventh Conference on Neural Information Processing Systems.\n\n\\[65] Scetbon, M., Cuturi, M., & Peyré, G. (2021). [Low-Rank Sinkhorn Factorization](https://arxiv.org/pdf/2103.04737.pdf).\n\n\\[66] Pooladian, Aram-Alexandre, and Jonathan Niles-Weed. [Entropic estimation of optimal transport maps](https://arxiv.org/pdf/2109.12004.pdf). arXiv preprint arXiv:2109.12004 (2021).\n\n\\[67] Scetbon, M., Peyré, G. & Cuturi, M. (2022). [Linear-Time Gromov-Wasserstein Distances using Low Rank Couplings and Costs](https://proceedings.mlr.press/v162/scetbon22b/scetbon22b.pdf). In International Conference on Machine Learning (ICML), 2022.\n\n\\[68] Chowdhury, S., Miller, D., & Needham, T. (2021). [Quantized gromov-wasserstein](https://link.springer.com/chapter/10.1007/978-3-030-86523-8_49). ECML PKDD 2021. Springer International Publishing.\n\n\\[69] Delon, J., & Desolneux, A. (2020). [A Wasserstein-type distance in the space of Gaussian mixture models](https://epubs.siam.org/doi/abs/10.1137/19M1301047). SIAM Journal on Imaging Sciences, 13(2), 936-970.\n\n\\[70] A. Thual, H. Tran, T. Zemskova, N. Courty, R. Flamary, S. Dehaene\n& B. Thirion (2022). [Aligning individual brains with Fused Unbalanced Gromov-Wasserstein.](https://proceedings.neurips.cc/paper_files/paper/2022/file/8906cac4ca58dcaf17e97a0486ad57ca-Paper-Conference.pdf). Neural Information Processing Systems (NeurIPS).\n\n\\[71] H. Tran, H. Janati, N. Courty, R. Flamary, I. Redko, P. Demetci & R. Singh (2023). [Unbalanced Co-Optimal Transport](https://dl.acm.org/doi/10.1609/aaai.v37i8.26193). AAAI Conference on\nArtificial Intelligence.\n\n\\[72] Thibault Séjourné, François-Xavier Vialard, and Gabriel Peyré (2021). [The Unbalanced Gromov Wasserstein Distance: Conic Formulation and Relaxation](https://proceedings.neurips.cc/paper/2021/file/4990974d150d0de5e6e15a1454fe6b0f-Paper.pdf). Neural Information Processing Systems (NeurIPS).\n\n\\[73] Séjourné, T., Vialard, F. X., & Peyré, G. (2022). [Faster Unbalanced Optimal Transport: Translation Invariant Sinkhorn and 1-D Frank-Wolfe](https://proceedings.mlr.press/v151/sejourne22a.html). In International Conference on Artificial Intelligence and Statistics (pp. 4995-5021). PMLR.\n\n\\[74] Chewi, S., Maunu, T., Rigollet, P., & Stromme, A. J. (2020). [Gradient descent algorithms for Bures-Wasserstein barycenters](https://proceedings.mlr.press/v125/chewi20a.html). In Conference on Learning Theory (pp. 1276-1304). PMLR.\n\n\\[75] Altschuler, J., Chewi, S., Gerber, P. R., & Stromme, A. (2021). [Averaging on the Bures-Wasserstein manifold: dimension-free convergence of gradient descent](https://papers.neurips.cc/paper_files/paper/2021/hash/b9acb4ae6121c941324b2b1d3fac5c30-Abstract.html). Advances in Neural Information Processing Systems, 34, 22132-22145.\n\n\\[76] Chapel, L., Tavenard, R. (2025). [One for all and all for one: Efficient computation of partial Wasserstein distances on the line](https://iclr.cc/virtual/2025/poster/28547). In International Conference on Learning Representations.\n\n\\[77] Tanguy, Eloi and Delon, Julie and Gozlan, Nathaël (2024). [Computing Barycentres of Measures for Generic Transport Costs](https://arxiv.org/abs/2501.04016). arXiv preprint 2501.04016 (2024)\n\n\\[78] Martin, R. D., Medri, I., Bai, Y., Liu, X., Yan, K., Rohde, G. K., & Kolouri, S. (2024). [LCOT: Linear Circular Optimal Transport](https://openreview.net/forum?id=49z97Y9lMq). International Conference on Learning Representations.\n\n\\[79] Liu, X., Bai, Y., Martín, R. D., Shi, K., Shahbazi, A., Landman, B. A., Chang, C., & Kolouri, S. (2025). [Linear Spherical Sliced Optimal Transport: A Fast Metric for Comparing Spherical Data](https://openreview.net/forum?id=fgUFZAxywx). International Conference on Learning Representations.\n\n\\[80] Altschuler, J., Bach, F., Rudi, A., Niles-Weed, J., [Massively scalable Sinkhorn distances via the Nyström method](https://proceedings.neurips.cc/paper_files/paper/2019/file/f55cadb97eaff2ba1980e001b0bd9842-Paper.pdf), Advances in Neural Information Processing Systems, 2019.\n\n\\[81] Xu, H., Luo, D., & Carin, L. (2019). [Scalable Gromov-Wasserstein learning for graph partitioning and matching](https://proceedings.neurips.cc/paper/2019/hash/6e62a992c676f611616097dbea8ea030-Abstract.html). Neural Information Processing Systems (NeurIPS).\n\n\\[82] Bonet, C., Nadjahi, K., Séjourné, T., Fatras, K., & Courty, N. (2024). [Slicing Unbalanced Optimal Transport](https://openreview.net/forum?id=AjJTg5M0r8). Transactions on Machine Learning Research.\n\n[83] Germain, T., Flamary, R., Kostic, V. R., & Lounici, K. (2025). [A Spectral-Grassmann Wasserstein Metric for Operator Representations of Dynamical Systems](https://arxiv.org/abs/2509.24920).\n\n[84] Genest, B., Bonneel, N., Nivoliers, V., & Coeurjolly, D. (2025). [BSP-OT: Sparse transport plans between discrete measures in loglinear time.](https://dl.acm.org/doi/10.1145/3763281) ACM Transactions on Graphics (TOG), 44(6), 1-15.\n\n[85] Mahey, G., Chapel, L., Gasso, G., Bonet, C., & Courty, N. (2023). [Fast Optimal Transport through Sliced Generalized Wasserstein Geodesics](https://proceedings.neurips.cc/paper_files/paper/2023/hash/6f1346bac8b02f76a631400e2799b24b-Abstract-Conference.html). Advances in Neural Information Processing Systems, 36, 35350–35385.\n\n[86] Tanguy, E., Chapel, L., Delon, J. (2025). [Sliced Transport Plans](https://arxiv.org/abs/2508.01243) arXiv preprint 2506.03661.\n\n[87] Liu, X., Diaz Martin, R., Bai Y., Shahbazi A., Thorpe M., Aldroubi A., Kolouri, S. (2024). [Expected Sliced Transport Plans](https://openreview.net/forum?id=P7O1Vt1BdU). International Conference on Learning Representations.\n\n[88] Bouveyron, C. & Corneli, M. (2026).  [Scaling optimal transport to high-dimensional Gaussian distributions with application to domain adaptation](https://hal.science/hal-04930868v4/file/Article-OT-HDGauss-v4.pdf). Statistics and Computing 36.2 (2026): 88.\n\n[89] Tipping, M.E. & Bishop, C.M. (1999). [Probabilistic principal component analysis]. Journal of the Royal Statistical Society Series B: Statistical Methodology 61.3 (1999): 611-622.\n\n[90] Genans, F., Godichon-Baggioni, A., Vialard, F. X., & Wintenberger, O. (2025). [Decreasing Entropic Regularization Averaged Gradient for Semi-Discrete Optimal Transport](https://proceedings.neurips.cc/paper_files/paper/2025/file/d7efa12e98f5e0dd8b4f48cd60b4e3aa-Paper-Conference.pdf). Advances in Neural Information Processing Systems, 38, 146913-146949.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"481A:3FA0D:17824E:5DC653:6AB92B30"},"text_sha256":"a8de33e2a6888b1f9a2b657be5af4c1ca571f8ffd7f8830efa579359ac46aaa0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"TeamHG-Memex/eli5","input_row":{"repository":"TeamHG-Memex/eli5","url":"https://github.com/TeamHG-Memex/eli5","name":"eli5","owner":"TeamHG-Memex","description":"A library for debugging/inspecting machine learning classifiers and explaining their predictions","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2842,"issues":261,"created_at":"2016-09-15T01:04:57Z","updated_at":"2026-09-22T21:15:49Z","first_commit_at":"2016-09-15T01:04:17Z","last_commit_at":"2026-04-08T21:01:12Z","activity_months":114.73999999999999,"ai_ml_match_topics":"machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:54.003Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"TeamHG-Memex/eli5","visibility":"public","created_at":"2016-09-15T01:04:57Z","updated_at":"2026-09-22T21:15:49Z","private":false,"fork":false,"archived":false,"stargazers_count":2842,"open_issues_count":162,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2358","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0806:DC698:17F7C44:1C1B5E8:6AB92B32"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2357","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:17F55FE:1C19A8E:6AB92B32"},"commit":{"sha":"0206f40e567cad87097332fb5d9e05806e3e40d6","url":"https://github.com/TeamHG-Memex/eli5/commit/0206f40e567cad87097332fb5d9e05806e3e40d6","date":"2018-05-21T09:30:37Z","author_date":"2018-05-21T09:30:37Z","committer_date":"2018-05-21T09:30:37Z","tree_sha":"d6085bf3c3eb61e5e935c50d7c9832c8d26377ea","message_first_line":"Merge pull request #268 from TeamHG-Memex/fix-build-numpy-xgboost"},"tree_request_status":200,"tree_rate":{"github_remaining":"2356","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:1810704:1C34A6B:6AB92B32"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3574,"blob_sha":"c647787055a88832056af2050470224ef623f89a","priority":0}],"documents":[{"path":"README.rst","size":3574,"blob_sha":"c647787055a88832056af2050470224ef623f89a","priority":0,"status":200,"text":"====\nELI5\n====\n\n.. image:: https://img.shields.io/pypi/v/eli5.svg\n   :target: https://pypi.python.org/pypi/eli5\n   :alt: PyPI Version\n\n.. image:: https://travis-ci.org/TeamHG-Memex/eli5.svg?branch=master\n   :target: https://travis-ci.org/TeamHG-Memex/eli5\n   :alt: Build Status\n\n.. image:: https://codecov.io/github/TeamHG-Memex/eli5/coverage.svg?branch=master\n   :target: https://codecov.io/github/TeamHG-Memex/eli5?branch=master\n   :alt: Code Coverage\n\n.. image:: https://readthedocs.org/projects/eli5/badge/?version=latest\n   :target: https://eli5.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation\n\n\nELI5 is a Python package which helps to debug machine learning\nclassifiers and explain their predictions.\n\n.. image:: https://raw.githubusercontent.com/TeamHG-Memex/eli5/master/docs/source/static/word-highlight.png\n   :alt: explain_prediction for text data\n\nIt provides support for the following machine learning frameworks and packages:\n\n* scikit-learn_. Currently ELI5 allows to explain weights and predictions\n  of scikit-learn linear classifiers and regressors, print decision trees\n  as text or as SVG, show feature importances and explain predictions\n  of decision trees and tree-based ensembles. ELI5 understands text\n  processing utilities from scikit-learn and can highlight text data\n  accordingly. Pipeline and FeatureUnion are supported.\n  It also allows to debug scikit-learn pipelines which contain\n  HashingVectorizer, by undoing hashing.\n\n* xgboost_ - show feature importances and explain predictions of XGBClassifier,\n  XGBRegressor and xgboost.Booster.\n\n* LightGBM_ - show feature importances and explain predictions of\n  LGBMClassifier and LGBMRegressor.\n\n* lightning_ - explain weights and predictions of lightning classifiers and\n  regressors.\n\n* sklearn-crfsuite_. ELI5 allows to check weights of sklearn_crfsuite.CRF\n  models.\n\nELI5 also implements several algorithms for inspecting black-box models\n(see `Inspecting Black-Box Estimators`_):\n\n* TextExplainer_ allows to explain predictions\n  of any text classifier using LIME_ algorithm (Ribeiro et al., 2016).\n  There are utilities for using LIME with non-text data and arbitrary black-box\n  classifiers as well, but this feature is currently experimental.\n* `Permutation importance`_ method can be used to compute feature importances\n  for black box estimators.\n\nExplanation and formatting are separated; you can get text-based explanation\nto display in console, HTML version embeddable in an IPython notebook\nor web dashboards, a ``pandas.DataFrame`` object if you want to process\nresults further, or JSON version which allows to implement custom rendering\nand formatting on a client.\n\n.. _lightning: https://github.com/scikit-learn-contrib/lightning\n.. _scikit-learn: https://github.com/scikit-learn/scikit-learn\n.. _sklearn-crfsuite: https://github.com/TeamHG-Memex/sklearn-crfsuite\n.. _LIME: https://eli5.readthedocs.io/en/latest/blackbox/lime.html\n.. _TextExplainer: https://eli5.readthedocs.io/en/latest/tutorials/black-box-text-classifiers.html\n.. _xgboost: https://github.com/dmlc/xgboost\n.. _LightGBM: https://github.com/Microsoft/LightGBM\n.. _Permutation importance: https://eli5.readthedocs.io/en/latest/blackbox/permutation_importance.html\n.. _Inspecting Black-Box Estimators: https://eli5.readthedocs.io/en/latest/blackbox/index.html\n\nLicense is MIT.\n\nCheck `docs <https://eli5.readthedocs.io/>`_ for more.\n\n----\n\n.. image:: https://hyperiongray.s3.amazonaws.com/define-hg.svg\n\t:target: https://hyperiongray.com/?pk_campaign=github&pk_kwd=eli5\n\t:alt: define hyperiongray\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2D34:3AC15:17F8F5:5E3C4B:6AB92B31"},"text_sha256":"0e54125e3e2985f4d2fd6d22ddd97df7d0b6fe798f2cbf82fe896001b221d683"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2355","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17D28F8:1BF6149:6AB92B33"},"commit":{"sha":"bb3d3a6fb6fd790943184982892caedf925cc45c","url":"https://github.com/TeamHG-Memex/eli5/commit/bb3d3a6fb6fd790943184982892caedf925cc45c","date":"2026-04-08T21:01:12Z","author_date":"2026-04-08T21:01:12Z","committer_date":"2026-04-08T21:01:12Z","tree_sha":"783a89747e57c79b99843009ca2f0bf5b24ed430","message_first_line":"Remove workflows-sync.yml - not in .github templates"},"tree_request_status":200,"tree_rate":{"github_remaining":"2354","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0934:767EB:17F4C58:1C19439:6AB92B34"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3999,"blob_sha":"d15b27fa3bab62d0042eaa790fbc72a4efa1a0a0","priority":0}],"documents":[{"path":"README.rst","size":3999,"blob_sha":"d15b27fa3bab62d0042eaa790fbc72a4efa1a0a0","priority":0,"status":200,"text":"====\nELI5\n====\n\n.. image:: https://img.shields.io/pypi/v/eli5.svg\n   :target: https://pypi.python.org/pypi/eli5\n   :alt: PyPI Version\n\n.. image:: https://travis-ci.org/TeamHG-Memex/eli5.svg?branch=master\n   :target: https://travis-ci.org/TeamHG-Memex/eli5\n   :alt: Build Status\n\n.. image:: https://codecov.io/github/TeamHG-Memex/eli5/coverage.svg?branch=master\n   :target: https://codecov.io/github/TeamHG-Memex/eli5?branch=master\n   :alt: Code Coverage\n\n.. image:: https://readthedocs.org/projects/eli5/badge/?version=latest\n   :target: https://eli5.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation\n\n\nELI5 is a Python package which helps to debug machine learning\nclassifiers and explain their predictions.\n\n.. image:: https://raw.githubusercontent.com/TeamHG-Memex/eli5/master/docs/source/static/word-highlight.png\n   :alt: explain_prediction for text data\n\n.. image:: https://raw.githubusercontent.com/TeamHG-Memex/eli5/master/docs/source/static/gradcam-catdog.png\n   :alt: explain_prediction for image data\n\nIt provides support for the following machine learning frameworks and packages:\n\n* scikit-learn_. Currently ELI5 allows to explain weights and predictions\n  of scikit-learn linear classifiers and regressors, print decision trees\n  as text or as SVG, show feature importances and explain predictions\n  of decision trees and tree-based ensembles. ELI5 understands text\n  processing utilities from scikit-learn and can highlight text data\n  accordingly. Pipeline and FeatureUnion are supported.\n  It also allows to debug scikit-learn pipelines which contain\n  HashingVectorizer, by undoing hashing.\n\n* Keras_ - explain predictions of image classifiers via Grad-CAM visualizations.\n\n* xgboost_ - show feature importances and explain predictions of XGBClassifier,\n  XGBRegressor and xgboost.Booster.\n\n* LightGBM_ - show feature importances and explain predictions of\n  LGBMClassifier and LGBMRegressor.\n\n* CatBoost_ - show feature importances of CatBoostClassifier,\n  CatBoostRegressor and catboost.CatBoost.\n\n* lightning_ - explain weights and predictions of lightning classifiers and\n  regressors.\n\n* sklearn-crfsuite_. ELI5 allows to check weights of sklearn_crfsuite.CRF\n  models.\n\n\nELI5 also implements several algorithms for inspecting black-box models\n(see `Inspecting Black-Box Estimators`_):\n\n* TextExplainer_ allows to explain predictions\n  of any text classifier using LIME_ algorithm (Ribeiro et al., 2016).\n  There are utilities for using LIME with non-text data and arbitrary black-box\n  classifiers as well, but this feature is currently experimental.\n* `Permutation importance`_ method can be used to compute feature importances\n  for black box estimators.\n\nExplanation and formatting are separated; you can get text-based explanation\nto display in console, HTML version embeddable in an IPython notebook\nor web dashboards, a ``pandas.DataFrame`` object if you want to process\nresults further, or JSON version which allows to implement custom rendering\nand formatting on a client.\n\n.. _lightning: https://github.com/scikit-learn-contrib/lightning\n.. _scikit-learn: https://github.com/scikit-learn/scikit-learn\n.. _sklearn-crfsuite: https://github.com/TeamHG-Memex/sklearn-crfsuite\n.. _LIME: https://eli5.readthedocs.io/en/latest/blackbox/lime.html\n.. _TextExplainer: https://eli5.readthedocs.io/en/latest/tutorials/black-box-text-classifiers.html\n.. _xgboost: https://github.com/dmlc/xgboost\n.. _LightGBM: https://github.com/Microsoft/LightGBM\n.. _Catboost: https://github.com/catboost/catboost\n.. _Keras: https://keras.io/\n.. _Permutation importance: https://eli5.readthedocs.io/en/latest/blackbox/permutation_importance.html\n.. _Inspecting Black-Box Estimators: https://eli5.readthedocs.io/en/latest/blackbox/index.html\n\nLicense is MIT.\n\nCheck `docs <https://eli5.readthedocs.io/>`_ for more.\n\n----\n\n.. image:: https://hyperiongray.s3.amazonaws.com/define-hg.svg\n\t:target: https://www.hyperiongray.com/?pk_campaign=github&pk_kwd=eli5\n\t:alt: define hyperiongray\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:185098:5E95AA:6AB92B34"},"text_sha256":"73a56aba18ba40eb7c40065865b02c839cf8ab1d64bee3d48fb6d418b0069504"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scverse/scanpy","input_row":{"repository":"scverse/scanpy","url":"https://github.com/scverse/scanpy","name":"scanpy","owner":"scverse","description":"Single-cell analysis in Python. Scales to >100M cells.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2574,"issues":2074,"created_at":"2017-01-29T11:31:11Z","updated_at":"2026-09-27T11:16:08Z","first_commit_at":"2017-01-29T11:28:41Z","last_commit_at":"2026-09-27T11:16:01Z","activity_months":115.90000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:56.855Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scverse/scanpy","visibility":"public","created_at":"2017-01-29T11:31:11Z","updated_at":"2026-09-27T11:16:08Z","private":false,"fork":false,"archived":false,"stargazers_count":2574,"open_issues_count":537,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2353","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D5:6E5BD:179B489:1BBE29E:6AB92B34"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2352","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D6:3BE445:1793389:1BB60B9:6AB92B35"},"commit":{"sha":"1f54422dd0b8f9a8ff4b490d7beeb5b562468754","url":"https://github.com/scverse/scanpy/commit/1f54422dd0b8f9a8ff4b490d7beeb5b562468754","date":"2018-05-24T20:39:25Z","author_date":"2018-05-24T20:39:25Z","committer_date":"2018-05-24T20:39:25Z","tree_sha":"edda080e7b8381c94572fcf7124704a04c86d609","message_first_line":"removed weird files"},"tree_request_status":200,"tree_rate":{"github_remaining":"2351","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:17ACD2E:1BD0E9D:6AB92B35"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1305,"blob_sha":"8232c201a273a04370aa6b5be7b350aa6f9871b4","priority":0}],"documents":[{"path":"README.rst","size":1305,"blob_sha":"8232c201a273a04370aa6b5be7b350aa6f9871b4","priority":0,"status":200,"text":"|PyPI| |Docs| |Build Status|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/scanpy.svg\n    :target: https://pypi.org/project/scanpy\n.. |Docs| image:: https://readthedocs.org/projects/scanpy/badge/?version=latest\n   :target: https://scanpy.readthedocs.io\n.. |Build Status| image:: https://travis-ci.org/theislab/scanpy.svg?branch=master\n   :target: https://travis-ci.org/theislab/scanpy\n..\n   .. |Coverage| image:: https://codecov.io/gh/theislab/scanpy/branch/master/graph/badge.svg\n      :target: https://codecov.io/gh/theislab/scanpy\n\nScanpy – Single-Cell Analysis in Python\n=======================================\n\n.. raw:: html\n\n   <p>\n   <img src=\"http://falexwolf.de/img/tsne_1.3M.png\" style=\"width: 100px; margin: 10px 10px 5px 5px\" align=\"left\">\n   Scanpy is a scalable toolkit for analyzing single-cell gene expression\n   data. It includes preprocessing, visualization, clustering, pseudotime and\n   trajectory inference, differential expression testing and simulation of gene\n   regulatory networks. The Python-based implementation efficiently deals with\n   datasets of more than one million cells.\n   <\/p>\n\nRead the `documentation <https://scanpy.readthedocs.io>`_.\nIf Scanpy is useful for your research, consider citing `Genome Biology (2018) <https://doi.org/10.1186/s13059-017-1382-0>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22A:7A4F8:182D45:5E7294:6AB92B35"},"text_sha256":"730907eac3112762ed99ac11a57403c2d32e94da128d6b777d07bee7d4a0aa27"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2350","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:1815BB4:1C39DE2:6AB92B36"},"commit":{"sha":"d5a745e1258f5ca6a23c6a790f27b40d7ad05418","url":"https://github.com/scverse/scanpy/commit/d5a745e1258f5ca6a23c6a790f27b40d7ad05418","date":"2026-06-30T09:45:58Z","author_date":"2026-06-30T09:45:58Z","committer_date":"2026-06-30T09:45:58Z","tree_sha":"5bd62f6c011cd49695f69ffeeeeda6ecc32630b4","message_first_line":"ci: pre-commit autoupdate (#4189)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2349","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D7:380E1C:17D250E:1BF595F:6AB92B36"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4687,"blob_sha":"6862ad259a8e91db5c6d83975b8980704eae5081","priority":0}],"documents":[{"path":"README.md","size":4687,"blob_sha":"6862ad259a8e91db5c6d83975b8980704eae5081","priority":0,"status":200,"text":"[![Stars](https://img.shields.io/github/stars/scverse/scanpy?style=flat&logo=GitHub&color=yellow)](https://github.com/scverse/scanpy/stargazers)\n[![PyPI](https://img.shields.io/pypi/v/scanpy)](https://pypi.org/project/scanpy)\n[![PyPI Downloads](https://img.shields.io/pepy/dt/scanpy?logo=pypi)](https://pepy.tech/project/scanpy)\n[![Conda Forge](https://img.shields.io/conda/vn/conda-forge/scanpy)\n![Conda Forge Downloads](https://img.shields.io/conda/dn/conda-forge/scanpy?logo=condaforge)](https://anaconda.org/conda-forge/scanpy)\n[![Docs](https://readthedocs.com/projects/icb-scanpy/badge/?version=latest)](https://scanpy.readthedocs.io)\n[![CI](https://github.com/scverse/scanpy/actions/workflows/ci.yml/badge.svg)](https://github.com/scverse/scanpy/actions/workflows/ci.yml)\n[![Discourse topics](https://img.shields.io/discourse/posts?color=yellow&logo=discourse&server=https%3A%2F%2Fdiscourse.scverse.org)](https://discourse.scverse.org/)\n[![Chat](https://img.shields.io/badge/zulip-join_chat-%2367b08f.svg)](https://scverse.zulipchat.com)\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org/)\n\n# Scanpy – Single-Cell Analysis in Python\n\nScanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with [anndata][].\nIt includes preprocessing, visualization, clustering, trajectory inference and differential expression testing.\nThe Python-based implementation efficiently deals with datasets of more than one million cells.\nFor datasets too large to fit into memory, [many scanpy functions][] are now compatible with [dask][] (**warning: experimental**).\n\nDiscuss usage on the scverse [Discourse][]. Read the [documentation][].\nIf you'd like to contribute by opening an issue or creating a pull request, please take a look at our [contribution guide][].\n\n[anndata]: https://anndata.readthedocs.io\n[dask]: https://docs.dask.org/en/stable/\n[discourse]: https://discourse.scverse.org/\n[documentation]: https://scanpy.readthedocs.io\n[many scanpy functions]: https://github.com/scverse/scanpy/issues/2578\n\n[//]: # (numfocus-fiscal-sponsor-attribution)\n\nscanpy is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).\nIf you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.\n\n<div align=\"center\">\n<a href=\"https://numfocus.org/project/scverse\">\n  <img\n    src=\"https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png\"\n    width=\"200\"\n  >\n<\/a>\n<\/div>\n\n## Public API\n\nOur public API is documented in the [API section][] of these docs.\nWe cannot guarantee the stability of our internal APIs, whether it's the location of a function, its arguments, or something else.\nIn other words, we do not officially support (or encourage users to do) something like `from scanpy.logging import debug` as `logging` is not documented, even though it does not contain a [leading underscore][].\nHowever, we are aware that many users do use these internal APIs and thus encourage them to [open an issue][] or migrate to the public API.\nThat is, if something is missing from our public API as documented, for example a feature you wish to be exported publicly, please open an issue.\n\n[api section]: https://scanpy.readthedocs.io/en/stable/api.html\n[leading underscore]: https://peps.python.org/pep-0008/#public-and-internal-interfaces\n[open an issue]: https://github.com/scverse/scanpy/issues/new/choose\n\n\n\n## Citation\n\nIf you use `scanpy` in your work, please cite the `scanpy` publication as follows:\n\n> **SCANPY: large-scale single-cell gene expression data analysis**\n>\n> F. Alexander Wolf, Philipp Angerer, Fabian J. Theis\n>\n> _Genome Biology_ 2018 Feb 06. doi: [10.1186/s13059-017-1382-0](https://doi.org/10.1186/s13059-017-1382-0).\n\nYou can cite the scverse publication as follows:\n\n> **The scverse project provides a computational ecosystem for single-cell omics data analysis**\n>\n> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis\n>\n> _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).\n\n\n[contribution guide]: CONTRIBUTING.md\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C464:285814:173224:5D76C5:6AB92B2C"},"text_sha256":"969fa4692dbf4788785a2df9eff20619f9a0372184355c69f65a60d2882dde29"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PizzaDeDados/datascience-pizza","input_row":{"repository":"PizzaDeDados/datascience-pizza","url":"https://github.com/PizzaDeDados/datascience-pizza","name":"datascience-pizza","owner":"PizzaDeDados","description":"🍕 Repositório para juntar informações sobre materiais de estudo em análise de dados e áreas afins, empresas que trabalham com dados e dicionário de conceitos","language":"","license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0","license_osi_approved":"true","stars":2454,"issues":110,"created_at":"2017-07-18T20:37:32Z","updated_at":"2026-09-16T12:40:55Z","first_commit_at":"2017-07-18T20:39:05Z","last_commit_at":"2022-02-27T18:10:12Z","activity_months":55.350000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:41:59.840Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PizzaDeDados/datascience-pizza","visibility":"public","created_at":"2017-07-18T20:37:32Z","updated_at":"2026-09-16T12:40:55Z","private":false,"fork":false,"archived":false,"stargazers_count":2454,"open_issues_count":11,"license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0"},"error":"","rate":{"github_remaining":"2348","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:1796B37:1BBABAC:6AB92B37"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2347","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:18025D3:1C26991:6AB92B38"},"commit":{"sha":"c94adc6a506c937cee755bc17fcb4017ef751c66","url":"https://github.com/PizzaDeDados/datascience-pizza/commit/c94adc6a506c937cee755bc17fcb4017ef751c66","date":"2018-05-15T19:36:25Z","author_date":"2018-05-15T19:36:25Z","committer_date":"2018-05-15T19:36:25Z","tree_sha":"7daf028d713cb890a560e5acd81fef11677630d1","message_first_line":"Inclusão de tópico: Estatística e Matemática."},"tree_request_status":200,"tree_rate":{"github_remaining":"2346","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17BF308:1BE238B:6AB92B38"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6912,"blob_sha":"888dd8fd95524ed645acfc673cc49b6ba73aef8b","priority":0}],"documents":[{"path":"README.md","size":6912,"blob_sha":"888dd8fd95524ed645acfc673cc49b6ba73aef8b","priority":0,"status":200,"text":"# Guia do Cientista de Dados das Galáxias\n\n![neil](https://media.giphy.com/media/3o7TKSjRrfIPjeiVyM/giphy.gif)\n\n--\n\n**DISCLAIMER**: *Este repositório foi feito pela e para a comunidade. Existem opiniões divergentes sobre o que básico e o que é avançado entre outros temas. \nCaso discorde de alguma coisa que está escrita aqui, fique a vontade para fazer um pull request melhorando as descrições feitas aqui.*\n\nO intuito é  agregar o conhecimento que se espalha em diversos grupos e iniciativas. Muitas vezes esse conhecimento fica espalhado em drives, pockets e outros meios... \nDessa forma, esse repositório visa ajudar os iniciantes e servir como referência para os experientes. \n\nSe possuir material interessante, por favor compartilhe com a comunidade. Estamos aqui para crescermos juntos.\n\nDessa iniciativa também nasceu o [Pizza de Dados](http://pizzadedados.com/), um podcast brasileiro \nfocado em ciência de dados. Se tiver um tempinho, prestigie esse trabalho 100% brasileiro.\n\nNo mais, é isso. Bem vinda(o), pequena(o) padawan :)\n\n\n## Sumário\n> Algumas dicas sobre o que estudar para ser um cientista de dados hoje:\n\n<!-- toc -->\n  * [Recomendações](#recomendacoes)\n      * [Iniciante](#iniciante)\n      * [Intermediário](#intermediario)\n      * [Grandes projetos (big data)](#grandesprojetos)\n      * [Em Python](#empython)\n  * [Vídeos](#videos)\n  * [Datasets](#datasets)\n  * [Dicionário de termos em português](https://github.com/leportella/datascience-pizza/blob/master/dicionario.md)\n  * [Empresas no Brasil que trabalham com DS](https://github.com/leportella/datascience-pizza/blob/master/empresas.md)\n  * [Grupos](#grupos)\n  * [Meteodologias Ágeis](#metodologiasageis)\n  * [Dados em Imagens](#imagens)\n  * Tópicos específicos:\n      * [Aprendizado de Máquina/Machine Learning](https://github.com/leportella/datascience-pizza/blob/master/topicos/aprendizado-de-maquina.md)\n      * [Banco de dados](https://github.com/leportella/datascience-pizza/blob/master/topicos/banco-de-dados.md)\n      * [Big Data](https://github.com/leportella/datascience-pizza/blob/master/topicos/big-data.md)\n      * [Blogs e Jornais](https://github.com/leportella/datascience-pizza/blob/master/topicos/blogs-jornais.md)\n      * [Carreira](https://github.com/leportella/datascience-pizza/blob/master/topicos/carreira.md)\n      * [Cursos](https://github.com/leportella/datascience-pizza/blob/master/topicos/cursos.md)\n      * [Deep Learning](https://github.com/leportella/datascience-pizza/blob/master/topicos/deep-learning.md)\n      * [Geociências](https://github.com/leportella/datascience-pizza/blob/master/topicos/geociencias.md)\n      * [Inteligência Artificial](https://github.com/leportella/datascience-pizza/blob/master/topicos/inteligencia-artificial.md)\n      * [Livros](https://github.com/leportella/datascience-pizza/blob/master/topicos/livros.md)\n      * [Meetups e Eventos](https://github.com/leportella/datascience-pizza/blob/master/topicos/meetups-e-eventos.md)\n      * [Notícias Legais](https://github.com/leportella/datascience-pizza/blob/master/topicos/noticias-legais.md)\n      * [Podcasts](https://github.com/leportella/datascience-pizza/blob/master/topicos/podcasts.md)\n      * [Processamento de Linguagem Natural](https://github.com/leportella/datascience-pizza/blob/master/topicos/processamento-de-linguagem-natural.md)\n      * [Reportagens relevantes](https://github.com/leportella/datascience-pizza/blob/master/topicos/noticias-legais.md)\n      * [Visualização de dados](https://github.com/leportella/datascience-pizza/blob/master/topicos/visualizacao-de-dados.md)\n \n--------------------------------------------------\n<h2 id=\"recomendacoes\">Recomendações<\/h2>\n\n<h3 id=\"iniciante\">Iniciante<\/h3>\n\n  - Python (lib [Pandas](https://pandas.pydata.org/)) ou R\n  - SQL\n  - Jupyter Notebook\n  - Estatística Descritiva\n\n<h3 id=\"intermediario\">Intermediário<\/h3>\n\n  - Machine Learning\n  - Cálculo\n  - Álgebra Linear\n  - Deep Learning\n  - Processamento de Linguagem Natural\n\n<h3 id=\"grandesprojetos\">Grandes projetos (big data)<\/h3>\n\n  - NoSQL\n  - Scala\n  - Spark\n  - Estatística Bayesiana\n  - Hive\n  - Hadoop \n  - Julia\n  - Computação distribuída com AWS e Google Cloud\n\n<h3 id=\"empython\">Em Python<\/h3>\n\n  - [Numpy](http://www.numpy.org/)\n  - [Pandas](https://pandas.pydata.org/)\n  - [Scipy](https://www.scipy.org/)\n  - [Matplotlib (Visualização)](https://matplotlib.org/)\n  - [Seaborn (Visualização)](https://seaborn.pydata.org/)\n  - [Bokeh (Visualização)](https://bokeh.pydata.org/en/latest/)\n  - [Sklearn](http://scikit-learn.org)\n  - [NLTK](http://www.nltk.org/)\n  \n--------------------------------------------------\n<h2 id=\"videos\">Vídeos<\/h2>\n\n### Estudos\n \n  - [Lista de cursos online](http://www.kdnuggets.com/education/online.html) by KDnuggets\n\n### Webcasts & Webinars\n  - [Lista dos próximos](http://www.kdnuggets.com/webcasts/index.html) by KDnuggets\n\n--------------------------------------------------\n<h2 id=\"datasets\">Datasets<\/h2>\n\n - [Datasets for Machine Learning](https://docs.google.com/spreadsheets/d/1AQvZ7-Kg0lSZtG1wlgbIsrm90HaTZrJGQMz-uKRRlFw/edit#gid=0)\n - [Datasets for Data Mining and Data Science](http://www.kdnuggets.com/datasets/index.html)\n - [Data repositories](http://www.kdnuggets.com/datasets/index.html) by KDnuggets\n - [Datasets - Kaggle](https://www.kaggle.com/datasets)\n - [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets.html)\n - [data.world](https://data.world/)\n - [Amazon Public Datasets](https://aws.amazon.com/pt/public-datasets/)\n - [brasil.io](https://brasil.io/datasets)\n\n--------------------------------------------------\n<h2 id=\"grupos\">Grupos<\/h2>\n\n- [Data Science & Python - Telegram](https://t.me/datasciencepython)\n- [PyData BH - Telegram](https://t.me/pydatabh)\n- [PyData BsB - Telegram](https://t.me/PyDataBSB)\n- [Python Brasil Programadores - Facebook](https://www.facebook.com/groups/python.brasil/)\n- [Machine & Deep Learning Brasil - Facebook](https://www.facebook.com/groups/machinedeeplearningbrasil/)\n- [Machine Learning & Data Science no Garoa - Telegram](https://t.me/dsmlbr)\n- [Dados Abertos - Telegram](https://t.me/dadosabertos)\n- [R Brasil Programadores - Facebook](https://www.facebook.com/groups/1410023525939155/)\n- [R Brasil - Telegram](https://t.me/rbrasil)\n- [Data Science Brasil - Facebook](https://www.facebook.com/groups/DataScienceMachineLearningBR/)\n\n--------------------------------------------------\n<h2 id=\"metodologiasageis\">Metodologias ágeis<\/h2>\n\n- [CRISP-DM](http://www.bigdatabusiness.com.br/se-voce-se-interessa-por-big-data-precisa-entender-o-crisp-dm/) [**pt-br**]\n\n--------------------------------------------------\n<h2 id=\"imagens\">Dados em Imagens<\/h2>\n\n<a href=\"https://www.domo.com/blog/data-never-sleeps-2-0/\"><img src=\"https://web-assets.domo.com/blog/wp-content/uploads/2014/04/DataNeverSleeps_sm2.png\" alt=\"infographic\" /><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1614:376DE:180D50:5E53DC:6AB92B38"},"text_sha256":"4909de83b01a64bf945783b96baeaa5ccaa4734d5ba027a05596ca1afecdbc97"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2345","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:17F8028:1C1BACC:6AB92B39"},"commit":{"sha":"4c2558cb79d0a256730df638390e60faee9f8018","url":"https://github.com/PizzaDeDados/datascience-pizza/commit/4c2558cb79d0a256730df638390e60faee9f8018","date":"2022-02-27T18:10:12Z","author_date":"2022-02-27T18:10:12Z","committer_date":"2022-02-27T18:10:12Z","tree_sha":"af91bb19e5799e8cf3f54a28424b0288b24d9152","message_first_line":"Merge pull request #426 from augustowebd/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"2344","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:179B6F7:1BBE5CB:6AB92B39"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10282,"blob_sha":"f7da11e596995a3aa26401480b6ee6cf755b4ad2","priority":0}],"documents":[{"path":"README.md","size":10282,"blob_sha":"f7da11e596995a3aa26401480b6ee6cf755b4ad2","priority":0,"status":200,"text":"# Guia do Cientista de Dados das Galáxias\n\n![neil](https://media.giphy.com/media/3o7TKSjRrfIPjeiVyM/giphy.gif)\n\n--\n\n**DISCLAIMER**: *Este repositório foi feito pela e para a comunidade. Existem opiniões divergentes sobre o que é básico e o que é avançado entre outros temas.\nCaso discorde de alguma coisa que está escrita aqui, fique à vontade para fazer um pull request melhorando as descrições feitas.*\n\nO intuito é  agregar o conhecimento que se espalha em diversos grupos e iniciativas. Muitas vezes esse conhecimento fica espalhado em drives, pockets e outros meios...\nDessa forma, esse repositório visa ajudar os iniciantes e servir como referência para os experientes.\n\nSe possuir material interessante, por favor compartilhe com a comunidade. Estamos aqui para crescermos juntos.\n\nDessa iniciativa também nasceu o [Pizza de Dados](https://pizzadedados.com/), um podcast brasileiro\nfocado em ciência de dados. Se tiver um tempinho, prestigie esse trabalho 100% brasileiro.\n\nSe você gosta desse repositório e quer ajudar, considere [apoiar o Pizza de Dados](https://apoia.se/pizzadedados) com qualquer quantia :)\n\nNo mais, é isso. Bem vinda(o), pequena(o) padawan :)\n\n## Sumário\n\n> Algumas dicas sobre o que estudar para ser um cientista de dados hoje:\n\n<!-- toc -->\n  * [Recomendações](#recomendacoes)\n      * [Iniciante](#iniciante)\n      * [Intermediário](#intermediario)\n      * [Grandes projetos (big data)](#grandesprojetos)\n      * [Em Python](#empython)\n      * [Em R](#emr)\n      * [Em Julia](#emjulia)\n  * [Vídeos](#videos)\n  * [Datasets](#datasets)\n  * [Dicionário de termos em português](https://github.com/PizzaDeDados/datascience-pizza/blob/master/dicionario.md)\n  * [Empresas no Brasil que trabalham com DS](https://github.com/PizzaDeDados/datascience-pizza/blob/master/empresas.md)\n  * [Grupos](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/grupos.md)\n  * [Metodologias Ágeis](#metodologiasageis)\n  * [Dados em Imagens](#imagens)\n  * Tópicos específicos:\n      * [Aprendizado de Máquina/Machine Learning](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/aprendizado-de-maquina.md)\n      * [Banco de dados](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/banco-de-dados.md)\n      * [Big Data](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/big-data.md)\n      * [Blogs e Jornais](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/blogs-jornais.md)\n      * [Carreira](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/carreira.md)\n      * [Cursos](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/cursos.md)\n      * [Deep Learning](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/deep-learning.md)\n      * [Estatística e Matemática](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/estatistica-e-matematica.md)\n      * [Geociências](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/geociencias.md)\n      * [Inteligência Artificial](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/inteligencia-artificial.md)\n      * [Linguagens](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/linguagens.md)\n      * [Livros](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/livros.md)\n      * [Meetups e Eventos](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/meetups-e-eventos.md)\n      * [Neurociência](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/neurociência.md)\n      * [Notícias Legais](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/noticias-legais.md)\n      * [Podcasts](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/podcasts.md)\n      * [Processamento de Linguagem Natural](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/processamento-de-linguagem-natural.md)\n      * [Raspagem de Dados](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/raspagem-de-dados.md)\n      * [Reportagens relevantes](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/noticias-legais.md)\n      * [Visualização de dados](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/visualizacao-de-dados.md)\n\n--------------------------------------------------\n<h2 id=\"recomendacoes\">Recomendações<\/h2>\n\n![](https://media.giphy.com/media/Lq3ueCSWjnQPu/giphy.gif)\n\n\n<h3 id=\"iniciante\">Iniciante<\/h3>\n\n  - [Python](https://www.python.org/) (lib [Pandas](https://pandas.pydata.org/)) ou [R](https://cloud.r-project.org/) | [R Studio](https://www.rstudio.com/products/rstudio/download/#download). [Qual aprender? Dicas Udacity](https://blog.udacity.com/2015/01/python-vs-r-learn-first.html)\n  - [SQL](https://pt.khanacademy.org/computing/computer-programming/sql#sql-basics)\n  - [Jupyter Notebook](http://jupyter.org/)\n  - [Estatística Descritiva](https://br.udacity.com/course/intro-to-descriptive-statistics--ud827)\n  - [Ferramentas básicas de desenvolvimento](https://medium.com/pizzadedados/ferramentas-desenvolvimento-ciencia-dados-c54d112871d8) | [**pt-br**]\n\n<h3 id=\"intermediario\">Intermediário<\/h3>\n\n  - [Cálculo](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/calculo.md)\n  - [Álgebra Linear](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/algebra-linear.md)\n  - [Machine Learning](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/aprendizado-de-maquina.md)\n  - [Deep Learning](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/deep-learning.md)\n  - [Visualização de Dados](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/visualizacao-de-dados.md)\n  - [Processamento de Linguagem Natural](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/processamento-de-linguagem-natural.md)\n\n<h3 id=\"grandesprojetos\">Grandes projetos (big data)<\/h3>\n\n  - NoSQL\n  - Scala\n  - Spark\n  - Estatística Bayesiana\n  - Hive\n  - Hadoop\n  - Julia\n  - Computação distribuída com AWS e Google Cloud\n\n### O que estudar em cada linguagem - dicas e tutoriais\n\nVer [este link](https://github.com/PizzaDeDados/datascience-pizza/blob/master/topicos/linguagens.md)\n\n--------------------------------------------------\n<h2 id=\"videos\">Vídeos<\/h2>\n\n### Estudos\n  - [Lista de cursos online](http://www.kdnuggets.com/education/online.html) by KDnuggets\n  - [Playlist de Treinamento](https://www.youtube.com/playlist?list=PL9ooVrP1hQOGR57Y4g1LFhn1JXVgn1lkX) by Edureka!\n  - [Curso de análise de dados em Python para iniciantes](https://www.youtube.com/playlist?list=PLqiFjCF_dtcymXtdjwAP4s7tRoW4CYwnH) by LabHacker Câmara dos Deputados [**pt-br**]\n\n### Webcasts & Webinars\n  - [Lista dos próximos](http://www.kdnuggets.com/webcasts/index.html) by KDnuggets\n\n\n--------------------------------------------------\n<h2 id=\"datasets\">Datasets<\/h2>\n\n - [Datasets for Machine Learning](https://docs.google.com/spreadsheets/d/1AQvZ7-Kg0lSZtG1wlgbIsrm90HaTZrJGQMz-uKRRlFw/edit#gid=0)\n - [Datasets for Data Mining and Data Science](http://www.kdnuggets.com/datasets/index.html)\n - [Datasets - Kaggle](https://www.kaggle.com/datasets)\n - [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets.html)\n - [data.world](https://data.world/)\n - [Registry of Open Data on AWS](https://registry.opendata.aws)\n - [brasil.io](https://brasil.io/datasets)\n - [Microsoft Research Open Data](https://msropendata.com/)\n - [Datasets for Recommender Systems](https://github.com/caserec/Datasets-for-Recommneder-Systems)\n - [Google Dataset Search](https://toolbox.google.com/datasetsearch)\n - [Information is beautiful](https://informationisbeautiful.net/data/)\n - [Dados do Governo Brasileiro](http://dados.gov.br)\n - [Instituto de Pesquisa Econômica Aplicada](http://www.ipeadata.gov.br)\n - [Banco Central do Brasil](https://www3.bcb.gov.br)\n - [Dados do Governo dos Estados Unidos](http://data.gov)\n - [Dados sobre as cidades dos EUA](http://datasf.org)\n - [Dados do Governo do Canadá (em inglês e francês)](http://open.canada.ca)\n - [Dados do Governo do Reino Unido](https://data.gov.uk)\n - [Dados da União Europeia](http://open-data.europa.eu/en/data)\n - [Dados do Censo dos EUA (dados da população americana e mundial)](http://www.census.gov)\n - [Banco de Dados da NASA](https://data.nasa.gov)\n - [Dados do Banco Mundial](http://data.worldbank.org)\n - [Dados sobre a saúde](http://www.healthdata.gov)\n - [Dados sobre diversos países (incluindo o Brasil)](http://knoema.com)\n - [Dados sobre diversas áreas de negócio e finanças](https://www.quandl.com)\n - [Google Trends](https://www.google.com/trends)\n - [Google Finance](https://www.google.com/finance)\n - [Gapminder](http://www.gapminder.org/data)\n - [Dados com milhões de músicas](https://aws.amazon.com/datasets/million-song-dataset)\n - [Dados sobre os mais diversos assuntos](http://www.freebase.com)\n - [DBpedia](http://wiki.dbpedia.org/)\n - [Open Data Monitor](http://opendatamonitor.eu)\n - [Open Data Network](http://www.opendatanetwork.com)\n - [R Datasets](http://www.stats4stem.org/data-sets.html)\n - [Stasci](http://www.statsci.org/datasets.html)\n - [Portal de Estatística](http://www.statista.com)\n - [Data 360](http://www.data360.org)\n - [Reconhecimento de Faces](http://www.face-rec.org/databases)\n - [Stanford Large Network Dataset Collection](http://snap.stanford.edu/data)\n - [Datahub](http://datahub.io/dataset)\n - [TeraData](teradata.com/Portuguese/Banco_de_Dados_da_Teradata)\n - [Oracle Exadata](oracle.com/exadata)\n - [Food And Agriculture Organization of the United Nations](http://www.fao.org/faostat/en/#home)\n\n--------------------------------------------------\n<h2 id=\"metodologiasageis\">Metodologias ágeis<\/h2>\n\n- [CRISP-DM](https://pt.wikipedia.org/wiki/Cross_Industry_Standard_Process_for_Data_Mining) [**pt-br**]\n\n--------------------------------------------------\n<h2 id=\"imagens\">Dados em Imagens<\/h2>\n\n<a href=\"https://www.domo.com/blog/data-never-sleeps-5/\"><img src=\"https://web-assets.domo.com/blog/wp-content/uploads/2017/07/17-blog-featured-data-never-sleeps-675x400-1.jpg\" alt=\"infographic\" /><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D534:7A4F8:182D5B:5E733E:6AB92B39"},"text_sha256":"22e5cac7e77f9c04c12b3f99470c2c6f4f4d5ef5340971ee15f7886192d1ca2d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"modAL-python/modAL","input_row":{"repository":"modAL-python/modAL","url":"https://github.com/modAL-python/modAL","name":"modAL","owner":"modAL-python","description":"A modular active learning framework for Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2366,"issues":150,"created_at":"2017-11-14T14:01:15Z","updated_at":"2026-09-23T15:14:00Z","first_commit_at":"2017-11-14T14:01:16Z","last_commit_at":"2023-06-01T12:18:23Z","activity_months":66.519999999999996,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:02.429Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"modAL-python/modAL","visibility":"public","created_at":"2017-11-14T14:01:15Z","updated_at":"2026-09-23T15:14:00Z","private":false,"fork":false,"archived":false,"stargazers_count":2366,"open_issues_count":108,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2343","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A6:724D2:17CF812:1BF3B44:6AB92B3A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2342","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DC:71E0C:17F1553:1C14563:6AB92B3A"},"commit":{"sha":"c936ec1e60b1a4a2b3f336577ee12a111db06a5b","url":"https://github.com/modAL-python/modAL/commit/c936ec1e60b1a4a2b3f336577ee12a111db06a5b","date":"2018-04-27T13:14:14Z","author_date":"2018-04-27T13:14:14Z","committer_date":"2018-04-27T13:14:14Z","tree_sha":"d3d3077f8c361158b1651f9dcfa481184ead2e14","message_first_line":"docstring fixes"},"tree_request_status":200,"tree_rate":{"github_remaining":"2341","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:17AD05A:1BD129F:6AB92B3B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10115,"blob_sha":"89cbb711dafa5ba51e3503c53a2c97b448c089a7","priority":0}],"documents":[{"path":"README.md","size":10115,"blob_sha":"89cbb711dafa5ba51e3503c53a2c97b448c089a7","priority":0,"status":200,"text":"<img src=\"https://cosmic-cortex.github.io/modAL/img/modAL_b.png\" alt=\"modAL\" style=\"width: 400px;\">\n\nModular Active Learning framework for Python3\n\n[![travis-ci-master](https://travis-ci.org/cosmic-cortex/modAL.svg?branch=master)](https://travis-ci.org/cosmic-cortex/modAL) [![codecov-master](https://codecov.io/gh/cosmic-cortex/modAL/branch/master/graph/badge.svg)](https://codecov.io/gh/cosmic-cortex/modAL) [![readthedocs](https://readthedocs.org/projects/modal-python/badge/?version=latest)](http://modal-python.readthedocs.io/en/latest/?badge=latest)\n\n## Page contents\n- [Introduction](#introduction)  \n- [Active learning from bird's-eye view](#active-learning)  \n- [modAL in action](#modAL-in-action)\n  - [From zero to one in a few lines of code](#initialization)  \n  - [Replacing parts quickly](#replacing-parts)  \n  - [Replacing parts with your own solutions](#replacing-parts-with-your-own-solutions)  \n  - [An example with active regression](#active-regression)\n  - [Additional examples](#additional-examples)  \n- [Installation](#installation)  \n- [Documentation](#documentation)  \n- [About the developer](#about-the-developer)\n\n# Introduction<a name=\"introduction\"><\/a>\nmodAL is an active learning framework for Python3, designed with *modularity, flexibility* and *extensibility* in mind. Built on top of scikit-learn, it allows you to rapidly create active learning workflows with nearly complete freedom. What is more, you can easily replace parts with your custom built solutions, allowing you to design novel algorithms with ease.\n\n# Active learning from bird's-eye view<a name=\"active-learning\"><\/a>\nWith the recent explosion of available data, you have can have millions of unlabelled examples with a high cost to obtain labels. For instance, when trying to predict the sentiment of tweets, obtaining a training set can require immense manual labour. But worry not, active learning comes to the rescue! In general, AL is a framework allowing you to increase classification performance by intelligently querying you to label the most informative instances. To give an example, suppose that you have the following data and classifier with shaded regions signifying the classification probability.\n\n<p align=\"center\">\n  <img src=\"https://cosmic-cortex.github.io/modAL/img/motivating-example.png\" height=\"600px\" width=\"600px\"/>\n<\/p>\n\nSuppose that you can query the label of an unlabelled instance, but it costs you a lot. Which one would you choose? By querying an instance in the uncertain region, surely you obtain more information than querying by random. Active learning gives you a set of tools to handle problems like this. In general, an active learning workflow looks like the following.\n\n<p align=\"center\">\n <img src=\"https://cosmic-cortex.github.io/modAL/img/active_learning.png\"/>\n<\/p>\n\nThe key components of any workflow are the **model** you choose, the **uncertainty** measure you use and the **query** strategy you apply to request labels. With modAL, instead of choosing from a small set of built-in components, you have the freedom to seamlessly integrate scikit-learn or Keras models into your algorithm and easily tailor your custom query strategies and uncertainty measures.\n\n# modAL in action<a name=\"modAL-in-action\"><\/a>\nLet's see what modAL can do for you!\n\n## From zero to one in a few lines of code<a name=\"initialization\"><\/a>\nActive learning with a scikit-learn classifier, for instance RandomForestClassifier, can be as simple as the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.ensemble import RandomForestClassifier\n\n# initializing the learner\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    X_training=X_training, y_training=y_training\n)\n\n# query for labels\nquery_idx, query_inst = learner.query(X_pool)\n\n# ...obtaining new labels from the Oracle...\n\n# supply label for queried instance\nlearner.teach(X_pool[query_idx], y_new)\n```\n\n## Replacing parts quickly<a name=\"replacing-parts\"><\/a>\nIf you would like to use different uncertainty measures and query strategies than the default uncertainty sampling, you can either replace them with several built-in strategies or you can design your own by following a few very simple design principles. For instance, replacing the default uncertainty measure to classification entropy looks the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom modAL.uncertainty import entropy_sampling\nfrom sklearn.ensemble import RandomForestClassifier\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=entropy_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\n\n## Replacing parts with your own solutions<a name=\"replacing-parts-with-your-own-solutions\"><\/a>\nmodAL was designed to make it easy for you to implement your own query strategy. For example, implementing and using a simple random sampling strategy is as easy as the following.\n```python\nimport numpy as np\n\ndef random_sampling(classifier, X_pool):\n    n_samples = len(X_pool)\n    query_idx = np.random.choice(range(n_samples))\n    return query_idx, X_pool[query_idx]\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=random_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\nFor more details on how to implement your custom strategies, visit the page [Extending modAL](https://cosmic-cortex.github.io/modAL/Extending-modAL)!\n\n## An example with active regression<a name=\"active-regression\"><\/a>\nTo see modAL in *real* action, let's consider an active regression problem with Gaussian Processes! In this example, we shall try to learn the *noisy sine* function:\n```python\nimport numpy as np\n\nX = np.random.choice(np.linspace(0, 20, 10000), size=200, replace=False).reshape(-1, 1)\ny = np.sin(X) + np.random.normal(scale=0.3, size=X.shape)\n```\nFor active learning, we shall define a custom query strategy tailored to Gaussian processes. In a nutshell, a *query stategy* in modAL is a function taking (at least) two arguments (an estimator object and a pool of examples), outputting the index of the queried instance and the instance itself. In our case, the arguments are ```regressor``` and ```X```.\n```python\ndef GP_regression_std(regressor, X):\n    _, std = regressor.predict(X, return_std=True)\n    query_idx = np.argmax(std)\n    return query_idx, X[query_idx]\n```\nAfter setting up the query strategy and the data, the active learner can be initialized.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.gaussian_process import GaussianProcessRegressor\nfrom sklearn.gaussian_process.kernels import WhiteKernel, RBF\n\nn_initial = 5\ninitial_idx = np.random.choice(range(len(X)), size=n_initial, replace=False)\nX_training, y_training = X[initial_idx], y[initial_idx]\n\nkernel = RBF(length_scale=1.0, length_scale_bounds=(1e-2, 1e3)) \\\n         + WhiteKernel(noise_level=1, noise_level_bounds=(1e-10, 1e+1))\n\nregressor = ActiveLearner(\n    estimator=GaussianProcessRegressor(kernel=kernel),\n    query_strategy=GP_regression_std,\n    X_training=X_training.reshape(-1, 1), y_training=y_training.reshape(-1, 1)\n)\n```\nThe initial regressor is not very accurate.\n<p align=\"center\">\n  <img src=\"https://cosmic-cortex.github.io/modAL/img/gp-initial.png\">\n<\/p>\n\nThe blue band enveloping the regressor represents the standard deviation of the Gaussian process at the given point. Now we are ready to do active learning!\n```python\n# active learning\nn_queries = 10\nfor idx in range(n_queries):\n    query_idx, query_instance = regressor.query(X)\n    regressor.teach(X[query_idx].reshape(1, -1), y[query_idx].reshape(1, -1))\n```\nAfter a few queries, we can see that the prediction is much improved.\n\n<p align=\"center\">\n <img src=\"https://cosmic-cortex.github.io/modAL/img/gp-final.png\">\n<\/p>\n\n## Additional examples<a name=\"additional-examples\"><\/a>\nIncluding this, many examples are available:\n- [Pool-based sampling](https://cosmic-cortex.github.io/modAL/Pool-based-sampling)  \n- [Stream-based sampling](https://cosmic-cortex.github.io/modAL/Stream-based-sampling)  \n- [Active regression](https://cosmic-cortex.github.io/modAL/Active-regression)  \n- [Ensemble regression](https://cosmic-cortex.github.io/modAL/Ensemble-regression)  \n- [Query by committee](https://cosmic-cortex.github.io/modAL/Query-by-committee)  \n- [Bootstrapping and bagging](https://cosmic-cortex.github.io/modAL/Bootstrapping-and-bagging)  \n- [Keras integration](https://cosmic-cortex.github.io/modAL/Keras-integration)\n\n# Installation<a name=\"installation\"><\/a>\nmodAL requires\n- Python >= 3.5\n- NumPy >= 1.13\n- SciPy >= 0.18\n- scikit-learn >= 0.18\n\nYou can install modAL directly with pip:  \n```\npip install modAL\n```\nAlternatively, you can install modAL directly from source:  \n```\npip install git+https://github.com/cosmic-cortex/modAL.git\n```\n\n# Documentation<a name=\"documentation\"><\/a>\nYou can find the documentation of modAL at [https://cosmic-cortex.github.io/modAL](https://cosmic-cortex.github.io/modAL), where several tutorials and working examples are available, along with a complete API reference. For running the examples, Matplotlib >= 2.0 is recommended.\n\n# About the developer<a name=\"about-the-developer\">\nmodAL is developed by me, [Tivadar Danka](https://www.tivadardanka.com) (aka [cosmic-cortex](https://github.com/cosmic-cortex) in GitHub). I have a PhD in pure mathematics, but I fell in love with biology and machine learning right after I finished my PhD. I have changed fields and now I work in the [Bioimage Analysis and Machine Learning Group of Peter Horvath](http://group.szbk.u-szeged.hu/sysbiol/horvath-peter-lab-index.html), where I am working to develop active learning strategies for intelligent sample analysis in biology. During my work I realized that in Python, creating and prototyping active learning workflows can be made really easy and fast with scikit-learn, so I ended up developing a general framework for this. The result is modAL :) If you have any questions, requests or suggestions, you can contact me at <a href=\"mailto:85a5187a@opayq.com\">85a5187a@opayq.com<\/a>! I hope you'll find modAL useful!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1A3E:4F9CC:170E26:5D512B:6AB92B3A"},"text_sha256":"54b22e546e528dda4e0f99cb8b69f9183123fcf01836589c72e09b4a35b413eb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2340","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DF:76AED:17F5B75:1C1A13C:6AB92B3B"},"commit":{"sha":"bba6f6fd00dbb862b1e09259b78caf6cffa2e755","url":"https://github.com/modAL-python/modAL/commit/bba6f6fd00dbb862b1e09259b78caf6cffa2e755","date":"2023-06-01T12:18:23Z","author_date":"2023-06-01T12:18:23Z","committer_date":"2023-06-01T12:18:23Z","tree_sha":"186e74462731279c12230b4348ed0747594eda11","message_first_line":"numpy version fixed"},"tree_request_status":200,"tree_rate":{"github_remaining":"2339","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:1296F62:15EB107:6AB92B3C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10835,"blob_sha":"4a41633ba3b0b32113dc2ce0709ea565bfbf3710","priority":0}],"documents":[{"path":"README.md","size":10835,"blob_sha":"4a41633ba3b0b32113dc2ce0709ea565bfbf3710","priority":0,"status":200,"text":"<img src=\"https://modal-python.readthedocs.io/en/latest/_static/modAL_b.png\" alt=\"modAL\" style=\"width: 400px;\">\n\nModular Active Learning framework for Python3\n\n[![travis-ci-master](https://travis-ci.org/modAL-python/modAL.svg?branch=master)](https://travis-ci.org/modAL-python/modAL) [![codecov-master](https://codecov.io/gh/modAL-python/modAL/branch/master/graph/badge.svg)](https://codecov.io/gh/modAL-python/modAL) [![readthedocs](https://readthedocs.org/projects/modal-python/badge/?version=latest)](http://modal-python.readthedocs.io/en/latest/?badge=latest)\n\n## Page contents\n- [Introduction](#introduction)  \n- [Active learning from bird's-eye view](#active-learning)  \n- [modAL in action](#modAL-in-action)\n  - [From zero to one in a few lines of code](#initialization)  \n  - [Replacing parts quickly](#replacing-parts)  \n  - [Replacing parts with your own solutions](#replacing-parts-with-your-own-solutions)  \n  - [An example with active regression](#active-regression)\n  - [Additional examples](#additional-examples)  \n- [Installation](#installation)  \n- [Documentation](#documentation)  \n- [Citing](#citing)  \n- [About the developer](#about-the-developer)\n\n# Introduction<a name=\"introduction\"><\/a>\nmodAL is an active learning framework for Python3, designed with *modularity, flexibility* and *extensibility* in mind. Built on top of scikit-learn, it allows you to rapidly create active learning workflows with nearly complete freedom. What is more, you can easily replace parts with your custom built solutions, allowing you to design novel algorithms with ease.\n\n# Active learning from bird's-eye view<a name=\"active-learning\"><\/a>\nWith the recent explosion of available data, you have can have millions of unlabelled examples with a high cost to obtain labels. For instance, when trying to predict the sentiment of tweets, obtaining a training set can require immense manual labour. But worry not, active learning comes to the rescue! In general, AL is a framework allowing you to increase classification performance by intelligently querying you to label the most informative instances. To give an example, suppose that you have the following data and classifier with shaded regions signifying the classification probability.\n\n<p align=\"center\">\n  <img src=\"https://modal-python.readthedocs.io/en/latest/_images/motivating-example.png\" height=\"600px\" width=\"600px\"/>\n<\/p>\n\nSuppose that you can query the label of an unlabelled instance, but it costs you a lot. Which one would you choose? By querying an instance in the uncertain region, surely you obtain more information than querying by random. Active learning gives you a set of tools to handle problems like this. In general, an active learning workflow looks like the following.\n\n<p align=\"center\">\n <img src=\"https://modal-python.readthedocs.io/en/latest/_images/active-learning.png\"/>\n<\/p>\n\nThe key components of any workflow are the **model** you choose, the **uncertainty** measure you use and the **query** strategy you apply to request labels. With modAL, instead of choosing from a small set of built-in components, you have the freedom to seamlessly integrate scikit-learn or Keras models into your algorithm and easily tailor your custom query strategies and uncertainty measures.\n\n# modAL in action<a name=\"modAL-in-action\"><\/a>\nLet's see what modAL can do for you!\n\n## From zero to one in a few lines of code<a name=\"initialization\"><\/a>\nActive learning with a scikit-learn classifier, for instance RandomForestClassifier, can be as simple as the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.ensemble import RandomForestClassifier\n\n# initializing the learner\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    X_training=X_training, y_training=y_training\n)\n\n# query for labels\nquery_idx, query_inst = learner.query(X_pool)\n\n# ...obtaining new labels from the Oracle...\n\n# supply label for queried instance\nlearner.teach(X_pool[query_idx], y_new)\n```\n\n## Replacing parts quickly<a name=\"replacing-parts\"><\/a>\nIf you would like to use different uncertainty measures and query strategies than the default uncertainty sampling, you can either replace them with several built-in strategies or you can design your own by following a few very simple design principles. For instance, replacing the default uncertainty measure to classification entropy looks the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom modAL.uncertainty import entropy_sampling\nfrom sklearn.ensemble import RandomForestClassifier\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=entropy_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\n\n## Replacing parts with your own solutions<a name=\"replacing-parts-with-your-own-solutions\"><\/a>\nmodAL was designed to make it easy for you to implement your own query strategy. For example, implementing and using a simple random sampling strategy is as easy as the following.\n```python\nimport numpy as np\n\ndef random_sampling(classifier, X_pool):\n    n_samples = len(X_pool)\n    query_idx = np.random.choice(range(n_samples))\n    return query_idx, X_pool[query_idx]\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=random_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\nFor more details on how to implement your custom strategies, visit the page [Extending modAL](https://modal-python.readthedocs.io/en/latest/content/overview/Extending-modAL.html)!\n\n## An example with active regression<a name=\"active-regression\"><\/a>\nTo see modAL in *real* action, let's consider an active regression problem with Gaussian Processes! In this example, we shall try to learn the *noisy sine* function:\n```python\nimport numpy as np\n\nX = np.random.choice(np.linspace(0, 20, 10000), size=200, replace=False).reshape(-1, 1)\ny = np.sin(X) + np.random.normal(scale=0.3, size=X.shape)\n```\nFor active learning, we shall define a custom query strategy tailored to Gaussian processes. In a nutshell, a *query stategy* in modAL is a function taking (at least) two arguments (an estimator object and a pool of examples), outputting the index of the queried instance. In our case, the arguments are ```regressor``` and ```X```.\n```python\ndef GP_regression_std(regressor, X):\n    _, std = regressor.predict(X, return_std=True)\n    return np.argmax(std)\n```\nAfter setting up the query strategy and the data, the active learner can be initialized.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.gaussian_process import GaussianProcessRegressor\nfrom sklearn.gaussian_process.kernels import WhiteKernel, RBF\n\nn_initial = 5\ninitial_idx = np.random.choice(range(len(X)), size=n_initial, replace=False)\nX_training, y_training = X[initial_idx], y[initial_idx]\n\nkernel = RBF(length_scale=1.0, length_scale_bounds=(1e-2, 1e3)) \\\n         + WhiteKernel(noise_level=1, noise_level_bounds=(1e-10, 1e+1))\n\nregressor = ActiveLearner(\n    estimator=GaussianProcessRegressor(kernel=kernel),\n    query_strategy=GP_regression_std,\n    X_training=X_training.reshape(-1, 1), y_training=y_training.reshape(-1, 1)\n)\n```\nThe initial regressor is not very accurate.\n<p align=\"center\">\n  <img src=\"https://modal-python.readthedocs.io/en/latest/_images/gp-initial.png\">\n<\/p>\n\nThe blue band enveloping the regressor represents the standard deviation of the Gaussian process at the given point. Now we are ready to do active learning!\n```python\n# active learning\nn_queries = 10\nfor idx in range(n_queries):\n    query_idx, query_instance = regressor.query(X)\n    regressor.teach(X[query_idx].reshape(1, -1), y[query_idx].reshape(1, -1))\n```\nAfter a few queries, we can see that the prediction is much improved.\n\n<p align=\"center\">\n <img src=\"https://modal-python.readthedocs.io/en/latest/_images/gp-final.png\">\n<\/p>\n\n## Additional examples<a name=\"additional-examples\"><\/a>\nIncluding this, many examples are available:\n- [Pool-based sampling](https://modal-python.readthedocs.io/en/latest/content/examples/pool-based_sampling.html)  \n- [Stream-based sampling](https://modal-python.readthedocs.io/en/latest/content/examples/stream-based_sampling.html)  \n- [Active regression](https://modal-python.readthedocs.io/en/latest/content/examples/active_regression.html)  \n- [Ensemble regression](https://modal-python.readthedocs.io/en/latest/content/examples/ensemble_regression.html)  \n- [Bayesian optimization](https://modal-python.readthedocs.io/en/latest/content/examples/bayesian_optimization.html)  \n- [Query by committee](https://modal-python.readthedocs.io/en/latest/content/examples/query_by_committee.html)  \n- [Bootstrapping and bagging](https://modal-python.readthedocs.io/en/latest/content/examples/bootstrapping_and_bagging.html)  \n- [Keras integration](https://modal-python.readthedocs.io/en/latest/content/examples/Keras_integration.html)\n\n# Installation<a name=\"installation\"><\/a>\nmodAL requires\n- Python >= 3.5\n- NumPy >= 1.13\n- SciPy >= 0.18\n- scikit-learn >= 0.18\n\nYou can install modAL directly with pip:  \n```\npip install modAL-python\n```\nAlternatively, you can install modAL directly from source:  \n```\npip install git+https://github.com/modAL-python/modAL.git\n```\n\n# Documentation<a name=\"documentation\"><\/a>\nYou can find the documentation of modAL at [https://modAL-python.github.io](https://modAL-python.github.io), where several tutorials and working examples are available, along with a complete API reference. For running the examples, Matplotlib >= 2.0 is recommended.\n\n# Citing<a name=\"citing\"><\/a>\nIf you use modAL in your projects, you can cite it as\n```\n@article{modAL2018,\n    title={mod{AL}: {A} modular active learning framework for {P}ython},\n    author={Tivadar Danka and Peter Horvath},\n    url={https://github.com/modAL-python/modAL},\n    note={available on arXiv at \\url{https://arxiv.org/abs/1805.00979}}\n}\n```\n\n# About the developer<a name=\"about-the-developer\">\nmodAL is developed by me, [Tivadar Danka](https://www.tivadardanka.com) (aka [cosmic-cortex](https://github.com/cosmic-cortex) in GitHub). I have a PhD in pure mathematics, but I fell in love with biology and machine learning right after I finished my PhD. I have changed fields and now I work in the [Bioimage Analysis and Machine Learning Group of Peter Horvath](http://group.szbk.u-szeged.hu/sysbiol/horvath-peter-lab-index.html), where I am working to develop active learning strategies for intelligent sample analysis in biology. During my work I realized that in Python, creating and prototyping active learning workflows can be made really easy and fast with scikit-learn, so I ended up developing a general framework for this. The result is modAL :) If you have any questions, requests or suggestions, you can contact me at <a href=\"mailto:85a5187a@opayq.com\">85a5187a@opayq.com<\/a>! I hope you'll find modAL useful!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8AA6:3BB77:17A6E8:5DEDF3:6AB92B3C"},"text_sha256":"6b5dd180d7b723cc733c834b072acc1d05cecabad815178d18670e82617713a5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"JasonKessler/scattertext","input_row":{"repository":"JasonKessler/scattertext","url":"https://github.com/JasonKessler/scattertext","name":"scattertext","owner":"JasonKessler","description":"Beautiful visualizations of how language differs among document types.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2343,"issues":103,"created_at":"2016-07-21T01:47:12Z","updated_at":"2026-09-11T02:38:20Z","first_commit_at":"2016-07-21T01:47:13Z","last_commit_at":"2026-07-04T21:25:11Z","activity_months":119.44,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:05.130Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"JasonKessler/scattertext","visibility":"public","created_at":"2016-07-21T01:47:12Z","updated_at":"2026-09-11T02:38:20Z","private":false,"fork":false,"archived":false,"stargazers_count":2343,"open_issues_count":23,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2338","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:17F823A:1C1BD40:6AB92B3D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2337","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:180A528:1C2EBFD:6AB92B3D"},"commit":{"sha":"99aad97bb204dabb3be796e505c63b08600dc896","url":"https://github.com/JasonKessler/scattertext/commit/99aad97bb204dabb3be796e505c63b08600dc896","date":"2018-05-16T19:37:58Z","author_date":"2018-05-16T19:37:57Z","committer_date":"2018-05-16T19:37:58Z","tree_sha":"dcc4a23e8c07b661f35686700c65c959fa38550e","message_first_line":"Adding docs, and fixing setup.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"2336","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17CC15A:1BF0193:6AB92B3D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":67977,"blob_sha":"9021daef7ef750d28d448263c6f107389e9b0d8b","priority":0},{"path":"docs/_modules/scattertext/AutoTermSelector.html","size":12866,"blob_sha":"b4adbe36d88c85ea94b513930d2367fd9b5dbd2b","priority":1},{"path":"docs/_modules/scattertext/termcompaction/CompactTerms.html","size":15623,"blob_sha":"8e73c26db1da62924f4248dedab2b1305f077891","priority":1},{"path":"docs/_modules/scattertext/termsignificance/TermSignificance.html","size":3935,"blob_sha":"a1cdf551875d1022570899e4320e279d11c0cb38","priority":1},{"path":"docs/_sources/scattertext.termscoring.rst.txt","size":1485,"blob_sha":"511c2cf7b885c5e5f781d5551f277f6febd8fc7e","priority":1},{"path":"docs/_sources/scattertext.termsignificance.rst.txt","size":1531,"blob_sha":"c9cca8b4329184861c1dd54bd3e7153484db1874","priority":1},{"path":"docs/scattertext.termscoring.html","size":40145,"blob_sha":"b8a9c02a670890dba022fda1f34cf945a63b870c","priority":1},{"path":"docs/scattertext.termsignificance.html","size":32903,"blob_sha":"21a808f0b3868d1c2fab7e4ea3b3bf2b2c1652f0","priority":1},{"path":"docs/_modules/scattertext/termscoring/BM25Difference.html","size":16978,"blob_sha":"fcdb267156a6cd3db79a76cf747eaf1043a52fc9","priority":2},{"path":"docs/_modules/scattertext/termscoring/CornerScore.html","size":9817,"blob_sha":"4c843122eba22b53bdbb770d60231bd051209e1d","priority":2},{"path":"docs/_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html","size":10782,"blob_sha":"ccd0ecdefa0365ab297b3be0492833d084834266","priority":2},{"path":"docs/_modules/scattertext/termscoring/OLSUngnarStyle.html","size":8242,"blob_sha":"fd6a94d827e40e8b1f6c91c002a0cdb1469e5b6c","priority":2},{"path":"docs/_modules/scattertext/termscoring/RankDifference.html","size":6508,"blob_sha":"7add656e01706878a0a91d39d0d61d47a6960338","priority":2},{"path":"docs/_modules/scattertext/termscoring/ScaledFScore.html","size":52375,"blob_sha":"a26ccb2ceb4296e4b36110997f4969e080e67aa0","priority":2},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioAddOne.html","size":14071,"blob_sha":"96d1f98baa992514352e29a5bdf0edf894eb17bf","priority":2},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html","size":17260,"blob_sha":"f89735b14a966e55098f10f0637fe72349c175c0","priority":2},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html","size":17131,"blob_sha":"dd8ba0a622b421a81aea6920c3cae9a56414e24d","priority":2},{"path":"docs/_modules/scattertext/termsignificance/ScaledFScoreSignificance.html","size":9285,"blob_sha":"d144baf3df8fb41b8187173719c94bebb9d993e2","priority":2}],"documents":[{"path":"README.md","size":67977,"blob_sha":"9021daef7ef750d28d448263c6f107389e9b0d8b","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/JasonKessler/scattertext.svg?branch=master)](https://travis-ci.org/JasonKessler/scattertext)\n[![Conda Install](https://anaconda.org/ioam/holoviews/badges/installer/conda.svg)](https://anaconda.org/conda-forge/scattertext)\n[![Gitter Chat](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/scattertext/Lobby)\n[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?style=social&label=Follow)](https://twitter.com/jasonkessler)\n[![PyPI](https://img.shields.io/pypi/v/scattertext.svg)]()\n\n# Scattertext 0.0.2.27.1\n### Updates\n\nFixed bug [#31](https://github.com/JasonKessler/scattertext/issues/31), enabling context to show when metadata value is \nclicked.  \n\nEnabled display of terms in topic models in explorer, along with the the display of \ncustomized topic models.  Please see [Visualizing topic models](#visualizing-topic-models) for an\noverview of the additions.\n\nRemoved pkg_resources from Phrasemachine, corrected demo_phrase_machine.py \n\nNow compatible with Gensim 3.4.0.\n\nAdded characteristic explorer, `produce_characteristic_explorer`, to plot terms with their characteristic scores on \nthe x-axis and their class-association scores on the y-axis. See [Ordering Terms by Corpus Characteristicness](#ordering-terms-by-corpus-characteristicness) for more details.\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Citation](#citation)\n- [Overview](#overview)\n- [Tutorial](#tutorial)\n    - [Help! I don't know Python but I still want to use Scattertext](#help-i-dont-know-python-but-i-still-want-to-use-scattertext)\n    - [Using Scattertext as a text analysis library: finding characteristic terms and their associations](#using-scattertext-as-a-text-analysis-library-finding-characteristic-terms-and-their-associations)\n    - [Visualizing term associations](#visualizing-term-associations)\n    - [Visualizing Empath topics and categories](#visualizing-empath-topics-and-categories)\n    - [Ordering Terms by Corpus Characteristicness](#ordering-terms-by-corpus-characteristicness)\n- [Understanding Scaled F-Score](#understanding-scaled-f-score)\n- [Advanced Uses](#advanced-uses)\n    - [Visualizing differences based on only term frequencies](#visualizing-differences-based-on-only-term-frequencies)\n    - [Visualizing query-based categorical differences](#visualizing-query-based-categorical-differences)\n    - [Visualizing any kind of term score](#visualizing-any-kind-of-term-score)\n    - [Custom term positions](#custom-term-positions)\n    - [Emoji analysis](#emoji-analysis)\n    - [Visualizing scikit-learn text classification weights](#visualizing-scikit-learn-text-classification-weights)\n    - [Creating lexicalized semiotic squares](#creating-lexicalized-semiotic-squares)\n    - [Visualizing topic models](#visualizing-topic-models)\n    - [Creating T-SNE-style word embedding projection plots](#creating-T-SNE-style-word-embedding-projection-plots)\n- [Examples](#examples)\n- [A note on chart layout](#a-note-on-chart-layout)\n- [What's new](#whats-new)\n- [Sources](#sources)\n\nA tool for finding distinguishing terms in small-to-medium-sized\ncorpora, and presenting them in a sexy, interactive scatter plot with \nnon-overlapping term labels.  Exploratory data analysis just \ngot more fun.\n\nFeel free to use the Gitter community [gitter.im/scattertext](https://gitter.im/scattertext/Lobby) for help or to discuss the project.   \n\n[![Conventions-Visualization.html](https://jasonkessler.github.io/2012conventions0.0.2.2.png)](https://jasonkessler.github.io/Conventions-Visualization.html)\n\n## Installation \nInstall Python 3.4 or higher and run:\n\n`$ pip install scattertext`\n\nIf you cannot (or don't want to) install spaCy, substitute `nlp = spacy.en.English()` lines with\n`nlp = scattertext.WhitespaceNLP.whitespace_nlp`.  Note, this is not compatible \nwith `word_similarity_explorer`, and the tokenization and sentence boundary detection \ncapabilities will be low-performance regular expressions. See `demo_without_spacy.py`\nfor an example. \n\nIt is recommended you install `jieba`, `spacy`, `empath`, `gensim` and `umap-learn` in order to \ntake full advantage of Scattertext. \n\nPython 2.7 support is experimental.  Many things will break.\n\nThe HTML outputs look best in Chrome and Safari.\n\n## Citation\nJason S. Kessler. Scattertext: a Browser-Based Tool for Visualizing how Corpora Differ. ACL System Demonstrations. 2017.\n\nLink to preprint: [arxiv.org/abs/1703.00565](https://arxiv.org/abs/1703.00565)\n\n```\n@article{kessler2017scattertext,\n  author    = {Kessler, Jason S.},\n  title     = {Scattertext: a Browser-Based Tool for Visualizing how Corpora Differ},\n  booktitle = {Proceedings of ACL-2017 System Demonstrations},\n  year      = {2017},\n  address   = {Vancouver, Canada},\n  publisher = {Association for Computational Linguistics},\n}\n```\n## Overview\n \nThis is a tool that's intended for visualizing what words and phrases\n are more characteristic of a category than others.  \n \nConsider the example at the top of the page.\n\nLooking at this seem overwhelming.  In fact, it's a relatively simple visualization of word use \nduring the 2012 political convention.  Each dot corresponds to a word or phrase mentioned by Republicans or Democrats\nduring their conventions.  The closer a dot is to the top of the plot, the more frequently it was used by \nDemocrats.  The further right a  dot, the more that word or phrase was used by Republicans.  Words frequently\nused by both parties, like \"of\" and \"the\" and even \"Mitt\" tend to occur in the upper-right-hand corner. Although very low \nfrequency words have been hidden to preserve computing resources, a word that neither party used, like \"giraffe\" \n would be in the bottom-left-hand corner.  \n \nThe interesting things happen close to the upper-left and lower-right corners.  In the upper-left corner, \nwords like \"auto\" (as in auto bailout) and \"millionaires\" are frequently used by Democrats but infrequently or never used \nby Republicans.  Likewise, terms frequently used by Republicans and infrequently by Democrats occupy the\n bottom-right corner.  These include \"big government\" and \"olympics\", referring to the Salt Lake City Olympics in which \n Gov. Romney was involved.\n \nTerms are colored by their association.  Those that are more associated with Democrats are blue, and those \nmore associated with Republicans red.  \n\nTerms (only unigrams for now) that are most characteristic of the both sets of documents are displayed\n on the far-right of the visualization.\n   \nThe inspiration for this visualization came from Dataclysm (Rudder, 2014).\n  \nScattertext is designed to help you build these graphs and efficiently label points on them. \n\nThe documentation (including this readme) is a work in \nprogress.  Please see the tutorial below as well as the [PyData 2017 Tutorial](https://github.com/JasonKessler/Scattertext-PyData).\n\nPoking around the code and tests should give you a good idea of how things work. \n\nThe library covers some novel and effective term-importance formulas, including **Scaled F-Score**.\n\n## Tutorial\n\n### Help! I don't know Python but I still want to use Scattertext.\nWhile you should learn Python fully use Scattertext, I've put some of the basic \nfunctionality in a commandline tool.  The tool is installed when you follow the procedure layed out\nabove.\n\nRun `$ scattertext --help` from the commandline to see the full usage information.  Here's a quick example of\nhow to use vanilla Scattertext on a CSV file.  The file needs to have at least two columns,\none containing the text to be analyzed, and another containing the category.  In the example CSV below,\nthe columns are text and party, respectively.\n\nThe example below processes the CSV file, and the resulting HTML visualization into cli_demo.html.\n\nNote, the parameter `--minimum_term_frequency=8` omit terms that occur less than 8 \ntimes, and `--regex_parser` indicates a simple regular expression parser should \n be used in place of spaCy. The flag `--one_use_per_doc` indicates that term frequency\n  should be calculated by only counting no more than one occurrence of a term in a document. \n  \nIf you'd like to parse non-English text, you can use the `--spacy_language_model` argument to configure which\nspaCy language model the tool will use.  The default is 'en' and you can see the others available at \n[https://spacy.io/docs/api/language-models](https://spacy.io/docs/api/language-models).\n\n```bash\n$ curl -s https://cdn.rawgit.com/JasonKessler/scattertext/master/scattertext/data/political_data.csv | head -2\nparty,speaker,text\ndemocrat,BARACK OBAMA,\"Thank you. Thank you. Thank you. Thank you so much.Thank you.Thank you so much. Thank you. Thank you very much, everybody. Thank you.\n$\n$ scattertext --datafile=https://cdn.rawgit.com/JasonKessler/scattertext/master/scattertext/data/political_data.csv \\\n> --text_column=text --category_column=party --metadata_column=speaker --positive_category=democrat \\\n> --category_display_name=Democratic --not_category_display_name=Republican --minimum_term_frequency=8 \\\n> --one_use_per_doc --regex_parser --outputfile=cli_demo.html\n```\n\n\n### Using Scattertext as a text analysis library: finding characteristic terms and their associations\n\nThe following code creates a stand-alone HTML file that analyzes words \nused by Democrats and Republicans in the 2012 party conventions, and outputs some notable\n term associations.\n \nFirst, import Scattertext and spaCy.\n\n```pydocstring\n>>> import scattertext as st\n>>> import spacy\n>>> from pprint import pprint\n```\n\nNext, assemble the data you want to analyze into a Pandas data frame. It should have\nat least two columns, the text you'd like to analyze, and the category you'd like to \nstudy. Here, the `text` column contains convention speeches while the `party` column\n contains the party of the speaker.  We'll eventually use the `speaker` column\n to label snippets in the visualization.\n\n```pydocstring\n>>> convention_df = st.SampleCorpora.ConventionData2012.get_data()  \n>>> convention_df.iloc[0]\nparty                                               democrat\nspeaker                                         BARACK OBAMA\ntext       Thank you. Thank you. Thank you. Thank you so ...\nName: 0, dtype: object\n```\n\nTurn the data frame into a Scattertext Corpus to begin analyzing it.  To look for differences \nin parties, set the `category_col` parameter to `'party'`, and use the speeches, \npresent in the `text` column, as the texts to analyze by setting the `text` col \nparameter.  Finally, pass a spaCy model in to the `nlp` argument and call `build()` to construct the corpus.\n \n```pydocstring\n# Turn it into a Scattertext Corpus \n>>> nlp = spacy.load('en')\n>>> corpus = st.CorpusFromPandas(convention_df, \n...                              category_col='party', \n...                              text_col='text',\n...                              nlp=nlp).build()\n```\n\nLet's see characteristic terms in the corpus, and terms that are most associated Democrats and \nRepublicans.  See slides \n[52](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/52) to [59](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/59) of the [Turning Unstructured Content ot Kernels of Ideas](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/) talk for more details on these approaches. \n\nHere are the terms that differentiate the corpus from a general English corpus. \n```pydocstring\n>>> print(list(corpus.get_scaled_f_scores_vs_background().index[:10]))\n['obama',\n 'romney',\n 'barack',\n 'mitt',\n 'obamacare',\n 'biden',\n 'romneys',\n 'hardworking',\n 'bailouts',\n 'autoworkers']\n```\n\nHere are the terms that are most associated with Democrats: \n\n```pydocstring\n>>> term_freq_df = corpus.get_term_freq_df()\n>>> term_freq_df['Democratic Score'] = \\\n...  corpus.get_scaled_f_scores('democrat')\n>>> pprint(list(term_freq_df.sort_values(by='Democratic Score', \n...                                      ascending=False).index[:10]))\n['auto',\n 'america forward',\n 'auto industry',\n 'insurance companies',\n 'pell',\n 'last week',\n 'pell grants',\n \"women 's\",\n 'platform',\n 'millionaires']\n```\n\nAnd Republicans:\n```pydocstring\n>>> term_freq_df['Republican Score'] = \\\n...  corpus.get_scaled_f_scores('republican')\n>>> pprint(list(term_freq_df.sort_values(by='Democratic Score', \n...                                      ascending=False).index[:10]))\n['big government',\n \"n't build\",\n 'mitt was',\n 'the constitution',\n 'he wanted',\n 'hands that',\n 'of mitt',\n '16 trillion',\n 'turned around',\n 'in florida']\n```\n\n### Visualizing term associations\n\nNow, let's write the scatter plot a stand-alone HTML file.  We'll make the y-axis category  \"democrat\", and name\nthe category \"Democrat\" with a capital \"D\" for presentation \npurposes.  We'll name the other category \"Republican\" with a capital \"R\".  All documents in the corpus without \nthe category \"democrat\" will be considered Republican. We set the width of the visualization in pixels, and label \neach excerpt with the speaker using the `metadata` parameter.  Finally, we write the visualization to an HTML file.\n \n```pydocstring\n>>> html = st.produce_scattertext_explorer(corpus,\n...          category='democrat',\n...          category_name='Democratic',\n...          not_category_name='Republican',\n...          width_in_pixels=1000,\n...          metadata=convention_df['speaker'])\n>>> open(\"Convention-Visualization.html\", 'wb').write(html.encode('utf-8'))\n```\nBelow is what the webpage looks like.  Click it and wait a few minutes for the interactive version.\n[![Conventions-Visualization.html](https://jasonkessler.github.io/2012conventions0.0.2.2.png)](https://jasonkessler.github.io/Conventions-Visualization.html)\n\n### Visualizing Empath topics and categories\n\nIn order to visualize Empath (Fast 2016) topics and categories instead of terms, we'll need to \ncreate a `Corpus` of extracted topics and categories rather than unigrams and \nbigrams. To do so, use the `FeatsOnlyFromEmpath` feature extractor.  See the source code for \nexamples of how to make your own.\n\nWhen creating the visualization, pass the `use_non_text_features=True` argument into\n `produce_scattertext_explorer`.  This will instruct it to use the labeled Empath \n topics and categories instead of looking for terms.  Since the documents returned\n when a topic or category label is clicked will be in order of the document-level\n category-association strength, setting `use_full_doc=True` makes sense, unless you have\n enormous documents.  Otherwise, the first 300 characters will be shown.\n \n(New in 0.0.26). Ensure you include `topic_model_term_lists=feat_builder.get_top_model_term_lists()`\nin `produce_scattertext_explorer` to ensure it bolds passages of snippets that match the \ntopic model.\n \n```pydocstring\n>>> feat_builder = st.FeatsFromOnlyEmpath()\n>>> empath_corpus = st.CorpusFromParsedDocuments(convention_df,\n...                                              category_col='party',\n...                                              feats_from_spacy_doc=feat_builder,\n...                                              parsed_col='text').build()\n>>> html = st.produce_scattertext_explorer(empath_corpus,\n...                                        category='democrat',\n...                                        category_name='Democratic',\n...                                        not_category_name='Republican',\n...                                        width_in_pixels=1000,\n...                                        metadata=convention_df['speaker'],\n...                                        use_non_text_features=True,\n...                                        use_full_doc=True,\n...                                        topic_model_term_lists=feat_builder.get_top_model_term_lists())\n>>> open(\"Convention-Visualization-Empath.html\", 'wb').write(html.encode('utf-8'))\n``` \n\n\n[![Convention-Visualization-Empath.html](https://jasonkessler.github.io/Convention-Visualization-Empath.png)](https://jasonkessler.github.io/Convention-Visualization-Empath.html)\n\n### Ordering Terms by Corpus Characteristicness\nOften the terms of most interest are ones that are characteristic to the corpus as a whole.  These are terms which occur \nfrequently in all sets of documents being studied, but relatively infrequent compared to general term frequencies.\n\nWe can produce a plot with a characteristic score on the x-axis and class-association scores on the y-axis using the \nfunction `produce_characteristic_explorer`.  \n\n```python\nimport scattertext as st\n\ncorpus = (st.CorpusFromPandas(st.SampleCorpora.ConventionData2012.get_data(),\n                              category_col='party',\n                              text_col='text',\n                              nlp=st.whitespace_nlp_with_sentences)\n          .build()\n          .get_unigram_corpus()\n          .compact(st.ClassPercentageCompactor(term_count=2,\n                                               term_ranker=st.OncePerDocFrequencyRanker)))\nhtml = st.produce_characteristic_explorer(\n\tcorpus,\n\tcategory='democrat',\n\tcategory_name='Democratic',\n\tnot_category_name='Republican',\n\tmetadata=corpus.get_df()['speaker']\n)\nopen('demo_characteristic_chart.html', 'wb').write(html.encode('utf-8'))\n```\n\n[![demo_characteristic_chart.html](https://jasonkessler.github.io/demo_characteristic_chart.png)](https://jasonkessler.github.io/demo_characteristic_chart.html)\n\n\n### Understanding Scaled F-Score\n\n![Scaled F-Score Explanation 1](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaled_f_score1.png)\n\n![Scaled F-Score Explanation 2](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaled_f_score2.png)\n\n```python\nhtml = produce_frequency_explorer(corpus,\n                                  category='democrat',\n                                  category_name='Democratic',\n                                  not_category_name='Republican',\n                                  minimum_term_frequency=5,\n                                  width_in_pixels=1000,\n                                  term_scorer=ScaledFScorePresetsNeg1To1(beta=1, scaler_algo='normcdf'),\n                                  grey_threshold=0,\n                                  y_axis_values=[-1, 0, 1],\n                                  metadata=convention_df['speaker'])\n```\n[![Scaled F-Score Viz](https://jasonkessler.github.io/demo_scaled_f_score.html.png)](https://jasonkessler.github.io/demo_scaled_f_score.html)\n\n\n## Advanced uses\n\n### Visualizing differences based on only term frequencies\nOccasionally, only term frequency statistics are available. This may happen in the case of very large, \nlost, or proprietary data sets. `TermCategoryFrequencies` is a corpus representation,that can accept this \nsort of data, along with any categorized documents that happen to be available.\n\nLet use the [Corpus of Contemporary American English](https://corpus.byu.edu/coca/) as an example.  \nWe'll construct a visualization\nto analyze the difference between spoken American English and English that occurs in fiction.\n\n```python\ndf = (pd.read_excel('https://www.wordfrequency.info/files/genres_sample.xls')\n\t      .dropna()\n\t      .set_index('lemma')[['SPOKEN', 'FICTION']]\n\t      .iloc[:1000])\n'''\n>>> df.head()\n          SPOKEN    FICTION\nlemma                      \nthe    3859682.0  4092394.0\nI      1346545.0  1382716.0\nthey   609735.0   352405.0 \nshe    212920.0   798208.0 \nwould  233766.0   229865.0 \n'''\t      \n```\n\nTransforming this into a visualization is extremely easy. Just pass a dataframe indexed on \nterms with columns indicating category-counts into the the `TermCategoryFrequencies` constructor.\n\n```python\nterm_cat_freq = st.TermCategoryFrequencies(df)\n``` \n\nAnd call `produce_scattertext_explorer` normally:\n\n```python\nhtml = st.produce_scattertext_explorer(\n\tterm_cat_freq,\n\tcategory='SPOKEN',\n\tcategory_name='Spoken',\n\tnot_category_name='Fiction',\n)\n```\n\n\n[![demo_category_frequencies.html](https://jasonkessler.github.io/demo_category_frequencies.png)](https://jasonkessler.github.io/demo_category_frequencies.html)\n\nIf you'd like to incorporate some documents into the visualization, you can add them into to the\n`TermCategoyFrequencies` object.\n\nFirst, let's extract some example Fiction and Spoken documents from the sample COCA corpus.\n\n```python\nimport requests, zipfile, io\ncoca_sample_url = 'http://corpus.byu.edu/cocatext/samples/text.zip'\nzip_file = zipfile.ZipFile(io.BytesIO(requests.get(coca_sample_url).content))\n\ndocument_df = pd.DataFrame(\n\t[{'text': zip_file.open(fn).read().decode('utf-8'),\n\t  'category': 'SPOKEN'}\n\t for fn in zip_file.filelist if fn.filename.startswith('w_spok')][:2]\n\t+ [{'text': zip_file.open(fn).read().decode('utf-8'),\n\t    'category': 'FICTION'}\n\t   for fn in zip_file.filelist if fn.filename.startswith('w_fic')][:2])\n```   \n\nAnd we'll pass the `documents_df` dataframe into `TermCategoryFrequencies` via the `document_category_df` \nparameter.  Ensure the dataframe has two columns, 'text' and 'category'.  Afterward, we can\ncall `produce_scattertext_explorer` (or your visualization function of choice) normally.\n\n```python\ndoc_term_cat_freq = st.TermCategoryFrequencies(df, document_category_df=document_df)\n\nhtml = st.produce_scattertext_explorer(\n\tdoc_term_cat_freq,\n\tcategory='SPOKEN',\n\tcategory_name='Spoken',\n\tnot_category_name='Fiction',\n)\n```\n\n### Visualizing query-based categorical differences  \nWord representations have recently become a hot topic in NLP.  While lots of work has been done visualizing \nhow terms relate to one another given their scores \n(e.g., [http://projector.tensorflow.org/](http://projector.tensorflow.org/)),\nnone to my knowledge has been done visualizing how we can use these to examine how \ndocument categories differ. \n\nIn this example given a query term, \"jobs\", we can see how Republicans and \nDemocrats talk about it differently.\n\nIn this configuration of Scattertext, words are colored by their similarity to a query phrase.  \nThis is done using [spaCy](https://spacy.io/)-provided GloVe word vectors (trained on \nthe Common Crawl corpus). The cosine distance between vectors is used, \nwith mean vectors used for phrases.\n\nThe calculation of the most similar terms associated with each category is a simple heuristic.  First, \nsets of terms closely associated with a category are found. Second, these terms are ranked \nbased on their similarity to the query, and the top rank terms are displayed to the right of the \nscatterplot.  \n\nA term is considered associated if its p-value is less than 0.05.  P-values are \ndetermined using Monroe et al. (2008)'s difference in the weighted log-odds-ratios with an \nuninformative Dirichlet prior.  This is the only model-based method discussed in Monroe et al. \nthat does not rely on a large, in-domain background corpus. Since we are scoring \nbigrams in addition to the unigrams scored by Monroe, the size of the corpus would have to be larger \nto have high enough bigram counts for proper penalization. This function \nrelies the Dirichlet distribution's parameter alpha, a vector, which is uniformly set to 0.01.\n\nHere is the code  to produce such a visualization. \n \n```pydocstring\n>>> from scattertext import word_similarity_explorer\n>>> html = word_similarity_explorer(corpus,\n...                                 category='democrat',\n...                                 category_name='Democratic',\n...                                 not_category_name='Republican',\n...                                 target_term='jobs',\n...                                 minimum_term_frequency=5,\n...                                 pmi_threshold_coefficient=4,\n...                                 width_in_pixels=1000,\n...                                 metadata=convention_df['speaker'],\n...                                 alpha=0.01,\n...                                 max_p_val=0.05,\n...                                 save_svg_button=True)\n>>> open(\"Convention-Visualization-Jobs.html\", 'wb').write(html.encode('utf-8'))\n``` \n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/Convention-Visualization-Jobs.png)](https://jasonkessler.github.io/Convention-Visualization-Jobs.html)\n\n\n#### Developing and using bespoke word representations \n\nScattertext can interface with Gensim Word2Vec models.  For example, here's a snippet from `demo_gensim_similarity.py`\nwhich illustrates how to train and use a word2vec model on a corpus.  Note the similarities produced \nreflect quirks of the corpus, e.g., \"8\" tends to refer to the 8% unemployment rate at the time of the\nconvention.\n\n```python\nimport spacy\nfrom gensim.models import word2vec\nfrom scattertext import SampleCorpora, word_similarity_explorer_gensim, Word2VecFromParsedCorpus\nfrom scattertext.CorpusFromParsedDocuments import CorpusFromParsedDocuments\nnlp = spacy.en.English()\nconvention_df = SampleCorpora.ConventionData2012.get_data()\nconvention_df['parsed'] = convention_df.text.apply(nlp)\ncorpus = CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='parsed').build()\nmodel = word2vec.Word2Vec(size=300,\n                          alpha=0.025,\n                          window=5,\n                          min_count=5,\n                          max_vocab_size=None,\n                          sample=0,\n                          seed=1,\n                          workers=1,\n                          min_alpha=0.0001,\n                          sg=1,\n                          hs=1,\n                          negative=0,\n                          cbow_mean=0,\n                          iter=1,\n                          null_word=0,\n                          trim_rule=None,\n                          sorted_vocab=1)\nhtml = word_similarity_explorer_gensim(corpus,\n                                       category='democrat',\n                                       category_name='Democratic',\n                                       not_category_name='Republican',\n                                       target_term='jobs',\n                                       minimum_term_frequency=5,\n                                       pmi_threshold_coefficient=4,\n                                       width_in_pixels=1000,\n                                       metadata=convention_df['speaker'],\n                                       word2vec=Word2VecFromParsedCorpus(corpus, model).train(),\n                                       max_p_val=0.05,\n                                       save_svg_button=True)\nopen('./demo_gensim_similarity.html', 'wb').write(html.encode('utf-8'))\n```\nHow Democrats and Republicans talked differently about \"jobs\" in their 2012 convention speeches. \n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/demo_gensim_similarity.png)](https://jasonkessler.github.io/demo_gensim_similarity.html)\n\n\n### Visualizing any kind of term score\n\nWe can use Scattertext to visualize alternative types of word scores, and ensure that 0 scores are greyed out.  Use the `sparse_explroer` function to acomplish this, and see its source code for more details.     \n\n```pydocstring\n>>> from sklearn.linear_model import Lasso\n>>> from scattertext import sparse_explorer\n>>> html = sparse_explorer(corpus,\n...                        category='democrat',\n...                        category_name='Democratic',\n...                        not_category_name='Republican',\n...                        scores = corpus.get_regression_coefs('democrat', Lasso(max_iter=10000)),\n...                        minimum_term_frequency=5,\n...                        pmi_threshold_coefficient=4,\n...                        width_in_pixels=1000,\n...                        metadata=convention_df['speaker'])\n>>> open('./Convention-Visualization-Sparse.html', 'wb').write(html.encode('utf-8'))\n```\n\n[![Convention-Visualization-Sparse.html](https://jasonkessler.github.io/Convention-Visualization-Sparse.png)](https://jasonkessler.github.io/Convention-Visualization-Sparse.html)\n\n### Custom term positions\n\nYou can also use custom term positions and axis labels.  For example, you can base terms' y-axis \npositions on a regression coefficient and their x-axis on term frequency and label the axes\n accordingly.  The one catch is that axis positions must be scaled between 0 and 1.\n\nFirst, let's define two scaling functions: `scale` to project positive values to \\[0,1\\], and \n`zero_centered_scale` project real values to \\[0,1\\], with negative values always \\<0.5, and\npositive values always \\>0.5.\n\n```pydocstring\n>>> def scale(ar):\n...     return (ar - ar.min()) / (ar.max() - ar.min())\n...\n>>> def zero_centered_scale(ar):\n...     ar[ar > 0] = scale(ar[ar > 0])\n...     ar[ar < 0] = -scale(-ar[ar < 0])\n...     return (ar + 1) / 2.\n```\n\nNext, let's compute and scale term frequencies and L2-penalized regression coefficients. We'll\nhang on to the original coefficients and allow users to view them by mousing over terms.  \n\n```pydocstring\n>>> from sklearn.linear_model import LogisticRegression\n>>> import numpy as np\n>>>\n>>> frequencies_scaled = scale(np.log(term_freq_df.sum(axis=1).values))\n>>> scores = corpus.get_logreg_coefs('democrat',\n...                                  LogisticRegression(penalty='l2', C=10, max_iter=10000, n_jobs=-1))\n>>> scores_scaled = zero_centered_scale(scores)\n```\n\nFinally, we can write the visualization. Note the use of the `x_coords` and `y_coords` \nparameters to store the respective coordinates, the `scores` and `sort_by_dist` arguments\n to register the original coefficients and use them to rank the terms in the right-hand\n list, and the `x_label` and `y_label` arguments to label axes.\n \n```pydocstring\n>>> html = produce_scattertext_explorer(corpus,\n...                                     category='democrat',\n...                                     category_name='Democratic',\n...                                     not_category_name='Republican',\n...                                     minimum_term_frequency=5,\n...                                     pmi_threshold_coefficient=4,\n...                                     width_in_pixels=1000,\n...                                     x_coords=frequencies_scaled,\n...                                     y_coords=scores_scaled,\n...                                     scores=scores,\n...                                     sort_by_dist=False,\n...                                     metadata=convention_df['speaker'],\n...                                     x_label='Log frequency',\n...                                     y_label='L2-penalized logistic regression coef')\n>>> open('demo_custom_coordinates.html', 'wb').write(html.encode('utf-8'))\n```\n[![demo_custom_coordinates.html](https://jasonkessler.github.io/demo_custom_coordinates.png)](https://jasonkessler.github.io/demo_custom_coordinates.html)\n\n\n### Emoji analysis\nThe Emoji analysis capability displays a chart of the category-specific distribution\nof Emoji. Let's look at a new corpus, a set of tweets.  We'll build a visualization\nshowing how men and women use emoji differently.\n\nNote: the following example is implemented in `demo_emoji.py`.\n\nFirst, we'll load the dataset and parse it using NLTK's tweet tokenizer.  Note, install NLTK\nbefore running this example.  It will take some time for the dataset to download.\n```python\nimport nltk, urllib.request, io, agefromname, zipfile\nimport scattertext as st\nimport pandas as pd\n\n\nwith zipfile.ZipFile(io.BytesIO(urllib.request.urlopen(\n    'http://followthehashtag.com/content/uploads/USA-Geolocated-tweets-free-dataset-Followthehashtag.zip'\n).read())) as zf:\n    df = pd.read_excel(zf.open('dashboard_x_usa_x_filter_nativeretweets.xlsx'))\n\nnlp = st.tweet_tokenzier_factory(nltk.tokenize.TweetTokenizer())\ndf['parse'] = df['Tweet content'].apply(nlp)\n\ndf.iloc[0]\n'''\nTweet Id                                                     721318437075685382\nDate                                                                 2016-04-16\nHour                                                                      12:44\nUser Name                                                        Bill Schulhoff\nNickname                                                          BillSchulhoff\nBio                           Husband,Dad,GrandDad,Ordained Minister, Umpire...\nTweet content                 Wind 3.2 mph NNE. Barometer 30.20 in, Rising s...\nFavs                                                                        NaN\nRTs                                                                         NaN\nLatitude                                                                40.7603\nLongitude                                                              -72.9547\nCountry                                                                      US\nPlace (as appears on Bio)                                    East Patchogue, NY\nProfile picture               http://pbs.twimg.com/profile_images/3788000007...\nFollowers                                                                   386\nFollowing                                                                   705\nListed                                                                       24\nTweet language (ISO 639-1)                                                   en\nTweet Url                     http://www.twitter.com/BillSchulhoff/status/72...\nparse                         Wind 3.2 mph NNE. Barometer 30.20 in, Rising s...\nName: 0, dtype: object\n'''\n```\n\nNext, we'll use the [AgeFromName](https://github.com/JasonKessler/agefromname) package to find the probabilities of the gender of \neach user given their first name.  First, we'll find a dataframe indexed on first names \nthat contains the probability that each someone with that first name is male (`male_prob`).\n \n```python\nmale_prob = agefromname.AgeFromName().get_all_name_male_prob()\nmale_prob.iloc[0]\n'''\nhi      1.00000\nlo      0.95741\nprob    1.00000\nName: aaban, dtype: float64\n'''\n```\n\nNext, we'll extract the first names of each user, and use the `male_prob` data frame \nto find users whose names indicate there is at least a 90% chance they are either male or female,\nlabel those users, and create new data frame `df_mf` with only those users.\n\n```python\ndf['first_name'] = df['User Name'].apply(lambda x: x.split()[0].lower() if type(x) == str and len(x.split()) > 0 else x)\ndf_aug = pd.merge(df, male_prob, left_on='first_name', right_index=True)\ndf_aug['gender'] = df_aug['prob'].apply(lambda x: 'm' if x > 0.9 else 'f' if x < 0.1 else '?')\ndf_mf = df_aug[df_aug['gender'].isin(['m', 'f'])]\n```\n\nThe key to this analysis is to construct a corpus using only the emoji \nextractor `st.FeatsFromSpacyDocOnlyEmoji` which builds a corpus only from\n emoji and not from anything else.\n \n```python\ncorpus = st.CorpusFromParsedDocuments(\n\tdf_mf,\n\tparsed_col='parse',\n\tcategory_col='gender',\n\tfeats_from_spacy_doc=st.FeatsFromSpacyDocOnlyEmoji()\n).build()\n```\n\nNext, we'll run this through a standard `produce_scattertext_explorer` visualization\ngeneration.\n```python\nhtml = st.produce_scattertext_explorer(\n\tcorpus,\n\tcategory='f',\n\tcategory_name='Female',\n\tnot_category_name='Male',\n\tuse_full_doc=True,\n\tterm_ranker=OncePerDocFrequencyRanker,\n\tsort_by_dist=False,\n\tmetadata=(df_mf['User Name']\n\t          + ' (@' + df_mf['Nickname'] + ') '\n\t          + df_mf['Date'].astype(str)),\n\twidth_in_pixels=1000\n)\nopen(\"EmojiGender.html\", 'wb').write(html.encode('utf-8'))\n```\n\n[![EmojiGender.html](https://jasonkessler.github.io/EmojiGender.png)](https://jasonkessler.github.io/EmojiGender.html)\n\n\n### Visualizing scikit-learn text classification weights\n\nSuppose you'd like to audit or better understand \nweights or importances given to bag-of-words features \nby a classifier.\n \nIt's easy to use Scattertext to do, if you use a Scikit-learn-style classifier.\n\nFor example the [Lighting](http://contrib.scikit-learn.org/lightning/) package makes available\nhigh-performance linear classifiers which are have Scikit-compatible interfaces.\n\nFirst, let's import `sklearn`'s text feature extraction classes, the 20 Newsgroup\ncorpus, Lightning's Primal Coordinate Descent classifier, and Scattertext. We'll also\nfetch the training portion of the Newsgroup corpus.\n\n```python\nfrom lightning.classification import CDClassifier\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer\n\nimport scattertext as st\n\nnewsgroups_train = fetch_20newsgroups(\n\tsubset='train',\n\tremove=('headers', 'footers', 'quotes')\n)\n```\n\nNext, we'll tokenize our corpus twice.  Once into tfidf features \nwhich will be used to train the classifier, an another time into\nngram counts that will be used by Scattertext.  It's important that\nboth vectorizers share the same vocabulary, since we'll need to apply the \nweight vector from the model onto our Scattertext Corpus.\n\n```python\nvectorizer = TfidfVectorizer()\ntfidf_X = vectorizer.fit_transform(newsgroups_train.data)\ncount_vectorizer = CountVectorizer(vocabulary=vectorizer.vocabulary_)\n```\n\nNext, we use the `CorpusFromScikit` factory to build a Scattertext Corpus object.\nEnsure the `X` parameter is a document-by-feature matrix. The argument to the \n`y` parameter is an array of class labels.  Each label is an integer representing\na different news group.  We the `feature_vocabulary` is the vocabulary used by the \nvectorizers.  The `category_names` are a list of the 20 newsgroup names which\nas a class-label list.  The `raw_texts` is a list of the text of newsgroup texts.\n  \n```python\ncorpus = st.CorpusFromScikit(\n\tX=count_vectorizer.fit_transform(newsgroups_train.data),\n\ty=newsgroups_train.target,\n\tfeature_vocabulary=vectorizer.vocabulary_,\n\tcategory_names=newsgroups_train.target_names,\n\traw_texts=newsgroups_train.data\n).build()\n```\n\nNow, we can train the model on `tfidf_X` and the categoricla response variable,\nand capture feature weights for category 0 (\"alt.atheism\").\n```python\nclf = CDClassifier(penalty=\"l1/l2\",\n                   loss=\"squared_hinge\",\n                   multiclass=True,\n                   max_iter=20,\n                   alpha=1e-4,\n                   C=1.0 / tfidf_X.shape[0],\n                   tol=1e-3)\nclf.fit(tfidf_X, newsgroups_train.target)\nterm_scores = clf.coef_[0]\n```\n\nFinally, we can create a Scattertext plot.  We'll use the Monroe-style visualization, and automatically\nselect around 4000 terms that encompass the set of frequent terms, terms with high absolute scores,\nand terms that are characteristic of the corpus.  \n\n```python\nhtml = st.produce_frequency_explorer(\n\tcorpus,\n\t'alt.atheism',\n\tscores=term_scores,\n\tuse_term_significance=False,\n\tterms_to_include=st.AutoTermSelector.get_selected_terms(corpus, term_scores, 4000),\n\tmetadata = ['/'.join(fn.split('/')[-2:]) for fn in newsgroups_train.filenames]\n)\n```\n[![demo_sklearn.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_sklearn.png)](https://jasonkessler.github.io/demo_sklearn.html)\n\n\nLet's take a look at the performance of the classifier:\n\n```python\nnewsgroups_test = fetch_20newsgroups(subset='test',\n                                     remove=('headers', 'footers', 'quotes'))\nX_test = vectorizer.transform(newsgroups_test.data)\npred = clf.predict(X_test)\nf1 = f1_score(pred, newsgroups_test.target, average='micro')\nprint(\"Microaveraged F1 score\", f1)\n```\nMicroaveraged F1 score 0.662108337759.  Not bad over a ~0.05 baseline.\n\n### Creating lexicalized semiotic squares\n\nPlease see [Signo](http://www.signosemio.com/greimas/semiotic-square.asp) for an \nintroduction to semiotic squares.\n\nSome variants of the semiotic square-creator are can be seen in this notebook, which studies\nwords and phrases in headlines that had low or high Facebook engagement and were published by\neither BuzzFeed or the New York Times: [http://nbviewer.jupyter.org/github/JasonKessler/PuPPyTalk/blob/master/notebooks/Explore-Headlines.ipynb]\n\nThe idea behind the semiotic square is to express the relationship between two opposing \nconcepts and concepts things within a larger domain of a discourse. \nExamples of opposed concepts life or death, male or female, or, in our example, positive or negative sentiment. \nSemiotics squares are comprised of four \"corners\": the upper two corners are the opposing concepts,\nwhile the bottom corners are the negation of the concepts.  \n\nCircumscribing the negation of a concept involves finding everything in the \ndomain of discourse that isn't associated with the concept.  For example, in the \nlife-death opposition, one can consider the universe of discourse to be all\nanimate beings, real and hypothetical. The not-alive category will cover dead things,\nbut also hypothetical entities like fictional characters or sentient AIs.\n\nIn building lexicalized semiotic squares, we consider concepts to be documents labeled\nin a corpus.  Documents, in this setting, can belong to one of three categories: two labels corresponding\nto the opposing concepts, a neutral category, indicating a document is in the same domain as\nthe opposition, but cannot fall into one of opposing categories. \n\nIn the example below positive and negative movie reviews are treated as the opposing categories,\nwhile plot descriptions of the same movies are treated as the neutral category.\n\nTerms associated with one of the two opposing categories (relative only to the other) are\nlisted as being associated with that category.  Terms associated with a netural category \n(e.g., not positive) are terms which are associated with the disjunction of the opposite \ncategory and the neutral category. For example, not-positive terms are those most associated \nwith the set of negative reviews and plot descriptions vs. positive reviews.\n\nCommon terms among adjacent corners of the square are also listed.\n\nAn HTML-rendered square is accompanied by a scatter plot.  Points on the plot are terms.\nThe x-axis is the Z-score of the association to one of the opposed concepts. The y-axis\nis the Z-score how associated a term is with the neutral set of documents relative to the\nopposed set.  A point's red-blue color indicate the term's opposed-association, while\nthe more desaturated a term is, the more it is associated with the neutral set of documents.       \n\n\n\n```python\nimport scattertext as st\nmovie_df = st.SampleCorpora.RottenTomatoes.get_data()\nmovie_df.category = movie_df.category.apply\\\n\t(lambda x: {'rotten': 'Negative', 'fresh': 'Positive', 'plot': 'Plot'}[x])\ncorpus = st.CorpusFromPandas(\n\tmovie_df,\n\tcategory_col='category',\n\ttext_col='text',\n\tnlp=st.whitespace_nlp_with_sentences\n).build().get_unigram_corpus()\n\nsemiotic_square = st.SemioticSquare(\n\tcorpus,\n\tcategory_a='Positive',\n\tcategory_b='Negative',\n\tneutral_categories=['Plot'],\n\tscorer=st.RankDifference(),\n\tlabels={'not_a_and_not_b': 'Plot Descriptions', 'a_and_b': 'Reviews'}\n)\n\nhtml = st.produce_semiotic_square_explorer(semiotic_square,\n                                           category_name='Positive',\n                                           not_category_name='Negative',\n                                           x_label='Fresh-Rotten',\n                                           y_label='Plot-Review',\n                                           neutral_category_name='Plot Description',\n                                           metadata=movie_df['movie_name'])\n```\n\n[![semiotic square](https://jasonkessler.github.io/semiotic_square_plot.png)](https://jasonkessler.github.io/demo_semiotic.html)\n\nThere are a number of other types of semiotic square construction functions.  \n\n### Visualizing Topic Models\nA frequently requested feature of Scattertext has been the ability to visualize topic \nmodels. While this capability has existed in some forms (e.g., the Empath visualization),\nI've finally gotten around to implementing a concise API for such a visualization. \nThere are three main ways to visualize topic models using Scattertext.\nThe first is the simplest: manually entering topic models and visualizing them.\nThe second uses a Scikit-Learn pipeline to produce the topic models for visualization.\nThe third is a novel topic modeling technique, based on finding terms similar to a\ncustom set of seed terms.  \n\n#### Manually entered topic models\n\nIf you have already created a topic model, simply structure it as a dictionary. \nThis dictionary is keyed on string which serve as topic titles and are displayed\nin the main scatterplot.  The values are lists of words that belong to that topic. The words\nthat are in each topic list are bolded when they appear in a snippet. \n\nNote that currently, there is no support for keyword scores.\n\nFor example, one might manually the following topic models to explore in the Convention\ncorpus: \n\n```python\ntopic_model = {\n  'money': ['money','bank','banks','finances','financial','loan','dollars','income'],\n  'jobs':['jobs','workers','labor','employment','worker','employee','job'],\n  'patriotic':['america','country','flag','americans','patriotism','patriotic'],\n  'family':['mother','father','mom','dad','sister','brother','grandfather','grandmother','son','daughter']\n}\n```\n\nWe can use the `FeatsFromTopicModel` class to transform this topic model into one which\ncan be visualized using Scattertext. This is used just like any other feature builder,\nand we pass the topic model object into `produce_scattertext_explorer`.\n\n```\nimport scattertext as st\n\ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n\ntopic_corpus = st.CorpusFromParsedDocuments(\n\tconvention_df,\n\tcategory_col='party',\n\tparsed_col='parse',\n\tfeats_from_spacy_doc=topic_feature_builder\n).build()\n\nhtml = st.produce_scattertext_explorer(\n\ttopic_corpus,\n\tcategory='democrat',\n\tcategory_name='Democratic',\n\tnot_category_name='Republican',\n\twidth_in_pixels=1000,\n\tmetadata=convention_df['speaker'],\n\tuse_non_text_features=True,\n\tuse_full_doc=True,\n\tpmi_threshold_coefficient=0,\n\ttopic_model_term_lists=topic_feature_builder.get_top_model_term_lists()\n)\n```\n\n[![demo_custom_topic_model.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_custom_topic_model.png)](https://jasonkessler.github.io/demo_custom_topic_model.html)\n\n#### Using Scikit-Learn for Topic Modeling\n\nSince topic modeling using document-level coocurence generally produces poor results,\nI've added a `SentencesForTopicModeling` class which allows clusterting by coocurence\nat the sentence-level.  It requires a `ParsedCorpus` object to be passed to its constructor,\nand creates a term-sentence matrix internally.\n\nNext, you can create a topic model dictionary like the one above by passing in a Scikit-Learn\nclustering or dimensionality reduction pipeline. The only constraint is the last transformer\nin the pipeline must populate a `components_` attribute.\n\nThe `num_topics_per_term` attribute specifies how many terms should be added to a list.\n\nIn the following example, we'll use NMF to cluster a stoplisted, unigram corpus of documents,\nand use the topic model dictionary to create a `FeatsFromTopicModel`, just like before.\n\nNote that in `produce_scattertext_explorer`, we make the `topic_model_preview_size` 20 in order to show\na preview of the first 20 terms in the topic in the snippet view as opposed to the default 10. \n\n```python\nfrom sklearn.decomposition import NMF\nfrom sklearn.feature_extraction.text import TfidfTransformer\nfrom sklearn.pipeline import Pipeline\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\n\nunigram_corpus = (st.CorpusFromParsedDocuments(convention_df,\n                                               category_col='party',\n                                               parsed_col='parse')\n                  .build().get_stoplisted_unigram_corpus())\ntopic_model = st.SentencesForTopicModeling(unigram_corpus).get_topics_from_model(\n\tPipeline([\n\t\t('tfidf', TfidfTransformer(sublinear_tf=True)),\n\t\t('nmf', (NMF(n_components=100, alpha=.1, l1_ratio=.5, random_state=0)))\n\t]),\n\tnum_terms_per_topic=20\n)\n  \ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n\n\ntopic_corpus = st.CorpusFromParsedDocuments(\n\tconvention_df,\n\tcategory_col='party',\n\tparsed_col='parse',\n\tfeats_from_spacy_doc=topic_feature_builder\n).build()\n\nhtml = st.produce_scattertext_explorer(\n\ttopic_corpus,\n\tcategory='democrat',\n\tcategory_name='Democratic',\n\tnot_category_name='Republican',\n\twidth_in_pixels=1000,\n\tmetadata=convention_df['speaker'],\n\tuse_non_text_features=True,\n\tuse_full_doc=True,\n\tpmi_threshold_coefficient=0,\n\ttopic_model_term_lists=topic_feature_builder.get_top_model_term_lists(),\n\ttopic_model_preview_size=20\n)\n```\n[![demo_nmf_topic_model.html](https://jasonkessler.github.io/demo_nmf_topic_model.png)](https://jasonkessler.github.io/demo_nmf_topic_model.html)\n\n#### Using a Word List to Generate a Series of Topics\n\nA surprisingly easy way to generate good topic models is to use a term scoring formula\nto find words that are associated with sentences where a seed word occurs vs. where\none doesn't occur.  \n\nGiven a custom term list, the `SentencesForTopicModeling.get_topics_from_terms` will\ngenerate a series of topics.  Note that the dense rank difference (`RankDifference`) works \nparticularly well for this task, and is the default paramter.\n\n```python\nterm_list = ['obama', 'romney', 'democrats', 'republicans', 'health', 'military', 'taxes',\n 'education', 'olympics', 'auto', 'iraq', 'iran', 'israel']\n\nunigram_corpus = (st.CorpusFromParsedDocuments(convention_df,\n                                               category_col='party',\n                                               parsed_col='parse')\n                  .build().get_stoplisted_unigram_corpus())\n\ntopic_model = (st.SentencesForTopicModeling(unigram_corpus)\n               .get_topics_from_terms(term_list,\n                                      scorer=st.RankDifference(), \n                                      num_terms_per_topic=20))\n\ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n# The remaining code is identical to two examples above. See demo_word_list_topic_model.py\n# for the complete example.\n```\n\n[![demo_word_list_topic_model.html](https://jasonkessler.github.io/demo_word_list_topic_model.png)](https://jasonkessler.github.io/demo_word_list_topic_model.html)\n\n\n### Creating T-SNE-style word embedding projection plots\n\nScattertext makes it easy to create word-similarity plots using projections of word embeddings as the x and y-axes. \nIn the example below, we create a stop-listed Corpus with only unigram terms.  The `produce_projection_explorer` function\nby uses Gensim to create word embeddings and then projects them to two dimentions using Uniform Manifold Approximation and Projection (UMAP).\n\nUMAP is chosen over T-SNE because it can employ the cosine similarity between two word vectors instead of just the euclidean distance.    \n\n```python\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\n\ncorpus = (st.CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='parse')\n          .build().get_stoplisted_unigram_corpus())\n\nhtml = st.produce_projection_explorer(corpus, category='democrat', category_name='Democratic',\n  not_category_name='Republican', metadata=convention_df.speaker)\n```\n\nIn order to use custom word embedding functions or projection functions, pass models into the `word2vec_model`\nand `projection_model` parameters.  In order to use T-SNE, for example, use \n`projection_model=sklearn.manifold.TSNE()`. \n\n```python\nimport umap\nfrom gensim.models.word2vec import Word2Vec\n\nhtml = st.produce_projection_explorer(corpus,\n                                      word2vec_model=Word2Vec(size=100, window=5, min_count=10, workers=4),\n                                      projection_model=umap.UMAP(min_dist=0.5, metric='cosine'),\n                                      category='democrat',\n                                      category_name='Democratic',\n                                      not_category_name='Republican',\n                                      metadata=convention_df.speaker)                                                                            \n```\n\n[![t-sne style plot](https://jasonkessler.github.io/demo_tsne_style.png)](https://jasonkessler.github.io/demo_tsne_style.html)\n\n## Examples \n\nPlease see the examples in the [PyData 2017 Tutorial](https://github.com/JasonKessler/Scattertext-PyData) on Scattertext.\n\n## A note on chart layout\n\n[Cozy: The Collection Synthesizer](https://github.com/uwplse/cozy) (Loncaric 2016) was used to help determine \nwhich terms could be labeled without overlapping a circle or another label.  It automatically built a data structure to efficiently store and query the locations of each circle and labeled term.\n\nThe script to build `rectangle-holder.js` was\n```\nfields ax1 : long, ay1 : long, ax2 : long, ay2 : long\nassume ax1 < ax2 and ay1 < ay2\nquery findMatchingRectangles(bx1 : long, by1 : long, bx2 : long, by2 : long)\n    assume bx1 < bx2 and by1 < by2\n    ax1 < bx2 and ax2 > bx1 and ay1 < by2 and ay2 > by1\n```\n\nAnd it was called using\n```\n$ python2.7 src/main.py <script file name> --enable-volume-trees \\\n  --js-class RectangleHolder --enable-hamt --enable-arrays --js rectangle_holder.js\n```\n\n## What's new\n\n### 0.0.2.24-25\nAdded `TermCategoryFrequencies` in response to Issue 23.  Please see [Visualizing differences based on only term frequencies](#visualizing-differences-based-on-only-term-frequencies) \nfor more details. \n\nAdded `x_axis_labels` and `y_axis_labels` parameters to `produce_scattertext_explorer`. \nThese let you include evenly-spaced string axis labels on the chart, as opposed to just\n\"Low\", \"Medium\" and \"High\". These rely on d3's ticks function, which can behave \nunpredictable. Caveat usor.\n\n\n### 0.0.2.16-23.1\nSemiotic Squares now look better, and have customizable labels. \n\nIncorporated the [General Inquirer](http://www.wjh.harvard.edu/~inquirer/homecat.htm) \nlexicon. For non-commercial use only. The lexicon is downloaded from their homepage at the start of each \nuse. See `demo_general_inquierer.py`.\n\nIncorporated Phrasemachine from [AbeHandler](https://github.com/AbeHandler) (Handler et al. 2016). For the license, \nplease see `PhraseMachineLicense.txt`.  For an example, please see `demo_phrase_machine.py`.\n\nAdded `CompactTerms` for removing redundant and infrequent terms from term document matrices.\nThese occur if a word or phrase is always part of a larger phrase; the shorter phrase is \nconsidered redundant and removed from the corpus. See `demo_phrase_machine.py` for an example.   \n\nAdded `FourSquare`, a pattern that allows for the creation of a semiotic square with\nseparate categories for each corner.  Please see `demo_four_square.py` for an early example. \n\nFinally, added a way to easily perform T-SNE-style visualizations on a categorized corpus. This uses, by default,\nthe [umap-learn](https://github.com/lmcinnes/umap) package. Please see demo_tsne_style.py.\n  \nFixed to `ScaledFScorePresets(one_to_neg_one=True)`, added `UnigramsFromSpacyDoc`.\n\nNow, when using `CorpusFromPandas`, a `CorpusDF` object is returned, instead of a `Corpus` object. This new type of object \nkeeps a reference to the source data frame, and returns it via the `CorpusDF.get_df()` method.\n\nThe factory `CorpusFromFeatureDict` was added. It allows you to directly specify term counts and\nmetadata item counts within the dataframe.  Please see `test_corpusFromFeatureDict.py` for an example.\n\n\n### 0.0.2.15-16\nAdded a very semiotic square creator.\n\nThe idea to build a semiotic square that contrasts two categories in a Term Document Matrix\nwhile using other categories as neutral categories.   \n\nSee [Creating semiotic squares](#creating-semiotic-squares) for an overview on how to \nuse this functionality and semiotic squares.\n\nAdded a parameter to disable the display of the top-terms sidebar, e.g.,\n`produce_scattertext_explorer(..., show_top_terms=False, ...)`.\n\nAn interface to part of the subjectivity/sentiment dataset from \nBo Pang and Lillian Lee. ``A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization \nBased on Minimum Cuts''. ACL. 2004. See `SampleCorpora.RottenTomatoes`.\n\nFixed bug that caused tooltip placement to be off after scrolling.   \n\nMade `category_name` and `not_category_name` optional in `produce_scattertext_explorer` etc.\n\nCreated the ability to customize tooltips via the `get_tooltip_content` argument to\n `produce_scattertext_explorer` etc., control axes labels via `x_axis_values` \n and `y_axis_values`.  The `color_func` parameter is a Javascript function to control color of a point.  Function takes a parameter\n which is a dictionary entry produced by `ScatterChartExplorer.to_dict` and returns a string.\n\n\n### 0.0.2.14\nIntegration with Scikit-Learn's text-analysis pipeline led the creation of the\n`CorpusFromScikit` and `TermDocMatrixFromScikit` classes.\n\nThe `AutoTermSelector` class to automatically suggest terms to appear in the visualization.  \nThis can make it easier to show large data sets, and remove fiddling with the various \nminimum term frequency parameters. \n\nFor an example of how to use `CorpusFromScikit` and `AutoTermSelector`, please see `demo_sklearn.py`\n\nAlso, I updated the library and examples to be compatible with spaCy 2.\n\nFixed bug when processing single-word documents, and set the default beta to 2. \n\n\n### 0.0.2.11-13\nAdded `produce_frequency_explorer` function, and adding the PEP 369-compliant \n`__version__` attribute as mentioned in [#19](https://github.com/JasonKessler/scattertext/issues/19).\nFixed bug when creating visualizations with more than two possible categories.  Now, by default, \ncategory names will not be title-cased in the visualization, but will retain their original case.  \nIf you'd still like to do this this, use `ScatterChart (or a descendant).to_dict(..., title_case_names=True)`.\nFixed `DocsAndLabelsFromCorpus` for Py 2 compatibility. \n\n\n### 0.0.2.10\nFixed bugs in `chinese_nlp` when jieba has already been imported and in p-value\ncomputation when performing log-odds-ratio w/ prior scoring.  \n\nAdded demo for performing a Monroe et. al (2008) style visualization of \nlog-odds-ratio scores in `demo_log_odds_ratio_prior.py`.   \n\n\n### 0.0.2.9.*\nBreaking change: `pmi_filter_thresold` has been replaced with `pmi_threshold_coefficient`.\n\nAdded Emoji and Tweet analysis. See [Emoji analysis](#emoji-analysis).\n\nCharacteristic terms falls back ot \"Most frequent\" if no terms used in the chart are present\nin the background corpus.\n \nFixed top-term calculation for custom scores.\n \nSet scaled f-score's default beta to 0.5.\n\nAdded `--spacy_language_model` argument to the CLI. \n\nAdded the `alternative_text_field` option in `produce_scattertext_explorer` to show an \nalternative text field when showing contexts in the interactive HTML visualization.   \n\nUpdated `ParsedCorpus.get_unigram_corpus` to allow for continued \n`alternative_text_field` functionality. \n\n\n### 0.0.2.8.6\nAdded ability to for Scattertext to use noun chunks instead of unigrams and bigrams through the\n`FeatsFromSpacyDocOnlyNounChunks` class. In order to use it, run your favorite `Corpus` or \n`TermDocMatrix` factory, and pass in an instance of the class as a parameter: \n```\nst.CorpusFromParsedDocuments(..., feats_from_spacy_doc=st.FeatsFromSpacyDocOnlyNounChunks())\n```\n\nFixed a bug in corpus construction that occurs when the last document has no features.\n\n### 0.0.2.8.5\nNow you don't have to install tinysegmenter to use Scattertext.  But you need to\ninstall it if you want to parse Japanese.  This caused a problem when Scattertext\nwas being installed on Windows.\n\n### 0.0.2.8.1-4\nAdded `TermDocMatrix.get_corner_score`, giving an improved version of the \nRudder Score.  Exposing `whitespace_nlp_with_sentences`.  It's a lightweight\n bad regex sentence splitter built a top a bad regex tokenizer that somewhat\n apes spaCy's API. Use it if you don't have spaCy and the English model \n downloaded or if you care more about memory footprint and speed than accuracy.\n \nIt's not compatible with `word_similarity_explorer` but is compatible with \n `word_similarity_explorer_gensim'.\n \nTweaked scaled f-score normalization.\n\nFixed Javascript bug when clicking on '$'. \n\n### 0.0.2.8.0\nFixed bug in Scaled F-Score computations, and changed computation to better score words that are inversely correlated to category.\n\nAdded `Word2VecFromParsedCorpus` to automate training Gensim word vectors from a corpus, and  \n`word_similarity_explorer_gensim` to produce the visualization.  \n\nSee `demo_gensim_similarity.py` for an example. \n\n\n### 0.0.2.7.1\nAdded the `d3_url` and `d3_scale_chromatic_url` parameters to \n`produce_scattertext_explorer`.  This provides a way to manually specify the paths to \"d3.js\" \n(i.e., the file from \"https://cdnjs.cloudflare.com/ajax/libs/d3/4.6.0/d3.min.js\") and\n\"d3-scale-chromatic.v1.js\" (i.e., the file from \"https://d3js.org/d3-scale-chromatic.v1.min.js\").\n\nThis is important if you're getting the error:\n\n```\nJavascript error adding output!\nTypeError: d3.scaleLinear is not a function\nSee your browser Javascript console for more details.\n``` \n\nIt also lets you use Scattertext if you're serving in an environment with no (or a restricted) \nexternal Internet connection. \n\nFor example, if \"d3.min.js\" and \"d3-scale-chromatic.v1.min.js\" were present in the current\nworking directory, calling the following code would reference them locally instead of \nthe remote Javascript files. See [Visualizing term associations](#visualizing-term-associations) \nfor code context. \n\n```pydocstring\n>>> html = st.produce_scattertext_explorer(corpus,\n...          category='democrat',\n...          category_name='Democratic',\n...          not_category_name='Republican',\n...          width_in_pixels=1000,\n...          metadata=convention_df['speaker'],\n...          d3_url='d3.min.js',\n...          d3_scale_chromatic_url='d3-scale-chromatic.v1.min.js')\n```\n\n### 0.0.2.7.0\nFixed a bug in 0.0.2.6.0 that transposed default axis labels.\n\nAdded a Japanese mode to Scattertext.  See `demo_japanese.py` for an example of\n how to use Japanese.  Please run `pip install tinysegmenter` to parse Japanese.\n\nAlso, the `chiense_mode` boolean parameter in \n`produce_scattertext_explorer` has been renamed to `asian_mode`.\n\nFor example, the output of `demo_japanese.py` is:\n[![demo_japanese.html](https://jasonkessler.github.io/demo_japanese.png)](https://jasonkessler.github.io/demo_japanese.html)\n\n\n### 0.0.2.6.0\nCustom term positions and axis labels.  Although not recommended, you can \nvisualize different metrics on each axis in visualizations similar to Monroe et al. (2008).\nPlease see [Custom term positions](#custom-term-positions) for more info.\n\n \n### 0.0.2.5.0\nEnhanced the visualization of query-based categorical differences, a.k.a the `word_similarity_explorer`\nfunction. When run, a plot is produced that contains category associated terms \ncolored in either red or blue hues, and terms not associated with either class\ncolored in greyscale and slightly smaller. The intensity of each color indicates \n association with the query term.  For example:\n \n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/Conventions-Viz-Explanation.png)](https://jasonkessler.github.io/Convention-Visualization-Jobs.html)\n\n### 0.0.2.4.6\nSome minor bug fixes, and added a `minimum_not_category_term_frequency` parameter.  This fixes a problem with \nvisualizing imbalanced datasets.  It sets a minimum number of times a word that does not appear in the target \ncategory must appear before it is displayed.\n\nAdded `TermDocMatrix.remove_entity_tags` method to remove entity type tags \nfrom the analysis. \n\n### 0.0.2.4.5\nFixed matched snippet not displaying issue [#9](/../../issues/9), and fixed a Python 2 issue \nin created a visualization using a `ParsedCorpus` prepared via `CorpusFromParsedDocuments`, mentioned\nin the latter part of the issue [#8](/../../issues/8) discussion.\n\nAgain, Python 2 is supported in experimental mode only.\n\n### 0.0.2.4.4\nCorrected example links on this Readme.\n   \nFixed a bug in Issue 8 where the HTML visualization produced by `produce_scattertext_html` would fail.\n\n### 0.0.2.4.2\nFixed a couple issues that rendered Scattertext broken in Python 2. Chinese processing still does not work.\n\nNote: Use Python 3.4+ if you can.\n\n### 0.0.2.4.1\nFixed links in Readme, and made regex NLP available in CLI.\n\n### 0.0.2.4\nAdded the command line tool, and fixed a bug related to Empath visualizations.\n\n### 0.0.2.3\nAbility to see how a particular term is discussed differently between categories\nthrough the `word_similarity_explorer` function. \n\nSpecialized mode to view sparse term scores.\n\nFixed a bug that was caused by repeated values in background unigram counts.\n\nAdded true alphabetical term sorting in visualizations.\n  \nAdded an optional save-as-SVG button.\n\n### 0.0.2.2\n\nAddition option of showing characteristic terms (from the full set of documents) being considered.\nThe option (`show_characteristic` in `produce_scattertext_explorer`) is on by default, \nbut currently unavailable for Chinese.  If you know of a good Chinese wordcount list,\nplease let me know.  The algorithm used to produce these is F-Score.  \nSee [this and the following slide](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/58) for more details\n\n### 0.0.2.1.5\n\nAdded document and word count statistics to main visualization. \n\n### 0.0.2.1.4\n\nAdded preliminary support for visualizing [Empath](https://github.com/Ejhfast/empath-client) (Fast 2016) topics categories instead of emotions.  See the tutorial for more information. \n\n### 0.0.2.1.3\n\nImproved term-labeling.\n\n### 0.0.2.1.1\n\nAddition of `strip_final_period` param to `FeatsFromSpacyDoc` to deal with spaCy \n tokenization of all-caps documents that can leave periods at the end of terms.\n\n### 0.0.2.1.0\n\nI've added support for Chinese, including the ChineseNLP class, which uses a RegExp-based \nsentence splitter and [Jieba](https://github.com/fxsjy/jieba) for word \nsegmentation. To use it, see the `demo_chinese.py` file.  Note that `CorpusFromPandas`\ncurrently does not support ChineseNLP.\n\nIn order for the visualization to work, set the `asian_mode` flag to `True` in\n`produce_scattertext_explorer`.\n\n## Sources\n* 2012 Convention Data: scraped from [The New York Times.](http://www.nytimes.com/interactive/2012/09/06/us/politics/convention-word-counts.html?_r=0)\n* count_1w: Peter Norvig assembled this file (downloaded from [norvig.com](http://norvig.com/ngrams/count_1w.txt)). See http://norvig.com/ngrams/ for an explanation of how it was gathered from a very large corpus.\n* hamlet.txt: William Shakespeare. From [shapespeare.mit.edu](http://shakespeare.mit.edu/hamlet/full.html)\n* Inspiration for text scatter plots: Rudder, Christian. Dataclysm: Who We Are (When We Think No One's Looking). Random House Incorporated, 2014.\n* Loncaric, Calvin. \"Cozy: synthesizing collection data structures.\" Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 2016.\n* Fast, Ethan, Binbin Chen, and Michael S. Bernstein. \"Empath: Understanding topic signals in large-scale text.\" Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems. ACM, 2016.\n* Burt L. Monroe, Michael P. Colaresi, and Kevin M. Quinn. 2008. Fightin’ words: Lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis.\n* Bo Pang and Lillian Lee. A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization Based on Minimum Cuts, Proceedings of the ACL, 2004.\n* Abram Handler, Matt Denny, Hanna Wallach, and Brendan O'Connor. Bag of what? Simple noun phrase extraction for corpus analysis.  NLP+CSS Workshop at EMNLP 2016.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F28:386840:185DA9:5EA3BE:6AB92B3E"},"text_sha256":"87a5b83fd8d2caeb046cb0ca99754c401d647e231308548fae9b3ace3cb5feb5"},{"path":"docs/_modules/scattertext/AutoTermSelector.html","size":12866,"blob_sha":"b4adbe36d88c85ea94b513930d2367fd9b5dbd2b","priority":1,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.AutoTermSelector &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.AutoTermSelector<\/h1><div class=\"highlight\"><pre>\n<span><\/span>\n<div class=\"viewcode-block\" id=\"AutoTermSelector\"><a class=\"viewcode-back\" href=\"../../scattertext.html#scattertext.AutoTermSelector.AutoTermSelector\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AutoTermSelector<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\tReduce corpus to the X most important terms.  Great for plotting a big corpus.<\/span>\n<span class=\"sd\">\tWill return between X/2 and X terms.<\/span>\n\n<span class=\"sd\">\tReturns the terms with the X highest absolute scores, background corpus scores, and term frequencies.<\/span>\n<span class=\"sd\">\t&#39;&#39;&#39;<\/span>\n\n<div class=\"viewcode-block\" id=\"AutoTermSelector.reduce_terms\"><a class=\"viewcode-back\" href=\"../../scattertext.html#scattertext.AutoTermSelector.AutoTermSelector.reduce_terms\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">reduce_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"p\">,<\/span> <span class=\"n\">scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tterm_doc_matrix: TermDocMatrix or descendant<\/span>\n<span class=\"sd\">\t\tscores: array-like<\/span>\n<span class=\"sd\">\t\t\tSame length as number of terms in TermDocMatrix.<\/span>\n<span class=\"sd\">\t\tnum_term_to_keep: int, default=4000.<\/span>\n<span class=\"sd\">\t\t\tShould be&gt; 0. Number of terms to keep. Will keep between num_terms_to_keep/2 and num_terms_to_keep.<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tTermDocMatrix stripped of non-important terms., array of scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">terms_to_show<\/span> <span class=\"o\">=<\/span> <span class=\"n\">AutoTermSelector<\/span><span class=\"o\">.<\/span><span class=\"n\">get_selected_terms<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"n\">term_doc_matrix<\/span><span class=\"p\">,<\/span> <span class=\"n\">scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">remove_terms<\/span><span class=\"p\">(<\/span><span class=\"nb\">set<\/span><span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">get_terms<\/span><span class=\"p\">())<\/span>\n\t\t                                    <span class=\"o\">-<\/span> <span class=\"nb\">set<\/span><span class=\"p\">(<\/span><span class=\"n\">terms_to_show<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"AutoTermSelector.get_selected_terms\"><a class=\"viewcode-back\" href=\"../../scattertext.html#scattertext.AutoTermSelector.AutoTermSelector.get_selected_terms\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_selected_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"p\">,<\/span> <span class=\"n\">scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tterm_doc_matrix: TermDocMatrix or descendant<\/span>\n<span class=\"sd\">\t\tscores: array-like<\/span>\n<span class=\"sd\">\t\t\tSame length as number of terms in TermDocMatrix.<\/span>\n<span class=\"sd\">\t\tnum_term_to_keep: int, default=4000.<\/span>\n<span class=\"sd\">\t\t\tShould be&gt; 0. Number of terms to keep. Will keep between num_terms_to_keep/2 and num_terms_to_keep.<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tset, terms that should be shown<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">num_term_to_keep<\/span> <span class=\"o\">=<\/span> <span class=\"n\">AutoTermSelector<\/span><span class=\"o\">.<\/span><span class=\"n\">_add_default_num_terms_to_keep<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">term_doc_freq<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">get_term_freq_df<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">term_doc_freq<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;count&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">term_doc_freq<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;score&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">scores<\/span>\n\t\t<span class=\"n\">score_terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">AutoTermSelector<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_score_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">background_terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">AutoTermSelector<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_background_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">frequent_terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">AutoTermSelector<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_frequent_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">terms_to_show<\/span> <span class=\"o\">=<\/span> <span class=\"n\">score_terms<\/span> <span class=\"o\">|<\/span> <span class=\"n\">background_terms<\/span> <span class=\"o\">|<\/span> <span class=\"n\">frequent_terms<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">terms_to_show<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_frequent_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">term_doc_freq<\/span>\n\t\t        <span class=\"o\">.<\/span><span class=\"n\">sort_values<\/span><span class=\"p\">(<\/span><span class=\"n\">by<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;count&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">ascending<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">)<\/span>\n\t\t        <span class=\"o\">.<\/span><span class=\"n\">iloc<\/span><span class=\"p\">[:<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.125<\/span> <span class=\"o\">*<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"p\">)]<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_background_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scaled_f_scores_vs_background<\/span><span class=\"p\">()<\/span>\n\t\t        <span class=\"o\">.<\/span><span class=\"n\">iloc<\/span><span class=\"p\">[:<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.375<\/span> <span class=\"o\">*<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"p\">)]<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_score_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">sorted_tdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_doc_freq<\/span><span class=\"o\">.<\/span><span class=\"n\">sort_values<\/span><span class=\"p\">(<\/span><span class=\"n\">by<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;score&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">ascending<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">sorted_tdf<\/span><span class=\"o\">.<\/span><span class=\"n\">iloc<\/span><span class=\"p\">[:<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.25<\/span> <span class=\"o\">*<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"p\">)]<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span>\n\t\t        <span class=\"o\">|<\/span> <span class=\"n\">sorted_tdf<\/span><span class=\"o\">.<\/span><span class=\"n\">iloc<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.25<\/span> <span class=\"o\">*<\/span> <span class=\"n\">num_term_to_keep<\/span><span class=\"p\">):]<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_add_default_num_terms_to_keep<\/span><span class=\"p\">(<\/span><span class=\"n\">num_term_to_keep<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">num_term_to_keep<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">num_term_to_keep<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">4000<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">num_term_to_keep<\/span><\/div>\n\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../index.html\">Module code<\/a><ul>\n  <li><a href=\"../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DBBA:3BCC6:17CD94:5E134E:6AB92B3E"},"text_sha256":"0193b03dc6bf890520198bee8b73162b094aa0795feae4eddf150021b2de4a9f"},{"path":"docs/_modules/scattertext/termcompaction/CompactTerms.html","size":15623,"blob_sha":"8e73c26db1da62924f4248dedab2b1305f077891","priority":1,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termcompaction.CompactTerms &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termcompaction.CompactTerms<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.CSRMatrixTools<\/span> <span class=\"k\">import<\/span> <span class=\"n\">CSRMatrixFactory<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.indexstore<\/span> <span class=\"k\">import<\/span> <span class=\"n\">IndexStore<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termranking<\/span> <span class=\"k\">import<\/span> <span class=\"n\">AbsoluteFrequencyRanker<\/span>\n\n\n<div class=\"viewcode-block\" id=\"CompactTerms\"><a class=\"viewcode-back\" href=\"../../../scattertext.termcompaction.html#scattertext.termcompaction.CompactTerms.CompactTerms\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">CompactTerms<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">term_ranker<\/span><span class=\"o\">=<\/span><span class=\"n\">AbsoluteFrequencyRanker<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">minimum_term_count<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">slack<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tterm_ranker : TermRanker<\/span>\n<span class=\"sd\">\t\t\tDefault AbsoluteFrequencyRanker<\/span>\n<span class=\"sd\">\t\tminimum_term_count : int<\/span>\n<span class=\"sd\">\t\t\tDefault 0<\/span>\n<span class=\"sd\">\t\tslack : int<\/span>\n<span class=\"sd\">\t\t\tDefault 1<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">term_ranker<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_ranker<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">minimum_term_count<\/span> <span class=\"o\">=<\/span> <span class=\"n\">minimum_term_count<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">redundancy_slack<\/span> <span class=\"o\">=<\/span> <span class=\"n\">slack<\/span>\n\n<div class=\"viewcode-block\" id=\"CompactTerms.compact\"><a class=\"viewcode-back\" href=\"../../../scattertext.termcompaction.html#scattertext.termcompaction.CompactTerms.CompactTerms.compact\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">compact<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tterm_doc_matrix : TermDocMatrix<\/span>\n<span class=\"sd\">\t\t\tTerm document matrix object to compact<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tNew term doc matrix<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">remove_terms_by_indices<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_indices_to_compact<\/span><span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"p\">))<\/span><\/div>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_indices_to_compact<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">indicies<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_term_indices_to_compact_from_term_freqs<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">term_ranker<\/span><span class=\"p\">(<\/span><span class=\"n\">term_doc_matrix<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">get_ranks<\/span><span class=\"p\">(),<\/span>\n\t\t\t<span class=\"n\">term_doc_matrix<\/span>\n\t\t<span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">indicies<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_term_indices_to_compact_from_term_freqs<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_freqs<\/span><span class=\"p\">,<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">idx<\/span> <span class=\"o\">=<\/span> <span class=\"n\">IndexStore<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">tdf_vals<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_freqs<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span>\n\t\t<span class=\"n\">valid_terms_mask<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tdf_vals<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"o\">&gt;=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">minimum_term_count<\/span>\n\t\t<span class=\"n\">tdf_vals<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_freqs<\/span><span class=\"p\">[<\/span><span class=\"n\">valid_terms_mask<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span>\n\t\t<span class=\"n\">terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">(<\/span><span class=\"n\">term_freqs<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span><span class=\"p\">)[<\/span><span class=\"n\">valid_terms_mask<\/span><span class=\"p\">]<\/span>\n\n\t\t<span class=\"n\">lengths<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\t\t<span class=\"n\">fact<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CSRMatrixFactory<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"k\">for<\/span> <span class=\"n\">i<\/span><span class=\"p\">,<\/span> <span class=\"n\">t<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">enumerate<\/span><span class=\"p\">(<\/span><span class=\"n\">terms<\/span><span class=\"p\">):<\/span>\n\t\t\t<span class=\"k\">for<\/span> <span class=\"n\">tok<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">t<\/span><span class=\"o\">.<\/span><span class=\"n\">split<\/span><span class=\"p\">():<\/span>\n\t\t\t\t<span class=\"n\">fact<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">,<\/span> <span class=\"n\">idx<\/span><span class=\"o\">.<\/span><span class=\"n\">getidx<\/span><span class=\"p\">(<\/span><span class=\"n\">tok<\/span><span class=\"p\">)]<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">1<\/span>\n\t\t\t<span class=\"n\">lengths<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">t<\/span><span class=\"o\">.<\/span><span class=\"n\">split<\/span><span class=\"p\">()))<\/span>\n\t\t<span class=\"n\">lengths<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">(<\/span><span class=\"n\">lengths<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">mat<\/span> <span class=\"o\">=<\/span> <span class=\"n\">fact<\/span><span class=\"o\">.<\/span><span class=\"n\">get_csr_matrix<\/span><span class=\"p\">()<\/span>\n\n\t\t<span class=\"n\">coocs<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lengths<\/span> <span class=\"o\">-<\/span> <span class=\"p\">(<\/span><span class=\"n\">mat<\/span> <span class=\"o\">*<\/span> <span class=\"n\">mat<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">pairs<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">argwhere<\/span><span class=\"p\">(<\/span><span class=\"n\">coocs<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span>\n\t\t<span class=\"n\">pairs<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_limit_to_non_identical_terms<\/span><span class=\"p\">(<\/span><span class=\"n\">pairs<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">pairs<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_limit_to_pairs_of_bigrams_and_a_constituent_unigram<\/span><span class=\"p\">(<\/span><span class=\"n\">pairs<\/span><span class=\"p\">,<\/span> <span class=\"n\">terms<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">pairs<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_limit_to_redundant_unigrams<\/span><span class=\"p\">(<\/span><span class=\"n\">pairs<\/span><span class=\"p\">,<\/span> <span class=\"n\">tdf_vals<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">idx_store<\/span> <span class=\"o\">=<\/span> <span class=\"n\">term_doc_matrix<\/span><span class=\"o\">.<\/span><span class=\"n\">_term_idx_store<\/span>\n\t\t<span class=\"n\">redundant_terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">idx_store<\/span><span class=\"o\">.<\/span><span class=\"n\">getidxstrictbatch<\/span><span class=\"p\">(<\/span><span class=\"n\">terms<\/span><span class=\"p\">[<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">unique<\/span><span class=\"p\">(<\/span><span class=\"n\">pairs<\/span><span class=\"p\">[:,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])])<\/span>\n\t\t<span class=\"n\">infrequent_terms<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">argwhere<\/span><span class=\"p\">(<\/span><span class=\"o\">~<\/span><span class=\"n\">valid_terms_mask<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"n\">terms_to_remove<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">concatenate<\/span><span class=\"p\">([<\/span><span class=\"n\">redundant_terms<\/span><span class=\"p\">,<\/span> <span class=\"n\">infrequent_terms<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">terms_to_remove<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_limit_to_redundant_unigrams<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">,<\/span> <span class=\"n\">tdf_vals<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">[<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">all<\/span><span class=\"p\">(<\/span><span class=\"n\">tdf_vals<\/span><span class=\"p\">[<\/span><span class=\"n\">pairs<\/span><span class=\"p\">[:,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">]]<\/span> <span class=\"o\">&lt;=<\/span> <span class=\"n\">tdf_vals<\/span><span class=\"p\">[<\/span><span class=\"n\">pairs<\/span><span class=\"p\">[:,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">]]<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">redundancy_slack<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)]<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_limit_to_pairs_of_bigrams_and_a_constituent_unigram<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">,<\/span> <span class=\"n\">terms<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">[<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">([<\/span><span class=\"n\">terms<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">]]<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">terms<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]]<\/span> <span class=\"k\">for<\/span> <span class=\"n\">i<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">])]<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_limit_to_non_identical_terms<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">pairs<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[(<\/span><span class=\"n\">pairs<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"n\">pairs<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">])]<\/span><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF9E:24970A:184C82:5E9026:6AB92B3D"},"text_sha256":"d4876ed32b5e7defe44d3b5fef39b31345ba30235315de9a83d5948eb3a36c3a"},{"path":"docs/_modules/scattertext/termsignificance/TermSignificance.html","size":3935,"blob_sha":"a1cdf551875d1022570899e4320e279d11c0cb38","priority":1,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance.TermSignificance &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termsignificance.TermSignificance<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">from<\/span> <span class=\"nn\">abc<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ABCMeta<\/span><span class=\"p\">,<\/span> <span class=\"n\">abstractmethod<\/span>\n\n\n<div class=\"viewcode-block\" id=\"TermSignificance\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.TermSignificance.TermSignificance\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">TermSignificance<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n\t<span class=\"n\">__metaclass__<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ABCMeta<\/span>\n<div class=\"viewcode-block\" id=\"TermSignificance.get_p_vals\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.TermSignificance.TermSignificance.get_p_vals\">[docs]<\/a>\t<span class=\"nd\">@abstractmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">pass<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6630:3E1DA:179639:5DDC51:6AB92B3D"},"text_sha256":"0d9e448d910c5cce2f86d89b4d19fcfca6d14a6869ff86e77539dd6f4d270aae"},{"path":"docs/_sources/scattertext.termscoring.rst.txt","size":1485,"blob_sha":"511c2cf7b885c5e5f781d5551f277f6febd8fc7e","priority":1,"status":200,"text":"scattertext.termscoring package\n===============================\n\nSubmodules\n----------\n\nscattertext.termscoring.BM25Difference module\n---------------------------------------------\n\n.. automodule:: scattertext.termscoring.BM25Difference\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termscoring.CornerScore module\n------------------------------------------\n\n.. automodule:: scattertext.termscoring.CornerScore\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termscoring.LogOddsUniformativePriorScore module\n------------------------------------------------------------\n\n.. automodule:: scattertext.termscoring.LogOddsUniformativePriorScore\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termscoring.OLSUngnarStyle module\n---------------------------------------------\n\n.. automodule:: scattertext.termscoring.OLSUngnarStyle\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termscoring.RankDifference module\n---------------------------------------------\n\n.. automodule:: scattertext.termscoring.RankDifference\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termscoring.ScaledFScore module\n-------------------------------------------\n\n.. automodule:: scattertext.termscoring.ScaledFScore\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: scattertext.termscoring\n    :members:\n    :undoc-members:\n    :show-inheritance:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6A0E:241B62:179C05:5DE265:6AB92B3F"},"text_sha256":"443afdedca16d57d4c8186362662e46cde8d8dcc7d888473056142847877225e"},{"path":"docs/_sources/scattertext.termsignificance.rst.txt","size":1531,"blob_sha":"c9cca8b4329184861c1dd54bd3e7153484db1874","priority":1,"status":200,"text":"scattertext.termsignificance package\n====================================\n\nSubmodules\n----------\n\nscattertext.termsignificance.LogOddsRatioAddOne module\n------------------------------------------------------\n\n.. automodule:: scattertext.termsignificance.LogOddsRatioAddOne\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termsignificance.LogOddsRatioInformativeDirichletPiror module\n-------------------------------------------------------------------------\n\n.. automodule:: scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior module\n---------------------------------------------------------------------------\n\n.. automodule:: scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termsignificance.ScaledFScoreSignificance module\n------------------------------------------------------------\n\n.. automodule:: scattertext.termsignificance.ScaledFScoreSignificance\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nscattertext.termsignificance.TermSignificance module\n----------------------------------------------------\n\n.. automodule:: scattertext.termsignificance.TermSignificance\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\n\nModule contents\n---------------\n\n.. automodule:: scattertext.termsignificance\n    :members:\n    :undoc-members:\n    :show-inheritance:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"987E:2E8679:17C4FE:5E08A9:6AB92B39"},"text_sha256":"13f6075c3d104031585d08c8b7f00ff0e051d50ba61b73cc1fd0b98e1168d3a0"},{"path":"docs/scattertext.termscoring.html","size":40145,"blob_sha":"b8a9c02a670890dba022fda1f34cf945a63b870c","priority":1,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring package &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <div class=\"section\" id=\"scattertext-termscoring-package\">\n<h1>scattertext.termscoring package<a class=\"headerlink\" href=\"#scattertext-termscoring-package\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<div class=\"section\" id=\"submodules\">\n<h2>Submodules<a class=\"headerlink\" href=\"#submodules\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.BM25Difference\">\n<span id=\"scattertext-termscoring-bm25difference-module\"><\/span><h2>scattertext.termscoring.BM25Difference module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.BM25Difference\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.BM25Difference.BM25Difference\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.BM25Difference.<\/code><code class=\"descname\">BM25Difference<\/code><span class=\"sig-paren\">(<\/span><em>corpus<\/em>, <em>k1=1.2<\/em>, <em>b=0.95<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/BM25Difference.html#BM25Difference\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.BM25Difference.BM25Difference\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<p>Designed for use only in the term_scorer argument.\nThis should really be inherit specific type.<\/p>\n<dl class=\"docutils\">\n<dt>html = st.produce_frequency_explorer(<\/dt>\n<dd>corpus,\ncategory=’Positive’,\nnot_categories=[‘Negative’],\nneutral_categories=[‘Plot’],\nterm_scorer=BM25(corpus).set_categories(‘Positive’, [‘Negative’], [‘Plot’]),\nmetadata=rdf[‘movie_name’],\ngrey_threshold=0,\nshow_neutral=True<\/dd>\n<\/dl>\n<p>)\nfile_name = ‘output/rotten_fresh_bm25.html’\nopen(file_name, ‘wb’).write(html.encode(‘utf-8’))\nIFrame(src=file_name, width=1300, height=700)<\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.BM25Difference.BM25Difference.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/BM25Difference.html#BM25Difference.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.BM25Difference.BM25Difference.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.BM25Difference.BM25Difference.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>a<\/em>, <em>b<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/BM25Difference.html#BM25Difference.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.BM25Difference.BM25Difference.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>In this case, parameters a and b aren’t used, since this information is taken\ndirectly from the corpus categories.<\/p>\n<p>a\nb<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.BM25Difference.BM25Difference.set_categories\">\n<code class=\"descname\">set_categories<\/code><span class=\"sig-paren\">(<\/span><em>category_name<\/em>, <em>not_category_names=[]<\/em>, <em>neutral_category_names=[]<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/BM25Difference.html#BM25Difference.set_categories\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.BM25Difference.BM25Difference.set_categories\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Specify the category to score. Optionally, score against a specific set of categories.<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.CornerScore\">\n<span id=\"scattertext-termscoring-cornerscore-module\"><\/span><h2>scattertext.termscoring.CornerScore module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.CornerScore\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.CornerScore.CornerScore\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.CornerScore.<\/code><code class=\"descname\">CornerScore<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/CornerScore.html#CornerScore\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.CornerScore.CornerScore\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.CornerScore.CornerScore.get_scores\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/CornerScore.html#CornerScore.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.CornerScore.CornerScore.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.CornerScore.CornerScore.get_scores_for_category\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_scores_for_category<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/CornerScore.html#CornerScore.get_scores_for_category\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.CornerScore.CornerScore.get_scores_for_category\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.LogOddsUniformativePriorScore\">\n<span id=\"scattertext-termscoring-logoddsuniformativepriorscore-module\"><\/span><h2>scattertext.termscoring.LogOddsUniformativePriorScore module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.LogOddsUniformativePriorScore\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.LogOddsUniformativePriorScore.<\/code><code class=\"descname\">LogOddsUninformativePriorScore<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html#LogOddsUninformativePriorScore\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_delta_hats\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_delta_hats<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em>, <em>alpha_w=0.01<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html#LogOddsUninformativePriorScore.get_delta_hats\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_delta_hats\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_score\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_score<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em>, <em>alpha_w=0.01<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html#LogOddsUninformativePriorScore.get_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_thresholded_score\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_thresholded_score<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em>, <em>alpha_w=0.01<\/em>, <em>threshold=0.1<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html#LogOddsUninformativePriorScore.get_thresholded_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_thresholded_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.OLSUngnarStyle\">\n<span id=\"scattertext-termscoring-olsungnarstyle-module\"><\/span><h2>scattertext.termscoring.OLSUngnarStyle module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.OLSUngnarStyle\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.OLSUngnarStyle.<\/code><code class=\"descname\">OLSUngarStyle<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/OLSUngnarStyle.html#OLSUngarStyle\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle.get_scores_and_p_values\">\n<code class=\"descname\">get_scores_and_p_values<\/code><span class=\"sig-paren\">(<\/span><em>tdm<\/em>, <em>category<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/OLSUngnarStyle.html#OLSUngarStyle.get_scores_and_p_values\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle.get_scores_and_p_values\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>tdm: TermDocMatrix\ncategory: str, category name<\/p>\n<p>pd.DataFrame([‘coef’, ‘p-val’])<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.RankDifference\">\n<span id=\"scattertext-termscoring-rankdifference-module\"><\/span><h2>scattertext.termscoring.RankDifference module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.RankDifference\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.RankDifference.RankDifference\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.RankDifference.<\/code><code class=\"descname\">RankDifference<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/RankDifference.html#RankDifference\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.RankDifference.RankDifference\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.RankDifference.RankDifference.get_default_score\">\n<code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/RankDifference.html#RankDifference.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.RankDifference.RankDifference.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.RankDifference.RankDifference.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/RankDifference.html#RankDifference.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.RankDifference.RankDifference.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.RankDifference.RankDifference.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>a<\/em>, <em>b<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/RankDifference.html#RankDifference.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.RankDifference.RankDifference.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring.ScaledFScore\">\n<span id=\"scattertext-termscoring-scaledfscore-module\"><\/span><h2>scattertext.termscoring.ScaledFScore module<a class=\"headerlink\" href=\"#module-scattertext.termscoring.ScaledFScore\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"exception\">\n<dt id=\"scattertext.termscoring.ScaledFScore.InvalidScalerException\">\n<em class=\"property\">exception <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">InvalidScalerException<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#InvalidScalerException\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.InvalidScalerException\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">Exception<\/span><\/code><\/p>\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScore\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScaledFScore<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScore\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScore\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScore.get_default_score\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScore.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScore.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em>, <em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScore.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Computes balanced scaled f-scores\nParameters\n———-\ncat_word_counts : np.array<\/p>\n<blockquote>\n<div>category counts<\/div><\/blockquote>\n<dl class=\"docutils\">\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<dt>scaler_algo <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">str<\/span><\/dt>\n<dd>Function that scales an array to a range in [0 and 1]. Use ‘percentile’, ‘normcdf’. Default.<\/dd>\n<dt>beta <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">float<\/span><\/dt>\n<dd>Beta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Default.<\/dd>\n<\/dl>\n<blockquote>\n<div><p>np.array\nHarmonic means of scaled P(word|category)<\/p>\n<blockquote>\n<div>and scaled P(category|word) for &gt;median half of scores.  Low scores are harmonic means\nof scaled P(word|~category) and scaled P(~category|word).  Array is squashed to between\n0 and 1, with 0.5 indicating a median score.<\/div><\/blockquote>\n<\/div><\/blockquote>\n<\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores_for_category\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_scores_for_category<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em>, <em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScore.get_scores_for_category\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores_for_category\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Computes unbalanced scaled-fscores\nParameters\n———-\ncategory : str<\/p>\n<blockquote>\n<div>category name to score<\/div><\/blockquote>\n<dl class=\"docutils\">\n<dt>scaler_algo <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">str<\/span><\/dt>\n<dd>Function that scales an array to a range in [0 and 1]. Use ‘percentile’, ‘normcdf’. Default normcdf<\/dd>\n<dt>beta <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">float<\/span><\/dt>\n<dd>Beta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Defaults to 1.<\/dd>\n<\/dl>\n<blockquote>\n<div>np.array of harmonic means of scaled P(word|category) and scaled P(category|word).<\/div><\/blockquote>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScaledFScorePresets<\/code><span class=\"sig-paren\">(<\/span><em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em>, <em>one_to_neg_one=False<\/em>, <em>priors=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresets\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_default_score\">\n<code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresets.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresets.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresets.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>category counts<\/dd>\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores_for_category\">\n<code class=\"descname\">get_scores_for_category<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresets.get_scores_for_category\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores_for_category\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>category counts<\/dd>\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScaledFScorePresetsNeg1To1<\/code><span class=\"sig-paren\">(<\/span><em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em>, <em>one_to_neg_one=False<\/em>, <em>priors=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresetsNeg1To1\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets\" title=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termscoring.ScaledFScore.ScaledFScorePresets<\/span><\/code><\/a><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_default_score\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresetsNeg1To1.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFScorePresetsNeg1To1.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>category counts<\/dd>\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScaledFZScore<\/code><span class=\"sig-paren\">(<\/span><em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em>, <em>one_to_neg_one=False<\/em>, <em>priors=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFScorePresets\" title=\"scattertext.termscoring.ScaledFScore.ScaledFScorePresets\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termscoring.ScaledFScore.ScaledFScorePresets<\/span><\/code><\/a><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore.get_default_score\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore.get_p_vals\">\n<code class=\"descname\">get_p_vals<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore.get_p_vals\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_p_vals\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class. None by default<\/dd>\n<\/dl>\n<p>np.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore.get_score_deltas\">\n<code class=\"descname\">get_score_deltas<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore.get_score_deltas\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_score_deltas\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScore.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScore.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>category counts<\/dd>\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScorePrior\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScaledFZScorePrior<\/code><span class=\"sig-paren\">(<\/span><em>prior<\/em>, <em>alpha=1<\/em>, <em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScorePrior\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScore\" title=\"scattertext.termscoring.ScaledFScore.ScaledFZScore\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termscoring.ScaledFScore.ScaledFZScore<\/span><\/code><\/a><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.apply_prior\">\n<code class=\"descname\">apply_prior<\/code><span class=\"sig-paren\">(<\/span><em>c<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScorePrior.apply_prior\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.apply_prior\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScorePrior.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_score_deltas\">\n<code class=\"descname\">get_score_deltas<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScorePrior.get_score_deltas\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_score_deltas\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_word_counts<\/em>, <em>not_cat_word_counts<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScaledFZScorePrior.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>category counts<\/dd>\n<dt>not_cat_word_counts <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>not category counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScoreBalancer\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termscoring.ScaledFScore.<\/code><code class=\"descname\">ScoreBalancer<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScoreBalancer\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScoreBalancer\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores\">\n<em class=\"property\">static <\/em><code class=\"descname\">balance_scores<\/code><span class=\"sig-paren\">(<\/span><em>cat_scores<\/em>, <em>not_cat_scores<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScoreBalancer.balance_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores_and_dont_scale\">\n<em class=\"property\">static <\/em><code class=\"descname\">balance_scores_and_dont_scale<\/code><span class=\"sig-paren\">(<\/span><em>cat_scores<\/em>, <em>not_cat_scores<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termscoring/ScaledFScore.html#ScoreBalancer.balance_scores_and_dont_scale\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores_and_dont_scale\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>median = np.median(cat_scores)\nscores = np.zeros(len(cat_scores)).astype(np.float)\nscores[cat_scores &gt; median] = cat_scores[cat_scores &gt; median]\nnot_cat_mask = cat_scores &lt; median if median != 0 else cat_scores &lt;= median\nscores[not_cat_mask] = -not_cat_scores[not_cat_mask]<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termscoring\">\n<span id=\"module-contents\"><\/span><h2>Module contents<a class=\"headerlink\" href=\"#module-scattertext.termscoring\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<\/div>\n<\/div>\n\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h3><a href=\"index.html\">Table Of Contents<\/a><\/h3>\n  <ul>\n<li><a class=\"reference internal\" href=\"#\">scattertext.termscoring package<\/a><ul>\n<li><a class=\"reference internal\" href=\"#submodules\">Submodules<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.BM25Difference\">scattertext.termscoring.BM25Difference module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.CornerScore\">scattertext.termscoring.CornerScore module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.LogOddsUniformativePriorScore\">scattertext.termscoring.LogOddsUniformativePriorScore module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.OLSUngnarStyle\">scattertext.termscoring.OLSUngnarStyle module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.RankDifference\">scattertext.termscoring.RankDifference module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring.ScaledFScore\">scattertext.termscoring.ScaledFScore module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termscoring\">Module contents<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"index.html\">Documentation overview<\/a><ul>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n  <div role=\"note\" aria-label=\"source link\">\n    <h3>This Page<\/h3>\n    <ul class=\"this-page-menu\">\n      <li><a href=\"_sources/scattertext.termscoring.rst.txt\"\n            rel=\"nofollow\">Show Source<\/a><\/li>\n    <\/ul>\n   <\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n      |\n      <a href=\"_sources/scattertext.termscoring.rst.txt\"\n          rel=\"nofollow\">Page source<\/a>\n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2302:3B1F3:184E79:5E9546:6AB92B3F"},"text_sha256":"ba5cd7e5330fa9512f986ab66c66f6cb2f29336608bfa80f1600dd7b3a47723b"},{"path":"docs/scattertext.termsignificance.html","size":32903,"blob_sha":"21a808f0b3868d1c2fab7e4ea3b3bf2b2c1652f0","priority":1,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance package &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <div class=\"section\" id=\"scattertext-termsignificance-package\">\n<h1>scattertext.termsignificance package<a class=\"headerlink\" href=\"#scattertext-termsignificance-package\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<div class=\"section\" id=\"submodules\">\n<h2>Submodules<a class=\"headerlink\" href=\"#submodules\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance.LogOddsRatioAddOne\">\n<span id=\"scattertext-termsignificance-logoddsratioaddone-module\"><\/span><h2>scattertext.termsignificance.LogOddsRatioAddOne module<a class=\"headerlink\" href=\"#module-scattertext.termsignificance.LogOddsRatioAddOne\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioAddOne.<\/code><code class=\"descname\">LogOddsRatioAddOne<\/code><span class=\"sig-paren\">(<\/span><em>alpha_w=1<\/em>, <em>ranker=&lt;class 'scattertext.termranking.AbsoluteFrequencyRanker.AbsoluteFrequencyRanker'&gt;<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termsignificance.TermSignificance.TermSignificance\" title=\"scattertext.termsignificance.TermSignificance.TermSignificance\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termsignificance.TermSignificance.TermSignificance<\/span><\/code><\/a><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_default_score\">\n<code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals\">\n<code class=\"descname\">get_p_vals<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_p_vals\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class. None by default<\/dd>\n<\/dl>\n<p>np.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals_given_separate_counts\">\n<code class=\"descname\">get_p_vals_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_p_vals_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>Returns\nnp.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Same function as get_zeta_i_j_given_separate_counts<\/p>\n<dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j\">\n<code class=\"descname\">get_zeta_i_j<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_zeta_i_j\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class. None by default<\/dd>\n<\/dl>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j_given_separate_counts\">\n<code class=\"descname\">get_zeta_i_j_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#LogOddsRatioAddOne.get_zeta_i_j_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positi ve class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"function\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioAddOne.z_to_p_val\">\n<code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioAddOne.<\/code><code class=\"descname\">z_to_p_val<\/code><span class=\"sig-paren\">(<\/span><em>z_scores<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioAddOne.html#z_to_p_val\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioAddOne.z_to_p_val\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror\">\n<span id=\"scattertext-termsignificance-logoddsratioinformativedirichletpiror-module\"><\/span><h2>scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror module<a class=\"headerlink\" href=\"#module-scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.<\/code><code class=\"descname\">LogOddsRatioInformativeDirichletPrior<\/code><span class=\"sig-paren\">(<\/span><em>priors<\/em>, <em>sigma=10<\/em>, <em>scale_type='none'<\/em>, <em>prior_power=1<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html#LogOddsRatioInformativeDirichletPrior\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior\" title=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior<\/span><\/code><\/a><\/p>\n<dl class=\"docutils\">\n<dt>Implements the log-odds-ratio with an uninformative dirichlet prior from<\/dt>\n<dd>Monroe, B. L., Colaresi, M. P., &amp; Quinn, K. M. (2008). Fightin’ words: Lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis, 16(4), 372–403.<\/dd>\n<\/dl>\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html#LogOddsRatioInformativeDirichletPrior.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_priors\">\n<code class=\"descname\">get_priors<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html#LogOddsRatioInformativeDirichletPrior.get_priors\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_priors\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_zeta_i_j_given_separate_counts\">\n<code class=\"descname\">get_zeta_i_j_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html#LogOddsRatioInformativeDirichletPrior.get_zeta_i_j_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_zeta_i_j_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"function\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.z_to_p_val\">\n<code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.<\/code><code class=\"descname\">z_to_p_val<\/code><span class=\"sig-paren\">(<\/span><em>z_scores<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html#z_to_p_val\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.z_to_p_val\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior\">\n<span id=\"scattertext-termsignificance-logoddsratiouninformativedirichletprior-module\"><\/span><h2>scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior module<a class=\"headerlink\" href=\"#module-scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.<\/code><code class=\"descname\">LogOddsRatioUninformativeDirichletPrior<\/code><span class=\"sig-paren\">(<\/span><em>alpha_w=0.001<\/em>, <em>ranker=&lt;class 'scattertext.termranking.AbsoluteFrequencyRanker.AbsoluteFrequencyRanker'&gt;<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termsignificance.TermSignificance.TermSignificance\" title=\"scattertext.termsignificance.TermSignificance.TermSignificance\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termsignificance.TermSignificance.TermSignificance<\/span><\/code><\/a><\/p>\n<dl class=\"docutils\">\n<dt>Implements the log-odds-ratio with an uninformative dirichlet prior from<\/dt>\n<dd>Monroe, B. L., Colaresi, M. P., &amp; Quinn, K. M. (2008). Fightin’ words: Lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis, 16(4), 372–403.<\/dd>\n<\/dl>\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_default_score\">\n<code class=\"descname\">get_default_score<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_default_score\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_default_score\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals\">\n<code class=\"descname\">get_p_vals<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_p_vals\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class. None by default<\/dd>\n<\/dl>\n<p>np.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals_given_separate_counts\">\n<code class=\"descname\">get_p_vals_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_p_vals_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>Returns\nnp.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_values_from_counts\">\n<code class=\"descname\">get_p_values_from_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_p_values_from_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_values_from_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_scores\">\n<code class=\"descname\">get_scores<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_scores\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_scores\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Same function as get_zeta_i_j_given_separate_counts<\/p>\n<dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j\">\n<code class=\"descname\">get_zeta_i_j<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class. None by default<\/dd>\n<\/dl>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j_given_separate_counts\">\n<code class=\"descname\">get_zeta_i_j_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>y_i<\/em>, <em>y_j<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>y_i, np.array(int)<\/dt>\n<dd>Arrays of word counts of words occurring in positive class<\/dd>\n<\/dl>\n<p>y_j, np.array(int)<\/p>\n<p>np.array of z-scores<\/p>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"function\">\n<dt id=\"scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.z_to_p_val\">\n<code class=\"descclassname\">scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.<\/code><code class=\"descname\">z_to_p_val<\/code><span class=\"sig-paren\">(<\/span><em>z_scores<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html#z_to_p_val\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.z_to_p_val\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance.ScaledFScoreSignificance\">\n<span id=\"scattertext-termsignificance-scaledfscoresignificance-module\"><\/span><h2>scattertext.termsignificance.ScaledFScoreSignificance module<a class=\"headerlink\" href=\"#module-scattertext.termsignificance.ScaledFScoreSignificance\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termsignificance.ScaledFScoreSignificance.<\/code><code class=\"descname\">ScaledFScoreSignificance<\/code><span class=\"sig-paren\">(<\/span><em>scaler_algo='normcdf'<\/em>, <em>beta=2<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/ScaledFScoreSignificance.html#ScaledFScoreSignificance\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <a class=\"reference internal\" href=\"#scattertext.termsignificance.TermSignificance.TermSignificance\" title=\"scattertext.termsignificance.TermSignificance.TermSignificance\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">scattertext.termsignificance.TermSignificance.TermSignificance<\/span><\/code><\/a><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_name\">\n<code class=\"descname\">get_name<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/ScaledFScoreSignificance.html#ScaledFScoreSignificance.get_name\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_name\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_p_vals\">\n<code class=\"descname\">get_p_vals<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/ScaledFScoreSignificance.html#ScaledFScoreSignificance.get_p_vals\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_p_vals\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Imputes p-values from the Z-scores of <cite>ScaledFScore<\/cite> scores.  Assuming incorrectly\nthat the scaled f-scores are normally distributed.<\/p>\n<dl class=\"docutils\">\n<dt>X <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Array of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the\npositive class, while X[:,1] is the negative class.<\/dd>\n<\/dl>\n<p>np.array of p-values<\/p>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_zeta_i_j_given_separate_counts\">\n<code class=\"descname\">get_zeta_i_j_given_separate_counts<\/code><span class=\"sig-paren\">(<\/span><em>cat<\/em>, <em>ncat<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/ScaledFScoreSignificance.html#ScaledFScoreSignificance.get_zeta_i_j_given_separate_counts\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_zeta_i_j_given_separate_counts\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><dl class=\"docutils\">\n<dt>cat <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>In category word counts<\/dd>\n<dt>ncat <span class=\"classifier-delimiter\">:<\/span> <span class=\"classifier\">np.array<\/span><\/dt>\n<dd>Out of category word counts<\/dd>\n<\/dl>\n<dl class=\"docutils\">\n<dt>np.array<\/dt>\n<dd>Z-scores<\/dd>\n<\/dl>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance.TermSignificance\">\n<span id=\"scattertext-termsignificance-termsignificance-module\"><\/span><h2>scattertext.termsignificance.TermSignificance module<a class=\"headerlink\" href=\"#module-scattertext.termsignificance.TermSignificance\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<dl class=\"class\">\n<dt id=\"scattertext.termsignificance.TermSignificance.TermSignificance\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">scattertext.termsignificance.TermSignificance.<\/code><code class=\"descname\">TermSignificance<\/code><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/TermSignificance.html#TermSignificance\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.TermSignificance.TermSignificance\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object<\/span><\/code><\/p>\n<dl class=\"method\">\n<dt id=\"scattertext.termsignificance.TermSignificance.TermSignificance.get_p_vals\">\n<code class=\"descname\">get_p_vals<\/code><span class=\"sig-paren\">(<\/span><em>X<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/scattertext/termsignificance/TermSignificance.html#TermSignificance.get_p_vals\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#scattertext.termsignificance.TermSignificance.TermSignificance.get_p_vals\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-scattertext.termsignificance\">\n<span id=\"module-contents\"><\/span><h2>Module contents<a class=\"headerlink\" href=\"#module-scattertext.termsignificance\" title=\"Permalink to this headline\">¶<\/a><\/h2>\n<\/div>\n<\/div>\n\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h3><a href=\"index.html\">Table Of Contents<\/a><\/h3>\n  <ul>\n<li><a class=\"reference internal\" href=\"#\">scattertext.termsignificance package<\/a><ul>\n<li><a class=\"reference internal\" href=\"#submodules\">Submodules<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance.LogOddsRatioAddOne\">scattertext.termsignificance.LogOddsRatioAddOne module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror\">scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior\">scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance.ScaledFScoreSignificance\">scattertext.termsignificance.ScaledFScoreSignificance module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance.TermSignificance\">scattertext.termsignificance.TermSignificance module<\/a><\/li>\n<li><a class=\"reference internal\" href=\"#module-scattertext.termsignificance\">Module contents<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"index.html\">Documentation overview<\/a><ul>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n  <div role=\"note\" aria-label=\"source link\">\n    <h3>This Page<\/h3>\n    <ul class=\"this-page-menu\">\n      <li><a href=\"_sources/scattertext.termsignificance.rst.txt\"\n            rel=\"nofollow\">Show Source<\/a><\/li>\n    <\/ul>\n   <\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n      |\n      <a href=\"_sources/scattertext.termsignificance.rst.txt\"\n          rel=\"nofollow\">Page source<\/a>\n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52FC:149227:181143:5E57FF:6AB92B3F"},"text_sha256":"5590d6bb72040e3625b15766e057987bf84ffffd718505b8b5aa637d4c6ef4a5"},{"path":"docs/_modules/scattertext/termscoring/BM25Difference.html","size":16978,"blob_sha":"fcdb267156a6cd3db79a76cf747eaf1043a52fc9","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.BM25Difference &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.BM25Difference<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">pandas<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">pd<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n\n<div class=\"viewcode-block\" id=\"BM25Difference\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.BM25Difference.BM25Difference\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">BM25Difference<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\tDesigned for use only in the term_scorer argument.<\/span>\n<span class=\"sd\">\tThis should really be inherit specific type.<\/span>\n\n<span class=\"sd\">\thtml = st.produce_frequency_explorer(<\/span>\n<span class=\"sd\">\t\tcorpus,<\/span>\n<span class=\"sd\">\t\tcategory=&#39;Positive&#39;,<\/span>\n<span class=\"sd\">\t\tnot_categories=[&#39;Negative&#39;],<\/span>\n<span class=\"sd\">\t\tneutral_categories=[&#39;Plot&#39;],<\/span>\n<span class=\"sd\">\t\tterm_scorer=BM25(corpus).set_categories(&#39;Positive&#39;, [&#39;Negative&#39;], [&#39;Plot&#39;]),<\/span>\n<span class=\"sd\">\t\tmetadata=rdf[&#39;movie_name&#39;],<\/span>\n<span class=\"sd\">\t\tgrey_threshold=0,<\/span>\n<span class=\"sd\">\t\tshow_neutral=True<\/span>\n<span class=\"sd\">\t)<\/span>\n<span class=\"sd\">\tfile_name = &#39;output/rotten_fresh_bm25.html&#39;<\/span>\n<span class=\"sd\">\topen(file_name, &#39;wb&#39;).write(html.encode(&#39;utf-8&#39;))<\/span>\n<span class=\"sd\">\tIFrame(src=file_name, width=1300, height=700)<\/span>\n<span class=\"sd\">\t&#39;&#39;&#39;<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">corpus<\/span><span class=\"p\">,<\/span> <span class=\"n\">k1<\/span><span class=\"o\">=<\/span><span class=\"mf\">1.2<\/span><span class=\"p\">,<\/span> <span class=\"n\">b<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.95<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">k1<\/span> <span class=\"o\">=<\/span> <span class=\"n\">k1<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">b<\/span> <span class=\"o\">=<\/span> <span class=\"n\">b<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">corpus<\/span> <span class=\"o\">=<\/span> <span class=\"n\">corpus<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">category_names<\/span> <span class=\"o\">=<\/span> <span class=\"n\">corpus<\/span><span class=\"o\">.<\/span><span class=\"n\">get_categories<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">category_ids<\/span> <span class=\"o\">=<\/span> <span class=\"n\">corpus<\/span><span class=\"o\">.<\/span><span class=\"n\">_y<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n\n<div class=\"viewcode-block\" id=\"BM25Difference.set_categories\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.BM25Difference.BM25Difference.set_categories\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">set_categories<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">category_name<\/span><span class=\"p\">,<\/span>\n\t                   <span class=\"n\">not_category_names<\/span><span class=\"o\">=<\/span><span class=\"p\">[],<\/span>\n\t                   <span class=\"n\">neutral_category_names<\/span><span class=\"o\">=<\/span><span class=\"p\">[]):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tSpecify the category to score. Optionally, score against a specific set of categories.<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">tdf<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">corpus<\/span><span class=\"o\">.<\/span><span class=\"n\">get_term_freq_df<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">d<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"s1\">&#39;cat&#39;<\/span><span class=\"p\">:<\/span> <span class=\"n\">tdf<\/span><span class=\"p\">[<\/span><span class=\"n\">category_name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39; freq&#39;<\/span><span class=\"p\">]}<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">not_category_names<\/span> <span class=\"o\">==<\/span> <span class=\"p\">[]:<\/span>\n\t\t\t<span class=\"n\">not_category_names<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">c<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39; freq&#39;<\/span> <span class=\"k\">for<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">corpus<\/span><span class=\"o\">.<\/span><span class=\"n\">get_categories<\/span><span class=\"p\">()<\/span>\n\t\t\t                      <span class=\"k\">if<\/span> <span class=\"n\">c<\/span> <span class=\"o\">!=<\/span> <span class=\"n\">category_name<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">not_category_names<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">c<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39; freq&#39;<\/span> <span class=\"k\">for<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">not_category_names<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"n\">d<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;ncat&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tdf<\/span><span class=\"p\">[<\/span><span class=\"n\">not_category_names<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">neutral_category_names<\/span> <span class=\"o\">==<\/span> <span class=\"p\">[]:<\/span>\n\t\t\t<span class=\"n\">neutral_category_names<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">c<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39; freq&#39;<\/span> <span class=\"k\">for<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">corpus<\/span><span class=\"o\">.<\/span><span class=\"n\">get_categories<\/span><span class=\"p\">()<\/span>\n\t\t\t                          <span class=\"k\">if<\/span> <span class=\"n\">c<\/span> <span class=\"o\">!=<\/span> <span class=\"n\">category_name<\/span> <span class=\"ow\">and<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">not<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">not_category_names<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">neutral_category_names<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">c<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39; freq&#39;<\/span> <span class=\"k\">for<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">neutral_category_names<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">for<\/span> <span class=\"n\">i<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">enumerate<\/span><span class=\"p\">(<\/span><span class=\"n\">neutral_category_names<\/span><span class=\"p\">):<\/span>\n\t\t\t<span class=\"n\">d<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;neut<\/span><span class=\"si\">%s<\/span><span class=\"s1\">&#39;<\/span> <span class=\"o\">%<\/span> <span class=\"p\">(<\/span><span class=\"n\">i<\/span><span class=\"p\">)]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tdf<\/span><span class=\"p\">[<\/span><span class=\"n\">c<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">(<\/span><span class=\"n\">d<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"bp\">self<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BM25Difference.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.BM25Difference.BM25Difference.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">a<\/span><span class=\"p\">,<\/span> <span class=\"n\">b<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tIn this case, parameters a and b aren&#39;t used, since this information is taken<\/span>\n<span class=\"sd\">\t\tdirectly from the corpus categories.<\/span>\n\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ta<\/span>\n<span class=\"sd\">\t\tb<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">raise<\/span> <span class=\"ne\">Exception<\/span><span class=\"p\">(<\/span><span class=\"s2\">&quot;Use set_category_name(&#39;category name&#39;, [&#39;not category name&#39;, ...]) &quot;<\/span> <span class=\"o\">+<\/span>\n\t\t\t                <span class=\"s2\">&quot;to set the category of interest&quot;<\/span><span class=\"p\">)<\/span>\n\n\t\t<span class=\"n\">avgdl<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">mean<\/span><span class=\"p\">()<\/span>\n\n\t\t<span class=\"k\">def<\/span> <span class=\"nf\">idf<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">):<\/span>\n\t\t\t<span class=\"c1\"># Number of categories with term<\/span>\n\t\t\t<span class=\"n\">n_q<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"nb\">int<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t\t<span class=\"n\">N<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span><span class=\"p\">)<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">N<\/span> <span class=\"o\">-<\/span> <span class=\"n\">n_q<\/span> <span class=\"o\">+<\/span> <span class=\"mf\">0.5<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">n_q<\/span> <span class=\"o\">+<\/span> <span class=\"mf\">0.5<\/span><span class=\"p\">)<\/span>\n\n\t\t<span class=\"k\">def<\/span> <span class=\"nf\">length_adjusted_tf<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">):<\/span>\n\t\t\t<span class=\"n\">tf<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span><span class=\"p\">[<\/span><span class=\"n\">cat<\/span><span class=\"p\">]<\/span>\n\t\t\t<span class=\"n\">dl<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">tdf<\/span><span class=\"p\">[<\/span><span class=\"n\">cat<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"p\">((<\/span><span class=\"n\">tf<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">k1<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">))<\/span>\n\t\t\t        <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">tf<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">k1<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"mi\">1<\/span> <span class=\"o\">-<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">b<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">b<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"n\">dl<\/span> <span class=\"o\">/<\/span> <span class=\"n\">avgdl<\/span><span class=\"p\">))))<\/span>\n\n\t\t<span class=\"k\">def<\/span> <span class=\"nf\">bm25_score<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">):<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">length_adjusted_tf<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">idf<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">))<\/span>\n\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">bm25_score<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;cat&#39;<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"n\">bm25_score<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;ncat&#39;<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BM25Difference.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.BM25Difference.BM25Difference.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s1\">&#39;BM25 difference&#39;<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4342:24970A:184C9C:5E906D:6AB92B40"},"text_sha256":"5f393816452f32e4bdc94370c39b046d65d4a1551dd4c858f02785dc57e1fbd7"},{"path":"docs/_modules/scattertext/termscoring/CornerScore.html","size":9817,"blob_sha":"4c843122eba22b53bdbb770d60231bd051209e1d","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.CornerScore &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.CornerScore<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.stats<\/span> <span class=\"k\">import<\/span> <span class=\"n\">rankdata<\/span>\n\n\n<div class=\"viewcode-block\" id=\"CornerScore\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.CornerScore.CornerScore\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">CornerScore<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"CornerScore.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.CornerScore.CornerScore.get_scores\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">pos<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">neg<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">pos<\/span><span class=\"p\">,<\/span> <span class=\"n\">neg<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">zeros<\/span><span class=\"p\">(<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span> \\\n\t\t\t<span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"n\">cat_scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">not_cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">cat_scores<\/span><span class=\"p\">]<\/span> \\\n\t\t\t<span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">[<\/span><span class=\"n\">not_cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">cat_scores<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">((<\/span><span class=\"n\">scores<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">))<\/span> <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"mi\">2<\/span>\n\n<div class=\"viewcode-block\" id=\"CornerScore.get_scores_for_category\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.CornerScore.CornerScore.get_scores_for_category\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">cat_pctls<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_percentiles_from_freqs<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">not_cat_pctls<\/span> <span class=\"o\">=<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_percentiles_from_freqs<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">CornerScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_distance_from_upper_left<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_pctls<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_pctls<\/span><span class=\"p\">)<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_distance_from_upper_left<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_pctls<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_pctls<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">linalg<\/span><span class=\"o\">.<\/span><span class=\"n\">norm<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">([<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">])<\/span> <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">(<\/span><span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"nb\">zip<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_pctls<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_pctls<\/span><span class=\"p\">))),<\/span>\n\t\t                      <span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_percentiles_from_freqs<\/span><span class=\"p\">(<\/span><span class=\"n\">freqs<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">freqs<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">freqs<\/span><span class=\"p\">)<\/span><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BBE2:3EACB:17AA44:5DF05C:6AB92B2A"},"text_sha256":"dce1511f76e2f3d88cbd6e451c56ff89ac246ba3b13ad282655e6df66e3381f4"},{"path":"docs/_modules/scattertext/termscoring/LogOddsUniformativePriorScore.html","size":10782,"blob_sha":"ccd0ecdefa0365ab297b3be0492833d084834266","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.LogOddsUniformativePriorScore &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.LogOddsUniformativePriorScore<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termsignificance<\/span> <span class=\"k\">import<\/span> <span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span>\n\n\n<div class=\"viewcode-block\" id=\"LogOddsUninformativePriorScore\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">LogOddsUninformativePriorScore<\/span><span class=\"p\">:<\/span>\n<div class=\"viewcode-block\" id=\"LogOddsUninformativePriorScore.get_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_score\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_score<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">X<\/span> <span class=\"o\">=<\/span> <span class=\"n\">LogOddsUninformativePriorScore<\/span><span class=\"o\">.<\/span> \\\n\t\t\t<span class=\"n\">_turn_counts_into_matrix<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">p_vals<\/span> <span class=\"o\">=<\/span> <span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">alpha_w<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">LogOddsUninformativePriorScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_turn_pvals_into_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">p_vals<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_delta_hats<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">alpha_w<\/span><span class=\"p\">)<\/span>\n\t\t        <span class=\"o\">.<\/span><span class=\"n\">get_log_odds_with_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">LogOddsUninformativePriorScore<\/span>\n\t\t                                 <span class=\"o\">.<\/span><span class=\"n\">_turn_counts_into_matrix<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                           <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)))<\/span>\n\n<div class=\"viewcode-block\" id=\"LogOddsUninformativePriorScore.get_delta_hats\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_delta_hats\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_delta_hats<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">alpha_w<\/span><span class=\"p\">)<\/span>\n\t\t        <span class=\"o\">.<\/span><span class=\"n\">get_log_odds_with_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">LogOddsUninformativePriorScore<\/span>\n\t\t                                 <span class=\"o\">.<\/span><span class=\"n\">_turn_counts_into_matrix<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                           <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsUninformativePriorScore.get_thresholded_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.LogOddsUniformativePriorScore.LogOddsUninformativePriorScore.get_thresholded_score\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_thresholded_score<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t                          <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">,<\/span>\n\t                          <span class=\"n\">threshold<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.1<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">alpha_w<\/span><span class=\"p\">)<\/span>\n\t\t          <span class=\"o\">.<\/span><span class=\"n\">get_p_values_from_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">))<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span>\n\t\t<span class=\"c1\"># scores = (np.min(np.array([1 - scores, scores]), axis=0) &lt;= threshold) * scores<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span> <span class=\"o\">*<\/span> <span class=\"p\">((<\/span><span class=\"n\">scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"o\">-<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">-<\/span> <span class=\"p\">(<\/span><span class=\"n\">threshold<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)))<\/span>\n\t\t                 <span class=\"o\">|<\/span> <span class=\"p\">(<\/span><span class=\"n\">scores<\/span> <span class=\"o\">&gt;<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">-<\/span> <span class=\"p\">(<\/span><span class=\"n\">threshold<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span><span class=\"p\">))))<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_turn_counts_into_matrix<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">([<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">])<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_turn_pvals_into_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">p_vals<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"c1\"># return np.max(np.array([1 - p_vals, p_vals]), axis=0)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"o\">-<\/span><span class=\"p\">((<\/span><span class=\"n\">p_vals<\/span> <span class=\"o\">-<\/span> <span class=\"mf\">0.5<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A640:3EACB:17AA4A:5DF067:6AB92B40"},"text_sha256":"8d17859898a3b81fd7277ebbf5ffe11fa151d0fec2f81a7bbe5107c05757b4b6"},{"path":"docs/_modules/scattertext/termscoring/OLSUngnarStyle.html","size":8242,"blob_sha":"fd6a94d827e40e8b1f6c91c002a0cdb1469e5b6c","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.OLSUngnarStyle &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.OLSUngnarStyle<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.sparse.linalg<\/span> <span class=\"k\">import<\/span> <span class=\"n\">lsqr<\/span>\n\n\n<div class=\"viewcode-block\" id=\"OLSUngarStyle\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">OLSUngarStyle<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"OLSUngarStyle.get_scores_and_p_values\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.OLSUngnarStyle.OLSUngarStyle.get_scores_and_p_values\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores_and_p_values<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">tdm<\/span><span class=\"p\">,<\/span> <span class=\"n\">category<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ttdm: TermDocMatrix<\/span>\n<span class=\"sd\">\t\tcategory: str, category name<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tpd.DataFrame([&#39;coef&#39;, &#39;p-val&#39;])<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">X<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tdm<\/span><span class=\"o\">.<\/span><span class=\"n\">_X<\/span>\n\t\t<span class=\"n\">y<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_make_response_variable_1_or_negative_1<\/span><span class=\"p\">(<\/span><span class=\"n\">category<\/span><span class=\"p\">,<\/span> <span class=\"n\">tdm<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">pX<\/span> <span class=\"o\">=<\/span> <span class=\"n\">X<\/span> <span class=\"o\">/<\/span> <span class=\"n\">X<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">axis<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">ansX<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_anscombe_transform<\/span><span class=\"p\">(<\/span><span class=\"n\">pX<\/span><span class=\"o\">.<\/span><span class=\"n\">copy<\/span><span class=\"p\">())<\/span>\n\t\t<span class=\"n\">B<\/span><span class=\"p\">,<\/span> <span class=\"n\">istop<\/span><span class=\"p\">,<\/span> <span class=\"n\">itn<\/span><span class=\"p\">,<\/span> <span class=\"n\">r1norm<\/span><span class=\"p\">,<\/span> <span class=\"n\">r2norm<\/span><span class=\"p\">,<\/span> <span class=\"n\">anorm<\/span><span class=\"p\">,<\/span> <span class=\"n\">acond<\/span><span class=\"p\">,<\/span> <span class=\"n\">arnorm<\/span><span class=\"p\">,<\/span> <span class=\"n\">xnorm<\/span><span class=\"p\">,<\/span> <span class=\"n\">var<\/span>\\\n\t\t\t<span class=\"o\">=<\/span> <span class=\"n\">lsqr<\/span><span class=\"p\">(<\/span><span class=\"n\">A<\/span><span class=\"o\">=<\/span><span class=\"n\">ansX<\/span><span class=\"p\">,<\/span> <span class=\"n\">b<\/span><span class=\"o\">=<\/span><span class=\"n\">y<\/span><span class=\"p\">,<\/span> <span class=\"n\">calc_var<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span><\/div>\n\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_make_response_variable_1_or_negative_1<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">category<\/span><span class=\"p\">,<\/span> <span class=\"n\">tdm<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcategory, str<\/span>\n<span class=\"sd\">\t\ttdm, TermDocMatrix<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">tdm<\/span><span class=\"o\">.<\/span><span class=\"n\">get_category_names_by_row<\/span><span class=\"p\">()<\/span> <span class=\"o\">==<\/span> <span class=\"n\">category<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"nb\">int<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_anscombe_transform<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tansX<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tcsr_matrix<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">*<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">array<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">)<\/span> <span class=\"o\">+<\/span> <span class=\"mf\">3.<\/span> <span class=\"o\">/<\/span> <span class=\"mi\">8<\/span><span class=\"p\">)<\/span><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77DC:3B6DE:1766D9:5DAC50:6AB92B3F"},"text_sha256":"f35da7315d82d22dc110314e449bd07fd4356b1a154a46237e7e2c29e296ca99"},{"path":"docs/_modules/scattertext/termscoring/RankDifference.html","size":6508,"blob_sha":"7add656e01706878a0a91d39d0d61d47a6960338","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.RankDifference &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.RankDifference<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">pandas<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">pd<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.stats<\/span> <span class=\"k\">import<\/span> <span class=\"n\">rankdata<\/span>\n\n\n<div class=\"viewcode-block\" id=\"RankDifference\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.RankDifference.RankDifference\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">RankDifference<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"RankDifference.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.RankDifference.RankDifference.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">a<\/span><span class=\"p\">,<\/span> <span class=\"n\">b<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">to_ret<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">a<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;dense&#39;<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">a<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;dense&#39;<\/span><span class=\"p\">))<\/span>\n\t\t          <span class=\"o\">-<\/span> <span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">b<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;dense&#39;<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">b<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;dense&#39;<\/span><span class=\"p\">)))<\/span>\n\n\t\t<span class=\"k\">if<\/span> <span class=\"nb\">type<\/span><span class=\"p\">(<\/span><span class=\"n\">a<\/span><span class=\"p\">)<\/span> <span class=\"o\">==<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">Series<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">Series<\/span><span class=\"p\">(<\/span><span class=\"n\">to_ret<\/span><span class=\"p\">,<\/span> <span class=\"n\">index<\/span><span class=\"o\">=<\/span><span class=\"n\">a<\/span><span class=\"o\">.<\/span><span class=\"n\">index<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">to_ret<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"RankDifference.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.RankDifference.RankDifference.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s1\">&#39;Rank Difference&#39;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"RankDifference.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.RankDifference.RankDifference.get_default_score\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2776:3B6DE:1766DF:5DAC5B:6AB92B41"},"text_sha256":"b0bd4825307f77cccffbddbc5aaeeaf2f7e76f6af0ab013ff3ffc37e8521a965"},{"path":"docs/_modules/scattertext/termscoring/ScaledFScore.html","size":52375,"blob_sha":"a26ccb2ceb4296e4b36110997f4969e080e67aa0","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termscoring.ScaledFScore &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termscoring.ScaledFScore<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.stats<\/span> <span class=\"k\">import<\/span> <span class=\"n\">norm<\/span><span class=\"p\">,<\/span> <span class=\"n\">rankdata<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.Common<\/span> <span class=\"k\">import<\/span> <span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">DEFAULT_BETA<\/span>\n\n\n<div class=\"viewcode-block\" id=\"InvalidScalerException\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.InvalidScalerException\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">InvalidScalerException<\/span><span class=\"p\">(<\/span><span class=\"ne\">Exception<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">pass<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScoreBalancer\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScoreBalancer\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScoreBalancer<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"ScoreBalancer.balance_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">balance_scores_and_dont_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">_zero_centered_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">scores<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScoreBalancer.balance_scores_and_dont_scale\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScoreBalancer.balance_scores_and_dont_scale\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">balance_scores_and_dont_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tmedian = np.median(cat_scores)<\/span>\n<span class=\"sd\">\t\tscores = np.zeros(len(cat_scores)).astype(np.float)<\/span>\n<span class=\"sd\">\t\tscores[cat_scores &gt; median] = cat_scores[cat_scores &gt; median]<\/span>\n<span class=\"sd\">\t\tnot_cat_mask = cat_scores &lt; median if median != 0 else cat_scores &lt;= median<\/span>\n<span class=\"sd\">\t\tscores[not_cat_mask] = -not_cat_scores[not_cat_mask]<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">zeros<\/span><span class=\"p\">(<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">))<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">float<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&gt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cat_scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&gt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"n\">not_cat_scores<\/span><span class=\"p\">[<\/span><span class=\"n\">cat_scores<\/span> <span class=\"o\">&lt;<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_zero_centered_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">ar<\/span><span class=\"p\">[<\/span><span class=\"n\">ar<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"p\">[<\/span><span class=\"n\">ar<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"n\">ar<\/span><span class=\"p\">[<\/span><span class=\"n\">ar<\/span> <span class=\"o\">&lt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span><span class=\"p\">(<\/span><span class=\"o\">-<\/span><span class=\"n\">ar<\/span><span class=\"p\">[<\/span><span class=\"n\">ar<\/span> <span class=\"o\">&lt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">ar<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"mf\">2.<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_scale<\/span><span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"p\">)<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">ar<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">ar<\/span><span class=\"o\">.<\/span><span class=\"n\">min<\/span><span class=\"p\">()<\/span> <span class=\"o\">==<\/span> <span class=\"n\">ar<\/span><span class=\"o\">.<\/span><span class=\"n\">max<\/span><span class=\"p\">():<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">full<\/span><span class=\"p\">(<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"p\">),<\/span> <span class=\"mf\">0.5<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">ar<\/span> <span class=\"o\">-<\/span> <span class=\"n\">ar<\/span><span class=\"o\">.<\/span><span class=\"n\">min<\/span><span class=\"p\">())<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">ar<\/span><span class=\"o\">.<\/span><span class=\"n\">max<\/span><span class=\"p\">()<\/span> <span class=\"o\">-<\/span> <span class=\"n\">ar<\/span><span class=\"o\">.<\/span><span class=\"n\">min<\/span><span class=\"p\">())<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresets\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresets\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFScorePresets<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">scaler_algo<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">one_to_neg_one<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">priors<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo_<\/span> <span class=\"o\">=<\/span> <span class=\"n\">scaler_algo<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta_<\/span> <span class=\"o\">=<\/span> <span class=\"n\">beta<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">one_to_neg_one_<\/span> <span class=\"o\">=<\/span> <span class=\"n\">one_to_neg_one<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">priors_<\/span> <span class=\"o\">=<\/span> <span class=\"n\">priors<\/span>\n\t\t<span class=\"k\">assert<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta_<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span>\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresets.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s1\">&#39;Scaled F-Score&#39;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresets.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_default_score\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">one_to_neg_one_<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mf\">0.5<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresets.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tcategory counts<\/span>\n<span class=\"sd\">\t\tnot_cat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tnot category counts<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array<\/span>\n<span class=\"sd\">\t\t\tscores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                          <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">not_cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                              <span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">one_to_neg_one_<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"c1\">#return ScoreBalancer.balance_scores_and_dont_scale(cat_scores, not_cat_scores)<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">*<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span>\n\t\t<span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresets.get_scores_for_category\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresets.get_scores_for_category\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tcategory counts<\/span>\n<span class=\"sd\">\t\tnot_cat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tnot category counts<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array<\/span>\n<span class=\"sd\">\t\t\tscores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">beta<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta_<\/span>\n\t\t<span class=\"k\">assert<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span> <span class=\"o\">==<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">priors_<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">p<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">priors_<\/span>\n\t\t\t<span class=\"k\">assert<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">p<\/span><span class=\"p\">)<\/span> <span class=\"o\">==<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t\t<span class=\"n\">precision<\/span> <span class=\"o\">=<\/span> <span class=\"p\">((<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">p<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span>\n\t\t\t             <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">not_cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">*<\/span> <span class=\"n\">p<\/span><span class=\"p\">))<\/span>\n\t\t\t<span class=\"n\">recall<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">p<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span> <span class=\"o\">+<\/span> <span class=\"n\">p<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">())<\/span>\n\t\t<span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">precision<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">))<\/span>\n\t\t\t<span class=\"n\">recall<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cat_word_counts<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">precision_normcdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_safe_scaler<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo_<\/span><span class=\"p\">,<\/span> <span class=\"n\">precision<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">recall_normcdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_safe_scaler<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo_<\/span><span class=\"p\">,<\/span> <span class=\"n\">recall<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_weighted_h_mean<\/span><span class=\"p\">(<\/span><span class=\"n\">precision_normcdf<\/span><span class=\"p\">,<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">isnan<\/span><span class=\"p\">(<\/span><span class=\"n\">scores<\/span><span class=\"p\">)]<\/span> <span class=\"o\">=<\/span> <span class=\"mf\">0.<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_weighted_h_mean<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">precision_normcdf<\/span><span class=\"p\">,<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"mi\">1<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta_<\/span> <span class=\"o\">**<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"n\">precision_normcdf<\/span> <span class=\"o\">*<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">)<\/span> \\\n\t\t         <span class=\"o\">/<\/span> <span class=\"p\">((<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta_<\/span> <span class=\"o\">**<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"n\">precision_normcdf<\/span> <span class=\"o\">+<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresetsNeg1To1\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFScorePresetsNeg1To1<\/span><span class=\"p\">(<\/span><span class=\"n\">ScaledFScorePresets<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"ScaledFScorePresetsNeg1To1.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_default_score\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">():<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScorePresetsNeg1To1.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScorePresetsNeg1To1.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span> <span class=\"o\">*<\/span> <span class=\"mi\">2<\/span> <span class=\"o\">-<\/span> <span class=\"mi\">1<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFZScore\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFZScore<\/span><span class=\"p\">(<\/span><span class=\"n\">ScaledFScorePresets<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"ScaledFZScore.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_default_score\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">():<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScore.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">sfs<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"c1\"># sfs = self.get_score_deltas(cat_word_counts, not_cat_word_counts)<\/span>\n\t\t<span class=\"c1\"># import pdb; pdb.set_trace()<\/span>\n\t\t<span class=\"c1\"># return (sfs - 0.5) / np.std(sfs - 0.5)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">sfs<\/span> <span class=\"o\">-<\/span> <span class=\"n\">sfs<\/span><span class=\"o\">.<\/span><span class=\"n\">mean<\/span><span class=\"p\">())<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">std<\/span><span class=\"p\">(<\/span><span class=\"n\">sfs<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScore.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;Scaled F-Score Z-Score&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScore.get_score_deltas\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_score_deltas\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_score_deltas<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">not_cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScore.get_p_vals\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScore.get_p_vals\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class. None by default<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">z_scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">[:,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">X<\/span><span class=\"p\">[:,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">norm<\/span><span class=\"o\">.<\/span><span class=\"n\">cdf<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">)<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFZScorePrior\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFZScorePrior<\/span><span class=\"p\">(<\/span><span class=\"n\">ScaledFZScore<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">prior<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"n\">scaler_algo<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">prior<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha<\/span> <span class=\"o\">=<\/span> <span class=\"n\">alpha<\/span>\n\t\t<span class=\"n\">ScaledFZScore<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"p\">)<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s1\">&#39;SFS w/ Informative Prior Z-Score&#39;<\/span>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScorePrior.apply_prior\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.apply_prior\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">c<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">n<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">c<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">prior_scale<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">c<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">prior<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">c<\/span> <span class=\"o\">+<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">prior<\/span> <span class=\"o\">*<\/span> <span class=\"n\">prior_scale<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScorePrior.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">sfs<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">),<\/span>\n\t\t                                     <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"c1\"># sfs = self.get_score_deltas(cat_word_counts, not_cat_word_counts)<\/span>\n\t\t<span class=\"c1\"># import pdb; pdb.set_trace()<\/span>\n\t\t<span class=\"c1\"># return (sfs - 0.5) / np.std(sfs - 0.5)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"p\">(<\/span><span class=\"n\">sfs<\/span> <span class=\"o\">-<\/span> <span class=\"n\">sfs<\/span><span class=\"o\">.<\/span><span class=\"n\">mean<\/span><span class=\"p\">())<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">std<\/span><span class=\"p\">(<\/span><span class=\"n\">sfs<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScorePrior.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;SFS Z-Scores&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFZScorePrior.get_score_deltas\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFZScorePrior.get_score_deltas\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_score_deltas<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">),<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">not_cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScorePresets<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">),<\/span>\n\t\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">apply_prior<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">)<\/span> <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFScore\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScore\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFScore<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n<div class=\"viewcode-block\" id=\"ScaledFScore.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScore.get_default_score\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">():<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mf\">0.5<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScore.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t               <span class=\"n\">scaler_algo<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39; Computes balanced scaled f-scores<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tcategory counts<\/span>\n<span class=\"sd\">\t\tnot_cat_word_counts : np.array<\/span>\n<span class=\"sd\">\t\t\tnot category counts<\/span>\n<span class=\"sd\">\t\tscaler_algo : str<\/span>\n<span class=\"sd\">\t\t\tFunction that scales an array to a range \\in [0 and 1]. Use &#39;percentile&#39;, &#39;normcdf&#39;. Default.<\/span>\n<span class=\"sd\">\t\tbeta : float<\/span>\n<span class=\"sd\">\t\t\tBeta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Default.<\/span>\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\t\tnp.array<\/span>\n<span class=\"sd\">\t\t\tHarmonic means of scaled P(word|category)<\/span>\n<span class=\"sd\">\t\t\t and scaled P(category|word) for &gt;median half of scores.  Low scores are harmonic means<\/span>\n<span class=\"sd\">\t\t\t of scaled P(word|~category) and scaled P(~category|word).  Array is squashed to between<\/span>\n<span class=\"sd\">\t\t\t 0 and 1, with 0.5 indicating a median score.<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\n\t\t<span class=\"n\">cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                  <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                  <span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span>\n\t\t                                                  <span class=\"n\">beta<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">not_cat_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                      <span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t\t                                                      <span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">ScoreBalancer<\/span><span class=\"o\">.<\/span><span class=\"n\">balance_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_scores<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScore.get_scores_for_category\"><a class=\"viewcode-back\" href=\"../../../scattertext.termscoring.html#scattertext.termscoring.ScaledFScore.ScaledFScore.get_scores_for_category\">[docs]<\/a>\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores_for_category<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span>\n\t                            <span class=\"n\">scaler_algo<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39; Computes unbalanced scaled-fscores<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcategory : str<\/span>\n<span class=\"sd\">\t\t\tcategory name to score<\/span>\n<span class=\"sd\">\t\tscaler_algo : str<\/span>\n<span class=\"sd\">\t\t\tFunction that scales an array to a range \\in [0 and 1]. Use &#39;percentile&#39;, &#39;normcdf&#39;. Default normcdf<\/span>\n<span class=\"sd\">\t\tbeta : float<\/span>\n<span class=\"sd\">\t\t\tBeta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Defaults to 1.<\/span>\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\t\tnp.array of harmonic means of scaled P(word|category) and scaled P(category|word).<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">assert<\/span> <span class=\"n\">beta<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span>\n\t\t<span class=\"n\">precision<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">recall<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cat_word_counts<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">precision_normcdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_safe_scaler<\/span><span class=\"p\">(<\/span><span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">precision<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">recall_normcdf<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_safe_scaler<\/span><span class=\"p\">(<\/span><span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">recall<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"mi\">1<\/span> <span class=\"o\">+<\/span> <span class=\"n\">beta<\/span> <span class=\"o\">**<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"n\">precision_normcdf<\/span> <span class=\"o\">*<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">)<\/span> \\\n\t\t         <span class=\"o\">/<\/span> <span class=\"p\">((<\/span><span class=\"n\">beta<\/span> <span class=\"o\">**<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"n\">precision_normcdf<\/span> <span class=\"o\">+<\/span> <span class=\"n\">recall_normcdf<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span><span class=\"p\">[<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">isnan<\/span><span class=\"p\">(<\/span><span class=\"n\">scores<\/span><span class=\"p\">)]<\/span> <span class=\"o\">=<\/span> <span class=\"mf\">0.<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span><\/div>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_scaled_f_score_from_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">p_word_given_category<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">float<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"n\">cat_word_counts<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">p_category_given_word<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cat_word_counts<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span> <span class=\"o\">+<\/span> <span class=\"n\">not_cat_word_counts<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">scores<\/span> \\\n\t\t\t<span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_harmonic_mean_of_probabilities_over_non_zero_in_category_count_terms<\/span> \\\n\t\t\t<span class=\"p\">(<\/span><span class=\"n\">cat_word_counts<\/span><span class=\"p\">,<\/span> <span class=\"n\">p_category_given_word<\/span><span class=\"p\">,<\/span> <span class=\"n\">p_word_given_category<\/span><span class=\"p\">,<\/span> <span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scores<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_safe_scaler<\/span><span class=\"p\">(<\/span><span class=\"n\">algo<\/span><span class=\"p\">,<\/span> <span class=\"n\">ar<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;none&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">ar<\/span>\n\t\t<span class=\"n\">scaled_ar<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_scaler_function<\/span><span class=\"p\">(<\/span><span class=\"n\">algo<\/span><span class=\"p\">)(<\/span><span class=\"n\">ar<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">isnan<\/span><span class=\"p\">(<\/span><span class=\"n\">scaled_ar<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">any<\/span><span class=\"p\">():<\/span>\n\t\t\t<span class=\"k\">return<\/span> <span class=\"n\">ScaledFScore<\/span><span class=\"o\">.<\/span><span class=\"n\">_get_scaler_function<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;percentile&#39;<\/span><span class=\"p\">)(<\/span><span class=\"n\">scaled_ar<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scaled_ar<\/span>\n\n\t<span class=\"nd\">@staticmethod<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">_get_scaler_function<\/span><span class=\"p\">(<\/span><span class=\"n\">scaler_algo<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;normcdf&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"k\">lambda<\/span> <span class=\"n\">x<\/span><span class=\"p\">:<\/span> <span class=\"n\">norm<\/span><span class=\"o\">.<\/span><span class=\"n\">cdf<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">,<\/span> <span class=\"n\">x<\/span><span class=\"o\">.<\/span><span class=\"n\">mean<\/span><span class=\"p\">(),<\/span> <span class=\"n\">x<\/span><span class=\"o\">.<\/span><span class=\"n\">std<\/span><span class=\"p\">())<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;lognormcdf&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"k\">lambda<\/span> <span class=\"n\">x<\/span><span class=\"p\">:<\/span> <span class=\"n\">norm<\/span><span class=\"o\">.<\/span><span class=\"n\">cdf<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">),<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">mean<\/span><span class=\"p\">(),<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">std<\/span><span class=\"p\">())<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;percentile&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"k\">lambda<\/span> <span class=\"n\">x<\/span><span class=\"p\">:<\/span> <span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">float64<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;percentiledense&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"k\">lambda<\/span> <span class=\"n\">x<\/span><span class=\"p\">:<\/span> <span class=\"n\">rankdata<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">,<\/span> <span class=\"n\">method<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;dense&#39;<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">astype<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">float64<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;none&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">scaler<\/span> <span class=\"o\">=<\/span> <span class=\"k\">lambda<\/span> <span class=\"n\">x<\/span><span class=\"p\">:<\/span> <span class=\"n\">x<\/span>\n\t\t<span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"k\">raise<\/span> <span class=\"n\">InvalidScalerException<\/span><span class=\"p\">(<\/span><span class=\"s2\">&quot;Invalid scaler alogrithm.  Must be either percentile or normcdf.&quot;<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">scaler<\/span><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0E0E:38C7FC:17E574:5A6BAD:6AB92B42"},"text_sha256":"eefdb4c110528aa1a92be51d36e53eaaabb89a014a630b527b3b99bf9582309d"},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioAddOne.html","size":14071,"blob_sha":"96d1f98baa992514352e29a5bdf0edf894eb17bf","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance.LogOddsRatioAddOne &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termsignificance.LogOddsRatioAddOne<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># -*- coding: utf-8 -*-<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.special<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ndtr<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.Scalers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">scale_neg_1_to_1_with_zero_mean_abs_max<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termranking<\/span> <span class=\"k\">import<\/span> <span class=\"n\">AbsoluteFrequencyRanker<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termsignificance.TermSignificance<\/span> <span class=\"k\">import<\/span> <span class=\"n\">TermSignificance<\/span>\n\n\n<div class=\"viewcode-block\" id=\"z_to_p_val\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.z_to_p_val\">[docs]<\/a><span class=\"k\">def<\/span> <span class=\"nf\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">):<\/span>\n\t<span class=\"c1\"># return norm.sf(-z_scores) - 0.5 + 0.5<\/span>\n\t<span class=\"k\">return<\/span> <span class=\"n\">ndtr<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">LogOddsRatioAddOne<\/span><span class=\"p\">(<\/span><span class=\"n\">TermSignificance<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"n\">ranker<\/span><span class=\"o\">=<\/span><span class=\"n\">AbsoluteFrequencyRanker<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\talpha_w : np.float<\/span>\n<span class=\"sd\">\t\t\tThe constant prior.<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha_w<\/span> <span class=\"o\">=<\/span> <span class=\"n\">alpha_w<\/span>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;Log-Odds-Ratio w/ Add One Smoothing&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_p_vals\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class. None by default<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"c1\"># Eqs 19-22<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_p_vals_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_p_vals_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_zeta_i_j_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positi ve class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">n_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">n_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">y_i<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(),<\/span> <span class=\"n\">y_j<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">delta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">((<\/span><span class=\"n\">y_i<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">+<\/span> <span class=\"n\">n_i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">))<\/span>\n\t\t             <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">((<\/span><span class=\"n\">y_j<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">+<\/span> <span class=\"n\">n_j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">)))<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">delta_i_j<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_zeta_i_j\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_zeta_i_j\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class. None by default<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">X<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">X<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_default_score\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioAddOne.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioAddOne.LogOddsRatioAddOne.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tSame function as get_zeta_i_j_given_separate_counts<\/span>\n\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">z_scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"c1\">#scaled_scores = scale_neg_1_to_1_with_zero_mean_abs_max(z_scores)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_scores<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"753C:3BF56:1759BA:5DA028:6AB92B41"},"text_sha256":"b5f74dd0841373bf86f009645c4e6d15acb8e0486d495c22670c4b32f4877e75"},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioInformativeDirichletPiror.html","size":17260,"blob_sha":"f89735b14a966e55098f10f0637fe72349c175c0","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># -*- coding: utf-8 -*-<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.special<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ndtr<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termsignificance<\/span> <span class=\"k\">import<\/span> <span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span>\n\n\n<div class=\"viewcode-block\" id=\"z_to_p_val\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.z_to_p_val\">[docs]<\/a><span class=\"k\">def<\/span> <span class=\"nf\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">):<\/span>\n\t<span class=\"c1\"># return norm.sf(-z_scores) - 0.5 + 0.5<\/span>\n\t<span class=\"k\">return<\/span> <span class=\"n\">ndtr<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioInformativeDirichletPrior\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">LogOddsRatioInformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">):<\/span>\n\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\tImplements the log-odds-ratio with an uninformative dirichlet prior from<\/span>\n<span class=\"sd\">\t\tMonroe, B. L., Colaresi, M. P., &amp; Quinn, K. M. (2008). Fightin&#39; words: Lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis, 16(4), 372–403.<\/span>\n<span class=\"sd\">\t&#39;&#39;&#39;<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">priors<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">sigma<\/span><span class=\"o\">=<\/span><span class=\"mi\">10<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">scale_type<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;none&#39;<\/span><span class=\"p\">,<\/span>\n\t             <span class=\"n\">prior_power<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tpriors : pd.Series<\/span>\n<span class=\"sd\">\t\t\tterm -&gt; prior count<\/span>\n\n<span class=\"sd\">\t\tsigma : np.float<\/span>\n<span class=\"sd\">\t\t\tprior scale<\/span>\n\n<span class=\"sd\">\t\tscale_type : str<\/span>\n<span class=\"sd\">\t\t\t&#39;none&#39;: Don&#39;t scale prior. Jurafsky approach.<\/span>\n<span class=\"sd\">\t\t\t&#39;class-size&#39;: Scale prior st the sum of the priors is the same as the word count<\/span>\n<span class=\"sd\">\t\t\t  in the document-class being scaled<\/span>\n<span class=\"sd\">\t\t\t&#39;corpus-size&#39;: Scale prior to the size of the corpus<\/span>\n<span class=\"sd\">\t\t\t&#39;word&#39;: Original formulation from MCQ. Sum of priors will be sigma.<\/span>\n<span class=\"sd\">\t\t\t&#39;background-corpus-size&#39;: Scale corpus size to multiple of background-corpus.<\/span>\n\n<span class=\"sd\">\t\tprior_power : numeric<\/span>\n<span class=\"sd\">\t\t\tExponent to apply to prior<\/span>\n<span class=\"sd\">\t\t\t&gt; 1 will shrink frequent words<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">assert<\/span> <span class=\"n\">scale_type<\/span> <span class=\"ow\">in<\/span> <span class=\"p\">[<\/span><span class=\"s1\">&#39;none&#39;<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;class-size&#39;<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;corpus-size&#39;<\/span><span class=\"p\">,<\/span>\n\t\t                      <span class=\"s1\">&#39;background-corpus-size&#39;<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;word&#39;<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span> <span class=\"o\">=<\/span> <span class=\"n\">priors<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale_type<\/span> <span class=\"o\">=<\/span> <span class=\"n\">scale_type<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_prior_power<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior_power<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span> <span class=\"o\">=<\/span> <span class=\"n\">sigma<\/span>\n\t\t<span class=\"n\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">sigma<\/span><span class=\"p\">)<\/span>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioInformativeDirichletPrior.get_priors\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_priors\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_priors<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioInformativeDirichletPrior.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;Log-Odds-Ratio w/ Informative Prior&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioInformativeDirichletPrior.get_zeta_i_j_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioInformativeDirichletPiror.LogOddsRatioInformativeDirichletPrior.get_zeta_i_j_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">n_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">n_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">y_i<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(),<\/span> <span class=\"n\">y_j<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">()<\/span>\n\t\t<span class=\"n\">prior_scale_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior_scale_i<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">1<\/span>\n\t\t<span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale_type<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;class-size&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">prior_scale_i<\/span> <span class=\"o\">=<\/span> <span class=\"p\">((<\/span><span class=\"n\">n_i<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span><span class=\"p\">))<\/span>\n\t\t\t<span class=\"n\">prior_scale_j<\/span> <span class=\"o\">=<\/span> <span class=\"p\">((<\/span><span class=\"n\">n_j<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale_type<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;corpus-size&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">prior_scale_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior_scale_i<\/span> <span class=\"o\">=<\/span> <span class=\"p\">((<\/span><span class=\"n\">n_i<\/span> <span class=\"o\">+<\/span> <span class=\"n\">n_j<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span> <span class=\"o\">*<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale_type<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;word&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">prior_scale_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior_scale_i<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">elif<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale_type<\/span> <span class=\"o\">==<\/span> <span class=\"s1\">&#39;background-corpus-size&#39;<\/span><span class=\"p\">:<\/span>\n\t\t\t<span class=\"n\">prior_scale_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">prior_scale_i<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_scale<\/span>\n\t\t<span class=\"n\">a_wj<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span> <span class=\"o\">*<\/span> <span class=\"n\">prior_scale_j<\/span><span class=\"p\">)<\/span> <span class=\"o\">**<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_prior_power<\/span>\n\t\t<span class=\"n\">a_0j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">a_wj<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">a_wi<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_priors<\/span> <span class=\"o\">*<\/span> <span class=\"n\">prior_scale_i<\/span><span class=\"p\">)<\/span> <span class=\"o\">**<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">_prior_power<\/span>\n\t\t<span class=\"n\">a_0i<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">a_wi<\/span><span class=\"p\">)<\/span>\n\n\t\t<span class=\"n\">delta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">((<\/span><span class=\"n\">y_i<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_wi<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">n_i<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_0i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">a_wi<\/span><span class=\"p\">))<\/span>\n\t\t             <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">((<\/span><span class=\"n\">y_j<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_wj<\/span><span class=\"p\">)<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">n_j<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_0j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">a_wj<\/span><span class=\"p\">)))<\/span>\n\t\t<span class=\"n\">var_delta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">y_i<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_wi<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">n_i<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_0i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">a_wi<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">y_j<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_wj<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">n_j<\/span> <span class=\"o\">+<\/span> <span class=\"n\">a_0j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">y_j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">a_wj<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">zeta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">delta_i_j<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"n\">var_delta_i_j<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">zeta_i_j<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"405A:3B7E2:1710B7:5D580F:6AB92B38"},"text_sha256":"555f37b39196702e95e7a5f56134d06e653503af0dd26460a73cb9b8fe53e29a"},{"path":"docs/_modules/scattertext/termsignificance/LogOddsRatioUninformativeDirichletPrior.html","size":17131,"blob_sha":"dd8ba0a622b421a81aea6920c3cae9a56414e24d","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># -*- coding: utf-8 -*-<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.special<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ndtr<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termranking<\/span> <span class=\"k\">import<\/span> <span class=\"n\">AbsoluteFrequencyRanker<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termsignificance.TermSignificance<\/span> <span class=\"k\">import<\/span> <span class=\"n\">TermSignificance<\/span>\n\n\n<div class=\"viewcode-block\" id=\"z_to_p_val\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.z_to_p_val\">[docs]<\/a><span class=\"k\">def<\/span> <span class=\"nf\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">):<\/span>\n\t<span class=\"c1\"># return norm.sf(-z_scores) - 0.5 + 0.5<\/span>\n\t<span class=\"k\">return<\/span> <span class=\"n\">ndtr<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">)<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">LogOddsRatioUninformativeDirichletPrior<\/span><span class=\"p\">(<\/span><span class=\"n\">TermSignificance<\/span><span class=\"p\">):<\/span>\n\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\tImplements the log-odds-ratio with an uninformative dirichlet prior from<\/span>\n<span class=\"sd\">\t\tMonroe, B. L., Colaresi, M. P., &amp; Quinn, K. M. (2008). Fightin&#39; words: Lexical feature selection and evaluation for identifying the content of political conflict. Political Analysis, 16(4), 372–403.<\/span>\n<span class=\"sd\">\t&#39;&#39;&#39;<\/span>\n\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha_w<\/span><span class=\"o\">=<\/span><span class=\"mf\">0.001<\/span><span class=\"p\">,<\/span> <span class=\"n\">ranker<\/span><span class=\"o\">=<\/span><span class=\"n\">AbsoluteFrequencyRanker<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\talpha_w : np.float<\/span>\n<span class=\"sd\">\t\t\tThe constant prior.<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha_w<\/span> <span class=\"o\">=<\/span> <span class=\"n\">alpha_w<\/span>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;Log-Odds-Ratio w/ Uninformative Prior Z-Score&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_p_vals\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class. None by default<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"c1\"># Eqs 19-22<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_p_vals_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_vals_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_to_p_val<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">yp_i<\/span> <span class=\"o\">=<\/span> <span class=\"n\">y_i<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha_w<\/span>\n\t\t<span class=\"n\">yp_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">y_j<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">alpha_w<\/span>\n\t\t<span class=\"n\">np_i<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">yp_i<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"n\">np_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">yp_j<\/span><span class=\"p\">)<\/span>\n\n\t\t<span class=\"n\">delta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">yp_i<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">np_i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">yp_i<\/span><span class=\"p\">))<\/span> <span class=\"o\">-<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">log<\/span><span class=\"p\">(<\/span><span class=\"n\">yp_j<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">np_j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">yp_j<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">var_delta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">yp_i<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">np_i<\/span> <span class=\"o\">-<\/span> <span class=\"n\">yp_i<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">yp_j<\/span><span class=\"p\">)<\/span>\n\t\t                 <span class=\"o\">+<\/span> <span class=\"mf\">1.<\/span> <span class=\"o\">/<\/span> <span class=\"p\">(<\/span><span class=\"n\">np_j<\/span> <span class=\"o\">-<\/span> <span class=\"n\">yp_j<\/span><span class=\"p\">))<\/span>\n\t\t<span class=\"n\">zeta_i_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">delta_i_j<\/span> <span class=\"o\">/<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">sqrt<\/span><span class=\"p\">(<\/span><span class=\"n\">var_delta_i_j<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">zeta_i_j<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_zeta_i_j\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class. None by default<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span> <span class=\"o\">=<\/span> <span class=\"n\">X<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">X<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_default_score\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_default_score\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_default_score<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"mi\">0<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_p_values_from_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_p_values_from_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_values_from_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">ndtr<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">))<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"LogOddsRatioUninformativeDirichletPrior.get_scores\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.LogOddsRatioUninformativeDirichletPrior.LogOddsRatioUninformativeDirichletPrior.get_scores\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tSame function as get_zeta_i_j_given_separate_counts<\/span>\n\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\ty_i, np.array(int)<\/span>\n<span class=\"sd\">\t\t\tArrays of word counts of words occurring in positive class<\/span>\n<span class=\"sd\">\t\ty_j, np.array(int)<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of z-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">z_scores<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"n\">y_i<\/span><span class=\"p\">,<\/span> <span class=\"n\">y_j<\/span><span class=\"p\">)<\/span>\n\t\t<span class=\"c1\"># scaled_scores = scale_neg_1_to_1_with_zero_mean_abs_max(z_scores)<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">z_scores<\/span><\/div><\/div>\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17846C:5DCA9B:6AB92B42"},"text_sha256":"646797456ee7eb13301ec02923a226abb9e81175132950a73d393a7ca50b3c34"},{"path":"docs/_modules/scattertext/termsignificance/ScaledFScoreSignificance.html","size":9285,"blob_sha":"d144baf3df8fb41b8187173719c94bebb9d993e2","priority":2,"status":200,"text":"\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    <title>scattertext.termsignificance.ScaledFScoreSignificance &#8212; Scattertext 0.0.2.9 documentation<\/title>\n    <link rel=\"stylesheet\" href=\"../../../_static/alabaster.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"../../../_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\" src=\"../../../_static/documentation_options.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n    <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n    <link rel=\"index\" title=\"Index\" href=\"../../../genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"../../../search.html\" />\n   \n  <link rel=\"stylesheet\" href=\"../../../_static/custom.css\" type=\"text/css\" />\n  \n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=0.9, maximum-scale=0.9\" />\n\n  <\/head><body>\n  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\" role=\"main\">\n            \n  <h1>Source code for scattertext.termsignificance.ScaledFScoreSignificance<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># -*- coding: utf-8 -*-<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ScaledFZScore<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.Common<\/span> <span class=\"k\">import<\/span> <span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">DEFAULT_BETA<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termscoring<\/span> <span class=\"k\">import<\/span> <span class=\"n\">ScaledFScore<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">scipy.stats<\/span> <span class=\"k\">import<\/span> <span class=\"n\">norm<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">scattertext.termsignificance.TermSignificance<\/span> <span class=\"k\">import<\/span> <span class=\"n\">TermSignificance<\/span>\n\n\n<div class=\"viewcode-block\" id=\"ScaledFScoreSignificance\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">ScaledFScoreSignificance<\/span><span class=\"p\">(<\/span><span class=\"n\">TermSignificance<\/span><span class=\"p\">):<\/span>\n\t<span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">scaler_algo<\/span> <span class=\"o\">=<\/span> <span class=\"n\">DEFAULT_SCALER_ALGO<\/span><span class=\"p\">,<\/span> <span class=\"n\">beta<\/span><span class=\"o\">=<\/span><span class=\"n\">DEFAULT_BETA<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tscaler_algo : str<\/span>\n<span class=\"sd\">\t\t\tFunction that scales an array to a range \\in [0 and 1]. Use &#39;percentile&#39;, &#39;normcdf&#39;. Default normcdf.<\/span>\n<span class=\"sd\">\t\tbeta : float<\/span>\n<span class=\"sd\">\t\t\tBeta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Defaults to 1.<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo<\/span> <span class=\"o\">=<\/span> <span class=\"n\">scaler_algo<\/span>\n\t\t<span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta<\/span> <span class=\"o\">=<\/span> <span class=\"n\">beta<\/span>\n\n<div class=\"viewcode-block\" id=\"ScaledFScoreSignificance.get_name\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_name\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_name<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"s2\">&quot;Scaled F-Score&quot;<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScoreSignificance.get_zeta_i_j_given_separate_counts\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_zeta_i_j_given_separate_counts\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_zeta_i_j_given_separate_counts<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">cat<\/span><span class=\"p\">,<\/span> <span class=\"n\">ncat<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tcat : np.array<\/span>\n<span class=\"sd\">\t\t\tIn category word counts<\/span>\n<span class=\"sd\">\t\tncat : np.array<\/span>\n<span class=\"sd\">\t\t\tOut of category word counts<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array<\/span>\n<span class=\"sd\">\t\t\tZ-scores<\/span>\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">ScaledFZScore<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">cat<\/span><span class=\"p\">,<\/span> <span class=\"n\">ncat<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"ScaledFScoreSignificance.get_p_vals\"><a class=\"viewcode-back\" href=\"../../../scattertext.termsignificance.html#scattertext.termsignificance.ScaledFScoreSignificance.ScaledFScoreSignificance.get_p_vals\">[docs]<\/a>\t<span class=\"k\">def<\/span> <span class=\"nf\">get_p_vals<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">X<\/span><span class=\"p\">):<\/span>\n\t\t<span class=\"sd\">&#39;&#39;&#39;<\/span>\n<span class=\"sd\">\t\tImputes p-values from the Z-scores of `ScaledFScore` scores.  Assuming incorrectly<\/span>\n<span class=\"sd\">\t\tthat the scaled f-scores are normally distributed.<\/span>\n\n<span class=\"sd\">\t\tParameters<\/span>\n<span class=\"sd\">\t\t----------<\/span>\n<span class=\"sd\">\t\tX : np.array<\/span>\n<span class=\"sd\">\t\t\tArray of word counts, shape (N, 2) where N is the vocab size.  X[:,0] is the<\/span>\n<span class=\"sd\">\t\t\tpositive class, while X[:,1] is the negative class.<\/span>\n\n<span class=\"sd\">\t\tReturns<\/span>\n<span class=\"sd\">\t\t-------<\/span>\n<span class=\"sd\">\t\tnp.array of p-values<\/span>\n\n<span class=\"sd\">\t\t&#39;&#39;&#39;<\/span>\n\t\t<span class=\"n\">z_scores<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ScaledFZScore<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">scaler_algo<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">beta<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">get_scores<\/span><span class=\"p\">(<\/span><span class=\"n\">X<\/span><span class=\"p\">[:,<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">X<\/span><span class=\"p\">[:,<\/span><span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n\t\t<span class=\"k\">return<\/span> <span class=\"n\">norm<\/span><span class=\"o\">.<\/span><span class=\"n\">cdf<\/span><span class=\"p\">(<\/span><span class=\"n\">z_scores<\/span><span class=\"p\">)<\/span><\/div><\/div>\n\n\n<\/pre><\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"sphinxsidebar\" role=\"navigation\" aria-label=\"main navigation\">\n        <div class=\"sphinxsidebarwrapper\"><div class=\"relations\">\n<h3>Related Topics<\/h3>\n<ul>\n  <li><a href=\"../../../index.html\">Documentation overview<\/a><ul>\n  <li><a href=\"../../index.html\">Module code<\/a><ul>\n  <li><a href=\"../../scattertext.html\">scattertext<\/a><ul>\n  <\/ul><\/li>\n  <\/ul><\/li>\n  <\/ul><\/li>\n<\/ul>\n<\/div>\n<div id=\"searchbox\" style=\"display: none\" role=\"search\">\n  <h3>Quick search<\/h3>\n    <div class=\"searchformwrapper\">\n    <form class=\"search\" action=\"../../../search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    <\/form>\n    <\/div>\n<\/div>\n<script type=\"text/javascript\">$('#searchbox').show(0);<\/script>\n        <\/div>\n      <\/div>\n      <div class=\"clearer\"><\/div>\n    <\/div>\n    <div class=\"footer\">\n      &copy;2017, Jason S. Kessler.\n      \n      |\n      Powered by <a href=\"http://sphinx-doc.org/\">Sphinx 1.7.4<\/a>\n      &amp; <a href=\"https://github.com/bitprophet/alabaster\">Alabaster 0.7.10<\/a>\n      \n    <\/div>\n\n    \n\n    \n  <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5998:3AC15:17F9AD:5E3EBD:6AB92B42"},"text_sha256":"2c4967c8ee2ec1f8086d5e6924b65f9a923376bd04f4602a80c6126b96714e16"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2335","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:17BBFC0:1BDFFD8:6AB92B47"},"commit":{"sha":"a805fdbf9be28a5bcb80c12b302b14e351dc35d9","url":"https://github.com/JasonKessler/scattertext/commit/a805fdbf9be28a5bcb80c12b302b14e351dc35d9","date":"2025-04-29T22:00:33Z","author_date":"2025-04-29T22:00:33Z","committer_date":"2025-04-29T22:00:33Z","tree_sha":"ca3b6f946f2e6f6df80c16279a86187fb24734b6","message_first_line":"Version 0.2.3"},"tree_request_status":200,"tree_rate":{"github_remaining":"2334","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0894:3C4024:1803472:1C279BE:6AB92B47"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":155669,"blob_sha":"e6f110eb384d88f364bd716c0e69efc2554f0575","priority":0}],"documents":[{"path":"README.md","size":155669,"blob_sha":"e6f110eb384d88f364bd716c0e69efc2554f0575","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/JasonKessler/scattertext.svg?branch=master)](https://travis-ci.org/JasonKessler/scattertext)\n[![PyPI](https://img.shields.io/pypi/v/scattertext.svg)]()\n[![Gitter Chat](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/scattertext/Lobby)\n[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?style=social&label=Follow)](https://twitter.com/jasonkessler)\n\n# Scattertext 0.2.3\n\nA tool for finding distinguishing terms in corpora and displaying them in an\ninteractive HTML scatter plot. Points corresponding to terms are selectively labeled\nso that they don't overlap with other labels or points.\n\nCite as: Jason S. Kessler. Scattertext: a Browser-Based Tool for Visualizing how Corpora Differ. ACL System\nDemonstrations. 2017.\n\nBelow is an example of using Scattertext to create visualize terms used in 2012 American\npolitical conventions. The 2,000 most party-associated uni grams are displayed as\npoints in the scatter plot. Their x- and y- axes are the dense ranks of their usage by\nRepublican and Democratic speakers respectively.\n\n```pydocstring\nimport scattertext as st\n\ndf = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences)\n)\n\ncorpus = st.CorpusFromParsedDocuments(\n    df, category_col='party', parsed_col='parse'\n).build().get_unigram_corpus().compact(st.AssociationCompactor(2000))\n\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    minimum_term_frequency=0, \n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000, \n    metadata=corpus.get_df()['speaker'],\n    transform=st.Scalers.dense_rank,\n    include_gradient=True,\n    left_gradient_term='More Republican',\n    middle_gradient_term='Metric: Dense Rank Difference',\n    right_gradient_term='More Democratic',\n)\nopen('./demo_compact.html', 'w').write(html)\n```\n\nThe HTML file written would look like the image below. Click on it for the actual interactive visualization.\n[![demo_compact.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_compact.png)](https://jasonkessler.github.io/demo_compact.html)\n\n## Citation\n\nJason S. Kessler. Scattertext: a Browser-Based Tool for Visualizing how Corpora Differ. ACL System Demonstrations. 2017.\nLink to paper: [arxiv.org/abs/1703.00565](https://arxiv.org/abs/1703.00565)\n\n```\n@article{kessler2017scattertext,\n  author    = {Kessler, Jason S.},\n  title     = {Scattertext: a Browser-Based Tool for Visualizing how Corpora Differ},\n  booktitle = {Proceedings of ACL-2017 System Demonstrations},\n  year      = {2017},\n  address   = {Vancouver, Canada},\n  publisher = {Association for Computational Linguistics},\n}\n```\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Overview](#overview)\n- [Customizing the Visualization and Plotting Dispersion](#customizing-the-visualization-and-plotting-dispersion)\n- [Tutorial](#tutorial)\n    - [Help! I don't know Python but I still want to use Scattertext](#help-i-dont-know-python-but-i-still-want-to-use-scattertext)\n    - [Using Scattertext as a text analysis library: finding characteristic terms and their associations](#using-scattertext-as-a-text-analysis-library-finding-characteristic-terms-and-their-associations)\n    - [Visualizing term associations](#visualizing-term-associations)\n    - [Visualizing phrase associations](#visualizing-phrase-associations)\n    - [Adding color gradients to explain scores](#adding-color-gradients-to-explain-scores)\n    - [Visualizing Empath topics and categories](#visualizing-empath-topics-and-categories)\n    - [Visualizing the Moral Foundations 2.0 Dictionary](#visualizing-the-moral-foundations-2.0-dictionary)\n    - [Ordering Terms by Corpus Characteristicness](#ordering-terms-by-corpus-characteristicness)\n    - [Document-Based Scatterplots](#document-based-scatterplots)\n    - [Using Cohen's d or Hedge's g to visualize effect size](#using-cohens-d-or-hedges-g-to-visualize-effect-size)\n    - [Using Cliff's Delta to visualize effect size](#using-cliffs-delta-to-visualize-effect-size)\n    - [Using Bi-Normal Separation (BNS) to score terms](#using-bi-normal-separation-bns-to-score-terms)\n    - [Using correlations to explain classifiers](#using-correlations-to-explain-classifiers)\n    - [Using Custom Background Word Frequencies](#using-custom-background-word-frequencies)\n    - [Plotting word productivity](#plotting-word-productivity)\n- [Understanding Scaled F-Score](#understanding-scaled-f-score)\n- [Alternative term scoring methods](#alternative-term-scoring-methods)\n- [The position-select-plot process](#the-position-select-plot-process)\n- [Advanced Uses](#advanced-uses)\n    - [Visualizing differences based on only term frequencies](#visualizing-differences-based-on-only-term-frequencies)\n    - [Visualizing query-based categorical differences](#visualizing-query-based-categorical-differences)\n    - [Visualizing any kind of term score](#visualizing-any-kind-of-term-score)\n    - [Custom term positions](#custom-term-positions)\n    - [Emoji analysis](#emoji-analysis)\n    - [Visualizing SentencePiece tokens](#visualizing-sentencepiece-tokens)\n    - [Visualizing scikit-learn text classification weights](#visualizing-scikit-learn-text-classification-weights)\n    - [Creating lexicalized semiotic squares](#creating-lexicalized-semiotic-squares)\n    - [Visualizing topic models](#visualizing-topic-models)\n    - [Creating T-SNE-style word embedding projection plots](#creating-T-SNE-style-word-embedding-projection-plots)\n    - [Using SVD to visualize any kind of word embeddings](#using-svd-to-visualize-any-kind-of-word-embeddings)\n    - [Exporting plot to matplotlib](#exporting-plot-to-matplotlib)\n    - [Using the same scale for both axes](#using-the-same-scale-for-both-axes)\n\n- [Examples](#examples)\n- [A note on chart layout](#a-note-on-chart-layout)\n- [What's new](#whats-new)\n- [Sources](#sources)\n\n## Installation\n\nInstall Python 3.11 or higher and run:\n\n`$ pip install scattertext`\n\nIf you cannot (or don't want to) install spaCy, substitute `nlp = spacy.load('en')` lines with\n`nlp = scattertext.WhitespaceNLP.whitespace_nlp`. Note, this is not compatible\nwith `word_similarity_explorer`, and the tokenization and sentence boundary detection\ncapabilities will be low-performance regular expressions. See `demo_without_spacy.py`\nfor an example.\n\nIt is recommended you install `jieba`, `spacy`, `empath`, `astropy`, `flashtext`, `gensim` and `umap-learn` in order to\ntake full advantage of Scattertext.\n\nScattertext should mostly work with Python 2.7, but it may not.\n\nThe HTML outputs look best in Chrome and Safari.\n\n## Style Guide\n\nThe name of this project is Scattertext.  \"Scattertext\" is written as a single word\nand should be capitalized. When used in Python, the package `scattertext` should be defined\nto the name `st`, i.e., `import scattertext as st`.\n\n## Overview\n\nThis is a tool that's intended for visualizing what words and phrases\nare more characteristic of a category than others.\n\nConsider the example at the top of the page.\n\nLooking at this seem overwhelming. In fact, it's a relatively simple visualization of word use\nduring the 2012 political convention. Each dot corresponds to a word or phrase mentioned by Republicans or Democrats\nduring their conventions. The closer a dot is to the top of the plot, the more frequently it was used by\nDemocrats. The further right a dot, the more that word or phrase was used by Republicans. Words frequently\nused by both parties, like \"of\" and \"the\" and even \"Mitt\" tend to occur in the upper-right-hand corner. Although very\nlow\nfrequency words have been hidden to preserve computing resources, a word that neither party used, like \"giraffe\"\nwould be in the bottom-left-hand corner.\n\nThe interesting things happen close to the upper-left and lower-right corners. In the upper-left corner,\nwords like \"auto\" (as in auto bailout) and \"millionaires\" are frequently used by Democrats but infrequently or never\nused\nby Republicans. Likewise, terms frequently used by Republicans and infrequently by Democrats occupy the\nbottom-right corner. These include \"big government\" and \"olympics\", referring to the Salt Lake City Olympics in which\nGov. Romney was involved.\n\nTerms are colored by their association. Those that are more associated with Democrats are blue, and those\nmore associated with Republicans red.\n\nTerms that are most characteristic of the both sets of documents are displayed\non the far-right of the visualization.\n\nThe inspiration for this visualization came from Dataclysm (Rudder, 2014).\n\nScattertext is designed to help you build these graphs and efficiently label points on them.\n\nThe documentation (including this readme) is a work in\nprogress. Please see the tutorial below as well as\nthe [PyData 2017 Tutorial](https://github.com/JasonKessler/Scattertext-PyData).\n\nPoking around the code and tests should give you a good idea of how things work.\n\nThe library covers some novel and effective term-importance formulas, including **Scaled F-Score**.\n\n## Customizing the Visualization and Plotting Dispersion\n\nNew in Scattertext 0.1.0, one can use a dataframe for term/metadata positions and other term-specific data. We\ncan also use it to determine term-specific information which is shown after a term is clicked.\n\nNote that it is possible to disable the use of document categories in Scattertext, as we shall see in this example.\n\nThis example covers plotting term dispersion against word frequency and identifying the terms which are most and least\ndispersed given their frequencies. Using the Rosengren's S dispersion measure (Gries 2021), terms tend to increase in\ntheir\ndispersion scores as they get more frequent. We'll see how we can both plot this effect and factor out the effect\nof frequency.\n\nThis, along with a number of other dispersion metrics presented in Gries (2021), are available and documented\nin the `Dispersion` class, which we'll use later in the section.\n\nLet's start by creating a Convention corpus, but we'll use the `CorpusWithoutCategoriesFromParsedDocuments` factory\nto ensure that no categories are included in the corpus. If we try to find document categories, we'll see that\nall documents have the category '_'.\n\n```python\nimport scattertext as st\n\ndf = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences))\ncorpus = st.CorpusWithoutCategoriesFromParsedDocuments(\n    df, parsed_col='parse'\n).build().get_unigram_corpus().remove_infrequent_words(minimum_term_count=6)\n\ncorpus.get_categories()\n# Returns ['_']\n```\n\nNext, we'll create a dataframe for all terms we'll plot. We'll just start by creating a dataframe where we capture\nthe frequency of each term and various dispersion metrics. These will be shown after a term is activated in the plot.\n\n```python\ndispersion = st.Dispersion(corpus)\n\ndispersion_df = dispersion.get_df()\ndispersion_df.head(3)\n```\n\nWhich returns\n\n```\n       Frequency  Range         SD        VC  Juilland's D  Rosengren's S        DP   DP norm  KL-divergence  Dissemination\nthank        363    134   3.108113  1.618274      0.707416       0.694898  0.391548  0.391560       0.748808       0.972954\nyou         1630    177  12.383708  1.435902      0.888596       0.898805  0.233627  0.233635       0.263337       0.963905\nso           549    155   3.523380  1.212967      0.774299       0.822244  0.283151  0.283160       0.411750       0.986423```\n\nThese are discussed in detail in [Gries 2021](http://www.stgries.info/research/ToApp_STG_Dispersion_PHCL.pdf). \nDissementation is presented in Altmann et al. (2011).\n\nWe'll use Rosengren's S to find the dispersion of each term. It's which a metric designed for corpus parts\n(convention speeches in our case) of varying length. Where n is the number of documents in the corpus, s_i is the\npercentage of tokens in the corpus found in document i, v_i is term count in document i, and f is the total number\nof tokens in the corpus of type term type.\n\nRosengren's\nS: [![Rosengren's S](https://render.githubusercontent.com/render/math?math=\\frac{\\Sum_{i=1}^{n}\\sqrt{s_i%20\\cdot%20\\v_i})^2}{f})](https://render.githubusercontent.com/render/math?math=\\frac{\\Sum_{i=1}^{n}\\sqrt{s_i%20\\cdot%20\\v_i})\n^2}{f})\n\nIn order to start plotting, we'll need to add coordinates for each term to the data frame.\n\nTo use the `dataframe_scattertext` function, you need, at a minimum a dataframe with 'X' and 'Y' columns.\n\nThe `Xpos` and `Ypos` columns indicate the positions of the original `X` and `Y` values on the scatterplot, and\nneed to be between 0 and 1. Functions in `st.Scalers` perform this scaling. Absent `Xpos` or `Ypos`,\n`st.Scalers.scale` would be used.\n\nHere is a sample of values:\n\n* `st.Scalers.scale(vec)` Rescales the vector to where the minimum value is 0 and the maximum is 1.\n* `st.Scalers.log_scale(vec)` Rescales the lgo of the vector\n* `st.Scalers.dense_ranke(vec)` Rescales the dense rank of the vector\n* `st.Scalers.scale_center_zero_abs(vec)` Rescales a vector with both positive and negative values such that the 0 value\n  in the original vector is plotted at 0.5, negative values are projected from [-argmax(abs(vec)), 0] to [0, 0.5] and\n  positive values projected from [0, argmax(abs(vec))] to [0.5, 1].\n\n```python\ndispersion_df = dispersion_df.assign(\n    X=lambda df: df.Frequency,\n    Xpos=lambda df: st.Scalers.log_scale(df.X),\n    Y=lambda df: df[\"Rosengren's S\"],\n    Ypos=lambda df: st.Scalers.scale(df.Y),\n)\n```   \n\nNote that the `Ypos` column here is not necessary since `Y` would automatically be scaled.\n\nFinally, since we are not distinguishing between categories, we can set `ignore_categories=True`.\n\nWe can now plot this graph using the `dataframe_scattertext` function:\n\n```python\nhtml = st.dataframe_scattertext(\n    corpus,\n    plot_df=dispersion_df,\n    metadata=corpus.get_df()['speaker'] + ' (' + corpus.get_df()['party'].str.upper() + ')',\n    ignore_categories=True,\n    x_label='Log Frequency',\n    y_label=\"Rosengren's S\",\n    y_axis_labels=['Less Dispersion', 'Medium', 'More Dispersion'],\n)\n```\n\nWhich yields (click for an interactive version):\n[![dispersion-basic.html](https://jasonkessler.github.io/dispersion-basic.png)](https://jasonkessler.github.io/dispersion-basic.html)\n\nNote that we can see various dispersion statistics under a term's name, in addition to the standard usage statistics. To\ncustomize the statistics which are displayed, set the `term_description_column=[...]` parameter with a list of column\nnames to be displayed.\n\nOne issue in this dispersion chart, which tends to be common to dispersion metrics in general, is that dispersion\nand frequency tend to have a high correlation, but with a complex, non-linear curve. Depending on the metric,\nthis correlation curve could be power, linear, sigmoidal, or typically, something else.\n\nIn order to factor out this correlation, we can predict the dispersion from frequency using a non-parametric regressor,\nand see which terms have the highest and lowest residuals with respect to their expected dispersions based on their\nfrequencies.\n\nIn this case, we'll use a KNN regressor with 10 neighbors to predict Rosengren'S from term frequencies\n(`dispersion_df.X` and `.Y` respectively), and compute the residual.\n\nWe'll the residual to color points, with a neutral color for residuals around 0 and other colors for positive and\nnegative values. We'll add a column in the data frame for point colors, and call it ColorScore. It is populated\nwith values between 0 and 1, with 0.5 as a netural color on the `d3 interpolateWarm` color scale. We use\n`st.Scalers.scale_center_zero_abs`, discussed above, to make this transformation.\n\n```python\nfrom sklearn.neighbors import KNeighborsRegressor\n\ndispersion_df = dispersion_df.assign(\n    Expected=lambda df: KNeighborsRegressor(n_neighbors=10).fit(\n        df.X.values.reshape(-1, 1), df.Y\n    ).predict(df.X.values.reshape(-1, 1)),\n    Residual=lambda df: df.Y - df.Expected,\n    ColorScore=lambda df: st.Scalers.scale_center_zero_abs(df.Residual)\n)    \n```\n\nNow we are ready to plot our colored dispersion chart. We assign the ColorScore column name to the `color_score_column`\nparameter in `dataframe_scattertext`.\n\nAdditionally, We'd like to populate the two term lists on the\nleft with terms that have high and low residual values, indicating terms which have the most dispersion relative to\ntheir frequency-expected level and the lowest. We can do this by the `left_list_column` parameter. We can specify\nthe upper and lower term list names using the `header_names` parameter. Finally, we can spiff-up the plot by\nadding an appealing background color.\n\n```python\nhtml = st.dataframe_scattertext(\n    corpus,\n    plot_df=dispersion_df,\n    metadata=corpus.get_df()['speaker'] + ' (' + corpus.get_df()['party'].str.upper() + ')',\n    ignore_categories=True,\n    x_label='Log Frequency',\n    y_label=\"Rosengren's S\",\n    y_axis_labels=['Less Dispersion', 'Medium', 'More Dispersion'],\n    color_score_column='ColorScore',\n    header_names={'upper': 'Lower than Expected', 'lower': 'More than Expected'},\n    left_list_column='Residual',\n    background_color='#e5e5e3'\n)\n```\n\nWhich yields (click for an interactive version):\n[![dispersion-residual.html](https://jasonkessler.github.io/dispersion-residual.png)](https://jasonkessler.github.io/dispersion-residual.html)\n\n\n## Tutorial\n\n### Help! I don't know Python but I still want to use Scattertext.\n\nWhile you should learn Python fully use Scattertext, I've put some of the basic\nfunctionality in a commandline tool. The tool is installed when you follow the procedure laid out\nabove.\n\nRun `$ scattertext --help` from the commandline to see the full usage information. Here's a quick example of\nhow to use vanilla Scattertext on a CSV file. The file needs to have at least two columns,\none containing the text to be analyzed, and another containing the category. In the example CSV below,\nthe columns are text and party, respectively.\n\nThe example below processes the CSV file, and the resulting HTML visualization into cli_demo.html.\nff\nNote, the parameter `--minimum_term_frequency=8` omit terms that occur less than 8\ntimes, and `--regex_parser` indicates a simple regular expression parser should\nbe used in place of spaCy. The flag `--one_use_per_doc` indicates that term frequency\nshould be calculated by only counting no more than one occurrence of a term in a document.\n\nIf you'd like to parse non-English text, you can use the `--spacy_language_model` argument to configure which\nspaCy language model the tool will use. The default is 'en' and you can see the others available at\n[https://spacy.io/docs/api/language-models](https://spacy.io/docs/api/language-models).\n\n```bash\n$ curl -s https://cdn.rawgit.com/JasonKessler/scattertext/master/scattertext/data/political_data.csv | head -2\nparty,speaker,text\ndemocrat,BARACK OBAMA,\"Thank you. Thank you. Thank you. Thank you so much.Thank you.Thank you so much. Thank you. Thank you very much, everybody. Thank you.\n$\n$ scattertext --datafile=https://cdn.rawgit.com/JasonKessler/scattertext/master/scattertext/data/political_data.csv \\\n> --text_column=text --category_column=party --metadata_column=speaker --positive_category=democrat \\\n> --category_display_name=Democratic --not_category_display_name=Republican --minimum_term_frequency=8 \\\n> --one_use_per_doc --regex_parser --outputfile=cli_demo.html\n```\n\n### Using Scattertext as a text analysis library: finding characteristic terms and their associations\n\nThe following code creates a stand-alone HTML file that analyzes words\nused by Democrats and Republicans in the 2012 party conventions, and outputs some notable\nterm associations.\n\nFirst, import Scattertext and spaCy.\n\n```pydocstring\n>>> import scattertext as st\n>>> import spacy\n>>> from pprint import pprint\n```\n\nNext, assemble the data you want to analyze into a Pandas data frame. It should have\nat least two columns, the text you'd like to analyze, and the category you'd like to\nstudy. Here, the `text` column contains convention speeches while the `party` column\ncontains the party of the speaker. We'll eventually use the `speaker` column\nto label snippets in the visualization.\n\n```pydocstring\n>>> convention_df = st.SampleCorpora.ConventionData2012.get_data()  \n>>> convention_df.iloc[0]\nparty                                               democrat\nspeaker                                         BARACK OBAMA\ntext       Thank you. Thank you. Thank you. Thank you so ...\nName: 0, dtype: object\n```\n\nTurn the data frame into a Scattertext Corpus to begin analyzing it. To look for differences\nin parties, set the `category_col` parameter to `'party'`, and use the speeches,\npresent in the `text` column, as the texts to analyze by setting the `text` col\nparameter. Finally, pass a spaCy model in to the `nlp` argument and call `build()` to construct the corpus.\n\n```pydocstring\n# Turn it into a Scattertext Corpus \n>>> nlp = spacy.load('en')\n>>> corpus = st.CorpusFromPandas(convention_df, \n...                              category_col='party', \n...                              text_col='text',\n...                              nlp=nlp).build()\n```\n\nLet's see characteristic terms in the corpus, and terms that are most associated Democrats and\nRepublicans. See slides\n[52](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/52)\nto [59](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/59) of\nthe [Turning Unstructured Content ot Kernels of Ideas](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/)\ntalk for more details on these approaches.\n\nHere are the terms that differentiate the corpus from a general English corpus.\n\n```pydocstring\n>>> print(list(corpus.get_scaled_f_scores_vs_background().index[:10]))\n['obama',\n 'romney',\n 'barack',\n 'mitt',\n 'obamacare',\n 'biden',\n 'romneys',\n 'hardworking',\n 'bailouts',\n 'autoworkers']\n```\n\nHere are the terms that are most associated with Democrats:\n\n```pydocstring\n>>> term_freq_df = corpus.get_term_freq_df()\n>>> term_freq_df['Democratic Score'] = corpus.get_scaled_f_scores('democrat')\n>>> pprint(list(term_freq_df.sort_values(by='Democratic Score', ascending=False).index[:10]))\n['auto',\n 'america forward',\n 'auto industry',\n 'insurance companies',\n 'pell',\n 'last week',\n 'pell grants',\n \"women 's\",\n 'platform',\n 'millionaires']\n```\n\nAnd Republicans:\n\n```pydocstring\n>>> term_freq_df['Republican Score'] = corpus.get_scaled_f_scores('republican')\n>>> pprint(list(term_freq_df.sort_values(by='Republican Score', ascending=False).index[:10]))\n['big government',\n \"n't build\",\n 'mitt was',\n 'the constitution',\n 'he wanted',\n 'hands that',\n 'of mitt',\n '16 trillion',\n 'turned around',\n 'in florida']\n```\n\n### Visualizing term associations\n\nNow, let's write the scatter plot a stand-alone HTML file. We'll make the y-axis category  \"democrat\", and name\nthe category \"Democrat\" with a capital \"D\" for presentation\npurposes. We'll name the other category \"Republican\" with a capital \"R\". All documents in the corpus without\nthe category \"democrat\" will be considered Republican. We set the width of the visualization in pixels, and label\neach excerpt with the speaker using the `metadata` parameter. Finally, we write the visualization to an HTML file.\n\n```pydocstring\n>>> html = st.produce_scattertext_explorer(corpus,\n...          category='democrat',\n...          category_name='Democratic',\n...          not_category_name='Republican',\n...          width_in_pixels=1000,\n...          metadata=convention_df['speaker'])\n>>> open(\"Convention-Visualization.html\", 'wb').write(html.encode('utf-8'))\n```\n\nBelow is what the webpage looks like. Click it and wait a few minutes for the interactive version.\n[![Conventions-Visualization.html](https://jasonkessler.github.io/2012conventions0.0.2.2.png)](https://jasonkessler.github.io/Conventions-Visualization.html)\n\n### Visualizing Phrase associations\n\nScattertext can also be used to visualize the category association of a variety of different phrase types. The word\n\"phrase\" denotes any single or multi-word collocation.\n\n#### Using PyTextRank\n\n[PyTextRank](https://github.com/DerwenAI/pytextrank), created by Paco Nathan, is an implementation of\na modified version of the TextRank algorithm (Mihalcea and Tarau 2004). It involves graph centrality\nalgorithm to extract a scored list of the most prominent phrases in a document. Here,\nnamed entities recognized by spaCy. As of spaCy version 2.2, these are from an NER system trained on\n[Ontonotes 5](https://catalog.ldc.upenn.edu/LDC2013T19).\n\nPlease install pytextrank `$ pip3 install pytextrank` before continuing with this tutorial.\n\nTo use, build a corpus as normal, but make sure you use spaCy to parse each document as opposed a built-in\n`whitespace_nlp`-type tokenizer. Note that adding PyTextRank to the spaCy pipeline is not needed, as it\nwill be run separately by the `PyTextRankPhrases` object. We'll reduce the number of phrases displayed in the\nchart to 2000 using the `AssociationCompactor`. The phrases generated will be treated like non-textual features\nsince their document scores will not correspond to word counts.\n\n```pydocstring\nimport pytextrank, spacy\nimport scattertext as st\n\nnlp = spacy.load('en')\nnlp.add_pipe(\"textrank\", last=True)\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(nlp),\n    party=lambda df: df.party.apply({'democrat': 'Democratic', 'republican': 'Republican'}.get)\n)\ncorpus = st.CorpusFromParsedDocuments(\n    convention_df,\n    category_col='party',\n    parsed_col='parse',\n    feats_from_spacy_doc=st.PyTextRankPhrases()\n).build(\n).compact(\n    AssociationCompactor(2000, use_non_text_features=True)\n)\n```\n\nNote that the terms present in the corpus are named entities, and, as opposed to frequency counts, their scores\nare the eigencentrality scores assigned to them by the TextRank algorithm. Running `corpus.get_metadata_freq_df('')`\nwill return, for each category, the sums of terms' TextRank scores. The dense ranks of these scores will be used to\nconstruct the scatter plot.\n\n```pydocstring\nterm_category_scores = corpus.get_metadata_freq_df('')\nprint(term_category_scores)\n'''\n                                         Democratic  Republican\nterm\nour future                                 1.113434    0.699103\nyour country                               0.314057    0.000000\ntheir home                                 0.385925    0.000000\nour government                             0.185483    0.462122\nour workers                                0.199704    0.210989\nher family                                 0.540887    0.405552\nour time                                   0.510930    0.410058\n...\n'''\n```  \n\nBefore we construct the plot, let's some helper variables Since the aggregate TextRank scores aren't particularly\ninterpretable, we'll display the per-category rank of each score in the `metadata_description` field. These will be\ndisplayed after a term is clicked.\n\n```pydocstring\nterm_ranks = pd.DataFrame(\n    np.argsort(np.argsort(-term_category_scores, axis=0), axis=0) + 1,\n    columns=term_category_scores.columns,\n    index=term_category_scores.index)\n\nmetadata_descriptions = {\n    term: '<br/>' + '<br/>'.join(\n        '<b>%s<\/b> TextRank score rank: %s/%s' % (cat, term_ranks.loc[term, cat], corpus.get_num_metadata())\n        for cat in corpus.get_categories())\n    for term in corpus.get_metadata()\n}\n```\n\nWe can construct term scores in a couple ways. One is a standard dense-rank difference, a score which is used in most\nof the two-category contrastive plots here, which will give us the most category-associated phrases. Another is to use\nthe maximum category-specific score, this will give us the most prominent phrases in each category, regardless of the\nprominence in the other category. We'll take both approaches in this tutorial, let's compute the second kind of score,\nthe category-specific prominence below.\n\n```pydocstring\ncategory_specific_prominence = term_category_scores.apply(\n    lambda r: r.Democratic if r.Democratic > r.Republican else -r.Republican,\n    axis=1\n)\n```\n\nNow we're ready output this chart. Note that we use a `dense_rank` transform, which places identically scalled phrases\natop each other. We use `category_specific_prominence` as scores, and set `sort_by_dist` as `False` to ensure the\nphrases displayed on the right-hand side of the chart are ranked by the scores and not distance to the upper-left or\nlower-right corners. Since matching phrases are treated as non-text features, we encode them as single-phrase topic\nmodels and set the `topic_model_preview_size` to `0` to indicate the topic model list shouldn't be shown. Finally,\nwe set ensure the full documents are displayed. Note the documents will be displayed in order of phrase-specific score.\n\n```pydocstring\nhtml = produce_scattertext_explorer(\n    corpus,\n    category='Democratic',\n    not_category_name='Republican',\n    minimum_term_frequency=0,\n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000,\n    transform=dense_rank,\n    metadata=corpus.get_df()['speaker'],\n    scores=category_specific_prominence,\n    sort_by_dist=False,\n    use_non_text_features=True,\n    topic_model_term_lists={term: [term] for term in corpus.get_metadata()},\n    topic_model_preview_size=0,\n    metadata_descriptions=metadata_descriptions,\n    use_full_doc=True\n)\n```\n\n[![PyTextRankProminenceScore.html](https://jasonkessler.github.io/PyTextRankProminence.png)](https://jasonkessler.github.io/PyTextRankProminenceScore.html)\n\nThe most associated terms in each category make some sense, at least on a post hoc analysis. When referring to (then)\nGovernor Romney, Democrats used his surname \"Romney\" in their most central mentions of him, while Republicans used the\nmore familiar and humanizing \"Mitt\". In terms of the President Obama, the phrase \"Obama\" didn't show up as a top term i\nn either, the but the first name \"Barack\" was one of the the most central phrases in Democratic speeches,\nmirroring \"Mitt.\"\n\nAlternatively, we can Dense Rank Difference in scores to color phrase-points and determine the top phrases to be\ndisplayed on the right-hand side of the chart. Instead of setting `scores` as category-specific prominence scores,\nwe set `term_scorer=RankDifference()` to inject a way determining term scores into the scatter plot creation process.\n\n```pydocstring\nhtml = produce_scattertext_explorer(\n    corpus,\n    category='Democratic',\n    not_category_name='Republican',\n    minimum_term_frequency=0,\n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000,\n    transform=dense_rank,\n    use_non_text_features=True,\n    metadata=corpus.get_df()['speaker'],\n    term_scorer=RankDifference(),\n    sort_by_dist=False,\n    topic_model_term_lists={term: [term] for term in corpus.get_metadata()},\n    topic_model_preview_size=0, \n    metadata_descriptions=metadata_descriptions,\n    use_full_doc=True\n)\n```\n\n[![PyTextRankRankDiff.html](https://jasonkessler.github.io/PyTextRankRankDiff.png)](https://jasonkessler.github.io/PyTextRankRankDiff.html)\n\n#### Using Phrasemachine to find phrases.\n\nPhrasemachine from [AbeHandler](https://github.com/AbeHandler) (Handler et al. 2016) uses regular expressions over\nsequences of part-of-speech tags to identify noun phrases. This has the advantage over using spaCy's NP-chunking\nin that it tends to isolote meaningful, large noun phases which are free of appositives.\n\nA opposed to PyTextRank, we'll just use counts of these phrases, treating them like any other term.\n\n```pydocstring\nimport spacy\nfrom scattertext import SampleCorpora, PhraseMachinePhrases, dense_rank, RankDifference, AssociationCompactor, produce_scattertext_explorer\nfrom scattertext.CorpusFromPandas import CorpusFromPandas\n\ncorpus = (CorpusFromPandas(SampleCorpora.ConventionData2012.get_data(),\n                           category_col='party',\n                           text_col='text',\n                           feats_from_spacy_doc=PhraseMachinePhrases(),\n                           nlp=spacy.load('en', parser=False))\n          .build().compact(AssociationCompactor(4000)))\n\nhtml = produce_scattertext_explorer(corpus,\n                                    category='democrat',\n                                    category_name='Democratic',\n                                    not_category_name='Republican',\n                                    minimum_term_frequency=0,\n                                    pmi_threshold_coefficient=0,\n                                    transform=dense_rank,\n                                    metadata=corpus.get_df()['speaker'],\n                                    term_scorer=RankDifference(),\n                                    width_in_pixels=1000)\n```\n\n[![Phrasemachine.html](https://jasonkessler.github.io/PhraseMachine.png)](https://jasonkessler.github.io/Phrasemachine.html)\n\n### Adding color gradients to explain scores\n\nIn Scattertext, various metrics, including term associations, are often shown through two ways. The first \nand most important, is the position in the chart. The second is the color of a point or text. In Scattertext 0.2.21, a \nway of visualizing the semantics of these scores is introduced: the gradient as key.  \n\nThe gradient, by default, follows the `d3_color_scale` parameter of `produce_scattertext_explorer` which is \n`d3.interpolateRdYlBu` by default. \n\nThe following additional parameters to `produce_scattertext_explorer` (and similar functions) allow for the manipulation\ngradients.\n\n- `include_gradient: bool` (`False` by default) is a flag that triggers the appearance of a gradient.\n- `left_gradient_term: Optional[str]` indicates the text written on the far-left side of the gradient. It is written in `gradient_text_color` and is `category_name` by default.\n- `right_gradient_term: Optional[str]` indicates the text written on the far-left side of the gradient. It is written in `gradient_text_color` and is `not_category_name` by default.\n- `middle_gradient_term: Optional[str]` indicates the text written in the middle of the gradient. It is the opposite color of the center gradient color and is empty by default.\n- `gradient_text_color: Optional[str]` indicates the fixed color of the text written on the gradient. If None, it defaults to opposite color of the gradient.\n- `left_text_color: Optional[str]` overrides `gradient_text_color` for the left gradient term\n- `middle_text_color: Optional[str]` overrides `gradient_text_color` for the middle gradient term\n- `right_text_color: Optional[str]` overrides `gradient_text_color` for the right gradient term\n- `gradient_colors: Optional[List[str]]` list of hex colors, including '#', (e.g., `['#0000ff', '#980067', '#cc3300', '#32cd00']`) which describe the gradient. If given, these override `d3_color_scale`.\n\nA straightforward example is as follows. Term colors are defined as a mapping between a term name and a `#RRGGBB` color \nas part of the `term_color` parameter, and the color gradient is defined in `gradient_colors`. THe \n\n```python\n\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\ndf = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences)\n)\n\ncorpus = st.CorpusFromParsedDocuments(\n    df, category_col='party', parsed_col='parse'\n).build().get_unigram_corpus().compact(st.AssociationCompactor(2000))\n\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    minimum_term_frequency=0,\n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000,\n    metadata=corpus.get_df()['speaker'],\n    transform=st.Scalers.dense_rank,\n    include_gradient=True,\n    left_gradient_term=\"More Democratic\",\n    right_gradient_term=\"More Republican\",\n    middle_gradient_term='Metric: Dense Rank Difference',\n    gradient_text_color=\"white\",\n    term_colors=dict(zip(\n        corpus.get_terms(),\n        [\n            mpl.colors.to_hex(x) for x in plt.get_cmap('brg')(\n                st.Scalers.scale_center_zero_abs(\n                    st.RankDifferenceScorer(corpus).set_categories('democrat').get_scores()).values\n            )\n        ]\n    )),\n    gradient_colors=[mpl.colors.to_hex(x) for x in plt.get_cmap('brg')(np.arange(1., 0., -0.01))],\n)\n```\n[![demo_gradient.html](https://jasonkessler.github.io/gradient.png)](https://jasonkessler.github.io/demo_gradient.html)\n\n\n### Visualizing Empath topics and categories\n\nIn order to visualize Empath (Fast et al., 2016) topics and categories instead of terms, we'll need to\ncreate a `Corpus` of extracted topics and categories rather than unigrams and\nbigrams. To do so, use the `FeatsOnlyFromEmpath` feature extractor. See the source code for\nexamples of how to make your own.\n\nWhen creating the visualization, pass the `use_non_text_features=True` argument into\n`produce_scattertext_explorer`. This will instruct it to use the labeled Empath\ntopics and categories instead of looking for terms. Since the documents returned\nwhen a topic or category label is clicked will be in order of the document-level\ncategory-association strength, setting `use_full_doc=True` makes sense, unless you have\nenormous documents. Otherwise, the first 300 characters will be shown.\n\n(New in 0.0.26). Ensure you include `topic_model_term_lists=feat_builder.get_top_model_term_lists()`\nin `produce_scattertext_explorer` to ensure it bolds passages of snippets that match the\ntopic model.\n\n```pydocstring\n>>> feat_builder = st.FeatsFromOnlyEmpath()\n>>> empath_corpus = st.CorpusFromParsedDocuments(convention_df,\n...                                              category_col='party',\n...                                              feats_from_spacy_doc=feat_builder,\n...                                              parsed_col='text').build()\n>>> html = st.produce_scattertext_explorer(empath_corpus,\n...                                        category='democrat',\n...                                        category_name='Democratic',\n...                                        not_category_name='Republican',\n...                                        width_in_pixels=1000,\n...                                        metadata=convention_df['speaker'],\n...                                        use_non_text_features=True,\n...                                        use_full_doc=True,\n...                                        topic_model_term_lists=feat_builder.get_top_model_term_lists())\n>>> open(\"Convention-Visualization-Empath.html\", 'wb').write(html.encode('utf-8'))\n``` \n\n[![Convention-Visualization-Empath.html](https://jasonkessler.github.io/Convention-Visualization-Empath.png)](https://jasonkessler.github.io/Convention-Visualization-Empath.html)\n\nc\nScattertext also includes a feature builder to explore the relationship between General Inquirer Tag Categoires\nand Document Categories. We'll use a slightly different approach, looking at relationship of GI Tag Categories to\npolitical parties by using the\nZ-Scores of the Log-Odds-Ratio with Uninformative Dirichlet Priors (Monroe 2008). We'll use\nthe `produce_frequency_explorer` plot\nvariation to visualize this relationship, setting the x-axis as the number of times a word in the tag category occurs,\nand the y-axis as the z-score.\n\nFor more information on the General Inquirer, please see\nthe [General Inquirer Home Page](http://www.wjh.harvard.edu/~inquirer/).\n\nWe'll use the same data set as before, except we'll use the `FeatsFromGeneralInquirer` feature builder.\n\n```pydocstring\n>>> general_inquirer_feature_builder = st.FeatsFromGeneralInquirer()\n>>> corpus = st.CorpusFromPandas(convention_df,\n...                              category_col='party',\n...                              text_col='text',\n...                              nlp=st.whitespace_nlp_with_sentences,\n...                              feats_from_spacy_doc=general_inquirer_feature_builder).build()\n```\n\nNext, we'll call `produce_frequency_explorer` in a similar way we called `produce_scattertext_explorer` in the previous\nsection.\nThere are a few differences, however. First, we specify the `LogOddsRatioUninformativeDirichletPrior` term scorer, which\nscores the relationships between the categories. The `grey_threshold` indicates the points scoring between [-1.96, 1.96]\n(i.e., p > 0.05) should be colored gray. The\nargument `metadata_descriptions=general_inquirer_feature_builder.get_definitions()`\nindicates that a dictionary mapping the tag name to a string definition is passed. When a tag is clicked, the definition\nin the dictionary will be shown below the plot, as shown in the image following the snippet.\n\n```pydocstring\n>>> html = st.produce_frequency_explorer(corpus,\n...                                      category='democrat',\n...                                      category_name='Democratic',\n...                                      not_category_name='Republican',\n...                                      metadata=convention_df['speaker'],\n...                                      use_non_text_features=True,\n...                                      use_full_doc=True,\n...                                      term_scorer=st.LogOddsRatioUninformativeDirichletPrior(),\n...                                      grey_threshold=1.96,\n...                                      width_in_pixels=1000,\n...                                      topic_model_term_lists=general_inquirer_feature_builder.get_top_model_term_lists(),\n...                                      metadata_descriptions=general_inquirer_feature_builder.get_definitions())\n```\n\nHere's the resulting chart.  \n[![demo_general_inquirer_frequency_plot.html](https://jasonkessler.github.io/general_inquirer.png)](https://jasonkessler.github.io/demo_general_inquirer_frequency_plot.html)\n\n[![demo_general_inquirer_frequency_plot.html](https://jasonkessler.github.io/general_inquirer2.png)](https://jasonkessler.github.io/demo_general_inquirer_frequency_plot.html)\n\n### Visualizing the Moral Foundations 2.0 Dictionary\n\nThe  [[Moral Foundations Theory]](https://moralfoundations.org/) proposes six psychological constructs\nas building blocks of moral thinking, as described in Graham et al. (2013). These foundations are,\nas described on [[moralfoundations.org]](https://moralfoundations.org/): care/harm, fairness/cheating, loyalty/betrayal,\nauthority/subversion, sanctity/degradation, and liberty/oppression. Please see the site for a more in-depth discussion\nof these foundations.\n\nFrimer et al. (2019) created the Moral Foundations Dictionary 2.0, or a lexicon of terms which invoke a moral foundation\nas a virtue (favorable toward the foundation) or a vice (in opposition to the foundation).\n\nThis dictionary can be used in the same way as the General Inquirer. In this example, we can plot the Cohen's d scores\nof\nfoundation-word counts relative to the frequencies words involving those foundations were invoked.\n\nWe can first load the corpus as normal, and use `st.FeatsFromMoralFoundationsDictionary()` to extract features.\n\n```python\nimport scattertext as st\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nmoral_foundations_feats = st.FeatsFromMoralFoundationsDictionary()\ncorpus = st.CorpusFromPandas(convention_df,\n                             category_col='party',\n                             text_col='text',\n                             nlp=st.whitespace_nlp_with_sentences,\n                             feats_from_spacy_doc=moral_foundations_feats).build()\n```\n\nNext, let's use Cohen's d term scorer to analyze the corpus, and describe a set of Cohen's d association scores.\n\n```python\ncohens_d_scorer = st.CohensD(corpus).use_metadata()\nterm_scorer = cohens_d_scorer.set_categories('democrat', ['republican']).term_scorer.get_score_df()\n```\n\nWhich yields the following data frame:\n\n|                  |   cohens_d |   cohens_d_se |   cohens_d_z |   cohens_d_p |   hedges_g | hedges_g_se | hedges_g_z |  hedges_g_p |         m1 |         m2 |   count1 |   count2 |   docs1 |   docs2 |\n|:-----------------|-----------:|--------------:|-------------:|-------------:|-----------:|------------:|-----------:|------------:|-----------:|-----------:|---------:|---------:|--------:|--------:|\n| care.virtue      |  0.662891  |      0.149425 |     4.43629  |  4.57621e-06 |   0.660257 |    0.159049 |    4.15129 | 1.65302e-05 | 0.195049   | 0.12164    |      760 |      379 |     115 |      54 |\n| care.vice        |  0.24435   |      0.146025 |     1.67335  |  0.0471292   |   0.243379 |    0.152654 |    1.59432 |   0.0554325 | 0.0580005  | 0.0428358  |      244 |      121 |      80 |      41 |\n| fairness.virtue  |  0.176794  |      0.145767 |     1.21286  |  0.112592    |   0.176092 |    0.152164 |    1.15725 |    0.123586 | 0.0502469  | 0.0403369  |      225 |      107 |      71 |      39 |\n| fairness.vice    |  0.0707162 |      0.145528 |     0.485928 |  0.313509    |  0.0704352 |    0.151711 |   0.464273 |    0.321226 | 0.00718627 | 0.00573227 |       32 |       14 |      21 |      10 |\n| authority.virtue | -0.0187793 |      0.145486 |    -0.12908  |  0.551353    | -0.0187047 |     0.15163 |  -0.123357 |    0.549088 | 0.358192   | 0.361191   |     1281 |      788 |     122 |      66 |\n| authority.vice   | -0.0354164 |      0.145494 |    -0.243422 |  0.596161    | -0.0352757 |    0.151646 |  -0.232619 |    0.591971 | 0.00353465 | 0.00390602 |       20 |       14 |      14 |      10 |\n| sanctity.virtue  | -0.512145  |      0.147848 |    -3.46399  |  0.999734    |   -0.51011 |    0.156098 |   -3.26788 |    0.999458 | 0.0587987  | 0.101677   |      265 |      309 |      74 |      48 |    \n| sanctity.vice    | -0.108011  |      0.145589 |    -0.74189  |  0.770923    |  -0.107582 |    0.151826 |  -0.708585 |    0.760709 | 0.00845048 | 0.0109339  |       35 |       28 |      23 |      20 |\n| loyalty.virtue   | -0.413696  |      0.147031 |    -2.81367  |  0.997551    |  -0.412052 |    0.154558 |     -2.666 |    0.996162 | 0.259296   | 0.309776   |     1056 |      717 |     119 |      66 |\n| loyalty.vice     | -0.0854683 |      0.145549 |    -0.587213 |  0.72147     | -0.0851287 |    0.151751 |  -0.560978 |    0.712594 | 0.00124518 | 0.00197022 |        5 |        5 |       5 |       4 |\n\nThis data frame gives us Cohen's d scores (and their standard errors and z-scores), Hedge's $g$ scores (ditto),\nthe mean document-length normalized topic usage per category (where the in-focus category is m1 [in this case Democrats]\nand the out-of-focus is m2), the raw number of words used in for each topic (count1 and count2), and the number of\ndocuments\nin each category with the topic (docs1 and docs2).\n\nNote that Cohen's d is the difference of m1 and m2 divided by their pooled standard deviation.\n\nNow, let's plot the d-scores of foundations vs. their frequencies.\n\n```python\nhtml = st.produce_frequency_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    metadata=convention_df['speaker'],\n    use_non_text_features=True,\n    use_full_doc=True,\n    term_scorer=st.CohensD(corpus).use_metadata(),\n    grey_threshold=0,\n    width_in_pixels=1000,\n    topic_model_term_lists=moral_foundations_feats.get_top_model_term_lists(),\n    metadata_descriptions=moral_foundations_feats.get_definitions()\n)\n```\n\n[![demo_moral_foundations.html](https://jasonkessler.github.io/demo_moral_foundations.png)](https://jasonkessler.github.io/demo_moral_foundations.html)\n\n### Ordering Terms by Corpus Characteristicness\n\nOften the terms of most interest are ones that are characteristic to the corpus as a whole. These are terms which occur\nfrequently in all sets of documents being studied, but relatively infrequent compared to general term frequencies.\n\nWe can produce a plot with a characteristic score on the x-axis and class-association scores on the y-axis using the\nfunction `produce_characteristic_explorer`.\n\nCorpus characteristicness is the difference in dense term ranks between the words in all of the documents in the study\nand a general English-language frequency list. See\nthis [Talk on Term-Class Association Scores](http://nbviewer.jupyter.org/github/JasonKessler/PuPPyTalk/blob/master/notebooks/Class-Association-Scores.ipynb)\nfor a more thorough explanation.\n\n```python\nimport scattertext as st\n\ncorpus = (st.CorpusFromPandas(st.SampleCorpora.ConventionData2012.get_data(),\n                              category_col='party',\n                              text_col='text',\n                              nlp=st.whitespace_nlp_with_sentences)\n          .build()\n          .get_unigram_corpus()\n          .compact(st.ClassPercentageCompactor(term_count=2,\n                                               term_ranker=st.OncePerDocFrequencyRanker)))\nhtml = st.produce_characteristic_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    metadata=corpus.get_df()['speaker']\n)\nopen('demo_characteristic_chart.html', 'wb').write(html.encode('utf-8'))\n```\n\n[![demo_characteristic_chart.html](https://jasonkessler.github.io/demo_characteristic_chart.png)](https://jasonkessler.github.io/demo_characteristic_chart.html)\n\n### Document-Based Scatterplots\n\nIn addition to words, phases and topics, we can make each point correspond to a document. Let's first create\na corpus object for the 2012 Conventions data set. This explanation follows `demo_pca_documents.py`\n\n```python\nimport pandas as pd\nfrom sklearn.feature_extraction.text import TfidfTransformer\nimport scattertext as st\nfrom scipy.sparse.linalg import svds\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\ncorpus = (st.CorpusFromParsedDocuments(convention_df,\n                                       category_col='party',\n                                       parsed_col='parse')\n          .build()\n          .get_stoplisted_unigram_corpus())\n```\n\nNext, let's add the document names as meta data in the corpus object. The `add_doc_names_as_metadata` function\ntakes an array of document names, and populates a new corpus' meta data with those names. If two documents have the\nsame name, it appends a number (starting with 1) to the name.\n\n```python\ncorpus = corpus.add_doc_names_as_metadata(corpus.get_df()['speaker'])\n```\n\nNext, we find tf.idf scores for the corpus' term-document matrix, run sparse SVD, and add them to a projection\ndata frame, making the x and y-axes the first two singular values, and indexing it on the corpus' meta data, which\ncorresponds to the document names.\n\n```python\nembeddings = TfidfTransformer().fit_transform(corpus.get_term_doc_mat())\nu, s, vt = svds(embeddings, k=3, maxiter=20000, which='LM')\nprojection = pd.DataFrame({'term': corpus.get_metadata(), 'x': u.T[0], 'y': u.T[1]}).set_index('term')\n```\n\nFinally, set scores as 1 for Democrats and 0 for Republicans, rendering Republican documents as red points and\nDemocratic documents as blue. For more on the `produce_pca_explorer` function,\nsee [Using SVD to visualize any kind of word embeddings](#using-svd-to-visualize-any-kind-of-word-embeddings).\n\n```python\ncategory = 'democrat'\nscores = (corpus.get_category_ids() == corpus.get_categories().index(category)).astype(int)\nhtml = st.produce_pca_explorer(corpus,\n                               category=category,\n                               category_name='Democratic',\n                               not_category_name='Republican',\n                               metadata=convention_df['speaker'],\n                               width_in_pixels=1000,\n                               show_axes=False,\n                               use_non_text_features=True,\n                               use_full_doc=True,\n                               projection=projection,\n                               scores=scores,\n                               show_top_terms=False)\n```\n\nClick for an interactive version\n[![demo_pca_documents.html](https://jasonkessler.github.io/doc_pca.png)](https://jasonkessler.github.io/demo_pca_documents.html)\n\n### Using Cohen's d or Hedge's g to visualize effect size.\n\nCohen's d is a popular metric used to measure effect size. The definitions of Cohen's d and Hedge's $g$\nfrom (Shinichi and Cuthill 2017) are implemented in Scattertext.\n\n```python\n>>> convention_df = st.SampleCorpora.ConventionData2012.get_data()\n>>> corpus = (st.CorpusFromPandas(convention_df,\n...                               category_col='party',\n               ...text_col='text',\n               ...nlp=st.whitespace_nlp_with_sentences)\n....build()\n....get_unigram_corpus())\n```\n\nWe can create a term scorer object to examine the effect sizes and other metrics.\n\n```python\n>> > term_scorer = st.CohensD(corpus).set_categories('democrat', ['republican'])\n>> > term_scorer.get_score_df().sort_values(by='cohens_d', ascending=False).head()\ncohens_d\ncohens_d_se\ncohens_d_z\ncohens_d_p\nhedges_g\nhedges_g_se\nhedges_g_z\nhedges_g_p\nm1\nm2\nobama\n1.187378\n0.024588\n48.290444\n0.000000e+00\n1.187322\n0.018419\n64.461363\n0.0\n0.007778\n0.002795\n\n\nclass 0.855859     0.020848   41.052045   0.000000e+00  0.855818     0.017227   49.677688         0.0  0.002222  0.000375\n\n\nmiddle\n0.826895\n0.020553\n40.232746\n0.000000e+00\n0.826857\n0.017138\n48.245626\n0.0\n0.002316\n0.000400\npresident\n0.820825\n0.020492\n40.056541\n0.000000e+00\n0.820786\n0.017120\n47.942661\n0.0\n0.010231\n0.005369\nbarack\n0.730624\n0.019616\n37.245725\n6.213052e-304\n0.730589\n0.016862\n43.327800\n0.0\n0.002547\n0.000725\n```\n\nOur calculation of Cohen's d is not directly based on term counts. Rather, we divide each document's term counts by the\ntotal number\nof terms in the document before calculating the statistics.  `m1` and `m2` are, respectively the mean portions of words\nin speeches made by Democrats and Republicans that were the term in question. The effect size (`cohens_d`) is the\ndifference between these means divided by the pooled standard deviation.  `cohens_d_se` is the standard error\nof the statistic, while `cohens_d_z` and `cohens_d_p` are the Z-scores and p-values indicating the statistical\nsignificance of the effect. Corresponding columns are present for Hedge's $g$ a version of Cohen's d adjusted for data set size.\n\n```python\n>>> st.produce_frequency_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    term_scorer=st.CohensD(corpus),\n    metadata=convention_df['speaker'],\n    grey_threshold=0\n)\n```  \n\nClick for an interactive version.\n[![demo_cohens_d.html](https://jasonkessler.github.io/cohen_d.png)](https://jasonkessler.github.io/demo_cohens_d.html)\n\n### Using Cliff's Delta to visualize effect size\n\nCliff's Delta (Cliff 1993) uses a non-parametric approach to computing effect size. In our setting, the term's frequency \npercentage of each document in the focus set is compared with that of the background set. For each pair of documents,\na score of 1 is given if the focus document's frequency percentage is larger than the background, 0 if identical, and -1 \nif different. Note that this assumes document lengths are similarly distributed across the focus and background corpora.\n\nSee [https://real-statistics.com/non-parametric-tests/mann-whitney-test/cliffs-delta/] for the formulas used in `CliffsDelta`.\n\nBelow is an example of how to use `CliffsDelta` to find and plot term scores: \n\n```python\nnlp = spacy.blank('en')\nnlp.add_pipe('sentencizer')\nconvention_df = st.SampleCorpora.ConventionData2012.get_data().assign(\n   party = lambda df: df.party.apply(\n       lambda x: {'democrat': 'Dem', 'republican': 'Rep'}[x]),\n   SpacyParse=lambda df: df.text.progress_apply(nlp)\n)\ncorpus = st.CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='SpacyParse').build(\n).remove_terms_used_in_less_than_num_docs(10)\nst.CliffsDelta(corpus).set_categories('Dem').get_score_df().sort_values(by='Dem', ascending=False).iloc[:10]\n```\n\n| term            |   Metric |    Stddev |   Low-5.0% CI |   High-5.0% CI |   TermCount1 |   TermCount2 |   DocCount1 |   DocCount2 |\n|:----------------|---------:|----------:|--------------:|---------------:|-------------:|-------------:|------------:|------------:|\n| obama           | 0.597191 | 0.0266606 |     -1.35507  |      -1.03477  |          537 |          165 |         113 |          40 |\n| president obama | 0.565903 | 0.0314348 |     -2.37978  |      -1.74131  |          351 |           78 |         100 |          30 |\n| president       | 0.426337 | 0.0293418 |      1.22784  |       0.909226 |          740 |          301 |         113 |          53 |\n| middle          | 0.417591 | 0.0267365 |      1.10791  |       0.840932 |          164 |           27 |          68 |          12 |\n| class           | 0.415373 | 0.0280622 |      1.09032  |       0.815649 |          161 |           25 |          69 |          14 |\n| barack          | 0.406997 | 0.0281692 |      1.00765  |       0.750963 |          202 |           46 |          76 |          16 |\n| barack obama    | 0.402562 | 0.027512  |      0.965359 |       0.723403 |          164 |           45 |          76 |          16 |\n| that 's         | 0.384085 | 0.0227344 |      0.809747 |       0.634705 |          236 |           91 |          89 |          31 |\n| obama .         | 0.356245 | 0.0237453 |      0.664688 |       0.509631 |           70 |            5 |          49 |           4 |\n| for             | 0.35526  | 0.0364138 |      0.70142  |       0.46487  |         1020 |          542 |         119 |          62 |\n\n\nWe can elegantly display the Cliff's delta scores using `dataframe_scattertext`, and describe the point coloring scheme\nusing the `include_gradient=True` parameter. We set the `left_gradient_term`, `middle_gradient_term`, and `right_gradient_term`\nparameters to strings which will appear in their corresonding values. \n\n```python\nplot_df = st.CliffsDelta(\n    corpus\n).set_categories(\n    category_name='Dem'\n).get_score_df().rename(columns={'Metric': 'CliffsDelta'}).assign(\n    Frequency=lambda df: df.TermCount1 + df.TermCount1,\n    X=lambda df: df.Frequency,\n    Y=lambda df: df.CliffsDelta,\n    Xpos=lambda df: st.Scalers.dense_rank(df.X),\n    Ypos=lambda df: st.Scalers.scale_center_zero_abs(df.Y),\n    ColorScore=lambda df: df.Ypos,\n)\n\nhtml = st.dataframe_scattertext(\n    corpus,\n    plot_df=plot_df,\n    category='Dem', \n    category_name='Dem',\n    not_category_name='Rep',\n    width_in_pixels=1000, \n    ignore_categories=False,\n    metadata=lambda corpus: corpus.get_df()['speaker'],\n    color_score_column='ColorScore',\n    left_list_column='ColorScore',\n    show_characteristic=False,\n    y_label=\"Cliff's Delta\",\n    x_label='Frequency Ranks',\n    y_axis_labels=[f'More Rep: delta={plot_df.CliffsDelta.max():.3f}',\n                   '',\n                   f'More Dem: delta={-plot_df.CliffsDelta.max():.3f}'],\n    tooltip_columns=['Frequency', 'CliffsDelta'],\n    term_description_columns=['CliffsDelta', 'Stddev', 'Low-95.0% CI', 'High-95.0% CI'],\n    header_names={'upper': 'Top Dem', 'lower': 'Top Reps'},\n    horizontal_line_y_position=0,\n    include_gradient=True,\n    left_gradient_term='More Republican',\n    right_gradient_term='More Democratic',\n    middle_gradient_term=\"Metric: Cliff's Delta\",\n)\n```\n\n[![demo_cliffs_delta.html](https://jasonkessler.github.io/cliffsdelta.png)](https://jasonkessler.github.io/demo_cliffs_delta.html)\n\n\n### Using Bi-Normal Separation (BNS) to score terms\n\nBi-Normal Separation (BNS) (Forman, 2008) was added in version 0.1.8. A variation of (BNS) is used\nwhere $F^{-1}(tpr) - F^{-1}(fpr)$ is not used as an absolute value, but kept as a difference. This allows for\nterms strongly indicative of true positives and false positives to have a high or low score.\nNote that tpr and fpr are scaled to between $[\\alpha, 1-\\alpha]$ where\nalpha is $\\in [0, 1]$. In Forman (2008) and earlier literature $\\alpha=0.0005$. In personal correspondence with Forman,\nhe kindly suggested using $\\frac{1.}{\\mbox{minimum(positives, negatives)}}$. I have implemented this as\n$\\alpha=\\frac{1.}{\\mbox{minimum documents in the least frequent category}}$\n\n```python\ncorpus = (st.CorpusFromPandas(convention_df,\n                              category_col='party',\n                              text_col='text',\n                              nlp=st.whitespace_nlp_with_sentences)\n          .build()\n          .get_unigram_corpus()\n          .remove_infrequent_words(3, term_ranker=st.OncePerDocFrequencyRanker))\n\nterm_scorer = (st.BNSScorer(corpus).set_categories('democrat'))\nprint(term_scorer.get_score_df().sort_values(by='democrat BNS'))\n\nhtml = st.produce_frequency_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    scores=term_scorer.get_score_df()['democrat BNS'].reindex(corpus.get_terms()).values,\n    metadata=lambda c: c.get_df()['speaker'],\n    minimum_term_frequency=0,\n    grey_threshold=0,\n    y_label=f'Bi-normal Separation (alpha={term_scorer.prior_counts})'\n)\n```\n\nBNS Scored terms using an algorithmically found alpha.\n[![BNS](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/d  emo_bi_normal_separation.png)](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_bi_normal_separation.html)\n\n### Using correlations to explain classifiers\n\nWe can train a classifier to produce a prediction score for each document. Often classifiers or regressors\nuse features which take into account features beyond the ones represented by Scatterext, be they n-gram, topic,\nextra-linguistic, neural, etc.\n\nWe can use Scattertext to visualize the correlations between unigrams (or really any feature representation) and\nthe document scores produced by a model.\n\nIn the following example, we train a linear SVM using unigram and bi-gram features on the entire convention data set,\nand use the model to make a prediction on each document, and finally using Pearson's $r$ to correlate unigram features\nto the distance from the SVM decision boundary.\n\n```python\nfrom sklearn.svm import LinearSVC\n\nimport scattertext as st\n\ndf = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences)\n)\n\ncorpus = st.CorpusFromParsedDocuments(\n    df, category_col='party', parsed_col='parse'\n).build()\n\nX = corpus.get_term_doc_mat()\ny = corpus.get_category_ids()\n\nclf = LinearSVC()\nclf.fit(X=X, y=y == corpus.get_categories().index('democrat'))\ndoc_scores = clf.decision_function(X=X)\n\ncompactcorpus = corpus.get_unigram_corpus().compact(st.AssociationCompactor(2000))\n\nplot_df = st.Correlations().set_correlation_type(\n    'pearsonr'\n).get_correlation_df(\n    corpus=compactcorpus,\n    document_scores=doc_scores\n).reindex(compactcorpus.get_terms()).assign(\n    X=lambda df: df.Frequency,\n    Y=lambda df: df['r'],\n    Xpos=lambda df: st.Scalers.dense_rank(df.X),\n    Ypos=lambda df: st.Scalers.scale_center_zero_abs(df.Y),\n    SuppressDisplay=False,\n    ColorScore=lambda df: df.Ypos,\n)\n\nhtml = st.dataframe_scattertext(\n    compactcorpus,\n    plot_df=plot_df,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    width_in_pixels=1000,\n    metadata=lambda c: c.get_df()['speaker'],\n    unified_context=False,\n    ignore_categories=False,\n    color_score_column='ColorScore',\n    left_list_column='ColorScore',\n    y_label=\"Pearson r (correlation to SVM document score)\",\n    x_label='Frequency Ranks',\n    header_names={'upper': 'Top Democratic',\n                  'lower': 'Top Republican'},\n)\n```\n\n[![BNS](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/pearsons.png)](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/pearsons.html)\n\n### Using Custom Background Word Frequencies\n\nScattertext relies on a set of general-domain English word frequencies when computing unigram characteristic  \nscores. When using running Scattertext on non-English data or in a specific domain, the quality of the scores\nwill degrade.\n\nEnsure that you are on Scattertext 0.1.6 or higher.\n\nTo remedy this, one can add a custom set of background scores to a Corpus-like object,\nusing the `Corpus.set_background_corpus` function. The function takes a `pd.Series` object, indexed on\nterms with numeric count values.\n\nBy default, [!understanding-scaled-f-score](Scaled F-Score) is used to rank how characteristic\nterms are.\n\nThe example below illustrates using Polish background word frequencies.\n\nFirst, we produce a Series object mapping Polish words to their frequencies using a list from\nthe [https://github.com/oprogramador/most-common-words-by-language](most-common-words-by-language) repo.\n\n```python\npolish_word_frequencies = pd.read_csv(\n    'https://raw.githubusercontent.com/hermitdave/FrequencyWords/master/content/2016/pl/pl_50k.txt',\n    sep=' ',\n    names=['Word', 'Frequency']\n).set_index('Word')['Frequency']\n```\n\nNote the composition of the Series\n\n```python\n>> > polish_word_frequencies\nWord\nnie\n5875385\nto\n4388099\nsię\n3507076\nw\n2723767\nna\n2309765\nName: Frequency, dtype: int64\n```\n\nNext, we build a DataFrame, `reviews_df`, consisting of document which appear (to a non-Polish speaker) to be\npositive and negative hotel reviews from the [https://klejbenchmark.com/tasks/](PolEmo2.0) corpus\n(Kocoń, et al. 2019). Note this data is under a CC BY-NC-SA 4.0 license. These are labeled as\n\"__label__meta_plus_m\" and \"__label__meta_minus_m\". We will use Scattertext to compare those\nreviews and determine\n\n```python\nnlp = spacy.blank('pl')\nnlp.add_pipe('sentencizer')\n\nwith ZipFile(io.BytesIO(urlopen(\n        'https://klejbenchmark.com/static/data/klej_polemo2.0-in.zip'\n).read())) as zf:\n    review_df = pd.read_csv(zf.open('train.tsv'), sep='\\t')[\n        lambda df: df.target.isin(['__label__meta_plus_m', '__label__meta_minus_m'])\n    ].assign(\n        Parse=lambda df: df.sentence.apply(nlp)\n    )\n```\n\nNext, we wish to create a `ParsedCorpus` object from `review_df`. In preparation, we first assemble a\nlist of Polish stopwords from the [stopwords](https://github.com/bieli/stopwords/) repository. We also\ncreate the `not_a_word` regular expression to filter out terms which do not contain a letter.\n\n```python\npolish_stopwords = {\n    stopword for stopword in\n    urlopen(\n        'https://raw.githubusercontent.com/bieli/stopwords/master/polish.stopwords.txt'\n    ).read().decode('utf-8').split('\\n')\n    if stopword.strip()\n}\n\nnot_a_word = re.compile(r'^\\W+$')\n```\n\nWith these present, we can build a corpus from `review_df` with the category being the binary\n\"target\" column. We reduce the term space to unigrams and then run the `filter_out` which\ntakes a function to determine if a term should be removed from the corpus. The function identifies\nterms which are in the Polish stoplist or do not contain a letter. Finally, terms occurring\nless than 20 times in the corpus are removed.\n\nWe set the background frequency Series we created early as the background corpus.\n\n```python\ncorpus = st.CorpusFromParsedDocuments(\n    review_df,\n    category_col='target',\n    parsed_col='Parse'\n).build(\n).get_unigram_corpus(\n).filter_out(\n    lambda term: term in polish_stopwords or not_a_word.match(term) is not None\n).remove_infrequent_words(\n    minimum_term_count=20\n).set_background_corpus(\n    polish_word_frequencies\n)\n```\n\nNote that a minimum word count of 20 was chosen to ensure that only around 2,000 terms would be displayed\n\n```python\n>> > corpus.get_num_terms()\n2023\n```\n\nRunning `get_term_and_background_counts` shows us total term counts in the corpus compare to background\nfrequency counts. We limit this to terms which only occur in the corpus.\n\n```python\n>> > corpus.get_term_and_background_counts()[\n    ...\nlambda df: df.corpus > 0\n...].sort_values(by='corpus', ascending=False)\n\nbackground\ncorpus\nm\n341583838.0\n4819.0\nhotelu\n33108.0\n1812.0\nhotel\n297974790.0\n1651.0\ndoktor\n154840.0\n1534.0\npolecam\n0.0\n1438.0\n.........\nszoku\n0.0\n21.0\nbadaniem\n0.0\n21.0\nbalkonu\n0.0\n21.0\nstopnia\n0.0\n21.0\nwobec\n0.0\n21.0\n```\n\nInteresting, the term \"polecam\" appears very frequently in the corpus, but does not appear at all\nin the background corpus, making it highly characteristic. Judging from Google Translate, it appears to\nmean something related to \"recommend\".\n\nWe are now ready to display the plot.\n\n```python\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='__label__meta_plus_m',\n    category_name='Plus-M',\n    not_category_name='Minus-M',\n    minimum_term_frequency=1,\n    width_in_pixels=1000,\n    transform=st.Scalers.dense_rank\n)\n```\n\n[![Polish Scattertext](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/polish_pos_neg_scattertext.png)](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/polish_pos_neg_scattertext.html)\n\nWe can change the formula which is used to produce the Characteristic scores\nusing the `characteristic_scorer` parameter to `produce_scattertext_explorer`.\n\nIt takes a instance of a descendant of the `CharacteristicScorer` class. See\n[DenseRankCharacteristicness.py](https://github.com/JasonKessler/scattertext/blob/8ddff82f670aa2ed40312b2cdd077e7f0a98a873/scattertext/characteristic/DenseRankCharacteristicness.py#L36)\nfor an example of how to make your own.\n\nExample of plotting with a modified characteristic scorer,\n\n```python\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='__label__meta_plus_m',\n    category_name='Plus-M',\n    not_category_name='Minus-M',\n    minimum_term_frequency=1,\n    transform=st.Scalers.dense_rank,\n    characteristic_scorer=st.DenseRankCharacteristicness(),\n  \tterm_ranker=st.termranking.AbsoluteFrequencyRanker,\n\tterm_scorer=st.ScaledFScorePresets(beta=1, one_to_neg_one=True)\n).encode('utf-8'))\nprint('open ' + fn)\n\n```\n\n[![Polish Scattertext DenseRank](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/polish_dense_rank_characteristic.png)](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/polish_dense_rank_characteristic.png)\n\nNote that numbers show up as more characteristic using the Dense Rank Difference. It may be they occur\nunusually frequently in this corpus, or perhaps the background word frequencies under counted mumbers.\n\n### Plotting word productivity\n\nWord productivity is one strategy for plotting word-based charts describing an uncategorized corpus.\n\nProductivity is defined in Schumann (2016) (Jason: check this) as the entropy of ngrams\nwhich contain a term. For the entropy computation, the probability of an n-gram wrt the term whose productivity is\nbeing calculated is the frequency of the n-gram divided by the term's frequency.\n\nSince productivity highly correlates with frequency, the recommended metric to plot is the dense rank difference between\nfrequency and productivity.\n\nThe snippet below plots words in the convention corpus based on their log frequency and their productivity.\n\nThe function `st.whole_corpus_productivity_scores` returns a DataFrame giving each word's productivity. For example,\nin the convention corpus,\n\nProductivity scores should be calculated on a `Corpus`-like object which contains a complete set of unigrams and at\nleast bigrams. This corpus should not be compacted before the productivity score calculation.\n\nThe terms with lower productivity have more limited usage (e.g., \"thank\" for \"thank you\", \"united\"\nfor \"united steates\") while the terms with higher productivity occurr in a wider varity of contexts (\"getting\",\n\"actually\", \"political\", etc.).\n\n```python\nimport spacy\nimport scattertext as st\n\ncorpus_no_cat = st.CorpusWithoutCategoriesFromParsedDocuments(\n    st.SampleCorpora.ConventionData2012.get_data().assign(\n        Parse=lambda df: [x for x in spacy.load('en_core_web_sm').pipe(df.text)]),\n    parsed_col='Parse'\n).build()\n\ncompact_corpus_no_cat = corpus_no_cat.get_stoplisted_unigram_corpus().remove_infrequent_words(9)\n\nplot_df = st.whole_corpus_productivity_scores(corpus_no_cat).assign(\n    RankDelta=lambda df: st.RankDifference().get_scores(\n        a=df.Productivity,\n        b=df.Frequency\n    )\n).reindex(\n    compact_corpus_no_cat.get_terms()\n).dropna().assign(\n    X=lambda df: df.Frequency,\n    Xpos=lambda df: st.Scalers.log_scale(df.Frequency),\n    Y=lambda df: df.RankDelta,\n    Ypos=lambda df: st.Scalers.scale(df.RankDelta),\n)\n\nhtml = st.dataframe_scattertext(\n    compact_corpus_no_cat.whitelist_terms(plot_df.index),\n    plot_df=plot_df,\n    metadata=lambda df: df.get_df()['speaker'],\n    ignore_categories=True,\n    x_label='Rank Frequency',\n    y_label=\"Productivity\",\n    left_list_column='Ypos',\n    color_score_column='Ypos',\n    y_axis_labels=['Least Productive', 'Average Productivity', 'Most Productive'],\n    header_names={'upper': 'Most Productive', 'lower': 'Least Productive', 'right': 'Characteristic'},\n    horizontal_line_y_position=0\n)\n\n```\n\n[![Productivity](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/convention_single_category_productivity.html)](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/convention_single_category_productivity.png)\n\n### Understanding Scaled F-Score\n\nLet's now turn our attention to a novel term scoring metric, Scaled F-Score. We'll examine this on a unigram\nversion of the Rotten Tomatoes corpus (Pang et al. 2002). It contains excerpts of\npositive and negative movie reviews.\n\nPlease\nsee [Scaled F Score Explanation](http://nbviewer.jupyter.org/github/JasonKessler/GlobalAI2018/blob/master/notebook/Scaled-F-Score-Explanation.ipynb)\nfor a notebook version of this analysis.\n\n![Scaled F-Score Explanation 1](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs1.png)\n\n```python\nfrom scipy.stats import hmean\n\nterm_freq_df = corpus.get_unigram_corpus().get_term_freq_df()[['Positive freq', 'Negative freq']]\nterm_freq_df = term_freq_df[term_freq_df.sum(axis=1) > 0]\n\nterm_freq_df['pos_precision'] = (term_freq_df['Positive freq'] * 1. /\n                                 (term_freq_df['Positive freq'] + term_freq_df['Negative freq']))\n\nterm_freq_df['pos_freq_pct'] = (term_freq_df['Positive freq'] * 1.\n                                / term_freq_df['Positive freq'].sum())\n\nterm_freq_df['pos_hmean'] = (term_freq_df\n                             .apply(lambda x: (hmean([x['pos_precision'], x['pos_freq_pct']])\n                                               if x['pos_precision'] > 0 and x['pos_freq_pct'] > 0\n                                               else 0), axis=1))\nterm_freq_df.sort_values(by='pos_hmean', ascending=False).iloc[:10]\n```\n\n![SFS2](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs2.png)\n\nIf we plot term frequency on the x-axis and the percentage of a term's occurrences\nwhich are in positive documents (i.e., its precision) on the y-axis, we can see\nthat low-frequency terms have a much higher variation in the precision. Given these terms have\nlow frequencies, the harmonic means are low. Thus, the only terms which have a high harmonic mean\nare extremely frequent words which tend to all have near average precisions.\n\n```python\nfreq = term_freq_df.pos_freq_pct.values\nprec = term_freq_df.pos_precision.values\nhtml = st.produce_scattertext_explorer(\n    corpus.remove_terms(set(corpus.get_terms()) - set(term_freq_df.index)),\n    category='Positive',\n    not_category_name='Negative',\n    not_categories=['Negative'],\n\n    x_label='Portion of words used in positive reviews',\n    original_x=freq,\n    x_coords=(freq - freq.min()) / freq.max(),\n    x_axis_values=[int(freq.min() * 1000) / 1000.,\n                   int(freq.max() * 1000) / 1000.],\n\n    y_label='Portion of documents containing word that are positive',\n    original_y=prec,\n    y_coords=(prec - prec.min()) / prec.max(),\n    y_axis_values=[int(prec.min() * 1000) / 1000.,\n                   int((prec.max() / 2.) * 1000) / 1000.,\n                   int(prec.max() * 1000) / 1000.],\n    scores=term_freq_df.pos_hmean.values,\n\n    sort_by_dist=False,\n    show_characteristic=False\n)\nfile_name = 'not_normed_freq_prec.html'\nopen(file_name, 'wb').write(html.encode('utf-8'))\nIFrame(src=file_name, width=1300, height=700)\n```\n\n![SFS3](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs3.png)\n\n![SFS4](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs4.png)\n\n```python\nfrom scipy.stats import norm\n\n\ndef normcdf(x):\n    return norm.cdf(x, x.mean(), x.std())\n\n\nterm_freq_df['pos_precision_normcdf'] = normcdf(term_freq_df.pos_precision)\n\nterm_freq_df['pos_freq_pct_normcdf'] = normcdf(term_freq_df.pos_freq_pct.values)\n\nterm_freq_df['pos_scaled_f_score'] = hmean(\n    [term_freq_df['pos_precision_normcdf'], term_freq_df['pos_freq_pct_normcdf']])\n\nterm_freq_df.sort_values(by='pos_scaled_f_score', ascending=False).iloc[:10]\n```\n\n![SFS5](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs5.png)\n\n```python\nfreq = term_freq_df.pos_freq_pct_normcdf.values\nprec = term_freq_df.pos_precision_normcdf.values\nhtml = st.produce_scattertext_explorer(\n    corpus.remove_terms(set(corpus.get_terms()) - set(term_freq_df.index)),\n    category='Positive',\n    not_category_name='Negative',\n    not_categories=['Negative'],\n\n    x_label='Portion of words used in positive reviews (norm-cdf)',\n    original_x=freq,\n    x_coords=(freq - freq.min()) / freq.max(),\n    x_axis_values=[int(freq.min() * 1000) / 1000.,\n                   int(freq.max() * 1000) / 1000.],\n\n    y_label='documents containing word that are positive (norm-cdf)',\n    original_y=prec,\n    y_coords=(prec - prec.min()) / prec.max(),\n    y_axis_values=[int(prec.min() * 1000) / 1000.,\n                   int((prec.max() / 2.) * 1000) / 1000.,\n                   int(prec.max() * 1000) / 1000.],\n    scores=term_freq_df.pos_scaled_f_score.values,\n\n    sort_by_dist=False,\n    show_characteristic=False\n)\n```\n\n![SFS6](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs6.png)\n\n![SFS7](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs7.png)\n\n```python\nterm_freq_df['neg_precision_normcdf'] = normcdf((term_freq_df['Negative freq'] * 1. /\n                                                 (term_freq_df['Negative freq'] + term_freq_df['Positive freq'])))\n\nterm_freq_df['neg_freq_pct_normcdf'] = normcdf((term_freq_df['Negative freq'] * 1.\n                                                / term_freq_df['Negative freq'].sum()))\n\nterm_freq_df['neg_scaled_f_score'] = hmean(\n    [term_freq_df['neg_precision_normcdf'], term_freq_df['neg_freq_pct_normcdf']])\n\nterm_freq_df['scaled_f_score'] = 0\nterm_freq_df.loc[term_freq_df['pos_scaled_f_score'] > term_freq_df['neg_scaled_f_score'],\n                 'scaled_f_score'] = term_freq_df['pos_scaled_f_score']\nterm_freq_df.loc[term_freq_df['pos_scaled_f_score'] < term_freq_df['neg_scaled_f_score'],\n                 'scaled_f_score'] = 1 - term_freq_df['neg_scaled_f_score']\nterm_freq_df['scaled_f_score'] = 2 * (term_freq_df['scaled_f_score'] - 0.5)\nterm_freq_df.sort_values(by='scaled_f_score', ascending=True).iloc[:10]\n```\n\n![SFS8](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs8.png)\n\n```python\nis_pos = term_freq_df.pos_scaled_f_score > term_freq_df.neg_scaled_f_score\nfreq = term_freq_df.pos_freq_pct_normcdf * is_pos - term_freq_df.neg_freq_pct_normcdf * ~is_pos\nprec = term_freq_df.pos_precision_normcdf * is_pos - term_freq_df.neg_precision_normcdf * ~is_pos\n\n\ndef scale(ar):\n    return (ar - ar.min()) / (ar.max() - ar.min())\n\n\ndef close_gap(ar):\n    ar[ar > 0] -= ar[ar > 0].min()\n    ar[ar < 0] -= ar[ar < 0].max()\n    return ar\n\n\nhtml = st.produce_scattertext_explorer(\n    corpus.remove_terms(set(corpus.get_terms()) - set(term_freq_df.index)),\n    category='Positive',\n    not_category_name='Negative',\n    not_categories=['Negative'],\n\n    x_label='Frequency',\n    original_x=freq,\n    x_coords=scale(close_gap(freq)),\n    x_axis_labels=['Frequent in Neg',\n                   'Not Frequent',\n                   'Frequent in Pos'],\n\n    y_label='Precision',\n    original_y=prec,\n    y_coords=scale(close_gap(prec)),\n    y_axis_labels=['Neg Precise',\n                   'Imprecise',\n                   'Pos Precise'],\n\n    scores=(term_freq_df.scaled_f_score.values + 1) / 2,\n    sort_by_dist=False,\n    show_characteristic=False\n)\n```\n\n![SFS9](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs9.png)\n\nWe can use `st.ScaledFScorePresets` as a term scorer to display terms' Scaled F-Score on the y-axis and\nterm frequencies on the x-axis.\n\n```python\nhtml = st.produce_frequency_explorer(\n    corpus.remove_terms(set(corpus.get_terms()) - set(term_freq_df.index)),\n    category='Positive',\n    not_category_name='Negative',\n    not_categories=['Negative'],\n    term_scorer=st.ScaledFScorePresets(beta=1, one_to_neg_one=True),\n    metadata=rdf['movie_name'],\n    grey_threshold=0\n)\n```\n\n![SFS10](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/scaledfscoreimgs/sfs10.png)\n\n### Alternative term scoring methods\n\nScaled F-Score is not the only scoring method included in Scattertext. Please click on one of the links below to\nview a notebook which describes how other class association scores work and can be visualized through Scattertext.\n\n* [Google Colab Notebook](https://colab.research.google.com/drive/1snxAP8X6EIDi42FugJ_h5U-fBGDCqtyS) (recommend).\n* [Jupyter Notebook via NBViewer](https://colab.research.google.com/drive/1snxAP8X6EIDi42FugJ_h5U-fBGDCqtyS).\n\nNew in 0.0.2.73 is the delta JS-Divergence scorer `DeltaJSDivergence` scorer (Gallagher et al. 2020), and its\ncorresponding compactor (JSDCompactor.) See `demo_deltajsd.py` for an example usage.\n\n### The position-select-plot process\n\nNew in 0.0.2.72\n\nScattertext was originally set up to visualize corpora objects, which are connected sets of documents and\nterms to visualize. The \"compaction\" process allows users to eliminate terms which may not be associated with a\ncategory using a variety of feature selection methods. The issue with this is that the terms eliminated during\nthe selection process are not taken into account when scaling term positions.\n\nThis issue can be mitigated by using the position-select-plot process, where term positions are pre-determined\nbefore the selection process is made.\n\nLet's first use the 2012 conventions corpus, update the category names, and create a unigram corpus.\n\n```python\nimport scattertext as st\nimport numpy as np\n\ndf = st.SampleCorpora.ConventionData2012.get_data().assign(\n    parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences)\n).assign(party=lambda df: df['party'].apply({'democrat': 'Democratic', 'republican': 'Republican'}.get))\n\ncorpus = st.CorpusFromParsedDocuments(\n    df, category_col='party', parsed_col='parse'\n).build().get_unigram_corpus()\n\ncategory_name = 'Democratic'\nnot_category_name = 'Republican'\n```\n\nNext, let's create a dataframe consisting of the original counts and their log-scale positions.\n\n```python\ndef get_log_scale_df(corpus, y_category, x_category):\n    term_coord_df = corpus.get_term_freq_df('')\n\n    # Log scale term counts (with a smoothing constant) as the initial coordinates\n    coord_columns = []\n    for category in [y_category, x_category]:\n        col_name = category + '_coord'\n        term_coord_df[col_name] = np.log(term_coord_df[category] + 1e-6) / np.log(2)\n        coord_columns.append(col_name)\n\n    # Scale these coordinates to between 0 and 1\n    min_offset = term_coord_df[coord_columns].min(axis=0).min()\n    for coord_column in coord_columns:\n        term_coord_df[coord_column] -= min_offset\n    max_offset = term_coord_df[coord_columns].max(axis=0).max()\n    for coord_column in coord_columns:\n        term_coord_df[coord_column] /= max_offset\n    return term_coord_df\n\n\n# Get term coordinates from original corpus\nterm_coordinates = get_log_scale_df(corpus, category_name, not_category_name)\nprint(term_coordinates)\n```\n\nHere is a preview of the `term_coordinates` dataframe. The `Democrat` and\n`Republican` columns contain the term counts, while the `_coord` columns\ncontain their logged coordinates. Visualizing 7,973 terms is difficult (but\npossible) for people running Scattertext on most computers.\n\n```\n          Democratic  Republican  Democratic_coord  Republican_coord\nterm\nthank            158         205          0.860166          0.872032\nyou              836         794          0.936078          0.933729\nso               337         212          0.894681          0.873562\nmuch              84          76          0.831380          0.826820\nvery              62          75          0.817543          0.826216\n...              ...         ...               ...               ...\nprecinct           0           2          0.000000          0.661076\ngodspeed           0           1          0.000000          0.629493\nbeauty             0           1          0.000000          0.629493\nbumper             0           1          0.000000          0.629493\nsticker            0           1          0.000000          0.629493\n\n[7973 rows x 4 columns]\n```\n\nWe can visualize this full data set by running the following code block. We'll create a custom\nJavascript function to populate the tooltip with the original term counts, and create a\nScattertext Explorer where the x and y coordinates and original values are specified from the data\nframe. Additionally, we can use `show_diagonal=True` to draw a dashed diagonal line across the plot area.\n\nYou can click the chart below to see the interactive version. Note that it will take a while to load.\n\n```\n# The tooltip JS function. Note that d is is the term data object, and ox and oy are the original x- and y-\n# axis counts.\nget_tooltip_content = ('(function(d) {return d.term + \"<br/>' + not_category_name + ' Count: \" ' +\n                       '+ d.ox +\"<br/>' + category_name + ' Count: \" + d.oy})')\n\n\nhtml_orig = st.produce_scattertext_explorer(\n    corpus,\n    category=category_name,\n    not_category_name=not_category_name,\n    minimum_term_frequency=0,\n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000,\n    metadata=corpus.get_df()['speaker'],\n    show_diagonal=True,\n    original_y=term_coordinates[category_name],\n    original_x=term_coordinates[not_category_name],\n    x_coords=term_coordinates[category_name + '_coord'],\n    y_coords=term_coordinates[not_category_name + '_coord'],\n    max_overlapping=3,\n    use_global_scale=True,\n    get_tooltip_content=get_tooltip_content,\n)\n```\n\n[![demo_global_scale_log_orig.png](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_global_scale_log_orig.png)](https://jasonkessler.github.io/demo_global_scale_log_orig.html)\n\nNext, we can visualize the compacted version of the corpus. The compaction, using `ClassPercentageCompactor`,\nselects terms which frequently in each category. The `term_count` parameter, set to 2, is used to determine\nthe percentage threshold for terms to keep in a particular category. This is done using by calculating the\npercentile of terms (types) in each category which appear more than two times. We find the smallest percentile,\nand only include terms which occur above that percentile in a given category.\n\nNote that this compaction leaves only 2,828 terms. This number is much easier for Scattertext to display\nin a browser.\n\n```python\n# Select terms which appear a minimum threshold in both corpora\ncompact_corpus = corpus.compact(st.ClassPercentageCompactor(term_count=2))\n\n# Only take term coordinates of terms remaining in corpus\nterm_coordinates = term_coordinates.loc[compact_corpus.get_terms()]\n\nhtml_compact = st.produce_scattertext_explorer(\n    compact_corpus,\n    category=category_name,\n    not_category_name=not_category_name,\n    minimum_term_frequency=0,\n    pmi_threshold_coefficient=0,\n    width_in_pixels=1000,\n    metadata=corpus.get_df()['speaker'],\n    show_diagonal=True,\n    original_y=term_coordinates[category_name],\n    original_x=term_coordinates[not_category_name],\n    x_coords=term_coordinates[category_name + '_coord'],\n    y_coords=term_coordinates[not_category_name + '_coord'],\n    max_overlapping=3,\n    use_global_scale=True,\n    get_tooltip_content=get_tooltip_content,\n)\n```\n\n[![demo_global_scale_log.png](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_global_scale_log.png)](https://jasonkessler.github.io/demo_global_scale_log.html)\n\n\n## Advanced uses\n\n### Visualizing differences based on only term frequencies\n\nOccasionally, only term frequency statistics are available. This may happen in the case of very large,\nlost, or proprietary data sets. `TermCategoryFrequencies` is a corpus representation,that can accept this\nsort of data, along with any categorized documents that happen to be available.\n\nLet use the [Corpus of Contemporary American English](https://corpus.byu.edu/coca/) as an example.  \nWe'll construct a visualization\nto analyze the difference between spoken American English and English that occurs in fiction.\n\n```python\ndf = (pd.read_excel('https://www.wordfrequency.info/files/genres_sample.xls')\n      .dropna()\n      .set_index('lemma')[['SPOKEN', 'FICTION']]\n      .iloc[:1000])\ndf.head()\n'''\n       SPOKEN    FICTION\nlemma\nthe    3859682.0  4092394.0\nI      1346545.0  1382716.0\nthey   609735.0   352405.0\nshe    212920.0   798208.0\nwould  233766.0   229865.0\n'''\n```\n\nTransforming this into a visualization is extremely easy. Just pass a dataframe indexed on\nterms with columns indicating category-counts into the the `TermCategoryFrequencies` constructor.\n\n```python\nterm_cat_freq = st.TermCategoryFrequencies(df)\n``` \n\nAnd call `produce_scattertext_explorer` normally:\n\n```python\nhtml = st.produce_scattertext_explorer(\n    term_cat_freq,\n    category='SPOKEN',\n    category_name='Spoken',\n    not_category_name='Fiction',\n)\n```\n\n[![demo_category_frequencies.html](https://jasonkessler.github.io/demo_category_frequencies.png)](https://jasonkessler.github.io/demo_category_frequencies.html)\n\nIf you'd like to incorporate some documents into the visualization, you can add them into to the\n`TermCategoyFrequencies` object.\n\nFirst, let's extract some example Fiction and Spoken documents from the sample COCA corpus.\n\n```python\nimport requests, zipfile, io\n\ncoca_sample_url = 'http://corpus.byu.edu/cocatext/samples/text.zip'\nzip_file = zipfile.ZipFile(io.BytesIO(requests.get(coca_sample_url).content))\n\ndocument_df = pd.DataFrame(\n    [{'text': zip_file.open(fn).read().decode('utf-8'),\n      'category': 'SPOKEN'}\n     for fn in zip_file.filelist if fn.filename.startswith('w_spok')][:2]\n    + [{'text': zip_file.open(fn).read().decode('utf-8'),\n        'category': 'FICTION'}\n       for fn in zip_file.filelist if fn.filename.startswith('w_fic')][:2])\n```   \n\nAnd we'll pass the `documents_df` dataframe into `TermCategoryFrequencies` via the `document_category_df`\nparameter. Ensure the dataframe has two columns, 'text' and 'category'. Afterward, we can\ncall `produce_scattertext_explorer` (or your visualization function of choice) normally.\n\n```python\ndoc_term_cat_freq = st.TermCategoryFrequencies(df, document_category_df=document_df)\n\nhtml = st.produce_scattertext_explorer(\n    doc_term_cat_freq,\n    category='SPOKEN',\n    category_name='Spoken',\n    not_category_name='Fiction',\n)\n```\n\n### Visualizing query-based categorical differences\n\nWord representations have recently become a hot topic in NLP. While lots of work has been done visualizing\nhow terms relate to one another given their scores\n(e.g., [http://projector.tensorflow.org/](http://projector.tensorflow.org/)),\nnone to my knowledge has been done visualizing how we can use these to examine how\ndocument categories differ.\n\nIn this example given a query term, \"jobs\", we can see how Republicans and\nDemocrats talk about it differently.\n\nIn this configuration of Scattertext, words are colored by their similarity to a query phrase.  \nThis is done using [spaCy](https://spacy.io/)-provided GloVe word vectors (trained on\nthe Common Crawl corpus). The cosine distance between vectors is used,\nwith mean vectors used for phrases.\n\nThe calculation of the most similar terms associated with each category is a simple heuristic. First,\nsets of terms closely associated with a category are found. Second, these terms are ranked\nbased on their similarity to the query, and the top rank terms are displayed to the right of the\nscatterplot.\n\nA term is considered associated if its p-value is less than 0.05. P-values are\ndetermined using Monroe et al. (2008)'s difference in the weighted log-odds-ratios with an\nuninformative Dirichlet prior. This is the only model-based method discussed in Monroe et al.\nthat does not rely on a large, in-domain background corpus. Since we are scoring\nbigrams in addition to the unigrams scored by Monroe, the size of the corpus would have to be larger\nto have high enough bigram counts for proper penalization. This function\nrelies the Dirichlet distribution's parameter alpha, a vector, which is uniformly set to 0.01.\n\nHere is the code to produce such a visualization.\n\n```pydocstring\n>>> from scattertext import word_similarity_explorer\n>>> html = word_similarity_explorer(corpus,\n...                                 category='democrat',\n...                                 category_name='Democratic',\n...                                 not_category_name='Republican',\n...                                 target_term='jobs',\n...                                 minimum_term_frequency=5,\n...                                 pmi_threshold_coefficient=4,\n...                                 width_in_pixels=1000,\n...                                 metadata=convention_df['speaker'],\n...                                 alpha=0.01,\n...                                 max_p_val=0.05,\n...                                 save_svg_button=True)\n>>> open(\"Convention-Visualization-Jobs.html\", 'wb').write(html.encode('utf-8'))\n``` \n\n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/Convention-Visualization-Jobs.png)](https://jasonkessler.github.io/Convention-Visualization-Jobs.html)\n\n#### Developing and using bespoke word representations\n\nScattertext can interface with Gensim Word2Vec models. For example, here's a snippet from `demo_gensim_similarity.py`\nwhich illustrates how to train and use a word2vec model on a corpus. Note the similarities produced\nreflect quirks of the corpus, e.g., \"8\" tends to refer to the 8% unemployment rate at the time of the\nconvention.\n\n```python\nimport spacy\nfrom gensim.models import word2vec\nfrom scattertext import SampleCorpora, word_similarity_explorer_gensim, Word2VecFromParsedCorpus\nfrom scattertext.CorpusFromParsedDocuments import CorpusFromParsedDocuments\n\nnlp = spacy.en.English()\nconvention_df = SampleCorpora.ConventionData2012.get_data()\nconvention_df['parsed'] = convention_df.text.apply(nlp)\ncorpus = CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='parsed').build()\nmodel = word2vec.Word2Vec(size=300,\n                          alpha=0.025,\n                          window=5,\n                          min_count=5,\n                          max_vocab_size=None,\n                          sample=0,\n                          seed=1,\n                          workers=1,\n                          min_alpha=0.0001,\n                          sg=1,\n                          hs=1,\n                          negative=0,\n                          cbow_mean=0,\n                          iter=1,\n                          null_word=0,\n                          trim_rule=None,\n                          sorted_vocab=1)\nhtml = word_similarity_explorer_gensim(corpus,\n                                       category='democrat',\n                                       category_name='Democratic',\n                                       not_category_name='Republican',\n                                       target_term='jobs',\n                                       minimum_term_frequency=5,\n                                       pmi_threshold_coefficient=4,\n                                       width_in_pixels=1000,\n                                       metadata=convention_df['speaker'],\n                                       word2vec=Word2VecFromParsedCorpus(corpus, model).train(),\n                                       max_p_val=0.05,\n                                       save_svg_button=True)\nopen('./demo_gensim_similarity.html', 'wb').write(html.encode('utf-8'))\n```\n\nHow Democrats and Republicans talked differently about \"jobs\" in their 2012 convention speeches.\n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/demo_gensim_similarity.png)](https://jasonkessler.github.io/demo_gensim_similarity.html)\n\n### Visualizing any kind of term score\n\nWe can use Scattertext to visualize alternative types of word scores, and ensure that 0 scores are greyed out. Use\nthe `sparse_explroer` function to acomplish this, and see its source code for more details.\n\n```pydocstring\n>>> from sklearn.linear_model import Lasso\n>>> from scattertext import sparse_explorer\n>>> html = sparse_explorer(corpus,\n...                        category='democrat',\n...                        category_name='Democratic',\n...                        not_category_name='Republican',\n...                        scores = corpus.get_regression_coefs('democrat', Lasso(max_iter=10000)),\n...                        minimum_term_frequency=5,\n...                        pmi_threshold_coefficient=4,\n...                        width_in_pixels=1000,\n...                        metadata=convention_df['speaker'])\n>>> open('./Convention-Visualization-Sparse.html', 'wb').write(html.encode('utf-8'))\n```\n\n[![Convention-Visualization-Sparse.html](https://jasonkessler.github.io/Convention-Visualization-Sparse.png)](https://jasonkessler.github.io/Convention-Visualization-Sparse.html)\n\n### Custom term positions\n\nYou can also use custom term positions and axis labels. For example, you can base terms' y-axis\npositions on a regression coefficient and their x-axis on term frequency and label the axes\naccordingly. The one catch is that axis positions must be scaled between 0 and 1.\n\nFirst, let's define two scaling functions: `scale` to project positive values to \\[0,1\\], and\n`zero_centered_scale` project real values to \\[0,1\\], with negative values always \\<0.5, and\npositive values always \\>0.5.\n\n```pydocstring\n>>> def scale(ar):\n...     return (ar - ar.min()) / (ar.max() - ar.min())\n...\n>>> def zero_centered_scale(ar):\n...     ar[ar > 0] = scale(ar[ar > 0])\n...     ar[ar < 0] = -scale(-ar[ar < 0])\n...     return (ar + 1) / 2.\n```\n\nNext, let's compute and scale term frequencies and L2-penalized regression coefficients. We'll\nhang on to the original coefficients and allow users to view them by mousing over terms.\n\n```pydocstring\n>>> from sklearn.linear_model import LogisticRegression\n>>> import numpy as np\n>>>\n>>> frequencies_scaled = scale(np.log(term_freq_df.sum(axis=1).values))\n>>> scores = corpus.get_logreg_coefs('democrat',\n...                                  LogisticRegression(penalty='l2', C=10, max_iter=10000, n_jobs=-1))\n>>> scores_scaled = zero_centered_scale(scores)\n```\n\nFinally, we can write the visualization. Note the use of the `x_coords` and `y_coords`\nparameters to store the respective coordinates, the `scores` and `sort_by_dist` arguments\nto register the original coefficients and use them to rank the terms in the right-hand\nlist, and the `x_label` and `y_label` arguments to label axes.\n\n```pydocstring\n>>> html = produce_scattertext_explorer(corpus,\n...                                     category='democrat',\n...                                     category_name='Democratic',\n...                                     not_category_name='Republican',\n...                                     minimum_term_frequency=5,\n...                                     pmi_threshold_coefficient=4,\n...                                     width_in_pixels=1000,\n...                                     x_coords=frequencies_scaled,\n...                                     y_coords=scores_scaled,\n...                                     scores=scores,\n...                                     sort_by_dist=False,\n...                                     metadata=convention_df['speaker'],\n...                                     x_label='Log frequency',\n...                                     y_label='L2-penalized logistic regression coef')\n>>> open('demo_custom_coordinates.html', 'wb').write(html.encode('utf-8'))\n```\n\n[![demo_custom_coordinates.html](https://jasonkessler.github.io/demo_custom_coordinates.png)](https://jasonkessler.github.io/demo_custom_coordinates.html)\n\n### Emoji analysis\n\nThe Emoji analysis capability displays a chart of the category-specific distribution\nof Emoji. Let's look at a new corpus, a set of tweets. We'll build a visualization\nshowing how men and women use emoji differently.\n\nNote: the following example is implemented in `demo_emoji.py`.\n\nFirst, we'll load the dataset and parse it using NLTK's tweet tokenizer. Note, install NLTK\nbefore running this example. It will take some time for the dataset to download.\n\n```python\nimport nltk, urllib.request, io, agefromname, zipfile\nimport scattertext as st\nimport pandas as pd\n\nwith zipfile.ZipFile(io.BytesIO(urllib.request.urlopen(\n        'http://followthehashtag.com/content/uploads/USA-Geolocated-tweets-free-dataset-Followthehashtag.zip'\n).read())) as zf:\n    df = pd.read_excel(zf.open('dashboard_x_usa_x_filter_nativeretweets.xlsx'))\n\nnlp = st.tweet_tokenzier_factory(nltk.tokenize.TweetTokenizer())\ndf['parse'] = df['Tweet content'].apply(nlp)\n\ndf.iloc[0]\n'''\nTweet Id                                                     721318437075685382\nDate                                                                 2016-04-16\nHour                                                                      12:44\nUser Name                                                        Bill Schulhoff\nNickname                                                          BillSchulhoff\nBio                           Husband,Dad,GrandDad,Ordained Minister, Umpire...\nTweet content                 Wind 3.2 mph NNE. Barometer 30.20 in, Rising s...\nFavs                                                                        NaN\nRTs                                                                         NaN\nLatitude                                                                40.7603\nLongitude                                                              -72.9547\nCountry                                                                      US\nPlace (as appears on Bio)                                    East Patchogue, NY\nProfile picture               http://pbs.twimg.com/profile_images/3788000007...\nFollowers                                                                   386\nFollowing                                                                   705\nListed                                                                       24\nTweet language (ISO 639-1)                                                   en\nTweet Url                     http://www.twitter.com/BillSchulhoff/status/72...\nparse                         Wind 3.2 mph NNE. Barometer 30.20 in, Rising s...\nName: 0, dtype: object\n'''\n```\n\nNext, we'll use the [AgeFromName](https://github.com/JasonKessler/agefromname) package to find the probabilities of the\ngender of\neach user given their first name. First, we'll find a dataframe indexed on first names\nthat contains the probability that each someone with that first name is male (`male_prob`).\n\n```python\nmale_prob = agefromname.AgeFromName().get_all_name_male_prob()\nmale_prob.iloc[0]\n'''\nhi      1.00000\nlo      0.95741\nprob    1.00000\nName: aaban, dtype: float64\n'''\n```\n\nNext, we'll extract the first names of each user, and use the `male_prob` data frame\nto find users whose names indicate there is at least a 90% chance they are either male or female,\nlabel those users, and create new data frame `df_mf` with only those users.\n\n```python\ndf['first_name'] = df['User Name'].apply(lambda x: x.split()[0].lower() if type(x) == str and len(x.split()) > 0 else x)\ndf_aug = pd.merge(df, male_prob, left_on='first_name', right_index=True)\ndf_aug['gender'] = df_aug['prob'].apply(lambda x: 'm' if x > 0.9 else 'f' if x < 0.1 else '?')\ndf_mf = df_aug[df_aug['gender'].isin(['m', 'f'])]\n```\n\nThe key to this analysis is to construct a corpus using only the emoji\nextractor `st.FeatsFromSpacyDocOnlyEmoji` which builds a corpus only from\nemoji and not from anything else.\n\n```python\ncorpus = st.CorpusFromParsedDocuments(\n    df_mf,\n    parsed_col='parse',\n    category_col='gender',\n    feats_from_spacy_doc=st.FeatsFromSpacyDocOnlyEmoji()\n).build()\n```\n\nNext, we'll run this through a standard `produce_scattertext_explorer` visualization\ngeneration.\n\n```python\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='f',\n    category_name='Female',\n    not_category_name='Male',\n    use_full_doc=True,\n    term_ranker=st.OncePerDocFrequencyRanker,\n    sort_by_dist=False,\n    metadata=(df_mf['User Name']\n              + ' (@' + df_mf['Nickname'] + ') '\n              + df_mf['Date'].astype(str)),\n    width_in_pixels=1000\n)\nopen(\"EmojiGender.html\", 'wb').write(html.encode('utf-8'))\n```\n\n[![EmojiGender.html](https://jasonkessler.github.io/EmojiGender.png)](https://jasonkessler.github.io/EmojiGender.html)\n\n### Visualizing SentencePiece Tokens\n\n[SentencePiece](https://github.com/google/sentencepiece) tokenization is a subword tokenization technique which\nrelies on a language-model to produce optimized tokenization. It has been used in large, transformer-based contextual\nlanguage models.\n\nEnsure to run `$ pip install sentencepiece` before running this example.\n\nFirst, let's load the political convention data set as normal.\n\n```python\nimport tempfile\nimport re\nimport scattertext as st\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df.text.apply(st.whitespace_nlp_with_sentences)\n```\n\nNext, let's train a SentencePiece tokenizer based on this data. The `train_sentence_piece_tokenizer` function trains\na SentencePieceProcessor on the data set and returns it. You can of course use any SentencePieceProcessor.\n\n```python\n\ndef train_sentence_piece_tokenizer(documents, vocab_size):\n    '''\n    :param documents: list-like, a list of str documents\n    :vocab_size int: the size of the vocabulary to output\n    \n    :return sentencepiece.SentencePieceProcessor\n    '''\n    import sentencepiece as spm\n    sp = None\n    with tempfile.NamedTemporaryFile(delete=True) as tempf:\n        with tempfile.NamedTemporaryFile(delete=True) as tempm:\n            tempf.write(('\\n'.join(documents)).encode())\n            spm.SentencePieceTrainer.Train(\n                '--input=%s --model_prefix=%s --vocab_size=%s' % (tempf.name, tempm.name, vocab_size)\n            )\n            sp = spm.SentencePieceProcessor()\n            sp.load(tempm.name + '.model')\n    return sp\n\n\nsp = train_sentence_piece_tokenizer(convention_df.text.values, vocab_size=2000)\n\n```\n\nNext, let's add the SentencePiece tokens as metadata when creating our corpus. In order to do this, pass\na `FeatsFromSentencePiece` instance into the `feats_from_spacy_doc` parameter. Pass the SentencePieceProcessor into\nthe constructor.\n\n```python\ncorpus = st.CorpusFromParsedDocuments(convention_df,\n                                      parsed_col='parse',\n                                      category_col='party',\n                                      feats_from_spacy_doc=st.FeatsFromSentencePiece(sp)).build()\n```\n\nNow we can create the SentencePiece token scatter plot.\n\n```python\nhtml = st.produce_scattertext_explorer(\n    corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    sort_by_dist=False,\n    metadata=convention_df['party'] + ': ' + convention_df['speaker'],\n    term_scorer=st.RankDifference(),\n    transform=st.Scalers.dense_rank,\n    use_non_text_features=True,\n    use_full_doc=True,\n)\n```\n\n[![demo_sentence_piece.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_sentence_piece.png)](https://jasonkessler.github.io/demo_sentence_piece.html)\n\n### Visualizing scikit-learn text classification weights\n\nSuppose you'd like to audit or better understand\nweights or importances given to bag-of-words features\nby a classifier.\n\nIt's easy to use Scattertext to do, if you use a Scikit-learn-style classifier.\n\nFor example the [Lighting](http://contrib.scikit-learn.org/lightning/) package makes available\nhigh-performance linear classifiers which are have Scikit-compatible interfaces.\n\nFirst, let's import `sklearn`'s text feature extraction classes, the 20 Newsgroup\ncorpus, Lightning's Primal Coordinate Descent classifier, and Scattertext. We'll also\nfetch the training portion of the Newsgroup corpus.\n\n```python\nfrom lightning.classification import CDClassifier\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer\n\nimport scattertext as st\n\nnewsgroups_train = fetch_20newsgroups(\n    subset='train',\n    remove=('headers', 'footers', 'quotes')\n)\n```\n\nNext, we'll tokenize our corpus twice. Once into tfidf features\nwhich will be used to train the classifier, an another time into\nngram counts that will be used by Scattertext. It's important that\nboth vectorizers share the same vocabulary, since we'll need to apply the\nweight vector from the model onto our Scattertext Corpus.\n\n```python\nvectorizer = TfidfVectorizer()\ntfidf_X = vectorizer.fit_transform(newsgroups_train.data)\ncount_vectorizer = CountVectorizer(vocabulary=vectorizer.vocabulary_)\n```\n\nNext, we use the `CorpusFromScikit` factory to build a Scattertext Corpus object.\nEnsure the `X` parameter is a document-by-feature matrix. The argument to the\n`y` parameter is an array of class labels. Each label is an integer representing\na different news group. We the `feature_vocabulary` is the vocabulary used by the\nvectorizers. The `category_names` are a list of the 20 newsgroup names which\nas a class-label list. The `raw_texts` is a list of the text of newsgroup texts.\n\n```python\ncorpus = st.CorpusFromScikit(\n    X=count_vectorizer.fit_transform(newsgroups_train.data),\n    y=newsgroups_train.target,\n    feature_vocabulary=vectorizer.vocabulary_,\n    category_names=newsgroups_train.target_names,\n    raw_texts=newsgroups_train.data\n).build()\n```\n\nNow, we can train the model on `tfidf_X` and the categoricla response variable,\nand capture feature weights for category 0 (\"alt.atheism\").\n\n```python\nclf = CDClassifier(penalty=\"l1/l2\",\n                   loss=\"squared_hinge\",\n                   multiclass=True,\n                   max_iter=20,\n                   alpha=1e-4,\n                   C=1.0 / tfidf_X.shape[0],\n                   tol=1e-3)\nclf.fit(tfidf_X, newsgroups_train.target)\nterm_scores = clf.coef_[0]\n```\n\nFinally, we can create a Scattertext plot. We'll use the Monroe-style visualization, and automatically\nselect around 4000 terms that encompass the set of frequent terms, terms with high absolute scores,\nand terms that are characteristic of the corpus.\n\n```python\nhtml = st.produce_frequency_explorer(\n    corpus,\n    'alt.atheism',\n    scores=term_scores,\n    use_term_significance=False,\n    terms_to_include=st.AutoTermSelector.get_selected_terms(corpus, term_scores, 4000),\n    metadata=['/'.join(fn.split('/')[-2:]) for fn in newsgroups_train.filenames]\n)\n```\n\n[![demo_sklearn.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_sklearn.png)](https://jasonkessler.github.io/demo_sklearn.html)\n\nLet's take a look at the performance of the classifier:\n\n```python\nnewsgroups_test = fetch_20newsgroups(subset='test',\n                                     remove=('headers', 'footers', 'quotes'))\nX_test = vectorizer.transform(newsgroups_test.data)\npred = clf.predict(X_test)\nf1 = f1_score(pred, newsgroups_test.target, average='micro')\nprint(\"Microaveraged F1 score\", f1)\n```\n\nMicroaveraged F1 score 0.662108337759. Not bad over a ~0.05 baseline.\n\n### Creating lexicalized semiotic squares\n\nPlease see [Signo](http://www.signosemio.com/greimas/semiotic-square.asp) for an\nintroduction to semiotic squares.\n\nSome variants of the semiotic square-creator are can be seen in this notebook, which studies\nwords and phrases in headlines that had low or high Facebook engagement and were published by\neither BuzzFeed or the New York\nTimes: [http://nbviewer.jupyter.org/github/JasonKessler/PuPPyTalk/blob/master/notebooks/Explore-Headlines.ipynb]\n\nThe idea behind the semiotic square is to express the relationship between two opposing\nconcepts and concepts things within a larger domain of a discourse.\nExamples of opposed concepts life or death, male or female, or, in our example, positive or negative sentiment.\nSemiotics squares are comprised of four \"corners\": the upper two corners are the opposing concepts,\nwhile the bottom corners are the negation of the concepts.\n\nCircumscribing the negation of a concept involves finding everything in the\ndomain of discourse that isn't associated with the concept. For example, in the\nlife-death opposition, one can consider the universe of discourse to be all\nanimate beings, real and hypothetical. The not-alive category will cover dead things,\nbut also hypothetical entities like fictional characters or sentient AIs.\n\nIn building lexicalized semiotic squares, we consider concepts to be documents labeled\nin a corpus. Documents, in this setting, can belong to one of three categories: two labels corresponding\nto the opposing concepts, a neutral category, indicating a document is in the same domain as\nthe opposition, but cannot fall into one of opposing categories.\n\nIn the example below positive and negative movie reviews are treated as the opposing categories,\nwhile plot descriptions of the same movies are treated as the neutral category.\n\nTerms associated with one of the two opposing categories (relative only to the other) are\nlisted as being associated with that category. Terms associated with a netural category\n(e.g., not positive) are terms which are associated with the disjunction of the opposite\ncategory and the neutral category. For example, not-positive terms are those most associated\nwith the set of negative reviews and plot descriptions vs. positive reviews.\n\nCommon terms among adjacent corners of the square are also listed.\n\nAn HTML-rendered square is accompanied by a scatter plot. Points on the plot are terms.\nThe x-axis is the Z-score of the association to one of the opposed concepts. The y-axis\nis the Z-score how associated a term is with the neutral set of documents relative to the\nopposed set. A point's red-blue color indicate the term's opposed-association, while\nthe more desaturated a term is, the more it is associated with the neutral set of documents.\n\nUpdate to version 2.2: terms are colored by their nearest semiotic categories across the eight\ncorresponding radial sectors.\n\n```python\nimport scattertext as st\n\nmovie_df = st.SampleCorpora.RottenTomatoes.get_data()\nmovie_df.category = movie_df.category.apply\n    (lambda x: {'rotten': 'Negative', 'fresh': 'Positive', 'plot': 'Plot'}[x])\ncorpus = st.CorpusFromPandas(\n    movie_df,\n    category_col='category',\n    text_col='text',\n    nlp=st.whitespace_nlp_with_sentences\n).build().get_unigram_corpus()\n\nsemiotic_square = st.SemioticSquare(\n    corpus,\n    category_a='Positive',\n    category_b='Negative',\n    neutral_categories=['Plot'],\n    scorer=st.RankDifference(),\n    labels={'not_a_and_not_b': 'Plot Descriptions', 'a_and_b': 'Reviews'}\n)\n\nhtml = st.produce_semiotic_square_explorer(semiotic_square,\n                                           category_name='Positive',\n                                           not_category_name='Negative',\n                                           x_label='Fresh-Rotten',\n                                           y_label='Plot-Review',\n                                           neutral_category_name='Plot Description',\n                                           metadata=movie_df['movie_name'])\n```\n\n[![semiotic square](https://jasonkessler.github.io/semiotic_square_plot.png)](https://jasonkessler.github.io/demo_semiotic.html)\n\nThere are a number of other types of semiotic square construction functions. Again, please \nsee https://nbviewer.org/github/JasonKessler/PuPPyTalk/blob/master/notebooks/Explore-Headlines.ipynb for \nan overview of these.\n\n### Visualizing Topic Models\n\nA frequently requested feature of Scattertext has been the ability to visualize topic\nmodels. While this capability has existed in some forms (e.g., the Empath visualization),\nI've finally gotten around to implementing a concise API for such a visualization.\nThere are three main ways to visualize topic models using Scattertext.\nThe first is the simplest: manually entering topic models and visualizing them.\nThe second uses a Scikit-Learn pipeline to produce the topic models for visualization.\nThe third is a novel topic modeling technique, based on finding terms similar to a\ncustom set of seed terms.\n\n#### Manually entered topic models\n\nIf you have already created a topic model, simply structure it as a dictionary.\nThis dictionary is keyed on string which serve as topic titles and are displayed\nin the main scatterplot. The values are lists of words that belong to that topic. The words\nthat are in each topic list are bolded when they appear in a snippet.\n\nNote that currently, there is no support for keyword scores.\n\nFor example, one might manually the following topic models to explore in the Convention\ncorpus:\n\n```python\ntopic_model = {\n    'money': ['money', 'bank', 'banks', 'finances', 'financial', 'loan', 'dollars', 'income'],\n    'jobs': ['jobs', 'workers', 'labor', 'employment', 'worker', 'employee', 'job'],\n    'patriotic': ['america', 'country', 'flag', 'americans', 'patriotism', 'patriotic'],\n    'family': ['mother', 'father', 'mom', 'dad', 'sister', 'brother', 'grandfather', 'grandmother', 'son', 'daughter']\n}\n```\n\nWe can use the `FeatsFromTopicModel` class to transform this topic model into one which\ncan be visualized using Scattertext. This is used just like any other feature builder,\nand we pass the topic model object into `produce_scattertext_explorer`.\n\n```\nimport scattertext as st\n\ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n\ntopic_corpus = st.CorpusFromParsedDocuments(\n\tconvention_df,\n\tcategory_col='party',\n\tparsed_col='parse',\n\tfeats_from_spacy_doc=topic_feature_builder\n).build()\n\nhtml = st.produce_scattertext_explorer(\n\ttopic_corpus,\n\tcategory='democrat',\n\tcategory_name='Democratic',\n\tnot_category_name='Republican',\n\twidth_in_pixels=1000,\n\tmetadata=convention_df['speaker'],\n\tuse_non_text_features=True,\n\tuse_full_doc=True,\n\tpmi_threshold_coefficient=0,\n\ttopic_model_term_lists=topic_feature_builder.get_top_model_term_lists()\n)\n```\n\n[![demo_custom_topic_model.html](https://raw.githubusercontent.com/JasonKessler/jasonkessler.github.io/master/demo_custom_topic_model.png)](https://jasonkessler.github.io/demo_custom_topic_model.html)\n\n#### Using Scikit-Learn for Topic Modeling\n\nSince topic modeling using document-level coocurence generally produces poor results,\nI've added a `SentencesForTopicModeling` class which allows clusterting by coocurence\nat the sentence-level. It requires a `ParsedCorpus` object to be passed to its constructor,\nand creates a term-sentence matrix internally.\n\nNext, you can create a topic model dictionary like the one above by passing in a Scikit-Learn\nclustering or dimensionality reduction pipeline. The only constraint is the last transformer\nin the pipeline must populate a `components_` attribute.\n\nThe `num_topics_per_term` attribute specifies how many terms should be added to a list.\n\nIn the following example, we'll use NMF to cluster a stoplisted, unigram corpus of documents,\nand use the topic model dictionary to create a `FeatsFromTopicModel`, just like before.\n\nNote that in `produce_scattertext_explorer`, we make the `topic_model_preview_size` 20 in order to show\na preview of the first 20 terms in the topic in the snippet view as opposed to the default 10.\n\n```python\nfrom sklearn.decomposition import NMF\nfrom sklearn.feature_extraction.text import TfidfTransformer\nfrom sklearn.pipeline import Pipeline\n\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\n\nunigram_corpus = (st.CorpusFromParsedDocuments(convention_df,\n                                               category_col='party',\n                                               parsed_col='parse')\n                  .build().get_stoplisted_unigram_corpus())\ntopic_model = st.SentencesForTopicModeling(unigram_corpus).get_topics_from_model(\n    Pipeline([\n        ('tfidf', TfidfTransformer(sublinear_tf=True)),\n        ('nmf', (NMF(n_components=100, alpha=.1, l1_ratio=.5, random_state=0)))\n    ]),\n    num_terms_per_topic=20\n)\n\ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n\ntopic_corpus = st.CorpusFromParsedDocuments(\n    convention_df,\n    category_col='party',\n    parsed_col='parse',\n    feats_from_spacy_doc=topic_feature_builder\n).build()\n\nhtml = st.produce_scattertext_explorer(\n    topic_corpus,\n    category='democrat',\n    category_name='Democratic',\n    not_category_name='Republican',\n    width_in_pixels=1000,\n    metadata=convention_df['speaker'],\n    use_non_text_features=True,\n    use_full_doc=True,\n    pmi_threshold_coefficient=0,\n    topic_model_term_lists=topic_feature_builder.get_top_model_term_lists(),\n    topic_model_preview_size=20\n)\n```\n\n[![demo_nmf_topic_model.html](https://jasonkessler.github.io/demo_nmf_topic_model.png)](https://jasonkessler.github.io/demo_nmf_topic_model.html)\n\n#### Using a Word List to Generate a Series of Topics\n\nA surprisingly easy way to generate good topic models is to use a term scoring formula\nto find words that are associated with sentences where a seed word occurs vs. where\none doesn't occur.\n\nGiven a custom term list, the `SentencesForTopicModeling.get_topics_from_terms` will\ngenerate a series of topics. Note that the dense rank difference (`RankDifference`) works\nparticularly well for this task, and is the default parameter.\n\n```python\nterm_list = ['obama', 'romney', 'democrats', 'republicans', 'health', 'military', 'taxes',\n             'education', 'olympics', 'auto', 'iraq', 'iran', 'israel']\n\nunigram_corpus = (st.CorpusFromParsedDocuments(convention_df,\n                                               category_col='party',\n                                               parsed_col='parse')\n                  .build().get_stoplisted_unigram_corpus())\n\ntopic_model = (st.SentencesForTopicModeling(unigram_corpus)\n               .get_topics_from_terms(term_list,\n                                      scorer=st.RankDifference(),\n                                      num_terms_per_topic=20))\n\ntopic_feature_builder = st.FeatsFromTopicModel(topic_model)\n# The remaining code is identical to two examples above. See demo_word_list_topic_model.py\n# for the complete example.\n```\n\n[![demo_word_list_topic_model.html](https://jasonkessler.github.io/demo_word_list_topic_model.png)](https://jasonkessler.github.io/demo_word_list_topic_model.html)\n\n### Creating T-SNE-style word embedding projection plots\n\nScattertext makes it easy to create word-similarity plots using projections of word embeddings as the x and y-axes.\nIn the example below, we create a stop-listed Corpus with only unigram terms. The `produce_projection_explorer` function\nby uses Gensim to create word embeddings and then projects them to two dimentions using Uniform Manifold Approximation\nand Projection (UMAP).\n\nUMAP is chosen over T-SNE because it can employ the cosine similarity between two word vectors instead of just the\neuclidean distance.\n\n```python\nconvention_df = st.SampleCorpora.ConventionData2012.get_data()\nconvention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\n\ncorpus = (st.CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='parse')\n          .build().get_stoplisted_unigram_corpus())\n\nhtml = st.produce_projection_explorer(corpus, category='democrat', category_name='Democratic',\n                                      not_category_name='Republican', metadata=convention_df.speaker)\n```\n\nIn order to use custom word embedding functions or projection functions, pass models into the `word2vec_model`\nand `projection_model` parameters. In order to use T-SNE, for example, use\n`projection_model=sklearn.manifold.TSNE()`.\n\n```python\nimport umap\nfrom gensim.models.word2vec import Word2Vec\n\nhtml = st.produce_projection_explorer(corpus,\n                                      word2vec_model=Word2Vec(size=100, window=5, min_count=10, workers=4),\n                                      projection_model=umap.UMAP(min_dist=0.5, metric='cosine'),\n                                      category='democrat',\n                                      category_name='Democratic',\n                                      not_category_name='Republican',\n                                      metadata=convention_df.speaker)                                                                            \n```\n\n[![t-sne style plot](https://jasonkessler.github.io/demo_tsne_style.png)](https://jasonkessler.github.io/demo_tsne_style.html)\n\n### Using SVD to visualize any kind of word embeddings\n\nTerm positions can also be determined by the positions of terms according to the output of principal component analysis,\nand `produce_projection_explorer` also supports this functionality. We'll look at how axes transformations (\"scalers\"\nin Scattertext terminology) can make it easier to inspect the output of PCA.\n\nWe'll use the 2012 Conventions corpus for these visualizations. Only unigrams occurring in at least three documents\nwill be considered.\n\n```pydocstring\n>>> convention_df = st.SampleCorpora.ConventionData2012.get_data()\n>>> convention_df['parse'] = convention_df['text'].apply(st.whitespace_nlp_with_sentences)\n>>> corpus = (st.CorpusFromParsedDocuments(convention_df,\n...                                        category_col='party',\n...                                        parsed_col='parse')\n...           .build()\n...           .get_stoplisted_unigram_corpus()\n...           .remove_infrequent_words(minimum_term_count=3, term_ranker=st.OncePerDocFrequencyRanker))\n```\n\nNext, we use scikit-learn's tf-idf transformer to find very simple, sparse embeddings for all of these words. Since,\nwe input a #docs x #terms matrix to the transformer, we can transpose it to get a proper term-embeddings matrix, where\neach row\ncorresponds to a term, and the columns correspond to document-specific tf-idf scores.\n\n```pydocstring\n>>> from sklearn.feature_extraction.text import TfidfTransformer\n>>> embeddings = TfidfTransformer().fit_transform(corpus.get_term_doc_mat())\n>>> embeddings.shape\n(189, 2159)\n>>> corpus.get_num_docs(), corpus.get_num_terms()\n(189, 2159) \n>>> embeddings = embeddings.T\n>>> embeddings.shape\n(2159, 189)\n```\n\nGiven these spare embeddings, we can apply sparse singular value decomposition to extract three factors. SVD outputs\nfactorizes the term embeddings matrix into three matrices, U, Σ, and VT. Importantly, the matrix U provides the singular\nvalues\nfor each term, and VT provides them for each document, and Σ is a vector of the singular values.\n\n```pydocstring\n>>> from scipy.sparse.linalg import svds\n>>> U, S, VT = svds(embeddings, k = 3, maxiter=20000, which='LM')\n>>> U.shape\n(2159, 3)\n>>> S.shape\n(3,)\n>>> VT.shape\n(3, 189)\n```\n\nWe'll look at the first two singular values, plotting each term such that the x-axis position is the first singular\nvalue, and the y-axis term is the second. To do this, we make a \"projection\" data frame, where the `x` and `y`\ncolumns store the first two singular values, and key the data frame on each term. This controls the term positions\non the chart.\n\n```pydocstring\n>>> x_dim = 0; y_dim = 1;\n>>> projection = pd.DataFrame({'term':corpus.get_terms(),\n...                            'x':U.T[x_dim],\n...                            'y':U.T[y_dim]}).set_index('term')\n```\n\nWe'll use the `produce_pca_explorer` function to visualize these. Note we include the projection object, and specify\nwhich singular values were used for x and y (`x_dim` and `y_dim`) so we they can be labeled in the interactive\nvisualization.\n\n```pydocstring\nhtml = st.produce_pca_explorer(corpus,\n                               category='democrat',\n                               category_name='Democratic',\n                               not_category_name='Republican',\n                               projection=projection,\n                               metadata=convention_df['speaker'],\n                               width_in_pixels=1000,\n                               x_dim=x_dim,\n                               y_dim=y_dim)\n```\n\nClick for an interactive visualization.  \n[![pca](https://jasonkessler.github.io/svd1.png)](https://jasonkessler.github.io/demo_embeddings_svd_0_1.html)\n\nWe can easily re-scale the plot in order to make more efficient use of space. For example, passing in\n`scaler=scale_neg_1_to_1_with_zero_mean` will make all four quadrants take equal area.\n\n```pydocstring\nhtml = st.produce_pca_explorer(corpus,\n                               category='democrat',\n                               category_name='Democratic',\n                               not_category_name='Republican',\n                               projection=projection,\n                               metadata=convention_df['speaker'],\n                               width_in_pixels=1000,\n                               scaler=st.scale_neg_1_to_1_with_zero_mean,\n                               x_dim=x_dim,\n                               y_dim=y_dim)\n```\n\nClick for an interactive visualization.  \n[![pca](https://jasonkessler.github.io/svd2.png)](https://jasonkessler.github.io/demo_embeddings_svd_0_1_scale_neg_1_to_1_with_zero_mean.html)\n\n### Exporting plot to matplotlib\n\nTo export the content of a scattertext explorer object (ScattertextStructure) to matplotlib you can\nuse `produce_scattertext_pyplot`. The function returns a `matplotlib.figure.Figure` object which can be visualized\nusing `plt.show` or `plt.savefig` as in the example below.\n\nNote that installation of textalloc==0.0.3 and matplotlib>=3.6.0 is required before running this.\n\n```pydocstring\nconvention_df = st.SampleCorpora.ConventionData2012.get_data().assign(\n\tparse = lambda df: df.text.apply(st.whitespace_nlp_with_sentences)\n)\ncorpus = st.CorpusFromParsedDocuments(convention_df, category_col='party', parsed_col='parse').build()\nscattertext_structure = st.produce_scattertext_explorer(\n\tcorpus,\n\tcategory='democrat',\n\tcategory_name='Democratic',\n\tnot_category_name='Republican',\n\tminimum_term_frequency=5,\n\tpmi_threshold_coefficient=8,\n\twidth_in_pixels=1000,\n\treturn_scatterplot_structure=True,\n)\nfig = st.produce_scattertext_pyplot(scattertext_structure)\nfig.savefig('pyplot_export.png', format='png')\n```\n\n[![pyplot](https://jasonkessler.github.io/pyplot_export.png)]\n\n## Examples\n\nPlease see the examples in the [PyData 2017 Tutorial](https://github.com/JasonKessler/Scattertext-PyData) on\nScattertext.\n\n## A note on chart layout\n\n[Cozy: The Collection Synthesizer](https://github.com/uwplse/cozy) (Loncaric 2016) was used to help determine\nwhich terms could be labeled without overlapping a circle or another label. It automatically built a data structure to\nefficiently store and query the locations of each circle and labeled term.\n\nThe script to build `rectangle-holder.js` was\n\n```\nfields ax1 : long, ay1 : long, ax2 : long, ay2 : long\nassume ax1 < ax2 and ay1 < ay2\nquery findMatchingRectangles(bx1 : long, by1 : long, bx2 : long, by2 : long)\n    assume bx1 < bx2 and by1 < by2\n    ax1 < bx2 and ax2 > bx1 and ay1 < by2 and ay2 > by1\n```\n\nAnd it was called using\n\n```\n$ python2.7 src/main.py <script file name> --enable-volume-trees \\\n  --js-class RectangleHolder --enable-hamt --enable-arrays --js rectangle_holder.js\n```\n\n## What's new\n\n## 0.0.2.64\n\nAdding in code to ensure that term statistics will show up even if no documents are present in visualization.\n\n## 0.0.2.60\n\nBetter axis labeling (see demo_axis_crossbars_and_labels.py).\n\n## 0.0.2.59\n\nPytextrank compatibility\n\n## 0.0.2.57-58\n\nEnsuring Pandas 1.0 compatibility fixing Issue #51 and scikit-learn stopwords import issue in #49.\n\n## 0.0.2.44:\n\n* Added the following classes to support rank-based feature-selection: `AssociationCompactorByRank`,\n  `TermCategoryRanker`.\n\n## 0.0.2.43:\n\n* Made the term pop-up box on the category pairplot only the category name\n* Fixed optimal projection search function\n* Merged PR from @millengustavo to fix when a FutureWarning is issued every time the get_background_frequency_df\n  is called.\n\n## 0.0.2.42:\n\n* Fixed clickablity of terms, coloring in certain plots\n* Added initial number of terms to show in pairplot, using the `terms_to_show` parameter\n\n## 0.0.2.41:\n\n* Enabled changing protocol in pair plot\n* Fixed semiotic square creator\n* Added `use_categories_as_metadata_and_replace_terms` to `TermDocMatrix`.\n* Added `get_metadata_doc_count_df` and `get_metadata_count_mat` to TermDocMatrix\n\n## 0.0.2.40:\n\n* Added categories to terms in pair plot halo, made them clickable\n\n## 0.0.2.39:\n\n* Fixing failing test case\n* Adding halo to pair plot\n\n## 0.0.2.38:\n\n* Fixed term preview/clickability in semiotic square plots\n* Fixed search box\n* Added preliminary `produce_pairplot`\n\n## 0.0.2.37:\n\n* Javascript changes to support multiple plots on a single page.\n* Added `ScatterChart.hide_terms(terms: iter[str])` which enables selected terms to be hidden from the chart.\n* Added `ScatterChartData.score_transform` to specify the function which can change an original score into a value\n  between 0 and 1 used for term coloring.\n\n## 0.0.2.36:\n\n* Added `alternative_term_func` to `produce_scattertext_explorer` which allows you to inject a function that activates\n  when a term is clicked.\n* Fixed Cohen's d calculation, and added `HedgesG`, and unbiased version of Cohen's d which is a subclass of `CohensD`.\n* Added the `frequency_transform` parameter to `produce_frequency_explorer`. This defaults to a log transform, but\n  allows you to use any way your heart desires to order terms along the x-axis.\n\n## 0.0.2.35:\n\n* Added `show_category_headings=True` to `produce_scattertext_explorer`. Setting this to False suppresses the list of\n  categories\n  which will be displayed in the term context area.\n* Added `div_name` argument to `produce_scattertext_explorer` and name-spaced important divs and classes by `div_name`\n  in HTML templates and Javascript.\n* Added `show_cross_axes=True` to `produce_scattertext_explorer`. Setting this to `False` prevents the cross axes\n  from being displayed if `show_axes` is `True`.\n* Changed default scorer to RankDifference.\n* Made sure that term contexts were properly shown in all configurations.\n\n## 0.0.2.34:\n\n* `TermDocMatrix.get_metadata_freq_df` now accepts the `label_append` argument which by default adds `' freq'` to the\n  end of each column.\n* `TermDocMatrix.get_num_cateogires` returns the number of categories in a term-document matrix.\n\n## 0.0.2.33:\n\nAdded the following methods:\n\n* `TermDocMatrixWithoutCategories.get_num_metadata`\n* `TermDocMatrix.use_metadata_as_categories`\n* `unified_context` argument in `produce_scattertext_explorer` lists all contexts in a single column. This let's\n  you see snippets organized by multiple categories in a single column. See `demo_unified_context.py` for an example.  \n  helps category-free or multi-category analyses.\n\n## 0.0.2.32\n\nAdded a series of objects to handle uncategorized corpora. Added section on\n[Document-Based Scatterplots](#document-based-scatterplots), and the add_doc_names_as_metadata function.\n`CategoryColorAssigner` was also added to assign colors to a qualitative categories.\n\n## 0.0.28-31\n\nA number of new term scoring approaches including `RelativeEntropy` (a direct implementation of Frankhauser et al. (\n2014)), and\n`ZScores` and implementation of the Z-Score model used in Frankhauser et al.\n\n`TermDocMatrix.get_metadata_freq_df()` returns a metadata-doc corpus.\n\n`CorpusBasedTermScorer.set_ranker` allows you to use a different term ranker when finding corpus-based scores. This not\nonly\nlets these scorers with metadata, but also allows you to integrate once-per-document counts.\n\nFixed `produce_projection_explorer` such that it can work with a predefined set of term embeddings. This can allow,\nfor example, the easy exploration of one hot-encoded term embeddings in addition to\narbitrary lower-dimensional embeddings.\n\nAdded `add_metadata` to `TermDocMatrix` in order to inject meta data after a TermDocMatrix object\nhas been created.\n\nMade sure tooltip never started above the top of the web page.\n\n### 0.0.2.28\n\nAdded `DomainCompactor`.\n\n### 0.0.2.26-27.1\n\nFixed bug [#31](https://github.com/JasonKessler/scattertext/issues/31), enabling context to show when metadata value is\nclicked.\n\nEnabled display of terms in topic models in explorer, along with the the display of\ncustomized topic models. Please see [Visualizing topic models](#visualizing-topic-models) for an\noverview of the additions.\n\nRemoved pkg_resources from Phrasemachine, corrected demo_phrase_machine.py\n\nNow compatible with Gensim 3.4.0.\n\nAdded characteristic explorer, `produce_characteristic_explorer`, to plot terms with their characteristic scores on\nthe x-axis and their class-association scores on the y-axis.\nSee [Ordering Terms by Corpus Characteristicness](#ordering-terms-by-corpus-characteristicness) for more details.\n\n### 0.0.2.24-25\n\nAdded `TermCategoryFrequencies` in response to Issue 23. Please\nsee [Visualizing differences based on only term frequencies](#visualizing-differences-based-on-only-term-frequencies)\nfor more details.\n\nAdded `x_axis_labels` and `y_axis_labels` parameters to `produce_scattertext_explorer`.\nThese let you include evenly-spaced string axis labels on the chart, as opposed to just\n\"Low\", \"Medium\" and \"High\". These rely on d3's ticks function, which can behave\nunpredictable. Caveat usor.\n\n### 0.0.2.16-23.1\n\nSemiotic Squares now look better, and have customizable labels.\n\nIncorporated the [General Inquirer](http://www.wjh.harvard.edu/~inquirer/homecat.htm)\nlexicon. For non-commercial use only. The lexicon is downloaded from their homepage at the start of each\nuse. See `demo_general_inquierer.py`.\n\nIncorporated Phrasemachine from [AbeHandler](https://github.com/AbeHandler) (Handler et al. 2016). For the license,\nplease see `PhraseMachineLicense.txt`. For an example, please see `demo_phrase_machine.py`.\n\nAdded `CompactTerms` for removing redundant and infrequent terms from term document matrices.\nThese occur if a word or phrase is always part of a larger phrase; the shorter phrase is\nconsidered redundant and removed from the corpus. See `demo_phrase_machine.py` for an example.\n\nAdded `FourSquare`, a pattern that allows for the creation of a semiotic square with\nseparate categories for each corner. Please see `demo_four_square.py` for an early example.\n\nFinally, added a way to easily perform T-SNE-style visualizations on a categorized corpus. This uses, by default,\nthe [umap-learn](https://github.com/lmcinnes/umap) package. Please see demo_tsne_style.py.\n\nFixed to `ScaledFScorePresets(one_to_neg_one=True)`, added `UnigramsFromSpacyDoc`.\n\nNow, when using `CorpusFromPandas`, a `CorpusDF` object is returned, instead of a `Corpus` object. This new type of\nobject\nkeeps a reference to the source data frame, and returns it via the `CorpusDF.get_df()` method.\n\nThe factory `CorpusFromFeatureDict` was added. It allows you to directly specify term counts and\nmetadata item counts within the dataframe. Please see `test_corpusFromFeatureDict.py` for an example.\n\n### 0.0.2.15-16\n\nAdded a very semiotic square creator.\n\nThe idea to build a semiotic square that contrasts two categories in a Term Document Matrix\nwhile using other categories as neutral categories.\n\nSee [Creating semiotic squares](#creating-semiotic-squares) for an overview on how to\nuse this functionality and semiotic squares.\n\nAdded a parameter to disable the display of the top-terms sidebar, e.g.,\n`produce_scattertext_explorer(..., show_top_terms=False, ...)`.\n\nAn interface to part of the subjectivity/sentiment dataset from\nBo Pang and Lillian Lee. ``A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization\nBased on Minimum Cuts''. ACL. 2004. See `SampleCorpora.RottenTomatoes`.\n\nFixed bug that caused tooltip placement to be off after scrolling.\n\nMade `category_name` and `not_category_name` optional in `produce_scattertext_explorer` etc.\n\nCreated the ability to customize tooltips via the `get_tooltip_content` argument to\n`produce_scattertext_explorer` etc., control axes labels via `x_axis_values`\nand `y_axis_values`. The `color_func` parameter is a Javascript function to control color of a point. Function takes a\nparameter\nwhich is a dictionary entry produced by `ScatterChartExplorer.to_dict` and returns a string.\n\n### 0.0.2.14\n\nIntegration with Scikit-Learn's text-analysis pipeline led the creation of the\n`CorpusFromScikit` and `TermDocMatrixFromScikit` classes.\n\nThe `AutoTermSelector` class to automatically suggest terms to appear in the visualization.  \nThis can make it easier to show large data sets, and remove fiddling with the various\nminimum term frequency parameters.\n\nFor an example of how to use `CorpusFromScikit` and `AutoTermSelector`, please see `demo_sklearn.py`\n\nAlso, I updated the library and examples to be compatible with spaCy 2.\n\nFixed bug when processing single-word documents, and set the default beta to 2.\n\n### 0.0.2.11-13\n\nAdded `produce_frequency_explorer` function, and adding the PEP 369-compliant\n`__version__` attribute as mentioned in [#19](https://github.com/JasonKessler/scattertext/issues/19).\nFixed bug when creating visualizations with more than two possible categories. Now, by default,\ncategory names will not be title-cased in the visualization, but will retain their original case.  \nIf you'd still like to do this this, use `ScatterChart (or a descendant).to_dict(..., title_case_names=True)`.\nFixed `DocsAndLabelsFromCorpus` for Py 2 compatibility.\n\n### 0.0.2.10\n\nFixed bugs in `chinese_nlp` when jieba has already been imported and in p-value\ncomputation when performing log-odds-ratio w/ prior scoring.\n\nAdded demo for performing a Monroe et. al (2008) style visualization of\nlog-odds-ratio scores in `demo_log_odds_ratio_prior.py`.\n\n### 0.0.2.9.*\n\nBreaking change: `pmi_filter_thresold` has been replaced with `pmi_threshold_coefficient`.\n\nAdded Emoji and Tweet analysis. See [Emoji analysis](#emoji-analysis).\n\nCharacteristic terms falls back ot \"Most frequent\" if no terms used in the chart are present\nin the background corpus.\n\nFixed top-term calculation for custom scores.\n\nSet scaled f-score's default beta to 0.5.\n\nAdded `--spacy_language_model` argument to the CLI.\n\nAdded the `alternative_text_field` option in `produce_scattertext_explorer` to show an\nalternative text field when showing contexts in the interactive HTML visualization.\n\nUpdated `ParsedCorpus.get_unigram_corpus` to allow for continued\n`alternative_text_field` functionality.\n\n### 0.0.2.8.6\n\nAdded ability to for Scattertext to use noun chunks instead of unigrams and bigrams through the\n`FeatsFromSpacyDocOnlyNounChunks` class. In order to use it, run your favorite `Corpus` or\n`TermDocMatrix` factory, and pass in an instance of the class as a parameter:\n\n```\nst.CorpusFromParsedDocuments(..., feats_from_spacy_doc=st.FeatsFromSpacyDocOnlyNounChunks())\n```\n\nFixed a bug in corpus construction that occurs when the last document has no features.\n\n### 0.0.2.8.5\n\nNow you don't have to install tinysegmenter to use Scattertext. But you need to\ninstall it if you want to parse Japanese. This caused a problem when Scattertext\nwas being installed on Windows.\n\n### 0.0.2.8.1-4\n\nAdded `TermDocMatrix.get_corner_score`, giving an improved version of the\nRudder Score. Exposing `whitespace_nlp_with_sentences`. It's a lightweight\nbad regex sentence splitter built a top a bad regex tokenizer that somewhat\napes spaCy's API. Use it if you don't have spaCy and the English model\ndownloaded or if you care more about memory footprint and speed than accuracy.\n\nIt's not compatible with `word_similarity_explorer` but is compatible with\n`word_similarity_explorer_gensim'.\n\nTweaked scaled f-score normalization.\n\nFixed Javascript bug when clicking on '$'.\n\n### 0.0.2.8.0\n\nFixed bug in Scaled F-Score computations, and changed computation to better score words that are inversely correlated to\ncategory.\n\nAdded `Word2VecFromParsedCorpus` to automate training Gensim word vectors from a corpus, and  \n`word_similarity_explorer_gensim` to produce the visualization.\n\nSee `demo_gensim_similarity.py` for an example.\n\n### 0.0.2.7.1\n\nAdded the `d3_url` and `d3_scale_chromatic_url` parameters to\n`produce_scattertext_explorer`. This provides a way to manually specify the paths to \"d3.js\"\n(i.e., the file from \"https://cdnjs.cloudflare.com/ajax/libs/d3/4.6.0/d3.min.js\") and\n\"d3-scale-chromatic.v1.js\" (i.e., the file from \"https://d3js.org/d3-scale-chromatic.v1.min.js\").\n\nThis is important if you're getting the error:\n\n```\nJavascript error adding output!\nTypeError: d3.scaleLinear is not a function\nSee your browser Javascript console for more details.\n``` \n\nIt also lets you use Scattertext if you're serving in an environment with no (or a restricted)\nexternal Internet connection.\n\nFor example, if \"d3.min.js\" and \"d3-scale-chromatic.v1.min.js\" were present in the current\nworking directory, calling the following code would reference them locally instead of\nthe remote Javascript files. See [Visualizing term associations](#visualizing-term-associations)\nfor code context.\n\n```pydocstring\n>>> html = st.produce_scattertext_explorer(corpus,\n...          category='democrat',\n...          category_name='Democratic',\n...          not_category_name='Republican',\n...          width_in_pixels=1000,\n...          metadata=convention_df['speaker'],\n...          d3_url='d3.min.js',\n...          d3_scale_chromatic_url='d3-scale-chromatic.v1.min.js')\n```\n\n### 0.0.2.7.0\n\nFixed a bug in 0.0.2.6.0 that transposed default axis labels.\n\nAdded a Japanese mode to Scattertext. See `demo_japanese.py` for an example of\nhow to use Japanese. Please run `pip install tinysegmenter` to parse Japanese.\n\nAlso, the `chiense_mode` boolean parameter in\n`produce_scattertext_explorer` has been renamed to `asian_mode`.\n\nFor example, the output of `demo_japanese.py` is:\n[![demo_japanese.html](https://jasonkessler.github.io/demo_japanese.png)](https://jasonkessler.github.io/demo_japanese.html)\n\n### 0.0.2.6.0\n\nCustom term positions and axis labels. Although not recommended, you can\nvisualize different metrics on each axis in visualizations similar to Monroe et al. (2008).\nPlease see [Custom term positions](#custom-term-positions) for more info.\n\n### 0.0.2.5.0\n\nEnhanced the visualization of query-based categorical differences, a.k.a the `word_similarity_explorer`\nfunction. When run, a plot is produced that contains category associated terms\ncolored in either red or blue hues, and terms not associated with either class\ncolored in greyscale and slightly smaller. The intensity of each color indicates\nassociation with the query term. For example:\n\n[![Convention-Visualization-Jobs.html](https://jasonkessler.github.io/Conventions-Viz-Explanation.png)](https://jasonkessler.github.io/Convention-Visualization-Jobs.html)\n\n### 0.0.2.4.6\n\nSome minor bug fixes, and added a `minimum_not_category_term_frequency` parameter. This fixes a problem with\nvisualizing imbalanced datasets. It sets a minimum number of times a word that does not appear in the target\ncategory must appear before it is displayed.\n\nAdded `TermDocMatrix.remove_entity_tags` method to remove entity type tags\nfrom the analysis.\n\n### 0.0.2.4.5\n\nFixed matched snippet not displaying issue [#9](/../../issues/9), and fixed a Python 2 issue\nin created a visualization using a `ParsedCorpus` prepared via `CorpusFromParsedDocuments`, mentioned\nin the latter part of the issue [#8](/../../issues/8) discussion.\n\nAgain, Python 2 is supported in experimental mode only.\n\n### 0.0.2.4.4\n\nCorrected example links on this Readme.\n\nFixed a bug in Issue 8 where the HTML visualization produced by `produce_scattertext_html` would fail.\n\n### 0.0.2.4.2\n\nFixed a couple issues that rendered Scattertext broken in Python 2. Chinese processing still does not work.\n\nNote: Use Python 3.4+ if you can.\n\n### 0.0.2.4.1\n\nFixed links in Readme, and made regex NLP available in CLI.\n\n### 0.0.2.4\n\nAdded the command line tool, and fixed a bug related to Empath visualizations.\n\n### 0.0.2.3\n\nAbility to see how a particular term is discussed differently between categories\nthrough the `word_similarity_explorer` function.\n\nSpecialized mode to view sparse term scores.\n\nFixed a bug that was caused by repeated values in background unigram counts.\n\nAdded true alphabetical term sorting in visualizations.\n\nAdded an optional save-as-SVG button.\n\n### 0.0.2.2\n\nAddition option of showing characteristic terms (from the full set of documents) being considered.\nThe option (`show_characteristic` in `produce_scattertext_explorer`) is on by default,\nbut currently unavailable for Chinese. If you know of a good Chinese wordcount list,\nplease let me know. The algorithm used to produce these is F-Score.  \nSee [this and the following slide](http://www.slideshare.net/JasonKessler/turning-unstructured-content-into-kernels-of-ideas/58)\nfor more details\n\n### 0.0.2.1.5\n\nAdded document and word count statistics to main visualization.\n\n### 0.0.2.1.4\n\nAdded preliminary support for visualizing [Empath](https://github.com/Ejhfast/empath-client) (Fast 2016) topics\ncategories instead of emotions. See the tutorial for more information.\n\n### 0.0.2.1.3\n\nImproved term-labeling.\n\n### 0.0.2.1.1\n\nAddition of `strip_final_period` param to `FeatsFromSpacyDoc` to deal with spaCy\ntokenization of all-caps documents that can leave periods at the end of terms.\n\n### 0.0.2.1.0\n\nI've added support for Chinese, including the ChineseNLP class, which uses a RegExp-based\nsentence splitter and [Jieba](https://github.com/fxsjy/jieba) for word\nsegmentation. To use it, see the `demo_chinese.py` file. Note that `CorpusFromPandas`\ncurrently does not support ChineseNLP.\n\nIn order for the visualization to work, set the `asian_mode` flag to `True` in\n`produce_scattertext_explorer`.\n\n## Sources\n\n* 2012 Convention Data: scraped\n  from [The New York Times.](http://www.nytimes.com/interactive/2012/09/06/us/politics/convention-word-counts.html?_r=0)\n* count_1w: Peter Norvig assembled this file (downloaded from [norvig.com](http://norvig.com/ngrams/count_1w.txt)).\n  See http://norvig.com/ngrams/ for an explanation of how it was gathered from a very large corpus.\n* hamlet.txt: William Shakespeare. From [shapespeare.mit.edu](http://shakespeare.mit.edu/hamlet/full.html)\n* Inspiration for text scatter plots: Rudder, Christian. Dataclysm: Who We Are (When We Think No One's Looking). Random\n  House Incorporated, 2014.\n* Loncaric, Calvin. \"Cozy: synthesizing collection data structures.\" Proceedings of the 2016 24th ACM SIGSOFT\n  International Symposium on Foundations of Software Engineering. ACM, 2016.\n* Fast, Ethan, Binbin Chen, and Michael S. Bernstein. \"Empath: Understanding topic signals in large-scale text.\"\n  Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems. ACM, 2016.\n* Burt L. Monroe, Michael P. Colaresi, and Kevin M. Quinn. 2008. Fightin’ words: Lexical feature selection and\n  evaluation for identifying the content of political conflict. Political Analysis.\n* Bo Pang and Lillian Lee. A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization Based on Minimum\n  Cuts, Proceedings of the ACL, 2004.\n* Abram Handler, Matt Denny, Hanna Wallach, and Brendan O'Connor. Bag of what? Simple noun phrase extraction for corpus\n  analysis. NLP+CSS Workshop at EMNLP 2016.\n* Peter Fankhauser, Jörg Knappen, Elke Teich. Exploring and visualizing variation in language resources. LREC 2014.\n* Shinichi Nakagawa and Innes C. Cuthill. Effect size, confidence interval and statistical significance: a practical\n  guide for biologists. 2007. In Biological Reviews 82.\n* Cynthia M. Whissell. The dictionary of affect in language. 1993. In The Measurement of Emotions.\n* David Bamman, Jacob Eisenstein, and Tyler Schnoebelen. GENDER IDENTITY AND LEXICAL VARIATION IN SOCIAL MEDIA. 2014.\n* Rada Mihalcea, Paul Tarau. TextRank: Bringing Order into Text. EMNLP. 2004.\n* Frimer, J. A., Boghrati, R., Haidt, J., Graham, J., & Dehgani, M. Moral Foundations Dictionary for Linguistic Analyses\n  2.0. Unpublished manuscript. 2019.\n* Jesse Graham, Jonathan Haidt, Sena Koleva, Matt Motyl, Ravi Iyer, Sean P Wojcik, and Peter H Ditto. 2013. Moral\n  foundations theory: The pragmatic validity of moral pluralism. Advances in Experimental Social Psychology, 47, 55-130\n* Ryan J. Gallagher, Morgan R. Frank, Lewis Mitchell, Aaron J. Schwartz, Andrew J. Reagan, Christopher M. Danforth, and\n  Peter Sheridan Dodds. Generalized Word Shift Graphs: A Method for Visualizing and Explaining Pairwise Comparisons\n  Between Texts. 2020. Arxiv. https://arxiv.org/pdf/2008.02250.pdf\n* Kocoń, Jan; Zaśko-Zielińska, Monika and Miłkowski, Piotr, 2019, PolEmo 2.0 Sentiment Analysis Dataset for CoNLL,\n  CLARIN-PL digital repository, http://hdl.handle.net/11321/710.\n* George Forman. 2008. BNS feature scaling: an improved representation over tf-idf for svm text classification. In\n  Proceedings of the 17th ACM conference on Information and knowledge management (CIKM '08). Association for Computing\n  Machinery, New York, NY, USA, 263–270. https://doi.org/10.1145/1458082.1458119\n* Anne-Kathrin Schumann. 2016. Brave new world: Uncovering topical dynamics in the ACL Anthology reference corpus using\n  term life cycle information. In Proceedings of the 10th SIGHUM Workshop on Language Technology for Cultural Heritage,\n  Social Sciences, and Humanities, pages 1–11, Berlin, Germany. Association for Computational Linguistics.\n* Piao, S. S., Bianchi, F., Dayrell, C., D’egidio, A., & Rayson, P. 2015. Development of the multilingual semantic \n  annotation system. In Proceedings of the 2015 Conference of the North American Chapter of the Association for \n  Computational Linguistics: Human Language Technologies (pp. 1268-1274).\n* Cliff, N. (1993). Dominance statistics: Ordinal analyses to answer ordinal questions. Psychological Bulletin, 114(3), 494–509. https://doi.org/10.1037/0033-2909.114.3.494\n* Altmann EG, Pierrehumbert JB, Motter AE (2011) Niche as a Determinant of Word Fate in Online Groups. PLoS ONE 6(5): e19009. https://doi.org/10.1371/journal.pone.0019009.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF88:324E19:1809AE:5E50B5:6AB92B48"},"text_sha256":"6925366a740c5eb8e636d2a60a27067d3ced2b74437f7b6192f7a708bb2479ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"salesforce/TransmogrifAI","input_row":{"repository":"salesforce/TransmogrifAI","url":"https://github.com/salesforce/TransmogrifAI","name":"TransmogrifAI","owner":"salesforce","description":"TransmogrifAI (pronounced trăns-mŏgˈrə-fī) is an AutoML library for building modular, reusable, strongly typed machine learning workflows on Apache Spark with minimal hand-tuning","language":"Scala","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2276,"issues":144,"created_at":"2017-11-02T16:15:15Z","updated_at":"2026-09-03T20:44:09Z","first_commit_at":"2017-12-01T20:09:05Z","last_commit_at":"2026-06-02T18:03:06Z","activity_months":102,"ai_ml_match_topics":"machine-learning; transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:20.044Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"salesforce/TransmogrifAI","visibility":"public","created_at":"2017-11-02T16:15:15Z","updated_at":"2026-09-03T20:44:09Z","private":false,"fork":false,"archived":false,"stargazers_count":2276,"open_issues_count":46,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2333","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:17DCDB6:1C01707:6AB92B4C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2332","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:17F1F86:1C151D9:6AB92B4C"},"commit":{"sha":"a9213cab02cc30e52101b0b4fcee628abde5dc36","url":"https://github.com/salesforce/TransmogrifAI/commit/a9213cab02cc30e52101b0b4fcee628abde5dc36","date":"2018-05-06T04:04:18Z","author_date":"2018-05-06T04:04:18Z","committer_date":"2018-05-06T04:04:18Z","tree_sha":"6050f2c7ecf40f2c3b607c7c38a5d94dfa95af45","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2331","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A9:7418C:1816954:1C3AE51:6AB92B4C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10960,"blob_sha":"b12f3e03d7624b142e388db04bf6915f6db20f12","priority":0}],"documents":[{"path":"README.md","size":10960,"blob_sha":"b12f3e03d7624b142e388db04bf6915f6db20f12","priority":0,"status":200,"text":"# Octopus Prime (aka Optimus Prime) [![Build Status](https://travis-ci.com/salesforce/op.svg?token=Ex9czVEUD7AzPTmVh6iX&branch=master)](https://travis-ci.com/salesforce/op)\n\nAbstract away the redundant, repeatable feature engineering, feature selection and model selection tasks slowing down ML development.\n\n## Overview\nOctopus Prime (aka Optimus Prime) is an AutoML library written in Scala that runs on top of Spark. It was developed with a focus on accelerating machine learning developer productivity through machine learning automation, and an API that enforces compile-time type-safety, modularity, and reuse.\n_Through automation, it achieves accuracies close to hand-tuned models with almost 100x reduction in time._\n\n\nUse Optimus Prime if you need a machine learning library to:\n\n* Build machine learning applications in hours, not months\n* Build machine learning models without having a machine learning background\n* Build modular, reusable, strongly typed machine learning workflows\n\nOptimus Prime is compatible with Spark 2.2.1 and Scala 2.11.\n\n[Skip to Quick Start and Documentation](https://github.com/salesforce/op#quick-start-and-documentation)\n\n## Motivation\n_Building real life machine learning applications need fair amount of tribal knowledge and intuition. Coupled with the explosion of ML use cases in the world that need to be addressed, there are not enough data scientists to build all the applications and democratize it. Automation is the solution to making machine learning truly accessible._\n\nCreating a ML model for a particular application requires many steps, usually manually performed by a data scientist or engineer. These steps include ETL, feature engineering, model selection (including hyper-parameter tuning), safeguarding against data leakage, operationalizing models, scoring and updating models.\n\n![Alt text](resources/pipeline.png?raw=true)\n\nIf your organization or product has multiple use cases, it is necessary to create many individually tuned models (for each such use case). Scaling this is difficult, time consuming and expensive.\n\n![Alt text](resources/pipelineN.png?raw=true)\n\nOptimus Prime provides a solution for these use cases by automating feature engineering, feature selection (including data leakage detection), model selection and hyper-parameter tuning with a simple interface that allows users to focus on what they are trying to model rather than ML details.\n\n## AutoML\nThe AutoML functionality provided by Optimus Prime allows development of specialized machine learning applications across many different customers in a code-once \"meta\" workflow.\n\n### Feature engineering\nOptimus Prime vectorizers (shortcut  ```.autoTransform()``` , aka ```.transmogrify()``` ) take in a sequence of features, automatically apply default transformations to them based on feature types (e.g. split Emails and pivot out the top K domains) and combine them into a single vector. This is in essence the automatic feature engineering Stage of Optimus Prime.\n![Alt text](resources/feateng.png?raw=true)\n\n```scala\nval features = Seq(email, phone, age, subject, zipcode).autoTransform()\n```\nOf course specific feature engineering is also possible and can be used in combination with automatic type specific transformations.\n\nThis can be manipulated directly by users (using type safe operations with editor tab completion) to achieve the desired feature engineering steps:\n\n```scala\nval ageGroup = age.bucketize(splits = Seq(0, 10, 18, 40, 60, 120)).toMultiPickList().pivot()\n```\n### Feature Selection\nThe feature selection step happens within the sanity checker. It does the following:\n\n1. Analyze every feature and out put descriptive statistics such as mean, min, max, variance, number of nulls to ensure features have acceptable ranges\n2. Compute association of every feature to the label (correlations, cramersV, pointwise mutual information and other statistical tests) and drop those with low predictive power\n3. Detect data leakage (having information that mirrors what you are trying to predict - which would not be available in scoring).\n\n\n```scala\nval checkedFeatures = new SanityChecker().setInput(label, features).getOutput()\n```\n\n### Model selection and tuning\nOptimus Prime will select the best model and hyper-parameters for you based on the class of modeling you are doing (eg. Classification, Regression etc.).\nSmart model selection and comparison gives the next layer of improvements over traditional ML workflows.\n\n```scala\nval (pred, raw, prob) = BinaryClassificationModelSelector().setInput(label, checkedFeatures).getOutput()\n```\n\nOf course, you can use a single model with manually chosen hyper-parameters if you prefer.\n\n```scala\nval (pred, raw, prob) = new OpRandomForest()\n   .setMaxDepth(5)\n   .setMinInfoGain(0.1)\n   .setNumTrees(100)\n   .setInput(label, checkedFeatures)\n   .getOutput()\n```\n### Putting it all together\n\n```scala\ncase class Schema\n(\n  id: Int,\n  email: Option[String],\n  phone: Option[String],\n  age: Int,\n  subject: Option[String],\n  zipcode: Option[String],\n  label: int\n)\n\n//Build Features\nval email = FeatureBuilder.Email[Schema].extract(asEmail(_.getEmail)).asPredictor\nval phone = FeatureBuilder.Phone[Schema].extract(asPhone(_.getPhone)).asPredictor\nval subject = FeatureBuilder.Text[Schema].extract(asText(_.getSubject)).asPredictor\nval zipcode = FeatureBuilder.PostalCode[Schema].extract(asPostalCode(_.getZipcode)).asPredictor\nval age = FeatureBuilder.Real[Schema].extract(_.getAge.toReal).asPredictor\nval label = FeatureBuilder.RealNN[Schema].extract(_.label.toRealNN).asResponse\n\n//Automated Feature Engineering\nval features = Seq(email, phone, age, subject, zipcode).autoTransform()\n\n//Automated Feature Selection\nval checkedFeatures = new SanityChecker().setInput(label, features).getOutput()\n\n//Automated Model Selection\nval (prediction, rawPrediction, probability) = BinaryClassificationModelSelector().setInput(label, checkedFeatures).getOutput()\n\n//Training Data\nval trainDataReader = DataReaders.Simple.csvCase[Schema](path = Some(\"PathToDataFile\"), key = _.id.toString)\n\n//Create and fit workflow\nval workflow = new OpWorkflow().setResultFeatures(label, rawPrediction, probability, prediction).setReader(trainDataReader)\nval fittedWorkflow = workflow.train()\n```\n\n## Adding OP into an existing project\nYou can simply add OP as a regular dependency to your existing project. Example for gradle below:\n\n```groovy\nrepositories {\n    maven {\n       url \"https://raw.githubusercontent.com/salesforce/op/mvn-repo/releases\"\n       credentials {\n           // Generate github api token here - https://goo.gl/ANZ9oz\n           // and then set it as an environment variable `export GITHUB_API_TOKEN=<MY_TOKEN>`\n           username = System.getenv(\"GITHUB_API_TOKEN\")\n           password \"\" // leave the password empty\n       }\n       authentication { digest(BasicAuthentication) }\n    }\n}\next {\n    scalaVersion = '2.11'\n    scalaVersionRevision = '8'\n    sparkVersion = <SPARK_VERSION> // Set the required Spark version here\n    opVersion = <OP_VERSION> // Set the required OP version here\n}\ndependencies {\n    // Scala\n    scalaLibrary \"org.scala-lang:scala-library:$scalaVersion.$scalaVersionRevision\"\n    scalaCompiler \"org.scala-lang:scala-compiler:$scalaVersion.$scalaVersionRevision\"\n    compile \"org.scala-lang:scala-library:$scalaVersion.$scalaVersionRevision\"\n\n    // Spark (needed only at compile / test time)\n    compileOnly \"org.apache.spark:spark-core_$scalaVersion:$sparkVersion\"\n    testCompile \"org.apache.spark:spark-core_$scalaVersion:$sparkVersion\"\n    compileOnly \"org.apache.spark:spark-mllib_$scalaVersion:$sparkVersion\"\n    testCompile \"org.apache.spark:spark-mllib_$scalaVersion:$sparkVersion\"\n    compileOnly \"org.apache.spark:spark-sql_$scalaVersion:$sparkVersion\"\n    testCompile \"org.apache.spark:spark-sql_$scalaVersion:$sparkVersion\"\n\n    // Optimus Prime\n    compile \"com.salesforce:optimus-prime-core_$scalaVersion:$opVersion\"\n\n    // Other depdendecies\n}\n```\n\n## Abstractions\n\nOptimus Prime is designed to simplify the creation of machine learning workflows. To this end we have created an abstraction for creating and running machine learning workflows.\nThe abstraction is made up of Features, Stages, Workflows and Readers which interact as shown in the diagram below.\n\n![Alt text](resources/abstractions.png?raw=true)\n\n**Features:** The primary abstraction that users of Optimus Prime interact with are Features. Features are essentially type-safe pointers to data columns with additional metadata built in. Features are the elements which users manipulate and interact with in order to define all steps in the machine learning workflow. In our abstraction Features are acted on by Stages in order to produce new Features. Part of the metadata contained in Features is strict type information about the column. This is used both to determine which Stages can be called on a given Feature and which Stages should be called when automatic feature engineering Stages are used. Because the output of every Stage is a Feature or set of Features, any sequence of type safe operations can be strung together to create a machine learning workflow.\n\n**Stages:** Stages define actions that you wish to perform on Features in your workflow. Those familiar with Spark ML will recognize the idea of Stages being either Transformers or Estimators. Transformers provide functions for transforming one or more Features in your data to one or more new Features. Estimators provide algorithms which when applied to one or more Features produce Transformers. The Optimus Prime Transformers and Estimators extend Spark ML Transformers and Estimators and can be used as standard Spark stages if desired. In both Spark ML and Optimus Prime when Stages are used within a workflow the user does not need to distinguish between types of Stages (Estimator or Transformer), this distinction is only important for developers developing new Estimators or Transformers.\n\n**Workflows and Readers:** Once the final desired Feature, or Features, have been defined they are materialized by feeding the final Features into a Workflow. The Workflow will trace back how the final Features were created and make an optimized DAG of Stage executions in order to produce the final Features. The Workflow must also be provided a DataReader. The DataReader can do complex data pre-processing steps or simply load a dataset. The key component of the DataReader is that the type of the data produced by the reader must match the type of the data expected by the initial feature generation stages.\n\n## Quick Start and Documentation\n\nSee [Wiki](https://github.com/salesforce/op/wiki) for full documentation, getting started, examples and other information.\n\nSee [Scaladoc](https://op-docs.herokuapp.com/scaladoc/#package) for the programming API (can also be viewed [locally](docs/README.md)).\n\n\n## License\n\nCopyright (c) 2017, Salesforce.com, Inc.\nAll rights reserved.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A98:17E138:17A001:5DE74E:6AB92B4B"},"text_sha256":"b5278462267fa10cbdc79fe8e8ef9ed87a63be6f344ebac9dd28d6d0c07f91c9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2330","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:179417F:1BB71E8:6AB92B4D"},"commit":{"sha":"8cec508d0348371d80f993586ffe7c619885c674","url":"https://github.com/salesforce/TransmogrifAI/commit/8cec508d0348371d80f993586ffe7c619885c674","date":"2026-06-02T18:03:06Z","author_date":"2026-06-02T18:03:06Z","committer_date":"2026-06-02T18:03:06Z","tree_sha":"8a30f91838f4e4c22eb0e32a99018ed0d8f6c47b","message_first_line":"Upload required SECURITY.md file for compliance"},"tree_request_status":200,"tree_rate":{"github_remaining":"2329","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087F:71F98:1836AF8:1C5AC77:6AB92B4E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12114,"blob_sha":"dbd9a2245303f008a53fc7ac4d3f1e21dfa861f2","priority":0},{"path":"SECURITY.md","size":407,"blob_sha":"8d523f552cb7e1ed264b4ba5ee51c98b5c87a06c","priority":1}],"documents":[{"path":"README.md","size":12114,"blob_sha":"dbd9a2245303f008a53fc7ac4d3f1e21dfa861f2","priority":0,"status":200,"text":"# TransmogrifAI\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.salesforce.transmogrifai/transmogrifai-core_2.11.svg?colorB=blue)](https://search.maven.org/search?q=g:com.salesforce.transmogrifai) [![Javadocs](https://www.javadoc.io/badge/com.salesforce.transmogrifai/transmogrifai-core_2.11/0.7.0.svg?color=blue)](https://www.javadoc.io/doc/com.salesforce.transmogrifai/transmogrifai-core_2.11/0.7.0) [![Spark version](https://img.shields.io/badge/spark-2.4-brightgreen.svg)](https://spark.apache.org/downloads.html) [![Scala version](https://img.shields.io/badge/scala-2.11-brightgreen.svg)](https://www.scala-lang.org/download/2.11.12.html) [![License](http://img.shields.io/:license-BSD--3-blue.svg)](./LICENSE) [![Chat](https://badges.gitter.im/salesforce/TransmogrifAI.svg)](https://gitter.im/salesforce/TransmogrifAI?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[![TravisCI Build Status](https://travis-ci.com/salesforce/TransmogrifAI.svg?token=Ex9czVEUD7AzPTmVh6iX&branch=master)](https://travis-ci.com/salesforce/TransmogrifAI) [![CircleCI Build Status](https://circleci.com/gh/salesforce/TransmogrifAI.svg?&style=shield&circle-token=e84c1037ae36652d38b49207728181ee85337e0b)](https://circleci.com/gh/salesforce/TransmogrifAI) [![Documentation Status](https://readthedocs.org/projects/transmogrifai/badge/?version=stable)](https://docs.transmogrif.ai/en/stable/?badge=stable) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2557/badge)](https://bestpractices.coreinfrastructure.org/projects/2557) [![CodeFactor](https://www.codefactor.io/repository/github/salesforce/transmogrifai/badge)](https://www.codefactor.io/repository/github/salesforce/transmogrifai)\n\nTransmogrifAI (pronounced trăns-mŏgˈrə-fī) is an AutoML library written in Scala that runs on top of Apache Spark. It was developed with a focus on accelerating machine learning developer productivity through machine learning automation, and an API that enforces compile-time type-safety, modularity, and reuse.\n_Through automation, it achieves accuracies close to hand-tuned models with almost 100x reduction in time._\n\nUse TransmogrifAI if you need a machine learning library to:\n\n* Build production ready machine learning applications in hours, not months\n* Build machine learning models without getting a Ph.D. in machine learning\n* Build modular, reusable, strongly typed machine learning workflows\n\nTo understand the motivation behind TransmogrifAI check out these:\n- [Open Sourcing TransmogrifAI: Automated Machine Learning for Structured Data](https://engineering.salesforce.com/open-sourcing-transmogrifai-4e5d0e098da2), a blog post by [@snabar](https://github.com/snabar)\n- [Meet TransmogrifAI, Open Source AutoML That Powers Einstein Predictions](https://www.youtube.com/watch?v=93vsqjfGPCw&feature=youtu.be&t=2800), a talk by [@tovbinm](https://github.com/tovbinm)\n- [Low Touch Machine Learning](https://www.youtube.com/watch?v=PKTvo9X9Sjg), a talk by [@leahmcguire](https://github.com/leahmcguire)\n\nSkip to [Quick Start and Documentation](#quick-start-and-documentation).\n\n## Predicting Titanic Survivors with TransmogrifAI\n\nThe Titanic dataset is an often-cited dataset in the machine learning community. The goal is to build a machine learnt model that will predict survivors from the Titanic passenger manifest. Here is how you would build the model using TransmogrifAI:\n\n```scala\nimport com.salesforce.op._\nimport com.salesforce.op.readers._\nimport com.salesforce.op.features._\nimport com.salesforce.op.features.types._\nimport com.salesforce.op.stages.impl.classification._\nimport org.apache.spark.SparkConf\nimport org.apache.spark.sql.SparkSession\n\nimplicit val spark = SparkSession.builder.config(new SparkConf()).getOrCreate()\nimport spark.implicits._\n\n// Read Titanic data as a DataFrame\nval passengersData = DataReaders.Simple.csvCase[Passenger](path = pathToData).readDataset().toDF()\n\n// Extract response and predictor Features\nval (survived, predictors) = FeatureBuilder.fromDataFrame[RealNN](passengersData, response = \"survived\")\n\n// Automated feature engineering\nval featureVector = predictors.transmogrify()\n\n// Automated feature validation and selection\nval checkedFeatures = survived.sanityCheck(featureVector, removeBadFeatures = true)\n\n// Automated model selection\nval pred = BinaryClassificationModelSelector().setInput(survived, checkedFeatures).getOutput()\n\n// Setting up a TransmogrifAI workflow and training the model\nval model = new OpWorkflow().setInputDataset(passengersData).setResultFeatures(pred).train()\n\nprintln(\"Model summary:\\n\" + model.summaryPretty())\n```\nModel summary:\n\n```\nEvaluated Logistic Regression, Random Forest models with 3 folds and AuPR metric.\nEvaluated 3 Logistic Regression models with AuPR between [0.6751930383321765, 0.7768725281794376]\nEvaluated 16 Random Forest models with AuPR between [0.7781671467343991, 0.8104798040316159]\n\nSelected model Random Forest classifier with parameters:\n|-----------------------|--------------|\n| Model Param           |     Value    |\n|-----------------------|--------------|\n| modelType             | RandomForest |\n| featureSubsetStrategy |         auto |\n| impurity              |         gini |\n| maxBins               |           32 |\n| maxDepth              |           12 |\n| minInfoGain           |        0.001 |\n| minInstancesPerNode   |           10 |\n| numTrees              |           50 |\n| subsamplingRate       |          1.0 |\n|-----------------------|--------------|\n\nModel evaluation metrics:\n|-------------|--------------------|---------------------|\n| Metric Name | Hold Out Set Value |  Training Set Value |\n|-------------|--------------------|---------------------|\n| Precision   |               0.85 |   0.773851590106007 |\n| Recall      | 0.6538461538461539 |  0.6930379746835443 |\n| F1          | 0.7391304347826088 |  0.7312186978297163 |\n| AuROC       | 0.8821603927986905 |  0.8766642291593114 |\n| AuPR        | 0.8225075757571668 |   0.850331080886535 |\n| Error       | 0.1643835616438356 | 0.19682151589242053 |\n| TP          |               17.0 |               219.0 |\n| TN          |               44.0 |               438.0 |\n| FP          |                3.0 |                64.0 |\n| FN          |                9.0 |                97.0 |\n|-------------|--------------------|---------------------|\n\nTop model insights computed using correlation:\n|-----------------------|----------------------|\n| Top Positive Insights |      Correlation     |\n|-----------------------|----------------------|\n| sex = \"female\"        |   0.5177801026737666 |\n| cabin = \"OTHER\"       |   0.3331391338844782 |\n| pClass = 1            |   0.3059642953159715 |\n|-----------------------|----------------------|\n| Top Negative Insights |      Correlation     |\n|-----------------------|----------------------|\n| sex = \"male\"          |  -0.5100301587292186 |\n| pClass = 3            |  -0.5075774968534326 |\n| cabin = null          | -0.31463114463832633 |\n|-----------------------|----------------------|\n\nTop model insights computed using CramersV:\n|-----------------------|----------------------|\n|      Top Insights     |       CramersV       |\n|-----------------------|----------------------|\n| sex                   |    0.525557139885501 |\n| embarked              |  0.31582347194683386 |\n| age                   |  0.21582347194683386 |\n|-----------------------|----------------------|\n```\n\nWhile this may seem a bit too magical, for those who want more control, TransmogrifAI also provides the flexibility to completely specify all the features being extracted and all the algorithms being applied in your ML pipeline. Visit our [docs site](https://docs.transmogrif.ai) for full documentation, getting started, examples, faq and other information.\n\n\n## Adding TransmogrifAI into your project\nYou can simply add TransmogrifAI as a regular dependency to an existing project.\nStart by picking TransmogrifAI version to match your project dependencies from the version matrix below (if not sure - take the **stable** version):\n\n| TransmogrifAI Version                                 | Spark Version | Scala Version | Java Version |\n|-------------------------------------------------------|:-------------:|:-------------:|:------------:|\n| 0.7.1 (unreleased, master), **0.7.0 (stable)**        |    **2.4**    |    **2.11**   |    **1.8**   |\n| 0.6.1, 0.6.0, 0.5.3, 0.5.2, 0.5.1, 0.5.0              |      2.3      |      2.11     |      1.8     |\n| 0.4.0, 0.3.4                                          |      2.2      |      2.11     |      1.8     |\n\nFor Gradle in `build.gradle` add:\n```gradle\nrepositories {\n    jcenter()\n    mavenCentral()\n}\ndependencies {\n    // TransmogrifAI core dependency\n    compile 'com.salesforce.transmogrifai:transmogrifai-core_2.11:0.7.0'\n\n    // TransmogrifAI pretrained models, e.g. OpenNLP POS/NER models etc. (optional)\n    // compile 'com.salesforce.transmogrifai:transmogrifai-models_2.11:0.7.0'\n}\n```\n\nFor SBT in `build.sbt` add:\n```sbt\nscalaVersion := \"2.11.12\"\n\nresolvers += Resolver.jcenterRepo\n\n// TransmogrifAI core dependency\nlibraryDependencies += \"com.salesforce.transmogrifai\" %% \"transmogrifai-core\" % \"0.7.0\"\n\n// TransmogrifAI pretrained models, e.g. OpenNLP POS/NER models etc. (optional)\n// libraryDependencies += \"com.salesforce.transmogrifai\" %% \"transmogrifai-models\" % \"0.7.0\"\n```\n\nThen import TransmogrifAI into your code:\n```scala\n// TransmogrifAI functionality: feature types, feature builders, feature dsl, readers, aggregators etc.\nimport com.salesforce.op._\nimport com.salesforce.op.aggregators._\nimport com.salesforce.op.features._\nimport com.salesforce.op.features.types._\nimport com.salesforce.op.readers._\n\n// Spark enrichments (optional)\nimport com.salesforce.op.utils.spark.RichDataset._\nimport com.salesforce.op.utils.spark.RichRDD._\nimport com.salesforce.op.utils.spark.RichRow._\nimport com.salesforce.op.utils.spark.RichMetadata._\nimport com.salesforce.op.utils.spark.RichStructType._\n```\n\n## Quick Start and Documentation\n\nVisit our [docs site](https://docs.transmogrif.ai) for full documentation, getting started, examples, faq and other information.\n\nSee [scaladoc](https://scaladoc.transmogrif.ai) for the programming API.\n\n## Authors\n\n - Kevin Moore\t[@jauntbox](https://github.com/jauntbox)\n - Kin Fai Kan\t[@kinfaikan](https://github.com/kinfaikan)\n - Leah McGuire [@leahmcguire](https://github.com/leahmcguire)\n - Matthew Tovbin [@tovbinm](https://github.com/tovbinm)\n - Max Ovsiankin\t[@maxov](https://github.com/maxov)\n - Michael Loh\t[@mikeloh77](https://github.com/mikeloh77)\n - Michael Weil\t[@michaelweilsalesforce](https://github.com/michaelweilsalesforce)\n - Shubha Nabar\t[@snabar](https://github.com/snabar)\n - Vitaly Gordon\t[@vitalyg](https://github.com/vitalyg)\n - Vlad Patryshev\t[@vpatryshev](https://github.com/vpatryshev)\n\n## Internal Contributors (prior to release)\n\n - Chris Rupley\t[@crupley](https://github.com/crupley)\n - Chris Wu\t[@cjwooo](https://github.com/cjwooo)\n - Eric Wayman\t[@ericwayman](https://github.com/ericwayman)\n - Felipe Oliveira\t[@feliperazeek](https://github.com/feliperazeek)\n - Gera Shegalov\t[@gerashegalov](https://github.com/gerashegalov)\n - Jean-Marc Soumet\t[@ajmssc](https://github.com/ajmssc)\n - Marco Vivero\t[@marcovivero](https://github.com/marcovivero)\n - Mario Rodriguez\t[@mrodriguezsfiq](https://github.com/mrodriguezsfiq)\n - Mayukh Bhaowal\t[@mayukhb](https://github.com/mayukhb)\n - Minh-An Quinn\t[@minhanquinn](https://github.com/minhanquinn)\n - Nicolas Drizard\t[@nicodri](https://github.com/nicodri)\n - Oleg Gusak\t[@ogusak](https://github.com/ogusak)\n - Patrick Framption\t[@tricktrap](https://github.com/tricktrap)\n - Ryle Goehausen\t[@ryleg](https://github.com/ryleg)\n - Sanmitra Ijeri\t[@sanmitra](https://github.com/sanmitra)\n - Sky Chen\t[@almandsky](https://github.com/almandsky)\n - Sophie Xiaodan Sun\t[@sxd929](https://github.com/sxd929)\n - Till Bergmann\t[@tillbe](https://github.com/tillbe)\n - Xiaoqian Liu\t[@wingsrc](https://github.com/wingsrc)\n\n\n\n## License\n\n[BSD 3-Clause](LICENSE) © Salesforce.com, Inc.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3EC4:11316A:17D3D3:5E1AA7:6AB92B4C"},"text_sha256":"87944c5b2bd6feba5ffea7fe9233440d787ae241d81a2a05c39fcf4097f0ffd3"},{"path":"SECURITY.md","size":407,"blob_sha":"8d523f552cb7e1ed264b4ba5ee51c98b5c87a06c","priority":1,"status":200,"text":"## Security\n\nPlease report any security issue to [https://www.sfdc.co/SubmitVuln](https://www.sfdc.co/SubmitVuln)\nas soon as it is discovered. This library limits its runtime dependencies in\norder to reduce the total cost of ownership as much as can be, but all consumers\nshould remain vigilant and have their security stakeholders review all third-party\nproducts (3PP) like this one and their dependencies.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6100:3E724:180B75:5E52B8:6AB92B4E"},"text_sha256":"2ccdfb949231b925db097e96d47b165ecb6627f9ef1b8b4862273e9f4e4fb483"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ermig1979/Simd","input_row":{"repository":"ermig1979/Simd","url":"https://github.com/ermig1979/Simd","name":"Simd","owner":"ermig1979","description":"C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX  for x86/x64, NEON, SVE for ARM, HVX for Hexagon","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2270,"issues":257,"created_at":"2015-03-25T15:24:55Z","updated_at":"2026-09-27T03:15:46Z","first_commit_at":"2013-02-01T12:21:53Z","last_commit_at":"2026-09-21T12:12:25Z","activity_months":163.59999999999999,"ai_ml_match_topics":"machine-learning; image-processing; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:23.427Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ermig1979/Simd","visibility":"public","created_at":"2015-03-25T15:24:55Z","updated_at":"2026-09-27T03:15:46Z","private":false,"fork":false,"archived":false,"stargazers_count":2270,"open_issues_count":26,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2328","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091B:72BD3:17FBE9E:1C20368:6AB92B4F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2327","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D8:7580A:18011C7:1C25848:6AB92B4F"},"commit":{"sha":"84f99f6c38f7e9c2acb30a4a9614a790f9c0d3d0","url":"https://github.com/ermig1979/Simd/commit/84f99f6c38f7e9c2acb30a4a9614a790f9c0d3d0","date":"2018-05-24T09:43:49Z","author_date":"2018-05-24T09:43:49Z","committer_date":"2018-05-24T09:43:49Z","tree_sha":"33b84d5e8bc782176ed71a48a075bf8e334f5646","message_first_line":"*fixed bug: error in function SimdLbpEstimate."},"tree_request_status":200,"tree_rate":{"github_remaining":"2326","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AC:6C9BF:1803497:1C27B47:6AB92B50"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7330,"blob_sha":"3ccb776144c6c853298ba2d1535d249fd63f0be4","priority":0}],"documents":[{"path":"README.md","size":7330,"blob_sha":"3ccb776144c6c853298ba2d1535d249fd63f0be4","priority":0,"status":200,"text":"Introduction\n============\n\nThe [Simd Library](http://ermig1979.github.io/Simd) is a free open source image processing library, designed for C and C++ programmers. \nIt provides many useful high performance algorithms for image processing such as: \npixel format conversion, image scaling and filtration, extraction of statistic information from images, motion detection,\nobject detection (HAAR and LBP classifier cascades) and classification, neural network.\n\nThe algorithms are optimized with using of different SIMD CPU extensions. \nIn particular the library supports following CPU extensions: \nSSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX-512 for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.\n\nThe Simd Library has C API and also contains useful C++ classes and functions to facilitate access to C API. \nThe library supports dynamic and static linking, 32-bit and 64-bit Windows, Android and Linux, \nMSVS, G++ and Clang compilers, MSVS project and CMake build systems.\n\nLibrary folder's structure\n==========================\n\nThe Simd Library has next folder's structure:\n\n* `simd/src/Simd/` - contains source codes of the library.\n* `simd/src/Test/` - contains test framework of the library.\n* `simd/src/Use/` - contains the use examples of the library.\n* `simd/prj/vs2012/` - contains project files of Microsoft Visual Studio 2012.\n* `simd/prj/vs2013/` - contains project files of Microsoft Visual Studio 2013.\n* `simd/prj/vs2015/` - contains project files of Microsoft Visual Studio 2015.\n* `simd/prj/vs2017w/` - contains project files of Microsoft Visual Studio 2017 (for Windows).\n* `simd/prj/vs2017a/` - contains project files of Microsoft Visual Studio 2017 (for Android).\n* `simd/prj/cmd/` - contains additional scripts needed for building of the library in Windows.\n* `simd/prj/cmake/` - contains files of CMake build systems.\n* `simd/prj/sh/` - contains additional scripts needed for building of the library in Linux.\n* `simd/prj/txt/` - contains text files needed for building of the library.\n* `simd/data/cascade/` - contains OpenCV cascades (HAAR and LBP).\n* `simd/data/image/` - contains image samples.\n* `simd/data/network/` - contains examples of trained networks.\n* `simd/docs/` - contains documentation of the library.\n\nThe library building for Windows\n================================\n\nTo build the library and test application for Windows 32/64 you need to use Microsoft Visual Studio 2015 (or 2012/2013/2017). \nThe project files are in the directory: \n\n`simd/prj/vs2015/`\n\nBy default the library is built as a DLL (Dynamic Linked Library).\nYou also may build it as a static library. \nTo do this you must change appropriate property (Configuration Type) of **Simd** project and also uncomment `#define SIMD_STATIC` in file:\n\n`simd/src/Simd/SimdConfig.h`\n\nThe library building for Android\n================================\n\nTo build the library and test application for Android(x86, x64, ARM, ARM64) you need to use Microsoft Visual Studio 2017. \nThe project files are in the directory: \n\n`simd/prj/vs2017a/`\n\nBy default the library is built as a SO (Dynamic Library).\n\nThe library building for Linux\n==============================\n\nTo build the library and test application for Linux 32/64 you need to use CMake build systems.\nFiles of CMake build systems are placed in the directory:\n\n`simd/prj/cmake/`\n\t\nThe library can be built for x86/x64, PowerPC(64) and ARM(32/64) platforms with using of G++ or Clang compilers.\nWith using of native compiler (g++) for current platform it is simple:\n\n\tcd ./prj/cmake\n\tcmake . -DTOOLCHAIN=\"\" -DTARGET=\"\"\n\tmake\n\t\nTo build the library for PowePC(64) and ARM(32/64) platforms you can also use toolchain for cross compilation.\nThere is an example of using for PowerPC (64 bit):\n\n\tcd ./prj/cmake\n\tcmake . -DTOOLCHAIN=\"/your_toolchain/usr/bin/powerpc-linux-gnu-g++\" -DTARGET=\"ppc64\" -DCMAKE_BUILD_TYPE=\"Release\" -DLIBRARY=\"STATIC\"\n\tmake\n\t\nFor ARM (32 bit):\n\n\tcd ./prj/cmake\n\tcmake . -DTOOLCHAIN=\"/your_toolchain/usr/bin/arm-linux-gnueabihf-g++\" -DTARGET=\"arm\" -DCMAKE_BUILD_TYPE=\"Release\" -DLIBRARY=\"STATIC\"\n\tmake\n\t\nAnd for ARM (64 bit):\n\n    cd ./prj/cmake\n    cmake . -DTOOLCHAIN=\"/your_toolchain/usr/bin/aarch64-linux-gnu-g++\" -DTARGET=\"aarch64\" -DCMAKE_BUILD_TYPE=\"Release\" -DLIBRARY=\"STATIC\"\n    make\n\nAs result the library and the test application will be built in the current directory.\n\nThe library using\n=================\n\nIf you use the library from C code you must include:\n\t\n    #include \"Simd/SimdLib.h\"\n\nAnd to use the library from C++ code you must include:\n\n    #include \"Simd/SimdLib.hpp\"\n\nIn order to use [Simd::Detection](http://ermig1979.github.io/Simd/help/struct_simd_1_1_detection.html) you must include:\n\n    #include \"Simd/SimdDetection.hpp\"\n\t\nIn order to use [Simd::Neural](http://ermig1979.github.io/Simd/help/namespace_simd_1_1_neural.html) you must include:\n\n    #include \"Simd/SimdNeural.hpp\"\n\t\nIn order to use [Simd::Motion](http://ermig1979.github.io/Simd/help/namespace_simd_1_1_motion.html) you must include:\n\n    #include \"Simd/SimdMotion.hpp\"\n\t\nInteraction with OpenCV\n=======================\n\nIf you need use mutual conversion between Simd and OpenCV types you just have to define macro `SIMD_OPENCV_ENABLE` before including of Simd headers:\n    \n    #include <opencv2/core/core.hpp>\n    #define SIMD_OPENCV_ENABLE\n    #include \"Simd/SimdLib.hpp\"\n\nAnd you can convert next types:\n\t\n* `cv::Point`, `cv::Size` <--> `Simd::Point`.\n* `cv::Rect` <--> `Simd::Rectangle`.\n* `cv::Mat` <--> `Simd::View`.\n\t\nTest Framework\n==============\n\nThe test suite is needed for testing of correctness of work of the library and also for its performance testing.\nThere is a set of tests for every function from API of the library. \nThere is an example of test application using:\n\n\t./Test -m=a -tt=1 -f=Sobel -ot=log.txt\n\nWhere next parameters were used:\n\n* `-m=a` - a auto checking mode which includes performance testing (only for library built in Release mode). \nIn this case different implementations of each functions will be compared between themselves \n(for example a scalar implementation and implementations with using of different SIMD instructions such as SSE2, AVX2, and other).\nAlso it can be `-m=c` (creation of test data for cross-platform testing), `-m=v` (cross-platform testing with using of early prepared test data)\nand `-m=s` (running of special tests).\n* `-tt=1` - a number of test threads.\n* `-fi=Sobel` - an include filter. In current case will be tested only functions which contain word 'Sobel' in their names. \nIf you miss this parameter then full testing will be performed.\nYou can use several filters - function name has to satisfy at least one of them.\n* `-ot=log.txt` - a file name with test report (in TEXT file format). The test's report also will be output to console.\n    \nAlso you can use parameters:\n\n* `-help` or `-?` in order to print help message.\n* `-r=../..` to set project root directory.\n* `-pa=1` to print alignment statistics.\n* `-w=1920` width of test image for performance testing.\n* `-h=1080` height of test image for performance testing.\n* `-oh=log.html` - a file name with test report (in HTML file format).\t\n* `-s=sample.avi` a video source (See `Simd::Motion` test).\n* `-wt=1` a thread number used to parallelize algorithms.\n* `-fi=Abs` an exclude filter to exclude some tests.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF7C:35EBC:178512:5DCCD9:6AB92B4F"},"text_sha256":"f7e64cb188bbddceaebb0b1916b5ea81329ab32d161fd7f9bce1bb6ec7fceb9b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2325","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0936:71F98:1836CF1:1C5AEBD:6AB92B51"},"commit":{"sha":"0da136b1dc433af4b26b3d9a7dae6c6ced3130d1","url":"https://github.com/ermig1979/Simd/commit/0da136b1dc433af4b26b3d9a7dae6c6ced3130d1","date":"2026-06-30T15:13:18Z","author_date":"2026-06-30T15:13:18Z","committer_date":"2026-06-30T15:13:18Z","tree_sha":"9541adf6ec8975fe4741010de27364c77d9ae51d","message_first_line":"Add SVE2 SquaredDifferenceSum16f optimization (#575)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2324","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17CFE48:1BF44F8:6AB92B51"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10133,"blob_sha":"4492e5442d5fcdacb220475f928b300906277b70","priority":0}],"documents":[{"path":"README.md","size":10133,"blob_sha":"4492e5442d5fcdacb220475f928b300906277b70","priority":0,"status":200,"text":"Introduction\n============\n\nThe [Simd Library](http://ermig1979.github.io/Simd) is a free open source image processing and machine learning library, designed for C and C++ programmers. \nIt provides many useful high performance algorithms for image processing such as: \npixel format conversion, image scaling and filtration, extraction of statistic information from images, motion detection,\nobject detection and classification, neural network.\n\nThe algorithms are optimized with using of different SIMD CPU extensions. \nIn particular the library supports following CPU extensions: \nSSE, AVX, AVX-512 and AMX for x86/x64, NEON, SVE, SVE2 for ARM, HVX for Hexagon.\n\nThe Simd Library has C API and also contains useful C++ classes and functions to facilitate access to C API. \nThe library supports dynamic and static linking, 32-bit and 64-bit Windows and Linux, \nMSVS, G++ and Clang compilers, MSVS project and CMake build systems.\n\nLibrary folder's structure\n==========================\n\nThe Simd Library has next folder's structure:\n\n* `simd/src/Simd/` - contains source codes of the library.\n* `simd/src/Test/` - contains test framework of the library.\n* `simd/src/Use/` - contains the use examples of the library.\n* `simd/py/SimdPy/` - contains Python wrapper of the library.\n* `simd/prj/vs2022/` - contains project files of Microsoft Visual Studio 2022.\n* `simd/prj/cmd/` - contains additional scripts needed for building of the library in Windows.\n* `simd/prj/cmake/` - contains files of CMake build systems.\n* `simd/prj/sh/` - contains additional scripts needed for building of the library in Linux.\n* `simd/prj/txt/` - contains text files needed for building of the library.\n* `simd/data/cascade/` - contains OpenCV cascades (HAAR and LBP).\n* `simd/data/image/` - contains image samples.\n* `simd/data/network/` - contains examples of trained networks.\n* `simd/docs/` - contains documentation of the library.\n\nBuilding the library for Windows\n================================\n\nTo build the library and test application for Windows 32/64 you need to use Microsoft Visual Studio 2022). \nThe project files are in the directory: \n\n`simd/prj/vs2022/`\n\nFor Microsoft Visual Studio by default the library is built as a DLL (Dynamic Linked Library) instead of the rest cases when default type is STATIC library.\nTo build it as STATIC you must change appropriate property (Configuration Type) of **Simd** project and also uncomment `#define SIMD_STATIC` in file:\n\n`simd/src/Simd/SimdConfig.h`\n\nAlso in order to build the library you can use CMake and MinGW:\n\n\tmkdir build\n\tcd build\n\tcmake ..\\prj\\cmake -DSIMD_TOOLCHAIN=\"your_toolchain\\bin\\g++\" -DSIMD_TARGET=\"x86_64\" -DCMAKE_BUILD_TYPE=\"Release\" -G \"MinGW Makefiles\"\n\tmingw32-make\n\nBuilding the library for Linux\n==============================\n\nTo build the library and test application for Linux 32/64 you need to use CMake build systems.\nFiles of CMake build systems are placed in the directory:\n\n`simd/prj/cmake/`\n\t\nThe library can be built for x86/x64, ARM(32/64), and Hexagon platforms using the G++ or Clang compilers.\nUsing the native compiler (g++) for the current platform is simple:\n\n\tmkdir build\n\tcd build\n\tcmake ../prj/cmake -DSIMD_TOOLCHAIN=\"\" -DSIMD_TARGET=\"\"\n\tmake\n\t\nTo build the library for ARM(32/64) platform you can also use a toolchain for cross compilation.\nThere is an example of using for ARM (32 bit):\n\n\tmkdir build\n\tcd build\n\tcmake ../prj/cmake -DSIMD_TOOLCHAIN=\"/your_toolchain/usr/bin/arm-linux-gnueabihf-g++\" -DSIMD_TARGET=\"arm\" -DCMAKE_BUILD_TYPE=\"Release\"\n\tmake\n\nAnd for ARM (64 bit):\n\n\tmkdir build\n\tcd build\n\tcmake ../prj/cmake -DSIMD_TOOLCHAIN=\"/your_toolchain/usr/bin/aarch64-linux-gnu-g++\" -DSIMD_TARGET=\"aarch64\" -DCMAKE_BUILD_TYPE=\"Release\"\n\tmake\n\nAnd for Hexagon with HVX (cross-compilation using the Hexagon Clang toolchain):\n\n\tmkdir build\n\tcd build\n\tcmake ../prj/cmake -DSIMD_TOOLCHAIN=\"/your_toolchain/bin/hexagon-linux-musl-clang\" -DSIMD_TARGET=\"hexagon\" -DCMAKE_BUILD_TYPE=\"Release\"\n\tmake\n\nAs result the library and the test application will be built in the current directory.\n\nThere are addition build parameters:\n\n* `SIMD_AVX512` - Enable of AVX-512 (AVX-512F, AVX-512CD, AVX-512VL, AVX-512DQ, AVX-512BW) CPU extensions. It is switched on by default.\n* `SIMD_AVX512VNNI` - Enable of AVX-512-VNNI CPU extensions. It is switched on by default.\n* `SIMD_AMXBF16` - Enable of AMX-BF16, AMX-INT8 and AVX-512-BF16 CPU extensions. It is switched off by default.\n* `SIMD_SVE` - Enable of SVE CPU extension. It is switched off by default.\n* `SIMD_SVE2` - Enable of SVE2 CPU extension. It is switched off by default.\n* `SIMD_TEST` - Build test framework. It is switched on by default.\n* `SIMD_INFO` - Print build information. It is switched on by default.\n* `SIMD_PERF` - Enable of internal performance statistic. It is switched off by default.\n* `SIMD_SHARED` - Build as SHARED library. It is switched off by default.\n* `SIMD_GET_VERSION` - Call scipt to get Simd Library version. It is switched on by default.\n* `SIMD_SYNET` - Enable optimizations for Synet framework. It is switched on by default.\n* `SIMD_INT8_DEBUG` - Enable debug INT8 capabilities for Synet framework. It is switched off by default.\n* `SIMD_HIDE` - Hide internal functions of Simd Library. It is switched off by default.\n* `SIMD_RUNTIME` - Enable of runtime faster algorithm choise. It is switched on by default.\n* `SIMD_TEST_FLAGS` - Addition compiler flags to build test framework.\n* `SIMD_OPENCV` - Use OpenCV in test framework. It is switched off by default.\n* `SIMD_INSTALL` - Enabling of install target. It is switched on by default.\n* `SIMD_UNINSTALL` - Enabling of uninstall target. It is switched on by default.\n* `SIMD_PYTHON` - Enabling of Simd Python wrapper. It is switched on by default.\n\nUsing the library\n=================\n\nIf you use the library from C code you must include:\n\t\n    #include \"Simd/SimdLib.h\"\n\nAnd to use the library from C++ code you must include:\n\n    #include \"Simd/SimdLib.hpp\"\n\nIn order to use [Simd::Detection](http://ermig1979.github.io/Simd/help/struct_simd_1_1_detection.html) you must include:\n\n    #include \"Simd/SimdDetection.hpp\"\n\t\nIn order to use [Simd::Neural](http://ermig1979.github.io/Simd/help/namespace_simd_1_1_neural.html) you must include:\n\n    #include \"Simd/SimdNeural.hpp\"\n\t\nIn order to use [Simd::Motion](http://ermig1979.github.io/Simd/help/namespace_simd_1_1_motion.html) you must include:\n\n    #include \"Simd/SimdMotion.hpp\"\n\nPackage Managers\n================\n\nYou can download and install simd using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:\n\n    git clone https://github.com/Microsoft/vcpkg.git\n    cd vcpkg\n    ./bootstrap-vcpkg.sh\n    ./vcpkg integrate install\n    ./vcpkg install simd\n\nThe simd port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\nInteraction with OpenCV\n=======================\n\nIf you need to use mutual conversion between Simd and OpenCV types you just have to define macro `SIMD_OPENCV_ENABLE` before including of Simd headers:\n    \n    #include <opencv2/core/core.hpp>\n    #define SIMD_OPENCV_ENABLE\n    #include \"Simd/SimdLib.hpp\"\n\nAnd you can convert next types:\n\t\n* `cv::Point`, `cv::Size` <--> `Simd::Point`.\n* `cv::Rect` <--> `Simd::Rectangle`.\n* `cv::Mat` <--> `Simd::View`.\n\t\nTest Framework\n==============\n\nThe test suite is needed for testing of correctness of work of the library and also for its performance testing.\nThere is a set of tests for every function from API of the library. \nThere is an example of test application using:\n\n\t./Test -m=a -tt=1 -f=Sobel -ot=log.txt\n\nWhere next parameters were used:\n\n* `-m=a` - a auto checking mode which includes performance testing (only for library built in Release mode). \nIn this case different implementations of each functions will be compared between themselves \n(for example a scalar implementation and implementations with using of different SIMD instructions such as SSE2, AVX2, and other).\nAlso it can be `-m=s` (running of special tests).\n* `-tt=1` - a number of test threads. There are special values: '-1' - using of all available threads for tests, '-2' - using of half of all available threads for tests.\n* `-fi=Sobel` - an include filter. In current case will be tested only functions which contain word 'Sobel' in their names. \nIf you miss this parameter then full testing will be performed.\nYou can use several filters - function name has to satisfy at least one of them.\n* `-ot=log.txt` - a file name with test report (in TEXT file format). The test's report also will be output to console.\n    \nAlso you can use parameters:\n\n* `--help` or `-?` in order to print help message.\n* `-r=../..` to set project root directory.\n* `-pa=1` to print alignment statistics.\n* `-pi=1` to print internal statistics (Cmake parameter SIMD_PERF must be ON).\n* `-c=512` a number of channels in test image for performance testing.\n* `-h=1080` a height of test image for performance testing.\n* `-w=1920` a width of test image for performance testing.\n* `-oh=log.html` - a file name with test report (in HTML file format).\t\n* `-s=sample.avi` a video source (See `Simd::Motion` test).\n* `-o=output.avi` an annotated video output (See `Simd::Motion` test).\n* `-wt=1` a thread number used to parallelize algorithms. Use -1 to set maximum parallelization.\n* `-fe=Abs` an exclude filter to exclude some tests.\n* `-mt=100` a minimal test execution time (in milliseconds).\n* `-lc=1` to litter CPU cache between test runs.\n* `-ri=city.jpg` a name of real image used in some tests. The image have to be placed in `./data/image` directory.\n* `-tr=2` a number of test execution repeats.\n* `-ts=1` to print statistics of time of tests execution.\n* `-cc=1` to check c++ API.\n* `-de=2` a flags of SIMD extensions which testing are disabled. Base - 1, 2 - SSE4.1/NEON/HVX, 4 - AVX2/SVE, 8 - AVX-512BW/SVE2, 16 - AVX-512VNNI, 32 - AMX-BF16.\n* `-wu=100` a time to warm up CPU before testing (in milliseconds).\n* `-pt=1` a boolean flag to pin threads to cpu cores.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0DAE:3A3DD:178FCC:5DD7D1:6AB92B51"},"text_sha256":"df6c682d4e23f5932c9cd74c710754d81b06f4de62ae8d949c6b59e4d7da5985"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"aws/sagemaker-python-sdk","input_row":{"repository":"aws/sagemaker-python-sdk","url":"https://github.com/aws/sagemaker-python-sdk","name":"sagemaker-python-sdk","owner":"aws","description":"A library for training and deploying machine learning models on Amazon SageMaker","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2264,"issues":1723,"created_at":"2017-11-14T01:03:33Z","updated_at":"2026-09-27T09:39:28Z","first_commit_at":"2017-11-30T05:59:28Z","last_commit_at":"2026-09-25T20:47:17Z","activity_months":105.83,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:26.518Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"aws/sagemaker-python-sdk","visibility":"public","created_at":"2017-11-14T01:03:33Z","updated_at":"2026-09-27T09:39:28Z","private":false,"fork":false,"archived":false,"stargazers_count":2264,"open_issues_count":405,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2323","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:17ECB51:1C110CB:6AB92B52"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2322","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:17E59E9:1C09E71:6AB92B52"},"commit":{"sha":"6473b0c29fbf083cb663cdd628fa79fdcb58bf17","url":"https://github.com/aws/sagemaker-python-sdk/commit/6473b0c29fbf083cb663cdd628fa79fdcb58bf17","date":"2018-05-24T23:47:16Z","author_date":"2018-05-24T23:47:16Z","committer_date":"2018-05-24T23:47:16Z","tree_sha":"93b073f950e41bd65b33c72f77c1226b250aea28","message_first_line":"Add Local Mode Integration tests (#192)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2321","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D1:B1202:17A1996:1BC570D:6AB92B53"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":119978,"blob_sha":"24654215c0ebc7d35d72cf8af45ac330d6b2de21","priority":0}],"documents":[{"path":"README.rst","size":119978,"blob_sha":"24654215c0ebc7d35d72cf8af45ac330d6b2de21","priority":0,"status":200,"text":".. image:: branding/icon/sagemaker-banner.png\n    :height: 100px\n    :alt: SageMaker\n\n====================\nSageMaker Python SDK\n====================\n\n.. image:: https://travis-ci.org/aws/sagemaker-python-sdk.svg?branch=master\n   :target: https://travis-ci.org/aws/sagemaker-python-sdk\n   :alt: Build Status\n\n.. image:: https://codecov.io/gh/aws/sagemaker-python-sdk/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/aws/sagemaker-python-sdk\n   :alt: CodeCov\n\nSageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.\n\nWith the SDK, you can train and deploy models using popular deep learning frameworks: **Apache MXNet** and **TensorFlow**. You can also train and deploy models with **Amazon algorithms**, these are scalable implementations of core machine learning algorithms that are optimized for SageMaker and GPU training. If you have **your own algorithms** built into SageMaker compatible Docker containers, you can train and host models using these as well.\n\nFor detailed API reference please go to: `Read the Docs <https://readthedocs.org/projects/sagemaker/>`_\n\nTable of Contents\n-----------------\n\n1. `Getting SageMaker Python SDK <#getting-sagemaker-python-sdk>`__\n2. `SageMaker Python SDK Overview <#sagemaker-python-sdk-overview>`__\n3. `MXNet SageMaker Estimators <#mxnet-sagemaker-estimators>`__\n4. `TensorFlow SageMaker Estimators <#tensorflow-sagemaker-estimators>`__\n5. `Chainer SageMaker Estimators <#chainer-sagemaker-estimators>`__\n6. `AWS SageMaker Estimators <#aws-sagemaker-estimators>`__\n7. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators>`__\n8. `BYO Model <#byo-model>`__\n\n\nGetting SageMaker Python SDK\n----------------------------\n\nSageMaker Python SDK is built to PyPI and can be installed with pip.\n\n::\n\n    pip install sagemaker\n\nYou can install from source by cloning this repository and issuing a pip install command in the root directory of the repository.\n\n::\n\n    git clone https://github.com/aws/sagemaker-python-sdk.git\n    python setup.py sdist\n    pip install dist/sagemaker-1.3.0.tar.gz\n\nSupported Python versions\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker Python SDK is tested on: \\* Python 2.7 \\* Python 3.5\n\nLicensing\n~~~~~~~~~\nSageMaker Python SDK is licensed under the Apache 2.0 License. It is copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. The license is available at:\nhttp://aws.amazon.com/apache2.0/\n\nRunning tests\n~~~~~~~~~~~~~\n\nSageMaker Python SDK uses tox for running Python tests. You can run the tests by running tox:\n\n::\n\n    tox\n\nTests are defined in ``tests/`` and includes unit and integ tests. If you just want to run unit tests, then you can issue:\n\n::\n\n    tox tests/unit\n\nTo just run integ tests, issue the following command:\n\n::\n\n    pytest tests/integ\n\nYou can also filter by individual test function names (usable with any of the previous commands):\n\n::\n\n    pytest -k 'test_i_care_about'\n\nBuilding Sphinx docs\n~~~~~~~~~~~~~~~~~~~~\n\n``cd`` into the ``doc`` directory and run:\n\n::\n\n    make html\n\nYou can edit the templates for any of the pages in the docs by editing the .rst files in the \"doc\" directory and then running \"``make html``\" again.\n\n\nSageMaker Python SDK Overview\n-----------------------------\n\nSageMaker Python SDK provides several high-level abstractions for working with Amazon SageMaker. These are:\n\n- **Estimators**: Encapsulate training on SageMaker. Can be ``fit()`` to run training, then the resulting model ``deploy()`` ed to a SageMaker Endpoint.\n- **Models**: Encapsulate built ML models. Can be ``deploy()`` ed to a SageMaker Endpoint.\n- **Predictors**: Provide real-time inference and transformation using Python data-types against a SageMaker Endpoint.\n- **Session**: Provides a collection of convenience methods for working with SageMaker resources.\n\nEstimator and Model implementations for MXNet, TensorFlow, and Amazon ML algorithms are included. There's also an Estimator that runs SageMaker compatible custom Docker containers, allowing you to run your own ML algorithms via SageMaker Python SDK.\n\nLater sections of this document explain how to use the different Estimators and Models. These are:\n\n* `MXNet SageMaker Estimators and Models <#mxnet-sagemaker-estimators>`__\n* `TensorFlow SageMaker Estimators and Models <#tensorflow-sagemaker-estimators>`__\n* `Chainer SageMaker Estimators and Models <#chainer-sagemaker-estimators>`__\n* `AWS SageMaker Estimators and Models <#aws-sagemaker-estimators>`__\n* `Custom SageMaker Estimators and Models <#byo-docker-containers-with-sagemaker-estimators>`__\n\n\nEstimator Usage\n---------------\n\nHere is an end to end example of how to use a SageMaker Estimator.\n\n.. code:: python\n\n    from sagemaker.mxnet import MXNet\n\n    # Configure an MXNet Estimator (no training happens yet)\n    mxnet_estimator = MXNet('train.py',\n                            train_instance_type='ml.p2.xlarge',\n                            train_instance_count = 1)\n\n    # Starts a SageMaker training job and waits until completion.\n    mxnet_estimator.fit('s3://my_bucket/my_training_data/')\n\n    # Deploys the model that was generated by fit() to a SageMaker Endpoint\n    mxnet_predictor = mxnet_estimator.deploy(initial_instance_count=1, instance_type='ml.p2.xlarge')\n\n    # Serializes data and makes a prediction request to the SageMaker Endpoint\n    response = predictor.predict(data)\n\n    # Tears down the SageMaker Endpoint\n    mxnet_estimator.delete_endpoint()\n\nLocal Mode\n~~~~~~~~~~\n\nThe SageMaker Python SDK now supports local mode, which allows you to create TensorFlow, MXNet and BYO estimators and\ndeploy to your local environment. This is a great way to test your deep learning script before running in\nSageMaker's managed training or hosting environments.\n\nWe can take the example in  `Estimator Usage <#estimator-usage>`__ , and use either ``local`` or ``local_gpu`` as the\ninstance type.\n\n.. code:: python\n\n    from sagemaker.mxnet import MXNet\n\n    # Configure an MXNet Estimator (no training happens yet)\n    mxnet_estimator = MXNet('train.py',\n                            train_instance_type='local',\n                            train_instance_count=1)\n\n    # In Local Mode, fit will pull the MXNet container docker image and run it locally\n    mxnet_estimator.fit('s3://my_bucket/my_training_data/')\n\n    # Alternatively, you can train using data in your local file system. This is only supported in Local mode.\n    mxnet_estimator.fit('file:///tmp/my_training_data')\n\n    # Deploys the model that was generated by fit() to local endpoint in a container\n    mxnet_predictor = mxnet_estimator.deploy(initial_instance_count=1, instance_type='local')\n\n    # Serializes data and makes a prediction request to the local endpoint\n    response = predictor.predict(data)\n\n    # Tears down the endpoint container\n    mxnet_estimator.delete_endpoint()\n\n\nFor detailed examples of running docker in local mode, see:\n\n- `TensorFlow local mode example notebook <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-sdk/tensorflow_distributed_mnist/tensorflow_local_mode_mnist.ipynb>`__.\n- `MXNet local mode example notebook <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-sdk/mxnet_gluon_mnist/mnist_with_gluon_local_mode.ipynb>`__.\n\nA few important notes:\n\n- Only one local mode endpoint can be running at a time\n- If you are using s3 data as input, it will be pulled from S3 to your local environment, please ensure you have sufficient space.\n- If you run into problems, this is often due to different docker containers conflicting. Killing these containers and re-running often solves your problems.\n- Local Mode requires docker-compose and `nvidia-docker2 <https://github.com/NVIDIA/nvidia-docker>`__ for ``local_gpu``.\n- Distributed training is not yet supported for ``local_gpu``.\n\n\nMXNet SageMaker Estimators\n--------------------------\n\nWith MXNet Estimators, you can train and host MXNet models on Amazon SageMaker.\n\nSupported versions of MXNet: ``1.0.0``, ``0.12.1``.\n\nTraining with MXNet\n~~~~~~~~~~~~~~~~~~~\n\nTraining MXNet models using ``MXNet`` Estimators is a two-step process. First, you prepare your training script, then second, you run this on SageMaker via an ``MXNet`` Estimator. You should prepare your script in a separate source file than the notebook, terminal session, or source file you're using to submit the script to SageMaker via an ``MXNet`` Estimator.\n\nSuppose that you already have an MXNet training script called\n``mxnet-train.py``. You can run this script in SageMaker as follows:\n\n.. code:: python\n\n    from sagemaker.mxnet import MXNet\n    mxnet_estimator = MXNet(\"mxnet-train.py\",\n                            role=\"SageMakerRole\",\n                            train_instance_type=\"ml.p3.2xlarge\",\n                            train_instance_count=1)\n    mxnet_estimator.fit(\"s3://bucket/path/to/training/data\")\n\nWhere the s3 url is a path to your training data, within Amazon S3. The constructor keyword arguments define how SageMaker runs your training script and are discussed, in detail, in a later section.\n\nIn the following sections, we'll discuss how to prepare a training script for execution on SageMaker, then how to run that script on SageMaker using an ``MXNet`` Estimator.\n\nPreparing the MXNet training script\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYour MXNet training script must be a Python 2.7 or 3.5 compatible source file. The MXNet training script must contain a function ``train``, which SageMaker invokes to run training. You can include other functions as well, but it must contain a ``train`` function.\n\nWhen you run your script on SageMaker via the ``MXNet`` Estimator, SageMaker injects information about the training environment into your training function via Python keyword arguments. You can choose to take advantage of these by including them as keyword arguments in your train function. The full list of arguments is:\n\n-  ``hyperparameters (dict[string,string])``: The hyperparameters passed\n   to SageMaker TrainingJob that runs your MXNet training script. You\n   can use this to pass hyperparameters to your training script.\n-  ``input_data_config (dict[string,dict])``: The SageMaker TrainingJob\n   InputDataConfig object, that's set when the SageMaker TrainingJob is\n   created. This is discussed in more detail below.\n-  ``channel_input_dirs (dict[string,string])``: A collection of\n   directories containing training data. When you run training, you can\n   partition your training data into different logical \"channels\".\n   Depending on your problem, some common channel ideas are: \"train\",\n   \"test\", \"evaluation\" or \"images',\"labels\".\n-  ``output_data_dir (str)``: A directory where your training script can\n   write data that will be moved to s3 after training is complete.\n-  ``num_gpus (int)``: The number of GPU devices available on your\n   training instance.\n-  ``num_cpus (int)``: The number of CPU devices available on your training instance.\n-  ``hosts (list[str])``: The list of host names running in the\n   SageMaker Training Job cluster.\n-  ``current_host (str)``: The name of the host executing the script.\n   When you use SageMaker for MXNet training, the script is run on each\n   host in the cluster.\n\nA training script that takes advantage of all arguments would have the following definition:\n\n.. code:: python\n\n    def train(hyperparameters, input_data_config, channel_input_dirs, output_data_dir,\n              num_gpus, num_cpus, hosts, current_host):\n        pass\n\nYou don't have to use all the arguments, arguments you don't care about can be ignored by including ``**kwargs``.\n\n.. code:: python\n\n    # Only work with hyperparameters and num_gpus, ignore all other hyperparameters\n    def train(hyperparameters, num_gpus, **kwargs):\n        pass\n\n**Note: Writing a training script that imports correctly**\nWhen SageMaker runs your training script, it imports it as a Python module and then invokes ``train`` on the imported module. Consequently, you should not include any statements that won't execute successfully in SageMaker when your module is imported. For example, don't attempt to open any local files in top-level statements in your training script.\n\nIf you want to run your training script locally via the Python interpreter, look at using a ``___name__ == '__main__'`` guard, discussed in more detail here: https://stackoverflow.com/questions/419163/what-does-if-name-main-do .\n\nUsing MXNet and numpy\n^^^^^^^^^^^^^^^^^^^^^\n\nYou can import both ``mxnet`` and ``numpy`` in your training script. When your script runs in SageMaker, it will run with access to MXNet version 1.0.0 and numpy version 1.13.3 by default. For more information on the environment your script runs in, please see `SageMaker MXNet Containers <#sagemaker-mxnet-containers>`__.\n\nRunning an MXNet training script in SageMaker\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou run MXNet training scripts on SageMaker by creating ``MXNet`` Estimators. SageMaker training of your script is invoked when you call ``fit`` on an ``MXNet`` Estimator. The following code sample shows how you train a custom MXNet script \"train.py\".\n\n.. code:: python\n\n    mxnet_estimator = MXNet(\"train.py\",\n                            train_instance_type=\"ml.p2.xlarge\",\n                            train_instance_count=1)\n    mxnet_estimator.fit(\"s3://my_bucket/my_training_data/\")\n\nMXNet Estimators\n^^^^^^^^^^^^^^^^\n\nThe ``MXNet`` constructor takes both required and optional arguments.\n\nRequired arguments\n''''''''''''''''''\n\nThe following are required arguments to the ``MXNet`` constructor. When you create an MXNet object, you must include these in the constructor, either positionally or as keyword arguments.\n\n-  ``entry_point`` Path (absolute or relative) to the Python file which\n   should be executed as the entry point to training.\n-  ``role`` An AWS IAM role (either name or full ARN). The Amazon\n   SageMaker training jobs and APIs that create Amazon SageMaker\n   endpoints use this role to access training data and model artifacts.\n   After the endpoint is created, the inference code might use the IAM\n   role, if accessing AWS resource.\n-  ``train_instance_count`` Number of Amazon EC2 instances to use for\n   training.\n-  ``train_instance_type`` Type of EC2 instance to use for training, for\n   example, 'ml.c4.xlarge'.\n\nOptional arguments\n''''''''''''''''''\n\nThe following are optional arguments. When you create an ``MXNet`` object, you can specify these as keyword arguments.\n\n-  ``source_dir`` Path (absolute or relative) to a directory with any\n   other training source code dependencies aside from the entry point\n   file. Structure within this directory will be preserved when training\n   on SageMaker.\n-  ``hyperparameters`` Hyperparameters that will be used for training.\n   Will be made accessible as a dict[str, str] to the training code on\n   SageMaker. For convenience, accepts other types besides str, but\n   str() will be called on keys and values to convert them before\n   training.\n-  ``py_version`` Python version you want to use for executing your\n   model training code.\n-  ``train_volume_size`` Size in GB of the EBS volume to use for storing\n   input data during training. Must be large enough to store training\n   data if input_mode='File' is used (which is the default).\n-  ``train_max_run`` Timeout in hours for training, after which Amazon\n   SageMaker terminates the job regardless of its current status.\n-  ``input_mode`` The input mode that the algorithm supports. Valid\n   modes: 'File' - Amazon SageMaker copies the training dataset from the\n   s3 location to a directory in the Docker container. 'Pipe' - Amazon\n   SageMaker streams data directly from s3 to the container via a Unix\n   named pipe.\n-  ``output_path`` s3 location where you want the training result (model\n   artifacts and optional output files) saved. If not specified, results\n   are stored to a default bucket. If the bucket with the specific name\n   does not exist, the estimator creates the bucket during the fit()\n   method execution.\n-  ``output_kms_key`` Optional KMS key ID to optionally encrypt training\n   output with.\n-  ``job_name`` Name to assign for the training job that the fit()\n   method launches. If not specified, the estimator generates a default\n   job name, based on the training image name and current timestamp\n\nCalling fit\n^^^^^^^^^^^\n\nYou start your training script by calling ``fit`` on an ``MXNet`` Estimator. ``fit`` takes both required and optional arguments.\n\nRequired argument\n'''''''''''''''''\n\n-  ``inputs``: This can take one of the following forms: A string\n   s3 URI, for example ``s3://my-bucket/my-training-data``. In this\n   case, the s3 objects rooted at the ``my-training-data`` prefix will\n   be available in the default ``train`` channel. A dict from\n   string channel names to s3 URIs. In this case, the objects rooted at\n   each s3 prefix will available as files in each channel directory.\n\nFor example:\n\n.. code:: python\n\n    {'train':'s3://my-bucket/my-training-data',\n     'eval':'s3://my-bucket/my-evaluation-data'}\n\n.. optional-arguments-1:\n\nOptional arguments\n''''''''''''''''''\n\n-  ``wait``: Defaults to True, whether to block and wait for the\n   training script to complete before returning.\n-  ``logs``: Defaults to True, whether to show logs produced by training\n   job in the Python session. Only meaningful when wait is True.\n\nSaving models\n~~~~~~~~~~~~~\n\nWhen we run MXNet training, we often want to save or manipulate the models that MXNet produces. SageMaker Estimators provides several ways to save MXNet models. The method used is driven by functions you define on your training script, run via the ``MXNet`` Estimator in SageMaker in response to ``fit``.\n\nJust as you enable training by defining a ``train`` function in your training script, you enable model saving by defining a ``save`` function in your script. If your script includes a ``save`` function, SageMaker will invoke it with the return-value of ``train``. Model saving is a two-step process, firstly you return the model you want to save from\n``train``, then you define your model-serialization logic in ``save``.\n\nSageMaker provides a default implementation of ``save`` that works with MXNet Module API ``Module`` objects. If your training script does not define a ``save`` function, then the default ``save`` function will be invoked on the return-value of your ``train`` function.\n\nThe following script demonstrates how to return a model from train, that's compatible with the default ``save`` function.\n\n.. code:: python\n\n    import mxnet as mx\n\n    def create_graph():\n        # Code to create graph omitted for brevity\n\n    def train(num_gpus, channel_input_dirs, **kwargs):\n        ctx = mx.cpu() if not num_gpus else [mx.gpu(i) for i in range(num_gpus)]\n        sym = create_graph()\n        mod = mx.mod.Module(symbol=sym, context=ctx)\n\n        # Code to fit mod omitted for brevity\n        # ...\n\n        # Return the Module object. SageMaker will save this.\n        return mod\n\nIf you define your own ``save`` function, it should have the following signature:\n\n.. code:: python\n\n    def save(model, model_dir)\n\nWhere ``model`` is the return-value from ``train`` and ``model_dir`` is the directory SageMaker requires you to save your model. If you write files into ``model_dir`` then they will be persisted to s3 after the SageMaker Training Job completes.\n\nAfter your training job is complete, your model data will available in the s3 ``output_path`` you specified when you created the MXNet Estimator. Handling of s3 output is discussed in: `Accessing SageMaker output and model data in s3 <#accessing%20-sagemaker-output-and-model-data-in-s3>`__.\n\nMXNet Module serialization in SageMaker\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you train function returns a ``Module`` object, it will be serialized by the default Module serialization system, unless you've specified a custom ``save`` function.\n\nThe default serialization system generates three files:\n\n-  ``model-shapes.json``: A json list, containing a serialization of the\n   ``Module`` ``data_shapes`` property. Each object in the list contains\n   the serialization of one ``DataShape`` in the returned ``Module``.\n   Each object has a ``name`` property, containing the ``DataShape``\n   name and a ``shape`` property, which is a list of that dimensions for\n   the shape of that ``DataShape``. For example:\n\n.. code:: javascript\n\n    [\n        {\"name\":\"images\", \"shape\":[100, 1, 28, 28]},\n        {\"name\":\"labels\", \"shape\":[100, 1]}\n    ]\n\n-  ``model-symbol.json``: The MXNet ``Module`` ``Symbol`` serialization,\n   produced by invoking ``save`` on the ``symbol`` property of the\n   ``Module`` being saved.\n-  ``modle.params``: The MXNet ``Module`` parameters. Produced by\n   invoking ``save_params`` on the ``Module`` being saved.\n\nWriting a custom save function\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can provide your own save function. This is useful if you are not working with the ``Module`` API or you need special processing.\n\nTo provide your own save function, define a ``save`` function in your training script. The function should take two arguments:\n\n-  model: This is the object that was returned from your ``train``\n   function. If your ``train`` function does not return an object, it\n   will be ``None``. You are free to return an object of any type from\n   ``train``, you do not have to return ``Module`` or ``Gluon`` API\n   specific objects.\n-  model_dir: This is the string path on the SageMaker training host\n   where you save your model. Files created in this directory will be\n   accessible in S3 after your SageMaker Training Job completes.\n\nAfter your ``train`` function completes, SageMaker will invoke ``save`` with the object returned from ``train``.\n\n**Note: How to save Gluon models with SageMaker**\n\nIf your train function returns a Gluon API ``net`` object as its model, you'll need to write your own ``save`` function. You will want to serialize the ``net`` parameters. Saving ``net`` parameters is covered in the `Serialization section <http://gluon.mxnet.io/chapter03_deep-neural-networks/serialization.html>`__ of the collaborative Gluon deep-learning book `\"The Straight Dope\" <http://gluon.mxnet.io/index.html>`__.\n\nDeploying MXNet models\n~~~~~~~~~~~~~~~~~~~~~~\n\nAfter an MXNet Estimator has been fit, you can host the newly created model in SageMaker.\n\nAfter calling ``fit``, you can call ``deploy`` on an ``MXNet`` Estimator to create a SageMaker Endpoint. The Endpoint runs a SageMaker-provided MXNet model server and hosts the model produced by your training script, which was run when you called ``fit``. This was the model object you returned from ``train`` and saved with either a custom save function or the default save function.\n\n``deploy`` returns a ``Predictor`` object, which you can use to do inference on the Endpoint hosting your MXNet model. Each ``Predictor`` provides a ``predict`` method which can do inference with numpy arrays or Python lists. Inference arrays or lists are serialized and sent to the MXNet model server by an ``InvokeEndpoint`` SageMaker operation.\n\n``predict`` returns the result of inference against your model. By default, the inference result is either a Python list or dictionary.\n\n.. code:: python\n\n    # Train my estimator\n    mxnet_estimator = MXNet(\"train.py\",\n                            train_instance_type=\"ml.p2.xlarge\",\n                            train_instance_count=1)\n    mxnet_estimator.fit(\"s3://my_bucket/my_training_data/\")\n\n    # Deploy my estimator to a SageMaker Endpoint and get a Predictor\n    predictor = mxnet_estimator.deploy(instance_type='ml.m4.xlarge',\n                                       initial_instance_count=1)\n\nYou use the SageMaker MXNet model server to host your MXNet model when you call ``deploy`` on an ``MXNet`` Estimator. The model server runs inside a SageMaker Endpoint, which your call to ``deploy`` creates. You can access the name of the Endpoint by the ``name`` property on the returned ``Predictor``.\n\nThe SageMaker MXNet Model Server\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe MXNet Endpoint you create with ``deploy`` runs a SageMaker MXNet model server. The model server loads the model that was saved by your training script and performs inference on the model in response to SageMaker InvokeEndpoint API calls.\n\nYou can configure two components of the SageMaker MXNet model server: Model loading and model serving. Model loading is the process of deserializing your saved model back into an MXNet model. Serving is the process of translating InvokeEndpoint requests to inference calls on the loaded model.\n\nAs with MXNet training, you configure the MXNet model server by defining functions in the Python source file you passed to the MXNet constructor.\n\nModel loading\n^^^^^^^^^^^^^\n\nBefore a model can be served, it must be loaded. The SageMaker model server loads your model by invoking a ``model_fn`` function on your training script. If you don't provide a ``model_fn`` function, SageMaker will use a default ``model_fn`` function. The default function works with MXNet Module model objects, saved via the default ``save`` function.\n\nIf you wrote a custom ``save`` function then you may need to write a custom ``model_fn`` function. If your save function serializes ``Module`` objects under the same format as the default ``save`` function, then you won't need to write a custom model_fn function. If you do write a ``model_fn`` function must have the following signature:\n\n.. code:: python\n\n    def model_fn(model_dir)\n\nSageMaker will inject the directory where your model files and sub-directories, saved by ``save``, have been mounted. Your model function should return a model object that can be used for model serving. SageMaker provides automated serving functions that work with Gluon API ``net`` objects and Module API ``Module`` objects. If you return either of these types of objects, then you will be able to use the default serving request handling functions.\n\nThe following code-snippet shows an example custom ``model_fn`` implementation. This loads returns an MXNet Gluon net model for resnet-34 inference. It loads the model parameters from a ``model.params`` file in the SageMaker model directory.\n\n.. code:: python\n\n    def model_fn(model_dir):\n        \"\"\"\n        Load the gluon model. Called once when hosting service starts.\n        :param: model_dir The directory where model files are stored.\n        :return: a model (in this case a Gluon network)\n        \"\"\"\n        net = models.get_model('resnet34_v2', ctx=mx.cpu(), pretrained=False, classes=10)\n        net.load_params('%s/model.params' % model_dir, ctx=mx.cpu())\n        return net\n\nModel serving\n^^^^^^^^^^^^^\n\nAfter the SageMaker model server has loaded your model, by calling either the default ``model_fn`` or the implementation in your training script, SageMaker will serve your model. Model serving is the process of responding to inference requests, received by SageMaker InvokeEndpoint API calls. The SageMaker MXNet model server breaks request handling into three steps:\n\n\n-  input processing,\n-  prediction, and\n-  output processing.\n\nIn a similar way to previous steps, you configure these steps by defining functions in your Python source file.\n\nEach step involves invoking a python function, with information about the request and the return-value from the previous function in the chain. Inside the SageMaker MXNet model server, the process looks like:\n\n.. code:: python\n\n    # Deserialize the Invoke request body into an object we can perform prediction on\n    input_object = input_fn(request_body, request_content_type, model)\n\n    # Perform prediction on the deserialized object, with the loaded model\n    prediction = predict_fn(input_object, model)\n\n    # Serialize the prediction result into the desired response content type\n    ouput = output_fn(prediction, response_content_type)\n\nThe above code-sample shows the three function definitions:\n\n-  ``input_fn``: Takes request data and deserializes the data into an\n   object for prediction.\n-  ``predict_fn``: Takes the deserialized request object and performs\n   inference against the loaded model.\n-  ``output_fn``: Takes the result of prediction and serializes this\n   according to the response content type.\n\nThe SageMaker MXNet model server provides default implementations of these functions. These work with common-content types, and Gluon API and Module API model objects. You can provide your own implementations for these functions in your training script. If you omit any definition then the SageMaker MXNet model server will use its default implementation for that function.\n\nIf you rely solely on the SageMaker MXNet model server defaults, you get the following functionality:\n\n-  Prediction on MXNet Gluon API ``net`` and Module API ``Module``\n   objects.\n-  Deserialization from CSV and JSON to NDArrayIters.\n-  Serialization of NDArrayIters to CSV or JSON.\n\nIn the following sections we describe the default implementations of input_fn, predict_fn, and output_fn. We describe the input arguments and expected return types of each, so you can define your own implementations.\n\nInput processing\n''''''''''''''''\n\nWhen an InvokeEndpoint operation is made against an Endpoint running a SageMaker MXNet model server, the model server receives two pieces of information:\n\n-  The request Content-Type, for example \"application/json\"\n-  The request data body, a byte array which is at most 5 MB (5 \\* 1024\n   \\* 1024 bytes) in size.\n\nThe SageMaker MXNet model server will invoke an \"input_fn\" function in your training script, passing in this information. If you define an ``input_fn`` function definition, it should return an object that can be passed to ``predict_fn`` and have the following signature:\n\n.. code:: python\n\n    def input_fn(request_body, request_content_type, model)\n\nWhere ``request_body`` is a byte buffer, ``request_content_type`` is a Python string, and model is the result of invoking ``model_fn``.\n\nThe SageMaker MXNet model server provides a default implementation of ``input_fn``. This function deserializes JSON or CSV encoded data into an MXNet ``NDArrayIter`` `(external API docs) <https://mxnet.incubator.apache.org/api/python/io.html#mxnet.io.NDArrayIter>`__ multi-dimensional array iterator. This works with the default ``predict_fn`` implementation, which expects an ``NDArrayIter`` as input.\n\nDefault json deserialization requires ``request_body`` contain a single json list. Sending multiple json objects within the same ``request_body`` is not supported. The list must have a dimensionality compatible with the MXNet ``net`` or ``Module`` object. Specifically, after the list is loaded, it's either padded or split to fit the first dimension of the model input shape. The list's shape must be identical to the model's input shape, for all dimensions after the first.\n\nDefault csv deserialization requires ``request_body`` contain one or more lines of CSV numerical data. The data is loaded into a two-dimensional array, where each line break defines the boundaries of the first dimension. This two-dimensional array is then re-shaped to be compatible with the shape expected by the model object. Specifically, the first dimension is kept unchanged, but the second dimension is reshaped to be consistent with the shape of all dimensions in the model, following the first dimension.\n\nIf you provide your own implementation of input_fn, you should abide by the ``input_fn`` signature. If you want to use this with the default\n``predict_fn``, then you should return an NDArrayIter. The NDArrayIter should have a shape identical to the shape of the model being predicted on. The example below shows a custom ``input_fn`` for preparing pickled numpy arrays.\n\n.. code:: python\n\n    import numpy as np\n    import mxnet as mx\n\n    def input_fn(request_body, request_content_type, model):\n        \"\"\"An input_fn that loads a pickled numpy array\"\"\"\n        if request_content_type == \"application/python-pickle\":\n            array = np.load(StringIO(request_body))\n            array.reshape(model.data_shpaes[0])\n            return mx.io.NDArrayIter(mx.ndarray(array))\n        else:\n            # Handle other content-types here or raise an Exception\n            # if the content type is not supported.\n            pass\n\nPrediction\n''''''''''\n\nAfter the inference request has been deserialized by ``input_fn``, the SageMaker MXNet model server invokes ``predict_fn``. As with ``input_fn``, you can define your own ``predict_fn`` or use the SageMaker Mxnet default.\n\nThe ``predict_fn`` function has the following signature:\n\n.. code:: python\n\n    def predict_fn(input_object, model)\n\nWhere ``input_object`` is the object returned from ``input_fn`` and\n``model`` is the model loaded by ``model_fn``.\n\nThe default implementation of ``predict_fn`` requires ``input_object`` be an ``NDArrayIter``, which is the return-type of the default\n``input_fn``. It also requires that ``model`` be either an MXNet Gluon API ``net`` object or a Module API ``Module`` object.\n\nThe default implementation performs inference with the input\n``NDArrayIter`` on the Gluon or Module object. If the model is a Gluon\n``net`` it performs: ``net.forward(input_object)``. If the model is a Module object it performs ``module.predict(input_object)``. In both cases, it returns the result of that call.\n\nIf you implement your own prediction function, you should take care to ensure that:\n\n-  The first argument is expected to be the return value from input_fn.\n   If you use the default input_fn, this will be an ``NDArrayIter``.\n-  The second argument is the loaded model. If you use the default\n   ``model_fn`` implementation, this will be an MXNet Module object.\n   Otherwise, it will be the return value of your ``model_fn``\n   implementation.\n-  The return value should be of the correct type to be passed as the\n   first argument to ``output_fn``. If you use the default\n   ``output_fn``, this should be an ``NDArrayIter``.\n\nOutput processing\n'''''''''''''''''\n\nAfter invoking ``predict_fn``, the model server invokes ``output_fn``, passing in the return-value from ``predict_fn`` and the InvokeEndpoint requested response content-type.\n\nThe ``output_fn`` has the following signature:\n\n.. code:: python\n\n    def output_fn(prediction, content_type)\n\nWhere ``prediction`` is the result of invoking ``predict_fn`` and\n``content_type`` is the InvokeEndpoint requested response content-type. The function should return a byte array of data serialized to content_type.\n\nThe default implementation expects ``prediction`` to be an ``NDArray`` and can serialize the result to either JSON or CSV. It accepts response content types of \"application/json\" and \"text/csv\".\n\nDistributed MXNet training\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can run a multi-machine, distributed MXNet training using the MXNet Estimator. By default, MXNet objects will submit single-machine training jobs to SageMaker. If you set ``train_instance_count`` to be greater than one, multi-machine training jobs will be launched when ``fit`` is called. When you run multi-machine training, SageMaker will import your training script and invoke ``train`` on each host in the cluster.\n\nWhen you develop MXNet distributed learning algorithms, you often want to use an MXNet kvstore to store and share model parameters. To learn more about writing distributed MXNet programs, please see `Distributed Training <http://newdocs.readthedocs.io/en/latest/distributed_training.html>`__ in the MXNet docs.\n\nWhen using an MXNet Estimator, SageMaker automatically starts MXNet kvstore server and scheduler processes on hosts in your training job cluster. Your script runs as an MXNet worker task. SageMaker runs one server process on each host in your cluster. One host is selected arbitrarily to run the scheduler process.\n\nWorking with existing model data and training jobs\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAttaching to existing training jobs\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can attach an MXNet Estimator to an existing training job using the\n``attach`` method.\n\n.. code:: python\n\n    my_training_job_name = \"MyAwesomeMXNetTrainingJob\"\n    mxnet_estimator = MXNet.attach(my_training_job_name)\n\nAfter attaching, if the training job is in a Complete status, it can be\n``deploy``\\ ed to create a SageMaker Endpoint and return a\n``Predictor``. If the training job is in progress, attach will block and display log messages from the training job, until the training job completes.\n\nThe ``attach`` method accepts the following arguments:\n\n-  ``training_job_name (str):`` The name of the training job to attach\n   to.\n-  ``sagemaker_session (sagemaker.Session or None):`` The Session used\n   to interact with SageMaker\n\nDeploying Endpoints from model data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAs well as attaching to existing training jobs, you can deploy models directly from model data in S3. The following code sample shows how to do this, using the ``MXNetModel`` class.\n\n.. code:: python\n\n    mxnet_model = MXNetModel(model_data=\"s3://bucket/model.tar.gz\", role=\"SageMakerRole\", entry_point=\"trasform_script.py\")\n\n    predictor = mxnet_model.deploy(instance_type=\"ml.c4.xlarge\", initial_instance_count=1)\n\nThe MXNetModel constructor takes the following arguments:\n\n-  ``model_data (str):`` An S3 location of a SageMaker model data\n   .tar.gz file\n-  ``image (str):`` A Docker image URI\n-  ``role (str):`` An IAM role name or Arn for SageMaker to access AWS\n   resources on your behalf.\n-  ``predictor_cls (callable[string,sagemaker.Session]):`` A function to\n   call to create a predictor. If not None, ``deploy`` will return the\n   result of invoking this function on the created endpoint name\n-  ``env (dict[string,string]):`` Environment variables to run with\n   ``image`` when hosted in SageMaker.\n-  ``name (str):`` The model name. If None, a default model name will be\n   selected on each ``deploy.``\n-  ``entry_point (str):`` Path (absolute or relative) to the Python file\n   which should be executed as the entry point to model hosting.\n-  ``source_dir (str):`` Optional. Path (absolute or relative) to a\n   directory with any other training source code dependencies aside from\n   tne entry point file. Structure within this directory will be\n   preserved when training on SageMaker.\n-  ``enable_cloudwatch_metrics (boolean):`` Optional. If true, training\n   and hosting containers will generate Cloudwatch metrics under the\n   AWS/SageMakerContainer namespace.\n-  ``container_log_level (int):`` Log level to use within the container.\n   Valid values are defined in the Python logging module.\n-  ``code_location (str):`` Optional. Name of the S3 bucket where your\n   custom code will be uploaded to. If not specified, will use the\n   SageMaker default bucket created by sagemaker.Session.\n-  ``sagemaker_session (sagemaker.Session):`` The SageMaker Session\n   object, used for SageMaker interaction\"\"\"\n\nYour model data must be a .tar.gz file in S3. SageMaker Training Job model data is saved to .tar.gz files in S3, however if you have local data you want to deploy, you can prepare the data yourself.\n\nAssuming you have a local directory containg your model data named \"my_model\" you can tar and gzip compress the file and upload to S3 using the following commands:\n\n::\n\n    tar -czf model.tar.gz my_model\n    aws s3 cp model.tar.gz s3://my-bucket/my-path/model.tar.gz\n\nThis uploads the contents of my_model to a gzip compressed tar file to S3 in the bucket \"my-bucket\", with the key \"my-path/model.tar.gz\".\n\nTo run this command, you'll need the aws cli tool installed. Please refer to our `FAQ <#FAQ>`__ for more information on installing this.\n\nMXNet Training Examples\n~~~~~~~~~~~~~~~~~~~~~~~\n\nAmazon provides several example Jupyter notebooks that demonstrate end-to-end training on Amazon SageMaker using MXNet. Please refer to:\n\nhttps://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk\n\nThese are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the \"sample notebooks\" folder.\n\n\nSageMaker MXNet Containers\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen training and deploying training scripts, SageMaker runs your Python script in a Docker container with several libraries installed. When creating the Estimator and calling deploy to create the SageMaker Endpoint, you can control the environment your script runs in.\n\nSageMaker runs MXNet Estimator scripts in either Python 2.7 or Python 3.5. You can select the Python version by passing a ``py_version`` keyword arg to the MXNet Estimator constructor. Setting this to ``py2`` (the default) will cause your training script to be run on Python 2.7. Setting this to ``py3`` will cause your training script to be run on Python 3.5. This Python version applies to both the Training Job, created by fit, and the Endpoint, created by deploy.\n\nYour MXNet training script will be run on version 1.1.0 by default. (See below for how to choose a different version, and currently supported versions.) The decision to use the GPU or CPU version of MXNet is made by the ``train_instance_type``, set on the MXNet constructor. If you choose a GPU instance type, your training job will be run on a GPU version of MXNet. If you choose a CPU instance type, your training job will be run on a CPU version of MXNet. Similarly, when you call deploy, specifying a GPU or CPU deploy_instance_type, will control which MXNet build your Endpoint runs.\n\nThe Docker images have the following dependencies installed:\n\n+-------------------------+--------------+-------------+-------------+\n| Dependencies            | MXNet 0.12.1 | MXNet 1.0.0 | MXNet 1.1.0 |\n+-------------------------+--------------+-------------+-------------+\n| Python                  |   2.7 or 3.5 |   2.7 or 3.5|   2.7 or 3.5|\n+-------------------------+--------------+-------------+-------------+\n| CUDA                    |          9.0 |         9.0 |         9.0 |\n+-------------------------+--------------+-------------+-------------+\n| numpy                   |       1.13.3 |      1.13.3 |      1.13.3 |\n+-------------------------+--------------+-------------+-------------+\n\nThe Docker images extend Ubuntu 16.04.\n\nYou can select version of MXNet by passing a ``framework_version`` keyword arg to the MXNet Estimator constructor. Currently supported versions are listed in the above table. You can also set ``framework_version`` to only specify major and minor version, e.g ``1.1``, which will cause your training script to be run on the latest supported patch version of that minor version, which in this example would be 1.1.0.\n\nYou can visit the SageMaker MXNet containers repository here: https://github.com/aws/sagemaker-mxnet-containers/\n\nTensorFlow SageMaker Estimators\n-------------------------------\n\nTensorFlow SageMaker Estimators allow you to run your own TensorFlow\ntraining algorithms on SageMaker Learner, and to host your own TensorFlow\nmodels on SageMaker Hosting.\n\nSupported versions of TensorFlow: ``1.4.1``, ``1.5.0``, ``1.6.0``.\n\nTraining with TensorFlow\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nTraining TensorFlow models using a ``sagemaker.tensorflow.TensorFlow``\nis a two-step process.\nFirst, you prepare your training script, then second, you run it on\nSageMaker Learner via the ``sagemaker.tensorflow.TensorFlow`` estimator.\n\nSuppose that you already have a TensorFlow training script called\n``tf-train.py``. You can train this script in SageMaker Learner as\nfollows:\n\n.. code:: python\n\n  from sagemaker.tensorflow import TensorFlow\n\n  tf_estimator = TensorFlow(entry_point='tf-train.py', role='SageMakerRole',\n                            training_steps=10000, evaluation_steps=100,\n                            train_instance_count=1, train_instance_type='ml.p2.xlarge')\n  tf_estimator.fit('s3://bucket/path/to/training/data')\n\nWhere the s3 url is a path to your training data, within Amazon S3. The\nconstructor keyword arguments define how SageMaker runs your training\nscript and are discussed, in detail, in a later section.\n\nIn the following sections, we'll discuss how to prepare a training script for execution on\nSageMaker, then how to run that script on SageMaker using a ``sagemaker.tensorflow.TensorFlow``\nestimator.\n\nPreparing the TensorFlow training script\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYour TensorFlow training script must be a **Python 2.7** source file. The current supported TensorFlow\nversions are **1.6.0 (default)**, **1.5.0**, and **1.4.1**. The SageMaker TensorFlow docker image\nuses this script by calling specifically-named functions from this script.\n\nThe training script **must contain** the following:\n\n- Exactly one of the following:\n\n  - ``model_fn``: defines the model that will be trained.\n  - ``keras_model_fn``: defines the ``tf.keras`` model that will be trained.\n  - ``estimator_fn``: defines the ``tf.estimator.Estimator`` that will train the model.\n\n- ``train_input_fn``: preprocess and load training data.\n- ``eval_input_fn``: preprocess and load evaluation data.\n\nIn addition, it may optionally contain:\n\n- ``serving_input_fn``: Defines the features to be passed to the model during prediction. **Important:**\n    this function is used only during training, but is required to deploy the model resulting from training\n    in a SageMaker endpoint.\n\nCreating a ``model_fn``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nA ``model_fn`` is a function that contains all the logic to support training, evaluation,\nand prediction. The basic skeleton for a ``model_fn`` looks like this:\n\n.. code:: python\n\n  def model_fn(features, labels, mode, hyperparameters):\n    # Logic to do the following:\n    # 1. Configure the model via TensorFlow operations\n    # 2. Define the loss function for training/evaluation\n    # 3. Define the training operation/optimizer\n    # 4. Generate predictions\n    # 5. Return predictions/loss/train_op/eval_metric_ops in EstimatorSpec object\n    return EstimatorSpec(mode, predictions, loss, train_op, eval_metric_ops)\n\nThe ``model_fn`` must accept four positional arguments:\n\n- ``features``: A dict containing the features passed to the model via ``train_input_fn``\n  in **training** mode, via ``eval_input_fn`` in **evaluation** mode, and via ``serving_input_fn``\n  in **predict** mode.\n- ``labels``: A ``Tensor`` containing the labels passed to the model via ``train_input_fn``\n  in **training** mode and ``eval_input_fn`` in **evaluation** mode. It will be empty for\n  **predict** mode.\n- ``mode``: One of the following ``tf.estimator.ModeKeys`` string values indicating the\n  context in which the ``model_fn`` was invoked:\n  - ``TRAIN``: the ``model_fn`` was invoked in **training** mode.\n  - ``EVAL``: the ``model_fn`` was invoked in **evaluation** mode.\n  - ``PREDICT``: the ``model_fn`` was invoked in **predict** mode.\n- ``hyperparameters``: The hyperparameters passed to SageMaker TrainingJob that runs\n  your TensorFlow training script. You can use this to pass hyperparameters to your\n  training script.\n\nThe ``model_fn`` must return a ``tf.estimator.EstimatorSpec``.\n\nExample of a complete ``model_fn``\n''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n  def model_fn(features, labels, mode, hyperparameters):\n    # Connect the first hidden layer to input layer\n    # (features[\"x\"]) with relu activation\n    first_hidden_layer = Dense(10, activation='relu', name='first-layer')(features[INPUT_TENSOR_NAME])\n\n    # Connect the second hidden layer to first hidden layer with relu\n    second_hidden_layer = Dense(20, activation='relu')(first_hidden_layer)\n\n    # Connect the output layer to second hidden layer (no activation fn)\n    output_layer = Dense(1, activation='linear')(second_hidden_layer)\n\n    # Reshape output layer to 1-dim Tensor to return predictions\n    predictions = tf.reshape(output_layer, [-1])\n\n    # Provide an estimator spec for `ModeKeys.PREDICT`.\n    if mode == tf.estimator.ModeKeys.PREDICT:\n      return tf.estimator.EstimatorSpec(mode=mode, predictions={\"ages\": predictions})\n\n    # Calculate loss using mean squared error\n    loss = tf.losses.mean_squared_error(labels, predictions)\n\n    # Calculate root mean squared error as additional eval metric\n    eval_metric_ops = {\n        \"rmse\": tf.metrics.root_mean_squared_error(tf.cast(labels, tf.float64), predictions)\n    }\n\n    optimizer = tf.train.GradientDescentOptimizer(\n        learning_rate=hyperparameters[\"learning_rate\"])\n    train_op = optimizer.minimize(\n        loss=loss, global_step=tf.train.get_global_step())\n\n    # Provide an estimator spec for `ModeKeys.EVAL` and `ModeKeys.TRAIN` modes.\n    return tf.estimator.EstimatorSpec(\n        mode=mode,\n        loss=loss,\n        train_op=train_op,\n        eval_metric_ops=eval_metric_ops)\n\nDistributed training\n''''''''''''''''''''\n\nWhen distributed training happens, a copy of the same neural network will be sent to\nmultiple training instances. Each instance will train with a batch of the dataset,\ncalculate loss and minimize the optimizer. One entire loop of this process is called training step.\n\nA `global step <https://www.tensorflow.org/api_docs/python/tf/train/global_step>`_ is a global\ncounter shared between the instances. It is necessary for distributed training, so the optimizer\ncan keep track of the number of training steps across instances. The only change in the\nprevious complete ``model_fn`` to enable distributed training is to pass in the global\nstep into the ``optimizer.minimize`` function:\n\n.. code:: python\n\n  train_op = optimizer.minimize(loss, tf.train.get_or_create_global_step())\n\nMore information about distributed training can be find in talk from the TensorFlow Dev Summit 2017\n`Distributed TensorFlow <https://www.youtube.com/watch?time_continue=1&v=la_M6bCV91M>`_.\n\n\nMore details on how to create a ``model_fn`` can be find in `Constructing the model_fn <https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/docs_src/extend/estimators.md#constructing-the-model_fn-constructing-modelfn>`_.\n\n\nCreating ``train_input_fn`` and ``eval_input_fn`` functions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``train_input_fn`` is used to pass ``features`` and ``labels`` to the ``model_fn``\nin **training** mode. The ``eval_input_fn`` is used to ``features`` and ``labels`` to the\n``model_fn`` in **evaluation** mode.\n\nThe basic skeleton for the ``train_input_fn`` looks like this:\n\n.. code:: python\n\n  def train_input_fn(training_dir, hyperparameters):\n    # Logic to the following:\n    # 1. Reads the **training** dataset files located in training_dir\n    # 2. Preprocess the dataset\n    # 3. Return 1)  a dict of feature names to Tensors with\n    # the corresponding feature data, and 2) a Tensor containing labels\n    return features, labels\n\nAn ``eval_input_fn`` follows the same format:\n\n.. code:: python\n\n  def eval_input_fn(training_dir, hyperparameters):\n    # Logic to the following:\n    # 1. Reads the **evaluation** dataset files located in training_dir\n    # 2. Preprocess the dataset\n    # 3. Return 1)  a dict of feature names to Tensors with\n    # the corresponding feature data, and 2) a Tensor containing labels\n    return features, labels\n\n**Note:** For TensorFlow 1.4 and 1.5, ``train_input_fn`` and ``eval_input_fn`` may also return a no-argument\nfunction which returns the tuple ``features, labels``. This is no longer supported for TensorFlow 1.6 and up.\n\nExample of a complete ``train_input_fn`` and ``eval_input_fn``\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n  def train_input_fn(training_dir, hyperparameters):\n    # invokes _input_fn with training dataset\n    return _input_fn(training_dir, 'training_dataset.csv')\n\n  def eval_input_fn(training_dir, hyperparameters):\n    # invokes _input_fn with evaluation dataset\n    return _input_fn(training_dir, 'evaluation_dataset.csv')\n\n  def _input_fn(training_dir, training_filename):\n      # reads the dataset using tf.dataset API\n      training_set = tf.contrib.learn.datasets.base.load_csv_without_header(\n          filename=os.path.join(training_dir, training_filename), target_dtype=np.int, features_dtype=np.float32)\n\n      # returns features x and labels y\n      return tf.estimator.inputs.numpy_input_fn(\n          x={INPUT_TENSOR_NAME: np.array(training_set.data)},\n          y=np.array(training_set.target),\n          num_epochs=None,\n          shuffle=True)()\n\n\nMore details on how to create input functions can be find in `Building Input Functions with tf.estimator <https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/docs_src/get_started/input_fn.md#building-input-functions-with-tfestimator>`_.\n\nCreating a ``serving_input_fn``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n``serving_input_fn`` is used to define the shapes and types of the inputs the model accepts when the model is exported for Tensorflow Serving. It is optional, but required for deploying the trained model to a SageMaker endpoint.\n\n``serving_input_fn`` is called at the end of model training and is **not** called during inference. (If you'd like to preprocess inference data, please see **Overriding input preprocessing with an input_fn**).\n\nThe basic skeleton for the ``serving_input_fn`` looks like this:\n\n.. code:: python\n\n  def serving_input_fn(hyperparameters):\n    # Logic to the following:\n    # 1. Defines placeholders that TensorFlow serving will feed with inference requests\n    # 2. Preprocess input data\n    # 3. Returns a tf.estimator.export.ServingInputReceiver or tf.estimator.export.TensorServingInputReceiver,\n    # which packages the placeholders and the resulting feature Tensors together.\n\n**Note:** For TensorFlow 1.4 and 1.5, ``serving_input_fn`` may also return a no-argument function which returns a ``tf.estimator.export.ServingInputReceiver`` or``tf.estimator.export.TensorServingInputReceiver``. This is no longer supported for TensorFlow 1.6 and up.\n\nExample of a complete ``serving_input_fn``\n''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n  def serving_input_fn(hyperparameters):\n      # defines the input placeholder\n      tensor = tf.placeholder(tf.float32, shape=[1, 7])\n      # returns the ServingInputReceiver object.\n      return build_raw_serving_input_receiver_fn({INPUT_TENSOR_NAME: tensor})()\n\nMore details on how to create a `serving_input_fn` can be find in `Preparing serving inputs <https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/docs_src/programmers_guide/saved_model.md#preparing-serving-inputs>`_.\n\nThe complete example described above can find in `Abalone age predictor using layers notebook example <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_layers/tensorflow_abalone_age_predictor_using_layers.ipynb>`_.\n\nMore examples on how to create a TensorFlow training script can be find in the `Amazon SageMaker examples repository <https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk>`_.\n\nSupport for pre-made ``tf.estimator`` and ``Keras`` models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn addition to ``model_fn``, ``sagemaker.tensorflow.TensorFlow`` supports pre-canned ``tf.estimator``\nand ``Keras`` models.\n\nUsing a pre-made ``tensorflow.estimator`` instead of a ``model_fn``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nPre-canned estimators are machine learning estimators premade for general purpose problems.\n``tf.estimator`` provides the following pre-canned estimators:\n\n- `tf.estimator.LinearClassifier <https://www.tensorflow.org/api_docs/python/tf/estimator/LinearClassifier>`_: Constructs\n  a linear classification model.\n- `tf.estimator.LinearRegressor <https://www.tensorflow.org/api_docs/python/tf/estimator/LinearRegressor>`_: Constructs\n  a linear regression model.\n- `tf.estimator.DNNClassifier <https://www.tensorflow.org/api_docs/python/tf/estimator/DNNClassifier>`_: Constructs\n  a neural network classification model.\n- `tf.estimator.DNNRegressor <https://www.tensorflow.org/api_docs/python/tf/estimator/DNNRegressor>`_: Construct\n  a neural network regression model.\n- `tf.estimator.DNNLinearCombinedClassifier <https://www.tensorflow.org/api_docs/python/tf/estimator/DNNLinearCombinedClassifier>`_: Constructs\n  a neural network and linear combined classification model.\n- `tf.estimator.DNNLinearCombinedRegressor <https://www.tensorflow.org/api_docs/python/tf/estimator/DNNLinearCombinedRegressor>`_: Constructs\n  a neural network and linear combined regression model.\n\nTo use a pre-canned ``tensorflow.estimator`` instead of creating a ``model_fn``, you need to write a ``estimator_fn``.\nThe base skeleton for the ``estimator_fn`` looks like this:\n\n.. code:: python\n\n  def estimator_fn(run_config, hyperparameters):\n    # Logic to the following:\n    # 1. Defines the features columns that will be the input of the estimator\n    # 2. Returns an instance of a ``tensorflow.estimator`` passing in, the input run_config in the\n    #    constructor.\n\nExample of a complete ``estimator_fn``\n''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n  def estimator_fn(run_config, hyperparameters):\n      # Defines the features columns that will be the input of the estimator\n      feature_columns = [tf.feature_column.numeric_column(INPUT_TENSOR_NAME, shape=[4])]\n      # Returns the instance of estimator.\n      return tf.estimator.DNNClassifier(feature_columns=feature_columns,\n                                        hidden_units=[10, 20, 10],\n                                        n_classes=3,\n                                        config=run_config)\n\nMore details on how to create a ``tensorflow.estimator`` can be find in `Creating Estimators in tf.estimator <https://www.tensorflow.org/extend/estimators>`_.\n\nAn example on how to create a TensorFlow training script with an ``estimator_fn`` can find in this `example <https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/tensorflow_iris_dnn_classifier_using_estimators>`_.\n\n\nUsing a ``Keras`` model instead of a ``model_fn``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n``tf.keras`` is an full implementation inside TensorFlow of the Keras API. To use a ``tf.keras``\nmodel for training instead of ``model_fn``, you need to write a ``keras_model_fn``. The base skeleton of\na ``keras_model_fn`` looks like this:\n\n.. code:: python\n\n  def keras_model_fn(hyperparameters):\n      # Logic to do the following:\n      # 1. Instantiate the Keras model\n      # 2. Compile the Keras model\n      return compiled_model\n\n\nExample of a complete ``keras_model_fn``\n''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n  def keras_model_fn(hyperparameters):\n    # Instantiate a Keras inception v3 model.\n    keras_inception_v3 = tf.keras.applications.inception_v3.InceptionV3(weights=None)\n    # Compile model with the optimizer, loss, and metrics you'd like to train with.\n    keras_inception_v3.compile(optimizer=tf.keras.optimizers.SGD(lr=0.0001, momentum=0.9),\n                          loss='categorical_crossentropy', metric='accuracy')\n    return keras_inception_v3\n\n\nTensorFlow 1.4.0 support for ``Keras`` models is limited only for **non-distributed** training;\ni.e. set the ``train_instance_count`` parameter in the ``TensorFlow`` estimator equal to 1.\n\nMore details on how to create a ``Keras`` model can be find in the `Keras documentation <https://keras.io/>`_.\n\nRunning a TensorFlow training script in SageMaker\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou run TensorFlow training scripts on SageMaker by creating a ``sagemaker.tensorflow.TensorFlow`` estimator.\nWhen you call ``fit`` on the ``TensorFlow`` estimator, a training job is created in SageMaker.\nThe following code sample shows how to train a custom TensorFlow script 'tf-train.py'.\n\n.. code:: python\n\n  from sagemaker.tensorflow import TensorFlow\n\n  tf_estimator = TensorFlow(entry_point='tf-train.py', role='SageMakerRole',\n                            training_steps=10000, evaluation_steps=100,\n                            train_instance_count=1, train_instance_type='ml.p2.xlarge')\n  tf_estimator.fit('s3://bucket/path/to/training/data')\n\nsagemaker.tensorflow.TensorFlow class\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``TensorFlow`` constructor takes both required and optional arguments.\n\nRequired arguments\n''''''''''''''''''\n\nThe following are required arguments to the TensorFlow constructor.\n\n-  ``entry_point (str)`` Path (absolute or relative) to the Python file which\n   should be executed as the entry point to training.\n-  ``role (str)`` An AWS IAM role (either name or full ARN). The Amazon\n   SageMaker training jobs and APIs that create Amazon SageMaker\n   endpoints use this role to access training data and model artifacts.\n   After the endpoint is created, the inference code might use the IAM\n   role, if accessing AWS resource.\n-  ``train_instance_count (int)`` Number of Amazon EC2 instances to use for\n   training.\n-  ``train_instance_type (str)`` Type of EC2 instance to use for training, for\n   example, 'ml.c4.xlarge'.\n- ``training_steps (int)`` Perform this many steps of training. ``None``, means train forever.\n- ``evaluation_steps (int)`` Perform this many steps of evaluation. ``None``, means\n  that evaluation runs until input from ``eval_input_fn`` is exhausted (or another exception is raised).\n\nOptional Arguments\n''''''''''''''''''\n\nThe following are optional arguments. When you create a ``TensorFlow`` object,\nyou can specify these as keyword arguments.\n\n-  ``source_dir (str)`` Path (absolute or relative) to a directory with any\n   other training source code dependencies aside from the entry point\n   file. Structure within this directory will be preserved when training\n   on SageMaker.\n-  ``requirements_file (str)`` Path to a ``requirements.txt`` file. The path should\n   be within and relative to ``source_dir``. This is a file containing a list of items to be\n   installed using pip install. Details on the format can be found in the\n   `Pip User Guide <https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format>`_.\n-  ``hyperparameters (dict[str,ANY])`` Hyperparameters that will be used for training.\n   Will be made accessible as a dict[] to the training code on\n   SageMaker. Some hyperparameters will be interpreted by TensorFlow and can be use to\n   fine tune training. See `Optional Hyperparameters <#optional-hyperparameters>`_.\n-  ``train_volume_size (int)`` Size in GB of the EBS volume to use for storing\n   input data during training. Must be large enough to the store training\n   data.\n-  ``train_max_run (int)`` Timeout in hours for training, after which Amazon\n   SageMaker terminates the job regardless of its current status.\n-  ``output_path (str)`` S3 location where you want the training result (model\n   artifacts and optional output files) saved. If not specified, results\n   are stored to a default bucket. If the bucket with the specific name\n   does not exist, the estimator creates the bucket during the ``fit``\n   method execution.\n-  ``checkpoint_path`` S3 location where checkpoint data will saved and restored.\n   The default location is *bucket_name/job_name/checkpoint*. If the location\n   already has checkpoints before the training starts, the model will restore\n   state from the last saved checkpoint. It is very useful to restart a training.\n   See `Restoring from checkpoints <#restoring-from-checkpoints>`_.\n-  ``output_kms_key`` Optional KMS key ID to optionally encrypt training\n   output with.\n-  ``base_job_name`` Name to assign for the training job that the ``fit``\n   method launches. If not specified, the estimator generates a default\n   job name, based on the training image name and current timestamp.\n\n\nOptional Hyperparameters\n''''''''''''''''''''''''\n\nThese hyperparameters are used by TensorFlow to fine tune the training.\nYou need to add them inside the hyperparameters dictionary in the\n``TensorFlow`` estimator constructor.\n\n**All versions**\n\n-  ``save_summary_steps (int)`` Save summaries every this many steps.\n-  ``save_checkpoints_secs (int)`` Save checkpoints every this many seconds. Can not be specified with ``save_checkpoints_steps``.\n-  ``save_checkpoints_steps (int)`` Save checkpoints every this many steps. Can not be specified with ``save_checkpoints_secs``.\n-  ``keep_checkpoint_max (int)`` The maximum number of recent checkpoint files to keep. As new files are created, older files are deleted. If None or 0, all checkpoint files are kept. Defaults to 5 (that is, the 5 most recent checkpoint files are kept.)\n-  ``keep_checkpoint_every_n_hours (int)`` Number of hours between each checkpoint to be saved. The default value of 10,000 hours effectively disables the feature.\n-  ``log_step_count_steps (int)`` The frequency, in number of global steps, that the global step/sec will be logged during training.\n\n**TensorFlow 1.6 and up**\n\n- ``start_delay_secs (int)`` See docs for this parameter in `tf.estimator.EvalSpec <https://www.tensorflow.org/api_docs/python/tf/estimator/EvalSpec>`_.\n- ``throttle_secs (int)`` See docs for this parameter in `tf.estimator.EvalSpec <https://www.tensorflow.org/api_docs/python/tf/estimator/EvalSpec>`_.\n\n**TensorFlow 1.4 and 1.5**\n\n-  ``eval_metrics (dict)`` ``dict`` of string, metric function. If `None`, default set is used. This should be ``None`` if the ``estimator`` is `tf.estimator.Estimator <https://www.tensorflow.org/api_docs/python/tf/estimator/Estimator>`_. If metrics are provided they will be *appended* to the default set.\n-  ``eval_delay_secs (int)`` Start evaluating after waiting for this many seconds.\n-  ``continuous_eval_throttle_secs (int)`` Do not re-evaluate unless the last evaluation was started at least this many seconds ago.\n-  ``min_eval_frequency (int)`` The minimum number of steps between evaluations. Of course, evaluation does not occur if no new snapshot is available, hence, this is the minimum. If 0, the evaluation will only happen after training. If None, defaults to 1000.\n-  ``delay_workers_by_global_step (bool)`` if ``True`` delays training workers based on global step instead of time.\n- ``train_steps_per_iteration (int)`` Perform this many (integer) number of train steps for each training-evaluation iteration. With a small value, the model will be evaluated more frequently with more checkpoints saved.\n\nCalling fit\n^^^^^^^^^^^\n\nYou start your training script by calling ``fit`` on a ``TensorFlow`` estimator. ``fit`` takes\nboth required and optional arguments.\n\nRequired argument\n'''''''''''''''''\n\n-  ``inputs (str)``: A S3 URI, for example ``s3://my-bucket/my-training-data``, which contains\n   the dataset that will be used for training. When the training job starts in SageMaker the\n   container will download the dataset. Both ``train_input_fn`` and ``eval_input_fn`` functions\n   have a parameter called ``training_dir`` which contains the directory inside the container\n   where the dataset was saved into. See `Creating train_input_fn and eval_input_fn functions`_.\n\nOptional arguments\n''''''''''''''''''\n\n-  ``wait (bool)``: Defaults to True, whether to block and wait for the\n   training script to complete before returning.\n   If set to False, it will return immediately, and can later be attached to.\n-  ``logs (bool)``: Defaults to True, whether to show logs produced by training\n   job in the Python session. Only meaningful when wait is True.\n- ``run_tensorboard_locally (bool)``: Defaults to False. Executes TensorBoard in a different\n  process with downloaded checkpoint information. Requires modules TensorBoard and AWS CLI.\n  installed. Terminates TensorBoard when the execution ends. See `Running TensorBoard`_.\n- ``job_name (str)``: Training job name. If not specified, the estimator generates a default job name,\n  based on the training image name and current timestamp.\n\nWhat happens when fit is called\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nCalling ``fit`` starts a SageMaker training job. The training job will execute the following.\n\n- Starts ``train_instance_count`` EC2 instances of the type ``train_instance_type``.\n- On each instance, it will do the following steps:\n\n  - starts a Docker container optimized for TensorFlow, see `SageMaker TensorFlow Docker containers`_.\n  - downloads the dataset.\n  - setup up distributed training.\n  - starts asynchronous training, executing the ``model_fn`` function defined in your script\n    in **training** mode; i.e., ``features`` and ``labels`` are fed by a batch of the\n    training dataset defined by ``train_input_fn``. See `Creating train_input_fn and eval_input_fn functions`_.\n\nThe training job finishes after the number of training steps reaches the value defined by\nthe ``TensorFlow`` estimator parameter ``training_steps`` is finished or when the training\njob execution time reaches the ``TensorFlow`` estimator parameter ``train_max_run``.\n\nWhen the training job finishes, a `TensorFlow serving <https://www.tensorflow.org/serving/serving_basic>`_\nwith the result of the training is generated and saved to the S3 location defined by\nthe ``TensorFlow`` estimator parameter ``output_path``.\n\n\nIf the ``wait=False`` flag is passed to ``fit``, then it will return immediately. The training job will continue running\nasynchronously. At a later time, a Tensorflow Estimator can be obtained by attaching to the existing training job. If\nthe training job is not finished it will start showing the standard output of training and wait until it completes.\nAfter attaching, the estimator can be deployed as usual.\n\n.. code:: python\n\n    tf_estimator.fit(your_input_data, wait=False)\n    training_job_name = tf_estimator.latest_training_job.name\n\n    # after some time, or in a separate python notebook, we can attach to it again.\n\n    tf_estimator = TensorFlow.attach(training_job_name=training_job_name)\n\n\nThe evaluation process\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nDuring the training job, the first EC2 instance that is executing the training is named ``master``. All the other instances are called ``workers``.\n\nAll instances execute the training loop, feeding the ``model_fn`` with ``train_input_fn``.\nEvery ``min_eval_frequency`` steps (see `Optional Hyperparameters`_), the ``master`` instance\nwill execute the ``model_fn`` in **evaluation** mode; i.e., ``features`` and ``labels`` are\nfed with the evaluation dataset defined by ``eval_input_fn``. See `Creating train_input_fn and eval_input_fn functions`_.\n\nFor more information on training and evaluation process, see `tf.estimator.train_and_evaluate <https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/python/estimator/training.py#L256>`_.\n\nFor more information on fit, see `SageMaker Python SDK Overview <#sagemaker-python-sdk-overview>`_.\n\nTensorFlow serving models\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAfter your training job is complete in SageMaker and the ``fit`` call ends, the training job\nwill generate a `TensorFlow serving <https://www.tensorflow.org/serving/serving_basic>`_\nmodel ready for deployment. Your TensorFlow serving model will be available in the S3 location\n``output_path`` that you specified when you created your `sagemaker.tensorflow.TensorFlow`\nestimator.\n\nRestoring from checkpoints\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWhile your training job is executing, TensorFlow will generate checkpoints and save them in the S3\nlocation defined by ``checkpoint_path`` parameter in the ``TensorFlow`` constructor.\nThese checkpoints can be used to restore a previous session or to evaluate the current training using ``TensorBoard``.\n\nTo restore a previous session, you just need to create a new ``sagemaker.tensorflow.TensorFlow``\nestimator pointing to the previous checkpoint path:\n\n.. code:: python\n\n  previous_checkpoint_path = 's3://location/of/my/previous/generated/checkpoints'\n\n  tf_estimator = TensorFlow('tf-train.py', role='SageMakerRole',\n                            checkpoint_path=previous_checkpoint_path\n                            training_steps=10000, evaluation_steps=100,\n                            train_instance_count=1, train_instance_type='ml.p2.xlarge')\n  tf_estimator.fit('s3://bucket/path/to/training/data')\n\n\nRunning TensorBoard\n^^^^^^^^^^^^^^^^^^^\n\nWhen the ``fit`` parameter ``run_tensorboard_locally`` is set ``True``, all the checkpoint data\nlocated in ``checkpoint_path`` will be downloaded to a local temporary folder and a local\n``TensorBoard`` application will be watching that temporary folder.\nEvery time a new checkpoint is created by the training job in the S3 bucket, ``fit`` will download that checkpoint to the same temporary folder and update ``TensorBoard``.\n\nWhen the ``fit`` method starts the training, it will log the port that ``TensorBoard`` is using\nto display metrics. The default port is **6006**, but another port can be chosen depending on\navailability. The port number will increase until finds an available port. After that, the port\nnumber will be printed in stdout.\n\nIt takes a few minutes to provision containers and start the training job. TensorBoard will start to display metrics shortly after that.\n\nYou can access TensorBoard locally at http://localhost:6006 or using your SakeMaker workspace at\n`https*workspace_base_url*proxy/6006/ <proxy/6006/>`_ (TensorBoard will not work if you forget to put the slash,\n'/', in end of the url). If TensorBoard started on a different port, adjust these URLs to match.\n\nNote that TensorBoard is not supported when passing wait=False to ``fit``.\n\n\nDeploying TensorFlow Serving models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAfter a ``TensorFlow`` Estimator has been fit, it saves a ``TensorFlow Serving`` model in\nthe S3 location defined by ``output_path``. You can call ``deploy`` on a ``TensorFlow``\nestimator to create a SageMaker Endpoint.\n\nA common usage of the ``deploy`` method, after the ``TensorFlow`` estimator has been fit look\nlike this:\n\n.. code:: python\n\n  from sagemaker.tensorflow import TensorFlow\n\n  estimator = TensorFlow(entry_point='tf-train.py', ..., train_instance_count=1, train_instance_type='ml.c4.xlarge')\n\n  estimator.fit(inputs)\n\n  predictor = estimator.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')\n\n\nThe code block above deploys a SageMaker Endpoint with one instance of the type 'ml.c4.xlarge'.\n\nWhat happens when deploy is called\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nCalling ``deploy`` starts the process of creating a SageMaker Endpoint. This process includes the following steps.\n\n- Starts ``initial_instance_count`` EC2 instances of the type ``instance_type``.\n- On each instance, it will do the following steps:\n\n  - start a Docker container optimized for TensorFlow Serving, see `SageMaker TensorFlow Docker containers`_.\n  - start a production ready HTTP Server which supports protobuf, JSON and CSV content types, see `Making predictions against a SageMaker Endpoint`_.\n  - start a `TensorFlow Serving` process\n\nWhen the ``deploy`` call finishes, the created SageMaker Endpoint is ready for prediction requests. The next chapter will explain\nhow to make predictions against the Endpoint, how to use different content-types in your requests, and how to extend the Web server\nfunctionality.\n\n\nMaking predictions against a SageMaker Endpoint\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe following code adds a prediction request to the previous code example:\n\n.. code:: python\n\n  estimator = TensorFlow(entry_point='tf-train.py', ..., train_instance_count=1, train_instance_type='ml.c4.xlarge')\n\n  estimator.fit(inputs)\n\n  predictor = estimator.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')\n\n  result = predictor.predict([6.4, 3.2, 4.5, 1.5])\n\nThe ``predictor.predict`` method call takes one parameter, the input ``data`` for which you want the ``SageMaker Endpoint``\nto provide inference. ``predict`` will serialize the input data, and send it in as request to the ``SageMaker Endpoint`` by\nan ``InvokeEndpoint`` SageMaker operation. ``InvokeEndpoint`` operation requests can be made by ``predictor.predict``, by\nboto3 ``SageMaker.runtime`` client or by AWS CLI.\n\nThe ``SageMaker Endpoint`` web server will process the request, make an inference using the deployed model, and return a response.\nThe ``result`` returned by ``predict`` is\na Python dictionary with the model prediction. In the code example above, the prediction ``result`` looks like this:\n\n.. code:: python\n\n  {'result':\n    {'classifications': [\n      {'classes': [\n        {'label': '0', 'score': 0.0012890376383438706},\n        {'label': '1', 'score': 0.9814321994781494},\n        {'label': '2', 'score': 0.017278732731938362}\n      ]}\n    ]}\n  }\n\nSpecifying the output of a prediction request\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe format of the prediction ``result`` is determined by the parameter ``export_outputs`` of the `tf.estimator.EstimatorSpec <https://www.tensorflow.org/api_docs/python/tf/estimator/EstimatorSpec>`_ that you returned when you created your ``model_fn``, see\n`Example of a complete model_fn`_ for an example of ``export_outputs``.\n\nMore information on how to create ``export_outputs`` can find in `specifying the outputs of a custom model <https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/docs_src/programmers_guide/saved_model.md#specifying-the-outputs-of-a-custom-model>`_.\n\nEndpoint prediction request handling\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhenever a prediction request is made to a SageMaker Endpoint via a ``InvokeEndpoint`` SageMaker operation, the request will\nbe deserialized by the web server, sent to TensorFlow Serving, and serialized back to the client as response.\n\nThe TensorFlow Web server breaks request handling into three steps:\n\n-  input processing,\n-  TensorFlow Serving prediction, and\n-  output processing.\n\nThe SageMaker Endpoint provides default input and output processing, which support by default JSON, CSV, and protobuf requests.\nThis process looks like this:\n\n.. code:: python\n\n    # Deserialize the Invoke request body into an object we can perform prediction on\n    deserialized_input = input_fn(serialized_input, request_content_type)\n\n    # Perform prediction on the deserialized object, with the loaded model\n    prediction_result = make_tensorflow_serving_prediction(deserialized_input)\n\n    # Serialize the prediction result into the desired response content type\n    serialized_output = output_fn(prediction_result, accepts)\n\nThe common functionality can be extended by the addiction of the following two functions to your training script:\n\nOverriding input preprocessing with an ``input_fn``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn example of ``input_fn`` for the content-type \"application/python-pickle\" can be seen below:\n\n.. code:: python\n\n    import numpy as np\n\n    def input_fn(serialized_input, content_type):\n        \"\"\"An input_fn that loads a pickled object\"\"\"\n        if request_content_type == \"application/python-pickle\":\n            deserialized_input = pickle.loads(serialized_input)\n            return deserialized_input\n        else:\n            # Handle other content-types here or raise an Exception\n            # if the content type is not supported.\n            pass\n\nOverriding output postprocessing with an ``output_fn``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAn example of ``output_fn`` for the accept type \"application/python-pickle\" can be seen below:\n\n.. code:: python\n\n    import numpy as np\n\n    def output_fn(prediction_result, accepts):\n        \"\"\"An output_fn that dumps a pickled object as response\"\"\"\n        if request_content_type == \"application/python-pickle\":\n            return np.dumps(prediction_result)\n        else:\n            # Handle other content-types here or raise an Exception\n            # if the content type is not supported.\n            pass\n\nA example with ``input_fn`` and ``output_fn`` above can be found in\n`here <https://github.com/aws/sagemaker-python-sdk/blob/master/tests/data/cifar_10/source/resnet_cifar_10.py#L143>`_.\n\nSageMaker TensorFlow Docker containers\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe TensorFlow Docker images support Python 2.7 and have the following Python modules installed:\n\n+------------------------+------------------+------------------+------------------+\n| Dependencies           | tensorflow 1.4.1 | tensorflow 1.5.0 | tensorflow 1.6.0 |\n+------------------------+------------------+------------------+------------------+\n| boto3                  |            1.4.7 |           1.5.22 |          1.6.21  |\n+------------------------+------------------+------------------+------------------+\n| botocore               |           1.5.92 |           1.8.36 |          1.9.21  |\n+------------------------+------------------+------------------+------------------+\n| grpcio                 |            1.7.0 |            1.9.0 |          1.10.0  |\n+------------------------+------------------+------------------+------------------+\n| numpy                  |           1.13.3 |           1.14.0 |          1.14.2  |\n+------------------------+------------------+------------------+------------------+\n| pandas                 |           0.21.0 |           0.22.0 |          0.22.0  |\n+------------------------+------------------+------------------+------------------+\n| protobuf               |            3.4.0 |            3.5.1 |          3.5.2   |\n+------------------------+------------------+------------------+------------------+\n| scikit-learn           |           0.19.1 |           0.19.1 |          0.19.1  |\n+------------------------+------------------+------------------+------------------+\n| scipy                  |            1.0.0 |            1.0.0 |          1.0.1   |\n+------------------------+------------------+------------------+------------------+\n| sklearn                |              0.0 |              0.0 |          0.0     |\n+------------------------+------------------+------------------+------------------+\n| tensorflow             |            1.4.1 |            1.5.0 |          1.6.0   |\n+------------------------+------------------+------------------+------------------+\n| tensorflow-serving-api |            1.4.0 |            1.5.0 |          1.5.0   |\n+------------------------+------------------+------------------+------------------+\n\nThe Docker images extend Ubuntu 16.04.\n\nYou can select version of TensorFlow by passing a ``framework_version`` keyword arg to the TensorFlow Estimator constructor. Currently supported versions are listed in the table above. You can also set ``framework_version`` to only specify major and minor version, e.g ``1.6``, which will cause your training script to be run on the latest supported patch version of that minor version, which in this example would be 1.6.0.\n\nYou can visit the SageMaker TensorFlow containers repository here: https://github.com/aws/sagemaker-tensorflow-containers/\n\nChainer SageMaker Estimators\n-------------------------------\n\nWith Chainer Estimators, you can train and host Chainer models on Amazon SageMaker.\n\nSupported versions of Chainer: ``4.0.0``\n\nYou can visit the Chainer repository at https://github.com/chainer/chainer.\n\nTraining with Chainer\n~~~~~~~~~~~~~~~~~~~\n\nTraining Chainer models using ``Chainer`` Estimators is a two-step process:\n\n1. Prepare a Chainer script to run on SageMaker\n2. Run this script on SageMaker via a ``Chainer`` Estimator.\n\n\nFirst, you prepare your training script, then second, you run this on SageMaker via a ``Chainer`` Estimator.\nYou should prepare your script in a separate source file than the notebook, terminal session, or source file you're\nusing to submit the script to SageMaker via a ``Chainer`` Estimator.\n\nSuppose that you already have an Chainer training script called\n``chainer-train.py``. You can run this script in SageMaker as follows:\n\n.. code:: python\n\n    from sagemaker.chainer import Chainer\n    chainer_estimator = Chainer(entry_point=\"chainer-train.py\",\n                                role=\"SageMakerRole\",\n                                train_instance_type=\"ml.p3.2xlarge\",\n                                train_instance_count=1)\n    chainer_estimator.fit(\"s3://bucket/path/to/training/data\")\n\nWhere the S3 URL is a path to your training data, within Amazon S3. The constructor keyword arguments define how\nSageMaker runs your training script and are discussed in detail in a later section.\n\nIn the following sections, we'll discuss how to prepare a training script for execution on SageMaker,\nthen how to run that script on SageMaker using a ``Chainer`` Estimator.\n\nPreparing the Chainer training script\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYour Chainer training script must be a Python 2.7 or 3.5 compatible source file.\n\nThe training script is very similar to a training script you might run outside of SageMaker, but you\ncan access useful properties about the training environment through various environment variables, such as\n\n* ``SM_MODEL_DIR``: A string representing the path to the directory to write model artifacts to.\n  These artifacts are uploaded to S3 for model hosting.\n* ``SM_NUM_GPUS``: An integer representing the number of GPUs available to the host.\n* ``SM_OUTPUT_DATA_DIR``: A string representing the filesystem path to write output artifacts to. Output artifacts may\n  include checkpoints, graphs, and other files to save, not including model artifacts. These artifacts are compressed\n  and uploaded to S3 to the same S3 prefix as the model artifacts.\n\nSupposing two input channels, 'train' and 'test', were used in the call to the Chainer estimator's ``fit()`` method,\nthe following will be set, following the format \"SM_CHANNEL_[channel_name]\":\n\n* ``SM_CHANNEL_TRAIN``: A string representing the path to the directory containing data in the 'train' channel\n* ``SM_CHANNEL_TEST``: Same as above, but for the 'test' channel.\n\nA typical training script loads data from the input channels, configures training with hyperparameters, trains a model,\nand saves a model to model_dir so that it can be hosted later. Hyperparameters are passed to your script as arguments\nand can be retrieved with an argparse.ArgumentParser instance. For example, a training script might start\nwith the following:\n\n.. code:: python\n\n    import argparse\n    import os\n\n    if __name__ =='__main__':\n\n        parser = argparse.ArgumentParser()\n\n        # hyperparameters sent by the client are passed as command-line arguments to the script.\n        parser.add_argument('--epochs', type=int, default=50)\n        parser.add_argument('--batch-size', type=int, default=64)\n        parser.add_argument('--learning-rate', type=float, default=0.05)\n\n        # Data, model, and output directories\n        parser.add_argument('--output-data-dir', type=str, default=os.environ['SM_OUTPUT_DATA_DIR'])\n        parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR'])\n        parser.add_argument('--train', type=str, default=os.environ['SM_CHANNEL_TRAIN'])\n        parser.add_argument('--test', type=str, default=os.environ['SM_CHANNEL_TEST'])\n\n        args, _ = parser.parse_known_args()\n\n        # ... load from args.train and args.test, train a model, write model to args.model_dir.\n\nBecause the SageMaker imports your training script, you should put your training code in a main guard\n(``if __name__=='__main__':``) if you are using the same script to host your model, so that SageMaker does not\ninadvertently run your training code at the wrong point in execution.\n\nFor more on training environment variables, please visit https://github.com/aws/sagemaker-containers.\n\nRunning a Chainer training script in SageMaker\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou run Chainer training scripts on SageMaker by creating ``Chainer`` Estimators.\nSageMaker training of your script is invoked when you call ``fit`` on a ``Chainer`` Estimator.\nThe following code sample shows how you train a custom Chainer script \"chainer-train.py\", passing\nin three hyperparameters ('epochs', 'batch-size', and 'learning-rate'), and using two input channel\ndirectories ('train' and 'test').\n\n.. code:: python\n\n    chainer_estimator = Chainer(\"chainer-train.py\",\n                            train_instance_type=\"ml.p3.2xlarge\",\n                            train_instance_count=1,\n                            hyperparameters = {'epochs': 20, 'batch-size': 64, 'learning-rate':0.1})\n    chainer_estimator.fit({'train': 's3://my-data-bucket/path/to/my/training/data',\n                       'test': 's3://my-data-bucket/path/to/my/test/data'})\n\n\nChainer Estimators\n^^^^^^^^^^^^^^^^\n\nThe `Chainer` constructor takes both required and optional arguments.\n\nRequired arguments\n''''''''''''''''''\n\nThe following are required arguments to the ``Chainer`` constructor. When you create a Chainer object, you must include\nthese in the constructor, either positionally or as keyword arguments.\n\n-  ``entry_point`` Path (absolute or relative) to the Python file which\n   should be executed as the entry point to training.\n-  ``role`` An AWS IAM role (either name or full ARN). The Amazon\n   SageMaker training jobs and APIs that create Amazon SageMaker\n   endpoints use this role to access training data and model artifacts.\n   After the endpoint is created, the inference code might use the IAM\n   role, if accessing AWS resource.\n-  ``train_instance_count`` Number of Amazon EC2 instances to use for\n   training.\n-  ``train_instance_type`` Type of EC2 instance to use for training, for\n   example, 'ml.m4.xlarge'.\n\nOptional arguments\n''''''''''''''''''\n\nThe following are optional arguments. When you create a ``Chainer`` object, you can specify these as keyword arguments.\n\n-  ``source_dir`` Path (absolute or relative) to a directory with any\n   other training source code dependencies aside from the entry point\n   file. Structure within this directory will be preserved when training\n   on SageMaker.\n-  ``hyperparameters`` Hyperparameters that will be used for training.\n   Will be made accessible as a dict[str, str] to the training code on\n   SageMaker. For convenience, accepts other types besides str, but\n   str() will be called on keys and values to convert them before\n   training.\n-  ``py_version`` Python version you want to use for executing your\n   model training code.\n-  ``train_volume_size`` Size in GB of the EBS volume to use for storing\n   input data during training. Must be large enough to store training\n   data if input_mode='File' is used (which is the default).\n-  ``train_max_run`` Timeout in hours for training, after which Amazon\n   SageMaker terminates the job regardless of its current status.\n-  ``input_mode`` The input mode that the algorithm supports. Valid\n   modes: 'File' - Amazon SageMaker copies the training dataset from the\n   s3 location to a directory in the Docker container. 'Pipe' - Amazon\n   SageMaker streams data directly from s3 to the container via a Unix\n   named pipe.\n-  ``output_path`` s3 location where you want the training result (model\n   artifacts and optional output files) saved. If not specified, results\n   are stored to a default bucket. If the bucket with the specific name\n   does not exist, the estimator creates the bucket during the fit()\n   method execution.\n-  ``output_kms_key`` Optional KMS key ID to optionally encrypt training\n   output with.\n-  ``job_name`` Name to assign for the training job that the fit()\n   method launches. If not specified, the estimator generates a default\n   job name, based on the training image name and current timestamp\n\n\nDistributed Chainer Training\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\nChainer allows you to train a model on multiple nodes using ChainerMN_, which distributes training with MPI.\n\n.. _ChainerMN: https://github.com/chainer/chainermn\n\nIn order to run distributed Chainer training on SageMaker, your training script should use a ``chainermn`` Communicator\nobject to coordinate training between multiple hosts.\n\nSageMaker runs your script with ``mpirun`` if ``train_instance_count`` is greater than two.\nThe following are optional arguments modify how MPI runs your distributed training script.\n\n-  ``use_mpi`` Boolean that overrides whether to run your training script with MPI.\n-  ``num_processes`` Integer that determines how many total processes to run with MPI. By default, this is equal to ``process_slots_per_host`` times the number of nodes.\n-  ``process_slots_per_host`` Integer that determines how many processes can be run on each host. By default, this is equal to one process per host on CPU instances, or one process per GPU on GPU instances.\n-  ``additional_mpi_options`` String of additional options to pass to the ``mpirun`` command.\n\n\nCalling fit\n^^^^^^^^^^^\n\nYou start your training script by calling ``fit`` on a ``Chainer`` Estimator. ``fit`` takes both required and optional\narguments.\n\nRequired arguments\n''''''''''''''''''\n\n-  ``inputs``: This can take one of the following forms: A string\n   s3 URI, for example ``s3://my-bucket/my-training-data``. In this\n   case, the s3 objects rooted at the ``my-training-data`` prefix will\n   be available in the default ``train`` channel. A dict from\n   string channel names to s3 URIs. In this case, the objects rooted at\n   each s3 prefix will available as files in each channel directory.\n\nFor example:\n\n.. code:: python\n\n    {'train':'s3://my-bucket/my-training-data',\n     'eval':'s3://my-bucket/my-evaluation-data'}\n\n.. optional-arguments-1:\n\nOptional arguments\n''''''''''''''''''\n\n-  ``wait``: Defaults to True, whether to block and wait for the\n   training script to complete before returning.\n-  ``logs``: Defaults to True, whether to show logs produced by training\n   job in the Python session. Only meaningful when wait is True.\n\n\nSaving models\n~~~~~~~~~~~~~\n\nIn order to save your trained Chainer model for deployment on SageMaker, your training script should save your model\nto a certain filesystem path called `model_dir`. This value is accessible through the environment variable\n``SM_MODEL_DIR``. The following code demonstrates how to save a trained Chainer model named ``model`` as\n``model.npz`` at the :\n\n.. code:: python\n    import chainer\n    import argparse\n    import os\n\n    if __name__=='__main__':\n        # default to the value in environment variable `SM_MODEL_DIR`. Using args makes the script more portable.\n        parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR'])\n        args, _ = parser.parse_known_args()\n\n        # ... train `model`, then save it to `model_dir`\n        chainer.serializers.save_npz(os.path.join(args.model_dir, 'model.npz'), model)\n\nAfter your training job is complete, SageMaker will compress and upload the serialized model to S3, and your model data\nwill available in the s3 ``output_path`` you specified when you created the Chainer Estimator.\n\nDeploying Chainer models\n~~~~~~~~~~~~~~~~~~~~~~\n\nAfter an Chainer Estimator has been fit, you can host the newly created model in SageMaker.\n\nAfter calling ``fit``, you can call ``deploy`` on a ``Chainer`` Estimator to create a SageMaker Endpoint.\nThe Endpoint runs a SageMaker-provided Chainer model server and hosts the model produced by your training script,\nwhich was run when you called ``fit``. This was the model you saved to ``model_dir``.\n\n``deploy`` returns a ``Predictor`` object, which you can use to do inference on the Endpoint hosting your Chainer model.\nEach ``Predictor`` provides a ``predict`` method which can do inference with numpy arrays or Python lists.\nInference arrays or lists are serialized and sent to the Chainer model server by an ``InvokeEndpoint`` SageMaker\noperation.\n\n``predict`` returns the result of inference against your model. By default, the inference result a NumPy array.\n\n.. code:: python\n\n    # Train my estimator\n    chainer_estimator = Chainer(entry_point=\"train_and_deploy.py\",\n                            train_instance_type=\"ml.p3.2xlarge\",\n                            train_instance_count=1)\n    chainer_estimator.fit(\"s3://my_bucket/my_training_data/\")\n\n    # Deploy my estimator to a SageMaker Endpoint and get a Predictor\n    predictor = chainer_estimator.deploy(instance_type=\"ml.m4.xlarge\",\n                                         initial_instance_count=1)\n\n    # `data` is a NumPy array or a Python list.\n    # `response` is a NumPy array.\n    response = predictor.predict(data)\n\nYou use the SageMaker Chainer model server to host your Chainer model when you call ``deploy`` on an ``Chainer``\nEstimator. The model server runs inside a SageMaker Endpoint, which your call to ``deploy`` creates.\nYou can access the name of the Endpoint by the ``name`` property on the returned ``Predictor``.\n\n\nThe SageMaker Chainer Model Server\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe Chainer Endpoint you create with ``deploy`` runs a SageMaker Chainer model server.\nThe model server loads the model that was saved by your training script and performs inference on the model in response\nto SageMaker InvokeEndpoint API calls.\n\nYou can configure two components of the SageMaker Chainer model server: Model loading and model serving.\nModel loading is the process of deserializing your saved model back into an Chainer model.\nServing is the process of translating InvokeEndpoint requests to inference calls on the loaded model.\n\nYou configure the Chainer model server by defining functions in the Python source file you passed to the Chainer constructor.\n\nModel loading\n^^^^^^^^^^^^^\n\nBefore a model can be served, it must be loaded. The SageMaker Chainer model server loads your model by invoking a\n``model_fn`` function that you must provide in your script. The ``model_fn`` should have the following signature:\n\n.. code:: python\n\n    def model_fn(model_dir)\n\nSageMaker will inject the directory where your model files and sub-directories, saved by ``save``, have been mounted.\nYour model function should return a model object that can be used for model serving.\n\nSageMaker provides automated serving functions that work with Gluon API ``net`` objects and Module API ``Module`` objects. If you return either of these types of objects, then you will be able to use the default serving request handling functions.\n\nThe following code-snippet shows an example ``model_fn`` implementation.\nThis loads returns a Chainer Classifier from a multi-layer perceptron class ``MLP`` that extends ``chainer.Chain``.\nIt loads the model parameters from a ``model.npz`` file in the SageMaker model directory ``model_dir``.\n\n.. code:: python\n\n    import chainer\n    import os\n\n    def model_fn(model_dir):\n        chainer.config.train = False\n        model = chainer.links.Classifier(MLP(1000, 10))\n        chainer.serializers.load_npz(os.path.join(model_dir, 'model.npz'), model)\n        return model.predictor\n\nModel serving\n^^^^^^^^^^^^^\n\nAfter the SageMaker model server has loaded your model by calling ``model_fn``, SageMaker will serve your model.\nModel serving is the process of responding to inference requests, received by SageMaker InvokeEndpoint API calls.\nThe SageMaker Chainer model server breaks request handling into three steps:\n\n\n-  input processing,\n-  prediction, and\n-  output processing.\n\nIn a similar way to model loading, you configure these steps by defining functions in your Python source file.\n\nEach step involves invoking a python function, with information about the request and the return-value from the previous\nfunction in the chain. Inside the SageMaker Chainer model server, the process looks like:\n\n.. code:: python\n\n    # Deserialize the Invoke request body into an object we can perform prediction on\n    input_object = input_fn(request_body, request_content_type)\n\n    # Perform prediction on the deserialized object, with the loaded model\n    prediction = predict_fn(input_object, model)\n\n    # Serialize the prediction result into the desired response content type\n    output = output_fn(prediction, response_content_type)\n\nThe above code-sample shows the three function definitions:\n\n-  ``input_fn``: Takes request data and deserializes the data into an\n   object for prediction.\n-  ``predict_fn``: Takes the deserialized request object and performs\n   inference against the loaded model.\n-  ``output_fn``: Takes the result of prediction and serializes this\n   according to the response content type.\n\nThe SageMaker Chainer model server provides default implementations of these functions.\nYou can provide your own implementations for these functions in your hosting script.\nIf you omit any definition then the SageMaker Chainer model server will use its default implementation for that\nfunction.\n\nThe ``RealTimePredictor`` used by Chainer in the SageMaker Python SDK serializes NumPy arrays to the NPY_ format\nby default, with Content-Type ``application/x-npy``. The SageMaker Chainer model server can deserialize NPY-formatted\ndata (along with JSON and CSV data).\n\n.. _NPY https://docs.scipy.org/doc/numpy/neps/npy-format.html\n\nIf you rely solely on the SageMaker Chainer model server defaults, you get the following functionality:\n\n-  Prediction on models that implement the ``__call__`` method\n-  Serialization and deserialization of NumPy arrays.\n\nThe default ``input_fn`` and ``output_fn`` are meant to make it easy to predict on NumPy arrays. If your model expects\na NumPy array and returns a NumPy array, then these functions do not have to be overridden when sending NPY-formatted\ndata.\n\nIn the following sections we describe the default implementations of input_fn, predict_fn, and output_fn.\nWe describe the input arguments and expected return types of each, so you can define your own implementations.\n\nInput processing\n''''''''''''''''\n\nWhen an InvokeEndpoint operation is made against an Endpoint running a SageMaker Chainer model server,\nthe model server receives two pieces of information:\n\n-  The request Content-Type, for example \"application/x-npy\"\n-  The request data body, a byte array which is at most 5 MB (5 \\* 1024\n   \\* 1024 bytes) in size.\n\nThe SageMaker Chainer model server will invoke an \"input_fn\" function in your hosting script,\npassing in this information. If you define an ``input_fn`` function definition,\nit should return an object that can be passed to ``predict_fn`` and have the following signature:\n\n.. code:: python\n\n    def input_fn(request_body, request_content_type)\n\nWhere ``request_body`` is a byte buffer and ``request_content_type`` is a Python string\n\nThe SageMaker Chainer model server provides a default implementation of ``input_fn``.\nThis function deserializes JSON, CSV, or NPY encoded data into a NumPy array.\n\nDefault NPY deserialization requires ``request_body`` to follow the NPY_ format. For Chainer, the Python SDK\ndefaults to sending prediction requests with this format.\n\nDefault json deserialization requires ``request_body`` contain a single json list.\nSending multiple json objects within the same ``request_body`` is not supported.\nThe list must have a dimensionality compatible with the model loaded in ``model_fn``.\nThe list's shape must be identical to the model's input shape, for all dimensions after the first (which first\ndimension is the batch size).\n\nDefault csv deserialization requires ``request_body`` contain one or more lines of CSV numerical data.\nThe data is loaded into a two-dimensional array, where each line break defines the boundaries of the first dimension.\n\nThe example below shows a custom ``input_fn`` for preparing pickled NumPy arrays.\n\n.. code:: python\n\n    import numpy as np\n\n    def input_fn(request_body, request_content_type):\n        \"\"\"An input_fn that loads a pickled numpy array\"\"\"\n        if request_content_type == \"application/python-pickle\":\n            array = np.load(StringIO(request_body))\n            return array\n        else:\n            # Handle other content-types here or raise an Exception\n            # if the content type is not supported.\n            pass\n\n\n\nPrediction\n''''''''''\n\nAfter the inference request has been deserialized by ``input_fn``, the SageMaker Chainer model server invokes\n``predict_fn`` on the return value of ``input_fn``.\n\nAs with ``input_fn``, you can define your own ``predict_fn`` or use the SageMaker Chainer model server default.\n\nThe ``predict_fn`` function has the following signature:\n\n.. code:: python\n\n    def predict_fn(input_object, model)\n\nWhere ``input_object`` is the object returned from ``input_fn`` and\n``model`` is the model loaded by ``model_fn``.\n\nThe default implementation of ``predict_fn`` invokes the loaded model's ``__call__`` function on ``input_object``,\nand returns the resulting value. The return-type should be a NumPy array to be compatible with the default\n``output_fn``.\n\nThe example below shows an overridden ``predict_fn``. This model accepts a Python list and returns a tuple of\nbounding boxes, labels, and scores from the model in a NumPy array. This ``predict_fn`` can rely on the default\n``input_fn`` and ``output_fn`` because ``input_data`` is a NumPy array, and the return value of this function is\na NumPy array.\n\n.. code:: python\n\n    import chainer\n    import numpy as np\n\n    def predict_fn(input_data, model):\n        with chainer.using_config('train', False), chainer.no_backprop_mode():\n            bboxes, labels, scores = model.predict([input_data])\n            bbox, label, score = bboxes[0], labels[0], scores[0]\n            return np.array([bbox.tolist(), label, score])\n\nIf you implement your own prediction function, you should take care to ensure that:\n\n-  The first argument is expected to be the return value from input_fn.\n   If you use the default input_fn, this will be a NumPy array.\n-  The second argument is the loaded model.\n-  The return value should be of the correct type to be passed as the\n   first argument to ``output_fn``. If you use the default\n   ``output_fn``, this should be a NumPy array.\n\nOutput processing\n'''''''''''''''''\n\nAfter invoking ``predict_fn``, the model server invokes ``output_fn``, passing in the return-value from ``predict_fn``\nand the InvokeEndpoint requested response content-type.\n\nThe ``output_fn`` has the following signature:\n\n.. code:: python\n\n    def output_fn(prediction, content_type)\n\nWhere ``prediction`` is the result of invoking ``predict_fn`` and\n``content_type`` is the InvokeEndpoint requested response content-type.\nThe function should return a byte array of data serialized to content_type.\n\nThe default implementation expects ``prediction`` to be an NumPy and can serialize the result to JSON, CSV, or NPY.\nIt accepts response content types of \"application/json\", \"text/csv\", and \"application/x-npy\".\n\nWorking with existing model data and training jobs\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAttaching to existing training jobs\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can attach an Chainer Estimator to an existing training job using the\n``attach`` method.\n\n.. code:: python\n\n    my_training_job_name = \"MyAwesomeChainerTrainingJob\"\n    chainer_estimator = Chainer.attach(my_training_job_name)\n\nAfter attaching, if the training job is in a Complete status, it can be\n``deploy``\\ ed to create a SageMaker Endpoint and return a\n``Predictor``. If the training job is in progress,\nattach will block and display log messages from the training job, until the training job completes.\n\nThe ``attach`` method accepts the following arguments:\n\n-  ``training_job_name (str):`` The name of the training job to attach\n   to.\n-  ``sagemaker_session (sagemaker.Session or None):`` The Session used\n   to interact with SageMaker\n\nDeploying Endpoints from model data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAs well as attaching to existing training jobs, you can deploy models directly from model data in S3.\nThe following code sample shows how to do this, using the ``ChainerModel`` class.\n\n.. code:: python\n\n    chainer_model = ChainerModel(model_data=\"s3://bucket/model.tar.gz\", role=\"SageMakerRole\",\n        entry_point=\"transform_script.py\")\n\n    predictor = chainer_model.deploy(instance_type=\"ml.c4.xlarge\", initial_instance_count=1)\n\nThe ChainerModel constructor takes the following arguments:\n\n-  ``model_data (str):`` An S3 location of a SageMaker model data\n   .tar.gz file\n-  ``image (str):`` A Docker image URI\n-  ``role (str):`` An IAM role name or Arn for SageMaker to access AWS\n   resources on your behalf.\n-  ``predictor_cls (callable[string,sagemaker.Session]):`` A function to\n   call to create a predictor. If not None, ``deploy`` will return the\n   result of invoking this function on the created endpoint name\n-  ``env (dict[string,string]):`` Environment variables to run with\n   ``image`` when hosted in SageMaker.\n-  ``name (str):`` The model name. If None, a default model name will be\n   selected on each ``deploy.``\n-  ``entry_point (str):`` Path (absolute or relative) to the Python file\n   which should be executed as the entry point to model hosting.\n-  ``source_dir (str):`` Optional. Path (absolute or relative) to a\n   directory with any other training source code dependencies aside from\n   tne entry point file. Structure within this directory will be\n   preserved when training on SageMaker.\n-  ``enable_cloudwatch_metrics (boolean):`` Optional. If true, training\n   and hosting containers will generate Cloudwatch metrics under the\n   AWS/SageMakerContainer namespace.\n-  ``container_log_level (int):`` Log level to use within the container.\n   Valid values are defined in the Python logging module.\n-  ``code_location (str):`` Optional. Name of the S3 bucket where your\n   custom code will be uploaded to. If not specified, will use the\n   SageMaker default bucket created by sagemaker.Session.\n-  ``sagemaker_session (sagemaker.Session):`` The SageMaker Session\n   object, used for SageMaker interaction\"\"\"\n\nYour model data must be a .tar.gz file in S3. SageMaker Training Job model data is saved to .tar.gz files in S3,\nhowever if you have local data you want to deploy, you can prepare the data yourself.\n\nAssuming you have a local directory containg your model data named \"my_model\" you can tar and gzip compress the file and\nupload to S3 using the following commands:\n\n::\n\n    tar -czf model.tar.gz my_model\n    aws s3 cp model.tar.gz s3://my-bucket/my-path/model.tar.gz\n\nThis uploads the contents of my_model to a gzip compressed tar file to S3 in the bucket \"my-bucket\", with the key\n\"my-path/model.tar.gz\".\n\nTo run this command, you'll need the aws cli tool installed. Please refer to our `FAQ <#FAQ>`__ for more information on\ninstalling this.\n\nChainer Training Examples\n~~~~~~~~~~~~~~~~~~~~~~~\n\nAmazon provides several example Jupyter notebooks that demonstrate end-to-end training on Amazon SageMaker using Chainer.\nPlease refer to:\n\nhttps://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk\n\nThese are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the \"sample notebooks\" folder.\n\n\nSageMaker Chainer Docker containers\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen training and deploying training scripts, SageMaker runs your Python script in a Docker container with several\nlibraries installed. When creating the Estimator and calling deploy to create the SageMaker Endpoint, you can control\nthe environment your script runs in.\n\nSageMaker runs Chainer Estimator scripts in either Python 2.7 or Python 3.5. You can select the Python version by\npassing a py_version keyword arg to the Chainer Estimator constructor. Setting this to py3 (the default) will cause your\ntraining script to be run on Python 3.5. Setting this to py2 will cause your training script to be run on Python 2.7\nThis Python version applies to both the Training Job, created by fit, and the Endpoint, created by deploy.\n\nThe Chainer Docker images have the following dependencies installed:\n\n+-----------------------------+-------------+\n| Dependencies                | chainer 4.0 |\n+-----------------------------+-------------+\n| chainer                     | 4.0.0       |\n+-----------------------------+-------------+\n| chainercv                   | 0.9.0       |\n+-----------------------------+-------------+\n| chainermn                   | 1.2.0       |\n+-----------------------------+-------------+\n| CUDA                        | 9.0         |\n+-----------------------------+-------------+\n| cupy                        | 4.0.0       |\n+-----------------------------+-------------+\n| matplotlib                  | 2.2.0       |\n+-----------------------------+-------------+\n| mpi4py                      | 3.0.0       |\n+-----------------------------+-------------+\n| numpy                       | 1.14.3      |\n+-----------------------------+-------------+\n| opencv-python               | 3.4.0.12    |\n+-----------------------------+-------------+\n| Pillow                      | 5.1.0       |\n+-----------------------------+-------------+\n| Python                      | 2.7 or 3.5  |\n+-----------------------------+-------------+\n\nThe Docker images extend Ubuntu 16.04.\n\nYou can select version of Chainer by passing a framework_version keyword arg to the Chainer Estimator constructor.\nCurrently supported versions are listed in the above table. You can also set framework_version to only specify major and\nminor version, which will cause your training script to be run on the latest supported patch version of that minor\nversion.\n\nYou can visit the SageMaker Chainer containers repository here: https://github.com/aws/sagemaker-chainer-containers/\n\n\nAWS SageMaker Estimators\n------------------------\nAmazon SageMaker provides several built-in machine learning algorithms that you can use for a variety of problem types.\n\nThe full list of algorithms is available on the AWS website: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html\n\nSageMaker Python SDK includes Estimator wrappers for the AWS K-means, Principal Components Analysis(PCA), Linear Learner, Factorization Machines, Latent Dirichlet Allocation(LDA), Neural Topic Model(NTM) and Random Cut Forest algorithms.\n\nDefinition and usage\n~~~~~~~~~~~~~~~~~~~~\nEstimators that wrap Amazon's built-in algorithms define algorithm's hyperparameters with defaults. When a default is not possible you need to provide the value during construction, e.g.:\n\n- ``KMeans`` Estimator requires parameter ``k`` to define number of clusters\n- ``PCA`` Estimator requires parameter ``num_components`` to define number of principal components\n\nInteraction is identical as any other Estimators. There are additional details about how data is specified.\n\nInput data format\n^^^^^^^^^^^^^^^^^\nPlease note that Amazon's built-in algorithms are working best with protobuf ``recordIO`` format.\nThe data is expected to be available in S3 location and depending on algorithm it can handle dat in multiple data channels.\n\nThis package offers support to prepare data into required fomrat and upload data to S3.\nProvided class ``RecordSet`` captures necessary details like S3 location, number of records, data channel and is expected as input parameter when calling ``fit()``.\n\nFunction ``record_set`` is available on algorithms objects to make it simple to achieve the above.\nIt takes 2D numpy array as input, uploads data to S3 and returns ``RecordSet`` objects. By default it uses ``train`` data channel and no labels but can be specified when called.\n\nPlease find an example code snippet for illustration:\n\n.. code:: python\n\n    from sagemaker import PCA\n    pca_estimator = PCA(role='SageMakerRole', train_instance_count=1, train_instance_type='ml.m4.xlarge', num_components=3)\n\n    import numpy as np\n    records = pca_estimator.record_set(np.arange(10).reshape(2,5))\n\n    pca_estimator.fit(records)\n\n\nPredictions support\n~~~~~~~~~~~~~~~~~~~\nCalling inference on deployed Amazon's built-in algorithms requires specific input format. By default, this library creates a predictor that allows to use just numpy data.\nData is converted so that ``application/x-recordio-protobuf`` input format is used. Received response is deserialized from the protobuf and provided as result from the ``predict`` call.\n\n\nBYO Docker Containers with SageMaker Estimators\n-----------------------------------------------\n\nWhen you want to use a Docker image prepared earlier and use SageMaker SDK for training the easiest way is to use dedicated ``Estimator`` class. You will be able to instantiate it with desired image and use it in same way as described in previous sections.\n\nPlease refer to the full example in the examples repo:\n\n::\n\n    git clone https://github.com/awslabs/amazon-sagemaker-examples.git\n\n\nThe example notebook is is located here:\n``advanced_functionality/scikit_bring_your_own/scikit_bring_your_own.ipynb``\n\nFAQ\n---\n\nI want to train a SageMaker Estimator with local data, how do I do this?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou'll need to upload the data to S3 before training. You can use the AWS Command Line Tool (the aws cli) to achieve this.\n\nIf you don't have the aws cli, you can install it using pip:\n\n::\n\n    pip install awscli --upgrade --user\n\nIf you don't have pip or want to learn more about installing the aws cli, please refer to the official `Amazon aws cli installation guide <http://docs.aws.amazon.com/cli/latest/userguide/installing.html>`__.\n\nOnce you have the aws cli installed, you can upload a directory of files to S3 with the following command:\n\n::\n\n    aws s3 cp /tmp/foo/ s3://bucket/path\n\nYou can read more about using the aws cli for manipulating S3 resources in the `AWS cli command reference <http://docs.aws.amazon.com/cli/latest/reference/s3/index.html>`__.\n\n\nHow do I make predictions against an existing endpoint?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nCreate a Predictor object and provide it your endpoint name. Then, simply call its predict() method with your input.\n\nYou can either use the generic RealTimePredictor class, which by default does not perform any serialization/deserialization transformations on your input, but can be configured to do so through constructor arguments:\nhttp://sagemaker.readthedocs.io/en/latest/predictors.html\n\nOr you can use the TensorFlow / MXNet specific predictor classes, which have default serialization/deserialization logic:\nhttp://sagemaker.readthedocs.io/en/latest/sagemaker.tensorflow.html#tensorflow-predictor\nhttp://sagemaker.readthedocs.io/en/latest/sagemaker.mxnet.html#mxnet-predictor\n\nExample code using the TensorFlow predictor:\n\n::\n\n    from sagemaker.tensorflow import TensorFlowPredictor\n\n    predictor = TensorFlowPredictor('myexistingendpoint')\n    result = predictor.predict(['my request body'])\n\n\nBYO Model\n-----------------------------------------------\nYou can also create an endpoint from an existing model rather than training one - i.e. bring your own model.\n\nFirst, package the files for the trained model into a ``.tar.gz`` file, and upload the archive to S3.\n\nNext, create a ``Model`` object that corresponds to the framework that you are using: `MXNetModel <https://sagemaker.readthedocs.io/en/latest/sagemaker.mxnet.html#mxnet-model>`__ or `TensorFlowModel <https://sagemaker.readthedocs.io/en/latest/sagemaker.tensorflow.html#tensorflow-model>`__.\n\nExample code using ``MXNetModel``:\n\n.. code:: python\n\n   from sagemaker.mxnet.model import MXNetModel\n\n   sagemaker_model = MXNetModel(model_data='s3://path/to/model.tar.gz',\n                                role='arn:aws:iam::accid:sagemaker-role',\n                                entry_point='entry_point.py')\n\nAfter that, invoke the ``deploy()`` method on the ``Model``:\n\n.. code:: python\n\n   predictor = sagemaker_model.deploy(initial_instance_count=1,\n                                      instance_type='ml.m4.xlarge')\n\nThis returns a predictor the same way an ``Estimator`` does when ``deploy()`` is called. You can now get inferences just like with any other model deployed on Amazon SageMaker.\n\nA full example is available in the `Amazon SageMaker examples repository <https://github.com/ragavvenkatesan/amazon-sagemaker-examples/tree/3c8394f21ee357da0b553b0ab024c5c5e425182a/advanced_functionality/mxnet_mnist_byom>`__.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"14F4:29FD16:183B16:5E8326:6AB92B53"},"text_sha256":"f30d195905b18fc012d2b1137d6695cf65dbe2d454bbe2d4485ddcf8cc5dbb2e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2320","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:17A1BA4:1BC59A9:6AB92B56"},"commit":{"sha":"3024a571b5b1b97b84e13be608588918a96e937c","url":"https://github.com/aws/sagemaker-python-sdk/commit/3024a571b5b1b97b84e13be608588918a96e937c","date":"2026-06-27T02:55:03Z","author_date":"2026-06-27T02:55:03Z","committer_date":"2026-06-27T02:55:03Z","tree_sha":"787b490e830e040faa0773b14d0a64852b653601","message_first_line":"Bump upstream sagemaker-core to >=2.15.0 and sagemaker-train/serve/mlops to >=1.15.0 (#5975)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2319","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:1816FFA:1C3B64B:6AB92B56"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":19544,"blob_sha":"70e61c7e9c6ac9e0564a8f837dc68da6dc8e6d30","priority":0},{"path":".github/workflows/security-monitoring.yml","size":5549,"blob_sha":"8e44b426c22e78c14c503313bb06c6baeb95ebec","priority":1}],"documents":[{"path":"README.rst","size":19544,"blob_sha":"70e61c7e9c6ac9e0564a8f837dc68da6dc8e6d30","priority":0,"status":200,"text":".. image:: https://github.com/aws/sagemaker-python-sdk/raw/master/branding/icon/sagemaker-banner.png\n    :height: 100px\n    :alt: SageMaker\n\n====================\nSageMaker Python SDK\n====================\n\n.. image:: https://img.shields.io/pypi/v/sagemaker.svg\n   :target: https://pypi.python.org/pypi/sagemaker\n   :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/sagemaker.svg\n   :target: https://pypi.python.org/pypi/sagemaker\n   :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/badge/code_style-black-000000.svg\n   :target: https://github.com/python/black\n   :alt: Code style: black\n\n.. image:: https://readthedocs.org/projects/sagemaker/badge/?version=stable\n   :target: https://sagemaker.readthedocs.io/en/stable/\n   :alt: Documentation Status\n\n.. image:: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml/badge.svg\n    :target: https://github.com/aws/sagemaker-python-sdk/actions/workflows/codebuild-ci-health.yml\n    :alt: CI Health\n\nSageMaker Python SDK is an open source library for training and deploying machine learning models on Amazon SageMaker.\n\nWith the SDK, you can train and deploy models using popular deep learning frameworks **Apache MXNet** and **PyTorch**.\nYou can also train and deploy models with **Amazon algorithms**,\nwhich are scalable implementations of core machine learning algorithms that are optimized for SageMaker and GPU training.\nIf you have **your own algorithms** built into SageMaker compatible Docker containers, you can train and host models using these as well.\n\nTo install SageMaker Python SDK, see `Installing SageMaker Python SDK <#installing-the-sagemaker-python-sdk>`_.\n\n❗🔥 SageMaker V3 Release\n-------------------------\n\nVersion 3.0.0 represents a significant milestone in our product's evolution. This major release introduces a modernized architecture, enhanced performance, and powerful new features while maintaining our commitment to user experience and reliability.\n\n**Important: Please review these breaking changes before upgrading.**\n\n* Older interfaces such as Estimator, Model, Predictor and all their subclasses will not be supported in V3. \n* Please see our `V3 examples folder <https://github.com/aws/sagemaker-python-sdk/tree/master/v3-examples>`__ for example notebooks and usage patterns.\n\n\nMigrating to V3\n----------------\n\n**Upgrading to 3.x**\n\nTo upgrade to the latest version of SageMaker Python SDK 3.x:\n\n::\n\n    pip install --upgrade sagemaker\n\nIf you prefer to downgrade to the 2.x version:\n\n::\n\n    pip install sagemaker==2.*\n\nSee `SageMaker V2 Examples <#sagemaker-v2-examples>`__ for V2 documentation and examples.\n\n**Key Benefits of 3.x**\n\n* **Modular Architecture**: Separate PyPI packages for core, training, and serving capabilities\n\n  * `sagemaker-core <https://pypi.org/project/sagemaker-core/>`__\n  * `sagemaker-train <https://pypi.org/project/sagemaker-train/>`__\n  * `sagemaker-serve <https://pypi.org/project/sagemaker-serve/>`__\n  * `sagemaker-mlops <https://pypi.org/project/sagemaker-mlops/>`__\n\n* **Unified Training & Inference**: Single classes (ModelTrainer, ModelBuilder) replace multiple framework-specific classes\n* **Object-Oriented API**: Structured interface with auto-generated configs aligned with AWS APIs\n* **Simplified Workflows**: Reduced boilerplate and more intuitive interfaces\n\n**Training Experience**\n\nV3 introduces the unified ModelTrainer class to reduce complexity of initial setup and deployment for model training. This replaces the V2 Estimator class and framework-specific classes (PyTorchEstimator, SKLearnEstimator, etc.).\n\nThis example shows how to train a model using a custom training container with training data from S3.\n\n*SageMaker Python SDK 2.x:*\n\n.. code:: python\n\n    from sagemaker.estimator import Estimator\n    estimator = Estimator(\n        image_uri=\"my-training-image\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\",\n        instance_count=1,\n        instance_type=\"ml.m5.xlarge\",\n        output_path=\"s3://my-bucket/output\"\n    )\n    estimator.fit({\"training\": \"s3://my-bucket/train\"})\n\n*SageMaker Python SDK 3.x:*\n\n.. code:: python\n\n    from sagemaker.train import ModelTrainer\n    from sagemaker.train.configs import InputData\n\n    trainer = ModelTrainer(\n        training_image=\"my-training-image\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\"\n    )\n\n    train_data = InputData(\n        channel_name=\"training\",\n        data_source=\"s3://my-bucket/train\"\n    )\n\n    trainer.train(input_data_config=[train_data])\n\n**See more examples:** `SageMaker V3 Examples <#sagemaker-v3-examples>`__\n\n**Inference Experience**\n\nV3 introduces the unified ModelBuilder class for model deployment and inference. This replaces the V2 Model class and framework-specific classes (PyTorchModel, TensorFlowModel, SKLearnModel, XGBoostModel, etc.).\n\nThis example shows how to deploy a trained model for real-time inference.\n\n*SageMaker Python SDK 2.x:*\n\n.. code:: python\n\n    from sagemaker.model import Model\n    from sagemaker.predictor import Predictor\n    model = Model(\n        image_uri=\"my-inference-image\",\n        model_data=\"s3://my-bucket/model.tar.gz\",\n        role=\"arn:aws:iam::123456789012:role/SageMakerRole\"\n    )\n    predictor = model.deploy(\n        initial_instance_count=1,\n        instance_type=\"ml.m5.xlarge\"\n    )\n    result = predictor.predict(data)\n\n*SageMaker Python SDK 3.x:*\n\n.. code:: python\n\n    from sagemaker.serve import ModelBuilder\n    model_builder = ModelBuilder(\n        model=\"my-model\",\n        model_path=\"s3://my-bucket/model.tar.gz\"\n    )\n    endpoint = model_builder.build()\n    result = endpoint.invoke(...)\n\n**See more examples:** `SageMaker V3 Examples <#sagemaker-v3-examples>`__\n\nSageMaker V3 Examples\n---------------------\n\n**Training Examples**\n\n#. `Custom Distributed Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/custom-distributed-training-example.ipynb>`__\n#. `Distributed Local Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/distributed-local-training-example.ipynb>`__\n#. `Hyperparameter Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/hyperparameter-training-example.ipynb>`__\n#. `JumpStart Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/jumpstart-training-example.ipynb>`__\n#. `Local Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/training-examples/local-training-example.ipynb>`__\n\n**Inference Examples**\n\n#. `HuggingFace Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/huggingface-example.ipynb>`__\n#. `In-Process Mode Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/in-process-mode-example.ipynb>`__\n#. `Inference Spec Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/inference-spec-example.ipynb>`__\n#. `JumpStart E2E Training Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/jumpstart-e2e-training-example.ipynb>`__\n#. `JumpStart Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/jumpstart-example.ipynb>`__\n#. `Local Mode Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/local-mode-example.ipynb>`__\n#. `Optimize Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/optimize-example.ipynb>`__\n#. `Train Inference E2E Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/inference-examples/train-inference-e2e-example.ipynb>`__\n\n**ML Ops Examples**\n\n#. `V3 Hyperparameter Tuning Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-hyperparameter-tuning-example/v3-hyperparameter-tuning-example.ipynb>`__\n#. `V3 Hyperparameter Tuning Pipeline <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-hyperparameter-tuning-example/v3-hyperparameter-tuning-pipeline.ipynb>`__\n#. `V3 Model Registry Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-model-registry-example/v3-model-registry-example.ipynb>`__\n#. `V3 PyTorch Processing Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-processing-job-pytorch/v3-pytorch-processing-example.ipynb>`__\n#. `V3 Pipeline Train Create Registry <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-pipeline-train-create-registry.ipynb>`__\n#. `V3 Processing Job Sklearn <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-processing-job-sklearn.ipynb>`__\n#. `V3 SageMaker Clarify <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-sagemaker-clarify.ipynb>`__\n#. `V3 Transform Job Example <https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-transform-job-example.ipynb>`__\n\n**Looking for V2 Examples?** See `SageMaker V2 Examples <#sagemaker-v2-examples>`__ below.\n\n\n\n\nInstalling the SageMaker Python SDK\n-----------------------------------\n\nThe SageMaker Python SDK is built to PyPI and the latest version of the SageMaker Python SDK can be installed with pip as follows\n::\n\n    pip install sagemaker==<Latest version from pyPI from https://pypi.org/project/sagemaker/>\n\nYou can install from source by cloning this repository and running a pip install command in the root directory of the repository:\n\n::\n\n    git clone https://github.com/aws/sagemaker-python-sdk.git\n    cd sagemaker-python-sdk\n    pip install .\n\nSupported Operating Systems\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker Python SDK supports Unix/Linux and Mac.\n\nSupported Python Versions\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSageMaker Python SDK is tested on:\n\n- Python 3.10\n- Python 3.11\n- Python 3.12\n\nTelemetry\n~~~~~~~~~~~~~~~\n\nThe ``sagemaker`` library has telemetry enabled to help us better understand user needs, diagnose issues, and deliver new features. This telemetry tracks the usage of various SageMaker functions.\n\nIf you prefer to opt out of telemetry, you can easily do so by setting the ``TelemetryOptOut`` parameter to ``true`` in the SDK defaults configuration. For detailed instructions, please visit `Configuring and using defaults with the SageMaker Python SDK <https://sagemaker.readthedocs.io/en/stable/overview.html#configuring-and-using-defaults-with-the-sagemaker-python-sdk>`__.\n\nAWS Permissions\n~~~~~~~~~~~~~~~\n\nAs a managed service, Amazon SageMaker performs operations on your behalf on the AWS hardware that is managed by Amazon SageMaker.\nAmazon SageMaker can perform only operations that the user permits.\nYou can read more about which permissions are necessary in the `AWS Documentation <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html>`__.\n\nThe SageMaker Python SDK should not require any additional permissions aside from what is required for using SageMaker.\nHowever, if you are using an IAM role with a path in it, you should grant permission for ``iam:GetRole``.\n\nLicensing\n~~~~~~~~~\nSageMaker Python SDK is licensed under the Apache 2.0 License. It is copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. The license is available at:\nhttp://aws.amazon.com/apache2.0/\n\nRunning tests\n~~~~~~~~~~~~~\n\nSageMaker Python SDK has unit tests and integration tests.\n\nYou can install the libraries needed to run the tests by running :code:`pip install --upgrade .[test]` or, for Zsh users: :code:`pip install --upgrade .\\[test\\]`\n\n**Unit tests**\n\nWe run unit tests with tox, which is a program that lets you run unit tests for multiple Python versions, and also make sure the\ncode fits our style guidelines. We run tox with `all of our supported Python versions <#supported-python-versions>`_, so to run unit tests\nwith the same configuration we do, you need to have interpreters for those Python versions installed.\n\nTo run the unit tests with tox, run:\n\n::\n\n    tox tests/unit\n\n**Integration tests**\n\nTo run the integration tests, the following prerequisites must be met\n\n1. AWS account credentials are available in the environment for the boto3 client to use.\n2. The AWS account has an IAM role named :code:`SageMakerRole`.\n   It should have the AmazonSageMakerFullAccess policy attached as well as a policy with `the necessary permissions to use Elastic Inference <https://docs.aws.amazon.com/sagemaker/latest/dg/ei-setup.html>`__.\n3. To run remote_function tests, dummy ecr repo should be created. It can be created by running -\n    :code:`aws ecr create-repository --repository-name remote-function-dummy-container`\n\nWe recommend selectively running just those integration tests you'd like to run. You can filter by individual test function names with:\n\n::\n\n    tox -- -k 'test_i_care_about'\n\n\nYou can also run all of the integration tests by running the following command, which runs them in sequence, which may take a while:\n\n::\n\n    tox -- tests/integ\n\n\nYou can also run them in parallel:\n\n::\n\n    tox -- -n auto tests/integ\n\n\nGit Hooks\n~~~~~~~~~\n\nto enable all git hooks in the .githooks directory, run these commands in the repository directory:\n\n::\n\n    find .git/hooks -type l -exec rm {} \\;\n    find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \\;\n\nTo enable an individual git hook, simply move it from the .githooks/ directory to the .git/hooks/ directory.\n\nBuilding Sphinx docs\n~~~~~~~~~~~~~~~~~~~~\n\nSetup a Python environment, and install the dependencies listed in ``doc/requirements.txt``:\n\n::\n\n    # conda\n    conda create -n sagemaker python=3.12\n    conda activate sagemaker\n    conda install sphinx=5.1.1 sphinx_rtd_theme=0.5.0\n\n    # pip\n    pip install -r doc/requirements.txt\n\n\nClone/fork the repo, and install your local version:\n\n::\n\n    pip install --upgrade .\n\nThen ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run:\n\n::\n\n    make html\n\nYou can edit the templates for any of the pages in the docs by editing the .rst files in the ``doc`` directory and then running ``make html`` again.\n\nPreview the site with a Python web server:\n\n::\n\n    cd _build/html\n    python -m http.server 8000\n\nView the website by visiting http://localhost:8000\n\nSageMaker SparkML Serving\n-------------------------\n\nWith SageMaker SparkML Serving, you can now perform predictions against a SparkML Model in SageMaker.\nIn order to host a SparkML model in SageMaker, it should be serialized with ``MLeap`` library.\n\nFor more information on MLeap, see https://github.com/combust/mleap .\n\nSupported major version of Spark: 3.3 (MLeap version - 0.20.0)\n\nHere is an example on how to create an instance of  ``SparkMLModel`` class and use ``deploy()`` method to create an\nendpoint which can be used to perform prediction against your trained SparkML Model.\n\n.. code:: python\n\n    sparkml_model = SparkMLModel(model_data='s3://path/to/model.tar.gz', env={'SAGEMAKER_SPARKML_SCHEMA': schema})\n    model_name = 'sparkml-model'\n    endpoint_name = 'sparkml-endpoint'\n    predictor = sparkml_model.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge', endpoint_name=endpoint_name)\n\nOnce the model is deployed, we can invoke the endpoint with a ``CSV`` payload like this:\n\n.. code:: python\n\n    payload = 'field_1,field_2,field_3,field_4,field_5'\n    predictor.predict(payload)\n\n\nFor more information about the different ``content-type`` and ``Accept`` formats as well as the structure of the\n``schema`` that SageMaker SparkML Serving recognizes, please see `SageMaker SparkML Serving Container`_.\n\n.. _SageMaker SparkML Serving Container: https://github.com/aws/sagemaker-sparkml-serving-container\n\n\nSageMaker V2 Examples\n---------------------\n\n#. `Using the SageMaker Python SDK <https://sagemaker.readthedocs.io/en/stable/overview.html>`__\n#. `Using MXNet <https://sagemaker.readthedocs.io/en/stable/using_mxnet.html>`__\n#. `Using TensorFlow <https://sagemaker.readthedocs.io/en/stable/using_tf.html>`__\n#. `Using Chainer <https://sagemaker.readthedocs.io/en/stable/using_chainer.html>`__\n#. `Using PyTorch <https://sagemaker.readthedocs.io/en/stable/using_pytorch.html>`__\n#. `Using Scikit-learn <https://sagemaker.readthedocs.io/en/stable/using_sklearn.html>`__\n#. `Using XGBoost <https://sagemaker.readthedocs.io/en/stable/using_xgboost.html>`__\n#. `SageMaker Reinforcement Learning Estimators <https://sagemaker.readthedocs.io/en/stable/using_rl.html>`__\n#. `SageMaker SparkML Serving <#sagemaker-sparkml-serving>`__\n#. `Amazon SageMaker Built-in Algorithm Estimators <src/sagemaker/amazon/README.rst>`__\n#. `Using SageMaker AlgorithmEstimators <https://sagemaker.readthedocs.io/en/stable/overview.html#using-sagemaker-algorithmestimators>`__\n#. `Consuming SageMaker Model Packages <https://sagemaker.readthedocs.io/en/stable/overview.html#consuming-sagemaker-model-packages>`__\n#. `BYO Docker Containers with SageMaker Estimators <https://sagemaker.readthedocs.io/en/stable/overview.html#byo-docker-containers-with-sagemaker-estimators>`__\n#. `SageMaker Automatic Model Tuning <https://sagemaker.readthedocs.io/en/stable/overview.html#sagemaker-automatic-model-tuning>`__\n#. `SageMaker Batch Transform <https://sagemaker.readthedocs.io/en/stable/overview.html#sagemaker-batch-transform>`__\n#. `Secure Training and Inference with VPC <https://sagemaker.readthedocs.io/en/stable/overview.html#secure-training-and-inference-with-vpc>`__\n#. `BYO Model <https://sagemaker.readthedocs.io/en/stable/overview.html#byo-model>`__\n#. `Inference Pipelines <https://sagemaker.readthedocs.io/en/stable/overview.html#inference-pipelines>`__\n#. `Amazon SageMaker Operators in Apache Airflow <https://sagemaker.readthedocs.io/en/stable/using_workflow.html>`__\n#. `SageMaker Autopilot <src/sagemaker/automl/README.rst>`__\n#. `Model Monitoring <https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_model_monitoring.html>`__\n#. `SageMaker Debugger <https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_debugger.html>`__\n#. `SageMaker Processing <https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_processing.html>`__\n\n🚀 Model Fine-Tuning Support Now Available in V3\n-------------------------------------------------\n\nWe're excited to announce model fine-tuning capabilities in SageMaker Python SDK V3!\n\n**What's New**\n\nFour new trainer classes for fine-tuning foundation models:\n\n* SFTTrainer - Supervised fine-tuning\n* DPOTrainer - Direct preference optimization  \n* RLAIFTrainer - RL from AI feedback\n* RLVRTrainer - RL from verifiable rewards\n\n**Quick Example**\n\n.. code:: python\n\n    from sagemaker.train import SFTTrainer\n    from sagemaker.train.common import TrainingType\n\n    trainer = SFTTrainer(\n        model=\"meta-llama/Llama-2-7b-hf\",\n        training_type=TrainingType.LORA,\n        model_package_group_name=\"my-models\",\n        training_dataset=\"s3://bucket/train.jsonl\"\n    )\n\n    training_job = trainer.train()\n\n**Key Features**\n\n* ✨ LoRA & full fine-tuning  \n* 📊 MLflow integration with real-time metrics  \n* 🚀 Deploy to SageMaker or Bedrock  \n* 📈 Built-in evaluation (11 benchmarks)  \n* ☁️ Serverless training  \n\n**Get Started**\n\n.. code:: python\n\n    pip install sagemaker>=3.1.0\n\n`📓 Example notebooks <https://github.com/aws/sagemaker-python-sdk/tree/master/v3-examples/model-customization-examples>`__","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0C60:3AC15:17FABE:5E4249:6AB92B57"},"text_sha256":"08d13ce92101b98c839f43b4d3b677a196f61869176da08c42b5a4147a475cc4"},{"path":".github/workflows/security-monitoring.yml","size":5549,"blob_sha":"8e44b426c22e78c14c503313bb06c6baeb95ebec","priority":1,"status":200,"text":"name: Security Monitoring\n\non:\n  schedule:\n    - cron: '0 16 * * *'\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.run_id }}\n  cancel-in-progress: true\n\npermissions:\n  id-token: write\n\njobs:\n  check-code-scanning-alerts:\n    runs-on: ubuntu-latest\n    outputs:\n      code_scanning_alert_status: ${{ steps.check-code-scanning-alerts.outputs.code_scanning_alert_status }}\n    steps:\n      - name: Check for security alerts\n        id: check-code-scanning-alerts\n        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea\n        with:\n          github-token: ${{ secrets.GH_PAT }}\n          script: |\n            async function checkAlerts() {\n              const owner = '${{ github.repository_owner }}';\n              const repo = '${{ github.event.repository.name }}';\n              const ref = 'refs/heads/master';\n            \n              const codeScanningAlerts = await github.rest.codeScanning.listAlertsForRepo({\n                owner,\n                repo,\n                ref: ref\n              });\n              const activeCodeScanningAlerts = codeScanningAlerts.data.filter(alert => alert.state === 'open');\n              core.setOutput('code_scanning_alert_status', activeCodeScanningAlerts.length > 0 ? '1': '0');\n            }\n            await checkAlerts();\n\n  check-dependabot-alerts:\n    runs-on: ubuntu-latest\n    outputs:\n      dependabot_alert_status: ${{ steps.check-dependabot-alerts.outputs.dependabot_alert_status }}\n    steps:\n      - name: Check for dependabot alerts\n        id: check-dependabot-alerts\n        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea\n        with:\n          github-token: ${{ secrets.GH_PAT }}\n          script: |\n            async function checkAlerts() {\n              const owner = '${{ github.repository_owner }}';\n              const repo = '${{ github.event.repository.name }}';\n            \n              const dependabotAlerts = await github.rest.dependabot.listAlertsForRepo({\n                owner,\n                repo,\n                headers: {\n                  'accept': 'applications/vnd.github+json'\n                }\n              }); \n              const activeDependabotAlerts = dependabotAlerts.data.filter(alert => alert.state === 'open');\n              core.setOutput('dependabot_alert_status', activeDependabotAlerts.length > 0 ? '1': '0');\n            }\n            await checkAlerts();\n\n  check-secret-scanning-alerts:\n    runs-on: ubuntu-latest\n    outputs:\n      secret_scanning_alert_status: ${{ steps.check-secret-scanning-alerts.outputs.secret_scanning_alert_status }}\n    steps:\n      - name: Check for secret scanning alerts\n        id: check-secret-scanning-alerts\n        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea\n        with:\n          github-token: ${{ secrets.GH_PAT }}\n          script: |\n            async function checkAlerts() {\n              const owner = '${{ github.repository_owner }}';\n              const repo = '${{ github.event.repository.name }}';\n\n              const secretScanningAlerts = await github.rest.secretScanning.listAlertsForRepo({\n                owner,\n                repo,\n              }); \n              const activeSecretScanningAlerts = secretScanningAlerts.data.filter(alert => alert.state === 'open');\n              core.setOutput('secret_scanning_alert_status', activeSecretScanningAlerts.length > 0 ? '1': '0');\n            }\n            await checkAlerts();\n\n  put-metric-data:\n    runs-on: ubuntu-latest\n    needs: [check-code-scanning-alerts, check-dependabot-alerts, check-secret-scanning-alerts]\n    steps:\n      - name: Configure AWS Credentials\n        uses: aws-actions/configure-aws-credentials@12e3392609eaaceb7ae6191b3f54bbcb85b5002b\n        with:\n          role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}\n          aws-region: us-west-2\n      - name: Put Code Scanning Alert Metric Data\n        run: |\n          if [ \"${{ needs.check-code-scanning-alerts.outputs.code_scanning_alert_status }}\" == \"1\" ]; then\n            aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          else\n            aws cloudwatch put-metric-data --metric-name CodeScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          fi\n      - name: Put Dependabot Alert Metric Data\n        run: |\n          if [ \"${{ needs.check-dependabot-alerts.outputs.dependabot_alert_status }}\" == \"1\" ]; then\n            aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          else\n            aws cloudwatch put-metric-data --metric-name DependabotAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          fi\n      - name: Put Secret Scanning Alert Metric Data\n        run: |\n          if [ \"${{ needs.check-secret-scanning-alerts.outputs.secret_scanning_alert_status }}\" == \"1\" ]; then\n            aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 1 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          else\n            aws cloudwatch put-metric-data --metric-name SecretScanningAlert --namespace SecurityMonitoringMetrics --value 0 --unit Count --dimensions ProjectName=sagemaker-python-sdk\n          fi","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E9E:18233:17A4FE:5DECB6:6AB92B58"},"text_sha256":"355d33ffe7a628b5cc2f80bf28a1eea9539af6c6fbcf8f106beffe86ff6de0b3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kubeflow/trainer","input_row":{"repository":"kubeflow/trainer","url":"https://github.com/kubeflow/trainer","name":"trainer","owner":"kubeflow","description":"Distributed AI Model Training and LLM Fine-Tuning on Kubernetes","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2233,"issues":1391,"created_at":"2017-06-28T18:38:14Z","updated_at":"2026-09-27T05:21:15Z","first_commit_at":"2017-06-28T18:38:15Z","last_commit_at":"2026-09-24T18:11:55Z","activity_months":110.87,"ai_ml_match_topics":"machine-learning; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:32.869Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kubeflow/trainer","visibility":"public","created_at":"2017-06-28T18:38:14Z","updated_at":"2026-09-27T05:21:15Z","private":false,"fork":false,"archived":false,"stargazers_count":2233,"open_issues_count":229,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2318","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:1803A96:1C28271:6AB92B58"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2317","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090B:35C5DA:17A86B3:1BCC1FC:6AB92B59"},"commit":{"sha":"6a5ee893ce493cf25b2ba1f7fef746fa5895d187","url":"https://github.com/kubeflow/trainer/commit/6a5ee893ce493cf25b2ba1f7fef746fa5895d187","date":"2018-05-23T01:55:24Z","author_date":"2018-05-23T01:55:25Z","committer_date":"2018-05-23T01:55:24Z","tree_sha":"cd874f5036c6775753a84336fd6a9131046e4b24","message_first_line":"dist_mnist: Add unused_argv (#604)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2316","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087D:767EB:17F637C:1C1B033:6AB92B59"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10968,"blob_sha":"848ccb493603b101971182ce1e92418be9825b81","priority":0}],"documents":[{"path":"README.md","size":10968,"blob_sha":"848ccb493603b101971182ce1e92418be9825b81","priority":0,"status":200,"text":"# K8s Custom Resource and Operator For TensorFlow jobs\n\n[![Build Status](https://travis-ci.org/kubeflow/tf-operator.svg?branch=master)](https://travis-ci.org/kubeflow/tf-operator)\n[![Coverage Status](https://coveralls.io/repos/github/kubeflow/tf-operator/badge.svg?branch=master)](https://coveralls.io/github/kubeflow/tf-operator?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kubeflow/tf-operator)](https://goreportcard.com/report/github.com/kubeflow/tf-operator)\n\n## Quick Links\n\n* [Prow test dashboard](https://k8s-testgrid.appspot.com/sig-big-data)\n* [Prow jobs dashboard](https://prow.k8s.io/?repo=kubeflow%2Ftf-operator)\n* [Argo UI for E2E tests](http://testing-argo.kubeflow.org)\n\n## Overview\n\nTFJob provides a Kubernetes custom resource that makes it easy to\nrun distributed or non-distributed TensorFlow jobs on Kubernetes.\n\nUsing a Custom Resource Definition (CRD) gives users the ability to create and manage TF Jobs just like builtin K8s resources. For example to\ncreate a job\n\n```\nkubectl create -f examples/tf_job.yaml\n```\n\nTo list jobs\n\n```bash\nkubectl get tfjobs\n\nNAME          KINDS\nexample-job   TFJob.v1alpha.kubeflow.org\n```\n\nFor additional information about motivation and design for the\nCRD please refer to\n[tf-job design document](tf_job_design_doc.md) and [design document proposal for v1alpha2](https://github.com/kubeflow/community/blob/master/proposals/tf-operator-design-v1alpha2.md).\n\n### Requirements\n\nTFJob requires Kubernetes >= 1.8\n * CRDs required Kubernetes >= 1.7\n * TFJob depends on Garbage Collection for CRDs which is only supported\n   in >= 1.8\n * GPU support is evolving quickly and its best to use Kubernetes 1.8+\n   to get the latest features.\n\n## Installing the TFJob CRD and operator on your k8s cluster\n\nPlease refer to the [Kubeflow user guide](https://github.com/kubeflow/kubeflow/blob/master/user_guide.md).\n\nWe recommend deploying Kubeflow in order to use the TFJob operator.\n\n## Creating a job\n\nYou create a job by defining a TFJob and then creating it with.\n\n```\nkubectl create -f https://raw.githubusercontent.com/kubeflow/tf-operator/master/examples/tf_job.yaml\n```\n\nIn this case the job spec looks like the following\n\n```yaml\napiVersion: \"kubeflow.org/v1alpha1\"\nkind: \"TFJob\"\nmetadata:\n  name: \"example-job\"\nspec:\n  replicaSpecs:\n    - replicas: 1\n      tfReplicaType: MASTER\n      template:\n        spec:\n          containers:\n            - image: gcr.io/tf-on-k8s-dogfood/tf_sample:dc944ff\n              name: tensorflow\n          restartPolicy: OnFailure\n    - replicas: 1\n      tfReplicaType: WORKER\n      template:\n        spec:\n          containers:\n            - image: gcr.io/tf-on-k8s-dogfood/tf_sample:dc944ff\n              name: tensorflow\n          restartPolicy: OnFailure\n    - replicas: 2\n      tfReplicaType: PS\n```\n\nEach replicaSpec defines a set of TensorFlow processes.\nThe tfReplicaType defines the semantics for the set of processes.\nThe semantics are as follows\n\n**master**\n  * A job must have 1 and only 1 master\n  * The pod must contain a container named tensorflow\n  * The overall status of the TFJob is determined by the exit code of the\n    tensorflow container\n      * 0 = success\n      * 1 || 2 || 126 || 127 || 128 || 139 = permanent errors:\n          * 1: general errors\n          * 2: misuse of shell builtins\n          * 126: command invoked cannot execute\n          * 127: command not found\n          * 128: invalid argument to exit\n          * 139: container terminated by SIGSEGV(Invalid memory reference)\n      * 130 || 137 || 143 = retryable error for unexpected system signals:\n          * 130: container terminated by Control-C\n          * 137: container received a SIGKILL\n          * 143: container received a SIGTERM\n      * 138 = reserved in tf-operator for user specified retryable errors\n      * others = undefined and no guarantee\n\n**worker**\n  * A job can have 0 to N workers\n  * The pod must contain a container named tensorflow\n  * Workers are automatically restarted if they exit\n\n**ps**\n  * A job can have 0 to N parameter servers\n  * parameter servers are automatically restarted if they exit\n  * If you do not specify a container named tensorflow the TFJob\n    will automatically add a container to the pod that starts a\n    standard TensorFlow gRPC server for each PS.\n\n\nFor each replica you define a **template** which is a K8s\n[PodTemplateSpec](https://kubernetes.io/docs/api-reference/v1.8/#podtemplatespec-v1-core).\nThe template allows you to specify the containers, volumes, etc... that\nshould be created for each replica.\n\n\n### Using GPUs\n\nThe following works with GKE & K8s 1.8+. If this doesn't work on\nyour setup please consider opening an issue.\n\nEnsure your K8s cluster is properly configured to use GPUs ([instructions for GKE](https://cloud.google.com/kubernetes-engine/docs/concepts/gpus), [generic instructions](https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/))\n  * Nodes must have GPUs attached\n  * K8s cluster must recognize the `nvidia.com/gpu` resource type\n  * GPU drivers must be installed on the cluster.\n\nTo attach GPUs specify the GPU resource on the container e.g.\n\n```yaml\napiVersion: \"kubeflow.org/v1alpha1\"\nkind: \"TFJob\"\nmetadata:\n  name: \"tf-smoke-gpu\"\nspec:\n  replicaSpecs:\n    - tfReplicaType: MASTER\n      template:\n        spec:\n          containers:\n            - image: gcr.io/tf-on-k8s-dogfood/tf_sample_gpu:dc944ff\n              name: tensorflow\n              resources:\n                limits:\n                  nvidia.com/gpu: 1\n          restartPolicy: OnFailure\n```\n\nFollow TensorFlow's [instructions](https://www.tensorflow.org/tutorials/using_gpu)\nfor using GPUs.\n\n## Monitoring your job\n\nTo get the status of your job\n\n```bash\nkubectl get -o yaml tfjobs $JOB\n```\n\nHere is sample output for an example job\n\n```yaml\napiVersion: kubeflow.org/v1alpha1\nkind: TFJob\nmetadata:\n  clusterName: \"\"\n  creationTimestamp: 2017-10-20T22:27:38Z\n  generation: 0\n  name: example-job\n  namespace: default\n  resourceVersion: \"1881\"\n  selfLink: /apis/kubeflow.org/v1alpha1/namespaces/default/tfjobs/example-job\n  uid: e11f9577-b5e5-11e7-8522-42010a8e01a4\nspec:\n  RuntimeId: 76no\n  replicaSpecs:\n  - replicas: 1\n    template:\n      metadata:\n        creationTimestamp: null\n      spec:\n        containers:\n        - image: gcr.io/tf-on-k8s-dogfood/tf_sample:dc944ff\n          name: tensorflow\n          resources: {}\n        restartPolicy: OnFailure\n    tfPort: 2222\n    tfReplicaType: MASTER\n  - replicas: 1\n    template:\n      metadata:\n        creationTimestamp: null\n      spec:\n        containers:\n        - image: gcr.io/tf-on-k8s-dogfood/tf_sample:dc944ff\n          name: tensorflow\n          resources: {}\n        restartPolicy: OnFailure\n    tfPort: 2222\n    tfReplicaType: WORKER\n  - replicas: 2\n    template:\n      metadata:\n        creationTimestamp: null\n      spec:\n        containers:\n        - image: tensorflow/tensorflow:1.3.0\n          name: tensorflow\n          resources: {}\n          volumeMounts:\n          - mountPath: /ps-server\n            name: ps-config-volume\n        restartPolicy: OnFailure\n    tfPort: 2222\n    tfReplicaType: PS\n  tfImage: tensorflow/tensorflow:1.3.0\nstatus:\n  conditions: null\n  controlPaused: false\n  phase: Done\n  reason: \"\"\n  replicaStatuses:\n  - ReplicasStates:\n      Succeeded: 1\n    state: Succeeded\n    tf_replica_type: MASTER\n  - ReplicasStates:\n      Running: 1\n    state: Running\n    tf_replica_type: WORKER\n  - ReplicasStates:\n      Running: 2\n    state: Running\n    tf_replica_type: PS\n  state: Succeeded\n\n```\n\nThe first thing to note is the **RuntimeId**. This is a random unique\nstring which is used to give names to all the K8s resouces\n(e.g Job controllers & services) that are created by the TFJob.\n\nAs with other K8s resources status provides information about the state\nof the resource.\n\n**phase** - Indicates the phase of a job and will be one of\n - Creating\n - Running\n - CleanUp\n - Failed\n - Done\n\n**state** - Provides the overall status of the job and will be one of\n  - Running\n  - Succeeded\n  - Failed\n\nFor each replica type in the job, there will be a ReplicaStatus that\nprovides the number of replicas of that type in each state.\n\nFor each replica type, the job creates a set of K8s\n[Job Controllers](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/)\nnamed\n\n```\n${REPLICA-TYPE}-${RUNTIME_ID}-${INDEX}\n```\n\nFor example, if you have 2 parameter servers and runtime id 76n0 TFJob\nwill create the jobs\n\n```\nps-76no-0\nps-76no-1\n```\n\n### TensorFlow Logs\n\nLogging follows standard K8s logging practices.\n\nYou can use kubectl to get standard output/error for any of\nyour running containers.\n\nFirst find the pod created by the job controller for the replica of\nindex. Pods will be named\n\n```\n${REPLICA-TYPE}-${RUNTIME_ID}-${INDEX}-${RANDOM}\n```\n\nwhere RANDOM is a unique id generated by K8s to uniquely identify each\npod.\n\nOnce you've identified your pod you can get the logs using kubectl.\n\n```\nkubectl logs ${REPLICA-TYPE}-${RUNTIME_ID}-${INDEX}-${RADNOM}\n```\n\nWe delete pods when a job completes to save resources (See [#512](https://github.com/kubeflow/tf-operator/pull/512)). Thus if you need to access to the log after the job is finished, you need to configure a log backend on your own.\n\nIf your cluster takes advantage of K8s\n[logging infrastructure](https://kubernetes.io/docs/concepts/cluster-administration/logging/)\nthen your logs may also be shipped to an appropriate data store for\nfurther analysis.\n\n#### GKE\n\nThe default on GKE is send logs to\n[Stackdriver logging](https://cloud.google.com/logging/docs/).\n\nTo get the logs for a particular pod you can use the following\nadvanced filter in Stackdriver logging's search UI.\n\n```\nresource.type=\"container\"\nresource.labels.pod_id=${POD_NAME}\n```\n\nwhere ${POD_NAME} is the name of the pod.\n\n**Tip** If you don't know the id of the pod, just enter the RuntimeId\nfor your job into the Stackdriver logging search UI. This will find all\nlog entries with the RuntimeId anywhere in the log entry. Since the\nRuntimeId is a random string, the only matches will be the log entries\nfor your job.\n\n**Tip** If your program outputs an easily searchable log message with\nthe replica type and index then you can search for this log message\nand use it to determine the ${POD_NAME} for a particular pod; e.g\n\n```\ncluster_json = os.getenv('TF_CONFIG')\ncluster = json.loads(cluster)\nlogging.info(\"REPLICA_TYPE=%s,REPLICA_INDEX=%s\", cluster[\"task\"][\"type\"], cluster[\"task\"][\"index\"])\n```\n\nThis would log a message like\n\n```\nREPLICA_TYPE=worker,REPLICA_INDEX=0\n```\n\nwhich you could then search for in the StackDriver UI. Once you find\nthe entry you can expand it to see **resource.labels.pod_id**.\n\n\n## Contributing\n\nPlease refer to the [developer_guide](developer_guide.md)\n\n## Community\n\nThis is a part of Kubeflow, so please see [readme in kubeflow/kubeflow](https://github.com/kubeflow/kubeflow#get-involved) to get in touch with the community.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:18016F:5E4A65:6AB92B5A"},"text_sha256":"157682e2b8463351c9c36eb4d289513d842ba5a4ccd6e3bf5b4a28fd5fb5a16a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2315","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17D3CC1:1BF75B6:6AB92B5B"},"commit":{"sha":"a433daeee5697bfacdbfa0451a042911fbeb4874","url":"https://github.com/kubeflow/trainer/commit/a433daeee5697bfacdbfa0451a042911fbeb4874","date":"2026-06-30T10:19:09Z","author_date":"2026-06-30T10:19:09Z","committer_date":"2026-06-30T10:19:09Z","tree_sha":"05068b23a923e972529374dbf4fc8c48353a505d","message_first_line":"chore(test): refactor TestFlux to use wantInfo to match MPI plugin (#3601)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2314","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:17AE4A5:1BD2B04:6AB92B5B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7118,"blob_sha":"229c8ab3d2689edacc5eab641df6f4cb5b779b5b","priority":0},{"path":"docs/operator-guides/ml-policy.md","size":3723,"blob_sha":"caf315be9ec92f3e3dda027895d00632282bcc39","priority":1},{"path":"SECURITY.md","size":2666,"blob_sha":"3a6ff909f512ca2356398ee83222d9346b80f180","priority":1}],"documents":[{"path":"README.md","size":7118,"blob_sha":"229c8ab3d2689edacc5eab641df6f4cb5b779b5b","priority":0,"status":200,"text":"# Kubeflow Trainer\n\n[![Join Slack](https://img.shields.io/badge/Join_Slack-blue?logo=slack)](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels)\n[![Coverage Status](https://coveralls.io/repos/github/kubeflow/trainer/badge.svg?branch=master)](https://coveralls.io/github/kubeflow/trainer?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kubeflow/trainer)](https://goreportcard.com/report/github.com/kubeflow/trainer)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10435/badge)](https://www.bestpractices.dev/projects/10435)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/kubeflow/trainer)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkubeflow%2Ftrainer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkubeflow%2Ftrainer?ref=badge_shield)\n\n<h1 align=\"center\">\n    <img src=\"./docs/images/trainer-logo.svg\" alt=\"logo\" width=\"200\">\n  <br>\n<\/h1>\n\nLatest News 🔥\n\n- [2026/03] Kubeflow Trainer v2.2 is officially released with support for JAX and XGBoost\n  Training Runtimes, enhanced observability with metrics propagation to TrainJob status,\n  and Flux Framework integration for HPC and MPI workloads. Check out\n  [the blog post announcement](https://blog.kubeflow.org/kubeflow-trainer-v2.2-release/).\n- [2025/11] Kubeflow Trainer v2.1 is officially released with support of\n  [Distributed Data Cache](https://www.kubeflow.org/docs/components/trainer/user-guides/data-cache/),\n  topology aware scheduling with Kueue and Volcano, and LLM post-training enhancements. Check out\n  [the GitHub release notes](https://github.com/kubeflow/trainer/releases/tag/v2.1.0).\n- [2025/09] Kubeflow SDK v0.1 is officially released with support for CustomTrainer,\n  BuiltinTrainer, and local PyTorch execution. Check out\n  [the GitHub release notes](https://github.com/kubeflow/sdk/releases/tag/0.1.0).\n- [2025/07] PyTorch on Kubernetes: Kubeflow Trainer Joins the PyTorch Ecosystem. Find the\n  announcement in [the PyTorch blog post](https://pytorch.org/blog/pytorch-on-kubernetes-kubeflow-trainer-joins-the-pytorch-ecosystem/).\n\n<details>\n<summary>More<\/summary>\n\n- [2025/07] Kubeflow Trainer v2.0 has been officially released. Check out\n  [the blog post announcement](https://blog.kubeflow.org/trainer/intro/) and [the\n  release notes](https://github.com/kubeflow/trainer/releases/tag/v2.0.0).\n- [2025/04] From High Performance Computing To AI Workloads on Kubernetes: MPI Runtime in\n  Kubeflow TrainJob. See the [KubeCon + CloudNativeCon London talk](https://youtu.be/Fnb1a5Kaxgo)\n\n<\/details>\n\n## Overview\n\nKubeflow Trainer is a Kubernetes-native distributed AI platform for scalable large language model\n(LLM) fine-tuning and training of AI models across a wide range of frameworks, including\nPyTorch, MLX, HuggingFace, DeepSpeed, JAX, XGBoost, and more.\n\nKubeflow Trainer brings MPI to Kubernetes, orchestrating multi-node, multi-GPU distributed\njobs efficiently across high-performance computing (HPC) clusters. This enables high-throughput\ncommunication between processes, making it ideal for large-scale AI training that requires\nultra-fast synchronization between GPUs nodes.\n\nKubeflow Trainer seamlessly integrates with the Cloud Native AI ecosystem, including\n[Kueue](https://kueue.sigs.k8s.io/docs/tasks/run/trainjobs/) for topology-aware scheduling and\nmulti-cluster job dispatching, as well as [JobSet](https://github.com/kubernetes-sigs/jobset) and\n[LeaderWorkerSet](https://github.com/kubernetes-sigs/lws) for AI workload orchestration.\n\nKubeflow Trainer provides a distributed data cache designed to stream large-scale data with zero-copy\ntransfer directly to GPU nodes. This ensures memory-efficient training jobs while maximizing\nGPU utilization.\n\nWith [the Kubeflow Python SDK](https://github.com/kubeflow/sdk), AI practitioners can effortlessly\ndevelop and fine-tune LLMs while leveraging the Kubeflow Trainer APIs: TrainJob and Runtimes.\n\n<h1 align=\"center\">\n    <img src=\"./docs/images/trainer-tech-stack.drawio.svg\" alt=\"logo\" width=\"500\">\n  <br>\n<\/h1>\n\n## Kubeflow Trainer Introduction\n\nCheckout following KubeCon + CloudNativeCon talks for Kubeflow Trainer capabilities:\n\n[![Kubeflow Trainer](https://img.youtube.com/vi/Lgy4ir1AhYw/0.jpg)](https://www.youtube.com/watch?v=Lgy4ir1AhYw)\n\nAdditional talks:\n\n- [From High Performance Computing To AI Workloads on Kubernetes: MPI Runtime in Kubeflow TrainJob](https://youtu.be/Fnb1a5Kaxgo)\n- [Streamline LLM Fine-tuning on Kubernetes With Kubeflow LLM Trainer](https://youtu.be/O7cNlaz3Hqs)\n\n## Getting Started\n\nPlease check [the official Kubeflow Trainer documentation](https://www.kubeflow.org/docs/components/trainer/getting-started)\nto install and get started with Kubeflow Trainer.\n\n## Community\n\nThe following links provide information on how to get involved in the community:\n\n- Join our [`#kubeflow-trainer` Slack channel](https://www.kubeflow.org/docs/about/community/#kubeflow-slack).\n- Attend [the bi-weekly AutoML and Training Working Group](https://bit.ly/2PWVCkV) community meeting.\n- Check out [who is using Kubeflow Trainer](ADOPTERS.md).\n\n## Contributing\n\nPlease refer to the [CONTRIBUTING guide](CONTRIBUTING.md).\n\n## Changelog\n\nPlease refer to the [CHANGELOG](CHANGELOG/) directory.\n\n## Kubeflow Training Operator V1\n\nKubeflow Trainer project is currently in <strong>alpha<\/strong> status, and APIs may change.\nIf you are using Kubeflow Training Operator V1, please refer [to this migration document](https://www.kubeflow.org/docs/components/trainer/operator-guides/migration/).\n\nKubeflow Community will maintain the Training Operator V1 source code at\n[the `release-1.9` branch](https://github.com/kubeflow/trainer/tree/release-1.9).\n\nYou can find the documentation for Kubeflow Training Operator V1 in [these guides](https://www.kubeflow.org/docs/components/trainer/legacy-v1).\n\n## Acknowledgement\n\nThis project was originally started as a distributed training operator for TensorFlow and later we\nmerged efforts from other Kubeflow Training Operators to provide a unified and simplified experience\nfor both users and developers. We are very grateful to all who filed issues or helped resolve them,\nasked and answered questions, and were part of inspiring discussions.\nWe'd also like to thank everyone who's contributed to and maintained the original operators.\n\n- PyTorch Operator: [list of contributors](https://github.com/kubeflow/pytorch-operator/graphs/contributors)\n  and [maintainers](https://github.com/kubeflow/pytorch-operator/blob/master/OWNERS).\n- MPI Operator: [list of contributors](https://github.com/kubeflow/mpi-operator/graphs/contributors)\n  and [maintainers](https://github.com/kubeflow/mpi-operator/blob/master/OWNERS).\n- XGBoost Operator: [list of contributors](https://github.com/kubeflow/xgboost-operator/graphs/contributors)\n  and [maintainers](https://github.com/kubeflow/xgboost-operator/blob/master/OWNERS).\n- Common library: [list of contributors](https://github.com/kubeflow/common/graphs/contributors) and\n  [maintainers](https://github.com/kubeflow/common/blob/master/OWNERS).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FA9C:241B62:179D82:5DE71C:6AB92B5A"},"text_sha256":"c96581970121aa34febd56f5208cfd63956a21996ca81699fef47a92d3369c5c"},{"path":"docs/operator-guides/ml-policy.md","size":3723,"blob_sha":"caf315be9ec92f3e3dda027895d00632282bcc39","priority":1,"status":200,"text":"# ML Policy\n\nThis guide describes how to configure\n[the `MLPolicy` API](https://pkg.go.dev/github.com/kubeflow/trainer/v2/pkg/apis/trainer/v1alpha1#MLPolicy)\nin the Kubeflow Trainer Runtimes.\n\nBefore exploring this guide, make sure to follow [the Runtime guide](runtime)\nto understand the basics of Kubeflow Trainer Runtimes.\n\n## MLPolicy Overview\n\nThe `MLPolicy` API defines the ML-specific configuration for the training jobs - for example,\nthe number of training nodes (e.g., Pods) to launch, or PyTorch settings.\n\n## Types of MLPolicy\n\nThe `MLPolicy` API supports multiple types, known as `MLPolicySources`. Each type defines how\nthe training job is launched and orchestrated. You can specify one of the supported sources in the\n`MLPolicy` API.\n\n### PlainML\n\nThe empty policy configures training jobs without a specialized distributed framework. It simply uses the `numNodes` value to set the job's parallelism (number of pods) and applies any training environment variables to each pod. For empty policy, the PlainML plugin is activated in the extension framework.\n\nTrainJobs using this policy are launched as standard Kubernetes Jobs. The number of pods (parallelism) and completions is set based on the `numNodes` field in the `Trainer` spec, and environment variables from the TrainJob spec are added to the training containers.\n\n```yaml\nmlPolicy:\n  numNodes: 10\n```\n\n### Torch\n\n[The `Torch` policy](https://pkg.go.dev/github.com/kubeflow/trainer/v2/pkg/apis/trainer/v1alpha1#TorchMLPolicySource)\nconfigures distributed training for PyTorch.\n\nTrainJobs using this policy are launched via [the `torchrun` CLI](https://docs.pytorch.org/docs/stable/elastic/run.html).\nYou can customize `torchrun` options such as `numProcPerNode` to define number of\nprocesses (e.g. GPUs) to launch per training node.\n\n```yaml\nmlPolicy:\n  numNodes: 3\n  torch:\n    numProcPerNode: gpu\n```\n\n#### Inject PET_* envs into init/sidecar containers\n\nBy default, the Torch plugin injects `PET_*` topology env vars into the main trainer container only.\nIf you want to run distributed preflight checks in init containers (or other auxiliary containers), you can opt-in by configuring `torch.envInjection.targets` in the Runtime `mlPolicy`.\n\nThe `jobName` must match the replicated job name in the runtime template (for example, `node`), and each entry in `containerNames` must exist in that job pod spec (regular or init container).\n\n```yaml\nmlPolicy:\n  numNodes: 2\n  torch:\n    envInjection:\n      targets:\n        - jobName: node\n          containerNames:\n            - preflight-check\n```\n\nNote: `envInjection` targets always get all `PET_*` env vars (`PET_NNODES`, `PET_NPROC_PER_NODE`, `PET_NODE_RANK`, `PET_MASTER_ADDR`, and `PET_MASTER_PORT`), independent of the trainer type.\n\nThe main trainer container is the exception under torchtune: it gets the rendezvous endpoint via a CLI argument rather than the `PET_MASTER_ADDR` and `PET_MASTER_PORT` env vars.\n\n### MPI\n\n[The `MPI` policy](https://pkg.go.dev/github.com/kubeflow/trainer/v2/pkg/apis/trainer/v1alpha1#MPIMLPolicySource)\nconfigures distributed training using Message Passing Interface (MPI).\n\nTrainJobs using this policy are launched via the `mpirun` CLI, the standard entrypoint for\nMPI-based applications. This makes it compatible with frameworks like DeepSpeed which\n[uses OpenMPI for distributed training](https://www.deepspeed.ai/getting-started/#launching-deepspeed-training).\n\nYou can customize the `MPI` options such as `numProcPerNode` to define the number of slots per\ntraining node in the MPI hostfile.\n\n```yaml\nmlPolicy:\n  numNodes: 2\n  mpi:\n    numProcPerNode: 4\n    mpiImplementation: OpenMPI\n    sshAuthMountPath: /home/mpiuser/.ssh\n    runLauncherAsNode: true\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C4C8:3A3DD:17906F:5DD9A6:6AB92B5C"},"text_sha256":"3610dc6c506ef773550f038873289883308f09aabec6da9fde15027cb1e23b59"},{"path":"SECURITY.md","size":2666,"blob_sha":"3a6ff909f512ca2356398ee83222d9346b80f180","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nKubeflow Trainer versions are expressed as `vX.Y.Z`, where X is the major version,\nY is the minor version, and Z is the patch version, following the\n[Semantic Versioning](https://semver.org/) terminology.\n\nThe Kubeflow Trainer project maintains release branches for the most recent two minor releases.\nApplicable fixes, including security fixes, may be backported to those two release branches,\ndepending on severity and feasibility.\n\nUsers are encouraged to stay updated with the latest releases to benefit from security patches and\nimprovements.\n\n## Reporting a Vulnerability\n\nWe're extremely grateful for security researchers and users that report vulnerabilities to the\nKubeflow Open Source Community. All reports are thoroughly investigated by Kubeflow projects owners.\n\nYou can use the following ways to report security vulnerabilities privately:\n\n- Using the Kubeflow Trainer repository [GitHub Security Advisory](https://github.com/kubeflow/trainer/security/advisories/new).\n- Using our private Kubeflow Steering Committee mailing list: ksc@kubeflow.org.\n\nPlease provide detailed information to help us understand and address the issue promptly.\n\n## Disclosure Process\n\n**Acknowledgment**: We will acknowledge receipt of your report within 10 business days.\n\n**Assessment**: The Kubeflow projects owners will investigate the reported issue to determine its\nvalidity and severity.\n\n**Resolution**: If the issue is confirmed, we will work on a fix and prepare a release.\n\n**Notification**: Once a fix is available, we will notify the reporter and coordinate a public\ndisclosure.\n\n**Public Disclosure**: Details of the vulnerability and the fix will be published in the project's\nrelease notes and communicated through appropriate channels.\n\n## Prevention Mechanisms\n\nKubeflow Trainer employs several measures to prevent security issues:\n\n**Code Reviews**: All code changes are reviewed by maintainers to ensure code quality and security.\n\n**Dependency Management**: Regular updates and monitoring of dependencies (e.g. Dependabot) to\naddress known vulnerabilities.\n\n**Continuous Integration**: Automated testing and security checks are integrated into the CI/CD pipeline.\n\n**Image Scanning**: Container images are scanned for vulnerabilities.\n\n## Communication Channels\n\nFor the general questions please join the following resources:\n\n- Kubeflow [Slack channels](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels).\n\n- Kubeflow discuss [mailing list](https://www.kubeflow.org/docs/about/community/#kubeflow-mailing-list).\n\nPlease **do not report** security vulnerabilities through public channels.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"885C:A58F2:175C4C:5DA5E9:6AB92B5B"},"text_sha256":"986dab44ca4ae7de2364eb406a2b8a692bf20b1d65f630ee2ab5a81dacd96cfd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"DerwenAI/pytextrank","input_row":{"repository":"DerwenAI/pytextrank","url":"https://github.com/DerwenAI/pytextrank","name":"pytextrank","owner":"DerwenAI","description":"Python implementation of TextRank algorithms (\"textgraphs\") for phrase extraction","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2219,"issues":102,"created_at":"2016-10-02T18:39:12Z","updated_at":"2026-09-15T18:08:25Z","first_commit_at":"2016-10-02T18:39:12Z","last_commit_at":"2024-05-21T15:42:46Z","activity_months":91.590000000000003,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:36.924Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"DerwenAI/pytextrank","visibility":"public","created_at":"2016-10-02T18:39:12Z","updated_at":"2026-09-15T18:08:25Z","private":false,"fork":false,"archived":false,"stargazers_count":2219,"open_issues_count":26,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2313","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0938:74C18:180B912:1C303CB:6AB92B5C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2312","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17D79E7:1BFBA40:6AB92B5D"},"commit":{"sha":"01b8d1d1f642e9684e12bcd5a8815ad894e6778a","url":"https://github.com/DerwenAI/pytextrank/commit/01b8d1d1f642e9684e12bcd5a8815ad894e6778a","date":"2017-12-06T22:56:25Z","author_date":"2017-12-06T22:56:25Z","committer_date":"2017-12-06T22:56:25Z","tree_sha":"7152367224a2de1e8f35d40cc130f86ae9abe865","message_first_line":"Fix uncaught error"},"tree_request_status":200,"tree_rate":{"github_remaining":"2311","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0821:3BE445:1794BB2:1BB7DDF:6AB92B5D"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2723,"blob_sha":"10a232676bcd43a1e0dec18bcc806b5fe0d70ec8","priority":0}],"documents":[{"path":"README.rst","size":2723,"blob_sha":"10a232676bcd43a1e0dec18bcc806b5fe0d70ec8","priority":0,"status":200,"text":"Python impl for TextRank\n========================\n\nPython implementation of *TextRank*, based on the \n`Mihalcea 2004 <http://web.eecs.umich.edu/~mihalcea/papers/mihalcea.emnlp04.pdf>`_\npaper.\n\nModifications to the original algorithm by\n`Rada Mihalcea <https://web.eecs.umich.edu/~mihalcea/>`_, et al.\ninclude:\n\n-  fixed bug; see `Java impl, 2008 <https://github.com/ceteri/textrank>`_\n-  use of lemmatization instead of stemming\n-  verbs included in the graph (but not in the resulting keyphrases)\n-  named entity recognition\n-  normalized keyphrase ranks used in summarization\n\nThe results produced by this implementation are intended more for use\nas *feature vectors* in machine learning, not as academic paper\nsummaries.\n\nInspired by `Williams 2016 <http://mike.place/2016/summarization/>`_\ntalk on *text summarization*.\n\n\nExample Usage\n-------------\n\nSee `PyTextRank wiki <https://github.com/ceteri/pytextrank/wiki/Examples>`_\n\n\nDependencies and Installation\n-----------------------------\n\nThis code has dependencies on several other Python projects:\n\n-  `spaCy <https://spacy.io/docs/usage/>`_\n-  `NetworkX <http://networkx.readthedocs.io/>`_\n-  `datasketch <https://github.com/ekzhu/datasketch>`_\n-  `graphviz <https://pypi.python.org/pypi/graphviz>`_\n\nTo install from `PyPi <https://pypi.python.org/pypi/pytextrank>`_:\n\n::\n\n    pip install pytextrank\n\n\nTo install from this Git repo:\n\n::\n\n    pip install -r requirements.txt\n\nAfter installation you need to download a language model:\n\n::\n\n    python -m spacy download en\n\nAlso, the runtime depends on a local file called ``stop.txt`` which\ncontains a list of *stopwords*. You can override this in the\n`normalize_key_phrases()` call.\n\nLicense\n-------\n*PyTextRank* has an `Apache 2.0 <https://github.com/ceteri/pytextrank/blob/master/LICENSE>`_ \nlicense, so you can use it for commercial applications.\nPlease let us know if you find this useful, and tell us about use cases, \nwhat else you'd like to see integrated, etc.\n\nHere's a Bibtex entry if you ever need to cite *PyTextRank* in a research paper:\n\n::\n\n    @Misc{PyTextRank,\n    author =   {Nathan, Paco},\n    title =    {PyTextRank, a Python implementation of TextRank for text document NLP parsing and summarization},\n    howpublished = {\\url{https://github.com/ceteri/pytextrank/}},\n    year = {2016}\n    }\n\nKudos\n-----\n\n`@htmartin <https://github.com/htmartin>`_\n`@williamsmj <https://github.com/williamsmj/>`_\n`@eugenep <https://github.com/eugenep/>`_\n`@mattkohl <https://github.com/mattkohl>`_\n`@vanita5 <https://github.com/vanita5>`_\n`@HarshGrandeur <https://github.com/HarshGrandeur>`_\n`@mnowotka <https://github.com/mnowotka>`_\n`@kjam <https://github.com/kjam>`_\n`@dvsrepo <https://github.com/dvsrepo>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"25DA:3D501:1851FE:5E9B8B:6AB92B5C"},"text_sha256":"7cd3d11cdff1612a15295a3a3ec51477f3b7569fb077baa6344028eb00fd36a6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2310","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:17BA400:1BDEDDE:6AB92B5E"},"commit":{"sha":"e119be8516b4414734d89e73cd961b85a2e67ba0","url":"https://github.com/DerwenAI/pytextrank/commit/e119be8516b4414734d89e73cd961b85a2e67ba0","date":"2024-05-21T15:42:46Z","author_date":"2024-05-21T15:42:46Z","committer_date":"2024-05-21T15:42:46Z","tree_sha":"5cd920b0e460aae9f4d8cec96854c6e6f90dbe11","message_first_line":"Merge pull request #274 from DerwenAI/snyk-fix-66489129140831c8d227d3bd7f6c7524"},"tree_request_status":200,"tree_rate":{"github_remaining":"2309","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:1801B41:1C2636D:6AB92B5E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7464,"blob_sha":"643f2cf4d5959d2cec2e23a443329c79e825c603","priority":0},{"path":"SECURITY.md","size":442,"blob_sha":"567d8ecbb0e02aff772eab44dcae8a0c1ec93a75","priority":1}],"documents":[{"path":"README.md","size":7464,"blob_sha":"643f2cf4d5959d2cec2e23a443329c79e825c603","priority":0,"status":200,"text":"# PyTextRank\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4637885.svg)](https://doi.org/10.5281/zenodo.4637885)\n![Licence](https://img.shields.io/github/license/DerwenAI/pytextrank)\n![Repo size](https://img.shields.io/github/repo-size/DerwenAI/pytextrank)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/w/DerwenAI/pytextrank?style=plastic)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n![CI](https://github.com/DerwenAI/pytextrank/workflows/CI/badge.svg)\n![downloads](https://img.shields.io/pypi/dm/pytextrank)\n![sponsor](https://img.shields.io/github/sponsors/ceteri)\n\n**PyTextRank** is a Python implementation of *TextRank* as a\n[spaCy pipeline extension](https://spacy.io/universe/project/spacy-pytextrank),\nfor graph-based natural language work -- and related knowledge graph practices.\nThis includes the family of \n[*textgraph*](https://derwen.ai/docs/ptr/glossary/#textgraphs) algorithms:\n\n  - *TextRank* by [[mihalcea04textrank]](https://derwen.ai/docs/ptr/biblio/#mihalcea04textrank)\n  - *PositionRank* by [[florescuc17]](https://derwen.ai/docs/ptr/biblio/#florescuc17)\n  - *Biased TextRank* by [[kazemi-etal-2020-biased]](https://derwen.ai/docs/ptr/biblio/#kazemi-etal-2020-biased)\n  - *TopicRank* by [[bougouin-etal-2013-topicrank]](https://derwen.ai/docs/ptr/biblio/#bougouin-etal-2013-topicrank)\n\nPopular use cases for this library include:\n\n  - *phrase extraction*: get the top-ranked phrases from a text document\n  - low-cost *extractive summarization* of a text document\n  - help infer concepts from unstructured text into more structured representation\n\nSee our full documentation at: <https://derwen.ai/docs/ptr/>\n\n\n## Getting Started\n\nSee the [\"Getting Started\"](https://derwen.ai/docs/ptr/start/)\nsection of the online documentation.\n\nTo install from [PyPi](https://pypi.python.org/pypi/pytextrank):\n```\npython3 -m pip install pytextrank\npython3 -m spacy download en_core_web_sm\n```\n\nIf you work directly from this Git repo, be sure to install the\ndependencies as well:\n```\npython3 -m pip install -r requirements.txt\n```\n\nAlternatively, to install dependencies using `conda`:\n```\nconda env create -f environment.yml\nconda activate pytextrank\n```\n\nThen to use the library with a simple use case:\n```python\nimport spacy\nimport pytextrank\n\n# example text\ntext = \"Compatibility of systems of linear constraints over the set of natural numbers. Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered. Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given. These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types systems and systems of mixed types.\"\n\n# load a spaCy model, depending on language, scale, etc.\nnlp = spacy.load(\"en_core_web_sm\")\n\n# add PyTextRank to the spaCy pipeline\nnlp.add_pipe(\"textrank\")\ndoc = nlp(text)\n\n# examine the top-ranked phrases in the document\nfor phrase in doc._.phrases:\n    print(phrase.text)\n    print(phrase.rank, phrase.count)\n    print(phrase.chunks)\n```\n\nSee the **tutorial notebooks** in the `examples` subdirectory for\nsample code and patterns to use in integrating **PyTextTank** with\nrelated libraries in Python:\n<https://derwen.ai/docs/ptr/tutorial/>\n\n\n<details>\n  <summary>Contributing Code<\/summary>\n\nWe welcome people getting involved as contributors to this open source\nproject!\n\nFor detailed instructions please see:\n[CONTRIBUTING.md](https://github.com/DerwenAI/pytextrank/blob/main/CONTRIBUTING.md)\n<\/details>\n\n<details>\n  <summary>Build Instructions<\/summary>\n\n<strong>\nNote: unless you are contributing code and updates,\nin most use cases won't need to build this package locally.\n<\/strong>\n\nInstead, simply install from\n[PyPi](https://pypi.python.org/pypi/pytextrank)\nor use [Conda](https://docs.conda.io/).\n\nTo set up the build environment locally, see the \n[\"Build Instructions\"](https://derwen.ai/docs/ptr/build/)\nsection of the online documentation.\n<\/details>\n\n<details>\n  <summary>Semantic Versioning<\/summary>\n\nGenerally speaking the major release number of <strong>PyTextRank<\/strong> \nwill track with the major release number of the associated <code>spaCy<\/code>\nversion.\n\nSee:\n[CHANGELOG.md](https://github.com/DerwenAI/pytextrank/blob/main/CHANGELOG.md)\n<\/details>\n\n<img\n alt=\"thanks noam!\"\n src=\"https://raw.githubusercontent.com/DerwenAI/pytextrank/main/docs/assets/noam.jpg\"\n width=\"231\"\n/>\n\n\n## License and Copyright\n\nSource code for **PyTextRank** plus its logo, documentation, and examples\nhave an [MIT license](https://spdx.org/licenses/MIT.html) which is\nsuccinct and simplifies use in commercial applications.\n\nAll materials herein are Copyright &copy; 2016-2024 Derwen, Inc.\n\n\n## Attribution\n\nPlease use the following BibTeX entry for citing **PyTextRank** if you \nuse it in your research or software:\n```bibtex\n@software{PyTextRank,\n  author = {Paco Nathan},\n  title = {{PyTextRank, a Python implementation of TextRank for phrase extraction and summarization of text documents}},\n  year = 2016,\n  publisher = {Derwen},\n  doi = {10.5281/zenodo.4637885},\n  url = {https://github.com/DerwenAI/pytextrank}\n}\n```\n\nCitations are helpful for the continued development and maintenance of\nthis library.\nFor example, see our citations listed on\n[Google Scholar](https://scholar.google.com/scholar?q=related:5tl6J4xZlCIJ:scholar.google.com/&scioq=&hl=en&as_sdt=0,5).\n\n\n## Kudos\n\nMany thanks to our open source [sponsors](https://github.com/sponsors/ceteri);\nand to our contributors:\n[@ceteri](https://github.com/ceteri),\n[@louisguitton](https://github.com/louisguitton),\n[@Ankush-Chander](https://github.com/Ankush-Chander),\n[@tomaarsen](https://github.com/tomaarsen),\n[@CaptXiong](https://github.com/CaptXiong),\n[@Lord-V15](https://github.com/Lord-V15),\n[@anna-droid-beep](https://github.com/anna-droid-beep),\n[@dvsrepo](https://github.com/dvsrepo),\n[@clabornd](https://github.com/clabornd),\n[@dayalstrub-cma](https://github.com/dayalstrub-cma),\n[@kavorite](https://github.com/kavorite),\n[@0dB](https://github.com/0dB),\n[@htmartin](https://github.com/htmartin),\n[@williamsmj](https://github.com/williamsmj/),\n[@mattkohl](https://github.com/mattkohl),\n[@vanita5](https://github.com/vanita5),\n[@HarshGrandeur](https://github.com/HarshGrandeur),\n[@mnowotka](https://github.com/mnowotka),\n[@kjam](https://github.com/kjam),\n[@SaiThejeshwar](https://github.com/SaiThejeshwar),\n[@laxatives](https://github.com/laxatives),\n[@dimmu](https://github.com/dimmu), \n[@JasonZhangzy1757](https://github.com/JasonZhangzy1757), \n[@jake-aft](https://github.com/jake-aft),\n[@junchen1992](https://github.com/junchen1992),\n[@shyamcody](https://github.com/shyamcody),\n[@chikubee](https://github.com/chikubee);\nalso to [@mihalcea](https://github.com/mihalcea) who leads outstanding NLP research work,\nencouragement from the wonderful folks at Explosion who develop [spaCy](https://github.com/explosion/spaCy),\nplus general support from [Derwen, Inc.](https://derwen.ai/)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=derwenai/pytextrank&type=Date)](https://star-history.com/#derwenai/pytextrank&Date)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF9E:24970A:184E2F:5E956B:6AB92B5F"},"text_sha256":"375219a42908e94017c40448ee6dbafca7ea3cf4f95f3750630c36b798984248"},{"path":"SECURITY.md","size":442,"blob_sha":"567d8ecbb0e02aff772eab44dcae8a0c1ec93a75","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nVersions which are currently being supported with security updates:\n\n| Version | Supported          |\n| ------- | ------------------ |\n| > 0.2   | :white_check_mark: |\n\n## Reporting a Vulnerability\n\nTo report a vulnerability, please create a new [*issue*](https://github.com/DerwenAI/pytextrank/issues).\nWe will be notified immediately, and will attempt to respond on the reported issue immediately.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EE2:3EACB:17ABF1:5DF56A:6AB92B5C"},"text_sha256":"7f0c4140addb1a3944bf176c025d254a8198e9b138cf02e89546ebd2d8837cff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"unrealcv/unrealcv","input_row":{"repository":"unrealcv/unrealcv","url":"https://github.com/unrealcv/unrealcv","name":"unrealcv","owner":"unrealcv","description":"UnrealCV: Connecting Computer Vision to Unreal Engine","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2217,"issues":247,"created_at":"2016-09-08T18:03:51Z","updated_at":"2026-09-24T12:58:06Z","first_commit_at":"2016-04-27T15:10:20Z","last_commit_at":"2026-09-04T06:43:50Z","activity_months":124.23,"ai_ml_match_topics":"machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:39.771Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"unrealcv/unrealcv","visibility":"public","created_at":"2016-09-08T18:03:51Z","updated_at":"2026-09-24T12:58:06Z","private":false,"fork":false,"archived":false,"stargazers_count":2217,"open_issues_count":118,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2308","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:1787350:1BABB59:6AB92B5F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2307","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086E:1C46F8:17C71CD:1BEAE74:6AB92B60"},"commit":{"sha":"1c22a641701e9180c2c5835ffdbf816ba042274c","url":"https://github.com/unrealcv/unrealcv/commit/1c22a641701e9180c2c5835ffdbf816ba042274c","date":"2018-03-24T02:32:17Z","author_date":"2018-03-24T02:32:17Z","committer_date":"2018-03-24T02:32:17Z","tree_sha":"d8e14a0b5349a5f02047c4f10b9dca431f77ced9","message_first_line":"Check compatibility with UE4.19"},"tree_request_status":200,"tree_rate":{"github_remaining":"2306","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17CD864:1BF1CD7:6AB92B60"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1953,"blob_sha":"24baeb8c011d65bad4da5ec5c31afbf0c27489da","priority":0}],"documents":[{"path":"README.md","size":1953,"blob_sha":"24baeb8c011d65bad4da5ec5c31afbf0c27489da","priority":0,"status":200,"text":"# UnrealCV\n\n[![Join the chat at https://gitter.im/unrealcv/unrealcv](https://badges.gitter.im/unrealcv/unrealcv.svg)](https://gitter.im/unrealcv/unrealcv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Docs Status](https://readthedocs.org/projects/unrealcv/badge/?version=latest\n)](http://docs.unrealcv.org)\n\n<!-- [![Build Status](https://travis-ci.org/unrealcv/unrealcv.svg?branch=master)](https://travis-ci.org/unrealcv/unrealcv) -->\n\nUnrealCV is a project to help computer vision researchers build virtual worlds using Unreal Engine 4 (UE4). It extends UE4 with a plugin by providing:\n\n1. A set of UnrealCV commands to interact with the virtual world.\n2. Communication between UE4 and an external program, such as Caffe.\n\nUnrealCV can be used in two ways. The first one is using a compiled game binary with UnrealCV embedded. This is as simple as running a game, no knowledge of Unreal Engine is required. The second is installing UnrealCV plugin to Unreal Engine 4 (UE4) and use the editor of UE4 to build a new virtual world.\n\n\nPlease read [Tutorial: Getting Started](http://unrealcv.github.io/tutorial/getting_started.html) to learn using UnrealCV.\n\n<center>\n<img src=\"http://unrealcv.github.io/images/homepage_teaser.png\" alt=\"annotation\"/>\nImages generated from the technical demo <a href=\"http://docs.unrealcv.org/en/master/reference/model_zoo.html#realisticrendering\">RealisticRendering<\/a><br>\n<\/center>\n\n## Citation\n\nIf you found this project useful, please consider citing our paper\n\n```bibtex\n@article{qiu2017unrealcv,\n  Author = {Weichao Qiu, Fangwei Zhong, Yi Zhang, Siyuan Qiao,Zihao Xiao, Tae Soo Kim, Yizhou Wang, Alan Yuille},\n  Journal = {ACM Multimedia Open Source Software Competition},\n  Title = {UnrealCV: Virtual Worlds for Computer Vision},\n  Year = {2017}\n}\n```\n\n## Contact\nIf you have any suggestion or interested in using UnrealCV, please [contact us](http://unrealcv.github.io/contact.html).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:178164:5DC74C:6AB92B60"},"text_sha256":"7772a65b714a992c77ac74b7d64eac23cbb04a83ee27af842bc3664e06de2a7c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2305","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0869:1DB627:187431C:1C98E38:6AB92B61"},"commit":{"sha":"ec120436f1f64702fe2c29ae1e4af5c4bf2c8486","url":"https://github.com/unrealcv/unrealcv/commit/ec120436f1f64702fe2c29ae1e4af5c4bf2c8486","date":"2026-04-15T08:45:02Z","author_date":"2026-04-15T08:45:02Z","committer_date":"2026-04-15T08:45:02Z","tree_sha":"feb24cbc57ca090a54e2b298d9ad841b7824a749","message_first_line":"Update Python client version handling"},"tree_request_status":200,"tree_rate":{"github_remaining":"2304","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:17ED4D8:1C11C16:6AB92B61"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3275,"blob_sha":"d0be358da221a8cb7139ddebd129ee74fce61713","priority":0}],"documents":[{"path":"README.md","size":3275,"blob_sha":"d0be358da221a8cb7139ddebd129ee74fce61713","priority":0,"status":200,"text":"# UnrealCV\n\n[![Join the chat at https://gitter.im/unrealcv/unrealcv](https://badges.gitter.im/unrealcv/unrealcv.svg)](https://gitter.im/unrealcv/unrealcv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Docs Status](https://readthedocs.org/projects/unrealcv/badge/?version=latest\n)](http://docs.unrealcv.org)\n\n<!-- [![Build Status](https://travis-ci.org/unrealcv/unrealcv.svg?branch=master)](https://travis-ci.org/unrealcv/unrealcv) -->\n\nUnrealCV is a project to help computer vision researchers build virtual worlds using Unreal Engine (UE). It extends UE with a plugin by providing:\n\n1. A set of UnrealCV commands to interact with the virtual world.\n2. Communication between UE and an external program, such as Pytorch/Tensorflow.\n\nUnrealCV can be used in two ways. \n- The first one is using a compiled game binary with UnrealCV embedded. This is as simple as running a game, no knowledge of Unreal Engine is required. \n- The second is installing the UnrealCV plugin into Unreal Engine and using the editor to build a new virtual world.\n\nPlease read [Tutorial: Getting Started](http://unrealcv.github.io/tutorial/getting_started.html) to learn using UnrealCV.\n\n<center>\n<img src=\"http://unrealcv.github.io/images/homepage_teaser.png\" alt=\"annotation\"/>\nImages generated from the technical demo <a href=\"http://docs.unrealcv.org/en/master/reference/model_zoo.html#realisticrendering\">RealisticRendering<\/a><br>\n<\/center>\n\n## New Features\n - Support Unreal Engine 5.6 (recommended).\n - Optical flow image capture: `vget /camera/[id]/optical_flow [format]`.\n - Call any Blueprint function from Python by `vbp [obj_name] [func_name] [arg1] [arg2] ...` command.\n - Support RPC communication between Server and Client in Linux, higher FPS and more reliable.\n - A set of new commands for camera control and object manipulation, please refer to [command system](https://docs.unrealcv.org/en/latest/reference/commands.html) for more details.\n\n## How to install UnrealCV\nTo install the UnrealCV `Server`, you need:\n1. Download the source code and place it on the ``Plugin`` folder of a C++ UE project.\n2. Launch the C++ project with Visual Studio, UnrealCV will be compiled at the same time. Note that visual studio version should be compatible with your [UE version](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine).\n3. To check the success installation of UnrealCV, you can run ``vget /unrealcv/status`` in the console (Press **`** to display the console).\n\nTo install the UnrealCV `Client`, just run:\n``pip install unrealcv``\n\n> **🚩 Note:** More pre-built UE binaries with UnrealCV can be found in the [UnrealZoo](http://unrealzoo.site/).\n\n## Citation\n\nIf you found this project useful, please consider citing our paper\n\n```bibtex\n@article{qiu2017unrealcv,\n  Author = {Weichao Qiu, Fangwei Zhong, Yi Zhang, Siyuan Qiao,Zihao Xiao, Tae Soo Kim, Yizhou Wang, Alan Yuille},\n  Journal = {ACM Multimedia Open Source Software Competition},\n  Title = {UnrealCV: Virtual Worlds for Computer Vision},\n  Year = {2017}\n}\n```\n\n## Contact\nIf you have any suggestion or interested in using UnrealCV, please [contact us](http://unrealcv.github.io/contact.html).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2408:40B0C:17DB32:5E2538:6AB92B61"},"text_sha256":"76465938c16f8db08e4646f1e16f0a6bc1ce68f6dc4e4b4009f23a0428f6325b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"osqp/osqp","input_row":{"repository":"osqp/osqp","url":"https://github.com/osqp/osqp","name":"osqp","owner":"osqp","description":"The Operator Splitting QP Solver","language":"C","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2202,"issues":392,"created_at":"2016-09-27T03:02:46Z","updated_at":"2026-09-26T15:30:02Z","first_commit_at":"2016-09-27T03:02:57Z","last_commit_at":"2025-11-10T12:54:10Z","activity_months":109.44,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:42.489Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"osqp/osqp","visibility":"public","created_at":"2016-09-27T03:02:46Z","updated_at":"2026-09-26T15:30:02Z","private":false,"fork":false,"archived":false,"stargazers_count":2202,"open_issues_count":128,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2303","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0789:6C9BF:180414D:1C28A49:6AB92B62"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2302","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:17EB909:1C101A7:6AB92B62"},"commit":{"sha":"29d609e516956f569dd950e47a025bb25708c56e","url":"https://github.com/osqp/osqp/commit/29d609e516956f569dd950e47a025bb25708c56e","date":"2018-05-17T15:10:25Z","author_date":"2018-05-17T15:10:25Z","committer_date":"2018-05-17T15:10:25Z","tree_sha":"e1c005f6483b03ce8bf6246c17f518a2757e6891","message_first_line":"Changed R package name"},"tree_request_status":200,"tree_rate":{"github_remaining":"2301","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AA:77994:17ED5C2:1C11D47:6AB92B63"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2133,"blob_sha":"1b04abacd12af9548ebb8d51550e8632a96b9c8d","priority":0}],"documents":[{"path":"README.md","size":2133,"blob_sha":"1b04abacd12af9548ebb8d51550e8632a96b9c8d","priority":0,"status":200,"text":"# The Operator Splitting QP Solver\n[**Join our forum**](https://groups.google.com/forum/#!forum/osqp) for any questions related to the solver!\n\n**The documentation** is available at [**osqp.readthedocs.io**](http://osqp.readthedocs.io/)\n\nThe OSQP (Operator Splitting Quadratic Program) solver is a numerical optimization package for solving problems in the form\n```\nminimize        0.5 x' P x + q' x\n\nsubject to      l <= A x <= u\n```\n\nwhere `x in R^n` is the optimization variable. The objective function is defined by a positive semidefinite matrix `P in S^n_+` and vector `q in R^n`. The linear constraints are defined by matrix `A in R^{m x n}` and vectors `l in R^m U {-inf}^m`, `u in R^m U {+inf}^m`.\n\n\nThe latest version is `0.3.0`.\n\n<br>\n\n<table>\n  <tr>\n    <th>System<\/th>\n    <th>Status<\/th>\n    <th>Coverage<\/th>\n  <\/tr>\n  <tr>\n    <td>Linux / OSX<\/td>\n    <td><a href=\"https://travis-ci.org/oxfordcontrol/osqp\"><img src=\"https://travis-ci.org/oxfordcontrol/osqp.svg?branch=master\"><\/a><\/td>\n    <td rowspan=\"2\"><a href=\"https://coveralls.io/github/oxfordcontrol/osqp?branch=master\"><img src=\"https://coveralls.io/repos/github/oxfordcontrol/osqp/badge.svg?branch=master\"><\/a><\/td>\n  <\/tr>\n  <tr>\n    <td>Windows<\/td>\n    <td><a href=\"https://ci.appveyor.com/project/bstellato/osqp/\"><img src=\"https://ci.appveyor.com/api/projects/status/ik6ct0203pq5esxh/branch/master?svg=true\"><\/a><\/td>\n  <\/tr>\n<\/table>\n\n<br>\n\n## Citing OSQP\n\nIf you are using OSQP for your work, we encourage you to \n\n* [Cite the related papers](http://osqp.readthedocs.io/en/latest/citing/index.html),\n* Put a star on this repository.\n\n**We are looking forward to hearing your success stories with OSQP!** Please [share them with us](mailto:bartolomeo.stellato@gmail.com).\n\n\n## Bug reports and support\n\nPlease report any issues via the [Github issue tracker](https://github.com/oxfordcontrol/osqp/issues). All types of issues are welcome including bug reports, documentation typos, feature requests and so on.\n\n\n## Numerical benchmarks\nNumerical benchmarks against other solvers are available [here](https://github.com/oxfordcontrol/osqp_benchmarks).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:1785F9:5DCFF9:6AB92B63"},"text_sha256":"c78c7b41e6c82b47cfe51c89aa88787c0bc4bd4ddcb071407b2ce3b500af7a80"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2300","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:18075DD:1C2C20C:6AB92B63"},"commit":{"sha":"1572ae068e9ce9ca723cf8223548ade1ff7acc29","url":"https://github.com/osqp/osqp/commit/1572ae068e9ce9ca723cf8223548ade1ff7acc29","date":"2025-11-10T12:54:10Z","author_date":"2025-11-10T12:54:10Z","committer_date":"2025-11-10T12:54:10Z","tree_sha":"c0f218c4848f71300736fff8f12c864f4548e3d3","message_first_line":"Merge pull request #768 from osqp/dependabot/github_actions/JamesIves/github-pages-deploy-action-4.7.4"},"tree_request_status":200,"tree_rate":{"github_remaining":"2299","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078A:6E4BB:180070D:1C24867:6AB92B64"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1980,"blob_sha":"e18100213e4de68029f23cccd52d97255c06c316","priority":0}],"documents":[{"path":"README.md","size":1980,"blob_sha":"e18100213e4de68029f23cccd52d97255c06c316","priority":0,"status":200,"text":"# The Operator Splitting QP Solver\n\n[![Algebra: Built-in](https://github.com/osqp/osqp/actions/workflows/algebra-builtin.yml/badge.svg)](https://github.com/osqp/osqp/actions/workflows/algebra-builtin.yml)\n[![Code coverage](https://coveralls.io/repos/github/osqp/osqp/badge.svg?branch=master)](https://coveralls.io/github/osqp/osqp?branch=master)\n![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)\n\n\n![PyPI - downloads](https://img.shields.io/pypi/dm/osqp.svg?label=Pypi%20downloads)\n![Conda - downloads](https://img.shields.io/conda/dn/conda-forge/osqp.svg?label=Conda%20downloads)\n\n[**Visit our GitHub Discussions page**](https://github.com/orgs/osqp/discussions) for any questions related to the solver!\n\n**The documentation** is available at [**osqp.org**](https://osqp.org/)\n\nThe OSQP (Operator Splitting Quadratic Program) solver is a numerical optimization package for solving problems in the form\n```\nminimize        0.5 x' P x + q' x\n\nsubject to      l <= A x <= u\n```\n\nwhere `x in R^n` is the optimization variable. The objective function is defined by a positive semidefinite matrix `P in S^n_+` and vector `q in R^n`. The linear constraints are defined by matrix `A in R^{m x n}` and vectors `l` and `u` so that `l_i in R U {-inf}` and `u_i in R U {+inf}` for all `i in 1,...,m`.\n\n\n## Citing OSQP\n\nIf you are using OSQP for your work, we encourage you to\n\n* [Cite the related papers](https://osqp.org/citing/),\n* Put a star on this repository.\n\n**We are looking forward to hearing your success stories with OSQP!** Please [share them with us](mailto:bartolomeo.stellato@gmail.com).\n\n\n## Bug reports and support\n\nPlease report any issues via the [Github issue tracker](https://github.com/osqp/osqp/issues). All types of issues are welcome including bug reports, documentation typos, feature requests and so on.\n\n\n## Numerical benchmarks\nNumerical benchmarks against other solvers are available [here](https://github.com/osqp/osqp_benchmarks).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62FA:345ED4:179198:5DDAF7:6AB92B5F"},"text_sha256":"a72d2fc2aa69744724db815874628c4971f9eee7af77fc9cc5a21d889890b4e2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fastmachinelearning/hls4ml","input_row":{"repository":"fastmachinelearning/hls4ml","url":"https://github.com/fastmachinelearning/hls4ml","name":"hls4ml","owner":"fastmachinelearning","description":"Machine learning on FPGAs using HLS","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2166,"issues":491,"created_at":"2017-10-25T21:43:56Z","updated_at":"2026-09-27T08:17:33Z","first_commit_at":"2017-10-25T21:43:57Z","last_commit_at":"2026-09-25T13:39:22Z","activity_months":106.98999999999999,"ai_ml_match_topics":"machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:45.061Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fastmachinelearning/hls4ml","visibility":"public","created_at":"2017-10-25T21:43:56Z","updated_at":"2026-09-27T08:17:33Z","private":false,"fork":false,"archived":false,"stargazers_count":2166,"open_issues_count":210,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2298","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:187456A:1C9910F:6AB92B65"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2297","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0851:3203A7:179883A:1BBCE6C:6AB92B65"},"commit":{"sha":"e3cec22ce76af1e5f8b06abcfaab5f69f2cf78c6","url":"https://github.com/fastmachinelearning/hls4ml/commit/e3cec22ce76af1e5f8b06abcfaab5f69f2cf78c6","date":"2018-05-22T13:57:09Z","author_date":"2018-05-22T13:57:09Z","committer_date":"2018-05-22T13:57:09Z","tree_sha":"b265921459b65ef0450f407d1492b0c943950463","message_first_line":"Merge pull request #60 from hls-fpga-machine-learning/bjk/conv2d"},"tree_request_status":200,"tree_rate":{"github_remaining":"2296","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0854:35C5DA:17A8EAC:1BCCB74:6AB92B65"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":659,"blob_sha":"d8035ee5bfb54156ab007c11813f86eb04d5ad85","priority":0}],"documents":[{"path":"README.md","size":659,"blob_sha":"d8035ee5bfb54156ab007c11813f86eb04d5ad85","priority":0,"status":200,"text":"<img src=\"https://hls-fpga-machine-learning.github.io/hls4ml/img/logo.jpg\" alt=\"hls4ml\" width=\"400\">\n\n[![DOI](https://zenodo.org/badge/108329371.svg)](https://zenodo.org/badge/latestdoi/108329371)\n\nA package for machine learning inference in FPGAs. We create firmware implementations of machine learning algorithms using high level synthesis language (HLS). We translate traditional open-source machine learning package models into HLS that can be configured for your use-case!\n\ncontact: hls4ml.help@gmail.com\n\nFor more information visit the webpage: [https://hls-fpga-machine-learning.github.io/hls4ml/](https://hls-fpga-machine-learning.github.io/hls4ml/)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7D18:3B7E2:17126A:5D5DE3:6AB92B65"},"text_sha256":"73cca1c7a205b4097e17cfbe527a81e8143c091968c3f20b21d1f0a4fed95386"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2295","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:181072B:1C351A5:6AB92B66"},"commit":{"sha":"b98439c0c58829e278dcfccf118c8ca41a1fb0b9","url":"https://github.com/fastmachinelearning/hls4ml/commit/b98439c0c58829e278dcfccf118c8ca41a1fb0b9","date":"2026-06-30T22:51:50Z","author_date":"2026-06-29T23:05:00Z","committer_date":"2026-06-30T22:51:50Z","tree_sha":"113257e16e6ba72a280f322075ec419b94a5f634","message_first_line":"Action safe, so override default protection"},"tree_request_status":200,"tree_rate":{"github_remaining":"2294","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0842:E80A6:17AB970:1BD03A7:6AB92B66"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9585,"blob_sha":"ddbf747ed258ee15b7f511f97697e52f6899b4a4","priority":0}],"documents":[{"path":"README.md","size":9585,"blob_sha":"ddbf747ed258ee15b7f511f97697e52f6899b4a4","priority":0,"status":200,"text":"<p align=\"center\">\n   <img src=\"https://raw.githubusercontent.com/fastmachinelearning/hls4ml/refs/heads/main/docs/img/hls4ml_logo.svg\" alt=\"hls4ml\" width=\"400\"/>\n<\/p>\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19134628.svg)](https://doi.org/10.5281/zenodo.19134628)\n[![License](https://img.shields.io/badge/License-Apache_2.0-red.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Documentation Status](https://github.com/fastmachinelearning/hls4ml/actions/workflows/build-sphinx.yml/badge.svg)](https://fastmachinelearning.org/hls4ml)\n[![PyPI version](https://badge.fury.io/py/hls4ml.svg)](https://badge.fury.io/py/hls4ml)\n[![Downloads](https://static.pepy.tech/personalized-badge/hls4ml?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/hls4ml)\n<a href=\"https://anaconda.org/conda-forge/hls4ml/\"><img alt=\"conda-forge\" src=\"https://img.shields.io/conda/dn/conda-forge/hls4ml.svg?label=conda-forge\"><\/a>\n\nA package for machine learning inference in FPGAs. We create firmware implementations of machine learning algorithms using high level synthesis language (HLS). We translate traditional open-source machine learning package models into HLS that can be configured for your use-case!\n\nhls4ml is designed for ultra-low-latency inference on FPGAs. While it has strong roots in high-energy physics applications (e.g., L1 trigger systems at the CERN Large Hadron Collider), it has also been adopted across diverse scientific and industrial domains. Example use cases include control systems for quantum computing, feedback loops in nuclear fusion, low-power environmental monitoring on satellites, and biomedical signal processing (e.g., arrhythmia classification).\n\n\nIf you have any questions, comments, or ideas regarding hls4ml or just want to show us how you use hls4ml, don't hesitate to reach us through the [discussions](https://github.com/fastmachinelearning/hls4ml/discussions) tab.\n\n# Documentation & Tutorial\n\nFor more information visit the webpage: [https://fastmachinelearning.org/hls4ml/](https://fastmachinelearning.org/hls4ml/).\n\nFor introductory material on FPGAs, HLS and ML inferences using hls4ml, check out the [video](https://www.youtube.com/watch?v=2y3GNY4tf7A&ab_channel=SystemsGroupatETHZ%C3%BCrich).\n\nDetailed tutorials on how to use `hls4ml`'s various functionalities can be found [here](https://github.com/hls-fpga-machine-learning/hls4ml-tutorial).\n\n# Installation\n```bash\npip install hls4ml\n```\n\nTo install the extra dependencies for profiling:\n\n```bash\npip install hls4ml[profiling]\n```\n\n# Getting Started\n### Creating an HLS project\n```Python\nimport hls4ml\n\n# Fetch a keras model from our example repository\n# This will download our example model to your working directory and return an example configuration file\nconfig = hls4ml.utils.fetch_example_model('KERAS_3layer.json')\n\n# You can print the configuration to see some default parameters\nprint(config)\n\n# Convert it to a hls project\nhls_model = hls4ml.converters.keras_v2_to_hls(config)\n\n# Print full list of example models if you want to explore more\nhls4ml.utils.fetch_example_list()\n```\n\n### Building a project.\nWe will build the project using Xilinx Vivado HLS, which can be downloaded and installed from [here](https://www.xilinx.com/products/design-tools/vivado/integration/esl-design.html). Alongside Vivado HLS, hls4ml also supports Vitis HLS, Intel HLS, Catapult HLS and has some experimental support dor Intel oneAPI. The target back-end can be changed using the argument backend when building the model.\n\n```Python\n# Use Vivado HLS to synthesize the model\n# This might take several minutes\nhls_model.build()\n\n# Print out the report if you want\nhls4ml.report.read_vivado_report('my-hls-test')\n```\n\n# FAQ\n\nList of frequently asked questions and common HLS synthesis can be found [here](https://fastmachinelearning.org/hls4ml/intro/faq.html)\n\n# Citation\nIf you use this software in a publication, please cite the software\n```bibtex\n@software{fastml_hls4ml,\n  author       = {{FastML Team}},\n  title        = {fastmachinelearning/hls4ml},\n  year         = 2026,\n  publisher    = {Zenodo},\n  version      = {v1.3.0},\n  doi          = {10.5281/zenodo.1201549},\n  url          = {https://github.com/fastmachinelearning/hls4ml}\n}\n```\nthe first publication:\n```bibtex\n@article{Duarte:2018ite,\n    author = \"Duarte, Javier and others\",\n    title = \"{Fast inference of deep neural networks in FPGAs for particle physics}\",\n    eprint = \"1804.06913\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"physics.ins-det\",\n    reportNumber = \"FERMILAB-PUB-18-089-E\",\n    doi = \"10.1088/1748-0221/13/07/P07027\",\n    journal = \"JINST\",\n    volume = \"13\",\n    number = \"07\",\n    pages = \"P07027\",\n    year = \"2018\"\n}\n```\nand the latest overview paper:\n```bibtex\n@article{Schulte:2025mai,\n    author = \"Schulte, Jan-Frederik and others\",\n    title = \"{hls4ml: A Flexible, Open-Source Platform for Deep Learning Acceleration on Reconfigurable Hardware}\",\n    eprint = \"2512.01463\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"cs.AR\",\n    reportNumber = \"FERMILAB-PUB-25-0890-CSAID-ETD-PPD\",\n    year = \"2026\",\n    doi = \"10.1145/3801979\",\n    journal = \"ACM Trans. Reconfigurable Technol. Syst.\"\n    volume = \"19\",\n    pages = \"19\",\n}\n\n\n```\n\nAdditionally, if you use specific features developed in later papers, please cite those as well. For example, CNNs:\n```bibtex\n@article{Aarrestad:2021zos,\n    author = \"Aarrestad, Thea and others\",\n    title = \"{Fast convolutional neural networks on FPGAs with hls4ml}\",\n    eprint = \"2101.05108\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"cs.LG\",\n    reportNumber = \"FERMILAB-PUB-21-130-SCD\",\n    doi = \"10.1088/2632-2153/ac0ea1\",\n    journal = \"Mach. Learn. Sci. Tech.\",\n    volume = \"2\",\n    number = \"4\",\n    pages = \"045015\",\n    year = \"2021\"\n}\n@article{Ghielmetti:2022ndm,\n    author = \"Ghielmetti, Nicol\\`{o} and others\",\n    title = \"{Real-time semantic segmentation on FPGAs for autonomous vehicles with hls4ml}\",\n    eprint = \"2205.07690\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"cs.CV\",\n    reportNumber = \"FERMILAB-PUB-22-435-PPD\",\n    doi = \"10.1088/2632-2153/ac9cb5\",\n    journal =\"Mach. Learn. Sci. Tech.\",\n    year = \"2022\"\n}\n```\nDistributed arithmetic:\n```bibtex\n@misc{Sun:2025,\n      title={da4ml: Distributed Arithmetic for Real-time Neural Networks on FPGAs},\n      author={Chang Sun and others},\n      year={2025},\n      eprint={2507.04535},\n      archivePrefix={arXiv},\n      primaryClass={cs.AR},\n      url={https://arxiv.org/abs/2507.04535},\n}\n```\nbinary/ternary networks:\n```bibtex\n@article{Loncar:2020hqp,\n    author = \"Ngadiuba, Jennifer and others\",\n    title = \"{Compressing deep neural networks on FPGAs to binary and ternary precision with HLS4ML}\",\n    eprint = \"2003.06308\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"cs.LG\",\n    reportNumber = \"FERMILAB-PUB-20-167-PPD-SCD\",\n    doi = \"10.1088/2632-2153/aba042\",\n    journal = \"Mach. Learn. Sci. Tech.\",\n    volume = \"2\",\n    pages = \"015001\",\n    year = \"2021\"\n}\n```\n\n# Acknowledgments\nIf you benefited from participating in our community, we ask that you please acknowledge the Fast Machine Learning collaboration, and particular individuals who helped you, in any publications.\nPlease use the following text for this acknowledgment:\n  > We acknowledge the Fast Machine Learning collective as an open community of multi-domain experts and collaborators. This community and \\<names of individuals\\>, in particular, were important for the development of this project.\n\n# Funding\nWe gratefully acknowledge previous and current support from the U.S. National Science Foundation (NSF) Harnessing the Data Revolution (HDR) Institute for <a href=\"https://a3d3.ai\">Accelerating AI Algorithms for Data Driven Discovery (A3D3)<\/a> under Cooperative Agreement No. <a href=\"https://www.nsf.gov/awardsearch/showAward?AWD_ID=2117997\">PHY-2117997<\/a>, U.S. Department of Energy (DOE) Office of Science, Office of Advanced Scientific Computing Research under the Real‐time Data Reduction Codesign at the Extreme Edge for Science (XDR) Project (<a href=\"https://science.osti.gov/-/media/grants/pdf/foas/2021/SC_FOA_0002501.pdf\">DE-FOA-0002501<\/a>), DOE Office of Science, Office of High Energy Physics Early Career Research Program (<a href=\"https://pamspublic.science.energy.gov/WebPAMSExternal/Interface/Common/ViewPublicAbstract.aspx?rv=df0ae4ab-a46e-481a-9acc-3856b6b041e5&rtc=24&PRoleId=10\">DE-SC0021187<\/a>, DE-0000247070), the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (Grant No. <a href=\"https://doi.org/10.3030/772369\">772369<\/a> and <a href=\"https://doi.org/10.3030/966696\">966696<\/a>), and the Eric & Wendy Schmidt Fund for Strategic Innovation through the CERN Next Generation Triggers project under grant agreement number SIF-2023-004.\n\n<p align=\"center\">\n<img src=\"https://github.com/fastmachinelearning/hls4ml/assets/29201053/bd1217d4-9930-47b7-8917-ad3fc430c75d\" alt=\"A3D3\" width=\"130\"/>\n<img src=\"https://github.com/fastmachinelearning/hls4ml/assets/4932543/16e77374-9829-40a8-800e-8d12018a7cb3\" alt=\"NSF\" width=\"130\"/>\n<img src=\"https://github.com/fastmachinelearning/hls4ml/assets/4932543/de6ca6ea-4d1c-4c56-9d93-f759914bbbf9\" alt=\"DOE\" width=\"130\"/>\n<img src=\"https://github.com/fastmachinelearning/hls4ml/assets/4932543/7a369971-a381-4bb8-932a-7162b173cbac\" alt=\"ERC\" width=\"130\"/>\n<img src=\"https://github.com/user-attachments/assets/7d8cd75d-e0a8-451e-b52c-6f31fa1b8114\" alt=\"NGT\" width=\"130\" />\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0C60:3AC15:17FB69:5E44A0:6AB92B66"},"text_sha256":"a3e932c6494dbbcf8cd56d3f323ac1ba82adb852b25fc82ecc7118c01c567f49"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"salu133445/musegan","input_row":{"repository":"salu133445/musegan","url":"https://github.com/salu133445/musegan","name":"musegan","owner":"salu133445","description":"An AI for Music Generation","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2045,"issues":130,"created_at":"2017-09-13T03:52:31Z","updated_at":"2026-09-21T13:13:13Z","first_commit_at":"2017-09-13T04:00:50Z","last_commit_at":"2024-06-07T10:22:36Z","activity_months":80.790000000000006,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:47.672Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"salu133445/musegan","visibility":"public","created_at":"2017-09-13T03:52:31Z","updated_at":"2026-09-21T13:13:13Z","private":false,"fork":false,"archived":false,"stargazers_count":2045,"open_issues_count":21,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2293","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:180208D:1C269DB:6AB92B67"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2292","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0822:380E1C:17D4493:1BF7F07:6AB92B68"},"commit":{"sha":"f68a93ca83db2cff5dae613a73841fbb3a1004c9","url":"https://github.com/salu133445/musegan/commit/f68a93ca83db2cff5dae613a73841fbb3a1004c9","date":"2018-05-11T08:01:04Z","author_date":"2018-05-11T08:01:04Z","committer_date":"2018-05-11T08:01:04Z","tree_sha":"bb3b573703d34b6dcde4db894d30b2e6a24b66c0","message_first_line":"Import SharedArray only when necessary"},"tree_request_status":200,"tree_rate":{"github_remaining":"2291","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17D4F1D:1BF98E6:6AB92B68"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4849,"blob_sha":"f2861ca98a0acfb5656eb61419d07aa8e591c33b","priority":0}],"documents":[{"path":"README.md","size":4849,"blob_sha":"f2861ca98a0acfb5656eb61419d07aa8e591c33b","priority":0,"status":200,"text":"# MuseGAN\n\n[MuseGAN](https://salu133445.github.io/musegan/) is a project on music\ngeneration. In essence, we aim to generate polyphonic music of multiple tracks\n(instruments) with harmonic and rhythmic structure, multi-track interdependency\nand temporal structure. To our knowledge, our work represents the first approach\nthat deal with these issues altogether.\n\nThe models are trained with\n[Lakh Pianoroll Dataset](https://salu133445.github.io/lakh-pianoroll-dataset/)\n(LPD), a new [multi-track piano-roll](https://salu133445.github.io/musegan/data)\ndataset, in an unsupervised approach. The proposed models are able to generate\nmusic either from scratch, or by accompanying a track given by user.\nSpecifically, we use the model to generate pop song phrases consisting of bass,\ndrums, guitar, piano and strings tracks.\n\nSample results are available [here](https://salu133445.github.io/musegan/results).\n\n## BinaryMuseGAN\n\n[BinaryMuseGAN](https://salu133445.github.io/bmusegan/) is a follow-up project\nof the [MuseGAN](https://salu133445.github.io/musegan/) project.\n\nIn this project, we first investigate how the real-valued piano-rolls generated\nby the generator may lead to difficulties in training the discriminator for\nCNN-based models. To overcome the binarization issue, we propose to append to\nthe generator an additional refiner network, which try to refine the real-valued\npredictions generated by the pretrained generator to binary-valued ones. The\nproposed model is able to directly generate binary-valued piano-rolls at test\ntime.\n\nWe trained the network with\n[Lakh Pianoroll Dataset](https://salu133445.github.io/lakh-pianoroll-dataset/)\n(LPD). We use the model to generate four-bar musical phrases consisting of eight\ntracks: *Drums*, *Piano*, *Guitar*, *Bass*, *Ensemble*, *Reed*, *Synth Lead* and\n*Synth Pad*. Audio samples are available\n[here](https://salu133445.github.io/bmusegan/samples).\n\n## Run the code\n\n### Prepare Training Data\n\n- Prepare your own data or download our training data\n\n  The array will be reshaped to (-1, `num_bar`, `num_timestep`, `num_pitch`,\n  `num_track`). These variables are defined in `config.py`.\n\n  - [`lastfm_alternative_5b_phrase.npy`](https://drive.google.com/uc?export=download&id=1F7J5n9uOPqViBYpoPT5GvE4PjCWhOyWc) (2.1 GB)\n    contains 12,444 four-bar phrases from 2,074 songs with *alternative* tags.\n    The shape is (2074, 6, 4, 96, 84, 5). The five tracks are *Drums*, *Piano*,\n    *Guitar*, *Bass* and *Strings*.\n  - [`lastfm_alternative_8b_phrase.npy`](https://drive.google.com/uc?export=download&id=1x3CeSqE6ElWa6V7ueNl8FKPFmMoyu4ED) (3.6 GB)\n    contains 13,746 four-bar phrases from 2,291 songs with *alternative* tags.\n    The shape is (2291, 6, 4, 96, 84, 8). The eight tracks are *Drums*, *Piano*,\n    *Guitar*, *Bass*, *Ensemble*, *Reed*, *Synth Lead* and *Synth Pad*.\n  - Download the data with this [script](training_data/download.sh).\n\n- (optional) Save the training data to shared memory with this [script](training_data/store_to_sa.py).\n\n- Specify training data path and location in `config.py`. (see below)\n\n### Configuration\n\nModify `config.py` for configuration.\n\n- Quick setup\n\n  Change the values in the dictionary `SETUP` for a quick setup. Documentation\n  is provided right after each key.\n\n- More configuration options\n\n  Four dictionaries `EXP_CONFIG`, `DATA_CONFIG`, `MODEL_CONFIG` and\n  `TRAIN_CONFIG` define experiment-, data-, model- and training-related\n  configuration variables, respectively.\n\n  > The automatically-determined experiment name is based only on the values\ndefined in the dictionary `SETUP`, so remember to provide the experiment name\nmanually (so that you won't overwrite a trained model).\n\n### Run\n\n```sh\npython main.py\n```\n\n## Papers\n\n- Hao-Wen Dong and Yi-Hsuan Yang,\n  \"Convolutional Generative Adversarial Networks with Binary Neurons for\n  Polyphonic Music Generation\",\n  *arXiv preprint, arXiv:1804.09399*, 2018.\n  [[arxiv](https://arxiv.org/abs/1804.09399)]\n\n- Hao-Wen Dong\\*, Wen-Yi Hsiao\\*, Li-Chia Yang and Yi-Hsuan Yang,\n  \"MuseGAN: Multi-track Sequential Generative Adversarial Networks for\n  Symbolic Music Generation and Accompaniment,\"\n  in *AAAI Conference on Artificial Intelligence* (AAAI), 2018.\n  [[arxiv](http://arxiv.org/abs/1709.06298)]\n  [[slides](https://salu133445.github.io/musegan/pdf/musegan-aaai2018-slides.pdf)]\n\n- Hao-Wen Dong\\*, Wen-Yi Hsiao\\*, Li-Chia Yang and Yi-Hsuan Yang,\n  \"MuseGAN: Demonstration of a Convolutional GAN Based Model for Generating\n  Multi-track Piano-rolls,\"\n  in *ISMIR Late-Breaking and Demo Session*, 2017.\n  (non-peer reviewed two-page extended abstract)\n  [[paper](https://salu133445.github.io/musegan/pdf/musegan-ismir2017-lbd-paper.pdf)]\n  [[poster](https://salu133445.github.io/musegan/pdf/musegan-ismir2017-lbd-poster.pdf)]\n\n\\* *These authors contributed equally to this work.*\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4340:3CC8A:17D824:5E2316:6AB92B68"},"text_sha256":"a914b9cb0fc4c23c66312e428531078c1f071ce503717621e0c85fa7b3fc2a4d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2290","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086A:0AC4:1298AFE:15ED232:6AB92B69"},"commit":{"sha":"3c9a0dc71ab743b58f4e0620832f21dbe023408e","url":"https://github.com/salu133445/musegan/commit/3c9a0dc71ab743b58f4e0620832f21dbe023408e","date":"2024-06-07T10:22:36Z","author_date":"2024-06-07T10:22:36Z","committer_date":"2024-06-07T10:22:36Z","tree_sha":"b87c33d32b28f0675e063211d20b2ffdf53233ba","message_first_line":"Update links (google drive -> onedrive)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2289","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092D:6C9BF:18045D5:1C28F8F:6AB92B69"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8024,"blob_sha":"741913b30d2e4b46faaf9190ef5e742ec4add882","priority":0}],"documents":[{"path":"README.md","size":8024,"blob_sha":"741913b30d2e4b46faaf9190ef5e742ec4add882","priority":0,"status":200,"text":"# MuseGAN\n\n[MuseGAN](https://salu133445.github.io/musegan/) is a project on music\ngeneration. In a nutshell, we aim to generate polyphonic music of multiple\ntracks (instruments). The proposed models are able to generate music either from\nscratch, or by accompanying a track given a priori by the user.\n\nWe train the model with training data collected from\n[Lakh Pianoroll Dataset](https://salu133445.github.io/lakh-pianoroll-dataset/)\nto generate pop song phrases consisting of bass, drums, guitar, piano and\nstrings tracks.\n\nSample results are available\n[here](https://salu133445.github.io/musegan/results).\n\n## Important Notes\n\n- The latest implementation is based on the network architectures presented in BinaryMuseGAN, where the temporal structure is handled by 3D convolutional layers. The advantage of this design is its smaller network size, while the disadvantage is its reduced controllability, e.g., capability of feeding different latent variables for different measures or tracks.\n- The original code we used for running the experiments in the paper can be found in the `v1` folder.\n- Looking for a PyTorch version? Check out [this repository](https://github.com/salu133445/ismir2019tutorial).\n\n## Prerequisites\n\n> __Below we assume the working directory is the repository root.__\n\n### Install dependencies\n\n- Using pipenv (recommended)\n\n  > Make sure `pipenv` is installed. (If not, simply run `pip install pipenv`.)\n\n  ```sh\n  # Install the dependencies\n  pipenv install\n  # Activate the virtual environment\n  pipenv shell\n  ```\n\n- Using pip\n\n  ```sh\n  # Install the dependencies\n  pip install -r requirements.txt\n  ```\n\n### Prepare training data\n\n> The training data is collected from\n[Lakh Pianoroll Dataset](https://salu133445.github.io/lakh-pianoroll-dataset/)\n(LPD), a new multitrack pianoroll dataset.\n\n```sh\n# Download the training data\n./scripts/download_data.sh\n# Store the training data to shared memory\n./scripts/process_data.sh\n```\n\nYou can also download the training data manually\n([train_x_lpd_5_phr.npz](https://ucsdcloud-my.sharepoint.com/:u:/g/personal/h3dong_ucsd_edu/EZLHzG70AUlLrq3dOPLno3YBORq8ISaJf4UOCbdnKS_CgA?e=fxDPVK)).\n\n> As pianoroll matrices are generally sparse, we store only the indices of\nnonzero elements and the array shape into a npz file to save space, and later\nrestore the original array. To save some training data `data` into this format,\nsimply run\n`np.savez_compressed(\"data.npz\", shape=data.shape, nonzero=data.nonzero())`\n\n## Scripts\n\nWe provide several shell scripts for easy managing the experiments. (See\n[here](scripts/README.md) for a detailed documentation.)\n\n> __Below we assume the working directory is the repository root.__\n\n### Train a new model\n\n1. Run the following command to set up a new experiment with default settings.\n\n   ```sh\n   # Set up a new experiment\n   ./scripts/setup_exp.sh \"./exp/my_experiment/\" \"Some notes on my experiment\"\n   ```\n\n2. Modify the configuration and model parameter files for experimental settings.\n\n3. You can either train the model:\n\n     ```sh\n     # Train the model\n     ./scripts/run_train.sh \"./exp/my_experiment/\" \"0\"\n     ```\n\n   or run the experiment (training + inference + interpolation):\n\n     ```sh\n     # Run the experiment\n     ./scripts/run_exp.sh \"./exp/my_experiment/\" \"0\"\n     ```\n\n### Collect training data\n\nRun the following command to collect training data from MIDI files.\n\n  ```sh\n  # Collect training data\n  ./scripts/collect_data.sh \"./midi_dir/\" \"data/train.npy\"\n  ```\n\n### Use pretrained models\n\n1. Download pretrained models\n\n   ```sh\n   # Download the pretrained models\n   ./scripts/download_models.sh\n   ```\n\n   You can also download the pretrained models manually\n   ([pretrained_models.tar.gz](https://ucsdcloud-my.sharepoint.com/:u:/g/personal/h3dong_ucsd_edu/Ea2kDl2YokNIiZ_OXxzgclYBX0Tk-awE2kDlm2HO9ofqPg)).\n\n2. You can either perform inference from a trained model:\n\n   ```sh\n   # Run inference from a pretrained model\n   ./scripts/run_inference.sh \"./exp/default/\" \"0\"\n   ```\n\n   or perform interpolation from a trained model:\n\n   ```sh\n   # Run interpolation from a pretrained model\n   ./scripts/run_interpolation.sh \"./exp/default/\" \"0\"\n   ```\n\n## Outputs\n\nBy default, samples will be generated alongside the training. You can disable\nthis behavior by setting `save_samples_steps` to zero in the configuration file\n(`config.yaml`). The generated will be stored in the following three formats by\ndefault.\n\n- `.npy`: raw numpy arrays\n- `.png`: image files\n- `.npz`: multitrack pianoroll files that can be loaded by the\n  _[Pypianoroll](https://salu133445.github.io/pypianoroll/index.html)_\n  package\n\nYou can disable saving in a specific format by setting `save_array_samples`,\n`save_image_samples` and `save_pianoroll_samples` to `False`  in the\nconfiguration file.\n\nThe generated pianorolls are stored in .npz format to save space and processing\ntime. You can use the following code to write them into MIDI files.\n\n```python\nfrom pypianoroll import Multitrack\n\nm = Multitrack('./test.npz')\nm.write('./test.mid')\n```\n\n## Sample Results\n\nSome sample results can be found in `./exp/` directory. More samples can be\ndownloaded from the following links.\n\n- [`sample_results.tar.gz`](https://ucsdcloud-my.sharepoint.com/:u:/g/personal/h3dong_ucsd_edu/EedDKNyGHshHkIwBk_QghdYBrrzg-KOQFnj6zGLW3o-sOQ?e=ixlAwG) (54.7 MB):\n  sample inference and interpolation results\n- [`training_samples.tar.gz`](https://ucsdcloud-my.sharepoint.com/:u:/g/personal/h3dong_ucsd_edu/ES96MN0l3xZLvJ3FW7TbV7IBFsFQY-IZhgf9IbRNyR9RIA?e=GpQv4o) (18.7 MB):\n  sample generated results at different steps\n\nCiting\n------\n\nPlease cite the following paper if you use the code provided in this repository.\n\nHao-Wen Dong\\*, Wen-Yi Hsiao\\*, Li-Chia Yang and Yi-Hsuan Yang, \"MuseGAN: Multi-track Sequential Generative Adversarial Networks for Symbolic\nMusic Generation and Accompaniment,\" _AAAI Conference on Artificial Intelligence (AAAI)_, 2018. (\\*equal contribution)\n<br>\n[[homepage](https://salu133445.github.io/musegan)]\n[[arXiv](http://arxiv.org/abs/1709.06298)]\n[[paper](https://salu133445.github.io/musegan/pdf/musegan-aaai2018-paper.pdf)]\n[[slides](https://salu133445.github.io/musegan/pdf/musegan-aaai2018-slides.pdf)]\n[[code](https://github.com/salu133445/musegan)]\n\n## Papers\n\n__MuseGAN: Multi-track Sequential Generative Adversarial Networks for Symbolic Music Generation and Accompaniment__<br>\nHao-Wen Dong\\*, Wen-Yi Hsiao\\*, Li-Chia Yang and Yi-Hsuan Yang (\\*equal contribution)<br>\n_AAAI Conference on Artificial Intelligence (AAAI)_, 2018.<br>\n[[homepage](https://salu133445.github.io/musegan)]\n[[arXiv](http://arxiv.org/abs/1709.06298)]\n[[paper](https://salu133445.github.io/musegan/pdf/musegan-aaai2018-paper.pdf)]\n[[slides](https://salu133445.github.io/musegan/pdf/musegan-aaai2018-slides.pdf)]\n[[code](https://github.com/salu133445/musegan)]\n\n__Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation__<br>\nHao-Wen Dong and Yi-Hsuan Yang<br>\n_International Society for Music Information Retrieval Conference (ISMIR)_, 2018.<br>\n[[homepage](https://salu133445.github.io/bmusegan)]\n[[video](https://youtu.be/r9C2Q2oR9Ik)]\n[[paper](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-paper.pdf)]\n[[slides](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-slides.pdf)]\n[[slides (long)](https://salu133445.github.io/bmusegan/pdf/bmusegan-tmac2018-slides.pdf)]\n[[poster](https://salu133445.github.io/bmusegan/pdf/bmusegan-ismir2018-poster.pdf)]\n[[arXiv](https://arxiv.org/abs/1804.09399)]\n[[code](https://github.com/salu133445/bmusegan)]\n\n__MuseGAN: Demonstration of a Convolutional GAN Based Model for Generating Multi-track Piano-rolls__<br>\nHao-Wen Dong\\*, Wen-Yi Hsiao\\*, Li-Chia Yang and Yi-Hsuan Yang (\\*equal contribution)<br>\n_ISMIR Late-Breaking Demos_, 2017.<br>\n[[paper](https://salu133445.github.io/musegan/pdf/musegan-ismir2017-lbd-paper.pdf)]\n[[poster](https://salu133445.github.io/musegan/pdf/musegan-ismir2017-lbd-poster.pdf)]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C464:285814:173440:5D7E94:6AB92B68"},"text_sha256":"16d01b1ebf91dce03ab6076f5a365ca0ab2642469a2369b6a75b2885074c7b8c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lucasb-eyer/pydensecrf","input_row":{"repository":"lucasb-eyer/pydensecrf","url":"https://github.com/lucasb-eyer/pydensecrf","name":"pydensecrf","owner":"lucasb-eyer","description":"Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2021,"issues":110,"created_at":"2015-11-13T18:15:38Z","updated_at":"2026-08-30T13:57:37Z","first_commit_at":"2015-11-13T18:15:38Z","last_commit_at":"2024-03-05T08:38:52Z","activity_months":99.689999999999998,"ai_ml_match_topics":"machine-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:50.306Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lucasb-eyer/pydensecrf","visibility":"public","created_at":"2015-11-13T18:15:38Z","updated_at":"2026-08-30T13:57:37Z","private":false,"fork":false,"archived":false,"stargazers_count":2021,"open_issues_count":43,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2288","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090F:380E1C:17D45D5:1BF8087:6AB92B6A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2287","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:17AEB8C:1BD3334:6AB92B6A"},"commit":{"sha":"0632813caed930cf505626855bb4c04e09eaf02f","url":"https://github.com/lucasb-eyer/pydensecrf/commit/0632813caed930cf505626855bb4c04e09eaf02f","date":"2018-04-01T22:48:16Z","author_date":"2018-04-01T22:48:16Z","committer_date":"2018-04-01T22:48:16Z","tree_sha":"248292b2d9e648483d11e5a2d949ac5820cdeb0e","message_first_line":"Remove `round` definition. Fixes #44."},"tree_request_status":200,"tree_rate":{"github_remaining":"2286","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:1826517:1C4AB13:6AB92B6B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11564,"blob_sha":"91402a4daf10ffdef288b77b6616a2dcf344985e","priority":0}],"documents":[{"path":"README.md","size":11564,"blob_sha":"91402a4daf10ffdef288b77b6616a2dcf344985e","priority":0,"status":200,"text":"PyDenseCRF\n==========\n\nThis is a (Cython-based) Python wrapper for [Philipp Krähenbühl's Fully-Connected CRFs](http://web.archive.org/web/20161023180357/http://www.philkr.net/home/densecrf) (version 2, [new, incomplete page](http://www.philkr.net/2011/12/01/nips/)).\n\nIf you use this code for your reasearch, please cite:\n\n```\nEfficient Inference in Fully Connected CRFs with Gaussian Edge Potentials\nPhilipp Krähenbühl and Vladlen Koltun\nNIPS 2011\n```\n\nand provide a link to this repository as a footnote or a citation.\n\nInstallation\n============\n\nThe package is on PyPI, so simply run `pip install pydensecrf` to install it.\n\nIf you want the newest and freshest version, you can install it by executing:\n\n```\npip install git+https://github.com/lucasb-eyer/pydensecrf.git\n```\n\nand ignoring all the warnings coming from Eigen.\n\nNote that you need a relatively recent version of Cython (at least version 0.22) for this wrapper,\nthe one shipped with Ubuntu 14.04 is too old. (Thanks to Scott Wehrwein for pointing this out.)\nI suggest you use a [virtual environment](https://virtualenv.readthedocs.org/en/latest/) and install\nthe newest version of Cython there (`pip install cython`), but you may update the system version by\n\n```\nsudo apt-get remove cython\nsudo pip install -U cython\n```\n\nUsage\n=====\n\nFor images, the easiest way to use this library is using the `DenseCRF2D` class:\n\n```python\nimport numpy as np\nimport pydensecrf.densecrf as dcrf\n\nd = dcrf.DenseCRF2D(640, 480, 5)  # width, height, nlabels\n```\n\nUnary potential\n---------------\n\nYou can then set a fixed unary potential in the following way:\n\n```python\nU = np.array(...)     # Get the unary in some way.\nprint(U.shape)        # -> (5, 480, 640)\nprint(U.dtype)        # -> dtype('float32')\nU = U.reshape((5,-1)) # Needs to be flat.\nd.setUnaryEnergy(U)\n\n# Or alternatively: d.setUnary(ConstUnary(U))\n```\n\nRemember that `U` should be negative log-probabilities, so if you're using\nprobabilities `py`, don't forget to `U = -np.log(py)` them.\n\nRequiring the `reshape` on the unary is an API wart that I'd like to fix, but\ndon't know how to without introducing an explicit dependency on numpy.\n\n**Note** that the `nlabels` dimension is the first here before the reshape;\nyou may need to move it there before reshaping if that's not already the case,\nlike so:\n\n```python\nprint(U.shape)  # -> (480, 640, 5)\nU = U.transpose(2, 0, 1).reshape((5,-1))\n```\n\n### Getting a Unary\n\nThere's two common ways of getting unary potentials:\n\n1. From a hard labeling generated by a human or some other processing.\n   This case is covered by `from pydensecrf.utils import unary_from_labels`.\n\n2. From a probability distribution computed by, e.g. the softmax output of a\n   deep network. For this, see `from pydensecrf.utils import unary_from_softmax`.\n\nFor usage of both of these, please refer to their docstrings or have a look at [the example](examples/inference.py).\n\nPairwise potentials\n-------------------\n\nThe two-dimensional case has two utility methods for adding the most-common pairwise potentials:\n\n```python\n# This adds the color-independent term, features are the locations only.\nd.addPairwiseGaussian(sxy=(3,3), compat=3, kernel=dcrf.DIAG_KERNEL, normalization=dcrf.NORMALIZE_SYMMETRIC)\n\n# This adds the color-dependent term, i.e. features are (x,y,r,g,b).\n# im is an image-array, e.g. im.dtype == np.uint8 and im.shape == (640,480,3)\nd.addPairwiseBilateral(sxy=(80,80), srgb=(13,13,13), rgbim=im, compat=10, kernel=dcrf.DIAG_KERNEL, normalization=dcrf.NORMALIZE_SYMMETRIC)\n```\n\nBoth of these methods have shortcuts and default-arguments such that the most\ncommon use-case can be simplified to:\n\n```python\nd.addPairwiseGaussian(sxy=3, compat=3)\nd.addPairwiseBilateral(sxy=80, srgb=13, rgbim=im, compat=10)\n```\n\nThe parameters map to those in the paper as follows: `sxy` in the `Gaussian` case is `$\\theta_{\\gamma}$`,\nand in the `Bilateral` case, `sxy` and `srgb` map to `$\\theta_{\\alpha}$` and `$\\theta_{\\beta}$`, respectively.\nThe names are shorthand for \"x/y standard-deviation\" and \"rgb standard-deviation\" and for reference, the formula is:\n\n![Equation 3 in the original paper](https://user-images.githubusercontent.com/10962198/36150757-01122bf2-10c5-11e8-97d2-2e833c1c9461.png)\n\n### Non-RGB bilateral\n\nAn important caveat is that `addPairwiseBilateral` only works for RGB images, i.e. three channels.\nIf your data is of different type than this simple but common case, you'll need to compute your\nown pairwise energy using `utils.create_pairwise_bilateral`; see the [generic non-2D case](https://github.com/lucasb-eyer/pydensecrf#generic-non-2d) for details.\n\nA good [example of working with Non-RGB data](https://github.com/lucasb-eyer/pydensecrf/blob/master/examples/Non%20RGB%20Example.ipynb) is provided as a notebook in the examples folder.\n\n### Compatibilities\n\nThe `compat` argument can be any of the following:\n\n- A number, then a `PottsCompatibility` is being used.\n- A 1D array, then a `DiagonalCompatibility` is being used.\n- A 2D array, then a `MatrixCompatibility` is being used.\n\nThese are label-compatibilites `µ(xi, xj)` whose parameters could possibly be [learned](https://github.com/lucasb-eyer/pydensecrf#learning).\nFor example, they could indicate that mistaking `bird` pixels for `sky` is not as bad as mistaking `cat` for `sky`.\nThe arrays should have `nlabels` or `(nlabels,nlabels)` as shape and a `float32` datatype.\n\n### Kernels\n\nPossible values for the `kernel` argument are:\n\n- `CONST_KERNEL`\n- `DIAG_KERNEL` (the default)\n- `FULL_KERNEL`\n\nThis specifies the kernel's precision-matrix `Λ(m)`, which could possibly be learned.\nThese indicate correlations between feature types, the default implying no correlation.\nAgain, this could possiblty be [learned](https://github.com/lucasb-eyer/pydensecrf#learning).\n\n### Normalizations\n\nPossible values for the `normalization` argument are:\n\n- `NO_NORMALIZATION`\n- `NORMALIZE_BEFORE`\n- `NORMALIZE_AFTER`\n- `NORMALIZE_SYMMETRIC` (the default)\n\n### Kernel weight\n\nI have so far not found a way to set the kernel weights `w(m)`.\nAccording to the paper, `w(2)` was set to 1 and `w(1)` was cross-validated, but never specified.\nLooking through Philip's code (included in [pydensecrf/densecrf](https://github.com/lucasb-eyer/pydensecrf/tree/master/pydensecrf/densecrf)),\nI couldn't find such explicit weights, and my guess is they are thus hard-coded to 1.\nIf anyone knows otherwise, please open an issue or, better yet, a pull-request.\nUpdate: user @waldol1 has an idea in [this issue](https://github.com/lucasb-eyer/pydensecrf/issues/37). Feel free to try it out!\n\nInference\n---------\n\nThe easiest way to do inference with 5 iterations is to simply call:\n\n```python\nQ = d.inference(5)\n```\n\nAnd the MAP prediction is then:\n\n```python\nmap = np.argmax(Q, axis=0).reshape((640,480))\n```\n\nIf you're interested in the class-probabilities `Q`, you'll notice `Q` is a\nwrapped Eigen matrix. The Eigen wrappers of this project implement the buffer\ninterface and can be simply cast to numpy arrays like so:\n\n```python\nproba = np.array(Q)\n```\n\nStep-by-step inference\n----------------------\n\nIf for some reason you want to run the inference loop manually, you can do so:\n\n```python\nQ, tmp1, tmp2 = d.startInference()\nfor i in range(5):\n    print(\"KL-divergence at {}: {}\".format(i, d.klDivergence(Q)))\n    d.stepInference(Q, tmp1, tmp2)\n```\n\nGeneric non-2D\n--------------\n\nThe `DenseCRF` class can be used for generic (non-2D) dense CRFs.\nIts usage is exactly the same as above, except that the 2D-specific pairwise\npotentials `addPairwiseGaussian` and `addPairwiseBilateral` are missing.\n\nInstead, you need to use the generic `addPairwiseEnergy` method like this:\n\n```python\nd = dcrf.DenseCRF(100, 5)  # npoints, nlabels\n\nfeats = np.array(...)  # Get the pairwise features from somewhere.\nprint(feats.shape)     # -> (7, 100) = (feature dimensionality, npoints)\nprint(feats.dtype)     # -> dtype('float32')\n\ndcrf.addPairwiseEnergy(feats)\n```\n\nIn addition, you can pass `compatibility`, `kernel` and `normalization`\narguments just like in the 2D gaussian and bilateral cases.\n\nThe potential will be computed as `w*exp(-0.5 * |f_i - f_j|^2)`.\n\n### Pairwise potentials for N-D\n\nUser @markusnagel has written a couple numpy-functions generalizing the two\nclassic 2-D image pairwise potentials (gaussian and bilateral) to an arbitrary\nnumber of dimensions: `create_pairwise_gaussian` and `create_pairwise_bilateral`.\nYou can access them as `from pydensecrf.utils import create_pairwise_gaussian`\nand then have a look at their docstring to see how to use them.\n\nLearning\n--------\n\nThe learning has not been fully wrapped. If you need it, get in touch or better\nyet, wrap it and submit a pull-request!\n\nHere's a pointer for starters: issue#24. We need to wrap the gradients and getting/setting parameters.\nBut then, we also need to do something with these, most likely call [minimizeLBFGS from optimization.cpp](https://github.com/lucasb-eyer/pydensecrf/blob/d824b89ee3867bca3e90b9f04c448f1b41821524/pydensecrf/densecrf/src/optimization.cpp).\nIt should be relatively straightforward to just follow the learning examples included in the [original code](http://graphics.stanford.edu/projects/drf/densecrf_v_2_2.zip).\n\nCommon Problems\n===============\n\n`undefined symbol` when importing\n---------------------------------\n\nIf while importing pydensecrf you get an error about some undefined symbols (for example `.../pydensecrf/densecrf.so: undefined symbol: _ZTINSt8ios_base7failureB5cxx11E`), you most likely are inadvertently mixing different compilers or toolchains. Try to see what's going on using tools like `ldd`. If you're using Anaconda, [running `conda install libgcc` might be a solution](https://github.com/lucasb-eyer/pydensecrf/issues/28).\n\nValueError: Buffer dtype mismatch, expected 'float' but got 'double'\n--------------------------------------------------------------------\n\nThis is a pretty [co](https://github.com/lucasb-eyer/pydensecrf/issues/52)mm[on](https://github.com/lucasb-eyer/pydensecrf/issues/49) user error.\nIt means exactly what it says: you are passing a `double` but it wants a `float`.\nSolve it by, for example, calling `d.setUnaryEnergy(U.astype(np.float32))` instead of just `d.setUnaryEnergy(U)`, or using `float32` in your code in the first place.\n\nMy results are all pixelated like [MS Paint's airbrush tool](http://lmgtfy.com/?q=MS+Paint+Airbrush+tool)!\n----------------------------------------------------------\n\nYou screwed up reshaping somewhere and treated the class/label dimension as spatial dimension.\nThis is you misunderstanding NumPy's memory layout and nothing that PyDenseCRF can detect or help with.\n\nThis mistake often happens for the Unary, see the [**Note** in that section of the README](https://github.com/lucasb-eyer/pydensecrf#unary-potential).\n\n\nMaintaining\n===========\n\nThese are instructions for maintainers about how to release new versions. (Mainly instructions for myself.)\n\n```\n# Go increment the version in setup.py\n> python setup.py build_ext\n> python setup.py sdist\n> twine upload dist/pydensecrf-VERSION_NUM.tar.gz\n```\n\nAnd that's it. At some point, it would be cool to automate this on [TravisCI](https://docs.travis-ci.com/user/deployment/pypi/), but not worth it yet.\nAt that point, looking into [creating \"manylinux\" wheels](https://github.com/pypa/python-manylinux-demo) might be nice, too.\n\nTesting\n=======\n\nThanks to @MarvinTeichmann we now have proper tests, install the package and run `py.test`.\nMaybe there's a better way to run them, but both of us don't know :smile:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A98:17E138:17A17E:5DEC10:6AB92B6A"},"text_sha256":"474bf7be618924bf39dc19f5e3274f642a175d97fdba39b1a31d0baf0a08836b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2285","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EB:62B94:17C306E:1BE77A4:6AB92B6B"},"commit":{"sha":"2723c7fa4f2ead16ae1ce3d8afe977724bb8f87f","url":"https://github.com/lucasb-eyer/pydensecrf/commit/2723c7fa4f2ead16ae1ce3d8afe977724bb8f87f","date":"2024-03-05T08:38:52Z","author_date":"2024-03-05T08:38:52Z","committer_date":"2024-03-05T08:38:52Z","tree_sha":"2004e4f4133116673c2c1ba1fd409b182f76f9ee","message_first_line":"Fix pip install error (#126)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2284","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:17F5C3F:1C1A75A:6AB92B6C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12331,"blob_sha":"8714e9c00c3b94082a0d3488d0f822771a1204e1","priority":0}],"documents":[{"path":"README.md","size":12331,"blob_sha":"8714e9c00c3b94082a0d3488d0f822771a1204e1","priority":0,"status":200,"text":"PyDenseCRF\n==========\n\nThis is a (Cython-based) Python wrapper for [Philipp Krähenbühl's Fully-Connected CRFs](http://web.archive.org/web/20161023180357/http://www.philkr.net/home/densecrf) (version 2, [new, incomplete page](http://www.philkr.net/2011/12/01/nips/)).\n\nIf you use this code for your reasearch, please cite:\n\n```\nEfficient Inference in Fully Connected CRFs with Gaussian Edge Potentials\nPhilipp Krähenbühl and Vladlen Koltun\nNIPS 2011\n```\n\nand provide a link to this repository as a footnote or a citation.\n\nInstallation\n============\n\nThe package is on PyPI, so simply run `pip install pydensecrf` to install it.\n\nIf you want the newest and freshest version, you can install it by executing:\n\n```\npip install git+https://github.com/lucasb-eyer/pydensecrf.git\n```\n\nand ignoring all the warnings coming from Eigen.\n\nNote that you need a relatively recent version of Cython (at least version 0.22) for this wrapper,\nthe one shipped with Ubuntu 14.04 is too old. (Thanks to Scott Wehrwein for pointing this out.)\nI suggest you use a [virtual environment](https://virtualenv.readthedocs.org/en/latest/) and install\nthe newest version of Cython there (`pip install cython`), but you may update the system version by\n\n```\nsudo apt-get remove cython\nsudo pip install -U cython\n```\n\n### Problems on Windows/VS\n\nSince this library needs to compile C++ code, installation can be a little more problematic than pure Python packages.\nMake sure to [have Cython installed](https://github.com/lucasb-eyer/pydensecrf/issues/62#issuecomment-400563257) or try [installing via conda instead](https://github.com/lucasb-eyer/pydensecrf/issues/69#issuecomment-400639881) if you are getting problems.\nPRs that improve Windows support are welcome.\n\n### Problems on Colab/Kaggle Kernel\n\n`pydensecrf` does not come pre-installed in Colab or Kaggle Kernel. Running `pip install pydensecrf` will result into\nbuild failures. Follow these steps instead for Colab/Kaggle Kernel:\n\n```\npip install -U cython\npip install git+https://github.com/lucasb-eyer/pydensecrf.git\n```\n\nUsage\n=====\n\nFor images, the easiest way to use this library is using the `DenseCRF2D` class:\n\n```python\nimport numpy as np\nimport pydensecrf.densecrf as dcrf\n\nd = dcrf.DenseCRF2D(640, 480, 5)  # width, height, nlabels\n```\n\nUnary potential\n---------------\n\nYou can then set a fixed unary potential in the following way:\n\n```python\nU = np.array(...)     # Get the unary in some way.\nprint(U.shape)        # -> (5, 480, 640)\nprint(U.dtype)        # -> dtype('float32')\nU = U.reshape((5,-1)) # Needs to be flat.\nd.setUnaryEnergy(U)\n\n# Or alternatively: d.setUnary(ConstUnary(U))\n```\n\nRemember that `U` should be negative log-probabilities, so if you're using\nprobabilities `py`, don't forget to `U = -np.log(py)` them.\n\nRequiring the `reshape` on the unary is an API wart that I'd like to fix, but\ndon't know how to without introducing an explicit dependency on numpy.\n\n**Note** that the `nlabels` dimension is the first here before the reshape;\nyou may need to move it there before reshaping if that's not already the case,\nlike so:\n\n```python\nprint(U.shape)  # -> (480, 640, 5)\nU = U.transpose(2, 0, 1).reshape((5,-1))\n```\n\n### Getting a Unary\n\nThere's two common ways of getting unary potentials:\n\n1. From a hard labeling generated by a human or some other processing.\n   This case is covered by `from pydensecrf.utils import unary_from_labels`.\n\n2. From a probability distribution computed by, e.g. the softmax output of a\n   deep network. For this, see `from pydensecrf.utils import unary_from_softmax`.\n\nFor usage of both of these, please refer to their docstrings or have a look at [the example](examples/inference.py).\n\nPairwise potentials\n-------------------\n\nThe two-dimensional case has two utility methods for adding the most-common pairwise potentials:\n\n```python\n# This adds the color-independent term, features are the locations only.\nd.addPairwiseGaussian(sxy=(3,3), compat=3, kernel=dcrf.DIAG_KERNEL, normalization=dcrf.NORMALIZE_SYMMETRIC)\n\n# This adds the color-dependent term, i.e. features are (x,y,r,g,b).\n# im is an image-array, e.g. im.dtype == np.uint8 and im.shape == (640,480,3)\nd.addPairwiseBilateral(sxy=(80,80), srgb=(13,13,13), rgbim=im, compat=10, kernel=dcrf.DIAG_KERNEL, normalization=dcrf.NORMALIZE_SYMMETRIC)\n```\n\nBoth of these methods have shortcuts and default-arguments such that the most\ncommon use-case can be simplified to:\n\n```python\nd.addPairwiseGaussian(sxy=3, compat=3)\nd.addPairwiseBilateral(sxy=80, srgb=13, rgbim=im, compat=10)\n```\n\nThe parameters map to those in the paper as follows: `sxy` in the `Gaussian` case is `$\\theta_{\\gamma}$`,\nand in the `Bilateral` case, `sxy` and `srgb` map to `$\\theta_{\\alpha}$` and `$\\theta_{\\beta}$`, respectively.\nThe names are shorthand for \"x/y standard-deviation\" and \"rgb standard-deviation\" and for reference, the formula is:\n\n![Equation 3 in the original paper](https://user-images.githubusercontent.com/10962198/36150757-01122bf2-10c5-11e8-97d2-2e833c1c9461.png)\n\n### Non-RGB bilateral\n\nAn important caveat is that `addPairwiseBilateral` only works for RGB images, i.e. three channels.\nIf your data is of different type than this simple but common case, you'll need to compute your\nown pairwise energy using `utils.create_pairwise_bilateral`; see the [generic non-2D case](https://github.com/lucasb-eyer/pydensecrf#generic-non-2d) for details.\n\nA good [example of working with Non-RGB data](https://github.com/lucasb-eyer/pydensecrf/blob/master/examples/Non%20RGB%20Example.ipynb) is provided as a notebook in the examples folder.\n\n### Compatibilities\n\nThe `compat` argument can be any of the following:\n\n- A number, then a `PottsCompatibility` is being used.\n- A 1D array, then a `DiagonalCompatibility` is being used.\n- A 2D array, then a `MatrixCompatibility` is being used.\n\nThese are label-compatibilites `µ(xi, xj)` whose parameters could possibly be [learned](https://github.com/lucasb-eyer/pydensecrf#learning).\nFor example, they could indicate that mistaking `bird` pixels for `sky` is not as bad as mistaking `cat` for `sky`.\nThe arrays should have `nlabels` or `(nlabels,nlabels)` as shape and a `float32` datatype.\n\n### Kernels\n\nPossible values for the `kernel` argument are:\n\n- `CONST_KERNEL`\n- `DIAG_KERNEL` (the default)\n- `FULL_KERNEL`\n\nThis specifies the kernel's precision-matrix `Λ(m)`, which could possibly be learned.\nThese indicate correlations between feature types, the default implying no correlation.\nAgain, this could possiblty be [learned](https://github.com/lucasb-eyer/pydensecrf#learning).\n\n### Normalizations\n\nPossible values for the `normalization` argument are:\n\n- `NO_NORMALIZATION`\n- `NORMALIZE_BEFORE`\n- `NORMALIZE_AFTER`\n- `NORMALIZE_SYMMETRIC` (the default)\n\n### Kernel weight\n\nI have so far not found a way to set the kernel weights `w(m)`.\nAccording to the paper, `w(2)` was set to 1 and `w(1)` was cross-validated, but never specified.\nLooking through Philip's code (included in [pydensecrf/densecrf](https://github.com/lucasb-eyer/pydensecrf/tree/master/pydensecrf/densecrf)),\nI couldn't find such explicit weights, and my guess is they are thus hard-coded to 1.\nIf anyone knows otherwise, please open an issue or, better yet, a pull-request.\nUpdate: user @waldol1 has an idea in [this issue](https://github.com/lucasb-eyer/pydensecrf/issues/37). Feel free to try it out!\n\nInference\n---------\n\nThe easiest way to do inference with 5 iterations is to simply call:\n\n```python\nQ = d.inference(5)\n```\n\nAnd the MAP prediction is then:\n\n```python\nmap = np.argmax(Q, axis=0).reshape((640,480))\n```\n\nIf you're interested in the class-probabilities `Q`, you'll notice `Q` is a\nwrapped Eigen matrix. The Eigen wrappers of this project implement the buffer\ninterface and can be simply cast to numpy arrays like so:\n\n```python\nproba = np.array(Q)\n```\n\nStep-by-step inference\n----------------------\n\nIf for some reason you want to run the inference loop manually, you can do so:\n\n```python\nQ, tmp1, tmp2 = d.startInference()\nfor i in range(5):\n    print(\"KL-divergence at {}: {}\".format(i, d.klDivergence(Q)))\n    d.stepInference(Q, tmp1, tmp2)\n```\n\nGeneric non-2D\n--------------\n\nThe `DenseCRF` class can be used for generic (non-2D) dense CRFs.\nIts usage is exactly the same as above, except that the 2D-specific pairwise\npotentials `addPairwiseGaussian` and `addPairwiseBilateral` are missing.\n\nInstead, you need to use the generic `addPairwiseEnergy` method like this:\n\n```python\nd = dcrf.DenseCRF(100, 5)  # npoints, nlabels\n\nfeats = np.array(...)  # Get the pairwise features from somewhere.\nprint(feats.shape)     # -> (7, 100) = (feature dimensionality, npoints)\nprint(feats.dtype)     # -> dtype('float32')\n\ndcrf.addPairwiseEnergy(feats)\n```\n\nIn addition, you can pass `compatibility`, `kernel` and `normalization`\narguments just like in the 2D gaussian and bilateral cases.\n\nThe potential will be computed as `w*exp(-0.5 * |f_i - f_j|^2)`.\n\n### Pairwise potentials for N-D\n\nUser @markusnagel has written a couple numpy-functions generalizing the two\nclassic 2-D image pairwise potentials (gaussian and bilateral) to an arbitrary\nnumber of dimensions: `create_pairwise_gaussian` and `create_pairwise_bilateral`.\nYou can access them as `from pydensecrf.utils import create_pairwise_gaussian`\nand then have a look at their docstring to see how to use them.\n\nLearning\n--------\n\nThe learning has not been fully wrapped. If you need it, get in touch or better\nyet, wrap it and submit a pull-request!\n\nHere's a pointer for starters: issue#24. We need to wrap the gradients and getting/setting parameters.\nBut then, we also need to do something with these, most likely call [minimizeLBFGS from optimization.cpp](https://github.com/lucasb-eyer/pydensecrf/blob/d824b89ee3867bca3e90b9f04c448f1b41821524/pydensecrf/densecrf/src/optimization.cpp).\nIt should be relatively straightforward to just follow the learning examples included in the [original code](http://graphics.stanford.edu/projects/drf/densecrf_v_2_2.zip).\n\nCommon Problems\n===============\n\n`undefined symbol` when importing\n---------------------------------\n\nIf while importing pydensecrf you get an error about some undefined symbols (for example `.../pydensecrf/densecrf.so: undefined symbol: _ZTINSt8ios_base7failureB5cxx11E`), you most likely are inadvertently mixing different compilers or toolchains. Try to see what's going on using tools like `ldd`. If you're using Anaconda, [running `conda install libgcc` might be a solution](https://github.com/lucasb-eyer/pydensecrf/issues/28).\n\nValueError: Buffer dtype mismatch, expected 'float' but got 'double'\n--------------------------------------------------------------------\n\nThis is a pretty [co](https://github.com/lucasb-eyer/pydensecrf/issues/52)mm[on](https://github.com/lucasb-eyer/pydensecrf/issues/49) user error.\nIt means exactly what it says: you are passing a `double` but it wants a `float`.\nSolve it by, for example, calling `d.setUnaryEnergy(U.astype(np.float32))` instead of just `d.setUnaryEnergy(U)`, or using `float32` in your code in the first place.\n\nMy results are all pixelated like [MS Paint's airbrush tool](http://lmgtfy.com/?q=MS+Paint+Airbrush+tool)!\n----------------------------------------------------------\n\nYou screwed up reshaping somewhere and treated the class/label dimension as spatial dimension.\nThis is you misunderstanding NumPy's memory layout and nothing that PyDenseCRF can detect or help with.\n\nThis mistake often happens for the Unary, see the [**Note** in that section of the README](https://github.com/lucasb-eyer/pydensecrf#unary-potential).\n\n\nMaintaining\n===========\n\nThese are instructions for maintainers about how to release new versions. (Mainly instructions for myself.)\n\n```\n# Go increment the version in setup.py\n> python setup.py build_ext\n> python setup.py sdist\n> twine upload dist/pydensecrf-VERSION_NUM.tar.gz\n```\n\nAnd that's it. At some point, it would be cool to automate this on [TravisCI](https://docs.travis-ci.com/user/deployment/pypi/), but not worth it yet.\nAt that point, looking into [creating \"manylinux\" wheels](https://github.com/pypa/python-manylinux-demo) might be nice, too.\n\nTesting\n=======\n\nThanks to @MarvinTeichmann we now have proper tests, install the package and run `py.test`.\nMaybe there's a better way to run them, but both of us don't know :smile:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E7D6:3FD49:1782FB:5DCE57:6AB92B6A"},"text_sha256":"3b6ff3ac358b8d4194b3aba11350492641c7a860a7ecadc5ce9eddacac79fb2f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"patrikhuber/eos","input_row":{"repository":"patrikhuber/eos","url":"https://github.com/patrikhuber/eos","name":"eos","owner":"patrikhuber","description":"A lightweight 3D Morphable Face Model library in modern C++","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1981,"issues":313,"created_at":"2015-02-10T16:09:02Z","updated_at":"2026-09-03T06:02:44Z","first_commit_at":"2015-02-10T12:20:14Z","last_commit_at":"2025-02-02T22:28:12Z","activity_months":119.76000000000001,"ai_ml_match_topics":"machine-learning; computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:53.141Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"patrikhuber/eos","visibility":"public","created_at":"2015-02-10T16:09:02Z","updated_at":"2026-09-03T06:02:44Z","private":false,"fork":false,"archived":false,"stargazers_count":1981,"open_issues_count":31,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2283","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:17866A9:1BA94B9:6AB92B6D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2282","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092F:E80A6:17ABDBD:1BD08B5:6AB92B6D"},"commit":{"sha":"f123e518c3a85bb5deaf9d17e7c11931ede9225a","url":"https://github.com/patrikhuber/eos/commit/f123e518c3a85bb5deaf9d17e7c11931ede9225a","date":"2018-05-22T20:45:59Z","author_date":"2018-05-22T20:45:59Z","committer_date":"2018-05-22T20:45:59Z","tree_sha":"732a52a598eed1d2e29fd644718ae1aaca904f90","message_first_line":"Set the vertex_idx in the fitting depending on whether the model contains landmark definitions"},"tree_request_status":200,"tree_rate":{"github_remaining":"2281","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DE:DC698:17F9F66:1C1E086:6AB92B6E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9274,"blob_sha":"5ef1f153f6963fc4327ac7d52b8e6f8f2303f366","priority":0}],"documents":[{"path":"README.md","size":9274,"blob_sha":"5ef1f153f6963fc4327ac7d52b8e6f8f2303f366","priority":0,"status":200,"text":"# eos: A lightweight header-only 3D Morphable Face Model fitting library in modern C++11/14.\n[![Latest release](http://img.shields.io/github/release/patrikhuber/eos.svg?style=flat-square)][release]\n[![Linux build status of master branch](https://img.shields.io/travis/patrikhuber/eos/master.svg?style=flat-square&label=Linux/macOS%3A%20build)][travis]\n[![Windows build status of master branch](https://ci.appveyor.com/api/projects/status/gekekpn08cdgqcsk/branch/master?svg=true&passingText=Windows%3A%20build%20passing&failingText=Windows%3A%20build%20failing&pendingText=Windows%3A%20build%20pending)][appveyor]\n[![Apache License 2.0](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat-square)][license]\n\n[release]: https://github.com/patrikhuber/eos/releases\n[travis]: https://travis-ci.org/patrikhuber/eos\n[appveyor]: https://ci.appveyor.com/project/patrikhuber/eos/branch/master\n[license]: https://github.com/patrikhuber/eos/blob/master/LICENSE\n\neos is a lightweight 3D Morphable Face Model fitting library that provides basic functionality to use face models, as well as camera and shape fitting functionality. It's written in modern C++11/14.\n\nAt the moment, it mainly provides the following functionality:\n\n* MorphableModel and PcaModel classes to represent 3DMMs, with basic operations like `draw_sample()`. Supports the Surrey Face Model (SFM) and the Basel Face Model (BFM) 2009 and 2017 out-of-the-box\n* Our low-resolution, shape-only 3D Morphable Face Model ([share/sfm_shape_3448.bin](https://github.com/patrikhuber/eos/blob/master/share/sfm_shape_3448.bin))\n* Fast, linear pose, shape and expression fitting, edge and contour fitting:\n  * Linear scaled orthographic projection camera pose estimation\n  * Linear shape-to-landmarks fitting, implementation of O. Aldrian & W. Smith, _Inverse Rendering of Faces with a 3D Morphable Model_, PAMI 2013\n  * Expression fitting, and 6 linear expression blendshapes: anger, disgust, fear, happiness, sadness, surprise\n  * Edge-fitting, heavily inspired by: A. Bas et al., _Fitting a 3D Morphable Model to Edges: A Comparison Between Hard and Soft Correspondences_, ACCVW 2016\n* Isomap texture extraction to obtain a pose-invariant representation of the face texture\n* **Python bindings**: Much of eos's functionality is available as a python module (try `pip install eos-py`!)\n* (_Experimental_): Non-linear fitting cost functions using Ceres for shape, camera, blendshapes and the colour model (needs Ceres to be installed separately)\n\nAn experimental model viewer to visualise 3D Morphable Models and blendshapes is available [here](https://github.com/patrikhuber/eos-model-viewer).\n\n## Usage\n\n* Tested with the following compilers: >=gcc-6, >=clang-5, >=Visual Studio 2017 15.5, >=Xcode 9.2.\n* The library and python bindings **do not require any external dependencies**. The example applications require Boost (>=1.50.0) and OpenCV (>=2.4.3).\n\nTo use the library in your own project, just add the following directories to your include path:\n\n* `eos/include`\n* `eos/3rdparty/cereal/include`\n* `eos/3rdparty/glm`\n* `eos/3rdparty/nanoflann/include`\n* `eos/3rdparty/eigen/Eigen`\n* `eos/3rdparty/eigen3-nnls/src`\n* `eos/3rdparty/toml11`\n\n**Make sure to clone with `--recursive` to download the required submodules!**\n\n### Build the examples and tests\n\n* Needed dependencies for the example app: CMake (>=3.8.2, or >=3.10.0 for VS2017), Boost system, filesystem, program_options (>=1.50.0), OpenCV core, imgproc, highgui (>=2.4.3).\n\nTo build:\n\n```\ngit clone --recursive https://github.com/patrikhuber/eos.git\nmkdir build && cd build # creates a build directory next to the 'eos' folder\ncmake -G \"<your favourite generator>\" ../eos -DCMAKE_INSTALL_PREFIX=../install/\nmake && make install # or open the project file and build in an IDE like Visual Studio\n```\nIt is strongly recommended to use [vcpkg](https://github.com/Microsoft/vcpkg/) to install the dependencies on Windows.\nUsers who wish to manage dependencies manually may find it helpful to copy `initial_cache.cmake.template` to `initial_cache.cmake`, edit the necessary paths and run `cmake` with `-C ../eos/initial_cache.cmake`. On Linux, you may also want to set `-DCMAKE_BUILD_TYPE=...` appropriately.\n\n\n## Sample code\n\nThe fit-model example app creates a 3D face from a 2D image.\n\nAfter `make install` or running the `INSTALL` target, an example image with landmarks can be found in `install/bin/data/`. The model and the necessary landmarks mapping file are installed to `install/share/`.\n\nYou can run the example just by running:\n\n`fit-model`\n\nIt will load the face model, landmark-to-vertex mappings, blendshapes, and other required files from the `../share/` directory, and run on the example image. It can be run on other images by giving it a `-i` parameter for the image and `-l` for a set of ibug landmarks. The full set of parameters can be viewed by running `fit-model --help`.\n\nIf you are just getting started, it is recommended to have a look at `fit-model-simple` too, as it requires much fewer input, and only fits pose and shape, without any blendshapes or edge-fitting. Its full set of arguments is:\n\n`fit-model-simple -m ../share/sfm_shape_3448.bin -p ../share/ibug_to_sfm.txt -i data/image_0010.png -l data/image_0010.pts`\n\nThe output in both cases is an `obj` file with the shape and a `png` with the extracted isomap. The estimated pose angles and shape coefficients are available in the code via the API.\n\nSee [examples/fit-model.cpp](https://github.com/patrikhuber/eos/blob/master/examples/fit-model.cpp) for the full code.\n\n## The Surrey Face Model\n\nThe library includes a low-resolution shape-only version of the Surrey Morphable Face Model. It is a PCA model of shape variation built from 3D face scans. It comes with uv-coordinates to perform texture remapping.\n\n<img src=\"https://raw.githubusercontent.com/patrikhuber/eos/gh-pages/images/sfm_shape_3448_mesh.png\" width=20% alt=\"Face Model Picture\"><\/img>\n\nThe full model is available at [http://www.cvssp.org/facemodel](http://www.cvssp.org/facemodel).\n\n## Python bindings\n\neos includes python bindings for some of its functionality (and more can be added!). It can be installed from [PyPI](https://pypi.org/project/eos-py/) with `pip install eos-py`. You will still need the data files from this repository.\nMake sure that you've got >=gcc-7 or >=clang-5 as the default compiler on Linux (for example from the [ubuntu-toolchain-r/test](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test) repository) or do ``CC=`which gcc-7` CXX=`which g++-7` pip install eos-py``. Also make sure you've got >=cmake-3.8.2 (or >=cmake-3.10.0 for VS2017) in your path.\nIn case of issues, the bindings can also be built manually: Clone the repository and set `-DEOS_GENERATE_PYTHON_BINDINGS=on` when running `cmake` (and optionally set `PYTHON_EXECUTABLE` to point to your python interpreter if it's not found automatically).\n\nAfter having obtained the bindings, they can be used like any python module:\n\n```\nimport eos\nimport numpy as np\n\nmodel = eos.morphablemodel.load_model(\"eos/share/sfm_shape_3448.bin\")\nsample = model.get_shape_model().draw_sample([1.0, -0.5, 0.7])\n\nhelp(eos) # check the documentation\n```\n\nSee [`demo.py`](https://github.com/patrikhuber/eos/blob/master/python/demo.py) for an example on how to run the fitting.\n\n## Matlab bindings\n\n_Experimental (not maintained currently)_: eos includes Matlab bindings for the `fit_shape_and_pose(...)` function, which means the fitting can be run from Matlab. Set `-DEOS_GENERATE_MATLAB_BINDINGS=on` when running `cmake` to build the required mex-file and run the `INSTALL` target to install everything. (Set `Matlab_ROOT_DIR` to point to your Matlab directory if it's not found automatically). More bindings (e.g. the MorphableModel itself) might be added in the future.\n\nGo to the `install/eos/matlab` directory and run [`demo.m`](https://github.com/patrikhuber/eos/blob/master/matlab/demo.m) to see how to run the fitting. The result is a mesh and rendering parameters (pose).\n\n## Documentation\n\nDoxygen: http://patrikhuber.github.io/eos/doc/\n\nThe [fit-model example](https://github.com/patrikhuber/eos/blob/master/examples/fit-model.cpp) and the [Namespace List](http://patrikhuber.github.io/eos/doc/namespaces.html) in doxygen are a good place to start.\n\n\n## License & contributions\n\nThis code is licensed under the Apache License, Version 2.0. The 3D morphable face model under [share/sfm_shape_3448.bin](https://github.com/patrikhuber/eos/blob/master/share/sfm_shape_3448.bin) is free for use for non-commercial purposes. For commercial purposes and to obtain other model resolutions, see [http://www.cvssp.org/facemodel](http://www.cvssp.org/facemodel).\n\nContributions are very welcome! (best in the form of pull requests.) Please use GitHub issues for any bug reports, ideas, and discussions.\n\nIf you use this code in your own work, please cite the following paper: _A Multiresolution 3D Morphable Face Model and Fitting Framework_, P. Huber, G. Hu, R. Tena, P. Mortazavian, W. Koppen, W. Christmas, M. Rätsch, J. Kittler, International Conference on Computer Vision Theory and Applications (VISAPP) 2016, Rome, Italy [[PDF]](http://www.patrikhuber.ch/files/3DMM_Framework_VISAPP_2016.pdf).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D216:18233:17A606:5DF04A:6AB92B6D"},"text_sha256":"06ec38bf999dbbffb1336008554fc4f877d5193d1c705fb00b643190201486d8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2280","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0888:0BA1:D8A8FE:FE9EC6:6AB92B6F"},"commit":{"sha":"ce984207a51c2edd2e7568a64fec9b98ef61aeed","url":"https://github.com/patrikhuber/eos/commit/ce984207a51c2edd2e7568a64fec9b98ef61aeed","date":"2025-02-02T22:28:12Z","author_date":"2025-02-02T22:28:12Z","committer_date":"2025-02-02T22:28:12Z","tree_sha":"750ed1f3e4b4b37750fec56a766f6000f531c12c","message_first_line":"Bump upload-artifact@v3 to v4 in cibuildwheel.yml and build_wheels.yml since v3 is deprecated"},"tree_request_status":200,"tree_rate":{"github_remaining":"2279","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:17F3841:1C17BE9:6AB92B6F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9800,"blob_sha":"d66e2b2e757206968abbf74764e977aedb16f41a","priority":0}],"documents":[{"path":"README.md","size":9800,"blob_sha":"d66e2b2e757206968abbf74764e977aedb16f41a","priority":0,"status":200,"text":"# eos: A lightweight header-only 3D Morphable Face Model fitting library in modern C++11/14.\n[![Latest release](http://img.shields.io/github/release/patrikhuber/eos.svg?style=flat-square)][release]\n[![Build status of master branch](https://github.com/patrikhuber/eos/actions/workflows/cmake.yml/badge.svg)][github-actions-build]\n[![Apache License 2.0](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat-square)][license]\n[![Sponsor eos on GitHub Sponsors](https://img.shields.io/static/v1?style=flat-square&label=Sponsor&message=%E2%9D%A4&logo=GitHub)][sponsor]\n\n[release]: https://github.com/patrikhuber/eos/releases\n[github-actions-build]: https://github.com/patrikhuber/eos/actions\n[license]: https://github.com/patrikhuber/eos/blob/master/LICENSE\n[sponsor]: https://github.com/sponsors/patrikhuber\n\neos is a lightweight 3D Morphable Face Model fitting library that provides basic functionality to use face models, as well as camera and shape fitting functionality. It's written in modern C++11/14.\n\nAt the moment, it mainly provides the following functionality:\n\n* MorphableModel and PcaModel classes to represent 3DMMs, with basic operations like `draw_sample()`. Supports the Surrey Face Model (SFM), 4D Face Model (4DFM), Basel Face Model (BFM) 2009 and 2017, and the Liverpool-York Head Model (LYHM) out-of-the-box\n* The low-resolution, shape-only Surrey Face Model ([share/sfm_shape_3448.bin](https://github.com/patrikhuber/eos/blob/master/share/sfm_shape_3448.bin))\n* Fast, linear pose, shape and expression fitting, edge and contour fitting:\n  * Linear scaled orthographic projection camera pose estimation\n  * Linear shape-to-landmarks fitting, implementation of O. Aldrian & W. Smith, _Inverse Rendering of Faces with a 3D Morphable Model_, PAMI 2013\n  * Expression fitting, with 6 linear expression blendshapes of the SFM: anger, disgust, fear, happiness, sadness, surprise\n  * Edge-fitting, heavily inspired by: A. Bas et al., _Fitting a 3D Morphable Model to Edges: A Comparison Between Hard and Soft Correspondences_, ACCVW 2016\n* Texture extraction to obtain a pose-invariant representation of the face texture\n* **Python bindings**: Much of eos's functionality is available as a python module (try `pip install eos-py`!)\n* (_Experimental_): Non-linear fitting cost functions using Ceres for shape, camera, blendshapes and the colour model (needs Ceres to be installed separately)\n\nAn experimental model viewer to visualise 3D Morphable Models and blendshapes is available [here](https://github.com/patrikhuber/eos-model-viewer).\n\n## Usage\n\n* Tested with the following compilers: >=gcc-6, >=clang-5, >=Visual Studio 2017 15.5, >=Xcode 9.2.\n* The library and python bindings **do not require any external dependencies**. The example applications require Boost (>=1.71.0) and OpenCV (>=2.4.3).\n\nTo use the library in your own project, just add the following directories to your include path:\n\n* `eos/include`\n* `eos/3rdparty/cereal/include`\n* `eos/3rdparty/nanoflann/include`\n* `eos/3rdparty/eigen/Eigen`\n* `eos/3rdparty/eigen3-nnls/src`\n* `eos/3rdparty/toml11`\n\n**Make sure to clone with `--recursive` to download the required submodules!**\n\n### Build the examples and tests\n\n* Needed dependencies for the example app: CMake (>=3.8.2, or >=3.10.0 for MSVC), Boost system, filesystem, program_options (>=1.71.0), OpenCV core, imgproc, highgui (>=2.4.3).\n\nTo build:\n\n```\ngit clone --recursive https://github.com/patrikhuber/eos.git\nmkdir build && cd build # creates a build directory next to the 'eos' folder\ncmake -G \"<your favourite generator>\" ../eos -DCMAKE_INSTALL_PREFIX=../install/\nmake && make install # or open the project file and build in an IDE like Visual Studio\n```\nIt is strongly recommended to use [vcpkg](https://github.com/Microsoft/vcpkg/) to install the dependencies on Windows.\nUsers who wish to manage dependencies manually may find it helpful to copy `initial_cache.cmake.template` to `initial_cache.cmake`, edit the necessary paths and run `cmake` with `-C ../eos/initial_cache.cmake`. On Linux, you may also want to set `-DCMAKE_BUILD_TYPE=...` appropriately.\n\n\n## Sample code\n\nThe fit-model example app creates a 3D face from a 2D image.\n\nAfter `make install` or running the `INSTALL` target, an example image with landmarks can be found in `install/bin/data/`. The model and the necessary landmarks mapping file are installed to `install/share/`.\n\nYou can run the example just by running:\n\n`fit-model`\n\nIt will load the face model, landmark-to-vertex mappings, blendshapes, and other required files from the `../share/` directory, and run on the example image. It can be run on other images by giving it a `-i` parameter for the image and `-l` for a set of ibug landmarks. The full set of parameters can be viewed by running `fit-model --help`.\n\nIf you are just getting started, it is recommended to have a look at `fit-model-simple` too, as it requires much fewer input, and only fits pose and shape, without any blendshapes or edge-fitting. Its full set of arguments is:\n\n`fit-model-simple -m ../share/sfm_shape_3448.bin -p ../share/ibug_to_sfm.txt -i data/image_0010.png -l data/image_0010.pts`\n\nThe output in both cases is an `obj` file with the shape and a `png` with the extracted texture map. The estimated pose angles and shape coefficients are available in the code via the API.\n\nSee [examples/fit-model.cpp](https://github.com/patrikhuber/eos/blob/master/examples/fit-model.cpp) for the full code.\n\n## The Surrey Face Model\n\nThe library includes a low-resolution shape-only version of the Surrey Morphable Face Model. It is a PCA model of shape variation built from 3D face scans. It comes with uv-coordinates to perform texture remapping.\n\n<img src=\"https://raw.githubusercontent.com/patrikhuber/eos/gh-pages/images/sfm_shape_3448_mesh.png\" width=20% alt=\"Surrey Face Model shape picture\"><\/img>\n\nThe full model is available at [http://www.cvssp.org/facemodel](http://www.cvssp.org/facemodel).\n\n## 4D Face Model (4DFM)\n\neos can be used to load, use and do basic fitting with the 4D Face Model (4DFM) from [4dface Ltd](https://www.4dface.io). The model features 39 expressions/action units, and diverse identity variation.\n\n<img src=\"https://raw.githubusercontent.com/patrikhuber/eos/gh-pages/images/4dfm_color_sample.jpg\" width=20% alt=\"4D Face Model colour picture\"><\/img>\n<img src=\"https://raw.githubusercontent.com/patrikhuber/eos/gh-pages/images/4dfm_shape.png\" width=20% alt=\"4D Face Model shape picture\"><\/img>\n\nMore information about the model can be found on [www.4dface.io/4dfm](https://www.4dface.io/4dfm/).\n\n## Python bindings\n\neos includes python bindings for some of its functionality (and more can be added!). It can be installed from [PyPI](https://pypi.org/project/eos-py/) with `pip install eos-py`. You will still need the data files from this repository.\nMake sure that you've got >=gcc-7 or >=clang-5 as the default compiler on Linux (for example from the [ubuntu-toolchain-r/test](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test) repository) or do ``CC=`which gcc-7` CXX=`which g++-7` pip install eos-py``. Also make sure you've got >=cmake-3.8.2 (or >=cmake-3.10.0 for MSVC) in your path.\nIn case of issues, the bindings can also be built manually: Clone the repository and set `-DEOS_GENERATE_PYTHON_BINDINGS=on` when running `cmake` (and optionally set `PYTHON_EXECUTABLE` to point to your python interpreter if it's not found automatically).\n\nAfter having obtained the bindings, they can be used like any python module:\n\n```\nimport eos\nimport numpy as np\n\nmodel = eos.morphablemodel.load_model(\"eos/share/sfm_shape_3448.bin\")\nsample = model.get_shape_model().draw_sample([1.0, -0.5, 0.7])\n\nhelp(eos) # check the documentation\n```\n\nSee [`demo.py`](https://github.com/patrikhuber/eos/blob/master/python/demo.py) for an example on how to run the fitting.\n\n## Matlab bindings\n\n_Experimental (not maintained currently)_: eos includes Matlab bindings for the `fit_shape_and_pose(...)` function, which means the fitting can be run from Matlab. Set `-DEOS_GENERATE_MATLAB_BINDINGS=on` when running `cmake` to build the required mex-file and run the `INSTALL` target to install everything. (Set `Matlab_ROOT_DIR` to point to your Matlab directory if it's not found automatically). More bindings (e.g. the MorphableModel itself) might be added in the future.\n\nGo to the `install/eos/matlab` directory and run [`demo.m`](https://github.com/patrikhuber/eos/blob/master/matlab/demo.m) to see how to run the fitting. The result is a mesh and rendering parameters (pose).\n\n## Documentation\n\nDoxygen: http://patrikhuber.github.io/eos/doc/\n\nThe [fit-model example](https://github.com/patrikhuber/eos/blob/master/examples/fit-model.cpp) and the [Namespace List](http://patrikhuber.github.io/eos/doc/namespaces.html) in doxygen are a good place to start.\n\n\n## License & contributions\n\nThis code is licensed under the Apache License, Version 2.0. The 3D morphable face model under [share/sfm_shape_3448.bin](https://github.com/patrikhuber/eos/blob/master/share/sfm_shape_3448.bin) is free for use for non-commercial purposes. For commercial purposes and to obtain other model resolutions, see [http://www.cvssp.org/facemodel](http://www.cvssp.org/facemodel).\n\nContributions are very welcome! (best in the form of pull requests.) Please use GitHub issues for any bug reports, ideas, and discussions.\n\nIf you use this code in your own work, please cite the following paper: _A Multiresolution 3D Morphable Face Model and Fitting Framework_, P. Huber, G. Hu, R. Tena, P. Mortazavian, W. Koppen, W. Christmas, M. Rätsch, J. Kittler, International Conference on Computer Vision Theory and Applications (VISAPP) 2016, Rome, Italy [[PDF]](http://www.patrikhuber.ch/files/3DMM_Framework_VISAPP_2016.pdf).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D224:29FD16:183C5A:5E8781:6AB92B6D"},"text_sha256":"12347dd6ad79d13c621c9970e22ca0897d65aa57ca7440fe15a802b0c6606fd2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"trevorstephens/gplearn","input_row":{"repository":"trevorstephens/gplearn","url":"https://github.com/trevorstephens/gplearn","name":"gplearn","owner":"trevorstephens","description":"Genetic Programming in Python, with a scikit-learn inspired API","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1888,"issues":218,"created_at":"2015-03-26T01:01:14Z","updated_at":"2026-09-24T06:27:38Z","first_commit_at":"2015-03-26T01:01:14Z","last_commit_at":"2026-01-10T21:16:42Z","activity_months":129.56,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:56.190Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"trevorstephens/gplearn","visibility":"public","created_at":"2015-03-26T01:01:14Z","updated_at":"2026-09-24T06:27:38Z","private":false,"fork":false,"archived":false,"stargazers_count":1888,"open_issues_count":17,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2278","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FA:2EA1B4:17DA419:1BFF0D0:6AB92B70"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2277","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:17F72C4:1C1C20B:6AB92B70"},"commit":{"sha":"5270adb7b9523d9219f9ff74e34d8eb1ad0a45c1","url":"https://github.com/trevorstephens/gplearn/commit/5270adb7b9523d9219f9ff74e34d8eb1ad0a45c1","date":"2018-05-12T07:06:41Z","author_date":"2018-05-12T07:06:41Z","committer_date":"2018-05-12T07:06:41Z","tree_sha":"30387ddb5286b4f2a10ad6b97d96e90cf669d494","message_first_line":"Merge branch 'master' of https://github.com/trevorstephens/gplearn"},"tree_request_status":200,"tree_rate":{"github_remaining":"2276","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17D1ABE:1BF646A:6AB92B70"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3883,"blob_sha":"b8c13c49f66ca613400bbe1c226c3fc6f6f75dab","priority":0}],"documents":[{"path":"README.rst","size":3883,"blob_sha":"b8c13c49f66ca613400bbe1c226c3fc6f6f75dab","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/gplearn.svg\n    :target: https://pypi.python.org/pypi/gplearn/\n    :alt: Version\n.. image:: https://img.shields.io/pypi/l/gplearn.svg\n    :target: https://github.com/trevorstephens/gplearn/blob/master/LICENSE\n    :alt: License\n.. image:: https://readthedocs.org/projects/gplearn/badge/?version=stable\n    :target: http://gplearn.readthedocs.io/\n    :alt: Documentation Status\n.. image:: https://travis-ci.org/trevorstephens/gplearn.svg?branch=master\n    :target: https://travis-ci.org/trevorstephens/gplearn\n    :alt: Test Status\n.. image:: https://ci.appveyor.com/api/projects/status/wqq9xxaxuyyt7nya?svg=true\n    :target: https://ci.appveyor.com/project/trevorstephens/gplearn\n    :alt: Windows Test Status\n.. image:: https://coveralls.io/repos/trevorstephens/gplearn/badge.svg\n    :target: https://coveralls.io/r/trevorstephens/gplearn\n    :alt: Test Coverage\n.. image:: https://landscape.io/github/trevorstephens/gplearn/master/landscape.svg?style=flat\n    :target: https://landscape.io/github/trevorstephens/gplearn/master\n    :alt: Code Health\n.. image:: http://depsy.org/api/package/pypi/gplearn/badge.svg\n    :target: http://depsy.org/package/python/gplearn\n    :alt: Research software impact\n\n|\n\n.. image:: https://raw.githubusercontent.com/trevorstephens/gplearn/master/doc/logos/gplearn-wide.png\n    :target: https://github.com/trevorstephens/gplearn\n    :alt: Genetic Programming in Python, with a scikit-learn inspired API\n\n|\n\nWelcome to gplearn!\n===================\n\n`gplearn` implements Genetic Programming in Python, with a `scikit-learn <http://scikit-learn.org>`_ inspired and compatible API.\n\nWhile Genetic Programming (GP) can be used to perform a `very wide variety of tasks <http://www.genetic-programming.org/combined.php>`_, gplearn is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.\n\nSymbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship. It begins by building a population of naive random formulas to represent a relationship between known independent variables and their dependent variable targets in order to predict new data. Each successive generation of programs is then evolved from the one that came before it by selecting the fittest individuals from the population to undergo genetic operations.\n\ngplearn retains the familiar scikit-learn `fit/predict` API and works with the existing scikit-learn `pipeline <http://scikit-learn.org/stable/modules/pipeline.html>`_ and `grid search <http://scikit-learn.org/stable/modules/grid_search.html>`_ modules. The package attempts to squeeze a lot of functionality into a scikit-learn-style API. While there are a lot of parameters to tweak, `reading the documentation <http://gplearn.readthedocs.io/>`_ should make the more relevant ones clear for your problem.\n\ngplearn currently supports regression through the SymbolicRegressor as well as transformation for automated feature engineering with the SymbolicTransformer, which is designed to support regression problems, but should also work for binary classification. Future versions of the package will expand this class to support more complicated multi-target classification problems, and much more is planned too.\n\ngplearn is built on scikit-learn and a fairly recent copy (0.18.1+) is required for `installation <http://gplearn.readthedocs.io/en/stable/installation.html>`_. If you come across any issues in running or installing the package, `please submit a bug report <https://github.com/trevorstephens/gplearn/issues>`_.\n\nI hope you get some excellent results from using gplearn! If you do, please `drop me a line on my blog <http://trevorstephens.com>`_ about how you used it.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CA2:3EACB:17ACE0:5DF845:6AB92B70"},"text_sha256":"d26159acff2a53ddccd3eb18b06c29d64e5fc3a7c1846d84d71b19b51b6865f2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2275","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17C7CD3:1BEBB96:6AB92B71"},"commit":{"sha":"0390aea8639ce5f6c0b388400e07b58c05acad6a","url":"https://github.com/trevorstephens/gplearn/commit/0390aea8639ce5f6c0b388400e07b58c05acad6a","date":"2026-01-10T21:16:42Z","author_date":"2026-01-10T21:16:42Z","committer_date":"2026-01-10T21:16:42Z","tree_sha":"c50e3835c03528e260535d1e763d2a5f6e70566e","message_first_line":"Bugfix for `argsort` ordering. (#301)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2274","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0922:1B4E7A:17AF026:1BD38A4:6AB92B72"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3311,"blob_sha":"077cc53ea0e1810f20057cd4f1be711d8d1f10bc","priority":0}],"documents":[{"path":"README.rst","size":3311,"blob_sha":"077cc53ea0e1810f20057cd4f1be711d8d1f10bc","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/gplearn.svg\n    :target: https://pypi.python.org/pypi/gplearn/\n    :alt: Version\n.. image:: https://img.shields.io/pypi/l/gplearn.svg\n    :target: https://github.com/trevorstephens/gplearn/blob/main/LICENSE\n    :alt: License\n.. image:: https://readthedocs.org/projects/gplearn/badge/?version=stable\n    :target: http://gplearn.readthedocs.io/\n    :alt: Documentation Status\n.. image:: https://github.com/trevorstephens/gplearn/actions/workflows/build.yml/badge.svg\n    :target: https://github.com/trevorstephens/gplearn/actions/workflows/build.yml\n    :alt: Test Status\n.. image:: https://coveralls.io/repos/trevorstephens/gplearn/badge.svg\n    :target: https://coveralls.io/r/trevorstephens/gplearn\n    :alt: Test Coverage\n.. image:: https://app.codacy.com/project/badge/Grade/02506317148e41a4b68a66e4c4e2b035\n    :target: https://app.codacy.com/gh/trevorstephens/gplearn/dashboard\n    :alt: Code Health\n\n|\n\n.. image:: https://raw.githubusercontent.com/trevorstephens/gplearn/master/doc/logos/gplearn-wide.png\n    :target: https://github.com/trevorstephens/gplearn\n    :alt: Genetic Programming in Python, with a scikit-learn inspired API\n\n|\n\nWelcome to gplearn!\n===================\n\n`gplearn` implements Genetic Programming in Python, with a `scikit-learn <http://scikit-learn.org>`_ inspired and compatible API.\n\nWhile Genetic Programming (GP) can be used to perform a `very wide variety of tasks <http://www.genetic-programming.org/combined.php>`_, gplearn is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.\n\nSymbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship. It begins by building a population of naive random formulas to represent a relationship between known independent variables and their dependent variable targets in order to predict new data. Each successive generation of programs is then evolved from the one that came before it by selecting the fittest individuals from the population to undergo genetic operations.\n\ngplearn retains the familiar scikit-learn `fit/predict` API and works with the existing scikit-learn `pipeline <https://scikit-learn.org/stable/modules/compose.html>`_ and `grid search <http://scikit-learn.org/stable/modules/grid_search.html>`_ modules. The package attempts to squeeze a lot of functionality into a scikit-learn-style API. While there are a lot of parameters to tweak, `reading the documentation <http://gplearn.readthedocs.io/>`_ should make the more relevant ones clear for your problem.\n\ngplearn supports regression through the SymbolicRegressor, binary classification with the SymbolicClassifier, as well as transformation for automated feature engineering with the SymbolicTransformer, which is designed to support regression problems, but should also work for binary classification.\n\ngplearn is built on scikit-learn and a fairly recent copy is required for `installation <http://gplearn.readthedocs.io/en/stable/installation.html>`_. If you come across any issues in running or installing the package, `please submit a bug report <https://github.com/trevorstephens/gplearn/issues>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6884:3CC8A:17D8AB:5E24B8:6AB92B71"},"text_sha256":"a61086121660af43c65b9fda6940d5f108c7276798a3b33e8d20d11fbb1e6cae"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"byzer-org/byzer-lang","input_row":{"repository":"byzer-org/byzer-lang","url":"https://github.com/byzer-org/byzer-lang","name":"byzer-lang","owner":"byzer-org","description":"Byzer (former MLSQL): A low-code open-source programming language for data pipeline, analytics and AI.","language":"Scala","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1834,"issues":588,"created_at":"2016-04-28T07:06:14Z","updated_at":"2026-09-26T13:29:16Z","first_commit_at":"2016-04-28T07:04:13Z","last_commit_at":"2024-05-29T08:23:59Z","activity_months":97.010000000000005,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:42:58.678Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"byzer-org/byzer-lang","visibility":"public","created_at":"2016-04-28T07:06:14Z","updated_at":"2026-09-26T13:29:16Z","private":false,"fork":false,"archived":false,"stargazers_count":1834,"open_issues_count":121,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2273","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0826:35D5A8:17D5541:1BFA055:6AB92B72"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2272","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:180102F:1C25342:6AB92B73"},"commit":{"sha":"2e009c28ee3fb7b98707d922ab03b413da5695fe","url":"https://github.com/byzer-org/byzer-lang/commit/2e009c28ee3fb7b98707d922ab03b413da5695fe","date":"2018-05-24T10:54:22Z","author_date":"2018-05-24T10:54:22Z","committer_date":"2018-05-24T10:54:22Z","tree_sha":"6490404ed877f92a80a14381ba5d089b7abc4a98","message_first_line":"Merge pull request #227 from allwefantasy/mlsql"},"tree_request_status":200,"tree_rate":{"github_remaining":"2271","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:18383A4:1C5C9A7:6AB92B73"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12855,"blob_sha":"5aec7c29e7fd44590096e279cab75cc932f08ecb","priority":0}],"documents":[{"path":"README.md","size":12855,"blob_sha":"5aec7c29e7fd44590096e279cab75cc932f08ecb","priority":0,"status":200,"text":"# StreamingPro 中文文档\n\n[五分钟快速上手和体验](https://github.com/allwefantasy/streamingpro/blob/master/docs/quick-tutorial.md)\n\n## 编译\n\n* [编译文档](https://github.com/allwefantasy/streamingpro/blob/master/docs/compile.md)\n\n## 作为服务运行\n\n* [运行StreamingPro Server](https://github.com/allwefantasy/streamingpro/blob/master/docs/run-server.md)\n\n## 使用MLSQL做机器学习\n* [MLSQL使用SKLearn做文本分类实例](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-nlp-example.md)\n* [MLSQL-分布式算法 based on spark MMLib](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-mmlib.md)\n* [MLSQL-深度学习 based on TensorFlow](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-tensorflow.md)\n* [MLSQL-单机算法 based on SKLearn](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-sklearn.md)\n* [MLSQL日志回显](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-log-monitor.md)\n\n\n## 部署模型API服务\n* [如何把模型部署成API服务](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-model-deploy.md)\n\n\n## MLSQL常用功能\n\n* [MLSQL语法说明](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-grammar.md)\n\n* [各数据源读取和写入](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-datasources.md)\n* [如何使用CarbonData作为存储](https://github.com/allwefantasy/streamingpro/blob/master/docs/carbondata.md)\n\n* [常见特征处理模型说明](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-data-processing-model.md)\n* [常见向量操作Vector操作函数](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-functions.md)\n* [如何在MLSQL中运用分词抽词工具](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-analysis.md)\n\n* [网页抓取](https://github.com/allwefantasy/streamingpro/blob/master/docs/crawler.md)\n* [批处理计算](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-batch.md)\n* [流式计算](https://github.com/allwefantasy/streamingpro/blob/master/docs/mlsql-stream.md)\n\n\n\n## 使用配置完成Spark编程\n1. [Spark 批处理](https://github.com/allwefantasy/streamingpro/blob/master/docs/batchjson.md)\n1. [Spark Streaming](https://github.com/allwefantasy/streamingpro/blob/master/docs/sparkstreamingjson.md)\n1. [Structured Streaming](https://github.com/allwefantasy/streamingpro/blob/master/docs/structuredstreamingjson.md)\n1. [StreamingPro对机器学习的支持](https://github.com/allwefantasy/streamingpro/blob/master/docs/mljson.md)\n\n## 概览：\n\n1. [概述](https://github.com/allwefantasy/streamingpro/blob/master/README.md#概述)\n1. [项目模块说明](https://github.com/allwefantasy/streamingpro/blob/master/README.md#项目模块说明)\n1. [编译](https://github.com/allwefantasy/streamingpro/blob/master/docs/compile.md)\n1. [相关概念](https://github.com/allwefantasy/streamingpro/blob/master/README.md#相关概念)\n1. [StreamingPro的一些参数](https://github.com/allwefantasy/streamingpro/blob/master/README.md#StreamingPro的一些参数)\n\n## 周边工具\n1. [StreamingPro Manager](https://github.com/allwefantasy/streamingpro/blob/master/docs/manager.md)\n1. [StreamingPro json文件编辑器支持](https://github.com/allwefantasy/streamingpro/blob/master/README.md#StreamingPro-json文件编辑器支持)\n\n## 实验\n1. [fink支持](https://github.com/allwefantasy/streamingpro/blob/master/docs/flink.md)\n\n## 其他文档\n\n* [英文文档](https://github.com/allwefantasy/streamingpro/blob/master/README-EN.md)\n* [简书专栏](https://www.jianshu.com/c/759bc22b9e15)\n* [源码阅读-深入浅出StreamingPro](https://github.com/allwefantasy/streamingpro/issues/47)\n* [为什么开发MLSQL](https://github.com/allwefantasy/streamingpro/blob/master/docs/why-develop-mlsql.md)\n* [SQL服务](https://github.com/allwefantasy/streamingpro/blob/master/docs/sqlservice.md)\n\n\n## 概述\n\nStreamingPro 支持以Spark,Flink等作为底层分布式计算引擎，通过一套统一的配置文件完成批处理，流式计算，Rest服务的开发。\n特点有：\n\n1. 使用Json描述文件完成流式，批处理的开发，不用写代码。\n2. 支持SQL Server,支持XSQL/MLSQL（重点），完成批处理，机器学习，即席查询等功能。\n3. 标准化输入输出，支持UDF函数注册，支持自定义模块开发\n4. 支持Web化管理Spark应用的启动，监控\n\n如果更细节好处有：\n\n1. 跨版本：StreamingPro可以让你不用任何变更就可以轻易的运行在spark 1.6/2.1/2.2上。 \n2. 新语法：提供了新的DSl查询语法/Json配置语法\n3. 程序的管理工具：提供web界面启动/监控 Spark 程序\n4. 功能增强：2.1之后Structured Streaming 不支持kafka 0.8/0.9 ,Structured，此外还有比如spark streaming 支持offset 保存等\n5. 简化Spark SQL Server搭建成本：提供rest接口/thrift 接口，支持spark sql server 的负载均衡，自动将driver 注册到zookeeper上\n6. 探索更多的吧\n\n\n## 项目模块说明\n\n| 模块名\t | 描述  |备注 |\n|:-----------|:------------|:------------|\n|streamingpro-commons | 一些基础工具类||\n|streamingpro-spark-common | Spark有多个版本，所以可以共享一些基础的东西||\n|streamingpro-flink |  streamingpro对flink的支持||\n|streamingpro-spark  | streamingpro对spark 1.6.x的支持||\n|streamingpro-spark-2.0 | streamingpro对spark 2.x的支持||\n|streamingpro-api | streamingpro把底层的spark API暴露出来，方便用户灵活处理问题||\n|streamingpro-manager | 通过该模块，可以很方便的通过web界面启动，管理，监控 spark相关的应用||\n|streamingpro-dls | 自定义connect,load,select,save,train,register等语法，便于用类似sql的方式做批处理任务,机器学习等||\n\n## 相关概念\n\n如果你使用StreamingPro，那么所有的工作都是在编辑一个Json配置文件。通常一个处理流程，会包含三个概念：\n\n1. 多个输入\n2. 多个连续/并行的数据处理\n3. 多个输出\n\nStreamingPro会通过'compositor'的概念来描述他们，你可以理解为一个处理单元。一个典型的输入compositor如下：\n\n```\n{\n        \"name\": \"batch.sources\",\n        \"params\": [\n          {\n            \"path\": \"file:///tmp/hdfsfile/abc.txt\",\n            \"format\": \"json\",\n            \"outputTable\": \"test\"\n\n          },\n           {\n              \"path\": \"file:///tmp/parquet/\",\n              \"format\": \"parquet\",\n              \"outputTable\": \"test2\"\n\n            }\n        ]\n}\n```\n\n`batch.sources` 就是一个compositor的名字。 这个compositor 把一个本地磁盘的文件映射成了一张表，并且告知系统，abc.txt里的内容\n 是json格式的。这样，我们在后续的compositor模块就可以使用这个`test`表名了。通常，StreamingPro希望整个处理流程，\n 也就是不同的compositor都采用表来进行衔接。\n\n StreamingPro不仅仅能做批处理，还能做流式，流式支持Spark Streaming,Structured Streaming。依然以输入compositor为例，假设\n 我们使用的是Structured Streaming,则可以如下配置。\n\n ```\n {\n         \"name\": \"ss.sources\",\n         \"params\": [\n           {\n             \"format\": \"kafka9\",\n             \"outputTable\": \"test\",\n             \"kafka.bootstrap.servers\": \"127.0.0.1:9092\",\n             \"topics\": \"test\",\n             \"path\": \"-\"\n           },\n           {\n             \"format\": \"com.databricks.spark.csv\",\n             \"outputTable\": \"sample\",\n             \"header\": \"true\",\n             \"path\": \"/Users/allwefantasy/streamingpro/sample.csv\"\n           }\n         ]\n       }\n ```\n\n 第一个表示我们对接的数据源是kafka 0.9，我们把Kafka的数据映射成表test。 因为我们可能还需要一些元数据，比如ip和城市的映射关系，\n 所以我们还可以配置一些其他的非流式的数据源，我们这里配置了一个smaple.csv文件，并且命名为表sample。\n \n 如果你使用的是kafka >= 1.0,则 topics 参数需要换成'subscribe',并且使用时可能需要对内容做下转换，类似：\n  \n  ```\n  select CAST(key AS STRING) as k, CAST(value AS STRING) as v from test\n  ```\n  \n 启动时，你需要把-streaming.platform 设置为 `ss`。 \n\n 如果我们的输入输出都是Hive的话，可能就不需要batch.sources/batch.outputs 等组件了，通常一个batch.sql就够了。比如：\n\n ```\n \"without-sources-job\": {\n     \"desc\": \"-\",\n     \"strategy\": \"spark\",\n     \"algorithm\": [],\n     \"ref\": [],\n     \"compositor\": [\n       {\n         \"name\": \"batch.sql\",\n         \"params\": [\n           {\n             \"sql\": \"select * from hiveTable\",\n             \"outputTableName\": \"puarquetTable\"\n           }\n         ]\n       },\n       {\n         \"name\": \"batch.outputs\",\n         \"params\": [\n           {\n             \"format\": \"parquet\",\n             \"inputTableName\": \"puarquetTable\",\n             \"path\": \"/tmp/wow\",\n             \"mode\": \"Overwrite\"\n           }\n         ]\n       }\n     ],\n     \"configParams\": {\n     }\n   }\n\n ```\n\n在批处理里，batch.sources/batch.outputs 都是可有可无的，但是对于流式程序，stream.sources/stream.outputs/ss.sources/ss.outputs 则是必须的。\n\n\n## StreamingPro的一些参数\n\n\n| Property Name\t | Default  |Meaning |\n|:-----------|:------------|:------------|\n| streaming.name | (none) required | 等价于 spark.app.name |\n| streaming.master | (none) required | 等价于  spark.master |\n| streaming.duration | 10 seconds| spark streaming 周期，默认单位为秒 |\n| streaming.rest |true/false,default is false | 是否提供http接口|\n| streaming.spark.service |true/false,default is false | 开启该选项时，streaming.platform必须为spark. 该选项会保证spark实例不会退出|\n| streaming.platform | spark/spark_streaming/ss/flink,default is spark | 基于什么平台跑|\n| streaming.checkpoint | (none)|spark streaming checkpoint 目录  |\n| streaming.kafka.offsetPath | (none)| kafka的偏移量保存目录。如果没有设置，会保存在内存中 |\n| streaming.driver.port | 9003| 配置streaming.rest使用，streaming.rest为true,你可以设置一个http端口   |\n| streaming.spark.hadoop.* |(none)| hadoop configuration,eg. -streaming.spark.hadoop.fs.defaultFS hdfs://name:8020  |\n| streaming.job.file.path |(none)| 配置文件路径，默认从hdfs加载  |\n| streaming.jobs |(none)| json配置文件里的job名称，按逗号分隔。如果没有配置该参数，默认运行所有job  |\n| streaming.zk.servers |(none)| 如果把spark作为一个server,那么streamingpro会把driver地址注册到zookeeper上|\n| streaming.zk.conf_root_dir |(none)| 配置streaming.zk.servers使用 |\n|streaming.enableHiveSupport|false|是否支持Hive|\n|streaming.thrift|false|是否thrift server|\n| streaming.sql.source.[name].[参数] |(none)| batch/ss/stream.sources 中，你可以替换里面的任何一个参数 |\n| streaming.sql.out.[name].[参数] |(none)| batch/ss/stream.outputs 中，你可以替换里面的任何一个参数 |\n| streaming.sql.params.[param-name] |(none)| batch/ss/stream.sql中，你是可以写表达式的,比如 select * from :table, 之后你可以通过命令行传递该table参数 |\n\n后面三个参数值得进一步说明：\n\n假设我们定义了两个数据源，firstSource,secondSource,描述如下：\n\n```\n{\n        \"name\": \"batch.sources\",\n        \"params\": [\n          {\n            \"name\":\"firstSource\",\n            \"path\": \"file:///tmp/sample_article.txt\",\n            \"format\": \"com.databricks.spark.csv\",\n            \"outputTable\": \"article\",\n            \"header\":true\n          },\n          {\n              \"name\":\"secondSource\",\n              \"path\": \"file:///tmp/sample_article2.txt\",\n              \"format\": \"com.databricks.spark.csv\",\n              \"outputTable\": \"article2\",\n              \"header\":true\n            }\n        ]\n      }\n```\n\n我们希望path不是固定的，而是启动时候决定的，这个时候，我们可以在启动脚本中使用-streaming.sql.source.[name].[参数] 来完成这个需求。\n比如：\n\n```\n-streaming.sql.source.firstSource.path  file:///tmp/wow.txt\n```\n\n这个时候，streamingpro启动的时候会动态将path 替换成你要的。包括outputTable等都是可以替换的。\n\n有时候我们需要定时执行一个任务，而sql语句也是动态变化的，具体如下：\n\n```\n{\n        \"name\": \"batch.sql\",\n        \"params\": [\n          {\n            \"sql\": \"select * from test where hp_time=:today\",\n            \"outputTableName\": \"finalOutputTable\"\n          }\n        ]\n      },\n```\n\n这个时候我们在启动streamingpro的时候，通过参数：\n\n```\n-streaming.sql.params.today  \"2017\"\n```\n\n动态替换 sql语句里的:today\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B528:149227:1814F1:5E6192:6AB92B67"},"text_sha256":"6f2a28a03361cef9d4fcf22fe00697f32f02142b5388fa43215dbd88114b7f8a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2270","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:17E7026:1C0B8EF:6AB92B75"},"commit":{"sha":"c772189a2089424e873a94dbf2ced7cc23ad7c21","url":"https://github.com/byzer-org/byzer-lang/commit/c772189a2089424e873a94dbf2ced7cc23ad7c21","date":"2024-05-29T08:23:59Z","author_date":"2024-05-29T08:23:59Z","committer_date":"2024-05-29T08:23:59Z","tree_sha":"6e399b9226ca9f40c4e21a4e359b4e3510d17488","message_first_line":"update"},"tree_request_status":200,"tree_rate":{"github_remaining":"2269","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0910:7580A:180292E:1C27427:6AB92B75"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5552,"blob_sha":"63122ad8ec205feceba9eb66398ae1f9864731e7","priority":0}],"documents":[{"path":"README.md","size":5552,"blob_sha":"63122ad8ec205feceba9eb66398ae1f9864731e7","priority":0,"status":200,"text":" ![CI](https://github.com/byzer-org/byzer-lang/actions/workflows/build_and_test.yml/badge.svg)   [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n<p align=\"center\">\n    <img src=\"/images/Byzer_Logo.png\" alt=\"drawing\"  width=\"200\"/>\n<\/p>\n\n\n## Byzer-lang\n\n**Byzer** (former MLSQL) is a low-code, open-sourced and distributed programming language for data pipeline, analytics and AI in cloud native way.\n\n**Deisgn protocol: Everything is a table.** Byzer is a SQL-like language, to simplify data pipeline, analytics and AI, combined with built-in algorithms and extensions.\n\nWe believe that everything is a table, a simple and powerful SQL-like language can significantly reduce human efforts of data development without switching different tools.\n\n### Byzer Architecture\n\n![Byzer-lang Arch](images/Byzer-arch.png)\n\nYou can build a data product based on Byzer engine & Byzer-lang without interacting with computing framework directly like Spark in your data APP. Thus will simplify your data app significantly. \n\nFor example, Byzer org contributes a data app [Byzer Notebook](https://github.com/byzer-org/byzer-notebook), which provides notebook interaction & workflow GUI interaction.\n\n### BIP (Byzer Improvement Proposal)\n\nByzer project uses the [BIP](https://github.com/byzer-org/byzer-lang/wiki) for the community  collaboration, you can checkout the feature design or architecture design in BIP.\n\n### Online Trial\n\nYou can access the official website [https://www.byzer.org/](https://www.byzer.org/) and try Byzer-lang & Byzer Notebook online.\n\n\n### Download \n\nYou can download Byzer engine via:\n- [https://download.byzer.org/](https://download.byzer.org/)\n- [Byzer Docker Hub](https://hub.docker.com/u/byzer)\n- [Github Release](https://github.com/byzer-org/byzer-lang/releases)\n\nFor more details, please refer to the [docs](https://docs.byzer.org/#/byzer-lang/zh-cn/installation/README)\n\n### Install\n\nFor **dev/test** purpose, you can download [Byzer All In One Package](https://docs.byzer.org/#/byzer-lang/zh-cn/installation/server/byzer-all-in-one-deployment), extract and then execute the command below\n\n```\n$ cd {BYZER_HOME}\n$ ./bin/byzer.sh start\n```\n\n\nAnd for **production** purpose, we recommend to use [Byzer Server Package](https://docs.byzer.org/#/byzer-lang/zh-cn/installation/server/binary-installation) and deploy it on Hadoop.\n\n\nYou can also install [Byzer VSCode Extension](https://docs.byzer.org/#/byzer-lang/zh-cn/installation/vscode/byzer-vscode-extension-installation) to use Byzer-lang. \n\nFor the Docker Image or , please refer to the [docs](https://docs.byzer.org/#/byzer-lang/zh-cn/installation/README)\n\n\n\n### Byzer Code Example\n\nBelow list an example that how to process Github API as a table to get the information of Byzer Org\n\n```sql\n-- Get Github Organization Info\n\n-- set API URL and params\nSET org_name=\"byzer-org\";\nSET GITHUB_ORGANIZATION_URL=\"https://api.github.com/orgs/${org_name}\";\n\n-- Load Github Organization API as table\nLOAD Rest.`$GITHUB_ORGANIZATION_URL` \n where `config.connect-timeout`=\"10s\"\n and `config.method`=\"GET\"\n and `header.accept`=\"application/vnd.github.v3+json\"\nas github_org;\n\n\n-- decode API response from binary to a json string\nselect string(content) as content from github_org as response_content;\n\n-- expand the json string \nrun response_content as JsonExpandExt.`` where inputCol=\"content\" and structColumn=\"true\" as github_org;\n\n-- retrieve user infomation and process as a table\nselect content.* from github_org as org_info;\n\n-- save the table to delta lake\nsave overwrite org_info as delta.`github_info_db.byzer_org`;\n```\n\n\nFor more details about the Byzer-lang grammer, please refer to the user manaual [Byzer-lang Grammar](https://docs.byzer.org/#/byzer-lang/zh-cn/grammar/outline)\n\n### Development\n\n1. Fork this repository and clone to local machine\n\n```\ngit clone https://github.com/{YOUR_GITHUB}/byzer-lang.git\n```\n\n2. Use Intellj Idea to open the project, choose the scala version `2.12.10`\n\n3. In Intellj Idea Maven Setting, check the profile below\n    - gpg\n    - local\n    - scala-2.12\n    - spark-3.0.0\n    - streamingpro-spark-3.0.0-adaptor\n\n4. Click Maven Refresh and wait for Idea load finished\n\n5. Find the class `tech.mlsql.example.app.LocalSparkServiceApp`, click Debug button then Byzer Engine will be started, then you can access the Byzer Web Console in [http://localhost:9003/](http://localhost:9003/#/)\n\n### Build\n\nYou can refer to the project [byzer-org/byzer-build](https://github.com/byzer-org/byzer-build) to check how to build the Byzer engine binary packages and images\n\n### How to contribute to Byzer-Lang\n\nIf you are planning to contribute to this project, please create an issue at [our Issue page](https://github.com/byzer-org/byzer-lang/issues)\neven if the topic is not related to source code itself (e.g., documentation, new idea and proposal).\n\nThis is an active open source project for everyone,\nand we are always open to people who want to use this system or contribute to it.\n\nFor more details about how to contribute to the Byzer Org, please refer to [How to Contribute](https://docs.byzer.org/#/byzer-lang/zh-cn/appendix/contribute)\n\n\n### Contributors\n\n<a href=\"https://github.com/byzer-org/byzer-lang/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=byzer-org/byzer-lang\" />\n<\/a>\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n###  Community\n\n- **Slack**: [byzer-org.slack.com](https://byzer-org.slack.com)\n- **Wechat Official Account:** Byzer Community\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96DA:18233:17A66E:5DF174:6AB92B76"},"text_sha256":"0432b429b10c08d973dd847dd258fc38440600c13b415980e8a38d2600ea3780"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mlcommons/training","input_row":{"repository":"mlcommons/training","url":"https://github.com/mlcommons/training","name":"training","owner":"mlcommons","description":"Reference implementations of MLPerf® training benchmarks","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1772,"issues":377,"created_at":"2018-03-29T21:56:06Z","updated_at":"2026-09-21T12:22:50Z","first_commit_at":"2018-05-02T07:40:49Z","last_commit_at":"2026-09-20T19:46:53Z","activity_months":100.64,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:02.869Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mlcommons/training","visibility":"public","created_at":"2018-03-29T21:56:06Z","updated_at":"2026-09-21T12:22:50Z","private":false,"fork":false,"archived":false,"stargazers_count":1772,"open_issues_count":15,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2268","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:17EC4CE:1C10FF5:6AB92B76"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2267","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:1826CFC:1C4B472:6AB92B77"},"commit":{"sha":"cdb75f06685d8c8b52c43fe456ba8492c480bdf0","url":"https://github.com/mlcommons/training/commit/cdb75f06685d8c8b52c43fe456ba8492c480bdf0","date":"2018-05-13T23:43:35Z","author_date":"2018-05-13T23:43:35Z","committer_date":"2018-05-13T23:43:35Z","tree_sha":"cad77080716fbc11531fbaa95e3596c6610b6071","message_first_line":"Minor spelling tweaks (#39)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2266","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082F:B1202:17A31F1:1BC73E0:6AB92B77"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3141,"blob_sha":"3f94c149a06650528033a9024995e1ede5eff027","priority":0}],"documents":[{"path":"README.md","size":3141,"blob_sha":"3f94c149a06650528033a9024995e1ede5eff027","priority":0,"status":200,"text":"# MLPerf Reference Implementations\n\nThis is a repository of reference implementations for the MLPerf benchmark. These implementations are valid as starting points for benchmark implementations but are not fully optimized and are not intended to be used for \"real\" performance measurements of software frameworks or hardware. \n\n# Preliminary release (v0.5)\n\nThis release is very much an \"alpha\" release -- it could be improved in many ways. The benchmark suite is still being developed and refined, see the Suggestions section below to learn how to contribute. \n\nWe anticipate a significant round of updates at the end of May based on input from users.\n\n# Contents\n\nWe provide reference implementations for each of the 7 benchmarks in the MLPerf suite. \n\n* image_classification - Resnet-50 v1 applied to Imagenet.\n* object_detection - Mask R-CNN applied to COCO. \n* speech_recognition - DeepSpeech2 applied to Librispeech.\n* translation - Transformer applied to WMT English-German.\n* recommendation - Neural Collaborative Filtering applied to MovieLens 20 Million (ml-20m).\n* sentiment_analysis - Seq-CNN applied to IMDB dataset.\n* reinforcement - Mini-go applied to predicting pro game moves.\n\nEach reference implementation provides the following:\n \n* Code that implements the model in at least one framework.\n* A Dockerfile which can be used to run the benchmark in a container.\n* A script which downloads the appropriate dataset.\n* A script which runs and times training the model.\n* Documentation on the dataset, model, and machine setup.\n\n# Running Benchmarks\n\nThese benchmarks have been tested on the following machine configuration:\n\n* 16 CPUs, one Nvidia P100.\n* Ubuntu 16.04, including docker with nvidia support.\n* 600GB of disk (though many benchmarks do require less disk).\n* Either CPython 2 or CPython 3, depending on benchmark (see Dockerfiles for details).\n\nGenerally, a benchmark can be run with the following steps:\n\n1. Setup docker & dependencies. There is a shared script (install_cuda_docker.sh) to do this. Some benchmarks will have additional setup, mentioned in their READMEs.\n2. Download the dataset using `./download_dataset.sh`. This should be run outside of docker, on your host machine. This should be run from the directory it is in (it may make assumptions about CWD).\n3. Optionally, run `verify_dataset.sh` to ensure the was successfully downloaded.\n4. Build and run the docker image, the command to do this is included with each Benchmark. \n\nEach benchmark will run until the target quality is reached and then stop, printing timing results. \n\nSome these benchmarks are rather slow or take a long time to run on the reference hardware (i.e. 16 CPUs and one P100). We expect to see significant performance improvements with more hardware and optimized implementations. \n\n# Suggestions\n\nWe are still in the early stages of developing MLPerf and we are looking for areas to improve, partners, and contributors. If you have recommendations for new benchmarks, or otherwise would like to be involved in the process, please reach out to `info@mlperf.org`. For technical bugs or support, email `support@mlperf.org`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"750E:11316A:17D6BB:5E21E2:6AB92B77"},"text_sha256":"ed5bf511edd8eb65b54ac554adcd211956bf633348390928f84439334d235ac7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2265","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0906:180242:17F7059:1C1B8F4:6AB92B78"},"commit":{"sha":"e8c72a4f0e26abeab626cf32a5b30c5d9e448a60","url":"https://github.com/mlcommons/training/commit/e8c72a4f0e26abeab626cf32a5b30c5d9e448a60","date":"2026-06-23T18:19:27Z","author_date":"2026-06-23T18:19:27Z","committer_date":"2026-06-23T18:19:27Z","tree_sha":"0ad409f9c42b8811f90d8ab5ae5f07fbe8de5565","message_first_line":"Update README.md (#884)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2264","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:17F63BD:1C1B059:6AB92B78"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10356,"blob_sha":"a39a317be31635b165ce8fa0178595e24428382d","priority":0},{"path":"retired_benchmarks/mixtral8x22b/config/sched/WarmupHoldPolicy.yaml","size":165,"blob_sha":"2b2111464d1b915a36e79213bd60616d66f8333f","priority":1}],"documents":[{"path":"README.md","size":10356,"blob_sha":"a39a317be31635b165ce8fa0178595e24428382d","priority":0,"status":200,"text":"# MLPerf® Training Reference Implementations\n\nThis is a repository of reference implementations for the MLPerf® training benchmarks. These implementations are valid as starting points for benchmark implementations but are not fully optimized and are not intended to be used for \"real\" performance measurements of software frameworks or hardware. \n\nPlease see the [MLPerf Training Benchmark](https://arxiv.org/abs/1910.01500) paper for a detailed description of the motivation and guiding principles behind the benchmark suite. If you use any part of this benchmark (e.g., reference implementations, submissions, etc.) in academic work, please cite the following:\n\n```\n@misc{mattson2019mlperf,\n    title={MLPerf Training Benchmark},\n    author={Peter Mattson and Christine Cheng and Cody Coleman and Greg Diamos and Paulius Micikevicius and David Patterson and Hanlin Tang and Gu-Yeon Wei and Peter Bailis and Victor Bittorf and David Brooks and Dehao Chen and Debojyoti Dutta and Udit Gupta and Kim Hazelwood and Andrew Hock and Xinyuan Huang and Atsushi Ike and Bill Jia and Daniel Kang and David Kanter and Naveen Kumar and Jeffery Liao and Guokai Ma and Deepak Narayanan and Tayo Oguntebi and Gennady Pekhimenko and Lillian Pentecost and Vijay Janapa Reddi and Taylor Robie and Tom St. John and Tsuguchika Tabaru and Carole-Jean Wu and Lingjie Xu and Masafumi Yamazaki and Cliff Young and Matei Zaharia},\n    year={2019},\n    eprint={1910.01500},\n    archivePrefix={arXiv},\n    primaryClass={cs.LG}\n}\n```\n\nThese reference implementations are still very much \"alpha\" or \"beta\" quality. They could be improved in many ways. Please file issues or pull requests to help us improve quality.\n\n# Contents\n\nWe provide reference implementations for benchmarks in the MLPerf suite, as well as several benchmarks under development. \n\nEach reference implementation provides the following:\n \n* Code that implements the model in at least one framework.\n* A Dockerfile which can be used to run the benchmark in a container.\n* Instructions to download the appropriate dataset.\n* A script which runs and times training the model.\n* Documentation on the dataset, model, and machine setup.\n\n# Running Benchmarks\n\nFollow instructions on the Readme of each benchmark. Generally, a benchmark can be run with the following steps:\n\n1. Setup docker & dependencies. There is a shared script (install_cuda_docker.sh) to do this. Some benchmarks will have additional setup, mentioned in their READMEs.\n2. Download the dataset from [mlcommons-storage](https://training.mlcommons-storage.org/index.html). This should be run outside of docker, on your host machine. This should be run from the directory it is in (it may make assumptions about CWD).\n3. Optionally, run `verify_dataset.sh` to ensure the was successfully downloaded.\n4. Build and run the docker image, the command to do this is included with each Benchmark. \n\nEach benchmark will run until the target quality is reached and then stop, printing timing results.\n\nSome these benchmarks are rather slow or take a long time to run on the reference hardware. We expect to see significant performance improvements with more hardware and optimized implementations.\n\n# MLPerf Training v6.0 (Submission Deadline May 15, 2026)\n\n| Model | reference implementation | framework* | dataset | model parameter count**\n| ---- | ---- | ---- | ---- | ----\n| flux.1 | [text_to_image](https://github.com/mlcommons/training/tree/master/text_to_image) | torchtitan | CC12M subset | 11.9B\n| llama3.1_8b | [small_llm_pretraining](https://github.com/mlcommons/training/tree/master/small_llm_pretraining) | NeMo | C4 | 8b\n| llama2_70b_lora | [llama2_70b_lora](https://github.com/mlcommons/training/tree/master/llama2_70b_lora) | pytorch | SCROLLS GovReport | 70B\n| llama3.1_405b | [large_language_model_pretraining](https://github.com/mlcommons/training/tree/master/large_language_model_pretraining) | NeMo | C4 | 405B\n| dlrm_dcnv2 | [recommendation_v2](https://github.com/mlcommons/training/tree/master/recommendation_v2/torchrec_dlrm) | torchrec | Criteo 3.5TB multi-hot | 167M\n| gpt_oss_20b | small_llm_moe_pretraining](https://github.com/mlcommons/training/tree/master/small_llm_moe_pretraining/primus) | Primus | C4 | 20B |\n| deepseekv3 | llm_moe_pretraining](https://github.com/mlcommons/training/tree/master/llm_moe_pretraining/nemo) | NeMo | C4 | 671B |\n\n*Framework here is given for the reference implementation. Submitters are free to use their own frameworks to run the benchmark.\n \n**Model parameter count is not the same as active parameter that are being trained in the benchmark. \n\n# MLPerf Training v5.1 (Submission Deadline Oct 10, 2025)\n\n| Model | reference implementation | framework* | dataset | model parameter count**\n| ---- | ---- | ---- | ---- | ----\n| retinanet | [single_stage_detector](https://github.com/mlcommons/training/tree/master/single_stage_detector) | pytorch | OpenImages | 37M\n| flux.1 | [text_to_image](https://github.com/mlcommons/training/tree/master/text_to_image) | torchtitan | CC12M subset | 11.9B\n| llama3.1_8b | [small_llm_pretraining](https://github.com/mlcommons/training/tree/master/small_llm_pretraining) | NeMo | C4 | 8b\n| llama2_70b_lora | [llama2_70b_lora](https://github.com/mlcommons/training/tree/master/llama2_70b_lora) | pytorch | SCROLLS GovReport | 70B\n| llama3.1_405b | [large_language_model_pretraining](https://github.com/mlcommons/training/tree/master/large_language_model_pretraining) | NeMo | C4 | 405B\n| dlrm_dcnv2 | [recommendation_v2](https://github.com/mlcommons/training/tree/master/recommendation_v2/torchrec_dlrm) | torchrec | Criteo 3.5TB multi-hot | 167M\n| rgat | [graph_neural_network](https://github.com/mlcommons/training/tree/master/graph_neural_network) | GLT | IGBH-Full | 25M\n\n*Framework here is given for the reference implementation. Submitters are free to use their own frameworks to run the benchmark.\n \n**Model parameter count is not the same as active parameter that are being trained in the benchmark. \n\n# MLPerf Training v5.0 (Submission Deadline May 2, 2025)\n\n* Framework here is given for the reference implementation. Submitters are free to use their own frameworks to run the benchmark. \n* Model parameter count is not the same as active parameter that are being trained in the benchmark. \n\n| Model | reference implementation | framework | dataset | model parameter count\n| ---- | ---- | ---- | ---- | ----\n| retinanet | [single_stage_detector](https://github.com/mlcommons/training/tree/master/single_stage_detector) | pytorch | OpenImages | 37M\n| Stable Diffusionv2 | [image generation](https://github.com/mlcommons/training/tree/master/stable_diffusion) | pytorch | LAION-400M-filtered | 865M\n| bert | [language_model](https://github.com/mlcommons/training/tree/master/language_model/tensorflow/bert) | tensorflow | Wikipedia 2020/01/01 | 340M\n| llama3.1_405b | [large_language_model_pretraining](https://github.com/mlcommons/training/tree/master/large_language_model_pretraining) | NeMo | C4 | 405B\n| llama2_70b_lora | [llama2_70b_lora](https://github.com/mlcommons/training/tree/master/llama2_70b_lora) | pytorch | SCROLLS GovReport | 70B\n| dlrm_dcnv2 | [recommendation_v2](https://github.com/mlcommons/training/tree/master/recommendation_v2/torchrec_dlrm) | torchrec | Criteo 3.5TB multi-hot | 167M\n| rgat | [graph_neural_network](https://github.com/mlcommons/training/tree/master/graph_neural_network) | GLT | IGBH-Full | 25M\n\n# MLPerf Training v4.1 (Submission Deadline Oct 11, 2024)\n*Framework here is given for the reference implementation. Submitters are free to use their own frameworks to run the benchmark.\n\n| model | reference implementation | framework | dataset | model parameter count\n| ---- | ---- | ---- | ---- | ----\n| RetinaNet | [vision/object detection](https://github.com/mlcommons/training/tree/master/single_stage_detector) | pytorch | OpenImages | 37M\n| Stable Diffusionv2 | [image generation](https://github.com/mlcommons/training/tree/master/stable_diffusion) | pytorch | LAION-400M-filtered | 865M\n| BERT-large | [language/nlp](https://github.com/mlcommons/training/tree/master/language_model/tensorflow/bert) | tensorflow | Wikipedia 2020/01/01 | 340M\n| GPT3 | [language/llm](https://github.com/mlcommons/training/tree/master/large_language_model) | paxml,megatron-lm | C4 | 175B\n| LLama2 70B-LoRA | [language/LLM fine-tuning](https://github.com/mlcommons/training/tree/master/llama2_70b_lora) | pytorch | SCROLLS GovReport | 70B\n| DLRMv2 | [recommendation](https://github.com/mlcommons/training/tree/master/recommendation_v2/torchrec_dlrm) | torchrec | Criteo 3.5TB multi-hot | 167M\n| RGAT | [GNN](https://github.com/mlcommons/training/tree/master/graph_neural_network) | pytorch | IGBH-Full | 25M \n\n*Note model parameter count is not the same as active parameter that are being trained in the benchmark. \n\n# MLPerf Training v4.0 (Submission Deadline May 10, 2024)\n*Framework here is given for the reference implementation. Submitters are free to use their own frameworks to run the benchmark.\n\n| model | reference implementation | framework | dataset\n| ---- | ---- | ---- | ---- |\n| resnet50v1.5 | [vision/classification_and_detection](https://github.com/mlcommons/training/tree/master/image_classification) | tensorflow2 | Imagenet\n| RetinaNet | [vision/object detection](https://github.com/mlcommons/training/tree/master/single_stage_detector) | pytorch | OpenImages\n| 3DUnet | [vision/image segmentation](https://github.com/mlcommons/training/tree/master/image_segmentation/pytorch) | pytorch | KiTS19\n| Stable Diffusionv2 | [image generation](https://github.com/mlcommons/training/tree/master/stable_diffusion) | pytorch | LAION-400M-filtered\n| BERT-large | [language/nlp](https://github.com/mlcommons/training/tree/master/language_model/tensorflow/bert) | tensorflow | Wikipedia 2020/01/01\n| GPT3 | [language/llm](https://github.com/mlcommons/training/tree/master/large_language_model) | paxml,megatron-lm | C4\n| LLama2 70B-LoRA | [language/LLM fine-tuning](https://github.com/mlcommons/training/tree/master/llama2_70b_lora) | pytorch | SCROLLS GovReport\n| DLRMv2 | [recommendation](https://github.com/mlcommons/training/tree/master/recommendation_v2/torchrec_dlrm) | torchrec | Criteo 3.5TB multi-hot\n| RGAT | [GNN](https://github.com/mlcommons/training/tree/master/graph_neural_network) | pytorch | IGBFull\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:18535D:5E9FED:6AB92B76"},"text_sha256":"49eaed28f76eb29744f2453a932ef81083f5640bd505e61ae7859c6eea8e11f6"},{"path":"retired_benchmarks/mixtral8x22b/config/sched/WarmupHoldPolicy.yaml","size":165,"blob_sha":"2b2111464d1b915a36e79213bd60616d66f8333f","priority":1,"status":200,"text":"name: WarmupHoldPolicy\nwarmup_ratio: 0.25\n# warmup_steps: 150\nhold_steps: 10000000000000 # Incredibly large value to hold the lr as constant\nmax_steps: ${max_steps}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6918:2C474:18026C:5E4EC4:6AB92B78"},"text_sha256":"a1f225e761c35b324aba39680351005e354fe669152ee982d5c382019b15eca8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"VertaAI/modeldb","input_row":{"repository":"VertaAI/modeldb","url":"https://github.com/VertaAI/modeldb","name":"modeldb","owner":"VertaAI","description":"Open Source ML Model Versioning, Metadata, and Experiment Management","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1749,"issues":141,"created_at":"2016-10-19T01:07:26Z","updated_at":"2026-09-24T15:23:55Z","first_commit_at":"2016-10-19T01:12:23Z","last_commit_at":"2024-04-25T14:35:36Z","activity_months":90.200000000000003,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:06.301Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"VertaAI/modeldb","visibility":"public","created_at":"2016-10-19T01:07:26Z","updated_at":"2026-09-24T15:23:55Z","private":false,"fork":false,"archived":false,"stargazers_count":1749,"open_issues_count":194,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2263","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17E72EF:1C0BC24:6AB92B7A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2262","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0849:71F98:1838840:1C5CF0C:6AB92B7A"},"commit":{"sha":"65f8260b0683a2b39e363bac7b281832185926ba","url":"https://github.com/VertaAI/modeldb/commit/65f8260b0683a2b39e363bac7b281832185926ba","date":"2018-02-01T13:30:45Z","author_date":"2018-02-01T13:30:45Z","committer_date":"2018-02-01T13:30:45Z","tree_sha":"e2aebe5b145d74d984a6343fa71b289b4fb2bb6e","message_first_line":"Merge pull request #255 from mitdbg/RogerTangos/Python3"},"tree_request_status":200,"tree_rate":{"github_remaining":"2261","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:17882F2:1BACE40:6AB92B7B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9463,"blob_sha":"a34c5b162353c8b4f5f06c8e9568ee57977fff5c","priority":0}],"documents":[{"path":"README.md","size":9463,"blob_sha":"a34c5b162353c8b4f5f06c8e9568ee57977fff5c","priority":0,"status":200,"text":"# ModelDB: A system to manage ML models\n[![Build Status](https://travis-ci.org/mitdbg/modeldb.svg?branch=master)](https://travis-ci.org/mitdbg/modeldb)\n**Website**: [http://modeldb.csail.mit.edu](http://modeldb.csail.mit.edu)\n\n**See the ModelDB frontend in action**:\n\n[![ModelDB frontend in action video](http://img.youtube.com/vi/gxBb4CjJcxQ/0.jpg)](https://youtu.be/gxBb4CjJcxQ \"Watch the ModelDB frontend in action\")\n\n## Contents\n\n- [Overview](#overview)\n    - [How Does it Work?](#how-does-it-work)\n- [Demo](#demo)\n- [News](#news)\n- [Setup and Installation](#setup-and-installation)\n- [Usage and Samples](#usage-and-samples)\n    - [Incorporate ModelDB into your ML workflow](#incorporate-modeldb-into-your-ml-workflow)\n    - [View your models in ModelDB](#view-your-models-in-modeldb)\n- [Documentation](#documentation)\n- [Contact Us](#contact-us)\n- [Contributing](#contributing)\n\n## Overview\nModelDB is an end-to-end system to manage machine learning models. It ingests models and associated metadata as models are being trained, stores model data in a structured format, and surfaces it through a web-frontend for rich querying. ModelDB can be used with **any ML environment** via the ModelDB Light API. ModelDB native clients can be used for advanced support in `spark.ml` and `scikit-learn`.\n\nThe ModelDB frontend provides rich summaries and graphs showing model data. The frontend provides functionality to slice and dice this data along various attributes (e.g. operations like filter by hyperparameter, group by datasets) and to build custom charts showing model performance.\n\n<img src=\"docs/getting_started/images/frontend-1.png\" width=\"75%\"><br>\nModelDB Frontend Projects Summary Page\n\n<img src=\"docs/getting_started/images/frontend-2.png\" width=\"75%\"><br>\nModelDB Graph for Model Metrics\n\n<img src=\"docs/getting_started/images/frontend-4.png\" width=\"75%\"><br>\nModelDB Configurable Graph Parameters\n\n### How does it work?\n\n[ModelDB's Light API](client/python/light_api.md) can be used with any ML environment to sync model metrics and metadata or even entire config files by calling a few functions (e.g. see [here](client/python/samples/basic/BasicWorkflow.py) and [here](client/python/samples/basic/BasicSyncAll.py) respectively).\n\nAlternatively, ModelDB native clients for  ```spark.ml``` and ```scikit-learn``` can be used to perform automatic, fine-grained logging. Unlike the Light API, native clients do not require the user to explicitly provide model data to ModelDB. The native clients can automatically extract relevant pieces of model data *as the model is being built* and sync them with ModelDB. Incorporating ModelDB into a scikit-learn / spark.ml workflow is as simple as appending `Sync` or `_sync` to relevant methods in the respective libraries. See samples for spark.ml [here](client/scala/libs/spark.ml#samples) and those for scikit-learn [here](client/python/scikit_learn.md).\n\n## Demo\n- [ModelDB client](http://modeldb.csail.mit.edu:8000): See how ModelDB can be integrated into different ML workflows \n- [ModelDB frontend](http://modeldb.csail.mit.edu:3000): See how ModelDB can visualize model data and results\n\n## News\n\n2017.02.08: ModelDB publicly available! Try it out and contribute.\n\n## Setup and Installation\n\n### Docker Setup\n\nIf you have [Docker Compose](https://docs.docker.com/compose/install/) installed, you can bring up a ModelDB server with just a couple commands.\n\n*To run ModelDB with Docker, but without Docker Compose, see [detailed instructions](dockerbuild/README.md).*\n\n1. **Clone the repo**\n\n    ```bash\n    git clone https://github.com/mitdbg/modeldb\n    ```\n\n2. **Build and run ModelDB**\n\n    ```bash\n    cd [path_to_modeldb]\n    docker-compose up\n    ```\nNote by default ModelDB will listen on localhost:3000.     \n### Manual Setup\n\nWatch a video of the setup and installation process [here](https://youtu.be/rmNnG3-bd6s).\n\n1. **Clone the repo**\n\n    ```bash\n    git clone https://github.com/mitdbg/modeldb\n    ```\n\n2. **Install dependencies**\n\n    ModelDB requires Linux or MacOS. The code below shows how you can install the dependencies on each of them. A detailed list of all the dependencies with the recommended and required versions can be found [here](docs/required_software.md).\n\n    Depending on the client you're using, we assume you have the following already installed:\n    - scikit-learn client:\n        - Python 2.7 or Python 3.5.1\\*\\*\n        - [pip](https://pip.pypa.io/en/stable/installing/)\n        - [scikit-learn](http://scikit-learn.org/stable/install.html) 0.17\\*\\*\n    - spark.ml client:\n        - Java 1.8+\n        - Spark 2.0.0\\*\\*\n\n    **(\\*\\*) = Python 3.5.1+ is only compatible with thrift 0.10.0+**\n\n    On OSX, we also assume that you have [homebrew](https://brew.sh/) installed.\n\n    **On Mac OSX:**\n\n    ```bash\n    # Use homebrew to install the dependencies\n    brew install sqlite\n    brew install maven\n    brew install node\n    brew install sbt # for spark.ml client only\n    brew install mongodb\n\n    # ModelDB works only with Thrift 0.9.3 and 0.10.0. Python 3 is only compatible with thrift 0.10.0 If you do not have thrift installed, install via brew.\n    `brew install thrift`\n\n    pip install -r [path_to_modeldb]/client/python/requirements.txt\n    ```\n\n    **On Linux:**\n\n    ```bash\n    apt-get update\n    sudo apt-get install sqlite\n    sudo apt-get install maven\n    sudo apt-get install sbt # for spark.ml client only\n    sudo apt-get install nodejs # may need to symlink node to nodejs. \"cd /usr/bin; ln nodejs node\"\n    sudo apt-get install -y mongodb-org # further instructions here: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/\n\n    # install thrift. [path_to_thrift] is the installation directory\n    # ModelDB works with thrift 0.9.3 and 0.10.0. The following instructions are for 0.9.3\n    cd [path_to_thrift]\n    wget http://mirror.cc.columbia.edu/pub/software/apache/thrift/0.9.3/thrift-0.9.3.tar.gz\n    tar -xvzf thrift-0.9.3.tar.gz\n    cd thrift-0.9.3\n    ./configure\n    make\n    export PATH=[path_to_thrift]/:$PATH\n\n    pip install -r [path_to_modeldb]/client/python/requirements.txt\n    ```\n\n    For Linux, you can also refer to [this script](https://github.com/mitdbg/modeldb/blob/master/docs/install_on_linux.sh).\n\n3. **Build**\n\n    ModelDB is composed of three components: the ModelDB **server**, the ModelDB **client libraries**, and the ModelDB **frontend**.\n\n    In the following, **[path_to_modeldb]** refers to the directory into which you have cloned the modeldb repo and **[thrift_version]** is 0.9.3 or 0.10.0 depending on your thrift version (check by running ```thrift -version```).\n\n    ```bash\n    # run the script to set up the sqlite and the mongodb databases that modeldb will use\n    # this also starts mongodb\n    # ***IMPORTANT NOTE: This clears any previous modeldb databases. This should only be done once.***\n    cd [path_to_modeldb]/server/codegen\n    ./gen_sqlite.sh\n\n    # build and start the server\n    cd ..\n    ./start_server.sh [thrift_version] &\n    # NOTE: if you are building the project in eclipse, you may need to uncomment the pluginManagement tags in pom.xml located in the server directory\n\n    # build or pip install the scikit-learn client library\n    pip install modeldb\n\n    -- or --\n\n    cd [path_to_modeldb]/client/python\n    ./build_client.sh\n\n    # build spark.ml client library\n    cd [path_to_modeldb]/client/scala/libs/spark.ml\n    ./build_client.sh\n\n    # start the frontend\n    cd [path_to_modeldb]/frontend\n    ./start_frontend.sh & # the frontend will now be available in http://localhost:3000/\n\n    # ****** For server shutdown ******\n    # Kill server\n    # Shutdown mongodb server\n    mongo --eval \"db.getSiblingDB('admin').shutdownServer()\"\n    ```\n\n## Usage and Samples\n\n### Incorporate ModelDB into your ML workflow\n- [Light API](client/python/light_api.md)\n- [scikit-learn](client/python/scikit_learn.md)\n- [spark.ml](docs/getting_started/spark_ml.md)\n\n### View your models in ModelDB\nAfter incorporating ModelDB into your models, follow these steps to run and view them in ModelDB.\n\n1. **Make sure the server is running.**\n\n    Each time you use ModelDB, the server, including MongoDB for the database, must be up and running.\n\n    ```bash\n    # start the server\n    cd [path_to_modeldb]/server\n    ./start_server.sh [thrift_version] &\n\n    # make sure mongodb is running. if not running, execute the commands below\n    # cd codegen\n    # mkdir -p mongodb\n    # mongod --dbpath mongodb\n    ```\n\n2. **Run your models instrumented with ModelDB as shown [above](#incorporate-modeldb-into-your-ml-workflow).**\n\n3. **View, visualize, and query your models.**\n\n    You can view all these models in [http:localhost:3000/](http:localhost:3000/) by starting the frontend.\n\n    ```bash\n    cd [path_to_modeldb]/frontend\n    ./start_frontend.sh &\n    ```\n\n## Documentation\nMore comprehensive documentation on ModelDB, including answers to FAQ, will be available soon in [the wiki](https://github.com/mitdbg/modeldb/wiki). Information about the server documentation can be found in the [docs folder](docs). For other questions, don't hesitate to contact us.\n\n## Contact Us\nQuestions? Bugs? We're happy to talk about all things ModelDB! Reach out to modeldb *at* lists.csail.mit.edu or post in the ModelDB [Google Group](https://groups.google.com/forum/#!forum/modeldb).\n\n## Contributing\nContributions are welcome! Please read [this](CONTRIBUTING.md) to get started.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B6DE:17E138:17A21D:5DEE6D:6AB92B79"},"text_sha256":"c58d8024e88aa365116beb6a55c9b31cde541831579348b6cc7b09ca17755486"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2260","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FB:72727:17AF8CB:1BD42DA:6AB92B7C"},"commit":{"sha":"1833ba889859a0e35f22f754ecf20b6b352aa87f","url":"https://github.com/VertaAI/modeldb/commit/1833ba889859a0e35f22f754ecf20b6b352aa87f","date":"2024-04-25T14:35:36Z","author_date":"2024-04-25T14:35:36Z","committer_date":"2024-04-25T14:35:36Z","tree_sha":"f7f8c900c282365867c0889a12a68363faaa698a","message_first_line":"chore(deps): bump otel.instrumentation.version (#4489)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2259","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:17EE4A9:1C12F13:6AB92B7C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10355,"blob_sha":"8cb89a7289ae18509c7094441f5cd97bc4e506d9","priority":0},{"path":"chart/modeldb/charts/postgres/templates/networkpolicy.yaml","size":838,"blob_sha":"40496a763f8d743e3c982168ebd34fffa0079878","priority":1}],"documents":[{"path":"README.md","size":10355,"blob_sha":"8cb89a7289ae18509c7094441f5cd97bc4e506d9","priority":0,"status":200,"text":"# ModelDB: An open-source system for Machine Learning model versioning, metadata, and experiment management.\n----\n\n<p align=\"center\">\n  <a href=\"https://hub.docker.com/u/vertaaiofficial\">\n    <img src=\"https://img.shields.io/docker/v/vertaaiofficial/modeldb-backend?color=534eb5&label=Docker%20image%20version&style=plastic\" alt=\"docker hub\" />\n  <\/a>\n  <a href=\"https://pypi.org/project/verta/\">\n    <img src=\"https://img.shields.io/pypi/v/verta?color=534eb5&style=plastic\" alt=\"PyPI\" />\n  <\/a>\n  <a href=\"https://anaconda.org/conda-forge/verta\">\n    <img src=\"https://img.shields.io/conda/v/conda-forge/verta?color=534eb5&style=plastic\" alt=\"Conda\" />\n  <\/a>\n  <a href=\"https://github.com/VertaAI/modeldb/blob/master/LICENSE\">\n    <img src=\"https://img.shields.io/pypi/l/verta?color=534eb5&style=plastic\" alt=\"License\" />\n  <\/a>\n  <br>\n  <a href=\"https://hub.docker.com/u/vertaaiofficial\">\n    <img src=\"https://img.shields.io/docker/pulls/vertaaiofficial/modeldb-backend?color=534eb5&style=plastic\" alt=\"docker hub\" />\n  <\/a>\n  <a href=\"https://pypi.org/project/verta/\">\n    <img src=\"https://img.shields.io/pypi/dm/verta?color=534eb5&label=PyPI%20Downloads&style=plastic\" alt=\"PyPI\" />\n  <\/a>\n  <a href=\"https://github.com/VertaAI/modeldb/graphs/commit-activity\">\n    <img src=\"https://img.shields.io/github/commit-activity/w/vertaai/modeldb?color=534eb5&style=plastic\" alt=\"Commits\" />\n  <\/a>\n  <a href=\"https://github.com/VertaAI/modeldb/graphs/commit-activity\">\n    <img src=\"https://img.shields.io/github/last-commit/vertaai/modeldb?color=534eb5&style=plastic\" alt=\"Last Commit\" />\n  <\/a>\n  <br>\n  <a href=\"https://github.com/VertaAI/modeldb/graphs/commit-activity\">\n    <img src=\"https://img.shields.io/github/stars/vertaai/modeldb?style=social\" alt=\"Forks\" />\n  <\/a>\n  <a href=\"https://twitter.com/intent/follow?screen_name=VertaAI\">\n    <img src=\"https://img.shields.io/twitter/follow/VertaAI?label=VertaAI&style=social\" alt=\"Twitter\" />\n  <\/a>\n  <a href=\"http://bit.ly/modeldb-mlops\">\n    <img src=\"https://cdn.brandfolder.io/5H442O3W/as/pl546j-7le8zk-5guop3/Slack_RGB.png\" alt=\"Slack\" height =30px/>\n  <\/a>\n<\/p>\n\n\n<h3 align=\"center\">\n  <a href=\"#up-and-running-in-5-minutes\">Quickstart<\/a>\n  <span> · <\/span>\n  <a href=\"https://docs.verta.ai/verta/tutorials/metadata\">Workflow<\/a>\n  <span> · <\/span>\n  <a href=\"https://github.com/VertaAI/examples\">Examples<\/a>\n  <span> · <\/span>\n  <a href=\"#contributions\">Contribute<\/a>\n  <span> · <\/span>\n  <a href=\"http://bit.ly/modeldb-mlops\">Support (Slack)<\/a>\n<\/h3>\n\n----\nModelDB is an open-source system to version machine learning models including their ingredients code, data, config, and environment and to track ML metadata across the model lifecycle.\n\nUse ModelDB in order to:\n* Make your ML models reproducible\n* Manage your ML experiments, build performance dashboards, and share reports\n* Track models across their lifecycle including development, deployment, and live monitoring\n\nFeatures:\n* Works on Docker, Kubernetes\n* Clients in Python and Scala\n* Beautiful dashboards for model performance and reporting\n* Git-like operations on any model\n* Flexible metadata logging including metrics, artifacts, tags and user information\n* Pluggable storage systems\n* Integration into state-of-the-art frameworks like Tensorflow and PyTorch\n* Battle-tested in production environments\n\nIf you are looking for a hosted version of ModelDB, please reach out at modeldb@verta.ai.\n\nThis version of ModelDB is built upon its predecessor from [CSAIL, MIT](https://www.csail.mit.edu/). The previous version can be found on Github [here](https://github.com/VertaAI/modeldb/releases/tag/v1.0.0). The ModelDB project is now maintained by [Verta.ai](https://verta.ai).\n\n----\n\n## What’s In This Document\n\n- [Up and Running in 5 minutes](#up-and-running-in-5-minutes)\n- [Documentation](#documentation)\n- [Community](#community)\n- [Architecture](#architecture)\n- [How to Contribute](#how-to-contribute)\n- [License](#license)\n- [Thanks to Our Contributors](#thanks)\n\n----\n\n## Up and Running in 5 minutes\n\n0. Install [Docker](https://docs.docker.com/compose/install/) (and Docker Compose)\n\n\n1. Setup ModelDB via Docker Compose\n\n```bash\ndocker-compose -f docker-compose-all.yaml up\n```\n*Note: modeldb-backend service needs backend/config/config.yaml to run, either clone the repo before running docker-compose or create the file manually.*\n\n2. Install the ModelDB pip package. *Note it comes packaged in the verta package.*\n```bash\npip install verta\n```\n\n3. Version a model or log a workflow. *Alternatively, run any of the detailed [examples](https://github.com/VertaAI/examples) in our repository.*\n\n```python\nfrom verta import Client\nclient = Client(\"http://localhost:3000\")\n\nproj = client.set_project(\"My first ModelDB project\")\nexpt = client.set_experiment(\"Default Experiment\")\n\n# log the first run\nrun = client.set_experiment_run(\"First Run\")\nrun.log_hyperparameters({\"regularization\" : 0.5})\n# ... model training code goes here\nrun.log_metric('accuracy', 0.72)\n\n# log the second run\nrun = client.set_experiment_run(\"Second Run\")\nrun.log_hyperparameters({\"regularization\" : 0.8})\n# ... model training code goes here\nrun.log_metric('accuracy', 0.83)\n```\n\n**That's it!** Navigate to **<http://localhost:3000>** to find the ModelDB Web UI and check out the models you just logged.\n\n\n----\n\nFor information on debugging the Docker-based ModelDB installation, check [here](DEPLOY.md#Deploy-pre-published-images).\n\n\n**Other ways to install ModelDB are:**\n\n1. [Building the source code and deploying](DEPLOY.md#build-images-from-source-and-deploy)\n1. [Deploy on kubernetes via helm](DEPLOY.md#kubernetes-setUp)\n1. [Using a ModelDB ami](DEPLOY.md#AWS)\n1. If you are looking for a hosted version of ModelDB, please reach out at modeldb@verta.ai.\n\n----\n\n## Documentation\n\nOfficial documentation for ModelDB can be found [here](https://docs.verta.ai/).\n\n----\n\n## Community\n\nFor Getting Started guides, Tutorials, and API reference check out our [docs](https://docs.verta.ai/).\n\nTo report a bug, file a documentation issue, or submit a feature request, please open a GitHub issue.\n\nFor help, questions, contribution discussions and release announcements, please join us on [Slack](http://bit.ly/modeldb-mlops).\n\n----\n\n## Architecture\n\nAt a high level the architecture of ModelDB in a Kubernetes cluster or a Docker application looks as below:\n\n![image](doc-resources/images/modeldb-architecture.png)\n\n- **ModelDB Client** available in Python and Scala which can instantiated in the user's model building code and exposes functions to store information to ModelDB.\n- **ModelDB Frontend**  developed in JavaScript and typescript is the visual reporting module of ModelDB. It also acts as an entry point for the ModelDB cluster.\n  - It receives the request from client (1) and the browser and route them to the appropriate container.\n  - The gRPC calls (2) for creating, reading,updating or deleting Projects, Experiments, ExperimentRuns, Dataset, DatasetVersions or their metadata are routed to ModelDB Proxy.\n  - The HTTP calls (3) for storing and retrieving binary artifacts are forwarded directly to backend.\n- **ModelDB Backend Proxy** developed in golang is a light weight gRPC to Http convertor.\n  - It receives the gRPC request from the front end (2) and sends them to backend (4). In the other direction it converts the response from backend and sends it to the frontend.\n- **ModelDB Backend** developed in java is module which stores, retrieves or deletes information as triggered by user via the client or the front end.\n  - It exposes gRPC endpoints (4) for most of the operations which is used by the proxy.\n  - It has http endpoints (3) for storing, retrieving and deleting artifacts used directly by the frontend.\n- **Database** ModelDB Backend stores (5) the information from the requests it receive into a Relational database.\n  - Out of the box ModelDB is configured and verified to work against PostgreSQL, but since it uses Hibernate as a ORM and liquibase for change management, it should be easy to configure ModelDB to run on another SQL Database supported by the the tools.\n\n*Volumes : The relational database and the artifact store in backend need volumes attached to enable persistent storage.*\n\n### Repo Structure\n\nEach module in the architecture diagram has a designated folder in this repository, and has their own README covering in depth documentation and contribution guidelines.\n\n1. **protos** has the protobuf definitions of the objects and endpoint used across ModelDB. More details [here](protos/README.md).\n1. **backend** has the source code and tests for ModelDB Backend. It also holds the proxy at **backend/proxy**. More details [here](backend/README.md).\n1. **client** has the source code and tests for ModelDB client. More details [here](client/README.md).\n1. **webapp** has the source and tests for ModelDB frontend. More details [here](webapp/README.md).\n\nOther supporting material for deployment and documentation is at:\n\n1. **chart** has the helm chart to deploy ModelDB onto your Kubernetes cluster. More details [here](chart/modeldb/README.md).\n1. **doc-resources** has images for documentation.\n\n----\n\n## Contributions\n\nAs seen from the [Architecture](#architecture) ModelDB provides a full stack solution to tracking, versioning and auditing  machine learning models.\nWe are open to contributions to any of the modules in form of Pull Requests.\n\nThe main skill sets for each module are as below:\n\n1. backend: If you are interested in `Java` development or are interested in database design using technologies like `Hibernate` and `Liquibase` please take a look at [backend README](backend/README.md) for setup and development instructions.\n1. client: If you are interested in `Python` or `Scala` development or are interested in building examples notebooks on various ML frameworks logging data to Modeldb please take a look at [client README](client/README.md).\n1. frontend: If you are interested  in `Node`,`React` or `Redux` based development please take a look at [webapp README](webapp/README.md)\n\nPlease reach out to us in [slack](http://bit.ly/modeldb-mlops) for any assistance in getting started with the development set up or any other feedback.\n\n----\n\n## License\n\nModelDB is licensed under Apache 2.0.\n\n----\n\n## Thanks\n\nThanks to our many contributors and users.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AE4:2C474:18028C:5E4F35:6AB92B7D"},"text_sha256":"e73bc751cf7c6f02aa2bba2e88410259aca73de18011aee065639fbe231c7785"},{"path":"chart/modeldb/charts/postgres/templates/networkpolicy.yaml","size":838,"blob_sha":"40496a763f8d743e3c982168ebd34fffa0079878","priority":1,"status":200,"text":"{{- if .Values.networkPolicy.enabled }}\nkind: NetworkPolicy\napiVersion: {{ template \"postgresql.networkPolicy.apiVersion\" . }}\nmetadata:\n  name: {{ template \"postgresql.fullname\" . }}\n  labels:\n    app: {{ template \"postgresql.name\" . }}\n    chart: {{ template \"postgresql.chart\" . }}\n    release: {{ .Release.Name | quote }}\n    heritage: {{ .Release.Service | quote }}\nspec:\n  podSelector:\n    matchLabels:\n      app: {{ template \"postgresql.name\" . }}\n      release: {{ .Release.Name | quote }}\n  ingress:\n    # Allow inbound connections\n    - ports:\n      - port: 5432\n    {{- if not .Values.networkPolicy.allowExternal }}\n      from:\n      - podSelector:\n          matchLabels:\n            {{ template \"postgresql.fullname\" . }}-client: \"true\"\n    {{- end }}\n    # Allow prometheus scrapes\n    - ports:\n      - port: 9187\n{{- end }}\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96DA:18233:17A6C7:5DF2AD:6AB92B7D"},"text_sha256":"d479b757bcca1c6945d90c318425858d269810afdc736d0408a81b7540dd99f3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"alkaline-ml/pmdarima","input_row":{"repository":"alkaline-ml/pmdarima","url":"https://github.com/alkaline-ml/pmdarima","name":"pmdarima","owner":"alkaline-ml","description":"A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1737,"issues":342,"created_at":"2017-03-30T14:58:30Z","updated_at":"2026-09-24T03:25:43Z","first_commit_at":"2017-03-30T14:58:31Z","last_commit_at":"2025-11-17T14:58:45Z","activity_months":103.61,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:09.960Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"alkaline-ml/pmdarima","visibility":"public","created_at":"2017-03-30T14:58:30Z","updated_at":"2026-09-24T03:25:43Z","private":false,"fork":false,"archived":false,"stargazers_count":1737,"open_issues_count":66,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2258","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A6:71E0C:17F3F14:1C1773D:6AB92B7D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2257","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:17AFA5A:1BD44B1:6AB92B7E"},"commit":{"sha":"1e4801008edd0c3dfb6b67fb0ae3ed0b2b93af72","url":"https://github.com/alkaline-ml/pmdarima/commit/1e4801008edd0c3dfb6b67fb0ae3ed0b2b93af72","date":"2018-05-03T17:51:44Z","author_date":"2018-05-03T17:51:44Z","committer_date":"2018-05-03T17:51:44Z","tree_sha":"5e96509b07c0c0e85d2a24a19dc388563b82f12e","message_first_line":"Merge branch 'master' of https://github.com/tgsmith61591/pyramid"},"tree_request_status":200,"tree_rate":{"github_remaining":"2256","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0865:B1202:17A3689:1BC7918:6AB92B7E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2556,"blob_sha":"efa2c61afa8da7a519c87c8170a4926cbbafb94a","priority":0}],"documents":[{"path":"README.md","size":2556,"blob_sha":"efa2c61afa8da7a519c87c8170a4926cbbafb94a","priority":0,"status":200,"text":"[![PyPI version](https://badge.fury.io/py/pyramid-arima.svg)](https://badge.fury.io/py/pyramid-arima)\n[![Linux build status](https://travis-ci.org/tgsmith61591/pyramid.svg?branch=master)](https://travis-ci.org/tgsmith61591/pyramid)\n[![Windows build status](https://ci.appveyor.com/api/projects/status/592vawuu69kd6d21?svg=true)](https://ci.appveyor.com/project/tgsmith61591/pyramid)\n[![codecov](https://codecov.io/gh/tgsmith61591/pyramid/branch/master/graph/badge.svg)](https://codecov.io/gh/tgsmith61591/pyramid)\n![Supported versions](https://img.shields.io/badge/python-2.7-blue.svg)\n![Supported versions](https://img.shields.io/badge/python-3.5-blue.svg)\n\n# pyramid\nPyramid is a no-nonsense statistical Python library with a solitary objective: bring R's\n[`auto.arima`](https://www.rdocumentation.org/packages/forecast/versions/7.3/topics/auto.arima)\nfunctionality to Python. Pyramid operates by wrapping\n[`statsmodels.tsa.ARIMA`](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/arima_model.py) and\n[`statsmodels.tsa.statespace.SARIMAX`](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/statespace/sarimax.py)\ninto one estimator class and creating a more user-friendly estimator interface for programmers familiar with scikit-learn.\n\n\n## Installation\n\nPyramid is on pypi under the package name `pyramid-arima` and can be downloaded via `pip`:\n\n```bash\n$ pip install pyramid-arima\n```\n\nTo ensure the package was built correctly, import the following module in python:\n\n```python\nfrom pyramid.arima import auto_arima\n```\n\n\n### Quickstart\n\n__For an easy, reproducible quick-start example, see [examples/](examples/quick_start_example.ipynb).__\n\n\n### Other considerations\n\n- How do I make pyramid run as quickly as R?\n  - R's code is heavily C-based. Pyramid runs on statsmodels, which is Python based. There will be some differences in performance\n    speed-wise, but much of it can be eliminated by using `stepwise=True`. See [this discussion](https://stackoverflow.com/questions/40871602/sarimax-model-fitting-too-slow-in-statsmodels)\n    for more thoughts...\n\n- Refreshing ARIMA models\n  - Periodically, your ARIMA will need to be refreshed given new observations. See [this discussion](https://stats.stackexchange.com/questions/34139/updating-arima-models-at-frequent-intervals)\n    and [this discussion](https://stats.stackexchange.com/questions/57745/what-do-you-consider-a-new-model-versus-an-updated-model-time-series)\n    on either re-using `auto_arima`-estimated order terms or re-fitting altogether.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"70E4:29FD16:183CF2:5E89B8:6AB92B7D"},"text_sha256":"458e14994680d3c8e999358ed99ad739f08244597e910e25006cd16f61ba0425"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2255","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:1299768:15EE127:6AB92B7F"},"commit":{"sha":"4c2dfccb28f64d2c00a5e10b59c1d1a3e16576a9","url":"https://github.com/alkaline-ml/pmdarima/commit/4c2dfccb28f64d2c00a5e10b59c1d1a3e16576a9","date":"2025-11-17T14:58:45Z","author_date":"2025-11-17T14:58:45Z","committer_date":"2025-11-17T14:58:45Z","tree_sha":"08aebf6de6dbec4261b3f55b07ca914d0dfe0d38","message_first_line":"Update citation (#615)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2254","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17C8575:1BEC5D5:6AB92B7F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5857,"blob_sha":"25fa42cb98433238349a40e358269e9efafc0cd8","priority":0}],"documents":[{"path":"README.md","size":5857,"blob_sha":"25fa42cb98433238349a40e358269e9efafc0cd8","priority":0,"status":200,"text":"# pmdarima\n\n[![PyPI version](https://badge.fury.io/py/pmdarima.svg)](https://badge.fury.io/py/pmdarima)\n[![CircleCI](https://circleci.com/gh/alkaline-ml/pmdarima.svg?style=svg)](https://circleci.com/gh/alkaline-ml/pmdarima)\n[![Mac and Windows Builds](https://github.com/alkaline-ml/pmdarima/actions/workflows/build_and_deploy.yml/badge.svg)](https://github.com/alkaline-ml/pmdarima/actions/workflows/build_and_deploy.yml)\n[![codecov](https://codecov.io/gh/alkaline-ml/pmdarima/branch/master/graph/badge.svg)](https://codecov.io/gh/alkaline-ml/pmdarima)\n![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg)\n![Downloads](https://img.shields.io/badge/dynamic/json?color=blue&label=downloads&query=%24.total&url=https%3A%2F%2Fstore.zapier.com%2Fapi%2Frecords%3Fsecret%3D1e061b29db6c4f15af01103d403b0237)\n![Downloads/Week](https://img.shields.io/badge/dynamic/json?color=blue&label=downloads%2Fweek&query=%24.weekly&url=https%3A%2F%2Fstore.zapier.com%2Fapi%2Frecords%3Fsecret%3D1e061b29db6c4f15af01103d403b0237)\n\nPmdarima (originally `pyramid-arima`, for the anagram of 'py' + 'arima') is a statistical\nlibrary designed to fill the void in Python's time series analysis capabilities. This includes:\n\n  * The equivalent of R's [`auto.arima`](https://www.rdocumentation.org/packages/forecast/versions/7.3/topics/auto.arima) functionality\n  * A collection of statistical tests of stationarity and seasonality\n  * Time series utilities, such as differencing and inverse differencing\n  * Numerous endogenous and exogenous transformers and featurizers, including Box-Cox and Fourier transformations\n  * Seasonal time series decompositions\n  * Cross-validation utilities\n  * A rich collection of built-in time series datasets for prototyping and examples\n  * Scikit-learn-esque pipelines to consolidate your estimators and promote productionization\n  \nPmdarima wraps [statsmodels](https://github.com/statsmodels/statsmodels/blob/master/statsmodels)\nunder the hood, but is designed with an interface that's familiar to users coming\nfrom a scikit-learn background.\n\n## Installation\n\n### pip\n\nPmdarima has binary and source distributions for Windows, Mac and Linux (`manylinux`) on pypi\nunder the package name `pmdarima` and can be downloaded via `pip`:\n\n```bash\npip install pmdarima\n```\n\n### conda\n\nPmdarima also has Mac and Linux builds available via `conda` and can be installed like so:\n\n```bash\nconda config --add channels conda-forge\nconda config --set channel_priority strict\nconda install pmdarima\n```\n\n**Note:** We do not maintain our own Conda binaries, they are maintained at https://github.com/conda-forge/pmdarima-feedstock.\nSee that repo for further documentation on working with Pmdarima on Conda.\n\n## Quickstart Examples\n\nFitting a simple auto-ARIMA on the [`wineind`](https://alkaline-ml.com/pmdarima/modules/generated/pmdarima.datasets.load_wineind.html#pmdarima.datasets.load_wineind) dataset:\n\n```python\nimport pmdarima as pm\nfrom pmdarima.model_selection import train_test_split\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Load/split your data\ny = pm.datasets.load_wineind()\ntrain, test = train_test_split(y, train_size=150)\n\n# Fit your model\nmodel = pm.auto_arima(train, seasonal=True, m=12)\n\n# make your forecasts\nforecasts = model.predict(test.shape[0])  # predict N steps into the future\n\n# Visualize the forecasts (blue=train, green=forecasts)\nx = np.arange(y.shape[0])\nplt.plot(x[:150], train, c='blue')\nplt.plot(x[150:], forecasts, c='green')\nplt.show()\n```\n\n<img src=\"http://alkaline-ml.com/img/static/pmdarima_readme_example1.png\" alt=\"Wineind example\"/>\n\n\nFitting a more complex pipeline on the [`sunspots`](https://www.rdocumentation.org/packages/datasets/versions/3.6.1/topics/sunspots) dataset,\nserializing it, and then loading it from disk to make predictions:\n\n```python\nimport pmdarima as pm\nfrom pmdarima.model_selection import train_test_split\nfrom pmdarima.pipeline import Pipeline\nfrom pmdarima.preprocessing import BoxCoxEndogTransformer\nimport pickle\n\n# Load/split your data\ny = pm.datasets.load_sunspots()\ntrain, test = train_test_split(y, train_size=2700)\n\n# Define and fit your pipeline\npipeline = Pipeline([\n    ('boxcox', BoxCoxEndogTransformer(lmbda2=1e-6)),  # lmbda2 avoids negative values\n    ('arima', pm.AutoARIMA(seasonal=True, m=12,\n                           suppress_warnings=True,\n                           trace=True))\n])\n\npipeline.fit(train)\n\n# Serialize your model just like you would in scikit:\nwith open('model.pkl', 'wb') as pkl:\n    pickle.dump(pipeline, pkl)\n    \n# Load it and make predictions seamlessly:\nwith open('model.pkl', 'rb') as pkl:\n    mod = pickle.load(pkl)\n    print(mod.predict(15))\n# [25.20580375 25.05573898 24.4263037  23.56766793 22.67463049 21.82231043\n# 21.04061069 20.33693017 19.70906027 19.1509862  18.6555793  18.21577243\n# 17.8250318  17.47750614 17.16803394]\n```\n\n\n### Availability\n\n`pmdarima` is available on PyPi in pre-built Wheel files for Python 3.10+ for the following platforms:\n\n* Mac (64-bit)\n* Linux (64-bit manylinux)\n* Windows (64-bit)\n  * 32-bit wheels are available for pmdarima versions below 2.0.0 and Python versions below 3.10\n\nIf a wheel doesn't exist for your platform, you can still `pip install` and it\nwill build from the source distribution tarball, however you'll need `cython>=0.29`\nand `gcc` (Mac/Linux) or `MinGW` (Windows) in order to build the package from source.\n\nNote that legacy versions (<1.0.0) are available under the name\n\"`pyramid-arima`\" and can be pip installed via:\n\n```bash\n# Legacy warning:\n$ pip install pyramid-arima\n# python -c 'import pyramid;'\n```\n\nHowever, this is not recommended.\n\n## Documentation\n\nAll of your questions and more (including examples and guides) can be answered by\nthe [`pmdarima` documentation](https://www.alkaline-ml.com/pmdarima). If not, always\nfeel free to file an issue.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"289E:149227:1815C3:5E637C:6AB92B7D"},"text_sha256":"9f709e7df1dd5297d9acd9564267bf5c12850b92eefbc1e72edd42026f720f00"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kubeflow/katib","input_row":{"repository":"kubeflow/katib","url":"https://github.com/kubeflow/katib","name":"katib","owner":"kubeflow","description":"Automated Machine Learning on Kubernetes","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1704,"issues":997,"created_at":"2018-04-03T17:07:12Z","updated_at":"2026-09-24T15:01:38Z","first_commit_at":"2018-04-03T17:07:13Z","last_commit_at":"2026-09-20T06:37:59Z","activity_months":101.56,"ai_ml_match_topics":"machine-learning; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:12.494Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kubeflow/katib","visibility":"public","created_at":"2018-04-03T17:07:12Z","updated_at":"2026-09-24T15:01:38Z","private":false,"fork":false,"archived":false,"stargazers_count":1704,"open_issues_count":118,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2253","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0852:0BA1:D8B4FF:FEACA9:6AB92B80"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2252","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0908:3203A7:1799936:1BBE294:6AB92B80"},"commit":{"sha":"ecb27de9e7a0d2ffbf8715635c6a7d4517f1602e","url":"https://github.com/kubeflow/katib/commit/ecb27de9e7a0d2ffbf8715635c6a7d4517f1602e","date":"2018-05-24T13:07:32Z","author_date":"2018-05-24T13:07:32Z","committer_date":"2018-05-24T13:07:32Z","tree_sha":"bb90d56b444ab78e47f16ff1d242e31a7c625261","message_first_line":"fix get service-param-list bug (#92)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2251","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085A:74E6D:1808818:1C2D7BD:6AB92B81"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7030,"blob_sha":"56b3425eca8cf27b0c6f411fdfba0bb96a46fd56","priority":0}],"documents":[{"path":"README.md","size":7030,"blob_sha":"56b3425eca8cf27b0c6f411fdfba0bb96a46fd56","priority":0,"status":200,"text":"# Katib\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/kubeflow/katib)](https://goreportcard.com/report/github.com/kubeflow/katib)\n\nHyperparameter Tuning on Kubernetes.\nThis project is inspired by [Google vizier](https://static.googleusercontent.com/media/research.google.com/ja//pubs/archive/bcb15507f4b52991a0783013df4222240e942381.pdf). Katib is a scalable and flexible hyperparameter tuning framework and is tightly integrated with kubernetes. Also it does not depend on a specific Deep Learning framework e.g. TensorFlow, MXNet, and PyTorch).\n\n## Name\n\nKatib stands for `secretary` in Arabic. As `Vizier` stands for a high official or a prime minister in Arabic, this project Katib is named in the honor of Vizier.\n\n## Concepts in Google Vizier\n\nAs in Google Vizier, Katib also has the concepts of Study, Trial and Suggestion.\n\n### Study\n\nRepresents a single optimization run over a feasible space. Each Study contains a configuration describing the feasible space, as well as a set of Trials. It is assumed that objective function f(x) does not change in the course of a Study.\n\n### Trial\n\nA Trial is a list of parameter values, x, that will lead to a single evaluation of f(x). A Trial can be “Completed”, which means that it has been evaluated and the objective value f(x) has been assigned to it, otherwise it is “Pending”.\nOne trial corresponds to one k8s Job.\n\n### Suggestion\n\nA Suggestion is an algorithm to construct a parameter set. Currently Katib supports the following exploration algorithms:\n\n* random\n* grid\n* [hyperband](https://arxiv.org/pdf/1603.06560.pdf)\n* [bayesian optimization](https://arxiv.org/pdf/1012.2599.pdf)\n\n## Components in Katib\n\nKatib consists of several components as shown below. Each component is running on k8s as a deployment.\nEach component communicates with others via GRPC and the API is defined at `api/api.proto`.\n\n- vizier: main components.\n    - vizier-core : API server of vizier.\n    - vizier-db\n- suggestion : implementation of each exploration algorithm.\n    - vizier-suggestion-random\n    - vizier-suggestion-grid\n    - vizier-suggestion-hyperband\n    - vizier-suggestion-bayesianoptimization\n- modeldb : WebUI\n    - modeldb-frontend\n    - modeldb-backend\n    - modeldb-db\n\n## Getting Started\n\nPlease see [getting-start.md](./docs/getting-start.md) for more details.\n\n## StudyConfig\n\nIn the Study config file, we define the feasible space of parameters and configuration of a kubernetes job. Examples of such Study configs are in the `conf` directory. The configuration items are as follows:\n\n- name: Study name\n- owner: Owner\n- objectivevaluename: Name of the objective value. Your evaluated software should be print log `{objectivevaluename}={objective value}` in std-io.\n- optimizationtype: Optimization direction of the objective value. 1=maximize 2=minimize\n- suggestalgorithm: [random, grid, hyperband] now\n- suggestionparameters: Parameter of the algorithm. Set name-value style.\n    - In random suggestion\n        - SuggestionNum: How many suggestions will Katib create.\n        - MaxParallel: Max number of run on kubernetes\n    - In grid suggestion\n        - MaxParallel: Max number of run on kubernetes\n        - GridDefault: default number of grid\n        - name: [parameter name] grid number of specified parameter.\n- metrics: The value you want to save to modeldb besides objectivevaluename.\n- image: docker image name\n- mount\n    - pvc: pvc\n    - path: MountPath in container\n- pullsecret: Name of Image pull secret\n- gpu: number of GPU (If you want to run cpu task, set 0 or delete this parameter)\n- command: commands\n- parameterconfigs: define feasible space\n    - configs\n        - name : parameter space\n        - parametertype: 1=float, 2=int, 4=categorical\n        - feasible\n            - min\n            - max\n            - list (for categorical)\n\n## Web UI\n\nKatib provides a Web UI based on ModelDB(https://github.com/mitdbg/modeldb). The ingress setting is defined in [`manifests/modeldb/frontend/ingress.yaml`](manifests/modeldb/frontend/ingress.yaml).\n\n## TensorBoard Integration\n\nIn addition to TensorFlow, other deep learning frameworks (e.g. PyTorch, MXNet) support TensorBoard format logging.\nKatib integrates with TensorBoard easily. To use TensorBoard from Katib, we define a persistent volume claim and set the mount config for the Study. Katib searches each trial log in `{pvc mount path}/logs/{Study ID}/{Trial ID}`.\n`{{STUDY_ID}}` and  `{{TRIAL_ID}}` in the Studyconfig file are replaced the corresponding value when creating each job.\nSee example `examples/tf-nmt.yml` which is a config for parameter tuning of [tensorflow/nmt](https://github.com/tensorflow/nmt).\n\n```bash\n./katib-cli -s gpu-node2:30678 -f ../examples/tf-nmt.yml Createstudy\n2018/04/03 05:52:11 connecting gpu-node2:30678\n2018/04/03 05:52:11 study conf{tf-nmt root MINIMIZE 0 configs:<name:\"--num_train_steps\" parameter_type:INT feasible:<max:\"1000\" min:\"1000\" > > configs:<name:\"--dropout\" parameter_type:DOUBLE feasible:<max:\"0.3\" min:\"0.1\" > > configs:<name:\"--beam_width\" parameter_type:INT feasible:<max:\"15\" min:\"5\" > > configs:<name:\"--num_units\" parameter_type:INT feasible:<max:\"1026\" min:\"256\" > > configs:<name:\"--attention\" parameter_type:CATEGORICAL feasible:<list:\"luong\" list:\"scaled_luong\" list:\"bahdanau\" list:\"normed_bahdanau\" > > configs:<name:\"--decay_scheme\" parameter_type:CATEGORICAL feasible:<list:\"luong234\" list:\"luong5\" list:\"luong10\" > > configs:<name:\"--encoder_type\" parameter_type:CATEGORICAL feasible:<list:\"bi\" list:\"uni\" > >  [] random median  [name:\"SuggestionNum\" value:\"10\"  name:\"MaxParallel\" value:\"6\" ] [] test_ppl [ppl bleu_dev bleu_test] yujioshima/tf-nmt:latest-gpu [python -m nmt.nmt --src=vi --tgt=en --out_dir=/nfs-mnt/logs/{{STUDY_ID}}_{{TRIAL_ID}} --vocab_prefix=/nfs-mnt/learndatas/wmt15_en_vi/vocab --train_prefix=/nfs-mnt/learndatas/wmt15_en_vi/train --dev_prefix=/nfs-mnt/learndatas/wmt15_en_vi/tst2012 --test_prefix=/nfs-mnt/learndatas/wmt15_en_vi/tst2013 --attention_architecture=standard --attention=normed_bahdanau --batch_size=128 --colocate_gradients_with_ops=true --eos=<\/s> --forget_bias=1.0 --init_weight=0.1 --learning_rate=1.0 --max_gradient_norm=5.0 --metrics=bleu --share_vocab=false --num_buckets=5 --optimizer=sgd --sos=<s> --steps_per_stats=100 --time_major=true --unit_type=lstm --src_max_len=50 --tgt_max_len=50 --infer_batch_size=32] 1 default-scheduler pvc:\"nfs\" path:\"/nfs-mnt\"  }\n2018/04/03 05:52:11 req Createstudy\n2018/04/03 05:52:11 CreateStudy: study_id:\"n5c80f4af709a70d\"\n```\nThen we perform TensorBoard deployments, services, and ingress automatically, and we can the access from Web UI.\n\n![katib-demo](https://user-images.githubusercontent.com/10014831/38241910-64fb0646-376e-11e8-8b98-c26e577f3935.gif)\n\n## CONTRIBUTING\n\nPlease feel free to test the system! [developer-guide.md](./docs/developer-guide.md) is a good starting point for  developers.\n\n## TODOs\n\n* Integrate KubeFlow (TensorFlow, Caffe2 and PyTorch operators)\n* Support Early Stopping\n* Enrich the GUI\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B16:11E74B:17A1AF:5DEDFA:6AB92B82"},"text_sha256":"681d1164165055eba1f7823c4ea1dc8d6a3747fc53a48241ee5c38666e5c5cab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2250","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:1838E2B:1C5D609:6AB92B83"},"commit":{"sha":"33c8ff4e5d1814b59abd308e6819e839e9906bc2","url":"https://github.com/kubeflow/katib/commit/33c8ff4e5d1814b59abd308e6819e839e9906bc2","date":"2026-06-22T20:07:21Z","author_date":"2026-06-22T20:07:21Z","committer_date":"2026-06-22T20:07:21Z","tree_sha":"5fc9d33748258723aaf0b53356fbdcba73f5027f","message_first_line":"Fail loudly on unsupported Optuna parameter distributions (#2666)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2249","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:180899D:1C2D985:6AB92B83"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8206,"blob_sha":"e3af73a7b67d5b5e1916e54100f219c229411ad7","priority":0},{"path":"manifests/v1beta1/installs/katib-with-kubeflow/istio-authorizationpolicy.yaml","size":344,"blob_sha":"dd3dbea64f8d54306adec0100a38e2998630c7dc","priority":1},{"path":"SECURITY.md","size":2656,"blob_sha":"5b052332920b30eb98a54d865bf07eda623e42d4","priority":1}],"documents":[{"path":"README.md","size":8206,"blob_sha":"e3af73a7b67d5b5e1916e54100f219c229411ad7","priority":0,"status":200,"text":"# Kubeflow Katib\n\n[![Build Status](https://github.com/kubeflow/katib/actions/workflows/test-go.yaml/badge.svg?branch=master)](https://github.com/kubeflow/katib/actions/workflows/test-go.yaml?branch=master)\n[![Coverage Status](https://coveralls.io/repos/github/kubeflow/katib/badge.svg?branch=master)](https://coveralls.io/github/kubeflow/katib?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kubeflow/katib)](https://goreportcard.com/report/github.com/kubeflow/katib)\n[![Releases](https://img.shields.io/github/release-pre/kubeflow/katib.svg?sort=semver)](https://github.com/kubeflow/katib/releases)\n[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9941/badge)](https://www.bestpractices.dev/projects/9941)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkubeflow%2Fkatib.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkubeflow%2Fkatib?ref=badge_shield)\n\n<h1 align=\"center\">\n    <img src=\"./docs/images/logo-title.png\" alt=\"logo\" width=\"200\">\n  <br>\n<\/h1>\n\nKubeflow Katib is a Kubernetes-native project for automated machine learning (AutoML).\nKatib supports\n[Hyperparameter Tuning](https://en.wikipedia.org/wiki/Hyperparameter_optimization),\n[Early Stopping](https://en.wikipedia.org/wiki/Early_stopping) and\n[Neural Architecture Search](https://en.wikipedia.org/wiki/Neural_architecture_search).\n\nKatib is the project which is agnostic to machine learning (ML) frameworks.\nIt can tune hyperparameters of applications written in any language of the\nusers’ choice and natively supports many ML frameworks, such as\n[TensorFlow](https://www.tensorflow.org/), [PyTorch](https://pytorch.org/), [XGBoost](https://xgboost.readthedocs.io/en/latest/), and others.\n\nKatib can perform training jobs using any Kubernetes\n[Custom Resources](https://www.kubeflow.org/docs/components/katib/trial-template/)\nwith out of the box support for [Kubeflow Training Operator](https://github.com/kubeflow/training-operator),\n[Argo Workflows](https://github.com/argoproj/argo-workflows), [Tekton Pipelines](https://github.com/tektoncd/pipeline)\nand many more.\n\nKatib stands for `secretary` in Arabic.\n\n## Search Algorithms\n\nKatib supports several search algorithms. Follow the\n[Kubeflow documentation](https://www.kubeflow.org/docs/components/katib/user-guides/hp-tuning/configure-algorithm/#hp-tuning-algorithms)\nto know more about each algorithm and check the\n[this guide](https://www.kubeflow.org/docs/components/katib/user-guides/hp-tuning/configure-algorithm/#use-custom-algorithm-in-katib)\nto implement your custom algorithm.\n\n<table>\n  <tbody>\n    <tr align=\"center\">\n      <td>\n        <b>Hyperparameter Tuning<\/b>\n      <\/td>\n      <td>\n        <b>Neural Architecture Search<\/b>\n      <\/td>\n      <td>\n        <b>Early Stopping<\/b>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#random-search\">Random Search<\/a>\n      <\/td>\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#neural-architecture-search-based-on-enas\">ENAS<\/a>\n      <\/td>\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/early-stopping/#median-stopping-rule\">Median Stop<\/a>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#grid-search\">Grid Search<\/a>\n      <\/td>\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#differentiable-architecture-search-darts\">DARTS<\/a>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#bayesian-optimization\">Bayesian Optimization<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#tree-of-parzen-estimators-tpe\">TPE<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#multivariate-tpe\">Multivariate TPE<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#covariance-matrix-adaptation-evolution-strategy-cma-es\">CMA-ES<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#sobols-quasirandom-sequence\">Sobol's Quasirandom Sequence<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#hyperband\">HyperBand<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n    <tr align=\"center\">\n      <td>\n        <a href=\"https://www.kubeflow.org/docs/components/katib/experiment/#pbt\">Population Based Training<\/a>\n      <\/td>\n      <td>\n      <\/td>\n      <td>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\nTo perform the above algorithms Katib supports the following frameworks:\n\n- [Goptuna](https://github.com/c-bata/goptuna)\n- [Hyperopt](https://github.com/hyperopt/hyperopt)\n- [Optuna](https://github.com/optuna/optuna)\n- [Scikit Optimize](https://github.com/scikit-optimize/scikit-optimize)\n\n## Prerequisites\n\nPlease check [the official Kubeflow documentation](https://www.kubeflow.org/docs/components/katib/installation/#prerequisites)\nfor prerequisites to install Katib.\n\n## Installation\n\nPlease follow [the Kubeflow Katib guide](https://www.kubeflow.org/docs/components/katib/installation/#installing-katib)\nfor the detailed instructions on how to install Katib.\n\n### Installing the Control Plane\n\nRun the following command to install the latest stable release of Katib control plane:\n\n```\nkubectl apply -k \"github.com/kubeflow/katib.git/manifests/v1beta1/installs/katib-standalone?ref=v0.17.0\"\n```\n\nRun the following command to install the latest changes of Katib control plane:\n\n```\nkubectl apply -k \"github.com/kubeflow/katib.git/manifests/v1beta1/installs/katib-standalone?ref=master\"\n```\n\nFor the Katib Experiments check the [complete examples list](./examples/v1beta1).\n\n### Installing the Python SDK\n\nKatib implements [a Python SDK](https://pypi.org/project/kubeflow-katib/) to simplify creation of\nhyperparameter tuning jobs for Data Scientists.\n\nRun the following command to install the latest stable release of Katib SDK:\n\n```sh\npip install -U kubeflow-katib\n```\n\n## Getting Started\n\nPlease refer to [the getting started guide](https://www.kubeflow.org/docs/components/katib/getting-started/#getting-started-with-katib-python-sdk)\nto quickly create your first hyperparameter tuning Experiment using the Python SDK.\n\n## Community\n\nThe following links provide information on how to get involved in the community:\n\n- Attend [the bi-weekly AutoML and Training Working Group](https://bit.ly/2PWVCkV)\n  community meeting.\n- Join our [`#kubeflow-katib`](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels)\n  Slack channel.\n- Check out [who is using Katib](ADOPTERS.md) and [presentations about Katib project](docs/presentations.md).\n\n## Contributing\n\nPlease refer to the [CONTRIBUTING guide](CONTRIBUTING.md).\n\n## Citation\n\nIf you use Katib in a scientific publication, we would appreciate\ncitations to the following paper:\n\n[A Scalable and Cloud-Native Hyperparameter Tuning System](https://arxiv.org/abs/2006.02085), George _et al._, arXiv:2006.02085, 2020.\n\nBibtex entry:\n\n```\n@misc{george2020katib,\n    title={A Scalable and Cloud-Native Hyperparameter Tuning System},\n    author={Johnu George and Ce Gao and Richard Liu and Hou Gang Liu and Yuan Tang and Ramdoot Pydipaty and Amit Kumar Saha},\n    year={2020},\n    eprint={2006.02085},\n    archivePrefix={arXiv},\n    primaryClass={cs.DC}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:1802DB:5E5061:6AB92B83"},"text_sha256":"a8217ceae357479a5d5a563f60cc9c839f30c3bcdeed7d3b933728a7cc345325"},{"path":"manifests/v1beta1/installs/katib-with-kubeflow/istio-authorizationpolicy.yaml","size":344,"blob_sha":"dd3dbea64f8d54306adec0100a38e2998630c7dc","priority":1,"status":200,"text":"---\napiVersion: security.istio.io/v1beta1\nkind: AuthorizationPolicy\nmetadata:\n  name: katib-ui\n  namespace: kubeflow\nspec:\n  action: ALLOW\n  selector:\n    matchLabels:\n      katib.kubeflow.org/component: ui\n  rules:\n    - from:\n        - source:\n            principals: [\"cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account\"]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A7FE:3BF56:175BA9:5DA97E:6AB92B83"},"text_sha256":"91e57351b1603d6991a670bdc10c15e0c9fc38b04eae822e3ab749829f03bd42"},{"path":"SECURITY.md","size":2656,"blob_sha":"5b052332920b30eb98a54d865bf07eda623e42d4","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nKubeflow Katib versions are expressed as `vX.Y.Z`, where X is the major version,\nY is the minor version, and Z is the patch version, following the\n[Semantic Versioning](https://semver.org/) terminology.\n\nThe Kubeflow Katib project maintains release branches for the most recent two minor releases.\nApplicable fixes, including security fixes, may be backported to those two release branches,\ndepending on severity and feasibility.\n\nUsers are encouraged to stay updated with the latest releases to benefit from security patches and\nimprovements.\n\n## Reporting a Vulnerability\n\nWe're extremely grateful for security researchers and users that report vulnerabilities to the\nKubeflow Open Source Community. All reports are thoroughly investigated by Kubeflow projects owners.\n\nYou can use the following ways to report security vulnerabilities privately:\n\n- Using the Kubeflow Katib repository [GitHub Security Advisory](https://github.com/kubeflow/katib/security/advisories/new).\n- Using our private Kubeflow Steering Committee mailing list: ksc@kubeflow.org.\n\nPlease provide detailed information to help us understand and address the issue promptly.\n\n## Disclosure Process\n\n**Acknowledgment**: We will acknowledge receipt of your report within 10 business days.\n\n**Assessment**: The Kubeflow projects owners will investigate the reported issue to determine its\nvalidity and severity.\n\n**Resolution**: If the issue is confirmed, we will work on a fix and prepare a release.\n\n**Notification**: Once a fix is available, we will notify the reporter and coordinate a public\ndisclosure.\n\n**Public Disclosure**: Details of the vulnerability and the fix will be published in the project's\nrelease notes and communicated through appropriate channels.\n\n## Prevention Mechanisms\n\nKubeflow Katib employs several measures to prevent security issues:\n\n**Code Reviews**: All code changes are reviewed by maintainers to ensure code quality and security.\n\n**Dependency Management**: Regular updates and monitoring of dependencies (e.g. Dependabot) to\naddress known vulnerabilities.\n\n**Continuous Integration**: Automated testing and security checks are integrated into the CI/CD pipeline.\n\n**Image Scanning**: Container images are scanned for vulnerabilities.\n\n## Communication Channels\n\nFor the general questions please join the following resources:\n\n- Kubeflow [Slack channels](https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels).\n\n- Kubeflow discuss [mailing list](https://www.kubeflow.org/docs/about/community/#kubeflow-mailing-list).\n\nPlease **do not report** security vulnerabilities through public channels.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDCA:11E74B:17A1C2:5DEE41:6AB92B83"},"text_sha256":"f4eaade6d2ac06c365106b2bfe78cda59c3c2a6990db03b8863ddaa4178dc930"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"BindsNET/bindsnet","input_row":{"repository":"BindsNET/bindsnet","url":"https://github.com/BindsNET/bindsnet","name":"bindsnet","owner":"BindsNET","description":"Simulation of spiking neural networks (SNNs) using PyTorch.","language":"Python","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":1703,"issues":242,"created_at":"2018-02-09T19:42:37Z","updated_at":"2026-09-25T03:11:50Z","first_commit_at":"2018-02-09T19:42:38Z","last_commit_at":"2026-09-22T21:27:59Z","activity_months":103.39,"ai_ml_match_topics":"machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:16.894Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"BindsNET/bindsnet","visibility":"public","created_at":"2018-02-09T19:42:37Z","updated_at":"2026-09-25T03:11:50Z","private":false,"fork":false,"archived":false,"stargazers_count":1703,"open_issues_count":10,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"2248","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:1838F73:1C5D790:6AB92B84"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2247","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17C4056:1BE8AB2:6AB92B85"},"commit":{"sha":"03fb23a7b3f9557be5f3733fc426fac9fdff707b","url":"https://github.com/BindsNET/bindsnet/commit/03fb23a7b3f9557be5f3733fc426fac9fdff707b","date":"2018-05-24T22:12:13Z","author_date":"2018-05-24T22:12:13Z","committer_date":"2018-05-24T22:12:13Z","tree_sha":"47c6dbd1c550dfe6aadca5609585755a530ba39b","message_first_line":"Fixed Conv2dConnection bug."},"tree_request_status":200,"tree_rate":{"github_remaining":"2246","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17D28C1:1BF7509:6AB92B85"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4693,"blob_sha":"1249ea59cbd5e2f7d32c22c25e97f5e2e94ffd1e","priority":0}],"documents":[{"path":"README.md","size":4693,"blob_sha":"1249ea59cbd5e2f7d32c22c25e97f5e2e94ffd1e","priority":0,"status":200,"text":"# BindsNET\n\nPython package used for simulating spiking neural networks (SNNs) in [PyTorch](http://pytorch.org/).\n\nWe are interested in applying SNNs to machine learning (ML) and reinforcement learning (RL) problems, but the code (especially the core `network` functionality for building and simulating SNNs) can be used for any purpose.\n\n[![Build Status](https://travis-ci.com/Hananel-Hazan/bindsnet.svg?token=trym5Uzx1rs9Ez2yENEF&branch=master)](https://travis-ci.com/Hananel-Hazan/bindsnet)\n\n## Requirements\n\n- Python 3.6\n\n## Setting things up\n\nTo build the `bindsnet` package from source, change directory to the top level of this project and issue\n\n```\npip install .\n```\n\nOr, to install in editable mode (allows modification of package with re-installing):\n\n```\npip install -e .\n```\n\nPyPI support (`pip install bindsnet`) *hopefully* coming soon.\n\nTo run a near-replication of the SNN from [this paper](https://www.frontiersin.org/articles/10.3389/fncom.2015.00099/full#), issue\n\n```\ncd examples/mnist\npython eth_mnist.py\n```\n\nThere are a number of optional command-line arguments which can be passed in, including `--plot` (displays useful monitoring figures), `--n_neurons [int]` (number of excitatory, inhibitory neurons simulated), `--mode ['train' | 'test']` (sets network operation to the training or testing phase), and more. Run the script with the `--help` or `-h` flag for more information.\n\nA number of other examples are available in the `examples` directory that are meant to showcase BindsNET's functionality. Take a look, and let us know what you think!\n\n## Running the tests\n\nIssue the following to run the tests:\n\n```\npython -m pytest test\n```\n\n## Background\n\nThe simulation of biologically plausible spiking neuron dynamics can be challenging. It is typically done by solving ordinary differential equations (ODEs) which describe said dynamics. PyTorch does not explicitly support the solution of differential equations (as opposed to [`brian2`](https://github.com/brian-team/brian2), for example), but we can convert the ODEs defining the dynamics into difference equations and solve them at regular, short intervals (a `dt` on the order of 1 millisecond) as an approximation. Of course, under the hood, packages like `brian2` are doing the same thing. Doing this in [`PyTorch`](http://pytorch.org/) is exciting for a few reasons:\n\n1. We can use the powerful and flexible [`torch.Tensor`](http://pytorch.org/) object, a wrapper around the [`numpy.ndarray`](https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.ndarray.html) which can be transferred to and from GPU devices.\n\n2. We can avoid \"reinventing the wheel\" by repurposing functions from the [`torch.nn.functional`](http://pytorch.org/docs/master/nn.html#torch-nn-functional) PyTorch submodule in our SNN architectures; e.g., convolution or pooling functions.\n\nThe concept that the neuron spike ordering and their relative timing encode information is a central theme in neuroscience. [Markram et al. (1997)](http://www.caam.rice.edu/~caam415/lec_gab/g4/markram_etal98.pdf) proposed that synapses between neurons should strengthen or degrade based on this relative timing, and prior to that, [Donald Hebb](https://en.wikipedia.org/wiki/Donald_O._Hebb) proposed the theory of Hebbian learning, often simply stated as \"Neurons that fire together, wire together.\" Markram et al.'s extension of the Hebbian theory is known as spike-timing-dependent plasticity (STDP).\n\nWe are interested in applying SNNs to ML and RL problems. We use STDP to modify weights of synapses connecting pairs or populations of neurons in SNNs. In the context of ML, we want to learn a setting of synapse weights which will generate data-dependent spiking activity in SNNs. This activity will allow us to subsequently perform some ML task of interest; e.g., discriminating or clustering input data. In the context of RL, we may think of the spiking neural network as an RL agent, whose spiking activity may be converted into actions in an environment's action space.\n\nWe have provided some simple starter scripts for doing unsupervised learning (learning a fully-connected or convolutional representation via STDP), supervised learning (clamping output neurons to desired spiking behavior depending on data labels), and reinforcement learning (converting observations from the Atari game Space Invaders to input to an SNN, and converting network activity back to actions in the game).\n\n## Contributors\n\n- Daniel Saunders ([email](mailto:djsaunde@cs.umass.edu))\n\n- Hananel Hazan ([email](mailto:hananel@hazan.org.il))\n\n- Darpan Sanghavi ([email](mailto:dsanghavi@cs.umass.edu))\n\n- Hassaan Khan ([email](mailto:hqkhan@umass.edu))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3AD0:241B62:179F81:5DEDC2:6AB92B83"},"text_sha256":"7233dee1f29b62a94609278662dcf8f1d9684db1c478ce4634d57426dff78ecc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2245","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083B:71C58:17BBE86:1BE0D53:6AB92B86"},"commit":{"sha":"7907a76b1e3e031cddb6ef54c3b39e66fa4627ec","url":"https://github.com/BindsNET/bindsnet/commit/7907a76b1e3e031cddb6ef54c3b39e66fa4627ec","date":"2026-06-24T15:12:42Z","author_date":"2026-06-24T15:12:42Z","committer_date":"2026-06-24T15:12:42Z","tree_sha":"493108d23bb70c9f5806ec7d796759ef41e63898","message_first_line":"Merge pull request #767 from BindsNET/dependabot/pip/jupyter-server-2.20.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2244","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:1814D19:1C39611:6AB92B86"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11367,"blob_sha":"16f22536991c89771d01954f1d28557638319224","priority":0}],"documents":[{"path":"README.md","size":11367,"blob_sha":"16f22536991c89771d01954f1d28557638319224","priority":0,"status":200,"text":"<p align=\"center\"><img width=\"25%\" src=\"docs/logo.png\"/><\/p>\n\nA Python package used for simulating spiking neural networks (SNNs) on CPUs or GPUs using [PyTorch](http://pytorch.org/) `Tensor` functionality.\n\nBindsNET is a spiking neural network simulation library geared towards the development of biologically inspired algorithms for machine learning.\n\nThis package is used as part of ongoing research on applying SNNs, machine learning (ML) and reinforcement learning (RL) problems in the [Biologically Inspired Neural & Dynamical Systems (BINDS) lab](http://binds.cs.umass.edu/) and the Allen Discovery Center at Tufts University.\n\n\nCheck out the [BindsNET examples](https://github.com/BindsNET/bindsnet/tree/master/examples) for a collection of experiments, functions for the analysis of results, plots of experiment outcomes, and more. Documentation for the package can be found [here](https://bindsnet-docs.readthedocs.io).\n\n[![Build Status](https://github.com/BindsNET/bindsnet/actions/workflows/python-app.yml/badge.svg?branch=master)](https://github.com/BindsNET/bindsnet/actions/workflows/python-app.yml)\n[![CodeQL](https://github.com/BindsNET/bindsnet/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/BindsNET/bindsnet/actions/workflows/github-code-scanning/codeql)\n[![Documentation Status](https://readthedocs.org/projects/bindsnet-docs/badge/?version=latest)](https://bindsnet-docs.readthedocs.io/?badge=latest)\n[![Neuromorphic Computing](https://img.shields.io/badge/Collaboration_Network-Open_Neuromorphic-blue)](https://open-neuromorphic.org/neuromorphic-computing/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20695115.svg)](https://doi.org/10.5281/zenodo.20695115)\n\n## Requirements\n\n- Python >=3.11,<3.14 (continuously tested on 3.11, 3.12, and 3.13)\n\n## Setting things up\n\n### Reproducible install\nFor a byte-for-byte reproducible environment, install the pinned dependency set from\nthe committed `poetry.lock`:\n\n```\npoetry install\n```\n\nAlternatively, the provided `Dockerfile` builds the full pinned stack (see *Using Docker* below).\n\n## Using Pip\nTo install the most recent stable release from the GitHub repository\n\n```\npip install git+https://github.com/BindsNET/bindsnet.git\n```\n\nOr, to build the `bindsnet` package from source, clone the GitHub repository, change directory to the top level of this project, and issue\n\n```\npip install .\n```\n\nOr, to install in editable mode (allows modification of package without re-installing):\n\n```\npip install -e .\n```\n\nTo install the packages necessary to interface with the [OpenAI gym RL environments library](https://github.com/openai/gym), follow their instructions for installing the packages needed to run the RL environments simulator (on Linux / MacOS).\n\n### Using Docker\n[Link](https://hub.docker.com/r/hqkhan/bindsnet/) to Docker repository.\n\nWe also provide a Dockerfile in which BindsNET and all of its dependencies come installed in. Issue\n\n```\ndocker build .\n```\nat the top level directory of this project to create a docker image. \n\nTo change the name of the newly built image, issue\n```\ndocker tag <IMAGE_ID> <NEW_IMAGE_ID>\n```\n\nTo run a container and get a bash terminal inside it, issue\n\n```\ndocker run -it <NEW_IMAGE_ID> bash\n```\n\n## Getting started\n\nTo run a near-replication of the SNN from [this paper](https://www.frontiersin.org/articles/10.3389/fncom.2015.00099/full#), issue\n\n```\ncd examples/mnist\npython eth_mnist.py\n```\n\nThere are a number of optional command-line arguments which can be passed in, including `--plot` (displays useful monitoring figures), `--n_neurons [int]` (number of excitatory, inhibitory neurons simulated), `--mode ['train' | 'test']` (sets network operation to the training or testing phase), and more. Run the script with the `--help` or `-h` flag for more information.\n\nA number of other examples are available in the `examples` directory that are meant to showcase BindsNET's functionality. Take a look, and let us know what you think!\n\n## Running the tests\n\nIssue the following to run the tests:\n\n```\npython -m pytest test/\n```\n\nSome tests will fail if Open AI `gym` is not installed on your machine.\n\n## Datasets\n\nBindsNET ships no third-party datasets; its loaders fetch them from upstream sources.\nEvery dataset and synthetic stimulus used by the examples, benchmarks, and dataset\nloaders — with source, retrieval method, license pointer, and spike-encoding\npreprocessing — is declared in [DATA.md](DATA.md).\n\n## Reproducing results\n\n[REPRODUCING.md](REPRODUCING.md) maps each shipped model and published claim to its\nmodel class, example script, exact command, seed, and expected output (e.g. the\nDiehl & Cook 2015 MNIST replication via `examples/mnist/eth_mnist.py`, and the\nHazan et al. 2018 scaling benchmark).\n\n## Background\n\nThe simulation of biologically plausible spiking neuron dynamics can be challenging. It is typically done by solving ordinary differential equations (ODEs) which describe said dynamics. PyTorch does not explicitly support the solution of differential equations (as opposed to [`brian2`](https://github.com/brian-team/brian2), for example), but we can convert the ODEs defining the dynamics into difference equations and solve them at regular, short intervals (a `dt` on the order of 1 millisecond) as an approximation. Of course, under the hood, packages like `brian2` are doing the same thing. Doing this in [`PyTorch`](http://pytorch.org/) is exciting for a few reasons:\n\n1. We can use the powerful and flexible [`torch.Tensor`](http://pytorch.org/) object, a wrapper around the [`numpy.ndarray`](https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.ndarray.html) which can be transferred to and from GPU devices.\n\n2. We can avoid \"reinventing the wheel\" by repurposing functions from the [`torch.nn.functional`](http://pytorch.org/docs/master/nn.html#torch-nn-functional) PyTorch submodule in our SNN architectures; e.g., convolution or pooling functions.\n\nThe concept that the neuron spike ordering and their relative timing encode information is a central theme in neuroscience. [Markram et al. (1997)](http://www.caam.rice.edu/~caam415/lec_gab/g4/markram_etal98.pdf) proposed that synapses between neurons should strengthen or degrade based on this relative timing, and prior to that, [Donald Hebb](https://en.wikipedia.org/wiki/Donald_O._Hebb) proposed the theory of Hebbian learning, often simply stated as \"Neurons that fire together, wire together.\" Markram et al.'s extension of the Hebbian theory is known as spike-timing-dependent plasticity (STDP).\n\nWe are interested in applying SNNs to ML and RL problems. We use STDP to modify weights of synapses connecting pairs or populations of neurons in SNNs. In the context of ML, we want to learn a setting of synapse weights which will generate data-dependent spiking activity in SNNs. This activity will allow us to subsequently perform some ML task of interest; e.g., discriminating or clustering input data. In the context of RL, we may think of the spiking neural network as an RL agent, whose spiking activity may be converted into actions in an environment's action space.\n\nWe have provided some simple starter scripts for doing unsupervised learning (learning a fully-connected or convolutional representation via STDP), supervised learning (clamping output neurons to desired spiking behavior depending on data labels), and reinforcement learning (converting observations from the Atari game Space Invaders to input to an SNN, and converting network activity back to actions in the game).\n\n## Benchmarking\nWe simulated a network with a population of n Poisson input neurons with firing rates (in Hertz) drawn randomly from U(0, 100), connected all-to-all with a equally-sized population of leaky integrate-and-fire (LIF) neurons, with connection weights sampled from N(0,1). We varied n systematically from 250 to 10,000 in steps of 250, and ran each simulation with every library for 1,000ms with a time resolution dt = 1.0. We tested BindsNET (with CPU and GPU computation), BRIAN2, PyNEST (the Python interface to the NEST SLI interface that runs the C++NEST core simulator), ANNarchy (with CPU and GPU computation), and BRIAN2genn (the BRIAN2 front-end to the GeNN simulator).\n\nSeveral packages, including BRIAN and PyNEST, allow the setting of certain global preferences; e.g., the number of CPU threads, the number of OpenMP processes, etc. We chose these settings for our benchmark study in an attempt to maximize each library's speed, but note that BindsNET requires no setting of such options. Our approach, inheriting the computational model of PyTorch, appears to make the best use of the available hardware, and therefore makes it simple for practitioners to get the best performance from their system with the least effort.\n\n<p align=\"middle\">\n<img src=\"https://github.com/Hananel-Hazan/bindsnet/blob/master/docs/BindsNET%20benchmark.png\" alt=\"BindsNET%20Benchmark\"  width=\"503\" height=\"403\">\n<\/p>\n\nAll simulations run on Ubuntu 16.04 LTS with Intel(R) Xeon(R) CPU E5-2687W v3 @ 3.10GHz, 128Gb RAM @ 2133MHz, and two GeForce GTX TITAN X (GM200) GPUs. Python 3.6 is used in all cases. Clock time was recorded for each simulation run. \n\n## Citation\n\nIf you use BindsNET in your research, please cite the following [article](https://www.frontiersin.org/article/10.3389/fninf.2018.00089):\n\n```\n@ARTICLE{10.3389/fninf.2018.00089,\n\tAUTHOR={Hazan, Hananel and Saunders, Daniel J. and Khan, Hassaan and Patel, Devdhar and Sanghavi, Darpan T. and Siegelmann, Hava T. and Kozma, Robert},   \n\tTITLE={BindsNET: A Machine Learning-Oriented Spiking Neural Networks Library in Python},      \n\tJOURNAL={Frontiers in Neuroinformatics},      \n\tVOLUME={12},      \n\tPAGES={89},     \n\tYEAR={2018}, \n\tURL={https://www.frontiersin.org/article/10.3389/fninf.2018.00089},       \n\tDOI={10.3389/fninf.2018.00089},      \n\tISSN={1662-5196},\n}\n\n```\n\n### Citing the software\n\nTo cite a specific version of the BindsNET software, use the archived release on Zenodo.\nThe concept DOI below always resolves to the latest version:\n\n> BindsNET contributors. *BindsNET*. Zenodo. https://doi.org/10.5281/zenodo.20695115\n\n(For the exact release used, cite its version DOI; e.g. v0.3.4 is\n[10.5281/zenodo.20695116](https://doi.org/10.5281/zenodo.20695116).) A machine-readable\ncitation is provided in [`CITATION.cff`](CITATION.cff).\n\n## Contributors\n\n- Hava Siegelmann - Director of BINDS lab at UMass\n- Robert Kozma - Co-Director of BINDS lab (2018-2019)\n- Hananel Hazan ([email](mailto:hananel@hazan.org.il)) - Spearheaded BindsNET and its main maintainer.\n- Daniel Saunders ([email](mailto:djsaunde@cs.umass.edu)) - MSc student, BindsNET core functions coder (2018-2019). \n- Darpan Sanghavi ([email](mailto:dsanghavi@cs.umass.edu)) - MSc student BINDS Lab (2018)\n- Hassaan Khan ([email](mailto:hqkhan@umass.edu)) - MSc student BINDS Lab (2018)\n- Devdhar Patel ([email](mailto:devdharpatel@cs.umass.edu)) - MSc student BINDS Lab (2018)\n- Simon Caby [github](https://github.com/SimonInParis) \n- Christopher Earl ([email](mailto:cearl@umass.edu)) - MSc student (2021 - present)\n\n\n<a href=\"https://github.com/Bindsnet/bindsnet/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=Bindsnet/bindsnet\" />\n<\/a>\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## License\nGNU Affero General Public License v3.0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4776:345ED4:1792F2:5DE016:6AB92B87"},"text_sha256":"e2aa498c2fd2c3ea5e9ce977794c1a55cb41aa80e278fe2bb762efc3d5202471"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"explosion/sense2vec","input_row":{"repository":"explosion/sense2vec","url":"https://github.com/explosion/sense2vec","name":"sense2vec","owner":"explosion","description":"🦆 Contextually-keyed word vectors","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1679,"issues":115,"created_at":"2016-01-23T22:15:49Z","updated_at":"2026-09-11T02:38:19Z","first_commit_at":"2016-01-23T22:07:44Z","last_commit_at":"2026-03-27T07:50:59Z","activity_months":122.06,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:19.647Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"explosion/sense2vec","visibility":"public","created_at":"2016-01-23T22:15:49Z","updated_at":"2026-09-11T02:38:19Z","private":false,"fork":false,"archived":false,"stargazers_count":1679,"open_issues_count":23,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2243","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:17F81F7:1C1D429:6AB92B87"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2242","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0871:71C58:17BBFB2:1BE0EBD:6AB92B88"},"commit":{"sha":"b0174715a5e764f16acb19197c99ecc7a425de93","url":"https://github.com/explosion/sense2vec/commit/b0174715a5e764f16acb19197c99ecc7a425de93","date":"2018-04-28T23:53:16Z","author_date":"2018-04-28T23:53:16Z","committer_date":"2018-04-28T23:53:16Z","tree_sha":"cfe5c886b170c6677133bf7444c879140a1a96e5","message_first_line":"Fix open calls and use io.open"},"tree_request_status":200,"tree_rate":{"github_remaining":"2241","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0823:7580A:180355D:1C282BC:6AB92B88"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":14415,"blob_sha":"5838c9fd85c503bd1d7ea5b9caef4994a402d9ee","priority":0}],"documents":[{"path":"README.rst","size":14415,"blob_sha":"5838c9fd85c503bd1d7ea5b9caef4994a402d9ee","priority":0,"status":200,"text":"sense2vec: Use NLP to go beyond vanilla word2vec\n************************************************\n\nsense2vec (`Trask et. al <https://arxiv.org/abs/1511.06388>`_, 2015) is a nice\ntwist on `word2vec <https://en.wikipedia.org/wiki/Word2vec>`_ that lets you\nlearn more interesting, detailed and context-sensitive word vectors. For an\ninteractive example of the technology, see our\n`sense2vec demo <https://demos.explosion.ai/sense2vec>`_ that lets you explore\nsemantic similarities across all Reddit comments of 2015.\n\nThis library is a simple Python/Cython implementation for loading and querying\nsense2vec models. While it's best used in combination with\n`spaCy <http://spacy.io>`_, the ``sense2vec`` library itself is very lightweight\nand can also be used as a standalone module. See below for usage details.\n\n🦆 **Version 1.0 alpha out now!** `Read the release notes here. <https://github.com/explosion/sense2vec/releases/>`_\n\n.. image:: https://img.shields.io/travis/explosion/sense2vec/master.svg?style=flat-square\n    :target: https://travis-ci.org/explosion/sense2vec\n    :alt: Build Status\n\n.. image:: https://img.shields.io/github/release/explosion/sense2vec/all.svg?style=flat-square\n    :target: https://github.com/explosion/sense2vec/releases\n    :alt: Current Release Version\n\n.. image:: https://img.shields.io/pypi/v/sense2vec.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/sense2vec\n    :alt: pypi Version\n\nUsage Examples\n==============\n\nUsage with spaCy\n----------------\n\n.. code:: python\n\n    import spacy\n    from sense2vec import Sense2VecComponent\n\n    nlp = spacy.load('en')\n    s2v = Sense2VecComponent('/path/to/reddit_vectors-1.1.0')\n    nlp.add_pipe(s2v)\n\n    doc = nlp(u\"A sentence about natural language processing.\")\n    assert doc[3].text == u'natural language processing'\n    freq = doc[3]._.s2v_freq\n    vector = doc[3]._.s2v_vec\n    most_similar = doc[3]._.s2v_most_similar(3)\n    # [(('natural language processing', 'NOUN'), 1.0),\n    #  (('machine learning', 'NOUN'), 0.8986966609954834),\n    #  (('computer vision', 'NOUN'), 0.8636297583580017)]\n\nStandalone usage without spaCy\n------------------------------\n\n.. code:: python\n\n    import sense2vec\n\n    s2v = sense2vec.load('/path/to/reddit_vectors-1.1.0')\n    query = u'natural_language_processing|NOUN'\n    assert query in s2v\n    freq, vector = s2v[query]\n    words, scores = s2v.most_similar(vector, 3)\n    most_similar = list(zip(words, scores))\n    # [('natural_language_processing|NOUN', 1.0),\n    #  ('machine_learning|NOUN', 0.8986966609954834),\n    #  ('computer_vision|NOUN', 0.8636297583580017)]\n\nInstallation & Setup\n====================\n\n==================== ===\n**Operating system** macOS / OS X, Linux, Windows (Cygwin, MinGW, Visual Studio)\n**Python version**   CPython 2.7, 3.4+. Only 64 bit.\n**Package managers** `pip <https://pypi.python.org/pypi/sense2vec>`_ (source packages only)\n==================== ===\n\nsense2vec releases are available as source packages on pip:\n\n.. code:: bash\n\n    pip install sense2vec==1.0.0a0\n\nThe Reddit vectors model is attached to the\n`latest release <https://github.com/explosion/sense2vec/releases>`_. To load it\nin, download the ``.tar.gz`` archive, unpack it and point ``sense2vec.load`` to\nthe extracted data directory:\n\n.. code:: python\n\n    import sense2vec\n    s2v = sense2vec.load('/path/to/reddit_vectors-1.1.0')\n\nUsage\n=====\n\nUsage with spaCy v2.x\n---------------------\n\nThe easiest way to use the library and vectors is to plug it into your spaCy\npipeline. Note that ``sense2vec`` doesn't depend on spaCy, so you'll have to\ninstall it separately and download the English model.\n\n.. code:: bash\n\n    pip install -U spacy\n    python -m spacy download en\n\nThe ``sense2vec`` package exposes a ``Sense2VecComponent``, which can be\ninitialised with the data path and added to your spaCy pipeline as a\n`custom pipeline component <https://spacy.io/usage/processing-pipelines#custom-components>`_.\nBy default, components are added to the *end of the pipeline*, which is the\nrecommended position for this component, since it needs access to the dependency\nparse and, if available, named entities.\n\n.. code:: python\n\n    import spacy\n    from sense2vec import Sense2VecComponent\n\n    nlp = spacy.load('en')\n    s2v = Sense2VecComponent('/path/to/reddit_vectors-1.1.0')\n    nlp.add_pipe(s2v)\n\nThe pipeline component will **merge noun phrases and entities** according to\nthe same schema used when training the sense2vec models (e.g. noun chunks\nwithout determiners like \"the\"). This ensures that you'll be able to retrieve\nmeaningful vectors for phrases in your text. The component will also add\nserveral `extension attributes and methods <https://spacy.io/usage/processing-pipelines#custom-components-attributes>`_\nto spaCy's ``Token`` and ``Span`` objects that let you retrieve vectors and\nfrequencies, as well as most similar terms.\n\n.. code:: python\n\n    doc = nlp(u\"A sentence about natural language processing.\")\n    assert doc[3].text == u'natural language processing'\n    assert doc[3]._.in_s2v\n    freq = doc[3]._.s2v_freq\n    vector = doc[3]._.s2v_vec\n    most_similar = doc[3]._.s2v_most_similar(10)\n\nFor entities, the entity labels are used as the \"sense\" (instead of the\ntoken's part-of-speech tag):\n\n.. code:: python\n\n    doc = nlp(u\"A sentence about Facebook and Google.\")\n    for ent in doc.ents:\n        assert ent._.in_s2v\n        most_similar = ent._.s2v_most_similar(3)\n\nAvailable attributes\n^^^^^^^^^^^^^^^^^^^^\n\nThe following attributes are available via the `._` property – for example\n``token._.in_s2v``:\n\n==================== ============== ==================== ===\nName                 Attribute Type Type                 Description\n==================== ============== ==================== ===\n``in_s2v``           property       bool                 Whether a key exists in the vector map.\n``s2v_freq``         property       int                  The frequency of the given key.\n``s2v_vec``          property       ``ndarray[float32]`` The vector of the given key.\n``s2v_most_similar`` method         list                 Get the ``n`` most similar terms. Returns a list of ``((word, sense), score)`` tuples.\n==================== ============== ==================== ===\n\n**A note on span attributes:**  Under the hood, entities in ``doc.ents`` are\n``Span`` objects. This is why the pipeline component also adds attributes and\nmethods to spans and not just tokens. However, it's not recommended to use the\nsense2vec attributes on arbitrary slices of the document, since the model likely\nwon't have a key for the respective text. ``Span`` objects also don't have a\npart-of-speech tag, so if no entity label is present, the \"sense\" defaults to\nthe root's part-of-speech tag.\n\nStandalone usage\n----------------\n\nTo use only the ``sense2vec`` library, you can import the package and then call\nits ``load()`` method to load in the vectors.\n\n.. code:: python\n\n    import sense2vec\n    s2v = sense2vec.load('/path/to/reddit_vectors-1.1.0')\n\n``sense2vec.load`` returns an instance of the ``VectorMap`` class, which you\ncan interact with via the following methods.\n\n⚠️ **Important note:** When interacting with the ``VectorMap`` directly, the\nkeys need to follow the scheme of ``phrase_text|SENSE`` (note the ``_`` instead\nof spaces and the ``|`` before the tag or label) – for example,\n``machine_learning|NOUN``. Also note that the underlying vector table is\ncase-sensitive.\n\n``VectorMap.__len__``\n^^^^^^^^^^^^^^^^^^^^^\n\nThe total number of entries in the map.\n\n=========== ==== ===\nArgument    Type Description\n=========== ==== ===\n**RETURNS** int  The number of entries in the map.\n=========== ==== ===\n\n.. code:: python\n\n    s2v = sense2vec.load('/path/to/reddit_vectors-1.1.0')\n    assert len(s2v) == 1195261\n\n``VectorMap.__contains__``\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nCheck whether the ``VectorMap`` has a given key. Keys consist of the word\nstring, a pipe and the \"sense\", i.e. the part-of-speech tag or entity label.\nFor example: ``'duck|NOUN'`` or ``'duck|VERB'``. See the section on \"Senses\"\nbelow for more details. Also note that the underlying vector table is\n**case-sensitive**.\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n``string``  unicode The key to check.\n**RETURNS** bool    Whether the key is part of the map.\n=========== ======= ===\n\n.. code:: python\n\n    assert u'duck|NOUN' in s2v\n    assert u'duck|VERB' in s2v\n    assert u'dkdksl|VERB' not in s2v\n\n``VectorMap.__getitem__``\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nRetrieve a ``(frequency, vector)`` tuple from the vector map. The frequency is\nan integer, the vector a ``numpy.ndarray(dtype='float32')``. If the key is not\nfound, a ``KeyError`` is raised.\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n``string``  unicode The key to retrieve the frequency and vector for.\n**RETURNS** tuple   The ``(frequency, vector)`` tuple.\n=========== ======= ===\n\n.. code:: python\n\n    freq, vector = s2v[u'duck|NOUN']\n\n``VectorMap.__setitem__``\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAssign a ``(frequency, vector)`` tuple to the vector map. The frequency should\nbe an integer, the vector a ``numpy.ndarray(dtype='float32')``.\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n``key``     unicode The key to assign the frequency and vector to.\n``value``   tuple   The ``(frequency, vector)`` tuple to assign.\n=========== ======= ===\n\n.. code:: python\n\n    freq, vector = s2v[u'avocado|NOUN']\n    s2v[u'🥑|NOUN'] = (freq, vector)\n\n``VectorMap.__iter__``, ``VectorMap.keys``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIterate over the keys in the map, in order of insertion.\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n**YIELDS**  unicode The keys in the map.\n=========== ======= ===\n\n``VectorMap.values``\n^^^^^^^^^^^^^^^^^^^^\n\nIterate over the values in the map, in order of insertion and yield\n``(frequency, vector)`` tuples from the vector map. The frequency is an integer,\nthe vector a ``numpy.ndarray(dtype='float32')``\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n**YIELDS**  tuple   The values in the map.\n=========== ======= ===\n\n``VectorMap.items``\n^^^^^^^^^^^^^^^^^^^\n\nIterate over the items in the map, in order of insertion and yield\n``(key, (frequency, vector))`` tuples from the vector map. The frequency is an integer, the vector a ``numpy.ndarray(dtype='float32')``\n\n=========== ======= ===\nArgument    Type    Description\n=========== ======= ===\n**YIELDS**  tuple   The items in the map.\n=========== ======= ===\n\n``VectorMap.most_similar``\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFind the keys of the ``n`` most similar entries, given a vector. Note that\nthe *most* similar entry with a score of ``1.0`` will be the key of the query\nvector itself.\n\n=========== ================================== ===\nArgument    Type                               Description\n=========== ================================== ===\n``vector``  ``numpy.ndarray(dtype='float32')`` The vector to compare to.\n``n``       int                                The number of entries to return. Defaults to ``10``.\n**RETURNS** tuple                              A ``(words, scores)`` tuple.\n=========== ================================== ===\n\n.. code:: python\n\n    freq, vector = s2v[u'avocado|NOUN']\n    words, scores = s2v.most_similar(vector, n=3)\n    for word, score in zip(words, scores):\n        print(word, score)\n    # avocado|NOUN 1.0\n    # avacado|NOUN 0.970944344997406\n    # spinach|NOUN 0.962776780128479\n\n``VectorMap.save``\n^^^^^^^^^^^^^^^^^^\n\nSerialize the model to a directory. This will export three files to the output\ndirectory: a  ``strings.json`` containing the keys in insertion order, a\n``freqs.json`` containing the frequencies and a ``vectors.bin`` containing the\nvectors.\n\n============ ======= ===\nArgument     Type    Description\n============ ======= ===\n``data_dir`` unicode The path to the output directory.\n============ ======= ===\n\n``VectorMap.load``\n^^^^^^^^^^^^^^^^^^\n\nLoad a model from a directory. Expects three files in the directory (see\n``VectorMap.save`` for details).\n\n============ ======= ===\nArgument     Type    Description\n============ ======= ===\n``data_dir`` unicode The path to load the model from.\n============ ======= ===\n\nSenses\n======\n\nThe pre-trained Reddit vectors support the following \"senses\", either\npart-of-speech tags or entity labels. For more details, see spaCy's\n`annotation scheme overview <https://spacy.io/api/annotation>`_.\n\n========= ========================== ===\nTag       Description                Examples\n========= ========================== ===\n``ADJ``   adjective                  big, old, green\n``ADP``   adposition                 in, to, during\n``ADV``   adverb                     very, tomorrow, down, where\n``AUX``   auxiliary                  is, has (done), will (do)\n``CONJ``  conjunction                and, or, but\n``DET``   determiner                 a, an, the\n``INTJ``  interjection               psst, ouch, bravo, hello\n``NOUN``  noun                       girl, cat, tree, air, beauty\n``NUM``   numeral                    1, 2017, one, seventy-seven, MMXIV\n``PART``  particle                   's, not\n``PRON``  pronoun                    I, you, he, she, myself, somebody\n``PROPN`` proper noun                Mary, John, London, NATO, HBO\n``PUNCT`` punctuation                , ? ( )\n``SCONJ`` subordinating conjunction  if, while, that\n``SYM``   symbol                     $, %, =, :), 😝\n``VERB``  verb                       run, runs, running, eat, ate, eating\n========= ========================== ===\n\n=============== ===\nEntity Label    Description\n=============== ===\n``PERSON``      People, including fictional.\n``NORP``        Nationalities or religious or political groups.\n``FACILITY``    Buildings, airports, highways, bridges, etc.\n``ORG``         Companies, agencies, institutions, etc.\n``GPE``         Countries, cities, states.\n``LOC``         Non-GPE locations, mountain ranges, bodies of water.\n``PRODUCT``     Objects, vehicles, foods, etc. (Not services.)\n``EVENT``       Named hurricanes, battles, wars, sports events, etc.\n``WORK_OF_ART`` Titles of books, songs, etc.\n``LANGUAGE``    Any named language.\n=============== ===\n\nTraining a sense2vec model\n==========================\n\n**🚧 TODO:** Update training scripts for spaCy v2.x.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C58:345ED4:1792FA:5DE04F:6AB92B87"},"text_sha256":"01b05181507fda7e9662fd8cb2dbc88c37db01259847f07c58cdab2605fa7758"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2240","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:17BC115:1BE1059:6AB92B89"},"commit":{"sha":"72129b83ead7299df060df0e8ebc52df7766ae9a","url":"https://github.com/explosion/sense2vec/commit/72129b83ead7299df060df0e8ebc52df7766ae9a","date":"2026-03-27T07:50:59Z","author_date":"2026-03-27T07:50:59Z","committer_date":"2026-03-27T07:50:59Z","tree_sha":"df0846effb6868b96bea5d4b6ad8ac2959ddb34c","message_first_line":"Add least-privilege permissions to workflows"},"tree_request_status":200,"tree_rate":{"github_remaining":"2239","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084A:278AC2:1866583:1C8B515:6AB92B89"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":53108,"blob_sha":"94c6a1ecae86f47992ff02376e63480c3fd7cc34","priority":0}],"documents":[{"path":"README.md","size":53108,"blob_sha":"94c6a1ecae86f47992ff02376e63480c3fd7cc34","priority":0,"status":200,"text":"<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /><\/a>\n\n# sense2vec: Contextually-keyed word vectors\n\nsense2vec ([Trask et. al](https://arxiv.org/abs/1511.06388), 2015) is a nice\ntwist on [word2vec](https://en.wikipedia.org/wiki/Word2vec) that lets you learn\nmore interesting and detailed word vectors. This library is a simple Python\nimplementation for loading, querying and training sense2vec models. For more\ndetails, check out\n[our blog post](https://explosion.ai/blog/sense2vec-reloaded). To explore the\nsemantic similarities across all Reddit comments of 2015 and 2019, see the\n[interactive demo](https://demos.explosion.ai/sense2vec).\n\n🦆 **Version 2.0 (for spaCy v3) out now!**\n[Read the release notes here.](https://github.com/explosion/sense2vec/releases/)\n\n[![tests](https://github.com/explosion/sense2vec/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/sense2vec/actions/workflows/tests.yml)\n[![Current Release Version](https://img.shields.io/github/v/release/explosion/sense2vec.svg?style=flat-square&logo=github)](https://github.com/explosion/sense2vec/releases)\n[![pypi Version](https://img.shields.io/pypi/v/sense2vec.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/sense2vec/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)\n\n## ✨ Features\n\n![](https://user-images.githubusercontent.com/13643239/69330759-d3981600-0c53-11ea-8f64-e5c075f7ea10.jpg)\n\n- Query **vectors for multi-word phrases** based on part-of-speech tags and\n  entity labels.\n- spaCy **pipeline component** and **extension attributes**.\n- Fully **serializable** so you can easily ship your sense2vec vectors with your\n  spaCy model packages.\n- Optional **caching of nearest neighbors** for super fast \"most similar\"\n  queries.\n- **Train your own vectors** using a pretrained spaCy model, raw text and\n  [GloVe](https://github.com/stanfordnlp/GloVe) or Word2Vec via\n  [fastText](https://github.com/facebookresearch/fastText)\n  ([details](#-training-your-own-sense2vec-vectors)).\n- [Prodigy](https://prodi.gy) **annotation recipes** for evaluating models,\n  creating lists of similar multi-word phrases and converting them to match\n  patterns, e.g. for rule-based NER or to bootstrap NER annotation\n  ([details & examples](#-prodigy-recipes)).\n\n## 🚀 Quickstart\n\n### Standalone usage\n\n```python\nfrom sense2vec import Sense2Vec\n\ns2v = Sense2Vec().from_disk(\"/path/to/s2v_reddit_2015_md\")\nquery = \"natural_language_processing|NOUN\"\nassert query in s2v\nvector = s2v[query]\nfreq = s2v.get_freq(query)\nmost_similar = s2v.most_similar(query, n=3)\n# [('machine_learning|NOUN', 0.8986967),\n#  ('computer_vision|NOUN', 0.8636297),\n#  ('deep_learning|NOUN', 0.8573361)]\n```\n\n### Usage as a spaCy pipeline component\n\n> ⚠️ Note that this example describes usage with\n> [spaCy v3](https://spacy.io/usage/v3). For usage with spaCy v2, download\n> `sense2vec==1.0.3` and check out the\n> [`v1.x`](https://github.com/explosion/sense2vec/tree/v1.x) branch of this\n> repo.\n\n```python\nimport spacy\n\nnlp = spacy.load(\"en_core_web_sm\")\ns2v = nlp.add_pipe(\"sense2vec\")\ns2v.from_disk(\"/path/to/s2v_reddit_2015_md\")\n\ndoc = nlp(\"A sentence about natural language processing.\")\nassert doc[3:6].text == \"natural language processing\"\nfreq = doc[3:6]._.s2v_freq\nvector = doc[3:6]._.s2v_vec\nmost_similar = doc[3:6]._.s2v_most_similar(3)\n# [(('machine learning', 'NOUN'), 0.8986967),\n#  (('computer vision', 'NOUN'), 0.8636297),\n#  (('deep learning', 'NOUN'), 0.8573361)]\n```\n\n### Interactive demos\n\n<img width=\"34%\" src=\"https://user-images.githubusercontent.com/13643239/68093565-1bb6ea80-fe97-11e9-8192-e293acc290fe.png\" align=\"right\" />\n\nTo try out our pretrained vectors trained on Reddit comments, check out the\n[interactive sense2vec demo](https://explosion.ai/demos/sense2vec).\n\nThis repo also includes a [Streamlit](https://streamlit.io) demo script for\nexploring vectors and the most similar phrases. After installing `streamlit`,\nyou can run the script with `streamlit run` and **one or more paths to\npretrained vectors** as **positional arguments** on the command line. For\nexample:\n\n```bash\npip install streamlit\nstreamlit run https://raw.githubusercontent.com/explosion/sense2vec/master/scripts/streamlit_sense2vec.py /path/to/vectors\n```\n\n### Pretrained vectors\n\nTo use the vectors, download the archive(s) and pass the extracted directory to\n`Sense2Vec.from_disk` or `Sense2VecComponent.from_disk`. The vector files are\n**attached to the GitHub release**. Large files have been split into multi-part\ndownloads.\n\n| Vectors              |   Size | Description                  | 📥 Download (zipped)                                                                                                                                                                                                                                                                                                      |\n| -------------------- | -----: | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `s2v_reddit_2019_lg` |   4 GB | Reddit comments 2019 (01-07) | [part 1](https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2019_lg.tar.gz.001), [part 2](https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2019_lg.tar.gz.002), [part 3](https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2019_lg.tar.gz.003) |\n| `s2v_reddit_2015_md` | 573 MB | Reddit comments 2015         | [part 1](https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz)                                                                                                                                                                                                                       |\n\nTo merge the multi-part archives, you can run the following:\n\n```bash\ncat s2v_reddit_2019_lg.tar.gz.* > s2v_reddit_2019_lg.tar.gz\n```\n\n## ⏳ Installation & Setup\n\nsense2vec releases are available on pip:\n\n```bash\npip install sense2vec\n```\n\nTo use pretrained vectors, download\n[one of the vector packages](#pretrained-vectors), unpack the `.tar.gz` archive\nand point `from_disk` to the extracted data directory:\n\n```python\nfrom sense2vec import Sense2Vec\ns2v = Sense2Vec().from_disk(\"/path/to/s2v_reddit_2015_md\")\n```\n\n## 👩‍💻 Usage\n\n### Usage with spaCy v3\n\nThe easiest way to use the library and vectors is to plug it into your spaCy\npipeline. The `sense2vec` package exposes a `Sense2VecComponent`, which can be\ninitialised with the shared vocab and added to your spaCy pipeline as a\n[custom pipeline component](https://spacy.io/usage/processing-pipelines#custom-components).\nBy default, components are added to the _end of the pipeline_, which is the\nrecommended position for this component, since it needs access to the dependency\nparse and, if available, named entities.\n\n```python\nimport spacy\nfrom sense2vec import Sense2VecComponent\n\nnlp = spacy.load(\"en_core_web_sm\")\ns2v = nlp.add_pipe(\"sense2vec\")\ns2v.from_disk(\"/path/to/s2v_reddit_2015_md\")\n```\n\nThe component will add several\n[extension attributes and methods](https://spacy.io/usage/processing-pipelines#custom-components-attributes)\nto spaCy's `Token` and `Span` objects that let you retrieve vectors and\nfrequencies, as well as most similar terms.\n\n```python\ndoc = nlp(\"A sentence about natural language processing.\")\nassert doc[3:6].text == \"natural language processing\"\nfreq = doc[3:6]._.s2v_freq\nvector = doc[3:6]._.s2v_vec\nmost_similar = doc[3:6]._.s2v_most_similar(3)\n```\n\nFor entities, the entity labels are used as the \"sense\" (instead of the token's\npart-of-speech tag):\n\n```python\ndoc = nlp(\"A sentence about Facebook and Google.\")\nfor ent in doc.ents:\n    assert ent._.in_s2v\n    most_similar = ent._.s2v_most_similar(3)\n```\n\n#### Available attributes\n\nThe following extension attributes are exposed on the `Doc` object via the `._`\nproperty:\n\n| Name          | Attribute Type | Type | Description                                                                         |\n| ------------- | -------------- | ---- | ----------------------------------------------------------------------------------- |\n| `s2v_phrases` | property       | list | All sense2vec-compatible phrases in the given `Doc` (noun phrases, named entities). |\n\nThe following attributes are available via the `._` property of `Token` and\n`Span` objects – for example `token._.in_s2v`:\n\n| Name               | Attribute Type | Return Type        | Description                                                                        |\n| ------------------ | -------------- | ------------------ | ---------------------------------------------------------------------------------- |\n| `in_s2v`           | property       | bool               | Whether a key exists in the vector map.                                            |\n| `s2v_key`          | property       | unicode            | The sense2vec key of the given object, e.g. `\"duck NOUN\"`.                         |\n| `s2v_vec`          | property       | `ndarray[float32]` | The vector of the given key.                                                       |\n| `s2v_freq`         | property       | int                | The frequency of the given key.                                                    |\n| `s2v_other_senses` | property       | list               | Available other senses, e.g. `\"duck\\|VERB\"` for `\"duck\\|NOUN\"`.                    |\n| `s2v_most_similar` | method         | list               | Get the `n` most similar terms. Returns a list of `((word, sense), score)` tuples. |\n| `s2v_similarity`   | method         | float              | Get the similarity to another `Token` or `Span`.                                   |\n\n> ⚠️ **A note on span attributes:** Under the hood, entities in `doc.ents` are\n> `Span` objects. This is why the pipeline component also adds attributes and\n> methods to spans and not just tokens. However, it's not recommended to use the\n> sense2vec attributes on arbitrary slices of the document, since the model\n> likely won't have a key for the respective text. `Span` objects also don't\n> have a part-of-speech tag, so if no entity label is present, the \"sense\"\n> defaults to the root's part-of-speech tag.\n\n#### Adding sense2vec to a trained pipeline\n\nIf you're training and packaging a spaCy pipeline and want to include a\nsense2vec component in it, you can load in the data via the\n[`[initialize]` block](https://spacy.io/usage/training#config-lifecycle) of the\ntraining config:\n\n```ini\n[initialize.components]\n\n[initialize.components.sense2vec]\ndata_path = \"/path/to/s2v_reddit_2015_md\"\n```\n\n### Standalone usage\n\nYou can also use the underlying `Sense2Vec` class directly and load in the\nvectors using the `from_disk` method. See below for the available API methods.\n\n```python\nfrom sense2vec import Sense2Vec\ns2v = Sense2Vec().from_disk(\"/path/to/reddit_vectors-1.1.0\")\nmost_similar = s2v.most_similar(\"natural_language_processing|NOUN\", n=10)\n```\n\n> ⚠️ **Important note:** To look up entries in the vectors table, the keys need\n> to follow the scheme of `phrase_text|SENSE` (note the `_` instead of spaces\n> and the `|` before the tag or label) – for example, `machine_learning|NOUN`.\n> Also note that the underlying vector table is case-sensitive.\n\n## 🎛 API\n\n### <kbd>class<\/kbd> `Sense2Vec`\n\nThe standalone `Sense2Vec` object that holds the vectors, strings and\nfrequencies.\n\n#### <kbd>method<\/kbd> `Sense2Vec.__init__`\n\nInitialize the `Sense2Vec` object.\n\n| Argument       | Type                        | Description                                                                                                            |\n| -------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `shape`        | tuple                       | The vector shape. Defaults to `(1000, 128)`.                                                                           |\n| `strings`      | `spacy.strings.StringStore` | Optional string store. Will be created if it doesn't exist.                                                            |\n| `senses`       | list                        | Optional list of all available senses. Used in methods that generate the best sense or other senses.                   |\n| `vectors_name` | unicode                     | Optional name to assign to the `Vectors` table, to prevent clashes. Defaults to `\"sense2vec\"`.                         |\n| `overrides`    | dict                        | Optional custom functions to use, mapped to names registered via the registry, e.g. `{\"make_key\": \"custom_make_key\"}`. |\n| **RETURNS**    | `Sense2Vec`                 | The newly constructed object.                                                                                          |\n\n```python\ns2v = Sense2Vec(shape=(300, 128), senses=[\"VERB\", \"NOUN\"])\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.__len__`\n\nThe number of rows in the vectors table.\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| **RETURNS** | int  | The number of rows in the vectors table. |\n\n```python\ns2v = Sense2Vec(shape=(300, 128))\nassert len(s2v) == 300\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.__contains__`\n\nCheck if a key is in the vectors table.\n\n| Argument    | Type          | Description                      |\n| ----------- | ------------- | -------------------------------- |\n| `key`       | unicode / int | The key to look up.              |\n| **RETURNS** | bool          | Whether the key is in the table. |\n\n```python\ns2v = Sense2Vec(shape=(10, 4))\ns2v.add(\"avocado|NOUN\", numpy.asarray([4, 2, 2, 2], dtype=numpy.float32))\nassert \"avocado|NOUN\" in s2v\nassert \"avocado|VERB\" not in s2v\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.__getitem__`\n\nRetrieve a vector for a given key. Returns None if the key is not in the table.\n\n| Argument    | Type            | Description           |\n| ----------- | --------------- | --------------------- |\n| `key`       | unicode / int   | The key to look up.   |\n| **RETURNS** | `numpy.ndarray` | The vector or `None`. |\n\n```python\nvec = s2v[\"avocado|NOUN\"]\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.__setitem__`\n\nSet a vector for a given key. Will raise an error if the key doesn't exist. To\nadd a new entry, use `Sense2Vec.add`.\n\n| Argument | Type            | Description        |\n| -------- | --------------- | ------------------ |\n| `key`    | unicode / int   | The key.           |\n| `vector` | `numpy.ndarray` | The vector to set. |\n\n```python\nvec = s2v[\"avocado|NOUN\"]\ns2v[\"avacado|NOUN\"] = vec\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.add`\n\nAdd a new vector to the table.\n\n| Argument | Type            | Description                                                  |\n| -------- | --------------- | ------------------------------------------------------------ |\n| `key`    | unicode / int   | The key to add.                                              |\n| `vector` | `numpy.ndarray` | The vector to add.                                           |\n| `freq`   | int             | Optional frequency count. Used to find best matching senses. |\n\n```python\nvec = s2v[\"avocado|NOUN\"]\ns2v.add(\"🥑|NOUN\", vec, 1234)\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.get_freq`\n\nGet the frequency count for a given key.\n\n| Argument    | Type          | Description                                       |\n| ----------- | ------------- | ------------------------------------------------- |\n| `key`       | unicode / int | The key to look up.                               |\n| `default`   | -             | Default value to return if no frequency is found. |\n| **RETURNS** | int           | The frequency count.                              |\n\n```python\nvec = s2v[\"avocado|NOUN\"]\ns2v.add(\"🥑|NOUN\", vec, 1234)\nassert s2v.get_freq(\"🥑|NOUN\") == 1234\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.set_freq`\n\nSet a frequency count for a given key.\n\n| Argument | Type          | Description                   |\n| -------- | ------------- | ----------------------------- |\n| `key`    | unicode / int | The key to set the count for. |\n| `freq`   | int           | The frequency count.          |\n\n```python\ns2v.set_freq(\"avocado|NOUN\", 104294)\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.__iter__`, `Sense2Vec.items`\n\nIterate over the entries in the vectors table.\n\n| Argument   | Type  | Description                               |\n| ---------- | ----- | ----------------------------------------- |\n| **YIELDS** | tuple | String key and vector pairs in the table. |\n\n```python\nfor key, vec in s2v:\n    print(key, vec)\n\nfor key, vec in s2v.items():\n    print(key, vec)\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.keys`\n\nIterate over the keys in the table.\n\n| Argument   | Type    | Description                   |\n| ---------- | ------- | ----------------------------- |\n| **YIELDS** | unicode | The string keys in the table. |\n\n```python\nall_keys = list(s2v.keys())\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.values`\n\nIterate over the vectors in the table.\n\n| Argument   | Type            | Description               |\n| ---------- | --------------- | ------------------------- |\n| **YIELDS** | `numpy.ndarray` | The vectors in the table. |\n\n```python\nall_vecs = list(s2v.values())\n```\n\n#### <kbd>property<\/kbd> `Sense2Vec.senses`\n\nThe available senses in the table, e.g. `\"NOUN\"` or `\"VERB\"` (added at\ninitialization).\n\n| Argument    | Type | Description           |\n| ----------- | ---- | --------------------- |\n| **RETURNS** | list | The available senses. |\n\n```python\ns2v = Sense2Vec(senses=[\"VERB\", \"NOUN\"])\nassert \"VERB\" in s2v.senses\n```\n\n#### <kbd>property<\/kbd> `Sense2vec.frequencies`\n\nThe frequencies of the keys in the table, in descending order.\n\n| Argument    | Type | Description                                        |\n| ----------- | ---- | -------------------------------------------------- |\n| **RETURNS** | list | The `(key, freq)` tuples by frequency, descending. |\n\n```python\nmost_frequent = s2v.frequencies[:10]\nkey, score = s2v.frequencies[0]\n```\n\n#### <kbd>method<\/kbd> `Sense2vec.similarity`\n\nMake a semantic similarity estimate of two keys or two sets of keys. The default\nestimate is cosine similarity using an average of vectors.\n\n| Argument    | Type                     | Description                         |\n| ----------- | ------------------------ | ----------------------------------- |\n| `keys_a`    | unicode / int / iterable | The string or integer key(s).       |\n| `keys_b`    | unicode / int / iterable | The other string or integer key(s). |\n| **RETURNS** | float                    | The similarity score.               |\n\n```python\nkeys_a = [\"machine_learning|NOUN\", \"natural_language_processing|NOUN\"]\nkeys_b = [\"computer_vision|NOUN\", \"object_detection|NOUN\"]\nprint(s2v.similarity(keys_a, keys_b))\nassert s2v.similarity(\"machine_learning|NOUN\", \"machine_learning|NOUN\") == 1.0\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.most_similar`\n\nGet the most similar entries in the table. If more than one key is provided, the\naverage of the vectors is used. To make this method faster, see the\n[script for precomputing a cache](scripts/06_precompute_cache.py) of the nearest\nneighbors.\n\n| Argument     | Type                      | Description                                             |\n| ------------ | ------------------------- | ------------------------------------------------------- |\n| `keys`       | unicode / int / iterable  | The string or integer key(s) to compare to.             |\n| `n`          | int                       | The number of similar keys to return. Defaults to `10`. |\n| `batch_size` | int                       | The batch size to use. Defaults to `16`.                |\n| **RETURNS**  | list                      | The `(key, score)` tuples of the most similar vectors.  |\n\n```python\nmost_similar = s2v.most_similar(\"natural_language_processing|NOUN\", n=3)\n# [('machine_learning|NOUN', 0.8986967),\n#  ('computer_vision|NOUN', 0.8636297),\n#  ('deep_learning|NOUN', 0.8573361)]\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.get_other_senses`\n\nFind other entries for the same word with a different sense, e.g. `\"duck|VERB\"`\nfor `\"duck|NOUN\"`.\n\n| Argument      | Type          | Description                                                       |\n| ------------- | ------------- | ----------------------------------------------------------------- |\n| `key`         | unicode / int | The key to check.                                                 |\n| `ignore_case` | bool          | Check for uppercase, lowercase and titlecase. Defaults to `True`. |\n| **RETURNS**   | list          | The string keys of other entries with different senses.           |\n\n```python\nother_senses = s2v.get_other_senses(\"duck|NOUN\")\n# ['duck|VERB', 'Duck|ORG', 'Duck|VERB', 'Duck|PERSON', 'Duck|ADJ']\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.get_best_sense`\n\nFind the best-matching sense for a given word based on the available senses and\nfrequency counts. Returns `None` if no match is found.\n\n| Argument      | Type    | Description                                                                                             |\n| ------------- | ------- | ------------------------------------------------------------------------------------------------------- |\n| `word`        | unicode | The word to check.                                                                                      |\n| `senses`      | list    | Optional list of senses to limit the search to. If not set / empty, all senses in the vectors are used. |\n| `ignore_case` | bool    | Check for uppercase, lowercase and titlecase. Defaults to `True`.                                       |\n| **RETURNS**   | unicode | The best-matching key or None.                                                                          |\n\n```python\nassert s2v.get_best_sense(\"duck\") == \"duck|NOUN\"\nassert s2v.get_best_sense(\"duck\", [\"VERB\", \"ADJ\"]) == \"duck|VERB\"\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.to_bytes`\n\nSerialize a `Sense2Vec` object to a bytestring.\n\n| Argument    | Type  | Description                               |\n| ----------- | ----- | ----------------------------------------- |\n| `exclude`   | list  | Names of serialization fields to exclude. |\n| **RETURNS** | bytes | The serialized `Sense2Vec` object.        |\n\n```python\ns2v_bytes = s2v.to_bytes()\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.from_bytes`\n\nLoad a `Sense2Vec` object from a bytestring.\n\n| Argument     | Type        | Description                               |\n| ------------ | ----------- | ----------------------------------------- |\n| `bytes_data` | bytes       | The data to load.                         |\n| `exclude`    | list        | Names of serialization fields to exclude. |\n| **RETURNS**  | `Sense2Vec` | The loaded object.                        |\n\n```python\ns2v_bytes = s2v.to_bytes()\nnew_s2v = Sense2Vec().from_bytes(s2v_bytes)\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.to_disk`\n\nSerialize a `Sense2Vec` object to a directory.\n\n| Argument  | Type             | Description                               |\n| --------- | ---------------- | ----------------------------------------- |\n| `path`    | unicode / `Path` | The path.                                 |\n| `exclude` | list             | Names of serialization fields to exclude. |\n\n```python\ns2v.to_disk(\"/path/to/sense2vec\")\n```\n\n#### <kbd>method<\/kbd> `Sense2Vec.from_disk`\n\nLoad a `Sense2Vec` object from a directory.\n\n| Argument    | Type             | Description                               |\n| ----------- | ---------------- | ----------------------------------------- |\n| `path`      | unicode / `Path` | The path to load from                     |\n| `exclude`   | list             | Names of serialization fields to exclude. |\n| **RETURNS** | `Sense2Vec`      | The loaded object.                        |\n\n```python\ns2v.to_disk(\"/path/to/sense2vec\")\nnew_s2v = Sense2Vec().from_disk(\"/path/to/sense2vec\")\n```\n\n---\n\n### <kbd>class<\/kbd> `Sense2VecComponent`\n\nThe pipeline component to add sense2vec to spaCy pipelines.\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.__init__`\n\nInitialize the pipeline component.\n\n| Argument        | Type                                                                                                                  | Description                                                                                                 |\n| --------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |\n| `vocab`         | `Vocab`                                                                                                               | The shared `Vocab`. Mostly used for the shared `StringStore`.                                               |\n| `shape`         | tuple                                                                                                                 | The vector shape.                                                                                           |\n| `merge_phrases` | bool                                                                                                                  | Whether to merge sense2vec phrases into one token. Defaults to `False`.                                     |\n| `lemmatize`     | bool                                                                                                                  | Always look up lemmas if available in the vectors, otherwise default to original word. Defaults to `False`. |\n| `overrides`     | Optional custom functions to use, mapped to names registred via the registry, e.g. `{\"make_key\": \"custom_make_key\"}`. |\n| **RETURNS**     | `Sense2VecComponent`                                                                                                  | The newly constructed object.                                                                               |\n\n```python\ns2v = Sense2VecComponent(nlp.vocab)\n```\n\n#### <kbd>classmethod<\/kbd> `Sense2VecComponent.from_nlp`\n\nInitialize the component from an nlp object. Mostly used as the component\nfactory for the entry point (see setup.cfg) and to auto-register via the\n`@spacy.component` decorator.\n\n| Argument    | Type                 | Description                   |\n| ----------- | -------------------- | ----------------------------- |\n| `nlp`       | `Language`           | The `nlp` object.             |\n| `**cfg`     | -                    | Optional config parameters.   |\n| **RETURNS** | `Sense2VecComponent` | The newly constructed object. |\n\n```python\ns2v = Sense2VecComponent.from_nlp(nlp)\n```\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.__call__`\n\nProcess a `Doc` object with the component. Typically only called as part of the\nspaCy pipeline and not directly.\n\n| Argument    | Type  | Description              |\n| ----------- | ----- | ------------------------ |\n| `doc`       | `Doc` | The document to process. |\n| **RETURNS** | `Doc` | the processed document.  |\n\n#### <kbd>method<\/kbd> `Sense2Vec.init_component`\n\nRegister the component-specific extension attributes here and only if the\ncomponent is added to the pipeline and used – otherwise, tokens will still get\nthe attributes even if the component is only created and not added.\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.to_bytes`\n\nSerialize the component to a bytestring. Also called when the component is added\nto the pipeline and you run `nlp.to_bytes`.\n\n| Argument    | Type  | Description               |\n| ----------- | ----- | ------------------------- |\n| **RETURNS** | bytes | The serialized component. |\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.from_bytes`\n\nLoad a component from a bytestring. Also called when you run `nlp.from_bytes`.\n\n| Argument     | Type                 | Description        |\n| ------------ | -------------------- | ------------------ |\n| `bytes_data` | bytes                | The data to load.  |\n| **RETURNS**  | `Sense2VecComponent` | The loaded object. |\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.to_disk`\n\nSerialize the component to a directory. Also called when the component is added\nto the pipeline and you run `nlp.to_disk`.\n\n| Argument | Type             | Description |\n| -------- | ---------------- | ----------- |\n| `path`   | unicode / `Path` | The path.   |\n\n#### <kbd>method<\/kbd> `Sense2VecComponent.from_disk`\n\nLoad a `Sense2Vec` object from a directory. Also called when you run\n`nlp.from_disk`.\n\n| Argument    | Type                 | Description           |\n| ----------- | -------------------- | --------------------- |\n| `path`      | unicode / `Path`     | The path to load from |\n| **RETURNS** | `Sense2VecComponent` | The loaded object.    |\n\n---\n\n### <kbd>class<\/kbd> `registry`\n\nFunction registry (powered by\n[`catalogue`](https://github.com/explosion/catalogue)) to easily customize the\nfunctions used to generate keys and phrases. Allows you to decorate and name\ncustom functions, swap them out and serialize the custom names when you save out\nthe model. The following registry options are available:\n\n| Name                      | Description                                                                                                                                                                                                                                        |\n| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | \n| `registry.make_key`       | Given a `word` and `sense`, return a string of the key, e.g. `\"word\\|sense\".`                                                                                                                                                                      |\n| `registry.split_key`      | Given a string key, return a `(word, sense)` tuple.                                                                                                                                                                                                |\n| `registry.make_spacy_key` | Given a spaCy object (`Token` or `Span`) and a boolean `prefer_ents` keyword argument (whether to prefer the entity label for single tokens), return a `(word, sense)` tuple. Used in extension attributes to generate a key for tokens and spans. |\n| `registry.get_phrases`    | Given a spaCy `Doc`, return a list of `Span` objects used for sense2vec phrases (typically noun phrases and named entities).                                                                                                                       |\n| `registry.merge_phrases`  | Given a spaCy `Doc`, get all sense2vec phrases and merge them into single tokens.                                                                                                                                                                  |\n\nEach registry has a `register` method that can be used as a function decorator\nand takes one argument, the name of the custom function.\n\n```python\nfrom sense2vec import registry\n\n@registry.make_key.register(\"custom\")\ndef custom_make_key(word, sense):\n    return f\"{word}###{sense}\"\n\n@registry.split_key.register(\"custom\")\ndef custom_split_key(key):\n    word, sense = key.split(\"###\")\n    return word, sense\n```\n\nWhen initializing the `Sense2Vec` object, you can now pass in a dictionary of\noverrides with the names of your custom registered functions.\n\n```python\noverrides = {\"make_key\": \"custom\", \"split_key\": \"custom\"}\ns2v = Sense2Vec(overrides=overrides)\n```\n\nThis makes it easy to experiment with different strategies and serializing the\nstrategies as plain strings (instead of having to pass around and/or pickle the\nfunctions themselves).\n\n## 🚂 Training your own sense2vec vectors\n\nThe [`/scripts`](/scripts) directory contains command line utilities for\npreprocessing text and training your own vectors.\n\n### Requirements\n\nTo train your own sense2vec vectors, you'll need the following:\n\n- A **very large** source of raw text (ideally more than you'd use for word2vec,\n  since the senses make the vocabulary more sparse). We recommend at least 1\n  billion words.\n- A [pretrained spaCy model](https://spacy.io/models) that assigns\n  part-of-speech tags, dependencies and named entities, and populates the\n  `doc.noun_chunks`. If the language you need doesn't provide a built in\n  [syntax iterator for noun phrases](https://spacy.io/usage/adding-languages#syntax-iterators),\n  you'll need to write your own. (The `doc.noun_chunks` and `doc.ents` are what\n  sense2vec uses to determine what's a phrase.)\n- [GloVe](https://github.com/stanfordnlp/GloVe) or\n  [fastText](https://github.com/facebookresearch/fastText) installed and built.\n  You should be able to clone the repo and run `make` in the respective\n  directory.\n\n### Step-by-step process\n\nThe training process is split up into several steps to allow you to resume at\nany given point. Processing scripts are designed to operate on single files,\nmaking it easy to parallellize the work. The scripts in this repo require either\n[Glove](https://github.com/stanfordnlp/GloVe) or\n[fastText](https://github.com/facebookresearch/fastText) which you need to clone\nand `make`.\n\nFor Fasttext, the scripts will require the path to the created binary file. If\nyou're working on Windows, you can build with `cmake`, or alternatively use the\n`.exe` file from this **unofficial** repo with FastText binary builds for\nWindows: https://github.com/xiamx/fastText/releases.\n\n|        | Script                                                                                                                                       | Description                                                                                                                                                                                 |\n| ------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **1.** | [`01_parse.py`](scripts/01_parse.py)                                                                                                         | Use spaCy to parse the raw text and output binary collections of `Doc` objects (see [`DocBin`](https://spacy.io/api/docbin)).                                                               |\n| **2.** | [`02_preprocess.py`](scripts/02_preprocess.py)                                                                                               | Load a collection of parsed `Doc` objects produced in the previous step and output text files in the sense2vec format (one sentence per line and merged phrases with senses).               |\n| **3.** | [`03_glove_build_counts.py`](scripts/03_glove_build_counts.py)                                                                               | Use [GloVe](https://github.com/stanfordnlp/GloVe) to build the vocabulary and counts. Skip this step if you're using Word2Vec via [FastText](https://github.com/facebookresearch/fastText). |\n| **4.** | [`04_glove_train_vectors.py`](scripts/04_glove_train_vectors.py)<br />[`04_fasttext_train_vectors.py`](scripts/04_fasttext_train_vectors.py) | Use [GloVe](https://github.com/stanfordnlp/GloVe) or [FastText](https://github.com/facebookresearch/fastText) to train vectors.                                                             |\n| **5.** | [`05_export.py`](scripts/05_export.py)                                                                                                       | Load the vectors and frequencies and output a sense2vec component that can be loaded via `Sense2Vec.from_disk`.                                                                             |\n| **6.** | [`06_precompute_cache.py`](scripts/06_precompute_cache.py)                                                                                   | **Optional:** Precompute nearest-neighbor queries for every entry in the vocab to make `Sense2Vec.most_similar` faster.                                                                     |\n\nFor more detailed documentation of the scripts, check out the source or run them\nwith `--help`. For example, `python scripts/01_parse.py --help`.\n\n## 🍳 Prodigy recipes\n\nThis package also seamlessly integrates with the [Prodigy](https://prodi.gy)\nannotation tool and exposes recipes for using sense2vec vectors to quickly\ngenerate lists of multi-word phrases and bootstrap NER annotations. To use a\nrecipe, `sense2vec` needs to be installed in the same environment as Prodigy.\nFor an example of a real-world use case, check out this\n[NER project](https://github.com/explosion/projects/tree/master/ner-fashion-brands)\nwith downloadable datasets.\n\nThe following recipes are available – see below for more detailed docs.\n\n| Recipe                                                              | Description                                                          |\n| ------------------------------------------------------------------- | -------------------------------------------------------------------- |\n| [`sense2vec.teach`](#recipe-sense2vecteach)                         | Bootstrap a terminology list using sense2vec.                        |\n| [`sense2vec.to-patterns`](#recipe-sense2vecto-patterns)             | Convert phrases dataset to token-based match patterns.               |\n| [`sense2vec.eval`](#recipe-sense2veceval)                           | Evaluate a sense2vec model by asking about phrase triples.           |\n| [`sense2vec.eval-most-similar`](#recipe-sense2veceval-most-similar) | Evaluate a sense2vec model by correcting the most similar entries.   |\n| [`sense2vec.eval-ab`](#recipe-sense2veceval-ab)                     | Perform an A/B evaluation of two pretrained sense2vec vector models. |\n\n### <kbd>recipe<\/kbd> `sense2vec.teach`\n\nBootstrap a terminology list using sense2vec. Prodigy will suggest similar terms\nbased on the most similar phrases from sense2vec, and the suggestions will be\nadjusted as you annotate and accept similar phrases. For each seed term, the\nbest matching sense according to the sense2vec vectors will be used.\n\n```bash\nprodigy sense2vec.teach [dataset] [vectors_path] [--seeds] [--threshold]\n[--n-similar] [--batch-size] [--resume]\n```\n\n| Argument             | Type       | Description                               |\n| -------------------- | ---------- | ----------------------------------------- |\n| `dataset`            | positional | Dataset to save annotations to.           |\n| `vectors_path`       | positional | Path to pretrained sense2vec vectors.     |\n| `--seeds`, `-s`      | option     | One or more comma-separated seed phrases. |\n| `--threshold`, `-t`  | option     | Similarity threshold. Defaults to `0.85`. |\n| `--n-similar`, `-n`  | option     | Number of similar items to get at once.   |\n| `--batch-size`, `-b` | option     | Batch size for submitting annotations.    |\n| `--resume`, `-R`     | flag       | Resume from an existing phrases dataset.  |\n\n#### Example\n\n```bash\nprodigy sense2vec.teach tech_phrases /path/to/s2v_reddit_2015_md\n--seeds \"natural language processing, machine learning, artificial intelligence\"\n```\n\n### <kbd>recipe<\/kbd> `sense2vec.to-patterns`\n\nConvert a dataset of phrases collected with `sense2vec.teach` to token-based\nmatch patterns that can be used with\n[spaCy's `EntityRuler`](https://spacy.io/usage/rule-based-matching#entityruler)\nor recipes like `ner.match`. If no output file is specified, the patterns are\nwritten to stdout. The examples are tokenized so that multi-token terms are\nrepresented correctly, e.g.:\n`{\"label\": \"SHOE_BRAND\", \"pattern\": [{ \"LOWER\": \"new\" }, { \"LOWER\": \"balance\" }]}`.\n\n```bash\nprodigy sense2vec.to-patterns [dataset] [spacy_model] [label] [--output-file]\n[--case-sensitive] [--dry]\n```\n\n| Argument                  | Type       | Description                                  |\n| ------------------------- | ---------- | -------------------------------------------- |\n| `dataset`                 | positional | Phrase dataset to convert.                   |\n| `spacy_model`             | positional | spaCy model for tokenization.                |\n| `label`                   | positional | Label to apply to all patterns.              |\n| `--output-file`, `-o`     | option     | Optional output file. Defaults to stdout.    |\n| `--case-sensitive`, `-CS` | flag       | Make patterns case-sensitive.                |\n| `--dry`, `-D`             | flag       | Perform a dry run and don't output anything. |\n\n#### Example\n\n```bash\nprodigy sense2vec.to-patterns tech_phrases en_core_web_sm TECHNOLOGY\n--output-file /path/to/patterns.jsonl\n```\n\n### <kbd>recipe<\/kbd> `sense2vec.eval`\n\nEvaluate a sense2vec model by asking about phrase triples: is word A more\nsimilar to word B, or to word C? If the human mostly agrees with the model, the\nvectors model is good. The recipe will only ask about vectors with the same\nsense and supports different example selection strategies.\n\n```bash\nprodigy sense2vec.eval [dataset] [vectors_path] [--strategy] [--senses]\n[--exclude-senses] [--n-freq] [--threshold] [--batch-size] [--eval-whole]\n[--eval-only] [--show-scores]\n```\n\n| Argument                  | Type       | Description                                                                                                   |\n| ------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------- |\n| `dataset`                 | positional | Dataset to save annotations to.                                                                               |\n| `vectors_path`            | positional | Path to pretrained sense2vec vectors.                                                                         |\n| `--strategy`, `-st`       | option     | Example selection strategy. `most similar` (default) or `random`.                                             |\n| `--senses`, `-s`          | option     | Comma-separated list of senses to limit the selection to. If not set, all senses in the vectors will be used. |\n| `--exclude-senses`, `-es` | option     | Comma-separated list of senses to exclude. See `prodigy_recipes.EVAL_EXCLUDE_SENSES` fro the defaults.        |\n| `--n-freq`, `-f`          | option     | Number of most frequent entries to limit to.                                                                  |\n| `--threshold`, `-t`       | option     | Minimum similarity threshold to consider examples.                                                            |\n| `--batch-size`, `-b`      | option     | Batch size to use.                                                                                            |\n| `--eval-whole`, `-E`      | flag       | Evaluate the whole dataset instead of the current session.                                                    |\n| `--eval-only`, `-O`       | flag       | Don't annotate, only evaluate the current dataset.                                                            |\n| `--show-scores`, `-S`     | flag       | Show all scores for debugging.                                                                                |\n\n#### Strategies\n\n| Name                 | Description                                                                                                                                                           |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `most_similar`       | Pick a random word from a random sense and get its most similar entries of the same sense. Ask about the similarity to the last and middle entry from that selection. |\n| `most_least_similar` | Pick a random word from a random sense and get the least similar entry from its most similar entries, and then the last most similar entry of that.                   |\n| `random`             | Pick a random sample of 3 words from the same random sense.                                                                                                           |\n\n#### Example\n\n```bash\nprodigy sense2vec.eval vectors_eval /path/to/s2v_reddit_2015_md\n--senses NOUN,ORG,PRODUCT --threshold 0.5\n```\n\n![UI preview of sense2vec.eval](https://user-images.githubusercontent.com/13643239/67994212-668cf400-fc44-11e9-8fe2-bf264ae32b0a.png)\n\n### <kbd>recipe<\/kbd> `sense2vec.eval-most-similar`\n\nEvaluate a vectors model by looking at the most similar entries it returns for a\nrandom phrase and unselecting the mistakes.\n\n```bash\nprodigy sense2vec.eval [dataset] [vectors_path] [--senses] [--exclude-senses]\n[--n-freq] [--n-similar] [--batch-size] [--eval-whole] [--eval-only]\n[--show-scores]\n```\n\n| Argument                  | Type       | Description                                                                                                   |\n| ------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------- |\n| `dataset`                 | positional | Dataset to save annotations to.                                                                               |\n| `vectors_path`            | positional | Path to pretrained sense2vec vectors.                                                                         |\n| `--senses`, `-s`          | option     | Comma-separated list of senses to limit the selection to. If not set, all senses in the vectors will be used. |\n| `--exclude-senses`, `-es` | option     | Comma-separated list of senses to exclude. See `prodigy_recipes.EVAL_EXCLUDE_SENSES` fro the defaults.        |\n| `--n-freq`, `-f`          | option     | Number of most frequent entries to limit to.                                                                  |\n| `--n-similar`, `-n`       | option     | Number of similar items to check. Defaults to `10`.                                                           |\n| `--batch-size`, `-b`      | option     | Batch size to use.                                                                                            |\n| `--eval-whole`, `-E`      | flag       | Evaluate the whole dataset instead of the current session.                                                    |\n| `--eval-only`, `-O`       | flag       | Don't annotate, only evaluate the current dataset.                                                            |\n| `--show-scores`, `-S`     | flag       | Show all scores for debugging.                                                                                |\n\n```bash\nprodigy sense2vec.eval-most-similar vectors_eval_sim /path/to/s2v_reddit_2015_md\n--senses NOUN,ORG,PRODUCT\n```\n\n### <kbd>recipe<\/kbd> `sense2vec.eval-ab`\n\nPerform an A/B evaluation of two pretrained sense2vec vector models by comparing\nthe most similar entries they return for a random phrase. The UI shows two\nrandomized options with the most similar entries of each model and highlights\nthe phrases that differ. At the end of the annotation session the overall stats\nand preferred model are shown.\n\n```bash\nprodigy sense2vec.eval [dataset] [vectors_path_a] [vectors_path_b] [--senses]\n[--exclude-senses] [--n-freq] [--n-similar] [--batch-size] [--eval-whole]\n[--eval-only] [--show-mapping]\n```\n\n| Argument                  | Type       | Description                                                                                                   |\n| ------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------- |\n| `dataset`                 | positional | Dataset to save annotations to.                                                                               |\n| `vectors_path_a`          | positional | Path to pretrained sense2vec vectors.                                                                         |\n| `vectors_path_b`          | positional | Path to pretrained sense2vec vectors.                                                                         |\n| `--senses`, `-s`          | option     | Comma-separated list of senses to limit the selection to. If not set, all senses in the vectors will be used. |\n| `--exclude-senses`, `-es` | option     | Comma-separated list of senses to exclude. See `prodigy_recipes.EVAL_EXCLUDE_SENSES` fro the defaults.        |\n| `--n-freq`, `-f`          | option     | Number of most frequent entries to limit to.                                                                  |\n| `--n-similar`, `-n`       | option     | Number of similar items to check. Defaults to `10`.                                                           |\n| `--batch-size`, `-b`      | option     | Batch size to use.                                                                                            |\n| `--eval-whole`, `-E`      | flag       | Evaluate the whole dataset instead of the current session.                                                    |\n| `--eval-only`, `-O`       | flag       | Don't annotate, only evaluate the current dataset.                                                            |\n| `--show-mapping`, `-S`    | flag       | Show which models are option 1 and option 2 in the UI (for debugging).                                        |\n\n```bash\nprodigy sense2vec.eval-ab vectors_eval_sim /path/to/s2v_reddit_2015_md /path/to/s2v_reddit_2019_md --senses NOUN,ORG,PRODUCT\n```\n\n![UI preview of sense2vec.eval-ab](https://user-images.githubusercontent.com/13643239/68088514-46d21780-fe60-11e9-9b29-fe313bb2154d.png)\n\n## Pretrained vectors\n\nThe pretrained Reddit vectors support the following \"senses\", either\npart-of-speech tags or entity labels. For more details, see spaCy's\n[annotation scheme overview](https://spacy.io/api/annotation).\n\n| Tag     | Description               | Examples                             |\n| ------- | ------------------------- | ------------------------------------ |\n| `ADJ`   | adjective                 | big, old, green                      |\n| `ADP`   | adposition                | in, to, during                       |\n| `ADV`   | adverb                    | very, tomorrow, down, where          |\n| `AUX`   | auxiliary                 | is, has (done), will (do)            |\n| `CONJ`  | conjunction               | and, or, but                         |\n| `DET`   | determiner                | a, an, the                           |\n| `INTJ`  | interjection              | psst, ouch, bravo, hello             |\n| `NOUN`  | noun                      | girl, cat, tree, air, beauty         |\n| `NUM`   | numeral                   | 1, 2017, one, seventy-seven, MMXIV   |\n| `PART`  | particle                  | 's, not                              |\n| `PRON`  | pronoun                   | I, you, he, she, myself, somebody    |\n| `PROPN` | proper noun               | Mary, John, London, NATO, HBO        |\n| `PUNCT` | punctuation               | , ? ( )                              |\n| `SCONJ` | subordinating conjunction | if, while, that                      |\n| `SYM`   | symbol                    | \\$, %, =, :), 😝                     |\n| `VERB`  | verb                      | run, runs, running, eat, ate, eating |\n\n| Entity Label  | Description                                          |\n| ------------- | ---------------------------------------------------- |\n| `PERSON`      | People, including fictional.                         |\n| `NORP`        | Nationalities or religious or political groups.      |\n| `FACILITY`    | Buildings, airports, highways, bridges, etc.         |\n| `ORG`         | Companies, agencies, institutions, etc.              |\n| `GPE`         | Countries, cities, states.                           |\n| `LOC`         | Non-GPE locations, mountain ranges, bodies of water. |\n| `PRODUCT`     | Objects, vehicles, foods, etc. (Not services.)       |\n| `EVENT`       | Named hurricanes, battles, wars, sports events, etc. |\n| `WORK_OF_ART` | Titles of books, songs, etc.                         |\n| `LANGUAGE`    | Any named language.                                  |\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD8:3BB77:17AAB5:5DFA57:6AB92B88"},"text_sha256":"7b10c8f3dc2a8942d00628c00ac555580d4a54fa45b234bdccad813804fc1594"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"skrub-data/skrub","input_row":{"repository":"skrub-data/skrub","url":"https://github.com/skrub-data/skrub","name":"skrub","owner":"skrub-data","description":"Machine learning with dataframes","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1653,"issues":708,"created_at":"2018-03-12T23:32:22Z","updated_at":"2026-09-24T13:48:33Z","first_commit_at":"2018-03-12T23:32:29Z","last_commit_at":"2026-09-24T13:48:25Z","activity_months":102.42,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:23.742Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"skrub-data/skrub","visibility":"public","created_at":"2018-03-12T23:32:22Z","updated_at":"2026-09-24T13:48:33Z","private":false,"fork":false,"archived":false,"stargazers_count":1653,"open_issues_count":131,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2238","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0909:0BA1:D8BD46:FEB679:6AB92B8B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2237","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17C5F37:1BEADAA:6AB92B8C"},"commit":{"sha":"7fc605ff0ce86b3367923cc93664e39bd208d191","url":"https://github.com/skrub-data/skrub/commit/7fc605ff0ce86b3367923cc93664e39bd208d191","date":"2018-05-18T14:01:52Z","author_date":"2018-05-18T14:01:52Z","committer_date":"2018-05-18T14:01:52Z","tree_sha":"ad18695b0924cfb4a2189d06e060e25a4fadf971","message_first_line":"added requests in the conda dependencies for travis"},"tree_request_status":200,"tree_rate":{"github_remaining":"2236","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0923:62B94:17C4576:1BE90B9:6AB92B8C"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":696,"blob_sha":"3ae898e35717d9b4e958d4540e05a67160d4b4d9","priority":0}],"documents":[{"path":"README.rst","size":696,"blob_sha":"3ae898e35717d9b4e958d4540e05a67160d4b4d9","priority":0,"status":200,"text":"dirty_cat\n=========\n\ndirty_cat is a Python module for machine-learning on dirty categorical variables.\n\nWebsite: https://dirty-cat.github.io/\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\ndirty_cat requires:\n\n- Python (>= 3.5)\n- NumPy (>= 1.8.2)\n- SciPy (>= 0.13.3)\n- scikit-learn\n\nOptional dependency:\n\n- python-Levenshtein for faster edit distances (not used for the n-gram\n  distance)\n\nUser installation\n~~~~~~~~~~~~~~~~~\n\nIf you already have a working installation of NumPy and SciPy,\nthe easiest way to install dirty_cat is using ``pip`` ::\n\n    pip install -U ...\n\n\nCitation\n~~~~~~~~\n\nIf you use this module in a scientific publication, please cite the following:\n(coming soon :))\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1728:3A3DD:179298:5DE121:6AB92B8C"},"text_sha256":"bf07c5056637fea0d9ad38631fa5ee899687142468c143e226bd6acb79aa5d22"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2235","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0856:6E5BD:179EB91:1BC249D:6AB92B8D"},"commit":{"sha":"c50109f1e80977aac749fc4e7e13ca0fdb3ab00b","url":"https://github.com/skrub-data/skrub/commit/c50109f1e80977aac749fc4e7e13ca0fdb3ab00b","date":"2026-06-30T12:58:35Z","author_date":"2026-06-30T12:58:35Z","committer_date":"2026-06-30T12:58:35Z","tree_sha":"f070c0161502fb38085683adaf95643cd2da9931","message_first_line":"Adding the SessionEncoder (#1930)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2234","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:17FB3C8:1C1F8C5:6AB92B8D"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1913,"blob_sha":"f8322a91e562a01e0bcef1edc69d81ba153bfd6d","priority":0}],"documents":[{"path":"README.rst","size":1913,"blob_sha":"f8322a91e562a01e0bcef1edc69d81ba153bfd6d","priority":0,"status":200,"text":"skrub\n=====\n\n.. image:: https://skrub-data.github.io/stable/_static/skrub.svg\n   :align: center\n   :width: 50 %\n   :alt: skrub logo\n\n\n|py_ver| |pypi_var| |pypi_dl| |codecov| |circleci| |black|\n\n.. |py_ver| image:: https://img.shields.io/pypi/pyversions/skrub\n.. |pypi_var| image:: https://img.shields.io/pypi/v/skrub?color=informational\n.. |pypi_dl| image:: https://img.shields.io/pypi/dm/skrub\n.. |codecov| image:: https://img.shields.io/codecov/c/github/skrub-data/skrub/main\n.. |circleci| image:: https://img.shields.io/circleci/build/github/skrub-data/skrub/main?label=CircleCI\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n\n\n**skrub** (formerly *dirty_cat*) is a Python\nlibrary that facilitates machine learning with dataframes.\n\nIf you like the package, spread the word and ⭐ this repository!\nYou can also join the `Discord server <https://discord.gg/ABaPnm7fDC>`_.\n\nWebsite: https://skrub-data.org/\n\nSee our `examples <https://skrub-data.org/stable/auto_examples>`_, or check out\nthe `learning materials <https://skrub-data.org/skrub-materials/index.html>`_.\n\nInstallation\n------------\n\nskrub can easily be installed via ``pip`` or ``conda``. For more installation information, see\nthe `installation instructions <https://skrub-data.org/stable/install.html>`_.\n\nContributing\n------------\n\nThe best way to support the development of skrub is to spread the word!\n\nAlso, if you already are a skrub user, we would love to hear about your use cases and challenges in the `Discussions <https://github.com/skrub-data/skrub/discussions>`_ section.\n\nTo report a bug or suggest enhancements, please\n`open an issue <https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue>`_.\n\nIf you want to contribute directly to the library, then check the\n`how to contribute <https://skrub-data.org/stable/CONTRIBUTING.html>`_ page on\nthe website for more information.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9310:1F1FB6:17D4E9:5E22FC:6AB92B8B"},"text_sha256":"162023b4fa4039d4619248537e8ad792e6d9f162f1b2347760c9bb427e153bcc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"datamade/usaddress","input_row":{"repository":"datamade/usaddress","url":"https://github.com/datamade/usaddress","name":"usaddress","owner":"datamade","description":":us: a python library for parsing unstructured United States address strings into address components","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1637,"issues":354,"created_at":"2014-07-17T19:22:46Z","updated_at":"2026-09-10T06:51:09Z","first_commit_at":"2014-06-19T21:25:54Z","last_commit_at":"2025-08-07T14:50:38Z","activity_months":133.59999999999999,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:26.592Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"datamade/usaddress","visibility":"public","created_at":"2014-07-17T19:22:46Z","updated_at":"2026-09-10T06:51:09Z","private":false,"fork":false,"archived":false,"stargazers_count":1637,"open_issues_count":174,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2233","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0929:DC698:17FB472:1C1F98D:6AB92B8E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2232","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:1839645:1C5DFA2:6AB92B8E"},"commit":{"sha":"81d7797ce2b8c53dd623e7bf6e8a1581a99253aa","url":"https://github.com/datamade/usaddress/commit/81d7797ce2b8c53dd623e7bf6e8a1581a99253aa","date":"2018-03-29T15:52:58Z","author_date":"2018-03-29T15:52:58Z","committer_date":"2018-03-29T15:52:58Z","tree_sha":"c7077457d3f5a93a14fb1744a24043df04f76144","message_first_line":"Merge pull request #220 from datamade/travis"},"tree_request_status":200,"tree_rate":{"github_remaining":"2231","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090A:2D7D17:1787C34:1BAAE6D:6AB92B8F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5511,"blob_sha":"e7c8496d41bbebfda6b5be7e7b4ce76660cd9994","priority":0}],"documents":[{"path":"README.md","size":5511,"blob_sha":"e7c8496d41bbebfda6b5be7e7b4ce76660cd9994","priority":0,"status":200,"text":"usaddress\n=================\n[![Build Status](https://travis-ci.org/datamade/usaddress.svg?branch=master)](https://travis-ci.org/datamade/usaddress)[![Build status](https://ci.appveyor.com/api/projects/status/5mbcd8ku0tm66noq?svg=true)](https://ci.appveyor.com/project/fgregg/usaddress)\n\nusaddress is a Python library for parsing unstructured address strings into address components, using advanced NLP methods. Try it out on our [web interface](https://parserator.datamade.us/usaddress)! For those who aren't Python developers, we also have an [API](https://parserator.datamade.us/api-docs).\n\n**What this can do:** Using a probabilistic model, it makes (very educated) guesses in identifying address components, even in tricky cases where rule-based parsers typically break down.\n\n**What this cannot do:** It cannot identify address components with perfect accuracy, nor can it verify that a given address is correct/valid.\n\n## How to use the usaddress python library\n\n1. Install usaddress with [pip](https://pip.readthedocs.io/en/latest/quickstart.html), a tool for installing and managing python packages ([beginner's guide here](http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/)).\n\n  In the terminal,\n  \n  ```bash\n  pip install usaddress\n  ```\n2. Parse some addresses!\n\n  ![usaddress](https://cloud.githubusercontent.com/assets/1406537/7869001/65c6ae62-0545-11e5-8b65-5d9e71dface5.gif)\n\n  Note that `parse` and `tag` are different methods:\n  ```python\n  import usaddress\n  addr='123 Main St. Suite 100 Chicago, IL'\n  \n  # The parse method will split your address string into components, and label each component.\n  # expected output: [(u'123', 'AddressNumber'), (u'Main', 'StreetName'), (u'St.', 'StreetNamePostType'), (u'Suite', 'OccupancyType'), (u'100', 'OccupancyIdentifier'), (u'Chicago,', 'PlaceName'), (u'IL', 'StateName')]\n  usaddress.parse(addr)\n  \n  # The tag method will try to be a little smarter\n  # it will merge consecutive components, strip commas, & return an address type\n  # expected output: (OrderedDict([('AddressNumber', u'123'), ('StreetName', u'Main'), ('StreetNamePostType', u'St.'), ('OccupancyType', u'Suite'), ('OccupancyIdentifier', u'100'), ('PlaceName', u'Chicago'), ('StateName', u'IL')]), 'Street Address')\n  usaddress.tag(addr)\n  ```\n\n## How to use this development code (for the nerds)\nusaddress uses [parserator](https://github.com/datamade/parserator), a library for making and improving probabilistic parsers - specifically, parsers that use [python-crfsuite](https://github.com/tpeng/python-crfsuite)'s implementation of conditional random fields. Parserator allows you to train the usaddress parser's model (a .crfsuite settings file) on labeled training data, and provides tools for adding new labeled training data.\n\n### Building & testing the code in this repo\n\nTo build a development version of usaddress on your machine, run the following code in your command line:\n  \n  ```\n  git clone https://github.com/datamade/usaddress.git  \n  cd usaddress  \n  pip install -r requirements.txt  \n  python setup.py develop  \n  parserator train training/labeled.xml usaddress  \n  ```  \n\nThen run the testing suite to confirm that everything is working properly:\n\n   ```\n   nosetests .\n   ```\n   \nHaving trouble building the code? [Open an issue](https://github.com/datamade/usaddress/issues/new) and we'd be glad to help you troubleshoot.\n\n### Adding new training data\n\nIf usaddress is consistently failing on particular address patterns, you can adjust the parser's behavior by adding new training data to the model. [Follow our guide in the training directory](https://github.com/datamade/usaddress/blob/master/training/README.md), and be sure to make a pull request so that we can incorporate your contribution into our next release!\n\n## Important links\n\n* Web Interface: https://parserator.datamade.us/usaddress\n* Python Package Distribution: https://pypi.python.org/pypi/usaddress\n* Python Package Documentation: https://usaddress.readthedocs.io/\n* API Documentation: https://parserator.datamade.us/api-docs\n* Repository: https://github.com/datamade/usaddress\n* Issues: https://github.com/datamade/usaddress/issues\n* Blog post: http://datamade.us/blog/parsing-addresses-with-usaddress\n\n## Team\n\n* [Forest Gregg](https://github.com/fgregg), DataMade\n* [Cathy Deng](https://github.com/cathydeng), DataMade\n* [Miroslav Batchkarov](http://mbatchkarov.github.io), University of Sussex\n* [Jean Cochrane](https://github.com/jeancochrane), DataMade\n\n## Bad Parses / Bugs\n\nReport issues in the [issue tracker](https://github.com/datamade/usaddress/issues)\n\nIf an address was parsed incorrectly, please let us know! You can either [open an issue](https://github.com/datamade/usaddress/issues/new) or (if you're adventurous) [add new training data to improve the parser's model.](https://github.com/datamade/usaddress/blob/master/training/README.md) When possible, please send over a few real-world examples of similar address patterns, along with some info about the source of the data - this will help us train the parser and improve its performance.\n\nIf something in the library is not behaving intuitively, it is a bug, and should be reported.\n\n## Note on Patches/Pull Requests\n \n* Fork the project.\n* Make your feature addition or bug fix.\n* Send us a pull request. Bonus points for topic branches!\n\n## Copyright\n\nCopyright (c) 2014 Atlanta Journal Constitution. Released under the [MIT License](https://github.com/datamade/usaddress/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:17EFE8:5E3E84:6AB92B8F"},"text_sha256":"9057f4d2bd6445126c5bff19a96c9d4cd9405d12da8825272150c97712d3c6a4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2230","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090D:6E5BD:179ED58:1BC26BD:6AB92B90"},"commit":{"sha":"aa7699b53a0843fc443f9e87285b88cbd9eaf50a","url":"https://github.com/datamade/usaddress/commit/aa7699b53a0843fc443f9e87285b88cbd9eaf50a","date":"2025-08-07T14:50:38Z","author_date":"2025-08-07T14:50:38Z","committer_date":"2025-08-07T14:50:38Z","tree_sha":"a19dbb9165148e1a4cf0271780ac7ef0c93bde14","message_first_line":"Merge pull request #396 from datamade/feat/stub_file"},"tree_request_status":200,"tree_rate":{"github_remaining":"2229","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E5:2BC4E5:1827E7A:1C4C919:6AB92B90"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5525,"blob_sha":"fb38ea01123996f83f5c8d9bc56cafaa41eb363d","priority":0}],"documents":[{"path":"README.md","size":5525,"blob_sha":"fb38ea01123996f83f5c8d9bc56cafaa41eb363d","priority":0,"status":200,"text":"usaddress\n=================\nusaddress is a Python library for parsing unstructured United States address strings into address components, using advanced NLP methods.\n\n**What this can do:** Using a probabilistic model, it makes (very educated) guesses in identifying address components, even in tricky cases where rule-based parsers typically break down.\n\n**What this cannot do:** It cannot identify address components with perfect accuracy, nor can it verify that a given address is correct/valid.\n\nIt also does not normalize the address. However, [this library built on top of usaddress does](https://github.com/GreenBuildingRegistry/usaddress-scourgify).\n\n\n## Tools built with usaddress\n\n### [Parserator API](https://parserator.datamade.us/)\nA RESTful API built on top of usaddress for programmers who don't use python. Requires an API key and the first 1,000 parses are free.\n\n### [Parserator Google Sheets App](https://workspace.google.com/u/0/marketplace/app/parserator_parse_and_split_addresses/945974620840)\nParserator: Parse and Split Addresses allows you to easily split addresses into separate columns by street, city, state, zipcode and more right in Google Sheets.\n\n## How to use the usaddress python library\n\n1. Install usaddress with [pip](https://pip.readthedocs.io/en/latest/quickstart.html), a tool for installing and managing python packages ([beginner's guide here](http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/)).\n\n  In the terminal,\n  \n  ```bash\n  pip install usaddress\n  ```\n2. Parse some addresses!\n\n  ![usaddress](https://cloud.githubusercontent.com/assets/1406537/7869001/65c6ae62-0545-11e5-8b65-5d9e71dface5.gif)\n\n  Note that `parse` and `tag` are different methods:\n  ```python\n  import usaddress\n  addr='123 Main St. Suite 100 Chicago, IL'\n  \n  # The parse method will split your address string into components, and label each component.\n  # expected output: [(u'123', 'AddressNumber'), (u'Main', 'StreetName'), (u'St.', 'StreetNamePostType'), (u'Suite', 'OccupancyType'), (u'100', 'OccupancyIdentifier'), (u'Chicago,', 'PlaceName'), (u'IL', 'StateName')]\n  usaddress.parse(addr)\n  \n  # The tag method will try to be a little smarter\n  # it will merge consecutive components, strip commas, & return an address type\n  # expected output: (OrderedDict([('AddressNumber', u'123'), ('StreetName', u'Main'), ('StreetNamePostType', u'St.'), ('OccupancyType', u'Suite'), ('OccupancyIdentifier', u'100'), ('PlaceName', u'Chicago'), ('StateName', u'IL')]), 'Street Address')\n  usaddress.tag(addr)\n  ```\n\n## How to use this development code (for the nerds)\nusaddress uses [parserator](https://github.com/datamade/parserator), a library for making and improving probabilistic parsers - specifically, parsers that use [python-crfsuite](https://github.com/tpeng/python-crfsuite)'s implementation of conditional random fields. Parserator allows you to train the usaddress parser's model (a .crfsuite settings file) on labeled training data, and provides tools for adding new labeled training data.\n\n### Building & testing the code in this repo\n\nTo build a development version of usaddress on your machine, run the following code in your command line:\n  \n  ```\n  git clone https://github.com/datamade/usaddress.git  \n  cd usaddress  \n  pip install -e .\"[dev]\"\n  ```  \n\nThen run the testing suite to confirm that everything is working properly:\n\n   ```\n   pytest\n   ```\n   \nHaving trouble building the code? [Open an issue](https://github.com/datamade/usaddress/issues/new) and we'd be glad to help you troubleshoot.\n\n### Adding new training data\n\nIf usaddress is consistently failing on particular address patterns, you can adjust the parser's behavior by adding new training data to the model. [Follow our guide in the training directory](./training/README.md), and be sure to make a pull request so that we can incorporate your contribution into our next release!\n\n## Important links\n\n* Web Interface: https://parserator.datamade.us/usaddress\n* Python Package Distribution: https://pypi.python.org/pypi/usaddress\n* Python Package Documentation: https://usaddress.readthedocs.io/\n* API Documentation: https://parserator.datamade.us/api-docs\n* Repository: https://github.com/datamade/usaddress\n* Issues: https://github.com/datamade/usaddress/issues\n* Blog post: http://datamade.us/blog/parsing-addresses-with-usaddress\n\n## Team\n\n* [Forest Gregg](https://github.com/fgregg), DataMade\n* [Cathy Deng](https://github.com/cathydeng), DataMade\n* [Miroslav Batchkarov](http://mbatchkarov.github.io), University of Sussex\n* [Jean Cochrane](https://github.com/jeancochrane), DataMade\n\n## Bad Parses / Bugs\n\nReport issues in the [issue tracker](https://github.com/datamade/usaddress/issues)\n\nIf an address was parsed incorrectly, please let us know! You can either [open an issue](https://github.com/datamade/usaddress/issues/new) or (if you're adventurous) [add new training data to improve the parser's model.](./training/README.md) When possible, please send over a few real-world examples of similar address patterns, along with some info about the source of the data - this will help us train the parser and improve its performance.\n\nIf something in the library is not behaving intuitively, it is a bug, and should be reported.\n\n## Note on Patches/Pull Requests\n \n* Fork the project.\n* Make your feature addition or bug fix.\n* Send us a pull request. Bonus points for topic branches!\n\n## Copyright\n\nCopyright (c) 2025 Atlanta Journal Constitution. Released under the [MIT License](./LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4474:35EBC:178791:5DD695:6AB92B90"},"text_sha256":"7746bba82f819740e1b792f88a74d5be58d20d864d8189ae6bdad53a2d141758"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"JustGlowing/minisom","input_row":{"repository":"JustGlowing/minisom","url":"https://github.com/JustGlowing/minisom","name":"minisom","owner":"JustGlowing","description":":red_circle: MiniSom is a minimalistic implementation of the Self Organizing Maps","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1606,"issues":151,"created_at":"2013-07-03T10:10:06Z","updated_at":"2026-09-20T18:31:19Z","first_commit_at":"2013-07-03T10:10:07Z","last_commit_at":"2026-06-09T10:41:31Z","activity_months":155.19,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:29.410Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"JustGlowing/minisom","visibility":"public","created_at":"2013-07-03T10:10:06Z","updated_at":"2026-09-20T18:31:19Z","private":false,"fork":false,"archived":false,"stargazers_count":1606,"open_issues_count":16,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2228","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:17FB667:1C1FBCF:6AB92B91"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2227","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F3:77994:17EF2C8:1C14012:6AB92B91"},"commit":{"sha":"c2d0364f393487f52a0de65b22fa3d807c549072","url":"https://github.com/JustGlowing/minisom/commit/c2d0364f393487f52a0de65b22fa3d807c549072","date":"2018-05-04T07:42:37Z","author_date":"2018-05-04T07:42:37Z","committer_date":"2018-05-04T07:42:37Z","tree_sha":"0fad46ae3219f069b786f62348db96f7fbb3529d","message_first_line":"Update Readme.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2226","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:1814259:1C39187:6AB92B92"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":8171,"blob_sha":"20a4f958115b7550bad1ac135888efd4f5afd20d","priority":0}],"documents":[{"path":"Readme.md","size":8171,"blob_sha":"20a4f958115b7550bad1ac135888efd4f5afd20d","priority":0,"status":200,"text":"<h1>MiniSom<img src='https://3.bp.blogspot.com/-_6UDGEHzIrs/WSfiyjmoeRI/AAAAAAAABHw/3UQylcCBEhUfHNhf56WSHBBmQ6g_lXQhwCLcB/s320/minisom_logo.png' align='right'><\/h1>\n\nSelf Organizing Maps\n--------------------\n\nMiniSom is a minimalistic and Numpy based implementation of the Self Organizing Maps (SOM). SOM is a type of Artificial Neural Networks able to convert complex, nonlinear statistical relationships between high-dimensional data items into simple geometric relationships on a low-dimensional display.\n\nInstallation\n---------------------\n\nJust use pip:\n\n    pip install minisom\n\nor download MiniSom to a directory of your choice and use the setup script:\n\n    python setup.py install\n\nHow to use it\n---------------------\n\nIn order to use MiniSom you need your data organized as a Numpy matrix where each row corresponds to an observation or as list of lists like the following:\n\n```python\ndata = [[ 0.80,  0.55,  0.22,  0.03],\n        [ 0.82,  0.50,  0.23,  0.03],\n        [ 0.80,  0.54,  0.22,  0.03],\n        [ 0.80,  0.53,  0.26,  0.03],\n        [ 0.79,  0.56,  0.22,  0.03],\n        [ 0.75,  0.60,  0.25,  0.03],\n        [ 0.77,  0.59,  0.22,  0.03]]      \n```\n\n Then you can run MiniSom just as follows:\n\n```python\nfrom minisom import MiniSom    \nsom = MiniSom(6, 6, 4, sigma=0.3, learning_rate=0.5) # initialization of 6x6 SOM\nprint \"Training...\"\nsom.train_random(data, 100) # trains the SOM with 100 iterations\nprint \"...ready!\"\n```\n\nMiniSom implements two types of training. The random training (implemented by the method `train_random`), where the model is trained picking random samples from your data, and the batch training (implemented by the method `train_batch`), where the samples are picked in the order they are stored.\n\nA data driven initialization of the weights is also provided by the method `random_weights_init` which initializes the weights picking random samples from the data.\n\n### Using the trained SOM\n\nAfter the training you will be able to\n\n* Compute the coordinate assigned to an observation `x` on the map with the method `winner(x)`.\n* Compute the average distance map of the weights on the map with the method `distance_map()`.\n* Compute the number of times that each neuron have been considered winner for the observations of a new data set with the method `activation_response(data)`.\n* Compute the quantization error with the method `quantization_error(data)`.\n\n#### Vector quantization\n\nThe data can be quantized by assigning a code book (weights vector of the winning neuron) to each sample in data. This kind of vector quantization is implemented by the method `quantization` that can be called as follows:\n\n```python\nqnt = som.quantization(data)\n```\n\nIn this example we have that `qnt[i]` is the quantized version of `data[i]`.\n\nExamples\n---------------------\nIn the directory `examples` you will find the code to produce the following images.\n\n1. Iris flower <a href=\"http://en.wikipedia.org/wiki/Iris_flower_data_set\">dataset<\/a>.\n\n<img src=\"http://1.bp.blogspot.com/-j6L__LOB-UI/Ud7BXLLonBI/AAAAAAAAAqU/yf7RYfAoGWM/s1600/iris.png\" height=\"312\" width=\"412\" alt=\"Iris example\">\n\nFor each observation we have a marker placed on the position of the winning neuron on the map. Each type of marker represents a class of the iris data. The average distance map of the weights is used as background (see the color bar on the right to associate the value) \n\n2. Images clustering\n\n<img src=\"http://1.bp.blogspot.com/-DOfulhSC7b8/UjHgeP6oasI/AAAAAAAAAso/t1cChUJZpVg/s1600/digits_mrk.png\" height=\"312\" width=\"412\" alt=\"handwritten digitts recognition\">\n\nThe graph above represent each image with the handwritten digit it contains. The position corresponds to the position of the winning neuron for the image. Here we also have a version of this graphs that shows the original images:\n\n<img src=\"http://1.bp.blogspot.com/-VxpdlXkeXfc/UjHgePQIvuI/AAAAAAAAAss/1jOaJRswqzM/s1600/digits_imgs.png\" height=\"312\" width=\"412\" alt=\"handwritten digitts recognition\">\n\n3. Color quantization\n\n<img src=\"http://2.bp.blogspot.com/--b04KEYZPyo/UepdhilpH2I/AAAAAAAAAq4/TefYKHi_uZ8/s1600/qnt_res.png\" height=\"312\" width=\"412\" alt=\"Color quantization example\">\n\n4. Natural language processing\n\n<img src=\"https://3.bp.blogspot.com/-D-z_xeWMHuU/WZb7Kc0fK9I/AAAAAAAABKY/xdI_ApUZMx8O4uN9ihZ_e6jbmQYhUggqgCLcBGAs/s1600/poems_som.png\" height=\"650\" width=\"650\">\n\nIn this example each poem is associate with a cell in the map. The color represent the author. Check out the notebook in the examples for more details: https://github.com/JustGlowing/minisom/blob/master/examples/PoemsAnalysis.ipynb\n\nWho uses Minisom?\n------------\n<ul>\n<li>\nBirgitta Dresp-Langley, John Mwangi Wandeto, Henry Okola Nyongesa. <a href=\"https://www.openscience.fr/IMG/pdf/iste_fromd2d17v1n2.pdf\">Using the quantization error from Self‐Organizing Map (SOM) output for fast detection of critical variations in image time series<\/a>. ISTE OpenScience, 2018.\n<\/li>\n<li>\nJohn M. Wandeto, Henry O. Nyongesa, Birgitta Dresp-Langley. <a href=\"https://arxiv.org/abs/1803.11125\">Detection of Structural Change in Geographic Regions of Interest by Self Organized Mapping: Las Vegas City and Lake Mead across the Years<\/a>. 2018.\n<\/li>\n<li>\nDenis Mayr Lima Martins, Gottfried Vossen, Fernando Buarque de Lima Neto. <a href=\"https://ieeexplore.ieee.org/abstract/document/8285698/\">Learning database queries via intelligent semiotic machines<\/a>. IEEE Latin American Conference on Computational Intelligence (LA-CCI), 2017.\n<\/li>\n<li>\nUdemy online course. <a href=\"https://www.udemy.com/deeplearning/?utm_campaign=email&utm_source=sendgrid.com&utm_medium=email\">Deep Learning A-Z™: Hands-On Artificial Neural Networks<\/a>\n<img src=\"https://www.udemy.com/staticx/udemy/images/v6/logo-coral.svg\" height=\"20\">\n<\/li>\n<li>\nFredrik Broch Elgaaen, Nicholas Mowatt Larssen. <a href=\"https://www.duo.uio.no/bitstream/handle/10852/57507/master_nml.pdf?sequence=1&isAllowed=y\">Data mining i banksektoren - Prediksjonsmodellering og analyse av kunder som sier opp boliglån<\/a>. University of Oslo, May 2017.\n<\/li>\n<li>\nÓscar Clavería González, Enric Monte Moreno, Salvador Torra Porras. <a href=\"http://www.sciencedirect.com/science/article/pii/S2110701715000694\">A self-organizing map analysis of survey-based agents׳ expectations before impending shocks for model selection: The case of the 2008 financial crisis<\/a>. International Economics Volume 146, Pages 40–58. August 2016.\n<\/li>\n<li>\nSameen Mansha, Faisal Kamiran, Asim Karim, Aizaz Anwar. <a href=\"http://link.springer.com/chapter/10.1007/978-3-319-46681-1_16\">A Self-Organizing Map for Identifying InfluentialCommunities in Speech-based Networks<\/a>. Proceeding CIKM '16 Proceedings of the 25th ACM International on Conference on Information and Knowledge Management Pages 1965-1968. 2016.\n<\/li>\n<li>\nSameen Mansha, Zaheer Babar, Faisal Kamiran, Asim Karim. <a href=\"http://link.springer.com/chapter/10.1007/978-3-319-46681-1_16\">Neural Network Based Association Rule Mining from Uncertain Data<\/a>. Neural Information Processing Volume 9950 of the series Lecture Notes in Computer Science pp 129-136. 2016.\n<\/li>\n<li>\nMakiyama, Vitor Hirota, M. Jordan Raddick, and Rafael DC Santos. <a href=\"http://ceur-ws.org/Vol-1478/paper7.pdf\">Text Mining Applied to SQL Queries: A Case Study for the SDSS SkyServer<\/a>. 2nd Annual International Symposium on Information Management and Big Data. 2015.\n<\/li>\n<li>\nRemi Domingues. <a href=\"http://www.diva-portal.org/smash/get/diva2:897808/FULLTEXT01.pdf\">Machine Learning for\nUnsupervised Fraud Detection<\/a>. Royal Institute of Technology School of Computer Science and Communication KTH CSC. 2015.\n<\/li>\n<li>Ivana Kajić, Guido Schillaci, Saša Bodiroža, Verena V. Hafner, <a href=\"http://dl.acm.org/citation.cfm?id=2559816\">Learning hand-eye coordination for a humanoid robot using SOMs<\/a>. Proceedings of the 2014 ACM/IEEE international conference on Human-robot interaction\nPages 192-193.<\/li>\n<\/ul>\n\nCompatibility notes\n---------------------\nMinisom has been tested under python 2.7.3 and 3.2.3.\n\nLicense\n---------------------\n\nMiniSom distributed under MIT license.\n\n***\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9152:35999:1790A7:5DE0C9:6AB92B8F"},"text_sha256":"e8696f9ee9d425b6d815c4fe4b74458685f104518361853eecc1c85ee4fbc1e1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2225","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0841:6E4BB:1802638:1C26D30:6AB92B92"},"commit":{"sha":"2eb8bd75596c57dd6260d4f0feef839bc0d22d07","url":"https://github.com/JustGlowing/minisom/commit/2eb8bd75596c57dd6260d4f0feef839bc0d22d07","date":"2026-06-09T10:41:31Z","author_date":"2026-06-09T10:41:31Z","committer_date":"2026-06-09T10:41:31Z","tree_sha":"10e83bc745fd406b223eb4fa9047c5af5c6dfc4e","message_first_line":"Update citation count in Readme.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2224","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0833:1DB627:18764C8:1C9B60A:6AB92B93"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":8351,"blob_sha":"cc00c66b7809f3aba1f33eb025245bb3492ab3d7","priority":0}],"documents":[{"path":"Readme.md","size":8351,"blob_sha":"cc00c66b7809f3aba1f33eb025245bb3492ab3d7","priority":0,"status":200,"text":"[![PyPI version fury.io](https://badge.fury.io/py/minisom.svg)](https://pypi.org/project/MiniSom/)\n[![Downloads](https://static.pepy.tech/personalized-badge/minisom?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads)](https://pepy.tech/project/MiniSom)\n[![Python package](https://github.com/JustGlowing/minisom/actions/workflows/python-package.yml/badge.svg?branch=master&event=push)](https://github.com/JustGlowing/minisom/actions/workflows/python-package.yml)\n![coverage](https://img.shields.io/badge/coverage-97.76%25-44cc11)\n\n<h1>MiniSom<img src='https://3.bp.blogspot.com/-_6UDGEHzIrs/WSfiyjmoeRI/AAAAAAAABHw/3UQylcCBEhUfHNhf56WSHBBmQ6g_lXQhwCLcB/s320/minisom_logo.png' align='right'><\/h1>\n\nSelf Organizing Maps\n--------------------\n\nMiniSom is a minimalistic and Numpy based implementation of the Self Organizing Maps (SOM) with optional JIT acceleration via Numba. SOM is a type of Artificial Neural Network able to convert complex, nonlinear statistical relationships between high-dimensional data items into simple geometric relationships on a low-dimensional display. Minisom is designed to allow researchers to easily build on top of it and to give students the ability to quickly grasp its details.\n\nThe project initially aimed for a minimalistic implementation of the Self-Organizing Map (SOM) algorithm, focusing on simplicity in features, dependencies, and code style. Although it has expanded in terms of features, it remains minimalistic by relying only on the numpy library and emphasizing vectorization in coding style.\n\nUpdates about MiniSom are posted on <a href=\"https://x.com/JustGlowing\">X<\/a>.\n\nJump into using MiniSom via Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/JustGlowing/minisom/blob/master/examples/BasicUsage.ipynb)\n\nInstallation\n---------------------\n\nJust use pip:\n\n    pip install minisom\n\nTo include Numba for JIT-accelerated training:\n\n    pip install minisom[fast]\n\nor download MiniSom to a directory of your choice and use the setup script:\n\n    git clone https://github.com/JustGlowing/minisom.git\n    python setup.py install\n\nNote that the commands above will install the latest version of MiniSom which might contain changes that are not parte of the stable release.\n\nHow to use it\n---------------------\n\nIn order to use MiniSom you need your data organized as a Numpy matrix where each row corresponds to an observation or as list of lists like the following:\n\n```python\ndata = [[ 0.80,  0.55,  0.22,  0.03],\n        [ 0.82,  0.50,  0.23,  0.03],\n        [ 0.80,  0.54,  0.22,  0.03],\n        [ 0.80,  0.53,  0.26,  0.03],\n        [ 0.79,  0.56,  0.22,  0.03],\n        [ 0.75,  0.60,  0.25,  0.03],\n        [ 0.77,  0.59,  0.22,  0.03]]      \n```\n\n Then you can train MiniSom just as follows:\n\n```python\nfrom minisom import MiniSom    \nsom = MiniSom(6, 6, 4, sigma=0.3, learning_rate=0.5) # initialization of 6x6 SOM\nsom.train(data, 100) # trains the SOM with 100 iterations\n```\n\nMiniSom also supports JIT-accelerated training via [Numba](https://numba.pydata.org/). If Numba is installed (see [installation](#installation)), you can use `train_batch_offline_fast` for significant speedups on large datasets:\n\n```python\nsom = MiniSom(6, 6, 4, sigma=0.3, learning_rate=0.5)\nsom.train_batch_offline_fast(data, 100) # JIT-accelerated batch training\n```\n\nThe first call will be slightly slower due to JIT compilation; subsequent calls reuse the compiled code.\n\nYou can obtain the position of the winning neuron on the map for a given sample as follows:\n\n```\nsom.winner(data[0])\n```\n\nFor an overview of all the features implemented in minisom you can browse the following examples: https://github.com/JustGlowing/minisom/tree/master/examples\n\n#### Export a SOM and load it again\n\nA model can be saved using pickle as follows\n\n```python\nimport pickle\nsom = MiniSom(7, 7, 4)\n\n# ...train the som here\n\n# saving the som in the file som.p\nwith open('som.p', 'wb') as outfile:\n    pickle.dump(som, outfile)\n```\n\nand can be loaded as follows\n\n```python\nwith open('som.p', 'rb') as infile:\n    som = pickle.load(infile)\n```\n\nNote that if a lambda function is used to define the decay factor MiniSom will not be pickable anymore.\n\nExamples\n---------------------\n\nHere are some of the charts you'll see how to generate in the [examples](https://github.com/JustGlowing/minisom/tree/master/examples):\n\n| | |\n:-------------------------:|:-------------------------:\nSeeds map ![](https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_seed.png)  | Class assignment ![](https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_seed_pies.png)\nHandwritten digits mapping ![](https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_digts.png)  |  Hexagonal Topology <img src=\"https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_seed_hex.png\" alt=\"som hexagonal toplogy\" width=450>\nColor quantization ![](https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_color_quantization.png)  |  Outliers detection ![](https://github.com/JustGlowing/minisom/raw/master/examples/resulting_images/som_outliers_detection_circle.png)\n\nOther tutorials\n------------\n- <a href=\"https://glowingpython.blogspot.com/2013/09/self-organizing-maps.html\">Self Organizing Maps on the Glowing Python<\/a>\n- <a href=\"https://github.com/Optimization-Algorithms-Book/Code-Listings/blob/main/Chapter%2011/Listing%2011.5_TSP_SOM.ipynb\">How to solve the Travelling Salesman Problem<\/a> from the book <i>Optimization Algorithms:Optimization Algorithms: AI techniques for design, planning, and control problems. Manning Publications, 2023.<\/i>\n- <a href=\"http://aa.ssdi.di.fct.unl.pt/files/AA-16_notes.pdf\">Lecture notes from the Machine Learning course at the University of Lisbon<\/a>\n- <a href=\"https://heartbeat.fritz.ai/introduction-to-self-organizing-maps-soms-98e88b568f5d\">Introduction to Self-Organizing<\/a> by Derrick Mwiti\n- <a href=\"http://inphronesys.com/?p=625\">Self Organizing Maps on gapminder data<\/a> [in German]\n- <a href=\"https://medium.com/neuronio/discovering-som-an-unsupervised-neural-network-12e787f38f9\">Discovering SOM, an Unsupervised Neural Network<\/a> by Gisely Alves\n- Video tutorials made by the GeoEngineerings School: <a href=\"https://www.youtube.com/watch?v=3osKNPyAxPM&list=PL-i8do33HJovC7xFKaYO21qT37vORJWXC&index=11\">Part 1<\/a>; <a href=\"https://www.youtube.com/watch?v=uUpQ6MITlVs&list=PL-i8do33HJovC7xFKaYO21qT37vORJWXC&index=12\">Part 2<\/a>; <a href=\"https://www.youtube.com/watch?v=mryFU0TEInk&list=PL-i8do33HJovC7xFKaYO21qT37vORJWXC&index=13\">Part 3<\/a>; <a href=\"https://www.youtube.com/watch?v=9MzFOIoxxdk&index=14&list=PL-i8do33HJovC7xFKaYO21qT37vORJWXC\">Part 4<\/a>\n- Video tutorial <a href=\"https://www.youtube.com/watch?v=0qtvb_Nx2tA\">Self Organizing Maps: Introduction<\/a> by Art of Visualization\n- Video tutorial <a href=\"https://www.youtube.com/watch?v=O6nzwAc_hrQ\">Self Organizing Maps Hyperparameter tuning<\/a> by \nSuperDataScience Machine Learning\n\nHow to cite MiniSom\n------------\n```\n@misc{vettigliminisom,\n  title={MiniSom: minimalistic and NumPy-based implementation of the Self Organizing Map},\n  author={Giuseppe Vettigli},\n  year={2018},\n  url={https://github.com/JustGlowing/minisom/},\n}\n```\n\nMiniSom has been cited more than 500 times, check out the research where MiniSom was used  <a href=\"https://scholar.google.co.uk/scholar?hl=en&as_sdt=2007&q=%22JustGlowing%2Fminisom%22+OR+%22minisom+library%22+OR+%22minisom+python%22+OR+%22minisom+vettigli%22&btnG=\">here<\/a>.\n\nGuidelines to contribute\n---------------------\n1. In the description of your Pull Request explain clearly what it implements or fixes. In cases that the PR is about a code speedup, report a reproducible example and quantify the speedup.\n2. Give your pull request a helpful title that summarises what your contribution does. \n3. Write unit tests for your code and make sure the existing ones are up to date. `pytest` can be used for this:\n```\npytest minisom.py\n```\n4. Make sure that there are no stylistic issues using `pycodestyle`:\n```\npycodestyle minisom.py\n```\n5. Make sure your code is properly commented and documented. Each public method needs to be documented as the existing ones.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E7D6:3FD49:178476:5DD446:6AB92B8F"},"text_sha256":"49d47d141a48fe9bf4848f80c129ebbdd72058dca3a1553a590a872d009eee21"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hi-primus/optimus","input_row":{"repository":"hi-primus/optimus","url":"https://github.com/hi-primus/optimus","name":"optimus","owner":"hi-primus","description":":truck: Agile Data Preparation Workflows made easy with Pandas, Dask, cuDF, Dask-cuDF, Vaex and PySpark","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1535,"issues":219,"created_at":"2017-07-13T02:31:18Z","updated_at":"2026-09-25T20:36:24Z","first_commit_at":"2017-07-13T02:31:18Z","last_commit_at":"2023-05-19T04:32:00Z","activity_months":70.170000000000002,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:32.127Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hi-primus/optimus","visibility":"public","created_at":"2017-07-13T02:31:18Z","updated_at":"2026-09-25T20:36:24Z","private":false,"fork":false,"archived":false,"stargazers_count":1535,"open_issues_count":30,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2223","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082E:72BD3:17FE99E:1C236D8:6AB92B94"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2222","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:180275C:1C26E79:6AB92B94"},"commit":{"sha":"8e0dfe3dce903ac9e922b56e0673df07e5be0645","url":"https://github.com/hi-primus/optimus/commit/8e0dfe3dce903ac9e922b56e0673df07e5be0645","date":"2018-05-23T18:01:41Z","author_date":"2018-05-23T18:01:41Z","committer_date":"2018-05-23T18:01:41Z","tree_sha":"b067e41c6a5b6a0e8990be7d4a360f0177e5a361","message_first_line":"Update pytest from 3.5.1 to 3.6.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2221","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:1802795:1C26EC8:6AB92B94"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12453,"blob_sha":"6051a9d6253a6eb8d9c38e92fae5cd7d953aa2c6","priority":0},{"path":"Readme.txt","size":805,"blob_sha":"4a357181c4df31dc0b51b61026ac85c316bb0eb3","priority":0}],"documents":[{"path":"README.md","size":12453,"blob_sha":"6051a9d6253a6eb8d9c38e92fae5cd7d953aa2c6","priority":0,"status":200,"text":"[![Logo Optimus](https://github.com/ironmussa/Optimus/blob/master/images/logoOptimus.png)](https://hioptimus.com)\n\n[![PyPI version](https://badge.fury.io/py/optimuspyspark.svg)](https://badge.fury.io/py/optimuspyspark) [![Build Status](https://travis-ci.org/ironmussa/Optimus.svg?branch=master)](https://travis-ci.org/ironmussa/Optimus) [![Documentation Status](https://readthedocs.org/projects/optimus-ironmussa/badge/?version=latest)](http://optimus-ironmussa.readthedocs.io/en/latest/?badge=latest)\n [![built_by iron](https://img.shields.io/badge/built_by-iron-FF69A4.svg)](http://ironmussa.com) [![Updates](https://pyup.io/repos/github/ironmussa/Optimus/shield.svg)](https://pyup.io/repos/github/ironmussa/Optimus/)\n [![GitHub release](https://img.shields.io/github/release/ironmussa/optimus.svg)](https://github.com/ironmussa/Optimus/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/e01572e2af5640fcbcdd58e7408f3ea0)](https://www.codacy.com/app/favio.vazquezp/Optimus?utm_source=github.com&utm_medium=referral&utm_content=ironmussa/Optimus&utm_campaign=badger) [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/iron-mussa/devops)\n\n[![Platforms](https://img.shields.io/badge/platform-Linux%20%7C%20Mac%20OS%20%7C%20Windows-blue.svg)](https://spark.apache.org/docs/2.2.0/#downloading) [![Dependency Status](https://gemnasium.com/badges/github.com/ironmussa/Optimus.svg)](https://gemnasium.com/github.com/ironmussa/Optimus) [![Quality Gate](https://sonarqube.com/api/badges/gate?key=ironmussa-optimus:optimus)](https://sonarqube.com/dashboard/index/ironmussa-optimus:optimus)  [![Code Health](https://landscape.io/github/ironmussa/Optimus/develop/landscape.svg?style=flat)](https://landscape.io/github/ironmussa/Optimus/develop) [![Coverage Status](https://coveralls.io/repos/github/ironmussa/Optimus/badge.svg?branch=master)](https://coveralls.io/github/ironmussa/Optimus?branch=master) [![Mentioned in Awesome Data Science](https://awesome.re/mentioned-badge.svg)](https://github.com/bulutyazilim/awesome-datascience)\n\n\n\n[![Join the chat at https://gitter.im/optimuspyspark/Lobby](https://badges.gitter.im/optimuspyspark/Lobby.svg)](https://gitter.im/optimuspyspark/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nOptimus is the missing framework for cleaning and pre-processing data in a distributed fashion. It uses all the power of \nApache Spark (optimized via Catalyst) to do so. It implements several handy tools for data wrangling and munging that will \nmake your life much easier. The first obvious advantage over any other public data cleaning library or framework is that \nit will work on your laptop or your big cluster, and second, it is amazingly easy to install, use and understand.\n\nClick on Optimus to enter in our Website:\n\n<a href=\"https://hioptimus.com\"><img src=\"https://github.com/ironmussa/Optimus/blob/master/images/robotOptimus.png\" alt=\"Click Me!\" border=\"0\" height=\"220\"><\/a>\n\nAnd if you want to see some cool information and tutorials for Optimus check out our blog:\n\nhttps://hioptimus.com/category/blog/\n\n## Click below for the official documentation\n\n[![Documentation](https://media.readthedocs.com/corporate/img/header-logo.png)](http://docs.hioptimus.com/en/latest/)\n\n## Survey \n\nPlease take a couple of minutes to help shape the Optimus' Roadmap:\n\n### https://optimusdata.typeform.com/to/aEnYRY\n\n## Installation (pip):\n\nIn your terminal just type:\n\n```\npip install optimuspyspark\n```\n\n## Requirements\n* Apache Spark 2.2.0\n* Python>=3.6\n\n## Basic Usage\n\nDataFrameTransformer class receives a dataFrame as an argument. This\nclass has all methods listed above.\n\n**Note:** Every possible transformation make changes over this dataFrame and\noverwrites it.\n\n### Transformer.clear_accents(columns)\n\nThis function deletes accents in strings dataFrames, it does not\neliminate main character, but only deletes special tildes.\n\n``clear_accents`` method receives column names (``column``) as argument.\n``columns`` must be a string or a list of column names.\n\nE.g:\n\nBuilding a dummy dataFrame:\n\n```python\n\n    # Importing sql types\n    from pyspark.sql.types import StringType, IntegerType, StructType, StructField\n    # Importing optimus\n    import optimus as op\n\n    # Building a simple dataframe:\n    schema = StructType([\n            StructField(\"city\", StringType(), True),\n            StructField(\"country\", StringType(), True),\n            StructField(\"population\", IntegerType(), True)])\n\n    countries = ['Colombia', 'US@A', 'Brazil', 'Spain']\n    cities = ['Bogotá', 'New York', '   São Paulo   ', '~Madrid']\n    population = [37800000,19795791,12341418,6489162]\n\n    # Dataframe:\n    df = op.spark.createDataFrame(list(zip(cities, countries, population)), schema=schema)\n\n    df.show()\n```\n\nNew DF:\n\n```\n+---------------+--------+----------+\n|           city| country|population|\n+---------------+--------+----------+\n|         Bogotá|Colombia|  37800000|\n+---------------+--------+----------+\n|       New York|    US@A|  19795791|\n+---------------+--------+----------+\n|   São Paulo   |  Brazil|  12341418|\n+---------------+--------+----------+\n|        ~Madrid|   Spain|   6489162|\n+---------------+--------+----------+\n```\n\n```python\n\n    # Instantiation of DataTransformer class:\n    transformer = op.DataFrameTransformer(df)\n\n    # Printing of original dataFrame:\n    print('Original dataFrame:')\n    transformer.show()\n\n    # Clear accents:\n    transformer.clear_accents(columns='*')\n\n    # Printing new dataFrame:\n    print('New dataFrame:')\n    transformer.show()\n```\n\nOriginal dataFrame:\n```\n+---------------+--------+----------+\n|           city| country|population|\n+---------------+--------+----------+\n|         Bogotá|Colombia|  37800000|\n+---------------+--------+----------+\n|       New York|    US@A|  19795791|\n+---------------+--------+----------+\n|   São Paulo   |  Brazil|  12341418|\n+---------------+--------+----------+\n|        ~Madrid|   Spain|   6489162|\n+---------------+--------+----------+\n```\nNew dataFrame:\n```\n+---------------+--------+----------+\n|           city| country|population|\n+---------------+--------+----------+\n|         Bogota|Colombia|  37800000|\n+---------------+--------+----------+\n|       New York|    US@A|  19795791|\n+---------------+--------+----------+\n|   Sao Paulo   |  Brazil|  12341418|\n+---------------+--------+----------+\n|        ~Madrid|   Spain|   6489162|\n+---------------+--------+----------+\n```\n\n### Transformer.remove_special_chars(columns)\n\nThis method remove special characters (i.e. !\"#$%&/()=?) in columns of\ndataFrames.\n\n``remove_special_chars`` method receives ``columns`` as input. ``columns``\nmust be a string or a list of strings.\n\nE.g:\n\n```python\n\n    # Instantiation of DataTransformer class:\n    transformer = op.DataFrameTransformer(df)\n\n    # Printing of original dataFrame:\n    print('Original dataFrame:')\n    transformer.show()\n\n    # Remove special characters:\n    transformer.remove_special_chars(columns=['city', 'country'])\n\n    # Printing new dataFrame:\n    print('New dataFrame:')\n    transformer.show()\n```\n\nOriginal dataFrame:\n```\n+---------------+--------+----------+\n|           city| country|population|\n+---------------+--------+----------+\n|         Bogotá|Colombia|  37800000|\n+---------------+--------+----------+\n|       New York|    US@A|  19795791|\n+---------------+--------+----------+\n|   São Paulo   |  Brazil|  12341418|\n+---------------+--------+----------+\n|        ~Madrid|   Spain|   6489162|\n+---------------+--------+----------+\n```\nNew dataFrame:\n```\n+---------------+--------+----------+\n|           city| country|population|\n+---------------+--------+----------+\n|         Bogotá|Colombia|  37800000|\n+---------------+--------+----------+\n|       New York|     USA|  19795791|\n+---------------+--------+----------+\n|   São Paulo   |  Brazil|  12341418|\n+---------------+--------+----------+\n|         Madrid|   Spain|   6489162|\n+---------------+--------+----------+\n```\n\n### Transformer.replace_na(value, columns=None)\n\nThis method replace nulls with specified value.\n\n``columns`` argument is an optional list of column names to consider. Columns specified in subset that do not have\nmatching data type are ignored. For example, if value is a string, and subset contains a non-string column,\nthen the non-string column is simply ignored. If `columns == \"*\"` then it will choose all columns.\n\n``value`` argument is the value to replace nulls with. If the value is a dict, then subset is ignored and value\nmust be a mapping from column name (string) to replacement value. The replacement value must be an int, long,\nfloat, or string.\n\nLet's download a sample data using our amazing `read_url` function.\n\n\n```python\n    # Import optimus\n    import optimus as op\n    # Instance of Utilities class\n    tools = op.Utilities()\n    # Reading df from web\n    url = \"https://raw.githubusercontent.com/ironmussa/Optimus/master/examples/impute_data.csv\"\n    df = tools.read_url(path=url)\n```\n\nIf we examine this DF we see that there are some missing values.\n```\n+---+---+\n|  a|  b|\n+---+---+\n|1.0|NaN|\n+---+---+\n|2.0|NaN|\n+---+---+\n|NaN|3.0|\n+---+---+\n|4.0|4.0|\n+---+---+\n|5.0|5.0|\n+---+---+\n```\nRemember that we have the `impute_missing` function that lets you choose to use the mean or the median of the columns in\nwhich the missing values are located for your imputation. But with `replace_na` you can say replace the nulls in one,\nor all columns in the dataframe with a specific value. For this example we will replace NA with 0's.\n\n```python\n\n    # Instantiation of DataTransformer class:\n    transformer = op.DataFrameTransformer(df)\n    # Replace NA with 0's\n    transformer.replace_na(0.0, columns=\"*\")\n    # Show DF\n    transformer.show()\n```\n```\n+---+---+\n|  a|  b|\n+---+---+\n|1.0|0.0|\n+---+---+\n|2.0|0.0|\n+---+---+\n|0.0|3.0|\n+---+---+\n|4.0|4.0|\n+---+---+\n|5.0|5.0|\n+---+---+\n```\n\n## Contributing to Optimus (based on Webpack)\n\nContributions go far beyond pull requests and commits. We are very happy to receive any kind of contributions \nincluding:\n\n* [Documentation](https://github.com/ironmussa/Optimus/tree/master/docs/source) updates, enhancements, designs, or \nbugfixes.\n* Spelling or grammar fixes.\n* README.md corrections or redesigns.\n* Adding unit, or functional [tests](https://github.com/ironmussa/Optimus/tree/master/tests) \n* Triaging GitHub issues -- especially determining whether an issue still persists or is reproducible.\n* [Searching #optimusdata on twitter](https://twitter.com/search?q=optimusdata) and helping someone else who needs help.\n* [Blogging, speaking about, or creating tutorials](https://hioptimus.com/category/blog/) \nabout Optimus and its many features.\n* Helping others in our optimus [gitter channel](https://gitter.im/optimuspyspark/Lobby).\n\n\n## Backers\n[[Become a backer](https://opencollective.com/optimus#backer)] and get your image on our README on Github with a link to your site.\n[![OpenCollective](https://opencollective.com/optimus/backers/badge.svg)](#backers) \n\n\n## Sponsors\n[[Become a sponsor](https://opencollective.com/optimus#backer)] and get your image on our README on Github with a link to your site.\n[![OpenCollective](https://opencollective.com/optimus/sponsors/badge.svg)](#sponsors)\n\n## Optimus for Spark 1.6.x\n\nOptimus main stable branch will \nwork now for Spark 2.2.0 The 1.6.x version is now under maintenance, \nthe last tag release for this Spark version is the 0.4.0. We strongly \nsuggest that you use the >2.x version of the framework because the \nnew improvements and features will be added now on this version.\n\n## Contributors: \n\n - Project Manager: [Argenis León](https://github.com/argenisleon) \n - Original developers: [Andrea Rosales](https://github.com/andrearosr), [Hugo Reyes](https://github.com/hugounavez), [Alberto Bonsanto](https://github.com/Bonsanto)\n - Principal developer and maintainer: [Favio Vázquez](https://github.com/faviovazquez)\n \n[![Logo Data](https://www.bbvadata.com/wp-content/uploads/2016/07/bbvada_logo.png)](https://www.bbvadata.com)\n \n## License:\n\nApache 2.0 © [Iron](https://github.com/ironmussa)\n\n[![Logo Iron](https://ironmussa.com/wp-content/uploads/2017/08/iron-svg-2.png)](https://ironmussa.com)\n\n<a href=\"https://twitter.com/optimus_data\"><img src=\"https://www.shareicon.net/data/256x256/2015/09/01/94063_circle_512x512.png\" alt=\"Optimus twitter\" border=\"0\" height=\"60\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2854:3E724:180EC2:5E5DD6:6AB92B95"},"text_sha256":"90cbc67901c98b25a47aeecc00cd0df0503378a7f46d648cd87f60ad5786b208"},{"path":"Readme.txt","size":805,"blob_sha":"4a357181c4df31dc0b51b61026ac85c316bb0eb3","priority":0,"status":200,"text":"Optimus is the missing framework for cleaning and pre-processing data in a distributed fashion.\nIt uses all the power of Apache Spark (optimized via Catalyst) to do it. It implements several handy tools for data\nwrangling and munging that will make your life much easier. The first obvious advantage over any other public data\ncleaning library is that it will work on your laptop or your big cluster, and second, it is amazingly easy to install,\nuse and understand.\n\n- Requirements:\n\n* Apache Spark 2.2.0\n\n* Python>=3.6\n\n- Installation:\n\nIn your terminal just type:\n\n$ pip install optimuspyspark\n\n- Contributors:\n\n* Project Manager: Argenis León.\n\n* Original Developers: Andrea Rosales, Hugo Reyes, Alberto Bonsanto.\n\n* Principal developer and maintainer: Favio Vázquez.\n\n- License:\n\nApache 2.0 © Iron\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D75A:3B1F3:1851D2:5EA22B:6AB92B95"},"text_sha256":"628d9b33ff891a75b406beb28633c15af2fce83cdf52d27ed264a09e5b727e3c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2220","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:18157F9:1C3A2C8:6AB92B96"},"commit":{"sha":"cb73842d5662f9781bacb50afd24b94cfb586b95","url":"https://github.com/hi-primus/optimus/commit/cb73842d5662f9781bacb50afd24b94cfb586b95","date":"2023-05-19T04:32:00Z","author_date":"2023-05-19T04:31:53Z","committer_date":"2023-05-19T04:32:00Z","tree_sha":"15505611d3d332d4b049ab6ebfdd63a39fd9ebe3","message_first_line":"Implement manually triggered Publish Python test Package Github action"},"tree_request_status":200,"tree_rate":{"github_remaining":"2219","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:181586C:1C3A354:6AB92B96"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8061,"blob_sha":"35e7f66a283cbce5b06038fbc47962c43d318e30","priority":0},{"path":"Readme.txt","size":308,"blob_sha":"33e98a5d9f67fabf1a34263a70e4d41a5e151c08","priority":0}],"documents":[{"path":"README.md","size":8061,"blob_sha":"35e7f66a283cbce5b06038fbc47962c43d318e30","priority":0,"status":200,"text":"# Optimus\n\n[![Logo Optimus](https://raw.githubusercontent.com/hi-primus/optimus/develop-23.5/images/optimus-logo.png)](https://hi-optimus.com)\n\n[![Tests](https://github.com/hi-primus/optimus/actions/workflows/main.yml/badge.svg)](https://github.com/hi-primus/optimus/actions/workflows/main.yml)\n[![Docker image updated](https://github.com/hi-primus/optimus/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/hiprimus/optimus)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/pyoptimus.svg)](https://pypi.org/project/pyoptimus/) \n[![GitHub release](https://img.shields.io/github/release/hi-primus/optimus.svg?include_prereleases)](https://github.com/hi-primus/optimus/releases)\n[![CalVer](https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg)](http://calver.org)\n\n[![Downloads](https://pepy.tech/badge/pyoptimus)](https://pepy.tech/project/pyoptimus)\n[![Downloads](https://pepy.tech/badge/pyoptimus/month)](https://pepy.tech/project/pyoptimus/month)\n[![Downloads](https://pepy.tech/badge/pyoptimus/week)](https://pepy.tech/project/pyoptimus/week)\n[![Mentioned in Awesome Data Science](https://awesome.re/mentioned-badge.svg)](https://github.com/bulutyazilim/awesome-datascience) \n[![Slack](https://img.shields.io/badge/chat-slack-red.svg?logo=slack&color=36c5f0)](https://communityinviter.com/apps/hi-bumblebee/welcome)\n\n# Overview\n\nOptimus is an opinionated python library to easily load, process, plot and create ML models that run over pandas, Dask, cuDF, dask-cuDF, Vaex or Spark. \n\nSome amazing things Optimus can do for you:\n* Process using a simple API, making it easy to use for newcomers.\n* More than 100 functions to handle strings, process dates, urls and emails.\n* Easily plot data from any size.\n* Out of box functions to explore and fix data quality. \n* Use the same code to process your data in your laptop or in a remote cluster of GPUs.\n\n[See Documentation](https://docs.hi-optimus.com/en/latest/)\n\n## Try Optimus\nTo launch a live notebook server to test optimus using binder or Colab, click on one of the following badges:\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hi-primus/optimus/develop-23.5?filepath=https%3A%2F%2Fraw.githubusercontent.com%2Fhi-primus%2Foptimus%2Fdevelop-23.5%2Fexamples%2F10_min_to_optimus.ipynb)\n[![Colab](https://img.shields.io/badge/launch-colab-yellow.svg?logo=googlecolab&color=e6a210)](https://colab.research.google.com/github/hi-primus/optimus/blob/master/examples/10_min_to_optimus_colab.ipynb)\n\n## Installation (pip): \nIn your terminal just type:\n```\npip install pyoptimus\n```\n\nBy default Optimus install Pandas as the default engine, to install other engines you can use the following commands:\n\n| Engine    | Command                                |\n|-----------|----------------------------------------|\n| Dask      | ```pip install pyoptimus[dask]```      |\n| cuDF      | ```pip install pyoptimus[cudf]```      |\n| Dask-cuDF | ```pip install pyoptimus[dask-cudf]``` |\n| Vaex      | ```pip install pyoptimus[vaex]```      |\n| Spark     | ```pip install pyoptimus[spark]```     |\n\nTo install from the repo: \n```\npip install git+https://github.com/hi-primus/optimus.git@develop-23.5\n```\n\nTo install other engines: \n```\npip install git+https://github.com/hi-primus/optimus.git@develop-23.5#egg=pyoptimus[dask]\n```\n\n\n\n### Requirements\n* Python 3.7 or 3.8\n\n## Examples\n\nYou can go to [10 minutes to Optimus](https://github.com/hi-primus/optimus/blob/develop-23.5/examples/10_min_to_optimus.ipynb) where you can find the basics to start working in a notebook.\n\nAlso you can go to the [Examples](https://github.com/hi-primus/optimus/tree/develop-23.5/examples/examples.md) section and find specific notebooks about data cleaning, data munging, profiling, data enrichment and how to create ML and DL models.\n\nHere's a handy [Cheat Sheet](https://htmlpreview.github.io/?https://github.com/hi-primus/optimus/blob/develop-23.5/docs/cheatsheet/optimus_cheat_sheet.html) with the most common Optimus' operations.\n\n## Start Optimus\n\nStart Optimus using ```\"pandas\"```, ```\"dask\"```, ```\"cudf\"```,```\"dask_cudf\"```,```\"vaex\"``` or ```\"spark\"```.\n\n```python\nfrom optimus import Optimus\nop = Optimus(\"pandas\")\n```\n\n## Loading data\n\nNow Optimus can load data in csv, json, parquet, avro and excel formats from a local file or from a URL.\n\n```python\n#csv\ndf = op.load.csv(\"../examples/data/foo.csv\")\n\n#json\ndf = op.load.json(\"../examples/data/foo.json\")\n\n# using a url\ndf = op.load.json(\"https://raw.githubusercontent.com/hi-primus/optimus/develop-23.5/examples/data/foo.json\")\n\n# parquet\ndf = op.load.parquet(\"../examples/data/foo.parquet\")\n\n# ...or anything else\ndf = op.load.file(\"../examples/data/titanic3.xls\")\n```\n\nAlso, you can load data from Oracle, Redshift, MySQL and Postgres databases.\n\n## Saving Data\n\n```python\n#csv\ndf.save.csv(\"data/foo.csv\")\n\n# json\ndf.save.json(\"data/foo.json\")\n\n# parquet\ndf.save.parquet(\"data/foo.parquet\")\n```\n\nYou can also save data to oracle, redshift, mysql and postgres.\n\n## Create dataframes\n\nAlso, you can create a dataframe from scratch\n```python\ndf = op.create.dataframe({\n    'A': ['a', 'b', 'c', 'd'],\n    'B': [1, 3, 5, 7],\n    'C': [2, 4, 6, None],\n    'D': ['1980/04/10', '1980/04/10', '1980/04/10', '1980/04/10']\n})\n```\n\nUsing `display` you have a beautiful way to show your data with extra information like column number, column data type and marked white spaces.\n\n```python\ndisplay(df)\n```\n![](https://github.com/hi-primus/optimus/tree/develop-23.5/readme/images/table.png)\n\n## Cleaning and Processing\n \nOptimus was created to make data cleaning a breeze. The API was designed to be super easy to newcomers and very familiar for people that comes from Pandas.\nOptimus expands the standard DataFrame functionality adding `.rows` and `.cols` accessors.\n\nFor example you can load data from a url, transform and apply some predefined cleaning functions:\n\n```python\nnew_df = df\\\n    .rows.sort(\"rank\", \"desc\")\\\n    .cols.lower([\"names\", \"function\"])\\\n    .cols.date_format(\"date arrival\", \"yyyy/MM/dd\", \"dd-MM-YYYY\")\\\n    .cols.years_between(\"date arrival\", \"dd-MM-YYYY\", output_cols=\"from arrival\")\\\n    .cols.normalize_chars(\"names\")\\\n    .cols.remove_special_chars(\"names\")\\\n    .rows.drop(df[\"rank\"]>8)\\\n    .cols.rename(\"*\", str.lower)\\\n    .cols.trim(\"*\")\\\n    .cols.unnest(\"japanese name\", output_cols=\"other names\")\\\n    .cols.unnest(\"last position seen\", separator=\",\", output_cols=\"pos\")\\\n    .cols.drop([\"last position seen\", \"japanese name\", \"date arrival\", \"cybertronian\", \"nulltype\"])\n```\n\n# Need help? 🛠️\n\n## Feedback\n\nFeedback is what drive Optimus future, so please take a couple of minutes to help shape the Optimus' Roadmap:  http://bit.ly/optimus_survey \n\nAlso if you want to a suggestion or feature request use https://github.com/hi-primus/optimus/issues\n\n## Troubleshooting\n\nIf you have issues, see our [Troubleshooting Guide](https://github.com/hi-primus/optimus/tree/develop-23.5/troubleshooting.md)\n\n# Contributing to Optimus 💡\n\nContributions go far beyond pull requests and commits. We are very happy to receive any kind of contributions  \nincluding: \n \n* [Documentation](https://docs.hi-optimus.com/en/latest/) updates, enhancements, designs, or bugfixes. \n* Spelling or grammar fixes. \n* README.md corrections or redesigns. \n* Adding unit, or functional [tests](https://github.com/hi-primus/optimus/tree/develop-23.5/tests)  \n* Triaging GitHub issues -- especially determining whether an issue still persists or is reproducible.\n* [Blogging, speaking about, or creating tutorials](https://hioptimus.com/category/blog/) about Optimus and its many features. \n* Helping others on our official chats\n \n# Backers and Sponsors\n\nBecome a [backer](https://opencollective.com/optimus#backer) or a [sponsor](https://opencollective.com/optimus#sponsor) and get your image on our README on Github with a link to your site. \n\n[![OpenCollective](https://opencollective.com/optimus/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/optimus/sponsors/badge.svg)](#sponsors)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F356:149227:181729:5E679A:6AB92B96"},"text_sha256":"744e06b998f999b5d0a63085841a50a2c2d12ee5de01619db827125b4b074293"},{"path":"Readme.txt","size":308,"blob_sha":"33e98a5d9f67fabf1a34263a70e4d41a5e151c08","priority":0,"status":200,"text":"Optimus is the missing framework to profile, clean, process and do ML in a distributed fashion using Python.\n\n- Requirements:\n\n* Python>=3.7\n\n- Installation:\n\nIn your terminal just type:\ndo\n$ pip install pyoptimus\n\n- Contributors:\n\n* Core Team: Argenis León and Luis Aguirre.\n\n- License:\n\nApache 2.0 © Iron","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"62F2:375F4:17C80F:5E1902:6AB92B97"},"text_sha256":"ad3cca86295fce1861855c3d648aad632f33774dc518a231d2d23f4c45ea17ee"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"o19s/elasticsearch-learning-to-rank","input_row":{"repository":"o19s/elasticsearch-learning-to-rank","url":"https://github.com/o19s/elasticsearch-learning-to-rank","name":"elasticsearch-learning-to-rank","owner":"o19s","description":"Plugin to integrate Learning to Rank (aka machine learning for better relevance) with Elasticsearch","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1521,"issues":271,"created_at":"2016-12-25T03:19:01Z","updated_at":"2026-08-20T20:57:09Z","first_commit_at":"2016-12-25T03:17:36Z","last_commit_at":"2026-06-16T06:17:21Z","activity_months":113.67,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:36.079Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"o19s/elasticsearch-learning-to-rank","visibility":"public","created_at":"2016-12-25T03:19:01Z","updated_at":"2026-08-20T20:57:09Z","private":false,"fork":false,"archived":false,"stargazers_count":1521,"open_issues_count":39,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2218","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17CFB90:1BF46CD:6AB92B98"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2217","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0810:72727:17B0CC1:1BD5A6D:6AB92B98"},"commit":{"sha":"e28966eb9dfd420d74f08e9cdf0b0a6a1dd9cccb","url":"https://github.com/o19s/elasticsearch-learning-to-rank/commit/e28966eb9dfd420d74f08e9cdf0b0a6a1dd9cccb","date":"2018-05-21T19:23:10Z","author_date":"2018-05-21T19:23:10Z","committer_date":"2018-05-21T19:23:10Z","tree_sha":"1cf6fa9450b91cd9e0157767c9c7cddbf124041e","message_first_line":"Selective features for models at query time"},"tree_request_status":200,"tree_rate":{"github_remaining":"2216","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0891:37D6E2:18127F9:1C37893:6AB92B98"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3779,"blob_sha":"dc3396d868ce17f58724ae2f590a13d28e769417","priority":0}],"documents":[{"path":"README.md","size":3779,"blob_sha":"dc3396d868ce17f58724ae2f590a13d28e769417","priority":0,"status":200,"text":"[![CircleCI](https://circleci.com/gh/o19s/elasticsearch-learning-to-rank.svg?style=svg)](https://circleci.com/gh/o19s/elasticsearch-learning-to-rank)\n\nThe Elasticsearch Learning to Rank plugin uses machine learning to improve search relevance ranking. It's powering search at places like Wikimedia Foundation and Snagajob!\n\n# What this plugin does...\n\nThis plugin:\n\n- Allows you to store features (Elasticsearch query templates) in Elasticsearch\n- Logs features scores (relevance scores) to create a training set for offline model development\n- Stores linear, xgboost, or ranklib ranking models in Elasticsearch that use features you've stored\n- Ranks search results using a stored model\n\n## Where's the docs?\n\nWe recommend taking time to [read the docs](http://elasticsearch-learning-to-rank.readthedocs.io). There's quite a bit of detailed information about learning to rank basics and how this plugin can ease learning to rank development.\n\n## I want to jump in!\n\nIf you want to just jump in, go straight to the demo. The demo uses [Ranklib](https://sourceforge.net/p/lemur/wiki/RankLib/), a relatively straightforward Java Learning to Rank library, to train models. Follow the directions in the [demo README](demo/README.md), edit code, and have fun!\n\n# Installing\n\nSee the full list of [prebuilt versions](http://es-learn-to-rank.labs.o19s.com). If you don't see a version available, see the link below for building or file a request via [issues](https://github.com/o19s/elasticsearch-learning-to-rank/issues).\n\nTo install, you'd run a command such as:\n\n`./bin/elasticsearch-plugin install http://es-learn-to-rank.labs.o19s.com/ltr-1.0.0-es6.1.2.zip`\n\n(It's expected you'll confirm some security exceptions, you can pass `-b` to `elasticsearch-plugin` to automatically install)\n\nIf you already are running Elasticsearch, don't forget to restart!\n\n## Know issues\nAs any other piece of software, this plugin is not exempt from issues. Please read the [known issues](KNOWN_ISSUES.md) to learn about the current issues that we are aware of. This file might include workarounds to mitigate them when possible.\n\n# Development\n\nNotes if you want to dig into the code or build for a version there's no build for.\n\n### 1. Build with Gradle Wrapper\n\n```\n./gradlew clean check\n```\n\nThis runs the tasks in the `esplugin` gradle plugin that builds, tests, generates a Elasticsearch plugin zip file.\n\n### 2. Install with `./bin/elasticsearch-plugin`\n\n```\n./bin/elasticsearch-plugin install file:///path/to/project/build/distributions/ltr-<LTR-VER>-es<ES-VER>.zip\n```\n\n# Who built this?\n- [Initially developed](http://opensourceconnections.com/blog/2017/02/14/elasticsearch-learning-to-rank/) at [OpenSource Connections](http://opensourceconnections.com).\n- Significant contributions by [Wikimedia Foundation](https://wikimediafoundation.org/wiki/Home), [Snagajob Engineering](https://engineering.snagajob.com/), and [Bonsai](https://bonsai.io/)\n- Thanks to [Jettro Coenradie](https://amsterdam.luminis.eu/author/jettro/) for porting to ES 6.1\n\n## Other Acknowledgments & Stuff To Read\n- Bloomberg's [Learning to Rank work for Solr](https://issues.apache.org/jira/browse/SOLR-8542)\n- Our Berlin Buzzwords Talk, [We built an Elasticsearch Learning to Rank plugin. Then came the hard part](https://berlinbuzzwords.de/17/session/we-built-elasticsearch-learning-rank-plugin-then-came-hard-part)\n- Blog article on [How is Search Different from Other Machine Learning Problems](http://opensourceconnections.com/blog/2017/08/03/search-as-machine-learning-prob/)\n- Also check out our other relevance/search thingies: book [Relevant Search](http://manning.com/books/relevant-search), projects [Elyzer](http://github.com/o19s/elyzer), [Splainer](http://splainer.io), and [Quepid](http://quepid.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96DA:18233:17A7EF:5DF6C9:6AB92B99"},"text_sha256":"b883af7df79ecfcd11b549b735647addc8018f931e6f84db5e811c7a06915e03"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2215","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0811:767EB:17F8F5B:1C1E3AA:6AB92B99"},"commit":{"sha":"9409a6c72cc2707ef6b215ef8b81a377abecfcd5","url":"https://github.com/o19s/elasticsearch-learning-to-rank/commit/9409a6c72cc2707ef6b215ef8b81a377abecfcd5","date":"2026-06-16T06:17:21Z","author_date":"2026-06-16T06:17:21Z","committer_date":"2026-06-16T06:17:21Z","tree_sha":"168b98a712ef329b0a409e834467638db5332014","message_first_line":"Support Elasticsearch 9.3.5 (#526)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2214","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AB:7307A:17BF446:1BE3E68:6AB92B99"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4614,"blob_sha":"19b339d8db43d58f7eff27fe504d9255c2a35875","priority":0}],"documents":[{"path":"README.md","size":4614,"blob_sha":"19b339d8db43d58f7eff27fe504d9255c2a35875","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.com/o19s/elasticsearch-learning-to-rank.svg?branch=master)](https://travis-ci.com/o19s/elasticsearch-learning-to-rank)\n\nThe Elasticsearch Learning to Rank plugin uses machine learning to improve search relevance ranking. It's powering search at places like Wikimedia Foundation and Snagajob!\n\n# What this plugin does...\n\nThis plugin:\n\n- Allows you to store features (Elasticsearch query templates) in Elasticsearch\n- Logs features scores (relevance scores) to create a training set for offline model development\n- Stores linear, xgboost, or ranklib ranking models in Elasticsearch that use features you've stored\n- Ranks search results using a stored model\n\n## Where's the docs?\n\nWe recommend taking time to [read the docs](http://elasticsearch-learning-to-rank.readthedocs.io). There's quite a bit of detailed information about learning to rank basics and how this plugin can ease learning to rank development. \n\nYou can also participate in regular [trainings](http://opensourceconnections.com/events/training) on Elasticsearch Learning to Rank, which support the free work done on this plugin.\n\n## I want to jump in!\n\nThe demo lives in another repo now, [Hello LTR](https://github.com/o19s/hello-ltr) and it has both ES and Solr example. Follow the directions for Elasticsearch in the README to set up the environment and start with the [notebooks/elasticsearch/tmdb/hello-ltr.ipynb](https://github.com/o19s/hello-ltr/blob/master/notebooks/elasticsearch/tmdb/hello-ltr%20(ES).ipynb). Have fun!\n\n# Installing\n\nSee the full list of [prebuilt versions](https://github.com/o19s/elasticsearch-learning-to-rank/releases) and select the version that matches your Elasticsearch version. If you don't see a version available, see the link below for building or file a request via [issues](https://github.com/o19s/elasticsearch-learning-to-rank/issues).\n\nTo install, you'd run a command like this but replacing with the appropriate prebuilt version zip:\n\n`./bin/elasticsearch-plugin install https://github.com/o19s/elasticsearch-learning-to-rank/releases/download/v1.5.4-es7.11.2/ltr-plugin-v1.5.4-es7.11.2.zip`\n\n(It's expected you'll confirm some security exceptions, you can pass `-b` to `elasticsearch-plugin` to automatically install)\n\nIf you already are running Elasticsearch, don't forget to restart!\n\n# Known issues\nAs any other piece of software, this plugin is not exempt from issues. Please read the [known issues](KNOWN_ISSUES.md) to learn about the current issues that we are aware of. This file might include workarounds to mitigate them when possible.\n\n# Build and Deploy Locally\n\nNotes if you want to dig into the code or build for a version there's no build for, please feel free to run the build and installation process yourself:\n\n```\n./gradlew clean check\n./bin/elasticsearch-plugin install file:///path/to/elasticsearch-learning-to-rank/build/distributions/ltr-<LTR-VER>-es<ES-VER>.zip\n```\n\n# How to Contribute\n\nFor more information on helping us out (we need your help!), developing with the plugin, creating docs, etc please read [CONTRIBUTING.md](/CONTRIBUTING.md).\n\n## Elastic Release Support\nWe do our best to officially support `*.*.1` releases of Elasticsearch.  If you have a need for \"dot-oh\" compatibility or a version we don't support please consider submitting a PR.\n\n \n# Who built this?\n- [Initially developed](http://opensourceconnections.com/blog/2017/02/14/elasticsearch-learning-to-rank/) at [OpenSource Connections](http://opensourceconnections.com).\n- Significant contributions by [Wikimedia Foundation](https://wikimediafoundation.org/wiki/Home), [Snagajob Engineering](https://engineering.snagajob.com/), [Bonsai](https://bonsai.io/), and [Yelp Engineering](https://engineeringblog.yelp.com/)\n- Thanks to [Jettro Coenradie](https://amsterdam.luminis.eu/author/jettro/) for porting to ES 6.1\n\n## Other Acknowledgments & Stuff To Read\n- Bloomberg's [Learning to Rank work for Solr](https://issues.apache.org/jira/browse/SOLR-8542)\n- Our Berlin Buzzwords Talk, [We built an Elasticsearch Learning to Rank plugin. Then came the hard part](https://2017.berlinbuzzwords.de/17/session/we-built-elasticsearch-learning-rank-plugin-then-came-hard-part.html)\n- Blog article on [How is Search Different from Other Machine Learning Problems](http://opensourceconnections.com/blog/2017/08/03/search-as-machine-learning-prob/)\n- Also check out our other relevance/search thingies: book [Relevant Search](http://manning.com/books/relevant-search), projects [Elyzer](http://github.com/o19s/elyzer), [Splainer](http://splainer.io), and [Quepid](http://quepid.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"094E:375F4:17C81F:5E1957:6AB92B99"},"text_sha256":"e8aefcf8505b61852551c09d1485add7c7e44230dd8d28d86431a6a8ffa3df04"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ModelOriented/DALEX","input_row":{"repository":"ModelOriented/DALEX","url":"https://github.com/ModelOriented/DALEX","name":"DALEX","owner":"ModelOriented","description":"moDel Agnostic Language for Exploration and eXplanation","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1487,"issues":415,"created_at":"2018-02-18T03:24:12Z","updated_at":"2026-09-25T14:41:58Z","first_commit_at":"2018-02-18T03:24:13Z","last_commit_at":"2026-07-15T11:00:32Z","activity_months":100.83,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:38.670Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ModelOriented/DALEX","visibility":"public","created_at":"2018-02-18T03:24:12Z","updated_at":"2026-09-25T14:41:58Z","private":false,"fork":false,"archived":false,"stargazers_count":1487,"open_issues_count":32,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2213","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0916:70FF5:17D8CBE:1BFD815:6AB92B9A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2212","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:17DC0E4:1C01307:6AB92B9B"},"commit":{"sha":"64211927a51d28b20e4b8bc4ff94b2ec13bd60b9","url":"https://github.com/ModelOriented/DALEX/commit/64211927a51d28b20e4b8bc4ff94b2ec13bd60b9","date":"2018-05-20T20:03:05Z","author_date":"2018-05-20T20:03:05Z","committer_date":"2018-05-20T20:03:05Z","tree_sha":"1aa933b724a5e273c14d2893331003e2cc75cf53","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2211","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:1815BA7:1C3A706:6AB92B9B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2853,"blob_sha":"f0285cf8ff3a8d797ae44c1a0606f4d58ed6b2a4","priority":0}],"documents":[{"path":"README.md","size":2853,"blob_sha":"f0285cf8ff3a8d797ae44c1a0606f4d58ed6b2a4","priority":0,"status":200,"text":"# DALEX <img src=\"man/figures/logo.png\" align=\"right\" />\n\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/DALEX)](https://cran.r-project.org/package=DALEX)\n[![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/DALEX?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/DALEX)\n[![Build Status](https://api.travis-ci.org/pbiecek/DALEX.png)](https://travis-ci.org/pbiecek/DALEX)\n[![Coverage\nStatus](https://img.shields.io/codecov/c/github/pbiecek/DALEX/master.svg)](https://codecov.io/github/pbiecek/DALEX?branch=master)\n\nDescriptive mAchine Learning EXplanations\n\n## DALEX Stories\n\n* [A gentle introduction to DALEX with examples](https://pbiecek.github.io/DALEX_docs/)\n* [How to use DALEX with caret](https://rawgithub.com/pbiecek/DALEX_docs/master/vignettes/DALEX_caret.html)\n* [How to use DALEX with mlr](https://rawgithub.com/pbiecek/DALEX_docs/master/vignettes/DALEX_mlr.html)\n* [How to use DALEX with xgboost package](https://rawgithub.com/pbiecek/DALEX_docs/master/vignettes/DALEX_and_xgboost.html)\n\n* [Talk about DALEX at Complexity Institute / NTU February 2018](https://github.com/pbiecek/pbiecek.github.io/blob/master/Presentations/DALEX_at_NTU_2018.pdf)\n* [Talk about DALEX at SER / WTU April 2018](https://github.com/pbiecek/Talks/blob/master/2018/SER_DALEX.pdf)\n\n* [How to use DALEX for teaching. Part 1](https://rawgithub.com/pbiecek/DALEX_docs/master/vignettes/DALEX_teaching.html)\n\n## Install\n\nFrom GitHub\n\n```{r}\n# dependencies\ndevtools::install_github(\"MI2DataLab/factorMerger\")\ndevtools::install_github(\"pbiecek/breakDown\")\n\n# DALEX package\ndevtools::install_github(\"pbiecek/DALEX\")\n```\n\nor from CRAN\n\n```{r}\ninstall.packages(\"DALEX\")\n```\n\n## Intro\n\nMachine Learning models are widely used and have various applications in classification or regression tasks. Due to increasing computational power, availability of new data sources and new methods, ML models are more and more complex. Models created with techniques like boosting, bagging of neural networks are true black boxes. It is hard to trace the link between input variables and model outcomes. They are use because of high performance, but lack of interpretability is one of their weakest sides.\n\nIn many applications we need to know, understand or prove how input variables are used in the model and what impact do they have on final model prediction. DALEX is a set of tools that help to understand how complex models are working.\n\n![DALEX_intro](misc/DALEX_intro.png)\n\n\n## Single Variable\n\n![DALEX_single_variable](misc/DALEX_single_variable.png)\n\n## Single Prediction\n\n![DALEX_single_prediction](misc/DALEX_single_prediction.png)\n\n## Variable Drop-out / Importance\n\n![DALEX_variable_dropout](misc/DALEX_variable_dropout.png)\n\n\n## Acknowledgments\n\nWork on this package was financially supported by the 'NCN Opus grant 2016/21/B/ST6/02176'.\n    \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E92:A58F2:175ED2:5DAF6B:6AB92B9B"},"text_sha256":"7ca1dd5a28e8ae77c5c6e4fcada90cccfbee4a1bb00a811df740688715688135"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2210","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:180E23B:1C3348B:6AB92B9C"},"commit":{"sha":"c4791abc66fd39fbe9196ac3f1e5be58bf0e732d","url":"https://github.com/ModelOriented/DALEX/commit/c4791abc66fd39fbe9196ac3f1e5be58bf0e732d","date":"2026-01-20T01:17:58Z","author_date":"2026-01-20T01:17:58Z","committer_date":"2026-01-20T01:17:58Z","tree_sha":"3da9226d0dd20748de67aab1cfee466add8a871b","message_first_line":"[python] init dev version"},"tree_request_status":200,"tree_rate":{"github_remaining":"2209","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17D6ADC:1BFB004:6AB92B9C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10625,"blob_sha":"30c61db453a0ce752c2ee2e9e56f195aba3afc6c","priority":0}],"documents":[{"path":"README.md","size":10625,"blob_sha":"30c61db453a0ce752c2ee2e9e56f195aba3afc6c","priority":0,"status":200,"text":"# moDel Agnostic Language for Exploration and eXplanation <img src=\"man/figures/logo.png\" align=\"right\" width=\"150\"/>\n\n[![R build status](https://github.com/ModelOriented/DALEX/workflows/R-CMD-check/badge.svg)](https://github.com/ModelOriented/DALEX/actions?query=workflow%3AR-CMD-check)\n[![Coverage\nStatus](https://img.shields.io/codecov/c/github/ModelOriented/DALEX/master.svg)](https://codecov.io/github/ModelOriented/DALEX?branch=master)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/DALEX)](https://cran.r-project.org/package=DALEX)\n[![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/DALEX?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/DALEX)\n[![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone)\n\n[![Python-check](https://github.com/ModelOriented/DALEX/workflows/Python-check/badge.svg)](https://github.com/ModelOriented/DALEX/actions?query=workflow%3APython-check)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/dalex.svg)](https://pypi.org/project/dalex/)\n[![PyPI version](https://badge.fury.io/py/dalex.svg)](https://badge.fury.io/py/dalex)\n[![Downloads](https://pepy.tech/badge/dalex)](https://pepy.tech/project/dalex)\n\n\n## Overview\n\nUnverified black box model is the path to the failure. Opaqueness leads to distrust. Distrust leads to ignoration. Ignoration leads to rejection.\n\nThe `DALEX` package xrays any model and helps to explore and explain its behaviour, helps to understand how complex models are working. The main function `explain()` creates a wrapper around a predictive model. Wrapped models may then be explored and compared with a collection of local and global explainers. Recent developents from the area of Interpretable Machine Learning/eXplainable Artificial Intelligence.\n\nThe philosophy behind `DALEX` explanations is described in the [Explanatory Model Analysis](https://pbiecek.github.io/ema/) e-book. The `DALEX` package is a part of [DrWhy.AI](http://DrWhy.AI) universe.\n\nIf you work with `scikit-learn`, `keras`, `H2O`, `tidymodels`, `xgboost`, `mlr` or `mlr3` in R, you may be interested in the [DALEXtra](https://github.com/ModelOriented/DALEXtra) package, which is an extension of `DALEX` with easy to use `explain_*()` functions for models created in these libraries.\n\n**[Additional overview of the dalex Python package is available.](https://github.com/ModelOriented/DALEX/tree/master/python/dalex)**\n\n<p align=\"center\">\n<a href=\"https://pbiecek.github.io/ema/introduction.html#bookstructure\"><img src=\"https://github.com/ModelOriented/DALEX/raw/master/misc/DALEXpiramide.png\" width=\"800\"/><\/a>\n<\/p>\n\n## Installation\n\nThe `DALEX` **R** package can be installed from [CRAN](https://cran.r-project.org/package=DALEX)\n\n```r\ninstall.packages(\"DALEX\")\n```\n\nThe `dalex` **Python** package is available on [PyPI](https://pypi.org/project/dalex/) and [conda-forge](https://anaconda.org/conda-forge/dalex)\n\n```console\npip install dalex -U\n\nconda install -c conda-forge dalex\n```\n\n## Learn more\n\nMachine Learning models are widely used and have various applications in classification or regression tasks. Due to increasing computational power, availability of new data sources and new methods, ML models are more and more complex. Models created with techniques like boosting, bagging of neural networks are true black boxes. It is hard to trace the link between input variables and model outcomes. They are use because of high performance, but lack of interpretability is one of their weakest sides.\n\nIn many applications we need to know, understand or prove how input variables are used in the model and what impact do they have on final model prediction. `DALEX` is a set of tools that help to understand how complex models are working.\n\n<p align=\"center\">\n<a href=\"https://github.com/ModelOriented/DALEX/raw/master/misc/cheatsheet_local_explainers.png\"><img src=\"https://github.com/ModelOriented/DALEX/raw/master/misc/cheatsheet_local_explainers.png\" width=\"500\"/><\/a>\n<\/p>\n\n## Resources\n\n* [Gentle introduction to DALEX with examples in R and Python](https://pbiecek.github.io/ema/)\n\n### R package\n\n* [Introduction to Responsible Machine Learning @ useR! 2021](https://github.com/MI2DataLab/ResponsibleML-UseR2021)\n* DALEX + mlr3 [@ BioColl 2021](https://github.com/pbiecek/BioColl2021) & [@ Open-Forest-Training 2021](https://github.com/pbiecek/Open-Forest-Training-2021/)\n* [Materials from Explanatory Model Analysis Workshop @ eRum 2020](https://github.com/pbiecek/XAIatERUM2020), [cheatsheet](https://github.com/pbiecek/XAIatERUM2020/blob/master/Cheatsheet.pdf)\n* How to use DALEX with: [keras](https://rawgit.com/pbiecek/DALEX_docs/master/vignettes/DALEX_and_keras.html), [parsnip](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_parsnip.html), [caret](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_caret.html), [mlr](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_mlr.html), [H2O](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_h2o.html), [xgboost](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_and_xgboost.html)\n* [Compare GBM models created in different languages](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/Multilanguages_comparision.html): gbm and CatBoost in R / gbm in h2o / gbm in Python\n* [DALEX for fraud detection](https://rawgit.com/pbiecek/DALEX_docs/master/vignettes/DALEXverse%20and%20fraud%20detection.html)\n* [DALEX for teaching](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/DALEX_teaching.html)\n* [XAI in the jungle of competing frameworks for machine learning](https://medium.com/@ModelOriented/xai-in-the-jungle-of-competing-frameworks-for-machine-learning-fa6e96a99644)\n\n### Python package\n\n* Introduction to the `dalex` package: [Titanic: tutorial and examples](https://dalex.drwhy.ai/python-dalex-titanic.html)\n* Key features explained: [FIFA20: explain default vs tuned model with dalex](https://dalex.drwhy.ai/python-dalex-fifa.html)\n* How to use dalex with: [xgboost](https://dalex.drwhy.ai/python-dalex-xgboost.html), [tensorflow](https://dalex.drwhy.ai/python-dalex-tensorflow.html)\n* More explanations: [residuals, shap, lime](https://dalex.drwhy.ai/python-dalex-new.html)\n* Introduction to the [Fairness module in dalex](https://dalex.drwhy.ai/python-dalex-fairness.html)\n* Introduction to the [Arena: interactive dashboard for model exploration](https://dalex.drwhy.ai/python-dalex-arena.html)\n* Code in the form of [jupyter notebook](https://github.com/ModelOriented/DALEX-docs/tree/master/jupyter-notebooks)\n* Changelog: [NEWS](https://github.com/ModelOriented/DALEX/blob/master/python/dalex/NEWS.md)\n\n### Talks about DALEX\n\n* [Talk with your model! at USeR 2020](https://www.youtube.com/watch?v=9WWn5ew8D8o)\n* [Talk about DALEX at Complexity Institute / NTU February 2018](https://github.com/pbiecek/Talks/blob/master/2018/DALEX_at_NTU_2018.pdf)\n* [Talk about DALEX at SER / WTU April 2018](https://github.com/pbiecek/Talks/blob/master/2018/SER_DALEX.pdf)\n* [Talk about DALEX at STWUR May 2018 (in Polish)](https://github.com/STWUR/eRementarz-29-05-2018)\n* [Talk about DALEX at BayArea 2018](https://github.com/pbiecek/Talks/blob/master/2018/DALEX_BayArea.pdf)\n* [Talk about DALEX at PyData Warsaw 2018](https://github.com/pbiecek/Talks/blob/master/2018/DALEX_PyDataWarsaw2018.pdf)\n\n## Citation\n\nIf you use `DALEX` in R or `dalex` in Python, please cite our JMLR papers:\n\n```html\n@article{JMLR:v19:18-416,\n  author  = {Przemyslaw Biecek},\n  title   = {DALEX: Explainers for Complex Predictive Models in R},\n  journal = {Journal of Machine Learning Research},\n  year    = {2018},\n  volume  = {19},\n  number  = {84},\n  pages   = {1-5},\n  url     = {http://jmlr.org/papers/v19/18-416.html}\n}\n\n@article{JMLR:v22:20-1473,\n  author  = {Hubert Baniecki and\n             Wojciech Kretowicz and\n             Piotr Piatyszek and \n             Jakub Wisniewski and \n             Przemyslaw Biecek},\n  title   = {dalex: Responsible Machine Learning \n             with Interactive Explainability and Fairness in Python},\n  journal = {Journal of Machine Learning Research},\n  year    = {2021},\n  volume  = {22},\n  number  = {214},\n  pages   = {1-7},\n  url     = {http://jmlr.org/papers/v22/20-1473.html}\n}\n```\n\n## Why\n\n76 years ago Isaac Asimov devised [Three Laws of Robotics](https://en.wikipedia.org/wiki/Three_Laws_of_Robotics): 1) a robot may not injure a human being, 2) a robot must obey the orders given it by human beings and 3) A robot must protect its own existence. These laws impact discussion around [Ethics of AI](https://en.wikipedia.org/wiki/Ethics_of_artificial_intelligence). Today’s robots, like cleaning robots, robotic pets or autonomous cars are far from being conscious enough to be under Asimov’s ethics.\n\nToday we are surrounded by complex predictive algorithms used for decision making. Machine learning models are used in health care, politics, education, judiciary and many other areas. Black box predictive models have far larger influence on our lives than physical robots. Yet, applications of such models are left unregulated despite many examples of their potential harmfulness. See *Weapons of Math Destruction* by Cathy O'Neil for an excellent overview of potential problems.\n\nIt's clear that we need to control algorithms that may affect us. Such control is in our civic rights. Here we propose three requirements that any predictive model should fulfill.\n\n-\t**Prediction's justifications**. For every prediction of a model one should be able to understand which variables affect the prediction and how strongly. Variable attribution to final prediction.\n-\t**Prediction's speculations**. For every prediction of a model one should be able to understand how the model prediction would change if input variables were changed. Hypothesizing about what-if scenarios.\n-\t**Prediction's validations** For every prediction of a model one should be able to verify how strong are evidences that confirm this particular prediction.\n\nThere are two ways to comply with these requirements.\nOne is to use only models that fulfill these conditions by design. White-box models like linear regression or decision trees. In many cases the price for transparency is lower performance.\nThe other way is to use approximated explainers – techniques that find only approximated answers, but work for any black box model. Here we present such techniques.\n\n\n## Acknowledgments\n\nWork on this package was financially supported by the `NCN Opus grant 2016/21/B/ST6/02176` and `NCN Opus grant 2017/27/B/ST6/01307`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D066:40B0C:17DD9B:5E2E3D:6AB92B9D"},"text_sha256":"c3e7260f0cdba941eb9768e6a2c7a29e3f45b49e511bec454fa2a648c3f9ab1b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"qupath/qupath","input_row":{"repository":"qupath/qupath","url":"https://github.com/qupath/qupath","name":"qupath","owner":"qupath","description":"QuPath - Open-source bioimage analysis for research","language":"Java","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1451,"issues":930,"created_at":"2016-08-28T14:31:41Z","updated_at":"2026-09-27T13:33:58Z","first_commit_at":"2016-08-28T14:31:41Z","last_commit_at":"2026-09-23T15:38:56Z","activity_months":120.83,"ai_ml_match_topics":"machine-learning; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:42.179Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"qupath/qupath","visibility":"public","created_at":"2016-08-28T14:31:41Z","updated_at":"2026-09-27T13:33:58Z","private":false,"fork":false,"archived":false,"stargazers_count":1451,"open_issues_count":36,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2208","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0812:78367:1815DC9:1C3A983:6AB92B9E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2207","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D4:73962:17DA5E5:1BFEE1C:6AB92B9E"},"commit":{"sha":"deb3bf7ddc964cd24f015f78f55cb56e07fee360","url":"https://github.com/qupath/qupath/commit/deb3bf7ddc964cd24f015f78f55cb56e07fee360","date":"2018-05-18T15:28:43Z","author_date":"2018-05-18T15:28:43Z","committer_date":"2018-05-18T15:28:43Z","tree_sha":"cc4f6667dee8db4408d2d91a2dfe2667d1a0e6b3","message_first_line":"Project entries now shown in insertion order"},"tree_request_status":200,"tree_rate":{"github_remaining":"2206","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081E:35C5DA:17AB345:1BCF700:6AB92B9E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3681,"blob_sha":"ec9138535f32ee41d541183f4d82f34ae51c33e9","priority":0}],"documents":[{"path":"README.md","size":3681,"blob_sha":"ec9138535f32ee41d541183f4d82f34ae51c33e9","priority":0,"status":200,"text":"QuPath\n======\n\nQuPath is open source software for whole slide image analysis and digital pathology.\n\nQuPath has been developed as a research tool at Queen's University Belfast.  It offers a wide range of functionality, including:\n\n* extensive tools for annotation and visualization\n* workflows for both IHC and H&E analysis\n* novel algorithms for common tasks, e.g. cell segmentation, Tissue microarray dearraying\n* interactive machine learning, e.g. for cell and texture classification\n* an object-based hierarchical data model, with scripting support\n* extensibility, to add new features or support for different image sources\n* easy integration with other tools, e.g. MATLAB and ImageJ\n\nAll in all, QuPath aims to provide researchers with a new set of tools to help with bioimage analysis in a way that is both user- and developer-friendly.\n\nQuPath is free and open source, using GPLv3.\n\nTo download a version of QuPath to install, go to the [Latest Releases](https://github.com/qupath/qupath/releases/latest) page.\n\nFor documentation and more information, see the [QuPath Wiki](https://go.qub.ac.uk/qupath-docs)\n\nCopyright 2014-2016 The Queen's University of Belfast, Northern Ireland\n\n![Image](https://raw.githubusercontent.com/wiki/qupath/qupath/images/qupath_demo.jpg)\n\n\n----\n\n#### Design, implementation & documentation\n* Pete Bankhead\n\n#### Additional code & testing\n* Jose Fernandez\n\n#### Group leaders\n* Prof Peter Hamilton\n* Prof Manuel Salto-Tellez\n\n#### Project funding\nThe QuPath software has been developed as part of projects that have received funding from:\n\n* Invest Northern Ireland (RDO0712612)\n* Cancer Research UK Accelerator (C11512/A20256)\n\n#### Libraries used within QuPath\nTo see a list of third-party open source libraries used within QuPath (generated automatically using Maven), see THIRD-PARTY.txt.\n\nFull licenses and copyright notices for third-party dependencies are also included for each relevant submodule inside ```src/main/resources/licenses```, and accessible from within within QUPath distributions under *Help &rarr; License*.\n\n\n----\n\n### Building QuPath with Gradle\n\nTo get the latest QuPath, you will need to build it yourself.\n\nBuilding software can be tricky, but hopefully this won't be at all - thanks to [*Gradle*](http://gradle.org).\n\nWhat you need is:\n* A Java JDK (currently only version 8 works)\n* The QuPath source code (you can get it from GitHub with the *Clone or download* button)\n\n> A brief search for `java jdk 8` will most likely find the Oracle JDK.  At the time or writing, the most recent version is 'Java SE Development Kit 8u161'. If you prefer `OpenJDK` then you will likely also need to install `OpenJFX` as well.\n\nYou should then start a command prompt, find your way to the directory containing QuPath, and run\n```\n./gradlew.bat jfxNative\n```\nfor Windows, or\n```\n./gradlew jfxNative\n```\nfor MacOS and Linux.\n\nThis will download Gradle and all its dependencies, so may take a bit of time (and an internet connection) the first time you run it.\n\nAfterwards, you should find QuPath inside the `./build/jfx/native`.  You may then drag it to a more convenient location.\n\n**Congratulations!** You've now built QuPath, and can run it as normal from now on... at least until there is another update, when you can repeat the (hopefully painless) process.\n\n> You can get Gradle itself from http://gradle.org -- but\n[in keeping with the Gradle guidelines](https://docs.gradle.org/current/userguide/gradle_wrapper.html), the *Gradle Wrapper* is included here.  That makes things easier, and you don't need to download Gradle separately.  Here's the [Apache v2 license](https://github.com/gradle/gradle/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E9E:18233:17A854:5DF7FB:6AB92B9D"},"text_sha256":"58ab9fd887d7e5f86915456a079384747d68ed1912ee9616a57fda00f614ad59"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2205","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:18673B9:1C8C606:6AB92B9F"},"commit":{"sha":"8a4fcaa52c1d4d253932de0c1b7863c91b5e69fc","url":"https://github.com/qupath/qupath/commit/8a4fcaa52c1d4d253932de0c1b7863c91b5e69fc","date":"2026-06-27T15:12:14Z","author_date":"2026-06-27T15:12:14Z","committer_date":"2026-06-27T15:12:14Z","tree_sha":"fc59e2ba6889d16c337c6bb875537d193965ec54","message_first_line":"Merge pull request #2153 from petebankhead/gradle"},"tree_request_status":200,"tree_rate":{"github_remaining":"2204","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E5:A9DC0:17C2A25:1BE76C5:6AB92BA0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4460,"blob_sha":"b86bd251c4876907859983d694d8a8712ad3e860","priority":0}],"documents":[{"path":"README.md","size":4460,"blob_sha":"b86bd251c4876907859983d694d8a8712ad3e860","priority":0,"status":200,"text":"[![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fqupath.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/qupath)\n[![Total downloads](https://img.shields.io/github/downloads/qupath/qupath/total?style=flat)](https://github.com/qupath/qupath/releases)\n[![Latest release downloads](https://img.shields.io/github/downloads/qupath/qupath/latest/total?style=flat)](https://github.com/qupath/qupath/releases/latest)\n[![Paper](https://zenodo.org/badge/DOI/10.1038/s41598-017-17204-5.svg)](https://doi.org/10.1038/s41598-017-17204-5)\n[![Twitter](https://img.shields.io/twitter/follow/qupath?style=flat)](http://twitter.com/qupath)\n\n# QuPath\n\n**QuPath is open source software for bioimage analysis**.\n\nFeatures include:\n\n* Lots of tools to annotate and view images, including whole slide & microscopy images\n* Workflows for brightfield & fluorescence image analysis\n* New algorithms for common tasks, including cell segmentation, tissue microarray dearraying\n* Interactive machine learning for object & pixel classification\n* Customization, batch-processing & data interrogation by scripting\n* Easy integration with other tools, including ImageJ\n\nTo **download QuPath**, go to the [Latest Releases](https://github.com/qupath/qupath/releases/latest) page.\n\nFor **documentation**, see [https://qupath.readthedocs.io](https://qupath.readthedocs.io)\n\nFor **help & support**, try [image.sc](https://forum.image.sc/tag/qupath) or the [links here](https://qupath.readthedocs.io/en/stable/docs/starting/help.html)\n\nTo **build QuPath from source** see [here](https://qupath.readthedocs.io/en/stable/docs/reference/building.html).\n\n**If you find QuPath useful in work that you publish, please [_cite the publication_](https://qupath.readthedocs.io/en/stable/docs/intro/citing.html)!**\n\n*QuPath is an academic project intended for research use only.*\n*The software has been made freely available under the terms of the [GPLv3](https://github.com/qupath/qupath/blob/main/LICENSE) in the hope it is useful for this purpose, and to make analysis methods open and transparent.*\n\n\n## Development & support\n\nQuPath is being actively developed at the University of Edinburgh by:\n\n* [Pete Bankhead](https://github.com/petebankhead) (creator)\n* [Alan O'Callaghan](https://github.com/alanocallaghan)\n* [Laura Nicolás-Sáenz](https://github.com/lauranicolass)\n\nwith thanks to past QuPath dev team members:\n\n* [Léo Leplat](https://github.com/Rylern)\n* [Fiona Inglis](https://github.com/finglis)\n* Melvin Gelbard\n* Mahdi Lamb\n\nFor all contributors, see [here](https://github.com/qupath/qupath/graphs/contributors).\n\nThis work is made possible in part thanks to funding from:\n\n* [Wellcome Trust Technology Development Grant](https://wellcome.org/grant-funding/people-and-projects/grants-awarded/qupath-advanced-open-platform-next-generation) (2022-Present)\n* [CZI Essential Open Source Software for Science, Cycle 4](https://chanzuckerberg.com/eoss/proposals/qupath-boosting-bioimage-analysis-for-users-developers/) (2022-2025)\n* [CZI Essential Open Source Software for Science, Cycle 1](https://chanzuckerberg.com/eoss/proposals/qupath-open-source-bioimage-analysis-and-quantitative-pathology/) (2020-2022)\n* Wellcome Trust / University of Edinburgh Institutional Strategic Support Fund (ISSF3) (2019-2020)\n\n\n----\n\n## Background\n\nQuPath was first designed, implemented and documented by Pete Bankhead while at Queen's University Belfast, with additional code and testing by Jose Fernandez.\n\nVersions up to v0.1.2 are copyright 2014-2016 The Queen's University of Belfast, Northern Ireland.\nThese were written as part of projects that received funding from:\n\n* Invest Northern Ireland (RDO0712612)\n* Cancer Research UK Accelerator (C11512/A20256)\n\n\n![Image](https://raw.githubusercontent.com/wiki/qupath/qupath/images/qupath_demo.jpg)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"42BC:2C474:1803E7:5E54B5:6AB92BA1"},"text_sha256":"db00b2526f7529e55733a4802ce748c9fb68bfeb7efd115d56e38957a593e088"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"nilearn/nilearn","input_row":{"repository":"nilearn/nilearn","url":"https://github.com/nilearn/nilearn","name":"nilearn","owner":"nilearn","description":"Machine learning for NeuroImaging in Python","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1441,"issues":2597,"created_at":"2011-01-09T19:02:23Z","updated_at":"2026-09-26T09:10:02Z","first_commit_at":"2011-01-09T19:22:14Z","last_commit_at":"2026-09-26T09:09:54Z","activity_months":188.52000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:45.407Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"nilearn/nilearn","visibility":"public","created_at":"2011-01-09T19:02:23Z","updated_at":"2026-09-26T09:10:02Z","private":false,"fork":false,"archived":false,"stargazers_count":1441,"open_issues_count":278,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2203","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0919:7307A:17BF910:1BE4425:6AB92BA1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2202","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0830:A9DC0:17C2B11:1BE77DA:6AB92BA1"},"commit":{"sha":"ab542008425327dc5657b0da68776769445c15b8","url":"https://github.com/nilearn/nilearn/commit/ab542008425327dc5657b0da68776769445c15b8","date":"2018-05-21T22:27:50Z","author_date":"2018-05-21T22:27:50Z","committer_date":"2018-05-21T22:27:50Z","tree_sha":"0212d4553e0ea95d021b85bf9c4eca84874398fb","message_first_line":"Group scipy imports together to trigger CI"},"tree_request_status":200,"tree_rate":{"github_remaining":"2201","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:17EE1DF:1C13276:6AB92BA2"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1639,"blob_sha":"21100ee6f9c14d6d59a6322080f6837ce01c9b2e","priority":0}],"documents":[{"path":"README.rst","size":1639,"blob_sha":"21100ee6f9c14d6d59a6322080f6837ce01c9b2e","priority":0,"status":200,"text":".. -*- mode: rst -*-\n\nNistats\n=======\n\nNistats is a Python module for fast and easy modeling and statistical analysis\nof functional Magnetic Resonance Imaging data.\n\nIt leverages the `nilearn <http://nilearn.github.io>`_ Python toolbox for\nneuroimaging data manipulation (data downloading, visualization, masking).\n\nThis work is made available by a\n`community <https://github.com/nistats/nistats/graphs/contributors>`_ of \npeople, amongst which the INRIA Parietal Project Team and D'esposito lab at \nBerkeley.\n\nIt is based on developments initiated in the nipy\n`nipy <http://nipy.org/nipy/stable>`_ project.\n\nImportant links\n===============\n\n- Official source code repo: https://github.com/nistats/nistats/\n- HTML documentation (stable release): http://nistats.github.io/\n\nDependencies\n============\n\nThe required dependencies to use the software are:\n\n* Python >= 2.7\n* setuptools\n* Numpy >= 1.8.2\n* SciPy >= 0.14\n* Nibabel >= 2.0.2\n* Nilearn >= 0.2.0\n* Pandas >= 0.13.0\n* Sklearn >= 0.15.0\n* Patsy >= 0.2.0\n\nIf you are using nilearn plotting functionalities or running the\nexamples, matplotlib >= 1.3.1 is required.\n\nIf you want to run the tests, you need nose >= 1.2.1 and coverage >= 3.6.\n\nIf you want to download openneuro datasets Boto3 >= 1.0.0 is required\n\n\nInstall\n=======\n\nIn order to perform the installation, run the following command from the nistats directory::\n\n    python setup.py install --user\n\n\nDevelopment\n===========\n\nCode\n----\n\nGIT\n~~~\n\nYou can check the latest sources with the command::\n\n    git clone git://github.com/nistats/nistats\n\nor if you have write privileges::\n\n    git clone git@github.com:nistats/nistats\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E642:2E8679:17C8D7:5E1789:6AB92BA1"},"text_sha256":"3693a45d918a9368aa45f5980aac52b086fa1748e5542f0e73e859436e522a07"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2200","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0843:2BC4E5:1828A06:1C4D6F7:6AB92BA2"},"commit":{"sha":"dd21c043307904762a73fbcb4f9bd91f37e86bb0","url":"https://github.com/nilearn/nilearn/commit/dd21c043307904762a73fbcb4f9bd91f37e86bb0","date":"2026-06-30T10:56:09Z","author_date":"2026-06-30T10:56:09Z","committer_date":"2026-06-30T10:56:09Z","tree_sha":"28ebc476acdbde140fa35491ede094a570bb2baf","message_first_line":"[MAINT] skip sklearn 1.9.0 to avoid sluggish HTML repr of estimators with many features (#6355)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2199","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17D32E7:1BF8390:6AB92BA3"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5377,"blob_sha":"c1f2384291bc973b8298952477c1f79e1120bffe","priority":0}],"documents":[{"path":"README.rst","size":5377,"blob_sha":"c1f2384291bc973b8298952477c1f79e1120bffe","priority":0,"status":200,"text":".. image:: https://img.shields.io/pypi/v/nilearn.svg\n    :target: https://pypi.org/project/nilearn/\n    :alt: Pypi Package\n\n.. image:: https://img.shields.io/pypi/pyversions/nilearn.svg\n    :target: https://pypi.org/project/nilearn/\n    :alt: PyPI - Python Version\n\n.. image:: https://github.com/nilearn/nilearn/actions/workflows/build-docs.yml/badge.svg\n    :target: https://github.com/nilearn/nilearn/actions/workflows/build-docs.yml\n    :alt: Github Actions Doc Build Status\n\n.. image:: https://github.com/nilearn/nilearn/actions/workflows/test_with_tox.yml/badge.svg?branch=main&event=push\n    :target: https://github.com/nilearn/nilearn/actions/workflows/test_with_tox.yml\n    :alt: Github Actions Test Status\n\n.. image:: https://codecov.io/gh/nilearn/nilearn/graph/badge.svg?token=KpYArSdyXv\n    :target: https://app.codecov.io/gh/nilearn/nilearn\n    :alt: Coverage Status\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8397156.svg\n    :target: https://doi.org/10.5281/zenodo.8397156\n\n.. image:: https://img.shields.io/badge/bluesky-Follow_nilearn-blue?logo=bluesky\n    :target: https://bsky.app/profile/nilearn.bsky.social\n    :alt: Bluesky\n\n.. image:: https://img.shields.io/youtube/channel/subscribers/UCU6BMAi2zOhNFnDkbdevmPw\n    :target: https://www.youtube.com/@nilearnevents5116\n    :alt: YouTube Channel Subscribers\n\n.. image:: https://img.shields.io/mastodon/follow/109669703955432270?domain=https%3A%2F%2Ffosstodon.org%2F\n    :target: https://fosstodon.org/@nilearn\n    :alt: Mastodon\n\n.. image:: https://img.shields.io/discord/711993354929569843\n    :target: https://discord.com/invite/SsQABEJHkZ\n    :alt: Discord\n\nnilearn\n=======\n\nNilearn enables approachable and versatile analyses of brain volumes and surfaces.\nIt provides statistical and machine-learning tools, with instructive documentation & friendly community.\n\nIt supports general linear model (GLM) based analysis\nand leverages the `scikit-learn <https://scikit-learn.org>`_ Python toolbox\nfor multivariate statistics with applications\nsuch as predictive modeling, classification, decoding, or connectivity analysis.\n\nImportant links\n===============\n\n- Official source code repo: https://github.com/nilearn/nilearn/\n- HTML documentation (stable release): https://nilearn.github.io/\n\nInstall\n=======\n\nLatest release\n--------------\n\n**1. Setup a virtual environment**\n\nWe recommend that you install ``nilearn`` in a virtual Python environment,\neither managed with the standard library ``venv`` or with ``conda``\n(see `miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ for instance).\nEither way, create and activate a new python environment.\n\nWith ``venv``:\n\n.. code-block:: bash\n\n    python3 -m venv /<path_to_new_env>\n    source /<path_to_new_env>/bin/activate\n\nWindows users should change the last line to ``\\<path_to_new_env>\\Scripts\\activate.bat``\nin order to activate their virtual environment.\n\nWith ``conda``:\n\n.. code-block:: bash\n\n    conda create -n nilearn python=3.10\n    conda activate nilearn\n\n**2. Install nilearn with pip**\n\nExecute the following command in the command prompt / terminal\nin the proper python environment:\n\n.. code-block:: bash\n\n    python -m pip install nilearn\n\nIf you want to upgrade your current version:\n\n.. code-block:: bash\n\n    python -m pip install --upgrade nilearn\n\nNilearn comes with optional plotting dependencies (matplotlib, plotly).\nIf you want to install matplotlib:\n\n.. code-block:: bash\n\n    python -m pip install 'nilearn[plotting]'\n\nIf you want to install matplotlib and plotly:\n\n.. code-block:: bash\n\n    python -m pip install 'nilearn[plotting, plotly]'\n\nDevelopment version\n-------------------\n\nPlease find all development setup instructions in the\n`contribution guide <https://nilearn.github.io/stable/development.html#setting-up-your-environment>`_.\n\nCheck installation\n------------------\n\nTry importing nilearn in a python / iPython session:\n\n.. code-block:: python\n\n    import nilearn\n\nIf no error is raised, you have installed nilearn correctly.\n\nDrop-in Hours\n=============\n\nThe Nilearn team organizes regular online drop-in hours to answer questions,\ndiscuss feature requests, or have any Nilearn-related discussions. Nilearn\ndrop-in hours occur *every Wednesday from 4pm to 5pm UTC*, and we make sure that at\nleast one member of the core-developer team is available. These events are held\non `Jitsi Meet <https://meet.jit.si/nilearn-drop-in-hours>`_ and are fully open,\nanyone is welcome to join!\nFor more information and ways to engage with the Nilearn team see\n`How to get help <https://nilearn.github.io/stable/development.html#how-to-get-help>`_.\n\nDependencies\n============\n\nThe required dependencies to use the software are listed\nin the file `pyproject.toml <https://github.com/nilearn/nilearn/blob/main/pyproject.toml>`_.\n\nIf you are using nilearn plotting functionalities or running the examples, matplotlib >= 3.8.0 is required.\n\nSome plotting functions in Nilearn support both matplotlib and plotly as plotting engines.\nIn order to use the plotly engine in these functions,\nyou will need to install both plotly and kaleido, which can both be installed with pip and anaconda.\n\nIf you want to run the tests, you need pytest >= 6.0.0 and pytest-cov for coverage reporting.\n\nDevelopment\n===========\n\nDetailed instructions on how to contribute are available at\nhttps://nilearn.github.io/stable/development.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A04:2C474:180407:5E5511:6AB92BA3"},"text_sha256":"f0ead81d5b48ea4ff9c8fd3e8313f6eab5b16d988c388f511cd443635b8befcc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"GoogleCloudPlatform/data-science-on-gcp","input_row":{"repository":"GoogleCloudPlatform/data-science-on-gcp","url":"https://github.com/GoogleCloudPlatform/data-science-on-gcp","name":"data-science-on-gcp","owner":"GoogleCloudPlatform","description":"Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017","language":"Jupyter Notebook","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1431,"issues":104,"created_at":"2017-02-10T16:46:57Z","updated_at":"2026-09-10T15:37:04Z","first_commit_at":"2016-06-07T03:09:43Z","last_commit_at":"2022-12-20T14:54:56Z","activity_months":78.430000000000007,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:48.206Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"GoogleCloudPlatform/data-science-on-gcp","visibility":"public","created_at":"2017-02-10T16:46:57Z","updated_at":"2026-09-10T15:37:04Z","private":false,"fork":false,"archived":false,"stargazers_count":1431,"open_issues_count":26,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2198","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:183A41B:1C5F01E:6AB92BA4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2197","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17D744D:1BFC55C:6AB92BA4"},"commit":{"sha":"f1f4c9a39457f21d0fdfa61220f9672418c7fa0b","url":"https://github.com/GoogleCloudPlatform/data-science-on-gcp/commit/f1f4c9a39457f21d0fdfa61220f9672418c7fa0b","date":"2018-04-22T18:33:23Z","author_date":"2018-04-22T18:33:23Z","committer_date":"2018-04-22T18:33:23Z","tree_sha":"52e24da763a236c0f3b63b81d8c62f16df9d8d6a","message_first_line":"fix a number of recent reported issues"},"tree_request_status":200,"tree_rate":{"github_remaining":"2196","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:1812FD3:1C381DE:6AB92BA5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":772,"blob_sha":"07ba7cd6c0f697312482696789580f08e5861f89","priority":0}],"documents":[{"path":"README.md","size":772,"blob_sha":"07ba7cd6c0f697312482696789580f08e5861f89","priority":0,"status":200,"text":"# data-science-on-gcp\n\nSource code accompanying book:\n\n<table>\n<tr>\n  <td>\n  <img src=\"https://images-na.ssl-images-amazon.com/images/I/51dgw%2BCYSOL._SX379_BO1,204,203,200_.jpg\" height=\"100\"/>\n  <\/td>\n  <td>\n  Data Science on the Google Cloud Platform <br/>\n  Valliappa Lakshmanan <br/>\n  O'Reilly, Jan 2017\n  <\/td>\n<\/table>\n\n### Try out the code on Google Cloud Platform\n[![Open in Cloud Shell](http://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open/?git_repo=https://github.com/GoogleCloudPlatform/data-science-on-gcp.git)\n\n### Purchase book\n[Read on-line or download PDF of book](http://shop.oreilly.com/product/0636920057628.do)\n\n[Buy on Amazon.com](https://www.amazon.com/Data-Science-Google-Cloud-Platform/dp/1491974567)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E642:2E8679:17C8ED:5E17E3:6AB92BA4"},"text_sha256":"d8cc34d974d64ebb431cca4d16e724e761688f6652479ba61d4c9da87b575302"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2195","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0903:156040:17D701D:1BFB673:6AB92BA5"},"commit":{"sha":"652564b9feeeaab331ce27fdd672b8226ba1e837","url":"https://github.com/GoogleCloudPlatform/data-science-on-gcp/commit/652564b9feeeaab331ce27fdd672b8226ba1e837","date":"2022-12-20T14:54:56Z","author_date":"2022-12-20T14:54:56Z","committer_date":"2022-12-20T14:54:56Z","tree_sha":"1a0f8c1e0343e740d310b844ba730a16797b8491","message_first_line":"Merge pull request #160 from lakshmanok/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"2194","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17C3952:1BE7736:6AB92BA6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2107,"blob_sha":"c0d4c24a5d4789d4c79b6fff519f66a74f30a61e","priority":0}],"documents":[{"path":"README.md","size":2107,"blob_sha":"c0d4c24a5d4789d4c79b6fff519f66a74f30a61e","priority":0,"status":200,"text":"# data-science-on-gcp\n\nSource code accompanying book:\n\n<table>\n<tr>\n  <td>\n  <img src=\"cover_edition2.jpg\" height=\"100\"/>\n  <\/td>\n  <td>\n  <a href=\"https://www.amazon.com/Data-Science-Google-Cloud-Platform/dp/1098118952/\">Data Science on the Google Cloud Platform, 2nd Edition<\/a> <br/>\n  Valliappa Lakshmanan <br/>\n  O'Reilly, Apr 2022\n  <\/td>\n  <td>\n  Branch <a href=\"https://github.com/GoogleCloudPlatform/data-science-on-gcp/\">2nd Edition<\/a> [also main]\n  <\/td>\n<\/tr>\n<tr>\n  <td>\n  <img src=\"https://images-na.ssl-images-amazon.com/images/I/51dgw%2BCYSOL._SX379_BO1,204,203,200_.jpg\" height=\"100\"/>\n  <\/td>\n  <td>\n  Data Science on the Google Cloud Platform <br/>\n  Valliappa Lakshmanan <br/>\n  O'Reilly, Jan 2017\n  <\/td>\n  <td>\n  Branch <a href=\"https://github.com/GoogleCloudPlatform/data-science-on-gcp/tree/edition1_tf2\">edition1_tf2<\/a> (obsolete, and will not be maintained)\n  <\/td>\n<\/table>\n\n### Try out the code on Google Cloud Platform\n<a href=\"https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/data-science-on-gcp&page=editor&open_in_editor=README.md\"> <img alt=\"Open in Cloud Shell\" src =\"http://gstatic.com/cloudssh/images/open-btn.png\"><\/a>\n\nThe code on Qwiklabs (see below) is **continually tested**, and this repo is kept up-to-date.\n\nIf the code doesn't work for you, I recommend that you try the corresponding Qwiklab lab to see if there is some step that you missed.\nIf you still have problems, please leave feedback in Qwiklabs, or file an issue in this repo.\n\n### Try out the code on Qwiklabs\n\n- [Data Science on the Google Cloud Platform Quest](https://google.qwiklabs.com/quests/43)\n- [Data Science on Google Cloud Platform: Machine Learning Quest](https://google.qwiklabs.com/quests/50)\n\n\n\n### Purchase book\n[Read on-line or download PDF of book](https://www.oreilly.com/library/view/data-science-on/9781098118945/)\n\n[Buy on Amazon.com](https://www.amazon.com/Data-Science-Google-Cloud-Platform-dp-1098118952/dp/1098118952/)\n\n### Updates to book\nI updated the book in Nov 2019 with TensorFlow 2.0, Cloud Functions, and BigQuery ML.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A7A:372D9:17D2A0:5E24C7:6AB92BA4"},"text_sha256":"28c2c96a21a1bccd87a34a755a16f9bec23cddea56aa25997db343848056aa50"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-learn-contrib/metric-learn","input_row":{"repository":"scikit-learn-contrib/metric-learn","url":"https://github.com/scikit-learn-contrib/metric-learn","name":"metric-learn","owner":"scikit-learn-contrib","description":"Metric learning algorithms in Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1431,"issues":165,"created_at":"2013-11-02T08:29:47Z","updated_at":"2026-09-24T06:27:15Z","first_commit_at":"2013-11-02T08:29:23Z","last_commit_at":"2026-03-19T21:11:11Z","activity_months":148.50999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:50.852Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-learn-contrib/metric-learn","visibility":"public","created_at":"2013-11-02T08:29:47Z","updated_at":"2026-09-24T06:27:15Z","private":false,"fork":false,"archived":false,"stargazers_count":1431,"open_issues_count":51,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2193","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0796:754BF:17D357F:1BF8679:6AB92BA6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2192","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0873:7418C:181A523:1C3F4E5:6AB92BA7"},"commit":{"sha":"4c887d7d6486760d919642b1cd741086dbbbb007","url":"https://github.com/scikit-learn-contrib/metric-learn/commit/4c887d7d6486760d919642b1cd741086dbbbb007","date":"2018-05-18T15:48:58Z","author_date":"2018-05-18T15:48:58Z","committer_date":"2018-05-18T15:48:58Z","tree_sha":"d8f2b8119f286fd332a5f81352649372af96daf6","message_first_line":"Deals with scipy's new version, where eigsh can call eigh. (#94)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2191","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DD:3C4024:18079C9:1C2CAA6:6AB92BA7"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2629,"blob_sha":"22b3e7e3dfb5fa37d752a956a427fc9adfb04927","priority":0}],"documents":[{"path":"README.rst","size":2629,"blob_sha":"22b3e7e3dfb5fa37d752a956a427fc9adfb04927","priority":0,"status":200,"text":"|Travis-CI Build Status| |License| |PyPI version|\n\nmetric-learn\n=============\n\nMetric Learning algorithms in Python.\n\n**Algorithms**\n\n-  Large Margin Nearest Neighbor (LMNN)\n-  Information Theoretic Metric Learning (ITML)\n-  Sparse Determinant Metric Learning (SDML)\n-  Least Squares Metric Learning (LSML)\n-  Neighborhood Components Analysis (NCA)\n-  Local Fisher Discriminant Analysis (LFDA)\n-  Relative Components Analysis (RCA)\n-  Metric Learning for Kernel Regression (MLKR)\n-  Mahalanobis Metric for Clustering (MMC)\n\n**Dependencies**\n\n-  Python 2.7+, 3.4+\n-  numpy, scipy, scikit-learn\n-  (for running the examples only: matplotlib)\n\n**Installation/Setup**\n\nRun ``pip install metric-learn`` to download and install from PyPI.\n\nRun ``python setup.py install`` for default installation.\n\nRun ``pytest test`` to run all tests (you will need to have the ``pytest``\npackage installed).\n\n**Usage**\n\nFor full usage examples, see the `sphinx documentation`_.\n\nEach metric is a subclass of ``BaseMetricLearner``, which provides\ndefault implementations for the methods ``metric``, ``transformer``, and\n``transform``. Subclasses must provide an implementation for either\n``metric`` or ``transformer``.\n\nFor an instance of a metric learner named ``foo`` learning from a set of\n``d``-dimensional points, ``foo.metric()`` returns a ``d x d``\nmatrix ``M`` such that the distance between vectors ``x`` and ``y`` is\nexpressed ``sqrt((x-y).dot(M).dot(x-y))``.\nUsing scipy's ``pdist`` function, this would look like\n``pdist(X, metric='mahalanobis', VI=foo.metric())``.\n\nIn the same scenario, ``foo.transformer()`` returns a ``d x d``\nmatrix ``L`` such that a vector ``x`` can be represented in the learned\nspace as the vector ``x.dot(L.T)``.\n\nFor convenience, the function ``foo.transform(X)`` is provided for\nconverting a matrix of points (``X``) into the learned space, in which\nstandard Euclidean distance can be used.\n\n**Notes**\n\nIf a recent version of the Shogun Python modular (``modshogun``) library\nis available, the LMNN implementation will use the fast C++ version from\nthere. The two implementations differ slightly, and the C++ version is\nmore complete.\n\n\n.. _sphinx documentation: http://metric-learn.github.io/metric-learn/\n\n.. |Travis-CI Build Status| image:: https://api.travis-ci.org/metric-learn/metric-learn.svg?branch=master\n   :target: https://travis-ci.org/metric-learn/metric-learn\n.. |License| image:: http://img.shields.io/:license-mit-blue.svg?style=flat\n   :target: http://badges.mit-license.org\n.. |PyPI version| image:: https://badge.fury.io/py/metric-learn.svg\n   :target: http://badge.fury.io/py/metric-learn\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CB1A:4F9CC:1712AD:5D61AE:6AB92BA7"},"text_sha256":"131c2cec42544d9b6cf7b9106cf4e1ead8cc9eee2bc41474709a4c34542f8b1d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2190","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0868:73962:17DAD5D:1BFF6D1:6AB92BA8"},"commit":{"sha":"8eb775ea82c41829bc583629ca3fab0fd8f204fc","url":"https://github.com/scikit-learn-contrib/metric-learn/commit/8eb775ea82c41829bc583629ca3fab0fd8f204fc","date":"2026-03-19T21:11:11Z","author_date":"2026-03-19T21:11:11Z","committer_date":"2026-03-19T21:11:11Z","tree_sha":"111943b43897e784957c63db09b8f7466251e3d8","message_first_line":"FIX Add support for `scikit-learn` 1.8 (#360)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2189","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087A:731F6:17F83E2:1C1D65B:6AB92BA8"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3748,"blob_sha":"b2f6e6d41d13b2ed71cb451aaf3574fd3b875095","priority":0}],"documents":[{"path":"README.rst","size":3748,"blob_sha":"b2f6e6d41d13b2ed71cb451aaf3574fd3b875095","priority":0,"status":200,"text":"|GitHub Actions Build Status| |License| |PyPI version| |Code coverage|\n\nmetric-learn: Metric Learning in Python\n=======================================\n\nmetric-learn contains efficient Python implementations of several popular supervised and weakly-supervised metric learning algorithms. As part of `scikit-learn-contrib <https://github.com/scikit-learn-contrib>`_, the API of metric-learn is compatible with `scikit-learn <http://scikit-learn.org/stable/>`_, the leading library for machine learning in Python. This allows to use all the scikit-learn routines (for pipelining, model selection, etc) with metric learning algorithms through a unified interface.\n\n**Algorithms**\n\n-  Large Margin Nearest Neighbor (LMNN)\n-  Information Theoretic Metric Learning (ITML)\n-  Sparse Determinant Metric Learning (SDML)\n-  Least Squares Metric Learning (LSML)\n-  Sparse Compositional Metric Learning (SCML)\n-  Neighborhood Components Analysis (NCA)\n-  Local Fisher Discriminant Analysis (LFDA)\n-  Relative Components Analysis (RCA)\n-  Metric Learning for Kernel Regression (MLKR)\n-  Mahalanobis Metric for Clustering (MMC)\n\n**Dependencies**\n\n-  Python 3.6+ (the last version supporting Python 2 and Python 3.5 was\n   `v0.5.0 <https://pypi.org/project/metric-learn/0.5.0/>`_)\n-  numpy>= 1.11.0, scipy>= 0.17.0, scikit-learn>=0.21.3\n\n**Optional dependencies**\n\n- For SDML, using skggm will allow the algorithm to solve problematic cases\n  (install from commit `a0ed406 <https://github.com/skggm/skggm/commit/a0ed406586c4364ea3297a658f415e13b5cbdaf8>`_).\n  ``pip install 'git+https://github.com/skggm/skggm.git@a0ed406586c4364ea3297a658f415e13b5cbdaf8'`` to install the required version of skggm from GitHub.\n-  For running the examples only: matplotlib\n\n**Installation/Setup**\n\n- If you use Anaconda: ``conda install -c conda-forge metric-learn``. See more options `here <https://github.com/conda-forge/metric-learn-feedstock#installing-metric-learn>`_.\n\n- To install from PyPI: ``pip install metric-learn``.\n\n- For a manual install of the latest code, download the source repository and run ``python setup.py install``. You may then run ``pytest test`` to run all tests (you will need to have the ``pytest`` package installed).\n\n**Usage**\n\nSee the `sphinx documentation`_ for full documentation about installation, API, usage, and examples.\n\n**Citation**\n\nIf you use metric-learn in a scientific publication, we would appreciate\ncitations to the following paper:\n\n`metric-learn: Metric Learning Algorithms in Python\n<http://www.jmlr.org/papers/volume21/19-678/19-678.pdf>`_, de Vazelhes\n*et al.*, Journal of Machine Learning Research, 21(138):1-6, 2020.\n\nBibtex entry::\n\n  @article{metric-learn,\n    title = {metric-learn: {M}etric {L}earning {A}lgorithms in {P}ython},\n    author = {{de Vazelhes}, William and {Carey}, CJ and {Tang}, Yuan and\n              {Vauquier}, Nathalie and {Bellet}, Aur{\\'e}lien},\n    journal = {Journal of Machine Learning Research},\n    year = {2020},\n    volume = {21},\n    number = {138},\n    pages = {1--6}\n  }\n\n.. _sphinx documentation: http://contrib.scikit-learn.org/metric-learn/\n\n.. |GitHub Actions Build Status| image:: https://github.com/scikit-learn-contrib/metric-learn/workflows/CI/badge.svg\n   :target: https://github.com/scikit-learn-contrib/metric-learn/actions?query=event%3Apush+branch%3Amaster\n.. |License| image:: http://img.shields.io/:license-mit-blue.svg?style=flat\n   :target: http://badges.mit-license.org\n.. |PyPI version| image:: https://badge.fury.io/py/metric-learn.svg\n   :target: http://badge.fury.io/py/metric-learn\n.. |Code coverage| image:: https://codecov.io/gh/scikit-learn-contrib/metric-learn/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/scikit-learn-contrib/metric-learn\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17DB98:5E2D90:6AB92BA8"},"text_sha256":"b229d01d0fc1f10090ab79a6ecf8c4a9e5d40a7d479c257ec6808cd793fe0a28"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ljvmiranda921/pyswarms","input_row":{"repository":"ljvmiranda921/pyswarms","url":"https://github.com/ljvmiranda921/pyswarms","name":"pyswarms","owner":"ljvmiranda921","description":"A research toolkit for particle swarm optimization in Python ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1397,"issues":233,"created_at":"2017-07-12T12:04:45Z","updated_at":"2026-09-21T12:04:41Z","first_commit_at":"2017-07-12T12:05:22Z","last_commit_at":"2023-06-06T09:46:40Z","activity_months":70.790000000000006,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:53.550Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ljvmiranda921/pyswarms","visibility":"public","created_at":"2017-07-12T12:04:45Z","updated_at":"2026-09-21T12:04:41Z","private":false,"fork":false,"archived":false,"stargazers_count":1397,"open_issues_count":42,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2188","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AE:E80A6:17AE5D8:1BD382C:6AB92BA9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2187","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0930:2BC4E5:1828F18:1C4DCC0:6AB92BA9"},"commit":{"sha":"496760b0e8d773b9f82abfd7264da07432941edb","url":"https://github.com/ljvmiranda921/pyswarms/commit/496760b0e8d773b9f82abfd7264da07432941edb","date":"2018-05-22T12:52:23Z","author_date":"2018-05-22T12:52:23Z","committer_date":"2018-05-22T12:52:23Z","tree_sha":"3725b6baf366775f456be107435f98f7ab959ad2","message_first_line":"Update README.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"2186","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0889:2D7D17:1788DA7:1BAC323:6AB92BAA"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":11883,"blob_sha":"ca7b4ee3b6d0d19548aa82e86ba7c6abe50fe8d1","priority":0}],"documents":[{"path":"README.rst","size":11883,"blob_sha":"ca7b4ee3b6d0d19548aa82e86ba7c6abe50fe8d1","priority":0,"status":200,"text":".. image:: docs/pyswarms-header.png\n        :alt: PySwarms Logo\n        :align: center\n\n------------\n\n.. image:: https://badge.fury.io/py/pyswarms.svg\n        :target: https://badge.fury.io/py/pyswarms\n        :alt: PyPI Version\n\n.. image:: https://travis-ci.org/ljvmiranda921/pyswarms.svg?branch=master\n        :target: https://travis-ci.org/ljvmiranda921/pyswarms\n        :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/pyswarms/badge/?version=latest\n        :target: https://pyswarms.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg   \n        :target: https://raw.githubusercontent.com/ljvmiranda921/pyswarms/master/LICENSE\n        :alt: License\n\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00433/status.svg\n        :target: https://doi.org/10.21105/joss.00433\n        :alt: Citation\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n        :target: https://gitter.im/pyswarms/Issues\n        :alt: Gitter Chat\n\nPySwarms is an extensible research toolkit for particle swarm optimization (PSO) in Python.\n\nIt is intended for swarm intelligence researchers, practitioners, and students who would prefer a high-level declarative interface for implementing PSO in their problems. PySwarms enables basic optimization with PSO and interaction with swarm optimizations. Check out more features below!\n\n+------------+------------+-------------------------------+\n| Branch     | Status     | Description                   |\n+============+============+===============================+\n| master     | |master|   | Stable, official PyPI version |\n+------------+------------+-------------------------------+\n| development| |dev|      | Bleeding-edge, experimental   |\n+------------+------------+-------------------------------+\n\n.. |dev| image:: https://travis-ci.org/ljvmiranda921/pyswarms.svg?branch=development\n    :target: https://travis-ci.org/ljvmiranda921/pyswarms\n\n.. |master| image:: https://travis-ci.org/ljvmiranda921/pyswarms.svg?branch=master\n        :target: https://travis-ci.org/ljvmiranda921/pyswarms\n\n* **Free software:** MIT license\n* **Documentation:** https://pyswarms.readthedocs.io.\n* **Python versions:** 2.7, 3.4, 3.5 and above\n\nFeatures\n--------\n\n* High-level module for Particle Swarm Optimization. For a list of all optimizers, check this_ link.\n* Built-in objective functions to test optimization algorithms.\n* Plotting environment for cost histories and particle movement.\n* Hyperparameter search tools to optimize swarm behaviour.\n* (For Devs and Researchers): Highly-extensible API for implementing your own techniques.\n\n.. _this: https://pyswarms.readthedocs.io/en/latest/features.html\n\nDependencies\n-------------\n* numpy >= 1.13.0\n* scipy >= 0.17.0\n* matplotlib >= 1.3.1\n\nInstallation\n-------------\nTo install PySwarms, run this command in your terminal:\n\n.. code-block:: console\n\n    $ pip install pyswarms\n\nThis is the preferred method to install PySwarms, as it will always install the most recent stable release.\n\nIn case you want to install the bleeding-edge version, clone this repo:\n\n.. code-block:: console\n\n    $ git clone -b development https://github.com/ljvmiranda921/pyswarms.git\n\nand then run\n\n.. code-block:: console\n\n    $ cd pyswarms\n    $ python setup.py install\n\nBasic Usage\n------------\n\nPySwarms provides a high-level implementation of various particle swarm optimization\nalgorithms. Thus, it aims to be very easy to use and customize. Moreover, supporting\nmodules can also be used to help you in your optimization problem.\n\n\nOptimizing a sphere function\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can import PySwarms as any other Python module,\n\n.. code-block:: python\n\n    import pyswarms as ps\n\nSuppose we want to find the minima of :math:`f(x) = x^2` using global best PSO, simply import the \nbuilt-in sphere function, :code:`pyswarms.utils.functions.sphere_func()`, and the necessary optimizer:\n\n.. code-block:: python\n\n    import pyswarms as ps\n    from pyswarms.utils.functions import single_obj as fx\n\n    # Set-up hyperparameters\n    options = {'c1': 0.5, 'c2': 0.3, 'w':0.9}\n\n    # Call instance of PSO\n    optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)\n\n    # Perform optimization\n    best_cost, best_pos = optimizer.optimize(fx.sphere_func, iters=100, verbose=3, print_step=25)\n\n.. code-block::\n\n    >>> 2017-10-03 10:12:33,859 - pyswarms.single.global_best - INFO - Iteration 1/100, cost: 0.131244226714\n    >>> 2017-10-03 10:12:33,878 - pyswarms.single.global_best - INFO - Iteration 26/100, cost: 1.60297958653e-05\n    >>> 2017-10-03 10:12:33,893 - pyswarms.single.global_best - INFO - Iteration 51/100, cost: 1.60297958653e-05\n    >>> 2017-10-03 10:12:33,906 - pyswarms.single.global_best - INFO - Iteration 76/100, cost: 2.12638727702e-06\n    >>> 2017-10-03 10:12:33,921 - pyswarms.single.global_best - INFO - ================================\n    Optimization finished!\n    Final cost: 0.0000\n    Best value: [-0.0003521098028145481, -0.00045459382339127453]\n\nThis will run the optimizer for :code:`100` iterations, and will return the best cost and best\nposition found by the swarm. In addition, you can also access various histories by calling on\nproperties of the class:\n\n.. code-block:: python\n\n    # Obtain the cost history\n    optimizer.get_cost_history\n\n    # Obtain the position history\n    optimizer.get_pos_history\n\n    # Obtain the velocity history\n    optimizer.get_velocity_history\n\nAt the same time, you can also obtain the mean personal best and mean neighbor\nhistory for local best PSO implementations. Simply call :code:`mean_pbest_history`\nand :code:`optimizer.get_mean_neighbor_history` respectively.\n\nHyperparameter search tools\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPySwarms implements a grid search and random search technique to find the best\nparameters for your optimizer. Setting them up is easy. In this example,\nlet's try using :code:`pyswarms.utils.search.RandomSearch` to find the optimal\nparameters for :code:`LocalBestPSO` optimizer.\n\nHere, we input a range, enclosed in tuples, to define the space in which\nthe parameters will be found. Thus, :code:`(1,5)` pertains to a range from\n1 to 5.\n\n.. code-block:: python\n\n    import numpy as np\n    import pyswarms as ps\n    from pyswarms.utils.search import RandomSearch\n    from pyswarms.utils.functions import single_obj as fx\n\n    # Set-up choices for the parameters\n    options = {\n        'c1': (1,5),\n        'c2': (6,10),\n        'w': (2,5),\n        'k': (11, 15),\n        'p': 1\n    }\n\n    # Create a RandomSearch object\n    # n_selection_iters is the number of iterations to run the searcher\n    # iters is the number of iterations to run the optimizer\n    g = RandomSearch(ps.single.LocalBestPSO, n_particles=40,\n                dimensions=20, options=options, objective_func=fx.sphere_func,\n                iters=10, n_selection_iters=100)\n\n    best_score, best_options = g.search()\n\nThis then returns the best score found during optimization, and the\nhyperparameter options that enables it.\n\n.. code-block:: python\n\n    >>> best_score\n    1.41978545901\n    >>> best_options['c1']\n    1.543556887693\n    >>> best_options['c2']\n    9.504769054771\n\nPlotting environments\n~~~~~~~~~~~~~~~~~~~~~\n\nIt is also possible to plot optimizer performance for the sake of formatting.\nThe plotting environment is built on top of :code:`matplotlib`, making it\nhighly-customizable.\n\nThe environment takes in the optimizer and its parameters, then performs\na fresh run to plot the cost and create animation.\n\n.. code-block:: python\n\n    import pyswarms as ps\n    from pyswarms.utils.functions import single_obj as fx\n    from pyswarms.utils.environments import PlotEnvironment\n\n    # Set-up optimizer\n    options = {'c1':0.5, 'c2':0.3, 'w':0.9}\n    optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=3, options=options)\n\n    # Initialize plot environment\n    plt_env = PlotEnvironment(optimizer, fx.sphere_func, 1000)\n\n    # Plot the cost\n    plt_env.plot_cost(figsize=(8,6));\n    plt.show()\n\n.. image:: docs/examples/output_9_0.png\n        :target: docs/examples/output_9_0.png\n        :width: 320 px\n        :alt: cost history plot\n\nWe can also plot the animation,\n\n.. code-block:: python\n\n    plt_env.plot_particles2D(limits=((-1.2,1.2),(-1.2,1.2))\n\n.. image:: docs/examples/output_3d.gif\n        :target: docs/examples/output_3d.gif\n        :width: 320 px\n        :alt: 3d particle plot\n\nContributing\n------------\n\nPySwarms is currently maintained by a single person (me!) with the aid of a\nfew but very helpful contributors. We would appreciate it if you can lend\na hand with the following:\n\n* Find bugs and fix them\n* Update documentation in docstrings\n* Implement new optimizers to our collection\n* Make utility functions more robust.\n\nIf you wish to contribute, check out our contributing guide in this link_.\nMoreover, you can also see the list of features that need some help in our\nIssues_ page and in this list_.\n\n.. _link: https://pyswarms.readthedocs.io/en/latest/contributing.html\n.. _Issues: https://github.com/ljvmiranda921/pyswarms/issues\n.. _list: https://github.com/ljvmiranda921/pyswarms/issues/5\n\n**Most importantly**, first time contributors are welcome to join! I try my best\nto help you get started and enable you to make your first Pull Request! Let's\nlearn from each other!\n\nCredits\n-------\n\nThis project was inspired by the pyswarm_ module that performs PSO with constrained support.\nThe package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\nThis is currently maintained by Lester James V. Miranda with other helpful contributors (v.0.1.7):\n\n* Carl-K (`@Carl-K <https://github.com/Carl-K>`_)\n* Siobhán Cronin (`@SioKCronin <https://github.com/SioKCronin>`_)\n* Andrew Jarcho (`@jazcap53 <https://github.com/jazcap53>`_)\n* Charalampos Papadimitriou (`@CPapadim <https://github.com/CPapadim>`_)\n* Mamady Nabé (`@mamadyonline <https://github.com/mamadyonline>`_)\n* Erik (`@slek120 <https://github.com/slek120>`_)\n\n.. _pyswarm: https://github.com/tisimst/pyswarm\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\nCite us\n--------\nAre you using PySwarms in your project or research? Please cite us!\n\n* Miranda L.J., (2018). PySwarms: a research toolkit for Particle Swarm Optimization in Python. *Journal of Open Source Software*, 3(21), 433, https://doi.org/joss.00433\n\n.. code-block:: bibtex\n\n    @article{pyswarmsJOSS2018,\n        author  = {Lester James V. Miranda},\n        title   = \"{P}y{S}warms, a research-toolkit for {P}article {S}warm {O}ptimization in {P}ython\",\n        journal = {Journal of Open Source Software},\n        year    = {2018},\n        volume  = {3},\n        issue   = {21},\n        doi     = {10.21105/joss.00433},\n        url     = {https://doi.org/10.21105/joss.00433}\n    }\n\nPeople using PySwarms\n~~~~~~~~~~~~~~~~~~~~~~\nNot on the list? Ping us in the Issue Tracker!\n\n* Gousios, Georgios. Lecture notes for the TU Delft TI3110TU course Algorithms and Data Structures. Accessed May 22, 2018. http://gousios.org/courses/algo-ds/book/string-distance.html#sop-example-using-pyswarms.\n* Nandy, Abhishek, and Manisha Biswas., \"Applying Python to Reinforcement Learning.\" *Reinforcement Learning*. Apress, Berkeley, CA, 2018. 89-128.\n* Benedetti, Marcello, et al., \"A generative modeling approach for benchmarking and training shallow quantum circuits.\" *arXiv preprint arXiv:1801.07686* (2018).\n* Vrbančič et al., \"NiaPy: Python microframework for building nature-inspired algorithms.\" Journal of Open Source Software, 3(23), 613, https://doi.org/10.21105/joss.00613\n\n\nOthers\n------\nLike it? Love it? Leave us a star on Github_ to show your appreciation! \n\n.. _Github: https://github.com/ljvmiranda921/pyswarms\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7984:3A3DD:1793D1:5DE596:6AB92BAA"},"text_sha256":"901b80156d8677108529a5689824560ff84f4a291e05485280a4b577c3fb0a76"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2185","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0937:278AC2:1867C70:1C8CFFD:6AB92BAB"},"commit":{"sha":"70c969d929bb2dab6211765def0431680fc5cb01","url":"https://github.com/ljvmiranda921/pyswarms/commit/70c969d929bb2dab6211765def0431680fc5cb01","date":"2023-06-06T09:46:40Z","author_date":"2023-06-06T09:46:40Z","committer_date":"2023-06-06T09:46:40Z","tree_sha":"aae782b6f6037570ceca0925adcaf75d8876b995","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2184","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17D7483:1BFBB82:6AB92BAB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":28600,"blob_sha":"e03922ae689be3c55c21635abac32a8d3a6b556b","priority":0}],"documents":[{"path":"README.md","size":28600,"blob_sha":"e03922ae689be3c55c21635abac32a8d3a6b556b","priority":0,"status":200,"text":"![PySwarms Logo](https://i.imgur.com/eX8oqPQ.png)\n---\n\n\n[![PyPI version](https://badge.fury.io/py/pyswarms.svg)](https://badge.fury.io/py/pyswarms)\n[![Build Status](https://dev.azure.com/ljvmiranda/ljvmiranda/_apis/build/status/ljvmiranda921.pyswarms?branchName=master)](https://dev.azure.com/ljvmiranda/ljvmiranda/_build/latest?definitionId=1&branchName=master)\n[![Documentation Status](https://readthedocs.org/projects/pyswarms/badge/?version=latest)](https://pyswarms.readthedocs.io/en/master/?badge=master)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg )](https://raw.githubusercontent.com/ljvmiranda921/pyswarms/master/LICENSE)\n[![DOI](http://joss.theoj.org/papers/10.21105/joss.00433/status.svg)](https://doi.org/10.21105/joss.00433)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pyswarms/Issues)\n\n> **NOTICE**: I am not actively maintaining this repository anymore. My research interests have changed in the past few years. \n> I highly recommend checking out [scikit-opt](https://github.com/guofei9987/scikit-opt) for metaheuristic methods including PSO. \n\nPySwarms is an extensible research toolkit for particle swarm optimization\n(PSO) in Python.\n\nIt is intended for swarm intelligence researchers, practitioners, and\nstudents who prefer a high-level declarative interface for implementing PSO\nin their problems. PySwarms enables basic optimization with PSO and\ninteraction with swarm optimizations. Check out more features below!\n\n* **Free software:** MIT license\n* **Documentation:** https://pyswarms.readthedocs.io.\n* **Python versions:** 3.5 and above\n\n## Features\n\n* High-level module for Particle Swarm Optimization. For a list of all optimizers, check [this link].\n* Built-in objective functions to test optimization algorithms.\n* Plotting environment for cost histories and particle movement.\n* Hyperparameter search tools to optimize swarm behaviour.\n* (For Devs and Researchers): Highly-extensible API for implementing your own techniques.\n\n[this link]: https://pyswarms.readthedocs.io/en/latest/features.html\n\n## Installation\n\nTo install PySwarms, run this command in your terminal:\n\n```shell\n$ pip install pyswarms\n```\n\nThis is the preferred method to install PySwarms, as it will always install\nthe most recent stable release.\n\nIn case you want to install the bleeding-edge version, clone this repo:\n\n```shell\n$ git clone -b development https://github.com/ljvmiranda921/pyswarms.git\n```\nand then run\n\n```shell\n$ cd pyswarms\n$ python setup.py install\n```\n\nTo install PySwarms on Fedora, use:\n\n```sh\n$ dnf install python3-pyswarms\n```\n\n## Running in a Vagrant Box\n\nTo run PySwarms in a Vagrant Box, install Vagrant by going to \nhttps://www.vagrantup.com/downloads.html and downloading the proper packaged from the Hashicorp website. \n\nAfterward, run the following command in the project directory:\n\n```shell\n$ vagrant provision\n$ vagrant up\n$ vagrant ssh\n```\nNow you're ready to develop your contributions in a premade virtual environment. \n\n## Basic Usage\n\nPySwarms provides a high-level implementation of various particle swarm\noptimization algorithms. Thus, it aims to be user-friendly and customizable.\nIn addition, supporting modules can be used to help you in your optimization\nproblem.\n\n### Optimizing a sphere function\n\nYou can import PySwarms as any other Python module,\n\n```python\nimport pyswarms as ps\n```\n\nSuppose we want to find the minima of `f(x) = x^2` using global best\nPSO, simply import the built-in sphere function,\n`pyswarms.utils.functions.sphere()`, and the necessary optimizer:\n\n```python\nimport pyswarms as ps\nfrom pyswarms.utils.functions import single_obj as fx\n# Set-up hyperparameters\noptions = {'c1': 0.5, 'c2': 0.3, 'w':0.9}\n# Call instance of PSO\noptimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)\n# Perform optimization\nbest_cost, best_pos = optimizer.optimize(fx.sphere, iters=100)\n```\n\n![Sphere Optimization](https://i.imgur.com/5LtjROf.gif)\n\nThis will run the optimizer for `100` iterations, then returns the best cost\nand best position found by the swarm. In addition, you can also access\nvarious histories by calling on properties of the class:\n\n```python\n# Obtain the cost history\noptimizer.cost_history\n# Obtain the position history\noptimizer.pos_history\n# Obtain the velocity history\noptimizer.velocity_history\n```\n\nAt the same time, you can also obtain the mean personal best and mean neighbor\nhistory for local best PSO implementations. Simply call `optimizer.mean_pbest_history`\nand `optimizer.mean_neighbor_history` respectively.\n\n### Hyperparameter search tools\n\nPySwarms implements a grid search and random search technique to find the\nbest parameters for your optimizer. Setting them up is easy. In this example,\nlet's try using `pyswarms.utils.search.RandomSearch` to find the optimal\nparameters for `LocalBestPSO` optimizer.\n\nHere, we input a range, enclosed in tuples, to define the space in which the\nparameters will be found. Thus, `(1,5)` pertains to a range from 1 to 5.\n\n```python\nimport numpy as np\nimport pyswarms as ps\nfrom pyswarms.utils.search import RandomSearch\nfrom pyswarms.utils.functions import single_obj as fx\n\n# Set-up choices for the parameters\noptions = {\n    'c1': (1,5),\n    'c2': (6,10),\n    'w': (2,5),\n    'k': (11, 15),\n    'p': 1\n}\n\n# Create a RandomSearch object\n# n_selection_iters is the number of iterations to run the searcher\n# iters is the number of iterations to run the optimizer\ng = RandomSearch(ps.single.LocalBestPSO, n_particles=40,\n            dimensions=20, options=options, objective_func=fx.sphere,\n            iters=10, n_selection_iters=100)\n\nbest_score, best_options = g.search()\n```\n\nThis then returns the best score found during optimization, and the\nhyperparameter options that enable it.\n\n```s\n>>> best_score\n1.41978545901\n>>> best_options['c1']\n1.543556887693\n>>> best_options['c2']\n9.504769054771\n```\n\n### Swarm visualization\n\nIt is also possible to plot optimizer performance for the sake of formatting.\nThe plotters module is built on top of `matplotlib`, making it\nhighly-customizable.\n\n\n```python\nimport pyswarms as ps\nfrom pyswarms.utils.functions import single_obj as fx\nfrom pyswarms.utils.plotters import plot_cost_history, plot_contour, plot_surface\nimport matplotlib.pyplot as plt\n# Set-up optimizer\noptions = {'c1':0.5, 'c2':0.3, 'w':0.9}\noptimizer = ps.single.GlobalBestPSO(n_particles=50, dimensions=2, options=options)\noptimizer.optimize(fx.sphere, iters=100)\n# Plot the cost\nplot_cost_history(optimizer.cost_history)\nplt.show()\n```\n\n![CostHistory](https://i.imgur.com/19Iuz4B.png)\n\nWe can also plot the animation...\n\n```python\nfrom pyswarms.utils.plotters.formatters import Mesher, Designer\n# Plot the sphere function's mesh for better plots\nm = Mesher(func=fx.sphere,\n           limits=[(-1,1), (-1,1)])\n# Adjust figure limits\nd = Designer(limits=[(-1,1), (-1,1), (-0.1,1)],\n             label=['x-axis', 'y-axis', 'z-axis'])\n```\n\nIn 2D,\n\n```python\nplot_contour(pos_history=optimizer.pos_history, mesher=m, designer=d, mark=(0,0))\n```\n\n![Contour](https://i.imgur.com/H3YofJ6.gif)\n\nOr in 3D!\n\n```python\npos_history_3d = m.compute_history_3d(optimizer.pos_history) # preprocessing\nanimation3d = plot_surface(pos_history=pos_history_3d,\n                           mesher=m, designer=d,\n                           mark=(0,0,0))    \n```\n\n![Surface](https://i.imgur.com/kRb61Hx.gif)\n\n## Contributing\n\nPySwarms is currently maintained by a small yet dedicated team:\n- Lester James V. Miranda ([@ljvmiranda921](https://github.com/ljvmiranda921))\n- Siobhán K. Cronin ([@SioKCronin](https://github.com/SioKCronin))\n- Aaron Moser ([@whzup](https://github.com/whzup))\n- Steven Beardwell ([@stevenbw](https://github.com/stevenbw))\n\nAnd we would appreciate it if you can lend a hand with the following:\n\n* Find bugs and fix them\n* Update documentation in docstrings\n* Implement new optimizers to our collection\n* Make utility functions more robust.\n\nWe would also like to acknowledge [all our\ncontributors](http://pyswarms.readthedocs.io/en/latest/authors.html), past and\npresent, for making this project successful!\n\nIf you wish to contribute, check out our [contributing guide].\nMoreover, you can also see the list of features that need some help in our\n[Issues] page.\n\n[contributing guide]: https://pyswarms.readthedocs.io/en/development/contributing.html\n[Issues]: https://github.com/ljvmiranda921/pyswarms/issues\n\n**Most importantly**, first-time contributors are welcome to join! I try my\nbest to help you get started and enable you to make your first Pull Request!\nLet's learn from each other!\n\n## Credits\n\nThis project was inspired by the [pyswarm] module that performs PSO with\nconstrained support. The package was created with [Cookiecutter] and the\n[`audreyr/cookiecutter-pypackage`] project template.\n\n[pyswarm]: https://github.com/tisimst/pyswarm\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[`audreyr/cookiecutter-pypackage`]: https://github.com/audreyr/cookiecutter-pypackage\n\n## Cite us\nAre you using PySwarms in your project or research? Please cite us!\n\n* Miranda L.J., (2018). PySwarms: a research toolkit for Particle Swarm Optimization in Python. *Journal of Open Source Software*, 3(21), 433, [https://doi.org/10.21105/joss.00433](https://doi.org/10.21105/joss.00433)\n\n```bibtex\n@article{pyswarmsJOSS2018,\n    author  = {Lester James V. Miranda},\n    title   = \"{P}y{S}warms, a research-toolkit for {P}article {S}warm {O}ptimization in {P}ython\",\n    journal = {Journal of Open Source Software},\n    year    = {2018},\n    volume  = {3},\n    issue   = {21},\n    doi     = {10.21105/joss.00433},\n    url     = {https://doi.org/10.21105/joss.00433}\n}\n```\n\n### Projects citing PySwarms\nNot on the list? Ping us in the Issue Tracker!\n\n* Gousios, Georgios. Lecture notes for the TU Delft TI3110TU course Algorithms and Data Structures. Accessed May 22, 2018. http://gousios.org/courses/algo-ds/book/string-distance.html#sop-example-using-pyswarms.\n* Nandy, Abhishek, and Manisha Biswas., \"Applying Python to Reinforcement Learning.\" *Reinforcement Learning*. Apress, Berkeley, CA, 2018. 89-128.\n* Benedetti, Marcello, et al., \"A generative modeling approach for benchmarking and training shallow quantum circuits.\" *arXiv preprint arXiv:1801.07686* (2018).\n* Vrbančič et al., \"NiaPy: Python microframework for building nature-inspired algorithms.\" Journal of Open Source Software, 3(23), 613, https://doi.org/10.21105/joss.00613\n* Häse, Florian, et al. \"Phoenics: A Bayesian optimizer for chemistry.\" *ACS Central Science.* 4.9 (2018): 1134-1145. \n* Szynkiewicz, Pawel. \"A Comparative Study of PSO and CMA-ES Algorithms on Black-box Optimization Benchmarks.\" *Journal of Telecommunications and Information Technology* 4 (2018): 5.\n* Mistry, Miten, et al. \"Mixed-Integer Convex Nonlinear Optimization with Gradient-Boosted Trees Embedded.\" Imperial College London (2018).\n* Vishwakarma, Gaurav. *Machine Learning Model Selection for Predicting Properties of High Refractive Index Polymers* Dissertation. State University of New York at Buffalo, 2018.\n* Uluturk Ismail, et al. \"Efficient 3D Placement of Access Points in an Aerial Wireless Network.\" *2019 16th IEEE Anual Consumer Communications and Networking Conference (CCNC)* IEEE (2019): 1-7.\n* Downey A., Theisen C., et al. \"Cam-based passive variable friction device for structural control.\" *Engineering Structures* Elsevier (2019): 430-439.\n* Thaler S., Paehler L., Adams, N.A. \"Sparse identification of truncation errors.\" *Journal of Computational Physics* Elsevier (2019): vol. 397\n* Lin, Y.H., He, D., Wang, Y. Lee, L.J. \"Last-mile Delivery: Optimal Locker locatuion under Multinomial Logit Choice Model\" https://arxiv.org/abs/2002.10153\n* Park J., Kim S., Lee, J. \"Supplemental Material for Ultimate Light trapping in free-form plasmonic waveguide\" KAIST, University of Cambridge, and Cornell University http://www.jlab.or.kr/documents/publications/2019PRApplied_SI.pdf\n* Pasha A., Latha P.H., \"Bio-inspired dimensionality reduction for Parkinson's Disease Classification,\" *Health Information Science and Systems*, Springer (2020).\n* Carmichael Z., Syed, H., et al. \"Analysis of Wide and Deep Echo State Networks for Multiscale Spatiotemporal Time-Series Forecasting,\" *Proceedings of the 7th Annual Neuro-inspired Computational Elements* ACM (2019), nb. 7: 1-10 https://doi.org/10.1145/3320288.3320303\n* Klonowski, J. \"Optimizing Message to Virtual Link Assignment in Avionics Full-Duplex Switched Ethernet Networks\" Proquest\n* Haidar, A., Jan, ZM. \"Evolving One-Dimensional Deep Convolutional Neural Netowrk: A Swarm-based Approach,\" *IEEE Congress on Evolutionary Computation* (2019) https://doi.org/10.1109/CEC.2019.8790036\n* Shang, Z. \"Performance Evaluation of the Control Plane in OpenFlow Networks,\" Freie Universitat Berlin (2020)\n* Linker, F. \"Industrial Benchmark for Fuzzy Particle Swarm Reinforcement Learning,\" Liezpic University (2020)\n* Vetter, A. Yan, C. et al. \"Computational rule-based approach for corner correction of non-Manhattan geometries in mask aligner photolithography,\" Optics (2019). vol. 27, issue 22: 32523-32535 https://doi.org/10.1364/OE.27.032523\n* Wang, Q., Megherbi, N., Breckon T.P., \"A Reference Architecture for Plausible Thread Image Projection (TIP) Within 3D X-ray Computed Tomography Volumes\" https://arxiv.org/abs/2001.05459\n* Menke, Tim, Hase, Florian, et al. \"Automated discovery of superconducting circuits and its application to 4-local coupler design,\" arxiv preprint: https://arxiv.org/abs/1912.03322 \n\n## Others\nLike it? Love it? Leave us a star on [Github] to show your appreciation! \n\n[Github]: https://github.com/ljvmiranda921/pyswarms\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/whzup\"><img src=\"https://avatars3.githubusercontent.com/u/39431903?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Aaron<\/b><\/sub><\/a><br /><a href=\"#maintenance-whzup\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=whzup\" title=\"Code\">💻<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=whzup\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=whzup\" title=\"Tests\">⚠️<\/a> <a href=\"#ideas-whzup\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/pulls?q=is%3Apr+reviewed-by%3Awhzup\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/Carl-K\"><img src=\"https://avatars2.githubusercontent.com/u/13661469?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Carl-K<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=Carl-K\" title=\"Code\">💻<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=Carl-K\" title=\"Tests\">⚠️<\/a><\/td>\n    <td align=\"center\"><a href=\"http://www.siobhankcronin.com/\"><img src=\"https://avatars2.githubusercontent.com/u/19956669?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Siobhán K Cronin<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=SioKCronin\" title=\"Code\">💻<\/a> <a href=\"#maintenance-SioKCronin\" title=\"Maintenance\">🚧<\/a> <a href=\"#ideas-SioKCronin\" title=\"Ideas, Planning, & Feedback\">🤔<\/a><\/td>\n    <td align=\"center\"><a href=\"http://andrewjarcho.com\"><img src=\"https://avatars3.githubusercontent.com/u/1452951?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Andrew Jarcho<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=jazcap53\" title=\"Tests\">⚠️<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=jazcap53\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/mamadyonline\"><img src=\"https://avatars1.githubusercontent.com/u/20543370?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Mamady<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=mamadyonline\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/jayspeidell\"><img src=\"https://avatars3.githubusercontent.com/u/26357788?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Jay Speidell<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=jayspeidell\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/slek120\"><img src=\"https://avatars2.githubusercontent.com/u/3589574?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Eric<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Aslek120\" title=\"Bug reports\">🐛<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=slek120\" title=\"Code\">💻<\/a><\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/CPapadim\"><img src=\"https://avatars1.githubusercontent.com/u/13984473?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>CPapadim<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3ACPapadim\" title=\"Bug reports\">🐛<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=CPapadim\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/dfhljf\"><img src=\"https://avatars1.githubusercontent.com/u/7887642?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>JiangHui<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=dfhljf\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/nik1082\"><img src=\"https://avatars3.githubusercontent.com/u/17260188?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Jericho Arcelao<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=nik1082\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"http://www.jdbohrman.xyz\"><img src=\"https://avatars2.githubusercontent.com/u/27848025?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>James D. Bohrman<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=jdbohrman\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/bradahoward\"><img src=\"https://avatars2.githubusercontent.com/u/24660861?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>bradahoward<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=bradahoward\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/ThomasCES\"><img src=\"https://avatars2.githubusercontent.com/u/18325841?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>ThomasCES<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ThomasCES\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/danielcorreia96\"><img src=\"https://avatars0.githubusercontent.com/u/17486065?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Daniel Correia<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Adanielcorreia96\" title=\"Bug reports\">🐛<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=danielcorreia96\" title=\"Code\">💻<\/a><\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/fluencer\"><img src=\"https://avatars3.githubusercontent.com/u/6614307?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>fluencer<\/b><\/sub><\/a><br /><a href=\"#example-fluencer\" title=\"Examples\">💡<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=fluencer\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/miguelcocruz\"><img src=\"https://avatars0.githubusercontent.com/u/45034603?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>miguelcocruz<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=miguelcocruz\" title=\"Documentation\">📖<\/a> <a href=\"#example-miguelcocruz\" title=\"Examples\">💡<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/stevenbw\"><img src=\"https://avatars1.githubusercontent.com/u/46458390?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Steven Beardwell<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=stevenbw\" title=\"Code\">💻<\/a> <a href=\"#maintenance-stevenbw\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=stevenbw\" title=\"Documentation\">📖<\/a> <a href=\"#ideas-stevenbw\" title=\"Ideas, Planning, & Feedback\">🤔<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/ndngo\"><img src=\"https://avatars1.githubusercontent.com/u/16291290?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Nathaniel Ngo<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ndngo\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/Aneal-Sharma\"><img src=\"https://avatars1.githubusercontent.com/u/19873846?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Aneal Sharma<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=Aneal-Sharma\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/citomcclure\"><img src=\"https://avatars2.githubusercontent.com/u/38021988?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Chris McClure<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=citomcclure\" title=\"Documentation\">📖<\/a> <a href=\"#example-citomcclure\" title=\"Examples\">💡<\/a><\/td>\n    <td align=\"center\"><a href=\"http://se4.space/\"><img src=\"https://avatars2.githubusercontent.com/u/42605993?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Christopher Angell<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ctangell\" title=\"Documentation\">📖<\/a><\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/Kutim\"><img src=\"https://avatars3.githubusercontent.com/u/8309533?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Kutim<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3AKutim\" title=\"Bug reports\">🐛<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/ichbinjakes\"><img src=\"https://avatars1.githubusercontent.com/u/20906800?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Jake Souter<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Aichbinjakes\" title=\"Bug reports\">🐛<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ichbinjakes\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/IanBoyanZhang\"><img src=\"https://avatars3.githubusercontent.com/u/4110995?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ian Zhang<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=IanBoyanZhang\" title=\"Documentation\">📖<\/a> <a href=\"#example-IanBoyanZhang\" title=\"Examples\">💡<\/a><\/td>\n    <td align=\"center\"><a href=\"https://www.zachariahcarmichael.com/\"><img src=\"https://avatars2.githubusercontent.com/u/20629897?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Zach<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=craymichael\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://www.linkedin.com/in/michel-lavoie-71841526/\"><img src=\"https://avatars3.githubusercontent.com/u/3951483?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Michel Lavoie<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Amiek770\" title=\"Bug reports\">🐛<\/a><\/td>\n    <td align=\"center\"><a href=\"http://linkedin.com/in/ewelinakaminska/\"><img src=\"https://avatars1.githubusercontent.com/u/42674710?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>ewekam<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ewekam\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://www.linkedin.com/in/ivyna-alves\"><img src=\"https://avatars2.githubusercontent.com/u/18709508?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ivyna Santino<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ivynasantino\" title=\"Documentation\">📖<\/a> <a href=\"#example-ivynasantino\" title=\"Examples\">💡<\/a><\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/yasirroni\"><img src=\"https://avatars2.githubusercontent.com/u/48709672?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Muhammad Yasirroni<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=yasirroni\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/ckastner\"><img src=\"https://avatars0.githubusercontent.com/u/15859947?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Christian Kastner<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=ckastner\" title=\"Documentation\">📖<\/a> <a href=\"#platform-ckastner\" title=\"Packaging/porting to new platform\">📦<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/nishnash54\"><img src=\"https://avatars1.githubusercontent.com/u/25393122?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Nishant Rodrigues<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=nishnash54\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/msat59\"><img src=\"https://avatars2.githubusercontent.com/u/20813541?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>msat59<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=msat59\" title=\"Code\">💻<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Amsat59\" title=\"Bug reports\">🐛<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/diegoroman17\"><img src=\"https://avatars0.githubusercontent.com/u/1294358?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Diego<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=diegoroman17\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"http://www.aquanova-mp.com/\"><img src=\"https://avatars2.githubusercontent.com/u/6449766?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Shaad Alaka<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=Archer6621\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/blazewicz\"><img src=\"https://avatars1.githubusercontent.com/u/13185945?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Krzysztof Błażewicz<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/issues?q=author%3Ablazewicz\" title=\"Bug reports\">🐛<\/a><\/td>\n  <\/tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/a310883\"><img src=\"https://avatars2.githubusercontent.com/u/48936633?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Jorge Castillo<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=a310883\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"https://danner-web.de/\"><img src=\"https://avatars3.githubusercontent.com/u/11915163?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Philipp Danner<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=dannerph\" title=\"Code\">💻<\/a><\/td>\n    <td align=\"center\"><a href=\"https://github.com/nikhil-sethi\"><img src=\"https://avatars2.githubusercontent.com/u/50928699?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Nikhil Sethi<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=nikhil-sethi\" title=\"Code\">💻<\/a> <a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=nikhil-sethi\" title=\"Documentation\">📖<\/a><\/td>\n    <td align=\"center\"><a href=\"http://www.iztok-jr-fister.eu/\"><img src=\"https://avatars.githubusercontent.com/u/1633361?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>firefly-cpp<\/b><\/sub><\/a><br /><a href=\"https://github.com/ljvmiranda921/pyswarms/commits?author=firefly-cpp\" title=\"Documentation\">📖<\/a><\/td>\n  <\/tr>\n<\/table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4474:35EBC:178898:5DDA63:6AB92BAB"},"text_sha256":"e4c82989dcc12d13ebbfef1c13d8ea775d3c89b0f5bc4f30ea245aaaa1b76f29"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"owlbarn/owl","input_row":{"repository":"owlbarn/owl","url":"https://github.com/owlbarn/owl","name":"owl","owner":"owlbarn","description":"Owl - OCaml Scientific Computing @ https://ocaml.xyz","language":"OCaml","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1352,"issues":304,"created_at":"2016-06-20T20:47:45Z","updated_at":"2026-09-26T02:54:48Z","first_commit_at":"2016-06-20T20:47:46Z","last_commit_at":"2026-08-05T09:03:53Z","activity_months":121.47,"ai_ml_match_topics":"machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:43:56.722Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"owlbarn/owl","visibility":"public","created_at":"2016-06-20T20:47:45Z","updated_at":"2026-09-26T02:54:48Z","private":false,"fork":false,"archived":false,"stargazers_count":1352,"open_issues_count":45,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2183","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17CA476:1BEEA6A:6AB92BAC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2182","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:17F8742:1C1DA3C:6AB92BAD"},"commit":{"sha":"e1610bafdcbb6cc1af30765b654b4d69dcf08d22","url":"https://github.com/owlbarn/owl/commit/e1610bafdcbb6cc1af30765b654b4d69dcf08d22","date":"2018-05-24T20:42:50Z","author_date":"2018-05-24T20:42:50Z","committer_date":"2018-05-24T20:42:50Z","tree_sha":"20b95468e43ff97acf6faf531fab022134216a55","message_first_line":"coding graph compilation ..."},"tree_request_status":200,"tree_rate":{"github_remaining":"2181","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:1804E32:1C29FF4:6AB92BAD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":30548,"blob_sha":"6f7eae5cc2d73a3e5ebb2a776ceabb3ae270b532","priority":0}],"documents":[{"path":"README.md","size":30548,"blob_sha":"6f7eae5cc2d73a3e5ebb2a776ceabb3ae270b532","priority":0,"status":200,"text":"# Owl - An OCaml Numerical Library\n\n%%VERSION%% travis-ci: [![Travis build Status](https://travis-ci.org/owlbarn/owl.svg?branch=master)](https://travis-ci.org/owlbarn/owl)\n\nOwl is an emerging numerical library for scientific computing and engineering. The library is developed in the OCaml language and inherits all its powerful features such as static type checking, powerful module system, and superior runtime efficiency. Owl allows you to write succinct type-safe numerical applications in functional language without sacrificing performance, significantly reduces the cost from prototype to production use.\n\nBehind the scene, Owl builds the advanced numerical functions atop of its solid implementation of n-dimensional arrays. Quite different from other libraries, algorithmic differentiation and distributed computing have been included as integral components in the core library to maximise developers' productivity. Owl is young but grows fast, the current features include:\n\n* N-dimensional array (both dense and sparse)\n* Various number types: `float32`, `float64`, `complex32`, `complex64`, `int8`, `int16`, `int32` ...\n* Linear algebra and full interface to CBLAS and LAPACKE\n* Algorithmic differentiation (or automatic differentiation)\n* Neural network module for deep learning applications\n* Dynamic computational graph allowing greatest flexibility for applications\n* Parallel and Distributed engine (map-reduce, parameter server, etc.)\n* Advanced math and stats functions (e.g., hypothesis tests, MCMC, etc.)\n* Zoo system for efficient scripting and code sharing\n* GPU support (work in progress ...)\n\nYou can reach us in the following ways, looking forward to hearing from you!\n\n- [Email Me](mailto:liang.wang@cl.cam.ac.uk)\n- [Slack Channel](https://join.slack.com/t/owl-dev-team/shared_invite/enQtMjQ3OTM1MDY4MDIwLTA3MmMyMmQ5Y2U0NjJiNjI0NzFhZDAwNGFhODBmMTk4N2ZmNDExYjZiMzI2N2M1MGNiMTUyYTQ5MTAzZjliZDI)\n\n\n\n## Learning\n\nOwl's documentation contains a lot of learning materials to help you start. The full documentation consists of two parts: [Tutorial Book](http://www.cl.cam.ac.uk/~lw525/owl/chapter/index.html) and [API Reference](http://www.cl.cam.ac.uk/~lw525/owl/apidoc/index.html). Both are perfectly synchronised with the code in the repository by the automatic building system. You can access both parts with the following link.\n\n* [Owl's Full Documentation](http://www.cl.cam.ac.uk/~lw525/owl/)\n\n\n\n## Installation\n\nOwl requires OCaml `>=4.06.0`. The installation is rather trivial. There are four possible ways to try out Owl, as shown below, from the most straightforward one to the least one.\n\n### Option 1: Install from OPAM\n\nYou can simply type the following in the command line to start.\n\n```bash\nopam install owl\n```\n\nOwl's current version on OPAM is `0.2.9`, and it lags way behind the master branch (current `0.3.4`) and misses many new features. If you want to try the newest version, I recommend the other three ways to install.\n\n### Option 2: Pull from Docker Hub\n\nYou only need to pull in [Owl's docker image](https://hub.docker.com/r/owlbarn/owl/) and start a container, then play with it in `utop`. The source code is stored in `/root/owl` directory.\n\n```bash\ndocker pull owlbarn/owl\ndocker run -t -i owlbarn/owl\n```\n\nThere are several Linux distributions provided including an [ARM-based Ubuntu](https://github.com/owlbarn/owl/blob/master/docker/Dockerfile.ubuntu.arm). You can pull in a specific Owl image with corresponding tags.\n\n```bash\ndocker pull owlbarn/owl:ubuntu\ndocker pull owlbarn/owl:debian\ndocker pull owlbarn/owl:alpine\ndocker pull owlbarn/owl:centos\ndocker pull owlbarn/owl:opensuse\ndocker pull owlbarn/owl:fedora\n```\n\nAll these images are perfectly synced with the master branch by automatic building. You can check the building history on [Docker Hub](https://hub.docker.com/r/owlbarn/owl/builds/).\n\n### Option 3: Pin the Dev-Repo\n\n`opam pin` allows us to pin the local code to Owl's development repository on Github. The first command `opam depext` installs all the dependencies Owl needs.\n\n```bash\nopam depext owl\nopam pin add owl --dev-repo\n```\n\n### Option 4: Compile from Source\n\nFirst, you need to clone the repository.\n\n```bash\ngit clone git@github.com:owlbarn/owl.git\n```\nor with\n\n```bash\ngit clone https://github.com/owlbarn/owl.git\n```\n\nSecond, you need to figure out the missing dependencies and install them.\n\n```bash\njbuilder external-lib-deps --missing @install\n```\n\nLast, this is perhaps the most classic step.\n\n```bash\nmake && make install\n```\n\n### CBLAS/LAPACKE Dependency\n\nThe most important dependency is [OpenBLAS](https://github.com/xianyi/OpenBLAS). Linking to the correct OpenBLAS is the key to achieve the best performance. Depending on the specific platform, you can use `yum`, `apt-get`, `brew` to install the binary format. For example on Mac OSX,\n\n```bash\nbrew install openblas\n```\n\nHowever, installing from OpenBLAS source code leads to way better performance in my own experiment. In future, the dependency on OpenBLAS should also be resolved by `opam` automatically.\n\n### Integration to Toplevel\n\nOwl is well integrated with `utop`. You can use `utop` to try out the experiments in our tutorials. If you want `utop` to automatically load Owl for you, you can also edit `.ocamlinit` file in your home folder by adding the following lines. (Note that the library name is `owl` with lowercase `o`.)\n\n```bash\n#require \"owl-top\"\n```\n\nThe `owl-top` is the toplevel library of Owl, it automatically loads `owl` core library and installs the corresponding pretty printers of various data types.\n\n\n## Access Modules\n\n`Owl` currently has the following core modules and their names all start with `Owl_` to avoid name conflicts, e.g., `Owl_dense`, `Owl_sparse`, `Owl_maths`, `Owl_stats`, `Owl_const`, `Owl_fft`, `Owl_plot` and etc. After `utop` successfully loads `Owl` library, you can access the module functions using aforementioned names.\n\nHowever, a more convenient way is to use `Owl` module as an entry point which provides aliases of the core module names for easy access, e.g., `Owl.Dense` is the same as `Owl_dense`, and `Owl.Regression` is the same as `Owl_regression`. Given no name conflicts, you can simply open the whole `Owl` module for convenience as I will do in the rest of this tutorial.\n\n```ocaml\nopen Owl;;\n```\n\n\n## Create Matrices\n\n[`Dense.Matrix`](https://github.com/owlbarn/owl/blob/master/lib/owl_dense_matrix.ml) module supports dense matrix operations while [`Sparse.Matrix`](https://github.com/owlbarn/owl/blob/master/lib/owl_sparse_matrix.ml) module supports sparse ones. There are five submodules in `Dense.Matrix`:\n\n* `Dense.Matrix.S` module supports single precision float numbers `float32`;\n* `Dense.Matrix.D` module supports double precision float numbers `float64`;\n* `Dense.Matrix.C` module supports single precision complex numbers `complex32`;\n* `Dense.Matrix.Z` module supports double precision complex numbers `complex64`;\n* `Dense.Matrix.Generic` module supports all aforementioned number types via GADT.\n\nTo start, we can use `Dense.Matrix.D.uniform_int` to create a 5x5 random dense matrix.\n\n```ocaml\nlet x = Dense.Matrix.D.uniform_int 5 5;;\n```\n\nYou should see the following output in `utop`.\n\n```bash\n   C0 C1 C2 C3 C4\nR0 25  2 77 85 72\nR1 71 92 98 87 53\nR2 35 29 82 65 20\nR3  2 29 66 42 12\nR4 99 72 78 30 11\nval x : Owl_dense_matrix_d.mat =\n```\n\nTo save some typing efforts, we have made `Mat` as an alias of `Dense.Matrix.D` by assuming 64-bit float numbers are commonly used. Therefore, we can use `Mat` directly after open `Owl` instead of using `Dense.Matrix.D`. Similarly, there are also aliases for 64-bit float vectors and ndarrays (i.e., `Vec` and `Arr`) but we will talk about them later. `Mat` module also provides other functions to create various matrices, e.g., as below.\n\n```ocaml\nlet x = Mat.eye 5;;             (* identity matrix *)\nlet x = Mat.zeros 5 5;;         (* all elements are zeros *)\nlet x = Mat.ones 5 5;;          (* all elements are ones *)\nlet x = Mat.uniform 5 5;;       (* random matrix of uniform distribution *)\nlet x = Mat.gaussian 5 5;;      (* random matrix of gaussian distribution *)\nlet x = Mat.triu x;;            (* Upper triangular matrix *)\nlet x = Mat.toeplitz v;;        (* Toeplitz matrix *)\nlet x = Mat.hankel v;;          (* Hankel matrix *)\nlet x = Mat.hadamard 8;;        (* Hadamard matrix *)\nlet x = Mat.magic 8;;           (* Magic square matrix *)\n...\n```\n\nCombined with `Stats` module, you can also create any matrices of many distributions. E.g., the following code first creates an empty dense matrix, then initialise the elements with Bernoulli distribution. Test it in `utop`, you should get a dense matrix where half of the elements are zeros.\n\n```ocaml\nlet x = Mat.empty 8 8 |> Mat.map (fun _ -> Stats.Rnd.bernoulli 0.5 |> float_of_int);;\n```\n\nOr create a matrix where the elements follow Laplace distribution.\n\n```ocaml\nlet x = Mat.empty 8 8 |> Mat.map (fun _ -> Stats.Rnd.laplace 0.2);;\n```\n\nWith `Dense` module, you can also generate linearly spaced interval and meshgrids, e.g.,\n\n```ocaml\nlet x = Mat.linspace 0. 5. 6;;\n```\nwhich will return a 1x5 row vector as below\n```bash\n   C0  C1  C2  C3  C4  C5\nR0  0   1   2   3   4   5\nval x : Owl_dense_matrix_d.mat =\n```\n\nThe created matrices can be casted into other number types easily. For example the following code casts a `float32` matrix `x` into `complex64` matrix `y`.\n\n```ocaml\nlet x = Dense.Matrix.S.uniform 3 3;;\nlet y = Dense.Matrix.Generic.cast_s2z x;;\n```\n\nMatrices can be saved to and loaded from a file.\n\n```ocaml\nMat.save x \"matrix_01.data\";;  (* save the matrix to a file *)\nMat.load \"matrix_01.data\";;    (* load the matrix from a file *)\n```\n\n\n## Access Elements, Rows, and Columns\n\nBoth `Dense.Matrix` and `Sparse.Matrix` modules provide a wide range of operations to access the elements, rows, and columns of a matrix. You can refer to the full document in [`Dense.Matrix.Generic`](http://www.cl.cam.ac.uk/~lw525/owl/apidoc/owl_dense_matrix_generic.html). Here we just gave some simple examples briefly.\n\nYou can use `Mat.set` and `Mat.get` to manipulate individual element.\n\n```ocaml\nMat.set x 0 1 2.5;;\nMat.get x 0 1;;\n```\n\nMore conveniently, Owl provides a set of extending indexing and slicing operators as below. You can learn more in the tutorial on [Indexing and Slicing](http://www.cl.cam.ac.uk/~lw525/owl/chapter/slicing.html).\n\n```ocaml\nx.%{ [|0; 1|] } <- 2.5;;      (* Mat.set x 0 1 2.5 *)\nx.%{ [|0; 1|] };;             (* Mat.get x 0 1 *)\nx.${ [[0;4]; [6;-1]] };;      (* Mat.get_slice *)\nx.${ [[0;4]; [6;-1]] } <- b;; (* Mat.set_slice *)\n```\n\nWe can use `Mat.row` and `Mat.col` to retrieve a specific row or column of a matrix, or use `Mat.rows` and `Mat.cols` to retrieve multiple of them.\n\n```ocaml\nMat.row x 5;;            (* retrieve the fifth row *)\nMat.cols x [|1;3;2|];;   (* retrieve the column 1, 3, and 2 *)\n```\n\nE.g., the following code generates a random matrix, then scales up each element by a factor of 10 using `Mat.map` function.\n\n```ocaml\nlet x = Mat.(uniform 6 6 |> map (fun x -> x *. 10.));;\n```\n\nWe can iterate a matrix row by row, or column by column. The following code calculates the sum of each row by calling `Mat.map_rows` function.\n\n```ocaml\nlet x = Mat.(uniform 6 6 |> map_rows sum);;\n```\n\nWe can fold elements by calling `Mat.fold`, fold rows by calling `Mat.fold_rows`. Similarly, there are also functions for `filter` operations. The following code filters out the elements not greater than 0.1 in x.\n\n```ocaml\nMat.filter ((>) 0.1) x;;    (* not greater than 0.1 in x *)\n```\n\nWe can also do something more complicated, e.g., by filtering out the rows whose summation is greater than 3.\n\n```ocaml\nMat.filter_rows (fun r -> Mat.sum r > 3.) x;;\n```\n\nShuffle the rows and columns, or draw some of them from a matrix.\n\n```ocaml\nMat.shuffle_rows x;;     (* shuffle the rows in x *)\nMat.draw_cols x 3;;      (* draw 3 columns from x with replacement *)\n...\n```\n\nPractically, `Sparse.Matrix` module provides a subset of the similar operations for sparse matrices. In addition, `Sparse.Matrix` module also has extra functions such as only iterating non-zero elements `Sparse.Matrix.Generic.iter_nz`, and etc. Please read the full documentation for [`Sparse.Matrix.Generic`](http://www.cl.cam.ac.uk/~lw525/owl/apidoc/owl_sparse_matrix_generic.html) for details.\n\n\n## Linear Algebra\n\nSimple matrix mathematics like add, sub, multiplication, and division are included in `Dense` module. Moreover, there are predefined shorthands for such operations. E.g., the following code creates two random matrices then compare which is greater.\n\n```ocaml\nlet x = Mat.uniform 6 6;;\nlet y = Mat.uniform 6 6;;\nMat.(x > y);;                (* is x greater than y? return boolean *)\nMat.(x = y);;                (* is x equal to y? *)\nMat.(x =~ y);;               (* is x approximately equal to y? *)\nMat.(x <. y);;               (* is x smaller than y? return 0/1 matrix *)\n...\n```\n\nOwl natively supports broadcast operation similar to other numerical libraries. Some basic math operations includes:\n\n```ocaml\nMat.(x + y);;                (* addition of two matrices *)\nMat.(x * y);;                (* element-wise multiplication *)\nMat.(x *@ y);;               (* matrix multiplication of two matrices *)\nMat.(x +$ 2.);;              (* add a scalar to all elements in x *)\n...\n```\n\nApply various functions in `Maths` module to every element in x\n\n```ocaml\nMat.(Maths.atanh @@ x);;        (* apply atanh function *)\nMat.(Maths.airy_Ai @@ x);;      (* apply Airy function *)\n...\n```\n\nHowever, it is worth pointing out that `Mat` already implements many useful math functions. These functions are vectorised and are much faster than the example above which actually calls `Mat.map` for transformation.\n\n```ocaml\nMat.sin x;;         (* call sine function *)\nMat.erfc x;;        (* call erfc function *)\nMat.round x;;       (* call round function *)\nMat.signum x;;      (* call signum function *)\nMat.sigmoid x;;     (* apply sigmoid function *)\n...\n```\n\nConcatenate two matrices, vertically or horizontally by\n\n```ocaml\nMat.(x @= y);;              (* equivalent to Mat.concat_vertical *)\nMat.(x @|| y);;             (* equivalent to Mat.concat_horizontal *)\nMat.concatenate [|x;...|];; (* concatenate a list of matrices along rows *)\n```\n\nMore advanced linear algebra operations such as `svd`, `qr`, and `cholesky` decomposition are included in `Linalg` module. `Linalg` module also supports both real and complex number of single and double precision.\n\n```ocaml\nlet u,s,v = Linalg.D.svd x;;     (* singular value decomposition *)\nlet q,r = Linalg.D.qr x;;        (* QR decomposition *)\nlet l,u,_ = Linalg.D.lu x;;      (* LU decomposition *)\nlet l = Linalg.D.chol x;;        (* cholesky decomposition *)\n...\nlet e, v = Linalg.D.eig x;;      (* Eigenvectors and eigenvalues *)\nlet x = Linalg.D.null a;;        (* Solve A*x = 0, null space *)\nlet x = Linalg.D.linsolve a b;;  (* Solve A*x = B *)\nlet a, b = Linalg.D.linreg x y;; (* Simple linear regression y = a*x + b *)\n...\n```\n\n`Linalg` module offers additional functions to check the properties of a matrix. For example,\n\n```ocaml\nLinalg.D.cond x;;          (* condition number of x *)\nLinalg.D.rank x;;          (* rank of x *)\nLinalg.D.is_diag x;;       (* is it diagonal *)\nLinalg.D.is_triu x;;       (* is it upper triangular *)\nLinalg.D.is_tril x;;       (* is it lower triangular *)\nLinalg.D.is_posdef x;;     (* is it positive definite *)\nLinalg.D.is_symmetric x;;  (* is it symmetric *)\n...\n```\n\nOwl has implemented a complete set of OCaml interface to [`CBLAS`](https://github.com/owlbarn/owl/blob/master/src/owl/cblas/owl_cblas.mli) and [`LAPACKE`](https://github.com/owlbarn/owl/blob/master/src/owl/lapacke/owl_lapacke_generated.mli) libraries. You can utilise these highly optimised functions to achieve the best performance. However in most cases, you should only use the high-level functions in `Linalg` module rather than dealing with these low-level interface.\n\n\n\n## Regression\n\n`Regression` module currently includes `linear`, `exponential`, `nonlinear`, `ols`, `ridge`, `lasso`, `svm`, and etc. Most of them are based on a stochastic gradient descent algorithm implemented in `Optimise` module.\n\nIn the following, let's use an example to illustrate the simplest linear regression in `Regression` module. First, let's generate the measurement x which is a 1000 x 3 matrix. Each row of x is an independent measurement.\n\n```ocaml\nlet x = Mat.uniform 1000 3;;\n```\n\nNext let's define the parameter of a linear model, namely p, a 3 x 1 matrix.\n\n```ocaml\nlet p = Mat.of_array [|0.2;0.4;0.8|] 3 1;;\n```\n\nThen we generate the observations y from x and p by\n\n```ocaml\nlet y = Mat.(x *@ p);;\n```\n\nNow, assume we only know x and y, how can we fit x and y into a linear model? It is very simple.\n\n```ocaml\nlet p' = Regression.linear x y;;\n```\n\nFrom `utop`, you can see that p' equals `[|0.2; 0.4; 0.8|]` which is exactly the same as p. For other regression such as `lasso` and `svm`, the operation is more or less the same, please read Owl document for details.\n\n\n## Plotting\n\nThere is another separate [Tutorial on Plotting in Owl](http://www.cl.cam.ac.uk/~lw525/owl/chapter/plot.html).\nHerein, let's use an example to briefly show how to plot the result using `Plot` module. We first generate two mesh grids then apply sine function to them by using the operations introduced before.\n\n```ocaml\nlet x, y = Mat.meshgrid (-2.5) 2.5 (-2.5) 2.5 100 100 in\nlet z = Mat.(sin ((x * x) + (y * y))) in\nPlot.mesh x y z;;\n```\n\nNo matter what plot terminal you use, you should end up with a figure as below.\n\n![Plot example 01](examples/test_plot_01.png)\n\nBesides `Plot.mesh`, there are several other basic plotting functions in `Plot`. Even though the module is still immature and under active development, it can already do some fairly complicated plots with minimal coding efforts. E.g., the following code will generate a `2 x 2` subplot.\n\n```ocaml\nlet f p i = match i with\n  | 0 -> Stats.Rnd.gaussian ~sigma:0.5 () +. p.(1)\n  | _ -> Stats.Rnd.gaussian ~sigma:0.1 () *. p.(0)\nin\nlet y = Stats.gibbs_sampling f [|0.1;0.1|] 5_000 |> Mat.of_arrays in\nlet h = Plot.create ~m:2 ~n:2 \"\" in\nPlot.set_background_color h 255 255 255;\n\nPlot.subplot h 0 0;\nPlot.set_title h \"Bivariate model\";\nPlot.scatter ~h (Mat.col y 0) (Mat.col y 1);\n\nPlot.subplot h 0 1;\nPlot.set_title h \"Distribution of y\";\nPlot.set_xlabel h \"y\";\nPlot.set_ylabel h \"Frequency\";\nPlot.histogram ~h ~bin:50 (Mat.col y 1);\n\nPlot.subplot h 1 0;\nPlot.set_title h \"Distribution of x\";\nPlot.set_ylabel h \"Frequency\";\nPlot.histogram ~h ~bin:50 (Mat.col y 0);\n\nPlot.subplot h 1 1;\nPlot.set_foreground_color h 0 50 255;\nPlot.set_title h \"Sine function\";\nPlot.(plot_fun ~h ~spec:[ LineStyle 2 ] Maths.sin 0. 28.);\nPlot.autocorr ~h (Mat.sequential 1 28);\n\nPlot.output h;;\n```\n\nThe end result is as follows. You probably have already grasped the idea of how to plot in Owl. But I promise to write another separate post to introduce plotting in more details.\n\n![Plot example 04](examples/test_plot_04.png)\n\n\n## Maths and Stats\n\nThere are a lot of basic and advanced mathematical and statistical functions in `Maths` and `Stats` modules. The document lags significantly behind the development, so I recommend you to read the mli file directly at the moment.\n\n[`Stats`](https://github.com/owlbarn/owl/blob/master/src/owl/stats/owl_stats.mli) includes many functions for random numbers: `*_rvs` for random number generator, `*_pdf` for probably density/mass functions, `*_cdf` for cumulative density functions, `*_sf` for survival functions, `*_sf` for percentile functions, and etc. In addition, there are also many other statistical functions such as ranking correlations: `Stats.kendall_tau` and `Stats.spearman_rho`); hypothesis tests, and etc.\n\n\n## N-dimensional Array\n\nOwl has a very powerful module to manipulate dense N-dimensional arrays, i.e., [`Dense.Ndarray`](https://github.com/owlbarn/owl/blob/master/lib/owl_dense_ndarray.ml). Ndarray is very similar to the corresponding modules in Numpy and Julia. For sparse N-dimensional arrays, you can use `Sparse.Ndarray` which provides a similar set of APIs as aforementioned Ndarray. Here is an [initial evaluation](https://github.com/owlbarn/owl/wiki/Evaluation:-Performance-Test) on the performance of Ndarray.\n\nSimilar to `Matrix` module, `Ndarray` also has five submodules `S` (for `float32`), `D` (for `float32`), `C` (for `complex32`), `Z` (for `complex64`), and `Generic` (for all types) to handle different number types. There is an alias in `Owl` for double precision float ndarray (i.e., `Dense.Ndarray.D`) which is `Arr`. `Ndarray` also natively supports broadcast operations\n\nIn the following, I will present a couple of examples using `Dense.Ndarray` module. First, we can create empty ndarrays of shape `[|3;4;5|]`.\n\n```ocaml\nlet x0 = Dense.Ndarray.S.empty [|3;4;5|];;\nlet x1 = Dense.Ndarray.D.empty [|3;4;5|];;\nlet x2 = Dense.Ndarray.C.empty [|3;4;5|];;\nlet x3 = Dense.Ndarray.Z.empty [|3;4;5|];;\n```\n\nYou can also assign the initial values to the elements, generate a zero/one ndarray, or even a random ndarray.\n\n```ocaml\nDense.Ndarray.C.zeros [|3;4;5|];;\nDense.Ndarray.D.ones [|3;4;5|];;\nDense.Ndarray.S.create [|3;4;5|] 1.5;;\nDense.Ndarray.Z.create [|3;4;5|] Complex.({im=1.5; re=2.5});;\nDense.Ndarray.D.uniform [|3;4;5|];;\n```\n\nWith these created ndarray, you can do some math operation as below. Now, let's use shortcut `Arr` module to make examples.\n\n```ocaml\nlet x = Arr.uniform [|3;4;5|];;\nlet y = Arr.uniform [|3;4;5|];;\nlet z = Arr.add x y;;\nArr.print z;;\n```\n\nOwl supports many math operations and these operations have been well vectorised so they are very fast.\n\n```ocaml\nArr.sin x;;\nArr.tan x;;\nArr.exp x;;\nArr.log x;;\nArr.min x;;\nArr.add_scalar x 2.;;\nArr.mul_scalar x 2.;;\n...\n```\n\nExamining elements and comparing two ndarrays are also very easy.\n\n```ocaml\nArr.is_zero x;;\nArr.is_positive x;;\nArr.is_nonnegative x;;\n...\nArr.equal x y;;\nArr.greater x y;;\nArr.less_equal x y;;\n...\n```\n\nYou can certainly plugin your own functions to check each elements.\n\n```ocaml\nArr.exists ((>) 2.) x;;\nArr.not_exists ((<) 2.) x;;\nArr.for_all ((=) 2.) x;;\n```\n\nMost importantly, you can use Owl to index, slice, and iterate a ndarray in various ways. There are many functions to facilitate such operations: `iteri`, `iter`, `mapi`, `map`, `filteri`, `filter`, `foldi`, `fold`, `iteri_slice`, `iter_slice`, `iter2i`, `iter2`. Please refer to the tutorials on [Ndarray](http://www.cl.cam.ac.uk/~lw525/owl/chapter/ndarray.html) and [Indexing and Slicing](http://www.cl.cam.ac.uk/~lw525/owl/chapter/slicing.html).\n\n\n## Algorithmic Differentiation\n\nAlgorithmic differentiation (AD) is another key component in Owl which can make many analytical tasks so easy to perform. It is also often referred to as Automatic differentiation. Here is a [Wikipedia article](https://en.wikipedia.org/wiki/Automatic_differentiation) to help you understand the topic if you are interested in.\n\nThe AD support is provided `Algodiff` module. More precisely, `Algodiff.Numerical` provides numerical differentiation whilst `Algodiff.S` and `Algodiff.D` provides algorithmic differentiation for single and double precision float numbers respectively. For the detailed differences between the two, please read the wiki article as your starting point. Simply put, `Algodiff.S/D` is able to provide exact result of the derivative whereas `Algodiff.Numerical` is just approximation which is subject to round and truncate errors.\n\n`Algodiff.S` supports higher-order derivatives. Here is an example which calculates till the fourth derivative of `tanh` function.\n\n```ocaml\nopen Algodiff.S;;\n\n(* calculate derivatives of f0 *)\nlet f0 x = Maths.(tanh x);;\nlet f1 = f0 |> diff;;\nlet f2 = f0 |> diff |> diff;;\nlet f3 = f0 |> diff |> diff |> diff;;\nlet f4 = f0 |> diff |> diff |> diff |> diff;;\n```\n\nQuite easy, isn't it? Then we can plot the values of `tanh` and its four derivatives between interval `[-4, 4]`.\n\n```ocaml\nlet map f x = Vec.map (fun a -> a |> pack_flt |> f |> unpack_flt) x;;\n\n(* calculate point-wise values *)\nlet x = Vec.linspace (-4.) 4. 200;;\nlet y0 = map f0 x;;\nlet y1 = map f1 x;;\nlet y2 = map f2 x;;\nlet y3 = map f3 x;;\nlet y4 = map f4 x;;\n\n(* plot the values of all functions *)\nlet h = Plot.create \"plot_021.png\" in\nPlot.set_foreground_color h 0 0 0;\nPlot.set_background_color h 255 255 255;\nPlot.plot ~h x y0;\nPlot.plot ~h x y1;\nPlot.plot ~h x y2;\nPlot.plot ~h x y3;\nPlot.plot ~h x y4;\nPlot.output h;;\n```\n\nThen you should be able to see a figure like this one below. For more advanced use, please see my separate tutorial.\n\n![plot021](https://raw.githubusercontent.com/wiki/owlbarn/owl/image/plot_021.png)\n\n\n## Machine Learning and Neural Network\n\nEven though this is still work in progress, I find it necessary to present a small neural network example to show how necessary it is to have a comprehensive numerical infrastructure. The illustration in the following is of course the classic MNIST example wherein we will train a two-layer network that can recognise hand-written digits.\n\n`Neural` module has been included in `Owl` main library. To define a feedforward network, you can first open `Neural.S.Graph` in `utop`. `Neural.S.Graph` contains many easy-to-use wrappers to create different types of neuron node, `S` indicates the network is for single precision.\n\n```ocaml\nopen Neural.S;;\nopen Neural.S.Graph;;\n```\n\nNow, let's see how to define a two-layer neural network.\n\n```ocaml\nlet nn = input [|784|]\n  |> linear 300 ~act_typ:Activation.Tanh\n  |> linear 10  ~act_typ:Activation.(Softmax 1)\n  |> get_network\n;;\n```\n\nDone! Only three lines of code, that's easy, isn't it? Owl's `Neural` module is built atop of its `Algodiff` module. I am often amazed by the power of algorithmic differentiation while developing the neural network module, it just simplifies the design so much and makes life so easy.\n\nLet's look closer at what the code does: the first line defines the input shape of the neural network; the second line adds a linear layer (of shape `784 x 300`) with `Tanh` activation; the third line does the similar thing by adding another linear layer with `Softmax` activation. The input shape of each layer is automatically inferred for you. The last line `get_network` returns the created network for training.\n\nYou can print out the summary of the neural network by calling `Graph.print nn`, then you see the following output.\n\n```bash\nGraphical network\n\n[ Node input_0 ]:\n    Input : in/out:[*,784]\n    prev:[] next:[linear_1]\n\n[ Node linear_1 ]:\n    Linear : matrix in:(*,784) out:(*,300)\n    init   : standard\n    params : 235500\n    w      : 784 x 300\n    b      : 1 x 300\n    prev:[input_0] next:[activation_2]\n\n[ Node activation_2 ]:\n    Activation : tanh in/out:[*,300]\n    prev:[linear_1] next:[linear_3]\n\n[ Node linear_3 ]:\n    Linear : matrix in:(*,300) out:(*,10)\n    init   : standard\n    params : 3010\n    w      : 300 x 10\n    b      : 1 x 10\n    prev:[activation_2] next:[activation_4]\n\n[ Node activation_4 ]:\n    Activation : softmax in/out:[*,10]\n    prev:[linear_3] next:[]\n```\n\nHow to train the defined network now? You only need two lines of code to load the dataset and start training. By the way, calling `Dataset.download_all ()` will download all the data sets used in Owl (about 1GB uncompressed data).\n\n```ocaml\nlet x, _, y = Dataset.load_mnist_train_data () in\ntrain nn x y;;\n```\n\nYou may ask \"what if I want different training configuration?\" Well, the training and network module is actually very flexible and highly configurable. But I will talk about these details in another [separate tutorial](http://www.cl.cam.ac.uk/~lw525/owl/chapter/neural.html).\n\n\n## Distributed & Parallel Computing\n\nOwl's distributed and parallel computing relies on my another research prototype - Actor System. Actor is a specialised distributed data processing framework. Please do not get confused with [Actor Model](https://en.wikipedia.org/wiki/Actor_model) since Owl's Actor system actually implements three engines: MapReduce, Parameter Server, and Peer-to-Peer.\n\nMy design principle of distributed analytics is: Owl handles \"analytics\" whilst Actor deals with \"distribution\" with a suitable engine. Two systems can be composed through functors just like we play LEGO. This composition includes both low-level data structures and high-level models.\n\nFor example, the following one-line code composes Owl's Ndarray with Actor's MapReduce engine to provide us a distributed Ndarray module `M1`.\n\n```ocaml\nmodule M1 = Owl_parallel.Make_Distributed (Dense.Ndarray.D) (Actor_mapre)\n```\n\nSimilarly, for high-level neural network models, we only need to add one extra line of code to transform a single-node training model to a distributed training model. Note that we have composed Owl's Feedforward neural network with Actor's Parameter Server engine.\n\n```ocaml\nmodule M2 = Owl_neural_parallel.Make (Owl_neural_feedforward) (Actor_param)\n```\n\nActor system is currently in a closed repository (due to my techreport writing). I will introduce this exciting feature very soon (in September).\n\n\n## How To Contribute\n\nOwl is under active development, and I really look forward to your comments and contributions. Besides setting up a complete development environment on your native system, the easiest way to contribute is to use the [Owl Docker Images](https://hub.docker.com/r/owlbarn/owl/). Moreover, we have also built a docker image for ARM-based platform so that you can run Owl on Raspberry PI and Cubietruck (see the section above).\n\nJust pull the image and dig into code saved in `/root/owl`, then have fun!\n\n**Student Projects:** If you happen to be a student in the [Computer Lab](http://www.cl.cam.ac.uk/) and want to do some challenging development and design, here are some [Part II Project suggestions](http://www.cl.cam.ac.uk/research/srg/netos/stud-projs/studproj-17/#owl0). If you are interested in more researchy topics, I also offer Part III Projects -- please contact me directly via [Email](mailto:liang.wang@cl.cam.ac.uk).\n\n**Acknowledgement: Funded in part by EPSRC project - Contrive (EP/N028422/1).** Please refer to the [full acknowledgement](https://github.com/owlbarn/owl/blob/master/ACKNOWLEDGEMENT.md) for more details.\n\n**Contribution Agreement:** Contributions must comply with the [Developer's Certificate of Origin](https://developercertificate.org/), which means you need to sign off your commits. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2090:3CC8A:17DBD3:5E2E44:6AB92BAD"},"text_sha256":"cacae9317377e941df6335876927ab7d2bf8ccf504ea73e0138cb5ce651ca496"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2180","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0863:725A9:17E10DC:1C06626:6AB92BAE"},"commit":{"sha":"3e66ccb0b1d21b73fa703f3d3f416ec0107860a4","url":"https://github.com/owlbarn/owl/commit/3e66ccb0b1d21b73fa703f3d3f416ec0107860a4","date":"2025-09-23T16:17:38Z","author_date":"2025-09-23T16:17:38Z","committer_date":"2025-09-23T16:17:38Z","tree_sha":"6f2ec590fd92d589147c3f384962afb928b58f24","message_first_line":"fix(owl/stats): use correct paramterised gaussian (#694)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2179","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:1804FC1:1C2A1AC:6AB92BAF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5450,"blob_sha":"55c58325168abce95d10af9cb02658ab8ac7d9f1","priority":0}],"documents":[{"path":"README.md","size":5450,"blob_sha":"55c58325168abce95d10af9cb02658ab8ac7d9f1","priority":0,"status":200,"text":"# Owl - OCaml Scientific Computing \n[![build](https://github.com/owlbarn/owl/actions/workflows/main.yml/badge.svg)](https://github.com/owlbarn/owl/actions/workflows/main.yml)\n[![build](https://github.com/owlbarn/owl/actions/workflows/deploy_docker.yml/badge.svg)](https://github.com/owlbarn/owl/actions/workflows/deploy_docker.yml)\n\nOwl is a dedicated system for scientific and engineering computing. The system is developed in OCaml and licensed under MIT. The project is originated by [Liang Wang](https://liang.ocaml.xyz) and currently led by [Jianxin Zhao](https://jianxin.ocaml.xyz). The history of the project can be seen on the [Wikipedia](https://en.wikipedia.org/wiki/Owl_Scientific_Computing) page.\n\n## Functionalities \n\nOwl provides a wide range of scientific computing functionalities: \n\n- mathematical function, from the basic `log`, `sin` etc., to special functions such as the Beta and Gamma functions\n- integration; interpolation and extrapolation\n- statistics and probability; e.g. generation of random number and various distributions \n- various computation on n-dimensional arrays (tensors), including advanced slicing and broadcasting \n- linear algebra\n- ordinary differential equations \n- discrete Fourier Transform algorithms for signal processing \n- algorithmic differentiation, or automatic differentiation\n- various optimization algorithms\n- regression algorithms\n- deep neural network and natural language processing with the optional support of computation graph optimization\n- dataframe processing\n- visualization (with the help of external package `owl-plot`)\n\n## Installation\n\nPlease follow the [tutorial](https://ocaml.xyz/tutorial/chapters/introduction.html) about installing Owl. You can also start by trying the [docker images](https://hub.docker.com/r/matrixanger/owl). \n\n## Mission\n\nOur mission is to push the frontier of high-performance scientific computing, provide both researchers and industry programmers a powerful framework to write concise, fast and safe analytical code. The system aims to serve as the de-facto tool for computation intensive tasks in OCaml.\nOwl is the de-facto scientific computing library in OCaml. Currently we aim to actively maintain it and keep it stable, utilizing the limited time and human resource we have.\n\nThe current code base is designed to be concise and self-contained. \nWe encourage anyone who would like to build up their own tools based on Owl to create new repositories in the [Owlbarn](https://github.com/owlbarn) organization. \n\n## Owl Code Structure \n\n\nTo help potential developers to understand the structure of Owl, here we briefly describe its overall design. More detailed description can be found in the [documentation](https://ocaml.xyz/docs/) and the Owl [books](https://ocaml.xyz/).\n\n![Owl architecture 1](examples/owl-structure1.svg)\n\nOwl provides a basic data structure for modern numerical computing: n-dimensional array (Ndarray). It is based on the mathematics, linear algebra, and statistics functions, which are built on both OCaml and C functions and libraries. \n\n![Owl architecture 2](examples/owl-structure2.svg)\n\nSharing the same set of interface with Ndarray is the `base` system data architecture, which is implemented in pure OCaml. It is also based on modules that are implemented in OCaml. However, though it is sufficient for daily use for normal computing, the base version Ndarray does not implement some advanced functions as in the previous Owl version Ndarray, and its performance is understandably much slower.\n\n![Owl architecture 3](examples/owl-structure3.svg)\n\nBesides these two types of Ndarray, another type is CGraph-Ndarray, which can be used to support symbolic style computing like TensorFlow v1. It facilitate building computation graph and computation optimization. \nThe CGraph-Ndarray can be built up by wrapping up either of the previous two types of Ndarray, which are used for actual execution of computing.\nAll three types of Ndarray can be used to support advanced computing modules, including algorithmic differentiation, optimization, and neural networks.\n\n\n## Code of Contributing \n\nIn principle any change to the code base is made via a GitHub Pull Request (PR). Pull requests must be reviewed and approved by at least two key developers in the Owl Team.\n\nTeam members are responsible for the issues and PRs concerning the domain aspects they claim, and are also responsible for fixing the problems caused by accepting such PRs.\n\nIf a PR is large or involves significant update or changes to the code structure, an issue should be submitted for the community and team members to discuss, and it then can be decided by the corresponding team member and project leader.\n\nIf an issue or PR does not belong to any team member's domain aspect, the response will also be on a best-effort basis with no guaranteed response time. \n\nPlease check the full [contributing rules](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) of the Owl project for more detail. \n\n## Community \n\nThe Owl community is based on the [OCaml Discourse](https://discuss.ocaml.org/) and [Owl Slack channel](https://owl-dev-team.slack.com/).  All participants in the community are encouraged to provide support for new users within the project management infrastructure. Those seeking technical support should also recognize that all support activities within the project is voluntary and is therefore provided as and when time permits.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C54:09BF:B22C0:2E1919:6AB92BAF"},"text_sha256":"12ebe1866343381921b1780f1b758314a8e6e1786ce81f7e9f2b9a7a18736d32"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sebp/scikit-survival","input_row":{"repository":"sebp/scikit-survival","url":"https://github.com/sebp/scikit-survival","name":"scikit-survival","owner":"sebp","description":"Survival analysis built on top of scikit-learn","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1321,"issues":255,"created_at":"2016-12-26T22:15:53Z","updated_at":"2026-09-27T07:40:32Z","first_commit_at":"2015-06-08T19:46:52Z","last_commit_at":"2026-09-27T07:40:27Z","activity_months":135.63,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:00.590Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sebp/scikit-survival","visibility":"public","created_at":"2016-12-26T22:15:53Z","updated_at":"2026-09-27T07:40:32Z","private":false,"fork":false,"archived":false,"stargazers_count":1321,"open_issues_count":30,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2178","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:1808156:1C2D362:6AB92BB0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2177","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DE:70FF5:17D9D41:1BFEB4A:6AB92BB0"},"commit":{"sha":"683c40bc57163d47cf731bf13b5139f53549d71a","url":"https://github.com/sebp/scikit-survival/commit/683c40bc57163d47cf731bf13b5139f53549d71a","date":"2018-04-21T16:48:40Z","author_date":"2018-04-21T10:38:44Z","committer_date":"2018-04-21T16:48:40Z","tree_sha":"25ec25098dd909f074ce6ad1f17d3df3f1dc1277","message_first_line":"AppVeyor: Initialize git submodules"},"tree_request_status":200,"tree_rate":{"github_remaining":"2176","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:17D9D7D:1BFEB93:6AB92BB1"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5178,"blob_sha":"19db686a9b8d4774adbbc1bb583fbd1d1eeddd74","priority":0}],"documents":[{"path":"README.rst","size":5178,"blob_sha":"19db686a9b8d4774adbbc1bb583fbd1d1eeddd74","priority":0,"status":200,"text":"***************\nscikit-survival\n***************\n\n.. image:: https://img.shields.io/badge/license-GPLv3-blue.svg\n  :target: COPYING\n  :alt: License\n\n.. image:: https://travis-ci.org/sebp/scikit-survival.svg?branch=master\n  :target: https://travis-ci.org/sebp/scikit-survival\n  :alt: Travis CI Build Status\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/sebp/scikit-survival?branch=master&svg=true\n   :target: https://ci.appveyor.com/project/sebp/scikit-survival\n   :alt: AppVeyor Build Status\n\n.. image:: https://codecov.io/gh/sebp/scikit-survival/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/sebp/scikit-survival\n  :alt: codecov\n\n.. image:: https://api.codacy.com/project/badge/Grade/17242004cdf6422c9a1052bf1ec63104\n   :target: https://www.codacy.com/app/sebp/scikit-survival?utm_source=github.com&utm_medium=referral&utm_content=sebp/scikit-survival&utm_campaign=badger\n   :alt: Codacy Badge\n\n.. image:: https://readthedocs.org/projects/scikit-survival/badge/?version=latest\n  :target: https://scikit-survival.readthedocs.io/en/latest/\n  :alt: readthedocs.org\n\nscikit-survival is a Python module for `survival analysis`_\nbuilt on top of `scikit-learn <http://scikit-learn.org/>`_. It allows doing survival analysis\nwhile utilizing the power of scikit-learn, e.g., for pre-processing or doing cross-validation.\n\n=======================\nAbout Survival Analysis\n=======================\n\nThe objective in `survival analysis`_ (also referred to as reliability analysis in engineering)\nis to establish a connection between covariates and the time of an event.\nWhat makes survival analysis differ from traditional machine learning is the fact that\nparts of the training data can only be partially observed – they are *censored*.\n\nFor instance, in a clinical study, patients are often monitored for a particular time period,\nand events occurring in this particular period are recorded.\nIf a patient experiences an event, the exact time of the event can\nbe recorded – the patient’s record is uncensored. In contrast, right censored records\nrefer to patients that remained event-free during the study period and\nit is unknown whether an event has or has not occurred after the study ended.\nConsequently, survival analysis demands for models that take\nthis unique characteristic of such a dataset into account.\n\n============\nRequirements\n============\n\n- Python 3.5 or later\n- cvxpy\n- cvxopt\n- numexpr\n- numpy 1.10 or later\n- pandas 0.19 or later\n- scikit-learn 0.19\n- scipy 0.17 or later\n- C/C++ compiler\n\n============\nInstallation\n============\n\nThe easiest way to get started is to install `Anaconda <https://store.continuum.io/cshop/anaconda/>`_\nand setup an environment::\n\n  conda install -c sebp scikit-survival\n\n----------------------\nInstalling from source\n----------------------\n\nFirst, create a new environment, named ``sksurv``::\n\n  conda create -n sksurv -c sebp python=3 --file requirements.txt\n\n\nTo work in this environment, ``activate`` it as follows::\n\n  source activate sksurv\n\nIf you are on Windows, run the above command without the ``source`` in the beginning.\n\nOnce you setup your build environment, you have to compile the C/C++\nextensions and install the package by running::\n\n  python setup.py install\n\nAlternatively, if you want to use the package without installing it,\nyou can compile the extensions in place by running::\n\n  python setup.py build_ext --inplace\n\nTo check everything is setup correctly run the test suite by executing::\n\n  nosetests\n\n========\nExamples\n========\n\nAn `Introduction to Survival Analysis with scikit-survival <https://nbviewer.jupyter.org/github/sebp/scikit-survival/blob/master/examples/00-introduction.ipynb>`_\nis available as `Jupyter notebook <https://jupyter.org/>`_.\n\n=============\nDocumentation\n=============\n\nThe source code is thoroughly documented and a HTML version of the API documentation\nis available at https://scikit-survival.readthedocs.io/en/latest/.\n\nYou can generate the documentation yourself using `Sphinx <http://sphinx-doc.org/>`_ 1.4 or later::\n\n  cd doc\n  make html\n  xdg-open _build/html/index.html\n\n==========\nReferences\n==========\n\nPlease cite the following papers if you are using **scikit-survival**.\n\n1. Pölsterl, S., Navab, N., and Katouzian, A.,\n`Fast Training of Support Vector Machines for Survival Analysis <http://link.springer.com/chapter/10.1007/978-3-319-23525-7_15>`_.\nMachine Learning and Knowledge Discovery in Databases: European Conference,\nECML PKDD 2015, Porto, Portugal,\nLecture Notes in Computer Science, vol. 9285, pp. 243-259 (2015)\n\n2. Pölsterl, S., Navab, N., and Katouzian, A.,\n`An Efficient Training Algorithm for Kernel Survival Support Vector Machines <https://arxiv.org/abs/1611.07054>`_.\n4th Workshop on Machine Learning in Life Sciences,\n23 September 2016, Riva del Garda, Italy\n\n3. Pölsterl, S., Gupta, P., Wang, L., Conjeti, S., Katouzian, A., and Navab, N.,\n`Heterogeneous ensembles for predicting survival of metastatic, castrate-resistant prostate cancer patients <http://doi.org/10.12688/f1000research.8231.1>`_.\nF1000Research, vol. 5, no. 2676 (2016).\n\n.. _survival analysis: https://en.wikipedia.org/wiki/Survival_analysis\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11DC:09ED:E5999:3F65C7:6AB92BB1"},"text_sha256":"7f7e9c5823baa5ee30853650a3f500133ffab2a722a3babbcf17f67a7bf680e9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2175","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:18681DE:1C8D65E:6AB92BB2"},"commit":{"sha":"fcccd2166223af4a392ea056495715a39c61c520","url":"https://github.com/sebp/scikit-survival/commit/fcccd2166223af4a392ea056495715a39c61c520","date":"2026-06-29T06:00:16Z","author_date":"2026-06-29T05:59:47Z","committer_date":"2026-06-29T06:00:16Z","tree_sha":"5bb3355d6b4b7c001e4b087929813d4d8d025fd8","message_first_line":"CI: Run pre-commit on all files"},"tree_request_status":200,"tree_rate":{"github_remaining":"2174","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0800:62B94:17C5FA6:1BEAF82:6AB92BB2"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5345,"blob_sha":"2f5e5b24d834fe4b77b4f50c99cc5363d88a4799","priority":0}],"documents":[{"path":"README.rst","size":5345,"blob_sha":"2f5e5b24d834fe4b77b4f50c99cc5363d88a4799","priority":0,"status":200,"text":"|License| |Docs| |DOI|\n\n|build-tests| |Codecov| |Codacy|\n\n***************\nscikit-survival\n***************\n\nscikit-survival is a Python module for `survival analysis`_\nbuilt on top of `scikit-learn <https://scikit-learn.org/>`_. It allows doing survival analysis\nwhile utilizing the power of scikit-learn, e.g., for pre-processing or doing cross-validation.\n\n=======================\nAbout Survival Analysis\n=======================\n\nThe objective in `survival analysis`_ (also referred to as time-to-event or reliability analysis)\nis to establish a connection between covariates and the time of an event.\nWhat makes survival analysis differ from traditional machine learning is the fact that\nparts of the training data can only be partially observed – they are *censored*.\n\nFor instance, in a clinical study, patients are often monitored for a particular time period,\nand events occurring in this particular period are recorded.\nIf a patient experiences an event, the exact time of the event can\nbe recorded – the patient’s record is uncensored. In contrast, right censored records\nrefer to patients that remained event-free during the study period and\nit is unknown whether an event has or has not occurred after the study ended.\nConsequently, survival analysis demands for models that take\nthis unique characteristic of such a dataset into account.\n\n============\nRequirements\n============\n\n- Python 3.11 or later\n- ecos\n- joblib\n- numexpr\n- numpy 2.0.0 or later\n- osqp\n- pandas 2.2.0 or later\n- scikit-learn 1.9\n- scipy\n- narwhals 2.0.1 or later\n- C/C++ compiler\n\n============\nInstallation\n============\n\nThe easiest way to install scikit-survival is to use\n`conda-forge <https://conda-forge.org/docs/user/introduction/>`_ by running::\n\n  conda install -c conda-forge scikit-survival\n\nAlternatively, you can install scikit-survival `from PyPI <https://scikit-survival.readthedocs.io/en/stable/install.html#pip>`_\nor `from source <https://scikit-survival.readthedocs.io/en/stable/install.html#from-source>`_.\n\n========\nExamples\n========\n\nThe `user guide <https://scikit-survival.readthedocs.io/en/stable/user_guide/index.html>`_ provides\nin-depth information on the key concepts of scikit-survival, an overview of available survival models,\nand hands-on examples in the form of `Jupyter notebooks <https://jupyter.org/>`_.\n\n================\nHelp and Support\n================\n\n**Documentation**\n\n- HTML documentation for the latest release: https://scikit-survival.readthedocs.io/en/stable/\n- HTML documentation for the development version (main branch): https://scikit-survival.readthedocs.io/en/latest/\n- For a list of notable changes, see the `release notes <https://scikit-survival.readthedocs.io/en/stable/release_notes.html>`_.\n\n**Bug reports**\n\n- If you encountered a problem, please submit a\n  `bug report <https://github.com/sebp/scikit-survival/issues/new?template=bug_report.md>`_.\n\n**Questions**\n\n- If you have a question on how to use scikit-survival, please use `GitHub Discussions <https://github.com/sebp/scikit-survival/discussions>`_.\n- For general theoretical or methodological questions on survival analysis, please use\n  `Cross Validated <https://stats.stackexchange.com/questions/tagged/survival>`_.\n\n============\nContributing\n============\n\nNew contributors are always welcome. Please have a look at the\n`contributing guidelines <https://scikit-survival.readthedocs.io/en/latest/contributing.html>`_\non how to get started and to make sure your code complies with our guidelines.\n\n==========\nReferences\n==========\n\nPlease cite the following paper if you are using **scikit-survival**.\n\n  S. Pölsterl, \"scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn,\"\n  Journal of Machine Learning Research, vol. 21, no. 212, pp. 1–6, 2020.\n\n.. code::\n\n  @article{sksurv,\n    author  = {Sebastian P{\\\"o}lsterl},\n    title   = {scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn},\n    journal = {Journal of Machine Learning Research},\n    year    = {2020},\n    volume  = {21},\n    number  = {212},\n    pages   = {1-6},\n    url     = {http://jmlr.org/papers/v21/20-729.html}\n  }\n\n.. |License| image:: https://img.shields.io/badge/license-GPLv3-blue.svg\n  :target: COPYING\n  :alt: License\n\n.. |Codecov| image:: https://codecov.io/gh/sebp/scikit-survival/branch/main/graph/badge.svg\n  :target: https://codecov.io/gh/sebp/scikit-survival\n  :alt: codecov\n\n.. |Codacy| image:: https://api.codacy.com/project/badge/Grade/17242004cdf6422c9a1052bf1ec63104\n   :target: https://app.codacy.com/gh/sebp/scikit-survival/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade\n   :alt: Codacy Badge\n\n.. |Docs| image:: https://readthedocs.org/projects/scikit-survival/badge/?version=latest\n  :target: https://scikit-survival.readthedocs.io/en/latest/\n  :alt: readthedocs.org\n\n.. |DOI| image:: https://zenodo.org/badge/77409504.svg\n   :target: https://zenodo.org/badge/latestdoi/77409504\n   :alt: Digital Object Identifier (DOI)\n\n.. |build-tests| image:: https://github.com/sebp/scikit-survival/actions/workflows/tests-workflow.yaml/badge.svg?branch=main\n  :target: https://github.com/sebp/scikit-survival/actions?query=workflow%3Atests+branch%3Amain\n  :alt: GitHub Actions Tests Status\n\n.. _survival analysis: https://en.wikipedia.org/wiki/Survival_analysis\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5C20:38C7FC:17EB0F:5A79C2:6AB92BB1"},"text_sha256":"693ff8a62f92487275bd9b6e386f73bb39bfb833489e6c7034e4fd30aff8f6f0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ARM-software/armnn","input_row":{"repository":"ARM-software/armnn","url":"https://github.com/ARM-software/armnn","name":"armnn","owner":"ARM-software","description":"Arm NN ML Software.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1316,"issues":769,"created_at":"2018-03-09T12:11:48Z","updated_at":"2026-09-22T20:30:44Z","first_commit_at":"2018-03-09T14:13:49Z","last_commit_at":"2026-07-02T11:24:16Z","activity_months":99.769999999999996,"ai_ml_match_topics":"machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:03.242Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ARM-software/armnn","visibility":"public","created_at":"2018-03-09T12:11:48Z","updated_at":"2026-09-22T20:30:44Z","private":false,"fork":false,"archived":false,"stargazers_count":1316,"open_issues_count":3,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2173","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17D7780:1BFBB24:6AB92BB3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2172","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D3:52542:17C7C0D:1BECF0E:6AB92BB3"},"commit":{"sha":"3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0","url":"https://github.com/ARM-software/armnn/commit/3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0","date":"2018-05-23T12:09:07Z","author_date":"2018-05-18T15:31:43Z","committer_date":"2018-05-23T12:09:07Z","tree_sha":"5950603ad78ec3fe56fb31ddc7f4d52a19f5bc60","message_first_line":"Release 18.05"},"tree_request_status":200,"tree_rate":{"github_remaining":"2171","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:17B1CB0:1BD6D3C:6AB92BB4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":301,"blob_sha":"02628ffd20fb2fa164c5bad874eeee3dd4ca9cb4","priority":0}],"documents":[{"path":"README.md","size":301,"blob_sha":"02628ffd20fb2fa164c5bad874eeee3dd4ca9cb4","priority":0,"status":200,"text":"# Arm NN\n\nFor more information about Arm NN, see: https://developer.arm.com/products/processors/machine-learning/arm-nn\n\nThere is a getting started guide here: https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/configuring-the-arm-nn-sdk-build-environment\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"90AC:1A3D83:186A4D:5EBDE0:6AB92BB3"},"text_sha256":"84184571f47d67adb1ab62a243182e3d234d0072b5e8780c54117825a93a1a66"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2170","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081C:0BA1:D8DA59:FED87E:6AB92BB4"},"commit":{"sha":"51e3253748650f87942163c0b2a51ff38f79a377","url":"https://github.com/ARM-software/armnn/commit/51e3253748650f87942163c0b2a51ff38f79a377","date":"2026-06-26T13:22:02Z","author_date":"2026-06-26T13:22:02Z","committer_date":"2026-06-26T13:22:02Z","tree_sha":"dd9b9752764eb9750475fe2c29184092fa167842","message_first_line":"fix: Adjust Android binary page size to 16 KB (#822)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2169","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0824:74E6D:180AE27:1C30425:6AB92BB5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16120,"blob_sha":"451ace9f2b0e7e083b51d2627471edb3ad471839","priority":0},{"path":"SECURITY.md","size":4192,"blob_sha":"41ebdbc0c3420e18861bab99a0f7a77027fcd373","priority":1}],"documents":[{"path":"README.md","size":16120,"blob_sha":"451ace9f2b0e7e083b51d2627471edb3ad471839","priority":0,"status":200,"text":"<br>\n<div align=\"center\">\n  <img src=\"Arm_NN_horizontal_blue.png\" alt=\"Arm NN Logo\" width=\"300\"/>\n<\/div>\n\n* [Quick Start Guides](#quick-start-guides)\n* [Pre-Built Binaries](#pre-built-binaries)\n* [Software Overview](#software-overview)\n* [Get Involved](#get-involved)\n* [Contributions](#contributions)\n* [Disclaimer](#disclaimer)\n* [License](#license)\n* [Inclusive language commitment](#inclusive-language-commitment)\n* [Third-party](#third-party)\n* [Build Flags](#build-flags)\n\n# Arm NN\n\n**Arm NN**  is now a legacy project and is no longer actively maintained by Arm. As a result, no further updates,\nincluding security patches and functional improvements, should be expected, and users should be aware that the project\nmay not be secure against untrusted inputs or hostile environments.\nAccordingly, it is strongly recommended that **Arm NN** only be used in trusted contexts.\n\n**Arm NN** is the **most performant** machine learning (ML) inference engine for Android and Linux, accelerating ML\non **Arm Cortex-A CPUs and Arm Mali GPUs**. This ML inference engine is an open source SDK which bridges the gap\nbetween existing neural network frameworks and power-efficient Arm IP.\n\nArm NN outperforms generic ML libraries due to **Arm architecture-specific optimizations** (e.g. SVE2) by utilizing\n**[Arm Compute Library (ACL)](https://github.com/ARM-software/ComputeLibrary/)**. To target Arm Ethos-N NPUs, Arm NN\nutilizes the [Ethos-N NPU Driver](https://github.com/ARM-software/ethos-n-driver-stack). For Arm Cortex-M acceleration,\nplease see [CMSIS-NN](https://github.com/ARM-software/CMSIS_5).\n\nArm NN is written using portable **C++17** and built using [CMake](https://cmake.org/) - enabling builds for a wide\nvariety of target platforms, from a wide variety of host environments. **Python** developers can interface with Arm NN\nthrough the use of our **Arm NN TF Lite Delegate**.\n\n\n## Quick Start Guides\n**The Arm NN TF Lite Delegate provides the widest ML operator support in Arm NN** and is an easy way to accelerate\nyour ML model. To start using the TF Lite Delegate, first download the **[Pre-Built Binaries](#pre-built-binaries)** for\nthe latest release of Arm NN. Using a Python interpreter, you can load your TF Lite model into the Arm NN TF Lite\nDelegate and run accelerated inference. Please see this\n**[Quick Start Guide](delegate/DelegateQuickStartGuide.md)** on GitHub or this more comprehensive\n**[Arm Developer Guide](https://developer.arm.com/documentation/102561/latest/)** for information on how to accelerate\nyour TF Lite model using the Arm NN TF Lite Delegate.\n\nWe provide Debian packages for Arm NN, which are a quick way to start using Arm NN and the TF Lite Parser\n(albeit with less ML operator support than the TF Lite Delegate). There is an installation guide available\n[here](InstallationViaAptRepository.md) which provides instructions on how to install the Arm NN Core and the TF Lite\nParser for Ubuntu 20.04.\n\nTo build Arm NN from scratch, we provide the **[Arm NN Build Tool](build-tool/README.md)**. This tool consists of\n**parameterized bash scripts** accompanied by a **Dockerfile** for building Arm NN and its dependencies, including\n**[Arm Compute Library (ACL)](https://github.com/ARM-software/ComputeLibrary/)**. This tool replaces/supersedes the\nmajority of the existing Arm NN build guides as a user-friendly way to build Arm NN. The main benefit of building\nArm NN from scratch is the ability to **exactly choose which components to build, targeted for your ML project**.<br>\n\n\n## Pre-Built Binaries\n\n| Operating System                              | Architecture-specific Release Archive (Download)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Android 11 \"R/Red Velvet Cake\" (API level 30) | [![](https://img.shields.io/badge/download-arm64--v82a-orange)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-30-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v8a-orange)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-30-arm64-v8a.tar.gz)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n| Android 12 \"S/Snow Cone\" (API level 31)       | [![](https://img.shields.io/badge/download-arm64--v82a-yellow)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-31-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v8a-yellow)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-31-arm64-v8a.tar.gz)  [![](https://img.shields.io/badge/download-arm64--v86a-yellow)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-31-arm64-v8.6-a.tar.gz)  [![](https://img.shields.io/badge/download-arm64--v86asve-yellow)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-31-arm64-v8.6-a-sve.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86asve2-yellow)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-31-arm64-v8.6-a-sve2.tar.gz) |\n| Android 13 \"T/Tiramisu\" (API level 33)        | [![](https://img.shields.io/badge/download-arm64--v82a-purple)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-33-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86a-purple)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-33-arm64-v8.6-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86asve-purple)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-33-arm64-v8.6-a-sve.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86asve2-purple)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-33-arm64-v8.6-a-sve2.tar.gz)                                                                                                                                                                    |\n| Android 14 \"U/Upside Down Cake\" (API level 34)| [![](https://img.shields.io/badge/download-arm64--v82a-blue)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-34-arm64-v8.2-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86a-blue)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-34-arm64-v8.6-a.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86asve-blue)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-34-arm64-v8.6-a-sve.tar.gz) [![](https://img.shields.io/badge/download-arm64--v86asve2-blue)](https://github.com/ARM-software/armnn/releases/download/v26.01/ArmNN-android-34-arm64-v8.6-a-sve2.tar.gz)                                                                                                                                                                            |\n\nArm NN also provides pre-built multi-isa binaries for Android. The v8a binary includes support from basic v8a architecture and upwards. \nThe v8.2a binary includes support from v8.2a and upwards. These include support for SVE, SVE2, FP16 and some dot product kernels.\nThese kernels need appropriate hardware to work on.\n\n\n| Multi ISA Architecture | Release Archive (Download)                                                                                                                                                              |\n|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Linux Arm v8a          | [![](https://img.shields.io/badge/download-arm64--v8a-pink)](https://github.com/ARM-software/armnn/releases/download/v26.01/MULTI_ISA-GCC11-ArmNN+ACL-linux-armv8a.tar.gz)              |\n| Linux Arm v8.2a        | [![](https://img.shields.io/badge/download-arm64--v82a-violet)](https://github.com/ARM-software/armnn/releases/download/v26.01/MULTI_ISA-GCC11-ArmNN+ACL-linux-armv8.2-a.tar.gz)        |\n| Android 31 v8a         | [![](https://img.shields.io/badge/download-android--v8a-tan)](https://github.com/ARM-software/armnn/releases/download/v26.01/MULTI_ISA-ArmNN+ACL+SL-android-31-arm64-v8a.tar.gz)        |\n| Android 31 v8.2a       | [![](https://img.shields.io/badge/download-android--v82a-indigo)](https://github.com/ARM-software/armnn/releases/download/v26.01/MULTI_ISA-ArmNN+ACL+SL-android-31-arm64-v8.2-a.tar.gz) |\n\n\n\n## Software Overview\nThe Arm NN SDK supports ML models in **TensorFlow Lite** (TF Lite) and **ONNX** formats.\n\n**Arm NN's TF Lite Delegate** accelerates TF Lite models through **Python or C++ APIs**. Supported TF Lite operators\nare accelerated by Arm NN and any unsupported operators are delegated (fallback) to the reference TF Lite runtime -\nensuring extensive ML operator support. **The recommended way to use Arm NN is to\n[convert your model to TF Lite format](https://www.tensorflow.org/lite/convert) and use the TF Lite Delegate.** Please\nrefer to the [Quick Start Guides](#quick-start-guides) for more information on how to use the TF Lite Delegate.\n\nArm NN also provides **TF Lite and ONNX parsers** which are C++ libraries for integrating TF Lite or ONNX models\ninto your ML application. Please note that these parsers do not provide extensive ML operator coverage as compared\nto the Arm NN TF Lite Delegate.\n\n**Android** ML application developers have a number of options for using Arm NN:\n* Download and use our [Pre-Built Binaries](#pre-built-binaries) for the Android platform\n* Build Arm NN from scratch with the Android NDK using this [GitHub guide](BuildGuideAndroidNDK.md)\n\nArm also provides an [Android-NN-Driver](https://github.com/ARM-software/android-nn-driver) which implements a\nhardware abstraction layer (HAL) for the Android NNAPI. When the Android NN Driver is integrated on an Android device,\nML models used in Android applications will automatically be accelerated by Arm NN.\n\n**For more information about the Arm NN components, please refer to our\n[documentation](https://github.com/ARM-software/armnn/wiki/Documentation).**\n\nFor FAQs and troubleshooting advice, see the [FAQ](docs/FAQ.md) or take a look at previous\n[GitHub Issues](https://github.com/ARM-software/armnn/issues).\n\n\n## Get Involved\nThe best way to get involved is by using our software. If you need help or encounter an issue, please raise it as a\n[GitHub Issue](https://github.com/ARM-software/armnn/issues). Feel free to have a look at any of our open issues too.\nWe also welcome feedback on our documentation.\n\nFeature requests without a volunteer to implement them are closed, but have the 'Help wanted' label, these can be\nfound [here](https://github.com/ARM-software/armnn/issues?q=is%3Aissue+label%3A%22Help+wanted%22+).\nOnce you find a suitable Issue, feel free to re-open it and add a comment, so that Arm NN engineers know you are\nworking on it and can help.\n\nWhen the feature is implemented the 'Help wanted' label will be removed.\n\n\n## Contributions\nThe Arm NN project welcomes contributions. For more details on contributing to Arm NN please see the [Contributor Guide](CONTRIBUTING.md).\n\nParticularly if you'd like to implement your own backend next to our CPU, GPU and NPU backends there are guides for\nbackend development: [Backend development guide](src/backends/README.md),\n[Dynamic backend development guide](src/dynamic/README.md).\n\n\n## Disclaimer\nThe armnn/tests directory contains tests used during Arm NN development. Many of them depend on third-party IP, model\nprotobufs and image files not distributed with Arm NN. The dependencies for some tests are available freely on\nthe Internet, for those who wish to experiment, but they won't run out of the box.\n\n\n## License\nArm NN is provided under the [MIT](https://spdx.org/licenses/MIT.html) license.\nSee [LICENSE](LICENSE) for more information. Contributions to this project are accepted under the same license.\n\nIndividual files contain the following tag instead of the full license text.\n\n    SPDX-License-Identifier: MIT\n\nThis enables machine processing of license information based on the SPDX License Identifiers that are available\nhere: http://spdx.org/licenses/\n\n\n## Inclusive language commitment\nArm NN conforms to Arm's inclusive language policy and, to the best of our knowledge, does not contain any non-inclusive language.\n\nIf you find something that concerns you, please email terms@arm.com\n\n\n## Third-party\nThird party tools used by Arm NN:\n\n| Tool           | License (SPDX ID) | Description                    | Version | Provenience                          |\n|----------------|-------------------|------------------------------------------------------------------|---------|--------------------------------------|\n| cxxopts        | MIT               | A lightweight C++ option parser library | 3.1.1   | https://github.com/jarro2783/cxxopts |\n| doctest        | MIT               | Header-only C++ testing framework | 2.4.6   | https://github.com/onqtam/doctest    |\n| fmt            | MIT               | {fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams. | 8.30    | https://github.com/fmtlib/fmt  |\n| ghc            | MIT               | A header-only single-file std::filesystem compatible helper library | 1.3.2   | https://github.com/gulrak/filesystem |\n| half           | MIT               | IEEE 754 conformant 16-bit half-precision floating point library | 1.12.0  | http://half.sourceforge.net          |\n| mapbox/variant | BSD               | A header-only alternative to 'boost::variant' | 1.1.3   | https://github.com/mapbox/variant    |\n| stb            | MIT               | Image loader, resize and writer | 2.16    | https://github.com/nothings/stb      |\n\n\n## Build Flags\nArm NN uses the following security related build flags in their code:\n\n| Build flags\t      |\n|---------------------|\n| -Wall\t              |\n| -Wextra             |\n| -Wold-style-cast    |\n| -Wno-missing-braces |\n| -Wconversion        |\n| -Wsign-conversion   |\n| -Werror             |\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3D08:3B6DE:176BCE:5DBE38:6AB92BB4"},"text_sha256":"ce8bef77d4cc50103e5d5ab3d133007a618303a1b25fc92fd02d07c74bef01c5"},{"path":"SECURITY.md","size":4192,"blob_sha":"41ebdbc0c3420e18861bab99a0f7a77027fcd373","priority":1,"status":200,"text":"**Reporting vulnerabilities**\n\nArm takes security issues seriously and welcomes feedback from researchers and the security community in order to improve the security of its products and services. We operate a coordinated disclosure policy for disclosing vulnerabilities and other security issues.\n\nSecurity issues can be complex and one single timescale doesn't fit all circumstances. We will make best endeavours to inform you when we expect security notifications and fixes to be available and facilitate coordinated disclosure when notifications and patches/mitigations are available.\n\n**Report**\n\nFor all security issues, contact Arm by email at [arm-security@arm.com](mailto:arm-security@arm.com).\n\n**Secure submission using PGP**\n\nWe support and encourage secure submission of vulnerability reports using PGP, using the key below. If you would like replies to be encrypted, please provide your own public key through a secure mechanism.\n\n~~~\n-----BEGIN PGP PUBLIC KEY BLOCK-----\nmQINBFr7/RMBEACjHR5QZL/z1t2aLCRNXLE4KJiQmCo7edU5Be+7MTjIJDzZNu68\nlNEUYRoLexeayif8eC4T19bUsSbGpxHiYsFFjV8ewLXDyDJRRuaBGPfQ5rn/mE6X\nNvu+9Pputr+mB1R3CXcvrNkhmzPkK7zVM15oeyBMhogqPssuT4OeMduQdip8smfK\nxTMk91RrJTLb+G3eE1tf+81kXBYvzp2e24Sn0/VeYe0IWnBobjVBZk3TmcYxDvz5\nY47fU9V6cNj3Zq4VYrgxuLoFCA2VtetyiFQm5IYa3Bt3SWcAwihr8nbR2HoNdWyA\nu8wJYYVzSq3hvT5l/IjTHxEcY+6RBq8poDSsftzvX386u9hmw7sJQFlTw6/pUjdr\ngbsZ2ZzRBzKtU17ercpn4kU6VgVP3WRB5HiTFFkEpZuqAznOYaHbMq4dfd/g7Quq\nC0VTbWiJnhku2i+g4BdHHRDtIF6U3aVQAfbrDb1LjVTa65p5ULOeY3HRAWtMNtu/\nCj8cD98JDanzXtcnisds8vMQ8LZ6iMFChEnF8K4V0eLw9Ju6CMNiFYY7SEBndD/H\nM4KcU4li7mROSbJcshgEbe1SYkxdMuI9eY4DNYxl3VjxoPUGzeqXo/ADFKE9bHsi\nGTyEoij4ku0HspLVKnYHXn/LqHGwEcwjF8zphS+w5cn/e01akYwz5EVSQwARAQAB\ntB1Bcm0gU3VwcG9ydCA8c3VwcG9ydEBhcm0uY29tPokCTgQTAQgAOBYhBN9zqDwZ\nRL/vF0ihcdfNKdz4bBRiBQJa+/0TAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA\nAAoJENfNKdz4bBRibK0P/jLlJR/QYypcjb+8BnHT9tCDgcV2KFYXS15VpbSNviN9\nXs/UOnSadoGUMGCXDyb1PRNn98yUn7JlNR9rtsqPRmkpbo5cuw46ehgxjVlfcHnk\nCttaE8Davx6zo0fyrBib2+oVVW8usi9+uRK4vhhPUicO3oXwzldsVFz+RbpubZxc\nBg/CZ+dQ2jMKOv1zDtInOG6OBnbQZRAeiWXgGhcIoPZ4zBQOi8nr0+bLcfvMeZi2\nuz6uKnylpXwZbl4ijcG8MKV/ei+7du+SzA9NY0WOT2g3FXDREWUhjKs8bmEZgIx4\nQgvDNpxAUThF+TqQ7zrsA8nT8POvDD0MhN/Z+A3QdPTdcaZFaXzIdxbDg+0FKmzu\nOgtQBH4C01RWrkmZlhO5w7/Qjt0vLlhfyQIL9BW/HeEPtjnH2Hnq8xYnZhlVqJEh\nFJU7F9sMvyiJiKviobFTd6AmpVkhxhcJ3k2L2C03imTsmUwAoejQCXwiYcOhyQ2t\nZ9Nk8YIZTEw2urGFi4HSQPwPq2j/2j7ABJ4rlzJvO6vs5ppGkumvzIIP9JnpVXbp\nwcbK6Ev6KdkX4s14Mzd6Hsd8LpL8t5nHhxUey6G0xKe2eSlHVm5Mlfhoete9UmIZ\ndzIOZkgTgWXlYXRIxwGQ2Pss7pURtofykvLklq4jcobQuHxurl9cteodETfbWk/J\nuQINBFr7/RMBEADWZG8eqt5D22g3T7ehnH/T3fuTX8LPUBnODMWGAEUY8uv64To8\n46odvrXFgWBgCf0sROEyJchc3SGLyR9S4lJsVJRde3QLN3WZkHlB4pSn4IQHFyQd\nwsLQi+S9uggHMPlQ6MNvc5n0P3k5bT9fLUmtJWJ3QVjW7k963ZXpzf1zbQJqs30w\nrlqGUZllfRoYQTfcYxFEaUFhwRJ//skNImWH8Vz+PTnqg2zRtFn3usrBV4GpNvsM\n6jy+YEsSvUa7IY8k4wpPzEhIfqDjGbZxFSQ1H1G+mLUL+DD7oGffej/ZoC86TIdM\np6ew1rGhJdQBLh9nx+1ADOLWjNo2R0h60u7VR5q/K6V4fwWmeGFipPXZCD92I+nR\nt/cjznwNyD/6J9YrBMF7mbGrS1TyfLaLt4tpdcBnsgqDTodd5OmG65mroXsg/lNO\n7YZdecLZ34krfaLrWTtKkqULXbppB+uQvbVj8p8ONRImn6bZ+iAhnNaH9wJ06ico\nb1F0imJ2SJWnFr6PzPRr0gPStLgu9wrRKheaORwF/H/HxSyPZxNVxFqu81q518A/\nplhub9INQLaxHf/TTjXpqZCcfdNTYUAW8rwbQfW9doSIT4lHY8bJXktb6BsVjkFj\nPzDeYpXeOoTWetQqsEuTdg/F+qg041QBLtNj9Lr3Vy3StgMciRUIP8m0XwARAQAB\niQI2BBgBCAAgFiEE33OoPBlEv+8XSKFx180p3PhsFGIFAlr7/RMCGwwACgkQ180p\n3PhsFGLWMA//V/XKrnI2YBh/SptUrgg7knPXva45bb7tGSH1fJg8f/wqycOSFFCY\nES45boA5jlQ3z8uw6BYCz5KeOucGhxAMw+x5EDdxZ33ksY5zqXB35WaMXzEwGYYb\nE113/yhOsTbzu4bBKABSXbJO98MdAWvWpyCpp2MHIR3S9+ycM7/FMZ5xi3czZNRg\n9+WZP+7W4qWhJptQ0kBh5C3N/tiltju5WQ2Y7XIn+5dMOJdtseFS7CNerxXZGAtH\nnfRxaD/4ENdbWOwaVJiVW7+ioUJz09OWgy0gLYSDW+hciDnW1QAaJLpdAbniGZ0S\nJsTmaZla8JnUKqZPgbFfA2OcnH9H+DWc0pHv17c5tJzTMP7rgirgGRX/U2LOzmFZ\n1UxjQj5nn3Oa5frXbIAzb8xKiR0VDaquCM/3sti1AesYiS0Gw0Sqnw8qpFypgFXN\nCKVgYXppIT+TmbDbNJDOB2UycxeI4vbiBwU8fI4qSpW12WsGdAJt/rx3UsyhZ+02\n4aSqDHzhJmtDPQ6lnaKe1fUkC90tgp8loVGmriWQx82jAQMqATVjIklTpE4vm00f\nocQIWOKEE90mKNEoV6rNbfl5QevmapTVdV/pmrRBzhbsa1uAUS4HZdH0Nf/OXEyv\nyYCr2gCFPymkkRYhPr2w5EgbWyzLaBIwqjyIbXaveuB3DYi2Lhbf64I=\n=EaN7\n-----END PGP PUBLIC KEY BLOCK-----\n~~~\n\nFor more information visit https://developer.arm.com/support/arm-security-updates/report-security-vulnerabilities\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4DA:345ED4:179463:5DE6AA:6AB92BB6"},"text_sha256":"f79e2507e84768f663137e104442b8a45d4e91062a8cd83b99baf52659f8c06d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jfkirk/tensorrec","input_row":{"repository":"jfkirk/tensorrec","url":"https://github.com/jfkirk/tensorrec","name":"tensorrec","owner":"jfkirk","description":"A TensorFlow recommendation algorithm and framework in Python.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1299,"issues":126,"created_at":"2017-02-28T18:51:11Z","updated_at":"2026-09-17T16:58:55Z","first_commit_at":"2017-02-28T18:51:11Z","last_commit_at":"2020-02-04T21:10:25Z","activity_months":35.189999999999998,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:07.179Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jfkirk/tensorrec","visibility":"public","created_at":"2017-02-28T18:51:11Z","updated_at":"2026-09-17T16:58:55Z","private":false,"fork":false,"archived":false,"stargazers_count":1299,"open_issues_count":40,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2168","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0825:37D6E2:1813DEB:1C39215:6AB92BB7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2167","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17D421A:1BF9503:6AB92BB7"},"commit":{"sha":"02cc0d00054acd125feebb9ac30c1dd2519616df","url":"https://github.com/jfkirk/tensorrec/commit/02cc0d00054acd125feebb9ac30c1dd2519616df","date":"2018-05-10T14:24:53Z","author_date":"2018-05-10T14:24:53Z","committer_date":"2018-05-10T14:24:53Z","tree_sha":"ffce3733f77662273d132fe536a004b370dc371a","message_first_line":"DOC: Adds keras announcement blog post"},"tree_request_status":200,"tree_rate":{"github_remaining":"2166","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E3:72BD3:18001F4:1C25352:6AB92BB7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2278,"blob_sha":"7d2748242906e466680f7e9f0495f2191291341a","priority":0}],"documents":[{"path":"README.md","size":2278,"blob_sha":"7d2748242906e466680f7e9f0495f2191291341a","priority":0,"status":200,"text":"# TensorRec\nA TensorFlow recommendation algorithm and framework in Python.\n\n[![PyPI version](https://badge.fury.io/py/tensorrec.svg)](https://badge.fury.io/py/tensorrec) [![Build Status](https://travis-ci.org/jfkirk/tensorrec.svg?branch=master)](https://travis-ci.org/jfkirk/tensorrec) [![Gitter chat](https://badges.gitter.im/tensorrec/gitter.png)](https://gitter.im/tensorrec)\n\n## What is TensorRec?\nTensorRec is a Python recommendation system that allows you to quickly develop recommendation algorithms and customize them using TensorFlow.\n\nTensorRec lets you to customize your recommendation system's embedding functions and loss functions while TensorRec handles the data manipulation, scoring, and ranking to generate recommendations.\n\nA TensorRec system consumes three pieces of data: `user_features`, `item_features`, and `interactions`. It uses this data to learn to make and rank recommendations.\n\nFor an overview of TensorRec and its usage, please see the [wiki.](https://github.com/jfkirk/tensorrec/wiki)\n\nFor more information, and for an outline of this project, please read [this blog post](https://medium.com/@jameskirk1/tensorrec-a-recommendation-engine-framework-in-tensorflow-d85e4f0874e8).\n\n![TensorRec System Diagram](https://raw.githubusercontent.com/jfkirk/tensorrec/master/examples/system_diagram.png)\n\n### Example: Basic usage\n```python\nimport numpy as np\nimport tensorrec\n\n# Build the model with default parameters\nmodel = tensorrec.TensorRec()\n\n# Generate some dummy data\ninteractions, user_features, item_features = tensorrec.util.generate_dummy_data(\n    num_users=100,\n    num_items=150,\n    interaction_density=.05\n)\n\n# Fit the model for 5 epochs\nmodel.fit(interactions, user_features, item_features, epochs=5, verbose=True)\n\n# Predict scores and ranks for all users and all items\npredictions = model.predict(user_features=user_features,\n                            item_features=item_features)\npredicted_ranks = model.predict_rank(user_features=user_features,\n                                     item_features=item_features)\n\n# Calculate and print the recall at 10\nr_at_k = tensorrec.eval.recall_at_k(predicted_ranks, interactions, k=10)\nprint(np.mean(r_at_k))\n```\n\n## Quick Start\nTensorRec can be installed via pip:\n```pip install tensorrec```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B328:1A3D83:186A8E:5EBE7A:6AB92BB8"},"text_sha256":"db4fd86c4e7eb24f900f633857de3ed43a1570349e3d790abbc30bb02bf9826b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2165","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17CAD08:1BEF46C:6AB92BB8"},"commit":{"sha":"80690737ac039a5b41fc99e67372c4f67d8cfc51","url":"https://github.com/jfkirk/tensorrec/commit/80690737ac039a5b41fc99e67372c4f67d8cfc51","date":"2020-02-04T21:10:25Z","author_date":"2020-02-04T21:10:25Z","committer_date":"2020-02-04T21:10:25Z","tree_sha":"9a441ec6f00a01f2df4b4076c180601a1ccb4c9d","message_first_line":"Merge pull request #157 from timgates42/bugfix/typo_predictions"},"tree_request_status":200,"tree_rate":{"github_remaining":"2164","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:179884E:1BBC573:6AB92BB8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2918,"blob_sha":"d2369d6ec5185bac243997f6b06bef71b06b34f6","priority":0}],"documents":[{"path":"README.md","size":2918,"blob_sha":"d2369d6ec5185bac243997f6b06bef71b06b34f6","priority":0,"status":200,"text":"# TensorRec\nA TensorFlow recommendation algorithm and framework in Python.\n\n[![PyPI version](https://badge.fury.io/py/tensorrec.svg)](https://badge.fury.io/py/tensorrec) [![Build Status](https://travis-ci.org/jfkirk/tensorrec.svg?branch=master)](https://travis-ci.org/jfkirk/tensorrec) [![Gitter chat](https://badges.gitter.im/tensorrec/gitter.png)](https://gitter.im/tensorrec)\n\n## NOTE: TensorRec is not under active development\n\nTensorRec will not be receiving any more planned updates. Please feel free to open pull requests -- I am happy to review them.\n\nThank you for your contributions, support, and usage of TensorRec!\n\n-James Kirk, @jfkirk\n\nFor similar tools, check out:\n\n[TensorFlow Ranking](https://github.com/tensorflow/ranking/)\n\n[Spotlight](https://github.com/maciejkula/spotlight)\n\n[LightFM](https://github.com/lyst/lightfm)\n\n## What is TensorRec?\nTensorRec is a Python recommendation system that allows you to quickly develop recommendation algorithms and customize them using TensorFlow.\n\nTensorRec lets you to customize your recommendation system's representation/embedding functions and loss functions while TensorRec handles the data manipulation, scoring, and ranking to generate recommendations.\n\nA TensorRec system consumes three pieces of data: `user_features`, `item_features`, and `interactions`. It uses this data to learn to make and rank recommendations.\n\nFor an overview of TensorRec and its usage, please see the [wiki.](https://github.com/jfkirk/tensorrec/wiki)\n\nFor more information, and for an outline of this project, please read [this blog post.](https://medium.com/@jameskirk1/tensorrec-a-recommendation-engine-framework-in-tensorflow-d85e4f0874e8)\n\nFor an introduction to building recommender systems, please see [these slides.](https://www.slideshare.net/JamesKirk58/boston-ml-architecting-recommender-systems)\n\n![TensorRec System Diagram](https://raw.githubusercontent.com/jfkirk/tensorrec/master/examples/system_diagram.png)\n\n### Example: Basic usage\n```python\nimport numpy as np\nimport tensorrec\n\n# Build the model with default parameters\nmodel = tensorrec.TensorRec()\n\n# Generate some dummy data\ninteractions, user_features, item_features = tensorrec.util.generate_dummy_data(\n    num_users=100,\n    num_items=150,\n    interaction_density=.05\n)\n\n# Fit the model for 5 epochs\nmodel.fit(interactions, user_features, item_features, epochs=5, verbose=True)\n\n# Predict scores and ranks for all users and all items\npredictions = model.predict(user_features=user_features,\n                            item_features=item_features)\npredicted_ranks = model.predict_rank(user_features=user_features,\n                                     item_features=item_features)\n\n# Calculate and print the recall at 10\nr_at_k = tensorrec.eval.recall_at_k(predicted_ranks, interactions, k=10)\nprint(np.mean(r_at_k))\n```\n\n## Quick Start\nTensorRec can be installed via pip:\n```pip install tensorrec```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F55A:3C4A0:17BDB4:5E1126:6AB92BB8"},"text_sha256":"9f8d4431c4bdb11d0b4aa0142225ff730cc0ac1bc55375a67f0d84546727a940"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"FenTechSolutions/CausalDiscoveryToolbox","input_row":{"repository":"FenTechSolutions/CausalDiscoveryToolbox","url":"https://github.com/FenTechSolutions/CausalDiscoveryToolbox","name":"CausalDiscoveryToolbox","owner":"FenTechSolutions","description":"Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1242,"issues":148,"created_at":"2017-05-31T09:12:45Z","updated_at":"2026-09-27T01:28:48Z","first_commit_at":"2017-05-31T09:18:05Z","last_commit_at":"2025-10-13T07:40:06Z","activity_months":100.42,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:09.533Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"FenTechSolutions/CausalDiscoveryToolbox","visibility":"public","created_at":"2017-05-31T09:12:45Z","updated_at":"2026-09-27T01:28:48Z","private":false,"fork":false,"archived":false,"stargazers_count":1242,"open_issues_count":74,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2163","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:178AD2D:1BB000E:6AB92BB9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2162","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:17F685C:1C1A7C7:6AB92BB9"},"commit":{"sha":"1f6a8b117967448dd45e62996cca0aab2f89e7b0","url":"https://github.com/FenTechSolutions/CausalDiscoveryToolbox/commit/1f6a8b117967448dd45e62996cca0aab2f89e7b0","date":"2018-05-24T08:31:56Z","author_date":"2018-05-24T08:31:56Z","committer_date":"2018-05-24T08:31:56Z","tree_sha":"977f78d6a12c6cf58ba62bc766deb4530ad9d226","message_first_line":"Update requires"},"tree_request_status":200,"tree_rate":{"github_remaining":"2161","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:17F68AB:1C1A814:6AB92BBA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10018,"blob_sha":"835a1a46c44782632878ce9f68b47b33f650b963","priority":0}],"documents":[{"path":"README.md","size":10018,"blob_sha":"835a1a46c44782632878ce9f68b47b33f650b963","priority":0,"status":200,"text":"# Causal Discovery Toolbox\n\nPackage for causal inference in graphs and in the pairwise settings for Python>=3.5. Tools for graph structure recovery and dependencies are included. The package is based on Numpy, Scikit-learn, Pytorch and R.\n\n[![Build Status](https://travis-ci.org/Diviyan-Kalainathan/CausalDiscoveryToolbox.svg?branch=master)](https://travis-ci.org/Diviyan-Kalainathan/CausalDiscoveryToolbox)\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg?maxAge=259200)](https://raw.githubusercontent.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/master/LICENSE.md)\n[![Python.pm](https://img.shields.io/badge/python-3.5%2C%203.6-lightgrey.svg?maxAge=259200)](#)\n[![version](https://img.shields.io/badge/version-0.2-yellow.svg?maxAge=259200)](#)\n\nIt implements lots of algorithms for graph structure recovery (including algorithms from the __bnlearn__, __pcalg__ packages), mainly based out of observational data.\n\nAn example of application of the toolbox on the LUCAS dataset (on Lung cancer) using CGNNs can be found here : [jupyter-notebook](https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/master/examples/Discovery_LUCAS.ipynb)\n\nInstall it using pip: (See more details on installation below)\n```sh\npip install cdt\n```\n\n## Installation\n\nThe packages requires a python version >=3.5, as well as some libraries listed in [requirements file](https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/master/requirements.txt). For some additional functionalities, more libraries are needed for these extra functions and options to become available. Here is a quick install guide of the package, starting off with the minimal install up to the full installation. \n\n**Note** : A (mini/ana)conda framework would help installing all those packages and therefore could be recommended for non-expert users. \n\n### Install PyTorch\nAs some of the key algorithms in the _cdt_ package use the PyTorch package, it is required to install it. \nCheck out their website to install the PyTorch version suited to your hardware configuration: http://pytorch.org\n\n### Install the CausalDiscoveryToolbox package\nThe package is available on PyPi:\n```sh\npip install cdt\n```\nOr you can also install it from source.\n```sh\n$ git clone https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox.git  # Download the package \n$ cd CausalDiscoveryToolbox\n$ pip install -r requirements.txt  # Install the requirements\n$ python setup.py install develop --user\n```\n**The package is then up and running ! You can run most of the algorithms in the CausalDiscoveryToolbox, you might get warnings: some additional features are not available**\n\nFrom now on, you can import the library using :\n```python\nimport cdt\n```\nCheck out the package structure and more info on the package itself [here](https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/master/documentation.md).  \n\n### Additional : R and R libraries\nIn order to have access to additional algorithms from various R packages such as bnlearn, kpcalg, pcalg, ... while using the _cdt_ framework, it is required to install R.\n\nCheck out how to install all R dependencies in the before-install section of the [travis.yml](https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/master/.travis.yml) file for debian based distributions. \nThe [r-requirements file](https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/master/r_requirements.txt) notes all the R packages used by the toolbox.\n\n\n## Overview\n### General package structure\nThe following figure shows how the package and its algorithms are structured\n\n\n```\ncdt package\n|\n|- independence\n|  |- skeleton (Infering the skeleton from data, and removing spurious connections)\n|  |  |- Lasso variants (Randomized Lasso[1], Glasso[2], HSICLasso[3])\n|  |  |- FSGNN (CGNN variant for feature selection)\n|  |  |- Network deconvolution[4]\n|  |  |- Skeleton recovery using feature selection algorithms (RFECV[5], LinearSVR[6], RRelief[7], ARD[8,9], DecisionTree)\n|  |- stats (pairwise methods for dependency)\n|     |- Correlation (Pearson, Spearman, KendallTau)\n|     |- Kernel based (NormalizedHSIC[10])\n|     |- Mutual information based (MIRegression, Adjusted Mutual Information[11], Normalized mutual information[11])\n|\n|- generators\n|  |- RandomGraphFromData (Generate a random graph similar to inputdata)\n|  |- RandomGraphGenerator (Generates a random graph, can generate pairs of variables)\n|  |- generate_graph_with_structure (generates a graph with a fixed structure)\n|\n|- causality\n|  |- graph (methods for graph inference)\n|  |  |- CGNN[12] method (In tensorflow, pytorch version needs revision)\n|  |  |- PC[13]\n|  |  |- GES[13]\n|  |  |- GIES[13]\n|  |  |- LiNGAM[13]\n|  |  |- CAM[13]\n|  |- pairwise (methods for pairwise inference)\n|     |- ANM[14] (Additive Noise Model)\n|     |- IGCI[15] (Information Geometric Causal Inference)\n|     |- RCC[16] (Randomized Causation Coefficient)\n|     |- NCC[17] (Neural Causation Coefficient)\n|     |- GNN[12] (Generative Neural Network -- Part of CGNN )\n|     |- Bivariate fit (Baseline method of regression)\n|     |- GPI[18], PNL[19], Jarfo[20] to implement\n|\n|- utils\n   |- Settings -> CGNN_SETTINGS, SETTINGS (hardware settings)\n   |- Loss -> MMD loss [21, 22] & various other loss functions\n   |- metrics -> Implements the metrics for graph scoring\n   |- Formats -> for importing data formats\n   |- Graph -> defines the DirectedGraph and UndirectedGraph class (see below)\n\n\n```\n\n### Hardware and algorithm settings\nThe toolbox has a SETTINGS class that defines the hardware settings . Those settings are unique and their default parameters are defined in **_cdt/utils/Settings_**.\n\nThese parameters are accessible and overridable via accessing the class :\n\n```python\nimport cdt\ncdt.SETTINGS\n```\n\nMoreover, the hardware parameters are detected and defined automatically (including number of GPUs, CPUs, available optional packages) at the **import** of the package using the **cdt.utils.Settings.autoset_settings** method, run at startup.\n\n### The graph class\nThe whole package revolves around using the **DiGraph** and **Graph** classes from the **networkx** package.\n\n### References\n\n- [1] Wang, S., Nan, B., Rosset, S., & Zhu, J. (2011). Random lasso. The annals of applied statistics, 5(1), 468.\n- [2] Friedman, J., Hastie, T., & Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3), 432-441.\n- [3] Yamada, M., Jitkrittum, W., Sigal, L., Xing, E. P., & Sugiyama, M. (2014). High-dimensional feature selection by feature-wise kernelized lasso. Neural computation, 26(1), 185-207.\n- [4] Feizi, S., Marbach, D., Médard, M., & Kellis, M. (2013). Network deconvolution as a general method to distinguish direct dependencies in networks. Nature biotechnology, 31(8), 726-733.\n- [5] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). Gene selection for cancer classification using support vector machines. Machine learning, 46(1), 389-422.\n- [6] Vapnik, V., Golowich, S. E., & Smola, A. J. (1997). Support vector method for function approximation, regression estimation and signal processing. In Advances in neural information processing systems (pp. 281-287).  \n- [7] Kira, K., & Rendell, L. A. (1992, July). The feature selection problem: Traditional methods and a new algorithm. In Aaai (Vol. 2, pp. 129-134).\n- [8] MacKay,  D.  J.  (1992). Bayesian interpolation. Neural Computation, 4, 415–447.\n- [9] Neal, R. M. (1996). Bayesian learning for neural networks. No. 118 in Lecture Notes in Statistics. New York: Springer.\n- [10] Gretton, A., Bousquet, O., Smola, A., & Scholkopf, B. (2005, October). Measuring statistical dependence with Hilbert-Schmidt norms. In ALT (Vol. 16, pp. 63-78).\n- [11] Vinh, N. X., Epps, J., & Bailey, J. (2010). Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. Journal of Machine Learning Research, 11(Oct), 2837-2854.\n- [12] Goudet, O., Kalainathan, D., Caillou, P., Lopez-Paz, D., Guyon, I., Sebag, M., ... & Tubaro, P. (2017). Learning functional causal models with generative neural networks. arXiv preprint arXiv:1709.05321.\n- [13] Spirtes, P., Glymour, C., Scheines, R. (2000). Causation, Prediction, and Search. MIT press.  \n- [14] Hoyer, P. O., Janzing, D., Mooij, J. M., Peters, J., & Schölkopf, B. (2009). Nonlinear causal discovery with additive noise models. In Advances in neural information processing systems (pp. 689-696).\n- [15] Janzing, D., Mooij, J., Zhang, K., Lemeire, J., Zscheischler, J., Daniušis, P., ... & Schölkopf, B. (2012). Information-geometric approach to inferring causal directions. Artificial Intelligence, 182, 1-31.\n- [16] Lopez-Paz, D., Muandet, K., Schölkopf, B., & Tolstikhin, I. (2015, June). Towards a learning theory of cause-effect inference. In International Conference on Machine Learning (pp. 1452-1461).  \n- [17] Lopez-Paz, D., Nishihara, R., Chintala, S., Schölkopf, B., & Bottou, L. (2017, July). Discovering causal signals in images. In Proceedings of CVPR.  \n- [18] Stegle, O., Janzing, D., Zhang, K., Mooij, J. M., & Schölkopf, B. (2010). Probabilistic latent variable models for distinguishing between cause and effect. In Advances in Neural Information Processing Systems (pp. 1687-1695).\n- [19] Zhang, K., & Hyvärinen, A. (2009, June). On the identifiability of the post-nonlinear causal model. In Proceedings of the twenty-fifth conference on uncertainty in artificial intelligence (pp. 647-655). AUAI Press.\n- [20] Fonollosa, J. A. (2016). Conditional distribution variability measures for causality detection. arXiv preprint arXiv:1601.06680.\n- [21] Gretton, A., Borgwardt, K. M., Rasch, M. J., Schölkopf, B., & Smola, A. (2012). A kernel two-sample test. Journal of Machine Learning Research, 13(Mar), 723-773.\n- [22] Li, Y., Swersky, K., & Zemel, R. (2015). Generative moment matching networks. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15) (pp. 1718-1727).  \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"182E:3D40A:172C5D:5D7FB4:6AB92BB9"},"text_sha256":"184d1ebcafe0d17f2b60affbb9c4ad34eb8c0852002b6a19fda3d93e01f80ea8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2160","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0918:8656E:17D1455:1BF63A3:6AB92BBB"},"commit":{"sha":"ff46dbca3d91f2dba30e6ae54986eea30c9b331f","url":"https://github.com/FenTechSolutions/CausalDiscoveryToolbox/commit/ff46dbca3d91f2dba30e6ae54986eea30c9b331f","date":"2025-10-13T07:40:06Z","author_date":"2025-10-13T07:40:06Z","committer_date":"2025-10-13T07:40:06Z","tree_sha":"986f7dfad759435b257c4189389c2f189a51b8e9","message_first_line":"Merge pull request #165 from Infinitif/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2159","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:17E1BD1:1C072A8:6AB92BBB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15957,"blob_sha":"ed8a93d584154f8a404d7b9fa9081f9938320d5f","priority":0}],"documents":[{"path":"README.md","size":15957,"blob_sha":"ed8a93d584154f8a404d7b9fa9081f9938320d5f","priority":0,"status":200,"text":"![](docs/banner.png)\n\nThe Causal Discovery Toolbox is a package for causal inference in graphs and in the pairwise settings for Python>=3.5. Tools for graph structure recovery and dependencies are included. The package is based on Numpy, Scikit-learn, Pytorch and R.\n\n[![Build Status](https://travis-ci.org/FenTechSolutions/CausalDiscoveryToolbox.svg?branch=master)](https://travis-ci.org/FenTechSolutions/CausalDiscoveryToolbox)\n[![Dev Status](https://travis-ci.org/FenTechSolutions/CausalDiscoveryToolbox.svg?branch=dev)](https://travis-ci.org/FenTechSolutions/CausalDiscoveryToolbox)\n[![codecov](https://codecov.io/gh/FenTechSolutions/CausalDiscoveryToolbox/branch/master/graph/badge.svg)](https://codecov.io/gh/FenTechSolutions/CausalDiscoveryToolbox)\n[![Hex.pm](https://img.shields.io/badge/License-MIT-blue.svg?maxAge=259200)](https://raw.githubusercontent.com/FenTechSolutions/CausalDiscoveryToolbox/master/LICENSE.md)\n[![version](https://img.shields.io/badge/version-0.6.0-yellow.svg?maxAge=259200)](#)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/cdt.svg)\n\nIt implements lots of algorithms for graph structure recovery (including algorithms from the __bnlearn__, __pcalg__ packages), mainly based out of observational data.\n\n## [Check out the documentation here](https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html) \n## [Please cite us if you use our software](https://arxiv.org/abs/1903.02278)\n\n[A tutorial is available here](https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/tutorial.html)\n\nInstall it using pip: (See more details on installation below)\n```sh\npip install cdt\n```\n## Docker images\nDocker images are available, including all the dependencies, and enabled functionalities:\n\n|       Branch     |                                                                 master                                                                 |                                                                  dev                                                                 |\n|:----------------:|:--------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------:|\n| Python 3.6 - CPU |       [![d36cpu](https://img.shields.io/badge/docker-0.6.0-0db7ed.svg?maxAge=259200)](https://hub.docker.com/r/fentechai/cdt/)      |       [![d36cpudev](https://img.shields.io/badge/docker-latest-0db7ed.svg?maxAge=259200)](https://hub.docker.com/r/fentechai/cdt-dev)       |\n| Python 3.6 - GPU | [![d36gpu](https://img.shields.io/badge/nvidia--docker-0.6.0-76b900.svg?maxAge=259200)](https://hub.docker.com/r/fentechai/nv-cdt/) |  [![d36gpudev](https://img.shields.io/badge/nvidia--docker-latest-76b900.svg?maxAge=259200)](https://hub.docker.com/r/fentechai/nv-cdt-dev) |\n\n## Installation\n\nThe packages requires a python version >=3.5, as well as some libraries listed in [requirements file](https://github.com/FenTechSolutions/CausalDiscoveryToolbox/blob/master/requirements.txt). For some additional functionalities, more libraries are needed for these extra functions and options to become available. Here is a quick install guide of the package, starting off with the minimal install up to the full installation. \n\n**Note**: A (mini/ana)conda framework would help installing all those packages and therefore could be recommended for non-expert users. \n\n### Install PyTorch\nAs some of the key algorithms in the _cdt_ package use the PyTorch package, it is required to install it. \nCheck out their website to install the PyTorch version suited to your hardware configuration: http://pytorch.org\n\n### Install the CausalDiscoveryToolbox package\nThe package is available on PyPi:\n```sh\npip install cdt\n```\nOr you can also install it from source.\n```sh\n$ git clone https://github.com/FenTechSolutions/CausalDiscoveryToolbox.git  # Download the package \n$ cd CausalDiscoveryToolbox\n$ pip install -r requirements.txt  # Install the requirements\n$ python setup.py install develop --user\n```\n**The package is then up and running! You can run most of the algorithms in the CausalDiscoveryToolbox, you might get warnings: some additional features are not available**\n\nFrom now on, you can import the library using:\n```python\nimport cdt\n```\nCheck out the package structure and more info on the package itself [here](https://github.com/FenTechSolutions/CausalDiscoveryToolbox/blob/master/documentation.md).  \n\n### Additional : R and R libraries\nIn order to have access to additional algorithms from various R packages such as bnlearn, kpcalg, pcalg, ... while using the _cdt_ framework, it is required to install R.\n\nCheck out how to install all R dependencies in the before-install section of the [travis.yml](https://github.com/FenTechSolutions/CausalDiscoveryToolbox/blob/master/.travis.yml) file for debian based distributions. \nThe [r-requirements file](https://github.com/FenTechSolutions/CausalDiscoveryToolbox/blob/master/r_requirements.txt) notes all of the R packages used by the toolbox.\n\n\nHere is an example of installation script of the R packages on Ubuntu 20.04:\n\n``` sh\napt-get -qq update\nDEBIAN_FRONTEND=noninteractive apt-get install -y tzdata\napt-get -qq install dialog apt-utils -y\napt-get install apt-transport-https -y\napt-get install -qq software-properties-common -y\napt-get -qq update\napt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9\nadd-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' -y\napt-get -qq update\n\napt-get -qq install r-base -y\napt-get -qq install libssl-dev -y\napt-get -qq install libgmp3-dev  -y\napt-get -qq install git -y\napt-get -qq install build-essential  -y\napt-get -qq install libv8-dev  -y\napt-get -qq install libcurl4-openssl-dev -y\napt-get -qq install libgsl-dev -y\n\nRscript -e 'install.packages(c(\"V8\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(c(\"sfsmisc\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(c(\"clue\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(\"https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-14.tar.gz\", repos=NULL, type=\"source\")'\nRscript -e 'install.packages(c(\"lattice\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(c(\"devtools\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(c(\"MASS\"),repos=\"http://cran.us.r-project.org\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(\"BiocManager\")'\nRscript -e 'BiocManager::install(c(\"igraph\"))'\nRscript -e 'install.packages(\"https://cran.r-project.org/src/contrib/Archive/fastICA/fastICA_1.2-2.tar.gz\", repos=NULL, type=\"source\")'\nRscript -e 'BiocManager::install(c(\"SID\", \"bnlearn\", \"pcalg\", \"kpcalg\", \"glmnet\", \"mboost\"))'\nRscript -e 'install.packages(\"https://cran.r-project.org/src/contrib/Archive/CAM/CAM_1.0.tar.gz\", repos=NULL, type=\"source\")'\nRscript -e 'install.packages(\"https://cran.r-project.org/src/contrib/sparsebnUtils_0.0.8.tar.gz\", repos=NULL, type=\"source\")'\nRscript -e 'BiocManager::install(c(\"ccdrAlgorithm\", \"discretecdAlgorithm\"))'\n\napt-get -qq install libxml2-dev -y\nRscript -e 'install.packages(\"devtools\")'\nRscript -e 'library(devtools); install_github(\"cran/CAM\"); install_github(\"cran/momentchi2\"); install_github(\"Diviyan-Kalainathan/RCIT\", quiet=TRUE, verbose=FALSE)'\nRscript -e 'install.packages(\"https://cran.r-project.org/src/contrib/Archive/sparsebn/sparsebn_0.1.2.tar.gz\", repos=NULL, type=\"source\")'\n```\n\n\n## Overview\n### General package structure\nThe following figure shows how the package and its algorithms are structured\n\n\n```\n   cdt package\n   |\n   |- independence\n   |  |- graph (Infering the skeleton from data)\n   |  |  |- Lasso variants (Randomized Lasso[1], Glasso[2], HSICLasso[3])\n   |  |  |- FSGNN (CGNN[12] variant for feature selection)\n   |  |  |- Skeleton recovery using feature selection algorithms (RFECV[5], LinearSVR[6], RRelief[7], ARD[8,9], DecisionTree)\n   |  |\n   |  |- stats (pairwise methods for dependency)\n   |     |- Correlation (Pearson, Spearman, KendallTau)\n   |     |- Kernel based (NormalizedHSIC[10])\n   |     |- Mutual information based (MIRegression, Adjusted Mutual Information[11], Normalized mutual information[11])\n   |\n   |- data\n   |  |- CausalPairGenerator (Generate causal pairs)\n   |  |- AcyclicGraphGenerator (Generate FCM-based graphs)\n   |  |- load_dataset (load standard benchmark datasets)\n   |\n   |- causality\n   |  |- graph (methods for graph inference)\n   |  |  |- CGNN[12]\n   |  |  |- PC[13]\n   |  |  |- GES[13]\n   |  |  |- GIES[13]\n   |  |  |- LiNGAM[13]\n   |  |  |- CAM[13]\n   |  |  |- GS[23]\n   |  |  |- IAMB[24]\n   |  |  |- MMPC[25]\n   |  |  |- SAM[26]\n   |  |  |- CCDr[27]\n   |  |\n   |  |- pairwise (methods for pairwise inference)\n   |     |- ANM[14] (Additive Noise Model)\n   |     |- IGCI[15] (Information Geometric Causal Inference)\n   |     |- RCC[16] (Randomized Causation Coefficient)\n   |     |- NCC[17] (Neural Causation Coefficient)\n   |     |- GNN[12] (Generative Neural Network -- Part of CGNN )\n   |     |- Bivariate fit (Baseline method of regression)\n   |     |- Jarfo[20]\n   |     |- CDS[20]\n   |     |- RECI[28]\n   |\n   |- metrics (Implements the metrics for graph scoring)\n   |  |- Precision Recall\n   |  |- SHD\n   |  |- SID [29]\n   |\n   |- utils\n      |- Settings -> SETTINGS class (hardware settings)\n      |- loss -> MMD loss [21, 22] & various other loss functions\n      |- io -> for importing data formats\n      |- graph -> graph utilities\n\n\n\n```\n\n### Hardware and algorithm settings\nThe toolbox has a SETTINGS class that defines the hardware settings. Those settings are unique and their default parameters are defined in **_cdt/utils/Settings_**.\n\nThese parameters are accessible and overridable via accessing the class:\n\n```python\nimport cdt\ncdt.SETTINGS\n```\n\nMoreover, the hardware parameters are detected and defined automatically (including number of GPUs, CPUs, available optional packages) at the **import** of the package using the **cdt.utils.Settings.autoset_settings** method, run at startup.\n\n### The graph class\nThe whole package revolves around using the **DiGraph** and **Graph** classes from the **networkx** package.\n\n### References\n\n- [1] Wang, S., Nan, B., Rosset, S., & Zhu, J. (2011). Random lasso. The annals of applied statistics, 5(1), 468.\n- [2] Friedman, J., Hastie, T., & Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3), 432-441.\n- [3] Yamada, M., Jitkrittum, W., Sigal, L., Xing, E. P., & Sugiyama, M. (2014). High-dimensional feature selection by feature-wise kernelized lasso. Neural computation, 26(1), 185-207.\n- [4] Feizi, S., Marbach, D., Médard, M., & Kellis, M. (2013). Network deconvolution as a general method to distinguish direct dependencies in networks. Nature biotechnology, 31(8), 726-733.\n- [5] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). Gene selection for cancer classification using support vector machines. Machine learning, 46(1), 389-422.\n- [6] Vapnik, V., Golowich, S. E., & Smola, A. J. (1997). Support vector method for function approximation, regression estimation and signal processing. In Advances in neural information processing systems (pp. 281-287).  \n- [7] Kira, K., & Rendell, L. A. (1992, July). The feature selection problem: Traditional methods and a new algorithm. In Aaai (Vol. 2, pp. 129-134).\n- [8] MacKay,  D.  J.  (1992). Bayesian interpolation. Neural Computation, 4, 415–447.\n- [9] Neal, R. M. (1996). Bayesian learning for neural networks. No. 118 in Lecture Notes in Statistics. New York: Springer.\n- [10] Gretton, A., Bousquet, O., Smola, A., & Scholkopf, B. (2005, October). Measuring statistical dependence with Hilbert-Schmidt norms. In ALT (Vol. 16, pp. 63-78).\n- [11] Vinh, N. X., Epps, J., & Bailey, J. (2010). Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. Journal of Machine Learning Research, 11(Oct), 2837-2854.\n- [12] Goudet, O., Kalainathan, D., Caillou, P., Lopez-Paz, D., Guyon, I., Sebag, M., ... & Tubaro, P. (2017). Learning functional causal models with generative neural networks. arXiv preprint arXiv:1709.05321.\n- [13] Spirtes, P., Glymour, C., Scheines, R. (2000). Causation, Prediction, and Search. MIT press.  \n- [14] Hoyer, P. O., Janzing, D., Mooij, J. M., Peters, J., & Schölkopf, B. (2009). Nonlinear causal discovery with additive noise models. In Advances in neural information processing systems (pp. 689-696).\n- [15] Janzing, D., Mooij, J., Zhang, K., Lemeire, J., Zscheischler, J., Daniušis, P., ... & Schölkopf, B. (2012). Information-geometric approach to inferring causal directions. Artificial Intelligence, 182, 1-31.\n- [16] Lopez-Paz, D., Muandet, K., Schölkopf, B., & Tolstikhin, I. (2015, June). Towards a learning theory of cause-effect inference. In International Conference on Machine Learning (pp. 1452-1461).  \n- [17] Lopez-Paz, D., Nishihara, R., Chintala, S., Schölkopf, B., & Bottou, L. (2017, July). Discovering causal signals in images. In Proceedings of CVPR.  \n- [18] Stegle, O., Janzing, D., Zhang, K., Mooij, J. M., & Schölkopf, B. (2010). Probabilistic latent variable models for distinguishing between cause and effect. In Advances in Neural Information Processing Systems (pp. 1687-1695).\n- [19] Zhang, K., & Hyvärinen, A. (2009, June). On the identifiability of the post-nonlinear causal model. In Proceedings of the twenty-fifth conference on uncertainty in artificial intelligence (pp. 647-655). AUAI Press.\n- [20] Fonollosa, J. A. (2016). Conditional distribution variability measures for causality detection. arXiv preprint arXiv:1601.06680.\n- [21] Gretton, A., Borgwardt, K. M., Rasch, M. J., Schölkopf, B., & Smola, A. (2012). A kernel two-sample test. Journal of Machine Learning Research, 13(Mar), 723-773.\n- [22] Li, Y., Swersky, K., & Zemel, R. (2015). Generative moment matching networks. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15) (pp. 1718-1727).  \n- [23] Margaritis D (2003). Learning Bayesian Network Model Structure from Data . Ph.D. thesis, School of Computer Science, Carnegie-Mellon University, Pittsburgh, PA. Available as Technical Report CMU-CS-03-153\n- [24] Tsamardinos I, Aliferis CF, Statnikov A (2003). “Algorithms for Large Scale Markov Blanket Discovery”. In “Proceedings of the Sixteenth International Florida Artificial Intelligence Research Society Conference”, pp. 376-381. AAAI Press.\n- [25] Tsamardinos I, Aliferis CF, Statnikov A (2003). “Time and Sample Efficient Discovery of Markov Blankets and Direct Causal Relations”. In “KDD ’03: Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining”, pp. 673-678. ACM. Tsamardinos I, Brown LE, Aliferis CF (2006). “The Max-Min Hill-Climbing Bayesian Network Structure Learning Algorithm”. Machine Learning,65(1), 31-78.\n- [26] Kalainathan, Diviyan & Goudet, Olivier & Guyon, Isabelle & Lopez-Paz, David & Sebag, Michèle. (2018). SAM: Structural Agnostic Model, Causal Discovery and Penalized Adversarial Learning.\n- [27] Aragam, B., & Zhou, Q. (2015). Concave penalized estimation of sparse Gaussian Bayesian networks. Journal of Machine Learning Research, 16, 2273-2328.\n- [28] Bloebaum, P., Janzing, D., Washio, T., Shimizu, S., & Schoelkopf, B. (2018, March). Cause-Effect Inference by Comparing Regression Errors. In International Conference on Artificial Intelligence and Statistics (pp. 900-909).\n- [29] Structural Intervention Distance (SID) for Evaluating Causal Graphs, Jonas Peters, Peter Bühlmann: https://arxiv.org/abs/1306.1043\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D534:7A4F8:183195:5E85AC:6AB92BBB"},"text_sha256":"5b43fbd08059a815d613f907bd48f01a02e0696f799e032a7892294f213ba827"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stereolabs/zed-sdk","input_row":{"repository":"stereolabs/zed-sdk","url":"https://github.com/stereolabs/zed-sdk","name":"zed-sdk","owner":"stereolabs","description":"⚡️The spatial perception framework for rapidly building smart robots and spaces","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1236,"issues":689,"created_at":"2017-04-05T10:02:44Z","updated_at":"2026-09-22T15:34:17Z","first_commit_at":"2017-04-05T10:02:44Z","last_commit_at":"2026-06-18T14:14:38Z","activity_months":110.42,"ai_ml_match_topics":"machine-learning; computer-vision; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:12.679Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stereolabs/zed-sdk","visibility":"public","created_at":"2017-04-05T10:02:44Z","updated_at":"2026-09-22T15:34:17Z","private":false,"fork":false,"archived":false,"stargazers_count":1236,"open_issues_count":3,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2158","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:17FA893:1C200FF:6AB92BBC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2157","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:18081DA:1C2D5AE:6AB92BBD"},"commit":{"sha":"6ee9935a3e5f1ca5557acc27a19bdea2018ac41e","url":"https://github.com/stereolabs/zed-sdk/commit/6ee9935a3e5f1ca5557acc27a19bdea2018ac41e","date":"2018-05-02T09:24:10Z","author_date":"2018-05-02T09:24:10Z","committer_date":"2018-05-02T09:24:10Z","tree_sha":"f31780241ef8db29f83f0518a248380f65541fce","message_first_line":"Add plane detection sample 2.4"},"tree_request_status":200,"tree_rate":{"github_remaining":"2156","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:180F941:1C34FAB:6AB92BBD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1299,"blob_sha":"96a84d5a5843e0c5d000831b7ade76e171398f59","priority":0}],"documents":[{"path":"README.md","size":1299,"blob_sha":"96a84d5a5843e0c5d000831b7ade76e171398f59","priority":0,"status":200,"text":"# Stereolabs ZED - Examples\n\nLinks\n--------\nZED SDK - https://www.stereolabs.com/developers/\n\nGeneral Documentation - https://www.stereolabs.com/documentation/\n\nAPI Documentation - https://www.stereolabs.com/developers/documentation/API\n\nContents\n--------\nThe ZED SDK includes tutorials and samples that demonstrate the API features and code.\n\n* **Tutorials** - A series of basic tutorials that demonstrate the use of each API module.\n\n* **Camera Control** - This sample shows how to adjust the ZED camera parameters.\n\n* **Depth Sensing** - This sample shows how to capture a 3D point cloud and display with OpenGL. It also shows how to save depth data in different formats.\n\n* **Positional Tracking** - This sample shows how to use positional tracking and display the result with OpenGL.\n\n* **Spatial Mapping** - This sample shows how to capture a mesh with the ZED and display it with OpenGL\n\n* **SVO Recording** - This sample shows how to record and playback video files in SVO format. SVO files lets you use all the ZED SDK features without having a ZED connected.\n\n* **Other** - Other general samples that demonstrate the use of the ZED SDK.\n\n\nSupport\n-------\nIf you need assistance with the ZED, visit our Help Center at https://support.stereolabs.com or contact us at support@stereolabs.com.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DAE:18CDF1:1788F3:561AAC:6AB92BBB"},"text_sha256":"2799d69d76104535476bb4f643de45794a8ee7dc01fe8c927e0679ccd4f22344"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2155","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0882:156040:17D8306:1BFCC46:6AB92BBE"},"commit":{"sha":"94bac54b237815053cd876435bb5b2c913603655","url":"https://github.com/stereolabs/zed-sdk/commit/94bac54b237815053cd876435bb5b2c913603655","date":"2026-06-18T14:14:38Z","author_date":"2026-06-18T14:14:38Z","committer_date":"2026-06-18T14:14:38Z","tree_sha":"6f51a48900a79dbf8671bab691cf3bde7f7fad86","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2154","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F3:3203A7:179C2FF:1BC1417:6AB92BBE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16133,"blob_sha":"7d9a9fc6e2e8debf8a7fbf4cf8e75f12c392d5db","priority":0}],"documents":[{"path":"README.md","size":16133,"blob_sha":"7d9a9fc6e2e8debf8a7fbf4cf8e75f12c392d5db","priority":0,"status":200,"text":"<h1 align=\"center\">\n  <!--- Stereolabs Banner --->\n  <!--- a href=\"http://www.stereolabs.com/docs\"><img src=\"https://user-images.githubusercontent.com/32394882/228559403-1da06352-9bac-4279-a5b4-e68bafcb2b1c.jpg\" alt=\"Stereolabs\"><\/a --->\n  ZED SDK\n  <br>\n<\/h1>\n\n<p align=\"center\">\n  The ZED SDK is a cross-platform library designed to get the best out of the <a href=\"https://www.stereolabs.com/store/\">ZED<\/a> cameras. \n  <br />\n  In this project, we provide tutorials and code samples to get started using the ZED SDK API.\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://www.stereolabs.com\">Website<\/a>\n  ·\n  <a href=\"https://store.stereolabs.com/\">Store<\/a>\n  ·\n  <a href=\"https://www.stereolabs.com/docs/api/\">API Reference<\/a>\n  ·\n  <a href=\"https://community.stereolabs.com/\">Community<\/a>\n  ·\n  <a href=\"https://www.stereolabs.com/blog/\">Blog<\/a>\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://www.stereolabs.com/developers/release\"><img src=\"https://img.shields.io/github/v/release/stereolabs/zed-sdk?color=%2300aeec&label=ZED%20SDK\" alt=\"SDK Version\"><\/a>\n  <a href=\"https://community.stereolabs.com/\"><img src=\"https://img.shields.io/discourse/posts?server=https%3A%2F%2Fcommunity.stereolabs.com%2F\" alt=\"ZED Discourse\"><\/a>\n  <a href=\"https://hub.docker.com/u/stereolabs\"><img src=\"https://img.shields.io/docker/pulls/stereolabs/zed\" alt=\"Docker Pulls\"><\/a>\n  <a href=\"https://github.com/stereolabs/zed-examples/stargazers\"><img src=\"https://img.shields.io/github/stars/stereolabs/zed-sdk?style=social\" alt=\"Github Stars\"><\/a>\n<\/p>\n\n---\n\n:tada: The **ZED SDK 5.4** is released!\n\n**ZED SDK 5.4** makes the built-in NEURAL depth models noticeably faster: an optimized inference path delivers up to 20% quicker depth inference and ~15% lower GPU load on Jetson Thor — with gains carrying over to Orin and desktop GPUs, and the largest wins on heavier pipelines (more cameras, NEURAL PLUS, or concurrent recording) — all with outputs unchanged. The release also opens the depth pipeline to custom algorithms through the experimental `DEPTH_MODE::CUSTOM`: an externally computed disparity or depth map — for example from a custom stereo network — can be fed to the SDK each frame, and the full pipeline (point cloud, spatial mapping, object detection, plane detection) then runs on the ingested data. A companion stereo `retrieveTensor` overload pre-processes both rectified views in a single fused GPU pass, producing inference-ready tensors that bind directly to frameworks such as TensorRT.\n\nRecording and streaming gain a leaner path. SVO recording and outbound streaming now run entirely from `Camera::read()`, and stereo rectification is performed on demand, so pure recording or streaming pipelines no longer pay its CPU/GPU cost. A new polling API retrieves encoded H264/H265 packets directly — from incoming, outgoing, or recorded streams — without a second encoding session, and new rectified `LEFT_NV12` / `RIGHT_NV12` views feed hardware encoders without an extra color conversion.\n\nThis release also extends the platform reach with experimental support for ARM desktop systems (SBSA: NVIDIA DGX Spark, GH200, and ARM CUDA servers). A new monotonic `MONOTONIC_RAW_CLOCK` timestamp option yields timestamps immune to both NTP/PTP step and frequency adjustments, the per-camera lens distortion model is now exposed through `LENS_DISTORTION_MODEL`, and SLAM GEN_3 reports per-pose confidence. Numerous stability and accuracy fixes round out the release across depth, streaming, calibration, and USB camera handling.\n\nPlease check the [Release Notes](https://www.stereolabs.com/developers/release/) of the latest version for more details.\n\n## Overview\n\nDepth Sensing | Object Detection | Body Tracking |\n:------------: |  :----------: | :-------------:  |\n[![Depth Sensing](https://user-images.githubusercontent.com/32394882/230639409-356b8dfa-df66-4bc2-84d8-a25fd0229779.gif)](https://www.stereolabs.com/docs/depth-sensing)  | [![Object Detection](https://user-images.githubusercontent.com/32394882/230630901-9d53502a-f3f9-45b6-bf57-027148bb18ad.gif)](https://www.stereolabs.com/docs/object-detection)  | [![Body Tracking](https://user-images.githubusercontent.com/32394882/230631989-24dd2b58-2c85-451b-a4ed-558d74d1b922.gif)](https://www.stereolabs.com/docs/body-tracking)  |\n\nPositional Tracking | Global Localization | Spatial Mapping |\n:------------: |  :----------: | :-------------:  |\n[![Positional Tracking](https://user-images.githubusercontent.com/32394882/229093429-a445e8ae-7109-4995-bc1d-6a27a61bdb60.gif)](https://www.stereolabs.com/docs/positional-tracking/) | [![Global Localization](https://user-images.githubusercontent.com/32394882/230602944-ed61e6dd-e485-4911-8a4c-d6c9e4fab0fd.gif)](/global%20localization) | [![Spatial Mapping](https://user-images.githubusercontent.com/32394882/229099549-63ca7832-b7a2-42eb-9971-c1635d205b0c.gif)](https://www.stereolabs.com/docs/spatial-mapping) |\n\nCamera Control | Plane Detection | Multi Camera Fusion |\n:------------: |  :----------: | :-------------:  |\n[![Camera Control](https://user-images.githubusercontent.com/32394882/230602616-6b57c351-09c4-4aba-bdec-842afcc3b2ea.gif)](https://www.stereolabs.com/docs/video/camera-controls/) | [![Plane Detection](https://user-images.githubusercontent.com/32394882/229093072-d9d70e92-07d5-46cb-bde7-21f7c66fd6a1.gif)](https://www.stereolabs.com/docs/spatial-mapping/plane-detection/)  | [![Multi Camera Fusion](https://user-images.githubusercontent.com/32394882/228791106-a5f971d8-8d6f-483b-9f87-7f0f0025b8be.gif)](/fusion) |\n\n\n## Why ZED?\n\n- 🎯 End-to-end spatial perception platform for human-like sensing capabilities.\n- ⚡ Real-time performance: all algorithms of the ZED SDK are designed and optimized to run in real-time. \n- 📷 Reduce time-to-market with our comprehensive, ready-to-use hardware and software designed for multiple applications.\n- 📖 User-friendly and intuitive, with easy-to-use integrations and well-documented API for streamlined development.\n- 🛠️ Wide range of supported platforms, from desktop to embedded PCs.\n\n## Getting started\n\nThe ZED SDK contains all the libraries that power your camera along with tools that let you experiment with its features and settings.\n\nTo get started:\n- [Get a ZED from the Stereolabs Store](https://store.stereolabs.com/)\n- [Download the ZED SDK](https://www.stereolabs.com/developers/release/#downloads)\n- [Install the ZED SDK](https://www.stereolabs.com/docs/installation/) on [Windows](https://www.stereolabs.com/docs/installation/windows/), [Linux](https://www.stereolabs.com/docs/installation/linux/) or [Jetson](https://www.stereolabs.com/docs/installation/jetson/)\n- [Start experimenting with the ZED SDK's tutorials](/tutorials)\n\nThe [documentation](https://www.stereolabs.com/docs/) and [API reference](https://www.stereolabs.com/docs/api/) are great starting points to learn more about the ZED SDK and its many modules.\n\n## Samples\n\nThis repository contains ready-to-use and samples to start using the ZED SDK with only a few lines of code. They are organized by ZED SDK module: \n\n* [**Tutorials**](/tutorials) - A series of basic tutorials that demonstrate the use of each API module.\n\n* [**Camera Control**](/camera%20control) - This sample shows how to adjust the **ZED camera parameters**.\n\n* [**Camera Streaming**](/camera%20streaming) - This sample shows how to **stream** and receive on local network the ZED's video feed.\n\n* [**Depth Sensing**](/depth%20sensing) - This sample shows how to capture a **3D point cloud** and display with OpenGL. It also shows how to save depth data in different formats.\n\n* [**Positional Tracking**](/positional%20tracking) - This sample shows how to use **positional tracking** and display the result with *OpenGL*.\n\n* [**Global Localization**](/global%20localization) - This sample shows how to fuse the ZED SDK's **positional tracking with GNSS data** for global positioning.\n\n* [**Spatial Mapping**](/spatial%20mapping) - This sample shows how to capture **3D meshes** with the ZED and display it with *OpenGL*. Classic Mesh and Point Cloud fusion are available.\n\n* [**Object Detection**](/object%20detection) - This sample shows how to use the **Object Detection API** module with the ZED.\n\n* [**Body Tracking**](/body%20tracking) - This sample shows how to use the **Body Tracking API** with the ZED.\n\n* [**Recording**](/recording) - This sample shows how to **record** and **playback** video files in SVO format. SVO files let you use all the ZED SDK features without having a ZED connected.\n\n## Supported platforms\n\nHere is the list of all supported operating systems for the latest version of the ZED SDK. Please find the [recommended specifications](https://www.stereolabs.com/docs/installation/specifications/) to make sure your configuration is compatible with the ZED SDK.\n\n| Ubuntu LTS | Windows | Jetson |\n| -------- | ------------------------- | ----------------- |\n| <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/installation/linux\"><img src=\"https://user-images.githubusercontent.com/32394882/230619268-bdf66472-8bf5-41e7-9efa-ca3698ff271a.png\" width=\"40%\" alt=\"\" /><\/a><\/div>  | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/installation/windows\"><img  src=\"https://user-images.githubusercontent.com/32394882/230619282-fe2f84fb-2130-4164-a193-db2893b58272.png\" width=\"40%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/installation/jetson/\"><img src=\"https://user-images.githubusercontent.com/32394882/230619273-feeee52b-209b-48da-b990-06630cabe323.png\" width=\"40%\" alt=\"\" /><\/a><\/div>\n\nThe ZED SDK requires the use of an **NVIDIA GPU** with a **Compute Capability > 5**.\n\nIf you are not familiar with the corresponding versions between NVIDIA JetPack SDK and Jetson Linux, please take a look at our [blog post](https://www.stereolabs.com/blog/nvidia-jetson-l4t-and-jetpack-support/). \n\n\n## Integrations\n\nThe ZED SDK can be easily integrated into projects using the following programming languages:\n\n| C++ | Python | C# | C |\n| -------- | ------------------------- | ----------------- | -------- | \n| <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/api\"><img src=\"https://user-images.githubusercontent.com/32394882/229499695-c71857a2-eded-4171-8185-4e522d5b6c71.png\" width=\"50%\" alt=\"\" /><\/a><\/div>  | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/api/python/\"><img src=\"https://user-images.githubusercontent.com/32394882/229499718-c66c3649-d139-48e5-8523-65b23a120440.png\" width=\"50%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/api/csharp\"><img src=\"https://user-images.githubusercontent.com/32394882/229499667-5e4c4d72-1140-4eda-b206-d9f95c93c15c.png\" width=\"50%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/api/c/\"><img src=\"https://user-images.githubusercontent.com/32394882/229499672-9b5308a2-3294-4818-84c5-07f84834a6d9.png\" width=\"50%\" alt=\"\" /><\/a><\/div>\n\n<br />\n\nThanks to its comprehensive API, ZED cameras can be interfaced with **multiple third-party libraries** and environments.\n\n| Unity | Unreal Engine 5 | OpenCV | ROS | ROS 2\n| -------- | ------------------------- | ----------------- | ----- | ----- |\n| <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/unity/\"><img src=\"https://user-images.githubusercontent.com/32394882/229497186-d77d9d1f-5eb8-420a-851e-3513d982d78d.png\" width=\"70%\" alt=\"\" /><\/a><\/div>  | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/ue5/\"><img  src=\"https://user-images.githubusercontent.com/32394882/229497196-19fb4d4c-423d-4ae3-abba-b26ca384e7e4.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/opencv/\"><img src=\"https://user-images.githubusercontent.com/32394882/229497204-09a267bd-cbcf-4d3f-b9a2-f95349b4b7a9.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/ros/\"><img src=\"https://user-images.githubusercontent.com/32394882/229475890-452f2cc0-1a9a-4b2a-87ad-cacc44a7435e.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/ros2/\"><img src=\"https://user-images.githubusercontent.com/32394882/230614232-ce7a208e-7cf0-47a2-9c6f-5203e6034a5d.png\" width=\"70%\" alt=\"\" /><\/a><\/div>\n\n| Pytorch | YOLO | Matlab | Isaac SIM | Touch Designer |  \n| -------- | ------------------------- | ----------------- | ----- | ----- |\n| <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/pytorch\"><img src=\"https://user-images.githubusercontent.com/32394882/229475918-1add790d-b10e-4529-a1d7-097f015a481f.png\" width=\"70%\" alt=\"\" /><\/a><\/div>  | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/yolo/\"><img src=\"https://user-images.githubusercontent.com/32394882/230623781-3c87a5c9-b6af-4f93-bcc7-5ec381acf5d7.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/docs/matlab/\"><img src=\"https://user-images.githubusercontent.com/32394882/229472074-4747f789-4ce6-4aef-b4f7-eab3bb77ab52.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://www.stereolabs.com/\"><img src=\"https://user-images.githubusercontent.com/32394882/229472012-fe8d4458-219b-4825-8e87-9a3e9bc55e62.png\" width=\"70%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://derivative.ca/UserGuide/ZED\"><img src=\"https://user-images.githubusercontent.com/32394882/230623653-630e7bd2-1300-47ad-8133-39543470b2b1.png\" width=\"70%\" alt=\"\" /><\/a><\/div>\n\n\n<br />\n\n## Community\n\nJoin the conversation and connect with other ZED SDK users to share ideas, solve problems, and help make the ZED SDK awesome. Our aim is to make it extremely convenient for everyone to communicate with us.\n\n- **Discourse** is our forum where all ZED users can connect. This is the best place to brainstorm and exchange about ZED cameras, ZED SDK software, and other Stereolabs products. Feel free to create an account and ask your questions, or even share your awesome projects!\n\n- **Twitter** Follow Stereolabs [@Stereolabs3D](https://twitter.com/stereolabs3d) for official news and release announcements.\n- **GitHub** If you come across a bug, please raise an issue in this [**GitHub repository**](https://github.com/stereolabs/zed-examples/issues).\n\n- **Email** To talk to Stereolabs directly, the easiest way is by email. Get in touch with us at support@stereolabs.com.\n\n<br />\n<br />\n\n<div align=\"center\">\n  <a href=\"https://github.com/stereolabs\" style=\"text-decoration:none;\">\n    <img src=\"https://user-images.githubusercontent.com/32394882/228892870-fbac3f33-49d9-4575-9a2b-10fc2ba26091.svg\" width=\"3%\" alt=\"\" /><\/a>\n  <img src=\"https://user-images.githubusercontent.com/32394882/228893668-ce93aa6e-0867-406f-9481-d1cb307a7dcf.png\" width=\"3%\" alt=\"\" />\n  <a href=\"https://www.linkedin.com/company/stereolabs\" style=\"text-decoration:none;\">\n    <img src=\"https://user-images.githubusercontent.com/32394882/228892887-d12a8d98-4245-4121-8d23-52bd61431b29.svg\" width=\"3%\" alt=\"\" /><\/a>\n  <img src=\"https://user-images.githubusercontent.com/32394882/228893668-ce93aa6e-0867-406f-9481-d1cb307a7dcf.png\" width=\"3%\" alt=\"\" />\n  <a href=\"https://twitter.com/stereolabs3d\" style=\"text-decoration:none;\">\n    <img src=\"https://user-images.githubusercontent.com/32394882/228892805-93d657be-a54c-4e12-83c6-6e7b15a256e2.svg\" width=\"3%\" alt=\"\" /><\/a>\n  <img src=\"https://user-images.githubusercontent.com/32394882/228893668-ce93aa6e-0867-406f-9481-d1cb307a7dcf.png\" width=\"3%\" alt=\"\" />\n  <a href=\"https://www.youtube.com/Stereolabs3d\" style=\"text-decoration:none;\">\n    <img src=\"https://user-images.githubusercontent.com/32394882/228892815-f04bb1ce-aa42-49b0-bfe7-d1d051ead830.svg\" width=\"3%\" alt=\"\" /><\/a>\n  <img src=\"https://user-images.githubusercontent.com/32394882/228893668-ce93aa6e-0867-406f-9481-d1cb307a7dcf.png\" width=\"3%\" alt=\"\" />\n  <a href=\"https://community.stereolabs.com/\" style=\"text-decoration:none;\">\n    <img src=\"https://user-images.githubusercontent.com/32394882/228892794-8840d6c5-54bf-44d3-a95b-d9c51927914f.svg\" width=\"3%\" alt=\"\" /><\/a>\n<\/div>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D5DC:3AC5A:17F1DA:5E45BB:6AB92BBC"},"text_sha256":"06855f4f4376313ed4131c7d12c38941f6fb6d2ea8a66cdff52564100e9b16fb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"python-adaptive/adaptive","input_row":{"repository":"python-adaptive/adaptive","url":"https://github.com/python-adaptive/adaptive","name":"adaptive","owner":"python-adaptive","description":":chart_with_upwards_trend: Adaptive: parallel active learning of mathematical functions","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1229,"issues":241,"created_at":"2017-12-10T01:47:05Z","updated_at":"2026-09-18T02:57:07Z","first_commit_at":"2017-01-30T12:39:50Z","last_commit_at":"2026-06-10T22:48:40Z","activity_months":112.3,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:15.397Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"python-adaptive/adaptive","visibility":"public","created_at":"2017-12-10T01:47:05Z","updated_at":"2026-09-18T02:57:07Z","private":false,"fork":false,"archived":false,"stargazers_count":1229,"open_issues_count":106,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2153","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0815:74C18:180FAA2:1C3513D:6AB92BBF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2152","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CC:76AED:17FB5EA:1C20BE7:6AB92BBF"},"commit":{"sha":"ccfe27d6a21c44c3d16712f698c5f3ecc345ecac","url":"https://github.com/python-adaptive/adaptive/commit/ccfe27d6a21c44c3d16712f698c5f3ecc345ecac","date":"2018-05-24T23:53:58Z","author_date":"2018-05-24T23:53:58Z","committer_date":"2018-05-24T23:53:58Z","tree_sha":"9df02ebbd869cce93156f7127b964ab99170fa3c","message_first_line":"print the full traceback"},"tree_request_status":200,"tree_rate":{"github_remaining":"2151","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AD:72BD3:18007F2:1C25A80:6AB92BC0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5409,"blob_sha":"81a1a45cc11ded524bd32c610f20f901b9c70990","priority":0}],"documents":[{"path":"README.md","size":5409,"blob_sha":"81a1a45cc11ded524bd32c610f20f901b9c70990","priority":0,"status":200,"text":"# ![][logo] adaptive\n\n[![PyPI](https://img.shields.io/pypi/v/adaptive.svg)](https://pypi.python.org/pypi/adaptive)\n[![Conda](https://anaconda.org/conda-forge/adaptive/badges/installer/conda.svg)](https://anaconda.org/conda-forge/adaptive)\n[![Downloads](https://anaconda.org/conda-forge/adaptive/badges/downloads.svg)](https://anaconda.org/conda-forge/adaptive)\n[![pipeline status](https://gitlab.kwant-project.org/qt/adaptive/badges/master/pipeline.svg)](https://gitlab.kwant-project.org/qt/adaptive/pipelines)\n[![DOI](https://zenodo.org/badge/113714660.svg)](https://zenodo.org/badge/latestdoi/113714660)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=learner.ipynb)\n[![Join the chat at https://gitter.im/python-adaptive/adaptive](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/python-adaptive/adaptive)\n\n**Tools for adaptive parallel sampling of mathematical functions.**\n\n`adaptive` is an [open-source](LICENSE) Python library designed to make adaptive parallel function evaluation simple.\nWith `adaptive` you just supply a function with its bounds, and it will be evaluated at the \"best\" points in parameter space.\nWith just a few lines of code you can evaluate functions on a computing cluster, live-plot the data as it returns, and fine-tune the adaptive sampling algorithm.\n\nCheck out the `adaptive` [example notebook `learner.ipynb`](learner.ipynb) (or run it [live on Binder](https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=learner.ipynb)) to see examples of how to use `adaptive`.\n\n\n**WARNING: `adaptive` is still in a beta development stage**\n\n\n## Implemented algorithms\nThe core concept in `adaptive` is that of a *learner*. A *learner* samples\na function at the best places in its parameter space to get maximum\n\"information\" about the function. As it evaluates the function\nat more and more points in the parameter space, it gets a better idea of where\nthe best places are to sample next.\n\nOf course, what qualifies as the \"best places\" will depend on your application domain!\n`adaptive` makes some reasonable default choices, but the details of the adaptive\nsampling are completely customizable.\n\n\nThe following learners are implemented:\n* `Learner1D`, for 1D functions `f: ℝ → ℝ^N`,\n* `Learner2D`, for 2D functions `f: ℝ^2 → ℝ^N`,\n* `AverageLearner`, For stochastic functions where you want to average the result over many evaluations,\n* `IntegratorLearner`, for when you want to intergrate a 1D function `f: ℝ → ℝ`,\n* `BalancingLearner`, for when you want to run several learners at once, selecting the \"best\" one each time you get more points.\n\nIn addition to the learners, `adaptive` also provides primitives for running\nthe sampling across several cores and even several machines, with built-in support\nfor [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html),\n[`ipyparallel`](https://ipyparallel.readthedocs.io/en/latest/)\nand [`distributed`](https://distributed.readthedocs.io/en/latest/).\n\n\n## Examples\n<img src=\"https://user-images.githubusercontent.com/6897215/38739170-6ac7c014-3f34-11e8-9e8f-93b3a3a3d61b.gif\" width='20%'> <\/img>\n<img src=\"https://user-images.githubusercontent.com/6897215/35219611-ac8b2122-ff73-11e7-9332-adffab64a8ce.gif\" width='40%'> <\/img>\n\n\n## Installation\n`adaptive` works with Python 3.6 and higher on Linux, Windows, or Mac, and provides optional extensions for working with the Jupyter/IPython Notebook.\n\nThe recommended way to install adaptive is using `conda`:\n```bash\nconda install -c conda-forge adaptive\n```\n\n`adaptive` is also available on PyPI:\n```bash\npip install adaptive[notebook]\n```\n\nThe `[notebook]` above will also install the optional dependencies for running `adaptive` inside\na Jupyter notebook.\n\n\n## Development\nClone the repository and run `setup.py develop` to add a link to the cloned repo into your\nPython path:\n```\ngit clone git@github.com:python-adaptive/adaptive.git\ncd adaptive\npython3 setup.py develop\n```\n\nWe highly recommend using a Conda environment or a virtualenv to manage the versions of your installed\npackages while working on `adaptive`.\n\nIn order to not pollute the history with the output of the notebooks, please setup the git filter by executing\n\n```bash\npython ipynb_filter.py\n```\n\nin the repository.\n\n\n## Credits\nWe would like to give credits to the following people:\n- Pedro Gonnet for his implementation of [`CQUAD`](https://www.gnu.org/software/gsl/manual/html_node/CQUAD-doubly_002dadaptive-integration.html), \"Algorithm 4\" as described in \"Increasing the Reliability of Adaptive Quadrature Using Explicit Interpolants\", P. Gonnet, ACM Transactions on Mathematical Software, 37 (3), art. no. 26, 2010.\n- Pauli Virtanen for his `AdaptiveTriSampling` script (no longer available online since SciPy Central went down) which served as inspiration for the [`Learner2D`](adaptive/learner/learner2D.py).\n\nFor general discussion, we have a [Gitter chat channel](https://gitter.im/python-adaptive/adaptive). If you find any bugs or have any feature suggestions please file a GitLab [issue](https://gitlab.kwant-project.org/qt/adaptive/issues/new?issue) or submit a [merge request](https://gitlab.kwant-project.org/qt/adaptive/merge_requests).\n\n[logo]: https://gitlab.kwant-project.org/qt/adaptive/uploads/d20444093920a4a0499e165b5061d952/logo.png \"adaptive logo\"\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B84:3B1F3:185380:5EA892:6AB92BBF"},"text_sha256":"cc52ea74f9f90ec04b6b57b7470b63a3b01f6611ea95bb77382e3a006af4cd09"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2150","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D5:1DB627:1878527:1C9DBF9:6AB92BC0"},"commit":{"sha":"b3a40ef04b28339c1edf2996455d1a7d685586da","url":"https://github.com/python-adaptive/adaptive/commit/b3a40ef04b28339c1edf2996455d1a7d685586da","date":"2026-06-10T22:48:40Z","author_date":"2026-06-10T22:48:40Z","committer_date":"2026-06-10T22:48:40Z","tree_sha":"819ffd22d1bff095fceebac691edb4b43ac4b0d7","message_first_line":"Adopt adaptive-triangulation 0.3.1: batched tell_pending, Rust default_loss, CI job (#499)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2149","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0828:3C4024:1808D89:1C2E190:6AB92BC1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11000,"blob_sha":"23989bc5367a6e84f5f1a109c3000ed179d28ff8","priority":0}],"documents":[{"path":"README.md","size":11000,"blob_sha":"23989bc5367a6e84f5f1a109c3000ed179d28ff8","priority":0,"status":200,"text":"\n# ![logo](https://adaptive.readthedocs.io/en/latest/_static/logo.png) *Adaptive*: Parallel Active Learning of Mathematical Functions\n<!-- badges-start -->\n\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/python-adaptive/adaptive/main?filepath=example-notebook.ipynb)\n[![Conda](https://img.shields.io/badge/install%20with-conda-green.svg)](https://anaconda.org/conda-forge/adaptive)\n[![Coverage](https://img.shields.io/codecov/c/github/python-adaptive/adaptive)](https://codecov.io/gh/python-adaptive/adaptive)\n[![DOI](https://img.shields.io/badge/doi-10.5281%2Fzenodo.1182437-blue.svg)](https://doi.org/10.5281/zenodo.1182437)\n[![Documentation](https://readthedocs.org/projects/adaptive/badge/?version=latest)](https://adaptive.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://img.shields.io/conda/dn/conda-forge/adaptive.svg)](https://anaconda.org/conda-forge/adaptive)\n[![GitHub](https://img.shields.io/github/stars/python-adaptive/adaptive.svg?style=social)](https://github.com/python-adaptive/adaptive/stargazers)\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/python-adaptive/adaptive)\n[![PyPI](https://img.shields.io/pypi/v/adaptive.svg)](https://pypi.python.org/pypi/adaptive)\n\n<!-- badges-end -->\n\n<!-- summary-start -->\n\nAdaptive is an open-source Python library that streamlines adaptive parallel function evaluations.\nRather than calculating all points on a dense grid, it intelligently selects the \"best\" points in the parameter space based on your provided function and bounds.\nWith minimal code, you can perform evaluations on a computing cluster, display live plots, and optimize the adaptive sampling algorithm.\n\nAdaptive is most efficient for computations where each function evaluation takes at least ≈50ms due to the overhead of selecting potentially interesting points.\n\nTo see Adaptive in action, try the [example notebook on Binder](https://mybinder.org/v2/gh/python-adaptive/adaptive/main?filepath=example-notebook.ipynb) or explore the [tutorial on Read the Docs](https://adaptive.readthedocs.io/en/latest/tutorial/tutorial).\n\n<!-- summary-end -->\n\n<details><summary><b><u>[ToC]<\/u><\/b> 📚<\/summary>\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Key features](#key-features)\n- [Example usage](#example-usage)\n  - [Exporting Data](#exporting-data)\n- [Implemented Algorithms](#implemented-algorithms)\n- [Installation](#installation)\n  - [Faster triangulation (optional)](#faster-triangulation-optional)\n- [Development](#development)\n- [Citing](#citing)\n- [Draft Paper](#draft-paper)\n- [Credits](#credits)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n<\/details>\n\n<!-- key-features-start -->\n\n## Key features\n\n- 🎯 **Intelligent Adaptive Sampling**: Adaptive focuses on areas of interest within a function, ensuring better results with fewer evaluations, saving time, and computational resources.\n- ⚡ **Parallel Execution**: The library leverages parallel processing for faster function evaluations, making optimal use of available computational resources.\n- 📊 **Live Plotting and Info Widgets**: When working in Jupyter notebooks, Adaptive offers real-time visualization of the learning process, making it easier to monitor progress and identify areas of improvement.\n- 🔧 **Customizable Loss Functions**: Adaptive supports various loss functions and allows customization, enabling users to tailor the learning process according to their specific needs.\n- 📈 **Support for Multidimensional Functions**: The library can handle functions with scalar or vector outputs in one or multiple dimensions, providing flexibility for a wide range of problems.\n- 🧩 **Seamless Integration**: Adaptive offers a simple and intuitive interface, making it easy to integrate with existing Python projects and workflows.\n- 💾 **Flexible Data Export**: The library provides options to export learned data as NumPy arrays or Pandas DataFrames, ensuring compatibility with various data processing tools.\n- 🌐 **Open-Source and Community-Driven**: Adaptive is an open-source project, encouraging contributions from the community to continuously improve and expand the library's features and capabilities.\n\n<!-- key-features-end -->\n\n## Example usage\n\nAdaptively learning a 1D function and live-plotting the process in a Jupyter notebook:\n\n```python\nfrom adaptive import notebook_extension, Runner, Learner1D\n\nnotebook_extension()\n\n\ndef peak(x, a=0.01):\n    return x + a**2 / (a**2 + x**2)\n\n\nlearner = Learner1D(peak, bounds=(-1, 1))\nrunner = Runner(learner, loss_goal=0.01)\nrunner.live_info()\nrunner.live_plot()\n```\n\n<img src=\"https://user-images.githubusercontent.com/6897215/38739170-6ac7c014-3f34-11e8-9e8f-93b3a3a3d61b.gif\" width='20%'> <\/img> <img src=\"https://user-images.githubusercontent.com/6897215/35219611-ac8b2122-ff73-11e7-9332-adffab64a8ce.gif\" width='40%'> <\/img> <img src=\"https://user-images.githubusercontent.com/6897215/47256441-d6d53700-d480-11e8-8224-d1cc49dbdcf5.gif\" width='20%'> <\/img>\n\n### Exporting Data\n\nYou can export the learned data as a NumPy array:\n\n```python\ndata = learner.to_numpy()\n```\n\nIf you have Pandas installed, you can also export the data as a DataFrame:\n\n```python\ndf = learner.to_dataframe()\n```\n\n<!-- implemented-algorithms-start -->\n\n## Implemented Algorithms\n\nThe core concept in `adaptive` is the *learner*.\nA *learner* samples a function at the most interesting locations within its parameter space, allowing for optimal sampling of the function.\nAs the function is evaluated at more points, the learner improves its understanding of the best locations to sample next.\n\nThe definition of the \"best locations\" depends on your application domain.\nWhile `adaptive` provides sensible default choices, the adaptive sampling process can be fully customized.\n\nThe following learners are implemented:\n\n<!-- implemented-algorithms-end -->\n\n- `Learner1D`: for 1D functions `f: ℝ → ℝ^N`,\n- `Learner2D`: for 2D functions `f: ℝ^2 → ℝ^N`,\n- `LearnerND`: for ND functions `f: ℝ^N → ℝ^M`,\n- `AverageLearner`: for random variables, allowing averaging of results over multiple evaluations,\n- `AverageLearner1D`: for stochastic 1D functions, estimating the mean value at each point,\n- `IntegratorLearner`: for integrating a 1D function `f: ℝ → ℝ`,\n- `BalancingLearner`: for running multiple learners simultaneously and selecting the \"best\" one as more points are gathered.\n\nMeta-learners (to be used with other learners):\n\n- `BalancingLearner`: for running several learners at once, selecting the \"most optimal\" one each time you get more points,\n- `DataSaver`: for when your function doesn't return just a scalar or a vector.\n\nIn addition to learners, `adaptive` offers primitives for parallel sampling across multiple cores or machines, with built-in support for:\n[concurrent.futures](https://docs.python.org/3/library/concurrent.futures.html),\n[mpi4py](https://mpi4py.readthedocs.io/en/stable/mpi4py.futures.html),\n[loky](https://loky.readthedocs.io/en/stable/),\n[ipyparallel](https://ipyparallel.readthedocs.io/en/latest/), and\n[distributed](https://distributed.readthedocs.io/en/latest/).\n\n<!-- rest-start -->\n\n## Installation\n\n`adaptive` works with Python 3.7 and higher on Linux, Windows, or Mac, and provides optional extensions for working with the Jupyter/IPython Notebook.\n\nThe recommended way to install adaptive is using `conda`:\n\n```bash\nconda install -c conda-forge adaptive\n```\n\n`adaptive` is also available on PyPI:\n\n```bash\npip install \"adaptive[notebook]\"\n```\n\nThe `[notebook]` above will also install the optional dependencies for running `adaptive` inside a Jupyter notebook.\n\n### Faster triangulation (optional)\n\nInstalling the optional [adaptive-triangulation](https://github.com/python-adaptive/adaptive-triangulation) package makes `adaptive.LearnerND` significantly faster by replacing the pure-Python triangulation with a Rust implementation:\n\n```bash\npip install \"adaptive[rust]\"\n```\n\nNo code changes are needed — the Rust backend is detected and used automatically.\nTo control the selection, pass `LearnerND(..., triangulation_backend=\"python\" | \"rust\" | \"auto\")` per learner, or set the environment variable `ADAPTIVE_TRIANGULATION_BACKEND=python` to force the pure-Python implementation globally (or to `rust` to make a missing Rust backend an error instead of a silent fallback).\n\nTo use Adaptive in Jupyterlab, you need to install the following labextensions.\n\n```bash\njupyter labextension install @jupyter-widgets/jupyterlab-manager\njupyter labextension install @pyviz/jupyterlab_pyviz\n```\n\n## Development\n\nClone the repository and run `pip install -e \".[notebook,test,other]\"` to add a link to the cloned repo into your Python path:\n\n```bash\ngit clone git@github.com:python-adaptive/adaptive.git\ncd adaptive\npip install -e \".[notebook,test,other]\"\n```\n\nWe recommend using a Conda environment or a virtualenv for package management during Adaptive development.\n\nTo avoid polluting the history with notebook output, set up the git filter by running:\n\n```bash\npython ipynb_filter.py\n```\n\nin the repository.\n\nTo maintain consistent code style, we use [pre-commit](https://pre-commit.com). Install it by running:\n\n```bash\npre-commit install\n```\n\nin the repository.\n\n## Citing\n\nIf you used Adaptive in a scientific work, please cite it as follows.\n\n```bib\n@misc{Nijholt2019,\n  doi = {10.5281/zenodo.1182437},\n  author = {Bas Nijholt and Joseph Weston and Jorn Hoofwijk and Anton Akhmerov},\n  title = {\\textit{Adaptive}: parallel active learning of mathematical functions},\n  publisher = {Zenodo},\n  year = {2019}\n}\n```\n\n## Draft Paper\n\nIf you're interested in the scientific background and principles behind Adaptive, we recommend taking a look at the [draft paper](https://github.com/python-adaptive/paper) that is currently being written.\nThis paper provides a comprehensive overview of the concepts, algorithms, and applications of the Adaptive library.\n\n## Credits\n\nWe would like to give credits to the following people:\n\n- Pedro Gonnet for his implementation of [CQUAD](https://www.gnu.org/software/gsl/manual/html_node/CQUAD-doubly_002dadaptive-integration.html), “Algorithm 4” as described in “Increasing the Reliability of Adaptive Quadrature Using Explicit Interpolants”, P. Gonnet, ACM Transactions on Mathematical Software, 37 (3), art. no. 26, 2010.\n- Pauli Virtanen for his `AdaptiveTriSampling` script (no longer available online since SciPy Central went down) which served as inspiration for the `adaptive.Learner2D`.\n\n<!-- rest-end -->\n\nFor general discussion, we have a [Gitter chat channel](https://gitter.im/python-adaptive/adaptive).\nIf you find any bugs or have any feature suggestions please file a GitHub [issue](https://github.com/python-adaptive/adaptive/issues/new) or submit a [pull request](https://github.com/python-adaptive/adaptive/pulls).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E616:35999:1793CA:5DE90E:6AB92BB8"},"text_sha256":"5331be8029b059ed7c9910224d8ec545a9ebd4f3b5df3b9c79309333733200e9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"annoviko/pyclustering","input_row":{"repository":"annoviko/pyclustering","url":"https://github.com/annoviko/pyclustering","name":"pyclustering","owner":"annoviko","description":"pyclustering is a Python, C++ data mining library.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1217,"issues":663,"created_at":"2014-02-25T18:59:03Z","updated_at":"2026-09-11T12:52:46Z","first_commit_at":"2014-02-25T19:08:17Z","last_commit_at":"2024-02-08T16:58:25Z","activity_months":119.41,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:17.982Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"annoviko/pyclustering","visibility":"public","created_at":"2014-02-25T18:59:03Z","updated_at":"2026-09-11T12:52:46Z","private":false,"fork":false,"archived":false,"stargazers_count":1217,"open_issues_count":80,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2148","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:1868D5F:1C8E3D8:6AB92BC2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2147","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088A:35C5DA:17ACC6A:1BD148C:6AB92BC2"},"commit":{"sha":"6b2bc227c1a7e7230bbbf94fb650d5bb36261129","url":"https://github.com/annoviko/pyclustering/commit/6b2bc227c1a7e7230bbbf94fb650d5bb36261129","date":"2018-05-22T09:17:23Z","author_date":"2018-05-22T09:17:23Z","committer_date":"2018-05-22T09:17:23Z","tree_sha":"f86df615111f97106c72030974601cb54207cf37","message_first_line":"#424: Dendrogram of BANG-blocks, optimization, corrections."},"tree_request_status":200,"tree_rate":{"github_remaining":"2146","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082C:7307A:17C10A7:1BE5FD0:6AB92BC2"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":11990,"blob_sha":"8a7dd634482ab584b92d64ad0d30a212ee9905ec","priority":0}],"documents":[{"path":"README.rst","size":11990,"blob_sha":"8a7dd634482ab584b92d64ad0d30a212ee9905ec","priority":0,"status":200,"text":"|Build Status Linux| |Build Status Win| |Coverage Status| |Code\nQuality| |Documentation| |PyPi| |DOI|\n\nPyClustering\n============\n\n**pyclustering** is a Python, C++ data mining library (clustering\nalgorithm, oscillatory networks, neural networks). The library provides\nPython and C++ implementations (via CCORE library) of each algorithm or\nmodel. CCORE library is a part of pyclustering and supported only for\n32, 64-bit Linux and 32, 64-bit Windows operating systems.\n\n**Version**: 0.8.x\n\n**License**: GNU General Public License\n\n**E-Mail**: pyclustering@yandex.ru\n\n**Gitter**: https://gitter.im/pyclustering/pyclustering\n\n**PyClustering Wiki**: https://github.com/annoviko/pyclustering/wiki\n\n\n\nDependencies\n============\n\n**Required packages**: scipy, matplotlib, numpy, PIL\n\n**Python version**: >=3.4 (32, 64-bit)\n\n**C++ version**: >= 14 (32, 64-bit)\n\n\n\nPerformance\n===========\n\nEach algorithm is implemented using Python and C/C++ language, thus performance can be significantly increase by **ccore** flag, for example:\n\n.. code:: python\n\n    xmeans_instance = xmeans(data_points, start_centers, 20, ccore = True);\n\n**ccore** option runs ccore shared library (core of the pyclustering library). The core is maintained for Linux 32, 64-bit and Windows 32, 64-bit.\n\n\n\nInstallation\n============\n\nInstallation using pip3 tool:\n\n.. code:: bash\n\n    $ pip3 install pyclustering\n\nManual installation using GCC:\n\n.. code:: bash\n\n    # get sources of the pyclustering library, for example, from repository\n    $ mkdir pyclustering\n    $ cd pyclustering/\n    $ git clone https://github.com/annoviko/pyclustering.git .\n\n    # compile CCORE library (core of the pyclustering library)\n    # you can specify platform (32-bit: 'ccore_x86', 64-bit: 'ccore_x64')\n    $ cd pyclustering/ccore\n    $ make ccore        # compile CCORE for both platforms\n\n    # return to parent folder of the pyclustering library\n    cd ../\n\n    # add current folder to python path\n    PYTHONPATH=`pwd`\n    export PYTHONPATH=${PYTHONPATH}\n\nManual installation using Visual Studio:\n\n1. Clone repository from: https://github.com/annoviko/pyclustering.git\n2. Open folder pyclustering/ccore\n3. Open Visual Studio project ccore.sln\n4. Select solution platform: 'x86' or 'x64'\n5. Build 'ccore' project.\n6. Add pyclustering folder to python path.\n\n\n\nProposals, Questions, Bugs\n==========================\n\nIn case of any questions, proposals or bugs related to the pyclustering please contact to pyclustering@yandex.ru or create an issue here.\n\n\n\nPyClustering Status\n===================\n\n+-----------------+------------------------------+--------------------------------+\n| Branch          | master                       | 0.8.dev                        |\n+=================+==============================+================================+\n| Build (Linux)   | |Build Status Linux|         | |Build Status Linux 0.8|       |\n+-----------------+------------------------------+--------------------------------+\n| Build (Win)     | |Build Status Win|           | |Build Status Win 0.8|         |\n+-----------------+------------------------------+--------------------------------+\n| Code Coverage   | |Coverage Status|            | |Coverage Status 0.8|          |\n+-----------------+------------------------------+--------------------------------+\n| Code Quality    | |Code Quality|               | |Code Quality 0.8|             |\n+-----------------+------------------------------+--------------------------------+\n\n\n\nBrief Overview of the Library Content\n=====================================\n\n**Clustering algorithms (module pyclustering.cluster):** \n\n- Agglomerative [Python, C++]\n- BIRCH [Python]\n- BSAS [Python, C++]\n- CLARANS [Python]\n- CURE [Python, C++]\n- DBSCAN [Python, C++]\n- EMA [Python]\n- GA (Genetic Algorithm) [Python, C++]\n- HSyncNet [Python, C++]\n- K-Means [Python, C++]\n- K-Means++ [Python, C++]\n- K-Medians [Python, C++]\n- K-Medoids (PAM) [Python, C++]\n- MBSAS [Python, C++]\n- OPTICS [Python, C++]\n- ROCK [Python, C++]\n- SOM-SC [Python, C++]\n- SyncNet [Python, C++]\n- Sync-SOM [Python]\n- TTSAS [Python, C++]\n- X-Means [Python, C++]\n\n\n**Oscillatory networks and neural networks (module pyclustering.nnet):**\n\n- CNN (Chaotic Neural Network) [Python] \n- fSync (Oscillatory network based on Landau-Stuart equation and Kuramoto model) [Python] \n- HHN (Oscillatory network based on Hodgkin-Huxley model) [Python, C++]\n- Hysteresis Oscillatory Network [Python]\n- LEGION (Local Excitatory Global Inhibitory Oscillatory Network) [Python, C++]\n- PCNN (Pulse-Coupled Neural Network) [Python, C++]\n- SOM (Self-Organized Map) [Python, C++]\n- Sync (Oscillatory network based on Kuramoto model) [Python, C++]\n- SyncPR (Oscillatory network for pattern recognition) [Python, C++]\n- SyncSegm (Oscillatory network for image segmentation) [Python, C++]\n\n**Graph Coloring Algorithms (module pyclustering.gcolor):**\n\n- DSatur [Python]\n- Hysteresis [Python]\n- GColorSync [Python]\n\n**Containers (module pyclustering.container):**\n\n- KD Tree [Python, C++]\n- CF Tree [Python]\n\n\n\nExamples:\n=========\n\nThe library contains examples for each algorithm and oscillatory network\nmodel:\n\n**Clustering examples:** ``pyclustering/cluster/examples``\n\n**Graph coloring examples:** ``pyclustering/gcolor/examples``\n\n**Oscillatory network examples:** ``pyclustering/nnet/examples``\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/example_cluster_place.png\n   :alt: Where are examples?\n\n\n\nIllustrations:\n==============\n\n**Cluster allocation on FCPS dataset collection by DBSCAN:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/fcps_cluster_analysis.png\n   :alt: Clustering by DBSCAN\n\n**Cluster allocation by OPTICS using cluster-ordering diagram:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/optics_example_clustering.png\n   :alt: Clustering by OPTICS\n\n\n**Image segmentation by Sync-SOM algorithm:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/sync_som_image_segmentation.png\n   :alt: Image segmentation by Sync-SOM\n\n\n**Partial synchronization (clustering) in Sync oscillatory network:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/sync_partial_synchronization.png\n   :alt: Partial synchronization in Sync oscillatory network\n\n\n**Cluster visualization by SOM (Self-Organized Feature Map)**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/target_som_processing.png\n   :alt: Cluster visualization by SOM\n\n\n\n\nCode Examples:\n==============\n\n**Data clustering by CURE algorithm**\n\n.. code:: python\n\n    from pyclustering.cluster import cluster_visualizer;\n    from pyclustering.cluster.cure import cure;\n\n    from pyclustering.utils import read_sample;\n\n    from pyclustering.samples.definitions import FCPS_SAMPLES;\n\n    # Input data in following format [ [0.1, 0.5], [0.3, 0.1], ... ].\n    input_data = read_sample(FCPS_SAMPLES.SAMPLE_LSUN);\n\n    # Allocate three clusters:\n    cure_instance = cure(input_data, 3);\n    cure_instance.process();\n    clusters = cure_instance.get_clusters();\n\n    # Visualize clusters:\n    visualizer = cluster_visualizer();\n    visualizer.append_clusters(clusters, None);\n    visualizer.show();\n\n**Data clustering by SYNC-SOM (bio-inspired) algorithm**\n\n.. code:: python\n\n    from pyclustering.cluster import cluster_visualizer;\n    from pyclustering.cluster.syncsom import syncsom;\n\n    from pyclustering.samples.definitions import FCPS_SAMPLES;\n\n    from pyclustering.utils import read_sample, draw_dynamics;\n\n    # Input data in following format [ [0.1, 0.5], [0.3, 0.1], ... ].\n    input_data = read_sample(FCPS_SAMPLES.SAMPLE_TARGET);\n\n    # Create oscillatory network for cluster analysis\n    # where the first layer has size 9x9. Radius\n    # connectivity (similarity parameter) is 0.9.\n    # CCORE library (C/C++ part of the pyclustering library)\n    # is used to ensure high performance.\n    network = syncsom(input_data, 9, 9, 0.9, ccore = True);\n\n    # Simulate network (start processing) with collecting\n    # output dynamic.\n    (dyn_time, dyn_phase) = network.process(True, 0.999);\n\n    # Show structure of the first layer\n    network.show_som_layer();\n\n    # Show structure of the second layer\n    network.show_sync_layer();\n\n    # Show results of clustering\n    clusters = network.get_clusters();\n    visualizer = cluster_visualizer();\n    visualizer.append_clusters(clusters, input_data);\n    visualizer.show();\n\n    # Show output dynamic of the network (that is obtained\n    # from the second layer).\n    draw_dynamics(dyn_time, dyn_phase, x_title = \"Time\", y_title = \"Phase\", y_lim = [0, 2 * 3.14]);\n\n**Simulation of oscillatory network PCNN**\n\n.. code:: python\n\n    from pyclustering.nnet.pcnn import pcnn_network, pcnn_visualizer;\n\n    # Create Pulse-Coupled neural network with 10 oscillators.\n    net = pcnn_network(10, ccore = ccore_flag);\n\n    # Perform simulation during 100 steps using binary external stimulus.\n    dynamic = net.simulate(100, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1]);\n\n    # Allocate synchronous ensembles in the network.\n    ensembles = dynamic.allocate_sync_ensembles();\n\n    # Show output dynamic.\n    pcnn_visualizer.show_output_dynamic(dynamic); \n\n**Simulation of chaotic neural network CNN**\n\n.. code:: python\n\n    from pyclustering.samples.definitions import FCPS_SAMPLES;\n\n    from pyclustering.utils import read_sample;\n\n    from pyclustering.nnet.cnn import cnn_network, cnn_visualizer;\n\n    # load stimulus from file\n    stimulus = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE1);\n            \n    # create chaotic neural network, amount of neurons should be equal to amout of stimulus\n    network_instance = cnn_network(len(stimulus));\n            \n    # simulate it during 100 steps\n    output_dynamic = network_instance.simulate(steps, stimulus);\n            \n    # display output dynamic of the network\n    cnn_visualizer.show_output_dynamic(output_dynamic);\n            \n    # dysplay dynamic matrix and observation matrix to show clustering\n    # phenomenon.\n    cnn_visualizer.show_dynamic_matrix(output_dynamic);\n    cnn_visualizer.show_observation_matrix(output_dynamic); \n\n.. |Build Status Linux| image:: https://travis-ci.org/annoviko/pyclustering.svg?branch=master\n   :target: https://travis-ci.org/annoviko/pyclustering\n.. |Build Status Win| image:: https://ci.appveyor.com/api/projects/status/4uly2exfp49emwn0/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/annoviko/pyclustering/branch/master\n.. |Coverage Status| image:: https://coveralls.io/repos/github/annoviko/pyclustering/badge.svg?branch=master&ts=1\n   :target: https://coveralls.io/github/annoviko/pyclustering?branch=master\n.. |Code Quality| image:: https://scrutinizer-ci.com/g/annoviko/pyclustering/badges/quality-score.png?b=master\n   :target: https://scrutinizer-ci.com/g/annoviko/pyclustering/?branch=master\n.. |Documentation| image:: https://codedocs.xyz/annoviko/pyclustering.svg\n   :target: https://codedocs.xyz/annoviko/pyclustering/\n.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1183636.svg\n   :target: https://doi.org/10.5281/zenodo.1183636\n.. |PyPi| image:: https://badge.fury.io/py/pyclustering.svg\n   :target: https://badge.fury.io/py/pyclustering\n.. |Build Status Linux 0.8| image:: https://travis-ci.org/annoviko/pyclustering.svg?branch=0.8.dev\n   :target: https://travis-ci.org/annoviko/pyclustering\n.. |Build Status Win 0.8| image:: https://ci.appveyor.com/api/projects/status/4uly2exfp49emwn0/branch/0.8.dev?svg=true\n   :target: https://ci.appveyor.com/project/annoviko/pyclustering/branch/0.8.dev\n.. |Coverage Status 0.8| image:: https://coveralls.io/repos/github/annoviko/pyclustering/badge.svg?branch=0.8.dev&ts=1\n   :target: https://coveralls.io/github/annoviko/pyclustering?branch=0.8.dev\n.. |Code Quality 0.8| image:: https://scrutinizer-ci.com/g/annoviko/pyclustering/badges/quality-score.png?b=0.8.dev\n   :target: https://scrutinizer-ci.com/g/annoviko/pyclustering/?branch=0.8.dev\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:18564C:5EAB0E:6AB92BC2"},"text_sha256":"58fe18eb97e066c2e829a1e9cad774d927bde1e3191849e6b5ea7440e3f15082"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2145","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092A:7418C:181BAF1:1C40E5A:6AB92BC4"},"commit":{"sha":"906532e4a5422479cc6813e852f9c3cb48ea7a64","url":"https://github.com/annoviko/pyclustering/commit/906532e4a5422479cc6813e852f9c3cb48ea7a64","date":"2024-02-08T16:58:25Z","author_date":"2024-02-08T16:58:25Z","committer_date":"2024-02-08T16:58:25Z","tree_sha":"45c1f3f05842da4aafcb9d3fea2b1bca9dd3e3af","message_first_line":"Update README.rst"},"tree_request_status":200,"tree_rate":{"github_remaining":"2144","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17D8432:1BFCA0F:6AB92BC4"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":20117,"blob_sha":"ad92ba9c08c0e36c88959149e10f7eb5293ff1df","priority":0}],"documents":[{"path":"README.rst","size":20117,"blob_sha":"ad92ba9c08c0e36c88959149e10f7eb5293ff1df","priority":0,"status":200,"text":"Warning - Attention Users\n=========================\n\n**Please be aware that the `pyclustering` library is no longer supported as of 2021 due to personal reasons. There will be no further maintenance, issue addressing, or feature development for this repository.**\n\n**For continued usage, I recommend seeking alternative solutions.**\n\n**Thank you for your understanding.**\n\n\nBuild Status\n============\n\n|Build Status Linux MacOS| |Build Status Win| |Coverage Status| |PyPi| |Download Counter| |JOSS|\n\n\nPyClustering\n============\n\n**pyclustering** is a Python, C++ data mining library (clustering\nalgorithm, oscillatory networks, neural networks). The library provides\nPython and C++ implementations (C++ pyclustering library) of each algorithm or\nmodel. C++ pyclustering library is a part of pyclustering and supported for\nLinux, Windows and MacOS operating systems.\n\n**Version**: 0.11.dev\n\n**License**: The 3-Clause BSD License\n\n**E-Mail**: pyclustering@yandex.ru\n\n**Documentation**: https://pyclustering.github.io/docs/0.10.1/html/\n\n**Homepage**: https://pyclustering.github.io/\n\n**PyClustering Wiki**: https://github.com/annoviko/pyclustering/wiki\n\n\n\nDependencies\n============\n\n**Required packages**: scipy, matplotlib, numpy, Pillow\n\n**Python version**: >=3.6 (32-bit, 64-bit)\n\n**C++ version**: >= 14 (32-bit, 64-bit)\n\n\n\nPerformance\n===========\n\nEach algorithm is implemented using Python and C/C++ language, if your platform is not supported then Python\nimplementation is used, otherwise C/C++. Implementation can be chosen by `ccore` flag (by default it is always\n'True' and it means that C/C++ is used), for example:\n\n.. code:: python\n\n    # As by default - C/C++ part of the library is used\n    xmeans_instance_1 = xmeans(data_points, start_centers, 20, ccore=True);\n\n    # The same - C/C++ part of the library is used by default\n    xmeans_instance_2 = xmeans(data_points, start_centers, 20);\n\n    # Switch off core - Python is used\n    xmeans_instance_3 = xmeans(data_points, start_centers, 20, ccore=False);\n\n\n\nInstallation\n============\n\nInstallation using pip3 tool:\n\n.. code:: bash\n\n    $ pip3 install pyclustering\n\nManual installation from official repository using Makefile:\n\n.. code:: bash\n\n    # get sources of the pyclustering library, for example, from repository\n    $ mkdir pyclustering\n    $ cd pyclustering/\n    $ git clone https://github.com/annoviko/pyclustering.git .\n\n    # compile CCORE library (core of the pyclustering library).\n    $ cd ccore/\n    $ make ccore_64bit      # build for 64-bit OS\n\n    # $ make ccore_32bit    # build for 32-bit OS\n\n    # return to parent folder of the pyclustering library\n    $ cd ../\n\n    # install pyclustering library\n    $ python3 setup.py install\n\n    # optionally - test the library\n    $ python3 setup.py test\n\nManual installation using CMake:\n\n.. code:: bash\n\n    # get sources of the pyclustering library, for example, from repository\n    $ mkdir pyclustering\n    $ cd pyclustering/\n    $ git clone https://github.com/annoviko/pyclustering.git .\n\n    # generate build files.\n    $ mkdir build\n    $ cmake ..\n\n    # build pyclustering-shared target depending on what was generated (Makefile or MSVC solution)\n    # if Makefile has been generated then\n    $ make pyclustering-shared\n\n    # return to parent folder of the pyclustering library\n    $ cd ../\n\n    # install pyclustering library\n    $ python3 setup.py install\n\n    # optionally - test the library\n    $ python3 setup.py test\n\nManual installation using Microsoft Visual Studio solution:\n\n1. Clone repository from: https://github.com/annoviko/pyclustering.git\n2. Open folder `pyclustering/ccore`\n3. Open Visual Studio project `ccore.sln`\n4. Select solution platform: `x86` or `x64`\n5. Build `pyclustering-shared` project.\n6. Add pyclustering folder to python path or install it using setup.py\n\n.. code:: bash\n\n    # install pyclustering library\n    $ python3 setup.py install\n\n    # optionally - test the library\n    $ python3 setup.py test\n\n\n\nProposals, Questions, Bugs\n==========================\n\nIn case of any questions, proposals or bugs related to the pyclustering please contact to pyclustering@yandex.ru or create an issue here.\n\n\n\nPyClustering Status\n===================\n\n+----------------------+------------------------------+-------------------------------------+---------------------------------+\n| Branch               | master                       | 0.10.dev                            | 0.10.1.rel                      |\n+======================+==============================+=====================================+=================================+\n| Build (Linux, MacOS) | |Build Status Linux MacOS|   | |Build Status Linux MacOS 0.10.dev| | |Build Status Linux 0.10.1.rel| |\n+----------------------+------------------------------+-------------------------------------+---------------------------------+\n| Build (Win)          | |Build Status Win|           | |Build Status Win 0.10.dev|         | |Build Status Win 0.10.1.rel|   |\n+----------------------+------------------------------+-------------------------------------+---------------------------------+\n| Code Coverage        | |Coverage Status|            | |Coverage Status 0.10.dev|          | |Coverage Status 0.10.1.rel|    |\n+----------------------+------------------------------+-------------------------------------+---------------------------------+\n\n\n\nCite the Library\n================\n\nIf you are using pyclustering library in a scientific paper, please, cite the library:\n\nNovikov, A., 2019. PyClustering: Data Mining Library. Journal of Open Source Software, 4(36), p.1230. Available at: http://dx.doi.org/10.21105/joss.01230.\n\nBibTeX entry:\n\n.. code::\n\n    @article{Novikov2019,\n        doi         = {10.21105/joss.01230},\n        url         = {https://doi.org/10.21105/joss.01230},\n        year        = 2019,\n        month       = {apr},\n        publisher   = {The Open Journal},\n        volume      = {4},\n        number      = {36},\n        pages       = {1230},\n        author      = {Andrei Novikov},\n        title       = {{PyClustering}: Data Mining Library},\n        journal     = {Journal of Open Source Software}\n    }\n\n\n\nBrief Overview of the Library Content\n=====================================\n\n**Clustering algorithms and methods (module pyclustering.cluster):**\n\n+------------------------+---------+-----+\n| Algorithm              | Python  | C++ |\n+========================+=========+=====+\n| Agglomerative          | ✓       | ✓   |\n+------------------------+---------+-----+\n| BANG                   | ✓       |     |\n+------------------------+---------+-----+\n| BIRCH                  | ✓       |     |\n+------------------------+---------+-----+\n| BSAS                   | ✓       | ✓   |\n+------------------------+---------+-----+\n| CLARANS                | ✓       |     |\n+------------------------+---------+-----+\n| CLIQUE                 | ✓       | ✓   |\n+------------------------+---------+-----+\n| CURE                   | ✓       | ✓   |\n+------------------------+---------+-----+\n| DBSCAN                 | ✓       | ✓   |\n+------------------------+---------+-----+\n| Elbow                  | ✓       | ✓   |\n+------------------------+---------+-----+\n| EMA                    | ✓       |     |\n+------------------------+---------+-----+\n| Fuzzy C-Means          | ✓       | ✓   |\n+------------------------+---------+-----+\n| GA (Genetic Algorithm) | ✓       | ✓   |\n+------------------------+---------+-----+\n| G-Means                | ✓       | ✓   |\n+------------------------+---------+-----+\n| HSyncNet               | ✓       | ✓   |\n+------------------------+---------+-----+\n| K-Means                | ✓       | ✓   |\n+------------------------+---------+-----+\n| K-Means++              | ✓       | ✓   |\n+------------------------+---------+-----+\n| K-Medians              | ✓       | ✓   |\n+------------------------+---------+-----+\n| K-Medoids              | ✓       | ✓   |\n+------------------------+---------+-----+\n| MBSAS                  | ✓       | ✓   |\n+------------------------+---------+-----+\n| OPTICS                 | ✓       | ✓   |\n+------------------------+---------+-----+\n| ROCK                   | ✓       | ✓   |\n+------------------------+---------+-----+\n| Silhouette             | ✓       | ✓   |\n+------------------------+---------+-----+\n| SOM-SC                 | ✓       | ✓   |\n+------------------------+---------+-----+\n| SyncNet                | ✓       | ✓   |\n+------------------------+---------+-----+\n| Sync-SOM               | ✓       |     |\n+------------------------+---------+-----+\n| TTSAS                  | ✓       | ✓   |\n+------------------------+---------+-----+\n| X-Means                | ✓       | ✓   |\n+------------------------+---------+-----+\n\n\n**Oscillatory networks and neural networks (module pyclustering.nnet):**\n\n+--------------------------------------------------------------------------------+---------+-----+\n| Model                                                                          | Python  | C++ |\n+================================================================================+=========+=====+\n| CNN (Chaotic Neural Network)                                                   | ✓       |     |\n+--------------------------------------------------------------------------------+---------+-----+\n| fSync (Oscillatory network based on Landau-Stuart equation and Kuramoto model) | ✓       |     |\n+--------------------------------------------------------------------------------+---------+-----+\n| HHN (Oscillatory network based on Hodgkin-Huxley model)                        | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| Hysteresis Oscillatory Network                                                 | ✓       |     |\n+--------------------------------------------------------------------------------+---------+-----+\n| LEGION (Local Excitatory Global Inhibitory Oscillatory Network)                | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| PCNN (Pulse-Coupled Neural Network)                                            | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| SOM (Self-Organized Map)                                                       | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| Sync (Oscillatory network based on Kuramoto model)                             | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| SyncPR (Oscillatory network for pattern recognition)                           | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n| SyncSegm (Oscillatory network for image segmentation)                          | ✓       | ✓   |\n+--------------------------------------------------------------------------------+---------+-----+\n\n\n**Graph Coloring Algorithms (module pyclustering.gcolor):**\n\n+------------------------+---------+-----+\n| Algorithm              | Python  | C++ |\n+========================+=========+=====+\n| DSatur                 | ✓       |     |\n+------------------------+---------+-----+\n| Hysteresis             | ✓       |     |\n+------------------------+---------+-----+\n| GColorSync             | ✓       |     |\n+------------------------+---------+-----+\n\n\n**Containers (module pyclustering.container):**\n\n+------------------------+---------+-----+\n| Algorithm              | Python  | C++ |\n+========================+=========+=====+\n| KD Tree                | ✓       | ✓   |\n+------------------------+---------+-----+\n| CF Tree                | ✓       |     |\n+------------------------+---------+-----+\n\n\n\nExamples in the Library\n=======================\n\nThe library contains examples for each algorithm and oscillatory network model:\n\n**Clustering examples:** ``pyclustering/cluster/examples``\n\n**Graph coloring examples:** ``pyclustering/gcolor/examples``\n\n**Oscillatory network examples:** ``pyclustering/nnet/examples``\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/example_cluster_place.png\n   :alt: Where are examples?\n\n\n\nCode Examples\n=============\n\n**Data clustering by CURE algorithm**\n\n.. code:: python\n\n    from pyclustering.cluster import cluster_visualizer;\n    from pyclustering.cluster.cure import cure;\n    from pyclustering.utils import read_sample;\n    from pyclustering.samples.definitions import FCPS_SAMPLES;\n\n    # Input data in following format [ [0.1, 0.5], [0.3, 0.1], ... ].\n    input_data = read_sample(FCPS_SAMPLES.SAMPLE_LSUN);\n\n    # Allocate three clusters.\n    cure_instance = cure(input_data, 3);\n    cure_instance.process();\n    clusters = cure_instance.get_clusters();\n\n    # Visualize allocated clusters.\n    visualizer = cluster_visualizer();\n    visualizer.append_clusters(clusters, input_data);\n    visualizer.show();\n\n**Data clustering by K-Means algorithm**\n\n.. code:: python\n\n    from pyclustering.cluster.kmeans import kmeans, kmeans_visualizer\n    from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer\n    from pyclustering.samples.definitions import FCPS_SAMPLES\n    from pyclustering.utils import read_sample\n\n    # Load list of points for cluster analysis.\n    sample = read_sample(FCPS_SAMPLES.SAMPLE_TWO_DIAMONDS)\n\n    # Prepare initial centers using K-Means++ method.\n    initial_centers = kmeans_plusplus_initializer(sample, 2).initialize()\n\n    # Create instance of K-Means algorithm with prepared centers.\n    kmeans_instance = kmeans(sample, initial_centers)\n\n    # Run cluster analysis and obtain results.\n    kmeans_instance.process()\n    clusters = kmeans_instance.get_clusters()\n    final_centers = kmeans_instance.get_centers()\n\n    # Visualize obtained results\n    kmeans_visualizer.show_clusters(sample, clusters, final_centers)\n\n**Data clustering by OPTICS algorithm**\n\n.. code:: python\n\n    from pyclustering.cluster import cluster_visualizer\n    from pyclustering.cluster.optics import optics, ordering_analyser, ordering_visualizer\n    from pyclustering.samples.definitions import FCPS_SAMPLES\n    from pyclustering.utils import read_sample\n\n    # Read sample for clustering from some file\n    sample = read_sample(FCPS_SAMPLES.SAMPLE_LSUN)\n\n    # Run cluster analysis where connectivity radius is bigger than real\n    radius = 2.0\n    neighbors = 3\n    amount_of_clusters = 3\n    optics_instance = optics(sample, radius, neighbors, amount_of_clusters)\n\n    # Performs cluster analysis\n    optics_instance.process()\n\n    # Obtain results of clustering\n    clusters = optics_instance.get_clusters()\n    noise = optics_instance.get_noise()\n    ordering = optics_instance.get_ordering()\n\n    # Visualize ordering diagram\n    analyser = ordering_analyser(ordering)\n    ordering_visualizer.show_ordering_diagram(analyser, amount_of_clusters)\n\n    # Visualize clustering results\n    visualizer = cluster_visualizer()\n    visualizer.append_clusters(clusters, sample)\n    visualizer.show()\n\n**Simulation of oscillatory network PCNN**\n\n.. code:: python\n\n    from pyclustering.nnet.pcnn import pcnn_network, pcnn_visualizer\n\n    # Create Pulse-Coupled neural network with 10 oscillators.\n    net = pcnn_network(10)\n\n    # Perform simulation during 100 steps using binary external stimulus.\n    dynamic = net.simulate(50, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1])\n\n    # Allocate synchronous ensembles from the output dynamic.\n    ensembles = dynamic.allocate_sync_ensembles()\n\n    # Show output dynamic.\n    pcnn_visualizer.show_output_dynamic(dynamic, ensembles)\n\n**Simulation of chaotic neural network CNN**\n\n.. code:: python\n\n    from pyclustering.cluster import cluster_visualizer\n    from pyclustering.samples.definitions import SIMPLE_SAMPLES\n    from pyclustering.utils import read_sample\n    from pyclustering.nnet.cnn import cnn_network, cnn_visualizer\n\n    # Load stimulus from file.\n    stimulus = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE3)\n\n    # Create chaotic neural network, amount of neurons should be equal to amount of stimulus.\n    network_instance = cnn_network(len(stimulus))\n\n    # Perform simulation during 100 steps.\n    steps = 100\n    output_dynamic = network_instance.simulate(steps, stimulus)\n\n    # Display output dynamic of the network.\n    cnn_visualizer.show_output_dynamic(output_dynamic)\n\n    # Display dynamic matrix and observation matrix to show clustering phenomenon.\n    cnn_visualizer.show_dynamic_matrix(output_dynamic)\n    cnn_visualizer.show_observation_matrix(output_dynamic)\n\n    # Visualize clustering results.\n    clusters = output_dynamic.allocate_sync_ensembles(10)\n    visualizer = cluster_visualizer()\n    visualizer.append_clusters(clusters, stimulus)\n    visualizer.show()\n\n\n\nIllustrations\n=============\n\n**Cluster allocation on FCPS dataset collection by DBSCAN:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/fcps_cluster_analysis.png\n   :alt: Clustering by DBSCAN\n\n**Cluster allocation by OPTICS using cluster-ordering diagram:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/optics_example_clustering.png\n   :alt: Clustering by OPTICS\n\n\n**Partial synchronization (clustering) in Sync oscillatory network:**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/sync_partial_synchronization.png\n   :alt: Partial synchronization in Sync oscillatory network\n\n\n**Cluster visualization by SOM (Self-Organized Feature Map)**\n\n.. image:: https://github.com/annoviko/pyclustering/blob/master/docs/img/target_som_processing.png\n   :alt: Cluster visualization by SOM\n\n\n\n.. |Build Status Linux MacOS| image:: https://travis-ci.org/annoviko/pyclustering.svg?branch=master\n   :target: https://travis-ci.org/annoviko/pyclustering\n.. |Build Status Win| image:: https://ci.appveyor.com/api/projects/status/4uly2exfp49emwn0/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/annoviko/pyclustering/branch/master\n.. |Coverage Status| image:: https://coveralls.io/repos/github/annoviko/pyclustering/badge.svg?branch=master&ts=1\n   :target: https://coveralls.io/github/annoviko/pyclustering?branch=master\n.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4280556.svg\n   :target: https://doi.org/10.5281/zenodo.4280556\n.. |PyPi| image:: https://badge.fury.io/py/pyclustering.svg\n   :target: https://badge.fury.io/py/pyclustering\n.. |Build Status Linux MacOS 0.10.dev| image:: https://travis-ci.org/annoviko/pyclustering.svg?branch=0.10.dev\n   :target: https://travis-ci.org/annoviko/pyclustering\n.. |Build Status Win 0.10.dev| image:: https://ci.appveyor.com/api/projects/status/4uly2exfp49emwn0/branch/0.10.dev?svg=true\n   :target: https://ci.appveyor.com/project/annoviko/pyclustering/branch/0.9.dev\n.. |Coverage Status 0.10.dev| image:: https://coveralls.io/repos/github/annoviko/pyclustering/badge.svg?branch=0.10.dev&ts=1\n   :target: https://coveralls.io/github/annoviko/pyclustering?branch=0.9.dev\n.. |Build Status Linux 0.10.1.rel| image:: https://travis-ci.org/annoviko/pyclustering.svg?branch=0.10.1.rel\n   :target: https://travis-ci.org/annoviko/pyclustering\n.. |Build Status Win 0.10.1.rel| image:: https://ci.appveyor.com/api/projects/status/4uly2exfp49emwn0/branch/0.10.1.rel?svg=true\n   :target: https://ci.appveyor.com/project/annoviko/pyclustering/branch/0.10.1.rel\n.. |Coverage Status 0.10.1.rel| image:: https://coveralls.io/repos/github/annoviko/pyclustering/badge.svg?branch=0.10.1.rel&ts=1\n   :target: https://coveralls.io/github/annoviko/pyclustering?branch=0.10.1.rel\n.. |Download Counter| image:: https://pepy.tech/badge/pyclustering\n   :target: https://pepy.tech/project/pyclustering\n.. |JOSS| image:: http://joss.theoj.org/papers/10.21105/joss.01230/status.svg\n   :target: https://doi.org/10.21105/joss.01230\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF88:09ED:E5A74:3F68D6:6AB92BC4"},"text_sha256":"48a25c89a70db15d1c75bd2f67da40ef80d232e5dc442c5aacfbb2ba96cc095b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"onnx/onnxmltools","input_row":{"repository":"onnx/onnxmltools","url":"https://github.com/onnx/onnxmltools","name":"onnxmltools","owner":"onnx","description":"ONNXMLTools enables conversion of models to ONNX","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1171,"issues":314,"created_at":"2018-02-16T20:37:33Z","updated_at":"2026-09-21T12:17:49Z","first_commit_at":"2018-02-16T20:37:34Z","last_commit_at":"2026-06-23T07:23:33Z","activity_months":100.15000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:22.329Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"onnx/onnxmltools","visibility":"public","created_at":"2018-02-16T20:37:33Z","updated_at":"2026-09-21T12:17:49Z","private":false,"fork":false,"archived":false,"stargazers_count":1171,"open_issues_count":152,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2143","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0834:0AC4:129C51B:15F17C1:6AB92BC6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2142","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:180FF2D:1C356D3:6AB92BC6"},"commit":{"sha":"ccf3acb629d90d4a5634252951c2ea530302cc03","url":"https://github.com/onnx/onnxmltools/commit/ccf3acb629d90d4a5634252951c2ea530302cc03","date":"2018-05-23T18:18:25Z","author_date":"2018-05-23T18:18:25Z","committer_date":"2018-05-23T18:18:25Z","tree_sha":"0f2a14dfb6c7818041954f24cf75b3d3f2f7b3f6","message_first_line":"Adopt new broadcasting behavior (i.e., broadcasting in numpy) (#44)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2141","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0798:180242:17FA782:1C1F9F5:6AB92BC7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2158,"blob_sha":"0fb63f74f69f51b67c50544ad0f989ad1da193c5","priority":0},{"path":"README.rst","size":2013,"blob_sha":"8ff7d5817608ddaa17d83479cc5715e41c3362fc","priority":0}],"documents":[{"path":"README.md","size":2158,"blob_sha":"0fb63f74f69f51b67c50544ad0f989ad1da193c5","priority":0,"status":200,"text":"\n<p align=\"center\"><img width=\"40%\" src=\"docs/ONNXMLTools_logo_main.png\" /><\/p>\n\n| Linux | Windows |\n|-------|---------|\n| [![Build Status](https://travis-ci.org/onnx/onnxmltools.svg?branch=master)](https://travis-ci.org/onnx/onnxmltools) | [![Build status](https://ci.appveyor.com/api/projects/status/d1xav3amubypje4n?svg=true)](https://ci.appveyor.com/project/xadupre/onnxmltools) |\n\n\n# Introduction \nONNXMLTools enables you to convert models from different machine learning toolkits into [ONNX](https://onnx.ai). Currently the following toolkits are supported:\n* Apple CoreML\n* scikit-learn (subset of models convertible to ONNX)\n\n(To convert ONNX model to CoreML, see [onnx-coreml](https://github.com/onnx/onnx-coreml))\n\n# Getting Started\nClone this repository on your local machine.\n\n## Install\nYou can install latest release of ONNXMLTools from pypi:\n```\npip install onnxmltools\n```\nor install from source:\n```\npip install git+https://github.com/onnx/onnxmltools\n```\nNote:If you choose to install `onnxmltools` from its source code, you must set an environment variable `ONNX_ML=1` before installing `onnx` package.\n\n## Dependencies\nThis package uses ONNX, NumPy, and ProtoBuf. If you are converting a model from scikit-learn or Apple Core ML you need the following packages installed respectively:\n1. scikit-learn\n2. CoreMLTools\n\n## Example\nHere is a simple example to convert a CoreML model:\n```\nimport onnxmltools\nimport coremltools\n\nmodel_coreml = coremltools.utils.load_spec('image_recognition.mlmodel')\nmodel_onnx = onnxmltools.convert_coreml(model_coreml, 'Image_Reco')\n\n# Save as text\nonnxmltools.utils.save_text(model_onnx, 'image_recognition.json')\n\n# Save as protobuf\nonnxmltools.utils.save_model(model_onnx, 'image_recognition.onnx')\n```\n\n\n# License\n[MIT License](LICENSE)\n\n## Acknowledgments\nThe initial version of this package was developed by the following engineers and data scientists at Microsoft during winter 2017: Zeeshan Ahmed, Wei-Sheng Chin, Aidan Crook, Xavier Dupre, Costin Eseanu, Tom Finley, Lixin Gong, Scott Inglis, Pei Jiang, Ivan Matantsev, Prabhat Roy, M. Zeeshan Siddiqui, Shouheng Yi, Shauheen Zahirazami, Yiwen Zhu.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2A72:149227:18197C:5E6F39:6AB92BC4"},"text_sha256":"8630804d94058c500ed85348c863bb0b14344181d8fd3c034796b445a50344ec"},{"path":"README.rst","size":2013,"blob_sha":"8ff7d5817608ddaa17d83479cc5715e41c3362fc","priority":0,"status":200,"text":"\n.. image:: https://github.com/onnx/onnxmltools/raw/master/docs/ONNXMLTools_logo_main.png\n\n.. list-table::\n   :widths: 4 4\n   :header-rows: 0\n   \n   * - .. image:: https://travis-ci.org/onnx/onnxmltools.svg?branch=master\n            :target: https://travis-ci.org/onnx/onnxmltools\n            :alt: Build Status Linux\n     - .. image:: https://ci.appveyor.com/api/projects/status/d1xav3amubypje4n?svg=true\n            :target: https://ci.appveyor.com/project/xadupre/onnxmltools\n            :alt: Build Status Windows\n\nIntroduction \n============\n\nONNXMLTools enables you to convert models from different machine \nlearning toolkits into `ONNX <https://onnx.ai>`_. \nCurrently the following toolkits are supported:\n\n* Apple CoreML\n* scikit-learn\n  (subset of models convertible to ONNX)\n\nInstall\n=======\n\n::\n\n    pip install onnxmltools\n\nDependencies\n============\n\nThis package uses ONNX, NumPy, and ProtoBuf. If you are converting a model from scikit-learn or Apple Core ML you need the following packages installed respectively:\n1. `scikit-learn <http://scikit-learn.org/stable/>`_\n2. `coremltools <https://pypi.python.org/pypi/coremltools>`_\n\nExample\n=======\n\nHere is a simple example to convert a CoreML model:\n\n::\n\n    import onnxmltools\n    import coremltools\n\n    model_coreml = coremltools.utils.load_spec('image_recognition.mlmodel')\n    model_onnx = onnxmltools.convert_coreml(model_coreml, 'Image_Reco')\n\n    # Save as text\n    onnxmltools.utils.save_text(model_onnx, 'image_recognition.json')\n\n    # Save as protobuf\n    onnxmltools.utils.save_model(model_onnx, 'image_recognition.onnx')\n\nLicense\n=======\n\nMIT License\n\nAcknowledgments\n===============\n\nThe initial version of this package was developed by the following \ndevelopers and data scientists at Microsoft during winter 2017: \nZeeshan Ahmed, Wei-Sheng Chin, Aidan Crook, Xavier Dupre, Costin Eseanu, \nTom Finley, Lixin Gong, Scott Inglis, Pei Jiang, Ivan Matantsev, \nPrabhat Roy, M. Zeeshan Siddiqui, Shouheng Yi, Shauheen Zahirazami, Yiwen Zhu.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6A0E:241B62:17A2D6:5DF852:6AB92BC7"},"text_sha256":"114c05ccb50c2ad236cc25d354129827a30d7abce3381c0a4a32ed6a96b32df2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2140","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:17FBAEA:1C21203:6AB92BC8"},"commit":{"sha":"cf608be48fe11cbcc7c2efd350ceb497867029f3","url":"https://github.com/onnx/onnxmltools/commit/cf608be48fe11cbcc7c2efd350ceb497867029f3","date":"2026-06-23T07:23:33Z","author_date":"2026-06-23T07:23:33Z","committer_date":"2026-06-23T07:23:33Z","tree_sha":"0f231cfe420e5d80954bb4f43d57df88ba00e64b","message_first_line":"Fix XGBRegressor binary:logistic ONNX conversion producing wrong predictions (#771)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2139","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:1817B6E:1C3CC5A:6AB92BC8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7092,"blob_sha":"b85e2c8e30615799ead2de1e878fca023b9308b2","priority":0}],"documents":[{"path":"README.md","size":7092,"blob_sha":"b85e2c8e30615799ead2de1e878fca023b9308b2","priority":0,"status":200,"text":"<!--- SPDX-License-Identifier: Apache-2.0 -->\n#\n\n![ONNXMLTools_logo_main](https://raw.githubusercontent.com/onnx/onnxmltools/main/docs/ONNXMLTools_logo_main.png)\n\n[![CI](https://github.com/onnx/onnxmltools/actions/workflows/ci.yml/badge.svg)](https://github.com/onnx/onnxmltools/actions/workflows/ci.yml)\n\n## Introduction\n\nONNXMLTools enables you to convert models from different machine learning toolkits into [ONNX](https://onnx.ai). Currently the following toolkits are supported:\n\n* Tensorflow (a wrapper of [tf2onnx converter](https://github.com/onnx/tensorflow-onnx/))\n* scikit-learn (a wrapper of [skl2onnx converter](https://github.com/onnx/sklearn-onnx/))\n* Apple Core ML\n* Spark ML (experimental)\n* LightGBM\n* libsvm\n* XGBoost\n* H2O\n* CatBoost\n\nPytorch has its builtin ONNX exporter check [here](https://pytorch.org/docs/stable/onnx.html) for details.\n\n## Install\n\nYou can install latest release of ONNXMLTools from [PyPi](https://pypi.org/project/onnxmltools/):\n\n```bash\npip install onnxmltools\n```\n\nor install from source:\n\n```bash\npip install git+https://github.com/onnx/onnxmltools\n```\n\nIf you choose to install `onnxmltools` from its source code, you must set the environment variable `ONNX_ML=1` before installing the `onnx` package.\n\n## Dependencies\n\nThis package relies on ONNX, NumPy, and ProtoBuf. If you are converting a model from scikit-learn, Core ML, Keras, LightGBM, SparkML, XGBoost, H2O, CatBoost or LibSVM, you will need an environment with the respective package installed from the list below:\n\n1. scikit-learn\n2. CoreMLTools (version 3.1 or lower)\n3. Keras (version 2.0.8 or higher) with the corresponding Tensorflow version\n4. LightGBM\n5. SparkML\n6. XGBoost\n7. libsvm\n8. H2O\n9. CatBoost\n\nONNXMLTools is tested with Python **3.7+**.\n\n# Examples\n\nIf you want the converted ONNX model to be compatible with a certain ONNX version, please specify the target_opset parameter upon invoking the convert function. The following Keras model conversion example demonstrates this below. You can identify the mapping from ONNX Operator Sets (referred to as opsets) to ONNX releases in the [versioning documentation](https://github.com/onnx/onnx/blob/main/docs/Versioning.md#released-versions).\n\n## Keras to ONNX Conversion\n\nNext, we show an example of converting a Keras model into an ONNX model with `target_opset=7`, which corresponds to ONNX release version 1.2.\n\n```python\nimport onnxmltools\nfrom keras.layers import Input, Dense, Add\nfrom keras.models import Model\n\n# N: batch size, C: sub-model input dimension, D: final model's input dimension\nN, C, D = 2, 3, 3\n\n# Define a sub-model, it will become a part of our final model\nsub_input1 = Input(shape=(C,))\nsub_mapped1 = Dense(D)(sub_input1)\nsub_model1 = Model(inputs=sub_input1, outputs=sub_mapped1)\n\n# Define another sub-model, it will become a part of our final model\nsub_input2 = Input(shape=(C,))\nsub_mapped2 = Dense(D)(sub_input2)\nsub_model2 = Model(inputs=sub_input2, outputs=sub_mapped2)\n\n# Define a model built upon the previous two sub-models\ninput1 = Input(shape=(D,))\ninput2 = Input(shape=(D,))\nmapped1_2 = sub_model1(input1)\nmapped2_2 = sub_model2(input2)\nsub_sum = Add()([mapped1_2, mapped2_2])\nkeras_model = Model(inputs=[input1, input2], outputs=sub_sum)\n\n# Convert it! The target_opset parameter is optional.\nonnx_model = onnxmltools.convert_keras(keras_model, target_opset=7)\n```\n\n## CoreML to ONNX Conversion\n\nHere is a simple code snippet to convert a Core ML model into an ONNX model.\n\n```python\nimport onnxmltools\nimport coremltools\n\n# Load a Core ML model\ncoreml_model = coremltools.utils.load_spec('example.mlmodel')\n\n# Convert the Core ML model into ONNX\nonnx_model = onnxmltools.convert_coreml(coreml_model, 'Example Model')\n\n# Save as protobuf\nonnxmltools.utils.save_model(onnx_model, 'example.onnx')\n```\n\n## H2O to ONNX Conversion\n\nBelow is a code snippet to convert a H2O MOJO model into an ONNX model. The only prerequisite is to have a MOJO model saved on the local file-system.\n\n```python\nimport onnxmltools\n\n# Convert the Core ML model into ONNX\nonnx_model = onnxmltools.convert_h2o('/path/to/h2o/gbm_mojo.zip')\n\n# Save as protobuf\nonnxmltools.utils.save_model(onnx_model, 'h2o_gbm.onnx')\n```\n\n# Testing model converters\n\n*onnxmltools* converts models into the ONNX format which\ncan be then used to compute predictions with the\nbackend of your choice.\n\n## Checking the operator set version of your converted ONNX model\n\nYou can check the operator set of your converted ONNX model using [Netron](https://github.com/lutzroeder/Netron), a viewer for Neural Network models. Alternatively, you could identify your converted model's opset version through the following line of code.\n\n```python\nopset_version = onnx_model.opset_import[0].version\n```\n\nIf the result from checking your ONNX model's opset is smaller than the `target_opset` number you specified in the onnxmltools.convert function, be assured that this is likely intended behavior. The ONNXMLTools converter works by converting each operator to the ONNX format individually and finding the corresponding opset version that it was most recently updated in. Once all of the operators are converted, the resultant ONNX model has the maximal opset version of all of its operators.\n\nTo illustrate this concretely, let's consider a model with two operators, Abs and Add. As of December 2018, [Abs](https://github.com/onnx/onnx/blob/main/docs/Operators.md#abs) was most recently updated in opset 6, and [Add](https://github.com/onnx/onnx/blob/main/docs/Operators.md#add) was most recently updated in opset 7. Therefore, the converted ONNX model's opset will always be 7, even if you request `target_opset=8`. The converter behavior was defined this way to ensure backwards compatibility.\n\nDocumentation for the [ONNX Model format](https://github.com/onnx/onnx) and more examples for converting models from different frameworks can be found in the [ONNX tutorials](https://github.com/onnx/tutorials) repository.\n\n## Test all existing converters\n\nAll converter unit test can generate the original model and converted model to automatically be checked with\n[onnxruntime](https://pypi.org/project/onnxruntime/) or\n[onnxruntime-gpu](https://pypi.org/project/onnxruntime-gpu/).\nThe unit test cases are all the normal python unit test cases, you can run it with pytest command line, for example:\n\n```bash\npython -m pytest --ignore .\\tests\\\n```\n\nIt requires *onnxruntime*, *numpy* for most models,\n*pandas* for transforms related to text features, and\n*scipy* for sparse features. One test also requires\n*keras* to test a custom operator. That means\n*sklearn* or any machine learning library is requested.\n\n## Add a new converter\n\nOnce the converter is implemented, a unit test is added\nto confirm that it works. At the end of the unit test, function\n*dump_data_and_model* or any equivalent function must be called\nto dump the expected output and the converted model.\nOnce these file are generated, a corresponding test must\nbe added in *tests_backend* to compute the prediction\nwith the runtime.\n\n# License\n\n[Apache License v2.0](LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22A:7A4F8:183201:5E87A4:6AB92BC9"},"text_sha256":"c288b9e7aa88d30de872381609435b14cf9cab9c18910c5956cdacd6322eb6d5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"grf-labs/grf","input_row":{"repository":"grf-labs/grf","url":"https://github.com/grf-labs/grf","name":"grf","owner":"grf-labs","description":"Generalized Random Forests ","language":"C++","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1113,"issues":552,"created_at":"2016-08-12T13:17:37Z","updated_at":"2026-09-26T20:19:47Z","first_commit_at":"2014-07-28T09:48:17Z","last_commit_at":"2026-04-30T18:40:08Z","activity_months":141.08000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:25.657Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"grf-labs/grf","visibility":"public","created_at":"2016-08-12T13:17:37Z","updated_at":"2026-09-26T20:19:47Z","private":false,"fork":false,"archived":false,"stargazers_count":1113,"open_issues_count":69,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2138","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:D8E87A:FEE924:6AB92BC9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2137","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:17FA90E:1C1FBC7:6AB92BCA"},"commit":{"sha":"a33eb410bb850951ae757bd7e924aa7049a1371c","url":"https://github.com/grf-labs/grf/commit/a33eb410bb850951ae757bd7e924aa7049a1371c","date":"2018-05-09T07:36:15Z","author_date":"2018-05-09T07:36:15Z","committer_date":"2018-05-09T07:36:15Z","tree_sha":"c4aeec4b5540cefda1a68b0504f937f0ffcfbfdc","message_first_line":"Merge pull request #245 from swager/release/0.10.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"2136","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17D582B:1BFACEA:6AB92BCA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5223,"blob_sha":"c3768b5baf5492712e03697dfbb815df9ceae349","priority":0}],"documents":[{"path":"README.md","size":5223,"blob_sha":"c3768b5baf5492712e03697dfbb815df9ceae349","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/swager/grf.svg?branch=master)](https://travis-ci.org/swager/grf)\n![CRAN Downloads overall](http://cranlogs.r-pkg.org/badges/grand-total/grf)\n\n# grf: generalized random forests\n\nA pluggable package for forest-based statistical estimation and inference. GRF currently provides non-parametric methods for least-squares regression, quantile regression, and treatment effect estimation (optionally using instrumental variables).\n\nIn addition, GRF supports 'honest' estimation (where one subset of the data is used for choosing splits, and another for populating the leaves of the tree), and confidence intervals for least-squares regression and treatment effect estimation.\n\nThis package is currently in beta, and we expect to make continual improvements to its performance and usability.\n\n### Authors\n\nThis package is written and maintained by Julie Tibshirani (jtibs@cs.stanford.edu), Susan Athey, and Stefan Wager.\n\nThe repository first started as a fork of the [ranger](https://github.com/imbs-hl/ranger) repository -- we owe a great deal of thanks to the ranger authors for their useful and free package.\n\n### Installation\n\nThe latest release of the package can be installed through CRAN:\n\n```R\ninstall.packages(\"grf\")\n```\n\nAny published release can also be installed from source:\n\n```R\ninstall.packages(\"https://raw.github.com/swager/grf/master/releases/grf_0.10.0.tar.gz\", repos = NULL, type = \"source\")\n```\n\nNote that to install from source, a compiler that implements C++11 is required (clang 3.3 or higher, or g++ 4.8 or higher). If installing on Windows, the RTools toolchain is also required.\n\n\n### Usage Examples\n\nThe following script demonstrates how to use GRF for heterogeneous treatment effect estimation. For examples\nof how to use types of forest, as for quantile regression and causal effect estimation using instrumental\nvariables, please consult the R documentation on the relevant forest methods (quantile_forest, instrumental_forest, etc.).\n\n```R\nlibrary(grf)\n\n# Generate data.\nn = 2000; p = 10\nX = matrix(rnorm(n*p), n, p)\nX.test = matrix(0, 101, p)\nX.test[,1] = seq(-2, 2, length.out = 101)\n\n# Perform treatment effect estimation.\nW = rbinom(n, 1, 0.5)\nY = pmax(X[,1], 0) * W + X[,2] + pmin(X[,3], 0) + rnorm(n)\ntau.forest = causal_forest(X, Y, W)\ntau.hat = predict(tau.forest, X.test)\nplot(X.test[,1], tau.hat$predictions, ylim = range(tau.hat$predictions, 0, 2), xlab = \"x\", ylab = \"tau\", type = \"l\")\nlines(X.test[,1], pmax(0, X.test[,1]), col = 2, lty = 2)\n\n# Estimate the conditional average treatment effect on the full sample (CATE).\naverage_treatment_effect(tau.forest, target.sample = \"all\")\n\n# Estimate the conditional average treatment effect on the treated sample (CATT).\n# Here, we don't expect much difference between the CATE and the CATT, since\n# treatment assignment was randomized.\naverage_treatment_effect(tau.forest, target.sample = \"treated\")\n\n# Add confidence intervals for heterogeneous treatment effects; growing more trees is now recommended.\ntau.forest = causal_forest(X, Y, W, num.trees = 4000)\ntau.hat = predict(tau.forest, X.test, estimate.variance = TRUE)\nsigma.hat = sqrt(tau.hat$variance.estimates)\nplot(X.test[,1], tau.hat$predictions, ylim = range(tau.hat$predictions + 1.96 * sigma.hat, tau.hat$predictions - 1.96 * sigma.hat, 0, 2), xlab = \"x\", ylab = \"tau\", type = \"l\")\nlines(X.test[,1], tau.hat$predictions + 1.96 * sigma.hat, col = 1, lty = 2)\nlines(X.test[,1], tau.hat$predictions - 1.96 * sigma.hat, col = 1, lty = 2)\nlines(X.test[,1], pmax(0, X.test[,1]), col = 2, lty = 1)\n\n# In some examples, pre-fitting models for Y and W separately may\n# be helpful (e.g., if different models use different covariates).\n# In some applications, one may even want to get Y.hat and W.hat\n# using a completely different method (e.g., boosting).\n\n# Generate new data.\nn = 2000; p = 20\nX = matrix(rnorm(n * p), n, p)\nTAU = 1 / (1 + exp(-X[, 3]))\nW = rbinom(n ,1, 1 / (1 + exp(-X[, 1] - X[, 2])))\nY = pmax(X[, 2] + X[, 3], 0) + rowMeans(X[, 4:6]) / 2 + W * TAU + rnorm(n)\n\nforest.W = regression_forest(X, W, tune.parameters = TRUE)\nW.hat = predict(forest.W)$predictions\n\nforest.Y = regression_forest(X, Y, tune.parameters = TRUE)\nY.hat = predict(forest.Y)$predictions\n\nforest.Y.varimp = variable_importance(forest.Y)\n\n# Note: Forests may have a hard time when trained on very few variables\n# (e.g., ncol(X) = 1, 2, or 3). We recommend not being too aggressive\n# in selection.\nselected.vars = which(forest.Y.varimp / mean(forest.Y.varimp) > 0.2)\n\ntau.forest = causal_forest(X[, selected.vars], Y, W,\n                           W.hat = W.hat, Y.hat = Y.hat,\n                           tune.parameters = TRUE)\ntau.hat = predict(tau.forest)$predictions\n```\n\n### Developing\n\nIn addition to providing out-of-the-box forests for quantile regression and causal effect estimation, GRF provides a framework for creating forests tailored to new statistical tasks. If you'd like to develop using GRF, please consult the [development guide](DEVELOPING.md).\n\n### References\n\nSusan Athey, Julie Tibshirani and Stefan Wager.\n<b>Generalized Random Forests<\/b>, <i>Annals of Statistics<\/i>, forthcoming.\n[<a href=\"https://arxiv.org/abs/1610.01271\">arxiv<\/a>]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CC8:3E1C8:17F000:5E448D:6AB92BCA"},"text_sha256":"41d9c8875fe91e92b2cf2c82c2ecfe8a2bec7e907205688fd9d8d04a9110b287"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2135","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:17B2C34:1BD7FB9:6AB92BCB"},"commit":{"sha":"5bee99b51471f76cb2d63acbc8a9b0ffec408ba0","url":"https://github.com/grf-labs/grf/commit/5bee99b51471f76cb2d63acbc8a9b0ffec408ba0","date":"2026-04-30T18:40:08Z","author_date":"2026-04-30T18:40:08Z","committer_date":"2026-04-30T18:40:08Z","tree_sha":"237ca65b6dbdb53180c0dbc9f1f68ddef28c0689","message_first_line":"Add minor polish to intro vignette (#1555)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2134","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0924:6C6ED:17F7723:1C1C638:6AB92BCC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9578,"blob_sha":"514d113fd74aa24fe089858383b29fa3dafec142","priority":0}],"documents":[{"path":"README.md","size":9578,"blob_sha":"514d113fd74aa24fe089858383b29fa3dafec142","priority":0,"status":200,"text":"# generalized random forests <a href='https://grf-labs.github.io/grf/'><img src='https://raw.githubusercontent.com/grf-labs/grf/master/images/logo/grf_logo_wbg_cropped.png' align=\"right\" height=\"120\" /><\/a>\n\n[![CRANstatus](https://www.r-pkg.org/badges/version/grf)](https://cran.r-project.org/package=grf)\n[![](https://cranlogs.r-pkg.org/badges/grand-total/grf)](https://cran.r-project.org/package=grf)\n[![Build Status](https://dev.azure.com/grf-labs/grf/_apis/build/status/grf-labs.grf?branchName=master)](https://dev.azure.com/grf-labs/grf/_build/latest?definitionId=2&branchName=master)\n\nA package for forest-based statistical estimation and inference. GRF provides non-parametric methods for heterogeneous treatment effects estimation (optionally using right-censored outcomes, multiple treatment arms or outcomes, or instrumental variables), as well as least-squares regression, quantile regression, and survival regression, all with support for missing covariates.\n\nIn addition, GRF supports 'honest' estimation (where one subset of the data is used for choosing splits, and another for populating the leaves of the tree), and confidence intervals for least-squares regression and treatment effect estimation.\n\nSome helpful links for getting started:\n\n- The [R package documentation](https://grf-labs.github.io/grf/) contains usage examples and method reference.\n- The [GRF reference](https://grf-labs.github.io/grf/REFERENCE.html) gives a detailed description of the GRF algorithm and includes troubleshooting suggestions.\n- For community questions and answers around usage, see [Github issues labelled 'question'](https://github.com/grf-labs/grf/issues?q=label%3Aquestion).\n\nThe repository first started as a fork of the [ranger](https://github.com/imbs-hl/ranger) repository -- we owe a great deal of thanks to the ranger authors for their useful and free package.\n\n### Installation\n\nThe latest release of the package can be installed through CRAN:\n\n```R\ninstall.packages(\"grf\")\n```\n\n`conda` users can install from the [conda-forge](https://anaconda.org/conda-forge/r-grf) channel:\n\n```\nconda install -c conda-forge r-grf\n```\n\nThe current development version can be installed from source using devtools.\n\n```R\ndevtools::install_github(\"grf-labs/grf\", subdir = \"r-package/grf\")\n```\n\nNote that to install from source, a compiler that implements C++17 or later is required. If installing on Windows, the RTools toolchain is also required.\n\n### Usage Examples\n\nThe following script demonstrates how to use GRF for heterogeneous treatment effect estimation. For examples\nof how to use other types of forests, please consult the R [documentation](https://grf-labs.github.io/grf/reference/index.html) on the relevant methods.\n\n```R\nlibrary(grf)\n\n# Generate data.\nn <- 2000\np <- 10\nX <- matrix(rnorm(n * p), n, p)\nX.test <- matrix(0, 101, p)\nX.test[, 1] <- seq(-2, 2, length.out = 101)\n\n# Train a causal forest.\nW <- rbinom(n, 1, 0.4 + 0.2 * (X[, 1] > 0))\nY <- pmax(X[, 1], 0) * W + X[, 2] + pmin(X[, 3], 0) + rnorm(n)\ntau.forest <- causal_forest(X, Y, W)\n\n# Estimate treatment effects for the training data using out-of-bag prediction.\ntau.hat.oob <- predict(tau.forest)\nhist(tau.hat.oob$predictions)\n\n# Estimate treatment effects for the test sample.\ntau.hat <- predict(tau.forest, X.test)\nplot(X.test[, 1], tau.hat$predictions, ylim = range(tau.hat$predictions, 0, 2), xlab = \"x\", ylab = \"tau\", type = \"l\")\nlines(X.test[, 1], pmax(0, X.test[, 1]), col = 2, lty = 2)\n\n# Estimate the conditional average treatment effect on the full sample (CATE).\naverage_treatment_effect(tau.forest, target.sample = \"all\")\n\n# Estimate the conditional average treatment effect on the treated sample (CATT).\naverage_treatment_effect(tau.forest, target.sample = \"treated\")\n\n# Add confidence intervals for heterogeneous treatment effects; growing more trees is now recommended.\ntau.forest <- causal_forest(X, Y, W, num.trees = 4000)\ntau.hat <- predict(tau.forest, X.test, estimate.variance = TRUE)\nsigma.hat <- sqrt(tau.hat$variance.estimates)\nplot(X.test[, 1], tau.hat$predictions, ylim = range(tau.hat$predictions + 1.96 * sigma.hat, tau.hat$predictions - 1.96 * sigma.hat, 0, 2), xlab = \"x\", ylab = \"tau\", type = \"l\")\nlines(X.test[, 1], tau.hat$predictions + 1.96 * sigma.hat, col = 1, lty = 2)\nlines(X.test[, 1], tau.hat$predictions - 1.96 * sigma.hat, col = 1, lty = 2)\nlines(X.test[, 1], pmax(0, X.test[, 1]), col = 2, lty = 1)\n\n# In some examples, pre-fitting models for Y and W separately may\n# be helpful (e.g., if different models use different covariates).\n# In some applications, one may even want to get Y.hat and W.hat\n# using a completely different method (e.g., boosting).\n\n# Generate new data.\nn <- 4000\np <- 20\nX <- matrix(rnorm(n * p), n, p)\nTAU <- 1 / (1 + exp(-X[, 3]))\nW <- rbinom(n, 1, 1 / (1 + exp(-X[, 1] - X[, 2])))\nY <- pmax(X[, 2] + X[, 3], 0) + rowMeans(X[, 4:6]) / 2 + W * TAU + rnorm(n)\n\nforest.W <- regression_forest(X, W, tune.parameters = \"all\")\nW.hat <- predict(forest.W)$predictions\n\nforest.Y <- regression_forest(X, Y, tune.parameters = \"all\")\nY.hat <- predict(forest.Y)$predictions\n\nforest.Y.varimp <- variable_importance(forest.Y)\n\n# Note: Forests may have a hard time when trained on very few variables\n# (e.g., ncol(X) = 1, 2, or 3). We recommend not being too aggressive\n# in selection.\nselected.vars <- which(forest.Y.varimp / mean(forest.Y.varimp) > 0.2)\n\ntau.forest <- causal_forest(X[, selected.vars], Y, W,\n                            W.hat = W.hat, Y.hat = Y.hat,\n                            tune.parameters = \"all\")\n\n# See if a causal forest succeeded in capturing heterogeneity by plotting\n# the TOC and calculating a 95% CI for the AUTOC.\ntrain <- sample(1:n, n / 2)\ntrain.forest <- causal_forest(X[train, ], Y[train], W[train])\neval.forest <- causal_forest(X[-train, ], Y[-train], W[-train])\nrate <- rank_average_treatment_effect(eval.forest,\n                                      predict(train.forest, X[-train, ])$predictions)\nplot(rate)\npaste(\"AUTOC:\", round(rate$estimate, 2), \"+/\", round(1.96 * rate$std.err, 2))\n```\n\n### Developing\n\nIn addition to providing out-of-the-box forests for quantile regression and causal effect estimation, GRF provides a framework for creating forests tailored to new statistical tasks. If you'd like to develop using GRF, please consult the [algorithm reference](https://grf-labs.github.io/grf/REFERENCE.html) and [development guide](https://grf-labs.github.io/grf/DEVELOPING.html).\n\n### Funding\n\nDevelopment of GRF is supported by the National Institutes of Health, the National Science Foundation, the Sloan Foundation, the Office of Naval Research (Grant N00014-17-1-2131) and Schmidt Futures.\n\n### References\n\nSusan Athey and Stefan Wager.\n<b>Estimating Treatment Effects with Causal Forests: An Application.<\/b>\n<i>Observational Studies<\/i>, 5, 2019.\n[<a href=\"https://doi.org/10.1353/obs.2019.0001\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/1902.07409\">arxiv<\/a>]\n\nSusan Athey, Julie Tibshirani and Stefan Wager.\n<b>Generalized Random Forests.<\/b> <i>Annals of Statistics<\/i>, 47(2), 2019.\n[<a href=\"https://projecteuclid.org/euclid.aos/1547197251\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/1610.01271\">arxiv<\/a>]\n\nYifan Cui, Michael R. Kosorok, Erik Sverdrup, Stefan Wager, and Ruoqing Zhu.\n<b>Estimating Heterogeneous Treatment Effects with Right-Censored Data via Causal Survival Forests.<\/b>\n<i>Journal of the Royal Statistical Society: Series B<\/i>, 85(2), 2023.\n[<a href=\"https://doi.org/10.1093/jrsssb/qkac001\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/2001.09887\">arxiv<\/a>]\n\nRina Friedberg, Julie Tibshirani, Susan Athey, and Stefan Wager.\n<b>Local Linear Forests.<\/b> <i>Journal of Computational and Graphical Statistics<\/i>, 30(2), 2020.\n[<a href=\"https://www.tandfonline.com/doi/abs/10.1080/10618600.2020.1831930\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/1807.11408\">arxiv<\/a>]\n\nImke Mayer, Erik Sverdrup, Tobias Gauss, Jean-Denis Moyer, Stefan Wager and Julie Josse.\n<b>Doubly Robust Treatment Effect Estimation with Missing Attributes.<\/b>\n<i>Annals of Applied Statistics<\/i>, 14(3), 2020.\n[<a href=\"https://projecteuclid.org/euclid.aoas/1600454872\">paper<\/a>,\n<a href=\"https://arxiv.org/pdf/1910.10624.pdf\">arxiv<\/a>]\n\nErik Sverdrup, Maria Petukhova, and Stefan Wager.\n<b>Estimating Treatment Effect Heterogeneity in Psychiatry: A Review and Tutorial with Causal Forests.<\/b>\n<i>International Journal of Methods in Psychiatric Research<\/i>, 34(2), 2025.\n[<a href=\"https://doi.org/10.1002/mpr.70015\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/2409.01578\">arxiv<\/a>]\n\nErik Sverdrup, James Yang, and Michael LeBlanc.\n<b>Efficient Log-Rank Updates for Random Survival Forests.<\/b> 2025.\n[<a href=\"https://arxiv.org/abs/2510.03665\">arxiv<\/a>]\n\nStefan Wager.\n<b>Causal Inference: A Statistical Learning Approach.<\/b> 2024.\n[<a href=\"https://web.stanford.edu/~swager/causal_inf_book.pdf\">pdf<\/a>]\n\nStefan Wager and Susan Athey.\n<b>Estimation and Inference of Heterogeneous Treatment Effects using Random Forests.<\/b>\n<i>Journal of the American Statistical Association<\/i>, 113(523), 2018.\n[<a href=\"https://www.tandfonline.com/eprint/v7p66PsDhHCYiPafTJwC/full\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/1510.04342\">arxiv<\/a>]\n\nSteve Yadlowsky, Scott Fleming, Nigam Shah, Emma Brunskill, and Stefan Wager.\n<b>Evaluating Treatment Prioritization Rules via Rank-Weighted Average Treatment Effects.<\/b>\n<i>Journal of the American Statistical Association<\/i>, 120(549), 2025.\n[<a href=\"https://doi.org/10.1080/01621459.2024.2393466\">paper<\/a>,\n<a href=\"https://arxiv.org/abs/2111.07966\">arxiv<\/a>]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:18000D:5E5490:6AB92BCC"},"text_sha256":"ccfb30608dadf70bb5b9c02d1846532e7d0111ec47c300e3fc97fa00adb2e88a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"emedvedev/attention-ocr","input_row":{"repository":"emedvedev/attention-ocr","url":"https://github.com/emedvedev/attention-ocr","name":"attention-ocr","owner":"emedvedev","description":"A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1086,"issues":153,"created_at":"2017-07-21T18:35:19Z","updated_at":"2026-09-17T18:33:03Z","first_commit_at":"2016-06-09T00:16:29Z","last_commit_at":"2023-10-20T17:48:54Z","activity_months":88.359999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:29.376Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"emedvedev/attention-ocr","visibility":"public","created_at":"2017-07-21T18:35:19Z","updated_at":"2026-09-17T18:33:03Z","private":false,"fork":false,"archived":false,"stargazers_count":1086,"open_issues_count":27,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2133","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:17EFF80:1C15554:6AB92BCD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2132","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0817:754BF:17D514F:1BFA707:6AB92BCD"},"commit":{"sha":"b2c8f65af72a1d33d39c066eb90ab882b18fbffd","url":"https://github.com/emedvedev/attention-ocr/commit/b2c8f65af72a1d33d39c066eb90ab882b18fbffd","date":"2018-05-24T16:22:13Z","author_date":"2018-05-24T16:22:13Z","committer_date":"2018-05-24T16:22:13Z","tree_sha":"6d3be09770cac1afde007642b14b9388b176ad3d","message_first_line":"Skip affected batches with unreadable / corrupted image data (#92)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2131","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:180BF01:1C31838:6AB92BCE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6279,"blob_sha":"2adc5b672b5b341abe58cae55d01985ce9fb02f4","priority":0}],"documents":[{"path":"README.md","size":6279,"blob_sha":"2adc5b672b5b341abe58cae55d01985ce9fb02f4","priority":0,"status":200,"text":"# Attention-based OCR\n\nVisual attention-based OCR model for image recognition with additional tools for creating TFRecords datasets and exporting the trained model with weights as a [SavedModel](https://www.tensorflow.org/api_docs/python/tf/saved_model) or a frozen graph.\n\n## Acknowledgements\n\nThis project is based on a model by [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03). You can find the original model in the [da03/Attention-OCR](https://github.com/da03/Attention-OCR) repository.\n\n## The model\n\nAuthors: [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03).\n\nThe model first runs a sliding CNN on the image (images are resized to height 32 while preserving aspect ratio). Then an LSTM is stacked on top of the CNN. Finally, an attention model is used as a decoder for producing the final outputs.\n\n![OCR example](http://cs.cmu.edu/~yuntiand/OCR-2.jpg)\n\n## Installation\n\n```\npip install aocr\n```\n\nNote: Tensorflow and Numpy will be installed as dependencies. Additional dependencies are `PIL`/`Pillow`, `distance`, and `six`.\n\n## Usage\n\n### Create a dataset\n\nTo build a TFRecords dataset, you need a collection of images and an annotation file with their respective labels.\n\n```\naocr dataset ./datasets/annotations-training.txt ./datasets/training.tfrecords\naocr dataset ./datasets/annotations-testing.txt ./datasets/testing.tfrecords\n```\n\nAnnotations are simple text files containing the image paths (either absolute or relative to your working dir) and their corresponding labels:\n\n```\ndatasets/images/hello.jpg hello\ndatasets/images/world.jpg world\n```\n\n### Train\n\n```\naocr train ./datasets/training.tfrecords\n```\n\nA new model will be created, and the training will start. Note that it takes quite a long time to reach convergence, since we are training the CNN and attention model simultaneously.\n\nThe `--steps-per-checkpoint` parameter determines how often the model checkpoints will be saved (the default output dir is `checkpoints/`).\n\n**Important:** there is a lot of available training options. See the CLI help or the `parameters` section of this README.\n\n### Test and visualize\n\n```\naocr test ./datasets/testing.tfrecords\n```\n\nAdditionally, you can visualize the attention results during testing (saved to `results/` by default):\n\n```\naocr test --visualize ./datasets/testing.tfrecords\n```\n\nExample output images in `results/correct`:\n\nImage 0 (j/j):\n\n![example image 0](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_0.jpg)\n\nImage 1 (u/u):\n\n![example image 1](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_1.jpg)\n\nImage 2 (n/n):\n\n![example image 2](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_2.jpg)\n\nImage 3 (g/g):\n\n![example image 3](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_3.jpg)\n\nImage 4 (l/l):\n\n![example image 4](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_4.jpg)\n\nImage 5 (e/e):\n\n![example image 5](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_5.jpg)\n\n### Export\n\nAfter the model is trained and a checkpoint is available, it can be exported as either a frozen graph or a SavedModel.\n\n```bash\n\n# SavedModel (default):\naocr export ./exported-model\n\n# Frozen graph:\naocr export --format=frozengraph ./exported-model\n\n```\n\nLoad weights from the latest checkpoints and export the model into the `./exported-model` directory.\n\n## Google Cloud ML Engine\n\nTo train the model in the [Google Cloud Machine Learning Engine](https://cloud.google.com/ml-engine/), upload the training dataset into a Google Cloud Storage bucket and start a training job with the `gcloud` tool.\n\n1. Set the environment variables:\n\n```\n# Prefix for the job name.\nexport JOB_PREFIX=\"aocr\"\n\n# Region to launch the training job in.\n# Should be the same as the storage bucket region.\nexport REGION=\"us-central1\"\n\n# Your storage bucket.\nexport GS_BUCKET=\"gs://aocr-bucket\"\n\n# Path to store your training dataset in the bucket.\nexport DATASET_UPLOAD_PATH=\"training.tfrecords\"\n```\n\n2. Upload the training dataset:\n\n```\ngsutil cp ./datasets/training.tfrecords $GS_BUCKET/$DATASET_UPLOAD_PATH\n```\n\n3. Launch the ML Engine job:\n\n```\nexport NOW=$(date +\"%Y%m%d_%H%M%S\")\nexport JOB_NAME=\"$JOB_PREFIX$NOW\"\nexport JOB_DIR=\"$GS_BUCKET/$JOB_NAME\"\n\ngcloud ml-engine jobs submit training $JOB_NAME \\\n    --job-dir=$JOB_DIR \\\n    --module-name=aocr \\\n    --package-path=aocr \\\n    --region=$REGION \\\n    --scale-tier=BASIC_GPU \\\n    --runtime-version=1.2 \\\n    -- \\\n    train $GS_BUCKET/$DATASET_UPLOAD_PATH \\\n    --steps-per-checkpoint=500 \\\n    --batch-size=512 \\\n    --num-epoch=20\n```\n\n## Parameters\n\n### Global\n\n* `log-path`: Path for the log file.\n\n### Testing\n\n* `visualize`: Output the attention maps on the original image.\n\n### Exporting\n\n* `format`: Format for the export (either `savedmodel` or `frozengraph`).\n\n### Training\n\n* `steps-per-checkpoint`: Checkpointing (print perplexity, save model) per how many steps\n* `num-epoch`: The number of whole data passes.\n* `batch-size`: Batch size.\n* `initial-learning-rate`: Initial learning rate, note the we use AdaDelta, so the initial value does not matter much.\n* `target-embedding-size`: Embedding dimension for each target.\n* `attn-num-hidden`: Number of hidden units in attention decoder cell.\n* `attn-num-layers`: Number of layers in attention decoder cell. (Encoder number of hidden units will be `attn-num-hidden`*`attn-num-layers`).\n* `no-resume`: Create new weights even if there are checkpoints present.\n* `max-gradient-norm`: Clip gradients to this norm.\n* `no-gradient-clipping`: Do not perform gradient clipping.\n* `gpu-id`: GPU to use.\n* `use-gru`: Use GRU cells instead of LSTM.\n* `max-width`: Maximum width for the input images. WARNING: images with the width higher than maximum will be discarded.\n* `max-height`: Maximum height for the input images.\n* `max-prediction`: Maximum length of the predicted word/phrase.\n\n## References\n\n[Convert a formula to its LaTex source](https://github.com/harvardnlp/im2markup)\n\n[What You Get Is What You See: A Visual Markup Decompiler](https://arxiv.org/pdf/1609.04938.pdf)\n\n[Torch attention OCR](https://github.com/da03/torch-Attention-OCR)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AAE:3E1DA:179C9D:5DF2A4:6AB92BCE"},"text_sha256":"cf3d8e295edce2d2df5b91331c049f19ab8568b8268397f3813a0cdd592d322f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2130","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17D20C6:1BF72B9:6AB92BCE"},"commit":{"sha":"fd50b4c3e828437d420ebd16c35876a57448db3b","url":"https://github.com/emedvedev/attention-ocr/commit/fd50b4c3e828437d420ebd16c35876a57448db3b","date":"2023-10-20T17:48:54Z","author_date":"2023-10-20T17:48:54Z","committer_date":"2023-10-20T17:48:54Z","tree_sha":"d2ee5dc324a5f25cfafb9e33c2e5a88642f880b5","message_first_line":"Merge pull request #198 from mjpieters/tf2"},"tree_request_status":200,"tree_rate":{"github_remaining":"2129","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17CBBBE:1BF0631:6AB92BCF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7883,"blob_sha":"2189b176f9d0e0d81aaae64756381af38d9f8051","priority":0}],"documents":[{"path":"README.md","size":7883,"blob_sha":"2189b176f9d0e0d81aaae64756381af38d9f8051","priority":0,"status":200,"text":"# Attention-based OCR\n\nVisual attention-based OCR model for image recognition with additional tools for creating TFRecords datasets and exporting the trained model with weights as a [SavedModel](https://www.tensorflow.org/api_docs/python/tf/saved_model) or a frozen graph.\n\n## Acknowledgements\n\nThis project is based on a model by [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03). You can find the original model in the [da03/Attention-OCR](https://github.com/da03/Attention-OCR) repository.\n\n## The model\n\nAuthors: [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03).\n\nThe model first runs a sliding CNN on the image (images are resized to height 32 while preserving aspect ratio). Then an LSTM is stacked on top of the CNN. Finally, an attention model is used as a decoder for producing the final outputs.\n\n![OCR example](http://cs.cmu.edu/~yuntiand/OCR-2.jpg)\n\n## Installation\n\n```\npip install aocr\n```\n\nNote: Tensorflow and Numpy will be installed as dependencies. Additional dependencies are `PIL`/`Pillow`, `distance`, and `six`.\n\nNote #2: this project works with Tensorflow 1.x. Upgrade to Tensorflow 2 is planned, but if you want to help, please feel free to create a PR.\n\n## Usage\n\n### Create a dataset\n\nTo build a TFRecords dataset, you need a collection of images and an annotation file with their respective labels.\n\n```\naocr dataset ./datasets/annotations-training.txt ./datasets/training.tfrecords\naocr dataset ./datasets/annotations-testing.txt ./datasets/testing.tfrecords\n```\n\nAnnotations are simple text files containing the image paths (either absolute or relative to your working dir) and their corresponding labels:\n\n```\ndatasets/images/hello.jpg hello\ndatasets/images/world.jpg world\n```\n\n### Train\n\n```\naocr train ./datasets/training.tfrecords\n```\n\nA new model will be created, and the training will start. Note that it takes quite a long time to reach convergence, since we are training the CNN and attention model simultaneously.\n\nThe `--steps-per-checkpoint` parameter determines how often the model checkpoints will be saved (the default output dir is `checkpoints/`).\n\n**Important:** there is a lot of available training options. See the CLI help or the `parameters` section of this README.\n\n### Test and visualize\n\n```\naocr test ./datasets/testing.tfrecords\n```\n\nAdditionally, you can visualize the attention results during testing (saved to `out/` by default):\n\n```\naocr test --visualize ./datasets/testing.tfrecords\n```\n\nExample output images in `results/correct`:\n\nImage 0 (j/j):\n\n![example image 0](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_0.jpg)\n\nImage 1 (u/u):\n\n![example image 1](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_1.jpg)\n\nImage 2 (n/n):\n\n![example image 2](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_2.jpg)\n\nImage 3 (g/g):\n\n![example image 3](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_3.jpg)\n\nImage 4 (l/l):\n\n![example image 4](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_4.jpg)\n\nImage 5 (e/e):\n\n![example image 5](http://cs.cmu.edu/~yuntiand/2evaluation_data_icdar13_images_word_370.png/image_5.jpg)\n\n### Export\n\nAfter the model is trained and a checkpoint is available, it can be exported as either a frozen graph or a SavedModel.\n\n```bash\n\n# SavedModel (default):\naocr export ./exported-model\n\n# Frozen graph:\naocr export --format=frozengraph ./exported-model\n\n```\n\nLoad weights from the latest checkpoints and export the model into the `./exported-model` directory.\n\n**Note**: During training, it is possible to pass parameters describing the dimensions of the input images (`--max-width`, `--max-height`, etc.). If you used them during training, make sure to also pass them to the `export` command. Otherwise the exported model will not work properly when serving (next section).\n\n### Serving\n\nExported SavedModel can be served as an HTTP REST API using [Tensorflow Serving](https://github.com/tensorflow/serving). You can start the server by running the following command:\n\n```\ntensorflow_model_server --port=9000 --rest_api_port=9001 --model_name=yourmodelname --model_base_path=./exported-model\n```\n\n**Note**: tensorflow_model_server requires a sub-directory with the version number to be present and inside it the files exported in the previous step. So you need to manually move contents of `exported-model` into `exported-model/1`.\n\nNow you can send a prediction request to the running server, for example:\n\n```\ncurl -X POST \\\n  http://localhost:9001/v1/models/aocr:predict \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -d '{\n  \"signature_name\": \"serving_default\",\n  \"inputs\": {\n     \t\"input\": { \"b64\": \"<your image encoded as base64>\" }\n  }\n}'\n```\n\nREST API requires binary inputs to be encoded as Base64 and wrapped in an object containing a `b64` key. [See 'Encoding binary values' in Tensorflow Serving documentation](https://www.tensorflow.org/serving/api_rest#encoding_binary_values)\n\n\n\n## Google Cloud ML Engine\n\nTo train the model in the [Google Cloud Machine Learning Engine](https://cloud.google.com/ml-engine/), upload the training dataset into a Google Cloud Storage bucket and start a training job with the `gcloud` tool.\n\n1. Set the environment variables:\n\n```\n# Prefix for the job name.\nexport JOB_PREFIX=\"aocr\"\n\n# Region to launch the training job in.\n# Should be the same as the storage bucket region.\nexport REGION=\"us-central1\"\n\n# Your storage bucket.\nexport GS_BUCKET=\"gs://aocr-bucket\"\n\n# Path to store your training dataset in the bucket.\nexport DATASET_UPLOAD_PATH=\"training.tfrecords\"\n```\n\n2. Upload the training dataset:\n\n```\ngsutil cp ./datasets/training.tfrecords $GS_BUCKET/$DATASET_UPLOAD_PATH\n```\n\n3. Launch the ML Engine job:\n\n```\nexport NOW=$(date +\"%Y%m%d_%H%M%S\")\nexport JOB_NAME=\"$JOB_PREFIX$NOW\"\nexport JOB_DIR=\"$GS_BUCKET/$JOB_NAME\"\n\ngcloud ml-engine jobs submit training $JOB_NAME \\\n    --job-dir=$JOB_DIR \\\n    --module-name=aocr \\\n    --package-path=aocr \\\n    --region=$REGION \\\n    --scale-tier=BASIC_GPU \\\n    --runtime-version=1.2 \\\n    -- \\\n    train $GS_BUCKET/$DATASET_UPLOAD_PATH \\\n    --steps-per-checkpoint=500 \\\n    --batch-size=512 \\\n    --num-epoch=20\n```\n\n## Parameters\n\n### Global\n\n* `log-path`: Path for the log file.\n\n### Testing\n\n* `visualize`: Output the attention maps on the original image.\n\n### Exporting\n\n* `format`: Format for the export (either `savedmodel` or `frozengraph`).\n\n### Training\n\n* `steps-per-checkpoint`: Checkpointing (print perplexity, save model) per how many steps\n* `num-epoch`: The number of whole data passes.\n* `batch-size`: Batch size.\n* `initial-learning-rate`: Initial learning rate, note the we use AdaDelta, so the initial value does not matter much.\n* `target-embedding-size`: Embedding dimension for each target.\n* `attn-num-hidden`: Number of hidden units in attention decoder cell.\n* `attn-num-layers`: Number of layers in attention decoder cell. (Encoder number of hidden units will be `attn-num-hidden`*`attn-num-layers`).\n* `no-resume`: Create new weights even if there are checkpoints present.\n* `max-gradient-norm`: Clip gradients to this norm.\n* `no-gradient-clipping`: Do not perform gradient clipping.\n* `gpu-id`: GPU to use.\n* `use-gru`: Use GRU cells instead of LSTM.\n* `max-width`: Maximum width for the input images. WARNING: images with the width higher than maximum will be discarded.\n* `max-height`: Maximum height for the input images.\n* `max-prediction`: Maximum length of the predicted word/phrase.\n\n## References\n\n[Convert a formula to its LaTex source](https://github.com/harvardnlp/im2markup)\n\n[What You Get Is What You See: A Visual Markup Decompiler](https://arxiv.org/pdf/1609.04938.pdf)\n\n[Torch attention OCR](https://github.com/da03/torch-Attention-OCR)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:17DFA0:5E35E1:6AB92BCF"},"text_sha256":"4e33c57b5b4efec7e9d3ce198803e556c4d52544699997fc592edb682c9a421d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"J535D165/recordlinkage","input_row":{"repository":"J535D165/recordlinkage","url":"https://github.com/J535D165/recordlinkage","name":"recordlinkage","owner":"J535D165","description":"A powerful and modular toolkit for record linkage and duplicate detection in Python","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1062,"issues":138,"created_at":"2015-10-18T09:00:02Z","updated_at":"2026-09-22T13:56:11Z","first_commit_at":"2015-10-18T08:58:52Z","last_commit_at":"2023-07-20T12:59:41Z","activity_months":93.040000000000006,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:31.930Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"J535D165/recordlinkage","visibility":"public","created_at":"2015-10-18T09:00:02Z","updated_at":"2026-09-22T13:56:11Z","private":false,"fork":false,"archived":false,"stargazers_count":1062,"open_issues_count":65,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2128","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17D5CCB:1BFB25A:6AB92BCF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2127","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BB:DC698:17FE12F:1C22E82:6AB92BD0"},"commit":{"sha":"95068824f93ddfbcd7f5caa1547483745315d767","url":"https://github.com/J535D165/recordlinkage/commit/95068824f93ddfbcd7f5caa1547483745315d767","date":"2018-03-14T21:10:25Z","author_date":"2018-03-14T21:10:25Z","committer_date":"2018-03-14T21:10:25Z","tree_sha":"1a6d8873cc600fb9f05c1a55ec630a8b9597f170","message_first_line":"Remove *args from indexing classes + docstring update"},"tree_request_status":200,"tree_rate":{"github_remaining":"2126","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0853:2D7D17:178A70F:1BAE159:6AB92BD0"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5683,"blob_sha":"b54ad28e69e1ab283cdfe3a5ef9af6e63f6dc0fa","priority":0}],"documents":[{"path":"README.rst","size":5683,"blob_sha":"b54ad28e69e1ab283cdfe3a5ef9af6e63f6dc0fa","priority":0,"status":200,"text":"Python Record Linkage Toolkit\n=============================\n\nThe **Python Record Linkage Toolkit** is a library to link records in or\nbetween data sources. The toolkit provides most of the tools needed for\nrecord linkage and deduplication. The package contains indexing methods,\nfunctions to compare records and classifiers. The package is developed for\nresearch and the linking of small or medium sized files.\n\nThis project is inspired by the `Freely Extensible Biomedical Record Linkage\n(FEBRL) <https://sourceforge.net/projects/febrl/>`__ project, which is a great\nproject. In contrast with FEBRL, the recordlinkage project uses `pandas\n<http://pandas.pydata.org/>`__ and `numpy <http://www.numpy.org/>`__ for data\nhandling and computations. The use of *pandas*, a flexible and powerful data\nanalysis and manipulation library for Python, makes the record linkage process\nmuch easier and faster. The extensive *pandas* library can be used to\nintegrate your record linkage directly into existing data manipulation\nprojects.\n\nOne of the aims of this project is to make an easily extensible record \nlinkage framework. It is easy to include your own indexing algorithms,\ncomparison/similarity measures and classifiers.\n\n\nBasic linking example\n---------------------\n\nImport the ``recordlinkage`` module with all important tools for record\nlinkage and import the data manipulation framework **pandas**.\n\n.. code:: python\n\n    import recordlinkage\n    import pandas\n\nLoad your data into pandas DataFrames. \n\n.. code:: python\n\n    df_a = pandas.DataFrame(YOUR_FIRST_DATASET)\n    df_b = pandas.DataFrame(YOUR_SECOND_DATASET)\n\nComparing all record can be computationally intensive. Therefore, we make \nset of candidate links with one of the built-in indexing techniques like\n**blocking**. In this example, only pairs of records that agree on the surname\nare returned.\n\n.. code:: python\n\n    block_class = recordlinkage.BlockIndex('surname')\n    candidate_links = block_class.index(df_a, df_b)\n\nFor each candidate link, compare the records with one of the\ncomparison or similarity algorithms in the Compare class.\n\n.. code:: python\n\n    c = recordlinkage.Compare()\n\n    c.string('name_a', 'name_b', method='jarowinkler', threshold=0.85)\n    c.exact('sex', 'gender')\n    c.date('dob', 'date_of_birth')\n    c.string('str_name', 'streetname', method='damerau_levenshtein', threshold=0.7)\n    c.exact('place', 'placename')\n    c.numeric('income', 'income', method='gauss', offset=3, scale=3, missing_value=0.5)\n\n    # The comparison vectors\n    feature_vectors = c.compute(candidate_links, df_a, df_b)\n\nThis Python Record Linkage Toolkit contains multiple classification algorithms.\nPlenty of the algorithms do need training data (supervised learning) while\nothers are unsupervised. An example of supervised learning:\n\n.. code:: python\n\n    logrg = recordlinkage.LogisticRegressionClassifier()\n    logrg.learn(TRAINING_COMPARISON_VECTORS, TRAINING_CLASSES)\n\n    logrg.predict(feature_vectors)\n\nand an example of unsupervised learning (the well known ECM-algorithm):\n\n.. code:: python\n\n    ecm = recordlinkage.ECMClassifier()\n    ecm.learn(feature_vectors)\n\nMain Features\n-------------\n\nThe main features of the **Python Record Linkage Toolkit** are:\n\n\n-  Clean and standardise data with easy to use tools\n-  Make pairs of records with smart indexing methods such as\n   **blocking** and **sorted neighbourhood indexing**\n-  Compare records with a large number of comparison and similarity\n   measures for different types of variables such as strings, numbers and dates.\n-  Several classifications algorithms, both supervised and unsupervised\n   algorithms.\n-  Common record linkage evaluation tools\n-  Several built-in datasets. \n\nDocumentation \n-------------\n\nThe most recent documentation and API reference can be found at\n`recordlinkage.readthedocs.org\n<http://recordlinkage.readthedocs.org/en/latest/>`__. The documentation\nprovides some basic usage examples like deduplication_ and linking_ census\ndata. More examples are coming soon. If you do have interesting examples to\nshare, let us know.\n\n.. _deduplication: http://recordlinkage.readthedocs.io/en/latest/notebooks/data_deduplication.html\n.. _linking: http://recordlinkage.readthedocs.io/en/latest/notebooks/link_two_dataframes.html\n\nDependencies, installation and license\n--------------------------------------\n\n|pypi| |travis| |codecov|\n\n.. |travis| image:: https://travis-ci.org/J535D165/recordlinkage.svg?branch=master\n    :target: https://travis-ci.org/J535D165/recordlinkage\n\n.. |pypi| image:: https://badge.fury.io/py/recordlinkage.svg\n    :target: https://pypi.python.org/pypi/recordlinkage/\n    \n.. |codecov| image:: https://codecov.io/gh/J535D165/recordlinkage/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/J535D165/recordlinkage\n\nInstall the Python Record Linkage Toolkit easily with pip\n\n.. code:: sh\n\n    pip install recordlinkage\n\nThe toolkit depends on Pandas_ (>=18.0), Numpy_, `Scikit-learn`_, Scipy_ and\nJellyfish_. You probably have most of them already installed. The package\n``jellyfish`` is used for approximate string comparing and string encoding.\nThe package Numexpr_ is an optional dependency to speed up numerical\ncomparisons.\n\n.. _Numpy: http://www.numpy.org\n.. _Pandas: https://github.com/pydata/pandas\n.. _Scipy: https://www.scipy.org/\n.. _Scikit-learn: http://scikit-learn.org/\n.. _Jellyfish: https://github.com/jamesturk/jellyfish\n.. _Numexpr: https://github.com/pydata/numexpr\n\nThe license for this record linkage tool is GPLv3.\n\nNeed help?\n----------\n\nStuck on your record linkage code or problem? Any other questions? Don't\nhestitate to send me an email (jonathandebruinos@gmail.com).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0F2:40B0C:17DFAD:5E3612:6AB92BCF"},"text_sha256":"d69cf7b3acc8f0b6c31ccb9a6ffc16794754e92f9b41de1673968ef45133badf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2125","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17C1A8A:1BE6B74:6AB92BD1"},"commit":{"sha":"b93d97641952f8c85106be5794ca93b1f1298fbc","url":"https://github.com/J535D165/recordlinkage/commit/b93d97641952f8c85106be5794ca93b1f1298fbc","date":"2023-07-20T12:59:41Z","author_date":"2023-07-20T12:59:41Z","committer_date":"2023-07-20T12:59:41Z","tree_sha":"e94df9dbed523a66b497928c2bf948f52349c319","message_first_line":"Update CI pipeline for publishing package"},"tree_request_status":200,"tree_rate":{"github_remaining":"2124","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AE:B1202:17A7180:1BCBE8B:6AB92BD1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6736,"blob_sha":"fb3b68aa73fd936a811b34810e9689dc6dc3cd4c","priority":0}],"documents":[{"path":"README.md","size":6736,"blob_sha":"fb3b68aa73fd936a811b34810e9689dc6dc3cd4c","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/J535D165/recordlinkage/master/docs/images/recordlinkage-banner-transparent.svg\"><br>\n<\/div>\n\n# RecordLinkage: powerful and modular Python record linkage toolkit\n\n[![Pypi Version](https://badge.fury.io/py/recordlinkage.svg)](https://pypi.python.org/pypi/recordlinkage/)\n[![Github Actions CI Status](https://github.com/J535D165/recordlinkage/workflows/tests/badge.svg?branch=master)](https://github.com/J535D165/recordlinkage/actions)\n[![Code Coverage](https://codecov.io/gh/J535D165/recordlinkage/branch/master/graph/badge.svg)](https://codecov.io/gh/J535D165/recordlinkage)\n[![Documentation Status](https://readthedocs.org/projects/recordlinkage/badge/?version=latest)](https://recordlinkage.readthedocs.io/en/latest/?badge=latest)\n[![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3559042.svg)](https://doi.org/10.5281/zenodo.3559042)\n\n**RecordLinkage** is a powerful and modular record linkage toolkit to\nlink records in or between data sources. The toolkit provides most of\nthe tools needed for record linkage and deduplication. The package\ncontains indexing methods, functions to compare records and classifiers.\nThe package is developed for research and the linking of small or medium\nsized files.\n\nThis project is inspired by the [Freely Extensible Biomedical Record\nLinkage (FEBRL)](https://sourceforge.net/projects/febrl/) project, which\nis a great project. In contrast with FEBRL, the recordlinkage project\nuses [pandas](http://pandas.pydata.org/) and\n[numpy](http://www.numpy.org/) for data handling and computations. The\nuse of *pandas*, a flexible and powerful data analysis and manipulation\nlibrary for Python, makes the record linkage process much easier and\nfaster. The extensive *pandas* library can be used to integrate your\nrecord linkage directly into existing data manipulation projects.\n\nOne of the aims of this project is to make an easily extensible record\nlinkage framework. It is easy to include your own indexing algorithms,\ncomparison/similarity measures and classifiers.\n\n## Basic linking example\n\nImport the `recordlinkage` module with all important tools for record\nlinkage and import the data manipulation framework **pandas**.\n\n``` python\nimport recordlinkage\nimport pandas\n```\n\nLoad your data into pandas DataFrames.\n\n``` python\ndf_a = pandas.DataFrame(YOUR_FIRST_DATASET)\ndf_b = pandas.DataFrame(YOUR_SECOND_DATASET)\n```\n\nComparing all record can be computationally intensive. Therefore, we\nmake set of candidate links with one of the built-in indexing techniques\nlike **blocking**. In this example, only pairs of records that agree on\nthe surname are returned.\n\n``` python\nindexer = recordlinkage.Index()\nindexer.block('surname')\ncandidate_links = indexer.index(df_a, df_b)\n```\n\nFor each candidate link, compare the records with one of the comparison\nor similarity algorithms in the Compare class.\n\n``` python\nc = recordlinkage.Compare()\n\nc.string('name_a', 'name_b', method='jarowinkler', threshold=0.85)\nc.exact('sex', 'gender')\nc.date('dob', 'date_of_birth')\nc.string('str_name', 'streetname', method='damerau_levenshtein', threshold=0.7)\nc.exact('place', 'placename')\nc.numeric('income', 'income', method='gauss', offset=3, scale=3, missing_value=0.5)\n\n# The comparison vectors\nfeature_vectors = c.compute(candidate_links, df_a, df_b)\n```\n\nClassify the candidate links into matching or distinct pairs based on\ntheir comparison result with one of the [classification\nalgorithms](https://recordlinkage.readthedocs.io/en/latest/ref-classifiers.html).\nThe following code classifies candidate pairs with a Logistic Regression\nclassifier. This (supervised machine learning) algorithm requires\ntraining data.\n\n``` python\nlogrg = recordlinkage.LogisticRegressionClassifier()\nlogrg.fit(TRAINING_COMPARISON_VECTORS, TRAINING_PAIRS)\n\nlogrg.predict(feature_vectors)\n```\n\nThe following code shows the classification of candidate pairs with the\nExpectation-Conditional Maximisation (ECM) algorithm. This variant of\nthe Expectation-Maximisation algorithm doesn't require training data\n(unsupervised machine learning).\n\n``` python\necm = recordlinkage.ECMClassifier()\necm.fit_predict(feature_vectors)\n```\n\n## Main Features\n\nThe main features of this Python record linkage toolkit are:\n\n-   Clean and standardise data with easy to use tools\n-   Make pairs of records with smart indexing methods such as\n    **blocking** and **sorted neighbourhood indexing**\n-   Compare records with a large number of comparison and similarity\n    measures for different types of variables such as strings, numbers\n    and dates.\n-   Several classifications algorithms, both supervised and unsupervised\n    algorithms.\n-   Common record linkage evaluation tools\n-   Several built-in datasets.\n\n## Documentation\n\nThe most recent documentation and API reference can be found at\n[recordlinkage.readthedocs.org](http://recordlinkage.readthedocs.org/en/latest/).\nThe documentation provides some basic usage examples like\n[deduplication](http://recordlinkage.readthedocs.io/en/latest/guides/data_deduplication.html)\nand\n[linking](http://recordlinkage.readthedocs.io/en/latest/guides/link_two_dataframes.html)\ncensus data. More examples are coming soon. If you do have interesting\nexamples to share, let us know.\n\n## Installation\n\nThe Python Record linkage Toolkit requires Python 3.8 or higher. Install the\npackage easily with pip\n\n``` sh\npip install recordlinkage\n```\n\nThe toolkit depends on popular packages like\n[Pandas](https://github.com/pydata/pandas),\n[Numpy](http://www.numpy.org), [Scipy](https://www.scipy.org/) and,\n[Scikit-learn](http://scikit-learn.org/). A complete list of\ndependencies can be found in the [installation\nmanual](https://recordlinkage.readthedocs.io/en/latest/installation.html)\nas well as recommended and optional dependencies.\n\n## License\n\nThe license for this record linkage tool is BSD-3-Clause.\n\n## Citation\n\nPlease cite this package when being used in an academic context. Ensure\nthat the DOI and version match the installed version. Citatation styles\ncan be found on the publishers website\n[10.5281/zenodo.3559042](https://doi.org/10.5281/zenodo.3559042).\n\n``` text\n@software{de_bruin_j_2019_3559043,\n  author       = {De Bruin, J},\n  title        = {{Python Record Linkage Toolkit: A toolkit for\n                   record linkage and duplicate detection in Python}},\n  month        = dec,\n  year         = 2019,\n  publisher    = {Zenodo},\n  version      = {v0.14},\n  doi          = {10.5281/zenodo.3559043},\n  url          = {https://doi.org/10.5281/zenodo.3559043}\n}\n```\n\n## Need help?\n\nStuck on your record linkage code or problem? Any other questions? Don't\nhestitate to send me an email (<jonathandebruinos@gmail.com>).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"64D8:3E1C8:17F070:5E45A6:6AB92BD1"},"text_sha256":"cd6f948b089a1d9006e931df7319ce9b42d2997c5e7d30981ffed132488766e3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"NeuroTechX/moabb","input_row":{"repository":"NeuroTechX/moabb","url":"https://github.com/NeuroTechX/moabb","name":"moabb","owner":"NeuroTechX","description":"Mother of All BCI Benchmarks","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1057,"issues":517,"created_at":"2017-05-15T15:01:39Z","updated_at":"2026-09-24T11:04:06Z","first_commit_at":"2017-05-15T14:58:19Z","last_commit_at":"2026-09-23T13:15:34Z","activity_months":112.28,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:34.723Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NeuroTechX/moabb","visibility":"public","created_at":"2017-05-15T15:01:39Z","updated_at":"2026-09-24T11:04:06Z","private":false,"fork":false,"archived":false,"stargazers_count":1057,"open_issues_count":126,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2123","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:17F2014:1C1752B:6AB92BD2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2122","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17C4FF5:1BEA2CA:6AB92BD3"},"commit":{"sha":"a219e40771dc969cea2864d4950c67e4c0bc1d94","url":"https://github.com/NeuroTechX/moabb/commit/a219e40771dc969cea2864d4950c67e4c0bc1d94","date":"2018-05-17T14:18:01Z","author_date":"2018-05-17T14:18:01Z","committer_date":"2018-05-17T14:18:01Z","tree_sha":"060fc92a31f27fdc921ff4c1adf18ca37b959e90","message_first_line":"Renamed ordering_heatmap to summary_plot"},"tree_request_status":200,"tree_rate":{"github_remaining":"2121","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C9:278AC2:186992D:1C8F1D2:6AB92BD3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7971,"blob_sha":"3c026012428290b04d10d062a74c31de3e73772d","priority":0}],"documents":[{"path":"README.md","size":7971,"blob_sha":"3c026012428290b04d10d062a74c31de3e73772d","priority":0,"status":200,"text":"# Mother of all BCI Benchmark\n\n<p align=\"center\">\n  <img alt=\"banner\" src=\"/images/M.png/\" width=\"400\">\n<\/p>\n<p align=\"center\" href=\"\">\n  Build a comprehensive benchmark of popular BCI algorithms applied on an extensive list of freely available EEG datasets.\n<\/p>\n\n## Disclaimer\n\n**This is work in progress. API will change significantly (as well as the results of the benchmark).**\n\n[![Build Status](https://travis-ci.org/NeuroTechX/moabb.svg?branch=master)](https://travis-ci.org/NeuroTechX/moabb)\n\n## Welcome!\n\nFirst and foremost, Welcome! :tada: Willkommen! :confetti_ball: Bienvenue! :balloon::balloon::balloon:\n\nThank you for visiting the Mother of all BCI Benchmark repository.\n\nThis document (the README file) is a hub to give you some information about the project. Jump straight to one of the sections below, or just scroll down to find out more.\n\n* [What are we doing? (And why?)](#what-are-we-doing)\n* [Who are we?](#who-are-we)\n* [What do we need?](#what-do-we-need)\n* [How can you get involved?](#get-involved)\n* [Get in touch](#contact-us)\n* [Find out more](#find-out-more)\n* [Installation](#install)\n* [Running](#running)\n* [Supported datasets](#datasets)\n* [Documentation](#docs)\n* [Architecture and main concepts](#architecture)\n\n\n## What are we doing?\n\n### The problem\n\n* Reproducible Research in BCI has a long way to go. \n* While many BCI datasets are made freely available, researchers do not publish code, and reproducing results required to benchmark new algorithms turns out to be more tricky than it should be. \n* Performances can be significantly impacted by parameters of the preprocessing steps, toolboxes used and implementation “tricks” that are almost never reported in the literature. \n\nAs a results, there is no comprehensive benchmark of BCI algorithm, and newcomers are spending a tremendous amount of time browsing literature to find out what algorithm works best and on which dataset.\n\n### The solution\n\nThe Mother of all BCI Benchmark will:\n\n* Build a comprehensive benchmark of popular BCI algorithms applied on an extensive list of freely available EEG datasets. \n* The code will be made available on github, serving as a reference point for the future algorithmic developments.\n* Algorithms can be ranked and promoted on a website, providing a clear picture of the different solutions available in the field.\n\nThis project will be successful when we read in an abstract “ … the proposed method obtained a score of 89% on the MOABB (Mother of All BCI Benchmark), outperforming the state of the art by 5%  ...”.\n\n## Who are we?\n\nThe founder of the Mother of all BCI Benchmark is [Alexander Barachant][link_alex_b]. He is currently working with [Vinay Jayaram][link_vinay] to update and maintain the codebase. This project is under the umbrella of [NeuroTechX][link_neurotechx], the international community for NeuroTech enthusiasts.\n\n## What do we need?\n\n**You**! In whatever way you can help.\n\nWe need expertise in programming, user experience, software sustainability, documentation and technical writing and project management.\n\nWe'd love your feedback along the way.\n\nOur primary goal is to build a comprehensive benchmark of popular BCI algorithms applied on an extensive list of freely available EEG datasets, and we're excited to support the professional development of any and all of our contributors. If you're looking to learn to code, try out working collaboratively, or translate you skills to the digital domain, we're here to help.\n\n## Get involved\n\nIf you think you can help in any of the areas listed above (and we bet you can) or in any of the many areas that we haven't yet thought of (and here we're *sure* you can) then please check out our [contributors' guidelines](CONTRIBUTING.md) and our [roadmap](ROADMAP.md).\n\nPlease note that it's very important to us that we maintain a positive and supportive environment for everyone who wants to participate. When you join us we ask that you follow our [code of conduct](CODE_OF_CONDUCT.md) in all interactions both on and offline.\n\n## Contact us\n\nIf you want to report a problem or suggest an enhancement we'd love for you to [open an issue](../../issues) at this github repository because then we can get right on it. But you can also reach us on the [NeuroTechX slack #moabb channel][link_neurotechx_signup] where we are happy to help!\n\n## Find out more\n\nYou might be interested in:\n\n* [MOABB documentaion][link_moabb_docs]\n\nAnd of course, you'll want to know our:\n\n* [Contributors' guidelines](CONTRIBUTING.md)\n* [Roadmap](ROADMAP.md)\n\n## Thank you\n\nThank you so much (Danke schön! Merci beaucoup!) for visiting the project and we do hope that you'll join us on this amazing journey to build a comprehensive benchmark of popular BCI algorithms applied on an extensive list of freely available EEG datasets.\n\n## <a name=\"install\"><\/a> Installation:\n\n**Must by running Python 3.6**\n\nTo install, fork or clone the repository and go to the downloaded directory,\nthen run\n\n```\npip install -r requirements.txt\npython setup.py develop    # because no stable release yet\n```\n\n### Requirements we use\n\nmne\nnumpy\nscipy\nscikit-learn\nmatplotlib\nseaborn\npandas\npyriemann\nh5py\n\n## <a name=\"running\"><\/a> Running:\n\n### Verify Installation\n\nTo ensure it is running correctly, you can also run\n\n```\npython -m unittest moabb.tests\n```\nonce it is installed.\n\n### Run the Moabb\n\n```\npython -m moabb.run --verbose\n```\n\n## <a name=\"docs\"><\/a> Documentation:\n\n[http://moabb.neurotechx.com/docs/](http://moabb.neurotechx.com/docs/)\nYou can also find an arXiv preprint with results from a version 1 [here](https://arxiv.org/abs/1805.06427)\n\n## <a name=\"datasets\"><\/a> Supported datasets:\n\nThe list of supported dataset can be found here : http://moabb.neurotechx.com/docs/datasets.html\n\n### Submit a new dataset\n\nyou can submit new dataset by filling this [form](https://docs.google.com/forms/d/e/1FAIpQLScxbpqK4omKsUs4tA2XpfeHJATo_SbYvT0hpxoeKDb5k_TZvQ/viewform). The datasets currently on our radar can be seen [here](https://docs.google.com/spreadsheets/d/1fQNFXGu1J1yJ9jFCer9EQQatjCPJWg7O-uCGF0Z4PiM/edit).  \n\n## <a name=\"architecture\"><\/a> Architecture and main concepts:\n\nthere is 4 main concepts in the MOABB: the datasets, the paradigm, the evaluation, and the pipelines.\n\n### Datasets\n\nA dataset handle and abstract low level access to the data. the dataset will\ntakes data stored locally, in the format in which they have been downloaded, and\nwill convert them into a MNE raw object. There are options to pool all the\ndifferent recording sessions per subject or to evaluate them separately.\n\n### Paradigm\n\nA paradigm defines how the raw data will be converted to trials ready to be\nprocessed by a decoding algorithm. This is a function of the paradigm used,\ni.e. in motor imagery one can have two-class, multi-class, or continuous\nparadigms; similarly, different preprocessing is necessary for ERP vs ERD paradigms.\n\n### Evaluations\n\nAn evaluation defines how we go from trials per subject and session to a\ngeneralization statistic (AUC score, f-score, accuracy, etc) -- it can be either\nwithin-recording-session accuracy, across-session within-subject accuracy,\nacross-subject accuracy, or other transfer learning settings.\n\n### Pipelines\n\nPipeline defines all steps required by an algorithm to obtain predictions. Pipelines are typically a chain of sklearn compatible transformers and end with an sklearn compatible estimator.\nSee [Pipelines](http://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html) for more info.\n\n## Generate the documentation\n\nTo generate the documentation :\n\n```\ncd docs\nmake html\n```\n\n[link_alex_b]: http://alexandre.barachant.org/\n[link_vinay]: https://ei.is.tuebingen.mpg.de/~vjayaram\n[link_neurotechx]: http://neurotechx.com/\n[link_neurotechx_signup]: https://docs.google.com/forms/d/e/1FAIpQLSfZyzhVdOLU8_oQ4NylHL8EFoKLIVmryGXA4u7HDsZpkTryvg/viewform\n[link_moabb_docs]: http://moabb.neurotechx.com/docs/index.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:18233:17AA69:5DFFB8:6AB92BD3"},"text_sha256":"f19aaa4263de70e2d7eeee870ce733086a096446224bc70123082c1058b5f79c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2120","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:18092B6:1C2E96F:6AB92BD4"},"commit":{"sha":"78f18a1dc09cc46135a677f2c31e6d7357b3b1a4","url":"https://github.com/NeuroTechX/moabb/commit/78f18a1dc09cc46135a677f2c31e6d7357b3b1a4","date":"2026-06-29T11:51:03Z","author_date":"2026-06-29T11:51:03Z","committer_date":"2026-06-29T11:51:03Z","tree_sha":"81edd4bcdedb2b4e3e02562a7ca02dd0f0fa8dc6","message_first_line":"Add readable __repr__ to BaseDataset (#1112)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2119","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0898:7307A:17C1D3F:1BE6E92:6AB92BD4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10307,"blob_sha":"d00ef7ebdcc027950c2f5a84a76fe6636e7d1a9a","priority":0}],"documents":[{"path":"README.md","size":10307,"blob_sha":"d00ef7ebdcc027950c2f5a84a76fe6636e7d1a9a","priority":0,"status":200,"text":"<div align=\"center\" class=\"moabb-readme-header\">\n  <img\n    src=\"https://raw.githubusercontent.com/NeuroTechX/moabb/refs/heads/develop/docs/source/_static/moabb_notext.svg\"\n    width=\"220\"\n    height=\"220\"\n    alt=\"MOABB logo\"\n  />\n  <h1>Mother of all BCI Benchmarks (MOABB)<\/h1>\n  <p>\n    Build a comprehensive benchmark of popular Brain-Computer Interface (BCI) algorithms applied on an extensive list\n    of freely available EEG datasets.\n  <\/p>\n  <p>\n    <a href=\"https://moabb.neurotechx.com/\">Docs<\/a> •\n    <a href=\"https://moabb.neurotechx.com/docs/install/install.html\">Install<\/a> •\n    <a href=\"https://moabb.neurotechx.com/docs/auto_examples/index.html\">Examples<\/a> •\n    <a href=\"https://moabb.neurotechx.com/docs/paper_results.html\">Benchmark<\/a> •\n    <a href=\"https://moabb.neurotechx.com/docs/dataset_summary.html\">Datasets<\/a>\n  <\/p>\n  <p>\n    <a href=\"https://doi.org/10.5281/zenodo.10034223\"><img src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.10034223.svg\" alt=\"DOI\"><\/a>\n    <a href=\"https://github.com/NeuroTechX/moabb/actions/workflows/test.yml?query=branch%3Adevelop\"><img src=\"https://github.com/NeuroTechX/moabb/actions/workflows/test.yml/badge.svg?branch=develop\" alt=\"Build Status\"><\/a>\n    <a href=\"https://pypi.org/project/moabb/\"><img src=\"https://img.shields.io/pypi/v/moabb?color=blue&style=flat-square\" alt=\"PyPI\"><\/a>\n    <a href=\"https://pypi.org/project/moabb/\"><img src=\"https://img.shields.io/pypi/v/moabb?label=version&color=orange&style=flat-square\" alt=\"Version\"><\/a>\n    <a href=\"https://pypi.org/project/moabb/\"><img src=\"https://img.shields.io/pypi/pyversions/moabb?style=flat-square\" alt=\"Python versions\"><\/a>\n    <a href=\"https://pepy.tech/project/moabb\"><img src=\"https://pepy.tech/badge/moabb\" alt=\"Downloads\"><\/a>\n    <a href=\"https://github.com/NeuroTechX/moabb/actions/workflows/link-check.yml\"><img src=\"https://github.com/NeuroTechX/moabb/actions/workflows/link-check.yml/badge.svg\" alt=\"Link Check\"><\/a>\n  <\/p>\n<\/div>\n\n## Quickstart\n\n\n```shell\npip install moabb\n```\n\n```python\nimport moabb\nfrom moabb.datasets import BNCI2014_001\nfrom moabb.evaluations import CrossSessionEvaluation\nfrom moabb.paradigms import LeftRightImagery\nfrom moabb.pipelines.features import LogVariance\n\nfrom sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA\nfrom sklearn.pipeline import make_pipeline\n\nmoabb.set_log_level(\"info\")\n\npipelines = {\"LogVar+LDA\": make_pipeline(LogVariance(), LDA())}\n\ndataset = BNCI2014_001()\ndataset.subject_list = dataset.subject_list[:2]\n\nparadigm = LeftRightImagery(fmin=8, fmax=35)\nevaluation = CrossSessionEvaluation(paradigm=paradigm, datasets=[dataset])\nresults = evaluation.process(pipelines)\n\nprint(results.head())\n```\n\nFor full installation options and troubleshooting, see the [documentation](https://moabb.neurotechx.com/docs/install/install.html).\n\n\n## Disclaimer\n\n**This is an open science project that may evolve depending on the need of the community.**\n\n## The problem\n\n[Brain-Computer Interfaces](https://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface)\nallow to interact with a computer using brain signals. In this project, we focus mostly on\nelectroencephalographic signals\n([EEG](https://en.wikipedia.org/wiki/Electroencephalography)), that is a very active\nresearch domain, with worldwide scientific contributions. Still:\n\n- Reproducible Research in BCI has a long way to go.\n- While many BCI datasets are made freely available, researchers do not publish code, and\n  reproducing results required to benchmark new algorithms turns out to be trickier than\n  it should be.\n- Performances can be significantly impacted by parameters of the preprocessing steps,\n  toolboxes used and implementation “tricks” that are almost never reported in the\n  literature.\n\nAs a result, there is no comprehensive benchmark of BCI algorithms, and newcomers are\nspending a tremendous amount of time browsing literature to find out what algorithm works\nbest and on which dataset.\n\n## The solution\n\nThe Mother of all BCI Benchmarks allows to:\n\n- Build a comprehensive benchmark of popular BCI algorithms applied on an extensive list\n  of freely available EEG datasets.\n- The code is available on GitHub, serving as a reference point for the future algorithmic\n  developments.\n- Algorithms can be ranked and promoted on a website, providing a clear picture of the\n  different solutions available in the field.\n\nThis project will be successful when we read in an abstract “ … the proposed method\nobtained a score of 89% on the MOABB (Mother of All BCI Benchmarks), outperforming the\nstate of the art by 5% ...”.\n\n## Core Team\n\nThis project is under the umbrella of [NeuroTechX][link_neurotechx], the international\ncommunity for NeuroTech enthusiasts.\n\nThe Mother of all BCI Benchmarks was founded by [Alexander Barachant](http://alexandre.barachant.org/) and [Vinay Jayaram][link_vinay].\n\nIt is currently maintained by:\n\n* [Sylvain Chevallier](https://sylvchev.github.io/)\n* [Bruno Aristimunha](https://bruaristimunha.github.io/)\n* [Pierre Guetschel](https://github.com/PierreGtch)\n* [Grégoire Cattan](https://github.com/gcattan)\n* [Anton Andreev](https://github.com/toncho11)\n\n## Contributors\n\nThe MOABB is a community project, and we are always thankful to all the contributors!\n\n<div align=\"center\" class=\"moabb-contributors\">\n  <a href=\"https://github.com/NeuroTechX/moabb/graphs/contributors\">\n    <img src=\"https://contrib.rocks/image?repo=NeuroTechX/moabb\" alt=\"MOABB contributors\" width=\"1100\" />\n  <\/a>\n<\/div>\n\n## Acknowledgements\n\nMOABB has benefited from the support of the following organizations:\n\n<a href=\"https://www.dataia.eu/en\"><img src=\"https://www.dataia.eu/themes/dataia/css/images/DATAIA-h-sansfond.png\" alt=\"DATAIA\" style=\"height:60px; background-color:#2e4a7d; padding:10px; border-radius:5px;\"/><\/a>\n\n### What do we need?\n\n**You**! In whatever way you can help.\n\nWe need expertise in programming, user experience, software sustainability, documentation\nand technical writing and project management.\n\nWe'd love your feedback along the way.\n\nOur primary goal is to build a comprehensive benchmark of popular BCI algorithms applied\non an extensive list of freely available EEG datasets, and we're excited to support the\nprofessional development of any and all of our contributors. If you're looking to learn to\ncode, try out working collaboratively, or translate your skills to the digital domain,\nwe're here to help.\n\n## Cite MOABB\n\nIf you use MOABB in your experiments, please cite MOABB and the related publications:\n\n📚 [Full citation guide](https://moabb.neurotechx.com/docs/cite.html)\n\n### Software Citation\n\n#### APA Format\n\n```text\nAristimunha, B., Carrara, I., Guetschel, P., Sedlar, S., Rodrigues, P., Sosulski, J.,\nNarayanan, D., Bjareholt, E., Barthelemy, Q., Schirrmeister, R. T., Kobler, R.,\nKalunga, E., Darmet, L., Gregoire, C., Abdul Hussain, A., Gatti, R., Goncharenko, V.,\nAndreev, A., Thielen, J., Hajhassani, D., Begany, K., Moreau, T., Roy, Y., Jayaram, V.,\nBarachant, A., & Chevallier, S. (2026). Mother of all BCI Benchmarks (MOABB) (Version 1.5.0).\nZenodo. https://doi.org/10.5281/zenodo.10034223\n```\n\n#### BibTeX Format\n\n```bibtex\n@misc{Aristimunha_Mother_of_all,\n  author       = {Aristimunha, Bruno and\n                  Carrara, Igor and\n                  Guetschel, Pierre and\n                  Sedlar, Sara and\n                  Rodrigues, Pedro and\n                  Sosulski, Jan and\n                  Narayanan, Divyesh and\n                  Bjareholt, Erik and\n                  Barthelemy, Quentin and\n                  Schirrmeister, Robin Tibor and\n                  Kobler, Reinmar and\n                  Kalunga, Emmanuel and\n                  Darmet, Ludovic and\n                  Gregoire, Cattan and\n                  Abdul Hussain, Ali and\n                  Gatti, Ramiro and\n                  Goncharenko, Vladislav and\n                  Andreev, Anton and\n                  Thielen, Jordy and\n                  Hajhassani, Davoud and\n                  Begany, Katelyn and\n                  Moreau, Thomas and\n                  Roy, Yannick and\n                  Jayaram, Vinay and\n                  Barachant, Alexandre and\n                  Chevallier, Sylvain},\n  title        = {Mother of all BCI Benchmarks},\n  year         = 2026,\n  publisher    = {Zenodo},\n  version      = {1.5.0},\n  url          = {https://github.com/NeuroTechX/moabb},\n  doi          = {10.5281/zenodo.10034223},\n}\n```\n\n### Scientific Publications\n\nIf you want to cite the scientific contributions of MOABB, please use the following papers:\n\n#### MOABB Benchmark Paper\n\n> Sylvain Chevallier, Igor Carrara, Bruno Aristimunha, Pierre Guetschel, Sara Sedlar,\n> Bruna Junqueira Lopes, Sébastien Velut, Salim Khazem, Thomas Moreau\n>\n> **[\"The largest EEG-based BCI reproducibility study for open science: the MOABB benchmark\"](https://cnrs.hal.science/hal-04537061/)**\n>\n> HAL: hal-04537061\n\n#### Original MOABB Paper\n\n> Vinay Jayaram and Alexandre Barachant\n>\n> **[\"MOABB: trustworthy algorithm benchmarking for BCIs\"](https://doi.org/10.1088/1741-2552/aadea0)**\n>\n> Journal of Neural Engineering 15.6 (2018): 066011\n>\n> [DOI: 10.1088/1741-2552/aadea0](https://doi.org/10.1088/1741-2552/aadea0)\n\n---\n\n📣 **If you publish a paper using MOABB, please [open an issue](https://github.com/NeuroTechX/moabb/issues) to let us know!**\nWe would love to hear about your work and help you promote it.\n\n## Contact us\n\nIf you want to report a problem or suggest an enhancement, we'd love for you to\n[open an issue](https://github.com/NeuroTechX/moabb/issues) at this GitHub repository\nbecause then we can get right on it.\n\n\n[link_alex_b]: http://alexandre.barachant.org/\n[link_vinay]: https://www.linkedin.com/in/vinay-jayaram-8635aa25\n[link_neurotechx]: http://neurotechx.com/\n[link_sylvain]: https://sylvchev.github.io/\n[link_bruno]: https://www.linkedin.com/in/bruaristimunha/\n[link_igor]: https://www.linkedin.com/in/carraraig/\n[link_pierre]: https://www.linkedin.com/in/pierreguetschel/\n[link_neurotechx_signup]: https://neurotechx.com/\n[link_gitter]: https://app.gitter.im/#/room/#moabb_dev_community:gitter.im\n[link_moabb_docs]: https://moabb.neurotechx.com/\n[link_arxiv]: https://arxiv.org/abs/1805.06427\n[link_jne]: https://doi.org/10.1088/1741-2552/aadea0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"586A:3E1DA:179CDF:5DF38B:6AB92BD5"},"text_sha256":"e6281c0596d9fa748e96dba20a4bc2cff96cc5f07a136f0cefc03263bad292b3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lhelontra/tensorflow-on-arm","input_row":{"repository":"lhelontra/tensorflow-on-arm","url":"https://github.com/lhelontra/tensorflow-on-arm","name":"tensorflow-on-arm","owner":"lhelontra","description":"TensorFlow for Arm","language":"Shell","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1051,"issues":102,"created_at":"2017-08-01T21:01:09Z","updated_at":"2026-09-19T10:12:55Z","first_commit_at":"2017-08-01T21:04:38Z","last_commit_at":"2020-12-21T04:49:54Z","activity_months":40.649999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:37.834Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lhelontra/tensorflow-on-arm","visibility":"public","created_at":"2017-08-01T21:01:09Z","updated_at":"2026-09-19T10:12:55Z","private":false,"fork":false,"archived":false,"stargazers_count":1051,"open_issues_count":27,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2118","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:178C02A:1BB16A6:6AB92BD5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2117","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E4:E80A6:17B062A:1BD5E12:6AB92BD6"},"commit":{"sha":"193ec3499af8860f14df2b6c89c3faf00143357a","url":"https://github.com/lhelontra/tensorflow-on-arm/commit/193ec3499af8860f14df2b6c89c3faf00143357a","date":"2018-05-17T15:58:03Z","author_date":"2018-05-17T15:58:03Z","committer_date":"2018-05-17T15:58:03Z","tree_sha":"0dea85d767c64db7b3fc3a303ae663a03e8e813d","message_first_line":"Merge pull request #12 from mattn/fix-typo"},"tree_request_status":200,"tree_rate":{"github_remaining":"2116","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:17B0695:1BD5E70:6AB92BD6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1273,"blob_sha":"91868458d8d21b17afb190958b76cec0423d5a35","priority":0}],"documents":[{"path":"README.md","size":1273,"blob_sha":"91868458d8d21b17afb190958b76cec0423d5a35","priority":0,"status":200,"text":"# Tensorflow-on-arm\n\nInspired by the [tensorflow-on-raspberry-pi](https://github.com/samjabrahams/tensorflow-on-raspberry-pi).\nTool for compile tensorflow for arm.\n\n## Dependences\n```shell\napt-get install openjdk-8-jdk automake autoconf\napt-get install curl zip unzip libtool swig libpng12-dev zlib1g-dev pkg-config git zip g++ unzip wget xz-utils\n\n# For python2.7\napt-get install python-numpy python-dev python-pip python-mock\n\n# For python3\napt-get install python3-numpy python3-dev python3-pip python3-mock\n```\n\n## Cross-compilation\nMake you sure added arm architecture, see how to adds in debian flavors:\n```shell\ndpkg --add-architecture armhf\necho \"deb [arch=armhf] http://httpredir.debian.org/debian/ stretch main contrib non-free\" >> /etc/apt/sources.list\n```\nif you want compile python support:\n```shell\n# For python2.7\napt-get install libpython-all-dev:armhf\n\n# For python3\napt-get install libpython3-all-dev:armhf\n```\n\n## Edit tweaks like bazel resources, board model, and others\nsee configuration file examples in: build_tensorflow/configs/\n\n## Finally, compile tensorflow.\n```shell\ncd build_tensorflow/\nchmod +x build_tensorflow.sh\n./build_tensorflow.sh <path-of-config>\n# If no output errors, the pip package will be in the directory: /tmp/tensorflow_pkg/\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F4A0:3EACB:17B114:5E07BB:6AB92BC6"},"text_sha256":"e6ec1b10f7502c5587aeb48933d905944af149b3a0344e8c6cc0ec0ded5e9f65"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2115","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:17B39CE:1BD8F1B:6AB92BD7"},"commit":{"sha":"c7f3095fa90c907b3b6579b10915b6d981e81e4d","url":"https://github.com/lhelontra/tensorflow-on-arm/commit/c7f3095fa90c907b3b6579b10915b6d981e81e4d","date":"2020-12-21T04:49:54Z","author_date":"2020-12-21T04:49:54Z","committer_date":"2020-12-21T04:49:54Z","tree_sha":"3b3c64dd40077a23ffd49dfdc434952e201769f5","message_first_line":"Merge branch 'master' of https://github.com/lhelontra/tensorflow-on-arm"},"tree_request_status":200,"tree_rate":{"github_remaining":"2114","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FC:74E6D:180C6D3:1C3210B:6AB92BD7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2761,"blob_sha":"87087de68af6c2a1f53798e920254d0a98449d68","priority":0}],"documents":[{"path":"README.md","size":2761,"blob_sha":"87087de68af6c2a1f53798e920254d0a98449d68","priority":0,"status":200,"text":"# Tensorflow-on-arm\n\nInspired by [tensorflow-on-raspberry-pi](https://github.com/samjabrahams/tensorflow-on-raspberry-pi).\nTool to compile tensorflow for ARM.\n\n## Dependencies\n```shell\napt-get install openjdk-8-jdk automake autoconf\napt-get install curl zip unzip libtool swig libpng-dev zlib1g-dev pkg-config git g++ wget xz-utils\n\n# For python2.7\napt-get install python-numpy python-dev python-pip python-mock\n\n# If using a virtual environment, omit the --user argument\npip install -U --user keras_applications==1.0.8 --no-deps\npip install -U --user keras_preprocessing==1.1.0 --no-deps\n\n# For python3\napt-get install python3-numpy python3-dev python3-pip python3-mock\n\n# If using a virtual environment, omit the --user argument\npip3 install -U --user keras_applications==1.0.8 --no-deps\npip3 install -U --user keras_preprocessing==1.1.0 --no-deps\npip3 install portpicker\n```\n\n## TensorFlow on Raspberry Pi\n\n### It's officially supported!\n\nPython wheels for TensorFlow are [officially supported](https://medium.com/tensorflow/tensorflow-1-9-officially-supports-the-raspberry-pi-b91669b0aa0). This repository also maintains up-to-date TensorFlow wheels for Raspberry Pi.\n\n### Installation\n[Check out the official TensorFlow website for more information.](https://www.tensorflow.org/install/install_raspbian)\n\n\n## Cross-compilation\nMake you sure add the ARM architecture to your package manager, see how to add it in Debian flavors:\n```shell\ndpkg --add-architecture armhf\necho \"deb [arch=armhf] http://httpredir.debian.org/debian/ buster main contrib non-free\" >> /etc/apt/sources.list\n```\nIf you want compile Python support:\n```shell\n# For python2.7\napt-get install libpython-all-dev:armhf\n\n# For python3\napt-get install libpython3-all-dev:armhf\n```\n### Using Docker\n\n#### Python 3.7\n\n```shell\ncd build_tensorflow/\ndocker build -t tf-arm -f Dockerfile .\ndocker run -it -v /tmp/tensorflow_pkg/:/tmp/tensorflow_pkg/ --env TF_PYTHON_VERSION=3.7 tf-arm ./build_tensorflow.sh configs/<conf-name> # rpi.conf, rk3399.conf ...\n```\n\n#### Python 3.8\n\n```shell\ncd build_tensorflow/\ndocker build -t tf-arm -f Dockerfile.bullseye .\ndocker run -it -v /tmp/tensorflow_pkg/:/tmp/tensorflow_pkg/ --env TF_PYTHON_VERSION=3.8 tf-arm ./build_tensorflow.sh configs/<conf-name> # rpi.conf, rk3399.conf ...\n```\n\n## Edit tweaks like Bazel resources, board model, and others.\nSee configuration file examples in: build_tensorflow/configs/\n\n## Finally, compile TensorFlow.\n```shell\ncd build_tensorflow/\nchmod +x build_tensorflow.sh\nTF_PYTHON_VERSION=3.5 ./build_tensorflow.sh <path-of-config> [noclean]\n# The optional [noclean] argument omits 'bazel clean' before building for debugging purposes.\n# If no output errors, the pip package will be in the directory: /tmp/tensorflow_pkg/\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F0F0:3EACB:17B123:5E07E2:6AB92BD5"},"text_sha256":"c1908737b2bdc9e57abdc68152e95dd43ed017f1f3aa43ada0b99cab2b6673ae"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"NaturalIntelligence/imglab","input_row":{"repository":"NaturalIntelligence/imglab","url":"https://github.com/NaturalIntelligence/imglab","name":"imglab","owner":"NaturalIntelligence","description":"To speedup and simplify image labeling/ annotation process with multiple supported formats.","language":"HTML","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1022,"issues":118,"created_at":"2017-10-25T12:28:24Z","updated_at":"2026-09-25T06:31:36Z","first_commit_at":"2017-10-25T12:28:25Z","last_commit_at":"2026-08-18T10:39:29Z","activity_months":105.75,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:40.229Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NaturalIntelligence/imglab","visibility":"public","created_at":"2017-10-25T12:28:24Z","updated_at":"2026-09-25T06:31:36Z","private":false,"fork":false,"archived":false,"stargazers_count":1022,"open_issues_count":40,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2113","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0855:14A1F2:18172AD:1C3CA71:6AB92BD8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2112","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:17B36AF:1BD8BB0:6AB92BD8"},"commit":{"sha":"d2f6a4d09a9d209c3ce9eb0b949af0ec6a73c144","url":"https://github.com/NaturalIntelligence/imglab/commit/d2f6a4d09a9d209c3ce9eb0b949af0ec6a73c144","date":"2018-05-24T15:44:31Z","author_date":"2018-05-24T15:44:31Z","committer_date":"2018-05-24T15:44:31Z","tree_sha":"2c8f47dc3adbf5082e1083ea11168a941b847ee3","message_first_line":"load image into workarea"},"tree_request_status":200,"tree_rate":{"github_remaining":"2111","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:181CAFD:1C420CB:6AB92BD9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3267,"blob_sha":"9ad4db02a27506ca32d2917631941d71bf84971c","priority":0}],"documents":[{"path":"README.md","size":3267,"blob_sha":"9ad4db02a27506ca32d2917631941d71bf84971c","priority":0,"status":200,"text":"# [imglab](https://naturalintelligence.github.io/imglab/)\nWeb based tool to label images for object. So that they can be used to train dlib or other object detectors.\n\n[![Open Source Helpers](https://www.codetriage.com/naturalintelligence/imglab/badges/users.svg)](https://www.codetriage.com/naturalintelligence/imglab)\n[![first-timers-only](http://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](http://www.firsttimersonly.com/)\n\n<a href=\"https://www.patreon.com/bePatron?u=9531404\" data-patreon-widget-type=\"become-patron-button\"><img src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" alt=\"Become a Patron!\" width=\"200\" /><\/a>\n<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KQJAX48SPUKNC\"> <img src=\"https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png\" alt=\"Stubmatic donate button\"/><\/a>\n<a href=\"https://liberapay.com/amitgupta/donate\"><img alt=\"Donate using Liberapay\" src=\"https://liberapay.com/assets/widgets/donate.svg\"><\/a>\n\n<div align=\"center\"><img src=\"img/imglab_logo.png\"  width=\"300px\"><\/div>\n\n> This project is looking for **contributors**. If you have a feature you'd like to see implemented or a bug you'd liked fixed, the best and fastest way to make that happen is to implement it and submit a PR. Basic knowledge of HTML, CSS and JS is sufficient to start with. Feel free to ask for any guidance.\n\n## How to use\nYou can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.\n\n[![ImgLab Tutorial](https://img.youtube.com/vi/4yLL21weN8w/0.jpg)](https://www.youtube.com/watch?v=4yLL21weN8w)\n\n## Link your work\nUsing this library if you build some open database which can help others or just to showcase, please raise an issue or PR.\n\n## Worth to mention\n\n- **[निम्न (NIMN)](https://github.com/nimndata/spec)** : Schema aware object compression. 60% more compressed than JSON. 40% more compressed than msgpack.\n- **[imglab](https://github.com/NaturalIntelligence/imglab)** : Web based tool to label images for object. So that they can be used to train dlib or other object detectors. You can integrate 3rd party libraries for fast labeling.\n- [fast-lorem-ipsum](https://github.com/amitguptagwl/fast-lorem-ipsum) : Generate lorem ipsum words, sentences, paragraph very quickly.\n- [stubmatic](https://github.com/NaturalIntelligence/Stubmatic) : A stub server to mock behaviour of HTTP(s) / REST / SOAP services. You can also mock msgpack, and nimn format in easy way.\n- **[अनुमार्गक (anumargak)](https://github.com/NaturalIntelligence/anumargak)** : Amazinf fast router for node web servers.\n- [fastify-xml-body-parser](https://github.com/NaturalIntelligence/fastify-xml-body-parser/) : Fastify plugin / module to parse XML payload / body into JS object using fast-xml-parser.\n- [Grapes](https://github.com/amitguptagwl/grapes) : Flexible Regular expression engine (for java) which can be applied on char stream. (under development)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADB2:35999:179561:5DED29:6AB92BD8"},"text_sha256":"cca5e4fbdc49a43625ca60005225981cfc0414bab74ce579d0a27f8d398edd8f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2110","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0836:62B94:17C7B26:1BECFD5:6AB92BD9"},"commit":{"sha":"a7a9671f0624c07e4df4673754613300a595423b","url":"https://github.com/NaturalIntelligence/imglab/commit/a7a9671f0624c07e4df4673754613300a595423b","date":"2024-01-01T11:36:07Z","author_date":"2024-01-01T11:36:07Z","committer_date":"2024-01-01T11:36:07Z","tree_sha":"e25e44553197b68900c2d01a10924e1fbea44e21","message_first_line":"remove redirect"},"tree_request_status":200,"tree_rate":{"github_remaining":"2109","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085E:3C4024:180A030:1C2F730:6AB92BDA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5436,"blob_sha":"4c2baf682346e0297bd6a37b5dfb823b2f51c428","priority":0},{"path":"privacy-policy.html","size":1368,"blob_sha":"277becdd1eac1c8819438ada4d4cf0c1ea350777","priority":1}],"documents":[{"path":"README.md","size":5436,"blob_sha":"4c2baf682346e0297bd6a37b5dfb823b2f51c428","priority":0,"status":200,"text":"# [imglab](http://imglab.ml/)\n\n> This project needs maintainers\n\nA web based tool to label images for objects that can be used to train dlib or other object detectors.\n\n[![first-timers-only](http://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](http://www.firsttimersonly.com/)\n[![Bountysource](https://img.shields.io/bountysource/team/imglab/activity.svg)](https://salt.bountysource.com/teams/imglab)\n\n<a href=\"https://opencollective.com/imglab/donate\" target=\"_blank\">\n  <img src=\"https://opencollective.com/imglab/donate/button@2x.png?color=blue\" width=200 />\n<\/a>\n<a href=\"https://www.patreon.com/bePatron?u=9531404\" data-patreon-widget-type=\"become-patron-button\"><img src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" alt=\"Become a Patron!\" width=\"200\" /><\/a>\n<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KQJAX48SPUKNC\"> <img src=\"https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png\" alt=\"Stubmatic donate button\"/><\/a>\n<a href=\"https://liberapay.com/amitgupta/donate\"><img alt=\"Donate using Liberapay\" src=\"https://liberapay.com/assets/widgets/donate.svg\"><\/a>\n\n<div align=\"center\"><img src=\"img/imglab_logo.png\"  width=\"300px\"><\/div>\n\n\n> With most users switching over to the new version of imglab, the legacy version of imglab has been removed.\n\n> If you would like to be a maintainer/collaborator of this project/organization, please let me know. The only condition is that you need to be polite to any user feedback.\n\n# Looking for inters/contributors\n\n## Features\n\nImgLab is platform independent, runs directly from the browser, and has no prerequisites. It requires minimal CPU and memory.\n\n### Auto suggestion\n\n![Auto suggestion](/img/imglab-autosuggestion.gif)\n\n### Plugins\n\n![Plugins](/img/imglab-fpp.gif)\n\n### Different Shapes\n\n![Plugins](/img/imglab-polygon.gif)\n\n### Keyboard Shortcuts:\n\n![Hotkeys](/img/imglab-hotkeys.gif)\n\n### Zoom In/Out:\n\n![Hotkeys](/img/imglab-zoom.gif)\n\n**Other features**:\n\n* Special attention for dlib users. You can easily adjust the order of parts / landmarks / featurepoints.\n* Open-source and free forever.\n* You can draw feature points and shapes (circles, rectangles, polygons). Other shapes like ellipses, lines, curves will be added in the future if there is demand. \n* Small project file so it can be shared over the mail. In [निम्न (Nimn)](http://nimn.in) data format\n* Multiple formats are supported\n  * dlib XML\n  * dlib pts\n  * Pascal VOC\n  * COCO\n  * Tensorflow (in plan)\n  \n**Other quality-of-life features**:\n\n* Drag or resize any annotation shape.\n* Select and delete any annotation shape or landmark points.\n* Arrange landmark points in specific order by dragging their label up & down, instead of creating them in a particular order.\n* Autosave in browser cache. Export to save on disk.\n* Hotkeys support for easy switching between images, tools, labelling data, or to access other parts of the application for added convenience.\n* Set image opacity to highlight annotation shapes and points.\n* Tracking lines and mouse coordinates for precise annotations.\n\nVisit the [Features Documentation](/docs/features.md) for a complete list of the features.\n\n## How to use\n\n* [Importing images](/docs/guide.md/#import)\n\nTo install locally, head to the [Installation Guide](/docs/guide.md/#offline-installation).\n\n### How to use Imglab's features:\n\n* [Auto-suggestions](/docs/guide.md/#auto-suggestion)\n* [Plug-ins](/docs/guide.md/#plugins) (Face++)\n* [Creating shapes](/docs/guide.md/#different-shapes)\n* [Keyboard Shortcuts](/docs/guide.md/#keyboard-shortcuts)\n* [Zooming in/out](/docs/guide.md/#zoom-inout)\n\nCheck the [Demo Video](https://youtu.be/Y-bJo_ylHTw) tutorial/demonstration or the [User Guide](/docs/guide.md) for more details.\n\n## Contributing \n\nPlease read [CONTRIBUTING.md](https://github.com/NaturalIntelligence/imglab/blob/master/.github/First_Time_Contributors.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Built with\n\nThis application is built upon following technology stack.\n\n* [jQuery](https://jquery.com)\n* [Bootstrap](https://getbootstrap.com)\n* [Riot.js](https://github.com/riot/riot) - Simple and elegant component-based UI library\n* [SVG.js](http://svgjs.com)\n\n## Showcase your work\n\nWhile using this library, if you happen to build an open database that can help other users or something you would like to showcase, please raise an issue or PR.\n\n## Worth to mention\n\n- [Stubmatic](https://github.com/NaturalIntelligence/Stubmatic) : Mock web servers and services. Designed specialy for testers and testing. \n- [अनुमार्गक (anumargak)](https://github.com/NaturalIntelligence/anumargak) : Amazing fast router for node web servers.\n- [Cytorus](https://github.com/NaturalIntelligence/cytorus): Now be specific and flexible while running E2E tests.\n    * Run tests only for a particular User Story\n    * Run tests for a route or from a route\n    * Customizable reporting\n    * Central dashboard for better monitoring\n    * Options to integrate E2E tests with Jira, Github etc using Central dashboard Tian.\n\n\n*Note that* All above mentioned projects are free to use and welcome contributors.\n\n## Contributors\n\n<a href=\"https://github.com/NaturalIntelligence/imglab/graphs/contributors\"><img src=\"https://opencollective.com/imglab/contributors.svg?width=890&button=false\" /><\/a>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"479A:3FA0D:17884F:5DDEF0:6AB92BD9"},"text_sha256":"9013005e3cd4839978d7a0b087a624a287004d2f616a3779f394c6515682fcc6"},{"path":"privacy-policy.html","size":1368,"blob_sha":"277becdd1eac1c8819438ada4d4cf0c1ea350777","priority":1,"status":200,"text":"<html>\n    <head><\/head>\n    <body>\n        <h1>Cookie Policy<\/h1>\n        <h2>What are Cookies?<\/h2>\n        <p>\n            A cookie is a small text file which is automatically saved on your computer when you visit our website and is used to help track activity across our website and make your visit easier when you revisit our website. This website uses cookies for the following purposes:\n        <\/p>\n        <h3>Google Analytics<\/h3>\n        <p>Google Analytics is a web analysis service provided by Google LLC (“Google”). Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services.\n        Google may use the Data collected to contextualize and personalize the ads of its own advertising network.<\/p>\n        <p>Personal Data collected: Cookies and Usage Data.<\/p>\n        <p>Place of processing: United States – <a href=\"https://policies.google.com/privacy\">Privacy Policy<\/a> – <a href=\"https://tools.google.com/dlpage/gaoptout?hl=en\">Opt Out<\/a>. Privacy Shield participant.<\/p>\n\n        <h2>Removing cookies<\/h2>\n        <p>If you have any concerns about cookies, or want to remove cookies from your computer, please visit <a href=\"http://www.allaboutcookies.org/\" >All About Cookies<\/a> which explains how to do this.<\/p>\n\n    <\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:1800B3:5E5687:6AB92BDA"},"text_sha256":"70c331b7aaf8d619f73f0fced46d99c5175b56ec79077aee433bcd3482d36e1a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":1,"C6":1,"C7":0,"D1":1,"score":4,"D1_evidence":"sha=a7a9671f0624c07e4df4673754613300a595423b; file=privacy-policy.html; text=Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services. Google may use the Data collected to contextualize and personalize the ads of its own advertising network. Personal Data collected: Cookies and Usage Data. Place of processing: United States – Privacy Policy – Opt Out . Privacy Shield participant.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=a7a9671f0624c07e4df4673754613300a595423b; file=privacy-policy.html; text=Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services. Google may use the Data collected to contextualize and personalize the ads of its own advertising network. Personal Data collected: Cookies and Usage Data. Place of processing: United States – Privacy Policy – Opt Out . Privacy Shield participant.","C2":"sha=a7a9671f0624c07e4df4673754613300a595423b; file=privacy-policy.html; text=Google Analytics is a web analysis service provided by Google LLC (“Google”). Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services. Google may use the Data collected to contextualize and personalize the ads of its own advertising network. Personal Data collected: Cookies and Usage Data. Place of processing: United States – Privacy Policy – Opt Out .","C5":"sha=a7a9671f0624c07e4df4673754613300a595423b; file=privacy-policy.html; text=Privacy Shield participant. Removing cookies If you have any concerns about cookies, or want to remove cookies from your computer, please visit All About Cookies which explains how to do this.","C6":"sha=a7a9671f0624c07e4df4673754613300a595423b; file=privacy-policy.html; text=Google Analytics Google Analytics is a web analysis service provided by Google LLC (“Google”). Google utilizes the Data collected to track and examine the use of this Application, to prepare reports on its activities and share them with other Google services. Google may use the Data collected to contextualize and personalize the ads of its own advertising network. Personal Data collected: Cookies and Usage Data."}}}}
{"repository":"dswah/pyGAM","input_row":{"repository":"dswah/pyGAM","url":"https://github.com/dswah/pyGAM","name":"pyGAM","owner":"dswah","description":"[CONTRIBUTORS WELCOME] Generalized Additive Models in Python","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1017,"issues":328,"created_at":"2017-01-19T03:54:22Z","updated_at":"2026-09-24T15:51:36Z","first_commit_at":"2017-01-19T03:54:22Z","last_commit_at":"2026-01-22T10:08:08Z","activity_months":108.09,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:43.111Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"dswah/pyGAM","visibility":"public","created_at":"2017-01-19T03:54:22Z","updated_at":"2026-09-24T15:51:36Z","private":false,"fork":false,"archived":false,"stargazers_count":1017,"open_issues_count":237,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2108","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:18059B9:1C2A98D:6AB92BDB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2107","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F7:14A1F2:181753C:1C3CD58:6AB92BDB"},"commit":{"sha":"4f1bf1ef3fcd0daa92848245c8eb581da4c5b9b6","url":"https://github.com/dswah/pyGAM/commit/4f1bf1ef3fcd0daa92848245c8eb581da4c5b9b6","date":"2018-05-01T17:34:54Z","author_date":"2018-05-01T17:34:54Z","committer_date":"2018-05-01T17:34:54Z","tree_sha":"cfcc1937dfc740fd13476beee946c687a50d54ef","message_first_line":"use conda forge for scikit-sparse"},"tree_request_status":200,"tree_rate":{"github_remaining":"2106","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:178B055:1BAEBF6:6AB92BDB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16440,"blob_sha":"b457869cc4b1ef66b71ab7978314f5d7f4a3acaa","priority":0}],"documents":[{"path":"README.md","size":16440,"blob_sha":"b457869cc4b1ef66b71ab7978314f5d7f4a3acaa","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/dswah/pyGAM.svg?branch=master)](https://travis-ci.org/dswah/pyGAM)\n[![PyPI version](https://badge.fury.io/py/pygam.svg)](https://badge.fury.io/py/pygam)\n[![codecov](https://codecov.io/gh/dswah/pygam/branch/master/graph/badge.svg)](https://codecov.io/gh/dswah/pygam)\n[![python27](https://img.shields.io/badge/python-2.7-blue.svg)](https://badge.fury.io/py/pygam)\n[![python36](https://img.shields.io/badge/python-3.6-blue.svg)](https://badge.fury.io/py/pygam)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1208723.svg)](https://doi.org/10.5281/zenodo.1208723)\n\n\n# pyGAM\nGeneralized Additive Models in Python.\n\n<!--<img src=imgs/pygam_single.png>-->\n<img src=imgs/pygam_cake_data.png>\n\n## Tutorial\n[pyGAM: Getting started with Generalized Additive Models in Python](https://medium.com/@jpoberhauser/pygam-getting-started-with-generalized-additive-models-in-python-457df5b4705f)\n\n## Installation\n```pip install pygam```\n\n### scikit-sparse\nTo speed up optimization on large models with constraints, it helps to have `scikit-sparse` installed because it contains a slightly faster, sparse version of Cholesky factorization. The import from `scikit-sparse` references `nose`, so you'll need that too.\n\nThe easiest way is to use Conda:  \n```conda install -c conda-forge scikit-sparse```\n\n[scikit-sparse docs](http://pythonhosted.org/scikit-sparse/overview.html#download)\n\n## About\nGeneralized Additive Models (GAMs) are smooth semi-parametric models of the form:\n\n![alt tag](http://latex.codecogs.com/svg.latex?g\\(\\mathbb{E}\\[y|X\\]\\)=\\beta_0+f_1(X_1)+f_2(X_2)+\\dots+f_p(X_p))\n\nwhere `X.T = [X_1, X_2, ..., X_p]` are independent variables, `y` is the dependent variable, and `g()` is the link function that relates our predictor variables to the expected value of the dependent variable.\n\nThe feature functions `f_i()` are built using **penalized B splines**, which allow us to **automatically model non-linear relationships** without having to manually try out many different transformations on each variable.\n\n<img src=imgs/pygam_basis.png>\n\nGAMs extend generalized linear models by allowing non-linear functions of features while maintaining additivity. Since the model is additive, it is easy to examine the effect of each `X_i` on `Y` individually while holding all other predictors constant.\n\nThe result is a very flexible model, where it is easy to incorporate prior knowledge and control overfitting.\n\n\n## Regression\nFor **regression** problems, we can use a **linear GAM** which models:\n\n![alt tag](http://latex.codecogs.com/svg.latex?\\mathbb{E}[y|X]=\\beta_0+f_1(X_1)+f_2(X_2)+\\dots+f_p(X_p))\n\n```python\n# wage dataset\nfrom pygam import LinearGAM\nfrom pygam.utils import generate_X_grid\n\ngam = LinearGAM(n_splines=10).gridsearch(X, y)\nXX = generate_X_grid(gam)\n\nfig, axs = plt.subplots(1, 3)\ntitles = ['year', 'age', 'education']\n\nfor i, ax in enumerate(axs):\n    pdep, confi = gam.partial_dependence(XX, feature=i+1, width=.95)\n\n    ax.plot(XX[:, i], pdep)\n    ax.plot(XX[:, i], confi, c='r', ls='--')\n    ax.set_title(titles[i])\n```\n<img src=imgs/pygam_wage_data_linear.png>\n\nEven though we allowed **n_splines=10** per numerical feature, our **smoothing penalty** reduces us to just 14 **effective degrees of freedom**:\n\n```\ngam.summary()\n\nLinearGAM                                                                                                 \n=============================================== ==========================================================\nDistribution:                        NormalDist Effective DoF:                                      13.532\nLink Function:                     IdentityLink Log Likelihood:                                -24119.2334\nNumber of Samples:                         3000 AIC:                                            48267.5307\n                                                AICc:                                            48267.682\n                                                GCV:                                             1247.0706\n                                                Scale:                                           1236.9495\n                                                Pseudo R-Squared:                                   0.2926\n==========================================================================================================\nFeature Function   Data Type      Num Splines   Spline Order  Linear Fit  Lambda     P > x      Sig. Code\n================== ============== ============= ============= =========== ========== ========== ==========\nfeature 1          numerical      10            3             False       15.8489    1.63e-03   **        \nfeature 2          numerical      10            3             False       15.8489    1.50e-11   ***       \nfeature 3          categorical    5             0             False       15.8489    1.25e-14   ***       \nintercept                                                                            1.11e-16   ***       \n==========================================================================================================\nSignificance codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n```\n\n\nWith **LinearGAMs**, we can also check the **prediction intervals**:\n\n```python\n# mcycle dataset\nfrom pygam import LinearGAM\nfrom pygam.utils import generate_X_grid\n\ngam = LinearGAM().gridsearch(X, y)\nXX = generate_X_grid(gam)\n\nplt.plot(XX, gam.predict(XX), 'r--')\nplt.plot(XX, gam.prediction_intervals(XX, width=.95), color='b', ls='--')\n\nplt.scatter(X, y, facecolor='gray', edgecolors='none')\nplt.title('95% prediction interval')\n```\n<img src=imgs/pygam_mcycle_data_linear.png>\n\nAnd simulate from the posterior:\n\n```python\n# continuing last example with the mcycle dataset\nfor response in gam.sample(X, y, quantity='y', n_draws=50, sample_at_X=XX):\n    plt.scatter(XX, response, alpha=.03, color='k')\nplt.plot(XX, gam.predict(XX), 'r--')\nplt.plot(XX, gam.prediction_intervals(XX, width=.95), color='b', ls='--')\nplt.title('draw samples from the posterior of the coefficients')\n```\n\n<img src=imgs/pygam_mcycle_data_linear_sample_from_posterior.png>\n\n## Classification\nFor **binary classification** problems, we can use a **logistic GAM** which models:\n\n![alt tag](http://latex.codecogs.com/svg.latex?log\\left(\\frac{P(y=1|X)}{P(y=0|X)}\\right)=\\beta_0+f_1(X_1)+f_2(X_2)+\\dots+f_p(X_p))\n\n```python\n# credit default dataset\nfrom pygam import LogisticGAM\nfrom pygam.utils import generate_X_grid\n\ngam = LogisticGAM().gridsearch(X, y)\nXX = generate_X_grid(gam)\n\nfig, axs = plt.subplots(1, 3)\ntitles = ['student', 'balance', 'income']\n\nfor i, ax in enumerate(axs):\n    pdep, confi = gam.partial_dependence(XX, feature=i+1, width=.95)\n\n    ax.plot(XX[:, i], pdep)\n    ax.plot(XX[:, i], confi[0], c='r', ls='--')\n    ax.set_title(titles[i])    \n```\n<img src=imgs/pygam_default_data_logistic.png>\n\nWe can then check the accuracy:\n\n```python\ngam.accuracy(X, y)\n\n0.97389999999999999\n```\n\nSince the **scale** of the **Binomial distribution** is known, our gridsearch minimizes the **Un-Biased Risk Estimator** (UBRE) objective:\n\n```\ngam.summary()\n\nLogisticGAM                                                                                               \n=============================================== ==========================================================\nDistribution:                      BinomialDist Effective DoF:                                      4.3643\nLink Function:                        LogitLink Log Likelihood:                                  -788.7121\nNumber of Samples:                        10000 AIC:                                             1586.1527\n                                                AICc:                                            1586.1595\n                                                UBRE:                                                2.159\n                                                Scale:                                                 1.0\n                                                Pseudo R-Squared:                                   0.4599\n==========================================================================================================\nFeature Function   Data Type      Num Splines   Spline Order  Linear Fit  Lambda     P > x      Sig. Code\n================== ============== ============= ============= =========== ========== ========== ==========\nfeature 1          categorical    2             0             False       1000.0     4.41e-03   **        \nfeature 2          numerical      25            3             False       1000.0     0.00e+00   ***       \nfeature 3          numerical      25            3             False       1000.0     2.35e-02   *         \nintercept                                                                            0.00e+00   ***       \n==========================================================================================================\nSignificance codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n```\n\n\n## Poisson and Histogram Smoothing\nWe can intuitively perform **histogram smoothing** by modeling the counts in each bin\nas being distributed Poisson via **PoissonGAM**.\n\n```python\n# old faithful dataset\nfrom pygam import PoissonGAM\n\ngam = PoissonGAM().gridsearch(X, y)\n\nplt.plot(X, gam.predict(X), color='r')\nplt.title('Lam: {0:.2f}'.format(gam.lam))\n```\n<img src=imgs/pygam_poisson.png>\n\n\n## Custom Models\nIt's also easy to build custom models, by using the base **GAM** class and specifying the **distribution** and the **link function**.\n\n```python\n# cherry tree dataset\nfrom pygam import GAM\n\ngam = GAM(distribution='gamma', link='log', n_splines=4)\ngam.gridsearch(X, y)\n\nplt.scatter(y, gam.predict(X))\nplt.xlabel('true volume')\nplt.ylabel('predicted volume')\n```\n<img src=imgs/pygam_custom.png>\n\nWe can check the quality of the fit by looking at the `Pseudo R-Squared`:\n\n```\ngam.summary()\n\nGAM                                                                                                       \n=============================================== ==========================================================\nDistribution:                         GammaDist Effective DoF:                                      4.1544\nLink Function:                          LogLink Log Likelihood:                                   -66.9372\nNumber of Samples:                           31 AIC:                                              144.1834\n                                                AICc:                                             146.7369\n                                                GCV:                                                0.0095\n                                                Scale:                                              0.0073\n                                                Pseudo R-Squared:                                   0.9767\n==========================================================================================================\nFeature Function   Data Type      Num Splines   Spline Order  Linear Fit  Lambda     P > x      Sig. Code\n================== ============== ============= ============= =========== ========== ========== ==========\nfeature 1          numerical      4             3             False       0.0158     3.42e-12   ***       \nfeature 2          numerical      4             3             False       0.0158     1.29e-09   ***       \nintercept                                                                            7.60e-13   ***       \n==========================================================================================================\nSignificance codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n```\n\n## Penalties / Constraints\nWith GAMs we can encode **prior knowledge** and **control overfitting** by using penalties and constraints.\n\n#### Available penalties:\n- second derivative smoothing (default on numerical features)\n- L2 smoothing (default on categorical features)\n\n#### Availabe constraints:\n- monotonic increasing/decreasing smoothing\n- convex/concave smoothing\n- periodic smoothing [soon...]\n\n\nWe can inject our intuition into our model by using **monotonic** and **concave** constraints:\n\n```python\n# hepatitis dataset\nfrom pygam import LinearGAM\n\ngam1 = LinearGAM(constraints='monotonic_inc').fit(X, y)\ngam2 = LinearGAM(constraints='concave').fit(X, y)\n\nfig, ax = plt.subplots(1, 2)\nax[0].plot(X, y, label='data')\nax[0].plot(X, gam1.predict(X), label='monotonic fit')\nax[0].legend()\n\nax[1].plot(X, y, label='data')\nax[1].plot(X, gam2.predict(X), label='concave fit')\nax[1].legend()\n```\n<img src=imgs/pygam_constraints.png>\n\n## API\npyGAM is intuitive, modular, and adheres to a familiar API:\n\n```python\nfrom pygam import LogisticGAM\n\ngam = LogisticGAM()\ngam.fit(X, y)\n```\n\nSince GAMs are additive, it is also super easy to visualize each individual **feature function**, `f_i(X_i)`. These feature functions describe the effect of each `X_i` on `y` individually while marginalizing out all other predictors:\n\n```python\npdeps = gam.partial_dependence(X)\nplt.plot(pdeps)\n```\n<img src=imgs/pygam_multi_pdep.png>\n\n## Current Features\n### Models\npyGAM comes with many models out-of-the-box:\n\n- GAM (base class for constructing custom models)\n- LinearGAM\n- LogisticGAM\n- GammaGAM\n- PoissonGAM\n- InvGaussGAM\n\nYou can mix and match distributions with link functions to create custom models!\n\n```python\ngam = GAM(distribution='gamma', link='inverse')\n```\n\n### Distributions\n\n- Normal\n- Binomial\n- Gamma\n- Poisson\n- Inverse Gaussian\n\n### Link Functions\nLink functions take the distribution mean to the linear prediction. These are the canonical link functions for the above distributions:\n\n- Identity\n- Logit\n- Inverse\n- Log\n- Inverse-squared\n\n### Callbacks\nCallbacks are performed during each optimization iteration. It's also easy to write your own.\n\n- deviance - model deviance\n- diffs - differences of coefficient norm\n- accuracy - model accuracy for LogisticGAM\n- coef - coefficient logging\n\nYou can check a callback by inspecting:\n\n```python\nplt.plot(gam.logs_['deviance'])\n```\n<img src=imgs/pygam_multi_deviance.png>\n\n### Linear Extrapolation\n<img src=imgs/pygam_mcycle_data_extrapolation.png>\n\n## Citing pyGAM\nPlease consider citing pyGAM if it has helped you in your research or work:\n\nDaniel Servén, & Charlie Brummitt. (2018, March 27). pyGAM: Generalized Additive Models in Python. Zenodo. [DOI: 10.5281/zenodo.1208723](http://doi.org/10.5281/zenodo.1208723)\n\nBibTex:\n```\n@misc{daniel\\_serven\\_2018_1208723,\n  author       = {Daniel Servén and\n                  Charlie Brummitt},\n  title        = {pyGAM: Generalized Additive Models in Python},\n  month        = mar,\n  year         = 2018,\n  doi          = {10.5281/zenodo.1208723},\n  url          = {https://doi.org/10.5281/zenodo.1208723}\n}\n```\n\n## References\n1. Simon N. Wood, 2006  \nGeneralized Additive Models: an introduction with R\n\n0. Hastie, Tibshirani, Friedman  \nThe Elements of Statistical Learning  \nhttp://statweb.stanford.edu/~tibs/ElemStatLearn/printings/ESLII_print10.pdf  \n\n0. James, Witten, Hastie and Tibshirani  \nAn Introduction to Statistical Learning  \nhttp://www-bcf.usc.edu/~gareth/ISL/ISLR%20Sixth%20Printing.pdf  \n\n0. Paul Eilers & Brian Marx, 1996\nFlexible Smoothing with B-splines and Penalties\nhttp://www.stat.washington.edu/courses/stat527/s13/readings/EilersMarx_StatSci_1996.pdf\n\n0. Kim Larsen, 2015  \nGAM: The Predictive Modeling Silver Bullet  \nhttp://multithreaded.stitchfix.com/assets/files/gam.pdf  \n\n0. Deva Ramanan, 2008  \nUCI Machine Learning: Notes on IRLS  \nhttp://www.ics.uci.edu/~dramanan/teaching/ics273a_winter08/homework/irls_notes.pdf  \n\n0. Paul Eilers & Brian Marx, 2015  \nInternational Biometric Society: A Crash Course on P-splines  \nhttp://www.ibschannel2015.nl/project/userfiles/Crash_course_handout.pdf\n\n0. Keiding, Niels, 1991  \nAge-specific incidence and prevalence: a statistical perspective\n\n\n<!---http://www.cs.princeton.edu/courses/archive/fall11/cos323/notes/cos323_f11_lecture09_svd.pdf--->\n\n<!---http://www.stats.uwo.ca/faculty/braun/ss3859/notes/Chapter4/ch4.pdf--->\n\n<!---http://www.stat.berkeley.edu/~census/mlesan.pdf--->\n\n<!---http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/node17.html---> <!--- this helped me get spline gradients--->\n\n<!---https://scikit-sparse.readthedocs.io/en/latest/overview.html#developers--->\n\n<!---https://vincentarelbundock.github.io/Rdatasets/datasets.html---> <!--- R Datasets!--->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1728:3A3DD:1795A4:5DED0F:6AB92BDB"},"text_sha256":"1405d4bc8d44e9b466c5b8f4963a06b581f880534c7e11a0af8d1e89d4591d34"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2105","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BB:180242:17FB833:1C20D73:6AB92BDC"},"commit":{"sha":"b6a48ab5d1ef7df07ce2a34bbe572bca75e83e7d","url":"https://github.com/dswah/pyGAM/commit/b6a48ab5d1ef7df07ce2a34bbe572bca75e83e7d","date":"2026-01-22T10:08:08Z","author_date":"2026-01-22T10:08:08Z","committer_date":"2026-01-22T10:08:08Z","tree_sha":"f88275a739a325b62e1f8fa54ab131c7adf65d52","message_first_line":"[MNT] comment on MKL in index.rst (#421)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2104","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:18176BF:1C3CF07:6AB92BDD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7802,"blob_sha":"3a6c4441481149e9ed23dc9900038fb160cc338f","priority":0}],"documents":[{"path":"README.md","size":7802,"blob_sha":"3a6c4441481149e9ed23dc9900038fb160cc338f","priority":0,"status":200,"text":"\n\n# pyGAM\n\n<a href=\"https://pygam.readthedocs.io/en/latest/?badge=latest\"><img src=imgs/pygam_tensor.png width=\"250\" align=\"right\" /><\/a>\n\nGeneralized Additive Models in Python.\n\n:rocket: **Version 0.12.0 out now!** [See release notes here](https://github.com/dswah/pyGAM/releases).\n\n`pyGAM` is a package for building Generalized Additive Models in Python, with an emphasis on modularity and performance.\n\nThe API is designed for users of `scikit-learn` or `scipy`.\n\n\n|  | **[Documentation](https://pygam.readthedocs.io/en/latest/?badge=latest)** · **[Tutorials](https://pygam.readthedocs.io/en/latest/notebooks/tour_of_pygam.html)** · **[Medium article](https://medium.com/just-another-data-scientist/building-interpretable-models-with-generalized-additive-models-in-python-c4404eaf5515)** |\n|---|---|\n| **Open&#160;Source** | [![Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/dswah/pygam/blob/main/LICENSE) [![GC.OS Sponsored](https://img.shields.io/badge/GC.OS-Sponsored%20Project-orange.svg?style=flat&colorA=0eac92&colorB=2077b4)](https://gc-os-ai.github.io/) |\n| **Community** | [![!discord](https://img.shields.io/static/v1?logo=discord&label=discord&message=chat&color=lightgreen)](https://discord.gg/Rt8By5Jj) [![!slack](https://img.shields.io/static/v1?logo=linkedin&label=LinkedIn&message=news&color=lightblue)](https://www.linkedin.com/company/german-center-for-open-source-ai) |\n| **CI/CD** | [![github-actions](https://img.shields.io/github/actions/workflow/status/dswah/pygam/pypi.yml?logo=github)](https://github.com/dswah/pygam/actions/workflows/pypi.yml) [![readthedocs](https://img.shields.io/readthedocs/pygam?logo=readthedocs)](https://pygam.readthedocs.io/en/latest/?badge=latest) |\n| **Code** |  [![!pypi](https://img.shields.io/pypi/v/pygam?color=orange)](https://pypi.org/project/pygam/) [![!conda](https://img.shields.io/conda/vn/conda-forge/pygam)](https://anaconda.org/conda-forge/pygam) [![!python-versions](https://img.shields.io/pypi/pyversions/pygam)](https://www.python.org/) [![!black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)  |\n| **Downloads** | ![PyPI - Downloads](https://img.shields.io/pypi/dw/pygam) ![PyPI - Downloads](https://img.shields.io/pypi/dm/pygam) [![Downloads](https://static.pepy.tech/personalized-badge/pygam?period=total&units=international_system&left_color=grey&right_color=blue&left_text=cumulative%20(pypi))](https://pepy.tech/project/pygam) |\n| **Citation** | [![!zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.1208723.svg)](https://doi.org/10.5281/zenodo.1208723) |\n\n## Documentation\n- [Official pyGAM Documentation: Read the Docs](https://pygam.readthedocs.io/en/latest/?badge=latest)\n- [Building interpretable models with Generalized additive models in Python](https://medium.com/just-another-data-scientist/building-interpretable-models-with-generalized-additive-models-in-python-c4404eaf5515)\n\n## Installation\n```pip install pygam```\n\n### Acceleration\nMost of pyGAM's computations are linear algebra operations.\n\nTo speed up optimization on large models with constraints, it helps to have [intel MKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html) installed.\n\nIt is currently a bit tricky to install a Numpy linked to the MKL routines with Conda because you have to be careful with which channel you are using. Pip's Numpy-MKL is outdated.\n\nAn alternative is to use a [third-party build](https://urob.github.io/numpy-mkl):\n```\npip install numpy scipy --extra-index-url https://urob.github.io/numpy-mkl\n```\n\n## Contributing - HELP REQUESTED\nContributions are most welcome!\n\nYou can help pyGAM in many ways including:\n\n- Working on a [known bug](https://github.com/dswah/pyGAM/labels/bug).\n- Trying it out and reporting bugs or what was difficult.\n- Helping improve the documentation.\n- Writing new [distributions](https://github.com/dswah/pyGAM/blob/main/pygam/distributions.py), and [link functions](https://github.com/dswah/pyGAM/blob/main/pygam/links.py).\n- If you need some ideas, please take a look at the [issues](https://github.com/dswah/pyGAM/issues).\n\n\nTo start:\n- **fork the project** and cut a new branch\n- **install** `pygam`, editable with developer **dependencies** (in a new python environment)\n\n```\npip install --upgrade pip\npip install -e \".[dev]\"\n```\n\nMake some changes and write a test...\n- **Test** your contribution (eg from the `.../pyGAM`):\n```py.test -s```\n- When you are happy with your changes, make a **pull request** into the `main` branch of the main project.\n\n\n## About\nGeneralized Additive Models (GAMs) are smooth semi-parametric models of the form:\n\n$$g\\left(\\mathbb{E}[y|X]\\right)=\\beta_0+f_1(X_1)+f_2(X_2)+\\dots+f_p(X_p)$$\n\n\nwhere $X = [X_1, X_2, ..., X_p]$ are independent variables, $y$ is the dependent variable, and $g$ is a link function that relates our predictor variables to the expected value of the dependent variable.\n\n\nThe feature functions $f_i$ are built using **penalized B-splines**, which allow us to **automatically model non-linear relationships** without having to manually try out many different transformations on each variable.\n\n<img src=imgs/pygam_basis.png>\n\nGAMs extend generalized linear models by allowing non-linear functions of features while maintaining additivity.\n\nSince GAMs are additive, it is easy to examine the effect of each $X_i$ on $y$ individually while holding all other predictors constant.\n\nAs a result, GAMs are a class of very flexible and interpretable models, which also make it is easy to incorporate prior knowledge and control overfitting.\n\n## Citing pyGAM\nPlease consider citing pyGAM if it has helped you in your research or work:\n\nDaniel Servén, & Charlie Brummitt. (2018, March 27). pyGAM: Generalized Additive Models in Python. Zenodo. [DOI: 10.5281/zenodo.1208723](http://doi.org/10.5281/zenodo.1208723)\n\nBibTex:\n```\n@misc{daniel\\_serven\\_2018_1208723,\n  author       = {Daniel Servén and\n                  Charlie Brummitt},\n  title        = {pyGAM: Generalized Additive Models in Python},\n  month        = mar,\n  year         = 2018,\n  doi          = {10.5281/zenodo.1208723},\n  url          = {https://doi.org/10.5281/zenodo.1208723}\n}\n```\n\n## References\n1. Simon N. Wood, 2006\nGeneralized Additive Models: an introduction with R\n\n0. Hastie, Tibshirani, Friedman\nThe Elements of Statistical Learning\nhttps://www.sas.upenn.edu/~fdiebold/NoHesitations/BookAdvanced.pdf\n\n0. James, Witten, Hastie, Tibshirani, and Taylor\nAn Introduction to Statistical Learning with Applications in Python\nhttps://hastie.su.domains/ISLP/ISLP_website.pdf.download.html\n\n0. Paul Eilers & Brian Marx, 1996\nFlexible Smoothing with B-splines and Penalties\nhttps://sites.stat.washington.edu/courses/stat527/s14/readings/EilersMarx_StatSci_1996.pdf\n\n0. Kim Larsen, 2015\nGAM: The Predictive Modeling Silver Bullet\nhttp://multithreaded.stitchfix.com/assets/files/gam.pdf\n\n0. Paul Eilers, Brian Marx, and Maria Durbán, 2015\nTwenty years of P-splines\nhttps://e-archivo.uc3m.es/rest/api/core/bitstreams/4e23bd9f-c90d-4598-893e-deb0a6bf0728/content\n\n0. Keiding, Niels, 1991\nAge-specific incidence and prevalence: a statistical perspective\nhttps://academic.oup.com/jrsssa/article-abstract/154/3/371/7106499\n\n\n<!---http://www.cs.princeton.edu/courses/archive/fall11/cos323/notes/cos323_f11_lecture09_svd.pdf--->\n\n<!---http://www.stats.uwo.ca/faculty/braun/ss3859/notes/Chapter4/ch4.pdf--->\n\n<!---http://www.stat.berkeley.edu/~census/mlesan.pdf--->\n\n<!---http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/node17.html---> <!--- this helped me get spline gradients--->\n\n<!---https://scikit-sparse.readthedocs.io/en/latest/overview.html#developers--->\n\n<!---https://vincentarelbundock.github.io/Rdatasets/datasets.html---> <!--- R Datasets!--->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9EE:1A3D83:186CD2:5EC500:6AB92BD2"},"text_sha256":"8315828ac3334c9eaff70c016ae6a7fa9e6b6a91c44f04dd6ae15146c02d7268"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"h2oai/sparkling-water","input_row":{"repository":"h2oai/sparkling-water","url":"https://github.com/h2oai/sparkling-water","name":"sparkling-water","owner":"h2oai","description":"Sparkling Water provides H2O functionality inside Spark cluster","language":"Scala","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":982,"issues":3134,"created_at":"2014-10-13T23:06:35Z","updated_at":"2026-09-21T12:21:20Z","first_commit_at":"2014-10-13T23:06:35Z","last_commit_at":"2025-08-20T23:05:21Z","activity_months":130.22,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:45.983Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"h2oai/sparkling-water","visibility":"public","created_at":"2014-10-13T23:06:35Z","updated_at":"2026-09-21T12:21:20Z","private":false,"fork":false,"archived":false,"stargazers_count":982,"open_issues_count":43,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2103","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092B:77994:17F29AF:1C18039:6AB92BDE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2102","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088B:14A1F2:18177B3:1C3D011:6AB92BDE"},"commit":{"sha":"969e4520dad04991b0b6670e6a971860cb6b8808","url":"https://github.com/h2oai/sparkling-water/commit/969e4520dad04991b0b6670e6a971860cb6b8808","date":"2018-05-23T11:45:43Z","author_date":"2018-05-23T11:45:43Z","committer_date":"2018-05-23T11:45:43Z","tree_sha":"8427927f3a55d3bc1d98545439bba1b6bcf202c2","message_first_line":"[SW-849] Update use from maven on sparkling water download page (#722)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2101","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:17B0D58:1BD664A:6AB92BDE"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":12502,"blob_sha":"7b11b86d1714649ea74b1065e3e37de30d0d605a","priority":0}],"documents":[{"path":"README.rst","size":12502,"blob_sha":"7b11b86d1714649ea74b1065e3e37de30d0d605a","priority":0,"status":200,"text":"Sparkling Water\n===============\n\n|Documentation| |Join the chat at https://gitter.im/h2oai/sparkling-water| |image1|\n|image2| |image3| |Powered by H2O.ai|\n\nSparkling Water integrates |H2O|'s fast scalable machine learning engine with Spark. It provides:\n\n- Utilities to publish Spark data structures (RDDs, DataFrames, Datasets) as H2O's frames and vice versa.\n- DSL to use Spark data structures as input for H2O's algorithms.\n- Basic building blocks to create ML applications utilizing Spark and H2O APIs.\n- Python interface enabling use of Sparkling Water directly from PySpark.\n\nGetting Started\n---------------\n\nUser Documentation\n~~~~~~~~~~~~~~~~~~\n\n- `Sparkling Water 2.3.x (for Spark 2.3 users) <http://docs.h2o.ai/sparkling-water/2.3/latest-stable/doc/index.html>`__\n- `Sparkling Water 2.2.x (for Spark 2.2 users) <http://docs.h2o.ai/sparkling-water/2.2/latest-stable/doc/index.html>`__\n- `Sparkling Water 2.1.x (for Spark 2.1 users) <http://docs.h2o.ai/sparkling-water/2.1/latest-stable/doc/index.html>`__\n\nSelect right version\n~~~~~~~~~~~~~~~~~~~~\n\nThe Sparkling Water is developed in multiple parallel branches. Each\nbranch corresponds to a Spark major release (e.g., branch **rel-2.3**\nprovides implementation of Sparkling Water for Spark **2.3**).\n\nPlease, switch to the right branch:\n\n- For Spark 2.3 use branch `rel-2.3 <https://github.com/h2oai/sparkling-water/tree/rel-2.3>`__\n- For Spark 2.2 use branch `rel-2.2 <https://github.com/h2oai/sparkling-water/tree/rel-2.2>`__\n- For Spark 2.1 use branch `rel-2.1 <https://github.com/h2oai/sparkling-water/tree/rel-2.1>`__\n\n   **Note:** The `master <https://github.com/h2oai/sparkling-water/tree/master>`__\n   branch includes the latest changes for the latest Spark version.\n   They are back-ported into older Sparkling Water versions.\n\n.. The Requirements section is copied from doc/requirements.rst as github does not support include directive of\n.. reStructuredText\n\nRequirements\n~~~~~~~~~~~~\n\n-  Linux/OS X/Windows\n-  Java 8+\n-  Python 2.7+ For Python version of Sparkling Water (PySparkling)\n-  `Spark 2.3 <https://spark.apache.org/downloads.html>`__ and ``SPARK_HOME`` shell variable must point to your local Spark installation\n\n\nDownload Binaries\n~~~~~~~~~~~~~~~~~\n\nFor each Sparkling Water you can download binaries here:\n\n- `Sparkling Water - Latest version <http://h2o-release.s3.amazonaws.com/sparkling-water/master/latest.html>`__\n- `Sparkling Water - Latest 2.3 version <http://h2o-release.s3.amazonaws.com/sparkling-water/rel-2.3/latest.html>`__\n- `Sparkling Water - Latest 2.2 version <http://h2o-release.s3.amazonaws.com/sparkling-water/rel-2.2/latest.html>`__\n- `Sparkling Water - Latest 2.1 version <http://h2o-release.s3.amazonaws.com/sparkling-water/rel-2.1/latest.html>`__\n\nMaven\n~~~~~\n\nEach Sparkling Water release is published into Maven central. Published artifacts are provided with the following Scala\nversions:\n\n- Sparkling Water 2.3.x - Scala 2.11\n- Sparkling Water 2.2.x - Scala 2.11\n- Sparkling Water 2.1.x - Scala 2.11\n\nThe artifacts coordinates are:\n\n- ``ai.h2o:sparkling-water-core_{{scala_version}}:{{version}}`` - Includes core of Sparkling Water\n- ``ai.h2o:sparkling-water-examples_{{scala_version}}:{{version}}`` - Includes example applications\n- ``ai.h2o:sparkling-water-repl_{{scala_version}}:{{version}}`` - Spark REPL integration into H2O Flow UI\n- ``ai.h2o:sparkling-water-ml_{{scala_version}}:{{version}}`` - Extends Spark ML package by H2O-based transformations\n- ``ai.h2o:sparkling-water-package_{{scala_version}}:{{version}}`` - Uber Sparkling Water package referencing all available Sparkling Water modules. This is designed to use as Spark package via ``--packages`` option\n\n   **Note:** The ``{{version}}`` references to a release version of Sparkling Water, the ``{{scala_version}}``\n   references to Scala base version (For Sparkling Water 2.3 only ``2.11``). For example:\n   ``ai.h2o:sparkling-water-examples_2.11:2.3.1``\n\nThe full list of published packages is available\n`here <http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22ai.h2o%22%20AND%20a%3Asparkling-water*>`__.\n\n---------------\n\nUse Sparkling Water\n-------------------\n\nSparkling Water is distributed as a Spark application library which can be used by any Spark application.\nFurthermore, we provide also zip distribution which bundles the library and shell scripts.\n\nThere are several ways of using Sparkling Water:\n\n- Sparkling Shell\n- Sparkling Water driver\n- Spark Shell and include Sparkling Water library via ``--jars`` or ``--packages`` option\n- Spark Submit and include Sparkling Water library via ``--jars`` or ``--packages`` option\n- PySpark with PySparkling\n\n\nRun Sparkling shell\n~~~~~~~~~~~~~~~~~~~\n\nThe Sparkling shell encapsulates a regular Spark shell and append Sparkling Water library on the classpath via ``--jars`` option.\nThe Sparkling Shell supports creation of an |H2O| cloud and execution of |H2O| algorithms.\n\n1. Either download or build Sparkling Water\n2. Configure the location of Spark cluster:\n\n   .. code:: bash\n\n      export SPARK_HOME=\"/path/to/spark/installation\"\n      export MASTER=\"local[*]\"\n\n\n   In this case, ``local[*]`` points to an embedded single node cluster.\n\n3. Run Sparkling Shell:\n\n   .. code:: bash\n\n      bin/sparkling-shell\n\n   Sparkling Shell accepts common Spark Shell arguments. For example, to increase memory allocated by each executor, use the ``spark.executor.memory`` parameter: ``bin/sparkling-shell --conf \"spark.executor.memory=4g\"``\n\n4. Initialize H2OContext\n\n   .. code:: scala\n\n      import org.apache.spark.h2o._\n      val hc = H2OContext.getOrCreate(spark)\n\n   ``H2OContext`` starts H2O services on top of Spark cluster and provides primitives for transformations between |H2O| and Spark data structures.\n\n\nUse Sparkling Water with PySpark\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSparkling Water can be also used directly from PySpark and the integration is called PySparkling.\n\nSee `PySparkling README <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/pysparkling.html>`__ to learn about PySparkling.\n\nUse Sparkling Water via Spark Packages\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo see how Sparkling Water can be used as Spark package, please see `Use as Spark Package <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/tutorials/use_as_spark_package.html>`__.\n\nUse Sparkling Water in Windows environments\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSee `Windows Tutorial <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/tutorials/run_on_windows.html>`__ to learn how to use Sparkling Water in Windows environments.\n\nSparkling Water examples\n~~~~~~~~~~~~~~~~~~~~~~~~\nTo see how to run examples for Sparkling Water, please see `Running Examples <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/devel/running_examples.html>`__.\n\n--------------\n\nSparkling Water Backends\n------------------------\n\nSparkling water supports two backend/deployment modes - internal and\nexternal. Sparkling Water applications are independent on the selected\nbackend. The backend can be specified before creation of the\n``H2OContext``.\n\nFor more details regarding the internal or external backend, please see\n`Backends <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/deployment/backends.html>`__.\n\n--------------\n\nFAQ\n---\n\nList of all Frequently Asked Questions is available at `FAQ <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/FAQ.html>`__.\n\n--------------\n\nDevelopment\n-----------\n\nComplete development documentation is available at `Development Documentation <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/devel/devel.html>`__.\n\nBuild Sparkling Water\n~~~~~~~~~~~~~~~~~~~~~\n\nTo see how to build Sparkling Water, please see `Build Sparkling Water <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/devel/build.html>`__.\n\nDevelop applications with Sparkling Water\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAn application using Sparkling Water is regular Spark application which\nbundling Sparkling Water library. See Sparkling Water Droplet providing\nan example application `here <https://github.com/h2oai/h2o-droplets/tree/master/sparkling-water-droplet>`__.\n\nContributing\n~~~~~~~~~~~~\n\nLook at our `list of JIRA\ntasks <https://0xdata.atlassian.net/issues/?filter=13600>`__ for new\ncontributors or send your idea to support@h2o.ai.\n\nFiling Bug Reports and Feature Requests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can file a bug report of feature request directly in the Sparkling Water JIRA page at `http://jira.h2o.ai/ <https://0xdata.atlassian.net/projects/SW/issues>`__.\n\n1. Log in to the Sparkling Water JIRA tracking system. (Create an account if necessary.)\n\n2. Once inside the home page, click the **Create** button.\n\n   .. figure:: /doc/src/site/sphinx/images/jira_create.png\n      :alt: center\n\n3. A form will display allowing you to enter information about the bug or feature request.\n\n   .. figure:: /doc/src/site/sphinx/images/jira_new_issue.png\n      :alt: center\n\n   Enter the following on the form:\n\n   - Select the Project that you want to file the issue under. For example, if this is an open source public bug, you should file it under **SW (SW)**.\n   - Specify the Issue Type. For example, if you believe you've found a bug, then select **Bug**, or if you want to request a new feature, then select **New Feature**.\n   - Provide a short but concise summary about the issue. The summary will be shown when engineers organize, filter, and search for Jira tickets.\n   - Specify the urgency of the issue using the Priority dropdown menu.\n   - If there is a due date specify it with the Due Date.\n   - The Components drop down refers to the API or language that the issue relates to. (See the drop down menu for available options.)\n   - You can leave Affects Version/s, Fix Version\\s, and Assignee fields blank. Our engineering team will fill this in.\n   - Add a detailed description of your bug in the Description section. Best practice for descriptions include:\n\n   - A summary of what the issue is\n   - What you think is causing the issue\n   - Reproducible code that can be run end to end without requiring an engineer to edit your code. Use {code} {code} around your code to make it appear in code format.\n   - Any scripts or necessary documents. Add by dragging and dropping your files into the create issue dialogue box.\n\n   You can be able to leave the rest of the ticket blank.\n\n4. When you are done with your ticket, simply click on the **Create** button at the bottom of the page.\n\n   .. figure:: /doc/src/site/sphinx/images/jira_finished_create.png\n      :alt: center\n\nAfter you click **Create**, a pop up will appear on the right side of your screen with a link to your Jira ticket. It will have the form `https://0xdata.atlassian.net/browse/SW-####`. You can use this link to later edit your ticket.\n\nPlease note that your Jira ticket number along with its summary will appear in one of the Jira ticket slack channels, and anytime you update the ticket anyone associated with that ticket, whether as the assignee or a watcher will receive an email with your changes.\n\nHave Questions?\n~~~~~~~~~~~~~~~\n\nWe also respond to questions tagged with sparkling-water and h2o tags on the `Stack Overflow <https://stackoverflow.com/questions/tagged/sparkling-water>`__.\n\nChange Logs\n~~~~~~~~~~~\n\nChange logs are available at `Change Logs <http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/CHANGELOG.html>`__.\n\n---------------\n\n.. |Documentation| image:: https://media.readthedocs.org/static/projects/badges/passing.svg\n   :target: http://docs.h2o.ai/sparkling-water/master/bleeding-edge/doc/index.html\n.. |Join the chat at https://gitter.im/h2oai/sparkling-water| image:: https://badges.gitter.im/Join%20Chat.svg\n   :target: https://gitter.im/h2oai/sparkling-water?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. |image1| image:: https://travis-ci.org/h2oai/sparkling-water.svg?branch=master\n   :target: https://travis-ci.org/h2oai/sparkling-water\n.. |image2| image:: https://maven-badges.herokuapp.com/maven-central/ai.h2o/sparkling-water-core_2.11/badge.svg\n   :target: http://search.maven.org/#search%7Cgav%7C1%7Cg:%22ai.h2o%22%20AND%20a:%22sparkling-water-core_2.11%22\n.. |image3| image:: https://img.shields.io/badge/License-Apache%202-blue.svg\n   :target: LICENSE\n.. |Powered by H2O.ai| image:: https://img.shields.io/badge/powered%20by-h2oai-yellow.svg\n   :target: https://github.com/h2oai/\n.. |H2O| replace:: H\\ :sub:`2`\\ O\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9F1A:3E1DA:179D28:5DF4FC:6AB92BD5"},"text_sha256":"d22ea1686b3816b3041e971392af4d5050ea5f95fd001fdfeabebbad36ca0207"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2100","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:180CE1D:1C32947:6AB92BDF"},"commit":{"sha":"1fc2265322f5ff1575890c75df384119ff55aa98","url":"https://github.com/h2oai/sparkling-water/commit/1fc2265322f5ff1575890c75df384119ff55aa98","date":"2025-08-20T23:05:21Z","author_date":"2025-08-20T23:05:21Z","committer_date":"2025-08-20T23:05:21Z","tree_sha":"1af5d6eccecdd79a0c7f45de6738fb53bebe3e68","message_first_line":"fix(build): quick fix of JMH leak that was propagated via H2O-3 (#5757)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2099","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17D61A0:1BFB9A5:6AB92BE0"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":9227,"blob_sha":"d02bb405167ab76d9c9e41588814e2df4848d422","priority":0}],"documents":[{"path":"README.rst","size":9227,"blob_sha":"d02bb405167ab76d9c9e41588814e2df4848d422","priority":0,"status":200,"text":"Sparkling Water\n===============\n\n|mvn-badge| |apache-2-0-license| |Powered by H2O.ai|\n\n\nSparkling Water integrates `H2O-3 <https://github.com/h2oai/h2o-3/>`__, a fast scalable machine learning engine with `Apache Spark <https://spark.apache.org/>`__. It provides:\n\n- Utilities to publish Spark data structures (RDDs, DataFrames, Datasets) as H2O-3's frames and vice versa.\n- DSL to use Spark data structures as input for H2O's algorithms.\n- Basic building blocks to create ML applications utilizing Spark and H2O APIs.\n- Python interface enabling use of Sparkling Water directly from PySpark.\n\nGetting Started\n---------------\n\nUser Documentation\n~~~~~~~~~~~~~~~~~~\n\n`Read the documentation for Spark 3.5 <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/index.html>`__ (or\n`3.4 <http://docs.h2o.ai/sparkling-water/3.4/latest-stable/doc/index.html>`__ ,\n`3.3 <http://docs.h2o.ai/sparkling-water/3.3/latest-stable/doc/index.html>`__ ,\n`3.2 <http://docs.h2o.ai/sparkling-water/3.2/latest-stable/doc/index.html>`__ ,\n`3.1 <http://docs.h2o.ai/sparkling-water/3.1/latest-stable/doc/index.html>`__,\n`3.0 <http://docs.h2o.ai/sparkling-water/3.0/latest-stable/doc/index.html>`__,\n`2.4 <http://docs.h2o.ai/sparkling-water/2.4/latest-stable/doc/index.html>`__,\n`2.3 <http://docs.h2o.ai/sparkling-water/2.3/latest-stable/doc/index.html>`__)\n\nDownload Binaries\n~~~~~~~~~~~~~~~~~\n\n`Download the latest version for Spark 3.5 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.5/latest.html>`__ (or\n`3.4 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.4/latest.html>`__,\n`3.3 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.3/latest.html>`__,\n`3.2 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.2/latest.html>`__,\n`3.1 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.1/latest.html>`__,\n`3.0 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-3.0/latest.html>`__,\n`2.4 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-2.4/latest.html>`__,\n`2.3 <http://h2o-release.s3.amazonaws.com/sparkling-water/spark-2.3/latest.html>`__)\n\nEach Sparkling Water release is also published into the Maven Central (more details below).\n\n---------------\n\nTry Sparkling Water!\n--------------------\n\nSparkling Water is distributed as a Spark application library which can be used by any Spark application.\nFurthermore, we provide also zip distribution which bundles the library and shell scripts.\n\nThere are several ways of using Sparkling Water:\n\n- Sparkling Shell (Spark Shell with Sparkling Water included)\n- Sparkling Water driver (Spark Submit with Sparkling Water included)\n- Spark Shell and include Sparkling Water library via ``--jars`` or ``--packages`` option\n- Spark Submit and include Sparkling Water library via ``--jars`` or ``--packages`` option\n- PySpark with PySparkling\n\n\nRun Sparkling shell\n~~~~~~~~~~~~~~~~~~~\n\nThe Sparkling shell encapsulates a regular Spark shell and append Sparkling Water library on the classpath via ``--jars`` option.\nThe Sparkling Shell supports creation of an H2O-3 cloud and execution of H2O-3 algorithms.\n\n1. Either download or build Sparkling Water\n2. Configure the location of Spark cluster:\n\n   .. code:: bash\n\n      export SPARK_HOME=\"/path/to/spark/installation\"\n      export MASTER=\"local[*]\"\n\n\n   In this case, ``local[*]`` points to an embedded single node cluster.\n\n3. Run Sparkling Shell:\n\n   .. code:: bash\n\n      bin/sparkling-shell\n\n   Sparkling Shell accepts common Spark Shell arguments. For example, to increase memory allocated by each executor, use the ``spark.executor.memory`` parameter: ``bin/sparkling-shell --conf \"spark.executor.memory=4g\"``\n\n4. Initialize H2OContext\n\n   .. code:: scala\n\n      import ai.h2o.sparkling._\n      val hc = H2OContext.getOrCreate()\n\n   ``H2OContext`` starts H2O services on top of Spark cluster and provides primitives for transformations between H2O-3 and Spark data structures.\n\n\nUse Sparkling Water with PySpark\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSparkling Water can be also used directly from PySpark and the integration is called PySparkling.\n\nSee `PySparkling README <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/pysparkling.html>`__ to learn about PySparkling.\n\nUse Sparkling Water via Spark Packages\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo see how Sparkling Water can be used as Spark package, please see `Use as Spark Package <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/tutorials/use_as_spark_package.html>`__.\n\nUse Sparkling Water in Windows environments\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSee `Windows Tutorial <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/tutorials/run_on_windows.html>`__ to learn how to use Sparkling Water in Windows environments.\n\nSparkling Water examples\n~~~~~~~~~~~~~~~~~~~~~~~~\nTo see how to run examples for Sparkling Water, please see `Running Examples <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/devel/running_examples.html>`__.\n\nMaven packages\n~~~~~~~~~~~~~~\n\nEach Sparkling Water release is published into Maven central with following coordinates:\n\n- ``ai.h2o:sparkling-water-core_{{scala_version}}:{{version}}`` - Includes core of Sparkling Water\n- ``ai.h2o:sparkling-water-examples_{{scala_version}}:{{version}}`` - Includes example applications\n- ``ai.h2o:sparkling-water-repl_{{scala_version}}:{{version}}`` - Spark REPL integration into H2O Flow UI\n- ``ai.h2o:sparkling-water-ml_{{scala_version}}:{{version}}`` - Extends Spark ML package by H2O-based transformations\n- ``ai.h2o:sparkling-water-scoring_{{scala_version}}:{{version}}`` - A library containing scoring logic and definition of Sparkling Water MOJO models.\n- ``ai.h2o:sparkling-water-scoring-package_{{scala_version}}:{{version}}`` - Lightweight Sparkling Water package including all dependencies required just for scoring with H2O-3 and DAI MOJO models.\n- ``ai.h2o:sparkling-water-package_{{scala_version}}:{{version}}`` - Sparkling Water package containing all dependencies required for model training and scoring. This is designed to use as Spark package via ``--packages`` option.\n\n   **Note:** The ``{{version}}`` references to a release version of Sparkling Water, the ``{{scala_version}}``\n   references to Scala base version.\n\nThe full list of published packages is available\n`here <http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22ai.h2o%22%20AND%20a%3Asparkling-water*>`__.\n\n--------------\n\nSparkling Water Backends\n------------------------\n\nSparkling water supports two backend/deployment modes - internal and\nexternal. Sparkling Water applications are independent on the selected\nbackend. The backend can be specified before creation of the\n``H2OContext``.\n\nFor more details regarding the internal or external backend, please see\n`Backends <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/deployment/backends.html>`__.\n\n--------------\n\nFAQ\n---\n\nList of all Frequently Asked Questions is available at `FAQ <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/FAQ.html>`__.\n\n--------------\n\nDevelopment\n-----------\n\nComplete development documentation is available at `Development Documentation <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/devel/devel.html>`__.\n\nBuild Sparkling Water\n~~~~~~~~~~~~~~~~~~~~~\n\nTo see how to build Sparkling Water, please see `Build Sparkling Water <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/devel/build.html>`__.\n\nDevelop applications with Sparkling Water\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAn application using Sparkling Water is regular Spark application which\nbundling Sparkling Water library. See Sparkling Water Droplet providing\nan example application `here <https://github.com/h2oai/h2o-droplets/tree/master/sparkling-water-droplet>`__.\n\nContributing\n~~~~~~~~~~~~\n\nJust drop us a PR!\nFor inspiration look at our `list of issues <https://github.com/h2oai/sparkling-water/issues/new/choose>`__, feel free to create one.\n\nFiling Bug Reports and Feature Requests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can file a bug report of feature request directly in Github Issues `Github Issues <https://github.com/h2oai/sparkling-water/issues/new/choose>`__.\n\nHave Questions?\n~~~~~~~~~~~~~~~\n\nWe also respond to questions tagged with sparkling-water and h2o tags on the `Stack Overflow <https://stackoverflow.com/questions/tagged/sparkling-water>`__.\n\nChange Logs\n~~~~~~~~~~~\n\nChange logs are available at `Change Logs <http://docs.h2o.ai/sparkling-water/3.5/latest-stable/doc/CHANGELOG.html>`__.\n\n---------------\n\n.. |Join the chat at https://gitter.im/h2oai/sparkling-water| image:: https://badges.gitter.im/Join%20Chat.svg\n   :target: https://gitter.im/h2oai/sparkling-water?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. |mvn-badge| image:: https://maven-badges.herokuapp.com/maven-central/ai.h2o/sparkling-water-core_2.12/badge.svg\n   :target: http://search.maven.org/#search%7Cgav%7C1%7Cg:%22ai.h2o%22%20AND%20a:%22sparkling-water-core_2.12%22\n.. |apache-2-0-license| image:: https://img.shields.io/badge/License-Apache%202-blue.svg\n   :target: LICENSE\n.. |Powered by H2O.ai| image:: https://img.shields.io/badge/powered%20by-h2oai-yellow.svg\n   :target: https://github.com/h2oai/\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B4B8:29FD16:184219:5E99D5:6AB92BDF"},"text_sha256":"737687c9d17dbe67af53cd2581ac7f4e24a0234af3e49b821f7080658847b56a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"libxsmm/libxsmm","input_row":{"repository":"libxsmm/libxsmm","url":"https://github.com/libxsmm/libxsmm","name":"libxsmm","owner":"libxsmm","description":"Library for specialized dense and sparse matrix operations, and deep learning primitives.","language":"C","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":978,"issues":369,"created_at":"2014-09-23T15:20:20Z","updated_at":"2026-09-27T11:19:43Z","first_commit_at":"2014-04-04T07:02:57Z","last_commit_at":"2026-09-26T05:43:59Z","activity_months":149.74000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:49.617Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"libxsmm/libxsmm","visibility":"public","created_at":"2014-09-23T15:20:20Z","updated_at":"2026-09-27T11:19:43Z","private":false,"fork":false,"archived":false,"stargazers_count":978,"open_issues_count":16,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2098","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:D8FCBD:FF004D:6AB92BE1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2097","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CB:156040:17D9C5C:1BFEA04:6AB92BE2"},"commit":{"sha":"77a9cf11c588ce906b1ae963411a7a70e759f055","url":"https://github.com/libxsmm/libxsmm/commit/77a9cf11c588ce906b1ae963411a7a70e759f055","date":"2018-05-24T06:36:44Z","author_date":"2018-05-24T06:36:44Z","committer_date":"2018-05-24T06:36:44Z","tree_sha":"a98d5c3881ce45bd44c4f582cfdb5efbe3c052fb","message_first_line":"Merge branch 'master' of ssh://git-ger-6.devtools.intel.com:29418/il_ssg_libxsmm-libxsmm"},"tree_request_status":200,"tree_rate":{"github_remaining":"2096","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:17F2D91:1C18489:6AB92BE2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":31339,"blob_sha":"5cc57737f3fcc2425cb910dd78efc637e0f68c04","priority":0}],"documents":[{"path":"README.md","size":31339,"blob_sha":"5cc57737f3fcc2425cb910dd78efc637e0f68c04","priority":0,"status":200,"text":"# LIBXSMM\n\n[![License](https://img.shields.io/badge/license-BSD3-blue.svg)](LICENSE.md) [![Travis CI](https://travis-ci.org/hfp/libxsmm.svg?branch=master \"Master branch build status\")](https://github.com/hfp/libxsmm/wiki/Status) [![ReadtheDocs](https://readthedocs.org/projects/libxsmm/badge/?version=latest \"Read the Docs\")](https://libxsmm.readthedocs.io/)\n\nLIBXSMM is a library for small dense and small sparse matrix-matrix multiplications as well as for deep learning primitives such as small convolutions targeting Intel Architecture. Small matrix multiplication kernels are generated for the following instruction set extensions: Intel&#160;SSE, Intel&#160;AVX, Intel&#160;AVX2, IMCI (KNCni) for Intel&#160;Xeon&#160;Phi coprocessors (\"KNC\"), and Intel&#160;AVX&#8209;512 as found in the Intel&#160;Xeon&#160;Phi processor family&#160;(Knights Landing \"KNL\", Knights Mill \"KNM\") and Intel&#160;Xeon processors (Skylake-SP \"SKX\"). Historically small matrix multiplications were only optimized for the Intel&#160;Many Integrated Core Architecture \"MIC\") using intrinsic functions, meanwhile optimized assembly code is targeting all afore mentioned instruction set extensions (static code generation), and Just&#8209;In&#8209;Time (JIT) code generation is targeting Intel&#160;SSE3, Intel&#160;AVX and beyond. Optimized code for small convolutions is JIT-generated for Intel&#160;AVX2 and Intel&#160;AVX&#8209;512.\n\n**Where to go for documentation?**\n\n* **ReadtheDocs**: [main](https://libxsmm.readthedocs.io/) and [sample](https://libxsmm.readthedocs.io/libxsmm_samples/) documentation with full text search.\n* **PDF**: [main](https://github.com/hfp/libxsmm/raw/master/documentation/libxsmm.pdf) documentation file, and separate [sample](https://github.com/hfp/libxsmm/raw/master/documentation/libxsmm_samples.pdf) documentation.\n\n**<a name=\"what-is-a-small-matrix-multiplication\"><\/a>What is a small matrix multiplication?** When characterizing the problem-size using the M, N, and K parameters, a problem-size suitable for LIBXSMM falls approximately within *(M&#160;N&#160;K)<sup>1/3<\/sup>&#160;&lt;=&#160;128* (which illustrates that non-square matrices or even \"tall and skinny\" shapes are covered as well). The library is typically used to generate code up to the specified [threshold](documentation/libxsmm_tune.md#auto-dispatch). Raising the threshold may not only generate excessive amounts of code (due to unrolling in M or K dimension), but also miss to implement a tiling scheme to effectively utilize the cache hierarchy. For auto-dispatched problem-sizes above the configurable threshold (explicitly JIT'ted code is **not** subject to the threshold), LIBXSMM is falling back to BLAS. In terms of GEMM, the supported kernels are limited to *Alpha := 1*, *Beta := \\{ 1, 0 \\}*, *TransA := 'N'*, and *TransB = 'N'*.\n\n**<a name=\"what-is-a-small-convolution\"><\/a>What is a small convolution?** In the last years, new workloads such as deep learning and more specifically convolutional neural networks (CNN) emerged, and are pushing the limits of today's hardware. One of the expensive kernels is a small convolution with certain kernel sizes such that calculations in the frequency space is not the most efficient method when compared with direct convolutions. LIBXSMM's current support for convolutions aims for an easy to use invocation of small (direct) convolutions, which are intended for CNN training and classification.\n\nFor more questions and answers, please have a look at [https://github.com/hfp/libxsmm/wiki/Q&A](https://github.com/hfp/libxsmm/wiki/Q&A).\n\nDocumented functionality and available domains:\n\n* MM: [Matrix Multiplication](#matrix-multiplication)\n* DNN: [Deep Neural Networks](#deep-neural-networks)\n* AUX: [Service Functions](#service-functions)\n* PERF: [Performance](#performance)\n* BE: [Backend](#jit-backend)\n\nFor additional functionality, please have a look at [https://github.com/hfp/libxsmm/tree/master/include](https://github.com/hfp/libxsmm/tree/master/include).\n\n## Build Instructions\n\n### Overview\n\nThe main interface file is *generated*, and it is therefore **not** stored in the code repository. Instead, one may have a look at the code generation template files for [C/C++](https://github.com/hfp/libxsmm/blob/master/src/template/libxsmm.h#L36) and [FORTRAN](https://github.com/hfp/libxsmm/blob/master/src/template/libxsmm.f#L32). The main interface consists of the [general interface](#general-interface) as well as the [matrix multiplication](#matrix-multiplication) interface.\n\nThere are two ways to incorporate LIBXSMM into an application:\n\n* [Classic Library (ABI)](#classic-library-abi) and [Link Instructions](#link-instructions)\n* [Header-Only](#header-only)\n\n### Classic Library (ABI)\n\nThe build system relies on GNU&#160;Make (typically associated with the `make` command, but e.g. FreeBSD is calling it `gmake`). The build can be customized by using key&#8209;value pairs. Key&#8209;value pairs can be supplied in two ways: (1)&#160;after the \"make\" command, or (2)&#160;prior to the \"make\" command (`env`) which is effectively the same as exporting the key&#8209;value pair as an environment variable (`export`, or `setenv`). Both methods can be mixed, however the second method may require the `-e` flag. Please note that the CXX, CC, and FC keys are considered in any case.\n\nThe build system considers a set of given key-value pairs as a single unique build, and triggers a rebuild for a distinct set of flags. For more advanced builds or additional background, please consult the section about [Customization](documentation/libxsmm_tune.md). To generate the interface of the library inside of the 'include' directory and to build the static library (by default, STATIC=1 is activated). Run any or both of the following commands:\n\n```bash\nmake STATIC=0\nmake\n```\n\nOn CRAY systems, the CRAY Compiling Environment (CCE) should be used regardless of using the CRAY compiler, the Intel Compiler, or the GNU&#160;Compiler Collection (GCC). The CCE is eventually suppressing to build shared libraries (STATIC=0). In any case, (1)&#160;switch to the desired compiler (module load/switch), and (2)&#160;rely on:\n\n```bash\nmake CXX=CC CC=cc FC=ftn\n```\n\nA variety of build environments is out-of-the-box compatible, see [https://github.com/hfp/libxsmm/wiki/Compatibility](https://github.com/hfp/libxsmm/wiki/Compatibility). If the build process is not successful, it may help to avoid advanced GCC flags. This is useful with a tool chain, which pretends to be GCC-compatible (or is treated as such) but fails to consume the afore mentioned flags:\n\n```bash\nmake COMPATIBLE=1\n```\n\nTo test and validate a build, please consult [https://github.com/hfp/libxsmm/wiki/Validation](https://github.com/hfp/libxsmm/wiki/Validation). To run some basic sanity checks, remember that each set of given key-value pairs represents a different build (and test):\n\n```bash\nmake STATIC=0 tests\n```\n\nTo remove intermediate files, or to remove all generated files and folders (including the interface and the library archives), run one of the following commands:\n\n```bash\nmake clean\nmake realclean\n```\n\n**NOTE**: By default, C/C++ and FORTRAN compilers are needed (some sample code is written in C++). Beside of specifying the compilers (`make CXX=g++ CC=gcc FC=gfortran` and maybe `AR=ar`), the need for a FORTRAN compiler can be relaxed (`make FC=` or `make FORTRAN=0`). The latter affects the availability of the MODule file and the corresponding 'libxsmmf' library (the interface 'libxsmm.f' is still generated). FORTRAN code can make use of LIBXSMM in three ways:\n\n* By relying on the module file, and by linking against 'libxsmmf', 'libxsmm', and (optionally) 'libxsmmext',\n* By including the interface 'libxsmm.f' and linking against 'libxsmm', and (optionally) 'libxsmmext', or\n* By optionally declaring a SUBROUTINE, or by simply calling a SUBROUTINE (FORTRAN&#160;77).\n\nA FORTRAN&#160;77 interface is implicitly available and documented in 'libxsmm.f' (comments). It can be useful to have a look at the [implementation of the FORTRAN&#160;77 interface](https://github.com/hfp/libxsmm/search?q=implementation+provided+for+Fortran+77+compatibility).\n\n### Link Instructions\n\nThe library is agnostic with respect to the threading-runtime, and therefore an application is free to use any threading runtime (e.g., OpenMP). The library is also thread-safe, and multiple application threads can call LIBXSMM's routines concurrently. Enabling OpenMP for LIBXSMM's main library is supported as well (OMP=1), and mostly affects the synchronization primitives used inside of the library. All of the \"omp\" functionality (function postfix) is served by the 'libxsmmext' library, which is automatically built with OpenMP enabled. When using this \"omp\" functionality, 'libxsmmext' needs to be present at the link line.\n\nSimilarly, an application is free to choose any BLAS or LAPACK library (if the link model available on the OS supports this), and therefore linking GEMM routines when linking LIBXSMM itself (by supplying BLAS=1&#124;2) may prevent a user from making this decision at the time of linking the actual application. To use LIBXSMM without GEMM-related functionality, any BLAS-dependency can be removed in two ways: (1)&#160;building a special library with `make BLAS=0`, or (2)&#160;linking the application against the 'libxsmmnoblas' library. If an application however uses BLAS already, the [Call Wrapper](documentation/libxsmm_mm.md#call-wrapper) can be used to intercept existing BLAS calls (and to rely on LIBXSMM instead).\n\n**NOTE**: LIBXSMM does not support to dynamically link 'libxsmm' or 'libxsmmext' (\"so\"), when BLAS is linked statically (\"a\"). If BLAS is linked statically, the static version of LIBXSMM must be used!\n\n### Header-Only\n\nVersion&#160;1.4.4 introduced support for \"header-only\" usage in C and C++. By only including 'libxsmm_source.h' allows to get around building the library. However, this gives up on a clearly defined application binary interface (ABI). An ABI may allow for hot-fixes after deploying an application (when relying on the shared library form), and it may also ensure to only rely on the public interface of LIBXSMM. In contrast, the header-only form not only exposes the internal implementation of LIBXSMM but it can also reduce the turnaround time during development of an application (due to longer compilation times). The header file is intentionally named \"libxsmm_**source**.h\" since this header file relies on the [src](https://github.com/hfp/libxsmm/tree/master/src) directory (with the implications as noted earlier).\n\nTo use the header-only form, 'libxsmm_source.h' needs to be *generated*. The build target shown below ('header-only') has been introduced in LIBXSMM&#160;1.6.2, but `make cheader` can be used alternatively (or must be used instead in case of earlier versions). Generating the C interface is necessary since the library must be configured (see [configuration](https://github.com/hfp/libxsmm/blob/master/src/template/libxsmm_config.h) template).\n\n```bash\nmake header-only\n```\n\n**NOTE**: building an application applies the same build settings to LIBXSMM! For instance, to omit debug code inside of LIBXSMM `NDEBUG` must be defined (`-DNDEBUG`).\n\n### Installation\n\nInstalling LIBXSMM makes possibly the most sense when combining the JIT backend ([enabled by default](documentation/libxsmm_be.md)) with a collection of statically generated SSE kernels (by specifying M, N, K, or MNK). If the JIT backend is not disabled, statically generated kernels are only registered for dispatch if the CPUID flags at runtime are not supporting a more specific instruction set extension (code path). Since the JIT backend does not support or generate SSE code by itself, the library is compiled by selecting SSE code generation if not specified otherwise (AVX=1&#124;2&#124;3, or with SSE=0 falling back to an \"arch-native\" approach). Limiting the static code path to SSE4.2 allows to practically target any deployed system, however using SSE=0 and AVX=0 together is falling back to generic code, and any static kernels are not specialized using the assembly code generator.\n\nThere are two main mechanisms to install LIBXSMM (both mechanisms can be combined): (1)&#160;building the library in an out&#8209;of&#8209;tree fashion, and (2)&#160;installing into a certain location. Building in an out&#8209;of&#8209;tree fashion looks like:\n\n```bash\ncd libxsmm-install\nmake -f /path/to/libxsmm/Makefile\n```\n\nFor example, installing into a specific location (incl. a selection of statically generated Intel&#160;SSE kernels) looks like:\n\n```bash\nmake MNK=\"1 2 3 4 5\" PREFIX=/path/to/libxsmm-install install\n```\n\nPerforming `make install-minimal` omits the documentation (default: 'PREFIX/share/libxsmm'). Moreover, PINCDIR, POUTDIR, PBINDIR, and PDOCDIR allow to customize the locations underneath of the PREFIX location. To build a general package for an unpredictable audience (Linux distribution, or similar), it is advised to not over-specify or customize the build step i.e., JIT, SSE, AVX, OMP, BLAS, etc. should not be used. The following is building and installing a complete set of libraries where the generated interface matches both the static and the shared libraries:\n\n```bash\nmake PREFIX=/path/to/libxsmm-install STATIC=0 install\nmake PREFIX=/path/to/libxsmm-install install\n```\n\n## Interfaces\n\n### General Interface\n\nTo initialize the dispatch-table or other internal resources, an explicit initialization routine helps to avoid lazy initialization overhead when calling LIBXSMM for the first time. The library deallocates internal resources at program exit, but also provides a companion to the afore mentioned initialization (finalize).\n\n```C\n/** Initialize the library; pay for setup cost at a specific point. */\nvoid libxsmm_init(void);\n/** De-initialize the library and free internal memory (optional). */\nvoid libxsmm_finalize(void);\n```\n\n### Matrix Multiplication<a name=\"interface-for-matrix-multiplication\"><\/a>\n\nThis domain (MM) supports Small Matrix Multiplications (SMM), batches of multiple multiplications as well as the industry-standard interface for GEneral Matrix Matrix multiplication (GEMM).\n\nThe [Matrix Multiplication domain (MM)](documentation/libxsmm_mm.md) contains routines for:\n\n* [Small, tiled, and parallelized matrix multiplications](documentation/libxsmm_mm.md#overview)\n* [Manual code dispatch (customized matrix batches)](documentation/libxsmm_mm.md#manual-code-dispatch)\n* [Batched multiplication (explicit interface)](documentation/libxsmm_mm.md#batched-multiplication)\n* [Call wrapper (static and dynamic linkage)](documentation/libxsmm_mm.md#call-wrapper)\n\n### Deep Learning<a name=\"interface-for-convolutions\"><\/a>\n\nThis domain (DL) is detailed by a separate [document](documentation/libxsmm_dl.md). Please also note on how to [Get Started with TensorFlow&trade; using LIBXSMM](documentation/tensorflow.md).\n\n### Service Functions\n\nFor convenient operation of the library and to ease integration, some service routines are available. These routines may not belong to the core functionality of LIBXSMM (SMM or DNN domain), but users are encouraged to use this domain (AUX). There are two categories: (1)&#160;routines which are available for C and Fortran, and (2)&#160;routines that are only available per C interface.\n\nThe [service function domain (AUX)](documentation/libxsmm_aux.md) contains routines for:\n\n* [Getting and setting the target architecture](documentation/libxsmm_aux.md#getting-and-setting-the-target-architecture)\n* [Getting and setting the verbosity](documentation/libxsmm_aux.md#getting-and-setting-the-verbosity)\n* [Measuring time durations (timer)](documentation/libxsmm_aux.md#timer-facility)\n* [Loading and storing data (I/O)](documentation/libxsmm_aux.md#meta-image-file-io)\n* [Allocating memory](documentation/libxsmm_aux.md#memory-allocation)\n\n### Backend<a name=\"jit-backend\"><\/a>\n\nMore information about the JIT-backend and the code generator can be found in a separate [document](documentation/libxsmm_be.md), which also includes information about LIBXSMM's stand-alone <a name=\"generator-driver\"><\/a>[generator-driver](documentation/libxsmm_be.md#generator-driver) programs.\n\n## Runtime Control<a name=\"running\"><\/a>\n\n### Verbose Mode\n\nThe [verbose mode](documentation/libxsmm_aux.md#getting-and-setting-the-verbosity) (level of verbosity) allows for an insight into the code dispatch mechanism by receiving a small tabulated statistic as soon as the library terminates. The design point for this functionality is to not impact the performance of any critical code path i.e., verbose mode is always enabled and does not require symbols (SYM=1) or debug code (DBG=1). The statistics appears (`stderr`) when the environment variable LIBXSMM_VERBOSE is set to a non-zero value. For example:\n\n```bash\nLIBXSMM_VERBOSE=1 ./myapplication\n[... application output]\n\nHSW/SP      TRY    JIT    STA    COL\n   0..13      0      0      0      0\n  14..23      0      0      0      0\n 24..128      3      3      0      0\n```\n\nThe tables are distinct between single-precision and double-precision, but either table is pruned if all counters are zero. If both tables are pruned, the library shows the code path which would have been used for JIT'ting the code: `LIBXSMM_TARGET=hsw` (otherwise the code path is shown in the table's header). The actual counters are collected for three buckets: small kernels (MNK<sup>1/3<\/sup>&#160;&lt;=&#160;13), medium-sized kernels (13&#160;&lt;&#160;MNK<sup>1/3<\/sup>&#160;&lt;=&#160;23), and larger kernels (23&#160;&lt;&#160;MNK<sup>1/3<\/sup>&#160;&lt;=&#160;128; the actual upper bound depends on LIBXSMM_MAX_MNK as selected at compile-time). Keep in mind, that \"larger\" is supposedly still small in terms of arithmetic intensity (which grows linearly with the kernel size). Unfortunately, the arithmetic intensity depends on the way a kernel is used (which operands are loaded/stored into main memory) and it is not performance-neutral to collect this information.\n\nThe TRY counter represents all attempts to register statically generated kernels, and all attempts to dynamically generate and register kernels. The TRY counter includes rejected JIT requests due to unsupported GEMM arguments. The JIT and STA counters distinct the successful cases of the afore mentioned event (TRY) into dynamically (JIT) and statically (STA) generated code. In case the capacity (O(*n*)&#160;=&#160;10<sup>5<\/sup>) of the code registry is exhausted, no more kernels can be registered although further attempts are not prevented. Registering many kernels (O(*n*)&#160;=&#160;10<sup>3<\/sup>) may ramp the number of hash key collisions (COL), which can degrade performance. The latter is prevented if the small thread-local cache is utilized effectively.\n\nSince explicitly JIT-generated code (`libxsmm_?mmdispatch`) does not fall under the THRESHOLD criterion, the above table is extended by one line if large kernels have been requested. This indicates a missing threshold-criterion (customized dispatch), or asks for cache-blocking the matrix multiplication. The latter is already implemented by LIBXSMM's \"medium-sized\" GEMM routines (`libxsmm_?gemm_omp`), which perform a tiled multiplication. Setting a verbosity level of at least two summarizes the number of registered JIT-generated kernels, which includes the total size and counters for GEMM, MCOPY (matrix copy), and TCOPY (matrix transpose) kernels.\n\n```bash\nRegistry: 20 MB (gemm=0 mcopy=14 tcopy=0)\n```\n\nIf the call-wrapper is used, an additional runtime statistic becomes available (see [Call Wrapper](documentation/libxsmm_mm.md#call-wrapper)).\n\n**NOTE**: Setting LIBXSMM_VERBOSE to a negative value will binary-dump each generated JIT kernel to a file with each file being named like the function name shown in [Intel&#160;VTune](documentation/libxsmm_prof.md#intelvtuneamplifier). Disassembly of the raw binary files can be accomplished by:\n\n```bash\nobjdump -D -b binary -m i386 -M x86-64 [JIT-dump-file]\n```\n\n### Call Trace\n\nDuring the initial steps of employing the LIBXSMM API, one may rely on a debug version of the library (`make DBG=1`). The latter also implies console output (`stderr`) in case of an error/warning condition inside of the library. It is also possible to print the execution flow (call trace) inside of LIBXSMM (can be combined with DBG=1 or OPT=0):\n\n```bash\nmake TRACE=1\n```\n\nBuilding an application which traces calls (inside of the library) requires the shared library of LIBXSMM, alternatively the application is required to link the static library of LIBXSMM in a dynamic fashion (GNU tool chain: `-rdynamic`). Tracing calls (without debugger) can be then accomplished by an environment variable called LIBXSMM_TRACE.\n\n```bash\nLIBXSMM_TRACE=1 ./myapplication\n```\n\nSyntactically up to three arguments separated by commas (which allows to omit arguments) are taken (*tid*,*i*,*n*): *tid* signifies the ID of the thread to be traced with 1...NTHREADS being valid and where LIBXSMM_TRACE=1 is filtering for the \"main thread\" (in fact the first thread running into the trace facility); grabbing all threads (no filter) can be achieved by supplying a negative id (which is also the default when omitted). The second argument is pruning higher levels of the call-tree with *i=1* being the default (level zero is the highest at the same level as the main function). The last argument is taking the number of inclusive call levels with *n=-1* being the default (signifying no filter).\n\nAlthough the `ltrace` (Linux utility) provides similar insight, the trace facility might be useful due to the afore mentioned filtering expressions. Please note that the trace facility is severely impacting the performance (even with LIBXSMM_TRACE=0), and this is not just because of console output but rather since inlining (internal) functions might be prevented along with additional call overhead on each function entry and exit. Therefore, debug symbols can be also enabled separately (`make SYM=1`; implied by TRACE=1 or DBG=1) which might be useful when profiling an application.\n\n## Performance\n\n<a name=\"profiling\"><\/a>Profiling an application, which uses LIBXSMM's JIT-code is well-supported. The library supports Intel&#160;VTune&#160;Amplifier and Linux&#160;perf. Details are given on how to include profiler support, and how to run the application.\n\n* [Profiling using Intel&#160;VTune&#160;Amplifier](documentation/libxsmm_prof.md#intelvtuneamplifier)\n* [Profiling using Linux&#160;perf](documentation/libxsmm_prof.md#linuxperf)\n\n<a name=\"tuning\"><\/a>At build time, a variety of options exist to customize LIBXSMM. The library is setup for a broad range of use cases, which include sophisticated defaults for general use.\n\n* [Customizing performance](documentation/libxsmm_tune.md#tuning)\n* <a name=\"auto-dispatch\"><\/a>[Tuning auto-dispatch](documentation/libxsmm_tune.md#auto-dispatch)\n\n<a name=\"results\"><\/a>To find performance results of applications or performance reproducers, the repository provides an orphaned branch called \"results\" which collects collateral material such as measured performance results along with explanatory figures. The results can be found at [https://github.com/hfp/libxsmm/tree/results#libxsmm-results](https://github.com/hfp/libxsmm/tree/results#libxsmm-results), or the results can be cloned as shown below.\n\n```bash\ngit clone --branch results \\\n  https://github.com/hfp/libxsmm.git \\\n  libxsmm-results\n```\n\nPlease note that comparing performance results depends on whether the operands of the matrix multiplication are streamed or not. For example, multiplying with all matrices covered by the L1 cache may have an emphasis towards an implementation which perhaps performs worse for the real workload (if this real workload needs to stream some or all matrices from the main memory). Most of the [code samples](https://github.com/hfp/libxsmm/tree/master/samples) are aimed to reproduce performance results, and it is encouraged to model the exact case or to look at real [applications](#applications).\n\n## Applications\n\n### High Performance Computing (HPC)\n\n**\\[1]&#160;[https://cp2k.org/](https://cp2k.org/)**: Open Source Molecular Dynamics with its DBCSR component processing batches of small matrix multiplications (\"matrix stacks\") out of a problem-specific distributed block-sparse matrix. Starting with [CP2K 3.0](https://www.cp2k.org/version_history), LIBXSMM can be used to substitute CP2K's 'libsmm' library. Prior to CP2K 3.0, only the [Intel-branch of CP2K](https://github.com/cp2k/cp2k/tree/intel) integrated LIBXSMM (see [https://github.com/hfp/libxsmm/raw/master/documentation/cp2k.pdf](https://github.com/hfp/libxsmm/raw/master/documentation/cp2k.pdf)).\n\n**\\[2]&#160;[https://github.com/SeisSol/SeisSol/](https://github.com/SeisSol/SeisSol/)**: SeisSol is one of the leading codes for earthquake scenarios, for simulating dynamic rupture processes. LIBXSMM provides highly optimized assembly kernels which form the computational back-bone of SeisSol (see [https://github.com/TUM-I5/seissol_kernels/](https://github.com/TUM-I5/seissol_kernels/).\n\n**\\[3]&#160;[https://github.com/NekBox/NekBox](https://github.com/NekBox/NekBox)**: NekBox is a highly scalable and portable spectral element code, which is inspired by the [Nek5000](https://nek5000.mcs.anl.gov/) code. NekBox is specialized for box geometries, and intended to prototype new methods as well as to leverage FORTRAN beyond the FORTRAN&#160;77 standard. LIBXSMM can be used to substitute the [MXM_STD](https://github.com/Nek5000/NekBox/blob/box/mxm_std.F90) code. Please also note LIBXSMM's [NekBox reproducer](https://github.com/hfp/libxsmm/tree/master/samples/nek#nek-sample-collection).\n\n**\\[4]&#160;[https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000)**: Nek5000 is the open-source, highly-scalable, always-portable spectral element code from [https://nek5000.mcs.anl.gov/](https://nek5000.mcs.anl.gov/). The development branch of the Nek5000 code [incorporates](https://github.com/Nek5000/Nek5000/blob/develop/core/mxm_wrapper.f) LIBXSMM.\n\n**\\[5]&#160;[http://pyfr.org/](http://pyfr.org/)**: PyFR is an open-source Python based framework for solving advection-diffusion type problems on streaming architectures using the flux reconstruction approach. PyFR&#160;1.6.0 optionally [incorporates LIBXSMM](http://pyfr.org/user_guide.php) as a matrix multiplication provider for the OpenMP backend. Please also note LIBXSMM's [PyFR-related code sample](https://github.com/hfp/libxsmm/tree/master/samples/pyfr).\n\n**\\[6]&#160;[http://dial3343.org/about/](http://dial3343.org/about/)**: The Extreme-scale Discontinuous Galerkin Environment (EDGE) is a solver for hyperbolic partial differential equations with emphasis on seismic simulations. EDGE optionally uses LIBXSMM, but highly recommends the library due to severe performance-limitations of the vanilla kernels.\n\n### Machine Learning (ML)\n\n**\\[7]&#160;[https://github.com/baidu-research/DeepBench](https://github.com/baidu-research/DeepBench#deepbench)**: The primary purpose of DeepBench is to benchmark operations that are important to deep learning on different hardware platforms. LIBXSMM's DNN primitives have been [incorporated into DeepBench](https://github.com/baidu-research/DeepBench/tree/master/code/intel/convolution/libxsmm_conv) to demonstrate an increased performance of deep learning on Intel hardware. In addition, LIBXSMM's [DNN sample folder](https://github.com/hfp/libxsmm/tree/master/samples/dnn) contains scripts to run convolutions extracted from popular benchmarks in a stand-alone fashion.\n\n**\\[8]&#160;[https://www.tensorflow.org/](https://tensorflow.org/)**: TensorFlow&trade; is an open source software library for numerical computation using data flow graphs. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team for the purposes of conducting machine learning and deep neural networks research. LIBXSMM can be [used](documentation/tensorflow.md#tensorflow-with-libxsmm) to increase the performance of TensorFlow on Intel hardware.\n\n**\\[9]&#160;[https://github.com/IntelLabs/SkimCaffe](https://github.com/IntelLabs/SkimCaffe#skimcaffe-specific-description)**: SkimCaffe from Intel Labs is a Caffe branch for training of sparse CNNs, which provide 80-95% sparsity in convolutions and fully-connected layers. LIBXSMM's SPMDM domain (SParseMatrix-DenseMatrix multiplication) evolved from SkimCaffe, and since then LIBXSMM implements the sparse operations in SkimCaffe.\n\n### Automated Driving (AD)\n\n**\\[10]&#160;[https://software.seek.intel.com/accelerating-eigen-math-library](https://software.seek.intel.com/accelerating-eigen-math-library)**: Accelerating The Eigen Math Library for Automated Driving Workloads: The Need for Speed in Kalman Filtering. An article in [Issue&#160;31](https://software.intel.com/sites/default/files/managed/4f/73/parallel-universe-issue-31.pdf) of The Parallel Universe magazine.\n\n## References\n\n**\\[1]&#160;[http://sc17.supercomputing.org/SC17%20Archive/tech_poster/tech_poster_pages/post190.html](http://sc17.supercomputing.org/SC17%20Archive/tech_poster/tech_poster_pages/post190.html)**: Understanding the Performance of Small Convolution Operations for CNN on Intel Architecture ([poster](http://sc17.supercomputing.org/SC17%20Archive/tech_poster/poster_files/post190s2-file2.pdf) and [abstract](http://sc17.supercomputing.org/SC17%20Archive/tech_poster/poster_files/post190s2-file3.pdf)), SC’17: The International Conference for High Performance Computing, Networking, Storage and Analysis, Denver (Colorado).\n\n**\\[2]&#160;[https://software.intel.com/en-us/articles/intel-xeon-phi-delivers-competitive-performance-for-deep-learning-and-getting-better-fast](https://software.intel.com/en-us/articles/intel-xeon-phi-delivers-competitive-performance-for-deep-learning-and-getting-better-fast)**: Intel Xeon&#160;Phi Delivers Competitive Performance For Deep Learning - And Getting Better Fast. Article mentioning LIBXSMM's performance of convolution kernels with [DeepBench](https://github.com/baidu-research/DeepBench/tree/master/code/intel/convolution/libxsmm_conv). Intel Corporation, 2016.\n\n**\\[3]&#160;[http://sc16.supercomputing.org/presentation/?id=pap364&sess=sess153](http://sc16.supercomputing.org/presentation/?id=pap364&sess=sess153)**: LIBXSMM: Accelerating Small Matrix Multiplications by Runtime Code Generation ([paper](http://www.computer.org/csdl/proceedings/sc/2016/8815/00/8815a981.pdf)). SC'16: The International Conference for High Performance Computing, Networking, Storage and Analysis, Salt Lake City (Utah).\n\n**\\[4]&#160;[http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/tech_poster_pages/post137.html](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/tech_poster_pages/post137.html)**: LIBXSMM: A High Performance Library for Small Matrix Multiplications ([poster](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/poster_files/post137s2-file2.pdf) and [abstract](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/poster_files/post137s2-file3.pdf)). SC'15: The International Conference for High Performance Computing, Networking, Storage and Analysis, Austin (Texas).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E92:A58F2:1761CE:5DBA3D:6AB92BE2"},"text_sha256":"687c4feb091b4b0f4dc967437ce6e56f88679545c2a2b7e46d0b97ebddcca00c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2095","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AF:A9DC0:17C5E47:1BEB2F8:6AB92BE3"},"commit":{"sha":"5ce29626ddad947f0d5c433ce78c58ff64dfbbdb","url":"https://github.com/libxsmm/libxsmm/commit/5ce29626ddad947f0d5c433ce78c58ff64dfbbdb","date":"2026-06-30T04:18:39Z","author_date":"2026-06-30T03:39:03Z","committer_date":"2026-06-30T04:18:39Z","tree_sha":"39d30ca6730abb9d3a621f01650c55d1c53462ff","message_first_line":"Version 2.0.0 (#1064)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2094","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D8FE7D:FF023A:6AB92BE3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":45656,"blob_sha":"7d4ff5ab134e4a42adfcf640dd8a6a49cf100021","priority":0},{"path":"SECURITY.md","size":407,"blob_sha":"6143e2263eec577c9cd6095b1dfc6b2a25c0b0b4","priority":1}],"documents":[{"path":"README.md","size":45656,"blob_sha":"7d4ff5ab134e4a42adfcf640dd8a6a49cf100021","priority":0,"status":200,"text":"# LIBXSMM\n\n[![BSD 3-Clause License](https://img.shields.io/badge/license-BSD3-blue.svg \"BSD 3-Clause License\")](LICENSE.md) [![GCC Build Status](https://badge.buildkite.com/2e962d4cfc7ddb10a6cd6c27b0d8033edf179a799e156cb363.svg?branch=main \"GCC Build Status\")](https://github.com/libxsmm/libxsmm/wiki/Status) [![Clang Build Status](https://badge.buildkite.com/dafe7b363a2e66f7d5c9087f074f3eceb69b9aae4278202fd7.svg?branch=main \"Clang Build Status\")](https://github.com/libxsmm/libxsmm/wiki/Status) [![Intel Build Status](https://badge.buildkite.com/63b5dc4095f460f1c011ae782f8e67ec0b8a6a9732d8abe3c7.svg?branch=main \"Intel Build Status\")](https://github.com/libxsmm/libxsmm/wiki/Status) [![Mixed Build Status](https://badge.buildkite.com/fad67b2fcad79e07ddfe9141974f360e9eca6223cd89e3593f.svg?branch=main \"Mixed Build Status\")](https://github.com/libxsmm/libxsmm/wiki/Status) [![Static Analysis Status](https://scan.coverity.com/projects/7405/badge.svg \"Static Analysis Status\")](https://scan.coverity.com/projects/hfp-libxsmm) [![Read the Docs](https://readthedocs.org/projects/libxsmm/badge/?version=latest \"Read the Docs\")](https://libxsmm.readthedocs.io/)\n\nLIBXSMM is high performance library for small dense and sparse linear algebra opertions incl. GEMM and elementwise primities often seen in deep learning applications. It also serves as reference implementation of Tensor Processing Primitives ([TPP](https://arxiv.org/pdf/2104.05755)), a programming abstraction for efficient and portable deep learning and HPC workloads. With <span>version&#160;2.0<\/span>, LIBXSMM focuses on providing a complete and architecture-portable set of TPPs (small dense and sparse matrix operations as well as element-wise, GEMM, and BRGEMM primitives) from which higher-level operators such as convolutions, fully-connected layers, normalization, and pooling are composed. LIBXSMM targets <span>Intel&#160;Architecture<\/span> with <span>Intel&#160;SSE<\/span>, <span>Intel&#160;AVX<\/span>, <span>Intel&#160;AVX2<\/span>, <span>Intel&#160;AVX&#8209;512<\/span> (with VNNI and Bfloat16), and <span>Intel&#160;AMX<\/span> (Advanced Matrix Extensions), <span>AArch64<\/span> (NEON, SVE, and SME), and <span>RISC&#8209;V<\/span> (RVV). Code generation is mainly based on <span>Just&#8209;In&#8209;Time (JIT)<\/span> code specialization for compiler-independent performance (matrix multiplications, matrix transpose/copy, sparse functionality, and tensor primitives). LIBXSMM is suitable for \"build once and deploy everywhere\", i.e., no special target flags are needed to exploit the available performance. Supported GEMM datatypes are: `FP64`, `FP32`, `FP16`, `bfloat16`, `BF8`, `HF8`, `MXBF8`, `MXHF8`, `int16`, `int8`, `MXBF6`, `MXHF6`, `MXFP4`, `int4`, `int2` and `int1`. Additionally, various non-standard low precision combinations are supported.\n\n**LIBXSMM 2.0**: This major release repositions LIBXSMM as the reference implementation of Tensor Processing Primitives. To keep the core library focused, several application-specific pieces that previously shipped here have moved to dedicated companion repositories: the deep-learning operators and convolution drivers ([LIBXSMM-DNN](https://github.com/libxsmm/libxsmm-dnn)), the PyTorch integration ([TPP PyTorch Extension](https://github.com/libxsmm/tpp-pytorch-extension)), and the spectral-element reproducers (e.g. NekBox). The core library, the JIT backend, and the TPP frontend remain here.\n\nFor a list questions and answers, please also have a look at [https://github.com/libxsmm/libxsmm/wiki/Q&A](https://github.com/libxsmm/libxsmm/wiki/Q&A).\n\n<a name=\"getting-started\"><\/a><a name=\"hello-libxsmm\"><\/a>**Getting Started**: The following C code may be considered as [Hello LIBXSMM](https://github.com/libxsmm/libxsmm/tree/main/samples/hello). It walks through the Tensor Processing Primitives: dispatch a GEMM kernel and three element-wise (unary, binary, ternary) kernels, then invoke them. Build the example with `cd /path/to/libxsmm; make STATIC=0` (shared library), save the code under `hello.c` (below) and compile with `gcc -I/path/to/libxsmm/include hello.c -L/path/to/libxsmm/lib -lxsmm -lm -o hello`, and finally execute with `LD_LIBRARY_PATH=/path/to/libxsmm/lib LIBXSMM_VERBOSE=2 ./hello`.\n\n```c\n#include <libxsmm.h>\n#include <string.h>\n\nint main(int argc, char* argv[]) {\n  const libxsmm_blasint m = 13, n = 5, k = 7;\n  float a[13*7], b[7*5], c[13*5], bias[13*5], tmp[13*5], out[13*5];\n  libxsmm_blasint i;\n\n  /* GEMM TPP: C = A * B (column-major, all FP32) */\n  const libxsmm_gemm_shape gshape = libxsmm_create_gemm_shape(m, n, k, m, k, m,\n    LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32);\n  libxsmm_gemmfunction gemm = libxsmm_dispatch_gemm(gshape,\n    LIBXSMM_GEMM_FLAG_NONE, LIBXSMM_GEMM_PREFETCH_NONE);\n  /* unary TPP: ReLU; binary TPP: bias add; ternary TPP: fused multiply-add */\n  const libxsmm_meltw_unary_shape ushape = libxsmm_create_meltw_unary_shape(m, n, m, m,\n    LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32);\n  libxsmm_meltwfunction_unary relu = libxsmm_dispatch_meltw_unary(\n    LIBXSMM_MELTW_TYPE_UNARY_RELU, ushape, LIBXSMM_MELTW_FLAG_UNARY_NONE);\n  const libxsmm_meltw_binary_shape bshape = libxsmm_create_meltw_binary_shape(m, n, m, m, m,\n    LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32);\n  libxsmm_meltwfunction_binary add = libxsmm_dispatch_meltw_binary(\n    LIBXSMM_MELTW_TYPE_BINARY_ADD, bshape, LIBXSMM_MELTW_FLAG_BINARY_NONE);\n  const libxsmm_meltw_ternary_shape tshape = libxsmm_create_meltw_ternary_shape(m, n, m, m, m, m,\n    LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE_F32);\n  libxsmm_meltwfunction_ternary fma = libxsmm_dispatch_meltw_ternary(\n    LIBXSMM_MELTW_TYPE_TERNARY_MULADD, tshape, LIBXSMM_MELTW_FLAG_TERNARY_NONE);\n\n  libxsmm_gemm_param gp; libxsmm_meltw_unary_param up;\n  libxsmm_meltw_binary_param bp; libxsmm_meltw_ternary_param tp;\n  for (i = 0; i < m*k; ++i) a[i] = 1.f / (i + 1);\n  for (i = 0; i < k*n; ++i) b[i] = 2.f / (i + 1);\n  for (i = 0; i < m*n; ++i) bias[i] = 0.5f;\n\n  memset(&gp, 0, sizeof(gp)); gp.a.primary = a; gp.b.primary = b; gp.c.primary = c; gemm(&gp);\n  memset(&up, 0, sizeof(up)); up.in.primary = c; up.out.primary = c; relu(&up);\n  memset(&bp, 0, sizeof(bp)); bp.in0.primary = c; bp.in1.primary = bias; bp.out.primary = tmp; add(&bp);\n  memset(&tp, 0, sizeof(tp)); tp.in0.primary = tmp; tp.in1.primary = c; tp.in2.primary = bias; tp.out.primary = out; fma(&tp);\n  return 0;\n}\n```\n\nPlain [C code](https://github.com/libxsmm/libxsmm/blob/main/samples/hello/hello.c) as well as [Fortran code](https://github.com/libxsmm/libxsmm/blob/main/samples/hello/hello.f) resemble the same [example](https://github.com/libxsmm/libxsmm/tree/main/samples/hello). More complete drivers are available under [samples/xgemm](https://github.com/libxsmm/libxsmm/tree/main/samples/xgemm) and [samples/eltwise](https://github.com/libxsmm/libxsmm/tree/main/samples/eltwise).\n\n<a name=\"what-is-a-small-matrix-multiplication\"><\/a>**What is a small matrix multiplication?** When characterizing the problem-size by using the M, N, and K parameters, a problem-size suitable for LIBXSMM falls approximately within <i>(M&#160;N&#160;K)<sup>1/3<\/sup>&#160;&lt;=&#160;64<\/i> (which illustrates that non-square matrices or even \"tall and skinny\" shapes are covered as well). The library does not employ multiplevel K,M,N blocking. Using LIBXSMM for much larger sizes may generate excessive amounts of code (due to unrolling in M or K dimension), but also misses to implement a tiling scheme to effectively utilize the cache hierarchy. In terms of GEMM, the supported kernels are limited to *Alpha := 1*, *Beta := \\{ 1, 0 \\}*, and *TransA := 'N'*.\n\n## Interfaces and Domains<a name=\"interfaces\"><\/a>\n\n### Overview<a name=\"general-interface\"><\/a>\n\nPlease have a look at [https://github.com/libxsmm/libxsmm/tree/main/include](https://github.com/libxsmm/libxsmm/tree/main/include) for all published functions. Get started with the following list of available domains and documented functionality:\n\n* TPP: [Tensor Processing Primitives](https://github.com/libxsmm/libxsmm/blob/main/documentation/libxsmm_tpp.md)\n* MM: [Matrix Multiplication](#matrix-multiplication)\n* DL: [Deep Learning](#interface-for-dl)\n* AUX: [Service Functions](#service-functions)\n* PERF: [Performance](#performance)\n* BE: [Backend](#jit-backend)\n\nTo initialize library internal resources, an explicit initialization routine helps to avoid lazy initialization overhead when calling LIBXSMM for the first time. The library deallocates internal resources at program exit, but also provides a companion of the afore mentioned initialization (finalize).\n\n```C\n/** Initialize the library; pay for setup cost at a specific point. */\nvoid libxsmm_init(void);\n/** De-initialize the library and free internal memory (optional). */\nvoid libxsmm_finalize(void);\n```\n\n### Matrix Multiplication<a name=\"interface-for-matrix-multiplication\"><\/a>\n\nThis domain (MM) supports Small Matrix Multiplications (SMM), batches of multiple multiplications as well as the industry-standard interface for GEneral Matrix Matrix multiplication (GEMM).\n\nThe [Matrix Multiplication domain (MM)](documentation/libxsmm_mm.md) contains routines for:\n\n* [Small, tiled, and parallelized matrix multiplications](documentation/libxsmm_mm.md#overview)\n* [Manual code dispatch (customized matrix batches)](documentation/libxsmm_mm.md#manual-code-dispatch)\n\n### Deep Learning<a name=\"interface-for-dl\"><\/a>\n\nCommon operators in deep learning applications (GEMM with activation function fusion, Convolutions with activation function fusion, various norming operators, and pooling operators, etc.) can be implemented using the Tensor Processing Primitives provided by LIBXSMM. With LIBXSMM&#160;2.0 the deep-learning operators and their performance drivers live in the companion repository [LIBXSMM-DNN](https://github.com/libxsmm/libxsmm-dnn/tree/main/tests), which demonstrates how these primitives compose into full operators without any platform-specific code.\n\n### Service Functions\n\nFor convenient operation of the library and to ease integration, some service routines are available. These routines may not belong to the core functionality of LIBXSMM (SMM or DNN domain), but users are encouraged to use this domain (AUX). There are two categories: <span>(1)&#160;routines<\/span> which are available for C and FORTRAN, and <span>(2)&#160;routines<\/span> that are only available per C interface.\n\nThe [service function domain (AUX)](documentation/libxsmm_aux.md) contains routines for:\n\n* [Getting and setting the target architecture](documentation/libxsmm_aux.md#getting-and-setting-the-target-architecture)\n* [Getting and setting the verbosity](documentation/libxsmm_aux.md#getting-and-setting-the-verbosity)\n* [Measuring time durations (timer)](documentation/libxsmm_aux.md#timer-facility)\n* [Dispatching user-data and multiple kernels](documentation/libxsmm_aux.md#user-data-dispatch)\n* [Allocating memory](documentation/libxsmm_aux.md#memory-allocation)\n\n### Backend<a name=\"jit-backend\"><\/a>\n\nMore information about the JIT-backend and the code generator can be found in a separate [document](documentation/libxsmm_be.md). The [encoder sample collection](https://github.com/libxsmm/libxsmm/tree/main/samples/encoder) can help to get started writing a kernel using LIBXSMM. Please note, LIBXSMM's stand-alone <a name=\"generator-driver\"><\/a>[generator-driver](documentation/libxsmm_be.md#generator-driver) is considered legacy (deprecated).\n\n## Build Instructions\n\n### Overview\n\nThe main interface file is *generated*, and it is therefore **not** stored in the code repository. To inspect the interface for [C/C++](https://github.com/libxsmm/libxsmm/blob/main/src/template/libxsmm.h) and [FORTRAN](https://github.com/libxsmm/libxsmm/blob/main/src/template/libxsmm.f), one can take a look at the template files used to generate the actual interface. There are two general ways to build and use LIBXSMM:\n\n* [Classic Library (ABI)](#classic-library-abi) and [Link Instructions](#link-instructions) (C/C++ and FORTRAN)\n* [Header-Only](#header-only) (C and C++)\n\n**Note**: LIBXSMM is available as prebuilt package for Fedora/RedHat/CentOS, Debian/Ubuntu, FreeBSD, and others. Further, LIBXSMM can be installed with the [Spack Package Manager](https://computing.llnl.gov/projects/spack-hpc-package-manager) or per [EasyBuild+EasyConfig](https://github.com/easybuilders).\n\n### Classic Library (ABI)\n\nLIBXSMM provides native GNU Make and CMake build systems for the classic library ABI. GNU Make remains the reference build path and exposes the full set of build-time customization options and legacy sample targets. CMake supports the core library, optional Fortran module interface, generator executables, installation, and CMake package integration. Projects using another build system can also write their own [rules for building LIBXSMM](#rules-for-building-libxsmm).\n\nThe Makefile based build system relies on <span>GNU&#160;Make<\/span> (typically associated with the `make` command, but e.g. FreeBSD is calling it `gmake`). The build can be customized by using <span>key&#8209;value<\/span> pairs. <span>Key&#8209;value<\/span> pairs can be supplied in two ways: <span>(1)&#160;after<\/span> the \"make\" command, or <span>(2)&#160;prior<\/span> to the \"make\" command (`env`) which is effectively the same as exporting the <span>key&#8209;value<\/span> pair as an environment variable (`export`, or `setenv`). Both methods can be mixed (the second method may require make's `-e` flag).\n\n<a name=\"zero-config-abi\"><\/a>In contrast to [header-only](#zero-config) which does not require configuration by default, 3rd-party build systems can compile and link LIBXSMM's sources but still avoid configuring the library (per `libxsmm_config.py`). The prerequisite to omit configuration is to opt-in by defining LIBXSMM_DEFAULT_CONFIG (`-D`). The zero-config feature is not available for LIBXSMM's Fortran interface.\n\n**Note**: By default, C/C++ and FORTRAN compilers are needed (some sample code is written in C++). Beside of specifying the compilers (`make CXX=g++ CC=gcc FC=gfortran` and maybe `AR=ar`), the need for a FORTRAN compiler can be relaxed (`make FC=` or `make FORTRAN=0`). The latter affects the availability of the MODule file and the corresponding `libxsmm.f` library (the interface `libxsmm.f` is still generated).\n\nThe build system considers a set of given key-value pairs as a single unique build and triggers a rebuild for a distinct set of flags. For more advanced builds or additional background, please consult the section about [Customization](documentation/libxsmm_tune.md). To generate the interface of the library inside of the `include` directory and to build the static library (by default, STATIC=1 is activated). Run any (or both) of the following command(s):\n\n```bash\nmake STATIC=0\nmake\n```\n\nOn CRAY systems, the CRAY Compiling Environment (CCE) should be used regardless of utilizing the CRAY compiler, the Intel Compiler, or the <span>GNU&#160;Compiler Collection (GCC)<\/span>. The CCE is eventually suppressing to build shared libraries (STATIC=0). In any case, <span>(1)&#160;switch<\/span> to the desired compiler (module load/switch), and <span>(2)&#160;rely<\/span> on:\n\n```bash\nmake CXX=CC CC=cc FC=ftn\n```\n\nA variety of build environments is out-of-the-box compatible, see [https://github.com/libxsmm/libxsmm/wiki/Compatibility](https://github.com/libxsmm/libxsmm/wiki/Compatibility). If the build process is not successful, it may help to avoid advanced GCC flags. This is useful with a tool chain, which pretends to be GCC-compatible (and is treated as such) but fails to consume the afore mentioned flags:\n\n```bash\nmake COMPATIBLE=1\n```\n\n<a name=\"outdated-binutils\"><\/a>In case of outdated Binutils, compilation can fail to assemble code when building the library (this has nothing to do with JIT-generated code and it does not affect how JIT-code is targeting the system). LIBXSMM implements some functionality using compiler-intrinsics and multiple code-paths which are scheduled according to CPUID. In contrast to `INTRINSICS=2` (default), `INTRINSICS=1` enables a fully static code path according to the desired target. If no target is given (e.g., `AVX=3`, or `AVX=2`), instruction set extensions cannot be leveraged for such code-paths. Try to fix failing compilation by building the latest GNU Binutils (and `export PATH=/path/to/binutils/bin:${PATH}`). Binutils are versioned independently of <span>GNU&#160;GCC<\/span> and other compilers. If one cannot update Binutils, work around with a CPUID-value as tabulated in [libxsmm_cpuid.h](https://github.com/libxsmm/libxsmm/blob/main/include/libxsmm_cpuid.h): start at the upper end (less than 1999) and decrement until compilation passes (make INTRINSICS=_CPUID_, e.g., `make INTRINSICS=1021`). As a last resort, rely on a fully static code path:\n\n```bash\nmake INTRINSICS=1\n```\n\nTo test and validate a build, please consult [https://github.com/libxsmm/libxsmm/wiki/Validation](https://github.com/libxsmm/libxsmm/wiki/Validation). To run some basic sanity checks, remember that each set of given key-value pairs represents a different build (and test):\n\n```bash\nmake STATIC=0 tests\n```\n\nTo remove intermediate files, or to remove all generated files and folders (including the interface and the library archives), run one of the make-targets below. An additional distclean-target recursively cleans the entire tree (after <span>version&#160;1.9<\/span>).\n\n```bash\nmake clean\nmake realclean\n```\n\n<a name=\"fortran\"><\/a>FORTRAN code can make use of LIBXSMM:\n\n* By using the module and linking with `libxsmmf`, `libxsmm`, and `libxsmmext`,\n* <a name=\"header-only-fortran\"><\/a>By including `libxsmm.f` and linking with `libxsmm`, and `libxsmmext`, or\n* By (implicitly) calling a SUBROUTINE and linking with `libxsmm`, and `libxsmmext`.\n\n**Note**: `libxsmmf` requires `libxsmmext` (starting with LIBXSMM&#160;2.0), and thereby requires to link with the OpenMP runtime as well.\n\nUsing the Fortran module (or including the interface), requires at least a <span>Fortran&#160;2003<\/span> compiler (F2K3). <span>FORTRAN&#160;77<\/span> compatibility is only implicitly available (no interface), and the available subset of routines is documented in `libxsmm.f` and marked with [comments](https://github.com/libxsmm/libxsmm/search?q=implementation+provided+for+Fortran+77+compatibility) (part of the implementation).\n\n#### CMake\n\nCMake 3.13 or newer can build the classic library ABI, the optional Fortran module interface, and the generator executables. GNU Make remains the reference build path, especially when the full set of build-time customization options or legacy sample targets is needed.\n\nConfigure, build, and install LIBXSMM with:\n\n```bash\ncmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/libxsmm-install\ncmake --build build --target install -j\n```\n\nThe default CMake build produces static libraries. Add `-DBUILD_SHARED_LIBS=ON` to build shared libraries. When a Fortran compiler is detected, the Fortran module interface and `libxsmmf` are built automatically.\n\nThe installed package should be consumed through its exported targets:\n\n```cmake\nfind_package(libxsmm CONFIG REQUIRED)\ntarget_link_libraries(my_target PRIVATE libxsmm::libxsmm)\n```\n\nFor the Fortran module interface:\n\n```cmake\nfind_package(libxsmm CONFIG REQUIRED COMPONENTS Fortran)\ntarget_link_libraries(my_target PRIVATE libxsmm::libxsmmf)\n```\n\nFor an in-tree dependency, `add_subdirectory()` can be used. An installed package and `find_package(libxsmm CONFIG REQUIRED)` are preferred for regular downstream integration.\n\n### Header-Only\n\n<span>Version&#160;1.4.4<\/span> introduced support for \"header-only\" usage in C and C++. By only including `libxsmm_source.h` allows to get around building the library. However, this gives up on a clearly defined application binary interface (ABI). An ABI may allow for hot-fixes after deploying an application (when relying on the shared library form), and it may also ensure to only rely on the public interface of LIBXSMM. In contrast, the header-only form not only exposes the internal implementation of LIBXSMM but can also increase the turnaround time during development of an application (due to longer compilation times). The header file is intentionally named \"libxsmm_**source**.h\" since this header file relies on the [src](https://github.com/libxsmm/libxsmm/tree/main/src) directory (with the implications as noted earlier).\n\n<a name=\"zero-config\"><\/a>The header-only form depends on `libxsmm_source.h` which is *generated* according to the content of the source folder (`src`). <span>LIBXSMM&#160;1.16<\/span> (and later) provides header-only support without invoking a make-target (zero configuration) for any given checkout of LIBXSMM. To use configured header-only (non-default), LIBXSMM_CONFIGURED must be defined (`-D`). Previously, it was necessary to invoke `make header-only` (v1.6.2 or later), `make cheader` (prior to v1.6.2), or any target building the library (`make`). The zero-config feature allows 3rd-party build systems an easier integration of LIBXSMM, which also holds true if the system builds LIBXSMM from source (see [classic ABI](#zero-config-abi)). Fortran code may [include](#header-only-fortran) `libxsmm.f` but still requires that interface to be generated.\n\n**Note**: building an application applies the same build settings to LIBXSMM! For instance, to omit debug code inside of LIBXSMM `NDEBUG` must be defined (`-DNDEBUG`).\n\n## Rules for building LIBXSMM\n\nProjects using CMake should use the native CMake build described above rather than maintaining a duplicate list of LIBXSMM source files. Other build systems can compile and link LIBXSMM directly. Such builds may generate the configured interfaces first, or opt into zero-config mode by defining `LIBXSMM_DEFAULT_CONFIG` (`-D`). Zero-config mode is not available for LIBXSMM's Fortran interface.\n\n## Link Instructions\n\nUsing the [classic ABI](#classic-library-abi) (including [Fortran](#fortran) code), requires linking LIBXSMM against the application. The library is agnostic with respect to the threading-runtime, and therefore an application is free to use any threading runtime (e.g., OpenMP). The library is also thread-safe, and multiple application threads can call LIBXSMM's routines concurrently. Enabling OpenMP for LIBXSMM's main library is supported as well (OMP=1), and mostly affects the synchronization primitives used inside of the library. All the \"omp\" functionality (function postfix) is served by the `libxsmmext` library, which is automatically built with OpenMP enabled. When using this \"omp\" functionality, `libxsmmext` needs to be present at the link line.\n\n<a name=\"table-of-libraries\"><\/a>Library | Purpose\n:-------------|---------\nlibxsmm       | Thread-safe core functions (same routine can be called concurrently). Contains routines that can take a thread-ID and the number of library-external threads.\nlibxsmmf      | Necessary when using the Fortran MODule but not when including `libxsmm.f` or relying on implicit interfaces ([Fortran 77](https://github.com/libxsmm/libxsmm/search?q=implementation+provided+for+Fortran+77+compatibility)).\n\n<a name=\"pkg-config\"><\/a>To ease linking with LIBXSMM, `pkg-config` can be used. For example:\n\n```bash\nexport PKG_CONFIG_PATH=/path/to/libxsmm/lib\npkg-config libxsmm --libs\n```\n\n### Installation\n\nThere are two main mechanisms to install LIBXSMM (both mechanisms can be combined): <span>(1)&#160;building<\/span> the library in an <span>out&#8209;of&#8209;tree<\/span> fashion, and <span>(2)&#160;installing<\/span> into a certain location. <a name=\"install-build\"><\/a>Building in an <span>out&#8209;of&#8209;tree<\/span> fashion looks like:\n\n```bash\ncd libxsmm-install\nmake -f /path/to/libxsmm/Makefile\n```\n\n<a name=\"install-prefix\"><\/a>Installation into a specific location looks like (`PREFIX` or `DESTDIR`):\n\n```bash\nmake MNK=\"1 2 3 4 5\" PREFIX=/path/to/libxsmm-install install\n```\n\n<a name=\"install-destdir\"><\/a>Both `PREFIX` and `DESTDIR` are equivalent and can be relative or absolute paths. An installation can be repeated for different locations without triggering a rebuild. The prefix directory *inside* of each of the [package configuration files](#pkg-config) is set to where LIBXSMM is built (staging folder) unless `PREFIX` or `DESTDIR` is specified. The effect of `PREFIX` (or `DESTDIR`) with respect to the pkg-config files is independent of whether the install-target is invoked or not (make).\n\nFurther, performing `make install-minimal` omits the documentation (default: `PREFIX/share/libxsmm`). Moreover, PINCDIR, POUTDIR, PBINDIR, and PDOCDIR allow to customize the locations underneath of the PREFIX location. To build a general package for an unpredictable audience (Linux distribution, or similar), it is advised to not over-specify or customize the build step, i.e., JIT, SSE, AVX, OMP, BLAS, etc. should not be used. The following is building and installing a complete set of libraries where the generated interface matches both the static and the shared libraries:\n\n```bash\nmake PREFIX=/path/to/libxsmm-install STATIC=0 install\nmake PREFIX=/path/to/libxsmm-install install\n```\n\n## Runtime Control<a name=\"running\"><\/a>\n\n### Handling Errors\n\nThe library handles errors with mechanisms available to the C programming language (no exceptions). The backend uses result codes passed by an argument rather than an actual return value. Such an argument is often a descriptor (struct) guiding and covering the state of the code generation. The frontend however may not hand-out any error state, which can be a big relief on the call-side. Instead, the frontend implements a [verbose mode](#verbose-mode) to inform about unexpected input or an error captured from the backend. Guiding principles of LIBXSMM are muted operation by default (non-verbose) and no unexpected exit from execution.\n\n### Verbose Mode\n\nThe [verbose mode](documentation/libxsmm_aux.md#getting-and-setting-the-verbosity) (level of verbosity) allows for an insight into the code dispatch mechanism by receiving a small, tabulated statistic as soon as the library terminates. The design point for this functionality is to not impact the performance of any critical code path, i.e., verbose mode is always enabled and does not require symbols (SYM=1) or debug code (DBG=1). The statistics appears (`stderr`) when the environment variable LIBXSMM_VERBOSE is set to a non-zero value. For example:\n\n```bash\nLIBXSMM_VERBOSE=1 ./myapplication\n[... application output]\n\nHSW/SP      TRY    JIT    STA    COL\n   0..13      0      0      0      0\n  14..23      0      0      0      0\n 24..128      3      3      0      0\n```\n\nThe tables are distinct between single-precision and double-precision, but either table is pruned if all counters are zero. If both tables are pruned, the library shows the code path which would have been used for JIT'ting the code: `LIBXSMM_TARGET=hsw` (otherwise the code path is shown in the table's header). The actual counters are collected for three buckets: small kernels (<span>MNK<sup>1/3<\/sup>&#160;&lt;=&#160;13<\/span>), medium-sized kernels (<span>13&#160;&lt;&#160;MNK<sup>1/3<\/sup>&#160;&lt;=&#160;23<\/span>), and larger kernels (<span>23&#160;&lt;&#160;MNK<sup>1/3<\/sup>&#160;&lt;=&#160;64<\/span>; the actual upper bound depends on LIBXSMM_MAX_MNK as selected at compile-time). Keep in mind, that \"larger\" is supposedly still small in terms of arithmetic intensity (which grows linearly with the kernel size). Unfortunately, the arithmetic intensity depends on the way a kernel is used (which operands are loaded/stored into main memory), and it is not performance-neutral to collect this information.\n\nThe TRY counter represents all attempts to register statically generated kernels, and all attempts to dynamically generate and register kernels. The TRY counter includes rejected JIT requests due to unsupported GEMM arguments. The JIT and STA counters distinct the successful cases of the afore mentioned event (TRY) into dynamically (JIT) and statically (STA) generated code. In case the capacity (<span>O(*n*)&#160;=&#160;10<sup>5<\/sup><\/span>) of the code registry is exhausted, no more kernels can be registered although further attempts are not prevented. Registering many kernels (<span>O(*n*)&#160;=&#160;10<sup>3<\/sup><\/span>) may ramp the number of hash key collisions (COL), which can degrade performance. The latter is prevented if the small thread-local cache is utilized effectively.\n\n\n```bash\nRegistry: 20 MB (gemm=0 mcopy=14 tcopy=0)\n```\n\nIf the call-wrapper is used, an additional runtime statistic becomes available (see [Call Wrapper](documentation/libxsmm_mm.md#call-wrapper)).\n\n<a name=\"objdump\"><\/a>**Note**: Setting LIBXSMM_VERBOSE to a negative value dumps each generated JIT kernel to a file (binary) with each file being named like the function name shown in [Intel VTune](documentation/libxsmm_prof.md#intelvtuneamplifier). Disassembly of the raw binary files can be accomplished by:\n\n```bash\nobjdump -D -b binary -m i386 -M x86-64 [JIT-dump-file]\n```\n\n### Call Trace\n\nDuring the initial steps of employing the LIBXSMM API, one may rely on a debug version of the library (`make DBG=1`). The latter also implies console output (`stderr`) in case of an error/warning condition inside of the library. It is also possible to print the execution flow (call trace) inside of LIBXSMM (can be combined with DBG=1 or OPT=0):\n\n```bash\nmake TRACE=1\n```\n\nBuilding an application which traces calls (inside of the library) requires the shared library of LIBXSMM, alternatively the application is required to link the static library of LIBXSMM in a dynamic fashion (GNU tool chain: `-rdynamic`). Tracing calls (without debugger) can be then accomplished by an environment variable called LIBXSMM_TRACE.\n\n```bash\nLIBXSMM_TRACE=1 ./myapplication\n```\n\nSyntactically up to three arguments separated by commas (which allows to omit arguments) are taken (*tid*,*i*,*n*): *tid* signifies the ID of the thread to be traced with 1...NTHREADS being valid and where LIBXSMM_TRACE=1 is filtering for the \"main thread\" (in fact the first thread running into the trace facility); grabbing all threads (no filter) can be achieved by supplying a negative id (which is also the default when omitted). The second argument is pruning higher levels of the call-tree with *i=1* being the default (level zero is the highest at the same level as the main function). The last argument is taking the number of inclusive call levels with *n=-1* being the default (signifying no filter).\n\nAlthough the `ltrace` (Linux utility) provides similar insight, the trace facility might be useful due to the afore mentioned filtering expressions. Please note that the trace facility is severely impacting the performance (even with LIBXSMM_TRACE=0), and this is not just because of console output but rather since inlining (internal) functions might be prevented along with additional call overhead on each function entry and exit. Therefore, debug symbols can be also enabled separately (`make SYM=1`; implied by TRACE=1 or DBG=1) which might be useful when profiling an application.\n\n### Verification\n\nThis section refers to testing correctness of an application using LIBXSMM utilities, i.e., using `libxsmm_matdiff` or `libxsmm_matdiff_epsilon` in particular. The former function (`libxsmm_matdiff`) compares two matrices (which can degenerate to vector shape), and yields a structure with information about the difference of both matrices (gold vs. test). The latter function (`libxsmm_matdiff_epsilon`) combines absolute and relative norms (given by afore mentioned structure) and calculates a scalar \"epsilon\" which can be used to check against a margin.\n\nUsing `libxsmm_matdiff_epsilon` in an application exposes an environment variable `LIBXSMM_MATDIFF` which can specify a file or directory path (`LIBXSMM_MATDIFF=1` simply uses some filename as default). In any case, the application appends one line to the respective file for each call of `libxsmm_matdiff_epsilon`. A data record consists of the epsilon and the command line used to launch the application. A generated file can be further evaluated, e.g., `sort -gk1 libxsmm_matdiff.log | tail -n 10` which yields the largest ten epsilon values discovered along with the application's command line.\n\nThe environment variable `LIBXSMM_MATDIFF` can carry optional space-separated arguments to amend each file entry like `export LIBXSMM_MATDIFF=\"libxsmm_matdiff.log hello world\"`. In sophisticated cases this can be used to amend a value only known at runtime, e.g., the actual margin which is used to judge the epsilon (`putenv`).\n\n## Performance\n\n<a name=\"profiling\"><\/a>Profiling an application, which uses LIBXSMM's JIT-code is well-supported. The library supports <span>Intel&#160;VTune&#160;Amplifier<\/span> and <span>Linux&#160;perf<\/span>. Details are given on how to include profiler support, and how to run the application.\n\n* [Profiling using Intel VTune Amplifier](documentation/libxsmm_prof.md#intelvtuneamplifier)\n* [Profiling using Linux perf](documentation/libxsmm_prof.md#linuxperf)\n\n<a name=\"tuning\"><\/a>At build time, a variety of options exist to customize LIBXSMM. The library is setup for a broad range of use cases, which include sophisticated defaults for typical use.\n\n* [Customizing performance](documentation/libxsmm_tune.md#tuning)\n* <a name=\"auto-dispatch\"><\/a>[Tuning auto-dispatch](documentation/libxsmm_tune.md#auto-dispatch)\n\n## Applications\n\n### High Performance Computing (HPC)\n\n<b>[1]&#160;<\/b>[https://cp2k.org/](https://cp2k.org/): Open Source Molecular Dynamics and the [DBCSR library](https://github.com/cp2k/dbcsr), which processes batches of small matrix multiplications. The batches originate from a distributed block-sparse matrix with problem-specific small matrices. Starting with [CP2K&#160;3.0](https://www.cp2k.org/version_history), LIBXSMM can substitute CP2K's `libsmm` library.\n\n<b>[2]&#160;<\/b>[https://github.com/SeisSol/SeisSol/](https://github.com/SeisSol/SeisSol/): SeisSol is one of the leading codes for earthquake scenarios, for simulating dynamic rupture processes. LIBXSMM provides highly optimized assembly kernels which form the computational back-bone of SeisSol (see [https://github.com/TUM-I5/seissol_kernels/](https://github.com/TUM-I5/seissol_kernels/).\n\n<b>[3]&#160;<\/b>[https://github.com/NekBox/NekBox](https://github.com/NekBox/NekBox): NekBox is a highly scalable and portable spectral element code, which is inspired by the [Nek5000](https://nek5000.mcs.anl.gov/) code. NekBox is specialized for box geometries and intended to prototype new methods as well as to leverage FORTRAN beyond the FORTRAN&#160;77 standard. LIBXSMM can be used to substitute the [MXM_STD](https://github.com/Nek5000/NekBox/blob/box/mxm_std.F90) code.\n\n<b>[4]&#160;<\/b>[https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000): Nek5000 is the open-source, highly-scalable, always-portable spectral element code from [https://nek5000.mcs.anl.gov/](https://nek5000.mcs.anl.gov/). The development branch of the Nek5000 code [incorporates](https://github.com/Nek5000/Nek5000/blob/master/core/mxm_wrapper.f) LIBXSMM.\n\n<b>[5]&#160;<\/b>[https://www.pyfr.org/](https://www.pyfr.org/): PyFR is an open-source Python based framework for solving advection-diffusion type problems on streaming architectures by using the flux reconstruction approach. PyFR incorporates LIBXSMM as a matrix multiplication provider for the OpenMP backend.\n\n<b>[6]&#160;<\/b>[http://dial3343.org/about/](http://dial3343.org/about/): The Extreme-scale Discontinuous Galerkin Environment (EDGE) is a solver for hyperbolic partial differential equations with emphasis on seismic simulations. The EDGE [source code](https://github.com/3343/edge) optionally relies on LIBXSMM, but for high performance LIBXSMM's kernels are highly recommended.\n\n<b>[7]&#160;<\/b>[https://sxs-collaboration.github.io/spectre/](https://sxs-collaboration.github.io/spectre/): SpECTRE is an open-source code for multi-scale, multi-physics problems in astrophysics and gravitational physics which runs at Petascale and is designed for Exascale computers. In the future, SpECTRE may be applied to problems across discipline boundaries in fluid dynamics, geoscience, plasma physics, nuclear physics, and engineering.\n\n<b>[8]&#160;<\/b>[https://ceed.exascaleproject.org/ceed-code/](https://ceed.exascaleproject.org/ceed-code/): The Center for Efficient Exascale Discretizations (CEED) is building on the efforts of the Nek5000, MFEM, MAGMA, OCCA and PETSc projects to develop application program interfaces (APIs), both at high-level and at low-level to enable applications to take advantage of high-order methods. The CEED low-level API, [libCEED](https://ceed.exascaleproject.org/libceed/) uses LIBXSMM as a [backend](https://github.com/CEED/libCEED#backends) for high performance on CPUs.\n\n<b>[9]&#160;<\/b>[https://github.com/romeric/Fastor](https://github.com/romeric/Fastor): Fastor is a lightweight high performance tensor algebra framework for modern C++ and can optionally use LIBXSMM as [JIT-backend](https://github.com/romeric/Fastor/wiki/9.-Using-the-LIBXSMM-MKL-JIT-backend).\n\n### Machine and Deep Learning (AI)\n\n<b>[10]&#160;<\/b>[https://github.com/plaidml/plaidml](https://github.com/plaidml/plaidml): PlaidML is an open source tensor compiler aiming for performance portability across a wide range of CPUs, GPUs and other accelerators. Combined with Intel’s nGraph compiler, PlaidML is targeting popular deep learning frameworks such as PyTorch, Keras (TensorFlow), and OpenVino. [PlaidML/v1](https://github.com/plaidml/plaidml/tree/plaidml-v1) (development branch) adopted [MLIR](https://mlir.llvm.org/), an extensible compiler infrastructure gaining industry-wide adoption. PlaidML/v1 started using LIBXSMM as backend for targeting CPUs.\n\n<b>[11]&#160;<\/b>[https://github.com/intel/intel-extension-for-pytorch](https://github.com/intel/intel-extension-for-pytorch): Intel Extension for PyTorch aims for a smooth user experience of PyTorch on CPUs by the means of good performance. The extension pack started to rely on [LIBXSMM for achieving high performance on CPUs](https://arxiv.org/abs/2005.04680).\n\n<b>[12]&#160;<\/b>[https://github.com/libxsmm/tpp-pytorch-extension](https://github.com/libxsmm/tpp-pytorch-extension): Intel(R) Tensor Processing Primitive Extension for pytorch is an open source software library the integrates Tensor Processing Primitives ([TPP](https://arxiv.org/abs/2104.05755)) into pytorch. It is aiming for a smooth user experience of PyTorch on CPUs by the means of good performance. Intel's MLPerf Training submission codes leverage this [project](https://github.com/mlcommons/training_results.1/tree/main/Intel/benchmarks/bert/implementations/pytorch-cpu).\n\n<b>[13]&#160;<\/b>[https://github.com/libxsmm/libxsmm-dnn](https://github.com/libxsmm/libxsmm-dnn): LIBXSMM-DNN is an open source software library that demonstrates how Tensor Processing Primitives ([TPP](https://arxiv.org/abs/2104.05755)) can be used to implement various deep learning primitives such as convolutions, linear layers or even pooling and norming. Due to the use of TPP not a single line of platform-specific code is needed. \n\n### Automated Driving (AD)\n\n<b>[15]&#160;<\/b>[https://software.seek.intel.com/accelerating-eigen-math-library](https://software.seek.intel.com/accelerating-eigen-math-library): Accelerating The Eigen Math Library for Automated Driving Workloads: The Need for Speed in Kalman Filtering. An article in [Issue&#160;31](https://software.intel.com/content/www/us/en/develop/download/parallel-universe-magazine-issue-31-january-2018.html) of The Parallel Universe magazine ([pdf](https://software.intel.com/content/dam/develop/public/us/en/documents/parallel-universe-issue-31.pdf)).\n\n## References\n\n<b>[1]&#160;<\/b>[https://sc19.supercomputing.org/proceedings/tech_poster/tech_poster_pages/rpost244.html](https://sc19.supercomputing.org/proceedings/tech_poster/tech_poster_pages/rpost244.html): High-Performance Deep Learning via a Single Building Block ([poster](https://sc19.supercomputing.org/proceedings/tech_poster/poster_files/rpost244s2-file2.pdf) and [abstract](https://sc19.supercomputing.org/proceedings/tech_poster/poster_files/rpost244s2-file3.pdf)), SC’19: The International Conference for High Performance Computing, Networking, Storage, and Analysis, Denver (Colorado).\n\n<b>[2]&#160;<\/b>[https://dl.acm.org/doi/10.1109/SC.2018.00069](https://dl.acm.org/doi/10.1109/SC.2018.00069): Anatomy of High-Performance Deep Learning Convolutions on SIMD Architectures ([paper](https://arxiv.org/pdf/1808.05567.pdf)). SC'18: The International Conference for High Performance Computing, Networking, Storage, and Analysis, Dallas (Texas).\n\n<b>[3]&#160;<\/b>[https://pasc17.pasc-conference.org/fileadmin/user_upload/pasc17/program/post116s2.pdf](https://pasc17.pasc-conference.org/fileadmin/user_upload/pasc17/program/post116s2.pdf): DBCSR: A Sparse Matrix Multiplication Library for Electronic Structure Codes (poster), PASC’17: The PASC17 Conference, Lugano (Switzerland).\n\n<b>[4]&#160;<\/b>[https://sc17.supercomputing.org/SC17%20Archive/tech_poster/tech_poster_pages/post190.html](https://sc17.supercomputing.org/SC17%20Archive/tech_poster/tech_poster_pages/post190.html): Understanding the Performance of Small Convolution Operations for CNN on Intel Architecture ([poster](https://sc17.supercomputing.org/SC17%20Archive/tech_poster/poster_files/post190s2-file2.pdf) and [abstract](https://sc17.supercomputing.org/SC17%20Archive/tech_poster/poster_files/post190s2-file3.pdf)), SC’17: The International Conference for High Performance Computing, Networking, Storage, and Analysis, Denver (Colorado).\n\n<b>[5]&#160;<\/b>[https://www.computer.org/csdl/proceedings-article/sc/2016/8815a981/12OmNCeaQ1D](https://www.computer.org/csdl/proceedings-article/sc/2016/8815a981/12OmNCeaQ1D): LIBXSMM: Accelerating Small Matrix Multiplications by Runtime Code Generation. SC'16: The International Conference for High Performance Computing, Networking, Storage and Analysis, Salt Lake City (Utah).\n\n<b>[6]&#160;<\/b>[http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/tech_poster_pages/post137.html](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/tech_poster_pages/post137.html): LIBXSMM: A High Performance Library for Small Matrix Multiplications ([poster](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/poster_files/post137s2-file2.pdf) and [abstract](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/poster_files/post137s2-file3.pdf)). SC'15: The International Conference for High Performance Computing, Networking, Storage and Analysis, Austin (Texas).\n\n<b>[7]&#160;<\/b>[Tensor Processing Primitives: A Programming Abstraction for Efficiency and Portability in Deep Learning & HPC Workloads](https://arxiv.org/abs/2104.05755) SC'21: The International Conference for High Performance Computing, Networking, Storage and Analysis, St Louis.\n\n## Articles\n\n<b>[1]&#160;<\/b>[https://www.nextplatform.com/2019/10/09/cloudy-supercomputers-join-the-hpc-petascale-club/](https://www.nextplatform.com/2019/10/09/cloudy-supercomputers-join-the-hpc-petascale-club/): Cloudy Supercomputers Join the HPC Petascale Club. An article written by Rob Farber, 2019. The article covers LIBXSMM in a separate section.\n\n<b>[2]&#160;<\/b>[https://www.nextplatform.com/2019/06/26/counting-the-cost-of-scaling-hpc-applications/](https://www.nextplatform.com/2019/06/26/counting-the-cost-of-scaling-hpc-applications/): Counting The Cost Of Scaling HPC Applications. An article written by Timothy Prickett Morgan, 2019. This article is about CP2K Open Source Molecular Dynamics and not about LIBXSMM. However, LIBXSMM was key for application performance.\n\n<b>[3]&#160;<\/b>[https://www.nextplatform.com/2019/06/26/counting-the-cost-of-scaling-hpc-applications/](https://www.nextplatform.com/2019/06/26/counting-the-cost-of-scaling-hpc-applications/): Azure Benchmarks HC-series Across Twenty-thousand Cores for HPC. An article written by John Russell, 2019. This article is about CP2K Open Source Molecular Dynamics and not about LIBXSMM. However, LIBXSMM was key for application performance.\n\n<b>[4]&#160;<\/b>[https://software.intel.com/sites/default/files/parallel-universe-issue-34.pdf](https://software.intel.com/content/www/us/en/develop/download/parallel-universe-magazine-issue-34-october-2018.html): LIBXSMM: An Open Source-Based Inspiration for Hardware and Software Development at Intel ([pdf](https://software.intel.com/content/dam/develop/public/us/en/documents/parallel-universe-issue-34.pdf)). An article written by Hans Pabst, Greg Henry, and Alexander Heinecke, 2018.\n\n<b>[5]&#160;<\/b>[https://medium.com/@rmfarber/libxsmm-brings-deep-learning-lessons-learned-to-many-hpc-applications-9143c6c93125](https://medium.com/@rmfarber/libxsmm-brings-deep-learning-lessons-learned-to-many-hpc-applications-9143c6c93125): LIBXSMM Brings Deep-learning \"Lessons Learned\" to Many HPC Applications. An article written by Rob Farber, 2018.\n\n<b>[6]&#160;<\/b>[https://www.rdworldonline.com/largest-supercomputer-simulation-of-sumatra-andaman-earthquake/](https://www.rdworldonline.com/largest-supercomputer-simulation-of-sumatra-andaman-earthquake/): Largest Supercomputer Simulation of Sumatra-Andaman Earthquake. An article written by Linda Barney, 2018.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:A58F2:1761E0:5DBA70:6AB92BE3"},"text_sha256":"2f1ae5ff539197ee453486ae04776eac91e4675c9dc0182cf2c7bc6ee2329381"},{"path":"SECURITY.md","size":407,"blob_sha":"6143e2263eec577c9cd6095b1dfc6b2a25c0b0b4","priority":1,"status":200,"text":"# Security Policy\n\nIntel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.\n\n## Reporting a Vulnerability\n\nPlease report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CA2:3EACB:17B1D5:5E09F9:6AB92BE3"},"text_sha256":"c6e6c045b67a78ed8509ad8c5f04e25559fca3cd7f00a06560245305f2fbb861"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sparklyr/sparklyr","input_row":{"repository":"sparklyr/sparklyr","url":"https://github.com/sparklyr/sparklyr","name":"sparklyr","owner":"sparklyr","description":"R interface for Apache Spark","language":"R","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":972,"issues":2069,"created_at":"2016-05-20T15:28:53Z","updated_at":"2026-09-24T07:17:11Z","first_commit_at":"2016-04-06T18:14:51Z","last_commit_at":"2026-07-02T02:14:54Z","activity_months":122.81,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:53.177Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sparklyr/sparklyr","visibility":"public","created_at":"2016-05-20T15:28:53Z","updated_at":"2026-09-24T07:17:11Z","private":false,"fork":false,"archived":false,"stargazers_count":972,"open_issues_count":358,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2093","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085F:70FF5:17DC4E6:1C0193A:6AB92BE5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2092","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17CCEEA:1BF1BCE:6AB92BE5"},"commit":{"sha":"817568a01583e68a9c967520fd59c44e7ce5df71","url":"https://github.com/sparklyr/sparklyr/commit/817568a01583e68a9c967520fd59c44e7ce5df71","date":"2018-05-24T23:21:15Z","author_date":"2018-05-24T23:21:15Z","committer_date":"2018-05-24T23:21:15Z","tree_sha":"ac06d62e97bd262258d12127f22c1c2cdc94123d","message_first_line":"Merge pull request #1519 from mattpollock/feature/set-conf"},"tree_request_status":200,"tree_rate":{"github_remaining":"2091","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:17FB159:1C20B52:6AB92BE5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20885,"blob_sha":"9c96ba9d7180ddace55e3719ba474c997032575f","priority":0}],"documents":[{"path":"README.md","size":20885,"blob_sha":"9c96ba9d7180ddace55e3719ba474c997032575f","priority":0,"status":200,"text":"sparklyr: R interface for Apache Spark\n================\n\n<img src=\"tools/readme/sparklyr-package.png\" width=200 align=\"right\" style=\"margin-left: 20px; margin-right: 20px\"/>\n\n[![Build\nStatus](https://travis-ci.org/rstudio/sparklyr.svg?branch=master)](https://travis-ci.org/rstudio/sparklyr)\n[![AppVeyor Build\nStatus](https://ci.appveyor.com/api/projects/status/github/rstudio/sparklyr?branch=master&svg=true)](https://ci.appveyor.com/project/JavierLuraschi/sparklyr)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/sparklyr)](https://cran.r-project.org/package=sparklyr)\n[![codecov](https://codecov.io/gh/rstudio/sparklyr/branch/master/graph/badge.svg)](https://codecov.io/gh/rstudio/sparklyr)\n[![Join the chat at\nhttps://gitter.im/rstudio/sparklyr](https://badges.gitter.im/rstudio/sparklyr.svg)](https://gitter.im/rstudio/sparklyr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n  - Connect to [Spark](http://spark.apache.org/) from R. The sparklyr\n    package provides a complete [dplyr](https://github.com/hadley/dplyr)\n    backend.\n  - Filter and aggregate Spark datasets then bring them into R for\n    analysis and visualization.\n  - Use Spark’s distributed [machine\n    learning](http://spark.apache.org/docs/latest/mllib-guide.html)\n    library from R.\n  - Create [extensions](http://spark.rstudio.com/extensions.html) that\n    call the full Spark API and provide interfaces to Spark packages.\n\n## Installation\n\nYou can install the **sparklyr** package from CRAN as follows:\n\n``` r\ninstall.packages(\"sparklyr\")\n```\n\nYou should also install a local version of Spark for development\npurposes:\n\n``` r\nlibrary(sparklyr)\nspark_install(version = \"2.1.0\")\n```\n\nTo upgrade to the latest version of sparklyr, run the following command\nand restart your r session:\n\n``` r\ndevtools::install_github(\"rstudio/sparklyr\")\n```\n\nIf you use the RStudio IDE, you should also download the latest [preview\nrelease](https://www.rstudio.com/products/rstudio/download/preview/) of\nthe IDE which includes several enhancements for interacting with Spark\n(see the [RStudio IDE](#rstudio-ide) section below for more details).\n\n## Connecting to Spark\n\nYou can connect to both local instances of Spark as well as remote Spark\nclusters. Here we’ll connect to a local instance of Spark via the\n[spark\\_connect](http://spark.rstudio.com/reference/sparklyr/latest/spark_connect.html)\nfunction:\n\n``` r\nlibrary(sparklyr)\nsc <- spark_connect(master = \"local\")\n```\n\nThe returned Spark connection (`sc`) provides a remote dplyr data source\nto the Spark cluster.\n\nFor more information on connecting to remote Spark clusters see the\n[Deployment](http://spark.rstudio.com/deployment.html) section of the\nsparklyr website.\n\n## Using dplyr\n\nWe can now use all of the available dplyr verbs against the tables\nwithin the cluster.\n\nWe’ll start by copying some datasets from R into the Spark cluster (note\nthat you may need to install the nycflights13 and Lahman packages in\norder to execute this code):\n\n``` r\ninstall.packages(c(\"nycflights13\", \"Lahman\"))\n```\n\n``` r\nlibrary(dplyr)\niris_tbl <- copy_to(sc, iris)\nflights_tbl <- copy_to(sc, nycflights13::flights, \"flights\")\nbatting_tbl <- copy_to(sc, Lahman::Batting, \"batting\")\nsrc_tbls(sc)\n```\n\n    ## [1] \"batting\" \"flights\" \"iris\"\n\nTo start with here’s a simple filtering example:\n\n``` r\n# filter by departure delay and print the first few records\nflights_tbl %>% filter(dep_delay == 2)\n```\n\n    ## # Source:   lazy query [?? x 19]\n    ## # Database: spark_connection\n    ##     year month   day dep_time sched_dep_time dep_delay arr_time\n    ##    <int> <int> <int>    <int>          <int>     <dbl>    <int>\n    ##  1  2013     1     1      517            515      2.00      830\n    ##  2  2013     1     1      542            540      2.00      923\n    ##  3  2013     1     1      702            700      2.00     1058\n    ##  4  2013     1     1      715            713      2.00      911\n    ##  5  2013     1     1      752            750      2.00     1025\n    ##  6  2013     1     1      917            915      2.00     1206\n    ##  7  2013     1     1      932            930      2.00     1219\n    ##  8  2013     1     1     1028           1026      2.00     1350\n    ##  9  2013     1     1     1042           1040      2.00     1325\n    ## 10  2013     1     1     1231           1229      2.00     1523\n    ## # ... with more rows, and 12 more variables: sched_arr_time <int>,\n    ## #   arr_delay <dbl>, carrier <chr>, flight <int>, tailnum <chr>,\n    ## #   origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>, hour <dbl>,\n    ## #   minute <dbl>, time_hour <dttm>\n\n[Introduction to dplyr](https://CRAN.R-project.org/package=dplyr)\nprovides additional dplyr examples you can try. For example, consider\nthe last example from the tutorial which plots data on flight delays:\n\n``` r\ndelay <- flights_tbl %>% \n  group_by(tailnum) %>%\n  summarise(count = n(), dist = mean(distance), delay = mean(arr_delay)) %>%\n  filter(count > 20, dist < 2000, !is.na(delay)) %>%\n  collect\n\n# plot delays\nlibrary(ggplot2)\nggplot(delay, aes(dist, delay)) +\n  geom_point(aes(size = count), alpha = 1/2) +\n  geom_smooth() +\n  scale_size_area(max_size = 2)\n```\n\n    ## `geom_smooth()` using method = 'gam'\n\n![](tools/readme/ggplot2-1.png)<!-- -->\n\n### Window Functions\n\ndplyr [window functions](https://CRAN.R-project.org/package=dplyr) are\nalso supported, for example:\n\n``` r\nbatting_tbl %>%\n  select(playerID, yearID, teamID, G, AB:H) %>%\n  arrange(playerID, yearID, teamID) %>%\n  group_by(playerID) %>%\n  filter(min_rank(desc(H)) <= 2 & H > 0)\n```\n\n    ## # Source:     lazy query [?? x 7]\n    ## # Database:   spark_connection\n    ## # Groups:     playerID\n    ## # Ordered by: playerID, yearID, teamID\n    ##    playerID  yearID teamID     G    AB     R     H\n    ##    <chr>      <int> <chr>  <int> <int> <int> <int>\n    ##  1 aaronha01   1959 ML1      154   629   116   223\n    ##  2 aaronha01   1963 ML1      161   631   121   201\n    ##  3 abbotji01   1999 MIL       20    21     0     2\n    ##  4 abnersh01   1992 CHA       97   208    21    58\n    ##  5 abnersh01   1990 SDN       91   184    17    45\n    ##  6 acklefr01   1963 CHA        2     5     0     1\n    ##  7 acklefr01   1964 CHA        3     1     0     1\n    ##  8 adamecr01   2016 COL      121   225    25    49\n    ##  9 adamecr01   2015 COL       26    53     4    13\n    ## 10 adamsac01   1943 NY1       70    32     3     4\n    ## # ... with more rows\n\nFor additional documentation on using dplyr with Spark see the\n[dplyr](http://spark.rstudio.com/dplyr.html) section of the sparklyr\nwebsite.\n\n## Using SQL\n\nIt’s also possible to execute SQL queries directly against tables within\na Spark cluster. The `spark_connection` object implements a\n[DBI](https://github.com/rstats-db/DBI) interface for Spark, so you can\nuse `dbGetQuery` to execute SQL and return the result as an R data\nframe:\n\n``` r\nlibrary(DBI)\niris_preview <- dbGetQuery(sc, \"SELECT * FROM iris LIMIT 10\")\niris_preview\n```\n\n    ##    Sepal_Length Sepal_Width Petal_Length Petal_Width Species\n    ## 1           5.1         3.5          1.4         0.2  setosa\n    ## 2           4.9         3.0          1.4         0.2  setosa\n    ## 3           4.7         3.2          1.3         0.2  setosa\n    ## 4           4.6         3.1          1.5         0.2  setosa\n    ## 5           5.0         3.6          1.4         0.2  setosa\n    ## 6           5.4         3.9          1.7         0.4  setosa\n    ## 7           4.6         3.4          1.4         0.3  setosa\n    ## 8           5.0         3.4          1.5         0.2  setosa\n    ## 9           4.4         2.9          1.4         0.2  setosa\n    ## 10          4.9         3.1          1.5         0.1  setosa\n\n## Machine Learning\n\nYou can orchestrate machine learning algorithms in a Spark cluster via\nthe [machine\nlearning](http://spark.apache.org/docs/latest/mllib-guide.html)\nfunctions within **sparklyr**. These functions connect to a set of\nhigh-level APIs built on top of DataFrames that help you create and tune\nmachine learning workflows.\n\nHere’s an example where we use\n[ml\\_linear\\_regression](http://spark.rstudio.com/reference/sparklyr/latest/ml_linear_regression.html)\nto fit a linear regression model. We’ll use the built-in `mtcars`\ndataset, and see if we can predict a car’s fuel consumption (`mpg`)\nbased on its weight (`wt`), and the number of cylinders the engine\ncontains (`cyl`). We’ll assume in each case that the relationship\nbetween `mpg` and each of our features is linear.\n\n``` r\n# copy mtcars into spark\nmtcars_tbl <- copy_to(sc, mtcars)\n\n# transform our data set, and then partition into 'training', 'test'\npartitions <- mtcars_tbl %>%\n  filter(hp >= 100) %>%\n  mutate(cyl8 = cyl == 8) %>%\n  sdf_partition(training = 0.5, test = 0.5, seed = 1099)\n\n# fit a linear model to the training dataset\nfit <- partitions$training %>%\n  ml_linear_regression(response = \"mpg\", features = c(\"wt\", \"cyl\"))\nfit\n```\n\n    ## Formula: mpg ~ wt + cyl\n    ## \n    ## Coefficients:\n    ## (Intercept)          wt         cyl \n    ##   33.499452   -2.818463   -0.923187\n\nFor linear regression models produced by Spark, we can use `summary()`\nto learn a bit more about the quality of our fit, and the statistical\nsignificance of each of our predictors.\n\n``` r\nsummary(fit)\n```\n\n    ## Deviance Residuals:\n    ##    Min     1Q Median     3Q    Max \n    ## -1.752 -1.134 -0.499  1.296  2.282 \n    ## \n    ## Coefficients:\n    ## (Intercept)          wt         cyl \n    ##   33.499452   -2.818463   -0.923187 \n    ## \n    ## R-Squared: 0.8274\n    ## Root Mean Squared Error: 1.422\n\nSpark machine learning supports a wide array of algorithms and feature\ntransformations and as illustrated above it’s easy to chain these\nfunctions together with dplyr pipelines. To learn more see the [machine\nlearning](mllib.html) section.\n\n## Reading and Writing Data\n\nYou can read and write data in CSV, JSON, and Parquet formats. Data can\nbe stored in HDFS, S3, or on the local filesystem of cluster nodes.\n\n``` r\ntemp_csv <- tempfile(fileext = \".csv\")\ntemp_parquet <- tempfile(fileext = \".parquet\")\ntemp_json <- tempfile(fileext = \".json\")\n\nspark_write_csv(iris_tbl, temp_csv)\niris_csv_tbl <- spark_read_csv(sc, \"iris_csv\", temp_csv)\n\nspark_write_parquet(iris_tbl, temp_parquet)\niris_parquet_tbl <- spark_read_parquet(sc, \"iris_parquet\", temp_parquet)\n\nspark_write_json(iris_tbl, temp_json)\niris_json_tbl <- spark_read_json(sc, \"iris_json\", temp_json)\n\nsrc_tbls(sc)\n```\n\n    ## [1] \"batting\"      \"flights\"      \"iris\"         \"iris_csv\"    \n    ## [5] \"iris_json\"    \"iris_parquet\" \"mtcars\"\n\n## Distributed R\n\nYou can execute arbitrary r code across your cluster using\n`spark_apply`. For example, we can apply `rgamma` over `iris` as\nfollows:\n\n``` r\nspark_apply(iris_tbl, function(data) {\n  data[1:4] + rgamma(1,2)\n})\n```\n\n    ## # Source:   table<sparklyr_tmp_85516b79c04f> [?? x 4]\n    ## # Database: spark_connection\n    ##    Sepal_Length Sepal_Width Petal_Length Petal_Width\n    ##           <dbl>       <dbl>        <dbl>       <dbl>\n    ##  1         6.10        4.50         2.40        1.20\n    ##  2         5.90        4.00         2.40        1.20\n    ##  3         5.70        4.20         2.30        1.20\n    ##  4         5.60        4.10         2.50        1.20\n    ##  5         6.00        4.60         2.40        1.20\n    ##  6         6.40        4.90         2.70        1.40\n    ##  7         5.60        4.40         2.40        1.30\n    ##  8         6.00        4.40         2.50        1.20\n    ##  9         5.40        3.90         2.40        1.20\n    ## 10         5.90        4.10         2.50        1.10\n    ## # ... with more rows\n\nYou can also group by columns to perform an operation over each group of\nrows and make use of any package within the closure:\n\n``` r\nspark_apply(\n  iris_tbl,\n  function(e) broom::tidy(lm(Petal_Width ~ Petal_Length, e)),\n  names = c(\"term\", \"estimate\", \"std.error\", \"statistic\", \"p.value\"),\n  group_by = \"Species\"\n)\n```\n\n    ## # Source:   table<sparklyr_tmp_855135d0974> [?? x 6]\n    ## # Database: spark_connection\n    ##   Species    term         estimate std.error statistic         p.value\n    ##   <chr>      <chr>           <dbl>     <dbl>     <dbl>           <dbl>\n    ## 1 versicolor (Intercept)   -0.0843    0.161     -0.525 0.602          \n    ## 2 versicolor Petal_Length   0.331     0.0375     8.83  0.0000000000127\n    ## 3 virginica  (Intercept)    1.14      0.379      2.99  0.00434        \n    ## 4 virginica  Petal_Length   0.160     0.0680     2.36  0.0225         \n    ## 5 setosa     (Intercept)   -0.0482    0.122     -0.396 0.694          \n    ## 6 setosa     Petal_Length   0.201     0.0826     2.44  0.0186\n\n## Extensions\n\nThe facilities used internally by sparklyr for its dplyr and machine\nlearning interfaces are available to extension packages. Since Spark is\na general purpose cluster computing system there are many potential\napplications for extensions (e.g. interfaces to custom machine learning\npipelines, interfaces to 3rd party Spark packages, etc.).\n\nHere’s a simple example that wraps a Spark text file line counting\nfunction with an R function:\n\n``` r\n# write a CSV \ntempfile <- tempfile(fileext = \".csv\")\nwrite.csv(nycflights13::flights, tempfile, row.names = FALSE, na = \"\")\n\n# define an R interface to Spark line counting\ncount_lines <- function(sc, path) {\n  spark_context(sc) %>% \n    invoke(\"textFile\", path, 1L) %>% \n      invoke(\"count\")\n}\n\n# call spark to count the lines of the CSV\ncount_lines(sc, tempfile)\n```\n\n    ## [1] 336777\n\nTo learn more about creating extensions see the\n[Extensions](http://spark.rstudio.com/extensions.html) section of the\nsparklyr website.\n\n## Table Utilities\n\nYou can cache a table into memory with:\n\n``` r\ntbl_cache(sc, \"batting\")\n```\n\nand unload from memory using:\n\n``` r\ntbl_uncache(sc, \"batting\")\n```\n\n## Connection Utilities\n\nYou can view the Spark web console using the `spark_web` function:\n\n``` r\nspark_web(sc)\n```\n\nYou can show the log using the `spark_log` function:\n\n``` r\nspark_log(sc, n = 10)\n```\n\n    ## 18/05/11 16:28:05 INFO ContextCleaner: Cleaned accumulator 2137\n    ## 18/05/11 16:28:05 INFO ContextCleaner: Cleaned accumulator 2144\n    ## 18/05/11 16:28:05 INFO ContextCleaner: Cleaned accumulator 2131\n    ## 18/05/11 16:28:05 INFO ContextCleaner: Cleaned accumulator 2125\n    ## 18/05/11 16:28:05 INFO ContextCleaner: Cleaned accumulator 2130\n    ## 18/05/11 16:28:05 INFO Executor: Finished task 0.0 in stage 69.0 (TID 115). 875 bytes result sent to driver\n    ## 18/05/11 16:28:05 INFO TaskSetManager: Finished task 0.0 in stage 69.0 (TID 115) in 212 ms on localhost (executor driver) (1/1)\n    ## 18/05/11 16:28:05 INFO TaskSchedulerImpl: Removed TaskSet 69.0, whose tasks have all completed, from pool \n    ## 18/05/11 16:28:05 INFO DAGScheduler: ResultStage 69 (count at NativeMethodAccessorImpl.java:0) finished in 0.218 s\n    ## 18/05/11 16:28:05 INFO DAGScheduler: Job 47 finished: count at NativeMethodAccessorImpl.java:0, took 0.221819 s\n\nFinally, we disconnect from Spark:\n\n``` r\nspark_disconnect(sc)\n```\n\n## RStudio IDE\n\nThe latest RStudio [Preview\nRelease](https://www.rstudio.com/products/rstudio/download/preview/) of\nthe RStudio IDE includes integrated support for Spark and the sparklyr\npackage, including tools for:\n\n  - Creating and managing Spark connections\n  - Browsing the tables and columns of Spark DataFrames\n  - Previewing the first 1,000 rows of Spark DataFrames\n\nOnce you’ve installed the sparklyr package, you should find a new\n**Spark** pane within the IDE. This pane includes a **New Connection**\ndialog which can be used to make connections to local or remote Spark\ninstances:\n\n<img src=\"tools/readme/spark-connect.png\" class=\"screenshot\" width=389 />\n\nOnce you’ve connected to Spark you’ll be able to browse the tables\ncontained within the Spark cluster and preview Spark DataFrames using\nthe standard RStudio data\nviewer:\n\n<img src=\"tools/readme/spark-dataview.png\" class=\"screenshot\" width=639 />\n\nYou can also connect to Spark through [Livy](http://livy.io) through a\nnew connection\ndialog:\n\n<img src=\"tools/readme/spark-connect-livy.png\" class=\"screenshot\" width=389 />\n\n<div style=\"margin-bottom: 15px;\">\n\n<\/div>\n\nThe RStudio IDE features for sparklyr are available now as part of the\n[RStudio Preview\nRelease](https://www.rstudio.com/products/rstudio/download/preview/).\n\n## Using H2O\n\n[rsparkling](https://cran.r-project.org/package=rsparkling) is a CRAN\npackage from [H2O](http://h2o.ai) that extends\n[sparklyr](http://spark.rstudio.com) to provide an interface into\n[Sparkling Water](https://github.com/h2oai/sparkling-water). For\ninstance, the following example installs, configures and runs\n[h2o.glm](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/glm.html):\n\n``` r\nlibrary(rsparkling)\nlibrary(sparklyr)\nlibrary(dplyr)\nlibrary(h2o)\n\nsc <- spark_connect(master = \"local\", version = \"2.1.0\")\nmtcars_tbl <- copy_to(sc, mtcars, \"mtcars\")\n\nmtcars_h2o <- as_h2o_frame(sc, mtcars_tbl, strict_version_check = FALSE)\n\nmtcars_glm <- h2o.glm(x = c(\"wt\", \"cyl\"), \n                      y = \"mpg\",\n                      training_frame = mtcars_h2o,\n                      lambda_search = TRUE)\n```\n\n``` r\nmtcars_glm\n```\n\n    ## Model Details:\n    ## ==============\n    ## \n    ## H2ORegressionModel: glm\n    ## Model ID:  GLM_model_R_1526081305304_1 \n    ## GLM Model: summary\n    ##     family     link                              regularization\n    ## 1 gaussian identity Elastic Net (alpha = 0.5, lambda = 0.1013 )\n    ##                                                                lambda_search\n    ## 1 nlambda = 100, lambda.max = 10.132, lambda.min = 0.1013, lambda.1se = -1.0\n    ##   number_of_predictors_total number_of_active_predictors\n    ## 1                          2                           2\n    ##   number_of_iterations                                training_frame\n    ## 1                  100 frame_rdd_31_bca594512cb838eb839e214dce6c4622\n    ## \n    ## Coefficients: glm coefficients\n    ##       names coefficients standardized_coefficients\n    ## 1 Intercept    38.941654                 20.090625\n    ## 2       cyl    -1.468783                 -2.623132\n    ## 3        wt    -3.034558                 -2.969186\n    ## \n    ## H2ORegressionMetrics: glm\n    ## ** Reported on training data. **\n    ## \n    ## MSE:  6.017684\n    ## RMSE:  2.453097\n    ## MAE:  1.940985\n    ## RMSLE:  0.1114801\n    ## Mean Residual Deviance :  6.017684\n    ## R^2 :  0.8289895\n    ## Null Deviance :1126.047\n    ## Null D.o.F. :31\n    ## Residual Deviance :192.5659\n    ## Residual D.o.F. :29\n    ## AIC :156.2425\n\n``` r\nspark_disconnect(sc)\n```\n\n## Connecting through Livy\n\n[Livy](https://github.com/cloudera/livy) enables remote connections to\nApache Spark clusters. Connecting to Spark clusters through Livy is\n**under experimental development** in `sparklyr`. Please post any\nfeedback or questions as a GitHub issue as needed.\n\nBefore connecting to Livy, you will need the connection information to\nan existing service running Livy. Otherwise, to test `livy` in your\nlocal environment, you can install it and run it locally as follows:\n\n``` r\nlivy_install()\n```\n\n``` r\nlivy_service_start()\n```\n\nTo connect, use the Livy service address as `master` and `method =\n\"livy\"` in `spark_connect`. Once connection completes, use `sparklyr` as\nusual, for instance:\n\n``` r\nsc <- spark_connect(master = \"http://localhost:8998\", method = \"livy\")\ncopy_to(sc, iris)\n```\n\n    ## # Source:   table<iris> [?? x 5]\n    ## # Database: spark_connection\n    ##    Sepal_Length Sepal_Width Petal_Length Petal_Width Species\n    ##           <dbl>       <dbl>        <dbl>       <dbl> <chr>  \n    ##  1         5.10        3.50         1.40       0.200 setosa \n    ##  2         4.90        3.00         1.40       0.200 setosa \n    ##  3         4.70        3.20         1.30       0.200 setosa \n    ##  4         4.60        3.10         1.50       0.200 setosa \n    ##  5         5.00        3.60         1.40       0.200 setosa \n    ##  6         5.40        3.90         1.70       0.400 setosa \n    ##  7         4.60        3.40         1.40       0.300 setosa \n    ##  8         5.00        3.40         1.50       0.200 setosa \n    ##  9         4.40        2.90         1.40       0.200 setosa \n    ## 10         4.90        3.10         1.50       0.100 setosa \n    ## # ... with more rows\n\n``` r\nspark_disconnect(sc)\n```\n\nOnce you are done using `livy` locally, you should stop this service\nwith:\n\n``` r\nlivy_service_stop()\n```\n\nTo connect to remote `livy` clusters that support basic authentication\nconnect as:\n\n``` r\nconfig <- livy_config(username=\"<username>\", password=\"<password\">)\nsc <- spark_connect(master = \"<address>\", method = \"livy\", config = config)\nspark_disconnect(sc)\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6488:4F9CC:171589:5D6B5D:6AB92BE5"},"text_sha256":"69b6bc88f8ce8d44973e5d950191beaa8dd7c5641f5a419d449d3ef59257bca3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2090","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0860:76AED:17FD452:1C22F00:6AB92BE7"},"commit":{"sha":"1e123bc8ed9ef56ee5a8c8ac269811bb90a8b63b","url":"https://github.com/sparklyr/sparklyr/commit/1e123bc8ed9ef56ee5a8c8ac269811bb90a8b63b","date":"2026-06-30T22:52:56Z","author_date":"2026-06-30T22:52:56Z","committer_date":"2026-06-30T22:52:56Z","tree_sha":"0fc85701690a08243bdef68424184d9cf8e36e30","message_first_line":"Avoids warning"},"tree_request_status":200,"tree_rate":{"github_remaining":"2089","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:17B4833:1BD9F66:6AB92BE7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":21378,"blob_sha":"fc1cc1f0b1b5adde602b162e6e1437f4ae215ee0","priority":0}],"documents":[{"path":"README.md","size":21378,"blob_sha":"fc1cc1f0b1b5adde602b162e6e1437f4ae215ee0","priority":0,"status":200,"text":"sparklyr: R interface for Apache Spark\n================\n\n<!-- README.md is generated from README.Rmd. Please edit that file -->\n\n<!-- badges: start -->\n\n[![R-CMD-check](https://github.com/sparklyr/sparklyr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/sparklyr/sparklyr/actions/workflows/R-CMD-check.yaml)\n[![Spark-Tests](https://github.com/sparklyr/sparklyr/actions/workflows/spark-tests.yaml/badge.svg)](https://github.com/sparklyr/sparklyr/actions/workflows/spark-tests.yaml)\n[![CRAN\nstatus](https://www.r-pkg.org/badges/version/sparklyr)](https://CRAN.R-project.org/package=sparklyr)\n[![Codecov test\ncoverage](https://codecov.io/gh/sparklyr/sparklyr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/sparklyr/sparklyr?branch=main)\n<!-- badges: end -->\n\n- Install and connect to [Spark](https://spark.apache.org/) using YARN,\n  Mesos, Livy or Kubernetes.\n- Use [dplyr](#using-dplyr) to filter and aggregate Spark datasets and\n  [streams](https://spark.posit.co/guides/streaming/) then bring them\n  into R for analysis and visualization.\n- Create interoperable machine learning\n  [pipelines](https://spark.posit.co/guides/pipelines.html)\n- Create [extensions](#extensions) that call the full Spark API or run\n  [distributed R](#distributed-r) code to support new functionality.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Connecting to Spark](#connecting-to-spark)\n- [Using dplyr](#using-dplyr)\n  - [Window Functions](#window-functions)\n- [Using SQL](#using-sql)\n- [Machine Learning](#machine-learning)\n- [Reading and Writing Data](#reading-and-writing-data)\n- [Distributed R](#distributed-r)\n- [Extensions](#extensions)\n- [Table Utilities](#table-utilities)\n- [Connection Utilities](#connection-utilities)\n- [RStudio IDE](#rstudio-ide)\n- [Using H2O](#using-h2o)\n- [Connecting through Livy](#connecting-through-livy)\n- [Connecting through Databricks\n  Connect](#connecting-through-databricks-connect-v2)\n\n## Installation\n\nYou can install the **sparklyr** package from\n[CRAN](https://CRAN.r-project.org) as follows:\n\n``` r\ninstall.packages(\"sparklyr\")\n```\n\nYou should also install a local version of Spark for development\npurposes:\n\n``` r\nlibrary(sparklyr)\nspark_install()\n```\n\nTo upgrade to the latest version of sparklyr, run the following command\nand restart your r session:\n\n``` r\ninstall.packages(\"devtools\")\ndevtools::install_github(\"sparklyr/sparklyr\")\n```\n\n## Connecting to Spark\n\nYou can connect to both local instances of Spark as well as remote Spark\nclusters. Here we’ll connect to a local instance of Spark via the\n[spark_connect](https://spark.posit.co/packages/sparklyr/latest/reference/spark-connections.html)\nfunction:\n\n``` r\nlibrary(sparklyr)\nsc <- spark_connect(master = \"local\")\n```\n\nThe returned Spark connection (`sc`) provides a remote dplyr data source\nto the Spark cluster.\n\nFor more information on connecting to remote Spark clusters see the\n[Deployment](https://spark.posit.co/deployment.html) section of the\nsparklyr website.\n\n## Using dplyr\n\nWe can now use all of the available dplyr verbs against the tables\nwithin the cluster.\n\nWe’ll start by copying some datasets from R into the Spark cluster (note\nthat you may need to install the nycflights13 and Lahman packages in\norder to execute this code):\n\n``` r\ninstall.packages(c(\"nycflights13\", \"Lahman\"))\n```\n\n``` r\nlibrary(dplyr)\niris_tbl <- copy_to(sc, iris, overwrite = TRUE)\nflights_tbl <- copy_to(sc, nycflights13::flights, \"flights\", overwrite = TRUE)\nbatting_tbl <- copy_to(sc, Lahman::Batting, \"batting\", overwrite = TRUE)\nsrc_tbls(sc)\n#> [1] \"batting\" \"flights\" \"iris\"\n```\n\nTo start with here’s a simple filtering example:\n\n``` r\n# filter by departure delay and print the first few records\nflights_tbl %>% filter(dep_delay == 2)\n#> # Source:   SQL [?? x 19]\n#> # Database: spark_connection\n#>     year month   day dep_time sched_dep_time dep_delay\n#>    <int> <int> <int>    <int>          <int>     <dbl>\n#>  1  2013     1     1      517            515         2\n#>  2  2013     1     1      542            540         2\n#>  3  2013     1     1      702            700         2\n#>  4  2013     1     1      715            713         2\n#>  5  2013     1     1      752            750         2\n#>  6  2013     1     1      917            915         2\n#>  7  2013     1     1      932            930         2\n#>  8  2013     1     1     1028           1026         2\n#>  9  2013     1     1     1042           1040         2\n#> 10  2013     1     1     1231           1229         2\n#> # ℹ more rows\n#> # ℹ 13 more variables: arr_time <int>,\n#> #   sched_arr_time <int>, arr_delay <dbl>, carrier <chr>,\n#> #   flight <int>, tailnum <chr>, origin <chr>, dest <chr>,\n#> #   air_time <dbl>, distance <dbl>, hour <dbl>,\n#> #   minute <dbl>, time_hour <dttm>\n```\n\n[Introduction to dplyr](https://spark.posit.co/guides/dplyr.html)\nprovides additional `dplyr` examples you can try. For example, consider\nthe last example from the tutorial which plots data on flight delays:\n\n``` r\ndelay <- flights_tbl %>%\n  group_by(tailnum) %>%\n  summarise(count = n(), dist = mean(distance), delay = mean(arr_delay)) %>%\n  filter(count > 20, dist < 2000, !is.na(delay)) %>%\n  collect()\n\n# plot delays\nlibrary(ggplot2)\nggplot(delay, aes(dist, delay)) +\n  geom_point(aes(size = count), alpha = 1/2) +\n  geom_smooth() +\n  scale_size_area(max_size = 2)\n#> `geom_smooth()` using method = 'gam' and formula = 'y ~\n#> s(x, bs = \"cs\")'\n```\n\n<img src=\"tools/readme/dplyr-ggplot2-1.png\" width=\"100%\" />\n\n### Window Functions\n\ndplyr [window\nfunctions](https://spark.posit.co/guides/dplyr.html#grouping) are also\nsupported, for example:\n\n``` r\nbatting_tbl %>%\n  select(playerID, yearID, teamID, G, AB:H) %>%\n  arrange(playerID, yearID, teamID) %>%\n  group_by(playerID) %>%\n  filter(min_rank(desc(H)) <= 2 & H > 0)\n#> # Source:     SQL [?? x 7]\n#> # Database:   spark_connection\n#> # Groups:     playerID\n#> # Ordered by: playerID, yearID, teamID\n#>    playerID  yearID teamID     G    AB     R     H\n#>    <chr>      <int> <chr>  <int> <int> <int> <int>\n#>  1 abadijo01   1875 PH3       11    45     3    10\n#>  2 abadijo01   1875 BR2        1     4     1     1\n#>  3 abbeybe01   1896 BRO       25    63     7    12\n#>  4 abbeybe01   1892 WAS       27    75     5     9\n#>  5 abbeych01   1894 WAS      129   523    95   164\n#>  6 abbeych01   1895 WAS      133   516   102   142\n#>  7 abbotfr01   1903 CLE       77   255    25    60\n#>  8 abbotfr01   1905 PHI       42   128     9    25\n#>  9 abbotky01   1992 PHI       31    29     1     2\n#> 10 abbotky01   1995 PHI       18     2     1     1\n#> # ℹ more rows\n```\n\nFor additional documentation on using dplyr with Spark see the\n[dplyr](https://spark.posit.co/dplyr.html) section of the sparklyr\nwebsite.\n\n## Using SQL\n\nIt’s also possible to execute SQL queries directly against tables within\na Spark cluster. The `spark_connection` object implements a\n[DBI](https://github.com/r-dbi/DBI) interface for Spark, so you can use\n`dbGetQuery()` to execute SQL and return the result as an R data frame:\n\n``` r\nlibrary(DBI)\niris_preview <- dbGetQuery(sc, \"SELECT * FROM iris LIMIT 10\")\niris_preview\n#>    Sepal_Length Sepal_Width Petal_Length Petal_Width\n#> 1           5.1         3.5          1.4         0.2\n#> 2           4.9         3.0          1.4         0.2\n#> 3           4.7         3.2          1.3         0.2\n#> 4           4.6         3.1          1.5         0.2\n#> 5           5.0         3.6          1.4         0.2\n#> 6           5.4         3.9          1.7         0.4\n#> 7           4.6         3.4          1.4         0.3\n#> 8           5.0         3.4          1.5         0.2\n#> 9           4.4         2.9          1.4         0.2\n#> 10          4.9         3.1          1.5         0.1\n#>    Species\n#> 1   setosa\n#> 2   setosa\n#> 3   setosa\n#> 4   setosa\n#> 5   setosa\n#> 6   setosa\n#> 7   setosa\n#> 8   setosa\n#> 9   setosa\n#> 10  setosa\n```\n\n## Machine Learning\n\nYou can orchestrate machine learning algorithms in a Spark cluster via\nthe [machine\nlearning](https://spark.apache.org/docs/latest/mllib-guide.html)\nfunctions within **sparklyr**. These functions connect to a set of\nhigh-level APIs built on top of DataFrames that help you create and tune\nmachine learning workflows.\n\nHere’s an example where we use\n[ml_linear_regression](https://spark.posit.co/packages/sparklyr/latest/reference/ml_linear_regression/)\nto fit a linear regression model. We’ll use the built-in `mtcars`\ndataset, and see if we can predict a car’s fuel consumption (`mpg`)\nbased on its weight (`wt`), and the number of cylinders the engine\ncontains (`cyl`). We’ll assume in each case that the relationship\nbetween `mpg` and each of our features is linear.\n\n``` r\n# copy mtcars into spark\nmtcars_tbl <- copy_to(sc, mtcars, overwrite = TRUE)\n\n# transform our data set, and then partition into 'training', 'test'\npartitions <- mtcars_tbl %>%\n  filter(hp >= 100) %>%\n  mutate(cyl8 = cyl == 8) %>%\n  sdf_partition(training = 0.5, test = 0.5, seed = 1099)\n\n# fit a linear model to the training dataset\nfit <- partitions$training %>%\n  ml_linear_regression(response = \"mpg\", features = c(\"wt\", \"cyl\"))\nfit\n#> Formula: mpg ~ wt + cyl\n#> \n#> Coefficients:\n#> (Intercept)          wt         cyl \n#>  37.1464554  -4.3408005  -0.5830515\n```\n\nFor linear regression models produced by Spark, we can use `summary()`\nto learn a bit more about the quality of our fit, and the statistical\nsignificance of each of our predictors.\n\n``` r\nsummary(fit)\n#> Deviance Residuals:\n#>     Min      1Q  Median      3Q     Max \n#> -2.5134 -0.9158 -0.1683  1.1503  2.1534 \n#> \n#> Coefficients:\n#> (Intercept)          wt         cyl \n#>  37.1464554  -4.3408005  -0.5830515 \n#> \n#> R-Squared: 0.9428\n#> Root Mean Squared Error: 1.409\n```\n\nSpark machine learning supports a wide array of algorithms and feature\ntransformations and as illustrated above it’s easy to chain these\nfunctions together with dplyr pipelines. To learn more see the [machine\nlearning](https://spark.posit.co/mlib/) section.\n\n## Reading and Writing Data\n\nYou can read and write data in CSV, JSON, and Parquet formats. Data can\nbe stored in HDFS, S3, or on the local filesystem of cluster nodes.\n\n``` r\ntemp_csv <- tempfile(fileext = \".csv\")\ntemp_parquet <- tempfile(fileext = \".parquet\")\ntemp_json <- tempfile(fileext = \".json\")\n\nspark_write_csv(iris_tbl, temp_csv)\niris_csv_tbl <- spark_read_csv(sc, \"iris_csv\", temp_csv)\n\nspark_write_parquet(iris_tbl, temp_parquet)\niris_parquet_tbl <- spark_read_parquet(sc, \"iris_parquet\", temp_parquet)\n\nspark_write_json(iris_tbl, temp_json)\niris_json_tbl <- spark_read_json(sc, \"iris_json\", temp_json)\n\nsrc_tbls(sc)\n#> [1] \"batting\"      \"flights\"      \"iris\"        \n#> [4] \"iris_csv\"     \"iris_json\"    \"iris_parquet\"\n#> [7] \"mtcars\"\n```\n\n## Distributed R\n\nYou can execute arbitrary r code across your cluster using\n`spark_apply()`. For example, we can apply `rgamma` over `iris` as\nfollows:\n\n``` r\nspark_apply(iris_tbl, function(data) {\n  data[1:4] + rgamma(1,2)\n})\n#> # Source:   table<`sparklyr_tmp__752f1c17_51c6_45bc_a22e_fa06e1ebac58`> [?? x 4]\n#> # Database: spark_connection\n#>    Sepal_Length Sepal_Width Petal_Length Petal_Width\n#>           <dbl>       <dbl>        <dbl>       <dbl>\n#>  1        10.1         8.48         6.38        5.18\n#>  2         9.88        7.98         6.38        5.18\n#>  3         9.68        8.18         6.28        5.18\n#>  4         9.58        8.08         6.48        5.18\n#>  5         9.98        8.58         6.38        5.18\n#>  6        10.4         8.88         6.68        5.38\n#>  7         9.58        8.38         6.38        5.28\n#>  8         9.98        8.38         6.48        5.18\n#>  9         9.38        7.88         6.38        5.18\n#> 10         9.88        8.08         6.48        5.08\n#> # ℹ more rows\n```\n\nYou can also group by columns to perform an operation over each group of\nrows and make use of any package within the closure:\n\n``` r\nspark_apply(\n  iris_tbl,\n  function(e) broom::tidy(lm(Petal_Width ~ Petal_Length, e)),\n  columns = c(\"term\", \"estimate\", \"std.error\", \"statistic\", \"p.value\"),\n  group_by = \"Species\"\n)\n#> # Source:   table<`sparklyr_tmp__11d902f5_6218_41db_85dd_72c5ebe98eab`> [?? x 6]\n#> # Database: spark_connection\n#>   Species    term      estimate std.error statistic  p.value\n#>   <chr>      <chr>        <dbl>     <dbl>     <dbl>    <dbl>\n#> 1 versicolor (Interce…  -0.0843    0.161     -0.525 6.02e- 1\n#> 2 versicolor Petal_Le…   0.331     0.0375     8.83  1.27e-11\n#> 3 virginica  (Interce…   1.14      0.379      2.99  4.34e- 3\n#> 4 virginica  Petal_Le…   0.160     0.0680     2.36  2.25e- 2\n#> 5 setosa     (Interce…  -0.0482    0.122     -0.396 6.94e- 1\n#> 6 setosa     Petal_Le…   0.201     0.0826     2.44  1.86e- 2\n```\n\n## Extensions\n\nThe facilities used internally by sparklyr for its `dplyr` and machine\nlearning interfaces are available to extension packages. Since Spark is\na general purpose cluster computing system there are many potential\napplications for extensions (e.g.  interfaces to custom machine learning\npipelines, interfaces to 3rd party Spark packages, etc.).\n\nHere’s a simple example that wraps a Spark text file line counting\nfunction with an R function:\n\n``` r\n# write a CSV\ntempfile <- tempfile(fileext = \".csv\")\nwrite.csv(nycflights13::flights, tempfile, row.names = FALSE, na = \"\")\n\n# define an R interface to Spark line counting\ncount_lines <- function(sc, path) {\n  spark_context(sc) %>%\n    invoke(\"textFile\", path, 1L) %>%\n      invoke(\"count\")\n}\n\n# call spark to count the lines of the CSV\ncount_lines(sc, tempfile)\n#> [1] 336777\n```\n\nTo learn more about creating extensions see the\n[Extensions](https://spark.posit.co/guides/extensions.html) section of\nthe sparklyr website.\n\n## Table Utilities\n\nYou can cache a table into memory with:\n\n``` r\ntbl_cache(sc, \"batting\")\n```\n\nand unload from memory using:\n\n``` r\ntbl_uncache(sc, \"batting\")\n```\n\n## Connection Utilities\n\nYou can view the Spark web console using the `spark_web()` function:\n\n``` r\nspark_web(sc)\n```\n\nYou can show the log using the `spark_log()` function:\n\n``` r\nspark_log(sc, n = 10)\n#> {\"ts\":\"2025-03-18T05:33:03.487Z\",\"level\":\"INFO\",\"msg\":\"Running task 0.0 in stage 90.0 (TID 127)\",\"context\":{\"task_name\":\"task 0.0 in stage 90.0 (TID 127)\"},\"logger\":\"Executor\"}\n#> {\"ts\":\"2025-03-18T05:33:03.491Z\",\"level\":\"INFO\",\"msg\":\"Task (TID 127) input split: file:/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T/RtmpTDeQSI/fileaff16a4bc7cf.csv:0+33313106\",\"context\":{\"input_split\":\"file:/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T/RtmpTDeQSI/fileaff16a4bc7cf.csv:0+33313106\",\"task_id\":\"127\",\"task_name\":\"task 0.0 in stage 90.0 (TID 127)\"},\"logger\":\"HadoopRDD\"}\n#> {\"ts\":\"2025-03-18T05:33:03.597Z\",\"level\":\"INFO\",\"msg\":\"Finished task 0.0 in stage 90.0 (TID 127). 1078 bytes result sent to driver\",\"context\":{\"num_bytes\":\"1078\",\"task_name\":\"task 0.0 in stage 90.0 (TID 127)\"},\"logger\":\"Executor\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Finished task 0.0 in stage 90.0 (TID 127) in 116 ms on localhost (executor driver) (1/1)\",\"context\":{\"duration\":\"116\",\"executor_id\":\"driver\",\"host\":\"localhost\",\"num_successful_tasks\":\"1\",\"num_tasks\":\"1\",\"task_name\":\"task 0.0 in stage 90.0 (TID 127)\"},\"logger\":\"TaskSetManager\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Removed TaskSet 90.0 whose tasks have all completed, from pool \",\"context\":{\"pool_name\":\"\",\"stage_attempt\":\"0\",\"stage_id\":\"90\"},\"logger\":\"TaskSchedulerImpl\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"ResultStage 90 (count at NativeMethodAccessorImpl.java:0) finished in 118 ms\",\"context\":{\"stage\":\"ResultStage 90\",\"stage_name\":\"count at NativeMethodAccessorImpl.java:0\",\"time_units\":\"118\"},\"logger\":\"DAGScheduler\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Job 74 is finished. Cancelling potential speculative or zombie tasks for this job\",\"context\":{\"job_id\":\"74\"},\"logger\":\"DAGScheduler\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Canceling stage 90\",\"context\":{\"stage_id\":\"90\"},\"logger\":\"TaskSchedulerImpl\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Killing all running tasks in stage 90: Stage finished\",\"context\":{\"reason\":\"Stage finished\",\"stage_id\":\"90\"},\"logger\":\"TaskSchedulerImpl\"}\n#> {\"ts\":\"2025-03-18T05:33:03.598Z\",\"level\":\"INFO\",\"msg\":\"Job 74 finished: count at NativeMethodAccessorImpl.java:0, took 118.374959 ms\",\"context\":{\"call_site_short_form\":\"count at NativeMethodAccessorImpl.java:0\",\"job_id\":\"74\",\"time\":\"118.374959\"},\"logger\":\"DAGScheduler\"}\n```\n\nFinally, we disconnect from Spark:\n\n``` r\n  spark_disconnect(sc)\n```\n\n## RStudio IDE\n\nThe RStudio IDE includes integrated support for Spark and the sparklyr\npackage, including tools for:\n\n- Creating and managing Spark connections\n- Browsing the tables and columns of Spark DataFrames\n- Previewing the first 1,000 rows of Spark DataFrames\n\nOnce you’ve installed the sparklyr package, you should find a new\n**Spark** pane within the IDE. This pane includes a **New Connection**\ndialog which can be used to make connections to local or remote Spark\ninstances.\n\nOnce you’ve connected to Spark you’ll be able to browse the tables\ncontained within the Spark cluster and preview Spark DataFrames using\nthe standard RStudio data viewer.\n\nYou can also connect to Spark through [Livy](https://livy.apache.org/)\nthrough a new connection dialog.\n\n<div style=\"margin-bottom: 15px;\">\n\n<\/div>\n\n## Using H2O\n\n[rsparkling](https://cran.r-project.org/package=rsparkling) is a CRAN\npackage from [H2O](https://h2o.ai/) that extends\n[sparklyr](https://spark.posit.co/) to provide an interface into\n[Sparkling Water](https://github.com/h2oai/sparkling-water). For\ninstance, the following example installs, configures and runs\n[h2o.glm](https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/glm.html):\n\n``` r\nlibrary(rsparkling)\nlibrary(sparklyr)\nlibrary(dplyr)\nlibrary(h2o)\n\nsc <- spark_connect(master = \"local\", version = \"2.3.2\")\nmtcars_tbl <- copy_to(sc, mtcars, \"mtcars\", overwrite = TRUE)\n\nmtcars_h2o <- as_h2o_frame(sc, mtcars_tbl, strict_version_check = FALSE)\n\nmtcars_glm <- h2o.glm(x = c(\"wt\", \"cyl\"),\n                      y = \"mpg\",\n                      training_frame = mtcars_h2o,\n                      lambda_search = TRUE)\n```\n\n``` r\nmtcars_glm\n```\n\n    #> Model Details:\n    #> ==============\n    #>\n    #> H2ORegressionModel: glm\n    #> Model ID:  GLM_model_R_1527265202599_1\n    #> GLM Model: summary\n    #>     family     link                              regularization\n    #> 1 gaussian identity Elastic Net (alpha = 0.5, lambda = 0.1013 )\n    #>                                                                lambda_search\n    #> 1 nlambda = 100, lambda.max = 10.132, lambda.min = 0.1013, lambda.1se = -1.0\n    #>   number_of_predictors_total number_of_active_predictors\n    #> 1                          2                           2\n    #>   number_of_iterations                                training_frame\n    #> 1                  100 frame_rdd_31_ad5c4e88ec97eb8ccedae9475ad34e02\n    #>\n    #> Coefficients: glm coefficients\n    #>       names coefficients standardized_coefficients\n    #> 1 Intercept    38.941654                 20.090625\n    #> 2       cyl    -1.468783                 -2.623132\n    #> 3        wt    -3.034558                 -2.969186\n    #>\n    #> H2ORegressionMetrics: glm\n    #> ** Reported on training data. **\n    #>\n    #> MSE:  6.017684\n    #> RMSE:  2.453097\n    #> MAE:  1.940985\n    #> RMSLE:  0.1114801\n    #> Mean Residual Deviance :  6.017684\n    #> R^2 :  0.8289895\n    #> Null Deviance :1126.047\n    #> Null D.o.F. :31\n    #> Residual Deviance :192.5659\n    #> Residual D.o.F. :29\n    #> AIC :156.2425\n\n``` r\nspark_disconnect(sc)\n```\n\n## Connecting through Livy\n\n[Livy](https://github.com/cloudera/livy) enables remote connections to\nApache Spark clusters. However, please notice that connecting to Spark\nclusters through Livy is much slower than any other connection method.\n\nBefore connecting to Livy, you will need the connection information to\nan existing service running Livy. Otherwise, to test `livy` in your\nlocal environment, you can install it and run it locally as follows:\n\n``` r\nlivy_install()\n```\n\n``` r\nlivy_service_start()\n```\n\nTo connect, use the Livy service address as `master` and\n`method = \"livy\"` in `spark_connect()`. Once connection completes, use\n`sparklyr` as usual, for instance:\n\n``` r\nsc <- spark_connect(master = \"http://localhost:8998\", method = \"livy\", version = \"3.0.0\")\ncopy_to(sc, iris, overwrite = TRUE)\n\nspark_disconnect(sc)\n```\n\nOnce you are done using `livy` locally, you should stop this service\nwith:\n\n``` r\nlivy_service_stop()\n```\n\nTo connect to remote `livy` clusters that support basic authentication\nconnect as:\n\n``` r\nconfig <- livy_config(username=\"<username>\", password=\"<password>\")\nsc <- spark_connect(master = \"<address>\", method = \"livy\", config = config)\nspark_disconnect(sc)\n```\n\n## Connecting through Databricks Connect v2\n\n`sparklyr` is able to interact with [Databricks Connect\nv2](https://docs.databricks.com/en/dev-tools/databricks-connect/index.html)\nvia a new extension called `pysparklyr`. To learn how to use, and the\nlatest updates on this integration see [the article in `sparklyr`’s\nofficial\nwebsite](https://spark.posit.co/deployment/databricks-connect.html).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B1B2:3BCC6:17D56D:5E2DD3:6AB92BE8"},"text_sha256":"df7e244143c616c83cfb6ce3bffb6074b65c1d2af4b47d2f29d12ca22feded8b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-multilearn/scikit-multilearn","input_row":{"repository":"scikit-multilearn/scikit-multilearn","url":"https://github.com/scikit-multilearn/scikit-multilearn","name":"scikit-multilearn","owner":"scikit-multilearn","description":"A scikit-learn based module for multi-label et. al. classification","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":954,"issues":202,"created_at":"2014-04-30T13:05:44Z","updated_at":"2026-09-24T06:27:44Z","first_commit_at":"2014-04-30T13:05:44Z","last_commit_at":"2023-04-19T21:43:19Z","activity_months":107.63,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:57.202Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-multilearn/scikit-multilearn","visibility":"public","created_at":"2014-04-30T13:05:44Z","updated_at":"2026-09-24T06:27:44Z","private":false,"fork":false,"archived":false,"stargazers_count":954,"open_issues_count":92,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2088","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:1811B7E:1C37752:6AB92BE9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2087","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E6:731F6:17FB3EA:1C20E45:6AB92BE9"},"commit":{"sha":"e5648ed7f0c2eec97477e59eb706dc645490670d","url":"https://github.com/scikit-multilearn/scikit-multilearn/commit/e5648ed7f0c2eec97477e59eb706dc645490670d","date":"2018-05-11T15:12:25Z","author_date":"2018-05-10T23:31:29Z","committer_date":"2018-05-11T15:12:25Z","tree_sha":"9f5c19433ebb072161b3cb3eae16df4b79af051c","message_first_line":"don't build a list if noone needs it"},"tree_request_status":200,"tree_rate":{"github_remaining":"2086","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:17DFB51:1C056B8:6AB92BEA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4058,"blob_sha":"4c7cd61bd64a8ee5916cc7a63e0f7ff1af73572e","priority":0}],"documents":[{"path":"README.md","size":4058,"blob_sha":"4c7cd61bd64a8ee5916cc7a63e0f7ff1af73572e","priority":0,"status":200,"text":"# scikit-multilearn\n\n[![PyPI version](https://badge.fury.io/py/scikit-multilearn.svg)](https://badge.fury.io/py/scikit-multilearn)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![Build Status](https://travis-ci.org/scikit-multilearn/scikit-multilearn.svg?branch=master)](https://travis-ci.org/scikit-multilearn/scikit-multilearn)\n\n__scikit-multilearn__ is a Python module capable of performing multi-label\nlearning tasks. It is built on-top of various scientific Python packages\n([numpy](http://www.numpy.org/), [scipy](https://www.scipy.org/)) and\nfollows a similar API to that of [scikit-learn](http://scikit-learn.org/).\n\n- __Website:__ [scikit.ml](http://scikit.ml)\n- __Documentation:__ [scikit-multilearn Documentation](http://scikit.ml/api/index.html)\n\n\n## Features\n\n- __Native Python implementation.__ A native Python implementation for a variety of multi-label classification algorithms. To see the list of all supported classifiers, check this [link](http://scikit.ml/#classifiers).\n\n- __Interface to Meka.__ A Meka wrapper class is implemented for reference purposes and integration. This provides access to all methods available in MEKA, MULAN, and WEKA &mdash; the reference standard in the field.\n\n- __Builds upon giants!__ Team-up with the power of numpy and scikit. You can use scikit-learn's base classifiers as scikit-multilearn's classifiers. In addition, the two packages follow a similar API.\n\n## Dependencies\n\n- numpy\n- scipy\n- igraph\n- scikit-learn\n- liac-arf==2.1.0\n\n## Installation\n\nTo install scikit-multilearn, simply type the following command:\n\n```bash\n$ pip install scikit-multilearn\n```\n\nThis will install the latest release from the Python package index. If you\nwish to install the bleeding-edge version, then clone this repository and\nrun `setup.py`:\n\n```bash\n$ git clone https://github.com/scikit-multilearn/scikit-multilearn.git\n$ cd scikit-multilearn\n$ python setup.py\n```\n\n## Basic Usage\n\nBefore proceeding to classification,  this library assumes that you have\na dataset with the following matrices:\n\n- `x_train`, `x_test`: training and test feature matrices of size `(n_samples, n_features)`\n- `y_train`, `y_test`: training and test label matrices of size `(n_samples, n_labels)`\n\nSuppose we wanted to use a problem-transformation method called Binary\nRelevance, which treats each label as a separate single-label classification\nproblem, to a Support-vector machine (SVM) classifier, we simply perform\nthe following tasks:\n\n```python\n# Import BinaryRelevance from skmultilearn\nfrom skmultilearn.problem_transform import BinaryRelevance\n\n# Import SVC classifier from sklearn\nfrom sklearn.svm import SVC\n\n# Setup the classifier\nclassifier = BinaryRelevance(classifier=SVC(), require_dense=[False,True])\n\n# Train\nclassifier.fit(X_train, y_train)\n\n# Predict\ny_pred = classifier.predict(X_test)\n```\n\nMore examples and use-cases can be seen in the \n[documentation](http://scikit.ml/api/classify.html). For using the MEKA\nwrapper, check this [link](http://scikit.ml/api/meka.html#mekawrapper).\n\n## Contributing\n\nThis project is open for contributions. Here are some of the ways for\nyou to contribute:\n\n- Bug reports/fix\n- Features requests\n- Use-case demonstrations\n- Documentation updates\n\nIn case you want to implement your own multi-label classifier, please \nread our [Developer's Guide](http://scikit.ml/api/base.html) to help\nyou integrate your implementation in our API.\n\nTo make a contribution, just fork this repository, push the changes\nin your fork, open up an issue, and make a Pull Request!\n\nWe're also available in Slack! Just go to our [slack group](https://scikit-ml.slack.com/).\n\n## Cite\n\nIf you used scikit-multilearn in your research or project, please\ncite [our work](https://arxiv.org/abs/1702.01460):\n\n```bibtex\n@article{szymanski2017scikit,\n  title={A scikit-based Python environment for performing multi-label classification},\n  author={Szyma{\\'n}ski, Piotr},\n  journal={arXiv preprint arXiv:1702.01460},\n  year={2017}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E18:386840:186578:5EBE6A:6AB92BE8"},"text_sha256":"99aac5b887d558ea14bcdd4397a4331e79e9e4a69edfe49b0b42325b6e6d0779"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2085","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E9:767EB:17FCB0B:1C2292B:6AB92BEA"},"commit":{"sha":"2ea8c414d6e11ab2b5b5d03cceb3f56ce8fe4215","url":"https://github.com/scikit-multilearn/scikit-multilearn/commit/2ea8c414d6e11ab2b5b5d03cceb3f56ce8fe4215","date":"2023-04-19T21:43:19Z","author_date":"2023-04-19T21:43:19Z","committer_date":"2023-04-19T21:43:19Z","tree_sha":"5b49b8d94dbe5a6e6faacea17f2b6d89171ae532","message_first_line":"Fix for issue #195. Using tf.compat.v1.reset_default_graph() to solve missing attribute in TF v2. (#287)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2084","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17C6CD7:1BEB31F:6AB92BEB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4679,"blob_sha":"30346aef89eefc2b57c839c23a8e382100941961","priority":0}],"documents":[{"path":"README.md","size":4679,"blob_sha":"30346aef89eefc2b57c839c23a8e382100941961","priority":0,"status":200,"text":"# scikit-multilearn\n\n[![PyPI version](https://badge.fury.io/py/scikit-multilearn.svg)](https://badge.fury.io/py/scikit-multilearn)\n[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n__scikit-multilearn__ is a Python module capable of performing multi-label\nlearning tasks. It is built on-top of various scientific Python packages\n([numpy](http://www.numpy.org/), [scipy](https://www.scipy.org/)) and\nfollows a similar API to that of [scikit-learn](http://scikit-learn.org/).\n\n- __Website:__ [scikit.ml](http://scikit.ml)\n- __Documentation:__ [scikit-multilearn Documentation](http://scikit.ml/api/skmultilearn.html)\n\n\n## Features\n\n- __Native Python implementation.__ A native Python implementation for a variety of multi-label classification algorithms. To see the list of all supported classifiers, check this [link](http://scikit.ml/#classifiers).\n\n- __Interface to Meka.__ A Meka wrapper class is implemented for reference purposes and integration. This provides access to all methods available in MEKA, MULAN, and WEKA &mdash; the reference standard in the field.\n\n- __Builds upon giants!__ Team-up with the power of numpy and scikit. You can use scikit-learn's base classifiers as scikit-multilearn's classifiers. In addition, the two packages follow a similar API.\n\n## Installation & Dependencies\n\nTo install scikit-multilearn, simply type the following command:\n\n```bash\n$ pip install scikit-multilearn\n```\n\nThis will install the latest release from the Python package index. If you\nwish to install the bleeding-edge version, then clone this repository and\nrun `setup.py`:\n\n```bash\n$ git clone https://github.com/scikit-multilearn/scikit-multilearn.git\n$ cd scikit-multilearn\n$ python setup.py\n```\n\nIn most cases requirements are installed when you install using `pip install scikit-multilearn` or run `python setup.py install`. There are also optional dependencies `pip install scikit-multilearn[gpl,keras,meka]` installs the GPL-incurring igraph for for igraph library based clusterers, keras for the keras classifiers and requirements for the meka bridge respectively.\n\nTo install `openNE`, run:\n\n```bash\npip install 'openne @ git+https://github.com/thunlp/OpenNE.git@master#subdirectory=src'\n```\n\nNote that installing the GPL licensed graphtool, for graphtool based clusters, is complicated, and must be done manually, please see: [graphtool install instructions](https://git.skewed.de/count0/graph-tool/wikis/installation-instructions)\n\n## Basic Usage\n\nBefore proceeding to classification,  this library assumes that you have\na dataset with the following matrices:\n\n- `x_train`, `x_test`: training and test feature matrices of size `(n_samples, n_features)`\n- `y_train`, `y_test`: training and test label matrices of size `(n_samples, n_labels)`\n\nSuppose we wanted to use a problem-transformation method called Binary\nRelevance, which treats each label as a separate single-label classification\nproblem, to a Support-vector machine (SVM) classifier, we simply perform\nthe following tasks:\n\n```python\n# Import BinaryRelevance from skmultilearn\nfrom skmultilearn.problem_transform import BinaryRelevance\n\n# Import SVC classifier from sklearn\nfrom sklearn.svm import SVC\n\n# Setup the classifier\nclassifier = BinaryRelevance(classifier=SVC(), require_dense=[False,True])\n\n# Train\nclassifier.fit(X_train, y_train)\n\n# Predict\ny_pred = classifier.predict(X_test)\n```\n\nMore examples and use-cases can be seen in the \n[documentation](http://scikit.ml/api/classify.html). For using the MEKA\nwrapper, check this [link](http://scikit.ml/api/meka.html#mekawrapper).\n\n## Contributing\n\nThis project is open for contributions. Here are some of the ways for\nyou to contribute:\n\n- Bug reports/fix\n- Features requests\n- Use-case demonstrations\n- Documentation updates\n\nIn case you want to implement your own multi-label classifier, please \nread our [Developer's Guide](http://scikit.ml/api/base.html) to help\nyou integrate your implementation in our API.\n\nTo make a contribution, just fork this repository, push the changes\nin your fork, open up an issue, and make a Pull Request!\n\nWe're also available in Slack! Just go to our [slack group](https://scikit-ml.slack.com/).\n\n## Cite\n\nIf you used scikit-multilearn in your research or project, please\ncite [our work](https://arxiv.org/abs/1702.01460):\n\n```bibtex\n@ARTICLE{2017arXiv170201460S,\n   author = {{Szyma{\\'n}ski}, P. and {Kajdanowicz}, T.},\n   title = \"{A scikit-based Python environment for performing multi-label classification}\",\n   journal = {ArXiv e-prints},\n   archivePrefix = \"arXiv\",\n   eprint = {1702.01460},\n   year = 2017,\n   month = feb\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17DCDD:5E34CE:6AB92BEA"},"text_sha256":"11bf65e8f29b562d97aaa8b1cb6ec908faeb6ceb04173da97fdd2c439cdcb63f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stanfordnmbl/osim-rl","input_row":{"repository":"stanfordnmbl/osim-rl","url":"https://github.com/stanfordnmbl/osim-rl","name":"osim-rl","owner":"stanfordnmbl","description":"Reinforcement learning environments with musculoskeletal models","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":948,"issues":174,"created_at":"2016-10-15T23:14:15Z","updated_at":"2026-09-18T08:05:12Z","first_commit_at":"2016-10-15T23:13:18Z","last_commit_at":"2020-02-20T05:29:13Z","activity_months":40.149999999999999,"ai_ml_match_topics":"machine-learning; reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:44:59.895Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stanfordnmbl/osim-rl","visibility":"public","created_at":"2016-10-15T23:14:15Z","updated_at":"2026-09-18T08:05:12Z","private":false,"fork":false,"archived":false,"stargazers_count":948,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2083","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0899:725A9:17E417B:1C09E5B:6AB92BEB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2082","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B1:73962:17DE3AB:1C03570:6AB92BEC"},"commit":{"sha":"669e6597f2dc037de08372225b87e8b00bc95046","url":"https://github.com/stanfordnmbl/osim-rl/commit/669e6597f2dc037de08372225b87e8b00bc95046","date":"2018-05-23T17:37:11Z","author_date":"2018-05-23T16:40:08Z","committer_date":"2018-05-23T17:37:11Z","tree_sha":"3ae33f33c5c6a8770bd366f36e15b1735dc8d762","message_first_line":"Update solutions.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2081","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091E:52542:17CA7B6:1BF01AA:6AB92BEC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20712,"blob_sha":"5cea491c52db1530c8e036c8872310cad4d2d650","priority":0}],"documents":[{"path":"README.md","size":20712,"blob_sha":"5cea491c52db1530c8e036c8872310cad4d2d650","priority":0,"status":200,"text":"UNDER CONSTRUCTION FOR NIPS 2018\n\n# NIPS2018: AI for prosthetics\n\nThis repository contains software required for participation in the NIPS 2018 Challenge: AI for prosthetics. See more details about the challenge [here](https://www.crowdai.org/challenges/nips-2018-ai-for-prosthetics).\n\nIn this competition, you are tasked with developing a controller to enable a physiologically-based human model to navigate a complex obstacle course as quickly as possible. You are provided with a human musculoskeletal model and a physics-based simulation environment where you can synthesize physically and physiologically accurate motion. Potential obstacles include external obstacles like steps, or a slippery floor, along with internal obstacles like muscle weakness or motor noise. You are scored based on the distance you travel through the obstacle course in a set amount of time.\n\n![HUMAN environment](https://raw.githubusercontent.com/stanfordnmbl/osim-rl/1679344e509e29bdcc2ee368ddf83e868d93bf61/demo/training.gif)\n\nTo model physics and biomechanics we use [OpenSim](https://github.com/opensim-org/opensim-core) - a biomechanical physics environment for musculoskeletal simulations.\n\n## Getting started\n\n**Anaconda** is required to run our simulations. Anaconda will create a virtual environment with all the necessary libraries, to avoid conflicts with libraries in your operating system. You can get anaconda from here https://www.continuum.io/downloads. In the following instructions we assume that Anaconda is successfully installed.\n\nWe support Windows, Linux, and Mac OSX (all in 64-bit). To install our simulator, you first need to create a conda environment with the OpenSim package.\n\nOn **Windows**, open a command prompt and type:\n\n    conda create -n opensim-rl -c kidzik opensim python=3.6.1\n    activate opensim-rl\n\nOn **Linux/OSX**, run:\n\n    conda create -n opensim-rl -c kidzik opensim python=3.6.1\n    source activate opensim-rl\n\nThese commands will create a virtual environment on your computer with the necessary simulation libraries installed. Next, you need to install our python reinforcement learning environment. Type (on all platforms):\n\n    conda install -c conda-forge lapack git\n    pip install git+https://github.com/stanfordnmbl/osim-rl.git\n\nIf the command `python -c \"import opensim\"` runs smoothly, you are done! Otherwise, please refer to our [FAQ](#frequently-asked-questions) section.\n\nNote that `source activate opensim-rl` activates the anaconda virtual environment. You need to type it every time you open a new terminal.\n\n## Basic usage\n\nTo execute 200 iterations of the simulation enter the `python` interpreter and run the following:\n```python\nfrom osim.env import L2RunEnv\n\nenv = L2RunEnv(visualize=True)\nobservation = env.reset()\nfor i in range(200):\n    observation, reward, done, info = env.step(env.action_space.sample())\n```\n![Random walk](https://raw.githubusercontent.com/stanfordnmbl/osim-rl/1679344e509e29bdcc2ee368ddf83e868d93bf61/demo/random.gif)\n\nThe function `env.action_space.sample()` returns a random vector for muscle activations, so, in this example, muscles are activated randomly (red indicates an active muscle and blue an inactive muscle).  Clearly with this technique we won't go too far.\n\nYour goal is to construct a controller, i.e. a function from the state space (current positions, velocities and accelerations of joints) to action space (muscle excitations), that will enable to model to travel as far as possible in a fixed amount of time. Suppose you trained a neural network mapping observations (the current state of the model) to actions (muscle excitations), i.e. you have a function `action = my_controller(observation)`, then\n```python\n# ...\ntotal_reward = 0.0\nfor i in range(200):\n    # make a step given by the controller and record the state and the reward\n    observation, reward, done, info = env.step(my_controller(observation))\n    total_reward += reward\n    if done:\n        break\n\n# Your reward is\nprint(\"Total reward %f\" % total_reward)\n```\nThere are many ways to construct the function `my_controller(observation)`. We will show how to do it with a DDPG (Deep Deterministic Policy Gradients) algorithm, using `keras-rl`. If you already have experience with training reinforcement learning models, you can skip the next section and go to [evaluation](#evaluation).\n\n## Training your first model\n\nBelow we present how to train a basic controller using [keras-rl](https://github.com/matthiasplappert/keras-rl). First you need to install extra packages:\n\n    conda install keras -c conda-forge\n    pip install git+https://github.com/matthiasplappert/keras-rl.git\n    git clone http://github.com/stanfordnmbl/osim-rl.git\n\n`keras-rl` is an excellent package compatible with [OpenAI](http://openai.com/), which allows you to quickly build your first models!\n\nGo to the `scripts` subdirectory from this repository\n\n    cd osim-rl/scripts\n\nThere are two scripts:\n* `example.py` for training (and testing) an agent using the DDPG algorithm.\n* `submit.py` for submitting the result to [crowdAI.org](https://www.crowdai.org/challenges/nips-2017-learning-to-run)\n\n### Training\n\n    python example.py --visualize --train --model sample\n\n### Test\n\nand for the gait example (walk as far as possible):\n\n    python example.py --visualize --test --model sample\n\n### Moving forward\n\nNote that it will take a while to train this model. You can find many tutorials, frameworks and lessons on-line. We particularly recommend:\n\nTutorials & Courses on Reinforcement Learning:\n* [Berkeley Deep RL course by Sergey Levine](http://rll.berkeley.edu/deeprlcourse/)\n* [Intro to RL on Karpathy's blog](http://karpathy.github.io/2016/05/31/rl/)\n* [Intro to RL by Tambet Matiisen](https://www.nervanasys.com/demystifying-deep-reinforcement-learning/)\n* [Deep RL course of David Silver](https://www.youtube.com/watch?v=2pWv7GOvuf0&list=PLHOg3HfW_teiYiq8yndRVwQ95LLPVUDJe)\n* [A comprehensive list of deep RL resources](https://github.com/dennybritz/reinforcement-learning)\n\nFrameworks and implementations of algorithms:\n* [RLLAB](https://github.com/openai/rllab)\n* [modular_rl](https://github.com/joschu/modular_rl)\n* [keras-rl](https://github.com/matthiasplappert/keras-rl)\n\nOpenSim and Biomechanics:\n* [OpenSim Documentation](http://simtk-confluence.stanford.edu:8080/display/OpenSim/OpenSim+Documentation)\n* [Muscle models](http://simtk-confluence.stanford.edu:8080/display/OpenSim/First-Order+Activation+Dynamics)\n* [Publication describing OpenSim](http://nmbl.stanford.edu/publications/pdf/Delp2007.pdf)\n* [Publication describing Simbody (multibody dynamics engine)](http://ac.els-cdn.com/S2210983811000241/1-s2.0-S2210983811000241-main.pdf?_tid=c22ea7d2-50ba-11e7-9f69-00000aacb361&acdnat=1497415051_124f3094c7fec3c60165f5d544a184f4)\n\nThis list is *by no means* exhaustive. If you find some resources particularly well-fit for this tutorial, please let us know!\n\n## Evaluation\n\nYour task is to build a function `f` which takes the current state `observation` (a 41 dimensional vector) and returns the muscle excitations `action` (18 dimensional vector) in a way that maximizes the reward.\n\nThe trial ends either if the pelvis of the model goes below `0.65` meters or if you reach `1000` iterations (corresponding to `10` seconds in the virtual environment). Your total reward is the position of the pelvis on the `x` axis after the last iteration minus a penalty for using ligament forces. Ligaments are tissues which prevent your joints from bending too much - overusing these tissues leads to injuries, so we want to avoid it. The penalty in the total reward is equal to the sum of forces generated by ligaments over the trial, divided by `10,000,000`.\n\nAfter each iteration you get a reward equal to the change of the `x` axis of pelvis during this iteration minus the magnitude of the ligament forces used in that iteration.\n\nYou can test your model on your local machine. For submission, you will need to interact with the remote environment: [crowdAI](https://www.crowdai.org/challenges/nips-2017-learning-to-run) sends you the current `observation` and you need to send back the action you take in the given state. You will be evaluated at three different levels of difficulty. For details, please refer to [Details of the environment](#details-of-the-environment).\n\n### Submission\n\nAssuming your controller is trained and is represented as a function `my_controller(observation)` returning an `action` you can submit it to [crowdAI](https://www.crowdai.org/challenges/nips-2017-learning-to-run) through interaction with an environment there:\n\n```python\nimport opensim as osim\nfrom osim.http.client import Client\nfrom osim.env import RunEnv\n\n# Settings\nremote_base = \"http://grader.crowdai.org:1729\"\ncrowdai_token = \"[YOUR_CROWD_AI_TOKEN_HERE]\"\n\nclient = Client(remote_base)\n\n# Create environment\nobservation = client.env_create(crowdai_token)\n\n# IMPLEMENTATION OF YOUR CONTROLLER\n# my_controller = ... (for example the one trained in keras_rl)\n\nwhile True:\n    [observation, reward, done, info] = client.env_step(my_controller(observation), True)\n    print(observation)\n    if done:\n        observation = client.env_reset()\n        if not observation:\n            break\n\nclient.submit()\n```\n\nIn the place of `[YOUR_CROWD_AI_TOKEN_HERE]` put your token from the profile page from [crowdai.org](http://crowdai.org/) website.\n\nNote that during the submission, the environment will get restarted. Since the environment is stochastic, you will need to submit three trials -- this way we make sure that your model is robust.\n\n### Rules\n\nIn order to avoid overfitting to the training environment, the top participants (those who obtained 15.0 points or more) will be asked to resubmit their solutions in the second round of the challenge. Environments in the second round will have the same structure but **10 obstacles** and different seeds. In each submission, there will be **10 simulation**. Each participant will have a limit of **3 submissions**. The final ranking will be based on the results from the second round.\n\nAdditional rules:\n* You are not allowed to use external datasets (e.g., kinematics of people walking)\n* Organizers reserve the right to modify challenge rules as required.\n\n## Details of the environment\n\nIn order to create an environment, use:\n```python\n    from osim.env import RunEnv\n\n    env = RunEnv(visualize = True)\n```\nParameters:\n\n* `visualize` - turn the visualizer on and off\n\n### Methods of `RunEnv`\n\n#### `reset(difficulty = 2, seed = None)`\n\nRestart the enivironment with a given `difficulty` level and a `seed`.\n\n* `difficulty` - `0` - no obstacles, `1` - 3 randomly positioned obstacles (balls fixed in the ground), `2` - same as `1` but also strength of the psoas muscles (the muscles that help bend the hip joint in the model) varies. The muscle strength is set to z * 100%, where z is a normal variable with the mean 1 and the standard deviation 0.1\n* `seed` - starting seed for the random number generator. If the seed is `None`, generation from the previous seed is continued.\n\nYour solution will be graded in the environment with `difficulty = 2`, yet it might be easier to train your model with `difficulty = 0` first and then retrain with a higher difficulty\n\n#### `step(action)`\n\nMake one iteration of the simulation.\n\n* `action` - a list of length `18` of continuous values in `[0,1]` corresponding to excitation of muscles.\n\nThe function returns:\n\n* `observation` - a list of length `41` of real values corresponding to the current state of the model. Variables are explained in the section \"Physics of the model\".\n\n* `reward` - reward gained in the last iteration. The reward is computed as a change in position of the pelvis along the x axis minus the penalty for the use of ligaments. See the \"Physics of the model\" section for details.\n\n* `done` - indicates if the move was the last step of the environment. This happens if either `1000` iterations were reached or the pelvis height is below `0.65` meters.\n\n* `info` - for compatibility with OpenAI, currently not used.\n\n### Physics and biomechanics of the model\n\nThe model is implemented in [OpenSim](https://github.com/opensim-org/opensim-core)[1], which relies on the [Simbody](https://github.com/simbody/simbody) physics engine. Note that, given recent successes in model-free reinforcement learning, expertise in biomechanics is not required to successfully compete in this challenge.\n\nTo summarize briefly, the agent is a musculoskeletal model that include body segments for each leg, a pelvis segment, and a single segment to represent the upper half of the body (trunk, head, arms). The segments are connected with joints (e.g., knee and hip) and the motion of these joints is controlled by the excitation of muscles. The muscles in the model have complex paths (e.g., muscles can cross more than one joint and there are redundant muscles). The muscle actuators themselves are also highly nonlinear. For example, there is a first order differential equation that relates electrical signal the nervous system sends to a muscle (the excitation) to the activation of a muscle (which describes how much force a muscle will actually generate given the muscle's current force-generating capacity). Given the musculoskeletal structure of bones, joint, and muscles, at each step of the simulation (corresponding to 0.01 seconds), the engine:\n* computes activations of muscles from the excitations vector provided to the `step()` function,\n* actuates muscles according to these activations,\n* computes torques generated due to muscle activations,\n* computes forces caused by contacting the ground,\n* computes velocities and positions of joints and bodies,\n* generates a new state based on forces, velocities, and positions of joints.\n\nIn each action, the following 18 muscles are actuated (9 per leg):\n* hamstrings,\n* biceps femoris,\n* gluteus maximus,\n* iliopsoas,\n* rectus femoris,\n* vastus,\n* gastrocnemius,\n* soleus,\n* tibialis anterior.\nThe action vector corresponds to these muscles in the same order (9 muscles of the right leg first, then 9 muscles of the left leg).\n\nThe observation contains 41 values:\n* position of the pelvis (rotation, x, y)\n* velocity of the pelvis (rotation, x, y)\n* rotation of each ankle, knee and hip (6 values)\n* angular velocity of each ankle, knee and hip (6 values)\n* position of the center of mass (2 values)\n* velocity of the center of mass (2 values)\n* positions (x, y) of head, pelvis, torso, left and right toes, left and right talus (14 values)\n* strength of left and right psoas: 1 for `difficulty < 2`, otherwise a random normal variable with mean 1 and standard deviation 0.1 fixed for the entire simulation\n* next obstacle: x distance from the pelvis, y position of the center relative to the the ground, radius.\n\nFor more details on the simulation framework, please refer to [1]. For more specific information about the muscles model we use, please refer to [2] or to [OpenSim documentation](ysimtk-confluence.stanford.edu:8080/display/OpenSim/Muscle+Model+Theory+and+Publications).\n\n[1] Delp, Scott L., et al. *\"OpenSim: open-source software to create and analyze dynamic simulations of movement.\"* IEEE transactions on biomedical engineering 54.11 (2007): 1940-1950.\n\n[2] Thelen, D.G. *\"Adjustment of muscle mechanics model parameters to simulate dynamic contractions in older adults.\"* ASME Journal of Biomechanical Engineering 125 (2003): 70–77.\n\n## Frequently Asked Questions\n\n**I'm getting 'version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference' error**\n\nIf you are getting this error:\n\n    ImportError: /opensim-rl/lib/python2.7/site-packages/opensim/libSimTKcommon.so.3.6:\n      symbol _ZTVNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, version\n      GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference\n\nTry `conda install libgcc`.\n\n**Can I use languages other than python?**\n\nYes, you just need to set up your own python grader and interact with it\nhttps://github.com/kidzik/osim-rl-grader. Find more details here [OpenAI http client](https://github.com/openai/gym-http-api)\n\n**Do you have a docker container?**\n\nYes, you can use https://hub.docker.com/r/stanfordnmbl/opensim-rl/\nNote, that connecting a display to a docker can be tricky and it's system dependent. Nevertheless, for training your models the display is not necessary -- the docker container can be handy for using multiple machines.\n\n**Some libraries are missing. What is required to run the environment?**\n\nMost of the libraries by default exist in major distributions of operating systems or are automatically downloaded by the conda environment. Yet, sometimes things are still missing. The minimal set of dependencies under Linux can be installed with\n\n    sudo apt install libquadmath0 libglu1-mesa libglu1-mesa-dev libsm6 libxi-dev libxmu-dev liblapack-dev\n\nPlease, try to find equivalent libraries for your OS and let us know -- we will put them here.\n\n**Why there are no energy constraints?**\n\nPlease refer to the issue https://github.com/stanfordnmbl/osim-rl/issues/34.\n\n**I have some memory leaks, what can I do?**\n\nPlease refer to\nhttps://github.com/stanfordnmbl/osim-rl/issues/10\nand to\nhttps://github.com/stanfordnmbl/osim-rl/issues/58\n\n**I see only python3 environment for Linux. How to install Windows environment?**\n\nPlease refer to\nhttps://github.com/stanfordnmbl/osim-rl/issues/29\n\n**How to visualize observations when running simulations on the server?**\n\nPlease refer to\nhttps://github.com/stanfordnmbl/osim-rl/issues/59\n\n**I still have more questions, how can I contact you?**\n\nFor questions related to the challenge please use [the challenge forum](https://www.crowdai.org/challenges/nips-2017-learning-to-run/topics).\nFor issues and problems related to installation process or to the implementation of the simulation environment feel free to create an [issue on GitHub](https://github.com/stanfordnmbl/osim-rl/issues).\n\n## Citing\n\nIf you use `osim-rl` in your research, you can cite it as follows:\n\n    @incollection{kidzinski2018learningtorun,\n      author      = \"Kidzi\\'nski, {\\L}ukasz and Mohanty, Sharada P and Ong, Carmichael and Hicks, Jennifer and Francis, Sean and Levine, Sergey and Salath\\'e, Marcel and Delp, Scott\",\n      title       = \"Learning to Run challenge: Synthesizing physiologically accurate motion using deep reinforcement learning\",\n      editor      = \"Escalera, Sergio and Weimer, Markus\",\n      booktitle   = \"NIPS 2017 Competition Book\",\n      publisher   = \"Springer\",\n      address     = \"Springer\",\n      year        = 2018\n    }\n\nIf you use the top solutions or other solution reports from the Learning to Run challenge, you can cite them as:\n\n    @incollection{jaskowski2018rltorunfast,\n      author      = \"Ja\\'skowski, Wojciech and Lykkeb{\\o}, Odd Rune and Toklu, Nihat Engin and Trifterer, Florian and Buk, Zden\\v{e}k and Koutn\\'{i}k, Jan and Gomez, Faustino\",\n      title       = \"{Reinforcement Learning to Run... Fast}\",\n      editor      = \"Escalera, Sergio and Weimer, Markus\",\n      booktitle   = \"NIPS 2017 Competition Book\",\n      publisher   = \"Springer\",\n      address     = \"Springer\",\n      year        = 2018\n    }\n\n    @incollection{kidzinski2018l2rsolutions,\n      author      = \"Kidzi\\'nski, {\\L}ukasz and Mohanty, Sharada P and Ong, Carmichael and Huang, Zhewei and Zhou, Shuchang and Pechenko, Anton and Stelmaszczyk, Adam and Jarosik, Piotr and Pavlov, Mikhail and Kolesnikov, Sergey and Plis, Sergey and Chen, Zhibo and Zhang, Zhizheng and Chen, Jiale and Shi, Jun and Zheng, Zhuobin and Yuan, Chun and Lin, Zhihui and Michalewski, Henryk and Miłoś, Piotr and Osiński, Błażej and Melnik andrew and Schilling, Malte and Ritter, Helge and Carroll, Sean and Hicks, Jennifer and Levine, Sergey and Salathé, Marcel and Delp, Scott\",\n      title       = \"Learning to run challenge solutions: Adapting reinforcement learning methods for neuromusculoskeletal environments\",\n      editor      = \"Escalera, Sergio and Weimer, Markus\",\n      booktitle   = \"NIPS 2017 Competition Book\",\n      publisher   = \"Springer\",\n      address     = \"Springer\",\n      year        = 2018\n    }\n\n## Credits\n\nThis challenge would not be possible without:\n* [OpenSim](https://github.com/opensim-org/opensim-core)\n* [National Center for Simulation in Rehabilitation Research](http://opensim.stanford.edu/)\n* [Mobilize Center](http://mobilize.stanford.edu/)\n* [CrowdAI](http://crowdai.org/)\n* [OpenAI gym](https://gym.openai.com/)\n* [OpenAI http client](https://github.com/openai/gym-http-api)\n* [keras-rl](https://github.com/matthiasplappert/keras-rl)\n* and many other teams, individuals and projects\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3AD0:241B62:17A465:5DFE04:6AB92BEB"},"text_sha256":"18bf5db765ef6328bc61dc1c3a946849c6d48e94ef68f3d68f71ca01b545566b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2080","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088C:6E5BD:17A2FDD:1BC747D:6AB92BED"},"commit":{"sha":"610b95cf0c4484f1acecd31187736b0113dcfb73","url":"https://github.com/stanfordnmbl/osim-rl/commit/610b95cf0c4484f1acecd31187736b0113dcfb73","date":"2020-02-20T05:29:13Z","author_date":"2020-02-20T05:29:13Z","committer_date":"2020-02-20T05:29:13Z","tree_sha":"acf3db6c2882fe5feee1d8b20af520cefcba5e7a","message_first_line":"python 3.6.1 now available in conda-forge"},"tree_request_status":200,"tree_rate":{"github_remaining":"2079","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093B:280FBC:17C6EB2:1BEB53D:6AB92BEE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7258,"blob_sha":"3a981fb702f51d4f5d0600f7b5c67cae9d2ef71a","priority":0}],"documents":[{"path":"README.md","size":7258,"blob_sha":"3a981fb702f51d4f5d0600f7b5c67cae9d2ef71a","priority":0,"status":200,"text":"# NeurIPS 2019: Learn to Move - Walk Around\n\nThis repository contains software required for participation in the NeurIPS 2019 Challenge: Learn to Move - Walk Around. See more details about the challenge [here](https://www.aicrowd.com/challenges/neurips-2019-learn-to-move-walk-around). See full documentation of our reinforcement learning environment [here](https://osim-rl.stanford.edu). In this document we will give very basic steps to get you set up for the challenge!\n\nYour task is to develop a controller for a physiologically plausible 3D human model to walk or run following velocity commands with minimum effort. You are provided with a human musculoskeletal model and a physics-based simulation environment, OpenSim. There will be three tracks:\n\n1) **Best performance**\n2) **Novel ML solution**\n3) **Novel biomechanical solution**, where all the winners of each track will be awarded.\n\nTo model physics and biomechanics we use [OpenSim](https://github.com/opensim-org/opensim-core) - a biomechanical physics environment for musculoskeletal simulations.\n\n## What's new compared to NIPS 2017: Learning to run?\n\nWe took into account comments from the last challenge and there are several changes:\n\n* You can use experimental data (to greatly speed up learning process)\n* We released the 3rd dimensions (the model can fall sideways)\n* We added a prosthetic leg -- the goal is to solve a medical challenge on modeling how walking will change after getting a prosthesis. Your work can speed up design, prototying, or tuning prosthetics!\n\nYou haven't heard of NIPS 2017: Learning to run? [Watch this video!](https://www.youtube.com/watch?v=rhNxt0VccsE)\n\n![HUMAN environment](https://s3.amazonaws.com/osim-rl/videos/running.gif)\n\n## Getting started\n\n**Anaconda** is required to run our simulations. Anaconda will create a virtual environment with all the necessary libraries, to avoid conflicts with libraries in your operating system. You can get anaconda from here https://docs.anaconda.com/anaconda/install/. In the following instructions we assume that Anaconda is successfully installed.\n\nFor the challenge we prepared [OpenSim](http://opensim.stanford.edu/) binaries as a conda environment to make the installation straightforward\n\nWe support Windows, Linux, and Mac OSX (all in 64-bit). To install our simulator, you first need to create a conda environment with the OpenSim package.\n\nOn **Windows**, open a command prompt and type:\n\n    conda create -n opensim-rl -c kidzik -c conda-forge opensim python=3.6.1\n    activate opensim-rl\n    pip install osim-rl\n\nOn **Linux/OSX**, run:\n\n    conda create -n opensim-rl -c kidzik -c conda-forge opensim python=3.6.1\n    source activate opensim-rl\n    pip install osim-rl\n\nThese commands will create a virtual environment on your computer with the necessary simulation libraries installed. If the command `python -c \"import opensim\"` runs smoothly, you are done! Otherwise, please refer to our [FAQ](http://osim-rl.stanford.edu/docs/faq/) section.\n\nNote that `source activate opensim-rl` activates the anaconda virtual environment. You need to type it every time you open a new terminal.\n\n## Basic usage\n\nTo execute 200 iterations of the simulation enter the `python` interpreter and run the following:\n```python\nfrom osim.env import L2M2019Env\n\nenv = L2M2019Env(visualize=True)\nobservation = env.reset()\nfor i in range(200):\n    observation, reward, done, info = env.step(env.action_space.sample())\n```\n![Random walk](https://raw.githubusercontent.com/stanfordnmbl/osim-rl/1679344e509e29bdcc2ee368ddf83e868d93bf61/demo/random.gif)\n\nThe function `env.action_space.sample()` returns a random vector for muscle activations, so, in this example, muscles are activated randomly (red indicates an active muscle and blue an inactive muscle).  Clearly with this technique we won't go too far.\n\nYour goal is to construct a controller, i.e. a function from the state space (current positions, velocities and accelerations of joints) to action space (muscle excitations), that will enable to model to travel as far as possible in a fixed amount of time. Suppose you trained a neural network mapping observations (the current state of the model) to actions (muscle excitations), i.e. you have a function `action = my_controller(observation)`, then\n```python\n# ...\ntotal_reward = 0.0\nfor i in range(200):\n    # make a step given by the controller and record the state and the reward\n    observation, reward, done, info = env.step(my_controller(observation))\n    total_reward += reward\n    if done:\n        break\n\n# Your reward is\nprint(\"Total reward %f\" % total_reward)\n```\n\nYou can find details about the [observation object here](http://osim-rl.stanford.edu/docs/nips2018/observation/).\n\n## Submission\n\n* Option 1: [**submit solution in docker container**](https://github.com/stanfordnmbl/neurips2019-learning-to-move-starter-kit)\n* Option 2: run controller on server environment: [**./examples/submission.py**](https://github.com/stanfordnmbl/osim-rl/blob/master/examples/submission.py)\n\nIn order to make a submission to AIcrowd, please refer to [this page](https://github.com/AIcrowd/neurips2019-learning-to-move-starter-kit)\n\n## Rules\n\nOrganizers reserve the right to modify challenge rules as required.\n\n## Read more in [the official documentation](http://osim-rl.stanford.edu/)\n\n* [Osim-rl interface](http://osim-rl.stanford.edu/docs/nips2018/interface/)\n* [How to train a model?](http://osim-rl.stanford.edu/docs/training/)\n* [More on training models](http://osim-rl.stanford.edu/docs/resources/)\n* [Experimental data](http://osim-rl.stanford.edu/docs/nips2018/experimental/)\n* [Physics underlying the model](http://osim-rl.stanford.edu/docs/nips2017/physics/)\n* [Frequently Asked Questions](http://osim-rl.stanford.edu/docs/faq/)\n* [Citing and credits](http://osim-rl.stanford.edu/docs/credits/)\n* [OpenSim documentation](http://opensim.stanford.edu/)\n\n## Contributions of participants\n\n* [Understanding the Challenge](https://www.endtoend.ai/blog/ai-for-prosthetics-1) - Great materials from [@seungjaeryanlee](https://github.com/seungjaeryanlee/) on how to start\n\n## Partners\n\n<div class=\"markdown-wrap\">\n            <a target=\"_blank\" href=\"https://cloud.google.com/\">\n              <img class=\"img-logo\" height=\"50\" src=\"https://dnczkxd1gcfu5.cloudfront.net/images/challenge_partners/image_file/27/google-cloud-logo.png\">\n<\/a>            <a target=\"_blank\" href=\"http://deepmind.com/\">\n              <img class=\"img-logo\" height=\"50\" src=\"https://dnczkxd1gcfu5.cloudfront.net/images/challenge_partners/image_file/28/Deep-Mind-Health-WTT-10.05.15.jpg\">\n<\/a>            <a target=\"_blank\" href=\"http://nvidia.com/\">\n              <img class=\"img-logo\" height=\"50\" src=\"https://dnczkxd1gcfu5.cloudfront.net/images/challenge_partners/image_file/29/nvidia.png\">\n<\/a>            <a target=\"_blank\" href=\"http://opensim.stanford.edu/about/\">\n              <img class=\"img-logo\" height=\"50\" src=\"https://dnczkxd1gcfu5.cloudfront.net/images/challenge_partners/image_file/36/ncsrr.png\">\n<\/a>            <a target=\"_blank\" href=\"https://www.tri.global/\">\n              <img class=\"img-logo\" height=\"50\" src=\"https://dnczkxd1gcfu5.cloudfront.net/images/challenge_partners/image_file/37/tri1.png\">\n<\/a>        <\/div>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4FDA:38C7FC:17EDEA:5A8109:6AB92BED"},"text_sha256":"7b178bab823864204162edf95a5910c590f5a562370b161b6cdf93e3d391271f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"probcomp/bayeslite","input_row":{"repository":"probcomp/bayeslite","url":"https://github.com/probcomp/bayeslite","name":"bayeslite","owner":"probcomp","description":"BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":940,"issues":495,"created_at":"2014-10-30T01:26:34Z","updated_at":"2026-07-21T01:50:10Z","first_commit_at":"2014-10-27T21:10:28Z","last_commit_at":"2020-04-16T21:07:19Z","activity_months":65.640000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:02.852Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"probcomp/bayeslite","visibility":"public","created_at":"2014-10-30T01:26:34Z","updated_at":"2026-07-21T01:50:10Z","private":false,"fork":false,"archived":false,"stargazers_count":940,"open_issues_count":193,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2078","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:181DD02:1C4356C:6AB92BEE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2077","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0797:280FBC:17C6F61:1BEB609:6AB92BEF"},"commit":{"sha":"189822afc9c3ea1cafc6eeec4cfb43c2a02182c7","url":"https://github.com/probcomp/bayeslite/commit/189822afc9c3ea1cafc6eeec4cfb43c2a02182c7","date":"2018-05-06T19:15:01Z","author_date":"2018-05-06T19:15:01Z","committer_date":"2018-05-06T19:15:01Z","tree_sha":"0a9763a3e8296e9d691a0e16b7107713be9096db","message_first_line":"Merge branch '20180506-docker-best-practices'"},"tree_request_status":200,"tree_rate":{"github_remaining":"2076","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D0:72BD3:1802BD2:1C2840C:6AB92BEF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2084,"blob_sha":"71d58b3ca992d080db5e04199236691be20344f3","priority":0}],"documents":[{"path":"README.md","size":2084,"blob_sha":"71d58b3ca992d080db5e04199236691be20344f3","priority":0,"status":200,"text":"# Bayeslite\n\n[![Build Status](https://travis-ci.org/probcomp/bayeslite.svg?branch=master)](https://travis-ci.org/probcomp/bayeslite)\n[![Anaconda-Server Version Badge](https://anaconda.org/probcomp/bayeslite/badges/version.svg)](https://anaconda.org/probcomp/bayeslite)\n[![Anaconda-Server Installer Badge](https://anaconda.org/probcomp/bayeslite/badges/installer/conda.svg)](https://conda.anaconda.org/probcomp)\n[![Anaconda-Server Platform Badge](https://anaconda.org/probcomp/bayeslite/badges/platforms.svg)](https://anaconda.org/probcomp/bayeslite)\n\nBQL interpretation and storage for BayesDB.\nPlease see http://probcomp.csail.mit.edu/bayesdb for more information.\n\n## Installing\n\nThe easiest way to install bayeslite is to use the\n[package](https://anaconda.org/probcomp/bayeslite) on Anaconda Cloud. In your\nconda environment (python 2.7), run one of the following two commands:\n\n```bash\n$ conda install -c probcomp bayeslite             # latest release\n$ conda install -c probcomp/label/edge bayeslite  # tip of master\n```\n\n## Expectations\n\nUsers and contributors should expect **rapidly and dramatically\nshifting code and behavior** at this time.\n\n**THIS SOFTWARE SHOULD NOT BE EXPECTED TO TREAT YOUR DATA SECURELY.**\n\n## Contributing\n\nOur compatibility aim is to work on probcomp machines and members'\nlaptops, and to provide scripts and instructions that make it not too\nhard to re-create our environments elsewhere. Pulls for polished\npackaging, broad installability, etc. are not appropriate\ncontributions at this time.\n\nPlease run local tests before sending a pull request:\n\n```\n$ ./check.sh\n```\n\nThat does not run the complete test suite, only the smoke tests, but\nis usually good enough. For the full suite:\n\n```\n$ ./check.sh tests shell/tests\n```\n\n## Documentation\n\nTo build the [documentation](http://probcomp.csail.mit.edu/dev/bayesdb/doc/)\n(requires sphinx):\n\n```\n$ make doc\n```\n\nThe result will be placed in `build/doc`, with one subdirectory per\noutput format.\n\nTo build only one output format, e.g. HTML because you don't want to\ninstall TeX:\n\n```\n$ make html\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"472E:3B7E2:1717A0:5D7230:6AB92BED"},"text_sha256":"3641b67090d124d0b774b7455792b28cd5aeb75492b5550374acb6d0c3af4cd4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2075","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0862:7307A:17C32FF:1BE8776:6AB92BF0"},"commit":{"sha":"211e5eb3821a464a2fffeb9d35e3097e1b7a99ba","url":"https://github.com/probcomp/bayeslite/commit/211e5eb3821a464a2fffeb9d35e3097e1b7a99ba","date":"2020-04-16T21:07:19Z","author_date":"2020-04-16T21:07:12Z","committer_date":"2020-04-16T21:07:19Z","tree_sha":"f959dcda53dcf65bd22157e914c1bb667e602f0a","message_first_line":"Add link to conda.md from iventure for installation instructions."},"tree_request_status":200,"tree_rate":{"github_remaining":"2074","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:183E08F:1C635CB:6AB92BF0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2073,"blob_sha":"6955ff615f7a232e6b84dd9f960b55db790f8f64","priority":0}],"documents":[{"path":"README.md","size":2073,"blob_sha":"6955ff615f7a232e6b84dd9f960b55db790f8f64","priority":0,"status":200,"text":"# Bayeslite\n\n[![Build Status](https://travis-ci.org/probcomp/bayeslite.svg?branch=master)](https://travis-ci.org/probcomp/bayeslite)\n[![Anaconda-Server Version Badge](https://anaconda.org/probcomp/bayeslite/badges/version.svg)](https://anaconda.org/probcomp/bayeslite)\n[![Anaconda-Server Installer Badge](https://anaconda.org/probcomp/bayeslite/badges/installer/conda.svg)](https://conda.anaconda.org/probcomp)\n[![Anaconda-Server Platform Badge](https://anaconda.org/probcomp/bayeslite/badges/platforms.svg)](https://anaconda.org/probcomp/bayeslite)\n\nBQL interpretation and storage for BayesDB.\nPlease see http://probcomp.csail.mit.edu/software/bayesdb for more information.\n\n## Installing\n\nThe easiest way to install bayeslite is to use the\n[package](https://anaconda.org/probcomp/bayeslite) on Anaconda Cloud.\nPlease follow [these instructions](https://github.com/probcomp/iventure/blob/master/docs/conda.md).\n\n## Expectations\n\nUsers and contributors should expect **rapidly and dramatically\nshifting code and behavior** at this time.\n\n**THIS SOFTWARE SHOULD NOT BE EXPECTED TO TREAT YOUR DATA SECURELY.**\n\n## Contributing\n\nOur compatibility aim is to work on probcomp machines and members'\nlaptops, and to provide scripts and instructions that make it not too\nhard to re-create our environments elsewhere. Pulls for polished\npackaging, broad installability, etc. are not appropriate\ncontributions at this time.\n\nPlease run local tests before sending a pull request:\n\n```\n$ ./check.sh\n```\n\nThat does not run the complete test suite, only the smoke tests, but\nis usually good enough. For the full suite:\n\n```\n$ ./check.sh tests shell/tests\n```\n\n## Documentation\n\nTo build the documentation, which is also available\n[online](http://probcomp.csail.mit.edu/dev/bayesdb/doc/),\ninstall [sphinx](http://www.sphinx-doc.org/en/master/)\nand then run the following command:\n\n```\n$ make doc\n```\n\nThe result will be placed in `build/doc`, with one subdirectory per\noutput format.\n\nTo build only one output format, e.g. HTML because you don't want to\ninstall TeX:\n\n```\n$ make html\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2706:B08CF:17525B:5DAC8C:6AB92BF1"},"text_sha256":"d65a024c2b178ecf4dc9896007481ea337ec711796b3439175c1e61f1c1c72e7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mateogianolio/vectorious","input_row":{"repository":"mateogianolio/vectorious","url":"https://github.com/mateogianolio/vectorious","name":"vectorious","owner":"mateogianolio","description":"Linear algebra in TypeScript.","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":918,"issues":126,"created_at":"2015-03-24T11:49:44Z","updated_at":"2026-09-09T08:56:55Z","first_commit_at":"2015-03-24T11:48:52Z","last_commit_at":"2024-05-06T08:44:44Z","activity_months":109.42,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:05.634Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mateogianolio/vectorious","visibility":"public","created_at":"2015-03-24T11:49:44Z","updated_at":"2026-09-09T08:56:55Z","private":false,"fork":false,"archived":false,"stargazers_count":918,"open_issues_count":17,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2073","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:1802D37:1C28581:6AB92BF1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2072","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084E:280FBC:17C7101:1BEB806:6AB92BF2"},"commit":{"sha":"c08f04fcc62ffe5484a9e71f168d4d46b881f207","url":"https://github.com/mateogianolio/vectorious/commit/c08f04fcc62ffe5484a9e71f168d4d46b881f207","date":"2018-05-15T17:27:40Z","author_date":"2018-05-15T17:27:40Z","committer_date":"2018-05-15T17:27:40Z","tree_sha":"de39f5b4c28fc7eb9ab640561c6de6a2ef34e8ed","message_first_line":"reconfigure code coverage on travis"},"tree_request_status":200,"tree_rate":{"github_remaining":"2071","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B1:2EA1B4:17E00CE:1C05D4D:6AB92BF2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3824,"blob_sha":"93756916cb1dd0d0f2364efa970d97cf92ca196f","priority":0}],"documents":[{"path":"README.md","size":3824,"blob_sha":"93756916cb1dd0d0f2364efa970d97cf92ca196f","priority":0,"status":200,"text":"![vectorious](https://github.com/mateogianolio/vectorious/raw/master/logo.gif)\n\n![version](https://img.shields.io/npm/v/vectorious.svg?style=flat&label=version) ![travis](https://img.shields.io/travis/mateogianolio/vectorious.svg?style=flat)\n![climate](https://img.shields.io/codeclimate/github/mateogianolio/vectorious.svg?style=flat&label=climate) ![coverage](https://img.shields.io/codeclimate/coverage/github/mateogianolio/vectorious.svg?style=flat&label=coverage)\n[![CDNJS](https://img.shields.io/cdnjs/v/vectorious.svg)](https://cdnjs.com/libraries/vectorious)\n\n> A high performance linear algebra library, written in JavaScript and optimized with C++ bindings to [BLAS](http://www.netlib.org/blas/).\n\n### Usage\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/mateogianolio/vectorious.svg)](https://greenkeeper.io/)\n\n##### In node.js\n\n```bash\n$ npm install vectorious\n```\n\n```javascript\nvar v = require('vectorious'),\n    Matrix = v.Matrix,\n    Vector = v.Vector,\n    BLAS = v.BLAS; // access BLAS routines\n```\n\nWill use your local BLAS copy (if any). Some notes for different operating systems:\n\n* **OSX** - by default included in the Accelerate framework\n* **Debian/Ubuntu** - different options, easiest is to `apt-get install libblas-dev`\n* **Windows** - https://icl.cs.utk.edu/lapack-for-windows/\n\n##### In browser\n\nDownload a [**release**](https://github.com/mateogianolio/vectorious/releases) and use it like this:\n\n```html\n<script src=\"vectorious.min.js\"><\/script>\n```\n\nOr if you prefer to use a CDN:\n\n```html\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/vectorious/4.8.1/vectorious.min.js\"><\/script>\n```\n\n```html\n<script>\n  var A = new Matrix([[1], [2], [3]]),\n      B = new Matrix([[1, 3, 5]]),\n      C = A.multiply(B);\n\n  console.log('C:', C.toArray());\n  /* C: [\n    [1, 3, 5],\n    [2, 6, 10],\n    [3, 9, 15]\n  ] */\n<\/script>\n```\n\n### Examples\n\n**Basic**\n\n* [**Solving linear systems of equations**](https://github.com/mateogianolio/vectorious/tree/master/examples/solve.js)\n* [**Using low-level BLAS routines**](https://github.com/mateogianolio/vectorious/tree/master/examples/blas.js)\n\n**Machine learning**\n* [**Neural network**](https://github.com/mateogianolio/vectorious/tree/master/examples/neural-network.js) (by [@lucidrains](https://github.com/lucidrains))\n* [**Logistic regression**](https://github.com/mateogianolio/vectorious/tree/master/examples/logistic-regression.js)\n\n### Documentation\n\nThe documentation is located in the wiki section of this repository.\n\n[**Go to wiki.**](https://github.com/mateogianolio/vectorious/wiki)\n\n### Benchmarks\n\nInternal benchmarks are located in the wiki section of this repository.\n\n[**Go to wiki.**](https://github.com/mateogianolio/vectorious/wiki)\n\n#### Compared to other libraries\n\n> Note: I'm in the process of creating better benchmarks and plots. Until then, below you'll find a simple comparison between vectorious and three other popular linear algebra libraries.\n\nThe following benchmarks compare **Vectorious 4.1.0** with three popular matrix/vector libraries:\n\n* [Numeric.js](http://www.numericjs.com)\n* [Sylvester](http://sylvester.jcoglan.com)\n* [Math.js](http://mathjs.org)\n\nThe graphs show operations per second on the vertical (y) axis.\n\nBelow is a graph comparing the **vector operations** `add`, `angle`, `dot`, `magnitude` (aka `L2-norm`), `normalize` and `scale`.\n\nThe operations were performed on vectors generated with `Vector.random(1048576)`.\n\n![Vector operations](https://github.com/mateogianolio/vectorious/raw/master/benchmarks/vector_ops.png)\n\nBelow is a graph comparing the **matrix operations** `add`, `scale` and `transpose`.\n\nThe operations were performed on matrices generated with `Matrix.random(512, 512)`.\n\n![Matrix operations](https://github.com/mateogianolio/vectorious/raw/master/benchmarks/matrix_ops.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17D5DC:5E2F71:6AB92BF1"},"text_sha256":"abf03683769ba49d324ef4065f07fdb9ebd03b0887eefe7d18da57c4680120ff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2070","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F4:6E429:17EC9B2:1C121A5:6AB92BF3"},"commit":{"sha":"7876984b6cf6e8c924fc67dae1cd87a946891624","url":"https://github.com/mateogianolio/vectorious/commit/7876984b6cf6e8c924fc67dae1cd87a946891624","date":"2024-05-06T08:44:44Z","author_date":"2024-05-06T08:44:44Z","committer_date":"2024-05-06T08:44:44Z","tree_sha":"fef0f4e142bd7abcda3525acfedd96f05fe22535","message_first_line":"Publish dist and docs"},"tree_request_status":200,"tree_rate":{"github_remaining":"2069","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B3:0AC4:129E5C1:15F3D98:6AB92BF3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4015,"blob_sha":"eb8a6691ba0dc1e1c936d66f120488345480ca24","priority":0}],"documents":[{"path":"README.md","size":4015,"blob_sha":"eb8a6691ba0dc1e1c936d66f120488345480ca24","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"https://github.com/mateogianolio/vectorious/raw/master/logo.gif\" alt=\"Vectorious Logo\" />\n<\/p>\n\n<p align=\"center\">\n  A linear algebra library, written in TypeScript and accelerated with C++ bindings to BLAS and LAPACK.\n<\/p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/npm/v/vectorious.svg\" /> <img src=\"https://img.shields.io/npm/dm/vectorious\" /> <img src=\"https://img.shields.io/github/actions/workflow/status/mateogianolio/vectorious/release.yml?branch=master\" /> <img src=\"https://img.shields.io/codeclimate/maintainability/mateogianolio/vectorious\" /> <img src=\"https://img.shields.io/codeclimate/coverage/mateogianolio/vectorious\" />\n<\/p>\n\n### Installation\n\nFollow the installation instructions in [nlapack](https://github.com/nperf/nlapack) and [nblas](https://github.com/nperf/nblas) to get maximum performance.\n\n```bash\n# with C++ bindings\n$ npm install vectorious\n\n# or, if you don't want C++ bindings\n$ npm install vectorious --no-optional\n```\n\nThere are three output bundles exposed in this package.\n\n#### CommonJS\n\nA node.js bundle, can be found in `dist/index.js` and imported with the `require()` syntax:\n\n```typescript\nconst v = require('vectorious');\n```\n\n#### Browser\n\nA browser bundle, can be found in `dist/index.browser.js` and imported with the `<script>` tag:\n\n```html\n<script src=\"dist/index.browser.js\" />\n```\n\nIt exposes a global variable named `v` in the `window` object and can be accessed like this:\n\n```html\n<script>\n  const x = v.array([1, 2, 3]);\n<\/script>\n```\n\n#### ES module\n\nAdded in version 6.1.0, vectorious exposes an ES module bundle at `dist/index.mjs` which can be imported using the `import` syntax:\n\n```typescript\nimport { array } from 'vectorious';\n\nconst x = array([1, 2, 3]);\n```\n\n### Usage\n\nUnless stated otherwise, all operations are in-place, meaning that the result of the operation overwrites data in the current (or in the static case leftmost) array. To avoid this, an explicit `copy` call is needed before the operation (`copy(x)` or `x.copy()`).\n\n```javascript\nimport { array, random, range } from 'vectorious';\n\n// Create a random 2x2 matrix\nconst x = random(2, 2);\n/*\narray([\n  [\n    0.26472008228302,\n    0.4102575480937958\n  ],\n  [\n    0.4068726599216461,\n    0.4589384198188782\n  ]\n], dtype=float64)\n*/\n\n// Create a one-dimensional vector with values from\n// 0 through 8 and reshape it into a 3x3 matrix\nconst y = range(0, 9).reshape(3, 3);\n/*\narray([\n  [ 0, 1, 2 ],\n  [ 3, 4, 5 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Add the second row of x to the first row of x\ny.slice(0, 1).add(y.slice(1, 2));\n/*\narray([\n  [ 3, 5, 7 ],\n  [ 3, 4, 5 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Swap the first and second rows of x\ny.swap(0, 1);\n/*\narray([\n  [ 3, 4, 5 ],\n  [ 3, 5, 7 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Create a 2x2x1 tensor\nconst z = array([\n  [[1], [2]],\n  [[3], [4]],\n]);\n/*\narray([\n  [ [ 1 ], [ 2 ] ],\n  [ [ 3 ], [ 4 ] ]\n], dtype=float64)\n*/\n```\n\n### Documentation\n\n- [**API Documentation**](https://docs.vectorious.org/vectorious/6.1.0/)\n\n### Examples\n\n**Basic**\n\n- [**Solving linear systems of equations**](https://github.com/mateogianolio/vectorious/tree/master/examples/solve.ts)\n- [**Using low-level BLAS routines**](https://github.com/mateogianolio/vectorious/tree/master/examples/blas.ts)\n\n**Machine learning**\n\n- [**Neural network**](https://github.com/mateogianolio/vectorious/tree/master/examples/neural-network.ts) (by [@lucidrains](https://github.com/lucidrains))\n- [**Logistic regression**](https://github.com/mateogianolio/vectorious/tree/master/examples/logistic-regression.ts)\n\n### Testing\n\nAll functions are accompanied with a `.spec.ts` file.\n\nThe Jest testing framework is used for testing and the whole test suite can be run using a single command:\n\n```sh\n$ npm test\n```\n\n### Benchmarks\n\nAll functions are accompanied with a `.bench.ts` file.\n\nRun all benchmarks with:\n\n```bash\n$ npm run benchmark\n```\n\nOr for a single function with:\n\n```\n$ npx ts-node src/core/abs.bench.ts\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:17163B:5D6D91:6AB92BF4"},"text_sha256":"7a5bce6838070df3097d66a7167f971b03dac77500a3b4d39c1ede908c6d5b9f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"SMTorg/smt","input_row":{"repository":"SMTorg/smt","url":"https://github.com/SMTorg/smt","name":"smt","owner":"SMTorg","description":"SMT: The Surrogate Modeling Toolbox","language":"Jupyter Notebook","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":915,"issues":183,"created_at":"2016-11-08T23:00:31Z","updated_at":"2026-09-21T15:48:02Z","first_commit_at":"2016-11-08T23:00:32Z","last_commit_at":"2026-09-17T08:03:24Z","activity_months":118.23999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:08.574Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"SMTorg/smt","visibility":"public","created_at":"2016-11-08T23:00:31Z","updated_at":"2026-09-21T15:48:02Z","private":false,"fork":false,"archived":false,"stargazers_count":915,"open_issues_count":25,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2068","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:178C2B7:1BB0124:6AB92BF4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2067","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:17F95CE:1C1E9AD:6AB92BF4"},"commit":{"sha":"08e41ba06167f73411d9a5716f0aa557f6797529","url":"https://github.com/SMTorg/smt/commit/08e41ba06167f73411d9a5716f0aa557f6797529","date":"2018-05-22T14:42:57Z","author_date":"2018-05-22T14:42:57Z","committer_date":"2018-05-22T14:42:57Z","tree_sha":"a96ad1b0bdb104359ae12a91bb62dc74009e8186","message_first_line":"mfk adapted to krig_utils library"},"tree_request_status":200,"tree_rate":{"github_remaining":"2066","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17D7A44:1BFD41B:6AB92BF5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1858,"blob_sha":"9bb471cb2ad42bd18441804d887bb33f510b81e0","priority":0}],"documents":[{"path":"README.md","size":1858,"blob_sha":"9bb471cb2ad42bd18441804d887bb33f510b81e0","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/SMTorg/smt.svg?branch=master)](https://travis-ci.org/SMTorg/smt) (Linux, OS X)\n\n[![Build status](https://ci.appveyor.com/api/projects/status/o0303yw40sqqe88y?svg=true)](https://ci.appveyor.com/project/hwangjt/smt-52ku9) (Windows)\n\n# Surrogate Modeling Toolbox\nThe surrogate modeling toolbox (SMT) is a Python package that contains a collection of surrogate modeling methods, sampling techniques, and benchmarking functions. This package provides a library of surrogate models that is simple to use and facilitates the implementation of additional methods.\nSMT is different from existing surrogate modeling libraries because of its emphasis on derivatives, including training derivatives used for gradient-enhanced modeling, prediction derivatives, and derivatives with respect to the training data.\nIt also includes new surrogate models that are not available elsewhere: kriging by partial-least squares reduction and energy-minimizing spline interpolation.\nSMT is documented using custom tools for embedding automatically-tested code and dynamically-generated plots to produce high-quality user guides with minimal effort from contributors.\nSMT is distributed under the New BSD license.\n\n# Version\nVersion 0.2\n\n# Required packages\nNumpy    >= Version 1.9.2\n\nScikit-learn  >= Version 0.13.1\n\npyDOE >= Version 0.3.8\n\nsix\n\nCython\n\nScipy\n\n# Installation\nClone the repository from github then run:\n\n```\npip install -e name_folder\n```\n\n# Tests\nTo run tests, first install the python testing framework using:\n\n```\npip install git+https://github.com/OpenMDAO/testflo.git\n```\n\nand run\n\n```\ntestflo\n```\n\n# Usage\nFor examples demonstrating how to use SMT, go to the 'smt/examples' folder.\n\n# Documentation\nhttp://smt.readthedocs.io\n\n# Contact\nThis repository was created by Mohamed Amine Bouhlel and is maintained by the MDOlab.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B178:3E1DA:179DE2:5DF80D:6AB92BF3"},"text_sha256":"d419cc7644f7211e1324148290db8652d0a2e354a165a6050fde967c569d1496"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2065","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B3:767EB:17FD261:1C231A9:6AB92BF6"},"commit":{"sha":"0d3602a74f86893f1ab2692a475331adb4a22fbe","url":"https://github.com/SMTorg/smt/commit/0d3602a74f86893f1ab2692a475331adb4a22fbe","date":"2026-06-22T12:59:40Z","author_date":"2026-06-22T12:59:40Z","committer_date":"2026-06-22T12:59:40Z","tree_sha":"211e4c3b72bdcb25d2d2ac9e73a01303c8eefc6e","message_first_line":"Update notebooks"},"tree_request_status":200,"tree_rate":{"github_remaining":"2064","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0867:52542:17CAEAE:1BF09CC:6AB92BF6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6159,"blob_sha":"866a09602bab316281180bb75360483b8e64d666","priority":0}],"documents":[{"path":"README.md","size":6159,"blob_sha":"866a09602bab316281180bb75360483b8e64d666","priority":0,"status":200,"text":"![SMT Logo](./doc/smt_logo.png)\n\n# Surrogate Modeling Toolbox\n\n[![Tests](https://github.com/SMTOrg/smt/workflows/Tests/badge.svg)](https://github.com/SMTorg/smt/actions?query=workflow%3ATests)\n[![Coverage Status](https://coveralls.io/repos/github/SMTorg/smt/badge.svg?branch=master)](https://coveralls.io/github/SMTorg/smt?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/smt/badge/?version=latest)](https://smt.readthedocs.io/en/latest/?badge=latest)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nThe surrogate modeling toolbox (SMT) is a Python package that contains a collection of surrogate modeling methods, sampling techniques, and benchmarking functions. This package provides a library of surrogate models that is simple to use and facilitates the implementation of additional methods.\n\nSMT is different from existing surrogate modeling libraries because of its emphasis on derivatives, including training derivatives used for gradient-enhanced modeling, prediction derivatives, and derivatives with respect to the training data.\n\nIt also includes new surrogate models that are not available elsewhere: kriging by partial-least squares reduction and energy-minimizing spline interpolation.\nSMT is documented using custom tools for embedding automatically-tested code and dynamically-generated plots to produce high-quality user guides with minimal effort from contributors.\n\nSMT is distributed under the New BSD license.\n\nTo cite SMT 2.0: P. Saves and R. Lafage and N. Bartoli and Y. Diouane and J. H. Bussemaker and T. Lefebvre and J. T. Hwang and J. Morlier and J. R. R. A. Martins. SMT 2.0: A Surrogate Modeling Toolbox with a focus on Hierarchical and Mixed Variables Gaussian Processes. Advances in Engineering Software, 2024.\n\n```latex\n@article{saves2024smt,\n         author = {P. Saves and R. Lafage and N. Bartoli and Y. Diouane and J. Bussemaker and T. Lefebvre and J. T. Hwang and J. Morlier and J. R. R. A. Martins},\n         title = {{SMT 2.0: A} Surrogate Modeling Toolbox with a focus on Hierarchical and Mixed Variables Gaussian Processes},\n         journal = {Advances in Engineering Sofware},\n         year = {2024},\n         volume = {188}, \n         pages = {103571},\n         doi = {https://doi.org/10.1016/j.advengsoft.2023.103571}}\n```\n\nTo cite SMT legacy: M. A. Bouhlel and J. T. Hwang and N. Bartoli and R. Lafage and J. Morlier and J. R. R. A. Martins. A Python surrogate modeling framework with derivatives. Advances in Engineering Software, 2019.\n\n```latex\n@article{SMT2019,\n        Author = {Mohamed Amine Bouhlel and John T. Hwang and Nathalie Bartoli and Rémi Lafage and Joseph Morlier and Joaquim R. R. A. Martins},\n        Journal = {Advances in Engineering Software},\n        Title = {A Python surrogate modeling framework with derivatives},\n        pages = {102662},\n        issn = {0965-9978},\n        doi = {https://doi.org/10.1016/j.advengsoft.2019.03.005},\n        Year = {2019}}\n```\n\n# Required packages\n\nSMT depends on the following modules: numpy, scipy, scikit-learn, pydoe and Cython.\n\n# Installation\n\nIf you want to install the latest release\n\n```bash\npip install smt\n```\n\nor else if you want to install from the current master branch\n\n```bash\npip install git+https://github.com/SMTOrg/smt.git@master\n```\n\n# Usage\n\nFor examples demonstrating how to use SMT, you can take a look at the [tutorial notebooks](https://github.com/SMTorg/smt/tree/master/tutorial#readme) or go to the 'smt/examples' folder.\n\n# Documentation\n\n[Documentation of Surrogate Modeling Toolbox](http://smt.readthedocs.io/en/stable).\n\n# Contributing\n\nTo contribute to SMT refer to the [contributing section](https://smt.readthedocs.io/en/latest/_src_docs/dev_docs.html#contributing-to-smt)  of the documentation.\n\n## Associated Scientific production\n\nBouhlel, Mohamed A., and Joaquim RRA Martins. \"Gradient-enhanced kriging for high-dimensional problems.\" Engineering with Computers 35.1 (2019): 157-173.\n\nBouhlel, Mohamed Amine, Sicheng He, and Joaquim RRA Martins. \"Scalable gradient–enhanced artificial neural networks for airfoil shape design in the subsonic and transonic regimes.\" Structural and Multidisciplinary Optimization 61.4 (2020): 1363-1376.\n\nBouhlel, M. A., Bartoli, N., Otsmane, A., and Morlier, J., An Improved Approach for Estimating the Hyperparameters of the Kriging Model for High-Dimensional Problems through the Partial Least Squares Method,” Mathematical Problems in Engineering, vol. 2016, Article ID 6723410, 2016.\n\nBerguin, Steven H. \"Jacobian-Enhanced Neural Networks.\" arXiv preprint arXiv:2406.09132 (2024).\n\nValayer, H., Bartoli, N., Castaño-Aguirre, M., Lafage, R., Lefebvre, T., Lopez-Lopera, A. F., & Mouton, S. (2024). A Python Toolbox for Data-Driven Aerodynamic Modeling Using Sparse Gaussian Processes. Aerospace, 11(4), 260.\n\nSaves, P., Hallé-Hannan, E., Bussemaker, J., Diouane, Y., & Bartoli, N. (2026). Modeling hierarchical spaces: a review and unified framework for surrogate-based architecture design. Structural and Multidisciplinary Optimization, 69(3), 65.\n\nRobani, M. D., Palar, P. S., Zuhal, L. R., Saves, P., & Morlier, J. (2025). SMT-EX: An explainable surrogate modeling toolbox for mixed-variables design exploration. In AIAA SCITECH 2025 Forum (p. 0777).\n\nGonel, Nicolas, Paul Saves, and Joseph Morlier. \"Frequency-aware Surrogate Modeling With SMT Kernels For Advanced Data Forecasting.\" ECCOMAS AeroBest (2025).\n\nHwang, J. T., & Martins, J. R. (2018). A fast-prediction surrogate model for large datasets. Aerospace Science and Technology, 75, 74-87.\n\nDimitri Bettebghor, Nathalie Bartoli, Stephane Grihon, Joseph Morlier, and Manuel Samuelides. Surrogate modeling approximation using a mixture of experts based on EM joint estimation. Structural and Multidisciplinary Optimization, 43(2) :243–259, 2011.\n\nCastano-Aguirre, M., López-Lopera, F. A., Bartoli, N., Massa, F., & Lefebvre, T. Scalable Sparse Co-Kriging for Multi-Fidelity Data Fusion: An Application to Aerodynamics. Reliability Engineering & System Safety, 112485, 2026\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B1BC:3AC15:1801D5:5E5AB5:6AB92BF6"},"text_sha256":"8720b2f3e5c50fc1988aabd54349077f156df39f48b42302c361c9c482aec27b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"nikitakit/self-attentive-parser","input_row":{"repository":"nikitakit/self-attentive-parser","url":"https://github.com/nikitakit/self-attentive-parser","name":"self-attentive-parser","owner":"nikitakit","description":"High-accuracy NLP parser with models for 11 languages.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":912,"issues":100,"created_at":"2018-04-27T07:49:32Z","updated_at":"2026-07-31T16:28:41Z","first_commit_at":"2017-11-03T20:18:25Z","last_commit_at":"2021-05-04T21:31:48Z","activity_months":41.990000000000002,"ai_ml_match_topics":"machine-learning; natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:11.401Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"nikitakit/self-attentive-parser","visibility":"public","created_at":"2018-04-27T07:49:32Z","updated_at":"2026-07-31T16:28:41Z","private":false,"fork":false,"archived":false,"stargazers_count":912,"open_issues_count":49,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2063","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F8:2BC4E5:182CB2A:1C5222F:6AB92BF7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2062","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17DB0B0:1C00BB9:6AB92BF7"},"commit":{"sha":"bf5bbae77ad5700008c899ad6a6a4d1c45a64879","url":"https://github.com/nikitakit/self-attentive-parser/commit/bf5bbae77ad5700008c899ad6a6a4d1c45a64879","date":"2018-04-27T20:23:30Z","author_date":"2018-04-27T20:23:30Z","committer_date":"2018-04-27T20:23:30Z","tree_sha":"6bb9d676b3b61f67f1ed5ad34196e530605b28e7","message_first_line":"Consolidated code for self-attentive model"},"tree_request_status":200,"tree_rate":{"github_remaining":"2061","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E4:B1202:17A9031:1BCE17E:6AB92BF8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6398,"blob_sha":"e0bfdcf56619d813dee2a7f09ed82766e50c2b09","priority":0}],"documents":[{"path":"README.md","size":6398,"blob_sha":"e0bfdcf56619d813dee2a7f09ed82766e50c2b09","priority":0,"status":200,"text":"# Constituency Parsing with a Self-Attentive Encoder\n\nThis is a Python implementation of the parsers described in \"Constituency Parsing with a Self-Attentive Encoder\" from ACL 2018.\n\n## Requirements\n\n### Software\n* Python 3.6 or higher.\n* Cython 0.25.2 or any compatible version.\n* [PyTorch](http://pytorch.org/) 0.3.x. This code has not been tested with newer releases of PyTorch.\n* [EVALB](http://nlp.cs.nyu.edu/evalb/). Before starting, run `make` inside the `EVALB/` directory to compile an `evalb` executable. This will be called from Python for evaluation. If training on the SPMRL datasets, you will need to run `make` inside the `EVALB_SPMRL/` directory instead.\n* [AllenNLP](http://allennlp.org/) 0.4.0 or any compatible version (only required when using ELMo word representations)\n\n### Pre-trained models\n\nThe following pre-trained parser models are available for download:\n* [`en_charlstm_dev.93.61.pt`](https://github.com/nikitakit/self-attentive-parser/releases/download/models/en_charlstm_dev.93.61.pt): Our best English single-system parser that does not rely on external word representations\n* [`en_elmo_dev.95.21.pt`](https://github.com/nikitakit/self-attentive-parser/releases/download/models/en_elmo_dev.95.21.pt): Our best English parser. Using this parser requires ELMo weights, which must be downloaded separately.\n\nTo use ELMo embeddings, download the following files into the `data/` folder (preserving their names):\n\n\n* https://s3-us-west-2.amazonaws.com/allennlp/models/elmo/2x4096_512_2048cnn_2xhighway/elmo_2x4096_512_2048cnn_2xhighway_options.json\n* https://s3-us-west-2.amazonaws.com/allennlp/models/elmo/2x4096_512_2048cnn_2xhighway/elmo_2x4096_512_2048cnn_2xhighway_weights.hdf5\n\nThere is currently no command-line option for configuring the locations/names of the ELMo files.\n\n## Training\n\nA new model can be trained using the command `python3 src/main.py train ...`. Some of the available arguments are:\n\nArgument | Description | Default\n--- | --- | ---\n`--model-path-base` | Path base to use for saving models | N/A\n`--evalb-dir` |  Path to EVALB directory | `EVALB/`\n`--train-path` | Path to training trees | `data/02-21.10way.clean`\n`--dev-path` | Path to development trees | `data/22.auto.clean`\n`--batch-size` | Number of examples per training update | 250\n`--epochs` | Number of training epochs | No limit\n`--checks-per-epoch` | Number of development evaluations per epoch | 4\n`--subbatch-max-tokens` | Maximum number of words to process in parallel while training (a full batch may not fit in GPU memory) | 2000\n`--eval-batch-size` | Number of examples to process in parallel when evaluating on the development set | 100\n`--print-vocabs` | Print the vocabularies before training | Do not print the vocabularies\n`--numpy-seed` | NumPy random seed | Random\n`--use-words` | Use learned word embeddings | Do not use word embeddings\n`--use-chars-lstm` | Use learned CharLSTM word representations | Do not use CharLSTM\n`--use-elmo` | Use pre-trained ELMo word representations | Do not use ELMo\n\nAdditional arguments are available for other hyperparameters; see `make_hparams()` in `src/main.py`. These can be specified on the command line, such as `--d-char-emb 64` (for numerical paramters), `--use-tags` (for boolean parameters that default to False), or `--no-partitioned` (for boolean parameters that default to True).\n\nThe training and development trees are assumed to have predicted part-of-speech tags, but they only affect final parser output if the `--use-tags` option is passed.\n\nFor each development evaluation, the F-score on the development set is computed and compared to the previous best. If the current model is better, the previous model will be deleted and the current model will be saved. The new filename will be derived from the provided model path base and the development F-score.\n\nAs an example, to train an English parser using the default hyperparameters, you can use the command:\n\n```\npython src/main.py train --use-words --use-chars-lstm --model-path-base models/en_charlstm --d-char-emb 64\n```\n\nTo train an English parser that uses ELMo embeddings, the command is:\n\n```\npython src/main.py train --use-elmo --model-path-base models/en_elmo --num-layers 4\n```\n\nThe above commands were used to train our two best English parsers; the `EXPERIMENTS.md` file contains additional notes about the experiments reported in our paper.\n\n## Evaluation\n\nA saved model can be evaluated on a test corpus using the command `python3 src/main.py test ...` with the following arguments:\n\nArgument | Description | Default\n--- | --- | ---\n`--model-path-base` | Path base of saved model | N/A\n`--evalb-dir` |  Path to EVALB directory | `EVALB/`\n`--test-path` | Path to test trees | `data/23.auto.clean`\n`--test-path-raw` | Alternative path to test trees that is used for evalb only (used to double-check that evaluation against pre-processed trees does not contain any bugs) | Compare to trees from `--test-path`\n`--eval-batch-size` | Number of examples to process in parallel when evaluating on the test set | 100\n\nThe test trees are assumed to have predicted part-of-speech tags.\n\nAs an example, after extracting the pre-trained top-down model, you can evaluate it on the test set using the following command:\n\n```\npython src/main.py test --model-path-base models/nk_base6_lstm_dev.93.61.pt\n```\n\nThe pre-trained model with CharLSTM embeddings obtains F-scores of 93.61 on the development set and 93.55 on the test set. The pre-trained model with ELMo embeddings obtains F-scores of 95.21 on the development set and 95.13 on the test set.\n\n## Parsing New Sentences\n\nSee the `run_test` function in `src/main.py` for an example of how a parser can be loaded from disk and used to parse sentences.\n\n## Citation\n\nIf you use this software for research, please cite our paper as follows:\n\n```\n@InProceedings{Kitaev-2018-SelfAttentive,\n  author    = {Kitaev, Nikita and Klein, Dan},\n  title     = {Constituency Parsing with a Self-Attentive Encoder},\n  booktitle = {Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},\n  month     = {July},\n  year      = {2018},\n  address   = {Melbourne, Australia},\n  publisher = {Association for Computational Linguistics},\n}\n```\n\n## Credits\n\nThe code in this repository and portions of this README are based on https://github.com/mitchellstern/minimal-span-parser\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9EE:1A3D83:186E36:5EC924:6AB92BF7"},"text_sha256":"1f213649890a40950e3d42308baf0ef96f535ada8b26be2801463ef160d560c6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2060","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B5:62B94:17C9169:1BEE9CD:6AB92BF8"},"commit":{"sha":"24435a156a64d7433829e9a500a81f46b7e58030","url":"https://github.com/nikitakit/self-attentive-parser/commit/24435a156a64d7433829e9a500a81f46b7e58030","date":"2021-05-04T21:31:48Z","author_date":"2021-05-04T21:31:48Z","committer_date":"2021-05-04T21:31:48Z","tree_sha":"b312551f70645616f23898e6f79cb29152f870b3","message_first_line":"Fix model names in README"},"tree_request_status":200,"tree_rate":{"github_remaining":"2059","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:17FBDBA:1C21A09:6AB92BF9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19780,"blob_sha":"c31ba10d9cb0ad099a87068e9012d25ad863d680","priority":0}],"documents":[{"path":"README.md","size":19780,"blob_sha":"c31ba10d9cb0ad099a87068e9012d25ad863d680","priority":0,"status":200,"text":"# Berkeley Neural Parser\n\nA high-accuracy parser with models for 11 languages, implemented in Python. Based on [Constituency Parsing with a Self-Attentive Encoder](https://arxiv.org/abs/1805.01052) from ACL 2018, with additional changes described in [Multilingual Constituency Parsing with Self-Attention and Pre-Training](https://arxiv.org/abs/1812.11760).\n\n**New February 2021:** Version 0.2.0 of the Berkeley Neural Parser is now out, with higher-quality pre-trained models for all languages. Inference now uses PyTorch instead of TensorFlow (training has always been PyTorch-only). Drops support for Python 2.7 and 3.5. Includes updated support for training and using your own parsers, based on your choice of [pre-trained model](https://huggingface.co/models).\n\n## Contents\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Available Models](#available-models)\n4. [Training](#training)\n5. [Reproducing Experiments](#reproducing-experiments)\n6. [Citation](#citation)\n7. [Credits](#credits)\n\nIf you are primarily interested in training your own parsing models, skip to the [Training](#training) section of this README.\n\n## Installation\n\nTo install the parser, run the command:\n```bash\n$ pip install benepar\n```\n*Note: benepar 0.2.0 is a major upgrade over the previous version, and comes with entirely new and higher-quality parser models. If you are not ready to upgrade, you can pin your benepar version to [the previous release (0.1.3)](https://github.com/nikitakit/self-attentive-parser/tree/acl2019).*\n\nPython 3.6 (or newer) and [PyTorch](https://pytorch.org/) 1.6 (or newer) are required. See the PyTorch website for instruction on how to select between GPU-enabled and CPU-only versions of PyTorch; benepar will automatically use the GPU if it is available to pytorch.\n\nThe recommended way of using benepar is through integration with [spaCy](https://spacy.io/). If using spaCy, you should install a spaCy model for your language. For English, the installation command is:\n```sh\n$ python -m spacy download en_core_web_md\n```\n\nThe spaCy model is only used for tokenization and sentence segmentation. If language-specific analysis beyond parsing is not required, you may also forego a language-specific model and instead use a multi-language model that only performs tokenization and segmentation. [One such model](https://spacy.io/models/xx#xx_sent_ud_sm), newly added in spaCy 3.0, should work for English, German, Korean, Polish, and Swedish (but not Chinese, since it doesn't seem to support Chinese word segmentation).\n\nParsing models need to be downloaded separately, using the commands:\n```python\n>>> import benepar\n>>> benepar.download('benepar_en3')\n```\n\nSee the [Available Models](#available-models) section below for a full list of models.\n\n## Usage\n\n### Usage with spaCy (recommended)\n\nThe recommended way of using benepar is through its integration with spaCy:\n```python\n>>> import benepar, spacy\n>>> nlp = spacy.load('en_core_web_md')\n>>> if spacy.__version__.startswith('2'):\n        nlp.add_pipe(benepar.BeneparComponent(\"benepar_en3\"))\n    else:\n        nlp.add_pipe(\"benepar\", config={\"model\": \"benepar_en3\"})\n>>> doc = nlp(\"The time for action is now. It's never too late to do something.\")\n>>> sent = list(doc.sents)[0]\n>>> print(sent._.parse_string)\n(S (NP (NP (DT The) (NN time)) (PP (IN for) (NP (NN action)))) (VP (VBZ is) (ADVP (RB now))) (. .))\n>>> sent._.labels\n('S',)\n>>> list(sent._.children)[0]\nThe time for action\n```\n\nSince spaCy does not provide an official constituency parsing API, all methods are accessible through the extension namespaces `Span._` and `Token._`.\n\nThe following extension properties are available:\n- `Span._.labels`: a tuple of labels for the given span. A span may have multiple labels when there are unary chains in the parse tree.\n- `Span._.parse_string`: a string representation of the parse tree for a given span.\n- `Span._.constituents`: an iterator over `Span` objects for sub-constituents in a pre-order traversal of the parse tree.\n- `Span._.parent`: the parent `Span` in the parse tree.\n- `Span._.children`: an iterator over child `Span`s in the parse tree.\n- `Token._.labels`, `Token._.parse_string`, `Token._.parent`: these behave the same as calling the corresponding method on the length-one Span containing the token.\n\nThese methods will raise an exception when called on a span that is not a constituent in the parse tree. Such errors can be avoided by traversing the parse tree starting at either sentence level (by iterating over `doc.sents`) or with an individual `Token` object.\n\n### Usage with NLTK\n\nThere is also an NLTK interface, which is designed for use with pre-tokenized datasets and treebanks, or when integrating the parser into an NLP pipeline that already performs (at minimum) tokenization and sentence splitting. For parsing starting with raw text, it is **strongly encouraged** that you use spaCy and `benepar.BeneparComponent` instead.\n\nSample usage with NLTK:\n```python\n>>> import benepar\n>>> parser = benepar.Parser(\"benepar_en3\")\n>>> input_sentence = benepar.InputSentence(\n    words=['\"', 'Fly', 'safely', '.', '\"'],\n    space_after=[False, True, False, False, False],\n    tags=['``', 'VB', 'RB', '.', \"''\"],\n    escaped_words=['``', 'Fly', 'safely', '.', \"''\"],\n)\n>>> tree = parser.parse(input_sentence)\n>>> print(tree)\n(TOP (S (`` ``) (VP (VB Fly) (ADVP (RB safely))) (. .) ('' '')))\n```\n\nNot all fields of `benepar.InputSentence` are required, but at least one of `words` and `escaped_words` must be specified. The parser will attempt to guess the value for missing fields, for example:\n```python\n>>> input_sentence = benepar.InputSentence(\n    words=['\"', 'Fly', 'safely', '.', '\"'],\n)\n>>> parser.parse(input_sentence)\n```\n\nUse `parse_sents` to parse multiple sentences.\n```python\n>>> input_sentence1 = benepar.InputSentence(\n    words=['The', 'time', 'for', 'action', 'is', 'now', '.'],\n)\n>>> input_sentence2 = benepar.InputSentence(\n    words=['It', \"'s\", 'never', 'too', 'late', 'to', 'do', 'something', '.'],\n)\n>>> parser.parse_sents([input_sentence1, input_sentence2])\n```\n\nSome parser models also allow Unicode text input for debugging/interactive use, but passing in raw text strings is *strongly discouraged* for any application where parsing accuracy matters.\n```python\n>>> parser.parse('\"Fly safely.\"')  # For debugging/interactive use only.\n```\nWhen parsing from raw text, we recommend using spaCy and `benepar.BeneparComponent` instead. The reason is that parser models do not ship with a tokenizer or sentence splitter, and some models may not include a part-of-speech tagger either. A toolkit must be used to fill in these pipeline components, and spaCy outperforms NLTK in all of these areas (sometimes by a large margin). \n\n\n\n## Available Models\n\nThe following trained parser models are available. To use spaCy integration, you will also need to install a [spaCy model for the appropriate language](https://spacy.io/models).\n\nModel       | Language | Info\n----------- | -------- | ----\n`benepar_en3` | English | 95.40 F1 on [revised](https://catalog.ldc.upenn.edu/LDC2015T13) WSJ test set. The training data uses revised tokenization and syntactic annotation based on the same guidelines as the English Web Treebank and OntoNotes, which better matches modern tokenization practices in libraries like spaCy. Based on T5-small.\n`benepar_en3_large` | English | 96.29 F1 on [revised](https://catalog.ldc.upenn.edu/LDC2015T13) WSJ test set. The training data uses revised tokenization and syntactic annotation based on the same guidelines as the English Web Treebank and OntoNotes, which better matches modern tokenization practices in libraries like spaCy. Based on T5-large.\n`benepar_zh2` | Chinese | 92.56 F1 on CTB 5.1 test set. Usage with spaCy allows supports parsing from raw text, but the NLTK API only supports parsing previously tokenized sentences. Based on Chinese ELECTRA-180G-large.\n`benepar_ar2` | Arabic | 90.52 F1 on SPMRL2013/2014 test set. Only supports using the NLTK API for parsing previously tokenized sentences. Parsing from raw text and spaCy integration are not supported. Based on XLM-R.\n`benepar_de2` | German | 92.10 F1 on SPMRL2013/2014 test set. Based on XLM-R.\n`benepar_eu2` | Basque | 93.36 F1 on SPMRL2013/2014 test set. Usage with spaCy first requires implementing Basque support in spaCy. Based on XLM-R.\n`benepar_fr2` | French | 88.43 F1 on SPMRL2013/2014 test set. Based on XLM-R.\n`benepar_he2` | Hebrew | 93.98 F1 on SPMRL2013/2014 test set. Only supports using the NLTK API for parsing previously tokenized sentences. Parsing from raw text and spaCy integration are not supported. Based on XLM-R.\n`benepar_hu2` | Hungarian | 96.19 F1 on SPMRL2013/2014 test set. Usage with spaCy requires a [Hungarian model for spaCy](https://github.com/oroszgy/spacy-hungarian-models). The NLTK API only supports parsing previously tokenized sentences. Based on XLM-R.\n`benepar_ko2` | Korean | 91.72 F1 on SPMRL2013/2014 test set. Can be used with spaCy's [multi-language sentence segmentation model](https://spacy.io/models/xx#xx_sent_ud_sm) (requires spaCy v3.0). The NLTK API only supports parsing previously tokenized sentences. Based on XLM-R.\n`benepar_pl2` | Polish | 97.15 F1 on SPMRL2013/2014 test set. Based on XLM-R.\n`benepar_sv2` | Swedish | 92.21 F1 on SPMRL2013/2014 test set. Can be used with spaCy's [multi-language sentence segmentation model](https://spacy.io/models/xx#xx_sent_ud_sm) (requires spaCy v3.0). Based on XLM-R.\n`benepar_en3_wsj` | English | **Consider using `benepar_en3` or `benepar_en3_large` instead**. 95.55 F1 on [canonical](https://catalog.ldc.upenn.edu/LDC99T42) WSJ test set used for decades of English constituency parsing publications. Based on BERT-large-uncased. We believe that the revised annotation guidelines used for training `benepar_en3`/`benepar_en3_large` are more suitable for downstream use because they better handle language usage in web text, and are more consistent with modern practices in dependency parsing and libraries like spaCy. Nevertheless, we provide the `benepar_en3_wsj` model for cases where using the revised treebanking conventions are not appropriate, such as benchmarking different models on the same dataset.\n\n## Training\n\nTraining requires cloning this repository from GitHub. While the model code in `src/benepar` is distributed in the `benepar` package on PyPI, the training and evaluation scripts directly under `src/` are not.\n\n#### Software Requirements for Training\n* Python 3.7 or higher.\n* [PyTorch](http://pytorch.org/) 1.6.0, or any compatible version.\n* All dependencies required by the `benepar` package, including: [NLTK](https://www.nltk.org/) 3.2, [torch-struct](https://github.com/harvardnlp/pytorch-struct) 0.4, [transformers](https://github.com/huggingface/transformers) 4.3.0, or compatible.\n* [pytokenizations](https://github.com/tamuhey/tokenizations/) 0.7.2 or compatible.\n* [EVALB](http://nlp.cs.nyu.edu/evalb/). Before starting, run `make` inside the `EVALB/` directory to compile an `evalb` executable. This will be called from Python for evaluation. If training on the SPMRL datasets, you will need to run `make` inside the `EVALB_SPMRL/` directory instead.\n\n### Training Instructions\n\nA new model can be trained using the command `python src/main.py train ...`. Some of the available arguments are:\n\nArgument | Description | Default\n--- | --- | ---\n`--model-path-base` | Path base to use for saving models | N/A\n`--evalb-dir` |  Path to EVALB directory | `EVALB/`\n`--train-path` | Path to training trees | `data/wsj/train_02-21.LDC99T42`\n`--train-path-text` | Optional non-destructive tokenization of the training data | Guess raw text; see `--text-processing`\n`--dev-path` | Path to development trees | `data/wsj/dev_22.LDC99T42`\n`--dev-path-text` | Optional non-destructive tokenization of the development data | Guess raw text; see `--text-processing`\n`--text-processing` | Heuristics for guessing raw text from descructively tokenized tree files. See `load_trees()` in `src/treebanks.py` | Default rules for languages other than Arabic, Chinese, and Hebrew\n`--subbatch-max-tokens` | Maximum number of tokens to process in parallel while training (a full batch may not fit in GPU memory) | 2000\n`--parallelize` | Distribute pre-trained model (e.g. T5) layers across multiple GPUs. | Use at most one GPU\n`--batch-size` | Number of examples per training update | 32\n`--checks-per-epoch` | Number of development evaluations per epoch | 4\n`--numpy-seed` | NumPy random seed | Random\n`--use-pretrained` | Use pre-trained encoder | Do not use pre-trained encoder\n`--pretrained-model` | Model to use if `--use-pretrained` is passed. May be a path or a model id from the [HuggingFace Model Hub](https://huggingface.co/models)| `bert-base-uncased`\n`--predict-tags` | Adds a part-of-speech tagging component and auxiliary loss to the parser | Do not predict tags\n`--use-chars-lstm` | Use learned CharLSTM word representations | Do not use CharLSTM\n`--use-encoder` | Use learned transformer layers on top of pre-trained model or CharLSTM | Do not use extra transformer layers\n`--num-layers` | Number of transformer layers to use if `--use-encoder` is passed | 8\n`--encoder-max-len` | Maximum sentence length (in words) allowed for extra transformer layers | 512\n\nAdditional arguments are available for other hyperparameters; see `make_hparams()` in `src/main.py`. These can be specified on the command line, such as `--num-layers 2` (for numerical parameters), `--predict-tags` (for boolean parameters that default to False), or `--no-XXX` (for boolean parameters that default to True).\n\nFor each development evaluation, the F-score on the development set is computed and compared to the previous best. If the current model is better, the previous model will be deleted and the current model will be saved. The new filename will be derived from the provided model path base and the development F-score.\n\nPrior to training the parser, you will first need to obtain appropriate training data. We provide [instructions on how to process standard datasets like PTB, CTB, and the SMPRL 2013/2014 Shared Task data](data/README.md). After following the instructions for the English WSJ data, you can use the following command to train an English parser using the default hyperparameters:\n\n```\npython src/main.py train --use-pretrained --model-path-base models/en_bert_base\n```\n\nSee [`EXPERIMENTS.md`](EXPERIMENTS.md) for more examples of good hyperparameter choices.\n\n### Evaluation Instructions\n\nA saved model can be evaluated on a test corpus using the command `python src/main.py test ...` with the following arguments:\n\nArgument | Description | Default\n--- | --- | ---\n`--model-path` | Path of saved model | N/A\n`--evalb-dir` |  Path to EVALB directory | `EVALB/`\n`--test-path` | Path to test trees | `data/23.auto.clean`\n`--test-path-text` | Optional non-destructive tokenization of the test data | Guess raw text; see `--text-processing`\n`--text-processing` | Heuristics for guessing raw text from descructively tokenized tree files. See `load_trees()` in `src/treebanks.py` | Default rules for languages other than Arabic, Chinese, and Hebrew\n`--test-path-raw` | Alternative path to test trees that is used for evalb only (used to double-check that evaluation against pre-processed trees does not contain any bugs) | Compare to trees from `--test-path`\n`--subbatch-max-tokens` | Maximum number of tokens to process in parallel (a GPU does not have enough memory to process the full dataset in one batch) | 500\n`--parallelize` | Distribute pre-trained model (e.g. T5) layers across multiple GPUs. | Use at most one GPU\n`--output-path` | Path to write predicted trees to (use `\"-\"` for stdout). | Do not save predicted trees\n`--no-predict-tags` | Use gold part-of-speech tags when running EVALB. This is the standard for publications, and omitting this flag may give erroneously high F1 scores. | Use predicted part-of-speech tags for EVALB, if available\n\nAs an example, you can evaluate a trained model using the following command:\n```\npython src/main.py test --model-path models/en_bert_base_dev=*.pt\n```\n\n### Exporting Models for Inference\n\nThe `benepar` package can directly use saved checkpoints by replacing a model name like `benepar_en3` with a path such as `models/en_bert_base_dev_dev=95.67.pt`. However, releasing the single-file checkpoints has a few shortcomings:\n* Single-file checkpoints do not include the tokenizer or pre-trained model config. These can generally be downloaded automatically from the HuggingFace model hub, but this requires an Internet connection and may also (incidentally and unnecessarily) download pre-trained weights from the HuggingFace Model Hub\n* Single-file checkpoints are 3x larger than necessary, because they save optimizer state\n\nUse `src/export.py` to convert a checkpoint file into a directory that encapsulates everything about a trained model. For example,\n```\npython src/export.py export \\\n  --model-path models/en_bert_base_dev=*.pt \\\n  --output-dir=models/en_bert_base\n```\n\nWhen exporting, there is also a `--compress` option that slightly adjusts model weights, so that the output directory can be compressed into a ZIP archive of much smaller size. We use this for our official model releases, because it's a hassle to distribute model weights that are 2GB+ in size. When using the `--compress` option, it is recommended to specify a test set in order to verify that compression indeed has minimal impact on parsing accuracy. Using the development data for verification is not recommended, since the development data was already used for the model selection criterion during training.\n```\npython src/export.py export \\\n  --model-path models/en_bert_base_dev=*.pt \\\n  --output-dir=models/en_bert_base \\\n  --test-path=data/wsj/test_23.LDC99T42\n```\n\nThe `src/export.py` script also has a `test` subcommand that's roughly similar to `python src/main.py test`, except that it supports exported models and has slightly different flags. We can run the following command to verify that our English parser using BERT-large-uncased indeed achieves 95.55 F1 on the canonical WSJ test set:\n```\npython src/export.py test --model-path benepar_en3_wsj --test-path data/wsj/test_23.LDC99T42\n```\n\n## Reproducing Experiments\n\nSee [`EXPERIMENTS.md`](EXPERIMENTS.md) for instructions on how to reproduce experiments reported in our ACL 2018 and 2019 papers.\n\n## Citation\n\nIf you use this software for research, please cite our papers as follows:\n\n```\n@inproceedings{kitaev-etal-2019-multilingual,\n    title = \"Multilingual Constituency Parsing with Self-Attention and Pre-Training\",\n    author = \"Kitaev, Nikita  and\n      Cao, Steven  and\n      Klein, Dan\",\n    booktitle = \"Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics\",\n    month = jul,\n    year = \"2019\",\n    address = \"Florence, Italy\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://www.aclweb.org/anthology/P19-1340\",\n    doi = \"10.18653/v1/P19-1340\",\n    pages = \"3499--3505\",\n}\n\n@inproceedings{kitaev-klein-2018-constituency,\n    title = \"Constituency Parsing with a Self-Attentive Encoder\",\n    author = \"Kitaev, Nikita  and\n      Klein, Dan\",\n    booktitle = \"Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)\",\n    month = jul,\n    year = \"2018\",\n    address = \"Melbourne, Australia\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://www.aclweb.org/anthology/P18-1249\",\n    doi = \"10.18653/v1/P18-1249\",\n    pages = \"2676--2686\",\n}\n```\n\n## Credits\n\nThe code in this repository and portions of this README are based on https://github.com/mitchellstern/minimal-span-parser\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5400:B08CF:175299:5DAD96:6AB92BEF"},"text_sha256":"a900f21f47675ee948c7554cd6a6b44d1f15d6b4d4cb2395a22df884e3c8c8ef"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stratosphereips/StratosphereLinuxIPS","input_row":{"repository":"stratosphereips/StratosphereLinuxIPS","url":"https://github.com/stratosphereips/StratosphereLinuxIPS","name":"StratosphereLinuxIPS","owner":"stratosphereips","description":"Slips, a free software behavioral Python intrusion prevention system (IDS/IPS) that uses machine learning to detect malicious behaviors in the network traffic. Stratosphere Laboratory, AIC, FEL, CVUT in Prague.","language":"Python","license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0","license_osi_approved":"true","stars":891,"issues":1259,"created_at":"2015-12-08T16:06:38Z","updated_at":"2026-09-25T12:00:12Z","first_commit_at":"2015-12-08T16:35:04Z","last_commit_at":"2026-09-01T13:26:12Z","activity_months":128.77000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:14.316Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stratosphereips/StratosphereLinuxIPS","visibility":"public","created_at":"2015-12-08T16:06:38Z","updated_at":"2026-09-25T12:00:12Z","private":false,"fork":false,"archived":false,"stargazers_count":891,"open_issues_count":440,"license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0"},"error":"","rate":{"github_remaining":"2058","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17C1081:1BE6D3E:6AB92BFA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2057","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:179B710:1BBFC38:6AB92BFA"},"commit":{"sha":"541b6166b99f5cf03a0c0dabe51450e61c605f41","url":"https://github.com/stratosphereips/StratosphereLinuxIPS/commit/541b6166b99f5cf03a0c0dabe51450e61c605f41","date":"2018-05-01T09:02:06Z","author_date":"2018-05-01T09:02:06Z","committer_date":"2018-05-01T09:02:06Z","tree_sha":"03b3556ef4d0165eebebb60ae536e002b573c356","message_first_line":"more"},"tree_request_status":200,"tree_rate":{"github_remaining":"2056","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:178C6CA:1BB05F4:6AB92BFB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7890,"blob_sha":"6e682f895e4fc1d0ba4eb8729c4bc0bb7887a284","priority":0}],"documents":[{"path":"README.md","size":7890,"blob_sha":"6e682f895e4fc1d0ba4eb8729c4bc0bb7887a284","priority":0,"status":200,"text":"# Stratosphere Linux IPS (slips) Version 0.3.4\nThis is the linux version of the Stratosphere IPS, a behavioral-based intrusion detection and prevention system that uses machine learning algorithms to detect malicious behaviors. It is part of a larger suite of programs that include the [Stratosphere Windows IPS] and the [Stratosphere Testing Framework].\n\nThis alpha version receives flows from a ra client ([Argus] Suite) and process them using a specific algorithm. The purpose of the Alpha version is to get feedback from the community, please send us your bug reports, feature requests and ideas. See the [Stratosphere IPS Website](https://stratosphereips.org).\n\n## Platform\nSlips (using argus) has been tested on Linux Debian 8 and Apple IOS 10.9.5 so far.\n\n## Architecture\nThe idea of slips is to focus on the machine learning part of the detection and not in capturing the network traffic. That is why the traffic is received from an external Argus instance. Argus captures the packets in the networks and makes them _available_ to anyone connecting to the Argus port. Argus do not send the packets until somebody ask for them.\n\nThe basic architecture is to read the flows from an Argus instance using the __ra__ tool and to send the flows to slips as standard input. This way of working is very good because we can analyze the traffic of our own computer, and also we can analyze the traffic of a remote network or any other computer where an Argus instance is running. Actually if you run the Argus program in any Windows, Mac or router, slips can analyze the traffic.\n\n## Usage\nTo use this alpha version you will need an argus instance running and listening in one port.\n\n- If you don't have an Argus instance, first install it:\n    - Source install from [Argus].\n    - In Debian and Ubuntu you can do\n        - sudo apt-get install argus argus-clients\n\n- To run argus in your own computer you should do:\n    - argus -B localhost -F [slipsfolder]/argus.conf\n\n    This will run argus in your interface, open the port 561 in the localhost address only and run in background. See the argus configuration file and the Argus documentation for more information. (port 561 is used because is not in the default port list of nmap, so there are fewer chances that anybody will find it).\n\n- Then you start the slips program receiving packets from a ra client.\n\n    ra -F [slipsfolder]/ra.conf -n -Z b -S 127.0.0.1:561 | [slipsfolder]/./slips.py -f [slipsfolder]/models -d\n\n    This will read the network traffic in your computer and try to detect some malicious behavior by applying the models in the folder __models__.\n\n    > Warning! You should wait at least one hour before Argus starts sending flows to slips. After this first hour the flows will arrive continually, but Argus is configured to read packets for one hour before it can create the flows. The best way of avoiding this is to let Argus run in the computer all the time and just connect with slips when you want. Remember: when is running Argus do not store the packets.\n\n## Detection Models\nThe core of the slips program is not only the machine learning algorithm, but more importantly the __behavioral models__. The behavioral models are created with the [Stratosphere Testing Framework] and are exported by our research team. This is very important because the models are _curated_ to maximize the detection. If you want to play and create your own behavioral models see the Stratosphere Testing Framework documentation.\n\nThe behavioral models are stored in the __models__ folder and will be updated regularly. In this version you should pull the git repository by hand to update the models.\n\n## Features \nThis version of slips comes with the following features:\n\n- If you execute slips without the -m parameter it will __not__ detect any behavior in the network but just print the tuples (see the Stratosphere web page for more information). So actually you can also use slips to see what is happening in your network even without detection.\n- Use -a to restrict the minimum amount of letters that the tuples had to have to be considered for detection. The default is a minimum of 3 letters which is enough for having at least one periodic letter.\n- slips works by separating the traffic in time windows. This allows it to report to the user the detections in a fixed amount of time. The default time window is now __1 minute__ but you can change it with the parameter -w (a time window of five minutes is also recommended). (Warning: In the future we will update this to also consider the detection of IP addresses instead of tuples)\n- If you want to tell slips to actually try to detect something, you should specify -m to tell slips where to find the behavioral models.\n- The -p option tells slips to print the tuples that were detected. Even if the detection is working, without -p the tuples are not printed.\n- If you want to be alerted of any detection without looking at the screen you can specify -s to have a sound alert. You need to install the pygames libraries.\n- If you want to avoid doing any detection you should use -D.\n- If you want to anonymize the source IP addresses before doing any processing, you can use -A. This will force all the source IPs to be hashed to MD5 in memory. Also a file is created in the current folder with the relationship of original IP addresses and new hashed IP addresses. So you can later relate the detections.\n\n\n## The use of verbose (-v)\n\n- -v 0: \n    - In each time window shows:\n        - Print the detected source IP address, together with info about the thresholds and scores.\n- -v 1: \n    - In each time window shows:\n        - Print the detected source IP address, together with info about the thresholds and scores.\n- -v 2: \n    - For each detected source IP, print also the detected connections.\n- -v 3: \n    - For each detected connection, print also the which model matched that connection and when.\n- -v 4: \n    - Print the source IP addresses that were NOT detected.\n- -v 5: \n    - For the NOT detected IP, print the connections\n- -v 6: \n    - For the NOT detected IP, print each NOT detected test for each connection\n\n\n\n[Argus]: http://qosient.com/argus/ \"Argus\"\n[Stratosphere Testing Framework]: https://github.com/stratosphereips/StratosphereTestingFramework\n[Stratosphere Windows IPS]: https://github.com/stratosphereips/StratosphereIps\n\n### Where does it work\n- Slips runs in \n    - Ubuntu 16.04 LTS\n    - Debian stable/testing/unstable\n    - MacOS 10.9.5, 10.10.x to 10.12.x\n- To try:\n    - Android\n    - IOS\n### Roadmap\n\n### Changelog\n- 0.3.4\n    - This is a mayor version change. Implementing new algorithms for analyzing the results, management of IPs, connections, whois database and more features.\n    - A new parameter to specify the file (-r). This is as fast as reading the file from stdin.\n    - Now we have a configuration file slips.conf. In there you can specify from fixed parameters, the time formats, to the columns in the flow file.\n- 0.3.3alpha\n    - First stable version with a minimal algorithm for detecting behavioral threats.\n\n\n\n### TODO\n- Make a good reference to the installation of argus 3.x\n- Create a local DB of IPs so we can rememeber info about them (sqlite)\n- Add priories to the log: CRITIAL, etc.\n- If even the format of the flows change during the read, one idea is to search for an exception in the read of the format and then check which is the new format in the flow. Only check when there is an exception.\n\n### Author and Contributors\n\n- The author of the project is Sebastian Garcia. sebastian.garcia@agents.fel.cvut.cz, eldraco@gmail.com. (Send an email for bugs, reports, ideas or comments)\n- Ondrej Lukas: New detection metric of infected IPs based on timewindows, detection windows, weighted scores and averages. Also all the ip_handler, alerts classs, etc. \n- Elaheh Biglar Beigi\n- MariaRigaki \n- kartik88363\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4CC0:35999:179714:5DF2B4:6AB92BFB"},"text_sha256":"4f3f548f28a4cb201542faab9264fa88c44b9fd0b645dd1900a7720ee77d82ba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2055","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17DD500:1C02C05:6AB92BFB"},"commit":{"sha":"9653045a88fb5e9c833b067d225ed92e5ed63867","url":"https://github.com/stratosphereips/StratosphereLinuxIPS/commit/9653045a88fb5e9c833b067d225ed92e5ed63867","date":"2026-06-26T14:51:47Z","author_date":"2026-06-26T14:51:47Z","committer_date":"2026-06-26T14:51:47Z","tree_sha":"ccbf4ed32048da57ff08468a31ca8ae3ff155498","message_first_line":"remove custom should_stop() func, the default one ensures no pending msgs are left without processing"},"tree_request_status":200,"tree_rate":{"github_remaining":"2054","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17DB395:1C00F1C:6AB92BFC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18560,"blob_sha":"e8361a096cd65a9b5b3b2de3740e0901f428d195","priority":0},{"path":".github/SECURITY.md","size":508,"blob_sha":"f6309b7c79662373c860a310f8d3596043ce728f","priority":1},{"path":"docs/immune/security_audit.md","size":31497,"blob_sha":"c32cef22631ced5324c18009a7c21afdd6236c9b","priority":1}],"documents":[{"path":"README.md","size":18560,"blob_sha":"e8361a096cd65a9b5b3b2de3740e0901f428d195","priority":0,"status":200,"text":"<h1 align=\"center\">\nSlips v1.1.21\n<\/h1>\n\n\n[![License](https://img.shields.io/badge/license-GPLv2-blue)](./LICENSE)\n[![GitHub version](https://img.shields.io/github/v/tag/stratosphereips/StratosphereLinuxIPS?label=version)](https://github.com/stratosphereips/StratosphereLinuxIPS)\n![Python](https://img.shields.io/badge/python-3.8-blue)\n![GitHub language count](https://img.shields.io/github/languages/count/stratosphereips/StratosphereLinuxIPS)\n![GitHub repository size](https://img.shields.io/github/repo-size/stratosphereips/StratosphereLinuxIPS)\n![Docker Image Size (tag)](https://img.shields.io/docker/image-size/stratosphereips/slips/latest?color=blue&label=docker%20image%20size)\n![Docker Pulls](https://img.shields.io/docker/pulls/stratosphereips/slips)\n\n[![GitHub issues](https://img.shields.io/github/issues/stratosphereips/StratosphereLinuxIPS.svg?color=green)](https://GitHub.com/stratosphereips/StratosphereLinuxIPS/issues/)\n[![GitHub issues-closed](https://img.shields.io/github/issues-closed/stratosphereips/StratosphereLinuxIPS.svg?color=green)](https://GitHub.com/stratosphereips/StratosphereLinuxIPS/issues?q=is%3Aissue+is%3Aclosed)\n[![GitHub open-pull-requests](https://img.shields.io/github/issues-pr-raw/stratosphereips/StratosphereLinuxIPS?color=green&label=open%20PRs)](https://github.com/stratosphereips/StratosphereLinuxIPS/pulls?q=is%3Aopen)\n[![GitHub pull-requests closed](https://img.shields.io/github/issues-pr-closed-raw/stratosphereips/StratosphereLinuxIPS?color=green&label=closed%20PRs)](https://github.com/stratosphereips/StratosphereLinuxIPS/pulls?q=is%3Aclosed)\n[![GitHub contributors](https://img.shields.io/github/contributors/stratosphereips/StratosphereLinuxIPS?color=orange)](https://GitHub.com/stratosphereips/StratosphereLinuxIPS/contributors/)\n![GitHub forks](https://img.shields.io/github/forks/stratosphereips/StratosphereLinuxIPS?color=orange)\n![GitHub Org's stars](https://img.shields.io/github/stars/stratosphereips/StratosphereLinuxIPS?color=orange)\n[![GitHub watchers](https://img.shields.io/github/watchers/stratosphereips/StratosphereLinuxIPS?color=orange)](https://GitHub.com/stratosphereips/StratosphereLinuxIPS/watchers/)\n\n[![License](https://img.shields.io/badge/Blog-Stratosphere-cyan)](https://www.stratosphereips.org/blog/tag/slips)\n[![Discord](https://img.shields.io/discord/761894295376494603?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/zu5HwMFy5C)\n![Twitter Follow](https://img.shields.io/twitter/follow/StratosphereIPS?style=social)\n\n<hr>\n\n\n# Table of Contents\n\n- [Introduction](#introduction)\n- [Usage](#usage)\n- [GUI](#graphical-user-interface)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Features](#features)\n- [Contributing](#contributing)\n- [Documentation](#documentation)\n- [Troubleshooting](#troubleshooting)\n- [License](#license)\n- [Credits](#credits)\n- [Changelog](#changelog)\n- [Roadmap](#roadmap)\n- [Demos](#demos)\n- [Funding](#funding)\n\n\n# Slips: Behavioral Machine Learning-Based Intrusion Prevention System\n\n\nSlips is a powerful endpoint behavioral intrusion prevention and detection system that uses machine learning to detect malicious behaviors in network traffic. Slips can work with network traffic in real-time, PCAP files, and network flows from popular tools like Suricata, Zeek/Bro, and Argus. Slips threat detection is based on a combination of machine learning models trained to detect malicious behaviors, 40+ threat intelligence feeds, and expert heuristics. Slips gathers evidence of malicious behavior and uses extensively trained thresholds to trigger alerts when enough evidence is accumulated.\n\n<img src=\"https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/docs/images/slips.gif\" width=\"850px\" title=\"Slips in action.\">\n\n---\n\n\n# Introduction\nSlips is the first free software behavioral machine learning-based IDS/IPS for endpoints. It was created in 2012 by Sebastian Garcia at the Stratosphere Laboratory, AIC, FEE, Czech Technical University in Prague. The goal was to offer a local IDS/IPS that leverages machine learning to detect network attacks using behavioral analysis.\n\n\nSlips is supported on Linux, MacOS, and windows dockers only. The blocking features of Slips are only supported on Linux\n\nSlips is Python-based and relies on [Zeek network analysis framework](https://zeek.org/get-zeek/) for capturing live traffic and analyzing PCAPs. and relies on\nRedis >= 7.0.4 for interprocess communication.\n\n---\n\n# Usage\n\nThe recommended way to use Slips is on Docker.\n\n#### Linux and Windows hosts\n```\ndocker run --rm -it -p 55000:55000  --cpu-shares \"700\" --memory=\"8g\" --memory-swap=\"8g\" --net=host --cap-add=NET_ADMIN --name slips stratosphereips/slips:latest\n```\n\n```\n./slips.py -f dataset/test7-malicious.pcap -o output_dir\n```\n\n```\ncat output_dir/alerts.log\n```\n\n#### Macos\nIn MacOS, do not use --net=host if you want to access the internal container's ports from the host.\n\n```\ndocker run --rm -it -p 55000:55000 --platform linux/amd64 --cpu-shares \"700\" --memory=\"8g\" --memory-swap=\"8g\" --cap-add=NET_ADMIN --name slips stratosphereips/slips_macos_m1:latest\n```\n\n```\n./slips.py -f dataset/test7-malicious.pcap -o output_dir\n```\n\n```\ncat output_dir/alerts.log\n```\n\n\n[For more installation options](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#installation)\n\n[For a detailed explanation of Slips parameters](https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#slips-parameters)\n\n---\n\n\n# Graphical User Interface\n\nTo check Slips output using a GUI you can use the web interface. An optional\nKalipso checkout is also available as the `modules/kalipso` submodule for the\nterminal interface.\n\n##### Web interface\n\n    ./slips.py -e 1 -f dataset/test7-malicious.pcap -o output_dir -w\n\nThen navigate to ```http://localhost:55000/``` from your browser.\n\n<img src=\"https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/docs/images/web_interface.png\" width=\"850px\">\n\nFor more info about the web interface, check the docs: https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#the-web-interface\n\n##### Kalipso submodule\n\nKalipso is maintained in a separate repository and included here as an optional\nsubmodule:\n\n```bash\ngit submodule update --init --recursive modules/kalipso\n```\n\nSee the installation docs for native setup details.\n\n\n# Requirements\n\nSlips requires Python 3.10.12 and at least 4 GBs of RAM to run smoothly.\n\n---\n\n# Installation\n\n\nSlips can be run on different platforms, the easiest and most recommended way if you're a Linux user is to run Slips on Docker.\n\n* [Docker](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#slips-in-docker)\n  * Dockerhub (recommended)\n    * [Linux and windows hosts](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#linux-and-windows-hosts)\n    * [MacOS hosts](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#macos-hosts)\n  * [Docker-compose](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#running-slips-using-docker-compose)\n  * [Dockerfile](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#building-slips-from-the-dockerfile)\n* Native\n  * [Using install.sh](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#install-slips-using-shell-script)\n  * [Manually](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#installing-slips-manually)\n* [on RPI (Beta)](https://stratospherelinuxips.readthedocs.io/en/develop/installation.html#installing-slips-on-a-raspberry-pi)\n\n\n---\n\n\n# Configuration\nSlips has a [config/slips.yaml](https://github.com/stratosphereips/StratosphereLinuxIPS/blob/develop/config/slips.yaml) that contains user configurations for different modules and general execution.\n\nDo not edit the default `config/slips.yaml` directly. Create a copy for your local configuration changes and run Slips with `-c`, for example `./slips.py -c config/my_slips.yaml -f dataset/test7-malicious.pcap`.\n\nThe same applies to `config/whitelist.conf`: keep the default file unchanged, create a copy, and set `whitelists.local_whitelist_path` in your copied Slips config file to point to your copied whitelist file.\nSlips aborts updating to new versions when there are changes to Slips local config files.\n\n* You can change the timewindow width by modifying the ```time_window_width``` parameter\n* You can change the analysis direction to ```all```  if you want to see the attacks from and to your computer\n* You can also specify whether to ```train``` or ```test``` the ML models\n\n* You can enable [popup notifications](https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#popup-notifications) of evidence, enable [blocking](https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#slips-permissions), [plug in your own zeek script](https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#plug-in-a-zeek-script) and more.\n* The `t_cell` section is enabled by default so Slips can consume centrally tagged `PAMP` and `DAMP` evidence, match extracted antigens against accepted regexes, and then carry a signal-specific priming profile into later co-stimulation and context decisions. `DAMP` can now create a weaker state-1 cell with stricter later thresholds and a shorter waiting window, while all responder state stays in its own SQLite DB.\n\n\n[More details about the config file options here]( https://stratospherelinuxips.readthedocs.io/en/develop/usage.html#modifying-the-configuration-file)\n\n---\n\n# Features\nSlips key features are:\n\n* **Behavioral Intrusion Prevention**: Slips acts as a powerful system to prevent intrusions based on detecting malicious behaviors in network traffic using machine learning.\n* **Modularity**: Slips is written in Python and is highly modular with different modules performing specific detections in the network traffic.\n* **Targeted Attacks and Command & Control Detection**: It places a strong emphasis on identifying targeted attacks and command and control channels in network traffic.\n* **Traffic Analysis Flexibility**: Slips can analyze network traffic in real-time, PCAP files, and network flows from popular tools like Suricata, Zeek/Bro, and Argus.\n* **Threat Intelligence Updates**: Slips continuously updates threat intelligence files and databases, providing relevant detections as updates occur.\n* **HTTPS Anomaly Detection**: Adaptive TLS/HTTPS anomaly detection with drift handling and a local HTML report generator for deep dives.\n* **Integration with External Platforms**: Modules in Slips can look up IP addresses on external platforms such as VirusTotal and RiskIQ.\n* **Graphical User Interface**: Slips provides a web interface and an optional Kalipso terminal interface through the `modules/kalipso` submodule.\n* **Shared LLM Access**: Slips can expose configured LLM backends such as Ollama, OpenAI, and Anthropic to other modules through Redis channels.\n* **Hierarchical Alert Summaries**: Slips can turn correlated alert evidence into analyst-facing one-paragraph incident summaries, recursively reducing oversized evidence sets instead of truncating them.\n* **Pseudo-Random Regex Generation**: Slips can generate and validate pseudo-random regexes for DNS domains, URIs, filenames, TLS SNI, and certificate CN fields for later Zeek-side use.\n* **Immune-Style T Cell Response**: Slips can consume centrally tagged `PAMP` and `DAMP` evidence, correlate extracted antigens with accepted regexes, and use signal-specific T-cell priming plus mixed `PAMP`/`DAMP` danger pressure to decide whether to stay tolerant, activate, contain, or store long-term memory.\n* **Peer-to-Peer (P2P) Module**: Slips includes a complex automatic system to find other peers in the network and share IoC data automatically in a balanced, trusted manner. The P2P module can be enabled as needed.\n* **Docker Implementation**: Running Slips through Docker on Linux systems is simplified, allowing real-time traffic analysis.\n* **Detailed Documentation**: Slips provides detailed documentation guiding users through usage instructions for efficient utilization of its features.\n* **Federated learning** Using the feel_project submodule. for more information [check the docs](https://github.com/stratosphereips/feel_project/blob/main/docs/Federated_Learning.md)\n\n---\n\n# Contributing\n\nWe welcome contributions to improve the functionality and features of Slips.\n\nPlease read carefully the [contributing guidelines](https://stratospherelinuxips.readthedocs.io/en/develop/contributing.html) for contributing to the development of Slips\n\nYou can run Slips and report bugs, make feature requests, and suggest ideas, open a pull request with a solved GitHub issue and new feature, or open a pull request with a new detection module.\n\nThe instructions to create a new detection module along with a template [here](https://stratospherelinuxips.readthedocs.io/en/develop/create_new_module.html).\n\nIf you are a student, we encourage you to apply for the Google Summer of Code program that we participate in as a hosting organization.\n\nCheck [Slips in GSoC2023](https://github.com/stratosphereips/Google-Summer-of-Code-2023) for more information.\n\n\nYou can [join our conversations in Discord](https://discord.gg/zu5HwMFy5C) for questions and discussions.\nWe appreciate your contributions and thank you for helping to improve Slips!\n\n---\n\n# Documentation\n[User documentation](https://stratospherelinuxips.readthedocs.io/en/develop/)\n\nT Cell design and configuration: [docs/t_cell_module.md](docs/t_cell_module.md)\n\nT Cell offline report generation and interpretation:\n[docs/t_cell_module.md#offline-html-report](docs/t_cell_module.md#offline-html-report)\n\n[Code docs](https://stratospherelinuxips.readthedocs.io/en/develop/code_documentation.html )\n\n---\n\n# Troubleshooting\n\nIf you can't listen to an interface without sudo, foe example when zeek is throwing the following error:\n```bash\nfatal error: problem with interface wlan0 (pcap_error: socket: Operation not permitted (pcap_activate))\n```\n\nyou can adjust zeek capabilities using the following command\n\n```\nsudo setcap cap_net_raw,cap_net_admin=eip /<path-to-zeek-bin/zeek\n```\n\n\n---\n\nYou can [join our conversations in Discord](https://discord.gg/zu5HwMFy5C) for questions and discussions.\n\nOr email us at\n* sebastian.garcia@agents.fel.cvut.cz\n* eldraco@gmail.com,\n* alyaggomaa@gmail.com\n\n---\n\n# License\n\n [GNU General Public License](https://github.com/stratosphereips/StratosphereLinuxIPS/blob/master/LICENCE)\n\n---\n\n\n# Credits\n\nFounder: [Sebastian Garcia](https://github.com/eldraco), sebastian.garcia@agents.fel.cvut.cz, eldraco@gmail.com.\n\nMain authors: [Sebastian Garcia](https://github.com/eldraco), [Alya Gomaa](https://github.com/AlyaGomaa), [Kamila Babayeva](https://github.com/kamilababayeva)\n\nContributors:\n\n* [Veronica Valeros](https://github.com/verovaleros)\n* [Frantisek Strasak](https://github.com/frenky-strasak)\n* [Dita Hollmannova](https://github.com/draliii)\n* [Ondrej Lukas](https://github.com/ondrej-lukas)\n* Elaheh Biglar Beigi\n* [Martin Řepa](https://github.com/HappyStoic)\n* [arkamar](https://github.com/arkamar)\n* [Maria Rigaki](https://github.com/MariaRigaki)\n* [Lukas Forst](https://github.com/LukasForst)\n* [Daniel Yang](https://github.com/danieltherealyang)\n\n---\n\n\n# Changelog\n\nhttps://github.com/stratosphereips/StratosphereLinuxIPS/blob/develop/CHANGELOG.md\n\n\n---\n\n# Demos\nThe following videos contain demos of Slips in action in various events:\n\n- 2022 BlackHat Europe Arsenal, Slips: A Machine-Learning Based, Free-Software, Network Intrusion Prevention System [[web](https://www.blackhat.com/eu-22/arsenal/schedule/index.html#slips-free-software-machine-learning-tool-for-network-intrusion-prevention-system-29599)]\n- 2022 BlackHat USA Arsenal, Slips: A Machine-Learning Based, Free-Software, Network Intrusion Prevention System [[web](https://www.blackhat.com/us-22/arsenal/schedule/index.html#slips-free-software-machine-learning-tool-for-network-intrusion-prevention-system-26687)]\n- 2021 BlackHat Europe Arsenal, Slips: A Machine-Learning Based, Free-Software, Network Intrusion Prevention System [[slides](https://mega.nz/file/EAIjWA5D#DoYhJknH1hpbqfS2ayVLwA7ewNT50jFQb7S3dVAKPko)] [[web](https://www.blackhat.com/eu-21/arsenal/schedule/#slips-a-machine-learning-based-free-software-network-intrusion-prevention-system-25116)]\n- 2021 BlackHat USA Arsenal, Slips: A Machine-Learning Based, Free-Software, Network Intrusion Prevention System [[web](https://www.blackhat.com/us-21/arsenal/schedule/#slips-a-machine-learning-based-free-software-network-intrusion-prevention-system-24105)]\n- 2021 BlackHat Asia Arsenal, Slips: A Machine-Learning Based, Free-Software, Network Intrusion Prevention System [[web](https://www.blackhat.com/asia-21/arsenal/schedule/#slips-a-machine-learning-based-free-software-network-intrusion-prevention-system-22576)]\n- 2020 Hack In The Box CyberWeek, Android RATs Detection With A Machine Learning-Based Python IDS [[video](https://www.youtube.com/watch?v=wx0V3qWdmyk)]\n- 2019 OpenAlt, Fantastic Attacks and How Kalipso can Find Them [[video](https://www.youtube.com/watch?v=p2FL2sECpS0&t=1s)]\n- 2016 Ekoparty, Stratosphere IPS. The free machine learning malware detection [[video](https://www.youtube.com/watch?v=IazEdK8R4YI)]\n\n---\n\n# Funding\nWe are grateful for the generous support and funding provided by the following organizations:\n\n\n- NlNet Foundation, https://nlnet.nl/\n\nThis project is funded through [NGI0 Entrust](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/Iris-P2P).\n\n[<img src=\"https://nlnet.nl/logo/banner.png\" alt=\"NLnet foundation logo\" width=\"20%\" />](https://nlnet.nl)\n[<img src=\"https://nlnet.nl/image/logos/NGI0_tag.svg\" alt=\"NGI Zero Logo\" width=\"20%\" />](https://nlnet.nl/entrust)\n\n\n- Artificial Intelligence Centre at the Czech Technical University in Prague, https://www.aic.fel.cvut.cz/\n- Avast, https://www.avast.com/\n- CESNET, https://www.cesnet.cz/\n- Google Summer of Code (2023, 2024), https://summerofcode.withgoogle.com/\n\nTheir funding has played a crucial role in the development and success of this project.\nWe sincerely appreciate their commitment to advancing technology and their recognition of\nthe value Slips brings to the community.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:180239:5E5BDB:6AB92BFB"},"text_sha256":"33abfdab1b0cf7d71e9e86591f62beb5e7ce8b8df2a57dc02b90b71462228bcc"},{"path":".github/SECURITY.md","size":508,"blob_sha":"f6309b7c79662373c860a310f8d3596043ce728f","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nReport security vulnerabilities to stratosphere+[repository_name]@aic.fel.cvut.cz. We are a small team. We will acknowledge your email as soon as we can. Report security vulnerabilities in third-party modules to the person or \nteam maintaining the module.\n\n## Disclosure Policy\n\nWhen our team receives a security bug report, we will take the following steps:\n\n  * Confirm the problem and determine the impact.\n  * Prepare a fix to the latest current version.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1192:11316A:17DDFC:5E37D7:6AB92BFC"},"text_sha256":"0a48cd7fd15ee94ad0890b630396892dcfed0f83598fcae3bc86e5ab8618cbaa"},{"path":"docs/immune/security_audit.md","size":31497,"blob_sha":"c32cef22631ced5324c18009a7c21afdd6236c9b","priority":1,"status":200,"text":"# Table Of Contents\n- [Security audit](#security-audit)\n  * [Executive summary](#executive-summary)\n  * [Scope](#scope)\n  * [Methodology and used tools](#methodology-and-used-tools)\n  * [Findings](#findings)\n  * [Notes](#notes)\n\n\n# Security audit\n\n## Executive summary\n\nThis audit was done by scanning Slips with the free open-source tools: [Trivy](https://trivy.dev/) and [Bearer](https://github.com/Bearer/bearer), and fixing the reported issues.\n\nThe main problems fixed by this audit were the web interface DB switch endpoint, unsafe command/path/SQL/HTML handling reported by Bearer, permissive directory permissions, and old dependencies in the Docker image.\n\nThe web interface issue was the highest impact one. `webinterface/app.py` used to start Flask on `0.0.0.0` using the configured web port, which is `55000` in `config/slips.yaml`. It also exposed `/db/<new_port>` as a state-changing GET endpoint without authentication or CSRF protection. This was fixed by binding the web interface to localhost, changing the DB switch to a CSRF-protected POST, and validating the requested Redis port.\n\nThe dependency fixes were handled in the Docker image and requirements files. Further dependency security patches will be handled automatically using [Dependabot](https://docs.github.com/en/code-security/dependabot), for example: [#1939](https://github.com/stratosphereips/StratosphereLinuxIPS/pull/1939), [#1917](https://github.com/stratosphereips/StratosphereLinuxIPS/pull/1917), [#1798](https://github.com/stratosphereips/StratosphereLinuxIPS/pull/1798), and [#1772](https://github.com/stratosphereips/StratosphereLinuxIPS/pull/1772).\n\n## Scope\n\nThe scope of this audit is:\n\n- Containers and Docker build files\n- Dependencies installed through apt, Python, and Go\n- Default configuration values\n- The codebase paths reported by Bearer\n- The web interface, core Slips code, and detection modules\n\n## Methodology and used tools\n\nWe used the following open source tools:\n\n- [Trivy](https://github.com/aquasecurity/trivy) to scan the Docker image and dependencies\n- [Bearer](https://github.com/Bearer/bearer) to scan the source code for security issues\n\nAfter the scans, the findings were checked manually. The table below includes only the fixed issues. Findings that are still waiting for upstream dependency fixes are not listed here.\n\n## Findings\n\nFull table sorted by severity (`Critical` first), with the `CVE` column converted to `CVE/CWE`.\n\n```{raw} html\n<style>\n.wy-nav-content {\n  max-width: none;\n}\n\n.security-audit-findings-table {\n  overflow-x: auto;\n  width: 100%;\n}\n\n.security-audit-findings-table table {\n  min-width: 1200px;\n  width: 100%;\n}\n<\/style>\n<div class=\"security-audit-findings-table\">\n```\n\n| CVE/CWE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Severity | Finding                                                                                                                                                                            | Component                                                                                                                                                                                                                | Status                                                                                                                                              |\n| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| - `CWE-352`<br>- `CWE-306`<br>- `CWE-862`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Critical | - Unauthenticated Redis DB switching.<br>- The web interface allowed a state-changing GET request to switch the connected Redis DB.                                                | - `webinterface/app.py`<br>- `static/app.js`<br>- `templates/app.html`<br>- `webinterface/utils.py`                                                                                                                      | Fixed by:<br>- using a CSRF-protected POST<br>- checking the requested Redis port<br>- returning JSON instead of redirecting from a GET request     |\n| - `CWE-1327`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Critical | - Web interface exposed on all interfaces.<br>- Flask was listening on `0.0.0.0` on the configured web port, `55000`.                                                              | - `webinterface/app.py`<br>- `config/slips.yaml`                                                                                                                                                                         | Fixed by binding Flask to `127.0.0.1`.                                                                                                              |\n| - `CWE-319`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Critical | Insecure HTTP connections reported by Bearer.                                                                                                                                      | - `http_analyzer/http_analyzer.py`<br>- `common/slips_utils.py`                                                                                                                                                          | Fixed by switching supported lookups to HTTPS.                                                                                                      |\n| - `CWE-78`<br>- `CWE-88`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Critical | Command execution paths used scanner-reported input without enough validation.                                                                                                     | - `modules/arp_poisoner`<br>- `modules/blocking`<br>- `modules/ip_info`<br>- `modules/iris`<br>- `modules/leak_detector`<br>- `modules/p2p_trust`<br>- `slips/main.py`<br>- `slips_files/common`<br>- `slips_files/core` | Fixed by validating:<br>- IPs<br>- ports<br>- paths<br>- interfaces<br>- packet filters<br>- command arguments                                      |\n| - `CWE-89`<br>- `CWE-943`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Critical | Dynamic SQL identifiers and values were built from external data in the SQLite wrappers reported by Bearer.                                                                        | - `persistence/fides_sqlite_db.py`<br>- `abstracts/isqlite.py`<br>- `sqlite_db/database.py`                                                                                                                              | Fixed by:<br>- validating table and column identifiers<br>- using parameterized values where needed                                                 |\n| - `CVE-2020-29652`<br>- `CVE-2021-3121`<br>- `CVE-2021-33194`<br>- `CVE-2021-38561`<br>- `CVE-2021-4239`<br>- `CVE-2021-43565`<br>- `CVE-2022-23492`<br>- `CVE-2022-27191`<br>- `CVE-2022-27664`<br>- `CVE-2022-28131`<br>- `CVE-2022-2879`<br>- `CVE-2022-2880`<br>- `CVE-2022-29804`<br>- `CVE-2022-30580`<br>- `CVE-2022-30630`<br>- `CVE-2022-30631`<br>- `CVE-2022-30632`<br>- `CVE-2022-30633`<br>- `CVE-2022-30634`<br>- `CVE-2022-30635`<br>- `CVE-2022-32149`<br>- `CVE-2022-32189`<br>- `CVE-2022-41715`<br>- `CVE-2022-41716`<br>- `CVE-2022-41720`<br>- `CVE-2022-41722`<br>- `CVE-2022-41723`<br>- `CVE-2022-41724`<br>- `CVE-2022-41725`<br>- `CVE-2022-44797`<br>- `CVE-2023-24534`<br>- `CVE-2023-24536`<br>- `CVE-2023-24537`<br>- `CVE-2023-24538`<br>- `CVE-2023-24539`<br>- `CVE-2023-24540`<br>- `CVE-2023-29400`<br>- `CVE-2023-29403`<br>- `CVE-2023-39325`<br>- `CVE-2023-39533`<br>- `CVE-2023-40583`<br>- `CVE-2023-45283`<br>- `CVE-2023-45287`<br>- `CVE-2023-45288`<br>- `CVE-2024-24790`<br>- `CVE-2024-34156`<br>- `CVE-2024-38365`<br>- `CVE-2024-45337`<br>- `CVE-2025-22869`<br>- `CVE-2025-47907`<br>- `CVE-2025-58183`<br>- `CVE-2025-61726`<br>- `CVE-2025-61728`<br>- `CVE-2025-61729`<br>- `CVE-2025-68121`<br>- `CVE-2026-25679`<br>- `CVE-2026-32280`<br>- `CVE-2026-32281`<br>- `CVE-2026-32283`<br>- `CVE-2026-33811`<br>- `CVE-2026-33814`<br>- `CVE-2026-39820`<br>- `CVE-2026-39836`<br>- `CVE-2026-42499` | Critical | - Old Go runtime and Go modules in the `p2p4slips` binary left Trivy-reported CVEs in the final image.<br>- This included fixed CVEs in Go stdlib and third-party Go dependencies. | - `docker/Dockerfile`<br>- `p2p4slips/p2p4slips`                                                                                                                                                                         | Fixed by:<br>- building `p2p4slips` with Go `1.26.3`<br>- copying the hardened binary into the final image                                          |\n| - `CVE-2022-21698`<br>- `CVE-2022-23492`<br>- `CVE-2022-27191`<br>- `CVE-2022-27664`<br>- `CVE-2022-2879`<br>- `CVE-2022-2880`<br>- `CVE-2022-32149`<br>- `CVE-2022-41715`<br>- `CVE-2022-41716`<br>- `CVE-2022-41720`<br>- `CVE-2022-41722`<br>- `CVE-2022-41723`<br>- `CVE-2022-41724`<br>- `CVE-2022-41725`<br>- `CVE-2022-44797`<br>- `CVE-2023-24534`<br>- `CVE-2023-24536`<br>- `CVE-2023-24537`<br>- `CVE-2023-24538`<br>- `CVE-2023-24539`<br>- `CVE-2023-24540`<br>- `CVE-2023-29400`<br>- `CVE-2023-29403`<br>- `CVE-2023-39325`<br>- `CVE-2023-39533`<br>- `CVE-2023-40583`<br>- `CVE-2023-45283`<br>- `CVE-2023-45287`<br>- `CVE-2023-45288`<br>- `CVE-2024-24790`<br>- `CVE-2024-34156`<br>- `CVE-2024-38365`<br>- `CVE-2024-45337`<br>- `CVE-2025-22869`<br>- `CVE-2025-47907`<br>- `CVE-2025-58183`<br>- `CVE-2025-61726`<br>- `CVE-2025-61728`<br>- `CVE-2025-61729`<br>- `CVE-2025-68121`<br>- `CVE-2026-25679`<br>- `CVE-2026-32280`<br>- `CVE-2026-32281`<br>- `CVE-2026-32283`<br>- `CVE-2026-33811`<br>- `CVE-2026-33814`<br>- `CVE-2026-39820`<br>- `CVE-2026-39836`<br>- `CVE-2026-42499`                                                                                                                                                                                                                                                                                                                                         | Critical | The old copied Iris binary path in the image, `modules/irisModule`, carried Trivy-reported Go CVEs.                                                                                | - `docker/Dockerfile`<br>- `iris/iris`                                                                                                                                                                                   | Fixed by:<br>- rebuilding Iris in a dedicated stage<br>- copying it into the active `iris/iris` path instead of shipping the stale duplicate binary |\n| - `CWE-79`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | High     | Dynamic HTML insertion could render untrusted data as HTML in the web interface.                                                                                                   | `static/app.js`                                                                                                                                                                                                          | Fixed by replacing `innerHTML` with DOM node creation and text nodes.                                                                               |\n| - `CWE-276`<br>- `CWE-732`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | High     | Permissive file and directory permissions.                                                                                                                                         | - `feeds_update_manager/feeds_update_manager.py`<br>- `slips/main.py`                                                                                                                                                    | Fixed by using:<br>- `0700` for downloaded TI files<br>- `01777` for the shared lock directory instead of plain world-writable permissions          |\n| - `CWE-22`<br>- `CWE-73`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | High     | User-supplied config file path was accepted without normalizing it through Slips path validation.                                                                                  | `helpers/checker.py`                                                                                                                                                                                                     | Fixed by validating the config path after checking that it exists.                                                                                  |\n| - `CVE-2026-0994`<br>- `CVE-2026-42215`<br>- `CVE-2026-42284`<br>- `CVE-2026-44243`<br>- `CVE-2026-44244`<br>- `CVE-2026-44431`<br>- `CVE-2026-44432`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | High     | Python dependencies had fixed Trivy findings in:<br>- `GitPython`<br>- `urllib3`<br>- `protobuf`                                                                                   | - `install/requirements.txt`<br>- `light/requirements.txt`                                                                                                                                                               | Fixed by upgrading:<br>- `GitPython` to `3.1.50`<br>- `urllib3` to `2.7.0`<br>- `protobuf` to `5.29.6`                                              |\n| - `CVE-2024-35870`<br>- `CVE-2024-53179`<br>- `CVE-2024-56692`<br>- `CVE-2025-37899`<br>- `CVE-2025-38118`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | High     | - The Docker image kept build-only packages in the final image.<br>- These packages triggered `linux-libc-dev` CVEs.                                                               | `docker/Dockerfile`                                                                                                                                                                                                      | Fixed by:<br>- splitting build stages<br>- purging build dependencies from the final image                                                          |\n\n```{raw} html\n<\/div>\n```\n\n## Notes\n\n- Bearer and Trivy reported some false positives. We investigated and discarded them.\n  Example of the FPs that are not an issue in Slips context: when the reported path is\n  - not reachable by untrusted users\n  - is only used with local Slips-controlled data\n  - or is a p2p related path that is already constrained by Slips P2P trust models.\n- Data received and used by P2P, Fides, and Iris is intentionally not sanitized. Slips relies on its local trust model there.\n- Some vulnerabilities are not disclosed here because the upstream maintainers of the affected dependencies have not released fixed versions yet. We are monitoring them and will update Slips once fixed versions are available.\n\n## How AI was used here\n- brainstorming, checking best practice, comparing available tools.\n- debugging and fixing of unit and integration tests.\n- suggesting mitigations for some of the reported CVEs and CWEs. e.g the multi-stage build in docker\n- The following vulnerabilities were fixed by AI:\n  - CVE-2024-35870\n  - CWE-78 and CWE-88 (sanitization of command execution paths of all modules and core code.)\n- Polishing and formatting this report.\n\nCVEs fixed by the AI were reviewed and tested manually by a human :)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:1808A9:5E638E:6AB92BFD"},"text_sha256":"f95234bc6792960597096bba5d8cfb5a19bf0d383fcaf22663ae2c920e61a69f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"parlance/ctcdecode","input_row":{"repository":"parlance/ctcdecode","url":"https://github.com/parlance/ctcdecode","name":"ctcdecode","owner":"parlance","description":"PyTorch CTC Decoder bindings","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":857,"issues":164,"created_at":"2017-06-14T20:17:41Z","updated_at":"2026-08-24T07:59:42Z","first_commit_at":"2017-06-14T18:40:15Z","last_commit_at":"2021-06-07T12:44:59Z","activity_months":47.759999999999998,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:18.110Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"parlance/ctcdecode","visibility":"public","created_at":"2017-06-14T20:17:41Z","updated_at":"2026-08-24T07:59:42Z","private":false,"fork":false,"archived":false,"stargazers_count":857,"open_issues_count":98,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2053","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0877:6E4BB:18074AD:1C2C899:6AB92BFE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2052","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17E0897:1C066B5:6AB92BFE"},"commit":{"sha":"0e3aef7b35200a14658fb762bebded93ee1288f9","url":"https://github.com/parlance/ctcdecode/commit/0e3aef7b35200a14658fb762bebded93ee1288f9","date":"2018-05-20T09:19:02Z","author_date":"2018-05-20T09:19:02Z","committer_date":"2018-05-20T09:19:02Z","tree_sha":"ea77acebe2b612ce8df9233b1ed49760d882da63","message_first_line":"Merge pull request #69 from bstriner/install"},"tree_request_status":200,"tree_rate":{"github_remaining":"2051","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:17FC122:1C21E4D:6AB92BFE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":669,"blob_sha":"b2a9e3c21ccbad9a777bae713c8d2a5798af8c78","priority":0}],"documents":[{"path":"README.md","size":669,"blob_sha":"b2a9e3c21ccbad9a777bae713c8d2a5798af8c78","priority":0,"status":200,"text":"# ctcdecode\n\nctcdecode is an implementation of CTC (Connectionist Temporal Classification) beam search decoding for PyTorch.\nC++ code borrowed liberally from Paddle Paddles' [DeepSpeech](https://github.com/PaddlePaddle/DeepSpeech).\nIt includes swappable scorer support enabling standard beam search, and KenLM-based decoding.\n\n## Installation\nThe library is largely self-contained and requires only PyTorch and CFFI. Building the C++ library requires gcc or clang. KenLM language modeling support is also optionally included, and enabled by default.\n\n```bash\n# get the code\ngit clone --recursive https://github.com/parlance/ctcdecode.git\ncd ctcdecode\npip install .\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3780:1A3D83:186E7C:5ECA53:6AB92BCD"},"text_sha256":"80cd73301efb9eb202f031b26a6c366797bb1f479ab7cd06d1f5e5fd7467b692"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2050","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CD:8656E:17D43AD:1BF9B72:6AB92BFF"},"commit":{"sha":"c90ad94a0b19554f80804fb7812f2a1447a34a70","url":"https://github.com/parlance/ctcdecode/commit/c90ad94a0b19554f80804fb7812f2a1447a34a70","date":"2021-06-07T12:44:59Z","author_date":"2021-06-07T12:44:59Z","committer_date":"2021-06-07T12:44:59Z","tree_sha":"a3534ac2ce0f1676af277a8c4b938e0a1317dbe7","message_first_line":"Merge pull request #188 from stas6626/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2049","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0866:A9DC0:17C7124:1BEC94D:6AB92BFF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6659,"blob_sha":"e7a91929b6c7ad41ac3adc23f7ba954b9bf6b408","priority":0}],"documents":[{"path":"README.md","size":6659,"blob_sha":"e7a91929b6c7ad41ac3adc23f7ba954b9bf6b408","priority":0,"status":200,"text":"# ctcdecode\n\nctcdecode is an implementation of CTC (Connectionist Temporal Classification) beam search decoding for PyTorch.\nC++ code borrowed liberally from Paddle Paddles' [DeepSpeech](https://github.com/PaddlePaddle/DeepSpeech).\nIt includes swappable scorer support enabling standard beam search, and KenLM-based decoding. If you are new to the concepts of CTC and Beam Search, please visit the Resources section where we link a few tutorials explaining why they are needed. \n\n## Installation\nThe library is largely self-contained and requires only PyTorch. \nBuilding the C++ library requires gcc or clang. \nKenLM language modeling support is also optionally included, and enabled by default.\n\nThe below installation also works for Google Colab.\n\n```bash\n# get the code\ngit clone --recursive https://github.com/parlance/ctcdecode.git\ncd ctcdecode && pip install .\n```\n\n## How to Use\n\n```python\nfrom ctcdecode import CTCBeamDecoder\n\ndecoder = CTCBeamDecoder(\n    labels,\n    model_path=None,\n    alpha=0,\n    beta=0,\n    cutoff_top_n=40,\n    cutoff_prob=1.0,\n    beam_width=100,\n    num_processes=4,\n    blank_id=0,\n    log_probs_input=False\n)\nbeam_results, beam_scores, timesteps, out_lens = decoder.decode(output)\n```\n\n### Inputs to `CTCBeamDecoder`\n - `labels` are the tokens you used to train your model. They should be in the same order as your outputs. For example\n if your tokens are the english letters and you used 0 as your blank token, then you would\n pass in list(\"_abcdefghijklmopqrstuvwxyz\") as your argument to labels\n - `model_path` is the path to your external kenlm language model(LM). Default is none.\n - `alpha` Weighting associated with the LMs probabilities. A weight of 0 means the LM has no effect.\n - `beta` Weight associated with the number of words within our beam.\n - `cutoff_top_n` Cutoff number in pruning. Only the top cutoff_top_n characters with the highest probability in the vocab will be used in beam search.\n - `cutoff_prob` Cutoff probability in pruning. 1.0 means no pruning.\n - `beam_width` This controls how broad the beam search is. Higher values are more likely to find top beams, but they also\n will make your beam search exponentially slower. Furthermore, the longer your outputs, the more time large beams will take.\n  This is an important parameter that represents a tradeoff you need to make based on your dataset and needs.\n - `num_processes` Parallelize the batch using num_processes workers. You probably want to pass the number of cpus your computer has. You can find this in python with `import multiprocessing` then `n_cpus = multiprocessing.cpu_count()`. Default 4.\n - `blank_id` This should be the index of the CTC blank token (probably 0). \n - `log_probs_input` If your outputs have passed through a softmax and represent probabilities, this should be false, if they passed through a LogSoftmax and represent negative log likelihood, you need to pass True. If you don't understand this, run `print(output[0][0].sum())`, if it's a negative number you've probably got NLL and need to pass True, if it sums to ~1.0 you should pass False. Default False.\n\n### Inputs to the `decode` method\n - `output` should be the output activations from your model. If your output has passed through a SoftMax layer, you shouldn't need to alter it (except maybe to transpose), but if your `output` represents negative log likelihoods (raw logits), you either need to pass it through an additional `torch.nn.functional.softmax` or you can pass `log_probs_input=False` to the decoder. Your output should be BATCHSIZE x N_TIMESTEPS x N_LABELS so you may need to transpose it before passing it to the decoder. Note that if you pass things in the wrong order, the beam search will probably still run, you'll just get back nonsense results. \n\n### Outputs from the `decode` method\n\n4 things get returned from `decode`\n 1. `beam_results` - Shape: BATCHSIZE x N_BEAMS X N_TIMESTEPS A batch containing the series of characters (these are ints, you still need to decode them back to your text) representing results from a given beam search. Note that the beams are almost always shorter than the total number of timesteps, and the additional data is non-sensical, so to see the top beam (as int labels) from the first item in the batch, you need to run `beam_results[0][0][:out_len[0][0]]`.\n 1. `beam_scores` - Shape: BATCHSIZE x N_BEAMS A batch with the approximate CTC score of each beam (look at the code [here](https://github.com/parlance/ctcdecode/blob/master/ctcdecode/src/ctc_beam_search_decoder.cpp#L191-L192) for more info). If this is true, you can get the model's confidence that the beam is correct with `p=1/np.exp(beam_score)`.\n 1. `timesteps` - Shape: BATCHSIZE x N_BEAMS The timestep at which the nth output character has peak probability. Can be used as alignment between the audio and the transcript.\n 1. `out_lens` - Shape: BATCHSIZE x N_BEAMS. `out_lens[i][j]` is the length of the jth beam_result, of item i of your batch. \n\n### Online decoding\n\n```python\nfrom ctcdecode import OnlineCTCBeamDecoder\n\ndecoder = OnlineCTCBeamDecoder(\n    labels,\n    model_path=None,\n    alpha=0,\n    beta=0,\n    cutoff_top_n=40,\n    cutoff_prob=1.0,\n    beam_width=100,\n    num_processes=4,\n    blank_id=0,\n    log_probs_input=False\n)\n\nstate1 = ctcdecode.DecoderState(decoder)\n\nprobs_seq = torch.FloatTensor([probs_seq])\nbeam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq[:, :2], [state1], [False])\nbeam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq[:, 2:], [state1], [True])\n\n```\n\nThe Online decoder is copying CTCBeamDecoder interface, but it requires states and is_eos_s sequences. \n\nStates are used to accumulate sequences of chunks, each corresponding to one data source. Is_eos_s tells the decoder whether the chunks have stopped being pushed to the corresponding state.\n\n ### More examples\n\nGet the top beam for the first item in your batch\n`beam_results[0][0][:out_len[0][0]]`\n\nGet the top 50 beams for the first item in your batch\n```python\nfor i in range(50):\n     print(beam_results[0][i][:out_len[0][i]])\n```\n\nNote, these will be a list of ints that need decoding. You likely already have a function to decode from int to text, but if not you can do something like.\n`\"\".join[labels[n] for n in beam_results[0][0][:out_len[0][0]]]` using the labels you passed in to `CTCBeamDecoder`\n\n\n## Resources\n\n- [Distill Guide to CTC](https://distill.pub/2017/ctc/)\n- [Beam Search Video by Andrew Ng](https://www.youtube.com/watch?v=RLWuzLLSIgw)\n- [An Intuitive Explanation of Beam Search](https://towardsdatascience.com/an-intuitive-explanation-of-beam-search-9b1d744e7a0f)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF88:09ED:E5CCC:3F71A3:6AB92BFF"},"text_sha256":"3e29028e15ec1325f1a71decac6bb2d80e557e0a35900014b93a946244a2b97c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"brucefan1983/GPUMD","input_row":{"repository":"brucefan1983/GPUMD","url":"https://github.com/brucefan1983/GPUMD","name":"GPUMD","owner":"brucefan1983","description":"Graphics Processing Units Molecular Dynamics","language":"Cuda","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":844,"issues":289,"created_at":"2017-07-14T15:32:56Z","updated_at":"2026-09-27T10:26:20Z","first_commit_at":"2017-07-14T15:32:57Z","last_commit_at":"2026-09-26T11:50:40Z","activity_months":110.41,"ai_ml_match_topics":"machine-learning; neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:20.603Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"brucefan1983/GPUMD","visibility":"public","created_at":"2017-07-14T15:32:56Z","updated_at":"2026-09-27T10:26:20Z","private":false,"fork":false,"archived":false,"stargazers_count":844,"open_issues_count":19,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"2048","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:17A3BBF:1BC82C1:6AB92C00"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2047","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093C:180242:17FD355:1C22C90:6AB92C00"},"commit":{"sha":"e72105bf27ca48894e0296ec1f31e0cdcc789cc9","url":"https://github.com/brucefan1983/GPUMD/commit/e72105bf27ca48894e0296ec1f31e0cdcc789cc9","date":"2018-05-24T20:23:52Z","author_date":"2018-05-24T20:23:52Z","committer_date":"2018-05-24T20:23:52Z","tree_sha":"4777a5c4b4d201e14908c5689d36794b996fe615","message_first_line":"Update common.h"},"tree_request_status":200,"tree_rate":{"github_remaining":"2046","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CC:754BF:17D79AD:1BFD5C1:6AB92C01"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4906,"blob_sha":"f414635a7dea39f5d6c404625d4aa6ab2230e7a8","priority":0}],"documents":[{"path":"README.md","size":4906,"blob_sha":"f414635a7dea39f5d6c404625d4aa6ab2230e7a8","priority":0,"status":200,"text":"# GPUMD\n\n## What is GPUMD?\n\n* GPUMD stands for Graphics Processing Units Molecular Dynamics. It is a new molecular dynamics (MD) code implemented fully on graphics processing units (GPUs). This code is highly efficient. For details, see Ref. [1].\n\n* Force evaluation for many-body potentials has been significantly accelerated by using GPUs. Our efficient and flexible GPU implementation of the force evaluation for many-body potentials relies on a set of simple expressions for force, virial stress, and heat current derived in Ref. [2]. Detailed algorithms for efficient CUDA-implementation have been presented in Ref. [1]. We have implemented the following many-body potentials in GPUMD:\n   * The EAM-type potential with some analytical forms\n   * The Tersoff (1989) potential with single or double atom types\n   * The REBO potential for Mo-S systems (2009)\n   * The Stillinger-Weber (1985) potential with single or double atom types\n   * The Vashishta (2007) potential (both analytical and tabulated)\n   \n* Apart from being highly efficient, another unique feature of GPUMD is that it has useful utilities to study heat transport. The current version of GPUMD can calculate the following quantities related to heat transport:\n   * It can calculate the phonon density of states (DOS) from the velocity autocorrelation (VAC).\n   * It can calculate the equilibrium heat current autocorrelation (HAC), whose time integral gives the running thermal conductivity   according to the Green-Kubo relation. As stressed in Ref. [2], the heat current as implemented in LAMMPS does not apply to many-body  potentials and significantly underestimates the thermal conductivity in 2D materials described by many-body potentials. GPUMD also contains the thermal conductivity decomposition method as introduced in Ref. [3], which is essential for 2D materials.\n   * It can calculate the thermal conductivity of a system of finite length or the thermal boundary resistance (Kapitza resistance) of an interface or similar structures using nonequilibrium MD (NEMD) methods. The spectral decomposition method as described in Ref. [3] has also been implemented.\n     \n* GPUMD was firstly used for heat transport simulations only but we are now making it more and more general. However, the functionalities in GPUMD are still very limited. We are working on implementing (1) more potential models (including mixed potentials), (2) more integrators (including external conditions), and (3) more measurements.\n\n* Note that we will not implement any function for building simulation models. Users of GPUMD are supposed to be able to build simulation models by their own.\n\n## Compile GPUMD\n\n* To compile GPUMD, one just needs to go to the \"src\" directory and type \"make\". one may want to first do \"make clean\". When the compilation finishes, an executable named \"gpumd\" will be generated in the \"src\" directory. See the manual in the \"doc\" directory for details.\n\n## Run GPUMD\n\n* Take the first example in the \"examples\" directory for example, one can use the following command to run it:\n  * src/gpumd < examples/input1.txt\n* Please read the manual to study the examples. These examples should get you started. \n  \n## Authors:\n\n* Zheyong Fan (Aalto University)\n  * brucenju(at)gmail.com\n  * zheyong.fan(at)aalto.fi\n  * zheyongfan(at)163.com\n* Ville Vierimaa (Aalto University)  \n* Mikko Ervasti (Aalto University)  \n* Ari Harju (Aalto University) \n\n## Feedbacks:\n\nThere is a comprehensive manual in the \"doc\" directory. You can e-mail the first author (Zheyong Fan) if you find errors in the manual or bugs in the source code, or have any suggestions/questions about the manual and code. Thank you!\n\n## Citations\n\nIf you use GPUMD in your published work, we kindly ask you to cite the following paper which describes the central algorithms used in GPUMD:\n* [1] Zheyong Fan, Wei Chen, Ville Vierimaa, and Ari Harju. Efficient molecular dynamics simulations with many-body potentials on graphics processing units. Computer Physics Communications, 218:10-16, 2017.\n\nIf your work involves using heat current and virial stress formulas as implemented in GPUMD, the following paper can be cited:\n* [2] Zheyong Fan, Luiz Felipe C. Pereira, Hui-Qiong Wang, Jin-Cheng Zheng, Davide Donadio, and Ari Harju. Force and heat current formulas for many-body potentials in molecular dynamics simulations with applications to thermal conductivity calculations. Phys. Rev. B, 92:094301, Sep 2015.\n\nYou can cite the following paper if you use GPUMD to study heat transport using the in-out decomposition for 2D materials and/or the spectral decomposition method as described in it:\n* [3] Zheyong Fan, Luiz Felipe C. Pereira, Petri Hirvonen, Mikko M. Ervasti, Ken R. Elder, Davide Donadio, Tapio Ala-Nissila, and Ari Harju. Thermal conductivity decomposition in two-dimensional materials: Application to graphene. Phys. Rev. B, 95:144309, Apr 2017.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FDF2:11E74B:17A6CA:5E0116:6AB92C01"},"text_sha256":"112fd9890cd38d2bcf0d17f6fd02e3f1bd2620db4539ba1f25e270ef1ef3937e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2045","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17E0AEB:1C06961:6AB92C02"},"commit":{"sha":"ed05929037bc54d109ec128bc195fa40041914ea","url":"https://github.com/brucefan1983/GPUMD/commit/ed05929037bc54d109ec128bc195fa40041914ea","date":"2026-06-30T16:45:38Z","author_date":"2026-06-30T16:44:18Z","committer_date":"2026-06-30T16:45:38Z","tree_sha":"50659d115e590a24712faf3467c1e7a768af9391","message_first_line":"Add self-describing header to compute_shc output (shc.out)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2044","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:17ED463:1C12E6D:6AB92C02"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14141,"blob_sha":"0263908ac9b7d40a34bf18f291793f275868244c","priority":0}],"documents":[{"path":"README.md","size":14141,"blob_sha":"0263908ac9b7d40a34bf18f291793f275868244c","priority":0,"status":200,"text":"<div align=\"left\">\n<img src=\"./logo/logo-main-arctic.png\" width = \"25%\" />\n<\/div>\n\n# `GPUMD`\n\nCopyright (2017) Zheyong Fan.\nThis is the GPUMD software package.\nThis software is distributed under the GNU General Public License (GPL) version 3.\n\n## What is `GPUMD`?\n\n* `GPUMD` stands for Graphics Processing Units Molecular Dynamics.\n* `GPUMD` is a highly efficient general-purpose molecular dynamics (MD) package fully implemented on graphics processing units (GPUs).\n* `GPUMD` enables training and using a class of machine-learned potentials (MLPs) called neuroevolution potentials (NEPs). See this [nep-data Gitlab repo](https://gitlab.com/brucefan1983/nep-data) for some of the published NEP potentials and the related training/testing data.\n\n## Prerequisites\n\n* You need to have a GPU card with compute capability no less than 3.5 and a `CUDA` toolkit no older than `CUDA` 9.0.\n* Works for both Linux (with GCC) and Windows (with MSVC) operating systems. \n\n## Compile GPUMD\n* Go to the `src` directory and type `make`.\n* When the compilation finishes, two executables, `gpumd` and `nep`, will be generated in the `src` directory. \n\n## Run GPUMD\n* Go to the directory of an example in the [examples directory](examples) and type one of the following commands:\n  * `path/to/gpumd`\n  * `path/to/nep`\n\n## Tutorials\n* We provide a [Colab Tutorial](https://colab.research.google.com/drive/1QnXAveZgzwut4Mvldsw-r2I0EWIsj1KA?usp=sharing) to show the workflow of the construction of a NEP model and its application in large-scale atomistic simulations for PbTe system. This will run entirely on Google's cloud virtual machine.\n* We also provide many tutorials and examples in the [GPUMD-Tutorials repository](https://github.com/brucefan1983/GPUMD-Tutorials).\n\n## Manual\n* For users and developers:\n  * Latest released version: https://gpumd.org/\n  * Development version: https://gpumd.org/dev/\n* For developers only:\n  * [The developer guide](developers)\n  \n## Discussion\n* Github discussion: https://github.com/brucefan1983/GPUMD/discussions\n* matsci.org discussion: https://matsci.org/c/gpumd/68\n\n## Tools\n\nVarious tools for `GPUMD` and `NEP` can be found in [tools](./tools/readme.md).\n\n## CPU version of NEP\nThere is a standalone C++ implementation of the neuroevolution potential (NEP) in the [NEP_CPU repository](https://github.com/brucefan1983/NEP_CPU), which serves as the engine for many Python packages and provides an interface to the [LAMMPS package](https://github.com/lammps/lammps).\n\n## Related packages\n* A GPU-native interface between GPUMD and PySAGES for enhanced-sampling molecular dynamics on machine-learning potentials: https://github.com/JaafarMehrez/GPUMD-PySAGES\n\n## Citations\n\n| Reference             | cite for what?                    |\n| --------------------- | --------------------------------- |\n| [Xu2025]                   | for any work that used `GPUMD`    |\n| [Fan2017]                   | for historical citation   |\n| [Fan2015]                 | virial and heat current formulation   |\n| [Fan2017]                   | in-out decomposition and related spectral decomposition  |\n| [Fan2019]                 | HNEMD and related spectral decomposition   |\n| [Gabourie2021]                 | EMD and HNEMD based modal analyses   |\n| [Brorsson2021]                   | force constant potential (FCP) |\n| [Fan2021]                   | neuroevolution potential (NEP) and specifically NEP1 |\n| [Fan2022JPCM]                   | NEP2 |\n| [Fan2022JCP]                   | NEP3 |\n| [Liu2023]                  | NEP + ZBL |\n| [Ying2024]                  | NEP + D3 dispersion correction |\n| [Shi2023]                  | MSST integrator for shock wave simulation |\n| [Fan2024]                  | linear-scaling quantum transport |\n| [Song2024]                  | NEP4 or UNEP-v1 (General-purpose machine-learned potential for 16 elemental metals and their alloys)|\n| [Xu2024]                  | TNEP (tensorial NEP models of dipole and polarizability) |\n| [Song2026]                  | MCMD (hybrid Monte Carlo and molecular dynamics simulations) |\n| [Ying2025]                  | PIMD/TRPMD (path-integral molecular dynamics/thermostatted ring-polymer molecular dynamics) |\n| [Pan2024]                  | NEMD and NPHug shock methods |\n| [Jiang2025]                  | SW + ILP (hybrid Stillinger-Weber potential with anisotropic interlayer potential) |\n| [Liang2025]                  | NEP89 (Universal neuroevolution potential for inorganic and organic materials across 89 elements) |\n| [Huang2026]                  | GNEP: An alternative training scheme for NEP models |\n| [Fan2026a]                  | qNEP: NEP with dynamic charge (q) |\n| [Li2025]                    | CGNEP: Coarse-grained machine learning potential for mesoscale multilayered graphene (https://github.com/lmqnuaa/CGNEP) |\n| [Fan2026b]                  | NEP-CG and NEP-AACG: NEP with coarse graining |\n| [Bu2026]                  | NEP + ILP (hybrid NEP with anisotropic interlayer potential) |\n\n\n## References\n\n[Xu2025] Ke Xu, Hekai Bu, Shuning Pan, Eric Lindgren, Yongchao Wu, Yong Wang, Jiahui Liu, Keke Song, Bin Xu, Yifan Li, Tobias Hainer, Lucas Svensson, Julia Wiktor, Rui Zhao, Hongfu Huang, Cheng Qian, Shuo Zhang, Zezhu Zeng, Bohan Zhang, Benrui Tang, Yang Xiao, Zihan Yan, Jiuyang Shi, Zhixin Liang, Junjie Wang, Ting Liang, Shuo Cao, Yanzhou Wang, Penghua Ying, Nan Xu, Chengbing Chen, Yuwen Zhang, Zherui Chen, Xin Wu, Wenwu Jiang, Esme Berger, Yanlong Li, Shunda Chen, Alexander J. Gabourie, Haikuan Dong, Shiyun Xiong, Ning Wei, Yue Chen, Jianbin Xu, Feng Ding, Zhimei Sun, Tapio Ala-Nissila, Ari Harju, Jincheng Zheng, Pengfei Guan, Paul Erhart, Jian Sun, Wengen Ouyang, Yanjing Su, Zheyong Fan, [GPUMD 4.0: A high-performance molecular dynamics package for versatile materials simulations with machine-learned potentials]( https://doi.org/10.1002/mgea.70028), MGE Advances **3**, e70028 (2025).\n\n[Fan2017] Zheyong Fan, Wei Chen, Ville Vierimaa, and Ari Harju. [Efficient molecular dynamics simulations with many-body potentials on graphics processing units](https://doi.org/10.1016/j.cpc.2017.05.003), Computer Physics Communications **218**, 10 (2017). \n\n[Fan2015] Zheyong Fan, Luiz Felipe C. Pereira, Hui-Qiong Wang, Jin-Cheng Zheng, Davide Donadio, and Ari Harju. [Force and heat current formulas for many-body potentials in molecular dynamics simulations with applications to thermal conductivity calculations](https://doi.org/10.1103/PhysRevB.92.094301), Phys. Rev. B **92**, 094301, (2015). \n\n[Gabourie2021] Alexander J. Gabourie, Zheyong Fan, Tapio Ala-Nissila, Eric Pop,\n[Spectral Decomposition of Thermal Conductivity: Comparing Velocity Decomposition Methods in Homogeneous Molecular Dynamics Simulations](https://doi.org/10.1103/PhysRevB.103.205421),\nPhys. Rev. B **103**, 205421 (2021).\n\n[Fan2017] Zheyong Fan, Luiz Felipe C. Pereira, Petri Hirvonen, Mikko M. Ervasti, Ken R. Elder, Davide Donadio, Tapio Ala-Nissila, and Ari Harju. [Thermal conductivity decomposition in two-dimensional materials: Application to graphene](https://doi.org/10.1103/PhysRevB.95.144309), Phys. Rev. B **95**, 144309, (2017).  \n\n[Fan2019] Zheyong Fan, Haikuan Dong, Ari Harju, and Tapio Ala-Nissila, [Homogeneous nonequilibrium molecular dynamics method for heat transport and spectral decomposition with many-body potentials](https://doi.org/10.1103/PhysRevB.99.064308), Phys. Rev. B **99**, 064308 (2019). \n\n[Brorsson2021] Joakim Brorsson, Arsalan Hashemi, Zheyong Fan, Erik Fransson, Fredrik Eriksson, Tapio Ala-Nissila, Arkady V. Krasheninnikov, Hannu-Pekka Komsa, Paul Erhart, [Efficient calculation of the lattice thermal conductivity by atomistic simulations with ab-initio accuracy]( https://doi.org/10.1002/adts.202100217), Advanced Theory and Simulations **4**, 2100217 (2021). \n\n[Fan2021] Zheyong Fan, Zezhu Zeng, Cunzhi Zhang, Yanzhou Wang, Keke Song, Haikuan Dong, Yue Chen, and Tapio Ala-Nissila, [Neuroevolution machine learning potentials: Combining high accuracy and low cost in atomistic simulations and application to heat transport](https://doi.org/10.1103/PhysRevB.104.104309), Phys. Rev. B. **104**, 104309 (2021).\n\n[Fan2022JPCM] Zheyong Fan, [Improving the accuracy of the neuroevolution machine learning potentials for multi-component systems](https://iopscience.iop.org/article/10.1088/1361-648X/ac462b), Journal of Physics: Condensed Matter **34**, 125902 (2022).\n\n[Fan2022JCP] Zheyong Fan, Yanzhou Wang, Penghua Ying, Keke Song, Junjie Wang, Yong Wang, Zezhu Zeng, Ke Xu, Eric Lindgren, J. Magnus Rahm, Alexander J. Gabourie, Jiahui Liu, Haikuan Dong, Jianyang Wu, Yue Chen, Zheng Zhong, Jian Sun, Paul Erhart, Yanjing Su, Tapio Ala-Nissila,\n[GPUMD: A package for constructing accurate machine-learned potentials and performing highly efficient atomistic simulations](https://doi.org/10.1063/5.0106617), The Journal of Chemical Physics **157**, 114801 (2022).\n\n[Liu2023] Jiahui Liu, Jesper Byggmästar, Zheyong Fan, Ping Qian, and Yanjing Su,\n[Large-scale machine-learning molecular dynamics simulation of primary radiation damage in tungsten](https://doi.org/10.1103/PhysRevB.108.054312),\nPhys. Rev. B **108**, 054312 (2023).\n\n[Ying2024] Penghua Ying and Zheyong Fan,\n[Combining the D3 dispersion correction with the neuroevolution machine-learned potential](https://doi.org/10.1088/1361-648X/ad1278),\nJournal of Physics: Condensed Matter **36**, 125901 (2024).\n\n[Shi2023] Jiuyang Shi, Zhixing Liang, Junjie Wang, Shuning Pan, Chi Ding, Yong Wang, Hui-Tian Wang, Dingyu Xing, and Jian Sun,\n[Double-Shock Compression Pathways from Diamond to BC8 Carbon](https://doi.org/10.1103/PhysRevLett.131.146101),\nPhys. Rev. Lett. **131**, 146101 (2023).\n\n[Fan2024] Zheyong Fan, Yang Xiao, Yanzhou Wang, Penghua Ying, Shunda Chen, and Haikuan Dong,\n[Combining linear-scaling quantum transport and machine-learning molecular dynamics to study thermal and electronic transports in complex materials](https://doi.org/10.1088/1361-648X/ad31c2),\nJournal of Physics: Condensed Matter **36**, 245901 (2024).\n\n[Song2024] Keke Song, Rui Zhao, Jiahui Liu, Yanzhou Wang, Eric Lindgren, Yong Wang, Shunda Chen, Ke Xu, Ting Liang, Penghua Ying, Nan Xu, Zhiqiang Zhao, Jiuyang Shi, Junjie Wang, Shuang Lyu, Zezhu Zeng, Shirong Liang, Haikuan Dong, Ligang Sun, Yue Chen, Zhuhua Zhang, Wanlin Guo, Ping Qian, Jian Sun, Paul Erhart, Tapio Ala-Nissila, Yanjing Su, Zheyong Fan,\n[General-purpose machine-learned potential for 16 elemental metals and their alloys](https://doi.org/10.1038/s41467-024-54554-x),\nNature Communications **15**, 10208 (2024).\n\n[Xu2024] Nan Xu, Petter Rosander, Christian Schäfer, Eric Lindgren, Nicklas Österbacka, Mandi Fang, Wei Chen, Yi He, Zheyong Fan, Paul Erhart,\n[Tensorial properties via the neuroevolution potential framework: Fast simulation of infrared and Raman spectra](https://doi.org/10.1021/acs.jctc.3c01343),\nJ. Chem. Theory Comput. **20**, 3273 (2024).\n\n[Song2026] Keke Song, Jiahui Liu, Yuanxu Zhu, Shunda Chen, Zheyong Fan, Yanjing Su, Ping Qian, [Solute Segregation in Polycrystalline Aluminum From Hybrid Monte Carlo and Molecular Dynamics Simulations With a Unified Neuroevolution Potential](https://onlinelibrary.wiley.com/doi/10.1002/mgea.70049),\nMaterials Genome Engineering Advances, **4**, e70049 (2026).\n\n[Ying2025] Penghua Ying, Wenjiang Zhou, Lucas Svensson, Esmée Berger, Erik Fransson, Fredrik Eriksson, Ke Xu, Ting Liang, Jianbin Xu, Bai Song, Shunda Chen, Paul Erhart, Zheyong Fan, [Highly efficient path-integral molecular dynamics simulations with GPUMD using neuroevolution potentials: Case studies on thermal properties of materials](https://doi.org/10.1063/5.0241006),\nJ. Chem. Phys. **162**, 064109 (2025).\n\n[Pan2024] Shuning Pan, Jiuyang Shi, Zhixin Liang, Cong Liu, Junjie Wang, Yong Wang, Hui-Tian Wang, Dingyu Xing, and Jian Sun, [Shock compression pathways to pyrite silica from machine learning simulations](https://doi.org/10.1103/PhysRevB.110.224101),\nPhys. Rev. B **110**, 224101 (2024).\n\n[Jiang2025] Wenwu Jiang, Ting Liang, Hekai Bu, Jianbin Xu, and Wengen Ouyang, [Moiré-driven interfacial thermal transport in twisted transition metal dichalcogenides](https://doi.org/10.1021/acsnano.4c12148),\nACS Nano **19**, 16287 (2025).\n\n[Liang2025] Ting Liang, Ke Xu, Eric Lindgren, Zherui Chen, Rui Zhao, Jiahui Liu, Esmée Berger, Benrui Tang, Bohan Zhang, Yanzhou Wang, Keke Song, Penghua Ying, Nan Xu, Haikuan Dong, Shunda Chen, Paul Erhart, Zheyong Fan, Tapio Ala-Nissila, Jianbin Xu, [NEP89: Universal neuroevolution potential for inorganic and organic materials across 89 elements](https://arxiv.org/abs/2504.21286), arXiv:2504.21286 [cond-mat.mtrl-sci].\n\n[Huang2026] Hongfu Huang, Junhao Peng, Kaiqi Li, Jian Zhou, Zhimei Sun, [Efficient GPU-accelerated training of a neuroevolution potential with analytical gradients](https://doi.org/10.1016/j.cpc.2025.109994),\nComputer Physics Communications **320**, 109994 (2026).\n\n[Fan2026a] Zheyong Fan, Benrui Tang, Esmée Berger, Ethan Berger, Erik Fransson, Ke Xu, Zihan Yan, Zhoulin Liu, Zichen Song, Haikuan Dong, Shunda Chen, Lei Li, Ziliang Wang, Yizhou Zhu, Julia Wiktor, Paul Erhart [qNEP: A highly efficient neuroevolution potential with dynamic charges for large-scale atomistic simulations](https://doi.org/10.1021/acs.jctc.6c00146), J. Chem. Theory Comput. **22**, 4787 (2026).\n\n[Li2025] Mingqian Li, Lifeng Wang, Zhuoqun Zheng, [Coarse-grained machine learning potential for mesoscale multilayered graphene](https://doi.org/10.1038/s41524-025-01849-2), npj Computational Materials **11**, 374 (2025).\n\n[Fan2026b] Zheyong Fan, Wenjun Zhang, Zhenhao Zhang, Ke Xu, Xuecheng Shao, Haikuan Dong, [NEP-CG and NEP-AACG: Efficient coarse-grained and multiscale all-atom-coarse-grained neuroevolution potentials](https://doi.org/10.1016/j.commt.2026.100055), Computational Materials Today **10**, 100055 (2026).\n\n[Bu2026] Hekai Bu, Wenwu Jiang, Penghua Ying, Ting Liang, Zheyong Fan, and Wengen Ouyang, [Modular hybrid machine learning and physics-based potentials for scalable modeling of Van der Waals heterostructures](https://doi.org/10.1016/j.jmps.2026.106540), J. Mech. Phys. Solids **210**, 106540 (2026).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D224:29FD16:18442C:5E9FA2:6AB92BFB"},"text_sha256":"eb079902e6a716508197d58d3f96209963eac393b6fba8aac188359f80699eb8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scikit-multiflow/scikit-multiflow","input_row":{"repository":"scikit-multiflow/scikit-multiflow","url":"https://github.com/scikit-multiflow/scikit-multiflow","name":"scikit-multiflow","owner":"scikit-multiflow","description":"A machine learning package for streaming data in Python. The other ancestor of River.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":798,"issues":194,"created_at":"2017-11-14T16:46:58Z","updated_at":"2026-09-22T04:04:27Z","first_commit_at":"2017-05-04T19:50:29Z","last_commit_at":"2020-11-18T23:21:37Z","activity_months":42.509999999999998,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:23.527Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scikit-multiflow/scikit-multiflow","visibility":"public","created_at":"2017-11-14T16:46:58Z","updated_at":"2026-09-22T04:04:27Z","private":false,"fork":false,"archived":false,"stargazers_count":798,"open_issues_count":73,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2043","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0876:6C9BF:180B78E:1C31420:6AB92C03"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2042","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081F:14A1F2:1819260:1C3EF5A:6AB92C03"},"commit":{"sha":"b14db47bb5c027bed3f00973fa0e9daca680216f","url":"https://github.com/scikit-multiflow/scikit-multiflow/commit/b14db47bb5c027bed3f00973fa0e9daca680216f","date":"2018-05-24T13:40:31Z","author_date":"2018-05-24T13:40:31Z","committer_date":"2018-05-24T13:40:31Z","tree_sha":"e3531fb404ab59c95313e42007c2970bf96174bc","message_first_line":"Standardization of the stream class"},"tree_request_status":200,"tree_rate":{"github_remaining":"2041","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:186BD24:1C91B95:6AB92C04"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1960,"blob_sha":"8614823589346383442e8609c23b8f7b3c5c906d","priority":0}],"documents":[{"path":"README.md","size":1960,"blob_sha":"8614823589346383442e8609c23b8f7b3c5c906d","priority":0,"status":200,"text":"<img src=\"docs/_static/images/skmultiflow-logo-wide.png\" height=\"100\"/>\n\n[![Build Status](https://travis-ci.org/scikit-multiflow/scikit-multiflow.svg?branch=master)](https://travis-ci.org/scikit-multiflow/scikit-multiflow)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Django.svg)\n\nA multi-output/multi-label and stream data framework.\nInspired by [MOA](https://moa.cms.waikato.ac.nz/) and [MEKA](http://meka.sourceforge.net/),\n following [scikit-learn](http://scikit-learn.org/stable/)'s philosophy.\n\n* [Webpage](https://scikit-multiflow.github.io/)\n* [Documentation](https://scikit-multiflow.github.io/scikit-multiflow/)\n* [Users Group](https://groups.google.com/forum/#!forum/scikit-multiflow-users)\n\n### Project leaders\n\n* Jacob MONTIEL\n* Jesse READ\n* Albert BIFET\n\n### matplotlib backend considerations\n* You may need to change your matplotlib backend, because not all backends work\nin all machines.\n* If this is the case you need to check\n[matplotlib's configuration](https://matplotlib.org/users/customizing.html).\nIn the matplotlibrc file you will need to change the line:  \n    ```\n    backend     : Qt5Agg  \n    ```\n    to:  \n    ```\n    backend     : another backend that works on your machine\n    ```  \n* The Qt5Agg backend should work with most machines, but a change may be needed.\n\n#### Jupyter Notebooks\nIn order to display plots from `scikit-multiflow` within a [Jupyter Notebook]() we need to define the proper mathplotlib\nbackend to use. This is done via a magic command at the beginning of the Notebook:\n\n```python\n%matplotlib notebook\n```\n\n[JupyterLab](http://jupyterlab.readthedocs.io/en/stable/) is the next-generation user interface for Jupyter, currently\nin beta it can display plots with some caveats. If you use JupyterLab then the current solution is to use the\n[jupyter-matplotlib](https://github.com/matplotlib/jupyter-matplotlib) extension:\n\n```python\n%matplotlib ipympl\n```\n\n### License\n* 3-Clause BSD License\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F4A0:3EACB:17B380:5E0F39:6AB92C04"},"text_sha256":"bbe117e08a8098f046faf9c272a7ea48040c726bfc98c3d3365f3fc60cf4dd6b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2040","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A0:0AC4:129F08C:15F4AAE:6AB92C05"},"commit":{"sha":"d073a706b5006cba2584761286b7fa17e74e87be","url":"https://github.com/scikit-multiflow/scikit-multiflow/commit/d073a706b5006cba2584761286b7fa17e74e87be","date":"2020-11-18T23:21:37Z","author_date":"2020-11-18T23:21:37Z","committer_date":"2020-11-18T23:21:37Z","tree_sha":"7677443d4e7dee7b03af7f0d650589f307586851","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"2039","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:17FA05F:1C1F66F:6AB92C05"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6525,"blob_sha":"ede6a4cf44d6393967fc387053014f5758a9c407","priority":0}],"documents":[{"path":"README.md","size":6525,"blob_sha":"ede6a4cf44d6393967fc387053014f5758a9c407","priority":0,"status":200,"text":"<img src=\"https://raw.githubusercontent.com/scikit-multiflow/scikit-multiflow/master/docs/_static/images/skmultiflow-logo-wide.png\" height=\"100\"/>\n\n[![Build status](https://travis-ci.org/scikit-multiflow/scikit-multiflow.svg?branch=master)](https://travis-ci.org/scikit-multiflow/scikit-multiflow)\n[![Build Status](https://dev.azure.com/scikit-multiflow/scikit-multiflow/_apis/build/status/scikit-multiflow.scikit-multiflow?branchName=master)](https://dev.azure.com/scikit-multiflow/scikit-multiflow/_build/latest?definitionId=1&branchName=master)\n[![codecov](https://codecov.io/gh/scikit-multiflow/scikit-multiflow/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-multiflow/scikit-multiflow)\n![Python version](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8-blue.svg)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/scikit-multiflow/badges/platforms.svg)](https://anaconda.org/conda-forge/scikit-multiflow)\n[![PyPI version](https://badge.fury.io/py/scikit-multiflow.svg)](https://badge.fury.io/py/scikit-multiflow)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/scikit-multiflow/badges/version.svg)](https://anaconda.org/conda-forge/scikit-multiflow)\n[![DockerHub](https://img.shields.io/badge/docker-available-blue.svg?logo=docker)](https://hub.docker.com/r/skmultiflow/scikit-multiflow)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Gitter](https://badges.gitter.im/scikit-multiflow/community.svg)](https://gitter.im/scikit-multiflow/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n`scikit-multiflow` is a machine learning package for streaming data in Python.\n\n---\n\n[creme](https://MaxHalford.github.io/) and [scikit-multiflow](https://scikit-multiflow.github.io/) are merging into a new project called [River](https://github.com/online-ml/river/).\n\nWe feel that both projects share the same vision. We believe that pooling our resources instead of duplicating work will benefit both sides. We are also confident that this will benefit both communities. There will be more people working on the new project, which will allow us to distribute work more efficiently. We will thus be able to work on more features and improve the overall quality of the project.\n\nBoth projects will stop active development. The code for both projects will remain publicly available, although development will only focus on minor maintenance during a transition period. The architecture of the new package is very similar to that of creme. It will focus on single-instance incremental models.\n\nWe encourage users to use River instead of creme. We understand that this transition will require an extra effort in the short term from current users. However, we believe that the result will be better for everyone in the long run.\n\nYou will still be able to install and use `creme` as well as `scikit-multiflow`. Both projects will remain on PyPI, conda-forge and GitHub.\n\n---\n\n### Quick links\n* [Webpage](https://scikit-multiflow.github.io/)\n* [Documentation](https://scikit-multiflow.readthedocs.io/en/stable/)\n* [Community](https://scikit-multiflow.github.io/community/)\n\n# Features\n\n### Incremental Learning\nStream learning models are created incrementally and are updated continuously. They are suitable\nfor big data applications where real-time response is vital.\n\n### Adaptive learning\nChanges in data distribution harm learning. Adaptive methods are specifically designed to be\nrobust to concept drift changes in dynamic environments.\n\n### Resource-wise efficient\nStreaming techniques efficiently handle resources such as memory and processing time given the\nunbounded nature of data streams. \n\n### Easy to use\nscikit-multiflow is designed for users with any experience level. Experiments are easy to design,\nsetup, and run. Existing methods are easy to modify and extend.\n\n### Stream learning tools\nIn its current state, scikit-multiflow contains data generators, multi-output/multi-target stream\nlearning methods, change detection methods, evaluation methods, and more.\n\n### Open source\nDistributed under the \n[BSD 3-Clause](https://github.com/scikit-multiflow/scikit-multiflow/blob/master/LICENSE), \n`scikit-multiflow` is developed and maintained by an active, diverse and growing [community](/community).\n\n# Use cases\nThe following tasks are supported in `scikit-multiflow`:\n\n### Supervised learning\nWhen working with labeled data. Depending on the target type can be either classification\n(discrete values) or regression (continuous values)\n\n### Single/multi output\nSingle-output methods predict a single target-label (binary or multi-class) for classification or\na single target-value for regression. Multi-output methods simultaneously predict multiple\nvariables given an input.\n\n### Concept drift detection\nChanges in data distribution can harm learning. Drift detection methods are designed to rise an\nalarm in the presence of drift and are used alongside learning methods to improve their robustness\nagainst this phenomenon in evolving data streams.\n\n### Unsupervised learning\nWhen working with unlabeled data. For example, anomaly detection where the goal is the\nidentification of rare events or samples which differ significantly from the majority of the data.\n\n---\n\n#### Jupyter Notebooks\nIn order to display plots from `scikit-multiflow` within a [Jupyter Notebook]() we need to define\nthe proper mathplotlib backend to use. This is done by including the following magic command at the\nbeginning of the Notebook:\n\n```python\n%matplotlib notebook\n```\n\n[JupyterLab](http://jupyterlab.readthedocs.io/en/stable/) is the next-generation user interface\nfor Jupyter, currently in beta, it can display interactive plots with some caveats. If you use\nJupyterLab then the current solution is to use the \n[jupyter-matplotlib](https://github.com/matplotlib/jupyter-matplotlib) extension:\n\n```python\n%matplotlib widget\n```\n\n## Citing `scikit-multiflow`\n\nIf `scikit-multiflow` has been useful for your research and you would like to cite it in a academic\npublication, please use the following Bibtex entry:\n\n```bibtex\n@article{skmultiflow,\n  author  = {Jacob Montiel and Jesse Read and Albert Bifet and Talel Abdessalem},\n  title   = {Scikit-Multiflow: A Multi-output Streaming Framework },\n  journal = {Journal of Machine Learning Research},\n  year    = {2018},\n  volume  = {19},\n  number  = {72},\n  pages   = {1-5},\n  url     = {http://jmlr.org/papers/v19/18-251.html}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1342:3CC8A:17E061:5E3C98:6AB92C04"},"text_sha256":"a962fbeb5b1171ba452576490f4ed45eb6c45b0ee2f76c91e739347b81adc929"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ntucllab/libact","input_row":{"repository":"ntucllab/libact","url":"https://github.com/ntucllab/libact","name":"libact","owner":"ntucllab","description":"Pool-based active learning in Python","language":"Python","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":791,"issues":100,"created_at":"2015-12-06T17:24:38Z","updated_at":"2026-09-07T07:56:08Z","first_commit_at":"2014-09-26T12:46:40Z","last_commit_at":"2026-08-21T12:49:29Z","activity_months":142.81,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:26.243Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ntucllab/libact","visibility":"public","created_at":"2015-12-06T17:24:38Z","updated_at":"2026-09-07T07:56:08Z","private":false,"fork":false,"archived":false,"stargazers_count":791,"open_issues_count":44,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"2038","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0917:76AED:17FE7F8:1C24678:6AB92C06"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2037","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:187BB17:1CA1A36:6AB92C06"},"commit":{"sha":"aebd1285d1d13fb0144de61bcd6e562f9915d50f","url":"https://github.com/ntucllab/libact/commit/aebd1285d1d13fb0144de61bcd6e562f9915d50f","date":"2018-02-05T22:41:02Z","author_date":"2018-02-05T22:41:02Z","committer_date":"2018-02-05T22:41:02Z","tree_sha":"4b097d4f09df04ba6171f12c009bdaff7bf49225","message_first_line":"Merge pull request #139 from jkleint/albl-pmin-fix"},"tree_request_status":200,"tree_rate":{"github_remaining":"2036","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:17B293F:1BD86F0:6AB92C07"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5326,"blob_sha":"7b5de9ccc3f011b4801dcfd4c1e78b793f06858c","priority":0}],"documents":[{"path":"README.md","size":5326,"blob_sha":"7b5de9ccc3f011b4801dcfd4c1e78b793f06858c","priority":0,"status":200,"text":"# libact: Pool-based Active Learning in Python\n\nauthors: Yao-Yuan Yang, Shao-Chuan Lee, Yu-An Chung, Tung-En Wu, Si-An Chen, [Hsuan-Tien Lin](http://www.csie.ntu.edu.tw/~htlin)\n\n[![Build Status](https://travis-ci.org/ntucllab/libact.svg)](https://travis-ci.org/ntucllab/libact)\n[![Documentation Status](https://readthedocs.org/projects/libact/badge/?version=latest)](http://libact.readthedocs.org/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/libact.svg)](https://badge.fury.io/py/libact)\n[![codecov.io](https://codecov.io/github/ntucllab/libact/coverage.svg?branch=master)](https://codecov.io/github/ntucllab/libact?branch=master)\n[![Week Stars](http://starveller.sigsev.io/api/repos/ntucllab/libact/badge)](http://starveller.sigsev.io/ntucllab/libact)\n\n# Introduction\n\n`libact` is a Python package designed to make active learning easier for\nreal-world users. The package not only implements several popular active learning strategies, but also features the [active-learning-by-learning](http://www.csie.ntu.edu.tw/~htlin/paper/doc/aaai15albl.pdf)\nmeta-algorithm that assists the users to automatically select the best strategy\non the fly. Furthermore, the package provides a unified interface for implementing more strategies, models and application-specific labelers. The package is open-source along with issue trackers on github, and can be easily installed from Python Package Index repository.\n\n# Documentation\n\nThe technical report associated with the package is on [arXiv](https://arxiv.org/abs/1710.00379), and the documentation for the latest release is available on [readthedocs](http://libact.readthedocs.org/en/latest/).\nComments and questions on the package is welcomed at `libact-users@googlegroups.com`. All contributions to the documentation are greatly appreciated!\n\n# Basic Dependencies\n\n* Python 2.7, 3.3, 3.4, 3.5\n\n* Python dependencies\n```\npip install -r requirements.txt\n```\n\n* Debian (>= 7) / Ubuntu (>= 14.04)\n```\nsudo apt-get install build-essential gfortran libatlas-base-dev liblapacke-dev python3-dev\n```\n\n* macOS\n```\nbrew install openblas\n```\n\n# Installation\n\nAfter resolving the dependencies, you may install the package via pip (for all users):\n```\nsudo pip install libact\n```\n\nor pip install in home directory:\n```\npip install --user libact\n```\n\nor pip install from github repository for latest source:\n```\npip install git+https://github.com/ntucllab/libact.git\n```\n\nTo build and install from souce in your home directory:\n```\npython setup.py install --user\n```\n\nTo build and install from souce for all users on Unix/Linux:\n```\npython setup.py build\nsudo python setup.py install\n```\n\n# Usage\n\nThe main usage of `libact` is as follows:\n\n```python\nqs = UncertaintySampling(trn_ds, method='lc') # query strategy instance\n\nask_id = qs.make_query() # let the specified query strategy suggest a data to query\nX, y = zip(*trn_ds.data)\nlb = lbr.label(X[ask_id]) # query the label of unlabeled data from labeler instance\ntrn_ds.update(ask_id, lb) # update the dataset with newly queried data\n```\n\nSome examples are available under the `examples` directory. Before running, use\n`examples/get_dataset.py` to retrieve the dataset used by the examples.\n\nAvailable examples:\n\n  - [plot](examples/plot.py) : This example performs basic usage of libact. It splits\n    a fully-labeled dataset and remove some label from dataset to simulate\n    the pool-based active learning scenario. Each query of an unlabeled dataset is then equivalent to revealing one labeled example in the original data set.\n  - [label_digits](examples/label_digits.py) : This example shows how to use libact in the case\n    that you want a human to label the selected sample for your algorithm.\n  - [albl_plot](examples/albl_plot.py): This example compares the performance of ALBL\n    with other active learning algorithms.\n  - [multilabel_plot](examples/multilabel_plot.py): This example compares the performance of\n    algorithms under multilabel setting.\n  - [alce_plot](examples/alce_plot.py): This example compares the performance of\n    algorithms under cost-sensitive multi-class setting.\n\n# Running tests\n\nTo run the test suite:\n\n```\npython setup.py test\n```\n\nTo run pylint, install pylint through ```pip install pylint``` and run the following command in root directory:\n\n```\npylint libact\n```\n\nTo measure the test code coverage, install coverage through ```pip install coverage``` and run the following commands in root directory:\n\n```\ncoverage run --source libact --omit */tests/* setup.py test\ncoverage report\n```\n\n# Citing\nIf you find this package useful, please cite the original works (see Reference of each strategy) as well as the following\n\n```\n@techreport{YY2017,\n  author = {Yao-Yuan Yang and Shao-Chuan Lee and Yu-An Chung and Tung-En Wu and Si-An Chen and Hsuan-Tien Lin},\n  title = {libact: Pool-based Active Learning in Python},\n  institution = {National Taiwan University},\n  url = {https://github.com/ntucllab/libact},\n  note = {available as arXiv preprint \\url{https://arxiv.org/abs/1710.00379}},\n  month = oct,\n  year = 2017\n}\n```\n\n\n# Acknowledgments\n\nThe authors thank Chih-Wei Chang and other members of the [Computational Learning Lab](https://learner.csie.ntu.edu.tw/) at National Taiwan University for valuable discussions and various contributions to making this package better.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"34C4:3BB77:17B02E:5E0D7C:6AB92C07"},"text_sha256":"a974562ea635f4f1ac677149e55ccc5e6a52aa8aa5e08d92f1b806b38c1867d8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2035","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082D:725A9:17E54E0:1C0B503:6AB92C07"},"commit":{"sha":"cac4c1e8a0161ccff7dba4d49135e380d1a98b90","url":"https://github.com/ntucllab/libact/commit/cac4c1e8a0161ccff7dba4d49135e380d1a98b90","date":"2026-04-08T23:46:01Z","author_date":"2026-04-08T23:46:01Z","committer_date":"2026-04-08T23:46:01Z","tree_sha":"b4f4c6a5683069cbf8d43e59fc0230e141075e19","message_first_line":"Standardize _get_scores() to return (np.ndarray, np.ndarray) across all strategies (#197)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2034","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A7:3C4024:180C3CF:1C32066:6AB92C08"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11135,"blob_sha":"4d45839eb22592a2fbdcc73670da8ff0773f754d","priority":0}],"documents":[{"path":"README.md","size":11135,"blob_sha":"4d45839eb22592a2fbdcc73670da8ff0773f754d","priority":0,"status":200,"text":"# libact: Pool-based Active Learning in Python\n\nAuthors: [Yao-Yuan Yang](http://yyyang.me), Shao-Chuan Lee, Yu-An Chung, Tung-En Wu, Si-An Chen, [Hsuan-Tien Lin](http://www.csie.ntu.edu.tw/~htlin)\n\nContributors: Zheng-Yu (Josh) Huang, Po-Yi Lu\n\n[![Build Status](https://github.com/ntucllab/libact/actions/workflows/tests.yml/badge.svg)](https://github.com/ntucllab/libact/actions/workflows/tests.yml)\n[![Documentation Status](https://readthedocs.org/projects/libact/badge/?version=latest)](http://libact.readthedocs.org/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/libact.svg)](https://badge.fury.io/py/libact)\n[![codecov.io](https://codecov.io/github/ntucllab/libact/coverage.svg?branch=master)](https://codecov.io/github/ntucllab/libact?branch=master)\n\n## Introduction\n\n`libact` is a Python package designed to make active learning easier for\nreal-world users. The package not only implements several popular active learning strategies, but also features the [active-learning-by-learning](http://www.csie.ntu.edu.tw/~htlin/paper/doc/aaai15albl.pdf)\nmeta-algorithm that assists the users to automatically select the best strategy\non the fly. Furthermore, the package provides a unified interface for implementing more strategies, models and application-specific labelers. The package is open-source along with issue trackers on github, and can be easily installed from Python Package Index repository.\n\n## Documentation\n\nThe technical report associated with the package is on [arXiv](https://arxiv.org/abs/1710.00379), and the documentation for the latest release is available on [readthedocs](http://libact.readthedocs.org/en/latest/).\nComments and questions on the package is welcomed at `libact-users@googlegroups.com`. All contributions to the documentation are greatly appreciated!\n\n## Basic Dependencies\n\n- Python 3.9, 3.10, 3.11, 3.12\n\n- Python dependencies (automatically installed with pip):\n  - numpy >= 2\n  - scipy >= 1.13\n  - scikit-learn >= 1.6\n  - matplotlib >= 3.8\n  - joblib\n\n### BLAS/LAPACKE Dependencies\n\n- Debian (>= 7) / Ubuntu (>= 14.04)\n\n```\nsudo apt-get install build-essential gfortran libatlas-base-dev liblapacke-dev python3-dev\n```\n\n- Arch Linux\n\n```\nsudo pacman -S lapacke\n```\n\n- macOS\n```\nbrew install openblas\n```\n\n- Others: refer to the BLAS/LAPACKE installation guides.\n\n## Installation\n\n- Install the official release (from PyPI):\n\n```shell\npip install libact\n```\n\n> **Note:** For Windows users, it is recommended to use **Windows Subsystem for Linux (WSL)** as the primary environment for installing and running `libact`.\n\n- Install the latest development version\n\n```shell\npip install git+https://github.com/ntucllab/libact.git\n```\n\n## Build Options\n\nThis package supports the following build options:\n\n- `blas`: BLAS library to use (default='auto'). Options: `auto`, `openblas`, `Accelerate`, `mkl`, `lapack`, `blis`.\n- `lapack`: LAPACK library to use (default=`auto`). Options: `auto`, `openblas`, `Accelerate`, `mkl`, `lapack`, `blis`.\n- `variance_reduction`: Build variance reduction module (default: true)\n- `hintsvm`: Build hintsvm module (default: true)\n\n### Examples\n\nTo install `libact` with the default configuration, run:\n\n```shell\npip install libact\n```\n\nInstall without optional modules:\n\n```shell\npip install libact --config-settings=setup-args=\"-Dvariance_reduction=false\" \\\n                    --config-settings=setup-args=\"-Dhintsvm=false\"\n```\n\n## Build from Source\n\n### Overview\n\nThis project utilizes `meson` and `meson-python` as the build backend. To build from source, ensure you have the aforementioned dependencies installed on your system. The building procedure additionally requires the following dependencies:\n\n- `meson-python`\n- `ninja`\n- `cython`\n- `numpy`\n\n### The Recommended Approach (Using Bootstrapped Environment Config)\n\nTo simplify the environment setup, we provide a pre-configured `environment.yml` located at the root directory of the project. Install with `conda/mamba` to get a head start.\n\n```shell\n# Clone the repository\ngit clone https://github.com/ntucllab/libact.git\ncd libact\n\n# Create and activate conda environment\nconda env create -f environment.yml\nconda activate libact\n\n# Install in development mode\npip install --no-build-isolation -e .\n\n# Or build and install\npip install --no-build-isolation .\n```\n\n### Regular Install (Recommended for Users)\n\nFor regular usage (not development), simply install from PyPI or from a local clone:\n\n```shell\n# From PyPI\npip install libact\n\n# From local clone\npip install .\n```\n\nRegular installs do **not** require build tools at runtime and will work without any additional dependencies.\n\n### Editable/Development Install (Recommended Method)\n\nEditable installs with meson-python automatically rebuild compiled components when you import the package. To ensure build tools are available, use `--no-build-isolation`:\n\n```shell\n# First install build dependencies in your environment\npip install meson-python meson ninja cython numpy\n\n# Then install in editable mode without build isolation\npip install --no-build-isolation -e .\n```\n\nThis ensures that `ninja`, `meson`, and other build tools remain available in your environment for rebuilds.\n\n**Troubleshooting:** If you get errors about missing `ninja` or build tools when importing libact:\n- You may have installed in editable mode with build isolation (which is not recommended)\n- Solution: Reinstall using the method above, OR use a regular install: `pip install .`\n\n## Available Query Strategies\n\n| Strategy | Type | Description |\n|----------|------|-------------|\n| `UncertaintySampling` | Exploitation | Selects samples where the model is least confident |\n| `EpsilonUncertaintySampling` | Exploration + Exploitation | ε-greedy: random with prob ε, uncertainty sampling otherwise |\n| `CoreSet` | Diversity | k-Center Greedy, selects the point farthest from labeled set |\n| `BALD` | Epistemic Uncertainty | Bayesian Active Learning by Disagreement via ensemble (mutual information) |\n| `InformationDensity` | Representativeness | Density-weighted uncertainty — avoids querying outliers |\n| `QueryByCommittee` | Disagreement | Committee of models votes on most informative samples |\n| `QUIRE` | Informativeness + Representativeness | Combines uncertainty and density |\n| `RandomSampling` | Baseline | Uniform random selection |\n| `ActiveLearningByLearning` | Meta-algorithm | Multi-armed bandit that selects the best strategy on the fly |\n| `VarianceReduction` | Variance | Minimizes output variance (requires C extension) |\n| `HintSVM` | SVM-based | SVM-guided active learning (requires C extension) |\n| `DensityWeightedMeta` | Density | Weights informativeness by density |\n| `DWUS` | Density + Uncertainty | Density-weighted uncertainty sampling |\n\n## Available Models\n\n| Model | Description |\n|-------|-------------|\n| `LogisticRegression` | Logistic regression with probability output |\n| `SVM` | Support Vector Machine classifier |\n| `Perceptron` | Perceptron classifier |\n| `SklearnAdapter` / `SklearnProbaAdapter` | Wraps any scikit-learn estimator for use with libact |\n\n## Usage\n\nThe main usage of `libact` is as follows:\n\n```python\nqs = UncertaintySampling(trn_ds, method='lc') # query strategy instance\n\nask_id = qs.make_query() # let the specified query strategy suggest a data to query\nX, y = zip(*trn_ds.data)\nlb = lbr.label(X[ask_id]) # query the label of unlabeled data from labeler instance\ntrn_ds.update(ask_id, lb) # update the dataset with newly queried data\n```\n\n### Using CoreSet, BALD, and InformationDensity Strategies\n\n```python\nfrom libact.query_strategies import (\n    CoreSet,\n    BALD,\n    InformationDensity,\n    ActiveLearningByLearning,\n)\nfrom libact.models import LogisticRegression\n\n# Core-Set (diversity-based, farthest-from-labeled)\nqs = CoreSet(dataset)\n\n# BALD (epistemic uncertainty via ensemble disagreement)\nqs = BALD(dataset, models=[\n    LogisticRegression(C=0.1),\n    LogisticRegression(C=1.0),\n    LogisticRegression(C=10.0),\n])\n\n# Information Density (uncertainty weighted by representativeness)\nqs = InformationDensity(dataset, model=LogisticRegression(), method='entropy')\n\n# With stronger density preference (beta=2) and cosine similarity\nqs = InformationDensity(dataset, model=LogisticRegression(),\n                        method='entropy', metric='cosine', beta=2.0)\n\n# ALBL with all three strategies combined\nqs = ActiveLearningByLearning(\n    dataset,\n    query_strategies=[\n        CoreSet(dataset),\n        BALD(dataset, models=[...]),\n        InformationDensity(dataset, model=LogisticRegression()),\n    ],\n    T=quota,\n    uniform_sampler=True,\n    model=model\n)\n```\n\n## Examples\n\nSome examples are available under the `examples` directory. Before running, use\n`examples/get_dataset.py` to retrieve the dataset used by the examples.\n\nAvailable examples:\n\n  - [plot](examples/plot.py) : This example performs basic usage of libact. It splits\n    a fully-labeled dataset and remove some label from dataset to simulate\n    the pool-based active learning scenario. Each query of an unlabeled dataset is then equivalent to revealing one labeled example in the original data set.\n  - [label_digits](examples/label_digits.py) : This example shows how to use libact in the case\n    that you want a human to label the selected sample for your algorithm.\n  - [albl_plot](examples/albl_plot.py): This example compares the performance of ALBL\n    with other active learning algorithms.\n  - [albl_new_strategies_benchmark](examples/albl_new_strategies_benchmark.py): Benchmarks\n    CoreSet, BALD, and InformationDensity query strategies individually and combined via ALBL.\n  - [multilabel_plot](examples/multilabel_plot.py): This example compares the performance of\n    algorithms under multilabel setting.\n  - [alce_plot](examples/alce_plot.py): This example compares the performance of\n    algorithms under cost-sensitive multi-class setting.\n\n## Running tests\n\nTo run the test suite:\n\n```\npython -m unittest -v\n```\n\nTo run pylint, install pylint through ```pip install pylint``` and run the following command in root directory:\n\n```\npylint libact\n```\n\nTo measure the test code coverage, install coverage through ```pip install coverage``` and run the following commands in root directory:\n\n```\npython -m coverage run --source libact --omit */tests/* -m unittest\npython -m coverage report\n```\n\n## Citing\n\nIf you find this package useful, please cite the original works (see Reference of each strategy) as well as the following\n\n```\n@techreport{YY2017,\n  author = {Yao-Yuan Yang and Shao-Chuan Lee and Yu-An Chung and Tung-En Wu and Si-An Chen and Hsuan-Tien Lin},\n  title = {libact: Pool-based Active Learning in Python},\n  institution = {National Taiwan University},\n  url = {https://github.com/ntucllab/libact},\n  note = {available as arXiv preprint \\url{https://arxiv.org/abs/1710.00379}},\n  month = oct,\n  year = 2017\n}\n```\n\n## Acknowledgments\n\nThe authors thank Chih-Wei Chang and other members of the [Computational Learning Lab](https://learner.csie.ntu.edu.tw/) at National Taiwan University for valuable discussions and various contributions to making this package better.\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9386:2B291E:184559:5EA1F5:6AB92C07"},"text_sha256":"68e14fcae0f74ac74045c1154e6f0266b235ef3fea3c282426d46e23d7d5e9c0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pyRiemann/pyRiemann","input_row":{"repository":"pyRiemann/pyRiemann","url":"https://github.com/pyRiemann/pyRiemann","name":"pyRiemann","owner":"pyRiemann","description":"Machine learning for multivariate data through the Riemannian geometry of positive definite matrices in Python","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":777,"issues":126,"created_at":"2015-04-19T16:01:44Z","updated_at":"2026-09-14T11:42:26Z","first_commit_at":"2015-02-04T15:45:21Z","last_commit_at":"2026-09-14T11:42:20Z","activity_months":139.28,"ai_ml_match_topics":"machine-learning; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:29.052Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pyRiemann/pyRiemann","visibility":"public","created_at":"2015-04-19T16:01:44Z","updated_at":"2026-09-14T11:42:26Z","private":false,"fork":false,"archived":false,"stargazers_count":777,"open_issues_count":12,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2033","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0904:754BF:17D7F44:1BFDC25:6AB92C09"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2032","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088E:380E1C:17DB753:1C0056A:6AB92C09"},"commit":{"sha":"d41921e201eb626992c098f126f16c75172e607c","url":"https://github.com/pyRiemann/pyRiemann/commit/d41921e201eb626992c098f126f16c75172e607c","date":"2018-04-01T04:40:04Z","author_date":"2018-04-01T04:40:04Z","committer_date":"2018-04-01T04:40:04Z","tree_sha":"cf32989155c3e87579b8a942b7b79cba0388e5d0","message_first_line":"add update path in config"},"tree_request_status":200,"tree_rate":{"github_remaining":"2031","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0846:72727:17B5EF2:1BDBA69:6AB92C09"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5993,"blob_sha":"ab2cf41cf9f5e1017927c446b6165494195cd7a0","priority":0}],"documents":[{"path":"README.md","size":5993,"blob_sha":"ab2cf41cf9f5e1017927c446b6165494195cd7a0","priority":0,"status":200,"text":"# pyRiemann\n\n[![Code Climate](https://codeclimate.com/github/alexandrebarachant/pyRiemann/badges/gpa.svg)](https://codeclimate.com/github/alexandrebarachant/pyRiemann)\n[![Build Status](https://travis-ci.org/alexandrebarachant/pyRiemann.svg?branch=master)](https://travis-ci.org/alexandrebarachant/pyRiemann)\n[![codecov](https://codecov.io/gh/alexandrebarachant/pyRiemann/branch/master/graph/badge.svg)](https://codecov.io/gh/alexandrebarachant/pyRiemann)\n[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.18982.svg)](http://dx.doi.org/10.5281/zenodo.18982)\n[![Documentation Status](https://readthedocs.org/projects/pyriemann/badge/?version=latest)](http://pyriemann.readthedocs.io/en/latest/?badge=latest)\n\npyriemann is a python package for covariance matrices manipulation and classification through riemannian geometry.\n\nThe primary target is classification of multivariate biosignals, like EEG, MEG or EMG.\n\nThis is work in progress ... stay tuned.\n\nThis code is BSD-licenced (3 clause).\n\n## Documentation\n\nThe documentation is available on http://pyriemann.readthedocs.io/en/latest/\n\n## Install\n\n#### Using PyPI\n\n```\npip install pyriemann\n```\nor using pip+git for the latest version of the code :\n\n```\npip install git+https://github.com/alexandrebarachant/pyRiemann\n```\n\nAnaconda is not currently supported, if you want to use anaconda, you need to create a virtual environment in anaconda, activate it and use the above command to install it.\n\n#### From sources\n\nFor the latest version, you can install the package from the sources using the setup.py script\n\n```\npython setup.py install\n```\n\nor in developer mode to be able to modify the sources.\n\n```\npython setup.py develop\n```\n\n## How to use it\n\nMost of the functions mimic the scikit-learn API, and therefore can be directly used with sklearn. For example, for cross-validation classification of EEG signal using the MDM algorithm described in [4] , it is easy as :\n\n```python\nimport pyriemann\nfrom sklearn.model_selection import cross_val_score\n\n# load your data\nX = ... # your EEG data, in format Ntrials x Nchannels X Nsamples\ny = ... # the labels\n\n# estimate covariances matrices\ncov = pyriemann.estimation.Covariances().fit_transform(X)\n\n# cross validation\nmdm = pyriemann.classification.MDM()\n\naccuracy = cross_val_score(mdm, cov, y)\n\nprint(accuracy.mean())\n\n```\n\nYou can also pipeline methods using sklearn Pipeline framework. For example, to classify EEG signal using a SVM classifier in the tangent space, described in [5] :\n\n```python\nfrom pyriemann.estimation import Covariances\nfrom pyriemann.tangentspace import TangentSpace\n\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import cross_val_score\n\n# load your data\nX = ... # your EEG data, in format Ntrials x Nchannels X Nsamples\ny = ... # the labels\n\n# build your pipeline\ncovest = Covariances()\nts = TangentSpace()\nsvc = SVC(kernel='linear')\n\nclf = make_pipeline(covest,ts,svc)\n# cross validation\naccuracy = cross_val_score(clf, X, y)\n\nprint(accuracy.mean())\n\n```\n\n**Check out the example folder for more examples !**\n\n# Testing\n\nIf you make a modification, run the test suite before submitting a pull request\n\n```\nnosetests\n```\n\n# Contribution Guidelines\n\nThe package aims at adopting the [Scikit-Learn](http://scikit-learn.org/stable/developers/contributing.html#contributing-code) and [MNE-Python](http://martinos.org/mne/stable/contributing.html#general-code-guidelines) conventions as much as possible. See their contribution guidelines before contributing to the repository.\n\n\n# References\n\n> [1] A. Barachant, M. Congedo ,\"A Plug&Play P300 BCI Using Information Geometry\", arXiv:1409.0107. [link](http://arxiv.org/abs/1409.0107)\n>\n> [2] M. Congedo, A. Barachant, A. Andreev ,\"A New generation of Brain-Computer Interface Based on Riemannian Geometry\", arXiv: 1310.8115. [link](http://arxiv.org/abs/1310.8115)\n>\n> [3] A. Barachant and S. Bonnet, \"Channel selection procedure using riemannian distance for BCI applications,\" in 2011 5th International IEEE/EMBS Conference on Neural Engineering (NER), 2011, 348-351. [pdf](http://hal.archives-ouvertes.fr/docs/00/60/27/07/PDF/NER11_0016_FI.pdf)\n>\n> [4] A. Barachant, S. Bonnet, M. Congedo and C. Jutten, “Multiclass Brain-Computer Interface Classification by Riemannian Geometry,” in IEEE Transactions on Biomedical Engineering, vol. 59, no. 4, p. 920-928, 2012. [pdf](http://hal.archives-ouvertes.fr/docs/00/68/13/28/PDF/Barachant_tbme_final.pdf)\n>\n> [5] A. Barachant, S. Bonnet, M. Congedo and C. Jutten, “Classification of covariance matrices using a Riemannian-based kernel for BCI applications“, in NeuroComputing, vol. 112, p. 172-178, 2013. [pdf](http://hal.archives-ouvertes.fr/docs/00/82/04/75/PDF/BARACHANT_Neurocomputing_ForHal.pdf)\n\n# changelog\n\n### v0.2.5\n- Added `BilinearFilter`\n- Added a permutation test for generic scikit-learn estimator\n- Stats module refactoring, with distance based t-test and f-test\n- Removed two way permutation test\n- Added `FlatChannelRemover`\n- Support for python 3.5 and 3.6\n- Added `Shrinkage` transformer\n- Added `Coherences` transformer\n- Added `Embedding` class.\n\n### v0.2.4\n- Improved documentation\n- Added TSclassifier for out-of the box tangent space classification.\n- Added Wasserstein distance and mean.\n- Added NearestNeighbor classifier.\n- Added Softmax probabilities for MDM.\n- Added CSP for covariance matrices.\n- Added Approximate Joint diagonalization algorithms (JADE, PHAM, UWEDGE).\n- Added ALE mean.\n- Added Multiclass CSP.\n- API: param name changes in `CospCovariances` to comply to Scikit-Learn.\n- API: attributes name changes in most modules to comply to the Scikit-Learn naming convention.\n- Added `HankelCovariances` estimation\n- Added `SPoC` spatial filtering\n- Added Harmonic mean\n- Added Kullback leibler mean\n\n### v0.2.3\n - Added multiprocessing for MDM with joblib\n - Added kullback-leibler divergence\n - Added Riemannian Potato\n - Added sample_weight for mean estimation and MDM\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0C60:3AC15:180309:5E5E44:6AB92C0A"},"text_sha256":"1d75291030db160d8480ed665bf61509fcec976e560ee4bbd396523c76954114"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2030","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17E56CD:1C0B777:6AB92C0A"},"commit":{"sha":"ddac29c8f9acd96a8c99fc9c85674a24bca8481a","url":"https://github.com/pyRiemann/pyRiemann/commit/ddac29c8f9acd96a8c99fc9c85674a24bca8481a","date":"2026-06-29T06:33:48Z","author_date":"2026-06-29T06:33:48Z","committer_date":"2026-06-29T06:33:48Z","tree_sha":"febf789490fa58d8c066c3a06af4b176f11f8460","message_first_line":"Make stateless transformers report as fitted (#457)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2029","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0879:2BC4E5:182DACC:1C53465:6AB92C0B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8280,"blob_sha":"2a4f10bc9ec3b106121e0e54607a38070d269fb1","priority":0}],"documents":[{"path":"README.md","size":8280,"blob_sha":"2a4f10bc9ec3b106121e0e54607a38070d269fb1","priority":0,"status":200,"text":"# pyRiemann\n\n[![Code PythonVersion](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)\n[![PyPI version](https://badge.fury.io/py/pyriemann.svg)](https://badge.fury.io/py/pyriemann)\n[![Build Status](https://github.com/pyRiemann/pyRiemann/actions/workflows/testing.yml/badge.svg?branch=master&event=push)](https://github.com/pyRiemann/pyRiemann/actions)\n[![codecov](https://codecov.io/gh/pyRiemann/pyRiemann/branch/master/graph/badge.svg)](https://codecov.io/gh/pyRiemann/pyRiemann)\n[![Documentation Status](https://readthedocs.org/projects/pyriemann/badge/?version=latest)](http://pyriemann.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.593816.svg)](https://doi.org/10.5281/zenodo.593816)\n[![Downloads](https://pepy.tech/badge/pot)](https://pepy.tech/project/pyriemann)\n\npyRiemann is a Python machine learning package based on [scikit-learn](http://scikit-learn.org/stable/modules/classes.html) API.\nIt provides a high-level interface for processing and classification of real (*resp*. complex)-valued multivariate data\nthrough the [Riemannian geometry](https://en.wikipedia.org/wiki/Riemannian_geometry) of symmetric (*resp*. Hermitian)\n[positive definite](https://en.wikipedia.org/wiki/Definite_matrix) (SPD) (*resp*. HPD) matrices.\n\nThe documentation is available on http://pyriemann.readthedocs.io/en/latest/\n\nThis code is BSD-licensed (3 clause).\n\n# Description\n\npyRiemann aims at being a generic package for multivariate data analysis\nbut has been designed around [biosignals](https://en.wikipedia.org/wiki/Biosignal) (like EEG, MEG or EMG)\nmanipulation applied to [brain-computer interface](https://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface) (BCI),\nestimating [covariance matrices](https://en.wikipedia.org/wiki/Covariance_matrix) from multichannel time series,\nand classifying them using the Riemannian geometry of SPD matrices [[1]](#1).\n\nFor BCI applications, studied paradigms are motor imagery [[2]](#2) [[3]](#3),\nevent-related potentials (ERP) [[4]](#4) and steady-state visually evoked potentials (SSVEP) [[5]](#5).\nUsing extended labels, API allows multisource [transfer learning](https://en.wikipedia.org/wiki/Transfer_learning)\nbetween sessions or subjects [[6]](#6).\n\nAnother application is [remote sensing](https://en.wikipedia.org/wiki/Remote_sensing),\nestimating covariance matrices over spatial coordinates of radar images using a sliding window,\nand processing them using the Riemannian geometry of\nSPD matrices for [hyperspectral](https://en.wikipedia.org/wiki/Hyperspectral_imaging) images,\nor HPD matrices for [synthetic-aperture radar](https://en.wikipedia.org/wiki/Synthetic-aperture_radar) (SAR) images.\n\npyRiemann's core utility functions support both NumPy and PyTorch backends\ntransparently through the [Python Array API](https://data-apis.org/array-api/),\nenabling optional GPU acceleration and autograd when PyTorch tensors are\npassed in directly.\n\n# Installation\n\n#### Using PyPI\n\n```\npip install pyriemann\n```\nor using pip+git for the latest version of the code:\n\n```\npip install git+https://github.com/pyRiemann/pyRiemann\n```\n\n#### Using conda\n\nThe package is distributed via [conda-forge](https://conda-forge.org).\nYou could install it in your working environment, with the following command:\n\n```shell\nconda install -c conda-forge pyriemann\n```\n\n#### From sources\n\nFor the latest version, you can install the package from the sources using ``pip``:\n\n```shell\npip install .\n```\n\nor in editable mode to be able to modify the sources:\n\n```shell\npip install -e .\n```\n\n# How to use\n\nMost of the functions mimic the scikit-learn API, and therefore can be directly used with sklearn.\nFor example, for cross-validation classification of EEG signal using the MDM algorithm described in [[2]](#2), it is easy as:\n\n```python\nimport pyriemann\nfrom sklearn.model_selection import cross_val_score\n\n# load your data\nX = ... # EEG data, in format n_epochs x n_channels x n_times\ny = ... # labels\n\n# estimate covariance matrices\ncov = pyriemann.estimation.Covariances().fit_transform(X)\n\n# build your classifier\nmdm = pyriemann.classification.MDM()\n\n# cross validation\naccuracy = cross_val_score(mdm, cov, y)\n\nprint(accuracy.mean())\n\n```\n\nYou can also pipeline methods using sklearn pipeline framework.\nFor example, to classify EEG signal using a SVM classifier in the tangent space, described in [[3]](#3):\n\n```python\nfrom pyriemann.estimation import Covariances\nfrom pyriemann.tangentspace import TangentSpace\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.svm import SVC\n\n# load your data\nX = ... # EEG data, in format n_epochs x n_channels x n_times\ny = ... # labels\n\n# build your pipeline\nclf = make_pipeline(\n    Covariances(),\n    TangentSpace(),\n    SVC(kernel=\"linear\"),\n)\n\n# cross validation\naccuracy = cross_val_score(clf, X, y)\n\nprint(accuracy.mean())\n\n```\n\nCheck out the example folder for more examples.\n\n# Contribution Guidelines\n\nThe package aims at adopting the [scikit-learn](http://scikit-learn.org/stable/developers/contributing.html#contributing-code)\nand [MNE-Python](https://mne.tools/stable/install/contributing.html) conventions as much as possible.\nSee their contribution guidelines before contributing to the repository.\n\n# Testing\n\nIf you make a modification, run the test suite before submitting a pull request\n\n```\npytest\n```\n\n# How to cite\n\n```bibtex\n@software{pyriemann,\n  author       = {Alexandre Barachant and\n                  Quentin Barthélemy and\n                  Jean-Rémi King and\n                  Alexandre Gramfort and\n                  Sylvain Chevallier and\n                  Pedro L. C. Rodrigues and\n                  Emanuele Olivetti and\n                  Vladislav Goncharenko and\n                  Gabriel Wagner vom Berg and\n                  Ghiles Reguig and\n                  Arthur Lebeurrier and\n                  Erik Bjäreholt and\n                  Maria Sayu Yamamoto and\n                  Pierre Clisson and\n                  Marie-Constance Corsi and\n                  Igor Carrara and\n                  Apolline Mellot and\n                  Bruna Junqueira Lopes and\n                  Brent Gaisford and\n                  Ammar Mian and\n                  Anton Andreev and\n                  Gregoire Cattan and\n                  Arthur Lebeurrier},\n  title        = {pyRiemann},\n  month        = april,\n  year         = 2026,\n  version      = {v0.11},\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.593816},\n  url          = {https://doi.org/10.5281/zenodo.593816}\n}\n```\n\n# References\n\n<a id=\"1\">[1]<\/a>\nM. Congedo, A. Barachant and R. Bhatia, \"Riemannian geometry for EEG-based brain-computer interfaces; a primer and a review\".\nBrain-Computer Interfaces, 4.3, pp. 155-174, 2017. [link](https://hal.science/hal-01570120/document)\n\n<a id=\"2\">[2]<\/a>\nA. Barachant, S. Bonnet, M. Congedo and C. Jutten, \"Multiclass Brain-Computer Interface Classification by Riemannian Geometry\".\nIEEE Transactions on Biomedical Engineering, vol. 59, no. 4, pp. 920-928, 2012. [link](https://hal.archives-ouvertes.fr/hal-00681328)\n\n<a id=\"3\">[3]<\/a>\nA. Barachant, S. Bonnet, M. Congedo and C. Jutten, \"Classification of covariance matrices using a Riemannian-based kernel for BCI applications\".\nNeurocomputing, 112, pp. 172-178, 2013. [link](https://hal.archives-ouvertes.fr/hal-00820475/)\n\n<a id=\"4\">[4]<\/a>\nA. Barachant and M. Congedo, \"A Plug&Play P300 BCI Using Information Geometry\".\nResearch report, 2014. [link](http://arxiv.org/abs/1409.0107)\n\n<a id=\"5\">[5]<\/a>\nEK. Kalunga, S. Chevallier, Q. Barthélemy, K. Djouani, E. Monacelli and Y. Hamam, \"Online SSVEP-based BCI using Riemannian geometry\".\nNeurocomputing, 191, pp. 55-68, 2014. [link](https://hal.science/hal-01351623/file/Kalunga-Chevallier-Barthelemy-Online%20SSVEP-based%20BCI%20using%20Riemannian%20Geometry-Neurocomputing-16.pdf)\n\n<a id=\"6\">[6]<\/a>\nPLC. Rodrigues, C. Jutten and M. Congedo, \"Riemannian Procrustes analysis: transfer learning for brain-computer interfaces\".\nIEEE Transactions on Biomedical Engineering, vol. 66, no. 8, pp. 2390-2401, 2018. [link](https://hal.archives-ouvertes.fr/hal-01971856)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D1E:1F1FB6:17D997:5E359B:6AB92C07"},"text_sha256":"bf6bbf362418de02651c5c01257e5156ea50f91029633bdec0362a6c9ea3a13a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"scverse/anndata","input_row":{"repository":"scverse/anndata","url":"https://github.com/scverse/anndata","name":"anndata","owner":"scverse","description":"Annotated data.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":774,"issues":900,"created_at":"2017-08-11T14:10:06Z","updated_at":"2026-09-27T05:41:10Z","first_commit_at":"2017-08-11T15:44:17Z","last_commit_at":"2026-09-25T11:33:10Z","activity_months":109.45999999999999,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:32.100Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"scverse/anndata","visibility":"public","created_at":"2017-08-11T14:10:06Z","updated_at":"2026-09-27T05:41:10Z","private":false,"fork":false,"archived":false,"stargazers_count":774,"open_issues_count":270,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2028","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17DFA5B:1C0500D:6AB92C0C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2027","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0905:280FBC:17C827A:1BECCD0:6AB92C0C"},"commit":{"sha":"a489245bcc6ebf3ad62eac6fa336757b82ebb021","url":"https://github.com/scverse/anndata/commit/a489245bcc6ebf3ad62eac6fa336757b82ebb021","date":"2018-05-16T15:05:28Z","author_date":"2018-05-16T15:05:28Z","committer_date":"2018-05-16T15:05:28Z","tree_sha":"059b1f89fc49fcc2a8c91dfbf99f72a04afa93d9","message_first_line":"added rename_categories"},"tree_request_status":200,"tree_rate":{"github_remaining":"2026","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:1817BE5:1C3DAA3:6AB92C0C"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":959,"blob_sha":"fcd4383d91183ca90765e274dafc7e868935171c","priority":0}],"documents":[{"path":"README.rst","size":959,"blob_sha":"fcd4383d91183ca90765e274dafc7e868935171c","priority":0,"status":200,"text":"|PyPI| |Docs| |Build Status| |Coverage|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/anndata.svg\n   :target: https://pypi.org/project/anndata\n.. |Docs| image:: https://readthedocs.org/projects/anndata/badge/?version=latest\n   :target: https://anndata.readthedocs.io\n.. |Build Status| image:: https://travis-ci.org/theislab/anndata.svg?branch=master\n   :target: https://travis-ci.org/theislab/anndata\n.. |Coverage| image:: https://codecov.io/gh/theislab/anndata/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/theislab/anndata\n\nanndata - Annotated Data\n========================\n\nInstall from `PyPI <https://pypi.python.org/pypi/anndata/>`__ via ``pip install anndata``.\n\nRead the `documentation <https://anndata.readthedocs.io>`_.\n\n.. would be nice to have http://falexwolf.de/img/scanpy/anndata.svg also on GitHub, but it's much too wide there;\n.. GitHub doesn't plan to resolve scaling images: https://github.com/github/markup/issues/295\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1192:11316A:17DED8:5E3A85:6AB92C0C"},"text_sha256":"68b8c8a842733bfd950b2f4278c1b890155604d2f5f7e3f6d5d9a104a9698b68"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2025","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D2:A9DC0:17C7AA1:1BED479:6AB92C0D"},"commit":{"sha":"ac48295e2e579323a87c8ab7402d7bfaf886b808","url":"https://github.com/scverse/anndata/commit/ac48295e2e579323a87c8ab7402d7bfaf886b808","date":"2026-06-30T09:45:31Z","author_date":"2026-06-30T09:45:31Z","committer_date":"2026-06-30T09:45:31Z","tree_sha":"6f064c21359d0c1bf1b0413acbea75eed4ad1b47","message_first_line":"ci: pre-commit autoupdate (#2518)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2024","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:181F2C8:1C44F07:6AB92C0D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4816,"blob_sha":"aa21c163173b2d957a446ed0e9d87fc01abe0f3b","priority":0}],"documents":[{"path":"README.md","size":4816,"blob_sha":"aa21c163173b2d957a446ed0e9d87fc01abe0f3b","priority":0,"status":200,"text":"[![Tests](https://github.com/scverse/anndata/actions/workflows/test-cpu.yml/badge.svg)](https://github.com/scverse/anndata/actions)\n[![Conda](https://img.shields.io/conda/vn/conda-forge/anndata.svg)](https://anaconda.org/conda-forge/anndata)\n[![Coverage](https://codecov.io/gh/scverse/anndata/branch/main/graph/badge.svg?token=IN1mJN1Wi8)](https://codecov.io/gh/scverse/anndata)\n[![Docs](https://readthedocs.com/projects/icb-anndata/badge/?version=latest)](https://anndata.readthedocs.io)\n[![PyPI](https://img.shields.io/pypi/v/anndata.svg)](https://pypi.org/project/anndata)\n[![Downloads](https://static.pepy.tech/badge/anndata/month)](https://pepy.tech/project/anndata)\n[![Downloads](https://static.pepy.tech/badge/anndata)](https://pepy.tech/project/anndata)\n[![Stars](https://img.shields.io/github/stars/scverse/anndata?style=flat&logo=github&color=yellow)](https://github.com/scverse/anndata/stargazers)\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org)\n\n<img\n  src=\"https://raw.githubusercontent.com/scverse/anndata/main/docs/_static/img/anndata_schema.svg\"\n  class=\"dark-light\" align=\"right\" width=\"350\" alt=\"image\"\n/>\n\n# anndata - Annotated data\n\nanndata is a Python package for handling annotated data matrices in memory and on disk, positioned between pandas and xarray. anndata offers a broad range of computationally efficient features including, among others, sparse data support, and lazy operations.\nA separate data loader package, [annbatch](https://annbatch.readthedocs.io/en/stable/), offers minibatch data loading functionality for applications ranging from linear models to foundation models,  scaling all the way up from small in-memory matrices to terabyte-scale disk-backed anndata datasets.\n\n- Discuss development on [GitHub](https://github.com/scverse/anndata).\n- Read the [documentation](https://anndata.readthedocs.io).\n- Ask questions on the [scverse Discourse](https://discourse.scverse.org).\n- Install via `pip install anndata` or `conda install anndata -c conda-forge`.\n- See [Scanpy's documentation](https://scanpy.readthedocs.io/) for usage related to single cell data. anndata was initially built for Scanpy.\n\n[//]: # (numfocus-fiscal-sponsor-attribution)\n\nanndata is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).\nIf you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.\n\n<div align=\"center\">\n<a href=\"https://numfocus.org/project/scverse\">\n  <img\n    src=\"https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png\"\n    width=\"200\"\n  >\n<\/a>\n<\/div>\n\n## Public API\n\nOur public API is documented in the [API section][] of these docs.\nWe cannot guarantee the stability of our internal APIs, whether it's the location of a function, its arguments, or something else.\nIn other words, we do not officially support (or encourage users to do) something like `from anndata._core import AnnData` as `_core` is both not documented and contains a [leading underscore][].\nHowever, we are aware that [many users do use these internal APIs][] and thus encourage them to [open an issue][] or migrate to the public API.\nThat is, if something is missing from our public API as documented, for example a feature you wish to be exported publicly, please open an issue.\n\n[api section]: https://anndata.readthedocs.io/en/stable/api.html\n[leading underscore]: https://peps.python.org/pep-0008/#public-and-internal-interfaces\n[many users do use these internal APIs]: https://github.com/search?q=%22anndata._io%22&type=code\n[open an issue]: https://github.com/scverse/anndata/issues/new/choose\n\n\n## Citation\n\nIf you use `anndata` in your work, please cite the `anndata` publication as follows:\n\n> **anndata: Annotated data**\n>\n> Isaac Virshup, Sergei Rybakov, Fabian J. Theis, Philipp Angerer, F. Alexander Wolf\n>\n> _JOSS_ 2024 Sep 16. doi: [10.21105/joss.04371](https://doi.org/10.21105/joss.04371).\n\nYou can cite the scverse publication as follows:\n\n> **The scverse project provides a computational ecosystem for single-cell omics data analysis**\n>\n> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis\n>\n> _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:17E1B3:5E3ED5:6AB92C0C"},"text_sha256":"0c9b2b419acfbbba3b475e19b74650a1c645539dcc2812e71c81ec9f69ed82ea"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"openml/OpenML","input_row":{"repository":"openml/OpenML","url":"https://github.com/openml/OpenML","name":"OpenML","owner":"openml","description":"Open Machine Learning","language":"PHP","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":756,"issues":936,"created_at":"2012-12-11T11:27:40Z","updated_at":"2026-09-25T10:37:47Z","first_commit_at":"2012-12-12T12:05:29Z","last_commit_at":"2026-08-19T10:27:28Z","activity_months":164.19,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:34.643Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"openml/OpenML","visibility":"public","created_at":"2012-12-11T11:27:40Z","updated_at":"2026-09-25T10:37:47Z","private":false,"fork":false,"archived":false,"stargazers_count":756,"open_issues_count":348,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2023","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:178E81F:1BB4593:6AB92C0E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2022","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:181AE38:1C407B9:6AB92C0F"},"commit":{"sha":"a851615343e5cbccd1f6022e43dda76148b73e16","url":"https://github.com/openml/OpenML/commit/a851615343e5cbccd1f6022e43dda76148b73e16","date":"2018-05-08T16:20:25Z","author_date":"2018-05-08T16:20:25Z","committer_date":"2018-05-08T16:20:25Z","tree_sha":"fb9b2c73e6ee1f2f6e47b6cc5efbd2a312f56edc","message_first_line":"Merge pull request #741 from openml/develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"2021","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CD:280FBC:17C8480:1BECF23:6AB92C0F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6676,"blob_sha":"0d35d97165a99c2ac58fb80236cdf8f042111e30","priority":0},{"path":"docs/docs/terms.md","size":3498,"blob_sha":"eea0ba57d315151e59facb5b7b8c6dfdb5d98cbe","priority":1}],"documents":[{"path":"README.md","size":6676,"blob_sha":"0d35d97165a99c2ac58fb80236cdf8f042111e30","priority":0,"status":200,"text":"[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Stories in Ready](https://badge.waffle.io/openml/OpenML.png?label=ready&title=Ready)](https://waffle.io/openml/OpenML)\n[![Stories in In Progress](https://badge.waffle.io/openml/OpenML.png?label=in%20progress&title=In%20Progress)](https://waffle.io/openml/OpenML)\n\nOpenML: Open Machine Learning\n=============================\nWelcome to the OpenML GitHub page! :tada:\n\nContents:\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n* [Who are we?](#who-are-we)\n* [What is OpenML?](#what-is-openml)\n     * [Benefits for Science](#benefits-for-science)\n     * [Benefits for Scientists](#benefits-for-scientists)\n     * [Benefits for Society](#benefits-for-society)\n* [Get involved](#get-involved)\n<!-- /TOC -->\n\n## Who are we?\nWe are a group of people who are excited about open science, open data and machine learning. \nWe want to make machine learning and data analysis **simple**, **accessible**, **collaborative** and **open** with an optimal **division of labour** between computers and humans. \n\n## What is OpenML?\nWant to learn about OpenML or get involved? Please do and [get in touch](openmlHQ@googlegroups.com) in case of questions or comments! :incoming_envelope:\n\n- Getting started:\n    - Check out the [OpenML Website](https://www.openml.org) to get a first impression of what OpenML is \n    - The OpenML [Documentation page](https://openml.github.io/OpenML/) gives an introduction in details and features, as well as\n    - OpenML's different [APIs](https://openml.github.io/OpenML/APIs) and [integrations](https://openml.github.io/OpenML/sklearn/) so that everyone can work with their favorite tool. \n- How to contribute: https://github.com/openml/OpenML/blob/master/CONTRIBUTING.md \n- Citation and Honor Code: http://openml.org/cite  \n- Communication / Contact: https://github.com/openml/OpenML/wiki/Communication-Channels\n\nOpenML is an online machine learning platform for sharing and organizing data, machine learning algorithms and experiments. It is designed to create a frictionless, networked ecosystem, that you can readily integrate into your existing processes/code/environments, allowing people all over the world to collaborate and build directly on each other’s latest ideas, data and results, irrespective of the tools and infrastructure they happen to use. \n\nAs an open science platform, OpenML provides important benefits for the science community and beyond.\n\n### Benefits for Science\nMany sciences have made significant breakthroughs by adopting online tools that help organizing, structuring and analyzing scientific data\nonline. Indeed, any shared idea, question, observation or tool may be noticed by someone who has just the right expertise to spark new ideas, answer open questions, reinterpret observations or reuse data and tools in unexpected new ways. Therefore, sharing research results and collaborating online as a (possibly cross-disciplinary) team enables scientists to quickly build on and extend the results of others,\nfostering new discoveries.\n\nMoreover, ever larger studies become feasible as a lot of data are already available. Questions such as “Which hyperparameter is important to tune?”, “Which is the best known workflow for analyzing this data set?” or “Which data sets are similar in structure to my own?” can be answered in minutes by reusing prior experiments, instead of spending days setting up and running new experiments.\n\n### Benefits for Scientists\nScientists can also benefit personally from using OpenML. For example, they can save time, because OpenML assists in many routine and tedious duties: finding data sets, tasks, flows and prior results, setting up experiments and organizing all experiments for further analysis. Moreover, new experiments are immediately compared to the state of the art without always having to rerun other people’s\nexperiments. \n\nAnother benefit is that linking one’s results to those of others has a large potential for new discoveries (see, for instance, Feurer et al. 2015; Post et al. 2016; Probst et al. 2017), leading to more publications and more collaboration with other scientists all over the world.\n\nFinally, OpenML can help scientists to reinforce their reputation by making their work (published or not) visible to a wide group of people and by showing how often one’s data, code and experiments are downloaded or reused in the experiments of others.\n\n### Benefits for Society\nOpenML also provides a useful learning and working environment for students, citizen scientists and practitioners. Students and citizen scientist can easily explore the state of the art and work together with top minds by contributing their own algorithms and experiments. Teachers can challenge their students by letting them compete on OpenML tasks or by reusing OpenML data in assignments. Finally, machine learning practitioners can explore and reuse the best solutions for specific analysis problems, interact with the scientific community or efficiently try out many possible approaches.\n\n-------------------\n## Get involved\n\nOpenML has grown into quite a big project. We could use many more hands to help us out :wrench:. \n\n- **You want to contribute?**: Awesome! Check out our wiki page on [how to contribute](https://github.com/openml/OpenML/wiki/How-to-contribute) or [get in touch](https://github.com/openml/OpenML/wiki/Communication-Channels). There may be unexpected ways for how you could help. We are open for any ideas. \n- **You want to support us financially?**: YES! Getting funding through conventional channels is very competitive, and we are happy about every small contribution. Please send an email to openmlHQ@googlegroups.com!\n\n\n-------------------\n## GitHub organization structure\n\nOpenML's code distrubuted over different repositories to simplify development. Please see their individual readme's and issue trackers of you like to contribute. These are the most important ones:\n\n- **[openml/OpenML](https://github.com/openml/openml)**: The OpenML web application, including the REST API.\n- **[openml/openml-python](https://github.com/openml/openml-python)**: The Python API, to talk to OpenML from Python scripts (including scikit-learn).\n- **[openml/openml-r](https://github.com/openml/openml-r)**: The R API, to talk to OpenML from R scripts (inclusing mlr).\n- **[openml/java](https://github.com/openml/java)**: The Java API, to talk to OpenML from Java scripts.\n- **[openml/openml-weka](https://github.com/openml/openml-weka)**: The WEKA plugin, to talk to OpenML from the WEKA toolbox.\n\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B684:40CE8:18081B:5E6457:6AB92C09"},"text_sha256":"7171e25b5f8b78826e5e9bc771c8e3d464222614b7fb4dd2d03a4f36c5d97f78"},{"path":"docs/docs/terms.md","size":3498,"blob_sha":"eea0ba57d315151e59facb5b7b8c6dfdb5d98cbe","priority":1,"status":200,"text":"## Honor Code\n<p>By <a href=\"https://www.openml.org/register\" target=\"_blank\">joining OpenML<\/a>, you join a special worldwide community of data scientists building on each other's results and connecting their minds as efficiently as possible. This community depends on your motivation to share data, tools and ideas, and to do so with honesty. In return, you will gain trust, visibility and reputation, igniting online collaborations and studies that otherwise may not have happened.<\/p>\n\n\n<\/p>\n<p>By using any part of OpenML, you agree to:<\/p>\n<ul>\n<li><b>Give credit where credit is due<\/b>. Cite the authors whose work you are building on, or build collaborations where appropriate.<\/li>\n<li><b>Give back to the community<\/b> by sharing your own data as openly and as soon as possible, or by helping the community in other ways. In doing so, you gain visibility and impact (citations).<\/li>\n<li><b>Share data according to your best efforts<\/b>. <i>Everybody<\/i> make mistakes, but we trust you to correct them as soon as possible. Remove or flag data that cannot be trusted.<\/li>\n<li><b>Be polite and constructive<\/b> in all discussions. Criticism of methods is welcomed, but personal criticisms should be avoided.<\/li>\n<li><b>Respect circles of trust<\/b>. OpenML allows you to collaborate in 'circles' of trusted people to share unpublished results. Be considerate in sharing data with people outside this circle.<\/li>\n<li><b>Do not steal<\/b> the work of people who openly share it. OpenML makes it easy to find all shared data (and when it was shared), thus everybody will know if you do this.<\/li>\n<\/ul>\n\n## Terms of Use\n<p>You agree that you are responsible for your own use of OpenML.org and all content submitted by you, in accordance with the Honor Code and all applicable local, state, national and international laws.<\/p>\n<p>By submitting or distributing content from OpenML.org, you affirm that you have the necessary rights, licenses, consents and/or permissions to reproduce and publish this content. You cannot upload sensitive or confidential data. You, and not the developers of OpenML.org, are solely responsible for your submissions.<\/p>\n<p>By submitting content to OpenML.org, you grant OpenML.org the right to host, transfer, display and use this content, in accordance with your sharing settings and any licences granted by you. You also grant to each user a non-exclusive license to access and use this content for their own research purposes, in accordance with any licences granted by you.<\/p>\n<p>You may maintain one user account and not let anyone else use your username and/or password. You may not impersonate other persons.<\/p>\n<p>You will not intend to damage, disable, or impair any OpenML server or interfere with any other party's use and enjoyment of the service. You may not attempt to gain unauthorized access to the Site, other accounts, computer systems or networks connected to any OpenML server. You may not obtain or attempt to obtain any materials or information not intentionally made available through OpenML.<\/p>\n<p>Strictly prohibited are content that defames, harasses or threatens others, that infringes another's intellectual property, as well as indecent or unlawful content, advertising, or intentionally inaccurate information posted with the intent of misleading others. It is also prohibited to post code containing viruses, malware, spyware or any other similar software that may damage the operation of another's computer or property.<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6432:18CDF1:178C38:56240D:6AB92C10"},"text_sha256":"97033c76458d8db929ec0c84615846e7001451e0715bffa26b577ec0c6b03467"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2020","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088F:7580A:1809705:1C2F50F:6AB92C11"},"commit":{"sha":"d29ef94428dc83b55f97b4bfba5a8e2bca213314","url":"https://github.com/openml/OpenML/commit/d29ef94428dc83b55f97b4bfba5a8e2bca213314","date":"2026-06-17T09:02:50Z","author_date":"2026-06-17T09:02:50Z","committer_date":"2026-06-17T09:02:50Z","tree_sha":"4cd7005f552155afe31c29690364fa6cb7dd69e6","message_first_line":"adds data description substr"},"tree_request_status":200,"tree_rate":{"github_remaining":"2019","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17CECDA:1BF3F2A:6AB92C11"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6694,"blob_sha":"76b2b800e7de6e53bb242037f05e84ee86623802","priority":0}],"documents":[{"path":"README.md","size":6694,"blob_sha":"76b2b800e7de6e53bb242037f05e84ee86623802","priority":0,"status":200,"text":"\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n> [!WARNING]\n> This repository is in maintenance-only mode. We're phasing out the PHP-based REST API in favor of a much more modern [FastAPI-based API](https://github.com/openml/server-api).\n> For more details, please check the [contribution guide](https://github.com/openml).\n\n\nOpenML: Open Machine Learning\n=============================\nWelcome to the OpenML GitHub page! :tada:\n\nContents:\n<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->\n* [Who are we?](#who-are-we)\n* [What is OpenML?](#what-is-openml)\n     * [Benefits for Science](#benefits-for-science)\n     * [Benefits for Scientists](#benefits-for-scientists)\n     * [Benefits for Society](#benefits-for-society)\n* [Get involved](#get-involved)\n<!-- /TOC -->\n\n## Who are we?\nWe are a group of people who are excited about open science, open data and machine learning. \nWe want to make machine learning and data analysis **simple**, **accessible**, **collaborative** and **open** with an optimal **division of labour** between computers and humans. \n\n## What is OpenML?\nWant to learn about OpenML or get involved? Please do and [get in touch](openmlHQ@googlegroups.com) in case of questions or comments! :incoming_envelope:\n\n- Getting started:\n    - Check out the [OpenML Website](https://www.openml.org) to get a first impression of what OpenML is \n    - The OpenML [Documentation page](https://openml.github.io/OpenML/) gives an introduction in details and features, as well as\n    - OpenML's different [APIs](https://openml.github.io/OpenML/APIs) and [integrations](https://openml.github.io/OpenML/sklearn/) so that everyone can work with their favorite tool. \n- How to contribute: https://github.com/openml/OpenML/blob/master/CONTRIBUTING.md \n- Citation and Honor Code: https://www.openml.org/terms\n- Communication / Contact: https://github.com/openml/OpenML/wiki/Communication-Channels\n\nOpenML is an online machine learning platform for sharing and organizing data, machine learning algorithms and experiments. It is designed to create a frictionless, networked ecosystem, that you can readily integrate into your existing processes/code/environments, allowing people all over the world to collaborate and build directly on each other’s latest ideas, data and results, irrespective of the tools and infrastructure they happen to use. \n\nAs an open science platform, OpenML provides important benefits for the science community and beyond.\n\n### Benefits for Science\nMany sciences have made significant breakthroughs by adopting online tools that help organizing, structuring and analyzing scientific data\nonline. Indeed, any shared idea, question, observation or tool may be noticed by someone who has just the right expertise to spark new ideas, answer open questions, reinterpret observations or reuse data and tools in unexpected new ways. Therefore, sharing research results and collaborating online as a (possibly cross-disciplinary) team enables scientists to quickly build on and extend the results of others,\nfostering new discoveries.\n\nMoreover, ever larger studies become feasible as a lot of data are already available. Questions such as “Which hyperparameter is important to tune?”, “Which is the best known workflow for analyzing this data set?” or “Which data sets are similar in structure to my own?” can be answered in minutes by reusing prior experiments, instead of spending days setting up and running new experiments.\n\n### Benefits for Scientists\nScientists can also benefit personally from using OpenML. For example, they can save time, because OpenML assists in many routine and tedious duties: finding data sets, tasks, flows and prior results, setting up experiments and organizing all experiments for further analysis. Moreover, new experiments are immediately compared to the state of the art without always having to rerun other people’s\nexperiments. \n\nAnother benefit is that linking one’s results to those of others has a large potential for new discoveries (see, for instance, Feurer et al. 2015; Post et al. 2016; Probst et al. 2017), leading to more publications and more collaboration with other scientists all over the world.\n\nFinally, OpenML can help scientists to reinforce their reputation by making their work (published or not) visible to a wide group of people and by showing how often one’s data, code and experiments are downloaded or reused in the experiments of others.\n\n### Benefits for Society\nOpenML also provides a useful learning and working environment for students, citizen scientists and practitioners. Students and citizen scientist can easily explore the state of the art and work together with top minds by contributing their own algorithms and experiments. Teachers can challenge their students by letting them compete on OpenML tasks or by reusing OpenML data in assignments. Finally, machine learning practitioners can explore and reuse the best solutions for specific analysis problems, interact with the scientific community or efficiently try out many possible approaches.\n\n-------------------\n## Get involved\n\nOpenML has grown into quite a big project. We could use many more hands to help us out :wrench:. \n\n- **You want to contribute?**: Awesome! Check out our wiki page on [how to contribute](https://github.com/openml/OpenML/wiki/How-to-contribute) or [get in touch](https://github.com/openml/OpenML/wiki/Communication-Channels). There may be unexpected ways for how you could help. We are open for any ideas. \n- **You want to support us financially?**: YES! Getting funding through conventional channels is very competitive, and we are happy about every small contribution. Please send an email to openmlHQ@googlegroups.com!\n\n\n-------------------\n## GitHub organization structure\n\nOpenML's code distrubuted over different repositories to simplify development. Please see their individual readme's and issue trackers of you like to contribute. These are the most important ones:\n\n- **[openml/OpenML](https://github.com/openml/openml)**: The OpenML web application, including the REST API.\n- **[openml/openml-python](https://github.com/openml/openml-python)**: The Python API, to talk to OpenML from Python scripts (including scikit-learn).\n- **[openml/openml-r](https://github.com/openml/openml-r)**: The R API, to talk to OpenML from R scripts (inclusing mlr).\n- **[openml/java](https://github.com/openml/java)**: The Java API, to talk to OpenML from Java scripts.\n- **[openml/openml-weka](https://github.com/openml/openml-weka)**: The WEKA plugin, to talk to OpenML from the WEKA toolbox.\n\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1014:3BCC6:17D752:5E3472:6AB92C12"},"text_sha256":"90c3948948544c4253012af8d8f5c2ce03099e7f74fe8e2d1b2c9be1c585ef58"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Yomguithereal/talisman","input_row":{"repository":"Yomguithereal/talisman","url":"https://github.com/Yomguithereal/talisman","name":"talisman","owner":"Yomguithereal","description":"Straightforward fuzzy matching, information retrieval and NLP building blocks for JavaScript.","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":732,"issues":165,"created_at":"2016-03-25T11:09:12Z","updated_at":"2026-08-13T12:48:08Z","first_commit_at":"2016-03-25T11:08:42Z","last_commit_at":"2021-05-05T13:41:54Z","activity_months":61.340000000000003,"ai_ml_match_topics":"machine-learning; natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:38.824Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Yomguithereal/talisman","visibility":"public","created_at":"2016-03-25T11:09:12Z","updated_at":"2026-08-13T12:48:08Z","private":false,"fork":false,"archived":false,"stargazers_count":732,"open_issues_count":87,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"2018","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:18083B7:1C2DA17:6AB92C12"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2017","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:179C84B:1BC1071:6AB92C13"},"commit":{"sha":"1ed9ed22a114cce6e9bebc2b967cea718c868bf7","url":"https://github.com/Yomguithereal/talisman/commit/1ed9ed22a114cce6e9bebc2b967cea718c868bf7","date":"2018-05-22T12:10:48Z","author_date":"2018-05-22T12:10:48Z","committer_date":"2018-05-22T12:10:48Z","tree_sha":"aa002a2f2e9f44bd2ad591cc3723af8e072d8c2b","message_first_line":"Merge pull request #146 from mvasilkov/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"2016","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17CA45C:1BF0005:6AB92C13"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2312,"blob_sha":"540cc03f3a7257113d3858842b2c9a184ef43fc5","priority":0}],"documents":[{"path":"README.md","size":2312,"blob_sha":"540cc03f3a7257113d3858842b2c9a184ef43fc5","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/Yomguithereal/talisman.svg)](https://travis-ci.org/Yomguithereal/talisman)\n\n# Talisman\n\n[Full documentation](http://yomguithereal.github.io/talisman/)\n\nTalisman is a JavaScript library collecting series of algorithms related to the following domains:\n\n* [Statistics](https://en.wikipedia.org/wiki/Statistics)\n* [Fuzzy logic & fuzzy matching](https://en.wikipedia.org/wiki/Approximate_string_matching)\n* [Natural Language Processing](https://en.wikipedia.org/wiki/Natural_language_processing)\n* [Machine learning](https://en.wikipedia.org/wiki/Machine_learning)\n\n## Installation\n\nYou can install **Talisman** through npm:\n\n```bash\nnpm install talisman\n```\n\n## Documentation\n\nThe library's full documentation can be found [here](http://yomguithereal.github.io/talisman/).\n\n## Goals\n\n* :package: **Modular**: the library is completely modular. This means that if you only need to compute a `levenshtein` distance, you will only load the relevant code.\n* :bulb: **Straightfoward & simple**: just want to compute a Jaccard index? No need to instantiate a class and use two methods to pass options and then finally succeed in getting the index. Just apply the `jaccard` function and get going.\n* :dango: **Consistent API**: the library's API is fully consistent and one should not struggle to understand how to apply two different distance metrics.\n* :postal_horn: **Functional**: except for cases where classes might be useful (classifiers notably), *Talisman* only uses functions, consumes raw data and order functions' arguments to make partial application & currying etc. as easy as possible.\n* :zap: **Performant**: the library should be as performant as possible for a high-level programming language library.\n* :globe_with_meridians: **Cross-platform**: the library is cross-platform and can be used both with Node.js and in the browser.\n\n## Contribution\n\nContributions are of course welcome :)\n\nBe sure to lint & pass the unit tests before submitting your pull request.\n\n```bash\n# Cloning the repo\ngit clone git@github.com:Yomguithereal/talisman.git\ncd talisman\n\n# Installing the deps\nnpm install\n\n# Running the tests\nnpm test\n\n# Linting the code\nnpm run lint\n```\n\n## License\n\nThis project is available as open source under the terms of the [MIT License](./LICENSE.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2A64:372D9:17D74E:5E3577:6AB92C14"},"text_sha256":"ff1d406c6e9cbeace7c66ebd6b21dc337ee563128ff9bbb328b8684816d7f3d7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2015","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:17F3235:1C190A6:6AB92C14"},"commit":{"sha":"86ae55cbd040ff021d05e282e0e6c71f2dde21f8","url":"https://github.com/Yomguithereal/talisman/commit/86ae55cbd040ff021d05e282e0e6c71f2dde21f8","date":"2021-05-05T13:41:54Z","author_date":"2021-05-05T13:41:54Z","committer_date":"2021-05-05T13:41:54Z","tree_sha":"d3cbf0255fe4db5551bf32afb232ac3b4661a175","message_first_line":"Upgrading deps"},"tree_request_status":200,"tree_rate":{"github_remaining":"2014","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0847:767EB:17FE7C3:1C24AE3:6AB92C14"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2684,"blob_sha":"bd3c7583267f152cd5286e3505b26e1b9872403a","priority":0}],"documents":[{"path":"README.md","size":2684,"blob_sha":"bd3c7583267f152cd5286e3505b26e1b9872403a","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/Yomguithereal/talisman.svg)](https://travis-ci.org/Yomguithereal/talisman) [![DOI](https://joss.theoj.org/papers/10.21105/joss.02405/status.svg)](https://doi.org/10.21105/joss.02405)\n\n# Talisman\n\n[Full documentation](https://yomguithereal.github.io/talisman/)\n\nTalisman is a JavaScript library collecting algorithms, functions and various building blocks for [fuzzy matching](https://en.wikipedia.org/wiki/Approximate_string_matching), [information retrieval](https://en.wikipedia.org/wiki/Information_retrieval) and [natural language processing](https://en.wikipedia.org/wiki/Natural_language_processing).\n\n## Installation\n\nYou can install **Talisman** through npm:\n\n```bash\nnpm install talisman\n```\n\n## Documentation\n\nThe library's full documentation can be found [here](https://yomguithereal.github.io/talisman/).\n\n## Bibliography\n\nAn extensive bibliography of the methods & functions implemented by the library can be found [here](./BIBLIOGRAPHY.md).\n\n## Goals\n\n* :package: **Modular**: the library is completely modular. This means that if you only need to compute a `levenshtein` distance, you will only load the relevant code.\n* :bulb: **Straightforward & simple**: just want to compute a Jaccard index? No need to instantiate a class and use two methods to pass options and then finally succeed in getting the index. Just apply the `jaccard` function and get going.\n* :dango: **Consistent API**: the library's API is fully consistent and one should not struggle to understand how to apply two different distance metrics.\n* :postal_horn: **Functional**: except for cases where classes might be useful (clustering notably), *Talisman* only uses functions, consumes raw data and order functions' arguments to make partial application & currying etc. as easy as possible.\n* :zap: **Performant**: the library should be as performant as possible for a high-level programming language library.\n* :globe_with_meridians: **Cross-platform**: the library is cross-platform and can be used both with Node.js and in the browser.\n\n## How to cite\n\n**Talisman** has been published as a [paper](https://joss.theoj.org/papers/10.21105/joss.02405) on the [Journal Of Open Source Software (JOSS)](https://joss.theoj.org/).\n\n## Contribution\n\nContributions are of course welcome :)\n\nBe sure to lint & pass the unit tests before submitting your pull request.\n\n```bash\n# Cloning the repo\ngit clone git@github.com:Yomguithereal/talisman.git\ncd talisman\n\n# Installing the deps\nnpm install\n\n# Running the tests\nnpm test\n\n# Linting the code\nnpm run lint\n```\n\n## License\n\nThis project is available as open source under the terms of the [MIT License](./LICENSE.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F0F0:3EACB:17B426:5E11A6:6AB92C11"},"text_sha256":"5a28d368e076816718cf4351f5981b17fd914c568c611226d82a2ab8b598e441"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"inception-project/inception","input_row":{"repository":"inception-project/inception","url":"https://github.com/inception-project/inception","name":"inception","owner":"inception-project","description":"INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":718,"issues":3384,"created_at":"2018-03-27T15:04:00Z","updated_at":"2026-09-27T13:36:09Z","first_commit_at":"2013-03-12T13:38:00Z","last_commit_at":"2026-09-27T13:36:03Z","activity_months":162.52000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:41.753Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"inception-project/inception","visibility":"public","created_at":"2018-03-27T15:04:00Z","updated_at":"2026-09-27T13:36:09Z","private":false,"fork":false,"archived":false,"stargazers_count":718,"open_issues_count":242,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"2013","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:179CA2E:1BC12A1:6AB92C15"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2012","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:1813A3E:1C39B87:6AB92C16"},"commit":{"sha":"ff7bc369ec663919d906a5ee9bc462b03c749a08","url":"https://github.com/inception-project/inception/commit/ff7bc369ec663919d906a5ee9bc462b03c749a08","date":"2018-05-24T22:03:03Z","author_date":"2018-05-24T22:03:03Z","committer_date":"2018-05-24T22:03:03Z","tree_sha":"98254cd6fb2546a376434b436928137c34f26fa7","message_first_line":"Merge pull request #956 from webanno/feature/955-correction-mode-broken"},"tree_request_status":200,"tree_rate":{"github_remaining":"2011","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A1:380E1C:17DC128:1C010B9:6AB92C16"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":626,"blob_sha":"bbb27cb2626b7389aba2684343fe42b0fdd5e5d6","priority":0},{"path":"webanno-webapp/src/main/resources/META-INF/preAuthSecurity-context.xml","size":3914,"blob_sha":"9a0584f2d46cb2a13b503e7f8d3374da1afc552e","priority":1},{"path":"webanno-webapp/src/main/resources/META-INF/security-context.xml","size":3697,"blob_sha":"8908e5702f83b4d85b4b34a3a19465f7c8800834","priority":1}],"documents":[{"path":"README.md","size":626,"blob_sha":"bbb27cb2626b7389aba2684343fe42b0fdd5e5d6","priority":0,"status":200,"text":"# WebAnno\n\n[![Build Status](https://zoidberg.ukp.informatik.tu-darmstadt.de:443/jenkins/job/WebAnno%20(GitHub)%20(master)/badge/icon)](https://zoidberg.ukp.informatik.tu-darmstadt.de:443/jenkins/job/WebAnno%20(GitHub)%20(master)/) [![Join the chat at https://gitter.im/webanno/webanno](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webanno/webanno?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nWebAnno is a general purpose web-based annotation tool for a wide range of linguistic annotations.\n\nFor more information, visit the [WebAnno website](https://webanno.github.io/webanno/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C908:3E724:181375:5E70B7:6AB92C15"},"text_sha256":"e2d0dac89197ace716ad327b61c95c5dc6bbfbb9d35139bc33e917259433a9d8"},{"path":"webanno-webapp/src/main/resources/META-INF/preAuthSecurity-context.xml","size":3914,"blob_sha":"9a0584f2d46cb2a13b503e7f8d3374da1afc552e","priority":1,"status":200,"text":"<!--\n    Copyright 2015\n    Ubiquitous Knowledge Processing (UKP) Lab\n    Technische Universität Darmstadt\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n-->\n<beans:beans \n    xmlns:beans=\"http://www.springframework.org/schema/beans\" \n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns=\"http://www.springframework.org/schema/security\"\n    xsi:schemaLocation=\"\n        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd\n        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd\">\n\n    <beans:bean class=\"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer\">\n        <beans:property name=\"ignoreUnresolvablePlaceholders\" value=\"true\" />\n        <beans:property name=\"ignoreResourceNotFound\" value=\"true\" />\n        <beans:property name=\"properties\">\n            <beans:props>\n                <beans:prop key=\"auth.preauth.header.principal\">remote_user<\/beans:prop>\n            <\/beans:props>\n        <\/beans:property>\n        <beans:property name=\"locations\">\n            <beans:list>\n                <!-- <value>classpath:META-INF/settings.properties<\/value> -->\n                <beans:value>file:#{systemProperties['webanno.home'] ?:\n                    systemProperties['user.home'].concat('/.webanno') }/settings.properties\n                <\/beans:value>\n            <\/beans:list>\n        <\/beans:property>\n    <\/beans:bean>\n\n    <http use-expressions=\"false\" entry-point-ref=\"http403EntryPoint\">\n        <csrf disabled=\"true\" />\n        <intercept-url pattern=\"/**\" access=\"ROLE_ADMIN, ROLE_USER\" />\n        <custom-filter ref=\"ShibbolethHeaderFilter\" position=\"PRE_AUTH_FILTER\" />\n    <\/http>\n    \n    <beans:bean id=\"http403EntryPoint\"\n        class=\"org.springframework.security.web.authentication.Http403ForbiddenEntryPoint\">\n\n    <\/beans:bean>\n    <beans:bean id=\"ShibbolethHeaderFilter\"\n        class=\"de.tudarmstadt.ukp.clarin.webanno.security.preauth.ShibbolethRequestHeaderAuthenticationFilter\">\n\n        <beans:property name=\"principalRequestHeader\" value=\"${auth.preauth.header.principal}\" />\n        <beans:property name=\"authenticationManager\" ref=\"authenticationManager\" />\n        <beans:property name=\"userDetailsManager\" ref=\"userDetailsService\" />\n        <beans:property name=\"userRepository\" ref=\"userRepository\" />\n        <beans:property name=\"exceptionIfHeaderMissing\" value=\"true\" />\n    <\/beans:bean>\n\n    <beans:bean id=\"preauthAuthProvider\"\n        class=\"org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider\">\n        <beans:property name=\"preAuthenticatedUserDetailsService\">\n            <beans:bean id=\"userDetailsServiceWrapper\"\n                class=\"org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper\">\n                <beans:property name=\"userDetailsService\" ref=\"userDetailsService\" />\n            <\/beans:bean>\n        <\/beans:property>\n    <\/beans:bean>\n\n    <authentication-manager alias=\"authenticationManager\">\n        <authentication-provider ref=\"preauthAuthProvider\" />\n    <\/authentication-manager>\n\n    <beans:bean id=\"userDetailsService\"\n        class=\"de.tudarmstadt.ukp.clarin.webanno.security.OverridableUserDetailsManager\">\n        <beans:property name=\"dataSource\" ref=\"dataSource\" />\n    <\/beans:bean>\n<\/beans:beans>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E0CA:40B0C:17E1FD:5E4034:6AB92C15"},"text_sha256":"e8e0df6d3a733403032d13ff1289019271489838ce2ad25796d8d63b190b4492"},{"path":"webanno-webapp/src/main/resources/META-INF/security-context.xml","size":3697,"blob_sha":"8908e5702f83b4d85b4b34a3a19465f7c8800834","priority":1,"status":200,"text":"<!--\n  Copyright 2012\n  Ubiquitous Knowledge Processing (UKP) Lab\n  Technische Universität Darmstadt\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n-->\n<beans xmlns=\"http://www.springframework.org/schema/beans\" \n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xmlns:security=\"http://www.springframework.org/schema/security\"\n  xsi:schemaLocation=\"\n      http://www.springframework.org/schema/beans \n      http://www.springframework.org/schema/beans/spring-beans-4.2.xsd\n\t    http://www.springframework.org/schema/security \n      http://www.springframework.org/schema/security/spring-security-4.2.xsd\">\n\n  <!-- <security:global-method-security secured-annotations=\"enabled\"/> -->\n  <security:global-method-security pre-post-annotations=\"enabled\" />\n\n  <!-- HTTP handler for the online documentation -->\n  <security:http pattern=\"/doc/**\">\n    <security:csrf disabled=\"true\" />\n    <security:remember-me />\n    <security:logout />\n    <security:intercept-url access=\"hasAnyRole('ROLE_ADMIN', 'ROLE_USER')\" pattern=\"/**\" />\n    <security:form-login login-page='/login.html' />\n  <\/security:http>\n\n  <!-- HTTP handler for the remote API -->\n  <security:http pattern=\"/api/**\" create-session=\"stateless\">\n    <security:csrf disabled=\"true\" />\n    <security:http-basic />\n    <security:intercept-url access=\"hasAnyRole('ROLE_REMOTE')\" pattern=\"/**\" />\n  <\/security:http>\n\n  <!-- HTTP handler for the main web application -->\n  <security:http auto-config=\"true\">\n    <security:csrf disabled=\"true\" />\n    <security:headers>\n      <security:frame-options policy=\"SAMEORIGIN\" />\n    <\/security:headers>\n    <security:remember-me />\n    <security:logout />\n    <security:intercept-url access=\"permitAll\" pattern=\"/login.html*\" />\n    <!-- \n      Resources need to be publicly accessible so they don't trigger the login page. Otherwise it\n      could happen that the user is redirected to a resource upon login instead of being forwarded\n      to a proper application page.\n    -->\n    <security:intercept-url access=\"permitAll\" pattern=\"/favicon.ico\" />\n    <security:intercept-url access=\"permitAll\" pattern=\"/assets/**\" />\n    <security:intercept-url access=\"permitAll\" pattern=\"/images/**\" />\n    <security:intercept-url access=\"permitAll\" pattern=\"/wicket/resource/**\" />\n    <security:intercept-url access=\"hasAnyRole('ROLE_ADMIN')\" pattern=\"/admin/**\" />\n    <security:intercept-url access=\"hasAnyRole('ROLE_ADMIN', 'ROLE_USER')\" pattern=\"/**\" />\n    <security:form-login login-page='/login.html' />\n  <\/security:http>\n\n  <bean id=\"securityContextPersistenceFilter\" \n    class=\"org.springframework.security.web.context.SecurityContextPersistenceFilter\" />\n\n  <security:authentication-manager alias=\"authenticationManager\">\n    <security:authentication-provider user-service-ref=\"userDetailsService\">\n      <security:password-encoder ref=\"passwordEncoder\" />\n    <\/security:authentication-provider>\n  <\/security:authentication-manager>\n\n  <bean id=\"userDetailsService\" \n    class=\"de.tudarmstadt.ukp.clarin.webanno.security.OverridableUserDetailsManager\">\n    <property name=\"dataSource\" ref=\"dataSource\" />\n    <property name=\"authenticationManager\" ref=\"authenticationManager\" />\n  <\/bean>\n<\/beans>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:171843:5D73B7:6AB92C15"},"text_sha256":"204381ee959327081226bdc51c75ebc5c6e41d07e9630fce09b28bde1d78155a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2010","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17CC7F9:1BF273E:6AB92C18"},"commit":{"sha":"4941748e68825df5619dfbdb49cfa7de65a81159","url":"https://github.com/inception-project/inception/commit/4941748e68825df5619dfbdb49cfa7de65a81159","date":"2026-06-27T19:37:32Z","author_date":"2026-06-27T19:37:32Z","committer_date":"2026-06-27T19:37:32Z","tree_sha":"c190be99c35bcdc8c507d04dd62de177a735a7e2","message_first_line":"Merge pull request #6144 from inception-project/feature/6143-Add-ready-to-use-EuroVoc-and-EU-Corporate-Bodies-knowledge-bases"},"tree_request_status":200,"tree_rate":{"github_remaining":"2009","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0819:180242:17FE3CB:1C23FEA:6AB92C18"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7514,"blob_sha":"41face0963a12b9e3b45cbe6741f896cfc1d839a","priority":0},{"path":"inception/inception-external-editor/src/main/java/de/tudarmstadt/ukp/inception/externaleditor/policy/DefaultHtmlDocumentPolicy.yaml","size":4033,"blob_sha":"a83bf57e288a4a7c3988398ad0ed6d4e8e107268","priority":1},{"path":"inception/inception-io-docx/src/main/java/de/tudarmstadt/ukp/inception/io/docx/DocxDocumentPolicy.yaml","size":3280,"blob_sha":"222dc40cae3c07854e6b8384cd5d92ab5a2be36f","priority":1},{"path":"inception/inception-io-tei/src/main/java/de/tudarmstadt/ukp/inception/io/tei/TeiXmlDocumentPolicy.yaml","size":3086,"blob_sha":"ef53aef42f9a2f0730c61ad49ca482bd5dc4ff01","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-auto-login.adoc","size":1965,"blob_sha":"c0c077f2557bf9a60fe68c3d5c5359310f2a048b","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-oauth2.adoc","size":6530,"blob_sha":"d3abb9790328e5ea411ae43fb382642131928c6a","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-policy.adoc","size":2626,"blob_sha":"800ec68125765ec9534745f36d5e6997d0eb0239","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-preauth.adoc","size":3416,"blob_sha":"f989a2c39ad581747721ad7207300da0a196d32b","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-saml2.adoc","size":6369,"blob_sha":"ec8d5bae400b741bed7eb345efb18ca437651d0a","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication.adoc","size":1441,"blob_sha":"51a364521684545a7cb1f9ce2f428d00e7d72859","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/settings_security-csp.adoc","size":3849,"blob_sha":"796ccd1d5f4339008575800cd2d53d609e3ee47b","priority":1},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/settings_security-policy.adoc","size":2637,"blob_sha":"e398e778bdf983f32195f2050f278718a9afd6a2","priority":1},{"path":"inception/inception-ui-core/src/main/resources/META-INF/asciidoc/admin-guide/security-login.adoc","size":1260,"blob_sha":"d087269443cbed10ad186d7f8084b835227f657f","priority":1}],"documents":[{"path":"README.md","size":7514,"blob_sha":"41face0963a12b9e3b45cbe6741f896cfc1d839a","priority":0,"status":200,"text":"<div align=\"center\">\n  <a href=\"https://inception-project.github.io/\">\n    <img width=\"471\" style=\"max-width:50%;\" src=\"inception/inception-doc/src/main/resources/META-INF/asciidoc/inception-logo.png\"  alt=\"INCEpTION Logo\"/>\n  <\/a>\n  <p>\n    A semantic annotation platform offering intelligent assistance and knowledge management.\n  <\/p>\n  <br/>\n  <p>\n    <a href=\"https://inception-project.github.io/\"><strong>Homepage<\/strong><\/a> ·\n    <a href=\"https://inception-project.github.io/documentation/latest/user-guide\"><strong>Usage<\/strong><\/a> ·\n    <a href=\"https://morbo.ukp.informatik.tu-darmstadt.de/demo\"><strong>Demo<\/strong><\/a>  ·  \n    <a href=\"https://inception-project.github.io/documentation/latest/user-guide#sect_faq\"><strong>FAQ<\/strong><\/a>\n  <\/p>\n  <p>\n\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/inception-project/inception)](https://github.com/inception-project/inception/releases/latest)\n[![GitHub license](https://img.shields.io/github/license/inception-project/inception)](https://github.com/inception-project/inception/blob/master/LICENSE.txt)\n[![Join the chat at https://gitter.im/inception-project/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/inception-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n  <\/p>\n\n<\/div>\n\n---\n\n# INCEpTION\n\nINCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.\nFor more information, visit the [INCEpTION website](https://inception-project.github.io/). For a first impression on\nwhat INCEpTION is, you may want to watch\nour [introduction videos](https://www.youtube.com/watch?v=Ely8eBKqiSI&list=PL5Hz5pttaj96SlXHGRZf8KzlYvpVHIoL-).\n\n<div align=\"center\" style=\"margin: 10px\">\n    <img src=\"https://inception-project.github.io/images/screenshot-annotation.png\" alt=\"INCEpTION Screenshot\" />\n<\/div>\n\nINCEpTION is a text-annotation environment useful for various kinds of annotation tasks on written text. Annotations are\nusually used for linguistic and/or machine learning concerns. INCEpTION is a web application in which several users can\nwork on the same annotation project, and it can contain several annotation projects at a time. It provides a *recommender system* \nthat suggest potential annotations to help you create annotations faster and easier. Beyond annotating, you can also *create a corpus*\nby searching an external document repository and adding documents. Moreover, you can use *knowledge bases*, e.g. for\ntasks like entity linking.\n\n## Getting started\n\nThe best way to get started is to\nwatch [our tutorial videos](https://www.youtube.com/watch?v=Ely8eBKqiSI&list=PL5Hz5pttaj96SlXHGRZf8KzlYvpVHIoL-),\nworking through\nthe [Getting Started Guide](https://inception-project.github.io/documentation/latest/user-guide#sect_core_funct) and\nplaying with INCEpTION on the [demo server](https://morbo.ukp.informatik.tu-darmstadt.de/demo).\n\n## See our documentation for further reading\n\n- **User Guide:** If you only use INCEpTION and do not develop it,\n  the [User Guide](https://inception-project.github.io/documentation/latest/user-guide#sect_core_funct) beginning right\n  after *Getting Started* is the guide of your choice. If it does not answer your questions, don’t hesitate to contact\n  us (see *Do you have questions or feedback?*).\n- **Admin Guide:** For information on how to set up INCEpTION for a group of users on a server and more installation\n  details, see the [Admin Guide](https://inception-project.github.io/documentation/latest/admin-guide).\n- **Developer Guide:** INCEpTION is open source. So if you would like to develop for it,\n  the [Developer Guide](https://inception-project.github.io/documentation/latest/developer-guide) might be interesting\n  for you.\n\nMany more materials like [example projects](https://inception-project.github.io/example-projects/)\n, [use case descriptions](https://inception-project.github.io/use-cases/)\nand [helpful scripts](https://inception-project.github.io/example-projects/python/) are available via the INCEpTION\nhomepage.\n\nWe also offer several Jupyter Notebooks which describe how you can interact in Python with INCEpTION, prepare or \npost-process annotations:\n\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inception-project/inception/blob/master/notebooks/annotations_as_one_sentence_and_label_per_line.ipynb) Export annotations as one sentence per line\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inception-project/inception/blob/master/notebooks/using_pretokenized_and_preannotated_text.ipynb) Use pre-tokenized and pre-annotated documents in INCEpTION\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inception-project/inception/blob/master/notebooks/annotated_word_files_to_cas_xmi.ipynb) Convert Word files to CAS XMI for import into INCEpTION\n- [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inception-project/inception/blob/master/notebooks/Working_with_INCEpTION_slot_features_in_DKPro_Cassis.ipynb) Working with INCEpTION slot features in DKPro Cassis\n- ... [more Python examples](https://inception-project.github.io/example-projects/python/)\n\n\n## Do you have questions or feedback?\n\nINCEpTION is still in development, so you are welcome to give us feedback and tell us your wishes and requirements.\n\n- For many questions, you find answers in the main documentation: [Core Functionalities](https://inception-project.github.io/documentation/latest/user-guide#sect_core_funct).\n- Consider our Google group [inception-users](https://groups.google.com/forum/#!forum/inception-users)\n- You can also open an issue on [Github](https://github.com/inception-project/inception/issues).\n\n## How to cite\n\nPlease use the following citation:\n\n    @inproceedings{klie-etal-2018-inception,\n        title = \"The {INCE}p{TION} Platform: Machine-Assisted and Knowledge-Oriented Interactive Annotation\",\n        author = \"Klie, Jan-Christoph and Bugert, Michael  and Boullosa, Beto and Eckart de Castilho, Richard and Gurevych, Iryna\",\n        booktitle = \"Proceedings of the 27th International Conference on Computational Linguistics: System Demonstrations\",\n        year = \"2018\",\n        address = \"Santa Fe, New Mexico\",\n        url = \"https://www.aclweb.org/anthology/C18-2002\",\n        pages = \"5--9\"\n    }\n\n## Contributing\n\nDo you miss a feature? We very much appreciate your contribution! Please open an issue before sending a pull request.\nINCEpTION uses the [DKPro Contribution Guidelines](https://dkpro.github.io/contributing).\n\n1. Create a fork\n2. Create your feature branch: `git checkout -b my-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request 🚀\n\n## License\n\nINCEpTION is provided as open source under the Apache License v2.0.\n\n---\n\n<div align=\"center\">\n<img height=\"50\" style=\"margin-right: 15px\" src=\"https://inception-project.github.io/images/logos/tud_logo.gif\">\n<img height=\"50\" style=\"margin-right: 15px\" src=\"https://inception-project.github.io/images/logos/ukp-lab.png\">\n<img height=\"50\" style=\"margin-right: 15px\" src=\"https://inception-project.github.io/images/logos/dfg_logo_schriftzug_blau_foerderung.jpg\">\n<\/div>\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF88:324E19:181062:5E6E99:6AB92C19"},"text_sha256":"36c866c82da44968feff3dd521e359d08882d0447282281e1c593173784bb6ef"},{"path":"inception/inception-external-editor/src/main/java/de/tudarmstadt/ukp/inception/externaleditor/policy/DefaultHtmlDocumentPolicy.yaml","size":4033,"blob_sha":"a83bf57e288a4a7c3988398ad0ed6d4e8e107268","priority":1,"status":200,"text":"# Licensed to the Technische Universität Darmstadt under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The Technische Universität Darmstadt\n# licenses this file to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: Default HTML policy\nversion: 1.0\ncase_sensitive: false\ndefault_attribute_action: DROP\ndefault_element_action: DROP\ndefault_namespace: http://www.w3.org/1999/xhtml\nmatch_without_namespace: true\ndebug: true\npolicies:\n  - action: PASS\n    elements: [\"html\", \"head\", \"body\", \"title\"]\n  # Content sectioning\n  - action: PASS\n    elements: [\"address\", \"article\", \"aside\", \"footer\", \"header\", \n               \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"main\", \"section\"]\n  # Navigaton sectioning (probably not relevant for annotation)\n  - action: PRUNE\n    elements: [\"nav\"]\n  # Text content\n  - action: PASS\n    elements: [\"blockquote\", \"dd\", \"div\", \"dl\", \"dt\", \"figcaption\", \"figure\", \"hr\", \"li\", \n               \"menu\", \"ol\", \"p\", \"pre\", \"ul\"]\n  # Links / anchors\n  - action: SKIP\n    elements: [\"a\"]\n  # Inline text semantics\n  - action: PASS\n    elements: [\"abbr\", \"b\", \"bdi\", \"bdo\", \"br\", \"cite\", \"code\", \"data\", \"dfn\",\n               \"em\", \"i\", \"kbd\", \"mark\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"small\",\n               \"span\", \"strong\", \"sub\", \"sup\", \"time\", \"u\", \"var\", \"wbr\"]\n  # Demarcating edits\n  - action: PASS\n    elements: [\"del\", \"ins\"]\n  # Table content\n  - action: PASS\n    elements: [\"caption\", \"col\", \"colgroup\", \"table\", \"tbody\", \"td\", \"tfoot\", \"th\",\n               \"thead\", \"tr\"]\n  - action: PASS\n    elements: [\"table-wrap\"]\n  - on_elements: [\"td\",\"th\"]\n    action: PASS\n    attributes: [\"colspan\", \"rowspan\"]\n  # Deprecated stuff\n  - action: PASS\n    elements: [\"font\", \"center\"]\n  - on_elements: [\"font\"]\n    action: PASS\n    attributes: [\"face\", \"size\"]\n  - action: PASS\n    attributes: [\"align\", \"size\", \"width\"]\n    # We leave out \"color\", \"bgcolor\" because they could interfere with the annotation highlights\n  # Common attributes\n  - action: PASS\n    attributes: [\"title\"]\n    matching: \"[\\\\p{L}\\\\p{N}\\\\s\\\\-_',:\\\\[\\\\]!\\\\./\\\\\\\\\\\\(\\\\)&]*\"\n  - action: PASS\n    attributes: [\"class\"]\n    matching: \"[a-zA-Z0-9\\\\s,\\\\-_]+\"\n  # Data attributes\n  - action: PASS\n    attribute_patterns: [\"data-.*\"]\n    matching: \"[a-zA-Z0-9\\\\s,\\\\-_]+\"\n  # Images - depending on the security configurations, the safety net may block these\n  - action: PASS\n    elements: [\"img\"]\n  - action: PASS\n    elements: [\"img-wrap\"]\n  - on_elements: [\"img\"]\n    action: PASS\n    attributes: [\"decoding\", \"alt\", \"width\", \"height\"]\n  - on_elements: [\"img\"]\n    action: PASS\n    attributes: [\"src\"]\n    matching: \"res[?]resId=.*\" # Allow only access to embedded resources\n  # Audio - depending on the security configurations, the safety net may block these\n  - action: PASS\n    elements: [\"audio\"]\n  - on_elements: [\"audio\"]\n    action: PASS\n    attributes: [\"controls\", \"controlslist\", \"loop\", \"muted\", \"preload\", \"autoplay\"]\n  - on_elements: [\"audio\"]\n    action: PASS\n    attributes: [\"src\"]\n    matching: \"res[?]resId=.*\" # Allow only access to embedded resources\n  # Video - depending on the security configurations, the safety net may block these\n  - action: PASS\n    elements: [\"video\", \"source\"]\n  - on_elements: [\"video\"]\n    action: PASS\n    attributes: [\"autoplay\", \"controls\", \"height\", \"loop\", \"muted\", \"preload\", \"width\"]\n  - on_elements: [\"video\"]\n    action: PASS\n    attributes: [\"src\"]\n    matching: \"res[?]resId=.*\" # Allow only access to embedded resources\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4378:3BCC6:17D7DD:5E35EA:6AB92C19"},"text_sha256":"2ba0bdded4d4e216063957f807dafae77cef221316683f2a3f19bb533ee4a069"},{"path":"inception/inception-io-docx/src/main/java/de/tudarmstadt/ukp/inception/io/docx/DocxDocumentPolicy.yaml","size":3280,"blob_sha":"222dc40cae3c07854e6b8384cd5d92ab5a2be36f","priority":1,"status":200,"text":"# Licensed to the Technische Universität Darmstadt under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The Technische Universität Darmstadt\n# licenses this file to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nname: DOCX XML policy\nversion: 1.0\ncase_sensitive: false\ndefault_attribute_action: DROP\ndefault_element_action: DROP\ndebug: true\npolicies:\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}document\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}body\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}sectPr\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}p\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}r\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pPr\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}numPr\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}spacing\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}numId\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ilvl\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rFonts\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pStyle\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tbl\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}gridCol\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tr\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tc\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}b\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}bCs\"], action: PASS }\n  - { elements: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}jc\"], action: PASS }\n  - { attributes: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}paraId\"], action: PASS }\n  - { attributes: [\"{http://schemas.openxmlformats.org/wordprocessingml/2006/main}val\"], action: PASS }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A96E:4F9CC:171874:5D7423:6AB92C19"},"text_sha256":"00838e4df742a240caf8d743e22dec308211519347e357ab4f189268ebbcc7cd"},{"path":"inception/inception-io-tei/src/main/java/de/tudarmstadt/ukp/inception/io/tei/TeiXmlDocumentPolicy.yaml","size":3086,"blob_sha":"ef53aef42f9a2f0730c61ad49ca482bd5dc4ff01","priority":1,"status":200,"text":"# Licensed to the Technische Universität Darmstadt under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The Technische Universität Darmstadt\n# licenses this file to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nname: TEI XML policy\nversion: 1.0\ncase_sensitive: false\ndefault_attribute_action: DROP\ndefault_element_action: DROP\ndefault_namespace: http://www.tei-c.org/ns/1.0\ndebug: true\npolicies:\n  - elements: [ \"teiHeader\" ]\n    action: PRUNE\n  - elements: [\n      \"TEI\",\n      \"head\",\n      \"front\",\n      \"back\",\n      \"body\",\n      \"div\",\n      \"text\",\n      \"titlePage\"\n      ]\n    action: PASS\n  - elements: [\n      \"l\",\n      \"lb\",\n      \"lg\",\n      \"s\",\n      \"p\",\n      \"sp\",\n      \"speaker\",\n      \"stage\",\n      \"castList\",\n      \"castItem\"\n    ]\n    action: PASS\n  - elements: [\n      \"row\",\n      \"cell\",\n      \"table\",\n    ]\n    action: PASS\n  - elements: [\n      \"b\",\n      \"i\",\n      \"ex\"\n    ]\n    action: PASS\n  - elements: [\n      \"pb\",\n      \"hi\",\n      \"fw\",\n      \"quote\",\n      \"sic\",\n      \"note\",\n      \"role\",\n      \"roleDesc\",\n      \"docTitle\",\n      \"titlePart\",\n      \"docImprint\",\n      \"docAuthor\",\n      \"pubPlace\",\n      \"publisher\",\n      \"docDate\",\n      \"dateLine\",\n      \"list\",\n      \"item\",\n      \"opener\",\n      \"closer\",\n      \"salute\",\n      \"supplied\",\n      \"gap\",\n      \"figure\",\n      \"cit\",\n      \"choice\",\n      \"corr\",\n      \"space\",\n      \"byline\",\n      \"cb\",\n      \"ref\",\n      \"milestone\",\n      \"formula\",\n      \"trailer\",\n      \"reg\",\n      \"orig\",\n      \"add\",\n      \"del\",\n      \"metamark\",\n      \"unclear\",\n      \"addrLine\",\n      \"address\",\n      \"date\",\n      \"figDesc\",\n      \"graphic\",\n      \"idno\",\n      \"label\",\n      \"org\",\n      \"rs\",\n      \"title\",\n      \"tok\"\n    ]\n    action: PASS\n  - elements: [\n      \"analytic\",\n      \"author\",\n      \"listBibl\",\n      \"listOrg\",\n      \"biblScope\",\n      \"biblStruct\",\n      \"forename\",\n      \"surname\",\n      \"orgName\",\n      \"persName\",\n      \"meeting\",\n      \"monogr\",\n      \"imprint\"\n    ]\n    action: PASS\n  - { attributes: [\"fform\", \"nform\"],  on_elements: [\"tok\"], action: \"PASS\" }\n  - { attributes: [\"class\", \"type\"], action: \"PASS\" }\n  - { attributes: [\"place\", \"n\"], on_elements: [\"note\"], action: \"PASS\" }\n  - { attributes: [\"n\"], on_elements: [\"pb\"], action: \"PASS\" }\n  - { attributes: [\"type\", \"place\"], on_elements: [\"fw\"], action: \"PASS\" }\n  - { attributes: [\"rendition\", \"unit\"], on_elements: [\"milestone\"], action: \"PASS\" }\n  - { attributes: [\"rendition\", \"rend\"], on_elements: [\"hi\"], action: \"PASS\" }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE72:3E1C8:17F31B:5E504D:6AB92C1A"},"text_sha256":"ed726dceb0b5c29a16518dd01a5eecf5bcf7ab17c90637740fb870db0fef734f"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-auto-login.adoc","size":1965,"blob_sha":"c0c077f2557bf9a60fe68c3d5c5359310f2a048b","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_auto_authentication_login]]\n= Auto-login\n\nWhen configuring the application for SAML/OAuth2, the user will still be required to choose an identity\nprovider via the login page (and is also given the opportunity to log in via form-based login there).\n\nIf you would like to automatically login through a particular SAML identity provider, you\ncan configure this by setting the `security.auto-login` property to the registration ID of the\nrespective provider that you configured using the `spring.security.saml2.relyingparty.registration....` or `spring.security.oauth2.client...` properties.\n\nThis setting is useful for single-sign-on scenarios where only a single identity provider is used.\n\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n      \n| `security.login.auto-login`\n| Auto-login using given identity provider\n| _<none>_\n| `inception-client` (cf. example above)\n\n|===\n\nNOTE: In case it may be necessary to bypass the auto-login, e.g. to allow signing in via credentials,\n      navigate to `.../login.html?skipAutoLogin=true`. Make sure to do this in a fresh browser session that is\n      not yet logged into the application.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4904:40B0C:17E233:5E40BD:6AB92C17"},"text_sha256":"97b1bca3e8ca98639a0eb262029b2e4f4880c7268fb68c7ee5b759db7f4f69e5"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-oauth2.adoc","size":6530,"blob_sha":"d3abb9790328e5ea411ae43fb382642131928c6a","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication_oauth2]]\n= OAuth2/OIDC authentication\n\n{product-name} can authenticate a user against a OAuth2/OIDC-compatible identity provider. OAuth2/OIDC providers can be configured alongside the usual form-based login and SAML2. \nIt is **not** compatible with the <<sect_security_authentication_preauth,external pre-authentication>> and does not require setting the `auth.mode` property.\n\nThe following example configuration declares an OAuth2 service connection named `inception-client-oauth`\nwhich uses a Keycloak instance configured for OAuth2 running at \n`http://localhost:8180/realms/inception-demo`. The OAuth2 support of {product-name} should work with\nany OAuth2/OIDC-compatible identity provider. For more details, please\nrefer to the link:https://docs.spring.io/spring-security/reference/servlet/oauth2/client/authorization-grants.html[Spring Security OAuth2 documentation].\n\n.Example: Authenticate against a local Keycloak\n----\nspring.security.oauth2.client.registration.inception-client-oauth.client-name=Keycloak\nspring.security.oauth2.client.registration.inception-client-oauth.client-id=inception-client-oauth\nspring.security.oauth2.client.registration.inception-client-oauth.client-secret=ENCRYPTED_CLIENT_SECRET\nspring.security.oauth2.client.registration.inception-client-oauth.scope=openid, profile\nspring.security.oauth2.client.registration.inception-client-oauth.authorization-grant-type=authorization_code\nspring.security.oauth2.client.registration.inception-client-oauth.redirect-uri=http://localhost:8080/login/oauth2/code/inception-client-oauth\nspring.security.oauth2.client.provider.inception-client-oauth.issuer-uri=http://localhost:8180/realms/inception-demo \nspring.security.oauth2.client.provider.inception-client-oauth.user-name-attribute=preferred_username\n----\n\nNOTE: The following instructions run Keycloak in development mode. This is **not** meant for\n      production, only for testing. For how to properly set up a production-level Keycloak server, please\n      refer to the official documentation of Keycloak.\n\nIf you want to try this with a local testing instance of Keycloak, you can do this:\n\n* Download link:https://www.keycloak.org[Keycloak]\n* Run it using `./kc.sh start-dev --http-port 8180`\n* Configure a new realm called `inception-demo`\n* Define a new client `inception-client-oauth` and set the *Valid redirection URI* to `http://localhost:8080/login/oauth2/code/inception-client-oauth`.\n* Replace the `ENCRYPTED_CLIENT_SECRET` in the example configuration above with the client secret from \n  the *Credentials* tab of the client in Keycloak.\n* Add a new user in the *Manage users* area in Keycloak.\n\nWhen you restart {product-name} and access the login page now, it should offer a login option called\n*Keycloak*. You can change the label of that option by changing the \n`security.oauth2.client.registration.inception-client-oauth.client-name` setting.\n\n[[sect_security_authentication_oauth2_role_mapping]]\n== Group-to-role mapping\n\nBy default, every user that successfully authenticates via OAuth2/OIDC receives `ROLE_USER` and can\nlog in. Additional {product-name} roles (`ROLE_ADMIN`, `ROLE_PROJECT_CREATOR`, `ROLE_REMOTE`) must\nthen be assigned manually by an administrator inside the application.\n\nAlternatively, {product-name} can derive roles automatically from an OIDC token claim (typically\nnamed `groups`) by mapping group names to {product-name} roles. This is configured with the\n`security.oauth2.roles.*` properties.\n\nNOTE: When group-to-role mapping is disabled (the default), roles assigned manually by an\n      administrator are preserved across logins. Enabling group-to-role mapping means that roles\n      are re-derived from the OIDC token on every login, so any manually assigned roles will be\n      overwritten.\n\n.Group-to-role mapping properties\n[cols=\"2,1,3\"]\n|===\n| Property | Default | Description\n\n| `security.oauth2.roles.enabled`\n| `false`\n| Set to `true` to activate group-to-role mapping. When disabled, all authenticated users receive `ROLE_USER` regardless of their group memberships.\n\n| `security.oauth2.roles.claim`\n| `groups`\n| Name of the OIDC token claim that contains the user's group memberships.\n\n| `security.oauth2.roles.admin`\n| (none)\n| Group name (or path) that grants `ROLE_ADMIN`.\n  Note that `ROLE_ADMIN` does **not** imply `ROLE_USER`.\n  An admin who also needs to use the application as a regular user must be placed in both the admin group and the user group.\n\n| `security.oauth2.roles.user`\n| (none)\n| Group name (or path) that grants `ROLE_USER`.\n\n| `security.oauth2.roles.project-creator`\n| (none)\n| Group name (or path) that grants `ROLE_PROJECT_CREATOR`.\n\n| `security.oauth2.roles.remote`\n| (none)\n| Group name (or path) that grants `ROLE_REMOTE`.\n|===\n\nNOTE: When `security.oauth2.roles.enabled=true` and a user's token does not match any configured\ngroup, login is denied with an access-denied error.\n\nThe following example maps Keycloak group paths (which include a leading `/`) to {product-name}\nroles. The `groups` claim must be configured as a protocol mapper on the Keycloak client.\n\n.Example: Map Keycloak groups to {product-name} roles\n----\nsecurity.oauth2.roles.enabled=true\nsecurity.oauth2.roles.claim=groups\nsecurity.oauth2.roles.admin=/INCEPTION_ADMIN\nsecurity.oauth2.roles.user=/INCEPTION_USER\nsecurity.oauth2.roles.project-creator=/INCEPTION_PROJECT_CREATOR\nsecurity.oauth2.roles.remote=/INCEPTION_REMOTE\n----\n\nNOTE: Keycloak group claims use the full group path (e.g. `/INCEPTION_ADMIN`), not just the group\n      name. Other identity providers may use plain group names without the leading `/`. Check the\n      actual claim value in the token issued by your provider and set the properties accordingly.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A0F4:3A3DD:1798B7:5DF703:6AB92C17"},"text_sha256":"319b2f2736a3cc3b4fef11f53a9d0ae6a49dc069beade5204901fb44a8c8b952"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-policy.adoc","size":2626,"blob_sha":"800ec68125765ec9534745f36d5e6997d0eb0239","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication_policy]]\n= Policy\n\nYou have several options of configuring which types of usernames and passwords are accepted.\nNote that these values are only enforced when creating new users or updating passwords. They\nwill not invalidate existing usernames or passwords. Length restrictions and patterns are checked\nindependently. If either fails, the username or password is rejected.\n\nNOTE: When external pre-authentication is used, these settings are ignored.\n\nNOTE: In addition to the restrictions imposed here, {product-name} may impose additional restrictions.\n      E.g. certain usernames are not allowed and certain characters are also not allowed to appear in usernames.\n\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n  \n| `security.minimum-password-length`\n| Minimum number of characters a password can have\n| 8\n| (max 128)\n\n| `security.maximum-password-length`\n| Maximum number of characters a password can have\n| 32\n| (max 128)\n\n| `security.minimum-username-length`\n| Minimum number of characters a username can have\n| 4\n| (max 128)\n\n| `security.maximum-username-length`\n| Maximum number of characters a username can have\n| 64\n| (max 128)\n\n| `security.username-pattern`\n| Regular expression for valid usernames\n| `.*`\n| `[a-zA-Z0-9]+`\n\n| `security.password-pattern`\n| Regular expression for valid passwords\n| `.*`\n| `(?=.\\*[a-z])(?=.*[A-Z])(?=.\\*[0-9])(?=.*\\p{Punct}).*`\n\n| `security.space-allowed-in-username`\n| Whether simple space characters are permitted in usernames. Enable this option only when necessary to restore access to existing accounts in certain scenarios such as when using external authentication. Usernames with spaces may lead to problems e.g. when exporting/importing projects or documents or when constructing certain URLs.\n| `false`\n| `true`\n|===\n\n      ","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4222:2C474:180A24:5E685A:6AB92C1B"},"text_sha256":"52fd277ceaac7a549a52e1e1a99c707ba56ce2f1579ff999596113a44606c732"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-preauth.adoc","size":3416,"blob_sha":"f989a2c39ad581747721ad7207300da0a196d32b","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication_preauth]]\n= External pre-authentication\n\n{product-name} can be used in conjunction with header-based external per-authentication. In this mode,\nthe application looks for a special HTTP header (by default `remote_user`) and if that header exists, \nit is taken for granted that this user has been authenticated. The application will check its internal\ndatabase if a user by the given name exists, otherwise it will create the user.\n\nPre-authentication can be enabled by setting the property `auth.mode` to `preauth`. When enabling\npre-authentication mode, the default roles for new users can be controlled using the \n`auth.preauth.newuser.roles` property. The `ROLE_USER` is always added, even if not specified\nexplicitly. Adding also the role `ROLE_PROEJCT_CREATOR` allows all auto-created users also to\ncreate their own projects. \n\nSince the default administrator user is not created in pre-authentication, it is useful to also\ndeclare at least one user as an administrator. This is done through the property \n`auth.user.<username>.roles` where `<username>` must be replaced with the name of the user.\nThe example below shows how the user *Franz* is given administrator permissions.\n\nIn order to log out, one can specify an URL to redirect to after the session is cleared on the side\nof {product-name}.\n\n.Example: Authenticate using the `remote_user` header, new users can create projects, user *Franz* is always admin.\n----\nauth.mode                     = preauth\nauth.preauth.header.principal = remote_user\nauth.preauth.newuser.roles    = ROLE_PROJECT_CREATOR\nauth.user.Franz.roles         = ROLE_ADMIN\n----\n\nNOTE: The roles specified through `auth.preauth.newuser.roles` are saved in the database when a\n      user logs in for the first time and can be changed after creation through the user interface.\n      \nNOTE: The roles added through `auth.user.<username>.roles` properties are *not* saved in the\n      database and *cannot* be edited through the user interface.\n\n\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n      \n| `auth.mode`\n| Authentication mode\n| `database`\n| `preauth`\n\n| `auth.preauth.header.principal`\n| Principal header\n| `remote_user`\n| _some other header_\n\n| `auth.preauth.newuser.roles`\n| Default roles for new users (comma separated)\n| _<none>_\n| `ROLE_PROJECT_CREATOR`\n\n| `auth.preauth.logoutUrl`\n| URL to call after logging out to also sign out of external authentication\n| _<none>_\n| `https://your-idp.com/Shibboleth.sso/Logout`\n\n| `auth.user._<username>_.roles`\n| Extra roles for user (comma separated)\n| _<none>_\n| `ROLE_ADMIN`\n\n|===\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1014:3BCC6:17D7EA:5E361B:6AB92C16"},"text_sha256":"ca3e53529860027ea760ab9c63b057d71baa6dafe6b8b4c1c8b8e77a7e439346"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication-saml2.adoc","size":6369,"blob_sha":"ec8d5bae400b741bed7eb345efb18ca437651d0a","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication_saml2]]\n= SAML authentication\n\n{product-name} can authenticate a user against a SAML2-compatible identity provider. SAML\nproviders can be configured alongside the usual form-based login and OAuth2. \nIt is **not** compatible with the <<sect_security_authentication_preauth,external pre-authentication>>\nand does not require setting the `auth.mode` property.\n\nThe following example configuration declares a SAML2 service connection named `inception-client-saml`\nwhich uses a Keycloak instance configured for SAML2 running at \n`http://localhost:8180/realms/inception-demo`. The SAML support of {product-name} should work with\nany SAML2-compatible identity provider. For more details, please\nrefer to the link:https://docs.spring.io/spring-security/reference/servlet/saml2/index.html[Spring Security SAML2 documentation].\n\n.Example: Authenticate against a local Keycloak\n----\nspring.security.saml2.relyingparty.registration.inception-client-saml.assertingparty.entity-id=http://localhost:8180/realms/inception-demo\nspring.security.saml2.relyingparty.registration.inception-client-saml.assertingparty.verification.credentials[0].certificate-location=file:/srv/inception/keycloak-saml-idp.crt\nspring.security.saml2.relyingparty.registration.inception-client-saml.assertingparty.singlesignon.url=http://localhost:8180/realms/inception-demo/protocol/saml\nspring.security.saml2.relyingparty.registration.inception-client-saml.assertingparty.singlesignon.sign-request=false\n----\n\nNOTE: The following instructions run Keycloak in development mode. This is **not** meant for\n      production, only for testing. For how to properly set up a production-level Keycloak server, please\n      refer to the official documentation of Keycloak.\n\nIf you want to try this with a local testing instance of Keycloak, you can do this:\n\n* Download link:https://www.keycloak.org[Keycloak]\n* Run it using `./kc.sh start-dev --http-port 8180`\n* Configure a new realm called `inception-demo`\n* Define a new client and in the client wizard set\n** Client ID: `http://localhost:8080/saml2/service-provider-metadata/inception-client-saml` \n** Client protocol: `saml`\n** Save the client\n* Set *Valid redirection URI* to `http://localhost:8080/login/saml2/sso/*`.\n* Set *Client signature Required* to `Off`\n* Add a new user in the *Manage users* area in Keycloak.\n\nThe `keycloak-saml-idp.crt` file needs to be constructed by you. Once the configuration is complete\nin Keycloak, you can access `http://localhost:8180/realms/inception-demo/protocol/saml/descriptor` to obtain\nan XML file which contains the certificate in the `ds:X509Certificate` element. You need to copy this\ncertificate string (usually staring with `MIIC` into a text file with the following structure:\n\n.Certificate file structure\n----\n-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----\n----\n\nSave this file at the location indicated by the `....verification.credentials.certificate-location` key, \n(here `/srv/inception/keycloak-saml-idp.crt`).\n\nWhen you restart {product-name} and access the login page now, it should offer a login option called\n*inception-client-saml*. The SAML authentication does not allow defining the provider name shown on the login page independently from the registration ID. The registration ID (here `inception-client-saml`) is defined in between the `registration`\nand `assertingparty` parts of the configuration keys.\n\n== Client certificate (optional)\n\nYou can provide {product-name} with a certificate so the IdP can verify that authentication requests are\nreally coming from it.\n\n* First, we generate a certificate and a key file using (we are using a 2048-bit key here, but you might care\nto use a longer key)\n+ \n----\nopenssl req -x509 -newkey rsa:2048 -keyout /srv/inception/inception.key -out /srv/inception/inception.crt -sha256 -days 365 -nodes -subj \"/CN=inception-demo\"\n----\n* In order to upload these, both need to be in one PEM file, so we concatenate the two files:\n+\n----\ncat /srv/inception/inception-saml.key /srv/inception/inception-saml.crt > /srv/inception/inception-saml.pem\n----\n* Open the previously defined client in Keycloak (e.g. `http://localhost:8080/saml2/service-provider-metadata/inception-client-saml`)\n* Set *Client signature Required* to `On` and save the settings\n* Now a new tab *Keys* should appear at the top. Switch to it.\n* Click on *Import* and select *PEM* as the format, then upload the file `/srv/inception/inception.pem`\n* Enable request signing in the `settings.properties` file\n+\n----\nspring.security.saml2.relyingparty.registration.inception-client-saml.assertingparty.singlesignon.sign-request=true\n----\n* Configure the certificates for {product-name} to sign its requests\n+\n----\nspring.security.saml2.relyingparty.registration.inception-client-saml.signing.credentials[0].private-key-location=file:/srv/inception/inception-saml.key\nspring.security.saml2.relyingparty.registration.inception-client-saml.signing.credentials[0].certificate-location=file:/srv/inception/inception-saml.crt\n----\n\n== Troubleshooting\n\nCertain SAML IdPs like Microsoft Azure AD (Entra ID) may only offer HTTP POST binding for SAML responses.\nTo allow these IdPs to work with {product-name}, you can add the following lines to your `settings.properties`:\n\n```\nserver.servlet.session.cookie.same-site=none\nserver.servlet.session.cookie.secure=true\n```\n\nAlternatively, consider using OAuth/OIDC (which does not require these settings to be made) or consider using a\ndifferent IdP like e.g. Keycloak which supports HTTP Redirect binding for the SAML response.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9552:386840:18676F:5EC605:6AB92C1B"},"text_sha256":"e680d4448d25bb0e32335a5a66da4ab3e2acbfab60bdcb26fb530e397b2895d6"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/security-authentication.adoc","size":1441,"blob_sha":"51a364521684545a7cb1f9ce2f428d00e7d72859","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication]]\n= Authentication\n\nThis section describes the different authentication mechanisms supported by {product-name}.\n\nNOTE: A user can only log in through one mechanism, either as a local user or an external user.\n      If you are using SAML/OAuth2, then the users are bound to one particular IdP. If a user with the same\n      name tries to log in via another mechanism or IdP, the login will be rejected. If you plan to use\n      multiple login mechanisms or IdPs at the same time, you must ensure that the user IDs are unique\n      across all the mechanisms and IdPs or that a given user always uses the same login mechanism.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9EE:1A3D83:186FF7:5ECEF7:6AB92C1B"},"text_sha256":"f4b7d29d061559b35124201d8f4cc22ee7b83e8dceab9b87b5f7158efc1a7ca9"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/settings_security-csp.adoc","size":3849,"blob_sha":"796ccd1d5f4339008575800cd2d53d609e3ee47b","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_csp]]\n= Content Security Policy (CSP)\n\nThis section describes how to adjust the Content Security Policy (CSP) of {product-name}.\nThis may be necessary to enable/disable the ability to display images or media (audio/video) embedded to or referenced\nfrom documents.\n\n{product-name} by default allows loading content from its own host (`'self'`) and content embedded into the documents themselves (`data:`).\nAdditional sources can be added using the properties described below.\n\nThe Content Security Policy (CSP) are sent to the browser and interpreted by the browser.\n\n.Content Security Policy (CSP) properties\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n  \n| `security.csp.allowed-image-sources`\n| URLs from which images can be loaded\n| *none*\n| `https://upload.wikimedia.org`\n\n| `security.csp.allowed-media-sources`\n| URLs from which media (audio/video) can be loaded\n| *none*\n| `https://upload.wikimedia.org`\n\n| `security.csp.allowed-frame-ancestors`\n| URLs which can embed {product-name} in IFrames\n| *none*\n| `https://my-domain.com/embedding-application`\n|===\n\nRelated to the CSP settings are the content policy setting for the HTML-based annotation editors and related formats such as MHTML or HTML (ZIP).\nThese allow enabling/disabling the filtering of images, audio, video and other related HTML tags.\n\n* `NONE` configures the content filter to strip out the respective element while rendering. It will not reach the browser.\n* `LOCAL` configures the content filter to allow the element to only access content embedded in the document. This allows\n  accessing content embedded in MHTML or HTML (ZIP) files.\n* `ANY` disables the filter for this element and allows any content to be loaded (CORS still applies).\n\nNote that the `src` attribute of the `img`, `audio` and `video` elements must be used to reference the content.\nChild `source` elements inside `img`, `audio` and `video` are not supported.\n\nThese filters are applied on the server side.\n\nNOTE: By default, loading content embedded in documents is allowed so that users of {product-name} can easily get started\n      working with multi-modal documents. However, security-conscious system administrators may wish to enable all the \n      `block-XXX` properties and to set the allowed sources to `NONE`.\n\n.Editor content policy properties\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n  \n| `ui.external.block-img`\n| Whether to remove HTML `<img>` tags during rendering.\n| `false`\n| `true`\n\n| `ui.external.allow-img-source`\n| Where to allow loading images from.\n| `LOCAL`\n| `NONE`, `ANY`\n\n| `ui.external.block-audio`\n| Whether to remove HTML `<audio>` tags during rendering.\n| `false`\n| `true`\n\n| `ui.external.allow-audio-sources`\n| Where to allow loading audio files from.\n| `LOCAL`\n| `NONE`, `ANY`\n\n| `ui.external.block-video`\n| Whether to remove HTML `<video>` tags during rendering.\n| `false`\n| `true`\n\n| `ui.external.allow-video-sources`\n| Where to allow loading video files from.\n| `LOCAL`\n| `NONE`, `ANY`\n|===\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:173007:5D8E42:6AB92C1C"},"text_sha256":"c34a18c16b021550b19b724e3026a0a789c293509800e39720b9862a1b22f24c"},{"path":"inception/inception-security/src/main/resources/META-INF/asciidoc/admin-guide/settings_security-policy.adoc","size":2637,"blob_sha":"e398e778bdf983f32195f2050f278718a9afd6a2","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n[[sect_security_authentication_policy]]\n= Security policies\n\nYou have several options of configuring which types of usernames and passwords are accepted.\nNote that these values are only enforced when creating new users or updating passwords. They\nwill not invalidate existing usernames or passwords. Length restrictions and patterns are checked\nindependently. If either fails, the username or password is rejected.\n\nNOTE: When external pre-authentication is used, these settings are ignored.\n\nNOTE: In addition to the restrictions imposed here, {product-name} may impose additional restrictions.\n      E.g. certain usernames are not allowed and certain characters are also not allowed to appear in usernames.\n\n[cols=\"4*\", options=\"header\"]\n|===\n| Setting\n| Description\n| Default\n| Example\n  \n| `security.minimum-password-length`\n| Minimum number of characters a password can have\n| 8\n| (max 128)\n\n| `security.maximum-password-length`\n| Maximum number of characters a password can have\n| 32\n| (max 128)\n\n| `security.minimum-username-length`\n| Minimum number of characters a username can have\n| 4\n| (max 128)\n\n| `security.maximum-username-length`\n| Maximum number of characters a username can have\n| 64\n| (max 128)\n\n| `security.username-pattern`\n| Regular expression for valid usernames\n| `.*`\n| `[a-zA-Z0-9]+`\n\n| `security.password-pattern`\n| Regular expression for valid passwords\n| `.*`\n| `(?=.\\*[a-z])(?=.*[A-Z])(?=.\\*[0-9])(?=.*\\p{Punct}).*`\n\n| `security.space-allowed-in-username`\n| Whether simple space characters are permitted in usernames. Enable this option only when necessary to restore access to existing accounts in certain scenarios such as when using external authentication. Usernames with spaces may lead to problems e.g. when exporting/importing projects or documents or when constructing certain URLs.\n| `false`\n| `true`\n|===\n\n      ","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7034:3CC8A:17E189:5E404F:6AB92C1B"},"text_sha256":"0533e66c814066f4174541064150efe3650a1e19b5bd7868e96748b932866a0d"},{"path":"inception/inception-ui-core/src/main/resources/META-INF/asciidoc/admin-guide/security-login.adoc","size":1260,"blob_sha":"d087269443cbed10ad186d7f8084b835227f657f","priority":1,"status":200,"text":"// Licensed to the Technische Universität Darmstadt under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The Technische Universität Darmstadt\n// licenses this file to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n= Limiting the amount of active users\n\nIt is possible to limit the number of users that can be active i.e. logged into the {product-name}\ninstance at a time. This can be done by setting the `login.max-concurrent-sessions` \nin the `settings.properties` file to the number of users you want to allow. \n\nIf this property is set and the maximum number of users is already reached, users who \nwant to log in will not be able to and receive a message to try again at a later time.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E1CC:3BF56:1761A6:5DC04C:6AB92C1B"},"text_sha256":"89cf8234a29d3a7e5f42c74fa6dae5901edb6ac117cf40417d4d23d0ea2dd495"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"jubatus/jubatus","input_row":{"repository":"jubatus/jubatus","url":"https://github.com/jubatus/jubatus","name":"jubatus","owner":"jubatus","description":"Framework and Library for Distributed Online Machine Learning","language":"C++","license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1","license_osi_approved":"true","stars":706,"issues":696,"created_at":"2011-10-25T17:24:50Z","updated_at":"2026-09-07T07:55:40Z","first_commit_at":"2011-10-25T17:43:21Z","last_commit_at":"2019-05-16T05:18:26Z","activity_months":90.650000000000006,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:49.988Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"jubatus/jubatus","visibility":"public","created_at":"2011-10-25T17:24:50Z","updated_at":"2026-09-07T07:55:40Z","private":false,"fork":false,"archived":false,"stargazers_count":706,"open_issues_count":4,"license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1"},"error":"","rate":{"github_remaining":"2008","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F8:6E5BD:17A5166:1BC9BFF:6AB92C1E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2007","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17F3A56:1C19A19:6AB92C1E"},"commit":{"sha":"ca7135211ba05030b1851f55cf4dcbb27bb80e32","url":"https://github.com/jubatus/jubatus/commit/ca7135211ba05030b1851f55cf4dcbb27bb80e32","date":"2018-04-23T07:45:35Z","author_date":"2018-04-23T07:45:35Z","committer_date":"2018-04-23T07:45:35Z","tree_sha":"3b778cdefa0613abe68520034f28187ae0d52663","message_first_line":"Merge branch 'master' into develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"2006","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17E66B9:1C0C9AE:6AB92C1E"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2965,"blob_sha":"a44b6abfea30008beaa2172992d6fe6c0346d636","priority":0}],"documents":[{"path":"README.rst","size":2965,"blob_sha":"a44b6abfea30008beaa2172992d6fe6c0346d636","priority":0,"status":200,"text":"Jubatus\n=======\n\n.. image:: https://api.travis-ci.org/jubatus/jubatus.svg?branch=master\n    :target: https://api.travis-ci.org/jubatus/jubatus\n\nThe Jubatus library is an online machine learning framework which runs in distributed environment.\n\nSee http://jubat.us/ for details.\n\nQuick Start\n-----------\n\nWe officially support Red Hat Enterprise Linux (RHEL) 6.2 or later (64-bit) and Ubuntu Server 14.04 LTS / 16.04 LTS (64-bit).\nOn supported systems, you can install all components of Jubatus using binary packages.\n\nSee `QuickStart <http://jubat.us/en/quickstart.html>`_ for detailed description.\n\nRed Hat Enterprise Linux 6.2 or later (64-bit)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRun the following command to register Jubatus Yum repository to the system.\n\n::\n\n  // For RHEL 6\n  $ sudo rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-2.el6.x86_64.rpm\n\n  // For RHEL 7\n  $ sudo rpm -Uvh http://download.jubat.us/yum/rhel/7/stable/x86_64/jubatus-release-7-2.el7.x86_64.rpm\n\nThen install ``jubatus`` and ``jubatus-client`` package.\n\n::\n\n  $ sudo yum install jubatus jubatus-client\n\nNow Jubatus is installed in ``/usr/bin/juba*``.\n\n::\n\n  $ jubaclassifier -f /usr/share/jubatus/example/config/classifier/pa.json\n\nUbuntu Server (64-bit)\n~~~~~~~~~~~~~~~~~~~~~~\n\nWrite the following line to ``/etc/apt/sources.list.d/jubatus.list`` to register Jubatus Apt repository to the system.\n\n::\n\n  // For Ubuntu 12.04 (Precise) - Deprecated (unsupported)\n  deb http://download.jubat.us/apt/ubuntu/precise binary/\n\n  // For Ubuntu 14.04 (Trusty)\n  deb http://download.jubat.us/apt/ubuntu/trusty binary/\n\n  // For Ubuntu 16.04 (Xenial)\n  deb http://download.jubat.us/apt/ubuntu/xenial binary/\n\nNow install ``jubatus`` package.\n\n::\n\n  $ sudo apt-get update\n  $ sudo apt-get install jubatus\n\nNow Jubatus is installed in ``/opt/jubatus/bin/juba*``.\n\n::\n\n  $ source /opt/jubatus/profile\n  $ jubaclassifier -f /opt/jubatus/share/jubatus/example/config/classifier/pa.json\n\nOther Platforms\n~~~~~~~~~~~~~~~\n\nFor other platforms, refer to the `documentation <http://jubat.us/en/developers/build.html>`_.\n\nLicense\n-------\n\nLGPL 2.1\n\nThird-party libraries included in Jubatus\n-----------------------------------------\n\nJubatus source tree includes following third-party library.\n\n- cmdline_ (under BSD 3-Clause License)\n\n.. _cmdline: https://github.com/tanakh/cmdline\n\nJubatus requires `jubatus_core <https://github.com/jubatus/jubatus_core/>`_ library. jubatus_core contains Eigen and fork of pficommon. Eigen is licensed under MPL2 (partially in LGPL 2.1 or 2.1+). The fork of pficommon is licensed under New BSD License.\n\nUpdate history\n--------------\n\nUpdate history can be found from `ChangeLog <https://github.com/jubatus/jubatus/blob/master/ChangeLog.rst>`_ or `WikiPage <https://github.com/jubatus/jubatus/wiki/ChangeLog>`_.\n\nContributors\n------------\n\nPatches contributed by `those people <https://github.com/jubatus/jubatus/contributors>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"69B6:3D501:185992:5EB867:6AB92C1E"},"text_sha256":"485f9777933e7d9458ddcffeb0902f202aec704fb3aecf18a047ac8854afdc57"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2005","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17DCF66:1C02F52:6AB92C1F"},"commit":{"sha":"1251ce551bac980488a6313728e72b3fe0b79a9f","url":"https://github.com/jubatus/jubatus/commit/1251ce551bac980488a6313728e72b3fe0b79a9f","date":"2019-05-16T05:18:26Z","author_date":"2019-05-16T05:18:26Z","committer_date":"2019-05-16T05:18:26Z","tree_sha":"6449e3afb13ceb8105d69285a3807496142a1d2a","message_first_line":"Add the probot-stale bot configuration"},"tree_request_status":200,"tree_rate":{"github_remaining":"2004","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EB:71F98:184038C:1C65E88:6AB92C1F"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3081,"blob_sha":"d10009b04e6458c541ebe60a3dbd6f41469683f7","priority":0}],"documents":[{"path":"README.rst","size":3081,"blob_sha":"d10009b04e6458c541ebe60a3dbd6f41469683f7","priority":0,"status":200,"text":"Jubatus\n=======\n\n.. image:: https://api.travis-ci.org/jubatus/jubatus.svg?branch=master\n    :target: https://api.travis-ci.org/jubatus/jubatus\n\nThe Jubatus library is an online machine learning framework which runs in distributed environment.\n\nSee http://jubat.us/ for details.\n\nQuick Start\n-----------\n\nWe officially support Red Hat Enterprise Linux (RHEL) 6.2 or later (64-bit) and Ubuntu Server 14.04 LTS / 16.04 LTS / 18.04 LTS (64-bit).\nOn supported systems, you can install all components of Jubatus using binary packages.\n\nSee `QuickStart <http://jubat.us/en/quickstart.html>`_ for detailed description.\n\nRed Hat Enterprise Linux 6.2 or later (64-bit)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRun the following command to register Jubatus Yum repository to the system.\n\n::\n\n  // For RHEL 6\n  $ sudo rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-2.el6.x86_64.rpm\n\n  // For RHEL 7\n  $ sudo rpm -Uvh http://download.jubat.us/yum/rhel/7/stable/x86_64/jubatus-release-7-2.el7.x86_64.rpm\n\nThen install ``jubatus`` and ``jubatus-client`` package.\n\n::\n\n  $ sudo yum install jubatus jubatus-client\n\nNow Jubatus is installed in ``/usr/bin/juba*``.\n\n::\n\n  $ jubaclassifier -f /usr/share/jubatus/example/config/classifier/pa.json\n\nUbuntu Server (64-bit)\n~~~~~~~~~~~~~~~~~~~~~~\n\nWrite the following line to ``/etc/apt/sources.list.d/jubatus.list`` to register Jubatus Apt repository to the system.\n\n::\n\n  // For Ubuntu 12.04 (Precise) - Deprecated (unsupported)\n  deb http://download.jubat.us/apt/ubuntu/precise binary/\n\n  // For Ubuntu 14.04 (Trusty)\n  deb http://download.jubat.us/apt/ubuntu/trusty binary/\n\n  // For Ubuntu 16.04 (Xenial)\n  deb http://download.jubat.us/apt/ubuntu/xenial binary/\n\n  // For Ubuntu 18.04 (Bionic)\n  deb [trusted=yes] http://download.jubat.us/apt/ubuntu/bionic/binary /\n\nNow install ``jubatus`` package.\n\n::\n\n  $ sudo apt-get update\n  $ sudo apt-get install jubatus\n\nNow Jubatus is installed in ``/opt/jubatus/bin/juba*``.\n\n::\n\n  $ source /opt/jubatus/profile\n  $ jubaclassifier -f /opt/jubatus/share/jubatus/example/config/classifier/pa.json\n\nOther Platforms\n~~~~~~~~~~~~~~~\n\nFor other platforms, refer to the `documentation <http://jubat.us/en/developers/build.html>`_.\n\nLicense\n-------\n\nLGPL 2.1\n\nThird-party libraries included in Jubatus\n-----------------------------------------\n\nJubatus source tree includes following third-party library.\n\n- cmdline_ (under BSD 3-Clause License)\n\n.. _cmdline: https://github.com/tanakh/cmdline\n\nJubatus requires `jubatus_core <https://github.com/jubatus/jubatus_core/>`_ library. jubatus_core contains Eigen and fork of pficommon. Eigen is licensed under MPL2 (partially in LGPL 2.1 or 2.1+). The fork of pficommon is licensed under New BSD License.\n\nUpdate history\n--------------\n\nUpdate history can be found from `ChangeLog <https://github.com/jubatus/jubatus/blob/master/ChangeLog.rst>`_ or `WikiPage <https://github.com/jubatus/jubatus/wiki/ChangeLog>`_.\n\nContributors\n------------\n\nPatches contributed by `those people <https://github.com/jubatus/jubatus/contributors>`_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B84:3B1F3:185773:5EB70B:6AB92C20"},"text_sha256":"7d9119e43d81e1795cc1201f45b8dcf2545ffa04407df073e007ec070a704cd8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fatiando/verde","input_row":{"repository":"fatiando/verde","url":"https://github.com/fatiando/verde","name":"verde","owner":"fatiando","description":"Processing and gridding spatial data, machine-learning style","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":670,"issues":152,"created_at":"2018-04-25T23:21:08Z","updated_at":"2026-09-14T05:25:59Z","first_commit_at":"2018-04-26T03:36:28Z","last_commit_at":"2026-08-04T17:41:26Z","activity_months":99.299999999999997,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:52.892Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fatiando/verde","visibility":"public","created_at":"2018-04-25T23:21:08Z","updated_at":"2026-09-14T05:25:59Z","private":false,"fork":false,"archived":false,"stargazers_count":670,"open_issues_count":46,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"2003","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BC:228A99:17F3C67:1C19C5E:6AB92C20"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2002","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FA:380E1C:17DCA54:1C01B45:6AB92C21"},"commit":{"sha":"2e592c3ef9b43935cbbb81a5f59faa90f14263ee","url":"https://github.com/fatiando/verde/commit/2e592c3ef9b43935cbbb81a5f59faa90f14263ee","date":"2018-05-24T22:01:25Z","author_date":"2018-05-24T22:01:25Z","committer_date":"2018-05-24T22:01:25Z","tree_sha":"5456a60c0ab8fbb635f49c641ba979b79eda0ae8","message_first_line":"Example of weights in BlockReduce (#62)"},"tree_request_status":200,"tree_rate":{"github_remaining":"2001","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:17A0B30:1BC685A:6AB92C21"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5572,"blob_sha":"33b38a46396231c41043711bee79d87189bd0e15","priority":0}],"documents":[{"path":"README.rst","size":5572,"blob_sha":"33b38a46396231c41043711bee79d87189bd0e15","priority":0,"status":200,"text":"Verde\n=====\n\n**Processing and gridding spatial data using Green's functions**\n\n`Documentation <http://www.fatiando.org/verde/dev>`_ |\n`Install <http://www.fatiando.org/verde/dev/install.html>`_ |\n`Gallery <http://www.fatiando.org/verde/dev/gallery>`_ |\n`API <http://www.fatiando.org/verde/dev/api>`_ |\n`Contact <https://gitter.im/fatiando/fatiando>`_\n\n.. image:: http://img.shields.io/pypi/v/verde.svg?style=flat-square\n    :alt: Latest version on PyPI\n    :target: https://pypi.python.org/pypi/verde\n.. image:: http://img.shields.io/travis/fatiando/verde/master.svg?style=flat-square&label=TravisCI\n    :alt: Travis CI build status\n    :target: https://travis-ci.org/fatiando/verde\n.. image:: https://img.shields.io/codecov/c/github/fatiando/verde/master.svg?style=flat-square\n    :alt: Test coverage status\n    :target: https://codecov.io/gh/fatiando/verde\n.. image:: https://img.shields.io/codeclimate/maintainability/fatiando/verde.svg?style=flat-square\n    :alt: Code quality status\n    :target: https://codeclimate.com/github/fatiando/verde\n.. image:: https://img.shields.io/codacy/grade/6b698defc0df47288a634930d41a9d65.svg?style=flat-square&label=codacy\n    :alt: Code quality grade on codacy\n    :target: https://www.codacy.com/app/leouieda/verde\n.. image:: https://img.shields.io/pypi/pyversions/verde.svg?style=flat-square\n    :alt: Compatible Python versions.\n    :target: https://pypi.python.org/pypi/verde\n.. image:: https://img.shields.io/gitter/room/fatiando/fatiando.svg?style=flat-square\n    :alt: Chat room on Gitter\n    :target: https://gitter.im/fatiando/fatiando\n\n\nDisclaimer\n----------\n\n**This package in early stages of design and implementation.**\n\nWe welcome any feedback and ideas!\nLet us know by submitting\n`issues on Github <https://github.com/fatiando/verde/issues>`__\nor send us a message on our\n`Gitter chatroom <https://gitter.im/fatiando/fatiando>`__.\n\n\nAbout\n-----\n\nVerde is a Python library for processing spatial data (bathymetry, geophysics\nsurveys, etc) and interpolating it on regular grids (i.e., *gridding*).\n\nMost gridding methods in Verde use a Green's functions approach.\nA linear model is estimated based on the input data and then used to predict\ndata on a regular grid (or in a scatter, a profile, as derivatives).\nThe models are Green's functions from (mostly) elastic deformation theory.\nThis approach is very similar to *machine learning* so we implement gridder\nclasses that are similar to `scikit-learn <http://scikit-learn.org/>`__\nregression classes.\nThe API is not 100% compatible but it should look familiar to those with some\nscikit-learn experience.\n\nAdvantages of using Green's functions include:\n\n* Easily apply **weights** to data points. This is a linear least-squares\n  problem.\n* Perform **model selection** using established machine learning techniques,\n  like k-fold or holdout cross-validation.\n* The estimated model can be **easily stored** for later use, like\n  spherical-harmonic coefficients are used in gravimetry.\n\n\nProject goals\n-------------\n\n* Provide a machine-learning inspired interface for Green's functions gridding\n  of spatial data\n* Integration with the Scipy stack: numpy, pandas (for xyz data), and xarray\n  (for grids)\n* Include functions for common processing and data preparation tasks, like\n  blocked means and medians\n* Support for gridding scalar and vector data (like wind speed or GPS\n  velocities)\n* Support for both Cartesian and geographic coordinates\n\n\nContacting Us\n-------------\n\n* Most discussion happens `on Github <https://github.com/fatiando/verde>`__.\n  Feel free to `open an issue\n  <https://github.com/fatiando/verde/issues/new>`__ or comment\n  on any open issue or pull request.\n* We have `chat room on Gitter <https://gitter.im/fatiando/fatiando>`__\n  where you can ask questions and leave comments.\n\n\nContributing\n------------\n\nCode of conduct\n+++++++++++++++\n\nPlease note that this project is released with a\n`Contributor Code of Conduct <https://github.com/fatiando/verde/blob/master/CODE_OF_CONDUCT.md>`__.\nBy participating in this project you agree to abide by its terms.\n\nContributing Guidelines\n+++++++++++++++++++++++\n\nPlease read our\n`Contributing Guide <https://github.com/fatiando/verde/blob/master/CONTRIBUTING.md>`__\nto see how you can help and give feedback.\n\nImposter syndrome disclaimer\n++++++++++++++++++++++++++++\n\n**We want your help.** No, really.\n\nThere may be a little voice inside your head that is telling you that you're\nnot ready to be an open source contributor; that your skills aren't nearly good\nenough to contribute.\nWhat could you possibly offer?\n\nWe assure you that the little voice in your head is wrong.\n\n**Being a contributor doesn't just mean writing code**.\nEquality important contributions include:\nwriting or proof-reading documentation, suggesting or implementing tests, or\neven giving feedback about the project (including giving feedback about the\ncontribution process).\nIf you're coming to the project with fresh eyes, you might see the errors and\nassumptions that seasoned contributors have glossed over.\nIf you can write any code at all, you can contribute code to open source.\nWe are constantly trying out new skills, making mistakes, and learning from\nthose mistakes.\nThat's how we all improve and we are happy to help others learn.\n\n*This disclaimer was adapted from the*\n`MetPy project <https://github.com/Unidata/MetPy>`__.\n\n\nLicense\n-------\n\nThis is free software: you can redistribute it and/or modify it under the terms\nof the **BSD 3-clause License**. A copy of this license is provided in\n``LICENSE.txt``.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D7E:3CC8A:17E1CA:5E4112:6AB92C1D"},"text_sha256":"15beb46e5ff7eb05af03c10cb91dba146cf57681f6fbc95cdeae4788ef42fe5f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"2000","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0801:6C6ED:17FB65E:1C20FD7:6AB92C22"},"commit":{"sha":"bf3b3ab8576b5240dc0d1c378a32346dd606b5f6","url":"https://github.com/fatiando/verde/commit/bf3b3ab8576b5240dc0d1c378a32346dd606b5f6","date":"2026-04-28T16:27:14Z","author_date":"2026-04-28T16:27:14Z","committer_date":"2026-04-28T16:27:14Z","tree_sha":"c344699467a3ee9feafa942c4f025dfbfd400ed0","message_first_line":"Bump conda-incubator/setup-miniconda from 3 to 4 (#552)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1999","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0887:3203A7:17A0C40:1BC6997:6AB92C23"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4589,"blob_sha":"f1e645c22ee335ff52e078a90977a91ebe813545","priority":0}],"documents":[{"path":"README.md","size":4589,"blob_sha":"f1e645c22ee335ff52e078a90977a91ebe813545","priority":0,"status":200,"text":"<h1><img src=\"https://github.com/fatiando/verde/raw/main/doc/_static/readme-banner.png\" alt=\"Verde\"><\/h1>\n\n<p align=\"center\"><strong>Processing and gridding spatial data, machine-learning style<\/strong><\/p>\n\n<p align=\"center\">\n<a href=\"https://www.fatiando.org/verde\"><strong>Documentation<\/strong> (latest)<\/a> •\n<a href=\"https://www.fatiando.org/verde/dev\"><strong>Documentation<\/strong> (development)<\/a> •\n<a href=\"https://github.com/fatiando/verde/blob/main/CONTRIBUTING.md\"><strong>Contribute<\/strong><\/a> •\n<a href=\"https://www.fatiando.org/contact/\"><strong>Contact<\/strong><\/a> •\n<a href=\"https://github.com/orgs/fatiando/discussions\"><strong>Ask a question<\/strong><\/a> •\n<a href=\"https://www.fatiando.org/verde/latest/citing.html\"><strong>Cite<\/strong><\/a>\n<\/p>\n\n<p align=\"center\">\nPart of the <a href=\"https://www.fatiando.org\"><strong>Fatiando a Terra<\/strong><\/a> project\n<\/p>\n\n<p align=\"center\">\n<a href=\"https://pypi.python.org/pypi/verde\"><img src=\"http://img.shields.io/pypi/v/verde.svg?style=flat-square\" alt=\"Latest version on PyPI\"><\/a>\n<a href=\"https://github.com/conda-forge/verde-feedstock\"><img src=\"https://img.shields.io/conda/vn/conda-forge/verde.svg?style=flat-square\" alt=\"Latest version on conda-forge\"><\/a>\n<a href=\"https://codecov.io/gh/fatiando/verde\"><img src=\"https://img.shields.io/codecov/c/github/fatiando/verde/main.svg?style=flat-square\" alt=\"Test coverage status\"><\/a>\n<a href=\"https://pypi.python.org/pypi/verde\"><img src=\"https://img.shields.io/pypi/pyversions/verde.svg?style=flat-square\" alt=\"Compatible Python versions.\"><\/a>\n<a href=\"https://doi.org/10.21105/joss.00957\"><img src=\"https://img.shields.io/badge/doi-10.21105%2Fjoss.00957-blue?style=flat-square\" alt=\"DOI used to cite this software\"><\/a>\n<\/p>\n\n## About\n\n**Verde** is a Python library for processing spatial data (topography, point\nclouds, bathymetry, geophysics surveys, etc) and interpolating them on a 2D\nsurface (i.e., gridding) with a hint of machine learning.\n\nOur core interpolation methods are inspired by machine-learning.\nAs such, Verde implements an interface that is similar to the popular\n[scikit-learn](https://scikit-learn.org/) library.\nWe also provide other analysis methods that are often used in combination with\ngridding, like trend removal, blocked/windowed operations, cross-validation,\nand more!\n\n## Project goals\n\n* Provide a machine-learning inspired interface for gridding spatial data\n* Integration with the Scipy stack: numpy, pandas, scikit-learn, and xarray\n* Include common processing and data preparation tasks, like blocked means and 2D trends\n* Support for gridding scalar and vector data (like wind speed or GPS velocities)\n* Support for both Cartesian and geographic coordinates\n\n## Project status\n\n**Verde is stable and ready for use!**\nThis means that we are careful about introducing backwards incompatible changes\nand will provide ample warning when doing so. Upgrading minor versions of Verde\nshould not require making changes to your code.\n\nThe first major release of Verde was focused on meeting most of these initial\ngoals and establishing the look and feel of the library.\nLater releases will focus on expanding the range of gridders available,\noptimizing the code, and improving algorithms so that larger-than-memory\ndatasets can also be supported.\n\n## Getting involved\n\n🗨️ **Contact us:**\nFind out more about how to reach us at\n[fatiando.org/contact](https://www.fatiando.org/contact/).\n\n👩🏾‍💻 **Contributing to project development:**\nPlease read our\n[Contributing Guide](https://github.com/fatiando/verde/blob/main/CONTRIBUTING.md)\nto see how you can help and give feedback.\n\n🧑🏾‍🤝‍🧑🏼 **Code of conduct:**\nThis project is released with a\n[Code of Conduct](https://github.com/fatiando/community/blob/main/CODE_OF_CONDUCT.md).\nBy participating in this project you agree to abide by its terms.\n\n> **Imposter syndrome disclaimer:**\n> We want your help. **No, really.** There may be a little voice inside your\n> head that is telling you that you're not ready, that you aren't skilled\n> enough to contribute. We assure you that the little voice in your head is\n> wrong. Most importantly, **there are many valuable ways to contribute besides\n> writing code**.\n>\n> *This disclaimer was adapted from the*\n> [MetPy project](https://github.com/Unidata/MetPy).\n\n## License\n\nThis is free software: you can redistribute it and/or modify it under the terms\nof the **BSD 3-clause License**. A copy of this license is provided in\n[`LICENSE.txt`](https://github.com/fatiando/verde/blob/main/LICENSE.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"60F8:3E1DA:179FB6:5DFEE7:6AB92C22"},"text_sha256":"bc46070ce000d78b1f1b115c6e23dd583db3ca3e055d2d4759a206c9c81fe42f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"CornellNLP/ConvoKit","input_row":{"repository":"CornellNLP/ConvoKit","url":"https://github.com/CornellNLP/ConvoKit","name":"ConvoKit","owner":"CornellNLP","description":"ConvoKit is a toolkit for extracting conversational features and analyzing social phenomena in conversations. It includes several large conversational datasets along with scripts exemplifying the use of the toolkit on these datasets.","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":649,"issues":113,"created_at":"2016-03-14T19:04:22Z","updated_at":"2026-09-12T21:18:30Z","first_commit_at":"2016-03-14T19:04:22Z","last_commit_at":"2026-07-01T00:44:12Z","activity_months":123.53,"ai_ml_match_topics":"machine-learning; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:55.831Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"CornellNLP/ConvoKit","visibility":"public","created_at":"2016-03-14T19:04:22Z","updated_at":"2026-09-12T21:18:30Z","private":false,"fork":false,"archived":false,"stargazers_count":649,"open_issues_count":38,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1998","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FD:37D6E2:1818D24:1C3EE68:6AB92C23"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1997","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0890:74E6D:180FF7C:1C362A8:6AB92C24"},"commit":{"sha":"c0331df6d65daa3672bc92f513f4ac202f3fa689","url":"https://github.com/CornellNLP/ConvoKit/commit/c0331df6d65daa3672bc92f513f4ac202f3fa689","date":"2018-05-24T19:35:25Z","author_date":"2018-05-24T19:35:25Z","committer_date":"2018-05-24T19:35:25Z","tree_sha":"278467d5da33ad23b559b6ad09d594de92c644fa","message_first_line":"for some reason the text got cut off in the last commit"},"tree_request_status":200,"tree_rate":{"github_remaining":"1996","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:1809213:1C2EA7B:6AB92C24"},"tree_truncated":false,"document_candidates":[{"path":"README.html","size":2682,"blob_sha":"2fa335a59dff0ccd8379caec3a492eab2787791c","priority":0},{"path":"README.md","size":2555,"blob_sha":"2dca52415cfb4616845e1d4059a0a6afc7a0a7b1","priority":0}],"documents":[{"path":"README.html","size":2682,"blob_sha":"2fa335a59dff0ccd8379caec3a492eab2787791c","priority":0,"status":200,"text":"<h1 id=\"cornell-conversational-analysis-toolkit\">Cornell Conversational Analysis Toolkit<\/h1>\n<p>This toolkit contains tools to extract conversational features and analyze social phenomena in conversations.  Several large <a href=\"http://zissou.infosci.cornell.edu/socialkit/datasets/\">conversational datasets<\/a> are included together with scripts exemplifying the use of the toolkit on these datasets.<\/p>\n<p>The toolkit currently implements features for:<\/p>\n<ul>\n<li><p><a href=\"http://localhost:8000/Coordination_README.html\">Linguistic coordination<\/a>, a measure of relative power between individuals or groups based on their use of function words (see the <a href=\"https://www.cs.cornell.edu/~cristian/Echoes_of_power.html\">Echoes of Power<\/a> paper)<\/p>\n<\/li>\n<li><p><a href=\"http://localhost:8000/QuestionTypology_README.html\">Question typology<\/a>, a method for extracting surface motifs that recur in questions, and for grouping them according to their latent rhetorical role (see the <a href=\"http://www.cs.cornell.edu/~cristian/Asking_too_much.html\">Asking too much<\/a> paper)<\/p>\n<\/li>\n<li><p>Coming soon: Politeness, currently available here: <a href=\"https://github.com/sudhof/politeness\">Politeness API<\/a><\/p>\n<\/li>\n<li><p>Coming soon: Basic message and turn features, currently available here <a href=\"https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit/tree/constructive/cornellversation/constructive\">Constructive conversations<\/a><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"code\">Code<\/h2>\n<p>The code for the toolkit can be found <a href=\"https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit\">here<\/a>.<\/p>\n<h2 id=\"usage\">Usage<\/h2>\n<p>The toolkit requires Python 3. Run <code>python3 setup.py install<\/code> to install the package.<br>Use <code>import convokit<\/code> to import it into your project.<br>Detailed installation and usage examples are also provided on the specific pages dedicated to each function of this toolkit.<\/p>\n<h2 id=\"documentation\">Documentation<\/h2>\n<p>Documentation is hosted <a href=\"http://zissou.infosci.cornell.edu/socialkit/documentation/\">here<\/a>.<\/p>\n<p>The documentation is built with <a href=\"http://www.sphinx-doc.org/en/1.5.1/\">Sphinx<\/a> (<code>pip3 install sphinx<\/code>). To build it yourself, navigate to <code>doc/<\/code> and run <code>make html<\/code>. <\/p>\n<h2 id=\"acknowledgements\">Acknowledgements<\/h2>\n<p>Andrew Wang (azw7@cornell.edu)  wrote the Coordination code and the respective example script, wrote the heper functions and designed the structure of the toolkit.<\/p>\n<p>Ishaan Jhaveri (iaj8@cornell.edu) refactored the Question Typology code and wrote the respective example scripts.<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:17D84C:5E3760:6AB92C23"},"text_sha256":"31d8666f3471c85d8bdbf934eb3bc76a4f7c27fbea5b673090b91312525d3cdd"},{"path":"README.md","size":2555,"blob_sha":"2dca52415cfb4616845e1d4059a0a6afc7a0a7b1","priority":0,"status":200,"text":"# Cornell Conversational Analysis Toolkit\nThis toolkit contains tools to extract conversational features and analyze social phenomena in conversations.  Several large [conversational datasets](http://zissou.infosci.cornell.edu/socialkit/datasets/) are included together with scripts exemplifying the use of the toolkit on these datasets.\n\nThe toolkit currently implements features for:\n\n- [Linguistic coordination](https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit/blob/master/QuestionTypology_README.md), a measure of relative power between individuals or groups based on their use of function words (see the [Echoes of Power](https://www.cs.cornell.edu/~cristian/Echoes_of_power.html) paper)\n  \n- [Question typology](https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit/blob/master/QuestionTypology_README.md), a method for extracting surface motifs that recur in questions, and for grouping them according to their latent rhetorical role (see the [Asking too much](http://www.cs.cornell.edu/~cristian/Asking_too_much.html) paper)\n\n- Coming soon: [Convesations gone awry](http://www.cs.cornell.edu/~cristian/Conversations_gone_awry.html)\n\n- Coming soon: Politeness, currently available here: [Politeness API](https://github.com/sudhof/politeness)\n\n- Coming soon: Basic message and turn features, currently available here [Constructive conversations](https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit/tree/constructive/cornellversation/constructive)\n\n## Code\nThe code for the toolkit can be found [here](https://github.com/CornellNLP/Cornell-Conversational-Analysis-Toolkit).\n\n## Usage\n\n**Installation**\n1. Install or use `Python 3`.\n2. Run `python3 setup.py install` to install the package.\n3. Run `python -m spacy download en`\n\n**Use**\n\nUse `import convokit` to import it into your project.\n\nDetailed installation and usage examples are also provided on the specific pages dedicated to each function of this toolkit.\n\n## Documentation\nDocumentation is hosted [here](http://zissou.infosci.cornell.edu/socialkit/documentation/).\n\nThe documentation is built with [Sphinx](http://www.sphinx-doc.org/en/1.5.1/) (`pip3 install sphinx`). To build it yourself, navigate to `doc/` and run `make html`. \n\n## Acknowledgements\n\nAndrew Wang (azw7@cornell.edu)  wrote the Coordination code and the respective example script, wrote the heper functions and designed the structure of the toolkit.\n\nIshaan Jhaveri (iaj8@cornell.edu) refactored the Question Typology code and wrote the respective example scripts.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"682E:09ED:E5E0C:3F76D0:6AB92C23"},"text_sha256":"10a1b2a8a0ff032c5c12fa949b368837e7e6c7a59b5c8f9ea5abf34592dad0b1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1995","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:1800014:1C26241:6AB92C25"},"commit":{"sha":"7825beeca5ce43b00a9402d9a6773514613eb923","url":"https://github.com/CornellNLP/ConvoKit/commit/7825beeca5ce43b00a9402d9a6773514613eb923","date":"2026-06-28T04:18:13Z","author_date":"2026-06-28T04:18:13Z","committer_date":"2026-06-28T04:18:13Z","tree_sha":"db0aa5450f74f1c53c33cb39adc0e623abe30872","message_first_line":"Forecaster demo selector bug fix (#354)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1994","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:181C039:1C41C77:6AB92C25"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":34991,"blob_sha":"973c1dd766e60dae479774a97c894bf08aff04a0","priority":0},{"path":"docs/source/decisionpolicy.rst","size":2439,"blob_sha":"3de1e255d830284d149ad9fcc1a2592d87de55b5","priority":1}],"documents":[{"path":"README.md","size":34991,"blob_sha":"973c1dd766e60dae479774a97c894bf08aff04a0","priority":0,"status":200,"text":"# [ConvoKit](http://convokit.cornell.edu/)\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-37-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n[![pypi](https://img.shields.io/pypi/v/convokit.svg)](https://pypi.org/pypi/convokit/)\n[![py\\_versions](https://img.shields.io/badge/python-3.10%2B-blue)](https://pypi.org/pypi/convokit/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/CornellNLP/ConvoKit/blob/master/LICENSE.md)\n[![Discord Community](https://img.shields.io/static/v1?logo=discord&style=flat&color=red&label=discord&message=community)](https://discord.gg/WMFqMWgz6P)\n\nThis toolkit contains tools to extract conversational features and analyze social phenomena in conversations, using a [single unified interface](https://convokit.cornell.edu/documentation/architecture.html) inspired by (and compatible with) scikit-learn.  Several large [conversational datasets](https://github.com/CornellNLP/ConvoKit#datasets) are included together with scripts exemplifying the use of the toolkit on these datasets. The latest version is [4.1.2](https://github.com/CornellNLP/ConvoKit/releases/tag/v4.1.2) (released June 26, 2026); follow the [project on GitHub](https://github.com/CornellNLP/ConvoKit) to keep track of updates.\n\nJoin our [Discord community](https://discord.gg/WMFqMWgz6P) to stay informed, connect with fellow developers, and be part of an engaging space where we share progress, discuss features, and tackle issues together.\n\nRead our [documentation](https://convokit.cornell.edu/documentation) or try ConvoKit in our [interactive tutorial](https://colab.research.google.com/github/CornellNLP/ConvoKit/blob/master/examples/Introduction_to_ConvoKit.ipynb).\n\nThe toolkit currently implements features for:\n\n### [Linguistic coordination](https://www.cs.cornell.edu/~cristian/Echoes_of_power.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/coordination.html)<\/sup><\/sub>\n\nA measure of linguistic influence (and relative power) between individuals or groups based on their use of function words.\nExample: [exploring the balance of power in the U.S. Supreme Court](https://github.com/CornellNLP/ConvoKit/blob/master/examples/coordination/examples.ipynb).\n\n### [Politeness strategies](https://www.cs.cornell.edu/~cristian/Politeness.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/politenessStrategies.html)<\/sup><\/sub>\n\nA set of lexical and parse-based features correlating with politeness and impoliteness.\nExample: [understanding the (mis)use of politeness strategies in conversations gone awry on Wikipedia](https://github.com/CornellNLP/ConvoKit/blob/master/examples/conversations-gone-awry/Conversations_Gone_Awry_Prediction.ipynb).\n\n### [Expected Conversational Context Framework](https://tisjune.github.io/research/dissertation) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/expected_context_model.html)<\/sup><\/sub>\n\nA framework for characterizing utterances and terms based on their expected conversational context, consisting of model implementations and wrapper pipelines.\nExamples: [deriving question types and other characterizations in British parliamentary question periods](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/expected_context_framework/demos/parliament_demo.ipynb),\n[exploration of Switchboard dialog acts corpus](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/expected_context_framework/demos/switchboard_exploration_demo.ipynb),  [examining Wikipedia talk page discussions](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/expected_context_framework/demos/wiki_awry_demo.ipynb) and [computing the orientation of justice utterances in the US Supreme Court](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/expected_context_framework/demos/scotus_orientation_demo.ipynb)\n\n<!-- ### [Prompt types](http://www.cs.cornell.edu/~cristian/Asking_too_much.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/promptTypes.html)<\/sup><\/sub>\n\nAn unsupervised method for grouping utterances and utterance features by their rhetorical role.\nExamples: [extracting question types in the U.K. parliament](https://github.com/CornellNLP/ConvoKit/blob/master/examples/prompt-types/prompt-type-wrapper-demo.ipynb), [extended version demonstrating additional functionality](https://github.com/CornellNLP/ConvoKit/blob/master/examples/prompt-types/prompt-type-demo.ipynb), [understanding the use of conversational prompts in conversations gone awry on Wikipedia](https://github.com/CornellNLP/ConvoKit/blob/master/examples/conversations-gone-awry/Conversations_Gone_Awry_Prediction.ipynb).\n\nAlso includes functionality to extract surface motifs to represent utterances, used in the above paper [(API)](https://convokit.cornell.edu/documentation/phrasingMotifs.html). -->\n\n### [Hypergraph conversation representation](http://www.cs.cornell.edu/~cristian/Patterns_of_participant_interactions.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/hyperconvo.html)<\/sup><\/sub>\nA method for extracting structural features of conversations through a hypergraph representation.\nExample: [hypergraph creation and feature extraction, visualization and interpretation on a subsample of Reddit](https://github.com/CornellNLP/ConvoKit/blob/master/examples/hyperconvo/hyperconvo_demo.ipynb).\n\n### [Linguistic diversity in conversations](http://www.cs.cornell.edu/~cristian/Finding_your_voice__linguistic_development.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/speakerConvoDiversity.html)<\/sup><\/sub>\nA method to compute the linguistic diversity of individuals within their own conversations, and between other individuals in a population.\nExample: [speaker conversation attributes and diversity example on ChangeMyView](https://github.com/CornellNLP/ConvoKit/blob/master/examples/speaker-convo-attributes/speaker-convo-diversity-demo.ipynb)\n\n### [CRAFT: Online forecasting of conversational outcomes](https://arxiv.org/abs/1909.01362) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/forecaster.html)<\/sup><\/sub>\nA neural model for forecasting future outcomes of conversations (e.g., derailment into personal attacks) as they develop.\nAvailable as an interactive notebook: [full version (fine-tuning + inference)](https://colab.research.google.com/drive/1SH4iMEHdoH4IovN-b9QOSK4kG4DhAwmb) or [inference-only](https://colab.research.google.com/drive/1GvICZN0VwZQSWw3pJaEVY-EQGoO-L5lH).\n\n### [Redirection and Utterance Likelihood](https://www.cs.cornell.edu/~cristian/Redirection_in_Therapy.html) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/redirectionAndUtteranceLikelihood.html)<\/sup><\/sub>\nThe methods to compute the extent to which utterances redirect the flow of the conversation (Redirection) and to measure the log-likelihoods of utterances given a defined conversation context (Utterance Likelihood).\nExample: [redirection in supreme court oral arguments](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/redirection/redirectionDemo.ipynb)\n\n### [Pivotal Moment Measure]( ) <sub><sup>[(API)](https://convokit.cornell.edu/documentation/pivotal.html)<\/sup><\/sub>\nA method to identify pivotal moments in conversations.\nExample: [pivotal moments in conversations gone awry](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/pivotal_framework/pivotal_demo.ipynb)\n\n## Datasets\nConvoKit ships with several datasets ready for use \"out-of-the-box\".\nThese datasets can be downloaded using the `convokit.download()` [helper function](https://github.com/CornellNLP/ConvoKit/blob/master/convokit/util.py).  Alternatively you can access them directly [here](http://zissou.infosci.cornell.edu/convokit/datasets/).\n\n### Conversations Gone Awry Datasets ([Wikipedia](https://convokit.cornell.edu/documentation/awry.html)/[CMV](https://convokit.cornell.edu/documentation/awry_cmv.html))\n\nThree related corpora of conversations that derail into antisocial behavior. One corpus (CGA-WIKI) consists of Wikipedia talk page conversations that derail into personal attacks as labeled by crowdworkers (4,188 conversations containing 30.021 comments). Another (CGA-CMV) consists of discussion threads on the subreddit ChangeMyView (CMV) that derail into rule-violating behavior as determined by the presence of a moderator intervention (6,842 conversations containing 42,964 comments). The last is a recent expansion of the CGA-CMV dataset, containing now 19,578 conversations and 116,793 utterances.\nName for download: `conversations-gone-awry-corpus` (for CGA-WIKI), `conversations-gone-awry-cmv-corpus` (for CGA-CMV), and `conversations-gone-awry-cmv-corpus-large` (for CGA-CMV-Large)\n\n### [Cornell Movie-Dialogs Corpus](https://convokit.cornell.edu/documentation/movie.html)\n\nA large metadata-rich collection of fictional conversations extracted from raw movie scripts. (220,579 conversational exchanges between 10,292 pairs of movie characters in 617 movies).\nName for download: `movie-corpus`\n\n### [Parliament Question Time Corpus](https://convokit.cornell.edu/documentation/parliament.html)\n\nParliamentary question periods from May 1979 to December 2016 (216,894 question-answer pairs).\nName for download: `parliament-corpus`\n\n### [Supreme Court Corpus](https://convokit.cornell.edu/documentation/supreme.html)\n\nA collection of conversations from the U.S. Supreme Court Oral Arguments.\nName for download: `supreme-corpus`\n\n### [Wikipedia Talk Pages Corpus](https://convokit.cornell.edu/documentation/wiki.html)\n\nA medium-size collection of conversations from Wikipedia editors' talk pages.\nName for download: `wiki-corpus`\n\n### [Tennis Interviews](https://convokit.cornell.edu/documentation/tennis.html)\n\nTranscripts for tennis singles post-match press conferences for major tournaments between 2007 to 2015 (6,467 post-match press conferences).\nName for download: `tennis-corpus`\n\n### [Reddit Corpus](https://convokit.cornell.edu/documentation/subreddit.html)\n\nReddit conversations from over 900k subreddits, arranged by subreddit. A [small subset](https://convokit.cornell.edu/documentation/reddit-small.html) sampled from 100 highly active subreddits is also available.\n\nName for download: `subreddit-<name_of_subreddit>` for the by-subreddit data, `reddit-corpus-small` for the small subset.\n\n### [WikiConv Corpus](https://convokit.cornell.edu/documentation/wikiconv.html)\n\nThe full corpus of Wikipedia talk page conversations, based on the reconstruction described in [this paper](http://www.cs.cornell.edu/~cristian/index_files/wikiconv-conversation-corpus.pdf).\nNote that due to the large size of the data, it is split up by year.\nWe separately provide [block data retrieved directly from the Wikipedia block log](https://zissou.infosci.cornell.edu/convokit/datasets/wikiconv-corpus/blocks.json), for reproducing the [Trajectories of Blocked Community Members](http://www.cs.cornell.edu/~cristian/Recidivism_online_files/recidivism_online.pdf) paper.\n\nName for download: `wikiconv-<year>` to download wikiconv data for the specified year.\n\n### [Chromium Conversations Corpus](https://convokit.cornell.edu/documentation/chromium.html)\n\nA collection of almost 1.5 million conversations and 2.8 million comments posted by developers reviewing proposed code changes in the Chromium project.\n\nName for download: `chromium-corpus`\n\n### [Winning Arguments Corpus](https://convokit.cornell.edu/documentation/winning.html)\n\nA metadata-rich subset of conversations made in the r/ChangeMyView subreddit between 1 Jan 2013 - 7 May 2015, with information on the delta (success) of a speaker's utterance in convincing the poster.\n\nName for download: `winning-args-corpus`\n\n### [Coarse Discourse Corpus](https://convokit.cornell.edu/documentation/coarseDiscourse.html)\n\nA subset of Reddit conversations that have been manually annotated with discourse act labels.\n\nName for download: `reddit-coarse-discourse-corpus`\n\n### [Persuasion For Good Corpus](https://convokit.cornell.edu/documentation/persuasionforgood.html)\n\nA collection of online conversations generated by Amazon Mechanical Turk workers, where one participant (the *persuader*) tries to convince the other (the *persuadee*) to donate to a charity.\n\nName for download: `persuasionforgood-corpus`\n\n### [Intelligence Squared Debates Corpus](https://convokit.cornell.edu/documentation/iq2.html)\n\nTranscripts of debates held as part of Intelligence Squared Debates.\n\nName for download: `iq2-corpus`\n\n### [Friends Corpus](https://convokit.cornell.edu/documentation/friends.html)\n\nA collection of all the conversations that occurred over 10 seasons of Friends, a popular American TV sitcom that ran in the 1990s.\n\nName for download: `friends-corpus`\n\n### [Federal Open Market Committee (FOMC) Corpus](https://convokit.cornell.edu/documentation/fomc.html)\n\nTranscripts of recurring meetings of the Federal Reserve’s Open Market Committee (FOMC), where important aspects of U.S. monetary policy are decided, covering the period 1977-2008.\n\nName for download: `fomc-corpus`\n\n### [NPR Interview 2P Dataset Corpus](https://convokit.cornell.edu/documentation/npr-2p.html)\n\nThis corpus contains conversations between NPR show hosts and their guests.\n\nName for download: `npr-2p-corpus`\n\n### [DeliData Dataset Corpus](https://convokit.cornell.edu/documentation/deli.html)\n\nThis corpus contains conversations in multi-party problem-solving contexts, containing information about group discussions and team performance.\n\nName for download: `deli-corpus`\n\n### [Switchboard Dialog Act Corpus](https://convokit.cornell.edu/documentation/switchboard.html)\n\nA collection of 1,155 five-minute telephone conversations between two participants, annotated with speech act tags.\n\nName for download: `switchboard-corpus`\n\n### Stanford Politeness Corpus ([Wikipedia](https://convokit.cornell.edu/documentation/wiki_politeness.html)/[Stack Exchange](https://convokit.cornell.edu/documentation/stack_politeness.html))\n\nTwo collections of requests (from Wikipedia and Stack Exchange respectively) with politeness annotations. Name for download: `wikipedia-politeness-corpus` (Wikipedia portion), `stack-exchange-politeness-corpus` (Stack Exchange portion).\n\n### [Deception in Diplomacy Conversations](https://convokit.cornell.edu/documentation/diplomacy.html)\n\nConversational dataset with intended and perceived deception labels. Over 17,000 messages annotated by the sender for their intended truthfulness and by the receiver for their perceived truthfulness.\n\nName for download: `diplomacy-corpus`\n\n### [Group Affect and Performance (GAP) Corpus](https://convokit.cornell.edu/documentation/gap.html)\n\nA conversational dataset comprising group meetings of two to four participants that deliberate in a group decision-making exercise. This dataset contains 28 group meetings with a total of 84 participants.\n\nName for download: `gap-corpus`\n\n### [Wikipedia Articles for Deletion Corpus](https://convokit.cornell.edu/documentation/wiki-articles-for-deletion-corpus.html)\n\nA collection of Wikipedia's Articles for Deletion editor debates that occurred between January 1, 2005 and December 31, 2018. This corpus contains about 3,200,000 contributions by approximately 150,000 Wikipedia editors across almost 400,000 debates.\n\nName for download: `wiki-articles-for-deletion-corpus`\n\n### [CaSiNo Corpus](https://convokit.cornell.edu/documentation/casino-corpus.html)\nCaSiNo (stands for CampSite Negotiations) is a novel dataset of 1030 negotiation dialogues. Two participants take the role of campsite neighbors and negotiate for Food, Water, and Firewood packages, based on their individual preferences and requirements.\n\nName for download: `casino-corpus`\n\n### [SPOLIN Corpus](https://convokit.cornell.edu/documentation/spolin.html)\nSelected Pairs of Learnable ImprovisatioN (SPOLIN) is a collection of more than 68,000 \"Yes, and\" type utterance pairs extracted from the long-form improvisation podcast Spontaneanation by Paul F. Tompkins, the Cornell Movie-Dialogs Corpus, and the SubTle corpus.\n\nName for download: `spolin-corpus`\n\n### ...And your own corpus!\n\nIn addition to the provided datasets, you may also use ConvoKit with your own custom datasets by loading them into a `convokit.Corpus` object. [This example script](https://github.com/CornellNLP/ConvoKit/blob/master/examples/converting_movie_corpus.ipynb) shows how to construct a Corpus from custom data.\n\n## Installation\nThis toolkit requires Python >= 3.10.\n\n1. Download the toolkit: `pip3 install convokit`\n2. Download Spacy's English model: `python3 -m spacy download en`\n3. Download NLTK's 'punkt' model: `import nltk; nltk.download('punkt')` (in Python interpreter)\n\nAlternatively, visit our [Github Page](https://github.com/CornellNLP/ConvoKit) to install from source.\n\n**If you encounter difficulties with installation**, check out our **[Troubleshooting Guide](https://convokit.cornell.edu/documentation/troubleshooting.html)** for a list of solutions to common issues.\n\n## Documentation\nDocumentation is hosted [here](https://convokit.cornell.edu/documentation/). If you are new to ConvoKit, great places to get started are the [Core Concepts tutorial](https://convokit.cornell.edu/documentation/architecture.html) for an overview of the ConvoKit \"philosophy\" and object model, and the [High-level tutorial](https://convokit.cornell.edu/documentation/tutorial.html) for a walkthrough of how to import ConvoKit into your project, load a Corpus, and use ConvoKit functions.\n\nFor an overview, watch our SIGDIAL talk introducing the toolkit:\n[![SIGDIAL 2020: Introducing ConvoKit](http://i3.ytimg.com/vi/nofzyxM4h1k/hqdefault.jpg)](https://youtu.be/nofzyxM4h1k \"SIGDIAL 2020: Introducing ConvoKit\")\n\n## Contributing\n\nWe welcome community contributions. To see how you can help out, check the [contribution guidelines](https://github.com/CornellNLP/ConvoKit/blob/master/CONTRIBUTING.md).\n\n## Citing\n\nIf you use the code or datasets distributed with ConvoKit please acknowledge the work tied to the respective component (indicated in the documentation) in addition to:\n\nJonathan P. Chang, Caleb Chiam, Liye Fu, Andrew Wang, Justine Zhang, Cristian Danescu-Niculescu-Mizil. 2020. \"[ConvoKit: A Toolkit for the Analysis of Conversations](https://www.cs.cornell.edu/~cristian/ConvoKit_Demo_Paper_files/convokit-demo-paper.pdf)\". Proceedings of SIGDIAL.\n\n[ConvoKit](http://convokit.cornell.edu/)\n\n*ConvoKit is funded in part by the U.S. National Science Foundation under Grant No. IIS-1750615 (CAREER). Any opinions, findings, and conclusions in this work are those of the author(s) and do not necessarily reflect the views of Cornell University or the National Science Foundation.*\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/cristiandnm\"><img src=\"https://avatars.githubusercontent.com/u/8700563?v=4?s=100\" width=\"100px;\" alt=\"Cristian Danescu-Niculescu-Mizil\"/><br /><sub><b>Cristian Danescu-Niculescu-Mizil<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=cristiandnm\" title=\"Code\">💻<\/a> <a href=\"#data-cristiandnm\" title=\"Data\">🔣<\/a> <a href=\"#ideas-cristiandnm\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-cristiandnm\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=cristiandnm\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Acristiandnm\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://www.linkedin.com/in/andrewzhouwang\"><img src=\"https://avatars.githubusercontent.com/u/4683423?v=4?s=100\" width=\"100px;\" alt=\"Andrew Wang\"/><br /><sub><b>Andrew Wang<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=qema\" title=\"Code\">💻<\/a> <a href=\"#data-qema\" title=\"Data\">🔣<\/a> <a href=\"#ideas-qema\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-qema\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=qema\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Aqema\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://tisjune.github.io\"><img src=\"https://avatars.githubusercontent.com/u/8534072?v=4?s=100\" width=\"100px;\" alt=\"Justine Zhang\"/><br /><sub><b>Justine Zhang<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=tisjune\" title=\"Code\">💻<\/a> <a href=\"#data-tisjune\" title=\"Data\">🔣<\/a> <a href=\"#ideas-tisjune\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-tisjune\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=tisjune\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Atisjune\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://cs.cornell.edu/~jpchang\"><img src=\"https://avatars.githubusercontent.com/u/989906?v=4?s=100\" width=\"100px;\" alt=\"Jonathan Chang\"/><br /><sub><b>Jonathan Chang<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=jpwchang\" title=\"Code\">💻<\/a> <a href=\"#data-jpwchang\" title=\"Data\">🔣<\/a> <a href=\"#ideas-jpwchang\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-jpwchang\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=jpwchang\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Ajpwchang\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://www.cs.cornell.edu/~liye/\"><img src=\"https://avatars.githubusercontent.com/u/12224673?v=4?s=100\" width=\"100px;\" alt=\"Liye Fu\"/><br /><sub><b>Liye Fu<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=liye\" title=\"Code\">💻<\/a> <a href=\"#data-liye\" title=\"Data\">🔣<\/a> <a href=\"#ideas-liye\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-liye\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=liye\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Aliye\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/calebchiam\"><img src=\"https://avatars.githubusercontent.com/u/14286996?v=4?s=100\" width=\"100px;\" alt=\"calebchiam\"/><br /><sub><b>calebchiam<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=calebchiam\" title=\"Code\">💻<\/a> <a href=\"#data-calebchiam\" title=\"Data\">🔣<\/a> <a href=\"#ideas-calebchiam\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-calebchiam\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=calebchiam\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Acalebchiam\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/rgangela99\"><img src=\"https://avatars.githubusercontent.com/u/35738132?v=4?s=100\" width=\"100px;\" alt=\"rgangela99\"/><br /><sub><b>rgangela99<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=rgangela99\" title=\"Code\">💻<\/a><\/td>\n    <\/tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/Khonzoda\"><img src=\"https://avatars.githubusercontent.com/u/26072772?v=4?s=100\" width=\"100px;\" alt=\"Khonzoda Umarova\"/><br /><sub><b>Khonzoda Umarova<\/b><\/sub><\/a><br /><a href=\"#data-Khonzoda\" title=\"Data\">🔣<\/a> <a href=\"#maintenance-Khonzoda\" title=\"Maintenance\">🚧<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/mwilbz\"><img src=\"https://avatars.githubusercontent.com/u/14115641?v=4?s=100\" width=\"100px;\" alt=\"mwilbz\"/><br /><sub><b>mwilbz<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=mwilbz\" title=\"Tests\">⚠️<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://www.alexkoen.com\"><img src=\"https://avatars.githubusercontent.com/u/43913902?v=4?s=100\" width=\"100px;\" alt=\"Alex Koen\"/><br /><sub><b>Alex Koen<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/issues?q=author%3Aakoen\" title=\"Bug reports\">🐛<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://emtseng.me\"><img src=\"https://avatars.githubusercontent.com/u/5270852?v=4?s=100\" width=\"100px;\" alt=\"Emily Tseng\"/><br /><sub><b>Emily Tseng<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/issues?q=author%3Aemtseng\" title=\"Bug reports\">🐛<\/a> <a href=\"#data-emtseng\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/ZiggyFloat\"><img src=\"https://avatars.githubusercontent.com/u/41927607?v=4?s=100\" width=\"100px;\" alt=\"Uliyana Kubasova\"/><br /><sub><b>Uliyana Kubasova<\/b><\/sub><\/a><br /><a href=\"#data-ZiggyFloat\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://jschluger.github.io/\"><img src=\"https://avatars.githubusercontent.com/u/14956008?v=4?s=100\" width=\"100px;\" alt=\"Jack Schluger\"/><br /><sub><b>Jack Schluger<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/issues?q=author%3Ajschluger\" title=\"Bug reports\">🐛<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=jschluger\" title=\"Code\">💻<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/kushalchawla\"><img src=\"https://avatars.githubusercontent.com/u/8416863?v=4?s=100\" width=\"100px;\" alt=\"Kushal Chawla\"/><br /><sub><b>Kushal Chawla<\/b><\/sub><\/a><br /><a href=\"#data-kushalchawla\" title=\"Data\">🔣<\/a><\/td>\n    <\/tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/sc782\"><img src=\"https://avatars.githubusercontent.com/u/14970930?v=4?s=100\" width=\"100px;\" alt=\"June Cho\"/><br /><sub><b>June Cho<\/b><\/sub><\/a><br /><a href=\"#data-sc782\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/noameshed\"><img src=\"https://avatars.githubusercontent.com/u/40632766?v=4?s=100\" width=\"100px;\" alt=\"Noam Eshed\"/><br /><sub><b>Noam Eshed<\/b><\/sub><\/a><br /><a href=\"#data-noameshed\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/szmurlo\"><img src=\"https://avatars.githubusercontent.com/u/31192340?v=4?s=100\" width=\"100px;\" alt=\"Andrew Szmurlo\"/><br /><sub><b>Andrew Szmurlo<\/b><\/sub><\/a><br /><a href=\"#data-szmurlo\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/kcsadow\"><img src=\"https://avatars.githubusercontent.com/u/34074151?v=4?s=100\" width=\"100px;\" alt=\"Katharine Sadowski\"/><br /><sub><b>Katharine Sadowski<\/b><\/sub><\/a><br /><a href=\"#data-kcsadow\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/lucasvanbramer\"><img src=\"https://avatars.githubusercontent.com/u/32553676?v=4?s=100\" width=\"100px;\" alt=\"Lucas Van Bramer\"/><br /><sub><b>Lucas Van Bramer<\/b><\/sub><\/a><br /><a href=\"#data-lucasvanbramer\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://mariannealq.com\"><img src=\"https://avatars.githubusercontent.com/u/16949591?v=4?s=100\" width=\"100px;\" alt=\"Marianne Aubin\"/><br /><sub><b>Marianne Aubin<\/b><\/sub><\/a><br /><a href=\"#data-maubinle\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/dn273\"><img src=\"https://avatars.githubusercontent.com/u/27926662?v=4?s=100\" width=\"100px;\" alt=\"Di Ni\"/><br /><sub><b>Di Ni<\/b><\/sub><\/a><br /><a href=\"#data-dn273\" title=\"Data\">🔣<\/a><\/td>\n    <\/tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/gdeng96\"><img src=\"https://avatars.githubusercontent.com/u/8600751?v=4?s=100\" width=\"100px;\" alt=\"gdeng96\"/><br /><sub><b>gdeng96<\/b><\/sub><\/a><br /><a href=\"#data-gdeng96\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/junfrankli\"><img src=\"https://avatars.githubusercontent.com/u/22462584?v=4?s=100\" width=\"100px;\" alt=\"Frank Li\"/><br /><sub><b>Frank Li<\/b><\/sub><\/a><br /><a href=\"#data-junfrankli\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://rujzhao.com\"><img src=\"https://avatars.githubusercontent.com/u/31158748?v=4?s=100\" width=\"100px;\" alt=\"rjz46\"/><br /><sub><b>rjz46<\/b><\/sub><\/a><br /><a href=\"#data-rjz46\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/KatyBlumer\"><img src=\"https://avatars.githubusercontent.com/u/3669069?v=4?s=100\" width=\"100px;\" alt=\"KatyBlumer\"/><br /><sub><b>KatyBlumer<\/b><\/sub><\/a><br /><a href=\"#data-KatyBlumer\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/als452\"><img src=\"https://avatars.githubusercontent.com/u/15838258?v=4?s=100\" width=\"100px;\" alt=\"als452\"/><br /><sub><b>als452<\/b><\/sub><\/a><br /><a href=\"#data-als452\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/KaminskyJ\"><img src=\"https://avatars.githubusercontent.com/u/26395772?v=4?s=100\" width=\"100px;\" alt=\"KaminskyJ\"/><br /><sub><b>KaminskyJ<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=KaminskyJ\" title=\"Code\">💻<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/Ap1075\"><img src=\"https://avatars.githubusercontent.com/u/25790092?v=4?s=100\" width=\"100px;\" alt=\"Armaan Puri\"/><br /><sub><b>Armaan Puri<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=Ap1075\" title=\"Code\">💻<\/a><\/td>\n    <\/tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/oscarso2000\"><img src=\"https://avatars.githubusercontent.com/u/20172573?v=4?s=100\" width=\"100px;\" alt=\"Oscar So\"/><br /><sub><b>Oscar So<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=oscarso2000\" title=\"Code\">💻<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://justin-cho.com\"><img src=\"https://avatars.githubusercontent.com/u/31977186?v=4?s=100\" width=\"100px;\" alt=\"Justin Cho\"/><br /><sub><b>Justin Cho<\/b><\/sub><\/a><br /><a href=\"#data-wise-east\" title=\"Data\">🔣<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/seanzhangkx8\"><img src=\"https://avatars.githubusercontent.com/u/106214464?v=4?s=100\" width=\"100px;\" alt=\"seanzhangkx8\"/><br /><sub><b>seanzhangkx8<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=seanzhangkx8\" title=\"Code\">💻<\/a> <a href=\"#ideas-seanzhangkx8\" title=\"Ideas, Planning, & Feedback\">🤔<\/a> <a href=\"#maintenance-seanzhangkx8\" title=\"Maintenance\">🚧<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=seanzhangkx8\" title=\"Documentation\">📖<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/pulls?q=is%3Apr+reviewed-by%3Aseanzhangkx8\" title=\"Reviewed Pull Requests\">👀<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/ethanxia4\"><img src=\"https://avatars.githubusercontent.com/u/96800594?v=4?s=100\" width=\"100px;\" alt=\"Ethan Xia\"/><br /><sub><b>Ethan Xia<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=ethanxia4\" title=\"Code\">💻<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=ethanxia4\" title=\"Documentation\">📖<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/vianxnguyen\"><img src=\"https://avatars.githubusercontent.com/u/46759999?v=4?s=100\" width=\"100px;\" alt=\"vivian\"/><br /><sub><b>vivian<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=vianxnguyen\" title=\"Code\">💻<\/a> <a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=vianxnguyen\" title=\"Documentation\">📖<\/a> <a href=\"#example-vianxnguyen\" title=\"Examples\">💡<\/a> <a href=\"#ideas-vianxnguyen\" title=\"Ideas, Planning, & Feedback\">🤔<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/laerdon\"><img src=\"https://avatars.githubusercontent.com/u/96972420?v=4?s=100\" width=\"100px;\" alt=\"Laerdon Kim\"/><br /><sub><b>Laerdon Kim<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=laerdon\" title=\"Documentation\">📖<\/a> <a href=\"#example-laerdon\" title=\"Examples\">💡<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/yash-chatha\"><img src=\"https://avatars.githubusercontent.com/u/62723967?v=4?s=100\" width=\"100px;\" alt=\"Yash Chatha\"/><br /><sub><b>Yash Chatha<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/commits?author=yash-chatha\" title=\"Documentation\">📖<\/a> <a href=\"#example-yash-chatha\" title=\"Examples\">💡<\/a><\/td>\n    <\/tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/jeeyonkang\"><img src=\"https://avatars.githubusercontent.com/u/135584717?v=4?s=100\" width=\"100px;\" alt=\"Jeeyon Kang\"/><br /><sub><b>Jeeyon Kang<\/b><\/sub><\/a><br /><a href=\"#data-jeeyonkang\" title=\"Data\">🔣<\/a> <a href=\"#example-jeeyonkang\" title=\"Examples\">💡<\/a><\/td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://kakeith.github.io/\"><img src=\"https://avatars.githubusercontent.com/u/18640437?v=4?s=100\" width=\"100px;\" alt=\"Katherine A. Keith\"/><br /><sub><b>Katherine A. Keith<\/b><\/sub><\/a><br /><a href=\"https://github.com/CornellNLP/ConvoKit/issues?q=author%3Akakeith\" title=\"Bug reports\">🐛<\/a><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4222:2C474:180AB4:5E6A2B:6AB92C25"},"text_sha256":"5f142f493112920104487fa14d9f1d048e110e36220c98d9703df74a41dc171c"},{"path":"docs/source/decisionpolicy.rst","size":2439,"blob_sha":"3de1e255d830284d149ad9fcc1a2592d87de55b5","priority":1,"status":200,"text":"Decision Policy\n===============\n\nA decision policy converts the continuous score produced by a ForecasterModel's belief estimator into a\ndiscrete intervention decision. Separating belief estimation (the score) from the action (intervene or not)\nlets you swap decision logic, ranging from simple thresholding to look-ahead deferral and simulation-based\nvoting, without retraining or modifying the underlying forecaster.\n\nEvery policy implements two methods:\n\n* ``decide(context, score_fn)``: returns a ``(score, action, metadata)`` tuple, where ``action`` is the binary\n  intervention decision and ``metadata`` is an optional dict of extra per-utterance information (e.g. the\n  simulated replies used by deferral policies).\n* ``fit(contexts, val_contexts, score_fn)``: tunes policy-specific parameters (such as the decision threshold)\n  on a held-out validation set.\n\nA ForecasterModel owns a single decision policy, defaulting to ``ThresholdDecisionPolicy``, and exposes it via\nits ``decision_policy`` property. The policy receives the model's ``score`` function as ``score_fn`` and shares\nthe model's labeler and ``forecast_prob`` cache key so it can reuse already-computed forecast probabilities.\n\nThis mechanism is introduced in `Wait! There's a Way Out <https://arxiv.org/abs/2605.29243>`_.\n\nBase Class\n----------\n\n.. automodule:: convokit.decisionpolicy.decisionPolicy\n    :members:\n\nThreshold Decision Policy\n-------------------------\n\n.. automodule:: convokit.decisionpolicy.thresholdDecisionPolicy\n    :members:\n\nDeferral Decision Policy\n------------------------\n\n.. automodule:: convokit.decisionpolicy.deferralDecisionPolicy\n    :members:\n\nRandom Deferral Decision Policy\n-------------------------------\n\n.. automodule:: convokit.decisionpolicy.randomDeferralDecisionPolicy\n    :members:\n\nSimulation Average Decision Policy\n----------------------------------\n\nThis policy is based upon the forecasting approach described in `Simulation-based Decision Making for Dialogue Intervention <https://aclanthology.org/2025.inlg-main.40/>`_ in the static forecasting task, and is adapted for the non-static forecasting task in `Wait! There's a Way Out <https://arxiv.org/abs/2605.29243>`_ \n\n.. automodule:: convokit.decisionpolicy.simulationAverageDecisionPolicy\n    :members:\n\nSimulation Majority Decision Policy\n-----------------------------------\n\n.. automodule:: convokit.decisionpolicy.simulationMajorityDecisionPolicy\n    :members:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDEA:376DE:1814F2:5E75BB:6AB92C25"},"text_sha256":"90d2523311a0f0615655a873833f0d160c28e775a78c90727b861067c52dc9fd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"genicam/harvesters","input_row":{"repository":"genicam/harvesters","url":"https://github.com/genicam/harvesters","name":"harvesters","owner":"genicam","description":"Image Acquisition Library for GenICam-based Machine Vision System","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":613,"issues":413,"created_at":"2018-05-18T05:40:35Z","updated_at":"2026-09-16T05:57:53Z","first_commit_at":"2018-05-18T05:40:36Z","last_commit_at":"2024-05-08T06:36:42Z","activity_months":71.680000000000007,"ai_ml_match_topics":"machine-learning; computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:45:58.980Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"genicam/harvesters","visibility":"public","created_at":"2018-05-18T05:40:35Z","updated_at":"2026-09-16T05:57:53Z","private":false,"fork":false,"archived":false,"stargazers_count":613,"open_issues_count":106,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1993","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EE:156040:17DCCF3:1C022D9:6AB92C27"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1992","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0781:1C46F8:17CFE74:1BF5379:6AB92C27"},"commit":{"sha":"2aa2968f9cbe46517858201b83100094c075cc01","url":"https://github.com/genicam/harvesters/commit/2aa2968f9cbe46517858201b83100094c075cc01","date":"2018-05-24T14:59:57Z","author_date":"2018-05-24T14:59:57Z","committer_date":"2018-05-24T14:59:57Z","tree_sha":"dc246fa0e7ba37d2efb0ded901ce962870af3615","message_first_line":"Apply MIT license instead of GPL"},"tree_request_status":200,"tree_rate":{"github_remaining":"1991","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17F41CF:1C1A2AB:6AB92C27"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":8492,"blob_sha":"0dc3fc8dc00f5a965d2d33996cd2669b4be281a3","priority":0}],"documents":[{"path":"README.rst","size":8492,"blob_sha":"0dc3fc8dc00f5a965d2d33996cd2669b4be281a3","priority":0,"status":200,"text":"#########\nHarvester\n#########\n\nHarvester is a friendly companion for people who those want to learn computer vision.\n\nThe Harvester project develops an open source Python library that consumes the GenTL Standard based image acquisition libraries, so-called GenTL Producers. If you have an officially certified GenTL Producer and GenICam compliant machine vision cameras, Harvester offers you high-performance image acquisition from the cameras and visualization of the acquired images on all major platforms. In addition, it offers you interface for numpy to make image processing easier and productive.\n\nCurrently, Harvester is MIT licensed and it has been developed and maintained by the volunteer contributors all over the world.\n\n.. figure:: image/readme/harvesters.jpg\n    :align: center\n    :alt: The Harvesters\n    :scale: 55 %\n\n    Pieter Bruegel the Elder, The Harvesters, 1565, oil on wood, © 2000–2018 The Metropolitan Museum of Art\n\n################################\nWhat would harvester do for you?\n################################\n\nHarvester mainly consists of two Python modules, one is an image acquisition engine Harvester Core and the other is GUI, Harvester GUI. In this section, we learn what Harvester offer us.\n\n**************\nHarvester Core\n**************\n\nHarvester Core is an image acquisition engine. No GUI. It acquires images from GenTL Producers through the GenTL-Python Binding. You'll be able to download the GenTL-Python Binding runtime library from the EMVA website but it's not available as of May 25th, 2018, because it's not officially released.\n\nHarvester Core also works with the GenApi-Python Binding and it will allow us to control GenICam feature nodes. If you don't need runtime image data visualization, just involve this Python module in your program. In this case, Matplotlib would be ideal for you to draw the acquired images.\n\nThe main features of Harvester Core are listed as follows:\n\n* Image acquisition over GenTL Producers\n* Multiple loading of GenTL Producers in a single Python script\n* GenICam node manipulation of the target device\n\nNote that the second item implies you can involve multiple types of transport layers in your Python script. It means you don't have to care anything about how the images are transmitted. Each transport layer has own advantages and disadvantages and you should choose appropriate transport layers following your application's requirement. You just need to acquire images for some purposes and the GenTL Producers deliver the images somehow. It truly is the great benefit of encapsulation by the GenTL Standard!\n\nOn the other hand, Harvester Core could be called a simplified version of the GenTL-Python Binding. It just offers you a relationship between you and a device. Nothing more. If you need to manipulate more relevant GenTL modules or go on a hardcore stuff, you should directly involve the GenTL-Python Binding.\n\n*************\nHarvester GUI\n*************\n\nHarvester GUI works on the top of Harvester Core and offers you high-performance data visualization on the fly. It involves VisPy for controlling OpenGL functionality and PyQt for providing GUI.\n\nThe main features of Harvester GUI are listed as follows:\n\n* Data visualization of the acquired images\n* Zooming-in/-out using mouse wheel or trackpad\n* Image dragging using mouse or trackpad\n* An arbitrary selection of image displaying point in the data path (Not implemented yet)\n\nUnlike Harvester Core, Harvester GUI limits the number of GenTL Producers to load is just one. This is just a limitation to not make the GUI complicated. In general, the user should know which GenTL Producer should be loaded to control his target device. It's not necessary to load multiple GenTL Producers for this use case. However, this is just an idea in an early stage. We might support multiple loading on even Harvester GUI in the future.\n\nNote that VisPy is BSD licensed but PyQt is GPL/Commercial licensed.\n\n*******************\nSystem requirements\n*******************\n\n* Python 3.4 or higher\n* Officially certifiled GenTL Producers\n* GenICam compliant machine vision cameras\n\n***************************\nSupported operating systems\n***************************\n\n* macOS\n* Ubuntu\n* Windows 7\n\n###########\nScreenshots\n###########\n\nIn this section, we see some useful GUI which Harvester offers you.\n\nThe image visualizer widget (below) offers you visualization of the acquired images. In this screenshot, Harvester is acquiring a 4000 x 3000 pixel of RGB8 Packed image at 30 fps; it means it's acquiring images at 8.6 Gbps.\n\n.. image:: image/readme/image_visualizer.png\n    :align: center\n    :alt: Image Visualizer\n    :scale: 40 %\n\nThe attribute controller widget (below) offers you to manipulate GenICam feature nodes of the target device. Changing exposure time, triggering the target device for image acquisition, storing a set of camera configuration so-called User Set, etc, you can manually control the target device anytime when you want to.\n\n.. image:: image/readme/attribute_controller.png\n    :align: center\n    :alt: Attribute Controller\n    :scale: 40 %\n\n\nThe following screenshot shows Harvester Core is running on IPython. Harvester Core returns the latest image data at the moment as a Numpy array every time its user call the ``latest_image`` property. Once you get an image you should be able to immediately start image processing! If you're running on Jupyter notebook, you should be able to visualize the data using Matplotlib.\n\n.. image:: image/readme/harvester_on_ipython.png\n    :align: center\n    :alt: Attribute Controller\n    :scale: 40 %\n\n####################################\nWhy is the library called Harvester?\n####################################\n\nHarvester's name was derived from the great Flemish painter, Pieter Bruegel the Elder's painting so-called \"The Harvesters\". Harvesters harvest a crop every season that has been fully grown and the harvested crop is passed to the consumers. On the other hand, image acquisition libraries acquire images as their crop and the images are passed to the following processes. We found the similarity between them and decided to name our library Harvester.\n\nApart from anything else, we love its peaceful and friendly name. We hope you also like it ;-)\n\n############\nContributors\n############\n\nThe initial idea about Harvester suddenly came up to Kazunari Kudo's head in the early April 2018 and he decided to bring the first prototype to the following International Vision Standards Meeting. During the Frankfurt International Vision Standards Meeting which was held in May 2018, people confirmed Harvester really worked using machine vision cameras provided by well-known machine vision camera manufacturers in the world. Having that fact, the attendees warmly welcomed Harvester.\n\nThe following individuals have directly or indirectly contributed to the development activity of Harvester or encouraged the developers by their thoughtful warm words:\n\n    Rod Barman, Stefan Battmer, David Beek, David Bernecker, Chris Beynon, Eric Bourbonnais, George Chamberlain, Thomas Detjen, Friedrich Dierks, Dana Diezemann, Emile Dodin, Reynold Dodson, Sascha Dorenbeck, Erik Eloff, Katie Ensign, Andreas Ertl, James Falconer, Werner Feith, Maciej Gara, Andreas Gau, Sebastien Gendreau, Francois Gobiel, Werner Goeman, Jean-Paul Goglio, Markus Grebing, Eric Gross, Ioannis Hadjicharalambous, Uwe Hagmaier, Tim Handschack, Christopher Hartmann, Reinhard Heister, Gerhard Helfrich, Jochem Herrmann, Heiko Hirschmueller, Tom Hopfner, Karsten Ingeman Christensen, Mattias Johannesson, Mark Jones, Mattias Josefsson, Martin Kersting, Stephan Kieneke, Tom Kirchner, Lutz Koschorreck, Frank Krehl, Maarten Kuijk, Max Larin, Ralf Lay, Min Liu, Sergey Loginonvskikh, Thomas Lueck, Alain Marchand, Rocco Matano, Masahide Matsubara, Stephane Maurice, Robert McCurrach, Mike Miethig, Thies Moeller, Roman Moie, Marcel Naggatz, Hartmut Nebelung, Damian Nesbitt, Quang Nhan Nguyen, Klaus-Henning Noffz, Neerav Patel, Jan Pech, Merlin Plock, Joerg Preckwinkel, Benjamin Pussacq, Dave Reaves, Thomas Reuter, Andreas Rittinger, Ryan Robe, Nicolas P. Rougier, Matthias Schaffland, Michael Schmidt, Jan Scholze, Martin Schwarzbauer, Rupert Stelz, Madhura Suresh, Chendra Hadi Suryanto, Timo Teifel, Laval Tremblay, Tim Vlaar, Silvio Voitzsch, Stefan Von Weihe, Frederik Voncken, Roman Wagner, Ansger Waschki, Anne Wendel, Jean-Michel Wintgens, Manfred Wuetschner, Jang Xu, Christoph Zierl, and Juraj Zopp\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CB1A:4F9CC:1718FB:5D7627:6AB92C28"},"text_sha256":"024ee82d26989c761a953b55d8bc3be9d46afea1924966924e42b85ea0453d6f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1990","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F7:E80A6:17B42C5:1BDA49E:6AB92C28"},"commit":{"sha":"383494e36ebb80e2daa271ac0e980dde2093970c","url":"https://github.com/genicam/harvesters/commit/383494e36ebb80e2daa271ac0e980dde2093970c","date":"2024-05-08T06:36:42Z","author_date":"2024-05-08T06:36:42Z","committer_date":"2024-05-08T06:36:42Z","tree_sha":"32f3c77d31ad3197ad48420ae9b8c732ca10d984","message_first_line":"Merge pull request #445 from quatrejuin/quatrejuin-patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1989","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D3:35C5DA:17B18D2:1BD6D4A:6AB92C28"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":11159,"blob_sha":"df90a41a18ef365072e8014ca31f3c3ba68f7b94","priority":0}],"documents":[{"path":"README.rst","size":11159,"blob_sha":"df90a41a18ef365072e8014ca31f3c3ba68f7b94","priority":0,"status":200,"text":".. figure:: https://user-images.githubusercontent.com/8652625/40595190-1e16e90e-626e-11e8-9dc7-207d691c6d6d.jpg\n    :align: center\n    :alt: The Harvesters\n\n    Pieter Bruegel the Elder, The Harvesters, 1565, (c) The Metropolitan Museum of Art\n\n.. image:: https://readthedocs.org/projects/harvesters/badge/?version=latest\n    :target: https://harvesters.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/pypi/v/harvesters.svg\n    :target: https://pypi.org/project/harvesters\n\n.. image:: https://zenodo.org/badge/133908095.svg\n   :target: https://zenodo.org/badge/latestdoi/133908095\n\n----\n\n.. contents:: Table of Contents\n    :depth: 1\n\n----\n\nAbout Harvester\n===============\n\nHarvester is a Python library that aims to make the image acquisition process in your computer vision application breathtakingly easy. Like the peasants/harvesters in the above drawing, it gathers the image data as its harvest and fills up your bucket/buffer.\n\nYou can freely use, modify, distribute Harvester under `Apache License-2.0 <https://www.apache.org/licenses/LICENSE-2.0>`_ without worrying about the use of your software: personal, internal or commercial.\n\n\nTasks Harvester Does for You\n============================\n\nThe main features of Harvester are:\n\n* Image acquisition through GenTL Producers\n* Multiple loading of GenTL Producers in a single Python script\n* GenICam feature node manipulation\n\nNote that the second item implies you can involve various types of transport layers in your Python script. Each transport layer has own advantages and disadvantages and you should choose appropriate one based on your application's requirement. You just need to acquire images for some purposes and the GenTL Producers deliver the images somehow. It truly is the great benefit of the GenTL Standard! And of course, not only GenTL Producers but Harvester offer you a way to manipulate multiple GenICam compliant entities such as a camera in a single Python script with an intuitive manner.\n\nNeed a GUI?\n===========\n\nDo you need a GUI? Harvester has a sister project that is called **Harvester GUI**. Please visit there if you are interested in it:\n\nhttps://github.com/genicam/harvesters_gui\n\n.. image:: https://user-images.githubusercontent.com/8652625/43035346-c84fe404-8d28-11e8-815f-2df66cbbc6d0.png\n    :align: center\n    :alt: Image data visualizer\n\n\nAsking Questions\n================\n\nWe have prepared an FAQ page. Perhaps your issue could be resolved just reading through it:\n\nhttps://github.com/genicam/harvesters/wiki/FAQ\n\nIf any article was not mentioning about the issue you are facing, please try to visit the following page and check if there's a ticket that is relevant to the issue. If nothing has been mentioned yet, feel free to create an issue ticket so that we can help you:\n\nhttps://github.com/genicam/harvesters/issues\n\n\nLinks\n=====\n\n.. list-table::\n\n    - - Documentation\n      - https://harvesters.readthedocs.io/en/latest/\n    - - Digital Object Identifier\n      - https://zenodo.org/record/3554804#.Xd4HSi2B01I\n    - - EMVA website\n      - https://www.emva.org/standards-technology/genicam/genicam-downloads/\n    - - Harvester GUI\n      - https://github.com/genicam/harvesters_gui\n    - - Issue tracker\n      - https://github.com/genicam/harvesters/issues\n    - - PyPI\n      - https://pypi.org/project/harvesters/\n    - - Source repository\n      - https://github.com/genicam/harvesters\n\nHarvester on IPython\n====================\n\nThe following code block shows Harvester is running on IPython. An acquired image is delivered as the payload of a buffer and the buffer can be fetched by calling the ``fetch`` method of the ``ImageAcquirer`` class. Once you get an image you should be able to immediately start image processing. If you're running on the Jupyter notebook, you should be able to visualize the image data using Matplotlib. This step should be helpful to check what's going on your trial in the image processing flow.\n\n.. code-block:: python\n\n    (genicam) kznr@Kazunaris-MacBook:~% ipython\n    Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:07:29)\n    Type 'copyright', 'credits' or 'license' for more information\n    IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.\n\n    In [1]: from harvesters.core import Harvester\n\n    In [2]: import numpy as np  # This is just for a demonstration.\n\n    In [3]: h = Harvester()\n\n    In [4]: h.add_file('/Users/kznr/dev/genicam/bin/Maci64_x64/TLSimu.cti')\n\n    In [5]: h.update()\n\n    In [6]: len(h.device_info_list)\n    Out[6]: 4\n\n    In [7]: h.device_info_list[0]\n    Out[7]: {'display_name': 'TLSimuMono (SN_InterfaceA_0)', 'id_': 'TLSimuMono', 'model': 'TLSimuMono', 'serial_number': 'SN_InterfaceA_0', 'tl_type': 'Custom', 'user_defined_name': 'Center', 'vendor': 'EMVA_D', 'version': '1.2.3'}\n\n    In [8]: ia = h.create(0)\n\n    In [9]: ia.remote_device.node_map.Width.value = 8\n\n    In [10]: ia.remote_device.node_map.Height.value = 8\n\n    In [11]: ia.remote_device.node_map.PixelFormat.value = 'Mono8'\n\n    In [12]: ia.start()\n\n    In [13]: with ia.fetch() as buffer:\n        ...:     # Let's create an alias of the 2D image component:\n        ...:     component = buffer.payload.components[0]\n        ...:\n        ...:     # Note that the number of components can be vary. If your\n        ...:     # target remote device transmits a multi-part information, then\n        ...:     # you'd get two or more components in the payload. However, now\n        ...:     # we're working with a remote device that transmits only a 2D image.\n        ...:     # So we manipulate only index 0 of the list object, components.\n        ...:\n        ...:     # Let's see the acquired data in 1D:\n        ...:     _1d = component.data\n        ...:     print('1D: {0}'.format(_1d))\n        ...:\n        ...:     # Reshape the NumPy array into a 2D array:\n        ...:     _2d = component.data.reshape(\n        ...:         component.height, component.width\n        ...:     )\n        ...:     print('2D: {0}'.format(_2d))\n        ...:\n        ...:     # Here are some trivial calculations:\n        ...:     print(\n        ...:         'AVE: {0}, MIN: {1}, MAX: {2}'.format(\n        ...:             np.average(_2d), _2d.min(), _2d.max()\n        ...:         )\n        ...:     )\n        ...:\n    1D: [123 124 125 126 127 128 129 130 124 125 126 127 128 129 130 131 125 126\n     127 128 129 130 131 132 126 127 128 129 130 131 132 133 127 128 129 130\n     131 132 133 134 128 129 130 131 132 133 134 135 129 130 131 132 133 134\n     135 136 130 131 132 133 134 135 136 137]\n    2D: [[123 124 125 126 127 128 129 130]\n     [124 125 126 127 128 129 130 131]\n     [125 126 127 128 129 130 131 132]\n     [126 127 128 129 130 131 132 133]\n     [127 128 129 130 131 132 133 134]\n     [128 129 130 131 132 133 134 135]\n     [129 130 131 132 133 134 135 136]\n     [130 131 132 133 134 135 136 137]]\n    AVE: 130.0, MIN: 123, MAX: 137\n\n    In [14]: ia.stop()\n\n    In [15]: ia.destroy()\n\n    In [16]: h.reset()\n\n    In [17]: quit\n    (genicam) kznr@Kazunaris-MacBook:~%\n\n\nTerminology\n===========\n\nBefore start talking about the detail, let's take a look at some important terminologies that frequently appear in this document. These terminologies are listed as follows:\n\n* *The GenApi-Python Binding*: A Python module that communicates with the GenICam GenApi reference implementation.\n\n* *A GenTL Producer*: A library that has C interface and offers consumers a way to communicate with cameras over physical transport layer dependent technology hiding the detail from the consumer.\n\n* *The GenTL-Python Binding*: A Python module that communicates with GenTL Producers.\n\n* *Harvester*: An image acquisition engine.\n\n* *Harvester GUI*: A Harvester-based graphical user interface.\n\n* *A GenICam compliant device*: It's typically a camera. Just involving the GenICam reference implementation, it offers consumers a way to dynamically configure/control the target remote devices.\n\nThe following diagram shows the hierarchy and relationship of the relevant modules:\n\n.. figure:: https://user-images.githubusercontent.com/8652625/155761972-c131d638-a0cc-4c51-aa3b-752d8f3d1284.svg\n    :align: center\n    :alt: Module hierarchy\n\n\nGetting Started with Harvester\n==============================\n\nAre you ready to start working with Harvester? You can learn some more topics\non these pages:\n\n* `INSTALL.rst <docs/INSTALL.rst>`_: Learn how to install Harvester and its prerequisites.\n* `TUTORIAL.rst <docs/TUTORIAL.rst>`_: Learn how Harvester can be used on  a typical image acquisition workflow.\n\n\nOpen Source Resources\n=====================\n\nHarvester uses the following open source libraries/resources:\n\n* Pympler\n\n  | License: `Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0.html>`_\n  | Copyright (c) Jean Brouwers, Ludwig Haehne, Robert Schuppenies\n\n  | https://pythonhosted.org/Pympler/\n  | https://github.com/pympler/pympler\n  | https://pypi.org/project/Pympler/\n\n* Versioneer\n\n  | License: `The Creative Commons \"Public Domain Dedication\" license  (CC0-1.0) <https://creativecommons.org/publicdomain/zero/1.0/>`_\n  | Copyright (c) 2018 Brian Warner\n\n  | https://github.com/warner/python-versioneer\n\n\nAcknowledgement\n===============\n\nThe following individuals have directly or indirectly contributed to the development activity of Harvester; they truly are wonderful GenICam colleagues:\n\nRod Barman, Stefan Battmer, David Beek, Jan Becvar, David Bernecker, Chris Beynon, Eric Bourbonnais, Benedikt Busch, George Chamberlain, Thomas Detjen, Friedrich Dierks, Dana Diezemann, Emile Dodin, Reynold Dodson, Sascha Dorenbeck, Jozsa Elod, Erik Eloff, Katie Ensign, Andreas Ertl, James Falconer, Werner Feith, Maciej Gara, Andreas Gau, Sebastien Gendreau, Francois Gobeil, Werner Goeman, Jean-Paul Goglio, Markus Grebing, Eric Gross, Ioannis Hadjicharalambous, Uwe Hagmaier, Tim Handschack, Christopher Hartmann, Reinhard Heister, Gerhard Helfrich, Jochem Herrmann, Heiko Hirschmueller, Tom Hopfner, David Hoese, Karsten Ingeman Christensen, Severi Jaaskelainen, Alfred Johannesson, Mattias Johannesson, Mark Jones, Mattias Josefsson, Martin Kersting, Stephan Kieneke, Tom Kirchner, Lutz Koschorreck, Frank Krehl, Maarten Kuijk, Max Larin, Ralf Lay, Min Liu, Sergey Loginonvskikh, Thomas Lueck, Alain Marchand, Rocco Matano, Masahide Matsubara, Stephane Maurice, Robert McCurrach, Mike Miethig, Thies Moeller, Roman Moie, Katsura Muramatsu, Silvan Murer, Marcel Naggatz, Hartmut Nebelung, Damian Nesbitt, Quang Nhan Nguyen, Klaus-Henning Noffz, Jonas Olofsson, Neerav Patel, Jan Pech, Merlin Plock, Joerg Preckwinkel, Benjamin Pussacq, Dave Reaves, Thomas Reuter, Gordon Rice, Andreas Rittinger, Ryan Robe, Nicolas P. Rougier, Felix Ruess, Matthias Schaffland, Michael Schmidt, Jan Scholze, Martin Schwarzbauer, Rupert Stelz, Madhura Suresh, Chendra Hadi Suryanto, Andrew Wei Chuen Tan, Timo Teifel, Albert Theuwissen, Laval Tremblay, Tim Vlaar, Silvio Voitzsch, Stefan Von Weihe, Frederik Voncken, Roman Wagner, Ansger Waschki, Anne Wendel, Michael Williamson, Jean-Michel Wintgens, Manfred Wuetschner, Jang Xu, Christoph Zierl, Sebastian Yap, and Juraj Zopp\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5588:40B0C:17E2D2:5E42ED:6AB92C29"},"text_sha256":"32facf2c224f23bcd76657944a6a0cc652c8cb1de53995259379ccc34e4eee3e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"mozilla/bugbug","input_row":{"repository":"mozilla/bugbug","url":"https://github.com/mozilla/bugbug","name":"bugbug","owner":"mozilla","description":"Platform for Machine Learning projects on Software Engineering","language":"Python","license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0","license_osi_approved":"true","stars":570,"issues":1632,"created_at":"2018-03-12T15:29:09Z","updated_at":"2026-09-27T05:42:56Z","first_commit_at":"2018-03-11T20:12:35Z","last_commit_at":"2026-09-27T05:42:51Z","activity_months":102.54000000000001,"ai_ml_match_topics":"machine-learning; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:01.615Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mozilla/bugbug","visibility":"public","created_at":"2018-03-12T15:29:09Z","updated_at":"2026-09-27T05:42:56Z","private":false,"fork":false,"archived":false,"stargazers_count":570,"open_issues_count":687,"license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0"},"error":"","rate":{"github_remaining":"1988","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:18191D5:1C3F3E3:6AB92C29"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1987","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0928:71C58:17C35A7:1BE9858:6AB92C2A"},"commit":{"sha":"2364941b876efdc5aba6be2ae47b4981dd95762c","url":"https://github.com/mozilla/bugbug/commit/2364941b876efdc5aba6be2ae47b4981dd95762c","date":"2018-03-11T20:12:35Z","author_date":"2018-03-11T20:12:35Z","committer_date":"2018-03-11T20:12:35Z","tree_sha":"01110362b06c886a48fbedf7930b410dd8d0c446","message_first_line":"First commit"},"tree_request_status":200,"tree_rate":{"github_remaining":"1986","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:17A1273:1BC70AF:6AB92C2A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":445,"blob_sha":"39c59603f2d5126e57d2f1bc0b608ab970f1ee16","priority":0}],"documents":[{"path":"README.md","size":445,"blob_sha":"39c59603f2d5126e57d2f1bc0b608ab970f1ee16","priority":0,"status":200,"text":"# bugbug - Classify Bugzilla bugs between actual bugs and bugs that aren't bugs\n\nBugs on Bugzilla aren't always bugs. Sometimes they are feature requests, refactorings, and so on. The aim of this project is to distinguish between bugs that are actually bugs and bugs that aren't.\n\nThis is currently done with a set of handwritten rules.\n\nThe dataset currently contains 380 bugs, the precision of the current classifier is ~90%, the recall ~80%.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7034:3CC8A:17E239:5E4287:6AB92C29"},"text_sha256":"21cb91ca11b17ab3273d5117342bed6222f75f69c96b77f949c698dc36897834"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1985","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0932:2EA1B4:17E29C0:1C08D24:6AB92C2B"},"commit":{"sha":"d7631f55fb57bb2c678fed44a4d6c32939a0c32a","url":"https://github.com/mozilla/bugbug/commit/d7631f55fb57bb2c678fed44a4d6c32939a0c32a","date":"2026-06-30T23:43:35Z","author_date":"2026-06-30T23:43:35Z","committer_date":"2026-06-30T23:43:35Z","tree_sha":"d97540fb5518d8d75e2ef8b8f0e26ff107892ddc","message_first_line":"Add frontend-triage agent for Hackbot (#6254)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1984","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:17A5B89:1BCA7B5:6AB92C2B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9144,"blob_sha":"e09435ae4581e3c6e78acda414c4fbb458b4066a","priority":0}],"documents":[{"path":"README.md","size":9144,"blob_sha":"e09435ae4581e3c6e78acda414c4fbb458b4066a","priority":0,"status":200,"text":"# bugbug\n\n[![Task Status](https://community-tc.services.mozilla.com/api/github/v1/repository/mozilla/bugbug/master/badge.svg)](https://community-tc.services.mozilla.com/api/github/v1/repository/mozilla/bugbug/master/latest)\n[![codecov](https://codecov.io/gh/mozilla/bugbug/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/bugbug)\n<a href=\"https://chat.mozilla.org/#/room/#bugbug:mozilla.org\" target=\"_blank\">\n<img src=\"https://img.shields.io/badge/chat%20on%20[m]-%23bugbug%3Amozilla.org-blue\">\n<\/a>\n\nBugbug aims at leveraging machine learning techniques to help with bug and quality management, and other software engineering tasks (such as test selection and defect prediction).\n\nChat with us in the [bugbug](https://chat.mozilla.org/#/room/#bugbug:mozilla.org) Matrix room.\n\nMore information on the Mozilla Hacks blog:\n\n- https://hacks.mozilla.org/2020/07/testing-firefox-more-efficiently-with-machine-learning/\n- https://hacks.mozilla.org/2019/04/teaching-machines-to-triage-firefox-bugs/\n\nData generated by BugBug to train the models can be used independently from BugBug. See the [docs](docs/data.md) for details.\n\n## Classifiers\n\n- **assignee** - The aim of this classifier is to suggest an appropriate assignee for a bug.\n\n- **backout** - The aim of this classifier is to detect patches that might be more likely to be backed-out (because of build or test failures). It could be used for test prioritization/scheduling purposes.\n\n- **bugtype** - The aim of this classifier is to classify bugs according to their type. The labels are gathered automatically from bugs: right now they are \"crash/memory/performance/security\". The plan is to add more types after manual labeling.\n\n- **component** - The aim of this classifier is to assign product/component to (untriaged) bugs.\n\n- **defect vs enhancement vs task** - Extension of the **defect** classifier to detect differences also between feature requests and development tasks.\n\n- **defect** - Bugs on Bugzilla aren't always bugs. Sometimes they are feature requests, refactorings, and so on. The aim of this classifier is to distinguish between bugs that are actually bugs and bugs that aren't. The dataset currently contains 2110 bugs, the accuracy of the current classifier is ~93% (precision ~95%, recall ~94%).\n\n- **devdocneeded** - The aim of this classifier is to detect bugs that should be documented for developers.\n\n- [**needsdiagnosis**](https://github.com/webcompat/webcompat.com/blob/main/docs/ml-process.md) - The aim of this classifier is to detect issues that are likely invalid and don't need to be diagnosed for webcompat use case.\n\n- **qaneeded** - The aim of this classifier is to detect bugs that would need QA verification.\n\n- **regression vs non-regression** - Bugzilla has a `regression` keyword to identify bugs that are regressions. Unfortunately it isn't used consistently. The aim of this classifier is to detect bugs that are regressions.\n\n- **regressionrange** - The aim of this classifier is to detect regression bugs that have a regression range vs those that don't.\n\n- [**regressor**](docs/models/regressor.md) - The aim of this classifier is to detect patches which are more likely to cause regressions. It could be used to make riskier patches undergo more scrutiny.\n\n- **spam** - The aim of this classifier is to detect bugs which are spam.\n\n- **stepstoreproduce** - The aim of this classifier is to detect bugs that have steps to reproduce vs those that don't.\n\n- **testfailure** - The aim of this classifier is to detect patches that might be more likely to cause test failures.\n\n- **testselect** - The aim of this classifier is to select relevant tests to run for a given patch.\n\n- **tracking** - The aim of this classifier is to detect bugs to track.\n\n- **uplift** - The aim of this classifier is to detect bugs for which uplift should be approved and bugs for which uplift should not be approved.\n\n## Setup and Prerequisites\n\nInstall the Python dependencies using [uv](https://docs.astral.sh/uv/):\n\n```\nuv sync\n```\n\nFor test dependencies, run `uv sync --group test`. For NLP extras, run `uv sync --extra nlp`.\n\nCurrently, Python 3.12+ is required. You can double check the version we use by looking at pyproject.toml.\n\nAlso, libgit2 (needs [v1.0.0](https://github.com/libgit2/libgit2/releases/tag/v1.0.0), only in [experimental on Debian](https://wiki.debian.org/DebianExperimental)), **might** be required (if you can't install it, skip this step).\n\n```\nsudo apt-get -t experimental install libgit2-dev\n```\n\n### Auto-formatting\n\nThis project is using [pre-commit](https://pre-commit.com/). Please run `pre-commit install` to install the git pre-commit hooks on your clone.\n\nEvery time you will try to commit, pre-commit will run checks on your files to make sure they follow our style standards and they aren't affected by some simple issues. If the checks fail, pre-commit won't let you commit.\n\n## Usage\n\n### Training\n\nRun the `trainer.py` script with the command `python -m scripts.trainer` (with `--help` to see the required and optional arguments of the command) to perform training (warning this takes 30min+).\n\n### Testing\n\nTo use a model to classify a given bug, you can run `python -m scripts.bug_classifier MODEL_NAME --bug-id ID_OF_A_BUG_FROM_BUGZILLA`. N.B.: If you run the classifier script without training a model first, it will automatically download an already trained model.\n\n### Example for the \"defect\" model\n\n**training** To train the model for mode `defect`:\n\n    python3 -m scripts.trainer defect\n\n**testing** To use the model to classify a given bug, you can run `python -m scripts.bug_classifier defect --bug-id ID_OF_A_BUG_FROM_BUGZILLA`.\n\n### Training on Taskcluster (Mozilla's CI platform)\n\nYou could run the model training task on the CI. To do this, simply include `Train on Taskcluster: <model name>` in the pull request description.\n\n#### Example\n\nTo train the `spambug` model on Taskcluster, you need to add the following line in the pull request description, ideally at the bottom:\n\n```\nTrain on Taskcluster: spambug\n```\n\nThere are a few things to consider when training a model on Taskcluster:\n\n- This is currently only supported in GitHub pull requests.\n- The training task will be re-run every time you push to the branch linked to the pull request. Limiting the number of times you push is wise to avoid unnecessary training and resource wastage. Alternatively, you could temporarily remove the \"Train on Taskcluster\" keyword from the pull request description.\n- Currently, the training task extracts only the model's name and does not consider arguments.\n\n### Running the repository mining script\n\nNote: This section is only necessary if you want to perform changes to the repository mining script. Otherwise, you can simply use the commits data we generate automatically.\n\n1. Clone https://hg.mozilla.org/mozilla-central/.\n2. Run `./mach vcs-setup` in the directory where you have cloned mozilla-central.\n3. Enable the extensions mentioned in [infra/hgrc](https://github.com/mozilla/bugbug/blob/master/infra/hgrc). For example, if you are on Linux, you can add `firefoxtree` to the extensions section of the `~/.hgrc` file as:\n   ```\n   firefoxtree = ~/.mozbuild/version-control-tools/hgext/firefoxtree\n   ```\n4. Run the `repository.py` script, with the only argument being the path to the mozilla-central repository.\n\nNote: If you run into problems, it's possible the version of Mercurial you are using is not supported. Check the Docker definition at infra/dockerfile.commit_retrieval to see what we are using in production.\n\nNote: the script will take a long time to run (on my laptop more than 7 hours). If you want to test a simple change and you don't intend to actually mine the data, you can modify the repository.py script to limit the number of analyzed commits. Simply add `limit=1024` to the call to the `log` command.\n\n## Structure of the project\n\n- `bugbug/labels` contains manually collected labels;\n- `bugbug/db.py` is an implementation of a really simple JSON database;\n- `bugbug/bugzilla.py` contains the functions to retrieve bugs from the Bugzilla tracking system;\n- `bugbug/repository.py` contains the functions to mine data from the mozilla-central (Firefox) repository;\n- `bugbug/bug_features.py` contains functions to extract features from bug/commit data;\n- `bugbug/model.py` contains the base class that all models derive from;\n- `bugbug/models` contains implementations of specific models;\n- `bugbug/nn.py` contains utility functions to include Keras models into a scikit-learn pipeline;\n- `bugbug/utils.py` contains misc utility functions;\n- `bugbug/nlp` contains utility functions for NLP;\n- `bugbug/labels.py` contains utility functions for handling labels;\n- `bugbug/bug_snapshot.py` contains a module to play back the history of a bug;\n- `bugbug/github.py` contains functions to retrieve issues from GitHub for a specified owner/repository.\n\n## Using bugbug for non-Mozilla projects\n\nBugbug is focussing on Mozilla use-cases for Firefox, Bugzilla and GitHub.\nHowever, we will be happy to accept pull requests adding support for other projects or bug trackers.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6432:18CDF1:178D39:56270F:6AB92C25"},"text_sha256":"37f3d161b5b3036bab7d37ab88f261af166ddfb1439aa137c863ec95ee2539c0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"X-DataInitiative/tick","input_row":{"repository":"X-DataInitiative/tick","url":"https://github.com/X-DataInitiative/tick","name":"tick","owner":"X-DataInitiative","description":"Module for statistical learning, with a particular emphasis on time-dependent modelling","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":556,"issues":250,"created_at":"2016-12-01T10:59:08Z","updated_at":"2026-09-08T02:43:24Z","first_commit_at":"2017-03-30T14:49:20Z","last_commit_at":"2026-05-04T12:57:40Z","activity_months":109.13,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:04.368Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"X-DataInitiative/tick","visibility":"public","created_at":"2016-12-01T10:59:08Z","updated_at":"2026-09-08T02:43:24Z","private":false,"fork":false,"archived":false,"stargazers_count":556,"open_issues_count":86,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1983","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D9:6C6ED:17FBDFC:1C2189E:6AB92C2C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1982","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:18025AA:1C27E03:6AB92C2C"},"commit":{"sha":"211ddb5af22c2cc3b8c1eeb27450f56cbcb09af2","url":"https://github.com/X-DataInitiative/tick/commit/211ddb5af22c2cc3b8c1eeb27450f56cbcb09af2","date":"2018-05-24T16:11:04Z","author_date":"2018-05-24T16:11:04Z","committer_date":"2018-05-24T16:11:04Z","tree_sha":"2d26e077ec1f90cc18dea8518a4c409e01ae0de6","message_first_line":"Merge pull request #233 from X-DataInitiative/#185_Add_float32"},"tree_request_status":200,"tree_rate":{"github_remaining":"1981","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DA:37D6E2:181946C:1C3F6E7:6AB92C2D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6024,"blob_sha":"245aeca4cf7e622bd97333e3a1107ec0e0caad0f","priority":0}],"documents":[{"path":"README.md","size":6024,"blob_sha":"245aeca4cf7e622bd97333e3a1107ec0e0caad0f","priority":0,"status":200,"text":"\n[![PyPI version](https://badge.fury.io/py/tick.svg)](https://badge.fury.io/py/tick)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/xdata-tick/Lobby)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n| Operating system  | Build Status |\n| ------------- | ------------- |\n| Linux/Mac  | [![Linux/Mac Build](https://travis-ci.org/X-DataInitiative/tick.svg?branch=master)](https://travis-ci.org/X-DataInitiative/tick)  |\n| Windows  | [![Windows Build](https://ci.appveyor.com/api/projects/status/abjfv0rawliv0qqn/branch/master?svg=true)](https://ci.appveyor.com/project/Dekken/tick-cyjm4)  |\n\n\n# tick\n\n_tick_ is a Python 3 module for statistical learning, with a particular emphasis on time-dependent modeling. It is distributed under the 3-Clause BSD license, see [LICENSE.txt](LICENSE.txt).\n\nThe project was started in 2016 by Emmanuel Bacry, Martin Bompaire, Stéphane Gaïffas and Søren Vinther Poulsen at the [Datascience initiative](https://portail.polytechnique.edu/datascience/en) of [École Polytechnique](https://www.polytechnique.edu/en), France. The list of contributors is available in [CONTRIBUTORS.md](CONTRIBUTORS.md).\n\n## Quick description\n\n_tick_ is a machine learning library for Python 3. The focus is on statistical learning for time dependent systems, such as point processes. Tick features  also tools for generalized linear models and a generic optimization toolbox.\nThe core of the library is an optimization module providing model computational classes, solvers and proximal operators for regularization. It comes also with inference and simulation tools intended for end-users who for example can easily:\n\n- Perform linear, logistic or Poisson regression\n- Simulate point Hawkes processes with standard or exotic kernels.\n- Infer Hawkes models with various assumptions on the kernels: exponential or sum of exponential kernels, linear combination of basis kernels, sparse interactions, etc.\n\nA comprehensive list of examples can be found at\n\n- [https://x-datainitiative.github.io/tick/auto_examples/index.html](https://x-datainitiative.github.io/tick/auto_examples/index.html)\n\nand the documentation is available at\n\n- [https://x-datainitiative.github.io/tick](https://x-datainitiative.github.io/tick/)\n\nThe paper associated to this library has been published at\n\n- [https://arxiv.org/abs/1707.03003](https://arxiv.org/abs/1707.03003)\n\nIf you use _tick_ in a scientific publication, we would appreciate citations.\n\n<img align=\"right\" src=\"https://raw.githubusercontent.com/X-DataInitiative/tick/master/doc/images/intel_logo.png\" width=\"200\" alt=\"intel logo\" />\nThe <i>tick<\/i> library is released with the support of Intel®. It uses the Intel® Math Kernel Library (MKL) optimized for Intel® Xeon Phi™ and Intel® Xeon™ processors. <i>tick<\/i> runs efficiently on everything from desktop computers to powerful high-performance servers.\n\n\n## Use cases\n\n_tick_ is used for many industrial applications including:\n\n* [A joint work](https://portail.polytechnique.edu/datascience/fr/node/329) with the French national social security (CNAMTS) to analyses a huge health-care database, that describes the medical care provided to most of the French citizens. For this project, _tick_ is used to detect weak signals in pharmacovigilance, in order quantify the impact of drugs exposures to the occurrence of adverse events.\n\n* High-frequency order book modeling in finance, in order to understand the interactions between different event types and/or between different assets, leveraging the full time resolution available in the original data.\n\n* Analyze the propagation of information in social media. Thanks to a dataset collected during 2017's presidential French election campaign on Twitter, _tick_ is used to recover, for each topic, the network across which information spreads inside the political sphere.\n\n\n## Quick setup\n\n### Requirements\n\n_tick_ currently works on Linux/OSX (Windows is experimental) systems and requires Python 3.5 or newer. Please have the required Python dependencies in your Python environment:\n\n### Install using _pip_\n\n_tick_ is available via _pip_. In your local Python environment (or global, with sudo rights), do:\n\n    pip install tick\n\nInstallation may take a few minutes to build and link C++ extensions. At this point _tick_ should be ready to use available (if necessary, you can add _tick_ to the `PYTHONPATH` as explained below).\n\n### Verify install\n\nRun the following command and there should be no error\n\n    python3 -c \"import tick;\"\n\n\n## Source Installation\n\nPlease see the [INSTALL document](INSTALL.md)\n\n## Help and Support\n\n### Documentation\n\nDocumentation is available on\n\n- [https://x-datainitiative.github.io/tick](https://x-datainitiative.github.io/tick/)\n\nThis documentation is built with `Sphinx` and can be compiled and used locally by running `make html` from within the `doc` directory. This obviously needs to have `Sphinx` installed. Several tutorials and code-samples are available in the documentation.\n\n### Communication\n\nTo reach the developers of _tick_, please join our community channel on Gitter (https://gitter.im/xdata-tick).\n\nIf you've found a bug that needs attention, please raise an issue here on Github. Please try to be as precise in the bug description as possible, such that the developers and other contributors can address the issue efficiently.\n\n### Citation\n\nIf you use _tick_ in a scientific publication, we would appreciate citations. You can use the following bibtex entry:\n\n    @ARTICLE{2017arXiv170703003B,\n      author = {{Bacry}, E. and {Bompaire}, M. and {Ga{\\\"i}ffas}, S. and {Poulsen}, S.},\n      title = \"{tick: a Python library for statistical learning, with\n        a particular emphasis on time-dependent modeling}\",\n      journal = {ArXiv e-prints},\n      eprint = {1707.03003},\n      year = 2017,\n      month = jul\n    }\n\n\n## Developers\n\nPlease see the [CONTRIBUTING document](CONTRIBUTING.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:171941:5D76EF:6AB92C2D"},"text_sha256":"86312f9685724ccb5fd48a073af9830cef3d0bb265a3baca077b60e344b9a93d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1980","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093F:0BA1:D93713:FF43D2:6AB92C2D"},"commit":{"sha":"a40d19f868c22469be90c1e6c50bc3dab26ff070","url":"https://github.com/X-DataInitiative/tick/commit/a40d19f868c22469be90c1e6c50bc3dab26ff070","date":"2026-05-04T12:57:40Z","author_date":"2026-05-04T12:57:40Z","committer_date":"2026-05-04T12:57:40Z","tree_sha":"e51c5368bbd9802ba30f0e9a4c2106e4c656e09a","message_first_line":"Bump version to 0.8.0.2 (#538)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1979","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0893:71E0C:17FBE2B:1C20BC9:6AB92C2E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6024,"blob_sha":"245aeca4cf7e622bd97333e3a1107ec0e0caad0f","priority":0}],"documents":[{"path":"README.md","size":6024,"blob_sha":"245aeca4cf7e622bd97333e3a1107ec0e0caad0f","priority":0,"status":200,"text":"\n[![PyPI version](https://badge.fury.io/py/tick.svg)](https://badge.fury.io/py/tick)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/xdata-tick/Lobby)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n| Operating system  | Build Status |\n| ------------- | ------------- |\n| Linux/Mac  | [![Linux/Mac Build](https://travis-ci.org/X-DataInitiative/tick.svg?branch=master)](https://travis-ci.org/X-DataInitiative/tick)  |\n| Windows  | [![Windows Build](https://ci.appveyor.com/api/projects/status/abjfv0rawliv0qqn/branch/master?svg=true)](https://ci.appveyor.com/project/Dekken/tick-cyjm4)  |\n\n\n# tick\n\n_tick_ is a Python 3 module for statistical learning, with a particular emphasis on time-dependent modeling. It is distributed under the 3-Clause BSD license, see [LICENSE.txt](LICENSE.txt).\n\nThe project was started in 2016 by Emmanuel Bacry, Martin Bompaire, Stéphane Gaïffas and Søren Vinther Poulsen at the [Datascience initiative](https://portail.polytechnique.edu/datascience/en) of [École Polytechnique](https://www.polytechnique.edu/en), France. The list of contributors is available in [CONTRIBUTORS.md](CONTRIBUTORS.md).\n\n## Quick description\n\n_tick_ is a machine learning library for Python 3. The focus is on statistical learning for time dependent systems, such as point processes. Tick features  also tools for generalized linear models and a generic optimization toolbox.\nThe core of the library is an optimization module providing model computational classes, solvers and proximal operators for regularization. It comes also with inference and simulation tools intended for end-users who for example can easily:\n\n- Perform linear, logistic or Poisson regression\n- Simulate point Hawkes processes with standard or exotic kernels.\n- Infer Hawkes models with various assumptions on the kernels: exponential or sum of exponential kernels, linear combination of basis kernels, sparse interactions, etc.\n\nA comprehensive list of examples can be found at\n\n- [https://x-datainitiative.github.io/tick/auto_examples/index.html](https://x-datainitiative.github.io/tick/auto_examples/index.html)\n\nand the documentation is available at\n\n- [https://x-datainitiative.github.io/tick](https://x-datainitiative.github.io/tick/)\n\nThe paper associated to this library has been published at\n\n- [https://arxiv.org/abs/1707.03003](https://arxiv.org/abs/1707.03003)\n\nIf you use _tick_ in a scientific publication, we would appreciate citations.\n\n<img align=\"right\" src=\"https://raw.githubusercontent.com/X-DataInitiative/tick/master/doc/images/intel_logo.png\" width=\"200\" alt=\"intel logo\" />\nThe <i>tick<\/i> library is released with the support of Intel®. It uses the Intel® Math Kernel Library (MKL) optimized for Intel® Xeon Phi™ and Intel® Xeon™ processors. <i>tick<\/i> runs efficiently on everything from desktop computers to powerful high-performance servers.\n\n\n## Use cases\n\n_tick_ is used for many industrial applications including:\n\n* [A joint work](https://portail.polytechnique.edu/datascience/fr/node/329) with the French national social security (CNAMTS) to analyses a huge health-care database, that describes the medical care provided to most of the French citizens. For this project, _tick_ is used to detect weak signals in pharmacovigilance, in order quantify the impact of drugs exposures to the occurrence of adverse events.\n\n* High-frequency order book modeling in finance, in order to understand the interactions between different event types and/or between different assets, leveraging the full time resolution available in the original data.\n\n* Analyze the propagation of information in social media. Thanks to a dataset collected during 2017's presidential French election campaign on Twitter, _tick_ is used to recover, for each topic, the network across which information spreads inside the political sphere.\n\n\n## Quick setup\n\n### Requirements\n\n_tick_ currently works on Linux/OSX (Windows is experimental) systems and requires Python 3.5 or newer. Please have the required Python dependencies in your Python environment:\n\n### Install using _pip_\n\n_tick_ is available via _pip_. In your local Python environment (or global, with sudo rights), do:\n\n    pip install tick\n\nInstallation may take a few minutes to build and link C++ extensions. At this point _tick_ should be ready to use available (if necessary, you can add _tick_ to the `PYTHONPATH` as explained below).\n\n### Verify install\n\nRun the following command and there should be no error\n\n    python3 -c \"import tick;\"\n\n\n## Source Installation\n\nPlease see the [INSTALL document](INSTALL.md)\n\n## Help and Support\n\n### Documentation\n\nDocumentation is available on\n\n- [https://x-datainitiative.github.io/tick](https://x-datainitiative.github.io/tick/)\n\nThis documentation is built with `Sphinx` and can be compiled and used locally by running `make html` from within the `doc` directory. This obviously needs to have `Sphinx` installed. Several tutorials and code-samples are available in the documentation.\n\n### Communication\n\nTo reach the developers of _tick_, please join our community channel on Gitter (https://gitter.im/xdata-tick).\n\nIf you've found a bug that needs attention, please raise an issue here on Github. Please try to be as precise in the bug description as possible, such that the developers and other contributors can address the issue efficiently.\n\n### Citation\n\nIf you use _tick_ in a scientific publication, we would appreciate citations. You can use the following bibtex entry:\n\n    @ARTICLE{2017arXiv170703003B,\n      author = {{Bacry}, E. and {Bompaire}, M. and {Ga{\\\"i}ffas}, S. and {Poulsen}, S.},\n      title = \"{tick: a Python library for statistical learning, with\n        a particular emphasis on time-dependent modeling}\",\n      journal = {ArXiv e-prints},\n      eprint = {1707.03003},\n      year = 2017,\n      month = jul\n    }\n\n\n## Developers\n\nPlease see the [CONTRIBUTING document](CONTRIBUTING.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:171941:5D76EF:6AB92C2D"},"text_sha256":"86312f9685724ccb5fd48a073af9830cef3d0bb265a3baca077b60e344b9a93d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"CycloneDX/specification","input_row":{"repository":"CycloneDX/specification","url":"https://github.com/CycloneDX/specification","name":"specification","owner":"CycloneDX","description":"OWASP CycloneDX is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for cyber risk reduction. SBOM, SaaSBOM, HBOM, AI/ML-BOM, CBOM, OBOM, MBOM, VDR, and VEX","language":"XSLT","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":554,"issues":485,"created_at":"2017-05-29T02:22:06Z","updated_at":"2026-09-27T11:44:39Z","first_commit_at":"2017-05-29T02:22:06Z","last_commit_at":"2026-09-24T16:01:39Z","activity_months":111.88,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:06.939Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"CycloneDX/specification","visibility":"public","created_at":"2017-05-29T02:22:06Z","updated_at":"2026-09-27T11:44:39Z","private":false,"fork":false,"archived":false,"stargazers_count":554,"open_issues_count":221,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1978","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FF:71E0C:17FBEBD:1C20C61:6AB92C2E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1977","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0806:DC698:18027A0:1C28044:6AB92C2F"},"commit":{"sha":"61d3f1605aaecc54fadf60e4bf948a48e39c0bc2","url":"https://github.com/CycloneDX/specification/commit/61d3f1605aaecc54fadf60e4bf948a48e39c0bc2","date":"2018-05-22T22:40:41Z","author_date":"2018-05-22T22:40:41Z","committer_date":"2018-05-22T22:40:41Z","tree_sha":"00d8353addd420307a1e2d17ff57de0c55834540","message_first_line":"Added code to generate license list for cyclonedx node module"},"tree_request_status":200,"tree_rate":{"github_remaining":"1976","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17DFCFC:1C05A55:6AB92C2F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4940,"blob_sha":"925b9e39d6a95f2618fbd719e157655cb5178123","priority":0}],"documents":[{"path":"README.md","size":4940,"blob_sha":"925b9e39d6a95f2618fbd719e157655cb5178123","priority":0,"status":200,"text":"[![License][license-image]][license-url]\n\nCycloneDX Specification\n=====================================\n\nCycloneDX is a data exchange specification intended to easily identify software components as bill of materials.\n\nBackground\n-------------------\n\nIn software development, it is common to build new software by leveraging existing components. In doing so, it is often necessary to provide a bill of materials that describes the components that are packaged with an application. This necessity of generally driven by legal or software security requirements.\n\nToday, most build systems provide some form of dependency tree that documents or illustrates the software components used in a specific build. Depending on the build system, this may or may not be accurate or representative of the final delivery.\n\nIt is also common to combine multiple languages or development platforms in creating new types of applications. The use of multiple build systems is often required in these scenarios.\n\nProject Goals\n-------------------\n\n* Define a specification independent of language, platform, or build system\n* Specification should be human and machine readable and simple to implement\n* Provide schema definitions for JSON and XML\n* Reuse parts of existing specs, if beneficial\n\nFeatures\n-------------------\n\nCycloneDX is intended to provide high-level component information that would be useful to legal or software security teams.\n\n* Provide information such as component vendor, name, and version\n* Identify the license used by the component\n* If the component is distributed in a package, provide a file hash for the component\n\nUse Cases\n-------------------\n\nThe simplest use case involves an author of a component. The author would easily create a valid CycloneDX document using their IDE or text editor. The document specification describes a set of pre-defined fields that are intended to describe the component, who made it, the version, the license, and all other relevant information that would be useful to software security teams.\n\nToday, this information may or may not be available depending on the development language used. If available, the information is often extracted from components as a set of evidence. The fields and their meanings are typically not enforced and vary between language and build system. CycloneDX provides a standards-based method of self-identifying components without adding additional complexity.\n\nNamespaces\n-------------------\n\nCycloneDX defines two unique namespaces, a bill-of-material (bom) namespace and a SPDX namespace. The SPDX namespace\nevolves independently from the bom namespace. As new SPDX licenses are added to the SPDX specification, those changes \nwill be reflected in the bom namespace automatically, without having to change namespaces.\n\nCycloneDX is a versioned namespace and operates as follows:\n\n* `http://cyclonedx.org/schema/bom` will always reference the latest version of the spec.\n* Supplying a version after /bom such as `http://cyclonedx.org/schema/bom/1.0` will specify a specific version of the spec.\n\nAdopters\n-------------------\n\nThe idea behind CycloneDX originated from the OWASP [Dependency-Track][odc-url] project. There are many benefits of\nbeing able to easily create BOMs and push the data to the Dependency-Track platform through automation. There are,\nof course, many other uses of this format. \n\nIf you know of a project that has adopted CycloneDX, feel free to submit a pull request by adding it to the list below:\n\n* [Dependency-Track][odc-url]\n\nRelated Work\n-------------------\n\n[SPDX (Software Package Data Exchange)][spdx-url] is a specification that provides low-level details of components, including all files, hashes, authors, and copyrights. SPDX also defines over 300 open source license IDs. CycloneDX builds on top of the work SPDX has accomplished with license IDs, but varies greatly in its approach towards building a software bill of material specification.\n\n[CPE (Common Platform Enumeration)][cpe-url] is a specification that describes the vendor, name, and version for an application, operating system, or hardware device. CPE identifiers are used in the National Vulnerability Database to describe vulnerable components. The CycloneDX specification compliments this work as CycloneDX documents can easily be used to construct exact CPE identifiers that are useful in determining if a specific component has a known vulnerability (CVE).\n\nCopyright & License\n-------------------\n\nCycloneDX is Copyright (c) Steve Springett. All Rights Reserved.\n\nPermission to modify and redistribute is granted under the terms of the [Apache License 2.0][license-url]\n\n  [license-image]: https://img.shields.io/badge/license-apache%20v2-brightgreen.svg\n  [license-url]: https://github.com/CycloneDX/specification/blob/master/LICENSE\n  [spdx-url]: https://spdx.org\n  [cpe-url]: https://nvd.nist.gov/products/cpe\n  [odc-url]: https://dependencytrack.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C58:345ED4:17986F:5DF80C:6AB92C2F"},"text_sha256":"d3ad00baac5251242bbdf608569bdad0aa6b6ff1229baad46d79654e4fe2e4f5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1975","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:17B7CB9:1BDDCA5:6AB92C30"},"commit":{"sha":"2e0fba32bb2ce20eec37b5c6179395cb942096da","url":"https://github.com/CycloneDX/specification/commit/2e0fba32bb2ce20eec37b5c6179395cb942096da","date":"2026-06-03T13:09:37Z","author_date":"2026-06-03T13:09:37Z","committer_date":"2026-06-03T13:09:37Z","tree_sha":"53adb648e2f8ffff9b17979b05677149efd49faa","message_first_line":"ci: adjust zizmor (#946)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1974","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17DD4BF:1C02BB7:6AB92C30"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5285,"blob_sha":"473e2444b5edaa6a8eeb6cb39a1bd5c91873822f","priority":0}],"documents":[{"path":"README.md","size":5285,"blob_sha":"473e2444b5edaa6a8eeb6cb39a1bd5c91873822f","priority":0,"status":200,"text":"\n# CycloneDX Bill of Materials Specification (ECMA-424)\n\n[![License][license-image]][license-url]\n[![ECMA TC54](https://img.shields.io/badge/ECMA-TC54-FC7C00?labelColor=404040)](https://tc54.org) \n[![Website](https://img.shields.io/badge/https://-cyclonedx.org-blue.svg)](https://cyclonedx.org/)\n[![Slack Invite](https://img.shields.io/badge/Slack-Join-blue?logo=slack&labelColor=393939)](https://cyclonedx.org/slack/invite)\n[![Group Discussion](https://img.shields.io/badge/discussion-groups.io-blue.svg)](https://groups.io/g/CycloneDX)\n[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Follow)](https://twitter.com/CycloneDX_Spec)  \n[![Build Docs](https://github.com/CycloneDX/specification/actions/workflows/build_docs.yml/badge.svg)](https://github.com/CycloneDX/specification/actions/workflows/build_docs.yml)\n[![CT Java](https://github.com/CycloneDX/specification/actions/workflows/test_java.yml/badge.svg)](https://github.com/CycloneDX/specification/actions/workflows/test_java.yml)\n[![CT JavaScript](https://github.com/CycloneDX/specification/actions/workflows/test_js.yml/badge.svg)](https://github.com/CycloneDX/specification/actions/workflows/test_js.yml)\n[![CT PHP](https://github.com/CycloneDX/specification/actions/workflows/test_php.yml/badge.svg)](https://github.com/CycloneDX/specification/actions/workflows/test_php.yml)\n[![CT ProtoBuf](https://github.com/CycloneDX/specification/actions/workflows/test_proto.yml/badge.svg)](https://github.com/CycloneDX/specification/actions/workflows/test_proto.yml)    \n\n----\n\nOWASP CycloneDX is a full-stack Bill of Materials (BOM) standard that provides advanced supply chain capabilities for \ncyber risk reduction. CycloneDX is an [Ecma International](https://ecma-international.org/) standard published as \n[ECMA-424](https://ecma-international.org/publications-and-standards/standards/ecma-424/). \nThe [OWASP Foundation](https://owasp.org/) and Ecma International [Technical Committee for Software & System Transparency (TC54)](https://tc54.org/) \ndrive the continued advancement of the specification.\n\nThe specification supports:\n* Software Bill of Materials (SBOM)\n* Software-as-a-Service Bill of Materials (SaaSBOM)\n* Hardware Bill of Materials (HBOM)\n* Machine Learning Bill of Materials (ML-BOM)\n* Cryptography Bill of Materials (CBOM)\n* Manufacturing Bill of Materials (MBOM)\n* Operations Bill of Materials (OBOM)\n* Vulnerability Disclosure Reports (VDR)\n* Vulnerability Exploitability eXchange (VEX)\n* CycloneDX Attestations (CDXA)\n\n## A Note on the Standard and Schemas\nCycloneDX is an Ecma International standard published as ECMA-424 under a [royalty-free patent policy](https://ecma-international.org/policies/by-ipr/royalty-free-patent-policy-extension-option/). \nThe CycloneDX schemas in this repository are the official interpretations of the standard and are available under the\n[Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0.txt). The JSON Schema is the reference implementation \nfor the standard.\n\n## Use Cases\nThe CycloneDX project maintains a [list of achievable use cases](https://cyclonedx.org/use-cases/). Examples for each\nuse case are provided in both XML and JSON.\n\n\n## Tool Center\nThe [CycloneDX Tool Center](https://cyclonedx.org/tool-center/) is a community effort to establish a marketplace of \nfree, open source, and proprietary tools and solutions that support the CycloneDX specification. \n\n\n## Media Types\n\nThe following media types are officially registered with IANA:\n\n| Media Type | Format | Assignment |\n|------------|--------|------------|\n| `application/vnd.cyclonedx+xml` | XML | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+xml) |\n| `application/vnd.cyclonedx+json` | JSON | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+json) |\n| `application/x.vnd.cyclonedx+protobuf` | Protocol Buffer | |\n\nSpecific versions of CycloneDX can be specified by using the version parameter. For example: `application/vnd.cyclonedx+xml; version=1.6`.\n\n\n## Recognized file patterns\n\nThe following file names are conventionally used for storing CycloneDX BOM files:\n* `bom.json` for JSON encoded CycloneDX BOM files.\n* `bom.xml` for XML encoded CycloneDX BOM files.\n\nAlternatively, files that match the glob pattern below are also recognized:\n* `*.cdx.json` for JSON encoded CycloneDX BOM files.\n* `*.cdx.xml` for XML encoded CycloneDX BOM files.\n    \n\n## Release History\n\n| Version           | Release Date    |\n|-------------------|-----------------|\n| CycloneDX 1.7     | 21 October 2025 |\n| CycloneDX 1.6     | 09 April 2024   |\n| CycloneDX 1.5     | 26 June 2023    |\n| CycloneDX 1.4     | 12 January 2022 |\n| CycloneDX 1.3     | 04 May 2021     |\n| CycloneDX 1.2     | 26 May 2020     |\n| CycloneDX 1.1     | 03 March 2019   |\n| CycloneDX 1.0     | 26 March 2018   |\n| Initial Prototype | 01 May 2017     |\n\n\n## Copyright & License\n\nCycloneDX Specification is Copyright (c) OWASP Foundation. All Rights Reserved.\n\nPermission to modify and redistribute is granted under the terms of the [Apache License 2.0][license-url]\n\n[license-image]: https://img.shields.io/badge/license-apache%20v2-brightgreen.svg\n[license-url]: https://github.com/CycloneDX/specification/blob/master/LICENSE\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3686:2B291E:18473D:5EA852:6AB92C31"},"text_sha256":"5d08bea938fbe8964d5406f1b5e9975593337bd3202d275678f7275a9a751831"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"machinelearnjs/machinelearnjs","input_row":{"repository":"machinelearnjs/machinelearnjs","url":"https://github.com/machinelearnjs/machinelearnjs","name":"machinelearnjs","owner":"machinelearnjs","description":"Machine Learning library for the web and Node.","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":540,"issues":106,"created_at":"2018-04-29T00:14:06Z","updated_at":"2026-09-09T22:51:47Z","first_commit_at":"2018-04-29T00:51:27Z","last_commit_at":"2025-04-06T14:33:54Z","activity_months":83.260000000000005,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:09.677Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"machinelearnjs/machinelearnjs","visibility":"public","created_at":"2018-04-29T00:14:06Z","updated_at":"2026-09-09T22:51:47Z","private":false,"fork":false,"archived":false,"stargazers_count":540,"open_issues_count":33,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1973","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089A:72BD3:1805F97:1C2BFA1:6AB92C31"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1972","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0901:278AC2:186DEA6:1C9429E:6AB92C32"},"commit":{"sha":"bf8ca7912f9ddc8fb570cb9d67a88bded21e24b5","url":"https://github.com/machinelearnjs/machinelearnjs/commit/bf8ca7912f9ddc8fb570cb9d67a88bded21e24b5","date":"2018-05-23T13:23:08Z","author_date":"2018-05-23T13:23:08Z","committer_date":"2018-05-23T13:23:08Z","tree_sha":"cf964d5de4a5b764fd6736b30e37328229cce436","message_first_line":"kfold done"},"tree_request_status":200,"tree_rate":{"github_remaining":"1971","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17DD5F8:1C02D0B:6AB92C32"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":835,"blob_sha":"72a6b5f938c9fe344cf9c94599b31d0cfa85f825","priority":0}],"documents":[{"path":"README.md","size":835,"blob_sha":"72a6b5f938c9fe344cf9c94599b31d0cfa85f825","priority":0,"status":200,"text":"# scikit-learn-js\n\nscikit-learn-js is a Javascript, which is written in Typescript, port of \nfamous Python Machine Learning library Scikit-learn. This Javascript library is\nstill growing and many APIs are scheduled to be ported over or integrated. \n\n# Installation\n\nRequirements:\n\n- Node version >= 7\n\n```bash\n# yan add --save scikit-learn-js\n# npm install --save scikit-learn-js\n```\n\n# Development\n\nWe welcome new contributors of all level of experience. For example if you are:\n\n- Looking forward to jump into Machine Learning but JS is your primary language\n- Looking to be part of a growing community\n- You want to learn Typescript\n- You want to learn Machine Learning\n\n#### Docker environment\n\n```bash\n$ cd ~/scikit-learn-js\n$ docker build -t scikit:latest .\n$ docker run -it -v $(pwd):/home/node/app/ -v  scikit:latest bash\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:180B49:5E6BF2:6AB92C31"},"text_sha256":"22e1e3ded1e26e1b9129c639ca28eb7f1d55adb2aea2e78d7cc1878ed88ca5f0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1970","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:180DC69:1C33E9C:6AB92C33"},"commit":{"sha":"bfb6ddeb2c10ec9455eb32bd44c193165a13eb61","url":"https://github.com/machinelearnjs/machinelearnjs/commit/bfb6ddeb2c10ec9455eb32bd44c193165a13eb61","date":"2025-04-06T14:33:54Z","author_date":"2025-04-06T14:33:54Z","committer_date":"2025-04-06T14:33:54Z","tree_sha":"2a58af0f5198c9274efe5db39fcdd97a0456c833","message_first_line":"docs: adding secrets"},"tree_request_status":200,"tree_rate":{"github_remaining":"1969","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17D69DC:1BFC791:6AB92C33"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6793,"blob_sha":"8f2c29eb7939a50013312fc81642ac3f90869ace","priority":0}],"documents":[{"path":"README.md","size":6793,"blob_sha":"8f2c29eb7939a50013312fc81642ac3f90869ace","priority":0,"status":200,"text":"# machinelearn.js\n\nmachinelearn.js is a Machine Learning library written in Typescript. It solves Machine Learning problems\nand teaches users how Machine Learning algorithms work.\n\n[![Build Status](https://dev.azure.com/jasonShin91/machinelearn.js/_apis/build/status/machinelearnjs.machinelearnjs?branchName=master)](https://dev.azure.com/jasonShin91/machinelearn.js/_build/latest?definitionId=1&branchName=master)\n[![Build status](https://ci.appveyor.com/api/projects/status/juf77mt9fujcd2a2/branch/master?svg=true)](https://ci.appveyor.com/project/JasonShin/machinelearnjs/branch/master)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FJasonShin%2Fkalimdorjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FJasonShin%2Fkalimdorjs?ref=badge_shield)\n[![Slack](https://slack.bri.im/badge.svg)](https://slack.bri.im)\n[![ZenHub](https://i.imgur.com/nMF1yqZ.png)](https://app.zenhub.com/workspaces/machinelearnjs-5bef95354b5806bc2bf57ff3/boards?repos=131453423)\n\n<img src=\"https://i.imgur.com/I5VbqB1.jpg\">\n\n# User Installation\n\nUsing yarn\n\n```bash\n$ yarn add machinelearn\n```\n\nUsing NPM\n\n```bash\n$ npm install --save machinelearn\n```\n\nOn the browsers\n\nWe use [jsdeliver](https://www.jsdelivr.com/package/npm/machinelearn) to distribute browser version of machinelearn.js\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/machinelearn/machinelearn.min.js\"><\/script>\n<script>\n    const { RandomForestClassifier } = ml.ensemble;\n    const cls = new RandomForestClassifier();\n<\/script>\n```\n\nPlease see [https://www.jsdelivr.com/package/npm/machinelearn](https://www.jsdelivr.com/package/npm/machinelearn) for more details.\n\n# Accelerations\n\nBy default, machinelearning.js will use pure Javascript version of tfjs. To enable acceleration\nthrough C++ binding or GPU, you must import `machinelearn-node` for C++ or `machinelearn-gpu` for GPU.\n\n1. C++\n\n* installation\n\n```bash\nyarn add machinelearn-node\n```\n\n* activation\n\n```javascript\nimport 'machinelearn-node';\n```\n\n2. GPU\n\n* installation\n\n```bash\nyarn add machinelearn-gpu\n```\n\n* activation\n\n```javascript\nimport 'machinelearn-gpu';\n```\n\n# Ask AI\n[Machinelearn.js](https://codeparrot.ai/oracle?owner=machinelearnjs&repo=machinelearnjs) Bot will help you understand this repository better. You can ask for code examples, installation guide, debugging help and much more.\n\n# Highlights\n\n* Machine Learning on the browser and Node.js\n* Learning APIs for users\n* Low entry barrier\n\n# Development\n\nWe welcome new contributors of all level of experience. The development guide will be added\nto assist new contributors to easily join the project.\n\n* You want to participate in a Machine Learning project, which will boost your Machine Learning skills and knowledge\n* Looking to be part of a growing community\n* You want to learn Machine Learning\n* You like Typescript :heart: Machine Learning\n\n# Simplicity\n\nmachinelearn.js provides a simple and consistent set of APIs to interact with the models and algorithms.\nFor example, all models have follow APIs:\n\n* `fit` for training\n* `predict` for inferencing\n* `toJSON` for saving the model's state\n* `fromJSON` for loading the model from the checkpoint\n\n# Testing\n\nTesting ensures you that you are currently using the most stable version of machinelearn.js\n\n```bash\n$ npm run test\n```\n\n# Supporting\n\nSimply give us a :star2: by clicking on <img width=\"45\" src=\"https://i.imgur.com/JEOaKBk.png\">\n\n# Contributing\n\nWe simply follow \"fork-and-pull\" workflow of Github. Please read CONTRIBUTING.md for more detail.\n\n# Further notice\n\nGreat references that helped building this project!\n\n* https://machinelearningmastery.com/\n* https://github.com/mljs/ml\n* http://scikit-learn.org/stable/documentation.html\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n\n<!-- prettier-ignore -->\n| [<img src=\"https://avatars0.githubusercontent.com/u/2525002?v=4\" width=\"100px;\"/><br /><sub><b>Jason Shin<\/b><\/sub>](https://github.com/JasonShin)<br />[📝](#blog-JasonShin \"Blogposts\") [🐛](https://github.com/machinelearnjs/machinelearnjs/issues?q=author%3AJasonShin \"Bug reports\") [💻](https://github.com/machinelearnjs/machinelearnjs/commits?author=JasonShin \"Code\") [📖](https://github.com/machinelearnjs/machinelearnjs/commits?author=JasonShin \"Documentation\") [⚠️](https://github.com/machinelearnjs/machinelearnjs/commits?author=JasonShin \"Tests\") | [<img src=\"https://avatars0.githubusercontent.com/u/21098186?v=4\" width=\"100px;\"/><br /><sub><b>Jaivarsan<\/b><\/sub>](https://github.com/greed2411)<br />[💬](#question-greed2411 \"Answering Questions\") [🤔](#ideas-greed2411 \"Ideas, Planning, & Feedback\") [📢](#talk-greed2411 \"Talks\") | [<img src=\"https://avatars2.githubusercontent.com/u/9072266?v=4\" width=\"100px;\"/><br /><sub><b>Oleg Stotsky<\/b><\/sub>](https://github.com/OlegStotsky)<br />[🐛](https://github.com/machinelearnjs/machinelearnjs/issues?q=author%3AOlegStotsky \"Bug reports\") [💻](https://github.com/machinelearnjs/machinelearnjs/commits?author=OlegStotsky \"Code\") [📖](https://github.com/machinelearnjs/machinelearnjs/commits?author=OlegStotsky \"Documentation\") [⚠️](https://github.com/machinelearnjs/machinelearnjs/commits?author=OlegStotsky \"Tests\") | [<img src=\"https://avatars3.githubusercontent.com/u/687794?v=4\" width=\"100px;\"/><br /><sub><b>Ben<\/b><\/sub>](https://github.com/benjaminmcdonald)<br />[💬](#question-benjaminmcdonald \"Answering Questions\") [🎨](#design-benjaminmcdonald \"Design\") [📢](#talk-benjaminmcdonald \"Talks\") [🐛](https://github.com/machinelearnjs/machinelearnjs/issues?q=author%3Abenjaminmcdonald \"Bug reports\") [💻](https://github.com/machinelearnjs/machinelearnjs/commits?author=benjaminmcdonald \"Code\") | [<img src=\"https://avatars1.githubusercontent.com/u/7292257?v=4\" width=\"100px;\"/><br /><sub><b>Christoph Reinbothe<\/b><\/sub>](https://github.com/LSBOSS)<br />[💻](https://github.com/machinelearnjs/machinelearnjs/commits?author=LSBOSS \"Code\") [🤔](#ideas-LSBOSS \"Ideas, Planning, & Feedback\") [🚇](#infra-LSBOSS \"Infrastructure (Hosting, Build-Tools, etc)\") [👀](#review-LSBOSS \"Reviewed Pull Requests\") | [<img src=\"https://avatars1.githubusercontent.com/u/14098106?v=4\" width=\"100px;\"/><br /><sub><b>Adam King<\/b><\/sub>](https://github.com/adamjking3)<br />[💻](https://github.com/machinelearnjs/machinelearnjs/commits?author=adamjking3 \"Code\") [⚠️](https://github.com/machinelearnjs/machinelearnjs/commits?author=adamjking3 \"Tests\") [📖](https://github.com/machinelearnjs/machinelearnjs/commits?author=adamjking3 \"Documentation\") |\n| :---: | :---: | :---: | :---: | :---: | :---: |\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E7D6:3FD49:178BD7:5DED12:6AB92C31"},"text_sha256":"7165034804c3b3f49aa5071e424dded83a21310fd5701079bf167529132c442a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"optimatika/ojAlgo","input_row":{"repository":"optimatika/ojAlgo","url":"https://github.com/optimatika/ojAlgo","name":"ojAlgo","owner":"optimatika","description":"oj! Algorithms - Open Source Java library for mathematics, linear algebra and optimisation. Pure Java, zero dependencies: fast matrices plus LP, QP and MIP solvers.","language":"Java","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":506,"issues":169,"created_at":"2013-10-06T17:20:10Z","updated_at":"2026-09-27T08:36:31Z","first_commit_at":"2014-01-14T10:40:08Z","last_commit_at":"2026-09-27T08:36:21Z","activity_months":152.40000000000001,"ai_ml_match_topics":"machine-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:12.236Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"optimatika/ojAlgo","visibility":"public","created_at":"2013-10-06T17:20:10Z","updated_at":"2026-09-27T08:36:31Z","private":false,"fork":false,"archived":false,"stargazers_count":506,"open_issues_count":1,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1968","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0915:3C4024:180E6B6:1C34889:6AB92C34"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1967","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17EFBC5:1C15BBA:6AB92C34"},"commit":{"sha":"b691155d77cf265257f3b296297de020ad6b6cfc","url":"https://github.com/optimatika/ojAlgo/commit/b691155d77cf265257f3b296297de020ad6b6cfc","date":"2018-05-21T21:52:54Z","author_date":"2018-05-21T21:52:54Z","committer_date":"2018-05-21T21:52:54Z","tree_sha":"dce71c32b4ad7320970b4935b6fe74e4466408f6","message_first_line":"testRepeatedMultiplications"},"tree_request_status":200,"tree_rate":{"github_remaining":"1966","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080D:2BC4E5:182FD1D:1C55B8E:6AB92C35"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2043,"blob_sha":"018ba869ad68e19c4c369547f6150489cd0525b7","priority":0}],"documents":[{"path":"README.md","size":2043,"blob_sha":"018ba869ad68e19c4c369547f6150489cd0525b7","priority":0,"status":200,"text":"# oj! Algorithms [![Build Status](https://travis-ci.org/optimatika/ojAlgo.svg?branch=master)](https://travis-ci.org/optimatika/ojAlgo)\n\noj! Algorithms - ojAlgo - is Open Source Java code that has to do with mathematics, linear algebra and optimisation.\n\nGeneral information about ojAlgo is available at the project web site: http://ojalgo.org/\n\n### Artifacts\n\nojAlgo is available at [The Central (Maven) Repository](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.ojalgo%22%20AND%20a%3A%22ojalgo%22) to be used with your favourite dependency management tool.\n\n```xml\n<dependency>\n    <groupId>org.ojalgo<\/groupId>\n    <artifactId>ojalgo<\/artifactId>\n    <version>45.1.0<\/version>\n<\/dependency>\n```\n...or download the jar from SourceForge.\n<p align=\"center\">\n<a href=\"https://sourceforge.net/projects/ojalgo/files/latest/download\" rel=\"nofollow\"><img alt=\"Download oj! Algorithms\" src=\"https://a.fsdn.com/con/app/sf-download-button\"><\/a>\n<\/p>\n\n### Documentation and Support\n\nUser documentation wiki with examples is here at GitHub: https://github.com/optimatika/ojAlgo/wiki\n\nProgramming questions related to ojAlgo are best asked at [stack overflow](https://stackoverflow.com/search?tab=relevance&q=ojalgo). Just remember to actually mention ojAlgo and tag the question using 'ojalgo' and whatever other tags you find suitable.\n\nBug reports and to some extent feature requests should be posted here at GitHub: https://github.com/optimatika/ojAlgo/issues\n(Please do not use GitHub Issues for general discussions or user support requests!)\n\nThe [ojAlgo-user mailing list](https://sourceforge.net/p/ojalgo/mailman/ojalgo-user/) can be used for just about anything as long as it relates to ojAlgo. (Note that you have to be a member to post to that list!)\n\nojAlgo is Open Source, and you are strongly encouraged to clone or fork this repository and work directly with the source code. The source code is (part of) the documentation, and you should read it.\n\n### Contributing\n\nThere's a whole separate [page on contributing](CONTRIBUTING.md).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E06:35EBC:178EFA:5DF012:6AB92C34"},"text_sha256":"d7667b1d016e73f618e5c57f96c83bf8c43a401f65b1b55a1ff0ef8a1051c827"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1965","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:181B7E8:1C41AB3:6AB92C36"},"commit":{"sha":"79c55deacd367259483e28507d642d8855743eb3","url":"https://github.com/optimatika/ojAlgo/commit/79c55deacd367259483e28507d642d8855743eb3","date":"2026-06-29T14:33:38Z","author_date":"2026-06-29T09:42:09Z","committer_date":"2026-06-29T14:33:38Z","tree_sha":"e78e8f2681a167c5b0c033e135033622a2ff2233","message_first_line":"Remove JMH"},"tree_request_status":200,"tree_rate":{"github_remaining":"1964","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:179059B:1BB67CE:6AB92C36"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3305,"blob_sha":"15e6aea2c8572dcbf1207f6de4a680e40533880d","priority":0}],"documents":[{"path":"README.md","size":3305,"blob_sha":"15e6aea2c8572dcbf1207f6de4a680e40533880d","priority":0,"status":200,"text":"# oj! Algorithms\n[![Build Status](https://github.com/optimatika/ojAlgo/actions/workflows/maven.yml/badge.svg)](https://github.com/optimatika/ojAlgo/actions/workflows/maven.yml)\n[![CodeQL](https://github.com/optimatika/ojAlgo/workflows/CodeQL/badge.svg)](https://github.com/optimatika/ojAlgo/actions/workflows/codeql-analysis.yml)\n[![Maven Central](https://img.shields.io/badge/dynamic/xml?label=Maven%20Central&url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Forg%2Fojalgo%2Fojalgo%2Fmaven-metadata.xml&query=%2Fmetadata%2Fversioning%2Frelease&color=blue&cacheSeconds=300)](https://central.sonatype.com/artifact/org.ojalgo/ojalgo/versions)\n\noj! Algorithms - ojAlgo - is Open Source Java code that has to do with mathematics, linear algebra and optimisation.\n\n## High Performance on a Rich Feature Set with Zero Dependencies\n\n- ojAlgo is the fastest pure Java linear algebra library available. That statement is backed by the latest Java Matrix Benchmark results – that’s a third party independent benchmark (not written by anyone associated with ojAlgo). \n- Optimisation (mathematical programming) tools including LP, QP and MIP solvers – again this is pure Java with zero dependencies.\n- A collection of “array” classes that can be sparse or dense and arbitrarily large. They can be used as 1-, 2- or N/Any-dimensional arrays, and may contain/handle a multitude of different number types including complex numbers, rational numbers and quaternions. The memory for the arrays can alternatively be allocated off heap or in a file. The linear algebra part of ojAlgo builds on these arrays – they’re fast and efficient.\n- A growing collection of utilities for data science, including Artificial Neural Networks, clustering and a collection of tools for reading/writing/processing data\n- Various other things like time series, random numbers, stochastic processes, descriptive statistics…\n\nGeneral information about ojAlgo is available at the project web site: http://ojalgo.org/\n\n### Artifacts\n\nojAlgo is available at [The Central (Maven) Repository](https://mvnrepository.com/artifact/org.ojalgo/ojalgo) to be used with your favourite dependency management tool.\n\n```xml\n<!-- https://mvnrepository.com/artifact/org.ojalgo/ojalgo -->\n<dependency>\n    <groupId>org.ojalgo<\/groupId>\n    <artifactId>ojalgo<\/artifactId>\n    <version>X.Y.Z<\/version>\n<\/dependency>\n```\n\n### Documentation and Support\n\nUser documentation is available in the form of blog posts at the ojAlgo web site: http://ojalgo.org/\n\nProgramming questions related to ojAlgo are best asked at [stack overflow](https://stackoverflow.com/search?tab=relevance&q=ojalgo). Just remember to actually mention ojAlgo and tag the question using 'ojalgo' and whatever other tags you find suitable.\n\nBug reports, or any issue with existing code, should be posted at GitHub: https://github.com/optimatika/ojAlgo/issues\n\nhttps://github.com/optimatika/ojAlgo/discussions may be used to discuss anything related to ojAlgo.\n\nojAlgo is Open Source, and you are strongly encouraged to clone or fork this repository and work directly with the source code. The source code is (part of) the documentation, and you should read it.\n\nAll example code (from the blog posts) in a multi-file gist: https://gist.github.com/apete/b3278dc2f8c2db6a00369c211ba321db","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C48E:29FD16:184777:5EA8A8:6AB92C36"},"text_sha256":"d2a5f52fda1365beefe6103ce94914e2ad3e252decb216c5ea8244a9f65f60ff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"junxiaosong/AlphaZero_Gomoku","input_row":{"repository":"junxiaosong/AlphaZero_Gomoku","url":"https://github.com/junxiaosong/AlphaZero_Gomoku","name":"AlphaZero_Gomoku","owner":"junxiaosong","description":"An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row) ","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3632,"issues":126,"created_at":"2017-12-21T09:49:40Z","updated_at":"2026-09-26T08:28:00Z","first_commit_at":"2017-12-21T09:49:40Z","last_commit_at":"2024-04-24T00:40:39Z","activity_months":76.069999999999993,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:15.437Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"junxiaosong/AlphaZero_Gomoku","visibility":"public","created_at":"2017-12-21T09:49:40Z","updated_at":"2026-09-26T08:28:00Z","private":false,"fork":false,"archived":false,"stargazers_count":3632,"open_issues_count":80,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1963","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F0:280FBC:17CA366:1BEF2DE:6AB92C37"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1962","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17CA3A7:1BEF326:6AB92C37"},"commit":{"sha":"66292c55cc53acfae7f7bc5a15a370571549bdd9","url":"https://github.com/junxiaosong/AlphaZero_Gomoku/commit/66292c55cc53acfae7f7bc5a15a370571549bdd9","date":"2018-05-16T11:45:40Z","author_date":"2018-05-16T11:45:40Z","committer_date":"2018-05-16T11:45:40Z","tree_sha":"cc0cc0855647fa369e44df19b902b36aa8d8cc0f","message_first_line":"Merge pull request #34 from Observerspy/codekitty-branch"},"tree_request_status":200,"tree_rate":{"github_remaining":"1961","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CE:180242:17FFBF8:1C25BE9:6AB92C38"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3010,"blob_sha":"fc99b9a77d63753b48d03ca6e2feba14e52886cd","priority":0}],"documents":[{"path":"README.md","size":3010,"blob_sha":"fc99b9a77d63753b48d03ca6e2feba14e52886cd","priority":0,"status":200,"text":"## AlphaZero-Gomoku\nThis is an implementation of the AlphaZero algorithm for playing the simple board game Gomoku (also called Gobang or Five in a Row) from pure self-play training. The game Gomoku is much simpler than Go or chess, so that we can focus on the training scheme of AlphaZero and obtain a pretty good AI model on a single PC in a few hours. \n\nReferences:  \n1. AlphaZero: Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm\n2. AlphaGo Zero: Mastering the game of Go without human knowledge\n\n### Update 2018.2.24: supports training with TensorFlow!\n### Update 2018.1.17: supports training with PyTorch!\n\n### Example Games Between Trained Models\n- Each move with 400 MCTS playouts:  \n![playout400](https://raw.githubusercontent.com/junxiaosong/AlphaZero_Gomoku/master/playout400.gif)\n\n### Requirements\nTo play with the trained AI models, only need:\n- Python >= 2.7\n- Numpy >= 1.11\n\nTo train the AI model from scratch, further need, either:\n- Theano >= 0.7 and Lasagne >= 0.1      \nor\n- PyTorch >= 0.2.0    \nor\n- TensorFlow\n\n**PS**: if your Theano's version > 0.7, please follow this [issue](https://github.com/aigamedev/scikit-neuralnetwork/issues/235) to install Lasagne,  \notherwise, force pip to downgrade Theano to 0.7 ``pip install --upgrade theano==0.7.0``\n\nIf you would like to train the model using other DL frameworks, you only need to rewrite policy_value_net.py.\n\n### Getting Started\nTo play with provided models, run the following script from the directory:  \n```\npython human_play.py  \n```\nYou may modify human_play.py to try different provided models or the pure MCTS.\n\nTo train the AI model from scratch, with Theano and Lasagne, directly run:   \n```\npython train.py\n```\nWith PyTorch or TensorFlow, first modify the file [train.py](https://github.com/junxiaosong/AlphaZero_Gomoku/blob/master/train.py), i.e., comment the line\n```\nfrom policy_value_net import PolicyValueNet  # Theano and Lasagne\n```\nand uncomment the line \n```\n# from policy_value_net_pytorch import PolicyValueNet  # Pytorch\nor\n# from policy_value_net_tensorflow import PolicyValueNet # Tensorflow\n```\nand then execute: ``python train.py``  (To use GPU in PyTorch, set ``use_gpu=True``)\n\nThe models (best_policy.model and current_policy.model) will be saved every a few updates (default 50).  \n\n**Note:** the 4 provided models were trained using Theano/Lasagne, to use them with PyTorch, please refer to [issue 5](https://github.com/junxiaosong/AlphaZero_Gomoku/issues/5).\n\n**Tips for training:**\n1. It is good to start with a 6 * 6 board and 4 in a row. For this case, we may obtain a reasonably good model within 500~1000 self-play games in about 2 hours.\n2. For the case of 8 * 8 board and 5 in a row, it may need 2000~3000 self-play games to get a good model, and it may take about 2 days on a single PC.\n\n### Further reading\nMy article describing some details about the implementation in Chinese: [https://zhuanlan.zhihu.com/p/32089487](https://zhuanlan.zhihu.com/p/32089487) \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AE4:2C474:180BBE:5E6D27:6AB92C37"},"text_sha256":"9299236759ea02a809c103d66c8b174a33eab5ebb9753cdcd7df90bd557de108"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1960","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0820:6E5BD:17A651A:1BCB2F2:6AB92C38"},"commit":{"sha":"0b4917ccd84ea2771706701015eb26182c1159f4","url":"https://github.com/junxiaosong/AlphaZero_Gomoku/commit/0b4917ccd84ea2771706701015eb26182c1159f4","date":"2024-04-24T00:40:39Z","author_date":"2024-04-24T00:40:39Z","committer_date":"2024-04-24T00:40:39Z","tree_sha":"a1150964a9956c1d481a63b070f5017400cdb9fa","message_first_line":"Merge pull request #138 from RealHurrison/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1959","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:17B82F4:1BDE408:6AB92C39"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3155,"blob_sha":"fdfa94a19e41f6f86e3c24a8092d237dcaf98ce8","priority":0}],"documents":[{"path":"README.md","size":3155,"blob_sha":"fdfa94a19e41f6f86e3c24a8092d237dcaf98ce8","priority":0,"status":200,"text":"## AlphaZero-Gomoku\nThis is an implementation of the AlphaZero algorithm for playing the simple board game Gomoku (also called Gobang or Five in a Row) from pure self-play training. The game Gomoku is much simpler than Go or chess, so that we can focus on the training scheme of AlphaZero and obtain a pretty good AI model on a single PC in a few hours. \n\nReferences:  \n1. AlphaZero: Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm\n2. AlphaGo Zero: Mastering the game of Go without human knowledge\n\n### Update 2018.2.24: supports training with TensorFlow!\n### Update 2018.1.17: supports training with PyTorch!\n\n### Example Games Between Trained Models\n- Each move with 400 MCTS playouts:  \n![playout400](https://raw.githubusercontent.com/junxiaosong/AlphaZero_Gomoku/master/playout400.gif)\n\n### Requirements\nTo play with the trained AI models, only need:\n- Python >= 2.7\n- Numpy >= 1.11\n\nTo train the AI model from scratch, further need, either:\n- Theano >= 0.7 and Lasagne >= 0.1      \nor\n- PyTorch >= 0.2.0    \nor\n- TensorFlow\n\n**PS**: if your Theano's version > 0.7, please follow this [issue](https://github.com/aigamedev/scikit-neuralnetwork/issues/235) to install Lasagne,  \notherwise, force pip to downgrade Theano to 0.7 ``pip install --upgrade theano==0.7.0``\n\nIf you would like to train the model using other DL frameworks, you only need to rewrite policy_value_net.py.\n\n### Getting Started\nTo play with provided models, run the following script from the directory:  \n```\npython human_play.py  \n```\nYou may modify human_play.py to try different provided models or the pure MCTS.\n\nTo train the AI model from scratch, with Theano and Lasagne, directly run:   \n```\npython train.py\n```\nWith PyTorch or TensorFlow, first modify the file [train.py](https://github.com/junxiaosong/AlphaZero_Gomoku/blob/master/train.py), i.e., comment the line\n```\nfrom policy_value_net import PolicyValueNet  # Theano and Lasagne\n```\nand uncomment the line \n```\n# from policy_value_net_pytorch import PolicyValueNet  # Pytorch\nor\n# from policy_value_net_tensorflow import PolicyValueNet # Tensorflow\n```\nand then execute: ``python train.py``  (To use GPU in PyTorch, set ``use_gpu=True`` and use ``return loss.item(), entropy.item()`` in function train_step in policy_value_net_pytorch.py if your pytorch version is greater than 0.5)\n\nThe models (best_policy.model and current_policy.model) will be saved every a few updates (default 50).  \n\n**Note:** the 4 provided models were trained using Theano/Lasagne, to use them with PyTorch, please refer to [issue 5](https://github.com/junxiaosong/AlphaZero_Gomoku/issues/5).\n\n**Tips for training:**\n1. It is good to start with a 6 * 6 board and 4 in a row. For this case, we may obtain a reasonably good model within 500~1000 self-play games in about 2 hours.\n2. For the case of 8 * 8 board and 5 in a row, it may need 2000~3000 self-play games to get a good model, and it may take about 2 days on a single PC.\n\n### Further reading\nMy article describing some details about the implementation in Chinese: [https://zhuanlan.zhihu.com/p/32089487](https://zhuanlan.zhihu.com/p/32089487) \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C906:3E1C8:17F44C:5E54DF:6AB92C38"},"text_sha256":"f318bfdc96f8af639a9f692f1606f3d3ccf627f48971b0160aa3b1d4e596123d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/PARL","input_row":{"repository":"PaddlePaddle/PARL","url":"https://github.com/PaddlePaddle/PARL","name":"PARL","owner":"PaddlePaddle","description":"A high-performance distributed training framework for Reinforcement Learning ","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3458,"issues":529,"created_at":"2018-04-25T17:54:22Z","updated_at":"2026-09-27T07:06:44Z","first_commit_at":"2018-04-25T17:54:23Z","last_commit_at":"2025-09-13T06:29:18Z","activity_months":88.620000000000005,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:17.794Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/PARL","visibility":"public","created_at":"2018-04-25T17:54:22Z","updated_at":"2026-09-27T07:06:44Z","private":false,"fork":false,"archived":false,"stargazers_count":3458,"open_issues_count":134,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1958","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083F:6E429:17EFF9A:1C1604B:6AB92C39"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1957","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0894:3C4024:180EAE5:1C34DAC:6AB92C3A"},"commit":{"sha":"7b0407b960bd228976108bc8cba90f5bf8a299dc","url":"https://github.com/PaddlePaddle/PARL/commit/7b0407b960bd228976108bc8cba90f5bf8a299dc","date":"2018-05-22T00:43:45Z","author_date":"2018-05-22T00:43:45Z","committer_date":"2018-05-22T00:43:45Z","tree_sha":"6943fc3838abfd5365b33a846146721f4bee9684","message_first_line":"CI: enable ci task. (#10)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1956","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:186E51C:1C94A49:6AB92C3A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":65,"blob_sha":"27bd133cc8921af7c1af99ad0c2ff870bef2c72f","priority":0}],"documents":[{"path":"README.md","size":65,"blob_sha":"27bd133cc8921af7c1af99ad0c2ff870bef2c72f","priority":0,"status":200,"text":"# PARL\n**Pa**ddlePaddle **R**einforcement **L**earning Framework\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CFBA:372D9:17D906:5E3B86:6AB92C39"},"text_sha256":"901fe4f3a6a5d991e87588d6bcea4b4c2eeb8382fdbfb5b3752d94fcf5a2a045"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1955","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:17FFE3B:1C25E92:6AB92C3B"},"commit":{"sha":"fb5e5a707f6466bca7cf4124eccd57b65fb2d9c3","url":"https://github.com/PaddlePaddle/PARL/commit/fb5e5a707f6466bca7cf4124eccd57b65fb2d9c3","date":"2025-09-13T06:29:18Z","author_date":"2025-09-13T06:29:18Z","committer_date":"2025-09-13T06:29:18Z","tree_sha":"5634ed21093cb45218acc1a905e90de35e528d80","message_first_line":"Waymax rl (#1170)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1954","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089D:52542:17CE37D:1BF470B:6AB92C3B"},"tree_truncated":false,"document_candidates":[{"path":"README.cn.md","size":7640,"blob_sha":"c3cb7f2b33894746b7ae066ac73f50d0744003da","priority":0},{"path":"README.md","size":7871,"blob_sha":"d9ccdc00686db945e2e45027eb6b436f50c2a89c","priority":0}],"documents":[{"path":"README.cn.md","size":7640,"blob_sha":"c3cb7f2b33894746b7ae066ac73f50d0744003da","priority":0,"status":200,"text":"<p align=\"center\">\n<img src=\".github/PARL-logo.png\" alt=\"PARL\" width=\"500\"/>\n<\/p>\n\n[English](./README.md) | 简体中文\n\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://parl.readthedocs.io/en/latest/index.html) [![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://parl.readthedocs.io/zh_CN/latest/) [![Documentation Status](https://img.shields.io/badge/手册-中文-brightgreen.svg)](./docs/zh_CN/Overview.md) [![Release](https://img.shields.io/badge/release-v2.2.1-blue.svg)](https://github.com/PaddlePaddle/PARL/releases)\n\n\n> PARL 是一个高性能、灵活的强化学习框架。\n\n<!-- toc -->\n\n- [概览](#概览)\n\t- [特点](#特点)\n\t- [框架结构](#框架结构)\n\t\t- [Model](#model)\n\t\t- [Algorithm](#algorithm)\n\t\t- [Agent](#agent)\n\t- [简易高效的并行接口](#简易高效的并行接口)\n- [安装:](#安装)\n\t\t- [依赖](#依赖)\n- [快速开始](#快速开始)\n- [算法示例](#算法示例)\n- [Waymax-RL(2025 Update, GPU-RL 自动驾驶)](#waymax-rl2025-update-gpu-rl-自动驾驶)\n- [xparl 安全说明](#xparl-安全说明)\n\t- [安全性注意事项](#安全性注意事项)\n\n# 概览\n## 特点\n**可复现性保证**。我们提供了高质量的主流强化学习算法实现，严格地复现了论文对应的指标。\n\n**大规模并行支持**。框架最高可支持上万个CPU的同时并发计算，并且支持多GPU强化学习模型的训练。\n\n**可复用性强**。用户无需自己重新实现算法，通过复用框架提供的算法可以轻松地把经典强化学习算法应用到具体的场景中。\n\n**良好扩展性**。当用户想调研新的算法时，可以通过继承我们提供的基类可以快速实现自己的强化学习算法。\n\n\n## 框架结构\n<img src=\".github/abstractions.png\" alt=\"abstractions\" width=\"400\"/>  \nPARL的目标是构建一个可以完成复杂任务的智能体。以下是用户在逐步构建一个智能体的过程中需要了解到的结构：\n\n### Model\n`Model` 用来定义前向 (`Forward`)网络，这通常是一个策略网络 (`Policy Network`)或者一个值函数网络 (`Value Function`)，输入是当前环境状态 (`State`)。\n\n### Algorithm\n`Algorithm` 定义了具体的算法来更新前向网络 (`Model`)，也就是通过定义损失函数来更新`Model`。一个`Algorithm`包含至少一个`Model`。\n\n### Agent\n`Agent` 负责算法与环境的交互，在交互过程中把生成的数据提供给`Algorithm`来更新模型 (`Model`)，数据的预处理流程也一般定义在这里。\n\n提示： 请访问[教程](https://parl.readthedocs.io/zh_CN/latest/tutorial/getting_started.html) and [API 文档](https://parl.readthedocs.io/zh_CN/latest/apis/model.html)以获取更多关于基础类的信息。\n\n## 简易高效的并行接口\n在PARL中，一个**修饰符**(parl.remote_class)就可以帮助用户实现自己的并行算法。\n以下我们通过`Hello World`的例子来说明如何简单地通过PARL来调度外部的计算资源实现并行计算。 请访问我们的[教程文档](https://parl.readthedocs.io/zh_CN/latest/parallel_training/setup.html)以获取更多的并行训练信息。\n```python\n#============Agent.py=================\n@parl.remote_class\nclass Agent(object):\n\n\tdef say_hello(self):\n\t\tprint(\"Hello World!\")\n\n\tdef sum(self, a, b):\n\t\treturn a+b\n\nparl.connect('localhost:8037')\nagent = Agent()\nagent.say_hello()\nans = agent.sum(1,5) # run remotely and not comsume any local computation resources \n```\n两步调度外部的计算资源：\n1. 使用`parl.remote_class`修饰一个类，之后这个类就被转化为可以运行在其他CPU或者机器上的类。\n2. 调用`parl.connect`函数来初始化并行通讯，通过这种方式获取到的实例和原来的类是有同样的函数的。由于这些类是在别的计算资源上运行的，执行这些函数**不再消耗当前线程计算资源**。\n\n<img src=\".github/decorator.png\" alt=\"PARL\" width=\"450\"/>\n\n如上图所示，真实的actor（橙色圆圈）运行在CPU集群，learner（蓝色圆圈）和remote actor（黄色圆圈）运行在本地的GPU上。对于用户而言，完全可以像写多线程代码一样来实现并行算法，相当简单，但是这些多线程的运算利用了外部的计算资源。我们也提供了并行算法示例，更多细节请参考[IMPALA](benchmark/fluid/IMPALA/), [A2C](examples/A2C/)。\n\n\n# 安装:\n### 依赖\n- Python 3.6+. (Python 3.8+ 更适合用于并行训练)\n- [paddlepaddle>=2.3.1](https://github.com/PaddlePaddle/Paddle) (**非必须的**，如果你只用并行部分的接口不需要安装paddle) \n\n\n```\npip install parl\n```\n\n[详细安装说明 (持续更新)](docs/installation_guide_cn.md)\n\n# 快速开始\n请查看一下几个教程帮助您快速上手PARL:\n- [教程](https://parl.readthedocs.io/zh_CN/latest/tutorial/getting_started.html) : 解决经典的 CartPole 问题。\n- [Xparl用法](https://parl.readthedocs.io/zh_CN/latest/parallel_training/setup.html) : 如何使用`xparl`设置集群，实现并行运算。\n- [进阶教程](https://parl.readthedocs.io/zh_CN/latest/implementations/new_alg.html) : 自定义新算法。\n- [API 文档](https://parl.readthedocs.io/zh_CN/latest/apis/model.html)\n\n同时，我们还为零基础开发者提供强化学习入门课程 : ( [视频](https://www.bilibili.com/video/BV1yv411i7xd) | [代码](examples/tutorials/) )\n\n# 算法示例\n- [QuickStart](examples/QuickStart/)\n- [DQN](examples/DQN/)\n- [ES](examples/ES/)\n- [DDPG](examples/DDPG/)\n- [A2C](examples/A2C/)\n- [TD3](examples/TD3/)\n- [SAC](examples/SAC/)\n- [QMIX](examples/QMIX/)\n- [MADDPG](examples/MADDPG/)\n- [PPO](examples/PPO/)\n- [CQL](examples/CQL/)\n- [IMPALA](examples/IMPALA)\n- [冠军解决方案：NIPS2018强化学习假肢挑战赛](examples/NeurIPS2018-AI-for-Prosthetics-Challenge/)\n- [冠军解决方案：NIPS2019强化学习仿生人控制赛事](examples/NeurIPS2019-Learn-to-Move-Challenge/)\n- [冠军解决方案：NIPS2020强化学习电网调度赛事](examples/NeurIPS2020-Learning-to-Run-a-Power-Network-Challenge/)\n\n<img src=\"examples/NeurIPS2019-Learn-to-Move-Challenge/image/performance.gif\" width = \"300\" height =\"200\" alt=\"NeurlIPS2018\"/> <img src=\".github/Half-Cheetah.gif\" width = \"300\" height =\"200\" alt=\"Half-Cheetah\"/> <img src=\".github/Breakout.gif\" width = \"200\" height =\"200\" alt=\"Breakout\"/> \n<br>\n<img src=\".github/Aircraft.gif\"  width = \"808\" height =\"300\"  alt=\"NeurlIPS2018\"/>\n\n# Waymax-RL(2025 Update, GPU-RL 自动驾驶)\n- 基于waymax仿真的端到端GPU RL自动驾驶训练框架\n  Full documentation and instructions: [waymax_rl/README_cn.md](./waymax_rl/README_cn.md)\n\n# xparl 安全说明\n\n`xparl` 提供了跨多机集群的多进程并行功能，类似于 Python 自带的单机多进程。这意味着在某个客户端上编写代码后，可以在集群内的任意机器上执行任意代码，例如获取其他机器上的数据、增删文件等。\n\n这是设计的初衷，因为强化学习环境多种多样，`env_wrapper` 需要具备执行各种可能操作的能力。`xparl` 使用了 `pickle` 实现这一功能（类似于 `ray`）。与大多数情况下将 `pickle` 视为可注入代码的漏洞不同，这里使用 `pickle` 是一种特性。\n\n## 安全性注意事项\n\n由于支持任意代码执行，用户需要确保集群环境是安全的：\n\n- **不要允许不信任的机器加入集群。**  \n- **不要让不信任的用户访问集群，例如不要将 `xparl` 的端口暴露在公网。**  \n- **不要在集群上执行不信任的代码。**\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8BFC:2B291E:1847B5:5EAA22:6AB92C3B"},"text_sha256":"7e28c4d1675c55dfac87f362a1dafb0056a9bee049130aadfe4d71b955eaeaee"},{"path":"README.md","size":7871,"blob_sha":"d9ccdc00686db945e2e45027eb6b436f50c2a89c","priority":0,"status":200,"text":"<p align=\"center\">\n<img src=\".github/PARL-logo.png\" alt=\"PARL\" width=\"500\"/>\n<\/p>\n\nEnglish | [简体中文](./README.cn.md)\n\n[![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://parl.readthedocs.io/en/latest/index.html) [![Documentation Status](https://img.shields.io/badge/中文文档-最新-brightgreen.svg)](https://parl.readthedocs.io/zh_CN/latest/) [![Documentation Status](https://img.shields.io/badge/手册-中文-brightgreen.svg)](./docs/zh_CN/Overview.md) [![Release](https://img.shields.io/badge/release-v2.2.1-blue.svg)](https://github.com/PaddlePaddle/PARL/releases)\n\n> PARL is a flexible and high-efficient reinforcement learning framework.\n\n<!-- toc -->\n\n- [About PARL](#about-parl)\n  - [Features](#features)\n  - [Abstractions](#abstractions)\n    - [Model](#model)\n    - [Algorithm](#algorithm)\n    - [Agent](#agent)\n  - [Parallelization](#parallelization)\n- [Install:](#install)\n    - [Dependencies](#dependencies)\n- [Getting Started](#getting-started)\n- [Examples](#examples)\n- [Waymax-RL(2025 Update, GPU-RL Autonomous Driving)](#waymax-rl2025-update-gpu-rl-autonomous-driving)\n- [xparl Security](#xparl-security)\n  - [Security Considerations](#security-considerations)\n\n# About PARL\n## Features\n**Reproducible**. We provide algorithms that stably reproduce the result of many influential reinforcement learning algorithms.\n\n**Large Scale**. Ability to support high-performance parallelization of training with thousands of CPUs and multi-GPUs.\n\n**Reusable**.  Algorithms provided in the repository could be directly adapted to a new task by defining a forward network and training mechanism will be built automatically.\n\n**Extensible**. Build new algorithms quickly by inheriting the abstract class in the framework.\n\n\n## Abstractions\n<img src=\".github/abstractions.png\" alt=\"abstractions\" width=\"400\"/>\nPARL aims to build an agent for training algorithms to perform complex tasks.   \nThe main abstractions introduced by PARL that are used to build an agent recursively are the following:\n\n### Model\n`Model` is abstracted to construct the forward network which defines a policy network or critic network given state as input.\n\n### Algorithm\n`Algorithm` describes the mechanism to update parameters in `Model` and often contains at least one model.\n\n### Agent\n`Agent`, a data bridge between the environment and the algorithm, is responsible for data I/O with the outside environment and describes data preprocessing before feeding data into the training process.  \n\nNote: For more information about base classes, please visit our [tutorial](https://parl.readthedocs.io/en/latest/tutorial/getting_started.html) and [API documentation](https://parl.readthedocs.io/en/latest/apis/model.html).\n\n## Parallelization\nPARL provides a compact API for distributed training, allowing users to transfer the code into a parallelized version by simply adding a decorator. For more information about our APIs for parallel training, please visit our [documentation](https://parl.readthedocs.io/en/latest/parallel_training/setup.html).  \nHere is a `Hello World` example to demonstrate how easy it is to leverage outer computation resources.\n```python\n#============Agent.py=================\n@parl.remote_class\nclass Agent(object):\n\n    def say_hello(self):\n        print(\"Hello World!\")\n\n    def sum(self, a, b):\n        return a+b\n\nparl.connect('localhost:8037')\nagent = Agent()\nagent.say_hello()\nans = agent.sum(1,5) # it runs remotely, without consuming any local computation resources\n```\nTwo steps to use outer computation resources:\n1. use the `parl.remote_class` to decorate a class at first, after which it is transferred to be a new class that can run in other CPUs or machines.\n2. call `parl.connect` to initialize parallel communication before creating an object. Calling any function of the objects **does not** consume local computation resources since they are executed elsewhere.\n\n<img src=\".github/decorator.png\" alt=\"PARL\" width=\"450\"/>\nAs shown in the above figure, real actors (orange circle) are running at the cpu cluster, while the learner (blue circle) is running at the local gpu with several remote actors (yellow circle with dotted edge).  \n\nFor users, they can write code in a simple way, just like writing multi-thread code, but with actors consuming remote resources. We have also provided examples of parallized algorithms like [IMPALA](benchmark/fluid/IMPALA/), [A2C](examples/A2C/). For more details in usage please refer to these examples.  \n\n\n# Install:\n### Dependencies\n- Python 3.6+(Python 3.8+ is preferable for distributed training). \n- [paddlepaddle>=2.3.1](https://github.com/PaddlePaddle/Paddle) (**Optional**, if you only want to use APIs related to parallelization alone)  \n\n\n```\npip install parl\n```\n\n[Detailed Installation Guide (Continuously Updated)](docs/installation_guide.md)\n\n# Getting Started\nSeveral-points to get you started:\n- [Tutorial](https://parl.readthedocs.io/en/latest/tutorial/getting_started.html) : How to solve cartpole problem.\n- [Xparl Usage](https://parl.readthedocs.io/en/latest/parallel_training/setup.html) : How to set up a cluster with `xparl` and compute in parallel.\n- [Advanced Tutorial](https://parl.readthedocs.io/en/latest/implementations/new_alg.html) : Create customized algorithms.\n- [API documentation](https://parl.readthedocs.io/en/latest/apis/model.html)\n\nFor beginners who know little about reinforcement learning, we also provide an introductory course: ( [Video](https://www.bilibili.com/video/BV1yv411i7xd) | [Code](examples/tutorials/) )\n\n# Examples\n- [QuickStart](examples/QuickStart/)\n- [DQN](examples/DQN/)\n- [ES](examples/ES/)\n- [DDPG](examples/DDPG/)\n- [A2C](examples/A2C/)\n- [TD3](examples/TD3/)\n- [SAC](examples/SAC/)\n- [QMIX](examples/QMIX/)\n- [MADDPG](examples/MADDPG/)\n- [PPO](examples/PPO/)\n- [CQL](examples/CQL/)\n- [IMPALA](examples/IMPALA)\n- [Winning Solution for NIPS2018: AI for Prosthetics Challenge](examples/NeurIPS2018-AI-for-Prosthetics-Challenge/)\n- [Winning Solution for NIPS2019: Learn to Move Challenge](examples/NeurIPS2019-Learn-to-Move-Challenge/)\n- [Winning Solution for NIPS2020: Learning to Run a Power Network Challenge](examples/NeurIPS2020-Learning-to-Run-a-Power-Network-Challenge/)\n\n<img src=\"examples/NeurIPS2019-Learn-to-Move-Challenge/image/performance.gif\" width = \"280\" height =\"200\" alt=\"NeurlIPS2018\"/> <img src=\".github/Half-Cheetah.gif\" width = \"280\" height =\"200\" alt=\"Half-Cheetah\"/> <img src=\".github/Breakout.gif\" width = \"195\" height =\"200\" alt=\"Breakout\"/>\n<br>\n<img src=\".github/Aircraft.gif\"  width = \"762\" height =\"300\"  alt=\"NeurlIPS2018\"/>\n\n# Waymax-RL(2025 Update, GPU-RL Autonomous Driving)\n- End-to-End GPU Reinforcement Learning for Waymax Autonomous Driving Simulation.  \n  Full documentation and instructions: [waymax_rl/README.md](./waymax_rl/README.md)\n\n# xparl Security\n\n`xparl` provides multi-process parallelism across a multi-machine cluster, similar to Python's built-in single-machine multiprocessing. This means that after writing code on a client, you can execute arbitrary code on any machine within the cluster, such as retrieving data from other machines, adding or deleting files, etc. \n\nThis behavior is by design, as reinforcement learning environments are diverse, and `env_wrapper` needs the ability to perform any possible operation. `xparl` achieves this functionality using `pickle` (similar to `ray`). Unlike in most cases where `pickle` may be considered a vulnerability, here it is an essential feature.\n\n## Security Considerations\n\nSince arbitrary code execution is possible, users must ensure the cluster is secure:\n\n- **Do not allow untrusted machines to join the cluster.**  \n- **Do not expose the `xparl` ports to the public internet or allow untrusted users to access the cluster.**  \n- **Do not execute untrusted code on the cluster.**\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C186:376DE:1815B7:5E78DB:6AB92C38"},"text_sha256":"4940ad1002bf784fffedfc02dae0382404bccfbec746adbc8fe41d9d9fe7758f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Farama-Foundation/HighwayEnv","input_row":{"repository":"Farama-Foundation/HighwayEnv","url":"https://github.com/Farama-Foundation/HighwayEnv","name":"HighwayEnv","owner":"Farama-Foundation","description":"A collection of environments for autonomous driving and tactical decision-making tasks","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3322,"issues":501,"created_at":"2017-11-15T15:38:46Z","updated_at":"2026-09-26T09:04:49Z","first_commit_at":"2017-11-15T15:37:45Z","last_commit_at":"2026-09-12T19:41:05Z","activity_months":105.89,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:20.839Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Farama-Foundation/HighwayEnv","visibility":"public","created_at":"2017-11-15T15:38:46Z","updated_at":"2026-09-26T09:04:49Z","private":false,"fork":false,"archived":false,"stargazers_count":3322,"open_issues_count":43,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1953","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:17CE481:1BF483E:6AB92C3C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1952","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:17FC8FC:1C21887:6AB92C3D"},"commit":{"sha":"b2b5e6fdd42acee007587e6874f17a3adadd68a4","url":"https://github.com/Farama-Foundation/HighwayEnv/commit/b2b5e6fdd42acee007587e6874f17a3adadd68a4","date":"2018-05-24T23:18:20Z","author_date":"2018-05-24T23:18:20Z","committer_date":"2018-05-24T23:18:20Z","tree_sha":"5a161eb429f77b2e77873ac53fb1a302f677e142","message_first_line":"Evaluate a MCTS with prior agent"},"tree_request_status":200,"tree_rate":{"github_remaining":"1951","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17DB1BB:1C01475:6AB92C3D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4442,"blob_sha":"df07cbcc60eb976ccc73605551aa04e753eab975","priority":0}],"documents":[{"path":"README.md","size":4442,"blob_sha":"df07cbcc60eb976ccc73605551aa04e753eab975","priority":0,"status":200,"text":"# highway-env\n\nA collection of environments for *highway driving* and tactical decision-making tasks\n\n<p align=\"center\">\n    <img src=\"docs/media/highway-env.gif\"><br/>\n    <em>An episode of one of the environments available in higwhay-env.<\/em>\n<\/p>\n\n[![Build Status](https://travis-ci.org/eleurent/highway-env.svg?branch=master)](https://travis-ci.org/eleurent/highway-env)\n[![Docs Status](https://media.readthedocs.org/static/projects/badges/passing.svg)](https://eleurent.github.io/highway-env/)\n\n## Installation\n\n`pip install --user git+https://github.com/eleurent/highway-env`\n\n## Usage\n\n```python\nimport higwhay_env\n\nenv = gym.make(\"highway-v0\")\n\ndone = False\nwhile not done:\n    action = ... # Your agent code here\n    obs, reward, done, _ = env.step(action)\n    env.render()\n```\n\n## The environments\n\n### Highway\n\n```python\nenv = gym.make(\"highway-v0\")\n```\n\nIn this task, the ego-vehicle is driving on a multilane highway populated with other vehicles.\nThe agent's objective is to reach a high velocity while avoiding collisions with neighbouring vehicles. Driving on the right side of the road is also rewarded.\n\n<p align=\"center\">\n    <img src=\"docs/media/highway.gif\"><br/>\n    <em>The higwhay-v0 environment.<\/em>\n<\/p>\n\n\n### Merge\n\n```python\nenv = gym.make(\"highway-merge-v0\")\n```\n\nOn this task, the ego-vehicle starts on a main highway but soon approaches a road junction with incoming vehicles on the access ramp. The agent's objective is now to maintain a high velocity while making room for the vehicles so that they can safely merge in the traffic.\n\n<p align=\"center\">\n    <img src=\"docs/media/merge.gif\"><br/>\n    <em>The highway-merge-v0 environment.<\/em>\n<\/p>\n\n\n## The framework\n\nNew highway driving environments can easily be made from a set of building blocks.\n\n### Roads\n\nA `Road` is composed of several `Lanes` and a list of `Vehicles`. The Lanes are described by their center line curve and local coordinate system.\n\n### Vehicle physics\n\nThe vehicles dynamics are represented in the `Vehicle` class by a bicycle model.\n\n```python\ndx = v*cos(psi)\ndy = v*sin(psi)\ndv = a\ndpsi = v/l*tan(beta)\n```\nWhere *(x, y)* is the vehicle position, *v* its forward velocity and *psi* its heading.\n*a* is the acceleration command and *beta* is the slip angle at the center of gravity, used as a steering command.\n\n### Control\n\nThe `ControlledVehicle` class implements a low-level controller on top of a `Vehicle`, allowing to track a given target velocity and follow a target lane.\n\n### Behaviours\n\nThe vehicles populating the highway follow simple and realistic behaviours that dictate how they accelerate and steer on the road.\n\nIn the `IDMVehicle` class,\n* Longitudinal Model: the acceleration of the vehicle is given by the Intelligent Driver Model (IDM) from [(Treiber et al, 2000)](https://arxiv.org/abs/cond-mat/0002177).\n* Lateral Model: the discrete lane change decisions are given by the MOBIL model from [(Kesting et al, 2007)](https://www.researchgate.net/publication/239439179_General_Lane-Changing_Model_MOBIL_for_Car-Following_Models).\n\nIn the `LinearVehicle` class, the longitudinal behavior is defined as a linear weighting of several features, such as the distance and velocity difference to the leading vehicle.\n\n## The agents\n\nAgents solving the `highway-env` environments are available in the [RL-Agents](https://github.com/eleurent/rl-agents) repository.\n\n`pip install --user git+https://github.com/eleurent/rl-agents`\n\n### Time-To-Collision Value Iteration\n\n<p align=\"center\">\n    <img src=\"docs/media/ttcvi.gif\"><br/>\n    <em>The TTC Value Iteration agent solving highway-v0.<\/em>\n<\/p>\n\nThis agent uses a simple representation of the nearby traffic in terms of predicted Time-To-Collision (TTC) on each lane of the road, and performs a Value Iteration to compute the corresponding optimal value function.\n\nThe transition function of the TTC-state is simplistic and assumes that each vehicle will keep driving at a constant velocity without changing lanes. This model bias can be a source of mistakes.\n\n### Monte-Carlo Tree Search\n\nThis agent leverages a transition and reward models to perform a stochastic tree search [(Coulom, 2006)](https://hal.inria.fr/inria-00116992/document) of the optimal trajectory. No particular assumption is required on the state representation or transition model.\n\n<p align=\"center\">\n    <img src=\"docs/media/mcts.gif\"><br/>\n    <em>The MCTS agent solving highway-v0.<\/em>\n<\/p>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D36A:727CE:1751CA:5DB43B:6AB92C3C"},"text_sha256":"946453f2ff25a70cd3245d57a512fae73b484ee16ac09cb16afdba22127d2296"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1950","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17DB23E:1C01514:6AB92C3E"},"commit":{"sha":"c6bd1911af63dda62bf55f4eec58a916bfb5a42b","url":"https://github.com/Farama-Foundation/HighwayEnv/commit/c6bd1911af63dda62bf55f4eec58a916bfb5a42b","date":"2026-06-29T22:26:23Z","author_date":"2026-06-29T22:26:23Z","committer_date":"2026-06-29T22:26:23Z","tree_sha":"8a5333358740a3f738c3c6ad25bcb14e220525b7","message_first_line":"docs: correct figure url for highway env image"},"tree_request_status":200,"tree_rate":{"github_remaining":"1949","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17E21C2:1C07D85:6AB92C3E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4959,"blob_sha":"05a22de96613c278c04fc3f11c6b4dfe343db364","priority":0}],"documents":[{"path":"README.md","size":4959,"blob_sha":"05a22de96613c278c04fc3f11c6b4dfe343db364","priority":0,"status":200,"text":"[![Python](https://img.shields.io/pypi/pyversions/highway-env.svg)](https://badge.fury.io/py/highway-env)\n[![PyPI](https://badge.fury.io/py/highway-env.svg)](https://badge.fury.io/py/highway-env)\n[![build](https://github.com/Farama-Foundation/HighwayEnv/actions/workflows/build.yml/badge.svg)](https://github.com/Farama-Foundation/HighwayEnv/actions/workflows/build.yml)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n<p align=\"center\">\n    <a href=\"https://highway-env.farama.org/\" target=\"_blank\">\n        <img src=\"https://github.com/Farama-Foundation/HighwayEnv/blob/main/docs/_static/img/highway-text.png?raw=true\" width=\"500px\" />\n    <\/a>\n<\/p>\n\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/highway-env.gif?raw=true\"><br/>\n    <em>An episode of one of the environments available in HighwayEnv.<\/em>\n<\/p>\n\nA collection of environments for autonomous driving and tactical decision-making tasks. Originally developed by [Edouard Leurent](https://github.com/eleurent) and currently maintained by [Jin Huang](https://github.com/Trenza1ore).\n\nThe documentation website is at [highway-env.farama.org](https://highway-env.farama.org), and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6\n\n## Installation\n\nTo install HighwayEnv, use:\n\n```bash\npip install highway-env\n```\n\nWe support Python 3.10+ on Linux and macOS.\n\n## Environments\n\nHighwayEnv includes 10 driving scenario families: `highway`, `intersection`, `exit`, `lane-keeping`, `merge`, `parking`, `racetrack`, `roundabout`, `two-way`, and `u-turn`, with several environments also offering fast, continuous-control, connected-lane, multi-agent, generic, large, or oval variants. The full list with descriptions and configuration options is available in the [documentation](https://highway-env.farama.org/main/environments/).\n\n<details>\n<summary>Previews<\/summary>\n\n| `highway` | `merge` | `roundabout` | `parking` | `intersection` | `racetrack` |\n|:---------:|:-------:|:------------:|:---------:|:--------------:|:-----------:|\n| <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/highway.gif?raw=true\"/> | <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/merge-env.gif?raw=true\"/> | <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/roundabout-env.gif?raw=true\"/> | <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/parking-env.gif?raw=true\"/> | <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/intersection-env.gif?raw=true\"/> | <img src=\"https://raw.githubusercontent.com/eleurent/highway-env/master/../gh-media/docs/media/racetrack-env.gif?raw=true\"/> |\n\n<\/details>\n\n## Usage\n\n```python\nimport gymnasium as gym\nimport highway_env\n\ngym.register_envs(highway_env)\n\n# Initialise the environment\nenv = gym.make(\"highway-v1\", config={\"lanes_count\": 3}, render_mode=\"human\")\n\n# Reset the environment to generate the first observation\nobs, info = env.reset()\nfor _ in range(1000):\n    # this is where you would insert your policy\n    action = env.action_space.sample()\n\n    # step (transition) through the environment with the action\n    # receiving the next observation, reward and if the episode has terminated or truncated\n    obs, reward, terminated, truncated, info = env.step(action)\n\n    # If the episode has ended then we can reset to start a new episode\n    if terminated or truncated:\n        obs, info = env.reset()\n\nenv.close()\n```\n\nSee the [documentation](https://highway-env.farama.org/quickstart/) for more examples including how to train agents with Stable Baselines3 and Google Colab notebooks. For examples of trained agents (DQN, DDPG, Value Iteration, MCTS), see the [Agent Examples](https://highway-env.farama.org/content/algorithms/) page.\n\n## Documentation\n\nRead the [documentation online](https://farama-foundation.github.io/HighwayEnv/).\n\n## Development Roadmap\n\nHere is the [roadmap](https://github.com/Farama-Foundation/HighwayEnv/issues/539) for future development work.\n\n## Citating\n\nIf you use HighwayEnv in your work, please consider citing it with:\n\n```bibtex\n@misc{highway-env,\n  author = {Leurent, Edouard},\n  title = {An Environment for Autonomous Driving Decision-Making},\n  year = {2018},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/Farama-Foundation/HighwayEnv}},\n}\n```\n\n## Publications\n\nA list of publications using HighwayEnv can be found in the [documentation](https://highway-env.farama.org/main/content/publications/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7034:3CC8A:17E335:5E45C4:6AB92C3E"},"text_sha256":"ca9d27aeeb538175b24420f0f81467597d8f1a84cbedb9db8748952ae2e7e318"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"tensorforce/tensorforce","input_row":{"repository":"tensorforce/tensorforce","url":"https://github.com/tensorforce/tensorforce","name":"tensorforce","owner":"tensorforce","description":"Tensorforce: a TensorFlow library for applied reinforcement learning","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3305,"issues":677,"created_at":"2017-03-19T16:24:22Z","updated_at":"2026-09-14T07:18:11Z","first_commit_at":"2016-09-29T15:59:21Z","last_commit_at":"2026-07-14T05:34:30Z","activity_months":117.43000000000001,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:23.553Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"tensorforce/tensorforce","visibility":"public","created_at":"2017-03-19T16:24:22Z","updated_at":"2026-09-14T07:18:11Z","private":false,"fork":false,"archived":false,"stargazers_count":3305,"open_issues_count":47,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1948","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:181597C:1C3BFC4:6AB92C3F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1947","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:17B29E1:1BD8130:6AB92C3F"},"commit":{"sha":"a98fe2207d28d69be2d275e2473b165a47337a35","url":"https://github.com/tensorforce/tensorforce/commit/a98fe2207d28d69be2d275e2473b165a47337a35","date":"2018-05-23T17:07:22Z","author_date":"2018-05-23T02:00:39Z","committer_date":"2018-05-23T17:07:22Z","tree_sha":"ea2c21b468b9c0acd67a66c5a36d1b5568302dc4","message_first_line":"Fix for restore from checkpoint"},"tree_request_status":200,"tree_rate":{"github_remaining":"1946","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:18219B7:1C47C1C:6AB92C40"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9717,"blob_sha":"211fc70fe2d60a4df8ef3eb7b1f133e22b0d4027","priority":0}],"documents":[{"path":"README.md","size":9717,"blob_sha":"211fc70fe2d60a4df8ef3eb7b1f133e22b0d4027","priority":0,"status":200,"text":"TensorForce: A TensorFlow library for applied reinforcement learning\n====================================================================\n\n[![Docs](https://readthedocs.org/projects/tensorforce/badge)](http://tensorforce.readthedocs.io/en/latest/)\n[![Gitter](https://badges.gitter.im/reinforceio/TensorForce.svg)](https://docs.google.com/forms/d/1_UD5Pb5LaPVUviD0pO0fFcEnx_vwenvuc00jmP2rRIc/)\n[![Build Status](https://travis-ci.org/reinforceio/tensorforce.svg?branch=master)](https://travis-ci.org/reinforceio/tensorforce)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/reinforceio/tensorforce/blob/master/LICENSE)\n\nIntroduction\n------------\n\nTensorForce is an open source reinforcement learning library focused on\nproviding clear APIs, readability and modularisation to deploy\nreinforcement learning solutions both in research and practice.\nTensorForce is built on top of TensorFlow and compatible with Python 2.7\nand &gt;3.5 and supports multiple state inputs and multi-dimensional\nactions to be compatible with any type of simulation or application environment.\n\nTensorForce also aims to move all reinforcement learning logic into the\nTensorFlow graph, including control flow. This both reduces dependencies\non the host language (Python), thus enabling portable computation graphs that\ncan be used in other languages and  contexts, and improves performance.\n\nMore information on architecture can also be found [on our blog](https://reinforce.io/blog/).\nPlease also read the [TensorForce FAQ](https://github.com/reinforceio/tensorforce/blob/master/FAQ.md)\nif you encounter problems or have questions.\n\nFinally, read the latest update notes (UPDATE_NOTES.md) for an idea of\nhow the project is evolving, especially concerning major API breaking updates.\n\nThe main difference to existing libraries is a strict separation of\nenvironments, agents and update logic that facilitates usage in\nnon-simulation environments. Further, research code often relies on\nfixed network architectures that have been used to tackle particular\nbenchmarks. TensorForce is built with the idea that (almost) everything\nshould be optionally configurable and in particular uses value function\ntemplate configurations to be able to quickly experiment with new\nmodels. The goal of TensorForce is to provide a practitioner's\nreinforcement learning framework that integrates into modern software\nservice architectures.\n\nTensorForce is actively being maintained and developed both to\ncontinuously improve the existing code as well as to reflect new\ndevelopments as they arise. The aim is not to\ninclude every new trick but to adopt methods as\nthey prove themselves stable.\n\nFeatures\n--------\n\nTensorForce currently integrates with the OpenAI Gym API, OpenAI\nUniverse, DeepMind lab, ALE and Maze explorer. The following algorithms are available (all\npolicy methods both continuous/discrete and using a Beta distribution for bounded actions). \n\n-  A3C using distributed TensorFlow or a multithreaded runner - now as part of our generic Model\n    usable with different agents. - [paper](https://arxiv.org/pdf/1602.01783.pdf)\n- Trust Region Policy Optimization (TRPO) - ```trpo_agent``` - [paper](https://arxiv.org/abs/1502.05477)\n- Normalised Advantage functions (NAFs) - ```naf_agent``` - [paper](https://arxiv.org/pdf/1603.00748.pdf)\n- DQN - ```dqn_agent``` -  [paper](https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf)\n- Double-DQN - ```ddqn_agent``` - [paper](https://arxiv.org/abs/1509.06461)\n- N-step DQN - ```dqn_nstep_agent```\n- Vanilla Policy Gradients (VPG/ REINFORCE) - ```vpg_agent```- [paper](http://www-anw.cs.umass.edu/~barto/courses/cs687/williams92simple.pdf)\n- Actor-critic models - via `baseline` for any policy gradient model (see next list) - [paper]()\n- Deep Q-learning from Demonstration (DQFD) -\n    [paper](https://arxiv.org/abs/1704.03732)\n- Proximal Policy Optimisation (PPO) - ```ppo_agent``` - [paper](https://arxiv.org/abs/1707.06347)\n- Random and constant agents for sanity checking: ```random_agent```, ```constant_agent```\n \nOther heuristics and their respective config key that can be turned on where sensible:\n\n- Generalized advantage estimation - ```gae_lambda```  - [paper](https://arxiv.org/abs/1506.02438)\n- Prioritizied experience replay - memory type ```prioritized_replay``` - [paper](https://arxiv.org/abs/1511.05952)\n- Bounded continuous actions are mapped to Beta distributions instead of Gaussians - [paper](http://proceedings.mlr.press/v70/chou17a/chou17a.pdf)\n- Baseline / actor-critic modes: Based on raw states (```states```) or on network output (```network```). MLP (```mlp```), CNN (```cnn```) or custom network (```custom```). Special case for mode ```states```: baseline per state + linear combination layer (via ```baseline=dict(state1=..., state2=..., etc)```).\n- Generic pure TensorFlow optimizers, most models can be used with natural gradient and evolutionary optimizers\n- Preprocessing modes: ```normalize```, ```standardize```, ```grayscale```, ```sequence```, ```clip```,\n  ```divide```, ```image_resize```\n- Exploration modes: ```constant```,```linear_decay```, ```epsilon_anneal```, ```epsilon_decay```,\n  ```ornstein_uhlenbeck```\n\nInstallation\n------------\n\nWe uploaded the latest stable version of TensorForce to PyPI. To install, just execute:\n\n```bash\npip install tensorforce\n```\n\nIf you want to use the latest version from GitHub, use:\n\n\n```bash\ngit clone git@github.com:reinforceio/tensorforce.git\ncd tensorforce\npip install -e .\n```\n\nTensorForce is built on [Google's Tensorflow](https://www.tensorflow.org/). The installation command assumes\nthat you have `tensorflow` or `tensorflow-gpu` installed. Tensorforce requires Tensorflow version 1.5 or later.\n\nAlternatively, you can use the following commands to install the tensorflow dependency.\n\nTo install TensorForce with `tensorflow` (cpu), use:\n\n```bash\n# PyPI install\npip install tensorforce[tf]\n\n# Local install\npip install -e .[tf]\n```\n\nTo install TensorForce with `tensorflow-gpu` (gpu), use:\n\n```bash\n# PyPI install\npip install tensorforce[tf_gpu]\n\n# Local install\npip install -e .[tf_gpu]\n```\n\nTo update TensorForce, use `pip install --upgrade tensorforce` for the PyPI\nversion, or run `git pull` in the tensorforce directory if you cloned the \nGitHub repository.\nPlease note that we did not include OpenAI Gym/Universe/DeepMind lab in\nthe default install script because not everyone will want to use these.\nPlease install them as required, usually via pip.\n\nExamples and documentation\n--------------------------\n\nFor a quick start, you can run one of our example scripts using the\nprovided configurations, e.g. to run the TRPO agent on CartPole, execute\nfrom the examples folder:\n\n```bash\npython examples/openai_gym.py CartPole-v0 -a examples/configs/ppo.json -n examples/configs/mlp2_network.json\n```\n\nDocumentation is available at\n[ReadTheDocs](http://tensorforce.readthedocs.io). We also have tests\nvalidating models on minimal environments which can be run from the main\ndirectory by executing `pytest`{.sourceCode}.\n\nCreate and use agents\n---------------------\n\nTo use TensorForce as a library without using the pre-defined simulation\nrunners, simply install and import the library, then create an agent and\nuse it as seen below (see documentation for all optional parameters):\n\n```python\nfrom tensorforce.agents import PPOAgent\n\n# Create a Proximal Policy Optimization agent\nagent = PPOAgent(\n    states=dict(type='float', shape=(10,)),\n    actions=dict(type='int', num_actions=10),\n    network=[\n        dict(type='dense', size=64),\n        dict(type='dense', size=64)\n    ],\n    batching_capacity=1000,\n    step_optimizer=dict(\n        type='adam',\n        learning_rate=1e-4\n    )\n)\n\n# Get new data from somewhere, e.g. a client to a web app\nclient = MyClient('http://127.0.0.1', 8080)\n\n# Poll new state from client\nstate = client.get_state()\n\n# Get prediction from agent, execute\naction = agent.act(state)\nreward = client.execute(action)\n\n# Add experience, agent automatically updates model according to batch size\nagent.observe(reward=reward, terminal=False)\n```\n\nBenchmarks\n----------\n\nWe provide a separate repository for benchmarking our algorithm implementations at\n[reinforceio/tensorforce-benchmark](https://github.com/reinforceio/tensorforce-benchmark).\n\nDocker containers for benchmarking (CPU and GPU) are available.\n\nThis is a sample output for `CartPole-v0`, comparing VPG, TRPO and PPO:\n\n![example output](https://user-images.githubusercontent.com/14904111/29328011-52778284-81f1-11e7-8f70-6554ca9388ed.png)\n\nPlease refer to the [tensorforce-benchmark](https://github.com/reinforceio/tensorforce-benchmark) repository\nfor more information.\n\n\nContributions\n---------------------------\n\nPlease file bug reports and feature discussions as GitHub issues. For large PRs,\nit's also helpful to first discuss the feature in an issue. \n\nCite\n----\n\nIf you use TensorForce in your academic research, we would be grateful if you could cite it as follows:\n\n```\n@misc{schaarschmidt2017tensorforce,\n    author = {Schaarschmidt, Michael and Kuhnle, Alexander and Fricke, Kai},\n    title = {TensorForce: A TensorFlow library for applied reinforcement learning},\n    howpublished={Web page},\n    url = {https://github.com/reinforceio/tensorforce},\n    year = {2017}\n}\n```\n\nWe are also very grateful for our open source contributors (listed according to github): Islandman93, sven1977, Mazecreator\n, wassname, lefnire, trickmeyer, mkempers, mryellow, ImpulseAdventure, HassamSheikh, vwxyzjn, beflix, janislavjankov, tms1337,\nperara, butchcom, yellowbee686, tomhennigan, neitzal, BorisSchaeling, ngoodger, ekerazha, Davidnet, AdamStelmaszczyk, 10nagachika, petrbel, Kismuz.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:A58F2:176616:5DC8D4:6AB92C40"},"text_sha256":"4ddbd14029dafbf070e185d9d0c2bb2f194a0a0016ee8cf638e3c27a9400fbc8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1945","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087F:71F98:1841D41:1C67C2C:6AB92C41"},"commit":{"sha":"91507053583f131731133736d035badfe232aea1","url":"https://github.com/tensorforce/tensorforce/commit/91507053583f131731133736d035badfe232aea1","date":"2026-05-09T09:32:45Z","author_date":"2026-05-09T09:32:45Z","committer_date":"2026-05-09T09:32:45Z","tree_sha":"7122c7fd9a8b245192d2e46fc219081302eefc03","message_first_line":"Merge pull request #917 from tensorforce/dependabot/pip/docs/mistune-3.2.1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1944","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:12A1E13:15F7FA1:6AB92C41"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13757,"blob_sha":"b258e414591e162e4f3c3b0c03cc1f966cee35a0","priority":0}],"documents":[{"path":"README.md","size":13757,"blob_sha":"b258e414591e162e4f3c3b0c03cc1f966cee35a0","priority":0,"status":200,"text":"# Tensorforce: a TensorFlow library for applied reinforcement learning\n\n[![Docs](https://readthedocs.org/projects/tensorforce/badge)](http://tensorforce.readthedocs.io/en/latest/)\n[![Gitter](https://badges.gitter.im/tensorforce/community.svg)](https://gitter.im/tensorforce/community)\n[![Build Status](https://travis-ci.com/tensorforce/tensorforce.svg?branch=master)](https://travis-ci.com/tensorforce/tensorforce)\n[![pypi version](https://img.shields.io/pypi/v/tensorforce)](https://pypi.org/project/Tensorforce/)\n[![python version](https://img.shields.io/pypi/pyversions/tensorforce)](https://pypi.org/project/Tensorforce/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/tensorforce/tensorforce/blob/master/LICENSE)\n[![Donate](https://img.shields.io/badge/donate-GitHub_Sponsors-yellow)](https://github.com/sponsors/AlexKuhnle)\n[![Donate](https://img.shields.io/badge/donate-Liberapay-yellow)](https://liberapay.com/TensorforceTeam/donate)\n\n\n**This project is not maintained any longer!**\n\n\n#### Introduction\n\nTensorforce is an open-source deep reinforcement learning framework, with an emphasis on modularized flexible library design and straightforward usability for applications in research and practice. Tensorforce is built on top of [Google's TensorFlow framework](https://www.tensorflow.org/) and requires Python 3.\n\nTensorforce follows a set of high-level design choices which differentiate it from other similar libraries:\n\n- **Modular component-based design**: Feature implementations, above all, strive to be as generally applicable and configurable as possible, potentially at some cost of faithfully resembling details of the introducing paper.\n- **Separation of RL algorithm and application**: Algorithms are agnostic to the type and structure of inputs (states/observations) and outputs (actions/decisions), as well as the interaction with the application environment.\n- **Full-on TensorFlow models**: The entire reinforcement learning logic, including control flow, is implemented in TensorFlow, to enable portable computation graphs independent of application programming language, and to facilitate the deployment of models.\n\n\n\n#### Quicklinks\n\n- [Documentation](http://tensorforce.readthedocs.io) and [update notes](https://github.com/tensorforce/tensorforce/blob/master/UPDATE_NOTES.md)\n- [Contact](mailto:tensorforce.team@gmail.com) and [Gitter channel](https://gitter.im/tensorforce/community)\n- [Benchmarks](https://github.com/tensorforce/tensorforce/blob/master/benchmarks) and [projects using Tensorforce](https://github.com/tensorforce/tensorforce/blob/master/PROJECTS.md)\n- [Roadmap](https://github.com/tensorforce/tensorforce/blob/master/ROADMAP.md) and [contribution guidelines](https://github.com/tensorforce/tensorforce/blob/master/CONTRIBUTING.md)\n- [GitHub Sponsors](https://github.com/sponsors/AlexKuhnle) and [Liberapay](https://liberapay.com/TensorforceTeam/donate)\n\n\n\n#### Table of content\n\n- [Installation](#installation)\n- [Quickstart example code](#quickstart-example-code)\n- [Command line usage](#command-line-usage)\n- [Features](#features)\n- [Environment adapters](#environment-adapters)\n- [Support, feedback and donating](#support-feedback-and-donating)\n- [Core team and contributors](#core-team-and-contributors)\n- [Cite Tensorforce](#cite-tensorforce)\n\n\n\n## Installation\n\nA stable version of Tensorforce is periodically updated on PyPI and installed as follows:\n\n```bash\npip3 install tensorforce\n```\n\nTo always use the latest version of Tensorforce, install the GitHub version instead:\n\n```bash\ngit clone https://github.com/tensorforce/tensorforce.git\npip3 install -e tensorforce\n```\n\n**Note on installation on M1 Macs:** At the moment Tensorflow, which is a core dependency of Tensorforce, cannot be installed on M1 Macs directly. Follow the [\"M1 Macs\" section](https://tensorforce.readthedocs.io/en/latest/basics/installation.html) in the documentation for a workaround.\n\nEnvironments require additional packages for which there are setup options available (`ale`, `gym`, `retro`, `vizdoom`, `carla`; or `envs` for all environments), however, some require additional tools to be installed separately (see [environments documentation](http://tensorforce.readthedocs.io)). Other setup options include `tfa` for [TensorFlow Addons](https://www.tensorflow.org/addons) and `tune` for [HpBandSter](https://github.com/automl/HpBandSter) required for the `tune.py` script.\n\n**Note on GPU usage:** Different from (un)supervised deep learning, RL does not always benefit from running on a GPU, depending on environment and agent configuration. In particular for environments with low-dimensional state spaces (i.e., no images), it is hence worth trying to run on CPU only.\n\n\n\n## Quickstart example code\n\n```python\nfrom tensorforce import Agent, Environment\n\n# Pre-defined or custom environment\nenvironment = Environment.create(\n    environment='gym', level='CartPole', max_episode_timesteps=500\n)\n\n# Instantiate a Tensorforce agent\nagent = Agent.create(\n    agent='tensorforce',\n    environment=environment,  # alternatively: states, actions, (max_episode_timesteps)\n    memory=10000,\n    update=dict(unit='timesteps', batch_size=64),\n    optimizer=dict(type='adam', learning_rate=3e-4),\n    policy=dict(network='auto'),\n    objective='policy_gradient',\n    reward_estimation=dict(horizon=20)\n)\n\n# Train for 300 episodes\nfor _ in range(300):\n\n    # Initialize episode\n    states = environment.reset()\n    terminal = False\n\n    while not terminal:\n        # Episode timestep\n        actions = agent.act(states=states)\n        states, terminal, reward = environment.execute(actions=actions)\n        agent.observe(terminal=terminal, reward=reward)\n\nagent.close()\nenvironment.close()\n```\n\n\n\n## Command line usage\n\nTensorforce comes with a range of [example configurations](https://github.com/tensorforce/tensorforce/tree/master/benchmarks/configs) for different popular reinforcement learning environments. For instance, to run Tensorforce's implementation of the popular [Proximal Policy Optimization (PPO) algorithm](https://arxiv.org/abs/1707.06347) on the [OpenAI Gym CartPole environment](https://gym.openai.com/envs/CartPole-v1/), execute the following line:\n\n```bash\npython3 run.py --agent benchmarks/configs/ppo.json --environment gym \\\n    --level CartPole-v1 --episodes 100\n```\n\nFor more information check out the [documentation](http://tensorforce.readthedocs.io).\n\n\n\n## Features\n\n- **Network layers**: Fully-connected, 1- and 2-dimensional convolutions, embeddings, pooling, RNNs, dropout, normalization, and more; *plus* support of Keras layers.\n- **Network architecture**: Support for multi-state inputs and layer (block) reuse, simple definition of directed acyclic graph structures via register/retrieve layer, plus support for arbitrary architectures.\n- **Memory types**: Simple batch buffer memory, random replay memory.\n- **Policy distributions**: Bernoulli distribution for boolean actions, categorical distribution for (finite) integer actions, Gaussian distribution for continuous actions, Beta distribution for range-constrained continuous actions, multi-action support.\n- **Reward estimation**: Configuration options for estimation horizon, future reward discount, state/state-action/advantage estimation, and for whether to consider terminal and horizon states.\n- **Training objectives**: (Deterministic) policy gradient, state-(action-)value approximation.\n- **Optimization algorithms**: Various gradient-based optimizers provided by TensorFlow like Adam/AdaDelta/RMSProp/etc, evolutionary optimizer, natural-gradient-based optimizer, plus a range of meta-optimizers.\n- **Exploration**: Randomized actions, sampling temperature, variable noise.\n- **Preprocessing**: Clipping, deltafier, sequence, image processing.\n- **Regularization**: L2 and entropy regularization.\n- **Execution modes**: Parallelized execution of multiple environments based on Python's `multiprocessing` and `socket`.\n- **Optimized act-only SavedModel extraction**.\n- **TensorBoard support**.\n\nBy combining these modular components in different ways, a variety of popular deep reinforcement learning models/features can be replicated:\n\n- Q-learning: [Deep Q-learning](https://www.nature.com/articles/nature14236), [Double-DQN](https://arxiv.org/abs/1509.06461), [Dueling DQN](https://arxiv.org/abs/1511.06581), [n-step DQN](https://arxiv.org/abs/1602.01783), [Normalised Advantage Function (NAF)](https://arxiv.org/abs/1603.00748)\n- Policy gradient: [vanilla policy-gradient / REINFORCE](http://www-anw.cs.umass.edu/~barto/courses/cs687/williams92simple.pdf), [Actor-critic and A3C](https://arxiv.org/abs/1602.01783), [Proximal Policy Optimization](https://arxiv.org/abs/1707.06347), [Trust Region Policy Optimization](https://arxiv.org/abs/1502.05477), [Deterministic Policy Gradient](https://arxiv.org/abs/1509.02971)\n\nNote that in general the replication is not 100% faithful, since the models as described in the corresponding paper often involve additional minor tweaks and modifications which are hard to support with a modular design (and, arguably, also questionable whether it is important/desirable to support them). On the upside, these models are just a few examples from the multitude of module combinations supported by Tensorforce.\n\n\n\n## Environment adapters\n\n- [Arcade Learning Environment](https://github.com/mgbellemare/Arcade-Learning-Environment), a simple object-oriented framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games.\n- [CARLA](https://github.com/carla-simulator/carla), is an open-source simulator for autonomous driving research.\n- [OpenAI Gym](https://gym.openai.com/), a toolkit for developing and comparing reinforcement learning algorithms which supports teaching agents everything from walking to playing games like Pong or Pinball.\n- [OpenAI Retro](https://github.com/openai/retro), lets you turn classic video games into Gym environments for reinforcement learning and comes with integrations for ~1000 games.\n- [OpenSim](http://osim-rl.stanford.edu/), reinforcement learning with musculoskeletal models.\n- [PyGame Learning Environment](https://github.com/ntasfi/PyGame-Learning-Environment/), learning environment which allows a quick start to Reinforcement Learning in Python.\n- [ViZDoom](https://github.com/mwydmuch/ViZDoom), allows developing AI bots that play Doom using only the visual information.\n\n\n## Support, feedback and donating\n\nPlease get in touch via [mail](mailto:tensorforce.team@gmail.com) or on [Gitter](https://gitter.im/tensorforce/community) if you have questions, feedback, ideas for features/collaboration, or if you seek support for applying Tensorforce to your problem.\n\nIf you want to support the Tensorforce core team (see below), please also consider donating: [GitHub Sponsors](https://github.com/sponsors/AlexKuhnle) or [Liberapay](https://liberapay.com/TensorforceTeam/donate).\n\n\n\n## Core team and contributors\n\nTensorforce is currently developed and maintained by [Alexander Kuhnle](https://github.com/AlexKuhnle).\n\nEarlier versions of Tensorforce (<= 0.4.2) were developed by [Michael Schaarschmidt](https://github.com/michaelschaarschmidt), [Alexander Kuhnle](https://github.com/AlexKuhnle) and [Kai Fricke](https://github.com/krfricke).\n\nThe advanced parallel execution functionality was originally contributed by Jean Rabault (@jerabaul29) and Vincent Belus (@vbelus). Moreover, the pretraining feature was largely developed in collaboration with Hongwei Tang (@thw1021) and Jean Rabault (@jerabaul29).\n\nThe CARLA environment wrapper is currently developed by Luca Anzalone (@luca96).\n\nWe are very grateful for our open-source contributors (listed according to Github, updated periodically):\n\nIslandman93, sven1977, Mazecreator, wassname, lefnire, daggertye, trickmeyer, mkempers,\nmryellow, ImpulseAdventure,\njanislavjankov, andrewekhalel,\nHassamSheikh, skervim,\nbeflix, coord-e,\nbenelot, tms1337, vwxyzjn, erniejunior,\nDeathn0t, petrbel, nrhodes, batu, yellowbee686, tgianko,\nAdamStelmaszczyk, BorisSchaeling, christianhidber, Davidnet, ekerazha, gitter-badger, kborozdin, Kismuz, mannsi, milesmcc, nagachika, neitzal, ngoodger, perara, sohakes, tomhennigan.\n\n\n\n## Cite Tensorforce\n\nPlease cite the framework as follows:\n\n```\n@misc{tensorforce,\n  author       = {Kuhnle, Alexander and Schaarschmidt, Michael and Fricke, Kai},\n  title        = {Tensorforce: a TensorFlow library for applied reinforcement learning},\n  howpublished = {Web page},\n  url          = {https://github.com/tensorforce/tensorforce},\n  year         = {2017}\n}\n```\n\nIf you use the [parallel execution functionality](https://github.com/tensorforce/tensorforce/tree/master/tensorforce/contrib), please additionally cite it as follows:\n\n```\n@article{rabault2019accelerating,\n  title        = {Accelerating deep reinforcement learning strategies of flow control through a multi-environment approach},\n  author       = {Rabault, Jean and Kuhnle, Alexander},\n  journal      = {Physics of Fluids},\n  volume       = {31},\n  number       = {9},\n  pages        = {094105},\n  year         = {2019},\n  publisher    = {AIP Publishing}\n}\n```\n\nIf you use Tensorforce in your research, you may additionally consider citing the following paper:\n\n```\n@article{lift-tensorforce,\n  author       = {Schaarschmidt, Michael and Kuhnle, Alexander and Ellis, Ben and Fricke, Kai and Gessert, Felix and Yoneki, Eiko},\n  title        = {{LIFT}: Reinforcement Learning in Computer Systems by Learning From Demonstrations},\n  journal      = {CoRR},\n  volume       = {abs/1808.07903},\n  year         = {2018},\n  url          = {http://arxiv.org/abs/1808.07903},\n  archivePrefix = {arXiv},\n  eprint       = {1808.07903}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D020:2E8679:17D008:5E3030:6AB92C42"},"text_sha256":"770cb6237e7460f8b7fb77e1d1dce11cfff91577e67ecab5a19a7169b9756c69"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"flow-project/flow","input_row":{"repository":"flow-project/flow","url":"https://github.com/flow-project/flow","name":"flow","owner":"flow-project","description":"Computational framework for reinforcement learning in traffic control","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1190,"issues":491,"created_at":"2017-08-24T00:36:03Z","updated_at":"2026-09-23T03:34:33Z","first_commit_at":"2016-09-16T21:19:47Z","last_commit_at":"2020-12-11T19:26:14Z","activity_months":50.82,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:26.607Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"flow-project/flow","visibility":"public","created_at":"2017-08-24T00:36:03Z","updated_at":"2026-09-23T03:34:33Z","private":false,"fork":false,"archived":false,"stargazers_count":1190,"open_issues_count":215,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1943","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A6:724D2:17DB59F:1C018DF:6AB92C42"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1942","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17DADA0:1C01195:6AB92C43"},"commit":{"sha":"99773415f0ab38b4aceb755e487b45b756d28bde","url":"https://github.com/flow-project/flow/commit/99773415f0ab38b4aceb755e487b45b756d28bde","date":"2018-05-16T05:55:07Z","author_date":"2018-05-16T05:55:07Z","committer_date":"2018-05-16T05:55:07Z","tree_sha":"929cd266d01f9bf91a640c657dfd2c298d761f64","message_first_line":"Merge pull request #444 from cathywu/rllib_update"},"tree_request_status":200,"tree_rate":{"github_remaining":"1941","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:17B5721:1BDBC20:6AB92C43"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4997,"blob_sha":"09cc2001e595b5161b77aa20f3946c9185c292a5","priority":0}],"documents":[{"path":"README.md","size":4997,"blob_sha":"09cc2001e595b5161b77aa20f3946c9185c292a5","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.com/cathywu/learning-traffic.svg?token=wbU1B66dmFhiJUsJezgC&branch=master)](https://travis-ci.com/cathywu/learning-traffic)\n[![Docs](https://readthedocs.org/projects/berkeleyflow/badge)](http://berkeleyflow.readthedocs.org/en/latest/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cathywu/flow/blob/master/LICENSE.md)\n\n# Flow\n\nFlow is a computational framework for deep RL and control experiments for traffic microsimulation.\n\nSee [results and videos](https://sites.google.com/view/ieee-tro-flow/home) of the application of Flow to several mixed-autonomy traffic scenarios.\n\n# More information\n\n- [Documentation](https://berkeleyflow.readthedocs.org/en/latest/)\n- [Installation instructions](http://berkeleyflow.readthedocs.io/en/latest/flow_setup.html)\n- [Tutorial](http://berkeleyflow.readthedocs.io/en/latest/tutorial.html)\n\n# Getting involved!!\n\n- Ask questions on our mailing list: [flow-dev@googlegroups.com](https://groups.google.com/forum/#!forum/flow-dev).\n- Please report bugs by submitting a [GitHub issue](https://github.com/cathywu/flow/issues).\n- Submit contributions using [pull requests](https://github.com/cathywu/flow/pulls).\n\n# Citing Flow\n\nIf you use Flow for academic research, you are highly encouraged to cite our paper:\n\nC. Wu, A. Kreidieh, K. Parvate, E. Vinitsky, A. Bayen, \"Flow: Architecture and Benchmarking for Reinforcement Learning in Traffic Control,\" CoRR, vol. abs/1710.05465, 2017. [Online]. Available: https://arxiv.org/abs/1710.05465\n\n# Credits\n\nFlow is created by and actively developed by members of the [Mobile Sensing Lab](http://bayen.eecs.berkeley.edu/) at UC Berkeley: Cathy Wu, Eugene Vinitsky, Aboudy Kreidieh, Kanaad Parvate, Nishant Kheterpal, Saleh Albeaik, Kathy Jang, and Ananth Kuchibhotla. Alumni contributors include Leah Dickstein and Nathan Mandi.\n\n\n<!-- ## Getting Started\n\n- TODO: Tutorial for visualization / plot generating scripts\n\nSumo Params:\n\n- Port required, recommended set to 8873\n- Timestep, recommended is 0.01, default is 1.0\n- TODO: Same flags as SUMO Popen, make it more robust\n\nEnv Params:\n\n- These will change based on the scenario\n- Target Velocity\n\nNet Params:\n\n- For each environment, you should determine which net params are relevant.\n- Used in Generator files that are specific to each scenario?\n- \"length\" : length of the track\n- \"lanes\" : number of lanes\n- \"speed_limit\"\n- \"resolution\" : number of nodes per edge, affects how 'circular' the track appears when visualized but doesn't affect performance [sic] (e.g. if you have 4 edges for a circle and resolution=2 it will display as 12 lines in the gui)\n- \"net_path\" : path for the folder where the net XML files will be saved: edg.xml, .netccfg, nod.xml, typ.xml\n- Suggestion: Direct control of naming of XML files\n\nConfiguration (Cfg) Params:\n\n- \"start_time\" : 0\n- \"end_time\" : When the simulation ends, so pick a reasonably large number\n- TODO(cathywu) what are the units of start/end time?\n- \"cfg_path\" : path for the folder where the cfg XML files will be saved: add.xml, gui.cfg, net.xml, rou.xml, sumo.cfg\n\nVehicle Params:\n\n- Dictionary of car type tag -> (count, car following controller, lane changing controller) assignments, where controller is a method.\n- Specifies number of cars for each type\n- \"Type\" : (Number of cars, Car Following Model, Lane Changing Model)\n- \"rl\": No car following model, action determined by RL algorithm\n- All other types can have arbitrary names because their actions/updates are determined by the models (other functions in the tuple)\n- Suggestion: instead of having \"rl\" be specific, we could have it such that None or a RL HOF are recognized as \"rl vehicles\"; Other suggestion: specifying controlled_vehicle_params and rl_params\n- TODO(cathywu) include an example here\n\n### Vehicle Params\n\nImplemented car following models:\n\n- Basic Car Following Model\n\t- per [Horn 2013](http://ieeexplore.ieee.org/abstract/document/6728204/)\n\t- Only considers vehicle ahead.\n\t- Terms for desired velocity and headway gap\n- Bilateral Control Model\n\t- per [Horn 2013](http://ieeexplore.ieee.org/abstract/document/6728204/)\n\t- Considers vehicle ahead and vehicle behind.\n\t- Term for desired velocity. Another term to place self halfway between car ahead and car behind.\n- Optimal Vehicle Model\n\t- per [Jin & Gabor 2014](http://www-personal.umich.edu/~orosz/articles/CDC_2014_Jin.pdf)\n\t- Only considers vehicle ahead.\n\t- Desired velocity term is a function of headway. Also seeks to match velocity of car ahead.\n\n\nLane changing models:\n\n- No lane changing\n- Stochastic lane changer\n\nWarnings:\n====\nAll car controllers come equipped with a fail-safe rule wherein cars are not allowed to\nmove at a speed that would cause them to crash if the car in front of them suddenly started\nbreaking with max acceleration. If they attempt to do so, they will be reset to move at $$v_safe$$\nwhere $$v_safe$$ is the speed such that the cars will come to rest at the same point.  -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DEA:3FD49:178CB7:5DEFC7:6AB92C42"},"text_sha256":"8d54a144f5d3e3a3d37996b265363b3792f925e3c770ba7979bf293ffb149022"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1940","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0799:228A99:17F55F8:1C1BA51:6AB92C44"},"commit":{"sha":"a511c41c48e6b928bb2060de8ad1ef3c3e3d9554","url":"https://github.com/flow-project/flow/commit/a511c41c48e6b928bb2060de8ad1ef3c3e3d9554","date":"2020-12-11T19:26:14Z","author_date":"2020-12-11T19:26:14Z","committer_date":"2020-12-11T19:26:14Z","tree_sha":"a998aa42e38fa5329f7ac21221b9d0f668075c80","message_first_line":"Better handling temporary files for running at scale (#1026)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1939","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BA:71C58:17C48E0:1BEAEEA:6AB92C44"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2953,"blob_sha":"7d37223c5b76b5b4339e0b18f2513dca1d77d136","priority":0}],"documents":[{"path":"README.md","size":2953,"blob_sha":"7d37223c5b76b5b4339e0b18f2513dca1d77d136","priority":0,"status":200,"text":"<img src=\"docs/img/square_logo.png\" align=\"right\" width=\"25%\"/>\n\n[![Build Status](https://travis-ci.com/flow-project/flow.svg?branch=master)](https://travis-ci.com/flow-project/flow)\n[![Docs](https://readthedocs.org/projects/flow/badge)](http://flow.readthedocs.org/en/latest/)\n[![Coverage Status](https://coveralls.io/repos/github/flow-project/flow/badge.svg?branch=master)](https://coveralls.io/github/flow-project/flow?branch=master)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/flow-project/flow/binder)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flow-project/flow/blob/master/LICENSE.md)\n\n# Flow\n\n[Flow](https://flow-project.github.io/) is a computational framework for deep RL and control experiments for traffic microsimulation.\n\nSee [our website](https://flow-project.github.io/) for more information on the application of Flow to several mixed-autonomy traffic scenarios. Other [results and videos](https://sites.google.com/view/ieee-tro-flow/home) are available as well.\n\n# More information\n\n- [Documentation](https://flow.readthedocs.org/en/latest/)\n- [Installation instructions](http://flow.readthedocs.io/en/latest/flow_setup.html)\n- [Tutorials](https://github.com/flow-project/flow/tree/master/tutorials)\n- [Binder Build (beta)](https://mybinder.org/v2/gh/flow-project/flow/binder)\n\n# Technical questions\n\nIf you have a bug, please report it. Otherwise, join the [Flow Users group](https://join.slack.com/t/flow-users/shared_invite/enQtODQ0NDYxMTQyNDY2LTY1ZDVjZTljM2U0ODIxNTY5NTQ2MmUxMzYzNzc5NzU4ZTlmNGI2ZjFmNGU4YjVhNzE3NjcwZTBjNzIxYTg5ZmY) on Slack!  \n\n# Getting involved\n\nWe welcome your contributions.\n\n- Please report bugs and improvements by submitting [GitHub issue](https://github.com/flow-project/flow/issues).\n- Submit your contributions using [pull requests](https://github.com/flow-project/flow/pulls). Please use [this template](https://github.com/flow-project/flow/blob/master/.github/PULL_REQUEST_TEMPLATE.md) for your pull requests.\n\n# Citing Flow\n\nIf you use Flow for academic research, you are highly encouraged to cite our paper:\n\nC. Wu, A. Kreidieh, K. Parvate, E. Vinitsky, A. Bayen, \"Flow: Architecture and Benchmarking for Reinforcement Learning in Traffic Control,\" CoRR, vol. abs/1710.05465, 2017. [Online]. Available: https://arxiv.org/abs/1710.05465\n\nIf you use the benchmarks, you are highly encouraged to cite our paper:\n\nVinitsky, E., Kreidieh, A., Le Flem, L., Kheterpal, N., Jang, K., Wu, F., ... & Bayen, A. M,  Benchmarks for reinforcement learning in mixed-autonomy traffic. In Conference on Robot Learning (pp. 399-409). Available: http://proceedings.mlr.press/v87/vinitsky18a.html\n\n# Contributors\n\nFlow is supported by the [Mobile Sensing Lab](http://bayen.eecs.berkeley.edu/) at UC Berkeley and Amazon AWS Machine Learning research grants. The contributors are listed in [Flow Team Page](https://flow-project.github.io/team.html).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D30:3CC8A:17E396:5E46E5:6AB92C44"},"text_sha256":"8489019ff8ced05181d1f860f5ac9f5e656db2cb76865a6b9d91afde7c60598e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Kismuz/btgym","input_row":{"repository":"Kismuz/btgym","url":"https://github.com/Kismuz/btgym","name":"btgym","owner":"Kismuz","description":"Scalable, event-driven, deep-learning-friendly backtesting library","language":"Python","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":1035,"issues":130,"created_at":"2017-05-24T16:35:17Z","updated_at":"2026-09-14T20:48:50Z","first_commit_at":"2017-05-24T16:35:18Z","last_commit_at":"2021-08-28T22:13:14Z","activity_months":51.159999999999997,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:29.183Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Kismuz/btgym","visibility":"public","created_at":"2017-05-24T16:35:17Z","updated_at":"2026-09-14T20:48:50Z","private":false,"fork":false,"archived":false,"stargazers_count":1035,"open_issues_count":11,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"1938","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089F:1DB627:187EBED:1CA529C:6AB92C45"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1937","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A1:1B4E7A:17B885A:1BDEAA3:6AB92C45"},"commit":{"sha":"1c10abfc1e491f859cea1511d52c9d610d8ca14f","url":"https://github.com/Kismuz/btgym/commit/1c10abfc1e491f859cea1511d52c9d610d8ca14f","date":"2018-05-10T10:22:04Z","author_date":"2018-05-10T10:22:04Z","committer_date":"2018-05-10T10:22:04Z","tree_sha":"c081e3e9814b1c007946d89c99bf87864c747fff","message_first_line":"casual(former time) datafeed bugs fixes"},"tree_request_status":200,"tree_rate":{"github_remaining":"1936","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:17A2695:1BC884F:6AB92C45"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19669,"blob_sha":"7f4cf1a6ffbc05e3c338d33b333065b99068f2a5","priority":0},{"path":"docs/_modules/btgym/algorithms/policy.html","size":98017,"blob_sha":"a4026dca14c5e32204541331407ebb63457f79b1","priority":1},{"path":"docs/_modules/btgym/research/gps/policy.html","size":11477,"blob_sha":"1ff8928b829004ea5ae215d8a4213299ac29a7f4","priority":1},{"path":"docs/_modules/btgym/research/policy_rl2.html","size":13209,"blob_sha":"f026dfa3dcdb0f67d29684a1fab253decbb06cb5","priority":1},{"path":"docs/_modules/btgym/research/policy_stacked_lstm.html","size":82715,"blob_sha":"805e7484b3d15e5fe14fe37d73cee3304a2d6c41","priority":1},{"path":"docs/_sources/btgym.algorithms.policy.rst.txt","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1},{"path":"docs/btgym.algorithms.policy.html","size":25253,"blob_sha":"b0d6c7d351748ba3df460e68fcc56583ef314b76","priority":1},{"path":"docs/source/btgym.algorithms.policy.rst","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1},{"path":"docs/_modules/btgym/algorithms/policy/base.html","size":98384,"blob_sha":"0d4d7ec6ba8e01c3c46f6dcd0e1fcc44f58cb195","priority":2},{"path":"docs/_modules/btgym/algorithms/policy/stacked_lstm.html","size":84321,"blob_sha":"6d64dd8071e137f654fb8b4e90460d4f2da74ec8","priority":2}],"documents":[{"path":"README.md","size":19669,"blob_sha":"7f4cf1a6ffbc05e3c338d33b333065b99068f2a5","priority":0,"status":200,"text":"## <a name=\"title\"><\/a>Backtrader gym Environment\n\n**OpenAI Gym environment API for Backtrader backtesting library.**\n\n\n```\n...Minimizing the mean square error on future experience.  - Richard S. Sutton\n```\n\n\n_Backtrader_ is open-source algorithmic trading library:  \nGitHub: http://github.com/mementum/backtrader   \nDocumentation and community:  \nhttp://www.backtrader.com/  \n\n_OpenAI Gym_ is...,\nwell, everyone knows Gym:   \nGitHub: http://github.com/openai/gym   \nDocumentation and community:  \nhttps://gym.openai.com/  \n\n****\n\n### <a name=\"outline\"><\/a>Outline\n\nGeneral purpose of this project is to provide gym-integrated framework for\nrunning reinforcement learning experiments \nin [close to] real world algorithmic trading environments.\n\n```\nDISCLAIMER:\nCode presented here is research/development grade.\nCan be unstable, buggy, poor performing and is subject to change.\n\nNote that this package is neither out-of-the-box-moneymaker, nor it provides ready-to-converge RL solutions.\nThink of it as framework for setting experiments with complex non-stationary stochastic environments.\n\nAs a research project BTGym in its current stage can hardly deliver easy end-user experience in as sense that \nsetting meaninfull  experiments will require some practical programming experience as well as general knowledge \nof reinforcement learning theory.\n```\n****\n\n### [News and update notes](#news)\n\n****\n### <a name=\"contents\"><\/a>Contents\n- [Installation](#install)\n- [Quickstart](#start)\n- [Description](#description)\n    - [Problem setting](#problem)\n    - [Data sampling approaches](#data)\n    - [General notes](#notes)\n- [Reference](#reference) \n- [Current issues and limitations](#issues)\n- [Roadmap](#roadmap)\n- [Update news](#news)\n   \n   \n****\n### <a name=\"install\"><\/a>[Installation](#contents)\nIt is highly recommended to run BTGym in designated virtual environment.\n\nClone or copy btgym repository to local disk, cd to it and run: `pip install -e .` to install package and all dependencies:\n\n    git clone https://github.com/Kismuz/btgym.git\n\n    cd btgym\n\n    pip install -e .\n\nTo update to latest version::\n\n    cd btgym\n\n    git pull\n\n    pip install --upgrade -e .\n\n##### Notes:\n1. BTGym requres **Matplotlib version 2.0.2**, downgrade your installation if you have version 2.1:\n\n    pip install matplotlib==2.0.2\n    \n2. **LSOF utility** should be installed to your OS, which can not be the default case for some Linux distributives, \nsee: https://en.wikipedia.org/wiki/Lsof\n\n****\n### <a name=\"start\"><\/a>[Quickstart](#contents)\nMaking gym environment with all parmeters set to defaults is as simple as:\n\n```python\nfrom btgym import BTgymEnv\n \nMyEnvironment = BTgymEnv(filename='../examples/data/DAT_ASCII_EURUSD_M1_2016.csv',)\n```\nAdding more controls may look like:\n```python\nfrom gym import spaces\nfrom btgym import BTgymEnv\n\nMyEnvironment = BTgymEnv(filename='../examples/data/DAT_ASCII_EURUSD_M1_2016.csv',\n                         episode_duration={'days': 2, 'hours': 23, 'minutes': 55},\n                         drawdown_call=50,\n                         state_shape=dict(raw_state=spaces.Box(low=0,high=1,shape=(30,4))),\n                         port=5555,\n                         verbose=1,\n                         )\n```\n\n##### See more options at [Documentation: Quickstart >>](https://kismuz.github.io/btgym/intro.html#quickstart)\n\n##### and how-to's in [Examples directory >>](./examples).\n****\n### <a name=\"description\"><\/a> [General description](#contents)\n#### <a name=\"problem\"><\/a> Problem setting\nConsider a discrete-time finite-horizon partially observable Markov decision process for equity/currency trading:\n- agent action space is discrete (`buy`, `sell`, `close` [position], `hold` [do nothing]);\n- environment is episodic: maximum  episode duration and episode termination conditions\n  are set;\n- for every timestep of the episode agent is given environment state observation as tensor of last\n  m price open/high/low/close values for every equity considered and based on that information is making\n  trading decisions.\n- agent's goal is to maximize expected cumulative capital;\n- classic 'market liquidity' and 'capital impact' assumptions are met.\n- environment setup is set close to real trading conditions, including commissions, order execution delays,\n  trading calendar etc.\n\n#### <a name=\"data\"><\/a> Data selection options for backtest agent training:\n_Notice: data shaping approach is under development, expect some changes. [7.01.18]_\n- random sampling:\n  historic price change dataset is divided to training, cross-validation and testing subsets.\n  Since agent actions do not influence market, it is possible to randomly sample continuous subset\n  of training data for every episode. [Seems to be] most data-efficient method.\n  Cross-validation and testing performed later as usual on most \"recent\" data;\n- sequential sampling:\n  full dataset is feeded sequentially as if agent is performing real-time trading,\n  episode by episode. Most reality-like, least data-efficient, natural non-stationarity remedy.\n- sliding time-window sampling:\n  mixture of above, episde is sampled randomly from comparatively short time period, sliding from\n  furthest to most recent training data. Should be less prone to overfitting than random sampling.\n\n****\n \n### <a name=\"notes\"><\/a> [Developent notes](#contents)\n_Notice: will be moved inside project wiki [26.01.18]_\n\n 1. There is a choice: where to place most of state observation/reward estimation and prepossessing such as\n    featurization, normalization, frame skipping and all other -zation: either to hide it inside environment or to do it\n    inside RL algorytm?\n    - E.g. while state feature estimators are commonly parts of RL algorithms, reward estimation is often taken\n    directly from environment.\n    In case of portfolio optimisation reward function can be tricky (not to mention state preprocessing),\n    so it is reasonable to make it easyly accessable inside single module for ease of experimenting\n    and hyperparameter tuning.\n     - BTgym allows to do it both ways: either pass \"raw\" state observation and do all heavy work inside RL loop\n      or put it inside get_state() and get_reward() methods.\n    - To mention, it seems reasonable to pass all preprocessing work to server, since it can be done asynchronously\n    with agent own computations and thus somehow speed up training.\n\n 2. [state matrix], returned by Environment by default is 2d [n,m] numpy array of floats,\n    where n - number of Backtrader Datafeed values: v[-n], v[-n+1], v[-n+2],...,v[0],\n    i.e. from n steps back to present step, and every v[i] is itself a vector of m features\n    (open, close,...,volume,..., mov.avg., etc.).\n    - in case of n=1 process is obviously POMDP. Ensure Markov property by 'frame stacking' or/and\n    employing stateful function approximators.\n    - When n>1 process [somehow] approaches MDP (by means of Takens' delay embedding theorem).\n\n 3. Why Gym, not Universe VNC environment?\n    - At a glance, vnc-type environment should fit algorithmic trading extremely well.\n    But to best of my knowledge, OpenAI is yet to publish its \"DIY VNC environment\" kit. Let's wait.\n\n 4. Why Backtrader library, not Zipline/PyAlgotrader etc.?\n    - Those are excellent platforms, but what I really like about Backtrader is clear [to me], flexible  programming logic\n    and ease of customisation. You dont't need to do tricks, say, to disable automatic calendar fetching, etc.\n    I mean, it's nice feature and making it easy-to-run for trading people but prevents from\n    correctly running intraday trading strategies. Since RL-algo-trading is in active research stage, it's impossible to tell\n    in advance which setup and logic could do the job. IMO Backtrader is just well suited for this kinds of experiments.\n    Besides this framework is being actively maintained.\n\n 5. Why Currency data by default?\n    - Obviously environment is data/market agnostic. Backtesting dataset size is what matters.\n    Deep Q-value algorithm, most sample efficient among deep RL, take about 1M steps just to lift off.\n    1 year 1 minute FX data contains about 300K samples. Feeding dataset consisting of several years of data and\n    performing random sampling [arguably]\n    makes it realistic to expect algorithm to converge for intra-day or intra-week trading setting (~1500-5000 steps per episode).\n    Besides, currency trading holds market liquidity and impact assumptions.\n    - That's just preliminary assumption, not proved at all!\n\n 6. Note for backtrader users:\n    - There is a shift on meaning 'Backtrader Strategy' in case of reinforcement learning: BtgymStrategy is mostly used for\n    technical and service tasks, like data preparation and order executions, while all trading decisions are taken\n    by RL agent.\n\n 7. On current implementation: \n    - my commit was to treat backtrader engine as black box and create wrapper using explicitly\n    defined and documented methods only. While it is not efficiency-optimised approach, I think\n    it is still decent alpha-solution.\n    \n 8. *Note:* `.research` subpackage code can (and usually does) contain errors, logic flaws and can be \n    poor performing generally.\n\n****\n   \n    \n### <a name=\"reference\"><\/a> [Documentation and API Reference >>](https://kismuz.github.io/btgym/)\n### [Development Wiki >>](https://github.com/Kismuz/btgym/wiki)\n\n****\n### <a name=\"issues\"><\/a> [Current issues and limitations:](#title)\n- requres Matplotlib version 2.0.2;\n- matplotlib backend warning: appears when importing pyplot and using `%matplotlib inline` magic\n  before btgym import. It's recommended to import btacktrader and btgym first to ensure proper backend\n  choice;\n- not tested with Python < 3.5;\n- doesn't seem to work correctly under Windows; partially done\n- by default, is configured to accept Forex 1 min. data from www.HistData.com;\n- only random data sampling is implemented;\n- ~~no built-in dataset splitting to training/cv/testing subsets;~~ done\n- only one equity/currency pair can be traded;\n- ~~no 'skip-frames' implementation within environment;~~ done\n- ~~no plotting features, except if using pycharm integration observer.~~\n    ~~Not sure if it is suited for intraday strategies.~~ [partially] done\n- ~~making new environment kills all processes using specified network port. Watch out your jupyter kernels.~~ fixed \n\n****\n### <a name=\"roadmap\"><\/a> [TODO's and Road Map:](#title)\n - [x] refine logic for parameters applying priority (engine vs strategy vs kwargs vs defaults);\n - [X] API reference;\n - [x] examples;\n - [x] frame-skipping feature;\n - [x] dataset tr/cv/t approach;\n - [x] state rendering;\n - [x] proper rendering for entire episode;\n - [x] tensorboard integration;\n - [x] multiply agents asynchronous operation feature (e.g for A3C):\n - [x] dedicated data server;\n - [x] multi-modal observation space shape;\n - [x] A3C implementation for BTgym;\n - [x] UNREAL implementation for BTgym;\n - [x] PPO implementation for BTgym;\n - [ ] RL^2 / MAML / DARLA adaptations - INP ROGRESS;\n - [x] learning from demonstrations; -  partially done\n - [ ] risk-sensitive agents implementation;\n - [x] sequential and sliding time-window sampling;\n - [ ] multiply instruments trading;\n - [ ] docker image;\n \n \n### <a name=\"news\"><\/a>[News and updates:](#title)\n- 17.02.18: First results on applying guided policy search ideas (GPS) to btgym setup can be seen \n           [here](./examples/guided_a3c.ipynb).  \n    - tensorboard summaries are updated with additional renderings: \n      actions distribution, value function and LSTM_state; presented in the same notebook.\n\n- 6.02.18: Common update to all a3c agents architectures: \n    - all dense layers are now Noisy-Net ones, \n      see: [Noisy Networks for Exploration](https://arxiv.org/abs/1706.10295) paper by Fortunato at al.; \n    - note that entropy regularization is still here, kept in ~0.01 to ensure proper exploration;\n    - policy output distribution is 'centered' using layer normalisation technique;\n    \n        - all of the above results in about 2x training speedup in terms of train iterations;\n\n- 20.01.18: Project [Wiki pages](https://github.com/Kismuz/btgym/wiki) added;\n\n- 12.01.18: Minor fixes to logging, enabled BTgymDataset train/test data split. AAC framework train/test cycle enabled \n            via \n            [`episode_train_test_cycle`](https://kismuz.github.io/btgym/btgym.algorithms.html#module-btgym.algorithms.aac) \n            kwarg.\n\n- 7.01.18: Update:\n    - Major data pipe redesign. `Domain -> Trial -> Episode` sampling routine implemented. For motivation and \n      formal definitions refer to \n      [Section 1.Data of this DRAFT](https://github.com/Kismuz/btgym/blob/master/docs/papers/btgym_formalism_draft.pdf), \n      API [Documentation](https://kismuz.github.io/btgym/btgym.datafeed.html#btgym-datafeed-package) \n      and [Intro example](./examples/data_domain_api_intro.ipynb). Changes should be backward compatible.\n      In brief, it is necessry framework for upcoming meta-learning algorithms. \n    - logging changes: now relying in python `logbook` module. Should eliminate errors under Windows.\n    - Stacked_LSTM_Policy agent implemented. Based on NAV_A3C from \n      [DeepMind paper](https://arxiv.org/pdf/1611.03673.pdf) with some minor mods. Basic usage \n      [Example is here](./examples/unreal_stacked_lstm_strat_4_11.ipynb). \n      Still in research code area and need further tuning; yet faster than simple LSTM agent, \n      able to converge on 6-month 1m dataset.\n\n- 5.12.17: Inner btgym comm. fixes >> speedup ~5%.\n\n- 02.12.17: Basic `sliding time-window train/test` framework implemented via \n            [BTgymSequentialTrial()](https://kismuz.github.io/btgym/btgym.html#btgym.datafeed.BTgymSequentialTrial)\n            class. UPD: replaced by `BTgymSequentialDataDomain` class.\n            \n- 29.11.17: Basic meta-learning RL^2 functionality implemented.\n    - See [Trial_Iterator Class](https://kismuz.github.io/btgym/btgym.html#btgym.datafeed.BTgymRandomTrial) and\n    [RL^2 policy](https://kismuz.github.io/btgym/btgym.research.html#btgym.research.policy_rl2.AacRL2Policy)\n    for description.\n    - Effectiveness is not tested yet, examples are to follow.\n\n- 24.11.17: A3C/UNREAL finally adapted to work with BTGym environments.\n    - Examples with synthetic simple data(sine wawe) and historic financial data added,\n      see [examples directory](./examples/);\n    - Results on potential-based functions reward shaping in `/research/DevStartegy_4_6`;\n    - Work on Sequential/random Trials Data iterators (kind of sliding time-window) in progress,\n      start approaching the toughest part: non-stationarity battle is ahead.\n\n- 14.11.17: BaseAAC framework refraction; added per worker batch-training option and LSTM time_flatten option; Atari\n            examples updated; see [Documentation](https://kismuz.github.io/btgym/) for details.\n            \n- 30.10.17: Major update, some backward incompatibility:\n    - BTGym now can be thougt as two-part package: one is environment itself and the other one is\n      RL algoritms tuned for solving algo-trading tasks. Some basic work on shaping of later is done. Three advantage\n      actor-critic style algorithms are implemented: A3C itself, it's UNREAL extension and PPO. Core logic of these seems\n      to be implemented correctly but further extensive BTGym-tuning is ahead.\n      For now one can check [atari tests](./examples/atari_tests).\n    - Finally, basic [documentation and API reference](https://kismuz.github.io/btgym/) is now available.\n\n- 27.09.17: A3C [test_4.2](./examples/a3c/a3c_test_4_2_no_feature_signal_conv1d.ipynb) added:\n    - some progress on estimator architecture search, state and reward shaping;\n\n- 22.09.17: A3C [test_4](./examples/a3c/a3c_test_4_sma_bank_features.ipynb) added:\n    - passing train convergence test on small (1 month) dataset of EURUSD 1-minute bar data; \n\n- 20.09.17: A3C optimised sine-wave test added [here.](./examples/a3c/a3c_reject_test_3_sine_conv1d_sma_log_grad.ipynb)\n    - This notebook presents some basic ideas on state presentation, reward shaping,\n      model architecture and hyperparameters choice.\n      With those tweaks sine-wave sanity test is converging faster and with greater stability.\n\n- 31.08.17: Basic implementation of A3C algorithm is done and moved inside BTgym package.\n    - algorithm logic consistency tests are passed;\n    - still work in early stage, experiments with obs. state features and policy estimator architecture ahead;\n    - check out [`examples/a3c`](./examples/a3c) directory.\n\n- 23.08.17: `filename` arg in environment/dataset specification now can be list of csv files.\n    - handy for bigger dataset creation;\n    - data from all files are concatenated and sampled uniformly;\n    - no record duplication and format consistency checks preformed.\n\n- 21.08.17: UPDATE: BTgym is now using multi-modal observation space.\n     - space used is simple extension of gym: `DictSpace(gym.Space)` - dictionary (not nested yet) of core gym spaces.\n     - defined in `btgym/spaces.py`.\n     - `raw_state` is default Box space of OHLC prices. Subclass BTgymStrategy and override `get_state()` method to\n            compute alll parts of env. observation.\n     - rendering can now be performed for avery entry in observation dictionary as long as it is Box ranked <=3\n            and same key is passed in reneder_modes kwarg of environment.\n            'Agent' mode renamed to 'state'. See updated examples.\n \n\n- 07.08.17: BTgym is now optimized for asynchronous operation with multiply environment instances.\n     - dedicated data_server is used for dataset management;\n     - improved overall internal network connection stability and error handling;\n     - see example `async_btgym_workers.ipynb` in [`examples`](./examples) directory.\n\n- 15.07.17: UPDATE, BACKWARD INCOMPATIBILITY: now state observation can be tensor of any rank.\n     - Consequently, dim. ordering convention has changed to ensure compatibility with \n            existing tf models: time embedding is first dimension from now on, e.g. state\n            with shape (30, 20, 4) is 30x steps time embedded with 20 features and 4 'channels'.\n            For the sake of 2d visualisation only one 'cannel' can be rendered, can be\n            chosen by setting env. kwarg `render_agent_channel=0`;\n     - examples are updated;\n     - better now than later.\n\n- 11.07.17: Rendering battle continues: improved stability while low in memory,\n            added environment kwarg `render_enabled=True`; when set to `False`\n             - all renderings are disabled. Can help with performance.\n\n- 5.07.17:  Tensorboard monitoring wrapper added; pyplot memory leak fixed.\n\n- 30.06.17: EXAMPLES updated with 'Setting up: full throttle' how-to. \n\n- 29.06.17: UPGRADE: be sure to run `pip install --upgrade -e .` \n    - major rendering rebuild: updated with modes: `human`, `agent`, `episode`;\n      render process now performed by server and returned to environment as `rgb numpy array`.\n      Pictures can be shown either via matplolib or as pillow.Image(preferred).\n    - 'Rendering HowTo' added, 'Basic Settings' example updated.\n    - internal changes: env. state divided on `raw_state`  - price data,\n      and `state` - featurized representation. `_get_raw_state()` method added to strategy.\n    - new packages requirements: `matplotlib` and `pillow`.\n\n- 25.06.17:\n  Basic rendering implemented. \n\n- 23.06.17:\n  alpha 0.0.4:\n  added skip-frame feature,\n  redefined parameters inheritance logic,\n  refined overall stability;\n  \n- 17.06.17:\n  first working alpha v0.0.2.\n \n \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5132:2B291E:18481D:5EABB9:6AB92C46"},"text_sha256":"f484166d1794d3932c298af7d68522e69f6e1843957f2d558c1396ae4f08d2a6"},{"path":"docs/_modules/btgym/algorithms/policy.html","size":98017,"blob_sha":"a4026dca14c5e32204541331407ebb63457f79b1","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># Asynchronous implementation of Proximal Policy Optimization algorithm.<\/span>\n<span class=\"c1\"># paper:<\/span>\n<span class=\"c1\"># https://arxiv.org/pdf/1707.06347.pdf<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Based on PPO-SGD code from OpenAI `Baselines` repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/baselines<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Async. framework code comes from OpenAI repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/universe-starter-agent<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn_utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.datafeed.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">EnvResetConfig<\/span>\n\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">BaseAacPolicy<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">        https://arxiv.org/abs/1602.01783<\/span>\n<span class=\"sd\">        https://arxiv.org/abs/1611.05397<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns initial context.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            LSTM zero-state tuple.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.act\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.act\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">act<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Predicts action.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    dictionary containing single observation<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Action [one-hot], V-fn value, output RNN state<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"n\">pl<\/span><span class=\"p\">:<\/span> <span class=\"n\">value<\/span> <span class=\"k\">for<\/span> <span class=\"n\">pl<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">zip<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">flatten_nested<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_state<\/span><span class=\"p\">))}<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#print(&#39;feeder keys:&#39;)<\/span>\n        <span class=\"c1\">#for k in feeder.keys():<\/span>\n        <span class=\"c1\">#    print(&#39;key: {}, type: &lt;{}&gt;&#39;.format(k, type(feeder[k])))<\/span>\n        <span class=\"c1\">#print(&#39;ops:&#39;, [self.on_sample, self.on_vf, self.on_lstm_state_out])<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">([<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">],<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_value\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_value\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_value<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates policy V-function.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    single observation value<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            V-function value<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"n\">feed_dict_rnn_context<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_pc_target\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_pc_target\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_pc_target<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates pixel-control task target.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      single observation value<\/span>\n<span class=\"sd\">            last_state: single observation value<\/span>\n<span class=\"sd\">            **kwargs:   not used<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Estimated absolute difference between two subsampled states.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]}<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_sample_config\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_sample_config\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_sample_config<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Dummy implementation.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">                default data sample configuration dictionary `btgym.datafeed.base.EnvResetConfig`<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">EnvResetConfig<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"Aac1dPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.Aac1dPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects bi-modal observation as dict: `external`, `internal`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">aux_estimate<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span><\/div>\n\n<span class=\"k\">class<\/span> <span class=\"nc\">__Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    DEPRECATED: AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># TODO: DEV, move in policy subclass def:<\/span>\n        <span class=\"n\">kwargs<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n            <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"c1\">#on_aac_x = conv_1d_network(self.on_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, **kwargs)<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"c1\">#off_aac_x = conv_1d_network(self.off_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, reuse=True, **kwargs)<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]),<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_target: &#39;<\/span><span class=\"p\">,<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_q: &#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;rp_logits:&#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CC8:3E1C8:17F4E9:5E5705:6AB92C45"},"text_sha256":"ac687b4a4a6a1580af98dd01302b40d6032e517f5aadbb5d92e6b6b6c3c9c7fa"},{"path":"docs/_modules/btgym/research/gps/policy.html","size":11477,"blob_sha":"1ff8928b829004ea5ae215d8a4213299ac29a7f4","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.gps.policy &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../../index.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.gps.policy<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.gps.policy<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy.stacked_lstm<\/span> <span class=\"k\">import<\/span> <span class=\"n\">AacStackedRL2Policy<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">noisy_linear<\/span>\n\n\n<div class=\"viewcode-block\" id=\"GuidedPolicy_0_0\"><a class=\"viewcode-back\" href=\"../../../../btgym.research.gps.html#btgym.research.gps.policy.GuidedPolicy_0_0\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">GuidedPolicy_0_0<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Guided policy: simple configuration wrapper around Stacked LSTM architecture.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_2d_layer_config<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span>\n                 <span class=\"p\">(<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                 <span class=\"p\">(<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                 <span class=\"p\">(<\/span><span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                 <span class=\"p\">(<\/span><span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">))<\/span>\n             <span class=\"p\">),<\/span>\n             <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n             <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n             <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span>\n             <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">noisy_linear<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n    <span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">GuidedPolicy_0_0<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_layer_confi<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_2d_layer_config<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_2_init_period<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">expert_actions<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;expert&#39;<\/span><span class=\"p\">]<\/span><\/div>\n\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:1805DA:5E67C5:6AB92C47"},"text_sha256":"b83619a97c6d8c0ee75d21566c1caa4107efdb673dc14a42e53f92a54eb266b5"},{"path":"docs/_modules/btgym/research/policy_rl2.html","size":13209,"blob_sha":"f026dfa3dcdb0f67d29684a1fab253decbb06cb5","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.policy_rl2 &mdash; BTGym 0.0.6 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.6 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.6\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.policy_rl2<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.policy_rl2<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy<\/span> <span class=\"k\">import<\/span> <span class=\"n\">Aac1dPolicy<\/span>\n\n\n<div class=\"viewcode-block\" id=\"AacRL2Policy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_rl2.AacRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataTrialIterator classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n\n<div class=\"viewcode-block\" id=\"AacRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_rl2.AacRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        Basically, RNN context is reset if:<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">        Else, it assumes this is new episode of same train trial has started and carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            RNN zero-state tuple if new trial is detected or same `context`.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span> <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test, reset context:<\/span>\n                <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span>\n                <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;RL^2 policy context reset&#39;<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context chain:<\/span>\n                <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.6',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6DBC:3B1F3:1858F0:5EBCE7:6AB92C45"},"text_sha256":"c4a7ed353a09182ba83035bdd7ce3e3c82bd37ba9eeefc88638c99e85d0ded33"},{"path":"docs/_modules/btgym/research/policy_stacked_lstm.html","size":82715,"blob_sha":"805e7484b3d15e5fe14fe37d73cee3304a2d6c41","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.policy_stacked_lstm &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.policy_stacked_lstm<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.policy_stacked_lstm<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn_utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms<\/span> <span class=\"k\">import<\/span> <span class=\"n\">BaseAacPolicy<\/span>\n\n\n<div class=\"viewcode-block\" id=\"StackedLstmPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.StackedLstmPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">StackedLstmPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Conv.-Stacked_LSTM policy, based on `NAV A3C agent` architecture from<\/span>\n\n<span class=\"sd\">    `LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS` by Mirowski et all. and<\/span>\n\n<span class=\"sd\">    `LEARNING TO REINFORCEMENT LEARN` by JX Wang et all.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.03673.pdf<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.05763.pdf<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"c1\">#lstm_class=rnn.BasicLSTMCell,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">encode_internal_state<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects multi-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"c1\"># 1D plug-in:<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encode_internal_state<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux min/max_loss:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;raw_state&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;raw_state&#39;<\/span><span class=\"p\">]<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">nn<\/span><span class=\"o\">.<\/span><span class=\"n\">elu<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">linear<\/span><span class=\"p\">(<\/span>\n                    <span class=\"n\">batch_flatten<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">),<\/span>\n                    <span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"s2\">&quot;min_max&quot;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">normalized_columns_initializer<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n\n            <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])]<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal_enc&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Feed as is:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">])<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"c1\"># Not used:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;reward&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_rewards_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;rewards&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;conv_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Feed last last_reward into LSTM_1 layer along with encoded `external` state features:<\/span>\n        <span class=\"n\">on_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ on_x_internal<\/span>\n\n        <span class=\"c1\"># Feed last_action, encoded `external` state,  `internal` state into LSTM_2:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">on_x_internal<\/span>\n\n        <span class=\"c1\"># LSTM_1 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;concat_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># First LSTM layer takes encoded `external` state:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># For time_flat only: Reshape on_lstm_1_state_out from [1,2,20,size] --&gt;[20,1,2,size] --&gt; [20,1, 2xsize]:<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">transpose<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">2<\/span><span class=\"p\">:])],<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#self.debug[&#39;reshape_lstm_1_state_out&#39;] = tf.shape(reshape_lstm_1_state_out)<\/span>\n\n        <span class=\"c1\"># Take policy logits off first LSTM-dense layer:<\/span>\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_on_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac policy output and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Second LSTM layer takes concatenated encoded &#39;external&#39; state, LSTM_1 output,<\/span>\n        <span class=\"c1\"># last_action and `internal_state` (if present) tensors:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Try: feed context instead of output<\/span>\n        <span class=\"c1\">#on_stage2_2_input = [reshape_lstm_1_state_out] + on_stage2_1_input<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_stage2_2_input&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_2_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM placeholders, init. states and context:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span>\n\n\n        <span class=\"c1\">#if False: # Temp. disable<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n                <span class=\"p\">]<\/span>\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"n\">off_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ off_x_internal<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">off_x_internal<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_off_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM states:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Aux1:<\/span>\n        <span class=\"c1\"># `Pixel control` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2:<\/span>\n        <span class=\"c1\"># `Value function replay` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3:<\/span>\n        <span class=\"c1\"># `Reward prediction` network.<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">AttributeError<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.AacStackedRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacStackedRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">StackedLstmPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Attempt to implement two-level RL^2<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataDomain classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received or `lstm_2_init_period&#39; parameter.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_2_init_period<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span>\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.AacStackedRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        RNN_1 (lower) context is reset at every call.<\/span>\n\n<span class=\"sd\">        RNN_2 (upper) context is reset:<\/span>\n<span class=\"sd\">            - every `lstm_2_init_period&#39; episodes;<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">            - ... else carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            2_RNN zero-state tuple.<\/span>\n\n<span class=\"sd\">        Raises:<\/span>\n<span class=\"sd\">            KeyError if [`metadata`]:[`trial_num`,`type`] keys not found<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">))<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">%<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test sample, reset_1, 2 context:<\/span>\n                <span class=\"k\">pass<\/span> <span class=\"c1\">#print(&#39;RL^2 policy context 1, 2 reset&#39;)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context_2 same as received:<\/span>\n                <span class=\"n\">new_context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n                <span class=\"c1\">#print(&#39;RL^2 policy context 1, reset&#39;)<\/span>\n            <span class=\"c1\"># Back to tuple:<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">tuple<\/span><span class=\"p\">(<\/span><span class=\"n\">new_context<\/span><span class=\"p\">)<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"259C:1A3D83:187299:5ED671:6AB92C47"},"text_sha256":"bfd04f643461fa86e37d60c6432bdb766c050f1092a315d03c77a490236fff71"},{"path":"docs/_sources/btgym.algorithms.policy.rst.txt","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1,"status":200,"text":"\n\nbtgym\\.algorithms\\.policy\\.base module\n--------------------------------------\n\n.. automodule:: btgym.algorithms.policy.base\n    :members:\n\n\n\nbtgym\\.algorithms\\.policy\\.stacked_lstm module\n----------------------------------------------\n\n.. automodule:: btgym.algorithms.policy.stacked_lstm\n    :members:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A10:3EACB:17B6E8:5E1A20:6AB92C46"},"text_sha256":"81aae78f71b4d91a5db7209e93354369cddf355beb53c1e7254cb30449d7692d"},{"path":"docs/btgym.algorithms.policy.html","size":25253,"blob_sha":"b0d6c7d351748ba3df460e68fcc56583ef314b76","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.base module &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms package\" href=\"btgym.algorithms.html\"/>\n        <link rel=\"next\" title=\"btgym.algorithms.runner.base module\" href=\"btgym.algorithms.runner.html\"/>\n        <link rel=\"prev\" title=\"btgym.algorithms.nn.losses module\" href=\"btgym.algorithms.nn.html\"/> \n\n  \n  <script src=\"_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul class=\"current\">\n<li class=\"toctree-l1 current\"><a class=\"reference internal\" href=\"btgym.algorithms.html\">btgym.algorithms package<\/a><ul class=\"current\">\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-nn-subpackage\">btgym.algorithms.nn subpackage<\/a><\/li>\n<li class=\"toctree-l2 current\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-policy-subpackage\">btgym.algorithms.policy subpackage<\/a><ul class=\"current\">\n<li class=\"toctree-l3 current\"><a class=\"current reference internal\" href=\"#\">btgym.algorithms.policy.base module<\/a><\/li>\n<li class=\"toctree-l3\"><a class=\"reference internal\" href=\"#module-btgym.algorithms.policy.stacked_lstm\">btgym.algorithms.policy.stacked_lstm module<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-runner-subpackage\">btgym.algorithms.runner subpackage<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.launcher\">btgym.algorithms.launcher module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.worker\">btgym.algorithms.worker module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.aac\">btgym.algorithms.aac module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.rollout\">btgym.algorithms.rollout module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.memory\">btgym.algorithms.memory module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.envs\">btgym.algorithms.envs module<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"btgym.algorithms.html\">btgym.algorithms package<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.base module<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n            <a href=\"_sources/btgym.algorithms.policy.rst.txt\" rel=\"nofollow\"> View page source<\/a>\n          \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <div class=\"section\" id=\"module-btgym.algorithms.policy.base\">\n<span id=\"btgym-algorithms-policy-base-module\"><\/span><h1>btgym.algorithms.policy.base module<a class=\"headerlink\" href=\"#module-btgym.algorithms.policy.base\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.base.<\/code><code class=\"descname\">BaseAacPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>lstm_class=&lt;class 'tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>)<\/em>, <em>aux_estimate=True<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks.<\/p>\n<p>Papers:<\/p>\n<blockquote>\n<div><a class=\"reference external\" href=\"https://arxiv.org/abs/1602.01783\">https://arxiv.org/abs/1602.01783<\/a>\n<a class=\"reference external\" href=\"https://arxiv.org/abs/1611.05397\">https://arxiv.org/abs/1611.05397<\/a><\/div><\/blockquote>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects uni-modal observation as array of shape <cite>ob_space<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – dictionary of observation state shapes<\/li>\n<li><strong>ac_space<\/strong> – discrete action space shape (length)<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class<\/strong> – tf.nn.lstm class<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>aux_estimate<\/strong> – (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\">\n<code class=\"descname\">get_initial_features<\/code><span class=\"sig-paren\">(<\/span><em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_initial_features\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Returns initial context.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\">LSTM zero-state tuple.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.act\">\n<code class=\"descname\">act<\/code><span class=\"sig-paren\">(<\/span><em>observation<\/em>, <em>lstm_state<\/em>, <em>action_reward<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.act\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.act\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Predicts action.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>observation<\/strong> – dictionary containing single observation<\/li>\n<li><strong>lstm_state<\/strong> – lstm context value<\/li>\n<li><strong>action_reward<\/strong> – concatenated last action-reward value<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">Action [one-hot], actions logits, V-fn value, output RNN state<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_value\">\n<code class=\"descname\">get_value<\/code><span class=\"sig-paren\">(<\/span><em>observation<\/em>, <em>lstm_state<\/em>, <em>action_reward<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_value\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_value\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Estimates policy V-function.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>observation<\/strong> – single observation value<\/li>\n<li><strong>lstm_state<\/strong> – lstm context value<\/li>\n<li><strong>action_reward<\/strong> – concatenated last action-reward value<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">V-function value<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\">\n<code class=\"descname\">get_pc_target<\/code><span class=\"sig-paren\">(<\/span><em>state<\/em>, <em>last_state<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_pc_target\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Estimates pixel-control task target.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>state<\/strong> – single observation value<\/li>\n<li><strong>last_state<\/strong> – single observation value<\/li>\n<li><strong>**kwargs<\/strong> – not used<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">Estimated absolute difference between two subsampled states.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\">\n<code class=\"descname\">get_sample_config<\/code><span class=\"sig-paren\">(<\/span><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_sample_config\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Dummy implementation.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\">default data sample configuration dictionary <cite>btgym.datafeed.base.EnvResetConfig<\/cite><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.base.Aac1dPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.base.<\/code><code class=\"descname\">Aac1dPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>lstm_class=&lt;class 'tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>)<\/em>, <em>aux_estimate=True<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#Aac1dPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.Aac1dPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>AAC policy for one-dimensional signal obs. state.<\/p>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects bi-modal observation as dict: <cite>external<\/cite>, <cite>internal<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – dictionary of observation state shapes<\/li>\n<li><strong>ac_space<\/strong> – discrete action space shape (length)<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class<\/strong> – tf.nn.lstm class<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>aux_estimate<\/strong> – (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-btgym.algorithms.policy.stacked_lstm\">\n<span id=\"btgym-algorithms-policy-stacked-lstm-module\"><\/span><h1>btgym.algorithms.policy.stacked_lstm module<a class=\"headerlink\" href=\"#module-btgym.algorithms.policy.stacked_lstm\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.stacked_lstm.<\/code><code class=\"descname\">StackedLstmPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>lstm_class_ref=&lt;class 'tensorflow.contrib.rnn.python.ops.rnn_cell.LayerNormBasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>256)<\/em>, <em>linear_layer_ref=&lt;function linear&gt;<\/em>, <em>aux_estimate=False<\/em>, <em>encode_internal_state=False<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#StackedLstmPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Conv.-Stacked_LSTM policy, based on <cite>NAV A3C agent<\/cite> architecture from<\/p>\n<p><cite>LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS<\/cite> by Mirowski et all. and<\/p>\n<p><cite>LEARNING TO REINFORCEMENT LEARN<\/cite> by JX Wang et all.<\/p>\n<p>Papers:<\/p>\n<p><a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.03673.pdf\">https://arxiv.org/pdf/1611.03673.pdf<\/a><\/p>\n<p><a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.05763.pdf\">https://arxiv.org/pdf/1611.05763.pdf<\/a><\/p>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects multi-modal observation as array of shape <cite>ob_space<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – dictionary of observation state shapes<\/li>\n<li><strong>ac_space<\/strong> – discrete action space shape (length)<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class_ref<\/strong> – tf.nn.lstm class to use<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>linear_layer_ref<\/strong> – linear layer class to use<\/li>\n<li><strong>aux_estimate<\/strong> – (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.stacked_lstm.<\/code><code class=\"descname\">AacStackedRL2Policy<\/code><span class=\"sig-paren\">(<\/span><em>lstm_2_init_period=50<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#AacStackedRL2Policy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Attempt to implement two-level RL^2\nThis policy class in conjunction with DataDomain classes from btgym.datafeed\nis aimed to implement RL^2 algorithm by Duan et al.<\/p>\n<p>Paper:\n<cite>FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING<\/cite>,\n<a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.02779.pdf\">https://arxiv.org/pdf/1611.02779.pdf<\/a><\/p>\n<p>The only difference from Base policy is <cite>get_initial_features()<\/cite> method, which has been changed\neither to reset RNN context to zero-state or return context from the end of previous episode,\ndepending on episode metadata received or <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`<\/span><\/a>lstm_2_init_period’ parameter.<\/p>\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\">\n<code class=\"descname\">get_initial_features<\/code><span class=\"sig-paren\">(<\/span><em>state<\/em>, <em>context=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#AacStackedRL2Policy.get_initial_features\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Returns RNN initial context.\nRNN_1 (lower) context is reset at every call.<\/p>\n<dl class=\"docutils\">\n<dt>RNN_2 (upper) context is reset:<\/dt>\n<dd><ul class=\"first last simple\">\n<li>every <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`<\/span><\/a>lstm_2_init_period’ episodes;<\/li>\n<li>episode  initial <cite>state<\/cite> <cite>trial_num<\/cite> metadata has been changed form last call (new train trial started);<\/li>\n<li>episode metatdata <cite>type<\/cite> is non-zero (test episode);<\/li>\n<li>no context arg is provided (initial episode of training);<\/li>\n<li>… else carries context on to new episode;<\/li>\n<\/ul>\n<\/dd>\n<\/dl>\n<p>Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,\nand delivered through env.strategy as separate key in observation dictionary.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>state<\/strong> – initial episode state (result of env.reset())<\/li>\n<li><strong>context<\/strong> – last previous episode RNN state (last_context of runner)<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first\">2_RNN zero-state tuple.<\/p>\n<\/td>\n<\/tr>\n<tr class=\"field-odd field\"><th class=\"field-name\">Raises:<\/th><td class=\"field-body\"><p class=\"first last\"><em>KeyError if [`metadata`]<\/em> – [<cite>trial_num<\/cite>,`type`] keys not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n    <div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"footer navigation\">\n      \n        <a href=\"btgym.algorithms.runner.html\" class=\"btn btn-neutral float-right\" title=\"btgym.algorithms.runner.base module\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\"><\/span><\/a>\n      \n      \n        <a href=\"btgym.algorithms.nn.html\" class=\"btn btn-neutral\" title=\"btgym.algorithms.nn.losses module\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\"><\/span> Previous<\/a>\n      \n    <\/div>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'./',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2FDA:326565:17B9AB:5E1D7E:6AB92C48"},"text_sha256":"97bb5ba10fd0f655f207c7c6bda4df86e82a5acbb16d671963145df3ed6bdb50"},{"path":"docs/source/btgym.algorithms.policy.rst","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1,"status":200,"text":"\n\nbtgym\\.algorithms\\.policy\\.base module\n--------------------------------------\n\n.. automodule:: btgym.algorithms.policy.base\n    :members:\n\n\n\nbtgym\\.algorithms\\.policy\\.stacked_lstm module\n----------------------------------------------\n\n.. automodule:: btgym.algorithms.policy.stacked_lstm\n    :members:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A10:3EACB:17B6E8:5E1A20:6AB92C46"},"text_sha256":"81aae78f71b4d91a5db7209e93354369cddf355beb53c1e7254cb30449d7692d"},{"path":"docs/_modules/btgym/algorithms/policy/base.html","size":98384,"blob_sha":"0d4d7ec6ba8e01c3c46f6dcd0e1fcc44f58cb195","priority":2,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.base &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms.policy\" href=\"../policy.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../policy.html\">btgym.algorithms.policy<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.base<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy.base<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># Asynchronous implementation of Proximal Policy Optimization algorithm.<\/span>\n<span class=\"c1\"># paper:<\/span>\n<span class=\"c1\"># https://arxiv.org/pdf/1707.06347.pdf<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Based on PPO-SGD code from OpenAI `Baselines` repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/baselines<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Async. framework code comes from OpenAI repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/universe-starter-agent<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.networks<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.datafeed.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">EnvResetConfig<\/span>\n\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">BaseAacPolicy<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">        https://arxiv.org/abs/1602.01783<\/span>\n<span class=\"sd\">        https://arxiv.org/abs/1611.05397<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns initial context.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            LSTM zero-state tuple.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"c1\"># TODO: rework as in: AacStackedMetaPolicy --&gt; base runner, verbose runner; synchro_runner ok<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.act\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.act\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">act<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Predicts action.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    dictionary containing single observation<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Action [one-hot], actions logits, V-fn value, output RNN state<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"n\">pl<\/span><span class=\"p\">:<\/span> <span class=\"n\">value<\/span> <span class=\"k\">for<\/span> <span class=\"n\">pl<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">zip<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">flatten_nested<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_state<\/span><span class=\"p\">))}<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#print(&#39;feeder keys:&#39;)<\/span>\n        <span class=\"c1\">#for k in feeder.keys():<\/span>\n        <span class=\"c1\">#    print(&#39;key: {}, type: &lt;{}&gt;&#39;.format(k, type(feeder[k])))<\/span>\n        <span class=\"c1\">#print(&#39;ops:&#39;, [self.on_sample, self.on_vf, self.on_lstm_state_out])<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">([<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">],<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_value\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_value\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_value<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates policy V-function.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    single observation value<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            V-function value<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"n\">feed_dict_rnn_context<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_pc_target\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_pc_target<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates pixel-control task target.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      single observation value<\/span>\n<span class=\"sd\">            last_state: single observation value<\/span>\n<span class=\"sd\">            **kwargs:   not used<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Estimated absolute difference between two subsampled states.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]}<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_sample_config\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_sample_config<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Dummy implementation.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">                default data sample configuration dictionary `btgym.datafeed.base.EnvResetConfig`<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">EnvResetConfig<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"Aac1dPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.Aac1dPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects bi-modal observation as dict: `external`, `internal`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">aux_estimate<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span><\/div>\n\n<span class=\"k\">class<\/span> <span class=\"nc\">__Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    DEPRECATED: AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># TODO: DEV, move in policy subclass def:<\/span>\n        <span class=\"n\">kwargs<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n            <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"c1\">#on_aac_x = conv_1d_network(self.on_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, **kwargs)<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"c1\">#off_aac_x = conv_1d_network(self.off_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, reuse=True, **kwargs)<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]),<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_target: &#39;<\/span><span class=\"p\">,<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_q: &#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;rp_logits:&#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DA6:2C474:180CD7:5E700A:6AB92C47"},"text_sha256":"ad58d9c01ac9cfb82550cb0308057115aaa4af3fb2cc0630fdddcefd97bb9f90"},{"path":"docs/_modules/btgym/algorithms/policy/stacked_lstm.html","size":84321,"blob_sha":"6d64dd8071e137f654fb8b4e90460d4f2da74ec8","priority":2,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.stacked_lstm &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms.policy\" href=\"../policy.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../policy.html\">btgym.algorithms.policy<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.stacked_lstm<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy.stacked_lstm<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">BaseAacPolicy<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.networks<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n\n\n<div class=\"viewcode-block\" id=\"StackedLstmPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">StackedLstmPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Conv.-Stacked_LSTM policy, based on `NAV A3C agent` architecture from<\/span>\n\n<span class=\"sd\">    `LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS` by Mirowski et all. and<\/span>\n\n<span class=\"sd\">    `LEARNING TO REINFORCEMENT LEARN` by JX Wang et all.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.03673.pdf<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.05763.pdf<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"c1\">#lstm_class_ref=rnn.BasicLSTMCell,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n                 <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">encode_internal_state<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects multi-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class_ref:     tf.nn.lstm class to use<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            linear_layer_ref:   linear layer class to use<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"c1\"># 1D plug-in:<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"mi\">64<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class_ref<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encode_internal_state<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux min/max_loss:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;raw_state&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;raw_state&#39;<\/span><span class=\"p\">]<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">nn<\/span><span class=\"o\">.<\/span><span class=\"n\">elu<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">linear<\/span><span class=\"p\">(<\/span>\n                    <span class=\"n\">batch_flatten<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">),<\/span>\n                    <span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"s2\">&quot;min_max&quot;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">normalized_columns_initializer<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n\n            <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])]<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal_enc&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Feed as is:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">])<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"c1\"># Not used:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;reward&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_rewards_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;rewards&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;conv_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Feed last last_reward into LSTM_1 layer along with encoded `external` state features:<\/span>\n        <span class=\"n\">on_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ on_x_internal<\/span>\n\n        <span class=\"c1\"># Feed last_action, encoded `external` state,  `internal` state into LSTM_2:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">on_x_internal<\/span>\n\n        <span class=\"c1\"># LSTM_1 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;concat_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># First LSTM layer takes encoded `external` state:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># For time_flat only: Reshape on_lstm_1_state_out from [1,2,20,size] --&gt;[20,1,2,size] --&gt; [20,1, 2xsize]:<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">transpose<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">2<\/span><span class=\"p\">:])],<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#self.debug[&#39;reshape_lstm_1_state_out&#39;] = tf.shape(reshape_lstm_1_state_out)<\/span>\n\n        <span class=\"c1\"># Take policy logits off first LSTM-dense layer:<\/span>\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_on_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac policy output and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Second LSTM layer takes concatenated encoded &#39;external&#39; state, LSTM_1 output,<\/span>\n        <span class=\"c1\"># last_action and `internal_state` (if present) tensors:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Try: feed context instead of output<\/span>\n        <span class=\"c1\">#on_stage2_2_input = [reshape_lstm_1_state_out] + on_stage2_1_input<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_stage2_2_input&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_2_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM placeholders, init. states and context:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span>\n\n\n        <span class=\"c1\">#if False: # Temp. disable<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n                <span class=\"p\">]<\/span>\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"n\">off_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ off_x_internal<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">off_x_internal<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_off_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_off_x_lstm_1_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM states:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Aux1:<\/span>\n        <span class=\"c1\"># `Pixel control` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2:<\/span>\n        <span class=\"c1\"># `Value function replay` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3:<\/span>\n        <span class=\"c1\"># `Reward prediction` network.<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">AttributeError<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacStackedRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">StackedLstmPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Attempt to implement two-level RL^2<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataDomain classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received or `lstm_2_init_period&#39; parameter.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_2_init_period<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span>\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        RNN_1 (lower) context is reset at every call.<\/span>\n\n<span class=\"sd\">        RNN_2 (upper) context is reset:<\/span>\n<span class=\"sd\">            - every `lstm_2_init_period&#39; episodes;<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">            - ... else carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            2_RNN zero-state tuple.<\/span>\n\n<span class=\"sd\">        Raises:<\/span>\n<span class=\"sd\">            KeyError if [`metadata`]:[`trial_num`,`type`] keys not found<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">))<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">%<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test sample, reset_1, 2 context:<\/span>\n                <span class=\"k\">pass<\/span> <span class=\"c1\">#print(&#39;RL^2 policy context 1, 2 reset&#39;)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context_2 same as received:<\/span>\n                <span class=\"n\">new_context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n                <span class=\"c1\">#print(&#39;RL^2 policy context 1, reset&#39;)<\/span>\n            <span class=\"c1\"># Back to tuple:<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">tuple<\/span><span class=\"p\">(<\/span><span class=\"n\">new_context<\/span><span class=\"p\">)<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2A64:372D9:17D9E4:5E3DEE:6AB92C45"},"text_sha256":"9caeb1ce6d20a6f7152cb717429b3efa779bf614a0d05ea8e3afb09102838605"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1935","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17C4CE1:1BEB369:6AB92C49"},"commit":{"sha":"7fb3316e67f1d7a17c620630fb62fb29428b2cec","url":"https://github.com/Kismuz/btgym/commit/7fb3316e67f1d7a17c620630fb62fb29428b2cec","date":"2021-08-28T22:13:14Z","author_date":"2021-08-28T22:13:14Z","committer_date":"2021-08-28T22:13:14Z","tree_sha":"07405cc2388c85195b4eb9b5c4f419d4d82d5198","message_first_line":"Merge pull request #148 from venaissance/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1934","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A3:6C6ED:17FD37C:1C231BE:6AB92C49"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23397,"blob_sha":"fe1e0f1cd31b21f38ddcd8c23a5c452663ce47f1","priority":0},{"path":"docs/_modules/btgym/algorithms/policy.html","size":98144,"blob_sha":"a210f831826273f387f76411f92125d4e0560f6f","priority":1},{"path":"docs/_modules/btgym/research/casual_conv/policy.html","size":10128,"blob_sha":"0707ecd2d31fa0f8f9a78a9c716f56b80d756e2a","priority":1},{"path":"docs/_modules/btgym/research/gps/policy.html","size":11591,"blob_sha":"609219d443017835d3298d8ab1c6db10109cc0b9","priority":1},{"path":"docs/_modules/btgym/research/policy_rl2.html","size":13209,"blob_sha":"f026dfa3dcdb0f67d29684a1fab253decbb06cb5","priority":1},{"path":"docs/_modules/btgym/research/policy_stacked_lstm.html","size":82842,"blob_sha":"21d79727389b18c28f2bd3ba2119fc75e374c657","priority":1},{"path":"docs/_sources/btgym.algorithms.policy.rst.txt","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1},{"path":"docs/btgym.algorithms.policy.html","size":26756,"blob_sha":"b64dda79ff59f21769f4d093650dc96499a56584","priority":1},{"path":"docs/source/btgym.algorithms.policy.rst","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1},{"path":"docs/_modules/btgym/algorithms/policy/base.html","size":74098,"blob_sha":"7ff622271892cc0b72bc24bc933c16eda7dff7d8","priority":2},{"path":"docs/_modules/btgym/algorithms/policy/stacked_lstm.html","size":115834,"blob_sha":"cd59610670ac82633ce694a7174ea175e8d179f5","priority":2}],"documents":[{"path":"README.md","size":23397,"blob_sha":"fe1e0f1cd31b21f38ddcd8c23a5c452663ce47f1","priority":0,"status":200,"text":"```\n...Minimizing the mean square error on future experience.  - Richard S. Sutton\n```\n\n## <a name=\"title\"><\/a>BTGym\nScalable event-driven RL-friendly backtesting library. Build on top of Backtrader with OpenAI Gym environment API.\n\n\n_Backtrader_ is open-source algorithmic trading library:  \nGitHub: http://github.com/mementum/backtrader   \nDocumentation and community:  \nhttp://www.backtrader.com/  \n\n_OpenAI Gym_ is...,\nwell, everyone knows Gym:   \nGitHub: http://github.com/openai/gym   \nDocumentation and community:  \nhttps://gym.openai.com/  \n\n****\n\n### <a name=\"outline\"><\/a>Outline\n\nGeneral purpose of this project is to provide gym-integrated framework for\nrunning reinforcement learning experiments\nin [close to] real world algorithmic trading environments.\n\n```\nDISCLAIMER:\nCode presented here is research/development grade.\nCan be unstable, buggy, poor performing and is subject to change.\n\nNote that this package is neither out-of-the-box-moneymaker, nor it provides ready-to-converge RL solutions.\nThink of it as framework for setting experiments with complex non-stationary stochastic environments.\n\nAs a research project BTGym in its current stage can hardly deliver easy end-user experience in as sense that\nsetting meaninfull  experiments will require some practical programming experience as well as general knowledge\nof reinforcement learning theory.\n```\n****\n\n### [News and update notes](#news)\n\n****\n### <a name=\"contents\"><\/a>Contents\n- [Installation](#install)\n- [Quickstart](#start)\n- [Description](#description)\n    - [Problem setting](#problem)\n    - [Data sampling approaches](#data)\n- [Documentation and community](#reference)\n- [Known bugs and limitations](#issues)\n- [Roadmap](#roadmap)\n- [Update news](#news)\n\n\n****\n### <a name=\"install\"><\/a>[Installation](#contents)\nIt is highly recommended to run BTGym in designated virtual environment.\n\nClone or copy btgym repository to local disk, cd to it and run: `pip install -e .` to install package and all dependencies:\n\n    git clone https://github.com/Kismuz/btgym.git\n\n    cd btgym\n\n    pip install -e .\n\nTo update to latest version::\n\n    cd btgym\n\n    git pull\n\n    pip install --upgrade -e .\n\n##### Notes:\n1. BTGym requres **Matplotlib version 2.0.2**, downgrade your installation if you have version 2.1:\n\n    pip install matplotlib==2.0.2\n\n2. **LSOF utility** should be installed to your OS, which can not be the default case for some Linux distributives,\nsee: https://en.wikipedia.org/wiki/Lsof\n\n****\n### <a name=\"start\"><\/a>[Quickstart](#contents)\nMaking gym environment with all parmeters set to defaults is as simple as:\n\n```python\nfrom btgym import BTgymEnv\n\nMyEnvironment = BTgymEnv(filename='../examples/data/DAT_ASCII_EURUSD_M1_2016.csv',)\n```\nAdding more controls may look like:\n```python\nfrom gym import spaces\nfrom btgym import BTgymEnv\n\nMyEnvironment = BTgymEnv(filename='../examples/data/DAT_ASCII_EURUSD_M1_2016.csv',\n                         episode_duration={'days': 2, 'hours': 23, 'minutes': 55},\n                         drawdown_call=50,\n                         state_shape=dict(raw=spaces.Box(low=0,high=1,shape=(30,4))),\n                         port=5555,\n                         verbose=1,\n                         )\n```\n\n##### See more options at [Documentation: Quickstart >>](https://kismuz.github.io/btgym/intro.html#quickstart)\n\n##### and how-to's in [Examples directory >>](./examples).\n****\n### <a name=\"description\"><\/a> [General description](#contents)\n#### <a name=\"problem\"><\/a> Problem setting\n\n- **Discrete actions setup:** consider setup with one riskless asset acting as broker account cash and K (by default - one) risky assets.\nFor every risky asset there exists track of historic price records referred as `data-line`.\nApart from assets data lines there [optionally] exists number of exogenous data lines holding some\ninformation and statistics, e.g. economic indexes, encoded news, macroeconomic indicators, weather forecasts\netc. which are considered relevant to decision-making.\nIt is supposed for this setup that:\n    1. there is no interest rates for any asset;\n    2. broker actions are fixed-size market orders (`buy`, `sell`, `close`); short selling is permitted;\n    3. transaction costs are modelled via broker commission;\n    4. 'market liquidity' and 'capital impact' assumptions are met;\n    6. time indexes match for all data lines provided;\n- The problem is modelled as discrete-time finite-horizon partially observable Markov decision process for equity/currency trading:\n    - *for every asset* traded agent action space is discrete `(0: `hold` [do nothing], 1:`buy`, 2: `sell`, 3:`close` [position])`;\n    - environment is episodic: maximum  episode duration and episode termination conditions\n      are set;\n    - for every timestep of the episode agent is given environment state observation as tensor of last\n      `m` time-embedded preprocessed values for every data-line included and emits actions according some stochastic policy.\n    - agent's goal is to maximize expected cumulative capital by learning optimal policy;\n\n- **Continuous actions setup[BETA]:** this setup closely relates to continuous portfolio optimisation problem definition;\nit differs from setup above in:\n    1. base broker actions are real numbers: `a[i] in [0,1], 0<=i<=K, SUM{a[i]} = 1`  for `K` risky assets added;\n       each action is a market target order to adjust portfolio to get share `a[i]*100%` for `i`-th  asset;\n    2. entire single-step broker action is dictionary of form:\n       `{cash_name: a[0], asset_name_1: a[1], ..., asset_name_K: a[K]}`;\n    3. short selling is not permitted;\n- For RL it implies having continuous action space as `K+1` dim vector.\n\n\n#### <a name=\"data\"><\/a> Data selection options for backtest agent training:\n_Notice: data shaping approach is under development, expect some changes. [7.01.18]_\n- random sampling:\n  historic price change dataset is divided to training, cross-validation and testing subsets.\n  Since agent actions do not influence market, it is possible to randomly sample continuous subset\n  of training data for every episode. [Seems to be] most data-efficient method.\n  Cross-validation and testing performed later as usual on most \"recent\" data;\n- sequential sampling:\n  full dataset is feeded sequentially as if agent is performing real-time trading,\n  episode by episode. Most reality-like, least data-efficient, natural non-stationarity remedy.\n- sliding time-window sampling:\n  mixture of above, episde is sampled randomly from comparatively short time period, sliding from\n  furthest to most recent training data. Should be less prone to overfitting than random sampling.\n\n****\n### <a name=\"reference\"><\/a>[Documentation and Community](#title)\n\n- Read **[Docs and API Reference](https://kismuz.github.io/btgym/)**.\n- Browse **[Development Wiki](https://github.com/Kismuz/btgym/wiki)**.\n- Review opened and closed **[Issues](https://github.com/Kismuz/btgym/issues?utf8=%E2%9C%93&q=)**.\n- Go to **[BTGym Slack channel](https://btgym.slack.com)**. If you are new -\n[use this invite link](https://join.slack.com/t/btgym/shared_invite/zt-750fx9ky-hT0o6diVw1f4Oa1FGZLf4A)\n to join.\n\n\n****\n### <a name=\"issues\"><\/a> [Known bugs and limitations:](#title)\n- requres Matplotlib version 2.0.2;\n- matplotlib backend warning: appears when importing pyplot and using `%matplotlib inline` magic\n  before btgym import. It's recommended to import btacktrader and btgym first to ensure proper backend\n  choice;\n- not tested with Python < 3.5;\n- doesn't seem to work correctly under Windows; partially done\n- by default, is configured to accept Forex 1 min. data from www.HistData.com;\n- ~~only random data sampling is implemented;~~\n- ~~no built-in dataset splitting to training/cv/testing subsets;~~ done\n- ~~only one equity/currency pair can be traded~~ done\n- ~~no 'skip-frames' implementation within environment;~~ done\n- ~~no plotting features, except if using pycharm integration observer.~~\n    ~~Not sure if it is suited for intraday strategies.~~ [partially] done\n- ~~making new environment kills all processes using specified network port. Watch out your jupyter kernels.~~ fixed\n\n****\n### <a name=\"roadmap\"><\/a> [TODO's and Road Map:](#title)\n - [x] refine logic for parameters applying priority (engine vs strategy vs kwargs vs defaults);\n - [X] API reference;\n - [x] examples;\n - [x] frame-skipping feature;\n - [x] dataset tr/cv/t approach;\n - [x] state rendering;\n - [x] proper rendering for entire episode;\n - [x] tensorboard integration;\n - [x] multiply agents asynchronous operation feature (e.g for A3C):\n - [x] dedicated data server;\n - [x] multi-modal observation space shape;\n - [x] A3C implementation for BTgym;\n - [x] UNREAL implementation for BTgym;\n - [x] PPO implementation for BTgym;\n - [ ] RL^2 / MAML / DARLA adaptations - IN PROGRESS;\n - [x] learning from demonstrations; -  partially done\n - [ ] risk-sensitive agents implementation;\n - [x] sequential and sliding time-window sampling;\n - [x] multiply instruments trading;\n - [x] docker image; - CPU version, `Signalprime` contribution, \n - [ ] TF serving model serialisation functionality;\n\n\n### <a name=\"news\"><\/a>[News and updates:](#title)\n- 10.01.2019:\n    - **docker CPU version** is now available, contributed by `Signalprime`, \n    (https://github.com/signalprime), see `btgym/docker/README.md` for details;\n\n- 9.02.2019:\n    - **Introduction to analytic data model** notebook added to [model_based_stat_arb](./examples/model_based_stat_arb/) examples folder.\n\n- 25.01.2019: updates:\n    - **lstm_policy** class now requires both `internal` and `external` observation sub-spaces to be present and allows both be one-level nested\n        sub-spaces itself (was only true for `external`); all declared sub-spaces got encoded by separate convolution encoders;\n    - **policy deterministic action** option is implemented for discrete action spaces and can be utilised by `syncro_runner`;\n        by default it is enabled for test episodes;\n    - **data_feed** classes now accept `pd.dataframes` as historic data dource via `dataframe` kwarg (was: `.csv` files only);\n\n- 18.01.2019: updates:\n    - **data model** classes are under active development to power model-based framework:\n        - common statistics incremental estimator classes has been added (mean, variance, covariance, linear regression etc.);\n        - incremental Singular Spectrum Analysis class implemented;\n        - for a pair of asset prices, two-factor state-space model is proposed\n    - new **data_feed** iterator classes has been added to provide training framework with synthetic data generated by model mentioned above;\n    - **strategy_gen_6** data handling and pre-processing has been redesigned:\n        - market data SSA decomposition;\n        - data model state as additional input to policy\n        - variance-based normalisation for broker statistics\n\n- 11.12.2018: updates and fixes:\n    - **training Launcher class** got convenience features to save and reload model parameters,\n        see https://github.com/Kismuz/btgym/blob/master/examples/unreal_stacked_lstm_strat_4_11.ipynb for details\n    - **combined model-based/model-free** aproach package in early development stage is added to `btgym.reserach`\n\n- 17.11.2018: updates and fixes:\n    - **minor fixes to base data provider** class episode sampling\n    - **update to btgym.datafeed.synthetic** subpackage: new stochastic processes generators added etc.\n    - **new btgym.research.startegy_gen_5 subpackage:**\n        efficient parameter-free signal preprocessing implemented, other minor improvements\n\n- 30.10.2018: updates and fixes:\n    - **fixed numpy random state issue** causing replicating of seeds among workers on POSIX os\n    - **new synthetic datafeed generators** - added simple Ornshtein-Uhlenbeck process data generating classes;\n        see `btgym/datafeed/synthetic/ou.py` and `btgym/research/ou_params_space_eval` for details;\n\n- 14.10.2018: update:\n    - **base reward function redesign** -> noticeable algorithms performance gain;\n\n- 20.07.2018: major update to package:\n    - **enchancements to agent architecture**:\n        - casual convolution state encoder with attention for LSTM agent;\n        - dropout regularization added for conv. and LSTM layers;\n    - **base strategy update**: new convention for naming `get_state` methods,  see `BaseStrategy` class for details;\n\n    - **multiply datafeeds and assets trading** implemented in two flavors:\n        - **discrete actions** space via MultiDiscreteEnv class;\n        - **continious actions** space via PortfolioEnv which is closely related to\n          contionious portfolio optimisation problem setup;\n            - description and docs:\n                - **MultiDataFeed:** https://kismuz.github.io/btgym/btgym.datafeed.html#btgym.datafeed.multi.BTgymMultiData\n                - **ActionSpace:** https://kismuz.github.io/btgym/btgym.html#btgym.spaces.ActionDictSpace\n                - **MultiDiscreteEnv:** https://kismuz.github.io/btgym/btgym.envs.html#btgym.envs.multidiscrete.MultiDiscreteEnv\n                - **PortfolioEnv:** https://kismuz.github.io/btgym/btgym.envs.html#btgym.envs.portfolio.PortfolioEnv\n\n            - examples:\n                - **MultiDiscreteEnv:** https://github.com/Kismuz/btgym/blob/master/examples/multi_discrete_setup_intro.ipynb\n                - **PortfolioEnv:** https://github.com/Kismuz/btgym/blob/master/examples/portfolio_setup_BETA.ipynb\n        - **Notes on multi-asset setup**:\n            - adding these features forced substantial package redesign;\n              expect bugs, some backward incompatibility, broken examples etc - please report;\n            - current algorithms and agents architectures are ok with multiply data lines but seem not to cope well with multi-asset setup.\n              It is especially evident in case of continuous actions, where agents completely fail to converge on train data;\n            - current reward function design seems inappropriate; need to reshape;\n            - continuous space in `beta` and still needs some improvement, esp. for broker order execution logic as well as\n              action sampling routine for continuous A3C (which is Dirichlet process by now);\n            - multi-discrete space is more consistent but severely limited in number of portfolio assets (but not data-lines)\n              due to exponential rise of action space cardinality;\n              the option is to as use many datalines as desired while limiting portfolio to 1 - 4 assets;\n            - no Guided Policy available for multi-asset setup yet - in progress;\n            - all but `episode` rendering modes are temporally disabled;\n            - whole thing is shamelessly resource-hungry;\n\n- 17.02.18: First results on applying guided policy search ideas (GPS) to btgym setup can be seen\n           [here](./examples/guided_a3c.ipynb).  \n    - tensorboard summaries are updated with additional renderings:\n      actions distribution, value function and LSTM_state; presented in the same notebook.\n\n- 6.02.18: Common update to all a3c agents architectures:\n    - all dense layers are now Noisy-Net ones,\n      see: [Noisy Networks for Exploration](https://arxiv.org/abs/1706.10295) paper by Fortunato at al.;\n    - note that entropy regularization is still here, kept in ~0.01 to ensure proper exploration;\n    - policy output distribution is 'centered' using layer normalisation technique;\n\n        - all of the above results in about 2x training speedup in terms of train iterations;\n\n- 20.01.18: Project [Wiki pages](https://github.com/Kismuz/btgym/wiki) added;\n\n- 12.01.18: Minor fixes to logging, enabled BTgymDataset train/test data split. AAC framework train/test cycle enabled\n            via\n            [`episode_train_test_cycle`](https://kismuz.github.io/btgym/btgym.algorithms.html#module-btgym.algorithms.aac)\n            kwarg.\n\n- 7.01.18: Update:\n    - Major data pipe redesign. `Domain -> Trial -> Episode` sampling routine implemented. For motivation and\n      formal definitions refer to\n      [Section 1.Data of this DRAFT](https://github.com/Kismuz/btgym/blob/master/docs/papers/btgym_formalism_draft.pdf),\n      API [Documentation](https://kismuz.github.io/btgym/btgym.datafeed.html#btgym-datafeed-package)\n      and [Intro example](./examples/data_domain_api_intro.ipynb). Changes should be backward compatible.\n      In brief, it is necessry framework for upcoming meta-learning algorithms.\n    - logging changes: now relying in python `logbook` module. Should eliminate errors under Windows.\n    - Stacked_LSTM_Policy agent implemented. Based on NAV_A3C from\n      [DeepMind paper](https://arxiv.org/pdf/1611.03673.pdf) with some minor mods. Basic usage\n      [Example is here](./examples/unreal_stacked_lstm_strat_4_11.ipynb).\n      Still in research code area and need further tuning; yet faster than simple LSTM agent,\n      able to converge on 6-month 1m dataset.\n\n- 5.12.17: Inner btgym comm. fixes >> speedup ~5%.\n\n- 02.12.17: Basic `sliding time-window train/test` framework implemented via\n            [BTgymSequentialTrial()](https://kismuz.github.io/btgym/btgym.html#btgym.datafeed.BTgymSequentialTrial)\n            class. UPD: replaced by `BTgymSequentialDataDomain` class.\n\n- 29.11.17: Basic meta-learning RL^2 functionality implemented.\n    - See [Trial_Iterator Class](https://kismuz.github.io/btgym/btgym.html#btgym.datafeed.BTgymRandomTrial) and\n    [RL^2 policy](https://kismuz.github.io/btgym/btgym.research.html#btgym.research.policy_rl2.AacRL2Policy)\n    for description.\n    - Effectiveness is not tested yet, examples are to follow.\n\n- 24.11.17: A3C/UNREAL finally adapted to work with BTGym environments.\n    - Examples with synthetic simple data(sine wawe) and historic financial data added,\n      see [examples directory](./examples/);\n    - Results on potential-based functions reward shaping in `/research/DevStartegy_4_6`;\n    - Work on Sequential/random Trials Data iterators (kind of sliding time-window) in progress,\n      start approaching the toughest part: non-stationarity battle is ahead.\n\n- 14.11.17: BaseAAC framework refraction; added per worker batch-training option and LSTM time_flatten option; Atari\n            examples updated; see [Documentation](https://kismuz.github.io/btgym/) for details.\n\n- 30.10.17: Major update, some backward incompatibility:\n    - BTGym now can be thougt as two-part package: one is environment itself and the other one is\n      RL algoritms tuned for solving algo-trading tasks. Some basic work on shaping of later is done. Three advantage\n      actor-critic style algorithms are implemented: A3C itself, it's UNREAL extension and PPO. Core logic of these seems\n      to be implemented correctly but further extensive BTGym-tuning is ahead.\n      For now one can check [atari tests](./examples/atari_tests).\n    - Finally, basic [documentation and API reference](https://kismuz.github.io/btgym/) is now available.\n\n- 27.09.17: A3C [test_4.2](./examples/a3c/a3c_test_4_2_no_feature_signal_conv1d.ipynb) added:\n    - some progress on estimator architecture search, state and reward shaping;\n\n- 22.09.17: A3C [test_4](./examples/a3c/a3c_test_4_sma_bank_features.ipynb) added:\n    - passing train convergence test on small (1 month) dataset of EURUSD 1-minute bar data;\n\n- 20.09.17: A3C optimised sine-wave test added [here.](./examples/a3c/a3c_reject_test_3_sine_conv1d_sma_log_grad.ipynb)\n    - This notebook presents some basic ideas on state presentation, reward shaping,\n      model architecture and hyperparameters choice.\n      With those tweaks sine-wave sanity test is converging faster and with greater stability.\n\n- 31.08.17: Basic implementation of A3C algorithm is done and moved inside BTgym package.\n    - algorithm logic consistency tests are passed;\n    - still work in early stage, experiments with obs. state features and policy estimator architecture ahead;\n    - check out [`examples/a3c`](./examples/a3c) directory.\n\n- 23.08.17: `filename` arg in environment/dataset specification now can be list of csv files.\n    - handy for bigger dataset creation;\n    - data from all files are concatenated and sampled uniformly;\n    - no record duplication and format consistency checks preformed.\n\n- 21.08.17: UPDATE: BTgym is now using multi-modal observation space.\n     - space used is simple extension of gym: `DictSpace(gym.Space)` - dictionary (not nested yet) of core gym spaces.\n     - defined in `btgym/spaces.py`.\n     - `raw_state` is default Box space of OHLC prices. Subclass BTgymStrategy and override `get_state()` method to\n            compute alll parts of env. observation.\n     - rendering can now be performed for avery entry in observation dictionary as long as it is Box ranked <=3\n            and same key is passed in reneder_modes kwarg of environment.\n            'Agent' mode renamed to 'state'. See updated examples.\n\n\n- 07.08.17: BTgym is now optimized for asynchronous operation with multiply environment instances.\n     - dedicated data_server is used for dataset management;\n     - improved overall internal network connection stability and error handling;\n     - see example `async_btgym_workers.ipynb` in [`examples`](./examples) directory.\n\n- 15.07.17: UPDATE, BACKWARD INCOMPATIBILITY: now state observation can be tensor of any rank.\n     - Consequently, dim. ordering convention has changed to ensure compatibility with\n            existing tf models: time embedding is first dimension from now on, e.g. state\n            with shape (30, 20, 4) is 30x steps time embedded with 20 features and 4 'channels'.\n            For the sake of 2d visualisation only one 'cannel' can be rendered, can be\n            chosen by setting env. kwarg `render_agent_channel=0`;\n     - examples are updated;\n     - better now than later.\n\n- 11.07.17: Rendering battle continues: improved stability while low in memory,\n            added environment kwarg `render_enabled=True`; when set to `False`\n             - all renderings are disabled. Can help with performance.\n\n- 5.07.17:  Tensorboard monitoring wrapper added; pyplot memory leak fixed.\n\n- 30.06.17: EXAMPLES updated with 'Setting up: full throttle' how-to.\n\n- 29.06.17: UPGRADE: be sure to run `pip install --upgrade -e .`\n    - major rendering rebuild: updated with modes: `human`, `agent`, `episode`;\n      render process now performed by server and returned to environment as `rgb numpy array`.\n      Pictures can be shown either via matplolib or as pillow.Image(preferred).\n    - 'Rendering HowTo' added, 'Basic Settings' example updated.\n    - internal changes: env. state divided on `raw_state`  - price data,\n      and `state` - featurized representation. `get_raw_state()` method added to strategy.\n    - new packages requirements: `matplotlib` and `pillow`.\n\n- 25.06.17:\n  Basic rendering implemented.\n\n- 23.06.17:\n  alpha 0.0.4:\n  added skip-frame feature,\n  redefined parameters inheritance logic,\n  refined overall stability;\n\n- 17.06.17:\n  first working alpha v0.0.2.\n\n\n<a href=\"https://stackexchange.com/users/10204071/andrew-muzikin\"><img src=\"https://stackexchange.com/users/flair/10204071.png\" width=\"208\" height=\"58\" alt=\"profile for Andrew Muzikin on Stack Exchange, a network of free, community-driven Q&amp;A sites\" title=\"profile for Andrew Muzikin on Stack Exchange, a network of free, community-driven Q&amp;A sites\" /><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2648:3BB77:17B293:5E1755:6AB92BF4"},"text_sha256":"5083996a214d54924b62abd3def40556226b7c354ca7c388b200616fa179176c"},{"path":"docs/_modules/btgym/algorithms/policy.html","size":98144,"blob_sha":"a210f831826273f387f76411f92125d4e0560f6f","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># Asynchronous implementation of Proximal Policy Optimization algorithm.<\/span>\n<span class=\"c1\"># paper:<\/span>\n<span class=\"c1\"># https://arxiv.org/pdf/1707.06347.pdf<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Based on PPO-SGD code from OpenAI `Baselines` repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/baselines<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Async. framework code comes from OpenAI repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/universe-starter-agent<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn_utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.datafeed.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">EnvResetConfig<\/span>\n\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">BaseAacPolicy<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">        https://arxiv.org/abs/1602.01783<\/span>\n<span class=\"sd\">        https://arxiv.org/abs/1611.05397<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns initial context.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            LSTM zero-state tuple.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.act\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.act\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">act<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Predicts action.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    dictionary containing single observation<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Action [one-hot], V-fn value, output RNN state<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"n\">pl<\/span><span class=\"p\">:<\/span> <span class=\"n\">value<\/span> <span class=\"k\">for<\/span> <span class=\"n\">pl<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">zip<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">flatten_nested<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_state<\/span><span class=\"p\">))}<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#print(&#39;feeder keys:&#39;)<\/span>\n        <span class=\"c1\">#for k in feeder.keys():<\/span>\n        <span class=\"c1\">#    print(&#39;key: {}, type: &lt;{}&gt;&#39;.format(k, type(feeder[k])))<\/span>\n        <span class=\"c1\">#print(&#39;ops:&#39;, [self.on_sample, self.on_vf, self.on_lstm_state_out])<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">([<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">],<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_value\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_value\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_value<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">action_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates policy V-function.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    single observation value<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            action_reward:  concatenated last action-reward value<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            V-function value<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"n\">feed_dict_rnn_context<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"n\">action_reward<\/span><span class=\"p\">],<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_pc_target\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_pc_target\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_pc_target<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates pixel-control task target.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      single observation value<\/span>\n<span class=\"sd\">            last_state: single observation value<\/span>\n<span class=\"sd\">            **kwargs:   not used<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Estimated absolute difference between two subsampled states.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]}<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_sample_config\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.BaseAacPolicy.get_sample_config\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_sample_config<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Dummy implementation.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">                default data sample configuration dictionary `btgym.datafeed.base.EnvResetConfig`<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">EnvResetConfig<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"Aac1dPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.algorithms.html#btgym.algorithms.policy.Aac1dPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects bi-modal observation as dict: `external`, `internal`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">aux_estimate<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span><\/div>\n\n<span class=\"k\">class<\/span> <span class=\"nc\">__Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    DEPRECATED: AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects uni-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># TODO: DEV, move in policy subclass def:<\/span>\n        <span class=\"n\">kwargs<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n            <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"c1\">#on_aac_x = conv_1d_network(self.on_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, **kwargs)<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Feed last action_reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;POLICY: got here 2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"c1\">#off_aac_x = conv_1d_network(self.off_state_in[&#39;external&#39;], ob_space[&#39;external&#39;], ac_space, reuse=True, **kwargs)<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]),<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_target: &#39;<\/span><span class=\"p\">,<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;pc_q: &#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;rp_logits:&#39;<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1582:1F1FB6:17DC5D:5E3F37:6AB92C48"},"text_sha256":"5274e7bcaedc2406cbaa44a244e1ec19980982bfc158561d06d5b780229e16a7"},{"path":"docs/_modules/btgym/research/casual_conv/policy.html","size":10128,"blob_sha":"0707ecd2d31fa0f8f9a78a9c716f56b80d756e2a","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.casual_conv.policy &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../../index.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.casual_conv.policy<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.casual_conv.policy<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.research.gps.policy<\/span> <span class=\"k\">import<\/span> <span class=\"n\">GuidedPolicy_0_0<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.research.casual_conv.networks<\/span> <span class=\"k\">import<\/span> <span class=\"n\">conv_1d_casual_encoder<\/span>\n\n\n<div class=\"viewcode-block\" id=\"CasualConvPolicy_0_0\"><a class=\"viewcode-back\" href=\"../../../../btgym.research.casual_conv.html#btgym.research.casual_conv.policy.CasualConvPolicy_0_0\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">CasualConvPolicy_0_0<\/span><span class=\"p\">(<\/span><span class=\"n\">GuidedPolicy_0_0<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Casual.0.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span>\n        <span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">state_encoder_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_casual_encoder<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">conv_1d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">conv_1d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">conv_1d_slice_size<\/span><span class=\"o\">=<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span>  <span class=\"c1\"># future use, do not modify yet<\/span>\n        <span class=\"n\">conv_1d_activation<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">nn<\/span><span class=\"o\">.<\/span><span class=\"n\">elu<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">conv_1d_use_bias<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n        <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n    <span class=\"p\">):<\/span>\n        <span class=\"k\">assert<\/span> <span class=\"n\">conv_1d_slice_size<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">1<\/span>\n\n        <span class=\"nb\">super<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">state_encoder_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_1d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_num_filters<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_1d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_filter_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_1d_slice_size<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_slice_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_1d_activation<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_activation<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">conv_1d_use_bias<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_1d_use_bias<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96EC:324E19:18122F:5E75B7:6AB92C4A"},"text_sha256":"7382565dabe0350b9db422635b76d449ef8b0c11dcca24594ae534cfb14a9bd5"},{"path":"docs/_modules/btgym/research/gps/policy.html","size":11591,"blob_sha":"609219d443017835d3298d8ab1c6db10109cc0b9","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.gps.policy &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../../index.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.gps.policy<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.gps.policy<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy.stacked_lstm<\/span> <span class=\"k\">import<\/span> <span class=\"n\">AacStackedRL2Policy<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">noisy_linear<\/span>\n\n\n<div class=\"viewcode-block\" id=\"GuidedPolicy_0_0\"><a class=\"viewcode-back\" href=\"../../../../btgym.research.gps.html#btgym.research.gps.policy.GuidedPolicy_0_0\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">GuidedPolicy_0_0<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Guided policy: simple configuration wrapper around Stacked LSTM architecture.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span>\n        <span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n        <span class=\"n\">conv_2d_layer_config<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span>\n                <span class=\"p\">(<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                <span class=\"p\">(<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                <span class=\"p\">(<\/span><span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)),<\/span>\n                <span class=\"p\">(<\/span><span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">))<\/span>\n            <span class=\"p\">),<\/span>\n            <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">noisy_linear<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n    <span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">GuidedPolicy_0_0<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_layer_config<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_2d_layer_config<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_2_init_period<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">expert_actions<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;expert&#39;<\/span><span class=\"p\">]<\/span><\/div>\n\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"22F0:3BCC6:17DA1D:5E3D7C:6AB92C4A"},"text_sha256":"bb344a4196c572577e672c6c7be8ab5011002ad23ac7200b3e7369f3b243263f"},{"path":"docs/_modules/btgym/research/policy_rl2.html","size":13209,"blob_sha":"f026dfa3dcdb0f67d29684a1fab253decbb06cb5","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.policy_rl2 &mdash; BTGym 0.0.6 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.6 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.6\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.policy_rl2<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.policy_rl2<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy<\/span> <span class=\"k\">import<\/span> <span class=\"n\">Aac1dPolicy<\/span>\n\n\n<div class=\"viewcode-block\" id=\"AacRL2Policy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_rl2.AacRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataTrialIterator classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n\n<div class=\"viewcode-block\" id=\"AacRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_rl2.AacRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        Basically, RNN context is reset if:<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">        Else, it assumes this is new episode of same train trial has started and carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            RNN zero-state tuple if new trial is detected or same `context`.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span> <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test, reset context:<\/span>\n                <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span>\n                <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s1\">&#39;RL^2 policy context reset&#39;<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context chain:<\/span>\n                <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.6',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6DBC:3B1F3:1858F0:5EBCE7:6AB92C45"},"text_sha256":"c4a7ed353a09182ba83035bdd7ce3e3c82bd37ba9eeefc88638c99e85d0ded33"},{"path":"docs/_modules/btgym/research/policy_stacked_lstm.html","size":82842,"blob_sha":"21d79727389b18c28f2bd3ba2119fc75e374c657","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.research.policy_stacked_lstm &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../index.html\"/>\n        <link rel=\"up\" title=\"Module code\" href=\"../../index.html\"/> \n\n  \n  <script src=\"../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n      <li>btgym.research.policy_stacked_lstm<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.research.policy_stacked_lstm<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn_utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">import<\/span> <span class=\"nn\">tensorflow<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">tf<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms<\/span> <span class=\"k\">import<\/span> <span class=\"n\">BaseAacPolicy<\/span>\n\n\n<div class=\"viewcode-block\" id=\"StackedLstmPolicy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.StackedLstmPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">StackedLstmPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Conv.-Stacked_LSTM policy, based on `NAV A3C agent` architecture from<\/span>\n\n<span class=\"sd\">    `LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS` by Mirowski et all. and<\/span>\n\n<span class=\"sd\">    `LEARNING TO REINFORCEMENT LEARN` by JX Wang et all.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.03673.pdf<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.05763.pdf<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"c1\">#lstm_class=rnn.BasicLSTMCell,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">encode_internal_state<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects multi-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"c1\"># 1D plug-in:<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encode_internal_state<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for concatenated action [one-hot] and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_action_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux min/max_loss:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;raw_state&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;raw_state&#39;<\/span><span class=\"p\">]<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">nn<\/span><span class=\"o\">.<\/span><span class=\"n\">elu<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">linear<\/span><span class=\"p\">(<\/span>\n                    <span class=\"n\">batch_flatten<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">),<\/span>\n                    <span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"s2\">&quot;min_max&quot;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">normalized_columns_initializer<\/span><span class=\"p\">(<\/span><span class=\"mf\">0.01<\/span><span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">raw_state<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_min_max<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">None<\/span>\n\n            <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])]<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal_enc&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Feed as is:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;state_internal&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">])<\/span>\n                <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"c1\"># Not used:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;reward&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_rewards_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reward&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;rewards&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_rewards<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">x_rewards<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;conv_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Feed last last_reward into LSTM_1 layer along with encoded `external` state features:<\/span>\n        <span class=\"n\">on_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ on_x_internal<\/span>\n\n        <span class=\"c1\"># Feed last_action, encoded `external` state,  `internal` state into LSTM_2:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">on_x_internal<\/span>\n\n        <span class=\"c1\"># LSTM_1 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;concat_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># First LSTM layer takes encoded `external` state:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># For time_flat only: Reshape on_lstm_1_state_out from [1,2,20,size] --&gt;[20,1,2,size] --&gt; [20,1, 2xsize]:<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">transpose<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">2<\/span><span class=\"p\">:])],<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\">#self.debug[&#39;reshape_lstm_1_state_out&#39;] = tf.shape(reshape_lstm_1_state_out)<\/span>\n\n        <span class=\"c1\"># Take policy logits off first LSTM-dense layer:<\/span>\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_on_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac policy output and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Second LSTM layer takes concatenated encoded &#39;external&#39; state, LSTM_1 output,<\/span>\n        <span class=\"c1\"># last_action and `internal_state` (if present) tensors:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Try: feed context instead of output<\/span>\n        <span class=\"c1\">#on_stage2_2_input = [reshape_lstm_1_state_out] + on_stage2_1_input<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_stage2_2_input&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_2_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM placeholders, init. states and context:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span>\n\n\n        <span class=\"c1\">#if False: # Temp. disable<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span> <span class=\"o\">+<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># Prepare `internal` state, if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">encode_internal_state<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use convolution encoder:<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_internal&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"c1\"># conv_2d_layer_ref=conv2d_dw,<\/span>\n                    <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_num_layers<\/span><span class=\"o\">=<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                    <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n                    <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n                <span class=\"p\">]<\/span>\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                    <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n                <span class=\"p\">)<\/span>\n                <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"n\">off_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">[<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">][<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span> <span class=\"kc\">None<\/span><span class=\"p\">]]<\/span> <span class=\"c1\">#+ off_x_internal<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_a_r_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">off_x_internal<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_off_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rsh_off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac value function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM states:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Aux1:<\/span>\n        <span class=\"c1\"># `Pixel control` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2:<\/span>\n        <span class=\"c1\"># `Value function replay` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3:<\/span>\n        <span class=\"c1\"># `Reward prediction` network.<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;conv1d_external&#39;<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related (useless, ignore):<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">AttributeError<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span><\/div>\n\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.AacStackedRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacStackedRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">StackedLstmPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Attempt to implement two-level RL^2<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataDomain classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received or `lstm_2_init_period&#39; parameter.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_2_init_period<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span>\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../btgym.research.html#btgym.research.policy_stacked_lstm.AacStackedRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        RNN_1 (lower) context is reset at every call.<\/span>\n\n<span class=\"sd\">        RNN_2 (upper) context is reset:<\/span>\n<span class=\"sd\">            - every `lstm_2_init_period&#39; episodes;<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">            - ... else carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            2_RNN zero-state tuple.<\/span>\n\n<span class=\"sd\">        Raises:<\/span>\n<span class=\"sd\">            KeyError if [`metadata`]:[`trial_num`,`type`] keys not found<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">))<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">%<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test sample, reset_1, 2 context:<\/span>\n                <span class=\"k\">pass<\/span> <span class=\"c1\">#print(&#39;RL^2 policy context 1, 2 reset&#39;)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context_2 same as received:<\/span>\n                <span class=\"n\">new_context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n                <span class=\"c1\">#print(&#39;RL^2 policy context 1, reset&#39;)<\/span>\n            <span class=\"c1\"># Back to tuple:<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">tuple<\/span><span class=\"p\">(<\/span><span class=\"n\">new_context<\/span><span class=\"p\">)<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2FDC:3D501:185B55:5EBF0A:6AB92C4A"},"text_sha256":"4142978039e71bb55de670a70b6fd1f3d062d19957f2d9492688f50138aa3ec5"},{"path":"docs/_sources/btgym.algorithms.policy.rst.txt","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1,"status":200,"text":"\n\nbtgym\\.algorithms\\.policy\\.base module\n--------------------------------------\n\n.. automodule:: btgym.algorithms.policy.base\n    :members:\n\n\n\nbtgym\\.algorithms\\.policy\\.stacked_lstm module\n----------------------------------------------\n\n.. automodule:: btgym.algorithms.policy.stacked_lstm\n    :members:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A10:3EACB:17B6E8:5E1A20:6AB92C46"},"text_sha256":"81aae78f71b4d91a5db7209e93354369cddf355beb53c1e7254cb30449d7692d"},{"path":"docs/btgym.algorithms.policy.html","size":26756,"blob_sha":"b64dda79ff59f21769f4d093650dc96499a56584","priority":1,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.base module &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms package\" href=\"btgym.algorithms.html\"/>\n        <link rel=\"next\" title=\"btgym.algorithms.runner.base module\" href=\"btgym.algorithms.runner.html\"/>\n        <link rel=\"prev\" title=\"btgym.algorithms.nn.losses module\" href=\"btgym.algorithms.nn.html\"/> \n\n  \n  <script src=\"_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul class=\"current\">\n<li class=\"toctree-l1 current\"><a class=\"reference internal\" href=\"btgym.algorithms.html\">btgym.algorithms package<\/a><ul class=\"current\">\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-nn-subpackage\">btgym.algorithms.nn subpackage<\/a><\/li>\n<li class=\"toctree-l2 current\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-policy-subpackage\">btgym.algorithms.policy subpackage<\/a><ul class=\"current\">\n<li class=\"toctree-l3 current\"><a class=\"current reference internal\" href=\"#\">btgym.algorithms.policy.base module<\/a><\/li>\n<li class=\"toctree-l3\"><a class=\"reference internal\" href=\"#module-btgym.algorithms.policy.stacked_lstm\">btgym.algorithms.policy.stacked_lstm module<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#btgym-algorithms-runner-subpackage\">btgym.algorithms.runner subpackage<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.launcher\">btgym.algorithms.launcher module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.worker\">btgym.algorithms.worker module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.aac\">btgym.algorithms.aac module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.rollout\">btgym.algorithms.rollout module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.memory\">btgym.algorithms.memory module<\/a><\/li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"btgym.algorithms.html#module-btgym.algorithms.envs\">btgym.algorithms.envs module<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"btgym.algorithms.html\">btgym.algorithms package<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.base module<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n            <a href=\"_sources/btgym.algorithms.policy.rst.txt\" rel=\"nofollow\"> View page source<\/a>\n          \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <div class=\"section\" id=\"module-btgym.algorithms.policy.base\">\n<span id=\"btgym-algorithms-policy-base-module\"><\/span><h1>btgym.algorithms.policy.base module<a class=\"headerlink\" href=\"#module-btgym.algorithms.policy.base\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.base.<\/code><code class=\"descname\">BaseAacPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>lstm_class=&lt;class 'tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>)<\/em>, <em>action_dp_alpha=200.0<\/em>, <em>aux_estimate=False<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks for\ndiscrete or nested discrete action spaces.<\/p>\n<p>Papers:<\/p>\n<blockquote>\n<div><a class=\"reference external\" href=\"https://arxiv.org/abs/1602.01783\">https://arxiv.org/abs/1602.01783<\/a>\n<a class=\"reference external\" href=\"https://arxiv.org/abs/1611.05397\">https://arxiv.org/abs/1611.05397<\/a><\/div><\/blockquote>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects multi-modal observation as array of shape <cite>ob_space<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – instance of btgym.spaces.DictSpace<\/li>\n<li><strong>ac_space<\/strong> – instance of btgym.spaces.ActionDictSpace<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class<\/strong> – tf.nn.lstm class<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>aux_estimate<\/strong> – bool, if True - add auxiliary tasks estimations to self.callbacks dictionary<\/li>\n<li><strong>time_flat<\/strong> – bool, if True - use static rnn, dynamic otherwise<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\">\n<code class=\"descname\">get_initial_features<\/code><span class=\"sig-paren\">(<\/span><em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_initial_features\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Returns initial context.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\">LSTM zero-state tuple.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.act\">\n<code class=\"descname\">act<\/code><span class=\"sig-paren\">(<\/span><em>observation<\/em>, <em>lstm_state<\/em>, <em>last_action<\/em>, <em>last_reward<\/em>, <em>deterministic=False<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.act\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.act\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Emits action.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>observation<\/strong> – dictionary containing single observation<\/li>\n<li><strong>lstm_state<\/strong> – lstm context value<\/li>\n<li><strong>last_action<\/strong> – action value from previous step<\/li>\n<li><strong>last_reward<\/strong> – reward value previous step<\/li>\n<li><strong>deterministic<\/strong> – bool, it True - act deterministically,\nuse random sampling otherwise (default);\neffective for discrete action sapce only (TODO: continious)<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">Action as dictionary of several action encodings, actions logits, V-fn value, output RNN state<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_value\">\n<code class=\"descname\">get_value<\/code><span class=\"sig-paren\">(<\/span><em>observation<\/em>, <em>lstm_state<\/em>, <em>last_action<\/em>, <em>last_reward<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_value\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_value\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Estimates policy V-function.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>observation<\/strong> – single observation value<\/li>\n<li><strong>lstm_state<\/strong> – lstm context value<\/li>\n<li><strong>last_action<\/strong> – action value from previous step<\/li>\n<li><strong>last_reward<\/strong> – reward value from previous step<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">V-function value<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\">\n<code class=\"descname\">get_pc_target<\/code><span class=\"sig-paren\">(<\/span><em>state<\/em>, <em>last_state<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_pc_target\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Estimates pixel-control task target.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>state<\/strong> – single observation value<\/li>\n<li><strong>last_state<\/strong> – single observation value<\/li>\n<li><strong>**kwargs<\/strong> – not used<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first last\">Estimated absolute difference between two subsampled states.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"staticmethod\">\n<dt id=\"btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\">\n<em class=\"property\">static <\/em><code class=\"descname\">get_sample_config<\/code><span class=\"sig-paren\">(<\/span><em>*args<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#BaseAacPolicy.get_sample_config\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Dummy implementation.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\">default data sample configuration dictionary <cite>btgym.datafeed.base.EnvResetConfig<\/cite><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.base.Aac1dPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.base.<\/code><code class=\"descname\">Aac1dPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>lstm_class=&lt;class 'tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>)<\/em>, <em>action_dp_alpha=200.0<\/em>, <em>aux_estimate=True<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/base.html#Aac1dPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.base.Aac1dPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>AAC policy for one-dimensional signal obs. state.<\/p>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects bi-modal observation as dict: <cite>external<\/cite>, <cite>internal<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – dictionary of observation state shapes<\/li>\n<li><strong>ac_space<\/strong> – discrete action space shape (length)<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class<\/strong> – tf.nn.lstm class<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>aux_estimate<\/strong> – (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/div>\n<div class=\"section\" id=\"module-btgym.algorithms.policy.stacked_lstm\">\n<span id=\"btgym-algorithms-policy-stacked-lstm-module\"><\/span><h1>btgym.algorithms.policy.stacked_lstm module<a class=\"headerlink\" href=\"#module-btgym.algorithms.policy.stacked_lstm\" title=\"Permalink to this headline\">¶<\/a><\/h1>\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.stacked_lstm.<\/code><code class=\"descname\">StackedLstmPolicy<\/code><span class=\"sig-paren\">(<\/span><em>ob_space<\/em>, <em>ac_space<\/em>, <em>rp_sequence_size<\/em>, <em>state_encoder_class_ref=&lt;function conv_2d_network&gt;<\/em>, <em>lstm_class_ref=&lt;class 'tensorflow.contrib.rnn.python.ops.rnn_cell.LayerNormBasicLSTMCell'&gt;<\/em>, <em>lstm_layers=(256<\/em>, <em>256)<\/em>, <em>linear_layer_ref=&lt;function noisy_linear&gt;<\/em>, <em>share_encoder_params=False<\/em>, <em>dropout_keep_prob=1.0<\/em>, <em>action_dp_alpha=200.0<\/em>, <em>aux_estimate=False<\/em>, <em>encode_internal_state=False<\/em>, <em>static_rnn=True<\/em>, <em>shared_p_v=False<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#StackedLstmPolicy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Conv.-Stacked_LSTM policy, based on <cite>NAV A3C agent<\/cite> architecture from<\/p>\n<p><cite>LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS<\/cite> by Mirowski et all. and<\/p>\n<p><cite>LEARNING TO REINFORCEMENT LEARN<\/cite> by JX Wang et all.<\/p>\n<p>Papers:<\/p>\n<p><a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.03673.pdf\">https://arxiv.org/pdf/1611.03673.pdf<\/a><\/p>\n<p><a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.05763.pdf\">https://arxiv.org/pdf/1611.05763.pdf<\/a><\/p>\n<p>Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,\nreward and state ‘pixel_change’ predictions.\nExpects multi-modal observation as array of shape <cite>ob_space<\/cite>.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first last simple\">\n<li><strong>ob_space<\/strong> – instance of btgym.spaces.DictSpace<\/li>\n<li><strong>ac_space<\/strong> – instance of btgym.spaces.ActionDictSpace<\/li>\n<li><strong>rp_sequence_size<\/strong> – reward prediction sample length<\/li>\n<li><strong>lstm_class_ref<\/strong> – tf.nn.lstm class to use<\/li>\n<li><strong>lstm_layers<\/strong> – tuple of LSTM layers sizes<\/li>\n<li><strong>linear_layer_ref<\/strong> – linear layer class to use<\/li>\n<li><strong>share_encoder_params<\/strong> – bool, whether to share encoder parameters for every ‘external’ data stream<\/li>\n<li><strong>dropout_keep_prob<\/strong> – in (0, 1] dropout regularisation parameter<\/li>\n<li><strong>action_dp_alpha<\/strong> – <\/li>\n<li><strong>aux_estimate<\/strong> – (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary<\/li>\n<li><strong>encode_internal_state<\/strong> – use encoder over ‘internal’ part of observation space<\/li>\n<li><strong>static_rnn<\/strong> – (bool), it True - use static rnn graph, dynamic otherwise<\/li>\n<li><strong>not used<\/strong> (<em>**kwargs<\/em>) – <\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<dl class=\"class\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\">\n<em class=\"property\">class <\/em><code class=\"descclassname\">btgym.algorithms.policy.stacked_lstm.<\/code><code class=\"descname\">AacStackedRL2Policy<\/code><span class=\"sig-paren\">(<\/span><em>lstm_2_init_period=50<\/em>, <em>**kwargs<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#AacStackedRL2Policy\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Attempt to implement two-level RL^2\nThis policy class in conjunction with DataDomain classes from btgym.datafeed\nis aimed to implement RL^2 algorithm by Duan et al.<\/p>\n<p>Paper:\n<cite>FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING<\/cite>,\n<a class=\"reference external\" href=\"https://arxiv.org/pdf/1611.02779.pdf\">https://arxiv.org/pdf/1611.02779.pdf<\/a><\/p>\n<p>The only difference from Base policy is <cite>get_initial_features()<\/cite> method, which has been changed\neither to reset RNN context to zero-state or return context from the end of previous episode,\ndepending on episode metadata received or <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`<\/span><\/a>lstm_2_init_period’ parameter.<\/p>\n<dl class=\"method\">\n<dt id=\"btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\">\n<code class=\"descname\">get_initial_features<\/code><span class=\"sig-paren\">(<\/span><em>state<\/em>, <em>context=None<\/em><span class=\"sig-paren\">)<\/span><a class=\"reference internal\" href=\"_modules/btgym/algorithms/policy/stacked_lstm.html#AacStackedRL2Policy.get_initial_features\"><span class=\"viewcode-link\">[source]<\/span><\/a><a class=\"headerlink\" href=\"#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\" title=\"Permalink to this definition\">¶<\/a><\/dt>\n<dd><p>Returns RNN initial context.\nRNN_1 (lower) context is reset at every call.<\/p>\n<dl class=\"docutils\">\n<dt>RNN_2 (upper) context is reset:<\/dt>\n<dd><ul class=\"first last simple\">\n<li>every <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`<\/span><\/a>lstm_2_init_period’ episodes;<\/li>\n<li>episode  initial <cite>state<\/cite> <cite>trial_num<\/cite> metadata has been changed form last call (new train trial started);<\/li>\n<li>episode metatdata <cite>type<\/cite> is non-zero (test episode);<\/li>\n<li>no context arg is provided (initial episode of training);<\/li>\n<li>… else carries context on to new episode;<\/li>\n<\/ul>\n<\/dd>\n<\/dl>\n<p>Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,\nand delivered through env.strategy as separate key in observation dictionary.<\/p>\n<table class=\"docutils field-list\" frame=\"void\" rules=\"none\">\n<col class=\"field-name\" />\n<col class=\"field-body\" />\n<tbody valign=\"top\">\n<tr class=\"field-odd field\"><th class=\"field-name\">Parameters:<\/th><td class=\"field-body\"><ul class=\"first simple\">\n<li><strong>state<\/strong> – initial episode state (result of env.reset())<\/li>\n<li><strong>context<\/strong> – last previous episode RNN state (last_context of runner)<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr class=\"field-even field\"><th class=\"field-name\">Returns:<\/th><td class=\"field-body\"><p class=\"first\">2_RNN zero-state tuple.<\/p>\n<\/td>\n<\/tr>\n<tr class=\"field-odd field\"><th class=\"field-name\">Raises:<\/th><td class=\"field-body\"><p class=\"first last\"><em>KeyError if [`metadata`]<\/em> – [<cite>trial_num<\/cite>,`type`] keys not found<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd><\/dl>\n\n<\/dd><\/dl>\n\n<\/div>\n\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n    <div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"footer navigation\">\n      \n        <a href=\"btgym.algorithms.runner.html\" class=\"btn btn-neutral float-right\" title=\"btgym.algorithms.runner.base module\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\"><\/span><\/a>\n      \n      \n        <a href=\"btgym.algorithms.nn.html\" class=\"btn btn-neutral\" title=\"btgym.algorithms.nn.losses module\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\"><\/span> Previous<\/a>\n      \n    <\/div>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'./',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B92:3BB77:17B2A2:5E1783:6AB92C4A"},"text_sha256":"f534c1dcc8c8760b55932c9fb09628d029e0f945daf6f617c627d87e88025262"},{"path":"docs/source/btgym.algorithms.policy.rst","size":305,"blob_sha":"abebada26ec2d863c244b8324f280e085934f542","priority":1,"status":200,"text":"\n\nbtgym\\.algorithms\\.policy\\.base module\n--------------------------------------\n\n.. automodule:: btgym.algorithms.policy.base\n    :members:\n\n\n\nbtgym\\.algorithms\\.policy\\.stacked_lstm module\n----------------------------------------------\n\n.. automodule:: btgym.algorithms.policy.stacked_lstm\n    :members:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A10:3EACB:17B6E8:5E1A20:6AB92C46"},"text_sha256":"81aae78f71b4d91a5db7209e93354369cddf355beb53c1e7254cb30449d7692d"},{"path":"docs/_modules/btgym/algorithms/policy/base.html","size":74098,"blob_sha":"7ff622271892cc0b72bc24bc933c16eda7dff7d8","priority":2,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.base &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms.policy\" href=\"../policy.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../policy.html\">btgym.algorithms.policy<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.base<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy.base<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"c1\"># Asynchronous implementation of a3c/ppo algorithm.<\/span>\n<span class=\"c1\"># paper:<\/span>\n<span class=\"c1\"># https://arxiv.org/pdf/1707.06347.pdf<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Based on PPO-SGD code from OpenAI `Baselines` repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/baselines<\/span>\n<span class=\"c1\">#<\/span>\n<span class=\"c1\"># Async. framework code comes from OpenAI repository under MIT licence:<\/span>\n<span class=\"c1\"># https://github.com/openai/universe-starter-agent<\/span>\n<span class=\"c1\">#<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">gym.spaces<\/span> <span class=\"k\">import<\/span> <span class=\"n\">Discrete<\/span><span class=\"p\">,<\/span> <span class=\"n\">Dict<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.networks<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.math_utils<\/span> <span class=\"k\">import<\/span> <span class=\"n\">sample_dp<\/span><span class=\"p\">,<\/span> <span class=\"n\">softmax<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.datafeed.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">EnvResetConfig<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.spaces<\/span> <span class=\"k\">import<\/span> <span class=\"n\">DictSpace<\/span><span class=\"p\">,<\/span> <span class=\"n\">ActionDictSpace<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">gym.spaces<\/span> <span class=\"k\">import<\/span> <span class=\"n\">Discrete<\/span>\n\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">BaseAacPolicy<\/span><span class=\"p\">(<\/span><span class=\"nb\">object<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Base advantage actor-critic Convolution-LSTM policy estimator with auxiliary control tasks for<\/span>\n<span class=\"sd\">    discrete or nested discrete action spaces.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">        https://arxiv.org/abs/1602.01783<\/span>\n<span class=\"sd\">        https://arxiv.org/abs/1611.05397<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">action_dp_alpha<\/span><span class=\"o\">=<\/span><span class=\"mf\">200.0<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects multi-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           instance of btgym.spaces.DictSpace<\/span>\n<span class=\"sd\">            ac_space:           instance of btgym.spaces.ActionDictSpace<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       bool, if True - add auxiliary tasks estimations to self.callbacks dictionary<\/span>\n<span class=\"sd\">            time_flat:          bool, if True - use static rnn, dynamic otherwise<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">assert<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">DictSpace<\/span><span class=\"p\">),<\/span> \\\n            <span class=\"s1\">&#39;Expected observation space be instance of btgym.spaces.DictSpace, got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n\n        <span class=\"k\">assert<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">ActionDictSpace<\/span><span class=\"p\">),<\/span> \\\n            <span class=\"s1\">&#39;Expected action space be instance of btgym.spaces.ActionDictSpace, got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"k\">assert<\/span> <span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">base_space<\/span> <span class=\"o\">==<\/span> <span class=\"n\">Discrete<\/span><span class=\"p\">,<\/span> \\\n            <span class=\"s1\">&#39;Base policy restricted to gym.spaces.Discrete base action spaces, got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">base_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">action_dp_alpha<\/span> <span class=\"o\">=<\/span> <span class=\"n\">action_dp_alpha<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for previous step action[multi-categorical vector encoding]  and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_last_action_in_pl&#39;<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_last_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_last_action_in_pl&#39;<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_last_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">AttributeError<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"c1\"># Conv. layers:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_last_action_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"n\">on_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># print(&#39;*** POLICY DEBUG ***&#39;)<\/span>\n        <span class=\"c1\"># print(&#39;self.on_last_a_in :&#39;, self.on_last_a_in)<\/span>\n        <span class=\"c1\"># print(&#39;on_last_action_in: &#39;, on_last_action_in)<\/span>\n        <span class=\"c1\"># print(&#39;on_r_in: &#39;, on_r_in)<\/span>\n        <span class=\"c1\"># print(&#39;on_aac_x: &#39;, on_aac_x)<\/span>\n\n        <span class=\"c1\"># Feed last action, reward [, internal obs. state] into LSTM along with external state features:<\/span>\n        <span class=\"n\">on_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_last_action_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># print(&#39;on_stage2_input-&gt;on_aac_x: &#39;, on_aac_x)<\/span>\n\n        <span class=\"c1\"># LSTM layer takes conv. features and concatenated last action_reward tensor:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_sequence_length<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Aac policy and value outputs and action-sampling function:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Off-policy AAC network (shared):<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_action_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"n\">off_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>  <span class=\"c1\"># reward is scalar<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"n\">off_stage2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_action_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_r_in<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;internal&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_int<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_stage2_input<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_int<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">off_x_lstm_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"c1\"># Off policy dense:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux1: `Pixel control` network:<\/span>\n        <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n        <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"c1\">#self.pc_a_r_in = self.off_last_action_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n        <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_out<\/span>\n\n        <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n        <span class=\"c1\"># Restricted to single action space:<\/span>\n        <span class=\"n\">act_space<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">act_space<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2: `Value function replay` network:<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"c1\">#self.vr_a_r_in = self.off_last_action_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3: `Reward prediction` network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared conv. output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">conv_2d_network<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related :<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns initial context.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            LSTM zero-state tuple.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"c1\"># TODO: rework as in: AacStackedMetaPolicy --&gt; base runner, verbose runner; synchro_runner ok<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">)<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.act\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.act\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">act<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_action<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_reward<\/span><span class=\"p\">,<\/span> <span class=\"n\">deterministic<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Emits action.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    dictionary containing single observation<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            last_action:    action value from previous step<\/span>\n<span class=\"sd\">            last_reward:    reward value previous step<\/span>\n<span class=\"sd\">            deterministic:  bool, it True - act deterministically,<\/span>\n<span class=\"sd\">                            use random sampling otherwise (default);<\/span>\n<span class=\"sd\">                            effective for discrete action sapce only (TODO: continious)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Action as dictionary of several action encodings, actions logits, V-fn value, output RNN state<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"n\">pl<\/span><span class=\"p\">:<\/span> <span class=\"n\">value<\/span> <span class=\"k\">for<\/span> <span class=\"n\">pl<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">zip<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">flatten_nested<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_state<\/span><span class=\"p\">))}<\/span>\n            <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n            <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n                <span class=\"p\">{<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_action<\/span><span class=\"p\">,<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_reward<\/span><span class=\"p\">,<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n                <span class=\"p\">}<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span> <span class=\"o\">=<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">([<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span><span class=\"p\">],<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">logits<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"o\">...<\/span><span class=\"p\">]<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">is_discrete<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">if<\/span> <span class=\"n\">deterministic<\/span><span class=\"p\">:<\/span>\n                    <span class=\"n\">sample<\/span> <span class=\"o\">=<\/span> <span class=\"n\">softmax<\/span><span class=\"p\">(<\/span><span class=\"n\">logits<\/span><span class=\"p\">)<\/span>\n\n                <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                    <span class=\"c1\"># Use multinomial to get sample (discrete):<\/span>\n                    <span class=\"n\">sample<\/span> <span class=\"o\">=<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">random<\/span><span class=\"o\">.<\/span><span class=\"n\">multinomial<\/span><span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"n\">softmax<\/span><span class=\"p\">(<\/span><span class=\"n\">logits<\/span><span class=\"p\">))<\/span>\n\n                <span class=\"c1\"># print(&#39;ploicy_determ: {}, logits: {}, sample: {}&#39;.format(deterministic, logits, sample))<\/span>\n\n                <span class=\"n\">sample<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">_cat_to_vec<\/span><span class=\"p\">(<\/span><span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">argmax<\/span><span class=\"p\">(<\/span><span class=\"n\">sample<\/span><span class=\"p\">))<\/span>\n\n                <span class=\"c1\"># print(&#39;policy_sample_vector: &#39;, sample)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Use DP to get sample (continuous):<\/span>\n                <span class=\"n\">sample<\/span> <span class=\"o\">=<\/span> <span class=\"n\">sample_dp<\/span><span class=\"p\">(<\/span><span class=\"n\">logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">alpha<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">action_dp_alpha<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"c1\"># Get all needed action encodings:<\/span>\n            <span class=\"n\">action<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">_vec_to_action<\/span><span class=\"p\">(<\/span><span class=\"n\">sample<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">one_hot<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">_vec_to_one_hot<\/span><span class=\"p\">(<\/span><span class=\"n\">sample<\/span><span class=\"p\">)<\/span>\n            <span class=\"n\">action_pack<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\n                <span class=\"s1\">&#39;environment&#39;<\/span><span class=\"p\">:<\/span> <span class=\"n\">action<\/span><span class=\"p\">,<\/span>\n                <span class=\"s1\">&#39;encoded&#39;<\/span><span class=\"p\">:<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encode<\/span><span class=\"p\">(<\/span><span class=\"n\">action<\/span><span class=\"p\">),<\/span>\n                <span class=\"s1\">&#39;one_hot&#39;<\/span><span class=\"p\">:<\/span> <span class=\"n\">one_hot<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">}<\/span>\n            <span class=\"c1\"># print(&#39;action_pack: &#39;, action_pack)<\/span>\n        <span class=\"k\">except<\/span> <span class=\"ne\">Exception<\/span> <span class=\"k\">as<\/span> <span class=\"n\">e<\/span><span class=\"p\">:<\/span>\n            <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"n\">e<\/span><span class=\"p\">)<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"n\">e<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">action_pack<\/span><span class=\"p\">,<\/span> <span class=\"n\">logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">value<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_value\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_value\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_value<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_action<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_reward<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates policy V-function.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            observation:    single observation value<\/span>\n<span class=\"sd\">            lstm_state:     lstm context value<\/span>\n<span class=\"sd\">            last_action:    action value from previous step<\/span>\n<span class=\"sd\">            last_reward:    reward value from previous step<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            V-function value<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"n\">feed_dict_rnn_context<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span><span class=\"n\">feed_dict_from_nested<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">,<\/span> <span class=\"n\">observation<\/span><span class=\"p\">,<\/span> <span class=\"n\">expand_batch<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">))<\/span>\n        <span class=\"n\">feeder<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"p\">{<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_action<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_reward<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">:<\/span> <span class=\"kc\">False<\/span>\n            <span class=\"p\">}<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_pc_target\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_pc_target\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_pc_target<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Estimates pixel-control task target.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      single observation value<\/span>\n<span class=\"sd\">            last_state: single observation value<\/span>\n<span class=\"sd\">            **kwargs:   not used<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            Estimated absolute difference between two subsampled states.<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">feeder<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">:<\/span> <span class=\"n\">last_state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]}<\/span>\n\n        <span class=\"k\">return<\/span> <span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">,<\/span> <span class=\"n\">feeder<\/span><span class=\"p\">)[<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"o\">...<\/span><span class=\"p\">,<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span><\/div>\n\n<div class=\"viewcode-block\" id=\"BaseAacPolicy.get_sample_config\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.BaseAacPolicy.get_sample_config\">[docs]<\/a>    <span class=\"nd\">@staticmethod<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">get_sample_config<\/span><span class=\"p\">(<\/span><span class=\"o\">*<\/span><span class=\"n\">args<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Dummy implementation.<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">                default data sample configuration dictionary `btgym.datafeed.base.EnvResetConfig`<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">EnvResetConfig<\/span><\/div><\/div>\n\n\n<div class=\"viewcode-block\" id=\"Aac1dPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.base.Aac1dPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">Aac1dPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    AAC policy for one-dimensional signal obs. state.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">BasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,),<\/span>\n                 <span class=\"n\">action_dp_alpha<\/span><span class=\"o\">=<\/span><span class=\"mf\">200.0<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects bi-modal observation as dict: `external`, `internal`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:           dictionary of observation state shapes<\/span>\n<span class=\"sd\">            ac_space:           discrete action space shape (length)<\/span>\n<span class=\"sd\">            rp_sequence_size:   reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class:         tf.nn.lstm class<\/span>\n<span class=\"sd\">            lstm_layers:        tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            aux_estimate:       (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary.<\/span>\n<span class=\"sd\">            **kwargs            not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">update<\/span><span class=\"p\">(<\/span>\n            <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n                <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n                <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">Aac1dPolicy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_class<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">lstm_layers<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">action_dp_alpha<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">aux_estimate<\/span><span class=\"p\">,<\/span>\n            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n        <span class=\"p\">)<\/span><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F9E:2B291E:184854:5EAC67:6AB92C22"},"text_sha256":"ad45977bc0a30a65825c02addc9238ef3ec1f88a981933c4d37d6052c56e4d16"},{"path":"docs/_modules/btgym/algorithms/policy/stacked_lstm.html","size":115834,"blob_sha":"cd59610670ac82633ce694a7174ea175e8d179f5","priority":2,"status":200,"text":"\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n  <meta charset=\"utf-8\">\n  \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \n  <title>btgym.algorithms.policy.stacked_lstm &mdash; BTGym 0.0.7 documentation<\/title>\n  \n\n  \n  \n  \n  \n\n  \n\n  \n  \n    \n\n  \n\n  \n  \n    <link rel=\"stylesheet\" href=\"../../../../_static/css/theme.css\" type=\"text/css\" />\n  \n\n  \n\n  \n        <link rel=\"index\" title=\"Index\"\n              href=\"../../../../genindex.html\"/>\n        <link rel=\"search\" title=\"Search\" href=\"../../../../search.html\"/>\n    <link rel=\"top\" title=\"BTGym 0.0.7 documentation\" href=\"../../../../index.html\"/>\n        <link rel=\"up\" title=\"btgym.algorithms.policy\" href=\"../policy.html\"/> \n\n  \n  <script src=\"../../../../_static/js/modernizr.min.js\"><\/script>\n\n<\/head>\n\n<body class=\"wy-body-for-nav\" role=\"document\">\n\n   \n  <div class=\"wy-grid-for-nav\">\n\n    \n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\">\n          \n\n          \n            <a href=\"../../../../index.html\" class=\"icon icon-home\"> BTGym\n          \n\n          \n          <\/a>\n\n          \n            \n            \n              <div class=\"version\">\n                0.0.7\n              <\/div>\n            \n          \n\n          \n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../../../../search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  <\/form>\n<\/div>\n\n          \n        <\/div>\n\n        <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n          \n            \n            \n              \n            \n            \n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html\">Package Description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#installation\">Installation<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#quickstart\">Quickstart<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#problem-definition\">Problem definition<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#environment-engine-description\">Environment engine description<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#data-flow-structure\">Data flow structure<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../intro.html#a3c-framework-description\">A3C framework description<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.envs.html\">btgym.envs package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html\">btgym.dataserver module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.server\">btgym.server module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.html#module-btgym.spaces\">btgym.spaces module<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.strategy.html\">btgym.strategy package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.monitor.html\">btgym.monitor package<\/a><\/li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.rendering.html\">btgym.rendering package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.datafeed.html\">btgym.datafeed package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.algorithms.html\">btgym.algorithms package<\/a><\/li>\n<\/ul>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../../../../btgym.research.html\">btgym.research package<\/a><\/li>\n<\/ul>\n\n            \n          \n        <\/div>\n      <\/div>\n    <\/nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n      \n      <nav class=\"wy-nav-top\" role=\"navigation\" aria-label=\"top navigation\">\n        \n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"><\/i>\n          <a href=\"../../../../index.html\">BTGym<\/a>\n        \n      <\/nav>\n\n\n      \n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n  <ul class=\"wy-breadcrumbs\">\n    \n      <li><a href=\"../../../../index.html\">Docs<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../../../index.html\">Module code<\/a> &raquo;<\/li>\n        \n          <li><a href=\"../policy.html\">btgym.algorithms.policy<\/a> &raquo;<\/li>\n        \n      <li>btgym.algorithms.policy.stacked_lstm<\/li>\n    \n    \n      <li class=\"wy-breadcrumbs-aside\">\n        \n            \n        \n      <\/li>\n    \n  <\/ul>\n\n  \n  <hr/>\n<\/div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n            \n  <h1>Source code for btgym.algorithms.policy.stacked_lstm<\/h1><div class=\"highlight\"><pre>\n<span><\/span><span class=\"kn\">from<\/span> <span class=\"nn\">tensorflow.contrib.layers<\/span> <span class=\"k\">import<\/span> <span class=\"n\">flatten<\/span> <span class=\"k\">as<\/span> <span class=\"n\">batch_flatten<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.policy.base<\/span> <span class=\"k\">import<\/span> <span class=\"n\">BaseAacPolicy<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.nn.networks<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.algorithms.utils<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">btgym.spaces<\/span> <span class=\"k\">import<\/span> <span class=\"n\">DictSpace<\/span><span class=\"p\">,<\/span> <span class=\"n\">ActionDictSpace<\/span>\n\n\n<div class=\"viewcode-block\" id=\"StackedLstmPolicy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.StackedLstmPolicy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">StackedLstmPolicy<\/span><span class=\"p\">(<\/span><span class=\"n\">BaseAacPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Conv.-Stacked_LSTM policy, based on `NAV A3C agent` architecture from<\/span>\n\n<span class=\"sd\">    `LEARNING TO NAVIGATE IN COMPLEX ENVIRONMENTS` by Mirowski et all. and<\/span>\n\n<span class=\"sd\">    `LEARNING TO REINFORCEMENT LEARN` by JX Wang et all.<\/span>\n\n<span class=\"sd\">    Papers:<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.03673.pdf<\/span>\n\n<span class=\"sd\">    https://arxiv.org/pdf/1611.05763.pdf<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">rp_sequence_size<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">state_encoder_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">conv_2d_network<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_class_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">contrib<\/span><span class=\"o\">.<\/span><span class=\"n\">rnn<\/span><span class=\"o\">.<\/span><span class=\"n\">LayerNormBasicLSTMCell<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">256<\/span><span class=\"p\">,<\/span> <span class=\"mi\">256<\/span><span class=\"p\">),<\/span>\n                 <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">noisy_linear<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">share_encoder_params<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">dropout_keep_prob<\/span><span class=\"o\">=<\/span><span class=\"mf\">1.0<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">action_dp_alpha<\/span><span class=\"o\">=<\/span><span class=\"mf\">200.0<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">aux_estimate<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">encode_internal_state<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">static_rnn<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                 <span class=\"n\">shared_p_v<\/span><span class=\"o\">=<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span>\n                 <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Defines [partially shared] on/off-policy networks for estimating  action-logits, value function,<\/span>\n<span class=\"sd\">        reward and state &#39;pixel_change&#39; predictions.<\/span>\n<span class=\"sd\">        Expects multi-modal observation as array of shape `ob_space`.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            ob_space:               instance of btgym.spaces.DictSpace<\/span>\n<span class=\"sd\">            ac_space:               instance of btgym.spaces.ActionDictSpace<\/span>\n<span class=\"sd\">            rp_sequence_size:       reward prediction sample length<\/span>\n<span class=\"sd\">            lstm_class_ref:         tf.nn.lstm class to use<\/span>\n<span class=\"sd\">            lstm_layers:            tuple of LSTM layers sizes<\/span>\n<span class=\"sd\">            linear_layer_ref:       linear layer class to use<\/span>\n<span class=\"sd\">            share_encoder_params:   bool, whether to share encoder parameters for every &#39;external&#39; data stream<\/span>\n<span class=\"sd\">            dropout_keep_prob:      in (0, 1] dropout regularisation parameter<\/span>\n<span class=\"sd\">            action_dp_alpha:<\/span>\n<span class=\"sd\">            aux_estimate:           (bool), if True - add auxiliary tasks estimations to self.callbacks dictionary<\/span>\n<span class=\"sd\">            encode_internal_state:  use encoder over &#39;internal&#39; part of observation space<\/span>\n<span class=\"sd\">            static_rnn:             (bool), it True - use static rnn graph, dynamic otherwise<\/span>\n<span class=\"sd\">            **kwargs                not used<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n\n        <span class=\"k\">assert<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">DictSpace<\/span><span class=\"p\">),<\/span> \\\n            <span class=\"s1\">&#39;Expected observation space be instance of btgym.spaces.DictSpace, got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ob_space<\/span>\n\n        <span class=\"k\">assert<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">ActionDictSpace<\/span><span class=\"p\">),<\/span> \\\n            <span class=\"s1\">&#39;Expected action space be instance of btgym.spaces.ActionDictSpace, got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span> <span class=\"o\">=<\/span> <span class=\"n\">ac_space<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_sequence_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state_encoder_class_ref<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_class<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_class_ref<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_layers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_layers<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">action_dp_alpha<\/span> <span class=\"o\">=<\/span> <span class=\"n\">action_dp_alpha<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span> <span class=\"o\">=<\/span> <span class=\"n\">aux_estimate<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"c1\"># self.encode_internal_state = encode_internal_state<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">share_encoder_params<\/span> <span class=\"o\">=<\/span> <span class=\"n\">share_encoder_params<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">share_encoder_params<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">reuse_encoder_params<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">AUTO_REUSE<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">reuse_encoder_params<\/span> <span class=\"o\">=<\/span> <span class=\"kc\">False<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">static_rnn<\/span> <span class=\"o\">=<\/span> <span class=\"n\">static_rnn<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">dropout_keep_prob<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dropout_keep_prob<\/span>\n        <span class=\"k\">assert<\/span> <span class=\"mi\">0<\/span> <span class=\"o\">&lt;<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">dropout_keep_prob<\/span> <span class=\"o\">&lt;=<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;Dropout keep_prob value should be in (0, 1]&#39;<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n\n        <span class=\"c1\"># Placeholders for obs. state input:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_state_in&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_state_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">nested_placeholders<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span> <span class=\"n\">batch_dim<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_in&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for previous step action[multi-categorical vector encoding]  and reward [scalar]:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_last_action_in_pl&#39;<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_last_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_last_action_in_pl&#39;<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"kc\">None<\/span><span class=\"p\">],<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_last_reward_in_pl&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Placeholders for rnn batch and time-step dimensions:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;on_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;off_policy_sequence_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_state_in_keys&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n\n        <span class=\"c1\"># Dropout related:<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"ow\">is<\/span> <span class=\"ow\">not<\/span> <span class=\"kc\">None<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">pass<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">AttributeError<\/span><span class=\"p\">:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder_with_default<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">constant<\/span><span class=\"p\">(<\/span><span class=\"kc\">False<\/span><span class=\"p\">,<\/span> <span class=\"n\">dtype<\/span><span class=\"o\">=<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">bool<\/span><span class=\"p\">),<\/span>\n                <span class=\"n\">shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;train_phase_flag_pl&#39;<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">keep_prob<\/span> <span class=\"o\">=<\/span> <span class=\"mf\">1.0<\/span> <span class=\"o\">-<\/span> <span class=\"p\">(<\/span><span class=\"mf\">1.0<\/span> <span class=\"o\">-<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">dropout_keep_prob<\/span><span class=\"p\">)<\/span> <span class=\"o\">*<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">train_phase<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">float32<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Default parameters:<\/span>\n        <span class=\"n\">default_kwargs<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">conv_2d_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">conv_2d_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">conv_2d_num_filters<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">,<\/span> <span class=\"mi\">64<\/span><span class=\"p\">,<\/span> <span class=\"mi\">64<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">pc_estimator_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n            <span class=\"n\">duell_pc_x_inner_shape<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">32<\/span><span class=\"p\">),<\/span>  <span class=\"c1\"># [6,3,32] if swapping W-C dims<\/span>\n            <span class=\"n\">duell_pc_filter_size<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">duell_pc_stride<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">keep_prob<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">keep_prob<\/span><span class=\"p\">,<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"c1\"># Insert if not already:<\/span>\n        <span class=\"k\">for<\/span> <span class=\"n\">key<\/span><span class=\"p\">,<\/span> <span class=\"n\">default_value<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">default_kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">items<\/span><span class=\"p\">():<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">key<\/span> <span class=\"ow\">not<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">():<\/span>\n                <span class=\"n\">kwargs<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">default_value<\/span>\n\n        <span class=\"c1\"># Base on-policy AAC network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">modes_to_encode<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span>\n        <span class=\"k\">for<\/span> <span class=\"n\">mode<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">modes_to_encode<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">assert<\/span> <span class=\"n\">mode<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">(),<\/span> \\\n                <span class=\"s1\">&#39;Required top-level mode `<\/span><span class=\"si\">{}<\/span><span class=\"s1\">` not found in state shape specification&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">mode<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Separately encode than concatenate all `external` and &#39;internal&#39; states modes,<\/span>\n        <span class=\"c1\"># [jointly] encode every stream within mode:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_aac_x_encoded<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"k\">for<\/span> <span class=\"n\">key<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">modes_to_encode<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">):<\/span>  <span class=\"c1\"># got dictionary of data streams<\/span>\n                <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">share_encoder_params<\/span><span class=\"p\">:<\/span>\n                    <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_shared&#39;<\/span>\n                <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                    <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span>\n                <span class=\"n\">encoded_streams<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\n                    <span class=\"n\">name<\/span><span class=\"p\">:<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                            <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">stream<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">][<\/span><span class=\"n\">name<\/span><span class=\"p\">],<\/span>\n                            <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"n\">layer_name_template<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"p\">),<\/span>\n                            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">reuse_encoder_params<\/span><span class=\"p\">,<\/span>  <span class=\"c1\"># shared params for all streams in mode<\/span>\n                            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                        <span class=\"p\">)<\/span>\n                    <span class=\"p\">)<\/span>\n                    <span class=\"k\">for<\/span> <span class=\"n\">name<\/span><span class=\"p\">,<\/span> <span class=\"n\">stream<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">items<\/span><span class=\"p\">()<\/span>\n                <span class=\"p\">}<\/span>\n                <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span>\n                    <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">encoded_streams<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span><span class=\"p\">()),<\/span>\n                    <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;multi_encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Got single data stream:<\/span>\n                <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                        <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span>\n                        <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span>\n                        <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                        <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">),<\/span>\n                        <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                    <span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encoded_mode<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_state_external_encoded_dict&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_aac_x_encoded<\/span>\n\n        <span class=\"c1\"># on_aac_x = tf.concat(list(self.on_aac_x_encoded.values()), axis=-1, name=&#39;on_state_external_encoded&#39;)<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_state_external_encoded&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span>\n\n        <span class=\"c1\"># TODO: for encoder prediction test, output `naive` estimates for logits and value directly from encoder:<\/span>\n        <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_simple_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_simple_value<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">),<\/span>\n            <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_simple_pi_v&#39;<\/span>\n        <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for batch training as: [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">on_last_action_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_a_in<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"n\">on_last_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_last_reward_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># # Prepare `internal` state, if any:<\/span>\n        <span class=\"c1\"># if &#39;internal&#39; in list(self.on_state_in.keys()):<\/span>\n        <span class=\"c1\">#     if self.encode_internal_state:<\/span>\n        <span class=\"c1\">#         # Use convolution encoder:<\/span>\n        <span class=\"c1\">#         on_x_internal = self.state_encoder_class_ref(<\/span>\n        <span class=\"c1\">#             x=self.on_state_in[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             ob_space=self.ob_space.shape[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             ac_space=self.ac_space,<\/span>\n        <span class=\"c1\">#             name=&#39;encoded_internal&#39;,<\/span>\n        <span class=\"c1\">#             **kwargs<\/span>\n        <span class=\"c1\">#         )<\/span>\n        <span class=\"c1\">#         x_int_shape_static = on_x_internal.get_shape().as_list()<\/span>\n        <span class=\"c1\">#         on_x_internal = [<\/span>\n        <span class=\"c1\">#             tf.reshape(on_x_internal, [self.on_batch_size, max_seq_len, np.prod(x_int_shape_static[1:])])]<\/span>\n        <span class=\"c1\">#         self.debug[&#39;on_state_internal_encoded&#39;] = on_x_internal<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\">#     else:<\/span>\n        <span class=\"c1\">#         # Feed as is:<\/span>\n        <span class=\"c1\">#         x_int_shape_static = self.on_state_in[&#39;internal&#39;].get_shape().as_list()<\/span>\n        <span class=\"c1\">#         on_x_internal = tf.reshape(<\/span>\n        <span class=\"c1\">#             self.on_state_in[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             [self.on_batch_size, max_seq_len, np.prod(x_int_shape_static[1:])]<\/span>\n        <span class=\"c1\">#         )<\/span>\n        <span class=\"c1\">#         self.debug[&#39;on_state_internal_encoded&#39;] = on_x_internal<\/span>\n        <span class=\"c1\">#         on_x_internal = [on_x_internal]<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># else:<\/span>\n        <span class=\"c1\">#     on_x_internal = []<\/span>\n\n        <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Reshape to batch-feed rnn:<\/span>\n        <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">on_x_internal<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_state_internal_encoded&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_internal<\/span>\n\n        <span class=\"n\">on_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Prepare datetime index if any:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;datetime&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_dt_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;datetime&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">on_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;datetime&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_dt_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">on_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_dt<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">on_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_state_dt_encoded&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_dt<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;conv_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span>\n\n        <span class=\"c1\"># Feed last last_reward into LSTM_1 layer along with encoded `external` state features and datetime stamp:<\/span>\n        <span class=\"c1\"># on_stage2_1_input = [on_aac_x, on_last_action_in, on_last_reward_in] + on_x_dt<\/span>\n        <span class=\"n\">on_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_last_r_in<\/span><span class=\"p\">]<\/span> <span class=\"c1\">#+ on_x_dt<\/span>\n\n        <span class=\"c1\"># Feed last_action, encoded `external` state,  `internal` state, datetime stamp into LSTM_2:<\/span>\n        <span class=\"c1\"># on_stage2_2_input = [on_aac_x, on_last_action_in, on_last_reward_in] + on_x_internal + on_x_dt<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">on_last_action_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">on_x_internal<\/span> <span class=\"c1\">#+ on_x_dt<\/span>\n\n        <span class=\"c1\"># LSTM_1 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;concat_input_to_lstm1&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span>\n\n        <span class=\"c1\"># First LSTM layer takes encoded `external` state:<\/span>\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_sequence_length<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span>\n                <span class=\"n\">static<\/span><span class=\"o\">=<\/span><span class=\"n\">static_rnn<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># var_list = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, tf.get_variable_scope().name)<\/span>\n        <span class=\"c1\"># print(&#39;var_list: &#39;, var_list)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_1_out<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_1_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># For time_flat only: Reshape on_lstm_1_state_out from [1,2,20,size] --&gt;[20,1,2,size] --&gt; [20,1, 2xsize]:<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">transpose<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">])<\/span>\n        <span class=\"n\">reshape_lstm_1_state_out_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">reshape_lstm_1_state_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"c1\"># Take policy logits off first LSTM-dense layer:<\/span>\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_on_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_1_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rsh_on_x_lstm_1_out<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"ow\">not<\/span> <span class=\"n\">shared_p_v<\/span><span class=\"p\">:<\/span>\n            <span class=\"c1\"># Aac policy output and action-sampling function:<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_on_x_lstm_1_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Second LSTM layer takes concatenated encoded &#39;external&#39; state, LSTM_1 output,<\/span>\n        <span class=\"c1\"># last_action and `internal_state` (if present) tensors:<\/span>\n        <span class=\"n\">on_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Try: feed context instead of output<\/span>\n        <span class=\"c1\">#on_stage2_2_input = [reshape_lstm_1_state_out] + on_stage2_1_input<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">on_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">on_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_stage2_2_input&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_aac_x<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">on_aac_x<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_sequence_length<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_time_length<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_class<\/span><span class=\"o\">=<\/span><span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_layers<\/span><span class=\"o\">=<\/span><span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span>\n                <span class=\"n\">static<\/span><span class=\"o\">=<\/span><span class=\"n\">static_rnn<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;on_x_lstm_2_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_2_out<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;self.on_lstm_2_state_pl_flatten&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">on_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_on_x_lstm_2_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">on_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">debug<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;reshaped_on_x_lstm_2_out&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rsh_on_x_lstm_2_out<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"n\">shared_p_v<\/span><span class=\"p\">:<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_sample<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_on_x_lstm_2_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi_vfn&#39;<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"c1\"># Aac value function:<\/span>\n            <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_on_x_lstm_2_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM placeholders, init. states and context:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_init_state<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_init_state<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_out<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_out<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_out<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_aac_x_encoded<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"k\">for<\/span> <span class=\"n\">key<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">modes_to_encode<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">):<\/span>  <span class=\"c1\"># got dictionary of data streams<\/span>\n                <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">share_encoder_params<\/span><span class=\"p\">:<\/span>\n                    <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_shared&#39;<\/span>\n                <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                    <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span>\n                <span class=\"n\">encoded_streams<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\n                    <span class=\"n\">name<\/span><span class=\"p\">:<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                            <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">stream<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">][<\/span><span class=\"n\">name<\/span><span class=\"p\">],<\/span>\n                            <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"n\">layer_name_template<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"p\">),<\/span>\n                            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>  <span class=\"c1\"># shared params for all streams in mode<\/span>\n                            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                        <span class=\"p\">)<\/span>\n                    <span class=\"p\">)<\/span>\n                    <span class=\"k\">for<\/span> <span class=\"n\">name<\/span><span class=\"p\">,<\/span> <span class=\"n\">stream<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">items<\/span><span class=\"p\">()<\/span>\n                <span class=\"p\">}<\/span>\n                <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span>\n                    <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">encoded_streams<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span><span class=\"p\">()),<\/span>\n                    <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;multi_encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Got single data stream:<\/span>\n                <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                    <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                        <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span>\n                        <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span>\n                        <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                        <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">),<\/span>\n                        <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                        <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                    <span class=\"p\">)<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encoded_mode<\/span>\n\n        <span class=\"c1\"># off_aac_x = tf.concat(list(self.off_aac_x_encoded.values()), axis=-1, name=&#39;off_state_external_encoded&#39;)<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># Reshape rnn inputs for  batch training as [rnn_batch_dim, rnn_time_dim, flattened_depth]:<\/span>\n        <span class=\"n\">x_shape_dynamic<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">max_seq_len<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">cast<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span> <span class=\"o\">/<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"n\">off_last_action_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">encoded_depth<\/span><span class=\"p\">]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"n\">off_last_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">])<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span> <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])])<\/span>\n\n        <span class=\"c1\"># # Prepare `internal` state, if any:<\/span>\n        <span class=\"c1\"># if &#39;internal&#39; in list(self.off_state_in.keys()):<\/span>\n        <span class=\"c1\">#     if self.encode_internal_state:<\/span>\n        <span class=\"c1\">#         # Use convolution encoder:<\/span>\n        <span class=\"c1\">#         off_x_internal = self.state_encoder_class_ref(<\/span>\n        <span class=\"c1\">#             x=self.off_state_in[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             ob_space=self.ob_space.shape[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             ac_space=self.ac_space,<\/span>\n        <span class=\"c1\">#             name=&#39;encoded_internal&#39;,<\/span>\n        <span class=\"c1\">#             reuse=True,<\/span>\n        <span class=\"c1\">#             **kwargs<\/span>\n        <span class=\"c1\">#         )<\/span>\n        <span class=\"c1\">#         x_int_shape_static = off_x_internal.get_shape().as_list()<\/span>\n        <span class=\"c1\">#         off_x_internal = [<\/span>\n        <span class=\"c1\">#             tf.reshape(off_x_internal, [self.off_batch_size, max_seq_len, np.prod(x_int_shape_static[1:])])<\/span>\n        <span class=\"c1\">#         ]<\/span>\n        <span class=\"c1\">#     else:<\/span>\n        <span class=\"c1\">#         x_int_shape_static = self.off_state_in[&#39;internal&#39;].get_shape().as_list()<\/span>\n        <span class=\"c1\">#         off_x_internal = tf.reshape(<\/span>\n        <span class=\"c1\">#             self.off_state_in[&#39;internal&#39;],<\/span>\n        <span class=\"c1\">#             [self.off_batch_size, max_seq_len, np.prod(x_int_shape_static[1:])]<\/span>\n        <span class=\"c1\">#         )<\/span>\n        <span class=\"c1\">#         off_x_internal = [off_x_internal]<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># else:<\/span>\n        <span class=\"c1\">#     off_x_internal = []<\/span>\n\n        <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_aac_x_encoded<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;internal&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"n\">x_int_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_internal<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n\n        <span class=\"c1\"># Properly feed LSTM2:<\/span>\n        <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">off_x_internal<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_int_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n        <span class=\"p\">)<\/span>\n        <span class=\"n\">off_x_internal<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_internal<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"s1\">&#39;datetime&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">()):<\/span>\n            <span class=\"n\">x_dt_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;datetime&#39;<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">off_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;datetime&#39;<\/span><span class=\"p\">],<\/span>\n                <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">max_seq_len<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">x_dt_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])]<\/span>\n            <span class=\"p\">)<\/span>\n            <span class=\"n\">off_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_dt<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">off_x_dt<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[]<\/span>\n\n        <span class=\"c1\"># off_stage2_1_input = [off_aac_x,  off_last_action_in, off_last_reward_in] + off_x_dt<\/span>\n        <span class=\"n\">off_stage2_1_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">off_last_r_in<\/span><span class=\"p\">]<\/span>  <span class=\"c1\"># + off_x_dt<\/span>\n\n        <span class=\"c1\"># off_stage2_2_input = [off_aac_x,  off_last_action_in, off_last_reward_in] + off_x_internal + off_x_dt<\/span>\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span>  <span class=\"n\">off_last_action_in<\/span><span class=\"p\">]<\/span> <span class=\"o\">+<\/span> <span class=\"n\">off_x_internal<\/span>  <span class=\"c1\"># + off_x_dt<\/span>\n\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_1_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_1&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">static<\/span><span class=\"o\">=<\/span><span class=\"n\">static_rnn<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_1_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_off_x_lstm_1_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"ow\">not<\/span> <span class=\"n\">shared_p_v<\/span><span class=\"p\">:<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n                <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                    <span class=\"n\">rsh_off_x_lstm_1_out<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi&#39;<\/span><span class=\"p\">,<\/span>\n                    <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span>\n                <span class=\"p\">)<\/span>\n\n        <span class=\"n\">off_stage2_2_input<\/span> <span class=\"o\">+=<\/span> <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_1_out<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"c1\"># LSTM_2 full input:<\/span>\n        <span class=\"n\">off_aac_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"n\">off_stage2_2_input<\/span><span class=\"p\">,<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"p\">[<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> \\\n            <span class=\"n\">lstm_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">off_aac_x<\/span><span class=\"p\">,<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">lstm_class_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"p\">(<\/span><span class=\"n\">lstm_layers<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">],),<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;lstm_2&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">static<\/span><span class=\"o\">=<\/span><span class=\"n\">static_rnn<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">,<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Reshape back to [batch, flattened_depth], where batch = rnn_batch_dim * rnn_time_dim:<\/span>\n        <span class=\"n\">x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">off_x_lstm_2_out<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rsh_off_x_lstm_2_out<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">off_x_lstm_2_out<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"n\">x_shape_dynamic<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span> <span class=\"n\">x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]])<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"n\">shared_p_v<\/span><span class=\"p\">:<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_logits<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_off_x_lstm_2_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_pi_vfn&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n            <span class=\"c1\"># Aac value function:<\/span>\n            <span class=\"p\">[<\/span><span class=\"n\">_<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span><span class=\"p\">,<\/span> <span class=\"n\">_<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_aac_network<\/span><span class=\"p\">(<\/span>\n                <span class=\"n\">rsh_off_x_lstm_2_out<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">ac_space_depth<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"o\">.<\/span><span class=\"n\">one_hot_depth<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;aac_dense_vfn&#39;<\/span><span class=\"p\">,<\/span>\n                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span>\n            <span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Concatenate LSTM states:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_1_state_pl_flatten<\/span> <span class=\"o\">+<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_2_state_pl_flatten<\/span>\n\n        <span class=\"k\">if<\/span> <span class=\"kc\">False<\/span><span class=\"p\">:<\/span>  <span class=\"c1\"># TEMP DISABLE<\/span>\n            <span class=\"c1\"># Aux1:<\/span>\n            <span class=\"c1\"># `Pixel control` network.<\/span>\n            <span class=\"c1\">#<\/span>\n            <span class=\"c1\"># Define pixels-change estimation function:<\/span>\n            <span class=\"c1\"># Yes, it rather env-specific but for atari case it is handy to do it here, see self.get_pc_target():<\/span>\n            <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_change_last_state_in<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_target<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span>\\\n                <span class=\"n\">pixel_change_2d_estimator<\/span><span class=\"p\">(<\/span><span class=\"n\">ob_space<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;external&#39;<\/span><span class=\"p\">],<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_a_r_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_a_r_in<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n\n            <span class=\"c1\"># Shared conv and lstm nets, same off-policy batch:<\/span>\n            <span class=\"n\">pc_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rsh_off_x_lstm_2_out<\/span>\n\n            <span class=\"c1\"># PC duelling Q-network, outputs [None, 20, 20, ac_size] Q-features tensor:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">pc_q<\/span> <span class=\"o\">=<\/span> <span class=\"n\">duelling_pc_network<\/span><span class=\"p\">(<\/span><span class=\"n\">pc_x<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span> <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Aux2:<\/span>\n        <span class=\"c1\"># `Value function replay` network.<\/span>\n        <span class=\"c1\">#<\/span>\n        <span class=\"c1\"># VR network is fully shared with ppo network but with `value` only output:<\/span>\n        <span class=\"c1\"># and has same off-policy batch pass with off_ppo network:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_batch_size<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_time_length<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_time_length<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_state_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_state_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_last_a_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_a_in<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_last_reward_in<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_last_reward_in<\/span>\n\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_lstm_state_pl_flatten<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_lstm_state_pl_flatten<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">vr_value<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">off_vf<\/span>\n\n        <span class=\"c1\"># Aux3:<\/span>\n        <span class=\"c1\"># `Reward prediction` network.<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">placeholder<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">int32<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_batch_size&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Shared encoded output:<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{}<\/span>\n        <span class=\"k\">for<\/span> <span class=\"n\">key<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">():<\/span>\n            <span class=\"k\">if<\/span> <span class=\"s1\">&#39;external&#39;<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">key<\/span><span class=\"p\">:<\/span>\n                <span class=\"k\">if<\/span> <span class=\"nb\">isinstance<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span> <span class=\"nb\">dict<\/span><span class=\"p\">):<\/span>  <span class=\"c1\"># got dictionary of data streams<\/span>\n                    <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">share_encoder_params<\/span><span class=\"p\">:<\/span>\n                        <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_shared&#39;<\/span>\n                    <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                        <span class=\"n\">layer_name_template<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span>\n                    <span class=\"n\">encoded_streams<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\n                        <span class=\"n\">name<\/span><span class=\"p\">:<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                                <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"n\">stream<\/span><span class=\"p\">,<\/span>\n                                <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">][<\/span><span class=\"n\">name<\/span><span class=\"p\">],<\/span>\n                                <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                                <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"n\">layer_name_template<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"p\">),<\/span>\n                                <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>  <span class=\"c1\"># shared params for all streams in mode<\/span>\n                                <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                            <span class=\"p\">)<\/span>\n                        <span class=\"p\">)<\/span>\n                        <span class=\"k\">for<\/span> <span class=\"n\">name<\/span><span class=\"p\">,<\/span> <span class=\"n\">stream<\/span> <span class=\"ow\">in<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span><span class=\"o\">.<\/span><span class=\"n\">items<\/span><span class=\"p\">()<\/span>\n                    <span class=\"p\">}<\/span>\n                    <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span>\n                        <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">encoded_streams<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span><span class=\"p\">()),<\/span>\n                        <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span>\n                        <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;multi_encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">)<\/span>\n                    <span class=\"p\">)<\/span>\n                <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                    <span class=\"c1\"># Got single data stream:<\/span>\n                    <span class=\"n\">encoded_mode<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">layers<\/span><span class=\"o\">.<\/span><span class=\"n\">flatten<\/span><span class=\"p\">(<\/span>\n                        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">state_encoder_class_ref<\/span><span class=\"p\">(<\/span>\n                            <span class=\"n\">x<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_state_in<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">],<\/span>\n                            <span class=\"n\">ob_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ob_space<\/span><span class=\"o\">.<\/span><span class=\"n\">shape<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">ac_space<\/span><span class=\"o\">=<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">ac_space<\/span><span class=\"p\">,<\/span>\n                            <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;encoded_<\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span><span class=\"n\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">key<\/span><span class=\"p\">),<\/span>\n                            <span class=\"n\">reuse<\/span><span class=\"o\">=<\/span><span class=\"kc\">True<\/span><span class=\"p\">,<\/span>\n                            <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span>\n                        <span class=\"p\">)<\/span>\n                    <span class=\"p\">)<\/span>\n                <span class=\"n\">rp_x<\/span><span class=\"p\">[<\/span><span class=\"n\">key<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">encoded_mode<\/span>\n\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">(<\/span><span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">values<\/span><span class=\"p\">()),<\/span> <span class=\"n\">axis<\/span><span class=\"o\">=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;rp_state_external_encoded&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Flatten batch-wise:<\/span>\n        <span class=\"n\">rp_x_shape_static<\/span> <span class=\"o\">=<\/span> <span class=\"n\">rp_x<\/span><span class=\"o\">.<\/span><span class=\"n\">get_shape<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">as_list<\/span><span class=\"p\">()<\/span>\n        <span class=\"n\">rp_x<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">reshape<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_batch_size<\/span><span class=\"p\">,<\/span> <span class=\"n\">np<\/span><span class=\"o\">.<\/span><span class=\"n\">prod<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x_shape_static<\/span><span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">:])<\/span> <span class=\"o\">*<\/span> <span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_sequence_size<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">)])<\/span>\n\n        <span class=\"c1\"># RP output:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">rp_logits<\/span> <span class=\"o\">=<\/span> <span class=\"n\">dense_rp_network<\/span><span class=\"p\">(<\/span><span class=\"n\">rp_x<\/span><span class=\"p\">,<\/span> <span class=\"n\">linear_layer_ref<\/span><span class=\"o\">=<\/span><span class=\"n\">linear_layer_ref<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># Batch-norm related:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">update_ops<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">UPDATE_OPS<\/span><span class=\"p\">)<\/span>\n        <span class=\"c1\"># Add moving averages to save list:<\/span>\n        <span class=\"n\">moving_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*moving.*&#39;<\/span><span class=\"p\">)<\/span>\n        <span class=\"n\">renorm_var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">GLOBAL_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"o\">+<\/span> <span class=\"s1\">&#39;.*renorm.*&#39;<\/span><span class=\"p\">)<\/span>\n\n        <span class=\"c1\"># What to save:<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_collection<\/span><span class=\"p\">(<\/span><span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">GraphKeys<\/span><span class=\"o\">.<\/span><span class=\"n\">TRAINABLE_VARIABLES<\/span><span class=\"p\">,<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_variable_scope<\/span><span class=\"p\">()<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">var_list<\/span> <span class=\"o\">+=<\/span> <span class=\"n\">moving_var_list<\/span> <span class=\"o\">+<\/span> <span class=\"n\">renorm_var_list<\/span>\n\n        <span class=\"c1\"># Callbacks:<\/span>\n        <span class=\"k\">if<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">aux_estimate<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">pass<\/span>\n            <span class=\"c1\"># TEMP DISABLE: due to computation costs<\/span>\n            <span class=\"c1\"># do not use pixel change aux. task; otherwise enable lines 533 - 553 &amp; 640:<\/span>\n            <span class=\"k\">if<\/span> <span class=\"kc\">False<\/span><span class=\"p\">:<\/span>\n                <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">callback<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;pixel_change&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">get_pc_target<\/span><\/div>\n\n        <span class=\"c1\"># print(&#39;policy_debug_dict:\\n&#39;, self.debug)<\/span>\n\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy\">[docs]<\/a><span class=\"k\">class<\/span> <span class=\"nc\">AacStackedRL2Policy<\/span><span class=\"p\">(<\/span><span class=\"n\">StackedLstmPolicy<\/span><span class=\"p\">):<\/span>\n    <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">    Attempt to implement two-level RL^2<\/span>\n<span class=\"sd\">    This policy class in conjunction with DataDomain classes from btgym.datafeed<\/span>\n<span class=\"sd\">    is aimed to implement RL^2 algorithm by Duan et al.<\/span>\n\n<span class=\"sd\">    Paper:<\/span>\n<span class=\"sd\">    `FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING`,<\/span>\n<span class=\"sd\">    https://arxiv.org/pdf/1611.02779.pdf<\/span>\n\n<span class=\"sd\">    The only difference from Base policy is `get_initial_features()` method, which has been changed<\/span>\n<span class=\"sd\">    either to reset RNN context to zero-state or return context from the end of previous episode,<\/span>\n<span class=\"sd\">    depending on episode metadata received or `lstm_2_init_period&#39; parameter.<\/span>\n<span class=\"sd\">    &quot;&quot;&quot;<\/span>\n    <span class=\"k\">def<\/span> <span class=\"nf\">__init__<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">lstm_2_init_period<\/span><span class=\"o\">=<\/span><span class=\"mi\">50<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span>\n        <span class=\"nb\">super<\/span><span class=\"p\">(<\/span><span class=\"n\">AacStackedRL2Policy<\/span><span class=\"p\">,<\/span> <span class=\"bp\">self<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"fm\">__init__<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"o\">-<\/span><span class=\"mi\">1<\/span>  <span class=\"c1\"># always give initial context at first call<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">=<\/span> <span class=\"n\">lstm_2_init_period<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">=<\/span> <span class=\"mi\">0<\/span>\n\n<div class=\"viewcode-block\" id=\"AacStackedRL2Policy.get_initial_features\"><a class=\"viewcode-back\" href=\"../../../../btgym.algorithms.policy.html#btgym.algorithms.policy.stacked_lstm.AacStackedRL2Policy.get_initial_features\">[docs]<\/a>    <span class=\"k\">def<\/span> <span class=\"nf\">get_initial_features<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"p\">,<\/span> <span class=\"n\">state<\/span><span class=\"p\">,<\/span> <span class=\"n\">context<\/span><span class=\"o\">=<\/span><span class=\"kc\">None<\/span><span class=\"p\">):<\/span>\n        <span class=\"sd\">&quot;&quot;&quot;<\/span>\n<span class=\"sd\">        Returns RNN initial context.<\/span>\n<span class=\"sd\">        RNN_1 (lower) context is reset at every call.<\/span>\n\n<span class=\"sd\">        RNN_2 (upper) context is reset:<\/span>\n<span class=\"sd\">            - every `lstm_2_init_period&#39; episodes;<\/span>\n<span class=\"sd\">            - episode  initial `state` `trial_num` metadata has been changed form last call (new train trial started);<\/span>\n<span class=\"sd\">            - episode metatdata `type` is non-zero (test episode);<\/span>\n<span class=\"sd\">            - no context arg is provided (initial episode of training);<\/span>\n<span class=\"sd\">            - ... else carries context on to new episode;<\/span>\n\n<span class=\"sd\">        Episode metadata are provided by DataTrialIterator, which is shaping Trial data distribution in this case,<\/span>\n<span class=\"sd\">        and delivered through env.strategy as separate key in observation dictionary.<\/span>\n\n<span class=\"sd\">        Args:<\/span>\n<span class=\"sd\">            state:      initial episode state (result of env.reset())<\/span>\n<span class=\"sd\">            context:    last previous episode RNN state (last_context of runner)<\/span>\n\n<span class=\"sd\">        Returns:<\/span>\n<span class=\"sd\">            2_RNN zero-state tuple.<\/span>\n\n<span class=\"sd\">        Raises:<\/span>\n<span class=\"sd\">            KeyError if [`metadata`]:[`trial_num`,`type`] keys not found<\/span>\n<span class=\"sd\">        &quot;&quot;&quot;<\/span>\n        <span class=\"k\">try<\/span><span class=\"p\">:<\/span>\n            <span class=\"n\">sess<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tf<\/span><span class=\"o\">.<\/span><span class=\"n\">get_default_session<\/span><span class=\"p\">()<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"n\">sess<\/span><span class=\"o\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">on_lstm_init_state<\/span><span class=\"p\">))<\/span>\n            <span class=\"k\">if<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span> <span class=\"o\">!=<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">context<\/span> <span class=\"ow\">is<\/span> <span class=\"kc\">None<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;type&#39;<\/span><span class=\"p\">]<\/span>\\\n                    <span class=\"ow\">or<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">%<\/span> <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">lstm_2_init_period<\/span> <span class=\"o\">==<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Assume new/initial trial or test sample, reset_1, 2 context:<\/span>\n                <span class=\"k\">pass<\/span> <span class=\"c1\">#print(&#39;RL^2 policy context 1, 2 reset&#39;)<\/span>\n\n            <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n                <span class=\"c1\"># Asssume same training trial, keep context_2 same as received:<\/span>\n                <span class=\"n\">new_context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"o\">=<\/span> <span class=\"n\">context<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n                <span class=\"c1\">#print(&#39;RL^2 policy context 1, reset&#39;)<\/span>\n            <span class=\"c1\"># Back to tuple:<\/span>\n            <span class=\"n\">new_context<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">tuple<\/span><span class=\"p\">(<\/span><span class=\"n\">new_context<\/span><span class=\"p\">)<\/span>\n            <span class=\"c1\"># Keep trial number:<\/span>\n            <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_trial_num<\/span> <span class=\"o\">=<\/span> <span class=\"n\">state<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;metadata&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;trial_num&#39;<\/span><span class=\"p\">]<\/span>\n\n        <span class=\"k\">except<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">:<\/span>\n            <span class=\"k\">raise<\/span> <span class=\"ne\">KeyError<\/span><span class=\"p\">(<\/span>\n                <span class=\"s1\">&#39;RL^2 policy: expected observation state dict. to have keys [`metadata`]:[`trial_num`,`type`]; got: <\/span><span class=\"si\">{}<\/span><span class=\"s1\">&#39;<\/span><span class=\"o\">.<\/span>\n                <span class=\"nb\">format<\/span><span class=\"p\">(<\/span><span class=\"n\">state<\/span><span class=\"o\">.<\/span><span class=\"n\">keys<\/span><span class=\"p\">())<\/span>\n            <span class=\"p\">)<\/span>\n        <span class=\"bp\">self<\/span><span class=\"o\">.<\/span><span class=\"n\">current_ep_num<\/span> <span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n        <span class=\"k\">return<\/span> <span class=\"n\">new_context<\/span><\/div><\/div>\n\n<\/pre><\/div>\n\n           <\/div>\n           <div class=\"articleComments\">\n            \n           <\/div>\n          <\/div>\n          <footer>\n  \n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>\n        &copy; Copyright 2017, 2018, Andrew Muzikin.\n\n    <\/p>\n  <\/div>\n  Built with <a href=\"http://sphinx-doc.org/\">Sphinx<\/a> using a <a href=\"https://github.com/snide/sphinx_rtd_theme\">theme<\/a> provided by <a href=\"https://readthedocs.org\">Read the Docs<\/a>. \n\n<\/footer>\n\n        <\/div>\n      <\/div>\n\n    <\/section>\n\n  <\/div>\n  \n\n\n  \n\n    <script type=\"text/javascript\">\n        var DOCUMENTATION_OPTIONS = {\n            URL_ROOT:'../../../../',\n            VERSION:'0.0.7',\n            COLLAPSE_INDEX:false,\n            FILE_SUFFIX:'.html',\n            HAS_SOURCE:  true,\n            SOURCELINK_SUFFIX: '.txt'\n        };\n    <\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/jquery.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/underscore.js\"><\/script>\n      <script type=\"text/javascript\" src=\"../../../../_static/doctools.js\"><\/script>\n      <script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"><\/script>\n\n  \n\n  \n  \n    <script type=\"text/javascript\" src=\"../../../../_static/js/theme.js\"><\/script>\n  \n\n  \n  \n  <script type=\"text/javascript\">\n      jQuery(function () {\n          SphinxRtdTheme.StickyNav.enable();\n      });\n  <\/script>\n   \n\n<\/body>\n<\/html>","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FA2A:386840:186946:5ECD18:6AB92C4A"},"text_sha256":"5e788770ddcf747535b35c46837652c00b90ea670130ad6cc64d261c25e0d5cb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"eleurent/rl-agents","input_row":{"repository":"eleurent/rl-agents","url":"https://github.com/eleurent/rl-agents","name":"rl-agents","owner":"eleurent","description":"Implementations of Reinforcement Learning and Planning algorithms","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":728,"issues":103,"created_at":"2017-06-05T20:53:59Z","updated_at":"2026-09-27T08:41:13Z","first_commit_at":"2017-06-02T19:30:44Z","last_commit_at":"2024-01-13T14:04:29Z","activity_months":79.359999999999999,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:36.466Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"eleurent/rl-agents","visibility":"public","created_at":"2017-06-05T20:53:59Z","updated_at":"2026-09-27T08:41:13Z","private":false,"fork":false,"archived":false,"stargazers_count":728,"open_issues_count":39,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1933","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AC:6C9BF:180EE96:1C353D6:6AB92C4C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1932","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:180EEDF:1C3542B:6AB92C4C"},"commit":{"sha":"2e15fb4de0d25ec732dfa36ba21043e113262b53","url":"https://github.com/eleurent/rl-agents/commit/2e15fb4de0d25ec732dfa36ba21043e113262b53","date":"2018-05-24T23:06:46Z","author_date":"2018-05-24T23:06:46Z","committer_date":"2018-05-24T23:06:46Z","tree_sha":"162d447a19e0f3def1fe080b99d13291e55d5f32","message_first_line":"Use a separate directory for each agent"},"tree_request_status":200,"tree_rate":{"github_remaining":"1931","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08ED:74C18:18163BA:1C3CBA5:6AB92C4D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1625,"blob_sha":"ac9d82878d552b9e588f901bd6dcf3ba0e17db53","priority":0}],"documents":[{"path":"README.md","size":1625,"blob_sha":"ac9d82878d552b9e588f901bd6dcf3ba0e17db53","priority":0,"status":200,"text":"# rl-agents\n\nA collection of Reinforcement Learning agents\n\n[![Build Status](https://travis-ci.org/eleurent/rl-agents.svg?branch=master)](https://travis-ci.org/eleurent/rl-agents/)\n\n## Installation\n\n`pip install --user git+https://github.com/eleurent/rl-agents`\n\n## Usage\n\n```python\nimport gym\nfrom rl_agents.agents.dqn.dqn_pytorch import DQNPytorchAgent\nfrom rl_agents.trainer.simulation import Simulation\n\n# Make a gym environment\nenv = gym.make('your-env')\n# Create a new agent, here a DQN running on PyTorch\nagent = DQNPytorchAgent(env)\n# Train the agent and monitor its performances\nsim = Simulation(env, agent, num_episodes=200)\nsim.train()\n```\n\n## Agents\n\nThe following agents are currently implemented:\n\n### [Double DQN](rl_agents/agents/dqn)\n\nA neural-network model is used to estimate the state-action value function and produce a greedy optimal policy.\n\nReferences:\n* [Playing Atari with Deep Reinforcement Learning](https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf), Mnih V. et al, 2013\n* [Deep Reinforcement Learning with Double Q-learning](https://arxiv.org/abs/1509.06461), van Hasselt H. et al, 2015.\n\n### [Monte Carlo Tree Search](rl_agents/agents/tree_search/mcts.py)\n\nA world transition model is leveraged for trajectory search. A search tree is expanded by efficient random sampling so as to focus the search around the most promising moves.\n\nReferences:\n* [Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search](https://hal.inria.fr/inria-00116992/document), Coulom R., 2006.\n* [Bandit based Monte-Carlo Planning](http://ggp.stanford.edu/readings/uct.pdf), Kocsis L., Szepesvári C., 2006.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E1A0:40CE8:180A71:5E6D66:6AB92C4C"},"text_sha256":"b465d71094af9d2d15fa52b5798fefa01a056bd094a1f8720bbb64eeb34b7d9b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1930","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:17B344D:1BD8D42:6AB92C4D"},"commit":{"sha":"84df15ea977271e6a4d015f10f9f355f7e866890","url":"https://github.com/eleurent/rl-agents/commit/84df15ea977271e6a4d015f10f9f355f7e866890","date":"2024-01-13T14:04:29Z","author_date":"2024-01-13T14:04:29Z","committer_date":"2024-01-13T14:04:29Z","tree_sha":"b8e3a2ead269b6144e700173f53dec1b578b29f6","message_first_line":"Update build badge"},"tree_request_status":200,"tree_rate":{"github_remaining":"1929","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:18224AA:1C488AF:6AB92C4E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13307,"blob_sha":"3ce53bb90cff920f3d12b7b3ec1a3e36bebc4110","priority":0}],"documents":[{"path":"README.md","size":13307,"blob_sha":"3ce53bb90cff920f3d12b7b3ec1a3e36bebc4110","priority":0,"status":200,"text":"# rl-agents\n\nA collection of Reinforcement Learning agents\n\n[![build](https://github.com/eleurent/rl-agents/actions/workflows/build.yml/badge.svg)](https://github.com/eleurent/rl-agents/actions/workflows/build.yml)\n\n* [Installation](#installation)\n* [Usage](#usage)\n* [Monitoring](#monitoring)\n* [Agents](#agents)\n  * Planning\n    * [Value Iteration](#vi-value-iteration)\n    * [Cross-Entropy Method](#cem-cross-entropy-method)\n    * Monte-Carlo Tree Search\n      * [Upper Confidence Trees](#uct-upper-confidence-bounds-applied-to-trees)\n      * [Deterministic Optimistic Planning](#opd-optimistic-planning-for-deterministic-systems)\n      * [Open Loop Optimistic Planning](#olop-open-loop-optimistic-planning)\n      * [Trailblazer](#trailblazer)\n      * [PlaTγPOOS](#plaTγpoos)\n  * Safe planning\n    * [Robust Value Iteration](#rvi-robust-value-iteration)\n    * [Discrete Robust Optimistic Planning](#drop-discrete-robust-optimistic-planning)\n    * [Interval-based Robust Planning](#irp-interval-based-robust-planning)\n  * Value-based\n    * [Deep Q-Network](#dqn-deep-q-network)\n    * [Fitted-Q](#ftq-fitted-q)\n  * Safe value-based\n    * [Budgeted Fitted-Q](#bftq-budgeted-fitted-q)\n* [Citing](#citing) \n\n# Installation\n\n`pip install --user git+https://github.com/eleurent/rl-agents`\n\n\n# Usage\n\nMost experiments can be started by moving to \n`cd scripts` and running `python experiments.py`\n\n```\nUsage:\n  experiments evaluate <environment> <agent> (--train|--test)\n                                             [--episodes <count>]\n                                             [--seed <str>]\n                                             [--analyze]\n  experiments benchmark <benchmark> (--train|--test)\n                                    [--processes <count>]\n                                    [--episodes <count>]\n                                    [--seed <str>]\n  experiments -h | --help\n\nOptions:\n  -h --help            Show this screen.\n  --analyze            Automatically analyze the experiment results.\n  --episodes <count>   Number of episodes [default: 5].\n  --processes <count>  Number of running processes [default: 4].\n  --seed <str>         Seed the environments and agents.\n  --train              Train the agent.\n  --test               Test the agent.\n```\n\nThe `evaluate` command allows to evaluate a given agent on a given environment. For instance,\n\n```bash\n# Train a DQN agent on the CartPole-v0 environment\n$ python3 experiments.py evaluate configs/CartPoleEnv/env.json configs/CartPoleEnv/DQNAgent.json --train --episodes=200\n```\n\nEvery agent interacts with the environment following a standard interface:\n```python\naction = agent.act(state)\nnext_state, reward, done, info = env.step(action)\nagent.record(state, action, reward, next_state, done, info)\n```\n\nThe environments are described by their [gym](https://github.com/openai/gym) `id`, and module for registration.\n```JSON\n{\n    \"id\": \"CartPole-v0\",\n    \"import_module\": \"gym\"\n}\n```\n\nAnd the agents by their class, and configuration dictionary.\n\n```JSON\n{\n    \"__class__\": \"<class 'rl_agents.agents.deep_q_network.pytorch.DQNAgent'>\",\n    \"model\": {\n        \"type\": \"MultiLayerPerceptron\",\n        \"layers\": [512, 512]\n    },\n    \"gamma\": 0.99,\n    \"n_steps\": 1,\n    \"batch_size\": 32,\n    \"memory_capacity\": 50000,\n    \"target_update\": 1,\n    \"exploration\": {\n        \"method\": \"EpsilonGreedy\",\n        \"tau\": 50000,\n        \"temperature\": 1.0,\n        \"final_temperature\": 0.1\n    }\n}\n```\n\nIf keys are missing from these configurations, values in `agent.default_config()` will be used instead.\n\nFinally, a batch of experiments can be scheduled in a _benchmark_.\nAll experiments are then executed in parallel on several processes.\n\n```bash\n# Run a benchmark of several agents interacting with environments\n$ python3 experiments.py benchmark cartpole_benchmark.json --test --processes=4\n```\n\nA benchmark configuration file contains a list of environment configurations and a list of agent configurations.\n\n```JSON\n{\n    \"environments\": [\"envs/cartpole.json\"],\n    \"agents\": [\"agents/dqn.json\", \"agents/mcts.json\"]\n}\n```\n\n# Monitoring\n\nThere are several tools available to monitor the agent performances:\n* *Run metadata*: for the sake of reproducibility, the environment and agent configurations used for the run are merged and saved to a `metadata.*.json` file.\n* [*Gym Monitor*](https://github.com/openai/gym/blob/master/gym/wrappers/monitor.py): the main statistics (episode rewards, lengths, seeds) of each run are logged to an `episode_batch.*.stats.json` file. They can be automatically visualised by running `scripts/analyze.py`\n* [*Logging*](https://docs.python.org/3/howto/logging.html): agents can send messages through the standard python logging library. By default, all messages with log level _INFO_ are saved to a `logging.*.log` file. Add the option `scripts/experiments.py --verbose` to save with log level _DEBUG_.\n* [*Tensorboard*](https://github.com/lanpa/tensorboardX): by default, a tensoboard writer records information about useful scalars, images and model graphs to the run directory. It can be visualized by running:\n```tensorboard --logdir <path-to-runs-dir>```\n\n# Agents\n\nThe following agents are currently implemented:\n\n## Planning\n\n### [`VI` Value Iteration](rl_agents/agents/dynamic_programming/value_iteration.py)\n\nPerform a Value Iteration to compute the state-action value, and acts greedily with respect to it.\n\nOnly compatible with [finite-mdp](https://github.com/eleurent/finite-mdp) environments, or environments that handle an `env.to_finite_mdp()` conversion method.\n\nReference: [Dynamic Programming](https://press.princeton.edu/titles/9234.html), Bellman R., Princeton University Press (1957).\n\n### [`CEM` Cross-Entropy Method](rl_agents/agents/cross_entropy_method/cem.py)\n\nA sampling-based planning algorithm, in which sequences of actions are drawn from a prior gaussian distribution. This distribution is iteratively bootstraped by minimizing its cross-entropy to a target distribution approximated by the top-k candidates.\n\nOnly compatible with continuous action spaces. The environment is used as an oracle dynamics and reward model. \n\nReference: [A Tutorial on the Cross-Entropy Method](web.mit.edu/6.454/www/www_fall_2003/gew/CEtutorial.pdf), De Boer P-T., Kroese D.P, Mannor S. and Rubinstein R.Y. (2005).\n\n### `MCTS` Monte-Carlo Tree Search\n\nA world transition model is leveraged for trajectory search. A look-ahead tree is expanded so as to explore the trajectory space and quickly focus around the most promising moves.\n\nReferences:\n* [Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search](https://hal.inria.fr/inria-00116992/document), Coulom R., 2006.\n\n#### [`UCT` Upper Confidence bounds applied to Trees](rl_agents/agents/tree_search/mcts.py)\nThe tree is traversed by iteratively applying an optimistic selection rule at each depth, and the value at leaves is estimated by sampling.\nEmpirical evidence shows that this popular algorithms performs well in many applications, but it has been proved theoretically to achieve a much worse performance (doubly-exponential) than uniform planning in some problems.\n\nReferences:\n* [Bandit based Monte-Carlo Planning](http://ggp.stanford.edu/readings/uct.pdf), Kocsis L., Szepesvári C. (2006).\n* [Bandit Algorithms for Tree Search](https://hal.inria.fr/inria-00136198v2), Coquelin P-A., Munos R. (2007).\n\n#### [`OPD` Optimistic Planning for Deterministic systems](rl_agents/agents/tree_search/deterministic.py)\nThis algorithm is tailored for systems with deterministic dynamics and rewards.\nIt exploits the reward structure to achieve a polynomial rate on regret, and behaves efficiently in numerical experiments with dense rewards.\n\nReference: [Optimistic Planning for Deterministic Systems](https://hal.inria.fr/hal-00830182), Hren J., Munos R. (2008).\n\n#### [`OLOP` Open Loop Optimistic Planning](rl_agents/agents/tree_search/olop.py)\n\nReferences: \n* [Open Loop Optimistic Planning](http://sbubeck.com/COLT10_BM.pdf), Bubeck S., Munos R. (2010).\n* [Practical Open-Loop Optimistic Planning](https://arxiv.org/abs/1904.04700), Leurent E., Maillard O.-A. (2019).\n\n#### [Trailblazer](rl_agents/agents/tree_search/trailblazer.py)\n\nReference: [Blazing the trails before beating the path: Sample-efficient Monte-Carlo planning](http://researchers.lille.inria.fr/~valko/hp/serve.php?what=publications/grill2016blazing.pdf), Grill J. B., Valko M., Munos R. (2017).\n\n#### [PlaTγPOOS](rl_agents/agents/tree_search/platypoos.py)\n\nReference: [Scale-free adaptive planning for deterministic dynamics & discounted rewards](http://researchers.lille.inria.fr/~valko/hp/publications/bartlett2019scale-free.pdf), Bartlett P., Gabillon V., Healey J., Valko M. (2019).\n\n\n## Safe planning\n\n### [`RVI` Robust Value Iteration](rl_agents/agents/dynamic_programming/robust_value_iteration.py)\n\nA list of possible [finite-mdp](https://github.com/eleurent/finite-mdp) models is provided in the agent configuration. The MDP ambiguity set is constrained to be rectangular: different models can be selected at every transition.The corresponding robust state-action value is computed so as to maximize the worst-case total reward.\n\nReferences:\n* [Robust Control of Markov Decision Processes with Uncertain Transition Matrices](https://people.eecs.berkeley.edu/~elghaoui/pdffiles/rmdp_erl.pdf), Nilim A., El Ghaoui L. (2005).\n* [Robust Dynamic Programming](http://www.corc.ieor.columbia.edu/reports/techreports/tr-2002-07.pdf), Iyengar G. (2005).\n* [Robust Markov Decision Processes](http://www.optimization-online.org/DB_FILE/2010/05/2610.pdf), Wiesemann W. et al. (2012).\n\n### [`DROP` Discrete Robust Optimistic Planning](rl_agents/agents/robust/robust.py)\n\nThe MDP ambiguity set is assumed to be finite, and is constructed from a list of modifiers to the true environment.\nThe corresponding robust value is approximately computed by [Deterministic Optimistic Planning](#deterministic-optimistic-planning) so as to maximize the worst-case total reward.\n\nReferences:\n* [Approximate Robust Control of Uncertain Dynamical Systems](https://arxiv.org/abs/1903.00220), Leurent E. et al. (2018).\n\n### [`IRP` Interval-based Robust Planning](rl_agents/agents/robust/robust.py)\n\nWe assume that the MDP is a parametrized dynamical system, whose parameter is uncertain and lies in a continuous ambiguity set. We use interval prediction to compute the set of states that can be reached at any time _t_, given that uncertainty, and leverage it to evaluate and improve a robust policy.\n\nIf the system is Linear Parameter-Varying (LPV) with polytopic uncertainty, an fast and stable interval predictor can be designed. Otherwise, sampling-based approaches can be used instead, with an increased computational load.\n\nReferences:\n* [Approximate Robust Control of Uncertain Dynamical Systems](https://arxiv.org/abs/1903.00220), Leurent E. et al. (2018).\n* [Interval Prediction for Continuous-Time Systems with Parametric Uncertainties](https://arxiv.org/abs/1904.04727), Leurent E. et al (2019).\n\n## Value-based\n\n### [`DQN` Deep Q-Network](rl_agents/agents/deep_q_network)\n\nA neural-network model is used to estimate the state-action value function and produce a greedy optimal policy.\n\nImplemented variants:\n* Double DQN\n* Dueling architecture\n* N-step targets\n\nReferences:\n* [Playing Atari with Deep Reinforcement Learning](https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf), Mnih V. et al (2013).\n* [Deep Reinforcement Learning with Double Q-learning](https://arxiv.org/abs/1509.06461), van Hasselt H. et al. (2015).\n* [Dueling Network Architectures for Deep Reinforcement Learning](https://arxiv.org/abs/1511.06581), Wang Z. et al. (2015).\n\n### [`FTQ` Fitted-Q](rl_agents/agents/fitted_q)\n\nA Q-function model is trained by performing each step of Value Iteration as a supervised learning procedure applied to a batch\nof transitions covering most of the state-action space.\n\nReference: [Tree-Based Batch Mode Reinforcement Learning](http://www.jmlr.org/papers/volume6/ernst05a/ernst05a.pdf), Ernst D. et al (2005).\n\n## Safe Value-based\n\n### [`BFTQ` Budgeted Fitted-Q](rl_agents/agents/budgeted_ftq)\n\nAn adaptation of **`FTQ`** in the budgeted setting: we maximise the expected reward _r_ of a policy _π_ under the constraint that an expected cost _c_ remains under a given budget _β_.\nThe policy _π(a | s, _β_)_ is conditioned on this cost budget _β_, which can be changed online.\n\nTo that end, the Q-function model is trained to predict both the expected reward _Qr_ and the expected cost _Qc_ of the optimal constrained policy _π_. \n\nThis agent can only be used with environments that provide a cost signal in their `info` field:\n```\n>>> obs, reward, done, info = env.step(action)\n>>> info\n{'cost': 1.0}\n``` \n\nReference: [Budgeted Reinforcement Learning in Continuous State Space](https://arxiv.org/abs/1903.01004), Carrara N., Leurent E., Laroche R., Urvoy T., Maillard O-A., Pietquin O. (2019).\n\n# Citing\n\nIf you use this project in your work, please consider citing it with:\n```\n@misc{rl-agents,\n  author = {Leurent, Edouard},\n  title = {rl-agents: Implementations of Reinforcement Learning algorithms},\n  year = {2018},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/eleurent/rl-agents}},\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"209C:3E1C8:17F53D:5E5812:6AB92C4E"},"text_sha256":"126336de065a70db2080e48846ac5510cb95ae00de249f88306b6a7c9ec52d1f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"utilForever/RosettaStone","input_row":{"repository":"utilForever/RosettaStone","url":"https://github.com/utilForever/RosettaStone","name":"RosettaStone","owner":"utilForever","description":"Hearthstone simulator using C++ with some reinforcement learning","language":"C++","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":682,"issues":514,"created_at":"2017-05-19T14:41:26Z","updated_at":"2026-09-18T06:10:16Z","first_commit_at":"2017-05-19T14:41:27Z","last_commit_at":"2026-08-04T10:23:51Z","activity_months":110.51000000000001,"ai_ml_match_topics":"reinforcement-learning","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:39.069Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"utilForever/RosettaStone","visibility":"public","created_at":"2017-05-19T14:41:26Z","updated_at":"2026-09-18T06:10:16Z","private":false,"fork":false,"archived":false,"stargazers_count":682,"open_issues_count":215,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"1928","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087D:767EB:1801482:1C27EA8:6AB92C4F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1927","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C9:71E0C:17FD6AB:1C22845:6AB92C4F"},"commit":{"sha":"63f3eab6f5ac936b69d487d5441a4535dae16306","url":"https://github.com/utilForever/RosettaStone/commit/63f3eab6f5ac936b69d487d5441a4535dae16306","date":"2018-05-23T13:41:06Z","author_date":"2018-05-23T13:41:06Z","committer_date":"2018-05-23T13:41:06Z","tree_sha":"db147e3dbddb3ae2eb1a18710ff5b97c79e77620","message_first_line":"Fix 'pessimizing move' warning message"},"tree_request_status":200,"tree_rate":{"github_remaining":"1926","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:1803EEE:1C29B90:6AB92C4F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4034,"blob_sha":"6d9da0f7872319472d1f735a241feb38eaef61b8","priority":0}],"documents":[{"path":"README.md","size":4034,"blob_sha":"6d9da0f7872319472d1f735a241feb38eaef61b8","priority":0,"status":200,"text":"# Hearthstone++\n\n<img src=\"https://github.com/utilForever/Hearthstonepp/blob/master/Logo.png\" align=\"center\" width=256 height=256 />\n\nHearthstone++ is hearthstone simulator using C++ with some reinforcement learning.\n\n[![License](https://img.shields.io/badge/Licence-MIT-blue.svg)](https://github.com/utilForever/Hearthstonepp/blob/master/LICENSE) [![Build Status](https://travis-ci.org/utilForever/Hearthstonepp.svg?branch=master)](https://travis-ci.org/utilForever/Hearthstonepp/branches) [![Build status](https://ci.appveyor.com/api/projects/status/github/utilForever/Hearthstonepp?branch=master&svg=true)](https://ci.appveyor.com/project/utilForever/Hearthstonepp/branch/master) [![codecov](https://codecov.io/gh/utilForever/Hearthstonepp/branch/master/graph/badge.svg)](https://codecov.io/gh/utilForever/Hearthstonepp)\n\n## Key Features\n\n- Use JSON-based hearthstone card data\n- Support console/GUI hearthstone simulator\n- Apply to reinforcement learning with \"The Innkeeper\"\n- Reflect the latest meta (the trends of deck and class)\n\n## Cards Implementation\n\n- [ ] Aura, Enchantment & Trigger\n- [ ] Hero, Hero Power & Weapon\n- [ ] Battlecry & Deathrattle\n- [ ] Choose One & Combo\n- [ ] Spell Power\n- [ ] Inspire, Joust & Discover\n- [ ] Jade Golems (Jade Lotus)\n- [ ] Buffing Hand (Grimy Goons)\n- [ ] Excess Mana\n- [ ] Freeze, Stealth & Poisonous\n- [ ] Potions (Kabal) ex. Kazakus\n- [ ] Adapt\n- [ ] Quest\n- [ ] Spell Bender Phase\n- [ ] Spell Text Phase\n- [ ] Lifesteal\n\n### Basic & Classic\n\n- 0% Basic (133 Cards)\n- 0% Classic (239 Cards)\n\n### Adventures\n\n- 0% Curse of Naxxramas (30 Cards)\n- 0% Blackrock Mountain (31 Cards)\n- 0% The League of Explorers (45 Cards)\n- 0% One Night in Karazhan (45 Cards)\n\n### Expensions\n\n- 0% Goblins vs Gnomes (123 Cards)\n- 0% The Grand Tournament (132 Cards)\n- 0% Whispers of the Old Gods (134 Cards)\n- 0% Mean Streets of Gadgetzan (132 Cards)\n- 0% Journey to Un'Goro (135 Cards)\n- 0% Knights of the Frozen Throne (135 Cards)\n\n### Etc\n\n- 0% Hall of Fame (10 Cards)\n\n## Requirements\n\n- Visual Studio 2017\n\n## How To Contribute\n\nContributions are always welcome, either reporting issues/bugs or forking the repository and then issuing pull requests when you have completed some additional coding that you feel will be beneficial to the main project. If you are interested in contributing in a more dedicated capacity, then please contact me.\n\n## Contact\n\nYou can contact me via e-mail (utilForever at gmail.com). I am always happy to answer questions or help with any issues you might have, and please be sure to share any additional work or your creations with me, I love seeing what other people are making.\n\n## License\n\n<img align=\"right\" src=\"http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png\">\n\nThe class is licensed under the [MIT License](http://opensource.org/licenses/MIT):\n\nCopyright &copy; 2017 [Chris Ohk](http://www.github.com/utilForever), [Youngjoong Kim](https://github.com/revsic), and [Juyong Kim](https://github.com/stealstick).\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:17F735:5E5AFF:6AB92C4F"},"text_sha256":"4abeb797b0e6b24cdcdbcb8e02025d8c469389bea3f6483fa3a5f0ae30c8add4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1925","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:17FFDBB:1C264AD:6AB92C50"},"commit":{"sha":"09f4347e5402248a8ad2990b489e2d0b0e67bc55","url":"https://github.com/utilForever/RosettaStone/commit/09f4347e5402248a8ad2990b489e2d0b0e67bc55","date":"2026-06-23T00:45:08Z","author_date":"2026-06-23T00:45:08Z","committer_date":"2026-06-23T00:45:08Z","tree_sha":"e34c2d5fd74f4bed348ff1d9ddeced5c2ae054c2","message_first_line":"Merge pull request #932 from utilForever/codacy"},"tree_request_status":200,"tree_rate":{"github_remaining":"1924","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17DC095:1C02575:6AB92C51"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9968,"blob_sha":"aaf831617115eb868da9a6d5a58acad464300e35","priority":0}],"documents":[{"path":"README.md","size":9968,"blob_sha":"aaf831617115eb868da9a6d5a58acad464300e35","priority":0,"status":200,"text":"# RosettaStone\n\n<img src=\"./Medias/Logos/Logo.png\" width=256 height=256 />\n\n[![License](https://img.shields.io/badge/Licence-AGPLv3-blue.svg)](https://github.com/utilForever/RosettaStone/blob/main/LICENSE)\n![Windows](https://github.com/utilForever/RosettaStone/workflows/Windows/badge.svg)\n![Ubuntu](https://github.com/utilForever/RosettaStone/workflows/Ubuntu/badge.svg)\n![macOS](https://github.com/utilForever/RosettaStone/workflows/macOS/badge.svg)\n[![Discord](https://img.shields.io/discord/483192043737186335.svg)](https://discord.gg/6R3UueR)\n\n[![codecov](https://codecov.io/gh/utilForever/RosettaStone/branch/main/graph/badge.svg)](https://codecov.io/gh/utilForever/RosettaStone)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/df6a02e1358f4e719e7bebb9a728d2ab)](https://www.codacy.com/app/utilForever/RosettaStone?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=utilForever/RosettaStone&amp;utm_campaign=Badge_Grade)\n[![CodeFactor](https://www.codefactor.io/repository/github/utilforever/RosettaStone/badge)](https://www.codefactor.io/repository/github/utilforever/RosettaStone)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RosettaStone&metric=alert_status)](https://sonarcloud.io/dashboard?id=RosettaStone)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=RosettaStone&metric=ncloc)](https://sonarcloud.io/dashboard?id=RosettaStone)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=RosettaStone&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=RosettaStone)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=RosettaStone&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=RosettaStone)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=RosettaStone&metric=security_rating)](https://sonarcloud.io/dashboard?id=RosettaStone)\n\nRosettaStone is Hearthstone simulator using C++ with some reinforcement learning. The code is built on C++17 and can be compiled with commonly available compilers such as g++, clang++, or Microsoft Visual Studio. RosettaStone currently supports macOS (10.14 or later), Ubuntu (18.04 or later), Windows (Visual Studio 2017 or later), and Windows Subsystem for Linux (WSL). Other untested platforms that support C++17 also should be able to build RosettaStone.\n\n## Related Repositories\n\n  * [RosettaStone GUI](https://www.github.com/utilforever/RosettaStone-GUI)\n\n## Key Features\n\n  * C++17 based Hearthstone library\n  * Console and GUI simulator program\n  * C++ and Python API\n\n## To-do Features\n\n  * Upgrade \"The Innkeeper\" to smart\n  * Recommend top-tier decks\n  * Deck tracker\n  * Web simulator\n\n## Cards Implementation\n\n### Standard Format\n\n  * 98% Core Set (247 of 250 cards)\n  * 81% Forged in the Barrens (139 of 170 cards)\n  * 35% United in Stormwind (60 of 170 cards)\n  * 35% Fractured in Alterac Valley (61 of 170 cards)\n  * 12% Voyage to the Sunken City (22 of 170 cards)\n  * 10% Murder at Castle Nathria (17 of 170 cards)\n  * 0% March of the Lich King (0 of 1 cards)\n\n### Wild Format\n\n  * **100% Legacy (167 of 167 Cards)**\n  * **100% Expert1 (245 of 245 Cards)**\n  * **100% Demon Hunter Initiate (20 of 20 Cards)**\n  * **100% Curse of Naxxramas (30 of 30 Cards)**\n  * 6% Goblins vs Gnomes (8 of 123 Cards)\n  * **100% Blackrock Mountain (31 of 31 Cards)**\n  * 8% The Grand Tournament (11 of 132 Cards)\n  * **100% The League of Explorers (45 of 45 Cards)**\n  * 5% Whispers of the Old Gods (8 of 134 Cards)\n  * **100% One Night in Karazhan (45 of 45 Cards)**\n  * 2% Mean Streets of Gadgetzan (3 of 132 Cards)\n  * 7% Journey to Un'Goro (10 of 135 Cards)\n  * 4% Knights of the Frozen Throne (6 of 135 Cards)\n  * 5% Kobolds & Catacombs (7 of 135 Cards)\n  * 5% The Witchwood (8 of 135 Cards)\n  * 2% The Boomsday Project (4 of 136 Cards)\n  * 5% Rastakhan's Rumble (7 of 135 Cards)\n  * **100% Rise of Shadows (136 of 136 cards)**\n  * **99% Saviors of Uldum (134 of 135 cards)**\n    * Except 'Zephrys the Great' (ULD_003)\n  * **100% Descent of Dragons (140 of 140 cards)**\n  * 60% Galakrond's Awakening (21 of 35 cards)\n  * 60% Ashes of Outland (82 of 135 cards)\n  * 57% Scholomance Academy (78 of 135 cards)\n  * 46% Madness at the Darkmoon Faire (79 of 170 cards)\n\n### Classic Format\n\n  * **100% Vanilla Set (382 of 382 Cards)**\n\n## Implementation List\n\n  * [Ability list](./Documents/AbilityList.md)\n  * Card list\n    * [Standard Format](./Documents/CardList%20-%20Standard.md)\n    * [Wild Format](./Documents/CardList%20-%20Wild.md)\n    * [Classic Format](./Documents/CardList%20-%20Classic.md)\n  * [Task list](./Documents/TaskList.md)\n\n## Quick Start\n\nYou will need CMake to build the code. If you're using Windows, you need Visual Studio 2017 in addition to CMake.\n\nFirst, clone the code:\n\n```\ngit clone https://github.com/utilForever/RosettaStone.git --recursive\ncd RosettaStone\n```\n\n### Python API\n\nBuild and install the package by running\n\n```\npip install -U .\n```\n\n**NOTE**: We are making Python API and related examples.\n\n### C++ API\n\nFor macOS or Linux or Windows Subsystem for Linux (WSL):\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nFor Windows:\n\n```\nmkdir build\ncd build\ncmake .. -G\"Visual Studio 15 2017 Win64\"\nMSBuild RosettaStone.sln /p:Configuration=Release\n```\n\nNow run console simulator:\n\n```\nbin/RosettaConsole\n```\n\n**NOTE**: To run GUI simulator, please check out [RosettaStone GUI](https://www.github.com/utilforever/RosettaStone-GUI).\n\n### Docker\n\n```\ndocker pull utilforever/rosettastone:latest\n```\n\nNow run console simulator:\n\n```\ndocker run -it utilforever/rosettastone\n[inside docker container]\n/app/build/bin/RosettaConsole\n```\n\n### More Instructions of Building the Code\n\nTo learn how to build, test, and install the SDK, please check out [Install.md](./Documents/Install.md).\n\n## Documentation\n\nAll the documentations for the framework can be found from [the project website](https://utilforever.github.io/RosettaStone/) incluing the API reference.\n\n## Presentations\n\n  * [TFCON 2018 Poster Session](./Medias/Presentations/TFCON%202018%20-%20Hearthstone%2B%2B%2C%20Hearthstone%20Simulator%20with%20Reinforcement%20Learning.pdf)\n  * [NDC 2019](./Medias/Presentations/NDC%202019%20-%20Development%20Process%20of%20Hearthstone%20Reinforcement%20Learning%20Environment%20(Korean).pdf)\n\n## Videos\n  \n  * [NDC 2019](https://www.youtube.com/watch?v=yO9QRinXosE)\n\n## Sprints\n\n  * [PyCon Korea 2018 Sprint Session](https://archive.pycon.kr/2018/program/sprint/3)\n  * [Sprint Seoul - April 2019](https://sprintseoul.org/)\n\n## Articles\n\n  * NDC 2019\n    * [[NDC2019] 하스스톤을 위한 '알파고'를 만들 수는 없을까? - 인벤](http://www.inven.co.kr/webzine/news/?news=219330&site=hs)\n    * [[NDC 19] '알파고' 같은 하스스톤 인공지능을 만들기 위한 험난한 여정 - 디스이즈게임](http://www.thisisgame.com/webzine/gameevent/nboard/227/?n=93644)\n    * [[NDC2019 #11] 넥슨 프로그래머의 ‘하스스톤’ A·I 제작기 - 경향게임스](http://www.khgames.co.kr/news/articleView.html?idxno=118028)\n    * [[NDC 2019] 넥슨 프로그래머의 ‘하스스톤’ AI 도전기 - OSEN](http://www.osen.co.kr/article/G1111130399)\n\n## How To Contribute\n\nContributions are always welcome, either reporting issues/bugs or forking the repository and then issuing pull requests when you have completed some additional coding that you feel will be beneficial to the main project. If you are interested in contributing in a more dedicated capacity, then please check out [Contributing.md](./Documents/Contributing.md).\n\n  * [Code of Conduct](./Documents/CodeOfConduct.md)\n  * [Issues](./Documents/Issues.md)\n    * [How to Contribute in Issues](./Documents/Issues.md#how-to-contribute-in-issues)\n    * [Asking for General Help](./Documents/Issues.md#asking-for-general-help)\n    * [Submitting a Bug Report](./Documents/Issues.md#submitting-a-bug-report)\n    * [Triaging a Bug Report](./Documents/Issues.md#triaging-a-bug-report)\n    * [Resolving a Bug Report](./Documents/Issues.md#resolving-a-bug-report)\n  * [Pull request](./Documents/PullRequests.md)\n    * [Setting up your local environment](./Documents/PullRequests.md#setting-up-your-local-environment)\n    * [Making Changes](./Documents/PullRequests.md#making-changes)\n    * [How to add card](./Documents/HowToAddCard.md)\n    * [How to add task](./Documents/HowToAddTask.md)\n\n## Contact\n\nYou can contact me via e-mail (utilForever at gmail.com). I am always happy to answer questions or help with any issues you might have, and please be sure to share any additional work or your creations with me, I love seeing what other people are making.\n\n## Sponsors\n\n[![CppDepend](./Medias/Logos/CppDepend.png)](http://www.cppdepend.com)\n\n## License\n\n<img align=\"right\" src=\"http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png\">\n\nThe class is licensed under the [Affero GPLv3 License](https://opensource.org/licenses/AGPL-3.0):\n\nRosettaStone is based on part of Sabberstone's code\n\nCopyright &copy; 2017-2021 SabberStone Team, darkfriend77 & rnilva\n\nRosettaStone, Hearthstone simulator using C++ with some reinforcement learning\n\nCopyright &copy; 2017-2024 [Chris Ohk](https://github.com/utilForever)\n\nRosettaStone is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License. RosettaStone is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nHearthstone is an interactive game of Blizzard Entertainment, Inc and all rights reserved. Hearthstone is a registered trademark of Blizzard Entertainment, Inc. in the U.S. and/or other countries. This project is not affiliated with Blizzard Entertainment.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:17E4DD:5E4943:6AB92C4F"},"text_sha256":"4f9a3a37e3a379737a22dd98f40b2de5a6a150130a224bd9b0a7a43a9302a2cc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"BYU-PCCL/holodeck","input_row":{"repository":"BYU-PCCL/holodeck","url":"https://github.com/BYU-PCCL/holodeck","name":"holodeck","owner":"BYU-PCCL","description":"High Fidelity Simulator for Reinforcement Learning and Robotics Research.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":596,"issues":246,"created_at":"2016-10-07T22:12:04Z","updated_at":"2026-09-24T17:41:53Z","first_commit_at":"2016-02-05T22:58:14Z","last_commit_at":"2021-04-30T02:11:03Z","activity_months":62.75,"ai_ml_match_topics":"reinforcement-learning; computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:41.818Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"BYU-PCCL/holodeck","visibility":"public","created_at":"2016-10-07T22:12:04Z","updated_at":"2026-09-24T17:41:53Z","private":false,"fork":false,"archived":false,"stargazers_count":596,"open_issues_count":52,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1923","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0821:3BE445:179F80B:1BC47C6:6AB92C51"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1922","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B4:1B4E7A:17B9261:1BDF615:6AB92C52"},"commit":{"sha":"41c0d7d1e2d5cded62b7d338a07560e8f94dd695","url":"https://github.com/BYU-PCCL/holodeck/commit/41c0d7d1e2d5cded62b7d338a07560e8f94dd695","date":"2018-05-04T00:33:18Z","author_date":"2018-05-04T00:33:18Z","committer_date":"2018-05-04T00:33:18Z","tree_sha":"227f1146a70bd688c441da3580a87eb2b87649d7","message_first_line":"Update examples to include new features (#53)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1921","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090B:35C5DA:17B37DA:1BD914F:6AB92C52"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4067,"blob_sha":"bb4ce0ddbc30f44600c21ed95629a97140cf62fe","priority":0}],"documents":[{"path":"README.md","size":4067,"blob_sha":"bb4ce0ddbc30f44600c21ed95629a97140cf62fe","priority":0,"status":200,"text":"Holodeck is a high fidelity simulator for reinforcement learning built in the Unreal Engine.\nThese bindings provide a simple interface for communicating with prebuilt environments.\nCurrently only support Python3 in Windows and Linux.\n\n\n# Prerequisites\n* Python3\n* The following packages: `pip3 install numpy gym`\n* Platform specific dependencies below\n* About 3gb hard drive space (around 5gb needed during installation)\n\n### Linux\n* Posix ipc: `pip3 install posix_ipc`\n* OpenGL3 or 4\n\n### Windows\n* Holodeck on Windows requires pywin32:\n  * Navigate to https://sourceforge.net/projects/pywin32/files/pywin32/\n  * Choose the latest build and download the correct version (32 or 64 bit, and correct Python version).\n\n# Installation\n* Clone the repository `git clone https://github.com/byu-pccl/HolodeckPythonBinding`\n* Run the Python install script `python3 install.py`\n* Add the HOLODECKPATH environment variable (see below)\n* Add the HOLODECKPATH to your PYTHONPATH (see below)\n* `source .bashrc` or open a new terminal\n* Verify installation by opening python3 in terminal and running:\n```\nfrom Holodeck import Holodeck\nenv = Holodeck.make(\"MazeWorld\")\n```\nIf the world loads up then installation was successful\n\n## Adding Environment Variables\n### Linux\nAdd these lines to the end of your bashrc file:\n```\nexport HOLODECKPATH=\"/usr/local/Holodeck\"\nexport PYTHONPATH=\"${HOLODECKPATH}:${PYTHONPATH}\"\n```\nIf you didn't install at the default location, make sure to change it to the correct path.\n\n### Windows\nPress the windows button and start typing \"environment variables\". Click \"Edit the system environment variables\".\nPress the Environment Variables button.\nUnder the System variables section, click \"New\".\nVariableName = HOLODECKPATH\nVariableValue = your path to holodeck (default: C:\\Users\\user_name\\AppData\\Local\\Holodeck)\n\nThen, click on the PYTHONPATH variable, and add the Holodeck root directory to it.\n(If the PYTHONPATH variable isn't there, you should create it).\n\n# Usage\nThe quickest way to get acquainted with basic Holodeck use is to view the example.py file.\n\nThe Holodeck instance is designed in the same vein as OpenAI's Gym.\nAll you need is to import Holodeck `from Holodeck import Holodeck` and then create an environment with the make command:\n`env = Holodeck.make('MazeWorld')`.\n\nThe current world list is `MazeWorld`, `UrbanCity`, `EuropeanForest`, and `RedwoodForest`.\n\nEach environment contains an agent, and each agent has a specific number of sensors.\nThe default worlds currently contain 2 supported agents:\n* UAV - A quad-copter which takes as input target values for roll, pitch, yaw rate, and altitude.\n* DiscreteSphere - A basic robot that moves on a plane, with four moves: forward, backward, left, and right.\n\nUAV WORLDS\n* UrbanCity\n* EuropeanForest\n* RedwoodForest\n\nSPHERE ROBOT WORLDS\n* MazeWorld\n\nTo interact with the environment, you simply call `env.step(cmd)` where cmd is a command for the specific agent.\nEach agent has a different action space, which are detailed below.\nThe step function returns a tuple of `(state, reward, terminal, info)`.\nThe state is a dictionary of sensor enum to sensor value.\nReward is the reward received from the previous action, and terminal indicates whether the current state is a terminal state.\nInfo contains additional environment specific information.\nThe sensors for each agent are also indicated below.\n\n## UAV\nThe UAV's action space is as follows:\n```\n[roll_target, pitch_target, yaw_rate_target, altitude_target]\n```\nIt contains the following sensors:\n* PrimaryPlayerCamera\n* OrientationSensor\n* LocationSensor\n* VelocitySensor\n* IMUSensor\n\n\n## DiscreteSphereRobot\nThe DiscreteSphereRobot takes in an index of one of four actions:\n* 0: Move Forward\n* 1: Move Backward\n* 2: Turn Right\n* 3: Turn Left\n\nIt contains the following sensors:\n* PrimaryPlayerCamera\n* OrientationSensor\n* LocationSensor\n\n# Using OpenGL3 in Linux\nTo use OpenGL3 in linux, change the argument in Holodeck.make:\n```\nfrom Holodeck import Holodeck\nenv = Holodeck.make(\"MazeWorld\", Holodeck.GL_VERSION.OPENGL3)\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B2C8:B08CF:175510:5DB9F8:6AB92C52"},"text_sha256":"2222b8d8a2374d93dd758697eeb07c2b76ba214ee475b630db01efe99322d7f0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1920","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:17AD5E7:1BD3281:6AB92C53"},"commit":{"sha":"521c1c828f47abe7fc24b027fb907eaf26495aed","url":"https://github.com/BYU-PCCL/holodeck/commit/521c1c828f47abe7fc24b027fb907eaf26495aed","date":"2021-04-30T02:11:03Z","author_date":"2021-04-30T02:11:03Z","committer_date":"2021-04-30T02:11:03Z","tree_sha":"6fc341b3758ff81a7fb9fb4ff60d449a22adac52","message_first_line":"Merge pull request #445 from BYU-PCCL/error-handling"},"tree_request_status":200,"tree_rate":{"github_remaining":"1919","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A2:62B94:17CD39B:1BF3734:6AB92C53"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4883,"blob_sha":"a99bd7e567940a99c1910dfc7778f253ba8318cd","priority":0}],"documents":[{"path":"README.md","size":4883,"blob_sha":"a99bd7e567940a99c1910dfc7778f253ba8318cd","priority":0,"status":200,"text":"# Holodeck\n\n[![Holodeck Video](docs/images/sunrise_Moment.jpg)](https://www.youtube.com/watch?v=_huewiGqfrs)\n\n[![Read the docs badge](https://readthedocs.org/projects/holodeck/badge/)](https://holodeck.readthedocs.io/en/develop/) ![Build Status](https://jenkins.holodeck.ml/buildStatus/icon?job=holodeck-engine%2Fdevelop)\n\nHolodeck is a high-fidelity simulator for reinforcement learning built on top of Unreal Engine 4.\n\n## Features\n - 7+ rich worlds for training agents in, and many scenarios for those worlds\n - Linux and Windows support\n - Easily extend and modify training scenarios\n - Train and control more than one agent at once\n - Simple, OpenAI Gym-like Python interface\n - High performance - simulation speeds of up to 2x real time are possible. Performance penalty only for what you need\n - Run headless or watch your agents learn\n\n### Questions? [Join our Discord!](https://discord.gg/Xqqksje)\n\n## Installation\n`pip install holodeck`\n\n(requires >= Python 3.5)\n\nSee [Installation](https://holodeck.readthedocs.io/en/latest/usage/installation.html) for complete instructions (including Docker).\n\n## Documentation\n* [Quickstart](https://holodeck.readthedocs.io/en/latest/usage/getting-started.html)\n* [Changelog](https://holodeck.readthedocs.io/en/latest/changelog/changelog.html)\n* [Examples](https://holodeck.readthedocs.io/en/latest/usage/getting-started.html#code-examples)\n* [Agents](https://holodeck.readthedocs.io/en/latest/agents/agents.html)\n* [Sensors](https://holodeck.readthedocs.io/en/latest/holodeck/sensors.html)\n* [Available Packages and Worlds](https://holodeck.readthedocs.io/en/latest/packages/packages.html)\n* [Docs](https://holodeck.readthedocs.io/en/latest/)\n\n## Usage Overview\nHolodeck's interface is similar to [OpenAI's Gym](https://gym.openai.com/). \n\nWe try and provide a batteries included approach to let you jump right into using Holodeck, with minimal\nfiddling required.\n\nTo demonstrate, here is a quick example using the `DefaultWorlds` package:\n\n```python\nimport holodeck\n\n# Load the environment. This environment contains a UAV in a city.\nenv = holodeck.make(\"UrbanCity-MaxDistance\")\n\n# You must call `.reset()` on a newly created environment before ticking/stepping it\nenv.reset()                         \n\n# The UAV takes 3 torques and a thrust as a command.\ncommand = [0, 0, 0, 100]   \n\nfor i in range(30):\n    state, reward, terminal, info = env.step(command)  \n```\n\n- `state`: dict of sensor name to the sensor's value (nparray).\n- `reward`: the reward received from the previous action\n- `terminal`: indicates whether the current state is a terminal state.\n- `info`: contains additional environment specific information.\n\nIf you want to access the data of a specific sensor, import sensors and\nretrieving the correct value from the state dictionary:\n\n```python\nprint(state[\"LocationSensor\"])\n```\n\n## Multi Agent-Environments\nHolodeck supports multi-agent environments.\n\nCalls to [`step`](https://holodeck.readthedocs.io/en/latest/holodeck/environments.html#holodeck.environments.HolodeckEnvironment.step) only provide an action for the main agent, and then tick the simulation. \n\n[`act`](https://holodeck.readthedocs.io/en/latest/holodeck/environments.html#holodeck.environments.HolodeckEnvironment.act) provides a persistent action for a specific agent, and does not tick the simulation. After an \naction has been provided, [`tick`](https://holodeck.readthedocs.io/en/latest/holodeck/environments.html#holodeck.environments.HolodeckEnvironment.tick) will advance the simulation forward. The action is persisted until another call to `act` provides a different action.\n\n```python\nimport holodeck\nimport numpy as np\n\nenv = holodeck.make(\"CyberPunkCity-Follow\")\nenv.reset()\n\n# Provide an action for each agent\nenv.act('uav0', np.array([0, 0, 0, 100]))\nenv.act('nav0', np.array([0, 0, 0]))\n\n# Advance the simulation\nfor i in range(300):\n  # The action provided above is repeated\n  states = env.tick()\n```\n\nYou can access the reward, terminal and location for a multi agent environment as follows:\n\n```python\ntask = states[\"uav0\"][\"FollowTask\"]\n\nreward = task[0]\nterminal = task[1]\nlocation = states[\"uav0\"][\"LocationSensor\"]\n```\n\n(`uav0` comes from the [scenario configuration file](https://holodeck.readthedocs.io/en/latest/packages/docs/scenarios.html))\n\n## Running Holodeck Headless\nHolodeck can run headless with GPU accelerated rendering. See [Using Holodeck Headless](https://holodeck.readthedocs.io/en/latest/usage/running-headless.html)\n\n## Citation:\n```\n@misc{HolodeckPCCL,\n  Author = {Joshua Greaves and Max Robinson and Nick Walton and Mitchell Mortensen and Robert Pottorff and Connor Christopherson and Derek Hancock and Jayden Milne and David Wingate},\n  Title = {Holodeck: A High Fidelity Simulator},\n  Year = {2018},\n}\n```\n\nHolodeck is a project of BYU's Perception, Cognition and Control Lab (https://pcc.cs.byu.edu/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17E42A:5E4923:6AB92C54"},"text_sha256":"3c050c9839e8bb5c8589ef0c4381619bdba7b581d9a549fb1cfbdc676074e4e1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"realsenseai/librealsense","input_row":{"repository":"realsenseai/librealsense","url":"https://github.com/realsenseai/librealsense","name":"librealsense","owner":"realsenseai","description":"RealSense SDK","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9042,"issues":10227,"created_at":"2015-11-17T20:42:18Z","updated_at":"2026-09-26T14:25:13Z","first_commit_at":"2015-07-19T04:32:10Z","last_commit_at":"2026-08-30T10:44:52Z","activity_months":133.38999999999999,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:44.666Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"realsenseai/librealsense","visibility":"public","created_at":"2015-11-17T20:42:18Z","updated_at":"2026-09-26T14:25:13Z","private":false,"fork":false,"archived":false,"stargazers_count":9042,"open_issues_count":477,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1918","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091B:72BD3:1807AAB:1C2DF23:6AB92C54"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1917","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:1791BEB:1BB81F9:6AB92C55"},"commit":{"sha":"95eba49e12d2256edeb15b9e5918bd9d74486fb0","url":"https://github.com/realsenseai/librealsense/commit/95eba49e12d2256edeb15b9e5918bd9d74486fb0","date":"2018-05-24T13:53:15Z","author_date":"2018-05-24T13:53:15Z","committer_date":"2018-05-24T13:53:15Z","tree_sha":"379280984dba35a36cf6767f52afe1809c247f58","message_first_line":"Update installation instruction to be consistent with the up-to date spec."},"tree_request_status":200,"tree_rate":{"github_remaining":"1916","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17D8433:1BFE643:6AB92C55"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":6426,"blob_sha":"ad861c429c36d91f1f4ec29b6cd1749beac0b0b1","priority":0}],"documents":[{"path":"readme.md","size":6426,"blob_sha":"ad861c429c36d91f1f4ec29b6cd1749beac0b0b1","priority":0,"status":200,"text":"<p align=\"center\"><img src=\"doc/img/realsense.png\" width=\"70%\" /><br><br><\/p>\n\n-----------------\n\nLinux/MacOS | Windows |\n-------- | ------------ |\n[![Build Status](https://travis-ci.org/IntelRealSense/librealsense.svg?branch=development)](https://travis-ci.org/IntelRealSense/librealsense) | [![Build status](https://ci.appveyor.com/api/projects/status/6u04bgmpwfejpgo8?svg=true)](https://ci.appveyor.com/project/dorodnic/librealsense-s4xnv) |\n\n-----------------\n\n## Overview\n**Intel® RealSense™ SDK 2.0** is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). \n\n> :pushpin: For other Intel® RealSense™ devices (F200, R200, LR200 and ZR300), please refer to the [latest legacy release](https://github.com/IntelRealSense/librealsense/tree/v1.12.1).\n\nThe SDK allows depth and color streaming, and provides intrinsic and extrinsic calibration information.\nThe library also offers synthetic streams (pointcloud, depth aligned to color and vise-versa), and a built-in support for [record and playback](./src/media/readme.md) of streaming sessions.\n\nDeveloper kits containing the necessary hardware to use this library are available for purchase at [realsense.intel.com/buy](https://realsense.intel.com/buy).\nInformation about the Intel® RealSense™ technology at [realsense.intel.com](https://realsense.intel.com)\n\n> :open_file_folder: Don't have access to a RealSense camera? Check-out [sample data](./doc/sample-data.md)\n\n## Download and Install\n* **Download** - The latest releases including the Intel RealSense SDK, Viewer and Depth Quality tools are available at: [**latest releases**](https://github.com/IntelRealSense/librealsense/releases). Please check the [**release notes**](https://github.com/IntelRealSense/librealsense/wiki/Release-Notes) for the supported platforms, new features and capabilities, known issues, how to upgrade the Firmware and more.\n\n* **Install** - You can also install or build from source the SDK (on [Linux](./doc/distribution_linux.md) \\ [Windows](./doc/distribution_windows.md) \\ [Mac OS](doc/installation_osx.md)), connect your D400 depth camera and you are ready to start writing your first application.\n\n> **Support & Issues**: If you need product support (e.g. ask a question about / are having problems with the device), please check the [FAQ & Troubleshooting](https://github.com/IntelRealSense/librealsense/wiki/Troubleshooting-Q%26A) section.\n> If not covered there, please search our [Closed GitHub Issues](https://github.com/IntelRealSense/librealsense/issues?utf8=%E2%9C%93&q=is%3Aclosed) page,  [Community](https://communities.intel.com/community/tech/realsense) and [Support](https://www.intel.com/content/www/us/en/support/emerging-technologies/intel-realsense-technology.html) sites.\n> If you still cannot find an answer to your question, please [open a new issue](https://github.com/IntelRealSense/librealsense/issues/new).\n\n## What’s included in the SDK:\n| What | Description | Download link|\n| ------- | ------- | ------- |\n| **[Intel® RealSense™ Viewer](./tools/realsense-viewer)** | With this application, you can quickly access your Intel® RealSense™ Depth Camera to view the depth stream, visualize point clouds, record and playback streams, configure your camera settings, modify advanced controls, enable depth visualization and post processing  and much more. | [**Intel.RealSense.Viewer.exe**](https://github.com/IntelRealSense/librealsense/releases) |\n| **[Depth Quality Tool](./tools/depth-quality)** | This application allows you to test the camera’s depth quality, including: standard deviation from plane fit, normalized RMS – the subpixel accuracy, distance accuracy and fill rate. You should be able to easily get and interpret several of the depth quality metrics and record and save the data for offline analysis. |[**Depth.Quality.Tool.exe**](https://github.com/IntelRealSense/librealsense/releases) |\n| **[Other Debug Tools](./tools/)** | Device enumeration, FW logger, etc as can be seen at the tools directory | Included in [**Intel.RealSense.SDK.exe**](https://github.com/IntelRealSense/librealsense/releases)|\n| **[Code Samples to Start Prototyping Quickly](./examples)** |These simple examples demonstrate how to easily use the SDK to include code snippets that access the camera into your applications. Check some of the [**C++ examples**](./examples) including capture, pointcloud and more and basic [**C examples**](./examples/C) | Included in [**Intel.RealSense.SDK.exe**](https://github.com/IntelRealSense/librealsense/releases) |\n| **[Wrappers](https://github.com/IntelRealSense/librealsense/tree/development/wrappers)** | [Python](./wrappers/python), [.NET](./wrappers/csharp), [Node.js](./wrappers/nodejs) API, as well as integration with the following 3rd-party technologies: [ROS](https://github.com/intel-ros/realsense/releases), [LabVIEW](./wrappers/labview), [OpenCV](./wrappers/opencv), [PCL](./wrappers/pcl), [Unity](./wrappers/unity), and more to come, including Matlab and OpenNI. | |\n\n\n## Ready to Hack!\n\nOur library offers a high level API for using Intel RealSense depth cameras (in addition to lower level ones).\nThe following snippet shows how to start streaming frames and extracting the depth value of a pixel:\n\n```cpp\n// Create a Pipeline - this serves as a top-level API for streaming and processing frames\nrs2::pipeline p;\n\n// Configure and start the pipeline\np.start();\n\nwhile (true)\n{\n    // Block program until frames arrive\n    rs2::frameset frames = p.wait_for_frames(); \n    \n    // Try to get a frame of a depth image\n    rs2::depth_frame depth = frames.get_depth_frame(); \n\n    // Get the depth frame's dimensions\n    float width = depth.get_width();\n    float height = depth.get_height();\n    \n    // Query the distance from the camera to the object in the center of the image\n    float dist_to_center = depth.get_distance(width / 2, height / 2);\n    \n    // Print the distance \n    std::cout << \"The camera is facing an object \" << dist_to_center << \" meters away \\r\";\n}\n```\nFor more information on the library, please follow our [examples](./examples), and read the [documentation](./doc) to learn more.\n\n## Contributing\nIn order to contribute to Intel RealSense SDK, please follow our [contribution guidelines](CONTRIBUTING.md).\n\n## License\nThis project is licensed under the [Apache License, Version 2.0](LICENSE). \nCopyright 2017 Intel Corporation\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AE4:2C474:180D88:5E7243:6AB92C55"},"text_sha256":"83ddc0f7aa0d4ac1b071b658fa7f1c06f759a4e0c222f43b89ec1a56f2429dce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1915","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:17F8575:1C1EA81:6AB92C56"},"commit":{"sha":"677411603eae5d7e7254c552b038cb39d43d8f00","url":"https://github.com/realsenseai/librealsense/commit/677411603eae5d7e7254c552b038cb39d43d8f00","date":"2026-06-30T19:18:06Z","author_date":"2026-06-30T19:18:06Z","committer_date":"2026-06-30T19:18:06Z","tree_sha":"b1da2b2682ff7453c4d860e922bedd69f5460bb6","message_first_line":"Raise safety_mode retry timeout to 60s (15s insufficient under full-suite CI load)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1914","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:17F85C6:1C1EAD3:6AB92C57"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":16484,"blob_sha":"a247d7913bf3e3e3809cec97a4a0d760a19f7220","priority":0},{"path":"Security.md","size":345,"blob_sha":"14a8c81513bdbec2a563cf75357d089814f97036","priority":1}],"documents":[{"path":"readme.md","size":16484,"blob_sha":"a247d7913bf3e3e3809cec97a4a0d760a19f7220","priority":0,"status":200,"text":"<p align=\"center\">\n<!-- Light mode -->\n<img src=\"doc/img/realsense-logo-light-mode.png#gh-light-mode-only\" alt=\"Logo for light mode\" width=\"30%\"/>\n\n<!-- Dark mode -->\n<img src=\"doc/img/realsense-logo-dark-mode.png#gh-dark-mode-only\" alt=\"Logo for dark mode\" width=\"30%\"/>\n<br><br>\n<\/p>\n\n<p align=\"center\">RealSense SDK 2.0 is a cross-platform library for RealSense depth cameras.\nThe SDK allows depth and color streaming, and provides intrinsic and extrinsic calibration information.<\/p>\n\n\n<p align=\"center\">\n  <a href=\"https://www.apache.org/licenses/LICENSE-2.0\"><img src=\"https://img.shields.io/github/license/realsenseai/librealsense.svg\" alt=\"License\"><\/a>\n  <a href=\"https://github.com/realsenseai/librealsense/releases/latest\"><img src=\"https://img.shields.io/github/v/release/realsenseai/librealsense?sort=semver\" alt=\"Latest release\"><\/a>\n  <a href=\"https://github.com/realsenseai/librealsense/compare/master...development\"><img src=\"https://img.shields.io/github/commits-since/realsenseai/librealsense/master/development?label=commits%20since\" alt=\"Commits since\"><\/a>\n  <a href=\"https://github.com/realsenseai/librealsense/issues\"><img src=\"https://img.shields.io/github/issues/realsenseai/librealsense.svg\" alt=\"Issues\"><\/a>\n  <a href=\"https://github.com/realsenseai/librealsense/actions/workflows/buildsCI.yaml?query=branch%3Adevelopment\"><img src=\"https://github.com/realsenseai/librealsense/actions/workflows/buildsCI.yaml/badge.svg?branch=development\" alt=\"GitHub CI\"><\/a>\n  <a href=\"https://github.com/realsenseai/librealsense/network/members\"><img src=\"https://img.shields.io/github/forks/realsenseai/librealsense.svg\" alt=\"Forks\"><\/a>\n<\/p>\n\n## Important Notice\n\nWe are happy to announce that the RealSense GitHub repositories have been successfully migrated to the RealSenseAI organization.\nPlease make sure to update your links to the new RealSenseAI organization for both cloning the repositories and accessing specific files within them.\n\n[https://github.com/**IntelRealSense**/librealsense](https://github.com/IntelRealSense/librealsense) --> [https://github.com/**realsenseai**/librealsense](https://github.com/realsenseai/librealsense)\n\n>Note 1: A redirection from the previous name IntelRealSense is currently in place, but we cannot guarantee how long it will remain active. We recommend that all users update their references to point to the new GitHub location.\n\n>Note 2: Users who install the SDK via APT are required to update the APT key as explained in the following [guide](https://github.com/realsenseai/librealsense/blob/development/doc/distribution_linux.md#installing-the-packages)\n\n#### Branch Policy\nWe have updated our branch policy:\nFrom now on, we will also push beta releases to the master branch, so users can access up-to-date code and features.\nIn the near future, beta binaries will also be pushed to public distribution servers (e.g., APT).\nThe last validated official release can be found on our Releases page on GitHub.\n\n## Use Cases\n\nBelow are some of the many real-world applications powered by RealSense technology:\n\nRobotics | Depth Sensing | 3D Scanning |\n:------------: | :----------: | :-------------: |\n<a href=\"https://realsenseai.com/case-studies/?capability_application=autonomous-mobile-robots\"><img src=\"https://librealsense.realsenseai.com/readme-media/realsense_examplerealsense_example.gif\" width=\"240\"/><\/a> |<a href=\"https://realsenseai.com/case-studies/?q=/case-studies&\"><img src=\"https://librealsense.realsenseai.com/readme-media/align-expectede.gif\" width=\"240\"/><\/a> | <a href=\"https://realsenseai.com/case-studies/?capability_application=autonomous-mobile-robots\"><img src=\"https://librealsense.realsenseai.com/readme-media/realsense_dynamic_example.gif\" width=\"240\"/><\/a>\n\nDrones | Skeletal and People Tracking | Facial Authentication |\n:--------------------------: | :-----: | :----------------------: |\n<a href=\"https://realsenseai.com/case-studies/?q=/case-studies&\"><img src=\"https://librealsense.realsenseai.com/readme-media/drone-demo.gif\" width=\"240\"/><\/a> |<a href=\"https://realsenseai.com/case-studies/?capability_application=monitoring-and-tracking\"><img src=\"https://librealsense.realsenseai.com/readme-media/SkeletalTracking.gif\" width=\"240\"/><\/a> | <a href=\"https://realsenseai.com/case-studies/?capability_application=biometrics\"><img src=\"https://librealsense.realsenseai.com/readme-media/face-demo.gif\" width=\"240\"/><\/a>\n\n\n\n## Why RealSense?\n\n- **High-resolution color and depth** at close and long ranges\n- **Open source SDK** with rich examples and wrappers (Python, ROS, C#, Unity and [more...](https://github.com/realsenseai/librealsense/tree/master/wrappers))\n- **Active developer community and defacto-standard 3D stereo camera for robotics**\n- **Cross-platform** support: Windows, Linux, macOS, Android, and Docker\n\n## Product Line\n\nRealSense stereo depth products use stereo vision to calculate depth, providing high-quality performance in various lighting and environmental conditions.\n\nHere are some examples of the supported models:\n\n| Product | Image | Description |\n|---------|-------|-------------|\n| [**D555 PoE**](https://realsenseai.com/ruggedized-industrial-stereo-depth/d555-poe/) | <img src=\"https://realsenseai.com/wp-content/uploads/2025/07/D555.png\" width=\"1000\"> | The RealSense™ Depth Camera D555 introduces Power over Ethernet (PoE) interface on chip, expanding our portfolio of USB and GMSL/FAKRA products. |\n| [**D457 GMSL/FAKRA**](https://realsenseai.com/ruggedized-industrial-stereo-depth/d457-gmsl-fakra/) | <img src=\"https://realsenseai.com/wp-content/uploads/2025/07/D457.png\" width=\"1000\"> | The RealSense™ Depth Camera D457 is our first GMSL/FAKRA high bandwidth stereo camera. The D457 has an IP65 grade enclosure protecting it from dust ingress and projected water. |\n| [**D455**](https://realsenseai.com/stereo-depth-cameras/real-sense-depth-camera-d455/) | <img src=\"https://www.realsenseai.com/wp-content/uploads/2021/11/455.png\" width=\"1000\"> | The RealSense D455 is a long-range stereo depth camera with a 95 mm baseline, global-shutter depth sensors, an RGB sensor, and a built-in IMU, delivering accurate depth at distances up to 10 m.. |\n| [**D435if**](https://realsenseai.com/stereo-depth-cameras/depth-camera-d435i/) | <img src=\"https://realsenseai.com/wp-content/uploads/2025/06/D435if-a.png\" width=\"1000\"> | The D435if is one of [RealSense™ Depth Camera with IR pass filter family](https://realsenseai.com/stereo-depth-with-ir-pass-filter/) expanding our portfolio targeting the growing robotic market. The D400f family utilizes an IR pass filter to enhance depth quality and performance range in many robotic environments.|\n| [**D405**](https://realsenseai.com/stereo-depth-cameras/stereo-depth-camera-d405/) | <img src=\"https://realsenseai.com/wp-content/uploads/2025/07/D-405.png\" width=\"1000\"> | The RealSense™ Depth Camera D405 is a short-range stereo camera providing sub-millimeter accuracy for your close-range computer vision needs. |\n\n\n> 🛍️ [Explore more stereo products](https://store.realsenseai.com/)\n\n## Getting Started\n\nStart developing with RealSense in minutes using either method below.\n\n### 1️. Precompiled SDK\n\nThis is the best option if you want to plug in your camera and get started right away.\n1. Download the latest SDK bundle from the [Releases page](https://github.com/realsenseai/librealsense/releases).\n2. Connect your RealSense camera.\n3. Run the included tools:\n    - [RealSense Viewer](./tools/realsense-viewer/): View streams, tune settings, record and playback.\n    - [Depth Quality Tool](./tools/depth-quality/): Measure accuracy and fill rate.\n\n### Setup Guides - precompiled SDK\n\n<a href=\"./doc/distribution_linux.md\"><img src=\"https://img.shields.io/badge/Ubuntu_Guide-333?style=flat&logo=ubuntu&logoColor=white\" style=\"margin: 5px;\" alt=\"Linux\\Jetson Guide\"/><\/a>\n<a href=\"./doc/distribution_windows.md\"><img src=\"https://custom-icon-badges.demolab.com/badge/Windows_Guide-333?logo=windows11&logoColor=white\" style=\"margin: 5px;\" alt=\"Windows Guide\"/><\/a>\n\n> **Note:** For **minor releases**, we publish Debian packages as release artifacts that you can download and install directly.\n\n### 2️. Build from Source\nFor a more custom installation, follow these steps to build the SDK from source.\n1. Clone the repository and create a build directory:\n   ```bash\n   git clone https://github.com/realsenseai/librealsense.git\n   cd librealsense\n   mkdir build && cd build\n   ```\n2. Run CMake to configure the build:\n    ```bash\n    cmake ..\n    ```\n3. Build the project:\n    ```bash\n    cmake --build .\n    ```\n\n### Setup Guides - build from source\n\n<a href=\"./doc/installation.md\"><img src=\"https://img.shields.io/badge/Ubuntu_Guide-333?style=flat&logo=ubuntu&logoColor=white\" style=\"margin: 5px;\" alt=\"Linux Guide\"/><\/a>\n<a href=\"./doc/installation_jetson.md\"><img src=\"https://img.shields.io/badge/Jetson_Guide-333?style=flat&logo=nvidia&logoColor=white\" style=\"margin: 5px;\" alt=\"Jetson Guide\"/><\/a>\n<a href=\"./doc/installation_windows.md\"><img src=\"https://custom-icon-badges.demolab.com/badge/Windows_Guide-333?logo=windows11&logoColor=white\" style=\"margin: 5px;\" alt=\"Windows Guide\"/><\/a>\n<a href=\"./doc/installation_osx.md\"><img src=\"https://img.shields.io/badge/macOS_Guide-333?style=flat&logo=apple&logoColor=white\" style=\"margin: 5px;\" alt=\"macOS Guide\"/><\/a>\n\n\n## Python Packages\n[![pyrealsense2](https://img.shields.io/pypi/v/pyrealsense2.svg?label=pyrealsense2&logo=pypi)](https://pypi.org/project/pyrealsense2/)\n[![PyPI - pyrealsense2-beta](https://img.shields.io/pypi/v/pyrealsense2-beta.svg?label=pyrealsense2-beta&logo=pypi)](https://pypi.org/project/pyrealsense2-beta/)\n\n**Which should I use?**\n- **Stable:** `pyrealsense2` — validated releases aligned with SDK tags (Recommended for most users).  \n- **Beta:** `pyrealsense2-beta` — fresher builds for early access and testing. Expect faster updates.  \n\n### Install\n```bash\npip install pyrealsense2 # Stable\npip install pyrealsense2-beta # Beta\n```\n> Both packages import as `pyrealsense2`. Install **only one** at a time.\n\n## Ready to Hack!\n\nOur library offers a high level API for using RealSense depth cameras (in addition to lower level ones).\nThe following snippets show how to start streaming frames and extracting the depth value of a pixel:\n\n**C++**\n```cpp\n#include <librealsense2/rs.hpp>\n#include <iostream>\n\nint main() {\n    rs2::pipeline p;                 // Top-level API for streaming & processing frames\n    p.start();                       // Configure and start the pipeline\n\n    while (true) {\n        rs2::frameset frames = p.wait_for_frames();        // Block until frames arrive\n        rs2::depth_frame depth = frames.get_depth_frame(); // Get depth frame\n        if (!depth) continue;\n\n        int w = depth.get_width(), h = depth.get_height();\n        float dist = depth.get_distance(w/2, h/2);         // Distance to center pixel\n        std::cout << \"The camera is facing an object \" << dist << \" meters away\\r\";\n    }\n}\n```\n\n**Python**\n```python\nimport pyrealsense2 as rs\n\npipeline = rs.pipeline() # Create a pipeline\npipeline.start() # Start streaming\n\ntry:\n    while True:\n        frames = pipeline.wait_for_frames()\n        depth_frame = frames.get_depth_frame()\n        if not depth_frame:\n            continue\n\n        width, height = depth_frame.get_width(), depth_frame.get_height()\n        dist = depth_frame.get_distance(width // 2, height // 2)\n        print(f\"The camera is facing an object {dist:.3f} meters away\", end=\"\\r\")\n\nfinally:\n    pipeline.stop() # Stop streaming\n```\n\nFor more information on the library, please follow our [examples](./examples) or [tools](./tools/), and read the [documentation](./doc) to learn more.\n\n## Supported Platforms\n\n### Operating Systems and Platforms\n\n| Ubuntu | Windows | macOS High Sierra | Jetson | Raspberry Pi |\n|--------|---------|-------|--------|----------------|\n| <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/compiling-librealsense-for-linux-ubuntu-guide\"><img src=\"https://librealsense.realsenseai.com/readme-media/ubuntu.png\" width=\"40%\" alt=\"Ubuntu\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/compiling-librealsense-for-windows-guide\"><img src=\"https://librealsense.realsenseai.com/readme-media/Windows_logo.png\" width=\"40%\" alt=\"Windows\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/macos-installation-for-intel-realsense-sdk\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://librealsense.realsenseai.com/readme-media/apple-dark.png\"><img src=\"https://librealsense.realsenseai.com/readme-media/apple-light.png\" width=\"40%\" alt=\"macOS\" /><\/picture><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/nvidia-jetson-tx2-installation\"><img src=\"https://librealsense.realsenseai.com/readme-media/nvidia.png\" width=\"40%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/using-depth-camera-with-raspberry-pi-3\"><img src=\"https://librealsense.realsenseai.com/readme-media/raspberry-pi.png\" width=\"40%\" alt=\"\" /><\/a><\/div> \n\n\n\n### Programming Languages and Wrappers\n\n| C++ | C | C# | Python | ROS 2 |Rest API |\n|-----|---|----|--------|-------|---------|\n| <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/code-samples\"><img src=\"https://librealsense.realsenseai.com/readme-media/cpp.png\" width=\"50%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/code-samples\"><img src=\"https://librealsense.realsenseai.com/readme-media/c.png\" width=\"55%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/csharp-wrapper\"><img src=\"https://librealsense.realsenseai.com/readme-media/c-sharp.png\" width=\"50%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/python2\"><img src=\"https://librealsense.realsenseai.com/readme-media/python.png\" width=\"30%\" alt=\"\" /><\/a><\/div> | <div align=\"center\"><a href=\"https://dev.realsenseai.com/docs/ros2-wrapper\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://librealsense.realsenseai.com/readme-media/ros2-dark.png\"><img src=\"https://librealsense.realsenseai.com/readme-media/ROS2-light.png\" width=\"80%\" alt=\"ROS 2\" /><\/picture><\/a><\/div> | <div align=\"center\"><a href=\"https://github.com/realsenseai/librealsense/blob/development/wrappers/rest-api/README.md\"><img src=\"https://librealsense.realsenseai.com/readme-media/REST_API.png\" width=\"50%\" alt=\"Rest API\" /><\/a><\/div>|\n\nFor more platforms and wrappers look over [here](https://dev.realsenseai.com/docs/docs-get-started).\n> Full feature support varies by platform – refer to the [release notes](https://github.com/realsenseai/librealsense/wiki/Release-Notes) for details.\n\n## Community & Support\n\n- [📚 Wiki & Docs](https://github.com/realsenseai/librealsense/wiki)\n- [🐞 Report Issues](https://github.com/realsenseai/librealsense/issues)- Found a bug or want to contribute? Read our [contribution guidelines](./CONTRIBUTING.md).\n\n> 🔎 Looking for legacy devices (F200, R200, LR200, ZR300)? Visit the [legacy release](https://github.com/realsenseai/librealsense/tree/v1.12.1).\n\n---\n<p align=\"center\">\nYou can find us at\n<\/p>\n<p align=\"center\">\n  <a href=\"https://github.com/realsenseai\" target=\"_blank\" aria-label=\"GitHub\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"https://librealsense.realsenseai.com/readme-media/github_light.PNG\"><img src=\"https://librealsense.realsenseai.com/readme-media/github.png\" width=\"32\" alt=\"GitHub\"><\/picture><\/a>\n  &nbsp;&nbsp;&nbsp;\n  <a href=\"https://x.com/RealSenseai\" target=\"_blank\" aria-label=\"X (Twitter)\"><img src=\"https://librealsense.realsenseai.com/readme-media/twitter.png\" width=\"32\" alt=\"X (Twitter)\" /><\/a>\n  &nbsp;&nbsp;&nbsp;\n  <a href=\"https://www.youtube.com/@RealSenseai\" target=\"_blank\" aria-label=\"YouTube\"><img src=\"https://librealsense.realsenseai.com/readme-media/social.png\" width=\"32\" alt=\"YouTube\" /><\/a>\n  &nbsp;&nbsp;&nbsp;\n  <a href=\"https://www.linkedin.com/company/realsenseai?trk=similar-pages\" target=\"_blank\" aria-label=\"LinkedIn\"><img src=\"https://librealsense.realsenseai.com/readme-media/linkedin.png\" width=\"32\" alt=\"LinkedIn\" /><\/a>\n  &nbsp;&nbsp;&nbsp;\n  <a href=\"https://realsenseai.com/\" target=\"_blank\" aria-label=\"Community\"><img src=\"https://librealsense.realsenseai.com/readme-media/Real-sense-badge-rgb-c.png\" width=\"32\" alt=\"Community\" /><\/a>\n<\/p>\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D2EE:324E19:1812D5:5E77E4:6AB92C58"},"text_sha256":"46d05a310bb290c82674546fc0319b8b0d9596a61abb212b6d916de74af8071e"},{"path":"Security.md","size":345,"blob_sha":"14a8c81513bdbec2a563cf75357d089814f97036","priority":1,"status":200,"text":"# Security Policy\nRealSense is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. \n\n## Reporting a Vulnerability\nPlease report any security vulnerabilities in this project to [security@realsenseai.com](mailto:security@realsenseai.com)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C20:3AC15:180695:5E6A63:6AB92C58"},"text_sha256":"5cf86ed14e113aaec8ce8aa9c287788ff58de5468d9dd4b11258645d59a85b46"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"openMVG/openMVG","input_row":{"repository":"openMVG/openMVG","url":"https://github.com/openMVG/openMVG","name":"openMVG","owner":"openMVG","description":"open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.","language":"C++","license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0","license_osi_approved":"true","stars":6561,"issues":1946,"created_at":"2013-02-08T16:01:08Z","updated_at":"2026-09-26T14:32:00Z","first_commit_at":"2013-02-08T16:21:30Z","last_commit_at":"2026-08-30T17:24:15Z","activity_months":162.65000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:49.185Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"openMVG/openMVG","visibility":"public","created_at":"2013-02-08T16:01:08Z","updated_at":"2026-09-26T14:32:00Z","private":false,"fork":false,"archived":false,"stargazers_count":6561,"open_issues_count":311,"license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0"},"error":"","rate":{"github_remaining":"1913","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A7:71C58:17C5903:1BEC164:6AB92C59"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1912","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:180D532:1C33C0C:6AB92C59"},"commit":{"sha":"27afb3344970da524eefa776a7e125317d0ecc09","url":"https://github.com/openMVG/openMVG/commit/27afb3344970da524eefa776a7e125317d0ecc09","date":"2018-04-17T16:50:28Z","author_date":"2018-04-17T14:43:28Z","committer_date":"2018-04-17T16:50:28Z","tree_sha":"3572454b4e1e8998536ad57bbd2f811c013aad5d","message_first_line":"[build] Use per target compilation option for MSVC #1282"},"tree_request_status":200,"tree_rate":{"github_remaining":"1911","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A9:7418C:1822D52:1C492BF:6AB92C5A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3552,"blob_sha":"7d218fe9e0dd4a294187c8f4951cee3247622c9a","priority":0}],"documents":[{"path":"README.md","size":3552,"blob_sha":"7d218fe9e0dd4a294187c8f4951cee3247622c9a","priority":0,"status":200,"text":"OpenMVG (open Multiple View Geometry)\n=====================================\n\n![Logo](https://github.com/openMVG/openMVG/raw/master/logo/openMVG_Logo.png)\n\nIntroduction\n------------\n\n[OpenMVG (Multiple View Geometry)](http://imagine.enpc.fr/~moulonp/openMVG/) \"open Multiple View Geometry\" is a library for computer-vision scientists and especially targeted to the Multiple View Geometry community. It is designed to provide an easy access to the classical problem solvers in Multiple View Geometry and solve them accurately.\n\nThe openMVG credo is: \"Keep it simple, keep it maintainable\". OpenMVG targets readable code that is easy to use and modify by the community.\n\nAll the features and modules are unit tested. This test driven development ensures that the code works as it should and enables more consistent repeatability. Furthermore, it makes it easier for the user to understand and learn the given features.\n\nBuilding\n--------\n\nSee [BUILD](https://github.com/openMVG/openMVG/blob/master/BUILD.md) text file\n\nContinuous integration:\n - linux 64 bits, GCC/CLANG (Build + tests): [![Build Status](https://travis-ci.org/openMVG/openMVG.png?branch=develop)](https://travis-ci.org/openMVG/openMVG)\n - VStudio 2015 64 bits (Build): [![Build status](https://ci.appveyor.com/api/projects/status/3nv6rt41yxqx5v7i?svg=true)](https://ci.appveyor.com/project/pmoulon/openmvg)\n - Unit test coverage: [![Coverage Status](https://coveralls.io/repos/openMVG/openMVG/badge.png?branch=develop)](https://coveralls.io/r/openMVG/openMVG?branch=develop)\n\nLicense\n-------\n\nSee [LICENSE MPL2](https://github.com/openMVG/openMVG/blob/master/LICENSE) text file\n\nAuthors\n-------\n\nSee [Authors](https://github.com/openMVG/openMVG/raw/master/AUTHORS) text file\n\nDocumentation\n-------------\n\nSee [documentation](http://openmvg.readthedocs.org/en/latest)\n\nAcknowledgements\n----------------\n\nopenMVG authors would like to thanks libmv authors for providing an inspiring \nbase to design openMVG. Authors also would like to thanks Mikros Image [1] \nand LIGM-Imagine laboratory [2] for support and authorization to make this\nlibrary an opensource project.\n\n[1] [http://www.mikrosimage.eu/](http://www.mikrosimage.eu/)\n[2] [http://imagine.enpc.fr/](http://imagine.enpc.fr/)\n\nContact\n-------\n\nopenmvg-team[AT]googlegroups.com\n\n\nCitations\n---------\n\nIf you find the library or some part of it useful, then following\npublications are relevant:\n\n[3] Moulon Pierre, Monasse Pascal and Marlet Renaud. ACCV 2012.\n[Adaptive Structure from Motion with a contrario model estimation.](http://hal.archives-ouvertes.fr/index.php?halsid=1n2qdqiv2a0l5eq7qpos9us752&view_this_doc=hal-00769266&version=1)\n\n[4] Moulon Pierre and Monasse Pascal. CVMP 2012.\n[Unordered feature tracking made fast and easy.](http://hal.archives-ouvertes.fr/index.php?halsid=ggdarhl8cv1j6ohq2073eok8q3&view_this_doc=hal-00769267&version=1)\n\n[5] Moisan Lionel, Moulon Pierre and Monasse Pascal. IPOL 2012.\n[Automatic Homographic Registration of a Pair of Images, with A Contrario Elimination of Outliers.](http://dx.doi.org/10.5201/ipol.2012.mmm-oh)\n\n[6] Moulon Pierre, Monasse Pascal and Marlet Renaud. ICCV 2013.\n[Global Fusion of Relative Motions for Robust, Accurate and Scalable Structure from Motion.](http://imagine.enpc.fr/~moulonp/publis/iccv2013/index.html)\n\nor cite it as:\n\n```\n  @misc{openMVG,\n    author = \"Pierre Moulon and Pascal Monasse and Renaud Marlet and Others\",\n     title = \"OpenMVG. An Open Multiple View Geometry library.\",\n    howpublished = \"\\url{https://github.com/openMVG/openMVG}\",\n  }\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF66:3AC15:1806A4:5E6A9B:6AB92C5A"},"text_sha256":"66dc933794146b58fc45d52e9660118f2521ef9fec6781b4281cc57397f964d3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1910","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091F:73962:17E3835:1C09749:6AB92C5A"},"commit":{"sha":"c76d87244fb3590fb8b9a752be34f07411057ae2","url":"https://github.com/openMVG/openMVG/commit/c76d87244fb3590fb8b9a752be34f07411057ae2","date":"2025-12-17T00:44:42Z","author_date":"2025-12-17T00:44:42Z","committer_date":"2025-12-17T00:44:42Z","tree_sha":"7a238fa9d89567659bd2f124731ab980512f89c4","message_first_line":"[Bug Fix] fix triplet validation in translation averaging (#2432)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1909","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0822:380E1C:17DF5BC:1C04D86:6AB92C5B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6519,"blob_sha":"362977afa0cc83c921d954497806280d875b3cd8","priority":0}],"documents":[{"path":"README.md","size":6519,"blob_sha":"362977afa0cc83c921d954497806280d875b3cd8","priority":0,"status":200,"text":"OpenMVG (open Multiple View Geometry)\n=====================================\n\n<p align=\"center\">\n<img src=\"https://github.com/openMVG/openMVG/raw/master/logo/openMVG_Logo.png\">\n<p/>\n\n| **License** | **Documentation** | Continuous Integration (Linux/MacOs/Windows) |Build  | Code Quality | Chat |\n|:-:|:-:|:-:|:-:|:-:|:-:|\n| [![GitHub license](https://img.shields.io/badge/license-MPL2-blue)](https://github.com/openMVG/openMVG/blob/master/LICENSE) |   [![doc](https://img.shields.io/badge/doc-readthedocs-blueviolet)](http://openmvg.readthedocs.org/en/latest) <br> [Wiki](https://github.com/openMVG/openMVG/wiki) | [![CI](https://github.com/openMVG/openMVG/actions/workflows/compile_and_run_test.yml/badge.svg?branch=develop)](https://github.com/openMVG/openMVG/actions/workflows/compile_and_run_test.yml) | [local/docker build tutorial ](https://github.com/openMVG/openMVG/blob/master/BUILD.md)|  [![CodeQL](https://github.com/openMVG/openMVG/actions/workflows/codeql.yml/badge.svg)](https://github.com/openMVG/openMVG/actions/workflows/codeql.yml) <br> [![CodeFactor](https://www.codefactor.io/repository/github/openmvg/openmvg/badge)](https://www.codefactor.io/repository/github/openmvg/openmvg) | [![Join the chat](https://img.shields.io/badge/chat-on%20gitter-green)](https://gitter.im/openMVG/Lobby) |\n\n**Our Mission**\n- Extend awareness of the power of 3D reconstruction from images/photogrammetry by developing a C++ framework.\n\n**Our Vision**\n- Simplify reproducible research with easy-to-read and accurate implementation of state of the art and \"classic\" algorithms.\n\n**Our Credo**\n- \"Keep it simple, keep it maintainable\".\n  - OpenMVG is designed to be easy to read, learn, modify and use.\n  - Thanks to its strict test-driven development and samples, the library allows to build trusted larger systems.\n\n**Our codebase and pipeline**\n\nOpenMVG provides an end-to-end 3D reconstruction from images framework compounded of libraries, binaries, and pipelines.\n- **The libraries** provide easy access to features like: images manipulation, features description and matching, feature tracking, camera models, multiple-view-geometry, robust-estimation, structure-from-motion algorithms, ...\n- **The binaries** solve unit tasks that a pipeline could require: scene initialization, feature detection & matching and structure-from-motion reconstruction, export the reconstructed scene to others Multiple-View-Stereovision framework to compute dense point clouds or textured meshes.\n- **The pipelines** are created by chaining various binaries to compute image matching relation, solve the Structure from Motion problem (reconstruction, triangulation, localization) and ...\n\nOpenMVG is developed in C++ and runs on Android, iOS, Linux, macOS, and Windows.\n\n<p align=\"center\">\n<img src=\"./docs/sphinx/rst/openMVG/sfm/pipeline_simple.png\">\n<p/>\n\n**Tutorials**\n- See [Wiki](https://github.com/openMVG/openMVG/wiki)\n  - [OpenMVG Data Structure](https://github.com/openMVG/openMVG/wiki/OpenMVG-data-structures)\n  - [Using OpenMVG as a library](https://github.com/openMVG/openMVG/blob/develop/BUILD.md#using-openmvg-as-a-third-party-library-dependency-with-cmake)\n  - [Using OpenMVG on your image dataset](https://github.com/openMVG/openMVG/wiki/OpenMVG-on-your-image-dataset)\n  - ...\n\n**More information**\n- [Authors](#authors)\n- [Contact](#contact)\n- [Citations](#citations)\n- [Acknowledgements](#acknowledgements)\n\n## Authors\n\nSee [Authors](https://github.com/openMVG/openMVG/raw/master/AUTHORS) text file\n\n## Contact\n\nopenmvg-team[AT]googlegroups.com\n\n\n## Citations\n\nWe are recommending citing `OpenMVG` if you are using the whole library or the adequate paper if you use only a submodule `AContrario Ransac [3], AContrario\nSfM [1], GlobalSfM [4] or Tracks [2]`:\n\n```\n@inproceedings{moulon2016openmvg,\n  title={Open{MVG}: Open multiple view geometry},\n  author={Moulon, Pierre and Monasse, Pascal and Perrot, Romuald and Marlet, Renaud},\n  booktitle={International Workshop on Reproducible Research in Pattern Recognition},\n  pages={60--74},\n  year={2016},\n  organization={Springer}\n}\n```\n\n[1] Moulon Pierre, Monasse Pascal and Marlet Renaud. ACCV 2012.\n[Adaptive Structure from Motion with a contrario model estimation.](http://hal.archives-ouvertes.fr/index.php?halsid=1n2qdqiv2a0l5eq7qpos9us752&view_this_doc=hal-00769266&version=1)\n```\n@inproceedings{Moulon2012,\n  doi = {10.1007/978-3-642-37447-0_20},\n  year  = {2012},\n  publisher = {Springer Berlin Heidelberg},\n  pages = {257--270},\n  author = {Pierre Moulon and Pascal Monasse and Renaud Marlet},\n  title = {Adaptive Structure from Motion with a~Contrario Model Estimation},\n  booktitle = {Proceedings of the Asian Computer Vision Conference (ACCV 2012)}\n}\n```\n\n[2] Moulon Pierre and Monasse Pascal. CVMP 2012.\n[Unordered feature tracking made fast and easy.](http://hal.archives-ouvertes.fr/index.php?halsid=ggdarhl8cv1j6ohq2073eok8q3&view_this_doc=hal-00769267&version=1)\n```\n@inproceedings{moulon2012unordered,\n  title={Unordered feature tracking made fast and easy},\n  author={Moulon, Pierre and Monasse, Pascal},\n  booktitle={CVMP 2012},\n  pages={1},\n  year={2012}\n}\n```\n\n[3] Moisan Lionel, Moulon Pierre and Monasse Pascal. IPOL 2012.\n[Automatic Homographic Registration of a Pair of Images, with A Contrario Elimination of Outliers.](http://dx.doi.org/10.5201/ipol.2012.mmm-oh)\n```\n@article{moisan2012automatic,\n  title={Automatic homographic registration of a pair of images, with a contrario elimination of outliers},\n  author={Moisan, Lionel and Moulon, Pierre and Monasse, Pascal},\n  journal={Image Processing On Line},\n  volume={2},\n  pages={56--73},\n  year={2012}\n}\n```\n\n[4] Moulon Pierre, Monasse Pascal, and Marlet Renaud. ICCV 2013.\n[Global Fusion of Relative Motions for Robust, Accurate and Scalable Structure from Motion.](http://imagine.enpc.fr/~moulonp/publis/iccv2013/index.html)\n\n```\n@inproceedings{moulon2013global,\n  title={Global fusion of relative motions for robust, accurate and scalable structure from motion},\n  author={Moulon, Pierre and Monasse, Pascal and Marlet, Renaud},\n  booktitle={Proceedings of the IEEE International Conference on Computer Vision},\n  pages={3248--3255},\n  year={2013}\n}\n```\n\n## Acknowledgements\n\nopenMVG authors would like to thanks libmv authors for providing an inspiring\nbase to design openMVG. Authors also would like to thanks [Mikros Image](http://www.mikrosimage.eu/)\nand [LIGM-Imagine laboratory](http://imagine.enpc.fr/) for support and authorization to make this\nlibrary an opensource project.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39DE:3E724:18164B:5E7B29:6AB92C5B"},"text_sha256":"dd12bd033985e2f5a1ac1b4ec189e550255e6c5e96f2c2d489c9c4dad6caba1a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"AaronJackson/vrn","input_row":{"repository":"AaronJackson/vrn","url":"https://github.com/AaronJackson/vrn","name":"vrn","owner":"AaronJackson","description":":man:  Code for \"Large Pose 3D Face Reconstruction from a Single Image via Direct Volumetric CNN Regression\"","language":"MATLAB","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4517,"issues":161,"created_at":"2017-06-20T12:35:33Z","updated_at":"2026-09-08T04:59:16Z","first_commit_at":"2017-06-20T12:35:33Z","last_commit_at":"2021-09-07T19:15:46Z","activity_months":50.600000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:52.166Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"AaronJackson/vrn","visibility":"public","created_at":"2017-06-20T12:35:33Z","updated_at":"2026-09-08T04:59:16Z","private":false,"fork":false,"archived":false,"stargazers_count":4517,"open_issues_count":7,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1908","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:1804778:1C2A59A:6AB92C5C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1907","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0842:E80A6:17B6A87:1BDD28D:6AB92C5C"},"commit":{"sha":"c728916740c6415a10c58dab5d627ff33636e049","url":"https://github.com/AaronJackson/vrn/commit/c728916740c6415a10c58dab5d627ff33636e049","date":"2018-01-10T09:30:11Z","author_date":"2018-01-10T09:30:11Z","committer_date":"2018-01-10T09:30:11Z","tree_sha":"7ab1078b4dbc030e284b959dfb5df1179460953f","message_first_line":"Fixed Z scaling (thanks cloudhan)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1906","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0851:3203A7:17A3788:1BC9BF2:6AB92C5C"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1905","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C1:14A1F2:181D417:1C43BBC:6AB92C5D"},"commit":{"sha":"ea5184770216e7c6f7ec2a1e1ccb0a17b5ecc4e6","url":"https://github.com/AaronJackson/vrn/commit/ea5184770216e7c6f7ec2a1e1ccb0a17b5ecc4e6","date":"2021-09-07T19:15:46Z","author_date":"2021-09-07T19:15:46Z","committer_date":"2021-09-07T19:15:46Z","tree_sha":"2225ef329dc9e6a62bd9d8367c02a762b6412b36","message_first_line":"Update model download links"},"tree_request_status":200,"tree_rate":{"github_remaining":"1904","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AA:77994:17F8A7C:1C1F02D:6AB92C5D"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"automeris-io/WebPlotDigitizer","input_row":{"repository":"automeris-io/WebPlotDigitizer","url":"https://github.com/automeris-io/WebPlotDigitizer","name":"WebPlotDigitizer","owner":"automeris-io","description":"Computer vision assisted tool to extract numerical data from plot images.","language":"JavaScript","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":3166,"issues":282,"created_at":"2010-09-25T16:20:49Z","updated_at":"2026-09-23T14:39:41Z","first_commit_at":"2010-09-25T16:27:45Z","last_commit_at":"2025-08-26T06:06:34Z","activity_months":178.99000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:53.939Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"automeris-io/WebPlotDigitizer","visibility":"public","created_at":"2010-09-25T16:20:49Z","updated_at":"2026-09-23T14:39:41Z","private":false,"fork":false,"archived":false,"stargazers_count":3166,"open_issues_count":104,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"1903","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EF:754BF:17DC1B0:1C028CD:6AB92C5D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1902","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:17A384F:1BC9CDC:6AB92C5E"},"commit":{"sha":"5dccc1fbb4b2ca4d112b54de11815661e9912762","url":"https://github.com/automeris-io/WebPlotDigitizer/commit/5dccc1fbb4b2ca4d112b54de11815661e9912762","date":"2018-05-14T03:56:02Z","author_date":"2018-05-14T03:56:02Z","committer_date":"2018-05-14T03:56:02Z","tree_sha":"03c7add1f4703612712d233a12f344c8b628340b","message_first_line":"Clean up remaining algos to use more ES6"},"tree_request_status":200,"tree_rate":{"github_remaining":"1901","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D1:B1202:17ADDE9:1BD3BB2:6AB92C5E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2837,"blob_sha":"bda607ee9edc5e67882248a221b258da5a0c7ea7","priority":0}],"documents":[{"path":"README.md","size":2837,"blob_sha":"bda607ee9edc5e67882248a221b258da5a0c7ea7","priority":0,"status":200,"text":"WebPlotDigitizer\n================\n\nA web based tool to extract numerical data from plot images. Supports XY, Polar, Ternary diagrams and Maps. This is an opensource tool that is used by thousands and [cited in over 600 published articles](https://scholar.google.com/scholar?as_vis=1&q=WebPlotDigitizer&hl=en&as_sdt=0,44). Checkout https://automeris.io/WebPlotDigitizer for more details.\n\n![WebPlotDigitizer Screenshot](screenshot.png?raw=true \"WebPlotDigitizer\")\n\nContact\n-------\n\nAnkit Rohatgi <ankitrohatgi@hotmail.com>\n\nLicense\n-------\n\nWebPlotDigitizer is distributed under [GNU AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html).\n\nStable Versions\n---------------\n\nThe master branch in this repository is unstable and not recommended to be used in production. To access stable releases, checkout: https://github.com/ankitrohatgi/WebPlotDigitizer/releases\n\nDevelopment Dependencies\n------------------------\n(You can also use the pre-configured Ubuntu based Dockerfile from the docker folder)\n\nUI:\n- See app/thirdparty folder and download the required third party libraries and dependencies.\n- A recent Java to run the javascript compiler (Google Closure Compiler).\n- Python 3 with jinja2 package and pybabel to compile the HTML templates.\n\nWeb Server:\n- A recent Go compiler\n\nElectron App:\n- npm\n\n\nBuilding the App\n----------------\nTo build the HTML5 code, do the following (make sure you have checked out the dependencies above):\n\n    cd app\n    ./build.sh\n\nThis should generate a combined-compiled.js file and several HTML files in the 'app' directory. Use the web server (see webserver folder) or Electron app (see electron folder) to host this app.\n\n\nWeb Server\n----------\n\nPHP backend has now been replaced with a simple Go server. To start the server do the following:\n\n    cd webserver\n    cp settings.json.example settings.json\n    # edit settings.json as needed\n    go build\n    ./webserver\n\nYou can now open this WPD in your web browser.\n\nThe Go based server will be extended to include typical server side features like server-side data storage, remote APIs etc.\n\nElectron App\n------------\n\nTo run the electron app, follow these steps:\n\n    cd electron\n    npm install\n    npm start\n\nAt the moment, this is only an basic implementation. If you are familiar with electron app development, then feel free to contribute here.\n\nTo build MacOS, Windows or Linux apps, make sure \"electron-packager\" is available:\n    \n    npm install electron-packager -g\n\nOn a Linux development machine, you will also need \"wine\" to build the Windows app. To build the apps, run:\n   \n    cd electron\n    ./build-packages.sh # Windows, Mac and Linux\n    ./build-mac.sh      # Mac only\n\nThis will create apps for Mac, Windows and Linux.\n\n\nTranslations\n------------\n\nIf you would like to translate WPD to your language, then please email me.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"60F8:3E1DA:17A1BF:5E078C:6AB92C5A"},"text_sha256":"c71fb75079809edee37937ade9e5bc3eb81aaac1b9c8323c9318af824e249822"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1900","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:17A0171:1BC52DE:6AB92C5F"},"commit":{"sha":"3a3ecb11606945d0701c8a488777e6861be70056","url":"https://github.com/automeris-io/WebPlotDigitizer/commit/3a3ecb11606945d0701c8a488777e6861be70056","date":"2025-08-26T06:06:34Z","author_date":"2025-08-26T06:06:34Z","committer_date":"2025-08-26T06:06:34Z","tree_sha":"210412501e1d58702015ea059f9242a186f531ce","message_first_line":"add license info in about popup"},"tree_request_status":200,"tree_rate":{"github_remaining":"1899","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0854:35C5DA:17B40AF:1BD9BB4:6AB92C60"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1719,"blob_sha":"23a92a78ff24cdf134a0d46f758c995947ccdd77","priority":0}],"documents":[{"path":"README.md","size":1719,"blob_sha":"23a92a78ff24cdf134a0d46f758c995947ccdd77","priority":0,"status":200,"text":"# WebPlotDigitizer\n\nA large quantity of useful data is locked away in images of data visualizations. WebPlotDigitizer is a computer vision assisted software that helps extract numerical data from images of a variety of data visualizations.\n\nWPD has been used by thousands in academia and industry since its creation in 2010 (Google Scholar Citations)\n\nTo use WPD, sign-up on https://automeris.io\n\n![WPD Screenshot](images/wpd5.png \"WebPlotDigitizer UI\")\n\n## Donate\n\nDonatations help keeping WPD free for thousands of scientists and researchers across the world.\n\n<a href='https://ko-fi.com/L4L010CWIY' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /><\/a>\n\n## Documentation\n\nVisit: https://automeris.io/docs/\n\n## License\n\nWPD frontend is distributed under GNU AGPL v3 license (this repository). \n\nAutomeris \"AI Assist\" and other related cloud based systems are closed source and owned by Automeris LLC (owned by Ankit Rohatgi).\n\n## Contact\n\nPrimary Author and Maintainer: Ankit Rohatgi\n\nEmail: plots@automeris.io\n\n## Contributions\n\nWPD does not have an official roadmap. Please consult before submitting contributions.\n\n\n## Local build (for development)\n\nWith Docker:\n```\ndocker compose up --build               # install depedencies, build and host\ndocker compose run wpd npm run build    # rebuild\ndocker compose run wpd npm run format   # autoformat code\nhttp://localhost:8080/tests             # run tests\n```\n\nWithout Docker:\n```\nnpm install     # install dependencies\nnpm run build   # build artifacts\nnpm start       # host locally\nnpm run format  # autoformat code\nnpm run test    # run tests\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A5F6:29FD16:1849CB:5EAF73:6AB92C60"},"text_sha256":"2d8630f761ab39a9aa1fdc6485be259b2a8096d590d73cf03afeee1b879b865e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sightmachine/SimpleCV","input_row":{"repository":"sightmachine/SimpleCV","url":"https://github.com/sightmachine/SimpleCV","name":"SimpleCV","owner":"sightmachine","description":"The Open Source Framework for Machine Vision","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2731,"issues":327,"created_at":"2011-08-16T18:04:07Z","updated_at":"2026-09-04T20:38:42Z","first_commit_at":"2010-11-02T15:46:02Z","last_commit_at":"2024-12-20T19:39:00Z","activity_months":169.58000000000001,"ai_ml_match_topics":"computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:46:56.897Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sightmachine/SimpleCV","visibility":"public","created_at":"2011-08-16T18:04:07Z","updated_at":"2026-09-04T20:38:42Z","private":false,"fork":false,"archived":false,"stargazers_count":2731,"open_issues_count":121,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1898","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:180DAD4:1C34250:6AB92C60"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1897","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17E3C83:1C09C35:6AB92C61"},"commit":{"sha":"6c4d61b6d1d9d856b471910107cad0838954d2b2","url":"https://github.com/sightmachine/SimpleCV/commit/6c4d61b6d1d9d856b471910107cad0838954d2b2","date":"2015-04-07T13:42:39Z","author_date":"2015-04-07T13:42:39Z","committer_date":"2015-04-07T13:42:39Z","tree_sha":"5a098b1d00d53ec2b56f168a81f47009a2b10373","message_first_line":"Merge pull request #672 from Betrezen/DEVOPS-584"},"tree_request_status":200,"tree_rate":{"github_remaining":"1896","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0869:1DB627:1880116:1CA6B0F:6AB92C61"},"tree_truncated":false,"document_candidates":[{"path":"README.markdown","size":20758,"blob_sha":"8a74f9ef257b4fc3d4269afbbc6edb433c5a737c","priority":0}],"documents":[{"path":"README.markdown","size":20758,"blob_sha":"8a74f9ef257b4fc3d4269afbbc6edb433c5a737c","priority":0,"status":200,"text":"--------------------------\n# SimpleCV\n--------------------------\n\n[![Build Status](https://travis-ci.org/sightmachine/SimpleCV.png?branch=develop)](https://travis-ci.org/sightmachine/SimpleCV)\n\n\nQuick Links:\n\n * [About](#about)\n * [Installation](#installation)\n    * [Docker] (#docker)\n    * [Ubuntu](#ubuntu-1204)\n    * [Virtual Environment](#virtualenv)\n    * [Arch Linux](#arch-linux)\n    * [Fedora](#fedora)\n    * [MacOS](#mac-os-x-106-and-above)\n    * [Windows](#windows-7vista)\n    * [Raspberry Pi](#raspberry-pi)\n * [SimpleCV Shell](#simplecv-interactive-shell-or-how-to-run-simplecv)\n * [Videos & Tutorials](#videos---tutorials-and-demos)\n * [SimpleCV on Mobile - Android](#simplecv-on-mobile-android)\n * [Help](#getting-help)\n * [Troubleshooting Installation](#troubleshooting-installation-problems)\n    * [Required Libraries](#required-libraries)\n    * [Optional Libraries](#optional-libraries)\n\n\n<a id=\"about\"><\/a>\n## About\n---------------------------\nMake computers see with SimpleCV, the Open Source Framework for Computer Vision\n\nSimpleCV is a framework for Open Source Machine Vision, using OpenCV and the Python programming language.\nIt provides a concise, readable interface for cameras, image manipulation, feature extraction, and format conversion.  Our mission is to give casual users a comprehensive interface for basic machine vision functions and an elegant programming interface for advanced users.\n\nWe like SimpleCV because:\n\n* Even beginning programmers can write simple machine vision tests\n* Cameras, video files, images, and video streams are all interoperable\n* Information on image features can be extracted, sorted and filtered easily\n* Manipulations are fast, with easy to remember names\n* Linear algebra is strictly optional\n\nHere is the simplecv \"hello world\":\n\n    import SimpleCV\n    camera = SimpleCV.Camera()\n    image = camera.getImage()\n    image.show()\n\nFor more code snippets, we recommend the [SimpleCV examples website](http://examples.simplecv.org) or looking at our example scripts in [SimpleCV/examples](http://github.com/sightmachine/SimpleCV/tree/master/SimpleCV/examples)\n\n---------------------------\n<a id=\"installation\"><\/a>\n## Installation\n\nThe easiest way to install SimpleCV is with the packages for your distribution (Windows, Mac, Linux) included on the website (http://www.simplecv.org).  Although it is tested on many platforms there maybe scenarios where it just won't work with the package installer. Below is instructions on how to install, if you have problems please see the troubleshooting section at the end of this README file.\n\n<a id=\"docker\"><\/a>\n### Docker\nThis is the recommended way of installing SimpleCV as you can be sure the environment will be setup the same exact way as it's suppose to be on your machine.\n\n*WARNING*: Using docker does not allow the webcam to work, it also doesn't work with Image.show(), so essentially requires you to use simplecv within an IPython notebook.\n\nThe first step is to install docker on your machine if you have not, this should work for Windows, Mac, and Linux, please follow instructions at:\n<a href=\"https://docs.docker.com/installation/\">https://docs.docker.com/installation/<\/a>\n\nOnce docker is installed you can run simplecv as easy as (may have to run as sudo, depending on OS):\n\n    docker pull sightmachine/simplecv\n\nIt will probably take a little while to download, but once done just run (may need to run as sudo, depending on OS):\n\n    docker run -p 54717:8888 -t -i sightmachine/simplecv\n\nThen just open your web browser and go to:\n\n    http://localhost:54717\n    \n**NOTE**: If you are using a Mac or Windows it will be a little different since you will be boot2docker to run.  When you run boot2docker up it should show the ip address of the docker service.  It could be something like 192.168.59.103, but this will change as it's random.  Once you know that ip you will just go to that IP address with the correct port instead:\n\n    http://192.168.59.103:54717\n\nYou will get a Ipython notebook inteface, start a new notebook and enter the following:\n\n    from SimpleCV import *\n    disp = Display(displaytype='notebook')\n    img = Image('simplecv')\n    img.save(disp)\n\nYou should now see the simplecv logo and now have a full simplecv environment setup to start playing around.\n\n<a id=\"ubuntu-1204\"><\/a>\n### Ubuntu 12.04\nInstall with pip\n\n\tsudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip\n\tsudo pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools git\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo pip install -r requirements.txt\n    sudo python setup.py install\n\nthen just run 'simplecv' from the shell.\n\n### Virtualenv\n\nThis is how to install SimpleCV under a python virtual environment [virtualenv] (http://www.virtualenv.org).  This maybe useful in cases where you want to keep your system libraries clean and not install extra libraries.  This method has only been tested on Ubuntu 12.04, it maybe possible to port to other operating systems.\n\nRun the following commands:\n\n    sudo apt-get install python-opencv python-setuptools python-pip gfortran g++ liblapack-dev libsdl1.2-dev libsmpeg-dev mercurial\n    sudo pip install virtualenv\n    virtualenv venv\n    cd venv\n    mkdir src\n    ln -s /usr/local/lib/python2.7/dist-packages/cv2.so lib/python2.7/site-packages/cv2.so\n    ln -s /usr/local/lib/python2.7/dist-packages/cv.py lib/python2.7/site-packages/cv.py\n    ./bin/pip install -r requirements.txt\n    mkdir src\n    wget -O src/pygame.tar.gz https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.tar.gz\n    cd src\n    tar zxvf pygame.tar.gz\n    cd ..\n    ./bin/python src/pygame-pygame-6625feb3fc7f/setup.py -setuptools install\n    ./bin/pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\n\n\n\n\n<a id=\"archlinux\"><\/a>\n### Arch Linux\nInstall using pip\n\n    pacman -S python2-numpy opencv2.4.4_1 python-pygame python2-setuptools ipython2 python2-pip\n    pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    pacman -S python2-numpy opencv2.4.4_1 python-pygame python2-setuptools ipython2\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\nInstall development version using aur\n\n    yaourt -S simplecv-git\n\n<a id=\"fedora\"><\/a>\n### Fedora\n#### Fedora 20 and above\n\n    sudo yum -y install python-SimpleCV\n\n#### Fedora 18\nInstall with pip\n\n    sudo yum -y install python-ipython opencv-python scipy numpy pygame python-setuptools python-pip\n    sudo python-pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    sudo yum -y install python-ipython opencv-python scipy numpy pygame python-setuptools python-pip git\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\n<a id=\"macos\">\n### Mac OS X (10.6 and above)\n<\/a>\n\n**General OSX Overview**\n\nNote: We originally tried to bundle all Mac dependencies in a superpack.  This turned out to be extremely difficult with the many differences between versions of Mac OS.  Now, with Mac, you must build from source and we will try and make it as easy as possible.  Please report a bug if you have issues.\n\n\n---------------------------\n**Explicit (as in every step) instructions compliments of JHawkins**\n\n*These instructions are geared towards people who are just getting started with python development on OSX. They will walk you through setting up all the tools you need to build SimpleCV from scratch. If you don't know which instructions you want, you probably want to use these.*\n\nInstall Xcode via App Store\nStart Xcode and go to Xcode >> Preferences >> Downloads >> click Install across from Command Line Tools\nIf Terminal is already running, shut it down and reopen it\nOS X's permissions on /usr/local are too restrictive and must be changed via:\n\n    sudo chown -R `whoami` /usr/local\n\nInstall homebrew via Terminal using:\n\n    ruby -e \"$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)\"\n\nIgnore the single warning that instructs you to install Xcode's CLI tools (you did that already)\nTo verify that homebrew is installed correctly and working, run:\n\n    brew doctor\n\nAddress any errors before moving on. Remember, Google is your friend.\nNote: If you run VM's on my via Parallels and run into multiple warnings related to \"osxfuse\" thi go to System Preferences >> FUSE for OS X >> Click Remove OSXFUSE. I can add it back later if needed.\nOnce the doctor tells you that you are 'raring to brew', run:\n\n    brew update\n\nfollowed by\n\n    brew upgrade\n\nInstall OpenCV via homebrew by running:\n\n    brew tap homebrew/science\n    brew install opencv\n\nBe sure to add the requested line to you ~/.bash_profile:\n\n    export PYTHONPATH=\"/usr/local/lib/python2.7/site-packages:$PYTHONPATH\"\n\nSource your ~/.bash_profile file so that the changes take effect:\n\n    source ~/.bash_profile\n\nInstall Git via homebrew by running:\n\n    brew install git\n\nInstall SDL dependencies (can anyone clarify this?) via homebrew by running:\n\n    brew install sdl sdl_image sdl_mixer sdl_ttf portmidi\n\nInstall XQuartz from https://xquartz.macosforge.org\nHomebrew can't install smpeg at the time of this writing however there is a workaround:\n\n    brew tap homebrew/headonly\n    brew install --HEAD smpeg\n\nIf you get a connection refused error, wait a minute and try again.\nDownload PIL:\n\n    curl -O -L http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz\n\nIn the unpacked folder:\n\n    python setup.py build --force\n    sudo python setup.py install\n\nManually create a few PIL symlinks:\n\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.so /Library/Python/2.6/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/PIL /Library/Python/2.6/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so /Library/Python/2.6/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.py /Library/Python/2.6/site-packages/cv.py\n\nInstall PIP by running:\n\n    sudo easy_install pip\n\nInstall the Scipy Superpack from http://fonnesbeck.github.com/ScipySuperpack/\nInstall Mercurial via homebrew by running:\n\n     brew install mercurial\n\nInstall pygame via PIP by running:\n\n    sudo pip install hg+http://bitbucket.org/pygame/pygame\n\nInstall svgwrite by running:\n\n    sudo pip install svgwrite\n\n**Note:** SimpleCV's developers made a change (for the better) here that I am including, however everything up to this point is 100% guaranteed to work, because it's exactly what I did. Keeping true to that, I'll present both options. *We both suggest using the develop branch.*\n**Developer's Instructions** Install SimpleCV from the git repo and then run setup.\n\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\n**JHawkins' Instructions** Install SimpleCV via PIP by running:\n\n    sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\nTest by running simplecv in the command line:\n\n    simplecv\n\nIf it starts (it should!) be sure to check out:\n\n     example()\n\n--------------------------------\n**Lion Take Two**\n\n*This is the abridged set of the instructions. It assumes you have most of the common OSX developer tools installed like brew and pip.\nIf you don't know what Brew or Pip are you probably want to use the instructions above. For OSX Lion make sure you install Mercurial (aka hg - brew install hg). There may be errors in pygame associated with not installing X11,\nif you encounter this problem please submit an issue on github.*\n\nBefore you begin installing SimpleCV make sure you have the folliwng tools installed.\n\n* Install Xcode https://developer.apple.com/xcode/ and then run the Xcode installer.\n* Install homebrew https://github.com/mxcl/homebrew/wiki/installation\n\n\nCommands (for Lion)::\n\n    mkdir ~/Code\n    cd ~/Code\n    /usr/bin/ruby -e \"$(curl -fsSL https://raw.github.com/gist/323731)\"\n    brew tap homebrew/science\n\tbrew install opencv\n    brew install git\n    brew tap homebrew/headonly\n    brew install --HEAD smpeg\n    brew install sdl sdl_image sdl_mixer sdl_ttf portmidi\n    ARCHFLAGS=\"-arch i386 -arch x86_64\" brew install PIL\n    ln -s /usr/local/lib/python2.7/site-packages/cv.so /Library/Python/2.7/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.7/site-packages/PIL /Library/Python/2.7/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.7/site-packages/cv2.so /Library/Python/2.7/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.7/site-packages/cv.py /Library/Python/2.7/site-packages/cv.py\n    sudo easy_install pip\n    brew install hg\n    sudo pip install hg+http://bitbucket.org/pygame/pygame\n    curl -sO https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh && source install_superpack.sh\n    pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\nCommands (for Snow Leopard)::\n\n    mkdir ~/Code\n    cd ~/Code\n    ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)\n    brew tap homebrew/science\n\tbrew install opencv\n    brew install git\n    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi\n    ARCHFLAGS=\"-arch i386 -arch x86_64\" brew install PIL\n    ln -s /usr/local/lib/python2.6/site-packages/cv.so /Library/Python/2.6/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/PIL /Library/Python/2.6/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so /Library/Python/2.6/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.py /Library/Python/2.6/site-packages/cv.py\n    sudo easy_install pip\n    brew install hg\n    sudo pip install https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.zip\n    curl -sO https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh | source install_superpack.sh\n    pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\n\n<a id=\"windows\"><\/a>\n### Windows 7/Vista\nIf you want a streamlined install which gives you all the dependencies, we\nrecommend using the Windows Superpack, available at <http://www.simplecv.org/download/>\n\nIf you already have Python, OpenCV or SciPy installed and want to keep things the way you like them, follow the directions below\n\n\n#### Install Prerequisties if they aren't already installed on your system:\n\n* Install Python 2.7: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi\n* Install Python Setup Tools for Windows: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe\n* Install the SciPy superpack: http://sourceforge.net/projects/scipy/files/scipy/0.9.0rc5/scipy-0.9.0rc5-win32-superpack-python2.7.exe/download\n* Install the NumPy superpack: http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe/download\n* Install Pygame for windows: http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi\n\n\n\n#### Install OpenCV:\n* Download OpenCV 2.3 Superpack: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/OpenCV-2.3.1-win-superpack.exe/download\n* Run the executable file and when it ask where to extract to use::\n\n    C:\\OpenCV2.3\\\n\n\n* (OPTIONAL) Install MinGW for optional files and building openCV from source.  Make sure to include C/C++ Compiler and msys package.  (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/)\n\nOnce these are installed you need to add Python to your Path, open a command line (start->run->cmd)::\n\n    SETX PATH C:/Python27/;C:/Python27/Scripts/;C:/OpenCV2.3/opencv/build/x86/vc10/bin/;%PATH%\n    SETX PYTHONPATH C:/OpenCV2.3/opencv/build/python/2.7/;%PYTHONPATH%\n\nExit the command line and reopen so it loads the updated python paths, then run::\n\n    easy_install pyreadline\n    easy_install PIL\n    easy_install cython\n    easy_install pip\n    pip install ipython\n    pip install https://github.com/sightmachine/SimpleCV/zipball/1.3\n\n###Windows 8\n Step 1\n ------\n\nhttp://www.simplecv.org/download  => Go to this page and download SimpleCV latest stable version Superpack . It will start downloading a file named SimpleCV-(version).msi .\nThis file will be around 192mb .\n\nStep 2\n ------\n\nAfter Downloading run the file . It will start an installation window along with a command prompt window. Give yes permission and press next . First it will install python 2.7.3 .\nThen it will install numpy,scipy,Pygame,openCV and now all the normal installation windows will be closed and still there will be command prompt running . Leave it as such it will\ndownload some other file like cython and when it is finished commandpromt will display a success message \"SimpleCV installed successfully\" \"press any button in 10sec or will close\nautomatically \" . Now just press any button or wait for the count down .\n\n Step 3\n ------\n\n This is the final step and here we are confirming our SimpleCV installation. To do this open Python IDLE . Type in any of these two commands :\n\n      >>from SimpleCV import *\n             or\n      >>import SimpleCV\n\nIf this two commands works fine without any errors our installation was successfull. If some error occurs we should uninstall and restart or check\nsome forums.\n\nNOTE:- If this error is shown: \"AttributeError: 'module' object has no attribute 'csgraph_to_masked'  \" . Before this they will be showing list of paths of scipy library .\nThe solution for this is to install latest stable version of scipy for windows . www.scipy.org/Download  => we can download latest stable version of scipy for windows here.\n\n\n\n<a id=\"rasppi\"><\/a>\n#### RASPBERRY PI\n\n* [Installation instructions can be found here.](https://github.com/sightmachine/SimpleCV/blob/develop/doc/HOWTO-Install%20on%20RaspberryPi.rst)\n\n---------------------------\n<a id=\"shell\"><\/a>\n## SimpleCV Interactive Shell, or how to run SimpleCV\n\n\nOnce you have SimpleCV installed, you can use it in a specialized [IPython](http://ipython.org)\nshell.  This pre-loads all the symbols and gives you some extra functions\nand macros for using SimpleCV.\n\nTo run the SimpleCV shell, from the installation directory type:\n\n\tsimplecv\n\nIf for some reason the shell doesn't start, you can always do so manually by running:\n\n\tpython -c \"import SimpleCV.Shell;SimpleCV.Shell.main()\"\n\n\nTo run SimpleCV within an ipython notebook (ipython-notebooks are required to be installed):\n\n\tsimplecv notebook\n\n\nto install ipython notebooks run the following:\n\n\tsudo pip install tornado\n  sudo pip install pyzmq\n\n\n\n\n---------------------------\n<a id=\"videos\"><\/a>\n## Videos - Tutorials and Demos\n\nVideo tutorials and demos can be found at:\n<http://www.simplecv.org/learn/>\n\n---------------------------\n<a id=\"mobile\"><\/a>\n## SimpleCV on Mobile (Android)\n\nSimpleCV can in fact be used on a mobile device.  Although the processing requires a server to be setup that runs SimpleCV our 2012 Google Summer of Code\nstudent had built, we have forked the project and instructions on how to set it up and run it can be found at:\n<https://github.com/sightmachine/simplecv-mobile-camera>\n\n\n\n-------------------------------\n<a id=\"help\"><\/a>\n## Getting Help\n\nYou can always head over to the SimpleCV help forums to ask questions:\n(SimpleCV Help Forums) - <http://help.simplecv.org>\n\n--------------------\n<a id=\"troubleshoot\"><\/a>\n## Troubleshooting installation problems.\n\nIf for some reason the standard installation methods do not work you may have to manually install some or all of the dependencies required by SimpleCV.\n\n<a id=\"requirements\"><\/a>\n### Required Libraries\nThe installation instructions below should explain more on how to install.  They can also be installed manually.\n\n* Python 2.6+ (<http://www.python.org>)\n* SciPy (<http://www.scipy.org>)\n* NumPy (<http://numpy.scipy.org>)\n* Pygame (<http://www.pygame.org>)\n* OpenCV 2.3+ (<http://opencv.org>)\n* IPython 10+ (<http://ipython.org>)\n* PIL 1.1.7+ (<http://www.pythonware.com/products/pil/>)\n\n<a id=\"optional\"><\/a>\n### Optional Libraries\nThese libraries are NOT required to run or use SimpleCV but are needed for some of the examples if they are ran.  Some of these may be included in your systems software manager or app store.\n\n* PIP\n* BeaufitulSoup\n* webm\n* freenect (<http://openkinect.org>)\n* python nose\n* pyfirmata\n* cherrypy\n* flask\n* simplejson\n* werkzeug\n* webkit\n* gtk\n* zbar (<http://zbar.sourceforge.net/>)\n* Tesseract (<http://code.google.com/p/tesseract-ocr/>)\n* python-tesseract (<http://code.google.com/p/python-tesseract/>)\n* Orange (<http://orange.biolab.si>)\n* scikit-learn\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:1806E3:5E6BD6:6AB92C60"},"text_sha256":"9087103cfcf38739fd6e9f59a5cb69d784e558f39736689e4cd7dd6f2c213473"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1895","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:188022C:1CA6C57:6AB92C63"},"commit":{"sha":"62115cc52d5d0d26373dca28d88c6c3d6bbb5260","url":"https://github.com/sightmachine/SimpleCV/commit/62115cc52d5d0d26373dca28d88c6c3d6bbb5260","date":"2024-12-20T19:39:00Z","author_date":"2024-12-20T19:39:00Z","committer_date":"2024-12-20T19:39:00Z","tree_sha":"ae5ee747dd3078d2ef56864a1254bd2c495b362d","message_first_line":"Add warning about project not being maintained to README"},"tree_request_status":200,"tree_rate":{"github_remaining":"1894","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:180C0A7:1C320C6:6AB92C63"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":21510,"blob_sha":"9980be82305f59dbf5a304e1f9cd88e73c35df77","priority":0}],"documents":[{"path":"README.md","size":21510,"blob_sha":"9980be82305f59dbf5a304e1f9cd88e73c35df77","priority":0,"status":200,"text":"# SimpleCV\n\n> [!WARNING]  \n> This project is no longer actively maintained. For new computer vision projects, consider using alternatives like:\n> - [OpenCV](https://opencv.org/) - A powerful library for computer vision tasks with wide-ranging support and active community development.\n> - [PyTorch](https://pytorch.org/) + [TorchVision](https://pytorch.org/vision/stable/index.html) - A framework for deep learning and computer vision tasks.\n> - [TensorFlow](https://www.tensorflow.org/) - A robust ecosystem for machine learning and computer vision.\n> - [scikit-image](https://scikit-image.org/) - A lightweight image processing library for Python.\n>\n> While there are no current plans for updates, this project may be revisited in the future. For legacy projects requiring SimpleCV, the codebase is provided as-is.\n\n[![Build Status](https://travis-ci.org/sightmachine/SimpleCV.png?branch=develop)](https://travis-ci.org/sightmachine/SimpleCV)\n\n\nQuick Links:\n\n * [About](#about)\n * [Installation](#installation)\n    * [Docker] (#docker)\n    * [Ubuntu](#ubuntu-1204)\n    * [Virtual Environment](#virtualenv)\n    * [Arch Linux](#arch-linux)\n    * [Fedora](#fedora)\n    * [MacOS](#mac-os-x-106-and-above)\n    * [Windows](#windows-7vista)\n    * [Raspberry Pi](#raspberry-pi)\n * [SimpleCV Shell](#simplecv-interactive-shell-or-how-to-run-simplecv)\n * [Videos & Tutorials](#videos---tutorials-and-demos)\n * [SimpleCV on Mobile - Android](#simplecv-on-mobile-android)\n * [Help](#getting-help)\n * [Troubleshooting Installation](#troubleshooting-installation-problems)\n    * [Required Libraries](#required-libraries)\n    * [Optional Libraries](#optional-libraries)\n\n\n<a id=\"about\"><\/a>\n## About\n---------------------------\nMake computers see with SimpleCV, the Open Source Framework for Computer Vision\n\nSimpleCV is a framework for Open Source Machine Vision, using OpenCV and the Python programming language.\nIt provides a concise, readable interface for cameras, image manipulation, feature extraction, and format conversion.  Our mission is to give casual users a comprehensive interface for basic machine vision functions and an elegant programming interface for advanced users.\n\nWe like SimpleCV because:\n\n* Even beginning programmers can write simple machine vision tests\n* Cameras, video files, images, and video streams are all interoperable\n* Information on image features can be extracted, sorted and filtered easily\n* Manipulations are fast, with easy to remember names\n* Linear algebra is strictly optional\n\nHere is the simplecv \"hello world\":\n\n    import SimpleCV\n    camera = SimpleCV.Camera()\n    image = camera.getImage()\n    image.show()\n\nFor more code snippets, we recommend the [SimpleCV examples website](http://examples.simplecv.org) or looking at our example scripts in [SimpleCV/examples](http://github.com/sightmachine/SimpleCV/tree/master/SimpleCV/examples)\n\n---------------------------\n<a id=\"installation\"><\/a>\n## Installation\n\nThe easiest way to install SimpleCV is with the packages for your distribution (Windows, Mac, Linux) included on the website (http://www.simplecv.org).  Although it is tested on many platforms there maybe scenarios where it just won't work with the package installer. Below is instructions on how to install, if you have problems please see the troubleshooting section at the end of this README file.\n\n<a id=\"docker\"><\/a>\n### Docker\nThis is the recommended way of installing SimpleCV as you can be sure the environment will be setup the same exact way as it's suppose to be on your machine.\n\n*WARNING*: Using docker does not allow the webcam to work, it also doesn't work with Image.show(), so essentially requires you to use simplecv within an IPython notebook.\n\nThe first step is to install docker on your machine if you have not, this should work for Windows, Mac, and Linux, please follow instructions at:\n<a href=\"https://docs.docker.com/installation/\">https://docs.docker.com/installation/<\/a>\n\nOnce docker is installed you can run simplecv as easy as (may have to run as sudo, depending on OS):\n\n    docker pull sightmachine/simplecv\n\nIt will probably take a little while to download, but once done just run (may need to run as sudo, depending on OS):\n\n    docker run -p 54717:8888 -t -i sightmachine/simplecv\n\nThen just open your web browser and go to:\n\n    http://localhost:54717\n    \n**NOTE**: If you are using a Mac or Windows it will be a little different since you will be boot2docker to run.  When you run boot2docker up it should show the ip address of the docker service.  It could be something like 192.168.59.103, but this will change as it's random.  Once you know that ip you will just go to that IP address with the correct port instead:\n\n    http://192.168.59.103:54717\n\nYou will get a Ipython notebook inteface, start a new notebook and enter the following:\n\n    from SimpleCV import *\n    disp = Display(displaytype='notebook')\n    img = Image('simplecv')\n    img.save(disp)\n\nYou should now see the simplecv logo and now have a full simplecv environment setup to start playing around.\n\n<a id=\"ubuntu-1204\"><\/a>\n### Ubuntu 12.04\nInstall with pip\n\n\tsudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip\n\tsudo pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools git\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo pip install -r requirements.txt\n    sudo python setup.py install\n\nthen just run 'simplecv' from the shell.\n\n### Virtualenv\n\nThis is how to install SimpleCV under a python virtual environment [virtualenv] (http://www.virtualenv.org).  This maybe useful in cases where you want to keep your system libraries clean and not install extra libraries.  This method has only been tested on Ubuntu 12.04, it maybe possible to port to other operating systems.\n\nRun the following commands:\n\n    sudo apt-get install python-opencv python-setuptools python-pip gfortran g++ liblapack-dev libsdl1.2-dev libsmpeg-dev mercurial\n    sudo pip install virtualenv\n    virtualenv venv\n    cd venv\n    mkdir src\n    ln -s /usr/local/lib/python2.7/dist-packages/cv2.so lib/python2.7/site-packages/cv2.so\n    ln -s /usr/local/lib/python2.7/dist-packages/cv.py lib/python2.7/site-packages/cv.py\n    ./bin/pip install -r requirements.txt\n    mkdir src\n    wget -O src/pygame.tar.gz https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.tar.gz\n    cd src\n    tar zxvf pygame.tar.gz\n    cd ..\n    ./bin/python src/pygame-pygame-6625feb3fc7f/setup.py -setuptools install\n    ./bin/pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\n\n\n\n\n<a id=\"archlinux\"><\/a>\n### Arch Linux\nInstall using pip\n\n    pacman -S python2-numpy opencv2.4.4_1 python-pygame python2-setuptools ipython2 python2-pip\n    pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    pacman -S python2-numpy opencv2.4.4_1 python-pygame python2-setuptools ipython2\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\nInstall development version using aur\n\n    yaourt -S simplecv-git\n\n<a id=\"fedora\"><\/a>\n### Fedora\n#### Fedora 20 and above\n\n    sudo yum -y install python-SimpleCV\n\n#### Fedora 18\nInstall with pip\n\n    sudo yum -y install python-ipython opencv-python scipy numpy pygame python-setuptools python-pip\n    sudo python-pip install https://github.com/sightmachine/SimpleCV/zipball/develop\n\nInstall using clone of SimpleCV repository\n\n    sudo yum -y install python-ipython opencv-python scipy numpy pygame python-setuptools python-pip git\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\n<a id=\"macos\">\n### Mac OS X (10.6 and above)\n<\/a>\n\n**General OSX Overview**\n\nNote: We originally tried to bundle all Mac dependencies in a superpack.  This turned out to be extremely difficult with the many differences between versions of Mac OS.  Now, with Mac, you must build from source and we will try and make it as easy as possible.  Please report a bug if you have issues.\n\n\n---------------------------\n**Explicit (as in every step) instructions compliments of JHawkins**\n\n*These instructions are geared towards people who are just getting started with python development on OSX. They will walk you through setting up all the tools you need to build SimpleCV from scratch. If you don't know which instructions you want, you probably want to use these.*\n\nInstall Xcode via App Store\nStart Xcode and go to Xcode >> Preferences >> Downloads >> click Install across from Command Line Tools\nIf Terminal is already running, shut it down and reopen it\nOS X's permissions on /usr/local are too restrictive and must be changed via:\n\n    sudo chown -R `whoami` /usr/local\n\nInstall homebrew via Terminal using:\n\n    ruby -e \"$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)\"\n\nIgnore the single warning that instructs you to install Xcode's CLI tools (you did that already)\nTo verify that homebrew is installed correctly and working, run:\n\n    brew doctor\n\nAddress any errors before moving on. Remember, Google is your friend.\nNote: If you run VM's on my via Parallels and run into multiple warnings related to \"osxfuse\" thi go to System Preferences >> FUSE for OS X >> Click Remove OSXFUSE. I can add it back later if needed.\nOnce the doctor tells you that you are 'raring to brew', run:\n\n    brew update\n\nfollowed by\n\n    brew upgrade\n\nInstall OpenCV via homebrew by running:\n\n    brew tap homebrew/science\n    brew install opencv\n\nBe sure to add the requested line to you ~/.bash_profile:\n\n    export PYTHONPATH=\"/usr/local/lib/python2.7/site-packages:$PYTHONPATH\"\n\nSource your ~/.bash_profile file so that the changes take effect:\n\n    source ~/.bash_profile\n\nInstall Git via homebrew by running:\n\n    brew install git\n\nInstall SDL dependencies (can anyone clarify this?) via homebrew by running:\n\n    brew install sdl sdl_image sdl_mixer sdl_ttf portmidi\n\nInstall XQuartz from https://xquartz.macosforge.org\nHomebrew can't install smpeg at the time of this writing however there is a workaround:\n\n    brew tap homebrew/headonly\n    brew install --HEAD smpeg\n\nIf you get a connection refused error, wait a minute and try again.\nDownload PIL:\n\n    curl -O -L http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz\n\nIn the unpacked folder:\n\n    python setup.py build --force\n    sudo python setup.py install\n\nManually create a few PIL symlinks:\n\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.so /Library/Python/2.6/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/PIL /Library/Python/2.6/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so /Library/Python/2.6/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.py /Library/Python/2.6/site-packages/cv.py\n\nInstall PIP by running:\n\n    sudo easy_install pip\n\nInstall the Scipy Superpack from http://fonnesbeck.github.com/ScipySuperpack/\nInstall Mercurial via homebrew by running:\n\n     brew install mercurial\n\nInstall pygame via PIP by running:\n\n    sudo pip install hg+http://bitbucket.org/pygame/pygame\n\nInstall svgwrite by running:\n\n    sudo pip install svgwrite\n\n**Note:** SimpleCV's developers made a change (for the better) here that I am including, however everything up to this point is 100% guaranteed to work, because it's exactly what I did. Keeping true to that, I'll present both options. *We both suggest using the develop branch.*\n**Developer's Instructions** Install SimpleCV from the git repo and then run setup.\n\n    git clone https://github.com/sightmachine/SimpleCV.git\n    cd SimpleCV/\n    sudo python setup.py install\n\n**JHawkins' Instructions** Install SimpleCV via PIP by running:\n\n    sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\nTest by running simplecv in the command line:\n\n    simplecv\n\nIf it starts (it should!) be sure to check out:\n\n     example()\n\n--------------------------------\n**Lion Take Two**\n\n*This is the abridged set of the instructions. It assumes you have most of the common OSX developer tools installed like brew and pip.\nIf you don't know what Brew or Pip are you probably want to use the instructions above. For OSX Lion make sure you install Mercurial (aka hg - brew install hg). There may be errors in pygame associated with not installing X11,\nif you encounter this problem please submit an issue on github.*\n\nBefore you begin installing SimpleCV make sure you have the folliwng tools installed.\n\n* Install Xcode https://developer.apple.com/xcode/ and then run the Xcode installer.\n* Install homebrew https://github.com/mxcl/homebrew/wiki/installation\n\n\nCommands (for Lion)::\n\n    mkdir ~/Code\n    cd ~/Code\n    /usr/bin/ruby -e \"$(curl -fsSL https://raw.github.com/gist/323731)\"\n    brew tap homebrew/science\n\tbrew install opencv\n    brew install git\n    brew tap homebrew/headonly\n    brew install --HEAD smpeg\n    brew install sdl sdl_image sdl_mixer sdl_ttf portmidi\n    ARCHFLAGS=\"-arch i386 -arch x86_64\" brew install PIL\n    ln -s /usr/local/lib/python2.7/site-packages/cv.so /Library/Python/2.7/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.7/site-packages/PIL /Library/Python/2.7/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.7/site-packages/cv2.so /Library/Python/2.7/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.7/site-packages/cv.py /Library/Python/2.7/site-packages/cv.py\n    sudo easy_install pip\n    brew install hg\n    sudo pip install hg+http://bitbucket.org/pygame/pygame\n    curl -sO https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh && source install_superpack.sh\n    pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\nCommands (for Snow Leopard)::\n\n    mkdir ~/Code\n    cd ~/Code\n    ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)\n    brew tap homebrew/science\n\tbrew install opencv\n    brew install git\n    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi\n    ARCHFLAGS=\"-arch i386 -arch x86_64\" brew install PIL\n    ln -s /usr/local/lib/python2.6/site-packages/cv.so /Library/Python/2.6/site-packages/cv.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/PIL /Library/Python/2.6/site-packages/PIL\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so /Library/Python/2.6/site-packages/cv2.so\n    sudo ln -s /usr/local/lib/python2.6/site-packages/cv.py /Library/Python/2.6/site-packages/cv.py\n    sudo easy_install pip\n    brew install hg\n    sudo pip install https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.zip\n    curl -sO https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh | source install_superpack.sh\n    pip install https://github.com/sightmachine/SimpleCV/zipball/master\n\n\n<a id=\"windows\"><\/a>\n### Windows 7/Vista\nIf you want a streamlined install which gives you all the dependencies, we\nrecommend using the Windows Superpack, available at <http://www.simplecv.org/download/>\n\nIf you already have Python, OpenCV or SciPy installed and want to keep things the way you like them, follow the directions below\n\n\n#### Install Prerequisties if they aren't already installed on your system:\n\n* Install Python 2.7: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi\n* Install Python Setup Tools for Windows: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe\n* Install the SciPy superpack: http://sourceforge.net/projects/scipy/files/scipy/0.9.0rc5/scipy-0.9.0rc5-win32-superpack-python2.7.exe/download\n* Install the NumPy superpack: http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe/download\n* Install Pygame for windows: http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi\n\n\n\n#### Install OpenCV:\n* Download OpenCV 2.3 Superpack: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/OpenCV-2.3.1-win-superpack.exe/download\n* Run the executable file and when it ask where to extract to use::\n\n    C:\\OpenCV2.3\\\n\n\n* (OPTIONAL) Install MinGW for optional files and building openCV from source.  Make sure to include C/C++ Compiler and msys package.  (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/)\n\nOnce these are installed you need to add Python to your Path, open a command line (start->run->cmd)::\n\n    SETX PATH C:/Python27/;C:/Python27/Scripts/;C:/OpenCV2.3/opencv/build/x86/vc10/bin/;%PATH%\n    SETX PYTHONPATH C:/OpenCV2.3/opencv/build/python/2.7/;%PYTHONPATH%\n\nExit the command line and reopen so it loads the updated python paths, then run::\n\n    easy_install pyreadline\n    easy_install PIL\n    easy_install cython\n    easy_install pip\n    pip install ipython\n    pip install https://github.com/sightmachine/SimpleCV/zipball/1.3\n\n###Windows 8\n Step 1\n ------\n\nhttp://www.simplecv.org/download  => Go to this page and download SimpleCV latest stable version Superpack . It will start downloading a file named SimpleCV-(version).msi .\nThis file will be around 192mb .\n\nStep 2\n ------\n\nAfter Downloading run the file . It will start an installation window along with a command prompt window. Give yes permission and press next . First it will install python 2.7.3 .\nThen it will install numpy,scipy,Pygame,openCV and now all the normal installation windows will be closed and still there will be command prompt running . Leave it as such it will\ndownload some other file like cython and when it is finished commandpromt will display a success message \"SimpleCV installed successfully\" \"press any button in 10sec or will close\nautomatically \" . Now just press any button or wait for the count down .\n\n Step 3\n ------\n\n This is the final step and here we are confirming our SimpleCV installation. To do this open Python IDLE . Type in any of these two commands :\n\n      >>from SimpleCV import *\n             or\n      >>import SimpleCV\n\nIf this two commands works fine without any errors our installation was successfull. If some error occurs we should uninstall and restart or check\nsome forums.\n\nNOTE:- If this error is shown: \"AttributeError: 'module' object has no attribute 'csgraph_to_masked'  \" . Before this they will be showing list of paths of scipy library .\nThe solution for this is to install latest stable version of scipy for windows . www.scipy.org/Download  => we can download latest stable version of scipy for windows here.\n\n\n\n<a id=\"rasppi\"><\/a>\n#### RASPBERRY PI\n\n* [Installation instructions can be found here.](https://github.com/sightmachine/SimpleCV/blob/develop/doc/HOWTO-Install%20on%20RaspberryPi.rst)\n\n---------------------------\n<a id=\"shell\"><\/a>\n## SimpleCV Interactive Shell, or how to run SimpleCV\n\n\nOnce you have SimpleCV installed, you can use it in a specialized [IPython](http://ipython.org)\nshell.  This pre-loads all the symbols and gives you some extra functions\nand macros for using SimpleCV.\n\nTo run the SimpleCV shell, from the installation directory type:\n\n\tsimplecv\n\nIf for some reason the shell doesn't start, you can always do so manually by running:\n\n\tpython -c \"import SimpleCV.Shell;SimpleCV.Shell.main()\"\n\n\nTo run SimpleCV within an ipython notebook (ipython-notebooks are required to be installed):\n\n\tsimplecv notebook\n\n\nto install ipython notebooks run the following:\n\n\tsudo pip install tornado\n  sudo pip install pyzmq\n\n\n\n\n---------------------------\n<a id=\"videos\"><\/a>\n## Videos - Tutorials and Demos\n\nVideo tutorials and demos can be found at:\n<http://www.simplecv.org/learn/>\n\n---------------------------\n<a id=\"mobile\"><\/a>\n## SimpleCV on Mobile (Android)\n\nSimpleCV can in fact be used on a mobile device.  Although the processing requires a server to be setup that runs SimpleCV our 2012 Google Summer of Code\nstudent had built, we have forked the project and instructions on how to set it up and run it can be found at:\n<https://github.com/sightmachine/simplecv-mobile-camera>\n\n\n\n-------------------------------\n<a id=\"help\"><\/a>\n## Getting Help\n\nYou can always head over to the SimpleCV help forums to ask questions:\n(SimpleCV Help Forums) - <http://help.simplecv.org>\n\n--------------------\n<a id=\"troubleshoot\"><\/a>\n## Troubleshooting installation problems.\n\nIf for some reason the standard installation methods do not work you may have to manually install some or all of the dependencies required by SimpleCV.\n\n<a id=\"requirements\"><\/a>\n### Required Libraries\nThe installation instructions below should explain more on how to install.  They can also be installed manually.\n\n* Python 2.6+ (<http://www.python.org>)\n* SciPy (<http://www.scipy.org>)\n* NumPy (<http://numpy.scipy.org>)\n* Pygame (<http://www.pygame.org>)\n* OpenCV 2.3+ (<http://opencv.org>)\n* IPython 10+ (<http://ipython.org>)\n* PIL 1.1.7+ (<http://www.pythonware.com/products/pil/>)\n\n<a id=\"optional\"><\/a>\n### Optional Libraries\nThese libraries are NOT required to run or use SimpleCV but are needed for some of the examples if they are ran.  Some of these may be included in your systems software manager or app store.\n\n* PIP\n* BeaufitulSoup\n* webm\n* freenect (<http://openkinect.org>)\n* python nose\n* pyfirmata\n* cherrypy\n* flask\n* simplejson\n* werkzeug\n* webkit\n* gtk\n* zbar (<http://zbar.sourceforge.net/>)\n* Tesseract (<http://code.google.com/p/tesseract-ocr/>)\n* python-tesseract (<http://code.google.com/p/python-tesseract/>)\n* Orange (<http://orange.biolab.si>)\n* scikit-learn\n\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"171A:2E8679:17D1D9:5E35DA:6AB92C63"},"text_sha256":"fa1449a2dc73c5175f2f2489bca8b209cc884eadc08ad16c5bf828955738bd49"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"andrewssobral/bgslibrary","input_row":{"repository":"andrewssobral/bgslibrary","url":"https://github.com/andrewssobral/bgslibrary","name":"bgslibrary","owner":"andrewssobral","description":"A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2278,"issues":186,"created_at":"2014-02-16T21:35:54Z","updated_at":"2026-09-22T19:20:43Z","first_commit_at":"2014-02-16T21:35:54Z","last_commit_at":"2026-05-28T13:02:02Z","activity_months":147.28999999999999,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:00.990Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"andrewssobral/bgslibrary","visibility":"public","created_at":"2014-02-16T21:35:54Z","updated_at":"2026-09-22T19:20:43Z","private":false,"fork":false,"archived":false,"stargazers_count":2278,"open_issues_count":89,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1893","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086E:1C46F8:17D2B44:1BF87C6:6AB92C65"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1892","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:17C60A9:1BECA6B:6AB92C65"},"commit":{"sha":"e70ee95fc836c2da5076607272afc2fb31f37b35","url":"https://github.com/andrewssobral/bgslibrary/commit/e70ee95fc836c2da5076607272afc2fb31f37b35","date":"2018-05-20T16:36:40Z","author_date":"2018-05-20T16:36:40Z","committer_date":"2018-05-20T16:36:40Z","tree_sha":"400de394e44607ab9630176c790d1cbfe8970b7b","message_first_line":"Update issue templates"},"tree_request_status":200,"tree_rate":{"github_remaining":"1891","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086F:74181:1792719:1BB8F16:6AB92C65"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6785,"blob_sha":"88c4af1b034aa215d143c5f638eb36e7e42c8663","priority":0}],"documents":[{"path":"README.md","size":6785,"blob_sha":"88c4af1b034aa215d143c5f638eb36e7e42c8663","priority":0,"status":200,"text":"## BGSLibrary\nA Background Subtraction Library\n\n[![Release](https://img.shields.io/badge/Release-v2.0.0-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![Platform: Windows, Linux, OS X](https://img.shields.io/badge/Platform-Windows%2C%20Linux%2C%20OS%20X-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![OpenCV](https://img.shields.io/badge/OpenCV-2.x%2C%203.x-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![Wrapper: Python, MATLAB](https://img.shields.io/badge/Wrapper-Java%2C%20Python%2C%20MATLAB-orange.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![Algorithms](https://img.shields.io/badge/Algorithms-43-red.svg)](https://github.com/andrewssobral/bgslibrary/wiki/List-of-available-algorithms)\n\n[![bgslibrary](http://i.giphy.com/5A94AZahSIVOw.gif)](https://youtu.be/_UbERwuQ0OU)\n\nPage Update: **01/04/2017**\n\nLibrary Version: **2.0.0** (see **[Build Status](https://github.com/andrewssobral/bgslibrary/wiki/Build-status)** and **[Release Notes](https://github.com/andrewssobral/bgslibrary/wiki/Release-notes)** for more info)\n\nThe **BGSLibrary** was developed by [Andrews Sobral](http://andrewssobral.wixsite.com/home) and provides an easy-to-use C++ framework based on [OpenCV](http://www.opencv.org/) to perform foreground-background separation in videos. The bgslibrary is compatible with OpenCV 2.x and 3.x, and compiles under Windows, Linux, and Mac OS X. Currently the library contains **43** algorithms. The source code is available under [GNU GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html), the library is free and open source for academic purposes.\n\n* [List of available algorithms](https://github.com/andrewssobral/bgslibrary/wiki/List-of-available-algorithms)\n* [Algorithms benchmark](https://github.com/andrewssobral/bgslibrary/wiki/Algorithms-benchmark)\n* [Which algorithms really matter?](https://github.com/andrewssobral/bgslibrary/wiki/Which-algorithms-really-matter%3F)\n* [Library architecture](https://github.com/andrewssobral/bgslibrary/wiki/Library-architecture)\n\n* Installation instructions\n\n* * [Windows installation](https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions---Windows)\n\n* * [Ubuntu / OS X installation](https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions-Ubuntu-or-OSX)\n\n* Graphical User Interface:\n\n*  * [C++ QT](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-QT) ***(NEW)***\n*  * [C++ MFC](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-MFC)\n*  * [Java](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-Java)\n\n* Wrappers:\n\n*  * [Python](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-Python) ***(NEW)***\n*  * [MATLAB](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-MATLAB) ***(NEW)***\n*  * [Java](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-Java) ***(NEW)***\n\n* [Docker images](https://github.com/andrewssobral/bgslibrary/wiki/Docker-images)\n* [How to integrate BGSLibrary in your own CPP code](https://github.com/andrewssobral/bgslibrary/wiki/How-to-integrate-BGSLibrary-in-your-own-CPP-code)\n* [How to contribute](https://github.com/andrewssobral/bgslibrary/wiki/How-to-contribute)\n* [List of collaborators](https://github.com/andrewssobral/bgslibrary/wiki/List-of-collaborators)\n* [Release notes](https://github.com/andrewssobral/bgslibrary/wiki/Release-notes)\n\n\nCitation\n--------\n\nIf you use this library for your publications, please cite it as:\n```\n@inproceedings{bgslibrary,\nauthor    = {Sobral, Andrews},\ntitle     = {{BGSLibrary}: An OpenCV C++ Background Subtraction Library},\nbooktitle = {IX Workshop de Visão Computacional (WVC'2013)},\naddress   = {Rio de Janeiro, Brazil},\nyear      = {2013},\nmonth     = {Jun},\nurl       = {https://github.com/andrewssobral/bgslibrary}\n}\n```\nA chapter about the BGSLibrary has been published in the handbook on [Background Modeling and Foreground Detection for Video Surveillance](https://sites.google.com/site/backgroundmodeling/).\n```\n@incollection{bgslibrarychapter,\nauthor    = {Sobral, Andrews and Bouwmans, Thierry},\ntitle     = {BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation},\nbooktitle = {Background Modeling and Foreground Detection for Video Surveillance},\npublisher = {CRC Press, Taylor and Francis Group.}\nyear      = {2014},\n}\n```\n\n\nDownload PDF:\n* Sobral, Andrews. BGSLibrary: An OpenCV C++ Background Subtraction Library. IX Workshop de Visão Computacional (WVC'2013), Rio de Janeiro, Brazil, Jun. 2013. ([PDF](http://www.researchgate.net/publication/257424214_BGSLibrary_An_OpenCV_C_Background_Subtraction_Library) in brazilian-portuguese containing an english abstract).\n\n* Sobral, Andrews; Bouwmans, Thierry. \"BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation\". Chapter on the handbook \"Background Modeling and Foreground Detection for Video Surveillance\", CRC Press, Taylor and Francis Group, 2014. ([PDF](http://www.researchgate.net/publication/257424214_BGSLibrary_An_OpenCV_C_Background_Subtraction_Library) in english).\n\n\nSome references\n---------------\n\nSome algorithms of the BGSLibrary were used successfully in the following papers: \n\n* (2014) Sobral, Andrews; Vacavant, Antoine. A comprehensive review of background subtraction algorithms evaluated with synthetic and real videos. Computer Vision and Image Understanding (CVIU), 2014. ([Online](http://dx.doi.org/10.1016/j.cviu.2013.12.005)) ([PDF](http://www.researchgate.net/publication/259340906_A_comprehensive_review_of_background_subtraction_algorithms_evaluated_with_synthetic_and_real_videos))\n\n* (2013) Sobral, Andrews; Oliveira, Luciano; Schnitman, Leizer; Souza, Felippe. (**Best Paper Award**) Highway Traffic Congestion Classification Using Holistic Properties. In International Conference on Signal Processing, Pattern Recognition and Applications (SPPRA'2013), Innsbruck, Austria, Feb 2013. ([Online](http://dx.doi.org/10.2316/P.2013.798-105)) ([PDF](http://www.researchgate.net/publication/233427564_HIGHWAY_TRAFFIC_CONGESTION_CLASSIFICATION_USING_HOLISTIC_PROPERTIES))\n\n\nVideos\n------\n\n<p align=\"center\">\n<a href=\"https://www.youtube.com/watch?v=_UbERwuQ0OU\" target=\"_blank\">\n<img src=\"https://sites.google.com/site/andrewssobral/bgslibrary_qt_gui_video.png?width=600\" border=\"0\" />\n<\/a>\n<\/p>\n\n<p align=\"center\">\n<a href=\"https://www.youtube.com/watch?v=Ccqa9KBO9_U\" target=\"_blank\">\n<img src=\"https://sites.google.com/site/andrewssobral/bgslibrary_youtube.png?width=600\" border=\"0\" />\n<\/a>\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F34C:24970A:1858A6:5EBCE3:6AB92C65"},"text_sha256":"2f99c6534e37dfd90674602d1c4ce35944acf4270326bca33564884930114eda"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1890","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:179143C:1BB6062:6AB92C66"},"commit":{"sha":"5acc575246716005fc911384e9ca0ab25ea52de5","url":"https://github.com/andrewssobral/bgslibrary/commit/5acc575246716005fc911384e9ca0ab25ea52de5","date":"2026-05-28T13:02:02Z","author_date":"2026-05-28T13:02:02Z","committer_date":"2026-05-28T13:02:02Z","tree_sha":"140ac5cfed6d997a081766535c6a73c777d88563","message_first_line":"fix(python): install pybgs on Windows by dropping UNIX-only gate (#238)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1889","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:17F1E61:1C18479:6AB92C66"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20061,"blob_sha":"81492e2e0e1c712e17919c7dfc394693a8c8404a","priority":0}],"documents":[{"path":"README.md","size":20061,"blob_sha":"81492e2e0e1c712e17919c7dfc394693a8c8404a","priority":0,"status":200,"text":"<p align=\"center\">\n<img src=\"https://github.com/andrewssobral/bgslibrary/blob/master/docs/images/bgslibrary-logo.jpg?raw=true\" alt=\"BGSLibrary\" width=\"200\">\n<\/p>\n\n# BGSLibrary: A Background Subtraction Library\n\n[![Release](https://img.shields.io/badge/Release-3.3.1-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Platform: Windows, Linux, OS X](https://img.shields.io/badge/Platform-Windows%2C%20Linux%2C%20OS%20X-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![OpenCV](https://img.shields.io/badge/OpenCV-2.4.x%2C%203.x%2C%204.x-blue.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![Wrapper: Python, MATLAB](https://img.shields.io/badge/Wrapper-Java%2C%20Python%2C%20MATLAB-orange.svg)](https://github.com/andrewssobral/bgslibrary/wiki/Build-status) [![Algorithms](https://img.shields.io/badge/Algorithms-43-red.svg)](https://github.com/andrewssobral/bgslibrary/wiki/List-of-available-algorithms) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/andrewssobral/bgslibrary)\n\n<p align=\"center\">\n<a href=\"https://youtu.be/_UbERwuQ0OU\" target=\"_blank\">\n<img src=\"https://raw.githubusercontent.com/andrewssobral/bgslibrary/master/docs/images/bgs_giphy2.gif\" border=\"0\" />\n<\/a>\n<\/p>\n\n## Introduction\n\nThe **BGSLibrary** (Background Subtraction Library) is a comprehensive C++ framework designed for background subtraction in computer vision applications, particularly for detecting moving objects in video streams. It provides an easy-to-use and extensible platform for researchers and developers to experiment with and implement various background subtraction techniques.\n\n## Library Version\n\n**3.3.1** (see **[Build Status](https://github.com/andrewssobral/bgslibrary/wiki/Build-status)** and **[Release Notes](https://github.com/andrewssobral/bgslibrary/wiki/Release-notes)** for more info)\n\n## Background and Development\n\nThe BGSLibrary was developed in early 2012 by [Andrews Cordolino Sobral](http://andrewssobral.wixsite.com/home) as a C++ framework with wrappers available for Python, Java, and MATLAB. It aims to facilitate foreground-background separation in videos using the OpenCV library.\n\n## Compatibility\n\nThe library is compatible with OpenCV versions 2.4.x, 3.x, and 4.x. It can be compiled and used on Windows, Linux, and Mac OS X systems.\n\n## Licensing\n\nThe library's source code is available under the [MIT license](https://opensource.org/licenses/MIT), making it free for both academic and commercial use.\n\n## Getting started\n\n* [List of available algorithms](https://github.com/andrewssobral/bgslibrary/wiki/List-of-available-algorithms)\n* [Algorithms benchmark](https://github.com/andrewssobral/bgslibrary/wiki/Algorithms-benchmark)\n* [Which algorithms really matter?](https://github.com/andrewssobral/bgslibrary/wiki/Which-algorithms-really-matter%3F)\n* [Library architecture](https://github.com/andrewssobral/bgslibrary/wiki/Library-architecture)\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/andrewssobral/bgslibrary)\n\n```cpp\n#include <iostream>\n#include <algorithm>\n#include <iterator>\n#include <vector>\n\n// Include the OpenCV and BGSLibrary libraries\n#include <opencv2/opencv.hpp>\n#include <bgslibrary/algorithms/algorithms.h>\n\nint main( int argc, char** argv )\n{\n    // Gets the names of the background subtraction algorithms registered in the BGSLibrary factory\n    auto algorithmsName = BGS_Factory::Instance()->GetRegisteredAlgorithmsName();\n\n    // Displays the number of available background subtraction algorithms in the BGSLibrary\n    std::cout << \"Number of available algorithms: \" << algorithmsName.size() << std::endl;\n\n    // Displays the list of available background subtraction algorithms in the BGSLibrary\n    std::cout << \"List of available algorithms:\" << std::endl;\n    std::copy(algorithmsName.begin(), algorithmsName.end(), std::ostream_iterator<std::string>(std::cout, \"\\n\"));\n\n    // Returns 0 to indicate that the execution was successful\n    return 0;\n}\n```\n\n### Installation instructions\n\nYou can either install BGSLibrary via [pre-built binary package](https://github.com/andrewssobral/bgslibrary/releases) or build it from source.\n\n**Building from source? Clone with submodules.** BGSLibrary bundles `pybind11` as a git submodule (used by the\nPython wrapper), so clone recursively:\n\n```bash\ngit clone --recursive https://github.com/andrewssobral/bgslibrary.git\n```\n\nAlready cloned without `--recursive`? Fetch the submodule with:\n\n```bash\ngit submodule update --init --recursive\n```\n\n> The `pip install pybgs` path below does **not** need this — the published PyPI package already bundles `pybind11`.\n\nSupported Compilers:\n\n* GCC 4.8 and above\n* Clang 3.4 and above\n* MSVC 2015, 2017, 2019 or newer\n\nOther compilers might work, but are not officially supported.\nThe bgslibrary requires some features from the ISO C++ 2014 standard.\n\n#### 🐍 Python wrapper (`pybgs`) via pip — quickest for Python users\n\nIf you only need the Python bindings, install the published package:\n\n```bash\npip install pybgs\n```\n\nThe same package is also published under the name [`bgslibrary`](https://pypi.org/project/bgslibrary/)\n(`pip install bgslibrary`) — either way the importable module is always `pybgs`.\n\nMinimal usage (background subtraction on a video):\n\n```python\nimport cv2\nimport pybgs as bgs\n\nalgorithm = bgs.FrameDifference()          # see the note below on which algorithms are available\ncapture = cv2.VideoCapture(\"dataset/video.avi\")\nwhile True:\n    ok, frame = capture.read()\n    if not ok:\n        break\n    fg_mask = algorithm.apply(frame)             # foreground mask (CV_8UC1)\n    bg_model = algorithm.getBackgroundModel()    # current background model\n    cv2.imshow(\"frame\", frame)\n    cv2.imshow(\"foreground\", fg_mask)\n    cv2.imshow(\"background\", bg_model)\n    if cv2.waitKey(10) & 0xFF == 27:             # Esc to quit (mask for 64-bit platforms)\n        break\ncv2.destroyAllWindows()\n```\n\nRunnable demos: [`demo.py`](demo.py), [`demo2.py`](demo2.py), and the\n[Python examples repo](https://github.com/andrewssobral/bgslibrary-examples-python).\n\n> [!IMPORTANT]\n> - `pip install pybgs` **builds from source**, so it needs a C++ compiler **and an OpenCV\n>   development install** on your machine (e.g. `libopencv-dev` on Ubuntu, `brew install opencv` on\n>   macOS). If you don't have OpenCV, prefer the **Pixi** build below — it provides OpenCV for you.\n> - **The available algorithms depend on the OpenCV `pybgs` was *compiled* against — not on your\n>   `opencv-python`/`cv2` version.** On OpenCV ≥ 4 the `DP*`/`T2F*` family is unavailable (26\n>   algorithms vs ~39 on OpenCV 2/3 — see the [compatibility table](#algorithm-compatibility-across-opencv-versions)).\n>   Always gate on the binding, e.g. `if hasattr(bgs, \"DPAdaptiveMedian\"): ...`, never on `cv2.__version__`.\n\n#### 🚀 Build Using Pixi (Recommended)\n\nPixi provides a clean and reproducible way to build BGSLibrary with no manual OpenCV installation. It works on **macOS, Linux, and Windows (WSL recommended).**\n\n##### 0. Install Pixi\n\n```bash\ncurl -fsSL https://pixi.sh/install.sh | sh\n```\n\nRestart your terminal after installation.\n\n##### 1. Dependencies and build tasks are preconfigured\n\nThe repository already ships a `pixi.toml` that declares all build\ndependencies — OpenCV, CMake, Ninja, compilers and pkg-config, plus\nPython and NumPy for the Python wrapper — and all the build tasks used\nbelow. Just clone the repository (recursively — see [above](#installation-instructions)); there is no need to\nrun `pixi init` or add anything by hand.\n\nList the available tasks at any time with:\n\n```bash\npixi task list\n```\n\n##### 2. Activate the Pixi environment\n\n```bash\npixi shell\n```\n\n##### 3. Configure the build\n\n```bash\npixi run configure\n```\n\n##### 4. Build bgslibrary\n\n```bash\npixi run build\n```\n\nThis generates:\n- `build/bgslibrary`\n- `build/libbgslibrary_core.*`\n\n##### 5. Build the Python wrapper (pybgs)\n\nTo build and use the Python bindings (`import pybgs`):\n\n```bash\npixi run build_python     # configure + build pybgs (BGS_PYTHON_SUPPORT=ON, into build_py/)\npixi run install_python   # install pybgs into the Pixi environment's site-packages\npython -c \"import pybgs\"  # verify the import works\n```\n\n`pybgs` is compiled against the OpenCV, Python and NumPy provided by the\nPixi environment, so no system Python or OpenCV installation is required.\n\n##### 6. Build C++ examples (optional)\n\n```bash\npixi run build_examples\n```\n\nThis produces:\n- `examples/build/bgs_demo`\n- `examples/build/bgs_demo2`\n\n##### 7. Run bgslibrary\n\nCamera demo:\n\n```bash\npixi run run\n```\n\nDemo using a video file:\n\n```bash\npixi run run_bgs_demo\n```\n\nDemo using an image sequence:\n\n```bash\npixi run run_bgs_demo2\n```\n\n##### 8. Install bgslibrary into the Pixi environment (optional)\n\n```bash\npixi run install\n```\n\nThe library and headers go into `.pixi/envs/default/`\n\nYou can then use bgslibrary from other CMake projects in the same environment, for example:\n\n```cmake\nfind_package(BGSLibrary REQUIRED)\n```\n\n##### 9. Clean and rebuild\n\nTo clean build artifacts:\n\n```bash\npixi run clean          # Clean main build\npixi run clean_examples # Clean examples\n```\n\nTo rebuild everything from scratch:\n\n```bash\npixi run rebuild     # Rebuild main project\npixi run rebuild_all # Rebuild main project + examples\n```\n\nThese tasks automatically handle dependencies, ensuring a consistent build state.\n\n#### 🛠 Build Using CMake (Classic Method)\n\n* [Windows installation](https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions---Windows)\n* [Ubuntu / OS X installation](https://github.com/andrewssobral/bgslibrary/wiki/Installation-instructions-Ubuntu-or-OSX)\n\n### Troubleshooting\n\n- **`pip install pybgs` fails to build / cannot find OpenCV** — it compiles from source and needs a C++\n  compiler and OpenCV development files. Install OpenCV (`libopencv-dev` on Ubuntu, `brew install opencv` on\n  macOS) and a compiler, or use the Pixi build above, which provides OpenCV for you.\n- **`AttributeError: module 'pybgs' has no attribute 'DPAdaptiveMedian'`** (or another `DP*`/`T2F*` algorithm) —\n  those algorithms only compile on OpenCV 2.x/3.x, so they are absent when `pybgs` was built against OpenCV ≥ 4.\n  Check availability with `hasattr(bgs, \"DPAdaptiveMedian\")`; to use them, build against OpenCV 2/3 (see the\n  compatibility table below).\n- **`import cv2` raises an ABI / NumPy error with OpenCV 3.4.x** — `numpy 2.x` is incompatible with the older\n  `opencv-python 3.4.x`; pin `numpy<2` in that environment.\n\n### Graphical User Interface\n\n* [C++ QT](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-QT) ***(Official)***\n* [C++ MFC](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-MFC) ***(Deprecated)***\n* [Java](https://github.com/andrewssobral/bgslibrary/wiki/Graphical-User-Interface:-Java) ***(Obsolete)***\n\n### Wrappers\n\n* [Python](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-Python) [![Downloads](https://static.pepy.tech/badge/pybgs)](https://pepy.tech/project/pybgs) [![Downloads](https://static.pepy.tech/badge/pybgs/month)](https://pepy.tech/project/pybgs) [![Downloads](https://static.pepy.tech/badge/pybgs/week)](https://pepy.tech/project/pybgs)\n* [MATLAB](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-MATLAB)\n* [Java](https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-Java)\n\n### Usage examples\n\n* BGSlibrary examples folder\n* * <https://github.com/andrewssobral/bgslibrary/tree/master/examples>\n* BGSlibrary examples in C++\n* * <https://github.com/andrewssobral/bgslibrary-examples-cpp>\n* BGSlibrary examples in Python\n* * <https://github.com/andrewssobral/bgslibrary-examples-python>\n\n### More\n\n* [Docker images](https://github.com/andrewssobral/bgslibrary/wiki/Docker-images)\n* [How to integrate BGSLibrary in your own CPP code](https://github.com/andrewssobral/bgslibrary/wiki/How-to-integrate-BGSLibrary-in-your-own-CPP-code)\n* [How to contribute](https://github.com/andrewssobral/bgslibrary/wiki/How-to-contribute)\n* [List of collaborators](https://github.com/andrewssobral/bgslibrary/wiki/List-of-collaborators)\n* [Release notes](https://github.com/andrewssobral/bgslibrary/wiki/Release-notes)\n\n## Algorithm compatibility across OpenCV versions\n\n| Algorithm | OpenCV < 3.0 (42) | 3.0 <= OpenCV <= 3.4.7 (41) | 3.4.7 < OpenCV < 4.0 (39) | OpenCV >= 4.0 (26) |\n|--------------------------------|:-----------:|:----------------------:|:---------------------:|:------------:|\n| AdaptiveBackgroundLearning | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| AdaptiveSelectiveBackgroundLearning | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| CodeBook | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| DPAdaptiveMedian | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPEigenbackground | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPGrimsonGMM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPMean | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPPratiMediod | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPTexture | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPWrenGA | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| DPZivkovicAGMM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| FrameDifference | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| FuzzyChoquetIntegral | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| FuzzySugenoIntegral | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| GMG | :heavy_check_mark: | :x: | :x: | :x: |\n| IndependentMultimodal | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| KDE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| KNN | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LBAdaptiveSOM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LBFuzzyAdaptiveSOM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LBFuzzyGaussian | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LBMixtureOfGaussians | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LBP_MRF | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |\n| LBSimpleGaussian | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| LOBSTER | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| MixtureOfGaussianV1 | :heavy_check_mark: | :x: | :x: | :x: |\n| MixtureOfGaussianV2 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| MultiCue | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| MultiLayer | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |\n| PAWCS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| PixelBasedAdaptiveSegmenter | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| SigmaDelta | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| StaticFrameDifference | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| SuBSENSE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| T2FGMM_UM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| T2FGMM_UV | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| T2FMRF_UM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| T2FMRF_UV | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |\n| TwoPoints | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| ViBe | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| VuMeter | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| WeightedMovingMean | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n| WeightedMovingVariance | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/andrewssobral/bgslibrary.svg)](https://starchart.cc/andrewssobral/bgslibrary)\n\n## Citation\n\nIf you use this library for your publications, please cite it as:\n\n```\n@inproceedings{bgslibrary,\nauthor    = {Sobral, Andrews},\ntitle     = {{BGSLibrary}: An OpenCV C++ Background Subtraction Library},\nbooktitle = {IX Workshop de Visão Computacional (WVC'2013)},\naddress   = {Rio de Janeiro, Brazil},\nyear      = {2013},\nmonth     = {Jun},\nurl       = {https://github.com/andrewssobral/bgslibrary}\n}\n```\n\nA chapter about the BGSLibrary has been published in the handbook on [Background Modeling and Foreground Detection for Video Surveillance](https://sites.google.com/site/backgroundsubtraction/).\n\n```\n@incollection{bgslibrarychapter,\nauthor    = {Sobral, Andrews and Bouwmans, Thierry},\ntitle     = {BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation},\nbooktitle = {Background Modeling and Foreground Detection for Video Surveillance},\npublisher = {CRC Press, Taylor and Francis Group.}\nyear      = {2014},\n}\n```\n\n## References\n\n* Sobral, Andrews. BGSLibrary: An OpenCV C++ Background Subtraction Library. IX Workshop de Visão Computacional (WVC'2013), Rio de Janeiro, Brazil, Jun. 2013. ([PDF](http://www.researchgate.net/publication/257424214_BGSLibrary_An_OpenCV_C_Background_Subtraction_Library) in brazilian-portuguese containing an english abstract).\n\n* Sobral, Andrews; Bouwmans, Thierry. \"BGS Library: A Library Framework for Algorithm’s Evaluation in Foreground/Background Segmentation\". Chapter on the handbook \"Background Modeling and Foreground Detection for Video Surveillance\", CRC Press, Taylor and Francis Group, 2014. ([PDF](http://www.researchgate.net/publication/257424214_BGSLibrary_An_OpenCV_C_Background_Subtraction_Library) in english).\n\nSome algorithms of the BGSLibrary were used successfully in the following papers:\n\n* (2014) Sobral, Andrews; Vacavant, Antoine. A comprehensive review of background subtraction algorithms evaluated with synthetic and real videos. Computer Vision and Image Understanding (CVIU), 2014. ([Online](http://dx.doi.org/10.1016/j.cviu.2013.12.005)) ([PDF](http://www.researchgate.net/publication/259340906_A_comprehensive_review_of_background_subtraction_algorithms_evaluated_with_synthetic_and_real_videos))\n\n* (2013) Sobral, Andrews; Oliveira, Luciano; Schnitman, Leizer; Souza, Felippe. (**Best Paper Award**) Highway Traffic Congestion Classification Using Holistic Properties. In International Conference on Signal Processing, Pattern Recognition and Applications (SPPRA'2013), Innsbruck, Austria, Feb 2013. ([Online](http://dx.doi.org/10.2316/P.2013.798-105)) ([PDF](http://www.researchgate.net/publication/233427564_HIGHWAY_TRAFFIC_CONGESTION_CLASSIFICATION_USING_HOLISTIC_PROPERTIES))\n\n## Videos\n\n<p align=\"center\">\n<a href=\"https://www.youtube.com/watch?v=_UbERwuQ0OU\" target=\"_blank\">\n<img src=\"https://raw.githubusercontent.com/andrewssobral/bgslibrary/master/docs/images/bgslibrary_qt_gui_video.png\" width=\"600\" border=\"0\" />\n<\/a>\n<\/p>\n\n<p align=\"center\">\n<a href=\"https://www.youtube.com/watch?v=Ccqa9KBO9_U\" target=\"_blank\">\n<img src=\"https://raw.githubusercontent.com/andrewssobral/bgslibrary/master/docs/images/bgslibrary_youtube.png\" width=\"600\" border=\"0\" />\n<\/a>\n<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2FDC:3D501:185C68:5EC33A:6AB92C67"},"text_sha256":"49b444e97b147a10c6ef126e0956e8142e31ae26adca5c66239a4a7887d0a4d7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"MRPT/mrpt","input_row":{"repository":"MRPT/mrpt","url":"https://github.com/MRPT/mrpt","name":"mrpt","owner":"MRPT","description":":zap: The Mobile Robot Programming Toolkit (MRPT)","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2162,"issues":588,"created_at":"2013-10-19T21:09:23Z","updated_at":"2026-09-27T08:27:06Z","first_commit_at":"2010-06-03T14:48:23Z","last_commit_at":"2026-09-27T08:26:59Z","activity_months":195.78999999999999,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:04.461Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MRPT/mrpt","visibility":"public","created_at":"2013-10-19T21:09:23Z","updated_at":"2026-09-27T08:27:06Z","private":false,"fork":false,"archived":false,"stargazers_count":2162,"open_issues_count":30,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1888","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17DD08D:1C03854:6AB92C68"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1887","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0920:1DB627:18805FE:1CA70F5:6AB92C68"},"commit":{"sha":"0c47727d2e8c09a0eb7e2a45466c49bdad73bad7","url":"https://github.com/MRPT/mrpt/commit/0c47727d2e8c09a0eb7e2a45466c49bdad73bad7","date":"2018-05-15T11:11:54Z","author_date":"2018-05-09T16:13:38Z","committer_date":"2018-05-15T11:11:54Z","tree_sha":"5baeff7c2b0fd4b5e5517954e946814837337663","message_first_line":"Updates for ExprTk."},"tree_request_status":200,"tree_rate":{"github_remaining":"1886","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0826:35D5A8:17E039B:1C06C5E:6AB92C69"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6209,"blob_sha":"5a850e07b6662cc7783b58cfa398ee5b4d5095e9","priority":0}],"documents":[{"path":"README.md","size":6209,"blob_sha":"5a850e07b6662cc7783b58cfa398ee5b4d5095e9","priority":0,"status":200,"text":"<h1 align=\"center\">The MRPT project<\/h1>\n\n<table>\n <tr>\n  <td>gcc/clang<\/td>\n  <td><a href=\"https://travis-ci.org/MRPT/mrpt\" alt=\"Travis:gcc,clang\"><img src=\"https://travis-ci.org/MRPT/mrpt.png?branch=master\" /><\/a><\/td>\n  <td>MSVC<\/td>\n  <td><a href=\"https://ci.appveyor.com/project/jlblancoc/mrpt-k05a9\" alt=\"AppVeyor:msvc\"><img src=\"https://ci.appveyor.com/api/projects/status/yjs4lpj02f6a1ylg?svg=true\" /><\/a><\/td>\n  <td><a href=\"https://codecov.io/gh/MRPT/mrpt\" alt=\"codecov\"><img src=\"https://codecov.io/gh/MRPT/mrpt/branch/master/graph/badge.svg\" /><\/a><\/td>\n  <td><a href=\"https://gitter.im/MRPT/mrpt\" alt=\"Gitter\"><img src=\"https://badges.gitter.im/Join%20Chat.svg\" /><\/a><\/td>\n  <td><a href=\"https://www.codetriage.com/mrpt/mrpt\" alt=\"Open Source Helpers\"><img src=\"https://www.codetriage.com/mrpt/mrpt/badges/users.svg\" /><\/a><\/td>\n <\/tr>\n <tr>\n  <td>GH<\/td>\n  <td><a href=\"https://github.com/MRPT/mrpt/releases\" alt=\"GitHub\"><img src=\"https://img.shields.io/github/downloads/mrpt/mrpt/total.svg\" /><\/a><\/td>\n  <td>SF(datasets)<\/td>\n  <td><a href=\"https://sourceforge.net/projects/mrpt/files/\" alt=\"SourceForge\"><img src=\"https://img.shields.io/sourceforge/dt/mrpt.svg\" /><\/a><\/td>\n  <td>Stable<\/td>\n  <td><a href=\"https://github.com/MRPT/mrpt/releases\" alt=\"Releases\"><img src=\"https://img.shields.io/github/release/MRPT/mrpt.svg\" /><\/a><\/td>\n\n<\/tr>\n<\/table>\n\n\n## 1. Introduction\n<img align=\"right\" src=\"https://mrpt.github.io/imgs/mrpt-videos-mix2.gif\">\n\nMobile Robot Programming Toolkit (MRPT) provides C++ libraries aimed at researchers\nin mobile robotics and computer vision. Libraries include [SLAM solutions](http://www.mrpt.org/List_of_SLAM_algorithms), [3D(6D) geometry](http://www.mrpt.org/tutorials/programming/maths-and-geometry/2d_3d_geometry/), [SE(2)/SE(3) Lie groups](http://ingmec.ual.es/~jlblanco/papers/jlblanco2010geometry3D_techrep.pdf),\n[probability density functions (pdfs)](http://reference.mrpt.org/stable/classmrpt_1_1utils_1_1_c_probability_density_function.html) over points, landmarks, poses and maps,\nBayesian inference ([Kalman filters](http://www.mrpt.org/Kalman_Filters), [particle filters](http://www.mrpt.org/tutorials/programming/statistics-and-bayes-filtering/particle_filters/)), [image processing](http://www.mrpt.org/tutorials/programming/images-image-processing-camera-models/), [obstacle avoidance](http://www.mrpt.org/Obstacle_avoidance), [etc](http://reference.mrpt.org/devel/modules.html).\nMRPT also provides GUI apps for [Stereo camera calibration](http://www.mrpt.org/list-of-mrpt-apps/application-kinect-stereo-calib/), [dataset inspection](http://www.mrpt.org/list-of-mrpt-apps/rawlogviewer/),\nand [much more](http://www.mrpt.org/list-of-mrpt-apps/).\n\n## 2. Resources\n  * Download the latest unstable code with: `git clone https://github.com/MRPT/mrpt.git --depth 1`\n  * Ask questions at: [this Google group](http://www.mrpt.org/forum/) or at [stackoverflow](http://stackoverflow.com/search?q=mrpt) (please, use the tag `mrpt`!)\n  * [Main project website](http://www.mrpt.org/), including [sources and Windows installer downloads](http://www.mrpt.org/download-mrpt/)\n  * [C++ API reference](http://reference.mrpt.org/)\n  * ROS packages: [`mrpt_navigation`](http://wiki.ros.org/mrpt_navigation), [`mrpt_slam`](http://wiki.ros.org/mrpt_slam)\n  * [Bindings documentation](https://github.com/MRPT/mrpt/wiki) (Python, Matlab)\n  * Source code for [dozens of examples](http://www.mrpt.org/tutorials/mrpt-examples/)\n  * Example configuration files for  MRPT applications can be found at:\n     [MRPT/share/mrpt/config_files](https://github.com/MRPT/mrpt/tree/master/share/mrpt/config_files)\n  * Some sample datasets are stored in:\n     [MRPT/share/mrpt/datasets](https://github.com/MRPT/mrpt/tree/master/share/mrpt/datasets).\n    A more complete dataset repository is [available online](http://www.mrpt.org/robotics_datasets).\n  * [How to contribute](https://github.com/MRPT/mrpt/blob/master/.github/CONTRIBUTING.md) with your code for new feaures, bug fixes, etc.\n\n## 3. Install\n\n### 3.1. Ubuntu\n\nSee [PPA](https://launchpad.net/~joseluisblancoc/+archive/ubuntu/mrpt) for mrpt 2.0 branch (for mrpt 1.5.* [read here](https://github.com/MRPT/mrpt/tree/mrpt-1.5#31-ubuntu-ppa)).\n\n        sudo add-apt-repository ppa:joseluisblancoc/mrpt\n        sudo apt-get update\n        sudo apt-get install libmrpt-dev mrpt-apps\n\nSupported distributions:\n  * Ubuntu 18.04 Bionic\n  * Ubuntu 17.10 Artful (EOL: July 2018)\n  * Ubuntu 16.04LTS Xenial (EOL: April 2021)\n  \t* Using 16.04 requires installing gcc-7 due to some bugs in gcc-5:\n\n        add-apt-repository ppa:ubuntu-toolchain-r/test\n        apt-get update\n        apt-get install -y g++-7\n\n\n### 3.2. Build from sources\n\nMinimum compiler requisites:\n  * mrpt >=2.0 (`master` branch):\n    * gcc-7 or newer.\n      * Ubuntu 18.04LTS Bionic: Its default gcc version is ok.\n      * Ubuntu 16.04LTS Xenial: [Instructions](https://gist.github.com/jlblancoc/99521194aba975286c80f93e47966dc5) for installing gcc-7 in this version of Ubuntu.\n    * clang-4 or newer.\n    * Windows: Visual Studio 2017 version 15.3 or newer.\n    * cmake >= 3.3 required (>=3.4 for Windows).\n  * mrpt 1.5.* and maintenance `mrpt-1.5` branch:\n    * Ubuntu 14.04LTS Trusty: default gcc/clang versions\n    * Windows: Visual Studio 2012\n    * cmake >= 3.1 required\n    * **EOL** for `mrpt-1.5.*`: April 2019.\n\nTo build in Debian/Ubuntu follow the steps below. See [full build docs](http://www.mrpt.org/Building_and_Installing_Instructions) online\nfor Windows instructions or to learn all the details.\n\n  * Install minimum recommended dependencies:\n\n```bash\nsudo apt install build-essential pkg-config cmake libwxgtk3.0-dev \\\nlibopencv-dev libeigen3-dev libgtest-dev\n```\n\n  * Install additional dependencies to enable all MRPT features:\n\n```bash\nsudo apt install libftdi-dev freeglut3-dev zlib1g-dev libusb-1.0-0-dev \\\nlibudev-dev libfreenect-dev libdc1394-22-dev libavformat-dev libswscale-dev \\\nlibassimp-dev libjpeg-dev   libsuitesparse-dev libpcap-dev liboctomap-dev\n```\n\n  * Build with `cmake` as usual:\n\n```bash\nmkdir build && cd build\ncmake ..\nmake\n```\n\n## 4. License\nMRPT is released under the [new BSD license](http://www.mrpt.org/License/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59D2:09ED:E622D:3F829A:6AB92C6A"},"text_sha256":"480ac91a5b20ffdf8e169c2f21c4989b954e4bff4ff19ab8146751484982370a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1885","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078A:6E4BB:180C53D:1C32603:6AB92C6A"},"commit":{"sha":"68f828f9b5f5a03f1d36ffc14611c577536f4e4c","url":"https://github.com/MRPT/mrpt/commit/68f828f9b5f5a03f1d36ffc14611c577536f4e4c","date":"2026-06-29T11:21:55Z","author_date":"2026-06-29T11:21:55Z","committer_date":"2026-06-29T11:21:55Z","tree_sha":"a9b5a1fd5832cdfe4e283c99836806b11d9c8521","message_first_line":"chore: clean warnings"},"tree_request_status":200,"tree_rate":{"github_remaining":"1884","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0888:0BA1:D96423:FF783A:6AB92C6A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":71624,"blob_sha":"65a18ec5492f0f01df9e91df622b87f6837f4527","priority":0}],"documents":[{"path":"README.md","size":71624,"blob_sha":"65a18ec5492f0f01df9e91df622b87f6837f4527","priority":0,"status":200,"text":"<div align=\"center\">\n\n# Mobile Robot Programming Toolkit\n\n**Two decades of open-source robotics — since 2005**\n\n[![Linux build](https://github.com/MRPT/mrpt/actions/workflows/build-linux.yml/badge.svg)](https://github.com/MRPT/mrpt/actions/workflows/build-linux.yml)\n[![macOS build](https://github.com/MRPT/mrpt/actions/workflows/build-macos.yml/badge.svg)](https://github.com/MRPT/mrpt/actions/workflows/build-macos.yml)\n[![Windows build](https://github.com/MRPT/mrpt/actions/workflows/build-windows.yml/badge.svg)](https://github.com/MRPT/mrpt/actions/workflows/build-windows.yml)\n[![codecov](https://codecov.io/gh/MRPT/mrpt/branch/develop/graph/badge.svg)](https://codecov.io/gh/MRPT/mrpt)\n[![clang-format](https://github.com/MRPT/mrpt/actions/workflows/check-clang-format.yml/badge.svg)](https://github.com/MRPT/mrpt/actions/workflows/check-clang-format.yml)\n\n[![Latest release](https://img.shields.io/github/release/MRPT/mrpt.svg)](https://github.com/MRPT/mrpt/releases)\n[![Windows installer](https://img.shields.io/badge/Windows-Installer-orange?logo=Windows)](https://github.com/MRPT/mrpt/releases/tag/Windows-nightly-builds)\n[![DOI](https://zenodo.org/badge/13708826.svg)](https://zenodo.org/doi/10.5281/zenodo.10595286)\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://www.mrpt.org/License/)\n\n[**Documentation**](https://docs.mrpt.org/reference/latest/) · [**Tutorials**](https://docs.mrpt.org/reference/latest/tutorials.html) · [**API Reference**](https://docs.mrpt.org/reference/latest/modules.html) · [**Examples**](https://docs.mrpt.org/reference/latest/examples.html) · [**Applications**](https://docs.mrpt.org/reference/latest/applications.html)\n\n<\/div>\n\n---\n\n## What is MRPT?\n\nMRPT is a well-established C++ framework for mobile robotics, originally developed in 2005 at the University of Málaga\nand actively maintained to this day. Over the years, contributions from the community have evolved it into a robust,\nmodular toolkit widely used in both academic research and industry.\n\n**MRPT 3.0** is a major refactoring that modernises the build system (colcon-based modular packages),\ncleans up the public API, and aligns with modern C++17 standards\nwhile preserving the data structures and algorithms at the core of MRPT.\n\n<img align=\"right\" src=\"https://mrpt.github.io/imgs/mrpt-videos-mix2.gif\" alt=\"MRPT demo\" width=\"340\"/>\n\n### Key capabilities\n\n| Area | What's included |\n|---|---|\n| **SLAM** | MonteCarlo Localization, RBPF, pose-graph optimization |\n| **Geometry** | SE(2)/SE(3) Lie groups, rigid body transforms, point clouds |\n| **Probabilistic** | Kalman filters, particle filters, PDFs over poses & maps |\n| **Maps** | Occupancy grids, point maps, landmark maps, voxel maps |\n| **Sensors** | LiDAR, stereo/RGB-D cameras, IMU, GPS, Velodyne, … |\n| **Visualization** | 3-D scene graph (`mrpt::viz`), GUI windows, plot widgets |\n| **Navigation** | Reactive nav, path planning, PTG-based obstacle avoidance |\n| **Python** | pybind11 bindings for all major modules |\n\n---\n\n## Getting started\n\n### Install from ROS repositories\n\n```bash\n# ROS 1 (deprecated)\nsudo apt install ros-$ROS_DISTRO-mrpt2\n\n# ROS 2\nsudo apt install ros-$ROS_DISTRO-mrpt-*\n```\n\n### ROS2 build status for mrpt3\n\n| Distro | Build dev | Release |\n| --- | --- | --- |\n| ROS 2 Humble (u22.04) | [![Build Status](https://build.ros2.org/job/Hdev__mrpt3__ubuntu_jammy_amd64/badge/icon)](https://build.ros2.org/job/Hdev__mrpt3__ubuntu_jammy_amd64/) | [![Version](https://img.shields.io/ros/v/humble/mrpt3)](https://index.ros.org/?pkgs=mrpt3&search_packages=true#humble) |\n| ROS 2 Jazzy (u24.04) | [![Build Status](https://build.ros2.org/job/Jdev__mrpt3__ubuntu_noble_amd64/badge/icon)](https://build.ros2.org/job/Jdev__mrpt3__ubuntu_noble_amd64/) | [![Version](https://img.shields.io/ros/v/jazzy/mrpt3)](https://index.ros.org/?pkgs=mrpt3&search_packages=true#jazzy) |\n| ROS 2 Kilted (u24.04) | [![Build Status](https://build.ros2.org/job/Kdev__mrpt3__ubuntu_noble_amd64/badge/icon)](https://build.ros2.org/job/Kdev__mrpt3__ubuntu_noble_amd64/) | [![Version](https://img.shields.io/ros/v/kilted/mrpt3)](https://index.ros.org/?pkgs=mrpt3&search_packages=true#kilted) |\n| ROS 2 Lyrical (u26.04) | [![Build Status](https://build.ros2.org/job/Ldev__mrpt3__ubuntu_resolute_amd64/badge/icon)](https://build.ros2.org/job/Ldev__mrpt3__ubuntu_resolute_amd64/) | [![Version](https://img.shields.io/ros/v/lyrical/mrpt3)](https://index.ros.org/?pkgs=mrpt3&search_packages=true#lyrical) |\n| ROS 2 Rolling (u26.04) | [![Build Status](https://build.ros2.org/job/Rdev__mrpt3__ubuntu_resolute_amd64/badge/icon)](https://build.ros2.org/job/Rdev__mrpt3__ubuntu_resolute_amd64/) | [![Version](https://img.shields.io/ros/v/rolling/mrpt3)](https://index.ros.org/?pkgs=mrpt3&search_packages=true#rolling) |\n\nBinary package build for `amd64` and `arm64` architectures:\n\n| Package | ROS 2 Humble <br/> BinBuild | ROS 2 Jazzy <br/> BinBuild | ROS 2 Kilted <br/> BinBuild | ROS 2 Lyrical <br/> BinBuild | ROS 2 Rolling <br/> BinBuild |\n| --- | --- | --- | --- | --- | --- |\n| mrpt_core | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_core__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_core__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_core__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_core__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_core__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_core__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_core__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_core__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_core__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_core__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_core__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_core__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_core__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_core__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_core__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_core__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_core__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_core__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_core__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_core__ubuntu_resolute_arm64__binary/) |\n| mrpt_io | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_io__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_io__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_io__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_io__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_io__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_io__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_io__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_io__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_io__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_io__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_io__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_io__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_io__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_io__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_io__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_io__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_io__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_io__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_io__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_io__ubuntu_resolute_arm64__binary/) |\n| mrpt_serialization | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_serialization__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_serialization__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_serialization__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_serialization__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_serialization__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_serialization__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_serialization__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_serialization__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_serialization__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_serialization__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_serialization__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_serialization__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_serialization__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_serialization__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_serialization__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_serialization__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_serialization__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_serialization__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_serialization__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_serialization__ubuntu_resolute_arm64__binary/) |\n| mrpt_system | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_system__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_system__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_system__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_system__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_system__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_system__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_system__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_system__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_system__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_system__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_system__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_system__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_system__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_system__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_system__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_system__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_system__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_system__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_system__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_system__ubuntu_resolute_arm64__binary/) |\n| mrpt_rtti | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_rtti__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_rtti__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_rtti__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_rtti__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_rtti__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_rtti__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_rtti__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_rtti__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_rtti__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_rtti__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_rtti__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_rtti__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_rtti__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_rtti__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_rtti__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_rtti__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_rtti__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_rtti__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_rtti__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_rtti__ubuntu_resolute_arm64__binary/) |\n| mrpt_containers | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_containers__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_containers__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_containers__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_containers__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_containers__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_containers__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_containers__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_containers__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_containers__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_containers__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_containers__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_containers__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_containers__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_containers__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_containers__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_containers__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_containers__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_containers__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_containers__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_containers__ubuntu_resolute_arm64__binary/) |\n| mrpt_typemeta | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_typemeta__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_typemeta__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_typemeta__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_typemeta__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_typemeta__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_typemeta__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_typemeta__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_typemeta__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_typemeta__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_typemeta__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_typemeta__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_typemeta__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_typemeta__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_typemeta__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_typemeta__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_typemeta__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_typemeta__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_typemeta__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_typemeta__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_typemeta__ubuntu_resolute_arm64__binary/) |\n| mrpt_random | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_random__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_random__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_random__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_random__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_random__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_random__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_random__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_random__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_random__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_random__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_random__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_random__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_random__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_random__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_random__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_random__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_random__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_random__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_random__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_random__ubuntu_resolute_arm64__binary/) |\n| mrpt_config | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_config__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_config__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_config__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_config__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_config__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_config__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_config__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_config__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_config__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_config__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_config__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_config__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_config__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_config__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_config__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_config__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_config__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_config__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_config__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_config__ubuntu_resolute_arm64__binary/) |\n| mrpt_expr | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_expr__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_expr__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_expr__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_expr__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_expr__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_expr__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_expr__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_expr__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_expr__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_expr__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_expr__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_expr__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_expr__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_expr__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_expr__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_expr__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_expr__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_expr__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_expr__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_expr__ubuntu_resolute_arm64__binary/) |\n| mrpt_math | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_math__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_math__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_math__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_math__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_math__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_math__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_math__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_math__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_math__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_math__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_math__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_math__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_math__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_math__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_math__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_math__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_math__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_math__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_math__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_math__ubuntu_resolute_arm64__binary/) |\n| mrpt_poses | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_poses__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_poses__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_poses__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_poses__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_poses__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_poses__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_poses__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_poses__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_poses__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_poses__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_poses__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_poses__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_poses__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_poses__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_poses__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_poses__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_poses__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_poses__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_poses__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_poses__ubuntu_resolute_arm64__binary/) |\n| mrpt_tfest | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_tfest__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_tfest__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_tfest__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_tfest__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_tfest__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_tfest__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_tfest__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_tfest__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_tfest__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_tfest__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_tfest__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_tfest__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_tfest__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_tfest__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_tfest__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_tfest__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_tfest__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_tfest__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_tfest__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_tfest__ubuntu_resolute_arm64__binary/) |\n| mrpt_bayes | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_bayes__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_bayes__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_bayes__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_bayes__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_bayes__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_bayes__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_bayes__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_bayes__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_bayes__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_bayes__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_bayes__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_bayes__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_bayes__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_bayes__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_bayes__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_bayes__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_bayes__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_bayes__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_bayes__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_bayes__ubuntu_resolute_arm64__binary/) |\n| mrpt_obs | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_obs__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_obs__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_obs__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_obs__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_obs__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_obs__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_obs__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_obs__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_obs__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_obs__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_obs__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_obs__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_obs__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_obs__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_obs__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_obs__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_obs__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_obs__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_obs__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_obs__ubuntu_resolute_arm64__binary/) |\n| mrpt_topography | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_topography__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_topography__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_topography__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_topography__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_topography__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_topography__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_topography__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_topography__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_topography__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_topography__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_topography__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_topography__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_topography__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_topography__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_topography__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_topography__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_topography__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_topography__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_topography__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_topography__ubuntu_resolute_arm64__binary/) |\n| mrpt_maps | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_maps__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_maps__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_maps__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_maps__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_maps__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_maps__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_maps__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_maps__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_maps__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_maps__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_maps__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_maps__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_maps__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_maps__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_maps__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_maps__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_maps__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_maps__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_maps__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_maps__ubuntu_resolute_arm64__binary/) |\n| mrpt_graphs | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_graphs__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_graphs__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_graphs__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_graphs__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_graphs__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_graphs__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_graphs__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_graphs__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_graphs__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_graphs__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_graphs__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_graphs__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_graphs__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_graphs__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_graphs__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_graphs__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_graphs__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_graphs__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_graphs__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_graphs__ubuntu_resolute_arm64__binary/) |\n| mrpt_opengl | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_opengl__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_opengl__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_opengl__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_opengl__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_opengl__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_opengl__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_opengl__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_opengl__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_opengl__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_opengl__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_opengl__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_opengl__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_opengl__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_opengl__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_opengl__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_opengl__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_opengl__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_opengl__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_opengl__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_opengl__ubuntu_resolute_arm64__binary/) |\n| mrpt_img | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_img__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_img__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_img__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_img__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_img__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_img__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_img__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_img__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_img__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_img__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_img__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_img__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_img__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_img__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_img__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_img__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_img__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_img__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_img__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_img__ubuntu_resolute_arm64__binary/) |\n| mrpt_gui | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_gui__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_gui__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_gui__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_gui__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_gui__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_gui__ubuntu_resolute_arm64__binary/) |\n| mrpt_nav | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_nav__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_nav__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_nav__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_nav__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_nav__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_nav__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_nav__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_nav__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_nav__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_nav__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_nav__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_nav__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_nav__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_nav__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_nav__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_nav__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_nav__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_nav__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_nav__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_nav__ubuntu_resolute_arm64__binary/) |\n| mrpt_kinematics | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_kinematics__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_kinematics__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_kinematics__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_kinematics__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_kinematics__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_kinematics__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_kinematics__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_kinematics__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_kinematics__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_kinematics__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_kinematics__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_kinematics__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_kinematics__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_kinematics__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_kinematics__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_kinematics__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_kinematics__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_kinematics__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_kinematics__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_kinematics__ubuntu_resolute_arm64__binary/) |\n| mrpt_slam | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_slam__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_slam__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_slam__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_slam__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_slam__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_slam__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_slam__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_slam__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_slam__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_slam__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_slam__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_slam__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_slam__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_slam__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_slam__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_slam__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_slam__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_slam__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_slam__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_slam__ubuntu_resolute_arm64__binary/) |\n| mrpt_hwdrivers | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_hwdrivers__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_hwdrivers__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_hwdrivers__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_hwdrivers__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_hwdrivers__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_hwdrivers__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_hwdrivers__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_hwdrivers__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_hwdrivers__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_hwdrivers__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_hwdrivers__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_hwdrivers__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_hwdrivers__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_hwdrivers__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_hwdrivers__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_hwdrivers__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_hwdrivers__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_hwdrivers__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_hwdrivers__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_hwdrivers__ubuntu_resolute_arm64__binary/) |\n| mrpt_common | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_common__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_common__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_common__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_common__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_common__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_common__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_common__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_common__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_common__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_common__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_common__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_common__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_common__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_common__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_common__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_common__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_common__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_common__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_common__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_common__ubuntu_resolute_arm64__binary/) |\n| mrpt_comms | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_comms__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_comms__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_comms__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_comms__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_comms__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_comms__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_comms__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_comms__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_comms__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_comms__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_comms__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_comms__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_comms__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_comms__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_comms__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_comms__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_comms__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_comms__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_comms__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_comms__ubuntu_resolute_arm64__binary/) |\n| mrpt_libapps_cli | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_libapps_cli__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_libapps_cli__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_libapps_cli__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_libapps_cli__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_libapps_cli__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_libapps_cli__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_libapps_cli__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_libapps_cli__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_libapps_cli__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_libapps_cli__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_libapps_cli__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_libapps_cli__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_libapps_cli__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_libapps_cli__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_libapps_cli__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_libapps_cli__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_libapps_cli__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_libapps_cli__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_libapps_cli__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_libapps_cli__ubuntu_resolute_arm64__binary/) |\n| mrpt_libapps_gui | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_libapps_gui__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_libapps_gui__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_libapps_gui__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_libapps_gui__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_libapps_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_libapps_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_libapps_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_libapps_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_libapps_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_libapps_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_libapps_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_libapps_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_libapps_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_libapps_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_libapps_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_libapps_gui__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_libapps_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_libapps_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_libapps_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_libapps_gui__ubuntu_resolute_arm64__binary/) |\n| mrpt_apps_cli | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_apps_cli__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_apps_cli__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_apps_cli__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_apps_cli__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_apps_cli__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_apps_cli__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_apps_cli__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_apps_cli__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_apps_cli__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_apps_cli__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_apps_cli__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_apps_cli__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_apps_cli__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_apps_cli__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_apps_cli__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_apps_cli__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_apps_cli__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_apps_cli__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_apps_cli__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_apps_cli__ubuntu_resolute_arm64__binary/) |\n| mrpt_apps_gui | [![Build Status](https://build.ros2.org/job/Hbin_uJ64__mrpt_apps_gui__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__mrpt_apps_gui__ubuntu_jammy_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_apps_gui__ubuntu_jammy_arm64__binary/badge/icon)](https://build.ros2.org/job/Hbin_ujv8_uJv8__mrpt_apps_gui__ubuntu_jammy_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Jbin_uN64__mrpt_apps_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__mrpt_apps_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_apps_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Jbin_unv8_uNv8__mrpt_apps_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Kbin_uN64__mrpt_apps_gui__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__mrpt_apps_gui__ubuntu_noble_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_apps_gui__ubuntu_noble_arm64__binary/badge/icon)](https://build.ros2.org/job/Kbin_unv8_uNv8__mrpt_apps_gui__ubuntu_noble_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Lbin_uR64__mrpt_apps_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__mrpt_apps_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_apps_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Lbin_armv8_uRv8__mrpt_apps_gui__ubuntu_resolute_arm64__binary/) | [![Build Status](https://build.ros2.org/job/Rbin_uR64__mrpt_apps_gui__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__mrpt_apps_gui__ubuntu_resolute_amd64__binary/) <br> [![Build Status](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_apps_gui__ubuntu_resolute_arm64__binary/badge/icon)](https://build.ros2.org/job/Rbin_unv8_uRv8__mrpt_apps_gui__ubuntu_resolute_arm64__binary/) |\n\n\n### Install (Ubuntu/Debian)\n\n```bash\nsudo apt install libmrpt-dev mrpt-apps\n```\n\nCheck your distro version at [Ubuntu](https://packages.ubuntu.com/search?keywords=mrpt&searchon=sourcenames) / [Debian](https://qa.debian.org/madison.php?package=mrpt).\nFor a more recent build, use the nightly PPA:\n\n```bash\nsudo add-apt-repository ppa:joseluisblancoc/mrpt\nsudo apt install libmrpt-dev mrpt-apps\n```\n\n### Build from source\n\n```bash\ngit clone https://github.com/MRPT/mrpt.git --recursive\n```\n\nInstall build dependencies with `rosdep` (recommended, works even without ROS installed):\n\n```bash\nsudo apt install python3-rosdep\nsudo rosdep init   # only once per machine\nrosdep update\nrosdep install --from-paths . --ignore-src -r -y\n```\n\nThen build with `colcon`:\n\n```bash\ncolcon build\n```\n\nSee the full [build guide](https://docs.mrpt.org/reference/latest/compiling.html) for colcon, CMake options, and dependency setup.\n\n### Windows\n\n[Nightly Windows installer](https://github.com/MRPT/mrpt/releases/tag/Windows-nightly-builds) — includes `.exe`, `.dll`, `.h`, and `.lib` files.\n\n\n---\n\n## Using MRPT 3.0 in your project\n\n```cmake\ncmake_minimum_required(VERSION 3.16)\nproject(my_robot_app)\n\nfind_package(mrpt_poses REQUIRED)\nfind_package(mrpt_maps  REQUIRED)\n\nadd_executable(my_app main.cpp)\ntarget_link_libraries(my_app mrpt::mrpt_poses mrpt::mrpt_maps)\n```\n\n> **Migrating from MRPT 2.x?** See the [porting guide](https://docs.mrpt.org/reference/latest/porting_mrpt3.html)\n> — package names changed from `mrpt-<name>` to `mrpt_<name>` and targets from `mrpt::<name>` to `mrpt::mrpt_<name>`.\n\n---\n\n## Documentation highlights\n\n| Resource | Link |\n|---|---|\n| Full API reference | [docs.mrpt.org/reference/latest/modules.html](https://docs.mrpt.org/reference/latest/modules.html) |\n| Tutorials | [docs.mrpt.org/reference/latest/tutorials.html](https://docs.mrpt.org/reference/latest/tutorials.html) |\n| Code examples | [docs.mrpt.org/reference/latest/examples.html](https://docs.mrpt.org/reference/latest/examples.html) |\n| Python examples | [docs.mrpt.org/reference/latest/python_examples.html](https://docs.mrpt.org/reference/latest/python_examples.html) |\n| GUI applications | [docs.mrpt.org/reference/latest/applications.html](https://docs.mrpt.org/reference/latest/applications.html) |\n| Supported sensors | [docs.mrpt.org/reference/latest/supported-sensors.html](https://docs.mrpt.org/reference/latest/supported-sensors.html) |\n| ROS wrappers | [docs.mrpt.org/reference/latest/wrappers.html](https://docs.mrpt.org/reference/latest/wrappers.html) |\n| Porting from 2.x | [docs.mrpt.org/reference/latest/porting_mrpt3.html](https://docs.mrpt.org/reference/latest/porting_mrpt3.html) |\n| Changelog | [docs.mrpt.org/reference/latest/page_changelog.html](https://docs.mrpt.org/reference/latest/page_changelog.html) |\n| Robotics datasets | [mrpt.org/robotics_datasets](https://www.mrpt.org/robotics_datasets) |\n\n---\n\n## Modules\n\nMRPT 3.0 is organized as independent colcon packages. Each can be built and used standalone:\n\n`mrpt_core` · `mrpt_math` · `mrpt_poses` · `mrpt_obs` · `mrpt_maps` · `mrpt_slam` ·\n`mrpt_viz` · `mrpt_gui` · `mrpt_nav` · `mrpt_bayes` · `mrpt_graphs` · `mrpt_io` ·\n`mrpt_img` · `mrpt_config` · `mrpt_serialization` · `mrpt_random` · `mrpt_system` ·\n`mrpt_tfest` · `mrpt_kinematics` · `mrpt_comms` · `mrpt_hwdrivers` · …\n\n---\n\n## Community & support\n\n- **Questions**: [Stack Overflow `[mrpt]`](https://stackoverflow.com/search?q=mrpt) or [mrpt-users mailing list](https://groups.google.com/forum/#!forum/mrpt-users)\n- **Bugs / features**: [GitHub Issues](https://github.com/MRPT/mrpt/issues)\n- **Contributing**: see [CONTRIBUTING.md](https://github.com/MRPT/mrpt/blob/master/.github/CONTRIBUTING.md)\n- **MOLA SLAM**: MRPT is the core library of the [MOLA modular SLAM framework](https://github.com/MOLAorg/mola/)\n\n---\n\n## License\n\nReleased under the [BSD 3-Clause License](https://www.mrpt.org/License/).\n\n---\n\n## Contributors\n\n<a href=\"https://github.com/MRPT/mrpt/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=MRPT/mrpt\" alt=\"Contributors\"/>\n<\/a>\n\n---\n\n## Packaging status\n\n![Repology](https://repology.org/badge/vertical-allrepos/mrpt.svg)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D080:35EBC:1791D7:5DF8C3:6AB92C6B"},"text_sha256":"e1bcdb1554e37da018fd9f51cf327e2365f8230aca2437de70ae306fba08c4b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"artivis/manif","input_row":{"repository":"artivis/manif","url":"https://github.com/artivis/manif","name":"manif","owner":"artivis","description":"A small C++11 header-only library for Lie theory.","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1821,"issues":138,"created_at":"2018-04-16T21:28:32Z","updated_at":"2026-09-25T17:32:31Z","first_commit_at":"2018-04-16T21:28:55Z","last_commit_at":"2025-11-01T17:54:32Z","activity_months":90.530000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:08.140Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"artivis/manif","visibility":"public","created_at":"2018-04-16T21:28:32Z","updated_at":"2026-09-25T17:32:31Z","private":false,"fork":false,"archived":false,"stargazers_count":1821,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1883","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A0:3BE445:17A0A38:1BC5D3D:6AB92C6C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1882","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:18325A9:1C58ADE:6AB92C6C"},"commit":{"sha":"a8d9d484198a80e77dd4d0e5debcab0bb722b5b2","url":"https://github.com/artivis/manif/commit/a8d9d484198a80e77dd4d0e5debcab0bb722b5b2","date":"2018-05-19T07:14:47Z","author_date":"2018-05-19T07:14:47Z","committer_date":"2018-05-19T07:14:47Z","tree_sha":"b43fb435fa1f87b3b134cd8a7b6103f93f2143e6","message_first_line":"Merge pull request #5 from artivis/cmake_find_package"},"tree_request_status":200,"tree_rate":{"github_remaining":"1881","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17E0240:1C05C15:6AB92C6C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":294,"blob_sha":"53746eab5feff83a720e055ac7aeae6ea77f6d34","priority":0}],"documents":[{"path":"README.md","size":294,"blob_sha":"53746eab5feff83a720e055ac7aeae6ea77f6d34","priority":0,"status":200,"text":"\n\n# How to use\n\n```cmake\ncmake_minimum_required(VERSION 2.8.3)\nproject(foo)\n\n# Find the manif library\nfind_package(manif REQUIRED)\n\nadd_executable(${PROJECT_NAME} src/foo.cpp)\n\n# Add include directories to the target\ntarget_include_directories(${PROJECT_NAME} SYSTEM ${manif_INCLUDE_DIRS})\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9094:372D9:17DBD8:5E43CC:6AB92C6B"},"text_sha256":"d619e3b12fa45dcf782f4e808724d52b1754e3afad5f4ce129855f3b4c6491bf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1880","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0849:71F98:1843DE1:1C6A208:6AB92C6D"},"commit":{"sha":"65166b3bfd15b1020c29f3eaf6888e1009c79aea","url":"https://github.com/artivis/manif/commit/65166b3bfd15b1020c29f3eaf6888e1009c79aea","date":"2025-11-01T17:54:32Z","author_date":"2025-11-01T17:54:32Z","committer_date":"2025-11-01T17:54:32Z","tree_sha":"a45261fd169172b08c70977fd62b0567ab492176","message_first_line":"Merge pull request #337 from artivis/336-documentation-on-tangent-spaces-wrong"},"tree_request_status":200,"tree_rate":{"github_remaining":"1879","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:18134E9:1C3A0E9:6AB92C6D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11563,"blob_sha":"6aab5508cbab9d304db0fd31ccd71a3933b3801c","priority":0}],"documents":[{"path":"README.md","size":11563,"blob_sha":"6aab5508cbab9d304db0fd31ccd71a3933b3801c","priority":0,"status":200,"text":"# manif\n\n## A small header-only library for Lie theory\n\n[![GHA][badge-ci-img]][badge-ci]\n[![appveyor][badge-ci-win-img]][badge-ci-win]\n[![Documentation][badge-doc-img]][manif-doc]\n[![codecov][badge-cov-img]][badge-cov]\n![GitHub][badge-license]\n[![JOSS][badge-joss-img]][deray20]\n\n## Package Summary\n\n<!-- Include start manif intro -->\n\n**manif** is a Lie theory library for state-estimation\ntargeted at robotics applications.\nIt is developed as a header-only C++11 library with Python 3 wrappers.\n\nAt the moment, it provides the groups:\n\n- ℝ(n): Euclidean space with addition.\n- SO(2): rotations in the plane.\n- SE(2): rigid motion (rotation and translation) in the plane.\n- SO(3): rotations in 3D space.\n- SE(3): rigid motion (rotation and translation) in 3D space.\n- SE_2(3): extended pose (rotation, translation and velocity) in 3D space,\n  introduced (to the best of knowledge) in this [paper][barrau15].\n  NOTE: The implementation here differs slightly from\n  the developments in the [paper][barrau15].\n- SGal(3): The Special Galilean group (rotation, translation, velocity and time) in 3D space,\n  described in these papers [[1][fourmy19]] & [[2][kelly24]].\n- Bundle<>: allows manipulating a manifold bundle as a single Lie group.\n  Referred to as a *composite manifold* in Section IV of the\n  [reference paper](http://arxiv.org/abs/1812.01537).\n\nOther Lie groups can and will be added, contributions are welcome.\n\n**manif** is based on the mathematical presentation of the Lie theory available in [this paper][jsola18].\nWe recommend every user of **manif** to read the paper (17 pages) before starting to use the library.\nThe paper offers a comprehensive yet accessible introduction to Lie theory, tailored specifically for roboticists.\nBy presenting the material in a simplified manner,\nit lowers the barrier to entry for those interested in developing rigorous and elegant algorithms for state estimation,\ncontrol, learning, and possibly more.\nThis approach ensures that even readers without an advanced mathematical background can grasp the\nfoundational concepts and apply them effectively in robotics.\n\n<!-- Include stop manif intro -->\n\nYou may also find the following video online,\n['Lie theory for the roboticist'][jsola-iri-lecture],\na lecture given at [IRI-UPC][IRI-UPC].\n\n> In a rush? Check out our [Lie group cheat sheet][cheat_sheet].\n\n**manif** provides analytic computation of Jacobians for all the operations listed [below](#features).\n\n### Details\n\n- Maintainer status: maintained\n- Maintainer: Jeremie Deray\n- Authors:\n  - Jeremie Deray [deray.jeremie@gmail.com](mailto:deray.jeremie@gmail.com)\n  - Joan Sola [jsola@iri.upc.edu](mailto:jsola@iri.upc.edu)\n- License: [MIT](LICENSE)\n- Bug / feature tracker: [github.com/artivis/manif/issues][manif-issue]\n- Source: [github.com/artivis/manif.git][manif-repo] (branch: devel)\n\n## Quick Start\n\nGet quickly started with **manif** following our 'quick start' guides for both\n[C++](docs/pages/cpp/Quick-start.md) and [Python](docs/pages/python/Quick-start.md).\n\n## Features\n\n### Available Operations\n\n<!-- Include start manif operation -->\n\n| Operation  |       | Code |\n| :---       |   :---:   | :---: |\n|       |   Base Operation   |  |\n| Inverse | $\\bf\\mathcal{X}^{-1}$ | `X.inverse()` |\n| Composition | $\\bf\\mathcal{X}\\circ\\bf\\mathcal{Y}$ | `X * Y`<br/>`X.compose(Y)` |\n| Hat | $\\boldsymbol\\varphi^\\wedge$ | `w.hat()` |\n| Act on vector | $\\bf\\mathcal{X}\\circ{\\bf v}$ | `X.act(v)` |\n| Retract to group element | $\\exp(\\boldsymbol\\varphi^\\wedge)$ | `w.exp()` |\n| Lift to tangent space | $\\log(\\bf\\mathcal{X})^\\vee$ | `X.log()` |\n| Manifold Adjoint | $\\mathrm{Adj}(\\bf\\mathcal{X})$ | `X.adj()` |\n| Tangent adjoint | $\\mathrm{adj}(\\boldsymbol\\varphi^\\wedge)$ | `w.smallAdj()` |\n|       |   Composed Operation   |  |\n| Manifold right plus | ${\\bf\\mathcal{X}}\\circ\\exp(\\boldsymbol\\varphi^\\wedge)$ | `X + w`<br/>`X.plus(w)`<br/>`X.rplus(w)` |\n| Manifold left plus | $\\exp(\\boldsymbol\\varphi^\\wedge)\\circ\\bf\\mathcal{X}$ | `w + X`<br/>`w.plus(X)`<br/>`w.lplus(X)` |\n| Manifold right minus | $\\log(\\bf\\mathcal{Y}^{-1}\\circ\\bf\\mathcal{X})^\\vee$ | `X - Y`<br/>`X.minus(Y)`<br/>`X.rminus(Y)` |\n| Manifold left minus | $\\log(\\bf\\mathcal{X}\\circ\\bf\\mathcal{Y}^{-1})^\\vee$ | `X.lminus(Y)` |\n| Between | ${\\bf\\mathcal{X}^{-1}}\\circ{\\bf\\mathcal{Y}}$ | `X.between(Y)` |\n| Inner Product | $\\langle\\boldsymbol\\varphi,\\boldsymbol\\tau\\rangle$ | `w.inner(t)` |\n| Norm | $\\left\\lVert\\boldsymbol\\varphi\\right\\rVert$ | `w.weightedNorm()`<br/>`w.squaredWeightedNorm()` |\n\nAbove, ${\\bf\\mathcal{X}}$ & ${\\bf\\mathcal{Y}}$ (`X` & `Y`) represent group elements,\n${\\boldsymbol\\varphi^\\wedge}$ & ${\\boldsymbol\\tau^\\wedge}$ represent elements in the Lie algebra of the Lie group,\n${\\boldsymbol\\varphi}$ & ${\\boldsymbol\\tau}$ (`w` & `t`) represent the same elements of the tangent space\nbut expressed in Cartesian coordinates in $\\mathbb{R}^n$,\nand $\\mathbf{v}$ (`v`) represents any element of $\\mathbb{R}^n$.\n\n<!-- Include stop manif operation -->\n\n### Tangent spaces\n\n<!-- Include start manif tangent -->\n\n**manif** favors Cartesian representations of the tangent spaces.\nThis means that the tangent elements are regular vectors in $\\mathbb{R}^n$,\n'n' being the dimension of the Lie group.\n\nThe ordering of the elements in such vectors matters to correctly interpret them.\nIt impacts the form of all Jacobian matrices and covariances matrices that will be defined on those tangent spaces.\n\nAs a reference, this is the way tangent spaces are defined in **manif**\n\n| group | dimension | group elements | tangent elements (in order) | \n| ---- | ---- | ---- | ---- | \n| Rn | n | $\\bf p$ | $\\bf p$ | \n| SO(2) | 1 | $\\bf R$ | $\\theta$ | \n| SO(3) | 3 | $\\bf R$ | $\\boldsymbol\\theta$ | \n| SE(2) | 3 | $\\bf p$, $\\bf R$ | $\\boldsymbol\\rho$, $\\theta$ | \n| SE(3) | 6 | $\\bf p$, $\\bf R$ | $\\boldsymbol\\rho$, $\\boldsymbol\\theta$ | \n| SE_2(3) | 9 | $\\bf p$, $\\bf R$, $\\bf v$ | $\\boldsymbol\\rho$, $\\boldsymbol\\theta$, $\\boldsymbol\\nu$ | $\n| SGal(3) | 10 | $\\bf p$, $\\bf R$, $\\bf v$, $t$ | $\\boldsymbol\\rho$, $\\boldsymbol\\nu$, $\\boldsymbol\\theta$, $s$ | \n\nNOTE: the unfortunate order mismatch between the tangent elements in SE_2(3) and SGal(3).\n\nAs an example, in SE_2(3) the tangent vector ${\\boldsymbol\\tau}$ is defined by\n\n$$\n{\\boldsymbol\\tau} =\n\\begin{bmatrix}\n{\\boldsymbol\\rho} \\\\\n{\\boldsymbol\\theta} \\\\\n{\\boldsymbol\\nu}\n\\end{bmatrix} \\in \\mathbb{R}^9\n$$\n\nwhere $\\boldsymbol\\rho$, $\\boldsymbol\\theta$ and $\\boldsymbol\\nu$ are $\\in \\mathbb{R}^3$ and\ntypically correspond respectively to changes in position, orientation and velocity.\n\nA covariances matrix $\\bf Q$ of an element of SE_2(3) can be block-partitioned as follows\n\n$$\n{\\bf Q} = \\begin{bmatrix}\n  {\\bf Q}_ {\\boldsymbol\\rho\\boldsymbol\\rho} & {\\bf Q}_ {\\boldsymbol\\rho\\boldsymbol\\theta} & {\\bf Q}_ {\\boldsymbol\\rho\\boldsymbol\\nu} \\\\\n  {\\bf Q}_ {\\boldsymbol\\theta\\boldsymbol\\rho} & {\\bf Q}_ {\\boldsymbol\\theta\\boldsymbol\\theta} & {\\bf Q}_ {\\boldsymbol\\theta\\boldsymbol\\nu} \\\\\n  {\\bf Q}_ {\\boldsymbol\\nu\\boldsymbol\\rho} & {\\bf Q}_ {\\boldsymbol\\nu\\boldsymbol\\theta} & {\\bf Q}_ {\\boldsymbol\\nu\\boldsymbol\\nu}\n  \\end{bmatrix} \\in \\mathbb{R}^{9\\times 9}\n$$\n\nAll blocks ${\\bf Q}_{\\bf ij}$ are $3\\times3$ and ${\\bf Q}$ is $9\\times9$.\n\n<!-- Include stop manif tangent -->\n\n### Jacobians\n\nAll operations come with their respective analytical Jacobian matrices.\nThroughout **manif**, **Jacobians are differentiated with respect to a perturbation on the local tangent space**.\nThese Jacobians map tangent spaces, as described in [this paper][jsola18].\nPlease consider [the order of elements in the tangent spaces](#tangent-spaces) when manipulating Jacobians.\n\nCurrently, **manif** implements the **right Jacobian**, whose definition reads:\n\n$$\n\\frac{\\delta f(\\bf\\mathcal{X})}{\\delta\\bf\\mathcal{X}}\\triangleq\n\\lim_{\\boldsymbol\\varphi\\to\\bf0}\\frac{f(\\bf\\mathcal{X}\\oplus\\boldsymbol\\varphi)\\ominus f(\\bf\\mathcal{X})}{\\boldsymbol\\varphi}\\triangleq\n\\lim_{\\boldsymbol\\varphi\\to\\bf0}\\frac{\\log(f({\\bf\\mathcal{X}})^{-1} f({\\bf\\mathcal{X}}\\exp(\\boldsymbol\\varphi^\\wedge)))^\\vee}{\\boldsymbol\\varphi}\n$$\n\nThe Jacobians of any of the aforementioned operations can then be evaluated:\n\nin C++,\n\n```cpp\nSE3d X = SE3d::Random();\nSE3Tangentd w = SE3Tangentd::Random();\n\nSE3d::Jacobian J_o_x, J_o_w;\n\nauto X_plus_w = X.plus(w, J_o_x, J_o_w);\n```\n\nin Python,\n\n```python\nX = SE3.Random()\nw = SE3Tangentd.Random()\n\nJ_o_x = np.zeros((SE3.DoF, SE3.DoF))\nJ_o_w = np.zeros((SE3.DoF, SE3.DoF))\n\nX_plus_w = X.plus(w, J_o_x, J_o_w)\n```\n\n#### Note\n\nWhile Jacobians in **manif** are differentiated with respect to a\nlocal perturbation on the tangent space, many non-linear solvers\n(e.g. [Ceres][ceres]) expect functions to be differentiated with respect to\nthe underlying representation vector of the group element\n(e.g. with respect to quaternion vector for `SO3`).\n\nFor this reason, **manif** is compliant with the auto-differentiation libraries\n[`ceres::Jet`][ceres-jet], [`autodiff::Dual`][autodiff] & [`autodiff::Real`][autodiff].\n\n## Documentation\n\nThe documentation is available online at the accompanying [website][manif-doc].\nBoth the [C++][manif-doc-cpp] and the [Python][manif-doc-python] APIs are documented.\n\nDo you want to build it locally?\nFind out how on the [dedicated page](docs/pages/documentation.md).\n\nNote: throughout the code documentation we refer to 'the paper' which you can\nfind on [the dedicated page](docs/pages/publication.md).\n\n## Tutorials and application demos\n\nWe provide some self-contained and self-explained\n[C++ examples](docs/pages/cpp/Quick-start.md#tutorials-and-application-demos) to help you get started.\n\nYou prefer Python? The same examples are also\n[available in Python](docs/pages/python/Quick-start.md#tutorials-and-application-demos).\n\n## Publications\n\nCheck out our related [publications](docs/pages/publication.md) and how to cite them.\n\n## They use manif\n\nFind out [who's already using manif](docs/pages/projects.md).\n\n## Contributing\n\nWant to contribute? Great! Check out our [contribution guidelines](CONTRIBUTING.md).\n\n[//]: # (URLs)\n\n[jsola18]: http://arxiv.org/abs/1812.01537\n[barrau15]: https://arxiv.org/pdf/1410.1465.pdf\n[fourmy19]: https://hal.science/hal-02183498/document\n[kelly24]: https://arxiv.org/abs/2312.07555\n[deray20]: https://joss.theoj.org/papers/10.21105/joss.01371\n\n[jsola-iri-lecture]: https://www.youtube.com/watch?v=nHOcoIyJj2o\n[IRI-UPC]: https://www.iri.upc.edu/\n\n[ceres]: http://ceres-solver.org/\n[ceres-jet]: http://ceres-solver.org/automatic_derivatives.html#dual-numbers-jets\n[autodiff]: https://autodiff.github.io/\n\n[manif-repo]: https://github.com/artivis/manif.git\n[manif-issue]: https://github.com/artivis/manif/issues\n[manif-doc]: https://artivis.github.io/manif/\n[manif-doc-cpp]: https://artivis.github.io/manif/cpp/index.html\n[manif-doc-python]: https://artivis.github.io/manif/python/index.html\n[cheat_sheet]: paper/Lie_theory_cheat_sheet.pdf\n\n[badge-ci]: https://github.com/artivis/manif/workflows/build-and-test/badge.svg?branch=devel\n[badge-ci-img]: https://github.com/artivis/manif/workflows/build-and-test/badge.svg?branch=devel\n[badge-ci-win]: https://ci.appveyor.com/project/artivis/manif\n[badge-ci-win-img]: https://ci.appveyor.com/api/projects/status/l0q7b0shhonvejrd?svg=true\n[badge-doc-img]: https://codedocs.xyz/artivis/manif.svg\n[badge-cov]: https://codecov.io/gh/artivis/manif\n[badge-cov-img]: https://codecov.io/gh/artivis/manif/branch/devel/graph/badge.svg\n[badge-license]: https://img.shields.io/github/license/mashape/apistatus.svg\n[badge-joss-img]: https://joss.theoj.org/papers/10.21105/joss.01371/status.svg\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AD74:40CE8:180C22:5E729D:6AB92C6E"},"text_sha256":"9b64efcbc832feba9a2b801b8e67b62e72663d777e8060c441f7ea11955bd212"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"longcw/faster_rcnn_pytorch","input_row":{"repository":"longcw/faster_rcnn_pytorch","url":"https://github.com/longcw/faster_rcnn_pytorch","name":"faster_rcnn_pytorch","owner":"longcw","description":"Faster RCNN with PyTorch","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1779,"issues":101,"created_at":"2017-01-30T16:06:12Z","updated_at":"2026-09-26T10:16:39Z","first_commit_at":"2017-01-30T16:05:21Z","last_commit_at":"2021-09-25T16:46:09Z","activity_months":55.82,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:10.911Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"longcw/faster_rcnn_pytorch","visibility":"public","created_at":"2017-01-30T16:06:12Z","updated_at":"2026-09-26T10:16:39Z","private":false,"fork":false,"archived":false,"stargazers_count":1779,"open_issues_count":71,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1878","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DE:DC698:18054BA:1C2B519:6AB92C6E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1877","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082F:B1202:17AEA43:1BD49F1:6AB92C6F"},"commit":{"sha":"28b9903ca7a095afaa53a6430a421f84a5456e69","url":"https://github.com/longcw/faster_rcnn_pytorch/commit/28b9903ca7a095afaa53a6430a421f84a5456e69","date":"2018-05-16T10:09:00Z","author_date":"2018-05-16T10:09:00Z","committer_date":"2018-05-16T10:09:00Z","tree_sha":"0f68fd38fda1bb7a6eac2d17e5dd7153f85ac93d","message_first_line":"Merge pull request #72 from kunalmessi10/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1876","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:181C4F7:1C42F6B:6AB92C6F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3245,"blob_sha":"89dcfbb11d89dafcb8f11c89888464a1eb05dae7","priority":0}],"documents":[{"path":"README.md","size":3245,"blob_sha":"89dcfbb11d89dafcb8f11c89888464a1eb05dae7","priority":0,"status":200,"text":"# Faster RCNN with PyTorch\n**Note:** I re-implemented faster rcnn in this project when I started learning PyTorch. Then I use PyTorch in all of my projects. I still remember it costed one week for me to figure out how to build cuda code as a pytorch layer :).\nBut actually this is not a good implementation and I didn't achieve the same mIOU as the original caffe code. \n\n**This project is no longer maintained. So I suggest:**\n- You can still read and study this code if you want to re-implement faster rcnn by yourself;\n- You can use the better PyTorch implementation by [ruotianluo](https://github.com/ruotianluo/pytorch-faster-rcnn) if you want to train  faster rcnn with your own data;\n\nThis is a [PyTorch](https://github.com/pytorch/pytorch)\nimplementation of Faster RCNN. \nThis project is mainly based on [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn)\nand [TFFRCNN](https://github.com/CharlesShang/TFFRCNN).\n\nFor details about R-CNN please refer to the [paper](https://arxiv.org/abs/1506.01497) \nFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks \nby Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.\n\n### Progress\n\n- [x] Forward for detecting\n- [x] RoI Pooling layer with C extensions on CPU (only forward)\n- [x] RoI Pooling layer on GPU (forward and backward)\n- [x] Training on VOC2007\n- [x] TensroBoard support\n- [x] Evaluation\n\n### Installation and demo\n0. Install the requirements (you can use pip or [Anaconda](https://www.continuum.io/downloads)):\n\n    ```\n    conda install pip pyyaml sympy h5py cython numpy scipy\n    conda install -c menpo opencv3\n    pip install easydict\n    ```\n\n\n1. Clone the Faster R-CNN repository\n    ```bash\n    git clone git@github.com:longcw/faster_rcnn_pytorch.git\n    ```\n\n2. Build the Cython modules for nms and the roi_pooling layer\n    ```bash\n    cd faster_rcnn_pytorch/faster_rcnn\n    ./make.sh\n    ```\n3. Download the trained model [VGGnet_fast_rcnn_iter_70000.h5](https://drive.google.com/open?id=0B4pXCfnYmG1WOXdpYVFybWxiZFE) \nand set the model path in `demo.py`\n3. Run demo `python demo.py`\n\n### Training on Pascal VOC 2007\n\nFollow [this project (TFFRCNN)](https://github.com/CharlesShang/TFFRCNN)\nto download and prepare the training, validation, test data \nand the VGG16 model pre-trained on ImageNet. \n\nSince the program loading the data in `faster_rcnn_pytorch/data` by default,\nyou can set the data path as following.\n```bash\ncd faster_rcnn_pytorch\nmkdir data\ncd data\nln -s $VOCdevkit VOCdevkit2007\n```\n\nThen you can set some hyper-parameters in `train.py` and training parameters in the `.yml` file.\n\nNow I got a 0.661 mAP on VOC07 while the origin paper got a 0.699 mAP.\nYou may need to tune the loss function defined in `faster_rcnn/faster_rcnn.py` by yourself.\n\n### Training with TensorBoard\nWith the aid of [Crayon](https://github.com/torrvision/crayon),\nwe can access the visualisation power of TensorBoard for any \ndeep learning framework.\n\nTo use the TensorBoard, install Crayon (https://github.com/torrvision/crayon)\nand set `use_tensorboard = True` in `faster_rcnn/train.py`.\n\n### Evaluation\nSet the path of the trained model in `test.py`.\n```bash\ncd faster_rcnn_pytorch\nmkdir output\npython test.py\n```\n\nLicense: MIT license (MIT)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A320:B08CF:175645:5DBE51:6AB92C6F"},"text_sha256":"7012f97d6428018fc4244f0c12aac63b32b8abc16061bb25f28394ca7847bff1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1875","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092C:6E429:17F2609:1C18D1B:6AB92C70"},"commit":{"sha":"d8f842dfa51e067105e6949999277a08daa3d743","url":"https://github.com/longcw/faster_rcnn_pytorch/commit/d8f842dfa51e067105e6949999277a08daa3d743","date":"2021-09-25T16:46:09Z","author_date":"2021-09-25T16:46:09Z","committer_date":"2021-09-25T16:46:09Z","tree_sha":"95f018af4431ac8ff5b72731b98a301556d1cc02","message_first_line":"Update VGGnet_fast_rcnn_iter_70000.h5 link"},"tree_request_status":200,"tree_rate":{"github_remaining":"1874","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:12A40AC:15FA7C3:6AB92C70"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3442,"blob_sha":"6572ad716c959bbb471b9a773fb8076e0fb47382","priority":0}],"documents":[{"path":"README.md","size":3442,"blob_sha":"6572ad716c959bbb471b9a773fb8076e0fb47382","priority":0,"status":200,"text":"# Faster RCNN with PyTorch\n**Note:** I re-implemented faster rcnn in this project when I started learning PyTorch. Then I use PyTorch in all of my projects. I still remember it costed one week for me to figure out how to build cuda code as a pytorch layer :).\nBut actually this is not a good implementation and I didn't achieve the same mAP as the original caffe code. \n\n**This project is no longer maintained and may not compatible with the newest pytorch (after 0.4.0). So I suggest:**\n- You can still read and study this code if you want to re-implement faster rcnn by yourself;\n- You can use the better PyTorch implementation by [ruotianluo](https://github.com/ruotianluo/pytorch-faster-rcnn) \nor [Detectron.pytorch](https://github.com/roytseng-tw/Detectron.pytorch) if you want to train  faster rcnn with your own data;\n\nThis is a [PyTorch](https://github.com/pytorch/pytorch)\nimplementation of Faster RCNN. \nThis project is mainly based on [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn)\nand [TFFRCNN](https://github.com/CharlesShang/TFFRCNN).\n\nFor details about R-CNN please refer to the [paper](https://arxiv.org/abs/1506.01497) \nFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks \nby Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.\n\n### Progress\n\n- [x] Forward for detecting\n- [x] RoI Pooling layer with C extensions on CPU (only forward)\n- [x] RoI Pooling layer on GPU (forward and backward)\n- [x] Training on VOC2007\n- [x] TensroBoard support\n- [x] Evaluation\n\n### Installation and demo\n0. Install the requirements (you can use pip or [Anaconda](https://www.continuum.io/downloads)):\n\n    ```\n    conda install pip pyyaml sympy h5py cython numpy scipy\n    conda install -c menpo opencv3\n    pip install easydict\n    ```\n\n\n1. Clone the Faster R-CNN repository\n    ```bash\n    git clone git@github.com:longcw/faster_rcnn_pytorch.git\n    ```\n\n2. Build the Cython modules for nms and the roi_pooling layer\n    ```bash\n    cd faster_rcnn_pytorch/faster_rcnn\n    ./make.sh\n    ```\n3. Download the trained model [VGGnet_fast_rcnn_iter_70000.h5 (updated)](https://drive.google.com/file/d/0B4pXCfnYmG1WOXdpYVFybWxiZFE/view?usp=sharing&resourcekey=0-vQAoz7bipn_4rjvGhwoqlw) \nand set the model path in `demo.py`\n3. Run demo `python demo.py`\n\n### Training on Pascal VOC 2007\n\nFollow [this project (TFFRCNN)](https://github.com/CharlesShang/TFFRCNN)\nto download and prepare the training, validation, test data \nand the VGG16 model pre-trained on ImageNet. \n\nSince the program loading the data in `faster_rcnn_pytorch/data` by default,\nyou can set the data path as following.\n```bash\ncd faster_rcnn_pytorch\nmkdir data\ncd data\nln -s $VOCdevkit VOCdevkit2007\n```\n\nThen you can set some hyper-parameters in `train.py` and training parameters in the `.yml` file.\n\nNow I got a 0.661 mAP on VOC07 while the origin paper got a 0.699 mAP.\nYou may need to tune the loss function defined in `faster_rcnn/faster_rcnn.py` by yourself.\n\n### Training with TensorBoard\nWith the aid of [Crayon](https://github.com/torrvision/crayon),\nwe can access the visualisation power of TensorBoard for any \ndeep learning framework.\n\nTo use the TensorBoard, install Crayon (https://github.com/torrvision/crayon)\nand set `use_tensorboard = True` in `faster_rcnn/train.py`.\n\n### Evaluation\nSet the path of the trained model in `test.py`.\n```bash\ncd faster_rcnn_pytorch\nmkdir output\npython test.py\n```\n\nLicense: MIT license (MIT)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A0F4:3A3DD:179DF5:5E0589:6AB92C70"},"text_sha256":"45b627bb5fbf0f18899de84e8a26d2b30505ef0bf686379a60f0e3fd7ab7e7ff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"opendatacam/opendatacam","input_row":{"repository":"opendatacam/opendatacam","url":"https://github.com/opendatacam/opendatacam","name":"opendatacam","owner":"opendatacam","description":"An open source tool to quantify the world","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1726,"issues":399,"created_at":"2017-08-29T13:29:23Z","updated_at":"2026-09-25T17:16:22Z","first_commit_at":"2017-08-29T13:41:37Z","last_commit_at":"2023-11-30T21:58:24Z","activity_months":75.040000000000006,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:13.580Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"opendatacam/opendatacam","visibility":"public","created_at":"2017-08-29T13:29:23Z","updated_at":"2026-09-25T17:16:22Z","private":false,"fork":false,"archived":false,"stargazers_count":1726,"open_issues_count":62,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1873","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0921:0AC4:12A416A:15FA889:6AB92C71"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1872","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:17F992D:1C2016A:6AB92C71"},"commit":{"sha":"2e82e444f0ae32ff5503bff63edd6263c61cd571","url":"https://github.com/opendatacam/opendatacam/commit/2e82e444f0ae32ff5503bff63edd6263c61cd571","date":"2018-05-17T14:23:43Z","author_date":"2018-05-17T14:23:43Z","committer_date":"2018-05-17T14:23:43Z","tree_sha":"395081502a1c5bd957c464e84a3e0a0ec0ddf2a3","message_first_line":"WIP: remove prototype folder from repo"},"tree_request_status":200,"tree_rate":{"github_remaining":"1871","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0865:B1202:17AED06:1BD4D8B:6AB92C72"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8900,"blob_sha":"b18722938a1d47a691ab0d3a9a157ee3e4d233be","priority":0}],"documents":[{"path":"README.md","size":8900,"blob_sha":"b18722938a1d47a691ab0d3a9a157ee3e4d233be","priority":0,"status":200,"text":"# Open traffic cam (with YOLO)\n\nThis project is offline lightweight DIY solution to monitor urban landscape. After installing this software on the specified hardware (Nvidia Jetson board + Logitech webcam), you will be able to count cars, pedestrians, motorbikes from your webcam live stream.\n\nBehind the scenes, it feeds the webcam stream to a neural network (YOLO darknet) and make sense of the generated detections.\n\nIt is very alpha and we do not provide any guarantee that this will work for your use case, but we conceived it as a starting point from where you can build-on & improve.\n\n## 💻 Hardware pre-requisite\n\n- Nvidia Jetson TX2 \n- Webcam Logitech C222 (or any usb webcam compatible with Ubuntu 16.04)\n- A smartphone / tablet / laptop that you will use to operate the system\n\n## ⚙ System overview\n\nSee [technical architecture](#technical-architecture) for a more detailed overview\n\n![open traffic cam architecture](https://user-images.githubusercontent.com/533590/33759265-044eb90e-dc02-11e7-9533-9588f7f5c4a2.png)\n\n[Edit schema](https://docs.google.com/drawings/d/1Pw3rsHGyj_owZUScRwBnZKb1IltA3f0R8yCmcdEbnr8/edit?usp=sharing)\n\n## 🛠 Step by Step install guide\n\n> NOTE: lots of those steps needs to be automated by integrating them in a docker image or something similar, for now need to follow the full procedure\n\n### ⚡️Flash Jetson Board:\n\n- Download [JetPack](https://developer.nvidia.com/embedded/downloads#?search=jetpack%203.1) to Flash your Jetson board with the linux base image and needed dependencies\n- Follow the [install guide](http://docs.nvidia.com/jetpack-l4t/3.1/index.html#developertools/mobile/jetpack/l4t/3.1/jetpack_l4t_install.htm) provided by NVIDIA\n\n### 🛩Prepare Jetson Board\n\n- Update packages\n\n  ```bash\n  sudo apt-get update\n  ```\n\n- Install __cURL__\n\n  ```bash\n  sudo apt-get install curl\n  ```\n\n- install __git-core__\n\n  ```bash\n  sudo apt-get install git-core\n  ```\n\n- Install __nodejs__ (v8):\n\n  ```bash\n  curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -\n  sudo apt-get install -y nodejs\n  sudo apt-get install -y build-essential\n  ```\n\n- Install __ffmpeg__ (v3)\n\n  ```bash\n  sudo add-apt-repository ppa:jonathonf/ffmpeg-3\n  # sudo add-apt-repository ppa:jonathonf/tesseract (ubuntu 14.04 only!!)\n  sudo apt update && sudo apt upgrade\n  sudo apt-get install ffmpeg\n  ```\n\n- Optional: Install __nano__\n\n  ```bash\n  sudo apt-get install nano\n  ```\n\n### 📡Configure Ubuntu to turn the jetson into a wifi access point\n\n- enable SSID broadcast \n\n  add the following line to `/etc/modprobe.d/bcmdhd.conf`\n\n  ```bash\n  options bcmdhd op_mode=2\n  ```\n\n  further infos: [here](https://devtalk.nvidia.com/default/topic/910608/jetson-tx1/setting-up-wifi-access-point-on-tx1/post/4786912/#4786912)\n\n- Configure hotspot via UI \n\n  __follow this guide: <https://askubuntu.com/a/762885>__\n\n- Define Address range for the hotspot network\n\n  - Go to the file named after your Hotspot SSID in `/etc/NetworkManager/system-connections`\n\n    ```bash\n    cd /etc/NetworkManager/system-connections\n    sudo nano <YOUR-HOTSPOT-SSID-NAME>\n    ```\n\n  - Add the following line to this file:\n\n    ```\n    [ipv4]\n    dns-search=\n    method=shared\n    address1=192.168.2.1/24,192.168.2.1 <--- this line\n    ```\n\n  - Restart the network-manager\n\n    ```bash\n    sudo service network-manager restart\n    ```\n\n### 🚀Configure jetson to start in overclocking mode:\n\n- Add the following line to `/etc/rc.local` before `exit 0`:\n\n  ```bash\n  #Maximize performances \n  ( sleep 60 && /home/ubuntu/jetson_clocks.sh )&\n  ```\n\n- Enable `rc.local.service`\n\n  ```bash\n  chmod 755 /etc/init.d/rc.local\n  sudo systemctl enable rc-local.service\n  ```\n\n### 👁Install Darknet-net:\n\n__IMPORTANT__ Make sure that __openCV__ (v2) and __CUDA__ will be installed via JetPack (post installation step)\nif not:  (fallback :openCV 2: [install script](https://gist.github.com/jayant-yadav/809723151f2f72a93b2ee1040c337427#file-opencv_install-sh), CUDA: no easy way yet)\n\n- Install __libwsclient__:\n\n  ```bash\n  git clone https://github.com/PTS93/libwsclient\n  cd libwsclient\n  ./autogen.sh\n  ./configure && make && sudo make install\n  ```\n\n- Install __liblo__:\n\n  ```bash\n  wget https://github.com/radarsat1/liblo/releases/download/0.29/liblo-0.29.tar.gz\n  tar xvfz liblo-0.29.tar.gz\n  cd liblo-0.29\n  ./configure && make && sudo make install\n  ```\n\n- Install __json-c__:\n\n  ```bash\n  git clone https://github.com/json-c/json-c.git\n  cd json-c\n  sh autogen.sh\n  ./configure && make && make check && sudo make install\n  ```\n\n- Install __darknet-net__:\n\n  ```bash\n  git clone https://github.com/meso-unimpressed/darknet-net.git\n  ```\n\n- Download __weight files__:\n\n  link: [yolo.weight-files](https://pjreddie.com/media/files/yolo-voc.weights)\n\n  Copy `yolo-voc.weights` to `darknet-net` repository path (root level)\n\n  e.g.:\n\n  ```\n  darknet-net\n    |-cfg\n    |-data\n    |-examples\n    |-include\n    |-python\n    |-scripts\n    |-src\n    |# ... other files\n    |yolo-voc.weights <--- Weight file should be in the root directory\n  ```\n\n- Make __darknet-net__\n\n  ```bash\n  cd darknet-net\n  make\n  ```\n\n### 🎥Install the open-data-cam node app\n\n- Install __pm2__ and __next__ globally\n\n  ```bash\n  sudo npm i -g pm2\n  sudo npm i -g next\n  ```\n\n- Clone __open_data_cam__ repo:\n\n  ```bash\n  git clone https://github.com/moovel/lab-open-data-cam.git\n  ```\n\n- Specify __ABSOLUTE__  `PATH_TO_YOLO_DARKNET` path in `lab-open-data-cam/config.json` (open data cam repo)\n\n  e.g.:\n\n  ```Json\n  {\n  \t\"PATH_TO_YOLO_DARKNET\" : \"/home/nvidia/darknet-net\"\n  }\n  ```\n\n- Install __open data cam__\n\n  ```bash\n  cd <path/to/open-data-cam>\n  npm install\n  npm run build\n  ```\n\n- Run __open data cam__ on boot\n\n  ```bash\n  cd <path/to/open-data-cam>\n  # launch pm2 at startup\n  # this command gives you instructions to configure pm2 to \n  # start at ubuntu startup, follow them\n  sudo pm2 startup  \n\n  # Once pm2 is configured to start at startup\n  # Configure pm2 to start the Open Traffic Cam app\n  sudo pm2 start npm --name \"open-data-cam\" -- start\n  sudo pm2 save\n  ```\n\n### 🏁 Restart the jetson board and open `http://IP-OF-THE-JETSON-BOARD:8080/`\n\n### Connect you device to the jetson\n\n> 💡 We should maybe set up a \"captive portal\" to avoid people needing to enter the ip of the jetson, didn't try yet 💡 \n\nWhen the jetson is started you should have a wifi \"YOUR-HOTSPOT-NAME\" available.\n\n- Connect you device to the jetson wifi\n- Open you browser and open http://IPOFTHEJETSON:8080\n- In our case, IPOFJETSON is: http://192.168.2.1:8080 \n\n### You are done 👌\n\n> 🚨 This alpha version of december is really alpha and you might need to restart ubuntu a lot as it doesn't clean up process well when you switch between the counting and the webcam view 🚨\n\nYou should be able to monitor the jetson from the UI we've build and count 🚗 🏍 🚚 !  \n\n### ‼️Automatic installation (alpha)\n\nThe install script for autmatic installation \n\n> Setting up the access point is not automated yet! __follow this guide: https://askubuntu.com/a/762885 __ to set up the hotspot.\n\n- run the `install.sh` script\n\n  ```bash\n  sudo chmod +x install.sh\n  ./install.sh\n  sudo reboot\n  ```\n\n## Troubleshoothing\n\nTo debug the app log onto the jetson board and inspect the logs from pm2 or stop the pm2 service (`sudo pm2 stop <pid>`) and start the app by using `sudo npm start` to see the console output directly. \n\n- __Error__: `please specify the path to the raw detections file`\n\n  Make sure that `ffmpeg` is installed and is above version `2.8.11` \n\n- __Error__: `Could *not* find a valid build in the '.next' directory! Try building your app with '*next* build' before starting the server`\n\n  Run `npm build` before starting the app\n\n- Could not find darknet. Be sure to `make` darknet without `sudo` otherwise it will abort mid installation.\n\n- __Error__: `cannot open shared object file: No such file or directory`\n\n  Try reinstalling the liblo package.\n\n- __Error__: `Error: Cannot stop process that is not running.` \n\n  It is possible that a process with the port `8090` is causing the error. Try to kill the process and restart the board:\n\n  ```bash\n  sudo netstat -nlp | grep :8090\n  sudo kill <pid>\n  ```\n\n\n## 🛠 Development notes\n\n### Technical architecture\n\n![technical architecture open traffic cam](https://user-images.githubusercontent.com/533590/33723806-ed836ace-db6d-11e7-9d7b-12b79e3bcbed.jpg)\n\n[Edit schema](https://docs.google.com/drawings/d/1GCYcnQeGTiifmr3Hc77x6RjCs5RZhMvgIQZZP_Yzbs0/edit?usp=sharing)\n\n### Miscellaneous dev tips\n\n#### Mount jetson filesystem as local filesystem on mac for dev\n\n`sshfs -o allow_other,defer_permissions nvidia@192.168.1.222:/home/nvidia/Desktop/lab-traffic-cam /Users/tdurand/Documents/ProjetFreelance/Moovel/remote-lab-traffic-cam/`\n\n#### SSH jetson\n\n`ssh nvidia@192.168.1.222`\n\n#### Install it and run:\n\n```bash\nyarn install\nyarn run dev\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FFC6:326565:17BB60:5E23DC:6AB92C72"},"text_sha256":"caf296f5db6cd9c13e5bd81a7bf36264708a253c31f69085d75e2ec189a88f7e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1870","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17F2890:1C1901D:6AB92C73"},"commit":{"sha":"7080baa3e212c85fb1283a22a49d82019edeeb87","url":"https://github.com/opendatacam/opendatacam/commit/7080baa3e212c85fb1283a22a49d82019edeeb87","date":"2023-11-30T21:58:24Z","author_date":"2023-11-30T21:58:24Z","committer_date":"2023-11-30T21:58:24Z","tree_sha":"8d97de183868e8ab00954037220335815783e9f9","message_first_line":"Merge pull request #628 from opendatacam/vsaw-patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1869","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0852:0BA1:D96B9D:FF80DF:6AB92C73"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6043,"blob_sha":"82e5d8f516dd60862126eeb34322792c52fc314d","priority":0}],"documents":[{"path":"README.md","size":6043,"blob_sha":"82e5d8f516dd60862126eeb34322792c52fc314d","priority":0,"status":200,"text":"# OpenDataCam – An open source tool to quantify the world\n\nOpenDataCam is an open source tool that helps to quantify the world.\nWith computer vision OpenDataCam understands and quantifies moving objects.\nThe simple setup allows everybody to count moving objects from cameras and videos.\n\nPeople use OpenDataCam for many different [use cases](https://opendata.cam/use-cases).\nIt is especially popular for traffic studies (modal-split, turn-count, etc.) but OpenDataCam detects 50+ common objects out of the box and can be used for many more things.\nAnd in case it does not detect what you are looking for, you can always train your own model.\n\nOpenDataCam uses machine learning to detect objects in videos and camera feeds.\nIt then follows the objects as they move accross the scene.\nDefine counters via the easy to use UI or API, and every time an object crosses the counter, OpenDataCam takes count.\n\n## Demo Videos\n\n| 👉 [UI Walkthrough (2 min, OpenDataCam 3.0)](https://vimeo.com/432747455) | 👉 [UI Walkthrough (4 min, OpenDataCam 2.0)](https://vimeo.com/346340651) | 👉 [IoT Happy Hour #13:  OpenDataCam 3.0](https://youtu.be/YfRvUeSLi0M?t=1000 ) |\n| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| [![OpenDataCam 3.0](https://i.vimeocdn.com/video/914771794_640.jpg)](https://vimeo.com/432747455) | [![Demo OpenDataCam](https://i.vimeocdn.com/video/805477718_640.jpg)](https://vimeo.com/346340651) | [![IoT](https://img.youtube.com/vi/YfRvUeSLi0M/hqdefault.jpg)](https://youtu.be/YfRvUeSLi0M?t=1000) |\n\n## Features\n\nOpenDataCam comes [feature packed](https://opendata.cam/features), the highlight are\n\n- Multiple object classes\n- Fine grained counter logic\n- Trajectory analysis\n- Real-time or pre-recorded video sources\n- Run on small devices in the field or data centers in the cloud\n- You own the data\n- Easy to use [API](https://opendata.cam/docs/api/)\n\n## 🎬 Get Started, quick setup\n\nThe quickest way to get started with OpenDataCam is to use the existing Docker Images.\n\n### Pre-Requesits\n\n- You will need Docker and Docker-Compose installed. \n- If you want to run OpenDataCam on a NVIDIA GPU you will additonally need\n  - [Nvidia CUDA 11 and cuDNN 8](https://developer.nvidia.com/cuda-downloads)\n  - [Nvidia Container toolkit installed](https://github.com/NVIDIA/nvidia-docker)\n  - You also need to install `nvidia-container-runtime`\n- To run OpenDataCam on a NVIDIA Jetson device you will need [Jetpack 5.x](https://developer.nvidia.com/embedded/jetpack-sdk-512).\n\n### Installation\n\n```bash\n# Download install script\nwget -N https://raw.githubusercontent.com/opendatacam/opendatacam/v3.0.2/docker/install-opendatacam.sh\n\n# Give exec permission\nchmod 777 install-opendatacam.sh\n\n# Note: You will be asked for sudo password when installing OpenDataCam\n\n# Install command for Jetson Nano\n./install-opendatacam.sh --platform nano\n\n# Install command for Jetson Xavier / Xavier NX\n./install-opendatacam.sh --platform xavier\n\n# Install command for a Laptop, Desktop or Server with NVIDIA GPU\n./install-opendatacam.sh --platform desktop\n```\n\nThis command will download and start a docker container on the machine.\nAfter it finishes the docker container starts a webserver on port 8080 and run a demo video.\n\n_Note:_ The docker container is started in auto-restart mode, so if you reboot your machine it will automaticaly start opendatacam on startup.\nTo stop it run `docker-compose down` in the same folder as the install script.\n\n### Use OpenDataCam\n\nOpen your browser at `http://[IP_OF_JETSON]:8080``.\n(If you are running with the Jetson connected to a screen try: [http://localhost:8080](http://localhost:8080))\n\nYou should see a video of a busy intersection where you can immediately start counting.\n\n### Next Steps\n\nNow you can…\n\n- Drag'n'Drop a video file into the browser window to have OpenDataCam analzye this file\n- Change the [video input](https://opendata.cam/docs/configuration/#video-input) to run from a USB-Cam or other cameras\n- Use custom [neural network weigts](https://opendata.cam/docs/configuration/#use-custom-neural-network-weights)\n\nand much more. See [Configuration](https://opendata.cam/docs/configuration/) for a full list of configuration options.\n\n## 🔌 API Documentation\n\nIn order to solve use cases that aren't taken care by our opendatacam base app, you might be able to build on top of our API instead of forking the project.\n\n[https://opendatacam.github.io/opendatacam/apidoc/](https://opendatacam.github.io/opendatacam/apidoc/)\n\n### 🗃 Data export documentation\n\n- [Counter data](https://opendatacam.github.io/opendatacam/apidoc/#api-Recording-Counter_data)\n- [Tracker data](https://opendatacam.github.io/opendatacam/apidoc/#api-Recording-Tracker_data)\n\n## 🛠 Development notes\n\nSee [Development notes](https://opendata.cam/docs/development/)\n\n## 💰️ Funded by the community\n\n- `@rantgithub` funded work to add Polygon counters and to improve the counting lines\n\n## 📫️ Contact\n\nPlease ask any Questions you have around OpenDataCam in the [GitHub Discussions](https://github.com/opendatacam/opendatacam/discussions).\nBugs, Features and anythings else regarding the development of OpenDataCam is tracked in [GitHub Issues](https://github.com/opendatacam/opendatacam/issues).\n\nFor business inquiries or professional support requests please contact [Valentin Sawadski](https://opendata.cam/#people_involved) or visit [OpenDataCam for Professionals](https://opendata.cam/professionals/).\n\n## 💌 Acknowledgments\n\n- Original darknet @pjreddie  : [https://pjreddie.com/darknet/](https://pjreddie.com/darknet/)\n- Darknet fork + YOLOv4 by @alexeyab : [https://github.com/alexeyab/darknet](https://github.com/alexeyab/darknet)\n- IOU / V-IOU Tracker by @bochinski : [https://github.com/bochinski/iou-tracker/](https://github.com/bochinski/iou-tracker/)\n- Next.js by @zeit : [https://github.com/zeit/next.js](https://github.com/zeit/next.js)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE6C:375F4:17D04F:5E3999:6AB92C73"},"text_sha256":"bfb21eb4ddd77377b6d8e27a263162e33a1e8199e82fe77312a679c5df9c4587"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"una-dinosauria/3d-pose-baseline","input_row":{"repository":"una-dinosauria/3d-pose-baseline","url":"https://github.com/una-dinosauria/3d-pose-baseline","name":"3d-pose-baseline","owner":"una-dinosauria","description":"A simple baseline for 3d human pose estimation in tensorflow. Presented at ICCV 17.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1462,"issues":203,"created_at":"2017-04-20T23:05:16Z","updated_at":"2026-09-23T06:24:18Z","first_commit_at":"2017-05-08T21:30:40Z","last_commit_at":"2020-09-26T01:50:20Z","activity_months":40.609999999999999,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:16.764Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"una-dinosauria/3d-pose-baseline","visibility":"public","created_at":"2017-04-20T23:05:16Z","updated_at":"2026-09-23T06:24:18Z","private":false,"fork":false,"archived":false,"stargazers_count":1462,"open_issues_count":32,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1868","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0780:6C6ED:17FF308:1C25664:6AB92C74"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1867","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090F:380E1C:17E092D:1C06415:6AB92C75"},"commit":{"sha":"1ca400232ad6158050d8b292ac812d94dbb49d74","url":"https://github.com/una-dinosauria/3d-pose-baseline/commit/1ca400232ad6158050d8b292ac812d94dbb49d74","date":"2018-03-21T05:09:26Z","author_date":"2018-03-21T05:09:26Z","committer_date":"2018-03-21T05:09:26Z","tree_sha":"4d8c4224d3bc2a7cead4634b8f6c753122d2a03e","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1866","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085A:74E6D:1813BB0:1C3A8C2:6AB92C75"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3797,"blob_sha":"70d6c33b19fdd0bd487da1f9282ee2a2bb99de83","priority":0}],"documents":[{"path":"README.md","size":3797,"blob_sha":"70d6c33b19fdd0bd487da1f9282ee2a2bb99de83","priority":0,"status":200,"text":"## 3d-pose-baseline\n\nThis is the code for the paper\n\nJulieta Martinez, Rayat Hossain, Javier Romero, James J. Little.\n_A simple yet effective baseline for 3d human pose estimation._\nIn ICCV, 2017. https://arxiv.org/pdf/1705.03098.pdf.\n\nThe code in this repository was mostly written by\n[Julieta Martinez](https://github.com/una-dinosauria),\n[Rayat Hossain](https://github.com/rayat137) and\n[Javier Romero](https://github.com/libicocco).\n\nWe provide a strong baseline for 3d human pose estimation that also sheds light\non the challenges of current approaches. Our model is lightweight and we strive\nto make our code transparent, compact, and easy-to-understand.\n\n### Dependencies\n\n* [h5py](http://www.h5py.org/)\n* [tensorflow](https://www.tensorflow.org/) 1.0 or later\n\n### First of all\n1. Watch our video: https://youtu.be/Hmi3Pd9x1BE\n2. Clone this repository and get the data. We provide the [Human3.6M](http://vision.imar.ro/human3.6m/description.php) dataset in 3d points, camera parameters to produce ground truth 2d detections, and [Stacked Hourglass](https://github.com/anewell/pose-hg-demo) detections.\n\n```bash\ngit clone https://github.com/una-dinosauria/3d-pose-baseline.git\ncd 3d-pose-baseline\nmkdir data\ncd data\nwget https://www.dropbox.com/s/e35qv3n6zlkouki/h36m.zip\nunzip h36m.zip\nrm h36m.zip\ncd ..\n```\n\n### Quick demo\n\nFor a quick demo, you can train for one epoch and visualize the results. To train, run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 1`\n\nThis should take about <5 minutes to complete on a GTX 1080, and give you around 75 mm of error on the test set.\n\nNow, to visualize the results, simply run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 1 --sample --load 24371`\n\nThis will produce a visualization similar to this:\n\n![Visualization example](/imgs/viz_example.png?raw=1)\n\n### Training\n\nTo train a model with clean 2d detections, run:\n\n<!-- `python src/predict_3dpose.py --camera_frame --residual` -->\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise`\n\nThis corresponds to Table 2, bottom row. `Ours (GT detections) (MA)`\n\nTo train on Stacked Hourglass detections, run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh`\n\nThis corresponds to Table 2, next-to-last row. `Ours (SH detections) (MA)`\n\nOn a GTX 1080 GPU, this takes <8 ms for forward+backward computation, and\n<6 ms for forward-only computation per batch of 64.\n\n### Pre-trained model\n\nWe also provide a model pre-trained on Stacked-Hourglass detections, available through [google drive](https://drive.google.com/file/d/0BxWzojlLp259MF9qSFpiVjl0cU0/view?usp=sharing).\n\nTo test the model, decompress the file at the top level of this project, and call\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --sample --load 4874200`\n\n### Fine-tuned stacked-hourglass detections\n\nYou can find the detections produced by Stacked Hourglass after fine-tuning on the H3.6M dataset on [google drive](https://drive.google.com/open?id=0BxWzojlLp259S2FuUXJ6aUNxZkE).\n\n### Citing\n\nIf you use our code, please cite our work\n\n```\n@inproceedings{martinez_2017_3dbaseline,\n  title={A simple yet effective baseline for 3d human pose estimation},\n  author={Martinez, Julieta and Hossain, Rayat and Romero, Javier and Little, James J.},\n  booktitle={ICCV},\n  year={2017}\n}\n```\n\n### Other implementations\n\n* [Pytorch](https://github.com/weigq/3d_pose_baseline_pytorch) by [@weigq](https://github.com/weigq)\n\n### License\nMIT\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DFD8:345ED4:179B28:5E0290:6AB92C75"},"text_sha256":"a2e3b09ab8c3e27f8fb30065537595ae98d328784cd78d3e9c838e3d42964be6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1865","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0922:1B4E7A:17BAB89:1BE13B3:6AB92C76"},"commit":{"sha":"666080d86a96666d499300719053cc8af7ef51c8","url":"https://github.com/una-dinosauria/3d-pose-baseline/commit/666080d86a96666d499300719053cc8af7ef51c8","date":"2020-09-26T01:50:20Z","author_date":"2020-09-26T01:50:20Z","committer_date":"2020-09-26T01:50:20Z","tree_sha":"7e63a3209c3f743bddd69d9784824494c13cfba5","message_first_line":"lint, clean imports, update viz example"},"tree_request_status":200,"tree_rate":{"github_remaining":"1864","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:1844575:1C6AAD1:6AB92C76"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5688,"blob_sha":"85e16d9e3defc3a37695d0fb86641c7fbb16ada1","priority":0}],"documents":[{"path":"README.md","size":5688,"blob_sha":"85e16d9e3defc3a37695d0fb86641c7fbb16ada1","priority":0,"status":200,"text":"## 3d-pose-baseline\n\nThis is the code for the paper\n\nJulieta Martinez, Rayat Hossain, Javier Romero, James J. Little.\n_A simple yet effective baseline for 3d human pose estimation._\nIn ICCV, 2017. https://arxiv.org/pdf/1705.03098.pdf.\n\nThe code in this repository was mostly written by\n[Julieta Martinez](https://github.com/una-dinosauria),\n[Rayat Hossain](https://github.com/rayat137) and\n[Javier Romero](https://github.com/libicocco).\n\nWe provide a strong baseline for 3d human pose estimation that also sheds light\non the challenges of current approaches. Our model is lightweight and we strive\nto make our code transparent, compact, and easy-to-understand.\n\n### Dependencies\n\n* Python ≥ 3.5\n* [cdflib](https://github.com/MAVENSDC/cdflib)\n* [tensorflow](https://www.tensorflow.org/) 1.0 or later\n\n### First of all\n1. Watch our video: https://youtu.be/Hmi3Pd9x1BE\n\n2. Clone this repository\n\n```bash\ngit clone https://github.com/una-dinosauria/3d-pose-baseline.git\ncd 3d-pose-baseline\nmkdir -p data/h36m/\n```\n\n3. Get the data\n\nGo to http://vision.imar.ro/human3.6m/, log in, and download the `D3 Positions` files for subjects `[1, 5, 6, 7, 8, 9, 11]`,\nand put them under the folder `data/h36m`. Your directory structure should look like this\n```bash\nsrc/\nREADME.md\nLICENCE\n...\ndata/\n  └── h36m/\n    ├── Poses_D3_Positions_S1.tgz\n    ├── Poses_D3_Positions_S11.tgz\n    ├── Poses_D3_Positions_S5.tgz\n    ├── Poses_D3_Positions_S6.tgz\n    ├── Poses_D3_Positions_S7.tgz\n    ├── Poses_D3_Positions_S8.tgz\n    └── Poses_D3_Positions_S9.tgz\n```\n\nNow, move to the data folder, and uncompress all the data\n\n```bash\ncd data/h36m/\nfor file in *.tgz; do tar -xvzf $file; done\n```\n\nFinally, download the `code-v1.2.zip` file, unzip it, and copy the `metadata.xml` file under `data/h36m/`\n\nNow, your data directory should look like this:\n\n```bash\ndata/\n  └── h36m/\n    ├── metadata.xml\n    ├── S1/\n    ├── S11/\n    ├── S5/\n    ├── S6/\n    ├── S7/\n    ├── S8/\n    └── S9/\n\n```\n\nThere is one little fix we need to run for the data to have consistent names:\n\n```bash\nmv h36m/S1/MyPoseFeatures/D3_Positions/TakingPhoto.cdf \\\n   h36m/S1/MyPoseFeatures/D3_Positions/Photo.cdf\n\nmv h36m/S1/MyPoseFeatures/D3_Positions/TakingPhoto\\ 1.cdf \\\n   h36m/S1/MyPoseFeatures/D3_Positions/Photo\\ 1.cdf\n\nmv h36m/S1/MyPoseFeatures/D3_Positions/WalkingDog.cdf \\\n   h36m/S1/MyPoseFeatures/D3_Positions/WalkDog.cdf\n\nmv h36m/S1/MyPoseFeatures/D3_Positions/WalkingDog\\ 1.cdf \\\n   h36m/S1/MyPoseFeatures/D3_Positions/WalkDog\\ 1.cdf\n```\n\nAnd you are done!\n\nPlease note that we are currently not supporting SH detections anymore, only training from GT 2d detections is possible now.\n\n### Quick demo\n\nFor a quick demo, you can train for one epoch and visualize the results. To train, run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --epochs 1`\n\nThis should take about <5 minutes to complete on a GTX 1080, and give you around 56 mm of error on the test set.\n\nNow, to visualize the results, simply run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --epochs 1 --sample --load 24371`\n\nThis will produce a visualization similar to this:\n\n![Visualization example](/imgs/viz_example.png?raw=1)\n\n### Training\n\nTo train a model with clean 2d detections, run:\n\n<!-- `python src/predict_3dpose.py --camera_frame --residual` -->\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise`\n\nThis corresponds to Table 2, bottom row. `Ours (GT detections) (MA)`\n\n<!--\nTo train on Stacked Hourglass detections, run\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh`\n\nThis corresponds to Table 2, next-to-last row. `Ours (SH detections) (MA)`\n\nOn a GTX 1080 GPU, this takes <8 ms for forward+backward computation, and\n<6 ms for forward-only computation per batch of 64.\n-->\n\n<!--\n### Pre-trained model\n\nWe also provide a model pre-trained on ground truth 2d detections, available through [google drive](https://drive.google.com/file/d/0BxWzojlLp259MF9qSFpiVjl0cU0/view?usp=sharing).\n\nTo test the model, decompress the file at the top level of this project, and call\n\n`python src/predict_3dpose.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --epochs 200 --sample --load 4874200`\n-->\n\n<!--\n### Fine-tuned stacked-hourglass detections\n\nYou can find the detections produced by Stacked Hourglass after fine-tuning on the H3.6M dataset on [google drive](https://drive.google.com/open?id=0BxWzojlLp259S2FuUXJ6aUNxZkE).\n-->\n\n### Citing\n\nIf you use our code, please cite our work\n\n```\n@inproceedings{martinez_2017_3dbaseline,\n  title={A simple yet effective baseline for 3d human pose estimation},\n  author={Martinez, Julieta and Hossain, Rayat and Romero, Javier and Little, James J.},\n  booktitle={ICCV},\n  year={2017}\n}\n```\n\n### Other implementations\n\n* [Pytorch](https://github.com/weigq/3d_pose_baseline_pytorch) by [@weigq](https://github.com/weigq)\n* [MXNet/Gluon](https://github.com/lck1201/simple-effective-3Dpose-baseline) by [@lck1201](https://github.com/lck1201)\n\n### Extensions\n\n* [@ArashHosseini](https://github.com/ArashHosseini) maintains [a fork](https://github.com/ArashHosseini/3d-pose-baseline) for estimating 3d human poses using the 2d poses estimated by either [OpenPose](https://github.com/ArashHosseini/openpose) or [tf-pose-estimation](https://github.com/ildoonet/tf-pose-estimation) as input.\n\n### License\nMIT\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7BE0:35999:179E62:5E0798:6AB92C73"},"text_sha256":"f70540d845f090887a05385e6d19c1427d24b7f9b1717ab06f9c0af3cab2a3bf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"imagej/imagej2","input_row":{"repository":"imagej/imagej2","url":"https://github.com/imagej/imagej2","name":"imagej2","owner":"imagej","description":"Open scientific N-dimensional image processing :microscope: :sparkler:","language":"Java","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":1407,"issues":277,"created_at":"2012-01-26T18:32:43Z","updated_at":"2026-09-23T19:57:08Z","first_commit_at":"2010-09-02T17:09:40Z","last_commit_at":"2026-08-07T14:51:47Z","activity_months":191.13,"ai_ml_match_topics":"computer-vision; image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:19.172Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"imagej/imagej2","visibility":"public","created_at":"2012-01-26T18:32:43Z","updated_at":"2026-09-23T19:57:08Z","private":false,"fork":false,"archived":false,"stargazers_count":1407,"open_issues_count":134,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"1863","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D2:2D7D17:17921CA:1BB7009:6AB92C77"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1862","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:17F7B66:1C1E600:6AB92C77"},"commit":{"sha":"868aa42027958b8d3f0b3b4c6405bf8664558706","url":"https://github.com/imagej/imagej2/commit/868aa42027958b8d3f0b3b4c6405bf8664558706","date":"2018-05-23T12:44:03Z","author_date":"2018-05-23T12:43:06Z","committer_date":"2018-05-23T12:44:03Z","tree_sha":"b975bb8f182a8082169b56a3781d958e1fd89dfa","message_first_line":"Update Travis CI configuration"},"tree_request_status":200,"tree_rate":{"github_remaining":"1861","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17CECF5:1BF54DB:6AB92C78"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5303,"blob_sha":"b0b7a27e23953a7b67118a3e4c068ba30fab71f5","priority":0}],"documents":[{"path":"README.md","size":5303,"blob_sha":"b0b7a27e23953a7b67118a3e4c068ba30fab71f5","priority":0,"status":200,"text":"[![](https://travis-ci.org/imagej/imagej.svg?branch=master)](https://travis-ci.org/imagej/imagej)\n[![Join the chat at https://gitter.im/imagej/imagej](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/imagej/imagej?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nImageJ2 is a new version of [ImageJ](http://imagej.net/) seeking to strengthen\nboth the software and its community. Internally, it is a total redesign of\nImageJ, but it is backwards compatible with ImageJ 1.x via a \"legacy layer\" and\nfeatures a user interface closely modeled after the original.\n\nUnder the hood, ImageJ2 completely isolates the image processing logic from the\ngraphical user interface (UI), allowing ImageJ2 commands to be used in many\ncontexts, including headless in the cloud or on a server such as\n[OMERO](http://openmicroscopy.org/site/support/omero), or from within another\napplication such as [KNIME](http://knime.org/),\n[Icy](http://icy.bioimageanalysis.org/) or\n[CellProfiler](http://cellprofiler.org/) (a Python application).\n\nImageJ2 has an N-dimensional data model driven by the powerful\n[ImgLib2](http://imglib2.net/) library, which supports image data expressed in\nan extensible set of numeric and non-numeric types, and accessed from an\nextensible set of data sources. ImageJ2 is driven by a state-of-the-art,\ncollaborative development process, including version control, unit testing,\nautomated builds via a continuous integration system, a bug tracker and more.\n\nWe are collaborating closely with related projects including\n[Fiji](http://fiji.sc/), [SCIFIO](http://scif.io/) and\n[OME](http://openmicroscopy.org/), and are striving to deliver a coherent\nsoftware stack reusable throughout the life sciences community and beyond. For\nmore details, see the [SciJava web site](http://scijava.org/).\n\nFor more details on the project, see the [ImageJ web site](http://imagej.net/).\n\n\n# LICENSING\n\nImageJ2 is distributed under a\n[Simplified BSD License](http://en.wikipedia.org/wiki/BSD_licenses);\nfor the full text of the license, see\n[LICENSE.txt](https://github.com/imagej/imagej/blob/master/LICENSE.txt).\n\nFor the list of developers and contributors, see\n[the parent POM](https://github.com/imagej/pom-imagej/blob/master/pom.xml).\n\n\n# IMAGEJ AS A LIBRARY\n\n## From Java\n\nThis repository is the master ImageJ application, which brings together all of\nImageJ under the artifact\n[net.imagej:imagej](http://maven.imagej.net/index.html#nexus-search;gav~net.imagej~imagej~~~~kw,versionexpand).\nIt is the easiest entry point if you are looking to use ImageJ as a library from\nyour own software. E.g., in your Maven `pom.xml`:\n\n```\n<parent>\n  <groupId>org.scijava<\/groupId>\n  <artifactId>pom-scijava<\/artifactId>\n  <version>16.2.0<\/version>\n<\/parent>\n...\n<dependency>\n  <groupId>net.imagej<\/groupId>\n  <artifactId>imagej<\/artifactId>\n<\/dependency>\n```\n\nWe recommend inheriting from the\n[pom-scijava](https://github.com/scijava/pom-scijava) parent, although it is not\nrequired. (If you do not, you will need to include the `<version>` of ImageJ in\nyour `<dependency>` declaration.)\n\n## From other languages\n\n* __JavaScript__: Use the\n  [imagej module on npm](https://www.npmjs.com/package/imagej)\n  to call ImageJ in-process from node.js code.\n* __Python__: Use the\n  [imagej module on pypi](https://pypi.org/project/imagej/)\n  to call ImageJ in-process or interprocess from Python code.\n* __Ruby, R, LLVM and beyond__: Use [GraalVM](https://www.graalvm.org/)\n  to combine ImageJ with Truffle-based languages in the same VM,\n  with shared objects and memory on a single VM heap.\n* __Interprocess__: Use the\n  [ImageJ Server](https://github.com/imagej/imagej-server)\n  to work with ImageJ via a RESTful web services API, between\n  processes on the same machine, or between multiple machines.\n\n\n# DEPENDENCIES\n\nThis component depends on other, lower level components, each of which lives in\nits own repository:\n\n* [ImageJ Common](https://github.com/imagej/imagej-common)\n* [ImageJ Legacy](https://github.com/imagej/imagej-legacy)\n* [ImageJ Ops](https://github.com/imagej/imagej-ops)\n* [ImageJ Updater](https://github.com/imagej/imagej-updater)\n* [ImgLib2](https://github.com/imglib/imglib)\n* [SCIFIO](https://github.com/scifio/scifio)\n* [SciJava Common](https://github.com/scijava/scijava-common)\n\nIt also includes various \"plugin\" components at runtime:\n\n* [ImageJ Plugins: Commands](https://github.com/imagej/imagej-plugins-commands)\n* [ImageJ Plugins: Tools](https://github.com/imagej/imagej-plugins-tools)\n* [ImageJ Plugins: Uploader: SSH](https://github.com/imagej/imagej-plugins-uploader-ssh)\n* [ImageJ Plugins: Uploader: WebDAV](https://github.com/imagej/imagej-plugins-uploader-webdav)\n* [ImageJ Scripting](https://github.com/imagej/imagej-scripting)\n* [SciJava Plugins: Platforms](https://github.com/scijava/scijava-plugins-platforms)\n* [SciJava Plugins: Text: Markdown](https://github.com/scijava/scijava-plugins-text-markdown)\n* [SciJava Plugins: Text: Plain](https://github.com/scijava/scijava-plugins-text-plain)\n\nSee the [pom.xml](pom.xml) for a complete list of dependencies.\n\n\n# BUGS\n\nFor a list of known issues, see the\n[GitHub issues](https://github.com/imagej/imagej/issues).\n\nPlease report any bugs by following the\n[instructions online](http://imagej.net/Bugs).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"738C:3FA0D:178F9B:5DF7BE:6AB92C51"},"text_sha256":"b586059748e7cc76c9c0edb58b72f6778fbed38cd96592c2b8e913e42c226f80"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1860","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17D3C01:1BF9ADC:6AB92C78"},"commit":{"sha":"8bb3b4d979130ee0a09a1ba6fa8b40d675457ff6","url":"https://github.com/imagej/imagej2/commit/8bb3b4d979130ee0a09a1ba6fa8b40d675457ff6","date":"2026-06-28T03:06:26Z","author_date":"2026-06-28T03:06:26Z","committer_date":"2026-06-28T03:06:26Z","tree_sha":"9a5471cae0618cbdd4c8736b10a6ec26cee98394","message_first_line":"Bump to next development cycle"},"tree_request_status":200,"tree_rate":{"github_remaining":"1859","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083B:71C58:17C70B8:1BEDCE3:6AB92C79"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6863,"blob_sha":"13b4c19a0b6ffef01b9e156db59d28044b5a94aa","priority":0}],"documents":[{"path":"README.md","size":6863,"blob_sha":"13b4c19a0b6ffef01b9e156db59d28044b5a94aa","priority":0,"status":200,"text":"[![Image.sc Forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fimagej.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/imagej)\n[![Build Status](https://github.com/imagej/imagej2/actions/workflows/build.yml/badge.svg)](https://github.com/imagej/imagej2/actions/workflows/build.yml)\n[![developer chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://imagesc.zulipchat.com/#narrow/stream/327236-ImageJ2)\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/imagej/imagej2)\n\nThis is the repository for [ImageJ2](https://imagej.net/software/imagej2),\na rewrite of the original [ImageJ](https://imagej.net/software/imagej) for\nmultidimensional image data, with a focus on scientific imaging. Its central\ngoal is to broaden the paradigm of ImageJ beyond the limitations of the\noriginal ImageJ application, to support a wider range of multidimensional\nscientific image data.\n\nTo ensure backwards compatibility, ImageJ2 has been designed to fully integrate\ninto the original ImageJ user interface. This allows users to keep using ImageJ\nin familiar ways, while providing the ability to migrate toward more powerful\nnew features as needed.\n\nUnder the hood, ImageJ2 completely isolates the image processing logic from the\ngraphical user interface (UI), allowing ImageJ2 commands to be used in many\ncontexts, including headless in the cloud or on a server such as\n[OMERO](https://imagej.net/software/omero), from within another Java\napplication such as [KNIME](https://imagej.net/software/knime) or\n[Icy](https://imagej.net/software/icy), or even from Python-based applications\nsuch as [CellProfiler](https://imagej.net/software/cellprofiler) and\n[napari](https://imagej.net/software/napari) via\n[PyImageJ](https://pypi.org/project/pyimagej).\n\nImageJ2 has an N-dimensional data model driven by the powerful\n[ImgLib2](https://imagej.net/libs/imglib2) library, which supports image data\nexpressed in an extensible set of numeric and non-numeric types, and accessed\nfrom an extensible set of data sources. ImageJ2 is driven by a collaborative\ndevelopment process; for details, see the\n[Contributing](https://imagej.net/contribute/) page.\n\nWe collaborate with related projects such as\n[Fiji](https://imagej.net/software/fiji),\n[SCIFIO](https://imagej.net/software/scifio),\n[CellProfiler](https://imagej.net/software/cellprofiler), and\n[OME](https://openmicroscopy.org/), and are striving to deliver a coherent\nsoftware stack reusable throughout the life sciences community and beyond.\nFor more details, see the [SciJava web site](https://scijava.org/).\n\nFor more details on the project, see the [ImageJ wiki](https://imagej.net/).\n\n\n# LICENSING\n\nImageJ2 is distributed under a\n[Simplified BSD License](https://en.wikipedia.org/wiki/BSD_licenses);\nfor the full text of the license, see\n[LICENSE.txt](https://github.com/imagej/imagej2/blob/main/LICENSE.txt).\n\n\n# IMAGEJ2 AS A LIBRARY\n\n## From Java\n\nThis repository is the main ImageJ2 application, which brings together all of\nImageJ2 under the artifact\n[net.imagej:imagej](https://maven.scijava.org/index.html#nexus-search;gav~net.imagej~imagej~~~~kw,versionexpand).\nIt is the easiest entry point if you are looking to use ImageJ2 as a library\nfrom your own software. E.g., in your Maven `pom.xml`:\n\n```\n<parent>\n  <groupId>org.scijava<\/groupId>\n  <artifactId>pom-scijava<\/artifactId>\n  <version>45.0.0<\/version>\n<\/parent>\n...\n<dependency>\n  <groupId>net.imagej<\/groupId>\n  <artifactId>imagej<\/artifactId>\n<\/dependency>\n```\n\nWe recommend inheriting from the\n[pom-scijava](https://github.com/scijava/pom-scijava) parent, although it is not\nrequired. (If you do not, you will need to include the `<version>` of ImageJ2 in\nyour `<dependency>` declaration, and you may be bitten by [this bug in\nMaven](https://stackoverflow.com/q/45041888/1207769) regarding the versions of\nImageJ2's dependencies that you inherit.)\n\n## From other languages\n\n* __Python__: Use the\n  [PyImageJ module on PyPi](https://pypi.org/project/pyimagej/)\n  to call ImageJ2 in-process from Python code, or the\n  [Appose](https://apposed.org/) library to call ImageJ2\n  as a separate process from Python code or vice versa.\n* __JavaScript__: Use the\n  [imagej module on npm](https://www.npmjs.com/package/imagej)\n  to call ImageJ2 in-process from node.js code.\n* __Ruby, R, LLVM and beyond__: Use [GraalVM](https://www.graalvm.org/)\n  to combine ImageJ2 with Truffle-based languages in the same VM,\n  with shared objects and memory on a single VM heap.\n* __Web__: You can use the\n  [ImageJ Server](https://github.com/imagej/imagej-server)\n  to work with ImageJ2 via a RESTful web services API, between\n  processes on the same machine, or between multiple machines.\n\n\n# DEPENDENCIES\n\nThis component depends on other, lower level components, each of which lives in\nits own repository:\n\n* [ImageJ Common](https://github.com/imagej/imagej-common)\n* [ImageJ Legacy](https://github.com/imagej/imagej-legacy)\n* [ImageJ Ops](https://github.com/imagej/imagej-ops)\n* [ImageJ Updater](https://github.com/imagej/imagej-updater)\n* [ImgLib2](https://github.com/imglib/imglib2)\n* [SCIFIO](https://github.com/scifio/scifio)\n* [SciJava Common](https://github.com/scijava/scijava-common)\n\nIt also includes various \"plugin\" components at runtime:\n\n* [ImageJ Plugins: Commands](https://github.com/imagej/imagej-plugins-commands)\n* [ImageJ Plugins: Tools](https://github.com/imagej/imagej-plugins-tools)\n* [ImageJ Plugins: Uploader: SSH](https://github.com/imagej/imagej-plugins-uploader-ssh)\n* [ImageJ Plugins: Uploader: WebDAV](https://github.com/imagej/imagej-plugins-uploader-webdav)\n* [ImageJ Scripting](https://github.com/imagej/imagej-scripting)\n* [SciJava Desktop](https://github.com/scijava/scijava-desktop)\n* [SciJava Plugins: Text: Markdown](https://github.com/scijava/scijava-plugins-text-markdown)\n* [SciJava Plugins: Text: Plain](https://github.com/scijava/scijava-plugins-text-plain)\n\nSee the [pom.xml](pom.xml) for a complete list of dependencies.\n\n\n# BUGS\n\nFor a list of known issues, see the\n[GitHub issues](https://github.com/imagej/imagej2/issues).\n\nPlease report any bugs by following the\n[instructions online](https://imagej.net/discuss/bugs).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4B8:324E19:18140B:5E7CB3:6AB92C79"},"text_sha256":"f9afc98b52a9fdb164ed2ff5bb730112f8b79b209f47cf2b02ee74a63bf82bba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lagadic/visp","input_row":{"repository":"lagadic/visp","url":"https://github.com/lagadic/visp","name":"visp","owner":"lagadic","description":"Open Source Visual Servoing Platform","language":"C++","license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0","license_osi_approved":"true","stars":922,"issues":503,"created_at":"2015-09-15T05:51:50Z","updated_at":"2026-09-24T08:08:03Z","first_commit_at":"2005-06-08T07:08:17Z","last_commit_at":"2026-09-24T08:07:57Z","activity_months":255.52000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:21.818Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lagadic/visp","visibility":"public","created_at":"2015-09-15T05:51:50Z","updated_at":"2026-09-24T08:08:03Z","private":false,"fork":false,"archived":false,"stargazers_count":922,"open_issues_count":6,"license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0"},"error":"","rate":{"github_remaining":"1858","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17D3D10:1BF9C13:6AB92C79"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1857","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:17BAF46:1BE17F7:6AB92C7A"},"commit":{"sha":"8db551b5f202a8c092f377e7fd6f7a38f76d168e","url":"https://github.com/lagadic/visp/commit/8db551b5f202a8c092f377e7fd6f7a38f76d168e","date":"2018-05-17T17:58:16Z","author_date":"2018-05-17T17:58:16Z","committer_date":"2018-05-17T17:58:16Z","tree_sha":"bd7d2efc745004da6eadca81ea91f7b0560f1cff","message_first_line":"Merge pull request #364 from s-trinh/fix_cdash_testGenericTracker_thresholds_2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1856","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D5:6E5BD:17A95D6:1BCEB87:6AB92C7A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1559,"blob_sha":"d59758838ecc8b39e07c2100192c5ad7c4ea211b","priority":0}],"documents":[{"path":"README.md","size":1559,"blob_sha":"d59758838ecc8b39e07c2100192c5ad7c4ea211b","priority":0,"status":200,"text":"### ViSP: Open source Visual Servoing Platform\n\nPlatform | Build Status |\n-------- | ------------ |\nLinux and OS X | [![Build Status](https://travis-ci.org/lagadic/visp.png)](https://travis-ci.org/lagadic/visp) |\nWindows | [![Build status](https://ci.appveyor.com/api/projects/status/121dscdkryf5dbn0/branch/master?svg=true)](https://ci.appveyor.com/project/fspindle/visp/branch/master) |\n\nThis project is a cross-platform library (Linux, Windows, Mac) that allows prototyping and developing applications using visual tracking and visual servoing technics at the heart of the researches done by Inria <a href=\"http://team.inria.fr/lagadic\">Lagadic team<\/a>. ViSP is able to compute control laws that can be applied to robotic systems. It provides a set of visual features that can be tracked using real time image processing or computer vision algorithms. ViSP provides also simulation capabilities. ViSP can be useful in robotics, computer vision, augmented reality and computer animation. Our <a href=\"https://www.youtube.com/user/VispTeam\">YouTube channel<\/a> gives an overview of the applications that could be tackled.\n\n#### Resources\n- Homepage: http://visp.inria.fr\n- Wiki: https://github.com/lagadic/visp/wiki\n- Code documentation: http://visp-doc.inria.fr/doxygen/visp-daily\n- Q&A forum: http://gforge.inria.fr/forum/?group_id=397\n- Issue tracking: https://github.com/lagadic/visp/issues\n- YouTube: https://www.youtube.com/user/VispTeam\n\n#### Contributing\n\nPlease read before starting work on a pull request: http://visp.inria.fr/contributing-code/\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE72:3E1C8:17F723:5E5EE5:6AB92C7A"},"text_sha256":"4f22d1439e054017e1ff69d3a85243a8a9369447687b7dce034eb894f0a009bb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1855","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A5:35D5A8:17E12B8:1C07DFE:6AB92C7B"},"commit":{"sha":"b9e5ae5a8711881ca789c322a9f76a824bdb3ffc","url":"https://github.com/lagadic/visp/commit/b9e5ae5a8711881ca789c322a9f76a824bdb3ffc","date":"2026-06-30T13:52:20Z","author_date":"2026-06-30T13:52:20Z","committer_date":"2026-06-30T13:52:20Z","tree_sha":"3aef03b042c41cb2b6ceccc7a1e21bfd56cb28c1","message_first_line":"Fix multiple definition of `nlohmann::json_abi_v3_11_3::basic_json"},"tree_request_status":200,"tree_rate":{"github_remaining":"1854","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0823:7580A:180EFC7:1C35A9B:6AB92C7C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6836,"blob_sha":"06d9c4a7ee72c6da488a38ee37ee1b15f201b5f2","priority":0}],"documents":[{"path":"README.md","size":6836,"blob_sha":"06d9c4a7ee72c6da488a38ee37ee1b15f201b5f2","priority":0,"status":200,"text":"<h1>ViSP: Open source Visual Servoing Platform<\/h1>\n\n[![Github Releases](https://img.shields.io/github/release/lagadic/visp.svg)](https://github.com/lagadic/visp/releases)\n[![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](https://opensource.org/license/gpl-2-0/)\n\nPlatform | Build Status |\n-------- | ------------ |\nUbuntu 20.04, 22.04 (amd64)| [![ubuntu dep apt workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-apt.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-apt.yml) [![ubuntu dep src workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-src.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-src.yml)\nmacOS 13 and 14 | [![macos workflow](https://github.com/lagadic/visp/actions/workflows/macos.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/macos.yml)\niOS on macOS 11.0| [![ios workflow](https://github.com/lagadic/visp/actions/workflows/ios.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ios.yml)\nWindows 10 | [![Build status](https://ci.appveyor.com/api/projects/status/121dscdkryf5dbn0/branch/master?svg=true)](https://ci.appveyor.com/project/fspindle/visp/branch/master)\nOther arch Ubuntu 22.04 (aarch64, s390x)| [![other arch workflow](https://github.com/lagadic/visp/actions/workflows/other-arch.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/other-arch.yml)\nROS2 Humble Ubuntu 22.04 Jammy| [![Build Status](https://build.ros2.org/buildStatus/icon?job=Hdev__visp__ubuntu_jammy_amd64)](https://build.ros2.org/job/Hdev__visp__ubuntu_jammy_amd64/)\nROS2 Jazzy Ubuntu 24.04 Noble| [![Build Status](https://build.ros2.org/buildStatus/icon?job=Jdev__visp__ubuntu_noble_amd64)](https://build.ros2.org/job/Jdev__visp__ubuntu_noble_amd64/)\nROS2 Kilted Ubuntu 24.04 Noble| [![Build Status](https://build.ros2.org/buildStatus/icon?job=Kdev__visp__ubuntu_noble_amd64)](https://build.ros2.org/job/Kdev__visp__ubuntu_noble_amd64/)\nROS2 Rolling Ubuntu 24.04 Noble| [![Build Status](https://build.ros2.org/buildStatus/icon?job=Rdev__visp__ubuntu_noble_amd64)](https://build.ros2.org/job/Rdev__visp__ubuntu_noble_amd64)\nValgrind | [![valgrind workflow](https://github.com/lagadic/visp/actions/workflows/valgrind.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/valgrind.yml)\nSanitizer | [![sanitizers workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-sanitizers.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-sanitizers.yml)\nCode coverage | [![Code coverage](https://codecov.io/gh/lagadic/visp/branch/master/graph/badge.svg?token=GQIiKbA3BC)](https://codecov.io/gh/lagadic/visp)\n\nOther projects | Build Status |\n-------------- | ------------ |\n[UsTK](https://github.com/lagadic/ustk) | [![Ubuntu](https://github.com/lagadic/visp/actions/workflows/ubuntu-ustk.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-ustk.yml)\n[visp_contrib](https://github.com/lagadic/visp_contrib) | [![Ubuntu](https://github.com/lagadic/visp/actions/workflows/ubuntu-contrib.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-contrib.yml)\n[visp_sample](https://github.com/lagadic/visp_sample) | [![macos workflow](https://github.com/lagadic/visp/actions/workflows/macos.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/macos.yml) [![ubuntu dep apt workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-apt.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-dep-apt.yml)\n[camera_localization](https://github.com/lagadic/camera_localization) | [![ubuntu_3rdparty_workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-3rdparty.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-3rdparty.yml)\n[visp_started](https://github.com/lagadic/visp_started) | [![ubuntu_3rdparty_workflow](https://github.com/lagadic/visp/actions/workflows/ubuntu-3rdparty.yml/badge.svg)](https://github.com/lagadic/visp/actions/workflows/ubuntu-3rdparty.yml)\n\n\nViSP is a cross-platform library (Linux, Windows, MacOS, iOS, Android) that allows prototyping and developing\napplications using visual tracking and visual servoing technics at the heart of the researches done now by Inria\n<a href=\"https://team.inria.fr/rainbow\">Rainbow team<\/a> and before 2018 by\n<a href=\"https://team.inria.fr/lagadic\">Lagadic team<\/a>. ViSP is able to compute control laws that can be applied to\nrobotic systems. It provides a set of visual features that can be tracked using real time image processing or computer\nvision algorithms. ViSP provides also simulation capabilities. ViSP can be useful in robotics, computer vision,\naugmented reality and computer animation. Our <a href=\"https://www.youtube.com/user/VispTeam\">YouTube channel<\/a>\ngives an overview of the applications that could be tackled.\n\n#### Citing ViSP\nPlease cite <a href=\"https://inria.hal.science/inria-00351899\">ViSP<\/a> in your publications if it helps your research:\n```\n@article{Marchand05b,\n   Author = {Marchand, E. and Spindler, F. and Chaumette, F.},\n   Title = {ViSP for visual servoing: a generic software platform with a wide class of robot control skills},\n   Journal = {IEEE Robotics and Automation Magazine},\n   Volume = {12},\n   Number = {4},\n   Pages = {40--52},\n   Publisher = {IEEE},\n   Month = {December},\n   Year = {2005}\n}\n```\nTo cite the <a href=\"https://inria.hal.science/hal-01853972v1\">generic model-based tracker<\/a>:\n```\n@InProceedings{Trinh18a,\n   Author = {Trinh, S. and Spindler, F. and Marchand, E. and Chaumette, F.},\n   Title = {A modular framework for model-based visual tracking using edge, texture and depth features},\n   BookTitle = {{IEEE/RSJ Int. Conf. on Intelligent Robots and Systems, IROS'18}},\n   Address = {Madrid, Spain},\n   Month = {October},\n   Year = {2018}\n}\n```\nTo cite <a href=\"https://hal.science/hal-01246370v1\">pose estimation algorithms and hands-on survey<\/a> illustrated\nwith <a href=\"https://github.com/lagadic/camera_localization\">ViSP examples<\/a>:\n```\n@article{Marchand16a,\n   Author = {Marchand, E. and Uchiyama, H. and Spindler, F.},\n   Title = {Pose estimation for augmented reality: a hands-on survey},\n   Journal = {IEEE Trans. on Visualization and Computer Graphics},\n   Volume = {22},\n   Number = {12},\n   Pages = {2633--2651},\n   Month = {December},\n   Year = {2016}\n}\n```\n\n#### Resources\n- Homepage: https://visp.inria.fr\n- Wiki: https://github.com/lagadic/visp/wiki\n- Code documentation: https://visp-doc.inria.fr/doxygen/visp-daily\n- Q&A forum: https://github.com/lagadic/visp/discussions\n- Issue tracking: https://github.com/lagadic/visp/issues\n- YouTube: https://www.youtube.com/user/VispTeam\n\n#### Contributing\n\nPlease read before starting work on a pull request: https://visp.inria.fr/contributing-code/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7A:7A4F8:183859:5EA1CD:6AB92C7C"},"text_sha256":"4ada0a11d402de9962bb2308b5816c38705e771eb3a5a6b1d5bea493645354c0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"bgshih/aster","input_row":{"repository":"bgshih/aster","url":"https://github.com/bgshih/aster","name":"aster","owner":"bgshih","description":"Recognizing cropped text in natural images.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":742,"issues":113,"created_at":"2017-12-03T08:50:02Z","updated_at":"2026-09-24T17:43:07Z","first_commit_at":"2017-12-03T08:50:03Z","last_commit_at":"2021-03-28T05:48:25Z","activity_months":39.780000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:25.491Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"bgshih/aster","visibility":"public","created_at":"2017-12-03T08:50:02Z","updated_at":"2026-09-24T17:43:07Z","private":false,"fork":false,"archived":false,"stargazers_count":742,"open_issues_count":82,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1853","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17E1427:1C07F9C:6AB92C7D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1852","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0906:180242:1803060:1C298C1:6AB92C7D"},"commit":{"sha":"0e73a2e0de3b95c7720f62c86aec4472d7f60ff5","url":"https://github.com/bgshih/aster/commit/0e73a2e0de3b95c7720f62c86aec4472d7f60ff5","date":"2018-04-11T08:46:26Z","author_date":"2018-04-11T08:46:26Z","committer_date":"2018-04-11T08:46:26Z","tree_sha":"2b40e96c67479482fed3c0785eb1c7ac62fa5e17","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1851","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0938:74C18:1818987:1C3F760:6AB92C7E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1315,"blob_sha":"85b87b1f0be63f216274717685298d09cbd9e2fc","priority":0}],"documents":[{"path":"README.md","size":1315,"blob_sha":"85b87b1f0be63f216274717685298d09cbd9e2fc","priority":0,"status":200,"text":"# ASTER: Attentional Scene Text Recognizer with Flexible Rectification\n\nASTER is an accurate scene text recognizer with flexible rectification mechanism.\n\n![ASTER Overview](overview.png)\n\nThe implementation of ASTER reuses code from [Tensorflow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection).\n\n## Prerequisites\n\nInstall [Protocol Buffers](https://github.com/google/protobuf) (version>=2.6)\n\nIn Ubuntu 16.04\n```\nsudo apt install cmake libcupti-dev\npip3 install --user tensorflow-gpu protobuf tqdm numpy editdistance\n```\n\nNOTE: ASTER is developed and tested with TensorFlow r1.4.\n\n## Installation\n  1. Go to `c_ops/` and run `build.sh` to build custom operators\n  2. Execute `protoc aster/protos/*.proto --python_out=.` to build protobuf files\n\n## Training and on-the-fly evaluation\nTo run the example training, execute\n\n```\npython3 aster/train.py \\\n  --exp_dir experiments/aster \\\n  --num_clones 2\n```\n\nChange the configuration in `experiments/aster/trainval.prototxt` to configure your own training process.\n\nWhile training, you can run a separate program that repeatedly evaluates the checkpoints produced by the training every few minutes.\n\n```\npython3 aster/eval.py \\\n   --exp_dir experiments/aster\n```\n\nEvaluation configuration is also in `trainval.prototxt`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1192:11316A:17E415:5E4C55:6AB92C7E"},"text_sha256":"845f2ab215ec1b34810f31ccd51b694923fd255dcc514aea37fb6db44bdb9dc0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1850","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0856:6E5BD:17A9936:1BCEF63:6AB92C7E"},"commit":{"sha":"0c74b9b9cd22a021c1d57b75a3041bcbd7ace3cc","url":"https://github.com/bgshih/aster/commit/0c74b9b9cd22a021c1d57b75a3041bcbd7ace3cc","date":"2021-03-28T05:48:25Z","author_date":"2021-03-28T05:48:25Z","committer_date":"2021-03-28T05:48:25Z","tree_sha":"1e1d2ed42442c67f1f0a293c00b4c0e7037b20ad","message_first_line":"Merge pull request #111 from NoAchache/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1849","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17D1738:1BF830C:6AB92C7F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3988,"blob_sha":"76ef458ed1dbd812650d5ee15246ca4872f3ee1e","priority":0}],"documents":[{"path":"README.md","size":3988,"blob_sha":"76ef458ed1dbd812650d5ee15246ca4872f3ee1e","priority":0,"status":200,"text":"# ASTER: Attentional Scene Text Recognizer with Flexible Rectification\n\nASTER is an accurate scene text recognizer with flexible rectification mechanism. The research paper can be found [here](https://ieeexplore.ieee.org/abstract/document/8395027/).\n\n![ASTER Overview](overview.png)\n\nThe implementation of ASTER reuses code from [Tensorflow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection).\n\n## Update\n**[07/13/2019] A PyTorch [port](https://github.com/ayumiymk/aster.pytorch) has been made by [@ayumiymk](https://github.com/ayumiymk).**\n\n## Correction (10/22/2018)\n\nWe have identified a bug we accidentally made in the code that causes only part of SVT images being tested and results in higher results. The bug has been fixed in commit [a7e8613](https://github.com/bgshih/aster/commit/a7e8613d6308e5a7aacb1237dfa0286d73cef342). Below are the corrected numbers on SVT. The results are still state-of-the-art, so the conclusions are not affected.\n\n  - SVT (50) ASTER: 97.4%; ASTER-A: 96.3%; ASTER-B: 96.1%; \n  - SVT (None): ASTER: 89.5%; ASTER-A: 80.2%; ASTER-B: 81.6%\n\n\n## Prerequisites\n\nASTER was developed and tested with **TensorFlow r1.4**. Higher versions may not work.\n\nASTER requires [Protocol Buffers](https://github.com/google/protobuf) (version>=2.6). Besides, in Ubuntu 16.04:\n```\nsudo apt install cmake libcupti-dev\npip3 install --user protobuf tqdm numpy editdistance\n```\n\n## Installation\n  1. Go to `c_ops/` and run `build.sh` to build the custom operators\n  2. Execute `protoc aster/protos/*.proto --python_out=.` to build the protobuf files\n  3. Add `/path/to/aster` to `PYTHONPATH`, or set this variable for every run\n\n## Demo\n\nA demo program is located at `aster/demo.py`, accompanied with pretrained model files available on our [release page](https://github.com/bgshih/aster/releases). Download `model-demo.zip` and extract it under `aster/experiments/demo/` before running the demo.\n\nTo run the demo, simply execute:\n\n```\npython3 aster/demo.py\n```\n\nThis will output the recognition result of the demo image and the rectified image.\n\n## Training and on-the-fly evaluation\n\nData preparation scripts for several popular scene text datasets are located under `aster/tools`. See their source code for usage.\n\nTo run the example training, execute\n\n```\npython3 aster/train.py \\\n  --exp_dir experiments/demo \\\n  --num_clones 2\n```\n\nChange the configuration in `experiments/aster/trainval.prototxt` to configure your own training process.\n\nDuring the training, you can run a separate program to repeatedly evaluates the produced checkpoints.\n\n```\npython3 aster/eval.py \\\n   --exp_dir experiments/demo\n```\n\nEvaluation configuration is also in `trainval.prototxt`.\n\n## Citation\n\nIf you find this project helpful for your research, please cite the following papers:\n\n```\n@article{bshi2018aster,\n  author  = {Baoguang Shi and\n               Mingkun Yang and\n               Xinggang Wang and\n               Pengyuan Lyu and\n               Cong Yao and\n               Xiang Bai},\n  title   = {ASTER: An Attentional Scene Text Recognizer with Flexible Rectification},\n  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence}, \n  volume  = {}, \n  number  = {}, \n  pages   = {1-1},\n  year    = {2018}, \n}\n\n@inproceedings{ShiWLYB16,\n  author    = {Baoguang Shi and\n               Xinggang Wang and\n               Pengyuan Lyu and\n               Cong Yao and\n               Xiang Bai},\n  title     = {Robust Scene Text Recognition with Automatic Rectification},\n  booktitle = {2016 {IEEE} Conference on Computer Vision and Pattern Recognition,\n               {CVPR} 2016, Las Vegas, NV, USA, June 27-30, 2016},\n  pages     = {4168--4176},\n  year      = {2016}\n}\n```\n\nIMPORTANT NOTICE: Although this software is licensed under MIT, our intention is to make it free for academic research purposes. If you are going to use it in a product, we suggest you [contact us](xbai@hust.edu.cn) regarding possible patent issues.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11DC:09ED:E6347:3F8611:6AB92C79"},"text_sha256":"dfa20f324d75aa21a99f82392c405a25237b88f745265401177f92a54555ff6f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"basler/pypylon","input_row":{"repository":"basler/pypylon","url":"https://github.com/basler/pypylon","name":"pypylon","owner":"basler","description":"The official Python language binding for the Basler pylon C++ APIs ","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":714,"issues":841,"created_at":"2018-03-05T14:35:19Z","updated_at":"2026-09-24T14:11:46Z","first_commit_at":"2018-03-23T10:50:29Z","last_commit_at":"2026-09-07T13:10:37Z","activity_months":101.51000000000001,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:27.938Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"basler/pypylon","visibility":"public","created_at":"2018-03-05T14:35:19Z","updated_at":"2026-09-24T14:11:46Z","private":false,"fork":false,"archived":false,"stargazers_count":714,"open_issues_count":207,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1848","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084A:278AC2:18718BD:1C98647:6AB92C7F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1847","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:1844DA3:1C6B449:6AB92C80"},"commit":{"sha":"6d14663bc4a0c78d341cd111116ec9367e4606da","url":"https://github.com/basler/pypylon/commit/6d14663bc4a0c78d341cd111116ec9367e4606da","date":"2018-05-17T17:26:13Z","author_date":"2018-05-14T15:29:53Z","committer_date":"2018-05-17T17:26:13Z","tree_sha":"12121fc8e569279ea2a5fcc07b72b52458e94d85","message_first_line":"Dockerized linux build"},"tree_request_status":200,"tree_rate":{"github_remaining":"1846","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:17F82AE:1C1EE50:6AB92C80"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2649,"blob_sha":"02daa5c2d850fd66bf881aa6f2657c9f77eb74a9","priority":0}],"documents":[{"path":"README.md","size":2649,"blob_sha":"02daa5c2d850fd66bf881aa6f2657c9f77eb74a9","priority":0,"status":200,"text":"# pypylon\nThe official python wrapper for the pylon Camera Software Suite.\n\n# For the Impatient\n * Install [pylon](https://www.baslerweb.com/pylon).\n * Download a binary wheel from the [releases](https://github.com/Basler/pypylon/releases) page.\n * Install the wheel using ```pip3 install <your downloaded wheel>.whl```\n * Look at samples/grab.py in this repository\n\n# Installation\n## Prerequisites\n * Installed [pylon](https://www.baslerweb.com/pylon).\n * Installed python (python 3 recommended).\n * Installed [pip](https://pip.pypa.io/en/stable/).\n\n## Binary Installation\nThe easiest way to get pypylon is to install a prebuild wheel.\n\nBinary releases are available on the [releases](https://github.com/Basler/pypylon/releases) page.\n\n## Installation from Source\nBuilding the pypylon bindings is supported and tested on Windows and Linux.\n\nYou need a few more things to compile pypylon:\n * A compiler for your system (Visual Studio on Windows, gcc on linux)\n * [swig](http://www.swig.org) >= 3.0.12\n\nTo build pypylon from source:\n```\ngit clone https://github.com/basler/pypylon.git\ncd pypylon\npip install .\n```\n\n# Getting Started\n## Hello World\nSee the [grab sample](https://github.com/Basler/pypylon/samples/grab.py) in the samples directory.\n\nExcerpt:\n\n```\nfrom pypylon import pylon\n\ncamera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())\n\nnumberOfImagesToGrab = 100\ncamera.StartGrabbingMax(numberOfImagesToGrab)\n\nwhile camera.IsGrabbing():\n    grabResult = camera.RetrieveResult(5000, pylon.TimeoutHandling_ThrowException)\n\n    if grabResult.GrabSucceeded():\n        # Access the image data.\n        print(\"SizeX: \", grabResult.Width)\n        print(\"SizeY: \", grabResult.Height)\n        img = grabResult.Array\n        print(\"Gray value of first pixel: \", img[0, 0])\n    \n    grabResult.Release()\n```\n\n# Development\n\nPull requests to pypylon are very welcome. To help you getting started with pypylon improvements, here are some hints:\n\n## Starting Development\n```\npython setup.py development\n```\nThis will \"link\" the local pypylon source directory into your python installation. It will not package the pylon libraries and always use the installed pylon.\nAfter changing pypylon, execute `python setup.py build` and test...\n\n## Running Unit Tests\n> NOTE: The unit tests try to import `pypylon....`, so they run against the *installed* version of pypylon.\n``` \npython -m unittest tests/....\npython tests/....\n```\n# Known Issues\n * For USB 3.0 cameras to work on Linux, you need to install appropriate udev rules. \n   The easiest way to get them is to install an official pylon package from http://www.baslerweb.com/pylon.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C1FE:241B62:17AB64:5E155E:6AB92C7F"},"text_sha256":"58d5f2c7db9ad93e3a65086f08773ff3c670dbab3203131377623a10df5cbb77"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1845","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:180D878:1C33C38:6AB92C81"},"commit":{"sha":"c99dd8f8b05be5051775fc7887fa96860066a9e9","url":"https://github.com/basler/pypylon/commit/c99dd8f8b05be5051775fc7887fa96860066a9e9","date":"2026-06-25T12:43:29Z","author_date":"2026-06-25T12:43:29Z","committer_date":"2026-06-25T12:43:29Z","tree_sha":"01fcc169b8142ea5f8ec1eb8f0019d63532bd9f5","message_first_line":"Merged PR 42001: Prepare for pypylon release 26.6rc1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1844","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:1802247:1C28F4C:6AB92C81"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10912,"blob_sha":"1c7648df4e45ee3284627fe3d5aaa898e99f8a1c","priority":0}],"documents":[{"path":"README.md","size":10912,"blob_sha":"1c7648df4e45ee3284627fe3d5aaa898e99f8a1c","priority":0,"status":200,"text":"<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/pylon_basler_banner_dark.svg\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"docs/images/pylon_basler_banner.svg\">\n  <img alt=\"Basler pypylon banner\" src=\"https://raw.githubusercontent.com/basler/pypylon/master/docs/images/pylon_basler_banner.svg\">\n<\/picture>\n\n<br>\npypylon is the official Python language binding for the Basler pylon C++ APIs. It enables Python applications to control and acquire images from Basler machine vision products, e.g. cameras. Furthermore, the pylon Data Processing API allows you to perform image processing tasks.\n\n> **Note:** This README was updated for pypylon 26.6.\n> pypylon 26.6 introduces breaking changes. While most existing code is expected to remain functional, check the [changelog](https://github.com/basler/pypylon/blob/master/changelog.txt) for a full list of affected areas.\n\nBackground information about usage of pypylon, programming samples and jupyter notebooks can also be found at [pypylon-samples](https://github.com/basler/pypylon-samples) *(may not always reflect the latest pypylon API/style)*.\n\n[![Build Status](https://github.com/basler/pypylon/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/basler/pypylon/actions/workflows/main.yml)\n\n# Getting Started\n> **Coming soon:** A detailed pypylon Programmer's Guide will be available [here](https://github.com/basler/pypylon/blob/master/docs/programmers_guide).\n\n * Install [pylon](https://www.baslerweb.com/pylon)\n   This is strongly recommended but not mandatory. See [known issues](#known-issues) for further details.\n * Install pypylon: ```pip3 install pypylon```\n   For more installation options and the supported systems please read the [Installation](#Installation) paragraph.\n * Look at [samples/pylon/grab/grab.py](https://github.com/basler/pypylon/blob/master/samples/pylon/grab/grab.py) or use the following snippet:\n\n```python\nfrom pypylon import pylon\n\n# Create an InstantCamera object with the camera device found first.\n# The with statement creates, opens the camera and destroys it automatically.\nwith pylon.InstantCamera(pylon.FirstFound) as camera:\n    print(\"Using device:\", camera.DeviceInfo.ModelName)\n\n    # Demonstrate some feature access using the pylon parameter API.\n    camera.Width.TrySetToMaximum()\n\n    # Start the grabbing of 100 images.\n    camera.StartGrabbingMax(100)\n\n    while camera.IsGrabbing():\n        # The grab result is released automatically at the end of the with block.\n        with camera.RetrieveResult(\n            5000, pylon.TimeoutHandling_ThrowException\n        ) as grab_result:\n            if grab_result.GrabSucceeded():\n                # Some camera models use a GenICam Generic Data Container (GenDC) format.\n                # For single grabbed images, a data component is emulated automatically.\n                with grab_result.GetFirstImageDataComponent() as image_data_component:\n                        # Access the image data.\n                        img = image_data_component.Array\n                        print(f\"SizeX: {image_data_component.Width};\"\n                              f\"SizeY: {image_data_component.Height}; \"\n                              f\"Gray value of first pixel: {img[0, 0]}\")\n```\n\n## Getting Started with pylon Data Processing\n\n * pypylon additionally supports the pylon Data Processing API extension.\n * The [pylon Workbench](https://docs.baslerweb.com/overview-of-the-workbench) allows you to create image processing designs using a graphical editor.\n * Hint: The [pylondataprocessing tests](https://github.com/basler/pypylon/blob/master/tests/pylondataprocessing) can optionally be used as a source of information about the syntax of the API.\n * Look at [samples/pylondataprocessing/barcode/barcode.py](https://github.com/basler/pypylon/blob/master/samples/pylondataprocessing/barcode/barcode.py) or use the following snippet:\n\n```python\nfrom pypylon import pylon\nfrom pypylon import pylondataprocessing\n\n# This object collects the output data. Create it before the recipe so it outlives it.\nresult_collector = pylondataprocessing.GenericOutputObserver()\n\n# Create a recipe object representing a recipe file created with the pylon Viewer Workbench.\nwith pylondataprocessing.Recipe() as recipe:\n    recipe.Load(\"barcode.precipe\")\n    recipe.RegisterAllOutputsObserver(result_collector, pylon.RegistrationMode_Append)\n    recipe.Start()\n\n    for i in range(100):\n        if result_collector.WaitObject.Wait(5000):\n            result = result_collector.RetrieveResult()\n            # Print the barcodes.\n            barcodes = result[\"Barcodes\"]\n            if not barcodes.HasError():\n                for index in range(barcodes.NumArrayValues):\n                    print(barcodes[index].ToString())\n            else:\n                print(\"Error:\", barcodes.ErrorDescription)\n        else:\n            print(\"Result timeout\")\n            break\n```\n\n# Update your code to pypylon >= 26.06\n\nThe current pypylon implementation allows direct feature assignment:\n\n```python\ncam.Gain = 42\n```\n\nThis assignment style is deprecated with pypylon 3.0.0, as it prevents full typing support for pypylon.\n\nThe recommended assignment style is now:\n\n```python\ncam.Gain.Value = 42\n```\n\nTo identify the locations in your code that have to be updated, run with enabled warnings:\n\n`PYTHONWARNINGS=default python script.py`\n\npypylon now also ships the full pylon parameter API (classes derived from\n`Pylon::CParameter`). It adds many convenience methods on parameters, such as\n`camera.ExposureTime.SetToMaximum()`, `camera.PixelFormat.TrySetValue(\"Mono8\")`\nand `camera.ExposureTime.GetValueOrDefault(default_value)`. In addition,\n`pylon.InstantCamera` supports the context manager protocol, so it can be used\nin a `with` statement to be opened and closed automatically. See the\n[samples](https://github.com/basler/pypylon/tree/master/samples) and the style\nguidelines in the [context](https://github.com/basler/pypylon/tree/master/context)\nfolder for the recommended coding style.\n\n# Installation\n## Prerequisites\n * Installed [pylon](https://www.baslerweb.com/pylon)\n   For the binary installation this is not mandatory but strongly recommended. See [known issues](#known-issues) for further details.\n * Installed [python](https://www.python.org/) with [pip](https://pip.pypa.io/en/stable/)\n * Installed [CodeMeter Runtime](https://www.wibu.com/support/user/user-software.html) when you want to use pylon vTools and the pylon Data Processing API extension on your platform.\n\n## pylon OS Versions and Features\nPlease note that the pylon Software Suite may support different operating system versions and features than pypylon.\nFor latest information on pylon refer to: https://www.baslerweb.com/en/software/pylon/\nIn addition, check the release notes of your pylon installation. \nFor instance: \n* pylon Software Suite 26.06 supports Windows 10/11 64 bit, Linux x86_64 and Linux aarch64 with glibc version >= 2.31 or newer,\n  macOS Sonoma or newer.\n* pylon vTools are supported on pylon 7.0.0 and newer.\n* pylon vTools are supported on pypylon 3.0 and newer only on Windows 10/11 64 bit, Linux x86_64 and Linux aarch64. \n* For pylon vTools that require a license refer to: https://www.baslerweb.com/en/software/pylon-vtools/\n* CXP-12: To use CXP with pypylon >= 4.0.0 you need to install the CXP GenTL producer and drivers using the pylon Software Suite setup.\n* For accessing Basler 3D cameras, e.g. Basler blaze, installation of pylon Software Suite 8.1.0 or newer\n  and the latest pylon Supplementary Package for blaze is required.\n\n## Binary Installation\nThe easiest way to get pypylon is to install a prebuild wheel.\nBinary releases for most architectures are available on [pypi](https://pypi.org)**.\nTo install pypylon open your favourite terminal and run:\n\n```pip3 install pypylon```\n\nThe following versions are available on pypi:\n\n |                | 3.9 | 3.10 | 3.11 | 3.12 | 3.13 |\n |----------------|-----|------|------|------|------|\n | Windows 64bit  | x   | x    |  x   |  x   |  x   |\n | Linux x86_64*  | x   | x    |  x   |  x   |  x   |\n | Linux aarch64* | x   | x    |  x   |  x   |  x   |\n | macOS x86_64** | x   | x    |  x   |  x   |  x   |\n | macOS arm64**  | x   | x    |  x   |  x   |  x   |\n\n\n> Additional Notes on binary packages:\n> * (*) The linux 64bit binaries are manylinux_2_31 conformant.\n    This is roughly equivalent to a minimum glibc version >= 2.31. \n    :warning: You need at least pip 20.3 to install them.\n> * (**) macOS binaries are built for macOS >= 14.0 (Sonoma)\n\n## Installation from Source\nBuilding the pypylon bindings is supported and tested on Windows, Linux and macOS\n\nYou need a few more things to compile pypylon:\n * An installation of pylon SDK for your platform\n * A compiler for your system (Visual Studio on Windows, gcc on linux, xCode commandline tools on macOS)\n * Python development files (e.g. `sudo apt install python-dev` on linux)\n * [swig](http://www.swig.org) 4.3\n   * For all 64bit platforms you can install the tool via `pip install \"swig==4.3\"`\n\nTo build pypylon from source:\n```console\ngit clone https://github.com/basler/pypylon.git\ncd pypylon\npip install .\n```\n\nIf pylon SDK is not installed in a default location you have to specify the location from the environment\n * on Linux: `export PYLON_ROOT=<installation directory of pylon SDK>`\n * on macOS: `export PYLON_FRAMEWORK_LOCATION=<framework base folder that contains pylon.framework>`\n\n\n# Development\n\nPull requests to pypylon are very welcome. To help you getting started with pypylon improvements, here are some hints:\n\nIf you use an AI coding assistant, see [AGENTS.md](AGENTS.md) for the repository map, build/test commands, and coding-style references.\n\n## Starting Development\n```console\npython setup.py develop\n```\nThis will \"link\" the local pypylon source directory into your python installation. It will not package the pylon libraries and always use the installed pylon.\nAfter changing pypylon, execute `python setup.py build` and test...\n\n## Running Unit Tests\n> NOTE: The unit tests try to import `pypylon....`, so they run against the *installed* version of pypylon.\n\nRun the hardware-free (Camera Emulation) suites the same way CI does:\n```console\npip install pytest numpy\npytest tests/genicam tests/pylon/emulated tests/pylondataprocessing\n```\nThe `tests/pylon/usb` and `tests/pylon/gigE` suites require real cameras.\n\n# Known Issues\n * For USB 3.0 cameras to work on Linux, you need to install appropriate udev rules.\n   The easiest way to get them is to install the official [pylon](http://www.baslerweb.com/pylon) package.\n\n# Support\nYou are welcome to post any questions or issues on [GitHub](https://github.com/basler/pypylon).\nFor additional technical support for business customers, please reach out to our official [Support](https://www.baslerweb.com/en/support/contact) team.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:178F7F:5DF99A:6AB92C81"},"text_sha256":"c8615d6a10f266893ca35a4a906acb6089f4d2cf90910d1522219d5d38fe2f4d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cvondrick/vatic","input_row":{"repository":"cvondrick/vatic","url":"https://github.com/cvondrick/vatic","name":"vatic","owner":"cvondrick","description":"Efficiently Scaling Up Video Annotation with Crowdsourced Marketplaces. IJCV 2012","language":"HTML","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":615,"issues":105,"created_at":"2011-07-08T20:36:53Z","updated_at":"2026-08-19T09:18:24Z","first_commit_at":"2011-01-13T06:34:57Z","last_commit_at":"2020-07-15T20:01:57Z","activity_months":114.05,"ai_ml_match_topics":"computer-vision","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:30.540Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cvondrick/vatic","visibility":"public","created_at":"2011-07-08T20:36:53Z","updated_at":"2026-08-19T09:18:24Z","private":false,"fork":false,"archived":false,"stargazers_count":615,"open_issues_count":91,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1843","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:182047D:1C46C17:6AB92C82"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1842","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E5:2BC4E5:183385A:1C5A057:6AB92C82"},"commit":{"sha":"3fc6f8860444ea5b5d4b66e193441722576b6c47","url":"https://github.com/cvondrick/vatic/commit/3fc6f8860444ea5b5d4b66e193441722576b6c47","date":"2017-09-07T00:08:39Z","author_date":"2017-09-07T00:08:39Z","committer_date":"2017-09-07T00:08:39Z","tree_sha":"fb5a627b5d3657c411fd26ae292ab4c05b86e173","message_first_line":"Merge pull request #79 from Nikhil-Kasukurthi/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1841","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:1820506:1C46CB9:6AB92C83"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19506,"blob_sha":"f5f38bfc93e594781ca0248bfd76c5b61d4e65ed","priority":0}],"documents":[{"path":"README.md","size":19506,"blob_sha":"f5f38bfc93e594781ca0248bfd76c5b61d4e65ed","priority":0,"status":200,"text":"Please note: the community is working on a modernized version in the [contrib](https://github.com/cvondrick/vatic/tree/contrib) branch. Please check it out and commit any pull requests there. Thank you! - December 3, 2016\n\n# VATIC - Video Annotation Tool from Irvine, California\n\n\n\nVATIC is an online video annotation tool for computer vision research that\ncrowdsources work to Amazon's Mechanical Turk. Our tool makes it easy to build\nmassive, affordable video data sets. \n\n<img src='http://i.imgur.com/z6jl5Bs.jpg'>\n\n# INSTALLATION \n\nNote: VATIC has only been tested on Ubuntu with Apache 2.2 HTTP server and a\nMySQL server. This document will describe installation on this platform,\nhowever it should work any operating system and with any server.\n\n## Download\n\nYou can download and extract VATIC from our website. Note: do NOT run the \ninstaller as root. \n\n    $ wget http://mit.edu/vondrick/vatic/vatic-install.sh\n    $ chmod +x vatic-install.sh\n    $ ./vatic-install.sh\n    $ cd vatic\n\n## HTTP Server Configuration \n\nOpen the Apache configuration file. On Ubuntu, this file is located at:\n\n    /etc/apache2/sites-enabled/000-default\n\nIf you do not use Apache on this computer for any other purpose, replace the\ncontents of the file with:\n\n    WSGIDaemonProcess www-data\n    WSGIProcessGroup www-data\n\n    <VirtualHost *:80>\n        ServerName vatic.domain.edu\n        DocumentRoot /path/to/vatic/public\n\n        WSGIScriptAlias /server /path/to/vatic/server.py\n        CustomLog /var/log/apache2/access.log combined\n    <\/VirtualHost>\n\nupdating ServerName with your domain name, DocumentRoot with the path to\nthe public directory in VATIC, and WSGIScriptAlias to VATIC's server.py file.\n\nIf you do use Apache for other purposes, you will have to setup a new virtual\nhost with the correct document root and script alias, as shown above.\n\nMake sure you have the mod_headers module enabled:\n\n    $ sudo cp /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled\n\nAfter making these changes, restart Apache:\n\n    $ sudo apache2ctl graceful\n\n## SQL Server Configuration \n\nWe recommend creating a separate database specifically for VATIC:\n\n    $ mysql -u root\n    mysql> create database vatic;\n\nThe next section will automatically create the necessary tables.\n\n## Setup\n\nInside the vatic directory, copy config.py-example to config.py:\n\n    $ cp config.py-example config.py\n\nThen open config.py and make changes to the following variables in order to\nconfigure VATIC:\n\n    signature       Amazon Mechanical Turk AWS signature (secret access key)\n    accesskey       Amazon Mechanical Turk AWS access key (access key ID)\n    sandbox         If true, put into Mturk sandbox mode. For debugging.\n    localhost       The local HTTP address: http://vatic.domain.edu/ so it\n                    matches the ServerName in Apache.\n    database        Database connection string: for example,\n                    mysql://user:pass@localhost/vatic\n    geolocation     API key from ipinfodb.com for geolocation services\n\nIf you do not plan on using VATIC on Mechcanical Turk (offlien mode only), you\ncan leave the signature and accesskey empty.\n\nAfter saving results, you can then initialize the database:\n\n    $ turkic setup --database\n\nNote: if you want to reset the database, you can do this with:\n\n    $ turkic setup --database --reset\n\nwhich will require confirmation to reset in order to prevent data loss.\n\nFinally, you must also allow VATIC to access turkic, a major dependency:\n\n    $ turkic setup --public-symlink\n\n# ANNOTATION \n\nBefore you continue, you should verify that the installation was correct. You\ncan verify this with:\n\n    $ turkic status --verify\n\nIf you receive any error messages, it means the installation was not complete\nand you should review the previous section. Note: If you do not plan on\nusing Mechanical Turk, you can safely ignore any errors caused by Mechanical\nTurk.\n\n## Frame Extraction \n\nOur system requires that videos are extracted into JPEG frames. Our tool can \ndo this automatically for you:\n\n    $ mkdir /path/to/output/directory\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n\nBy default, our tool will resize the frames to fit within a 720x480 rectangle.\nWe believe this resolution is ideal for online video viewing. You can change \nresolution with options:\n\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n      --width 1000 --height 1000\n\nor\n\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n      --no-resize\n\nThe tool will maintain aspect ratio in all cases.\n\nAlternatively, if you have already extracted frames, you can use the\nformatframes command to format the video into a format that VATIC understands:\n\n    $ turkic formatframes /path/to/frames/ /path/to/output/directory\n\nThe above command will read all the images in /path/to/frames and create\nhard links (soft copy) in /path/to/output/directory.\n\n## Importing a Video\n\nAfter extracting frames, the video can be imported into our tool for \nannotation. The general syntax for this operation is:\n\n    $ turkic load identifier /path/to/output/directory Label1 Label2 LabelN\n\nwhere identifier is a unique string that you will use to refer to this video,\n/path/to/output/directory is the directory of frames, and LabelX are class\nlabels that you want annotated (e.g., Person, Car, Bicycle). You can have as\nmany class labels as you wish, but you must have at least one.\n\nWhen a video is imported, it is broken into small segments typically of only a\nfew seconds. When all the segments are annotated, the annotations are merged\nacross segments because each segment overlaps another by a small margin.\n\nThe above command specifies all of the required options, but there are many\noptions available as well. We recommend using these options.\n\n    MTurk Options\n        --title         The title that MTurk workers see\n        --description   The description that MTurk workers see\n        --duration      Time in seconds that a worker has to complete the task\n        --lifetime      Time in seconds that the task is online\n        --keywords      Keywords that MTurk workers can search on\n        --offline       Disable MTurk and use for self annotation only\n\n    Compensation Options\n        --cost                  The price advertised to MTurk workers\n        --per-object-bonus      A bonus in dollars paid for each object\n        --completion-bonus      A bonus in dollars paid for completing the task\n\n    Qualification Options\n        --min-approved-percent  Minimum percent of tasks the worker must have\n                                approved before they can work for you\n        --min-approved-amount   Minimum number of tasks that the worker must \n                                have completed before they can work for you\n\n    Video Options\n        --length        The length of each segment for this video in frames\n        --overlap       The overlap between segments in frames\n        --use-frames    When splitting into segments, only the frame intervals\n                        specified in this file. Each line should contain a\n                        start frame, followed by a space, then the stop frame.\n                        Frames outside the intervals in this file will be\n                        ignored.\n        --skip          If specified, request annotations only every N frames.\n        --blow-radius   When a user marks an annotation, blow away all other\n                        annotations within this many frames. If you want to\n                        allow the user to make fine-grained annotations, set\n                        this number to a small integer, or 0 to disable. By\n                        default, this is 5, which we recommend.\n\nYou can also specify temporal attributes that each object label can take on.\nFor example, you may have a person object with attributes \"walking\", \"running\",\nor \"sitting\". You can specify attributes the same way as labels, except you\nprepend an ~ before the text, which bind the attribute to the previous label:\n\n    $ turkic load identifier /path/to/output/directory Label1 ~Attr1A ~Attr1B\n      Label2 ~Attr2A ~Attr2B ~Attr2C Label3 \n\nIn the above example, Label1 will have attributes Attr1A and Attr1B, Label2\nwill have attributes Attr2B, Attr2B, and Attr2C and Label3 will have no \nattributes. Specifying attributes is optional.\n\n## Gold Standard Training \n\nIt turns out that video annotation is extremely challenging and most MTurk\nworkers lack the necessary patience. For this reason, we recommend requiring\nworkers to pass a \"gold standard\" video. When a new worker visits the task,\nthey will be redirected to a video for which the annotations are already known.\nIn order to move on to the true annotations, the worker must correctly annotate\nthe gold standard video first. We have found that this approach significantly\nimproves the quality of the annotations.\n\nTo use this feature, import a video to be used as the gold standard:\n\n    $ turkic load identifier-train /path/to/frames Label1 Label2 LabelN\n      --for-training --for-training-start 0 --for-training-stop 500\n      --for-training-overlap 0.5 --for-training-tolerance 0.1\n      --for-training-mistakes 1\n\nYou can also use any of the options described above. Explanations for the new\noptions are as follows:\n\n    --for-training              Specifies that this video is gold standard\n    --for-training-start        Specifies the first frame to use\n    --for-training-stop         Specifies the last frame to use\n    --for-training-overlap      Percent overlap that worker's boxes must match \n    --for-training-tolerance    Percent that annotations must agree temporally\n    --for-training-mistakes     The number of completely wrong annotations \n                                allowed. We recommend setting this to a small,\n                                nonzero integer.\n\nAfter running the above command, it will provide you with an URL for you to\ninput the ground truth annotation. You must make this ground truth annotation\nas careful as possible, as it will be used to evaluate future workers.\n\nYou can now specify that a video should use a gold standard video:\n\n    $ turkic load identifier /path/to/output/directory Label1 Label2 LabelN\n      --train-with identifier-train\n\nWhen a not-yet-seen worker visits this video, they will now be redirected to\nto the training video and be required to pass the evaluation test first.\n\n## Publishing Tasks \n\nWhen you are ready for the MTurk workers to annotate, you must publish the \ntasks, which will allow workers to start annotating:\n    \n    $ turkic publish\n\nYou can limit the number of tasks that are published:\n\n    $ turkic publish --limit 100\n\nRunning above command repeatedly will launch tasks in batches of 100. You can\nalso disable all pending tasks:\n    \n    $ turkic publish --disable\n\nwhich will \"unpublish\" tasks that have not yet been completed.\n\nIf you have videos that are offline only, you can see their access URLs with\nthe command:\n\n    $ turkic publish --offline\n\nNote: for the above command to work, you must have loaded the video with the\n--offline parameter as well: \n\n    $ turkic load identifier /path/to/frames Person --offline\n\n## Checking the Status \n\nYou can check the status of the video annotation server with the command:\n\n    $ turkic status\n\nThis will list various statistics about the server, such as number of jobs\npublished and how many are completed. You can get even more statistics by\nrequesting additional information from Amazon:\n\n    $ turkic status --turk\n\nwhich will output how much money is left in your account, among other\nstatistics.\n\nWhen all the videos are annotated, the last line will read:\n\n    Server is offline.\n\n## Retrieving Annotations\n\nYou can get all the annotations for a video with the command:\n\n    $ turkic dump identifier -o output.txt\n\nwhich will write the file \"output.txt\" where each line contains one\nannotation. Each line contains 10+ columns, separated by spaces. The\ndefinition of these columns are:\n\n    1   Track ID. All rows with the same ID belong to the same path.\n    2   xmin. The top left x-coordinate of the bounding box.\n    3   ymin. The top left y-coordinate of the bounding box.\n    4   xmax. The bottom right x-coordinate of the bounding box.\n    5   ymax. The bottom right y-coordinate of the bounding box.\n    6   frame. The frame that this annotation represents.\n    7   lost. If 1, the annotation is outside of the view screen.\n    8   occluded. If 1, the annotation is occluded.\n    9   generated. If 1, the annotation was automatically interpolated.\n    10  label. The label for this annotation, enclosed in quotation marks.\n    11+ attributes. Each column after this is an attribute.\n\nBy default, the above command will not attempt to merge annotations across\nshot segments. You can request merging with the command:\n\n    $ turkic dump identifier -o output.txt --merge --merge-threshold 0.5\n\nThe --merge-threshold option is optional, but it is a number between 0 and 1\nthat represents much the paths must agree in order to merge. 1 specifies a\nperfect match and 0 specifies no match. In practice, 0.5 is sufficient. Merging\nis done using the Hungarian algorithm.\n\nYou can also scale annotations by a factor, which is useful for when the\nvideos have been downsampled:\n\n    $ turkic dump identifier -o output.txt -s 2.8\n\nor force it to fit within a max dimension:\n\n    $ turkic dump identifier -o output.txt --dimensions 400x200\n\nor force it to fit within the dimensions of the original video:\n\n    $ turkic dump identifier -o output.txt --original-video /path/to/video.mp4\n\nThe command can also output to many different formats. Available formats are:\n\n    --xml       Use XML\n    --json      Use JSON\n    --matlab    Use MATLAB\n    --pickle    Use Python's Pickle\n    --labelme   Use LabelMe video's XML format\n    --pascal    Use PASCAL VOC format, treating each frame as an image\n\nThe specifications for these formats should be self explanatory.\n\n## Visualizing Videos \n\nYou can preview the annotations by visualizing the results:\n\n    $ turkic visualize identifier /tmp --merge\n\nwhich will output frames to /tmp with the bounding boxes with the file name\nas the frame number. The visualization will contain some meta information\nthat can help you identify bad workers. You can remove this meta information\nwith the option:\n\n    $ turkic visualize identifer /tmp --merge --no-augment\n\nIf you want to make a video of the visualization (e.g., with ffmpeg), it is\nuseful to renumber the frames so that they start counting at 0 and do not\nhave any gaps:\n\n    $ turkic visualize identifier /tmp --merge --renumber\n\nIf you wish to display the class label and their attributes next to the box,\nspecify the --labels option:\n\n    $ turkic visualize identifier /tmp --labels\n\n## Compensating Workers \n\nWhen you are ready, you can compensate workers:\n\n    $ turkic compensate --default accept\n\nwhich will pay all workers for all outstanding tasks. We strongly recommend\npaying all workers regardless of their quality. You should attempt to pay\nworkers at least once per day.\n\n## Finding Jobs \n\nIf you have found a small mistake in a video and want to make\nthe correction yourself, you can start an annotation session initialized with\nthe MTurk workers annotations:\n\n    $ turkic find --id identifier\n    $ turkic find --id identifier --frame frame\n\nwhere identifier is the identifier for the video and frame is the frame number\nthat the error occurs. In most cases, this command will return one URL for you\nto make the corrections. If it outputs two URLs, it means the frame number\noccurs in two overlapping segments, and so you may have to make changes to both\nof the segments. You can also omit the frame argument, in which case it will\noutput all URLs for that video.\n\nIf you want to find the HIT id, assignment ID, or worker ID for a particular\nvideo, specify the --ids parameter to the vet command:\n\n    $ turkic find --id identifer --ids\n    $ turkic find --id identifer --frame frame --ids\n\nwill print a list of all the IDs for the video. If the corresponding segment\nhas been published and completed, it will list three strings: the HIT ID,\nassignment ID, and the worker ID. If the job has been published but not\nfinished, it will just list the HIT ID. If the job has not yet been published,\nit prints \"(not published)\".\n\nAdditionally, if you want to find the job that corresponds to a particular\nHIT ID, you can use the find command:\n\n    $ turkic find --hitid HITID\n\n## Quality Control \n\nThe gold standard does a \"pretty good\" job of weeding out bad workers.\nNonetheless, there will always be bad workers that we must identify and\ninvalidate. Our tool provides a method to sample the annotations provided by\nworkers, which you can then manually verify for correctness:\n\n    $ turkic sample /tmp\n\nwhich by default will pick 3 random videos that the worker has completed, and\npick 4 random frames from each of those videos, and write visualiations to a\nfile in /tmp. You can tweak the number of videos and the number of frames with\nthe options:\n\n    $ turkic sample /tmp --number 3 --frames 4\n\nMoreover, you can only look at work from a certain date:\n\n    $ turkic sample /tmp --since \"yesterday\"\n\nThe filename will follow the format of WORKERID-JOBID.jpg. Once you have\nidentified a mallicious worker, you can block them, invalidate ALL of their\nwork, and respawn their jobs with the command:\n\n    $ turkic invalidate workerid\n\nThe options are also available:\n\n    --no-block      invalidate and respawn, but don't block\n    --no-publish    block and invalidate, but don't respawn\n\nYou can also invalidate and respawn individual jobs with the command:\n\n    $ turkic invalidate --hit hitid\n\n## Listing all Videos \n\nYou can retrieve a list of all videos in the system with:\n\n    $ turkic list\n\nIf you want just the videos that have been published:\n\n    $ turkic list --published\n\nIf you want just the videos that have been worked on:\n\n    $ turkic list --completed\n\nIf you instead want the videos that are used for gold standard:\n\n    $ turkic list --training\n\nFinally, if you just want to count how many videos are in the system, use the\n--count option, in combination with any of the above:\n\n    $ turkic list --count\n    $ turkic list --published --count\n\nIf you want statistics about each video, then give the --stats option:\n\n    $ turkic list --stats\n\n## Managing Workers \n\nYou can list all known workers with the command:\n\n    $ turkic workers\n\nwhich will dump every worker with the number of jobs they have completed. You\ncan also use this command to block and unblock workers:\n\n    $ turkic workers --block workerid\n    $ turkic workers --unblock workerid\n\nYou can also search for workers by the first few letters of their ID:\n\n    $ turkic workers --search A3M\n\n## Deleting a Video \n\nYou can delete a video at any time with:\n\n    $ turkic delete identifier\n\nIf the video has already been annotated (even partially), this command will \nwarn you and abort. You can force deletion with:\n\n    $ turkic delete identifier --force\n\nwhich will REMOVE ALL DATA AND CANNOT BE UNDONE.\n\n# REFERENCES \n\nWhen using our system, please cite:\n\n    Carl Vondrick, Donald Patterson, Deva Ramanan. \"Efficiently Scaling Up\n    Crowdsourced Video Annotation\" International Journal of Computer Vision\n    (IJCV). June 2012.\n\n# FEEDBACK AND BUGS \n\nPlease direct all comments and report all bugs to:\n\n    Carl Vondrick\n    vondrick@mit.edu\n\nThanks for using our system!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6722:3E1DA:17A35A:5E0D50:6AB92C82"},"text_sha256":"e4fdd5c5003f9f8babaccad2523286adaae74f8f2d2ea466dd5f2ba092741e58"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1840","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0833:1DB627:1881E78:1CA8CDE:6AB92C84"},"commit":{"sha":"7de990ac0f7882dc0420b0f529b08951ae0f1230","url":"https://github.com/cvondrick/vatic/commit/7de990ac0f7882dc0420b0f529b08951ae0f1230","date":"2020-07-15T20:01:57Z","author_date":"2020-07-15T20:01:57Z","committer_date":"2020-07-15T20:01:57Z","tree_sha":"af17be6b3c91a13fcc39787514b731684ee5afc4","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1839","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BE:6E429:17F371A:1C1A0F3:6AB92C84"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":19491,"blob_sha":"8529153ebd8073ca85e1e780a279389b2b39fbf9","priority":0}],"documents":[{"path":"README.md","size":19491,"blob_sha":"8529153ebd8073ca85e1e780a279389b2b39fbf9","priority":0,"status":200,"text":"# Please Note\n\nIntel has created an excellent annotation tool with the latest technologies. https://github.com/opencv/cvat \n\nThe project below is archived, and no further updates are expected.\n\n2009 to 2020\n\n# VATIC - Video Annotation Tool from Irvine, California\n\n\n\nVATIC is an online video annotation tool for computer vision research that\ncrowdsources work to Amazon's Mechanical Turk. Our tool makes it easy to build\nmassive, affordable video data sets. \n\n<img src='http://i.imgur.com/z6jl5Bs.jpg'>\n\n# INSTALLATION \n\nNote: VATIC has only been tested on Ubuntu with Apache 2.2 HTTP server and a\nMySQL server. This document will describe installation on this platform,\nhowever it should work any operating system and with any server.\n\n## Download\n\nYou can download and extract VATIC from our website. Note: do NOT run the \ninstaller as root. \n\n    $ wget http://mit.edu/vondrick/vatic/vatic-install.sh\n    $ chmod +x vatic-install.sh\n    $ ./vatic-install.sh\n    $ cd vatic\n\n## HTTP Server Configuration \n\nOpen the Apache configuration file. On Ubuntu, this file is located at:\n\n    /etc/apache2/sites-enabled/000-default\n\nIf you do not use Apache on this computer for any other purpose, replace the\ncontents of the file with:\n\n    WSGIDaemonProcess www-data\n    WSGIProcessGroup www-data\n\n    <VirtualHost *:80>\n        ServerName vatic.domain.edu\n        DocumentRoot /path/to/vatic/public\n\n        WSGIScriptAlias /server /path/to/vatic/server.py\n        CustomLog /var/log/apache2/access.log combined\n    <\/VirtualHost>\n\nupdating ServerName with your domain name, DocumentRoot with the path to\nthe public directory in VATIC, and WSGIScriptAlias to VATIC's server.py file.\n\nIf you do use Apache for other purposes, you will have to setup a new virtual\nhost with the correct document root and script alias, as shown above.\n\nMake sure you have the mod_headers module enabled:\n\n    $ sudo cp /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled\n\nAfter making these changes, restart Apache:\n\n    $ sudo apache2ctl graceful\n\n## SQL Server Configuration \n\nWe recommend creating a separate database specifically for VATIC:\n\n    $ mysql -u root\n    mysql> create database vatic;\n\nThe next section will automatically create the necessary tables.\n\n## Setup\n\nInside the vatic directory, copy config.py-example to config.py:\n\n    $ cp config.py-example config.py\n\nThen open config.py and make changes to the following variables in order to\nconfigure VATIC:\n\n    signature       Amazon Mechanical Turk AWS signature (secret access key)\n    accesskey       Amazon Mechanical Turk AWS access key (access key ID)\n    sandbox         If true, put into Mturk sandbox mode. For debugging.\n    localhost       The local HTTP address: http://vatic.domain.edu/ so it\n                    matches the ServerName in Apache.\n    database        Database connection string: for example,\n                    mysql://user:pass@localhost/vatic\n    geolocation     API key from ipinfodb.com for geolocation services\n\nIf you do not plan on using VATIC on Mechcanical Turk (offlien mode only), you\ncan leave the signature and accesskey empty.\n\nAfter saving results, you can then initialize the database:\n\n    $ turkic setup --database\n\nNote: if you want to reset the database, you can do this with:\n\n    $ turkic setup --database --reset\n\nwhich will require confirmation to reset in order to prevent data loss.\n\nFinally, you must also allow VATIC to access turkic, a major dependency:\n\n    $ turkic setup --public-symlink\n\n# ANNOTATION \n\nBefore you continue, you should verify that the installation was correct. You\ncan verify this with:\n\n    $ turkic status --verify\n\nIf you receive any error messages, it means the installation was not complete\nand you should review the previous section. Note: If you do not plan on\nusing Mechanical Turk, you can safely ignore any errors caused by Mechanical\nTurk.\n\n## Frame Extraction \n\nOur system requires that videos are extracted into JPEG frames. Our tool can \ndo this automatically for you:\n\n    $ mkdir /path/to/output/directory\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n\nBy default, our tool will resize the frames to fit within a 720x480 rectangle.\nWe believe this resolution is ideal for online video viewing. You can change \nresolution with options:\n\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n      --width 1000 --height 1000\n\nor\n\n    $ turkic extract /path/to/video.mp4 /path/to/output/directory\n      --no-resize\n\nThe tool will maintain aspect ratio in all cases.\n\nAlternatively, if you have already extracted frames, you can use the\nformatframes command to format the video into a format that VATIC understands:\n\n    $ turkic formatframes /path/to/frames/ /path/to/output/directory\n\nThe above command will read all the images in /path/to/frames and create\nhard links (soft copy) in /path/to/output/directory.\n\n## Importing a Video\n\nAfter extracting frames, the video can be imported into our tool for \nannotation. The general syntax for this operation is:\n\n    $ turkic load identifier /path/to/output/directory Label1 Label2 LabelN\n\nwhere identifier is a unique string that you will use to refer to this video,\n/path/to/output/directory is the directory of frames, and LabelX are class\nlabels that you want annotated (e.g., Person, Car, Bicycle). You can have as\nmany class labels as you wish, but you must have at least one.\n\nWhen a video is imported, it is broken into small segments typically of only a\nfew seconds. When all the segments are annotated, the annotations are merged\nacross segments because each segment overlaps another by a small margin.\n\nThe above command specifies all of the required options, but there are many\noptions available as well. We recommend using these options.\n\n    MTurk Options\n        --title         The title that MTurk workers see\n        --description   The description that MTurk workers see\n        --duration      Time in seconds that a worker has to complete the task\n        --lifetime      Time in seconds that the task is online\n        --keywords      Keywords that MTurk workers can search on\n        --offline       Disable MTurk and use for self annotation only\n\n    Compensation Options\n        --cost                  The price advertised to MTurk workers\n        --per-object-bonus      A bonus in dollars paid for each object\n        --completion-bonus      A bonus in dollars paid for completing the task\n\n    Qualification Options\n        --min-approved-percent  Minimum percent of tasks the worker must have\n                                approved before they can work for you\n        --min-approved-amount   Minimum number of tasks that the worker must \n                                have completed before they can work for you\n\n    Video Options\n        --length        The length of each segment for this video in frames\n        --overlap       The overlap between segments in frames\n        --use-frames    When splitting into segments, only the frame intervals\n                        specified in this file. Each line should contain a\n                        start frame, followed by a space, then the stop frame.\n                        Frames outside the intervals in this file will be\n                        ignored.\n        --skip          If specified, request annotations only every N frames.\n        --blow-radius   When a user marks an annotation, blow away all other\n                        annotations within this many frames. If you want to\n                        allow the user to make fine-grained annotations, set\n                        this number to a small integer, or 0 to disable. By\n                        default, this is 5, which we recommend.\n\nYou can also specify temporal attributes that each object label can take on.\nFor example, you may have a person object with attributes \"walking\", \"running\",\nor \"sitting\". You can specify attributes the same way as labels, except you\nprepend an ~ before the text, which bind the attribute to the previous label:\n\n    $ turkic load identifier /path/to/output/directory Label1 ~Attr1A ~Attr1B\n      Label2 ~Attr2A ~Attr2B ~Attr2C Label3 \n\nIn the above example, Label1 will have attributes Attr1A and Attr1B, Label2\nwill have attributes Attr2B, Attr2B, and Attr2C and Label3 will have no \nattributes. Specifying attributes is optional.\n\n## Gold Standard Training \n\nIt turns out that video annotation is extremely challenging and most MTurk\nworkers lack the necessary patience. For this reason, we recommend requiring\nworkers to pass a \"gold standard\" video. When a new worker visits the task,\nthey will be redirected to a video for which the annotations are already known.\nIn order to move on to the true annotations, the worker must correctly annotate\nthe gold standard video first. We have found that this approach significantly\nimproves the quality of the annotations.\n\nTo use this feature, import a video to be used as the gold standard:\n\n    $ turkic load identifier-train /path/to/frames Label1 Label2 LabelN\n      --for-training --for-training-start 0 --for-training-stop 500\n      --for-training-overlap 0.5 --for-training-tolerance 0.1\n      --for-training-mistakes 1\n\nYou can also use any of the options described above. Explanations for the new\noptions are as follows:\n\n    --for-training              Specifies that this video is gold standard\n    --for-training-start        Specifies the first frame to use\n    --for-training-stop         Specifies the last frame to use\n    --for-training-overlap      Percent overlap that worker's boxes must match \n    --for-training-tolerance    Percent that annotations must agree temporally\n    --for-training-mistakes     The number of completely wrong annotations \n                                allowed. We recommend setting this to a small,\n                                nonzero integer.\n\nAfter running the above command, it will provide you with an URL for you to\ninput the ground truth annotation. You must make this ground truth annotation\nas careful as possible, as it will be used to evaluate future workers.\n\nYou can now specify that a video should use a gold standard video:\n\n    $ turkic load identifier /path/to/output/directory Label1 Label2 LabelN\n      --train-with identifier-train\n\nWhen a not-yet-seen worker visits this video, they will now be redirected to\nto the training video and be required to pass the evaluation test first.\n\n## Publishing Tasks \n\nWhen you are ready for the MTurk workers to annotate, you must publish the \ntasks, which will allow workers to start annotating:\n    \n    $ turkic publish\n\nYou can limit the number of tasks that are published:\n\n    $ turkic publish --limit 100\n\nRunning above command repeatedly will launch tasks in batches of 100. You can\nalso disable all pending tasks:\n    \n    $ turkic publish --disable\n\nwhich will \"unpublish\" tasks that have not yet been completed.\n\nIf you have videos that are offline only, you can see their access URLs with\nthe command:\n\n    $ turkic publish --offline\n\nNote: for the above command to work, you must have loaded the video with the\n--offline parameter as well: \n\n    $ turkic load identifier /path/to/frames Person --offline\n\n## Checking the Status \n\nYou can check the status of the video annotation server with the command:\n\n    $ turkic status\n\nThis will list various statistics about the server, such as number of jobs\npublished and how many are completed. You can get even more statistics by\nrequesting additional information from Amazon:\n\n    $ turkic status --turk\n\nwhich will output how much money is left in your account, among other\nstatistics.\n\nWhen all the videos are annotated, the last line will read:\n\n    Server is offline.\n\n## Retrieving Annotations\n\nYou can get all the annotations for a video with the command:\n\n    $ turkic dump identifier -o output.txt\n\nwhich will write the file \"output.txt\" where each line contains one\nannotation. Each line contains 10+ columns, separated by spaces. The\ndefinition of these columns are:\n\n    1   Track ID. All rows with the same ID belong to the same path.\n    2   xmin. The top left x-coordinate of the bounding box.\n    3   ymin. The top left y-coordinate of the bounding box.\n    4   xmax. The bottom right x-coordinate of the bounding box.\n    5   ymax. The bottom right y-coordinate of the bounding box.\n    6   frame. The frame that this annotation represents.\n    7   lost. If 1, the annotation is outside of the view screen.\n    8   occluded. If 1, the annotation is occluded.\n    9   generated. If 1, the annotation was automatically interpolated.\n    10  label. The label for this annotation, enclosed in quotation marks.\n    11+ attributes. Each column after this is an attribute.\n\nBy default, the above command will not attempt to merge annotations across\nshot segments. You can request merging with the command:\n\n    $ turkic dump identifier -o output.txt --merge --merge-threshold 0.5\n\nThe --merge-threshold option is optional, but it is a number between 0 and 1\nthat represents much the paths must agree in order to merge. 1 specifies a\nperfect match and 0 specifies no match. In practice, 0.5 is sufficient. Merging\nis done using the Hungarian algorithm.\n\nYou can also scale annotations by a factor, which is useful for when the\nvideos have been downsampled:\n\n    $ turkic dump identifier -o output.txt -s 2.8\n\nor force it to fit within a max dimension:\n\n    $ turkic dump identifier -o output.txt --dimensions 400x200\n\nor force it to fit within the dimensions of the original video:\n\n    $ turkic dump identifier -o output.txt --original-video /path/to/video.mp4\n\nThe command can also output to many different formats. Available formats are:\n\n    --xml       Use XML\n    --json      Use JSON\n    --matlab    Use MATLAB\n    --pickle    Use Python's Pickle\n    --labelme   Use LabelMe video's XML format\n    --pascal    Use PASCAL VOC format, treating each frame as an image\n\nThe specifications for these formats should be self explanatory.\n\n## Visualizing Videos \n\nYou can preview the annotations by visualizing the results:\n\n    $ turkic visualize identifier /tmp --merge\n\nwhich will output frames to /tmp with the bounding boxes with the file name\nas the frame number. The visualization will contain some meta information\nthat can help you identify bad workers. You can remove this meta information\nwith the option:\n\n    $ turkic visualize identifer /tmp --merge --no-augment\n\nIf you want to make a video of the visualization (e.g., with ffmpeg), it is\nuseful to renumber the frames so that they start counting at 0 and do not\nhave any gaps:\n\n    $ turkic visualize identifier /tmp --merge --renumber\n\nIf you wish to display the class label and their attributes next to the box,\nspecify the --labels option:\n\n    $ turkic visualize identifier /tmp --labels\n\n## Compensating Workers \n\nWhen you are ready, you can compensate workers:\n\n    $ turkic compensate --default accept\n\nwhich will pay all workers for all outstanding tasks. We strongly recommend\npaying all workers regardless of their quality. You should attempt to pay\nworkers at least once per day.\n\n## Finding Jobs \n\nIf you have found a small mistake in a video and want to make\nthe correction yourself, you can start an annotation session initialized with\nthe MTurk workers annotations:\n\n    $ turkic find --id identifier\n    $ turkic find --id identifier --frame frame\n\nwhere identifier is the identifier for the video and frame is the frame number\nthat the error occurs. In most cases, this command will return one URL for you\nto make the corrections. If it outputs two URLs, it means the frame number\noccurs in two overlapping segments, and so you may have to make changes to both\nof the segments. You can also omit the frame argument, in which case it will\noutput all URLs for that video.\n\nIf you want to find the HIT id, assignment ID, or worker ID for a particular\nvideo, specify the --ids parameter to the vet command:\n\n    $ turkic find --id identifer --ids\n    $ turkic find --id identifer --frame frame --ids\n\nwill print a list of all the IDs for the video. If the corresponding segment\nhas been published and completed, it will list three strings: the HIT ID,\nassignment ID, and the worker ID. If the job has been published but not\nfinished, it will just list the HIT ID. If the job has not yet been published,\nit prints \"(not published)\".\n\nAdditionally, if you want to find the job that corresponds to a particular\nHIT ID, you can use the find command:\n\n    $ turkic find --hitid HITID\n\n## Quality Control \n\nThe gold standard does a \"pretty good\" job of weeding out bad workers.\nNonetheless, there will always be bad workers that we must identify and\ninvalidate. Our tool provides a method to sample the annotations provided by\nworkers, which you can then manually verify for correctness:\n\n    $ turkic sample /tmp\n\nwhich by default will pick 3 random videos that the worker has completed, and\npick 4 random frames from each of those videos, and write visualiations to a\nfile in /tmp. You can tweak the number of videos and the number of frames with\nthe options:\n\n    $ turkic sample /tmp --number 3 --frames 4\n\nMoreover, you can only look at work from a certain date:\n\n    $ turkic sample /tmp --since \"yesterday\"\n\nThe filename will follow the format of WORKERID-JOBID.jpg. Once you have\nidentified a mallicious worker, you can block them, invalidate ALL of their\nwork, and respawn their jobs with the command:\n\n    $ turkic invalidate workerid\n\nThe options are also available:\n\n    --no-block      invalidate and respawn, but don't block\n    --no-publish    block and invalidate, but don't respawn\n\nYou can also invalidate and respawn individual jobs with the command:\n\n    $ turkic invalidate --hit hitid\n\n## Listing all Videos \n\nYou can retrieve a list of all videos in the system with:\n\n    $ turkic list\n\nIf you want just the videos that have been published:\n\n    $ turkic list --published\n\nIf you want just the videos that have been worked on:\n\n    $ turkic list --completed\n\nIf you instead want the videos that are used for gold standard:\n\n    $ turkic list --training\n\nFinally, if you just want to count how many videos are in the system, use the\n--count option, in combination with any of the above:\n\n    $ turkic list --count\n    $ turkic list --published --count\n\nIf you want statistics about each video, then give the --stats option:\n\n    $ turkic list --stats\n\n## Managing Workers \n\nYou can list all known workers with the command:\n\n    $ turkic workers\n\nwhich will dump every worker with the number of jobs they have completed. You\ncan also use this command to block and unblock workers:\n\n    $ turkic workers --block workerid\n    $ turkic workers --unblock workerid\n\nYou can also search for workers by the first few letters of their ID:\n\n    $ turkic workers --search A3M\n\n## Deleting a Video \n\nYou can delete a video at any time with:\n\n    $ turkic delete identifier\n\nIf the video has already been annotated (even partially), this command will \nwarn you and abort. You can force deletion with:\n\n    $ turkic delete identifier --force\n\nwhich will REMOVE ALL DATA AND CANNOT BE UNDONE.\n\n# REFERENCES \n\nWhen using our system, please cite:\n\n    Carl Vondrick, Donald Patterson, Deva Ramanan. \"Efficiently Scaling Up\n    Crowdsourced Video Annotation\" International Journal of Computer Vision\n    (IJCV). June 2012.\n\n# FEEDBACK AND BUGS \n\nPlease direct all comments and report all bugs to:\n\n    Carl Vondrick\n    vondrick@mit.edu\n\nThanks for using our system!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:18230D:5E8DC1:6AB92C85"},"text_sha256":"239b8d541556b8f5dda4a066ad14d53d326d22dd8094fb973539fac2db157d46"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ocrmypdf/OCRmyPDF","input_row":{"repository":"ocrmypdf/OCRmyPDF","url":"https://github.com/ocrmypdf/OCRmyPDF","name":"OCRmyPDF","owner":"ocrmypdf","description":"OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched","language":"Python","license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0","license_osi_approved":"true","stars":34882,"issues":1373,"created_at":"2013-12-20T08:26:28Z","updated_at":"2026-09-27T13:31:44Z","first_commit_at":"2013-04-09T16:44:46Z","last_commit_at":"2026-09-27T06:47:43Z","activity_months":161.58000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:34.279Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ocrmypdf/OCRmyPDF","visibility":"public","created_at":"2013-12-20T08:26:28Z","updated_at":"2026-09-27T13:31:44Z","private":false,"fork":false,"archived":false,"stargazers_count":34882,"open_issues_count":78,"license_spdx_id":"MPL-2.0","license_name":"Mozilla Public License 2.0"},"error":"","rate":{"github_remaining":"1838","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0871:71C58:17C7B2D:1BEE90E:6AB92C86"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1837","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0908:3203A7:17A57B7:1BCC14E:6AB92C86"},"commit":{"sha":"83f35e00f3edaf06725e7af86ce859501053e391","url":"https://github.com/ocrmypdf/OCRmyPDF/commit/83f35e00f3edaf06725e7af86ce859501053e391","date":"2018-05-21T08:28:21Z","author_date":"2018-05-21T08:28:21Z","committer_date":"2018-05-21T08:28:21Z","tree_sha":"815d2363d1554206cf0bd37ee106e1d873c03d49","message_first_line":"Start removing PyPDF2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1836","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0909:0BA1:D97ADA:FF9284:6AB92C87"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5693,"blob_sha":"fd5031a09a6ad671a0360381b48cadecbd370e70","priority":0},{"path":"docs/security.rst","size":7563,"blob_sha":"4ceb302b8f55c858c809c4a2841741a9eef1bf9c","priority":1}],"documents":[{"path":"README.rst","size":5693,"blob_sha":"fd5031a09a6ad671a0360381b48cadecbd370e70","priority":0,"status":200,"text":"OCRmyPDF\n========\n\n.. image:: https://travis-ci.org/jbarlow83/OCRmyPDF.svg?branch=master\n    :target: https://travis-ci.org/jbarlow83/OCRmyPDF\n\n.. image:: https://img.shields.io/pypi/v/ocrmypdf.svg   \n    :target: https://pypi.org/project/ocrmypdf/\n\n.. image:: https://img.shields.io/homebrew/v/ocrmypdf.svg   \n    :alt: homebrew\n    :target: http://brewformulas.org/Ocrmypdf\n\n\nOCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to\nbe searched or copy-pasted.\n\n.. code-block:: bash\n\n   ocrmypdf                      # it's a scriptable command line program\n      -l eng+fra                 # it supports multiple languages\n      --rotate-pages             # it can fix pages that are misrotated\n      --deskew                   # it can deskew crooked PDFs!\n      --title \"My PDF\"           # it can change output metadata\n      --jobs 4                   # it uses multiple cores by default\n      --output-type pdfa         # it produces PDF/A by default\n      input_scanned.pdf          # takes PDF input (or images)\n      output_searchable.pdf      # produces validated PDF output\n\n\nMain features\n-------------\n\n-  Generates a searchable\n   `PDF/A <https://en.wikipedia.org/?title=PDF/A>`_ file from a regular PDF\n-  Places OCR text accurately below the image to ease copy / paste\n-  Keeps the exact resolution of the original embedded images\n-  When possible, inserts OCR information as a \"lossless\" operation without rendering vector information\n-  Keeps file size about the same\n-  If requested deskews and/or cleans the image before performing OCR\n-  Validates input and output files\n-  Processes pages in parallel when more than one CPU core is\n   available\n-  Uses `Tesseract OCR <https://github.com/tesseract-ocr/tesseract>`_ engine\n-  Supports more than `100 languages <https://github.com/tesseract-ocr/tessdata>`_ recognized by Tesseract\n-  Battle-tested on thousands of PDFs, a test suite and continuous integration\n\nFor details: please consult the `documentation <https://ocrmypdf.readthedocs.io/en/latest/>`_.\n\nMotivation\n----------\n\nI searched the web for a free command line tool to OCR PDF files on\nLinux/UNIX: I found many, but none of them were really satisfying.\n\n-  Either they produced PDF files with misplaced text under the image (making copy/paste impossible) \n-  Or they did not handle accents and multilingual characters\n-  Or they changed the resolution of the embedded images\n-  Or they generated ridiculously large PDF files\n-  Or they crashed when trying to OCR some of my PDF files\n-  Or they did not produce valid PDF files (even though they were readable with my current PDF reader)\n-  On top of that none of them produced PDF/A files (format dedicated for long time storage)\n\n...so I decided to develop my own tool (using various existing scripts\nas an inspiration). \n\nInstallation\n------------\n\nLinux, UNIX, and macOS are supported. Windows is not directly supported but there is a Docker image available that runs on Windows.\n\nUsers of Debian 9 or later or Ubuntu 16.10 or later may simply\n\n.. code-block:: bash\n\n   apt-get install ocrmypdf\n\nand macOS users with Homebrew may simply\n\n.. code-block:: bash\n\n   brew install ocrmypdf\n\nFor everyone else, `see our documentation <https://ocrmypdf.readthedocs.io/en/latest/installation.html>`_ for installation steps.\n\nLanguages\n---------\n\nOCRmyPDF uses Tesseract for OCR, and relies on its language packs. For Linux users,\nyou can often find packages that provide language packs:\n\n.. code-block:: bash\n\n   # Display a list of all Tesseract language packs\n   apt-cache search tesseract-ocr\n\n   # Debian/Ubuntu users\n   apt-get install tesseract-ocr-chi-sim  # Example: Install Chinese Simplified language back\n   \nYou can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as to what languages it should search for. Multiple\nlanguages can be requested.\n\nDocumentation and support\n-------------------------\n\nOnce ocrmypdf is installed, the built-in help which explains the command syntax and options can be accessed via:\n\n.. code-block:: bash\n\n   ocrmypdf --help\n\nOur `documentation is served on Read the Docs <https://ocrmypdf.readthedocs.io/en/latest/index.html>`_.\n\nIf you detect an issue, please:\n\n-  Check whether your issue is already known\n-  If no problem report exists on github, please create one here:\n   https://github.com/jbarlow83/OCRmyPDF/issues\n-  Describe your problem thoroughly\n-  Append the console output of the script when running the debug mode\n   (``-v 1`` option)\n-  If possible provide your input PDF file as well as the content of the\n   temporary folder (using a file sharing service like Dropbox)\n\nRequirements\n------------\n\nRuns on CPython 3.6, and requires external program installations of Ghostscript, Tesseract OCR, QPDF, and Leptonica. ocrmypdf is pure Python, but uses CFFI to portably generate library bindings.\n\nPython 3.5 is also supported.\n\nPress & Media\n-------------\n\n-  `c't 1-2014, page 59 <http://heise.de/-2279695>`_:\n   Detailed presentation of OCRmyPDF v1.0 in the leading German IT\n   magazine c't\n-  `heise Open Source, 09/2014: Texterkennung mit\n   OCRmyPDF <http://heise.de/-2356670>`_\n\nLicense\n-------\n\nThe OCRmyPDF software is licensed under the GNU GPLv3. Certain files are covered by other licenses, as noted in their source files. \n\nThe license for each test file varies, and is noted in tests/resources/README.rst. The documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA 4.0).\n\nOCRmyPDF versions prior to 6.0 were licensed under the MIT License.\n\nDisclaimer\n----------\n\nThe software is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"11FC:3EACB:17BA0D:5E2436:6AB92C86"},"text_sha256":"1263cabf647b7ea04897318d5e2c79e7b6a160a5870461b432c019a996eb9aab"},{"path":"docs/security.rst","size":7563,"blob_sha":"4ceb302b8f55c858c809c4a2841741a9eef1bf9c","priority":1,"status":200,"text":"PDF security issues\n===================\n\n\tOCRmyPDF should only be used on PDFs you trust. It is not designed to protect you against malware. \n\nRecognizing that many users have an interest in handling PDFs and applying OCR to PDFs they did not generate themselves, this article discusses the security implications of PDFs and how users can protect themselves.\n\nThe disclaimer applies: this software has no warranties of any kind.\n\nPDFs may contain malware\n------------------------\n\nPDF is a rich, complex file format. The official PDF 1.7 specification, ISO 32000:2008, is hundreds of pages long and references several annexes each of which are similar in length. PDFs can contain video, audio, XML, JavaScript and other programming, and forms. In some cases, they can open internet connections to pre-selected URLs. All of these possible attack vectors.\n\nIn short, PDFs `may contain viruses <https://security.stackexchange.com/questions/64052/can-a-pdf-file-contain-a-virus>`_.\n\nThis `article <https://theinvisiblethings.blogspot.ca/2013/02/converting-untrusted-pdfs-into-trusted.html>`_ describes a high-paranoia method which allows potentially hostile PDFs to be viewed and rasterized safely in a disposable virtual machine. A trusted PDF created in this manner is converted to images and loses all information making it searchable and losing all compression. OCRmyPDF could be used restore searchability.\n\nHow OCRmyPDF processes PDFs\n---------------------------\n\nOCRmyPDF must open and interpret your PDF in order to insert an OCR layer. First, it runs all PDFs through `qpdf <https://github.com/qpdf/qpdf>`_, a program that repairs PDFs with syntax errors. This is done because, in the author's experience, a significant number of PDFs in the wild especially those created by scanners are not well-formed files. qpdf makes it more likely that OCRmyPDF will succeed, but offers no security guarantees. qpdf is also used to split the PDF into single page PDFs.\n\nAfter qpdf, OCRmyPDF examines each page using `PyPDF2 <https://github.com/mstamy2/PyPDF2>`_. This library also has no warranties or guarantees. OCRmyPDF works with qpdf 5.0 and up, but version 7.0 is recommended because of known security vulnerabilities in early versions.\n\nFinally, OCRmyPDF rasterizes each page of the PDF using `Ghostscript <http://ghostscript.com/>`_ in ``-dSAFER`` mode.\n\nDepending on the options specified, OCRmyPDF may graft the OCR layer into the existing PDF or it may essentially reconstruct (\"re-fry\") a visually identical PDF that may be quite different at the binary level. That said, OCRmyPDF is not a tool designed for sanitizing PDFs.\n\nUsing OCRmyPDF online or as a service\n-------------------------------------\n\nOCRmyPDF should not be deployed as a public-facing service, such as a website where a potential attacker could upload a PDF of their choice for OCR. OCRmyPDF is not designed to be secure against PDF malware. Another concern is PDFs specifically designed to be a denial of service attack: PDFs can contain recursive data structures that sometimes send parsers into infinite loops, and issue complex graphics drawing commands.\n\nSetting aside these concerns, a side effect of OCRmyPDF is it may incidentally sanitize PDFs that contain malware. It runs ``qpdf`` to repair the PDF, which could correct malformed PDF structures that are part of an attack. When PDF/A output is selected (the default), the input PDF is partially reconstructed by Ghostscript. When ``--force-ocr`` is used, all pages are rasterized and reconverted to PDF, which could remove malware in embedded images. No guarantees.\n\nOCRmyPDF should be relatively safe to use in a trusted intranet, with some considerations:\n\nLimiting CPU usage\n^^^^^^^^^^^^^^^^^^\n\nOCRmyPDF will attempt to use all available CPUs and storage, so executing ``nice ocrmypdf`` or limiting the number of jobs with the ``-j`` argument may ensure the server remains available. Another option would be run OCRmyPDF jobs inside a Docker container, a virtual machine, or a cloud instance, which can impose its own limits on CPU usage and be terminated \"from orbit\" if it fails to complete.\n\nTemporary storage requirements\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nOCRmyPDF will use a large amount of temporary storage for its work, proportional to the total number of pixels needed to rasterize the PDF. The raster image of a 8.5×11\" color page at 300 DPI takes 25 MB uncompressed; OCRmyPDF saves its intermediates as PNG, but that still means it requires about 9 MB per intermediate based on average compression ratios. Multiple intermediates per page are also required, depending on the command line given. A rule of thumb would be to allow 100 MB of temporary storage per page in a file – meaning that a small cloud servers or small VM partitions should be provisioned with plenty of extra space, if say, a 500 page file might be sent.\n\nTo check temporary storage usage on actual files, run ``ocrmypdf -k ...`` which will preserve and print the path to temporary storage when the job is done.\n\nTo change where temporary files are stored, change the ``TMPDIR`` environment variable for ocrmypdf's environment. (Python's ``tempfile.gettempdir()`` returns the root directory in which temporary files will be stored.) For example, one could redirect ``TMPDIR`` to a large RAM disk to avoid wear on HDD/SSD and potentially improve performance. On Amazon Web Services, ``TMPDIR`` can be set to `empheral storage <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html>`_.\n\nTimeouts\n^^^^^^^^\n\nTo prevent excessively long OCR jobs consider setting ``--tesseract-timeout`` and/or ``--skip-big`` arguments. ``--skip-big`` is particularly helpful if your PDFs include documents such as reports on standard page sizes with large images attached - often large images are not worth OCR'ing anyway.\n\nCommercial alternatives\n^^^^^^^^^^^^^^^^^^^^^^^\n\nThe author also provides professional services that include OCR and building databases around PDFs, and is happy to provide consultation.\n\nAbbyy Cloud OCR is a viable commercial alternative with a web services API. \n\n\nPassword protection, digital signatures and certification\n---------------------------------------------------------\n\nPassword protected PDFs usually have two passwords, and owner and user password. When the user password is set to empty, PDF readers will open the file automatically and marked it as \"(SECURED)\". While not as reliable as a digital signature, this indicates that whoever set the password approved of the file at that time. When the user password is set, the document cannot be viewed without the password. \n\nEither way, OCRmyPDF does not remove passwords from PDFs and exits with an error on encountering them.\n\n``qpdf``, one of OCRmyPDF's dependencies, can remove passwords. If the owner and user password are set, a password is required for ``qpdf``. If only the owner password is set, then the password can be stripped, even if one does not have the owner password.\n\nAfter OCR is applied, password protection is not permitted on PDF/A documents but the file can be converted to regular PDF.\n\nMany programs exist which are capable of inserting an image of someone's signature. On its own, this offers no security guarantees. It is trivial to remove the signature image and apply it to other files. This practice offers no real security.\n\nImportant documents can be digitally signed and certified to attest to their authorship. OCRmyPDF cannot do this. Open source tools such as pdfbox (Java) have this capability as does Adobe Acrobat. ","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E820:349C76:1789B4:5DF02B:6AB92C87"},"text_sha256":"0d98d536760ff1a9b5115c4776e85ee950fccbeb1dbbb07a60fb778fb183d2e9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1835","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090A:2D7D17:1792E69:1BB7EC3:6AB92C88"},"commit":{"sha":"72ce05768e3dec654d7b7cbb2d4804eb93154238","url":"https://github.com/ocrmypdf/OCRmyPDF/commit/72ce05768e3dec654d7b7cbb2d4804eb93154238","date":"2026-06-30T08:45:30Z","author_date":"2026-06-30T08:45:30Z","committer_date":"2026-06-30T08:45:30Z","tree_sha":"915fbaea56984c6dcd88c4d2567d7a23f284a5c4","message_first_line":"Bump version: v17.8.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1834","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B8:74181:179435A:1BBAF80:6AB92C88"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9893,"blob_sha":"e617c965fd08d56041a2d72a4454a72405e13100","priority":0},{"path":"docs/pdfsecurity.md","size":5002,"blob_sha":"4e0edfd193d80421785f6f2cb03e9a9386bc8a60","priority":1}],"documents":[{"path":"README.md","size":9893,"blob_sha":"e617c965fd08d56041a2d72a4454a72405e13100","priority":0,"status":200,"text":"<!-- SPDX-FileCopyrightText: 2014 Julien Pfefferkorn -->\n<!-- SPDX-FileCopyrightText: 2015 James R. Barlow -->\n<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->\n\n<img src=\"docs/images/logo.svg\" width=\"240\" alt=\"OCRmyPDF\">\n\n[![Build Status](https://github.com/ocrmypdf/OCRmyPDF/actions/workflows/build.yml/badge.svg)](https://github.com/ocrmypdf/OCRmyPDF/actions/workflows/build.yml) [![PyPI version][pypi]](https://pypi.org/project/ocrmypdf/) ![Homebrew version][homebrew] ![ReadTheDocs][docs] ![Python versions][pyversions]\n\n[pypi]: https://img.shields.io/pypi/v/ocrmypdf.svg \"PyPI version\"\n[homebrew]: https://img.shields.io/homebrew/v/ocrmypdf.svg \"Homebrew version\"\n[docs]: https://readthedocs.org/projects/ocrmypdf/badge/?version=latest \"RTD\"\n[pyversions]: https://img.shields.io/pypi/pyversions/ocrmypdf \"Supported Python versions\"\n\nOCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted.\n\n```bash\nocrmypdf                      # it's a scriptable command line program\n   -l eng+fra                 # it supports multiple languages\n   --rotate-pages             # it can fix pages that are misrotated\n   --deskew                   # it can deskew crooked PDFs!\n   --title \"My PDF\"           # it can change output metadata\n   --jobs 4                   # it uses multiple cores by default\n   --output-type pdfa         # it produces PDF/A by default\n   input_scanned.pdf          # takes PDF input (or images)\n   output_searchable.pdf      # produces validated PDF output\n```\n\n[See the release notes for details on the latest changes](https://ocrmypdf.readthedocs.io/en/latest/release_notes.html).\n\n## Main features\n\n- Generates a searchable [PDF/A](https://en.wikipedia.org/?title=PDF/A) file from a regular PDF\n- Places OCR text accurately below the image to ease copy / paste\n- Keeps the exact resolution of the original embedded images\n- When possible, inserts OCR information as a \"lossless\" operation without disrupting any other content\n- Optimizes PDF images, often producing files smaller than the input file\n- If requested, deskews and/or cleans the image before performing OCR\n- Validates input and output files\n- Distributes work across all available CPU cores\n- Uses [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) engine to recognize more than [100 languages](https://github.com/tesseract-ocr/tessdata)\n- Keeps your private data private.\n- Scales properly to handle files with thousands of pages.\n- Battle-tested on millions of PDFs.\n\n<img src=\"misc/screencast/demo.svg\" alt=\"Demo of OCRmyPDF in a terminal session\">\n\nFor details: please consult the [documentation](https://ocrmypdf.readthedocs.io/en/latest/).\n\n## Motivation\n\nI searched the web for a free command line tool to OCR PDF files: I found many, but none of them were really satisfying:\n\n- Either they produced PDF files with misplaced text under the image (making copy/paste impossible)\n- Or they did not handle accents and multilingual characters\n- Or they changed the resolution of the embedded images\n- Or they generated ridiculously large PDF files\n- Or they crashed when trying to OCR\n- Or they did not produce valid PDF files\n- On top of that none of them produced PDF/A files (format dedicated for long time storage)\n\n...so I decided to develop my own tool.\n\n## Installation\n\nLinux, Windows, macOS and FreeBSD are supported. Docker images are also available, for both x64 and ARM.\n\n| Operating system              | Install command               |\n| ----------------------------- | ------------------------------|\n| Debian, Ubuntu                | ``apt install ocrmypdf``      |\n| Windows Subsystem for Linux   | ``apt install ocrmypdf``      |\n| Fedora                        | ``dnf install ocrmypdf``      |\n| macOS (Homebrew)              | ``brew install ocrmypdf``     |\n| macOS (MacPorts)              | ``port install ocrmypdf``     |\n| macOS (nix)                   | ``nix-env -i ocrmypdf``       |\n| LinuxBrew                     | ``brew install ocrmypdf``     |\n| FreeBSD                       | ``pkg install py-ocrmypdf``   |\n| OpenBSD                       | ``pkg_add ocrmypdf``          |\n| Ubuntu Snap                   | ``snap install ocrmypdf``     |\n\nFor everyone else, [see our documentation](https://ocrmypdf.readthedocs.io/en/latest/installation.html) for installation steps.\n\n## Languages\n\nOCRmyPDF uses Tesseract for OCR, and relies on its language packs. For Linux users, you can often find packages that provide language packs:\n\n```bash\n\n# Debian/Ubuntu users\napt-cache search tesseract-ocr # Display a list of all Tesseract language packs\napt-get install tesseract-ocr-chi-sim  # Example: Install Chinese Simplified language pack\n\n\n# Arch Linux users\npacman -S tesseract-data-eng tesseract-data-deu # Example: Install the English and German language packs\n\n# OpenBSD users\npkg_info -aQ tesseract  # Display a list of all Tesseract language packs\npkg_add tesseract-cym  # Example: Install the Welsh language pack\n\n# brew macOS users\nbrew install tesseract-lang\n\n# Fedora users\ndnf search tesseract-langpack # Display a list of all Tesseract language packs \ndnf install tesseract-langpack-ita # Example: Install the Italian language pack\n\n\n```\n\nYou can then pass the `-l LANG` argument to OCRmyPDF to give a hint as to what languages it should search for. Multiple languages can be requested.\n\nOCRmyPDF supports Tesseract 4.1.1+. It will automatically use whichever version it finds first on the `PATH` environment variable. On Windows, if `PATH` does not provide a Tesseract binary, we use the highest version number that is installed according to the Windows Registry.\n\n## Documentation and support\n\nOnce OCRmyPDF is installed, the built-in help which explains the command syntax and options can be accessed via:\n\n```bash\nocrmypdf --help\n```\n\nOur [documentation is served on Read the Docs](https://ocrmypdf.readthedocs.io/en/latest/index.html).\n\nPlease report issues on our [GitHub issues](https://github.com/ocrmypdf/OCRmyPDF/issues) page, and follow the issue template for quick response.\n\n## Feature demo\n\n```bash\n# Add an OCR layer and require PDF/A\nocrmypdf --output-type pdfa input.pdf output.pdf\n\n# Convert an image to single page PDF\nocrmypdf input.jpg output.pdf\n\n# Add OCR to a file in place (only modifies file on success)\nocrmypdf myfile.pdf myfile.pdf\n\n# OCR with non-English languages (look up your language's ISO 639-3 code)\nocrmypdf -l fra LeParisien.pdf LeParisien.pdf\n\n# OCR multilingual documents\nocrmypdf -l eng+fra Bilingual-English-French.pdf Bilingual-English-French.pdf\n\n# Deskew (straighten crooked pages)\nocrmypdf --deskew input.pdf output.pdf\n```\n\nFor more features, see the [documentation](https://ocrmypdf.readthedocs.io/en/latest/index.html).\n\n## Requirements\n\nIn addition to the required Python version, OCRmyPDF requires external program installations of Ghostscript and Tesseract OCR. OCRmyPDF is pure Python, and runs on pretty much everything: Linux, macOS, Windows and FreeBSD.\n\n## Plugins\n\nOCRmyPDF provides a plugin interface allowing its capabilities to be extended or replaced. Here are some plugins we are aware of:\n\n- [OCRmyPDF-AppleOCR](https://github.com/mkyt/ocrmypdf-AppleOCR): replaces the standard Tesseract OCR engine with Apple Vision Framework. Requires macOS.\n- [OCRmyPDF-EasyOCR](https://github.com/ocrmypdf/OCRmyPDF-EasyOCR): replaces the standard Tesseract OCR engine with EasyOCR, a newer OCR engine based on PyTorch. GPU strongly recommended.\n- [OCRmyPDF-PaddleOCR](https://github.com/clefru/ocrmypdf-paddleocr): replaces the standard Tesseract OCR engine with PaddleOCR, a powerful GPU accelerated OCR engine.\n\n[paperless-ngx](https://docs.paperless-ngx.com/) provides integration of OCRmyPDF into a searchable document management system.\n\n## Press & Media\n\n- [Going paperless with OCRmyPDF](https://medium.com/@ikirichenko/going-paperless-with-ocrmypdf-e2f36143f46a)\n- [Converting a scanned document into a compressed searchable PDF with redactions](https://medium.com/@treyharris/converting-a-scanned-document-into-a-compressed-searchable-pdf-with-redactions-63f61c34fe4c)\n- [c't 1-2014, page 59](https://heise.de/-2279695): Detailed presentation of OCRmyPDF v1.0 in the leading German IT magazine c't\n- [heise Open Source, 09/2014: Texterkennung mit OCRmyPDF](https://heise.de/-2356670)\n- [heise Durchsuchbare PDF-Dokumente mit OCRmyPDF erstellen](https://www.heise.de/ratgeber/Durchsuchbare-PDF-Dokumente-mit-OCRmyPDF-erstellen-4607592.html)\n- [Excellent Utilities: OCRmyPDF](https://www.linuxlinks.com/excellent-utilities-ocrmypdf-add-ocr-text-layer-scanned-pdfs/)\n- [LinuxUser Texterkennung mit OCRmyPDF und Scanbd automatisieren](https://www.linux-community.de/ausgaben/linuxuser/2021/06/texterkennung-mit-ocrmypdf-und-scanbd-automatisieren/)\n- [Y Combinator discussion](https://news.ycombinator.com/item?id=32028752)\n\n## Business enquiries\n\nOCRmyPDF would not be the software that it is today without companies and users choosing to provide support for feature development and consulting enquiries. We are happy to discuss all enquiries, whether for extending the existing feature set, or integrating OCRmyPDF into a larger system.\n\n## License\n\nThe OCRmyPDF software is licensed under the Mozilla Public License 2.0 (MPL-2.0). This license permits integration of OCRmyPDF with other code, included commercial and closed source, but asks you to publish source-level modifications you make to OCRmyPDF.\n\nSome components of OCRmyPDF have other licenses, as indicated by standard SPDX license identifiers or the DEP5 copyright and licensing information file. Generally speaking, non-core code is licensed under MIT, and the documentation and test files are licensed under Creative Commons ShareAlike 4.0 (CC-BY-SA 4.0).\n\n## Disclaimer\n\nThe software is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E86:349C76:1789C0:5DF05C:6AB92C88"},"text_sha256":"6cb5020b784072a4e3724c28dc7399a25d1d700e98691984cd479c871ac0192e"},{"path":"docs/pdfsecurity.md","size":5002,"blob_sha":"4e0edfd193d80421785f6f2cb03e9a9386bc8a60","priority":1,"status":200,"text":"(security)=\n\n# PDF security issues\n\n> OCRmyPDF should only be used on PDFs you trust. It is not designed to\n> protect you against malware.\n\nRecognizing that many users have an interest in handling PDFs and\napplying OCR to PDFs they did not generate themselves, this article\ndiscusses the security implications of PDFs and how users can protect\nthemselves.\n\nThe disclaimer applies: this software has no warranties of any kind.\n\n## PDFs may contain malware\n\nPDF is a rich, complex file format. The official PDF 1.7 specification,\nISO 32000:2008, is hundreds of pages long and references several annexes\neach of which are similar in length. PDFs can contain video, audio, XML,\nJavaScript and other programming, and forms. In some cases, they can\nopen internet connections to pre-selected URLs. All of these are\npossible attack vectors.\n\nIn short, PDFs [may contain\nviruses](https://security.stackexchange.com/questions/64052/can-a-pdf-file-contain-a-virus).\n\nIf you do not trust a PDF or its source, do not open it or use OCRmyPDF\non it. Consider using a Docker container or virtual machine to isolate\nan untrusted PDF from your system.\n\n## How OCRmyPDF processes PDFs\n\nOCRmyPDF must open and interpret your PDF in order to insert an OCR\nlayer. First, it runs all PDFs through\n[pikepdf](https://github.com/pikepdf/pikepdf), a library based on\n[QPDF](https://github.com/qpdf/qpdf), a program that repairs PDFs with\nsyntax errors. This is done because, in the author\\'s experience, a\nsignificant number of PDFs in the wild, especially those created by\nscanners, are not well-formed files. QPDF makes it more likely that\nOCRmyPDF will succeed, but offers no security guarantees. QPDF is also\nused to split the PDF into single page PDFs.\n\nFinally, OCRmyPDF rasterizes each page of the PDF using\n[Ghostscript](http://ghostscript.com/) in `-dSAFER` mode.\n\nDepending on the options specified, OCRmyPDF may graft the OCR layer\ninto the existing PDF or it may essentially reconstruct (\\\"re-fry\\\") a\nvisually identical PDF that may be quite different at the binary level.\nThat said, OCRmyPDF is not a tool designed for sanitizing PDFs.\n\n## Password protected PDFs\n\nPassword protected PDFs usually have two passwords, and owner and user\npassword. When the user password is set to empty, PDF readers will open\nthe file automatically and mark it as \\\"(SECURED)\\\". Password security\ncan also request certain restrictions on the PDF, but anyone can remove\nthese restrictions if they have either the owner *or* user password.\nPasswords mainly present a barrier for casual users.\n\nOCRmyPDF cannot remove passwords from PDFs. If you want to remove a\npassword from a PDF, you must use other software, such as `qpdf`.\n\nIf the owner and user password are set, a password is required for\n`qpdf`. If only the owner password is set, then the password can be\nstripped, even if one does not have the owner password. To remove the\npassword from a using QPDF, use:\n\n:::{code} bash\nqpdf --decrypt --password='abc123' input.pdf no_password.pdf\n:::\n\nThen you can run OCRmyPDF on the file.\n\nIn its default mode, OCRmyPDF generates PDF/A. Passwords may not be set\non PDF/A documents. If you want to set a password on the output PDF, you\nmust specify `--output-type pdf`.\n\n## Signature images\n\nMany programs exist which are capable of inserting an image of\nsomeone\\'s signature. On its own, this offers no security guarantees. It\nis trivial to remove the signature image and apply it to other files.\nThis practice offers no real security.\n\n## Digital signatures\n\nImportant documents can be digitally signed and certified to attest to\ntheir authorship, approval or execution of a legal agreement. OCRmyPDF\nwill detect signed PDFs and will not modify them, unless the\n`--invalidate-digital-signatures` option is used, which will invalidate\nany signatures. (The signature may still be present in the PDF if\nopened, but PDF readers will not validate it.)\n\nA digital signature adds a cryptographic hash of the document to the\ndocument, so tamper protection is provided. That also precludes OCRmyPDF\nfrom modifying the document and preserving the signature.\n\nDigital signatures are not the same as a signature image. A digital\nsignature is a cryptographic hash of the document that is encrypted with\nthe author\\'s private key. The signature is decrypted with the author\\'s\npublic key. The public key is usually distributed by a certificate\nauthority. The signature is then verified by the PDF reader. If the\ndocument is modified, the signature will be invalidated.\n\n## Certificate-encrypted PDFs\n\nPDFs can be encrypted with a certificate. This is a more secure form of\nencryption than a password. The certificate is usually issued by a\ncertificate authority. A certificate is used to encrypt the document\nusing the public key for the benefit of a specific recipient who\npossesses the private key.\n\nOCRmyPDF cannot open certificate-encrypted PDFs. If you have the\ncertificate, you can use other PDF software, such as Acrobat, to decrypt\nthe PDF.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"85E8:2C474:181000:5E7A48:6AB92C88"},"text_sha256":"3cc4165a2de110de76094d1090b24418a51f0291fd8de0db7189177c16546b2c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":1,"D1_evidence":"sha=72ce05768e3dec654d7b7cbb2d4804eb93154238; file=README.md; text=- Validates input and output files - Distributes work across all available CPU cores - Keeps your private data private. - Scales properly to handle files with thousands of pages. - Battle-tested on millions of PDFs.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C7":"sha=72ce05768e3dec654d7b7cbb2d4804eb93154238; file=README.md; text=- Validates input and output files - Distributes work across all available CPU cores - Keeps your private data private. - Scales properly to handle files with thousands of pages. - Battle-tested on millions of PDFs."}}}}
{"repository":"lovell/sharp","input_row":{"repository":"lovell/sharp","url":"https://github.com/lovell/sharp","name":"sharp","owner":"lovell","description":"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":32725,"issues":4077,"created_at":"2013-08-19T20:24:24Z","updated_at":"2026-09-27T13:34:15Z","first_commit_at":"2013-08-19T20:24:24Z","last_commit_at":"2026-09-27T13:33:44Z","activity_months":157.25,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:37.877Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lovell/sharp","visibility":"public","created_at":"2013-08-19T20:24:24Z","updated_at":"2026-09-27T13:34:15Z","private":false,"fork":false,"archived":false,"stargazers_count":32725,"open_issues_count":124,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1833","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090D:6E5BD:17AA0D2:1BCF85F:6AB92C89"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1832","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:181F62E:1C46359:6AB92C8A"},"commit":{"sha":"54a71fc142cad4a632e8d001a97adc2980a6d0ab","url":"https://github.com/lovell/sharp/commit/54a71fc142cad4a632e8d001a97adc2980a6d0ab","date":"2018-05-23T19:51:47Z","author_date":"2018-05-23T19:51:47Z","committer_date":"2018-05-23T19:51:47Z","tree_sha":"db81dd6c1b87ff169922333d1a91322d6909aba1","message_first_line":"Fix tint op by ensuring LAB and allowing negative values #1235"},"tree_request_status":200,"tree_rate":{"github_remaining":"1831","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0910:7580A:180F9DE:1C3666D:6AB92C8A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2823,"blob_sha":"292556968f846725bde1440da0d111815808ffc7","priority":0}],"documents":[{"path":"README.md","size":2823,"blob_sha":"292556968f846725bde1440da0d111815808ffc7","priority":0,"status":200,"text":"# sharp\n\n```sh\nnpm install sharp\n```\n\n```sh\nyarn add sharp\n```\n\nThe typical use case for this high speed Node.js module\nis to convert large images in common formats to\nsmaller, web-friendly JPEG, PNG and WebP images of varying dimensions.\n\nResizing an image is typically 4x-5x faster than using the\nquickest ImageMagick and GraphicsMagick settings.\n\nColour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly.\nLanczos resampling ensures quality is not sacrificed for speed.\n\nAs well as image resizing, operations such as\nrotation, extraction, compositing and gamma correction are available.\n\nMost modern 64-bit OS X, Windows and Linux (glibc) systems running\nNode versions 4, 6, 8 and 10\ndo not require any additional install or runtime dependencies.\n\n## Examples\n\n```javascript\nconst sharp = require('sharp');\n```\n\n```javascript\nsharp(inputBuffer)\n  .resize(320, 240)\n  .toFile('output.webp', (err, info) => ... );\n  // A Promises/A+ promise is returned when callback is not provided.\n```\n\n```javascript\nsharp('input.jpg')\n  .rotate()\n  .resize(200)\n  .toBuffer()\n  .then( data => ... )\n  .catch( err => ... );\n```\n\n```javascript\nconst roundedCorners = new Buffer(\n  '<svg><rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" rx=\"50\" ry=\"50\"/><\/svg>'\n);\n\nconst roundedCornerResizer =\n  sharp()\n    .resize(200, 200)\n    .overlayWith(roundedCorners, { cutout: true })\n    .png();\n\nreadableStream\n  .pipe(roundedCornerResizer)\n  .pipe(writableStream);\n```\n\n[![Test Coverage](https://coveralls.io/repos/lovell/sharp/badge.png?branch=master)](https://coveralls.io/r/lovell/sharp?branch=master)\n\n### Documentation\n\nVisit [sharp.pixelplumbing.com](http://sharp.pixelplumbing.com/) for complete\n[installation instructions](http://sharp.pixelplumbing.com/page/install),\n[API documentation](http://sharp.pixelplumbing.com/page/api),\n[benchmark tests](http://sharp.pixelplumbing.com/page/performance) and\n[changelog](http://sharp.pixelplumbing.com/page/changelog).\n\n### Contributing\n\nA [guide for contributors](https://github.com/lovell/sharp/blob/master/CONTRIBUTING.md)\ncovers reporting bugs, requesting features and submitting code changes.\n\n### Licence\n\nCopyright 2013, 2014, 2015, 2016, 2017, 2018 Lovell Fuller and contributors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3714:2C474:181013:5E7A82:6AB92C8A"},"text_sha256":"3c4e127945c5a888458a6d71e5d44f5057ce429bc397eedfe82e6a872a03a74d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1830","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0841:6E4BB:180DFA8:1C3447E:6AB92C8B"},"commit":{"sha":"ba303a799de6b0639a108e82465870ce0722ee4a","url":"https://github.com/lovell/sharp/commit/ba303a799de6b0639a108e82465870ce0722ee4a","date":"2026-06-30T11:48:19Z","author_date":"2026-06-30T11:48:19Z","committer_date":"2026-06-30T11:48:19Z","tree_sha":"21503b03f58a717ae27777f5febc8aaa8ad0db61","message_first_line":"Prerelease v0.35.3-rc.2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1829","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:1806B69:1C2CF42:6AB92C8B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3162,"blob_sha":"7db7edda0c1c3ef47956a1c77a92994b0664f102","priority":0},{"path":".github/SECURITY.md","size":427,"blob_sha":"e17f100b89717f3fe33e530d5fc28548c91f127c","priority":1}],"documents":[{"path":"README.md","size":3162,"blob_sha":"7db7edda0c1c3ef47956a1c77a92994b0664f102","priority":0,"status":200,"text":"# sharp\n\n<picture><img src=\"https://sharp.pixelplumbing.com/sharp-logo.svg\" width=\"160\" height=\"160\" alt=\"sharp logo\" align=\"right\"><\/picture>\n\nThe typical use case for this high speed Node-API module\nis to convert large images in common formats to\nsmaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.\n\nIt can be used with all JavaScript runtimes\nthat provide support for Node-API v9, including\nNode.js (>= 20.9.0), Deno and Bun.\n\nResizing an image is typically 4x-5x faster than using the\nquickest ImageMagick and GraphicsMagick settings\ndue to its use of [libvips](https://github.com/libvips/libvips).\n\nColour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly.\nLanczos resampling ensures quality is not sacrificed for speed.\n\nAs well as image resizing, operations such as\nrotation, extraction, compositing and gamma correction are available.\n\nMost modern macOS, Windows and Linux systems\ndo not require any additional install or runtime dependencies.\n\n## Documentation\n\nVisit [sharp.pixelplumbing.com](https://sharp.pixelplumbing.com/) for complete\n[installation instructions](https://sharp.pixelplumbing.com/install),\n[API documentation](https://sharp.pixelplumbing.com/api-constructor),\n[benchmark tests](https://sharp.pixelplumbing.com/performance) and\n[changelog](https://sharp.pixelplumbing.com/changelog).\n\n## Examples\n\n```sh\nnpm install sharp\n```\n\n```javascript\n// ESM\nimport sharp from 'sharp';\n\n// CJS\nconst sharp = require('sharp');\n```\n\n```javascript\nawait sharp(inputBuffer)\n  .resize({ width: 320, height: 240 })\n  .toFile('output.webp', (err, info) => { ... });\n```\n\n```javascript\nconst output = await sharp('input.jpg')\n  .autoOrient()\n  .resize({ width: 200 })\n  .jpeg({ mozjpeg: true })\n  .toBuffer();\n```\n\n```javascript\nconst semiTransparentRedPng = await sharp({\n  create: {\n    width: 48,\n    height: 48,\n    channels: 4,\n    background: { r: 255, g: 0, b: 0, alpha: 0.5 }\n  }\n})\n  .png()\n  .toBuffer();\n```\n\n```javascript\nconst roundedCorners = Buffer.from(\n  '<svg><rect x=\"0\" y=\"0\" width=\"200\" height=\"200\" rx=\"50\" ry=\"50\"/><\/svg>'\n);\n\nconst roundedCornerResizer =\n  sharp()\n    .resize(200, 200)\n    .composite([{\n      input: roundedCorners,\n      blend: 'dest-in'\n    }])\n    .png();\n\nreadableStream\n  .pipe(roundedCornerResizer)\n  .pipe(writableStream);\n```\n\n## Contributing\n\nA [guide for contributors](https://github.com/lovell/sharp/blob/main/.github/CONTRIBUTING.md)\ncovers reporting bugs, requesting features and submitting code changes.\n\n## Licensing\n\nCopyright 2013 Lovell Fuller and others.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F032:29FD16:184C13:5EB691:6AB92C8A"},"text_sha256":"89772961fcf195b976573874555f2902bfe04a3e57be61af261ac65ce9348735"},{"path":".github/SECURITY.md","size":427,"blob_sha":"e17f100b89717f3fe33e530d5fc28548c91f127c","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nThe latest version of `sharp` as published to npm\nand reported by `npm view sharp dist-tags.latest`\nis supported with security updates.\n\n## Reporting a Vulnerability\n\nPlease use\n[e-mail](https://github.com/lovell/sharp/blob/main/package.json#L5)\nto report a vulnerability.\n\nYou can expect a response within 48 hours\nif you are a human reporting a genuine issue.\n\nThank you in advance.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5A9E:345ED4:179C13:5E05E3:6AB92C8B"},"text_sha256":"44c1ba34b2534e871fe67e2c5a23b5d818988c4bd034bb8e9e8985d75d5f3732"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pqina/filepond","input_row":{"repository":"pqina/filepond","url":"https://github.com/pqina/filepond","name":"filepond","owner":"pqina","description":"🌊 A flexible and fun JavaScript file upload library","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":16394,"issues":881,"created_at":"2017-10-09T12:17:44Z","updated_at":"2026-09-26T02:24:31Z","first_commit_at":"2017-10-20T12:48:25Z","last_commit_at":"2026-07-13T11:37:16Z","activity_months":104.73,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:40.763Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pqina/filepond","visibility":"public","created_at":"2017-10-09T12:17:44Z","updated_at":"2026-09-26T02:24:31Z","private":false,"fork":false,"archived":false,"stargazers_count":16394,"open_issues_count":143,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1828","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0891:37D6E2:181DB20:1C44942:6AB92C8C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1827","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:1819422:1C403BD:6AB92C8D"},"commit":{"sha":"6d94e2249efc611cfc8600bf82fd85b6bf848eed","url":"https://github.com/pqina/filepond/commit/6d94e2249efc611cfc8600bf82fd85b6bf848eed","date":"2018-05-24T09:07:21Z","author_date":"2018-05-24T09:07:21Z","committer_date":"2018-05-24T09:07:21Z","tree_sha":"c244e05eae163131b9985bea5b533bd04a2d6025","message_first_line":"update link to angular repository"},"tree_request_status":200,"tree_rate":{"github_remaining":"1826","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:180E102:1C34605:6AB92C8D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5068,"blob_sha":"54177cd86876bf9d6d921d9e04b2fc417fe1a59f","priority":0}],"documents":[{"path":"README.md","size":5068,"blob_sha":"54177cd86876bf9d6d921d9e04b2fc417fe1a59f","priority":0,"status":200,"text":"# <img src=\"https://github.com/pqina/filepond-github-assets/blob/master/logo.svg\" height=\"44\" alt=\"FilePond\"/>\n\nA JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/filepond.svg)](https://www.npmjs.com/package/filepond)\n[![Backlog on WIP.chat](https://img.shields.io/badge/backlog-wip.chat-yellow.svg)](https://wip.chat/products/191/pending)\n[![Donate with PayPal](https://img.shields.io/badge/donate-PayPal.me-pink.svg)](https://www.paypal.me/rikschennink/10)\n\n21 KB gzipped. FilePond adapters are available for **[React](https://github.com/pqina/react-filepond)**, **[Vue](https://github.com/pqina/vue-filepond)**, **[Angular](https://github.com/pqina/ngx-filepond)** and **[jQuery](https://github.com/pqina/jquery-filepond)**\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif?raw=true\" width=\"370\" alt=\"\"/>\n\n### Core Features\n\n*   Accepts **directories**, **files**, blobs, local URLs, **remote URLs** and Data URIs.\n*   **Drop files**, select on filesystem, **copy and paste files**, or add files using the API.\n*   **Async uploading** with AJAX, or encode files as base64 data and send along form post.\n*   **Accessible**, tested with AT software like VoiceOver and JAWS, **navigable by Keyboard**.\n*   **Image optimization**, automatic image resizing, **cropping**, and **fixes EXIF orientation**.\n*   **Responsive**, automatically scales to available space, is functional on both **mobile and desktop devices**.\n\n[Learn more about FilePond](https://pqina.nl/filepond)\n\n### Plugins\n\n*   [File encode](https://github.com/pqina/filepond-plugin-file-encode)\n*   [File size validation](https://github.com/pqina/filepond-plugin-file-validate-size)\n*   [File type validation](https://github.com/pqina/filepond-plugin-file-validate-type)\n*   [Image size validation](https://github.com/pqina/filepond-plugin-image-validate-size)\n*   [Image preview](https://github.com/pqina/filepond-plugin-image-preview)\n*   [Image crop](https://github.com/pqina/filepond-plugin-image-crop)\n*   [Image resize](https://github.com/pqina/filepond-plugin-image-resize)\n*   [Image transform](https://github.com/pqina/filepond-plugin-image-transform)\n*   [Image EXIF orientation](https://github.com/pqina/filepond-plugin-image-exif-orientation)\n\n### Adapters\n\n*   [React](https://github.com/pqina/react-filepond)\n*   [Vue](https://github.com/pqina/vue-filepond)\n*   [jQuery](https://github.com/pqina/jquery-filepond)\n*   [Angular](https://github.com/pqina/ngx-filepond)\n*   [Angular 1](https://github.com/johnnyasantoss/angularjs-filepond)\n\n### Boilerplates\n\n*   [PHP](https://github.com/pqina/filepond-boilerplate-php)\n\n## Quick Start\n\nInstall using npm:\n\n```bash\nnpm install filepond\n```\n\nThen import in your project:\n\n```js\nimport * as FilePond from 'filepond';\n\n// Create a multi file upload component\nconst pond = FilePond.create({\n    multiple: true,\n    name: 'filepond'\n});\n\n// Add it to the DOM\ndocument.body.appendChild(pond.element);\n```\n\nOr get it from a CDN:\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n  <title>FilePond from CDN<\/title>\n\n  <!-- Filepond stylesheet -->\n  <link href=\"https://unpkg.com/filepond/dist/filepond.css\" rel=\"stylesheet\">\n\n<\/head>\n<body>\n\n  <!-- We'll transform this input into a pond -->\n  <input type=\"file\" class=\"filepond\">\n\n  <!-- Load FilePond library -->\n  <script src=\"https://unpkg.com/filepond/dist/filepond.js\"><\/script>\n\n  <!-- Turn all file input elements into ponds -->\n  <script>\n  FilePond.parse(document.body);\n  <\/script>\n\n<\/body>\n<\/html>\n```\n\n[Getting started with FilePond](https://pqina.nl/filepond/docs/patterns/getting-started/)\n\n## License\n\n**Please don't remove or change the disclaimers in the source files**\n\nMIT License\n\nCopyright (c) 2018 PQINA | [Rik Schennik](mailto:rik@pqina.nl)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4280:3BCC6:17DDA3:5E4854:6AB92C8D"},"text_sha256":"d0ce03fb0b51cfbe09a14042258a5c47a1327424d8a66e2602bdfd057c2ee1ec"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1825","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17E197D:1C07BC1:6AB92C8E"},"commit":{"sha":"42ca884abf1f42a13e4e9b25773a7390d922aa05","url":"https://github.com/pqina/filepond/commit/42ca884abf1f42a13e4e9b25773a7390d922aa05","date":"2026-06-29T11:16:01Z","author_date":"2026-06-29T11:16:01Z","committer_date":"2026-06-29T11:16:01Z","tree_sha":"bb2f03a3efa92c0e9c82f272a1790f94afd72296","message_first_line":"Fix ja labelFileProcessing (読込中 -> アップロード中)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1824","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A6:71E0C:18005B7:1C25F05:6AB92C8E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12018,"blob_sha":"014a43c13054190802215156aa4d59718383383b","priority":0}],"documents":[{"path":"README.md","size":12018,"blob_sha":"014a43c13054190802215156aa4d59718383383b","priority":0,"status":200,"text":"# [<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/logo.svg\" height=\"44\" alt=\"FilePond\"/>](https://pqina.nl/filepond/)\n\nA JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/filepond.svg)](https://www.npmjs.com/package/filepond)\n![npm](https://img.shields.io/npm/dt/filepond)\n[![minzipped size](https://img.shields.io/bundlephobia/minzip/filepond)](https://bundlephobia.com/package/filepond)\n[![Discord](https://img.shields.io/discord/1422126182924554291?label=discord)](https://discord.gg/KTyymsrTrX)\n\nFilePond adapters are available for **[React](https://github.com/pqina/react-filepond)**, **[Vue](https://github.com/pqina/vue-filepond)**, **[Angular](https://github.com/pqina/ngx-filepond)**, **[Svelte](https://github.com/pqina/svelte-filepond)**, and **[jQuery](https://github.com/pqina/jquery-filepond)**\n\n[FilePond v5 Alpha version now available for testing](https://github.com/pqina/filepond/tree/v5)\n\n[Documentation](https://pqina.nl/filepond/docs) • [Discord](https://discord.gg/KTyymsrTrX) • [Examples](#live-demos)\n\n---\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/header.svg\" alt=\"FilePond\"/>](https://www.buymeacoffee.com/rikschennink/)\n\n[Buy me a Coffee](https://www.buymeacoffee.com/rikschennink/) • [Use FilePond with Pintura](https://pqina.nl/pintura/?ref=github-filepond) • [Dev updates](https://rik.schenn.ink)\n\n---\n\n### Core Features\n\n-   Accepts **directories**, **files**, blobs, local URLs, **remote URLs** and Data URIs.\n-   **Drop files**, select on filesystem, **copy and paste files**, or add files using the API.\n-   **Async uploads** with AJAX, supports **chunk uploads**, can encode files as base64 data and send along form post.\n-   **Accessible**, tested with AT software like VoiceOver and JAWS, **navigable by Keyboard**.\n-   **Image optimization**, automatic image resizing, **cropping**, filtering, and **fixes EXIF orientation**.\n-   **Responsive**, automatically scales to available space, is functional on both **mobile and desktop devices**.\n\n[Learn more about FilePond](https://pqina.nl/filepond/)\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif?raw=true\" width=\"370\" alt=\"\"/>](https://pqina.nl/filepond/)\n\n---\n\n### Also need Image Editing?\n\n**Pintura the modern JavaScript Image Editor** is what you're looking for. Pintura supports setting **crop aspect ratios**, **resizing**, **rotating**, **cropping**, and **flipping** images. Above all, it integrates beautifully with FilePond.\n\n[Learn more about Pintura](https://pqina.nl/pintura/?ref=github-filepond)\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond_pintura.gif?raw=true\" width=\"600\" alt=\"\"/>](https://pqina.nl/pintura/?ref=github-filepond)\n\n---\n\n### Live Demos\n\n-   [React](https://stackblitz.com/github/pqina/pintura-example-react?file=src%2FExampleFilePond.js)\n-   [Angular](https://stackblitz.com/github/pqina/pintura-example-angular?file=src%2Fapp%2Ffilepond-example%2Ffilepond-example.component.ts)\n-   [Svelte](https://stackblitz.com/github/pqina/pintura-example-svelte?file=src%2FApp.svelte%3AL152)\n-   [Vue](https://stackblitz.com/github/pqina/pintura-example-vue-3?file=src%2FExampleFilePond.vue)\n\n### Plugins\n\n-   [File encode](https://github.com/pqina/filepond-plugin-file-encode)\n-   [File rename](https://github.com/pqina/filepond-plugin-file-rename)\n-   [File size validation](https://github.com/pqina/filepond-plugin-file-validate-size)\n-   [File type validation](https://github.com/pqina/filepond-plugin-file-validate-type)\n-   [File metadata](https://github.com/pqina/filepond-plugin-file-metadata)\n-   [File poster](https://github.com/pqina/filepond-plugin-file-poster)\n-   [Image editor](https://github.com/pqina/filepond-plugin-image-edit)\n-   [Image size validation](https://github.com/pqina/filepond-plugin-image-validate-size)\n-   [Image preview](https://github.com/pqina/filepond-plugin-image-preview)\n-   [Image crop](https://github.com/pqina/filepond-plugin-image-crop)\n-   [Image filter](https://github.com/pqina/filepond-plugin-image-filter)\n-   [Image resize](https://github.com/pqina/filepond-plugin-image-resize)\n-   [Image transform](https://github.com/pqina/filepond-plugin-image-transform)\n-   [Image EXIF orientation](https://github.com/pqina/filepond-plugin-image-exif-orientation)\n-   [Image overlay](https://github.com/nielsboogaard/filepond-plugin-image-overlay) ([nielsboogaard/filepond-plugin-image-overlay](https://github.com/nielsboogaard/filepond-plugin-image-overlay))\n-   [Media preview](https://github.com/nielsboogaard/filepond-plugin-media-preview) ([nielsboogaard/filepond-plugin-media-preview](https://github.com/nielsboogaard/filepond-plugin-media-preview))\n-   [Media preview + PDF preview](https://github.com/ErnestBrandi/filepond-plugin-media-preview) ([ErnestBrandi/filepond-plugin-media-preview](https://github.com/ErnestBrandi/filepond-plugin-media-preview))\n-   [Get file](https://github.com/nielsboogaard/filepond-plugin-get-file) ([nielsboogaard/filepond-plugin-get-file](https://github.com/nielsboogaard/filepond-plugin-get-file))\n-   [Zip Directory Uploads](https://github.com/tzsk/filepond-plugin-zipper) ([tzsk/filepond-plugin-zipper](https://github.com/tzsk/filepond-plugin-zipper))\n-   [PDF Preview](https://github.com/Adri-Glez/filepond-plugin-pdf-preview) ([Adri-Glez/filepond-plugin-pdf-preview](https://github.com/Adri-Glez/filepond-plugin-pdf-preview))\n-   [PDF Convert](https://github.com/alexandreDavid/filepond-plugin-pdf-convert) ([alexandreDavid/filepond-plugin-pdf-convert](https://github.com/alexandreDavid/filepond-plugin-pdf-convert))\n\n### Adapters\n\n-   [React](https://github.com/pqina/react-filepond)\n-   [Vue](https://github.com/pqina/vue-filepond)\n-   [Svelte](https://github.com/pqina/svelte-filepond)\n-   [jQuery](https://github.com/pqina/jquery-filepond)\n-   [Angular](https://github.com/pqina/ngx-filepond)\n-   [Angular 1](https://github.com/johnnyasantoss/angularjs-filepond) ([johnnyasantoss/angularjs-filepond](https://github.com/johnnyasantoss/angularjs-filepond))\n-   [Blazor](https://github.com/soenneker/soenneker.blazor.filepond) ([soenneker/soenneker.blazor.filepond](https://github.com/soenneker/soenneker.blazor.filepond))\n-   [Ember](https://github.com/alexdiliberto/ember-filepond) ([alexdiliberto/ember-filepond](https://github.com/alexdiliberto/ember-filepond))\n\n### Backend\n\n-   [PHP](https://github.com/pqina/filepond-boilerplate-php)\n-   [Django](https://github.com/ImperialCollegeLondon/django-drf-filepond) ([ImperialCollegeLondon/django-drf-filepond](https://github.com/ImperialCollegeLondon/django-drf-filepond))\n-   [Laravel](https://github.com/Sopamo/laravel-filepond) ([Sopamo/laravel-filepond](https://github.com/Sopamo/laravel-filepond))\n-   [Laravel](https://github.com/Albert221/laravel-filepond) ([Albert221/laravel-filepond](https://github.com/Albert221/laravel-filepond))\n-   [SilverStripe](https://github.com/lekoala/silverstripe-filepond) ([lekoala/silverstripe-filepond](https://github.com/lekoala/silverstripe-filepond))\n-   [Ruby on Rails](https://github.com/Code-With-Rails/filepond-rails) ([Code-With-Rails/filepond-rails](https://github.com/Code-With-Rails/filepond-rails))\n\n## Quick Start\n\nInstall using npm:\n\n```bash\nnpm install filepond\n```\n\nThen import in your project:\n\n```js\nimport * as FilePond from 'filepond';\n\n// Create a multi file upload component\nconst pond = FilePond.create({\n    multiple: true,\n    name: 'filepond',\n});\n\n// Add it to the DOM\ndocument.body.appendChild(pond.element);\n```\n\nOr get it from a CDN:\n\n```html\n<!DOCTYPE html>\n<html>\n    <head>\n        <title>FilePond from CDN<\/title>\n\n        <!-- Filepond stylesheet -->\n        <link href=\"https://unpkg.com/filepond/dist/filepond.css\" rel=\"stylesheet\" />\n    <\/head>\n    <body>\n        <!-- We'll transform this input into a pond -->\n        <input type=\"file\" class=\"filepond\" />\n\n        <!-- Load FilePond library -->\n        <script src=\"https://unpkg.com/filepond/dist/filepond.js\"><\/script>\n\n        <!-- Turn all file input elements into ponds -->\n        <script>\n            FilePond.parse(document.body);\n        <\/script>\n    <\/body>\n<\/html>\n```\n\n[Getting started with FilePond](https://pqina.nl/filepond/docs/patterns/getting-started/)\n\n## Internationalization\n\nThe [locale folder](./locale/) contains different language files, PR's are welcome, you can use locale files like this:\n\n```js\nimport pt_BR from 'filepond/locale/pt-br.js';\n\nFilePond.setOptions(pt_BR);\n```\n\n## Contributing\n\nAt the moment test coverage is not great, it's around 65%. To accept pull requests the tests need to be better, any help to improve them is very much appreciated.\n\nTests are based on Jest and can be run with `npm run test`\n\nTo build the library run `npm run build`\n\n## Publications\n\n-   [Using FilePond with NodeJS](https://www.infoworld.com/article/3627248/how-to-use-filepond-with-nodejs.html)\n-   [Applying Watermarks to Images with FilePond](https://pqina.nl/blog/applying-watermarks-to-images-with-filepond/)\n-   [Generating Image Thumbnails in the Browser using JavaScript and FilePond](https://dev.to/pqina/generating-image-thumbnails-in-the-browser-using-javascript-and-filepond-10b8)\n-   [How to upload files with Vue and FilePond](https://dev.to/pqina/how-to-upload-files-with-vue-and-filepond-1m02)\n-   [Smooth file uploading with React and FilePond](https://itnext.io/uploading-files-with-react-and-filepond-f8a798308557)\n-   [5 interesting technical challenges I faced while building FilePond](https://itnext.io/filepond-frontend-trickery-a3073c934c77)\n-   [Image uploads with Laravel and FilePond](https://devdojo.com/episode/image-uploads-with-laravel-and-filepond)\n-   [Integrating FilePond with Ember](https://alexdiliberto.com/ember-filepond/)\n-   [FilePond launch day post-mortem](https://pqina.nl/blog/filepond-launch-day-post-mortem)\n-   [FilePond on ProductHunt](https://www.producthunt.com/posts/filepond-js)\n\n### Browser Compatibility\n\nFilePond is compatible with a wide range of desktop and mobile browsers, the oldest explicitly supported browser is IE11, for best cross browser support add [FilePond Polyfill](https://github.com/pqina/filepond-polyfill) and [Babel polyfill](https://babeljs.io/docs/en/babel-polyfill) to your project.\n\nFilePond uses [BrowserStack](https://www.browserstack.com/) for compatibility testing.\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/browserstack-logo.svg\" height=\"32\" alt=\"BrowserStack\"/>](https://www.browserstack.com/)\n\n## License\n\n**Please don't remove or change the disclaimers in the source files**\n\nMIT License\n\nCopyright (c) 2020 PQINA | [Rik Schennink](mailto:rik@pqina.nl)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"939A:1F1FB6:17DF3B:5E4990:6AB92C8D"},"text_sha256":"db069e8574483e0f2078ed214f1ee40ed8db8efc6b68ec02ece81eaa2ae91a20"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fengyuanchen/cropperjs","input_row":{"repository":"fengyuanchen/cropperjs","url":"https://github.com/fengyuanchen/cropperjs","name":"cropperjs","owner":"fengyuanchen","description":"JavaScript image cropper.","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":13903,"issues":1061,"created_at":"2015-09-25T10:57:53Z","updated_at":"2026-09-27T13:57:37Z","first_commit_at":"2015-09-18T03:25:07Z","last_commit_at":"2026-09-11T13:18:42Z","activity_months":131.78,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:43.516Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fengyuanchen/cropperjs","visibility":"public","created_at":"2015-09-25T10:57:53Z","updated_at":"2026-09-27T13:57:37Z","private":false,"fork":false,"archived":false,"stargazers_count":13903,"open_issues_count":41,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1823","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D4:73962:17E6044:1C0C5B4:6AB92C8F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1822","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0916:70FF5:17E474A:1C0B045:6AB92C8F"},"commit":{"sha":"1b1a0c006518230409f594772beffc9d9b35f9b3","url":"https://github.com/fengyuanchen/cropperjs/commit/1b1a0c006518230409f594772beffc9d9b35f9b3","date":"2018-05-20T08:04:06Z","author_date":"2018-05-20T08:04:06Z","committer_date":"2018-05-20T08:04:06Z","tree_sha":"ef243efaba32fabb743001e9841a06686319eaf5","message_first_line":"build: release 1.3.6"},"tree_request_status":200,"tree_rate":{"github_remaining":"1821","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0923:62B94:17CFDCA:1BF68AD:6AB92C90"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":29063,"blob_sha":"5845afad87fe56460c30cc924c0750421a3df122","priority":0}],"documents":[{"path":"README.md","size":29063,"blob_sha":"5845afad87fe56460c30cc924c0750421a3df122","priority":0,"status":200,"text":"# Cropper.js\n\n[![Build Status](https://travis-ci.org/fengyuanchen/cropperjs.svg)](https://travis-ci.org/fengyuanchen/cropperjs) [![Downloads](https://img.shields.io/npm/dm/cropperjs.svg)](https://www.npmjs.com/package/cropperjs) [![Version](https://img.shields.io/npm/v/cropperjs.svg)](https://www.npmjs.com/package/cropperjs)\n\n> JavaScript image cropper.\n\n- [Website](https://fengyuanchen.github.io/cropperjs)\n- [Photo Editor](https://fengyuanchen.github.io/photo-editor) - An advanced example of Cropper.js.\n- [jquery-cropper](https://github.com/fengyuanchen/jquery-cropper) - A jQuery plugin wrapper for Cropper.js.\n\n## Table of contents\n\n- [Features](#features)\n- [Main](#main)\n- [Getting started](#getting-started)\n- [Options](#options)\n- [Methods](#methods)\n- [Events](#events)\n- [No conflict](#no-conflict)\n- [Browser support](#browser-support)\n- [Contributing](#contributing)\n- [Versioning](#versioning)\n- [License](#license)\n\n## Features\n\n- Supports 38 [options](#options)\n- Supports 27 [methods](#methods)\n- Supports 6 [events](#events)\n- Supports touch (mobile)\n- Supports zooming\n- Supports rotating\n- Supports scaling (flipping)\n- Supports multiple croppers\n- Supports to crop on a canvas\n- Supports to crop image in the browser-side by canvas\n- Supports to translate Exif Orientation information\n- Cross-browser support\n\n## Main\n\n```text\ndist/\n├── cropper.css\n├── cropper.min.css   (compressed)\n├── cropper.js        (UMD)\n├── cropper.min.js    (UMD, compressed)\n├── cropper.common.js (CommonJS, default)\n└── cropper.esm.js    (ES Module)\n```\n\n## Getting started\n\n### Installation\n\n```shell\nnpm install cropperjs\n```\n\nInclude files:\n\n```html\n<link  href=\"/path/to/cropper.css\" rel=\"stylesheet\">\n<script src=\"/path/to/cropper.js\"><\/script>\n```\n\nThe [cdnjs](https://github.com/cdnjs/cdnjs) provides CDN support for Cropper.js's CSS and JavaScript. You can find the links [here](https://cdnjs.com/libraries/cropperjs).\n\n### Usage\n\n#### Syntax\n\n```js\nnew Cropper(element[, options])\n```\n\n- **element**\n  - Type: `HTMLImageElement` or `HTMLCanvasElement`\n  - The target image or canvas element for cropping.\n\n- **options** (optional)\n  - Type: `Object`\n  - The options for cropping. Check out the available [options](#options).\n\n#### Example\n\n```html\n<!-- Wrap the image or canvas element with a block element (container) -->\n<div>\n  <img id=\"image\" src=\"picture.jpg\">\n<\/div>\n```\n\n```css\n/* Limit image width to avoid overflow the container */\nimg {\n  max-width: 100%; /* This rule is very important, please do not ignore this! */\n}\n```\n\n```js\nvar image = document.getElementById('image');\nvar cropper = new Cropper(image, {\n  aspectRatio: 16 / 9,\n  crop: function(event) {\n    console.log(event.detail.x);\n    console.log(event.detail.y);\n    console.log(event.detail.width);\n    console.log(event.detail.height);\n    console.log(event.detail.rotate);\n    console.log(event.detail.scaleX);\n    console.log(event.detail.scaleY);\n  }\n});\n```\n\n#### FAQ\n\nHow to crop a new area after zoom in or zoom out?\n\n> Just double click your mouse to enter crop mode.\n\nHow to move the image after crop an area?\n\n> Just double click your mouse to enter move mode.\n\nHow to fix aspect ratio in free ratio mode?\n\n> Just hold the `shift` key when you resize the crop box.\n\nHow to crop a square area in free ratio mode?\n\n> Just hold the `shift` key when you crop on the image.\n\n#### Notes\n\n- The size of the cropper inherits from the size of the image's parent element (wrapper), so be sure to wrap the image with a **visible block element**.\n  > If you are using cropper in a modal, you should initialize the cropper after the modal shown completely. Otherwise, you will not get a correct cropper.\n\n- The outputted cropped data bases on the original image size, so you can use them to crop the image directly.\n\n- If you try to start cropper on a cross-origin image, please make sure that your browser supports HTML5 [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes), and your image server supports the `Access-Control-Allow-Origin` option (see the [HTTP access control (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)).\n\n#### Known issues\n\n- [Known iOS resource limits](https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html): As iOS devices limit memory, the browser may crash when you are cropping a large image (iPhone camera resolution). To avoid this, you may resize the image first (preferably below 1024 pixels) before start a cropper.\n\n- Known image size increase: When export the cropped image on browser-side with the `HTMLCanvasElement.toDataURL` method, the size of the exported image may be greater than the original image's. This is because the type of the exported image is not the same as the original image's. So just pass the type the original image's as the first parameter to `toDataURL` to fix this. For example, if the original type is JPEG, then use `cropper.getCroppedCanvas().toDataURL('image/jpeg')` to export image.\n\n[⬆ back to top](#table-of-contents)\n\n## Options\n\nYou may set cropper options with `new Cropper(image, options)`.\nIf you want to change the global default options, You may use `Cropper.setDefaults(options)`.\n\n### viewMode\n\n- Type: `Number`\n- Default: `0`\n- Options:\n  - `0`: no restrictions\n  - `1`: restrict the crop box to not exceed the size of the canvas.\n  - `2`: restrict the minimum canvas size to fit within the container. If the proportions of the the canvas and the container differ, the minimum canvas will be surrounded by extra space in one of the dimensions.\n  - `3`: restrict the minimum canvas size to fill fit the container. If the proportions of the canvas and the container are different, the container will not be able to fit the whole canvas in one of the dimensions.\n\nDefine the view mode of the cropper. If you set `viewMode` to `0`, the crop box can extend outside the canvas, while a value of `1`, `2` or `3` will restrict the crop box to the size of the canvas. A `viewMode` of `2` or `3` will additionally restrict the canvas to the container. Note that if the proportions of the canvas and the container are the same, there is no difference between `2` and `3`.\n\n### dragMode\n\n- Type: `String`\n- Default: `'crop'`\n- Options:\n  - `'crop'`: create a new crop box\n  - `'move'`: move the canvas\n  - `'none'`: do nothing\n\nDefine the dragging mode of the cropper.\n\n### aspectRatio\n\n- Type: `Number`\n- Default: `NaN`\n\nSet the aspect ratio of the crop box. By default, the crop box is free ratio.\n\n### data\n\n- Type: `Object`\n- Default: `null`\n\nThe previous cropped data if you had stored, will be passed to `setData` method automatically when initialized. Only available when the `autoCrop` option is set to `true`.\n\n### preview\n\n- Type: `Element`, `Array` (elements), `NodeList` or `String` (selector)\n- Default: `''`\n- An element or an array of elements or a node list object or a valid selector for [Document.querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)\n\nAdd extra elements (containers) for previewing.\n\n**Notes:**\n\n- The maximum width is the initial width of preview container.\n- The maximum height is the initial height of preview container.\n- If you set an `aspectRatio` option, be sure to set the same aspect ratio to the preview container.\n- If preview is not getting properly displayed, set `overflow: hidden` style to the preview container.\n\n### responsive\n\n- Type: `Boolean`\n- Default: `true`\n\nRe-render the cropper when resize the window.\n\n### restore\n\n- Type: `Boolean`\n- Default: `true`\n\nRestore the cropped area after resize the window.\n\n### checkCrossOrigin\n\n- Type: `Boolean`\n- Default: `true`\n\nCheck if the current image is a cross-origin image.\n\nIf it is, when clone the image, a `crossOrigin` attribute will be added to the cloned image element and a timestamp will be added to the `src` attribute to reload the source image to avoid browser cache error.\n\nBy adding `crossOrigin` attribute to image will stop adding timestamp to image url and stop reload of image, but the request (XMLHttpRequest) to read the image data for orientation checking will require a timestamp now.\n\nIf the value of the image's `crossOrigin` attribute is `\"use-credentials\"`, then the `withCredentials` attribute will set to `true` when read the image data by XMLHttpRequest.\n\n### checkOrientation\n\n- Type: `Boolean`\n- Default: `true`\n\nCheck the current image's Exif Orientation information.\n\nMore exactly, read the Orientation value for rotating or flipping the image, and then override the Orientation value with `1` (the default value) to avoid some issues ([1](https://github.com/fengyuanchen/cropper/issues/120), [2](https://github.com/fengyuanchen/cropper/issues/509)) on iOS devices.\n\nRequires to set both the `rotatable` and `scalable` options to `true` at the same time.\n\n**Note:** Don't trust this all the time as some JPG images have incorrect (not standard) Orientation values.\n\n> Requires [Typed Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) support ([IE 10+](http://caniuse.com/typedarrays)).\n\n### modal\n\n- Type: `Boolean`\n- Default: `true`\n\nShow the black modal above the image and under the crop box.\n\n### guides\n\n- Type: `Boolean`\n- Default: `true`\n\nShow the dashed lines above the crop box.\n\n### center\n\n- Type: `Boolean`\n- Default: `true`\n\nShow the center indicator above the crop box.\n\n### highlight\n\n- Type: `Boolean`\n- Default: `true`\n\nShow the white modal above the crop box (highlight the crop box).\n\n### background\n\n- Type: `Boolean`\n- Default: `true`\n\nShow the grid background of the container.\n\n### autoCrop\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to crop the image automatically when initialized.\n\n### autoCropArea\n\n- Type: `Number`\n- Default: `0.8` (80% of the image)\n\nA number between 0 and 1. Define the automatic cropping area size (percentage).\n\n### movable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to move the image.\n\n### rotatable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to rotate the image.\n\n### scalable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to scale the image.\n\n### zoomable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to zoom the image.\n\n### zoomOnTouch\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to zoom the image by dragging touch.\n\n### zoomOnWheel\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to zoom the image by wheeling mouse.\n\n### wheelZoomRatio\n\n- Type: `Number`\n- Default: `0.1`\n\nDefine zoom ratio when zoom the image by wheeling mouse.\n\n### cropBoxMovable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to move the crop box by dragging.\n\n### cropBoxResizable\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to resize the crop box by dragging.\n\n### toggleDragModeOnDblclick\n\n- Type: `Boolean`\n- Default: `true`\n\nEnable to toggle drag mode between \"crop\" and \"move\" when click twice on the cropper.\n\n### minContainerWidth\n\n- Type: `Number`\n- Default: `200`\n\nThe minimum width of the container.\n\n### minContainerHeight\n\n- Type: `Number`\n- Default: `100`\n\nThe minimum height of the container.\n\n### minCanvasWidth\n\n- Type: `Number`\n- Default: `0`\n\nThe minimum width of the canvas (image wrapper).\n\n### minCanvasHeight\n\n- Type: `Number`\n- Default: `0`\n\nThe minimum height of the canvas (image wrapper).\n\n### minCropBoxWidth\n\n- Type: `Number`\n- Default: `0`\n\nThe minimum width of the crop box.\n\n**Note:** This size is relative to the page, not the image.\n\n### minCropBoxHeight\n\n- Type: `Number`\n- Default: `0`\n\nThe minimum height of the crop box.\n\n**Note:** This size is relative to the page, not the image.\n\n### ready\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"ready\" event.\n\n### cropstart\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"cropstart\" event.\n\n### cropmove\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"cropmove\" event.\n\n### cropend\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"cropend\" event.\n\n### crop\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"crop\" event.\n\n### zoom\n\n- Type: `Function`\n- Default: `null`\n\nA shortcut of the \"zoom\" event.\n\n[⬆ back to top](#table-of-contents)\n\n## Methods\n\nAs there is an **asynchronous** process when load the image, you **should call most of the methods after ready**, except \"setAspectRatio\", \"replace\" and \"destroy\".\n\n> If a method doesn't need to return any value, it will return the cropper instance (`this`) for chain composition.\n\n```js\nnew Cropper(image, {\n  ready: function () {\n    // this.cropper[method](argument1, , argument2, ..., argumentN);\n    this.cropper.move(1, -1);\n\n    // Allows chain composition\n    this.cropper.move(1, -1).rotate(45).scale(1, -1);\n  }\n});\n```\n\n### crop()\n\nShow the crop box manually.\n\n```js\nnew Cropper(image, {\n  autoCrop: false,\n\n  ready: function () {\n    // Do something here\n    // ...\n\n    // And then\n    this.cropper.crop();\n  }\n});\n```\n\n### reset()\n\nReset the image and crop box to their initial states.\n\n### clear()\n\nClear the crop box.\n\n### replace(url[, hasSameSize])\n\n- **url**:\n  - Type: `String`\n  - A new image url.\n\n- **hasSameSize** (optional):\n  - Type: `Boolean`\n  - Default: `false`\n  - If the new image has the same size with the old one, then it will not rebuilt the cropper and only update the urls of all related images. This can be used for applying filters.\n\nReplace the image's src and rebuild the cropper.\n\n### enable()\n\nEnable (unfreeze) the cropper.\n\n### disable()\n\nDisable (freeze) the cropper.\n\n### destroy()\n\nDestroy the cropper and remove the instance from the image.\n\n### move(offsetX[, offsetY])\n\n- **offsetX**:\n  - Type: `Number`\n  - Moving size (px) in the horizontal direction.\n\n- **offsetY** (optional):\n  - Type: `Number`\n  - Moving size (px) in the vertical direction.\n  - If not present, its default value is `offsetX`.\n\nMove the canvas (image wrapper) with relative offsets.\n\n```js\ncropper.move(1);\ncropper.move(1, 0);\ncropper.move(0, -1);\n```\n\n### moveTo(x[, y])\n\n- **x**:\n  - Type: `Number`\n  - The `left` value of the canvas\n\n- **y** (optional):\n  - Type: `Number`\n  - The `top` value of the canvas\n  - If not present, its default value is `x`.\n\nMove the canvas (image wrapper) to an absolute point.\n\n### zoom(ratio)\n\n- **ratio**:\n  - Type: `Number`\n  - Zoom in: requires a positive number (ratio > 0)\n  - Zoom out: requires a negative number (ratio < 0)\n\nZoom the canvas (image wrapper) with a relative ratio.\n\n```js\ncropper.zoom(0.1);\ncropper.zoom(-0.1);\n```\n\n### zoomTo(ratio[, pivot])\n\n- **ratio**:\n  - Type: `Number`\n  - Requires a positive number (ratio > 0)\n\n- **pivot** (optional):\n  - Type: `Object`\n  - Schema: `{ x: Number, y: Number }`\n  - The coordinate of the center point for zooming, base on the top left corner of the cropper container.\n\nZoom the canvas (image wrapper) to an absolute ratio.\n\n```js\ncropper.zoomTo(1); // 1:1 (canvasData.width === canvasData.naturalWidth)\n\nconst containerData = cropper.getContainerData();\n\n// Zoom to 50% from the center of the container.\ncropper.zoomTo(.5, {\n  x: containerData.width / 2,\n  y: containerData.height / 2,\n});\n```\n\n### rotate(degree)\n\n- **degree**:\n  - Type: `Number`\n  - Rotate right: requires a positive number (degree > 0)\n  - Rotate left: requires a negative number (degree < 0)\n\nRotate the image with a relative degree.\n\n> Requires [CSS3 2D Transforms](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) support ([IE 9+](http://caniuse.com/transforms2d)).\n\n```js\ncropper.rotate(90);\ncropper.rotate(-90);\n```\n\n### rotateTo(degree)\n\n- **degree**:\n  - Type: `Number`\n\nRotate the image to an absolute degree.\n\n### scale(scaleX[, scaleY])\n\n- **scaleX**:\n  - Type: `Number`\n  - Default: `1`\n  - The scaling factor to apply on the abscissa of the image.\n  - When equal to `1` it does nothing.\n\n- **scaleY** (optional):\n  - Type: `Number`\n  - The scaling factor to apply on the ordinate of the image.\n  - If not present, its default value is `scaleX`.\n\nScale the image.\n\n> Requires [CSS3 2D Transforms](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) support ([IE 9+](http://caniuse.com/transforms2d)).\n\n```js\ncropper.scale(-1); // Flip both horizontal and vertical\ncropper.scale(-1, 1); // Flip horizontal\ncropper.scale(1, -1); // Flip vertical\n```\n\n### scaleX(scaleX)\n\n- **scaleX**:\n  - Type: `Number`\n  - Default: `1`\n  - The scaling factor to apply on the abscissa of the image.\n  - When equal to `1` it does nothing.\n\nScale the abscissa of the image.\n\n### scaleY(scaleY)\n\n- **scaleY**:\n  - Type: `Number`\n  - Default: `1`\n  - The scaling factor to apply on the ordinate of the image.\n  - When equal to `1` it does nothing.\n\nScale the ordinate of the image.\n\n### getData([rounded])\n\n- **rounded** (optional):\n  - Type: `Boolean`\n  - Default: `false`\n  - Set `true` to get rounded values.\n\n- (return value):\n  - Type: `Object`\n  - Properties:\n    - `x`: the offset left of the cropped area\n    - `y`: the offset top of the cropped area\n    - `width`: the width of the cropped area\n    - `height`: the height of the cropped area\n    - `rotate`: the rotated degrees of the image\n    - `scaleX`: the scaling factor to apply on the abscissa of the image\n    - `scaleY`: the scaling factor to apply on the ordinate of the image\n\nOutput the final cropped area position and size data (base on the natural size of the original image).\n\n> You can send the data to server-side to crop the image directly:\n> 1. Rotate the image with the `rotate` property.\n> 1. Scale the image with the `scaleX` and `scaleY` properties.\n> 1. Crop the image with the `x`, `y`, `width` and `height` properties.\n\n![A schematic diagram for data's properties](docs/images/data.jpg)\n\n### setData(data)\n\n- **data**:\n  - Type: `Object`\n  - Properties: See the [`getData`](#getdatarounded) method.\n  - You may need to round the data properties before passing them in.\n\nChange the cropped area position and size with new data (base on the original image).\n\n> **Note:** This method only available when the value of the `viewMode` option is greater than or equal to `1`.\n\n### getContainerData()\n\n- (return  value):\n  - Type: `Object`\n  - Properties:\n    - `width`: the current width of the container\n    - `height`: the current height of the container\n\nOutput the container size data.\n\n![A schematic diagram for cropper's layers](docs/images/layers.jpg)\n\n### getImageData()\n\n- (return  value):\n  - Type: `Object`\n  - Properties:\n    - `left`: the offset left of the image\n    - `top`: the offset top of the image\n    - `width`: the width of the image\n    - `height`: the height of the image\n    - `naturalWidth`: the natural width of the image\n    - `naturalHeight`: the natural height of the image\n    - `aspectRatio`: the aspect ratio of the image\n    - `rotate`: the rotated degrees of the image if rotated\n    - `scaleX`: the scaling factor to apply on the abscissa of the image if scaled\n    - `scaleY`: the scaling factor to apply on the ordinate of the image if scaled\n\nOutput the image position, size and other related data.\n\n### getCanvasData()\n\n- (return  value):\n  - Type: `Object`\n  - Properties:\n    - `left`: the offset left of the canvas\n    - `top`: the offset top of the canvas\n    - `width`: the width of the canvas\n    - `height`: the height of the canvas\n    - `naturalWidth`: the natural width of the canvas (read only)\n    - `naturalHeight`: the natural height of the canvas (read only)\n\nOutput the canvas (image wrapper) position and size data.\n\n```js\nvar imageData = cropper.getImageData();\nvar canvasData = cropper.getCanvasData();\n\nif (imageData.rotate % 180 === 0) {\n  console.log(canvasData.naturalWidth === imageData.naturalWidth); // true\n}\n```\n\n### setCanvasData(data)\n\n- **data**:\n  - Type: `Object`\n  - Properties:\n    - `left`: the new offset left of the canvas\n    - `top`: the new offset top of the canvas\n    - `width`: the new width of the canvas\n    - `height`: the new height of the canvas\n\nChange the canvas (image wrapper) position and size with new data.\n\n### getCropBoxData()\n\n- (return  value):\n  - Type: `Object`\n  - Properties:\n    - `left`: the offset left of the crop box\n    - `top`: the offset top of the crop box\n    - `width`: the width of the crop box\n    - `height`: the height of the crop box\n\nOutput the crop box position and size data.\n\n### setCropBoxData(data)\n\n- **data**:\n  - Type: `Object`\n  - Properties:\n    - `left`: the new offset left of the crop box\n    - `top`: the new offset top of the crop box\n    - `width`: the new width of the crop box\n    - `height`: the new height of the crop box\n\nChange the crop box position and size with new data.\n\n### getCroppedCanvas([options])\n\n- **options** (optional):\n  - Type: `Object`\n  - Properties:\n    - `width`: the destination width of the output canvas.\n    - `height`: the destination height of the output canvas.\n    - `minWidth`: the minimum destination width of the output canvas, the default value is `0`.\n    - `minHeight`: the minimum destination height of the output canvas, the default value is `0`.\n    - `maxWidth`: the maximum destination width of the output canvas, the default value is `Infinity`.\n    - `maxHeight`: the maximum destination height of the output canvas, the default value is `Infinity`.\n    - `fillColor`: a color to fill any alpha values in the output canvas, the default value is `transparent`.\n    - [`imageSmoothingEnabled`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled): set to change if images are smoothed (`true`, default) or not (`false`).\n    - [`imageSmoothingQuality`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality): set the quality of image smoothing, one of \"low\" (default), \"medium\", or \"high\".\n\n- (return  value):\n  - Type: `HTMLCanvasElement`\n  - A canvas drawn the cropped image.\n\n- Notes:\n  - The aspect ratio of the output canvas will be fitted to aspect ratio of the crop box automatically.\n  - If you intend to get a JPEG image from the output canvas, you should set the `fillColor` option first, if not, the transparent part in the JPEG image will become black by default.\n\n- Browser support:\n  - Basic image: requires [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) support ([IE 9+](http://caniuse.com/canvas)).\n  - Rotated image: requires [CSS3 2D Transforms](https://developer.mozilla.org/en-US/docs/Web/CSS/transform) support ([IE 9+](http://caniuse.com/transforms2d)).\n  - Cross-origin image: requires HTML5 [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) support ([IE 11+](http://caniuse.com/cors)).\n\nGet a canvas drawn the cropped image. If it is not cropped, then returns a canvas drawn the whole image.\n\n> After then, you can display the canvas as an image directly, or use [HTMLCanvasElement.toDataURL](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL) to get a Data URL, or use [HTMLCanvasElement.toBlob](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob) to get a blob and upload it to server with [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) if the browser supports these APIs.\n\nAvoid to get a blank output image, you might need to set the `maxWidth` and `maxHeight` properties to limited numbers, because of [the size limits of a canvas element](https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element).\n\n```js\ncropper.getCroppedCanvas();\n\ncropper.getCroppedCanvas({\n  width: 160,\n  height: 90,\n  minWidth: 256,\n  minHeight: 256,\n  maxWidth: 4096,\n  maxHeight: 4096,\n  fillColor: '#fff',\n  imageSmoothingEnabled: false,\n  imageSmoothingQuality: 'high',\n});\n\n// Upload cropped image to server if the browser supports `HTMLCanvasElement.toBlob`\ncropper.getCroppedCanvas().toBlob(function (blob) {\n  var formData = new FormData();\n\n  formData.append('croppedImage', blob);\n\n  // Use `jQuery.ajax` method\n  $.ajax('/path/to/upload', {\n    method: \"POST\",\n    data: formData,\n    processData: false,\n    contentType: false,\n    success: function () {\n      console.log('Upload success');\n    },\n    error: function () {\n      console.log('Upload error');\n    }\n  });\n});\n```\n\n### setAspectRatio(aspectRatio)\n\n- **aspectRatio**:\n  - Type: `Number`\n  - Requires a positive number.\n\nChange the aspect ratio of the crop box.\n\n### setDragMode([mode])\n\n- **mode** (optional):\n  - Type: `String`\n  - Default: `'none'`\n  - Options: `'none'`, `'crop'`, `'move'`\n\nChange the drag mode.\n\n**Tips:** You can toggle the \"crop\" and \"move\" mode by double click on the cropper.\n\n[⬆ back to top](#table-of-contents)\n\n## Events\n\n### ready\n\nThis event fires when the target image has been loaded and the cropper instance is ready for operating.\n\n```js\nvar cropper;\n\nimage.addEventListener('ready', function () {\n  console.log(this.cropper === cropper);\n  // -> true\n});\n\ncropper = new Cropper(image);\n```\n\n### cropstart\n\n- **event.detail.originalEvent**:\n  - Type: `Event`\n  - Options: `mousedown`, `touchstart` and `pointerdown`\n\n- **event.detail.action**:\n  - Type: `String`\n  - Options:\n    - `'crop'`: create a new crop box\n    - `'move'`: move the canvas (image wrapper)\n    - `'zoom'`: zoom in / out the canvas (image wrapper) by touch.\n    - `'e'`: resize the east side of the crop box\n    - `'w'`: resize the west side of the crop box\n    - `'s'`: resize the south side of the crop box\n    - `'n'`: resize the north side of the crop box\n    - `'se'`: resize the southeast side of the crop box\n    - `'sw'`: resize the southwest side of the crop box\n    - `'ne'`: resize the northeast side of the crop box\n    - `'nw'`: resize the northwest side of the crop box\n    - `'all'`: move the crop box (all directions)\n\nThis event fires when the canvas (image wrapper) or the crop box starts to change.\n\n```js\nimage.addEventListener('cropstart', function (event) {\n  console.log(event.detail.originalEvent);\n  console.log(event.detail.action);\n});\n```\n\n### cropmove\n\n- **event.detail.originalEvent**:\n  - Type: `Event`\n  - Options: `mousemove`, `touchmove` and `pointermove`.\n\n- **event.detail.action**: the same as \"cropstart\".\n\nThis event fires when the canvas (image wrapper) or the crop box is changing.\n\n### cropend\n\n- **event.detail.originalEvent**:\n  - Type: `Event`\n  - Options: `mouseup`, `touchend`, `touchcancel`, `pointerup` and `pointercancel`.\n\n- **event.detail.action**: the same as \"cropstart\".\n\nThis event fires when the canvas (image wrapper) or the crop box stops to change.\n\n### crop\n\n- **event.detail.x**\n- **event.detail.y**\n- **event.detail.width**\n- **event.detail.height**\n- **event.detail.rotate**\n- **event.detail.scaleX**\n- **event.detail.scaleY**\n\n> About these properties, see the [`getData`](#getdatarounded) method.\n\nThis event fires when the canvas (image wrapper) or the crop box changed.\n\n**Notes:**\n\n- When the `autoCrop` option is set to `true`, a `crop` event will be triggered before the `ready` event.\n- When the `data` option is set, another `crop` event will be triggered before `ready` event.\n\n### zoom\n\n- **event.detail.originalEvent**:\n  - Type: `Event`\n  - Options: `wheel`, `touchmove`.\n\n- **event.detail.oldRatio**:\n  - Type: `Number`\n  - The old (current) ratio of the canvas\n\n- **event.detail.ratio**:\n  - Type: `Number`\n  - The new (next) ratio of the canvas (`canvasData.width / canvasData.naturalWidth`)\n\nThis event fires when a cropper instance starts to zoom in or zoom out its canvas (image wrapper).\n\n```js\nimage.addEventListener('zoom', function (event) {\n\n  // Zoom in\n  if (event.detail.ratio > event.detail.oldRatio) {\n    event.preventDefault(); // Prevent zoom in\n  }\n\n  // Zoom out\n  // ...\n});\n```\n\n[⬆ back to top](#table-of-contents)\n\n## No conflict\n\nIf you have to use other cropper with the same namespace, just call the `Cropper.noConflict` static method to revert to it.\n\n```html\n<script src=\"other-cropper.js\"><\/script>\n<script src=\"cropper.js\"><\/script>\n<script>\n  Cropper.noConflict();\n  // Code that uses other `Cropper` can follow here.\n<\/script>\n```\n\n## Browser support\n\n- Chrome (latest)\n- Firefox (latest)\n- Safari (latest)\n- Opera (latest)\n- Edge (latest)\n- Internet Explorer 9+\n\n## Contributing\n\nPlease read through our [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Versioning\n\nMaintained under the [Semantic Versioning guidelines](http://semver.org/).\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [Chen Fengyuan](http://chenfengyuan.com)\n\n## Related projects\n\n- [angular-cropperjs](https://github.com/matheusdavidson/angular-cropperjs) by @matheusdavidson\n- [ember-cropperjs](https://github.com/danielthall/ember-cropperjs) by @danielthall\n- [iron-cropper](https://github.com/safetychanger/iron-cropper) by @safetychanger\n- [react-cropper](https://github.com/roadmanfong/react-cropper) by @roadmanfong\n- [vue-cropperjs](https://github.com/Agontuk/vue-cropperjs) by @Agontuk\n\n[⬆ back to top](#table-of-contents)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F4DE:376DE:181884:5E84FF:6AB92C90"},"text_sha256":"a650ec889f94ca1cd2cd05a9e83202649d654f718dfe4562be3e5167f6fe9090"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1820","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A8:70FF5:17E4850:1C0B175:6AB92C91"},"commit":{"sha":"2a97f8cd19fb1c5306214f1430040d5da70fc1f5","url":"https://github.com/fengyuanchen/cropperjs/commit/2a97f8cd19fb1c5306214f1430040d5da70fc1f5","date":"2026-05-31T12:09:30Z","author_date":"2026-05-17T12:49:34Z","committer_date":"2026-05-31T12:09:30Z","tree_sha":"7bab60f4cbddb69047b362b44f06bbccdbb345be","message_first_line":"feat(cropper-image): add \"fill\", \"scale-down\", and \"none\" options to the `$center` method"},"tree_request_status":200,"tree_rate":{"github_remaining":"1819","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BF:6C9BF:181202B:1C38DF0:6AB92C91"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1807,"blob_sha":"90e4a6ebf00e2a20eb51dd08b4d6b27f7bcc150d","priority":0}],"documents":[{"path":"README.md","size":1807,"blob_sha":"90e4a6ebf00e2a20eb51dd08b4d6b27f7bcc150d","priority":0,"status":200,"text":"# Cropper.js\n\n[![Coverage Status](https://img.shields.io/codecov/c/github/fengyuanchen/cropperjs.svg)](https://codecov.io/gh/fengyuanchen/cropperjs) [![Downloads](https://img.shields.io/npm/dm/cropperjs.svg)](https://www.npmjs.com/package/cropperjs) [![Version](https://img.shields.io/npm/v/cropperjs.svg)](https://www.npmjs.com/package/cropperjs)\n\n> JavaScript image cropper. This is the branch for v2.x, for v1.x, check out the [`v1`](https://github.com/fengyuanchen/cropperjs/tree/v1) branch.\n\n- [Website](https://fengyuanchen.github.io/cropperjs/)\n\n## Versioning\n\nMaintained under the [Semantic Versioning guidelines](https://semver.org/).\n\n## Commit Message Guidelines\n\nGit commits message follows the [Conventional Commits guidelines](https://conventionalcommits.org/).\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com/)\n\n## Related projects\n\n- [angular-cropperjs](https://github.com/matheusdavidson/angular-cropperjs) by [@matheusdavidson](https://github.com/matheusdavidson)\n- [blazor-cropperjs](https://github.com/CropperBlazor/Cropper.Blazor) by [@ColdForeign](https://github.com/ColdForeign), [@MaxymGorn](https://github.com/MaxymGorn)\n- [cropperjs-react-wrapper](https://github.com/trigger-xyz/cropperjs-react-wrapper) by [@trigger_xyz](https://github.com/trigger-xyz) (compatible with v2)\n- [ember-cropperjs](https://github.com/danielthall/ember-cropperjs) by [@danielthall](https://github.com/danielthall)\n- [iron-cropper](https://github.com/safetychanger/iron-cropper) by [@safetychanger](https://github.com/safetychanger)\n- [react-cropper](https://github.com/react-cropper/react-cropper) by [@roadmanfong](https://github.com/roadmanfong)\n- [vue-cropperjs](https://github.com/Agontuk/vue-cropperjs) by [@Agontuk](https://github.com/Agontuk)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6DA8:35EBC:1793AB:5DFEF8:6AB92C92"},"text_sha256":"5f3253f61b216ef3f43b0186b214e6e645bf3883cb4b3e313f1d298fc5c08e61"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"libvips/libvips","input_row":{"repository":"libvips/libvips","url":"https://github.com/libvips/libvips","name":"libvips","owner":"libvips","description":"A fast image processing library with low memory needs.","language":"C","license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1","license_osi_approved":"true","stars":11680,"issues":2546,"created_at":"2011-01-25T13:15:00Z","updated_at":"2026-09-27T00:11:18Z","first_commit_at":"2007-08-29T16:23:50Z","last_commit_at":"2026-09-26T16:52:58Z","activity_months":228.91,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:46.604Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"libvips/libvips","visibility":"public","created_at":"2011-01-25T13:15:00Z","updated_at":"2026-09-27T00:11:18Z","private":false,"fork":false,"archived":false,"stargazers_count":11680,"open_issues_count":77,"license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1"},"error":"","rate":{"github_remaining":"1818","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A9:76AED:1805180:1C2C0FF:6AB92C92"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1817","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081E:35C5DA:17B658B:1BDC6FE:6AB92C93"},"commit":{"sha":"c349b31c5f211fdb2c16c3c173e522ef6b66f7e6","url":"https://github.com/libvips/libvips/commit/c349b31c5f211fdb2c16c3c173e522ef6b66f7e6","date":"2018-05-18T16:40:29Z","author_date":"2018-05-18T16:40:29Z","committer_date":"2018-05-18T16:40:29Z","tree_sha":"c231c125c02a02b38c97d94e99e78a3096ce13b8","message_first_line":"magicksave polishing"},"tree_request_status":200,"tree_rate":{"github_remaining":"1816","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B4:78367:1820F5A:1C478EF:6AB92C93"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9279,"blob_sha":"a586fa75a7d8a48725d8545b5ee4e9dbeb83ad8c","priority":0}],"documents":[{"path":"README.md","size":9279,"blob_sha":"a586fa75a7d8a48725d8545b5ee4e9dbeb83ad8c","priority":0,"status":200,"text":"# libvips : an image processing library\n\n[![Build Status](https://travis-ci.org/jcupitt/libvips.svg?branch=master)](https://travis-ci.org/jcupitt/libvips)\n[![Coverity Status](https://scan.coverity.com/projects/6503/badge.svg)](https://scan.coverity.com/projects/jcupitt-libvips)\n\nlibvips is a 2D image processing library. Compared to\nsimilar libraries, [libvips runs quickly and uses little\nmemory](https://github.com/jcupitt/libvips/wiki/Speed-and-memory-use).\nlibvips is licensed under the LGPL 2.1+.\n\nIt has around 300 operations covering arithmetic, histograms,\nconvolutions, morphological operations, frequency filtering, colour,\nresampling, statistics and others. It supports a large range of numeric\nformats, from 8-bit int to 128-bit complex. It supports a good range of\nimage formats, including JPEG, TIFF, PNG, WebP, FITS, Matlab, OpenEXR,\nPDF, SVG, HDR, PPM, CSV, GIF, Analyze, DeepZoom, and OpenSlide.  It can\nalso load images via ImageMagick or GraphicsMagick.\n\nIt has APIs for\n[C](http://jcupitt.github.io/libvips/API/current/using-from-c.html)\nand\n[C++](http://jcupitt.github.io/libvips/API/current/using-from-cpp.html)\nand a [command-line\ninterface](http://jcupitt.github.io/libvips/API/current/using-cli.html).\nBindings are available for \n[Python](https://pypi.python.org/pypi/pyvips),\n[Ruby](https://rubygems.org/gems/ruby-vips),\n[PHP](https://github.com/jcupitt/php-vips),\n[Go](https://github.com/davidbyttow/govips),\n[Lua](https://github.com/jcupitt/lua-vips),\nJavaScript and others. There is full\n[documentation](http://jcupitt.github.io/libvips/API/current).\nThere are several GUIs as well, see the [VIPS\nwebsite](http://jcupitt.github.io/libvips).\n\nThere are packages for most unix-like operating systems and binaries for\nWindows and OS X.\n\n# Building libvips from a source tarball\n\nWe keep pre-baked tarballs of releases on the vips website:\n\nhttps://github.com/jcupitt/libvips/releases\n\nUntar, then in the libvips directory you should just be able to do:\n\n\t$ ./configure\n\nCheck the summary at the end of `configure` carefully. \nlibvips must have `build-essential`, `pkg-config`, `glib2.0-dev`,\n`libexpat1-dev`.\n\nFor the vips8 Python binding, you must also have \n`gobject-introspection`, `python-gi-dev`, and `libgirepository1.0-dev`.\n\nYou'll need the dev packages for the file format support you\nwant. For basic jpeg and tiff support, you'll need `libtiff5-dev`,\n`libjpeg-turbo8-dev`, and `libgsf-1-dev`.  See the **Dependencies** section\nbelow for a full list of the things that libvips can be configured to use.\n\nOnce `configure` is looking OK, compile and install with the usual:\n\n\t$ make\n\t$ sudo make install\n\nBy default this will install files to `/usr/local`.\n\nWe have detailed guides on the wiki for [building on\nWindows](https://github.com/jcupitt/libvips/wiki/Build-for-Windows)\nand [building on OS\nX](https://github.com/jcupitt/libvips/wiki/Build-for-macOS).\n\n# Building libvips from git\n\nCheckout the latest sources with:\n\n\t$ git clone git://github.com/jcupitt/libvips.git\n\nBuilding from git needs more packages, you'll need at least `swig`, `gtk-doc` \nand `gobject-introspection`, see the dependencies section below. For example:\n\n\t$ brew install gtk-doc swig\n\nThen build the build system with:\n\n\t$ ./autogen.sh\n\nDebug build:\n\n\t$ CFLAGS=\"-g -Wall\" CXXFLAGS=\"-g -Wall\" \\\n\t\t./configure --prefix=/home/john/vips --enable-debug\n\t$ make\n\t$ make install\n\nLeak check:\n\n\t$ export G_DEBUG=gc-friendly\n\t$ valgrind --suppressions=libvips.supp \\\n\t\t--leak-check=yes \\\n\t\tvips ... > vips-vg.log 2>&1\n\nMemory error debug:\n\n\t$ valgrind --vgdb=yes --vgdb-error=0 vips  ...\n\nvalgrind threading check:\n\n\t$ valgrind --tool=helgrind vips ... > vips-vg.log 2>&1\n\nClang build:\n\n\t$ CC=clang CXX=clang++ ./configure --prefix=/home/john/vips\n\nClang static analysis:\n\n\t$ scan-build ./configure --disable-introspection --disable-debug\n\t$ scan-build -o scan -v make \n\t$ scan-view scan/2013-11-22-2\n\nClang dynamic analysis:\n\n\t$ FLAGS=\"-O1 -g -fsanitize=address\"\n\t$ FLAGS=\"$FLAGS -fno-omit-frame-pointer -fno-optimize-sibling-calls\"\n\t$ CC=clang CXX=clang++ LD=clang \\\n\t\tCFLAGS=\"$FLAGS\" CXXFLAGS=\"$FLAGS\" LDFLAGS=-fsanitize=address \\\n\t\t./configure --prefix=/home/john/vips \n\n\t$ FLAGS=\"-O1 -g -fsanitize=thread\"\n\t$ FLAGS=\"$FLAGS -fPIC\"\n\t$ FLAGS=\"$FLAGS -fno-omit-frame-pointer -fno-optimize-sibling-calls\"\n\t$ CC=clang CXX=clang++ LD=clang \\\n\t\tCFLAGS=\"$FLAGS\" CXXFLAGS=\"$FLAGS\" \\\n\t\tLDFLAGS=\"-fsanitize=thread -fPIC\" \\\n\t\t./configure --prefix=/home/john/vips \\\n\t\t\t--without-magick \\\n\t\t\t--disable-introspection\n\t$ G_DEBUG=gc-friendly vips copy ~/pics/k2.jpg x.jpg >& log\n\nBuild with the GCC auto-vectorizer and diagnostics (or just -O3):\n\n\t$ FLAGS=\"-O2 -march=native -ffast-math\"\n\t$ FLAGS=\"$FLAGS -ftree-vectorize -fdump-tree-vect-details\"\n\t$ CFLAGS=\"$FLAGS\" CXXFLAGS=\"$FLAGS\" \\\n\t\t./configure --prefix=/home/john/vips \n\nStatic analysis with:\n\n\t$ cppcheck --force --enable=style . &> cppcheck.log\n\n# Dependencies \n\nlibvips has to have `glib2.0-dev`. Other dependencies are optional, see below.\n\n# Optional dependencies\n\nIf suitable versions are found, libvips will add support for the following\nlibraries automatically. See `./configure --help` for a set of flags to\ncontrol library detection. Packages are generally found with `pkg-config`,\nso make sure that is working.\n\nlibtiff, giflib and libjpeg do not usually use `pkg-config` so libvips looks for\nthem in the default path and in `$prefix`. If you have installed your own\nversions of these libraries in a different location, libvips will not see\nthem. Use switches to libvips configure like:\n\n\t./configure --prefix=/Users/john/vips \\\n\t\t--with-giflib-includes=/opt/local/include \\\n\t\t--with-giflib-libraries=/opt/local/lib \\\n\t\t--with-tiff-includes=/opt/local/include \\\n\t\t--with-tiff-libraries=/opt/local/lib \\\n\t\t--with-jpeg-includes=/opt/local/include \\\n\t\t--with-jpeg-libraries=/opt/local/lib\n\nor perhaps:\n\n\tCFLAGS=\"-g -Wall -I/opt/local/include -L/opt/local/lib\" \\\n\t\tCXXFLAGS=\"-g -Wall -I/opt/local/include -L/opt/local/lib\" \\\n\t\t./configure --without-python --prefix=/Users/john/vips \n\nto get libvips to see your builds.\n\n### vips8 Python binding\n\nIf `gobject-introspection`, `python-gi-dev`, and `libgirepository1.0-dev` are\navailable, libvips will install the vips8 Python binding. \n\n### libjpeg\n\nThe IJG JPEG library. Use the `-turbo` version if you can. \n\n### libexif\n\nIf available, libvips adds support for EXIF metadata in JPEG files.\n\n### giflib\n\nThe standard gif loader. If this is not present, vips will try to load gifs\nvia imagemagick instead.\n\n### librsvg\n\nThe usual SVG loader. If this is not present, vips will try to load SVGs\nvia imagemagick instead.\n\n### PDFium\n\nIf present, libvips will attempt to load PDFs via PDFium. This library must be\npackaged by https://github.com/jcupitt/docker-builds/tree/master/pdfium\n\nIf PDFium is not detected, libvips will look for poppler-glib instead.\n\n### libpoppler\n\nThe usual PDF loader. If this is not present, vips will try to load PDFs\nvia imagemagick.\n\n### libgsf-1\n\nIf available, libvips adds support for creating image pyramids with `dzsave`. \n\n### libtiff\n\nThe TIFF library. It needs to be built with support for JPEG and\nZIP compression. 3.4b037 and later are known to be OK. \n\n### fftw3\n\nIf libvips finds this library, it uses it for fourier transforms. \n\n### lcms2, lcms\n\nIf present, `vips_icc_import()`, `vips_icc_export()` and `vips_icc_transform()`\nare available for transforming images with ICC profiles. If `lcms2` is \navailable it is used in preference to `lcms`, since it is faster.\n\n### Large files\n\nlibvips uses the standard autoconf tests to work out how to support\nlarge files (>2GB) on your system. Any reasonably recent unix should\nbe OK.\n\n### libpng\n\nIf present, libvips can load and save png files. \n\n### ImageMagick, or optionally GraphicsMagick\n\nIf available, libvips adds support for loading all libMagick-supported\nimage file types. Use `--with-magickpackage=GraphicsMagick` to build against \ngraphicsmagick instead.\n\nImagemagick 6.9+ needs to have been built with `--with-modules`. Most packaged\nIMs are, I think, but if you are rolling your own, you'll need to pass\nthis flag to configure. \n\nIf you are going to be using libvips with untrusted images, perhaps in a\nweb-server, for example, you should consider the security implications of\nusing a package with such a large attack surface. You might prefer not to\nenable Magick support. \n\n### pangoft2\n\nIf available, libvips adds support for text rendering. You need the\npackage pangoft2 in `pkg-config --list-all`.\n\n### orc-0.4\n\nIf available, vips will accelerate some operations with this run-time\ncompiler.\n\n### matio\n\nIf available, vips can load images from Matlab save files.\n\n### cfitsio\n\nIf available, vips can load FITS images.\n\n### libwebp\n\nIf available, vips can load and save WebP images.\n\n### OpenEXR\n\nIf available, libvips will directly read (but not write, sadly)\nOpenEXR images.\n\n### OpenSlide\n\nIf available, libvips can load OpenSlide-supported virtual slide\nfiles: Aperio, Hamamatsu, Leica, MIRAX, Sakura, Trestle, and Ventana.\n\n### swig, python, python-dev\n\nIf available, we build the vips7 python binding.\n\n# Disclaimer\n\nNo guarantees of performance accompany this software, nor is any\nresponsibility assumed on the part of the authors. Please read the licence\nagreement.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CB4:7A4F8:183957:5EA55E:6AB92C93"},"text_sha256":"32658e4f894c24caf338af6eb3cd8d4f313f9b1d6173972dff9c132b04e63b07"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1815","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:17F8FF1:1C1FE02:6AB92C94"},"commit":{"sha":"f8be485a187e1bb64902194bed288adfaa22766f","url":"https://github.com/libvips/libvips/commit/f8be485a187e1bb64902194bed288adfaa22766f","date":"2026-06-29T08:24:08Z","author_date":"2026-06-29T08:24:08Z","committer_date":"2026-06-29T08:24:08Z","tree_sha":"24389f2a4148f6901677508ad35d249c0b59ac75","message_first_line":"enumtypes: drop `G_GNUC_CONST` (#5109)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1814","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17DB2C7:1C01C61:6AB92C94"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10052,"blob_sha":"ca8b2fc23ff027eebd5ac7187bcfa17ea238b197","priority":0}],"documents":[{"path":"README.md","size":10052,"blob_sha":"ca8b2fc23ff027eebd5ac7187bcfa17ea238b197","priority":0,"status":200,"text":"# libvips: an image processing library\n\n[![CI](https://github.com/libvips/libvips/workflows/CI/badge.svg)](https://github.com/libvips/libvips/actions)\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libvips.svg)](https://issues.oss-fuzz.com/issues?q=is:open%20project:libvips)\n[![Gitter](https://badges.gitter.im/libvips/devchat.svg)](https://gitter.im/libvips/devchat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n# Introduction\n\nlibvips is a [demand-driven, horizontally\nthreaded](https://github.com/libvips/libvips/wiki/Why-is-libvips-quick)\nimage processing library. Compared to similar\nlibraries, [libvips runs quickly and uses little\nmemory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).\nlibvips is licensed under the [LGPL-2.1-or-later](\nhttps://spdx.org/licenses/LGPL-2.1-or-later).\n\nIt has around [300\noperations](https://www.libvips.org/API/current/function-list.html)\ncovering arithmetic, histograms, convolution, morphological\noperations, frequency filtering, colour, resampling,\nstatistics and others. It supports a large range of [numeric\ntypes](https://www.libvips.org/API/current/enum.BandFormat.html),\nfrom 8-bit int to 128-bit complex. Images can have any number of bands.\nIt supports a good range of image formats, including JPEG, JPEG 2000, JPEG XL,\nTIFF, PNG, WebP, HEIC, AVIF, FITS, Matlab, OpenEXR, PDF, SVG, HDR, PPM / PGM /\nPFM, CSV, GIF, Analyze, NIfTI, DeepZoom, and OpenSlide. It can also load\nimages via ImageMagick or GraphicsMagick, letting it work with formats\nlike DICOM.\n\nIt comes with bindings for\n[C](https://www.libvips.org/API/current/using-from-c.html),\n[C++](https://www.libvips.org/API/current/using-from-cplusplus.html),\nand the\n[command-line](https://www.libvips.org/API/current/using-the-cli.html).\nFull bindings are available for:\n\n| Language | Binding |\n|---|---|\n| Ruby | [ruby-vips](https://rubygems.org/gems/ruby-vips) |\n| Python | [pyvips](https://pypi.python.org/pypi/pyvips) |\n| PHP | [php-vips](https://github.com/libvips/php-vips) |\n| C# / .NET | [NetVips](https://www.nuget.org/packages/NetVips) |\n| Go | [vips-gen](https://github.com/cshum/vipsgen) |\n| Lua | [lua-vips](https://github.com/libvips/lua-vips) |\n| Crystal | [crystal-vips](https://github.com/naqvis/crystal-vips) |\n| Elixir | [vix](https://github.com/akash-akya/vix) |\n| Java | [vips-ffm](https://github.com/lopcode/vips-ffm) |\n| Nim | [libvips-nim](https://github.com/openpeeps/libvips-nim) |\n\nlibvips is used as an image processing engine by:\n\n| |\n|---|\n| [Mastodon](https://github.com/mastodon/mastodon) |\n| [sharp (on Node.js)](https://www.npmjs.org/package/sharp) |\n| [imgproxy](https://github.com/imgproxy/imgproxy) |\n| [wsrv.nl](https://github.com/weserv/images) |\n| [bimg](https://github.com/h2non/bimg) |\n| [Ruby on Rails](https://edgeguides.rubyonrails.org/active_storage_overview.html) |\n| [CarrierWave](https://github.com/carrierwaveuploader/carrierwave#using-vips) |\n| [MediaWiki](https://www.mediawiki.org/wiki/Extension:Thumbro) |\n\nand others. The official libvips GUI is\n[nip4](https://github.com/libvips/nip4), a strange combination of a\nspreadsheet and a photo editor.\n\n# Install\n\nThere are packages for most Unix-like operating systems, including\nmacOS. Check your package manager.\n\nThere are binaries for Windows in\n[releases](https://github.com/libvips/libvips/releases).\n\nThe [libvips website](https://www.libvips.org) has [detailed\ninstall notes](https://www.libvips.org/install.html).\n\n# Building from source\n\nlibvips uses the [Meson build system](https://mesonbuild.com), version 0.56\nor later. Meson can use [`ninja`](https://ninja-build.org), Visual Studio or\nXCode as a backend, so you'll also need one of them.\n\nlibvips must have `build-essential`, `pkg-config`, `libglib2.0-dev`,\n`libexpat1-dev`.  See the **Dependencies** section below for a full list\nof the libvips optional dependencies.\n\nThere are basic bash completions in `completions/`, see the README in there.\n\n## Cheatsheet\n\n```\ncd libvips-x.y.x\nmeson setup build --prefix /my/install/prefix\ncd build\nmeson compile\nmeson test\nmeson install\n```\n\nCheck the output of `meson setup` carefully and make sure it found everything\nyou wanted it to find.  Add arguments to `meson setup` to change the build\nconfiguration.\n\n- Add flags like `-Dnsgif=false` to turn libvips options on and off, see\n  `meson_options.txt` for a list of all the build options libvips supports.\n\n- Add flags like `-Dmagick=disabled` to turn libvips dependencies on and off,\n  see `meson_options.txt` and the list below for a summary of all the libvips\n  dependencies.\n\n- You might need to add `--libdir lib` on Debian if you don't want the arch\n  name in the library path.\n\n- Add `--default-library static` for a static build.\n\n- Use e.g. `CC=clang CXX=clang++ meson setup ...` to change compiler.\n\n- You can have an alternative build directory, pick whatever names you like,\n  for example one for release and one for debug.\n\nThere's a more comprehensive test suite you can run once libvips has been\ninstalled. Use `pytest` in the libvips base directory.\n\n## Optional dependencies\n\nIf suitable versions are found, libvips will add support for the following\nlibraries automatically. Packages are generally found with `pkg-config`,\nso make sure that is working.\n\n### libjpeg\n\nAnything that is compatible with the IJG JPEG library. Use `mozjpeg` if you\ncan. Another option is `libjpeg-turbo`.\n\n### libultrahdr (libuhdr)\n\nIf present, libvips will load UltraHDR images with Google's libultrahdr\nlibrary. The `pkg-config` name is libuhdr.\n\n### libexif\n\nIf available, libvips adds support for EXIF metadata in JPEG files.\n\n### librsvg\n\nThe usual SVG loader. If this is not present, vips will try to load SVGs\nvia imagemagick instead.\n\n### libraw\n\nThe usual camera RAW loader. If this is not present, vips will try to load raw\ncamera images via imagemagick instead.\n\n### PDFium\n\nIf present, libvips will attempt to load PDFs with PDFium. Download the\nprebuilt pdfium binary from:\n\nhttps://github.com/bblanchon/pdfium-binaries/releases/latest\n\nUntar to the libvips install prefix, for example:\n\n```\ncd ~/vips\ntar xf ~/pdfium-linux.tgz\n```\n\nCreate a `pdfium.pc` like this (update the version number):\n\n```\nVIPSHOME=$HOME/vips\nmkdir -p $VIPSHOME/lib/pkgconfig\ncat > $VIPSHOME/lib/pkgconfig/pdfium.pc << EOF\nprefix=$VIPSHOME\nexec_prefix=\\${prefix}\nlibdir=\\${exec_prefix}/lib\nincludedir=\\${prefix}/include\n\nName: pdfium\nDescription: PDFium\nVersion: 4290\nLibs: -L\\${libdir} -lpdfium\nCflags: -I\\${includedir}\nEOF\n```\n\nIf PDFium is not detected, libvips will look for `poppler-glib` instead.\n\n### poppler-glib\n\nThe Poppler PDF renderer, with a glib API. If this is not present, vips\nwill try to load PDFs via imagemagick.\n\n### cgif\n\nIf available, libvips will save GIFs with\n[cgif](https://github.com/dloebl/cgif). If this is not present, vips will\ntry to save gifs via imagemagick instead.\n\n### libarchive\n\nIf available, libvips adds support for creating image pyramids with `dzsave`.\n\n### libtiff\n\nThe TIFF library. It needs to be built with support for JPEG and\nZIP compression. 3.4b037 and later are known to be OK.\n\n### fftw3\n\nIf libvips finds this library, it uses it for fourier transforms.\n\n### lcms2\n\nIf present, `vips_icc_import()`, `vips_icc_export()` and `vips_icc_transform()`\ncan be used to manipulate images with ICC profiles.\n\n### libpng\n\nIf present, libvips will load and save PNG files using libpng. If not, it\nwill look for the spng package.\n\n### libimagequant, quantizr\n\nIf one of these quantisation packages is present, libvips can write 8-bit\npalette-ised PNGs and GIFs.\n\n### ImageMagick, or optionally GraphicsMagick\n\nIf available, libvips adds support for loading and saving all\nlibMagick-supported image file types. You can enable and disable load and save\nseparately.\n\nImagemagick 6.9+ needs to have been built with `--with-modules`. Most packaged\nIMs are, I think.\n\nIf you are going to be using libvips with untrusted images, perhaps in a\nweb server, for example, you should consider the security implications of\nenabling a package with such a large attack surface.\n\n### pangocairo\n\nIf available, libvips adds support for text rendering. You need the\npackage pangocairo in `pkg-config --list-all`.\n\n### highway\n\nIf present, libvips will accelerate some operations with SIMD. If not, it\nwill look for the orc-0.4 package.\n\n### matio\n\nIf available, vips can load images from Matlab save files.\n\n### cfitsio\n\nIf available, vips can load FITS images.\n\n### libwebp\n\nIf available, vips can load and save WebP images.\n\n### libniftiio\n\nIf available, vips can load and save NIfTI images.\n\n### OpenEXR\n\nIf available, libvips will directly read (but not write, sadly)\nOpenEXR images.\n\n### OpenJPEG\n\nIf available, libvips will read and write JPEG2000 images.\n\n### libjxl\n\nIf available, libvips will read and write JPEG-XL images.\n\n### OpenSlide\n\nIf available, libvips can load OpenSlide-supported virtual slide\nfiles: Aperio, Hamamatsu, Leica, MIRAX, Sakura, Trestle, and Ventana.\n\n### libheif\n\nIf available, libvips can load and save HEIC and AVIF images. Your libheif (in\nturn) needs to be built with the correct decoders and encoders. You can check\nwith eg.:\n\n```console\n$ heif-convert --list-decoders\nHEIC decoders:\n- libde265 = libde265 HEVC decoder, version 1.0.9\nAVIF decoders:\n- dav1d = dav1d v6.6.0\n- aom = AOMedia Project AV1 Decoder v3.5.0\n$ heif-enc --list-encoders\nHEIC encoders:\n- x265 = x265 HEVC encoder (3.5+1-f0c1022b6) [default]\nAVIF encoders:\n- aom = AOMedia Project AV1 Encoder v3.5.0 [default]\n- svt = SVT-AV1 encoder v1.1.0\n- rav1e = Rav1e encoder\n```\n\n# Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute.\n\n<a href=\"https://github.com/libvips/libvips/graphs/contributors\"><img src=\"https://opencollective.com/libvips/contributors.svg?width=890&button=false\" /><\/a>\n\n### Organizations\n\nWe've had generous financial support from our sponsors. Thank you very much!\n\n<img src=\"https://opencollective.com/libvips/sponsors.svg?width=890&button=false\" />\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:17908E:5DFCB1:6AB92C94"},"text_sha256":"6174a9f498f6e403dd36d59144ed4546a85ad5457f0b19edfce8697ec2aa8abf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"imgproxy/imgproxy","input_row":{"repository":"imgproxy/imgproxy","url":"https://github.com/imgproxy/imgproxy","name":"imgproxy","owner":"imgproxy","description":"Fast and secure standalone server for resizing, processing, and converting images on the fly","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":11098,"issues":716,"created_at":"2017-06-20T13:58:55Z","updated_at":"2026-09-26T15:12:51Z","first_commit_at":"2017-06-20T14:00:17Z","last_commit_at":"2026-09-23T16:00:49Z","activity_months":111.11,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:50.064Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"imgproxy/imgproxy","visibility":"public","created_at":"2017-06-20T13:58:55Z","updated_at":"2026-09-26T15:12:51Z","private":false,"fork":false,"archived":false,"stargazers_count":11098,"open_issues_count":67,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1813","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AB:7307A:17CA57B:1BF0E12:6AB92C96"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1812","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0903:156040:17E1E7E:1C081CE:6AB92C96"},"commit":{"sha":"0ee53db54cfbd651c1df66a80a43cae2d61cb661","url":"https://github.com/imgproxy/imgproxy/commit/0ee53db54cfbd651c1df66a80a43cae2d61cb661","date":"2018-04-27T09:49:38Z","author_date":"2018-04-27T09:49:38Z","committer_date":"2018-04-27T09:49:38Z","tree_sha":"64b1463a2cc5eff059eff21ec78f756976f74d29","message_first_line":"Add changelog"},"tree_request_status":200,"tree_rate":{"github_remaining":"1811","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B6:6C6ED:1800C1F:1C273A5:6AB92C96"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11280,"blob_sha":"c2e37e348f9449b94a5382d50cffde565582ab01","priority":0}],"documents":[{"path":"README.md","size":11280,"blob_sha":"c2e37e348f9449b94a5382d50cffde565582ab01","priority":0,"status":200,"text":"# imgproxy\n\n<img align=\"right\" width=\"200\" height=\"200\" title=\"imgproxy logo\"\n     src=\"https://cdn.rawgit.com/DarthSim/imgproxy/master/logo.svg\">\n\n[![Build Status](https://api.travis-ci.org/DarthSim/imgproxy.svg?branch=master)](https://travis-ci.org/DarthSim/imgproxy)\n\nimgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.\n\nimgproxy can be used to provide a fast and secure way to replace all the image resizing code of your web application (like calling ImageMagick or GraphicsMagick, or using libraries), while also being able to resize everything on the fly, fast and easy. imgproxy is also indispensable when handling lots of image resizing, especially when images come from a remote source.\n\nimgproxy does one thing — resizing remote images — and does it well. It works great when you need to resize multiple images on the fly to make them match your application design without preparing a ton of cached resized images or re-doing it every time the design changes.\n\nimgproxy is a Go application, ready to be installed and used in any Unix environment — also ready to be containerized using Docker.\n\nSee this article for a good intro and all the juicy details! [imgproxy:\nResize your images instantly and securely](https://evilmartians.com/chronicles/introducing-imgproxy)\n\n<a href=\"https://evilmartians.com/?utm_source=imgproxy\">\n<img src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\">\n<\/a>\n\n#### Simplicity\n\n> \"No code is better than no code.\"\n\nimgproxy only includes the must-have features for image processing, fine-tuning and security. Specifically,\n\n* It would be great to be able to rotate, flip and apply masks to images, but in most of the cases, it is possible — and is much easier — to do that using CSS3.\n* It may be great to have built-in HTTP caching of some kind, but it is way better to use a Content-Delivery Network or a caching proxy server for this, as you will have to do this sooner or later in the production environment.\n* It might be useful to have everything built in — such as HTTPS support — but an easy way to solve that would be just to use a proxying HTTP server such as nginx.\n\n#### Speed\n\nimgproxy uses probably the most efficient image processing library there is, called `libvips`. It is screaming fast and has a very low memory footprint; with it, we can handle the processing for a massive amount of images on the fly.\n\nimgproxy also uses native Go's `net/http` routing for the best HTTP networking support.\n\n#### Security\n\nMassive processing of remote images is a potentially dangerous thing, security-wise. There are many attack vectors, so it is a good idea to consider attack prevention measures first. Here is how imgproxy can help:\n\n* imgproxy checks image type _and_ \"real\" dimensions when downloading, so the image will not be fully downloaded if it has an unknown format or the dimensions are too big (there is a setting for that). That is how imgproxy protects you from so called \"image bombs\" like those described at  https://www.bamsoftware.com/hacks/deflate.html.\n\n* imgproxy protects image URLs with a signature, so an attacker cannot cause a denial-of-service attack by requesting multiple image resizes.\n\n* imgproxy supports authorization by an HTTP header. That prevents using imgproxy directly by an attacker but allows to use it through a CDN or a caching server — just by adding a header to a proxy or CDN config.\n\n## Installation\n\nThere are two ways you can install imgproxy:\n\n#### From the source\n\n1. First, install [libvips](https://github.com/jcupitt/libvips).\n\n  ```bash\n  # macOS\n  $ brew tap homebrew/science\n  $ brew install vips\n\n  # Ubuntu\n  # Ubuntu apt repository contains a pretty old version of libvips.\n  # It's recommended to use PPA with an up to date version.\n  $ sudo add-apt-repository ppa:dhor/myway\n  $ sudo apt-get install libvips-dev\n  ```\n\n  **Note:** Most libvips packages come with WebP support. If you want libvips to support WebP on macOS, you need to install it this way:\n\n  ```bash\n  $ brew tap homebrew/science\n  $ brew install vips --with-webp\n  ```\n\n2. Next, install imgproxy itself:\n\n  ```bash\n  $ go get -f -u github.com/DarthSim/imgproxy\n  ```\n\n#### Docker\n\nimgproxy can (and should) be used as a standalone application inside a Docker container. It is ready to be dockerized, plug and play:\n\n```bash\n$ docker build -t imgproxy .\n$ docker run -e IMGPROXY_KEY=$YOUR_KEY -e IMGPROXY_SALT=$YOUR_SALT -p 8080:8080 -t imgproxy\n```\n\nYou can also pull the image from Docker Hub:\n\n```bash\n$ docker pull darthsim/imgproxy:latest\n$ docker run -e IMGPROXY_KEY=$YOUR_KEY -e IMGPROXY_SALT=$YOUR_SALT -p 8080:8080 -t darthsim/imgproxy\n```\n\n#### Heroku\n\nimgproxy can be deployed to Heroku with the click of the button:\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\nHowever, you can do it manually with a few steps:\n\n```bash\n$ git clone https://github.com/DarthSim/imgproxy.git && cd imgproxy\n$ heroku create your-application\n$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-apt\n$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-go\n$ heroku config:set IMGPROXY_KEY=$YOUR_KEY IMGPROXY_SALT=$YOUR_SALT\n$ git push heroku master\n```\n\n## Configuration\n\nimgproxy is [Twelve-Factor-App](https://12factor.net/)-ready and can be configured using `ENV` variables.\n\n#### URL signature\n\nimgproxy requires all URLs to be signed with a key and salt:\n\n* `IMGPROXY_KEY` — (**required**) hex-encoded key;\n* `IMGPROXY_SALT` — (**required**) hex-encoded salt;\n\nYou can also specify paths to files with a hex-encoded key and salt (useful in a development environment):\n\n```bash\n$ imgproxy -keypath /path/to/file/with/key -saltpath /path/to/file/with/salt\n```\n\nIf you need a random key/salt pair real fast, you can quickly generate it using, for example, the following snippet:\n\n```bash\n$ xxd -g 2 -l 64 -p /dev/random | tr -d '\\n'\n```\n\n#### Server\n\n* `IMGPROXY_BIND` — TCP address to listen on. Default: `:8080`;\n* `IMGPROXY_READ_TIMEOUT` — the maximum duration (in seconds) for reading the entire image request, including the body. Default: `10`;\n* `IMGPROXY_WRITE_TIMEOUT` — the maximum duration (in seconds) for writing the response. Default: `10`;\n* `IMGPROXY_DOWNLOAD_TIMEOUT` — the maximum duration (in seconds) for downloading the source image. Default: `5`;\n* `IMGPROXY_CONCURRENCY` — the maximum number of image requests to be processed simultaneously. Default: double number of CPU cores;\n* `IMGPROXY_MAX_CLIENTS` — the maximum number of simultaneous active connections. Default: `IMGPROXY_CONCURRENCY * 10`;\n* `IMGPROXY_TTL` — duration in seconds sent in `Expires` and `Cache-Control: max-age` headers. Default: `3600` (1 hour);\n* `IMGPROXY_USE_ETAG` — when true, enables using [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) header for the cache control. Default: false;\n* `IMGPROXY_LOCAL_FILESYSTEM_ROOT` — root of the local filesystem. See [Serving local files](#serving-local-files). Keep empty to disable serving of local files.\n\n#### Security\n\nimgproxy protects you from so-called image bombs. Here is how you can specify maximum image dimensions and resolution which you consider reasonable:\n\n* `IMGPROXY_ALLOW_ORIGIN` - when set, enables CORS headers with provided origin. CORS headers are disabled by default.\n* `IMGPROXY_MAX_SRC_DIMENSION` — the maximum dimensions of the source image, in pixels, for both width and height. Images with larger real size will be rejected. Default: `8192`;\n* `IMGPROXY_MAX_SRC_RESOLUTION` — the maximum resolution of the source image, in megapixels. Images with larger real size will be rejected. Default: `16.8`;\n\nYou can also specify a secret to enable authorization with the HTTP `Authorization` header:\n\n* `IMGPROXY_SECRET` — the authorization token. If specified, request should contain the `Authorization: Bearer %secret%` header;\n\n#### Compression\n\n* `IMGPROXY_QUALITY` — quality of the resulting image, percentage. Default: `80`;\n* `IMGPROXY_GZIP_COMPRESSION` — GZip compression level. Default: `5`;\n\n#### Miscellaneous\n\n* `IMGPROXY_BASE_URL` - base URL part which will be added to every requestsd image URL. For example, if base URL is `http://example.com/images` and `/path/to/image.png` is requested, imgproxy will download the image from `http://example.com/images/path/to/image.png`. Default: blank.\n\n## Generating the URL\n\nThe URL should contain the signature and resize parameters, like this:\n\n```\n/%signature/%resizing_type/%width/%height/%gravity/%enlarge/%encoded_url.%extension\n```\n\n#### Resizing types\n\nimgproxy supports the following resizing types:\n\n* `fit` — resizes the image while keeping aspect ratio to fit given size;\n* `fill` — resizes the image while keeping aspect ratio to fill given size and cropping projecting parts;\n* `crop` — crops the image to a given size.\n\n#### Width and height\n\nWidth and height parameters define the size of the resulting image. Depending on the resizing type applied, the dimensions may differ from the requested ones.\n\n#### Gravity\n\nWhen imgproxy needs to cut some parts of the image, it is guided by the gravity. The following values are supported:\n\n* `no` — north (top edge);\n* `so` — south (bottom edge);\n* `ea` — east (right edge);\n* `we` — west (left edge);\n* `ce` — center;\n* `sm` — smart. `libvips` detects the most \"interesting\" section of the image and considers it as the center of the resulting image.\n\n#### Enlarge\n\nIf set to `0`, imgproxy will not enlarge the image if it is smaller than the given size. With any other value, imgproxy will enlarge the image.\n\n#### Encoded URL\n\nThe source URL should be encoded with URL-safe Base64. The encoded URL can be split with `/` for your needs.\n\n#### Extension\n\nExtension specifies the format of the resulting image. At the moment, imgproxy supports only `jpg`, `png` and `webp`, them being the most popular and useful web image formats.\n\n#### Signature\n\nSignature is a URL-safe Base64-encoded HMAC digest of the rest of the path including the leading `/`. Here's how it is calculated:\n\n* Take the path after the signature — `/%resizing_type/%width/%height/%gravity/%enlarge/%encoded_url.%extension`;\n* Add salt to the beginning;\n* Calculate the HMAC digest using SHA256;\n* Encode the result with URL-safe Base64.\n\nYou can find helpful code snippets in the `examples` folder.\n\n## Serving local files\n\nimgproxy can process files from your local filesystem. To use this feature do the following:\n\n1. Set `IMGPROXY_LOCAL_FILESYSTEM_ROOT` to your images directory path.\n2. Use `local:///path/to/image.jpg` as the source image url.\n\n## Source image formats support\n\nimgproxy supports only the most popular image formats of the moment: PNG, JPEG, GIF and WebP.\n\n## Deployment\n\nThere is a special endpoint `/health`, which returns HTTP Status `200 OK` after server successfully starts. This can be used to check container readiness.\n\n## Author\n\nSergey \"DarthSim\" Aleksandrovich\n\nMany thanks to @romashamin for the awesome logo.\n\n## License\n\nimgproxy is licensed under the MIT license.\n\nSee LICENSE for the full license text.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C324:09BF:B2BDF:2E3B98:6AB92C96"},"text_sha256":"4b036d2b8af96cc24d9181351478d47c6658003462a366c13eb3010d28a4fd40"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1810","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0830:A9DC0:17CE177:1BF4C10:6AB92C97"},"commit":{"sha":"4a959c41d60f249a5e3e8dd7db2e3ceb756f0486","url":"https://github.com/imgproxy/imgproxy/commit/4a959c41d60f249a5e3e8dd7db2e3ceb756f0486","date":"2026-06-29T13:59:03Z","author_date":"2026-06-29T13:59:03Z","committer_date":"2026-06-29T13:59:03Z","tree_sha":"b1e47c3272b75c4c33403b00b3cbfda93bbf99cf","message_first_line":"Merge branch 'version/4.0'"},"tree_request_status":200,"tree_rate":{"github_remaining":"1809","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0919:7307A:17CA6B7:1BF0F83:6AB92C98"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9610,"blob_sha":"5fdb9ddffb1cdc7afde3fd5ff3cf224fe7bb9696","priority":0},{"path":"SECURITY.md","size":105,"blob_sha":"fec54911a758502815ec83db469112d325f710b0","priority":1}],"documents":[{"path":"README.md","size":9610,"blob_sha":"5fdb9ddffb1cdc7afde3fd5ff3cf224fe7bb9696","priority":0,"status":200,"text":"<p align=\"center\">\n  <a href=\"https://imgproxy.net\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/logo-dark.svg?sanitize=true\" />\n      <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/logo-light.svg?sanitize=true\" />\n      <img alt=\"imgproxy logo\" src=\"assets/logo-light.svg?sanitize=true\" />\n    <\/picture>\n  <\/a>\n<\/p>\n\n<p align=\"center\"><strong>\n  <a href=\"https://imgproxy.net\">Website<\/a> |\n  <a href=\"https://imgproxy.net/blog/\">Blog<\/a> |\n  <a href=\"https://docs.imgproxy.net\">Documentation<\/a> |\n  <a href=\"https://imgproxy.net/#pro\">imgproxy Pro<\/a>\n<\/strong><\/p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/imgproxy/imgproxy/pkgs/container/imgproxy\"><img alt=\"Docker\" src=\"https://img.shields.io/badge/Docker-0068F1?style=for-the-badge&logo=docker&logoColor=fff\" /><\/a>\n  <a href=\"https://bsky.app/profile/imgproxy.net\"><img alt=\"Bluesky\" src=\"https://img.shields.io/badge/Bluesky-0068F1?style=for-the-badge&logo=bluesky&logoColor=fff\" /><\/a>\n  <a href=\"https://x.com/imgproxy_net\"><img alt=\"X\" src=\"https://img.shields.io/badge/X.com-0068F1?style=for-the-badge&logo=x&logoColor=fff\" /><\/a>\n  <a href=\"https://mastodon.social/@imgproxy\"><img alt=\"X\" src=\"https://img.shields.io/badge/Mastodon-0068F1?style=for-the-badge&logo=mastodon&logoColor=fff\" /><\/a>\n  <a href=\"https://discord.gg/5GgpXgtC9u\"><img alt=\"Discord\" src=\"https://img.shields.io/badge/Discord-0068F1?style=for-the-badge&logo=discord&logoColor=fff\" /><\/a>\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/imgproxy/imgproxy/actions\">\n    <img alt=\"CI\" src=\"https://img.shields.io/github/actions/workflow/status/imgproxy/imgproxy/on-push.yml?branch=master&label=CI&style=for-the-badge\" />\n  <\/a>\n<\/p>\n\n---\n\n[imgproxy](https://imgproxy.net) is a fast and secure standalone server for resizing, processing, and converting images. The guiding principles behind imgproxy are speed, security, and simplicity.\n\nimgproxy is able to quickly and easily resize, process, and optimize images on the fly, and it's well-equipped to handle a large amount of image processing. imgproxy is a drop-in replacement for all the image processing code inside your web application (such as using image processing libraries or calling command-line tools). With imgproxy, you don’t need to repeatedly re-prepare images to fit your design every time it changes, as imgproxy does this on demand.\n\nTo get an even better introduction and to dive deeper into the nitty-gritty details, check out this article by Evil Martians: [imgproxy: Resize your images instantly and securely](https://evilmartians.com/chronicles/introducing-imgproxy)\n\n![imgproxy demo](assets/demo.gif)\n*Photo by [Joshua Patton](https://unsplash.com/@joshuapat)*\n\n## ✨ Features\n\nimgproxy is packed with features to the brim to cover all your image processing needs:\n\n| Feature | imgproxy OSS | [imgproxy Pro](https://imgproxy.net/#pro) |\n|---|---|---|\n| Image formats | Basic formats: JPEG, PNG, GIF, WebP, AVIF, JPEG XL, [and more](https://docs.imgproxy.net/image_formats_support) | Preview generation for video, PDF, and Photoshop documents |\n| Processing | Resizing, cropping, rotating, watermarking, filters | Getting image info, advanced watermarking, color adjustment |\n| Optimization | Color profile and metadata stripping, PNG quantization | Advanced compression settings, GIF to MP4 conversion, SVG minification |\n| Smart features | Simple smart cropping, auto-quality by file size | Object detection, advanced smart cropping, auto-quality by SSIM, best format selection |\n\nCheck out the [full feature list](https://imgproxy.net/features) for more details.\n\n## 🛠️ How it works\n\nimgproxy works as a standalone HTTP server. You provide it with a source image URL and a set of processing options via a specially crafted URL, and imgproxy fetches the image, processes it according to your specifications, and serves the resulting image back to you. You can use imgproxy URLs directly in your HTML, CSS, or JavaScript code, just like you would with any other image URL.\n\nThis way, imgproxy offloads all the image processing work from your application. The only thing your application needs to do is to [generate imgproxy URLs](https://docs.imgproxy.net/usage/processing) with the desired processing options.\n\n<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/how-it-works-dark.png\" />\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"assets/how-it-works-light.png\" />\n    <img alt=\"How imgproxy works scheme\" src=\"assets/how-it-works-light.png\" />\n  <\/picture>\n<\/p>\n\n## ⚖️ Main principles\n\n### Simplicity\n\n> Keep it simple, stupid!\n\nWe believe that software should be simple yet powerful. If your grandma can't get it up and running, you should make it simpler. That's why we designed imgproxy to be ready to use in a couple of minutes with minimal configuration. Check out the [Getting Started guide](https://docs.imgproxy.net/getting_started) to see how easy it is.\n\n> No code is better than no code.\n\nWe believe in the single responsibility principle. If something can be done better outside of imgproxy, we won't reinvent the wheel. As a couple of examples:\n\n* HTTPS support sounds like a must-have feature for a web server. However, imgproxy will live behind a CDN, a load balancer, or a reverse proxy in a production environment anyway, so there is no need to implement HTTPS support inside imgproxy itself.\n* Rounding image corners or applying masks sounds useful, but doing this with CSS is way easier and more flexible.\n\n### Speed\n\nWe strive to tune every little piece of imgproxy to make it as fast as possible.\n\nimgproxy takes advantage of probably the most efficient image processing library out there – [libvips](https://github.com/libvips/libvips). It’s scary fast and comes with a very low memory footprint. Our extensive experience with libvips has enabled us to optimize our image-processing pipeline to its maximum.\n\nYou can take a look at some benchmarking results and compare imgproxy with some well-known alternatives in our [benchmark report](https://imgproxy.net/blog/image-processing-servers-benchmark/).\n\n### Security\n\nImage processing is a wide attack surface. That's why we treat security very seriously. imgproxy offers several security measures that enable you to strike the optimal balance between security and usability for your specific use case. For example:\n\n* imgproxy supports signing image URLs to prevent abusing your image processing server for denial-of-service attacks or simply using it for the attacker's own needs.\n* imgproxy checks the image type before fully downloading it to prevent unwanted resource consumption.\n* imgproxy checks the real image dimensions before decoding it to prevent so-called \"image bombs\", like those described in [this doc](https://www.bamsoftware.com/hacks/deflate.html).\n* imgproxy supports authorization by HTTP header to prevent direct access to it, bypassing your CDN or caching server.\n* imgproxy allows restricting image sources, maximum image file size, processing options, etc.\n\nCheck out our documentation for more details on [security features](https://docs.imgproxy.net/configuration/options#security).\n\n## 🚀 Getting started\n\nThe easiest and recommended way to run imgproxy is using Docker. It's just a matter of a single command:\n\n```bash\ndocker run -p 8080:8080 -it ghcr.io/imgproxy/imgproxy:latest\n```\n\nThat's it! imgproxy is ready to accept [image processing requests](https://docs.imgproxy.net/usage/processing) at `http://localhost:8080`.\n\nCheck out the [Getting Started guide](https://docs.imgproxy.net/getting_started) for a step-by-step tutorial on how to get your first image processed with imgproxy.\n\n## 📚 Documentation\n\nYou can find the full documentation at [docs.imgproxy.net](https://docs.imgproxy.net).\n\n## 💙 Supporting imgproxy\n\nimgproxy is not a side project; it's what we do for a living. We work hard to make it better every day. If you find imgproxy useful and want to support its development, here are some ways you can do that:\n\n* **imgproxy Pro subscription.** [imgproxy Pro](https://imgproxy.net/#pro) is a more feature-rich version of imgproxy. By subscribing to imgproxy Pro, you not only support the development of imgproxy but also get access to advanced features and priority support.\n* **Sponsorship.** If you don't need the Pro features but still want to support the project, consider sponsoring us on [GitHub Sponsors](https://github.com/sponsors/imgproxy).\n* **Spread the word.** If you like imgproxy, give it a shoutout. We don't spend much on marketing, and imgproxy's popularity is primarily a result of our valued users sharing it on social media and blogs.\n\n## 🙏 Special thanks\n\nMany thanks to:\n\n* [Evil Martians](https://evilmartians.com) for providing a steady launch pad for imgproxy\n* [Roman Shamin](https://github.com/romashamin) for the awesome logo and website design\n* [John Cupitt](https://github.com/jcupitt) and [Kleis Auke Wolthuizen](https://github.com/kleisauke) for developing [libvips](https://github.com/libvips/libvips) and for helping me optimize its usage with imgproxy\n* [Kirill Kuznetsov](https://github.com/dragonsmith) for the [Helm chart](https://github.com/imgproxy/imgproxy-helm)\n\n## 📄 License\n\nimgproxy is licensed under the Apache License 2.0.\n\nSee [LICENSE](https://github.com/imgproxy/imgproxy/blob/master/LICENSE) for the full license text.\n\n## ⚠️ Security Contact\n\nTo report a security vulnerability, please contact us at security@imgproxy.net. We will coordinate the fix and disclosure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:177670:5DE1C7:6AB92C98"},"text_sha256":"3080a72a94e0f15c2e17f3e26aec8e6217ec3780a1fcdf63c2012a0c922a3901"},{"path":"SECURITY.md","size":105,"blob_sha":"fec54911a758502815ec83db469112d325f710b0","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report security issues to `security@imgproxy.net`","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B98E:241B62:17AC4A:5E18C4:6AB92C98"},"text_sha256":"3e4509485b40f48380e0b199c64e8a5d2024c5fe935ce9e33b7483bd8fa3a8dd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wasabeef/glide-transformations","input_row":{"repository":"wasabeef/glide-transformations","url":"https://github.com/wasabeef/glide-transformations","name":"glide-transformations","owner":"wasabeef","description":"An Android transformation library providing a variety of image transformations for Glide.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9882,"issues":158,"created_at":"2015-01-09T10:33:29Z","updated_at":"2026-09-15T08:54:04Z","first_commit_at":"2015-01-09T10:33:29Z","last_commit_at":"2021-05-10T04:28:36Z","activity_months":75.980000000000004,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:53.391Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wasabeef/glide-transformations","visibility":"public","created_at":"2015-01-09T10:33:29Z","updated_at":"2026-09-15T08:54:04Z","private":false,"fork":false,"archived":false,"stargazers_count":9882,"open_issues_count":58,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1808","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17DEE6A:1C05CAF:6AB92C99"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1807","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0868:73962:17E6762:1C0CDFB:6AB92C99"},"commit":{"sha":"4818373fc5113e94b8b466cd6ca2ff0b77c23ada","url":"https://github.com/wasabeef/glide-transformations/commit/4818373fc5113e94b8b466cd6ca2ff0b77c23ada","date":"2018-04-22T20:08:05Z","author_date":"2018-04-22T20:08:05Z","committer_date":"2018-04-22T20:08:05Z","tree_sha":"4706f7d285c7df6dba1bb386c91cfb5e9a8f40c7","message_first_line":"v3.3.0 (#127)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1806","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092D:6C9BF:1812558:1C393E1:6AB92C9A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4723,"blob_sha":"32be1fe466cc3122c52b4e9f79cba8ab37c4a902","priority":0}],"documents":[{"path":"README.md","size":4723,"blob_sha":"32be1fe466cc3122c52b4e9f79cba8ab37c4a902","priority":0,"status":200,"text":"Glide Transformations\n======================\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-glide--transformations-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1363)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Download](https://api.bintray.com/packages/wasabeef/maven/glide-transformations/images/download.svg)](https://bintray.com/wasabeef/maven/glide-transformations/_latestVersion)\n\nAn Android transformation library providing a variety of image transformations for [Glide](https://github.com/bumptech/glide).\n\nPlease feel free to use this.\n\n\n#### Are you using Picasso or Fresco?\n[Picasso Transformations](https://github.com/wasabeef/picasso-transformations)  \n[Fresco Processors](https://github.com/wasabeef/fresco-processors)\n\n# Demo\n\n### Original Image\n<img src=\"art/demo-org.jpg\" width=\"30%\">\n\n### Transformations\n<img src=\"art/demo.gif\" width=\"50%\">\n\n# How do I use it?\n\n## Step 1\n\n#### Gradle\n```groovy\nrepositories {\n    jcenter()\n}\n\ndependencies {\n    implementation 'jp.wasabeef:glide-transformations:3.3.0'\n    // If you want to use the GPU Filters\n    implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'\n}\n```\n\n## Step 2\n\nSet Glide Transform.\n\n```java\nGlide.with(this).load(R.drawable.demo)\n  .apply(bitmapTransform(new BlurTransformation(25, 3)))\n  .into((ImageView) findViewById(R.id.image));\n```\n\n## Advanced Step 3\n\nYou can set a multiple transformations.\n\n```java\nMultiTransformation multi = new MultiTransformation(\n    new BlurTransformation(25), \n    new RoundedCornersTransformation(128, 0, RoundedCornersTransformation.CornerType.BOTTOM))))\nGlide.with(this).load(R.drawable.demo)\n  .apply(bitmapTransform(multi))\n  .into((ImageView) findViewById(R.id.image));\n```\n\n# Step 4\n\nIf you are using `SupportRSBlurTransformation`.\n\n```groovy\nandroid {\n    ...\n    defaultConfig { \n        ...\n        renderscriptTargetApi YOUR_TARGET_SDK_VERSION as int\n        renderscriptSupportModeEnabled true\n    }\n}\n```\n\n## Transformations\n\n### Crop\n`CropTransformation`, `CropCircleTransformation`, `CropSquareTransformation`,\n`RoundedCornersTransformation`\n\n### Color\n`ColorFilterTransformation`, `GrayscaleTransformation`\n\n### Blur\n`BlurTransformation`\n\n### Mask\n`MaskTransformation`\n\n### GPU Filter (use [GPUImage](https://github.com/CyberAgent/android-gpuimage))\n**Will require add dependencies for GPUImage.**  \n\n`ToonFilterTransformation`, `SepiaFilterTransformation`, `ContrastFilterTransformation`  \n`InvertFilterTransformation`, `PixelationFilterTransformation`, `SketchFilterTransformation`  \n`SwirlFilterTransformation`, `BrightnessFilterTransformation`, `KuwaharaFilterTransformation`\n`VignetteFilterTransformation`\n\n\nApplications using Glide Transformations\n---\n\nPlease [ping](mailto:dadadada.chop@gmail.com) me or send a pull request if you would like to be added here.\n\nIcon | Application\n------------ | -------------\n<img src=\"https://lh6.ggpht.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=w300-rw\" width=\"48\" height=\"48\" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)\n<img src=\"https://lh3.googleusercontent.com/ZOrekp-ho-ecWG1TyvuOs0LoB5M4QYWCCLS5lFbAHhp_SklSd06544ENG3uC97zGWes=w300-rw\" width=\"48\" height=\"48\" /> | [AbemaTV](https://play.google.com/store/apps/details?id=tv.abema)\n<img src=\"https://lh3.googleusercontent.com/eikxMAKKMU2O-rV-oUg04dGp-O4Aoje91kffDlnCB_3DCIPDzzADxdBOdPCW18Lmqw=w300-rw\" width=\"48\" height=\"48\" /> | [TV Time](https://play.google.com/store/apps/details?id=com.tozelabs.tvshowtime)\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>\n\n<a href=\"https://twitter.com/wasabeef_jp\">\n<img alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/>\n<\/a>\n\nContributions\n-------\n\nAny contributions are welcome!\n\nContributers\n-------\n\n* [start141](https://github.com/start141)\n\nThanks\n-------\n\n* Inspired by `Picasso Transformations` in [TannerPerrien](https://github.com/TannerPerrien).\n\nLicense\n-------\n\n    Copyright 2018 Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:1790B9:5DFD53:6AB92C98"},"text_sha256":"1237c614c64c4816c6624fa767a6028c6aa88914749af9f7e5adbaedd0db51ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1805","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:181E3AA:1C4536E:6AB92C9B"},"commit":{"sha":"d950f0c33f27f864e4ab4b26fce66c27079911c1","url":"https://github.com/wasabeef/glide-transformations/commit/d950f0c33f27f864e4ab4b26fce66c27079911c1","date":"2021-05-10T04:28:36Z","author_date":"2021-05-10T04:28:36Z","committer_date":"2021-05-10T04:28:36Z","tree_sha":"93106c7625d58e7a6f02cd74138a0dc2f7c070e4","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1804","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092F:E80A6:17B9803:1BE07A0:6AB92C9B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4745,"blob_sha":"edf22c2afdebba50010b96e4da5e45b2c7bf84f2","priority":0}],"documents":[{"path":"README.md","size":4745,"blob_sha":"edf22c2afdebba50010b96e4da5e45b2c7bf84f2","priority":0,"status":200,"text":"Glide Transformations\n======================\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-glide--transformations-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1363)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/glide-transformations/badge.svg)](https://search.maven.org/artifact/jp.wasabeef/glide-transformations)\n\nAn Android transformation library providing a variety of image transformations for [Glide](https://github.com/bumptech/glide).\n\nPlease feel free to use this.\n\n\n#### Are you using Picasso or Fresco?\n[Picasso Transformations](https://github.com/wasabeef/picasso-transformations)  \n[Fresco Processors](https://github.com/wasabeef/fresco-processors)\n\n# Demo\n\n### Original Image\n<img src=\"art/demo-org.jpg\" width=\"30%\">\n\n### Transformations\n<img src=\"art/demo.gif\" width=\"50%\">\n\n# How do I use it?\n\n## Step 1\n\n#### Gradle\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n  implementation 'jp.wasabeef:glide-transformations:4.3.0'\n  // If you want to use the GPU Filters\n  implementation 'jp.co.cyberagent.android:gpuimage:2.1.0'\n}\n```\n\n## Step 2\n\nSet Glide Transform.\n\n```kotlin\nGlide.with(this).load(R.drawable.demo)\n  .apply(RequestOptions.bitmapTransform(BlurTransformation(25, 3)))\n  .into(imageView)\n```\n\n## Advanced Step 3\n\nYou can set a multiple transformations.\n\n```kotlin\nval multi = MultiTransformation<Bitmap>(\n  BlurTransformation(25),\n  RoundedCornersTransformation(128, 0, CornerType.BOTTOM))))\nGlide.with(this).load(R.drawable.demo)\n  .apply(RequestOptions.bitmapTransform(multi))\n  .into(imageView))\n```\n\n## Transformations\n\n### Crop\n- `CropTransformation`\n- `CropCircleTransformation`\n- `CropCircleWithBorderTransformation`\n- `CropSquareTransformation`\n- `RoundedCornersTransformation`\n\n### Color\n- `ColorFilterTransformation`\n- `GrayscaleTransformation`\n\n### Blur\n- `BlurTransformation`\n\n### Mask\n- `MaskTransformation`\n\n### GPU Filter (use [GPUImage](https://github.com/CyberAgent/android-gpuimage))\n**Will require add dependencies for GPUImage.**  \n\n- `ToonFilterTransformation`\n- `SepiaFilterTransformation`\n- `ContrastFilterTransformation`\n- `InvertFilterTransformation`\n- `PixelationFilterTransformation`\n- `SketchFilterTransformation`\n- `SwirlFilterTransformation`\n- `BrightnessFilterTransformation`\n- `KuwaharaFilterTransformation`\n- `VignetteFilterTransformation`\n\n\nApplications using Glide Transformations\n---\n\nPlease [ping](mailto:dadadada.chop@gmail.com) me or send a pull request if you would like to be added here.\n\nIcon | Application\n------------ | -------------\n<img src=\"https://lh6.ggpht.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=w300-rw\" width=\"48\" height=\"48\" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)\n<img src=\"https://lh3.googleusercontent.com/ZOrekp-ho-ecWG1TyvuOs0LoB5M4QYWCCLS5lFbAHhp_SklSd06544ENG3uC97zGWes=w300-rw\" width=\"48\" height=\"48\" /> | [AbemaTV](https://play.google.com/store/apps/details?id=tv.abema)\n<img src=\"https://lh3.googleusercontent.com/eikxMAKKMU2O-rV-oUg04dGp-O4Aoje91kffDlnCB_3DCIPDzzADxdBOdPCW18Lmqw=w300-rw\" width=\"48\" height=\"48\" /> | [TV Time](https://play.google.com/store/apps/details?id=com.tozelabs.tvshowtime)\n<img src=\"https://play-lh.googleusercontent.com/sGt1rxE4naYmO_6sCquGLa5zHeh_3AZQGtBKhU8PGuXDa-MeUK25aSI-iZJlMDUVli9c=s300-rw\" width=\"48\" height=\"48\" /> | [Christmas Radio](https://play.google.com/store/apps/details?id=nl.netwaves.christmasradio)\n\n\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>\n\n<a href=\"https://twitter.com/wasabeef_jp\">\n<img alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/>\n<\/a>\n\nContributions\n-------\n\nAny contributions are welcome!\n\nContributors\n-------\n\n* [start141](https://github.com/start141)\n* [squeeish](https://github.com/squeeish)\n\nThanks\n-------\n\n* Inspired by `Picasso Transformations` in [TannerPerrien](https://github.com/TannerPerrien).\n\nLicense\n-------\n\n    Copyright (C) 2020 Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9310:1F1FB6:17DFB1:5E4B63:6AB92C9A"},"text_sha256":"1badcd9fdccde431b8b5b909dd5ff7445613b2e3854893f3a885a38df59be237"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hardikvasa/google-images-download","input_row":{"repository":"hardikvasa/google-images-download","url":"https://github.com/hardikvasa/google-images-download","name":"google-images-download","owner":"hardikvasa","description":"Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":8687,"issues":288,"created_at":"2015-03-28T16:50:28Z","updated_at":"2026-09-27T08:42:21Z","first_commit_at":"2015-03-28T16:50:28Z","last_commit_at":"2026-05-18T05:29:54Z","activity_months":133.66,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:56.070Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hardikvasa/google-images-download","visibility":"public","created_at":"2015-03-28T16:50:28Z","updated_at":"2026-09-27T08:42:21Z","private":false,"fork":false,"archived":false,"stargazers_count":8687,"open_issues_count":66,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1803","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:180E9D2:1C3509F:6AB92C9C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1802","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0930:2BC4E5:1834901:1C5B419:6AB92C9C"},"commit":{"sha":"368de9d4a54d22bd16d2d7b4be7e1a8db833f4f0","url":"https://github.com/hardikvasa/google-images-download/commit/368de9d4a54d22bd16d2d7b4be7e1a8db833f4f0","date":"2018-05-16T04:32:16Z","author_date":"2018-05-16T04:32:16Z","committer_date":"2018-05-16T04:32:16Z","tree_sha":"45bb873e6be852c2b30c12b2744beb63cff07164","message_first_line":"Merge branch 'master' of https://github.com/hardikvasa/google-images-download"},"tree_request_status":200,"tree_rate":{"github_remaining":"1801","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0843:2BC4E5:183496C:1C5B45B:6AB92C9C"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":45601,"blob_sha":"f0a19b1d0f06b3d6997554458e292dfc2bee25f6","priority":0}],"documents":[{"path":"README.rst","size":45601,"blob_sha":"f0a19b1d0f06b3d6997554458e292dfc2bee25f6","priority":0,"status":200,"text":"Google Images Download\n######################\n\nPython Script for 'searching' and 'downloading' hundreds of Google images to the local hard disk!\n\nContents\n\n.. contents:: :local:\n\nSummary\n=======\n\nThis is a command line python program to search keywords/key-phrases on Google Images\nand optionally download images to your computer. You can also invoke this script from\nanother python file.\n\nThis is a small and ready-to-run program. No dependencies are required to be installed\nif you would only want to download up to 100 images per keyword. If you would want more than 100\nimages per keyword, then you would need to install ``Selenium`` library along with ``chromedriver``.\nDetailed instructions in the troubleshooting section.\n\n\nCompatibility\n=============\n\nThis program is compatible with both the versions of python - 2.x and 3.x (recommended).\nIt is a download-and-run program with no changes to the file.\nYou will just have to specify parameters through the command line.\n\nInstallation\n============\n\nYou can use **one of the below methods** to download and use this repository.\n\nUsing pip\n\n.. code-block:: bash\n\n    $ pip install google_images_download\n\nManually using CLI\n\n.. code-block:: bash\n\n    $ git clone https://github.com/hardikvasa/google-images-download.git\n    $ cd google-images-download && sudo python setup.py install\n\nManually using UI\n\nGo to the `repo on github <https://github.com/hardikvasa/google-images-download>`__ ==> Click on 'Clone or Download' ==> Click on 'Download ZIP' and save it on your local disk.\n\nUsage - Using Command Line Interface\n====================================\n\nIf installed via pip or using CLI, use the following command:\n\n.. code-block:: bash\n\n    $ googleimagesdownload [Arguments...]\n\nIf downloaded via the UI, unzip the file downloaded, go to the 'google_images_download' directory and use one of the below commands:\n\n.. code-block:: bash\n\n    $ python3 google_images_download.py [Arguments...]\n    OR\n    $ python google_images_download.py [Arguments...]\n\n\nUsage - From another python file\n================================\n\nIf you would want to use this library from another python file, you could use it as shown below:\n\n.. code-block:: python\n\n    from google_images_download import google_images_download\n\n    response = google_images_download.googleimagesdownload()\n    absolute_image_paths = response.download({<Arguments...>})\n\n\nArguments\n=========\n\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| Argument          | Short hand  | Description                                                                                                                   |\n+===================+=============+===============================================================================================================================+\n| config_file       | cf          | You can pass the arguments inside a config file. This is an alternative to passing arguments on the command line directly.    |\n|                   |             |                                                                                                                               |\n|                   |             | Please refer to the                                                                                                           |\n|                   |             | `config file format <https://github.com/hardikvasa/google-images-download/blob/master/README.rst#config-file-format>`__ below |\n|                   |             |                                                                                                                               |\n|                   |             | * If 'config_file' argument is present, the program will use the config file and command line arguments will be discarded     |\n|                   |             | * Config file can only be in **JSON** format                                                                                  |\n|                   |             | * Please refrain from passing invalid arguments from config file. Refer to the below arguments list                           |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| keywords          | k           | Denotes the keywords/key phrases you want to search for. For more than one keywords, wrap it in single quotes.                |\n|                   |             |                                                                                                                               |\n|                   |             | Tips:                                                                                                                         |\n|                   |             |                                                                                                                               |\n|                   |             | * If you simply type the keyword, Google will best try to match it                                                            |\n|                   |             | * If you want to search for exact phrase, you can wrap the keywords in double quotes (\"\")                                     |\n|                   |             | * If you want to search to contain either of the words provided, use **OR** between the words.                                |\n|                   |             | * If you want to explicitly not want a specific word use a minus sign before the word (-)                                     |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| keywords_from_file| kf          | Denotes the file name from where you would want to import the keywords.                                                       |\n|                   |             |                                                                                                                               |\n|                   |             | Add one keyword per line. Blank/Empty lines are truncated automatically.                                                      |\n|                   |             |                                                                                                                               |\n|                   |             | Only file types '.txt' or  '.csv' are allowed.                                                                                |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| prefix_keywords   | pk          | Denotes additional words added before main keyword while making the search query.                                             |\n|                   |             |                                                                                                                               |\n|                   |             | The final search query would be: <prefix keyword> <keyword>                                                                   |\n|                   |             |                                                                                                                               |\n|                   |             | So, for example, if the keyword is 'car' and prefix_keyword is 'red,yellow,blue', it will search and download images for      |\n|                   |             | 'red car', 'yellow car' and 'blue car' individually                                                                           |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| suffix_keywords   | sk          | Denotes additional words added after main keyword while making the search query.                                              |\n|                   |             |                                                                                                                               |\n|                   |             | The final search query would be: <keyword> <suffix keyword>                                                                   |\n|                   |             |                                                                                                                               |\n|                   |             | So, for example, if the keyword is 'car' and suffix_keyword is 'red,yellow,blue', it will search and download images for      |\n|                   |             | 'car red', 'car yellow' and 'car blue' individually                                                                           |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| limit             | l           | Denotes number of images that you want to download.                                                                           |\n|                   |             |                                                                                                                               |\n|                   |             | You can specify any integer value here. It will try and get all the images that it finds in the google image search page.     |\n|                   |             |                                                                                                                               |\n|                   |             | If this value is not specified, it defaults to 100.                                                                           |\n|                   |             |                                                                                                                               |\n|                   |             | **Note**: In case of occasional errors while downloading images, you could get less than 100 (if the limit is set to 100)     |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| related_images    | ri          | This argument downloads a ton of images related to the keyword you provided.                                                  |\n|                   |             |                                                                                                                               |\n|                   |             | Google Images page returns list of related keywords to the keyword you have mentioned in the query. This tool downloads       |\n|                   |             | images from each of those related keywords based on the limit you have mentioned in your query                                |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--related_images' or '-ri' in your query.                                    |\n|                   |             |                                                                                                                               |\n|                   |             | **Note:**  This argument can download hundreds or thousands of additional images so please use this carefully.                |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| format            | f           | Denotes the format/extension of the image that you want to download.                                                          |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: jpg, gif, png, bmp, svg, webp, ico`                                                                         |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| color             | co          | Denotes the color filter that you want to apply to the images.                                                                |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: red, orange, yellow, green, teal, blue, purple, pink, white, gray, black, brown`                            |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| color_type        | ct          | Denotes the color type you want to apply to the images.                                                                       |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: full-color, black-and-white, transparent`                                                                   |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| usage_rights      | r           | Denotes the usage rights/licence under which the image is classified.                                                         |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values:`                                                                                                            |\n|                   |             |                                                                                                                               |\n|                   |             | * `labeled-for-reuse-with-modifications`,                                                                                     |\n|                   |             | * `labeled-for-reuse`,                                                                                                        |\n|                   |             | * `labeled-for-noncommercial-reuse-with-modification`,                                                                        |\n|                   |             | * `labeled-for-nocommercial-reuse`                                                                                            |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| size              | s           | Denotes the relative size of the image to be downloaded.                                                                      |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: large, medium, icon, >400*300, >640*480, >800*600, >1024*768, >2MP, >4MP, >6MP, >8MP, >10MP,                |\n|                   |             | >12MP, >15MP, >20MP, >40MP, >70MP`                                                                                            |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| exact_size        | es          | You can specify the exact size/resolution of the images                                                                       |\n|                   |             |                                                                                                                               |\n|                   |             | This value of this argument can be specified as ``<integer,integer>`` where the fist integer stands for width of the image    |\n|                   |             | and the second integer stands for the height of the image. For example, ``-es 1024,786``                                      |\n|                   |             |                                                                                                                               |\n|                   |             | **Note**: You cannot specify both 'size' and 'exact_size' arguments in the same query. You can only give one of them.         |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| aspect_ratio      | a           | Denotes the aspect ratio of images to download.                                                                               |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: tall, square, wide, panoramic`                                                                              |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| type              | t           | Denotes the type of image to be downloaded.                                                                                   |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: face, photo, clip-art, line-drawing, animated`                                                              |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| time              | w           | Denotes the time the image was uploaded/indexed.                                                                              |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible values: past-24-hours, past-7-days`                                                                                 |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| time_range        | wr          | Denotes the time range for which you want to search the images                                                                |\n|                   |             |                                                                                                                               |\n|                   |             | The value of this parameter should be in the following format '{\"time_min\":\"MM/DD/YYYY\",\"time_max\":\"MM/DD/YYYY\"}'             |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| delay             | d           | Time to wait between downloading two images                                                                                   |\n|                   |             |                                                                                                                               |\n|                   |             | Time is to be specified in seconds. But you can have sub-second times by using decimal points.                                |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| url               | u           | Allows you search by image when you have the URL from the Google Images page.                                                 |\n|                   |             | It downloads images from the google images link provided                                                                      |\n|                   |             |                                                                                                                               |\n|                   |             | If you are searching an image on the browser google images page, simply grab the browser URL and paste it in this parameter   |\n|                   |             | It will download all the images seen on that page.                                                                            |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| single_image      | x           | Allows you to download one image if the complete (absolute) URL of the image is provided                                      |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| output_directory  | o           | Allows you specify the main directory name in which the images are downloaded.                                                |\n|                   |             |                                                                                                                               |\n|                   |             | If not specified, it will default to 'downloads' directory. This directory is located in the path from where you run this code|\n|                   |             |                                                                                                                               |\n|                   |             | The directory structure would look like: ``<output_directory><image_directory><images>``                                      |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| image_directory   | i           | This lets you specify a directory inside of the main directory (output_directory) in which the images will be saved           |\n|                   |             |                                                                                                                               |\n|                   |             | If not specified, it will default to the name of the keyword.                                                                 |\n|                   |             |                                                                                                                               |\n|                   |             | The directory structure would look like: ``<output_directory><image_directory><images>``                                      |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| no_directory      | n           | This option allows you download images directly in the main directory (output_directory) without an image_directory           |\n|                   |             |                                                                                                                               |\n|                   |             | The directory structure would look like: ``<output_directory><images>``                                                       |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| proxy             | px          | Allows you to specify proxy server setting for all your requests                                                              |\n|                   |             |                                                                                                                               |\n|                   |             | You can specify the proxy settings in 'IP:Port' format                                                                        |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| similar_images    | si          | Reverse Image Search or 'Search by Image' as it is referred to on Google.                                                     |\n|                   |             |                                                                                                                               |\n|                   |             | Searches and downloads images that are similar to the absolute image link/url you provide.                                    |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| specific_site     | ss          | Allows you to download images with keywords only from a specific website/domain name you mention.                             |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| print_urls        | p           | Print the URLs of the images on the console. These image URLs can be used for debugging purposes                              |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--print_urls' or '-p' in your query.                                         |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| print_size        | ps          | Prints the size of the images on the console                                                                                  |\n|                   |             |                                                                                                                               |\n|                   |             | The size denoted the actual size of the image and not the size of the image on disk                                           |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--print_size' or '-ps' in your query.                                        |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| print_paths       | pp          | Prints the list of all the absolute paths of the downloaded images                                                            |\n|                   |             |                                                                                                                               |\n|                   |             | When calling the script from another python file, this list will be saved in a variable (as shown in the example below)       |\n|                   |             |                                                                                                                               |\n|                   |             | This argument also allows you to print the list on the console                                                                |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| metadata          | m           | Prints the metada of the image on the console.                                                                                |\n|                   |             |                                                                                                                               |\n|                   |             | This includes image size, origin, image attributes, description, image URL, etc.                                              |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--metadata' or '-m' in your query.                                           |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| extract_metadata  | e           | This option allows you to save metadata of all the downloaded images in a text file.                                          |\n|                   |             |                                                                                                                               |\n|                   |             | This file can be found in the ``logs/`` directory. The name of the file would be same as the keyword nam                      |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--extract_metadata' or '-e' in your query.                                   |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| socket_timeout    | st          | Allows you to specify the time to wait for socket connection.                                                                 |\n|                   |             |                                                                                                                               |\n|                   |             | You could specify a higher timeout time for slow internet connection. The default value is 10 seconds.                        |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| thumbnail         | th          | Downloads image thumbnails corresponding to each image downloaded.                                                            |\n|                   |             |                                                                                                                               |\n|                   |             | Thumbnails are saved in their own sub-directories inside of the main directory.                                               |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--thumbnail' or '-th' in your query.                                         |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| language          | la          | Defines the language filter. The search results are automatically returned in that language                                   |\n|                   |             |                                                                                                                               |\n|                   |             | `Possible Values: Arabic, Chinese (Simplified), Chinese (Traditional), Czech, Danish, Dutch, English, Estonian. Finnish,      |\n|                   |             | French, German, Greek, Hebrew, Hungarian, Icelandic, Italian, Japanese, Korean, Latvianm, Lithuanian, Norwegian, Portuguese,  |\n|                   |             | Polish, Romanian, Russian, Spanish, Swedish, Turkish`                                                                         |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| prefix            | pr          | A word that you would want to prefix in front of actual image name.                                                           |\n|                   |             |                                                                                                                               |\n|                   |             | This feature can be used to rename files for image identification purpose.                                                    |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| chromedriver      | cd          | With this argument you can pass the path to the 'chromedriver'.                                                               |\n|                   |             |                                                                                                                               |\n|                   |             | The path looks like this: \"path/to/chromedriver\". In windows it will be \"path/to/chromedriver.exe\"                            |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| safe_search       | sa          | Searches for images with the Safe Search filter On                                                                            |\n|                   |             |                                                                                                                               |\n|                   |             | And this filter will be Off by default if you do not specify the safe_search argument                                         |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--safe_search' or '-sa' in your query.                                       |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| no_numbering      | nn          | When you specify this argument, the script does not add ordered numbering as prefix to the images it downloads                |\n|                   |             |                                                                                                                               |\n|                   |             | If this argument is not specified, the images are numbered in order in which they are downloaded                              |\n|                   |             |                                                                                                                               |\n|                   |             | This argument does not take any value. Just add '--no_numbering' or '-nn' in your query.                                      |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n| help              | h           | show the help message regarding the usage of the above arguments                                                              |\n+-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+\n\n**Note:** If ``single_image`` or ``url`` parameter is not present, then keywords is a mandatory parameter. No other parameters are mandatory.\n\nConfig File Format\n==================\n\nYou can either pass the arguments directly from the command as in the examples below or you can pass it through a config file. Below is a sample of how a config\nfile looks.\n\nYou can pass more than one record through a config file. The below sample consist of two set of records. The code will iterate through each of the record and\ndownload images based on arguments passed.\n\n.. code:: json\n\n    {\n        \"Records\": [\n            {\n                \"keywords\": \"apple\",\n                \"limit\": 5,\n                \"color\": \"green\",\n                \"print_urls\": true\n            },\n            {\n                \"keywords\": \"universe\",\n                \"limit\": 15,\n                \"size\": \"large\",\n                \"print_urls\": true\n            }\n        ]\n    }\n\n\nExamples\n========\n\n- If you are calling this library from another python file, below is the sample code\n\n.. code-block:: python\n\n    from google_images_download import google_images_download   #importing the library\n\n    response = google_images_download.googleimagesdownload()   #class instantiation\n\n    arguments = {\"keywords\":\"Polar bears,baloons,Beaches\",\"limit\":20,\"print_urls\":True}   #creating list of arguments\n    paths = response.download(arguments)   #passing the arguments to the function\n    print(paths)   #printing absolute paths of the downloaded images\n\n- If you are passing arguments from a config file, simply pass the config_file argument with name of your JSON file\n\n.. code-block:: bash\n\n    $ googleimagesdownload -cf example.json\n\n- Simple example of using keywords and limit arguments\n\n.. code-block:: bash\n\n    $ googleimagesdownload --keywords \"Polar bears, baloons, Beaches\" --limit 20\n\n-  Using Suffix Keywords allows you to specify words after the main\n   keywords. For example if the ``keyword = car`` and\n   ``suffix keyword = 'red,blue'`` then it will first search for\n   ``car red`` and then ``car blue``\n\n.. code-block:: bash\n\n    $ googleimagesdownload --k \"car\" -sk 'red,blue,white' -l 10\n\n-  To use the short hand command\n\n.. code-block:: bash\n\n    $ googleimagesdownload -k \"Polar bears, baloons, Beaches\" -l 20\n\n-  To download images with specific image extension/format\n\n.. code-block:: bash\n\n    $ googleimagesdownload --keywords \"logo\" --format svg\n\n-  To use color filters for the images\n\n.. code-block:: bash\n\n    $ googleimagesdownload -k \"playground\" -l 20 -co red\n\n-  To use non-English keywords for image search\n\n.. code-block:: bash\n    \n    $ googleimagesdownload -k \"北极熊\" -l 5\n\n-  To download images from the google images link\n\n.. code-block:: bash\n    \n    $ googleimagesdownload -k \"sample\" -u <google images page URL>\n\n-  To save images in specific main directory (instead of in 'downloads')\n\n.. code-block:: bash\n    \n    $ googleimagesdownload -k \"boat\" -o \"boat_new\"\n\n-  To download one single image with the image URL\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"baloons\" --single_image <URL of the images>\n\n-  To download images with size and type constrains\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"baloons\" --size medium --type animated\n\n-  To download images with specific usage rights\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"universe\" --usage_rights labeled-for-reuse\n\n-  To download images with specific color type\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"flowers\" --color_type black-and-white\n\n-  To download images with specific aspect ratio\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"universe\" --aspect_ratio panoramic\n\n-  To download images which are similar to the image in the image URL that you provided (Reverse Image search).\n\n.. code-block:: bash\n    \n    $ googleimagesdownload -si <image url> -l 10\n\n-  To download images from specific website or domain name for a given keyword\n\n.. code-block:: bash\n    \n    $ googleimagesdownload --keywords \"universe\" --specific_site example.com\n\n===> The images would be downloaded in their own sub-directories inside the main directory\n(either the one you provided or in 'downloads') in the same folder you are in.\n\n--------------\n\nTroubleshooting\n===============\n\n**## SSL Errors**\n\nIf you do see SSL errors on Mac for Python 3,\nplease go to Finder —> Applications —> Python 3 —> Click on the ‘Install Certificates.command’\nand run the file.\n\n**## googleimagesdownload: command not found**\n\nWhile using the above commands, if you get ``Error: -bash: googleimagesdownload: command not found`` then you have to set the correct path variable.\n\nTo get the details of the repo, run the following command:\n\n.. code-block:: bash\n\n    $ pip show -f google_images_download \n\nyou will get the result like this:\n\n.. code-block:: bash\n\n\tLocation: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages\n\tFiles:\n\t  ../../../bin/googleimagesdownload\n\ntogether they make: ``/Library/Frameworks/Python.framework/Versions/2.7/bin`` which you need add it to the path:\n\n.. code-block:: bash\n\t\n    $ export PATH=\"/Library/Frameworks/Python.framework/Versions/2.7/bin\"\n\n\n**## [Errno 13] Permission denied creating directory 'downloads'**\n\nWhen you run the command, it downloads the images in the current directory (the directory from where you are running the command). If you get permission denied error for creating the `downloads directory`, then move to a directory in which you have the write permission and then run the command again.\n\n\n**## Permission denied while installing the library**\n\nOn MAC and Linux, when you get permission denied when installing the library using pip, try doing a user install.\n\n.. code-block:: bash\n\t\n    $ pip install google_images_download --user\n\nYou can also run pip install as a superuser with ``sudo pip install google_images_download`` but it is not generally a good idea because it can cause issues with your system-level packages.\n\n\n**## Installing the chromedriver (with Selenium)**\n\nIf you would want to download more than 100 images per keyword, then you will need to install 'selenium' along with 'chromedriver'.\n\nIf you have pip installed the library or run the setup.py file, Selenium would have automatically installed on your machine. You will also need Chrome browser on your machine. For chromedriver:\n\n`Download the correct chromedriver <https://sites.google.com/a/chromium.org/chromedriver/downloads>`__ based on your operating system.\n\nOn **Windows** or **MAC** if for some reason the chromedriver gives you trouble, download it under the current directory and run the command.\n\nOn windows however, the path to chromedriver has to be given in the following format:\n\n``C:\\\\complete\\\\path\\\\to\\\\chromedriver.exe``\n\nOn **Linux** if you are having issues installing google chrome browser, refer to this `CentOS or Amazon Linux Guide <https://intoli.com/blog/installing-google-chrome-on-centos/>`__\nor `Ubuntu Guide <https://askubuntu.com/questions/510056/how-to-install-google-chrome in documentation>`__\n\nFor **All the operating systems** you will have to use '--chromedriver' or '-cd' argument to specify the path of\nchromedriver that you have downloaded in your machine.\n\nStructure\n=========\n\nBelow diagram represents the code logic.\n\n.. figure:: http://www.zseries.in/flow-chart.png\n   :alt:\n\nContribute\n==========\n\nAnyone is welcomed to contribute to this script.\nIf you would like to make a change, open a pull request.\nFor issues and discussion visit the\n`Issue Tracker <https://github.com/hardikvasa/google-images-download/issues>`__.\n\nThe aim of this repo is to keep it simple, stand-alone, backward compatible and 3rd party dependency proof.\n\nDisclaimer\n==========\n\nThis program lets you download tons of images from Google.\nPlease do not download or use any image that violates its copyright terms.\nGoogle Images is a search engine that merely indexes images and allows you to find them.\nIt does NOT produce its own images and, as such, it doesn't own copyright on any of them.\nThe original creators of the images own the copyrights.\n\nImages published in the United States are automatically copyrighted by their owners,\neven if they do not explicitly carry a copyright warning.\nYou may not reproduce copyright images without their owner's permission,\nexcept in \"fair use\" cases,\nor you could risk running into lawyer's warnings, cease-and-desist letters, and copyright suits.\nPlease be very careful before its usage!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0FFA:B08CF:1757D7:5DC4E7:6AB92C9B"},"text_sha256":"a1693d55d81d5ee5967dadc3232b6c23a42aa10084e6b48d2fd4819647dc77ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1800","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:179506E:1BBBF38:6AB92C9E"},"commit":{"sha":"9057dad76ce4bcdd20e9c332f4172ecb7c6c0559","url":"https://github.com/hardikvasa/google-images-download/commit/9057dad76ce4bcdd20e9c332f4172ecb7c6c0559","date":"2026-05-18T05:29:54Z","author_date":"2026-05-18T05:29:54Z","committer_date":"2026-05-18T05:29:54Z","tree_sha":"add0bfadae34522efc68dc5837a98dfe2ce87ee8","message_first_line":"Migrate documentation from Sphinx/ReadTheDocs to MkDocs/GitHub Pages"},"tree_request_status":200,"tree_rate":{"github_remaining":"1799","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:18461B3:1C6CBF7:6AB92C9E"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1875,"blob_sha":"4f7439ec077dbd63b3c20252f2ecdf5e98bfa397","priority":0}],"documents":[{"path":"README.rst","size":1875,"blob_sha":"4f7439ec077dbd63b3c20252f2ecdf5e98bfa397","priority":0,"status":200,"text":"Google Images Download\n######################\n\nPython Script for 'searching' and 'downloading' hundreds of images from Google to the local hard drive!\n\nDocumentation\n=============\n\n* `Documentation Homepage <https://hardikvasa.github.io/google-images-download/>`__\n* `Installation <https://hardikvasa.github.io/google-images-download/installation/>`__\n* `Input arguments <https://hardikvasa.github.io/google-images-download/arguments/>`__\n* `Examples and Code Samples <https://hardikvasa.github.io/google-images-download/examples/>`__\n\nRequirements\n============\n\n**Chrome/Chromium browser is required** for this tool to work. Google Images now requires JavaScript execution, so Selenium with Chrome is mandatory for all downloads.\n\nInstallation:\n\n* **Linux**: ``apt-get install chromium-browser`` or ``apt-get install google-chrome-stable``\n* **macOS**: ``brew install --cask google-chrome``\n* **Windows**: Download from https://www.google.com/chrome/\n\nThe tool will automatically download and manage the chromedriver using ``webdriver-manager``.\n\nDisclaimer\n==========\n\nThis program lets you download tons of images from Google.\nPlease do not download or use any image that violates its copyright terms.\nGoogle Images is a search engine that merely indexes images and allows you to find them.\nIt does NOT produce its own images and, as such, it doesn't own copyright on any of them.\nThe original creators of the images own the copyrights.\n\nImages published in the United States are automatically copyrighted by their owners,\neven if they do not explicitly carry a copyright warning.\nYou may not reproduce copyright images without their owner's permission,\nexcept in \"fair use\" cases,\nor you could risk running into lawyer's warnings, cease-and-desist letters, and copyright suits.\nPlease be very careful before its usage! Use this script/code only for educational purposes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D2EE:324E19:18155F:5E81FF:6AB92C9E"},"text_sha256":"3c033a9555fc2c87e96d80fe925b64416ab701f5efd10f3673474d30239b69cc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"h2non/imaginary","input_row":{"repository":"h2non/imaginary","url":"https://github.com/h2non/imaginary","name":"imaginary","owner":"h2non","description":"Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing","language":"Go","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":6080,"issues":287,"created_at":"2015-03-04T18:51:40Z","updated_at":"2026-09-24T19:34:05Z","first_commit_at":"2015-03-08T23:02:33Z","last_commit_at":"2025-11-08T19:49:48Z","activity_months":128.05000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:47:59.061Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"h2non/imaginary","visibility":"public","created_at":"2015-03-04T18:51:40Z","updated_at":"2026-09-24T19:34:05Z","private":false,"fork":false,"archived":false,"stargazers_count":6080,"open_issues_count":135,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1798","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0934:767EB:1804DFD:1C2C1FC:6AB92C9F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1797","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C2:2BC4E5:1834AFB:1C5B642:6AB92C9F"},"commit":{"sha":"e558c5554027a2e4b879300a676a61f6e8a59ff6","url":"https://github.com/h2non/imaginary/commit/e558c5554027a2e4b879300a676a61f6e8a59ff6","date":"2018-05-07T14:02:33Z","author_date":"2018-05-07T14:02:33Z","committer_date":"2018-05-07T14:02:33Z","tree_sha":"2abb40349b0d653b9441d00413a5d8f20ffea581","message_first_line":"Fix typo in documentation (#202)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1796","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0873:7418C:1825FC8:1C4CDCF:6AB92C9F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":50402,"blob_sha":"df840db57000178cc8509da6a85556cf67b4235a","priority":0}],"documents":[{"path":"README.md","size":50402,"blob_sha":"df840db57000178cc8509da6a85556cf67b4235a","priority":0,"status":200,"text":"# imaginary [![Build Status](https://travis-ci.org/h2non/imaginary.png)](https://travis-ci.org/h2non/imaginary) [![Docker](https://img.shields.io/badge/docker-h2non/imaginary-blue.svg)](https://hub.docker.com/r/h2non/imaginary/) [![Docker Registry](https://img.shields.io/docker/pulls/h2non/imaginary.svg)](https://hub.docker.com/r/h2non/imaginary/) [![Go Report Card](http://goreportcard.com/badge/h2non/imaginary)](http://goreportcard.com/report/h2non/imaginary) ![ImageLayers](https://badge.imagelayers.io/h2non/imaginary.svg)\n\n<img src=\"http://s14.postimg.org/8th71a201/imaginary_world.jpg\" width=\"100%\" />\n\n**[Fast](#benchmarks) HTTP [microservice](http://microservices.io/patterns/microservices.html)** written in Go **for high-level image processing** backed by [bimg](https://github.com/h2non/bimg) and [libvips](https://github.com/jcupitt/libvips). `imaginary` can be used as private or public HTTP service for massive image processing with first-class support for [Docker](#docker) & [Heroku](#heroku).\nIt's almost dependency-free and only uses [`net/http`](http://golang.org/pkg/net/http/) native package without additional abstractions for better [performance](#performance).\n\nSupports multiple [image operations](#supported-image-operations) exposed as a simple [HTTP API](#http-api),\nwith additional optional features such as **API token authorization**, **URL signature protection**, **HTTP traffic throttle** strategy and **CORS support** for web clients.\n\n`imaginary` **can read** images **from HTTP POST payloads**, **server local path** or **remote HTTP servers**, supporting **JPEG**, **PNG**, **WEBP**, and optionally **TIFF**, **PDF**, **GIF** and **SVG** formats if `libvips@8.3+` is compiled with proper library bindings.\n\n`imaginary` is able to output images as JPEG, PNG and WEBP formats, including transparent conversion across them.\n\n`imaginary` also optionally **supports image placeholder fallback mechanism** in case of image processing error or server error of any nature, therefore an image will be always returned by the server in terms of HTTP response body and content MIME type, even in case of error, matching the expected image size and format transparently.\n\nIt uses internally `libvips`, a powerful and efficient library written in C for image processing\nwhich requires a [low memory footprint](http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use)\nand it's typically 4x faster than using the quickest ImageMagick and GraphicsMagick\nsettings or Go native `image` package, and in some cases it's even 8x faster processing JPEG images.\n\nTo get started, take a look the [installation](#installation) steps, [usage](#usage) cases and [API](#http-api) docs.\n\n## Contents\n\n- [Supported image operations](#supported-image-operations)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n  - [Docker](#docker)\n  - [Heroku](#heroku)\n  - [Cloud Foundry](#cloudfoundry)\n- [Recommended resources](#recommended-resources)\n- [Production notes](#production-notes)\n- [Scalability](#scalability)\n- [Clients](#clients)\n- [Performance](#performance)\n- [Benchmark](#benchmark)\n- [Usage](#usage)\n- [HTTP API](#http-api)\n  - [Authorization](#authorization)\n  - [URL signature](#url-signature)\n  - [Errors](#errors)\n  - [Form data](#form-data)\n  - [Params](#params)\n  - [Endpoints](#get-)\n- [Authors](#authors)\n- [License](#license)\n\n## Supported image operations\n\n- Resize\n- Enlarge\n- Crop\n- SmartCrop (based on [libvips built-in algorithm](https://github.com/jcupitt/libvips/blob/master/libvips/conversion/smartcrop.c))\n- Rotate (with auto-rotate based on EXIF orientation)\n- Flip (with auto-flip based on EXIF metadata)\n- Flop\n- Zoom\n- Thumbnail\n- Fit\n- [Pipeline](#get--post-pipeline) of multiple independent image transformations in a single HTTP request.\n- Configurable image area extraction\n- Embed/Extend image, supporting multiple modes (white, black, mirror, copy or custom background color)\n- Watermark (customizable by text)\n- Custom output color space (RGB, black/white...)\n- Format conversion (with additional quality/compression settings)\n- Info (image size, format, orientation, alpha...)\n- Reply with default or custom placeholder image in case of error.\n- Blur\n\n## Prerequisites\n\n- [libvips](https://github.com/jcupitt/libvips) 8.3+ (8.5+ recommended)\n- C compatible compiler such as gcc 4.6+ or clang 3.0+\n- Go 1.6+\n\n## Installation\n\n```bash\ngo get -u github.com/h2non/imaginary\n```\n\nAlso, be sure you have the latest version of `bimg`:\n```bash\ngo get -u gopkg.in/h2non/bimg.v1\n```\n\n### libvips\n\nRun the following script as `sudo` (supports OSX, Debian/Ubuntu, Redhat, Fedora, Amazon Linux):\n```bash\ncurl -s https://raw.githubusercontent.com/h2non/bimg/master/preinstall.sh | sudo bash -\n```\n\nThe [install script](https://github.com/h2non/bimg/blob/master/preinstall.sh) requires `curl` and `pkg-config`\n\n### Docker\n\nSee [Dockerfile](https://github.com/h2non/imaginary/blob/master/Dockerfile) for image details.\n\nFetch the image (comes with latest stable Go and `libvips` versions)\n```\ndocker pull h2non/imaginary\n```\n\nStart the container with optional flags (default listening on port 9000)\n```\ndocker run -p 9000:9000 h2non/imaginary -cors -gzip\n```\n\nStart the container in debug mode:\n```\ndocker run -p 9000:9000 -e \"DEBUG=*\" h2non/imaginary\n```\n\nEnter to the interactive shell in a running container\n```\nsudo docker exec -it <containerIdOrName> bash\n```\n\nStop the container\n```\ndocker stop h2non/imaginary\n```\n\nYou can see all the Docker tags [here](https://hub.docker.com/r/h2non/imaginary/tags/).\n\nAlternatively you may add imaginary to your `docker-compose.yml` file:\n\n```yaml\nversion: \"3\"\nservices:\n  imaginary:\n    image: h2non/imaginary:latest\n    # optionally mount a volume as local image source\n    volumes:\n      - images:/mnt/data\n    environment:\n       PORT: 9000\n    command: -enable-url-source -mount /mnt/data\n    ports:\n      - \"9000:9000\"\n```\n\n### Heroku\n\nClick on the Heroku button to easily deploy your app:\n\n[![Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\nOr alternatively you can follow the manual steps:\n\nClone this repository:\n```\ngit clone https://github.com/h2non/imaginary.git\n```\n\nSet the buildpack for your application\n```\nheroku config:add BUILDPACK_URL=https://github.com/h2non/heroku-buildpack-imaginary.git\n```\n\nOptionally, define the PKGCONFIG path:\n```\nheroku config:add PKG_CONFIG_PATH=/app/vendor/vips/lib/pkgconfig\n```\n\nAdd Heroku git remote:\n```\nheroku git:remote -a your-application\n```\n\nDeploy it!\n```\ngit push heroku master\n```\n\n### CloudFoundry\n\nAssuming you have cloudfoundry account, [bluemix](https://console.ng.bluemix.net/) or [pivotal](https://console.run.pivotal.io/) and [command line utility installed](https://github.com/cloudfoundry/cli).\n\nClone this repository:\n```\ngit clone https://github.com/h2non/imaginary.git\n```\n\nPush the application\n```\ncf push -b https://github.com/yacloud-io/go-buildpack-imaginary.git imaginary-inst01 --no-start\n```\n\nDefine the library path\n```\ncf set-env imaginary-inst01 LD_LIBRARY_PATH /home/vcap/app/vendor/vips/lib\n```\n\nStart the application\n```\ncf start imaginary-inst01\n```\n\n### Recommended resources\n\nGiven the multithreaded native nature of Go, in terms of CPUs, most cores means more concurrency and therefore, a better performance can be achieved.\nFrom the other hand, in terms of memory, 512MB of RAM is usually enough for small services with low concurrency (<5 requests/second).\nUp to 2GB for high-load HTTP service processing potentially large images or exposed to an eventual high concurrency.\n\nIf you need to expose `imaginary` as public HTTP server, it's highly recommended to protect the service against DDoS-like attacks.\n`imaginary` has built-in support for HTTP concurrency throttle strategy to deal with this in a more convenient way and mitigate possible issues limiting the number of concurrent requests per second and caching the awaiting requests, if necessary.\n\n### Production notes\n\nIn production focused environments it's highly recommended to enable the HTTP concurrency throttle strategy in your `imaginary` servers.\n\nThe recommended concurrency limit per server to guarantee a good performance is up to `20` requests per second.\n\nYou can enable it simply passing a flag to the binary:\n```\n$ imaginary -concurrency 20\n```\n\n### Scalability\n\nIf you're looking for a large scale solution for massive image processing, you should scale `imaginary` horizontally, distributing the HTTP load across a pool of imaginary servers.\n\nAssuming that you want to provide a high availability to deal efficiently with, let's say, 100 concurrent req/sec, a good approach would be using a front end balancer (e.g: HAProxy) to delegate the traffic control flow, ensure the quality of service and distribution the HTTP across a pool of servers:\n\n```\n        |==============|\n        |  Dark World  |\n        |==============|\n              ||||\n        |==============|\n        |   Balancer   |\n        |==============|\n           |       |   \n          /         \\\n         /           \\\n        /             \\\n /-----------\\   /-----------\\\n | imaginary |   | imaginary | (*n)\n \\-----------/   \\-----------/\n```\n\n## Clients\n\n- [node.js/io.js](https://github.com/h2non/node-imaginary)\n\nFeel free to send a PR if you created a client for other language.\n\n## Performance\n\nlibvips is probably the faster open source solution for image processing.\nHere you can see some performance test comparisons for multiple scenarios:\n\n- [libvips speed and memory usage](http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use)\n- [bimg](https://github.com/h2non/bimg#Performance) (Go library with C bindings to libvips)\n\n## Benchmark\n\nSee [benchmark.sh](https://github.com/h2non/imaginary/blob/master/benchmark.sh) for more details\n\nEnvironment: Go 1.4.2. libvips-7.42.3. OSX i7 2.7Ghz\n\n```\nRequests  [total]       200\nDuration  [total, attack, wait]   10.030639787s, 9.949499515s, 81.140272ms\nLatencies [mean, 50, 95, 99, max]   83.124471ms, 82.899435ms, 88.948008ms, 95.547765ms, 104.384977ms\nBytes In  [total, mean]     23443800, 117219.00\nBytes Out [total, mean]     175517000, 877585.00\nSuccess   [ratio]       100.00%\nStatus Codes  [code:count]      200:200\n```\n\n### Conclusions\n\n`imaginary` can deal efficiently with up to 20 request per second running in a multicore machine,\nwhere it crops a JPEG image of 5MB and spending per each request less than 100 ms\n\nThe most expensive image operation under high concurrency scenarios (> 20 req/sec) is the image enlargement, which requires a considerable amount of math operations to scale the original image. In this kind of operation the required processing time usually grows over the time if you're stressing the server continuously. The advice here is as simple as taking care about the number of concurrent enlarge operations to avoid server performance bottlenecks.\n\n## Command-line usage\n\n```\nUsage:\n  imaginary -p 80\n  imaginary -cors\n  imaginary -concurrency 10\n  imaginary -path-prefix /api/v1\n  imaginary -enable-url-source\n  imaginary -disable-endpoints form,health,crop,rotate\n  imaginary -enable-url-source -allowed-origins http://localhost,http://server.com\n  imaginary -enable-url-source -enable-auth-forwarding\n  imaginary -enable-url-source -authorization \"Basic AwDJdL2DbwrD==\"\n  imaginary -enable-placeholder\n  imaginary -enable-url-source -placeholder ./placeholder.jpg\n  imaginary -enable-url-signature -url-signature-key 4f46feebafc4b5e988f131c4ff8b5997\n  imaginary -h | -help\n  imaginary -v | -version\n\nOptions:\n  -a <addr>                 Bind address [default: *]\n  -p <port>                 Bind port [default: 8088]\n  -h, -help                 Show help\n  -v, -version              Show version\n  -path-prefix <value>      Url path prefix to listen to [default: \"/\"]\n  -cors                     Enable CORS support [default: false]\n  -gzip                     Enable gzip compression (deprecated) [default: false]\n  -disable-endpoints        Comma separated endpoints to disable. E.g: form,crop,rotate,health [default: \"\"]\n  -key <key>                Define API key for authorization\n  -mount <path>             Mount server local directory\n  -http-cache-ttl <num>     The TTL in seconds. Adds caching headers to locally served files.\n  -http-read-timeout <num>  HTTP read timeout in seconds [default: 30]\n  -http-write-timeout <num> HTTP write timeout in seconds [default: 30]\n  -enable-url-source        Restrict remote image source processing to certain origins (separated by commas)\n  -enable-placeholder       Enable image response placeholder to be used in case of error [default: false]\n  -enable-auth-forwarding   Forwards X-Forward-Authorization or Authorization header to the image source server. -enable-url-source flag must be defined. Tip: secure your server from public access to prevent attack vectors\n  -enable-url-signature     Enable URL signature (URL-safe Base64-encoded HMAC digest) [default: false]\n  -url-signature-key        The URL signature key (32 characters minimum)\n  -allowed-origins <urls>   Restrict remote image source processing to certain origins (separated by commas)\n  -max-allowed-size <bytes> Restrict maximum size of http image source (in bytes)\n  -certfile <path>          TLS certificate file path\n  -keyfile <path>           TLS private key file path\n  -authorization <value>    Defines a constant Authorization header value passed to all the image source servers. -enable-url-source flag must be defined. This overwrites authorization headers forwarding behavior via X-Forward-Authorization\n  -placeholder <path>       Image path to image custom placeholder to be used in case of error. Recommended minimum image size is: 1200x1200\n  -concurrency <num>        Throttle concurrency limit per second [default: disabled]\n  -burst <num>              Throttle burst max cache size [default: 100]\n  -mrelease <num>           OS memory release interval in seconds [default: 30]\n  -cpus <num>               Number of used cpu cores.\n                            (default for current machine is 8 cores)\n```\n\nStart the server in a custom port:\n```bash\nimaginary -p 8080\n```\n\nAlso, you can pass the port as environment variable:\n```bash\nPORT=8080 imaginary\n```\n\nEnable HTTP server throttle strategy (max 10 requests/second):\n```\nimaginary -p 8080 -concurrency 10\n```\n\nEnable remote URL image fetching (then you can do GET request passing the `url=http://server.com/image.jpg` query param):\n```\nimaginary -p 8080 -enable-url-source\n```\n\nMount local directory (then you can do GET request passing the `file=image.jpg` query param):\n```\nimaginary -p 8080 -mount ~/images\n```\n\nEnable authorization header forwarding to image origin server. `X-Forward-Authorization` or `Authorization` (by priority) header value will be forwarded as `Authorization` header to the target origin server, if one of those headers are present in the incoming HTTP request.\nSecurity tip: secure your server from public access to prevent attack vectors when enabling this option:\n```\nimaginary -p 8080 -enable-url-source -enable-auth-forwarding\n```\n\nOr alternatively you can manually define an constant Authorization header value that will be always sent when fetching images from remote image origins. If defined, `X-Forward-Authorization` or `Authorization` headers won't be forwarded, and therefore ignored, if present.\n**Note**:\n```\nimaginary -p 8080 -enable-url-source -authorization \"Bearer s3cr3t\"\n```\n\nSend fixed caching headers in the response. The headers can be set in either \"cache nothing\" or \"cache for N seconds\". By specifying `0` imaginary will send the \"don't cache\" headers, otherwise it sends headers with a TTL. The following example informs the client to cache the result for 1 year:\n```\nimaginary -p 8080 -enable-url-source -http-cache-ttl 31556926\n```\n\nEnable placeholder image HTTP responses in case of server error/bad request.\nThe placeholder image will be dynamically and transparently resized matching the expected image `width`x`height` define in the HTTP request params.\nAlso, the placeholder image will be also transparently converted to the desired image type defined in the HTTP request params, so the API contract should be maintained as much better as possible.\n\nThis feature is particularly useful when using `imaginary` as public HTTP service consumed by Web clients.\nIn case of error, the appropriate HTTP status code will be used to reflect the error, and the error details will be exposed serialized as JSON in the `Error` response HTTP header, for further inspection and convenience for API clients.\n```\nimaginary -p 8080 -enable-placeholder -enable-url-source\n```\n\nYou can optionally use a custom placeholder image.\nSince the placeholder image should fit a variety of different sizes, it's recommended to use a large image, such as `1200`x`1200`.\nSupported custom placeholder image types are: `JPEG`, `PNG` and `WEBP`.\n```\nimaginary -p 8080 -placeholder=placeholder.jpg -enable-url-source\n```\n\nEnable URL signature (URL-safe Base64-encoded HMAC digest).\n\nThis feature is particularly useful to protect against multiple image operations attacks and to verify the requester identity.\n```\nimaginary -p 8080 -enable-url-signature -url-signature-key 4f46feebafc4b5e988f131c4ff8b5997\n```\n\nIt is recommanded to pass key as environment variables:\n```\nURL_SIGNATURE_KEY=4f46feebafc4b5e988f131c4ff8b5997 imaginary -p 8080 -enable-url-signature\n```\n\nIncrease libvips threads concurrency (experimental):\n```\nVIPS_CONCURRENCY=10 imaginary -p 8080 -concurrency 10\n```\n\nEnable debug mode:\n```\nDEBUG=* imaginary -p 8080\n```\n\nOr filter debug output by package:\n```\nDEBUG=imaginary imaginary -p 8080\n```\n\n#### Examples\n\nReading a local image (you must pass the `-mount=<directory>` flag):\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=400&file=foo/bar/image.jpg\"\n```\n\nFetching the image from a remote server (you must pass the `-enable-url-source` flag):\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=400&url=https://raw.githubusercontent.com/h2non/imaginary/master/testdata/large.jpg\"\n```\n\nCrop behaviour can be influenced with the `gravity` parameter. You can specify a preference for a certain region (north, south, etc.). To enable Smart Crop you can specify the value \"smart\" to autodetect the most interesting section to consider as center point for the crop operation:\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=200&gravity=smart&url=https://raw.githubusercontent.com/h2non/imaginary/master/testdata/smart-crop.jpg\"\n```\n\n\n#### Playground\n\n`imaginary` exposes an ugly HTML form for playground purposes in: [`http://localhost:8088/form`](http://localhost:8088/form)\n\n## HTTP API\n\n### Authorization\n\nimaginary supports a simple token-based API authorization.\nTo enable it, you should pass the `-key` flag to the binary.\n\nAPI token can be defined as HTTP header (`API-Key`) or query param (`key`).\n\nExample request with API key:\n```\nPOST /crop HTTP/1.1\nHost: localhost:8088\nAPI-Key: secret\n```\n\n### URL signature\n\nThe URL signature is provided by the `sign` request parameter.\n\nThe HMAC-SHA256 hash is created by taking the URL path (including the leading /), the request parameters (alphabetically-sorted and concatenated with & into a string). The hash is then base64url-encoded.\n\nHere an example in Go:\n```\nsignKey  := \"4f46feebafc4b5e988f131c4ff8b5997\"\nurlPath  := \"/resize\"\nurlQuery := \"file=image.jpg&height=200&type=jpeg&width=300\"\n\nh := hmac.New(sha256.New, []byte(signKey))\nh.Write([]byte(urlPath))\nh.Write([]byte(urlQuery))\nbuf := h.Sum(nil)\n\nfmt.Println(\"sign=\" + base64.RawURLEncoding.EncodeToString(buf))\n```\n\n### Errors\n\n`imaginary` will always reply with the proper HTTP status code and JSON body with error details.\n\nHere an example response error when the payload is empty:\n```json\n{\n  \"message\": \"Cannot read payload: no such file\",\n  \"code\": 1\n}\n```\n\nSee all the predefined supported errors [here](https://github.com/h2non/imaginary/blob/master/error.go#L19-L28).\n\n#### Placeholder\n\nIf `-enable-placeholder` or `-placeholder <image path>` flags are passed to `imaginary`, a placeholder image will be used in case of error or invalid request input.\n\nIf `-enable-placeholder` is passed, the default `imaginary` placeholder image will be used, however you can customized it via `-placeholder` flag, loading a custom compatible image from the file system.\n\nSince `imaginary` has been partially designed to be used as public HTTP service, including web pages, in certain scenarios the response MIME type must be respected,\nso the server will always reply with a placeholder image in case of error, such as image processing error, read error, payload error, request invalid request or any other.\n\nYou can customize the placeholder image passing the `-placeholder <image path>` flag when starting `imaginary`.\n\nIn this scenarios, the error message details will be exposed in the `Error` response header field as JSON for further inspection from API clients.\n\nIn some edge cases the placeholder image resizing might fail, so a 400 Bad Request will be used as response status and the `Content-Type` will be `application/json` with the proper message info. Note that this scenario won't be common.\n\n### Form data\n\nIf you're pushing images to `imaginary` as `multipart/form-data` (you can do it as well as `image/*`), you must define at least one input field called `file` with the raw image data in order to be processed properly by imaginary.\n\n### Params\n\nComplete list of available params. Take a look to each specific endpoint to see which params are supported.\nImage measures are always in pixels, unless otherwise indicated.\n\n- **width**       `int`   - Width of image area to extract/resize\n- **height**      `int`   - Height of image area to extract/resize\n- **top**         `int`   - Top edge of area to extract. Example: `100`\n- **left**        `int`   - Left edge of area to extract. Example: `100`\n- **areawidth**   `int`   - Height area to extract. Example: `300`\n- **areaheight**  `int`   - Width area to extract. Example: `300`\n- **quality**     `int`   - JPEG image quality between 1-100. Defaults to `80`\n- **compression** `int`   - PNG compression level. Default: `6`\n- **rotate**      `int`   - Image rotation angle. Must be multiple of `90`. Example: `180`\n- **factor**      `int`   - Zoom factor level. Example: `2`\n- **margin**      `int`   - Text area margin for watermark. Example: `50`\n- **dpi**         `int`   - DPI value for watermark. Example: `150`\n- **textwidth**   `int`   - Text area width for watermark. Example: `200`\n- **opacity**     `float` - Opacity level for watermark text. Default: `0.2`\n- **flip**        `bool`  - Transform the resultant image with flip operation. Default: `false`\n- **flop**        `bool`  - Transform the resultant image with flop operation. Default: `false`\n- **force**       `bool`  - Force image transformation size. Default: `false`\n- **nocrop**      `bool`  - Disable crop transformation enabled by default by some operations. Default: `false`\n- **noreplicate** `bool`  - Disable text replication in watermark. Defaults to `false`\n- **norotation**  `bool`  - Disable auto rotation based on EXIF orientation. Defaults to `false`\n- **noprofile**   `bool`  - Disable adding ICC profile metadata. Defaults to `false`\n- **stripmeta**   `bool`  - Remove original image metadata, such as EXIF metadata. Defaults to `false`\n- **text**        `string` - Watermark text content. Example: `copyright (c) 2189`\n- **font**        `string` - Watermark text font type and format. Example: `sans bold 12`\n- **color**       `string` - Watermark text RGB decimal base color. Example: `255,200,150`\n- **type**        `string` - Specify the image format to output. Possible values are: `jpeg`, `png`, `webp` and `auto`. `auto` will use the preferred format requested by the client in the HTTP Accept header. A client can provide multiple comma-separated choices in `Accept` with the best being the one picked.\n- **gravity**     `string` - Define the crop operation gravity. Supported values are: `north`, `south`, `centre`, `west`, `east` and `smart`. Defaults to `centre`.\n- **file**        `string` - Use image from server local file path. In order to use this you must pass the `-mount=<dir>` flag.\n- **url**         `string` - Fetch the image from a remote HTTP server. In order to use this you must pass the `-enable-url-source` flag.\n- **colorspace**  `string` - Use a custom color space for the output image. Allowed values are: `srgb` or `bw` (black&white)\n- **field**       `string` - Custom image form field name if using `multipart/form`. Defaults to: `file`\n- **extend**      `string` - Extend represents the image extend mode used when the edges of an image are extended. Allowed values are: `black`, `copy`, `mirror`, `white` and `background`. If `background` value is specified, you can define the desired extend RGB color via `background` param, such as `?extend=background&background=250,20,10`. For more info, see [libvips docs](http://www.vips.ecs.soton.ac.uk/supported/8.4/doc/html/libvips/libvips-conversion.html#VIPS-EXTEND-BACKGROUND:CAPS).\n- **background**  `string` - Background RGB decimal base color to use when flattening transparent PNGs. Example: `255,200,150`\n- **sigma**       `float`  - Size of the gaussian mask to use when blurring an image. Example: `15.0`\n- **minampl**     `float`  - Minimum amplitude of the gaussian filter to use when blurring an image. Default: Example: `0.5`\n- **operations**  `json`   - Pipeline of image operation transformations defined as URL safe encoded JSON array. See [pipeline](#get--post-pipeline) endpoints for more details.\n- **sign**        `string` - URL signature (URL-safe Base64-encoded HMAC digest)\n\n#### GET /\nContent-Type: `application/json`\n\nServes as JSON the current `imaginary`, `bimg` and `libvips` versions.\n\nExample response:\n```json\n{\n  \"imaginary\": \"0.1.28\",\n  \"bimg\": \"1.0.5\",\n  \"libvips\": \"8.4.1\"\n}\n```\n\n#### GET /health\nContent-Type: `application/json`\n\nProvides some useful statistics about the server stats with the following structure:\n\n- **uptime** `number` - Server process uptime in seconds.\n- **allocatedMemory** `number` - Currently allocated memory in megabytes.\n- **totalAllocatedMemory** `number` - Total allocated memory over the time in megabytes.\n- **goroutines** `number` - Number of running goroutines.\n- **cpus** `number` - Number of used CPU cores.\n\nExample response:\n```json\n{\n  \"uptime\": 1293,\n  \"allocatedMemory\": 5.31,\n  \"totalAllocatedMemory\": 34.3,\n  \"goroutines\": 19,\n  \"cpus\": 8\n}\n```\n\n#### GET /form\nContent Type: `text/html`\n\nServes an ugly HTML form, just for testing/playground purposes\n\n#### GET | POST /info\nAccepts: `image/*, multipart/form-data`. Content-Type: `application/json`\n\nReturns the image metadata as JSON:\n```json\n{\n  \"width\": 550,\n  \"height\": 740,\n  \"type\": \"jpeg\",\n  \"space\": \"srgb\",\n  \"hasAlpha\": false,\n  \"hasProfile\": true,\n  \"channels\": 3,\n  \"orientation\": 1\n}\n```\n\n#### GET | POST /crop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nCrop the image by a given width or height. Image ratio is maintained\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- force `bool`\n- rotate `int`\n- embed `bool`\n- norotation `bool`\n- noprofile `bool`\n- flip `bool`\n- flop `bool`\n- stripmeta `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- gravity `string`\n- field `string` - Only POST and `multipart/form` payloads\n\n\n#### GET | POST /smartcrop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nCrop the image by a given width or height using the [libvips](https://github.com/jcupitt/libvips/blob/master/libvips/conversion/smartcrop.c) built-in smart crop algorithm.\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- force `bool`\n- rotate `int`\n- embed `bool`\n- norotation `bool`\n- noprofile `bool`\n- flip `bool`\n- flop `bool`\n- stripmeta `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- gravity `string`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /resize\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nResize an image by width or height. Image aspect ratio is maintained\n\n##### Allowed params\n\n- width `int` `required`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /enlarge\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int` `required`\n- height `int` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /extract\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- top `int` `required`\n- left `int`\n- areawidth `int` `required`\n- areaheight `int`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /zoom\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- factor `number` `required`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /thumbnail\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /fit\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nResize an image to fit within width and height, without cropping. Image aspect ratio is maintained\nThe width and height specify a maximum bounding box for the image.\n\n##### Allowed params\n\n- width `int` `required`\n- height `int` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /rotate\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- rotate `int` `required`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /flip\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /flop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /convert\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- type `string` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /pipeline\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nThis endpoint allow the user to declare a pipeline of multiple independent image transformation operations all in a single HTTP request.\n\n**Note**: a maximum of 10 independent operations are current allowed within the same HTTP request.\n\nInternally, it operates pretty much as a sequential reducer pattern chain, where given an input image and a set of operations, for each independent image operation iteration, the output result image will be passed to the next one, as the accumulated result, until finishing all the operations.\n\nIn imperative programming, this would be pretty much analog to the following code:\n```js\nvar image\nfor operation in operations {\n  image = operation.Run(image, operation.Options)\n}\n```\n\n##### Allowed params\n\n- operations `json` `required` - URL safe encoded JSON with a list of operations. See below for interface details.\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n\n##### Operations JSON specification\n\nSelf-documented JSON operation schema:\n```js\n[\n  {\n    \"operation\": string, // Operation name identifier. Required.\n    \"ignore_failure\": boolean, // Ignore error in case of failure and continue with the next operation. Optional.\n    \"params\": map[string]mixed, // Object defining operation specific image transformation params, same as supported URL query params per each endpoint.\n  }\n]\n```\n\n###### Supported operations names\n\n- **crop** - Same as [`/crop`](#get--post-crop) endpoint.\n- **smartcrop** - Same as [`/smartcrop`](#get--post-smartcrop) endpoint.\n- **resize** - Same as [`/resize`](#get--post-resize) endpoint.\n- **enlarge** - Same as [`/enlarge`](#get--post-enlarge) endpoint.\n- **extract** - Same as [`/extract`](#get--post-extract) endpoint.\n- **rotate** - Same as [`/rotate`](#get--post-rotate) endpoint.\n- **flip** - Same as [`/flip`](#get--post-flip) endpoint.\n- **flop** - Same as [`/flop`](#get--post-flop) endpoint.\n- **thumbnail** - Same as [`/thumbnail`](#get--post-thumbnail) endpoint.\n- **zoom** - Same as [`/zoom`](#get--post-zoom) endpoint.\n- **convert** - Same as [`/convert`](#get--post-convert) endpoint.\n- **watermark** - Same as [`/watermark`](#get--post-watermark) endpoint.\n- **blur** - Same as [`/blur`](#get--post-blur) endpoint.\n\n###### Example\n\n```json\n[\n  {\n    \"operation\": \"crop\",\n    \"params\": {\n      \"width\": 500,\n      \"height\": 300\n    }\n  },\n  {\n    \"operation\": \"watermark\",\n    \"params\": {\n      \"text\": \"I need some covfete\",\n      \"font\": \"Verdana\",\n      \"textwidth\": 100,\n      \"opacity\": 0.8\n    }\n  },\n  {\n    \"operation\": \"rotate\",\n    \"params\": {\n      \"rotate\": 180\n    }\n  },\n  {\n    \"operation\": \"convert\",\n    \"params\": {\n      \"type\": \"webp\"\n    }\n  }\n]\n```\n\n#### GET | POST /watermark\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- text `string` `required`\n- margin `int`\n- dpi `int`\n- textwidth `int`\n- opacity `float`\n- noreplicate `bool`\n- font `string`\n- color `string`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n\n#### GET | POST /blur\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- sigma `float` `required`\n- minampl `float`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- field `string` - Only POST and `multipart/form` payloads\n\n## Support\n\n### Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/imaginary#backer)]\n\n<a href=\"https://opencollective.com/imaginary/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/29/avatar.svg\"><\/a>\n\n### Support this project\n\n[![OpenCollective](https://opencollective.com/imaginary/backers/badge.svg)](#backers)\n\n### Sponsors\n\nBecome a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/imaginary#sponsor)]\n\n<a href=\"https://opencollective.com/imaginary/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/29/avatar.svg\"><\/a>\n\n## Authors\n\n- [Tomás Aparicio](https://github.com/h2non) - Original author and maintainer.\n- [Kirill Danshin](https://github.com/kirillDanshin) - Co-maintainer since April 2017.\n\n## License\n\nMIT - Tomas Aparicio\n\n[![views](https://sourcegraph.com/api/repos/github.com/h2non/imaginary/.counters/views.svg)](https://sourcegraph.com/github.com/h2non/imaginary)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFD2:376DE:181927:5E874E:6AB92C9F"},"text_sha256":"a93f04979df290891f5dbcb39910b11c67cf045cacca211a5eb231d7aee53b23"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1795","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0889:2D7D17:1793DE5:1BB915D:6AB92CA1"},"commit":{"sha":"6a274b488759a896aff02f52afee6e50b5e3a3ee","url":"https://github.com/h2non/imaginary/commit/6a274b488759a896aff02f52afee6e50b5e3a3ee","date":"2025-11-08T19:49:48Z","author_date":"2025-11-08T19:49:48Z","committer_date":"2025-11-08T19:49:48Z","tree_sha":"06d7604a0425e88da93b6991c664918a721c9b6d","message_first_line":"fix: Dockerfile build errors (#446)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1794","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:18036FD:1C2A7B8:6AB92CA1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":57731,"blob_sha":"52e48bd5a9751dd7606f4426375357ce1fdfb308","priority":0}],"documents":[{"path":"README.md","size":57731,"blob_sha":"52e48bd5a9751dd7606f4426375357ce1fdfb308","priority":0,"status":200,"text":"# imaginary [![Docker](https://img.shields.io/badge/docker-h2non/imaginary-blue.svg)](https://hub.docker.com/r/h2non/imaginary/) [![Docker Registry](https://img.shields.io/docker/pulls/h2non/imaginary.svg)](https://hub.docker.com/r/h2non/imaginary/) [![Fly.io](https://img.shields.io/badge/deploy-fly.io-blue.svg)](https://fly.io/launch/github/h2non/imaginary)\n\n**[Fast](#benchmarks) HTTP [microservice](http://microservices.io/patterns/microservices.html)** written in Go **for high-level image processing** backed by [bimg](https://github.com/h2non/bimg) and [libvips](https://github.com/jcupitt/libvips). `imaginary` can be used as private or public HTTP service for massive image processing with first-class support for [Docker](#docker) & [Fly.io](#flyio).\nIt's almost dependency-free and only uses [`net/http`](http://golang.org/pkg/net/http/) native package without additional abstractions for better [performance](#performance).\n\nSupports multiple [image operations](#supported-image-operations) exposed as a simple [HTTP API](#http-api),\nwith additional optional features such as **API token authorization**, **URL signature protection**, **HTTP traffic throttle** strategy and **CORS support** for web clients.\n\n`imaginary` **can read** images **from HTTP POST payloads**, **server local path** or **remote HTTP servers**, supporting **JPEG**, **PNG**, **WEBP**, **HEIF**, and optionally **TIFF**, **PDF**, **GIF** and **SVG** formats if `libvips@8.3+` is compiled with proper library bindings.\n\n`imaginary` is able to output images as JPEG, PNG and WEBP formats, including transparent conversion across them.\n\n`imaginary` optionally **supports image placeholder fallback mechanism** in case of image processing error or server error of any nature, hence an image will be always returned by imaginary even in case of error, trying to match the requested image size and format type transparently. The error details will be provided in the response HTTP header `Error` field serialized as JSON.\n\n`imaginary` uses internally `libvips`, a powerful and efficient library written in C for fast image processing\nwhich requires a [low memory footprint](https://github.com/libvips/libvips/wiki/Benchmarks)\nand it's typically 4x faster than using the quickest ImageMagick and GraphicsMagick\nsettings or Go native `image` package, and in some cases it's even 8x faster processing JPEG images.\n\nTo get started, take a look the [installation](#installation) steps, [usage](#command-line-usage) cases and [API](#http-api) docs.\n\n## Contents\n\n- [Supported image operations](#supported-image-operations)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n  - [Docker](#docker)\n  - [Fly.io](#flyio)\n  - [Cloud Foundry](#cloudfoundry)\n  - [Google Cloud Run](#google-cloud-run)\n- [Recommended resources](#recommended-resources)\n- [Production notes](#production-notes)\n- [Scalability](#scalability)\n- [Clients](#clients)\n- [Performance](#performance)\n- [Benchmark](#benchmark)\n- [Command-line usage](#command-line-usage)\n- [HTTP API](#http-api)\n  - [Authorization](#authorization)\n  - [URL signature](#url-signature)\n  - [Errors](#errors)\n  - [Form data](#form-data)\n  - [Params](#params)\n  - [Endpoints](#get-)\n- [Logging](#logging)\n  - [Fluentd log ingestion](#fluentd-log-ingestion)\n- [Authors](#authors)\n- [License](#license)\n\n## Supported image operations\n\n- Resize\n- Enlarge\n- Crop\n- SmartCrop (based on [libvips built-in algorithm](https://github.com/jcupitt/libvips/blob/master/libvips/conversion/smartcrop.c))\n- Rotate (with auto-rotate based on EXIF orientation)\n- AutoRotate with further image transformations (based on EXIF metadata orientation)\n- Flip (with auto-flip based on EXIF metadata)\n- Flop\n- Zoom\n- Thumbnail\n- Fit\n- [Pipeline](#get--post-pipeline) of multiple independent image transformations in a single HTTP request.\n- Configurable image area extraction\n- Embed/Extend image, supporting multiple modes (white, black, mirror, copy or custom background color)\n- Watermark (customizable by text)\n- Watermark image\n- Custom output color space (RGB, black/white...)\n- Format conversion (with additional quality/compression settings)\n- Info (image size, format, orientation, alpha...)\n- Reply with default or custom placeholder image in case of error.\n- Blur\n\n## Prerequisites\n\n- [libvips](https://github.com/jcupitt/libvips) 8.8+ (8.9+ recommended)\n- C compatible compiler such as gcc 4.6+ or clang 3.0+\n- Go 1.12+\n\n## Installation\n\n```bash\ngo get -u github.com/h2non/imaginary\n```\n\nAlso, be sure you have the latest version of `bimg`:\n```bash\ngo get -u github.com/h2non/bimg\n```\n\n### libvips\n\nRun the following script as `sudo` (supports OSX, Debian/Ubuntu, Redhat, Fedora, Amazon Linux):\n```bash\ncurl -s https://raw.githubusercontent.com/h2non/bimg/master/preinstall.sh | sudo bash -\n```\n\nThe [install script](https://github.com/h2non/bimg/blob/master/preinstall.sh) requires `curl` and `pkg-config`\n\n### Docker\n\nSee [Dockerfile](https://github.com/h2non/imaginary/blob/master/Dockerfile) for image details.\n\nFetch the image (comes with latest stable Go and `libvips` versions)\n```\ndocker pull h2non/imaginary\n```\n\nStart the container with optional flags (default listening on port 9000)\n```\ndocker run -p 9000:9000 h2non/imaginary -cors\n```\n\nStart the container enabling remote URL source image processing via GET requests and `url` query param.\n```\ndocker run -p 9000:9000 h2non/imaginary -p 9000 -enable-url-source\n```\n\nStart the container enabling local directory image process via GET requests and `file` query param.\n```\ndocker run -p 9000:9000 h2non/imaginary -p 900 -mount /volume/images\n```\n\nStart the container in debug mode:\n```\ndocker run -p 9000:9000 -e \"DEBUG=*\" h2non/imaginary\n```\n\nEnter to the interactive shell in a running container\n```\nsudo docker exec -it <containerIdOrName> bash\n```\n\nStop the container\n```\ndocker stop h2non/imaginary\n```\n\nFor more usage examples, see the [command line usage](#command-line-usage).\n\nAll Docker images tags are available [here](https://hub.docker.com/r/h2non/imaginary/tags/).\n\n#### Docker Compose\n\nYou can add `imaginary` to your `docker-compose.yml` file:\n\n```yaml\nversion: \"3\"\nservices:\n  imaginary:\n    image: h2non/imaginary:latest\n    # optionally mount a volume as local image source\n    volumes:\n      - images:/mnt/data\n    environment:\n       PORT: 9000\n    command: -enable-url-source -mount /mnt/data\n    ports:\n      - \"9000:9000\"\n```\n\n### Fly.io\n\nDeploy imaginary in seconds close to your users in [Fly.io](https://fly.io) cloud by clicking on the button below:\n\n<a href=\"https://fly.io/docs/app-guides/run-a-global-image-service/\">\n  <img src=\"testdata/flyio-button.svg?raw=true\" width=\"200\">\n<\/a>\n\n#### About Fly.io\n\nFly is a platform for applications that need to run globally. It runs your code close to users and scales compute in cities where your app is busiest. Write your code, package it into a Docker image, deploy it to Fly's platform and let that do all the work to keep your app snappy.\n\nYou can [learn more](https://fly.io/docs/) about how Fly.io can reduce latency and provide a better experience by serving traffic close to your users location.\n\n#### Global image service tutorial\n\n[Learn more](https://fly.io/docs/app-guides/run-a-global-image-service/) about how to run a custom deployment of imaginary on the Fly.io cloud.\n\n### CloudFoundry\n\nAssuming you have cloudfoundry account, [bluemix](https://console.ng.bluemix.net/) or [pivotal](https://console.run.pivotal.io/) and [command line utility installed](https://github.com/cloudfoundry/cli).\n\nClone this repository:\n```\ngit clone https://github.com/h2non/imaginary.git\n```\n\nPush the application\n```\ncf push -b https://github.com/yacloud-io/go-buildpack-imaginary.git imaginary-inst01 --no-start\n```\n\nDefine the library path\n```\ncf set-env imaginary-inst01 LD_LIBRARY_PATH /home/vcap/app/vendor/vips/lib\n```\n\nStart the application\n```\ncf start imaginary-inst01\n```\n\n### Google Cloud Run\n\nClick to deploy on Google Cloud Run:\n\n[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)\n\n### Recommended resources\n\nGiven the multithreaded native nature of Go, in terms of CPUs, most cores means more concurrency and therefore, a better performance can be achieved.\nFrom the other hand, in terms of memory, 512MB of RAM is usually enough for small services with low concurrency (<5 requests/second).\nUp to 2GB for high-load HTTP service processing potentially large images or exposed to an eventual high concurrency.\n\nIf you need to expose `imaginary` as public HTTP server, it's highly recommended to protect the service against DDoS-like attacks.\n`imaginary` has built-in support for HTTP concurrency throttle strategy to deal with this in a more convenient way and mitigate possible issues limiting the number of concurrent requests per second and caching the awaiting requests, if necessary.\n\n### Production notes\n\nIn production focused environments it's highly recommended to enable the HTTP concurrency throttle strategy in your `imaginary` servers.\n\nThe recommended concurrency limit per server to guarantee a good performance is up to `20` requests per second.\n\nYou can enable it simply passing a flag to the binary:\n```\n$ imaginary -concurrency 20\n```\n\n### Memory issues\n\nIn case you are experiencing any persistent unreleased memory issues in your deployment, you can try passing this environment variables to `imaginary`:\n\n```\nMALLOC_ARENA_MAX=2 imaginary -p 9000 -enable-url-source\n```\n\n### Graceful shutdown\n\nWhen you use a cluster, it is necessary to control how the deployment is executed, and it is very useful to finish the containers in a controlled manner.\n\nYou can use the next command:\n\n```\n$ ps auxw | grep 'bin/imaginary' | awk 'NR>1{print buf}{buf = $2}' | xargs kill -TERM > /dev/null 2>&1\n```\n\n### Scalability\n\nIf you're looking for a large scale solution for massive image processing, you should scale `imaginary` horizontally, distributing the HTTP load across a pool of imaginary servers.\n\nAssuming that you want to provide a high availability to deal efficiently with, let's say, 100 concurrent req/sec, a good approach would be using a front end balancer (e.g: HAProxy) to delegate the traffic control flow, ensure the quality of service and distribution the HTTP across a pool of servers:\n\n```\n        |==============|\n        |  Dark World  |\n        |==============|\n              ||||\n        |==============|\n        |   Balancer   |\n        |==============|\n           |       |\n          /         \\\n         /           \\\n        /             \\\n /-----------\\   /-----------\\\n | imaginary |   | imaginary | (*n)\n \\-----------/   \\-----------/\n```\n\n## Clients\n\n- [node.js](https://github.com/h2non/node-imaginary)\n\nFeel free to send a PR if you created a client for other language.\n\n## Performance\n\nlibvips is probably the faster open source solution for image processing.\nHere you can see some performance test comparisons for multiple scenarios:\n\n- [libvips speed and memory usage](https://github.com/libvips/libvips/wiki/Benchmarks)\n- [bimg](https://github.com/h2non/bimg#Performance) (Go library with C bindings to libvips)\n\n## Benchmark\n\nSee [benchmark.sh](https://github.com/h2non/imaginary/blob/master/benchmark.sh) for more details\n\nEnvironment: Go 1.4.2. libvips-7.42.3. OSX i7 2.7Ghz\n\n```\nRequests  [total]       200\nDuration  [total, attack, wait]   10.030639787s, 9.949499515s, 81.140272ms\nLatencies [mean, 50, 95, 99, max]   83.124471ms, 82.899435ms, 88.948008ms, 95.547765ms, 104.384977ms\nBytes In  [total, mean]     23443800, 117219.00\nBytes Out [total, mean]     175517000, 877585.00\nSuccess   [ratio]       100.00%\nStatus Codes  [code:count]      200:200\n```\n\n### Conclusions\n\n`imaginary` can deal efficiently with up to 20 request per second running in a multicore machine,\nwhere it crops a JPEG image of 5MB and spending per each request less than 100 ms\n\nThe most expensive image operation under high concurrency scenarios (> 20 req/sec) is the image enlargement, which requires a considerable amount of math operations to scale the original image. In this kind of operation the required processing time usually grows over the time if you're stressing the server continuously. The advice here is as simple as taking care about the number of concurrent enlarge operations to avoid server performance bottlenecks.\n\n## Command-line usage\n\n```\nUsage:\n  imaginary -p 80\n  imaginary -cors\n  imaginary -concurrency 10\n  imaginary -path-prefix /api/v1\n  imaginary -enable-url-source\n  imaginary -disable-endpoints form,health,crop,rotate\n  imaginary -enable-url-source -allowed-origins http://localhost,http://server.com,http://*.example.org\n  imaginary -enable-url-source -enable-auth-forwarding\n  imaginary -enable-url-source -authorization \"Basic AwDJdL2DbwrD==\"\n  imaginary -enable-placeholder\n  imaginary -enable-url-source -placeholder ./placeholder.jpg\n  imaginary -enable-url-signature -url-signature-key 4f46feebafc4b5e988f131c4ff8b5997\n  imaginary -enable-url-source -forward-headers X-Custom,X-Token\n  imaginary -h | -help\n  imaginary -v | -version\n\nOptions:\n  -a <addr>                 Bind address [default: *]\n  -p <port>                 Bind port [default: 8088]\n  -h, -help                 Show help\n  -v, -version              Show version\n  -path-prefix <value>      Url path prefix to listen to [default: \"/\"]\n  -cors                     Enable CORS support [default: false]\n  -gzip                     Enable gzip compression (deprecated) [default: false]\n  -disable-endpoints        Comma separated endpoints to disable. E.g: form,crop,rotate,health [default: \"\"]\n  -key <key>                Define API key for authorization\n  -mount <path>             Mount server local directory\n  -http-cache-ttl <num>     The TTL in seconds. Adds caching headers to locally served files.\n  -http-read-timeout <num>  HTTP read timeout in seconds [default: 60]\n  -http-write-timeout <num> HTTP write timeout in seconds [default: 60]\n  -enable-url-source        Enable remote HTTP URL image source processing (?url=http://..)\n  -enable-placeholder       Enable image response placeholder to be used in case of error [default: false]\n  -enable-auth-forwarding   Forwards X-Forward-Authorization or Authorization header to the image source server. -enable-url-source flag must be defined. Tip: secure your server from public access to prevent attack vectors\n  -forward-headers          Forwards custom headers to the image source server. -enable-url-source flag must be defined.\n  -enable-url-signature     Enable URL signature (URL-safe Base64-encoded HMAC digest) [default: false]\n  -url-signature-key        The URL signature key (32 characters minimum)\n  -allowed-origins <urls>   Restrict remote image source processing to certain origins (separated by commas). Note: Origins are validated against host *AND* path.\n  -max-allowed-size <bytes> Restrict maximum size of http image source (in bytes)\n  -max-allowed-resolution <megapixels> Restrict maximum resolution of the image [default: 18.0]\n  -certfile <path>          TLS certificate file path\n  -keyfile <path>           TLS private key file path\n  -authorization <value>    Defines a constant Authorization header value passed to all the image source servers. -enable-url-source flag must be defined. This overwrites authorization headers forwarding behavior via X-Forward-Authorization\n  -placeholder <path>       Image path to image custom placeholder to be used in case of error. Recommended minimum image size is: 1200x1200\n  -concurrency <num>        Throttle concurrency limit per second [default: disabled]\n  -burst <num>              Throttle burst max cache size [default: 100]\n  -mrelease <num>           OS memory release interval in seconds [default: 30]\n  -cpus <num>               Number of used cpu cores.\n                            (default for current machine is 8 cores)\n  -log-level                Set log level for http-server. E.g: info,warning,error [default: info].\n                            Or can use the environment variable GOLANG_LOG=info.\n```\n\nStart the server in a custom port:\n```bash\nimaginary -p 8080\n```\n\nAlso, you can pass the port as environment variable:\n```bash\nPORT=8080 imaginary\n```\n\nEnable HTTP server throttle strategy (max 10 requests/second):\n```\nimaginary -p 8080 -concurrency 10\n```\n\nEnable remote URL image fetching (then you can do GET request passing the `url=http://server.com/image.jpg` query param):\n```\nimaginary -p 8080 -enable-url-source\n```\n\nMount local directory (then you can do GET request passing the `file=image.jpg` query param):\n```\nimaginary -p 8080 -mount ~/images\n```\n\nEnable authorization header forwarding to image origin server. `X-Forward-Authorization` or `Authorization` (by priority) header value will be forwarded as `Authorization` header to the target origin server, if one of those headers are present in the incoming HTTP request.\nSecurity tip: secure your server from public access to prevent attack vectors when enabling this option:\n```\nimaginary -p 8080 -enable-url-source -enable-auth-forwarding\n```\n\nOr alternatively you can manually define an constant Authorization header value that will be always sent when fetching images from remote image origins. If defined, `X-Forward-Authorization` or `Authorization` headers won't be forwarded, and therefore ignored, if present.\n**Note**:\n```\nimaginary -p 8080 -enable-url-source -authorization \"Bearer s3cr3t\"\n```\n\nSend fixed caching headers in the response. The headers can be set in either \"cache nothing\" or \"cache for N seconds\". By specifying `0` imaginary will send the \"don't cache\" headers, otherwise it sends headers with a TTL. The following example informs the client to cache the result for 1 year:\n```\nimaginary -p 8080 -enable-url-source -http-cache-ttl 31556926\n```\n\nEnable placeholder image HTTP responses in case of server error/bad request.\nThe placeholder image will be dynamically and transparently resized matching the expected image `width`x`height` define in the HTTP request params.\nAlso, the placeholder image will be also transparently converted to the desired image type defined in the HTTP request params, so the API contract should be maintained as much better as possible.\n\nThis feature is particularly useful when using `imaginary` as public HTTP service consumed by Web clients.\nIn case of error, the appropriate HTTP status code will be used to reflect the error, and the error details will be exposed serialized as JSON in the `Error` response HTTP header, for further inspection and convenience for API clients.\n```\nimaginary -p 8080 -enable-placeholder -enable-url-source\n```\n\nYou can optionally use a custom placeholder image.\nSince the placeholder image should fit a variety of different sizes, it's recommended to use a large image, such as `1200`x`1200`.\nSupported custom placeholder image types are: `JPEG`, `PNG` and `WEBP`.\n```\nimaginary -p 8080 -placeholder=placeholder.jpg -enable-url-source\n```\n\nEnable URL signature (URL-safe Base64-encoded HMAC digest).\n\nThis feature is particularly useful to protect against multiple image operations attacks and to verify the requester identity.\n```\nimaginary -p 8080 -enable-url-signature -url-signature-key 4f46feebafc4b5e988f131c4ff8b5997\n```\n\nIt is recommended to pass key as environment variables:\n```\nURL_SIGNATURE_KEY=4f46feebafc4b5e988f131c4ff8b5997 imaginary -p 8080 -enable-url-signature\n```\n\nIncrease libvips threads concurrency (experimental):\n```\nVIPS_CONCURRENCY=10 imaginary -p 8080 -concurrency 10\n```\n\nEnable debug mode:\n```\nDEBUG=* imaginary -p 8080\n```\n\nOr filter debug output by package:\n```\nDEBUG=imaginary imaginary -p 8080\n```\n\nDisable info logs:\n```\nGOLANG_LOG=error imaginary -p 8080\n```\n\n#### Examples\n\nReading a local image (you must pass the `-mount=<directory>` flag):\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=400&file=foo/bar/image.jpg\"\n```\n\nFetching the image from a remote server (you must pass the `-enable-url-source` flag):\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=400&url=https://raw.githubusercontent.com/h2non/imaginary/master/testdata/large.jpg\"\n```\n\nCrop behaviour can be influenced with the `gravity` parameter. You can specify a preference for a certain region (north, south, etc.). To enable Smart Crop you can specify the value \"smart\" to autodetect the most interesting section to consider as center point for the crop operation:\n```\ncurl -O \"http://localhost:8088/crop?width=500&height=200&gravity=smart&url=https://raw.githubusercontent.com/h2non/imaginary/master/testdata/smart-crop.jpg\"\n```\n\n\n#### Playground\n\n`imaginary` exposes an ugly HTML form for playground purposes in: [`http://localhost:8088/form`](http://localhost:8088/form)\n\n## HTTP API\n\n### Allowed Origins\n\nimaginary can be configured to block all requests for images with a src URL this is not specified in the `allowed-origins` list. Imaginary will validate that the remote url matches the hostname and path of at least one origin in allowed list. Perhaps the easiest way to show how this works is to show some examples.\n\n| `allowed-origins` setting | image url | is valid |\n| ------------------------- | --------- | -------- |\n| `-allowed-origins https://s3.amazonaws.com/some-bucket/` | `s3.amazonaws.com/some-bucket/images/image.png` | VALID |\n| `-allowed-origins https://s3.amazonaws.com/some-bucket/` | `s3.amazonaws.com/images/image.png` | NOT VALID (no matching basepath) |\n| `-allowed-origins https://s3.amazonaws.com/some-*` | `s3.amazonaws.com/some-bucket/images/image.png` | VALID |\n| `-allowed-origins https://*.amazonaws.com/some-bucket/` | `anysubdomain.amazonaws.com/some-bucket/images/image.png` | VALID |\n| `-allowed-origins https://*.amazonaws.com` | `anysubdomain.amazonaws.comimages/image.png` | VALID |\n| `-allowed-origins https://*.amazonaws.com` | `www.notaws.comimages/image.png` | NOT VALID (no matching host) |\n| `-allowed-origins https://*.amazonaws.com, foo.amazonaws.com/some-bucket/` | `bar.amazonaws.com/some-other-bucket/image.png` | VALID (matches first condition but not second) |\n\n### Authorization\n\nimaginary supports a simple token-based API authorization.\nTo enable it, you should pass the `-key` flag to the binary.\n\nAPI token can be defined as HTTP header (`API-Key`) or query param (`key`).\n\nExample request with API key:\n```\nPOST /crop HTTP/1.1\nHost: localhost:8088\nAPI-Key: secret\n```\n\n### URL signature\n\nThe URL signature is provided by the `sign` request parameter.\n\nThe HMAC-SHA256 hash is created by taking the URL path (including the leading /), the request parameters (alphabetically-sorted and concatenated with & into a string). The hash is then base64url-encoded.\n\nHere an example in Go:\n```\nsignKey  := \"4f46feebafc4b5e988f131c4ff8b5997\"\nurlPath  := \"/resize\"\nurlQuery := \"file=image.jpg&height=200&type=jpeg&width=300\"\n\nh := hmac.New(sha256.New, []byte(signKey))\nh.Write([]byte(urlPath))\nh.Write([]byte(urlQuery))\nbuf := h.Sum(nil)\n\nfmt.Println(\"sign=\" + base64.RawURLEncoding.EncodeToString(buf))\n```\n\n### Errors\n\n`imaginary` will always reply with the proper HTTP status code and JSON body with error details.\n\nHere an example response error when the payload is empty:\n```json\n{\n  \"message\": \"Cannot read payload: no such file\",\n  \"code\": 1\n}\n```\n\nSee all the predefined supported errors [here](https://github.com/h2non/imaginary/blob/master/error.go#L19-L28).\n\n#### Placeholder\n\nIf `-enable-placeholder` or `-placeholder <image path>` flags are passed to `imaginary`, a placeholder image will be used in case of error or invalid request input.\n\nIf `-enable-placeholder` is passed, the default `imaginary` placeholder image will be used, however you can customized it via `-placeholder` flag, loading a custom compatible image from the file system.\n\nSince `imaginary` has been partially designed to be used as public HTTP service, including web pages, in certain scenarios the response MIME type must be respected,\nso the server will always reply with a placeholder image in case of error, such as image processing error, read error, payload error, request invalid request or any other.\n\nYou can customize the placeholder image passing the `-placeholder <image path>` flag when starting `imaginary`.\n\nIn this scenarios, the error message details will be exposed in the `Error` response header field as JSON for further inspection from API clients.\n\nIn some edge cases the placeholder image resizing might fail, so a 400 Bad Request will be used as response status and the `Content-Type` will be `application/json` with the proper message info. Note that this scenario won't be common.\n\n### Form data\n\nIf you're pushing images to `imaginary` as `multipart/form-data` (you can do it as well as `image/*`), you must define at least one input field called `file` with the raw image data in order to be processed properly by imaginary.\n\n### Params\n\nComplete list of available params. Take a look to each specific endpoint to see which params are supported.\nImage measures are always in pixels, unless otherwise indicated.\n\n- **width**       `int`   - Width of image area to extract/resize\n- **height**      `int`   - Height of image area to extract/resize\n- **top**         `int`   - Top edge of area to extract. Example: `100`\n- **left**        `int`   - Left edge of area to extract. Example: `100`\n- **areawidth**   `int`   - Height area to extract. Example: `300`\n- **areaheight**  `int`   - Width area to extract. Example: `300`\n- **quality**     `int`   - JPEG image quality between 1-100. Defaults to `80`\n- **compression** `int`   - PNG compression level. Default: `6`\n- **palette**     `bool`  - Enable 8-bit quantisation. Works with only PNG images. Default: `false`\n- **rotate**      `int`   - Image rotation angle. Must be multiple of `90`. Example: `180`\n- **factor**      `int`   - Zoom factor level. Example: `2`\n- **margin**      `int`   - Text area margin for watermark. Example: `50`\n- **dpi**         `int`   - DPI value for watermark. Example: `150`\n- **textwidth**   `int`   - Text area width for watermark. Example: `200`\n- **opacity**     `float` - Opacity level for watermark text or watermark image. Default: `0.2`\n- **flip**        `bool`  - Transform the resultant image with flip operation. Default: `false`\n- **flop**        `bool`  - Transform the resultant image with flop operation. Default: `false`\n- **force**       `bool`  - Force image transformation size. Default: `false`\n- **nocrop**      `bool`  - Disable crop transformation. Defaults depend on the operation\n- **noreplicate** `bool`  - Disable text replication in watermark. Defaults to `false`\n- **norotation**  `bool`  - Disable auto rotation based on EXIF orientation. Defaults to `false`\n- **noprofile**   `bool`  - Disable adding ICC profile metadata. Defaults to `false`\n- **stripmeta**   `bool`  - Remove original image metadata, such as EXIF metadata. Defaults to `false`\n- **text**        `string` - Watermark text content. Example: `copyright (c) 2189`\n- **font**        `string` - Watermark text font type and format. Example: `sans bold 12`\n- **color**       `string` - Watermark text RGB decimal base color. Example: `255,200,150`\n- **image**       `string` - Watermark image URL pointing to the remote HTTP server.\n- **type**        `string` - Specify the image format to output. Possible values are: `jpeg`, `png`, `webp` and `auto`. `auto` will use the preferred format requested by the client in the HTTP Accept header. A client can provide multiple comma-separated choices in `Accept` with the best being the one picked.\n- **gravity**     `string` - Define the crop operation gravity. Supported values are: `north`, `south`, `centre`, `west`, `east` and `smart`. Defaults to `centre`.\n- **file**        `string` - Use image from server local file path. In order to use this you must pass the `-mount=<dir>` flag.\n- **url**         `string` - Fetch the image from a remote HTTP server. In order to use this you must pass the `-enable-url-source` flag.\n- **colorspace**  `string` - Use a custom color space for the output image. Allowed values are: `srgb` or `bw` (black&white)\n- **field**       `string` - Custom image form field name if using `multipart/form`. Defaults to: `file`\n- **extend**      `string` - Extend represents the image extend mode used when the edges of an image are extended. Defaults to `mirror`. Allowed values are: `black`, `copy`, `mirror`, `white`, `lastpixel` and `background`. If `background` value is specified, you can define the desired extend RGB color via `background` param, such as `?extend=background&background=250,20,10`. For more info, see [libvips docs](https://libvips.github.io/libvips/API/current/libvips-conversion.html#VIPS-EXTEND-BACKGROUND:CAPS).\n- **background**  `string` - Background RGB decimal base color to use when flattening transparent PNGs. Example: `255,200,150`\n- **sigma**       `float`  - Size of the gaussian mask to use when blurring an image. Example: `15.0`\n- **minampl**     `float`  - Minimum amplitude of the gaussian filter to use when blurring an image. Default: Example: `0.5`\n- **operations**  `json`   - Pipeline of image operation transformations defined as URL safe encoded JSON array. See [pipeline](#get--post-pipeline) endpoints for more details.\n- **sign**        `string` - URL signature (URL-safe Base64-encoded HMAC digest)\n- **interlace**   `bool`   - Use progressive / interlaced format of the image output. Defaults to `false`\n- **aspectratio** `string` - Apply aspect ratio by giving either image's height or width. Exampe: `16:9`\n\n#### GET /\nContent-Type: `application/json`\n\nServes as JSON the current `imaginary`, `bimg` and `libvips` versions.\n\nExample response:\n```json\n{\n  \"imaginary\": \"0.1.28\",\n  \"bimg\": \"1.0.5\",\n  \"libvips\": \"8.4.1\"\n}\n```\n\n#### GET /health\nContent-Type: `application/json`\n\nProvides some useful statistics about the server stats with the following structure:\n\n- **uptime** `number` - Server process uptime in seconds.\n- **allocatedMemory** `number` - Currently allocated memory in megabytes.\n- **totalAllocatedMemory** `number` - Total allocated memory over the time in megabytes.\n- **goroutines** `number` - Number of running goroutines.\n- **cpus** `number` - Number of used CPU cores.\n\nExample response:\n```json\n{\n  \"uptime\": 1293,\n  \"allocatedMemory\": 5.31,\n  \"totalAllocatedMemory\": 34.3,\n  \"goroutines\": 19,\n  \"cpus\": 8\n}\n```\n\n#### GET /form\nContent Type: `text/html`\n\nServes an ugly HTML form, just for testing/playground purposes\n\n#### GET | POST /info\nAccepts: `image/*, multipart/form-data`. Content-Type: `application/json`\n\nReturns the image metadata as JSON:\n```json\n{\n  \"width\": 550,\n  \"height\": 740,\n  \"type\": \"jpeg\",\n  \"space\": \"srgb\",\n  \"hasAlpha\": false,\n  \"hasProfile\": true,\n  \"channels\": 3,\n  \"orientation\": 1\n}\n```\n\n#### GET | POST /crop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nCrop the image by a given width or height. Image ratio is maintained\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- force `bool`\n- rotate `int`\n- embed `bool`\n- norotation `bool`\n- noprofile `bool`\n- flip `bool`\n- flop `bool`\n- stripmeta `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- gravity `string`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n\n#### GET | POST /smartcrop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nCrop the image by a given width or height using the [libvips](https://github.com/jcupitt/libvips/blob/master/libvips/conversion/smartcrop.c) built-in smart crop algorithm.\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- force `bool`\n- rotate `int`\n- embed `bool`\n- norotation `bool`\n- noprofile `bool`\n- flip `bool`\n- flop `bool`\n- stripmeta `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- gravity `string`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n\n#### GET | POST /resize\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nResize an image by width or height. Image aspect ratio is maintained\n\n##### Allowed params\n\n- width `int` `required`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- nocrop `bool` - Defaults to `true`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /enlarge\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int` `required`\n- height `int` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- nocrop `bool` - Defaults to `false`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- palette `bool`\n\n#### GET | POST /extract\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- top `int` `required`\n- left `int`\n- areawidth `int` `required`\n- areaheight `int`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /zoom\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- factor `number` `required`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- nocrop `bool` - Defaults to `true`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /thumbnail\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int` `required`\n- height `int` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /fit\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nResize an image to fit within width and height, without cropping. Image aspect ratio is maintained\nThe width and height specify a maximum bounding box for the image.\n\n##### Allowed params\n\n- width `int` `required`\n- height `int` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /rotate\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n\n#### GET | POST /autorotate\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nAutomatically rotate the image with no further image transformations based on EXIF orientation metadata.\n\nReturns a new image with the same size and format as the input image.\n\n##### Allowed params\n\n- rotate `int` `required`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /flip\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /flop\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /convert\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- type `string` `required`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n#### GET | POST /pipeline\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\nThis endpoint allow the user to declare a pipeline of multiple independent image transformation operations all in a single HTTP request.\n\n**Note**: a maximum of 10 independent operations are current allowed within the same HTTP request.\n\nInternally, it operates pretty much as a sequential reducer pattern chain, where given an input image and a set of operations, for each independent image operation iteration, the output result image will be passed to the next one, as the accumulated result, until finishing all the operations.\n\nIn imperative programming, this would be pretty much analog to the following code:\n```js\nvar image\nfor operation in operations {\n  image = operation.Run(image, operation.Options)\n}\n```\n\n##### Allowed params\n\n- operations `json` `required` - URL safe encoded JSON with a list of operations. See below for interface details.\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n\n##### Operations JSON specification\n\nSelf-documented JSON operation schema:\n```js\n[\n  {\n    \"operation\": string, // Operation name identifier. Required.\n    \"ignore_failure\": boolean, // Ignore error in case of failure and continue with the next operation. Optional.\n    \"params\": map[string]mixed, // Object defining operation specific image transformation params, same as supported URL query params per each endpoint.\n  }\n]\n```\n\n###### Supported operations names\n\n- **crop** - Same as [`/crop`](#get--post-crop) endpoint.\n- **smartcrop** - Same as [`/smartcrop`](#get--post-smartcrop) endpoint.\n- **resize** - Same as [`/resize`](#get--post-resize) endpoint.\n- **enlarge** - Same as [`/enlarge`](#get--post-enlarge) endpoint.\n- **extract** - Same as [`/extract`](#get--post-extract) endpoint.\n- **rotate** - Same as [`/rotate`](#get--post-rotate) endpoint.\n- **autorotate** - Same as [`/autorotate`](#get--post-autorotate) endpoint.\n- **flip** - Same as [`/flip`](#get--post-flip) endpoint.\n- **flop** - Same as [`/flop`](#get--post-flop) endpoint.\n- **thumbnail** - Same as [`/thumbnail`](#get--post-thumbnail) endpoint.\n- **zoom** - Same as [`/zoom`](#get--post-zoom) endpoint.\n- **convert** - Same as [`/convert`](#get--post-convert) endpoint.\n- **watermark** - Same as [`/watermark`](#get--post-watermark) endpoint.\n- **watermarkImage** - Same as [`/watermarkimage`](#get--post-watermarkimage) endpoint.\n- **blur** - Same as [`/blur`](#get--post-blur) endpoint.\n\n###### Example\n\n```json\n[\n  {\n    \"operation\": \"crop\",\n    \"params\": {\n      \"width\": 500,\n      \"height\": 300\n    }\n  },\n  {\n    \"operation\": \"watermark\",\n    \"params\": {\n      \"text\": \"I need some covfete\",\n      \"font\": \"Verdana\",\n      \"textwidth\": 100,\n      \"opacity\": 0.8\n    }\n  },\n  {\n    \"operation\": \"rotate\",\n    \"params\": {\n      \"rotate\": 180\n    }\n  },\n  {\n    \"operation\": \"convert\",\n    \"params\": {\n      \"type\": \"webp\"\n    }\n  }\n]\n```\n\n#### GET | POST /watermark\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- text `string` `required`\n- margin `int`\n- dpi `int`\n- textwidth `int`\n- opacity `float`\n- noreplicate `bool`\n- font `string`\n- color `string`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- palette `bool`\n\n#### GET | POST /watermarkimage\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- image `string` `required` - URL to watermark image, example: `?image=https://logo-server.com/logo.jpg`\n- top `int` - Top position of the watermark image\n- left `int` - Left position of the watermark image\n- opacity `float` - Opacity value of the watermark image\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- rotate `int`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- sigma `float`\n- minampl `float`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- palette `bool`\n\n#### GET | POST /blur\nAccepts: `image/*, multipart/form-data`. Content-Type: `image/*`\n\n##### Allowed params\n\n- sigma `float` `required`\n- minampl `float`\n- width `int`\n- height `int`\n- quality `int` (JPEG-only)\n- compression `int` (PNG-only)\n- type `string`\n- file `string` - Only GET method and if the `-mount` flag is present\n- url `string` - Only GET method and if the `-enable-url-source` flag is present\n- embed `bool`\n- force `bool`\n- norotation `bool`\n- noprofile `bool`\n- stripmeta `bool`\n- flip `bool`\n- flop `bool`\n- extend `string`\n- background `string` - Example: `?background=250,20,10`\n- colorspace `string`\n- field `string` - Only POST and `multipart/form` payloads\n- interlace `bool`\n- aspectratio `string`\n- palette `bool`\n\n## Logging\n\nImaginary uses an [apache compatible log format](/log.go).\n\n### Fluentd log ingestion\n\nYou can ingest Imaginary logs with fluentd using the following fluentd config :\n\n```\n# use your own tag name (*.imaginary for this example)\n<filter *.imaginary>\n    @type parser\n    key_name log\n    reserve_data true\n\n    <parse>\n        @type multi_format\n        # access logs parser\n        <pattern>\n            format regexp\n            expression /^[^ ]* [^ ]* [^ ]* \\[(?<time>[^\\]]*)\\] \"(?<method>\\S+)(?: +(?<path>[^ ]*) +\\S*)?\" (?<code>[^ ]*) (?<size>[^ ]*) (?<response_time>[^ ]*)$/\n            types code:integer,size:integer,response_time:float\n            time_key time\n            time_format %d/%b/%Y %H:%M:%S\n        <\/pattern>\n        # warnings / error logs parser\n        <pattern>\n            format none\n            message_key message\n        <\/pattern>\n    <\/parse>\n<\/filter>\n\n<match *.imaginary>\n    @type rewrite_tag_filter\n\n    # Logs with code field are access logs, and logs without are error logs\n    <rule>\n        key code\n        pattern ^.+$\n        tag ${tag}.access\n    <\/rule>\n    <rule>\n        key code\n        pattern ^.+$\n        invert true\n        tag ${tag}.error\n    <\/rule>\n<\/match>\n```\n\nIn the end, access records are tagged with `*.imaginary.access`, and warning /\nerror records are tagged with `*.imaginary.error`.\n\n## Support\n\n### Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/imaginary#backer)]\n\n<a href=\"https://opencollective.com/imaginary/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/backer/29/avatar.svg\"><\/a>\n\n### Support this project\n\n[![OpenCollective](https://opencollective.com/imaginary/backers/badge.svg)](#backers)\n\n### Sponsors\n\nBecome a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/imaginary#sponsor)]\n\n<a href=\"https://opencollective.com/imaginary/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/9/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/10/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/11/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/12/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/13/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/14/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/15/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/16/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/17/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/18/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/19/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/20/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/21/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/22/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/23/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/24/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/25/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/26/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/27/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/28/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/imaginary/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/imaginary/sponsor/29/avatar.svg\"><\/a>\n\n## Authors\n\n- [Tomás Aparicio](https://github.com/h2non) - Original author and maintainer.\n\n## License\n\nMIT - Tomas Aparicio\n\n[![views](https://sourcegraph.com/api/repos/github.com/h2non/imaginary/.counters/views.svg)](https://sourcegraph.com/github.com/h2non/imaginary)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"652A:7A4F8:1839B3:5EA748:6AB92C94"},"text_sha256":"bf7e9688871e4a5ba04ac37f573ac62dfed03c289547bda1da1bb4f972f0d2fc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wasabeef/Blurry","input_row":{"repository":"wasabeef/Blurry","url":"https://github.com/wasabeef/Blurry","name":"Blurry","owner":"wasabeef","description":"Blurry is an easy blur library for Android","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":5650,"issues":106,"created_at":"2015-07-23T14:12:08Z","updated_at":"2026-09-21T02:56:56Z","first_commit_at":"2015-07-23T14:12:08Z","last_commit_at":"2021-12-13T06:26:44Z","activity_months":76.700000000000003,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:03.729Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wasabeef/Blurry","visibility":"public","created_at":"2015-07-23T14:12:08Z","updated_at":"2026-09-21T02:56:56Z","private":false,"fork":false,"archived":false,"stargazers_count":5650,"open_issues_count":86,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1793","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087A:731F6:180381C:1C2A90C:6AB92CA3"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1792","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0810:72727:17BCF2F:1BE3D38:6AB92CA4"},"commit":{"sha":"25b51e760c78990ad2d4c659b986cc2c2a281722","url":"https://github.com/wasabeef/Blurry/commit/25b51e760c78990ad2d4c659b986cc2c2a281722","date":"2018-04-22T20:01:21Z","author_date":"2018-04-22T20:01:21Z","committer_date":"2018-04-22T20:01:21Z","tree_sha":"d0e8f4555e13a56869ebca5ef4278fff27a7de72","message_first_line":"Merge pull request #74 from Laaidback/fix_listener_method_not_called"},"tree_request_status":200,"tree_rate":{"github_remaining":"1791","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0863:725A9:17EC945:1C13C53:6AB92CA4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2101,"blob_sha":"b077281aa4d67e0b8fa1182b39b9b653cfc1061a","priority":0}],"documents":[{"path":"README.md","size":2101,"blob_sha":"b077281aa4d67e0b8fa1182b39b9b653cfc1061a","priority":0,"status":200,"text":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Blurry-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/2192)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Download](https://api.bintray.com/packages/wasabeef/maven/blurry/images/download.svg)](https://bintray.com/wasabeef/maven/blurry/_latestVersion)\n\n`Blurry` is an easy blur library for `Android`.\n\n![logo](art/blurry.png)\n\nScreenshot\n---\n\n![Demo](art/blurry.gif)\n\nHow do I use it?\n---\n\n### Setup\n\n##### Dependencies\n```groovy\ndependencies {\n    compile 'jp.wasabeef:blurry:2.1.1'\n}\n```\n\n### Functions\n\n**Overlay**\n\nParent must be ViewGroup\n\n```java\nBlurry.with(context).radius(25).sampling(2).onto((ViewGroup) rootView);\n```\n\n**Into**  \n```java\n// from View\nBlurry.with(context).capture(view).into(imageView);\n```\n\n```java\n// from Bitmap \nBlurry.with(context).from(bitmap).into(imageView);\n```\n\n**Blur Options**\n\n- Radius\n- Down Sampling\n- Color Filter\n- Asynchronous Support\n- Animation (Overlay Only)\n\n```java\nBlurry.with(context)\n  .radius(10)\n  .sampling(8)\n  .color(Color.argb(66, 255, 255, 0))\n  .async()\n  .animate(500)\n  .onto(rootView);\n```\n\nRequirements\n--------------\nAndroid 3.+\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>\n\n<a href=\"https://twitter.com/wasabeef_jp\">\n<img alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/>\n<\/a>\n\nLicense\n-------\n\n    Copyright 2017 Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17E608:5E524D:6AB92CA4"},"text_sha256":"1694a97b056f07b11ebd29e329aa1ee487eb37afc645febfd5424b4604dfef31"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1790","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:17FBCF3:1C22B69:6AB92CA5"},"commit":{"sha":"d53d019cffb630452be88215781ac4c410c543f2","url":"https://github.com/wasabeef/Blurry/commit/d53d019cffb630452be88215781ac4c410c543f2","date":"2021-12-13T06:26:44Z","author_date":"2021-12-13T06:26:44Z","committer_date":"2021-12-13T06:26:44Z","tree_sha":"f27e669cff2fc3900759ffaf7cf1339a5bd83f71","message_first_line":"Merge pull request #118 from wasabeef/release-401"},"tree_request_status":200,"tree_rate":{"github_remaining":"1789","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:1801607:1C27F5D:6AB92CA5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2583,"blob_sha":"48fca1e59db9fcd4c109dc2d49e26c77639e8d0c","priority":0}],"documents":[{"path":"README.md","size":2583,"blob_sha":"48fca1e59db9fcd4c109dc2d49e26c77639e8d0c","priority":0,"status":200,"text":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Blurry-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/2192)\n[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/jp.wasabeef/blurry/badge.svg)](https://search.maven.org/artifact/jp.wasabeef/blurry)\n\n`Blurry` is an easy blur library for `Android`.\n\n![logo](art/blurry.png)\n\nScreenshot\n---\n\n![Demo](art/blurry.gif)\n\nHow do I use it?\n---\n\n### Setup\n\n##### Dependencies\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n    compile 'jp.wasabeef:blurry:4.0.1'\n}\n```\n\n### Functions\n\n**Overlay**\n\nParent must be ViewGroup\n\n```kotlin\nBlurry.with(context).radius(25).sampling(2).onto(rootView)\n```\n\n**Into**  \n```kotlin\n// from View\nBlurry.with(context).capture(view).into(imageView)\n```\n\n```kotlin\n// from Bitmap \nBlurry.with(context).from(bitmap).into(imageView)\n```\n\n**Blur Options**\n\n- Radius\n- Down Sampling\n- Color Filter\n- Asynchronous Support\n- Animation (Overlay Only)\n\n```java\nBlurry.with(context)\n  .radius(10)\n  .sampling(8)\n  .color(Color.argb(66, 255, 255, 0))\n  .async()\n  .animate(500)\n  .onto(rootView);\n```\n\n**Get a bitmap directly**\n```kotlin\n// Sync\nval bitmap = Blurry.with(this)\n  .radius(10)\n  .sampling(8)\n  .capture(findViewById(R.id.right_bottom)).get()\nimageView.setImageDrawable(BitmapDrawable(resources, bitmap))\n\n// Async\nBlurry.with(this)\n  .radius(25)\n  .sampling(4)\n  .color(Color.argb(66, 255, 255, 0))\n  .capture(findViewById(R.id.left_bottom))\n  .getAsync {\n    imageView.setImageDrawable(BitmapDrawable(resources, it))\n  }\n```\n\nRequirements\n--------------\nAndroid 5.+ (API 21)\n\nDeveloped By\n-------\nDaichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>\n\n<a href=\"https://twitter.com/wasabeef_jp\">\n<img alt=\"Follow me on Twitter\"\nsrc=\"https://raw.githubusercontent.com/wasabeef/art/master/twitter.png\" width=\"75\"/>\n<\/a>\n\nLicense\n-------\n\n    Copyright (C) 2020 Wasabeef\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"647E:2E8679:17D54A:5E406C:6AB92CA5"},"text_sha256":"af935c2452860eabefc8d8114841c07d170c47f9cc47fe7159b6d222433bfbff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"coobird/thumbnailator","input_row":{"repository":"coobird/thumbnailator","url":"https://github.com/coobird/thumbnailator","name":"thumbnailator","owner":"coobird","description":"Thumbnailator - a thumbnail generation library for Java","language":"Java","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5431,"issues":221,"created_at":"2015-07-25T05:38:33Z","updated_at":"2026-09-27T11:58:12Z","first_commit_at":"2010-09-22T04:08:47Z","last_commit_at":"2026-02-17T17:48:14Z","activity_months":184.87,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:06.094Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"coobird/thumbnailator","visibility":"public","created_at":"2015-07-25T05:38:33Z","updated_at":"2026-09-27T11:58:12Z","private":false,"fork":false,"archived":false,"stargazers_count":5431,"open_issues_count":55,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1788","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:1813B5E:1C3AB29:6AB92CA6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1787","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0811:767EB:18052EA:1C2C7BB:6AB92CA6"},"commit":{"sha":"75841195c283a6cc333f76bd3428b5f66e4b4f38","url":"https://github.com/coobird/thumbnailator/commit/75841195c283a6cc333f76bd3428b5f66e4b4f38","date":"2018-05-04T12:58:01Z","author_date":"2018-05-04T12:58:01Z","committer_date":"2018-05-04T12:58:01Z","tree_sha":"21da2fbb4fff22133f32957d4e038a3798a958c4","message_first_line":"Force use of JDK 5 for building Thumbnailator."},"tree_request_status":200,"tree_rate":{"github_remaining":"1786","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082E:72BD3:180B5B3:1C323FD:6AB92CA6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2178,"blob_sha":"22bca07fa089f303830a084ff8a1c90e46a56507","priority":0}],"documents":[{"path":"README.md","size":2178,"blob_sha":"22bca07fa089f303830a084ff8a1c90e46a56507","priority":0,"status":200,"text":"_*December 1, 2014: Thumbnailator 0.4.8 has just been released!\nSee [Changes](https://github.com/coobird/thumbnailator/wiki/Changes) for details.*_\n\n_*Thumbnailator is now available through\n[Maven](https://github.com/coobird/thumbnailator/wiki/Maven)!*_\n\n# What is Thumbnailator?\n\n![](https://raw.githubusercontent.com/wiki/coobird/thumbnailator/img/home/home-image.png)\n\n_Thumbnailator_ is a thumbnail generation library for Java.\n\n# Why Thumbnailator?\nMaking high-quality thumbnails in Java can be a fairly difficult task.\n\nLearning how to use the Image I/O API, Java 2D API, image processing,\nimage scaling techniques, ... but fear not! _Thumbnailator_ will take care\nof all those things for you!\n\nThumbnailator is a single JAR file with no dependencies to external libraries,\nmaking development and deployment simple and easy. It is also available on\nthe Maven Central Repository for easy inclusion in Maven projects.\n\n# How simple is Thumbnailator?\n\n_Thumbnailator_'s fluent interface can be used to perform fairly complicated\nthumbnail processing task in one simple step.\n\nFor example, creating JPEG thumbnails of image files in a directory, all\nresized to a maximum dimension of 640 pixels by 480 pixels while preserving\nthe aspect ratio of the original image can be performed by the following:\n\n```\nThumbnails.of(new File(\"path/to/directory\").listFiles())\n    .size(640, 480)\n    .outputFormat(\"jpg\")\n    .toFiles(Rename.PREFIX_DOT_THUMBNAIL);\n```\n\nThe fluent interface provided by the _Thumbnailator_ simplifies the task of\nmaking thumbnails into a single method call!\n\nNo need to access the Image I/O API and manually manipulate `BufferedImage`s\nthrough `Graphics2D` objects. _Thumbnailator_ does all of that for you.\n\n# What can Thumbnailator do?\n\nThe following pages have more information on what _Thumbnailator_ can do:\n\n* [Features](https://github.com/coobird/thumbnailator/wiki/Features)\n* [Examples](https://github.com/coobird/thumbnailator/wiki/Examples)\n* [Thumbnailator API Documentation](https://coobird.github.io/thumbnailator/javadoc/0.4.8/)\n\n# Disclaimer\n*Thumbnailator is still early in its development, and the APIs are subject to\nchange at any time.*\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22E:18233:17B21B:5E1EA3:6AB92C97"},"text_sha256":"1a398ba3d5cb13e490af23b00a7e7f866b75bca89689dcd7d5da6bbf7e852bde"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1785","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D3:52542:17D320F:1BFA2AA:6AB92CA7"},"commit":{"sha":"e31168ca792b549966db090c51d4d671e393b2ab","url":"https://github.com/coobird/thumbnailator/commit/e31168ca792b549966db090c51d4d671e393b2ab","date":"2026-02-17T17:48:14Z","author_date":"2026-02-17T17:48:14Z","committer_date":"2026-02-17T17:48:14Z","tree_sha":"b7a947a27438de95096110a1bee10c8da8021c8d","message_first_line":"Add contribution guidelines."},"tree_request_status":200,"tree_rate":{"github_remaining":"1784","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AE:E80A6:17BA01F:1BE1135:6AB92CA7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2314,"blob_sha":"49b502145b9435b8f9f289c9f64545d5572e0ace","priority":0}],"documents":[{"path":"README.md","size":2314,"blob_sha":"49b502145b9435b8f9f289c9f64545d5572e0ace","priority":0,"status":200,"text":"_*October 1, 2025: Thumbnailator 0.4.21 has been released!\nSee [Changes](https://github.com/coobird/thumbnailator/wiki/Changes) for details.*_\n\n_*Thumbnailator is now available through\n[Maven](https://github.com/coobird/thumbnailator/wiki/Maven)!*_\n\n# What is Thumbnailator?\n\n![](https://raw.githubusercontent.com/wiki/coobird/thumbnailator/img/home/home-image.png)\n\n_Thumbnailator_ is a thumbnail generation library for Java.\n\n# Why Thumbnailator?\nMaking high-quality thumbnails in Java can be a fairly difficult task.\n\nLearning how to use the Image I/O API, Java 2D API, image processing,\nimage scaling techniques, ... but fear not! _Thumbnailator_ will take care\nof all those things for you!\n\nThumbnailator is a single JAR file with no dependencies to external libraries,\nmaking development and deployment simple and easy. It is also available on\nthe Maven Central Repository for easy inclusion in Maven projects.\n\n# How simple is Thumbnailator?\n\n_Thumbnailator_'s fluent interface can be used to perform fairly complicated\nthumbnail processing task in one simple step.\n\nFor example, creating JPEG thumbnails of image files in a directory, all\nresized to a maximum dimension of 640 pixels by 480 pixels while preserving\nthe aspect ratio of the original image can be performed by the following:\n\n```\nThumbnails.of(new File(\"path/to/directory\").listFiles())\n    .size(640, 480)\n    .outputFormat(\"jpg\")\n    .toFiles(Rename.PREFIX_DOT_THUMBNAIL);\n```\n\nThe fluent interface provided by the _Thumbnailator_ simplifies the task of\nmaking thumbnails into a single method call!\n\nNo need to access the Image I/O API and manually manipulate `BufferedImage`s\nthrough `Graphics2D` objects. _Thumbnailator_ does all of that for you.\n\n# What can Thumbnailator do?\n\nThe following pages have more information on what _Thumbnailator_ can do:\n\n* [Features](https://github.com/coobird/thumbnailator/wiki/Features)\n* [Examples](https://github.com/coobird/thumbnailator/wiki/Examples)\n* [Thumbnailator API Documentation](https://coobird.github.io/thumbnailator/javadoc/0.4.21/)\n* [Frequently Asked Questions](https://github.com/coobird/thumbnailator/wiki/FAQ)\n\n# Disclaimer\n*Thumbnailator is still early in its development, and the APIs are subject to\nchange at any time.*\n\n# License\nThumbnailtor is released under the MIT License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7A:7A4F8:1839E6:5EA818:6AB92CA6"},"text_sha256":"9c30ca30e01435acba56cfe5933918e58d8af691a43ea022c5d7df9ef371503b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hpjansson/chafa","input_row":{"repository":"hpjansson/chafa","url":"https://github.com/hpjansson/chafa","name":"chafa","owner":"hpjansson","description":"📺🗿 Terminal graphics for the 21st century.","language":"C","license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0","license_osi_approved":"true","stars":5284,"issues":251,"created_at":"2018-04-24T19:57:55Z","updated_at":"2026-09-27T11:57:49Z","first_commit_at":"2018-02-25T22:41:01Z","last_commit_at":"2026-09-26T22:00:58Z","activity_months":102.98999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:08.936Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hpjansson/chafa","visibility":"public","created_at":"2018-04-24T19:57:55Z","updated_at":"2026-09-27T11:57:49Z","private":false,"fork":false,"archived":false,"stargazers_count":5284,"open_issues_count":54,"license_spdx_id":"LGPL-3.0","license_name":"GNU Lesser General Public License v3.0"},"error":"","rate":{"github_remaining":"1783","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0935:78367:1821CF9:1C48906:6AB92CA8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1782","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:179576A:1BBC79A:6AB92CA9"},"commit":{"sha":"652d1c0c08e2710dd2610b81699e0433ab88064f","url":"https://github.com/hpjansson/chafa/commit/652d1c0c08e2710dd2610b81699e0433ab88064f","date":"2018-05-24T23:18:38Z","author_date":"2018-05-24T23:18:38Z","committer_date":"2018-05-24T23:18:38Z","tree_sha":"e2cdc2629b70eaeb66444311b068e1e8dc6220ed","message_first_line":"ChafaCanvas: Pick optimal colors and consider more symbols in fast path."},"tree_request_status":200,"tree_rate":{"github_remaining":"1781","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:17E578E:1C0C38C:6AB92CA9"},"tree_truncated":false,"document_candidates":[{"path":"README","size":759,"blob_sha":"943770b4f804e58abc5b2bbefba60456aa648a65","priority":0},{"path":"README.md","size":662,"blob_sha":"7f8b01adb4fa8a471ac320dc6aeb27f53c76efea","priority":0}],"documents":[{"path":"README","size":759,"blob_sha":"943770b4f804e58abc5b2bbefba60456aa648a65","priority":0,"status":200,"text":"Chafa\n=====\n\nChafa is a command-line utility that converts all kinds of images, including\nanimated image formats like GIFs, into ANSI/Unicode character output that can\nbe displayed in a terminal.\n\nIt is highly configurable, with support for alpha transparency and multiple\ncolor modes and color spaces, combining a range of Unicode characters for\noptimal output.\n\nThe core functionality is provided by a C library with a public,\nwell-documented API.\n\nBuilding from tarball\n---------------------\n\n  ./configure\n  make\n  sudo make install\n\nBuilding from git\n-----------------\n\n  ./autogen.sh\n  make\n  sudo make install\n\nFurther reading\n---------------\n\nFor tarball releases, online documentation, etc. see the official web pages:\n\nhttps://hpjansson.org/chafa/\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4904:40B0C:17E8E9:5E5708:6AB92CA9"},"text_sha256":"f485624328edabce4ecd7e78d656ddbbbedfc7e7f0ec13b7f27ccfb0b731bb34"},{"path":"README.md","size":662,"blob_sha":"7f8b01adb4fa8a471ac320dc6aeb27f53c76efea","priority":0,"status":200,"text":"![](./docs/chafa-logo.gif)\n\nChafa is a command-line utility that converts all kinds of images, including\nanimated image formats like GIFs, into ANSI/Unicode character output that can\nbe displayed in a terminal.\n\nIt is highly configurable, with support for alpha transparency and multiple\ncolor modes and color spaces, combining a range of Unicode characters for\noptimal output.\n\nThe core functionality is provided by a C library with a public,\nwell-documented API.\n\n## Building from git\n\n```\n./autogen.sh\nmake\nsudo make install\n```\n\n## Further reading\n\nFor tarball releases, online documentation, etc. see\n[the official web pages](https://hpjansson.org/chafa/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"14F4:29FD16:184D18:5EBADA:6AB92CA9"},"text_sha256":"d2e25e0b38289abbc722fdd53c8dc2605cecb4724d5aa570363daa6918f7fa27"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1780","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:17E8488:1C0F73E:6AB92CAA"},"commit":{"sha":"61a9ae47415fd9c26c22e86854217b6e66c130e2","url":"https://github.com/hpjansson/chafa/commit/61a9ae47415fd9c26c22e86854217b6e66c130e2","date":"2026-06-22T16:48:47Z","author_date":"2026-06-22T16:48:47Z","committer_date":"2026-06-22T16:48:47Z","tree_sha":"2770c63cfd4954deafce013dc7c3875c2da74ec2","message_first_line":"smolscale: Validate API arguments"},"tree_request_status":200,"tree_rate":{"github_remaining":"1779","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:1810DA5:1C37E0D:6AB92CAB"},"tree_truncated":false,"document_candidates":[{"path":"README","size":2951,"blob_sha":"9ddd241cfa76f33f4cf4bc5dc96f5711f85c76f5","priority":0},{"path":"README.md","size":3734,"blob_sha":"9f4552805a222e1ce32cdc2d9db1fc714b04e29c","priority":0},{"path":"SECURITY.md","size":1439,"blob_sha":"4633608de9a82353ef9f0f472fc4029c8fd8c996","priority":1}],"documents":[{"path":"README","size":2951,"blob_sha":"9ddd241cfa76f33f4cf4bc5dc96f5711f85c76f5","priority":0,"status":200,"text":"Chafa\n=====\n\nChafa is a command-line utility that converts image data, including\nanimated GIFs, into graphics formats or ANSI/Unicode character art suitable\nfor display in a terminal. It has broad feature support, allowing it to be\nused on devices ranging from historical teleprinters to modern terminal\nemulators and everything in between.\n\nThe core functionality is provided by a C library with a public,\nwell-documented API.\n\nBoth library and frontend tools are covered by the Lesser GPL license,\nversion 3 or later (LGPLv3+).\n\nFor the most up-to-date information, please see https://hpjansson.org/chafa/\n\nInstalling with package manager\n-------------------------------\n\nChafa is available as packages for many software distributions. A few are\nlisted below, along with their command-line installation instructions:\n\nArch Linux .... pacman -S chafa\nBrew .......... brew install chafa\nDebian ........ apt install chafa\nFedora ........ dnf install chafa\nFreeBSD ....... pkg install chafa\nGentoo ........ emerge media-gfx/chafa\nGuix .......... guix install chafa\nKali Linux .... apt install chafa\nMacPorts ...... port install chafa\nOpenBSD ....... pkg_add chafa\nopenSUSE ...... zypper in chafa\nUbuntu ........ apt install chafa\n\nOn Windows, Chafa can be installed via Scoop and Winget:\n\nScoop ....... scoop install chafa\nWinget ....... winget install hpjansson.Chafa\n\nSee https://hpjansson.org/chafa/download/ for more.\n\nInstalling from tarball\n-----------------------\n\nYou will need GCC, make and the GLib development package installed to\ncompile Chafa from a release tarball. If you want to build the\ncommand-line tool `chafa` and not just the library, you will\nadditionally need the ImageMagick development packages.\n\nPrebuilt documentation is included in the release tarball, and you do not\nneed gtk-doc unless you want to make changes/rebuild it.\n\nAfter unpacking, cd to the toplevel directory and issue the following\nshell commands:\n\n$ ./configure\n$ make\n$ sudo make install\n\nInstalling from git repository\n------------------------------\n\nYou will need GCC, make, Autoconf, Automake, Libtool and the GLib\ndevelopment package installed to compile Chafa from its git repository. If\nyou want to build the command-line tool `chafa` and not just the library,\nyou will additionally need development packages for:\n\n* FreeType2\n* libjpeg (optional)\n* librsvg (optional)\n* libtiff (optional)\n* libwebp (optional)\n* ImageMagick (optional, deprecated)\n\nIf you want to build documentation, you will also need gtk-doc.\n\nStart by cloning the repository:\n\n$ git clone https://github.com/hpjansson/chafa.git\n\nThen cd to the toplevel directory and issue the following shell commands:\n\n$ ./autogen.sh\n$ make\n$ sudo make install\n\nPython bindings\n---------------\n\nErica Ferrua Edwardsdóttir maintains excellent Python bindings for Chafa. If\nPython's your thing, check them out. They are easy to use and come with a\ndetailed tutorial:\n\nhttps://chafapy.mage.black/\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4E92:3D501:185EA6:5ECCCB:6AB92CA9"},"text_sha256":"616ddfe000e82fdb54bb56f76ca7ae82b9180d2d6db5b5a088a5c32e7d088deb"},{"path":"README.md","size":3734,"blob_sha":"9f4552805a222e1ce32cdc2d9db1fc714b04e29c","priority":0,"status":200,"text":"<!-- This file is mostly readable as plain text, but it will look better\n  -- in a Markdown reader (try Frogmouth).\n  -- \n  -- Alternately, go to https://hpjansson.org/chafa/ in a web browser. -->\n\n<p align=\"center\"><a href=\"https://hpjansson.org/chafa/\"><img src=\"https://raw.githubusercontent.com/hpjansson/chafa/master/docs/chafa-logo.gif\" /><\/a><\/p>\n<p align=\"center\"><a href=\"https://github.com/hpjansson/chafa/actions/workflows/c-cpp.yml\"><img src=\"https://img.shields.io/github/actions/workflow/status/hpjansson/chafa/c-cpp.yml?style=for-the-badge\" alt=\"Master Build Status\" /><\/a>&emsp;<a href=\"https://hpjansson.org/chafa/download/\"><img src=\"https://img.shields.io/github/v/release/hpjansson/chafa?style=for-the-badge\" alt=\"Latest Release\" /><\/a>&emsp;<a href=\"https://matrix.to/#/#chafa:matrix.org\"><img src=\"https://img.shields.io/badge/friendly_chat-%23chafa%3Amatrix.org-blue?style=for-the-badge&logo=matrix\" alt=\"Friendly Chat\" /><\/a><\/p>\n<p align=\"center\"><a href=\"https://hpjansson.org/chafa/\">About<\/a> • <a href=\"https://hpjansson.org/chafa/gallery/\">Gallery<\/a> • <a href=\"https://hpjansson.org/chafa/download/\">Packages<\/a> • <a href=\"https://hpjansson.org/chafa/development/\">Development<\/a><\/p>\n\n## About\n\nChafa is a command-line utility that converts image data, including\nanimated GIFs, into graphics formats or ANSI/Unicode character art suitable\nfor display in a terminal. It has broad feature support, allowing it to be\nused on devices ranging from historical teleprinters to modern terminal\nemulators and everything in between.\n\nThe core functionality is provided by a C library with a public,\nwell-documented API.\n\nBoth library and frontend tools are covered by the Lesser GPL license,\nversion 3 or later (LGPLv3+).\n\nThe [official web pages](https://hpjansson.org/chafa/) and [C API\ndocumentation](https://hpjansson.org/chafa/ref/) can be found online. Check\nout the [gallery](https://hpjansson.org/chafa/gallery/) for screenshots.\n\n## Installing\n\nChafa is most likely packaged for your distribution, so if you're not\ngoing to hack on it, you're better off using\n[official packages](https://hpjansson.org/chafa/download/). If you want to\nbuild the latest and greatest yourself, read on.\n\nYou will need GCC, make, Autoconf, Automake, Libtool and the GLib\ndevelopment package installed to compile Chafa from its git repository. If\nyou want to build the command-line tool `chafa` and not just the library,\nyou will additionally need development packages for:\n\n* FreeType2. Often packaged as `libfreetype6-dev` or `freetype2-devel`.\n* libjpeg (optional). Look for `libjpeg-dev`, `libjpeg62-devel` or `libjpeg8-devel`.\n* librsvg (optional). Look for `librsvg2-dev` or `librsvg-devel`.\n* libtiff (optional). Look for `libtiff5-dev` or `libtiff-devel`.\n* libwebp (optional). Look for `libwebp-dev` or `libwebp-devel`.\n\nIf you want to build documentation, you will also need gtk-doc.\n\nStart by cloning the repository:\n\n```sh\n$ git clone https://github.com/hpjansson/chafa.git\n```\n\nThen cd to the toplevel directory and issue the following shell commands:\n\n```sh\n$ ./autogen.sh\n$ make\n$ sudo make install\n```\n\nThat should do it!\n\n## Python bindings\n\n[Erica Ferrua Edwardsdóttir](https://mage.black/) maintains\n[excellent Python bindings](https://chafapy.mage.black/) for Chafa. If\nPython's your thing, check them out. They are easy to use and come with a\n[detailed tutorial](https://chafapy.mage.black/usage/tutorial.html).\n\n## JavaScript bindings\n\n[Héctor Molinero Fernández](https://hector.molinero.dev/) maintains\n[wonderful JavaScript bindings](https://github.com/hectorm/chafa-wasm)\nbuilt around his WebAssembly port. These are available from NPM and can\nbe used in Node.js, web browsers, and more.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D20:3AC5A:17F9F0:5E67B5:6AB92CAA"},"text_sha256":"181d78f315d96fbee2573c324fa89362089dc03566cf9685d62d910ae9880577"},{"path":"SECURITY.md","size":1439,"blob_sha":"4633608de9a82353ef9f0f472fc4029c8fd8c996","priority":1,"status":200,"text":"# Security Policies and Procedures\n\nThis document outlines security procedures and general policies for Chafa.\n\n## Reporting a Bug\n\nWe are grateful for the testing and analysis carried out by the community. All\nbug reports are taken seriously.\n\nNormally, bugs can be filed directly in the public GitHub issue tracker, but if\nyou believe there is a security impact, please contact the lead maintainer at\nhis e-mail address <hpj@hpjansson.org> instead.\n\nWe will most likely respond within 48 hours, but since Chafa is a volunteer\nproject, please allow up to a week for those rare times we're away from the\nkeyboard or general connectivity.\n\nWhen a fix is published, you will receive credit under your real name or bug\ntracker handle in the NEWS document and possibly elsewhere (GitHub, blog post,\netc). If you prefer to remain anonymous or pseudonymous, you should mention\nthis in your e-mail.\n\n## Disclosure Policy\n\nThe maintainer will coordinate the fix and release process, involving the\nfollowing steps:\n\n  * Confirm the problem and determine the affected versions.\n  * Audit code to find any potential similar problems.\n  * Prepare fixes for all releases still under maintenance. These fixes will be\n    released as fast as possible.\n\nYou may be asked to provide further information in pursuit of a fix.\n\n## Comments on this Policy\n\nIf you have suggestions on how this process could be improved, please submit an\nissue or pull request.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE72:3E1C8:17F884:5E6581:6AB92CAB"},"text_sha256":"c652e1676e3957704a7ac67cda472497875d72887acba642b25b5bfbd25594c1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Breakthrough/PySceneDetect","input_row":{"repository":"Breakthrough/PySceneDetect","url":"https://github.com/Breakthrough/PySceneDetect","name":"PySceneDetect","owner":"Breakthrough","description":":movie_camera: Python and OpenCV-based scene cut/transition detection program & library.","language":"Python","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":5202,"issues":393,"created_at":"2014-06-04T04:43:21Z","updated_at":"2026-09-26T21:54:25Z","first_commit_at":"2014-06-04T04:43:21Z","last_commit_at":"2026-09-21T04:43:46Z","activity_months":147.56999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:12.505Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Breakthrough/PySceneDetect","visibility":"public","created_at":"2014-06-04T04:43:21Z","updated_at":"2026-09-26T21:54:25Z","private":false,"fork":false,"archived":false,"stargazers_count":5202,"open_issues_count":64,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1778","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17D604D:1BFC53D:6AB92CAC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1777","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:180178F:1C27472:6AB92CAC"},"commit":{"sha":"08931ca1525c247848a12bb60312f38e847171b6","url":"https://github.com/Breakthrough/PySceneDetect/commit/08931ca1525c247848a12bb60312f38e847171b6","date":"2018-05-08T01:04:28Z","author_date":"2018-05-08T01:04:28Z","committer_date":"2018-05-08T01:04:28Z","tree_sha":"8fd96bf6fdd4ca680da017519bbd212327b3511b","message_first_line":"Merge pull request #48 from petrpulc/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1776","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17DFB56:1C06BE2:6AB92CAD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9941,"blob_sha":"242c6ce50bc0229b2a0867e844e45b7e18048855","priority":0}],"documents":[{"path":"README.md","size":9941,"blob_sha":"242c6ce50bc0229b2a0867e844e45b7e18048855","priority":0,"status":200,"text":"      \nPySceneDetect\n==========================================================\nVideo Scene Cut Detection and Analysis Tool\n----------------------------------------------------------\n\n[![Documentation Status](https://readthedocs.org/projects/pyscenedetect/badge/?version=latest)](http://pyscenedetect.readthedocs.org/en/latest/?badge=latest) [![PyPI Status](https://img.shields.io/pypi/status/PySceneDetect.svg)](https://pypi.python.org/pypi/PySceneDetect/) [![PyPI Version](https://img.shields.io/pypi/v/PySceneDetect.svg)](https://pypi.python.org/pypi/PySceneDetect/)  [![PyPI License](https://img.shields.io/pypi/l/PySceneDetect.svg)](http://pyscenedetect.readthedocs.org/en/latest/copyright/)\n\n\n### Latest Release: v0.4 (January 14, 2017)\n\n**New**: The latest version integrates with `mkvmerge` to automatically split the input video into individual clips.\n\nThere is also now an installer for Windows that automatically installs all dependencies and the `scenedetect` command system wide (64-bit only currently).  This is the recommended installation method for Windows users now, and it can be found on [the Releases page](https://github.com/Breakthrough/PySceneDetect/releases).  The Windows builds do not require an existing Python environment, nor any other prerequisites.  There is also a portable .zip version available.\n\nIt is still recommended that both Linux and Mac users download the source distribution, following the installation instructions below.  \n\n--------\n\nQuick install; requires `numpy` and Python OpenCV `cv2` module, see [getting started guide](http://pyscenedetect.readthedocs.org/en/latest/examples/usage/) after install.  After installing the prerequisites, download the latest source distribution from [the Releases page](https://github.com/Breakthrough/PySceneDetect/releases), extract the archive, and in a terminal/command prompt in the location of the extracted files, run:\n\n    sudo python setup.py install\n\nTo test if you have the required prerequisites, open a `python` prompt, and run the following:\n\n    import numpy\n    import cv2\n\nIf both of those commands execute without any problems, you should be able to install PySceneDetect without any issues.  See [the new `USAGE.md` file](https://github.com/Breakthrough/PySceneDetect/blob/master/USAGE.md) for details on the new detection modes, default values/thresholds to try, and how to effectively choose the optimal detection parameters.  Full documentation for PySceneDetect can be found on Readthedocs at http://pyscenedetect.readthedocs.org/\n\n----------------------------------------------------------\n\nPySceneDetect is a command-line tool, written in Python and using OpenCV, which analyzes a video, looking for scene changes or cuts.  The output timecodes can then be used with another tool (e.g. `mkvmerge`, `ffmpeg`) to split the video into individual clips.  A frame-by-frame analysis can also be generated for a video, to help with determining optimal threshold values or detecting patterns/other analysis methods for a particular video.  See [the `USAGE.md` file](https://github.com/Breakthrough/PySceneDetect/blob/master/USAGE.md) for details.\n\nThere are two main detection methods PySceneDetect uses: `threshold` (comparing each frame to a set black level, useful for detecting cuts and fades to/from black), and `content` (compares each frame sequentially looking for changes in content, useful for detecting fast cuts between video scenes, although slower to process).  Each mode has slightly different parameters, and is described in detail below.\n\nIn general, use `threshold` mode if you want to detect scene boundaries using fades/cuts in/out to black.  If the video uses a lot of fast cuts between content, and has no well-defined scene boundaries, you should use the `content` mode.  Once you know what detection mode to use, you can try the parameters recommended below, or generate a statistics file (using the `-s` / `--statsfile` flag) in order to determine the correct paramters - specifically, the proper threshold value.\n\nNote that PySceneDetect is currently in beta; see Current Features & Roadmap below for details.  For help or other issues, you can contact me on [my website](http://www.bcastell.com/about/), or we can chat in #pyscenedetect on Freenode.  Feel free to submit any bugs or feature requests to [the Issue Tracker](https://github.com/Breakthrough/PySceneDetect/issues) here on Github.\n\n\nDownload & Installation\n----------------------------------------------------------\n\n**Downloading:** The latest version of PySceneDetect (`v0.4`) can be [downloaded here](https://github.com/Breakthrough/PySceneDetect/releases); to run it, you will need:\n\n - [Python 2 / 3](https://www.python.org/) (tested on 2.7.X, untested but should work on 3.X)\n - OpenCV Python Module (usually found in Linux package repos as `python-opencv`, Windows users can find [prebuilt binaries for Python 2.7 here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv))\n - [Numpy](http://sourceforge.net/projects/numpy/)\n - [mkvmerge](https://mkvtoolnix.download/downloads.html) (usually found in package managers, part of mkvtoolnix)\n\nMore complete documentation and installation instructions can be [found on Readthedocs](http://pyscenedetect.readthedocs.org/en/latest/download/), including a detailed guide on how to install the above dependencies.  Note that in some cases the Windows version may require an additional `opencv_ffmpeg.dll` file for the specific version of OpenCV installed.\n\nTo ensure you have all the system requirements installed, open a `python` interpreter/REPL, and ensure you can `import numpy` and `import cv2` without any errors.  You can download a test video and view the expected output [from the resources branch](https://github.com/Breakthrough/PySceneDetect/tree/resources/tests) (see the end of the Usage section below for details).\n\n**Installing:** Once you have all the system requirements, go to where you [downloaded PySceneDetect](https://github.com/Breakthrough/PySceneDetect/releases) and extract the archive.  To install PySceneDetect, run the following command in the folder containing the extracted files (the one containing `setup.py`):\n\n    python setup.py install\n\nAfter installation, you can use PySceneDetect as the `scenedetect` command from any terminal/command prompt.  To verify the installation, run the following command to display what version of PySceneDetect you have installed:\n\n    scenedetect --version\n\n\nUsage\n----------------------------------------------------------\n\n**There is now a dedicated [`USAGE.md` file (here)](https://github.com/Breakthrough/PySceneDetect/blob/master/USAGE.md) containing more detailed usage instructions.  Documentation is also being [added to Readthedocs](http://pyscenedetect.readthedocs.org/), which will eventually replace the content of this file (see the [PySceneDetect Quickstart Section](http://pyscenedetect.readthedocs.org/en/latest/examples/usage/) for details)..**\n\nTo run PySceneDetect, use the `scenedetect` command if you have it installed to your system.  Otherwise, if you are running from source, you can invoke `python scenedetect.py` or `./scenedetect.py` (instead of `scenedetect` in the examples shown below and elsewhere).  To display the help file, detailing the command line parameters:\n\n    scenedetect --help\n\nTo perform threshold-based analysis with the default parameters, on a video named `myvideo.mp4`, saving a list of scenes to `myvideo_scenes.csv` (they are also printed to the terminal):\n\n    scenedetect --input myvideo.mp4 --csv-output myvideo_scenes.csv\n\nTo perform content-based analysis, with a threshold intensity of 30:\n\n    scenedetect --input myvideo.mp4 --detector content --threshold 30\n\nTo perform threshold-based analysis, with a threshold intensity of 16 and a match percent of 90:\n\n    scenedetect --input myvideo.mp4 --detector threshold --threshold 16 --min-percent 90\n\nDetailed descriptions of the above parameters, as well as their default values, can be obtained by using the `--help` flag.\n\nBelow is a visual example of the parameters used in threshold mode (click for full-view):\n\n[<img src=\"https://github.com/Breakthrough/PySceneDetect/raw/resources/images/threshold-param-example.png\" alt=\"parameters in threshold mode\" width=\"360\" />](https://github.com/Breakthrough/PySceneDetect/raw/resources/images/threshold-param-example.png)\n\nYou can download the file `testvideo.mp4`, as well as the expected output `testvideo-results.txt`, [from the resources branch](https://github.com/Breakthrough/PySceneDetect/tree/resources/tests), for testing the operation of the program.  Data for the above graph was obtained by running PySceneDetect on `testvideo.mp4` in statistics mode (by specifying the `-s` argument).\n\n\nCurrent Features & Roadmap\n----------------------------------------------------------\n\nYou can [view the latest features and version roadmap on Readthedocs](http://pyscenedetect.readthedocs.org/en/latest/features/).\nSee [`docs/changelog.md`](https://github.com/Breakthrough/PySceneDetect/blob/master/docs/changelog.md) for a list of changes in each version, or visit [the Releases page](https://github.com/Breakthrough/PySceneDetect/releases) to download a specific version.  Feel free to submit any bugs/issues or feature requests to [the Issue Tracker](https://github.com/Breakthrough/PySceneDetect/issues).\n\nAdditional features being planned or in development can be found [here (tagged as `feature`) in the issue tracker](https://github.com/Breakthrough/PySceneDetect/issues?q=is%3Aissue+is%3Aopen+label%3Afeature).  You can also find additional information about PySceneDetect at [http://www.bcastell.com/projects/pyscenedetect/](http://www.bcastell.com/projects/pyscenedetect/).\n\n\n----------------------------------------------------------\n\nLicensed under BSD 2-Clause (see the `LICENSE` file for details).\n\nCopyright (C) 2012-2017 Brandon Castellano.\nAll rights reserved.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F486:241B62:17ACFA:5E1B93:6AB92CAC"},"text_sha256":"46761c113a575ba4a1c7e300b7e4f06578132f0c3973e67bbcb44d3190ebf586"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1775","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DC:71E0C:1801850:1C2756F:6AB92CAE"},"commit":{"sha":"fac764d921bbcdb716209b55ec6f2ee9b1710134","url":"https://github.com/Breakthrough/PySceneDetect/commit/fac764d921bbcdb716209b55ec6f2ee9b1710134","date":"2026-06-13T01:51:16Z","author_date":"2026-06-13T01:51:16Z","committer_date":"2026-06-13T01:51:16Z","tree_sha":"f0f8ad4de18a8527226a91f8781d3e48ae7b9b08","message_first_line":"[tests] Fix flaky VFR test on macOS with specific deps"},"tree_request_status":200,"tree_rate":{"github_remaining":"1774","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0936:71F98:1846C45:1C6D86C:6AB92CAE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5995,"blob_sha":"85a20c227969cb678beb50810856d6d62a3dab8a","priority":0}],"documents":[{"path":"README.md","size":5995,"blob_sha":"85a20c227969cb678beb50810856d6d62a3dab8a","priority":0,"status":200,"text":"\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Breakthrough/PySceneDetect/main/website/pages/img/pyscenedetect_logo_small_darkmode.png\">\n  <img alt=\"PySceneDetect\" src=\"https://raw.githubusercontent.com/Breakthrough/PySceneDetect/main/website/pages/img/pyscenedetect_logo_small.png\">\n<\/picture>\n\n# Video Cut Detection and Analysis Tool\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/Breakthrough/PySceneDetect/build.yml)](https://github.com/Breakthrough/PySceneDetect/actions)\n[![PyPI Status](https://img.shields.io/pypi/status/scenedetect.svg)](https://pypi.python.org/pypi/scenedetect/)\n[![PyPI Version](https://img.shields.io/pypi/v/scenedetect?color=blue)](https://pypi.python.org/pypi/scenedetect/)\n[![PyPI License](https://img.shields.io/pypi/l/scenedetect.svg)](https://scenedetect.com/copyright/)\n\n----------------------------------------------------------\n\n### Latest Release: v0.7 (May 3, 2026)\n\n**Website**:  [scenedetect.com](https://www.scenedetect.com)\n\n**Quickstart Example**: [scenedetect.com/cli/](https://www.scenedetect.com/cli/)\n\n**Documentation**:  [scenedetect.com/docs/](https://www.scenedetect.com/docs/)\n\n**Discord**: https://discord.gg/H83HbJngk7\n\n----------------------------------------------------------\n\n**Quick Install**:\n\n    pip install scenedetect --upgrade\n\nRequires ffmpeg/mkvmerge for video splitting support. Windows builds (MSI installer/portable ZIP) can be found on [the download page](https://scenedetect.com/download/).\n\n----------------------------------------------------------\n\n**Quick Start (Command Line)**:\n\nSplit input video on each fast cut using `ffmpeg`:\n\n    scenedetect -i video.mp4 split-video\n\nSave some frames from each cut:\n\n    scenedetect -i video.mp4 save-images\n\nSkip the first 10 seconds of the input video:\n\n    scenedetect -i video.mp4 time -s 10s\n\nMore examples can be found throughout [the documentation](https://www.scenedetect.com/docs/latest/cli.html).\n\n**Quick Start (Python API)**:\n\nTo get started, there is a high level function in the library that performs content-aware scene detection on a video (try it from a Python prompt):\n\n```python\nfrom scenedetect import detect, ContentDetector\nscene_list = detect('my_video.mp4', ContentDetector())\n```\n\n`scene_list` will now be a list containing the start/end times of all scenes found in the video.  There also exists a two-pass version `AdaptiveDetector` which handles fast camera movement better, and `ThresholdDetector` for handling fade out/fade in events.\n\nTry calling `print(scene_list)`, or iterating over each scene:\n\n```python\nfrom scenedetect import detect, ContentDetector\nscene_list = detect('my_video.mp4', ContentDetector())\nfor i, scene in enumerate(scene_list):\n    print('    Scene %2d: Start %s / Frame %d, End %s / Frame %d' % (\n        i+1,\n        scene[0].get_timecode(), scene[0].frame_num,\n        scene[1].get_timecode(), scene[1].frame_num,))\n```\n\nWe can also split the video into each scene if `ffmpeg` is installed (`mkvmerge` is also supported):\n\n```python\nfrom scenedetect import detect, ContentDetector, split_video_ffmpeg\nscene_list = detect('my_video.mp4', ContentDetector())\nsplit_video_ffmpeg('my_video.mp4', scene_list)\n```\n\nFor more advanced usage, the API is highly configurable, and can easily integrate with any pipeline. This includes using different detection algorithms, splitting the input video, and much more. The following example shows how to implement a function similar to the above, but using [the `scenedetect` API](https://www.scenedetect.com/docs/latest/api.html):\n\n```python\nfrom scenedetect import open_video, SceneManager, split_video_ffmpeg\nfrom scenedetect.detectors import ContentDetector\nfrom scenedetect.video_splitter import split_video_ffmpeg\n\ndef split_video_into_scenes(video_path, threshold=27.0):\n    # Open our video, create a scene manager, and add a detector.\n    video = open_video(video_path)\n    scene_manager = SceneManager()\n    scene_manager.add_detector(\n        ContentDetector(threshold=threshold))\n    scene_manager.detect_scenes(video, show_progress=True)\n    scene_list = scene_manager.get_scene_list()\n    split_video_ffmpeg(video_path, scene_list, show_progress=True)\n```\n\nSee [the documentation](https://www.scenedetect.com/docs/latest/api.html) for more examples.\n\n**Benchmark**:\n\nWe evaluate the performance of different detectors in terms of accuracy and processing speed. See the [benchmark report](benchmark/README.md) for details.\n\n## Reference\n\n - [Documentation](https://www.scenedetect.com/docs/) (covers application and Python API)\n - [CLI Example](https://www.scenedetect.com/cli/)\n - [Config File](https://www.scenedetect.com/docs/0.6.4/cli/config_file.html)\n\n## Help & Contributing\n\nPlease submit any bugs/issues or feature requests to [the Issue Tracker](https://github.com/Breakthrough/PySceneDetect/issues). Before submission, ensure you search through existing issues (both open and closed) to avoid creating duplicate entries.\nPull requests are welcome and encouraged.  PySceneDetect is released under the BSD 3-Clause license, and submitted code should be compliant.\n\nFor help or other issues, you can join [the official PySceneDetect Discord Server](https://discord.gg/H83HbJngk7), submit an issue/bug report [here on Github](https://github.com/Breakthrough/PySceneDetect/issues), or contact me via [my website](https://bcastell.com/about/).\n\n## Code Signing\n\nThis program uses free code signing provided by [SignPath.io](https://signpath.io?utm_source=foundation&utm_medium=github&utm_campaign=PySceneDetect), and a free code signing certificate by the [SignPath Foundation](https://signpath.org?utm_source=foundation&utm_medium=github&utm_campaign=PySceneDetect)\n\n## License\n\nBSD-3-Clause; see [`LICENSE`](LICENSE) and [`THIRD-PARTY.md`](THIRD-PARTY.md) for details.\n\n----------------------------------------------------------\n\nCopyright (C) 2014 Brandon Castellano.\nAll rights reserved.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF1C:3E1C8:17F898:5E6609:6AB92CAE"},"text_sha256":"3a5aeebdbf0f34074041d42be843cae0420bcdbf2773b099e2c54e5e4c606ae9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"TimOliver/TOCropViewController","input_row":{"repository":"TimOliver/TOCropViewController","url":"https://github.com/TimOliver/TOCropViewController","name":"TOCropViewController","owner":"TimOliver","description":"A view controller for iOS that allows users to crop portions of UIImage objects","language":"Objective-C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4947,"issues":416,"created_at":"2015-06-06T22:53:07Z","updated_at":"2026-09-26T13:50:40Z","first_commit_at":"2015-06-06T22:55:08Z","last_commit_at":"2026-07-28T15:29:12Z","activity_months":133.69999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:15.095Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"TimOliver/TOCropViewController","visibility":"public","created_at":"2015-06-06T22:53:07Z","updated_at":"2026-09-26T13:50:40Z","private":false,"fork":false,"archived":false,"stargazers_count":4947,"open_issues_count":106,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1773","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:18736BC:1C9A9F9:6AB92CAF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1772","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0937:278AC2:18736FB:1C9AA41:6AB92CAF"},"commit":{"sha":"3ef1ef96e53c909d60bd092be7f0db983ff819f2","url":"https://github.com/TimOliver/TOCropViewController/commit/3ef1ef96e53c909d60bd092be7f0db983ff819f2","date":"2018-05-24T02:01:57Z","author_date":"2018-05-24T02:01:57Z","committer_date":"2018-05-24T02:01:57Z","tree_sha":"3fd3bc207d46cca5f2945a512f49614814b7e34b","message_first_line":"Made CropViewController class open to allow for some extra flexibility - overrides of standard UIViewController methods like viewWillAppear or prefersStatusBarHidden."},"tree_request_status":200,"tree_rate":{"github_remaining":"1771","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0918:8656E:17DC48E:1C0316C:6AB92CAF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8198,"blob_sha":"add191a65ff07d035a663c7cb3b0d7817ddbdb3a","priority":0}],"documents":[{"path":"README.md","size":8198,"blob_sha":"add191a65ff07d035a663c7cb3b0d7817ddbdb3a","priority":0,"status":200,"text":"# TOCropViewController / CropViewController\n\n<p align=\"center\">\n<img src=\"https://github.com/TimOliver/TOCropViewController/raw/master/screenshot.jpg\" width=\"890\" style=\"margin:0 auto\" />\n<\/p>\n\n[![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=59efffd0785eab00015357fa&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/59efffd0785eab00015357fa/build/latest?branch=master)\n[![CocoaPods](https://img.shields.io/cocoapods/dt/TOCropViewController.svg?maxAge=3600)](https://cocoapods.org/pods/TOCropViewController)\n[![Version](https://img.shields.io/cocoapods/v/TOCropViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOCropViewController)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/TimOliver/TOCropViewController/master/LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/TOCropViewController.svg?style=flat)](http://cocoadocs.org/docsets/TOCropViewController)\n[![Beerpay](https://beerpay.io/TimOliver/TOCropViewController/badge.svg?style=flat)](https://beerpay.io/TimOliver/TOCropViewController)\n[![PayPal](https://img.shields.io/badge/paypal-donate-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M4RKULAVKV7K8)\n\n\n`TOCropViewController` is an open-source `UIViewController` subclass built to allow users to perform basic manipulation on `UIImage` objects; specifically cropping and some basic rotations. It has been designed with the iOS 8 Photos app in mind, and as such, behaves in an already familiar way.\n\n`CropViewController` is a Swift wrapper for `TOCropViewController`. It completely wraps all of the Objective-C object code in a pure Swift interface. This allows the API to look and feel 100% more Swifty, and can enable more elegant integrations with `TOCropViewController` in all-Swift codebases.\n\n## Features\n* Crop images by dragging the edges of a grid overlay.\n* Optionally, crop circular copies of images.\n* Rotate images in 90-degree segments.\n* Clamp the crop box to a specific aspect ratio.\n* A reset button to completely undo all changes.\n* iOS 7/8 translucency to make it easier to view the cropped region.\n* The choice of having the controller return the cropped image to a delegate, or immediately pass it to a `UIActivityViewController`.\n* A custom animation and layout when the device is rotated to landscape mode.\n* Custom 'opening' and 'dismissal' animations.\n* Localized in 18 languages.\n\n## System Requirements\niOS 8.0 or above\n\n## Installation\n\n#### As a CocoaPods Dependency\n\n##### Objective-C\n\nAdd the following to your Podfile:\n``` ruby\npod 'TOCropViewController'\n```\n\n##### Swift\n\nAdd the following to your Podfile:\n``` ruby\npod 'CropViewController'\n```\n\n\n#### As a Carthage Dependency\n\n##### Objective-C\n\nAdd the following to your Cartfile:\n``` \ngithub \"https://github.com/TimOliver/TOCropViewController\"\n```\n\n##### Swift\n\nComing soon.\n\n#### Manual Installation\n\nAll of the necessary source and resource files for `TOCropViewController` are in `Objective-C/TOCropViewController`, and all of the necessary Swift files are in `Swift/CropViewController`.\n\nFor Objective-C projects, copy just the `TOCropViewController` directory to your Xcode project. For Swift projects, copy both `TOCropViewController` and `CropViewController` to your project.\n\n## Examples\nUsing `TOCropViewController` is very straightforward. Simply create a new instance passing the `UIImage` object you wish to crop, and then present it modally on the screen.\n\nWhile `TOCropViewController` prefers to be presented modally, it can also be pushed to a `UINavigationController` stack.\n\nFor a complete working example, check out the sample apps included in this repo.\n\n### Basic Implementation\n\n#### Swift\n```swift\nfunc presentCropViewController {\n  let image: UIImage = ... //Load an image\n  \n  let cropViewController = CropViewController(image: image)\n  cropViewController.delegate = self\n  present(cropViewController, animated: true, completion: nil)\n}\n\nfunc cropViewController(_ cropViewController: CropViewController, didCropToImage image: UIImage, withRect cropRect: CGRect, angle: Int) {\n        // 'image' is the newly cropped version of the original image\n    }\n```\n\n#### Objective-C\n```objc\n- (void)presentCropViewController\n{\n  UIImage *image = ...; //Load an image\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.delegate = self;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n}\n\n- (void)cropViewController:(TOCropViewController *)cropViewController didCropToImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle\n{\n  // 'image' is the newly cropped version of the original image\n}\n```\n\n### Making a Circular Cropped Image\n```objc\n- (void)presentCropViewController\n{\nUIImage *image = ...; //Load an image\n\nTOCropViewController *cropViewController = [[TOCropViewController alloc] initWithCroppingStyle:TOCropViewCroppingStyleCircular image:image];\ncropViewController.delegate = self;\n[self presentViewController:cropViewController animated:YES completion:nil];\n}\n\n- (void)cropViewController:(TOCropViewController *)cropViewController didCropToCircularImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle\n{\n// 'image' is the newly cropped, circular version of the original image\n}\n```\n\n### Sharing Cropped Images Via a Share Sheet\n```objc\n- (void)presentCropViewController\n{\n  UIImage *image = ...; //Load an image\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.showActivitySheetOnDone = YES;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n}\n```\n\n### Presenting With a Custom Animation\nOptionally, `TOCropViewController` also supports a custom presentation animation where an already-visible copy of the image will zoom in to fill the screen.\n\n```objc\n- (void)presentViewController\n{\n  UIImage *image = ...;\n  UIImageView *imageView = [[UIImageView alloc] initWithImage:image];\n  CGRect frame = [self.view convertRect:imageView.frame toView:self.view];\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.delegate = self;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n  [cropViewController presentAnimatedFromParentViewController:self fromFrame:frame completion:nil];\n}\n```\n\n## Architecture of `TOCropViewController`\nWhile traditional cropping UI implementations will usually just have a dimming view with a square hole cut out of the middle, `TOCropViewController` goes about its implementation a little differently.\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/TimOliver/TOCropViewController/master/breakdown.jpg\" width=\"702\" style=\"margin:0 auto\" />\n<\/p>\n\nSince there are two views that are overlaid over the image (A dimming view and a translucency view), trying to cut a hole open in both of them would be rather complex. Instead, an image view is placed in a scroll view in the background, and a copy of the image view is placed on top, inside a container view that is clipped to the designated cropping size. The size and position of the foreground image is then made to match the background view, creating the illusion that there is a hole in the dimming views, and minimising the number of views onscreen.\n\n## Credits\n`TOCropViewController` was originally created by [Tim Oliver](http://twitter.com/TimOliverAU) as a component for [iComics](http://icomics.co), a comic reader app for iOS.\n\nThanks also goes to `TOCropViewController`'s growing list of [contributors](https://github.com/TimOliver/TOCropViewController/graphs/contributors)!\n\niOS Device mockups used in the screenshot created by [Pixeden](http://www.pixeden.com).\n\n## License\nTOCropViewController is licensed under the MIT License, please see the [LICENSE](LICENSE) file. ![analytics](https://ga-beacon.appspot.com/UA-5643664-16/TOCropViewController/README.md?pixel)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CD8:3BB77:17B7C5:5E27C0:6AB92CAF"},"text_sha256":"ecff213523788e252b52bc2ff0394c0526de49817bdbda9ac20697dfd121f52f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1770","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:18133F3:1C3A57D:6AB92CB0"},"commit":{"sha":"98527150c27eef8b695482c9b4ad5bdab1b1cb2b","url":"https://github.com/TimOliver/TOCropViewController/commit/98527150c27eef8b695482c9b4ad5bdab1b1cb2b","date":"2026-04-07T14:30:22Z","author_date":"2026-04-07T14:30:22Z","committer_date":"2026-04-07T14:30:22Z","tree_sha":"c933cc8faa95aaf0800288ed047b84aebc02411b","message_first_line":"Bumped version to v3.1.2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1769","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17CFC97:1BF5AC5:6AB92CB1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10756,"blob_sha":"4c40671600ea6226cb93efe1730cb82e48be6bb5","priority":0}],"documents":[{"path":"README.md","size":10756,"blob_sha":"4c40671600ea6226cb93efe1730cb82e48be6bb5","priority":0,"status":200,"text":"# TOCropViewController\n\n<p align=\"center\">\n<img src=\"https://github.com/TimOliver/TOCropViewController/raw/main/Images/screenshot.webp\" width=\"840\" style=\"margin:0 auto\" />\n<\/p>\n\n[![CI](https://github.com/TimOliver/TOCropViewController/workflows/CI/badge.svg)](https://github.com/TimOliver/TOCropViewController/actions?query=workflow%3ACI)\n![Version](https://img.shields.io/cocoapods/v/TOCropViewController.svg?style=flat)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/TimOliver/TOCropViewController/master/LICENSE)\n![Platform](https://img.shields.io/cocoapods/p/TOCropViewController.svg?style=flat)\n\n`TOCropViewController` is an open-source `UIViewController` subclass to crop out sections of `UIImage` objects, as well as perform basic rotations. It is excellent for things like editing profile pictures, or sharing parts of a photo online. It has been designed with the iOS Photos app editor in mind, and as such, behaves in a way that should already feel familiar to users of iOS.\n\nFor Swift developers, `CropViewController` is a Swift wrapper that completely encapsulates `TOCropViewController` and provides a much more native, Swiftier interface.\n\n#### Proudly powering apps by\n\n<p align=\"center\">\n<img src=\"https://github.com/TimOliver/TOCropViewController/raw/main/Images/users.png\" width=\"840\" style=\"margin:0 auto\" />\n<\/p>\n\n_Looking for something more? If `TOCropViewController` doesn't meet your exact requirements, please consider [IMG.LY](https://img.ly/?via=tim) with video editing and photo filter capabilities instead! (Disclaimer: Affiliate Link)_\n\n## Features\n* Crop images by dragging the edges of a grid overlay.\n* Optionally, crop circular copies of images.\n* Rotate images in 90-degree segments.\n* Clamp the crop box to a specific aspect ratio.\n* A reset button to completely undo all changes.\n* iOS 7/8 translucency to make it easier to view the cropped region.\n* The choice of having the controller return the cropped image to a delegate, or immediately pass it to a `UIActivityViewController`.\n* A custom animation and layout when the device is rotated to landscape mode.\n* Custom 'opening' and 'dismissal' animations.\n* Localized in 28 languages.\n\n## System Requirements\niOS 12.0 or above.\n\n_Disclaimer: visionOS and Mac Catalyst modes are also enabled, however they are not officially supported. PRs are always welcome!_ \n\n## Installation\n\n<details>\n  <summary><strong>CocoaPods<\/strong><\/summary>\n  \n  <h4>Objective-C<\/h4>\n\nAdd the following to your Podfile:\n``` ruby\npod 'TOCropViewController'\n```\n\n<h4>Swift<\/h4>\n\nAdd the following to your Podfile:\n``` ruby\npod 'CropViewController'\n```\n<\/details>\n\n<details>\n  <summary><strong>Swift Package Manager<\/strong><\/summary>\n\nAdd the following to your `Package.swift`:\n``` swift\ndependencies: [\n  // ...\n  .package(url: \"https://github.com/TimOliver/TOCropViewController.git\"),\n],\n```\n<\/details>\n\n<details>\n  <summary><strong>Carthage<\/strong><\/summary>\n\n1. Add the following to your Cartfile:\n``` \ngithub \"TimOliver/TOCropViewController\"\n```\n\n2. Run `carthage update`\n\n3. From the `Carthage/Build` folder, import one of the two frameworks into your Xcode project. For Objective-C projects, import just `TOCropViewController.framework`  and for Swift, import `CropViewController.framework` instead. Each framework is separate; you do not need to import both.\n\n4. Follow the remaining steps on [Getting Started with Carthage](https://github.com/Carthage/Carthage#getting-started) to finish integrating the framework.\n\n<\/details>\n\n<details>\n<summary><strong>Manual Installation<\/strong><\/summary>\n\nAll of the necessary source and resource files for `TOCropViewController` are in `Objective-C/TOCropViewController`, and all of the necessary Swift files are in `Swift/CropViewController`.\n\nFor Objective-C projects, copy just the `TOCropViewController` directory to your Xcode project. For Swift projects, copy both `TOCropViewController` and `CropViewController` to your project.\n<\/details>\n\n## Examples\nUsing `TOCropViewController` is very straightforward. Simply create a new instance passing the `UIImage` object you wish to crop, and then present it modally on the screen.\n\nWhile `TOCropViewController` prefers to be presented modally, it can also be pushed to a `UINavigationController` stack.\n\nFor a complete working example, check out the sample apps included in this repo.\n\n<details>\n<summary><strong>Basic Implementation<\/strong><\/summary>\n\n#### Swift\n```swift\nfunc presentCropViewController() {\n  let image: UIImage = ... //Load an image\n  \n  let cropViewController = CropViewController(image: image)\n  cropViewController.delegate = self\n  self.present(cropViewController, animated: true, completion: nil)\n}\n\nfunc cropViewController(_ cropViewController: CropViewController, didCropToImage image: UIImage, withRect cropRect: CGRect, angle: Int) {\n        // 'image' is the newly cropped version of the original image\n    }\n```\n\n#### Objective-C\n```objc\n- (void)presentCropViewController\n{\n  UIImage *image = ...; // Load an image\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.delegate = self;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n}\n\n- (void)cropViewController:(TOCropViewController *)cropViewController didCropToImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle\n{\n  // 'image' is the newly cropped version of the original image\n}\n```\n\nSimilar to many `UIKit` `UIViewController` subclasses, like `MFMailComposeViewController`, the class responsible for presenting view controller should also take care of dismissing it upon cancellation. To dismiss `TOCropViewController`, implement the `cropViewController:didFinishCancelled:` delegate method, and call `dismissViewController:animated:` from there.\n<\/details>\n\n<details>\n<summary><strong>Making a Circular Cropped Image<\/strong><\/summary>\n\n#### Swift\n```swift\nfunc presentCropViewController() {\n    var image: UIImage? // Load an image\n    let cropViewController = CropViewController(croppingStyle: .circular, image: image)\n    cropViewController.delegate = self\n    self.present(cropViewController, animated: true, completion: nil)\n}\n\nfunc cropViewController(_ cropViewController: TOCropViewController?, didCropToCircularImage image: UIImage?, with cropRect: CGRect, angle: Int) {\n    // 'image' is the newly cropped, circular version of the original image\n}\n```\n\n\n#### Objective-C\n```objc\n- (void)presentCropViewController\n{\nUIImage *image = ...; // Load an image\n\nTOCropViewController *cropViewController = [[TOCropViewController alloc] initWithCroppingStyle:TOCropViewCroppingStyleCircular image:image];\ncropViewController.delegate = self;\n[self presentViewController:cropViewController animated:YES completion:nil];\n}\n\n- (void)cropViewController:(TOCropViewController *)cropViewController didCropToCircularImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle\n{\n// 'image' is the newly cropped, circular version of the original image\n}\n```\n<\/details>\n\n<details>\n<summary><strong>Sharing Cropped Images Via a Share Sheet<\/strong><\/summary>\n\n#### Swift\n```swift\nfunc presentCropViewController() {\n    var image: UIImage? // Load an image\n    let cropViewController = CropViewController(image: image)\n    cropViewController.showActivitySheetOnDone = true\n    self.present(cropViewController, animated: true, completion: nil)\n}\n```\n\n#### Objective-C\n```objc\n- (void)presentCropViewController\n{\n  UIImage *image = ...; // Load an image\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.showActivitySheetOnDone = YES;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n}\n```\n<\/details>\n\n<details>\n<summary><strong>Presenting With a Custom Animation<\/strong><\/summary>\n\nOptionally, `TOCropViewController` also supports a custom presentation animation where an already-visible copy of the image will zoom in to fill the screen.\n\n#### Swift\n```swift\n\nfunc presentCropViewController() {\n    var image: UIImage? // Load an image\n    var imageView = UIImageView(image: image)\n    var frame: CGRect = view.convert(imageView.frame, to: view)\n    \n    let cropViewController = CropViewController(image: image)\n    cropViewController.delegate = self\n    self.present(cropViewController, animated: true, completion: nil)\n    cropViewController.presentAnimated(fromParentViewController: self, fromFrame: frame, completion: nil)\n}\n```\n\n#### Objective-C\n```objc\n- (void)presentCropViewController\n{\n  UIImage *image = ...;\n  UIImageView *imageView = [[UIImageView alloc] initWithImage:image];\n  CGRect frame = [self.view convertRect:imageView.frame toView:self.view];\n  \n  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];\n  cropViewController.delegate = self;\n  [self presentViewController:cropViewController animated:YES completion:nil];\n  [cropViewController presentAnimatedFromParentViewController:self fromFrame:frame completion:nil];\n}\n```\n<\/details>\n\n## Architecture of `TOCropViewController`\nWhile traditional cropping UI implementations will usually just have a dimming view with a square hole cut out of the middle, `TOCropViewController` goes about its implementation a little differently.\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/TimOliver/TOCropViewController/master/breakdown.jpg\" width=\"702\" style=\"margin:0 auto\" />\n<\/p>\n\nSince there are two views that are overlaid over the image (A dimming view and a translucency view), trying to cut a hole open in both of them would be rather complex. Instead, an image view is placed in a scroll view in the background, and a copy of the image view is placed on top, inside a container view that is clipped to the designated cropping size. The size and position of the foreground image is then made to match the background view, creating the illusion that there is a hole in the dimming views, and minimising the number of views onscreen.\n\n## Credits\n`TOCropViewController` was originally created by [Tim Oliver](http://twitter.com/TimOliverAU) as a component for [iComics](http://icomics.co), a comic reader app for iOS.\n\nThanks also goes to `TOCropViewController`'s growing list of [contributors](https://github.com/TimOliver/TOCropViewController/graphs/contributors)!\n\niOS Device mockups used in the screenshot created by [Pixeden](http://www.pixeden.com).\n\n## License\nTOCropViewController is licensed under the MIT License, please see the [LICENSE](LICENSE) file.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:A58F2:176BA3:5DDAD2:6AB92CAE"},"text_sha256":"9d26e16aa55a65f97c0beebd0b6599f2b96d3b1eeb49236afd0d758dc075bed7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"burhanrashid52/PhotoEditor","input_row":{"repository":"burhanrashid52/PhotoEditor","url":"https://github.com/burhanrashid52/PhotoEditor","name":"PhotoEditor","owner":"burhanrashid52","description":"A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.","language":"Kotlin","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4515,"issues":416,"created_at":"2018-01-23T11:44:10Z","updated_at":"2026-09-26T18:18:42Z","first_commit_at":"2018-01-12T09:23:17Z","last_commit_at":"2026-09-17T11:43:53Z","activity_months":104.14,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:17.934Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"burhanrashid52/PhotoEditor","visibility":"public","created_at":"2018-01-23T11:44:10Z","updated_at":"2026-09-27T14:43:36Z","private":false,"fork":false,"archived":false,"stargazers_count":4515,"open_issues_count":58,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1768","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:17A3B2F:1BC96BC:6AB92CB1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1767","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17E06C5:1C077B6:6AB92CB2"},"commit":{"sha":"22a28824c9fbbd2fab0b83116a7dbace276ea317","url":"https://github.com/burhanrashid52/PhotoEditor/commit/22a28824c9fbbd2fab0b83116a7dbace276ea317","date":"2018-05-24T11:58:33Z","author_date":"2018-05-24T11:58:33Z","committer_date":"2018-05-24T11:58:33Z","tree_sha":"bea4b1640d2b8ef38640a41c1bd127c127f17a92","message_first_line":"Filter static UI design"},"tree_request_status":200,"tree_rate":{"github_remaining":"1766","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0812:78367:18223C0:1C49123:6AB92CB2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7999,"blob_sha":"2a1f1cfb5a598e2a6985ebc50dd0cc9d72f14d11","priority":0}],"documents":[{"path":"README.md","size":7999,"blob_sha":"2a1f1cfb5a598e2a6985ebc50dd0cc9d72f14d11","priority":0,"status":200,"text":"# PhotoEditor\n\n[![Downloads](https://img.shields.io/badge/Download-0.1.1-blue.svg)](https://bintray.com/burhanrashid52/maven/photoeditor) ![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg) [![JavaDoc](https://img.shields.io/badge/JavaDoc-PhotoEditor-blue.svg)](https://burhanrashid52.github.io/PhotoEditor/) [![Uplabs](https://img.shields.io/badge/Uplabs-PhotoEditor-orange.svg)](https://www.uplabs.com/posts/photoeditor)\n [![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736) \n [![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185)\n [![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-pink.svg)](https://android.libhunt.com/newsletter/97)\n\nA Photo Editor library with simple, easy support for image editing using paints,text,emoji and Sticker like stories.\n\n## Features\n\n- [**Drawing**](#drawing) on image with option to change its Brush's Color,Size,Opacity and Erasing.\n- Adding/Editing [**Text**](#text) with option to change its Color with Custom Fonts.\n- Adding [**Emoji**](#emoji) with Custom Emoji Fonts.\n- Adding [**Images/Stickers**](#adding-imagesstickers)\n- Pinch to Scale and Rotate views.\n- [**Undo and Redo**](#undo-and-redo) for Brush and Views.\n- [**Deleting**](#deleting) Views\n- [**Saving**](#saving) Photo after editing.\n\n\n\n## Benefits\n- Hassle free coding\n- Increase efficiency\n- Easy image editing\n\n\n\n### Change Logs\n  - **0.1.1 :**\n        Changed `app:src=\"@drawable/got_s\"` to `app:photo_src=\"@drawable/got_s\"` in `PhotoEditorView` \n\n\n\n## Getting Started\nTo start with this , you need to just simply add the dependencies in gradle file of app module like this\n```\nimplementation 'ja.burhanrashid52:photoeditor:0.1.1'\n```\nor your can also import the :photoeditor module from sample for customization\n\n\n## Setting up the View\nFirst you need to add `PhotoEditorView` in your xml layout\n\n```\n <ja.burhanrashid52.photoeditor.PhotoEditorView\n        android:id=\"@+id/photoEditorView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:photo_src=\"@drawable/got_s\" />\n  \n```\nYour can define your drawable or color resource directly using `app:photo_src`\n\nYour can set the image programatically by getting source from `PhotoEditorView` which will return a `ImageView` so that you can load image from resources,file or (Picasso/Glide)\n```\nPhotoEditorView mPhotoEditorView = findViewById(R.id.photoEditorView);\n\nmPhotoEditorView.getSource().setImageResource(R.drawable.got);\n```\n\n## Building a PhotoEditor\nTo use the image editing feature you need to build a PhotoEditor which requires a Context and PhotoEditorView which we have setup in our xml layout\n\n\n```\n//Use custom font using latest support library\nTypeface mTextRobotoTf = ResourcesCompat.getFont(this, R.font.roboto_medium);\n\n//loading font from assest\nTypeface mEmojiTypeFace = Typeface.createFromAsset(getAssets(), \"emojione-android.ttf\");\n\nmPhotoEditor = new PhotoEditor.Builder(this, mPhotoEditorView)\n         .setPinchTextScalable(true)\n         .setDefaultTextTypeface(mTextRobotoTf)\n         .setDefaultEmojiTypeface(mEmojiTypeFace)\n         .build();\n ```\nYou can customize the properties in the PhotoEditor as per your requirement\n\n| Property  | Usage |\n| ------------- | ------------- |\n| `setPinchTextScalable()`  | set false to disable pinch to zoom on text insertion.By deafult its true\n| `setDefaultTextTypeface()`  | set default text font to be added on image  |\n| `setDefaultEmojiTypeface()`  | set default font specifc to add emojis |\n\nThat's it we are done with setting up our library\n\n\n\n## Drawing\nWe can customize our brush and paint with diffrent set of property.To start drawing on image we need to enable the drawing mode\n\n![](https://i.imgur.com/INi5LIy.gif)\n\n| Type  | Method |\n| ------------- | ------------- |\n| Enable/Disable  | `mPhotoEditor.setBrushDrawingMode(true);` |\n| Bursh Size (px)  | `mPhotoEditor.setBrushSize(brushSize)` |\n| Color Opacity (In %)  |   `mPhotoEditor.setOpacity(opacity)`  |\n| Brush Color | `mPhotoEditor.setBrushColor(colorCode)`  |\n| Brush Eraser  | `mPhotoEditor.brushEraser()` |\n\n**Note**: Whenever you set any property for brush for drawing it will automatically enables the drawing mode\n\n\n\n\n## Text\n\n![](https://i.imgur.com/491BmE8.gif)\n\nYou can add the text with input text and colorCode like this\n\n`mPhotoEditor.addText(inputText, colorCode);` \n\nIt will take default fonts provided in the builder,If you want diffrent fonts for diffrent text you can set typeface with each text like this \n\n`mPhotoEditor.addText(mTypeface,inputText, colorCode);`\n\nIn order to edit the text you need the view which you will reacive in you PhotoEditor callback.This callback will trigger when you **Long Press** the added text\n\n ```\n mPhotoEditor.setOnPhotoEditorListener(new OnPhotoEditorListener() {\n            @Override\n            public void onEditTextChangeListener(View rootView, String text, int colorCode) {\n                \n            }\n        });\n  ```\nNow you can edit the text with a view like this\n\n`mPhotoEditor.editText(rootView, inputText, colorCode);`\n\n\n\n\n## Emoji\n\n![](https://i.imgur.com/RP8kqz6.gif)\n\nYou can add the Emoji by `PhotoEditor.getEmojis(getActivity());` which will return a list of emojis unicodes\n\n`mPhotoEditor.addEmoji(emojiUnicode);`\n\nIt will take default fonts provided in the builder,If you want diffrent Emoji fonts for diffrent emoji you can set typeface with each Emoji like this \n\n`mPhotoEditor.addEmoji(mEmojiTypeface,emojiUnicode);`\n\n\n\n\n## Adding Images/Stickers\n You need to provide a Bitmap to add you Images  `mPhotoEditor.addImage(bitmap);`\n \n \n \n\n## Undo and Redo\n\n![](https://i.imgur.com/1Y9WcCB.gif)\n\n ```\n   mPhotoEditor.undo();\n   mPhotoEditor.redo();\n ```\n \n\n\n## Deleting\n  For deleting a Text/Emoji/Image you can click on the view to toggle the view highlighter box which will have a close icon so by on clicking on the icon you can delete the view\n  \n  \n  \n\n## Saving\n   \n   You need provide a file with callback method when edited image is saved\n   \n   ```\n    mPhotoEditor.saveImage(filePath, new PhotoEditor.OnSaveListener() {\n                    @Override\n                    public void onSuccess(@NonNull String imagePath) {\n                       Log.e(\"PhotoEditor\",\"Image Saved Successfully\");\n                    }\n\n                    @Override\n                    public void onFailure(@NonNull Exception exception) {\n                        Log.e(\"PhotoEditor\",\"Failed to save Image\");\n                    }\n                });\n```\n    \n## How to contribute?\n* Check out contribution guidelines 👉[CONTRIBUTING.md](https://github.com/burhanrashid52/PhotoEditor/blob/master/CONTRIBUTING.md)\n\n\n## What's next?\n- Croping Image with Custom Aspect ratio and more customization text/emoji/stickers\n\n\n## Questions?🤔\nHit me on twitter [![Twitter](https://img.shields.io/badge/Twitter-%40burhanrashid52-blue.svg)](https://twitter.com/burhanrashid52)\n[![Medium](https://img.shields.io/badge/Medium-%40burhanrashid52-brightgreen.svg)](https://medium.com/@burhanrashid52)\n[![Facebook](https://img.shields.io/badge/Facebook-Burhanuddin%20Rashid-blue.svg)](https://www.facebook.com/Bursid)\n\n\n\n## Credits\nThis project is inspired from [PhotoEditorSDK](https://github.com/eventtus/photo-editor-android)\n\n## License\nCopyright 2018 Burhanuddin Rashid\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1582:1F1FB6:17E078:5E4ED1:6AB92CB2"},"text_sha256":"6c05b51cbbebc09fc19f2e0d5b880ccd6d6911b571e9bd7cde380f5f8477458a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1765","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:17BDA66:1BE4A46:6AB92CB3"},"commit":{"sha":"8f571947ac0473d8ed41be51a18ab92da975430e","url":"https://github.com/burhanrashid52/PhotoEditor/commit/8f571947ac0473d8ed41be51a18ab92da975430e","date":"2026-06-09T06:24:16Z","author_date":"2026-05-27T10:16:56Z","committer_date":"2026-06-09T06:24:16Z","tree_sha":"61e92b4f3bb62eb3dd67f068760d80a3a8cfea8d","message_first_line":"Draw a uniform filled shape on a single tap"},"tree_request_status":200,"tree_rate":{"github_remaining":"1764","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17E38F0:1C0AAC9:6AB92CB3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16133,"blob_sha":"bc69221e1a97a9632a690fb002ada71dcd159c58","priority":0}],"documents":[{"path":"README.md","size":16133,"blob_sha":"bc69221e1a97a9632a690fb002ada71dcd159c58","priority":0,"status":200,"text":"# PhotoEditor\n\n![Github Action](https://github.com/burhanrashid52/PhotoEditor/actions/workflows/app_build_and_test.yml/badge.svg)\n[![Downloads](https://img.shields.io/badge/Download-3.1.0-blue.svg)](https://search.maven.org/artifact/com.burhanrashid52/photoeditor/3.1.0/aar) ![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg) [![JavaDoc](https://img.shields.io/badge/JavaDoc-PhotoEditor-blue.svg)](https://burhanrashid52.github.io/PhotoEditor/) [![Uplabs](https://img.shields.io/badge/Uplabs-PhotoEditor-orange.svg)](https://www.uplabs.com/posts/photoeditor)\n[![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736)\n[![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185)\n[![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-red.svg)](https://android.libhunt.com/newsletter/97)\n[![AndroidWeekly](https://img.shields.io/badge/Android%20Weekly-%23312-blue.svg)](http://androidweekly.net/issues/issue-312)\n[![Mindorks](https://img.shields.io/badge/Mindorks%20Newsletter-%234-ff69b4.svg)](https://mindorks.com/newsletter/edition/4)\n\n\nA Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.\n\n[Download link](https://drive.google.com/drive/folders/1pw_iZ_PIyOSJzCWR_uLnoe7PKCDTgosp?usp=sharing)\n\n![](https://i.imgur.com/ZYtLHTZ.png)\n\n<a href=\"https://www.producthunt.com/posts/photoeditor-2?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-photoeditor-2\" target=\"_blank\"><img src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=297508&theme=light\" alt=\"PhotoEditor - Android SDK with simple, easy support for image editing. | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /><\/a>\n\n<a href=\"https://www.buymeacoffee.com/burhanrashid52\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ><\/a>\n\n## Features\n\n- [**Drawing**](#drawing) on image with option to change its Brush's Color, Size, Opacity, Erasing and basic shapes.\n- Apply [**Filter Effect**](#filter-effect) on image using MediaEffect\n- Adding/Editing [**Text**](#text) with option to change its Color with Custom Fonts.\n- Adding [**Emoji**](#emoji) with Custom Emoji Fonts.\n- Adding [**Images/Stickers**](#adding-imagesstickers)\n- Pinch to Scale and Rotate views.\n- [**Undo and Redo**](#undo-and-redo) for Brush and Views.\n- [**Deleting**](#deleting) Views\n- [**Saving**](#saving) Photo after editing.\n- More [**FAQ**](#faq).\n- [Lesson Learned from building successful android library PhotoEditor: Droidcon Berlin 2021](#lesson-learned-from-building-successful-android-library-photoeditor-droidcon-berlin-2021)\n\n\n\n## Benefits\n- Hassle free coding\n- Increase efficiency\n- Easy image editing\n\n## Getting Started\nTo start with this, we need to simply add the dependencies from `mavenCentral()` in the gradle file of our app module like this\n```groovy\nimplementation 'com.burhanrashid52:photoeditor:3.1.0'\n```\nor we can also import the :photoeditor module from sample for further customization\n\n## Migrations\n### AndroidX\nPhotoEditor [v.1.0.0](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.1.0.0) is a migration to androidX and dropping the support of older support library. There are no API changes. If you find any issue migrating to v.1.0.0 , please follow this [Guide](https://developer.android.com/jetpack/androidx/migrate). If you still facing the issue than you can always rollback to [v.0.4.0](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.0.4.0). Any fix in PR are Welcome :)\n\n### Kotlin\nPhotoEditor [v.2.0.0](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.2.0.0) is fully migrated to Kotlin. You can use [v.1.5.1](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.1.5.1) for the Java version. There are no breaking API changes in these two versions.\n\n## Setting up the View\nFirst we need to add `PhotoEditorView` in our xml layout\n\n```xml\n <ja.burhanrashid52.photoeditor.PhotoEditorView\n        android:id=\"@+id/photoEditorView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:photo_src=\"@drawable/got_s\" />\n  \n```\nWe can define our drawable or color resource directly using `app:photo_src`\n\nWe can set the image programmatically by getting source from `PhotoEditorView` which will return a `ImageView` so that we can load image from resources,file or (Picasso/Glide)\n```kotlin\nmPhotoEditorView = findViewById(R.id.photoEditorView)\n\nmPhotoEditorView.source.setImageResource(R.drawable.paris_tower)\n```\n\n## Building a PhotoEditor\nTo use the image editing feature we need to build a PhotoEditor which requires a Context and PhotoEditorView which we have to setup in our xml layout\n\n\n```Kotlin\n//Use custom font using latest support library\nval mTextRobotoTf = ResourcesCompat.getFont(this, R.font.roboto_medium)\n//loading font from asset\nval mEmojiTypeFace = Typeface.createFromAsset(getAssets(), \"emojione-android.ttf\")\n\nmPhotoEditor = PhotoEditor.Builder(this, mPhotoEditorView)\n            .setPinchTextScalable(pinchTextScalable) // set flag to make text scalable when pinch\n            .setDefaultTextTypeface(mTextRobotoTf)\n            .setDefaultEmojiTypeface(mEmojiTypeFace)\n            .build() // build photo editor sdk\n ```\nWe can customize the properties in the PhotoEditor as per our requirement\n\n| Property  | Usage |\n| ------------- | ------------- |\n| `setPinchTextScalable()`  | set false to disable pinch to zoom on text insertion. Default: true. |\n| `setClipSourceImage()` | set true to clip the drawing brush to the source image. Default: false. |\n| `setDefaultTextTypeface()`  | set default text font to be added on image  |\n| `setDefaultEmojiTypeface()`  | set default font specifc to add emojis |\n\nThat's it we are done with setting up our library\n\n\n\n## Drawing\nWe can customize our brush and paint with different set of property. To start drawing on image we need to enable the drawing mode\n\n![](https://i.imgur.com/INi5LIy.gif)\n\n| Type                                         | Method                                                                 |\n|----------------------------------------------|------------------------------------------------------------------------|\n| Enable/Disable                               | `mPhotoEditor.setBrushDrawingMode(true);`                              |\n| Shape (brush, line, oval, rectangle, arrow)  | `mPhotoEditor.addShape(shape)`                                         |\n| Shape size (px)                              | `mPhotoEditor.setBrushSize(brushSize)` or through the a ShapeBuilder   |\n| Shape opacity (In %)                         | `mPhotoEditor.setOpacity(opacity)` or through the a ShapeBuilder       |\n| Shape color                                  | `mPhotoEditor.setBrushColor(colorCode)` or through the a ShapeBuilder  |\n| Brush Eraser                                 | `mPhotoEditor.brushEraser()`                                           |\n\n**Note**: Whenever we set any property of a brush for drawing it will automatically enable the drawing mode\n\n## Shapes\nWe can draw shapes from [v.1.5.0](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.1.5.0). We use `ShapeBuilder` to define shape and other properties.\n\n![](https://im2.ezgif.com/tmp/ezgif-2-5d5f7ddbe72e.gif)\n\n```kotlin\nval shapeBuilder = ShapeBuilder()\n    .withShapeOpacity(100)\n    .withShapeType(ShapeType.Oval)\n    .withShapeSize(50f)\n\nphotoEditor.setShape(mShapeBuilder)\n```\nFor more details check [ShapeBuilder](https://github.com/burhanrashid52/PhotoEditor/blob/master/photoeditor/src/main/java/ja/burhanrashid52/photoeditor/shape/ShapeBuilder.kt).\n\n## Filter Effect\nWe can apply inbuild filter to the source images using \n\n `mPhotoEditor.setFilterEffect(PhotoFilter.BRIGHTNESS)`\n\n![](https://i.imgur.com/xXTGcVC.gif)\n\nWe can also apply custom effect using `Custom.Builder`\n\nFor more details check [Custom Filters](https://github.com/burhanrashid52/PhotoEditor/wiki/Filter-Effect)\n\n\n\n## Text\n\n![](https://i.imgur.com/491BmE8.gif)\n\nWe can add the text with inputText and colorCode like this\n\n`mPhotoEditor.addText(inputText, colorCode);` \n\nIt will take default fonts provided in the builder. If we want different fonts for different text we can set typeface with each text like this\n\n`mPhotoEditor.addText(mTypeface,inputText, colorCode);`\n\nIn order to edit the text we need the view, which we will receive in our PhotoEditor callback. This callback will trigger when we **Long Press** the added text\n\n ```java\n mPhotoEditor.setOnPhotoEditorListener(new OnPhotoEditorListener() {\n            @Override\n            public void onEditTextChangeListener(View rootView, String text, int colorCode) {\n                \n            }\n        });\n  ```\nNow we can edit the text with a view like this\n\n`mPhotoEditor.editText(rootView, inputText, colorCode);`\n\nIf you want more customization on text. Please refer the wiki page for more details.\n\n\n## Emoji\n\n![](https://i.imgur.com/RP8kqz6.gif)\n\nWe can add the Emoji by `PhotoEditor.getEmojis(getActivity());` which will return a list of emojis unicode.\n\n`mPhotoEditor.addEmoji(emojiUnicode);`\n\nIt will take default fonts provided in the builder. If we want different Emoji fonts for different emoji we can set typeface with each Emoji like this\n\n`mPhotoEditor.addEmoji(mEmojiTypeface,emojiUnicode);`\n\n\n\n\n## Adding Images/Stickers\n We need to provide a Bitmap to add our Images  `mPhotoEditor.addImage(bitmap);`\n \n \n \n\n## Undo and Redo\n\n![](https://i.imgur.com/1Y9WcCB.gif)\n\n ```java\n   mPhotoEditor.undo();\n   mPhotoEditor.redo();\n ```\n \n\n\n## Deleting\n  For deleting a Text/Emoji/Image we can click on the view to toggle the view highlighter box which will have a close icon. So, by clicking on the icon we can delete the view.\n\n## Saving\n\nIn [v.3.0.0](https://github.com/burhanrashid52/PhotoEditor/releases/tag/v.3.0.0) onward, we can save an image to a file using coroutines:\n\n```kotlin\n// Please note that if you call this from a fragment, you should call\n// 'viewLifecycleOwner.lifecycleScope.launch' instead.\nlifecycleScope.launch {\n    val result = photoEditor.saveAsFile(filePath)\n    if (result is SaveFileResult.Success) {\n        showSnackbar(\"Image saved!\")\n    } else {\n        showSnackbar(\"Couldn't save image\")\n    }\n}\n```\n\nYou can also save an image to a file from Java. We need to provide a file with callback method when edited image is saved.\n\n   ```java\n    mPhotoEditor.saveAsFile(filePath, new PhotoEditor.OnSaveListener() {\n                    @Override\n                    public void onSuccess(@NonNull String imagePath) {\n                       Log.e(\"PhotoEditor\",\"Image Saved Successfully\");\n                    }\n\n                    @Override\n                    public void onFailure(@NonNull Exception exception) {\n                        Log.e(\"PhotoEditor\",\"Failed to save Image\");\n                    }\n                });\n```\n\nFor more details see [Saving](https://github.com/burhanrashid52/PhotoEditor/wiki/Saving)\n\n## How to contribute?\n* Check out contribution guidelines 👉[CONTRIBUTING.md](https://github.com/burhanrashid52/PhotoEditor/blob/master/CONTRIBUTING.md)\n\n\n## Questions?🤔\nHit me on twitter [![Twitter](https://img.shields.io/badge/Twitter-%40burhanrashid52-blue.svg)](https://twitter.com/burhanrashid52)\n[![Medium](https://img.shields.io/badge/Medium-%40burhanrashid52-brightgreen.svg)](https://medium.com/@burhanrashid52)\n[![Facebook](https://img.shields.io/badge/Facebook-Burhanuddin%20Rashid-blue.svg)](https://www.facebook.com/Bursid)\n\n## FAQ\n<details><summary>Can I use this library in my app for free?<\/summary>\n<p>\n\nYes. It's an open-source library and free to use. If this library has saved your time then showing a little credit will increase my motivation towards making the library better :)\n\n<\/p>\n<\/details>\n\n<details><summary>Does it support the CROP feature?<\/summary>\n<p>\n\nCurrently, No. I started to build in branch [PE-79](https://github.com/burhanrashid52/PhotoEditor/issues/79). But due to time constraint, I drop the idea. Any PR related to CROP is welcomed :)\n\n<\/p>\n<\/details>\n\n<details><summary>Facing issues in applying Filter?<\/summary>\n<p>\n\nThe filter effect is applied using `GlSurfaceView` and the implementation of this feature causing a lot of issues. Need to think of some other alternative solution. Here is the issue [list](https://github.com/burhanrashid52/PhotoEditor/issues?q=is%3Aissue+is%3Aopen+filter).\n\n<\/p>\n<\/details>\n\n<details><summary>Does is support in other platforms (iOS, Web, Flutter)?<\/summary>\n<p>\n\nNo. Currently, the focus is on making the android library better. We don't have any plans for [other Platform](https://github.com/burhanrashid52/PhotoEditor/issues/24).\n\n<\/p>\n<\/details>\n\n<details><summary>Other Know Issues<\/summary>\n<p>\n\n[Image Scaling](https://github.com/burhanrashid52/PhotoEditor/issues/10).\n<br>[Memory Issue in Filter](https://github.com/burhanrashid52/PhotoEditor/issues/48).\n\n<\/p>\n<\/details>\n\n### Who is using PhotoEditor?\n1. [Pixxo](https://play.google.com/store/apps/details?id=com.pixxo.breezil.pixxo)\n2. [Couple Blog: Long distance](https://play.google.com/store/apps/details?id=com.coupleblog)\n3. [Screenshot Tile (NoRoot)](https://f-droid.org/packages/com.github.cvzi.screenshottile/)\n\n**Note**: I will be happy to add your app to the list. Please reach out to me with details. You know how to reach me :)\n\n\n## Credits\nThis project is inspired from [PhotoEditorSDK](https://github.com/eventtus/photo-editor-android)\n\n## Buy a cup of coffee\nIf you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕️\n[BuyMeACoffee](https://www.buymeacoffee.com/burhanrashid52)\n\n<a href=\"https://www.producthunt.com/posts/photoeditor-2?utm_source=badge-review&utm_medium=badge&utm_souce=badge-photoeditor-2#discussion-body\" target=\"_blank\"><img src=\"https://api.producthunt.com/widgets/embed-image/v1/review.svg?post_id=297508&theme=light\" alt=\"PhotoEditor - Android SDK with simple, easy support for image editing. | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /><\/a>\n\n## Lesson Learned from building successful android library PhotoEditor: Droidcon Berlin 2021\n\n[![Lesson Learned from building successful android library PhotoEditor](https://burhanrashid52.com/wp-content/uploads/2021/11/246719409_10220774611897971_6342954485444508610_n-940x510.jpg)](https://player.vimeo.com/video/643904719 \"Lesson Learned from building successful android library PhotoEditor\")\n\n### [Open source Support](https://jb.gg/OpenSourceSupport) by [JetBrains](https://www.jetbrains.com)\n\n\n## MIT License\n\nCopyright (c) 2022 Burhanuddin Rashid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D17E:7A4F8:183A4C:5EA9D1:6AB92CB1"},"text_sha256":"21e3d3d68e1a31eab9d969ace7c0936678e7300a9b08e531116be1127ae08a20"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pmndrs/postprocessing","input_row":{"repository":"pmndrs/postprocessing","url":"https://github.com/pmndrs/postprocessing","name":"postprocessing","owner":"pmndrs","description":"A post processing library for three.js.","language":"JavaScript","license_spdx_id":"Zlib","license_name":"zlib License","license_osi_approved":"true","stars":2865,"issues":453,"created_at":"2015-12-08T13:20:11Z","updated_at":"2026-09-26T23:38:14Z","first_commit_at":"2015-12-08T12:50:58Z","last_commit_at":"2026-09-09T19:35:45Z","activity_months":129.05000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:20.591Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pmndrs/postprocessing","visibility":"public","created_at":"2015-12-08T13:20:11Z","updated_at":"2026-09-26T23:38:14Z","private":false,"fork":false,"archived":false,"stargazers_count":2865,"open_issues_count":31,"license_spdx_id":"Zlib","license_name":"zlib License"},"error":"","rate":{"github_remaining":"1763","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:17F5779:1C1C723:6AB92CB4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1762","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092A:7418C:1826EC8:1C4DF6F:6AB92CB4"},"commit":{"sha":"a3e16866d60349027aec6a6d6168cb203c962ec9","url":"https://github.com/pmndrs/postprocessing/commit/a3e16866d60349027aec6a6d6168cb203c962ec9","date":"2018-05-09T21:54:30Z","author_date":"2018-05-09T21:54:30Z","committer_date":"2018-05-09T21:54:30Z","tree_sha":"b10c8145f757b182ee0a1edabce08c9f1b4bbbf0","message_first_line":"Updated a code example."},"tree_request_status":200,"tree_rate":{"github_remaining":"1761","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17E3333:1C09A46:6AB92CB5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4104,"blob_sha":"0fd910e5924a2f917e86b66d938f289ca93e685d","priority":0}],"documents":[{"path":"README.md","size":4104,"blob_sha":"0fd910e5924a2f917e86b66d938f289ca93e685d","priority":0,"status":200,"text":"# Post Processing\n\n[![Build status](https://travis-ci.org/vanruesc/postprocessing.svg?branch=master)](https://travis-ci.org/vanruesc/postprocessing)\n[![npm version](https://badge.fury.io/js/postprocessing.svg)](http://badge.fury.io/js/postprocessing)\n[![Peer dependencies](https://david-dm.org/vanruesc/postprocessing/peer-status.svg)](https://david-dm.org/vanruesc/postprocessing?type=peer)\n\nA post processing library that provides the means to implement image filter effects for [three.js](https://threejs.org/).\n\n*[Extensive Demo](https://vanruesc.github.io/postprocessing/public/demo) &there4;\n[API Reference](https://vanruesc.github.io/postprocessing/public/docs) &there4;\n[Wiki](https://github.com/vanruesc/postprocessing/wiki)*\n\n\n## Installation\n\n```sh\nnpm install postprocessing\n``` \n\n\n## Usage\n\nPlease refer to the [usage example](https://github.com/mrdoob/three.js/blob/master/README.md) of three.js for information\nabout how to setup the renderer, scene and camera.\n\n#### Basics\n\n```javascript\nimport { Clock, PerspectiveCamera, Scene, WebGLRenderer } from \"three\";\nimport { EffectComposer, GlitchPass, RenderPass } from \"postprocessing\";\n\nconst composer = new EffectComposer(new WebGLRenderer());\ncomposer.addPass(new RenderPass(new Scene(), new PerspectiveCamera()));\n\nconst pass = new GlitchPass();\npass.renderToScreen = true;\ncomposer.addPass(pass);\n\nconst clock = new Clock();\n\n(function render() {\n\n\trequestAnimationFrame(render);\n\tcomposer.render(clock.getDelta());\n\n}());\n```\n\n#### Custom Passes\n\n```javascript\nimport { Pass } from \"postprocessing\";\nimport { MyMaterial } from \"./MyMaterial.js\";\n\nexport class MyPass extends Pass {\n\n\tconstructor() {\n\n\t\tsuper(\"MyPass\");\n\n\t\tthis.material = new MyMaterial();\n\n\t}\n\n\trender(renderer, inputBuffer, outputBuffer, delta, stencilTest) {\n\n\t\tthis.material.uniforms.tDiffuse.value = inputBuffer.texture;\n\t\trenderer.render(this.scene, this.camera, this.renderToScreen ? null : outputBuffer);\n\n\t}\n\n}\n\n```\n\nSee the [Wiki](https://github.com/vanruesc/postprocessing/wiki/Custom-Passes) for more information.\n\n\n## Included Filters\n\n - [Bloom](http://vanruesc.github.io/postprocessing/public/demo/#bloom)\n - [Blur](http://vanruesc.github.io/postprocessing/public/demo/#blur)\n - [Bokeh](http://vanruesc.github.io/postprocessing/public/demo/#bokeh)\n - [Realistic Bokeh](http://vanruesc.github.io/postprocessing/public/demo/#realistic-bokeh)\n - [Depth](http://vanruesc.github.io/postprocessing/public/demo/#depth)\n - [Dot Screen](http://vanruesc.github.io/postprocessing/public/demo/#dot-screen)\n - [Film](http://vanruesc.github.io/postprocessing/public/demo/#film)\n - [Glitch](http://vanruesc.github.io/postprocessing/public/demo/#glitch)\n - [God Rays](http://vanruesc.github.io/postprocessing/public/demo/#god-rays)\n - [Outline](http://vanruesc.github.io/postprocessing/public/demo/#outline)\n - [Pixelation](http://vanruesc.github.io/postprocessing/public/demo/#pixelation)\n - [Render](http://vanruesc.github.io/postprocessing/public/demo/#render)\n - [Shock Wave](http://vanruesc.github.io/postprocessing/public/demo/#shock-wave)\n - [SMAA](http://vanruesc.github.io/postprocessing/public/demo/#smaa)\n - [Tone Mapping](http://vanruesc.github.io/postprocessing/public/demo/#tone-mapping)\n\n\n## Contributing\n\nPlease refer to the [contribution guidelines](https://github.com/vanruesc/postprocessing/blob/master/.github/CONTRIBUTING.md) for details.\n\n\n## License\n\nThis library is licensed under the [Zlib license](https://github.com/vanruesc/postprocessing/blob/master/LICENSE.md).\n\nThe original code that this library is based on, was written by [alteredq](http://alteredqualia.com),\n[miibond](https://github.com/MiiBond), [zz85](https://github.com/zz85), [felixturner](http://airtight.cc),\n[spidersharma](http://eduperiment.com) and [huwb](http://huwbowles.com)\nand is licensed under the [MIT license](https://github.com/mrdoob/three.js/blob/master/LICENSE).\n\nThe film effect incorporates code written by Georg Steinrohder and Pat Shearon which was released under the\n[Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96EC:324E19:1815FB:5E8540:6AB92CB4"},"text_sha256":"8f910f048fa68a7f79354bd6874933c04c55a50d75a9fa52697f243dcc68076d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1760","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F3:3203A7:17A775D:1BCE6AB:6AB92CB6"},"commit":{"sha":"2de582e2f61cbbfa43f4e88131626ce8c4b4c46c","url":"https://github.com/pmndrs/postprocessing/commit/2de582e2f61cbbfa43f4e88131626ce8c4b4c46c","date":"2026-06-28T22:26:45Z","author_date":"2026-06-28T22:26:45Z","committer_date":"2026-06-28T22:26:45Z","tree_sha":"3e059ffa082e81aa8c148b8fe5c641690c3b62f4","message_first_line":"Merge pull request #744 from pmndrs/dev"},"tree_request_status":200,"tree_rate":{"github_remaining":"1759","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:1805E75:1C2D55D:6AB92CB6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7526,"blob_sha":"ad632035c753a5d025a5fa6b3d0ecf3d136ebb15","priority":0},{"path":"manual/content/legal.en.md","size":2097,"blob_sha":"dbe27fd2fdceb3c069cc8a8b582adeee7012e6fd","priority":1},{"path":"manual/content/privacy.en.md","size":5879,"blob_sha":"6a2f8890e0252921791b85900c49df01894f8c11","priority":1}],"documents":[{"path":"README.md","size":7526,"blob_sha":"ad632035c753a5d025a5fa6b3d0ecf3d136ebb15","priority":0,"status":200,"text":"# Post Processing\n\n[![CI](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml/badge.svg)](https://github.com/pmndrs/postprocessing/actions/workflows/ci.yml)\n[![Version](https://badgen.net/npm/v/postprocessing?color=green)](https://www.npmjs.com/package/postprocessing)\n\nA post processing library for [three.js](https://threejs.org/).\n\n*[Demo](https://pmndrs.github.io/postprocessing/public/demo)&ensp;&middot;&ensp;[Sandbox](https://stackblitz.com/edit/postprocessing-v6)&ensp;&middot;&ensp;[Documentation](https://pmndrs.github.io/postprocessing/public/docs)&ensp;&middot;&ensp;[Wiki](https://github.com/pmndrs/postprocessing/wiki)*\n\n## Installation\n\nThis library requires the peer dependency [three](https://github.com/mrdoob/three.js/).\n\n```sh\nnpm install three postprocessing\n```\n\n## Usage\n\nPost processing introduces the concept of passes and effects to extend the common rendering workflow with fullscreen image manipulation tools. The following WebGL attributes should be used for an optimal post processing workflow:\n\n```js\nimport { WebGLRenderer } from \"three\";\n\nconst renderer = new WebGLRenderer({\n\tpowerPreference: \"high-performance\",\n\tantialias: false,\n\tstencil: false,\n\tdepth: false\n});\n```\n\nThe [EffectComposer](https://pmndrs.github.io/postprocessing/public/docs/class/src/core/EffectComposer.js~EffectComposer.html) manages and runs passes. It is common practice to use a [RenderPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/RenderPass.js~RenderPass.html) as the first pass to automatically clear the buffers and render a scene for further processing. Fullscreen image effects are rendered via the [EffectPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/EffectPass.js~EffectPass.html). Please refer to the [usage example](https://github.com/mrdoob/three.js/blob/master/README.md) of three.js for more information on how to setup the renderer, scene and camera.\n\n```js\nimport { BloomEffect, EffectComposer, EffectPass, RenderPass } from \"postprocessing\";\n\nconst composer = new EffectComposer(renderer);\ncomposer.addPass(new RenderPass(scene, camera));\ncomposer.addPass(new EffectPass(camera, new BloomEffect()));\n\nrequestAnimationFrame(function render() {\n\n\trequestAnimationFrame(render);\n\tcomposer.render();\n\n});\n```\n\n## Output Color Space\n\nNew applications should follow a [linear workflow](https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html) for color management and postprocessing supports this automatically. Simply set `WebGLRenderer.outputColorSpace` to `SRGBColorSpace` and postprocessing will follow suit.\n\nPostprocessing uses `UnsignedByteType` sRGB frame buffers to store intermediate results. This is a trade-off between hardware support, efficiency and quality since linear results normally require at least 12 bits per color channel to prevent [color degradation and banding](https://blog.demofox.org/2018/03/10/dont-convert-srgb-u8-to-linear-u8/). With low precision sRGB buffers, colors will be clamped to `[0.0, 1.0]` and information loss will shift to the darker spectrum which leads to noticable banding in dark scenes. Linear, high precision `HalfFloatType` buffers don't have these issues and are the preferred option for HDR-like workflows on desktop devices. You can enable high precision frame buffers as follows:\n\n```ts\nimport { HalfFloatType } from \"three\";\n\nconst composer = new EffectComposer(renderer, {\n\tframeBufferType: HalfFloatType\n});\n```\n\n## Tone Mapping\n\nTone mapping is the process of converting HDR colors to LDR output colors. When using postprocessing, the `toneMapping` setting on the renderer should be set to `NoToneMapping` (default) and high precision frame buffers should be enabled. Otherwise, colors will be mapped to `[0.0, 1.0]` at the start of the pipeline. To enable tone mapping, use a `ToneMappingEffect` at the end of the pipeline.\n\nNote that tone mapping is not applied to the clear color when using only the renderer because clearing doesn't involve shaders. Postprocessing applies to the full input image which means that tone mapping will also be applied uniformly. Consequently, the results of tone mapping a clear color background with and without postprocessing will be different, with the postprocessing approach being correct.\n\n## Performance\n\nThis library provides an [EffectPass](https://pmndrs.github.io/postprocessing/public/docs/class/src/passes/EffectPass.js~EffectPass.html) which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own [blend function](https://pmndrs.github.io/postprocessing/public/docs/variable/index.html#static-variable-BlendFunction).\n\nAll fullscreen render operations also use a [single triangle](https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/) that fills the screen. Compared to using a quad, this approach harmonizes with modern GPU rasterization patterns and eliminates unnecessary fragment calculations along the screen diagonal. This is especially beneficial for GPGPU passes and effects that use complex fragment shaders.\n\n[Performance Test](https://pmndrs.github.io/postprocessing/public/demo/#performance)\n\n## Included Effects\n\n_The total demo download size is about `60 MB`._\n\n - [Antialiasing](https://pmndrs.github.io/postprocessing/public/demo/#antialiasing)\n - [Bloom](https://pmndrs.github.io/postprocessing/public/demo/#bloom)\n - [Blur](https://pmndrs.github.io/postprocessing/public/demo/#blur)\n - [Color Depth](https://pmndrs.github.io/postprocessing/public/demo/#color-depth)\n - [Color Grading](https://pmndrs.github.io/postprocessing/public/demo/#color-grading)\n   - Color Average\n   - Sepia\n   - Brightness & Contrast\n   - Hue & Saturation\n   - LUT\n - [Depth of Field](https://pmndrs.github.io/postprocessing/public/demo/#depth-of-field)\n   - Vignette\n - [Glitch](https://pmndrs.github.io/postprocessing/public/demo/#glitch)\n   - Chromatic Aberration\n   - Noise\n - [God Rays](https://pmndrs.github.io/postprocessing/public/demo/#god-rays)\n - [Pattern](https://pmndrs.github.io/postprocessing/public/demo/#pattern)\n   - Dot-Screen\n   - Grid\n   - Scanline\n - [Pixelation](https://pmndrs.github.io/postprocessing/public/demo/#pixelation)\n - [Outline](https://pmndrs.github.io/postprocessing/public/demo/#outline)\n - [Shock Wave](https://pmndrs.github.io/postprocessing/public/demo/#shock-wave)\n   - Depth Picking\n - [SSAO](https://pmndrs.github.io/postprocessing/public/demo/#ssao)\n - [Texture](https://pmndrs.github.io/postprocessing/public/demo/#texture)\n - [Tone Mapping](https://pmndrs.github.io/postprocessing/public/demo/#tone-mapping)\n\n## Custom Effects\n\nIf you want to learn how to create custom effects or passes, please check the [Wiki](https://github.com/pmndrs/postprocessing/wiki).\n\n## Contributing\n\nPlease refer to the [contribution guidelines](https://github.com/pmndrs/postprocessing/blob/main/.github/CONTRIBUTING.md) for details.\n\n## License\n\nThis library is licensed under the [Zlib license](https://github.com/pmndrs/postprocessing/blob/main/LICENSE.md).\n\nThe original code that this library is based on, was written by [mrdoob](https://mrdoob.com) and the [three.js contributors](https://github.com/mrdoob/three.js/graphs/contributors) and is licensed under the [MIT license](https://github.com/mrdoob/three.js/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"204C:24970A:185B65:5EC881:6AB92CA8"},"text_sha256":"60c29babcde00d7cd6052f2e4d7cfbb276ece8f761358928bc04420b9b4fee21"},{"path":"manual/content/legal.en.md","size":2097,"blob_sha":"dbe27fd2fdceb3c069cc8a8b582adeee7012e6fd","priority":1,"status":200,"text":"---\nlayout: single\ntitle: Legal\ndraft: false\ncollection: sections\nmenu: contentinfo\nweight: 1\n---\n\n# Legal Details\n\n## Information in Accordance with § 5 TMG\n\nRaoul van Rüschen\\\nKampweg 1\\\n26683 Saterland\n\n## Contact\n\nE-Mail: v&#97;nru&#101;&#115;c&#64;out&#108;&#111;ok&#46;&#100;e\\\nTwitter: [@vanruesc](https://twitter.com/vanruesc)\n\n## Sales Tax\n\nSales tax identification number in accordance with § 27a sales tax law:\\\n**DE322584571**\n\n## Dispute Resolution\n\nThe European Commission provides a platform for Online Dispute Resolutions:\\\n<https://ec.europa.eu/consumers/odr/>\n\n### Accountability for Content\n\nThe contents of our pages have been created with the utmost care. However, we cannot guarantee the contents' accuracy, completeness or topicality. According to statutory provisions, we are furthermore responsible for our own content on these web pages. In this matter, please note that we are not obliged to monitor the transmitted or saved information of third parties, or investigate circumstances pointing to illegal activity.\n\nOur obligations to remove or block the use of information under generally applicable laws remain unaffected by this as per §§ 8 to 10 TMG.\n\n## Accountability for Links\n\nResponsibility for the content of external links (to web pages of third parties) lies solely with the operators of the linked pages. No violations were evident to us at the time of linking. Should any legal infringement become known to us, we will remove the respective link immediately.\n\n### Copyright\n\nOur web pages and their contents are subject to German copyright law. Unless expressly permitted by law, every form of utilizing, reproducing or processing works subject to copyright protection on our web pages requires the prior consent of the respective owner of the rights. Individual reproductions of a work are only allowed for private use.\n\nThe materials from these pages are copyrighted and any unauthorized use may violate copyright laws. Third-party materials belong to their respective owners and are credited on the [attribution]({{< relref \"attribution\" >}}) page.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6F04:3D40A:1735E3:5DA523:6AB92CB7"},"text_sha256":"1609729340253ba323939cf8f76d341249cae4a82c90d489d123f08d005aaf30"},{"path":"manual/content/privacy.en.md","size":5879,"blob_sha":"6a2f8890e0252921791b85900c49df01894f8c11","priority":1,"status":200,"text":"---\nlayout: single\ntitle: Privacy Policy\ndescription: Find out more about your personal data and how it's being processed.\ndraft: false\ncollection: sections\nmenu: contentinfo\nweight: 2\n---\n\n# Privacy Policy\n\n## Introduction\n\nPersonal data (usually referred to just as \"data\" below) is any information related to you which by itself or in cumulation with other pieces of information gives the opportunity to the person that collects and processes such information to identify you as a person. It can be your name, your identification number, your location data, or information related to your physical, physiological, genetic, mental, economic, cultural or social life. Such data will only be processed by us to the extent necessary and for the purpose of providing a functional and user-friendly website, including its contents, and the services offered there. The party responsible for this website (the \"controller\") for purposes of data protection law can be found in the \\[legal details]({{< relref \"legal\" >}}) page.\n\nPer Art. 4 No. 1 of Regulation (EU) 2016 / 679, i.e. the General Data Protection Regulation (hereinafter referred to as the \"GDPR\"), \"processing\" refers to any operation or set of operations such as collection, recording, organization, structuring, storage, adaptation, alteration, retrieval, consultation, use, disclosure by transmission, dissemination, or otherwise making available, alignment, or combination, restriction, erasure, or destruction performed on personal data, whether by automated means or not.\n\nThe following privacy policy is intended to inform you in particular about the type, scope, purpose, duration, and legal basis for the processing of such data either under our own control or in conjunction with others. We also inform you below about the third-party components we use to optimize our website and improve the user experience which may result in said third parties also processing data they collect and control.\n\nWe recommend you to revisit these privacy policies regularly as they may change due to the continuous development of this website.\n\n## Data Collection\n\nThe controller collects, processes and discloses your personal data to third parties only if it is permitted by law or if you explicitly allow it. Your data processed when using our website will be deleted or blocked as soon as the purpose for its storage ceases to apply, provided the deletion of the same is not in breach of any statutory storage obligations or unless otherwise stipulated below.\n\n#### Contact\n\nIf you contact us via email or a contact form, the data you provide will be used for the purpose of processing your request. We must have this data in order to process and answer your inquiry; otherwise we will not be able to answer it in full or at all. The legal basis for this data processing is Art. 6 Para. 1 lit. b) GDPR.\n\nYour data will be deleted once we have fully answered your inquiry and there is no further legal obligation to store your data, such as if an order or contract resulted therefrom.\n\n### Rights Regarding Your Data\n\nWith regard to the data processing, users and data subjects have the right\n\n* to confirmation of whether data concerning them is being processed, information about the data being processed, further information about the nature of the data processing, and copies of the data (cf. also Art. 15 GDPR)\n* to correct or complete incorrect or incomplete data (cf. also Art. 16 GDPR)\n* to the immediate deletion of data concerning them (cf. also Art. 17 DSGVO), or, alternatively, if further processing is necessary as stipulated in Art. 17 Para. 3 GDPR, to restrict said processing per Art. 18 GDPR\n* to receive copies of the data concerning them and/or provided by them and to have the same transmitted to other providers/controllers (cf. also Art. 20 GDPR)\n* to file complaints with the supervisory authority if they believe that data concerning them is being processed by the controller in breach of data protection provisions (see also Art. 77 GDPR)\n\nThe responsible authority is the data security officer of Lower Saxony. A list of data security officials and their contact information can be found on the following website: <https://www.bfdi.bund.de/DE/Infothek/Anschriften_Links/anschriften_links-node.html>\n\nIn addition, the controller is obliged to inform all recipients to whom it discloses data of any such corrections, deletions, or restrictions placed on processing the same per Art. 16, 17 Para. 1, 18 GDPR. However, this obligation does not apply if such notification is impossible or involves a disproportionate effort. Nevertheless, users have a right to information about these recipients.\n\nLikewise, under Art. 21 GDPR, users and data subjects have the right to object to the controller's future processing of their data pursuant to Art. 6 Para. 1 lit. f) GDPR. In particular, an objection to data processing for the purpose of direct advertising is permissible.\n\n## TLS and SSL\n\nSSL and TLS are encryption protocols that ensure a fully secured communication for all data exchanged. These systems are widely used to ensure fully secured communications over the internet. When your connection is secure, your browser will show **https://** instead of **http://** in the address bar.\n\n## Server Log Files\n\nFor technical reasons, the following data sent by your internet browser to us or to our server provider will be collected, especially to ensure a secure and stable website:\n\n* Browser type and browser version\n* Operating system\n* Referrer URL\n* Hostname of the accessing computer\n* Date and time of your visit\n* IP address\n\nThe data thus collected will be temporarily stored, but not in association with any other of your data. The basis for this storage is Art. 6 Para. 1 lit. f) GDPR. Our legitimate interest lies in the improvement, stability, functionality, and security of our website.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4342:24970A:185B6B:5EC893:6AB92CB7"},"text_sha256":"cb7cfc790af180036160ebddf642680c3b1f5cd9e5c3ec73fb2ed4db80b021f1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":1,"C4":1,"C5":1,"C6":1,"C7":0,"D1":1,"score":6,"D1_evidence":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=layout: single title: Privacy Policy description: Find out more about your personal data and how it's being processed. draft: false collection: sections","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=layout: single title: Privacy Policy description: Find out more about your personal data and how it's being processed. draft: false collection: sections","C2":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=# Privacy Policy ## Introduction Personal data (usually referred to just as \"data\" below) is any information related to you which by itself or in cumulation with other pieces of information gives the opportunity to the person that collects and processes such information to identify you as a person. It can be your name, your identification number, your location data, or information related to your physical, physiological, genetic, mental, economic, cultural or social life. Such data will only be processed by us to the extent necessary and for the purpose of providing a functional and user-friendly website, including its contents, and the servi","C3":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=ansmission, dissemination, or otherwise making available, alignment, or combination, restriction, erasure, or destruction performed on personal data, whether by automated means or not. The following privacy policy is intended to inform you in particular about the type, scope, purpose, duration, and legal basis for the processing of such data either under our own control or in conjunction with others. We also inform you below about the third-party components we use to optimize our website and improve the user experience which may result in said third parties also processing data they collect and control. We recommend you to revisit these priva","C4":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=Nevertheless, users have a right to information about these recipients. Likewise, under Art. 21 GDPR, users and data subjects have the right to object to the controller's future processing of their data pursuant to Art. 6 Para. 1 lit.","C5":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=1 lit. b) GDPR. Your data will be deleted once we have fully answered your inquiry and there is no further legal obligation to store your data, such as if an order or contract resulted therefrom. ### Rights Regarding Your Data With regard to the data processing, users and data subjects have the right","C6":"sha=2de582e2f61cbbfa43f4e88131626ce8c4b4c46c; file=manual/content/privacy.en.md; text=onal data, whether by automated means or not. The following privacy policy is intended to inform you in particular about the type, scope, purpose, duration, and legal basis for the processing of such data either under our own control or in conjunction with others. We also inform you below about the third-party components we use to optimize our website and improve the user experience which may result in said third parties also processing data they collect and control. We recommend you to revisit these privacy policies regularly as they may change due to the continuous development of this website. ## Data Collection"}}}}
{"repository":"weserv/images","input_row":{"repository":"weserv/images","url":"https://github.com/weserv/images","name":"images","owner":"weserv","description":"Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2827,"issues":451,"created_at":"2015-03-15T13:08:31Z","updated_at":"2026-09-27T13:24:03Z","first_commit_at":"2013-10-06T15:44:03Z","last_commit_at":"2026-09-01T11:38:16Z","activity_months":154.81999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:23.859Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"weserv/images","visibility":"public","created_at":"2015-03-15T13:08:31Z","updated_at":"2026-09-27T13:24:03Z","private":false,"fork":false,"archived":false,"stargazers_count":2827,"open_issues_count":23,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1758","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082C:7307A:17CBCE5:1BF29A9:6AB92CB7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1757","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0834:0AC4:12A730E:15FE320:6AB92CB8"},"commit":{"sha":"a550d64bc864984b68fd93a8ba5beb012bd65c68","url":"https://github.com/weserv/images/commit/a550d64bc864984b68fd93a8ba5beb012bd65c68","date":"2018-05-11T09:34:01Z","author_date":"2018-05-11T09:34:01Z","committer_date":"2018-05-11T09:34:01Z","tree_sha":"703ff4c25d5d66568d7f09733463292f9b8a6656","message_first_line":"Updated statistics (bandwidth, datacenters)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1756","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0789:6C9BF:1813AF4:1C3AD52:6AB92CB8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2959,"blob_sha":"c8d4b1b013287ae3b218e3e903eb21dfe0dd9608","priority":0},{"path":"Privacy-Policy.md","size":3556,"blob_sha":"70a215d400255a17dc4387c528261a621dbf029f","priority":1}],"documents":[{"path":"README.md","size":2959,"blob_sha":"c8d4b1b013287ae3b218e3e903eb21dfe0dd9608","priority":0,"status":200,"text":"# Images.weserv.nl\n\n[![Author](https://img.shields.io/badge/author-andrieslouw-blue.svg)](https://github.com/andrieslouw)\n[![Author](https://img.shields.io/badge/author-kleisauke-blue.svg)](https://github.com/kleisauke)\n[![Source Code](https://img.shields.io/badge/source-andrieslouw/imagesweserv-blue.svg)](https://github.com/andrieslouw/imagesweserv)\n[![Software License](https://img.shields.io/badge/license-BSD3-brightgreen.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Build Status](https://travis-ci.org/andrieslouw/imagesweserv.svg?branch=3.x)](https://travis-ci.org/andrieslouw/imagesweserv)\n[![Test Coverage](https://codeclimate.com/github/andrieslouw/imagesweserv/badges/coverage.svg)](https://codeclimate.com/github/andrieslouw/imagesweserv/coverage)\n\nSource code of images.weserv.nl, to be used on your own server(s). Images.weserv.nl leverages powerful libraries like [php-vips](https://github.com/jcupitt/php-vips) (for image handling and manipulation), [Guzzle](https://github.com/guzzle/guzzle) (for sending HTTP requests) and [URI](https://github.com/thephpleague/uri) (to create and manage URIs).\n\n## Technologies used\n\n- Linux, [nginx](https://github.com/nginx/nginx), [libvips](https://github.com/jcupitt/libvips) and [PHP](https://github.com/php/php-src) (without these technologies, this project would never have been possible)\n- [Cloudflare](https://www.cloudflare.com/) (for caching and IP-blocking)\n- [Memcached](https://github.com/memcached/memcached)/[Redis](https://github.com/antirez/redis) (for rate limiting)\n- [OpenDNS](https://www.opendns.com/) (for DNS-filtering)\n\n## Documentation\n\nSee our [wiki documentation](https://github.com/andrieslouw/imagesweserv/wiki) or [API reference](https://images.weserv.nl/) for information on using images.weserv.nl.\n\n## Docker deployment\n\nFor information on Docker deployment, please read the [Docker installation instructions](DOCKER.md).\n\n## Submitting Bugs and Suggestions\n\nWe track support tickets, issues and feature requests using the [GitHub issue tracker](https://github.com/andrieslouw/imagesweserv/issues).\n\n## Credits\n[![Andries Louw Wolthuizen](https://avatars2.githubusercontent.com/u/11487455?v=3&s=120)](https://github.com/andrieslouw) | [![Kleis Auke Wolthuizen](https://avatars2.githubusercontent.com/u/12746591?v=3&s=120)](https://github.com/kleisauke)\n------------- | -------------\n[Andries Louw Wolthuizen](https://github.com/andrieslouw) | [Kleis Auke Wolthuizen](https://github.com/kleisauke)\n\n## License\n\nThe BSD 3-Clause License. Please see [LICENSE.md](https://github.com/andrieslouw/imagesweserv/blob/3.x/LICENSE.md) for more information.\n\n## Privacy Policy\n\nPlease see [Privacy-Policy.md](https://github.com/andrieslouw/imagesweserv/blob/3.x/Privacy-Policy.md) for more information.\n\n## Last but not least\nThis is made in Sneek with love and passion\n\n[![Made in Sneek](http://kleisauke.nl/made-in-sneek-resized.png)](https://en.wikipedia.org/wiki/Sneek)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"31B8:349C76:178B24:5DF6F4:6AB92CB8"},"text_sha256":"c2c9cd4a52f002951af5e451aa98df47f9266a78e7581191d0a7ffcdfce109df"},{"path":"Privacy-Policy.md","size":3556,"blob_sha":"70a215d400255a17dc4387c528261a621dbf029f","priority":1,"status":200,"text":"# Images.weserv.nl\n\n## Privacy Policy\nLast updated: February 05, 2018\n\nImages.weserv.nl (\"us\", \"we\", or \"our\") operates the https://images.weserv.nl/ website (the \"Service\").\n\nThis page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service.\n\nWe will not use or share your information with anyone except as described in this Privacy Policy. We use your Personal Information for providing and improving the Service. By using the Service, you agree to the collection and use of information in accordance with this policy.\n\n## Information Collection And Use\nWe do not knowingly collect personally identifiable information that can be used to contact or identify you.\n\n## Log Data\nWe collect information that your browser sends whenever you visit our Service (\"Log Data\"). This Log Data includes the following information: your Internet Protocol (\"IP\") address, browser type, browser version, the web addresses of our Service that you visit, and the time and date of your visit.\n\nLog Data is stored for 7 days, after which it is automatically deleted. Anonymized statistics may be shared to improve our service.\n\n## Cookies\nCookies are files with a small amount of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and transferred to your device. The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission.\n\nOur Service sents 1 cookie, `__cfduid`, which is used by Cloudflare to identify trusted web traffic. This cookie does not collect any personally identifiable information.\n\n## Service Providers\nWe may employ third party companies and individuals to facilitate our Service, to provide the Service on our behalf, to perform Service-related services or to assist us in analyzing how our Service is used. These third parties have access to your Personal Information only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose.\n\n## Children's Privacy\nWe do not address anyone under the age of 13 (\"Children\"). We do not knowingly collect personally identifiable information from children under 13. If you are a parent or guardian and you are aware that your Children has provided us with Personal Information, please contact us. If we discover that a Children under 13 has provided us with Personal Information, we will delete such information from our servers immediately.\n\n## Links To Other Sites\nOur Service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit. We have no control over, and assume no responsibility for the content, privacy policies or practices of any third party sites or services.\n\n## Changes To This Privacy Policy\nWe may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. [The history of changes can be viewed here](https://github.com/andrieslouw/imagesweserv/commits/3.x/Privacy-Policy.md). You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.\n\n## Contact Us\nIf you have any questions about this Privacy Policy, contact us by [creating a issue](https://github.com/andrieslouw/imagesweserv/issues).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D75A:3B1F3:185E77:5ECED1:6AB92CB8"},"text_sha256":"a40932c6ca4720a02bbf0c3d756d8f35584910c42ef3af587a0a0fa28393c1a5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":1,"C6":1,"C7":0,"D1":1,"score":4,"D1_evidence":"sha=a550d64bc864984b68fd93a8ba5beb012bd65c68; file=Privacy-Policy.md; text=Last updated: February 05, 2018 Images.weserv.nl (\"us\", \"we\", or \"our\") operates the website (the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service. We will not use or share your information with anyone except as described in this Privacy Policy. We use your Personal Information for providing and improving the Service.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=a550d64bc864984b68fd93a8ba5beb012bd65c68; file=Privacy-Policy.md; text=Last updated: February 05, 2018 Images.weserv.nl (\"us\", \"we\", or \"our\") operates the website (the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service. We will not use or share your information with anyone except as described in this Privacy Policy. We use your Personal Information for providing and improving the Service.","C2":"sha=a550d64bc864984b68fd93a8ba5beb012bd65c68; file=Privacy-Policy.md; text=Last updated: February 05, 2018 Images.weserv.nl (\"us\", \"we\", or \"our\") operates the website (the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service. We will not use or share your information with anyone except as described in this Privacy Policy. We use your Personal Information for providing and improving the Service.","C5":"sha=a550d64bc864984b68fd93a8ba5beb012bd65c68; file=Privacy-Policy.md; text=knowingly collect personally identifiable information from children under 13. If you are a parent or guardian and you are aware that your Children has provided us with Personal Information, please contact us. If we discover that a Children under 13 has provided us with Personal Information, we will delete such information from our servers immediately. ## Links To Other Sites Our Service may contain links to other sites that are not operated by us.","C6":"sha=a550d64bc864984b68fd93a8ba5beb012bd65c68; file=Privacy-Policy.md; text=Last updated: February 05, 2018 Images.weserv.nl (\"us\", \"we\", or \"our\") operates the website (the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service. We will not use or share your information with anyone except as described in this Privacy Policy. We use your Personal Information for providing and improving the Service."}}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1755","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:17BDBD0:1BE4C3A:6AB92CB9"},"commit":{"sha":"82c0144059bb9eda91177bd922d5625ddf74dfab","url":"https://github.com/weserv/images/commit/82c0144059bb9eda91177bd922d5625ddf74dfab","date":"2026-06-22T09:49:12Z","author_date":"2026-06-22T09:49:12Z","committer_date":"2026-06-22T09:49:12Z","tree_sha":"aab611317324707578611a6381addeab85befe95","message_first_line":"CI: Upgrade `codecov/codecov-action` to v7"},"tree_request_status":200,"tree_rate":{"github_remaining":"1754","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:181B3EC:1C42915:6AB92CB9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2873,"blob_sha":"74dbc60f9b9d1a369cf2bd542a3494cc4c5be719","priority":0},{"path":"Privacy-Policy.md","size":3481,"blob_sha":"de2dc976d4dade72d7ee9a8527553550455fe5f9","priority":1}],"documents":[{"path":"README.md","size":2873,"blob_sha":"74dbc60f9b9d1a369cf2bd542a3494cc4c5be719","priority":0,"status":200,"text":"# weserv/images\n\n[<img src=\"https://raw.githubusercontent.com/weserv/docs/deploy/logo.svg?sanitize=true\" width=\"160\" align=\"right\" alt=\"wsrv.nl logo\">][website]\n\n[![Author](https://img.shields.io/badge/author-andrieslouw-blue.svg)][author1]\n[![Author](https://img.shields.io/badge/author-kleisauke-blue.svg)][author2]\n[![Source code](https://img.shields.io/badge/source-weserv/images-blue.svg)](https://github.com/weserv/images)\n[![Software license](https://img.shields.io/github/license/weserv/images.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![CI status](https://github.com/weserv/images/workflows/CI/badge.svg)](https://github.com/weserv/images/actions)\n[![Coverage status](https://codecov.io/gh/weserv/images/graph/badge.svg)](https://codecov.io/gh/weserv/images)\n\nSource code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s). weserv/images leverages\npowerful libraries like [libvips](https://github.com/libvips/libvips) (for image handling and manipulation)\nand [nginx](https://github.com/nginx/nginx) (used as web server, forward proxy and HTTP cache).\n\n## Technologies used\n\n- Linux, [nginx](https://github.com/nginx/nginx) and [libvips](https://github.com/libvips/libvips)\n (without these technologies, this project would never have been possible)\n- [Cloudflare](https://www.cloudflare.com/) (for CDN caching and IP-blocking)\n- [Valkey](https://github.com/valkey-io/valkey) (for rate limiting)\n- [OpenDNS](https://www.opendns.com/) (for DNS-filtering)\n\n## Documentation\n\nSee our [wiki documentation](https://github.com/weserv/images/wiki) or\n[API reference][website] for information on using wsrv.nl.\n\n## Docker deployment\n\nFor information on Docker deployment, please read the\n[Docker installation instructions](docker/README.md).\n\n## Submitting Bugs and Suggestions\n\nWe track support tickets, issues and feature requests using\nthe [GitHub issue tracker](https://github.com/weserv/images/issues).\n\n## Credits\n\n| [![Andries Louw Wolthuizen][avatar-author1]][author1] | [![Kleis Auke Wolthuizen][avatar-author2]][author2] |\n| --- | --- |\n| [Andries Louw Wolthuizen][author1] | [Kleis Auke Wolthuizen][author2] |\n\n## License\n\nThe source code is licensed under the BSD 3-Clause License, see the [LICENSE](LICENSE) file for details.\n\n## Privacy Policy\n\nPlease see [Privacy-Policy.md](Privacy-Policy.md) for more information.\n\n## Last but not least\n\nThis is made in Sneek with love and passion.\n\n[<img src=\"https://raw.githubusercontent.com/weserv/docs/deploy/made-in-sneek.svg?sanitize=true\" height=\"200\" alt=\"Made in Sneek logo\">](https://en.wikipedia.org/wiki/Sneek)\n\n[website]: https://wsrv.nl/\n[author1]: https://github.com/andrieslouw\n[author2]: https://github.com/kleisauke\n[avatar-author1]: https://avatars.githubusercontent.com/u/11487455?v=4&s=120\n[avatar-author2]: https://avatars.githubusercontent.com/u/12746591?v=4&s=120\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"967A:149227:1825CD:5E962A:6AB92CB9"},"text_sha256":"e251e1e8a7af0cdc267f6c74f2ab33c93e426a7aeedfa7c5da2cde33777b4e03"},{"path":"Privacy-Policy.md","size":3481,"blob_sha":"de2dc976d4dade72d7ee9a8527553550455fe5f9","priority":1,"status":200,"text":"# Privacy Policy\nLast updated: November 15, 2022\n\nwsrv.nl (\"us\", \"we\", or \"our\") operates the https://wsrv.nl/ (formerly https://images.weserv.nl/) website (hereinafter referred to as the \"Service\").\n\nThis page informs you of our policies regarding the collection, use and disclosure of Personal Data when you use our Service.\n\nWe will not use or share your data with anyone except as described in this Privacy Policy. By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy.\n\n## Data collection and use\nIn order to provide and improve our Service to you, we collect statistics on an ongoing basis. We do not knowingly collect personally identifiable information that can be used to contact or identify you.\n\n### Types of data collected\n\n#### Log Data\nWhile using our Service, we collect information that your browser sends whenever you visit our Service (\"Log Data\").\n\nThis Log Data includes the following information: your device's Internet Protocol address (IP address), browser type, browser version, the pages of our Service that you visit and the time and date of your visit.\n\nLog Data is retained for 7 days, after which it is automatically deleted. Anonymised statistics may be shared to improve our service.\n\n## Use of data\nWe may use the collected data for the following purposes:\n\n- To provide and maintain our Service.\n- To provide customer support.\n- To provide analysis or valuable information so that we can improve the Service.\n- To monitor the usage of our Service.\n- To detect, prevent and address technical issues.\n\n## Service providers\nWe may employ third party companies and individuals to facilitate our Service (\"Service Providers\"), provide the Service on our behalf, perform Service-related services or assist us in analysing how our Service is used.\n\nThese third parties have access to your Personal Data only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose.\n\n## Children's privacy\nOur Service does not address anyone under the age of 13 (\"Children\").\n\nWe do not knowingly collect personally identifiable information from anyone under the age of 13. If you are a parent or guardian and you are aware that your Child has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from anyone under the age of 13 without verification of parental consent, we will delete such information from our servers.\n\n## Links to other sites\nOur Service may contain links to other websites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit.\n\nWe have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.\n\n## Changes to this Privacy Policy\nWe may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. [The history of changes can be viewed here](https://github.com/weserv/images/commits/5.x/Privacy-Policy.md).\n\nYou are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.\n\n## Contacting us\nIf you have any questions about this Privacy Policy, you can contact us by [creating an issue](https://github.com/weserv/images/issues).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A452:3E1C8:17F90D:5E67B9:6AB92CB9"},"text_sha256":"bbecb7039b168268d3459234ecafec44516e3950f4bb4ae72e124de0286817ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":1,"C4":1,"C5":1,"C6":1,"C7":0,"D1":1,"score":6,"D1_evidence":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=Last updated: November 15, 2022 wsrv.nl (\"us\", \"we\", or \"our\") operates the (formerly ) website (hereinafter referred to as the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Data when you use our Service. We will not use or share your data with anyone except as described in this Privacy Policy. By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=Last updated: November 15, 2022 wsrv.nl (\"us\", \"we\", or \"our\") operates the (formerly ) website (hereinafter referred to as the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Data when you use our Service. We will not use or share your data with anyone except as described in this Privacy Policy. By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy.","C2":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=Last updated: November 15, 2022 wsrv.nl (\"us\", \"we\", or \"our\") operates the (formerly ) website (hereinafter referred to as the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Data when you use our Service. We will not use or share your data with anyone except as described in this Privacy Policy. By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy.","C3":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=identifiable information from anyone under the age of 13. If you are a parent or guardian and you are aware that your Child has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from anyone under the age of 13 without verification of parental consent, we will delete such information from our servers. ## Links to other sites Our Service may contain links to other websites that are not operated by us.","C4":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=## Service providers We may employ third party companies and individuals to facilitate our Service (\"Service Providers\"), provide the Service on our behalf, perform Service-related services or assist us in analysing how our Service is used. These third parties have access to your Personal Data only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose. ## Children's privacy Our Service does not address anyone under the age of 13 (\"Children\").","C5":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=rmation from anyone under the age of 13. If you are a parent or guardian and you are aware that your Child has provided us with Personal Data, please contact us. If we become aware that we have collected Personal Data from anyone under the age of 13 without verification of parental consent, we will delete such information from our servers. ## Links to other sites Our Service may contain links to other websites that are not operated by us.","C6":"sha=82c0144059bb9eda91177bd922d5625ddf74dfab; file=Privacy-Policy.md; text=Last updated: November 15, 2022 wsrv.nl (\"us\", \"we\", or \"our\") operates the (formerly ) website (hereinafter referred to as the \"Service\"). This page informs you of our policies regarding the collection, use and disclosure of Personal Data when you use our Service. We will not use or share your data with anyone except as described in this Privacy Policy. By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy."}}}}
{"repository":"PyWavelets/pywt","input_row":{"repository":"PyWavelets/pywt","url":"https://github.com/PyWavelets/pywt","name":"pywt","owner":"PyWavelets","description":"PyWavelets - Wavelet Transforms in Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2403,"issues":367,"created_at":"2013-07-22T20:10:04Z","updated_at":"2026-09-26T18:35:04Z","first_commit_at":"2006-07-07T14:01:29Z","last_commit_at":"2026-09-17T22:04:14Z","activity_months":242.36000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:26.897Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PyWavelets/pywt","visibility":"public","created_at":"2013-07-22T20:10:04Z","updated_at":"2026-09-26T18:35:04Z","private":false,"fork":false,"archived":false,"stargazers_count":2403,"open_issues_count":84,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1753","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0796:754BF:17E060A:1C0786A:6AB92CBA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1752","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:17C9EF5:1BF1347:6AB92CBB"},"commit":{"sha":"99519156a40b08e49788f49ad1d2a2e4a568d0b0","url":"https://github.com/PyWavelets/pywt/commit/99519156a40b08e49788f49ad1d2a2e4a568d0b0","date":"2018-05-07T16:54:55Z","author_date":"2018-05-07T16:54:55Z","committer_date":"2018-05-07T16:54:55Z","tree_sha":"4f674bde1b78ec3c86367e984b5c61cde4e980be","message_first_line":"DOC: add figure from plot_thresholds.py to the documentation"},"tree_request_status":200,"tree_rate":{"github_remaining":"1751","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FB:72727:17BE19E:1BE528C:6AB92CBB"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4471,"blob_sha":"efbe42286edf2078bea23f4ee5935e9008bf0894","priority":0}],"documents":[{"path":"README.rst","size":4471,"blob_sha":"efbe42286edf2078bea23f4ee5935e9008bf0894","priority":0,"status":200,"text":"PyWavelets\n==========\n\n.. contents::\n\nWhat is PyWavelets\n------------------\n\nPyWavelets is a free Open Source library for wavelet transforms in Python.\nWavelets are mathematical basis functions that are localized in both time and\nfrequency.  Wavelet transforms are time-frequency transforms employing\nwavelets.  They are similar to Fourier transforms, the difference being that\nFourier transforms are localized only in frequency instead of in time and\nfrequency.\n\nThe main features of PyWavelets are:\n\n  * 1D, 2D and nD Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)\n  * 1D, 2D and nD Multilevel DWT and IDWT\n  * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)\n  * 1D and 2D Wavelet Packet decomposition and reconstruction\n  * 1D Continuous Wavelet Tranfsorm\n  * Computing Approximations of wavelet and scaling functions\n  * Over 100 `built-in wavelet filters`_ and support for custom wavelets\n  * Single and double precision calculations\n  * Real and complex calculations\n  * Results compatible with Matlab Wavelet Toolbox (TM)\n\n\nDocumentation\n-------------\n\nDocumentation with detailed examples and links to more resources is available\nonline at http://pywavelets.readthedocs.org.\n\nFor more usage examples see the `demo`_ directory in the source package.\n\n\nInstallation\n------------\n\nPyWavelets supports `Python`_ 2.7 or >=3.4, and is only dependent on `Numpy`_\n(supported versions are currently ``>= 1.9``). To pass all of the tests,\n`Matplotlib`_ is also required.\n\nThere are binary wheels for Intel Linux, Windows and macOS / OSX on PyPi.  If\nyou are on one of these platforms, you should get a binary (precompiled)\ninstallation with::\n\n    pip install PyWavelets\n\nUsers of the Anaconda_ Python distribution may wish to obtain pre-built\nWindows, Intel Linux or macOS / OSX binaries from the conda-forge channel.\nThis can be done via::\n\n    conda install -c conda-forge pywavelets\n\nSeveral Linux distributions have their own packages for PyWavelets, but these\ntend to be moderately out of date.  Query your Linux package manager tool for\n``python-pywavelets``, ``python-wavelets``, ``python-pywt`` or a similar\npackage name.\n\nIf you want or need to install from source, you will need a working C compiler\n(any common one will work) and a recent version of `Cython`_.  Navigate to the\nPyWavelets source code directory (containing ``setup.py``) and type::\n\n    pip install .\n\nThe most recent *development* version can be found on GitHub at\nhttps://github.com/PyWavelets/pywt.\n\nThe latest release, including source and binary packages for Intel Linux,\nmacOS and Windows, is available for download from the `Python Package Index`_.\nYou can find source releases at the `Releases Page`_.\n\nState of development & Contributing\n-----------------------------------\n\nPyWavelets started in 2006 as an academic project for a master thesis\non `Analysis and Classification of Medical Signals using Wavelet Transforms`\nand was maintained until 2012 by its `original developer`_.  In 2013\nmaintenance was taken over in a `new repo <https://github.com/PyWavelets/pywt>`_)\nby a larger development team - a move supported by the original developer.\nThe repo move doesn't mean that this is a fork - the package continues to be\ndeveloped under the name \"PyWavelets\", and released on PyPi and Github (see\n`this issue <https://github.com/nigma/pywt/issues/13>`_ for the discussion\nwhere that was decided).\n\nAll contributions including bug reports, bug fixes, new feature implementations\nand documentation improvements are welcome.  Moreover, developers with an\ninterest in PyWavelets are very welcome to join the development team!\n\n\nContact\n-------\n\nUse `GitHub Issues`_ or the `mailing list`_ to post your\ncomments or questions.\n\n\nLicense\n-------\n\nPyWavelets is a free Open Source software released under the MIT license.\n\n.. _built-in wavelet filters: http://wavelets.pybytes.com/\n.. _Cython: http://cython.org/\n.. _demo: https://github.com/PyWavelets/pywt/tree/master/demo\n.. _Anaconda: https://www.continuum.io\n.. _GitHub: https://github.com/PyWavelets/pywt\n.. _GitHub Issues: https://github.com/PyWavelets/pywt/issues\n.. _Numpy: http://www.numpy.org\n.. _original developer: http://en.ig.ma\n.. _Python: http://python.org/\n.. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/\n.. _mailing list: http://groups.google.com/group/pywavelets\n.. _Releases Page: https://github.com/PyWavelets/pywt/releases\n.. _Matplotlib: http://matplotlib.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37A8:17E138:17AE33:5E1DC0:6AB92CBA"},"text_sha256":"c71100bcfebdd8d5d88c022c48f3e375ad50f353b637ce6d9920274e7cf145ac"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1750","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17E3C35:1C09FCE:6AB92CBC"},"commit":{"sha":"cb30da3a232cb1435e9d45ec2a6d5bb4f4b5966d","url":"https://github.com/PyWavelets/pywt/commit/cb30da3a232cb1435e9d45ec2a6d5bb4f4b5966d","date":"2026-06-09T20:11:41Z","author_date":"2026-06-09T20:11:41Z","committer_date":"2026-06-09T20:11:41Z","tree_sha":"aae40200c8aec43c488fd1938da1591f35fc2430","message_first_line":"BUG: raise a clear error when cwt() is given a discrete wavelet (gh-776) (#849)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1749","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0815:74C18:181B69E:1C42C37:6AB92CBC"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":6315,"blob_sha":"451eb26dc3626e4a8bd3019d7f7d60db440f1e25","priority":0}],"documents":[{"path":"README.rst","size":6315,"blob_sha":"451eb26dc3626e4a8bd3019d7f7d60db440f1e25","priority":0,"status":200,"text":"+---------------+-----------------+\n| Service       | Master branch   |\n+===============+=================+\n| GitHub        | |ghactions_ci|  |\n+---------------+-----------------+\n| Appveyor      | |appveyor_ci|   |\n+---------------+-----------------+\n| Read the Docs | |read_the_docs| |\n+---------------+-----------------+\n\n\n.. |ghactions_ci| image:: https://github.com/PyWavelets/pywt/actions/workflows/tests.yml/badge.svg?branch=main\n   :alt: Build Status\n   :target: https://github.com/PyWavelets/pywt/actions/workflows/tests.yml?query=branch%3Amain\n\n.. |appveyor_ci| image:: https://ci.appveyor.com/api/projects/status/github/PyWavelets/pywt\n   :align: middle\n   :target: https://ci.appveyor.com/project/PyWavelets/pywt\n   :alt: Appveyor Status\n\n.. |read_the_docs| image:: https://readthedocs.org/projects/pywavelets/badge/?version=latest\n   :align: middle\n   :target: https://pywavelets.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n\nPyWavelets\n==========\n\n.. contents::\n\nWhat is PyWavelets\n------------------\n\nPyWavelets is a free Open Source library for wavelet transforms in Python.\nWavelets are mathematical basis functions that are localized in both time and\nfrequency.  Wavelet transforms are time-frequency transforms employing\nwavelets.  They are similar to Fourier transforms, the difference being that\nFourier transforms are localized only in frequency instead of in time and\nfrequency.\n\nThe main features of PyWavelets are:\n\n  * 1D, 2D and nD Forward and Inverse Discrete Wavelet Transform (DWT and IDWT)\n  * 1D, 2D and nD Multilevel DWT and IDWT\n  * 1D and 2D Stationary Wavelet Transform (Undecimated Wavelet Transform)\n  * 1D and 2D Wavelet Packet decomposition and reconstruction\n  * 1D Continuous Wavelet Transform\n  * Computing Approximations of wavelet and scaling functions\n  * Over 100 `built-in wavelet filters`_ and support for custom wavelets\n  * Single and double precision calculations\n  * Real and complex calculations\n  * Results compatible with Matlab Wavelet Toolbox (TM)\n\n\nDocumentation\n-------------\n\nDocumentation with detailed examples and links to more resources is available\nonline at http://pywavelets.readthedocs.org.\n\nFor more usage examples see the `demo`_ directory in the source package.\n\n\nInstallation\n------------\n\nPyWavelets supports `Python`_ >=3.10, and is only dependent on `NumPy`_\n(supported versions are currently ``>= 1.23.0``). To pass all of the tests,\n`Matplotlib`_ is also required.\n\nThere are binary wheels for Intel Linux, Windows and macOS / OSX on PyPi.  If\nyou are on one of these platforms, you should get a binary (precompiled)\ninstallation with::\n\n    pip install PyWavelets\n\nUsers of the Anaconda_ Python distribution may wish to obtain pre-built\nWindows, Intel Linux or macOS / OSX binaries from the conda-forge channel.\nThis can be done via::\n\n    conda install -c conda-forge pywavelets\n\nSeveral Linux distributions have their own packages for PyWavelets, but these\ntend to be moderately out of date.  Query your Linux package manager tool for\n``python-pywavelets``, ``python-wavelets``, ``python-pywt`` or a similar\npackage name.\n\nIf you want or need to install from source, you will need a working C compiler\n(any common one will work) and a recent version of `Cython`_.  Navigate to the\nPyWavelets source code directory (containing ``pyproject.toml``) and type::\n\n    pip install .\n\nThe most recent *development* version can be found on GitHub at\nhttps://github.com/PyWavelets/pywt.\n\nThe latest release, including source and binary packages for Intel Linux,\nmacOS and Windows, is available for download from the `Python Package Index`_.\nYou can find source releases at the `Releases Page`_.\n\nState of development & Contributing\n-----------------------------------\n\nPyWavelets started in 2006 as an academic project for a master thesis\non `Analysis and Classification of Medical Signals using Wavelet Transforms`\nand was maintained until 2012 by its `original developer`_.  In 2013\nmaintenance was taken over in a `new repo <https://github.com/PyWavelets/pywt>`_)\nby a larger development team - a move supported by the original developer.\nThe repo move doesn't mean that this is a fork - the package continues to be\ndeveloped under the name \"PyWavelets\", and released on PyPi and Github (see\n`this issue <https://github.com/nigma/pywt/issues/13>`_ for the discussion\nwhere that was decided).\n\nAll contributions including bug reports, bug fixes, new feature implementations\nand documentation improvements are welcome.  Moreover, developers with an\ninterest in PyWavelets are very welcome to join the development team!\n\nAs of 2019, PyWavelets development is supported in part by Tidelift.\n`Help support PyWavelets with the Tidelift Subscription <https://tidelift.com/subscription/pkg/pypi-pywavelets?utm_source=pypi-pywavelets&utm_medium=referral&utm_campaign=readme>`_\n\n\nContact\n-------\n\nUse `GitHub Issues`_ or the `mailing list`_ to post your comments or questions.\n\n**Report a security vulnerability:** https://tidelift.com/security\n\nLicense\n-------\n\nPyWavelets is a free Open Source software released under the MIT license.\n\nIf you wish to cite PyWavelets in a publication, please use the following\nJOSS publication.\n\n.. image:: http://joss.theoj.org/papers/10.21105/joss.01237/status.svg\n   :target: https://doi.org/10.21105/joss.01237\n\nSpecific releases can also be cited via Zenodo. The DOI below will correspond\nto the most recent release. DOIs for past versions can be found by following\nthe link in the badge below to Zenodo:\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1407171.svg\n   :target: https://doi.org/10.5281/zenodo.1407171\n\n.. _built-in wavelet filters: http://wavelets.pybytes.com/\n.. _Cython: http://cython.org/\n.. _demo: https://github.com/PyWavelets/pywt/tree/main/demo\n.. _Anaconda: https://www.continuum.io\n.. _GitHub: https://github.com/PyWavelets/pywt\n.. _GitHub Issues: https://github.com/PyWavelets/pywt/issues\n.. _NumPy: https://www.numpy.org\n.. _SciPy: https://www.scipy.org\n.. _original developer: http://en.ig.ma\n.. _Python: http://python.org/\n.. _Python Package Index: http://pypi.python.org/pypi/PyWavelets/\n.. _mailing list: http://groups.google.com/group/pywavelets\n.. _Releases Page: https://github.com/PyWavelets/pywt/releases\n.. _Matplotlib: http://matplotlib.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6396:3E1DA:17A5BE:5E160D:6AB92CBD"},"text_sha256":"8ef06beb4168bd6b5042c578c405d1143dad6a2853aeb43197b217cde58d3713"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"indulgeIn/YBImageBrowser","input_row":{"repository":"indulgeIn/YBImageBrowser","url":"https://github.com/indulgeIn/YBImageBrowser","name":"YBImageBrowser","owner":"indulgeIn","description":"iOS image browser / iOS 图片浏览器 (支持视频) ","language":"Objective-C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2394,"issues":350,"created_at":"2018-04-10T08:14:51Z","updated_at":"2026-09-16T01:34:37Z","first_commit_at":"2018-04-10T08:14:51Z","last_commit_at":"2022-09-15T04:58:31Z","activity_months":53.18,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:29.735Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"indulgeIn/YBImageBrowser","visibility":"public","created_at":"2018-04-10T08:14:51Z","updated_at":"2026-09-16T01:34:37Z","private":false,"fork":false,"archived":false,"stargazers_count":2394,"open_issues_count":97,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1748","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0798:180242:1805CD5:1C2CD0B:6AB92CBD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1747","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:181B7D7:1C42D96:6AB92CBE"},"commit":{"sha":"ad6d2e7b590d15c66da4e4d6c191bd0a986179b8","url":"https://github.com/indulgeIn/YBImageBrowser/commit/ad6d2e7b590d15c66da4e4d6c191bd0a986179b8","date":"2018-05-04T14:21:31Z","author_date":"2018-05-04T14:21:31Z","committer_date":"2018-05-04T14:21:31Z","tree_sha":"5bd5c2f9e39d9a4aacfab5c02abf07c0ef06153a","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1746","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0924:6C6ED:1802AE6:1C2977F:6AB92CBE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6723,"blob_sha":"73cd1ff5c073784109b3d3f04f8ff88d553acb0e","priority":0}],"documents":[{"path":"README.md","size":6723,"blob_sha":"73cd1ff5c073784109b3d3f04f8ff88d553acb0e","priority":0,"status":200,"text":"# YBImageBrowser (The latest version: 1.0.7)\n\nREADME 主要讲解用户可以配置的 API，设计思路及更多技术原理可以看笔者的简书文章：https://www.jianshu.com/p/bff0c6d89814\n\n<img src=\"https://github.com/indulgeIn/YBImageBrowser/blob/master/OtherDocuments/YBImageBrowserShowGif.gif\">\n\n\n\n# 中文说明\n\n\n\n\n## 安装\n\n### 使用 cocoapods\n\n**pod 'YBImageBrowser'**    \n\n注意：请尽量使用 1.0.7 及其之后的版本；若搜索不到库，可使用`rm ~/Library/Caches/CocoaPods/search_index.json`移除本地索引然后再执行安装，或者更新一下 cocoapods 版本。\n\n### 手动导入\n\n直接将该 Demo 的 `YBImageBrowser` 文件夹拖入你的工程中，并在你的 Podfile 里面添加：\n<pre><code>pod 'SDWebImage', '~> 4.3.3'\npod 'FLAnimatedImage', '~> 1.0.12'\n<\/code><\/pre>\n\n\n\n## 用法\n\n框架设计为每一个图片都是一个`YBImageBrowserModel`的实例模型，使用时只需要配置足够的`YBImageBrowserModel`实例，然后用数组或者实现代理的方式传给图片浏览器`YBImageBrowser`，然后调用`show`方法展示出来。注意本文会有一些伪代码，具体可以看框架API，有详尽的注释，大部分的自定义配置都是在`YBImageBrowser.h`文件和`YBImageBrowserModel.h`文件下，一个倾向于整体配置，一个倾向于单独配置。\n\n### 最简易的使用：\n<pre><code>//创建数据源\nYBImageBrowserModel *model0 = [YBImageBrowserModel new];\n[model0 setImageWithFileName:imageName fileType:imageType];\nmodel0.sourceImageView = ...\n...\n\n//创建图片浏览器\nYBImageBrowser *browser = [YBImageBrowser new];\nbrowser.dataArray = @[model0, ...];\nbrowser.currentIndex = ...\n[browser show];\n<\/code><\/pre>\n\n值得注意的是，`YBImageBrowserModel`的`sourceImageView`是当前图片对应的`UIImageView`，这是为了在图片浏览器的入场或出场时有一个移动(move)的动画效果；\n`YBImageBrowser`的`currentIndex`属性也是比较重要的，告知图片浏览器优先显示的图片下标。\n\n### 使用代理配置数据源\n\n除了使用数组直接赋值的方式配置数据源，框架还支持使用代理配置，用过`UITableView`的朋友应该很容易理解：\n\n<pre><code>YBImageBrowser *browser = [YBImageBrowser new];\n//设置数据源代理\nbrowser.dataSource = self;\nbrowser.currentIndex = ...\n[browser show];\n<\/code><\/pre>\n\n然后通过实现下列的方法完成数据源的配置（具体意义请看框架API）：\n\n<pre><code>- (UIImageView * _Nullable)imageViewOfTouchForImageBrowser:(YBImageBrowser *)imageBrowser;\n- (NSInteger)numberInYBImageBrowser:(YBImageBrowser *)imageBrowser;\n- (YBImageBrowserModel *)yBImageBrowser:(YBImageBrowser *)imageBrowser modelForCellAtIndex:(NSInteger)index;\n<\/code><\/pre>\n\n### 内存优化配置\n\n对于本地图片，使用`[UIImage imageNamed:name]`方式设置图片系统会自动缓存图片，若你使用的本地图片过大会造成大量的内存开销，所以建议使用文件读取的方式拿到图片，可以通过`YBImageBrowserModel`实例方法`setImageWithFileName:fileType:`方便配置。若是本地的 gif，请配置`gifName`属性，但是不要带后缀，组件会自动转换成需要的类型。\n\n对于网络图片，使用的是`SDWebImage`框架，对于它的下载和缓存你可以通过`YBImageBrowser`下的`downloaderShouldDecompressImages`属性设置是否解压并且缓存到内存，若你要展示的图片都是高清图片，那建议你将该属性置为NO。\n\n对于超清大图，组件内部会异步压缩和异步裁剪来减小内存的开销，若你的业务界面非常敏感，可以通过`YBImageBrowser`下的`maxDisplaySize`属性配置最大支持pt，超过这个限度，组件就要做相应的优化了。\n\n### 下载体验优化\n\n对于网络图片，通常情况下直接给`YBImageBrowserModel`的属性`url`赋值就行了，若你要追求更好的浏览体验，可以使用`YBImageBrowserModel`的方法`setUrlWithDownloadInAdvance:`实现预下载。\n\n### 缩略图\n\n`YBImageBrowserModel.h`下有一个属性：\n\n`@property (nonatomic, strong, nullable) YBImageBrowserModel *previewModel;`\n\n它同样是`YBImageBrowserModel`类型的，因为你想展现的缩略图可以只是知道一个`url`，所以这里索性用同一个类型表示它。当然，你不需担心缩略图是否下载或者是否分辨率过大，组件内部有足够的容错和优化机制。\n\n### 功能栏配置\n\n在长按或者点击右上角时，有功能栏弹出（默认只有一个保存功能，所以没有功能栏弹出效果），你可以通过`fuctionDataArray`属性自定义功能栏的数据，还有其他的配置，详情在`YBImageBrowser.h`中可见，写得很清楚。框架默认实现了保存功能，你可以把`fuctionDataArray`属性置空来取消所有功能。\n\n### 动画配置\n\n默认会有一个平滑移动入场和出场动画，向下拖拽时的动画效果是模仿微信的，因为我认为微信的图片浏览器是做得最棒的；你可以通过`YBImageBrowser.h`中的`inAnimation`和`outAnimation`属性配置入场和出场的动画类型，目前支持得不多，后期迭代考虑集成更多的动效；还有其它比如转场动画持续时间、拖拽动效的取消、页间距等属性可以自定义配置。\n\n### 屏幕旋转\n\n屏幕旋转支持的方向可以自定义，通过`yb_supportedInterfaceOrientations`属性来设置。值得注意的是，目前本框架还不支持自动旋转，意味着\n在目标工程的\n\n`general -> deployment info -> Device Orientation`\n\n中的配置，将直接影响组件的实际支持旋转方向。\n\n### 图片缩放\n\n图片缩放方面，组件会自动计算，同时做了一定的盈余，保证在放大到最大可显示px时还能继续放大一部分保证看的更清楚。若你不喜欢组件做的这些优化，可以通过`autoCountMaximumZoomScale`来取消该功能；还可以选择填充的方式，目前支持宽度抵满方式和完全显示方式。\n\n### 文案撰写者\n\n组件加入了一个实例：\n\n`@property (nonatomic, strong) YBImageBrowserCopywriter *copywriter;`\n\n笔者叫它文案撰写者，你可以对其属性赋值，来替换默认的一些文案（国际化时用起来比较方便）。\n\n### 状态栏的处理\n\n状态栏组件会自动判断你在`info.plist`里的配置，所有不需担心兼容性问题，方便使用，不管你是何种配置，都可以通过`showStatusBar`属性来显示或者隐藏状态栏。\n\n### 更换图片下载库\n\n若你想更换`SDWebImage`库为其他图片库，可以更改`NSBundle+YBImageBrowser`延展，所有与`SDWebImage`有关的使用都在里面，替换并不困难。\n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3DE:324E19:181631:5E8686:6AB92CB7"},"text_sha256":"41a3b291fe4c157e3d65f4be8f473f8ae5501aa069546f0306a0a26abce7b9b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1745","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0882:156040:17E3B18:1C0A369:6AB92CBF"},"commit":{"sha":"ef2ace7bec42eac5f5e50bd5684dfc67d9a9b294","url":"https://github.com/indulgeIn/YBImageBrowser/commit/ef2ace7bec42eac5f5e50bd5684dfc67d9a9b294","date":"2022-09-15T04:58:31Z","author_date":"2022-09-15T04:58:31Z","committer_date":"2022-09-15T04:58:31Z","tree_sha":"8d5dd871ab369d59f9a4931ec8f418ca4d3a9bc2","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1744","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:1836376:1C5D2DF:6AB92CBF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9199,"blob_sha":"a92a1cdf2794f6ef4758562b639fc2fc55746c53","priority":0}],"documents":[{"path":"README.md","size":9199,"blob_sha":"a92a1cdf2794f6ef4758562b639fc2fc55746c53","priority":0,"status":200,"text":"\n\n![](https://github.com/indulgeIn/YBImageBrowser/blob/master/Images/banner.png)\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/YBImageBrowser.svg)](https://cocoapods.org/pods/YBImageBrowser)&nbsp;\n[![CocoaPods](https://img.shields.io/cocoapods/p/YBImageBrowser.svg)](https://github.com/indulgeIn/YBImageBrowser)&nbsp;\n[![License](https://img.shields.io/github/license/indulgeIn/YBImageBrowser.svg)](https://github.com/indulgeIn/YBImageBrowser)&nbsp;\n\n**iOS 图片浏览器，功能强大，易于拓展，性能优化和内存控制让其运行更加的流畅和稳健。**\n\n##### 相关文章：\n##### [YBImageBrowser 重构心得：如何优化架构、性能、内存？](https://www.jianshu.com/p/ef53d0094437)\n##### [避免 iOS 组件依赖冲突的小技巧](https://www.jianshu.com/p/0e3283275300)\n\n\n## 注意事项\n\n#### 关于 3.x 版本 (使用 2.x 版本请切换到 store_2.x 分支)\n\n为了解决 2.x 版本的设计缺陷和代码漏洞，特进行了 3.x 深度重构，所以没办法做到向下兼容，希望社区朋友们能体谅，根据情况进行版本迁移。\n\n#### 提问须知\n\n考虑到笔者的精力问题，遇到问题请先查看 API、效仿 Demo、阅读 README、搜索 Issues。请不要提出与组件无关的问题，比如 CocoaPods 的错误，如果是 BUG 或 Feature 最好是提 Issue。\n\n# 目录\n\n* [预览](#预览)\n* [特性](#特性)\n* [安装](#安装)\n* [用法](#用法)\n* [常见问题](#常见问题)\n\n\n# 预览\n\n![](https://github.com/indulgeIn/YBImageBrowser/blob/master/Images/preview.gif)\n\n\n\n# 特性\n\n- 支持 GIF，APNG，WebP 等本地和网络图片类型（由 YYImage、SDWebImage 提供支持）。\n- 支持系统相册图片和视频。\n- 支持简单的视频播放。\n- 支持高清图浏览。\n- 支持图片预处理（比如添加水印）。\n- 支持根据图片的大小判断是否需要预先解码（精确控制内存）。\n- 支持图片压缩、裁剪的界限设定。\n- 支持修改下载图片的 NSURLRequest。\n- 支持主动旋转或跟随控制器旋转。\n- 支持自定义图标。\n- 支持自定义 Toast/Loading。\n- 支持自定义文案（默认提供中文和英文）。\n- 支持自定义工具视图（比如查看原图功能）。\n- 支持自定义 Cell（比如添加一个广告模块）。\n- 支持添加到其它父视图上使用（比如加到控制器上）。\n- 支持转场动效、图片布局等深度定制。\n- 支持数据重载、局部更新。\n- 支持低粒度的内存控制和性能调优。\n- 极致的性能优化和严格的内存控制让其运行更加的流畅和稳健。\n\n\n# 安装\n\n## CocoaPods\n\n支持分库导入，核心部分就是图片浏览功能，视频播放作为拓展功能按需导入。\n\n1. 在 Podfile 中添加：\n```\npod 'YBImageBrowser'\npod 'YBImageBrowser/Video'  //视频功能需添加\n```\n2. 执行 `pod install` 或 `pod update`。\n3. 导入 `<YBImageBrowser/YBImageBrowser.h>`，视频功能需导入`<YBImageBrowser/YBIBVideoData.h>`。\n4. 注意：如果你需要支持 WebP，可以在 Podfile 中添加 `pod 'YYImage/WebP'`。\n\n若搜索不到库，可执行`pod repo update`，或使用 `rm ~/Library/Caches/CocoaPods/search_index.json` 移除本地索引然后再执行安装，或更新一下 CocoaPods 版本。\n\n#### 去除 SDWebImage 的依赖（版本需 >= 3.0.4）\n\nPodfile 相应的配置变为：\n```\npod 'YBImageBrowser/NOSD'\npod 'YBImageBrowser/VideoNOSD'  //视频功能需添加\n```\n这时你必须定义一个类实现`YBIBWebImageMediator`协议，并赋值给`YBImageBrowser`类的`webImageMediator`属性（可以参考 `YBIBDefaultWebImageMediator`的实现）。\n\n\n## 手动导入\n\n1. 下载 YBImageBrowser 文件夹所有内容并且拖入你的工程中，视频功能还需下载 Video 文件夹所有内容。\n2. 链接以下 frameworks：\n* SDWebImage\n* YYImage\n3. 导入 `YBImageBrowser.h`，视频功能需导入`YBIBVideoData.h`\n4. 注意：如果你需要支持 WebP，可以在 Podfile 中添加 `pod 'YYImage/WebP'`，或者到手动下载 [YYImage 仓库](https://github.com/ibireme/YYImage) 的 webP 支持文件。\n\n\n\n\n# 用法\n\n初始化`YBImageBrowser`并且赋值数据源`id<YBIBDataProtocol>`，默认提供`YBIBImageData` (图片) 和`YBIBVideoData` (视频) 两种数据源。\n\n图片处理是组件的核心，笔者精力有限，视频播放做得很轻量，若有更高的要求最好是自定义 Cell，望体谅。\n\nDemo 中提供了很多示例代码，演示较复杂的拓展方式，所以若需要深度定制最好是下载 Demo 查看。\n\n建议不对`YBImageBrowser`进行复用，目前还存在一些逻辑漏洞。\n\n\n## 基本使用\n\n```\n// 本地图片\nYBIBImageData *data0 = [YBIBImageData new];\ndata0.imageName = ...;\ndata0.projectiveView = ...;\n\n// 网络图片\nYBIBImageData *data1 = [YBIBImageData new];\ndata1.imageURL = ...;\ndata1.projectiveView = ...;\n\n// 视频\nYBIBVideoData *data2 = [YBIBVideoData new];\ndata2.videoURL = ...;\ndata2.projectiveView = ...;\n\nYBImageBrowser *browser = [YBImageBrowser new];\nbrowser.dataSourceArray = @[data0, data1, data2];\nbrowser.currentPage = ...;\n[browser show];\n```\n\n\n## 设置支持的旋转方向\n\n当图片浏览器依托的 UIViewController 仅支持一个方向：\n\n这种情况通过`YBImageBrowser.new.supportedOrientations`设置图片浏览器支持的旋转方向。\n\n否则：\n\n上面的属性将失效，图片浏览器会跟随控制器的旋转而旋转，由于各种原因这种情况的旋转过渡有瑕疵，建议不使用这种方式。\n\n\n## 自定义图标\n\n修改`YBIBIconManager.sharedManager`实例的属性。\n\n\n## 自定义文案\n\n修改`YBIBCopywriter.sharedCopywriter`实例的属性。\n\n\n## 自定义 Toast / Loading\n\n实现`YBIBAuxiliaryViewHandler`协议，并且赋值给`YBImageBrowser.new.auxiliaryViewHandler`属性，可参考和协议同名的默认实现类。\n\n\n## 自定义工具视图（ToolView）\n\n默认实现的`YBImageBrowser.new.defaultToolViewHandler`处理器可以做一些属性配置，当满足不了业务需求时，最好是进行自定义，参考默认实现或 Demo 中“查看原图”功能实现。\n\n定义一个或多个类实现`YBIBToolViewHandler`协议，并且装入`YBImageBrowser.new.toolViewHandlers`数组属性。建议使用一个中介者来实现这个协议，然后所有的工具视图都由这个中介者来管理，当然也可以让每一个自定义的工具 UIView 都实现`YBIBToolViewHandler`协议，请根据具体需求取舍。\n\n\n## 自定义 Cell\n\n当默认提供的`YBIBImageData` (图片) 和`YBIBVideoData` (视频) 满足不了需求时，可自定义拓展 Cell，参考默认实现或 Demo 中的示例代码。\n\n定义一个实现`YBIBCellProtocol`协议的`UICollectionViewCell`类和一个实现`YBIBDataProtocol`协议的数据类，当要求不高时实现必选协议方法就能跑起来了，若对交互有要求就相对比较复杂，最好是参考默认的交互动效实现。\n\n在某些场景下，甚至可以直接继承项目中的 Cell 来做自定义。\n\n\n# 常见问题\n\n## SDWebImage Pods 版本兼容问题\n\nSDWebImage 有两种情况会出现兼容问题：该库对 SDWebImage 采用模糊向上依赖，但将来 SDWebImage 可能没做好向下兼容；当其它库依赖 SDWebImage 更低或更高 API 不兼容版本。对于这种情况，可以尝试以下方式解决：\n- Podfile 中采用去除 SDWebImage 依赖的方式导入，只需要实现一个中介者（见[安装](#安装)部分）。\n- 更改其它库对 SDWebImage 的依赖版本。\n- 手动导入 YBImageBrowser，然后修改`YBIBDefaultWebImageMediator`文件。\n\n为什么不去除依赖 SDWebImage 自己实现？时间成本太高。\n为什么不拖入 SDWebImage 修改类名？会扩大组件的体积，若外部有 SDWebImage 就存在一份多余代码。\n\n## 依赖的 YYImage 与项目依赖的 YYKit 冲突\n\n实际上 YYKit 有把各个组件拆分出来，建议项目中分开导入：\n```\npod 'YYModel'\npod 'YYCache'\npod 'YYImage'\npod 'YYWebImage'\npod 'YYText'\n...\n```\n而且这样更灵活便于取舍。\n\n## 低内存设备 OOM 问题\n\n组件内部会降低在低内存设备上的性能，减小内存占用，但若高清图过多，可能需要手动去控制（以下是硬件消耗很低的状态）：\n\n```\nYBIBImageData *data = YBIBImageData.new;\n// 取消预解码\ndata.shouldPreDecodeAsync = NO;\n// 直接设大触发裁剪比例，绘制更小的裁剪区域压力更小，不过可能会让用户感觉奇怪，放很大才开始裁剪显示高清局部（这个属性很多时候不需要显式设置，内部会动态计算）\ndata.cuttingZoomScale = 10;\n\nYBImageBrowser *browser = YBImageBrowser.new;\n// 调低图片的缓存数量\nbrowser.ybib_imageCache.imageCacheCountLimit = 1;\n// 预加载数量设为 0\nbrowser.preloadCount = 0;\n```\n\n## 视频播放功能简陋\n\n关于大家提的关于视频的需求，有些成本过高，笔者精力有限望体谅。若组件默认的视频播放器满足不了需求，就自定义一个 Cell 吧，把成熟的播放器集成到组件中肯定更加的稳定。\n\n## 关于 Swift 版本\n\n考虑时间成本，目前没有写 Swift 版本的计划。 \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AEB4:3B7E2:171F26:5D90B6:6AB92CC0"},"text_sha256":"7187b519093f331adf872b3bc349ea5076a205ec7729f39b9027b7703b7cfc6d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"AcademySoftwareFoundation/OpenImageIO","input_row":{"repository":"AcademySoftwareFoundation/OpenImageIO","url":"https://github.com/AcademySoftwareFoundation/OpenImageIO","name":"OpenImageIO","owner":"AcademySoftwareFoundation","description":"Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2370,"issues":1055,"created_at":"2011-02-02T23:03:28Z","updated_at":"2026-09-27T05:35:48Z","first_commit_at":"2008-04-21T20:46:21Z","last_commit_at":"2026-09-27T05:35:43Z","activity_months":221.16999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:32.815Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"AcademySoftwareFoundation/OpenImageIO","visibility":"public","created_at":"2011-02-02T23:03:28Z","updated_at":"2026-09-27T05:35:48Z","private":false,"fork":false,"archived":false,"stargazers_count":2370,"open_issues_count":138,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1743","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088A:35C5DA:17B8655:1BDED7E:6AB92CC0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1742","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0885:180242:1805FC0:1C2D066:6AB92CC1"},"commit":{"sha":"8c49d0d4ee6c101c865296635abe5d7e64111ca9","url":"https://github.com/AcademySoftwareFoundation/OpenImageIO/commit/8c49d0d4ee6c101c865296635abe5d7e64111ca9","date":"2018-05-24T18:54:48Z","author_date":"2018-05-24T18:54:48Z","committer_date":"2018-05-24T18:54:48Z","tree_sha":"94dbba14136b8d909b68d65bca0621eadcf33110","message_first_line":"Fix iv on OS X with QT5 (#1946)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1741","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:180500B:1C2C4A9:6AB92CC1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5109,"blob_sha":"9ff33be6651e487e50577961eb88fd2cb6ee5d28","priority":0}],"documents":[{"path":"README.md","size":5109,"blob_sha":"9ff33be6651e487e50577961eb88fd2cb6ee5d28","priority":0,"status":200,"text":"README for OpenImageIO\n======================\n\n[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://github.com/OpenImageIO/oiio/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/OpenImageIO/oiio.svg?branch=master)](https://travis-ci.org/OpenImageIO/oiio)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/a0l32ti7gcoergtf/branch/master?svg=true)](https://ci.appveyor.com/api/projects/status/a0l32ti7gcoergtf/branch/master)\n\n\n\nIntroduction\n------------\n\nThe primary target audience for OIIO is VFX studios and developers of\ntools such as renderers, compositors, viewers, and other image-related\nsoftware you'd find in a production pipeline.\n\nOpenImageIO consists of:\n\n* Simple but powerful ImageInput and ImageOutput APIs that provide\n  an abstraction for reading and writing image files of nearly any\n  format, without the calling application needing to know any of the\n  details of these file formats, and indeed without the calling \n  application needing to be aware of which formats are available.\n\n* A library that manages subclasses of ImageInput and ImageOutput that\n  implement I/O from specific file formats, with each file format's\n  implementation stored as a plug-in.  Therefore, an application using\n  OpenImageIO's APIs can read and write any image file for which a\n  plugin can be found at runtime.\n\n* Plugins implementing I/O for several popular image file formats,\n  including TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, ICO, BMP, Targa,\n  JPEG-2000, RMan Zfile, FITS, DDS, Softimage PIC, PNM, DPX, Cineon,\n  IFF, Field3D, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP, GIF,\n  DICOM, many \"RAW\" digital camera formats, and a variety of movie\n  formats (readable as individual frames).  More are being developed\n  all the time.\n\n* Several command line image tools based on these classes, including\n  oiiotool (command-line format conversion and image processing), iinfo\n  (print detailed info about images), iconvert (convert among formats,\n  data types, or modify metadata), idiff (compare images), igrep (search\n  images for matching metadata), and iv (an image viewer). Because these\n  tools are based on ImageInput/ImageOutput, they work with any image\n  formats for which ImageIO plugins are available.\n\n* An ImageCache class that transparently manages a cache so that it\n  can access truly vast amounts of image data (tens of thousands of\n  image files totaling multiple TB) very efficiently using only a tiny\n  amount (tens of megabytes at most) of runtime memory.\n\n* A TextureSystem class that provides filtered MIP-map texture\n  lookups, atop the nice caching behavior of ImageCache.  This is used\n  in commercial renderers and has been used on many large VFX and\n  animated films.\n\n* ImageBuf and ImageBufAlgo functions -- a simple class for storing\n  and manipulating whole images in memory, and a collection of the\n  most useful computations you might want to do involving those images,\n  including many image processing operations.\n\n* Python bindings for all of the major APIs.\n\n\n\nLicensing\n---------\n\nOpenImageIO is (c) Copyright 2008-2016 by Larry Gritz et al.\nAll Rights Reserved.\n\nOpenImageIO is distributed using the modified BSD license (also known as\nthe \"new BSD\" or \"3-clause BSD\" license).  Please read the \"LICENSE\"\nfile for the legal wording.  The documentation is licensed under the\nCreative Commons Attribution 3.0 Unported License\n(http://creativecommons.org/licenses/by/3.0/).\n\nThe plain English bottom line is that OpenImageIO is free, as well as\nfreely modifiable and redistributable (in both source and binary form).\nYou may use part or all of it in your own applications, whether\nproprietary or open, free or commercial.  Using it in a commercial or\nproprietary application DOES NOT obligate you to pay us, or to use any\nparticular licensing terms in your own application.\n\nSome code and resources are distributed along with OIIO that have highly\ncompatible, though slightly different, licenses (generally MIT or Apache).\nSee the PDF documentation Acknowledgements section for details.\n\n\n\nWeb Resources\n-------------\n\nMain web page:      http://www.openimageio.org\n\nGitHub page:        http://github.com/OpenImageIO/oiio\n\nMail list subscriptions and archives:\n\n* Developer mail list: http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org\n\n* Just release announcements: http://lists.openimageio.org/listinfo.cgi/oiio-announce-openimageio.org\n\n\n\nContact\n-------\n\ninfo@openimageio.org\n\n\n\nBuilding and Installation\n-------------------------\n\nPlease read the \"INSTALL\" file for detailed instructions on how to\nbuild and install OpenImageIO.\n\nIf you build with EMBEDPLUGINS=0, remember that you need to set the\nenvironment variable OIIO_LIBRARY_PATH to point to the 'lib' directory where\nOpenImageIO is installed, or else it will not be able to find the plugins.\n\n\nDocumentation\n-------------\n\nThe primary user and programmer documentation can be found in\nsrc/doc/openimageio.pdf (in a source distribution) or in the\ndoc/openimageio.pdf file of an installed binary distribution.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B7D0:3B1F3:185ED1:5ED043:6AB92CBD"},"text_sha256":"5efae75e861646433ac0444f7efc48096ca8dfb12cf7723c803c6001a0a183b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1740","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:17BE750:1BE5922:6AB92CC2"},"commit":{"sha":"93b909d13196a31154f23a5939ffa19c1d3d451d","url":"https://github.com/AcademySoftwareFoundation/OpenImageIO/commit/93b909d13196a31154f23a5939ffa19c1d3d451d","date":"2026-06-30T23:09:38Z","author_date":"2026-06-30T23:09:38Z","committer_date":"2026-06-30T23:09:38Z","tree_sha":"209e72d36f080a07a491e13658f15fa51fbe9aa7","message_first_line":"build: openjph auto-build and better exception handling (#5247)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1739","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:1807425:1C2E972:6AB92CC3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8976,"blob_sha":"5e68916947fdcfb8ee0c9c614d46bc151b3ef26a","priority":0},{"path":"docs/dev/AI_Policy.md","size":9115,"blob_sha":"9dc03e9f07014f59383b7769109e5125d34be892","priority":1},{"path":"SECURITY.md","size":9798,"blob_sha":"9969cd936a00aa663dfd2792090ffe4c2eaa90fa","priority":1}],"documents":[{"path":"README.md","size":8976,"blob_sha":"5e68916947fdcfb8ee0c9c614d46bc151b3ef26a","priority":0,"status":200,"text":"<!-- SPDX-License-Identifier: CC-BY-4.0 -->\n<!-- Copyright Contributors to the OpenImageIO Project. -->\n<p align=\"center\">\n  <img src=\"ASWF/logos/openimageio-horizontal-gradient.png\">\n<\/p>\n\n[![License](https://img.shields.io/badge/license-Apache2.0-blue.svg?style=flat-square)](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/LICENSE.md)\n[![CI](https://github.com/AcademySoftwareFoundation/OpenImageIO/actions/workflows/ci.yml/badge.svg)](https://github.com/AcademySoftwareFoundation/OpenImageIO/actions/workflows/ci.yml)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2694/badge)](https://bestpractices.coreinfrastructure.org/projects/2694)\n[![latest packaged version(s)](https://repology.org/badge/latest-versions/openimageio.svg)](https://repology.org/project/openimageio/versions)\n\n\nIntroduction\n------------\n\n**Mission statement**: OpenImageIO is a toolset for reading, writing, and\nmanipulating image files of any image file format relevant to VFX / animation\nvia a format-agnostic API with a feature set, scalability, and robustness\nneeded for feature film production.\n\nThe primary target audience for OIIO is VFX studios and developers of\ntools such as renderers, compositors, viewers, and other image-related\nsoftware you'd find in a production pipeline.\n\nOpenImageIO consists of:\n\n* Simple but powerful ImageInput and ImageOutput APIs that provide\n  an abstraction for reading and writing image files of nearly any\n  format, without the calling application needing to know any of the\n  details of these file formats, and indeed without the calling\n  application needing to be aware of which formats are available.\n\n* A library that manages subclasses of ImageInput and ImageOutput that\n  implement I/O from specific file formats, with each file format's\n  implementation stored as a plug-in.  Therefore, an application using\n  OpenImageIO's APIs can read and write any image file for which a\n  plugin can be found at runtime.\n\n* Plugins implementing I/O for several popular image file formats,\n  including TIFF, JPEG/JFIF, JPEG XL, OpenEXR, PNG, HDR/RGBE, ICO, BMP, Targa,\n  JPEG-2000, RMan Zfile, FITS, DDS, Softimage PIC, PNM, DPX, Cineon,\n  IFF, OpenVDB, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP,\n  GIF, DICOM, HEIF/HEIC/AVIF, many \"RAW\" digital camera formats, and a variety\n  of movie formats (readable as individual frames).  More are being developed\n  all the time.\n\n* Several command line image tools based on these classes, including\n  oiiotool (command-line format conversion and image processing), iinfo\n  (print detailed info about images), iconvert (convert among formats,\n  data types, or modify metadata), idiff (compare images), igrep (search\n  images for matching metadata), and iv (an image viewer). Because these\n  tools are based on ImageInput/ImageOutput, they work with any image\n  formats for which ImageIO plugins are available.\n\n* An ImageCache class that transparently manages a cache so that it\n  can access truly vast amounts of image data (tens of thousands of\n  image files totaling multiple TB) very efficiently using only a tiny\n  amount (tens of megabytes at most) of runtime memory.\n\n* A TextureSystem class that provides filtered MIP-map texture\n  lookups, atop the nice caching behavior of ImageCache.  This is used\n  in commercial renderers and has been used on many large VFX and\n  animated films.\n\n* ImageBuf and ImageBufAlgo functions -- a simple class for storing\n  and manipulating whole images in memory, and a collection of the\n  most useful computations you might want to do involving those images,\n  including many image processing operations.\n\n* Python bindings for all of the major APIs.\n\n\n\n🏢 Project administration and Licensing\n---------------------------------------\n\nOpenImageIO is (c) Copyright Contributors to the OpenImageIO project.\n\nFor original code, we use the [Apache-2.0 license](LICENSE.md), and for\ndocumentation, the [Creative Commons Attribution 4.0 Unported\nLicense](http://creativecommons.org/licenses/by/4.0/). In 2023 we asked\nhistorical users to [relicense](RELICENSING.md) from the original BSD-3-clause\nlicense to Apache-2.0, and over 99.86% of lines of code have been relicensed\nto Apache-2.0. A small amount of code incorporated into this repository from\nother projects are covered by compatible [third-party open source\nlicenses](THIRD-PARTY.md).\n\nThe OpenImageIO project is part of the [Academy Software\nFoundation](https://www.aswf.io/), a part of the Linux Foundation formed in\ncollaboration with the Academy of Motion Picture Arts and Sciences. The\n[technical charter](https://github.com/AcademySoftwareFoundation/foundation/blob/main/project_charters/openimageio_charter.pdf) and [Project\nGovernance](GOVERNANCE.md) explain how the project is run, who makes\ndecisions, etc. Please be aware of our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n\n💁 User Documentation\n---------------------\n\n[OpenImageIO Documentation](https://docs.openimageio.org)\nis the best place to start if you are interested in how to use OpenImageIO,\nits APIs, its component programs (once they are built). There is also a [PDF\nversion](https://readthedocs.org/projects/openimageio/downloads/pdf/latest/).\n\nAdditional resources:\n\n- [User quick start](docs/QuickStart.md) is a quick example of using\n  OpenImageIO in Python, C++, and the command line.\n\n\n👷 Building and installing OpenImageIO\n--------------------------------------\n- [Build and installation instructions](INSTALL.md) for OpenImageIO. Such\n  as it is. This could use some work, particularly for Windows.\n\n\n🚑 Contact & reporting problems\n-------------------------------\n\nSimple \"how do I...\", \"I'm having trouble\", or \"is this a bug\" questions are\nbest asked on the [oiio-dev developer mail\nlist](https://lists.aswf.io/g/oiio-dev). That's where the most people will see\nit and potentially be able to answer your question quickly (more so than a GH\n\"issue\"). For quick questions, you could also try the [ASWF\nSlack](https://slack.aswf.io) `#openimageio` channel.\n\nA bug or build problem that you are relatively certain is a legit problem in\nthe code, and **for which you can give clear instructions for how to\nreproduce**, should be [reported as\nissues](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues).\n\nTo report a security vulnerability that is serious enough that it should not\nbe discussed publicly until a patch is ready, please file a GitHub [security\nadvisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/new).\n\nIf confidentiality precludes a public question or issue, you may contact us\nprivately at [info@openimageio.org](info@openimageio.org), or for\nsecurity-related issues [security@openimageio.org](security@openimageio.org).\n\n\n🔧 Contributing and developer documentation\n-------------------------------------------\n\nOpenImageIO welcomes code contributions, and [nearly 250 people](CREDITS.md)\nhave done so over the years. We take code contributions via the usual GitHub\npull request (PR) mechanism.\n\n* [Architecture overview](docs/dev/Architecture.md) is a high-level\n  description of the major classes and their relationships.\n* [CONTRIBUTING](CONTRIBUTING.md) has detailed instructions about the\n  development process.\n* [AI Policy](docs/dev/AI_Policy.md) decribes our policies on AI coding\n  assistance tools.\n* [ROADMAP](docs/ROADMAP.md) is a high-level overview of the current\n  development priorities for the next annual release.\n* [RELEASING](docs/dev/RELEASING.md) explains our policies and procedures for\n  making releases. We have a major, possibly-compatibility-breaking, release\n  annually in September/October, and minor bug fix and safe feature addition\n  release at the beginning of every month.\n* [Building the docs](src/doc/Building_the_docs.md) has instructions for\n  building the documentation locally, which may be helpful if you are editing\n  the documentation in nontrivial ways and want to preview the appearance.\n* Other developer documentation is in the [docs/dev](docs/dev) directory.\n* You may also have luck learning a bit about the organization and\n  architecture of the project by reading the [DeepWiki Analysis of\n  OpenImageIO](https://deepwiki.com/AcademySoftwareFoundation/OpenImageIO).\n  But take it with a grain of salt -- like any LLM-generated summary, there\n  may be inaccuracies lurking.\n\n\n☎️ Communications channels and additional resources\n--------------------------------------------------\n\n* [Main web page](http://www.openimageio.org)\n* [GitHub project page](http://github.com/AcademySoftwareFoundation/OpenImageIO)\n* [Developer mail list](https://lists.aswf.io/g/oiio-dev)\n* [ASWF Slack](https://slack.aswf.io) (look for the `#openimageio` channel)\n* Biweekly Technical Steering Committee (TSC) Zoom meetings are on the [ASWF\n  Calendar](https://calendar.openimageio.org) (click on the OpenImageIO\n  meeting entries, every second Monday, to get the Zoom link, anyone may join)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"73C4:324E19:181650:5E872C:6AB92CC2"},"text_sha256":"163ec6ef60a59a54154a0393029d814bf060fc2f15e8d9303707f6c75ead44b7"},{"path":"docs/dev/AI_Policy.md","size":9115,"blob_sha":"9dc03e9f07014f59383b7769109e5125d34be892","priority":1,"status":200,"text":"Policy on AI Coding Assistants\n==============================\n\n- Initial policy merged 23-Mar-2026\n\n\nUse of \"AI coding assistants\" is permitted on this project, with the following\nguidelines and principles.\n\nSummary of our core values:\n- Human must always be in the loop, and is the responsible party for\n  the contents of a PR (including fully understanding and being able\n  to explain, defend, and modify it in response to review comments).\n- Interact with the project and community yourself, not by agent.\n- Disclose what tools you used and how. At a minimum, we require an\n  \"Assisted-by: TOOL/MODEL\" line in the commit comments and PR description.\n- Don't waste maintainer's time with low quality PRs.\n\nThe long version:\n\n### Human authorship and interaction with the project\n\n**The human making a PR is considered the author** and is fully responsible\nfor the code they submit.\n\n**No PRs should be submitted, reviewed/merged, or deployed without a human\nfully in the loop.** You may use agents locally to help you write code (and\ndocs, tests, etc.), but you may not use agents to autonomously interact with\nthe project community. Submit your own PRs, write your own discussion\ncomments, respond to community members in your own words, approve or reject\ncode in review using your own brain. \n\nCode autonomously submitted without an identifiable human author and\nresponsible party will be immediately closed, and the account associated with\nthe submission may be banned from future project participation.\n\n**DO NOT \"vibe code.\"** This term refers to a pure prompt-to-behavior cycle\nwhere the human accepts un-inspected code based on the program behavior alone.\nWe don't want this. Code that must be maintained by the project should be\ntruly understood. Project code is ideally the result of discussion / pair\nprogramming between the author and assistant, but even if the machine is doing\nmost of the work, all code should be approved and fully understood by the\nauthor prior to PR submission.\n\n### Professionalism and quality\n\n**The usual high quality level of PRs should be maintained regardless of tools\nused.** This includes not only code, but also the design, testing, PR\npreparation, and the author's ability to explain and defend the code and\nrespond to questions and requests for changes. We never want to hear \"but the\nAI...\" as an excuse for anything.\n\n**PRs should always be [reviewed](CodeReview.md) and approved by someone other\nthan their author if at all possible.** This is especially true of code with\nmachine-generated components, because of the additional risk that the\nsubmitter/operator may not fully understand what they did not write\nthemselves. This is part of the reason for AI tool disclosure -- to ensure\nthat another pair of eyes is on it. AI code review may be requested for\nadditional input, but the AI cannot give \"approval\", nor merge code itself.\n\nEven when using a coding assistant to write the code, you are strongly\nencouraged to write your own PR description, in your own words, if for no\nother reason than to force yourself to understand the code well enough to\ndescribe it to others.\n\n### Disclosure\n\n**Disclosure is required.** Patches that were written with the aid of AI\ncoding assistants must have, at a minimum, the following line in the commit\ncomment and PR description body:\n\n    Assisted-by: TOOL / MODEL\n\nIdeally, to the extent practical, the PR description should also have a brief\ndescription of how the tool was used, including the gist of key prompts or\nsummarizing the direction of the dialog. A full log is not necessary; a short\nsummary will do.\n\nThere are several reasons for this disclosure/documentation, even though it\nwill sometimes be inconvenient:\n- Reproducibility: We want even automated work to be reproducible by others in\n  principle, just like a scientific paper.\n- Education: We want to actively teach each other what tools, prompts, or\n  methods are successful at making high quality results for the project.\n- Metrics: We would like the ability to look back and compare assisted vs\n  non-assisted code for things like defect rate (how often were new bugs\n  introduced or commits needed to be reverted), whether people are more likely\n  to write comprehensive tests when using assistants, etc.\n- Compliance: Many key users and developers are in companies where they need\n  to disclose how AI tools were used in their work, and in other software that\n  they use. Let's make it easy for them.\n- Insurance: Should future legal decisions radically change the IP status of\n  AI-generated code, or if particular models are implicated in copyright\n  violations, we want a way to find out which contributions might need to be\n  revisited in order to bring the project back into compliance.\n\n### Intellectual Property\n\nRegardless of how the code came to be -- from your head alone, from a friend,\nfrom Stack Overflow, from a blog post, from reading other code bases, or from\na coding assistant -- we expect the terms of the\n[DCO](https://developercertificate.org/) and CLA to apply, and for the author\nto take reasonable care that code is not copied from a source with an\nincompatible license.\n\nYou may find that your confidence about complying with the DCO+CLA depends on:\n\n- If you provided a detailed specification and how much you edited or guided\n  the results yourself.\n- Whether you are modifying or extending existing code versus writing large\n  amounts of entirely new code.\n- The degree to which the generated code seems to fit into our structure and\n  idiomatic style, and therefore seems unlikely to be copied from elsewhere.\n- Whether your tool has guardrails to prevent answers that are too similar to\n  existing code, for example as claimed by [Claude](https://privacy.claude.com/en/articles/10023638-why-am-i-receiving-an-output-blocked-by-content-filtering-policy-error) and [Copilot](https://docs.github.com/en/copilot/how-tos/manage-your-account/).\n\n### Extractive submissions\n\n**Maintainer time and attention are precious commodities**, and use of coding\nassistants is not an excuse to submit poor PRs or to externalize costs onto\nmaintainers/reviewers (such as responsibility for understanding, testing, or\nfixing PRs that the human author does not have a full understanding of). \n\nMaintainers are free to take counter-measures against submitters of sub-par\nPRs, or other violations of this policy, up to and including banning habitual\nabusers from future participation in the project.\n\n**We discourage use of AI tools to fix GitHub issues labeled as \"good first\nissue\" or for \"Dev Days\" work.** Cultivating and educating new contributors is\nimportant, and as such, we do not want people to swoop in and use automated\ntools to trivially solve tasks that were curated specifically for somebody to\nactually learn from. We expect each developer to implement at most one \"good\nfirst issue\" per Dev Days occasion, and we encourage you to solve the problem\nwith your own brain to maximize the learning experience.\n\n### Exceptions\n\nThis AI tool use policy is not meant to encompass cases such as:\n- \"Smart auto-complete\", spell-checking, grammar checking, or other uses that\n  aren't really contributing substantively to authorship.\n- Use of LLMs to explain code or learn about the codebase, answer basic\n  programming questions, help with background research, or audit the code\n  for bugs that are subsequently confirmed and fixed by people.\n- Language translation for non-fluent English speakers or other accessibility\n  accommodations.\n- Trivial or de-minimis fixes such as fixing a typo, obviously wrong variable\n  use, etc.\n- Reviewing your own code for mistakes prior to submitting a PR (as long as it\n  isn't making the fixes for you).\n\n### Creative contributions -- out of scope\n\nThis project repository contains code for tools, and their documentation. We\ndon't really directly host any artistically creative work here, so we have not\naddressed additional policy issues that might come up in such a context.\n\nIf you are representing a different project that is using this document for\nguidance or inspiration for your own policies, please be aware that you may\nhave needs that are not covered by these policies but deserve well-crafted\nguidance.\n\n### References and inspiration\n\nOur policy has been informed and inspired by the following efforts in other communities:\n- [LLVM AI Tool Policy](https://llvm.org/docs/AIToolPolicy.html)\n- [Fedora Project policy on AI-assisted contributions](https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/)\n- [Linux Foundation policy on Generative AI](https://www.linuxfoundation.org/legal/generative-ai)\n- [Rust policy on rejecting burdensome PRs](https://github.com/rust-lang/compiler-team/issues/893)\n- The METR paper [Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/)\n- [GitHub Blog: Rethinking open source mentorship in the AI era](https://github.blog/open-source/maintainers/rethinking-open-source-mentorship-in-the-ai-era/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5410:2E8679:17D670:5E44ED:6AB92CC3"},"text_sha256":"d520acf0802161cfe2cbb3bd037d8efc3d88ece1625911b2b9cf70e23b14e295"},{"path":"SECURITY.md","size":9798,"blob_sha":"9969cd936a00aa663dfd2792090ffe4c2eaa90fa","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nThis gives guidance about which branches are supported with patches to\nsecurity vulnerabilities.\n\n| Version / branch  | Supported                                            |\n| ----------------- | ---------------------------------------------------- |\n| main              | :white_check_mark: :construction: ALL fixes immediately, but this is a branch under development with a frequently unstable ABI and occasionally unstable API. |\n| 3.1.x             | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |\n| 3.0.x             | :warning: Important fixes that can be easily backported without breaking ABI compatibility. New tagged releases as needed, and becoming less frequent over time. |\n| <= 2.5.x         | :x: No longer receiving patches of any kind.        |\n\n\n## Reporting a Vulnerability\n\nIf you think you've found a potential vulnerability in OpenImageIO, please\nreport it to the maintainers. Include detailed steps to reproduce the issue,\nand any other information that could aid an investigation.\n\nThe best way to report a vulnerability is to file a GitHub [security\nadvisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/new).\nIf that is not possible, it is also fine to email your report to\nsecurity@openimageio.org. Only the project administrators have access to these\nreports.\n\nOur policy is to respond to vulnerability reports within 14 days, and to\naddress critical security vulnerabilities rapidly and post patches quickly,\nusually at the next scheduled patch release at the beginning of every month.\nFor especially severe vulnerabilities, or when a flaw is believed to be\nexploited in the wild, we will try to make a special patch release as soon as\npossible.\n\n\n## What do we consider a vulnerability?\n\nWe only consider a situation to be a security vulnerability if an untrusted\nparty can plausibly trigger the flaw through normal product inputs (for\nexample, a maliciously crafted input image). We do not support requesting a\nCVE for API-only or caller-controlled failures with no realistic adversarial\npath.\n\nFlaws whose root cause lies in a dependency should be reported and fixed\nupstream; the upstream project owns the CVE when one is warranted.\n\n\n## Other security features\n\n### Signed tags\nStarting with OpenImageIO 3.0, we cryptographically sign release tags.\nTo verify a tag, you can use the `git tag -v` command, which will check\nthe signature against the public key that is included in the repository.\nFor example,\n\n```bash\ngit tag -v v3.0.0.3\n```\n\n## Outstanding Security Issues\n\nNone known\n\n\n## History of CVE Fixes\n\nMost recent fixes listed first, more or less:\n\n- CVE-2026-50291: Segmentation Fault in BmpInput::read_native_scanline / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-q3c7-3225-66h7) / [Fix: PR #5030](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5030) (Fixed in 3.0.16.0, 3.1.11.0)\n- CVE-2026-43909: Signed integer overflow in SwapRGBABytes loop index leads to out-of-bounds read/write in DPX ABGR decoder / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-g267-j53j-5258) / [Fix: PR5170](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5170) (Fixed in 3.0.18.1, 3.1.13.1)\n- CVE-2026-43908: Signed integer overflow in ConvertCbYCrYToRGB leads to heap out-of-bounds write in DPX 4:2:2 decoder / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-2jr5-q49v-3858) / [Fix: PR5170](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5170) (Fixed in 3.0.18.1, 3.1.13.1)\n- CVE-2026-43907: Integer overflow in QueryRGBBufferSizeInternal leads to heap out-of-bounds write in DPX decoder (kCbYCr and kABGR) / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-cq46-hp4h-cvfr) / [Fix: PR5170](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5170) (Fixed in 3.0.18.1, 3.1.13.1)\n- CVE-2026-43996: Integer wraparound in bounds check of decode_pixel leads to out-of-bounds read in TGA paletted image decoder / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-mq8j-73c4-cr55) / [Fix: PR5165](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5165) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2026-43906: HEIF Heap overflow / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-gmrp-x952-3m66) / [Fix: PR5166](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5166) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2026-43905: JPEG2000 (OpenJPH) signed integer overflow in buffer allocation / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-pj45-cf3g-28gq) / [Fix: PR5143](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5143) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2026-43904: Softimage PIC RLE decoder heap buffer overflow — longCount not clamped to image width / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-4499-j545-7q33) / [Fix: PR5142](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5142) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2026-43903: SGI RLE decoder heap buffer overflow — OIIO_DASSERT bounds checks are no-ops in release builds / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-jg3q-vm3q-2j35) / [#5141](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5141) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2026-7582: DDS Image ddsinput.cpp out-of-bounds write / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-5pm7-8r3j-2x67). [Fix: #5131](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/5131) (Fixed in 3.2.0.1, 3.1.13.0, 3.0.18.0)\n- CVE-2024-55194: Broken pgm had memory access error leading to heap overflow / [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-583r-43f7-cw8w) / [#4559](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4559) (Fixed in 3.0.2.0, 3.1.4.0)\n- CVE-2024-40630: Fixed incorrect image size for certain HEIC files.\n  [advisory](https://github.com/AcademySoftwareFoundation/OpenImageIO/security/advisories/GHSA-jjm9-9m4m-c8p2) (Fixed in 2.5.13.1)\n- CVE-2023-42295: Fix signed integer overflow when computing total number of pixels while reading BMP files. [#3948](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3948) (by xiaoxiaoafeifei) (Fixed in 2.5.3.0/2.6.0.1)\n- CVE-2023-36183: Heap-buffer-overflow while reading ICO files [#3872](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3872)  (by xiaoxiaoafeifei)\n- TALOS-2023-1709 / CVE-2023-24472: Race condition in TIFF reader. [#3772](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3772) (2.5.1.0/2.4.8.1)\n- TALOS-2023-1707 / CVE-2023-24473, TALOS-2023-1708 / CVE-2023-22845: Guard against corrupted Targa. [#3768](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3768) (2.5.1.0/2.4.8.1)\n- TALOS-2022-1654 / CVE-2022-43596, TALOS-2022-1655 / CVE-2022-43597 CVE-2022-43598, TALOS-2022-1656 / CVE-2022-43599 CVE-2022-43600 CVE-2022-43601 CVE-2022-43602: Fix possible IFF write errors [#3676](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3676) (2.4.6/2.5.0.0)\n- TALOS-2022-1653 / CVE-2022-43594: Fix possible errors when writing BMP files. [#3673](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3673) (by lgritz) (2.4.6/2.5.0.0)\n- TALOS-2022-1651 / CVE-2022-43592, TALOS-2022-1652 / CVE-2022-4359: Fix possible DPX write errors. [#3672](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3672) (2.4.6/2.5.0.0)\n- TALOS-2022-1657 / CVE-2022-43603: Zfile write safety. [#3670](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3670) (2.4.6/2.5.0.0)\n- TALOS-2022-1633 / CVE-2022-41639, TALOS-2022-1643 / CVE-2022-41988: Guard TIFF against buffer overflow for certain CMYK files. [#3632](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3632) (2.4.5/2.5.0.0)\n- TALOS-2022-1626, CVE-2022-41794: PSD files protect against corrupted embedded thumbnails. [#3629](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3629) (2.4.5/2.5.0.0)\n- TALOS-2022-1627, CVE-2022-41977: Guard TIFF reads against corrupt files with buffer overflows. [#3628](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3628) (2.4.5/2.5.0.0)\n- TALOS-2022-1626 / CVE-2022-41794, TALOS-2022-1632 / CVE-2022-41684, TALOS-2022-1636 / CVE-2022-41837: Exif (all formats that support it, TIFF/JPEG/PSD) fix bugs where corrupted Exif blocks could overrun memory. [#3627](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3627) (2.4.5/2.5.0.0)\n- TALOS-2022-1634 / CVE-2022-41838, TALOS-2022-1635 / CVE-2022-41999: Fix DDS reading crashes for cubemap files when a cube face was not present, and check for invalid bits per pixel. [#3625](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3625) (2.4.5/2.5.0.0) #3625 (2.4.5/2.5.0.0)\n- TALOS-2022-1629, CVE-2022-36354: RLA potential buffer overrun. [#3624](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3624) (2.4.5/2.5.0.0)\n- TALOS-2022-1628, CVE-2022-41981: Targa file string overflow safety. [#3622](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3622) (2.4.5/2.5.0.0)\n- TALOS-2022-1630, CVE-2022-38143: Protect against corrupt pixel coordinates while reading BMP files. [#3620](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/3620) (by lgritz) (Fixed in 2.4.5/2.5.0.0)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8BFC:2B291E:184D55:5EBEB1:6AB92CC4"},"text_sha256":"d5f0b40c0a6177f4bf0b6ffce8ee7afa2318f310bb6fc1ba65242b5d772064a1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"MetalPetal/MetalPetal","input_row":{"repository":"MetalPetal/MetalPetal","url":"https://github.com/MetalPetal/MetalPetal","name":"MetalPetal","owner":"MetalPetal","description":"A GPU accelerated image and video processing framework built on Metal.","language":"Objective-C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2190,"issues":351,"created_at":"2017-06-25T03:34:26Z","updated_at":"2026-09-26T13:06:48Z","first_commit_at":"2017-06-25T03:34:26Z","last_commit_at":"2023-02-21T03:47:14Z","activity_months":67.900000000000006,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:37.181Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MetalPetal/MetalPetal","visibility":"public","created_at":"2017-06-25T03:34:26Z","updated_at":"2026-09-26T13:06:48Z","private":false,"fork":false,"archived":false,"stargazers_count":2190,"open_issues_count":42,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1738","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:1806ACB:1C2E378:6AB92CC5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1737","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:1817A23:1C3F0D0:6AB92CC5"},"commit":{"sha":"b91dc45955444628f0b8bb967b617ec6a0d85f80","url":"https://github.com/MetalPetal/MetalPetal/commit/b91dc45955444628f0b8bb967b617ec6a0d85f80","date":"2018-05-23T03:21:19Z","author_date":"2018-05-23T03:21:19Z","committer_date":"2018-05-23T03:21:19Z","tree_sha":"9f7571b722bb5397fb9b7acd0832dd2ff1811d7e","message_first_line":"sobel kernel edge mode update"},"tree_request_status":200,"tree_rate":{"github_remaining":"1736","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D6:0AC4:12A7E99:15FF02B:6AB92CC5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13629,"blob_sha":"8a45c577eecd797756d3267bc0e85ddd7f1c874b","priority":0}],"documents":[{"path":"README.md","size":13629,"blob_sha":"8a45c577eecd797756d3267bc0e85ddd7f1c874b","priority":0,"status":200,"text":"# MetalPetal\n\nAn image processing framework based on Metal.\n\n- [Design Overview](#design-overview)\n    - [Goals](#goals)\n    - [Core Components](#core-components)\n        - [MTIContext](#mticontext)\n        - [MTIImage](#mtiimage)\n        - [MTIFilter](#mtifilter)\n        - [MTIKernel](#mtikernel)\n    - [Alpha Type Handling](#alpha-type-handling)\n    - [Optimizations](#optimizations)\n    - [Concurrency Considerations](#concurrency-considerations)\n    - [Advantages over Core Image](#advantages-over-core-image)\n- [Builtin Filters](#builtin-filters)\n- [Example Code](#example-code)\n    - [Create a `MTIImage`](#create-a-mtiimage)\n    - [Create a filtered image](#create-a-filtered-image)\n    - [Render a `MTIImage`](#render-a-mtiimage)\n- [Quick Look Debug Support](#quick-look-debug-support)\n- [Best Practices](#best-practices)\n- [Build Custom Filter](#build-custom-filter)\n    - [Simple single input/output filters](#simple-single-inputoutput-filters)\n    - [Fully custom filters](#fully-custom-filters)\n    - [Multiple draw calls in one render pass](#multiple-draw-calls-in-one-render-pass)\n- [Install](#install)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Design Overview\n\nMetalPetal is an image processing framework based on [Metal](https://developer.apple.com/metal/) designed to provide real-time processing for still image and video with easy to use programming interfaces.\n\nThis chapter covers the key concepts of MetalPetal, and will help you to get a better understanding of its design, implementation, performance implications and best practices.\n\n### Goals\n\nMetalPetal is designed with the following goals in mind.\n\n- Easy to use API\n\n    Provides convenience APIs and avoids common pitfalls.\n\n- Performance\n\n    Use CPU, GPU and memory efficiently.\n\n- Extensibility\n\n    Easy to create custom filters as well as plugin your custom image processing unit.\n\n- Swifty\n\n    Provides a fluid experience for Swift programmers.\n\n### Core Components\n\nSome of the core concepts of MetalPetal are very similar to those in Apple's Core Image framework.\n\n#### MTIContext\n\nProvides an evaluation context for rendering `MTIImage`s. It also stores a lot of caches and state information, so it's more efficient to reuse a context whenever possible.\n\n#### MTIImage\n\n A `MTIImage` object is a representation of an image to be processed or produced. It does directly represent image bitmap data instead it has all the information necessary to produce an image or more precisely a `MTLTexture`. It consists of two parts, a recipe of how to produce the texture (`MTIImagePromise`) and other information such as how a context caches the image (`cachePolicy`), and how the texture should be sampled (`samplerDescriptor`).\n\n#### MTIFilter\n\nA `MTIFilter` represents an image processing effect and any parameters that control that effect. It produces a `MTIImage` object as output. To use a filter, you create a filter object, set its input images and parameters, and then access its output image. Typically, a filter class owns a static kernel (`MTIKernel`), when you access its `outputImage` property, it asks the kernel with the input images and parameters to produce a output `MTIImage`. \n\n#### MTIKernel\n\nA `MTIKernel` represents an image processing routine. `MTIKernel` is responsible for creating the cooresponding render or compute pipeline state for the filter, as well as building the `MTIImagePromise` for a `MTIImage`.\n\n### Alpha Type Handling\n\nIf an alpha channel is used in an image, there are two common representations that are available: unpremultiplied (straight/unassociated) alpha, and premultiplied (associated) alpha.\n\nWith unpremultiplied alpha, the RGB components represent the color of the pixel, disregarding its opacity.\n\nWith premultiplied alpha, the RGB components represent the color of the pixel, adjusted for its opacity by multiplication.\n\nMost of the filters in MetalPetal accept unpremultiplied alpha and opaque images and output unpremultiplied alpha images. Some filters, such as  `MTIMultilayerCompositingFilter` accepts both unpremultiplied/premultiplied alpha images.\n\nMetalPetal handles alpha type explicitly. You are responsible for providing the correct alpha type during image creation.\n\nThere are three alpha types in MetalPetal.\n\n`MTIAlphaType.nonPremultiplied`: the alpha value in the image is not premultiplied.\n\n`MTIAlphaType.premultiplied`: the alpha value in the image is premultiplied.\n\n`MTIAlphaType.alphaIsOne`: there's no alpha channel in the image or the image is opaque.\n\nTypically, `CGImage`, `CVPixelBuffer`, `CIImage` objects have premultiplied alpha channel. `MTIAlphaType.alphaIsOne` is strongly recommanded if the image is opaque, e.g. a `CVPixelBuffer` from camera feed, or a `CGImage` loaded from a `jpg` file.\n\nYou can call `unpremultiplyingAlpha()` or `premultiplyingAlpha()` on a `MTIImage` to convert the alpha type of the image.\n\nFor performance reasons, alpha type validation only happens in debug build.\n\n### Optimizations\n\nMetalPetal does a lot of optimizations for you under the hood.\n\nIt automatically caches functions, kernel states, samplers, etc.\n\nBefore rendering, MetalPetal can look into your image render graph and figure out the minimal number of intermedinate textures needed to do the rendering, saving memory, energy and time.\n\nIt can also re-organize the image render graph if multiple “recipes” can be concatenated to eliminate redundant render passes. (`MTIContext.isRenderGraphOptimizationEnabled`)\n\n### Concurrency Considerations\n\n`MTIImage` objects are immutable, which means they can be shared safely among threads.\n\nHowever, `MTIFilter` objects are mutable and thus cannot be shared safely among threads.\n\nA `MTIContext` contains a lot of states and caches. There's a thread-safe mechanism for `MTIContext` objects, making it safe to share a `MTIContext` object among threads.\n\n### Advantages over Core Image\n\n- Fully customizable vertex and fragment functions.\n\n- MRT (Multiple Render Targets) support.\n\n- Generally better performance. (Detailed benchmark data needed)\n\n## Builtin Filters\n\n- Color Matrix\n\n- Color Lookup\n\n    Uses an color lookup table to remap the colors in an image.\n\n- Opacity\n\n- Exposure\n\n- Saturation\n\n- Brightness\n\n- Contrast\n\n- Color Invert\n\n- Vibrance\n\n    Adjusts the saturation of an image while keeping pleasing skin tones.\n\n- RGB Tone Curve\n\n- Blend Modes\n\n    - Normal\n    - Multiply\n    - Overlay\n    - Screen\n    - HardLight\n    - SoftLight\n    - Darken\n    - Lighten\n    - ColorDodge\n    - Difference\n    - Exclusion\n    - Hue\n    - Saturation\n    - Color\n    - Luminosity\n    - ColorLookup512x512\n\n- Blend with Mask\n\n- Transform\n\n- Crop\n\n- Pixellate\n\n- Multilayer Composite\n\n- MPS Convolution\n\n- MPS Gaussian Blur\n\n- High Pass Skin Smoothing\n\n- CLAHE (Contrast-Limited Adaptive Histogram Equalization)\n\n- Lens Blur (Hexagonal Bokeh Blur)\n\n## Example Code\n\n### Create a `MTIImage`\n\n```Swift\nlet imageFromCGImage = MTIImage(cgImage: cgImage)\n\nlet imageFromCIImage = MTIImage(ciImage: ciImage)\n\nlet imageFromCoreVideoPixelBuffer = MTIImage(cvPixelBuffer: pixelBuffer)\n\nlet imageFromContentsOfURL = MTIImage(contentsOf: url)\n```\n\n### Create a filtered image\n\n```Swift\nlet inputImage = ...\n\nlet filter = MTISaturationFilter()\nfilter.saturation = 0\nfilter.inputImage = inputImage\n\nlet outputImage = filter.outputImage\n```\n\n### Render a `MTIImage`\n\n```Swift\nlet context = MTIContext()\n\nlet image: MTIImage = ...\n\ndo {\n    try context.render(image, to: pixelBuffer) \n    \n    //context.makeCIImage(from: image)\n    \n    //context.makeCGImage(from: image)\n} catch {\n    print(error)\n}\n```\n\n## Quick Look Debug Support\n\nIf you do a Quick Look on a `MTIImage`, it'll show you the image graph that you constructed to produce that image.\n\n![Quick Look Debug Preview](https://github.com/MetalPetal/MetalPetal/blob/master/Assets/quick_look_debug_preview.jpg)\n\n## Best Practices\n\n- Reuse a `MTIContext` whenever possible.\n\n    Contexts are heavyweight objects, so if you do create one, do so as early as possible, and reuse it each time you need to render an image.\n\n- Use `MTIImage.cachePolicy` wisely.\n    \n    Use `MTIImageCachePolicyTransient` when you do not want to preserve the render result of a image, for example when the image is just an intermediate result in a filter chain, so the underlying texture of the render result can be reused. It is the most memory efficient option. However, when you ask the context to render a previously rendered image, it may re-render that image since its underlying texture has been reused.\n    \n    By default, a filter's output image has the `transient` policy.\n\n    Use `MTIImageCachePolicyPersistent` when you want to prevent the underlying texture from being reused.\n    \n    By default, images created from external sources have the `persistent` policy.\n\n- Understand that `MTIFilter.outputImage` is a compute property.\n\n    Each time you ask a filter for its output image, the filter may give you a new output image object even if the inputs are identical with the previous call. So reuse output images whenever possible.\n    \n    For example,\n\n     ```Swift\n    //          ╭→ filterB\n    // filterA ─┤\n    //          ╰→ filterC\n    // \n    // filterB and filterC use filterA's output as their input.\n    ```\n    In this situation, the following solution:\n    \n    ```Swift\n    let filterOutputImage = filterA.outputImage\n    filterB.inputImage = filterOutputImage\n    filterC.inputImage = filterOutputImage\n    ```\n    \n    is better than:\n\n    ```Swift\n    filterB.inputImage = filterA.outputImage\n    filterC.inputImage = filterA.outputImage\n    ```\n\n## Build Custom Filter\n\nIf you want to include the `MTIShaderLib.h` in your `.metal` file, you need to add `${PODS_CONFIGURATION_BUILD_DIR}/MetalPetal/MetalPetal.framework/Headers` to the `Metal Compiler - Header Search Paths` (`MTL_HEADER_SEARCH_PATHS`).\n\n### Simple single input/output filters\n\nTo build a custom unary filter, you can subclass `MTIUnaryImageRenderingFilter` and override the methods in the `SubclassingHooks` category. Examples: `MTIPixellateFilter`, `MTIVibranceFilter`, `MTIUnpremultiplyAlphaFilter`, `MTIPremultiplyAlphaFilter`, etc.\n\n```ObjectiveC\n@interface MTIPixellateFilter : MTIUnaryImageRenderingFilter\n\n@property (nonatomic) float fractionalWidthOfAPixel;\n\n@end\n\n@implementation MTIPixellateFilter\n\n- (instancetype)init {\n    if (self = [super init]) {\n        _fractionalWidthOfAPixel = 0.05;\n    }\n    return self;\n}\n\n+ (MTIFunctionDescriptor *)fragmentFunctionDescriptor {\n    return [[MTIFunctionDescriptor alloc] initWithName:@\"pixellateEffect\" libraryURL:[bundle URLForResource:@\"default\" withExtension:@\"metallib\"]];\n}\n\n- (NSDictionary<NSString *,id> *)parameters {\n    return @{@\"fractionalWidthOfAPixel\": @(self.fractionalWidthOfAPixel)};\n}\n\n@end\n```\n\n### Fully custom filters\n\nTo build more complex filters, all you need to do is create a kernel (`MTIRenderPipelineKernel`/`MTIComputePipelineKernel`/`MTIMPSKernel`), then apply the kernel to the input image(s). Examples: `MTIChromaKeyBlendFilter`, `MTIBlendWithMaskFilter`, `MTIColorLookupFilter`, etc.\n\n```ObjectiveC\n\n@interface MTIChromaKeyBlendFilter : NSObject <MTIFilter>\n\n@property (nonatomic, strong, nullable) MTIImage *inputImage;\n\n@property (nonatomic, strong, nullable) MTIImage *inputBackgroundImage;\n\n@property (nonatomic) float thresholdSensitivity;\n\n@property (nonatomic) float smoothing;\n\n@property (nonatomic) MTIColor color;\n\n@end\n\n@implementation MTIChromaKeyBlendFilter\n\n@synthesize outputPixelFormat = _outputPixelFormat;\n\n+ (MTIRenderPipelineKernel *)kernel {\n    static MTIRenderPipelineKernel *kernel;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        kernel = [[MTIRenderPipelineKernel alloc] initWithVertexFunctionDescriptor:[[MTIFunctionDescriptor alloc] initWithName:MTIFilterPassthroughVertexFunctionName] fragmentFunctionDescriptor:[[MTIFunctionDescriptor alloc] initWithName:@\"chromaKeyBlend\"]];\n    });\n    return kernel;\n}\n\n- (instancetype)init {\n    if (self = [super init]) {\n        _thresholdSensitivity = 0.4;\n        _smoothing = 0.1;\n        _color = MTIColorMake(0.0, 1.0, 0.0, 1.0);\n    }\n    return self;\n}\n\n- (MTIImage *)outputImage {\n    if (!self.inputImage || !self.inputBackgroundImage) {\n        return nil;\n    }\n    return [self.class.kernel applyToInputImages:@[self.inputImage, self.inputBackgroundImage]\n                                      parameters:@{@\"color\": [[MTIVector alloc] initWithFloat4:(simd_float4){self.color.red, self.color.green, self.color.blue,self.color.alpha}],\n                                    @\"thresholdSensitivity\": @(self.thresholdSensitivity),\n                                               @\"smoothing\": @(self.smoothing)}\n                         outputTextureDimensions:MTITextureDimensionsMake2DFromCGSize(self.inputImage.size)\n                               outputPixelFormat:self.outputPixelFormat];\n}\n\n@end\n```\n\n### Multiple draw calls in one render pass\n\nYou can use `MTIRenderCommand` to issue multiple draw calls in one render pass.\n\n## Install\n\nYou can use [CocoaPods](https://cocoapods.org/) to install the lastest version.\n\n```\nuse_frameworks!\n\npod 'MetalPetal'\n\n# Swift extensions (optional).\npod 'MetalPetal/Swift'\n\n```\n\n## Contribute\n\nThank you for considering contributing to MetalPetal. Please read our [Contributing Guidelines](CONTRIBUTING.md).\n\n## License\n\nMetalPetal is MIT-licensed. [LICENSE](LICENSE)\n\nThe files in the `/MetalPetalDemo` directory are licensed under a separate license. [LICENSE.md](MetalPetalDemo/LICENSE.md)\n\nDocumentation is licensed CC-BY-4.0.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DEA:3FD49:1792C8:5E043A:6AB92CC6"},"text_sha256":"d4be2143407429cd0494f438f61c36ef64c7f63abb9e653f8cd817980d1b5882"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1735","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:18094C5:1C2FFCA:6AB92CC7"},"commit":{"sha":"f9b78897bd4214bb097f352a1bde0a4f4a1e2ddb","url":"https://github.com/MetalPetal/MetalPetal/commit/f9b78897bd4214bb097f352a1bde0a4f4a1e2ddb","date":"2023-02-21T03:47:14Z","author_date":"2023-02-21T03:47:14Z","committer_date":"2023-02-21T03:47:14Z","tree_sha":"4a983da6590b81b548cbe2c7f62e893c9b49ecc1","message_first_line":"Add autoreleasepool in MTIAsyncVideoCompositionRequestHandler"},"tree_request_status":200,"tree_rate":{"github_remaining":"1734","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:17F66CF:1C1D8A6:6AB92CC7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":33466,"blob_sha":"a31af030b36ba223967c8b5060df33a2dc389bba","priority":0}],"documents":[{"path":"README.md","size":33466,"blob_sha":"a31af030b36ba223967c8b5060df33a2dc389bba","priority":0,"status":200,"text":"# MetalPetal\n\n[![Swift](https://github.com/MetalPetal/MetalPetal/workflows/Swift/badge.svg)](https://github.com/MetalPetal/MetalPetal/actions?query=workflow%3ASwift)\n<br/>\n[![Platforms](https://img.shields.io/badge/Platforms-iOS%2011%2B%20%7C%20tvOS%2013%2B%20%7C%20macOS%2010.13%2B-blue.svg)](#)\n[![Version](https://img.shields.io/github/v/release/MetalPetal/MetalPetal?label=Release)](https://github.com/MetalPetal/MetalPetal/releases)\n<br/>\n[![Apple Silicon](https://img.shields.io/badge/Apple%20Silicon-%E2%80%8B%20%E2%9C%94-eee)](#)\n[![Mac Catalyst](https://img.shields.io/badge/Mac%20Catalyst-%E2%80%8B%20%E2%9C%94-eee)](#)\n[![Simulator](https://img.shields.io/badge/Simulator-%E2%80%8B%20%E2%9C%94-eee)](#)\n<br/>\n[![CocoaPods](https://img.shields.io/static/v1?label=CocoaPods&message=%E2%80%8B%20%E2%9C%94&color=eee&logo=CocoaPods&logoColor=white)](#cocoapods)\n[![Swift PM](https://img.shields.io/static/v1?label=Swift%20PM&message=%E2%80%8B%20%E2%9C%94&color=eee&logo=Swift&logoColor=white)](#swift-package-manager)\n\nAn image processing framework based on Metal.\n\n<!-- TOC depthFrom:2 -->\n\n- [Design Overview](#design-overview)\n    - [Goals](#goals)\n    - [Core Components](#core-components)\n        - [MTIContext](#mticontext)\n        - [MTIImage](#mtiimage)\n        - [MTIFilter](#mtifilter)\n        - [MTIKernel](#mtikernel)\n    - [Optimizations](#optimizations)\n    - [Concurrency Considerations](#concurrency-considerations)\n    - [Advantages over Core Image](#advantages-over-core-image)\n- [Builtin Filters](#builtin-filters)\n- [Example Code](#example-code)\n    - [Create a `MTIImage`](#create-a-mtiimage)\n    - [Apply a Filter](#apply-a-filter)\n    - [Render a `MTIImage`](#render-a-mtiimage)\n    - [Display a `MTIImage`](#display-a-mtiimage)\n    - [Connect Filters (Swift)](#connect-filters-swift)\n    - [Process Video Files](#process-video-files)\n    - [Process Live Video (with VideoIO)](#process-live-video-with-videoio)\n- [Best Practices](#best-practices)\n- [Build Custom Filter](#build-custom-filter)\n    - [Shader Function Arguments Encoding](#shader-function-arguments-encoding)\n    - [Simple Single Input / Output Filters](#simple-single-input--output-filters)\n    - [Fully Custom Filters](#fully-custom-filters)\n    - [Multiple Draw Calls in One Render Pass](#multiple-draw-calls-in-one-render-pass)\n    - [Custom Vertex Data](#custom-vertex-data)\n    - [Custom Processing Module](#custom-processing-module)\n- [Alpha Types](#alpha-types)\n    - [Alpha Handling of Built-in Filters](#alpha-handling-of-built-in-filters)\n- [Color Spaces](#color-spaces)\n    - [Color Spaces for Inputs](#color-spaces-for-inputs)\n    - [Color Spaces for Outputs](#color-spaces-for-outputs)\n    - [Color Spaces for `CVPixelBuffer`](#color-spaces-for-cvpixelbuffer)\n    - [Color Space Conversions](#color-space-conversions)\n- [Extensions](#extensions)\n    - [Working with SceneKit](#working-with-scenekit)\n    - [Working with SpriteKit](#working-with-spritekit)\n    - [Working with Core Image](#working-with-core-image)\n    - [Working with JavaScript](#working-with-javascript)\n    - [Texture Loader](#texture-loader)\n- [Install](#install)\n    - [CocoaPods](#cocoapods)\n        - [Sub-pod `Swift`](#sub-pod-swift)\n        - [Sub-pod `AppleSilicon`](#sub-pod-applesilicon)\n    - [Swift Package Manager](#swift-package-manager)\n- [iOS Simulator Support](#ios-simulator-support)\n- [Quick Look Debug Support](#quick-look-debug-support)\n- [Trivia](#trivia)\n- [Contribute](#contribute)\n- [License](#license)\n\n<!-- /TOC -->\n\n## Design Overview\n\nMetalPetal is an image processing framework based on [Metal](https://developer.apple.com/metal/) designed to provide real-time processing for still image and video with easy to use programming interfaces.\n\nThis chapter covers the key concepts of MetalPetal, and will help you to get a better understanding of its design, implementation, performance implications and best practices.\n\n### Goals\n\nMetalPetal is designed with the following goals in mind.\n\n- Easy to use API\n\n    Provides convenience APIs and avoids common pitfalls.\n\n- Performance\n\n    Use CPU, GPU and memory efficiently.\n\n- Extensibility\n\n    Easy to create custom filters as well as plugin your custom image processing unit.\n\n- Swifty\n\n    Provides a fluid experience for Swift programmers.\n\n### Core Components\n\nSome of the core concepts of MetalPetal are very similar to those in Apple's Core Image framework.\n\n#### MTIContext\n\nProvides an evaluation context for rendering `MTIImage`s. It also stores a lot of caches and state information, so it's more efficient to reuse a context whenever possible.\n\n#### MTIImage\n\n A `MTIImage` object is a representation of an image to be processed or produced. It does directly represent image bitmap data instead it has all the information necessary to produce an image or more precisely a `MTLTexture`. It consists of two parts, a recipe of how to produce the texture (`MTIImagePromise`) and other information such as how a context caches the image (`cachePolicy`), and how the texture should be sampled (`samplerDescriptor`).\n\n#### MTIFilter\n\nA `MTIFilter` represents an image processing effect and any parameters that control that effect. It produces a `MTIImage` object as output. To use a filter, you create a filter object, set its input images and parameters, and then access its output image. Typically, a filter class owns a static kernel (`MTIKernel`), when you access its `outputImage` property, it asks the kernel with the input images and parameters to produce an output `MTIImage`. \n\n#### MTIKernel\n\nA `MTIKernel` represents an image processing routine. `MTIKernel` is responsible for creating the corresponding render or compute pipeline state for the filter, as well as building the `MTIImagePromise` for a `MTIImage`.\n\n### Optimizations\n\nMetalPetal does a lot of optimizations for you under the hood.\n\nIt automatically caches functions, kernel states, sampler states, etc.\n\nIt utilizes Metal features like programmable blending, memoryless render targets, resource heaps and metal performance shaders to make the render fast and efficient. On macOS, MetalPetal can also take advantage of the TBDR architecture of Apple silicon.\n\nBefore rendering, MetalPetal can look into your image render graph and figure out the minimal number of intermediate textures needed to do the rendering, saving memory, energy and time.\n\nIt can also re-organize the image render graph if multiple “recipes” can be concatenated to eliminate redundant render passes. (`MTIContext.isRenderGraphOptimizationEnabled`)\n\n### Concurrency Considerations\n\n`MTIImage` objects are immutable, which means they can be shared safely among threads.\n\nHowever, `MTIFilter` objects are mutable and thus cannot be shared safely among threads.\n\nA `MTIContext` contains a lot of states and caches. There's a thread-safe mechanism for `MTIContext` objects, making it safe to share a `MTIContext` object among threads.\n\n### Advantages over Core Image\n\n- Fully customizable vertex and fragment functions.\n\n- MRT (Multiple Render Targets) support.\n\n- Generally better performance. (Detailed benchmark data needed)\n\n## Builtin Filters\n\n- Color Matrix\n\n- Color Lookup\n\n    Uses an color lookup table to remap the colors in an image.\n\n- Opacity\n\n- Exposure\n\n- Saturation\n\n- Brightness\n\n- Contrast\n\n- Color Invert\n\n- Vibrance\n\n    Adjusts the saturation of an image while keeping pleasing skin tones.\n\n- RGB Tone Curve\n\n- Blend Modes\n\n    - Normal\n    - Multiply\n    - Overlay\n    - Screen\n    - Hard Light\n    - Soft Light\n    - Darken\n    - Lighten\n    - Color Dodge\n    - Add (Linear Dodge)\n    - Color Burn\n    - Linear Burn\n    - Lighter Color\n    - Darker Color\n    - Vivid Light\n    - Linear Light\n    - Pin Light\n    - Hard Mix\n    - Difference\n    - Exclusion\n    - Subtract\n    - Divide\n    - Hue\n    - Saturation\n    - Color\n    - Luminosity\n    - ColorLookup512x512\n    - [Custom Blend Mode](https://github.com/MetalPetal/MetalPetal/issues/70#issuecomment-792430483)\n\n- Blend with Mask\n\n- Transform\n\n- Crop\n\n- Pixellate\n\n- Multilayer Composite\n\n- MPS Convolution\n\n- MPS Gaussian Blur\n\n- MPS Definition\n\n- MPS Sobel\n\n- MPS Unsharp Mask\n\n- MPS Box Blur\n\n- [High Pass Skin Smoothing](https://github.com/YuAo/YUCIHighPassSkinSmoothing)\n\n- [CLAHE (Contrast-Limited Adaptive Histogram Equalization)](https://github.com/YuAo/Accelerated-CLAHE)\n\n- [Lens Blur (Hexagonal Bokeh Blur)](https://github.com/YuAo/HexagonalBokehBlur)\n\n- [Surface Blur](https://github.com/MetalPetal/SurfaceBlur)\n\n- Bulge Distortion\n\n- Chroma Key Blend\n\n- Color Halftone\n\n- Dot Screen\n\n- Round Corner (Circular/Continuous Curve)\n\n- [All Core Image Filters](#working-with-core-image)\n\n## Example Code\n\n### Create a `MTIImage`\n\nYou can create a `MTIImage` object from nearly any source of image data, including:\n\n- `URL`s referencing image files to be loaded\n- Metal textures\n- CoreVideo image or pixel buffers (`CVImageBufferRef` or `CVPixelBufferRef`)\n- Image bitmap data in memory\n- Texture data from a given texture or image asset name\n- Core Image `CIImage` objects\n- `MDLTexture` objects\n- SceneKit and SpriteKit scenes\n\n```Swift\nlet imageFromCGImage = MTIImage(cgImage: cgImage, isOpaque: true)\n\nlet imageFromCIImage = MTIImage(ciImage: ciImage)\n\nlet imageFromCoreVideoPixelBuffer = MTIImage(cvPixelBuffer: pixelBuffer, alphaType: .alphaIsOne)\n\nlet imageFromContentsOfURL = MTIImage(contentsOf: url)\n\n// unpremultiply alpha if needed\nlet unpremultipliedAlphaImage = image.unpremultiplyingAlpha()\n```\n\n### Apply a Filter\n\n```Swift\nlet inputImage = ...\n\nlet filter = MTISaturationFilter()\nfilter.saturation = 0\nfilter.inputImage = inputImage\n\nlet outputImage = filter.outputImage\n```\n\n### Render a `MTIImage`\n\n```Swift\nlet options = MTIContextOptions()\n\nguard let device = MTLCreateSystemDefaultDevice(), let context = try? MTIContext(device: device, options: options) else {\n    return\n}\n\nlet image: MTIImage = ...\n\ndo {\n    try context.render(image, to: pixelBuffer) \n    \n    //context.makeCIImage(from: image)\n    \n    //context.makeCGImage(from: image)\n} catch {\n    print(error)\n}\n```\n\n### Display a `MTIImage`\n\n```Swift\nlet imageView = MTIImageView(frame: self.view.bounds)\n\n// You can optionally assign a `MTIContext` to the image view. If no context is assigned and `automaticallyCreatesContext` is set to `true` (the default value), a `MTIContext` is created automatically when the image view renders its content.\nimageView.context = ...\n\nimageView.image = image\n```\n\nIf you'd like to move the GPU command encoding process out of the main thread, you can use a `MTIThreadSafeImageView`. You may assign a `MTIImage` to a `MTIThreadSafeImageView` in any thread.\n\n### Connect Filters (Swift)\n\nMetalPetal has a type-safe Swift API for connecting filters. You can use `=>` operator in `FilterGraph.makeImage` function to connect filters and get the output image.\n\nHere are some examples:\n\n```Swift\nlet image = try? FilterGraph.makeImage { output in\n    inputImage => saturationFilter => exposureFilter => output\n}\n```\n\n```Swift\nlet image = try? FilterGraph.makeImage { output in\n    inputImage => saturationFilter => exposureFilter => contrastFilter => blendFilter.inputPorts.inputImage\n    exposureFilter => blendFilter.inputPorts.inputBackgroundImage\n    blendFilter => output\n}\n```\n\n- You can connect unary filters (`MTIUnaryFilter`) directly using `=>`.\n\n- For a filter with multiple inputs, you need to connect to one of its `inputPorts`.\n\n- `=>` operator only works in `FilterGraph.makeImage` method.\n\n- One and only one filter's output can be connected to `output`.\n\n### Process Video Files\n\nWorking with `AVPlayer`:\n\n```Swift\nlet context = try MTIContext(device: device)\nlet asset = AVAsset(url: videoURL)\nlet composition = MTIVideoComposition(asset: asset, context: context, queue: DispatchQueue.main, filter: { request in\n    return FilterGraph.makeImage { output in\n        request.anySourceImage! => filterA => filterB => output\n    }!\n}\n\nlet playerItem = AVPlayerItem(asset: asset)\nplayerItem.videoComposition = composition.makeAVVideoComposition()\nplayer.replaceCurrentItem(with: playerItem)\nplayer.play()\n```\n\nExport a video:\n\n_[VideoIO](https://github.com/MetalPetal/VideoIO) is required for the following examples._\n\n```Swift\nimport VideoIO\n\nvar configuration = AssetExportSession.Configuration(fileType: .mp4, videoSettings: .h264(videoSize: composition.renderSize), audioSettings: .aac(channels: 2, sampleRate: 44100, bitRate: 128 * 1000))\nconfiguration.videoComposition = composition.makeAVVideoComposition()\nself.exporter = try! AssetExportSession(asset: asset, outputURL: outputURL, configuration: configuration)\nexporter.export(progress: { progress in\n    \n}, completion: { error in\n    \n})\n```\n\n### Process Live Video (with VideoIO)\n\n_[VideoIO](https://github.com/MetalPetal/VideoIO) is required for this example._ \n\n```Swift\nimport VideoIO\n\n// Setup Image View\nlet imageView = MTIImageView(frame: self.view.bounds)\n...\n\n// Setup Camera\nlet camera = Camera(captureSessionPreset: .hd1920x1080, configurator: .portraitFrontMirroredVideoOutput)\ntry camera.enableVideoDataOutput(on: DispatchQueue.main, delegate: self)\ncamera.videoDataOutput?.videoSettings = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_420YpCbCr8BiPlanarFullRange]\n\n...\n\n// AVCaptureVideoDataOutputSampleBufferDelegate\n\nlet filter = MTIColorInvertFilter()\n\nfunc captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {\n    guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {\n        return\n    }\n    let inputImage = MTIImage(cvPixelBuffer: pixelBuffer, alphaType: .alphaIsOne)\n    filter.inputImage = inputImage\n    self.imageView.image = filter.outputImage\n}\n\n```\n\nPlease refer to the `CameraFilterView.swift` in the example project for more about previewing and recording filtered live video.\n\n## Best Practices\n\n- Reuse a `MTIContext` whenever possible.\n\n    Contexts are heavyweight objects, so if you do create one, do so as early as possible, and reuse it each time you need to render an image.\n\n- Use `MTIImage.cachePolicy` wisely.\n    \n    Use `MTIImageCachePolicyTransient` when you do not want to preserve the render result of an image, for example when the image is just an intermediate result in a filter chain, so the underlying texture of the render result can be reused. It is the most memory efficient option. However, when you ask the context to render a previously rendered image, it may re-render that image since its underlying texture has been reused.\n    \n    By default, a filter's output image has the `transient` policy.\n\n    Use `MTIImageCachePolicyPersistent` when you want to prevent the underlying texture from being reused.\n    \n    By default, images created from external sources have the `persistent` policy.\n\n- Understand that `MTIFilter.outputImage` is a compute property.\n\n    Each time you ask a filter for its output image, the filter may give you a new output image object even if the inputs are identical with the previous call. So reuse output images whenever possible.\n    \n    For example,\n\n     ```Swift\n    //          ╭→ filterB\n    // filterA ─┤\n    //          ╰→ filterC\n    // \n    // filterB and filterC use filterA's output as their input.\n    ```\n    In this situation, the following solution:\n    \n    ```Swift\n    let filterOutputImage = filterA.outputImage\n    filterB.inputImage = filterOutputImage\n    filterC.inputImage = filterOutputImage\n    ```\n    \n    is better than:\n\n    ```Swift\n    filterB.inputImage = filterA.outputImage\n    filterC.inputImage = filterA.outputImage\n    ```\n\n## Build Custom Filter\n\nIf you want to include the `MTIShaderLib.h` in your `.metal` file, you need to add the path of `MTIShaderLib.h` file to the `Metal Compiler - Header Search Paths` (`MTL_HEADER_SEARCH_PATHS`) setting.\n\nFor example, if you use CocoaPods you can set the `MTL_HEADER_SEARCH_PATHS` to  `${PODS_CONFIGURATION_BUILD_DIR}/MetalPetal/MetalPetal.framework/Headers` or `${PODS_ROOT}/MetalPetal/Frameworks/MetalPetal/Shaders`. If you use Swift Package Manager, set the `MTL_HEADER_SEARCH_PATHS` to `$(HEADER_SEARCH_PATHS)`\n\n### Shader Function Arguments Encoding\n\nMetalPetal has a built-in mechanism to encode shader function arguments for you. You can pass the shader function arguments as `name: value` dictionaries to the `MTIRenderPipelineKernel.apply(toInputImages:parameters:outputDescriptors:)`, `MTIRenderCommand(kernel:geometry:images:parameters:)`, etc.\n\nFor example, the parameter dictionary for the metal function `vibranceAdjust` can be:\n\n```Swift\n// Swift\nlet amount: Float = 1.0\nlet vibranceVector = float4(1, 1, 1, 1)\nlet parameters = [\"amount\": amount,\n                  \"vibranceVector\": MTIVector(value: vibranceVector),\n                  \"avoidsSaturatingSkinTones\": true,\n                  \"grayColorTransform\": MTIVector(value: float3(0,0,0))]\n```\n\n```Metal\n// vibranceAdjust metal function\nfragment float4 vibranceAdjust(...,\n                constant float & amount [[ buffer(0) ]],\n                constant float4 & vibranceVector [[ buffer(1) ]],\n                constant bool & avoidsSaturatingSkinTones [[ buffer(2) ]],\n                constant float3 & grayColorTransform [[ buffer(3) ]])\n{\n    ...\n}\n\n```\n\nThe shader function argument types and the corresponding types to use in a parameter dictionary is listed below.\n\n| Shader Function Argument Type | Swift | Objective-C | \n| :--- | :--- | :--- |\n| float | Float | float |\n| int | Int32 | int |\n| uint | UInt32 | uint |\n| bool | Bool | bool |\n| simd (float2,float4,float4x4,int4, etc.) | simd (with `MetalPetal/Swift`) / MTIVector | MTIVector |\n| struct | Data / MTIDataBuffer | NSData / MTIDataBuffer |\n| other (float *, struct *, etc.) immutable | Data / MTIDataBuffer | NSData / MTIDataBuffer |\n| other (float *, struct *, etc.) mutable | MTIDataBuffer | MTIDataBuffer |\n\n### Simple Single Input / Output Filters\n\nTo build a custom unary filter, you can subclass `MTIUnaryImageRenderingFilter` and override the methods in the `SubclassingHooks` category. Examples: `MTIPixellateFilter`, `MTIVibranceFilter`, `MTIUnpremultiplyAlphaFilter`, `MTIPremultiplyAlphaFilter`, etc.\n\n```ObjectiveC\n//Objective-C\n\n@interface MTIPixellateFilter : MTIUnaryImageRenderingFilter\n\n@property (nonatomic) float fractionalWidthOfAPixel;\n\n@end\n\n@implementation MTIPixellateFilter\n\n- (instancetype)init {\n    if (self = [super init]) {\n        _fractionalWidthOfAPixel = 0.05;\n    }\n    return self;\n}\n\n+ (MTIFunctionDescriptor *)fragmentFunctionDescriptor {\n    return [[MTIFunctionDescriptor alloc] initWithName:@\"pixellateEffect\" libraryURL:[bundle URLForResource:@\"default\" withExtension:@\"metallib\"]];\n}\n\n- (NSDictionary<NSString *,id> *)parameters {\n    return @{@\"fractionalWidthOfAPixel\": @(self.fractionalWidthOfAPixel)};\n}\n\n@end\n```\n\n```Swift\n//Swift\n\nclass MTIPixellateFilter: MTIUnaryImageRenderingFilter {\n    \n    var fractionalWidthOfAPixel: Float = 0.05\n\n    override var parameters: [String : Any] {\n        return [\"fractionalWidthOfAPixel\": fractionalWidthOfAPixel]\n    }\n    \n    override class func fragmentFunctionDescriptor() -> MTIFunctionDescriptor {\n        return MTIFunctionDescriptor(name: \"pixellateEffect\", libraryURL: MTIDefaultLibraryURLForBundle(Bundle.main))\n    }\n}\n```\n\n### Fully Custom Filters\n\nTo build more complex filters, all you need to do is create a kernel (`MTIRenderPipelineKernel`/`MTIComputePipelineKernel`/`MTIMPSKernel`), then apply the kernel to the input image(s). Examples: `MTIChromaKeyBlendFilter`, `MTIBlendWithMaskFilter`, `MTIColorLookupFilter`, etc.\n\n```ObjectiveC\n\n@interface MTIChromaKeyBlendFilter : NSObject <MTIFilter>\n\n@property (nonatomic, strong, nullable) MTIImage *inputImage;\n\n@property (nonatomic, strong, nullable) MTIImage *inputBackgroundImage;\n\n@property (nonatomic) float thresholdSensitivity;\n\n@property (nonatomic) float smoothing;\n\n@property (nonatomic) MTIColor color;\n\n@end\n\n@implementation MTIChromaKeyBlendFilter\n\n@synthesize outputPixelFormat = _outputPixelFormat;\n\n+ (MTIRenderPipelineKernel *)kernel {\n    static MTIRenderPipelineKernel *kernel;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        kernel = [[MTIRenderPipelineKernel alloc] initWithVertexFunctionDescriptor:[[MTIFunctionDescriptor alloc] initWithName:MTIFilterPassthroughVertexFunctionName] fragmentFunctionDescriptor:[[MTIFunctionDescriptor alloc] initWithName:@\"chromaKeyBlend\"]];\n    });\n    return kernel;\n}\n\n- (instancetype)init {\n    if (self = [super init]) {\n        _thresholdSensitivity = 0.4;\n        _smoothing = 0.1;\n        _color = MTIColorMake(0.0, 1.0, 0.0, 1.0);\n    }\n    return self;\n}\n\n- (MTIImage *)outputImage {\n    if (!self.inputImage || !self.inputBackgroundImage) {\n        return nil;\n    }\n    return [self.class.kernel applyToInputImages:@[self.inputImage, self.inputBackgroundImage]\n                                      parameters:@{@\"color\": [MTIVector vectorWithFloat4:(simd_float4){self.color.red, self.color.green, self.color.blue,self.color.alpha}],\n                                    @\"thresholdSensitivity\": @(self.thresholdSensitivity),\n                                               @\"smoothing\": @(self.smoothing)}\n                         outputTextureDimensions:MTITextureDimensionsMake2DFromCGSize(self.inputImage.size)\n                               outputPixelFormat:self.outputPixelFormat];\n}\n\n@end\n```\n\n### Multiple Draw Calls in One Render Pass\n\nYou can use `MTIRenderCommand` to issue multiple draw calls in one render pass.\n\n```Swift\n// Create a draw call with kernelA, geometryA, and imageA.\nlet renderCommandA = MTIRenderCommand(kernel: self.kernelA, geometry: self.geometryA, images: [imageA], parameters: [:])\n\n// Create a draw call with kernelB, geometryB, and imageB.\nlet renderCommandB = MTIRenderCommand(kernel: self.kernelB, geometry: self.geometryB, images: [imageB], parameters: [:])\n\n// Create an output descriptor\nlet outputDescriptor = MTIRenderPassOutputDescriptor(dimensions: MTITextureDimensions(width: outputWidth, height: outputHeight, depth: 1), pixelFormat: .bgra8Unorm, loadAction: .clear, storeAction: .store)\n\n// Get the output images, the output image count is equal to the output descriptor count.\nlet images = MTIRenderCommand.images(byPerforming: [renderCommandA, renderCommandB], outputDescriptors: [outputDescriptor])\n```\n\nYou can also create multiple output descriptors to output multiple images in one render pass (MRT, See https://en.wikipedia.org/wiki/Multiple_Render_Targets).\n\n### Custom Vertex Data\n\nWhen `MTIVertex` cannot fit your needs, you can implement the `MTIGeometry` protocol to provide your custom vertex data to the command encoder.\n\nUse the `MTIRenderCommand` API to issue draw calls and pass your custom `MTIGeometry`.\n\n### Custom Processing Module\n\nIn rare scenarios, you may want to access the underlying texture directly, use multiple MPS kernels in one render pass, do 3D rendering, or encode the render commands yourself.\n\n`MTIImagePromise` protocol provides direct access to the underlying texture and the render context for a step in MetalPetal.\n\nYou can create new input sources or fully custom processing units by implementing the `MTIImagePromise` protocol. You will need to import an additional module to do so. \n\nObjective-C\n\n```\n@import MetalPetal.Extension;\n```\n\nSwift\n\n```\n// CocoaPods\nimport MetalPetal.Extension\n\n// Swift Package Manager\nimport MetalPetalObjectiveC.Extension\n```\n\nSee the implementation of `MTIComputePipelineKernel`, `MTICLAHELUTRecipe` or `MTIImage` for example.\n\n## Alpha Types\n\nIf an alpha channel is used in an image, there are two common representations that are available: unpremultiplied (straight/unassociated) alpha, and premultiplied (associated) alpha.\n\nWith unpremultiplied alpha, the RGB components represent the color of the pixel, disregarding its opacity.\n\nWith premultiplied alpha, the RGB components represent the color of the pixel, adjusted for its opacity by multiplication.\n\nMetalPetal handles alpha type explicitly. You are responsible for providing the correct alpha type during image creation.\n\nThere are three alpha types in MetalPetal.\n\n`MTIAlphaType.nonPremultiplied`: the alpha value in the image is not premultiplied.\n\n`MTIAlphaType.premultiplied`: the alpha value in the image is premultiplied.\n\n`MTIAlphaType.alphaIsOne`: there's no alpha channel in the image or the image is opaque.\n\nTypically, `CGImage`, `CVPixelBuffer` and `CIImage` objects have premultiplied alpha channels. `MTIAlphaType.alphaIsOne` is strongly recommended if the image is opaque, e.g. a `CVPixelBuffer` from camera feed, or a `CGImage` loaded from a `jpg` file.\n\nYou can call `unpremultiplyingAlpha()` or `premultiplyingAlpha()` on a `MTIImage` to convert the alpha type of the image.\n\nFor performance reasons, alpha type validation only happens in debug build.\n\n### Alpha Handling of Built-in Filters\n\n- Most of the filters in MetalPetal accept unpremultiplied alpha and opaque images and output unpremultiplied alpha images.\n\n- Filters with `outputAlphaType` property accept inputs of all alpha types. And you can use `outputAlphaType` to specify the alpha type of the output image.\n    \n    e.g. `MTIBlendFilter`, `MTIMultilayerCompositingFilter`, `MTICoreImageUnaryFilter`, `MTIRGBColorSpaceConversionFilter`\n    \n- Filters that do not actually modify colors have passthrough alpha handling rule, that means the alpha types of the output images are the same with the input images.\n\n    e.g. `MTITransformFilter`, `MTICropFilter`, `MTIPixellateFilter`, `MTIBulgeDistortionFilter`\n\nFor more about alpha types and alpha compositing, please refer to [this amazing interactive article](https://ciechanow.ski/alpha-compositing/) by Bartosz Ciechanowski.\n\n## Color Spaces\n\nColor spaces are vital for image processing. The numeric values of the red, green, and blue components have no meaning without a color space.\n\nBefore continuing on how MetalPetal handles color spaces, you may want to know what a color space is and how it affects the representation of color values. There are many articles on the web explaining color spaces, to get started, the suggestion is [Color Spaces - by Bartosz Ciechanowski](https://ciechanow.ski/color-spaces/).\n\nDifferent softwares and frameworks have different ways of handling color spaces. For example, Photoshop has a default sRGB IEC61966-2.1 working color space, while Core Image, by default, uses linear sRGB working color space.\n\nMetal textures do not store any color space information with them. Most of the color space handling in MetalPetal happens during the input (`MTIImage(...)`) and the output (`MTIContext.render...`) of image data.\n\n### Color Spaces for Inputs\n\nSpecifying a color space for an input means that MetalPetal should convert the source color values to the specified color space during the creation of the texture.\n\n- When loading from `URL` or `CGImage`, you can specify which color space you'd like the texture data to be in, using `MTICGImageLoadingOptions`. If you do not specify any options when loading an image, the device RGB color space is used (`MTICGImageLoadingOptions.default`). A `nil` color space disables color matching, this is the equivalent of using the color space of the input image to create `MTICGImageLoadingOptions`. If the model of the specified color space is not RGB, the device RGB color space is used as a fallback.\n\n- When loading from `CIImage`, you can specify which color space you'd like the texture data to be in, using `MTICIImageRenderingOptions`. If you do not specify any options when loading a `CIImage`, the device RGB color space is used (`MTICIImageRenderingOptions.default`). A `nil` color space disables color matching, color values are loaded in the working color space of the `CIContext`.\n\n### Color Spaces for Outputs\n\nWhen specifying a color space for an output, the color space serves more like a tag which is used to communicate with the rest of the system on how to represent the color values in the output. There is no actual color space conversion performed. \n\n- You can specify the color space of an output `CGImage` using `MTIContext.makeCGImage...` or `MTIContext.startTaskTo...` methods with a `colorSpace` parameter.\n\n- You can specify the color space of an output `CIImage` using `MTICIImageCreationOptions`.\n\nMetalPetal assumes that the output color values are in device RGB color space when no output color space is specified.\n\n### Color Spaces for `CVPixelBuffer`\n\nMetalPetal uses `CVMetalTextureCache` and `IOSurface` to directly map `CVPixelBuffer`s to Metal textures. So you cannot specify a color space for loading from or rendering to a `CVPixelBuffer`. However you can specify whether to use a texture with a sRGB pixel format for the mapping.\n\nIn Metal, if the pixel format name has the `_sRGB` suffix, then sRGB gamma compression and decompression are applied during the reading and writing of color values in the pixel. That means a texture with the `_sRGB` pixel format assumes the color values it stores are sRGB gamma corrected, when the color values are read in a shader, sRGB to linear RGB conversions are performed. When the color values are written in a shader, linear RGB to sRGB conversions are performed.\n\n### Color Space Conversions\n\nYou can use `MTIRGBColorSpaceConversionFilter` to perform color space conversions. Color space conversion functions are also available in `MTIShaderLib.h`.\n\n- `metalpetal::sRGBToLinear` (sRGB IEC61966-2.1 to linear sRGB)\n- `metalpetal::linearToSRGB` (linear sRGB to sRGB IEC61966-2.1)\n- `metalpetal::linearToITUR709` (linear sRGB to ITU-R 709)\n- `metalpetal::ITUR709ToLinear` (ITU-R 709 to linear sRGB)\n\n## Extensions\n\n### Working with SceneKit\n\nYou can use `MTISCNSceneRenderer` to generate `MTIImage`s from a `SCNScene`. You may want to handle the SceneKit renderer's linear RGB color space, see issue [#76 The image from SceneKit is darker than normal](https://github.com/MetalPetal/MetalPetal/issues/76).\n\n### Working with SpriteKit\n\nYou can use `MTISKSceneRenderer` to generate `MTIImage`s from a `SKScene`.\n\n### Working with Core Image\n\nYou can create `MTIImage`s from `CIImage`s.\n\nYou can render a `MTIImage` to a `CIImage` using a `MTIContext`.\n\nYou can use a `CIFilter` directly with `MTICoreImageKernel` or the `MTICoreImageUnaryFilter` class. (Swift Only)\n\n### Working with JavaScript\n\nSee [MetalPetalJS](https://github.com/MetalPetal/MetalPetalJS)\n\nWith MetalPetalJS you can create render pipelines and filters using JavaScript, making it possible to download your filters/renderers from \"the cloud\".\n\n### Texture Loader\n\nIt is recommended that you use APIs that accept `MTICGImageLoadingOptions` to load `CGImage`s and images from `URL`, instead of using APIs that accept `MTKTextureLoaderOption`.\n\nWhen you use APIs that accept `MTKTextureLoaderOption`, MetalPetal, by default, uses `MTIDefaultTextureLoader` to load `CGImage`s, images from `URL`, and named images. `MTIDefaultTextureLoader` uses `MTKTextureLoader` internally and has some workarounds for `MTKTextureLoader`'s inconsistencies and bugs at a small performance cost. You can also create your own texture loader by implementing the `MTITextureLoader` protocol. Then assign your texture loader class to `MTIContextOptions.textureLoaderClass` when creating a `MTIContext`.\n\n## Install\n\n### CocoaPods\n\nYou can use [CocoaPods](https://cocoapods.org/) to install the latest version.\n\n```\nuse_frameworks!\n\npod 'MetalPetal'\n\n# Required if you are using Swift.\npod 'MetalPetal/Swift'\n\n# Recommended if you'd like to run MetalPetal on Apple silicon Macs.\npod 'MetalPetal/AppleSilicon'\n\n```\n\n#### Sub-pod `Swift`\n\nProvides Swift-specific additions and modifications to the Objective-C APIs to improve their mapping into Swift. Highly recommended if you are using Swift.\n\n#### Sub-pod `AppleSilicon`\n\nProvides the default shader library compiled in Metal Shading Language v2.3 which is required for enabling programmable blending support on Apple silicon Macs.\n\n### Swift Package Manager\n\n[Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)\n\n## iOS Simulator Support\n\nMetalPetal can run on Simulator with Xcode 11+ and macOS 10.15+.\n\n`MetalPerformanceShaders.framework` is not available on Simulator, so filters that rely on `MetalPerformanceShaders`, such as `MTIMPSGaussianBlurFilter`, `MTICLAHEFilter`, do not work.\n\nSimulator supports fewer features or different implementation limits than an actual Apple GPU. See [Developing Metal Apps that Run in Simulator](https://developer.apple.com/documentation/metal/developing_metal_apps_that_run_in_simulator) for detail.\n\n## Quick Look Debug Support\n\nIf you do a Quick Look on a `MTIImage`, it'll show you the image graph that you constructed to produce that image.\n\n![Quick Look Debug Preview](https://user-images.githubusercontent.com/1234944/116965587-c6a0a280-ace0-11eb-8918-2f36d1d6114c.jpg)\n\n## Trivia\n\n[Why Objective-C?](https://github.com/MetalPetal/MetalPetal/issues/52)\n\n## Contribute\n\nThank you for considering contributing to MetalPetal. Please read our [Contributing Guidelines](CONTRIBUTING.md).\n\n## License\n\nMetalPetal is MIT-licensed. [LICENSE](LICENSE)\n\nThe files in the `/MetalPetalExamples` directory are licensed under a separate license. [LICENSE.md](MetalPetalExamples/LICENSE.md)\n\nDocumentation is licensed CC-BY-4.0.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"300E:4F9CC:1720CE:5D8F79:6AB92CC6"},"text_sha256":"216ea495a81a342a1f24aafff94bdbeafd27f5f38e1b8603b21baf733bc91bc9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pqina/vue-filepond","input_row":{"repository":"pqina/vue-filepond","url":"https://github.com/pqina/vue-filepond","name":"vue-filepond","owner":"pqina","description":"🔌 A handy FilePond adapter component for Vue","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2002,"issues":228,"created_at":"2018-03-22T14:28:51Z","updated_at":"2026-09-03T09:41:48Z","first_commit_at":"2018-03-22T14:30:05Z","last_commit_at":"2026-07-13T11:37:56Z","activity_months":99.700000000000003,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:41.125Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pqina/vue-filepond","visibility":"public","created_at":"2018-03-22T14:28:51Z","updated_at":"2026-09-03T09:41:48Z","private":false,"fork":false,"archived":false,"stargazers_count":2002,"open_issues_count":48,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1733","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F3:77994:17FDA27:1C24CED:6AB92CC9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1732","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:1823666:1C4A671:6AB92CC9"},"commit":{"sha":"03296dd1789bbdd19165ca4103f1c46bdf64ed07","url":"https://github.com/pqina/vue-filepond/commit/03296dd1789bbdd19165ca4103f1c46bdf64ed07","date":"2018-05-16T18:12:56Z","author_date":"2018-05-16T18:12:56Z","committer_date":"2018-05-16T18:12:56Z","tree_sha":"29bc6e9f3efa8ec1dcc389e7312dbb5212702eac","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1731","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17DD8C8:1C048C2:6AB92CC9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2278,"blob_sha":"b1fc54e2e8ddecf8e9a527abab7f931541d52471","priority":0}],"documents":[{"path":"README.md","size":2278,"blob_sha":"b1fc54e2e8ddecf8e9a527abab7f931541d52471","priority":0,"status":200,"text":"# Vue FilePond\n\nVue FilePond is a handy adapter component for [FilePond](https://github.com/pqina/filepond), a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/vue-filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/vue-filepond.svg)](https://www.npmjs.com/package/vue-filepond)\n[![Donate with PayPal](https://img.shields.io/badge/donate-PayPal.me-pink.svg)](https://www.paypal.me/rikschennink/10)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif?raw=true\" width=\"370\" alt=\"\"/>\n\nInstallation:\n\n```bash\nnpm install vue-filepond --save\n```\n\nFor browser:\n\n```html\n<script src=\"https://unpkg.com/vue-filepond\"><\/script>\n```\n\nUsage:\n\n```vue\n<template>\n  <div id=\"app\">\n\n    <file-pond\n        name=\"test\"\n        ref=\"pond\"\n        label-idle=\"Drop files here...\"\n        allow-multiple=\"true\"\n        accepted-file-types=\"image/jpeg, image/png\"\n        server=\"/api\"\n        v-bind:files=\"myFiles\"\n        v-on:init=\"handleFilePondInit\"/>\n\n  <\/div>\n<\/template>\n\n<script>\n// Import Vue FilePond\nimport vueFilePond from 'vue-filepond';\n\n// Import FilePond styles\nimport 'filepond/dist/filepond.min.css';\n\n// Import image preview plugin styles\nimport 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css';\n\n// Import image preview and file type validation plugins\nimport FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';\nimport FilePondPluginImagePreview from 'filepond-plugin-image-preview';\n\n// Create component\nconst FilePond = vueFilePond(FilePondPluginFileValidateType, FilePondPluginImagePreview);\n\nexport default {\n    name: 'app',\n    data: function() {\n        return { myFiles: ['cat.jpeg'] };\n    },\n    methods: {\n        handleFilePondInit: function() {\n            console.log('FilePond has initialized');\n\n            // FilePond instance methods are available on `this.$refs.pond`\n        }\n    },\n    components: {\n        FilePond\n    }\n};\n<\/script>\n```\n\n[Read the docs for more information](https://pqina.nl/filepond/docs/patterns/frameworks/vue/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:179412:563986:6AB92CC9"},"text_sha256":"dc30d75aff221810a2d897c5a4af6534c151d34fc6000b045bf48f4265ea16ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1730","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:D9ABEE:FFCBB7:6AB92CCA"},"commit":{"sha":"b491b6d90df46b41a9468684d67521cd11565490","url":"https://github.com/pqina/vue-filepond/commit/b491b6d90df46b41a9468684d67521cd11565490","date":"2026-05-11T07:16:52Z","author_date":"2026-05-11T07:16:52Z","committer_date":"2026-05-11T07:16:52Z","tree_sha":"e56795c37b88a0aff3d582564d5c864adafd6707","message_first_line":"Merge commit '785c63c56a54ec487356436db4279f748892cfdb'"},"tree_request_status":200,"tree_rate":{"github_remaining":"1729","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0926:74181:179715F:1BBE599:6AB92CCA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5245,"blob_sha":"b70fce0c57faa86e64c51e62b97957ed62bb7227","priority":0}],"documents":[{"path":"README.md","size":5245,"blob_sha":"b70fce0c57faa86e64c51e62b97957ed62bb7227","priority":0,"status":200,"text":"# Vue FilePond\n\nVue FilePond is a handy adapter component for [FilePond](https://github.com/pqina/filepond), a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n**If you want to use Vue FilePond with Vue 2, please use v6 of this plugin.**\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/vue-filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/vue-filepond.svg)](https://www.npmjs.com/package/vue-filepond)\n![npm](https://img.shields.io/npm/dt/vue-filepond)\n[![Discord](https://img.shields.io/discord/1422126182924554291?label=discord)](https://discord.gg/KTyymsrTrX)\n\n[Documentation](https://pqina.nl/filepond/docs) • [Discord](https://discord.gg/KTyymsrTrX) • [Example project](https://stackblitz.com/github/pqina/pintura-example-vue-3?file=src%2FExampleFilePond.vue)\n\n---\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/header.svg\" alt=\"FilePond\"/>](https://www.buymeacoffee.com/rikschennink/)\n\n[Buy me a Coffee](https://www.buymeacoffee.com/rikschennink/) • [Use FilePond with Pintura](https://pqina.nl/pintura/?ref=github-filepond) • [Dev updates](https://rik.schenn.ink/)\n\n---\n\n\n### Core Features\n\n- Accepts **directories**, **files**, blobs, local URLs, **remote URLs** and Data URIs.\n- **Drop files**, select on filesystem, **copy and paste files**, or add files using the API.\n- **Async uploading** with AJAX, or encode files as base64 data and send along form post.\n- **Accessible**, tested with AT software like VoiceOver and JAWS, **navigable by Keyboard**.\n- **Image optimization**, automatic image resizing, **cropping**, and **fixes EXIF orientation**.\n- **Responsive**, automatically scales to available space, is functional on both **mobile and desktop devices**.\n\n[Learn more about FilePond](https://pqina.nl/filepond/)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif?raw=true\" width=\"370\" alt=\"\"/>\n\n---\n\n### Also need Image Editing?\n\n**Pintura the modern JavaScript Image Editor** is what you're looking for. Pintura supports setting **crop aspect ratios**, **resizing**, **rotating**, **cropping**, and **flipping** images. Above all, it integrates beautifully with FilePond.\n\n[Learn more about Pintura](https://pqina.nl/pintura/?ref=github-vue-filepond)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond_pintura.gif?raw=true\" width=\"600\" alt=\"\"/>\n\n---\n\nInstallation:\n\n**If you're using Vue 2 please run `npm install vue-filepond@^6.0.0`**\n\n```bash\nnpm install vue-filepond filepond\n```\n\nUsage:\n\n```vue\n<template>\n  <div id=\"app\">\n    <file-pond\n      name=\"test\"\n      ref=\"pond\"\n      label-idle=\"Drop files here...\"\n      v-bind:allow-multiple=\"true\"\n      accepted-file-types=\"image/jpeg, image/png\"\n      server=\"/api\"\n      v-bind:files=\"myFiles\"\n      v-on:init=\"handleFilePondInit\"\n    />\n  <\/div>\n<\/template>\n\n<script>\n// Import Vue FilePond\nimport vueFilePond from \"vue-filepond\";\n\n// Import FilePond styles\nimport \"filepond/dist/filepond.min.css\";\n\n// Import FilePond plugins\n// Please note that you need to install these plugins separately\n\n// Import image preview plugin styles\nimport \"filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css\";\n\n// Import image preview and file type validation plugins\nimport FilePondPluginFileValidateType from \"filepond-plugin-file-validate-type\";\nimport FilePondPluginImagePreview from \"filepond-plugin-image-preview\";\n\n// Create component\nconst FilePond = vueFilePond(\n  FilePondPluginFileValidateType,\n  FilePondPluginImagePreview\n);\n\nexport default {\n  name: \"app\",\n  data: function () {\n    return { myFiles: [\"cat.jpeg\"] };\n  },\n  methods: {\n    handleFilePondInit: function () {\n      console.log(\"FilePond has initialized\");\n\n      // FilePond instance methods are available on `this.$refs.pond`\n    },\n  },\n  components: {\n    FilePond,\n  },\n};\n<\/script>\n```\n\nWhen using FilePond with an SSR configuration like Nuxt.js it's best to wrap it in `<no-ssr>` tags.\n\n```vue\n<template>\n  <no-ssr>\n    <file-pond />\n  <\/no-ssr>\n<\/template>\n```\n\nUsage in the browser:\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Vue in Browser<\/title>\n\n    <link\n      rel=\"stylesheet\"\n      href=\"https://unpkg.com/filepond/dist/filepond.min.css\"\n    />\n    <link\n      rel=\"stylesheet\"\n      href=\"https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css\"\n    />\n  <\/head>\n  <body>\n    <div id=\"app\">\n      <file-pond><\/file-pond>\n    <\/div>\n\n    <script src=\"https://unpkg.com/filepond-plugin-image-preview\"><\/script>\n    <script src=\"https://unpkg.com/filepond\"><\/script>\n    <script src=\"https://unpkg.com/vue\"><\/script>\n    <script src=\"https://unpkg.com/vue-filepond@6\"><\/script>\n\n    <script>\n      new Vue({\n        el: \"#app\",\n        components: {\n          FilePond: vueFilePond.default(FilePondPluginImagePreview),\n        },\n      });\n    <\/script>\n  <\/body>\n<\/html>\n```\n\n[Read the docs for more information](https://pqina.nl/filepond/docs/patterns/frameworks/vue/)\n\n[Live Demo with Code Sandbox](https://codesandbox.io/s/p3v8zoprp7)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"85EE:24970A:185C1F:5ECB5E:6AB92CCB"},"text_sha256":"e3fa97f70a919e373dd05d4494b6fd6497a879122ae153b5d56bc6ab9c4ccc92"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pqina/react-filepond","input_row":{"repository":"pqina/react-filepond","url":"https://github.com/pqina/react-filepond","name":"react-filepond","owner":"pqina","description":"🔌 A handy FilePond adapter component for React","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1987,"issues":206,"created_at":"2018-03-08T14:52:44Z","updated_at":"2026-09-16T18:58:58Z","first_commit_at":"2018-03-08T14:52:45Z","last_commit_at":"2026-07-13T11:37:47Z","activity_months":100.16,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:43.697Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pqina/react-filepond","visibility":"public","created_at":"2018-03-08T14:52:44Z","updated_at":"2026-09-16T18:58:58Z","private":false,"fork":false,"archived":false,"stargazers_count":1987,"open_issues_count":37,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1728","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:1874D82:1C9C40E:6AB92CCB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1727","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E4:E80A6:17BBC08:1BE3179:6AB92CCC"},"commit":{"sha":"5eca3f424a29ad44967e49eed7876649c333be4f","url":"https://github.com/pqina/react-filepond/commit/5eca3f424a29ad44967e49eed7876649c333be4f","date":"2018-04-27T11:12:21Z","author_date":"2018-04-27T11:12:21Z","committer_date":"2018-04-27T11:12:21Z","tree_sha":"22e5cf02b6b45a3b8941d150220cf6fa45c932e7","message_first_line":"fix problem where files would not be correctly loaded"},"tree_request_status":200,"tree_rate":{"github_remaining":"1726","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:1810E30:1C37AE5:6AB92CCC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2008,"blob_sha":"e86dc5672d4453abf72849f26f56b4ec0f38d8d3","priority":0}],"documents":[{"path":"README.md","size":2008,"blob_sha":"e86dc5672d4453abf72849f26f56b4ec0f38d8d3","priority":0,"status":200,"text":"# React FilePond\n\nReact FilePond is a handy wrapper component for [FilePond](https://github.com/pqina/filepond), a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/react-filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/react-filepond.svg)](https://www.npmjs.com/package/react-filepond)\n[![Donate with PayPal](https://img.shields.io/badge/donate-PayPal.me-pink.svg)](https://www.paypal.me/rikschennink/10)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif\" width=\"370\" alt=\"\"/>\n\nInstallation:\n\n```bash\nnpm install react-filepond --save\n```\n\nUsage:\n\n```jsx\n// Import React FilePond\nimport { FilePond, File, registerPlugin } from 'react-filepond';\n\n// Import FilePond styles\nimport 'filepond/dist/filepond.min.css';\n\n// Register the image preview plugin\nimport FilePondImagePreview from 'filepond-plugin-image-preview';\nimport 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';\nregisterPlugin(FilePondImagePreview);\n\n// Our app\nclass App extends Component {\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            files: ['index.html']\n        };\n    }\n\n    render() {\n        return (\n            <div className=\"App\">\n            \n                {/* Pass FilePond properties as attributes */}\n                <FilePond allowMultiple={true} maxFiles={3} server=\"/api\">\n                    \n                    {/* Set current files using the <File/> component */}\n                    {this.state.files.map(file => (\n                        <File key={file} source={file} />\n                    ))}\n                    \n                <\/FilePond>\n            <\/div>\n        );\n    }\n}\n```\n\n[Read the docs for more information](https://pqina.nl/filepond/docs/patterns/frameworks/react/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:1736DC:5DA88E:6AB92CC9"},"text_sha256":"21a38dd1138d25a7b3dd7feddde187f721412c1475c9fda20d90f3ed67612b21"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1725","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:182836B:1C4F6FE:6AB92CCD"},"commit":{"sha":"62bbf0677c66b1b5f6e20038b96e6fb6edb93463","url":"https://github.com/pqina/react-filepond/commit/62bbf0677c66b1b5f6e20038b96e6fb6edb93463","date":"2025-10-06T07:31:17Z","author_date":"2025-10-06T07:31:17Z","committer_date":"2025-10-06T07:31:17Z","tree_sha":"1431f9ecc65ec8a64b4f53ff57f2473e6ae0bd9b","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1724","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0898:7307A:17CCE04:1BF3D47:6AB92CCD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5797,"blob_sha":"56bb778c6043bccaeea154852b4686a54ba5c312","priority":0}],"documents":[{"path":"README.md","size":5797,"blob_sha":"56bb778c6043bccaeea154852b4686a54ba5c312","priority":0,"status":200,"text":"# React FilePond\n\nReact FilePond is a handy wrapper component for [FilePond](https://github.com/pqina/filepond), a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pqina/react-filepond/blob/master/LICENSE)\n[![npm version](https://badge.fury.io/js/react-filepond.svg)](https://www.npmjs.com/package/react-filepond)\n![npm](https://img.shields.io/npm/dt/react-filepond)\n[![Discord](https://img.shields.io/discord/1422126182924554291?label=discord)](https://discord.gg/KTyymsrTrX)\n\n[Documentation](https://pqina.nl/filepond/docs) • [Discord](https://discord.gg/KTyymsrTrX) • [Example project](https://stackblitz.com/github/pqina/pintura-example-react?file=src%2FExampleFilePond.js)\n\n---\n\n[<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/header.svg\" alt=\"FilePond\"/>](https://www.buymeacoffee.com/rikschennink/)\n\n[Buy me a Coffee](https://www.buymeacoffee.com/rikschennink/) • [Use FilePond with Pintura](https://pqina.nl/pintura/?ref=github-filepond) • [Dev updates](https://rik.schenn.ink/)\n\n---\n\n### Core Features\n\n*   Accepts **directories**, **files**, blobs, local URLs, **remote URLs** and Data URIs.\n*   **Drop files**, select on filesystem, **copy and paste files**, or add files using the API.\n*   **Async uploading** with AJAX, or encode files as base64 data and send along form post.\n*   **Accessible**, tested with AT software like VoiceOver and JAWS, **navigable by Keyboard**.\n*   **Image optimization**, automatic image resizing, **cropping**, and **fixes EXIF orientation**.\n*   **Responsive**, automatically scales to available space, is functional on both **mobile and desktop devices**.\n\n[Learn more about FilePond](https://pqina.nl/filepond/)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond-animation-01.gif\" width=\"370\" alt=\"\"/>\n\n\n---\n\n### Also need Image Editing?\n\n**Pintura the modern JavaScript Image Editor** is what you're looking for. Pintura supports setting **crop aspect ratios**, **resizing**, **rotating**, **cropping**, and **flipping** images. Above all, it integrates beautifully with FilePond.\n\n[Learn more about Pintura](https://pqina.nl/pintura/?ref=github-react-filepond)\n\n<img src=\"https://github.com/pqina/filepond-github-assets/blob/master/filepond_pintura.gif?raw=true\" width=\"600\" alt=\"\"/>\n\n---\n\n\n## Installation\n\n```bash\nnpm install react-filepond filepond --save\n```\n\nHooks:\n\n```jsx\nimport React, { useState } from 'react'\nimport ReactDOM from 'react-dom'\n\n// Import React FilePond\nimport { FilePond, registerPlugin } from 'react-filepond'\n\n// Import FilePond styles\nimport 'filepond/dist/filepond.min.css'\n\n// Import the Image EXIF Orientation and Image Preview plugins\n// Note: These need to be installed separately\n// `npm i filepond-plugin-image-preview filepond-plugin-image-exif-orientation --save`\nimport FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation'\nimport FilePondPluginImagePreview from 'filepond-plugin-image-preview'\nimport 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css'\n\n// Register the plugins\nregisterPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview)\n\n// Our app\nfunction App() {\n  const [files, setFiles] = useState([])\n  return (\n    <div className=\"App\">\n      <FilePond\n        files={files}\n        onupdatefiles={setFiles}\n        allowMultiple={true}\n        maxFiles={3}\n        server=\"/api\"\n        name=\"files\" /* sets the file input name, it's filepond by default */\n        labelIdle='Drag & Drop your files or <span class=\"filepond--label-action\">Browse<\/span>'\n      />\n    <\/div>\n  )\n}\n```\n\n\nComponent:\n\n```jsx\nimport React, { useState } from 'react'\nimport ReactDOM from 'react-dom'\n\n// Import React FilePond\nimport { FilePond, registerPlugin } from \"react-filepond\";\n\n// Import FilePond styles\nimport \"filepond/dist/filepond.min.css\";\n\n// Import the Image EXIF Orientation and Image Preview plugins\n// Note: These need to be installed separately\nimport FilePondPluginImageExifOrientation from \"filepond-plugin-image-exif-orientation\";\nimport FilePondPluginImagePreview from \"filepond-plugin-image-preview\";\nimport \"filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css\";\n\n// Register the plugins\nregisterPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview);\n\n// Our app\nclass App extends Component {\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      // Set initial files, type 'local' means this is a file\n      // that has already been uploaded to the server (see docs)\n      files: [\n        {\n          source: \"index.html\",\n          options: {\n            type: \"local\"\n          }\n        }\n      ]\n    };\n  }\n\n  handleInit() {\n    console.log(\"FilePond instance has initialised\", this.pond);\n  }\n\n  render() {\n    return (\n      <div className=\"App\">\n        <FilePond\n          ref={ref => (this.pond = ref)}\n          files={this.state.files}\n          allowMultiple={true}\n          allowReorder={true}\n          maxFiles={3}\n          server=\"/api\"\n          name=\"files\" /* sets the file input name, it's filepond by default */\n          oninit={() => this.handleInit()}\n          onupdatefiles={fileItems => {\n            // Set currently active file objects to this.state\n            this.setState({\n              files: fileItems.map(fileItem => fileItem.file)\n            });\n          }}\n        />\n      <\/div>\n    );\n  }\n}\n\n```\n\n[Read the docs for more information](https://pqina.nl/filepond/docs/patterns/frameworks/react/)\n\n[Live Demo on Code Sandbox](https://codesandbox.io/s/react-filepond-live-demo-iw9ri)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AFFE:376DE:181B12:5E8E3D:6AB92CC6"},"text_sha256":"0efe1457b406ab3736b627997adba960238723d8c86093e2c8fe5a07180ff016"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wysaid/android-gpuimage-plus","input_row":{"repository":"wysaid/android-gpuimage-plus","url":"https://github.com/wysaid/android-gpuimage-plus","name":"android-gpuimage-plus","owner":"wysaid","description":"Android Image & Camera Filters Based on OpenGL. ","language":"C","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1932,"issues":520,"created_at":"2015-11-20T07:47:36Z","updated_at":"2026-09-27T01:50:50Z","first_commit_at":"2015-07-03T06:54:16Z","last_commit_at":"2026-07-28T15:30:51Z","activity_months":132.83000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:46.175Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wysaid/android-gpuimage-plus","visibility":"public","created_at":"2015-11-20T07:47:36Z","updated_at":"2026-09-27T01:50:50Z","private":false,"fork":false,"archived":false,"stargazers_count":1932,"open_issues_count":126,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1723","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D5:1DB627:1885632:1CACD95:6AB92CCE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1722","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0817:754BF:17E14E8:1C08984:6AB92CCE"},"commit":{"sha":"fdd5567ed19198ffa36bcfab2fc21d3625b6ca83","url":"https://github.com/wysaid/android-gpuimage-plus/commit/fdd5567ed19198ffa36bcfab2fc21d3625b6ca83","date":"2018-04-23T07:22:52Z","author_date":"2018-04-23T07:22:52Z","committer_date":"2018-04-23T07:22:52Z","tree_sha":"7e0038bc980c7ad8032d430a2099227f9b61ea64","message_first_line":"Merge branch 'master' of https://github.com/wysaid/android-gpuimage-plus"},"tree_request_status":200,"tree_rate":{"github_remaining":"1721","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:1822841:1C49D92:6AB92CCE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7351,"blob_sha":"d70debe409d2a201d90e3ba61dc8efaebf1e85ab","priority":0}],"documents":[{"path":"README.md","size":7351,"blob_sha":"d70debe409d2a201d90e3ba61dc8efaebf1e85ab","priority":0,"status":200,"text":"# Android-GPUImage-Plus\nImage, Camera And Video Filters Based On OpenGL (ES2.0).\n\n>To get pure lib without ffmpeg(No feature of video recording), please checkout the branch [min](https://github.com/wysaid/android-gpuimage-plus/tree/min). The whole jni module will be less than 600KB.\n\n## Gradle dependency ##\n\n```\nrepositories {\n    jcenter()\n}\n\n//Choose only one of them\ndependencies {\n    //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86\n    compile 'org.wysaid:gpuimage-plus:2.4.10'\n    \n    //Only armeabi-v7a \n    compile 'org.wysaid:gpuimage-plus:2.4.10-armv7a' //Recommended\n\n    //Pure graphics lib without ffmpeg. (all arch for branch 'min')\n    compile 'org.wysaid:gpuimage-plus:2.4.6-min'\n\n    //Pure graphics lib without ffmpeg. (arch armv7a for branch 'min')\n    compile 'org.wysaid:gpuimage-plus:2.4.6-min-armv7a' //Recommended\n}\n```\n\n## Abstract ##\n\n*  This repo is an Android Studio Project, comprising \"cgeDemo\", \"library\" two sub-modules. Hundreds of built-in filters are available in the demo. 😋If you'd like to add your own filter, please take a look at the manual page. Or you can follow the demo code. The new custom filter should be written in C++.\n\n* Demo and Library will be updated as needed. Welcome for your questions or PR.\n\n* To build with the jni part, pleasae try:\n```\nexport NDK=path/of/your/ndk\ncd folder/of/jni (android-gpuimage-plus/library/src/main/jni)\n\n#This will make all arch: armeabi, armeabi-v7a arm64-v8a, x86, mips\n./buildJNI\n#Or use \"sh buildJNI\"\n\n#Try this if you failed to run the shell above\nexport CGE_USE_VIDEO_MODULE=1\n$NDK/ndk-build\n\n#If you don't want anything except the image filter,\n#Do as below to build with only cge module\n#No ffmpeg, opencv or faceTracker.\n#And remove the loading part of ffmpeg&facetracker\n$NDK/ndk-build\n\n#For Window user, you should include the `.cmd` extension to `ndk-build` like this:\ncd your_path_to\\android-gpuimage-plus-master\\library\\src\\main\\jni\nyour_path_to_ndk\\ndk-bundle\\ndk-build.cmd\n\n#Also remember to comment out these line in NativeLibraryLoader\n//System.loadLibrary(\"ffmpeg\");\n//CGEFFmpegNativeLibrary.avRegisterAll();\n```\n\n> You can find precompiled libs here: [android-gpuimage-plus-libs](https://github.com/wysaid/android-gpuimage-plus-libs) (The precompiled '.so' files are generated with NDK-r16b)\n\nNote that the generated file \"libFaceTracker.so\" is not necessary. So just remove this file if you don't want any feature of it.\n\n* iOS version: [https://github.com/wysaid/ios-gpuimage-plus](https://github.com/wysaid/ios-gpuimage-plus \"http://wysaid.org\")\n\n## Manual ##\n\n### 1. Usage ###\n\n___Sample Code for doing a filter with Bitmap___\n```\n//Simply apply a filter to a Bitmap.\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n\n    Bitmap srcImage = ...;\n\n    //HSL Adjust (hue: 0.02, saturation: -0.31, luminance: -0.17)\n    //Please see the manual for more details.\n    String ruleString = \"@adjust hsl 0.02 -0.31 -0.17\";\n\n    Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(src, ruleString, 1.0f);\n\n    //Then the dstImage is applied with the filter.\n    //It's so convenient, isn't it?\n\n    //Save the result image to /sdcard/libCGE/rec_???.jpg.\n    ImageUtil.saveBitmap(dstImage);\n}\n```\n\n### 2. Custom Shader Filter ###\n\n#### 2.1 Write your own filter ####\n>Your filter must inherit [CGEImageFilterInterfaceAbstract](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/include/cgeImageFilter.h#L42) or its child class. Most of the filters are inherited from [CGEImageFilterInterface](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/include/cgeImageFilter.h#L57) because it has many useful functions.\n\n```\n// A simple customized filter to do a color reversal.\nclass MyCustomFilter : public CGE::CGEImageFilterInterface\n{\npublic:\n    \n    bool init()\n    {\n        CGEConstString fragmentShaderString = CGE_SHADER_STRING_PRECISION_H\n        (\n        varying vec2 textureCoordinate;  //defined in 'g_vshDefaultWithoutTexCoord'\n        uniform sampler2D inputImageTexture; // the same to above.\n\n        void main()\n        {\n            vec4 src = texture2D(inputImageTexture, textureCoordinate);\n            src.rgb = 1.0 - src.rgb;  //Simply reverse all channels.\n            gl_FragColor = src;\n        }\n        );\n\n        //m_program is defined in 'CGEImageFilterInterface'\n        return m_program.initWithShaderStrings(g_vshDefaultWithoutTexCoord, s_fsh);\n    }\n\n    //void render2Texture(CGE::CGEImageHandlerInterface* handler, GLuint srcTexture, GLuint vertexBufferID)\n    //{\n    //  //Your own render functions here.\n    //  //Do not override this function to use the CGEImageFilterInterface's.\n    //}\n};\n```\n\n>Note: To add your own shader filter with c++. [Please see the demo for further details](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/source/customFilter_N.cpp).\n\n#### 2.2 Run your own filter ####\n\n__In C++, you can use a CGEImageHandler to do that:__\n```\n//Assume the gl context already exists:\n//JNIEnv* env = ...;\n//jobject bitmap = ...;\nCGEImageHandlerAndroid handler;\nCustomFilterType* customFilter = new CustomFilterType();\n\n//You should handle the return value (false is returned when failed.)\ncustomFilter->init();\nhandler.initWithBitmap(env, bitmap);\n\n//The customFilter will be released when the handler' destructor is called.\n//So you don't have to call 'delete customFilter' if you add it into the handler.\nhandler.addImageFilter(customFilter);\n\nhandler.processingFilters(); //Run the filters.\n\njobject resultBitmap = handler.getResultBitmap(env);\n```\n\n>If no gl context exists, the class [CGESharedGLContext](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/interface/cgeSharedGLContext.h#L22) may be helpful.\n\n\n__In Java, you can simply follow the sample:__\n\nSee: [CGENativeLibrary.cgeFilterImageWithCustomFilter](https://github.com/wysaid/android-gpuimage-plus/blob/master/cgeDemo/src/main/java/org/wysaid/cgeDemo/TestCaseActivity.java#L123)\n\n__Or to do with a [CGEImageHandler](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/java/org/wysaid/nativePort/CGEImageHandler.java#L93)__\n\n### 3. Filter Rule String ###\n\nEn: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-En](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-En \"http://wysaid.org\")\n\nCh: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule \"http://wysaid.org\")\n\n## Tool ##\n\nSome utils are available for creating filters: [https://github.com/wysaid/cge-tools](https://github.com/wysaid/cge-tools \"http://wysaid.org\")\n\n[![Tool](https://raw.githubusercontent.com/wysaid/cge-tools/master/screenshots/0.jpg \"cge-tool\")](https://github.com/wysaid/cge-tools)\n\n## License ##\n\n[MIT License](https://github.com/wysaid/android-gpuimage-plus/blob/master/LICENSE)\n\n## Donate ##\n\nAlipay:\n\n![Alipay](https://raw.githubusercontent.com/wysaid/android-gpuimage-plus/master/screenshots/alipay.jpg \"alipay\")\n\nPaypal: \n\n[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif \"Paypal\")](http://blog.wysaid.org/p/donate.html)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"80F6:1F1FB6:17E197:5E5313:6AB92CCF"},"text_sha256":"9dc63a3f24a9bea33a3a0be79caf71823907edc97c33e4541074f4a0945f7813"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1720","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088B:14A1F2:18228E5:1C49E4D:6AB92CCF"},"commit":{"sha":"a2807447e12b68ecca8ea085b89b14ef76a75f2c","url":"https://github.com/wysaid/android-gpuimage-plus/commit/a2807447e12b68ecca8ea085b89b14ef76a75f2c","date":"2026-03-11T18:08:02Z","author_date":"2026-03-11T18:08:02Z","committer_date":"2026-03-11T18:08:02Z","tree_sha":"99f74ff923994db870ba0f1c279fdea16a94e126","message_first_line":"fix: resolveAdbTarget returns 1 on CI (no devices), causing set -e to abort publish"},"tree_request_status":200,"tree_rate":{"github_remaining":"1719","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0824:74E6D:18181E2:1C3F9DC:6AB92CD0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6608,"blob_sha":"bddabea82e7f411adf367695486c5052824b1fb6","priority":0}],"documents":[{"path":"README.md","size":6608,"blob_sha":"bddabea82e7f411adf367695486c5052824b1fb6","priority":0,"status":200,"text":"# Android-GPUImage-Plus\n\n[![Contributors](https://img.shields.io/github/contributors/wysaid/android-gpuimage-plus?style=flat-square)](https://github.com/wysaid/android-gpuimage-plus/graphs/contributors)\n[![Pull Requests Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/wysaid/android-gpuimage-plus/pulls)\n\nA C++ & Java library for `Image`/`Camera`/`Video` filters. PRs are welcomed.\n\n## New Features\n\nv3.x adds CameraX support (`CameraXProvider`) and a unified zoom API (`ICameraProvider.setZoomRatio`).\n\n![screenshots](screenshots/6.gif) ![screenshots](screenshots/5.gif)\n\n## Gradle dependency\n\n```gradle\nallprojects {\n    repositories {\n        maven {\n            // Use github hosted maven repo for now.\n            // Repo url: https://github.com/wysaid/android-gpuimage-plus-maven\n            url 'https://maven.wysaid.org/'\n        }\n    }\n}\n\n// Choose only one of them\ndependencies {\n    // Page size: 4KB (default)\n    // Architectures: armeabi-v7a, arm64-v8a, x86, x86_64\n    // Full-featured with FFmpeg bundled\n    implementation 'org.wysaid:gpuimage-plus:3.1.2'\n\n    // Page size: 16KB\n    // Architectures: armeabi-v7a, arm64-v8a, x86, x86_64\n    // Full-featured with FFmpeg bundled\n    implementation 'org.wysaid:gpuimage-plus:3.1.2-16k'\n\n    // Page size: 4KB (default)\n    // Architectures: armeabi-v7a, arm64-v8a, x86, x86_64\n    // Image-only version (no video features or FFmpeg)\n    implementation 'org.wysaid:gpuimage-plus:3.1.2-min'\n\n    // Page size: 16KB\n    // Architectures: armeabi-v7a, arm64-v8a, x86, x86_64\n    // Image-only version (no video features or FFmpeg)\n    implementation 'org.wysaid:gpuimage-plus:3.1.2-16k-min'\n}\n```\n\n> To compile other versions of ffmpeg, see: <https://github.com/wysaid/FFmpeg-Android.git>\n\n## Build\n\nQuick start with Android Studio:\n\n1. Add `usingCMakeCompile=true` to `local.properties`\n2. Open the project in Android Studio\n3. Wait for NDK/CMake initialization\n4. Build and run\n\nFor detailed build instructions, configuration options, and alternative build methods (VS Code, command line, ndk-build), see [docs/build.md](docs/build.md).\n\n> Precompiled libraries: [android-gpuimage-plus-libs](https://github.com/wysaid/android-gpuimage-plus-libs)  \n> iOS version: [ios-gpuimage-plus](https://github.com/wysaid/ios-gpuimage-plus)\n\n## Manual\n\n### 1. Usage\n\nApply a filter with a rule string:\n\n```java\nBitmap srcImage = ...;\n\n// HSL Adjust (hue: 0.02, saturation: -0.31, luminance: -0.17)\nString ruleString = \"@adjust hsl 0.02 -0.31 -0.17\";\n\nBitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(srcImage, ruleString, 1.0f);\n\n// Save result\nImageUtil.saveBitmap(dstImage);\n```\n\n### 2. Custom Shader Filter\n\n#### 2.1 Writing a Filter\n\nCustom filters inherit from [`CGEImageFilterInterface`](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/include/cgeImageFilter.h#L57):\n\n```cpp\n// A simple color reversal filter\nclass MyCustomFilter : public CGE::CGEImageFilterInterface\n{\npublic:\n    bool init()\n    {\n        CGEConstString fragmentShaderString = CGE_SHADER_STRING_PRECISION_H\n        (\n        varying vec2 textureCoordinate;\n        uniform sampler2D inputImageTexture;\n\n        void main()\n        {\n            vec4 src = texture2D(inputImageTexture, textureCoordinate);\n            src.rgb = 1.0 - src.rgb;  // Reverse all channels\n            gl_FragColor = src;\n        }\n        );\n\n        return m_program.initWithShaderStrings(g_vshDefaultWithoutTexCoord, fragmentShaderString);\n    }\n};\n```\n\n> See [customFilter_N.cpp](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/source/customFilter_N.cpp) for a complete example.\n\n#### 2.2 Running a Custom Filter\n\n__In C++:__\n\n```cpp\n// Assumes GL context exists\nCGEImageHandlerAndroid handler;\nauto* customFilter = new MyCustomFilter();\n\ncustomFilter->init();\nhandler.initWithBitmap(env, bitmap);\nhandler.addImageFilter(customFilter);  // Handler takes ownership\n\nhandler.processingFilters();\njobject resultBitmap = handler.getResultBitmap(env);\n```\n\n> If no GL context exists, use [`CGESharedGLContext`](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/jni/interface/cgeSharedGLContext.h#L22).\n\n__In Java:__\n\nUse [`CGENativeLibrary.cgeFilterImageWithCustomFilter`](https://github.com/wysaid/android-gpuimage-plus/blob/master/cgeDemo/src/main/java/org/wysaid/cgeDemo/TestCaseActivity.java#L123) or [`CGEImageHandler`](https://github.com/wysaid/android-gpuimage-plus/blob/master/library/src/main/java/org/wysaid/nativePort/CGEImageHandler.java#L93) directly.\n\n### 3. Filter Rule Strings\n\nFilter effects are defined by text-based rule strings. See [docs/filter-rules.md](docs/filter-rules.md) for complete syntax reference.\n\nQuick example:\n\n```java\n// Chain multiple filters with @ separator\nString filter = \"@curve RGB (0,0) (128,150) (255,255) \" +\n                \"@adjust hsl 0.02 -0.31 -0.17 \" +\n                \"@blend overlay texture.jpg 80\";\n```\n\n### 4. Key Classes & Threading\n\n| Class | Purpose |\n|-------|---------|\n| `CGENativeLibrary` | Main entry — static filter methods |\n| `CGEImageHandler` | Image handler wrapper |\n| `CGEFrameRenderer` | Real-time camera/video renderer |\n| `CGEFrameRecorder` | Video recording (requires FFmpeg) |\n\n**Important**: GL operations must run on the GL thread:\n\n```java\nglSurfaceView.queueEvent(() -> {\n    // Your GL operations here\n});\n```\n\n### Documentation\n\n- [docs/build.md](docs/build.md) — Full build guide and configuration options\n- [docs/filter-rules.md](docs/filter-rules.md) — Complete filter syntax reference\n- [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) — Contributing guidelines\n- [.github/RELEASE.md](.github/RELEASE.md) — Release process\n\n## Tool\n\n[CGE-Tools](https://github.com/wysaid/cge-tools) — open-source desktop companion for creating and previewing CGE filter rules (macOS / Linux / Windows). Latest release: [v2.0.0](https://github.com/wysaid/cge-tools/releases/tag/v2.0.0).\n\n[![Tool](https://raw.githubusercontent.com/wysaid/cge-tools/master/screenshots/0.jpg \"cge-tool\")](https://github.com/wysaid/cge-tools/releases/tag/v2.0.0)\n\n## Contributors\n\nThis project is built with help from the open-source community. Contributions of code, documentation, tests, bug reports, and reviews are all welcome.\n\n[![Contributors](https://contrib.rocks/image?repo=wysaid/android-gpuimage-plus)](https://github.com/wysaid/android-gpuimage-plus/graphs/contributors)\n\n## License\n\n[MIT License](https://github.com/wysaid/android-gpuimage-plus/blob/master/LICENSE)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59D2:09ED:E6674:3F9236:6AB92CCE"},"text_sha256":"54dcf3f2ef136ac24531d22299708e333bfe51af6bbc700779f0f9e8e8c29de7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"AcademySoftwareFoundation/openexr","input_row":{"repository":"AcademySoftwareFoundation/openexr","url":"https://github.com/AcademySoftwareFoundation/openexr","name":"openexr","owner":"AcademySoftwareFoundation","description":"The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.","language":"C","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":1856,"issues":718,"created_at":"2012-02-24T06:30:00Z","updated_at":"2026-09-26T16:51:38Z","first_commit_at":"2003-01-21T06:34:28Z","last_commit_at":"2026-09-26T04:54:10Z","activity_months":284.13,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:49.195Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"AcademySoftwareFoundation/openexr","visibility":"public","created_at":"2012-02-24T06:30:00Z","updated_at":"2026-09-26T16:51:38Z","private":false,"fork":false,"archived":false,"stargazers_count":1856,"open_issues_count":81,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1718","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078B:E80A6:17BBF72:1BE359F:6AB92CD1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1717","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:17BF254:1BE65DF:6AB92CD1"},"commit":{"sha":"165dceaeee86e0f8ce1ed1db3e3030c609a49f17","url":"https://github.com/AcademySoftwareFoundation/openexr/commit/165dceaeee86e0f8ce1ed1db3e3030c609a49f17","date":"2017-11-17T23:39:35Z","author_date":"2017-11-17T23:31:37Z","committer_date":"2017-11-17T23:39:35Z","tree_sha":"9518d41d2fe6e2a55f2cdbc05f10ab035c607cbd","message_first_line":"Updated list of EXTRA_DIST files to reflect the updated test images and prior removal of README.win32"},"tree_request_status":200,"tree_rate":{"github_remaining":"1716","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A4:1C46F8:17D7F43:1BFE8C3:6AB92CD2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2664,"blob_sha":"ed0678da244c2cc2f046db2dd1b0add48ab10202","priority":0}],"documents":[{"path":"README.md","size":2664,"blob_sha":"ed0678da244c2cc2f046db2dd1b0add48ab10202","priority":0,"status":200,"text":"# OpenEXR\n\n\n**OpenEXR** is a high dynamic-range (HDR) image file format developed by\nIndustrial Light & Magic (ILM) for use in computer imaging applications.\nILM subsequently released the source code and adjoining material as open source software.\n\nThe distribution has evolved to include support for stereoscopic and deep\nimages.  Weta Digital, Disney, Sony Pictures Imageworks, Pixar, DreamWorks\nAnimation and other studios have made contributions to the code base.\nThe file format has seen wide adoption in a number of industries.\n\nThe library, including all contributions, is released under the modified BSD license. \n\nOpenEXR's features include:\n\n* Higher dynamic range and color precision than existing 8- and 10-bit\n  image file formats.\n* Support for 16-bit floating-point, 32-bit floating-point, and\n  32-bit integer pixels. The 16-bit floating-point format, called \"half\",\n  is compatible with the half data type in NVIDIA's Cg graphics language\n  and is supported natively on their GPUs.\n* Multiple image compression algorithms, both lossless and lossy. Some of\n  the included codecs can achieve 2:1 lossless compression ratios on images\n  with film grain.  The lossy codecs have been tuned for visual quality and\n  decoding performance.\n* Extensibility. New compression codecs and image types can easily be added\n  by extending the C++ classes included in the OpenEXR software distribution.\n  New image attributes (strings, vectors, integers, etc.) can be added to\n  OpenEXR image headers without affecting backward compatibility with\n  existing OpenEXR applications. \n* Support for sterescopic image workflows and a generalization\n  to multi-views.\n\n## Added Feature highlights for v2 release\n\n* Flexible support for deep data: pixels can store a variable-length list\n  of samples and, thus, it is possible to store multiple values at different\n  depths for each pixel. Hard surfaces and volumetric data representations\n  are accomodated.\n* Multipart: ability to encode separate, but related, images in one file.\n  This allows for access to individual parts without the need to read other\n  parts in the file.\n* Versioning: OpenEXR source allows for user configurable C++\n  namespaces to provide protection when using multiple versions of the\n  library in the same process space.\n      \n## Sub-modules\nThe distribution is divided into the following sub-modules:\n\n* IlmBase\n* OpenEXR\n* OpenEXR_Viewers\n* PyIlmBase\n* Contrib\n    \nPlease see the README files of each of the individual directories for more information.\n\nA collection of OpenEXR images is available from the adjacent repository\n[openexr-images](https://github.com/openexr/openexr-images).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0A22:2B291E:184DCD:5EC0AA:6AB92CD2"},"text_sha256":"cf3d4c0d28fb31dd73090c32bcf912838b98f7ae45150ea40a7a4b412e026ffb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1715","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:17EEE58:1C16718:6AB92CD2"},"commit":{"sha":"96fc617cf222b705df92f242ff56126735ebb1a9","url":"https://github.com/AcademySoftwareFoundation/openexr/commit/96fc617cf222b705df92f242ff56126735ebb1a9","date":"2026-06-29T03:19:26Z","author_date":"2026-06-29T03:19:26Z","committer_date":"2026-06-29T03:19:26Z","tree_sha":"df5ad0964f8195383e36ec476fbb240be07f7c45","message_first_line":"Bump rules_cc from 0.2.19 to 0.2.20 (#2511)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1714","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:1823D33:1C4AE71:6AB92CD3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7235,"blob_sha":"7c9ec6960728c0e7f42d2d48b6a3580b2bd0c948","priority":0},{"path":"SECURITY.md","size":17132,"blob_sha":"06e7a2bfddd8532d1ecdd710067b8aabf79dcc37","priority":1}],"documents":[{"path":"README.md","size":7235,"blob_sha":"7c9ec6960728c0e7f42d2d48b6a3580b2bd0c948","priority":0,"status":200,"text":"<!-- SPDX-License-Identifier: BSD-3-Clause -->\n<!-- Copyright (c) Contributors to the OpenEXR Project -->\n\n[![License](https://img.shields.io/github/license/AcademySoftwareFoundation/openexr)](LICENSE.md)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2799/badge)](https://bestpractices.coreinfrastructure.org/projects/2799)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/AcademySoftwareFoundation/openexr/badge)](https://securityscorecards.dev/viewer/?uri=github.com/AcademySoftwareFoundation/openexr)\n[![Build Status](https://github.com/AcademySoftwareFoundation/openexr/workflows/CI/badge.svg)](https://github.com/AcademySoftwareFoundation/openexr/actions?query=workflow%3ACI)\n[![Analysis Status](https://github.com/AcademySoftwareFoundation/openexr/workflows/Analysis/badge.svg)](https://github.com/AcademySoftwareFoundation/openexr/actions?query=workflow%3AAnalysis)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AcademySoftwareFoundation_openexr&metric=alert_status)](https://sonarcloud.io/dashboard?id=AcademySoftwareFoundation_openexr)\n\n# OpenEXR\n\n<img align=\"right\" src=\"docs/technical/images/windowExample1.png\">\n\nOpenEXR provides the specification and reference implementation of the\nEXR file format, the professional-grade image storage format of the\nmotion picture industry.\n\nThe purpose of EXR format is to accurately and efficiently represent\nhigh-dynamic-range scene-linear image data and associated metadata,\nwith strong support for multi-part, multi-channel use cases.\n\nOpenEXR is widely used in host application software where accuracy is\ncritical, such as photorealistic rendering, texture access, image\ncompositing, deep compositing, and DI.\n\n## OpenEXR Project Mission\n\nThe goal of the OpenEXR project is to keep the EXR format reliable and\nmodern and to maintain its place as the preferred image format for\nentertainment content creation. \n\nMajor revisions are infrequent, and new features will be carefully\nweighed against increased complexity.  The principal priorities of the\nproject are:\n\n* Robustness, reliability, security\n* Backwards compatibility, data longevity\n* Performance - read/write/compression/decompression time\n* Simplicity, ease of use, maintainability\n* Wide adoption, multi-platform support - Linux, Windows, macOS, and others\n\nOpenEXR is intended solely for 2D data. It is not appropriate for\nstorage of volumetric data, cached or lit 3D scenes, or more complex\n3D data such as light fields.\n\nThe goals of the Imath project are simplicity, ease of use,\ncorrectness and verifiability, and breadth of adoption. Imath is not\nintended to be a comprehensive linear algebra or numerical analysis\npackage.\n\n## Project Governance\n\nOpenEXR is a project of the [Academy Software\nFoundation](https://www.aswf.io). See the project's [governance\npolicies](GOVERNANCE.md), [contribution guidelines](CONTRIBUTING.md), and [code of conduct](CODE_OF_CONDUCT)\nfor more information.\n\n# Building OpenEXR\n\nSee the [Install instructions](https://openexr.com/en/latest/install.html) for instructions on how to build\nOpenEXR and its required prerequisites.\n\n# Quick Start\n\nSee the [technical documentation](https://openexr.readthedocs.io) for\ncomplete details, but to get started, the \"Hello, world\" [`exrwriter.cpp`](https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr/main/website/src/exrwriter/exrwriter.cpp) writer program is:\n\n    #include <ImfRgbaFile.h>\n    #include <ImfArray.h>\n    #include <iostream>\n\n    using namespace OPENEXR_IMF_NAMESPACE;\n\n    int\n    main()\n    {\n        int width =  100;\n        int height = 50;\n\n        Array2D<Rgba> pixels(height, width);\n        for (int y=0; y<height; y++)\n        {\n            float c = (y / 5 % 2 == 0) ? (y / (float) height) : 0.0;\n            for (int x=0; x<width; x++)\n                pixels[y][x] = Rgba(c, c, c);\n        }\n\n        try {\n            RgbaOutputFile file (\"stripes.exr\", width, height, WRITE_RGBA);\n            file.setFrameBuffer (&pixels[0][0], 1, width);\n            file.writePixels (height);\n        } catch (const std::exception &e) {\n            std::cerr << \"error writing image file stripes.exr:\" << e.what() << std::endl;\n            return 1;\n        }\n        return 0;\n    }\n\nThis creates an image 100 pixels wide and 50 pixels high with\nhorizontal stripes 5 pixels high of graduated intensity, bright on the\nbottom of the image and dark towards the top. Note that ``pixel[0][0]``\nis in the upper left:\n\n![stripes](website/images/stripes.png)\n\nThe [`CMakeLists.txt`](https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr/main/website/src/exrwriter/CMakeLists.txt) to build:\n\n    cmake_minimum_required(VERSION 3.12)\n    project(exrwriter)\n    find_package(OpenEXR REQUIRED)\n\n    add_executable(${PROJECT_NAME} exrwriter.cpp)\n    target_link_libraries(${PROJECT_NAME} OpenEXR::OpenEXR)\n\nTo build:\n\n    $ cmake -S . -B _build -DCMAKE_PREFIX_PATH=<path to OpenEXR libraries/includes>\n    $ cmake --build _build\n\nFor more details, see [The OpenEXR\nAPI](https://openexr.readthedocs.io/en/latest/API.html#the-openexr-api).\n\n# Community\n\n* **Ask a question:**\n\n  - Email: openexr-dev@lists.aswf.io\n\n  - Slack: [academysoftwarefdn#openexr](https://academysoftwarefdn.slack.com/archives/CMLRW4N73)\n\n* **Attend a meeting:**\n\n  - Technical Steering Committee meetings are open to the\n    public, fortnightly on Thursdays, 1:30pm Pacific Time.\n\n  - Calendar: https://zoom-lfx.platform.linuxfoundation.org/meetings/openexr\n\n  - Meeting Notes: https://wiki.aswf.io/display/OEXR/TSC+Meetings\n\n* **Report a bug:**\n\n  - Submit an Issue: https://github.com/AcademySoftwareFoundation/openexr/issues\n\n* **Report a security vulnerability:**\n\n  - File a GitHub [security\n    advisory](https://github.com/AcademySoftwareFoundation/openexr/security/advisories/new).\n    Email security@openexr.com for private/secure discussion with the project\n    maintainers.\n\n* **Contribute a Fix, Feature, or Improvement:**\n\n  - Read the [Contribution Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md)\n\n  - Sign the [Contributor License\n    Agreement](https://contributor.easycla.lfx.linuxfoundation.org/#/cla/project/2e8710cb-e379-4116-a9ba-964f83618cc5/user/564e571e-12d7-4857-abd4-898939accdd7)\n\n  - Submit a Pull Request: https://github.com/AcademySoftwareFoundation/openexr/pulls\n\n  - If you'd like to contribute and could use some ideas of what to\n    do, browse \"good first issues\" [here](https://github.com/AcademySoftwareFoundation/openexr/contribute) or on [Clotributor](https://clotributor.dev/search?ts_query_web=openexr&page=1).\n\n# Resources\n\n- Website: http://www.openexr.com\n- Technical documentation: https://openexr.readthedocs.io\n- Porting help: [OpenEXR/Imath Version 2.x to 3.x Porting Guide](https://openexr.readthedocs.io/en/latest/PortingGuide.html)\n- Reference images: https://github.com/AcademySoftwareFoundation/openexr-images\n- Security policy: [SECURITY.md](SECURITY.md)\n- Release notes: [CHANGES.md](CHANGES.md)\n- Contributors: [CONTRIBUTORS.md](CONTRIBUTORS.md)  \n\n# License\n\nOpenEXR is licensed under the [BSD-3-Clause license](LICENSE.md).\n\n\n---\n\n![aswf](/ASWF/images/aswf.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AFFE:376DE:181B6A:5E8F2A:6AB92CD3"},"text_sha256":"a37b7f41ec0b30dd135e9dcc3a93125fbbfa3549e027268adcd5526108c293a8"},{"path":"SECURITY.md","size":17132,"blob_sha":"06e7a2bfddd8532d1ecdd710067b8aabf79dcc37","priority":1,"status":200,"text":"<!-- SPDX-License-Identifier: BSD-3-Clause -->\n<!-- Copyright (c) Contributors to the OpenEXR Project -->\n\n# Security Policy\n\n## Reporting a Vulnerability\n\nIf you think you've found a potential vulnerability in OpenEXR, please\nreport it by filing a GitHub [security\nadvisory](https://github.com/AcademySoftwareFoundation/openexr/security/advisories/new). Alternatively,\nemail security@openexr.com and provide your contact info for further\nprivate/secure discussion.  If your email does not receive a prompt\nacknowledgement, your address may be blocked.\n\nOur policy is to acknowledge the receipt of vulnerability reports\nwithin 48 hours. Our policy is to address critical security vulnerabilities\nrapidly and post patches within 14 days if possible.\n\n## CVE Assignment\n\nWe request a CVE when an untrusted party can plausibly trigger the flaw\nthrough normal product inputs (for example, a crafted EXR or other data\nthe application is meant to process); otherwise we treat it as a regular\nbugfix, document it in a GitHub security advisory or release notes when\nhelpful, and do not request a CVE for API-only or caller-controlled\nfailures with no realistic adversarial path.\n\nFlaws whose root cause lies in a bundled dependency (such as OpenJPH)\nare fixed upstream; the upstream project owns the CVE when one is\nwarranted.  Note that this applies even when a flaw is detected in\ndependency code vendored into OpenEXR's `external/` source directory.\nOpenEXR addresses them by updating the dependency and noting the\nupstream advisory in release notes. We request a CVE for OpenEXR\nitself only when the flaw is in our code and untrusted input can reach\nit through normal use of the library.\n\n## Known Vulnerabilities\n\n| CVE | Affected Versions | Patched Versions |\n| --- | ----------------- | ---------------- |\n\n| [CVE-2026-55373](https://www.cve.org/CVERecord?id=CVE-2026-55373) | 2.x, 3.0.x, 3.1.x, 3.2.0–3.2.9, 3.3.0–3.3.11, 3.4.0–3.4.12 | 3.2.10, 3.3.12, 3.4.13 |\n| [CVE-2026-55371](https://www.cve.org/CVERecord?id=CVE-2026-55371) | 3.4.0–3.4.12 | 3.4.13 |\n| [CVE-2026-55059](https://www.cve.org/CVERecord?id=CVE-2026-55059) | 2.x, 3.0.x, 3.1.x, 3.2.0–3.2.9, 3.3.0–3.3.11, 3.4.0–3.4.12 | 3.2.10, 3.3.12, 3.4.13 |\n| [CVE-2026-54920](https://www.cve.org/CVERecord?id=CVE-2026-54920) | 2.x, 3.0.x, 3.1.x, 3.2.0–3.2.9, 3.3.0–3.3.11, 3.4.0–3.4.12 | 3.2.10, 3.3.12, 3.4.13 |\n| [CVE-2026-53532](https://www.cve.org/CVERecord?id=CVE-2026-53532) | 3.4.0–3.4.12 | 3.4.13 |\n| [CVE-2026-45696](https://www.cve.org/CVERecord?id=CVE-2026-45696) | 3.4.0–3.4.11 | 3.4.12 |\n| [CVE-2026-44663](https://www.cve.org/CVERecord?id=CVE-2026-44663) | 3.4.0–3.4.11 | 3.4.12 |\n| [CVE-2026-42217](https://www.cve.org/CVERecord?id=CVE-2026-42217) | 3.2.0–3.2.8, 3.3.0–3.3.10, 3.4.0–3.4.10 | 3.2.9, 3.3.11, 3.4.11 |\n| [CVE-2026-42216](https://www.cve.org/CVERecord?id=CVE-2026-42216) | 3.2.0–3.2.8, 3.3.0–3.3.10, 3.4.0–3.4.10 | 3.2.9, 3.3.11, 3.4.11 |\n| [CVE-2026-41142](https://www.cve.org/CVERecord?id=CVE-2026-41142) | 3.2.0–3.2.8, 3.3.0–3.3.10, 3.4.0–3.4.10 | 3.2.9, 3.3.11, 3.4.11 |\n| [CVE-2026-40250](https://www.cve.org/CVERecord?id=CVE-2026-40250) | 3.2.0–3.2.7, 3.3.0–3.3.9, 3.4.0–3.4.9 | 3.2.8, 3.3.10, 3.4.10 |\n| [CVE-2026-40244](https://www.cve.org/CVERecord?id=CVE-2026-40244) | 3.2.0–3.2.7, 3.3.0–3.3.9, 3.4.0–3.4.9 | 3.2.8, 3.3.10, 3.4.10 |\n| [CVE-2026-39886](https://www.cve.org/CVERecord?id=CVE-2026-39886) | 3.4.0–3.4.9 | 3.4.10 |\n| [CVE-2026-34589](https://www.cve.org/CVERecord?id=CVE-2026-34589) | 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.8 | 3.2.7, 3.3.9, 3.4.9 |\n| [CVE-2026-34588](https://www.cve.org/CVERecord?id=CVE-2026-34588) | 3.1.x, 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.8 | 3.2.7, 3.3.9, 3.4.9 |\n| [CVE-2026-34545](https://www.cve.org/CVERecord?id=CVE-2026-34545) | 3.4.0–3.4.6 | 3.4.7 |\n| [CVE-2026-34544](https://www.cve.org/CVERecord?id=CVE-2026-34544) | 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.7 | 3.2.7, 3.3.9, 3.4.8 |\n| [CVE-2026-34543](https://www.cve.org/CVERecord?id=CVE-2026-34543) | 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.7 | 3.2.7, 3.3.9, 3.4.8 |\n| [CVE-2026-34380](https://www.cve.org/CVERecord?id=CVE-2026-34380) | 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.8 | 3.2.7, 3.3.9, 3.4.9 |\n| [CVE-2026-34379](https://www.cve.org/CVERecord?id=CVE-2026-34379) | 3.2.0–3.2.6, 3.3.0–3.3.8, 3.4.0–3.4.8 | 3.2.7, 3.3.9, 3.4.9 |\n| [CVE-2026-34378](https://www.cve.org/CVERecord?id=CVE-2026-34378) | 3.4.0–3.4.8 | 3.4.9 |\n| [CVE-2026-27622](https://www.cve.org/CVERecord?id=CVE-2026-27622) | 2.x, 3.0.x, 3.1.x, 3.2.0–3.2.5, 3.3.0–3.3.7, 3.4.0–3.4.5 | 3.2.6, 3.3.8, 3.4.6 |\n| [CVE-2026-26981](https://www.cve.org/CVERecord?id=CVE-2026-26981) | 3.3.0–3.3.6, 3.4.0–3.4.4 | 3.3.7, 3.4.5 |\n| [CVE-2025-64183](https://www.cve.org/CVERecord?id=CVE-2025-64183) | 3.2.0–3.2.4, 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.2.5, 3.3.6, 3.4.3 |\n| [CVE-2025-64182](https://www.cve.org/CVERecord?id=CVE-2025-64182) | 3.2.0–3.2.4, 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.2.5, 3.3.6, 3.4.3 |\n| [CVE-2025-64181](https://www.cve.org/CVERecord?id=CVE-2025-64181) | 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.3.6, 3.4.3 |\n| [CVE-2025-48074](https://www.cve.org/CVERecord?id=CVE-2025-48074) | 3.3.2 | 3.3.3 |\n| [CVE-2025-48073](https://www.cve.org/CVERecord?id=CVE-2025-48073) | 3.3.2 | 3.3.3 |\n| [CVE-2025-48072](https://www.cve.org/CVERecord?id=CVE-2025-48072) | 3.3.2 | 3.3.3 |\n| [CVE-2025-48071](https://www.cve.org/CVERecord?id=CVE-2025-48071) | 3.3.0–3.3.2 | 3.3.3 |\n| [CVE-2025-12840](https://www.cve.org/CVERecord?id=CVE-2025-12840) | 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.3.6, 3.4.3 |\n| [CVE-2025-12839](https://www.cve.org/CVERecord?id=CVE-2025-12839) | 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.3.6, 3.4.3 |\n| [CVE-2025-12495](https://www.cve.org/CVERecord?id=CVE-2025-12495) | 3.3.0–3.3.5, 3.4.0–3.4.2 | 3.3.6, 3.4.3 |\n| [CVE-2023-5841](https://nvd.nist.gov/vuln/detail/CVE-2023-5841) | 3.1.0–3.1.11, 3.2.0–3.2.1 | 3.2.2 |\n| [CVE-2021-45942](https://nvd.nist.gov/vuln/detail/CVE-2021-45942) | 3.1.0–3.1.3 | 3.1.4 |\n| [CVE-2021-20296](https://nvd.nist.gov/vuln/detail/CVE-2021-20296) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3479](https://nvd.nist.gov/vuln/detail/CVE-2021-3479) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3478](https://nvd.nist.gov/vuln/detail/CVE-2021-3478) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3477](https://nvd.nist.gov/vuln/detail/CVE-2021-3477) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3476](https://nvd.nist.gov/vuln/detail/CVE-2021-3476) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3475](https://nvd.nist.gov/vuln/detail/CVE-2021-3475) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2021-3474](https://nvd.nist.gov/vuln/detail/CVE-2021-3474) | 2.4.0–2.4.2, 2.5.0–2.5.3 | 2.4.3, 2.5.4 |\n| [CVE-2020-16589](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16589) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0 | 2.4.0 |\n| [CVE-2020-16588](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16588) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0 | 2.4.0 |\n| [CVE-2020-16587](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-16587) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0 | 2.4.0 |\n| [CVE-2020-15306](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15306) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0–2.4.1, 2.5.0–2.5.1 | 2.5.2 |\n| [CVE-2020-15305](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15305) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0–2.4.1, 2.5.0–2.5.1 | 2.5.2 |\n| [CVE-2020-15304](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15304) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0–2.4.1, 2.5.0–2.5.1 | 2.5.2 |\n| [CVE-2020-11765](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11765) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11764](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11764) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11763](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11763) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11762](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11762) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11761](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11761) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11760](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11760) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11759](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11759) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2020-11758](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11758) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0, 2.4.0 | 2.4.1 |\n| [CVE-2018-18444](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18444) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0 | 2.4.0 |\n| [CVE-2018-18443](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18443) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1, 2.3.0 | 2.4.0 |\n| [CVE-2017-9116](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9116) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9115](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9115) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9114](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9114) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9113](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9113) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9112](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9112) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9111](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9111) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-9110](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9110) | 2.0.0–2.0.1, 2.1.0, 2.2.0 | 2.2.1 |\n| [CVE-2017-12596](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12596) | 2.0.0–2.0.1, 2.1.0, 2.2.0–2.2.1 | 2.3.0 |\n| [CVE-2009-1722](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1722) | 1.0.x, 1.1.x, 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x | 1.7.0 |\n| [CVE-2009-1721](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1721) | 1.0.x, 1.1.x, 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x | 1.7.0 |\n| [CVE-2009-1720](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1720) | 1.0.x, 1.1.x, 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x | 1.7.0 |\n\nSee the [release notes](CHANGES.md) for more information.\n\n## Supported Versions\n\nThis gives guidance about which releases/branches are supported with bug fixes and patches to\nsecurity vulnerabilities.\n\n| Version / branch  | Supported                                            |\n|-------| ---------------------------------------------------- |\n| main  | :white_check_mark: :construction: All fixes immediately, although this branch is under development with potential unstable ABI/API\n| 3.4.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility\n| 3.3.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility\n| 3.2.x | :warning: Patch releases considered in response to specific requests\n| 3.1.x | :warning: Patch releases considered in response to specific requests\n| 3.0.x | :warning: Patch releases considered in response to specific requests\n| 2.5.x | :warning: Patch releases considered in response to specific requests\n| 2.4.x | :warning: Patch releases considered in response to specific requests\n| 2.3.x | :x: No longer receiving patches of any kind\n| 2.2.x | :x: No longer receiving patches of any kind\n| 2.1.x | :x: No longer receiving patches of any kind\n| 2.0.x | :x: No longer receiving patches of any kind\n| 1.x   | :x: No longer receiving patches of any kind\n\n## Signed Releases\n\nReleases artifacts are signed via\n[sigstore](https://www.sigstore.dev). See\n[release-sign.yml](.github/workflows/release-sign.yml) for details.\n\nTo verify a downloaded release at a given tag:\n\n    % pip install sigstore\n    % sigstore verify github --cert-identity https://github.com/AcademySoftwareFoundation/openexr/.github/workflows/release-sign.yml@refs/tags/<tag> openexr-<tag>.tar.gz\n\n## Security Expectations\n\n### Software Features\n\n- The OpenEXR project implements the EXR image file format, used\n  throughout the motion picture industry and beyond, on Linux, macOS,\n  and Windows.\n\n- The project consists of a software run-time library, implemented in\n  C/C++ and built via cmake, that reads and writes image data\n  files. The project also distributes python wrappings for the C/C++\n  I/O API.\n\n- The library reads and writes binary image data and text-based\n  metadata, treated as blind data, none of which is executable code.\n\n- Other than the website and online technical documentation, the\n  project implements no web/online services or network communication\n  protocols.  The library never requests any security or\n  authentication credentials or login information from users.\n\n  The website implements no interactive features and requires no login\n  credentials.\n\n- The library reads and writes only to file paths specifically requested\n  via the C/C++ API. The runtime library uses no system configuration\n  files or sidecar data files. Access to data files uses only standard\n  file I/O system calls.\n\n- The library compresses/decompresses data via standard compression\n  algorithms but uses no cryptographic or confidentiality protocols.\n\n### Software Dependencies\n\nOpenEXR depends on\n[Imath](https://github.com/AcademySoftwareFoundation/Imath), a library\nof basic math operations also maintained and distributed by the\nOpenEXR project. Imath follows the same security conventions\ndocumented here for OpenEXR itself. The core Imath library has no\nexternal dependencies. The Imath python bindings depend on python and\nboost.\n\nThe only\nexternal library dependency of OpenEXR is\n[libdeflate](https://github.com/ebiggers/libdeflate), which implements\nstandard deflate/zlib/gzip compression and decompression.\n\nThe project uses\n[Snyk](https://github.com/AcademySoftwareFoundation/openexr/blob/main/.github/workflows/snyk-scan-pr.yml)\nto scan for dependency vulnerability.\n\n### Potential Vulnerabilities\n\nPotential entry points are images being loaded using the\nlibrary. Malformed images could caused issues such as heap buffer\noverflows, out-of-memory faults, or segmentation faults that could be\nexploitable as denial-of-service attacks.\n\n### Image Size Limits and Out-of-Memory Failures\n\nThe OpenEXR file format places no fixed limit on image size, except\nthat image width and height are represented by signed 32-bit integers\nand therefore technically limited to a maximum of 2,147,483,647.\n\nMemory allocation failures caused by large image dimensions declared\nin file headers are not considered security vulnerabilities when the\nallocation size is proportional to the declared image dimensions. EXR\nfiles can legitimately describe very large images, and the memory\nrequired to decode them is inherently proportional to their pixel\ncount. Exhausting available memory on a given machine is a system\nresource constraint, not a library defect — the same file that\ntriggers an out-of-memory error on one machine may load successfully\non another with more memory.\n\nThe OpenEXR library provides \n`Imf::Header::setMaxImageSize(int maxWidth,int maxHeight)` and\n`Imf::Header:\"setMaxTileSize(int maxWidth,int maxHeight)` (and\n`exr_set_default_maximum_image_size()` and\n`exr_set_default_maximum_tile_size()` in OpenEXRCore) to allow\napplications to reject files with dimensions exceeding a configurable\nlimit before any large allocation occurs. Applications processing\nuntrusted EXR files should set these limits to values appropriate for\ntheir deployment environment.\n\n### Hardening\n\n#### Testing\n\nThe OpenEXR project implements a comprehensive suite of validation\ntests, including fuzz testing to harden against malicious input\ndata. Note that fuzz testing hardens only against *small* input data\nfiles and is not a comprehensive test against all potential input.\n\nNote that the\n[exrcheck](https://github.com/AcademySoftwareFoundation/openexr/tree/main/src/bin/exrcheck)\nutility is intended to be used by testers to demonstrate a particular\nproof-of-concept input file exposes a vulnerability, and it is very\nhelpful to let us know if a vulnerability can be reproduced using that\ntool.\n\nThe project also uses the [OSS\nFuzz](https://bugs.chromium.org/p/oss-fuzz) service for continuous\nfuzz testing.\n\n#### Development Cycle and Distribution\n\nOpenEXR is downloadable and buildable by C/C++ source via GitHub. Only\nmembers of the project's Technical Steering Committee, all veteran\nsoftware engineers at major motion picture studios or vendors, have\nwrite permissions on the source code repository. All critical software\nchanges are reviewed by multiple TSC members.\n\nThe library is distributed in binary form via many common package\nmanagers across all platforms.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDF8:3C4A0:17C779:5E3A25:6AB92CD2"},"text_sha256":"2d509599d8d0802418d86e76401dbf25367e66f94bec5c7e7778094e6c42c79c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"davidbyttow/govips","input_row":{"repository":"davidbyttow/govips","url":"https://github.com/davidbyttow/govips","name":"govips","owner":"davidbyttow","description":"A lightning fast image processing and resizing library for Go","language":"Go","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1671,"issues":233,"created_at":"2016-12-25T04:32:56Z","updated_at":"2026-09-25T13:12:37Z","first_commit_at":"2016-12-25T08:18:54Z","last_commit_at":"2026-09-20T17:46:50Z","activity_months":116.83,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:53.023Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"davidbyttow/govips","visibility":"public","created_at":"2016-12-25T04:32:56Z","updated_at":"2026-09-25T13:12:37Z","private":false,"fork":false,"archived":false,"stargazers_count":1671,"open_issues_count":0,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1713","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:1848A1F:1C6FAD0:6AB92CD5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1712","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:17BF12B:1BE64C9:6AB92CD5"},"commit":{"sha":"c4f1dfe8bd64c1fe1a5faeb24dc9f5c6c92976ea","url":"https://github.com/davidbyttow/govips/commit/c4f1dfe8bd64c1fe1a5faeb24dc9f5c6c92976ea","date":"2018-04-03T16:45:44Z","author_date":"2018-04-03T16:45:44Z","committer_date":"2018-04-03T16:45:44Z","tree_sha":"b914990bdc64556892fd286e21a45e634cb9d7f8","message_first_line":"Adds max scale option to prevent over-sizing"},"tree_request_status":200,"tree_rate":{"github_remaining":"1711","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:17FC184:1C23761:6AB92CD5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2282,"blob_sha":"6019026b0cc823d085df89be622162207c9362ea","priority":0}],"documents":[{"path":"README.md","size":2282,"blob_sha":"6019026b0cc823d085df89be622162207c9362ea","priority":0,"status":200,"text":"# govips [![Build Status](https://travis-ci.org/davidbyttow/vips.svg)](https://travis-ci.org/davidbyttow/govips) [![GoDoc](https://godoc.org/github.com/davidbyttow/govips?status.svg)](https://godoc.org/github.com/davidbyttow/govips) [![Go Report Card](http://goreportcard.com/badge/davidbyttow/govips)](http://goreportcard.com/report/davidbyttow/govips) ![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n# A libvips library for Go\nThis package wraps the core functionality of [libvips](https://github.com/jcupitt/libvips) image processing library by exposing all image operations on first-class types in Go. Additionally, it exposes raw access to call operations directly, for forward compatibility.\n\nHow fast is libvips? See this: [Speed and Memory Use](https://github.com/jcupitt/libvips/wiki/Speed-and-memory-use)\n\nThis library was inspired primarily based on the C++ wrapper in libvips.\n\nThe intent for this is to enable developers to build extremely fast image processors in Go, which is suited well for concurrent requests.\n\nLibvips is generally 4-8x faster than other graphics processors such as GraphicsMagick and ImageMagick.\n\n# Supported image operations\nThis library supports all known operations available to libvips found here:\n- [VIPS function list](http://jcupitt.github.io/libvips/API/current/VipsImage.html)\n- [VipsImage](http://jcupitt.github.io/libvips/API/current/VipsImage.html)\n- [VipsOperation](http://jcupitt.github.io/libvips/API/current/VipsOperation.html)\n\n# Requirements\n- [libvips](https://github.com/jcupitt/libvips) 8+ (8.5.8+ recommended for GIF, PDF, SVG support)\n- C compatible compiler such as gcc 4.6+ or clang 3.0+\n- Go 1.9+\n\n# Installation\n```bash\ngo get -u github.com/davidbyttow/govips\n```\n\n# Example usage\n```go\n// Resize an image with padding\nreturn vips.NewPipeline().\n\tLoadFile(inputFile).\n\tPadStrategy(vips.ExtendBlack).\n\tResize(1200, 1200).\n\tOutputFile(outputFile)\n```\n\n# Contributing\nIn short, feel free to file issues or send along pull requests. See this [guide on contributing](https://github.com/davidbyttow/govips/blob/master/CONTRIBUTING.md) for more information.\n\n# Credits\nThank you to [John Cupitt](https://github.com/jcupitt) for maintaining libvips and providing feedback on vips.\n\n# License\nMIT - David Byttow\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"14F4:29FD16:184F21:5EC1B8:6AB92CD5"},"text_sha256":"9d0f4f56dacf790fe36ca5b5dd1a4041b513881fd1de07243dfb29fe6b2c045a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1710","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:1813009:1C3A5AF:6AB92CD6"},"commit":{"sha":"eec4bbd9e550d13bb9f212304394a05d15740237","url":"https://github.com/davidbyttow/govips/commit/eec4bbd9e550d13bb9f212304394a05d15740237","date":"2026-06-07T21:02:48Z","author_date":"2026-06-07T21:02:48Z","committer_date":"2026-06-07T21:02:48Z","tree_sha":"9a92b9594cab24e3c327e0851a3d9023c042ce46","message_first_line":"Add NewImageFromMemory for raw pixel buffers (#528)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1709","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:1796712:1BBC0BE:6AB92CD6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12625,"blob_sha":"5c6576a9ff95e9b1f55409cef694e1b6abd91ff9","priority":0}],"documents":[{"path":"README.md","size":12625,"blob_sha":"5c6576a9ff95e9b1f55409cef694e1b6abd91ff9","priority":0,"status":200,"text":"# <img src=\"https://raw.githubusercontent.com/davidbyttow/govips/master/assets/SVG/govips.svg\" width=\"90\" height=\"90\"> <span style=\"font-size: 4em;\">govips<\/span>\n\n[![GoDoc](https://godoc.org/github.com/davidbyttow/govips?status.svg)](https://pkg.go.dev/mod/github.com/davidbyttow/govips/v2) [![Go Report Card](https://goreportcard.com/badge/github.com/davidbyttow/govips)](https://goreportcard.com/badge/github.com/davidbyttow/govips) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/davidbyttow/govips) ![License](https://img.shields.io/badge/license-MIT-blue.svg) [![Build Status](https://github.com/davidbyttow/govips/workflows/build/badge.svg)](https://github.com/davidbyttow/govips/actions) [![Coverage Status](https://img.shields.io/coveralls/github/davidbyttow/govips)](https://coveralls.io/github/davidbyttow/govips?branch=master)\n\n## A lightning fast image processing and resizing library for Go\n\nThis package wraps the core functionality of [libvips](https://github.com/libvips/libvips) image processing library by exposing all image operations on first-class types in Go.\n\nLibvips is generally 4-8x faster than other graphics processors such as GraphicsMagick and ImageMagick. Check the benchmark: [Speed and Memory Use](https://github.com/libvips/libvips/wiki/Speed-and-memory-use)\n\nThe intent for this is to enable developers to build extremely fast image processors in Go, which is suited well for concurrent requests.\n\n## Project Status\n\ngovips now includes a built-in code generator (`cmd/vipsgen/`) that uses libvips GObject introspection to auto-generate type-safe Go bindings. This covers 193+ operations across 9 categories (arithmetic, colour, conversion, convolution, create, freqfilt, histogram, morphology, resample), while complex operations like image I/O remain as hand-written bindings for full control.\n\n## Requirements\n\n-   [libvips](https://github.com/libvips/libvips) 8.14+\n-   C compatible compiler such as gcc 4.6+ or clang 3.0+\n-   Go 1.23+\n\n## Dependencies\n\n### MacOS\n\nUse [homebrew](https://brew.sh/) to install vips and pkg-config:\n\n```bash\nbrew install vips pkg-config\n```\n\n### Windows\n\nThe recommended approach on Windows is to use Govips via WSL and Ubuntu.\n\nIf you need to run Govips natively on Windows, it's not difficult but will require some effort. We don't have a recommended environment or setup at the moment. Windows is also not in our list of CI/CD targets so Govips is not regularly tested for compatibility. If you would be willing to setup and maintain a robust CI/CD Windows environment, please open a PR, we would be pleased to accept your contribution and support Windows as a platform.\n\n## Installation\n\n```bash\ngo get -u github.com/davidbyttow/govips/v2/vips\n```\n\n### MacOS note\n\nOn MacOS, govips may not compile without first setting an environment variable:\n\n```bash\nexport CGO_CFLAGS_ALLOW=\"-Xpreprocessor\"\n```\n\n## Examples\n\nEvery example below assumes this setup:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/davidbyttow/govips/v2/vips\"\n)\n\nfunc main() {\n\tvips.Startup(nil)\n\tdefer vips.Shutdown()\n\n\t// ... example code goes here\n}\n```\n\n### 1. Load an image and export as JPEG\n\nThe basics: load from a file, auto-rotate based on EXIF data, and write it back out.\n\n```go\nimage, err := vips.NewImageFromFile(\"input.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Fix orientation from EXIF metadata\nif err := image.AutoRotate(); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(vips.NewJpegExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"output.jpg\", buf, 0644)\n```\n\n### 2. Resize an image\n\nScale an image down by 50% using the Lanczos3 kernel (the sharpest option).\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Scale to 50%\nif err := image.Resize(0.5, vips.KernelLanczos3); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(&vips.JpegExportParams{Quality: 85})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"resized.jpg\", buf, 0644)\n```\n\n### 3. Create a thumbnail with smart crop\n\n`NewThumbnailFromFile` is the fastest way to generate thumbnails. It decodes only the pixels it needs.\n\n```go\n// Load and shrink to fit within 200x200, cropping to the most interesting region\nimage, err := vips.NewThumbnailFromFile(\"photo.jpg\", 200, 200, vips.InterestingAttention)\nif err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(&vips.JpegExportParams{Quality: 80})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"thumb.jpg\", buf, 0644)\n```\n\n### 4. Convert between formats\n\nLoad a JPEG and export it as WebP and PNG.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Export as WebP (lossy)\nwebpBuf, _, err := image.ExportWebp(&vips.WebpExportParams{Quality: 75})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"photo.webp\", webpBuf, 0644)\n\n// Export as PNG\npngBuf, _, err := image.ExportPng(&vips.PngExportParams{Compression: 6})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"photo.png\", pngBuf, 0644)\n```\n\n### 5. Crop and extract a region\n\nPull out a specific rectangle from an image.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Extract a 300x300 region starting at (50, 100)\nif err := image.ExtractArea(50, 100, 300, 300); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportPng(vips.NewPngExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"cropped.png\", buf, 0644)\n```\n\n### 6. Blur and sharpen\n\nApply a Gaussian blur or sharpen an image.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Gaussian blur with sigma=3.0\nif err := image.GaussianBlur(3.0); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(vips.NewJpegExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"blurred.jpg\", buf, 0644)\n\n// Or sharpen instead: sigma=1.0, x1=2.0, m2=3.0\nimage2, _ := vips.NewImageFromFile(\"photo.jpg\")\nif err := image2.Sharpen(1.0, 2.0, 3.0); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf2, _, _ := image2.ExportJpeg(vips.NewJpegExportParams())\nos.WriteFile(\"sharpened.jpg\", buf2, 0644)\n```\n\n### 7. Rotate and flip\n\nRotate by fixed angles and flip along an axis.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Rotate 90 degrees clockwise\nif err := image.Rotate(vips.Angle90); err != nil {\n\tlog.Fatal(err)\n}\n\n// Flip horizontally\nif err := image.Flip(vips.DirectionHorizontal); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(vips.NewJpegExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"rotated.jpg\", buf, 0644)\n```\n\n### 8. Adjust brightness, saturation, and hue\n\n`Modulate` works in the LCH color space. Brightness and saturation are multipliers (1.0 = no change), hue is an angle shift in degrees.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Bump brightness by 20%, desaturate by 30%, shift hue by 45 degrees\nif err := image.Modulate(1.2, 0.7, 45); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(&vips.JpegExportParams{Quality: 90})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"adjusted.jpg\", buf, 0644)\n```\n\n### 9. Composite two images (watermark overlay)\n\nLayer one image on top of another using Porter-Duff blending.\n\n```go\nbase, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\noverlay, err := vips.NewImageFromFile(\"watermark.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Place the watermark at position (20, 20) using \"over\" blending\nif err := base.Composite(overlay, vips.BlendModeOver, 20, 20); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := base.ExportJpeg(&vips.JpegExportParams{Quality: 90})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"watermarked.jpg\", buf, 0644)\n```\n\n### 10. Add a text label\n\nOverlay text directly onto an image.\n\n```go\nimage, err := vips.NewImageFromFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\nerr = image.Label(&vips.LabelParams{\n\tText:      \"govips\",\n\tFont:      \"sans bold 16\",\n\tOffsetX:   vips.ValueOf(20),\n\tOffsetY:   vips.ValueOf(20),\n\tOpacity:   0.8,\n\tColor:     vips.Color{R: 255, G: 255, B: 255},\n\tAlignment: vips.AlignLow,\n\tWidth:     vips.ValueOf(200),\n\tHeight:    vips.ValueOf(40),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportPng(vips.NewPngExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"labeled.png\", buf, 0644)\n```\n\n### 11. Flatten transparency onto a background color\n\nRemove the alpha channel by compositing onto a solid color.\n\n```go\nimage, err := vips.NewImageFromFile(\"logo.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Flatten alpha onto white\nif err := image.Flatten(&vips.Color{R: 255, G: 255, B: 255}); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(&vips.JpegExportParams{Quality: 90})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"flattened.jpg\", buf, 0644)\n```\n\n### 12. Embed an image in a larger canvas\n\nCenter an image inside a larger canvas with a colored background.\n\n```go\nimage, err := vips.NewImageFromFile(\"icon.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\nw, h := image.Width(), image.Height()\n\n// Center the image inside a 800x600 canvas with a dark background\nif err := image.EmbedBackgroundRGBA(\n\t(800-w)/2, (600-h)/2, 800, 600,\n\t&vips.ColorRGBA{R: 30, G: 30, B: 30, A: 255},\n); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportPng(vips.NewPngExportParams())\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"embedded.png\", buf, 0644)\n```\n\n### 13. Load from a byte buffer and strip metadata\n\nUseful when you're reading images from HTTP requests or databases.\n\n```go\ninputBytes, err := os.ReadFile(\"photo.jpg\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\nimage, err := vips.NewImageFromBuffer(inputBytes)\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// Strip all EXIF/metadata for privacy\nif err := image.RemoveMetadata(); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportJpeg(&vips.JpegExportParams{\n\tQuality:       80,\n\tStripMetadata: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"clean.jpg\", buf, 0644)\n```\n\n### 14. Build a pipeline: thumbnail, sharpen, and export as AVIF\n\nChain multiple operations together. Each method mutates the image in place, so you can pipeline them naturally.\n\n```go\nimage, err := vips.NewThumbnailFromFile(\"photo.jpg\", 800, 600, vips.InterestingCentre)\nif err != nil {\n\tlog.Fatal(err)\n}\n\nif err := image.Sharpen(0.7, 1.0, 2.0); err != nil {\n\tlog.Fatal(err)\n}\n\nbuf, _, err := image.ExportAvif(&vips.AvifExportParams{\n\tQuality: 50,\n\tEffort:  4,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nos.WriteFile(\"output.avif\", buf, 0644)\n```\n\nSee the _examples/_ folder for more.\n\n## Running tests\n\n```bash\n$ make test\n```\n\n## Code Generation\n\nThe built-in generator lives in `cmd/vipsgen/` and uses libvips GObject introspection to discover operations and their arguments at build time. To regenerate the bindings:\n\n```bash\ngo generate ./vips/\n```\n\nThis produces the generated files in `vips/gen_*.{c,h,go}`. You should not need to regenerate unless you are adding support for new libvips operations.\n\n## Memory usage note\n### MALLOC_ARENA_MAX\n`libvips` uses GLib for memory management, and it brings GLib memory fragmentation\nissues to heavily multi-threaded programs. First thing you can try if you noticed\nconstantly growing RSS usage without Go's sys memory growth is set `MALLOC_ARENA_MAX`:\n\n```\nMALLOC_ARENA_MAX=2 application\n```\n\nThis will reduce GLib memory appetites by reducing the number of malloc arenas\nthat it can create. By default GLib creates one are per thread, and this would\nfollow to memory fragmentation.\n\n### Jemalloc\nIf the arena option doesn't help, you can try replacing the standard allocator with `jemalloc`,\nwhich emphasizes fragmentation avoidance and scalable concurrency support.\n\nTo do this, you need to install the `libjemalloc-dev` package. \nAnd pass the following flags for build command:\n\n```\nCGO_CFLAGS=\"-fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free\" CGO_LDFLAGS=\"-ljemalloc\" go build\n```\n\n\n## Contributing\n\nFeel free to file issues or create pull requests. See this [guide on contributing](https://github.com/davidbyttow/govips/blob/master/CONTRIBUTING.md) for more information.\n\n## Credits\n\nThanks to:\n\n-   [John Cupitt](https://github.com/jcupitt) for creating and maintaining libvips\n-   [Toni Melisma](https://github.com/tonimelisma) for pushing to a 2.x release\n-   [wix.com](https://wix.com/) for the govips logo and lots of great functionality\n-   All of our fantastic [contributors](https://github.com/davidbyttow/govips/graphs/contributors)\n\n## License\n\nMIT\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3DE:324E19:1816BA:5E89AE:6AB92CD8"},"text_sha256":"24706219ffc752889d12b81ba7158c03493378f2ca0fb248b8a798934be12c6b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"4lex4/scantailor-advanced","input_row":{"repository":"4lex4/scantailor-advanced","url":"https://github.com/4lex4/scantailor-advanced","name":"scantailor-advanced","owner":"4lex4","description":"ScanTailor Advanced is the version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes.","language":"C++","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1555,"issues":190,"created_at":"2017-10-12T20:56:34Z","updated_at":"2026-09-25T13:54:40Z","first_commit_at":"2016-02-04T08:27:24Z","last_commit_at":"2020-05-31T10:57:02Z","activity_months":51.840000000000003,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:48:56.893Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"4lex4/scantailor-advanced","visibility":"public","created_at":"2017-10-12T20:56:34Z","updated_at":"2026-09-25T13:54:40Z","private":false,"fork":false,"archived":false,"stargazers_count":1555,"open_issues_count":102,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1708","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:17FE5A6:1C25A41:6AB92CD8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1707","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0836:62B94:17D3217:1BFA58B:6AB92CD9"},"commit":{"sha":"55706b9d5738e14658d9bd55cc754b607b715e06","url":"https://github.com/4lex4/scantailor-advanced/commit/55706b9d5738e14658d9bd55cc754b607b715e06","date":"2018-05-10T19:44:15Z","author_date":"2018-05-10T18:48:00Z","committer_date":"2018-05-10T19:44:15Z","tree_sha":"bfa867b28894e573b7cd0e9106e2cc56df64fdc2","message_first_line":"~ Update the about dialog."},"tree_request_status":200,"tree_rate":{"github_remaining":"1706","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17D11C9:1BF843F:6AB92CD9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22058,"blob_sha":"65bd9fc34610cd26689d6abb304a55c9ea20cf57","priority":0}],"documents":[{"path":"README.md","size":22058,"blob_sha":"65bd9fc34610cd26689d6abb304a55c9ea20cf57","priority":0,"status":200,"text":"ScanTailor Advanced\n===================\n\nThe ScanTailor version that merges the features of the `ScanTailor Featured` and `ScanTailor Enhanced` versions,\nbrings new ones and fixes.  \n\n\n#### <u>Contents<\/u>:\n* [Description](#description)\n* [Features](#features)\n    * [**ScanTailor Enhanced**](#scantailor-enhanced)\n        * [Auto margins \\[improved\\]](#auto-margins-improved)\n        * [Page detect \\[reworked\\]](#page-detect-reworked)\n        * [Deviation \\[reworked\\]](#deviation-reworked)\n        * [Picture shape \\[reworked\\]](#picture-shape-reworked)\n        * [Multi column thumbnails view \\[reworked\\]](#multi-column-thumbnails-view-reworked)\n    * [**ScanTailor Featured**](#scantailor-featured)\n        * [ScanTailor Featured fixes & improvements](#scantailor-featured-fixes--improvements)\n        * [Line vertical dragging on dewarp](#line-vertical-dragging-on-dewarp)\n        * [Square picture zones \\[reworked\\]](#square-picture-zones-reworked)\n        * [Auto save project \\[optimized\\]](#auto-save-project-optimized)\n        * [Quadro Zoner \\[reworked\\]](#quadro-zoner-reworked)\n        * [Marginal dewarping](#marginal-dewarping)\n    * [**ScanTailor Advanced**](#scantailor-advanced-features)\n        * [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements)\n        * [Light and Dark color schemes](#light-and-dark-color-schemes)\n        * [Multi-threading support for batch processing](#multi-threading-support-for-batch-processing)\n        * [Full control over settings on output](#full-control-over-settings-on-output)\n        * [Filling outside areas](#filling-outside-areas)\n        * [Tiff compression](#tiff-compression)\n        * [Adaptive binarization](#adaptive-binarization)\n        * [Splitting output](#splitting-output)\n        * [Original background](#original-background)\n        * [Color segmenter and posterization](#color-segmenter-and-posterization)\n        * [Rectangular picture shape](#rectangular-picture-shape)\n        * [Page area](#page-area)\n        * [New zone interaction modes](#new-zone-interaction-modes)\n        * [Saving zoom and focus on switching output tabs](#saving-zoom-and-focus-on-switching-output-tabs)\n        * [Measurement units system](#measurement-units-system)\n        * [Status bar panel](#status-bar-panel)\n        * [Default parameters](#default-parameters)\n        * [Collapsible filter options](#collapsible-filter-options)\n        * [Auto adjusting content area](#auto-adjusting-content-area)\n        * [Black on white detection](#black-on-white-detection)\n* [Building](#building)\n\nDescription\n------------\n\nScanTailor is an interactive post-processing tool for scanned pages. \nIt performs operations such as:\n  - [page splitting](https://github.com/scantailor/scantailor/wiki/Split-Pages), \n  - [deskewing](https://github.com/scantailor/scantailor/wiki/Deskew), \n  - [adding/removing borders](https://github.com/scantailor/scantailor/wiki/Page-Layout), \n  - [selecting content](https://github.com/scantailor/scantailor/wiki/Select-Content) \n  - ... and others. \n  \nYou give it raw scans, and you get pages ready to be printed or assembled into a PDF \nor [DjVu](http://elpa.gnu.org/packages/djvu.html) file. Scanning, optical character recognition, \nand assembling multi-page documents are out of scope of this project.\n\nFeatures\n----------\n\n#### ScanTailor Enhanced\n\n* ##### Auto margins \\[improved\\]\n  Auto margins feature allows keep page content on original place. In the Margins step\n  you can choose from Auto, Manual (default) and Original mode. The manual mode\n  is the original one. Auto mode try to decide if it is better to align page top,\n  bottom or center. Original mode keeps page on their vertical original position.\n  \n  *This feature has been improved. See [page area](#page-area) feature description.*\n  *Also see [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements)*\n\n* ##### Page detect \\[reworked\\]\n  Page detect feature allows detect page in black margins or switch off page content\n  detection and keep original page layout.\n  \n  *This feature has been reworked and is now a part of the [page area](#page-area) feature.*\n \n* ##### Deviation \\[reworked\\]\n  Deviation feature enables highlighting of different pages. Highlighted in red are pages\n  from Deskew filter with too high skew, from Select Content filter pages with different\n  size of content and in Margins filter are highlighted pages which does not match others.\n  \n  *This feature has been reworked. See [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements) for more information.*\n \n* ##### Picture shape \\[reworked\\]\n  Picture shape feature adds option for mixed pages to choose from free shape and rectangular\n  shape images. This patch does not improve the original algoritm but creates from the\n  detected \"blobs\" rectangular shapes and the rectangles that intersects joins to one.\n  \n  *This feature has been reworked. See [rectangular picture shape](#rectangular-picture-shape) feature description.*\n\n* ##### Multi column thumbnails view \\[reworked\\]\n  This allows to expand and un-dock thumbnails view to see more thumbnails at a time.\n  \n  *This feature had performance and drawing issues and has been reworked.*\n \n#### ScanTailor Featured\n\n* ##### ScanTailor Featured fixes & improvements\n    * Deleted 3 Red Points.   \n      The 3 central red points on the topmost (bottom-most) horizontal blue line of the dewarping\n      mesh are now eliminated. \n    * Manual dewarping mode auto switch.   \n      The dewarping mode is now set to MANUAL (from OFF) after the user has moved the dewarping mesh.\n    * Auto dewarping vertical half correction.   \n      This patch corrects the original auto-dewarping in half\n      the cases when it fails. If the vertical content boundary angle (calculated by auto-dewarping)\n      exceeds an empirical value (2.75 degrees from vertical), the patch adds a new point to\n      the distortion model (with the coordinates equal to the neighboring points) to make\n      this boundary vertical. The patch works ONLY for the linear end of the top (bottom)\n      horizontal line of the blue mesh (and not for the opposite curved end).\n \n* ##### Line vertical dragging on dewarp\n  You can move the topmost (bottom-most) horizontal blue line of the dewarping mesh up and\n  down as a whole - if you grab it at the most left (right) red point - holding down the CTRL key. \n \n* ##### Square picture zones \\[reworked\\]\n  You can create the rectangular picture zones - holding down the CTRL key. \n  You can move the (rectangular) picture zones corners in an orthogonal manner - holding down the CTRL key.\n  \n  *This feature has been reworked and is now a part of [new zone interaction modes](#new-zone-interaction-modes) feature.*\n  \n* ##### Auto save project \\[optimized\\]\n  Set the \"auto-save project\" checked in the Settings menu and you will get \n  your project auto-saved provided you have originally saved your new project.\n  Works at the batch processing too. \n  \n  *This feature had performance issues and has been optimized.*\n \n* ##### Quadro Zoner \\[reworked\\]\n  Another rectangular picture zone shape. This option is based on [Picture shape](#picture-shape),\n  [Square picture zones](#square-picture-zones). It squeezes every Picture shape zone down to the real\n  rectangular picture outline and then replaces it (the resulting raster zone) by a vector rectangular zone,\n  so that a user could easily adjust it afterwards (by moving its corners in an orthogonal manner).\n  \n  *This feature has been reworked. See [rectangular picture shape](#rectangular-picture-shape) feature description.*\n \n* ##### Marginal dewarping \n  An automatic dewarping mode. Works ONLY with such raw scans that have the top and \n  bottom curved page borders (on the black background). It automatically sets the red points \n  of the blue mesh along these borders (to create a distortion model) and then dewarps the scan \n  according to them. Works best on the low-curved scans. \n \n \n*Note: Other features of this version, such as Export, Dont_Equalize_Illumination_Pic_Zones, Original_Foreground_Mixed\nhas't been moved due to dirty realization. Their functionality is fully covered by \n[full control over settings on output](#full-control-over-settings-on-output) and \n[splitting output](#splitting-output) features.*\n\n#### <a name=\"scantailor-advanced-features\"><\/a> ScanTailor Advanced\n\n* ##### ScanTailor Advanced fixes & improvements\n    * Portability.  \n      The settings and program files are stored in the folder with the application.  \n      *Note: If installed into a system directory, where config and data files can't be written into the\n      folder with the application executable, ScanTailor Advanced works as a standalone app and stores\n      its settings and application data in the appropriate system specific paths.*\n    \n    * Page splitting settings influence on the output now by filling offcut.\n      Fill offcut option has been added.\n       \n    * Page layout and all the other views now consider splitting settings.\n      Corresponding improvements are done for thumbnails.\n    \n    * Changed ScanTailor behavior on page split stage.\n         1. Reworked apply cut feature. Now on applying cut to the pages with different dimensions \n            than the page the cut applied to, ScanTailor tries to adapt cutters instead of fully\n            rejecting the cut setting and switching to auto mode for those pages as it was before.\n            The later was annoying as pages could be similar and had the difference in a few pixels.\n         2. Added check to reject invalid cut settings in manual mode.\n         3. UI: Added cutters interaction between each other. They can't more intersect each other,\n            which created a wrong page layout configuration before.\n    \n    * Optimized memory usage on the output stage.\n    \n    * Reworking on [multi column thumbnails view](#multi-column-thumbnails-view-reworked) feature from ver. Enhanced. \n      Now thumbnails are shown evenly.\n    \n    * Added option to control highlighting (with red asterisks) the thumbnails of pages with high deviation. \n      The option refreshes the thumbnails instantly.\n    \n    * Deviation feature reworked.  \n        1. A deviation provider implemented.  \n           It supports caching and recalculates the values on demand. There isn't more any necessity to store deviation in page parameters and so in the project file, that approach caused some problems as the deviation is not actually a page parameter and depends on all the pages in the project.  \n        2. Added sorting by decreasing deviation.\n        \n    * Auto and original alignment modes reworked:  \n        1. The original and auto alignment modes didn't work correctly due to the error in code.\n        2. Both the modes didn't work rightly after select content stage or reopening the project file, always requiring secondary batch processing of every page at margins stage to work correctly.\n        3. Reworked calculation method for the original alignment. Now it is more precise.\n        4. Original alignment mode now considers the page box from 4th stage.\n        5. Fixed behaviour of horizontal alignment, when the original mode enabled, and auto margins has been enabled/disabled. Also on applying auto-margins / original alignment to the set of pages, that is now set correctly for each page.\n        6. Added ability to separately control vertical and horizontal automatic alignment when auto or original alignment mode enabled.  \n\n    * Changed the way of the adjustment of the despeckle strength.  \n      Now that's set via the slider. It allows to adjust the despeckle strength more smoothly and exactly.\n      Value 1.0 matches the old cautious mode, 2.0 - normal and 3.0 - aggressive.\n\n    * Fixed other bugs of official, Enhanced and Featured versions and made lots of other improvements.\n\n* ##### Light and Dark color schemes\n  You can choose a desired color scheme in settings.\n\n* ##### Multi-threading support for batch processing\n  This significantly increases the speed of processing. The count of threads to use can be\n  adjusted while processing.\n  \n  **Warning!** More threads requires more memory to use. Exclude situations of that to be overflowed.  \n\n* ##### Full control over settings on output\n  This feature enables to control filling margins, normalizing illumination before binarization,\n  normalizing illumination in color areas and Savitzky-Golay and morphological smoothing options at the output stage\n  in any mode (of course, those setting that can be applied in the current mode).\n \n* ##### Filling outside areas\n  Now outside pixels can be filled with the background color of the page.\n  \n  Added filling setting with the following options:\n    1. Background: estimate the background and fill outside pixels with its color.\n    2. White: always fill with white.\n \n* ##### Tiff compression\n  Tiff compression options allow to disable or change compression method in tiff files.\n  \n  There are two options in settings dialog: B&W and color compression. \n    1. The B&W one has None, LZW, Deflate and CCITT G4 (Default) options.\n    2. The color one has None, LZW (Default), Deflate and JPEG options.\n\n* ##### Adaptive binarization\n  Sauvola and Wolf binarization algorithms have been added. They can be applied when\n  normalizing illumination does not help.\n \n* ##### Splitting output\n  The feature allows to split the mixed output scans into the pairs of a foreground (letters) \n  and background (images) layer.\n  \n  You can choose between B&W or color (original) foreground.\n  \n  It can be useful:\n    * for the further DjVu encoding,\n    * to apply different filters to letters and images, which when being applied to the whole\n    image gives worse results.\n    * to apply a binarization to the letters from a third party app without affecting the images.\n   \n  *Note: That does not rename files to 0001, 0002... It can be made by a third party app, for example \n  [Bulk Rename Utility](http://www.bulkrenameutility.co.uk/Main_Intro.php)*\n\n* ##### Original background\n  This feature is a part of the [splitting output](#splitting-output) feature.\n  \n  It allows to preserve the original image background in the format ready for the further processing, when BW foreground is used.\n  It can be used to encode into DjVu the pages with the complex background using the semi-auto \"split layers\" method which gives much higher quality results than DjVu auto segmenter.\n  Also this feature can be used to extract high contrast elements of gradient images into the foreground layer by using second processing of the layer with pictures (\"background\").\n  \n  Properties of the original background:\n    * Original background images are saved into \"original_background\" folder in \"out\" directory.\n    * Pure black (`#000000`) and white (`#ffffff`) colors of original background image are reserved into `#010101` and `#fefefe`, respectively.\n    * Picture zones are marked with black when the BW content is marked with white. This property allow to use \"select by color\" feature of an image editor to select needed areas for their further processing, for example, apply blur to white holes and their nearest areas to get an effective compression level of the background layer in DjVu.\n    * Filling zones feature also removes trash and speckles from the original background when applied to the foreground layer.\n\n* ##### Color segmenter and posterization\n  Color segmentation and posterization (color quantization) features have been implemented.\n  \n  Color segmentation allows to split the image into color segments and colorize b&w mask.\n  Posterization allows to reduce the number of colors of the image by grouping similar colors.\n  The main use of posterization is to be applied to segmented image to get an indexed image, that can then be encoded into DjVu as the foreground layer. It allows to create high-quality DjVu files with color text and elements having maximal compression level.\n  Posterization can also be used in color mode and can be applied to usual color gradient images for different purposes, for example, to increase their compression efficiency.\n\n* ##### Rectangular picture shape\n  \"Quadro\" picture shape mode from Featured was merged with Rectangular one from Enhanced. Also removed restriction of ver. Featured on deleting all the auto zones. Before it resulted in resetting all the auto zones back.\n  Added sensitivity option. If sensitivity equals 25%, the results will be the same as they were in old \"Quadro\" mode, if 100% - as in old \"Rectangular\".\n\n* ##### Page area\n  This feature is a further development of the auto margins and page box features from version Enhanced.\n  \n  Selection content stage changes:\n    1. A page box implementation reworked. Now it's interactive and can be adjusted by the same way as a content box is done.\n    2. The page rectangle does not require refreshing page and won't be reset on the content area changes.\n    3. The page rectangle is now drawn in the thumbnails.\n    4. Implemented the new feature of applying the page box set manually to the other pages. For pages of a different size ST automatically corrects page box place. The same change has been made to applying the content box feature.\n    5. Added a feature of dragging both content and page areas by using **`Shift+LMB`** combination.\n    6. Added width and height parameters to regulate the page box size in manual mode.\n    7. A page area is now allowed to be out of the page bounds in manual mode.\n    \n  Page layout stage changes:\n    1. Auto margins option has been moved out of alignment settings and does no more force to use only the original layout.\n    2. Auto margins feature now considers page box changes on the 4th stage.\n    3. Corresponding bug fixes.\n  \n  Owing to the changes above, there appeared a new way to set margins for books and documents, pages of which have similar formatting. At content selection stage we just set page box and content box to a page, applying those content and page boxes to the pages with similar formatting, use auto margins for those pages at page layout stage instead of adjusting the margins relative to the content box, and then go to the output.\n\n* ##### New zone interaction modes  \n  **`Shift+LMB`** when the cursor is over a zone - drag the zone.  \n  **`Ctrl+Shift+LMB`** when the cursor is over a zone - drag the zone copying.  \n  **`Del`** when the cursor is over a zone - delete the zone.  \n  **`Ctrl`** when dragging a zone vertex - make the angle of the vertex right.  \n  **`Ctrl+Alt+Click`** - copy the latest created zone to the cursor position.  \n  **`Ctrl`** when creating a new zone - switch to rectangular mode.  \n  **`Alt`** when creating a new zone - switch to lasso (free drawing) mode.  \n\n* ##### Saving zoom and focus on switching output tabs\n  The save is precise and considers the images transformations.  \n  Also added a feature of swithing the output tabs by using **`Ctrl+1..5`** keys combinations.  \n\n* ##### Measurement units system\n  The settings are available in the main window menu.\n  Available units: pixels, millimetres, centimetres and inches.\n  \n  The system affects every aspect of the program, so, for example, it's now possible to adjust margins in pixels, but not only in millimetres or inches.\n\n* ##### Status bar panel\n  The panel shows the next information: mouse position relative to the image, physical size of the image, position of the selected page in current order and the page name and type (`[L]` or `[R]` - left or right page, if the page has been splitted).\n  \n  This feature is also affected by [measurement units system](#measurement-units-system).\n\n* ##### Default parameters\n  Default parameters system supporting custom profiles has been implemented.\n  \n  The system allows to manage the default filter settings for every stage.\n  Those filter parameters will be set as defaults for any new project created.\n  \n  For example, it allows to set your own default margins standard, but not default 5, 10, 5, 10 mm, and so for the other parameters.\n  \n  Peculiarities:\n    1. There are two default profiles: \"Default\" and \"Source\". The \"Default\" profile represents default ST filter settings, the \"Source\" one represents the settings giving the source as output without any changes.\n    2. A user can create its own profiles. User profiles are stored in `config/profiles` folder or in an system specific one for application data.\n    3. The system consider the units settings from the [measurement units system](#measurement-units-system). Units are stored in the profile and ST automatically converts the values if needed.\n\n* ##### Collapsible filter options.\n  Now group boxes containing filter options can be collapsed/expanded.  \n  The collapse status is preserved between restarts of the application.  \n \n* ##### Auto adjusting content area.\n  Use **`double-click`** on content to automatically adjust the content area.  \n  If the content is outside the area, the later will automatically be expanded and adjusted to the content at the position where double-click has been,\n  otherwise the area edge, nearest to that position, will be adjusted.\n  \n  It's much faster now to correct the content area if, for example, the page number has been missed by the auto algorithm.\n  It is no more required to manually and laboriously move the corners and edges of the content box.\n  \n* ##### Black on white detection\n  This feature allows to process images with light content on dark background correctly by correcting auto algorithms.  \n  \n  Peculiarities:\n    1. Auto detection of pages with light content on dark background can be enabled or disabled in the settings.\n       Auto detection at the output stage is controlled separately.\n    2. Per page control over the mode added into the output filter options.\n \nBuilding\n----------\n\nGo to [this repository](https://github.com/4lex4/scantailor-libs-build) and follow the instructions given there.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E820:349C76:178BFB:5DFB4F:6AB92CB7"},"text_sha256":"c6c4d541dbde206b4f02ce4ed8809ed6475e4f191b5511853fb45b101e6cad70"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1705","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B0:731F6:18061D7:1C2D976:6AB92CDA"},"commit":{"sha":"3d1e74e6ace413733511086934a66f4e3f7a6027","url":"https://github.com/4lex4/scantailor-advanced/commit/3d1e74e6ace413733511086934a66f4e3f7a6027","date":"2020-05-31T10:57:02Z","author_date":"2020-05-30T22:52:14Z","committer_date":"2020-05-31T10:57:02Z","tree_sha":"ca722e1e8c429c2bbe98cb7412b2de419ea17f41","message_first_line":"Fix build with Qt 5.15 (missing QPainterPath includes)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1704","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BB:DC698:180A29A:1C30FEA:6AB92CDB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":24423,"blob_sha":"dc3bd2a47b536634edba9832d65d78bc0a77d8d1","priority":0}],"documents":[{"path":"README.md","size":24423,"blob_sha":"dc3bd2a47b536634edba9832d65d78bc0a77d8d1","priority":0,"status":200,"text":"ScanTailor Advanced\n===================\n\nThe ScanTailor version that merges the features of the `ScanTailor Featured` and `ScanTailor Enhanced` versions,\nbrings new ones and fixes.  \n\n\n#### <u>Contents<\/u>:\n* [Description](#description)\n* [Features](#features)\n  * [**ScanTailor Enhanced**](#scantailor-enhanced)\n    * [Auto margins \\[improved\\]](#auto-margins-improved)\n    * [Page detect \\[reworked\\]](#page-detect-reworked)\n    * [Deviation \\[reworked\\]](#deviation-reworked)\n    * [Picture shape \\[reworked\\]](#picture-shape-reworked)\n    * [Multi column thumbnails view \\[reworked\\]](#multi-column-thumbnails-view-reworked)\n  * [**ScanTailor Featured**](#scantailor-featured)\n    * [ScanTailor Featured fixes & improvements](#scantailor-featured-fixes--improvements)\n    * [Line vertical dragging on dewarp](#line-vertical-dragging-on-dewarp)\n    * [Square picture zones \\[reworked\\]](#square-picture-zones-reworked)\n    * [Auto save project \\[optimized\\]](#auto-save-project-optimized)\n    * [Quadro Zoner \\[reworked\\]](#quadro-zoner-reworked)\n    * [Marginal dewarping](#marginal-dewarping)\n  * [**ScanTailor Universal**](#scantailor-universal)\n    * [ScanTailor Universal fixes & improvements](#scantailor-universal-fixes--improvements)\n  * [**ScanTailor Advanced**](#scantailor-advanced-features)\n    * [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements)\n    * [Light and Dark color schemes](#light-and-dark-color-schemes)\n    * [Multi-threading support for batch processing](#multi-threading-support-for-batch-processing)\n    * [Full control over settings on output](#full-control-over-settings-on-output)\n    * [Filling outside areas](#filling-outside-areas)\n    * [Tiff compression](#tiff-compression)\n    * [Adaptive binarization](#adaptive-binarization)\n    * [Splitting output](#splitting-output)\n    * [Original background](#original-background)\n    * [Color segmenter and posterization](#color-segmenter-and-posterization)\n    * [Rectangular picture shape](#rectangular-picture-shape)\n    * [New zone interaction modes](#new-zone-interaction-modes)\n    * [Saving zoom and focus on switching output tabs](#saving-zoom-and-focus-on-switching-output-tabs)\n    * [Measurement units system](#measurement-units-system)\n    * [Status bar panel](#status-bar-panel)\n    * [Default parameters](#default-parameters)\n    * [Collapsible filter options](#collapsible-filter-options)\n    * [Auto adjusting content area](#auto-adjusting-content-area)\n    * [Black on white detection](#black-on-white-detection)\n    * [Guides](#guides)\n* [Building](#building)\n\nDescription\n------------\n\nScanTailor is an interactive post-processing tool for scanned pages. \nIt performs operations such as:\n  - [page splitting](https://github.com/scantailor/scantailor/wiki/Split-Pages), \n  - [deskewing](https://github.com/scantailor/scantailor/wiki/Deskew), \n  - [adding/removing borders](https://github.com/scantailor/scantailor/wiki/Page-Layout), \n  - [selecting content](https://github.com/scantailor/scantailor/wiki/Select-Content) \n  - ... and others. \n  \nYou give it raw scans, and you get pages ready to be printed or assembled into a PDF \nor [DjVu](http://elpa.gnu.org/packages/djvu.html) file. Scanning, optical character recognition, \nand assembling multi-page documents are out of scope of this project.\n\nFeatures\n----------\n\n#### ScanTailor Enhanced\n\n* ##### Auto margins \\[improved\\]\n  Auto margins feature allows keep page content on original place. In the Margins step\n  you can choose from Auto, Manual (default) and Original mode. The manual mode\n  is the original one. Auto mode try to decide if it is better to align page top,\n  bottom or center. Original mode keeps page on their vertical original position.\n  \n  *This feature has been improved. See [page area](#page-area) feature description.*\n  *Also see [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements)*\n\n* ##### Page detect \\[reworked\\]\n  Page detect feature allows detect page in black margins or switch off page content\n  detection and keep original page layout.\n  \n  *This feature has been reworked.*\n  *See [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements) for more information.*\n \n* ##### Deviation \\[reworked\\]\n  Deviation feature enables highlighting of different pages. Highlighted in red are pages\n  from Deskew filter with too high skew, from Select Content filter pages with different\n  size of content and in Margins filter are highlighted pages which does not match others.\n  \n  *This feature has been reworked. See [ScanTailor Advanced fixes & improvements](#scantailor-advanced-fixes--improvements) for more information.*\n \n* ##### Picture shape \\[reworked\\]\n  Picture shape feature adds option for mixed pages to choose from free shape and rectangular\n  shape images. This patch does not improve the original algoritm but creates from the\n  detected \"blobs\" rectangular shapes and the rectangles that intersects joins to one.\n  \n  *This feature has been reworked. See [rectangular picture shape](#rectangular-picture-shape) feature description.*\n\n* ##### Multi column thumbnails view \\[reworked\\]\n  This allows to expand and un-dock thumbnails view to see more thumbnails at a time.\n  \n  *This feature had performance and drawing issues and has been reworked.*\n \n#### ScanTailor Featured\n\n* ##### ScanTailor Featured fixes & improvements\n  * Deleted 3 Red Points.   \n    The 3 central red points on the topmost (bottom-most) horizontal blue line of the dewarping\n    mesh are now eliminated. \n  * Manual dewarping mode auto switch.   \n    The dewarping mode is now set to MANUAL (from OFF) after the user has moved the dewarping mesh.\n  * Auto dewarping vertical half correction.   \n    This patch corrects the original auto-dewarping in half\n    the cases when it fails. If the vertical content boundary angle (calculated by auto-dewarping)\n    exceeds an empirical value (2.75 degrees from vertical), the patch adds a new point to\n    the distortion model (with the coordinates equal to the neighboring points) to make\n    this boundary vertical. The patch works ONLY for the linear end of the top (bottom)\n    horizontal line of the blue mesh (and not for the opposite curved end).\n \n* ##### Line vertical dragging on dewarp\n  You can move the topmost (bottom-most) horizontal blue line of the dewarping mesh up and\n  down as a whole - if you grab it at the most left (right) red point - holding down the CTRL key. \n \n* ##### Square picture zones \\[reworked\\]\n  You can create the rectangular picture zones - holding down the CTRL key. \n  You can move the (rectangular) picture zones corners in an orthogonal manner - holding down the CTRL key.\n  \n  *This feature has been reworked and is now a part of [new zone interaction modes](#new-zone-interaction-modes) feature.*\n  \n* ##### Auto save project \\[optimized\\]\n  Set the \"auto-save project\" checked in the Settings menu and you will get \n  your project auto-saved provided you have originally saved your new project.\n  Works at the batch processing too. \n  \n  *This feature had performance issues and has been optimized.*\n \n* ##### Quadro Zoner \\[reworked\\]\n  Another rectangular picture zone shape. This option is based on [Picture shape](#picture-shape),\n  [Square picture zones](#square-picture-zones). It squeezes every Picture shape zone down to the real\n  rectangular picture outline and then replaces it (the resulting raster zone) by a vector rectangular zone,\n  so that a user could easily adjust it afterwards (by moving its corners in an orthogonal manner).\n  \n  *This feature has been reworked. See [rectangular picture shape](#rectangular-picture-shape) feature description.*\n \n* ##### Marginal dewarping \n  An automatic dewarping mode. Works ONLY with such raw scans that have the top and \n  bottom curved page borders (on the black background). It automatically sets the red points \n  of the blue mesh along these borders (to create a distortion model) and then dewarps the scan \n  according to them. Works best on the low-curved scans. \n \n \n*Note: Other features of this version, such as Export, Dont_Equalize_Illumination_Pic_Zones, Original_Foreground_Mixed\nhas't been moved due to dirty realization. Their functionality is fully covered by \n[full control over settings on output](#full-control-over-settings-on-output) and \n[splitting output](#splitting-output) features.*\n\n#### ScanTailor Universal\n\n* ##### ScanTailor Universal fixes & improvements\n  * Improvements for the thumbnail view.  \n    1. More accurate multi-column list handling.\n    2. Scaling thumbnails via **`Alt+Wheel`**.\n    \n  * Fixed some bugs of official and Enhanced version.\n\n#### <a name=\"scantailor-advanced-features\"><\/a> ScanTailor Advanced\n\n* ##### ScanTailor Advanced fixes & improvements\n  * Portability.  \n    The settings and program files are stored in the folder with the application.  \n    *Note: If installed into a system directory, where config and data files can't be written into the\n    folder with the application executable, ScanTailor Advanced works as a standalone app and stores\n    its settings and application data in the appropriate system specific paths.*\n  \n  * Page splitting settings now influence on the output by filling offcut.\n    Fill offcut option has been added.\n  \n  * Page layout and all the other views now consider splitting settings.\n    Corresponding improvements are done for thumbnails.\n  \n  * Changed ScanTailor behavior on page split stage.\n    1. Reworked apply cut feature. Now on applying cut to the pages with different dimensions \n       than the page the cut applied to, ScanTailor tries to adapt cutters instead of fully\n       rejecting the cut setting and switching to auto mode for those pages as it was before.\n       The later was annoying as pages could be similar and had the difference in a few pixels.\n    2. Added check to reject invalid cut settings in manual mode.\n    3. UI: Added cutters interaction between each other. They can't more intersect each other,\n       which created a wrong page layout configuration before.\n  \n  * Reworking on [multi column thumbnails view](#multi-column-thumbnails-view-reworked) feature from ver. Enhanced. \n    Now thumbnails are shown evenly.\n  \n  * Added option to control highlighting the thumbnails of pages with high deviation with red asterisks. \n    The option refreshes the thumbnails instantly.\n  \n  * Deviation feature reworked.  \n    1. A deviation provider implemented.  \n       It supports caching and recalculates the values on demand. There isn't more any necessity to store deviation in page parameters and so in the project file, that approach caused some problems as the deviation is not actually a page parameter and depends on all the pages in the project.  \n    2. Added sorting by decreasing deviation.\n\n  * Page/content boxes and auto margins features fixes & improvements.  \n    1. Added a feature of dragging both content and page areas by using **`Shift+LMB`** combination.\n    2. A page box implementation reworked. Now it's interactive and can be adjusted by the same way as a content box is done.\n    3. The page rectangle does not require refreshing page and won't be reset on the content area changes.\n    4. Implemented applying the page/content boxes to the other pages automatically correcting the position of the boxes.\n    5. Added width and height parameters to regulate the page box size in manual mode.\n    6. Auto margins option has been moved out of the alignment settings and does no more force to use only the original layout.\n    7. Auto margins feature now considers page box changes made at the selection content stage.\n    8. Other bug fixes and improvements.\n\n  * Auto and original alignment modes reworked:  \n    1. The original and auto alignment modes didn't work correctly due to the error in code.\n    2. Both the modes didn't work rightly after select content stage or reopening the project file, always requiring secondary batch processing of every page at margins stage to work correctly.\n    3. Reworked calculation method for the original alignment. Now it is more precise.\n    4. Original alignment mode now considers the page box from 4th stage.\n    5. Fixed behaviour of horizontal alignment, when the original mode enabled, and auto margins has been enabled/disabled. Also on applying auto-margins / original alignment to the set of pages, that is now set correctly for each page.\n    6. Added ability to separately control vertical and horizontal automatic alignment when auto or original alignment mode enabled.  \n\n  * Changed the way of the adjustment of the despeckle strength.  \n    Now that's set via the slider. It allows to adjust the despeckle strength more smoothly and exactly.\n    Value 1.0 matches the old cautious mode, 2.0 - normal and 3.0 - aggressive.\n    \n  * Improvements on the thumbnails view and navigation:  \n    * Saving selection of pages on filter switch.\n    * Separate highlighting for selection leader in thumbnails.\n    * Navigating between selected pages.\n      Use **`Shift+PgUp/Q`** and **`Shift+PgDown/W`** to navigate between selected pages.\n    * Added buttons to navigate between pages.\n    * Multi page selection mode without using keyboard.\n    * The question as to whether cancel multi page selection.\n    * Go to a page by its number (**`Ctrl+G`** shortcut).\n\n  * Added options in the settings to manage the quality and size of thumbnails.  \n    It's possible to switch thumbnail quality while working on a project with the changes applied immediately.\n    For every quality chosen a cache is created.  \n    *Usage example: you could use this feature for the preview purpose, which is faster than simple navigating between pages.\n    Undock the thumbnails panel, set the quality, for ex., to 700, and size to 1000. You can mark problem pages with `Ctrl+Click` on a thumbnail\n    and navigate between these selected pages after finishing to fix them. To finish the preview change the quality and size values back\n    and dock the panel.*  \n\n  * Fixed other bugs of official, Enhanced and Featured versions and made lots of other improvements.\n\n* ##### Light and Dark color schemes\n  You can choose a desired color scheme in settings.\n\n* ##### Multi-threading support for batch processing\n  This significantly increases the speed of processing. The count of threads to use can be\n  adjusted while processing.\n  \n  **Warning!** More threads requires more memory to use. Exclude situations of that to be overflowed.  \n\n* ##### Full control over settings on output\n  This feature enables to control filling margins, normalizing illumination before binarization,\n  normalizing illumination in color areas and Savitzky-Golay and morphological smoothing options at the output stage\n  in any mode (of course, those setting that can be applied in the current mode).\n \n* ##### Filling outside areas\n  Now outside pixels can be filled with the background color of the page.\n  \n  Added filling setting with the following options:\n    1. Background: estimate the background and fill outside pixels with its color.\n    2. White: always fill with white.\n \n* ##### Tiff compression\n  Tiff compression options allow to disable or change compression method in tiff files.\n  \n  There are two options in settings dialog: B&W and color compression. \n    1. The B&W one has None, LZW, Deflate and CCITT G4 (Default) options.\n    2. The color one has None, LZW (Default), Deflate and JPEG options.\n\n* ##### Adaptive binarization\n  Sauvola and Wolf binarization algorithms have been added. They can be applied when\n  normalizing illumination does not help.\n \n* ##### Splitting output\n  The feature allows to split the mixed output scans into the pairs of a foreground (letters) \n  and background (images) layer.\n  \n  You can choose between B&W or color (original) foreground.\n  \n  It can be useful:\n    * for the further DjVu encoding,\n    * to apply different filters to letters and images, which when being applied to the whole\n    image gives worse results.\n    * to apply a binarization to the letters from a third party app without affecting the images.\n   \n  *Note: That does not rename files to 0001, 0002... It can be made by a third party app, for example \n  [Bulk Rename Utility](http://www.bulkrenameutility.co.uk/Main_Intro.php)*\n\n* ##### Original background\n  This feature is a part of the [splitting output](#splitting-output) feature.\n  \n  It allows to preserve the original image background in the format ready for the further processing, when BW foreground is used.\n  It can be used to encode into DjVu the pages with the complex background using the semi-auto \"split layers\" method which gives much higher quality results than DjVu auto segmenter.\n  Also this feature can be used to extract high contrast elements of gradient images into the foreground layer by using second processing of the layer with pictures (\"background\").\n  \n  Properties of the original background:\n    * Original background images are saved into \"original_background\" folder in \"out\" directory.\n    * Pure black (`#000000`) and white (`#ffffff`) colors of original background image are reserved into `#010101` and `#fefefe`, respectively.\n    * Picture zones are marked with black when the BW content is marked with white. This property allow to use \"select by color\" feature of an image editor to select needed areas for their further processing, for example, apply blur to white holes and their nearest areas to get an effective compression level of the background layer in DjVu.\n    * Filling zones feature also removes trash and speckles from the original background when applied to the foreground layer.\n\n* ##### Color segmenter and posterization\n  Color segmentation and posterization (color quantization) features have been implemented.\n  \n  Color segmentation allows to split the image into color segments and colorize b&w mask.\n  Posterization allows to reduce the number of colors of the image by grouping similar colors.\n  The main use of posterization is to be applied to segmented image to get an indexed image, that can then be encoded into DjVu as the foreground layer. It allows to create high-quality DjVu files with color text and elements having maximal compression level.\n  Posterization can also be used in color mode and can be applied to usual color gradient images for different purposes, for example, to increase their compression efficiency.\n\n* ##### Rectangular picture shape\n  \"Quadro\" picture shape mode from Featured was merged with Rectangular one from Enhanced. Also removed restriction of ver. Featured on deleting all the auto zones. Before it resulted in resetting all the auto zones back.\n  Added sensitivity option. If sensitivity equals 25%, the results will be the same as they were in old \"Quadro\" mode, if 100% - as in old \"Rectangular\".\n\n* ##### New zone interaction modes  \n  * Zone creation mode:  \n    Press **`Z`** to switch to polygonal mode.  \n    Press **`X`** to switch to lasso (free drawing) mode.  \n    Press **`C`** to switch to rectangular mode.  \n    Press **`Z`** or **`X`** while creating a new zone to switch between polygonal and rectangular modes respectively.  \n  * Zone:  \n    **`Shift+LMB`** on a zone - drag the zone.  \n    **`Ctrl+Shift+LMB`** on a zone - drag the zone copying.  \n    **`Ctrl+Alt+Click`** - copy the latest created zone to the current cursor position.  \n    **`Del`** when the cursor is over a zone - delete the zone.  \n  * Zone vertex:  \n    **`D`** when the cursor is over a zone vertex - delete the vertex.  \n    Hold **`Ctrl`** when dragging a zone vertex - make the angle of the vertex right.  \n\n* ##### Saving zoom and focus on switching output tabs\n  The save is precise and considers the images transformations.  \n  Also added a feature of swithing the output tabs by using **`Ctrl+1..5`** keys combinations.  \n\n* ##### Measurement units system\n  The settings are available in the main window menu.\n  Available units: pixels, millimetres, centimetres and inches.\n  \n  The system affects every aspect of the program, so, for example, it's now possible to adjust margins in pixels, but not only in millimetres or inches.\n\n* ##### Status bar panel\n  The panel shows the next information: zone creation mode icon, mouse position relative to the image, physical size of the image, position of the selected page in current order and the page name and type (`[L]` or `[R]` - left or right page, if the page has been splitted).\n  \n  This feature is also affected by [measurement units system](#measurement-units-system).\n\n* ##### Default parameters\n  Default parameters system supporting custom profiles has been implemented.\n  \n  The system allows to manage the default filter settings for every stage.\n  Those filter parameters will be set as defaults for any new project created.\n  \n  For example, it allows to set your own default margins standard, but not default 5, 10, 5, 10 mm, and so for the other parameters.\n  \n  Peculiarities:\n    1. There are two default profiles: \"Default\" and \"Source\". The \"Default\" profile represents default ST filter settings, the \"Source\" one represents the settings giving the source as output without any changes.\n    2. A user can create its own profiles. User profiles are stored in `config/profiles` folder or in an system specific one for application data.\n    3. The system consider the units settings from the [measurement units system](#measurement-units-system). Units are stored in the profile and ST automatically converts the values if needed.\n\n* ##### Collapsible filter options.\n  Now group boxes containing filter options can be collapsed/expanded.  \n  The collapse status is preserved between restarts of the application.  \n \n* ##### Auto adjusting content area.\n  Use **`double-click`** on content to automatically adjust the content area.  \n  If the content is outside the area, the later will automatically be expanded and adjusted to the content at the position where double-click has been,\n  otherwise the area edge, nearest to that position, will be adjusted (on clicking hold **`Shift`** pressed to select\n  left or right edge only or **`Ctrl`** to select top or bottom one, or **`Shift+Ctrl`** to adjust both the nearest vertical and horizontal edges).\n  \n  It's much faster now to correct the content area if, for example, the page number has been missed by the auto algorithm.\n  It is no more required to manually and laboriously move the corners and edges of the content box.\n  \n* ##### Black on white detection\n  This feature allows to process images with light content on dark background correctly by correcting auto algorithms.  \n  \n  Peculiarities:\n    1. Auto detection of pages with light content on dark background can be enabled or disabled in the settings.\n       Auto detection at the output stage is controlled separately.\n    2. There is per page control over the mode in the output filter options.\n    \n* ##### Guides\n  This feature gives you a more flexible and precise way of positioning content in the page layout.\n  These are horizontal or vertical lines you can display on a page at the margins stage \\(when aligning enabled\\).  \n  *Note: Guides are adaptive to the page soft margins, i.e. when the latter changed the guides on the page\n  are automatically adjusted to match the new content position without requiring any manual re-adjusting.*\n  \n  Capabilities:  \n    * **`Right-click`** to create/remove guides from the **context menu** called.  \n    * **`Right-click`** on a guide to delete that guide from the **context menu** called.  \n    * **`Ctrl+Alt+LMB`** - drag the guide under the cursor.  \n    * **`Shift/Ctrl+LMB`** on the content rectangle - drag the page content.\n      Hold **`Shift`** pressed to restrict moving along the horizontal axis only or **`Ctrl`** for the vertical one.\n      Hold **`Shift+Ctrl`** for usual dragging.  \n    * **`Double-click`** on content - automatically attach that content to the nearest guide.\n      Hold **`Shift`** pressed to select vertical guides only or **`Ctrl`** for horizontal ones.\n      Hold **`Shift+Ctrl`** to attach that to both the nearest vertical and horizontal guides.  \n    * Use the **context menu** to enable/disable showing the hard margins rectangle.  \n\nBuilding\n----------\n\nGo to [this repository](https://github.com/4lex4/scantailor-libs-build) and follow the instructions given there.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1342:3CC8A:17EB21:5E5EEA:6AB92CD9"},"text_sha256":"f4a02a8f75e31fd43acd6f63b0ece655ec30246de88e11f56dda96d35ab40fa3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"MattKetmo/darkroomjs","input_row":{"repository":"MattKetmo/darkroomjs","url":"https://github.com/MattKetmo/darkroomjs","name":"darkroomjs","owner":"MattKetmo","description":"Extensible image editing tool in your browser","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1463,"issues":101,"created_at":"2013-11-02T11:19:20Z","updated_at":"2026-09-15T18:07:08Z","first_commit_at":"2013-10-29T22:40:34Z","last_commit_at":"2024-03-24T07:04:06Z","activity_months":124.78,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:00.250Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"MattKetmo/darkroomjs","visibility":"public","created_at":"2013-11-02T11:19:20Z","updated_at":"2026-09-15T18:07:08Z","private":false,"fork":false,"archived":false,"stargazers_count":1463,"open_issues_count":50,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1703","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AD:72BD3:180DE03:1C352D5:6AB92CDC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1702","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FA:2EA1B4:17EA8BF:1C12188:6AB92CDC"},"commit":{"sha":"41df990c920b61044c1c3082f0c579f87e34158b","url":"https://github.com/MattKetmo/darkroomjs/commit/41df990c920b61044c1c3082f0c579f87e34158b","date":"2016-01-29T09:52:08Z","author_date":"2016-01-28T19:39:50Z","committer_date":"2016-01-29T09:52:08Z","tree_sha":"41b97137482b972fe3cf6ec0d2d4c503a21ec704","message_first_line":"Fixed typo and slight rewording"},"tree_request_status":200,"tree_rate":{"github_remaining":"1701","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B1:73962:17E9AEC:1C109B4:6AB92CDD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2744,"blob_sha":"5c0645362d13d065c65737ce8bffe678bef87324","priority":0}],"documents":[{"path":"README.md","size":2744,"blob_sha":"5c0645362d13d065c65737ce8bffe678bef87324","priority":0,"status":200,"text":"# DarkroomJS\n\n![Bower](https://img.shields.io/bower/v/darkroom.svg)\n![License MIT](http://img.shields.io/badge/license-MIT-blue.svg)\n\nDarkroomJS is a JavaScript library which provides basic image editing tools in\nyour browser, such as **rotation** or **cropping**. It is based on the awesome\n[FabricJS](http://fabricjs.com/) library to handle images in HTML5 canvas.\n\n## Demo\n\nTry the online demo at [http://mattketmo.github.io/darkroomjs](http://mattketmo.github.io/darkroomjs/)\n\n## Building\n\n- Install [Node](http://nodejs.org/) & `npm`.\n- Run `npm install` to build dependencies.\n- Run `npm start` to build the assets and start the demo webserver.\n\n## Usage\n\nSimply instanciate a new Darkroom object with a reference to the image element:\n\n```html\n<img src=\"some-image.jpg\" id=\"target\">\n<script>\n  new Darkroom('#target');\n<\/script>\n```\n\nYou can also pass some options:\n\n```javascript\nnew Darkroom('#target', {\n  // Canvas initialization size\n  minWidth: 100,\n  minHeight: 100,\n  maxWidth: 500,\n  maxHeight: 500,\n\n  // Plugins options\n  plugins: {\n    crop: {\n      minHeight: 50,\n      minWidth: 50,\n      ratio: 1\n    },\n    save: false // disable plugin\n  },\n\n  // Post initialization method\n  initialize: function() {\n    // Active crop selection\n    this.plugins['crop'].requireFocus();\n\n    // Add custom listener\n    this.addEventListener('core:transformation', function() { /* ... */ });\n  }\n});\n```\n\n## Why?\n\nIt's easy to get a javascript script to crop an image in a web page.\nBut if your want more features like rotation or brightness adjustment, then you\nwill have to do it yourself. No more jQuery plugins here.\nIt only uses the power of HTML5 canvas to make what ever you want with your image.\n\n## The concept\n\nThe library is designed to be easily extendable. The core script only transforms\nthe target image to a canvas with a FabricJS instance, and creates an empty toolbar.\nAll the features are then implemented in separate plugins.\n\nEach plugin is responsible for creating its own functionality.\nButtons can easily be added to the toolbar and binded with those features.\n\n## Contributing\n\nRun `npm develop` to build and watch the files while developing.\n\n## FAQ\n\nHow can I access the edited image?\n\nIn order to get the edited image data, you must ask the canvas for it. By doing so inside the callback of your choice (in this case save), you can assign the edited image data to wherever you please. \n\n```javascript\nsave: {\n      callback: function() {\n          this.darkroom.selfDestroy(); // Cleanup\n          var newImage = dkrm.canvas.toDataURL();\n          fileStorageLocation = newImage;\n      }\n  }\n```\n\n## License\n\nDarkroomJS is released under the MIT License. See the [bundled LICENSE file](LICENSE)\nfor details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8408:09ED:E670C:3F9432:6AB92CD8"},"text_sha256":"5291e895bc18f7e187bf3c324fe696a89521effc6a1540fe67ca9ef838a9dd70"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1700","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0911:74E6D:1818B49:1C404C9:6AB92CDD"},"commit":{"sha":"d124ce092e06be6862769776325ee6a434b32500","url":"https://github.com/MattKetmo/darkroomjs/commit/d124ce092e06be6862769776325ee6a434b32500","date":"2024-03-24T07:04:06Z","author_date":"2024-03-24T07:02:35Z","committer_date":"2024-03-24T07:04:06Z","tree_sha":"5615db4f3659130a6b3505b2ac3e4ee7d4c8c60f","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1699","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0899:725A9:17EF5F3:1C16FFE:6AB92CDE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3240,"blob_sha":"9aa475abb49eec1a0a215abbab3a820177b7234a","priority":0}],"documents":[{"path":"README.md","size":3240,"blob_sha":"9aa475abb49eec1a0a215abbab3a820177b7234a","priority":0,"status":200,"text":"# DarkroomJS\n\n![License MIT](http://img.shields.io/badge/license-MIT-blue.svg)\n\nDarkroomJS is a JavaScript library which provides basic image editing tools in\nyour browser, such as **rotation** or **cropping**. It is based on the awesome\n[FabricJS](http://fabricjs.com/) library to handle images in HTML5 canvas.\n\n\n## ⚠️ IMPORTANT UPDATE\n\nThis library has been discontinued and is **no longer maintained**.\n\nIf you're looking for an alternative, you should have a look at **[Pintura Image Editor](https://www.ktm.sh/pintura)**.\n\n- framework agnostic\n- intuitive UI and mobile touch friendly\n- resizing / free rotating\n- color adjustment / photo filters\n- annotating support\n- and much more, [try the online demo](https://www.ktm.sh/pintura):\n\n[![Pintura Image Editor demo](demo/images/doka-image-editor-gh.gif?raw=true \"Pintura Image Editor (click on the image to view)\")](https://www.ktm.sh/pintura)\n\n[**[Demo] Try Pintura Image Editor →**](https://www.ktm.sh/pintura)\n\n## Building\n\n- Install [Node](http://nodejs.org/) & `npm`.\n- Run `npm install` to build dependencies.\n- Run `npm start` to build the assets and start the demo webserver.\n\n## Usage\n\nSimply instanciate a new Darkroom object with a reference to the image element:\n\n```html\n<img src=\"some-image.jpg\" id=\"target\">\n<script>\n  new Darkroom('#target');\n<\/script>\n```\n\nYou can also pass some options:\n\n```javascript\nnew Darkroom('#target', {\n  // Canvas initialization size\n  minWidth: 100,\n  minHeight: 100,\n  maxWidth: 500,\n  maxHeight: 500,\n\n  // Plugins options\n  plugins: {\n    crop: {\n      minHeight: 50,\n      minWidth: 50,\n      ratio: 1\n    },\n    save: false // disable plugin\n  },\n\n  // Post initialization method\n  initialize: function() {\n    // Active crop selection\n    this.plugins['crop'].requireFocus();\n\n    // Add custom listener\n    this.addEventListener('core:transformation', function() { /* ... */ });\n  }\n});\n```\n\n## Why?\n\nIt's easy to get a javascript script to crop an image in a web page.\nBut if your want more features like rotation or brightness adjustment, then you\nwill have to do it yourself. No more jQuery plugins here.\nIt only uses the power of HTML5 canvas to make what ever you want with your image.\n\n## The concept\n\nThe library is designed to be easily extendable. The core script only transforms\nthe target image to a canvas with a FabricJS instance, and creates an empty toolbar.\nAll the features are then implemented in separate plugins.\n\nEach plugin is responsible for creating its own functionality.\nButtons can easily be added to the toolbar and binded with those features.\n\n## Contributing\n\nRun `npm develop` to build and watch the files while developing.\n\n## FAQ\n\nHow can I access the edited image?\n\nIn order to get the edited image data, you must ask the canvas for it. By doing so inside the callback of your choice (in this case save), you can assign the edited image data to wherever you please.\n\n```javascript\nsave: {\n      callback: function() {\n          this.darkroom.selfDestroy(); // Cleanup\n          var newImage = dkrm.canvas.toDataURL();\n          fileStorageLocation = newImage;\n      }\n  }\n```\n\n## License\n\nDarkroomJS is released under the MIT License. See the [bundled LICENSE file](LICENSE)\nfor details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2D4:3E1DA:17A760:5E1B3E:6AB92CDD"},"text_sha256":"7e4b1bc51f0fd4a57da563777be1aac1e2559588d01ec034150a02828a37ba7b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"claviska/SimpleImage","input_row":{"repository":"claviska/SimpleImage","url":"https://github.com/claviska/SimpleImage","name":"SimpleImage","owner":"claviska","description":"A PHP class that makes working with images and GD as simple as possible.","language":"PHP","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1388,"issues":231,"created_at":"2011-11-16T02:21:47Z","updated_at":"2026-07-21T20:36:22Z","first_commit_at":"2011-11-16T02:29:17Z","last_commit_at":"2025-11-20T16:58:37Z","activity_months":168.15000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:02.759Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"claviska/SimpleImage","visibility":"public","created_at":"2011-11-16T02:21:47Z","updated_at":"2026-07-21T20:36:22Z","private":false,"fork":false,"archived":false,"stargazers_count":1388,"open_issues_count":18,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1698","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17D2167:1BF84F6:6AB92CDE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1697","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:17CD93B:1BF4A8E:6AB92CDF"},"commit":{"sha":"0eb846a3641f9d8f671bd062af63163a3d71c56b","url":"https://github.com/claviska/SimpleImage/commit/0eb846a3641f9d8f671bd062af63163a3d71c56b","date":"2018-05-09T14:47:22Z","author_date":"2018-05-09T14:47:22Z","committer_date":"2018-05-09T14:47:22Z","tree_sha":"8d68c40af0b215bf003a4aaa7e6c40644e6d83c4","message_first_line":"Fixes #211"},"tree_request_status":200,"tree_rate":{"github_remaining":"1696","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088C:6E5BD:17ADC28:1BD3E08:6AB92CDF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":23135,"blob_sha":"26890f0df682491e6c740b7202f0044c29fb21a7","priority":0}],"documents":[{"path":"README.md","size":23135,"blob_sha":"26890f0df682491e6c740b7202f0044c29fb21a7","priority":0,"status":200,"text":"# SimpleImage\n\nA PHP class that makes working with images as simple as possible.\n\nDeveloped and maintained by [Cory LaViska](https://github.com/claviska).\n\n_If this project has you loving PHP image manipulation again, please consider making [a small donation](https://paypal.me/claviska) to support its development._\n\n---\n\n## Overview\n\n```php\n<?php\ntry {\n  // Create a new SimpleImage object\n  $image = new \\claviska\\SimpleImage();\n\n  // Magic! ✨\n  $image\n    ->fromFile('image.jpg')                     // load image.jpg\n    ->autoOrient()                              // adjust orientation based on exif data\n    ->resize(320, 200)                          // resize to 320x200 pixels\n    ->flip('x')                                 // flip horizontally\n    ->colorize('DarkBlue')                      // tint dark blue\n    ->border('black', 10)                       // add a 10 pixel black border\n    ->overlay('watermark.png', 'bottom right')  // add a watermark image\n    ->toFile('new-image.png', 'image/png')      // convert to PNG and save a copy to new-image.png\n    ->toScreen();                               // output to the screen\n\n  // And much more! 💪\n} catch(Exception $err) {\n  // Handle errors\n  echo $err->getMessage();\n}\n```\n\n## Requirements\n\n- PHP 5.6+\n- [GD extension](http://php.net/manual/en/book.image.php)\n\n## Features\n\n- Supports reading, writing, and converting GIF, JPEG, PNG, WEBP formats.\n- Reads and writes files, data URIs, and image strings.\n- Manipulation: crop, resize, overlay/watermark, adding TTF text\n- Drawing: arc, border, dot, ellipse, line, polygon, rectangle, rounded rectangle\n- Filters: blur, brighten, colorize, contrast, darken, desaturate, edge detect, emboss, invert, opacity, pixelate, sepia, sharpen, sketch\n- Utilities: color adjustment, darken/lighten color, extract colors\n- Properties: exif data, height/width, mime type, orientation\n- Color arguments can be passed in as any CSS color (e.g. `LightBlue`), a hex color, or an RGB(A) array.\n- Support for alpha-transparency (GIF, PNG, WEBP)\n- Chainable methods\n- Uses exceptions\n- Load with Composer or manually (just one file)\n- [Semantic Versioning](http://semver.org/)\n\n## Installation\n\nInstall with Composer:\n\n```\ncomposer require claviska/simpleimage\n```\n\nOr include the library manually:\n\n```php\n<?php\nrequire 'src/claviska/SimpleImage.php';\n```\n\n## About\n\nSimpleImage is developed and maintained by [Cory LaViska](https://github.com/claviska). Copyright A Beautiful Site, LLC.\n\nContributions are appreciated! If you enjoy using SimpleImage, especially in commercial applications, please consider [making a contribution](https://paypal.me/claviska) to support its development.\n\nThanks! 🙌\n\n## License\n\nLicensed under the [MIT license](http://opensource.org/licenses/MIT).\n\n## API\n\nOrder of awesomeness:\n\n1. Load an image\n2. Manipulate the image\n3. Save/output the image\n\nAPI tips:\n\n- An asterisk denotes a required argument.\n- Methods that return a SimpleImage object are chainable.\n- You can pass a file or data URI to the constructor to avoid calling `fromFile` or `fromDataUri`.\n- Static methods can be called with `$image::methodName()` or `\\claviska\\SimpleImage::methodName()`.\n- Colors can be a CSS color (e.g. `white`), a hex string (e.g. '#ffffff'), or an RGBA array.\n- You can pipe transparency to `normalizeColor` when you pass a CSS color or hex string: `white|0.25`\n\n### Loaders\n\n#### `fromDataUri($uri)`\n\nLoads an image from a data URI.\n\n- `$uri`* (string) - A data URI.\n\nReturns a SimpleImage object.\n\n#### `fromFile($file)`\n\nLoads an image from a file.\n\n- `$file`* (string) - The image file to load.\n\nReturns a SimpleImage object.\n\n#### `fromNew($width, $height, $color)`\n\nCreates a new image.\n\n- `$width`* (int) - The width of the image.\n- `$height`* (int) - The height of the image.\n- `$color` (string|array) - Optional fill color for the new image (default 'transparent').\n\nReturns a SimpleImage object.\n\n#### `fromString($string)`\n\nCreates a new image from a string.\n\n- `$string`* (string) - The raw image data as a string. Example:\n  ```\n  $string = file_get_contents('image.jpg');\n  ```\n\nReturns a SimpleImage object.\n\n### Savers\n\n#### `toDataUri($mimeType, $quality)`\n\nGenerates a data URI.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$quality` (int) - Image quality as a percentage (default 100).\n\nReturns a string containing a data URI.\n\n#### `toDownload($filename, $mimeType, $quality)`\n\nForces the image to be downloaded to the clients machine. Must be called before any output is sent to the screen.\n\n- `$filename`* (string) - The filename (without path) to send to the client (e.g. 'image.jpeg').\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$quality` (int) - Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toFile($file, $mimeType, $quality)`\n\nWrites the image to a file.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$quality` (int) - Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toScreen($mimeType, $quality)`\n\nOutputs the image to the screen. Must be called before any output is sent to the screen.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$quality` (int) - Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toString($mimeType, $quality)`\n\nGenerates an image string.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$quality` (int) - Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n### Utilities\n\n#### `getAspectRatio()`\n\nGets the image's current aspect ratio.\n\nReturns the aspect ratio as a float.\n\n#### `getExif()`\n\nGets the image's exif data.\n\nReturns an array of exif data or null if no data is available.\n\n#### `getHeight()`\n\nGets the image's current height.\n\nReturns the height as an integer.\n\n#### `getMimeType()`\n\nGets the mime type of the loaded image.\n\nReturns a mime type string.\n\n#### `getOrientation()`\n\nGets the image's current orientation.\n\nReturns a string: 'landscape', 'portrait', or 'square'\n\n#### `getWidth()`\n\nGets the image's current width.\n\nReturns the width as an integer.\n\n### Manipulation\n\n#### `autoOrient()`\n\nRotates an image so the orientation will be correct based on its exif data. It is safe to call this method on images that don't have exif data (no changes will be made).\nReturns a SimpleImage object.\n\n#### `bestFit($maxWidth, $maxHeight)`\n\nProportionally resize the image to fit inside a specific width and height.\n\n- `$maxWidth`* (int) - The maximum width the image can be.\n- `$maxHeight`* (int) - The maximum height the image can be.\n\nReturns a SimpleImage object.\n\n#### `crop($x1, $y1, $x2, $y2)`\n\nCrop the image.\n\n- $x1 - Top left x coordinate.\n- $y1 - Top left y coordinate.\n- $x2 - Bottom right x coordinate.\n- $y2 - Bottom right x coordinate.\n\nReturns a SimpleImage object.\n\n#### `fitToHeight($height)` (DEPRECATED)\n\nProportionally resize the image to a specific height.\n\n_This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use `resize(null, $height)` instead._\n\n- `$height`* (int) - The height to resize the image to.\n\nReturns a SimpleImage object.\n\n#### `fitToWidth($width)`  (DEPRECATED)\n\nProportionally resize the image to a specific width.\n\n_This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use `resize($width, null)` instead._\n\n- `$width`* (int) - The width to resize the image to.\n\nReturns a SimpleImage object.\n\n#### `flip($direction)`\n\nFlip the image horizontally or vertically.\n\n- `$direction`* (string) - The direction to flip: x|y|both\n\nReturns a SimpleImage object.\n\n#### `maxColors($max, $dither)`\n\nReduces the image to a maximum number of colors.\n\n- `$max`* (int) - The maximum number of colors to use.\n- `$dither` (bool) - Whether or not to use a dithering effect (default true).\n\nReturns a SimpleImage object.\n\n#### `overlay($overlay, $anchor, $opacity, $xOffset, $yOffset)`\n\nPlace an image on top of the current image.\n\n- `$overlay`* (string|SimpleImage) - The image to overlay. This can be a filename, a data URI, or a SimpleImage object.\n- `$anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right' (default 'center')\n- `$opacity` (float) - The opacity level of the overlay 0-1 (default 1).\n- `$xOffset` (int) - Horizontal offset in pixels (default 0).\n- `$yOffset` (int) - Vertical offset in pixels (default 0).\n\nReturns a SimpleImage object.\n\n#### `resize($width, $height)`\n\nResize an image to the specified dimensions. If only one dimension is specified, the image will be resized proportionally.\n\n- `$width`* (int) - The new image width.\n- `$height`* (int) - The new image height.\n\nReturns a SimpleImage object.\n\n#### `rotate($angle, $backgroundColor)`\n\nRotates the image.\n\n- `$angle`* (int) - The angle of rotation (-360 - 360).\n- `$backgroundColor` (string|array) - The background color to use for the uncovered zone area after rotation (default 'transparent').\n\nReturns a SimpleImage object.\n\n#### `text($text, $options, &$boundary)`\n\nAdds text to the image.\n\n- `$text*` (string) - The desired text.\n- `$options` (array) - An array of options.\n  - `fontFile`* (string) - The TrueType (or compatible) font file to use.\n  - `size` (int) - The size of the font in pixels (default 12).\n  - `color` (string|array) - The text color (default black).\n  - `anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right',\n    'top left', 'top right', 'bottom left', 'bottom right' (default 'center').\n  - `xOffset` (int) - The horizontal offset in pixels (default 0).\n  - `yOffset` (int) - The vertical offset in pixels (default 0).\n  - `shadow` (array) - Text shadow params.\n    - `x`* (int) - Horizontal offset in pixels.\n    - `y`* (int) - Vertical offset in pixels.\n    - `color`* (string|array) - The text shadow color.\n- `$boundary` (array) - If passed, this variable will contain an array with coordinates that\n  surround the text: [x1, y1, x2, y2, width, height]. This can be used for calculating the\n  text's position after it gets added to the image.\n\nReturns a SimpleImage object.\n\n#### `thumbnail($width, $height, $anchor)`\n\nCreates a thumbnail image. This function attempts to get the image as close to the provided dimensions as possible, then crops the remaining overflow to force the desired size. Useful for generating thumbnail images.\n\n- `$width`* (int) - The thumbnail width.\n- `$height`* (int) - The thumbnail height.\n- `$anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right' (default 'center').\n\nReturns a SimpleImage object.\n\n###  Drawing\n\n#### `arc($x, $y, $width, $height, $start, $end, $color, $thickness)`\n\nDraws an arc.\n\n- `$x`* (int) - The x coordinate of the arc's center.\n- `$y`* (int) - The y coordinate of the arc's center.\n- `$width`* (int) - The width of the arc.\n- `$height`* (int) - The height of the arc.\n- `$start`* (int) - The start of the arc in degrees.\n- `$end`* (int) - The end of the arc in degrees.\n- `$color`* (string|array) - The arc color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `border($color, $thickness)`\n\nDraws a border around the image.\n\n- `$color`* (string|array) - The border color.\n- `$thickness` (int) - The thickness of the border (default 1).\n\nReturns a SimpleImage object.\n\n#### `dot($x, $y, $color)`\n\nDraws a single pixel dot.\n\n- `$x`* (int) - The x coordinate of the dot.\n- `$y`* (int) - The y coordinate of the dot.\n- `$color`* (string|array) - The dot color.\n\nReturns a SimpleImage object.\n\n#### `ellipse($x, $y, $width, $height, $color, $thickness)`\n\nDraws an ellipse.\n\n- `$x`* (int) - The x coordinate of the center.\n- `$y`* (int) - The y coordinate of the center.\n- `$width`* (int) - The ellipse width.\n- `$height`* (int) - The ellipse height.\n- `$color`* (string|array) - The ellipse color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `fill($color)`\n\nFills the image with a solid color.\n\n- `$color` (string|array) - The fill color.\n\nReturns a SimpleImage object.\n\n#### `line($x1, $y1, $x2, $y2, $color, $thickness)`\n\nDraws a line.\n\n- `$x1`* (int) - The x coordinate for the first point.\n- `$y1`* (int) - The y coordinate for the first point.\n- `$x2`* (int) - The x coordinate for the second point.\n- `$y2`* (int) - The y coordinate for the second point.\n- `$color` (string|array) - The line color.\n- `$thickness` (int) - The line thickness (default 1).\n\nReturns a SimpleImage object.\n\n#### `polygon($vertices, $color, $thickness)`\n\nDraws a polygon.\n\n- `$vertices`* (array) - The polygon's vertices in an array of x/y arrays. Example:\n  ```\n  [\n    ['x' => x1, 'y' => y1],\n    ['x' => x2, 'y' => y2],\n    ['x' => xN, 'y' => yN]\n  ]\n  ```\n- `$color`* (string|array) - The polygon color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `rectangle($x1, $y1, $x2, $y2, $color, $thickness)`\n\nDraws a rectangle.\n\n- `$x1`* (int) - The upper left x coordinate.\n- `$y1`* (int) - The upper left y coordinate.\n- `$x2`* (int) - The bottom right x coordinate.\n- `$y2`* (int) - The bottom right y coordinate.\n- `$color`* (string|array) - The rectangle color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $thickness)`\n\nDraws a rounded rectangle.\n\n- `$x1`* (int) - The upper left x coordinate.\n- `$y1`* (int) - The upper left y coordinate.\n- `$x2`* (int) - The bottom right x coordinate.\n- `$y2`* (int) - The bottom right y coordinate.\n- `$radius`* (int) - The border radius in pixels.\n- `$color`* (string|array) - The rectangle color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n### Filters\n\n#### `blur($type, $passes)`\n\nApplies the blur filter.\n\n- `$type` (string) - The blur algorithm to use: 'selective', 'gaussian' (default 'gaussian').\n- `$passes` (int) - The number of time to apply the filter, enhancing the effect (default 1).\n\nReturns a SimpleImage object.\n\n#### `brighten($percentage)`\n\nApplies the brightness filter to brighten the image.\n\n- `$percentage`* (int) - Percentage to brighten the image (0 - 100).\n\nReturns a SimpleImage object.\n\n#### `colorize($color)`\n\nApplies the colorize filter.\n\n- `$color`* (string|array) - The filter color.\n\nReturns a SimpleImage object.\n\n#### `contrast($percentage)`\n\nApplies the contrast filter.\n\n- `$percentage`* (int) - Percentage to adjust (-100 - 100).\n\nReturns a SimpleImage object.\n\n#### `darken($percentage)`\n\nApplies the brightness filter to darken the image.\n\n- `$percentage`* (int) - Percentage to darken the image (0 - 100).\n\nReturns a SimpleImage object.\n\n#### `desaturate()`\n\nApplies the desaturate (grayscale) filter.\n\nReturns a SimpleImage object.\n\n#### `duotone($lightColor, $darkColor)`\n\nApplies the duotone filter to the image.\n\n- `$lightColor`* (string|array) - The lightest color in the duotone.\n- `$darkColor`* (string|array) - The darkest color in the duotone.\n\nReturns a SimpleImage object.\n\n#### `edgeDetect()`\n\nApplies the edge detect filter.\n\nReturns a SimpleImage object.\n\n#### `emboss()`\n\nApplies the emboss filter.\n\nReturns a SimpleImage object.\n\n#### `invert()`\n\nInverts the image's colors.\n\nReturns a SimpleImage object.\n\n#### `opacity()`\n\nChanges the image's opacity level.\n\n- `$opacity`* (float) - The desired opacity level (0 - 1).\n\nReturns a SimpleImage object.\n\n#### `pixelate($size)`\n\nApplies the pixelate filter.\n\n- `$size` (int) - The size of the blocks in pixels (default 10).\n\nReturns a SimpleImage object.\n\n#### `sepia()`\n\nSimulates a sepia effect by desaturating the image and applying a sepia tone.\n\nReturns a SimpleImage object.\n\n#### `sharpen()`\n\nSharpens the image.\n\nReturns a SimpleImage object.\n\n#### `sketch()`\n\nApplies the mean remove filter to produce a sketch effect.\n\nReturns a SimpleImage object.\n\n### Color utilities\n\n#### `(static) adjustColor($color, $red, $green, $blue, $alpha)`\n\nAdjusts a color by increasing/decreasing red/green/blue/alpha values independently.\n\n- `$color`* (string|array) - The color to adjust.\n- `$red`* (int) - Red adjustment (-255 - 255).\n- `$green`* (int) - Green adjustment (-255 - 255).\n- `$blue`* (int) - Blue adjustment (-255 - 255).\n- `$alpha`* (float) - Alpha adjustment (-1 - 1).\n\nReturns an RGBA color array.\n\n#### `(static) darkenColor($color, $amount)`\n\nDarkens a color.\n\n- `$color`* (string|array) - The color to darken.\n- `$amount`* (int) - Amount to darken (0 - 255).\n\nReturns an RGBA color array.\n\n#### `extractColors($count = 10, $backgroundColor = null)`\n\nExtracts colors from an image like a human would do.™ This method requires the third-party library \\League\\ColorExtractor. If you're using Composer, it will be installed for you automatically.\n\n- `$count` (int) - The max number of colors to extract (default 5).\n- `$backgroundColor` (string|array) - By default any pixel with alpha value greater than zero will be discarded. This is because transparent colors are not perceived as is. For example, fully transparent black would be seen white on a white background. So if you want to take transparency into account, you have to specify a default background color.\n\nReturns an array of RGBA colors arrays.\n\n#### `getColorAt($x, $y)`\n\nGets the RGBA value of a single pixel.\n\n- `$x`* (int) - The horizontal position of the pixel.\n- `$y`* (int) - The vertical position of the pixel.\n\nReturns an RGBA color array or false if the x/y position is off the canvas.\n\n#### `(static) lightenColor($color, $amount)`\n\nLightens a color.\n\n- `$color`* (string|array) - The color to lighten.\n- `$amount`* (int) - Amount to darken (0 - 255).\n\nReturns an RGBA color array.\n\n#### `(static) normalizeColor($color)`\n\nNormalizes a hex or array color value to a well-formatted RGBA array.\n\n- `$color`* (string|array) - A CSS color name, hex string, or an array [red, green, blue, alpha].\n\nYou can pipe alpha transparency through hex strings and color names. For example:\n\n  #fff|0.50 <-- 50% white\n  red|0.25 <-- 25% red\n\nReturns an array: [red, green, blue, alpha]\n\n### Exceptions\n\nSimpleImage throws standard exceptions when things go wrong. You should always use a try/catch block around your code to properly handle them.\n\n```php\n<?php\ntry {\n  $image = new \\claviska\\SimpleImage('image.jpeg')\n  // ...\n} catch(Exception $err) {\n  echo $err->getMessage();\n}\n```\n\nTo check for specific errors, compare `$err->getCode()` to the defined error constants.\n\n```php\n<?php\ntry {\n  $image = new \\claviska\\SimpleImage('image.jpeg')\n  // ...\n} catch(Exception $err) {\n  if($err->getCode() === $image::ERR_FILE_NOT_FOUND) {\n    echo 'File not found!';\n  } else {\n    echo $err->getMessage();\n  }\n}\n```\n\nAs a best practice, always use the defined constants instead of their integers values. The values will likely change in future versions, and WILL NOT be considered a breaking change.\n\n- `ERR_FILE_NOT_FOUND` - The specified file could not be found or loaded for some reason.\n- `ERR_FONT_FILE` - The specified font file could not be loaded.\n- `ERR_FREETYPE_NOT_ENABLED` - Freetype support is not enabled in your version of PHP.\n- `ERR_GD_NOT_ENABLED` - The GD extension is not enabled in your version of PHP.\n- `ERR_LIB_NOT_LOADED` - A required library has not been loaded.\n- `ERR_INVALID_COLOR` - An invalid color value was passed as an argument.\n- `ERR_INVALID_DATA_URI` - The specified data URI is not valid.\n- `ERR_INVALID_IMAGE` - The specified image is not valid.\n- `ERR_UNSUPPORTED_FORMAT` - The image format specified is not valid.\n- `ERR_WEBP_NOT_ENABLED` - WEBP support is not enabled in your version of PHP.\n- `ERR_WRITE` - Unable to write to the file system.\n\n### Useful Things To Know\n\n- Color arguments can be a CSS color name (e.g. `LightBlue`), a hex color string (e.g. `#0099dd`), or an RGB(A) array (e.g. `['red' => 255, 'green' => 0, 'blue' => 0, 'alpha' => 1]`).\n\n- When `$thickness` > 1, GD draws lines of the desired thickness from the center origin. For example, a rectangle drawn at [10, 10, 20, 20] with a thickness of 3 will actually be draw at [9, 9, 21, 21]. This is true for all shapes and is not a bug in the SimpleImage library.\n\n## Differences from SimpleImage 2.x\n\n- Normalized color arguments (colors can be a CSS color name, hex color, or RGB(A) array).\n- Normalized alpha (opacity) arguments: 0 (transparent) - 1 (opaque)\n- Added text shadow to `text` method.\n- Added `fromString()` method to load images from strings.\n- Added `toString()` method to generate image strings.\n- Added `arc` method for drawing arcs.\n- Added `border` method for drawing borders.\n- Added `dot` method for drawing individual pixels.\n- Added `ellipse` method for drawing ellipses and circles.\n- Added `line` method for drawing lines.\n- Added `polygon` method for drawing polygons.\n- Added `rectangle` method for drawing rectangles.\n- Added `roundedRectangle` method for drawing rounded rectangles.\n- Added `adjustColor` method for modifying RGBA color channels to create relative color variations.\n- Added `darkenColor` method to darken a color.\n- Added `extractColors` method to get the most common colors from the image.\n- Added `getColorAt` method to get the RGBA values of a specific pixel.\n- Added `lightenColor` method to lighten a color.\n- Added `toDownload` method to force the image to download on the client's machine.\n- Added `duotone` filter to create duotone images.\n- Added `sharpen` method to sharpen the image.\n- Changed namespace from `abeautifulsite` to `claviska`.\n- Changed `create` method to `fromNew`.\n- Changed `load` method to `fromFile`.\n- Changed `load_base64` method to `fromDataUri`.\n- Changed `output` method to `toScreen`.x\n- Changed `output_base64` method to `toDataUri`.\n- Changed `save` method to `toFile`.\n- Changed `text` method to accept an array of options instead of tons of arguments.\n- Removed text stroke from `text` method because it produced dirty results and didn't support transparency.\n- Removed `smooth` method because its arguments in the PHP manual aren't documented well.\n- Removed deprecated method `adaptive_resize` (use `thumbnail` instead).\n- Removed `get_meta_data` (use `getExif`, `getHeight`, `getMime`, `getOrientation`, and `getWidth` instead).\n- Added [.editorconfig](http://editorconfig.org/) file. Please make sure your editor supports these settings before submitting contributions.\n- Switched from four spaces to two for indentations (sorry PHP-FIG!).\n- Switched from underscore_methods to camelCaseMethods.\n- Organized methods into groups based on function\n- Removed PHPDoc comments. At this time, I don't wish to incorporate them into the library.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86F6:4F9CC:1721FB:5D9346:6AB92CDF"},"text_sha256":"1090b75e380cf73ec183616260d7d71e152933ed539c67e573a1b3600d194ea9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1695","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F7:14A1F2:18234F3:1C4AC35:6AB92CE0"},"commit":{"sha":"6d928c779e343100cef40f75bac3e301c32c3741","url":"https://github.com/claviska/SimpleImage/commit/6d928c779e343100cef40f75bac3e301c32c3741","date":"2025-11-20T16:58:37Z","author_date":"2025-11-20T16:58:37Z","committer_date":"2025-11-20T16:58:37Z","tree_sha":"b02be3c9ff29787758096b99a57e60efbf090165","message_first_line":"Remove deprecated `imagedestroy()` (for PHP 8.5 support) (#344)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1694","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17E28FA:1C09F53:6AB92CE1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27108,"blob_sha":"e2308bc36319fceacad471e33f936e9300cc82d1","priority":0}],"documents":[{"path":"README.md","size":27108,"blob_sha":"e2308bc36319fceacad471e33f936e9300cc82d1","priority":0,"status":200,"text":"# SimpleImage\n\nA PHP class that makes working with images as simple as possible.\n\nDeveloped and maintained by [Cory LaViska](https://github.com/claviska).\n\n_If this project has you loving PHP image manipulation again, please consider [sponsoring me](https://github.com/sponsors/claviska) to support its development._\n\n---\n\n## Overview\n\n```php\n<?php\ntry {\n  // Create a new SimpleImage object\n  $image = new \\claviska\\SimpleImage();\n\n  // Magic! ✨\n  $image\n    ->fromFile('image.jpg')                     // load image.jpg\n    ->autoOrient()                              // adjust orientation based on exif data\n    ->resize(320, 200)                          // resize to 320x200 pixels\n    ->flip('x')                                 // flip horizontally\n    ->colorize('DarkBlue')                      // tint dark blue\n    ->border('black', 10)                       // add a 10 pixel black border\n    ->overlay('watermark.png', 'bottom right')  // add a watermark image\n    ->toFile('new-image.png', 'image/png')      // convert to PNG and save a copy to new-image.png\n    ->toScreen();                               // output to the screen\n\n  // And much more! 💪\n} catch(Exception $err) {\n  // Handle errors\n  echo $err->getMessage();\n}\n```\n\n## Requirements\n\n- PHP 8.0+\n- [GD extension](http://php.net/manual/en/book.image.php)\n\nFor PHP versions below 7.0, please use [SimpleImage v3.7.2](https://github.com/claviska/SimpleImage/releases/tag/3.7.2)\n\n## Features\n\n- Supports reading, writing, and converting GIF, JPEG, PNG, WEBP, BMP, AVIF formats.\n- Reads and writes files, data URIs, and image strings.\n- Manipulation: crop, resize, overlay/watermark, adding TTF text\n- Drawing: arc, border, dot, ellipse, line, polygon, rectangle, rounded rectangle\n- Filters: blur, brighten, colorize, contrast, darken, desaturate, edge detect, emboss, invert, opacity, pixelate, sepia, sharpen, sketch\n- Utilities: color adjustment, darken/lighten color, extract colors\n- Properties: exif data, height/width, mime type, orientation\n- Color arguments can be passed in as any CSS color (e.g. `LightBlue`), a hex color, or an RGB(A) array.\n- Support for alpha-transparency (GIF, PNG, WEBP, AVIF)\n- Chainable methods\n- Uses exceptions\n- Load with Composer or manually (just one file)\n- [Semantic Versioning](http://semver.org/)\n\n## Installation\n\nInstall with Composer:\n\n```\ncomposer require claviska/simpleimage\n```\n\nOr include the library manually:\n\n```php\n<?php\nrequire 'src/claviska/SimpleImage.php';\n```\n\n## About\n\nSimpleImage is developed and maintained by [Cory LaViska](https://github.com/claviska). Copyright A Beautiful Site, LLC.\n\nIf you enjoy using SimpleImage, especially in commercial applications, please consider [sponsoring me](https://github.com/sponsors/claviska) to support its development.\n\nThanks! 🙌\n\n## License\n\nLicensed under the [MIT license](http://opensource.org/licenses/MIT).\n\n## API\n\nOrder of awesomeness:\n\n1. Load an image\n2. Manipulate the image\n3. Save/output the image\n\nAPI tips:\n\n- An asterisk denotes a required argument.\n- Methods that return a SimpleImage object are chainable.\n- You can pass a file or data URI to the constructor to avoid calling `fromFile` or `fromDataUri`.\n- Static methods can be called with `$image::methodName()` or `\\claviska\\SimpleImage::methodName()`.\n- Colors can be a CSS color (e.g. `white`), a hex string (e.g. '#ffffff'), or an RGBA array.\n- You can pipe transparency to `normalizeColor` when you pass a CSS color or hex string: `white|0.25`\n\n### Loaders\n\n#### `fromDataUri($uri)`\n\nLoads an image from a data URI.\n\n- `$uri`* (string) - A data URI.\n\nReturns a SimpleImage object.\n\n#### `fromFile($file)`\n\nLoads an image from a file.\n\n- `$file`* (string) - The image file to load.\n\nReturns a SimpleImage object.\n\n#### `fromNew($width, $height, $color)`\n\nCreates a new image.\n\n- `$width`* (int) - The width of the image.\n- `$height`* (int) - The height of the image.\n- `$color` (string|array) - Optional fill color for the new image (default 'transparent').\n\nReturns a SimpleImage object.\n\n#### `fromString($string)`\n\nCreates a new image from a string.\n\n- `$string`* (string) - The raw image data as a string. Example:\n  ```\n  $string = file_get_contents('image.jpg');\n  ```\n\nReturns a SimpleImage object.\n\n### Savers\n\n#### `toDataUri($mimeType, $options)`\n\nGenerates a data URI.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns a string containing a data URI.\n\n#### `toDownload($filename, $mimeType, $options)`\n\nForces the image to be downloaded to the clients machine. Must be called before any output is sent to the screen.\n\n- `$filename`* (string) - The filename (without path) to send to the client (e.g. 'image.jpeg').\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toFile($file, $mimeType, $options)`\n\nWrites the image to a file.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toScreen($mimeType, $options)`\n\nOutputs the image to the screen. Must be called before any output is sent to the screen.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `toString($mimeType, $options)`\n\nGenerates an image string.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns a SimpleImage object.\n\n#### `generate($mimeType, $options)`\n\nGenerates an image.\n\n- `$mimeType` (string) - The image format to output as a mime type (defaults to the original mime type).\n- `$options` (array|int) - Array of options or Image quality as a percentage (default 100).\n\nReturns an array: [mimeType, data]\n\n#### Options array\n\nInstead of providing the quality as an integer as the last function parameter you can also set various options depending on the targeted Mime type using an associative array.\n\n```php\n$image->toFile($file, 'image/avif', [\n    // JPG, WEBP, AVIF (default 100)\n    'quality' => 100,\n\n    // AVIF (default -1 which is 6)\n    // range of slow and small file 0 to 10 fast but big file\n    'speed' => -1,\n]);\n```\n\n```php\n$image->toFile($file, 'image/bmp', [\n    // BMP: boolean (default true)\n    'compression' => true,\n\n    // BMP, JPG (default null, keep the same)\n    'interlace' => null,\n]);\n```\n\n```php\n$image->toFile($file, 'image/gif', [\n    // GIF, PNG (default true)\n    'alpha' => true,\n]);\n```\n\n```php\n$image->toFile($file, 'image/jpeg', [\n    // BMP, JPG (default null, keep the same)\n    'interlace' => null,\n\n    // JPG, WEBP, AVIF (default 100)\n    'quality' => 100,\n]);\n```\n\n```php\n$image->toFile($file, 'image/png', [\n    // GIF, PNG (default true)\n    'alpha' => true,\n\n    // PNG: 0-10, defaults to zlib (default 6)\n    'compression' => -1,\n\n    // PNG (default -1)\n    'filters' => -1,\n\n    // has no effect on PNG images, since the format is lossless\n    // 'quality' => 100,\n]);\n```\n\n```php\n$image->toFile($file, 'image/webp', [\n    // JPG, WEBP, AVIF (default 100)\n    'quality' => 100,\n]);\n```\n\n### Utilities\n\n#### `getAspectRatio()`\n\nGets the image's current aspect ratio.\n\nReturns the aspect ratio as a float.\n\n#### `getExif()`\n\nGets the image's exif data.\n\nReturns an array of exif data or null if no data is available.\n\n#### `getHeight()`\n\nGets the image's current height.\n\nReturns the height as an integer.\n\n#### `getMimeType()`\n\nGets the mime type of the loaded image.\n\nReturns a mime type string.\n\n#### `getOrientation()`\n\nGets the image's current orientation.\n\nReturns a string: 'landscape', 'portrait', or 'square'\n\n#### `getResolution()`\n\nGets the image's current resolution in DPI.\n\nReturns an array of integers: [0 => 96, 1 => 96]\n\n#### `getWidth()`\n\nGets the image's current width.\n\nReturns the width as an integer.\n\n#### `hasImage()`\n\nChecks if the SimpleImage object has loaded an image.\n\nReturns a boolean.\n\n#### `reset()`\n\n> [!NOTE]  \n> The `reset()` method has been deprecated in SimpleImage 4.4.0. Calling the method has no effect.\n\nDestroys the image resource.\n\nReturns a SimpleImage object.\n\n### Manipulation\n\n#### `autoOrient()`\n\nRotates an image so the orientation will be correct based on its exif data. It is safe to call this method on images that don't have exif data (no changes will be made).\nReturns a SimpleImage object.\n\n#### `bestFit($maxWidth, $maxHeight)`\n\nProportionally resize the image to fit inside a specific width and height.\n\n- `$maxWidth`* (int) - The maximum width the image can be.\n- `$maxHeight`* (int) - The maximum height the image can be.\n\nReturns a SimpleImage object.\n\n#### `crop($x1, $y1, $x2, $y2)`\n\nCrop the image.\n\n- $x1 - Top left x coordinate.\n- $y1 - Top left y coordinate.\n- $x2 - Bottom right x coordinate.\n- $y2 - Bottom right x coordinate.\n\nReturns a SimpleImage object.\n\n#### `fitToHeight($height)` (DEPRECATED)\n\nProportionally resize the image to a specific height.\n\n_This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use `resize(null, $height)` instead._\n\n- `$height`* (int) - The height to resize the image to.\n\nReturns a SimpleImage object.\n\n#### `fitToWidth($width)`  (DEPRECATED)\n\nProportionally resize the image to a specific width.\n\n_This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use `resize($width, null)` instead._\n\n- `$width`* (int) - The width to resize the image to.\n\nReturns a SimpleImage object.\n\n#### `flip($direction)`\n\nFlip the image horizontally or vertically.\n\n- `$direction`* (string) - The direction to flip: x|y|both\n\nReturns a SimpleImage object.\n\n#### `maxColors($max, $dither)`\n\nReduces the image to a maximum number of colors.\n\n- `$max`* (int) - The maximum number of colors to use.\n- `$dither` (bool) - Whether or not to use a dithering effect (default true).\n\nReturns a SimpleImage object.\n\n#### `overlay($overlay, $anchor, $opacity, $xOffset, $yOffset)`\n\nPlace an image on top of the current image.\n\n- `$overlay`* (string|SimpleImage) - The image to overlay. This can be a filename, a data URI, or a SimpleImage object.\n- `$anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right' (default 'center')\n- `$opacity` (float) - The opacity level of the overlay 0-1 (default 1).\n- `$xOffset` (int) - Horizontal offset in pixels (default 0).\n- `$yOffset` (int) - Vertical offset in pixels (default 0).\n- `$calculateOffsetFromEdge` (bool) - Calculate Offset referring to the edges of the image. $xOffset and $yOffset have no effect in center anchor. (default false).\n\nReturns a SimpleImage object.\n\n#### `resize($width, $height)`\n\nResize an image to the specified dimensions. If only one dimension is specified, the image will be resized proportionally.\n\n- `$width`* (int) - The new image width.\n- `$height`* (int) - The new image height.\n\nReturns a SimpleImage object.\n\n#### `resolution($res_x, $res_y)`\n\nChanges the resolution (DPI) of an image.\n\n- `$res_x`* (int) - The horizontal resolution, in DPI.\n- `$res_y` (int) - The vertical resolution, in DPI.\n\nReturns a SimpleImage object.\n\n#### `rotate($angle, $backgroundColor)`\n\nRotates the image.\n\n- `$angle`* (int) - The angle of rotation (-360 - 360).\n- `$backgroundColor` (string|array) - The background color to use for the uncovered zone area after rotation (default 'transparent').\n\nReturns a SimpleImage object.\n\n#### `text($text, $options, &$boundary)`\n\nAdds text to the image.\n\n- `$text*` (string) - The desired text.\n- `$options` (array) - An array of options.\n  - `fontFile`* (string) - The TrueType (or compatible) font file to use.\n  - `size` (int) - The size of the font in pixels (default 12).\n  - `color` (string|array) - The text color (default black).\n  - `anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right',\n    'top left', 'top right', 'bottom left', 'bottom right' (default 'center').\n  - `xOffset` (int) - The horizontal offset in pixels (default 0).\n  - `yOffset` (int) - The vertical offset in pixels (default 0).\n  - `shadow` (array) - Text shadow params.\n      - `x`* (int) - Horizontal offset in pixels.\n      - `y`* (int) - Vertical offset in pixels.\n      - `color`* (string|array) - The text shadow color.\n  - `calculateOffsetFromEdge` (bool) - Calculate Offset referring to the edges of the image (default false).\n  - `baselineAlign` (bool) - Align the text font with the baseline. (default true).\n- `$boundary` (array) - If passed, this variable will contain an array with coordinates that\n  surround the text: [x1, y1, x2, y2, width, height]. This can be used for calculating the\n  text's position after it gets added to the image.\n\nReturns a SimpleImage object.\n\n#### `thumbnail($width, $height, $anchor)`\n\nCreates a thumbnail image. This function attempts to get the image as close to the provided dimensions as possible, then crops the remaining overflow to force the desired size. Useful for generating thumbnail images.\n\n- `$width`* (int) - The thumbnail width.\n- `$height`* (int) - The thumbnail height.\n- `$anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right' (default 'center').\n\nReturns a SimpleImage object.\n\n###  Drawing\n\n#### `arc($x, $y, $width, $height, $start, $end, $color, $thickness)`\n\nDraws an arc.\n\n- `$x`* (int) - The x coordinate of the arc's center.\n- `$y`* (int) - The y coordinate of the arc's center.\n- `$width`* (int) - The width of the arc.\n- `$height`* (int) - The height of the arc.\n- `$start`* (int) - The start of the arc in degrees.\n- `$end`* (int) - The end of the arc in degrees.\n- `$color`* (string|array) - The arc color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `border($color, $thickness)`\n\nDraws a border around the image.\n\n- `$color`* (string|array) - The border color.\n- `$thickness` (int) - The thickness of the border (default 1).\n\nReturns a SimpleImage object.\n\n#### `dot($x, $y, $color)`\n\nDraws a single pixel dot.\n\n- `$x`* (int) - The x coordinate of the dot.\n- `$y`* (int) - The y coordinate of the dot.\n- `$color`* (string|array) - The dot color.\n\nReturns a SimpleImage object.\n\n#### `ellipse($x, $y, $width, $height, $color, $thickness)`\n\nDraws an ellipse.\n\n- `$x`* (int) - The x coordinate of the center.\n- `$y`* (int) - The y coordinate of the center.\n- `$width`* (int) - The ellipse width.\n- `$height`* (int) - The ellipse height.\n- `$color`* (string|array) - The ellipse color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `fill($color)`\n\nFills the image with a solid color.\n\n- `$color` (string|array) - The fill color.\n\nReturns a SimpleImage object.\n\n#### `line($x1, $y1, $x2, $y2, $color, $thickness)`\n\nDraws a line.\n\n- `$x1`* (int) - The x coordinate for the first point.\n- `$y1`* (int) - The y coordinate for the first point.\n- `$x2`* (int) - The x coordinate for the second point.\n- `$y2`* (int) - The y coordinate for the second point.\n- `$color` (string|array) - The line color.\n- `$thickness` (int) - The line thickness (default 1).\n\nReturns a SimpleImage object.\n\n#### `polygon($vertices, $color, $thickness)`\n\nDraws a polygon.\n\n- `$vertices`* (array) - The polygon's vertices in an array of x/y arrays. Example:\n  ```\n  [\n    ['x' => x1, 'y' => y1],\n    ['x' => x2, 'y' => y2],\n    ['x' => xN, 'y' => yN]\n  ]\n  ```\n- `$color`* (string|array) - The polygon color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `rectangle($x1, $y1, $x2, $y2, $color, $thickness)`\n\nDraws a rectangle.\n\n- `$x1`* (int) - The upper left x coordinate.\n- `$y1`* (int) - The upper left y coordinate.\n- `$x2`* (int) - The bottom right x coordinate.\n- `$y2`* (int) - The bottom right y coordinate.\n- `$color`* (string|array) - The rectangle color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n#### `roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $thickness)`\n\nDraws a rounded rectangle.\n\n- `$x1`* (int) - The upper left x coordinate.\n- `$y1`* (int) - The upper left y coordinate.\n- `$x2`* (int) - The bottom right x coordinate.\n- `$y2`* (int) - The bottom right y coordinate.\n- `$radius`* (int) - The border radius in pixels.\n- `$color`* (string|array) - The rectangle color.\n- `$thickness` (int|string) - Line thickness in pixels or 'filled' (default 1).\n\nReturns a SimpleImage object.\n\n### Filters\n\n#### `blur($type, $passes)`\n\nApplies the blur filter.\n\n- `$type` (string) - The blur algorithm to use: 'selective', 'gaussian' (default 'gaussian').\n- `$passes` (int) - The number of time to apply the filter, enhancing the effect (default 1).\n\nReturns a SimpleImage object.\n\n#### `brighten($percentage)`\n\nApplies the brightness filter to brighten the image.\n\n- `$percentage`* (int) - Percentage to brighten the image (0 - 100).\n\nReturns a SimpleImage object.\n\n#### `colorize($color)`\n\nApplies the colorize filter.\n\n- `$color`* (string|array) - The filter color.\n\nReturns a SimpleImage object.\n\n#### `contrast($percentage)`\n\nApplies the contrast filter.\n\n- `$percentage`* (int) - Percentage to adjust (-100 - 100).\n\nReturns a SimpleImage object.\n\n#### `darken($percentage)`\n\nApplies the brightness filter to darken the image.\n\n- `$percentage`* (int) - Percentage to darken the image (0 - 100).\n\nReturns a SimpleImage object.\n\n#### `desaturate()`\n\nApplies the desaturate (grayscale) filter.\n\nReturns a SimpleImage object.\n\n#### `duotone($lightColor, $darkColor)`\n\nApplies the duotone filter to the image.\n\n- `$lightColor`* (string|array) - The lightest color in the duotone.\n- `$darkColor`* (string|array) - The darkest color in the duotone.\n\nReturns a SimpleImage object.\n\n#### `edgeDetect()`\n\nApplies the edge detect filter.\n\nReturns a SimpleImage object.\n\n#### `emboss()`\n\nApplies the emboss filter.\n\nReturns a SimpleImage object.\n\n#### `invert()`\n\nInverts the image's colors.\n\nReturns a SimpleImage object.\n\n#### `opacity()`\n\nChanges the image's opacity level.\n\n- `$opacity`* (float) - The desired opacity level (0 - 1).\n\nReturns a SimpleImage object.\n\n#### `pixelate($size)`\n\nApplies the pixelate filter.\n\n- `$size` (int) - The size of the blocks in pixels (default 10).\n\nReturns a SimpleImage object.\n\n#### `sepia()`\n\nSimulates a sepia effect by desaturating the image and applying a sepia tone.\n\nReturns a SimpleImage object.\n\n#### `sharpen($amount)`\n\nSharpens the image.\n\n- `$amount` (int) - Sharpening amount (1 - 100, default 50)\n\nReturns a SimpleImage object.\n\n#### `sketch()`\n\nApplies the mean remove filter to produce a sketch effect.\n\nReturns a SimpleImage object.\n\n### Color utilities\n\n#### `(static) adjustColor($color, $red, $green, $blue, $alpha)`\n\nAdjusts a color by increasing/decreasing red/green/blue/alpha values independently.\n\n- `$color`* (string|array) - The color to adjust.\n- `$red`* (int) - Red adjustment (-255 - 255).\n- `$green`* (int) - Green adjustment (-255 - 255).\n- `$blue`* (int) - Blue adjustment (-255 - 255).\n- `$alpha`* (float) - Alpha adjustment (-1 - 1).\n\nReturns an RGBA color array.\n\n#### `(static) darkenColor($color, $amount)`\n\nDarkens a color.\n\n- `$color`* (string|array) - The color to darken.\n- `$amount`* (int) - Amount to darken (0 - 255).\n\nReturns an RGBA color array.\n\n#### `extractColors($count = 10, $backgroundColor = null)`\n\nExtracts colors from an image like a human would do.™ This method requires the third-party library \\League\\ColorExtractor. If you're using Composer, it will be installed for you automatically.\n\n- `$count` (int) - The max number of colors to extract (default 5).\n- `$backgroundColor` (string|array) - By default any pixel with alpha value greater than zero will be discarded. This is because transparent colors are not perceived as is. For example, fully transparent black would be seen white on a white background. So if you want to take transparency into account, you have to specify a default background color.\n\nReturns an array of RGBA colors arrays.\n\n#### `getColorAt($x, $y)`\n\nGets the RGBA value of a single pixel.\n\n- `$x`* (int) - The horizontal position of the pixel.\n- `$y`* (int) - The vertical position of the pixel.\n\nReturns an RGBA color array or false if the x/y position is off the canvas.\n\n#### `(static) lightenColor($color, $amount)`\n\nLightens a color.\n\n- `$color`* (string|array) - The color to lighten.\n- `$amount`* (int) - Amount to darken (0 - 255).\n\nReturns an RGBA color array.\n\n#### `(static) normalizeColor($color)`\n\nNormalizes a hex or array color value to a well-formatted RGBA array.\n\n- `$color`* (string|array) - A CSS color name, hex string, or an array [red, green, blue, alpha].\n\nYou can pipe alpha transparency through hex strings and color names. For example:\n\n  #fff|0.50 <-- 50% white\n  red|0.25 <-- 25% red\n\nReturns an array: [red, green, blue, alpha]\n\n### Exceptions\n\nSimpleImage throws standard exceptions when things go wrong. You should always use a try/catch block around your code to properly handle them.\n\n```php\n<?php\ntry {\n  $image = new \\claviska\\SimpleImage('image.jpeg')\n  // ...\n} catch(Exception $err) {\n  echo $err->getMessage();\n}\n```\n\nTo check for specific errors, compare `$err->getCode()` to the defined error constants.\n\n```php\n<?php\ntry {\n  $image = new \\claviska\\SimpleImage('image.jpeg')\n  // ...\n} catch(Exception $err) {\n  if($err->getCode() === $image::ERR_FILE_NOT_FOUND) {\n    echo 'File not found!';\n  } else {\n    echo $err->getMessage();\n  }\n}\n```\n\nAs a best practice, always use the defined constants instead of their integers values. The values will likely change in future versions, and WILL NOT be considered a breaking change.\n\n- `ERR_FILE_NOT_FOUND` - The specified file could not be found or loaded for some reason.\n- `ERR_FONT_FILE` - The specified font file could not be loaded.\n- `ERR_FREETYPE_NOT_ENABLED` - Freetype support is not enabled in your version of PHP.\n- `ERR_GD_NOT_ENABLED` - The GD extension is not enabled in your version of PHP.\n- `ERR_LIB_NOT_LOADED` - A required library has not been loaded.\n- `ERR_INVALID_COLOR` - An invalid color value was passed as an argument.\n- `ERR_INVALID_DATA_URI` - The specified data URI is not valid.\n- `ERR_INVALID_IMAGE` - The specified image is not valid.\n- `ERR_UNSUPPORTED_FORMAT` - The image format specified is not valid.\n- `ERR_WEBP_NOT_ENABLED` - WEBP support is not enabled in your version of PHP.\n- `ERR_WRITE` - Unable to write to the file system.\n- `ERR_INVALID_FLAG` - The specified flag key does not exist.\n\n### Useful Things To Know\n\n- Color arguments can be a CSS color name (e.g. `LightBlue`), a hex color string (e.g. `#0099dd`), or an RGB(A) array (e.g. `['red' => 255, 'green' => 0, 'blue' => 0, 'alpha' => 1]`).\n\n- When `$thickness` > 1, GD draws lines of the desired thickness from the center origin. For example, a rectangle drawn at [10, 10, 20, 20] with a thickness of 3 will actually be draw at [9, 9, 21, 21]. This is true for all shapes and is not a bug in the SimpleImage library.\n\n### Instance flags\n\nTweak the behavior of a SimpleImage instance by setting instance flag values with the `setFlag($key, $value)` method.\n\n```php\n$image = new \\claviska\\SimpleImage('image.jpeg')->setFlag(\"foo\", \"bar\");\n```\n\nYou can also pass an associative array to the SimpleImage constructor to set instance flags.\n\n```php\n$image = new \\claviska\\SimpleImage('image.jpeg', ['foo' => 'bar']);\n// .. or without an $image\n$image = new \\claviska\\SimpleImage(flags: ['foo' => 'bar']);\n```\n\n*Note: `setFlag()` throws an `ERR_INVALID_FLAG` exception if the key does not exist (no default value).*\n\n#### `sslVerify`\n\nSetting `sslVerify` to `false` (defaults to `true`) will make all images loaded over HTTPS forgo certificate peer validation. This is especially usefull for self-signed certificates.\n\n```php\n$image = new \\claviska\\SimpleImage('https://localhost/image.jpeg', ['sslVerify' => false]);\n// Would normally throw an OpenSSL exception, but is ignored with the sslVerify flag set to false.\n```\n\n## Differences from SimpleImage 2.x\n\n- Normalized color arguments (colors can be a CSS color name, hex color, or RGB(A) array).\n- Normalized alpha (opacity) arguments: 0 (transparent) - 1 (opaque)\n- Added text shadow to `text` method.\n- Added `fromString()` method to load images from strings.\n- Added `toString()` method to generate image strings.\n- Added `arc` method for drawing arcs.\n- Added `border` method for drawing borders.\n- Added `dot` method for drawing individual pixels.\n- Added `ellipse` method for drawing ellipses and circles.\n- Added `line` method for drawing lines.\n- Added `polygon` method for drawing polygons.\n- Added `rectangle` method for drawing rectangles.\n- Added `roundedRectangle` method for drawing rounded rectangles.\n- Added `adjustColor` method for modifying RGBA color channels to create relative color variations.\n- Added `darkenColor` method to darken a color.\n- Added `extractColors` method to get the most common colors from the image.\n- Added `getColorAt` method to get the RGBA values of a specific pixel.\n- Added `lightenColor` method to lighten a color.\n- Added `toDownload` method to force the image to download on the client's machine.\n- Added `duotone` filter to create duotone images.\n- Added `sharpen` method to sharpen the image.\n- Changed namespace from `abeautifulsite` to `claviska`.\n- Changed `create` method to `fromNew`.\n- Changed `load` method to `fromFile`.\n- Changed `load_base64` method to `fromDataUri`.\n- Changed `output` method to `toScreen`.x\n- Changed `output_base64` method to `toDataUri`.\n- Changed `save` method to `toFile`.\n- Changed `text` method to accept an array of options instead of tons of arguments.\n- Removed text stroke from `text` method because it produced dirty results and didn't support transparency.\n- Removed `smooth` method because its arguments in the PHP manual aren't documented well.\n- Removed deprecated method `adaptive_resize` (use `thumbnail` instead).\n- Removed `get_meta_data` (use `getExif`, `getHeight`, `getMime`, `getOrientation`, and `getWidth` instead).\n- Added [.editorconfig](http://editorconfig.org/) file. Please make sure your editor supports these settings before submitting contributions.\n- Switched from four spaces to two for indentations (sorry PHP-FIG!).\n- Switched from underscore_methods to camelCaseMethods.\n- Organized methods into groups based on function\n- Removed PHPDoc comments. At this time, I don't wish to incorporate them into the library.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6910:09ED:E6742:3F94C8:6AB92CE1"},"text_sha256":"ef9f1b33162e61e4b7ca205df914f087b28629f8c17c6bb1997af3fa077beca3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"brendan-duncan/image","input_row":{"repository":"brendan-duncan/image","url":"https://github.com/brendan-duncan/image","name":"image","owner":"brendan-duncan","description":"Dart Image Library for opening, manipulating, and saving various different image file formats.","language":"Dart","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1266,"issues":614,"created_at":"2014-01-09T19:03:48Z","updated_at":"2026-09-24T09:45:14Z","first_commit_at":"2013-12-14T01:21:55Z","last_commit_at":"2026-09-23T04:24:33Z","activity_months":153.28999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:06.414Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"brendan-duncan/image","visibility":"public","created_at":"2014-01-09T19:03:48Z","updated_at":"2026-09-24T09:45:14Z","private":false,"fork":false,"archived":false,"stargazers_count":1266,"open_issues_count":57,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1693","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0797:280FBC:17D245D:1BF884A:6AB92CE2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1692","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:17BCC18:1BE4433:6AB92CE2"},"commit":{"sha":"08fdc97bfe70f93c539ee118894cfddb655aeeef","url":"https://github.com/brendan-duncan/image/commit/08fdc97bfe70f93c539ee118894cfddb655aeeef","date":"2018-05-23T05:25:12Z","author_date":"2018-05-23T05:25:12Z","committer_date":"2018-05-23T05:25:12Z","tree_sha":"9b5b1581ebd7b84cc4eceb43f3e27eb5b9d5fb42","message_first_line":"update travis script"},"tree_request_status":200,"tree_rate":{"github_remaining":"1691","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085E:3C4024:1816A2E:1C3E153:6AB92CE3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1516,"blob_sha":"64e61d03c7b14e62f2e980f3440647aa74eeaceb","priority":0}],"documents":[{"path":"README.md","size":1516,"blob_sha":"64e61d03c7b14e62f2e980f3440647aa74eeaceb","priority":0,"status":200,"text":"# image\n\n[![Build Status](https://travis-ci.org/brendan-duncan/image.svg?branch=master)](https://travis-ci.org/brendan-duncan/image)\n\n## Overview\n\nA Dart library providing the ability to load, save and manipulate images in a variety of different file formats.\n\nThe library has no reliance on `dart:io`, so it can be used for both server and\nweb applications. \n\n**Supported Image Formats:**\n\nRead/Write:\n\n- PNG / Animated APNG\n- JPEG\n- Targa\n- GIF / Animated GIF\n- PVR(PVRTC)\n\nRead Only:\n\n- WebP / Animated WebP\n- TIFF\n- Photoshop PSD\n- OpenEXR\n\n\n## [Documentation](https://github.com/brendan-duncan/image/wiki)\n\n## [API](http://www.dartdocs.org/documentation/image/1.1.22/index.html#image/image)\n\n## [Examples](https://github.com/brendan-duncan/image/wiki/Examples)\n\n## [Format Decoding Functions](https://github.com/brendan-duncan/image/wiki#format-decoding-functions)\n\n## Samples\n\nLoad an image, resize it, and save it as a png:\n\n    import 'dart:io' as Io;\n    import 'package:image/image.dart';\n    void main() {\n      // Read an image from file (webp in this case).\n      // decodeImage will identify the format of the image and use the appropriate\n      // decoder.\n      Image image = decodeImage(new Io.File('test.webp').readAsBytesSync());\n\n      // Resize the image to a 120x? thumbnail (maintaining the aspect ratio).\n      Image thumbnail = copyResize(image, 120);\n    \n      // Save the thumbnail as a PNG.\n      new Io.File('thumbnail.png')\n            ..writeAsBytesSync(encodePng(thumbnail));\n    }\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"204C:24970A:185D0B:5ECEF8:6AB92CE3"},"text_sha256":"2b82d4f27cdf4a6cdfc804755bd5538f5e49d78bd7512d434be04bf849d9604f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1690","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:17BFB07:1BE7069:6AB92CE3"},"commit":{"sha":"186932a4aab5cc514ef3391141bc322c29867b1d","url":"https://github.com/brendan-duncan/image/commit/186932a4aab5cc514ef3391141bc322c29867b1d","date":"2026-05-30T17:30:13Z","author_date":"2026-05-30T17:30:13Z","committer_date":"2026-05-30T17:30:13Z","tree_sha":"905908e728d104ea72b38f98e188b7e6d11cdcc1","message_first_line":"replace xml dependency with custom xml parser"},"tree_request_status":200,"tree_rate":{"github_remaining":"1689","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DB:35D5A8:17E5DFA:1C0D5A2:6AB92CE4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2615,"blob_sha":"764e347a69c29f1eb2a27a4264ab0f4ca2bbd5bf","priority":0}],"documents":[{"path":"README.md","size":2615,"blob_sha":"764e347a69c29f1eb2a27a4264ab0f4ca2bbd5bf","priority":0,"status":200,"text":"# Dart Image Library\n[![Dart CI](https://github.com/brendan-duncan/image/actions/workflows/build.yaml/badge.svg?branch=4.0)](https://github.com/brendan-duncan/image/actions/workflows/build.yaml)\n[![pub package](https://img.shields.io/pub/v/image.svg)](https://pub.dev/packages/image)\n\n## Overview\n\nThe Dart Image Library provides the ability to load, save, and\n[manipulate](https://github.com/brendan-duncan/image/blob/main/doc/filters.md) images\nin a variety of image file [formats](https://github.com/brendan-duncan/image/blob/main/doc/formats.md).\n\nThe library can be used with both dart:io and dart:html, for command-line, Flutter, and\nweb applications.\n\nNOTE: 4.0 is a major revision from the previous version of the library.\n\n## [Documentation](https://github.com/brendan-duncan/image/blob/main/doc/README.md)\n\n### [Supported Image Formats](https://github.com/brendan-duncan/image/blob/main/doc/formats.md)\n\n**Read/Write**\n\n- JPG\n- PNG / Animated PNG\n- GIF / Animated GIF\n- BMP\n- TIFF\n- TGA\n- PVR\n- ICO\n- (Read) WebP / Animated WebP, (Write) Lossless WebP\n\n**Read Only**\n\n- PSD\n- EXR\n- PNM (PBM, PGM, PPM)\n\n**Write Only**\n\n- CUR\n\n## Examples\n\nCreate an image, set pixel values, save it to a PNG.\n```dart\nimport 'dart:io';\nimport 'package:image/image.dart' as img;\nvoid main() async {\n  // Create a 256x256 8-bit (default) rgb (default) image.\n  final image = img.Image(width: 256, height: 256);\n  // Iterate over its pixels\n  for (var pixel in image) {\n    // Set the pixels red value to its x position value, creating a gradient.\n    pixel..r = pixel.x\n    // Set the pixels green value to its y position value.\n    ..g = pixel.y;\n  }\n  // Encode the resulting image to the PNG image format.\n  final png = img.encodePng(image);\n  // Write the PNG formatted data to a file.\n  await File('image.png').writeAsBytes(png);\n}\n```\n\nTo asynchronously load an image file, resize it, and save it as a thumbnail: \n```dart\nimport 'package:image/image.dart' as img;\n\nvoid main(List<String> args) async {\n  final path = args.isNotEmpty ? args[0] : 'test.png';\n  final cmd = img.Command()\n    // Decode the image file at the given path\n    ..decodeImageFile(path)\n    // Resize the image to a width of 64 pixels and a height that maintains the aspect ratio of the original. \n    ..copyResize(width: 64)\n    // Write the image to a PNG file (determined by the suffix of the file path). \n    ..writeToFile('thumbnail.png');\n  // On platforms that support Isolates, execute the image commands asynchronously on an isolate thread.\n  // Otherwise, the commands will be executed synchronously.\n  await cmd.executeThread();\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C54:09BF:B2E94:2E46C9:6AB92CE5"},"text_sha256":"d55337e515fdb15207e210728c5b3270c58dc18a50e71393c93e406f22a0069f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"flyimg/flyimg","input_row":{"repository":"flyimg/flyimg","url":"https://github.com/flyimg/flyimg","name":"flyimg","owner":"flyimg","description":"Dockerized application that resizes and crops images on the fly, delivering optimized images in formats such as AVIF, WebP, MozJPEG, or PNG using ImageMagick, with an efficient caching system.","language":"PHP","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":1227,"issues":220,"created_at":"2016-03-08T09:05:33Z","updated_at":"2026-09-19T11:32:53Z","first_commit_at":"2016-03-08T09:05:33Z","last_commit_at":"2026-09-02T05:19:28Z","activity_months":125.81999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:09.846Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"flyimg/flyimg","visibility":"public","created_at":"2016-03-08T09:05:33Z","updated_at":"2026-09-19T11:32:53Z","private":false,"fork":false,"archived":false,"stargazers_count":1227,"open_issues_count":0,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"1688","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D7:380E1C:17E590C:1C0C176:6AB92CE5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1687","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B3:0AC4:12A93D4:1600914:6AB92CE6"},"commit":{"sha":"96ceefa5aeaca0ba810721256b4388970d42d357","url":"https://github.com/flyimg/flyimg/commit/96ceefa5aeaca0ba810721256b4388970d42d357","date":"2018-04-13T08:07:36Z","author_date":"2018-04-13T08:07:36Z","committer_date":"2018-04-13T08:07:36Z","tree_sha":"28e1dfa1fed89a47598f7bd918db85e3b4aac990","message_first_line":"Merge pull request #165 from flyimg/160-update-remote-url"},"tree_request_status":200,"tree_rate":{"github_remaining":"1686","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081C:0BA1:D9BE77:FFE189:6AB92CE6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":20185,"blob_sha":"595d8922025a17a08a58c16c1330a72a6a3eca16","priority":0}],"documents":[{"path":"README.md","size":20185,"blob_sha":"595d8922025a17a08a58c16c1330a72a6a3eca16","priority":0,"status":200,"text":"\n<p align=\"center\"><a href=\"http://flyimg.io\" target=\"_blank\">\n    <img alt=\"Flyimglogo\" src=\"https://raw.githubusercontent.com/flyimg/graphic-assets/master/logo/raster/flyimg-logo-rgb.png\" width=\"300\">\n<\/a><\/p>\n\n<p align=\"center\">\n<a href=\"#backers\"><img alt=\"Backers on Open Collective\" src=\"https://opencollective.com/flyimg/backers/badge.svg\"><\/a>\n<a href=\"#sponsors\"><img alt=\"Sponsors on Open Collective\" src=\"https://opencollective.com/flyimg/sponsors/badge.svg\"><\/a>\n<a href=\"https://travis-ci.org/flyimg/flyimg\"><img alt=\"Build Status\" src=\"https://travis-ci.org/flyimg/flyimg.svg?branch=master\"><\/a>\n<a href=\"https://codeclimate.com/github/flyimg/flyimg\"><img alt=\"Code Climate\" src=\"https://codeclimate.com/github/flyimg/flyimg/badges/gpa.svg\"><\/a>\n<a href=\"https://codeclimate.com/github/flyimg/flyimg\"><img alt=\"Issue Count\" src=\"https://codeclimate.com/github/flyimg/flyimg/badges/issue_count.svg\"><\/a>\n<a href=\"https://codeclimate.com/github/flyimg/flyimg/coverage\"><img alt=\"Test Coverage\" src=\"https://codeclimate.com/github/flyimg/flyimg/badges/coverage.svg\"><\/a>\n<a href=\"https://insight.sensiolabs.com/projects/89b18390-ac79-4c3e-bf6c-92cd9993e8d3\"><img alt=\"SensioLabsInsight\" src=\"https://insight.sensiolabs.com/projects/89b18390-ac79-4c3e-bf6c-92cd9993e8d3/mini.png\"><\/a>\n<a href=\"https://packagist.org/packages/flyimg/flyimg\"><img alt=\"License\" src=\"https://poser.pugx.org/flyimg/flyimg/license.svg\"><\/a>\n<a href=\"https://packagist.org/packages/flyimg/flyimg\"><img alt=\"Latest Stable Version]\" src=\"https://poser.pugx.org/flyimg/flyimg/v/stable.svg\"><\/a>\n<\/p>\n\n# Flyimg\n\nImage resizing, cropping and compression on the fly with the impressive [MozJPEG](http://calendar.perfplanet.com/2014/mozjpeg-3-0) compression algorithm. One Docker container to build your own Cloudinary-like service.\n\n### Fetch an image from anywhere; resize, compress, cache and serve...<small> and serve, and serve, and serve...<\/small>\n\nYou pass the image URL and a set of keys with options, like size or compression. Flyimg will fetch the image, convert it, store it, cache it and serve it. The next time the request comes, it will serve the cached version.\n\n```\n<!-- https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg -->\n<img src=\"https://www.myservice.io/upload/w_333,h_333,q_90/https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg\">\n```\n# Basic Usage Examples\n## Get an image to fill exact dimensions\n* Image: `http://medula.cl/t/resize-test_1920.jpg` \n* Width: 300\n* Height: 250\n* Crop if necesary: `c_1`\n\nhttps://oi.flyimg.io/upload/w_300,h_250,c_1/http://medula.cl/t/resize-test_1920.jpg\n\n![lago_ranco](https://oi.flyimg.io/upload/w_300,h_250,c_1/http://medula.cl/t/resize-test_1920.jpg)\n\nThis will serve the image.\n\n## Get the path to the generated image instead of serving it\nChange the first part of the path from `upload` to `path`, like so:\n\nhttps://oi.flyimg.io/path/w_300,h_250,c_1/http://medula.cl/t/resize-test_1920.jpg will output in the body of the response:\n\n\n```\nhttp://localhost:8080/uploads/752d2124eef87b3112779618c96468da.jpg\n```\n\n## Get an image to fit maximum dimensions\n* Image: `http://medula.cl/t/resize-test_1920.jpg` \n* Width: 300\n* Height: 250\n* Note that we ommit the crop parameter\n\nhttps://oi.flyimg.io/upload/w_300,h_250/http://medula.cl/t/resize-test_1920.jpg\n\n![lago_ranco](https://oi.flyimg.io/upload/w_300,h_250/http://medula.cl/t/resize-test_1920.jpg)\n\n## Crop to a square and rotate 90 degrees clockwise\n* Image: `http://medula.cl/t/resize-test_1920.jpg` \n* Width: 200\n* Height: 200\n* Crop: `c_1`\n* Rotate: 90\n\nhttps://oi.flyimg.io/upload/w_200,h_200,c_1,r_90/http://medula.cl/t/resize-test_1920.jpg\n\n![lago_ranco](https://oi.flyimg.io/upload/w_200,h_200,c_1,r_90/http://medula.cl/t/resize-test_1920.jpg)\n\n## Get an image with exact dimensions and low quality\n* Image: `http://medula.cl/t/resize-test_1920.jpg` \n* Width: 200\n* Height: 200\n* Crop: `c_1`\n* Quality: 30\n\nhttps://oi.flyimg.io/upload/w_200,h_200,c_1,q_30/http://medula.cl/t/resize-test_1920.jpg\n\n![lago_ranco](https://oi.flyimg.io/upload/w_200,h_200,c_1,q_30/http://medula.cl/t/resize-test_1920.jpg)\n\n\n# Table of Contents\n\n   * [Requirements](#requirements)\n   * [Installation [Deployment mode]](#installation-deployment-mode)\n   * [Installation [Development Mode]](#installation-development-mode)\n      * [Installation](#installation)\n         * [with git](#with-git)\n         * [with composer](#with-composer)\n   * [Testing Flyimg service](#testing-flyimg-service)\n   * [How to transform images](#how-to-transform-images)\n   * [Basic Option details](#basic-option-details)\n   * [Application Server Options](#server-options)\n   * [Security: Restricting Source Domains](#security-restricting-source-domains)\n   * [Security: Signature Generation](#security-signature-generation)\n   * [Run Unit Tests](#run-unit-tests)\n   * [How to Provision the application on](#how-to-provision-the-application-on)\n   * [Technology stack](#technology-stack)\n      * [Abstract storage with Flysystem](#abstract-storage-with-flysystem)\n   * [Benchmark](#benchmark)\n   * [Enable Xdebug](https://github.com/flyimg/flyimg/blob/master/docs/enabling-xdebug.md)\n   * [Demo Application running](#demo-application-running)\n   * [Roadmap](#roadmap)\n   * [Community](#community)\n   * [Supporters](#supporters)\n   * [Contributors](#contributors)\n   * [Backers](#backers)\n   * [Sponsors](#sponsors)\n   * [License](#license)\n   \n   \n# Requirements\n\nYou will need to have **Docker** on your machine. Optionally you can use Docker machine to create a virtual environment. We have tested on **Mac**, **Windows** and **Ubuntu**.\n\n# Installation [Deployment mode]\n\nPull the docker image\n\n```bash\ndocker pull flyimg/flyimg-build\n```\n\nStart the container\n\n```bash\ndocker run -itd -p 8080:80 flyimg/flyimg-build\n```\nCheck [how to provision the application](#how-to-provision-the-application-on)\n\n# Installation [Development Mode]\n\nYou can spin up your own working server in 10 minutes using the provision scripts for [AWS Elastic Beanstalk](https://github.com/flyimg/Elastic-Beanstalk-provision) or the [DigitalOcean Ubuntu Droplets](https://github.com/flyimg/DigitalOcean-provision) <small>(more environments to come)<\/small>. For other environments or if you want to tweak and play in your machine before rolling out, read along...\n\n## Installation\n\nYou can use `git` or `composer` for the first step. \n\n### with git\n\n```sh\ngit clone https://github.com/flyimg/flyimg.git\n```\n### with composer\nCreate the project with `composer create` .\n\n```sh\ncomposer create-project flyimg/flyimg\n```\n\n**CD into the folder** and to build the docker image by running:\n\n```sh\ndocker build -t flyimg .\n```\nThis will download and build the main image, It will take a few minutes. If you get some sort of error related to files not found by apt-get or similar, try this same command again.\n\nThen run the container:\n\n```sh\ndocker run -itd -p 8080:80 -v $(pwd):/var/www/html --name flyimg flyimg\n```\n\nFor Fish shell users: \n\n```sh\ndocker run -itd -p 8080:80 -v $PWD:/var/www/html --name flyimg flyimg\n```\n\nThe above command will make the Dockerfile run supervisord command which launches 2 processes: **nginx** and **php-fpm** and starts listening on port 8080.\n\n**IMPORTANT!** If you cloned the project, only for the first time, you need to run `composer install` **inside** the container:\n\n```sh\ndocker exec -it flyimg composer install\n```\n\nAgain, it will take a few minutes to download the dependencies. Same as before, if you get some errors you should try running `composer install` again.\n \n\n# Testing Flyimg service\n\nYou can navigate to your machine's IP in port 8080 (ex: http://127.0.0.1:8080/ ) ; you should get a message saying: **Hello from Flyimg!** and a small homepage of Flyimg already working. If you get any errors  at this stage it's most likely that composer has not finished installing or skipped something.\n\nYou can test your image resizing service by navigating to: http://127.0.0.1:8080/upload/w_130,h_113,q_90/https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg\n\n![ff-logo](https://oi.flyimg.io/upload/w_130,h_113,q_90/https://www.mozilla.org/media/img/firefox/firefox-256.e2c1fc556816.jpg)\n\n**It's working!**\n\nThis is fetching an image from Mozilla, resizing it, saving it and serving it.\n\n\n# How to transform images\n\nYou go to your server URL`http://imgs.kitty.com` and append `/upload/`;  after that you can pass these options below, followed by an underscore and a value `w_250,q_50` Options are separated by coma (configurable to other separator).\n\nAfter the options put the source of your image, it can be relative to your server or absolute: `/https://my.storage.io/imgs/pretty-kitten.jpg`\n\nSo to get a pretty kitten at 250 pixels wide, with 50% compression, you would write.\n`<img src=\"http://imgs.kitty.com/upload/w_250,q_50/https://my.storage.io/imgs/pretty-kitten.jpg\">`\n\n\n## Basic Option details\nYou can see the full list of options configurable by URL params, **with examples**, in the [URL-Options document](docs/url-options.md) \n\nWe put a lot of defaults in place to prevent distortion, bad quality, weird cropping and unwanted padding.\n\nThe most common URL options are:\n\n### `w` : width\n`int`  \n*Default:* `null`  \n*Description:* Sets the target width of the image. If not set, width will be calculated in order to keep aspect ratio.\n\n**example:`w_100`** \n\n`w_100` :   `https://oi.flyimg.io/upload/w_100/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n### `h` : height\n`int`  \n*Default:* `null`  \n*Description:* Sets the target height of the image. If not set, height will be calculated in order to keep aspect ratio.\n\n**example:`h_100`** \n\n`h_100`  : `https://oi.flyimg.io/upload/h_100/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n### Using width AND height\n\n**example:`h_300,w_300`**  \nBy default setting width and height together, works like defining a rectangle that will define a **max-width** and **max-height** and the image will scale proportionally to fit that area without cropping.\n\nBy default; width, height, or both will **not scale up** an image that is smaller than the defined dimensions.\n\n`h_300,w_300` : `https://oi.flyimg.io/upload/h_300,w_300/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n\n### `c` : crop\n`bool`  \n*Default:* `false`  \n*Description:* When both width and height are set, this allows the image to be cropped so it fills the **width x height** area.\n\n**example:`c_1`** \n\n`c_1,h_400,w_400` : `https://oi.flyimg.io/upload/c_1,h_400,w_400/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n### `g` : gravity\n`string`  \n*Default:* `Center`  \n*Description:* When crop is applied, changing the gravity will define which part of the image is kept inside the crop area.\nThe basic options are: `NorthWest`, `North`, `NorthEast`, `West`, `Center`, `East`, `SouthWest`, `South`, `SouthEast`.\n\n**example:`g_West`** \n\n### `r` : rotate\n`string`  \n*Default:* `null`  \n*Description:* Apply image rotation (using shear operations) to the image. \n\n**example: `r_90`, `r_-180`,...**\n\n`r_45` :  `https://oi.flyimg.io/upload/r_-45,w_400,h_400/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n### `o` : output\n`string`  \n*Default:* `auto`  \n*Description:* Output format requested, for example you can force the output as jpeg file in case of source file is png. The default `auto` will try to output the best format for the requesting browser, falling back to the same format as the source image or finally with a fallback to **jpg**.\n\n**example:`o_auto`,`o_input`,`o_png`,`o_webp`,`o_jpeg`,`o_jpg`**\n\n### `q` : quality\n`int` (0-100)  \n*Default:* `90`  \n*Description:* Sets the compression level for the output image. Your best results will be between **70** and **95**.\n\n**example:`q_100`,`q_75`,...** \n\n`q_30`  :  `https://oi.flyimg.io/upload/q_30/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg` \n\n\n`q_100`  :  `https://oi.flyimg.io/upload/q_100/https://raw.githubusercontent.com/flyimg/flyimg/master/web/Rovinj-Croatia.jpg`\n\n### Refresh or re-fetch source image\n`rf` : refresh  \n*Default:* `false`  \n*Description:* When this parameter is 1, it will force a re-request of the original image and run it through the transformations and compression again. It will delete the local cached copy.\n\n**example:`rf_1`** \n\n--- \n\n## Server Options\n\nThere are some easy to setup server configurations in the `config/parameters.yml` file, you can see the full list of options and server configurations in the **[Application Options Document](docs/application-options.md)** \n\n## Security: Restricting Source Domains:\n\nRestricted domains disabled by default. This means that you can fetch a resource from any URL. To enable the domain restriction, change in config/parameters.yml \n\n```yml\nrestricted_domains: true\n```\n\nAfter enabling, you need to put the white listed domains\n\n```yml\nwhitelist_domains:\n    - www.domain-1.org\n    - www.domain-2.org\n```\n## Security: Signature Generation:\n\nBased on this [RFC](https://github.com/flyimg/flyimg/issues/96) Signature Generation was added to Flyimg in order to avoid DDOS attacks.\n\nFirst you need to edit `security_key` and `security_iv` in  parameters.yml file and add a proper values.\nThan any request to Fyimg app will throw an error unless it's encrypted.\n\nTo generate the encrypted url you need to run this command:\n\n```sh\ndocker exec flyimg php app.php encrypt w_200,h_200,c_1/http://medula.cl/t/resize-test_1920.jpg\n```\n\nit'll return something like this:\n\n```sh\nHashed request: TGQ1WWRKVGUrZUpoNmJMc2RMUENPL2t6ZDJkWkdOejlkM0p0U0F3WTgxOU5IMzF3U3R0d2V4b3dqbG52cFRTSFZDcmhrY1JnaGZYOHJ3V0NpZDNNRmc9PQ==\n```\n\nNow you can request the image throw this new url:\n\n```\nhttp://localhost:8080/upload/TGQ1WWRKVGUrZUpoNmJMc2RMUENPL2t6ZDJkWkdOejlkM0p0U0F3WTgxOU5IMzF3U3R0d2V4b3dqbG52cFRTSFZDcmhrY1JnaGZYOHJ3V0NpZDNNRmc9PQ==\n```\n\n\n## Run Unit Tests:\n\n```sh\ndocker exec flyimg vendor/bin/phpunit\n```\n\nGenerate Html Code Coverage\n```sh\ndocker exec flyimg vendor/bin/phpunit --coverage-html build/html\n```\n\n## How to Provision the application on:\n\n- [DigitalOcean](https://github.com/flyimg/DigitalOcean-provision)\n- [AWS Elastic-Beanstalk](https://github.com/flyimg/Elastic-Beanstalk-provision)\n\n# Technology stack\n\n* Server: nginx\n* Application:  [Silex](http://silex.sensiolabs.org/) , a PHP micro-framework.\n* Image manipulation: ImageMagick\n* JPEG encoder: MozJpeg\n* Storage: [Flysystem](http://flysystem.thephpleague.com/)\n* Containerisation:  Docker\n\n## Abstract storage with Flysystem\n\nStorage files based on [Flysystem](http://flysystem.thephpleague.com/) which is `a filesystem abstraction allows you to easily swap out a local filesystem for a remote one. Technical debt is reduced as is the chance of vendor lock-in.`\n\nDefault storage is Local, but you can use other Adapters like AWS S3, Azure, FTP, DropBox, ... \n\nCurrently, only the **local** and **S3** are implemented as Storage Provider in Flyimg application, but you can add your specific one easily in `src/Core/Provider/StorageProvider.php`. Check an [example for AWS S3 here](https://github.com/flyimg/flyimg/blob/master/docs/application-options.md#using-aws-s3-as-storage-provider).\n\n# Benchmark\n\nSee [benchmark.sh](https://github.com/flyimg/flyimg/blob/master/benchmark.sh) for more details.\n\nRequires: **Vegeta**[http://github.com/tsenart/vegeta](http://github.com/tsenart/vegeta)\n\n```\n./benchmark.sh\n```\n\nLatest Results:\n```\nCrop http://localhost:8080/upload/w_200,h_200,c_1/Rovinj-Croatia.jpg\nRequests      [total, rate]            500, 50.10\nDuration      [total, attack, wait]    9.991377689s, 9.97999997s, 11.377719ms\nLatencies     [mean, 50, 95, 99, max]  19.402096ms, 12.844271ms, 54.65001ms, 96.276948ms, 135.597203ms\nBytes In      [total, mean]            5337500, 10675.00\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  100.00%\nStatus Codes  [code:count]             200:500\n\nResize http://localhost:8080/upload/w_200,h_200,rz_1/Rovinj-Croatia.jpg\nRequests      [total, rate]            500, 50.10\nDuration      [total, attack, wait]    9.992435445s, 9.979999871s, 12.435574ms\nLatencies     [mean, 50, 95, 99, max]  16.676093ms, 12.376525ms, 49.676187ms, 97.354697ms, 127.14737ms\nBytes In      [total, mean]            3879500, 7759.00\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  100.00%\nStatus Codes  [code:count]             200:500\n\nRotate http://localhost:8080/upload/r_-45,w_400,h_400/Rovinj-Croatia.jpg\nRequests      [total, rate]            500, 50.10\nDuration      [total, attack, wait]    9.992650741s, 9.979999937s, 12.650804ms\nLatencies     [mean, 50, 95, 99, max]  13.634143ms, 11.587252ms, 26.873827ms, 50.446923ms, 68.222253ms\nBytes In      [total, mean]            17609000, 35218.00\nBytes Out     [total, mean]            0, 0.00\nSuccess       [ratio]                  100.00%\nStatus Codes  [code:count]             200:500\n```\n\n# Demo Application running\n\n[https://oi.flyimg.io](https://oi.flyimg.io)\n\n![resize-test](https://oi.flyimg.io/upload/w_300,h_250,c_1/http://medula.cl/t/resize-test_1920.jpg)\n\n\n# Roadmap\n\n- [x] Benchmark the application.\n- [ ] Decouple the core logic from Silex in order to make it portable.\n- [ ] Test it with couple of frameworks, Phalcon Php is a good candidate.\n- [ ] Add overlays functionality (Text on top of the image)\n- [ ] Storage auto-mapping\n- [ ] Add support for FLIFF, BPG and JPEG2000\n\n\n# Community\n\n* Follow us on [GitHub][1] and [Twitter][2].\n\n# Supporters\n\nA special thanks to JetBrains for supporting our project with their [open source license program](https://www.jetbrains.com/buy/opensource/).\n\n![Jetbrains](https://oi.flyimg.io/upload/w_300/jetbrains-variant-3.png)\n\n\n# Contributors\n\nThis project exists thanks to all the people who contribute.\n<a href=\"https://github.com/flyimg/flyimg/graphs/contributors\"><img src=\"https://opencollective.com/flyimg/contributors.svg?width=890\" /><\/a>\n\n\n# Backers\n\nThank you to all our backers! [[Become a backer](https://opencollective.com/flyimg#backer)]\n\n<a href=\"https://opencollective.com/flyimg#backers\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/backers.svg?width=890\"><\/a>\n\n\n# Sponsors\n\nThank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/flyimg#sponsor))\n\n<a href=\"https://opencollective.com/flyimg/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/9/avatar.svg\"><\/a>\n\n\n\n# License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n\nEnjoy your Flyimaging!\n\n[1]: https://github.com/flyimg\n[2]: https://twitter.com/flyimg_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D75A:3B1F3:186138:5ED68A:6AB92CE6"},"text_sha256":"50726d60939805149c0c604a55798cb7e3d101747168865b15b4b687a0369196"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1685","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FC:74E6D:1819198:1C40C23:6AB92CE7"},"commit":{"sha":"4e52348238f3a74611e9630d324f84d7f721c939","url":"https://github.com/flyimg/flyimg/commit/4e52348238f3a74611e9630d324f84d7f721c939","date":"2026-06-29T08:07:53Z","author_date":"2026-06-29T08:07:53Z","committer_date":"2026-06-29T08:07:53Z","tree_sha":"fde449b404dd24e606471e2dd8c3cf4a431ed074","message_first_line":"Merge pull request #617 from flyimg/dependabot/composer/league/flysystem-aws-s3-v3-3.35.1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1684","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B1:2EA1B4:17EAFA5:1C129AA:6AB92CE8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10133,"blob_sha":"358abe47a454315be03eb114a2d4ca93e59a52a4","priority":0},{"path":"docs/security.md","size":1724,"blob_sha":"f8f97b6ea5679e9a1b95ffa7dfc53c606381083c","priority":1}],"documents":[{"path":"README.md","size":10133,"blob_sha":"358abe47a454315be03eb114a2d4ca93e59a52a4","priority":0,"status":200,"text":"# Flyimg\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <img src=\"https://raw.githubusercontent.com/flyimg/flyimg/main/web/flyimg.png\" alt=\"Flyimg logo\" height=\"72\"><br>\n      Open‑source, self‑hosted Flyimg for on-the-fly image optimization.\n    <\/td>\n    <td align=\"center\">\n      <strong>Flyimg Managed Service<\/strong><br>\n      Production‑ready, fully managed Flyimg SaaS for image optimization.<br><br>\n      <a href=\"https://flyimg.io\">\n        <img width=\"140\" src=\"https://raw.githubusercontent.com/flyimg/flyimg/main/web/start.png\" alt=\"Start in minutes\" />\n      <\/a>\n    <\/td>\n  <\/tr>\n<\/table>\n\n<p align=\"center\">\n<a href=\"#backers\"><img alt=\"Backers on Open Collective\" src=\"https://opencollective.com/flyimg/backers/badge.svg\"><\/a>\n<a href=\"#sponsors\"><img alt=\"Sponsors on Open Collective\" src=\"https://opencollective.com/flyimg/sponsors/badge.svg\"><\/a>\n<a href=\"https://github.com/flyimg/flyimg/actions?query=workflow%3ACI\"><img alt=\"Build Status\" src=\"https://github.com/flyimg/flyimg/workflows/CI/badge.svg?branch=main\"><\/a>\n<a href=\"https://codecov.io/gh/flyimg/flyimg\"><img alt=\"Codecov\" src=\"https://codecov.io/gh/flyimg/flyimg/branch/main/graph/badge.svg?token=jgryCuAGjF\"><\/a>\n<a href=\"https://packagist.org/packages/flyimg/flyimg\"><img alt=\"License\" src=\"https://poser.pugx.org/flyimg/flyimg/license.svg\"><\/a>\n<a href=\"https://packagist.org/packages/flyimg/flyimg\"><img alt=\"Latest Stable Version]\" src=\"https://poser.pugx.org/flyimg/flyimg/v/stable.svg\"><\/a>\n<br/>\n<a href=\"https://trendshift.io/repositories/11453\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/11453\" alt=\"flyimg%2Fflyimg | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/><\/a>\n<\/p>\n\nThe Flyimg project is a Dockerized application that allows you to resize, crop, and compress images on the fly.  One Docker container to build your own Cloudinary-like service.\n\nBy default, Flyimg generates the **AVIF** image format (when the browser supports it) which provides superior compression compared to other formats.\n\nAdditionally, Flyimg also generates the **WebP** format, along with the impressive **MozJPEG** compression algorithm to optimize images, other formats are supported also such as **PNG** and **GIF**.\nFlyimg also supports **JPEG XL (JXL)** output via ImageMagick when enabled. Use `o_auto` to negotiate formats based on the request `Accept` header. You can force JXL with `o_jxl` and tune encoder effort with `jxlef_1..9`.\n\n## Fetch an image from anywhere; resize, compress, cache and serve...<small> and serve, and serve, and serve...<\/small>\n\nYou pass the image URL and a set of keys with options, like size or compression. Flyimg will fetch the image, convert it, store it, cache it and serve it. The next time the request comes, it will serve the cached version.\n\n```html\n<!-- https://flyimg.io/demo-images/Citroen-DS.jpg -->\n<img\n  src=\"https://demo.flyimg.io/upload/w_300,q_90/https://flyimg.io/demo-images/Citroen-DS.jpg\"\n/>\n```\n\n![Flyimg-demo](https://demo.flyimg.io/upload/w_300,q_90/https://flyimg.io/demo-images/Citroen-DS.jpg)\n\n## Demo\nCheck out our demo page where you can test and review Flying's features:\n\n[https://demo.flyimg.io/](https://demo.flyimg.io)\n\n## Documentation\n\nDocumentation available here: [https://docs.flyimg.io](https://docs.flyimg.io)\n\n## Requirements\n\nYou will need to have **Docker** on your machine. Optionally you can use Docker machine to create a virtual environment. We have tested on **Mac**, **Windows** and **Ubuntu**.\n\n## Usage\n\nPull the docker image\n\n```bash\ndocker pull flyimg/flyimg\n```\n\nStart the container\n\n```bash\ndocker run -itd -p 8080:80 flyimg/flyimg\n```\n\nTo use custom parameters, make a copy of [parameters.yml](https://github.com/flyimg/flyimg/blob/main/config/parameters.yml) to your current directory. Update to suit your needs and run the command with volume parameter to replace the original parameters file.\n\n```bash\ndocker run -itd -p 8080:80 -v $(pwd)/parameters.yml:/var/www/html/config/parameters.yml flyimg/flyimg\n```\n\n## Build locally [Development Mode]\n\n```sh\ngit clone https://github.com/flyimg/flyimg.git\n```\n\n**CD into the folder** and to build the docker image by running:\n\n```sh\ndocker build -t flyimg .\n```\n\nThis will download and build the main image, It will take a few minutes. If you get some sort of error related to files not found by apt-get or similar, try this same command again.\n\n**IMPORTANT!** If you cloned the project, only for the first time, you need to run `composer install` **inside** the container:\n\n```sh\ndocker exec -it flyimg composer install\n```\n\nAgain, it will take a few minutes to download the dependencies. Same as before, if you get some errors you should try running `composer install` again.\n\nThen run the container:\n\n```sh\ndocker run -itd -p 8080:80 -v $(pwd):/var/www/html --name flyimg flyimg\n```\n\nFor Fish shell users:\n\n```sh\ndocker run -itd -p 8080:80 -v $PWD:/var/www/html --name flyimg flyimg\n```\n\nThe above command will make the Dockerfile run s6-overlay command which launches 2 services: **nginx** and **php-fpm** and starts listening on port 80 on the container and port 8080 on the host.\n\n## Testing Flyimg service\n\nYou can navigate to your machine's IP in port 8080 (ex: `http://127.0.0.1:8080/` ) ; you should get a message saying: **Hello from Flyimg!** and a small homepage of Flyimg already working. If you get any errors at this stage it's most likely that composer has not finished installing or skipped something.\n\nYou can test your image resizing service by navigating to: `http://127.0.0.1:8080/upload/w_130,h_113,q_90/https://flyimg.io/demo-images/Citroen-DS.jpg`\n\n**It's working!**\n\nThis is fetching an image from Mozilla, resizing it, saving it and serving it.\n\n\n## How to transform images\n\nYou go to your server URL`http://imgs.kitty.com` and append `/upload/`; after that you can pass these options below, followed by an underscore and a value `w_250,q_50` Options are separated by coma (configurable to other separator).\n\nAfter the options put the source of your image, it can be relative to your server or absolute: `/https://my.storage.io/imgs/pretty-kitten.jpg`\n\nSo to get a pretty kitten at 250 pixels wide, with 50% compression, you would write.\n`<img src=\"http://imgs.kitty.com/upload/w_250,q_50/https://my.storage.io/imgs/pretty-kitten.jpg\">`\n\n---\n\n## Demo Application running\n\n[https://demo.flyimg.io](https://demo.flyimg.io)\n\n`https://demo.flyimg.io/upload/w_300,h_250,c_1,o_jpg/https://flyimg.io/demo-images/Citroen-DS.jpg`\n\n![resize-test](https://demo.flyimg.io/upload/w_300,h_250,c_1,o_jpg/https://flyimg.io/demo-images/Citroen-DS.jpg)\n\n## Community\n\n- Follow us on [GitHub][1], [Twitter][2] and [LinkedIn][3].\n\n## Adopters\n\nSee the [ADOPTERS.md](ADOPTERS.md) file for a list of companies / organisations that are using Flyimg.\n\n## Contributors\n\nThis project exists thanks to all the people who contributed to it.\n<a href=\"https://github.com/flyimg/flyimg/graphs/contributors\"><img src=\"https://opencollective.com/flyimg/contributors.svg?width=890\" /><\/a>\n\n## Supporters\n\nA special thanks to JetBrains for supporting our project with their [open source license program](https://www.jetbrains.com/buy/opensource/).\n<img src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.png\" width=\"200\"/>\n\n## Backers\n\n[Become a backer](https://opencollective.com/flyimg) and show your support to our open source project on [our site](https://docs.flyimg.io/#backers).\n\n<a href=\"https://opencollective.com/flyimg\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/backers.svg?width=890\"><\/a>\n\n\n## Sponsors\n\nDoes your company use Flyimg? If not, consider asking your manager or marketing team if they would be interested in supporting our project. Their support will help the maintainers dedicate more time to maintenance and develop new features for the community.\n\n[Here's the info](https://opencollective.com/flyimg).\n\n<a href=\"https://opencollective.com/flyimg/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/flyimg/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/flyimg/sponsor/9/avatar.svg\"><\/a>\n\n## Star History\n\n<a href=\"https://star-history.com/#flyimg/flyimg&Date\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=flyimg/flyimg&type=Date&theme=dark\" />\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=flyimg/flyimg&type=Date\" />\n   <img alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=flyimg/flyimg&type=Date\" />\n <\/picture>\n<\/a>\n\n## License\n\nThe AGPL-3.0 License. Please see [License File](LICENSE) for more information.\n\nEnjoy your Flyimaging!\n\n[1]: https://github.com/flyimg\n[2]: https://twitter.com/flyimg_\n[3]: https://www.linkedin.com/company/flyimg\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E7D6:3FD49:179486:5E0995:6AB92CCF"},"text_sha256":"4edb254bfd0ef1eb9433ac46a60160a60086c5ebc8dde97c691bfb83c94a3e8e"},{"path":"docs/security.md","size":1724,"blob_sha":"f8f97b6ea5679e9a1b95ffa7dfc53c606381083c","priority":1,"status":200,"text":"## Restricting Source Domains\n\nRestricted domains disabled by default. This means that you can fetch a resource from any URL. To enable the domain restriction, change in config/parameters.yml\n\n```yml\nrestricted_domains: true\n```\n\nAfter enabling, you need to put the white listed domains. You can use both exact domain matches and wildcard patterns:\n\n```yml\nwhitelist_domains:\n  - www.domain-1.org\n  - www.domain-2.org\n  - \"*.example.com\"\n  - api.myservice.com\n```\n\n- **Exact matches**: `www.domain-1.org` - matches only `www.domain-1.org`\n- **Wildcard patterns**: `\"*.example.com\"` - matches any subdomain of `example.com` (e.g., `api.example.com`, `cdn.example.com`, `www.example.com`)\n\n**Note**: Wildcard patterns must be quoted in YAML to avoid parsing errors, as the `*` character has special meaning in YAML.\n\n## Signature Generation\n\nBased on this [RFC](https://github.com/flyimg/flyimg/issues/96) Signature Generation was added to Flyimg in order to avoid DDOS attacks.\n\nFirst you need to edit `security_key` and `security_iv` in parameters.yml file and add a proper values.\nThan any request to Fyimg app will throw an error unless it's encrypted.\n\nTo generate the encrypted url you need to run this command:\n\n```sh\ndocker exec flyimg php app.php encrypt w_200,h_200,c_1/https://flyimg.io/demo-images/Citroen-DS.jpg\n```\n\nit'll return something like this:\n\n```sh\nHashed request: TGQ1WWRKVGUrZUpoNmJMc2RMUENPL2t6ZDJkWkdOejlkM0p0U0F3WTgxOU5IMzF3U3R0d2V4b3dqbG52cFRTSFZDcmhrY1JnaGZYOHJ3V0NpZDNNRmc9PQ==\n```\n\nNow you can request the image throw this new url:\n\n```html\nhttp://localhost:8080/upload/TGQ1WWRKVGUrZUpoNmJMc2RMUENPL2t6ZDJkWkdOejlkM0p0U0F3WTgxOU5IMzF3U3R0d2V4b3dqbG52cFRTSFZDcmhrY1JnaGZYOHJ3V0NpZDNNRmc9PQ==\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:17FBF3:5E706D:6AB92CE7"},"text_sha256":"f419d86dbd322edcf1a0ec2eb47490568639c77176754f5206aa2604631a4476"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Faster3ck/Converseen","input_row":{"repository":"Faster3ck/Converseen","url":"https://github.com/Faster3ck/Converseen","name":"Converseen","owner":"Faster3ck","description":"Converseen is a batch image converter and resizer","language":"C++","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1155,"issues":213,"created_at":"2013-04-12T11:08:12Z","updated_at":"2026-09-27T08:13:33Z","first_commit_at":"2013-04-12T11:28:33Z","last_commit_at":"2026-09-07T16:43:02Z","activity_months":160.84999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:13.099Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Faster3ck/Converseen","visibility":"public","created_at":"2013-04-12T11:08:12Z","updated_at":"2026-09-27T08:13:33Z","private":false,"fork":false,"archived":false,"stargazers_count":1155,"open_issues_count":91,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1683","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C9:278AC2:1876166:1C9DB71:6AB92CE9"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1682","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084E:280FBC:17D2931:1BF8DE6:6AB92CE9"},"commit":{"sha":"2850d50bfb7c27895da6cc213ceb75072dc8ca61","url":"https://github.com/Faster3ck/Converseen/commit/2850d50bfb7c27895da6cc213ceb75072dc8ca61","date":"2017-03-29T16:56:58Z","author_date":"2017-03-28T19:33:10Z","committer_date":"2017-03-29T16:56:58Z","tree_sha":"36b6e314efdd8580a84ba95be68d9b42298dbfb1","message_first_line":"Version 0.9.6.2 Stable - Updated Danish and Italian Traslation"},"tree_request_status":200,"tree_rate":{"github_remaining":"1681","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:17C02B9:1BE78ED:6AB92CE9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2585,"blob_sha":"87e0c423eb1b04c4ae3c200aebe5bdad0203e5fc","priority":0}],"documents":[{"path":"README.md","size":2585,"blob_sha":"87e0c423eb1b04c4ae3c200aebe5bdad0203e5fc","priority":0,"status":200,"text":"[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=faster3ck&url=https://github.com/Faster3ck/Converseen&title=Converseen&language=&tags=github&category=software)\n\n# Converseen\n\n![alt text](http://converseen.fasterland.net/res/converseen-linux.png \"Converseen on Kde\")\n\n**Converseen** is an open source project written in **C++** with the powerful **Qt5** libraries.\nThanks to the **Magick++** image libraries it supports more than **100 image formats**.\nYou can convert an unlimited number of images and / or create thumbnails\nto any of the most popular formats: DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.\nWith **Converseen** you can save your time because it allows you to process more than one image with a mouse click!\n**Converseen** is very simple: it features a very simple user interface without strange options.\n\n## What you can do with *Converseen*?\n\nWith converseen you can:\n* Carry out a single or a multiple conversion.\n* Resize one or multiple images.\n* Compress images for your web pages.\n\n## Installing\n\n**Converseen** is available for both **Linux** and **Windows** platforms.  \nTo install **Converseen** source or binaries follow [these instructions](http://converseen.fasterland.net/download-for-linux/).  \n\n## Author\n\n[Francesco Mondello](http://converseen.fasterland.net/).  \nTo contact me you can use [this page](http://converseen.fasterland.net/contact-me/).  \n  \n  \nYou can find more details about **Converseen** at [converseen.fasterland.net](http://converseen.fasterland.net/).  \nIf you appreciate this work and would like to support the project, you are welcome to [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HQA6TBT5354FC) **1 EUR** via **Paypal**.  \n\n## License\n \n    Converseen - The image batch converter and resizer\n    Copyright (C) 2009-2017  Francesco Mondello\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>. \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E930:3E1DA:17A821:5E1D4C:6AB92CE7"},"text_sha256":"14aa7e90940c1ac744cce75476bb5f503e0e1bea8805429d41d78e8f09adb3e3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1680","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FE:71F98:184990B:1C70C4E:6AB92CEA"},"commit":{"sha":"e7cfafbb3e3a95d310906d034656807946b02258","url":"https://github.com/Faster3ck/Converseen/commit/e7cfafbb3e3a95d310906d034656807946b02258","date":"2026-06-25T14:25:12Z","author_date":"2026-06-25T14:25:12Z","committer_date":"2026-06-25T14:25:12Z","tree_sha":"6e7d3fb73d81062ab3b40b25ea0bc41228ba96b8","message_first_line":"Merge pull request #253 from david-geiger/main"},"tree_request_status":200,"tree_rate":{"github_remaining":"1679","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F4:6E429:17F7F4F:1C1F57E:6AB92CEA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3510,"blob_sha":"87f08d33e48a082251e98e9c15907ad4be899f01","priority":0}],"documents":[{"path":"README.md","size":3510,"blob_sha":"87f08d33e48a082251e98e9c15907ad4be899f01","priority":0,"status":200,"text":"# Converseen\n\n![alt text](https://converseen.fasterland.net/images/converseen_013_github.png \"Converseen on Kde\")\n\n**Converseen** is a free **cross-platform batch image processor** for **Windows**, **Linux**, **macOS**, **FreeBSD**, and other operating systems. It allows you to **convert**, **resize**, **rotate**, and **flip** an infinite number of images with a single mouse click. Moreover, **Converseen** can convert an entire **PDF** document into a set of images with your preferred characteristics. You can choose from over **100+ formats**, set the size, resolution, and the filename.\n\nThanks to **ImageMagick**, the powerful image manipulation library, **Converseen** can handle more than **100 image formats**, including **DPX, EXR, GIF, JPEG, JPEG-2000, PNG, SVG, TIFF, WebP, HEIC/HEIF**, and many others. **Converseen** is designed to be user-friendly, fast, practical, and best of all, it’s available for **free**!\n\n## What you can do with *Converseen*?\n\nWith **Converseen** you can:\n* Carry out a single or a multiple conversion.\n* Resize one or multiple images.\n* Compress images for your web pages.\n* Rotate and flip images.\n* Rename a set of images using a progressive number or a prefix/suffix.\n* Selecting a resampling filter to resize images.\n* Convert an entire PDF to a bunch of images\n\n## Installing\n\n**Converseen** is available for free for several operating systems including **Windows 7/8/10/11**, all versions of **Linux** such as **Ubuntu, Mint, Fedora, Arch Linux, openSUSE** either through the **official repos** or through **AppImage**, **Snap** and **Flatpak** packages, **macOS 13+**, but also **FreeBSD**.\n\n* [Download for Windows](https://converseen.fasterland.net/download-for-windows/)\n* [Download for Linux](https://converseen.fasterland.net/download-for-linux/)\n* [Download for macOS](https://converseen.fasterland.net/download-for-macos/)\n* [Download for FreeBSD](https://converseen.fasterland.net/download-freebsd/)\n\n## Author\n\n[Francesco Mondello](https://converseen.fasterland.net/).\nTo contact me you can use [this page](https://converseen.fasterland.net/contact-me/).\n\n\nYou can find more details about **Converseen** at [converseen.fasterland.net](https://converseen.fasterland.net/).\nIf you enjoy this work, feel free to contribute to its development by making a **donation** on [**PayPal**, **Ko-Fi**, or using **Cryptocurrencies**](https://converseen.fasterland.net/donate/)!\n\n## Privacy Policy\n\nThis program will not transfer any information to other networked systems.\n\n## Code Signing\n\nFor the **Windows** binaries for **Converseen**, this program uses free code signing provided by [SignPath.io](https://signpath.io/), certificate by the [SignPath Foundation](https://signpath.org/).\n\n## License\n\n    Converseen - The image batch converter and resizer\n    Copyright (C) 2009 - 2026  Francesco Mondello\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D20:727CE:175974:5DCEF0:6AB92CEA"},"text_sha256":"5d8047d0a4899ddfda50a0d265b1c13305c34cb5bf9ce3764a070a0366ba7728"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=e7cfafbb3e3a95d310906d034656807946b02258; file=README.md; text=Converseen is available for free for several operating systems including Windows 7/8/10/11 , all versions of Linux such as Ubuntu, Mint, Fedora, Arch Linux, openSUSE either through the official repos or through AppImage , Snap and Flatpak packages, macOS 13+ , but also FreeBSD . ## Author ## Privacy Policy This program will not transfer any information to other networked systems. ## Code Signing","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}}}
{"repository":"SimpleITK/SimpleITK","input_row":{"repository":"SimpleITK/SimpleITK","url":"https://github.com/SimpleITK/SimpleITK","name":"SimpleITK","owner":"SimpleITK","description":"SimpleITK: a layer built on top of the Insight Toolkit (ITK), intended to simplify and facilitate ITK's use in rapid prototyping, education and interpreted languages.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1089,"issues":728,"created_at":"2010-11-10T18:56:04Z","updated_at":"2026-09-24T07:16:14Z","first_commit_at":"2010-07-09T13:42:05Z","last_commit_at":"2026-09-18T20:00:04Z","activity_months":194.33000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:15.591Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"SimpleITK/SimpleITK","visibility":"public","created_at":"2010-11-10T18:56:04Z","updated_at":"2026-09-24T07:16:14Z","private":false,"fork":false,"archived":false,"stargazers_count":1089,"open_issues_count":101,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1678","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E5:A9DC0:17D1DFA:1BF92A4:6AB92CEB"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1677","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B3:767EB:18085E5:1C3031D:6AB92CEC"},"commit":{"sha":"21ef239e8e711428e329ba5362179f837d2ac76a","url":"https://github.com/SimpleITK/SimpleITK/commit/21ef239e8e711428e329ba5362179f837d2ac76a","date":"2018-05-24T19:04:15Z","author_date":"2018-05-24T19:04:15Z","committer_date":"2018-05-24T19:04:15Z","tree_sha":"afc6d12557b7a18fadda1adc039ebb54508b327a","message_first_line":"Update SimpleITK Version in Sphinx"},"tree_request_status":200,"tree_rate":{"github_remaining":"1676","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AE:B1202:17B48D7:1BDB7E5:6AB92CEC"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":5350,"blob_sha":"621e2cd82590d3371efe9709d7b539a049c7b5f7","priority":0}],"documents":[{"path":"Readme.md","size":5350,"blob_sha":"621e2cd82590d3371efe9709d7b539a049c7b5f7","priority":0,"status":200,"text":"SimpleITK\n=========\n\n|  | CircleCI | ReadTheDocs |\n|:-------:|:---------:|:-------------:|\n| release | [![CircleCI](https://circleci.com/gh/SimpleITK/SimpleITK/tree/release.svg?style=shield)](https://circleci.com/gh/SimpleITK/SimpleITK/tree/release) | [![ReadTheDoc](https://readthedocs.org/projects/simpleitk/badge/?version=release)](http://simpleitk.readthedocs.io/en/release/) |\n| master | [![CircleCI](https://circleci.com/gh/SimpleITK/SimpleITK/tree/master.svg?style=shield)](https://circleci.com/gh/SimpleITK/SimpleITK/tree/master) | [![ReadTheDoc](https://readthedocs.org/projects/simpleitk/badge/?version=master)](http://simpleitk.readthedocs.io/en/master/) |\n| next | [![CircleCI](https://circleci.com/gh/SimpleITK/SimpleITK/tree/next.svg?style=shield)](https://circleci.com/gh/SimpleITK/SimpleITK/tree/next) | [![ReadTheDoc](https://readthedocs.org/projects/simpleitk/badge/?version=next)](http://simpleitk.readthedocs.io/en/next/)  |\n\n\nSimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration. It is built on top of the Insight Segmentation and Registration Toolkit [ITK](https://www.itk.org) with the intent of providing a simplified interface to ITK. SimpleITK itself is written in C++ but is available for a large number of programming languages. Currently these include:\n\n* [Python](http://www.python.org)\n* [R](https://www.r-project.org)\n* [Java](http://www.java.com)\n* [C#](http://msdn.microsoft.com/en-us/vcsharp/default.aspx)\n* [Lua](http://www.lua.org)\n* [TCL](https://www.tcl.tk/)\n* [Ruby](https://www.ruby-lang.org/en/)\n\n\nWrapping of the C++ code is accomplished through [SWIG](http://www.swig.org), in principle, any language wrapped by SWIG should be applicable to SimpleITK.\n\nUnlike ITK's support of n-dimensional spatio-temporal images, SimpleITK supports 2D, 3D and optionally 3D+time. The dimensionality refers to spatio-temporal dimensions, the voxels can be n-dimensional vectors.\n\nSimpleITK is licensed under the [Apache License](http://www.opensource.org/licenses/apache2.0.php) in the [same way as ITK](https://www.itk.org/Wiki/ITK_Release_4/Licensing).\n\nHow to Cite\n--------\n\nIf you found SimpleITK useful in your research, support our efforts by citing\nthe relevant publication(s):\n\nZ. Yaniv, B. C. Lowekamp, H. J. Johnson, R. Beare, \"SimpleITK Image-Analysis Notebooks: a Collaborative Environment for Education and Reproducible Research\", *J Digit Imaging.*, https://doi.org/10.1007/s10278-017-0037-8, 2017.\n\nB. C. Lowekamp, D. T. Chen, L. Ibáñez, D. Blezek, \"The Design of SimpleITK\", *Front. Neuroinform.*, 7:45. https://doi.org/10.3389/fninf.2013.00045, 2013.\n\nDocumentation\n-------------\nWith massive libraries like SimpleITK, good documentation is a must. The documentation for SimpleITK is split up into multiple levels:\n1. [API Documentation](https://itk.org/SimpleITKDoxygen/html/) - This contains class and function documentation. The descriptions for functions and classes are primarily borrowed from the original ITK classes.\n2. [SimpleITK Documentation](http://simpleitk.readthedocs.io/en/next/) - This contains higher-level guides, installing toolkit's binary distributions, building the toolkit as well as examples specific to SimpleITK. This documentation will be valid for each language that SimpleITK supports. The examples will also include code in each language.\n    * [SimpleITK Wiki](https://itk.org/Wiki/SimpleITK) - This is the old SimpleITK documentation page which was replaced by ReadTheDocs. The information may be outdated.\n3. Notebooks Repositories - This documentation is similar to the SimpleITK documentation except it contains examples on how to utilize **multiple** classes in SimpleITK to facilitate solving a broader image processing problem.\n    * [Python/Jupyter Notebook](http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/)\n\nSupport\n-------\n\nSimpleITK provides access to most of the ITK components, but not all. If you are looking for something specific and can't find it, open an issue on GitHub or ask for support on the [forum](https://discourse.itk.org).\n\nReport an Issue\n---------------\n\nHelp us improve SimpleITK by reporting issues you encounter. When you report an error, you allow us to address your specific problem, but more importantly you are helping all of the SimpleITK community.\n\n**Thank you for helping making SimpleITK better!**\n\nAll issues are reported and managed on the [project's GitHub issue tracker](https://github.com/SimpleITK/SimpleITK/issues). When reporting an issue, please provide as much information as possible to enable us to reproduce the problem.\n\nThe following information will allow us to address your issue in a timely manner:\n1. Error message (copy & pasted) and focused description of the problem.\n2. Operating system, and version (e.g. OSX 10.11.6).\n3. Programming language, and version (e.g. Python 2.7.14, R 3.2.3).\n4. Version of SimpleITK (e.g. 1.1.0), just invoke the SimpleITK Version() function.\n5. How did you install SimpleITK, binary distribution (e.g. conda install -c simpleitk simpleitk), or built it from source (e.g. devtools::install_github(\"SimpleITK/SimpleITKRInstaller\")).\n6. A minimal working example which causes the error.\n7. If your code requires input, possibly point to a minimal sized input image.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AADE:3B1F3:1861A5:5ED7C3:6AB92CED"},"text_sha256":"2c66da565f3b50367df2f0c6f75fa6842acad3d06e0bb40168ee0f57dd4f4df0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1675","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BB:180242:1807D4C:1C2F320:6AB92CED"},"commit":{"sha":"0eb2afc67c6ae0b1dbf4517116ca0e30551d7597","url":"https://github.com/SimpleITK/SimpleITK/commit/0eb2afc67c6ae0b1dbf4517116ca0e30551d7597","date":"2026-06-30T14:38:09Z","author_date":"2026-06-30T14:38:09Z","committer_date":"2026-06-30T14:38:09Z","tree_sha":"a76a80c2e4a667a0eab0ad8f1e0de8afc5a61809","message_first_line":"Merge pull request #2617 from blowekamp/split-publish-job"},"tree_request_status":200,"tree_rate":{"github_remaining":"1674","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:D9C334:FFE745:6AB92CED"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":5774,"blob_sha":"0c5238bfd8c91ec5441c176887c4d2bf1a16b3cd","priority":0}],"documents":[{"path":"Readme.md","size":5774,"blob_sha":"0c5238bfd8c91ec5441c176887c4d2bf1a16b3cd","priority":0,"status":200,"text":"SimpleITK\n=========\n\n|         |                                                                                            GithubActions                                                                                             |                                                           ReadTheDocs                                                           |\n|:-------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|\n| release | [![Batch Build and Test](https://github.com/SimpleITK/SimpleITK/actions/workflows/BatchBuild.yml/badge.svg?branch=release)](https://github.com/SimpleITK/SimpleITK/actions/workflows/BatchBuild.yml) | [![ReadTheDoc](https://readthedocs.org/projects/simpleitk/badge/?version=release)](http://simpleitk.readthedocs.io/en/release/) |\n| main  | [![Batch Build and Test](https://github.com/SimpleITK/SimpleITK/actions/workflows/BatchBuild.yml/badge.svg?branch=main)](https://github.com/SimpleITK/SimpleITK/actions/workflows/BatchBuild.yml)  |  [![ReadTheDoc](https://readthedocs.org/projects/simpleitk/badge/?version=main)](http://simpleitk.readthedocs.io/en/main/)  |\n\nSimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration. It is built on top of the Insight Segmentation and Registration Toolkit [ITK](https://www.itk.org) with the intent of providing a simplified interface to ITK. SimpleITK itself is written in C++ but is available for a large number of programming languages. Currently, these include:\n\n* [Python](http://www.python.org)\n* [R](https://www.r-project.org)\n* [Java](http://www.java.com)\n* [C#](http://msdn.microsoft.com/en-us/vcsharp/default.aspx)\n* [Lua](http://www.lua.org)\n* [TCL](https://www.tcl.tk/)\n* [Ruby](https://www.ruby-lang.org/en/)\n\n\nWrapping of the C++ code is accomplished through [SWIG](http://www.swig.org), in principle, any language wrapped by SWIG should be applicable to SimpleITK.\n\nUnlike ITK's support of n-dimensional spatio-temporal images, SimpleITK supports 2D, 3D and 4D images. The dimensionality refers to spatio-temporal dimensions, the voxels can be n-dimensional vectors.\n\nSimpleITK is licensed under the [Apache License](http://www.opensource.org/licenses/apache2.0.php).\n\nAcknowledgments\n--------------\nSimpleITK development has been supported by:\n\n* The Intramural Research Program of the National Institutes of Health, National Institute of Allergy and Infectious Diseases.\n\n* The US National Library of Medicine under the American Recovery and Reinvestment Act (ARRA) and under the Intramural Research Program of the U.S. National Institutes of Health.\n\n* The Insight Software Consortium and the ITK user and developer communities.\n\n\nLicense and Copyright\n---------------------\n\nThe SimpleITK project  is part of the [Insight Software Consortium](https://www.insightsoftwareconsortium.org/)(ISC) a non-profit educational consortium dedicated to promoting and maintaining open-source, freely available software for bio-medical image analysis. The copyright is held by [NumFOCUS](https://numfocus.org/). The SimpleITK software is distributed under the [Apache License 2.0](https://github.com/SimpleITK/SimpleITK/blob/main/LICENSE).\n\n\nHow to Cite\n--------\n\nIf you found SimpleITK useful in your research, support our efforts by citing\nthe relevant publication(s):\n\nR. Beare, B. C. Lowekamp, Z. Yaniv, \"Image Segmentation, Registration and\nCharacterization in R with SimpleITK\", *J Stat Software*, 86(8), https://doi.org/10.18637/jss.v086.i08, 2018.\n\nZ. Yaniv, B. C. Lowekamp, H. J. Johnson, R. Beare, \"SimpleITK Image-Analysis Notebooks: a Collaborative Environment for Education and Reproducible Research\", *J Digit Imaging.*, 31(3): 290-303, https://doi.org/10.1007/s10278-017-0037-8, 2018.\n\nB. C. Lowekamp, D. T. Chen, L. Ibáñez, D. Blezek, \"The Design of SimpleITK\", *Front. Neuroinform.*, 7:45. https://doi.org/10.3389/fninf.2013.00045, 2013.\n\nDocumentation\n-------------\nWith massive libraries like SimpleITK, good documentation is a must. The documentation for SimpleITK is split up into multiple levels:\n1. [API Documentation](https://simpleitk.org/doxygen/latest/html/) - This contains class and function documentation. The descriptions for functions and classes are primarily borrowed from the original ITK C++ classes.\n2. [SimpleITK Documentation](http://simpleitk.readthedocs.io/en/main/) - This site contains high-level guides (fundamental SimpleITK concepts, common conventions, etc.), details with respect to the toolkit's binary distributions, instructions for building the toolkit, as well as SimpleITK examples in all supported programming languages.\n3. [Jupyter Notebook Repository](http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/) - This repository contains a collection of Jupyter Notebooks illustrating the use of SimpleITK for educational and research activities. The notebooks demonstrate the use of SimpleITK for interactive image analysis using the Python and R programming languages. Recommended reading, if you are starting with SimpleITK.\n\n\nSupport\n-------\n\nSimpleITK provides access to most of the ITK components, but not all. If you are looking for something specific and can't find it, open an issue on GitHub or ask for support on the [forum](https://discourse.itk.org).\n\nReport an Issue or Request a Feature\n-------------------------------------\n\nPlease use the [issue tracker](https://github.com/SimpleITK/SimpleITK/issues) to report problems or request features.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6938:2C474:18150D:5E8A7C:6AB92CEE"},"text_sha256":"f88b3e972148201514065dd9a18d935b8f30fafd5b3e42015905a950a9907dd3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"image-rs/imageproc","input_row":{"repository":"image-rs/imageproc","url":"https://github.com/image-rs/imageproc","name":"imageproc","owner":"image-rs","description":"Image processing operations","language":"Rust","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":980,"issues":266,"created_at":"2015-09-27T18:11:32Z","updated_at":"2026-09-23T11:18:09Z","first_commit_at":"2015-09-27T18:13:03Z","last_commit_at":"2026-08-29T22:59:04Z","activity_months":131.05000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:18.805Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"image-rs/imageproc","visibility":"public","created_at":"2015-09-27T18:11:32Z","updated_at":"2026-09-23T11:18:09Z","private":false,"fork":false,"archived":false,"stargazers_count":980,"open_issues_count":88,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1673","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0927:724D2:17E321F:1C0AA14:6AB92CEE"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1672","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091E:52542:17D69C7:1BFE2EF:6AB92CEF"},"commit":{"sha":"e2614e129082240d91fcd1ec496d28c7256f0718","url":"https://github.com/image-rs/imageproc/commit/e2614e129082240d91fcd1ec496d28c7256f0718","date":"2018-05-19T13:29:33Z","author_date":"2018-05-19T13:29:33Z","committer_date":"2018-05-19T13:29:33Z","tree_sha":"57469584b39364b4e47081168afa51c2c74fb108","message_first_line":"Support of RgbaImage for affine::rotate (#264)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1671","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:181DBF4:1C4577C:6AB92CEF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2882,"blob_sha":"e65133edfee7da86d0c6f75ae17e986fda8fc167","priority":0}],"documents":[{"path":"README.md","size":2882,"blob_sha":"e65133edfee7da86d0c6f75ae17e986fda8fc167","priority":0,"status":200,"text":"imageproc\n====\n\n[![Join the chat at https://gitter.im/PistonDevelopers/imageproc](https://badges.gitter.im/PistonDevelopers/imageproc.svg)](https://gitter.im/PistonDevelopers/imageproc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://travis-ci.org/PistonDevelopers/imageproc.svg?branch=master)](https://travis-ci.org/PistonDevelopers/imageproc)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/PistonDevelopers/imageproc/blob/master/LICENSE)\n\nAn image processing library, based on the [image](https://github.com/PistonDevelopers/image) library. There may initially\nbe overlap between the functions in this library and those in image::imageops.\n\nThis is very much a work in progress. If you have ideas for things that could be done better, or new features you'd like to see, then please create issues for them. Nothing's set in stone.\n\n[API documentation](http://docs.piston.rs/imageproc/imageproc/)\n\n# Goals\n\nA performant, well-tested, well-documented library with a consistent API, suitable for use as the basis of computer vision applications or graphics editors.\n\n# Non-goals\n\nMaximum genericity over image storages or formats, or support for higher-dimensional images.\n\nFull blown computer vision applications (e.g. face recognition or image registration) probably also belong elsewhere, but the line's a bit blurred here (e.g. is image in-painting an image processing task or a computer vision task?). However, worrying about how to structure the code can probably wait until we have more code to structure...\n\n# How to contribute\n\nAll pull requests are welcome. Some specific areas that would be great to get some help with are:\n\n* New features! If you're planning on adding some new functions or modules, please create an issue with a name along the lines of \"Add [feature name]\" and assign it to yourself (or comment on the issue that you're planning on doing it). This way we'll not have multiple people working on the same functionality.\n* Performance - profiling current code, documenting or fixing performance problems, adding benchmarks, comparisons to other libraries.\n* Testing - more unit tests and regression tests. Some more property-based testing would be particularly nice.\n* APIs - are the current APIs hard to use or inconsistent? Some open questions: Should we return Result types more often? How should functions indicate acceptable input image dimensions? Should we use enum arguments or have lots of similarly named functions? What's the best way to get concise code while still allowing control over allocations?\n* Documentation - particularly more example code showing what's currently possible. Pretty pictures in this README.\n* Feature requests - are there any functions you'd like to see added? Is the library currently unsuitable for your use case for some reason?\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:17FC60:5E71D7:6AB92CEF"},"text_sha256":"84ca5a976e54b318df7cb343c403f84850d644f779a3b8d05cbd475920fc5870"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1670","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E6:731F6:180709B:1C2EACE:6AB92CF0"},"commit":{"sha":"a6e8a3ff304d070370845f2ccfd1e76588873617","url":"https://github.com/image-rs/imageproc/commit/a6e8a3ff304d070370845f2ccfd1e76588873617","date":"2026-06-30T13:19:48Z","author_date":"2026-06-30T13:19:48Z","committer_date":"2026-06-30T13:19:48Z","tree_sha":"2290087bd503c2496d53bac0d0096cf88f7cf6b5","message_first_line":"add unit tests for seam_carving (#796)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1669","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092B:77994:17FF651:1C26DE8:6AB92CF0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2102,"blob_sha":"5650d1229a73270c40eb05bcc13be3ce84cfb620","priority":0}],"documents":[{"path":"README.md","size":2102,"blob_sha":"5650d1229a73270c40eb05bcc13be3ce84cfb620","priority":0,"status":200,"text":"# imageproc\n\n[![crates.io](https://img.shields.io/crates/v/imageproc.svg)](https://crates.io/crates/imageproc)\n[![doc-badge]][doc-link]\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/image-rs/imageproc/blob/main/LICENSE)\n[![Dependency status](https://deps.rs/repo/github/image-rs/imageproc/status.svg)](https://deps.rs/repo/github/image-rs/imageproc)\n\nAn image processing library, based on the\n[`image`](https://github.com/image-rs/image) library.\n\n[API documentation][doc-link]\n\n[doc-badge]: https://docs.rs/imageproc/badge.svg\n[doc-link]: https://docs.rs/imageproc\n\n## Goals\n\nA performant, well-tested, well-documented library with a consistent API, suitable for use as\nthe basis of computer vision applications or graphics editors.\n\n## Non-goals\n\nMaximum genericity over image storages or formats, or support for higher-dimensional images.\n\n## Color Space\n\nFunctions in this library implicitly assume that pixels colors are\nstored in a linear color space like `RGB` as opposed to a non-linear color\nspace such as `sRGB`.\n\nIf you are not familiar with gamma correction then [this article] contains\nan introduction and examples of color artefacts resulting\nfrom not using linear color spaces.\n\n[this article]: https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/\n\n## Parallelism\n\nThis library provides both single-threaded and multi-threaded variations of several functions\nby using [rayon](https://github.com/rayon-rs/rayon).\n\nDepending on image size and the amount of work performed per pixel the parallel versions may not\nalways be faster - we recommend benchmarking for your specific use-case.\n\n## Crate Features\n\n### Default Features\n\n- `rayon`: enables multi-threaded versions of several functions\n- `text`: enables text drawing\n- `fft`: enables `phash` and other functions that depend on the `rustfft` crate\n\n### Optional Features\n\n- `display-window`: enables the displaying of images (using `imageproc::window`) with\n  [sdl2](https://github.com/Rust-SDL2/rust-sdl2)\n\n## How to contribute\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E828:4F9CC:1722E4:5D962D:6AB92CF1"},"text_sha256":"10ab1c63b10b2492ade8eb1d93c02a4eb3ad8e6c5df93f2494bdb68bd75d2845"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"janko/image_processing","input_row":{"repository":"janko/image_processing","url":"https://github.com/janko/image_processing","name":"image_processing","owner":"janko","description":"Web-friendly image processing macros for libvips and ImageMagick","language":"Ruby","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":961,"issues":103,"created_at":"2015-10-03T18:36:53Z","updated_at":"2026-09-14T22:27:57Z","first_commit_at":"2015-10-03T18:36:13Z","last_commit_at":"2026-09-01T20:07:19Z","activity_months":130.94999999999999,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:21.723Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"janko/image_processing","visibility":"public","created_at":"2015-10-03T18:36:53Z","updated_at":"2026-09-14T22:27:57Z","private":false,"fork":false,"archived":false,"stargazers_count":961,"open_issues_count":0,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1668","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:1807198:1C2EBF3:6AB92CF1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1667","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17E2E05:1C0A71B:6AB92CF2"},"commit":{"sha":"b28267d20eab615000232a7f31caf270caf54836","url":"https://github.com/janko/image_processing/commit/b28267d20eab615000232a7f31caf270caf54836","date":"2018-05-04T12:57:08Z","author_date":"2018-05-04T12:57:08Z","committer_date":"2018-05-04T12:57:08Z","tree_sha":"e678e5c61af769e7c84cfc34a7b68fce465b7e77","message_first_line":"Rename `magick_options` to `settings`"},"tree_request_status":200,"tree_rate":{"github_remaining":"1666","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:17979F8:1BBD717:6AB92CF2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5247,"blob_sha":"ec64168cce5061cd1ceabde06aa5b686e9dc063b","priority":0}],"documents":[{"path":"README.md","size":5247,"blob_sha":"ec64168cce5061cd1ceabde06aa5b686e9dc063b","priority":0,"status":200,"text":"# ImageProcessing\n\nProvides higher-level image processing helpers that are commonly needed\nwhen handling image uploads.\n\nThis gem can process images with either [ImageMagick]/[GraphicsMagick] or\n[libvips] libraries. ImageMagick is a good default choice, especially if you\nare migrating from another gem or library that uses ImageMagick. Libvips is a\nnewer library that can process images [very rapidly][libvips performance] (up\nto 10x faster than ImageMagick).\n\n\n## Goal\n\nThe goal of this project is to have a single gem that contains all the\nhelper methods needed to resize and process images.\n\nCurrently, existing attachment gems (like Paperclip, CarrierWave, Refile,\nDragonfly, ActiveStorage, and others) implement their own custom image\nhelper methods. But why? That's not very DRY, is it?\n\nLet's be honest. Image processing is a dark, mysterious art. So we want to\ncombine every great idea from all of these separate gems into a single awesome\nlibrary that is constantly updated with best-practice thinking about\nhow to resize and process images.\n\n\n## Installation\n\n1. Install ImageMagick and/or libvips:\n\n  ```sh\n  $ brew install imagemagick vips\n  ```\n\n2. Add the gem to your Gemfile:\n\n  ```rb\n  gem \"image_processing\", \"~> 1.0\"\n  ```\n\n\n## Usage\n\nProcessing is performed through [`ImageProcessing::Vips`] or\n[`ImageProcessing::MiniMagick`] modules. Both modules share the same chainable\nAPI for defining the processing pipeline:\n\n```rb\nrequire \"image_processing/mini_magick\"\n\nprocessed = ImageProcessing::MiniMagick\n  .source(file)\n  .resize_to_limit(400, 400)\n  .convert(\"png\")\n  .call\n\nprocessed #=> #<Tempfile:/var/folders/.../image_processing20180316-18446-1j247h6.png>\n```\n\nThis allows easy branching when generating multiple derivates:\n\n```rb\nrequire \"image_processing/vips\"\n\npipeline = ImageProcessing::Vips\n  .source(file)\n  .convert(\"png\")\n\nlarge  = pipeline.resize_to_limit!(800, 800)\nmedium = pipeline.resize_to_limit!(500, 500)\nsmall  = pipeline.resize_to_limit!(300, 300)\n```\n\nThe processing is executed on `#call` or when a processing method is called\nwith a bang (`!`).\n\n```rb\nprocessed = ImageProcessing::MiniMagick\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .call(image)\n\n# OR\n\nprocessed = ImageProcessing::MiniMagick\n  .source(image) # declare source image\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .call\n\n# OR\n\nprocessed = ImageProcessing::MiniMagick\n  .source(image)\n  .convert(\"png\")\n  .resize_to_limit!(400, 400) # bang method\n```\n\nYou can inspect the pipeline options at any point before executing it:\n\n```rb\npipeline = ImageProcessing::MiniMagick\n  .source(image)\n  .loader(page: 1)\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .strip\n\npipeline.options\n# => {:source=>#<File:/path/to/source.jpg>,\n#     :loader=>{:page=>1},\n#     :saver=>{},\n#     :format=>\"png\",\n#     :operations=>[[:resize_to_limit, [400, 400]], [:strip, []]],\n#     :processor_class=>ImageProcessing::MiniMagick::Processor}\n```\n\nThe source object needs to responds to `#path`, or be a String, a Pathname, or\na `Vips::Image`/`MiniMagick::Tool` object. Note that the processed file is\nalways saved to a new location, in-place processing is not supported.\n\n```rb\nImageProcessing::Vips.source(File.open(\"source.jpg\"))\nImageProcessing::Vips.source(\"source.jpg\")\nImageProcessing::Vips.source(Pathname.new(\"source.jpg\"))\nImageProcessing::Vips.source(Vips::Image.new_from_file(\"source.jpg\"))\n```\n\nWhen `#call` is called without options, the result of processing is a\n`Tempfile` object. You can save the processing result to a specific location by\npassing `:destination` to `#call`, or pass `save: false` to retrieve the raw\n`Vips::Image`/`MiniMagick::Tool` object.\n\n```rb\npipeline = ImageProcessing::Vips.source(image)\n\npipeline.call #=> #<Tempfile ...>\npipeline.call(save: false) #=> #<Vips::Image ...>\npipeline.call(destination: \"/path/to/destination\")\n```\n\nYou can continue reading the API documentation for specific modules:\n\n* **[`ImageProcessing::Vips`]**\n* **[`ImageProcessing::MiniMagick`]**\n\nSee the **[wiki]** for additional \"How To\" guides for common scenarios. The wiki\nis publicly editable, so you're encouraged to add your own guides.\n\n\n## Contributing\n\nOur test suite requires both `imagemagick` and `libvips` libraries to be installed.\n\n```\n$ brew install imagemagick vips\n```\n\nAfterwards you can run tests with\n\n```\n$ bundle exec rake test\n```\n\n\n## Feedback\n\nWe welcome your feedback! What would you like to see added to image_processing?\nHow can we improve this gem? Open an issue and let us know!\n\n\n## Credits\n\nThe `ImageProcessing::MiniMagick` functionality was extracted from\n[refile-mini_magick]. The chainable interface was heavily inspired by\n[HTTP.rb].\n\n\n## License\n\n[MIT](LICENSE.txt)\n\n[libvips]: http://jcupitt.github.io/libvips/\n[ImageMagick]: https://www.imagemagick.org\n[GraphicsMagick]: http://www.graphicsmagick.org\n[`ImageProcessing::Vips`]: /doc/vips.md#imageprocessingvips\n[`ImageProcessing::MiniMagick`]: /doc/minimagick.md#imageprocessingminimagick\n[refile-mini_magick]: https://github.com/refile/refile-mini_magick\n[wiki]: https://github.com/janko-m/image_processing/wiki\n[HTTP.rb]: https://github.com/httprb/http\n[libvips performance]: https://github.com/jcupitt/libvips/wiki/Speed-and-memory-use\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AAE:3E1DA:17A8B3:5E1ECB:6AB92CF2"},"text_sha256":"3b2587ec76b1ae7774e60e0be1fa6f7a0a689c282dede9780e9552653fac3050"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1665","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:D9C775:FFEC45:6AB92CF3"},"commit":{"sha":"7d89c0196cc369428126bcba075ff53485099ef2","url":"https://github.com/janko/image_processing/commit/7d89c0196cc369428126bcba075ff53485099ef2","date":"2026-06-03T20:18:28Z","author_date":"2026-06-03T20:18:28Z","committer_date":"2026-06-03T20:18:28Z","tree_sha":"7b600924e2472099c07f7ec89bd7d0625dcbd914","message_first_line":"Bump to 2.0.2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1664","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DD:3C4024:1817701:1C3F052:6AB92CF3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6344,"blob_sha":"ee20a0777a90d3415cc142517adac237b2f08045","priority":0}],"documents":[{"path":"README.md","size":6344,"blob_sha":"ee20a0777a90d3415cc142517adac237b2f08045","priority":0,"status":200,"text":"# ImageProcessing\n\nProvides higher-level image processing helpers that are commonly needed\nwhen handling image uploads.\n\nThis gem can process images with [ImageMagick] or [libvips]. ImageMagick is a\ngood default choice, especially if you are migrating from another gem or library\nthat uses ImageMagick. Libvips is a newer library that can process images [very\nrapidly][libvips performance] (often multiple times faster than ImageMagick).\n\n\n## Goal\n\nThe goal of this project is to have a single gem that contains all the\nhelper methods needed to resize and process images.\n\nCurrently, existing attachment gems (like Paperclip, CarrierWave, Refile,\nDragonfly, Active Storage, and others) implement their own custom image\nhelper methods. But why? That's not very DRY, is it?\n\nLet's be honest. Image processing is a dark, mysterious art. So we want to\ncombine every great idea from all of these separate gems into a single awesome\nlibrary that is constantly updated with best-practice thinking about\nhow to resize and process images.\n\n\n## Installation\n\n1. Install ImageMagick and/or libvips:\n\nIn a Mac terminal:\n\n```sh\n  $ brew install imagemagick # if using ImageMagick\n  $ brew install vips # if using libvips\n  ```\n\n In a debian/ubuntu terminal:\n\n```sh\n  $ sudo apt install imagemagick # if using ImageMagick\n  $ sudo apt install libvips # if using libvips\n  ```\n\n2. Add the gem(s) to your Gemfile:\n\n  ```rb\n  gem \"image_processing\", \"~> 2.0\"\n  gem \"mini_magick\", \"~> 5.0\" # if using ImageMagick\n  gem \"ruby-vips\", \"~> 2.0\" # if using libvips\n  ```\n\n\n## Usage\n\nProcessing is performed through **[`ImageProcessing::Vips`]** or\n**[`ImageProcessing::MiniMagick`]** modules. Both modules share the same\nchainable API for defining the processing pipeline:\n\n```rb\nrequire \"image_processing/mini_magick\"\n\nprocessed = ImageProcessing::MiniMagick\n  .source(file)\n  .resize_to_limit(400, 400)\n  .convert(\"png\")\n  .call\n\nprocessed #=> #<Tempfile:/var/folders/.../image_processing20180316-18446-1j247h6.png>\n```\n\nThis allows easy branching when generating multiple derivatives:\n\n```rb\nrequire \"image_processing/vips\"\n\npipeline = ImageProcessing::Vips\n  .source(file)\n  .convert(\"png\")\n\nlarge  = pipeline.resize_to_limit!(800, 800)\nmedium = pipeline.resize_to_limit!(500, 500)\nsmall  = pipeline.resize_to_limit!(300, 300)\n```\n\nThe processing is executed on `#call` or when a processing method is called\nwith a bang (`!`).\n\n```rb\nprocessed = ImageProcessing::MiniMagick\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .call(image)\n\n# OR\n\nprocessed = ImageProcessing::MiniMagick\n  .source(image) # declare source image\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .call\n\n# OR\n\nprocessed = ImageProcessing::MiniMagick\n  .source(image)\n  .convert(\"png\")\n  .resize_to_limit!(400, 400) # bang method\n```\n\nYou can inspect the pipeline options at any point before executing it:\n\n```rb\npipeline = ImageProcessing::MiniMagick\n  .source(image)\n  .loader(page: 1)\n  .convert(\"png\")\n  .resize_to_limit(400, 400)\n  .strip\n\npipeline.options\n# => {:source=>#<File:/path/to/source.jpg>,\n#     :loader=>{:page=>1},\n#     :saver=>{},\n#     :format=>\"png\",\n#     :operations=>[[:resize_to_limit, [400, 400]], [:strip, []]],\n#     :processor_class=>ImageProcessing::MiniMagick::Processor}\n```\n\nThe source object needs to responds to `#path`, or be a String, a Pathname, or\na `Vips::Image`/`MiniMagick::Tool` object. Note that the processed file is\nalways saved to a new location, in-place processing is not supported.\n\n```rb\nImageProcessing::Vips.source(File.open(\"source.jpg\"))\nImageProcessing::Vips.source(\"source.jpg\")\nImageProcessing::Vips.source(Pathname.new(\"source.jpg\"))\nImageProcessing::Vips.source(Vips::Image.new_from_file(\"source.jpg\"))\n```\n\nWhen `#call` is called without options, the result of processing is a\n`Tempfile` object. You can save the processing result to a specific location by\npassing `:destination` to `#call`, or pass `save: false` to retrieve the raw\n`Vips::Image`/`MiniMagick::Tool` object.\n\n```rb\npipeline = ImageProcessing::Vips.source(image)\n\npipeline.call #=> #<Tempfile ...>\npipeline.call(save: false) #=> #<Vips::Image ...>\npipeline.call(destination: \"/path/to/destination\")\n```\n\nYou can continue reading the API documentation for specific modules:\n\n* **[`ImageProcessing::Vips`]**\n* **[`ImageProcessing::MiniMagick`]**\n\nSee the **[wiki]** for additional \"How To\" guides for common scenarios. The wiki\nis publicly editable, so you're encouraged to add your own guides.\n\n## Instrumentation\n\nYou can register an `#instrumenter` block for a given pipeline, which will wrap\nthe pipeline execution, allowing you to record performance metrics.\n\n```rb\npipeline = ImageProcessing::Vips.instrumenter do |**options, &processing|\n  options[:source]     #=> #<File:...>\n  options[:loader]     #=> { fail: true }\n  options[:saver]      #=> { quality: 85 }\n  options[:format]     #=> \"png\"\n  options[:operations] #=> [[:resize_to_limit, 500, 500], [:flip, [:horizontal]]]\n  options[:processor]  #=> ImageProcessing::Vips::Processor\n\n  ActiveSupport::Notifications.instrument(\"process.image_processing\", **options) do\n    processing.call # calls the pipeline\n  end\nend\n\npipeline\n  .source(image)\n  .loader(fail: true)\n  .saver(quality: 85)\n  .convert(\"png\")\n  .resize_to_limit(500, 500)\n  .flip(:horizontal)\n  .call # calls instrumenter\n```\n\n## Contributing\n\nOur test suite requires both `imagemagick` and `libvips` libraries to be installed. Afterwards you can run tests with:\n\n```sh\n$ bundle exec rake test\n```\n\n\n## Feedback\n\nWe welcome your feedback! What would you like to see added to image_processing?\nHow can we improve this gem? Open an issue and let us know!\n\n\n## Credits\n\nThe `ImageProcessing::MiniMagick` functionality was extracted from\n[refile-mini_magick]. The chainable interface was heavily inspired by\n[HTTP.rb].\n\n\n## License\n\n[MIT](LICENSE.txt)\n\n[libvips]: http://libvips.github.io/libvips/\n[ImageMagick]: https://www.imagemagick.org\n[GraphicsMagick]: http://www.graphicsmagick.org\n[`ImageProcessing::Vips`]: doc/vips.md#readme\n[`ImageProcessing::MiniMagick`]: doc/minimagick.md#readme\n[refile-mini_magick]: https://github.com/refile/refile-mini_magick\n[wiki]: https://github.com/janko/image_processing/wiki\n[HTTP.rb]: https://github.com/httprb/http\n[libvips performance]: https://github.com/libvips/libvips/wiki/Speed-and-memory-use\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86AC:40CE8:181234:5E8775:6AB92CF1"},"text_sha256":"9790b75b361b6ed68ad22f95445b51363f0aba2f323fddfe7baf1452fbff5d58"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"libvips/ruby-vips","input_row":{"repository":"libvips/ruby-vips","url":"https://github.com/libvips/ruby-vips","name":"ruby-vips","owner":"libvips","description":"Ruby extension for the libvips image processing library.","language":"Ruby","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":904,"issues":277,"created_at":"2011-10-11T16:45:42Z","updated_at":"2026-08-25T05:11:34Z","first_commit_at":"2010-08-05T07:01:37Z","last_commit_at":"2026-07-31T17:50:11Z","activity_months":191.83000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:24.644Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"libvips/ruby-vips","visibility":"public","created_at":"2011-10-11T16:45:42Z","updated_at":"2026-08-25T05:11:34Z","private":false,"fork":false,"archived":false,"stargazers_count":904,"open_issues_count":13,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1663","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:180531B:1C2C617:6AB92CF4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1662","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F8:2BC4E5:1838A47:1C5FFFC:6AB92CF5"},"commit":{"sha":"fcdce1763dee7218e51d32d5872607fc164fc176","url":"https://github.com/libvips/ruby-vips/commit/fcdce1763dee7218e51d32d5872607fc164fc176","date":"2018-04-25T14:54:34Z","author_date":"2018-04-25T14:54:34Z","committer_date":"2018-04-25T14:54:34Z","tree_sha":"9ff4c1d23415179cf8af036eca10cc36369e8e53","message_first_line":"version bump and CHANGELOG update"},"tree_request_status":200,"tree_rate":{"github_remaining":"1661","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:1876A76:1C9E610:6AB92CF5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3181,"blob_sha":"911750fc8624e496b1ff99ab7a261890c93436f1","priority":0}],"documents":[{"path":"README.md","size":3181,"blob_sha":"911750fc8624e496b1ff99ab7a261890c93436f1","priority":0,"status":200,"text":"# ruby-vips\n\n[![Gem Version](https://badge.fury.io/rb/ruby-vips.svg)](https://badge.fury.io/rb/ruby-vips)\n[![Build Status](https://travis-ci.org/jcupitt/ruby-vips.svg?branch=master)](https://travis-ci.org/jcupitt/ruby-vips)\n\nThis gem provides a Ruby binding for the [libvips image processing\nlibrary](https://jcupitt.github.io/libvips).\n\nPrograms that use `ruby-vips` don't\nmanipulate images directly, instead they create pipelines of image processing\noperations building on a source image. When the end of the pipe is connected\nto a destination, the whole pipeline executes at once, streaming the image\nin parallel from source to destination a section at a time. \n\nBecause `ruby-vips` is parallel, it's quick, and because it doesn't need to\nkeep entire images in memory, it's light.  For example, the benchmark at\n[vips-benchmarks](https://github.com/jcupitt/vips-benchmarks) loads a\nlarge image, crops, shrinks, sharpens and saves again, and repeats 10 times.\n\n```text\nreal time in seconds, fastest of five runs\nbenchmark       tiff    jpeg\nruby-vips.rb\t0.85\t0.78\t\nimage-magick\t2.03\t2.44\t\nrmagick.rb\t3.87\t3.89\t\n\npeak memory use in kb\nbenchmark\tpeak RES\nruby-vips.rb\t43864\nrmagick.rb\t788768\n```\n\nSee also [benchmarks at the official libvips\nwebsite](https://github.com/jcupitt/libvips/wiki/Speed-and-memory-use).\nThere's a handy blog post explaining [how libvips opens\nfiles](http://libvips.blogspot.co.uk/2012/06/how-libvips-opens-file.html)\nwhich gives some more background.\n\n## Requirements\n\n  * macOS, Linux, and Windows tested\n\n  * libvips 8.2 or later, see the [libvips install instructions](https://jcupitt.github.io/libvips/install.html)\n\n  * [ruby-ffi](https://github.com/ffi/ffi) 1.9 or later \n\n  * Ruby 2.0+, JRuby should work\n\n## Install\n\nIt's just:\n\n```\n$ gem install ruby-vips\n```\n\nor include it in `Gemfile`:\n\n```ruby\ngem 'ruby-vips'\n```\n\nOn Windows, you'll need to set the `RUBY_DLL_PATH` environment variable to \npoint to the libvips bin directory.\n\nTake a look in `examples/`. There is [full API\ndocumentation](http://www.rubydoc.info/gems/ruby-vips). \n\n# Example\n\n```ruby\nrequire 'vips'\n\nim = Vips::Image.new_from_file filename\n\n# put im at position (100, 100) in a 3000 x 3000 pixel image, \n# make the other pixels in the image by mirroring im up / down / \n# left / right, see\n# https://jcupitt.github.io/libvips/API/current/libvips-conversion.html#vips-embed\nim = im.embed 100, 100, 3000, 3000, extend: :mirror\n\n# multiply the green (middle) band by 2, leave the other two alone\nim *= [1, 2, 1]\n\n# make an image from an array constant, convolve with it\nmask = Vips::Image.new_from_array [\n    [-1, -1, -1],\n    [-1, 16, -1],\n    [-1, -1, -1]], 8\nim = im.conv mask, precision: :integer\n\n# finally, write the result back to a file on disk\nim.write_to_file output_filename\n```\n\n# Older versions\n\nThere are two older versions of this gem.\n\nThe `0.3-stable` branch is written in C and supports a different API. It still\nworks, but is only maintained for compatibility.\n\nThe `1.0-stable` branch is based on `gobject-introspection` rather than\n`ffi`. It supports the same API as the current version, but is harder to\ninstall, less portable, slower, and less stable.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4E8:3B7E2:172178:5D98C7:6AB92CF5"},"text_sha256":"ebfb57db35a4580e740aaa1ee4c05736ea4f12e14c8514f684549c3f33b75d29"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1660","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:17F87E6:1C1FF76:6AB92CF6"},"commit":{"sha":"b1394827f95fd9b5bb410f10eaf800603d4318d4","url":"https://github.com/libvips/ruby-vips/commit/b1394827f95fd9b5bb410f10eaf800603d4318d4","date":"2026-06-22T11:35:58Z","author_date":"2026-06-22T11:35:58Z","committer_date":"2026-06-22T11:35:58Z","tree_sha":"66fabf586ff0169574628e0aaf52f75af4dc905f","message_first_line":"Bump actions/checkout from 6 to 7 (#435)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1659","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:1825569:1C4CAE5:6AB92CF6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3353,"blob_sha":"1e9f4c2e9cb028f8884161407ad84f7b23e353d7","priority":0}],"documents":[{"path":"README.md","size":3353,"blob_sha":"1e9f4c2e9cb028f8884161407ad84f7b23e353d7","priority":0,"status":200,"text":"# ruby-vips\n\n[![Gem Version](https://badge.fury.io/rb/ruby-vips.svg)](https://badge.fury.io/rb/ruby-vips)\n[![Test](https://github.com/libvips/ruby-vips/workflows/Test/badge.svg)](https://github.com/libvips/ruby-vips/actions?query=workflow%3ATest)\n\nThis gem is a Ruby binding for the [libvips image processing\nlibrary](https://libvips.github.io/libvips). It has been tested on\nLinux, macOS and Windows, and with ruby 2, ruby 3 and jruby. It uses\n[ruby-ffi](https://github.com/ffi/ffi) to call functions in the libvips\nlibrary.\n\nlibvips is a [demand-driven, horizontally\nthreaded](https://github.com/libvips/libvips/wiki/Why-is-libvips-quick)\nimage processing library. Compared to similar\nlibraries, [libvips runs quickly and uses little\nmemory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).\nlibvips is licensed under the [LGPL\n2.1+](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).\n\n## Install on linux and macOS\n\nInstall the libvips binary with your package manager (eg. `apt install\nlibvips42` or perhaps `brew install vips`, see the [libvips install\ninstructions](https://libvips.github.io/libvips/install.html)) then install\nthis gem with:\n\n```\ngem install ruby-vips\n```\n\nOr include `gem \"ruby-vips\"` in your gemfile.\n\n## Install on Windows\n\nThe gemspec will pull in the msys libvips for you, so all you need is:\n\n```\ngem install ruby-vips\n```\n\nOr include `gem \"ruby-vips\"` in your gemfile.\n\nTested with the ruby and msys from choco, but others may work.\n\n## Example\n\n```ruby\nrequire \"vips\"\n\nim = Vips::Image.new_from_file filename\n\n# put im at position (100, 100) in a 3000 x 3000 pixel image, \n# make the other pixels in the image by mirroring im up / down / \n# left / right, see\n# https://www.libvips.org/API/current/method.Image.embed.html\nim = im.embed 100, 100, 3000, 3000, extend: :mirror\n\n# multiply the green (middle) band by 2, leave the other two alone\nim *= [1, 2, 1]\n\n# make an image from an array constant, convolve with it\nmask = Vips::Image.new_from_array [\n    [-1, -1, -1],\n    [-1, 16, -1],\n    [-1, -1, -1]], 8\nim = im.conv mask, precision: :integer\n\n# finally, write the result back to a file on disk\nim.write_to_file output_filename\n```\n\n## Documentation\n\nThere are [full API docs for ruby-vips on\nrubydoc](https://www.rubydoc.info/gems/ruby-vips). This sometimes has issues\nupdating, so we have a [copy on the gh-pages for this site as\nwell](http://libvips.github.io/ruby-vips), which\nshould always work.\n\nSee the `Vips` section in the docs for a [tutorial introduction with\nexamples](https://www.rubydoc.info/gems/ruby-vips/Vips).\n\nThe [libvips reference manual](https://www.libvips.org/API/current/)\nhas a complete explanation of every method.\n\nThe [`example/`](https://github.com/libvips/ruby-vips/tree/master/example)\ndirectory has some simple example programs.\n\n## Benchmarks\n\nThe benchmark at [vips-benchmarks](https://github.com/jcupitt/vips-benchmarks)\nloads a large image, crops, shrinks, sharpens and saves again, and repeats\n10 times.\n\n```text\nreal time in seconds, fastest of five runs\nbenchmark       tiff    jpeg\nruby-vips.rb\t0.85\t0.78\t\nimage-magick\t2.03\t2.44\t\nrmagick.rb\t3.87\t3.89\t\n\npeak memory use in kb\nbenchmark\tpeak RES\nruby-vips.rb\t43864\nrmagick.rb\t788768\n```\n\nSee also [benchmarks at the official libvips\nwebsite](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53B2:3B1F3:186282:5ED995:6AB92CEE"},"text_sha256":"621b1ba4ffc60d060d41956f54dca9d0645b133a07ee4a574e8d0f6f81aba1b9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"CCExtractor/ccextractor","input_row":{"repository":"CCExtractor/ccextractor","url":"https://github.com/CCExtractor/ccextractor","name":"ccextractor","owner":"CCExtractor","description":"CCExtractor - Official version maintained by the core team","language":"C","license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0","license_osi_approved":"true","stars":901,"issues":690,"created_at":"2014-04-10T16:58:43Z","updated_at":"2026-09-27T03:34:16Z","first_commit_at":"2014-04-12T10:41:27Z","last_commit_at":"2026-09-23T02:44:24Z","activity_months":149.36000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:27.252Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"CCExtractor/ccextractor","visibility":"public","created_at":"2014-04-10T16:58:43Z","updated_at":"2026-09-27T03:34:16Z","private":false,"fork":false,"archived":false,"stargazers_count":901,"open_issues_count":43,"license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0"},"error":"","rate":{"github_remaining":"1658","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0877:6E4BB:1812C13:1C39DC3:6AB92CF7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1657","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081F:14A1F2:182452E:1C4BF9A:6AB92CF7"},"commit":{"sha":"1fac910c3ee3ecd1f2f6794aff7ff9282dd05915","url":"https://github.com/CCExtractor/ccextractor/commit/1fac910c3ee3ecd1f2f6794aff7ff9282dd05915","date":"2018-05-20T16:50:52Z","author_date":"2018-05-20T16:50:52Z","committer_date":"2018-05-20T16:50:52Z","tree_sha":"591a493d9cf80c3609a483af0f2b52851fc6ccc8","message_first_line":"Merge pull request #980 from thealphadollar/correct_help"},"tree_request_status":200,"tree_rate":{"github_remaining":"1656","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CB:156040:17E6281:1C0D17C:6AB92CF8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4207,"blob_sha":"363154d7cb3b9f00f4c2695115843facabbcb031","priority":0}],"documents":[{"path":"README.md","size":4207,"blob_sha":"363154d7cb3b9f00f4c2695115843facabbcb031","priority":0,"status":200,"text":"![logo](https://avatars3.githubusercontent.com/u/7253637?v=3&s=100)\n\n# CCExtractor\n\n[![Build Status](https://travis-ci.org/CCExtractor/ccextractor.svg?branch=master)](https://travis-ci.org/CCExtractor/ccextractor)\n[![Sample-Platform Build Status Windows](https://sampleplatform.ccextractor.org/static/img/status/build-windows.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/windows)\n[![Sample-Platform Build Status Linux](https://sampleplatform.ccextractor.org/static/img/status/build-linux.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/linux)\n[![SourceForge](https://img.shields.io/badge/SourceForge%20downloads-213k%2Ftotal-brightgreen.svg)](https://sourceforge.net/projects/ccextractor/)\n\nCCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.\n\nSubtitles are important for many people. If you're learning a new language, subtitles are a great way to learn it from movies or TV shows. If you are hard of hearing, subtitles can help you better understand what's happening on the screen. We aim to make it easy to generate subtitles by using the command line tool or Windows GUI.\n\nThe official repository is ([CCExtractor/ccextractor](https://github.com/CCExtractor/ccextractor)) and master being the most stable branch.\n\n### **Features**\n\n- Extract subtitles in real-time\n- Translate subtitles\n- Extract closed captions from DVDs\n- Convert closed captions to subtitles\n\n### Programming Languages & Technologies\n\nThe core functionality is written in C. Other languages used include C++ and Python.\n\n## Google Summer of Code 2018\n\nCCExtractor is [participating in Google Summer of Code (GSoC) 2018!](https://ccextractor.org/public:gsoc:ideas_page_for_summer_of_code_2018)\n\nGoogle Summer of Code is an amazing program sponsored by Google in which university students get to spend their summer working with open source organizations and get paid for their work.\n\nYou can read all about it on [GSoC's website](https://summerofcode.withgoogle.com/)\n\n## Installation and Usage\n\nDownloads for precompiled binaries and source code can be found [on our website](https://www.ccextractor.org?id=public:general:downloads).\n\nExtracting subtitles is relatively simple. Just run the following command:\n\n`ccextractor <input>`\n\nThis will extract the subtitles.\n\nMore usage information can be found on our website:\n\n- [Using the command line tool](https://www.ccextractor.org/doku.php?id=public:general:command_line_usage)\n- [Using the Windows GUI](https://www.ccextractor.org/doku.php?id=public:general:win_gui_usage)\n\nYou can also find the list of parameters and their brief description by running `ccextractor` without any arguments.\n\n## Compiling CCExtractor\n\nTo learn more about how to compile and build CCExtractor for your platform check the [compilation guide](https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD).\n\n## Support\n\nBy far the best way to get support is by opening an issue at our [issue tracker](https://github.com/CCExtractor/ccextractor/issues).\n\nWhen you create a new issue, please fill in the needed details in the provided template. That makes it easier for us to help you more efficiently.\n\nIf you have a question or a problem you can also [contact us by email or chat with the team in Slack](https://www.ccextractor.org/doku.php?id=public:general:support).\n\nIf you want to contribute to CCExtractor but can't submit some code patches or issues or video samples, you can also [donate to us](https://www.ccextractor.org/public:general:http:sourceforge.net_donate_index.php?group_id=190832)\n\n## Contributing\n\nYou can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository. We have some rules, outlined in the [contributor's guide](.github/CONTRIBUTING.md).\n\n## News & Other Information\n\nNews about releases and modifications to the code can be found in the [CHANGES.TXT](docs/CHANGES.TXT) file.\n\nFor more information visit the CCExtractor website: [https://www.ccextractor.org](https://www.ccextractor.org)\n\n## License\n\nGNU General Public License version 2.0 (GPL-2.0)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6186:285814:174364:5DB97A:6AB92CF8"},"text_sha256":"056e922a8132b150c018d601d1d3af1f4108a8073d3f859386e764e12cf70d7b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1655","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17E6FF0:1C0EA11:6AB92CF9"},"commit":{"sha":"c0ec804823ebfc0f1052c1f3adaa8d164199b95b","url":"https://github.com/CCExtractor/ccextractor/commit/c0ec804823ebfc0f1052c1f3adaa8d164199b95b","date":"2026-06-13T05:00:31Z","author_date":"2026-06-13T05:00:31Z","committer_date":"2026-06-13T05:00:31Z","tree_sha":"3642ed3991ebe9de8d40b31edf75a1d3c22ec387","message_first_line":"ci: add manual SHA256 checksum workflow for release artifacts (#2277)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1654","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:180576D:1C2CAF4:6AB92CF9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5360,"blob_sha":"b365d8ea42d951ec3f32dc798ff7622e0bc622c6","priority":0}],"documents":[{"path":"README.md","size":5360,"blob_sha":"b365d8ea42d951ec3f32dc798ff7622e0bc622c6","priority":0,"status":200,"text":"<img src =\"https://github.com/CCExtractor/ccextractor-org-media/blob/master/static/ccx_logo_transparent_800x600.png\" width=\"200px\" alt=\"logo\" />\n\n# CCExtractor\n\n[![Sample-Platform Build Status Windows](https://sampleplatform.ccextractor.org/static/img/status/build-windows.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/windows)\n[![Sample-Platform Build Status Linux](https://sampleplatform.ccextractor.org/static/img/status/build-linux.svg?maxAge=1800)](https://sampleplatform.ccextractor.org/test/master/linux)\n[![SourceForge](https://img.shields.io/badge/SourceForge%20downloads-213k%2Ftotal-brightgreen.svg)](https://sourceforge.net/projects/ccextractor/)\n[![GitHub All Releases](https://img.shields.io/github/downloads/CCExtractor/CCExtractor/total.svg)](https://github.com/CCExtractor/ccextractor/releases/latest)\n\nCCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.\n\nSubtitles are important for many people. If you're learning a new language, subtitles are a great way to learn it from movies or TV shows. If you are hard of hearing, subtitles can help you better understand what's happening on the screen. We aim to make it easy to generate subtitles by using the command line tool or Windows GUI.\n\nThe official repository is ([CCExtractor/ccextractor](https://github.com/CCExtractor/ccextractor)) and master being the most stable branch.\n\n### **Features**\n\n- Extract subtitles in real-time\n- Translate subtitles\n- Extract closed captions from DVDs\n- Convert closed captions to subtitles\n\n### Programming Languages & Technologies\n\nThe core functionality is written in C. Other languages used include C++ and Python.\n\n## Installation and Usage\n\nDownloads for precompiled binaries and source code can be found [on our website](https://ccextractor.org/public/general/downloads/).\n\n### WebVTT Output Options\n\nCCExtractor supports optional WebVTT-specific headers for advanced use cases\nsuch as HTTP Live Streaming (HLS).\n\n#### `--timestamp-map`\n\nEnable writing the `X-TIMESTAMP-MAP` header in WebVTT output.\n\nThis header is required for HLS workflows but is **disabled by default**\nto preserve compatibility with standard WebVTT players.\n\nExample:\n```bash\nccextractor input.ts --timestamp-map -o output.vtt\n```\n\n### Windows Package Managers\n\n**WinGet:**\n```powershell\nwinget install CCExtractor.CCExtractor\n```\n\n**Chocolatey:**\n```powershell\nchoco install ccextractor\n```\n\n**Scoop:**\n```powershell\nscoop bucket add extras\nscoop install ccextractor\n```\n\nExtracting subtitles is relatively simple. Just run the following command:\n\n`ccextractor <input>`\n\nThis will extract the subtitles.\n\nMore usage information can be found on our website:\n\n- [Using the command line tool](https://ccextractor.org/public/general/command_line_usage/)\n- [Using the Flutter GUI](https://ccextractor.org/public/general/flutter_gui/)\n\nYou can also find the list of parameters and their brief description by running `ccextractor` without any arguments.\n\nYou can find sample files on [our website](https://ccextractor.org/public/general/tvsamples/) to test the software.\n\n### Building from Source\n\n- [Building on Windows using WSL](docs/build-wsl.md)\n\n#### Linux (Autotools) build notes\n\nCCExtractor also supports an autotools-based build system under the `linux/`\ndirectory.\n\nImportant notes:\n- The autotools workflow lives inside `linux/`. The `configure` script is\n  generated there and should be run from that directory.\n- Typical build steps are:\n```\ncd linux\n./autogen.sh\n./configure\nmake\n```\n- Rust support is enabled automatically if `cargo` and `rustc` are available\n  on the system. In that case, Rust components are built and linked during\n  `make`.\n- If you encounter unexpected build or linking issues, a clean rebuild\n  (`make clean` or a fresh clone) is recommended, especially when Rust is\n  involved.\n\nThis build flow has been tested on Linux and WSL.\n\n## Compiling CCExtractor\n\nTo learn more about how to compile and build CCExtractor for your platform check the [compilation guide](https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD).\n\n## Support\n\nBy far the best way to get support is by opening an issue at our [issue tracker](https://github.com/CCExtractor/ccextractor/issues).\n\nWhen you create a new issue, please fill in the needed details in the provided template. That makes it easier for us to help you more efficiently.\n\nIf you have a question or a problem you can also [contact us by email or chat with the team in Slack](https://ccextractor.org/public/general/support/).\n\nIf you want to contribute to CCExtractor but can't submit some code patches or issues or video samples, you can also [donate to us](https://sourceforge.net/donate/index.php?group_id=190832)\n\n## Contributing\n\nYou can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository. We have some rules, outlined in the [contributor's guide](.github/CONTRIBUTING.md).\n\n## News & Other Information\n\nNews about releases and modifications to the code can be found in the [CHANGES.TXT](docs/CHANGES.TXT) file.\n\nFor more information visit the CCExtractor website: [https://www.ccextractor.org](https://www.ccextractor.org)\n\n## License\n\nGNU General Public License version 2.0 (GPL-2.0)","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D066:40B0C:17ECB7:5E63CB:6AB92CFA"},"text_sha256":"33e4b1b0897afb261042d18d69328d81b79f2a0c07f940101147910eef30d195"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"letmaik/rawpy","input_row":{"repository":"letmaik/rawpy","url":"https://github.com/letmaik/rawpy","name":"rawpy","owner":"letmaik","description":"📷 RAW image processing for Python, a wrapper for libraw","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":825,"issues":199,"created_at":"2014-09-07T14:32:12Z","updated_at":"2026-09-23T04:46:12Z","first_commit_at":"2014-09-07T14:32:12Z","last_commit_at":"2026-08-30T04:28:14Z","activity_months":143.71000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:30.645Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"letmaik/rawpy","visibility":"public","created_at":"2014-09-07T14:32:12Z","updated_at":"2026-09-23T04:46:12Z","private":false,"fork":false,"archived":false,"stargazers_count":825,"open_issues_count":3,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1653","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17EBD7D:1C139DD:6AB92CFA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1652","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CC:754BF:17E355E:1C0AF56:6AB92CFB"},"commit":{"sha":"291afa870727f759a7bb68d756e4603806a466a4","url":"https://github.com/letmaik/rawpy/commit/291afa870727f759a7bb68d756e4603806a466a4","date":"2018-05-13T21:48:06Z","author_date":"2018-05-13T21:48:06Z","committer_date":"2018-05-13T21:48:06Z","tree_sha":"bec3ca179ba8fcf4df488dac0c335af524058167","message_first_line":"fix --no-binary usage in readme"},"tree_request_status":200,"tree_rate":{"github_remaining":"1651","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0917:76AED:1809DDB:1C319F8:6AB92CFB"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3359,"blob_sha":"1293e2f75c8a18a058c3bb512afc29f2c192033e","priority":0}],"documents":[{"path":"README.rst","size":3359,"blob_sha":"1293e2f75c8a18a058c3bb512afc29f2c192033e","priority":0,"status":200,"text":"rawpy\n=====\n\n.. image:: https://travis-ci.org/letmaik/rawpy.svg?branch=master\n    :target: https://travis-ci.org/letmaik/rawpy\n    :alt: Linux/macOS Build Status\n   \n.. image:: https://ci.appveyor.com/api/projects/status/f8ibd8mejxs9xq5w?svg=true\n    :target: https://ci.appveyor.com/project/letmaik/rawpy\n    :alt: Windows Build Status\n\nrawpy is an easy-to-use Python wrapper for the LibRaw_ library.\nIt also contains some extra functionality for finding and repairing hot/dead pixels.\n\n`API Documentation <https://letmaik.github.io/rawpy/api/>`_\n\n`Jupyter notebook tutorials <https://github.com/letmaik/rawpy-notebooks/blob/master/README.md>`_\n\nSample code\n-----------\n\nLoad a RAW file and save the postprocessed image using default parameters:\n\n.. code-block:: python\n\n\timport rawpy\n\timport imageio\n\t\n\tpath = 'image.nef'\n\twith rawpy.imread(path) as raw:\n\t    rgb = raw.postprocess()\n\timageio.imsave('default.tiff', rgb)\n\t\nSave as 16-bit linear image:\n\n.. code-block:: python\n\t\n\twith rawpy.imread(path) as raw:\n\t    rgb = raw.postprocess(gamma=(1,1), no_auto_bright=True, output_bps=16)\n\timageio.imsave('linear.tiff', rgb)\n\nFind bad pixels using multiple RAW files and repair them:\n\n.. code-block:: python\n\n\timport rawpy.enhance\n\t\n\tpaths = ['image1.nef', 'image2.nef', 'image3.nef']\n\tbad_pixels = rawpy.enhance.find_bad_pixels(paths)\n\t\n\tfor path in paths:\n\t    with rawpy.imread(path) as raw:\n\t        rawpy.enhance.repair_bad_pixels(raw, bad_pixels, method='median')\n\t        rgb = raw.postprocess()\n\t    imageio.imsave(path + '.tiff', rgb)\n\nInstallation\n------------\n\nBinary wheels for Linux, macOS, and Windows are provided for Python 2.7, 3.4, 3.5, and 3.6.\nThese can be installed with a simple ``pip install rawpy``.\nCurrently, Linux and macOS wheels are only available as 64 bit versions.\n\nInstallation from source on Linux/macOS\n---------------------------------------\n\nIf you have the need to use a specific libraw version or you can't use the provided binary wheels\nthen follow the steps in this section to build rawpy from source.\n\nFirst, install the LibRaw_ library on your system.\n\nOn Ubuntu, you can get (an outdated) version with:\n\n.. code-block:: sh\n\n    sudo apt-get install libraw-dev\n    \nOr install the latest release version from the source repository:\n\n.. code-block:: sh\n\n    git clone https://github.com/LibRaw/LibRaw.git libraw\n    git clone https://github.com/LibRaw/LibRaw-cmake.git libraw-cmake\n    cd libraw\n    git checkout 0.18.2\n    cp -R ../libraw-cmake/* .\n    cmake .\n    sudo make install\n    \nAfter that, install rawpy using ``pip install rawpy --no-binary rawpy``.\n    \nIf you get the error \"ImportError: libraw.so: cannot open shared object file: No such file or directory\"\nwhen trying to use rawpy, then do the following:\n\n.. code-block:: sh\n\n    echo \"/usr/local/lib\" | sudo tee /etc/ld.so.conf.d/99local.conf\n    sudo ldconfig\n\nThe LibRaw library is installed in /usr/local/lib (if installed manually) and apparently this folder is not searched\nfor libraries by default in some Linux distributions.\n\nNumPy Dependency\n----------------\n\nrawpy depends on NumPy. The minimum supported NumPy version depends on your Python version:\n\n========== =========\nPython     NumPy\n---------- ---------\n2.7        >= 1.7\n3.4        >= 1.8\n3.5        >= 1.9\n3.6        >= 1.11\n========== =========\n\n.. _LibRaw: http://www.libraw.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F364:3AC5A:17FD16:5E73D6:6AB92CFB"},"text_sha256":"d6d37e89b5ca56eee303c176a6c8de8d07765c1285b6cc19a5fbfcaddbed54d6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1650","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093B:280FBC:17D3764:1BF9E96:6AB92CFC"},"commit":{"sha":"326494be83cb721d641579c1c68e6a2a0ba04e14","url":"https://github.com/letmaik/rawpy/commit/326494be83cb721d641579c1c68e6a2a0ba04e14","date":"2026-05-03T21:10:20Z","author_date":"2026-05-03T21:10:20Z","committer_date":"2026-05-03T21:10:20Z","tree_sha":"30a3e643ac06a266f093354d15a0bee60dc65378","message_first_line":"Expose structs: `libraw_imgother_t` and `libraw_lensinfo_t` (#289)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1649","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E9:767EB:180927C:1C311C4:6AB92CFC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8009,"blob_sha":"f600ac7b4aed86fc32cc5ef4a0f1761858d75c20","priority":0}],"documents":[{"path":"README.md","size":8009,"blob_sha":"f600ac7b4aed86fc32cc5ef4a0f1761858d75c20","priority":0,"status":200,"text":"<p align=\"center\">\n<a href=\"https://en.wikipedia.org/wiki/Bayer_filter\"><img width=\"500\" src=\"https://raw.githubusercontent.com/letmaik/rawpy/main/logo/logo.png\"><\/a>\n<\/p>\n\nrawpy is an easy-to-use Python wrapper for the [LibRaw library][libraw].\nIt also contains some extra functionality for finding and repairing hot/dead pixels.\n\n[API Documentation](https://letmaik.github.io/rawpy/api/)\n\n[Jupyter notebook tutorials](https://github.com/letmaik/rawpy-notebooks/blob/master/README.md)\n\n## Sample code\n\nLoad a RAW file and save the postprocessed image using default [parameters](https://letmaik.github.io/rawpy/api/rawpy.Params.html):\n\n```python\nimport rawpy\nimport imageio.v3 as iio\n\npath = 'image.nef'\nwith rawpy.imread(path) as raw:\n    rgb = raw.postprocess()\niio.imwrite('default.tiff', rgb)\n```\n\nSave as 16-bit linear image:\n\n```python\nwith rawpy.imread(path) as raw:\n    rgb = raw.postprocess(gamma=(1,1), no_auto_bright=True, output_bps=16)\niio.imwrite('linear.tiff', rgb)\n```\n\nExtract embedded thumbnail/preview image and save as JPEG:\n\n```python\nwith rawpy.imread(path) as raw:\n    # raises rawpy.LibRawNoThumbnailError if thumbnail missing\n    # raises rawpy.LibRawUnsupportedThumbnailError if unsupported format\n    thumb = raw.extract_thumb()\nif thumb.format == rawpy.ThumbFormat.JPEG:\n    # thumb.data is already in JPEG format, save as-is\n    with open('thumb.jpeg', 'wb') as f:\n        f.write(thumb.data)\nelif thumb.format == rawpy.ThumbFormat.BITMAP:\n    # thumb.data is an RGB numpy array, convert with imageio\n    iio.imwrite('thumb.jpeg', thumb.data)\n```\n\nFind bad pixels using multiple RAW files and repair them:\n\n```python\nimport rawpy.enhance\n\npaths = ['image1.nef', 'image2.nef', 'image3.nef']\nbad_pixels = rawpy.enhance.find_bad_pixels(paths)\n\nfor path in paths:\n    with rawpy.imread(path) as raw:\n        rawpy.enhance.repair_bad_pixels(raw, bad_pixels, method='median')\n        rgb = raw.postprocess()\n    iio.imwrite(path + '.tiff', rgb)\n```\n\n## Installation\n\nInstall rawpy by running:\n```sh\npip install rawpy\n```\n\n64-bit binary wheels are provided for Linux, macOS, and Windows.\n\n### Stable vs. pre-release\n\nAll stable rawpy releases are always built against a stable LibRaw library release.\nYou can output the LibRaw version with `print(rawpy.libraw_version)`.\n\nrawpy pre-releases have version numbers like `0.15.0a1` and are built against\na recent LibRaw snapshot. To install a pre-release, run:\n```sh\npip install --pre rawpy\n```\n\n### Optional features\n\nThe underlying [LibRaw library][libraw] supports several optional features.\nThe following table shows which PyPI binary wheels support which features.\n\n| Feature            | Windows | macOS | Linux |\n| ------------------ | ------- | ----- | ----- |\n| LCMS color engine  | yes     | yes   | yes   |\n| RedCine codec      | yes     | yes   | yes   |\n| DNG deflate codec  | yes     | yes   | yes   |\n| DNG lossy codec    | yes     | yes   | yes   |\n| Demosaic Pack GPL2 | no      | no    | no    |\n| Demosaic Pack GPL3 | no      | no    | no    |\n| OpenMP             | yes     | no    | yes   |\n\nTip: You can dynamically query supported features by inspecting the `rawpy.flags` dictionary.\n\nNote on GPL demosaic packs: The GPL2 and GPL3 demosaic packs are not included as rawpy is licensed\nunder the MIT license which is incompatible with GPL.\n\n### Installation from source on Linux/macOS\n\nFor macOS, LibRaw is built as part of the rawpy build (see external/).\nFor Linux, you need to install the LibRaw library on your system.\n\nOn Ubuntu, you can get (an outdated) version with:\n\n```sh\nsudo apt-get install libraw-dev\n```\n\nOr install the latest release version from the source repository:\n\n```sh\ngit clone https://github.com/LibRaw/LibRaw.git libraw\ngit clone https://github.com/LibRaw/LibRaw-cmake.git libraw-cmake\ncd libraw\ngit checkout 0.20.0\ncp -R ../libraw-cmake/* .\ncmake .\nsudo make install\n```\n    \nAfter that, install rawpy using:\n\n```sh\ngit clone https://github.com/letmaik/rawpy\ncd rawpy\npip install numpy cython\npip install .\n```\n    \nOn Linux, if you get the error \"ImportError: libraw.so: cannot open shared object file: No such file or directory\"\nwhen trying to use rawpy, then do the following:\n\n```sh\necho \"/usr/local/lib\" | sudo tee /etc/ld.so.conf.d/99local.conf\nsudo ldconfig\n```\n\nThe LibRaw library is installed in /usr/local/lib (if installed manually) and apparently this folder is not searched\nfor libraries by default in some Linux distributions.\n\n### Installation from source on Windows\n\nThese instructions are experimental and support is not provided for them.\nTypically, there should be no need to build manually since wheels are hosted on PyPI.\n\nYou need to have Visual Studio and Python installed to build rawpy.\n\nIn a PowerShell window:\n```sh\n$env:PYTHON_VERSION = '3.12'\n$env:PYTHON_ARCH = 'x86_64'\ngit clone https://github.com/letmaik/rawpy\ncd rawpy\ngit submodule update --init\n.github/scripts/build-windows.ps1\n```\n\n## FAQ\n\n### I'm getting deadlocks when using multiprocessing on Linux\n\nIf you're experiencing deadlocks when using rawpy with Python's `multiprocessing` module on Linux, this is caused by an interaction between OpenMP (which is enabled in the Linux wheels) and the default `fork` start method used by multiprocessing.\n\n**The Problem:**\nWhen a process using OpenMP is forked, OpenMP's internal thread pool state becomes inconsistent in the child process, which can cause deadlocks on subsequent calls to rawpy functions.\n\n**The Solution:**\nUse the `spawn` or `forkserver` start method instead of `fork`:\n\n```python\nimport multiprocessing as mp\nimport rawpy\n\ndef process_raw(filename):\n    with rawpy.imread(filename) as raw:\n        rgb = raw.postprocess()\n    return rgb\n\nif __name__ == '__main__':\n    # Set the start method to 'spawn' before creating any processes\n    mp.set_start_method('spawn')\n    \n    with mp.Pool(processes=4) as pool:\n        results = pool.map(process_raw, ['image1.nef', 'image2.nef'])\n```\n\n**Note:** The start method can only be set once per program, and must be called within an `if __name__ == '__main__':` guard. The `spawn` method creates a fresh Python interpreter process, avoiding the OpenMP thread state issue entirely.\n\nFor more information, see:\n- [Python multiprocessing documentation on start methods](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods)\n- [OpenMP and fork() interaction issues](https://github.com/isl-org/Open3D/wiki/Deadlock-with-multiprocessing-(using-fork)-and-OpenMP)\n\n### I'm getting \"LibRawFileUnsupportedError: Unsupported file format or not RAW file\"\n\nThis error occurs when rawpy/LibRaw cannot recognize the file as a supported RAW image format. Common causes include:\n\n1. **The file is not actually a RAW file** - Make sure you're trying to open a RAW image file (e.g., .NEF, .CR2, .ARW, .DNG, etc.) and not a regular image format like JPEG or PNG.\n\n2. **The file is corrupted or incomplete** - If the file was not fully downloaded or is damaged, LibRaw cannot read it properly.\n\n3. **The file lacks proper headers** - Some proprietary or headerless RAW formats are not supported by LibRaw. RAW files need to contain proper metadata headers that identify the camera model, sensor configuration, and other essential information for LibRaw to decode them.\n\n4. **Unsupported camera or RAW format** - While LibRaw supports a [wide range of cameras](https://www.libraw.org/supported-cameras), some very new or obscure camera models may not be supported yet. Check the LibRaw website for the list of supported cameras.\n\n**What you can do:**\n- Verify the file is a genuine RAW file from a supported camera\n- Try opening the file with the camera manufacturer's software to confirm it's valid\n- Check if you're using the latest version of rawpy, as newer versions may support additional cameras\n- If you have a headerless or proprietary RAW format, you may need to convert it to a standard format like DNG using the camera manufacturer's tools first\n\n[libraw]: https://www.libraw.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9378:35999:17A4F8:5E1CE9:6AB92CFC"},"text_sha256":"2c5505c1a318fe65ff0a5db14e9680cf966c9fc211e6c3e47d6ed8fbf38b895e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"libvips/pyvips","input_row":{"repository":"libvips/pyvips","url":"https://github.com/libvips/pyvips","name":"pyvips","owner":"libvips","description":"python binding for libvips using cffi","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":812,"issues":486,"created_at":"2017-07-28T16:39:43Z","updated_at":"2026-09-16T22:23:27Z","first_commit_at":"2017-07-28T16:39:56Z","last_commit_at":"2026-08-30T09:21:10Z","activity_months":109.06,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:33.314Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"libvips/pyvips","visibility":"public","created_at":"2017-07-28T16:39:43Z","updated_at":"2026-09-16T22:23:27Z","private":false,"fork":false,"archived":false,"stargazers_count":812,"open_issues_count":2,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1648","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:17F0D2C:1C18B20:6AB92CFD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1647","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0860:76AED:1809FA7:1C31C07:6AB92CFD"},"commit":{"sha":"2ecaf2bc3db910cbe82ba34325678ef17bbe08bf","url":"https://github.com/libvips/pyvips/commit/2ecaf2bc3db910cbe82ba34325678ef17bbe08bf","date":"2018-05-18T10:21:18Z","author_date":"2018-05-18T10:21:18Z","committer_date":"2018-05-18T10:21:18Z","tree_sha":"a8ad4f46ce4ae1725e9c3c1a704214fd6975af87","message_first_line":"revise install on windows notes"},"tree_request_status":200,"tree_rate":{"github_remaining":"1646","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DA:1C46F8:17DA045:1C00F2C:6AB92CFE"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":5713,"blob_sha":"03660f0371880578ab0be2f7c1d60d0f442a5c83","priority":0}],"documents":[{"path":"README.rst","size":5713,"blob_sha":"03660f0371880578ab0be2f7c1d60d0f442a5c83","priority":0,"status":200,"text":"README\n======\n\n.. image:: https://travis-ci.org/jcupitt/pyvips.svg?branch=master\n    :alt: Build Status\n    :target: https://travis-ci.org/jcupitt/pyvips\n\nPyPI package:\n\nhttps://pypi.python.org/pypi/pyvips\n\nThis module wraps the libvips image processing library. \n\nhttps://jcupitt.github.io/libvips\n\nIf you have the development headers for libvips installed and have a working C\ncompiler, this module will use cffi API mode to try to build a libvips \nbinary extension for your Python. \n\nIf it is unable to build a binary extension, it will use cffi ABI mode\ninstead and only needs the libvips shared library. This takes longer to\nstart up and is typically ~20% slower in execution.  You can find out how\npyvips installed with ``pip show pyvips``.\n\nThis binding passes the vips test suite cleanly and with no leaks under\npython2.7 - python3.6, pypy and pypy3 on Windows, macOS and Linux. \n\nWe have formatted docs online here:\n\nhttps://jcupitt.github.io/pyvips/\n\nHow it works\n------------\n\nPrograms that use ``pyvips`` don't manipulate images directly, instead\nthey create pipelines of image processing operations building on a source\nimage. When the end of the pipe is connected to a destination, the whole\npipeline executes at once, streaming the image in parallel from source to\ndestination a section at a time.\n\nBecause ``pyvips`` is parallel, it's quick, and because it doesn't need to\nkeep entire images in memory, it's light.  For example, the libvips \nspeed and memory use benchmark: \n\nhttps://github.com/jcupitt/libvips/wiki/Speed-and-memory-use\n\nLoads a large tiff image, shrinks by 10%, sharpens, and saves again. On this\ntest ``pyvips`` is typically 3x faster than ImageMagick and needs 5x less\nmemory. \n\nThere's a handy blog post explaining how libvips opens files, which gives\nsome more background.\n\nhttp://libvips.blogspot.co.uk/2012/06/how-libvips-opens-file.html\n\nInstall\n-------\n\nYou need the libvips shared library on your library search path, version 8.2 or\nlater. On Linux and macOS, you can just install via your package manager; on \nWindows you can download a pre-compiled binary from the libvips website.\n\nhttps://jcupitt.github.io/libvips/install.html\n\nOn Windows, you will need to add `vips-dev-x.y\\bin` to your `PATH`.\n\nNext, install this package, perhaps::\n\n    $ pip install --user pyvips\n\nTo test your install, try this test program::\n\n    import logging\n    logging.basicConfig(level = logging.DEBUG)\n    import pyvips\n\nIf pyvips was able to build and use a binary module on your computer (API\nmode) you should see::\n\n    $ ./pyv.py \n    DEBUG:pyvips:Loaded binary module _libvips\n    DEBUG:pyvips:Inited libvips\n\nIf the build failed (fallback to ABI mode), or there was a header or version\nmismatch, you might see::\n\n    $ ./pyv.py \n    DEBUG:pyvips:Loaded binary module _libvips\n    DEBUG:pyvips:Binary module load failed: not all arguments converted during string formatting\n    DEBUG:pyvips:Falling back to ABI mode\n    DEBUG:pyvips:Loaded lib <cffi.api.FFILibrary_libvips.so.42 object at 0x7f29fa015190>\n    DEBUG:pyvips:Loaded lib <cffi.api.FFILibrary_libgobject-2.0.so.0 object at 0x7f29fa015110>\n    DEBUG:pyvips:Inited libvips\n\npyvips will work fine in this fallback mode, it's just a bit slower. \n\nIf API mode stops working, you can fix it by reinstalling pyvips. You should\nmake sure pip is not reusing a cached wheel, e.g. by using ``pip install\n--no-cache-dir pyvips``.\n\nExample\n-------\n\nThis sample program loads a JPG image, doubles the value of every green pixel,\nsharpens, and then writes the image back to the filesystem again::\n\n    import pyvips\n\n    image = pyvips.Image.new_from_file('some-image.jpg', access='sequential')\n    image *= [1, 2, 1]\n    mask = pyvips.Image.new_from_array([[-1, -1, -1],\n                                        [-1, 16, -1],\n                                        [-1, -1, -1]\n                                       ], scale=8)\n    image = image.conv(mask, precision='integer')\n    image.write_to_file('x.jpg')\n\nConverting old code\n-------------------\n\nTo convert old code, replace the lines::\n\n    import gi\n    gi.require_version('Vips', '8.0')\n    from gi.repository import Vips \n\nwith::\n\n    import pyvips\n    Vips = pyvips\n\nInstead of the ``pyvips = Vips``, you can of course also swap all ``Vips`` for\n``pyvips`` with eg.::\n\n    %s/Vips/pyvips/g\n\nBackground\n----------\n\nThe Python binding included in libvips works, but porting and installation\nare more difficult than they should be. \n\nThis new binding is:\n\n* compatible with the current Python binding (it runs the same test suite,\n  unmodified)\n\n* easier to install, since the stack is much smaller, and there are \n  no issues with the overrides directory\n\n* faster, since we implement Buffer and save some copies\n\n* faster, since it is \"thinner\". The ffi Ruby binding is about twice\n  as fast as the gobject-introspection one, when running the test suite\n\n* portable across CPython, PyPy and others\n\n* more simply portable to Windows \n\n* easy to package for pip\n\nNotes\n-----\n\nLocal user install::\n\n    $ pip install --user -e .\n    $ pip3 install --user -e .\n    $ pypy -m pip --user -e .\n\nRun all tests::\n\n    $ tox \n\nRun test suite::\n\n    $ tox test\n\nRun a specific test::\n\n    $ pytest tests/test_conversion.py\n\nStylecheck::\n\n    $ tox qa\n\nGenerate HTML docs in ``doc/build/html``::\n\n    $ cd doc; sphinx-build -bhtml . build/html\n\nRegenerate autodocs::\n\n    $ cd doc; \\\n      python -c \"import pyvips; pyvips.Operation.generate_sphinx_all()\" > x \n\nAnd copy-paste ``x`` into the obvious place in ``doc/vimage.rst``.\n\nUpdate version number::\n\n    $ vi pyvips/version.py\n    $ vi doc/conf.py\n\nUpdate pypi package::\n\n    $ python setup.py sdist\n    $ twine upload dist/*\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:180EB9:5E84BA:6AB92CFE"},"text_sha256":"f05ed109f1548ca0c5123cd0b1acd1f62a583e20a4670a40a6e546302e84e9e8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1645","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093C:180242:1808AB8:1C302BE:6AB92CFE"},"commit":{"sha":"23ed555f89fae1c1a9be72e99b8b47e9fd86a105","url":"https://github.com/libvips/pyvips/commit/23ed555f89fae1c1a9be72e99b8b47e9fd86a105","date":"2026-06-22T14:27:27Z","author_date":"2026-06-22T14:27:27Z","committer_date":"2026-06-22T14:27:27Z","tree_sha":"1a236b8d6fea62386db1b07031086a6974780930","message_first_line":"Improve auto-generated documentation and type stubs (#1413)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1644","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F9:731F6:1807BE9:1C2F7DC:6AB92CFF"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":7221,"blob_sha":"c89c9fc47a28a12367bd199850bdcade43211019","priority":0}],"documents":[{"path":"README.rst","size":7221,"blob_sha":"c89c9fc47a28a12367bd199850bdcade43211019","priority":0,"status":200,"text":"README\n======\n\n.. image:: https://github.com/libvips/pyvips/workflows/CI/badge.svg\n    :alt: Build Status\n    :target: https://github.com/libvips/pyvips/actions\n\nPyPI package:\n\nhttps://pypi.python.org/pypi/pyvips\n\nconda package:\n\nhttps://anaconda.org/conda-forge/pyvips\n\nWe have formatted docs online here:\n\nhttps://libvips.github.io/pyvips/\n\nThis module wraps the libvips image processing library:\n\nhttps://www.libvips.org/\n\nThe libvips docs are also very useful:\n\nhttps://www.libvips.org/API/current/\n\nIf you have the development headers for libvips installed and have a working C\ncompiler, this module will use cffi API mode to try to build a libvips\nbinary extension for your Python.\n\nIf it is unable to build a binary extension, it will use cffi ABI mode\ninstead and only needs the libvips shared library. This takes longer to\nstart up and is typically ~20% slower in execution. You can find out if\nAPI mode is being used with:\n\n.. code-block:: python\n\n    import pyvips\n\n    print(pyvips.API_mode)\n\nThis binding passes the vips test suite cleanly and with no leaks under\npython3 and pypy3 on Windows, macOS and Linux.\n\nHow it works\n------------\n\nPrograms that use ``pyvips`` don't manipulate images directly, instead\nthey create pipelines of image processing operations building on a source\nimage. When the end of the pipe is connected to a destination, the whole\npipeline executes at once, streaming the image in parallel from source to\ndestination a section at a time.\n\nBecause ``pyvips`` is parallel, it's quick, and because it doesn't need to\nkeep entire images in memory, it's light.  For example, the libvips\nspeed and memory use benchmark:\n\nhttps://github.com/libvips/libvips/wiki/Speed-and-memory-use\n\nLoads a large tiff image, shrinks by 10%, sharpens, and saves again. On this\ntest ``pyvips`` is typically 3x faster than ImageMagick and needs 5x less\nmemory.\n\nThere's a handy chapter in the docs explaining how libvips opens files,\nwhich gives some more background.\n\nhttps://www.libvips.org/API/current/How-it-opens-files.html\n\nBinary installation\n-------------------\n\nThe quickest way to start with pyvips is by installing the binary package\nwith:\n\n.. code-block:: shell\n\n    $ pip install \"pyvips[binary]\"\n\nThis installs a self-contained package with the most commonly needed\nlibraries. It should just work on most platforms, including Linux,\nWindows and macOS, with 64 and 32 bit x64 and ARM CPUs. Note that this libvips\nis missing features like PDF load and OpenSlide support.\n\nIf your platform is unsupported or the pre-built binary is unsuitable, you\ncan install libvips separately instead.\n\nLocal installation\n------------------\n\nYou need the libvips shared library on your library search path, version 8.2\nor later, though at least version 8.9 is required for all features to work.\nSee:\n\nhttps://www.libvips.org/install.html\n\nLinux\n^^^^^\n\nPerhaps:\n\n.. code-block:: shell\n\n    $ sudo apt install libvips-dev --no-install-recommends\n    $ pip install pyvips\n\nWith python 3.11 and later, you will need to create a venv first and add\n`path/to/venv` to your `PATH`. Something like:\n\n.. code-block:: shell\n\n    $ python3 -m venv ~/.local\n    $ pip install pyvips\n\nmacOS\n^^^^^\n\nWith Homebrew:\n\n.. code-block:: shell\n\n    $ brew install vips python pkg-config\n    $ pip install pyvips\n\nWindows\n^^^^^^^\n\nOn Windows, you can download a pre-compiled binary from the libvips website.\n\nhttps://www.libvips.org/install.html\n\nYou'll need a 64-bit Python. The official one works well.\n\nYou can add ``vips-dev-x.y\\bin`` to your ``PATH``, but this will add a lot of\nextra DLLs to your search path and they might conflict with other programs,\nso it's usually safer to set ``PATH`` in your program.\n\nTo set ``PATH`` from within Python, you need something like this at the\nstart of your program:\n\n.. code-block:: python\n\n    import os\n    vipsbin = r'c:\\vips-dev-8.16\\bin'\n    os.environ['PATH'] = vipsbin + ';' + os.environ['PATH']\n\nFor Python 3.8 and later, you need:\n\n.. code-block:: python\n\n    import os\n    vipsbin = r'c:\\vips-dev-8.16\\bin'\n    add_dll_dir = getattr(os, 'add_dll_directory', None)\n    if callable(add_dll_dir):\n        add_dll_dir(vipsbin)\n    else:\n        os.environ['PATH'] = os.pathsep.join((vipsbin, os.environ['PATH']))\n\nNow when you import pyvips, it should be able to find the DLLs.\n\nConda\n^^^^^\n\nThe Conda package includes a matching libvips binary, so just enter:\n\n.. code-block:: shell\n\n    $ conda install --channel conda-forge pyvips\n\nExample\n-------\n\nThis sample program loads a JPG image, doubles the value of every green pixel,\nsharpens, and then writes the image back to the filesystem again:\n\n.. code-block:: python\n\n    import pyvips\n\n    image = pyvips.Image.new_from_file('some-image.jpg', access='sequential')\n    image *= [1, 2, 1]\n    mask = pyvips.Image.new_from_array([\n        [-1, -1, -1],\n        [-1, 16, -1],\n        [-1, -1, -1],\n    ], scale=8)\n    image = image.conv(mask, precision='integer')\n    image.write_to_file('x.jpg')\n\n\nNotes\n-----\n\nLocal user install:\n\n.. code-block:: shell\n\n    $ pip install -e .[binary]\n\nRun all tests:\n\n.. code-block:: shell\n\n    $ tox\n\nRun test suite:\n\n.. code-block:: shell\n\n    $ pytest\n\nRun a specific test:\n\n.. code-block:: shell\n\n    $ pytest tests/test_saveload.py\n\nRun perf tests:\n\n.. code-block:: shell\n\n   $ cd tests/perf\n   $ ./run.sh\n\nStylecheck:\n\n.. code-block:: shell\n\n    $ flake8\n\nStylecheck:\n\n.. code-block:: shell\n\n    $ flake8\n\nType checking:\n\npyvips includes type hints via PEP 561 type stub files (``pyvips/__init__.pyi``).\nTo enable type checking in your project, install a type checker like mypy:\n\n.. code-block:: shell\n\n    $ pip install mypy pyvips\n\nThen run mypy on your code:\n\n.. code-block:: shell\n\n    $ mypy your_script.py\n\nNote: ``pyvips`` methods accept arbitrary keyword arguments for libvips options,\nwhich may not be fully covered by type hints.\n\nGenerate HTML docs in ``doc/build/html``:\n\n.. code-block:: shell\n\n    $ cd doc; sphinx-build -bhtml . build/html\n\nRegenerate enums:\n\nMake sure you have installed a libvips with all optional packages enabled,\nthen\n\n.. code-block:: shell\n\n    $ cd examples; \\\n      ./gen-enums.py ~/GIT/libvips/build/libvips/Vips-8.0.gir > enums.py\n\nThen check and move `enums.py` into `pyvips/`.\n\nRegenerate type stubs:\n\nAfter adding new libvips operations or updating libvips itself, regenerate type stubs:\n\n.. code-block:: shell\n\n    $ python examples/generate_type_stubs.py\n\nThis updates ``pyvips/__init__.pyi`` with the latest operations.\n\nRegenerate autodocs:\n\nMake sure you have installed a libvips with all optional packages enabled,\nthen\n\n.. code-block:: shell\n\n    $ cd doc; \\\n      python3 -c \"import pyvips; pyvips.Operation.generate_sphinx_all()\" > x\n\nAnd copy-paste ``x`` into the obvious place in ``doc/vimage.rst``.\n\nUpdate version number:\n\n.. code-block:: shell\n\n    $ vi pyvips/version.py\n    $ vi doc/conf.py\n\nUpdate pypi package:\n\n.. code-block:: shell\n\n    $ python3 -m build --sdist\n\nIgnore the deprecation warnings about the license, we need to update the \nbuild backend before we can fix this.\n\n.. code-block:: shell\n\n    $ twine upload --repository pyvips dist/*\n    $ git tag -a v3.0.0 -m \"as uploaded to pypi\"\n    $ git push origin v3.0.0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"405A:3B7E2:1721CD:5D9A40:6AB92CFF"},"text_sha256":"065981ab1d62b13dc52da4fd5d1af9cefb04cb2d116a7764f908a631e4d4c48a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"nipreps/fmriprep","input_row":{"repository":"nipreps/fmriprep","url":"https://github.com/nipreps/fmriprep","name":"fmriprep","owner":"nipreps","description":"fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.","language":"HTML","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":756,"issues":1961,"created_at":"2016-03-05T00:56:46Z","updated_at":"2026-09-24T11:00:30Z","first_commit_at":"2016-03-05T00:56:46Z","last_commit_at":"2026-09-16T18:32:04Z","activity_months":126.40000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:36.419Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"nipreps/fmriprep","visibility":"public","created_at":"2016-03-05T00:56:46Z","updated_at":"2026-09-24T11:00:30Z","private":false,"fork":false,"archived":false,"stargazers_count":756,"open_issues_count":346,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1643","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17EB4F2:1C127FB:6AB92D00"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1642","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:182A8DA:1C5227B:6AB92D00"},"commit":{"sha":"5dd78197a828de566d754b327f0f7d663bfe42f0","url":"https://github.com/nipreps/fmriprep/commit/5dd78197a828de566d754b327f0f7d663bfe42f0","date":"2018-05-18T23:03:45Z","author_date":"2018-05-18T23:03:45Z","committer_date":"2018-05-18T23:03:45Z","tree_sha":"15a8ea571c747f29e5e0f7984d62e7fcbc0f203c","message_first_line":"Merge pull request #1141 from poldracklab/fix/bids_query"},"tree_request_status":200,"tree_rate":{"github_remaining":"1641","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:18230DF:1C4AD03:6AB92D01"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":4545,"blob_sha":"a68143320178c87a6a4862a0c990db153248c716","priority":0}],"documents":[{"path":"README.rst","size":4545,"blob_sha":"a68143320178c87a6a4862a0c990db153248c716","priority":0,"status":200,"text":".. include:: links.rst\n\nfmriprep: A Robust Preprocessing Pipeline for fMRI Data\n=======================================================\n\nThis pipeline is developed by the `Poldrack lab at Stanford University\n<https://poldracklab.stanford.edu/>`_ for use at the `Center for Reproducible\nNeuroscience (CRN) <http://reproducibility.stanford.edu/>`_, as well as for\nopen-source software distribution.\n\n.. image:: http://bids.neuroimaging.io/openneuro_badge.svg\n  :target: https://openneuro.org\n  :alt: Available in OpenNeuro!\n\n.. image:: https://circleci.com/gh/poldracklab/fmriprep/tree/master.svg?style=shield\n  :target: https://circleci.com/gh/poldracklab/fmriprep/tree/master\n\n.. image:: https://readthedocs.org/projects/fmriprep/badge/?version=latest\n  :target: http://fmriprep.readthedocs.io/en/latest/?badge=latest\n  :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/fmriprep.svg\n  :target: https://pypi.python.org/pypi/fmriprep/\n  :alt: Latest Version\n\n\nAbout\n-----\n\n.. image:: https://github.com/oesteban/fmriprep/raw/38a63e9504ab67812b63813c5fe9af882109408e/docs/_static/fmriprep-workflow-all.png\n\n\n``fmriprep`` is a functional magnetic resonance imaging (fMRI) data\npreprocessing pipeline that is designed to provide an easily accessible,\nstate-of-the-art interface that is robust to variations in scan acquisition\nprotocols and that requires minimal user input, while providing easily\ninterpretable and comprehensive error and output reporting.\nIt performs basic processing steps (coregistration, normalization, unwarping, \nnoise component extraction, segmentation, skullstripping etc.) providing\noutputs that can be easily submitted to a variety of group level analyses,\nincluding task-based or resting-state fMRI, graph theory measures, surface or\nvolume-based statistics, etc.\n\n.. note::\n\n   fmriprep performs minimal preprocessing.\n   Here we define 'minimal preprocessing'  as motion correction, field\n   unwarping, normalization, bias field correction, and brain extraction.\n   See the workflows_ for more details.\n\nThe ``fmriprep`` pipeline uses a combination of tools from well-known software\npackages, including FSL_, ANTs_, FreeSurfer_ and AFNI_.\nThis pipeline was designed to provide the best software implementation for each\nstate of preprocessing, and will be updated as newer and better neuroimaging\nsoftware become available.\n\nThis tool allows you to easily do the following:\n\n- Take fMRI data from raw to fully preprocessed form.\n- Implement tools from different software packages.\n- Achieve optimal data processing quality by using the best tools available.\n- Generate preprocessing quality reports, with which the user can easily\n  identify outliers.\n- Receive verbose output concerning the stage of preprocessing for each\n  subject, including meaningful errors.\n- Automate and parallelize processing steps, which provides a significant\n  speed-up from typical linear, manual processing.\n\nMore information and documentation can be found at\nhttps://fmriprep.readthedocs.io/\n\n\nPrinciples\n----------\n\n``fmriprep`` is built around three principles:\n\n1. **Robustness** - The pipeline adapts the preprocessing steps depending on\n   the input dataset and should provide results as good as possible\n   independently of scanner make, scanning parameters or presence of additional\n   correction scans (such as fieldmaps).\n2. **Ease of use** - Thanks to dependence on the BIDS standard, manual\n   parameter input is reduced to a minimum, allowing the pipeline to run in an\n   automatic fashion.\n3. **\"Glass box\"** philosophy - Automation should not mean that one should not\n   visually inspect the results or understand the methods.\n   Thus, ``fmriprep`` provides visual reports for each subject, detailing the\n   accuracy of the most important processing steps.\n   This, combined with the documentation, can help researchers to understand\n   the process and decide which subjects should be kept for the group level\n   analysis.\n\nAcknowledgements\n----------------\n\nPlease acknowledge this work by mentioning explicitly the name of this software\n(fmriprep) and the version, along with a link to the `GitHub repository\n<https://github.com/poldracklab/fmriprep>`_ or the Zenodo reference.\nFor more details, please see :ref:`citation`.\n\n.. include:: license.rst\n\n\n.. image:: https://badges.gitter.im/poldracklab/fmriprep.svg\n   :alt: Join the chat at https://gitter.im/poldracklab/fmriprep\n   :target: https://gitter.im/poldracklab/fmriprep?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB1C:1A3D83:187A19:5EF242:6AB92CFE"},"text_sha256":"e13ff8b274e9e38e7137e07ab8f4d44db3a7ec4e4463d1a1a41a50d845b7b9ec"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1640","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B5:62B94:17D51E6:1BFCA57:6AB92D02"},"commit":{"sha":"eb167b9ffb4bf2b90bf86457748e921887ef64a1","url":"https://github.com/nipreps/fmriprep/commit/eb167b9ffb4bf2b90bf86457748e921887ef64a1","date":"2026-06-17T23:16:55Z","author_date":"2026-06-17T23:16:55Z","committer_date":"2026-06-17T23:16:55Z","tree_sha":"1a623e7edb995b2f9490b3d78d0011ec2175c56d","message_first_line":"DOC: fix broken link to PyBIDS filter file example in FAQ (#3659)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1639","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0853:2D7D17:179861A:1BBE51F:6AB92D02"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":7863,"blob_sha":"c9ae0e9e4425f7329dc646c9722dd13d2f41ded6","priority":0}],"documents":[{"path":"README.rst","size":7863,"blob_sha":"c9ae0e9e4425f7329dc646c9722dd13d2f41ded6","priority":0,"status":200,"text":"*fMRIPrep*: A Robust Preprocessing Pipeline for fMRI Data\n=========================================================\n*fMRIPrep* is a *NiPreps (NeuroImaging PREProcessing toolS)* application\n(`www.nipreps.org <https://www.nipreps.org>`__) for the preprocessing of\ntask-based and resting-state functional MRI (fMRI).\n\n.. image:: https://img.shields.io/badge/RRID-SCR__016216-blue.svg\n  :target: https://doi.org/10.1038/s41592-018-0235-4\n  :alt: RRID:SCR_016216\n\n.. image:: https://img.shields.io/pypi/v/fmriprep.svg\n  :target: https://pypi.python.org/pypi/fmriprep/\n  :alt: Latest Version\n\n.. image:: https://circleci.com/gh/nipreps/fmriprep/tree/master.svg?style=shield\n  :target: https://circleci.com/gh/nipreps/fmriprep/tree/master\n\n.. image:: https://readthedocs.org/projects/fmriprep/badge/?version=latest\n  :target: https://fmriprep.org/en/latest/?badge=latest\n  :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/doi-10.1038%2Fs41592--018--0235--4-blue.svg\n  :target: https://doi.org/10.1038/s41592-018-0235-4\n  :alt: Published in Nature Methods\n\n.. image:: https://img.shields.io/badge/docker-nipreps/fmriprep-brightgreen.svg?logo=docker&style=flat\n  :target: https://hub.docker.com/r/nipreps/fmriprep/tags/\n  :alt: Docker image available!\n\n.. image:: https://codeocean.com/codeocean-assets/badge/open-in-code-ocean.svg\n  :target: https://doi.org/10.24433/CO.ed5ddfef-76a3-4996-b298-e3200f69141b\n  :alt: Available in CodeOcean!\n\n.. image:: https://chanzuckerberg.github.io/open-science/badges/CZI-EOSS.svg\n  :target: https://czi.co/EOSS\n  :alt: CZI's Essential Open Source Software for Science\n\nAbout\n-----\n.. image:: https://github.com/oesteban/fmriprep/raw/f4c7a9804be26c912b24ef4dccba54bdd72fa1fd/docs/_static/fmriprep-21.0.0.svg\n\n\n*fMRIPrep* is a functional magnetic resonance imaging (fMRI) data\npreprocessing pipeline that is designed to provide an easily accessible,\nstate-of-the-art interface that is robust to variations in scan acquisition\nprotocols and that requires minimal user input, while providing easily\ninterpretable and comprehensive error and output reporting.\nIt performs basic processing steps (coregistration, normalization, unwarping,\nnoise component extraction, segmentation, skull-stripping, etc.) providing\noutputs that can be easily submitted to a variety of group level analyses,\nincluding task-based or resting-state fMRI, graph theory measures, and surface\nor volume-based statistics.\n\n.. note::\n\n   *fMRIPrep* performs minimal preprocessing.\n   Here we define 'minimal preprocessing'  as motion correction, field\n   unwarping, normalization, bias field correction, and brain extraction.\n   See the `workflows section of our documentation\n   <https://fmriprep.readthedocs.io/en/latest/workflows.html>`__ for more details.\n\nThe *fMRIPrep* pipeline uses a combination of tools from well-known software\npackages, including FSL_, ANTs_, FreeSurfer_ and AFNI_.\nThis pipeline was designed to provide the best software implementation for each\nstate of preprocessing, and will be updated as newer and better neuroimaging\nsoftware become available.\n\nThis tool allows you to easily do the following:\n\n- Take fMRI data from raw to fully preprocessed form.\n- Implement tools from different software packages.\n- Achieve optimal data processing quality by using the best tools available.\n- Generate preprocessing quality reports, with which the user can easily\n  identify outliers.\n- Receive verbose output concerning the stage of preprocessing for each\n  subject, including meaningful errors.\n- Automate and parallelize processing steps, which provides a significant\n  speed-up from manual processing or shell-scripted pipelines.\n\nMore information and documentation can be found at\nhttps://fmriprep.readthedocs.io/\n\nPrinciples\n----------\n*fMRIPrep* is built around three principles:\n\n1. **Robustness** - The pipeline adapts the preprocessing steps depending on\n   the input dataset and should provide results as good as possible\n   independently of scanner make, scanning parameters or presence of additional\n   correction scans (such as fieldmaps).\n2. **Ease of use** - Thanks to dependence on the BIDS standard, manual\n   parameter input is reduced to a minimum, allowing the pipeline to run in an\n   automatic fashion.\n3. **\"Glass box\"** philosophy - Automation should not mean that one should not\n   visually inspect the results or understand the methods.\n   Thus, *fMRIPrep* provides visual reports for each subject, detailing the\n   accuracy of the most important processing steps.\n   This, combined with the documentation, can help researchers to understand\n   the process and decide which subjects should be kept for the group level\n   analysis.\n\nCitation\n--------\n**Citation boilerplate**.\nPlease acknowledge this work using the citation boilerplate that *fMRIPrep* includes\nin the visual report generated for every subject processed.\nFor a more detailed description of the citation boilerplate and its relevance,\nplease check out the\n`NiPreps documentation <https://www.nipreps.org/intro/transparency/#citation-boilerplates>`__.\n\n**Plagiarism disclaimer**.\nThe boilerplate text is public domain, distributed under the\n`CC0 license <https://creativecommons.org/publicdomain/zero/1.0/>`__,\nand we recommend *fMRIPrep* users to reproduce it verbatim in their works.\nTherefore, if reviewers and/or editors raise concerns because the text is flagged by automated\nplagiarism detection, please refer them to the *NiPreps* community and/or the note to this\neffect in the `boilerplate documentation page <https://www.nipreps.org/intro/transparency/#citation-boilerplates>`__.\n\n**Papers**.\n*fMRIPrep* contributors have published two relevant papers:\n`Esteban et al. (2019) <https://doi.org/10.1038/s41592-018-0235-4>`__\n[`preprint <https://doi.org/10.1101/306951>`__], and\n`Esteban et al. (2020) <https://doi.org/10.1038/s41596-020-0327-3>`__\n[`preprint <https://doi.org/10.1101/694364>`__].\n\n**Other**.\nOther materials that have been generated over time include the\n`OHBM 2018 software demonstration <https://effigies.github.io/fmriprep-demo/>`__\nand some conference posters:\n\n* Organization for Human Brain Mapping 2018\n  (`Abstract <https://ww5.aievolution.com/hbm1801/index.cfm?do=abs.viewAbs&abs=1321>`__;\n  `PDF <https://files.aievolution.com/hbm1801/abstracts/31779/2035_Markiewicz.pdf>`__)\n\n.. image:: _static/OHBM2018-poster_thumb.png\n   :target: _static/OHBM2018-poster.png\n\n* Organization for Human Brain Mapping 2017\n  (`Abstract <https://ww5.aievolution.com/hbm1701/index.cfm?do=abs.viewAbs&abs=4111>`__;\n  `PDF <https://f1000research.com/posters/6-1129>`__)\n\n.. image:: _static/OHBM2017-poster_thumb.png\n   :target: _static/OHBM2017-poster.png\n\nLicense information\n-------------------\n*fMRIPrep* adheres to the\n`general licensing guidelines <https://www.nipreps.org/community/licensing/>`__\nof the *NiPreps framework*.\n\nLicense\n~~~~~~~\nCopyright (c) the *NiPreps* Developers.\n\nAs of the 21.0.x pre-release and release series, *fMRIPrep* is\nlicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n`http://www.apache.org/licenses/LICENSE-2.0\n<http://www.apache.org/licenses/LICENSE-2.0>`__.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nAcknowledgements\n----------------\nThis work is steered and maintained by the `NiPreps Community <https://www.nipreps.org>`__.\nThis work was supported by the Laura and John Arnold Foundation,\nthe NIH (grant NBIB R01EB020740, PI: Ghosh),\nand NIMH (R24MH114705, R24MH117179, R01MH121867, PI: Poldrack)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3E6:326565:17BFB0:5E381B:6AB92D02"},"text_sha256":"39beae47d4ae98f9c4612fcd2692f1d99fced8c2cae801f2bf0b6a5c21b6bf7e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"saucecontrol/PhotoSauce","input_row":{"repository":"saucecontrol/PhotoSauce","url":"https://github.com/saucecontrol/PhotoSauce","name":"PhotoSauce","owner":"saucecontrol","description":"MagicScaler high-performance, high-quality image processing pipeline for .NET","language":"C#","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":735,"issues":135,"created_at":"2017-01-16T23:58:01Z","updated_at":"2026-09-25T22:46:55Z","first_commit_at":"2017-01-16T23:59:03Z","last_commit_at":"2026-09-25T22:46:29Z","activity_months":116.26000000000001,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:39.201Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"saucecontrol/PhotoSauce","visibility":"public","created_at":"2017-01-16T23:58:01Z","updated_at":"2026-09-25T22:46:55Z","private":false,"fork":false,"archived":false,"stargazers_count":735,"open_issues_count":27,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1638","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CC:76AED:180A362:1C3204D:6AB92D03"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1637","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0829:70FF5:17E9D0A:1C113F8:6AB92D03"},"commit":{"sha":"3ce774508314c7a0d4aae267d56a92994ab0c59d","url":"https://github.com/saucecontrol/PhotoSauce/commit/3ce774508314c7a0d4aae267d56a92994ab0c59d","date":"2018-03-02T21:28:35Z","author_date":"2018-03-02T21:28:35Z","committer_date":"2018-03-02T21:28:35Z","tree_sha":"e5be11c0d8d0c501bf0dff770d5c634edab41e25","message_first_line":"add missing pixel format mapping Grey8bpp -> Grey32bpp"},"tree_request_status":200,"tree_rate":{"github_remaining":"1636","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0905:280FBC:17D3D3F:1BFA544:6AB92D03"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":3534,"blob_sha":"4b40ab69e3cf6116e67163898cacf19d571a4cd4","priority":0}],"documents":[{"path":"readme.md","size":3534,"blob_sha":"4b40ab69e3cf6116e67163898cacf19d571a4cd4","priority":0,"status":200,"text":"MagicScaler\n===========\n\nHigh-performance image processing pipeline for .NET.  Implements best-of-breed algorithms, linear light processing, and sharpening for the best image resizing quality available.  Speed and efficiency are unmatched by anything else on the .NET platform.\n\nRequirements\n------------\n\nWindows 7* or later with .NET 4.6+ or .NET Core 1.0+\n\n*Windows 7 and Windows Sever 2008 R2 are supported only with the [Platform Update](https://support.microsoft.com/en-us/kb/2670838) installed.\n\nInstallation\n------------\n\nMagicScaler is available on [nuget](http://www.nuget.org/packages/PhotoSauce.MagicScaler/)\n\n```\nPM> Install-Package PhotoSauce.MagicScaler\n```\n\nUsage\n-----\n\nBasic usage looks something like this:\n\n```C#\nusing (var outStream = new FileStream(@\"c:\\smallimage.jpg\", FileMode.Create))\n{\n  MagicImageProcessor.ProcessImage(@\"c:\\bigimage.jpg\", outStream, new ProcessImageSettings { Width = 400 });\n}\n``` \n\nThe above example will resize `bigimage.jpg` to a width of 400 pixels and save the output to\t `smallimage.jpg`.  The height will be set automatically to preserve the correct aspect ratio.  Default settings are optimized for a balance of speed and image quality.\n\nThe MagicScaler pipleline is also customizable if you wish to use an alternate pixel source, capture the output pixels for additional processing, or add custom filtering.\n\nSee the [documentation page](doc/main.md) for more details.\n\n\nWebRSize\n========\n\nSecure, Scalable Image Resizing for ASP.NET and IIS.\n\nRequirements\n------------\n\nIIS 7+ with ASP.NET 4.6+.  The host App Pool must be run in Integrated Pipeline Mode.\n\nInstallation\n------------\n\nWebRSize is available on [nuget](http://www.nuget.org/packages/PhotoSauce.WebRSize/)\n\n```\nPM> Install-Package PhotoSauce.WebRSize\n```\n\nUsage\n-----\n\nWebRSize must be configured in your application's web.config file.  It will not activate without a valid configuration.\n\nSee the [documentation page](doc/web.md) for more details.\n\n\nRelease History\n---------------\n#### MagicScaler 0.8.4.0\n* Fixed an issue that caused sharpening to be a no-op when working with some pixel formats in sRGB blending mode.\n* Improved quality of scaling and sharpening with partially-transparent images.\n* Added [GitLink](https://github.com/GitTools/GitLink) to enable github source server support for debugging.\n\n#### WebRSize 0.3.2.0\n* Fixed incorrect file extension for 404 images in the disk cache\n* Added exception handler for \"Client Disconnected\" errors when transmitting images from the HttpHandler\n* Added devicePixelRatio (dpr) setting to enable automatic size and quality adjustments for retina clients\n* Added \"q\" shortcut for quality setting\n\nSee the [releases page](https://github.com/saucecontrol/PhotoSauce/releases) for previous updates.\n\nVersioning\n----------\n\nThis project is using [semantic versioning](http://semver.org/).  Releases without an alpha/beta/RC tag are considered release quality and are safe for production use. The major version number will remain at 0, however, until the APIs are complete and stabilized.\n\nContributing\n------------\n\nBecause this project is still under active design and development, I am not accepting unsolicited pull requests at this time.  If you find a bug or would like to see a new feature implemented, please open a new issue for further discussion.  This will hopefully save any wasted or duplicate efforts.  If we can agree on a direction, help would be most welcome.\n\nLicense\n-------\n\nApache 2.0, mostly.  See the [license](license) file for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4BC:1F1FB6:17E472:5E5BA5:6AB92D04"},"text_sha256":"68aa2bbe9d2883e7b29fc431c908ad146680883b12b23becabbb3c915242a966"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1635","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088D:3BE445:17A788B:1BCDDEB:6AB92D04"},"commit":{"sha":"13cb452a01a5f3b2c15cab203baaaa0ae412bb5b","url":"https://github.com/saucecontrol/PhotoSauce/commit/13cb452a01a5f3b2c15cab203baaaa0ae412bb5b","date":"2025-04-10T20:07:57Z","author_date":"2025-04-10T20:07:57Z","committer_date":"2025-04-10T20:07:57Z","tree_sha":"fa858170c08551adffc1788171dcf8746d72506b","message_first_line":"add experimental `IPixelProcessor` and `TransformFactory.CreatePixelProcessor` (#182)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1634","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:17FE2EA:1C25E84:6AB92D05"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":33682,"blob_sha":"0a64ded68576ba4787f5708072b3ec18f304a9ec","priority":0}],"documents":[{"path":"readme.md","size":33682,"blob_sha":"0a64ded68576ba4787f5708072b3ec18f304a9ec","priority":0,"status":200,"text":"[![NuGet](https://img.shields.io/nuget/dt/PhotoSauce.MagicScaler?logo=nuget&label=NuGet)](https://www.nuget.org/packages/PhotoSauce.MagicScaler/) [![Build Status](https://dev.azure.com/saucecontrol/PhotoSauce/_apis/build/status/saucecontrol.PhotoSauce?branchName=master)](https://dev.azure.com/saucecontrol/PhotoSauce/_build/latest?definitionId=1&branchName=master) [![CI NuGet](https://img.shields.io/badge/NuGet-CI%20builds-4da2db?logo=azure-devops)](https://dev.azure.com/saucecontrol/PhotoSauce/_packaging?_a=feed&feed=photosauce_ci)\n\nPhotoSauce.MagicScaler\n======================\n\nMagicScaler is a high-performance image processing pipeline for .NET, focused on making complex imaging tasks simple.\n\nIt implements best-of-breed algorithms, linear light processing, and sharpening for the best image resizing quality available.\n\nSpeed and efficiency are unmatched by anything else on the .NET platform.\n\nRequirements\n------------\n\nMagicScaler runs on Windows and Linux.\n\nLinux hosting requires one or more of the cross-platform codec plugins available on [nuget.org](https://www.nuget.org/packages?q=photosauce.nativecodecs).  Most common image formats are supported.  Notable exceptions are support for BMP and TIFF images.\n\nUsage\n-----\n\n### Image Resizing\n\n```C#\nMagicImageProcessor.ProcessImage(@\"\\img\\big.jpg\", @\"\\img\\small.jpg\", new ProcessImageSettings { Width = 400 });\n```\n\nThe above example will resize `big.jpg` to a width of 400 pixels and save the output to\t`small.jpg`.  The height will be set automatically to preserve the correct aspect ratio.  Default settings are optimized for a balance of speed and image quality.\n\nThe MagicScaler pipleline is also customizable if you wish to use an alternate pixel source, capture the output pixels for additional processing, or add custom filtering.\n\nSee the [full documentation](https://docs.photosauce.net/api/PhotoSauce.MagicScaler.MagicImageProcessor.html) for more details.\n\n\nMagicScaler Performance\n-----------------------\n\nBenchmark results in this section come from the tests used in https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-image-processing/ -- updated to use current (Nov 2022) versions of the libraries and runtime.  The original benchmark project [is also on GitHub](https://github.com/bleroy/core-imaging-playground).\n\n*For these results, the benchmarks were modified to use a constant `UnrollFactor` so these runs more accurately report managed memory allocations and GC counts.  By default, BenchmarkDotNet targets a run time in the range of 500ms-1s for each iteration.  This means it executes slower benchmark methods using a smaller number of operations per iteration, and it can wildly under-report allocation and GCs, as those numbers are extrapolated from the limited iterations it runs.  The constant `UnrollFactor` ensures all benchmarks' reported memory stats are based on the same run counts. The `UnrollFactor` used for each run is listed at the top of each set of results.*\n\n### End-to-End Image Resizing\n\nThis is a semi-real-world image resizing benchmark, in which 12 JPEGs of approximately 1 megapixel each are resized to 150px wide thumbnails and saved back as JPEG.  Not all libraries are supported on all platforms.  See version notes below.\n\n#### Windows x64\n\n```ini\nBenchmarkDotNet=v0.13.2.1974-nightly, OS=Windows 10 (10.0.19043.2006/21H1/May2021Update)\nIntel Xeon W-11855M CPU 3.20GHz, 1 CPU, 12 logical and 6 physical cores\n.NET SDK=7.0.100-rc.2.22477.23\n  ShortRun : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2\n\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=32  WarmupCount=3\n\n|                               Method |      Mean |     Error |   StdDev | Ratio | RatioSD |      Gen0 |      Gen1 |      Gen2 |  Allocated | Alloc Ratio |\n|------------------------------------- |----------:|----------:|---------:|------:|--------:|----------:|----------:|----------:|-----------:|------------:|\n|   *MagicScaler Load, Resize, Save(1) |  46.85 ms |  2.948 ms | 0.456 ms |  0.13 |    0.00 |         - |         - |         - |   42.37 KB |        4.65 |\n| System.Drawing Load, Resize, Save(2) | 354.73 ms |  8.168 ms | 1.264 ms |  1.00 |    0.00 |         - |         - |         - |    9.11 KB |        1.00 |\n|      ImageFlow Load, Resize, Save(3) | 226.48 ms |  2.284 ms | 0.353 ms |  0.64 |    0.00 |  968.7500 |  968.7500 |  968.7500 | 4627.13 KB |      508.17 |\n|     ImageSharp Load, Resize, Save(4) | 115.90 ms | 12.847 ms | 3.724 ms |  0.33 |    0.04 |  156.2500 |   62.5000 |         - |  1532.8 KB |      168.34 |\n|    ImageMagick Load, Resize, Save(5) | 345.99 ms | 14.847 ms | 3.856 ms |  0.98 |    0.01 |         - |         - |         - |   50.44 KB |        5.54 |\n|      ImageFree Load, Resize, Save(6) | 212.10 ms |  2.055 ms | 0.318 ms |  0.60 |    0.00 | 6000.0000 | 6000.0000 | 6000.0000 |   91.95 KB |       10.10 |\n|      SkiaSharp Load, Resize, Save(7) | 117.43 ms |  1.270 ms | 0.330 ms |  0.33 |    0.00 |         - |         - |         - |   84.19 KB |        9.25 |\n|        NetVips Load, Resize, Save(8) | 100.92 ms |  4.383 ms | 0.678 ms |  0.28 |    0.00 |         - |         - |         - |   115.9 KB |       12.73 |\n```\n\n#### Windows Arm64 (Windows Dev Kit 2023)\n\n```ini\nBenchmarkDotNet=v0.13.2.1974-nightly, OS=Windows 11 (10.0.22621.674)\nSnapdragon Compute Platform, 1 CPU, 8 logical and 8 physical cores\n.NET SDK=6.0.402\n  ShortRun : .NET 6.0.10 (6.0.1022.47605), Arm64 RyuJIT AdvSIMD\n\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=32  WarmupCount=3\n\n|                               Method |      Mean |     Error |   StdDev | Ratio |     Gen0 |     Gen1 |  Allocated | Alloc Ratio |\n|------------------------------------- |----------:|----------:|---------:|------:|---------:|---------:|-----------:|------------:|\n|   *MagicScaler Load, Resize, Save(1) |  65.72 ms |  0.532 ms | 0.082 ms |  0.17 |        - |        - |   42.36 KB |        4.65 |\n| System.Drawing Load, Resize, Save(2) | 386.78 ms |  2.359 ms | 0.613 ms |  1.00 |        - |        - |    9.11 KB |        1.00 |\n|     ImageSharp Load, Resize, Save(4) | 287.06 ms |  3.125 ms | 0.812 ms |  0.74 | 375.0000 | 187.5000 | 1635.48 KB |      179.62 |\n|    ImageMagick Load, Resize, Save(5) | 588.63 ms | 13.049 ms | 2.019 ms |  1.52 |        - |        - |   50.44 KB |        5.54 |\n|      SkiaSharp Load, Resize, Save(7) | 158.27 ms |  1.816 ms | 0.472 ms |  0.41 |        - |        - |   82.32 KB |        9.04 |\n|        NetVips Load, Resize, Save(8) | 136.21 ms |  6.125 ms | 1.591 ms |  0.35 |        - |        - |   115.9 KB |       12.73 |\n```\n\n#### Linux x64 (WSL2)\n\n```ini\nBenchmarkDotNet=v0.13.2.1974-nightly, OS=ubuntu 20.04\nIntel Xeon W-11855M CPU 3.20GHz, 1 CPU, 12 logical and 6 physical cores\n.NET SDK=6.0.402\n  ShortRun : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2\n\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=32  WarmupCount=3\n\n|                               Method |     Mean |    Error |   StdDev | Ratio | RatioSD |     Gen0 |     Gen1 |     Gen2 |  Allocated | Alloc Ratio |\n|------------------------------------- |---------:|---------:|---------:|------:|--------:|---------:|---------:|---------:|-----------:|------------:|\n|    MagicScaler Load, Resize, Save(1) |  99.8 ms |  1.91 ms |  0.47 ms |  0.37 |    0.01 |        - |        - |        - |   42.38 KB |        4.51 |\n| System.Drawing Load, Resize, Save(2) | 271.7 ms | 12.34 ms |  3.20 ms |  1.00 |    0.00 |        - |        - |        - |     9.4 KB |        1.00 |\n|      ImageFlow Load, Resize, Save(3) | 321.2 ms |  6.80 ms |  1.77 ms |  1.18 |    0.01 | 968.7500 | 968.7500 | 968.7500 | 4627.46 KB |      492.06 |\n|     ImageSharp Load, Resize, Save(4) | 226.5 ms |  4.09 ms |  1.06 ms |  0.83 |    0.01 | 156.2500 |  62.5000 |        - | 1532.81 KB |      162.99 |\n|    ImageMagick Load, Resize, Save(5) | 522.6 ms | 27.02 ms |  7.02 ms |  1.92 |    0.04 |        - |        - |        - |   50.84 KB |        5.41 |\n|      SkiaSharp Load, Resize, Save(7) | 338.4 ms | 38.62 ms | 10.03 ms |  1.25 |    0.04 |        - |        - |        - |   84.48 KB |        8.98 |\n|        NetVips Load, Resize, Save(8) | 380.5 ms | 11.04 ms |  2.87 ms |  1.40 |    0.02 |        - |        - |        - |  116.48 KB |       12.39 |\n```\n\n#### Linux Arm64 (Raspberry Pi 4b 2GB)\n\n```ini\nBenchmarkDotNet=v0.13.2.1974-nightly, OS=ubuntu 22.04\nUnknown processor\n.NET SDK=6.0.402\n  ShortRun : .NET 6.0.10 (6.0.1022.47605), Arm64 RyuJIT AdvSIMD\n\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=8  WarmupCount=3\n\n|                               Method |       Mean |    Error |  StdDev | Ratio |      Gen0 |     Gen1 |  Allocated | Alloc Ratio |\n|------------------------------------- |-----------:|---------:|--------:|------:|----------:|---------:|-----------:|------------:|\n|   *MagicScaler Load, Resize, Save(1) |   214.7 ms |  4.33 ms | 0.67 ms |  0.18 |         - |        - |   43.67 KB |        4.42 |\n| System.Drawing Load, Resize, Save(2) | 1,205.9 ms | 26.54 ms | 6.89 ms |  1.00 |         - |        - |    9.87 KB |        1.00 |\n|     ImageSharp Load, Resize, Save(4) |   997.0 ms | 18.08 ms | 4.70 ms |  0.83 | 1625.0000 | 375.0000 | 1635.48 KB |      165.72 |\n|    ImageMagick Load, Resize, Save(5) | 1,688.5 ms | 12.84 ms | 3.34 ms |  1.40 |         - |        - |   51.47 KB |        5.21 |\n|      SkiaSharp Load, Resize, Save(7) |   279.7 ms |  1.87 ms | 0.48 ms |  0.23 |  125.0000 |        - |   81.29 KB |        8.24 |\n|        NetVips Load, Resize, Save(8) |   421.5 ms | 14.72 ms | 3.82 ms |  0.35 |  125.0000 |        - |  117.35 KB |       11.89 |\n```\n\n#### Versions Tested\n\n* (1) `PhotoSauce.MagicScaler` version 0.13.2 with `PhotoSauce.NativeCodecs.Libjpeg` version 2.1.4-preview1.\n* (2) `System.Drawing.Common` version 5.0.3.\n* (3) `Imageflow.AllPlatforms` Version 0.9.0.\n* (4) `SixLabors.ImageSharp` version 2.1.3.\n* (5) `Magick.NET-Q8-AnyCPU` version 12.2.0.\n* (6) `FreeImage.Standard` version 4.3.8.\n* (7) `SkiaSharp` version 2.88.3.\n* (8) `NetVips` version 2.2.0 with `NetVips.Native` (libvips) version 8.13.2.\n\nNote that unmanaged memory usage is not measured by BenchmarkDotNet's `MemoryDiagnoser`, nor is managed memory allocated but never released to GC (e.g. pooled objects/buffers).  See the [MagicScaler Efficiency](#magicscaler-efficiency) section for an analysis of total process memory usage for each library.\n\nThe performance numbers mostly speak for themselves, but some notes on image quality are warranted.  The benchmark suite saves the output so that the visual quality of the output of each library can be compared in addition to the performance.  See the [MagicScaler Quality](#magicscaler-quality) section below for details.\n\n<details>\n<summary>More Benchmarks<\/summary>\n\nBenchmark environment:\n\n``` ini\nBenchmarkDotNet=v0.13.2.1974-nightly, OS=Windows 10 (10.0.19043.2006/21H1/May2021Update)\nIntel Xeon W-11855M CPU 3.20GHz, 1 CPU, 12 logical and 6 physical cores\n.NET SDK=7.0.100-rc.2.22477.23\n  ShortRun : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2\n```\n\n### Parallel End-to-End Resizing\n\nThis benchmark is the same as the previous but uses `Parallel.ForEach` to run the 12 test images in parallel.  It is meant to highlight cases where the libraries' performance doesn't scale up linearly with extra processors.\n\n``` ini\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=64  WarmupCount=3\n\n|                                       Method |      Mean |     Error |    StdDev | Ratio | RatioSD |      Gen0 |      Gen1 |      Gen2 |  Allocated | Alloc Ratio |\n|--------------------------------------------- |----------:|----------:|----------:|------:|--------:|----------:|----------:|----------:|-----------:|------------:|\n|   *MagicScaler Load, Resize, Save - Parallel |  11.07 ms |  0.511 ms |  0.133 ms |  0.08 |    0.00 |         - |         - |         - |   71.35 KB |        1.95 |\n| System.Drawing Load, Resize, Save - Parallel | 144.01 ms | 26.195 ms |  4.054 ms |  1.00 |    0.00 |         - |         - |         - |   36.62 KB |        1.00 |\n|      ImageFlow Load, Resize, Save - Parallel |  51.70 ms |  5.179 ms |  0.801 ms |  0.36 |    0.01 |  984.3750 |  984.3750 |  984.3750 | 4628.02 KB |      126.39 |\n|     ImageSharp Load, Resize, Save - Parallel |  26.25 ms | 32.435 ms |  5.019 ms |  0.18 |    0.03 |  171.8750 |   78.1250 |         - | 1564.91 KB |       42.74 |\n|    ImageMagick Load, Resize, Save - Parallel | 149.86 ms | 27.115 ms |  7.042 ms |  1.03 |    0.05 |         - |         - |         - |   88.22 KB |        2.41 |\n|      ImageFree Load, Resize, Save - Parallel |  63.07 ms | 41.212 ms | 10.703 ms |  0.45 |    0.09 | 3156.2500 | 3156.2500 | 3156.2500 |  117.06 KB |        3.20 |\n|      SkiaSharp Load, Resize, Save - Parallel |  26.31 ms |  1.399 ms |  0.216 ms |  0.18 |    0.01 |   15.6250 |         - |         - |  110.13 KB |        3.01 |\n```\n\nThe NetVips test hung during this benchmark and had to be excluded.  Previous versions worked, so it is unclear whether the issue lies with BenchmarkDotNet or a change in NetVips.\n\n### Resize-Only Synthetic Benchmark\n\nThis benchmark creates a blank image of 1280x853 and resizes it to 150x99, throwing away the result.  MagicScaler does very well on this one, but it isn't a real-world scenario, so take the results with a grain of salt.\n\n``` ini\nJob=ShortRun  IterationCount=5  LaunchCount=1  UnrollFactor=256  WarmupCount=3\n\n|                Method |        Mean |       Error |    StdDev | Ratio | RatioSD |     Gen0 |     Gen1 |     Gen2 | Allocated | Alloc Ratio |\n|---------------------- |------------:|------------:|----------:|------:|--------:|---------:|---------:|---------:|----------:|------------:|\n|   *MagicScaler Resize |    621.8 us |    57.39 us |  14.90 us |  0.07 |    0.00 |        - |        - |        - |    1385 B |       10.04 |\n| System.Drawing Resize |  9,525.0 us |   619.59 us | 160.91 us |  1.00 |    0.00 |        - |        - |        - |     138 B |        1.00 |\n|      ImageFlow Resize |  6,464.7 us |   237.70 us |  61.73 us |  0.68 |    0.01 |  11.7188 |        - |        - |  116005 B |      840.62 |\n|     ImageSharp Resize |  2,299.1 us |    72.70 us |  18.88 us |  0.24 |    0.01 |        - |        - |        - |   10365 B |       75.11 |\n|    ImageMagick Resize | 39,426.5 us | 2,093.00 us | 543.54 us |  4.14 |    0.10 |        - |        - |        - |    5338 B |       38.68 |\n|      FreeImage Resize |  5,855.3 us |   324.42 us |  84.25 us |  0.61 |    0.01 | 500.0000 | 500.0000 | 500.0000 |     306 B |        2.22 |\n|      SkiaSharp Resize |  1,560.8 us |    49.18 us |   7.61 us |  0.16 |    0.00 |        - |        - |        - |     489 B |        3.54 |\n|        NetVips Resize |  9,412.2 us |   131.95 us |  34.27 us |  0.99 |    0.02 |        - |        - |        - |    3859 B |       27.96 |\n```\n\n<\/details>\n\nMagicScaler Efficiency\n----------------------\n\nRaw speed isn't the only important factor when evaluating performance.  As demonstrated in the parallel benchmark results above, some libraries consume extra resources in order to produce a result quickly, at the expense of overall scalability.  Particularly when integrating image processing into another application, like a CMS or an E-Commerce site, it is important that your imaging library not steal resources from the rest of the system.  That applies to both processor time and memory.\n\nBenchmarkDotNet does a good job of showing relative performance, and its managed memory diagnoser is quite useful for identifying excessive GC allocations, but its default configuration doesn't track actual processor usage or any memory that doesn't show up in GC collections.  For example, when it reports a time of 100ms on a benchmark, was that 100ms of a single processor at 100%?  More than one processor?  Less than 100%?  And what about memory allocated but never collected, like object caches and pooled arrays?  And what about unmanaged memory?  To capture these things, we must use different tools.\n\nBecause most of the libraries tested make calls to native libraries internally (ImageSharp is the only pure-managed library in the bunch), measuring only GC memory can be very misleading.  And even ImageSharp's memory usage isn't accurately reflected in the BDN `MemoryDiagnoser`'s numbers, because it holds allocated heap memory in the form of pooled objects and arrays (as does MagicScaler).\n\nIn order to accurately measure both CPU time and total memory usage, I devised a more real-world test.  The 1-megapixel images in the benchmark test suite make for reasonable benchmark run times, but 1-megapixel is hardly representative of what we see coming from even smartphones now.  In order to stress the libraries a bit more, I replaced the input images in the benchmark app's input folder with the [Bee Heads album](https://www.flickr.com/photos/usgsbiml/albums/72157633925491877) from the USGS Bee Inventory flickr.  This collection contains 351 images (350 JPEG, 1 GIF), ranging in size from 2-22 megapixels, with an average of 13.4 megapixels.  The total album is just over 2.5 GiB in size, and it can be downloaded directly from flickr.\n\nI re-used the image resizing code from the benchmark app but processed the test images only once, using `Parallel.ForEach` to load up the system.  Because of the test image set's size, startup and JIT overhead are overshadowed by the actual image processing, and although there may be some variation in times between runs, the overall picture is accurate and is more realistic than the BDN runs that cycle through the same small set of small images.  Each library's test was run in isolation so memory stats would include only that library.\n\nThis table shows the actual CPU time and peak memory usage as captured by the [Windows Performance Toolkit](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/) when running the modified benchmark app on .NET 6.0 x64.\n\n|                   Method | Peak Memory | VirtualAlloc Total |  CPU Time | Clock Time |\n|------------------------- |------------:|-------------------:|----------:|-----------:|\n|   *MagicScaler Bee Heads |      420 MB |            2389 MB |  37153 ms |      3.99s |\n| System.Drawing Bee Heads |     1001 MB |           36449 MB | 156050 ms |     39.58s |\n|     ImageSharp Bee Heads |     1079 MB |            1101 MB |  96510 ms |     10.76s |\n|      ImageFlow Bee Heads |     1485 MB |           28843 MB | 209247 ms |     22.61s |\n|    ImageMagick Bee Heads |      878 MB |           17426 MB | 277780 ms |     29.86s |\n|      FreeImage Bee Heads |     1048 MB |           16398 MB | 198207 ms |     21.77s |\n|      SkiaSharp Bee Heads |     1273 MB |           26371 MB | 110919 ms |     12.13s |\n|        NetVips Bee Heads |      785 MB |            3029 MB |  43515 ms |      5.01s |\n\nIt's clear from the CPU time vs wall clock time that System.Drawing is spending a fair amount of its time idle.  Its total consumed CPU time is middle of the pack, but its wall clock time shows it to be the slowest by far.\n\nEarlier runs of this test showed extreme total memory use in NetVips and ImageSharp, but they've both brough their memory use way down.  MagicScaler still manages clear wins in peak memory and CPU time.\n\nMagicScaler Quality\n-------------------\n\nThe benchmark application detailed above saves the output from its end-to-end image resizing tests so they can be evaluated for file size and image quality.  The images were contributed by @bleroy, who created the original benchmark.  They were chosen because of their high-frequency detail which had been observed to be challenging for some image resampling algorithms.  The images have a couple of other interesting properties as well.\n\nFirst, 10 of the 12 images are saved in the Abobe RGB color space, with an embedded color profile.  Second, they have a significant amount of metadata related to the source camera and their processing history.  Third, one of the images is in the sRGB color space and contains an embedded profile for sRGB, which is relatively large.  These factors combine to highlight some of the shortcomings in the tested libraries.\n\nThere is one design flaw in the benchmark app that makes it more difficult to judge the output quality, however.  The tests were configured to save the thumbnails with a low JPEG quality value and to use 4:2:0 [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling).  While these values are acceptable or even ideal for large images, they will cause compression artifacts in areas of small details.  At thumbnail size, the *only* details are small details, so it is better to use a higher-quality JPEG setting for very small images.  MagicScaler performs this adjustment automatically under its default settings, but those are overridden in the benchmark suite to be consistent with the other libraries.\n\nNote that outside the ill-advised overrides to JPEG quality settings, the results discussed here are from MagicScaler's default settings.  Not only is MagicScaler faster and more more efficient than the other libraries, it is also easier to use.  You'll get better quality with its defaults than can be obtained with lots of extra code in other libraries.\n\n### Color Management\n\nHandling images in a color space other than sRGB can be a challenge, and it's not something most developers are familiar with.  Now that all iOS and most Android devices' camera apps default to the [Display P3](https://en.wikipedia.org/wiki/DCI-P3#Display_P3) color space and wide-gamut displays are common, this is a topic of increasing importance.\n\nMagicScaler will automatically normalize the color space of images it processes to maximize compatibility with image consumers while preserving the original gamut of the image.  Other software may not be color aware or may make it difficult to process in a color-correct manner.\n\n<details>\n<summary>Additional Info on Color Space Handling<\/summary>\n<br />\n\nThere are essentially 3 ways to approach an image with an embedded color profile:\n\n1) Convert the image to sRGB.  This has the advantage that any downstream software that reads the processed image does not need to be color managed to display it correctly.  This was historically a problem with many apps, including popular web browsers (you can [test yours here](https://chromachecker.com/webbrowser/en/manual)).  The disadvantage is that it takes extra processing to do this conversion.\n2) Preserve the color space by embedding the ICC profile in the output image.  This is basically the opposite of option 1).  It's cheaper to do but may result in other software mangling the colors later.  It also results in a larger file because the profile may be very large -- in the case of a thumbnail, it might double the file size or more.\n3) Ignore the color profile and treat the image as if it's encoded as sRGB.  This option is absolutely incorrect and would put your software in the category of color manglers mentioned above.\n\nThe libraries tested in the benchmark have different capabilities, so the options available depend on the library.\n\n* System.Drawing supports options 1) and 3) but does 3) by default.  The original version of the benchmark did it that way, until I submitted a PR later to correct it to do 1).  This resulted in correct colors but a drop in speed.\n* ImageSharp can do 2) or 3) and does 2) by default.  When it was originally integrated into the benchmark, however, it only did 3).\n* ImageMagick can do any of the options above but does 2) by default.  However, it also preserves all other metadata by default, and the test images have quite a lot of metadata.  This results in thumbnails that are extremely oversized and consist of roughly 90% metadata.  For this reason, the ImageMagick tests were written to strip all metadata, resulting in behavior 3).\n* FreeImage works the same way as ImageMagick by default, and its test was implemented the same way.  It could have done option 2), but it was implemented to do option 3).\n* Skia can be made to do option 1) with a lot of [extra code](https://skia.org/user/sample/color?cl=9919).  This was not done in the benchmark tests, resulting in behavior 3).  Update: as of SkiaSharp 2.80, behavior 1) is now default, but with a marked reduction in speed.\n* MagicScaler can do any of the above options but does option 2) by default.  I contributed the MagicScaler test in the benchmark myself, and it has been correct from the beginning, although it used behavior 1) by default initially.\n\nThe net result is that if you look at the sample image output in @bleroy's [blog post](https://devblogs.microsoft.com/dotnet/net-core-image-processing/), the MagicScaler output has different colors than all the others.  10 of the 12 images have washed-out colors in the output from the other libraries -- most apparent in the vibrant red, green, and blue hues, such as the snake or the Wild River ride on the back of what is now the [MoPOP building](https://www.mopop.org/building).  If you download the project today and run it, the outputs from System.Drawing (corrected by me), ImageSharp (fixed in the library), SkiaSharp (fixed in the library), and MagicScaler will all have correct colors, and the rest will be wrong.\n\nThese are common mistakes made by developers starting out with image processing, because it can be easy to miss the shift in colors and difficult to discover how to do the right thing.\n\n<\/details>\n\n<samp>\nSample Images:\n\n| System.Drawing | &nbsp;&nbsp;MagicScaler&nbsp; | &nbsp;&nbsp;ImageSharp&nbsp;&nbsp; | &nbsp;&nbsp;Magick.NET&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;NetVips&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;FreeImage&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;SkiaSharp&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;ImageFlow&nbsp;&nbsp; |\n|----------------|-------------|------------|------------|---------|-----------|-----------|-----------|\n|<img src=\"/doc/images/IMG_2525-SystemDrawing.jpg\" alt=\"System.Drawing\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-MagicScaler.jpg\" alt=\"MagicScaler\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-ImageSharp.jpg\" alt=\"ImageSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-MagickNET.jpg\" alt=\"MagickNET\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-NetVips.jpg\" alt=\"NetVips\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-FreeImage.jpg\" alt=\"FreeImage\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-SkiaSharpCanvas.jpg\" alt=\"SkiaSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2525-ImageFlow.jpg\" alt=\"ImageFlow\" style=\"max-width: 150px\" />|\n<\/samp>\n\nThe color difference between these should be obvious.  Compared to the [original image](https://github.com/bleroy/core-imaging-playground/blob/master/images/IMG_2525.jpg), it's easy to see which are correct (unless your browser is busted).\n\n### Gamma-Corrected Blending\n\nOf the libraries originally tested in the benchmark, only MagicScaler performs the resampling step in [linear light](http://www.imagemagick.org/Usage/resize/#resize_colorspace).  ImageSharp, ImageMagick, and Vips are capable of processing in linear light but would require extra code to do so and would perform significantly worse.  ImageFlow is a recent addition which also processes in linear light by default.\n\n<samp>\nSample Images:\n\n| System.Drawing | &nbsp;&nbsp;MagicScaler&nbsp; | &nbsp;&nbsp;ImageSharp&nbsp;&nbsp; | &nbsp;&nbsp;Magick.NET&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;NetVips&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;FreeImage&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;SkiaSharp&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;ImageFlow&nbsp;&nbsp; |\n|----------------|-------------|------------|------------|---------|-----------|-----------|-----------|\n|<img src=\"/doc/images/IMG_2301-SystemDrawing.jpg\" alt=\"System.Drawing\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-MagicScaler.jpg\" alt=\"MagicScaler\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-ImageSharp.jpg\" alt=\"ImageSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-MagickNET.jpg\" alt=\"MagickNET\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-NetVips.jpg\" alt=\"NetVips\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-FreeImage.jpg\" alt=\"FreeImage\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-SkiaSharpCanvas.jpg\" alt=\"SkiaSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2301-ImageFlow.jpg\" alt=\"ImageFlow\" style=\"max-width: 150px\" />|\n<\/samp>\n\nIn addition to keeping the correct colors, MagicScaler does markedly better at preserving image highlights because of the linear light blending.  Notice the highlights on the flowers are a better representation of those in the [original image](https://github.com/bleroy/core-imaging-playground/blob/master/images/IMG_2301.jpg)\n\n### High-Quality Resampling\n\nMost imaging libraries have at least some capability to do high-quality resampling, but not all do.  MagicScaler defaults to high-quality, but the other libraries in this test were configured for their best quality as well.\n\n<samp>\nSample Images:\n\n| System.Drawing | &nbsp;&nbsp;MagicScaler&nbsp; | &nbsp;&nbsp;ImageSharp&nbsp;&nbsp; | &nbsp;&nbsp;Magick.NET&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;NetVips&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;FreeImage&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;SkiaSharp&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;ImageFlow&nbsp;&nbsp; |\n|----------------|-------------|------------|------------|---------|-----------|-----------|-----------|\n|<img src=\"/doc/images/IMG_2445-SystemDrawing.jpg\" alt=\"System.Drawing\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-MagicScaler.jpg\" alt=\"MagicScaler\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-ImageSharp.jpg\" alt=\"ImageSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-MagickNET.jpg\" alt=\"MagickNET\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-NetVips.jpg\" alt=\"NetVips\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-FreeImage.jpg\" alt=\"FreeImage\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-SkiaSharpCanvas.jpg\" alt=\"SkiaSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/IMG_2445-ImageFlow.jpg\" alt=\"ImageFlow\" style=\"max-width: 150px\" />|\n<\/samp>\n\nFreeImage and SkiaSharp have particularly poor image quality in this test, with output substantially more blurry than the others.  ImageFlow benefits from its linear light processing but also produces blurrier output than others.\n\nNote that when the benchmark and blog post were originally published, Skia supported multiple ways to resize images, which is why there are two Skia benchmark tests.  Under the current version of Skia, those two versions have the same benchmark numbers and same output quality, because the Skia internals have been changed to unify its resizing code.  The lower-quality version is [all that's left](https://github.com/mono/SkiaSharp/issues/520).\n\nAnd here's that [original image](https://github.com/bleroy/core-imaging-playground/blob/master/images/IMG_2445.jpg) for reference.\n\n### Sharpening\n\nFinally, MagicScaler performs a post-resizing sharpening step to compensate for the natural blurring that occurs when an image is resized.  Some of the other libraries would be capable of doing the same, but again, that would require extra code and would negatively impact the performance numbers.\n\n<samp>\nSample Images:\n\n| System.Drawing | &nbsp;&nbsp;MagicScaler&nbsp; | &nbsp;&nbsp;ImageSharp&nbsp;&nbsp; | &nbsp;&nbsp;Magick.NET&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;NetVips&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;FreeImage&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;SkiaSharp&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;ImageFlow&nbsp;&nbsp; |\n|----------------|-------------|------------|------------|---------|-----------|-----------|-----------|\n|<img src=\"/doc/images/sample-SystemDrawing.jpg\" alt=\"System.Drawing\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-MagicScaler.jpg\" alt=\"MagicScaler\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-ImageSharp.jpg\" alt=\"ImageSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-MagickNET.jpg\" alt=\"MagickNET\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-NetVips.jpg\" alt=\"NetVips\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-FreeImage.jpg\" alt=\"FreeImage\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-SkiaSharpCanvas.jpg\" alt=\"SkiaSharp\" style=\"max-width: 150px\" />|<img src=\"/doc/images/sample-ImageFlow.jpg\" alt=\"ImageFlow\" style=\"max-width: 150px\" />|\n<\/samp>\n\nThe linear light blending combined with the sharpening work to preserve more details from this [original image](https://github.com/bleroy/core-imaging-playground/blob/master/images/sample.jpg) than the other libraries do.  Again, some details are mangled by the poor JPEG settings, so MagicScaler's default settings would do even better.\n\nAlso of note is that ImageSharp's and NetVips' thumbnails for this image are roughly twice the size of the others because they have embedded the 3KiB sRGB color profile from the original image unnecessarily.\n\nVersioning\n----------\n\nThis project is using [semantic versioning](http://semver.org/).  Releases without a Preview/RC tag are considered release quality and are safe for production use. The major version number will remain at 0, however, until the APIs are complete and stabilized.\n\nContributing\n------------\n\nContributions are welcome, but please open a new issue or discussion before submitting any pull requests that alter API or functionality.  This will hopefully save any wasted or duplicate effort.\n\nLicense\n-------\n\nPhotoSauce is licensed under the [MIT](license) license.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"67D0:4F9CC:1723B6:5D9917:6AB92D05"},"text_sha256":"59c3c173a4d0c0d021ab31463b2f3c9b4a11fca63768197eb985f084f32b5f11"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"spectralpython/spectral","input_row":{"repository":"spectralpython/spectral","url":"https://github.com/spectralpython/spectral","name":"spectral","owner":"spectralpython","description":"Python module for hyperspectral image processing","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":684,"issues":141,"created_at":"2014-02-06T03:36:54Z","updated_at":"2026-09-21T17:48:56Z","first_commit_at":"2001-11-13T02:10:56Z","last_commit_at":"2026-09-04T16:45:02Z","activity_months":297.69,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:42.181Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"spectralpython/spectral","visibility":"public","created_at":"2014-02-06T03:36:54Z","updated_at":"2026-09-21T17:48:56Z","private":false,"fork":false,"archived":false,"stargazers_count":684,"open_issues_count":21,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1633","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0846:72727:17C1752:1BE9118:6AB92D06"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1632","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0827:71E0C:1805C88:1C2C45D:6AB92D06"},"commit":{"sha":"dfbde8c8e99f4fcec03ccda545620bf99a012690","url":"https://github.com/spectralpython/spectral/commit/dfbde8c8e99f4fcec03ccda545620bf99a012690","date":"2018-04-15T16:14:50Z","author_date":"2018-04-15T16:14:50Z","committer_date":"2018-04-15T16:14:50Z","tree_sha":"07142161e7017d140a890cc95ddec076e5d4e6d0","message_first_line":"Changed python build versions."},"tree_request_status":200,"tree_rate":{"github_remaining":"1631","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A0:0AC4:12AAB67:16024C5:6AB92D06"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":2071,"blob_sha":"c170c87759c8db25af0e89cfa5ce618c77384d12","priority":0}],"documents":[{"path":"README.rst","size":2071,"blob_sha":"c170c87759c8db25af0e89cfa5ce618c77384d12","priority":0,"status":200,"text":"Spectral Python (SPy)\n---------------------\n\n.. image:: https://travis-ci.org/spectralpython/spectral.svg?branch=master\n    :target: https://travis-ci.org/spectralpython/spectral\n\n.. image:: https://badges.gitter.im/spectralpython/spectral.svg\n   :alt: Join the chat at https://gitter.im/spectralpython/spectral\n   :target: https://gitter.im/spectralpython/spectral?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\nSpectral Python (SPy) is a pure Python module for processing hyperspectral image\ndata (imaging spectroscopy data). It has functions for reading, displaying,\nmanipulating, and classifying hyperspectral imagery. Full details about the\npackage are on the `web site <http://spectralpython.net>`_.\n\n\nInstallation Instructions\n=========================\n\nThe latest release is always hosted on `PyPI <https://pypi.python.org/pypi/spectral>`_,\nso if you have `pip` installed, you can install SPy from the command line with\n\n.. code::\n\n    pip install spectral\n\nPackaged distributions are also hosted at `PyPI <https://pypi.python.org/pypi/spectral>`_\nand `GitHub <https://github.com/spectralpython/spectral/releases/latest>`_\nso you can download and unpack the latest zip/tarball, then type\n\n.. code::\n\n    python setup.py install\n\nTo install the latest development version, download or clone the git repository\nand install as above. No explicit installation is required so you can simply\naccess (or symlink) the `spectral` module within the source tree.\n\nUnit Tests\n==========\n\nTo run the suite of unit tests, you must have `numpy` installed and you must\nhave the `sample data files <http://spectralpython.net/user_guide_intro.html>`_\ndownloaded to the current directory (or one specified by the `SPECTRAL_DATA`\nenvironment variable). To run the unit tests, type\n\n.. code::\n\n    python -m spectral.tests.run\n\nDependencies\n============\nUsing SPy interactively with its visualization capabilities requires `IPython` and\nseveral other packages (depending on the features used). See the\n`web site <http://spectralpython.net>`_ for details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BFE6:324E19:181874:5E908C:6AB92D06"},"text_sha256":"43f3b43011a69c451f1ecd11b0c4068c5e8ed3f39113365d7d3de603fd6761d7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1630","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:179893F:1BBE901:6AB92D07"},"commit":{"sha":"67bf264e4093791fc811ad250bda4b0c6978d0c1","url":"https://github.com/spectralpython/spectral/commit/67bf264e4093791fc811ad250bda4b0c6978d0c1","date":"2026-04-12T14:00:16Z","author_date":"2026-04-12T14:00:16Z","committer_date":"2026-04-12T14:00:16Z","tree_sha":"3f898948f011392bd97ed692cae0351a26ecc6f7","message_first_line":"bug fix for Relab library: Sometimes data files don't have description (#182)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1629","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17EC727:1C1451B:6AB92D08"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3004,"blob_sha":"82cd05024e9085cf4225ad66e234f63517f4d600","priority":0}],"documents":[{"path":"README.rst","size":3004,"blob_sha":"82cd05024e9085cf4225ad66e234f63517f4d600","priority":0,"status":200,"text":"Spectral Python (SPy)\n---------------------\n\n.. image:: https://github.com/spectralpython/spectral/actions/workflows/python-package.yml/badge.svg?branch=master\n   :target: https://github.com/spectralpython/spectral/actions/workflows/python-package.yml\n\n.. image:: https://badges.gitter.im/spectralpython/spectral.svg\n   :alt: Join the chat at https://gitter.im/spectralpython/spectral\n   :target: https://gitter.im/spectralpython/spectral?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. image:: https://anaconda.org/conda-forge/spectral/badges/version.svg\n   :target: https://anaconda.org/conda-forge/spectral\n\n.. image:: https://anaconda.org/conda-forge/spectral/badges/platforms.svg\n   :target: https://anaconda.org/conda-forge/spectral\n\n.. image:: https://anaconda.org/conda-forge/spectral/badges/license.svg\n   :target: https://anaconda.org/conda-forge/spectral\n\n.. image:: https://anaconda.org/conda-forge/spectral/badges/downloads.svg\n   :target: https://anaconda.org/conda-forge/spectral\n\n.. image:: https://anaconda.org/conda-forge/spectral/badges/installer/conda.svg\n   :target: https://conda.anaconda.org/conda-forge\n\nSpectral Python (SPy) is a pure Python module for processing hyperspectral image\ndata (imaging spectroscopy data). It has functions for reading, displaying,\nmanipulating, and classifying hyperspectral imagery. Full details about the\npackage are on the `web site <http://spectralpython.net>`_.\n\n\nInstallation Instructions\n=========================\n\nThe latest release is always hosted on `PyPI <https://pypi.python.org/pypi/spectral>`_,\nso if you have `pip` installed, you can install SPy from the command line with\n\n.. code::\n\n    pip install spectral\n\nPackaged distributions are also hosted at `PyPI <https://pypi.python.org/pypi/spectral>`_\nand `GitHub <https://github.com/spectralpython/spectral/releases/latest>`_\nso you can download and unpack the latest zip/tarball, then type\n\n.. code::\n\n    python setup.py install\n\nTo install the latest development version, download or clone the git repository\nand install as above. No explicit installation is required so you can simply\naccess (or symlink) the `spectral` module within the source tree.\n\n**Finally**, up-to-date guidance on how to install via the popular conda package \nand environment management system can be found at official `conda-forge documentation <https://anaconda.org/conda-forge/spectral>`_.\n\nUnit Tests\n==========\n\nTo run the suite of unit tests, you must have `numpy` installed and you must\nhave the `sample data files <http://spectralpython.net/user_guide_intro.html>`_\ndownloaded to the current directory (or one specified by the `SPECTRAL_DATA`\nenvironment variable). To run the unit tests, type\n\n.. code::\n\n    python -m spectral.tests.run\n\nDependencies\n============\nUsing SPy interactively with its visualization capabilities requires `IPython` and\nseveral other packages (depending on the features used). See the\n`web site <http://spectralpython.net>`_ for details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3E6:326565:17BFE8:5E38DA:6AB92D06"},"text_sha256":"20431a1b76d3f3345dab75e3d8834e0e498ede027fee0c361c5a850700c25e00"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kanryu/quickviewer","input_row":{"repository":"kanryu/quickviewer","url":"https://github.com/kanryu/quickviewer","name":"quickviewer","owner":"kanryu","description":"A image/comic viewer application for Windows, Mac and Linux, it can show images very fast","language":"C++","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":666,"issues":182,"created_at":"2017-03-20T11:20:42Z","updated_at":"2026-09-18T06:43:37Z","first_commit_at":"2017-03-20T11:20:42Z","last_commit_at":"2025-12-27T08:36:52Z","activity_months":105.25,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:44.651Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kanryu/quickviewer","visibility":"public","created_at":"2017-03-20T11:20:42Z","updated_at":"2026-09-18T06:43:37Z","private":false,"fork":false,"archived":false,"stargazers_count":666,"open_issues_count":71,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1628","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E1:7307A:17CF5B2:1BF6C33:6AB92D08"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1627","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A7:3C4024:18186B6:1C4025A:6AB92D09"},"commit":{"sha":"cc6998d66c2cfa52a7a5e762b04949a0e4c33539","url":"https://github.com/kanryu/quickviewer/commit/cc6998d66c2cfa52a7a5e762b04949a0e4c33539","date":"2018-05-14T12:48:07Z","author_date":"2018-05-14T12:48:07Z","committer_date":"2018-05-14T12:48:07Z","tree_sha":"9eba0d90727a397aea27009ee9d3964610a0bd17","message_first_line":"Update index-ja.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1626","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:1799C10:1BC17BF:6AB92D09"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6404,"blob_sha":"1ca1398d855d6155bd03956df8ecddf288efa610","priority":0}],"documents":[{"path":"README.md","size":6404,"blob_sha":"1ca1398d855d6155bd03956df8ecddf288efa610","priority":0,"status":200,"text":"QuickViewer\n===========\n\n\nA image/comic viewer application for Windows and Linux, it can show images very fast\n\n## Project Website(in English / Japanese)\n\n- GitHub (Official, source code repository)\n    - https://kanryu.github.io/quickviewer/\n- OSDN (Second official, in Japanese)\n    - https://ja.osdn.net/projects/quickviewer/\n- GITTER (web chat about QuickViewer) [![Join the chat at https://gitter.im/kanryu/quickviewer](https://badges.gitter.im/kanryu/quickviewer.svg)](https://gitter.im/kanryu/quickviewer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n    - https://gitter.im/kanryu/quickviewer\n\n\n## Summary\n\n - To show images very fast (using OpenGL)\n - Portable (without installers, registries, external libraries)\n - 2 Page Spread viewing (two images once, for digital books/comics)\n - To read archives directly (zip/7z/rar/cbr/cbz)\n - To show images (bmp/png/jpeg/ico/dds/tga/tiff/gif)\n   - Supported for modern formats(JPEG 2000/JPEG XR/WebP)\n   - Supported for Animated PNG(APNG)/GIF\n   - Auto rotation (using JPEG EXIF)\n - To show Raw digital camera images\n   - Canon(crw, cr2)\n   - Nicon(nef)\n   - Sony(arw)\n   - Ricoh(dng)\n   - etc..\n - Can make/view/search catalog from thousands of your digital books\n - Multilingual support(English/Spanish/Simplified Chinese/Japanese/Greek)\n\n## Download\n\n[binary distributions](https://github.com/kanryu/quickviewer/releases) (Windows x86/x64, Linux AppImage x64)\n\n## Screenshots\n\n### 1 page viewing\n\n\n![1 page viewing](https://github.com/kanryu/quickviewer/wiki/images/singleview.jpg)\n\n### 2 page spread viewing\n\n![Spread viewing](https://github.com/kanryu/quickviewer/wiki/images/dualview.jpg)\n\n### Stripped viewing\n\nIf you want, you can remove all attached bars and display only images.\nHidden bars are displayed automatically when needed.\n\n![Stripped viewing](https://github.com/kanryu/quickviewer/wiki/images/stripped.jpg)\n\n\n\n## How to use\n\n- Run the app, and drop image folder/archive to the window.\n- Create shortcut, and drop image folder/archive on it.\n\n\n## Features\n\n- Next Page (Press 'right Arrow Key', 'Mouse wheel down', 'Mouse forward button', or Click left end of window)\n- Prev Page (Press 'left Arrow Key', 'Mouse wheel up', 'Mouse back button', or Click right end of window)\n- Fullscreen (Press 'F11 Key', click Mouse wheel, or 'Esc Key'(to windowed only))\n- Auto loading (auto loading the last book when the app executed)\n- Fittng (To fit images up to window size)\n- Spread viewing (two image once)\n    - Bound on the right side book(e.g. Japanese Style)\n- Pre page loading(since v0.2.0)\n- Exif Information(since v0.3.0)\n- Show Windows Explorer for the current image\n- Put the current image into your mailer\n- Shader Program Filters(since v0.5.1)\n    - Nearest Neighber\n    - Bilinear\n    - ~~Bicubic (by GPU, obsoleted since v0.9.3)~~\n    - ~~Lanczos (obsoleted since v0.9.3)~~\n    - Bicubic by CPU\n    - Lanczos3 by CPU (since 1.0.9)\n    - Lanczos4 by CPU (since 1.0.9)\n- Catalog(since v0.6.0)\n    - Database for your digital books, can manage thansands of volumes, quick view and search\n- File Associations(since v0.8.3)\n- Retouching(change Brightness, Contrast, Gamma value, since 1.0.8)\n\n## Screen operations\n\nYou can do screen operations with the main menu, tool bar, mouse button, wheel, keyboard and so on.\n\n| Operation   | Device   | Input   | Remarks |\n|:------------|:---------|:--------|:--------|\n| Next Page   | Keyboard | Right Key(→) | |\n|             | Keyboard | Space Key | |\n|             | Mouse Wheel | Downward scrolling | |\n|             | Mouse    | Forward Button   | |\n|             | Touch Panel | Swipe left | at the bottom of the screen |\n| Prev Page   | Keyboard | Left Key(←) | |\n|             | Keyboard | BackSpace Key | |\n|             | Mouse Wheel | Upward scrolling | |\n|             | Mouse    | Back Button | |\n|             | Touch Panel | Swipe right | at the bottom of the screen |\n| First Page  | Keyboard | Home Key | |\n| Last Page   | Keyboard | End Key | |\n| Next Volume | Keyboard | Page Down Key | open a folder/archive of neighbor |\n| Prev Volume | Keyboard | Page Up Key | open a folder/archive of neighbor |\n| Fullscreen  | Keyboard | F11 Key | |\n|             | Mouse    | Wheel Clicked | as Center Button |\n|             | Keyboard | ESC Key | Fullscreen mode only |\n|             | Touch Panel | Swipe up with two fingers | |\n| Exit App    | Keyboard | ESC Key | not Fullscreen mode only |\n| Scale Up    | Keyboard | Ten keys(+) | do nothing with Fitting |\n| Scale Down  | Keyboard | Ten keys(-) | do nothing with Fitting |\n| Fitting     | Keyboard | F12 Key |  |\n|             | Keyboard | Ten keys(-) | |\n|             | Mouse  | Right Button + Wheel Clicked | |\n|             | Mouse  | Ctrl + Wheel Clicked | |\n| Image to trash box   | Keyboard | Delete Key | Move the Image of current page to trash box |\n| Rename Image | Keyboard | F2 Key |  |\n| Copy Image   | Keyboard | Ctrl+C Key | Copy Image of current page |\n| Zoom in     | Mouse Wheel | Right Button + Upward scrolling | |\n|             | Mouse Wheel | Ctrl + Upward scrolling | |\n| Zoom out    | Mouse Wheel | Right Button + Downward scrolling | |\n|             | Mouse Wheel | Ctrl + Downward scrolling | |\n\n## System Requirement\n\n- Operating System\n    - Windows Vista,7 or newer\n    - Windows Sever 2008 or newer\n    - Linux Distributions(Ubuntu, Kubuntu, Fedora, etc..)\n- CPU\n    - minimum Dual Core(more better with internal GPU or external GPU)\n- Memory\n    - over 1GB free Memory(strongly recommended on x64 architecture)\n\n## Looking for contributers!\n\n- Spanish Speakers\n- French Speakers\n- Chinese Speakers\n- Mac software engeneers\n\n\n## Report issues\n\nPublic Project Issues:\nhttps://github.com/kanryu/quickviewer/issues\n\nPlease report issues as well as configuration details for your working \nQuickViewer installations at <k.kanryu@gmail.com>\n\nThus, your feedback is welcome at KATO Kanryu<<k.kanryu@gmail.com>>.\n\n\n## Project Source Code Repository\n\nhttps://github.com/kanryu/quickviewer\n\nTo build from the sourcecodes, to see:　![HowToBuild.md](HowToBuild.md)\n\n\n\n## License\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDD4:11E74B:17B1A2:5E2904:6AB92D0A"},"text_sha256":"3ba51f6849061d71e53248c0412ec3de9814c640c837021342c6715c968a1e16"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1625","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17E45D1:1C0C126:6AB92D0A"},"commit":{"sha":"ee8e06746c43baf78ece3a0d4988bd80a3c915d7","url":"https://github.com/kanryu/quickviewer/commit/ee8e06746c43baf78ece3a0d4988bd80a3c915d7","date":"2025-12-27T08:36:52Z","author_date":"2025-12-27T08:36:52Z","committer_date":"2025-12-27T08:36:52Z","tree_sha":"cbec0ffec5ee55a45b9f685877a1253ddec949d4","message_first_line":"Remove duplicate termination notice from README"},"tree_request_status":200,"tree_rate":{"github_remaining":"1624","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EA:78367:182630B:1C4DB0A:6AB92D0A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8577,"blob_sha":"03311faf7d06c86d315c54ab9c778ddfb1699ec7","priority":0},{"path":"docs/privacypolicy.md","size":4797,"blob_sha":"7e654f89ed2058e383800f596f9878d7b6e42ece","priority":1},{"path":"docs/terms_of_service.md","size":3946,"blob_sha":"c462c9f532bf5eccba19b3507bc4d8ae35a2ec47","priority":1}],"documents":[{"path":"README.md","size":8577,"blob_sha":"03311faf7d06c86d315c54ab9c778ddfb1699ec7","priority":0,"status":200,"text":"### [日本語](README_jp.md#日本語--english) / English\n\n## TERMINATED\n\n[This project has been discontinued due to my fatal illness.](https://github.com/kanryu/quickviewer/discussions/206) If you wish to continue this project, please create a new repository and form a new team.\n\nQuickViewer\n===========\n\n\nAn image/comic viewer for Windows, Mac, and Linux. It can show images very fast!\n\n![github tag](https://badgen.net/github/tag/kanryu/quickviewer)\n![github downloads](https://badgen.net/github/assets-dl/kanryu/quickviewer)\n![github last commit](https://badgen.net/github/last-commit/kanryu/quickviewer)\n![opencollective backers](https://badgen.net/opencollective/backers/quickviewer)\n![opencollective contributors](https://badgen.net/opencollective/contributors/quickviewer)\n![opencollective balance](https://badgen.net/opencollective/balance/quickviewer)\n![opencollective yearly](https://badgen.net/opencollective/yearly/quickviewer)\n[![Join the chat at https://gitter.im/kanryu/quickviewer](https://badges.gitter.im/kanryu/quickviewer.svg)](https://gitter.im/kanryu/quickviewer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n## Project Website (in English/Japanese)\n\n- GitHub (Official, source code repository)\n    - https://kanryu.github.io/quickviewer/\n- OSDN (Second official, in Japanese)\n    - https://ja.osdn.net/projects/quickviewer/\n\n\n## Summary\n\n - Fast viewing (using OpenGL)\n - Cross-platform (Windows, macOS, Linux)\n - Portable (no installer needed, does not write to registries, does not need external libraries)\n - Double-page spread view (displaying of two images at once: handy for digital books/comics)\n - Direct reading of archives (zip/7z/rar/cbz/cb7/cbr/cab/tar.gz/tar.bz2/tar.xz, and more)\n - View many different types of images (bmp/png/jpeg/ico/dds/tga/tiff/gif)\n   - Supports modern formats (AVIF / WebP / JPEG 2000 / JPEG XR)\n   - Supports Animated PNG (APNG) and GIF\n   - Auto-rotation (using JPEG Exif)\n - View RAW images from digital cameras:\n   - Canon (crw/cr2)\n   - Nikon (nef)\n   - Sony (arw)\n   - Ricoh (dng)\n   - more\n - Create/view/search through the catalogs from thousands of your digital books\n - Multilingual support (English/Spanish/French/Greek/Japanese/Arabic/Russian/Simplified Chinese)\n\n\n## Download\n\n[Binary Distributions](https://github.com/kanryu/quickviewer/releases)\n\n - Windows `.zip` (x86/x64)\n - Mac `.dmg` (x64) (until v1.1.1)\n - Linux `.AppImage` (x64) (until v1.1.1)\n\n\n## Contributing\n\nContributions go far beyond pull requests and commits to the code. We would love to give you an opportunity to put your stamp on QuickViewer. We also are thrilled to receive a great variety of other contributions, including:\n\n- Documentation updates, enhancements, designs, or bugfixes\n- Spelling or grammar corrections\n- Addition of another language translations, especially of your native language — this is very easy\n- `README.md` corrections or redesign\n- Adding unit or functional tests\n- Testing GitHub issues — especially determining whether an issue still persists and is reproducible\n- Blogging, chatting, tweeting\n\nWe contracted with OpenCollective to allow this project to accept donations. Your one-time or ongoing financial contributions will help us improve QuickViewer's capabilities and make it easier to use on each device.\n\nhttps://opencollective.com/quickviewer\n\n\n## Screenshots\n\n### Single page view\n\n![1 page viewing](https://github.com/kanryu/quickviewer/wiki/images/singleview.jpg)\n\n### Double-page spread view\n\n![Spread viewing](https://github.com/kanryu/quickviewer/wiki/images/dualview.jpg)\n\n### Stripped view\n\nIf you want, you can remove all attached bars, and display images alone.\nHidden bars are displayed automatically upon hovering over the top or bottom of the program window.\n\n![Stripped viewing](https://github.com/kanryu/quickviewer/wiki/images/stripped.jpg)\n\n\n## How to use\n\n- Execute QuickViewer and then drag and drop an image, folder, or archive onto the window.\n- Create a shortcut to QuickViewer and then drag and drop an image, folder, or archive onto it.\n\n\n## Features\n\n- Next Page (press 'Right Arrow Key', 'Mouse wheel down', 'Mouse forward button', or click left edge of the window)\n- Previous Page (press 'Left Arrow Key', 'Mouse wheel up', 'Mouse back button', or click right edge of the window)\n- Fullscreen (press 'F11 Key', click Mouse wheel, or 'Esc Key' (to windowed only))\n- Auto load the view (restore last book when application is executed)\n- Fitting (fit images to the size of the window)\n- Double-page spread view (show two images simultaneously)\n    - Bound to the right side (e.g. Japanese Style)\n- Pages' pre-loading (since v0.2.0)\n- Exif Information (since v0.3.0)\n- Open location of the current image with Windows Explorer\n- Put the current image into your mailer\n- Shader Program Filters (since v0.5.1):\n    - Nearest Neighbor\n    - Bilinear\n    - ~~Bicubic by GPU~~ (obsolete since v0.9.3)\n    - ~~Lanczos~~ (obsolete since v0.9.3)\n    - Bicubic by CPU\n    - Lanczos3 by CPU (since 1.0.9)\n    - Lanczos4 by CPU (since 1.0.9)\n- Catalog (since v0.6.0)\n    - Database for your digital books, can manage thousands of volumes: quick view and search\n- File Associations (since v0.8.3)\n- Retouching (change Brightness, Contrast, Gamma value) (since 1.0.8).\n\n\n## Screen operations\n\nYou can perform screen operations with the main menu, toolbar, mouse button, wheel, keyboard, and so on.\n\n| Operation   | Device   | Input   | Remarks |\n|:------------|:---------|:--------|:--------|\n| Next Page   | Keyboard | Right Key(→) | |\n|             | Keyboard | Space Key | |\n|             | Mouse Wheel | Downward scrolling | |\n|             | Mouse    | Forward Button   | |\n|             | Touch Panel | Swipe left | At the bottom of the screen |\n| Prev Page   | Keyboard | Left Key(←) | |\n|             | Keyboard | BackSpace Key | |\n|             | Mouse Wheel | Upward scrolling | |\n|             | Mouse    | Back Button | |\n|             | Touch Panel | Swipe right | At the bottom of the screen |\n| First Page  | Keyboard | Home Key | |\n| Last Page   | Keyboard | End Key | |\n| Next Volume | Keyboard | Page Down Key | Open neighboring folder/archive |\n| Prev Volume | Keyboard | Page Up Key | Open neighboring folder/archive |\n| Fullscreen  | Keyboard | F11 Key | |\n|             | Mouse    | Wheel Clicked | A Middle Button |\n|             | Keyboard | ESC Key | Fullscreen mode only |\n|             | Touch Panel | Swipe up with two fingers | |\n| Exit App    | Keyboard | ESC Key | Except in Fullscreen mode |\n| Scale Up    | Keyboard | Ten keys(+) | Do nothing with Fitting |\n| Scale Down  | Keyboard | Ten keys(-) | Do nothing with Fitting |\n| Fitting     | Keyboard | F12 Key |  |\n|             | Keyboard | Ten keys(-) | |\n|             | Mouse  | Right Button + Wheel Clicked | |\n|             | Mouse  | Ctrl + Wheel Clicked | |\n| Image to trash box   | Keyboard | Delete Key | Move the Image of current page to trash box |\n| Rename Image | Keyboard | F2 Key |  |\n| Copy Image   | Keyboard | Ctrl+C Key | Copy Image of current page |\n| Zoom in     | Mouse Wheel | Right Button + Upward scrolling | |\n|             | Mouse Wheel | Ctrl + Upward scrolling | |\n| Zoom out    | Mouse Wheel | Right Button + Downward scrolling | |\n|             | Mouse Wheel | Ctrl + Downward scrolling | |\n\n\n## System Requirement\n\n- Operating System\n    - Windows Vista, 7 or newer\n    - Windows Sever 2008 or newer\n    - Linux Distributions (Ubuntu, Kubuntu, Fedora, etc.)\n- CPU\n    - minimum Dual Core (the more the better; with internal or external GPU)\n    - strongly recommended an x64 architecture\n- RAM\n    - more than 1GB of free memory.\n\n\n## Looking for contributors!\n\n- Portuguese/Hindu/Bengali/Malay speakers\n- Mac/Linux software developers.\n\n\n## Report issues\n\nPublic Project Issues:\nhttps://github.com/kanryu/quickviewer/issues\n\nPlease report issues along with configuration details of your QuickViewer's\nworking installation at <k.kanryu@gmail.com>.\n\nYour feedback is always welcome at KATO Kanryu <<k.kanryu@gmail.com>>.\n\n\n## Project Source Code Repository\n\nhttps://github.com/kanryu/quickviewer\n\nTo build from the source code, visit: [HowToBuild.md](HowToBuild.md).\n\n\n## License\n\nThis program is distributed in hopes to be useful and to be used, but WITHOUT ANY WARRANTY—without even implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See GNU General Public License for more details.\n\nhttps://github.com/kanryu/quickviewer/blob/master/LICENSE\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C82:18CDF1:179755:5641C0:6AB92D0B"},"text_sha256":"035f279b6a741c20a9176ee2d35fd5c614091c6eb622ea47708201455afb13b9"},{"path":"docs/privacypolicy.md","size":4797,"blob_sha":"7e654f89ed2058e383800f596f9878d7b6e42ece","priority":1,"status":200,"text":"## Privacy Policy\n\nKATO Kanryu<k.kanryu@gmail.com> built the QuickViewer app as a Free Software app. This SERVICE is provided by KATO Kanryu at no cost and is intended for use as is.\n\nThis page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.\n\nIf you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.\n\nThe terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at QuickViewer unless otherwise defined in this Privacy Policy.\n\n**Information Collection and Use**\n\nFor a better experience, while using our Service, I may require you to provide us with certain personally identifiable information, including but not limited to Nothing. The information that I request will be retained on your device and is not collected by me in any way.\n\nThe app does use third party services that may collect information used to identify you.\n\nLink to privacy policy of third party service providers used by the app\n\n**Log Data**\n\nI want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your computer called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.\n\n**Cookies**\n\nCookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.\n\nThis Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.\n\n**Service Providers**\n\nI may employ third-party companies and individuals due to the following reasons:\n\n*   To facilitate our Service;\n*   To provide the Service on our behalf;\n*   To perform Service-related services; or\n*   To assist us in analyzing how our Service is used.\n\nI want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.\n\n**Security**\n\nI value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.\n\n**Links to Other Sites**\n\nThis Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.\n\n**Children’s Privacy**\n\nThese Services do not address anyone under the age of 13\\. I do not knowingly collect personally identifiable information from children under 13\\. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.\n\n**Changes to This Privacy Policy**\n\nI may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.\n\n**Contact Us**\n\nIf you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me.\n\nThis privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net)  and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8706:1A3D83:187A95:5EF3F1:6AB92D0B"},"text_sha256":"45d15a8a06da893a019468d5826806689da155da85c4f1c3a4290686c86414e1"},{"path":"docs/terms_of_service.md","size":3946,"blob_sha":"c462c9f532bf5eccba19b3507bc4d8ae35a2ec47","priority":1,"status":200,"text":"\n\t\t\t\t\t\t\t\t\t\t\nIndividual Terms of Service\n\n# 1. Terms\n\n  By accessing the website at https://kanryu.github.io/quickviewer/, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.\n\n# 2. Use License\n\n  \n    \n1. Permission is granted to temporarily download one copy of the materials (information or software) on Individual's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:\n\n      \n    1. modify or copy the materials;\n    1. use the materials for any commercial purpose, or for any public display (commercial or non-commercial);\n    1. attempt to decompile or reverse engineer any software contained on Individual's website;\n    1. remove any copyright or other proprietary notations from the materials; or\n    1. transfer the materials to another person or \"mirror\" the materials on any other server.\n      \n    \n1. This license shall automatically terminate if you violate any of these restrictions and may be terminated by Individual at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.\n  \n\n# 3. Disclaimer\n\n1. The materials on Individual's website are provided on an 'as is' basis. Individual makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.\n1. Further, Individual does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.\n  \n\n# 4. Limitations\n\n  In no event shall Individual or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Individual's website, even if Individual or a Individual authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.\n\n# 5. Accuracy of materials\n\n  The materials appearing on Individual's website could include technical, typographical, or photographic errors. Individual does not warrant that any of the materials on its website are accurate, complete or current. Individual may make changes to the materials contained on its website at any time without notice. However Individual does not make any commitment to update the materials.\n\n# 6. Links\n\n  Individual has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Individual of the site. Use of any such linked website is at the user's own risk.\n\n# 7. Modifications\n\n  Individual may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.\n\n# 8. Governing Law\n\n  These terms and conditions are governed by and construed in accordance with the laws of Japan and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.\n\t\t\t\t\t\t\t\t\t\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2EEC:3BB77:17BC80:5E3693:6AB92D0B"},"text_sha256":"cd192e60eaebd44066997fc2e2af49abddeb1d3e2aeb4f3e772deb335dee0fe4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":0,"C6":1,"C7":0,"D1":1,"score":3,"D1_evidence":"sha=ee8e06746c43baf78ece3a0d4988bd80a3c915d7; file=docs/privacypolicy.md; text=KATO Kanryu built the QuickViewer app as a Free Software app. This SERVICE is provided by KATO Kanryu at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=ee8e06746c43baf78ece3a0d4988bd80a3c915d7; file=docs/privacypolicy.md; text=KATO Kanryu built the QuickViewer app as a Free Software app. This SERVICE is provided by KATO Kanryu at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service.","C2":"sha=ee8e06746c43baf78ece3a0d4988bd80a3c915d7; file=docs/privacypolicy.md; text=KATO Kanryu built the QuickViewer app as a Free Software app. This SERVICE is provided by KATO Kanryu at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service.","C6":"sha=ee8e06746c43baf78ece3a0d4988bd80a3c915d7; file=docs/privacypolicy.md; text=KATO Kanryu built the QuickViewer app as a Free Software app. This SERVICE is provided by KATO Kanryu at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service."}}}}
{"repository":"3dem/relion","input_row":{"repository":"3dem/relion","url":"https://github.com/3dem/relion","name":"relion","owner":"3dem","description":"Image-processing software for cryo-electron microscopy","language":"C++","license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0","license_osi_approved":"true","stars":557,"issues":1242,"created_at":"2017-01-26T15:21:11Z","updated_at":"2026-09-23T16:41:31Z","first_commit_at":"2015-02-09T13:39:31Z","last_commit_at":"2026-08-19T22:47:59Z","activity_months":138.28,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:48.689Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"3dem/relion","visibility":"public","created_at":"2017-01-26T15:21:11Z","updated_at":"2026-09-23T16:41:31Z","private":false,"fork":false,"archived":false,"stargazers_count":557,"open_issues_count":277,"license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0"},"error":"","rate":{"github_remaining":"1623","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AF:A9DC0:17D3580:1BFAE46:6AB92D0C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1622","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088E:380E1C:17E7406:1C0E14F:6AB92D0D"},"commit":{"sha":"3ddc01f7116f62f111e4eb36e2768fa040dcd667","url":"https://github.com/3dem/relion/commit/3ddc01f7116f62f111e4eb36e2768fa040dcd667","date":"2018-05-24T21:43:23Z","author_date":"2018-05-24T21:43:23Z","committer_date":"2018-05-24T21:43:23Z","tree_sha":"1ce741e21ea3a9ae541a720f31d12ede71694265","message_first_line":"bugfixes in bfactor_estimator"},"tree_request_status":200,"tree_rate":{"github_remaining":"1621","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:17AFCD0:1BD644E:6AB92D0D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2225,"blob_sha":"dec6bb8c1634fa324aa57236d7b049b5aea5ff43","priority":0}],"documents":[{"path":"README.md","size":2225,"blob_sha":"dec6bb8c1634fa324aa57236d7b049b5aea5ff43","priority":0,"status":200,"text":"RELION\n======\n\n\nRELION (for REgularised LIkelihood OptimisatioN) is a stand-alone computer\nprogram for Maximum A Posteriori refinement of (multiple) 3D reconstructions\nor 2D class averages in cryo-electron microscopy. It is developed in the\nresearch group of Sjors Scheres at the MRC Laboratory of Molecular Biology.\n\nThe underlying theory of MAP refinement is given in a [scientific publication](https://www.ncbi.nlm.nih.gov/pubmed/22100448)\n. If RELION is useful in your work, please cite this paper.\n\n\nThe more comprehensive documentation of RELION is stored on the [Wiki](http://www2.mrc-lmb.cam.ac.uk/relion)\n\n## Installation\n\n\nMore extensive options and configurations are available\n[here](http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Download_%26_install),\nbut the outlines to clone and install relion for typical use are made easy\nthrough [cmake](https://en.wikipedia.org/wiki/CMake).\n\nOn ubuntu machines, installing cmake, the compiler, and additional dependencies (mpi, fftw) is as easy as:\n\n```\nsudo apt install cmake build-essential mpi-default-bin mpi-default-dev libfftw3-dev\n```\n\nOn other systems it is typically just as easy, you simply have to modify \"apt\" to\nthe appropriate package manager. You will also need [git](https://en.wikipedia.org/wiki/Git), which is just as easy;\n\n```\nsudo apt install git\n```\n\n\nOnce git and cmake are installed, relion can be easily installed through\n```\ngit clone https://github.com/3dem/relion.git\ncd relion\nmkdir build\ncd build\ncmake -DCMAKE_INSTALL_PREFIX=/where/to/install/ ..\nmake -j4\nmake install\n```\n(NOTES: \"/where/to/install/..\" is typically \"/usr/local/relion\".\n Make sure you create this directory beforehand.\n Installing to that location requires sudo, so in this case be sure to use\n \"sudo make install\" instead of \"make install\" in the last step.)\n\nThese steps will download the source-code, create a build-directory,\nthen configure and build relion, and lastly install it to be generally\navailable on the system.\n\n\n## Updating\n\n\nRELION is intermittently updated, with both minor and major features.\nTo update an existing installation, simply use the following commands\n\n```\ncd relion\ngit pull\ncd build\nmake -j4\nmake install    # (or \"sudo make install\")\n\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53B2:3B1F3:18644D:5EDE00:6AB92D0D"},"text_sha256":"850c7740f528701b29b9b9dd4781a73709aed813b091c21686a14ea30a9d9c5c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1620","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:1799F00:1BC1B49:6AB92D0E"},"commit":{"sha":"cad71bf6d67979a30c7a78b6567eae55db2c11b1","url":"https://github.com/3dem/relion/commit/cad71bf6d67979a30c7a78b6567eae55db2c11b1","date":"2026-03-18T04:22:26Z","author_date":"2026-03-18T04:22:26Z","committer_date":"2026-03-18T04:22:26Z","tree_sha":"674e07a2995f227e760746687b605415632112e4","message_first_line":"Add a missing PUBLIC keyword to fix builds with newer CMake (issue #1331)."},"tree_request_status":200,"tree_rate":{"github_remaining":"1619","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:181F2AC:1C47206:6AB92D0E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1097,"blob_sha":"da9c1f9393987ca7ac3f63cf70d29bab588965b1","priority":0}],"documents":[{"path":"README.md","size":1097,"blob_sha":"da9c1f9393987ca7ac3f63cf70d29bab588965b1","priority":0,"status":200,"text":"RELION 5.0.1\n============\n\nRELION (for REgularised LIkelihood OptimisatioN) is a stand-alone computer\nprogram for Maximum A Posteriori refinement of (multiple) 3D reconstructions\nor 2D class averages in cryo-electron microscopy. It is developed in the\nresearch group of Sjors Scheres at the MRC Laboratory of Molecular Biology.\n\nIf RELION is useful in your work, please cite our papers.\n\nComprehensive documentation of RELION and tutorials are stored [here](https://relion.readthedocs.io/).\n\n## Installation\n\nSee our [installation instructions](https://relion.readthedocs.io/en/release-5.0/Installation.html).\n\nYou will have to set up a Python environment to use Python modules (e.g. Blush, ModelAngelo and DynaMight).\nThus, please read the above instructions carefully even if you are familiar with earlier versions.\n\n## Class Ranker\n\nThe default model for the class ranker has been trained and tested in Python 3.9.12 with Pytorch 1.10.0 and Numpy 1.20.0.\nIf you wish to retrain the class ranker model with your own data, please refer to [this repo](https://github.com/3dem/relion-classranker).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52AE:18233:17B61A:5E2E0F:6AB92D0D"},"text_sha256":"773f061802a012a56df116923ec1ba0d51bbb40292fa71da45a4bd9bed8f1531"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"kleisauke/net-vips","input_row":{"repository":"kleisauke/net-vips","url":"https://github.com/kleisauke/net-vips","name":"net-vips","owner":"kleisauke","description":".NET binding for libvips.","language":"C#","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":527,"issues":267,"created_at":"2018-02-19T12:23:37Z","updated_at":"2026-09-26T16:56:44Z","first_commit_at":"2018-02-20T21:33:23Z","last_commit_at":"2026-09-09T07:54:44Z","activity_months":102.58,"ai_ml_match_topics":"image-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:51.505Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"kleisauke/net-vips","visibility":"public","created_at":"2018-02-19T12:23:37Z","updated_at":"2026-09-26T16:56:44Z","private":false,"fork":false,"archived":false,"stargazers_count":527,"open_issues_count":9,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1618","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DB:35D5A8:17E7E90:1C0FB51:6AB92D0F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1617","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DE:70FF5:17EA3FA:1C11C68:6AB92D0F"},"commit":{"sha":"9b2fe32f3d50ee326c60d9d85a059302ef2dcca2","url":"https://github.com/kleisauke/net-vips/commit/9b2fe32f3d50ee326c60d9d85a059302ef2dcca2","date":"2018-05-11T14:44:44Z","author_date":"2018-05-11T14:44:44Z","committer_date":"2018-05-11T14:44:44Z","tree_sha":"00b55e14547fcfaffe0155d1c719ad1d5c1c3a64","message_first_line":"Add 1 point mosaic example"},"tree_request_status":200,"tree_rate":{"github_remaining":"1616","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082D:725A9:17F19E2:1C19A1A:6AB92D10"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3195,"blob_sha":"23b0db73b900861e0c630835903f6f54ce4d1ffc","priority":0}],"documents":[{"path":"README.md","size":3195,"blob_sha":"23b0db73b900861e0c630835903f6f54ce4d1ffc","priority":0,"status":200,"text":"# Mono/.NET bindings for libvips\n\n[![NuGet](https://img.shields.io/nuget/v/NetVips.svg)](https://www.nuget.org/packages/NetVips)\n[![Build Status](https://travis-ci.org/kleisauke/net-vips.svg?branch=master)](https://travis-ci.org/kleisauke/net-vips)\n[![Build status](https://ci.appveyor.com/api/projects/status/d2r9uanb5yij07pt/branch/master?svg=true)](https://ci.appveyor.com/project/kleisauke/net-vips/branch/master)\n\nThis NuGet package provides a Mono/.NET binding for the [libvips image processing library](https://jcupitt.github.io/libvips).\n\nThis binding passes the vips test suite cleanly with no leaks on Windows, macOS and Linux.\n\nWe have formatted docs online here:\n\nhttps://kleisauke.github.io/net-vips/\n\n## How it works\n\nPrograms that use `NetVips` don't manipulate images directly, instead\nthey create pipelines of image processing operations building on a source\nimage. When the end of the pipe is connected to a destination, the whole\npipeline executes at once, streaming the image in parallel from source to\ndestination a section at a time.\n\nBecause `NetVips` is parallel, it's quick, and because it doesn't need to\nkeep entire images in memory, it's light. For example, the `NetVips` benchmark:\n\n[NetVips.Benchmarks](https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks)\n\nLoads a large tiff image, shrinks by 10%, sharpens, and saves again. On this\ntest `NetVips` is around 8 times faster than Magick.NET and 4 times faster\nthan ImageSharp.\n\nThere's a handy blog post explaining how libvips opens files, which gives\nsome more background.\n\nhttp://libvips.blogspot.co.uk/2012/06/how-libvips-opens-file.html\n\n## Install\n\nYou need the libvips shared library on your library search path, version 8.2 or\nlater. On Linux and macOS, you can install via your package manager; on \nWindows you can download a pre-compiled binary from the libvips website:\n\nhttps://jcupitt.github.io/libvips/\n\nThen just install this package, perhaps:\n\n    Install-Package NetVips\n\nTo test your install, try this test program:\n\n```csharp\nConsole.WriteLine(ModuleInitializer.VipsInitialized\n? $\"Inited libvips {Base.Version(0)}.{Base.Version(1)}.{Base.Version(2)}\"\n: \"Unable to init libvips\");\nConsole.ReadLine();\n```\n\nIf NetVips was able to find the libvips shared library, you should see:\n\n    Inited libvips [VERSION_NUMBER]\n\nIf NetVips was not able to find libvips you might see:\n\n    Unable to init libvips\n\n## Example\n\n```csharp\nusing NetVips;\n\nvar im = Image.NewFromFile(\"image.jpg\");\n\n// put im at position (100, 100) in a 3000 x 3000 pixel image, \n// make the other pixels in the image by mirroring im up / down / \n// left / right, see\n// https://jcupitt.github.io/libvips/API/current/libvips-conversion.html#vips-embed\nim = im.Embed(100, 100, 3000, 3000, extend: Enums.Extend.Mirror);\n\n// multiply the green (middle) band by 2, leave the other two alone\nim *= new[] {1, 2, 1};\n\n// make an image from an array constant, convolve with it\nvar mask = Image.NewFromArray(new[,]\n{\n    {-1, -1, -1},\n    {-1, 16, -1},\n    {-1, -1, -1}\n}, 8);\nim = im.Conv(mask, precision: Enums.Precision.Integer);\n\n// finally, write the result back to a file on disk\nim.WriteToFile(\"output.jpg\");\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59A0:285814:174458:5DBD20:6AB92D0E"},"text_sha256":"82ae9adad350c8ed9e8c6324793555fae2ca2e12f6d5f975e74185c1c07e7d79"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1615","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17CFABA:1BF722C:6AB92D11"},"commit":{"sha":"1c55f3e7aa07967e31bd2b3da92bf9953b3eac98","url":"https://github.com/kleisauke/net-vips/commit/1c55f3e7aa07967e31bd2b3da92bf9953b3eac98","date":"2026-06-09T18:11:16Z","author_date":"2026-06-09T18:11:16Z","committer_date":"2026-06-09T18:11:16Z","tree_sha":"586a8f4928c9529b5f3040e40c02f588de7844f4","message_first_line":"Release NetVips.Native v8.18.3"},"tree_request_status":200,"tree_rate":{"github_remaining":"1614","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CF:725A9:17F1ABD:1C19AEF:6AB92D11"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7668,"blob_sha":"29a5f520e716741914a9615a9626a45646f56264","priority":0}],"documents":[{"path":"README.md","size":7668,"blob_sha":"29a5f520e716741914a9615a9626a45646f56264","priority":0,"status":200,"text":"# NetVips\n\n[![NuGet](https://img.shields.io/nuget/v/NetVips.svg)](https://www.nuget.org/packages/NetVips)\n[![CI status (Linux, macOS and Windows)](https://github.com/kleisauke/net-vips/workflows/CI/badge.svg)](https://github.com/kleisauke/net-vips/actions)\n[![CI status (NetVips nightly packaging)](https://ci.appveyor.com/api/projects/status/d2r9uanb5yij07pt/branch/master?svg=true)](https://ci.appveyor.com/project/kleisauke/net-vips/branch/master)\n\nThis NuGet package provides a .NET binding for the [libvips image processing library](https://www.libvips.org/).\n\nThis binding passes the vips test suite cleanly with no leaks on Windows, macOS and Linux.\n\nWe have formatted docs online here:\n\nhttps://kleisauke.github.io/net-vips/\n\n## How it works\n\nPrograms that use `NetVips` don't manipulate images directly, instead\nthey create pipelines of image processing operations building on a source\nimage. When the end of the pipe is connected to a destination, the whole\npipeline executes at once, streaming the image in parallel from source to\ndestination a section at a time.\n\nBecause `NetVips` is parallel, it's quick, and because it doesn't need to\nkeep entire images in memory, it's light. For example, the `NetVips` benchmark:\n\n[NetVips.Benchmarks](https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks)\n\nLoads a large image, shrinks by 10%, sharpens, and saves again. On this test\n`NetVips` is around 26 times faster than Magick.NET and 4 times faster than ImageSharp.\n\nThe [libvips documentation](https://www.libvips.org/API/current/)\nhas a [chapter explaining how libvips opens files](\nhttps://www.libvips.org/API/current/how-it-opens-files.html)\nwhich gives some more background.\n\n## Supported platforms\n\n- .NET Framework 4.6.2 and higher\n- .NET 6.0 and higher\n\n## Install\n\nYou need the libvips shared library on your library search path, version 8.2 or\nlater. There are separate NuGet packages that will contain the pre-compiled\nlibvips binaries for the most common platforms (see\n[this repo](https://github.com/kleisauke/libvips-packaging) for details):\n\n|                             | NuGet Package[^1]                                                                 |\n|-----------------------------|:---------------------------------------------------------------------------------:|\n| **Windows 64-bit**          | [![NetVips.Native.win-x64-badge]][NetVips.Native.win-x64-nuget]                   |\n| **Windows 32-bit**          | [![NetVips.Native.win-x86-badge]][NetVips.Native.win-x86-nuget]                   |\n| **Windows ARM64**           | [![NetVips.Native.win-arm64-badge]][NetVips.Native.win-arm64-nuget]               |\n| **Linux x64 glibc**[^2]     | [![NetVips.Native.linux-x64-badge]][NetVips.Native.linux-x64-nuget]               |\n| **Linux x64 musl**[^3]      | [![NetVips.Native.linux-musl-x64-badge]][NetVips.Native.linux-musl-x64-nuget]     |\n| **Linux ARM64v8 glibc**[^2] | [![NetVips.Native.linux-arm64-badge]][NetVips.Native.linux-arm64-nuget]           |\n| **Linux ARM64v8 musl**[^3]  | [![NetVips.Native.linux-musl-arm64-badge]][NetVips.Native.linux-musl-arm64-nuget] |\n| **Linux ARMv7**             | [![NetVips.Native.linux-arm-badge]][NetVips.Native.linux-arm-nuget]               |\n| **macOS x64**               | [![NetVips.Native.osx-x64-badge]][NetVips.Native.osx-x64-nuget]                   |\n| **macOS ARM64**             | [![NetVips.Native.osx-arm64-badge]][NetVips.Native.osx-arm64-nuget]               |\n\n[NetVips.Native.win-x64-badge]: https://img.shields.io/nuget/v/NetVips.Native.win-x64.svg\n[NetVips.Native.win-x64-nuget]: https://www.nuget.org/packages/NetVips.Native.win-x64\n[NetVips.Native.win-x86-badge]: https://img.shields.io/nuget/v/NetVips.Native.win-x86.svg\n[NetVips.Native.win-x86-nuget]: https://www.nuget.org/packages/NetVips.Native.win-x86\n[NetVips.Native.win-arm64-badge]: https://img.shields.io/nuget/v/NetVips.Native.win-arm64.svg\n[NetVips.Native.win-arm64-nuget]: https://www.nuget.org/packages/NetVips.Native.win-arm64\n[NetVips.Native.linux-x64-badge]: https://img.shields.io/nuget/v/NetVips.Native.linux-x64.svg\n[NetVips.Native.linux-x64-nuget]: https://www.nuget.org/packages/NetVips.Native.linux-x64\n[NetVips.Native.linux-musl-x64-badge]: https://img.shields.io/nuget/v/NetVips.Native.linux-musl-x64.svg\n[NetVips.Native.linux-musl-x64-nuget]: https://www.nuget.org/packages/NetVips.Native.linux-musl-x64\n[NetVips.Native.linux-arm64-badge]: https://img.shields.io/nuget/v/NetVips.Native.linux-arm64.svg\n[NetVips.Native.linux-arm64-nuget]: https://www.nuget.org/packages/NetVips.Native.linux-arm64\n[NetVips.Native.linux-musl-arm64-badge]: https://img.shields.io/nuget/v/NetVips.Native.linux-musl-arm64.svg\n[NetVips.Native.linux-musl-arm64-nuget]: https://www.nuget.org/packages/NetVips.Native.linux-musl-arm64\n[NetVips.Native.linux-arm-badge]: https://img.shields.io/nuget/v/NetVips.Native.linux-arm.svg\n[NetVips.Native.linux-arm-nuget]: https://www.nuget.org/packages/NetVips.Native.linux-arm\n[NetVips.Native.osx-x64-badge]: https://img.shields.io/nuget/v/NetVips.Native.osx-x64.svg\n[NetVips.Native.osx-x64-nuget]: https://www.nuget.org/packages/NetVips.Native.osx-x64\n[NetVips.Native.osx-arm64-badge]: https://img.shields.io/nuget/v/NetVips.Native.osx-arm64.svg\n[NetVips.Native.osx-arm64-nuget]: https://www.nuget.org/packages/NetVips.Native.osx-arm64\n\n[^1]: The version number of these NuGet packages is in sync with libvips' version number.\n[^2]: Uses glibc as the standard C library (Ubuntu, Debian, etc).\n[^3]: Uses musl as the standard C library (Alpine, Gentoo Linux, etc).\n\nThese binaries provides support for the JPEG, PNG, Ultra HDR, WebP, AVIF, TIFF, GIF\nand SVG (input) image formats.\n\nThen just install this package, perhaps:\n\n    Install-Package NetVips\n\nTo test your install, try this test program:\n\n```csharp\nif (ModuleInitializer.VipsInitialized)\n{\n    Console.WriteLine($\"Inited libvips {NetVips.Version(0)}.{NetVips.Version(1)}.{NetVips.Version(2)}\");\n}\nelse\n{\n    Console.WriteLine(ModuleInitializer.Exception.Message);\n}\nConsole.ReadLine();\n```\n\nIf NetVips was able to find the libvips shared library, you should see:\n\n    Inited libvips [VERSION_NUMBER]\n\nHowever, if you see something else, NetVips was unable to initialize libvips.\nThis can happen for a variety of reasons, even though most of the times it's because NetVips\nwas not able to find libvips or due to x86/x64 architecture problems:\n\n| Inner exception | HRESULT | Solution |\n| :--- | :--- | :--- |\n| DllNotFoundException | 0x8007007E | Make sure to add the `bin` folder of the libvips Windows build to your `PATH` environment variable (if you wish to not use the separate NuGet packages). |\n| BadImageFormatException | 0x8007000B | Make sure when you target the `AnyCPU` platform the `Prefer 32-bit` option is unchecked. Or try to target `x64` instead. |\n\n## Example\n\n```csharp\nusing NetVips;\n\nusing var im = Image.NewFromFile(\"image.jpg\");\n\n// put im at position (100, 100) in a 3000 x 3000 pixel image,\n// make the other pixels in the image by mirroring im up / down /\n// left / right, see\n// https://www.libvips.org/API/current/method.Image.embed.html\nusing var embed = im.Embed(100, 100, 3000, 3000, extend: Enums.Extend.Mirror);\n\n// multiply the green (middle) band by 2, leave the other two alone\nusing var multiply = embed * new[] { 1, 2, 1 };\n\n// make an image from an array constant, convolve with it\nusing var mask = Image.NewFromArray(new[,]\n{\n    {-1, -1, -1},\n    {-1, 16, -1},\n    {-1, -1, -1}\n}, 8);\nusing var convolve = multiply.Conv(mask, precision: Enums.Precision.Integer);\n\n// finally, write the result back to a file on disk\nconvolve.WriteToFile(\"output.jpg\");\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A320:B08CF:175D14:5DD6F7:6AB92D11"},"text_sha256":"dbadacfed79332f22382c8e00adb59d4af3b1f31448d0a85d2ca3c38f0f2ffdf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"BrainJS/brain.js","input_row":{"repository":"BrainJS/brain.js","url":"https://github.com/BrainJS/brain.js","name":"brain.js","owner":"BrainJS","description":"🤖 GPU accelerated Neural networks in JavaScript for Browsers and Node.js","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":14862,"issues":608,"created_at":"2016-02-13T18:09:44Z","updated_at":"2026-09-24T18:10:15Z","first_commit_at":"2010-05-10T06:51:05Z","last_commit_at":"2024-07-09T16:06:13Z","activity_months":169.99000000000001,"ai_ml_match_topics":"neural-network; convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:54.274Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"BrainJS/brain.js","visibility":"public","created_at":"2016-02-13T18:09:44Z","updated_at":"2026-09-24T18:10:15Z","private":false,"fork":false,"archived":false,"stargazers_count":14862,"open_issues_count":90,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1613","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FF:278AC2:1877D5A:1C9FC75:6AB92D12"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1612","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BC:228A99:17FEB26:1C26859:6AB92D12"},"commit":{"sha":"e54314e4d1221cbdde22a5273b859bd73b6407c0","url":"https://github.com/BrainJS/brain.js/commit/e54314e4d1221cbdde22a5273b859bd73b6407c0","date":"2018-05-17T20:10:17Z","author_date":"2018-05-17T20:10:17Z","committer_date":"2018-05-17T20:10:17Z","tree_sha":"d41a20d5a323e04a848bff159cd369dc21ac7c21","message_first_line":"Add `compareBias` function and unit test"},"tree_request_status":200,"tree_rate":{"github_remaining":"1611","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:17A8123:1BCE835:6AB92D13"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17371,"blob_sha":"3a1155d8eb46422eb00391347c436eaf4e6e4c17","priority":0}],"documents":[{"path":"README.md","size":17371,"blob_sha":"3a1155d8eb46422eb00391347c436eaf4e6e4c17","priority":0,"status":200,"text":"\n# brain.js\n\n<img src=\"https://cdn.rawgit.com/harthur-org/brain.js/ff595242/logo.svg\" alt=\"Logo\" width=200px/>\n\n[![npm](https://img.shields.io/npm/dt/brain.js.svg?style=flat-square)](https://npmjs.com/package/brain.js)\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/brain-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[![Slack](https://slack.bri.im/badge.svg)](https://slack.bri.im)\n\n`brain.js` is a library of [Neural Networks](http://en.wikipedia.org/wiki/Artificial_neural_network) written in JavaScript.\n\n:bulb: **Note**: This is a continuation of the [**harthur/brain**](https://github.com/harthur/brain) repository (which is not maintained anymore). For more details, check out [this issue](https://github.com/harthur/brain/issues/72).\n\n- [Examples](#examples)\n    + [More Examples](#more-examples)\n- [Usage](#usage)\n    + [Node](#node)\n    + [Browser](#browser)\n- [Training](#training)\n    + [Data format](#data-format)\n      + [For training with NeuralNetwork](#for-training-with-neuralnetwork)\n      + [For training with `RNNTimeStep`, `LSTMTimeStep` and `GRUTimeStep`](#for-training-with-rnntimestep-lstmtimestep-and-grutimestep)\n      + [For training with `RNN`, `LSTM` and `GRU`](#for-training-with-rnn-lstm-and-gru)\n    + [Training Options](#training-options)\n    + [Async Training](#async-training)\n- [Methods](#methods)\n    + [train](#train)\n- [Failing](#failing)\n- [JSON](#json)\n- [Options](#options)\n    + [activation](#activation)\n    + [hiddenLayers](#hiddenlayers)\n- [Streams](#streams)\n    + [Example](#example)\n    + [Initialization](#initialization)\n    + [Transform](#transform)\n- [Utilities](#utilities)\n    + [`likely`](#likely)\n- [Neural Network Types](#neural-network-types)\n    + [Why different Neural Network Types?](#why-different-neural-network-types)\n    \n# Examples\nHere's an example showcasing how to approximate the XOR function using `brain.js`:\nMore info on config [here](https://github.com/BrainJS/brain.js/blob/develop/src/neural-network.js#L31).\n\n```javascript\n//provide optional config object (or undefined). Defaults shown.\nvar config = {\n    binaryThresh: 0.5,     // ¯\\_(ツ)_/¯\n    hiddenLayers: [3],     // array of ints for the sizes of the hidden layers in the network\n    activation: 'sigmoid' // Supported activation types ['sigmoid', 'relu', 'leaky-relu', 'tanh']\n}\n//create a simple feed forward neural network with backpropagation\nvar net = new brain.NeuralNetwork();\n\nnet.train([{input: [0, 0], output: [0]},\n           {input: [0, 1], output: [1]},\n           {input: [1, 0], output: [1]},\n           {input: [1, 1], output: [0]}]);\n\nvar output = net.run([1, 0]);  // [0.987]\n```\nor\nMore info on config [here](https://github.com/BrainJS/brain.js/blob/develop/src/recurrent/rnn.js#L726).\n```javascript\n//provide optional config object, defaults shown.\nvar config = {\n    inputSize: 20,\n    inputRange: 20,\n    hiddenSizes:[20,20],\n    outputSize: 20,\n    learningRate: 0.01,\n    decayRate: 0.999,\n}\n//create a simple recurrent neural network\nvar net = new brain.recurrent.RNN(config);\n\nnet.train([{input: [0, 0], output: [0]},\n           {input: [0, 1], output: [1]},\n           {input: [1, 0], output: [1]},\n           {input: [1, 1], output: [0]}]);\n\nvar output = net.run([0, 0]);  // [0]\noutput = net.run([0, 1]);  // [1]\noutput = net.run([1, 0]);  // [1]\noutput = net.run([1, 1]);  // [0]\n```\n\nHowever, there is no reason to use a neural network to figure out XOR. (-: So, here is a more involved, realistic example:\n[Demo: training a neural network to recognize color contrast](https://brain.js.org/).\n\n## More Examples\nYou check out this fantastic screencast, which explains how to train a simple neural network using a real world dataset: [How to create a neural network in the browser using Brain.js](https://scrimba.com/c/c36zkcb).\n* [writing a children's book using a recurrent neural neural network](./examples/childrens-book.js)\n* [simple letter detection](./examples/which-letter-simple.js)\n\n# Usage\n\n### Node\nIf you have [node](http://nodejs.org/), you can install `brain.js` with [npm](http://npmjs.org):\n\n```\nnpm install brain.js\n```\n\nOr if you prefer yarn:\n```\nyarn add brain.js\n```\n\nAlternatively, you can install `brain.js` with [bower](https://bower.io/):\n```\nbower install brain.js\n```\n\nAt present, the npm version of brain.js is approximately 1.0.0, featuring only Feed forward NN. All other models are beta and are being jazzed up and battle hardened.\nYou can still download the latest, though. They are cool!\n\n### Browser\nDownload the latest [brain.js for browser](https://raw.githubusercontent.com/harthur-org/brain.js/master/browser.js). Training is computationally expensive, so you should try to train the network offline (or on a Worker) and use the `toFunction()` or `toJSON()` options to plug the pre-trained network into your website.\n\n# Training\nUse `train()` to train the network with an array of training data. The network has to be trained with all the data in bulk in one call to `train()`. More training patterns will probably take longer to train, but will usually result in a network better\nat classifying new patterns.\n\n### Data format\n#### For training with `NeuralNetwork`\nEach training pattern should have an `input` and an `output`, both of which can be either an array of numbers from `0` to `1` or a hash of numbers from `0` to `1`. For the [color contrast demo](https://brain.js.org/) it looks something like this:\n\n```javascript\nvar net = new brain.NeuralNetwork();\n\nnet.train([{input: { r: 0.03, g: 0.7, b: 0.5 }, output: { black: 1 }},\n           {input: { r: 0.16, g: 0.09, b: 0.2 }, output: { white: 1 }},\n           {input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 }}]);\n\nvar output = net.run({ r: 1, g: 0.4, b: 0 });  // { white: 0.99, black: 0.002 }\n```\nHere's another variation of the above example. (_Note_ that input objects do not need to be similar.)\n```javascript\nnet.train([{input: { r: 0.03, g: 0.7 }, output: { black: 1 }},\n           {input: { r: 0.16, b: 0.2 }, output: { white: 1 }},\n           {input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 }}]);\n\nvar output = net.run({ r: 1, g: 0.4, b: 0 });  // { white: 0.81, black: 0.18 }\n```\n\n#### For training with `RNNTimeStep`, `LSTMTimeStep` and `GRUTimeStep`\nEach training pattern can either:\n* Be an array of numbers\n* Be an array of arrays of numbers\n\nExample using an array of numbers:\n```javascript\nvar net = new brain.recurrent.LSTMTimeStep();\n\nnet.train([\n  [1, 2, 3]\n]);\n\nvar output = net.run([1, 2]);  // 3\n```\n\nExample using an array of arrays of numbers:\n```javascript\nvar net = new brain.recurrent.LSTMTimeStep();\n\nnet.train([\n  [1, 3],\n  [2, 2],\n  [3, 1],\n]);\n\nvar output = net.run([[1, 3], [2, 2]]);  // [3, 1]\n```\n\n#### For training with `RNN`, `LSTM` and `GRU`\nEach training pattern can either:\n* Be an array of values\n* Be a string\n* Have an `input` and an `output`\n  * Either of which can an array of values or a string\n\nCAUTION: When using an array of values, you can use ANY value, however, the values are represented in the neural network by a single input.  So the more _distinct values_ has _the larger your input layer_.  If you have a hundreds, thousands, or millions of floating point values _THIS IS NOT THE RIGHT CLASS FOR THE JOB_.  Also, when deviating from strings, this gets into beta\n\nExample using direct strings:\n```javascript\nvar net = new brain.recurrent.LSTM();\n\nnet.train([\n  'doe, a deer, a female deer',\n  'ray, a drop of golden sun',\n  'me, a name I call myself',\n]);\n\nvar output = net.run('doe');  // ', a deer, a female deer'\n```\n\nExample using strings with inputs and outputs:\n```javascript\nvar net = new brain.recurrent.LSTM();\n\nnet.train([\n  { input: 'I feel great about the world!', output: 'happy' },\n  { input: 'The world is a terrible place!', output: 'sad' },\n]);\n\nvar output = net.run('I feel great about the world!');  // 'happy'\n```\n\n\n### Training Options\n`train()` takes a hash of options as its second argument:\n\n```javascript\nnet.train(data, {\n                            // Defaults values --> expected validation\n      iterations: 20000,    // the maximum times to iterate the training data --> number greater than 0\n      errorThresh: 0.005,   // the acceptable error percentage from training data --> number between 0 and 1\n      log: false,           // true to use console.log, when a function is supplied it is used --> Either true or a function\n      logPeriod: 10,        // iterations between logging out --> number greater than 0\n      learningRate: 0.3,    // scales with delta to effect training rate --> number between 0 and 1\n      momentum: 0.1,        // scales with next layer's change value --> number between 0 and 1\n      callback: null,       // a periodic call back that can be triggered while training --> null or function\n      callbackPeriod: 10,   // the number of iterations through the training data between callback calls --> number greater than 0\n      timeout: Infinity     // the max number of milliseconds to train for --> number greater than 0\n});\n```\n\nThe network will stop training whenever one of the two criteria is met: the training error has gone below the threshold (default `0.005`), or the max number of iterations (default `20000`) has been reached.\n\nBy default training will not let you know how its doing until the end, but set `log` to `true` to get periodic updates on the current training error of the network. The training error should decrease every time. The updates will be printed to console. If you set `log` to a function, this function will be called with the updates instead of printing to the console.\n\nThe learning rate is a parameter that influences how quickly the network trains. It's a number from `0` to `1`. If the learning rate is close to `0`, it will take longer to train. If the learning rate is closer to `1`, it will train faster, but training results may be constrained to a local minimum and perform badly on new data.(_Overfitting_) The default learning rate is `0.3`.\n\nThe momentum is similar to learning rate, expecting a value from `0` to `1` as well, but it is multiplied against the next level's change value. The default value is `0.1`\n\nAny of these training options can be passed into the constructor or passed into the `updateTrainingOptions(opts)` method and they will be saved on the network and used during the training time. If you save your network to json, these training options are saved and restored as well (except for callback and log, callback will be forgotten and log will be restored using console.log).\n\nA boolean property called `invalidTrainOptsShouldThrow` is set to `true` by default. While the option is `true`, if you enter a training option that is outside the normal range, an error will be thrown with a message about the abnormal option. When the option is set to `false`, no error will be sent, but a message will still be sent to `console.warn` with the related information.\n\n### Async Training\n`trainAsync()` takes the same arguments as train (data and options). Instead of returning the results object from training, it returns a promise that when resolved will return the training results object.\n\n```javascript\n  let net = new brain.NeuralNetwork();\n  net\n    .trainAsync(data, options)\n    .then(res => {\n      // do something with my trained network\n    })\n    .catch(handleError);\n```\nWith multiple networks you can train in parallel like this:\n\n```javascript\n  var net = new brain.NeuralNetwork();\n  var net2 = new brain.NeuralNetwork();\n\n  var p1 = net.trainAsync(data, options);\n  var p2 = net2.trainAsync(data, options);\n\n  Promise\n    .all([p1, p2])\n    .then(values => {\n      var res = values[0];\n      var res2 = values[1];\n      console.log(`net trained in ${res.iterations} and net2 trained in ${res2.iterations}`);\n      // do something super cool with my 2 trained networks\n    })\n    .catch(handleError);\n```\n\n# Methods\n### train\nThe output of `train()` is a hash of information about how the training went:\n\n```javascript\n{\n  error: 0.0039139985510105032,  // training error\n  iterations: 406                // training iterations\n}\n```\n\n# Failing\nIf the network failed to train, the error will be above the error threshold. This could happen if the training data is too noisy (most likely), the network does not have enough hidden layers or nodes to handle the complexity of the data, or it has not been trained for enough iterations.\n\nIf the training error is still something huge like `0.4` after 20000 iterations, it's a good sign that the network can't make sense of the given data.\n\n# JSON\nSerialize or load in the state of a trained network with JSON:\n\n```javascript\nvar json = net.toJSON();\nnet.fromJSON(json);\n```\n\nYou can also get a custom standalone function from a trained network that acts just like `run()`:\n\n```javascript\nvar run = net.toFunction();\nvar output = run({ r: 1, g: 0.4, b: 0 });\nconsole.log(run.toString()); // copy and paste! no need to import brain.js\n```\n\n# Options\n`NeuralNetwork()` takes a hash of options:\n\n```javascript\nvar net = new brain.NeuralNetwork({\n  activation: 'sigmoid', // activation function\n  hiddenLayers: [4],\n  learningRate: 0.6 // global learning rate, useful when training using streams\n});\n```\n\n### activation\nThis parameter lets you specify which activation function your neural network should use. There are currently four supported activation functions, **sigmoid** being the default: \n\n- [sigmoid](https://www.wikiwand.com/en/Sigmoid_function)\n- [relu](https://www.wikiwand.com/en/Rectifier_(neural_networks))\n- [leaky-relu](https://www.wikiwand.com/en/Rectifier_(neural_networks))\n- [tanh](https://theclevermachine.wordpress.com/tag/tanh-function/)\n\nHere's a table (Thanks, Wikipedia!) summarizing a plethora of activation functions — [Activation Function](https://www.wikiwand.com/en/Activation_function)\n\n### hiddenLayers\nYou can use this to specify the number of hidden layers in the network and the size of each layer. For example, if you want two hidden layers - the first with 3 nodes and the second with 4 nodes, you'd give:\n\n```\nhiddenLayers: [3, 4]\n```\n\nBy default `brain.js` uses one hidden layer with size proportionate to the size of the input array.\n\n# Streams\nThe network now has a [WriteStream](http://nodejs.org/api/stream.html#stream_class_stream_writable). You can train the network by using `pipe()` to send the training data to the network.\n\n\n### Example\nRefer to [`stream-example.js`](./examples/cli/stream-example.js) for an example on how to train the network with a stream.\n\n\n### Initialization\nTo train the network using a stream you must first create the stream by calling `net.createTrainStream()` which takes the following options:\n\n* `floodCallback()` - the callback function to re-populate the stream. This gets called on every training iteration.\n* `doneTrainingCallback(info)` - the callback function to execute when the network is done training. The `info` param will contain a hash of information about how the training went:\n\n```javascript\n{\n  error: 0.0039139985510105032,  // training error\n  iterations: 406                // training iterations\n}\n```\n\n### Transform\nUse a [Transform](http://nodejs.org/api/stream.html#stream_class_stream_transform) to coerce the data into the correct format. You might also use a Transform stream to normalize your data on the fly.\n\n# Utilities\n### `likely`\n```js\nvar likely = require('brain/likely');\nvar key = likely(input, net);\n```\nLikely example see: [simple letter detection](./examples/which-letter-simple.js)\n\n# Neural Network Types\n* [`brain.NeuralNetwork`](src/neural-network.js) - [Feedforward Neural Network](https://en.wikipedia.org/wiki/Feedforward_neural_network) with backpropagation\n* [`brain.recurrent.RNNTimeStep`](src/recurrent/rnn-time-step.js) - [Time Step Recurrent Neural Network or \"RNN\"](https://en.wikipedia.org/wiki/Recurrent_neural_network)\n* [`brain.recurrent.LSTMTimeStep`](src/recurrent/lstm-time-step.js) - [Time Step Long Short Term Memory Neural Network or \"LSTM\"](https://en.wikipedia.org/wiki/Long_short-term_memory)\n* [`brain.recurrent.GRUTimeStep`](src/recurrent/gru-time-step.js) - [Time Step Gated Recurrent Unit or \"GRU\"](https://en.wikipedia.org/wiki/Gated_recurrent_unit)\n* [`brain.recurrent.RNN`](src/recurrent/rnn.js) - [Recurrent Neural Network or \"RNN\"](https://en.wikipedia.org/wiki/Recurrent_neural_network)\n* [`brain.recurrent.LSTM`](src/recurrent/lstm.js) - [Long Short Term Memory Neural Network or \"LSTM\"](https://en.wikipedia.org/wiki/Long_short-term_memory)\n* [`brain.recurrent.GRU`](src/recurrent/gru.js) - [Gated Recurrent Unit or \"GRU\"](https://en.wikipedia.org/wiki/Gated_recurrent_unit)\n\n### Why different Neural Network Types?\nDifferent neural nets do different things well. For example:\n* A Feedforward Neural Network can classify simple things very well, but it has no memory of previous actions and has infinite variation of results.\n* A Time Step Recurrent Neural Network _remembers_, and can predict future values.\n* A Recurrent Neural Network _remembers_, and has a finite set of results.\n\n# Get Involved!\n### Issues\nIf you have an issue, either a bug or a feature you think would benefit your project let us know and we will do our best.\n\nCreate issues [here](https://github.com/BrainJS/brain.js/issues) and follow the template.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C52C:349C76:178E40:5E03EB:6AB92D12"},"text_sha256":"8a0070c28e72a2e5cbdbc89516fe48adaab95860a88f40d5dfed6ba2c99ab0ee"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1610","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F8:6E5BD:17B0030:1BD685E:6AB92D14"},"commit":{"sha":"7c9db32d9c3894ae494e6497eb7b7a9ff28a6999","url":"https://github.com/BrainJS/brain.js/commit/7c9db32d9c3894ae494e6497eb7b7a9ff28a6999","date":"2024-07-09T16:06:13Z","author_date":"2024-07-09T16:06:13Z","committer_date":"2024-07-09T16:06:13Z","tree_sha":"0775302eadefa2faffc6c07515bcabe13597ab48","message_first_line":"chore: Build tasks"},"tree_request_status":200,"tree_rate":{"github_remaining":"1609","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D6:3BE445:17A8264:1BCE99A:6AB92D14"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27757,"blob_sha":"2d07e04cb40814b05f65f145393907aa0d2ae591","priority":0}],"documents":[{"path":"README.md","size":27757,"blob_sha":"2d07e04cb40814b05f65f145393907aa0d2ae591","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"https://cdn.rawgit.com/harthur-org/brain.js/ff595242/logo.svg\" alt=\"Logo\" width=200px/>\n<\/p>\n\n# brain.js\n\nGPU accelerated Neural networks in JavaScript for Browsers and Node.js\n\n<p style=\"text-align: center\" align=\"center\">\n\n  <a href=\"https://brain.js.org\"><img src=\"https://img.shields.io/website?up_message=brain.js.org&url=https%3A%2F%2Fbrain.js.org\" alt=\"GitHub\"><\/a>\n  [![npm](https://img.shields.io/npm/dt/brain.js.svg?style=flat-square)](https://npmjs.com/package/brain.js) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)\n  [![Backers on Open Collective](https://opencollective.com/brainjs/backers/badge.svg)](#backers)\n  [![Sponsors on Open Collective](https://opencollective.com/brainjs/sponsors/badge.svg)](#sponsors)\n  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/brain-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n  [![Slack](https://slack.bri.im/badge.svg)](https://slack.bri.im)\n  ![CI](https://github.com/BrainJS/brain.js/workflows/CI/badge.svg)\n  [![codecov](https://codecov.io/gh/BrainJS/brain.js/branch/master/graph/badge.svg?token=3SJIBJ1679)](https://codecov.io/gh/BrainJS/brain.js)\n  <a href=\"https://twitter.com/brainjsfnd\"><img src=\"https://img.shields.io/twitter/follow/brainjsfnd?label=Twitter&style=social\" alt=\"Twitter\"><\/a>\n\n  [![NPM](https://nodei.co/npm/brain.js.png?compact=true)](https://nodei.co/npm/brain.js/)\n\n<\/p>\n\n## About\n\n`brain.js` is a GPU accelerated library for [Neural Networks](http://en.wikipedia.org/wiki/Artificial_neural_network) written in JavaScript.\n\n:bulb: This is a continuation of the [**harthur/brain**](https://github.com/harthur/brain), which is not maintained anymore. [More info](https://github.com/harthur/brain/issues/72)\n\n## Table of Contents\n\n- [Installation and Usage](#Installation-and-Usage)\n  - [NPM](#NPM)\n  - [CDN](#CDN)\n  - [Download](#Download)\n  - [Installation note](#Installation-note)\n  - [Building from source](#Building-from-source)\n- [Examples](#examples)\n  - [More Examples](#more-examples)\n- [Training](#training)\n  - [Data format](#data-format)\n    - [For training with NeuralNetwork](#for-training-with-neuralnetwork)\n    - [For training with `RNNTimeStep`, `LSTMTimeStep` and `GRUTimeStep`](#for-training-with-rnntimestep-lstmtimestep-and-grutimestep)\n    - [For training with `RNN`, `LSTM` and `GRU`](#for-training-with-rnn-lstm-and-gru)\n    - [For training with `AE`](#for-training-with-ae)\n  - [Training Options](#training-options)\n  - [Async Training](#async-training)\n  - [Cross Validation](#cross-validation)\n  - [Train Stream](#streams)\n- [Methods](#methods)\n  - [train](#traintrainingdata---trainingstatus)\n  - [run](#runinput---prediction)\n  - [forecast](#forecastinput-count---predictions)\n- [Failing](#failing)\n- [JSON](#json)\n- [Standalone Function](#standalone-function)\n- [Options](#options)\n  - [activation](#activation)\n  - [hiddenLayers](#hiddenlayers)\n- [Streams](#streams)\n- [Utilities](#utilities)\n  - [`likely`](#likely)\n  - [`toSVG`](#toSVG)\n- [Neural Network Types](#neural-network-types)\n  - [Why different Neural Network Types?](#why-different-neural-network-types)\n\n## Installation and Usage\n\n### NPM\n\nIf you can install `brain.js` with [npm](http://npmjs.org):\n\n```bash\nnpm install brain.js\n```\n\n### CDN\n\n```html\n<script src=\"//unpkg.com/brain.js\"><\/script>\n```\n\n### Download\n\n[Download the latest brain.js for browser](https://unpkg.com/brain.js)\n\n### Installation note\n\n`Brain.js` depends on a native module [`headless-gl`](https://www.npmjs.com/package/headless-gl) for GPU support. In most cases installing `brain.js` from npm should just work. However, if you run into problems, this means prebuilt binaries are not able to download from GitHub repositories and you might need to build it yourself.\n\n#### Building from source\n\nPlease make sure the following dependencies are installed and up to date and then run:\n\n```bash\nnpm rebuild\n```\n\n##### System dependencies\n\n###### Mac OS X\n\n- [A supported version of Python](https://devguide.python.org/versions)\n- [XCode](https://developer.apple.com/xcode/)\n\n###### Ubuntu/Debian\n\n- [A supported version of Python](https://devguide.python.org/versions)\n- A GNU C++ environment (available via the `build-essential` package on `apt`)\n- [libxi-dev](http://www.x.org/wiki/)\n- Working and up-to-date OpenGL drivers\n- [GLEW](http://glew.sourceforge.net/)\n- [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)\n\n```bash\nsudo apt-get install -y build-essential libglew-dev libglu1-mesa-dev libxi-dev pkg-config\n```\n\n###### Windows\n\n- [A supported version of Python](https://devguide.python.org/versions)  __See:__ https://apps.microsoft.com/store/search/python\n- [Microsoft Visual Studio Build Tools 2022](https://visualstudio.microsoft.com/downloads)\n- run in cmd: `npm config set msvs_version 2022`  __Note: This no longer works in modern versions of npm.__\n- run in cmd: `npm config set python python3`  __Note: This no longer works in modern versions of npm.__\n\n\\* If you are using `Build Tools 2017` then run `npm config set msvs_version 2017`  __Note: This no longer works in modern versions of npm.__\n\n## Examples\n\nHere's an example showcasing how to approximate the XOR function using `brain.js`:\nmore info on config [here](https://github.com/BrainJS/brain.js/blob/develop/src/neural-network.js#L31).\n\n:bulb: [A fun and practical introduction to Brain.js](https://scrimba.com/g/gneuralnetworks)\n\n```javascript\n// provide optional config object (or undefined). Defaults shown.\nconst config = {\n  binaryThresh: 0.5,\n  hiddenLayers: [3], // array of ints for the sizes of the hidden layers in the network\n  activation: 'sigmoid', // supported activation types: ['sigmoid', 'relu', 'leaky-relu', 'tanh'],\n  leakyReluAlpha: 0.01, // supported for activation type 'leaky-relu'\n};\n\n// create a simple feed-forward neural network with backpropagation\nconst net = new brain.NeuralNetwork(config);\n\nnet.train([\n  { input: [0, 0], output: [0] },\n  { input: [0, 1], output: [1] },\n  { input: [1, 0], output: [1] },\n  { input: [1, 1], output: [0] },\n]);\n\nconst output = net.run([1, 0]); // [0.987]\n```\n\nor\nmore info on config [here](https://github.com/BrainJS/brain.js/blob/develop/src/recurrent/rnn.js#L726).\n\n```javascript\n// provide optional config object, defaults shown.\nconst config = {\n  inputSize: 20,\n  inputRange: 20,\n  hiddenLayers: [20, 20],\n  outputSize: 20,\n  learningRate: 0.01,\n  decayRate: 0.999,\n};\n\n// create a simple recurrent neural network\nconst net = new brain.recurrent.RNN(config);\n\nnet.train([\n  { input: [0, 0], output: [0] },\n  { input: [0, 1], output: [1] },\n  { input: [1, 0], output: [1] },\n  { input: [1, 1], output: [0] },\n]);\n\nlet output = net.run([0, 0]); // [0]\noutput = net.run([0, 1]); // [1]\noutput = net.run([1, 0]); // [1]\noutput = net.run([1, 1]); // [0]\n```\n\nHowever, there is no reason to use a neural network to figure out XOR. (-: So, here is a more involved, realistic example:\n[Demo: training a neural network to recognize color contrast](https://brain.js.org/).\n\n## More Examples\n\n[Brain.js Examples Repo](https://github.com/BrainJS/brain.js-examples)\n\nYou can check out this fantastic screencast, which explains how to train a simple neural network using a real-world dataset: [How to create a neural network in the browser using Brain.js](https://scrimba.com/c/c36zkcb).\n\n## Training\n\nUse `train()` to train the network with an array of training data. The network has to be trained with all the data in bulk in one call to `train()`. More training patterns will probably take longer to train, but will usually result in a network better at classifying new patterns.\n\n### Note\n\nTraining is computationally expensive, so you should try to train the network offline (or on a Worker) and use the `toFunction()` or `toJSON()` options to plug the pre-trained network into your website.\n\n### Data format\n\n#### For training with `NeuralNetwork`\n\nEach training pattern should have an `input` and an `output`, both of which can be either an array of numbers from `0` to `1` or a hash of numbers from `0` to `1`. For the [color contrast demo](https://brain.js.org/) it looks something like this:\n\n```javascript\nconst net = new brain.NeuralNetwork();\n\nnet.train([\n  { input: { r: 0.03, g: 0.7, b: 0.5 }, output: { black: 1 } },\n  { input: { r: 0.16, g: 0.09, b: 0.2 }, output: { white: 1 } },\n  { input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 } },\n]);\n\nconst output = net.run({ r: 1, g: 0.4, b: 0 }); // { white: 0.99, black: 0.002 }\n```\n\nHere's another variation of the above example. (_Note_ that input objects do not need to be similar.)\n\n```javascript\nnet.train([\n  { input: { r: 0.03, g: 0.7 }, output: { black: 1 } },\n  { input: { r: 0.16, b: 0.2 }, output: { white: 1 } },\n  { input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 } },\n]);\n\nconst output = net.run({ r: 1, g: 0.4, b: 0 }); // { white: 0.81, black: 0.18 }\n```\n\n#### For training with `RNNTimeStep`, `LSTMTimeStep` and `GRUTimeStep`\n\nEach training pattern can either:\n\n- Be an array of numbers\n- Be an array of arrays of numbers\n\nExample using an array of numbers:\n\n```javascript\nconst net = new brain.recurrent.LSTMTimeStep();\n\nnet.train([[1, 2, 3]]);\n\nconst output = net.run([1, 2]); // 3\n```\n\nExample using an array of arrays of numbers:\n\n```javascript\nconst net = new brain.recurrent.LSTMTimeStep({\n  inputSize: 2,\n  hiddenLayers: [10],\n  outputSize: 2,\n});\n\nnet.train([\n  [1, 3],\n  [2, 2],\n  [3, 1],\n]);\n\nconst output = net.run([\n  [1, 3],\n  [2, 2],\n]); // [3, 1]\n```\n\n#### For training with `RNN`, `LSTM` and `GRU`\n\nEach training pattern can either:\n\n- Be an array of values\n- Be a string\n- Have an `input` and an `output`\n  - Either of which can have an array of values or a string\n\nCAUTION: When using an array of values, you can use ANY value, however, the values are represented in the neural network by a single input. So the more _distinct values_ has _the larger your input layer_. If you have a hundreds, thousands, or millions of floating point values _THIS IS NOT THE RIGHT CLASS FOR THE JOB_. Also, when deviating from strings, this gets into beta\n\nExample using direct strings:\nHello World Using Brainjs\n```javascript\n\n  const net = new brain.recurrent.LSTM();\n\n  net.train(['I am brainjs, Hello World!']);\n\n  const output = net.run('I am brainjs');\n  alert(output);\n```\n\n```javascript\nconst net = new brain.recurrent.LSTM();\n\nnet.train([\n  'doe, a deer, a female deer',\n  'ray, a drop of golden sun',\n  'me, a name I call myself',\n]);\n\nconst output = net.run('doe'); // ', a deer, a female deer'\n```\n\nExample using strings with inputs and outputs:\n\n```javascript\nconst net = new brain.recurrent.LSTM();\n\nnet.train([\n  { input: 'I feel great about the world!', output: 'happy' },\n  { input: 'The world is a terrible place!', output: 'sad' },\n]);\n\nconst output = net.run('I feel great about the world!'); // 'happy'\n```\n\n#### For training with `AE`\n\nEach training pattern can either:\n\n- Be an array of numbers\n- Be an array of arrays of numbers\n\nTraining an autoencoder to compress the values of a XOR calculation:\n\n```javascript\nconst net = new brain.AE(\n  {\n    hiddenLayers: [ 5, 2, 5 ]\n  }\n);\n\nnet.train([\n  [ 0, 0, 0 ],\n  [ 0, 1, 1 ],\n  [ 1, 0, 1 ],\n  [ 1, 1, 0 ]\n]);\n```\n\nEncoding/decoding:\n\n```javascript\nconst input = [ 0, 1, 1 ];\n\nconst encoded = net.encode(input);\nconst decoded = net.decode(encoded);\n```\n\nDenoise noisy data:\n\n```javascript\nconst noisyData = [ 0, 1, 0 ];\n\nconst data = net.denoise(noisyData);\n```\n\nTest for anomalies in data samples:\n\n```javascript\nconst shouldBeFalse = net.includesAnomalies([0, 1, 1]);\nconst shouldBeTrue = net.includesAnomalies([0, 1, 0]);\n```\n\n### Training Options\n\n`train()` takes a hash of options as its second argument:\n\n```javascript\nnet.train(data, {\n  // Defaults values --> expected validation\n  iterations: 20000, // the maximum times to iterate the training data --> number greater than 0\n  errorThresh: 0.005, // the acceptable error percentage from training data --> number between 0 and 1\n  log: false, // true to use console.log, when a function is supplied it is used --> Either true or a function\n  logPeriod: 10, // iterations between logging out --> number greater than 0\n  learningRate: 0.3, // scales with delta to effect training rate --> number between 0 and 1\n  momentum: 0.1, // scales with next layer's change value --> number between 0 and 1\n  callback: null, // a periodic call back that can be triggered while training --> null or function\n  callbackPeriod: 10, // the number of iterations through the training data between callback calls --> number greater than 0\n  timeout: number, // the max number of milliseconds to train for --> number greater than 0. Default --> Infinity\n});\n```\n\nThe network will stop training whenever one of the two criteria is met: the training error has gone below the threshold (default `0.005`), or the max number of iterations (default `20000`) has been reached.\n\nBy default, training will not let you know how it's doing until the end, but set `log` to `true` to get periodic updates on the current training error of the network. The training error should decrease every time. The updates will be printed to the console. If you set `log` to a function, this function will be called with the updates instead of printing to the console.\nHowever, if you want to use the values of the updates in your own output, the `callback` can be set to a function to do so instead.\n\nThe learning rate is a parameter that influences how quickly the network trains. It's a number from `0` to `1`. If the learning rate is close to `0`, it will take longer to train. If the learning rate is closer to `1`, it will train faster, but training results may be constrained to a local minimum and perform badly on new data.(_Overfitting_) The default learning rate is `0.3`.\n\nThe momentum is similar to learning rate, expecting a value from `0` to `1` as well, but it is multiplied against the next level's change value. The default value is `0.1`\n\nAny of these training options can be passed into the constructor or passed into the `updateTrainingOptions(opts)` method and they will be saved on the network and used during the training time. If you save your network to json, these training options are saved and restored as well (except for callback and log, callback will be forgotten and log will be restored using console.log).\n\nA boolean property called `invalidTrainOptsShouldThrow` is set to `true` by default. While the option is `true`, if you enter a training option that is outside the normal range, an error will be thrown with a message about the abnormal option. When the option is set to `false`, no error will be sent, but a message will still be sent to `console.warn` with the related information.\n\n### Async Training\n\n`trainAsync()` takes the same arguments as train (data and options). Instead of returning the results object from training, it returns a promise that when resolved will return the training results object.  Does NOT work with:\n* `brain.recurrent.RNN`\n* `brain.recurrent.GRU`\n* `brain.recurrent.LSTM`\n* `brain.recurrent.RNNTimeStep`\n* `brain.recurrent.GRUTimeStep`\n* `brain.recurrent.LSTMTimeStep`\n\n```javascript\nconst net = new brain.NeuralNetwork();\nnet\n  .trainAsync(data, options)\n  .then((res) => {\n    // do something with my trained network\n  })\n  .catch(handleError);\n```\n\nWith multiple networks you can train in parallel like this:\n\n```javascript\nconst net = new brain.NeuralNetwork();\nconst net2 = new brain.NeuralNetwork();\n\nconst p1 = net.trainAsync(data, options);\nconst p2 = net2.trainAsync(data, options);\n\nPromise.all([p1, p2])\n  .then((values) => {\n    const res = values[0];\n    const res2 = values[1];\n    console.log(\n      `net trained in ${res.iterations} and net2 trained in ${res2.iterations}`\n    );\n    // do something super cool with my 2 trained networks\n  })\n  .catch(handleError);\n```\n\n### Cross Validation\n\n[Cross Validation](<https://en.wikipedia.org/wiki/Cross-validation_(statistics)>) can provide a less fragile way of training on larger data sets. The brain.js api provides Cross Validation in this example:\n\n```js\nconst crossValidate = new brain.CrossValidate(() => new brain.NeuralNetwork(networkOptions));\ncrossValidate.train(data, trainingOptions, k); //note k (or KFolds) is optional\nconst json = crossValidate.toJSON(); // all stats in json as well as neural networks\nconst net = crossValidate.toNeuralNetwork(); // get top performing net out of `crossValidate`\n\n// optionally later\nconst json = crossValidate.toJSON();\nconst net = crossValidate.fromJSON(json);\n```\n\nUse `CrossValidate` with these classes:\n\n- `brain.NeuralNetwork`\n- `brain.RNNTimeStep`\n- `brain.LSTMTimeStep`\n- `brain.GRUTimeStep`\n\nAn example of using cross validate can be found in [cross-validate.ts](https://github.com/BrainJS/brain.js-examples/blob/main/src/cross-validate.ts)\n\n## Methods\n\n### `train(trainingData)` -> trainingStatus\n\nThe output of `train()` is a hash of information about how the training went:\n\n```javascript\n{\n  error: 0.0039139985510105032,  // training error\n  iterations: 406                // training iterations\n}\n```\n\n### `run(input)` -> prediction\n\nSupported on classes:\n\n- `brain.NeuralNetwork`\n- `brain.NeuralNetworkGPU` -> All the functionality of `brain.NeuralNetwork` but, ran on GPU (via gpu.js in WebGL2, WebGL1, or fallback to CPU)\n- `brain.recurrent.RNN`\n- `brain.recurrent.LSTM`\n- `brain.recurrent.GRU`\n- `brain.recurrent.RNNTimeStep`\n- `brain.recurrent.LSTMTimeStep`\n- `brain.recurrent.GRUTimeStep`\n\nExample:\n\n```js\n// feed forward\nconst net = new brain.NeuralNetwork();\nnet.fromJSON(json);\nnet.run(input);\n\n// time step\nconst net = new brain.LSTMTimeStep();\nnet.fromJSON(json);\nnet.run(input);\n\n// recurrent\nconst net = new brain.LSTM();\nnet.fromJSON(json);\nnet.run(input);\n```\n\n### `forecast(input, count)` -> predictions\n\nAvailable with the following classes. Outputs a array of predictions. Predictions being a continuation of the inputs.\n\n- `brain.recurrent.RNNTimeStep`\n- `brain.recurrent.LSTMTimeStep`\n- `brain.recurrent.GRUTimeStep`\n\nExample:\n\n```js\nconst net = new brain.LSTMTimeStep();\nnet.fromJSON(json);\nnet.forecast(input, 3);\n```\n\n### `toJSON() -> json`\n\nSerialize neural network to json\n\n### `fromJSON(json)`\n\nDeserialize neural network from json\n\n## Failing\n\nIf the network failed to train, the error will be above the error threshold. This could happen if the training data is too noisy (most likely), the network does not have enough hidden layers or nodes to handle the complexity of the data, or it has not been trained for enough iterations.\n\nIf the training error is still something huge like `0.4` after 20000 iterations, it's a good sign that the network can't make sense of the given data.\n\n### RNN, LSTM, or GRU Output too short or too long\n\nThe instance of the net's property `maxPredictionLength` (default 100) can be set to adjust the output of the net;\n\nExample:\n\n```js\nconst net = new brain.recurrent.LSTM();\n\n// later in code, after training on a few novels, write me a new one!\nnet.maxPredictionLength = 1000000000; // Be careful!\nnet.run('Once upon a time');\n```\n\n## JSON\n\nSerialize or load in the state of a trained network with JSON:\n\n```javascript\nconst json = net.toJSON();\nnet.fromJSON(json);\n```\n\n## Standalone Function\n\nYou can also get a custom standalone function from a trained network that acts just like `run()`:\n\n```javascript\nconst run = net.toFunction();\nconst output = run({ r: 1, g: 0.4, b: 0 });\nconsole.log(run.toString()); // copy and paste! no need to import brain.js\n```\n\n## Options\n\n`NeuralNetwork()` takes a hash of options:\n\n```javascript\nconst net = new brain.NeuralNetwork({\n  activation: 'sigmoid', // activation function\n  hiddenLayers: [4],\n  learningRate: 0.6, // global learning rate, useful when training using streams\n});\n```\n\n### activation\n\nThis parameter lets you specify which activation function your neural network should use. There are currently four supported activation functions, **sigmoid** being the default:\n\n- [sigmoid](https://www.wikiwand.com/en/Sigmoid_function)\n- [relu](<https://www.wikiwand.com/en/Rectifier_(neural_networks)>)\n- [leaky-relu](<https://www.wikiwand.com/en/Rectifier_(neural_networks)>)\n  - related option - 'leakyReluAlpha' optional number, defaults to 0.01\n- [tanh](https://theclevermachine.wordpress.com/tag/tanh-function/)\n\nHere's a table (thanks, Wikipedia!) summarizing a plethora of activation functions — [Activation Function](https://www.wikiwand.com/en/Activation_function)\n\n### hiddenLayers\n\nYou can use this to specify the number of hidden layers in the network and the size of each layer. For example, if you want two hidden layers - the first with 3 nodes and the second with 4 nodes, you'd give:\n\n```js\nhiddenLayers: [3, 4];\n```\n\nBy default `brain.js` uses one hidden layer with size proportionate to the size of the input array.\n\n## Streams\n\nUse https://www.npmjs.com/package/train-stream to stream data to a NeuralNetwork\n\n## Utilities\n\n### `likely`\n\n```js\nconst likely = require('brain/likely');\nconst key = likely(input, net);\n```\n\nLikely example see: [simple letter detection](https://github.com/BrainJS/brain.js-examples/blob/main/src/which-letter-simple.ts)\n\n### `toSVG`\n\n```js\n<script src=\"../../src/utilities/svg.js\"><\/script>\n```\n\nRenders the network topology of a feedforward network\n\n```js\ndocument.getElementById('result').innerHTML = brain.utilities.toSVG(\n  network,\n  options\n);\n```\n\ntoSVG example see: [network rendering](https://github.com/BrainJS/brain.js-examples/blob/main/src/rendering-svg/index.html)\n\nThe user interface used:\n![screenshot1](https://user-images.githubusercontent.com/43925925/48969024-e526ed80-f000-11e8-85bd-e10967cfaee2.png)\n\n## Neural Network Types\n\n- [`brain.NeuralNetwork`](src/neural-network.ts) - [Feedforward Neural Network](https://en.wikipedia.org/wiki/Feedforward_neural_network) with backpropagation\n- [`brain.NeuralNetworkGPU`](src/neural-network-gpu.ts) - [Feedforward Neural Network](https://en.wikipedia.org/wiki/Feedforward_neural_network) with backpropagation, GPU version\n- [`brain.AE`](src/autoencoder.ts) - [Autoencoder or \"AE\"](https://en.wikipedia.org/wiki/Autoencoder) with backpropogation and GPU support\n- [`brain.recurrent.RNNTimeStep`](src/recurrent/rnn-time-step.ts) - [Time Step Recurrent Neural Network or \"RNN\"](https://en.wikipedia.org/wiki/Recurrent_neural_network)\n- [`brain.recurrent.LSTMTimeStep`](src/recurrent/lstm-time-step.ts) - [Time Step Long Short Term Memory Neural Network or \"LSTM\"](https://en.wikipedia.org/wiki/Long_short-term_memory)\n- [`brain.recurrent.GRUTimeStep`](src/recurrent/gru-time-step.ts) - [Time Step Gated Recurrent Unit or \"GRU\"](https://en.wikipedia.org/wiki/Gated_recurrent_unit)\n- [`brain.recurrent.RNN`](src/recurrent/rnn.ts) - [Recurrent Neural Network or \"RNN\"](https://en.wikipedia.org/wiki/Recurrent_neural_network)\n- [`brain.recurrent.LSTM`](src/recurrent/lstm.ts) - [Long Short Term Memory Neural Network or \"LSTM\"](https://en.wikipedia.org/wiki/Long_short-term_memory)\n- [`brain.recurrent.GRU`](src/recurrent/gru.ts) - [Gated Recurrent Unit or \"GRU\"](https://en.wikipedia.org/wiki/Gated_recurrent_unit)\n- [`brain.FeedForward`](src/feed-forward.ts) - [Highly Customizable Feedforward Neural Network](https://en.wikipedia.org/wiki/Feedforward_neural_network) with backpropagation\n- [`brain.Recurrent`](src/recurrent.ts) - [Highly Customizable Recurrent Neural Network](https://en.wikipedia.org/wiki/Recurrent_neural_network) with backpropagation\n\n### Why different Neural Network Types\n\nDifferent neural nets do different things well. For example:\n\n- A Feedforward Neural Network can classify simple things very well, but it has no memory of previous actions and has infinite variation of results.\n- A Time Step Recurrent Neural Network _remembers_, and can predict future values.\n- A Recurrent Neural Network _remembers_, and has a finite set of results.\n\n## Get Involved\n\n### W3C machine learning standardization process\n\nIf you are a developer or if you just care about how ML API should look like - please take a part and join W3C community and share your opinions or simply support opinions you like or agree with.\n\nBrain.js is a widely adopted open source machine learning library in the javascript world. There are several reasons for it, but most notable is **simplicity of usage while not sacrificing performance**.\nWe would like to keep it also simple to learn, simple to use and performant when it comes to W3C standard. We think that current brain.js API is quite close to what we could expect to become a standard.\nAnd since supporting doesn't require much effort and still can make a huge difference feel free to join W3C community group and support us with brain.js like API.\n\nGet involved into W3C machine learning ongoing standardization process [here](https://www.w3.org/community/webmachinelearning/).\nYou can also join our open discussion about standardization [here](https://github.com/BrainJS/brain.js/issues/337).\n\n## Issues\n\nIf you have an issue, either a bug or a feature you think would benefit your project let us know and we will do our best.\n\nCreate issues [here](https://github.com/BrainJS/brain.js/issues) and follow the template.\n\n### brain.js.org\n\nSource for `brain.js.org` is available at [Brain.js.org Repository](https://github.com/BrainJS/brain.js.org). Built using awesome `vue.js` & `bulma`. Contributions are always welcome.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](/.github/CONTRIBUTING.md)].\n<a href=\"https://github.com/BrainJS/brain.js/graphs/contributors\"><img src=\"https://opencollective.com/brainjs/contributors.svg?width=890&button=false\" /><\/a>\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/brainjs#backer)]\n\n<a href=\"https://opencollective.com/brainjs#backers\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/backers.svg?width=890\"><\/a>\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/brainjs#sponsor)]\n\n<a href=\"https://opencollective.com/brainjs/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/brainjs/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/brainjs/sponsor/9/avatar.svg\"><\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6ADC:3EACB:17C06A:5E39F1:6AB92D14"},"text_sha256":"b653d2b5e52db549d806ad3c9bffaee790b6660f4665cf4cb8107aa97e93d1ed"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"meijieru/crnn.pytorch","input_row":{"repository":"meijieru/crnn.pytorch","url":"https://github.com/meijieru/crnn.pytorch","name":"crnn.pytorch","owner":"meijieru","description":"Convolutional recurrent network in pytorch","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2495,"issues":239,"created_at":"2017-02-27T09:26:06Z","updated_at":"2026-09-17T07:15:25Z","first_commit_at":"2017-02-27T09:27:39Z","last_commit_at":"2024-09-19T06:50:04Z","activity_months":90.700000000000003,"ai_ml_match_topics":"neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:49:57.624Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"meijieru/crnn.pytorch","visibility":"public","created_at":"2017-02-27T09:26:06Z","updated_at":"2026-09-17T07:15:25Z","private":false,"fork":false,"archived":false,"stargazers_count":2495,"open_issues_count":103,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1608","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CD:280FBC:17D470A:1BFB117:6AB92D15"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1607","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:17A837E:1BCEAE5:6AB92D16"},"commit":{"sha":"ab61ff13c204a03d08b2836f39688c851f50fb12","url":"https://github.com/meijieru/crnn.pytorch/commit/ab61ff13c204a03d08b2836f39688c851f50fb12","date":"2017-09-10T05:59:09Z","author_date":"2017-09-10T05:59:09Z","committer_date":"2017-09-10T05:59:09Z","tree_sha":"3dca9f4ae34d88ee1d1def17100eda01f86ecd7e","message_first_line":"Merge pull request #61 from Weihnachtswurst/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1606","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:1888973:1CB0969:6AB92D16"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1277,"blob_sha":"b899093317e2608a933075d46d8a163f2811514f","priority":0}],"documents":[{"path":"README.md","size":1277,"blob_sha":"b899093317e2608a933075d46d8a163f2811514f","priority":0,"status":200,"text":"Convolutional Recurrent Neural Network\n======================================\n\nThis software implements the Convolutional Recurrent Neural Network (CRNN) in pytorch.\nOrigin software could be found in [crnn](https://github.com/bgshih/crnn)\n\nRun demo\n--------\nA demo program can be found in ``src/demo.py``. Before running the demo, download a pretrained model\nfrom [Baidu Netdisk](https://pan.baidu.com/s/1pLbeCND) or [Dropbox](https://www.dropbox.com/s/dboqjk20qjkpta3/crnn.pth?dl=0). \nThis pretrained model is converted from auther offered one by ``tool``.\nPut the downloaded model file ``crnn.pth`` into directory ``data/``. Then launch the demo by:\n\n    python demo.py\n\nThe demo reads an example image and recognizes its text content.\n\nExample image:\n![Example Image](./data/demo.png)\n\nExpected output:\n    loading pretrained model from ./data/crnn.pth\n    a-----v--a-i-l-a-bb-l-ee-- => available\n\nDependence\n----------\n* [warp_ctc_pytorch](https://github.com/SeanNaren/warp-ctc/tree/pytorch_bindings/pytorch_binding)\n* lmdb\n\nTrain a new model\n-----------------\n1. Construct dataset following origin guide. For training with variable length, please sort the image according to the text length.\n2. ``python crnn_main.py [--param val]``. Explore ``crnn_main.py`` for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E74:35999:17A69E:5E2137:6AB92D16"},"text_sha256":"255b07aef2ad22e9402d7baffd1aa9d072c3c84711f9d930a32afe1078edaab9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1605","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0890:74E6D:181B1C3:1C43241:6AB92D17"},"commit":{"sha":"3cc7904c5ba20b18fcdc2d02ac2b24a9be9eafaf","url":"https://github.com/meijieru/crnn.pytorch/commit/3cc7904c5ba20b18fcdc2d02ac2b24a9be9eafaf","date":"2024-09-19T06:50:04Z","author_date":"2024-09-19T06:50:04Z","committer_date":"2024-09-19T06:50:04Z","tree_sha":"de4da0fd47c02a027517f76667414d0f4c210c6f","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1604","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:17ED0A2:1C1504B:6AB92D17"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1861,"blob_sha":"a55ac794f6ee5bd1d46661cae5f48aece7ae51a9","priority":0}],"documents":[{"path":"README.md","size":1861,"blob_sha":"a55ac794f6ee5bd1d46661cae5f48aece7ae51a9","priority":0,"status":200,"text":"Convolutional Recurrent Neural Network\n======================================\n\nThis software implements the Convolutional Recurrent Neural Network (CRNN) in pytorch.\nOrigin software could be found in [crnn](https://github.com/bgshih/crnn)\n\nRun demo\n--------\nA demo program can be found in ``demo.py``. Before running the demo, download a pretrained model\nfrom [Baidu Netdisk](https://pan.baidu.com/s/1pLbeCND) or [Dropbox](https://www.dropbox.com/s/dboqjk20qjkpta3/crnn.pth?dl=0). \nThis pretrained model is converted from auther offered one by ``tool``.\nPut the downloaded model file ``crnn.pth`` into directory ``data/``. Then launch the demo by:\n\n    python demo.py\n\nThe demo reads an example image and recognizes its text content.\n\nExample image:\n![Example Image](./data/demo.png)\n\nExpected output:\n    loading pretrained model from ./data/crnn.pth\n    a-----v--a-i-l-a-bb-l-ee-- => available\n\nDependence\n----------\n* [warp_ctc_pytorch](https://github.com/SeanNaren/warp-ctc/tree/pytorch_bindings/pytorch_binding)\n* lmdb\n\nTrain a new model\n-----------------\n1. Construct dataset following [origin guide](https://github.com/bgshih/crnn#train-a-new-model). If you want to train with variable length images (keep the origin ratio for example), please modify the `tool/create_dataset.py` and sort the image according to the text length.\n2. Execute ``python train.py --adadelta --trainRoot {train_path} --valRoot {val_path} --cuda``. Explore ``train.py`` for details.\n\nCite\n----\n```tex\n@article{shi2016end,\n  title={An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition},\n  author={Shi, Baoguang and Bai, Xiang and Yao, Cong},\n  journal={IEEE transactions on pattern analysis and machine intelligence},\n  volume={39},\n  number={11},\n  pages={2298--2304},\n  year={2016},\n  publisher={IEEE}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:181996:5E9372:6AB92D17"},"text_sha256":"5fd464619b5fead75309e0fe81364d5fc569b0f07e15f85fed59318feb2fab5c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Maratyszcza/NNPACK","input_row":{"repository":"Maratyszcza/NNPACK","url":"https://github.com/Maratyszcza/NNPACK","name":"NNPACK","owner":"Maratyszcza","description":"Acceleration package for neural networks on multi-core CPUs","language":"C","license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License","license_osi_approved":"true","stars":1711,"issues":197,"created_at":"2016-03-21T17:47:34Z","updated_at":"2026-08-29T23:33:21Z","first_commit_at":"2016-03-24T18:33:31Z","last_commit_at":"2023-02-01T23:35:35Z","activity_months":82.299999999999997,"ai_ml_match_topics":"neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:00.019Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Maratyszcza/NNPACK","visibility":"public","created_at":"2016-03-21T17:47:34Z","updated_at":"2026-08-29T23:33:21Z","private":false,"fork":false,"archived":false,"stargazers_count":1711,"open_issues_count":49,"license_spdx_id":"BSD-2-Clause","license_name":"BSD 2-Clause \"Simplified\" License"},"error":"","rate":{"github_remaining":"1603","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0862:7307A:17CFF38:1BF777E:6AB92D18"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1602","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0828:3C4024:1818FC0:1C40D4A:6AB92D18"},"commit":{"sha":"3eb0d453662d05a708f43b108bed9e17b705383e","url":"https://github.com/Maratyszcza/NNPACK/commit/3eb0d453662d05a708f43b108bed9e17b705383e","date":"2018-05-22T05:21:50Z","author_date":"2018-05-22T05:21:50Z","committer_date":"2018-05-22T05:21:50Z","tree_sha":"e58a6e079e8bafb78335ddb320ad52d6053ef37f","message_first_line":"Specify non-executable stack for assembly files"},"tree_request_status":200,"tree_rate":{"github_remaining":"1601","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D0:72BD3:18107B6:1C383B1:6AB92D18"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9959,"blob_sha":"faf881e022c89f231937e792635fda4cb428d999","priority":0}],"documents":[{"path":"README.md","size":9959,"blob_sha":"faf881e022c89f231937e792635fda4cb428d999","priority":0,"status":200,"text":"<p align=\"center\"><img src=\"https://maratyszcza.github.io/NNPACK/NNPACK.png\" alt=\"NNPACK Logo\" title=\"NNPACK\"/><\/p>\n\n# NNPACK\n\n[![BSD (2 clause) License](https://img.shields.io/badge/License-BSD%202--Clause%20%22Simplified%22%20License-blue.svg)](https://github.com/Maratyszcza/NNPACK/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/Maratyszcza/NNPACK.svg)](https://travis-ci.org/Maratyszcza/NNPACK)\n\nNNPACK is an acceleration package for neural network computations. NNPACK aims to provide high-performance implementations of convnet layers for multi-core CPUs.\n\nNNPACK is not intended to be directly used by machine learning researchers; instead it provides low-level performance primitives leveraged in leading deep learning frameworks, such as [PyTorch](http://pytorch.org/), [Caffe2](https://caffe2.ai/), [MXNet](http://mxnet.io), \n[tiny-dnn](https://tiny-dnn.readthedocs.io/), [Caffe](http://caffe.berkeleyvision.org/), [Torch](http://torch.ch/), and [Darknet](https://pjreddie.com/darknet/).\n\n## Platforms and requirements\n\n| Environment  | Architecture  | CPU requirements                 |\n| ------------ | ------------- | -------------------------------- |\n| Linux        | x86-64        | AVX2 and 3-level cache hierarchy |\n| Linux        | ARM           | NEON                             |\n| Linux        | ARM64         |                                  |\n| macOS        | x86-64        | AVX2 and 3-level cache hierarchy |\n| Android      | ARM           | NEON                             |\n| Android      | ARM64         |                                  |\n| Android      | x86           |                                  |\n| Android      | x86-64        |                                  |\n| iOS          | ARM           |                                  |\n| iOS          | ARM64         |                                  |\n| Emscripten   | Asm.js        | Temporarily disabled             |\n| Emscripten   | WebAssembly   | Temporarily disabled             |\n| PNaCl        | Native Client | Temporarily disabled             |\n\n## Features\n\n- Multiple algorithms for convolutiona layers:\n  - Fast convolution based on Fourier transform (for kernels up to 16x16 without stride)\n  - Fast convolution based on Winograd transform (for 3x3 kernels without stride)\n  - Implicit matrix-matrix multiplication algorithm (no limitations)\n  - Direct convolution algorithm (for 1x1 kernels without stride)\n- Multi-threaded SIMD-aware implementations of neural network layers\n- Implemented in C99 and Python without external dependencies\n- Extensive coverage with unit tests\n\n## Layers\n\n- Convolutional layer\n  - Inference-optimized forward propagation (`nnp_convolution_inference`)\n  - Training-optimized forward propagation (`nnp_convolution_output`)\n  - Training-optimized backward input gradient update (`nnp_convolution_input_gradient`)\n  - Training-optimized backward kernel gradient update (`nnp_convolution_kernel_gradient`)\n- Fully-connected layer\n  - Inference-optimized forward propagation (`nnp_fully_connected_inference` and `nnp_fully_connected_inference_f16f32` version for FP16 weights)\n  - Training-optimized forward propagation (`nnp_fully_connected_output`)\n- Max pooling layer\n  - Forward propagation, both for training and inference, (`nnp_max_pooling_output`)\n- ReLU layer (with parametrized negative slope)\n  - Forward propagation, both for training and inference, optionally in-place, (`nnp_relu_output`)\n  - Backward input gradient update (`nnp_relu_input_gradient`)\n- Softmax layer\n  - Forward propagation, both for training and inference, optionally in-place (`nnp_softmax_output`)\n\n## Building\n\nFor most users, the recommended way to build NNPACK is through CMake:\n\n```bash\nmkdir build\ncd build\ncmake -G Ninja ..\nninja\n```\n\nNote: if `ninja` is not available on your system, configure without `-G Ninja`, and use `make` instead of `ninja`.\n\n### Cross-compilation for Android\n\nTo cross-compile for Android, add extra configuration options for `cmake`: `-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.cmake.toolchain` (where `$ANDROID_NDK` is the path to Android NDK directorory, e.g. `/opt/android-ndk-r15c`) **AND** arguments from the table below\n\n| ABI         | Extra cmake args                                    | Restrictions               |\n| ----------- | --------------------------------------------------- | -------------------------- |\n| armeabi     | `-DANDROID_ABI=armeabi -DANDROID_TOOLCHAIN=gcc`     | Requires CPU with ARM NEON |\n| armeabi-v7a | `-DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN=gcc` | Requires CPU with ARM NEON |\n| arm64-v8a   | `-DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang` | Requires clang toolchain   |\n| x86         | `-DANDROID_ABI=x86`                                 |                            |\n| x86_64      | `-DANDROID_ABI=x86_64`                              |                            |\n\nNotes:\n- On **armeabi** and **armeabi-v7a** `nnp_initialize` will fail with `nnp_status_unsupported_hardware` if the mobile CPU does not support ARM NEON. Don't set `-DANDROID_ARM_NEON=1` for NNPACK compilation as it can make `nnp_initialize` crash on CPUs without ARM NEON.\n- NNPACK builds for **armeabi** and **armeabi-v7a** are up to 2x slower if you use **clang** toolchain.\n- **mips** and **mips64** are not supported, and we have no plans to add it (pull request would be welcome, though)\n- **x86_64** build will use generic 128-bit (SSE2) micro-kernels rather than AVX2 micro-kernels in native build\n\n### Development builds\n\nFor NNPACK development, we recommend a different workflow, supported on macOS and Linux.\n\nInstall [ninja](https://ninja-build.org) build system\n```bash\nsudo apt-get install ninja-build || brew install ninja\n```\n\nInstall [PeachPy](https://github.com/Maratyszcza/PeachPy) assembler and [confu](https://github.com/Maratyszcza/confu) configuration system\n```bash\n[sudo] pip install --upgrade git+https://github.com/Maratyszcza/PeachPy\n[sudo] pip install --upgrade git+https://github.com/Maratyszcza/confu\n```\n\nThen clone NNPACK, install dependencies, configure, and build\n```bash\ngit clone https://github.com/Maratyszcza/NNPACK.git\ncd NNPACK\nconfu setup\npython configure.py\nninja\nninja smoketest # or `ninja test`\n```\n\n#### Cross-compilation\n- To cross-compile NNPACK for Android, set `$ANDROID_NDK` and `$ANDROID_SDK` variables, and add an extra configuration argument `--target=arm-android`, `--target=arm64-android`, `--target=x86-android`, or `--target=x86_64-android` to target, respectively, **armeabi-v7a**, **arm64-v8a**, **x86**, or **x86_64** Android ABI.\n- To cross-compile NNPACK for Asm.js or WebAssembly, download, build, and activate Emscripten SDK, and use configuration argument `--target=wasm` or `--target=asmjs`\n- To cross-compile NNPACK for Portable Native Client, download Native Client SDK, set `NACL_SDK_ROOT` variable, and configure NNPACK with `--target=pnacl` option.\n\n## Ecosystem\n\n### Deep Learning Frameworks\n- [Caffe2](http://caffe2.ai) natively supports NNPACK\n- [MXNet](http://mxnet.io) - supports NNPACK for inference in convolutional layers, fully-connected, and max-pooling layers. See [MXNet wiki](https://mxnet.incubator.apache.org/how_to/nnpack.html) for configuration instructions and performance benchmarks).\n- [PyTorch](http://pytorch.org/) - supports NNPACK as an optional dependency.\n- [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn) - header-only deep learning framework in C++11, which natively supports NNPACK.\n- [darknet-nnpack](https://github.com/thomaspark-pkj/darknet-nnpack) - fork of [Darknet](https://pjreddie.com/darknet/) framework with NNPACK support.\n- [szagoruyko/nnpack.torch](https://github.com/szagoruyko/nnpack.torch) - integration of NNPACK into Lua Torch via ffi\n- [Maratyszcza/caffe](https://github.com/Maratyszcza/caffe) - up-to-date integration of NNPACK (convolutional, fully-connected, max-pooling, and ReLU layers) into Caffe based on `nnpack-pr` branch in [ajtulloch/caffe](https://github.com/ajtulloch/caffe/tree/nnpack-pr).\n- [Maratyszcza/caffe-nnpack](https://github.com/Maratyszcza/caffe-nnpack) - older and unmaintained integration of NNPACK (convolutional layers only) into Caffe.\n- See also discussion in [Issue #1](https://github.com/Maratyszcza/NNPACK/issues/1)\n\n### Languages and Environments\n- [nnpack-windows](https://github.com/zeno40/nnpack-windows) - unofficial port for Windows\n- [node-nnpack](https://www.npmjs.com/package/node-nnpack) - Node.js bindings\n- [peterhj/libnnpack](https://github.com/peterhj/libnnpack) - Rust bindings\n\n### Users\n\n- [Facebook](https://www.facebook.com) uses NNPACK in production.\n- [Prisma](https://prisma-ai.com) uses NNPACK in the mobile app.\n\n## Acknowledgements\n\n[![HPC Garage logo](https://github.com/Maratyszcza/PeachPy/blob/master/logo/hpcgarage.png)](http://hpcgarage.org)\n[![Georgia Tech College of Computing logo](https://github.com/Maratyszcza/PeachPy/blob/master/logo/college-of-computing.gif)](http://www.cse.gatech.edu/)\n\nThe library is developed by [Marat Dukhan](http://www.maratdukhan.com) of Georgia Tech with extensive advice from [Nicolas Vasilache](https://research.facebook.com/nicolas-vasilache) and [Soumith Chintala](http://soumith.ch/) of Facebook Artificial Intelligence Research. [Andrew Tulloch](http://tullo.ch/) of Facebook Artificial Intelligence Research contributed Caffe integration. We thank [Andrew Lavin](https://github.com/andravin) for fruitful discussions on Winograd transform-based implementations. NNPACK is a research project at [Richard Vuduc](http://vuduc.org)'s HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.\n\nThis material is based upon work supported by the U.S. National Science Foundation (NSF) Award Number 1339745. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of NSF.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6396:3E1DA:17AAD7:5E2529:6AB92D16"},"text_sha256":"ac869e631a3aaf9d27613f81987c24ce03e37517df51cf530993400ea781dbb8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1600","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:182B7FA:1C534A1:6AB92D19"},"commit":{"sha":"70a77f485e8b934224f3a79efd8edcd84cd377b8","url":"https://github.com/Maratyszcza/NNPACK/commit/70a77f485e8b934224f3a79efd8edcd84cd377b8","date":"2023-02-01T23:35:35Z","author_date":"2023-02-01T23:35:35Z","committer_date":"2023-02-01T23:35:35Z","tree_sha":"aa6bd19879408afff94f3522dc37a8390a64389c","message_first_line":"fix cpuinfo branch (#214)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1599","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082A:76AED:180B072:1C3302C:6AB92D19"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9264,"blob_sha":"1d1bcb0f8e50def40e3188a8488e4cec64bf44a6","priority":0}],"documents":[{"path":"README.md","size":9264,"blob_sha":"1d1bcb0f8e50def40e3188a8488e4cec64bf44a6","priority":0,"status":200,"text":"<p align=\"center\"><img src=\"https://maratyszcza.github.io/NNPACK/NNPACK.png\" alt=\"NNPACK Logo\" title=\"NNPACK\"/><\/p>\n\n# NNPACK\n\n[![BSD (2 clause) License](https://img.shields.io/badge/License-BSD%202--Clause%20%22Simplified%22%20License-blue.svg)](https://github.com/Maratyszcza/NNPACK/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/Maratyszcza/NNPACK.svg)](https://travis-ci.org/Maratyszcza/NNPACK)\n\nNNPACK is an acceleration package for neural network computations. NNPACK aims to provide high-performance implementations of convnet layers for multi-core CPUs.\n\nNNPACK is not intended to be directly used by machine learning researchers; instead it provides low-level performance primitives leveraged in leading deep learning frameworks, such as [PyTorch](http://pytorch.org/), [Caffe2](https://caffe2.ai/), [MXNet](http://mxnet.io), \n[tiny-dnn](https://tiny-dnn.readthedocs.io/), [Caffe](http://caffe.berkeleyvision.org/), [Torch](http://torch.ch/), and [Darknet](https://pjreddie.com/darknet/).\n\n## Platforms and requirements\n\n| Environment  | Architecture  | CPU requirements                 |\n| ------------ | ------------- | -------------------------------- |\n| Linux        | x86-64        | AVX2 and 3-level cache hierarchy |\n| Linux        | ARM           | NEON                             |\n| Linux        | ARM64         |                                  |\n| macOS        | x86-64        | AVX2 and 3-level cache hierarchy |\n| Android      | ARM           | NEON                             |\n| Android      | ARM64         |                                  |\n| Android      | x86           |                                  |\n| Android      | x86-64        |                                  |\n| iOS          | ARM           |                                  |\n| iOS          | ARM64         |                                  |\n| Emscripten   | Asm.js        |                                  |\n| Emscripten   | WebAssembly   |                                  |\n\n## Features\n\n- Multiple algorithms for convolutional layers:\n  - Fast convolution based on Fourier transform (for kernels up to 16x16 without stride)\n  - Fast convolution based on Winograd transform (for 3x3 kernels without stride)\n  - Implicit matrix-matrix multiplication algorithm (no limitations)\n  - Direct convolution algorithm (for 1x1 kernels without stride)\n- Multi-threaded SIMD-aware implementations of neural network layers\n- Implemented in C99 and Python without external dependencies\n- Extensive coverage with unit tests\n\n## Layers\n\n- Convolutional layer\n  - Inference-optimized forward propagation (`nnp_convolution_inference`)\n  - Training-optimized forward propagation (`nnp_convolution_output`)\n  - Training-optimized backward input gradient update (`nnp_convolution_input_gradient`)\n  - Training-optimized backward kernel gradient update (`nnp_convolution_kernel_gradient`)\n- Fully-connected layer\n  - Inference-optimized forward propagation (`nnp_fully_connected_inference` and `nnp_fully_connected_inference_f16f32` version for FP16 weights)\n  - Training-optimized forward propagation (`nnp_fully_connected_output`)\n- Max pooling layer\n  - Forward propagation, both for training and inference, (`nnp_max_pooling_output`)\n- ReLU layer (with parametrized negative slope)\n  - Forward propagation, both for training and inference, optionally in-place, (`nnp_relu_output`)\n  - Backward input gradient update (`nnp_relu_input_gradient`)\n- Softmax layer\n  - Forward propagation, both for training and inference, optionally in-place (`nnp_softmax_output`)\n\n## Building\n\nFor most users, the recommended way to build NNPACK is through CMake:\n\n```bash\nmkdir build\ncd build\ncmake -G Ninja ..\nninja\n```\n\nNote: if `ninja` is not available on your system, configure without `-G Ninja`, and use `make` instead of `ninja`.\n\n## Building NNPACK - Using vcpkg\n\nYou can download and install NNPACK using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:\n\n    git clone https://github.com/Microsoft/vcpkg.git\n    cd vcpkg\n    ./bootstrap-vcpkg.sh\n    ./vcpkg integrate install\n    ./vcpkg install NNPACK\n\nThe NNPACK port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\n### Cross-compilation for Android\n\nTo cross-compile for Android, add extra configuration options for `cmake`: `-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake` (where `$ANDROID_NDK` is the path to Android NDK directorory, e.g. `/opt/android-ndk-r15c`) **AND** arguments from the table below\n\n| ABI         | Extra cmake args                                    | Restrictions               |\n| ----------- | --------------------------------------------------- | -------------------------- |\n| armeabi     | `-DANDROID_ABI=armeabi -DANDROID_TOOLCHAIN=gcc`     | Requires CPU with ARM NEON |\n| armeabi-v7a | `-DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN=gcc` | Requires CPU with ARM NEON |\n| arm64-v8a   | `-DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang` | Requires clang toolchain   |\n| x86         | `-DANDROID_ABI=x86`                                 |                            |\n| x86_64      | `-DANDROID_ABI=x86_64`                              |                            |\n\nNotes:\n- On **armeabi** and **armeabi-v7a** `nnp_initialize` will fail with `nnp_status_unsupported_hardware` if the mobile CPU does not support ARM NEON. Don't set `-DANDROID_ARM_NEON=1` for NNPACK compilation as it can make `nnp_initialize` crash on CPUs without ARM NEON.\n- NNPACK builds for **armeabi** and **armeabi-v7a** are up to 2x slower if you use **clang** toolchain.\n- **mips** and **mips64** are not supported, and we have no plans to add it (pull request would be welcome, though)\n- **x86_64** build will use generic 128-bit (SSE2) micro-kernels rather than AVX2 micro-kernels in native build\n\n## Ecosystem\n\n### Deep Learning Frameworks\n- [PyTorch](http://pytorch.org/) supports NNPACK on mobile for inference in convolutional layers.\n- [TVM](https://tvm.apache.org/) supports NNPACK for inference in convolutional layers. See [these instructions](https://github.com/apache/incubator-tvm/blob/master/docs/install/nnpack.md) to enable NNPACK in TVM.\n- [MXNet](http://mxnet.io) supports NNPACK for inference in convolutional layers, fully-connected, and max-pooling layers. See [MXNet wiki](https://mxnet.incubator.apache.org/how_to/nnpack.html) for configuration instructions and performance benchmarks).\n- [Caffe2](http://caffe2.ai) supports NNPACK for inference in convolutional layers.\n- [darknet-nnpack](https://github.com/thomaspark-pkj/darknet-nnpack) - fork of [Darknet](https://pjreddie.com/darknet/) framework with NNPACK support.\n- [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn) - header-only deep learning framework in C++11, which natively supports NNPACK.\n- [Maratyszcza/caffe](https://github.com/Maratyszcza/caffe) - up-to-date integration of NNPACK (convolutional, fully-connected, max-pooling, and ReLU layers) into Caffe based on `nnpack-pr` branch in [ajtulloch/caffe](https://github.com/ajtulloch/caffe/tree/nnpack-pr).\n- [Maratyszcza/caffe-nnpack](https://github.com/Maratyszcza/caffe-nnpack) - older and unmaintained integration of NNPACK (convolutional layers only) into Caffe.\n- [szagoruyko/nnpack.torch](https://github.com/szagoruyko/nnpack.torch) - integration of NNPACK into Lua Torch via ffi\n- See also discussion in [Issue #1](https://github.com/Maratyszcza/NNPACK/issues/1)\n\n### Languages and Environments\n- [nnpack-windows](https://github.com/zeno40/nnpack-windows) - unofficial port for Windows\n- [node-nnpack](https://www.npmjs.com/package/node-nnpack) - Node.js bindings\n- [peterhj/libnnpack](https://github.com/peterhj/libnnpack) - Rust bindings\n\n### Users\n\n- [Facebook](https://www.facebook.com) uses NNPACK in production.\n- [Prisma](https://prisma-ai.com) uses NNPACK in the mobile app.\n\n## Acknowledgements\n\n[![HPC Garage logo](https://github.com/Maratyszcza/PeachPy/blob/master/logo/hpcgarage.png)](http://hpcgarage.org)\n[![Georgia Tech College of Computing logo](https://github.com/Maratyszcza/PeachPy/blob/master/logo/college-of-computing.gif)](http://www.cse.gatech.edu/)\n\nThe library is developed by [Marat Dukhan](http://www.maratdukhan.com) of Georgia Tech with extensive advice from [Nicolas Vasilache](https://research.facebook.com/nicolas-vasilache) and [Soumith Chintala](http://soumith.ch/) of Facebook Artificial Intelligence Research. [Andrew Tulloch](http://tullo.ch/) of Facebook Artificial Intelligence Research contributed Caffe integration. We thank [Andrew Lavin](https://github.com/andravin) for fruitful discussions on Winograd transform-based implementations. NNPACK is a research project at [Richard Vuduc](http://vuduc.org)'s HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.\n\nThis material is based upon work supported by the U.S. National Science Foundation (NSF) Award Number 1339745. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of NSF.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"22F0:3BCC6:17E5DF:5E5FFF:6AB92D18"},"text_sha256":"f59a04bf00ace518bf5a68df6bbc56e590b563fdeb1b6f705edf4fdcb077bde9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Cloud-CV/Fabrik","input_row":{"repository":"Cloud-CV/Fabrik","url":"https://github.com/Cloud-CV/Fabrik","name":"Fabrik","owner":"Cloud-CV","description":":factory: Collaboratively build, visualize, and design neural nets in browser","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1131,"issues":137,"created_at":"2016-05-28T17:51:46Z","updated_at":"2026-09-21T17:45:31Z","first_commit_at":"2016-05-28T17:51:47Z","last_commit_at":"2018-12-12T17:25:56Z","activity_months":30.489999999999998,"ai_ml_match_topics":"neural-network","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:02.540Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Cloud-CV/Fabrik","visibility":"public","created_at":"2016-05-28T17:51:46Z","updated_at":"2026-09-21T17:45:31Z","private":false,"fork":false,"archived":false,"stargazers_count":1131,"open_issues_count":73,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1598","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D2:A9DC0:17D3DB5:1BFB823:6AB92D1A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1597","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088F:7580A:1815D04:1C3DB23:6AB92D1A"},"commit":{"sha":"802f0c468524ef11bee5188e64e2de182251bb01","url":"https://github.com/Cloud-CV/Fabrik/commit/802f0c468524ef11bee5188e64e2de182251bb01","date":"2018-05-22T04:08:28Z","author_date":"2018-05-22T04:08:28Z","committer_date":"2018-05-22T04:08:28Z","tree_sha":"fd5a5a0577907fb88d79ad56ae36c4469187d280","message_first_line":"Extend TF Import Support for Pool layers (#353)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1596","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:18012AF:1C28F6E:6AB92D1B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7293,"blob_sha":"e85a6750e9e79d718f64fbcd17bc1f73e9bb8809","priority":0}],"documents":[{"path":"README.md","size":7293,"blob_sha":"e85a6750e9e79d718f64fbcd17bc1f73e9bb8809","priority":0,"status":200,"text":"<img width=\"25%\" src=\"/ide/static/img/logo.png\" />\n\n[![Join the chat at https://gitter.im/Cloud-CV/Fabrik](https://badges.gitter.im/Cloud-CV/Fabrik.svg)](https://gitter.im/Cloud-CV/Fabrik?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://travis-ci.org/Cloud-CV/Fabrik.svg?branch=master)](https://travis-ci.org/Cloud-CV/Fabrik)\n[![Coverage Status](https://coveralls.io/repos/github/Cloud-CV/Fabrik/badge.svg?branch=master)](https://coveralls.io/github/Cloud-CV/Fabrik?branch=master)\n\nFabrik is an online collaborative platform to build, visualize and train deep learning models via a simple drag-and-drop interface. It allows researchers to collaboratively develop and debug models using a web GUI that supports importing, editing and exporting networks written in widely popular frameworks like Caffe, Keras, and TensorFlow.\n\n<img src=\"/example/fabrik_demo.gif?raw=true\">\n\nThis app is presently under active development and we welcome contributions. Please check out our [issues thread](https://github.com/Cloud-CV/IDE/issues) to find things to work on, or ping us on [Gitter](https://gitter.im/Cloud-CV/IDE). \n\n\n## Installation Instructions\n\nSetting up Fabrik on your local machine is really easy. You can setup Fabrik using two methods:\n\n### Using Docker\n\n1. Get the source code on to your machine via git.\n\n    ```shell\n    git clone https://github.com/Cloud-CV/Fabrik.git && cd Fabrik\n    ```\n\n2. Rename `settings/dev.sample.py` as `dev.py`.\n\n    ```\n    cp settings/dev.sample.py settings/dev.py\n    ```\n\n3. Build and run the Docker containers. This might take a while. You should be able to access Fabrik at `0.0.0.0:8000`.\n\n    ```\n    docker-compose up --build\n    ```\n\n### Using Virtual Environment\n1. First set up a virtualenv\n    ```\n    sudo apt-get install python-pip python-dev python-virtualenv \n    virtualenv --system-site-packages ~/Fabrik\n    source ~/Fabrik/bin/activate\n    ```\n    \n2. Clone the repository\n    ```\n    git clone --recursive https://github.com/Cloud-CV/Fabrik.git\n    ```\n\n3. Rename settings/dev.sample.py as settings/dev.py and change credential in settings/dev.py\n    ```\n    cp settings/dev.sample.py settings/dev.py\n    ```\n    \n4. If you have Caffe, Keras and Tensorflow already installed on your computer, skip this step\n    * For Linux users\n        ```\n        cd Fabrik/requirements\n        yes Y | sh caffe_tensorflow_keras_install.sh\n        ```\n        Open your ~/.bashrc file and append this line at the end\n        ```        \n        export PYTHONPATH=~/caffe/caffe/python:$PYTHONPATH\n        ```\n        Save, exit and then run\n        ```\n        source ~/.bash_profile\n        cd .. \n        ```\n    * For Mac users\n        * [Install Caffe](http://caffe.berkeleyvision.org/install_osx.html)\n        * [Install Tensorflow](https://www.tensorflow.org/install/install_mac)\n        * [Install Keras](https://keras.io/#installation)\n5. Install dependencies\n* For developers:\n    ```\n    pip install -r requirements/dev.txt\n    ```\n* Others:\n    ```\n    pip install -r requirements/common.txt\n    ```\n6. [Install postgres >= 9.5](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04)\n* Setup postgres database\n    * Start postgresql by typing ```sudo service postgresql start```\n    * Now login as user postgres by running ```sudo -u postgres psql``` and type the commands below\n    \n    ```\n      CREATE DATABASE fabrik;\n      CREATE USER admin WITH PASSWORD 'fabrik';\n      ALTER ROLE admin SET client_encoding TO 'utf8';\n      ALTER ROLE admin SET default_transaction_isolation TO 'read committed';\n      ALTER ROLE admin SET timezone TO 'UTC';\n      ALTER USER admin CREATEDB;\n    ```\n    * Exit psql by typing in \\q and hitting enter. \n* Migrate\n    ```\n    \n    python manage.py makemigrations caffe_app\n    python manage.py migrate\n    ```\n7. Install node modules\n```\nnpm install\nsudo npm install -g webpack\nwebpack --progress --watch --colors\n```\n\n### Usage\n```\npython manage.py runserver\n```\n\n### Example\n* Use `example/tensorflow/GoogleNet.pbtxt` for tensorflow import\n* Use `example/caffe/GoogleNet.prototxt` for caffe import\n* Use `example/keras/vgg16.json` for keras import\n\n### Tested models\n\nThe model conversion between currently supported frameworks is tested on some models.\n\nModels                                                                      | Caffe | Keras | Tensorflow |\n:--------------------------------------------------------------------------:|:-----:|:-----:|:----------:|\n[Inception V3](http://arxiv.org/abs/1512.00567)                             |   √   |   √   |     √      |\n[Inception V4](http://arxiv.org/abs/1512.00567)                             |   √   |   √   |     √      |\n[ResNet 101](https://arxiv.org/abs/1512.03385)                              |   √   |   √   |     √      |\n[VGG 16](http://arxiv.org/abs/1409.1556.pdf)                                |   √   |   √   |     √      |\n[GoogLeNet](https://arxiv.org/pdf/1610.02357.pdf)                           |   √   |   ×   |     ×      |\n[SqueezeNet](https://arxiv.org/pdf/1602.07360)                              |   √   |   ×   |     ×      |\n[DenseNet](https://arxiv.org/abs/1608.06993)                                |   √   |   ×   |     ×      |\n[AllCNN](https://arxiv.org/abs/1412.6806)                                   |   √   |   ×   |     ×      |\n[AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks)                                 |   √   |   ×   |     ×      |\n[FCN32 Pascal](https://www.cv-foundation.org/openaccess/content_cvpr_2015/html/Long_Fully_Convolutional_Networks_2015_CVPR_paper.html) |   √   |   ×   |     ×      |\n[YoloNet](https://arxiv.org/abs/1506.02640)                                 |   √   |   √   |     √      |\n[Pix2Pix](https://github.com/phillipi/pix2pix)                              |   √   |   ×   |     ×      |\n[VQA](https://github.com/iamaaditya/VQA_Demo)                               |   √   |   √   |     √      |\n\n### Documentation\n* [Using a Keras model exported from Fabrik](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_json_usage_1.md)\n* [Loading a Keras model exported from Fabrik and printing its summary](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_json_usage_2.md)\n* [Using an Exported Caffe Model](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/caffe_prototxt_usage_1.md)\n* [Loading a caffe model in python and printing its parameters and output size](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/caffe_prototxt_usage_2.md)\n* [List of models tested with Fabrik](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/tested_models.md)\n* [Adding model to the Fabrik model zoo](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/adding_new_model.md)\n* [Adding new layers](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/adding_new_layers.md)\n* [Linux installation walk-through](https://www.youtube.com/watch?v=zPgoben9D1w)\n\n### License\n\nThis software is licensed under GNU GPLv3. Please see the included License file. All external libraries, if modified, will be mentioned below explicitly.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9876:3B1F3:18658E:5EE0C8:6AB92D1B"},"text_sha256":"6f44fc1a59ff32eeb05cb5beb05b29326fb09629ce4c88f620723014a7ffb928"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1595","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:17FF116:1C26F82:6AB92D1C"},"commit":{"sha":"0bb88a50f570bf443339d4d4f88c66241412b905","url":"https://github.com/Cloud-CV/Fabrik/commit/0bb88a50f570bf443339d4d4f88c66241412b905","date":"2018-12-12T17:25:56Z","author_date":"2018-12-12T17:25:56Z","committer_date":"2018-12-12T17:25:56Z","tree_sha":"8db8f2149ca0f84df7d69b2dbfd9cc628f31e84b","message_first_line":"Refactor tensorflow import backend (#499)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1594","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A1:380E1C:17E7DC9:1C0ECEC:6AB92D1C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13036,"blob_sha":"636b38d924290c83f39206348aed82526653b2f9","priority":0}],"documents":[{"path":"README.md","size":13036,"blob_sha":"636b38d924290c83f39206348aed82526653b2f9","priority":0,"status":200,"text":"<img width=\"25%\" src=\"/ide/static/img/logo.png\" />\n\n[![Join the chat at https://gitter.im/Cloud-CV/Fabrik](https://badges.gitter.im/Cloud-CV/Fabrik.svg)](https://gitter.im/Cloud-CV/Fabrik?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![Build Status](https://travis-ci.org/Cloud-CV/Fabrik.svg?branch=master)](https://travis-ci.org/Cloud-CV/Fabrik)\n[![Coverage Status](https://coveralls.io/repos/github/Cloud-CV/Fabrik/badge.svg?branch=master)](https://coveralls.io/github/Cloud-CV/Fabrik?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/markdown-guide/badge/?version=latest)](http://fabrik.readthedocs.io/en/latest/)\n\nFabrik is an online collaborative platform to build, visualize and train deep learning models via a simple drag-and-drop interface. It allows researchers to collectively develop and debug models using a web GUI that supports importing, editing and exporting networks to popular frameworks like Caffe, Keras, and TensorFlow.\n\n<img src=\"/example/fabrik_demo.gif?raw=true\">\n\nThis app is presently under active development and we welcome contributions. Please check out our [issues thread](https://github.com/Cloud-CV/IDE/issues) to find things to work on, or ping us on [Gitter](https://gitter.im/Cloud-CV/IDE).\n\n\n## Installation Instructions\n\nSetting up Fabrik on your local machine is very easy. You can setup Fabrik using two methods:\n\n### Using Docker\n\n#### Docker Installation\nIf you haven't installed Docker already: <\/br>\n\nTo install Docker for Windows [click here](https://docs.docker.com/docker-for-windows/install/).\n\nTo install Docker for Mac [click here](https://docs.docker.com/docker-for-mac/install/).\n\n#### Fabrik Installation\n1. Get the source code on to your machine via git.\n\n    ```\n    git clone https://github.com/Cloud-CV/Fabrik.git && cd Fabrik\n    ```\n\n2. Rename `settings/dev.sample.py` as `dev.py`.\n\n    ```\n    cp settings/dev.sample.py settings/dev.py\n    ```\n\n3. Build and run the Docker containers. This might take a while. You should now be able to access Fabrik at <http://0.0.0.0:8000>.\n\n    ```\n    docker-compose up --build\n    ```\n\n### Setup Authentication for Docker Environment\n1. Go to Github Developer Applications and create a new application. [here](https://github.com/settings/developers)\n\n2. For local deployments,the following should be used in the options:\n    * Application name: Fabrik\n    * Homepage URL: http://0.0.0.0:8000\n    * Application description: Fabrik\n    * Authorization callback URL: http://0.0.0.0:8000/accounts/github/login/callback/\n\n3. Github will provide you with a Client ID and a Secret Key. Save these.\n\n4. Create a superuser in django service of docker container\n\n    ```\n    docker-compose run django python manage.py createsuperuser\n    ```\n\n    Note: Before creating the superuser, make sure that django service of docker image is running. This can be done by executing ``` docker-compose up ``` followed by ``` Ctrl + C ``` to save docker configuration.\n\n5. Open http://0.0.0.0:8000/admin and login with the credentials from step 4.\n\n6. Setting up Social Accounts in django admin\n\n    * Under ``` Social Accounts ```, open ``` Social applications ``` and click on ``` Add Social Application ```.\n\n    * Choose  the ``` Provider ``` of social application as ``` Github ``` and  name it ``` Github ```.\n\n    * Add the sites available to the right side, so github is allowed for the current site.\n\n    * Copy and paste your ``` Client ID ``` and ``` Secret Key ``` into the apppropriate fields and Save.\n\n7. Go to ``` Sites ``` tab and update the ``` Domain name ``` to ``` 0.0.0.0:8000 ```.\n\n\n### Using Virtual Environment\n1. First set up a virtualenv. Fabrik runs on Python2.7.\n\n    ```\n    sudo apt-get install python-pip python-dev python-virtualenv\n    virtualenv --system-site-packages ~/Fabrik --python=python2.7\n    source ~/Fabrik/bin/activate\n    ```\n\n2. Clone the repository via git\n\n    ```\n    git clone --recursive https://github.com/Cloud-CV/Fabrik.git && cd Fabrik\n    ```\n\n3. Rename settings/dev.sample.py as settings/dev.py and change credentials in settings/dev.py\n\n    ```\n    cp settings/dev.sample.py settings/dev.py\n    ```\n\n    * Change the hostname to ``` localhost ``` in settings/dev.py line 15. It should now look like this:  \n\n    ```\n    'HOST': os.environ.get(\"POSTGRES_HOST\", 'localhost'), \n    ```\n\n4. Install redis server  \n\n    ```\n    sudo apt-get install redis-server\n    ```\n\n    * Change the hostname to ``` localhost ``` in settings/common.py line 115.\n\n        ```\n        \"CONFIG\": {\n            # replace redis hostname to localhost if running on local system\n            \"hosts\": [(\"localhost\", 6379)],\n            \"prefix\": u'fabrik:',\n            },\n        ```\n\n    * Replace celery result backend in settings/common.py line 122 with localhost.\n\n        ```\n        CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'\n        ```\n\n    * Change celery broker URL and result backend hostname to ``` localhost ``` in ide/celery_app.py, line 8.\n\n        ```\n        app = Celery('app', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0', include=['ide.tasks'])\n        ```\n\n5. If you already have Caffe, Keras and TensorFlow installed on your computer, skip this step.\n* For Linux users\n    * Install Caffe, Keras and Tensorflow\n\n        ```\n        cd Fabrik/requirements\n        yes Y | sh caffe_tensorflow_keras_install.sh\n        ```\n\n    * Open your ~/.bashrc file and append this line to the end\n\n        ```      \n        export PYTHONPATH=~/caffe/caffe/python:$PYTHONPATH\n        ```\n\n    * Save, exit and then run\n\n        ```\n        source ~/.bash_profile\n        cd ..\n        ```\n\n* For Mac users\n    * [Install Caffe](http://caffe.berkeleyvision.org/install_osx.html)\n    * [Install Tensorflow](https://www.tensorflow.org/install/install_mac)\n    * [Install Keras](https://keras.io/#installation)\n\n6. Install dependencies\n* For developers:\n\n    ```\n    pip install -r requirements/dev.txt\n    ```\n\n* For others:\n\n    ```\n    pip install -r requirements/common.txt\n    ```\n\n7. [Install postgres >= 9.5](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04)\n* Setup postgres database\n    * Start postgresql by typing ```sudo service postgresql start```\n    * Now login as user postgres by running ```sudo -u postgres psql``` and type the commands below:\n\n        ```\n        CREATE DATABASE fabrik;\n        CREATE USER admin WITH PASSWORD 'fabrik';\n        ALTER ROLE admin SET client_encoding TO 'utf8';\n        ALTER ROLE admin SET default_transaction_isolation TO 'read committed';\n        ALTER ROLE admin SET timezone TO 'UTC';\n        ALTER USER admin CREATEDB;\n        ```\n\n    * Exit psql by typing in \\q and hitting enter.\n\n* Migrate\n\n    ```\n    python manage.py makemigrations caffe_app\n    python manage.py migrate\n    ```\n\n8. Install node modules\n\n    ```\n    npm install\n    npm install --save-dev json-loader\n    sudo npm install -g webpack@1.15.0\n    ```\n\n    * Run the command below in a separate terminal for hot-reloading, i.e. see the changes made to the UI in real time. \n\n    ```\n    webpack --progress --watch --colors\n    ```\n\n9. Start celery worker\n\n    ```\n    celery -A ide worker --app=ide.celery_app  --loglevel=info\n    ```\n\n    The celery worker needs to be run in parallel to the django server in a separate terminal.\n\n10. Start django application\n\n    ```\n    python manage.py runserver\n    ```\n\n    You should now be able to access Fabrik at <http://localhost:8000>.\n\n### Setup Authentication for Virtual Environment\n1. Go to Github Developer Applications and create a new application. [here](https://github.com/settings/developers)\n\n2. For local deployments, the following should be used in the options:\n    * Application name: Fabrik\n    * Homepage URL: http://localhost:8000\n    * Application description: Fabrik\n    * Authorization callback URL: http://localhost:8000/accounts/github/login/callback/\n\n3. Github will provide you with a client ID and secret Key, save these.\n\n4. Create a superuser in django\n\n    ```\n    python manage.py createsuperuser\n    ```\n\n5. Start the application\n\n    ```\n    python manage.py runserver\n    ```\n\n6. Open http://localhost:8000/admin\n\n7. Login with the credentials from step 4.\n\n8. Setting up Social Accounts in django admin :\n\n    * Under ```Social Accounts``` open ``` Social applications ```, click on ``` Add Social Application ```.\n\n    * Choose  the ``` Provider ``` of social application as ``` Github ``` &  name it ``` Github ```.\n\n    * Add the sites available to the right side, so github is allowed for the current site. This should be `localhost:8000` for local deployment.\n\n    * Copy and paste your ``` Client ID ``` and ``` Secret Key ``` into the appropriate fields and Save.\n\n9. From the django admin home page, go to `Sites` under the `Sites` category and update ``` Domain name ``` to ``` localhost:8000 ```.\n\nNote: For testing, you will only need one authentication backend. However, if you want to try out Google's authentication,\nthen, you will need to follow the same steps as above, but switch out the Github for Google.\n\n\n### Usage\n\n```\npython manage.py runserver\n```\n\n### Example\n* Use `example/tensorflow/GoogleNet.pbtxt` for TensorFlow import\n* Use `example/caffe/GoogleNet.prototxt` for Caffe import\n* Use `example/keras/vgg16.json` for Keras import\n\n### Tested models\n\nThe model conversion between currently supported frameworks is tested on some models.\n\nModels                                                                      | Caffe | Keras | Tensorflow |\n:--------------------------------------------------------------------------:|:-----:|:-----:|:----------:|\n[Inception V3](http://arxiv.org/abs/1512.00567)                             |   √   |   √   |     √      |\n[Inception V4](http://arxiv.org/abs/1512.00567)                             |   √   |   √   |     √      |\n[ResNet 101](https://arxiv.org/abs/1512.03385)                              |   √   |   √   |     √      |\n[VGG 16](http://arxiv.org/abs/1409.1556.pdf)                                |   √   |   √   |     √      |\n[GoogLeNet](https://arxiv.org/pdf/1610.02357.pdf)                           |   √   |   ×   |     ×      |\n[SqueezeNet](https://arxiv.org/pdf/1602.07360)                              |   √   |   ×   |     ×      |\n[DenseNet](https://arxiv.org/abs/1608.06993)                                |   √   |   ×   |     ×      |\n[AllCNN](https://arxiv.org/abs/1412.6806)                                   |   √   |   ×   |     ×      |\n[AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks)                                 |   √   |   √   |     √      |\n[FCN32 Pascal](https://www.cv-foundation.org/openaccess/content_cvpr_2015/html/Long_Fully_Convolutional_Networks_2015_CVPR_paper.html) |   √   |   ×   |     ×      |\n[YoloNet](https://arxiv.org/abs/1506.02640)                                 |   √   |   √   |     √      |\n[Pix2Pix](https://github.com/phillipi/pix2pix)                              |   √   |   ×   |     ×      |\n[VQA](https://github.com/iamaaditya/VQA_Demo)                               |   √   |   √   |     √      |\n[Denoising Auto-Encoder](https://blog.keras.io/building-autoencoders-in-keras.html)                               |   ×   |   √   |     √      |\n\nNote: For models that use a custom LRN layer (Alexnet), Keras expects the custom layer to be passed when it is loaded from json. LRN.py is located in keras_app/custom_layers. [Alexnet import for Keras](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_custom_layer_usage.md)\n\n### Documentation\n* [Using a Keras model exported from Fabrik](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_json_usage_1.md)\n* [Loading a Keras model exported from Fabrik and printing its summary](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_json_usage_2.md)\n* [Using an Exported Caffe Model](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/caffe_prototxt_usage_1.md)\n* [Loading a Caffe model in python and printing its parameters and output size](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/caffe_prototxt_usage_2.md)\n* [List of models tested with Fabrik](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/tested_models.md)\n* [Adding model to the Fabrik model zoo](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/adding_new_model.md)\n* [Adding new layers](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/adding_new_layers.md)\n* [Using custom layers with Keras](https://github.com/Cloud-CV/Fabrik/blob/master/tutorials/keras_custom_layer_usage.md)\n* [Linux installation walk-through](https://www.youtube.com/watch?v=zPgoben9D1w)\n\n### License\n\nThis software is licensed under GNU GPLv3. Please see the included License file. All external libraries, if modified, will be mentioned below explicitly.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F1CC:29FD16:185361:5ECDCC:6AB92D1C"},"text_sha256":"eaf7a7fd125326da1a17d4769059fa76d7860acba1d0bc7c07fd830ab01d1ce0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"ethanhe42/channel-pruning","input_row":{"repository":"ethanhe42/channel-pruning","url":"https://github.com/ethanhe42/channel-pruning","name":"channel-pruning","owner":"ethanhe42","description":"Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1087,"issues":125,"created_at":"2017-08-21T09:19:53Z","updated_at":"2026-09-22T14:28:36Z","first_commit_at":"2017-08-21T09:14:02Z","last_commit_at":"2024-05-02T06:37:42Z","activity_months":80.349999999999994,"ai_ml_match_topics":"image-classification; object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:05.599Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"ethanhe42/channel-pruning","visibility":"public","created_at":"2017-08-21T09:19:53Z","updated_at":"2026-09-22T14:28:36Z","private":false,"fork":false,"archived":false,"stargazers_count":1087,"open_issues_count":21,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1593","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E6:52542:17D8896:1C00753:6AB92D1D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1592","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D3:35C5DA:17BC984:1BE3BA2:6AB92D1E"},"commit":{"sha":"d2ec1f32c61004ba24b81220b13152894cb29f11","url":"https://github.com/ethanhe42/channel-pruning/commit/d2ec1f32c61004ba24b81220b13152894cb29f11","date":"2018-01-18T12:23:36Z","author_date":"2018-01-18T12:23:36Z","committer_date":"2018-01-18T12:23:36Z","tree_sha":"c9950615fe49a3a263f3aa4f320e77fdae1dff84","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1591","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093D:228A99:17FF288:1C2712B:6AB92D1E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6255,"blob_sha":"0ddbb0243165d736d7d974cce56cc050b0d4d492","priority":0}],"documents":[{"path":"README.md","size":6255,"blob_sha":"0ddbb0243165d736d7d974cce56cc050b0d4d492","priority":0,"status":200,"text":"# [Channel Pruning for Accelerating Very Deep Neural Networks](https://arxiv.org/abs/1707.06168)\n**ICCV 2017**, by [Yihui He](http://yihui-he.github.io/), [Xiangyu Zhang](https://scholar.google.com/citations?user=yuB-cfoAAAAJ&hl=en&oi=ao) and [Jian Sun](http://jiansun.org/)\n\nIn this repository, we released code for the following models:\n\nmodel | Speed-up | Accuracy\n:-------------------------:|:-------------------------:|:-------------------------\n[VGG-16 channel pruning](https://github.com/yihui-he/channel-pruning/releases/tag/channel_pruning_5x) |5x            |  88.1 (Top-5), 67.8 (Top-1)\n[VGG-16 3C](https://github.com/yihui-he/channel-pruning/releases/tag/VGG-16_3C4x)<sup>1<\/sup>   |4x            |  89.9 (Top-5), 70.6 (Top-1)\n[ResNet-50](https://github.com/yihui-he/channel-pruning/releases/tag/ResNet-50-2X) |2x |90.8 (Top-5), 72.3 (Top-1)\n[faster RCNN](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X)|  2x | 36.7 (AP@.50:.05:.95)\n[faster RCNN](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X)|  4x | 35.1 (AP@.50:.05:.95)\n\n###### <sup>1<\/sup> 3C method combined spatial decomposition ([Speeding up Convolutional Neural Networks with Low Rank Expansions](https://arxiv.org/abs/1405.3866)) and channel decomposition ([Accelerating Very Deep Convolutional Networks for Classification and Detection](https://arxiv.org/abs/1505.06798)) (mentioned in 4.1.2) \n\n\n\n![i2](http://yihui-he.github.io/assets_files/structure-1.png) | ![i1](http://yihui-he.github.io/assets_files/ill-1.png)\n:-------------------------:|:-------------------------:\nStructured simplification methods             |  Channel pruning (d)\n\n### Citation\nIf you find the code useful in your research, please consider citing:\n\n    @InProceedings{He_2017_ICCV,\n    author = {He, Yihui and Zhang, Xiangyu and Sun, Jian},\n    title = {Channel Pruning for Accelerating Very Deep Neural Networks},\n    booktitle = {The IEEE International Conference on Computer Vision (ICCV)},\n    month = {Oct},\n    year = {2017}\n    }\n    \n### Contents\n1. [Requirements](#requirements)\n2. [Installation](#installation-sufficient-for-the-demo)\n3. [Channel Pruning and finetuning](#channel-pruning)  \n4. [Pruned models for download](#pruned-models-for-download)\n5. [Pruning faster RCNN](#pruning-faster-rcnn)\n6. [FAQ](#faq)\n\n### requirements\n1. Python3 packages you might not have: `scipy`, `sklearn`, `easydict`, use `sudo pip3 install` to install.\n2. For finetuning with 128 batch size, 4 GPUs (~11G of memory)\n\n### Installation (sufficient for the demo)\n1. Clone the repository\n    ```Shell\n    # Make sure to clone with --recursive\n    git clone --recursive https://github.com/yihui-he/channel-pruning.git\n    ```\n2. Build [my Caffe](https://github.com/yihui-he/caffe-pro) fork (which support bicubic interpolation and resizing image shorter side to 256 then crop to 224x224) \n    ```Shell\n    cd caffe\n\n    # If you're experienced with Caffe and have all of the requirements installed, then simply do:\n    make all -j8 && make pycaffe\n    # Or follow the Caffe installation instructions here:\n    # http://caffe.berkeleyvision.org/installation.html\n\n    # you might need to add pycaffe to PYTHONPATH, if you've already had a caffe before\n    ```\n    \n3. Download ImageNet classification dataset\n    http://www.image-net.org/download-images  \n    \n4. Specify imagenet `source` path in `temp/vgg.prototxt` (line 12 and 36)\n    \n### Channel Pruning  \n*For fast testing, you can directly download pruned model. See [next section](#pruned-models-for-download)*\n1. Download the original VGG-16 model\n    http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel  \n   move it to `temp/vgg.caffemodel` (or create a softlink instead)\n\n2. Start Channel Pruning\n    ```Shell\n    python3 train.py -action c3 -caffe [GPU0]\n    # or log it with ./run.sh python3 train.py -action c3 -caffe [GPU0]\n    # replace [GPU0] with actual GPU device like 0,1 or 2\n    ```\n3. Combine some factorized layers for further compression, and calculate the acceleration ratio.\n   Replace the ImageData layer of `temp/cb_3c_3C4x_mem_bn_vgg.prototxt` with [`temp/vgg.prototxt`'s](https://github.com/yihui-he/channel-pruning/blob/master/temp/vgg.prototxt#L1-L49)\n    ```Shell\n    ./combine.sh | xargs ./calflop.sh\n    ```\n    \n4. Finetuning\n    ```Shell\n    caffe train -solver temp/solver.prototxt -weights temp/cb_3c_vgg.caffemodel -gpu [GPU0,GPU1,GPU2,GPU3]\n    # replace [GPU0,GPU1,GPU2,GPU3] with actual GPU device like 0,1,2,3\n    ```\n\n5. Testing\n\n    Though testing is done while finetuning, you can test anytime with:\n    ```Shell\n    caffe test -model path/to/prototxt -weights path/to/caffemodel -iterations 5000 -gpu [GPU0]\n    # replace [GPU0] with actual GPU device like 0,1 or 2\n    ```\n### Pruned models (for download)\n  For fast testing, you can directly download pruned model from [release](https://github.com/yihui-he/channel-pruning/releases): \n  [VGG-16 3C 4X](https://github.com/yihui-he/channel-pruning/releases/tag/VGG-16_3C4x), [VGG-16 5X](https://github.com/yihui-he/channel-pruning/releases/tag/channel_pruning_5x), [ResNet-50 2X](https://github.com/yihui-he/channel-pruning/releases/tag/ResNet-50-2X). Or follow Baidu Yun [Download link](https://pan.baidu.com/s/1c2evwTa)\n  \n  Test with:\n  \n  ```Shell\n  caffe test -model channel_pruning_VGG-16_3C4x.prototxt -weights channel_pruning_VGG-16_3C4x.caffemodel -iterations 5000 -gpu [GPU0]\n  # replace [GPU0] with actual GPU device like 0,1 or 2\n  ```\n### Pruning faster RCNN\nFor fast testing, you can directly download pruned model from [release](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X)  \nOr you can:\n1. clone my py-faster-rcnn repo: https://github.com/yihui-he/py-faster-rcnn\n2. use the [pruned models](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X) from this repo to train faster RCNN 2X, 4X, solver prototxts are in https://github.com/yihui-he/py-faster-rcnn/tree/master/models/pascal_voc\n\n### FAQ\nYou can find answers of some commonly asked questions in our [Github wiki](https://github.com/yihui-he/channel-pruning/wiki), or just create a [new issue](https://github.com/yihui-he/channel-pruning/issues/new)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFF2:11E74B:17B2F3:5E2C80:6AB92D06"},"text_sha256":"abc580f7fe262581aaa1bccecac292d594f6d84bbe194f933e9d56fbaa4f6f4c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1590","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0867:52542:17D897F:1C0086B:6AB92D1F"},"commit":{"sha":"1d66cfff960747ba514bf6580dcd2e17e321e788","url":"https://github.com/ethanhe42/channel-pruning/commit/1d66cfff960747ba514bf6580dcd2e17e321e788","date":"2024-05-02T06:37:42Z","author_date":"2024-05-02T06:37:42Z","committer_date":"2024-05-02T06:37:42Z","tree_sha":"c091161d80c38242bd3b33dc9fef8d42e88049e4","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1589","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:184BD4D:1C736E8:6AB92D1F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6674,"blob_sha":"8103ecbafbf9bb08311b03e9f393b2fb38c4c489","priority":0}],"documents":[{"path":"README.md","size":6674,"blob_sha":"8103ecbafbf9bb08311b03e9f393b2fb38c4c489","priority":0,"status":200,"text":"# Channel Pruning for Accelerating Very Deep Neural Networks\n\n![image](https://github.com/ethanhe42/channel-pruning/assets/10027339/8a7793a8-927f-49bc-84cf-0d33f76d3ae4)\n\n\n[GitHub - yihui-he/channel-pruning: Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)](https://github.com/yihui-he/channel-pruning)\n\n[Channel Pruning for Accelerating Very Deep Neural Networks](https://arxiv.org/abs/1707.06168)\n\n**ICCV 2017**, by [Yihui He](http://yihui-he.github.io/), [Xiangyu Zhang](https://scholar.google.com/citations?user=yuB-cfoAAAAJ&hl=en&oi=ao) and [Jian Sun](http://jiansun.org/)\n\nPlease have a look our new works on compressing deep models: \n\n- [AMC: AutoML for Model Compression and Acceleration on Mobile Devices](http://openaccess.thecvf.com/content_ECCV_2018/html/Yihui_He_AMC_Automated_Model_ECCV_2018_paper.html) **ECCV’18**, which combines channel pruning and reinforcement learning to further accelerate CNN. [code](https://github.com/mit-han-lab/amc-release) and [models](https://github.com/mit-han-lab/amc-compressed-models) are available!\n- [AddressNet: Shift-Based Primitives for Efficient Convolutional Neural Networks](https://arxiv.org/abs/1809.08458) **WACV’19**. We propose a family of efficient networks based on Shift operation.\n- [MoBiNet: A Mobile Binary Network for Image Classification](https://arxiv.org/abs/1907.12629) **WACV’20** Binarized MobileNets.\n\nIn this repository, we released code for the following models:\n\n| model | Speed-up | Accuracy |\n| --- | --- | --- |\n| https://github.com/yihui-he/channel-pruning/releases/tag/channel_pruning_5x | 5x | 88.1 (Top-5), 67.8 (Top-1) |\n| https://github.com/yihui-he/channel-pruning/releases/tag/VGG-16_3C4x | 4x | 89.9 (Top-5), 70.6 (Top-1) |\n| https://github.com/yihui-he/channel-pruning/releases/tag/ResNet-50-2X | 2x | 90.8 (Top-5), 72.3 (Top-1) |\n| https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X | 2x | 36.7 (AP@.50:.05:.95) |\n| https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X | 4x | 35.1 (AP@.50:.05:.95) |\n\n3C method combined spatial decomposition ([Speeding up Convolutional Neural Networks with Low Rank Expansions](https://arxiv.org/abs/1405.3866)) and channel decomposition ([Accelerating Very Deep Convolutional Networks for Classification and Detection](https://arxiv.org/abs/1505.06798)) (mentioned in 4.1.2)\n\n### Citation\n\nIf you find the code useful in your research, please consider citing:\n\n```\n@InProceedings{He_2017_ICCV,\nauthor = {He, Yihui and Zhang, Xiangyu and Sun, Jian},\ntitle = {Channel Pruning for Accelerating Very Deep Neural Networks},\nbooktitle = {The IEEE International Conference on Computer Vision (ICCV)},\nmonth = {Oct},\nyear = {2017}\n}\n```\n\n### requirements\n\n1. Python3 packages you might not have: `scipy`, `sklearn`, `easydict`, use `sudo pip3 install` to install.\n2. For finetuning with 128 batch size, 4 GPUs (~11G of memory)\n\n### Installation (sufficient for the demo)\n\n1. Clone the repository\n    \n    ```bash\n    # Make sure to clone with --recursive\n     git clone --recursive https://github.com/yihui-he/channel-pruning.git\n    ```\n    \n2. Build [my Caffe](https://github.com/yihui-he/caffe-pro) fork (which support bicubic interpolation and resizing image shorter side to 256 then crop to 224x224) \n    \n    ```bash\n    cd caffe\n    \n     # If you're experienced with Caffe and have all of the requirements installed, then simply do:\n     make all -j8 && make pycaffe\n     # Or follow the Caffe installation instructions here:\n     # http://caffe.berkeleyvision.org/installation.html\n    \n     # you might need to add pycaffe to PYTHONPATH, if you've already had a caffe before\n    ```\n    \n3. Download ImageNet classification dataset http://www.image-net.org/download-images\n4. Specify imagenet `source` path in `temp/vgg.prototxt` (line 12 and 36)\n\n### Channel Pruning\n\n*For fast testing, you can directly download pruned model. See [next section](about:blank#pruned-models-for-download)* 1. Download the original VGG-16 model http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel\nmove it to `temp/vgg.caffemodel` (or create a softlink instead)\n\n1. Start Channel Pruning \n    \n    ```bash\n    python3 train.py -action c3 -caffe [GPU0]\n     # or log it with ./run.sh python3 train.py -action c3 -caffe [GPU0]\n     # replace [GPU0] with actual GPU device like 0,1 or 2\n    ```\n    \n2. Combine some factorized layers for further compression, and calculate the acceleration ratio. Replace the ImageData layer of `temp/cb_3c_3C4x_mem_bn_vgg.prototxt` with `[temp/vgg.prototxt`’s](https://github.com/yihui-he/channel-pruning/blob/master/temp/vgg.prototxt#L1-L49) `Shell ./combine.sh | xargs ./calflop.sh`\n3. Finetuning \n    \n    ```bash\n    caffe train -solver temp/solver.prototxt -weights temp/cb_3c_vgg.caffemodel -gpu [GPU0,GPU1,GPU2,GPU3]\n     # replace [GPU0,GPU1,GPU2,GPU3] with actual GPU device like 0,1,2,3\n    ```\n    \n4. Testing\n    \n    Though testing is done while finetuning, you can test anytime with: \n    \n    ```bash\n    caffe test -model path/to/prototxt -weights path/to/caffemodel -iterations 5000 -gpu [GPU0]\n     # replace [GPU0] with actual GPU device like 0,1 or 2\n    ```\n    \n    Pruned models (for download) \n    \n    For fast testing, you can directly download pruned model from [release](https://github.com/yihui-he/channel-pruning/releases): [VGG-16 3C 4X](https://github.com/yihui-he/channel-pruning/releases/tag/VGG-16_3C4x), [VGG-16 5X](https://github.com/yihui-he/channel-pruning/releases/tag/channel_pruning_5x), [ResNet-50 2X](https://github.com/yihui-he/channel-pruning/releases/tag/ResNet-50-2X). Or follow Baidu Yun [Download link](https://pan.baidu.com/s/1c2evwTa)\n    \n\nTest with:\n\n```\ncaffe test -model channel_pruning_VGG-16_3C4x.prototxt -weights channel_pruning_VGG-16_3C4x.caffemodel -iterations 5000 -gpu [GPU0]\n# replace [GPU0] with actual GPU device like 0,1 or 2\n```\n\n### Pruning faster RCNN\n\nFor fast testing, you can directly download pruned model from [release](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X)\nOr you can: 1. clone my py-faster-rcnn repo: https://github.com/yihui-he/py-faster-rcnn 2. use the [pruned models](https://github.com/yihui-he/channel-pruning/releases/tag/faster-RCNN-2X4X) from this repo to train faster RCNN 2X, 4X, solver prototxts are in https://github.com/yihui-he/py-faster-rcnn/tree/master/models/pascal_voc\n\n### FAQ\n\nYou can find answers of some commonly asked questions in our [Github wiki](https://github.com/yihui-he/channel-pruning/wiki), or just create a [new issue](https://github.com/yihui-he/channel-pruning/issues/new)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"42C4:7A4F8:183F68:5EBAA9:6AB92D1E"},"text_sha256":"2f682a2d3801abc39a864f6490ac0ed97b7b30159fbe0fdeca228d198f31e59c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"brightmart/text_classification","input_row":{"repository":"brightmart/text_classification","url":"https://github.com/brightmart/text_classification","name":"text_classification","owner":"brightmart","description":"all kinds of text classification models and more with deep learning","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":7936,"issues":124,"created_at":"2017-05-30T14:25:42Z","updated_at":"2026-09-24T06:07:25Z","first_commit_at":"2017-05-30T14:20:54Z","last_commit_at":"2022-09-21T06:47:05Z","activity_months":63.719999999999999,"ai_ml_match_topics":"convolutional-neural-networks; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:08.110Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"brightmart/text_classification","visibility":"public","created_at":"2017-05-30T14:25:42Z","updated_at":"2026-09-24T06:07:25Z","private":false,"fork":false,"archived":false,"stargazers_count":7936,"open_issues_count":46,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1588","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0887:3203A7:17AC198:1BD3D9E:6AB92D20"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1587","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DF:76AED:180B467:1C334E4:6AB92D20"},"commit":{"sha":"6464a79d987c34e7fc77eb0147fa5d7df37fcc02","url":"https://github.com/brightmart/text_classification/commit/6464a79d987c34e7fc77eb0147fa5d7df37fcc02","date":"2018-05-23T03:02:50Z","author_date":"2018-05-23T03:02:50Z","committer_date":"2018-05-23T03:02:50Z","tree_sha":"ac76318bb5719b588232bbc4460a9b5d870f2aec","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1586","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:17BF566:1BE7521:6AB92D20"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":28602,"blob_sha":"402cdd44c5dfbd52e9e3d9633ee0d4c496848ec5","priority":0}],"documents":[{"path":"README.md","size":28602,"blob_sha":"402cdd44c5dfbd52e9e3d9633ee0d4c496848ec5","priority":0,"status":200,"text":"Text Classification\n-------------------------------------------------------------------------\nthe purpose of this repository is to explore text classification methods in NLP with deep learning.\n\nUPDATE: \n\n1. <a href='https://github.com/brightmart/ai_law'>\n    Apply AI in law cases task(AI_LAW): Predict the name of crimes(accusations), relevant-articles given facts of law cases<\/a>, has been released \n\n2. <a href='https://github.com/brightmart/nlu_sim'>sentence similarity project has been released<\/a> you can check it if you like.\n\n3. if you want to try a model now, you can go to folder 'a02_TextCNN', run 'python -u p7_TextCNN_train.py', it will use sample data to train a model, and print loss and F1 score periodically.\n\nit has all kinds of baseline models for text classificaiton.\n\nit also support for multi-label classification where multi label associate with an sentence or document.\n\nalthough many of these models are simple, and may not get you to top level of the task.but some of these models are very classic, so they may be good to serve as baseline models.\n\neach model has a test function under model class. you can run it to performance toy task first. the model is indenpendent from dataset.\n\n<a href='https://github.com/brightmart/text_classification/blob/master/multi-label-classification.pdf'>check here for formal report of large scale multi-label text classification with deep learning<\/a>\n\nserveral modes here can also be used for modelling question answering (with or without context), or to do sequences generating. \n\nwe explore two seq2seq model(seq2seq with attention,transformer-attention is all you need) to do text classification. and these two models can also be used for sequences generating and other tasks. if you task is a multi-label classification, you can cast the problem to sequences generating.\n\nwe implement two memory network. one is dynamic memory network. previously it reached state of art in question answering, sentiment analysis and sequence generating tasks. it is so called one model to do serveral different tasks, and reach high performance. it has four modules. the key component is episodic memory module. it use gate mechanism to performance attention, and use gated-gru to update episode memory, then it has another gru( in a vertical direction) to pefromance hidden state update. it has ability to do transitive inference.\n\nthe second memory network we implemented is recurrent entity network: tracking state of the world. it has blocks of key-value pairs as memory, run in parallel, which achieve new state of art. it can be used for modelling question answering with contexts(or history). for example, you can let the model to read some sentences(as context), and ask a question(as query), then ask the model to predict an answer; if you feed story same as query, then it can do classification task. \n\nif you need some sample data and word embedding pertrained on word2vec, you can find it in closed issues, such as:<a href=\"https://github.com/brightmart/text_classification/issues/3\">issue 3<\/a>. \n\nyou can also find some sample data at folder \"data\". it contains two files:'sample_single_label.txt', contains 50k data with single label; 'sample_multiple_label.txt', contains 20k data with multiple labels. input and label of is separate by \"   __label__\".\n\nif you want to know more detail about dataset of text classification or task these models can be used, one of choose is below:\nhttps://biendata.com/competition/zhihu/\n\n\nModels:\n-------------------------------------------------------------------------\n\n1) fastText\n2) TextCNN   \n3) TextRNN    \n4) RCNN     \n5) Hierarchical Attention Network    \n6) seq2seq with attention   \n7) Transformer(\"Attend Is All You Need\")\n8) Dynamic Memory Network\n9) EntityNetwork:tracking state of the world\n10) Ensemble models\n11) Boosting: \n\n    for a single model, stack identical models together. each layer is a model. the result will be based on logits added together. the only connection between layers are label's weights. the front layer's prediction error rate of each label will become weight for the next layers. those labels with high error rate will have big weight. so later layer's will pay more attention to those mis-predicted labels, and try to fix previous mistake of former layer. as a result, we will get a much strong model.\n    check a00_boosting/boosting.py\n\nand other models:\n\n1) BiLstmTextRelation;\n\n2) twoCNNTextRelation;\n\n3) BiLstmTextRelationTwoRNN\n\nPerformance\n-------------------------------------------------------------------------\n\n(mulit-label label prediction task,ask to prediction top5, 3 million training data,full score:0.5)\n\nModel   | fastText|TextCNN|TextRNN| RCNN | HierAtteNet|Seq2seqAttn|EntityNet|DynamicMemory|Transformer\n---     | ---     | ---   | ---   |---   |---         |---        |---      |---          |----\nScore   | 0.362   |  0.405| 0.358 | 0.395| 0.398      |0.322      |0.400    |0.392        |0.322\nTraining| 10m     |  2h   |10h    | 2h   | 2h         |3h         |3h       |5h           |7h\n--------------------------------------------------------------------------------------------------\n\n Ensemble of TextCNN,EntityNet,DynamicMemory: 0.411\n \n Ensemble EntityNet,DynamicMemory: 0.403\n \n --------------------------------------------------------------------------------------------------\n \n Notice: \n \n `m` stand for **minutes**; `h` stand for **hours**;\n \n`HierAtteNet` means Hierarchical Attention Networkk;\n\n`Seq2seqAttn` means Seq2seq with attention;\n\n`DynamicMemory` means DynamicMemoryNetwork;\n\n`Transformer` stand for model from 'Attention Is All You Need'.\n\nUseage:\n-------------------------------------------------------------------------------------------------------\n1) model is in `xxx_model.py`\n2) run python `xxx_train.py` to train the model\n3) run python `xxx_predict.py` to do inference(test).\n\nEach model has a test method under the model class. you can run the test method first to check whether the model can work properly.\n\n-------------------------------------------------------------------------\n\nEnvironment:\n-------------------------------------------------------------------------------------------------------\npython 2.7+ tensorflow 1.1\n\n(tensorflow 1.2,1.3,1.4 also works; most of models should also work fine in other tensorflow version, since we use very few features bond to certain version; if you use python 3.5, it will be fine as long as you change print/try catch function)\n\nTextCNN model is already transfomed to python 3.6\n\n-------------------------------------------------------------------------\n\nNotice:\n-------------------------------------------------------------------------------------------------------\nSome util function is in data_util.py; \ntypical input like: \"x1 x2 x3 x4 x5 __label__ 323434\" where 'x1,x2' is words, '323434' is label;\nit has a function to load and assign pretrained word embedding to the model,where word embedding is pretrained in word2vec or fastText. \n\nModels Detail:\n-------------------------------------------------------------------------\n\n1.fastText:  \n-------------\nimplmentation of <a href=\"https://arxiv.org/abs/1607.01759\">Bag of Tricks for Efficient Text Classification<\/a>\n\nafter embed each word in the sentence, this word representations are then averaged into a text representation, which is in turn fed to a linear classifier.it use softmax function to compute the probability distribution over the predefined classes. then cross entropy is used to compute loss. bag of word representation does not consider word order. in order to take account of word order, n-gram features is used to capture some partial information about the local word order; when the number of classes is large, computing the linear classifier is computational expensive. so it usehierarchical softmax to speed training process.\n1) use bi-gram and/or tri-gram\n2) use NCE loss to speed us softmax computation(not use hierarchy softmax as original paper)\n\nresult: performance is as good as paper, speed also very fast.\n\ncheck: p5_fastTextB_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/fastText.JPG)\n-------------------------------------------------------------------------\n\n2.TextCNN:\n-------------\nImplementation of <a href=\"http://www.aclweb.org/anthology/D14-1181\"> Convolutional Neural Networks for Sentence Classification <\/a>\n\nStructure:embedding--->conv--->max pooling--->fully connected layer-------->softmax\n\nCheck: p7_TextCNN_model.py\n\nIn order to get very good result with TextCNN, you also need to read carefully about this paper <a href=\"https://arxiv.org/abs/1510.03820\">A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification<\/a>: it give you some insights of things that can affect performance. although you need to  change some settings according to your specific task.\n\nConvolutional Neural Network is main building box for solve problems of computer vision. Now we will show how CNN can be used for NLP, in in particular, text classification. Sentence length will be different from one to another. So we will use pad to get fixed length, n. For each token in the sentence, we will use word embedding to get a fixed dimension vector, d. So our input is a 2-dimension matrix:(n,d). This is similar with image for CNN. \n\nFirstly, we will do convolutional operation to our input. It is a element-wise multiply between filter and part of input. We use k number of filters, each filter size is a 2-dimension matrix (f,d). Now the output will be k number of lists. Each list has a length of n-f+1. each element is a scalar. Notice that the second dimension will be always the dimension of word embedding. We are using different size of filters to get rich features from text inputs. And this is something similar with n-gram features. \n\nSecondly, we will do max pooling for the output of convolutional operation. For k number of lists, we will get k number of scalars. \n\nThirdly, we will concatenate scalars to form final features. It is a fixed-size vector. And it is independent from the size of filters we use.\n\nFinally, we will use linear layer to project these features to per-defined labels.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/TextCNN.JPG)\n\n-------------------------------------------------------------------------\n\n\n3.TextRNN\n-------------\nStructure v1:embedding--->bi-directional lstm--->concat output--->average----->softmax layer\n\ncheck: p8_TextRNN_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/bi-directionalRNN.JPG)\n\nStructure v2:embedding-->bi-directional lstm---->dropout-->concat ouput--->lstm--->droput-->FC layer-->softmax layer\n\ncheck: p8_TextRNN_model_multilayer.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/emojifier-v2.png)\n\n\n-------------------------------------------------------------------------\n\n\n4.BiLstmTextRelation\n-------------\nStructure same as TextRNN. but input is special designed. e.g.input:\"how much is the computer? EOS price of laptop\". where 'EOS' is a special\ntoken spilted question1 and question2.\n\ncheck:p9_BiLstmTextRelation_model.py\n\n\n-------------------------------------------------------------------------\n\n\n5.twoCNNTextRelation\n-------------\nStructure: first use two different convolutional to extract feature of two sentences. then concat two features. use linear\ntransform layer to out projection to target label, then softmax.\n\ncheck: p9_twoCNNTextRelation_model.py\n\n\n-------------------------------------------------------------------------\n\n\n6.BiLstmTextRelationTwoRNN\n-------------\nStructure: one bi-directional lstm for one sentence(get output1), another bi-directional lstm for another sentence(get output2). then:\nsoftmax(output1*M*output2)\n\ncheck:p9_BiLstmTextRelationTwoRNN_model.py\n\nfor more detail you can go to: <a herf=\"http://www.wildml.com/2016/07/deep-learning-for-chatbots-2-retrieval-based-model-tensorflow\">Deep Learning for Chatbots, Part 2 – Implementing a Retrieval-Based Model in Tensorflow<a>\n\n\n-------------------------------------------------------------------------\n\n\n7.RCNN:\n-------------\nRecurrent convolutional neural network for text classification\n\nimplementation of <a href=\"https://scholar.google.com.hk/scholar?q=Recurrent+Convolutional+Neural+Networks+for+Text+Classification&hl=zh-CN&as_sdt=0&as_vis=1&oi=scholart&sa=X&ved=0ahUKEwjpx82cvqTUAhWHspQKHUbDBDYQgQMIITAA\"> Recurrent Convolutional Neural Network for Text Classification <\/a>\n \nstructure:1)recurrent structure (convolutional layer) 2)max pooling 3) fully connected layer+softmax\n\nit learn represenation of each word in the sentence or document with left side context and right side context:\n\nrepresentation current word=[left_side_context_vector,current_word_embedding,right_side_context_vecotor].\n\nfor left side context, it use a recurrent structure, a no-linearity transfrom of previous word and left side previous context; similarly to right side context.\n\ncheck: p71_TextRCNN_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/RCNN.JPG)\n\n-------------------------------------------------------------------------\n\n8.Hierarchical Attention Network:\n-------------\nImplementation of <a href=\"https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf\">Hierarchical Attention Networks for Document Classification<\/a>\n\nStructure:\n\n1) embedding \n\n2) Word Encoder: word level bi-directional GRU to get rich representation of words\n\n3) Word Attention:word level attention to get important information in a sentence\n\n4) Sentence Encoder: sentence level bi-directional GRU to get rich representation of sentences\n\n5) Sentence Attetion: sentence level attention to get important sentence among sentences\n\n5) FC+Softmax\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/HAN.JPG)\n\nIn NLP, text classification can be done for single sentence, but it can also be used for multiple sentences. we may call it document classification. Words are form to sentence. And sentence are form to document. In this circumstance, there may exists a intrinsic structure. So how can we model this kinds of task? Does all parts of document are equally relevant? And how we determine which part are more important than another?\n\nIt has two unique features: \n\n1)it has a hierarchical structure that reflect the hierarchical structure of documents; \n\n2)it has two levels of attention mechanisms used at the word and sentence-level. it enable the model to capture important information in different levels.\n\nWord Encoder:\nFor each words in a sentence, it is embedded into word vector in distribution vector space. It use a bidirectional GRU to encode the sentence. By concatenate vector from two direction, it now can form a representation of the sentence, which also capture contextual information.\n\nWord Attention:\nSame words are more important than another for the sentence. So attention mechanism is used. It first use one layer MLP to get uit hidden representation of the sentence, then measure the importance of the word as the similarity of uit with a word level context vector uw and get a normalized importance through a softmax function. \n\nSentence Encoder: \nfor sentence vectors, bidirectional GRU is used to encode it. Similarly to word encoder.\n\nSentence Attention: \nsentence level vector is used to measure importance among sentences. Similarly to word attention.\n\nInput of data: \n\nGenerally speaking, input of this model should have serveral sentences instead of sinle sentence. shape is:[None,sentence_lenght]. where None means the batch_size.\n\nIn my training data, for each example, i have four parts. each part has same length. i concat four parts to form one single sentence. the model will split the sentence into four parts, to form a tensor with shape:[None,num_sentence,sentence_length]. where num_sentence is number of sentences(equal to 4, in my setting).\n\ncheck:p1_HierarchicalAttention_model.py\n\n\n-------------------------------------------------------------------------\n\n9.Seq2seq with attention\n-------------\nImplementation seq2seq with attention derived from <a href=\"https://arxiv.org/pdf/1409.0473.pdf\">NEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE<\/a>\n\nI.Structure:\n\n1)embedding 2)bi-GRU too get rich representation from source sentences(forward & backward). 3)decoder with attention.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/seq2seqAttention.JPG)\n\nII.Input of data:\n\nthere are two kinds of three kinds of inputs:1)encoder inputs, which is a sentence; 2)decoder inputs, it is labels list with fixed length;3)target labels, it is also a list of labels.\n\nfor example, labels is:\"L1 L2 L3 L4\", then decoder inputs will be:[_GO,L1,L2,L2,L3,_PAD]; target label will be:[L1,L2,L3,L3,_END,_PAD]. length is fixed to 6, any exceed labels will be trancated, will pad if label is not enough to fill.\n\nIII.Attention Mechanism:\n\n1) transfer encoder input list and hidden state of decoder\n\n2) calculate similiarity of hidden state with each encoder input, to get possibility distribution for each encoder input.\n\n3) weighted sum of encoder input based on possibility distribution.\n\n   go though RNN Cell using this weight sum together with decoder input to get new hidden state\n\nIV.How Vanilla Encoder Decoder Works:\n\nthe source sentence will be encoded using RNN as fixed size vector (\"thought vector\"). then during decoder:\n\n1) when it is training, another RNN will be used to try to get a word by using this \"thought vector\"  as init state, and take input from decoder input at each timestamp. decoder start from special token \"_GO\". \nafter one step is performanced, new hidden state will be get and together with new input, we can continue this process until we reach to a special token \"_END\". \nwe can calculate loss by compute cross entropy loss of logits and target label. logits is get through a projection layer for the hidden state(for output of decoder step(in GRU we can just use hidden states from decoder as output).\n\n2) when it is testing, there is no label. so we should feed the output we get from previous timestamp, and continue the process util we reached \"_END\" TOKEN.\n\nV.Notices:\n\n1) here i use two kinds of vocabularies. one is from words,used by encoder; another is for labels,used by decoder\n\n2) for vocabulary of lables, i insert three special token:\"_GO\",\"_END\",\"_PAD\"; \"_UNK\" is not used, since all labels is pre-defined.\n\n-------------------------------------------------------------------------\n\n10.Transformer(\"Attention Is All You Need\")\n-------------\nStatus: it was able to do task classification. and able to generate reverse order of its sequences in toy task. you can check it by running test function in the model. check: a2_train_classification.py(train) or a2_transformer_classification.py(model)\n\nwe do it in parallell style.layer normalization,residual connection, and mask are also used in the model. \n\nFor every building blocks, we include a test function in the each file below, and we've test each small piece successfully.\n\nSequence to sequence with attention is a typical model to solve sequence generation problem, such as translate, dialogue system. most of time, it use RNN as buidling block to do these tasks. util recently, people also apply convolutional Neural Network for sequence to sequence problem. Transformer, however, it perform these tasks solely on attention mechansim. it is fast and acheive new state-of-art result.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/attention_is_all_you_need.JPG)\n\nIt also has two main parts: encoder and decoder. below is desc from paper:\n\nEncoder:\n\n6 layers.each layers has two sub-layers.\nthe first is multi-head self-attention mechanism;\nthe second is position-wise fully connected feed-forward network.\nfor each sublayer. use LayerNorm(x+Sublayer(x)). all dimension=512.\n\nDecoder:\n\n1. The decoder is composed of a stack of N= 6 identical layers.\n2. In addition to the two sub-layers in each encoder layer, the decoder inserts a third sub-layer, which performs multi-head\nattention over the output of the encoder stack.\n3. Similar to the encoder, we employ residual connections\naround each of the sub-layers, followed by layer normalization. We also modify the self-attention\nsub-layer in the decoder stack to prevent positions from attending to subsequent positions.  This\nmasking, combined with fact that the output embeddings are offset by one position, ensures that the\npredictions for position i can depend only on the known outputs at positions less than i.\n\nMain Take away from this model:\n\n1) multi-head self attention: use self attention, linear transform multi-times to get projection of key-values, then do ordinary attention; 2) some tricks to improve performance(residual connection,position encoding, poistion feed forward, label smooth, mask to ignore things we want to ignore).\n\nUse this model to do task classification:\n\nHere we only use encode part for task classification, removed resdiual connection, used only 1 layer.no need to use mask. we use multi-head attention and postionwise feed forward to extract features of input sentence, then use linear layer to project it to get logits.\n\nfor detail of the model, please check: a2_transformer_classification.py\n\n-------------------------------------------------------------------------\n\n11.Recurrent Entity Network\n-------------------------------------------------------------------------\nInput:1. story: it is multi-sentences, as context. 2.query: a sentence, which is a question, 3. ansewr: a single label.\n\nModel Structure:\n\n1) Input encoding: use bag of word to encode story(context) and query(question); take account of position by using position mask\n\n   by using bi-directional rnn to encode story and query, performance boost from 0.392 to 0.398, increase 1.5%.\n\n2) Dynamic memory: \n\na. compute gate by using 'similiarity' of keys,values with input of story. \n\nb. get candidate hidden state by transform each key,value and input.\n\nc. combine gate and candidate hidden state to update current hidden state.\n\n3) Output moudle( use attention mechanism):\na. to get possibility distribution by computing 'similarity' of query and hidden state\n\nb. get weighted sum of hidden state using possibility distribution.\n\nc. non-linearity transform of query and hidden state to get predict label.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/EntityNet.JPG)\n\nMain take away from this model:\n\n1) use blocks of keys and values, which is independent from each other. so it can be run in parallel.\n\n2) modelling context and question together. use memory to track state of world; and use non-linearity transform of hidden state and question(query) to make a prediction.\n\n3) simple model can also achieve very good performance. simple encode as use bag of word.\n\nfor detail of the model, please check: a3_entity_network.py\n\nunder this model, it has a test function, which ask this model to count numbers both for story(context) and query(question). but weights of story is smaller than query.\n\n-------------------------------------------------------------------------\n\n12.Dynamic Memory Network\n-------------------------------------------------------------------------\nOutlook of Model:\n\n1.Input Module: encode raw texts into vector representation\n\n2.Question Module: encode question into vector representation\n\n3.Episodic Memory Module: with inputs,it chooses which parts of inputs to focus on through the attention mechanism, taking into account of question and previous memory====>it poduce a 'memory' vecotr.\n\n4.Answer Module:generate an answer from the final memory vector.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/DMN.JPG)\n\nDetail:\n\n1.Input Module:\n\n  a.single sentence: use gru to get hidden state\n  b.list of sentences: use gru to get the hidden states for each sentence. e.g. [hidden states 1,hidden states 2, hidden states...,hidden state n]\n  \n2.Question Module:\n  use gru to get hidden state\n  \n3.Episodic Memory Module:\n\n  use an attention mechanism and recurrent network to updates its memory. \n     \n  a. gate as attention mechanism:\n  \n     two-layer feed forward nueral network.input is candidate fact c,previous memory m and question q. features get by take: element-wise,matmul and absolute distance of q with c, and q with m.\n     \n  b.memory update mechanism: take candidate sentence, gate and previous hidden state, it use gated-gru to update hidden state. like: h=f(c,h_previous,g). the final hidden state is the input for answer module.\n  \n  c.need for multiple episodes===>transitive inference. \n  \n  e.g. ask where is the football? it will attend to sentence of \"john put down the football\"), then in second pass, it need to attend location of john.\n\n4.Answer Module:\ntake the final epsoidic memory, question, it update hidden state of answer module.\n\n-------------------------------------------------------------------------\n\nTODO \n-------------------------------------------------------------------------------------------------------\n1.Character-level Convolutional Networks for Text Classification\n\n2.Convolutional Neural Networks for Text Categorization:Shallow Word-level vs. Deep Character-level\n\n3.Very Deep Convolutional Networks for Text Classification\n\n4.Adversarial Training Methods For Semi-supervised Text Classification\n\n5.Ensemble Models\n\n\nConclusion:\n-------------------------------------------------------------------------\nDuring the process of doing large scale of multi-label classification, serveral lessons has been learned, and some list as below:\n\n1) What is most important thing to reach a high accuracy? \nIt depend the task you are doing. From the task we conducted here, we believe that ensemble models based on models trained from multiple features including word, character for title and description can help to reach very high accuarcy; However, in some cases,as just alphaGo Zero demonstrated, algorithm is more important then data or computational power, in fact alphaGo Zero did not use any humam data. \n\n2) Is there a ceiling for any specific model or algorithm?\nThe answer is yes. lots of different models were used here, we found many models have similiar performances, even though there are quite different in structure. In some extent, the difference of performance is not so big.\n\n3) Is case study of error useful?\nI think it is quite useful especially when you have done many different things, but reached a limit. For example, by doing case study, you can find labels that models can make correct prediction, and where they make mistakes. And to imporove performance by  increasing weights of these wrong predicted labels or finding potential errors from data.\n\n4) How can we become expert in a specific of Machine Learning?\nIn my opinion,join a machine learning competation or begin a task with lots of data, then read papers and implement some, is a good starting point. So we will have some really experience and ideas of handling specific task, and know the challenges of it.\nBut what's more important is that we should not only follow ideas from papers, but to explore some new ideas we think may help to slove the problem. For example, by changing structures of classic models or even invent some new structures, we may able to tackle the problem in a much better way as it may more suitable for task we are doing.\n\nReference:\n-------------------------------------------------------------------------------------------------------\n1.Bag of Tricks for Efficient Text Classification\n\n2.Convolutional Neural Networks for Sentence Classification\n\n3.A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification\n\n4.Deep Learning for Chatbots, Part 2 – Implementing a Retrieval-Based Model in Tensorflow, from www.wildml.com\n\n5.Recurrent Convolutional Neural Network for Text Classification\n\n6.Hierarchical Attention Networks for Document Classification\n\n7.Neural Machine Translation by Jointly Learning to Align and Translate\n\n8.Attention Is All You Need\n\n9.Ask Me Anything:Dynamic Memory Networks for Natural Language Processing\n\n10.Tracking the state of world with recurrent entity networks\n\n11.Ensemble Selection from Libraries of Models\n\n\n-------------------------------------------------------------------------\n\nto be continued. for any problem, concat brightmart@hotmail.com\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7A:7A4F8:183F7C:5EBADB:6AB92D1E"},"text_sha256":"6932d487103d21cde32bef6d0cc61848e5ef3ebb51e73f2f294fdc5f11fa6750"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1585","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FF:71E0C:1806DA2:1C2D8BD:6AB92D21"},"commit":{"sha":"091ff9910839ba5053302383af99762c0c91a992","url":"https://github.com/brightmart/text_classification/commit/091ff9910839ba5053302383af99762c0c91a992","date":"2022-09-21T06:47:05Z","author_date":"2022-09-21T06:47:05Z","committer_date":"2022-09-21T06:47:05Z","tree_sha":"15ad140988bfc114793ec6e361032b3886e1c02b","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1584","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0928:71C58:17CE68B:1BF6736:6AB92D22"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":38382,"blob_sha":"dc88fa664e52dd52218cba186d8c4fc8dbe5fed0","priority":0}],"documents":[{"path":"README.md","size":38382,"blob_sha":"dc88fa664e52dd52218cba186d8c4fc8dbe5fed0","priority":0,"status":200,"text":"Text Classification\n-------------------------------------------------------------------------\nThe purpose of this repository is to explore text classification methods in NLP with deep learning.\n\n#### Update: \n\nCustomize an NLP API in three minutes, for free: <a href='https://www.cluebenchmarks.com/clueai.html'>NLP API Demo<\/a>\n\nLanguage Understanding Evaluation benchmark for Chinese(<a href='https://www.CLUEbenchmarks.com'>CLUE benchmark<a/>): run 10 tasks & 9 baselines with one line of code, performance comparision with details.\n\nReleasing Pre-trained Model of <a href=\"https://github.com/brightmart/albert_zh\">ALBERT_Chinese<\/a> Training with 30G+ Raw Chinese Corpus, xxlarge, xlarge and more, Target to match State of the Art performance in Chinese, 2019-Oct-7, During the National Day of China!\n \n<a href='https://github.com/brightmart/nlp_chinese_corpus'>Large Amount of Chinese Corpus for NLP Available!<\/a>\n\nGoogle's BERT achieved new state of art result on more than 10 tasks in NLP using pre-train in language model then \n\nfine-tuning. <a href='https://github.com/brightmart/bert_language_understanding'>Pre-train TexCNN: idea from BERT for language understanding with running code and data set<\/a>\n\n\n#### Introduction\nit has all kinds of baseline models for text classification.\n\nit also support for multi-label classification where multi labels associate with an sentence or document.\n\nalthough many of these models are simple, and may not get you to top level of the task. but some of these models are very \n\nclassic, so they may be good to serve as baseline models. each model has a test function under model class. you can run \n\nit to performance toy task first. the model is independent from data set.\n\n<a href='https://github.com/brightmart/text_classification/blob/master/multi-label-classification.pdf'>check here for formal report of large scale multi-label text classification with deep learning<\/a>\n\nseveral models here can also be used for modelling question answering (with or without context), or to do sequences generating. \n\nwe explore two seq2seq model(seq2seq with attention,transformer-attention is all you need) to do text classification. \n\nand these two models can also be used for sequences generating and other tasks. if your task is a multi-label classification, \n\nyou can cast the problem to sequences generating.\n\nwe implement two memory network. one is dynamic memory network. previously it reached state of art in question \n\nanswering, sentiment analysis and sequence generating tasks. it is so called one model to do several different tasks, \n\nand reach high performance. it has four modules. the key component is episodic memory module. it use gate mechanism to \n\nperformance attention, and use gated-gru to update episode memory, then it has another gru( in a vertical direction) to \n\nperformance hidden state update. it has ability to do transitive inference.\n\nthe second memory network we implemented is recurrent entity network: tracking state of the world. it has blocks of \n\nkey-value pairs as memory, run in parallel, which achieve new state of art. it can be used for modelling question \n\nanswering with contexts(or history). for example, you can let the model to read some sentences(as context), and ask a \n\nquestion(as query), then ask the model to predict an answer; if you feed story same as query, then it can do \n\nclassification task. \n\nTo discuss ML/DL/NLP problems and get tech support from each other, you can join QQ group: 836811304\n\nModels:\n-------------------------------------------------------------------------\n\n1) fastText\n2) TextCNN \n3) Bert:Pre-training of Deep Bidirectional Transformers for Language Understanding  \n4) TextRNN    \n5) RCNN     \n6) Hierarchical Attention Network    \n7) seq2seq with attention   \n8) Transformer(\"Attend Is All You Need\")\n9) Dynamic Memory Network\n10) EntityNetwork:tracking state of the world\n11) Ensemble models\n12) Boosting: \n\n    for a single model, stack identical models together. each layer is a model. the result will be based on logits added together. the only connection between layers are label's weights. the front layer's prediction error rate of each label will become weight for the next layers. those labels with high error rate will have big weight. so later layer's will pay more attention to those mis-predicted labels, and try to fix previous mistake of former layer. as a result, we will get a much strong model.\n    check a00_boosting/boosting.py\n\nand other models:\n\n1) BiLstmTextRelation;\n\n2) twoCNNTextRelation;\n\n3) BiLstmTextRelationTwoRNN\n\nPerformance\n-------------------------------------------------------------------------\n\n(mulit-label label prediction task,ask to prediction top5, 3 million training data,full score:0.5)\n\nModel   | fastText|TextCNN|TextRNN| RCNN | HierAtteNet|Seq2seqAttn|EntityNet|DynamicMemory|Transformer\n---     | ---     | ---   | ---   |---   |---         |---        |---      |---          |----\nScore   | 0.362   |  0.405| 0.358 | 0.395| 0.398      |0.322      |0.400    |0.392        |0.322\nTraining| 10m     |  2h   |10h    | 2h   | 2h         |3h         |3h       |5h           |7h\n--------------------------------------------------------------------------------------------------\n \n Bert model achieves 0.368 after first 9 epoch from validation set.\n \n Ensemble of TextCNN,EntityNet,DynamicMemory: 0.411\n \n Ensemble EntityNet,DynamicMemory: 0.403\n \n\n \n --------------------------------------------------------------------------------------------------\n \n Notice: \n \n `m` stand for **minutes**; `h` stand for **hours**;\n \n`HierAtteNet` means Hierarchical Attention Networkk;\n\n`Seq2seqAttn` means Seq2seq with attention;\n\n`DynamicMemory` means DynamicMemoryNetwork;\n\n`Transformer` stand for model from 'Attention Is All You Need'.\n\nUsage:\n-------------------------------------------------------------------------------------------------------\n1) model is in `xxx_model.py`\n2) run python `xxx_train.py` to train the model\n3) run python `xxx_predict.py` to do inference(test).\n\nEach model has a test method under the model class. you can run the test method first to check whether the model can work properly.\n\n-------------------------------------------------------------------------\n\nEnvironment:\n-------------------------------------------------------------------------------------------------------\npython 2.7+ tensorflow 1.8 \n\n(tensorflow 1.1 to 1.13 should also works; most of models should also work fine in other tensorflow version, since we \n\nuse very few features bond to certain version.\n\nif you use python3, it will be fine as long as you change print/try catch function in case you meet any error.\n\nTextCNN model is already transfomed to python 3.6\n\n\nSample data: <a href='https://pan.baidu.com/s/1yWZf2eAPxq15-r2hHk2M-Q'>cached file of baidu<\/a> or <a href=\"https://drive.google.com/drive/folders/0AKEuT4gza2AlUk9PVA\">Google Drive:<\/a>send me an email\n-------------------------------------------------------------------------------------------------------\nto help you run this repository, currently we re-generate training/validation/test data and vocabulary/labels, and saved \n\nthem as cache file using h5py. we suggest you to download it from above link.\n\nit contain everything you need to run this repository: data is pre-processed, you can start to train the model in a minute.\n  \nit's a zip file about 1.8G, contains 3 million training data. although after unzip it's quite big, but with the help of \n\nhdf5, it only need a normal size of memory of computer(e.g.8 G or less) during training.\n\nwe use jupyter notebook: <a href='https://github.com/brightmart/text_classification/blob/master/pre-processing.ipynb'>pre-processing.ipynb<\/a> to pre-process data. you can have a better understanding of this task and \n\ndata by taking a look of it. you can also generate data by yourself in the way your want, just change few lines of code \n\nusing this jupyter notebook.\n\nIf you want to try a model now, you can dowload cached file from above, then go to folder 'a02_TextCNN', run \n        \n     python  p7_TextCNN_train.py \n   \nit will use data from cached files to train the model, and print loss and F1 score periodically.\n\nold sample data source:\nif you need some sample data and word embedding per-trained on word2vec, you can find it in closed issues, such as: <a href=\"https://github.com/brightmart/text_classification/issues/3\">issue 3<\/a>. \n\nyou can also find some sample data at folder \"data\". it contains two files:'sample_single_label.txt', contains 50k data \n\nwith single label; 'sample_multiple_label.txt', contains 20k data with multiple labels. input and label of is separate by \"   __label__\".\n\nif you want to know more detail about data set of text classification or task these models can be used, one of choose is below:\n\nhttps://biendata.com/competition/zhihu/\n\nRoad Map\n-------------------------------------------------------------------------------------------------------\nOne way you can use this repository:\n \nstep 1: you can read through this article. you will get a general idea of various classic models used to do text classification.\n\nstep 2: pre-process data and/or download cached file.\n\n      a. take a look a look of jupyter notebook('pre-processing.ipynb'), where you can familiar with this text \n\n           classification task and data set. you will also know how we pre-process data and generate training/validation/test \n           \n           set. there are a list of things you can try at the end of this jupyter.\n\n       b. download zip file that contains cached files, so you will have all necessary data, and can start to train models.\n\nstep 3: run some of models list here, and change some codes and configurations as you want, to get a good performance.\n\n      record performances, and things you done that works, and things that are not.\n\n      for example, you can take this sequence to explore: \n      \n      1) fasttext---> 2)TextCNN---> 3)Transformer---> 4)BERT\n\nadditionally, write your article about this topic, you can follow paper's style to write. you may need to read some papers\n       \n       on the way, many of these papers list in the # Reference at the end of this article; or join  a machine learning \n       \n       competition, and apply it with what you've learned. \n       \nUse Your Own Data:\n-------------------------------------------------------------------------------------------------------\nreplace data in 'data/sample_multiple_label.txt', and make sure format as below:\n\n'word1 word2 word3 __label__l1 __label__l2 __label__l3'\n \nwhere part1: 'word1 word2 word3' is input(X), part2: '__label__l1 __label__l2 __label__l3' \n\nrepresenting there are three labels: [l1,l2,l3]. between part1 and part2 there should be a empty string: ' '.\n\nfor example: each line (multiple labels) like: \n\n'w5466 w138990 w1638 w4301 w6 w470 w202 c1834 c1400 c134 c57 c73 c699 c317 c184 __label__5626661657638885119 __label__4921793805334628695 __label__8904735555009151318'\n\nwhere '5626661657638885119','4921793805334628695'，‘8904735555009151318’ are three labels associate with this input string 'w5466 w138990...c699 c317 c184'\n\nNotice:\n\n\nSome util function is in data_util.py;  check load_data_multilabel() of data_util for how process input and labels from raw data.\n\nthere is a function to load and assign pretrained word embedding to the model,where word embedding is pretrained in word2vec or fastText. \n\nPretrain Work Embedding:\n-------------------------------------------------------------------------------------------------------\nif word2vec.load not works, you may load pretrained word embedding, especially for chinese word embedding use following lines:\n\nimport gensim\n\nfrom gensim.models import KeyedVectors\n\nword2vec_model = KeyedVectors.load_word2vec_format(word2vec_model_path, binary=True, unicode_errors='ignore')  #\n\nor you can turn off use pretrain word embedding flag to false to disable loading word embedding.\n\n\nModels Detail:\n-------------------------------------------------------------------------\n\n1.fastText:  \n-------------\nimplmentation of <a href=\"https://arxiv.org/abs/1607.01759\">Bag of Tricks for Efficient Text Classification<\/a>\n\nafter embed each word in the sentence, this word representations are then averaged into a text representation, which is in turn fed to a linear classifier.it use softmax function to compute the probability distribution over the predefined classes. then cross entropy is used to compute loss. bag of word representation does not consider word order. in order to take account of word order, n-gram features is used to capture some partial information about the local word order; when the number of classes is large, computing the linear classifier is computational expensive. so it usehierarchical softmax to speed training process.\n1) use bi-gram and/or tri-gram\n2) use NCE loss to speed us softmax computation(not use hierarchy softmax as original paper)\n\nresult: performance is as good as paper, speed also very fast.\n\ncheck: p5_fastTextB_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/fastText.JPG)\n-------------------------------------------------------------------------\n\n2.TextCNN:\n-------------\nImplementation of <a href=\"http://www.aclweb.org/anthology/D14-1181\"> Convolutional Neural Networks for Sentence Classification <\/a>\n\nStructure:embedding--->conv--->max pooling--->fully connected layer-------->softmax\n\nCheck: p7_TextCNN_model.py\n\nIn order to get very good result with TextCNN, you also need to read carefully about this paper <a href=\"https://arxiv.org/abs/1510.03820\">A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification<\/a>: it give you some insights of things that can affect performance. although you need to  change some settings according to your specific task.\n\nConvolutional Neural Network is main building box for solve problems of computer vision. Now we will show how CNN can be used for NLP, in in particular, text classification. Sentence length will be different from one to another. So we will use pad to get fixed length, n. For each token in the sentence, we will use word embedding to get a fixed dimension vector, d. So our input is a 2-dimension matrix:(n,d). This is similar with image for CNN. \n\nFirstly, we will do convolutional operation to our input. It is a element-wise multiply between filter and part of input. We use k number of filters, each filter size is a 2-dimension matrix (f,d). Now the output will be k number of lists. Each list has a length of n-f+1. each element is a scalar. Notice that the second dimension will be always the dimension of word embedding. We are using different size of filters to get rich features from text inputs. And this is something similar with n-gram features. \n\nSecondly, we will do max pooling for the output of convolutional operation. For k number of lists, we will get k number of scalars. \n\nThirdly, we will concatenate scalars to form final features. It is a fixed-size vector. And it is independent from the size of filters we use.\n\nFinally, we will use linear layer to project these features to per-defined labels.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/TextCNN.JPG)\n\n-------------------------------------------------------------------------\n\n\n3.BERT: \n-------------------------------------------------------------------------\n#### Pre-training of Deep Bidirectional Transformers for Language Understanding \n\nBERT currently achieve state of art results on more than 10 NLP tasks. the key ideas behind this model is that we can \n\npre-train the model by using one kind of language model with huge amount of raw data, where you can find it easily.\n\nas most of parameters of the model is pre-trained, only last layer for classifier need to be need for different tasks.\n\nas a result, this model is generic and very powerful. you can just fine-tuning based on the pre-trained model within\n \na short period of time.\n \nhowever, this model is quite big. with sequence length 128, you may only able to train with a batch size of 32; for long\n\ndocument such as sequence length 512, it can only train a batch size 4 for a normal GPU(with 11G); and very few people\n\ncan pre-train this model from scratch, as it takes many days or weeks to train, and a normal GPU's memory is too small \n\nfor this model.\n\nSpecially, the backbone model is Transformer, where you can find it in Attention Is All You Need. it use two kind of \n\ntasks to pre-train the model.\n\n#### Masked Languge Model\ngenerally speaking, given a sentence, some percentage of words are masked, you will need to predict the masked words\n\nbased on this masked sentence. masked words are chosed randomly.\n\nwe feed the input through a deep Transformer encoder and then use the final hidden states corresponding to the masked \n\npositions to predict what word was masked, exactly like we would train a language model.\n\n    source_file each line is a sequence of token, can be a sentence.\n    \n    Input Sequence  : The man went to [MASK] store with [MASK] dog\n    Target Sequence :                  the                his\n         \n\n#### Next Sentence Prediction\nmany language understanding task, like question answering, inference, need understand relationship\n  \nbetween sentence. however, language model is only able to understand without a sentence. next sentence\n\nprediction is a sample task to help model understand better in these kinds of task.\n\n50% of chance the second sentence is tbe next sentence of the first one, 50% of not the next one.\n\ngiven two sentence, the model is asked to predict whether the second sentence is real next sentence of \n\nthe first one.\n  \n    Input : [CLS] the man went to the store [SEP] he bought a gallon of milk [SEP]\n    Label : IsNext\n\n    Input = [CLS] the man heading to the store [SEP] penguin [MASK] are flight ##less birds [SEP]\n    Label = NotNext\n    \n<img src=\"https://github.com/brightmart/text_classification/blob/master/images/bert_1.jpeg\"  width=\"65%\" height=\"65%\" />\n\n<img src=\"https://github.com/brightmart/text_classification/blob/master/images/bert_2.jpeg\"  width=\"65%\" height=\"65%\" />\n\n\n#### How to use BERT?\n\nbasically, you can download pre-trained model, can just fine-tuning on your task with your own data.\n\nfor classification task, you can add processor to define the format you want to let input and labels from source data.\n\n#### Use BERT for multi-label classification?\n\nrun the following command under folder a00_Bert:\n \n      python  train_bert_multi-label.py\n   \nIt achieve 0.368 after 9 epoch.\nor you can run multi-label classification with downloadable data using BERT from \n\n<a href='https://github.com/brightmart/sentiment_analysis_fine_grain'>sentiment_analysis_fine_grain with BERT<\/a>\n \n#### Use BERT for online prediction \n\nyou can use session and feed style to restore model and feed data, then get logits to make a online prediction.\n\n<a href='https://github.com/brightmart/sentiment_analysis_fine_grain'>online prediction with BERT<\/a>\n\noriginally, it train or evaluate model based on file, not for online.\n\n#### How to get better model for BERT?\n\nfirstly, you can use pre-trained model download from google. run a few epoch on you dataset, and find a suitable \n\nsequence length.\n\nsecondly, you can pre-train the base model in your own data as long as  you can find a dataset that is related to \n\nyour task, then fine-tuning on your specific task.\n\nthirdly, you can change loss function and last layer to better suit for your task.\n\nadditionally, you can add define some pre-trained tasks that will help the model understand your task much better.\n\nas experienced we got from experiments, pre-trained task is independent from model and pre-train is not limit to \n\nthe tasks above.\n\n-------------------------------------------------------------------------\n\n\n4.TextRNN\n-------------\nStructure v1:embedding--->bi-directional lstm--->concat output--->average----->softmax layer\n\ncheck: p8_TextRNN_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/bi-directionalRNN.JPG)\n\nStructure v2:embedding-->bi-directional lstm---->dropout-->concat ouput--->lstm--->droput-->FC layer-->softmax layer\n\ncheck: p8_TextRNN_model_multilayer.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/emojifier-v2.png)\n\n\n-------------------------------------------------------------------------\n\n\n5.BiLstmTextRelation\n-------------\nStructure same as TextRNN. but input is special designed. e.g.input:\"how much is the computer? EOS price of laptop\". where 'EOS' is a special\ntoken spilted question1 and question2.\n\ncheck:p9_BiLstmTextRelation_model.py\n\n\n-------------------------------------------------------------------------\n\n\n6.twoCNNTextRelation\n-------------\nStructure: first use two different convolutional to extract feature of two sentences. then concat two features. use linear\ntransform layer to out projection to target label, then softmax.\n\ncheck: p9_twoCNNTextRelation_model.py\n\n\n-------------------------------------------------------------------------\n\n\n7.BiLstmTextRelationTwoRNN\n-------------\nStructure: one bi-directional lstm for one sentence(get output1), another bi-directional lstm for another sentence(get output2). then:\nsoftmax(output1*M*output2)\n\ncheck:p9_BiLstmTextRelationTwoRNN_model.py\n\nfor more detail you can go to: <a herf=\"http://www.wildml.com/2016/07/deep-learning-for-chatbots-2-retrieval-based-model-tensorflow\">Deep Learning for Chatbots, Part 2 – Implementing a Retrieval-Based Model in Tensorflow<a>\n\n\n-------------------------------------------------------------------------\n\n\n8.RCNN:\n-------------\nRecurrent convolutional neural network for text classification\n\nimplementation of <a href=\"https://scholar.google.com.hk/scholar?q=Recurrent+Convolutional+Neural+Networks+for+Text+Classification&hl=zh-CN&as_sdt=0&as_vis=1&oi=scholart&sa=X&ved=0ahUKEwjpx82cvqTUAhWHspQKHUbDBDYQgQMIITAA\"> Recurrent Convolutional Neural Network for Text Classification <\/a>\n \nstructure:1)recurrent structure (convolutional layer) 2)max pooling 3) fully connected layer+softmax\n\nit learn represenation of each word in the sentence or document with left side context and right side context:\n\nrepresentation current word=[left_side_context_vector,current_word_embedding,right_side_context_vecotor].\n\nfor left side context, it use a recurrent structure, a no-linearity transfrom of previous word and left side previous context; similarly to right side context.\n\ncheck: p71_TextRCNN_model.py\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/RCNN.JPG)\n\n-------------------------------------------------------------------------\n\n9.Hierarchical Attention Network:\n-------------\nImplementation of <a href=\"https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf\">Hierarchical Attention Networks for Document Classification<\/a>\n\nStructure:\n\n1) embedding \n\n2) Word Encoder: word level bi-directional GRU to get rich representation of words\n\n3) Word Attention:word level attention to get important information in a sentence\n\n4) Sentence Encoder: sentence level bi-directional GRU to get rich representation of sentences\n\n5) Sentence Attetion: sentence level attention to get important sentence among sentences\n\n5) FC+Softmax\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/HAN.JPG)\n\nIn NLP, text classification can be done for single sentence, but it can also be used for multiple sentences. we may call it document classification. Words are form to sentence. And sentence are form to document. In this circumstance, there may exists a intrinsic structure. So how can we model this kinds of task? Does all parts of document are equally relevant? And how we determine which part are more important than another?\n\nIt has two unique features: \n\n1)it has a hierarchical structure that reflect the hierarchical structure of documents; \n\n2)it has two levels of attention mechanisms used at the word and sentence-level. it enable the model to capture important information in different levels.\n\nWord Encoder:\nFor each words in a sentence, it is embedded into word vector in distribution vector space. It use a bidirectional GRU to encode the sentence. By concatenate vector from two direction, it now can form a representation of the sentence, which also capture contextual information.\n\nWord Attention:\nSame words are more important than another for the sentence. So attention mechanism is used. It first use one layer MLP to get uit hidden representation of the sentence, then measure the importance of the word as the similarity of uit with a word level context vector uw and get a normalized importance through a softmax function. \n\nSentence Encoder: \nfor sentence vectors, bidirectional GRU is used to encode it. Similarly to word encoder.\n\nSentence Attention: \nsentence level vector is used to measure importance among sentences. Similarly to word attention.\n\nInput of data: \n\nGenerally speaking, input of this model should have serveral sentences instead of sinle sentence. shape is:[None,sentence_lenght]. where None means the batch_size.\n\nIn my training data, for each example, i have four parts. each part has same length. i concat four parts to form one single sentence. the model will split the sentence into four parts, to form a tensor with shape:[None,num_sentence,sentence_length]. where num_sentence is number of sentences(equal to 4, in my setting).\n\ncheck:p1_HierarchicalAttention_model.py\n\nfor attentive attention you can check <a href='https://github.com/brightmart/text_classification/issues/55'>attentive attention<\/a>\n\n-------------------------------------------------------------------------\n\n10.Seq2seq with attention\n-------------\nImplementation seq2seq with attention derived from <a href=\"https://arxiv.org/pdf/1409.0473.pdf\">NEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE<\/a>\n\nI.Structure:\n\n1)embedding 2)bi-GRU too get rich representation from source sentences(forward & backward). 3)decoder with attention.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/seq2seqAttention.JPG)\n\nII.Input of data:\n\nthere are two kinds of three kinds of inputs:1)encoder inputs, which is a sentence; 2)decoder inputs, it is labels list with fixed length;3)target labels, it is also a list of labels.\n\nfor example, labels is:\"L1 L2 L3 L4\", then decoder inputs will be:[_GO,L1,L2,L2,L3,_PAD]; target label will be:[L1,L2,L3,L3,_END,_PAD]. length is fixed to 6, any exceed labels will be trancated, will pad if label is not enough to fill.\n\nIII.Attention Mechanism:\n\n1) transfer encoder input list and hidden state of decoder\n\n2) calculate similarity of hidden state with each encoder input, to get possibility distribution for each encoder input.\n\n3) weighted sum of encoder input based on possibility distribution.\n\n   go though RNN Cell using this weight sum together with decoder input to get new hidden state\n\nIV.How Vanilla Encoder Decoder Works:\n\nthe source sentence will be encoded using RNN as fixed size vector (\"thought vector\"). then during decoder:\n\n1) when it is training, another RNN will be used to try to get a word by using this \"thought vector\"  as init state, and take input from decoder input at each timestamp. decoder start from special token \"_GO\". \nafter one step is performanced, new hidden state will be get and together with new input, we can continue this process until we reach to a special token \"_END\". \nwe can calculate loss by compute cross entropy loss of logits and target label. logits is get through a projection layer for the hidden state(for output of decoder step(in GRU we can just use hidden states from decoder as output).\n\n2) when it is testing, there is no label. so we should feed the output we get from previous timestamp, and continue the process util we reached \"_END\" TOKEN.\n\nV.Notices:\n\n1) here i use two kinds of vocabularies. one is from words,used by encoder; another is for labels,used by decoder\n\n2) for vocabulary of lables, i insert three special token:\"_GO\",\"_END\",\"_PAD\"; \"_UNK\" is not used, since all labels is pre-defined.\n\n-------------------------------------------------------------------------\n\n11.Transformer(\"Attention Is All You Need\")\n-------------\nStatus: it was able to do task classification. and able to generate reverse order of its sequences in toy task. you can check it by running test function in the model. check: a2_train_classification.py(train) or a2_transformer_classification.py(model)\n\nwe do it in parallell style.layer normalization,residual connection, and mask are also used in the model. \n\nFor every building blocks, we include a test function in the each file below, and we've test each small piece successfully.\n\nSequence to sequence with attention is a typical model to solve sequence generation problem, such as translate, dialogue system. most of time, it use RNN as buidling block to do these tasks. util recently, people also apply convolutional Neural Network for sequence to sequence problem. Transformer, however, it perform these tasks solely on attention mechansim. it is fast and achieve new state-of-art result.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/attention_is_all_you_need.JPG)\n\nIt also has two main parts: encoder and decoder. below is desc from paper:\n\nEncoder:\n\n6 layers.each layers has two sub-layers.\nthe first is multi-head self-attention mechanism;\nthe second is position-wise fully connected feed-forward network.\nfor each sublayer. use LayerNorm(x+Sublayer(x)). all dimension=512.\n\nDecoder:\n\n1. The decoder is composed of a stack of N= 6 identical layers.\n2. In addition to the two sub-layers in each encoder layer, the decoder inserts a third sub-layer, which performs multi-head\nattention over the output of the encoder stack.\n3. Similar to the encoder, we employ residual connections\naround each of the sub-layers, followed by layer normalization. We also modify the self-attention\nsub-layer in the decoder stack to prevent positions from attending to subsequent positions.  This\nmasking, combined with fact that the output embeddings are offset by one position, ensures that the\npredictions for position i can depend only on the known outputs at positions less than i.\n\nMain Take away from this model:\n\n1) multi-head self attention: use self attention, linear transform multi-times to get projection of key-values, then do ordinary attention; 2) some tricks to improve performance(residual connection,position encoding, poistion feed forward, label smooth, mask to ignore things we want to ignore).\n\nUse this model to do task classification:\n\nHere we only use encode part for task classification, removed resdiual connection, used only 1 layer.no need to use mask. we use multi-head attention and postionwise feed forward to extract features of input sentence, then use linear layer to project it to get logits.\n\nfor detail of the model, please check: a2_transformer_classification.py\n\n-------------------------------------------------------------------------\n\n12.Recurrent Entity Network\n-------------------------------------------------------------------------\nInput:1. story: it is multi-sentences, as context. 2.query: a sentence, which is a question, 3. ansewr: a single label.\n\nModel Structure:\n\n1) Input encoding: use bag of word to encode story(context) and query(question); take account of position by using position mask\n\n   by using bi-directional rnn to encode story and query, performance boost from 0.392 to 0.398, increase 1.5%.\n\n2) Dynamic memory: \n\na. compute gate by using 'similarity' of keys,values with input of story. \n\nb. get candidate hidden state by transform each key,value and input.\n\nc. combine gate and candidate hidden state to update current hidden state.\n\n3) Output moudle( use attention mechanism):\na. to get possibility distribution by computing 'similarity' of query and hidden state\n\nb. get weighted sum of hidden state using possibility distribution.\n\nc. non-linearity transform of query and hidden state to get predict label.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/EntityNet.JPG)\n\nMain take away from this model:\n\n1) use blocks of keys and values, which is independent from each other. so it can be run in parallel.\n\n2) modelling context and question together. use memory to track state of world; and use non-linearity transform of hidden state and question(query) to make a prediction.\n\n3) simple model can also achieve very good performance. simple encode as use bag of word.\n\nfor detail of the model, please check: a3_entity_network.py\n\nunder this model, it has a test function, which ask this model to count numbers both for story(context) and query(question). but weights of story is smaller than query.\n\n-------------------------------------------------------------------------\n\n13.Dynamic Memory Network\n-------------------------------------------------------------------------\nOutlook of Model:\n\n1.Input Module: encode raw texts into vector representation\n\n2.Question Module: encode question into vector representation\n\n3.Episodic Memory Module: with inputs,it chooses which parts of inputs to focus on through the attention mechanism, taking into account of question and previous memory====>it poduce a 'memory' vecotr.\n\n4.Answer Module:generate an answer from the final memory vector.\n\n![alt text](https://github.com/brightmart/text_classification/blob/master/images/DMN.JPG)\n\nDetail:\n\n1.Input Module:\n\n  a.single sentence: use gru to get hidden state\n  b.list of sentences: use gru to get the hidden states for each sentence. e.g. [hidden states 1,hidden states 2, hidden states...,hidden state n]\n  \n2.Question Module:\n  use gru to get hidden state\n  \n3.Episodic Memory Module:\n\n  use an attention mechanism and recurrent network to updates its memory. \n     \n  a. gate as attention mechanism:\n  \n     two-layer feed forward nueral network.input is candidate fact c,previous memory m and question q. features get by take: element-wise,matmul and absolute distance of q with c, and q with m.\n     \n  b.memory update mechanism: take candidate sentence, gate and previous hidden state, it use gated-gru to update hidden state. like: h=f(c,h_previous,g). the final hidden state is the input for answer module.\n  \n  c.need for multiple episodes===>transitive inference. \n  \n  e.g. ask where is the football? it will attend to sentence of \"john put down the football\"), then in second pass, it need to attend location of john.\n\n4.Answer Module:\ntake the final epsoidic memory, question, it update hidden state of answer module.\n\n\nTODO \n-------------------------------------------------------------------------------------------------------\n1.Character-level Convolutional Networks for Text Classification\n\n2.Convolutional Neural Networks for Text Categorization:Shallow Word-level vs. Deep Character-level\n\n3.Very Deep Convolutional Networks for Text Classification\n\n4.Adversarial Training Methods For Semi-supervised Text Classification\n\n5.Ensemble Models\n\n\nConclusion:\n-------------------------------------------------------------------------\nDuring the process of doing large scale of multi-label classification, serveral lessons has been learned, and some list as below:\n\n1) What is most important thing to reach a high accuracy? \nIt depend the task you are doing. From the task we conducted here, we believe that ensemble models based on models trained from multiple features including word, character for title and description can help to reach very high accuarcy; However, in some cases,as just alphaGo Zero demonstrated, algorithm is more important then data or computational power, in fact alphaGo Zero did not use any humam data. \n\n2) Is there a ceiling for any specific model or algorithm?\nThe answer is yes. lots of different models were used here, we found many models have similar performances, even though there are quite different in structure. In some extent, the difference of performance is not so big.\n\n3) Is case study of error useful?\nI think it is quite useful especially when you have done many different things, but reached a limit. For example, by doing case study, you can find labels that models can make correct prediction, and where they make mistakes. And to imporove performance by  increasing weights of these wrong predicted labels or finding potential errors from data.\n\n4) How can we become expert in a specific of Machine Learning?\nIn my opinion,join a machine learning competation or begin a task with lots of data, then read papers and implement some, is a good starting point. So we will have some really experience and ideas of handling specific task, and know the challenges of it.\nBut what's more important is that we should not only follow ideas from papers, but to explore some new ideas we think may help to slove the problem. For example, by changing structures of classic models or even invent some new structures, we may able to tackle the problem in a much better way as it may more suitable for task we are doing.\n\nReference:\n-------------------------------------------------------------------------------------------------------\n1.Bag of Tricks for Efficient Text Classification\n\n2.Convolutional Neural Networks for Sentence Classification\n\n3.A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification\n\n4.Deep Learning for Chatbots, Part 2 – Implementing a Retrieval-Based Model in Tensorflow, from www.wildml.com\n\n5.Recurrent Convolutional Neural Network for Text Classification\n\n6.Hierarchical Attention Networks for Document Classification\n\n7.Neural Machine Translation by Jointly Learning to Align and Translate\n\n8.Attention Is All You Need\n\n9.Ask Me Anything:Dynamic Memory Networks for Natural Language Processing\n\n10.Tracking the state of world with recurrent entity networks\n\n11.Ensemble Selection from Libraries of Models\n\n12.<a href='https://arxiv.org/abs/1810.04805'>BERT:Pre-training of Deep Bidirectional Transformers for Language Understanding<\/a>\n\n13.<a href='https://github.com/google-research/bert'>google-research/bert<\/a>\n\n-------------------------------------------------------------------------\n\nto be continued. for any problem, concat brightmart@hotmail.com\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E9E:18233:17B703:5E3136:6AB92D21"},"text_sha256":"a61ffb51579dfafcca1801107eb2fa8e8ca758a0da07384e13df12bfdd550607"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gnina/gnina","input_row":{"repository":"gnina/gnina","url":"https://github.com/gnina/gnina","name":"gnina","owner":"gnina","description":"A deep learning framework for molecular docking","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":982,"issues":279,"created_at":"2015-11-04T15:29:17Z","updated_at":"2026-09-26T07:44:32Z","first_commit_at":"2012-11-28T20:30:24Z","last_commit_at":"2026-06-29T14:43:21Z","activity_months":162.97,"ai_ml_match_topics":"convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:11.629Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gnina/gnina","visibility":"public","created_at":"2015-11-04T15:29:17Z","updated_at":"2026-09-26T07:44:32Z","private":false,"fork":false,"archived":false,"stargazers_count":982,"open_issues_count":24,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1583","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0932:2EA1B4:17ED904:1C15A44:6AB92D23"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1582","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:17AC3DB:1BD403C:6AB92D24"},"commit":{"sha":"136fabd79fdd74d5e35c1f45aa20565adddf77d3","url":"https://github.com/gnina/gnina/commit/136fabd79fdd74d5e35c1f45aa20565adddf77d3","date":"2018-05-23T14:36:31Z","author_date":"2018-05-23T14:36:31Z","committer_date":"2018-05-23T14:36:31Z","tree_sha":"49203f75315f9150a67b8cfd2cde6c9e7f1db1c6","message_first_line":"Merge pull request #26 from gnina/gan"},"tree_request_status":200,"tree_rate":{"github_remaining":"1581","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:180D641:1C34C87:6AB92D24"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2102,"blob_sha":"44b9e62c157bf9fb9519df9cea623b367bbd2acc","priority":0}],"documents":[{"path":"README.md","size":2102,"blob_sha":"44b9e62c157bf9fb9519df9cea623b367bbd2acc","priority":0,"status":200,"text":"# Caffe\n\n[![Build Status](https://travis-ci.org/BVLC/caffe.svg?branch=master)](https://travis-ci.org/BVLC/caffe)\n[![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE)\n\nCaffe is a deep learning framework made with expression, speed, and modularity in mind.\nIt is developed by the Berkeley Vision and Learning Center ([BVLC](http://bvlc.eecs.berkeley.edu)) and community contributors.\n\nCheck out the [project site](http://caffe.berkeleyvision.org) for all the details like\n\n- [DIY Deep Learning for Vision with Caffe](https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.p)\n- [Tutorial Documentation](http://caffe.berkeleyvision.org/tutorial/)\n- [BVLC reference models](http://caffe.berkeleyvision.org/model_zoo.html) and the [community model zoo](https://github.com/BVLC/caffe/wiki/Model-Zoo)\n- [Installation instructions](http://caffe.berkeleyvision.org/installation.html)\n\nand step-by-step examples.\n\n[![Join the chat at https://gitter.im/BVLC/caffe](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/BVLC/caffe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nPlease join the [caffe-users group](https://groups.google.com/forum/#!forum/caffe-users) or [gitter chat](https://gitter.im/BVLC/caffe) to ask questions and talk about methods and models.\nFramework development discussions and thorough bug reports are collected on [Issues](https://github.com/BVLC/caffe/issues).\n\nHappy brewing!\n\n## License and Citation\n\nCaffe is released under the [BSD 2-Clause license](https://github.com/BVLC/caffe/blob/master/LICENSE).\nThe BVLC reference models are released for unrestricted use.\n\nPlease cite Caffe in your publications if it helps your research:\n\n    @article{jia2014caffe,\n      Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},\n      Journal = {arXiv preprint arXiv:1408.5093},\n      Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},\n      Year = {2014}\n    }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F8C2:09BF:B3142:2E5067:6AB92D25"},"text_sha256":"1d7861f9523a963100d16da123b6f00e008197e76c1ed45b76da0ecaf535f4a8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1580","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D9:6C6ED:1807417:1C2ECEF:6AB92D25"},"commit":{"sha":"6fe1ce2bb9c35c8067de9f49bb9169857dfbad70","url":"https://github.com/gnina/gnina/commit/6fe1ce2bb9c35c8067de9f49bb9169857dfbad70","date":"2026-06-29T14:43:21Z","author_date":"2026-06-29T14:43:21Z","committer_date":"2026-06-29T14:43:21Z","tree_sha":"b4e0535b62ac65c1d22a22e177aca1c57e87c586","message_first_line":"resolve tee name conflict"},"tree_request_status":200,"tree_rate":{"github_remaining":"1579","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089A:72BD3:1810F95:1C38D16:6AB92D26"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26562,"blob_sha":"b52f6cb81b6c8feab40987fb768aef0758cb0ca6","priority":0}],"documents":[{"path":"README.md","size":26562,"blob_sha":"b52f6cb81b6c8feab40987fb768aef0758cb0ca6","priority":0,"status":200,"text":"[![codecov](https://codecov.io/gh/gnina/gnina/branch/master/graph/badge.svg?token=kOC9GUKEGa)](https://codecov.io/gh/gnina/gnina)\n[![Github CI](https://github.com/gnina/gnina/actions/workflows/CI.yml/badge.svg)](https://github.com/gnina/gnina/actions)\n\ngnina (pronounced NEE-na) is a molecular docking program with integrated support for scoring and optimizing ligands using convolutional neural networks. It is a fork of [smina](http://smina.sf.net/), which is a fork of [AutoDock Vina](http://vina.scripps.edu/).  \n\nHelp\n====\n \nPlease [subscribe to our slack team](https://join.slack.com/t/gninacnn/shared_invite/enQtNTY3ODk2ODk5OTU5LTkzMjY1ZTE3YjJlZmIxOWI2OTU3Y2RlMTIyYmM2YmFmYTU1NTk5ZTBmMjUwMGRhYzk1ZjY5N2E4Y2I5YWU5YWI).\nAn example colab notebook showing how to use gnina is available <a href=\"https://colab.research.google.com/drive/1QYo5QLUE80N_G28PlpYs6OKGddhhd931?usp=sharing\">here<\/a>. We also hosted a workshp on using gnina ([video](https://www.youtube.com/watch?v=MG3Srzi5kZ0), [slides](https://bits.csb.pitt.edu/rsc_workshop2021/docking_with_gnina.slides.html#/)).\n\nCitation\n========\nIf you find gnina useful, please cite our paper(s):  \n\n\n**GNINA 1.3: the next increment in molecular docking with deep learning** (Primary application citation)  \nA McNutt, Y Li, R Meli, R Aggarwal, DR Koes. *J. Cheminformatics*, 2025  \n[link](https://jcheminf.biomedcentral.com/articles/10.1186/s13321-025-00973-x) [PubMed](https://pmc.ncbi.nlm.nih.gov/articles/PMC11874439/)\n\n**GNINA 1.0: Molecular docking with deep learning** (Primary application citation, previous version)  \nA McNutt, P Francoeur, R Aggarwal, T Masuda, R Meli, M Ragoza, J Sunseri, DR Koes. *J. Cheminformatics*, 2021  \n[link](https://jcheminf.biomedcentral.com/articles/10.1186/s13321-021-00522-2) [PubMed](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8191141/) [ChemRxiv](https://chemrxiv.org/articles/preprint/GNINA_1_0_Molecular_Docking_with_Deep_Learning/13578140)\n\n**Protein–Ligand Scoring with Convolutional Neural Networks**  (Primary methods citation)  \nM Ragoza, J Hochuli, E Idrobo, J Sunseri, DR Koes. *J. Chem. Inf. Model*, 2017  \n[link](http://pubs.acs.org/doi/full/10.1021/acs.jcim.6b00740) [PubMed](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5479431/) [arXiv](https://arxiv.org/abs/1612.02751)  \n\n**Virtual Screening with Gnina 1.0** (Virtual screening citation)\nJ Sunseri, DR Koes D. *Molecules*, 2021\n[link](https://www.mdpi.com/1420-3049/26/23/7369) [Preprints](https://www.preprints.org/manuscript/202111.0329/v1)\n\n**CACHE Challenge# 1: Docking with GNINA Is All You Need** (Example application)\nI Dunn, S Pirhadi, Y Wang, S Ravindran, C Concepcion, DR Koes. *J. Chem. Inf. Model*, 2024 \n[link](https://pubs.acs.org/doi/full/10.1021/acs.jcim.4c01429) [PubMed](https://pubmed.ncbi.nlm.nih.gov/39654129/)\n\n**Three-Dimensional Convolutional Neural Networks and a Cross-Docked Data Set for Structure-Based Drug Design** (Dataset citation)\nPG Francoeur, T Masuda, J Sunseri, A Jia, RB Iovanisci, I Snyder, DR Koes. *J. Chem. Inf. Model*, 2020  \n[link](https://pubs.acs.org/doi/abs/10.1021/acs.jcim.0c00411) [PubMed](https://pubmed.ncbi.nlm.nih.gov/32865404/) [Chemrxiv](https://chemrxiv.org/articles/preprint/3D_Convolutional_Neural_Networks_and_a_CrossDocked_Dataset_for_Structure-Based_Drug_Design/11833323/1)\n\n**Ligand pose optimization with atomic grid-based convolutional neural networks**  \nM Ragoza, L Turner, DR Koes. *Machine Learning for Molecules and Materials NIPS 2017 Workshop*, 2017  \n[arXiv](https://arxiv.org/abs/1710.07400)  \n\n**Visualizing convolutional neural network protein-ligand scoring**  \nJ Hochuli, A Helbling, T Skaist, M Ragoza, DR Koes.  *Journal of Molecular Graphics and Modelling*, 2018  \n[link](https://www.sciencedirect.com/science/article/pii/S1093326318301670) [PubMed](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6343664/) [arXiv](https://arxiv.org/abs/1803.02398)\n\n**Convolutional neural network scoring and minimization in the D3R 2017 community challenge**  \nJ Sunseri, JE King, PG Francoeur, DR Koes.  *Journal of computer-aided molecular design*, 2018  \n[link](https://link.springer.com/article/10.1007/s10822-018-0133-y) [PubMed](https://www.ncbi.nlm.nih.gov/pubmed/29992528)\n\n\n\nDocker\n======\n\nA pre-built docker image is available [here](https://hub.docker.com/u/gnina) and Dockerfiles are [here](https://github.com/gnina/gnina/tree/master/docker).\n\nInstallation\n============\n\nWe recommend that you use the [pre-built binary](https://github.com/gnina/gnina/releases/latest) unless you have significant experience building software on Linux, in which case building from source *might* result in an executable more optimized for your system.  The pre-built binary can be used in WSL.\n\n### Ubuntu 22.04\n```\napt-get  install build-essential git cmake wget libboost-all-dev libeigen3-dev libgoogle-glog-dev libprotobuf-dev protobuf-compiler libhdf5-dev libatlas-base-dev python3-dev librdkit-dev python3-numpy python3-pip python3-pytest libjsoncpp-dev\n\n```\n\n[Follow NVIDIA's instructions](http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#axzz4TWipdwX1) to install the latest version of CUDA (>= 12.0 is required). **Make sure `nvcc` is in your PATH.**\n\n\n#\nInstall OpenBabel3.  Note there are errors in bond order determination in version 3.1.1 and older.\n```\ngit clone https://github.com/dkoes/openbabel.git\ncd openbabel\nmkdir build\ncd build\ncmake -DWITH_MAEPARSER=OFF -DWITH_COORDGEN=OFF -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON ..\nmake\nmake install\n```\n\n#\nInstall gnina\n```\ngit clone https://github.com/gnina/gnina.git\ncd gnina\nmkdir build\ncd build\ncmake ..  # -DUSE_SYSTEM_NVTX=1 may be needed with pytorch 2.7.0 and CUDA 12.9\nmake\nmake install\n```\n\n### [WSL2 Ubuntu 22.04](https://github.com/gnina/gnina/issues/247)\n```bash\nsudo apt-get remove nvidia-cuda-toolkit\nwget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run\nchmod 700 cuda_12.4.0_550.54.14_linux.run\nsudo sh cuda_12.4.0_550.54.14_linux.run\nwget https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb\nsudo dpkg -i cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb\nsudo cp /var/cudnn-local-repo-ubuntu2204-9.0.0/cudnn-*-keyring.gpg /usr/share/keyrings/\nsudo apt-get update\nsudo apt-get -y install cudnn-cuda-12\napt-get install build-essential git cmake wget libboost-all-dev libeigen3-dev libgoogle-glog-dev libprotobuf-dev protobuf-compiler libhdf5-dev libatlas-base-dev python3-dev librdkit-dev python3-numpy python3-pip python3-pytest libjsoncpp-dev\n\ngit clone https://github.com/openbabel/openbabel.git\ncd openbabel\nmkdir build\ncd build\ncmake -DWITH_MAEPARSER=OFF -DWITH_COORDGEN=OFF -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON ..\nmake -j8\nsudo make install\n\ngit clone https://github.com/gnina/gnina.git\ncd gnina\nmkdir build\ncd build\ncmake ..\nmake -j8\nsudo make install\n```\n\n#\nIf you are building for systems with different GPUs (e.g. in a cluster environment), configure with `-DCMAKE_CUDA_ARCHITECTURES=all`.   \nNote that the cmake build will automatically fetch and install [libmolgrid](https://github.com/gnina/libmolgrid) and [torch](https://github.com/pytorch/pytorch) if they are not already installed.\n\n\nThe scripts provided in `gnina/scripts` have additional python dependencies that must be installed. \n\nUsage\n=====\n\nTo dock ligand `lig.sdf` to a binding site on `rec.pdb` defined by another ligand `orig.sdf`:\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf -o docked.sdf.gz\n```\n\nTo perform docking with flexible sidechain residues within 3.5 Angstroms of `orig.sdf` (generally not recommend unless prior knowledge indicates pocket is highly flexible):\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf --flexdist_ligand orig.sdf --flexdist 3.5 -o flex_docked.sdf.gz\n```\n\nTo perform whole protein docking:\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand rec.pdb -o whole_docked.sdf.gz --exhaustiveness 64\n```\n\nTo utilize the default ensemble CNN in the energy minimization during the refinement step of docking (10 times slower than the default rescore option):\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf --cnn_scoring refinement -o cnn_refined.sdf.gz\n```\n\nTo utilize the default ensemble CNN for every step of docking (1000 times slower than the default rescore option):\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf --cnn_scoring all -o cnn_all.sdf.gz\n```\n\nTo utilize all empirical scoring using the [Vinardo](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0155183) scoring function:\n```\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf --scoring vinardo --cnn_scoring none -o vinardo_docked.sdf.gz\n```\n\nTo utilize a different CNN during docking (see help for possible options):\n```\n\ngnina -r rec.pdb -l lig.sdf --autobox_ligand orig.sdf --cnn dense -o dense_docked.sdf.gz\n```\n\nTo minimize and score ligands `ligs.sdf` already positioned in a binding site:\n```\ngnina -r rec.pdb -l ligs.sdf --minimize -o minimized.sdf.gz\n```\n\nTo covalently dock a pyrazole to a specific iron atom on the receptor with the bond formed between a nitrogen of the pyrazole and the iron.\n```\ngnina  -r rec.pdb.gz -l conformer.sdf.gz --autobox_ligand bindingsite.sdf.gz --covalent_rec_atom A:601:FE --covalent_lig_atom_pattern '[$(n1nccc1)]' -o output.sdf.gz \n```\n\nThe same as above, but with the covalently bonding ligand atom manually positioned (instead of using OpenBabel binding heuristics) and the ligand/residue complex UFF optimized.\n```\ngnina  -r rec.pdb.gz -l conformer.sdf.gz --autobox_ligand bindingsite.sdf.gz --covalent_lig_atom_position -11.796,31.887,72.682  --covalent_optimize_lig  --covalent_rec_atom A:601:FE --covalent_lig_atom_pattern '[$(n1nccc1)]' -o output.sdf.gz \n```\n\nAll options:\n```\nInput:\n  -r [ --receptor ] arg              rigid part of the receptor\n  --flex arg                         flexible side chains, if any (PDBQT)\n  -l [ --ligand ] arg                ligand(s)\n  --flexres arg                      flexible side chains specified by comma \n                                     separated list of chain:resid\n  --flexdist_ligand arg              Ligand to use for flexdist\n  --flexdist arg                     set all side chains within specified \n                                     distance to flexdist_ligand to flexible\n  --flex_limit arg                   Hard limit for the number of flexible \n                                     residues\n  --flex_max arg                     Retain at at most the closest flex_max \n                                     flexible residues\n\nSearch space (required):\n  --center_x arg                     X coordinate of the center\n  --center_y arg                     Y coordinate of the center\n  --center_z arg                     Z coordinate of the center\n  --size_x arg                       size in the X dimension (Angstroms)\n  --size_y arg                       size in the Y dimension (Angstroms)\n  --size_z arg                       size in the Z dimension (Angstroms)\n  --autobox_ligand arg               Ligand to use for autobox. A multi-ligand \n                                     file still only defines a single box.\n  --autobox_add arg                  Amount of buffer space to add to \n                                     auto-generated box (default +4 on all six \n                                     sides)\n  --autobox_extend arg (=1)          Expand the autobox if needed to ensure the\n                                     input conformation of the ligand being \n                                     docked can freely rotate within the box.\n  --no_lig                           no ligand; for sampling/minimizing \n                                     flexible residues\n\nCovalent docking:\n  --covalent_rec_atom arg            Receptor atom ligand is covalently bound \n                                     to.  Can be specified as \n                                     chain:resnum:atom_name or as x,y,z \n                                     Cartesian coordinates.\n  --covalent_lig_atom_pattern arg    SMARTS expression for ligand atom that \n                                     will covalently bind protein.\n  --covalent_lig_atom_position arg   Optional.  Initial placement of covalently\n                                     bonding ligand atom in x,y,z Cartesian \n                                     coordinates.  If not specified, \n                                     OpenBabel's GetNewBondVector function will\n                                     be used to position ligand.\n  --covalent_fix_lig_atom_position   If covalent_lig_atom_position is \n                                     specified, fix the ligand atom to this \n                                     position as opposed to using this position\n                                     to define the initial structure.\n  --covalent_bond_order arg (=1)     Bond order of covalent bond. Default 1.\n  --covalent_optimize_lig            Optimize the covalent complex of ligand \n                                     and residue using UFF. This will change \n                                     bond angles and lengths of the ligand.\n\nScoring and minimization options:\n  --scoring arg                      specify alternative built-in scoring \n                                     function: ad4_scoring default dkoes_fast \n                                     dkoes_scoring dkoes_scoring_old vina \n                                     vinardo\n  --custom_scoring arg               custom scoring function file\n  --custom_atoms arg                 custom atom type parameters file\n  --score_only                       score provided ligand pose\n  --local_only                       local search only using autobox (you \n                                     probably want to use --minimize)\n  --minimize                         energy minimization\n  --randomize_only                   generate random poses, attempting to avoid\n                                     clashes\n  --num_mc_steps arg                 fixed number of monte carlo steps to take \n                                     in each chain\n  --max_mc_steps arg                 cap on number of monte carlo steps to take\n                                     in each chain\n  --num_mc_saved arg                 number of top poses saved in each monte \n                                     carlo chain\n  --temperature arg                  temperature for metropolis accept \n                                     criterion\n  --minimize_iters arg (=0)          number iterations of steepest descent; \n                                     default scales with rotors and usually \n                                     isn't sufficient for convergence\n  --accurate_line                    use accurate line search\n  --simple_ascent                    use simple gradient ascent\n  --minimize_early_term              Stop minimization before convergence \n                                     conditions are fully met.\n  --minimize_single_full             During docking perform a single full \n                                     minimization instead of a truncated \n                                     pre-evaluate followed by a full.\n  --approximation arg                approximation (linear, spline, or exact) \n                                     to use\n  --factor arg                       approximation factor: higher results in a \n                                     finer-grained approximation\n  --force_cap arg                    max allowed force; lower values more \n                                     gently minimize clashing structures\n  --user_grid arg                    Autodock map file for user grid data based\n                                     calculations\n  --user_grid_lambda arg (=-1)       Scales user_grid and functional scoring\n  --print_terms                      Print all available terms with default \n                                     parameterizations\n  --print_atom_types                 Print all available atom types\n\nConvolutional neural net (CNN) scoring:\n  --cnn_scoring arg (=1)             Amount of CNN scoring: none, rescore \n                                     (default), refinement, metrorescore \n                                     (metropolis+rescore), metrorefine \n                                     (metropolis+refine), all\n  --cnn arg                          built-in model to use, specify \n                                     PREFIX_ensemble to evaluate an ensemble of\n                                     models starting with PREFIX: \n                                     all_default_to_default_1_3_1 \n                                     all_default_to_default_1_3_2 \n                                     all_default_to_default_1_3_3 \n                                     crossdock_default2018 \n                                     crossdock_default2018_1 \n                                     crossdock_default2018_1_3 \n                                     crossdock_default2018_1_3_1 \n                                     crossdock_default2018_1_3_2 \n                                     crossdock_default2018_1_3_3 \n                                     crossdock_default2018_1_3_4 \n                                     crossdock_default2018_2 \n                                     crossdock_default2018_3 \n                                     crossdock_default2018_4 \n                                     crossdock_default2018_KD_1 \n                                     crossdock_default2018_KD_2 \n                                     crossdock_default2018_KD_3 \n                                     crossdock_default2018_KD_4 \n                                     crossdock_default2018_KD_5 default1.0 \n                                     default2017 dense dense_1 dense_1_3 \n                                     dense_1_3_1 dense_1_3_2 dense_1_3_3 \n                                     dense_1_3_4 dense_1_3_PT_KD \n                                     dense_1_3_PT_KD_1 dense_1_3_PT_KD_2 \n                                     dense_1_3_PT_KD_3 dense_1_3_PT_KD_4 \n                                     dense_1_3_PT_KD_def2018 \n                                     dense_1_3_PT_KD_def2018_1 \n                                     dense_1_3_PT_KD_def2018_2 \n                                     dense_1_3_PT_KD_def2018_3 \n                                     dense_1_3_PT_KD_def2018_4 dense_2 dense_3 \n                                     dense_4 fast general_default2018 \n                                     general_default2018_1 \n                                     general_default2018_2 \n                                     general_default2018_3 \n                                     general_default2018_4 \n                                     general_default2018_KD_1 \n                                     general_default2018_KD_2 \n                                     general_default2018_KD_3 \n                                     general_default2018_KD_4 \n                                     general_default2018_KD_5 \n                                     redock_default2018 redock_default2018_1 \n                                     redock_default2018_1_3 \n                                     redock_default2018_1_3_1 \n                                     redock_default2018_1_3_2 \n                                     redock_default2018_1_3_3 \n                                     redock_default2018_1_3_4 \n                                     redock_default2018_2 redock_default2018_3 \n                                     redock_default2018_4 redock_default2018_KD\n                                     _1 redock_default2018_KD_2 \n                                     redock_default2018_KD_3 \n                                     redock_default2018_KD_4 \n                                     redock_default2018_KD_5\n  --cnn_model arg                    torch cnn model file; if not specified a \n                                     default model ensemble will be used\n  --cnn_rotation arg (=0)            evaluate multiple rotations of pose (max \n                                     24)\n  --cnn_mix_emp_force                Merge CNN and empirical minus forces\n  --cnn_mix_emp_energy               Merge CNN and empirical energy\n  --cnn_empirical_weight arg (=1)    Weight for scaling and merging empirical \n                                     force and energy \n  --cnn_center_x arg                 X coordinate of the CNN center\n  --cnn_center_y arg                 Y coordinate of the CNN center\n  --cnn_center_z arg                 Z coordinate of the CNN center\n  --cnn_verbose                      Enable verbose output for CNN debugging\n\nOutput:\n  -o [ --out ] arg                   output file name, format taken from file \n                                     extension\n  --out_flex arg                     output file for flexible receptor residues\n  --log arg                          optionally, write log file\n  --atom_terms arg                   optionally write per-atom interaction term\n                                     values\n  --atom_term_data                   embedded per-atom interaction terms in \n                                     output sd data\n  --pose_sort_order arg (=0)         How to sort docking results: CNNscore \n                                     (default), CNNaffinity, Energy\n  --full_flex_output                 Output entire structure for out_flex, not \n                                     just flexible residues.\n\nMisc (optional):\n  --cpu arg                          the number of CPUs to use (the default is \n                                     to try to detect the number of CPUs or, \n                                     failing that, use 1)\n  --seed arg                         explicit random seed\n  --exhaustiveness arg (=8)          exhaustiveness of the global search \n                                     (roughly proportional to time)\n  --num_modes arg (=9)               maximum number of binding modes to \n                                     generate\n  --min_rmsd_filter arg (=1)         rmsd value used to filter final poses to \n                                     remove redundancy\n  -q [ --quiet ]                     Suppress output messages\n  --addH arg                         automatically add hydrogens in ligands (on\n                                     by default)\n  --stripH arg                       remove polar hydrogens from molecule \n                                     _after_ performing atom typing for \n                                     efficiency (off by default - nonpolar are \n                                     always removed)\n  --device arg (=0)                  GPU device to use\n  --no_gpu                           Disable GPU acceleration, even if \n                                     available.\n\nConfiguration file (optional):\n  --config arg                       the above options can be put here\n\nInformation (optional):\n  --help                             display usage summary\n  --help_hidden                      display usage summary with hidden options\n  --version                          display program version\n```\n\nCNN Scoring\n===========\n\n`--cnn_scoring` determines at what points of the docking procedure that the CNN scoring function is used.\n * `none` - No CNNs used for docking. Uses the specified empirical scoring function throughout.\n * `rescore` (default) - CNN used for reranking of final poses. Least computationally expensive CNN option.\n * `refinement` - CNN used to refine poses after Monte Carlo chains and for final ranking of output poses. 10x slower than `rescore` when using a GPU.\n * `all` - CNN used as the scoring function throughout the whole procedure. Extremely computationally intensive and not recommended.\n\nThe default CNN scoring function is an ensemble of 3 models selected to balance pose prediction performance and runtime: dense_1_3, dense_1_3_PT_KD_3, crossdock_default2018_KD_4.  The GNINA 1.0 default ensemble is still available as `default1.0`.   More information on these various models can be found in the papers listed above.\n\nTraining\n========\n\nScripts for training pytorch GNINA models and pretrained models can found at [https://github.com/RMeli/gnina-torch](https://github.com/RMeli/gnina-torch).\nExample code for converting a pytorch model into a gnina usable model file is shown below.  The metadata should provide information about the input grid resolution, dimension and atom typing.  If not provided, defaults will be used.\n\n```python\n    d = {\n        'resolution': 0.5,\n        'dimension' : 23.5,\n        'recmap' : '''AliphaticCarbonXSHydrophobe \n    AliphaticCarbonXSNonHydrophobe \n    AromaticCarbonXSHydrophobe \n    AromaticCarbonXSNonHydrophobe\n    Bromine Iodine Chlorine Fluorine\n    Nitrogen NitrogenXSAcceptor \n    NitrogenXSDonor NitrogenXSDonorAcceptor\n    Oxygen OxygenXSAcceptor \n    OxygenXSDonorAcceptor OxygenXSDonor\n    Sulfur SulfurAcceptor\n    Phosphorus \n    Calcium\n    Zinc\n    GenericMetal Boron Manganese Magnesium Iron''',\n        \n    'ligmap': '''AliphaticCarbonXSHydrophobe \n    AliphaticCarbonXSNonHydrophobe \n    AromaticCarbonXSHydrophobe \n    AromaticCarbonXSNonHydrophobe\n    Bromine Iodine\n    Chlorine\n    Fluorine\n    Nitrogen NitrogenXSAcceptor \n    NitrogenXSDonor NitrogenXSDonorAcceptor\n    Oxygen OxygenXSAcceptor \n    OxygenXSDonorAcceptor OxygenXSDonor\n    Sulfur SulfurAcceptor\n    Phosphorus\n    GenericMetal Boron Manganese Magnesium Zinc Calcium Iron'''\n    }\n    \n    extra = {'metadata':json.dumps(d)}\n    z = torch.zeros((1,28,48,48,48))\n\n    script = torch.jit.trace(model, z)\n    script.save('gnina_model.pt',_extra_files=extra)    \n```\n\nLegacy scripts for training Caffe models can be found at [https://github.com/gnina/scripts](https://github.com/gnina/scripts)\nand sample models at [https://github.com/gnina/models](https://github.com/gnina/models).\n\n\nThe DUD-E docked poses used in the original paper can be found [here](http://bits.csb.pitt.edu/files/docked_dude.tar), but we [do not recommend](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0220113) training virtual screening models on DUD-E. The CrossDocked2020 set is [here](https://github.com/gnina/models/tree/master/data/CrossDocked2020).\n\nLicense\n=======\n\ngnina is dual licensed under GPL and Apache.  The GPL license is necessitated by the use of OpenBabel (which is GPL licensed).  In order to use gnina under the Apache license only, all references to OpenBabel must be removed from the source code.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CB4:7A4F8:183F9C:5EBBB6:6AB92D25"},"text_sha256":"b6ed3a633154d49044478f2f9af3199b6fdecb0ed75ec566c1a9903ceddcafb9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/O-CNN","input_row":{"repository":"microsoft/O-CNN","url":"https://github.com/microsoft/O-CNN","name":"O-CNN","owner":"microsoft","description":"O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis","language":"C++","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":755,"issues":148,"created_at":"2017-06-13T04:03:54Z","updated_at":"2026-09-17T18:21:41Z","first_commit_at":"2017-06-13T04:03:54Z","last_commit_at":"2022-08-30T09:45:51Z","activity_months":62.560000000000002,"ai_ml_match_topics":"convolutional-neural-networks","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:15.258Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/O-CNN","visibility":"public","created_at":"2017-06-13T04:03:54Z","updated_at":"2026-09-17T18:21:41Z","private":false,"fork":false,"archived":false,"stargazers_count":755,"open_issues_count":5,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1578","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17E7F36:1C0F403:6AB92D27"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1577","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C0:6E4BB:1814B38:1C3C2F9:6AB92D27"},"commit":{"sha":"33cdf50d103385e6c1019e29abc7dbe11f900970","url":"https://github.com/microsoft/O-CNN/commit/33cdf50d103385e6c1019e29abc7dbe11f900970","date":"2018-05-17T11:08:53Z","author_date":"2018-05-17T11:01:38Z","committer_date":"2018-05-17T11:08:53Z","tree_sha":"c68ec623b6b090b4218b93d5afe2b88cabc09715","message_first_line":"Update Ubuntu installation instructions"},"tree_request_status":200,"tree_rate":{"github_remaining":"1576","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0814:278AC2:1878AC3:1CA0C92:6AB92D28"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15955,"blob_sha":"893730c031eddb6faede47a38f0f7fae8b7fee6b","priority":0}],"documents":[{"path":"README.md","size":15955,"blob_sha":"893730c031eddb6faede47a38f0f7fae8b7fee6b","priority":0,"status":200,"text":"# O-CNN: Octree-based Convolutional Neural Networks \r\n\r\nBy [Peng-Shuai Wang](https://wang-ps.github.io/), [Yang Liu](https://xueyuhanlang.github.io/), Yu-Xiao Guo, Chun-Yu Sun and [Xin Tong](https://www.microsoft.com/en-us/research/people/xtong/).\r\n\r\n[Internet Graphics Group](https://www.microsoft.com/en-us/research/group/internet-graphics/), [Microsoft Research Asia](https://www.microsoft.com/en-us/research/lab/microsoft-research-asia/).\r\n\r\n## Introduction \r\n\r\nThis repository contains the implementation of O-CNN introduced in our Siggraph 2017 paper \"[O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis](https://wang-ps.github.io/O-CNN.html)\".  The code is released under the MIT license.\r\n\r\n### Citation\r\nIf you use our code or models, please cite our paper.\r\n\r\n    @article {Wang-2017-OCNN,\r\n        title     = {O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis},\r\n        author    = {Wang, Peng-Shuai and Liu, Yang and Guo, Yu-Xiao and Sun, Chun-Yu and Tong, Xin},\r\n        journal   = {ACM Transactions on Graphics (SIGGRAPH)},\r\n        volume    = {36},\r\n        number    = {4},\r\n        year      = {2017},\r\n    }\r\n\r\n### O-CNN\r\nO-CNN is built upon the [Caffe](https://github.com/BVLC/caffe) framework and it supports octree-based convolution, deconvolution, pooling, and unpooling. The code has been tested on the Windows 10 x64 (It can be also built on the Ubuntu 16.04). Its installation is as follows:\r\n\r\n- Clone [Caffe](https://github.com/BVLC/caffe) with revision `6bfc5ca8f7c2a4b7de09dfe7a01cf9d3470d22b3`\r\n- The code for O-CNN is contained in the directory `caffe`. Clone and put it into the Caffe directory. \r\n- Follow the installation [instructions](https://github.com/BVLC/caffe/tree/windows) of Caffe to build the code to get the executive files `caffe.exe`, `convert_octree_data.exe` and `feature_pooling.exe` etc.\r\n\r\n`NOTE`: Compared with the original code used in the experiments of our paper, the code in this repository is refactored for the readability and maintainability, with the sacrifice of speed (it is about 10% slower, but it is more memory-efficient). If you want to try the original code or do some speed comparisons with our `O-CNN`, feel free to drop me an email, we can share the original code with you.\r\n\r\n`NOTE`: To build the code on other platforms (such as Ubuntu), you should add the following line `set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} --std=c++11\")` in the `Line 60` of the `CMakeLists.txt` file and follow the official installation instructions [here](http://caffe.berkeleyvision.org/installation.html). \r\n\r\n### Octree input for O-CNN\r\nOur O-CNN takes the octree representation of 3D objects as input.  The efficient octree data structure is described in our paper. For convenience, we provide a reference implementation to convert the point cloud with oriented normal to our octree format.\r\nFurthermore, we also provide a tool to convert the octree file into ply files, which contains the coordinate of the finest leaf nodes and the corresponding normal signal. Note that when the leaf node is empty, the value of normal signal is (0, 0, 0).\r\nThe code is contained in the directory `octree`, along with the Microsoft Visual studio 2015 solution file, which can be built to obtain the executable file `octree.exe` and `octree2PLY.exe`. \r\n\r\n`NOTE`: To build the octree, the bounding sphere of the object is needed to be computed. The initial version of our code is built upon the bound sphere library from this [link](https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html). However, we remove it from our code due to the licence issue. To reproduce the results in our paper, it is highly recommended to download the [bound sphere library](https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html). For more details, please refer to the comments in the file `octree/Octree/main.cpp`.\r\n\r\n## Installation\r\n\r\n### Docker Setup\r\nA docker build file is provided to automatically build your environments so you don't have to worry about project dependencies. To get your environment up and running, execute the following:\r\n```\r\ncd docker\r\ndocker build -t ocnn .\r\ndocker run --name ocnn -it ocnn /bin/bash\r\n```\r\n\r\nYou will now find yourself in a container environment where you can automatically prepare datasets and train/test an o-cnn. See the dataset preparation section.\r\n\r\nUseful executables in your path are,  \r\n[`virtualscanner`](https://github.com/wang-ps/O-CNN/tree/master/virtual_scanner) - used to convert obj/off files to points files  \r\n[`octree`](#octree) - used to convert point files to octree files  \r\n[`octree2ply`](#octree-2-ply) - used to convert octree files to ply files  \r\n[`convert_octree_data`](#convert-octree-data) - used to convert octree files to lmdb files  \r\n`caffe` - executable for training / evaluating models  \r\n`feature_pooling` - pools features and outputs them to an lmdb  \r\n\r\n`Many thanks` to David Pisani (@[dapisani](https://github.com/dapisani)) for his contribution to the docker setup!\r\n\r\n## O-CNN in Action\r\nThe experiments in our paper can be reproduced as follows.\r\n\r\n### Data preparation\r\nFor achieving better performance,  we store all the octree inputs in a  `leveldb` or `lmdb` database. Here are the details how to generate databases for O-CNN.\r\n\r\n#### Automated Dataset Setup\r\nThe python folder has some scripts to automatically prepare datasets. \r\n```\r\nUsage: prepare_dataset.py [-h] --datadir DATADIR --dataset {ModelNet10,ModelNet40}\r\n              --points_converter_path POINTS_CONVERTER_PATH\r\n              --octree_converter_path OCTREE_CONVERTER_PATH\r\n              --lmdb_converter_path LMDB_CONVERTER_PATH\r\n              [--starting_action {Retrieve,Extract,Clean,CreatePoints,CreateOctree,CreateLmdb,Finished}]\r\n              [--depth DEPTH] [--full_layer FULL_LAYER]\r\n              [--displacement DISPLACEMENT] [--augmentation AUGMENTATION]\r\n              [--for_segmentation]\r\n\r\n              datadir: directory where to download and prepare dataset\r\n              dataset: dataset to prepare\r\n              points_converter_path: path to obj/off to points converter\r\n              octree_converter_path: path to points to octree converter\r\n              lmdb_converter_path: path to octree to lmdb converter\r\n              starting_action: if specified, starting action to perform from. Otherwise, continue from last completed action.\r\n              depth: depth of octrees to create (default 6)\r\n              full_layer: layer in which octree is full (default 2)\r\n              displacement: offset value for thin shapes (default 0.55)\r\n              augmentation: number of model poses converted to octrees (default 24)\r\n              for_segmentation: flags whether dataset is for segmentation\r\n```\r\n\r\n#### Manual Setup\r\n- Download and unzip the corresponding 3D model dataset (like the [ModelNet40](http://modelnet.cs.princeton.edu) dataset) into a folder.\r\n- Convert all the models (in OBJ/OFF format) to dense point clouds with normals (in `POINTS` format). \r\nFor the definition of `POINTS` format, please refer to the function `void load_pointcloud()` defined in the file `octree/Octree/main.cpp`.\r\nNote that some OFF files in the dataset may not be loaded by the [tools](https://github.com/wang-ps/O-CNN/tree/master/virtual_scanner) I provided. It is easy to fix these files. Just open them using any text editor and break the first line after the characters `OFF`.\r\nAs detailed in our paper, we build a virtual scanner and shoot rays to calculate the intersection points and oriented normals. The executable files and source code can be downloaded [here](https://github.com/wang-ps/O-CNN/tree/master/virtual_scanner/exe). \r\n\r\n### Useful Executables\r\n#### Octree\r\n- Run the tool `octree.exe` to convert point clouds into the octree files.\r\n        \r\n        Usage: Octree <filelist> [depth] [full_layer] [displacement] [augmentation] [segmentation]\r\n            filelist: a text file of which each line specifies the full path name of a POINTS file\r\n            depth: the maximum depth of the octree tree\r\n            full_layer: which layer of the octree is full. suggested value: 2\r\n            displacement: the offset value for handing extremely thin shapes: suggested value: 0.55\r\n            segmentation: a boolean value indicating whether the output is for the segmentation task.\r\n#### Octree 2 Ply\r\n - Run the tool `octree2ply.exe` to convert octree files to ply files.\r\n ```\r\n        Usage: Octree2Ply <filelist> [segmentation]\r\n            filelist: a text file of which each line specifies the full path name of a octree file\r\n            segmentation: a boolean value indicating whether the octree is for the segmentation task\r\n ```\r\n#### Convert Octree Data\r\n- Convert all the octrees into a `lmdb` or `leveldb` database by the tool `convert_octree_data.exe`.\r\n```\r\n\t\tUsage: convert_octree_data.exe <rootfolder> <listfile> <db_name>\r\n            rootfolder: base folder where db will be output and listed files are relative to\r\n            listfile: file which contains a list of each octree file to be added to the leveldb. \r\n                      Each entry should be the [octree_file] [category_number]\r\n            db_name: Name of db to be outputted\r\n```\r\n\r\n\r\n### O-CNN for Shape Classification \r\nThe instruction to run the shape classification experiment:\r\n\r\n- Download the [ModelNet40](http://modelnet.cs.princeton.edu/ModelNet40.zip) dataset, and convert it to a `lmdb` database as described above. [Here](https://www.dropbox.com/s/vzmxsqkp2lwwwp8/ModelNet40_5.zip?dl=0) we provide a `lmdb` database with 5-depth octrees for convenience.\r\n- Download the `O-CNN` protocol buffer files, which are contained in the folder `caffe/examples/o-cnn`.\r\n- Configure the path of the database and run `caffe.exe` according to the instructions of [Caffe](http://caffe.berkeleyvision.org/tutorial/interfaces.html). We also provide our pre-trained Caffe model in `caffe/examples/o-cnn`.\r\n\r\n### O-CNN for Shape Retrieval\r\nThe instruction to run the shape retrieval experiment:\r\n\r\n- Download the dataset from  [SHREC16](http://shapenet.cs.stanford.edu/shrec16/), and convert it to a `lmdb` database as described above. \r\n`Note`: the upright direction of the 3D models in the `ShapeNet55` is `Y` axis. When generating octree files, please uncomment `line 95` in the file `octree/Octree/main.cpp` and rebuild the code.\r\n[Here](http://pan.baidu.com/s/1mieF2J2) we provide the lmdb databases with 5-depth octrees for convenience, just download the files prefixed with `S55` and un-zip them.\r\n- Follow the same approach as the classification task to train the O-CNN with the `O-CNN` protocal files `S55_5.prototxt` and `solver_S55_5.prototxt`, which are contained in the folder `caffe/examples/o-cnn`.\r\n- In the retrieval experiment, the `orientation pooling` is used to achieve better performance, which can be perfromed following the steps below.\r\n    - Generate feature for each object. For example, to generate the feature for the training data, open the file `S55_5.prototxt`, uncomment line 275~283, set the `source` in line 27 to the `training lmdb`, set the `batch_size` in line 28  to 1, and run the following command.\r\n            \r\n            caffe.exe test --model=S55_5.prototxt --weights=S55_5.caffemodel --blob_prefix=feature/S55_5_train_ \r\n            --gpu=0 --save_seperately=false --iterations=[the training object number]\r\n\r\n    Similarly, the feature for the validation data and testing data can also be generated. Then we can get three binary files, `S55_5_train_feature.dat, S55_5_val_feature.dat and S55_5_test_feature.dat`, containing the features of the training, validation and testing data respectively.\r\n    - Pool the features of the same object. There are 12 features for each object since each object is rotated 12 times. We use max-pooling to merge these features.\r\n            \r\n            feature_pooling.exe --feature=feature/S55_5_train_feature.dat --number=12 \r\n            --dbname=feature/S55_5_train_lmdb --data=[the data list file name]\r\n\r\n    Then we can get the feature of training, validation and testing data after pooling, contained in the `lmdb` database `S55_5_train_lmdb`, `S55_5_val_lmdb` and `S55_5_test_lmdb`.\r\n    - Fine tune the `FC` layers of O-CNN, i.e. using the `solver_S55_5_finetune.prototxt` to re-train the `FC` layers.\r\n            \r\n            caffe.exe train --solver=solver_S55_5_finetune.prototxt --weights=S55_5.caffemodel\r\n\r\n    - Finally, dump the probabilities of each testing objects. Open the file `S55_5_finetune.prototxt`, uncomment the line 120 ~ 129, set the `batch_size` in line 27 to 1, change the `source` in line 26 to `feature/S55_5_test_lmdb`, and run the following command.\r\n            \r\n            caffe.exe test --model=S55_5_finetune.prototxt --weights=S55_5_finetune.caffemodel \r\n            --blob_prefix=feature/S55_test_ --gpu=0 --save_seperately=false --iterations=[...]\r\n            \r\n- Use the matlab script `retrieval.m`, contained in the folder `caffe/examples/o-cnn`, to generate the final retrieval result. And evaluated it by the javascript code provided by [SHREC16](http://shapenet.cs.stanford.edu/shrec16/code/Evaluator.zip).\r\n\r\n### O-CNN for Shape Segmentation\r\nThe instruction to run the segmentation experiment: \r\n\r\n- The original part annotation data is provided as the supplemental material of the work \"[A Scalable Active Framework for Region Annotation in 3D Shape Collections](http://cs.stanford.edu/~ericyi/project_page/part_annotation/index.html)\". As detailed in Section 5.3 of our paper, the point cloud in the original dataset is relatively sparse and the normal information is missing. We convert the sparse point clouds to dense points with normal information and correct part annotation.  Here is [one converted dataset](http://pan.baidu.com/s/1gfN5tPh) for your convenience, and the dense point clouds with `segmentation labels` can be downloaded [here](http://pan.baidu.com/s/1mieF2J2).  \r\n- Run the `octree.exe` to convert these point clouds to octree files. Note that you should set the parameter `Segmentation` to 1 when running the `octree.exe`. Then you can get the octree files, which also contains the segmentation label.\r\n- Convert the dataset to a `lmdb` database. Since the segmentation label is contained in each octree file, the object label for each octree file can be set to any desirable value. And the object label is just ignored in the segmentation task.\r\n- Download the protocol buffer files, which are contained in the folder `caffe/examples/o-cnn`. `NOTE:` as detailed in our paper, the training parameters are tuned and the pre-trained model from the retrieval task is used when the training dataset is relatively small. More details will be released soon.\r\n- In the testing stage, the output label and probability of each finest leaf node can also be obtained. Specifically, open the file `segmentation_5.prototxt`, uncomment line 458~485, , set the `batch_size` in line 31  to 1, and run the following command to dump the result.  \r\n\r\n        caffe.exe test --model=segmentation_5.prototxt --weights=segmentation_5.caffemodel --gpu=0\r\n        --blob_prefix=feature/segmentation_5_test_ --binary_mode=false --save_seperately=true --iterations=[...]\r\n\r\n\r\n- For CRF refinement, please refer to the code provided [here](https://github.com/wang-ps/O-CNN/tree/master/densecrf).  We will provide the automated tool soon.\r\n\r\n## Acknowledgments\r\n\r\nWe thank the authors of [ModelNet](http://modelnet.cs.princeton.edu), [ShapeNet](http://shapenet.cs.stanford.edu/shrec16/) and [Region annotation dataset](http://cs.stanford.edu/~ericyi/project_page/part_annotation/index.html) for sharing their 3D model datasets with the public.\r\n\r\n## Contact\r\n\r\nPlease contact us (Pengshuai Wang wangps@hotmail.com, Yang Liu yangliu@microsoft.com ) if you have any problem about our implementation or request to access all the datasets.  \r\n\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8BCC:3AC15:181138:5E8BD1:6AB92D28"},"text_sha256":"0b1b03885e23a966c17dd98e5550d88f8a18e2a8c1cb7d76949c53bf1e4c3ab0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1575","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F7:E80A6:17BF9FB:1BE7ACE:6AB92D28"},"commit":{"sha":"d7928c69e7ad22b35d5ab499682bd4eb5f6ccbb9","url":"https://github.com/microsoft/O-CNN/commit/d7928c69e7ad22b35d5ab499682bd4eb5f6ccbb9","date":"2022-08-30T09:45:51Z","author_date":"2022-08-30T09:39:47Z","committer_date":"2022-08-30T09:45:51Z","tree_sha":"1d1158d64fce2e2b7f65a892470eb0cbdd63ccc5","message_first_line":"Microsoft mandatory file"},"tree_request_status":200,"tree_rate":{"github_remaining":"1574","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FA:380E1C:17E8602:1C0F6BC:6AB92D29"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4197,"blob_sha":"db985ca244f3925bf50356613e48bd5daf64ed5f","priority":0},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1}],"documents":[{"path":"README.md","size":4197,"blob_sha":"db985ca244f3925bf50356613e48bd5daf64ed5f","priority":0,"status":200,"text":"# O-CNN\r\n\r\n<!-- ## Introduction <a name=\"introduction\"><\/a> -->\r\n\r\nThis repository contains the implementation of our papers related with *O-CNN*.  \r\nThe code is released under the **MIT license**.\r\n\r\n- **[O-CNN: Octree-based Convolutional Neural Networks](https://wang-ps.github.io/O-CNN.html)**<br/>\r\n  By [Peng-Shuai Wang](https://wang-ps.github.io/), [Yang Liu](https://xueyuhanlang.github.io/), \r\n  Yu-Xiao Guo, Chun-Yu Sun and [Xin Tong](https://www.microsoft.com/en-us/research/people/xtong/) <br/>\r\n  ACM Transactions on Graphics (SIGGRAPH), 36(4), 2017\r\n\r\n- **[Adaptive O-CNN: A Patch-based Deep Representation of 3D Shapes](https://wang-ps.github.io/AO-CNN.html)**<br/>\r\nBy [Peng-Shuai Wang](https://wang-ps.github.io/), Chun-Yu Sun, [Yang Liu](https://xueyuhanlang.github.io/) \r\nand [Xin Tong](https://www.microsoft.com/en-us/research/people/xtong/)<br/>\r\nACM Transactions on Graphics (SIGGRAPH Asia), 37(6), 2018<br/>\r\n\r\n- **[Deep Octree-based CNNs with Output-Guided Skip Connections for 3D Shape and Scene Completion](https://arxiv.org/abs/2006.03762)**<br/>\r\nBy [Peng-Shuai Wang](https://wang-ps.github.io/), [Yang Liu](https://xueyuhanlang.github.io/) \r\nand [Xin Tong](https://www.microsoft.com/en-us/research/people/xtong/)<br/>\r\nComputer Vision and Pattern Recognition (CVPR) Workshops, 2020<br/>\r\n\r\n- **[Unsupervised 3D Learning for Shape Analysis via Multiresolution Instance Discrimination](https://arxiv.org/abs/2008.01068)**<br/>\r\nBy [Peng-Shuai Wang](https://wang-ps.github.io/), Yu-Qi Yang, Qian-Fang Zou, \r\n[Zhirong Wu](https://www.microsoft.com/en-us/research/people/wuzhiron/), \r\n[Yang Liu](https://xueyuhanlang.github.io/) \r\nand [Xin Tong](https://www.microsoft.com/en-us/research/people/xtong/)<br/>\r\nAAAI Conference on Artificial Intelligence (AAAI), 2021. [Arxiv, 2020.08]<br/>\r\n\r\nIf you use our code or models, please [cite](docs/citation.md) our paper.\r\n\r\n\r\n\r\n### Contents\r\n- [Installation](docs/installation.md)\r\n- [Data Preparation](docs/data_preparation.md)\r\n- [Shape Classification](docs/classification.md)\r\n- [Shape Retrieval](docs/retrieval.md)\r\n- [Shape Segmentation](docs/segmentation.md)\r\n- [Shape Autoencoder](docs/autoencoder.md)\r\n- [Shape Completion](docs/completion.md)\r\n- [Image2Shape](docs/image2shape.md)\r\n- [Unsupverised Pretraining](docs/unsupervised.md)\r\n- [ScanNet Segmentation](docs/scannet.md)\r\n\r\n\r\n\r\n\r\n### What's New?\r\n- 2021.08.24: Update the code for pythorch-based O-CNN, including a UNet and\r\n  some other major components. Our vanilla implementation without any tricks on\r\n  [ScanNet](docs/scannet.md) dataset achieves 76.2 mIoU on the \r\n  [ScanNet benchmark](http://kaldir.vc.in.tum.de/scannet_benchmark/), even surpassing the\r\n  recent state-of-art approaches published in CVPR 2021 and ICCV 2021.\r\n- 2021.03.01: Update the code for pytorch-based O-CNN, including a ResNet and\r\n  some important modules.\r\n- 2021.02.08: Release the code for ShapeNet segmentation with HRNet.\r\n- 2021.02.03: Release the code for ModelNet40 classification with HRNet.\r\n- 2020.10.12: Release the initial version of our O-CNN under PyTorch. The code\r\n  has been tested with the [classification task](docs/classification.md#o-cnn-on-pytorch).\r\n- 2020.08.16: We released our code for [3D unsupervised learning](docs/unsupervised.md).\r\n  We provided a unified network architecture for generic shape analysis tasks and \r\n  an unsupervised method to pretrain the network. Our method achieved state-of-the-art \r\n  performance on several benchmarks.\r\n- 2020.08.12: We released our code for \r\n  [Partnet segmentation](docs/segmentation.md#shape-segmentation-on-partnet-with-tensorflow).\r\n  We achieved  an average IoU of **58.4**, significantly better than PointNet\r\n  (IoU: 35.6), PointNet++ (IoU: 42.5), SpiderCNN (IoU: 37.0), and PointCNN(IoU:\r\n  46.5).\r\n- 2020.08.05: We released our code for [shape completion](docs/completion.md).\r\n  We proposed a simple yet efficient network and output-guided skip connections\r\n  for 3D completion, which achieved state-of-the-art performances on several \r\n  benchmarks.\r\n\r\n\r\nPlease contact us (Peng-Shuai Wang wangps@hotmail.com, Yang Liu yangliu@microsoft.com ) \r\nif you have any problems about our implementation.  \r\n\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B84:3B1F3:186635:5EE30F:6AB92D29"},"text_sha256":"f4c3fa121c6136a2c671752576bb49f8521b0100200c89b8207ddcfa0c9d8ccc"},{"path":"SECURITY.md","size":2757,"blob_sha":"869fdfe2b246991a053fab9cfec1bed3ab532ab1","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96EC:324E19:181A63:5E967C:6AB92D2A"},"text_sha256":"89c4e4b9ba7ec705482e2de05135d0626d33bf8c2c66119c65d7a306dd83459c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"rafaelpadilla/Object-Detection-Metrics","input_row":{"repository":"rafaelpadilla/Object-Detection-Metrics","url":"https://github.com/rafaelpadilla/Object-Detection-Metrics","name":"Object-Detection-Metrics","owner":"rafaelpadilla","description":"Most popular metrics used to evaluate object detection algorithms.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5102,"issues":150,"created_at":"2018-05-23T17:51:15Z","updated_at":"2026-09-22T20:18:25Z","first_commit_at":"2018-05-23T17:51:16Z","last_commit_at":"2026-07-16T14:17:42Z","activity_months":97.760000000000005,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:18.537Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"rafaelpadilla/Object-Detection-Metrics","visibility":"public","created_at":"2018-05-23T17:51:15Z","updated_at":"2026-09-22T20:18:25Z","private":false,"fork":false,"archived":false,"stargazers_count":5102,"open_issues_count":1,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1573","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17DBC5F:1C0309D:6AB92D2A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1572","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0901:278AC2:1878C9A:1CA0EEA:6AB92D2A"},"commit":{"sha":"f093d23c574595e60eeeba2798db5f86ba9079ef","url":"https://github.com/rafaelpadilla/Object-Detection-Metrics/commit/f093d23c574595e60eeeba2798db5f86ba9079ef","date":"2018-05-24T02:39:03Z","author_date":"2018-05-24T02:39:03Z","committer_date":"2018-05-24T02:39:03Z","tree_sha":"1192d2275fa45248b4c40b507b900d15bd48ee00","message_first_line":"Merge branch 'master' of https://github.com/rafaelpadilla/Object-Detection-Metrics"},"tree_request_status":200,"tree_rate":{"github_remaining":"1571","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:1818B7A:1C40BBA:6AB92D2B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16559,"blob_sha":"1ab994d1c9651b1f06fbb08db15a8b6fdb0232e0","priority":0}],"documents":[{"path":"README.md","size":16559,"blob_sha":"1ab994d1c9651b1f06fbb08db15a8b6fdb0232e0","priority":0,"status":200,"text":"# Metrics for object detection\n  \nThe motivation of this project is the lack of consensus used by different works and implementations concerning the *evaluation metrics of the object detection problem*. Although on-line competitions use their own metrics to evaluate the task of object detection, just some of them offer reference code snippets to calculate the accuracy of the detected objects.  \nResearchers who want to evaluate their work using different datasets than those offered by the competitions, need to implement their own version of the metrics. Sometimes a wrong or different implementation can create different and biased results. Ideally, in order to have trustworthy benchmarking among different approaches, it is necessary to have a flexible implementation that can be used by everyone regardless the dataset used.  \n\nThis project aims to provide easy-to-use functions implementing the same metrics used by the the most popular competitions of object detection. Our implementation does not require modifications of your detection model to complicated input formats, avoiding conversions to XML or JSON files. We simplified the input data (ground truth bounding boxes and detected bounding boxes) and gathered in a single project the main metrics used by the academia and challenges. Our implementation was carefully compared against the official implementations and our results are exactly the same.   \n\nIn the topics below you can find an overview of the most popular metrics and competitions, as well as samples showing how to use our code.\n\n## Different competitions, different metrics  \n\n* **[PASCAL VOC challenge](http://host.robots.ox.ac.uk/pascal/VOC/)** offers a Matlab script in order to evaluate the quality of detected objects. A documentation explaining their criteria for object detection metrics can be accessed [here](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/htmldoc/devkit_doc.html#SECTION00050000000000000000). Participants of the competition can use the Matlab script to measure the accuracy of their detections before submitting their results. The current metrics used by the current VOC PASCAL object detection challenge are the **Precision/Recall curve** and **Average Precision**.  \nThe PASCAL VOC Matlab evaluation code reads the ground truth bounding boxes from XML files, requiring changes in the code if you want to apply it to other datasets or to your speficic cases. Even though projects such as [Faster-RCNN](https://github.com/rbgirshick/py-faster-rcnn) implement VOC PASCAL evaluation metrics, it is also necessary to convert the detected bounding boxes into their specific format. [Tensorflow](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/evaluation_protocols.md) framework also has their PASCAL VOC metrics implementation.  \n\n* **[COCO challenge](https://competitions.codalab.org/competitions/5181)** uses different metrics to evaluate the accuracy of object detection of different algorithms. [Here](http://cocodataset.org/#detection-eval) you can find a documentation explaining the 12 metrics used for characterizing the performance of an object detector on COCO. This competition offers python and matlab codes so users can verify their scores before submitting the results. It is also necessary to convert the results in a [format](http://cocodataset.org/#format-results) required by the competition.  \n\n* **[Google Open Images Dataset V4 competition](https://storage.googleapis.com/openimages/web/challenge.html)** also uses mean Average Precision (mAP) over the 500 classes to evaluate the object detection task. \n\n* **[ImageNet Object Localization Challenge](https://www.kaggle.com/c/imagenet-object-detection-challenge)** defines an error for each image, considering the class and the overlapping region between ground truth and detected boxes. The total error is computed as the average of all min errors of all the images in the test dataset. [Here](https://www.kaggle.com/c/imagenet-object-localization-challenge#evaluation) are more details about their evaluation method.  \n\n## Important definitions  \n\n### Intersection Over Union (IOU)\n\nIntersection Over Union (IOU) is measure based on Jaccard Index that evaluates the overlap between two bounding boxes. It requires a ground truth bounding box ![](http://latex.codecogs.com/gif.latex?B_%7Bgt%7D) and a predicted bounding box ![](http://latex.codecogs.com/gif.latex?B_p). With it we can tell if a detection is valid (True Positive) or not (False Positive).  \nIOU is given by the overlapping area between the predicted bounding box and the ground truth bounding box divided by the area of union between the bounding boxes:  \n\n<p align=\"center\"> \n<img src=\"http://latex.codecogs.com/gif.latex?%5Ctext%7BIOU%7D%20%3D%20%5Cfrac%7B%5Ctext%7Barea%7D%20%5Cleft%28B_p%20%5Ccap%20B_%7Bgt%7D%5Cright%29%7D%7B%5Ctext%7Barea%7D%20%5Cleft%28B_p%20%5Ccup%20B_%7Bgt%7D%5Cright%29%7D\">\n<\/p>\n\nThe image below shows the IOU between a ground truth bounding box (in green) and a detected bounding box (in red).\n\n<!--- IOU --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/iou.png\" align=\"center\"/><\/p>\n\n### True Positive, False Positive, False Negative and True Negative  \n\nSome basic concepts used by the metrics:  \n\n* **True Positive (TP)**: A correct detection. Detection with IOU ≥ _threshold_  \n* **False Positive (FP)**: A wrong detection. Detection with IOU < _threshold_  \n* **False Negative (FN)**: A ground truth not detected  \n* **True Negative (TN)**: Does not apply. It would represent a corrected misdetection. In the detection object task there are many possible bounding boxes that should not be detected within an image. Thus, TN would be all possible bounding boxes that were corrrectly not detected (so many possible boxes within an image). That's why it is not used by the metrics.\n\n_threshold_: depending on the metric, it is usually set as 50%, 75% or 95%.\n\n### Precision\n\nPrecision is ability of a model to identify **only** the relevant objects. It is the percentage of positive predictions that are correct and is given by:\n\n<p align=\"center\"> \n<img src=\"http://latex.codecogs.com/gif.latex?Precision%20%3D%20%5Cfrac%7BTP%7D%7BTP&plus;FP%7D%3D%5Cfrac%7BTP%7D%7B%5Ctext%7Ball%20detections%7D%7D\">\n<\/p>\n\n### Recall \n\nRecall is ability of a model to find all the relevant cases (all ground truth bounding boxes). It is the percentage of true positive detected among all relevant ground truths and is given by:\n\n<p align=\"center\"> \n<img src=\"http://latex.codecogs.com/gif.latex?Recall%20%3D%20%5Cfrac%7BTP%7D%7BTP&plus;FN%7D%3D%5Cfrac%7BFN%7D%7B%5Ctext%7Ball%20ground%20truths%7D%7D\">\n<\/p>\n\n## Metrics\n\n### Precision x Recall curves\n\nThe Precision x Recall curve is a good way to evaluate the performance of an object detector as the confidence is changed. There is a curve for each object class. An object detector of a particular class is considered good if its prediction stays high as recall increases, which means that if you vary the confidence threshold the precision and recall will still be high. Another way to identify a good object detector is to look for a detector that can identify only relevant objects (0 False Positives = high precision), finding all ground truth objects (0 False Negatives = high recall). A poor object detector needs to increase the number of detected objects (increasing False Positives = lower precision) in order to retrieve all ground truth objects (high recall). That's why the Precision x Recall curve usually starts with high precision values, decreasing as recall increases.\nThis kind of curve is used by the VOC PASCAL 2012 challenge and is available in our implementation.  \n\n### Average Precision\n\nAnother way to compare the performance of object detectors is to calculate the area under the curve (AUC) of the Precision x Recall curve. As AP curves are often zigzag curves frequently going up and down, comparing different curves (different detectors) in the same plot usually is not an easy task - because the curves tend to cross each other much frequently. That's why Average Precision (AP), a numerical metric, can also help us compare different detectors. In practice AP is the precision averaged across all recall values between 0 and 1. \n\nVOC PASCAL 2012 challenge uses the *interpolated average precision*. It tries to summarize the shape of the Precision x Recall curve by averaging the precision at a set of eleven equally spaced recall levels [0, 0.1, 0.2, ... , 1]:\n\n<p align=\"center\"> \n<img src=\"http://latex.codecogs.com/gif.latex?AP%20%3D%20%5Cfrac%7B1%7D%7B11%7D%5Csum_%7Br%5Cin%5C%7B0%2C0.1%2C...%2C1%5C%7D%7D%5Crho_%7B%5Ctext%7Binterp%7D%5Cleft%20%28r%5Cright%20%29%7D\">\n<\/p>\n\nwith\n\n<p align=\"center\"> \n<img src=\"http://latex.codecogs.com/gif.latex?%5Crho_%7B%5Ctext%7Binterp%7D%5Cleft%20%28r%5Cright%20%29%7D%3D%5Cmax_%7B%5Cwidetilde%7Br%7D%3A%5Cwidetilde%7Br%7D%5Cgeqslant%7Br%7D%7D%20%5Crho%20%5Cleft%20%28%5Cwidetilde%7Br%7D%20%5Cright%29\">\n<\/p>\n\nwhere ![](http://latex.codecogs.com/gif.latex?%5Crho%5Cleft%20%28%20%5Ctilde%7Br%7D%20%5Cright%20%29) is the measured precision at recall ![](http://latex.codecogs.com/gif.latex?%5Ctilde%7Br%7D).\n\nInstead of using the precision observed at each point, the AP is obtained by interpolating the precision at each level ![](http://latex.codecogs.com/gif.latex?r) taking the maximum precision whose recall value is greater than ![](http://latex.codecogs.com/gif.latex?r).\n\n#### Illustrated example \n\nAn example helps us understand better the concept of the interpolated average precision. Look at the detections below:\n  \n<!--- Image samples 1 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/samples_1.png\" align=\"center\"/><\/p>\n  \nThere is a total of 7 images with 15 ground truth objects representented by the green bounding boxes and 24 detected objects represented by the red bounding boxes. Each detected object has a confidence level and is identified by a letter (A,B,...,Y).  \nThe following table shows the bounding boxes with their corresponding confidences. The last column identifies the detections as TP or FP. In this example a TP is considered if IOU ![](http://latex.codecogs.com/gif.latex?%5Cgeq) 30%, otherwise it is a FP. By looking at the images above we can roughly tell if the detections are TP or FP.\n\n<!--- Table 1 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/table_1.png\" align=\"center\"/><\/p>\n\n<!---\n| Images | Detections | Confidences | TP or FP |\n|:------:|:----------:|:-----------:|:--------:|\n| Image 1 | A | 88% | FP |\n| Image 1 | B | 70% | TP |\n| Image 1 |\tC\t| 80% | FP |\n| Image 2 |\tD\t| 71% | FP |\n| Image 2 |\tE\t| 54% | TP |\n| Image 2 |\tF\t| 74% | FP |\n| Image 3 |\tG\t| 18% | TP |\n| Image 3 |\tH\t| 67% | FP |\n| Image 3 |\tI\t| 38% | FP |\n| Image 3 |\tJ\t| 91% | TP |\n| Image 3 |\tK\t| 44% | FP |\n| Image 4 |\tL\t| 35% | FP |\n| Image 4 |\tM\t| 78% | FP |\n| Image 4 |\tN\t| 45% | FP |\n| Image 4 |\tO\t| 14% | FP |\n| Image 5 |\tP\t| 62% | TP |\n| Image 5 |\tQ\t| 44% | FP |\n| Image 5 |\tR\t| 95% | TP |\n| Image 5 |\tS\t| 23% | FP |\n| Image 6 |\tT\t| 45% | FP |\n| Image 6 |\tU\t| 84% | FP |\n| Image 6 |\tV\t| 43% | FP |\n| Image 7 |\tX\t| 48% | TP |\n| Image 7 |\tY\t| 95% | FP |\n--->\n\nIn some images there are more than one detection overlapping a ground truth. In those cases the detection with the highest IOU is taken, discarding the other detections. This rule is also applied by the VOC PASCAL 2012 metric: \"e.g. 5 detections of a single object is counted as 1 correct detection and 4 false detections”.\n\nThe Precision x Recall curve is plotted by calculating the precision and recall values of the accumulated TP or FP detections. For this, first we need to order the detections by their confidences, then we calculate the precision and recall for each accumulated detection as shown in the table below: \n\n<!--- Table 2 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/table_2.png\" align=\"center\"/><\/p>\n\n<!---\n| Images | Detections | Confidences |  TP | FP | Acc TP | Acc FP | Precision | Recall |\n|:------:|:----------:|:-----------:|:---:|:--:|:------:|:------:|:---------:|:------:|\n| Image 7 |\tY\t| 95% | 0 | 1 | 0 | 1 | 0       | 0      |\n| Image 5 |\tR\t| 95% | 1 | 0 | 1 | 1 | 0.5     | 0.0666 |\n| Image 3 |\tJ\t| 91% | 1 | 0 | 2 | 1 | 0.6666  | 0.1333 |\n| Image 1 | A | 88% | 0 | 1 | 2 | 2 | 0.5     | 0.1333 |\n| Image 6 |\tU\t| 84% | 0 | 1 | 2 | 3 | 0.4     | 0.1333 |\n| Image 1 |\tC\t| 80% | 0 | 1 | 2 | 4 | 0.3333  | 0.1333 |\n| Image 4 |\tM\t| 78% | 0 | 1 | 2 | 5 | 0.2857  | 0.1333 |\n| Image 2 |\tF\t| 74% | 0 | 1 | 2 | 6 | 0.25    | 0.1333 |\n| Image 2 |\tD\t| 71% | 0 | 1 | 2 | 7 | 0.2222  | 0.1333 |\n| Image 1 | B | 70% | 1 | 0 | 3 | 7 | 0.3     | 0.2    |\n| Image 3 |\tH\t| 67% | 0 | 1 | 3 | 8 | 0.2727  | 0.2    |\n| Image 5 |\tP\t| 62% | 1 | 0 | 4 | 8 | 0.3333  | 0.2666 |\n| Image 2 |\tE\t| 54% | 1 | 0 | 5 | 8 | 0.3846  | 0.3333 |\n| Image 7 |\tX\t| 48% | 1 | 0 | 6 | 8 | 0.4285  | 0.4    |\n| Image 6 |\tT\t| 45% | 0 | 1 | 6 | 9 | 0.4     | 0.4    |\n| Image 4 |\tN\t| 45% | 0 | 1 | 6 | 10 | 0.375  | 0.4    |\n| Image 5 |\tQ\t| 44% | 0 | 1 | 6 | 11 | 0.3529 | 0.4    |\n| Image 3 |\tK\t| 44% | 0 | 1 | 6 | 12 | 0.3333 | 0.4    |\n| Image 6 |\tV\t| 43% | 0 | 1 | 6 | 13 | 0.3157 | 0.4    |\n| Image 3 |\tI\t| 38% | 0 | 1 | 6 | 14 | 0.3    | 0.4    |\n| Image 4 |\tL\t| 35% | 0 | 1 | 6 | 15 | 0.2857 | 0.4    |\n| Image 5 |\tS\t| 23% | 0 | 1 | 6 | 16 | 0.2727 | 0.4    |\n| Image 3 |\tG\t| 18% | 1 | 0 | 7 | 16 | 0.3043 | 0.4666 |\n| Image 4 |\tO\t| 14% | 0 | 1 | 7 | 17 | 0.2916 | 0.4666 |\n--->\n \n Plotting the precision and recall values we have the following *Precision x Recall curve*:\n \n <!--- Precision x Recall graph --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/precision_recall_example_1.png\" align=\"center\"/>\n<\/p>\n \nAs seen before, the idea of the interpolated average precision is to average the precisions at a set of 11 recall levels (0,0.1,...,1). The interpolated precision values are obtained by taking the maximum precision whose recall value is greater than its current recall value. We can visually obtain those values by looking at the recalls starting from the highest (0.4666) to the lowest (0) and, as we decrease the recall, we annotate the precision values that are the highest as shown in the image below:\n\n<!--- interpolated precision curve --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/interpolated_precision.png\" align=\"center\"/>\n<\/p>\n\nThe Average Precision (AP) is the AUC obtained by the interpolated precision. The intention is to reduce the impact of the wiggles in the Precision x Recall curve. We split the AUC into 3 areas (A1, A2 and A3) as shown below:\n  \n<!--- interpolated precision AUC --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/interpolated_precision-AUC.png\" align=\"center\"/>\n<\/p>\n\nCalculating the total area, we have the AV:  \n\n![](http://latex.codecogs.com/gif.latex?AP%20%3D%20A1%20&plus;%20A2%20&plus;%20A3)  \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%200.1333*0.6666%20&plus;%20%5Cleft%20%28%200.4-0.1333%20%5Cright%20%29*0.4285%20&plus;%20%5Cleft%20%28%200.4666-0.4%20%5Cright%20%29*0.3043)  \n![](http://latex.codecogs.com/gif.latex?%5Cboldsymbol%7BAP%20%3D%200.2234%7D)\n\n\nIf you want to reproduce these results, see the **Sample 1**.\n\n<!--In order to evaluate your detections, you just need a simple list of `Detection` objects. A `Detection` object is a very simple class containing the class id, class probability and bounding boxes coordinates of the detected objects. This same structure is used for the groundtruth detections.-->\n\n\n## References\n\n* The Relationship Between Precision-Recall and ROC Curves (Jesse Davis and Mark Goadrich)\nDepartment of Computer Sciences and Department of Biostatistics and Medical Informatics, University of\nWisconsin  \nhttp://pages.cs.wisc.edu/~jdavis/davisgoadrichcamera2.pdf\n\n* The PASCAL Visual Object Classes (VOC) Challenge  \nhttp://homepages.inf.ed.ac.uk/ckiw/postscript/ijcv_voc09.pdf\n\n* Evaluation of ranked retrieval results (Salton and Mcgill 1986)  \nhttps://www.amazon.com/Introduction-Information-Retrieval-COMPUTER-SCIENCE/dp/0070544840  \nhttps://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C440:3EACB:17C197:5E3DC2:6AB92D25"},"text_sha256":"6d5ab6ecc2779e681e5eb0f3f502145f8a132e3e0d940af4b3ff2e9c4fbd2395"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1570","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083F:6E429:17FAB14:1C22945:6AB92D2C"},"commit":{"sha":"dcb285e7dea7e73d9480937d58de0e9bdfc20051","url":"https://github.com/rafaelpadilla/Object-Detection-Metrics/commit/dcb285e7dea7e73d9480937d58de0e9bdfc20051","date":"2022-08-26T20:48:00Z","author_date":"2022-08-26T20:48:00Z","committer_date":"2022-08-26T20:48:00Z","tree_sha":"775adbc82a24e07b63e5442c58baca39d09f2cdd","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1569","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17D6B18:1BFE8D5:6AB92D2C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":30629,"blob_sha":"612b15506a95be3a9e5ebdff35da6013eed7dc0f","priority":0}],"documents":[{"path":"README.md","size":30629,"blob_sha":"612b15506a95be3a9e5ebdff35da6013eed7dc0f","priority":0,"status":200,"text":"\n\n<p align=\"left\">\n    <a href=\"https://zenodo.org/badge/latestdoi/134606465\">\n        <img src=\"https://zenodo.org/badge/134606465.svg\"/><\/a>\n    <a href=\"https://opensource.org/licenses/MIT\" >\n        <img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" /><\/a>\n    <a href=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/raw/master/paper_survey_on_performance_metrics_for_object_detection_algorithms.pdf\">\n        <img src=\"https://img.shields.io/badge/paper-published-red\"/><\/a>\n<\/p>\n\n\n## Citation\n\nIf you use this code for your research, please consider citing:\n\n``` \n@Article{electronics10030279,\nAUTHOR = {Padilla, Rafael and Passos, Wesley L. and Dias, Thadeu L. B. and Netto, Sergio L. and da Silva, Eduardo A. B.},\nTITLE = {A Comparative Analysis of Object Detection Metrics with a Companion Open-Source Toolkit},\nJOURNAL = {Electronics},\nVOLUME = {10},\nYEAR = {2021},\nNUMBER = {3},\nARTICLE-NUMBER = {279},\nURL = {https://www.mdpi.com/2079-9292/10/3/279},\nISSN = {2079-9292},\nDOI = {10.3390/electronics10030279}\n}\n```\nDownload the paper [here](https://www.mdpi.com/2079-9292/10/3/279/pdf) or [here](https://github.com/rafaelpadilla/review_object_detection_metrics/blob/main/published_paper.pdf).\n\n```\n@INPROCEEDINGS {padillaCITE2020,\n    author    = {R. {Padilla} and S. L. {Netto} and E. A. B. {da Silva}},\n    title     = {A Survey on Performance Metrics for Object-Detection Algorithms}, \n    booktitle = {2020 International Conference on Systems, Signals and Image Processing (IWSSIP)}, \n    year      = {2020},\n    pages     = {237-242},}\n```\nDownload the paper [here](https://github.com/rafaelpadilla/Object-Detection-Metrics/raw/master/paper_survey_on_performance_metrics_for_object_detection_algorithms.pdf)\n\n-----------------\n\nAttention! A new version of this tool is available [here](https://github.com/rafaelpadilla/review_object_detection_metrics)\n=======\n\nThe new version includes **all COCO metrics**, supports **other file formats**, provides a **User Interface (UI)** to guide the evaluation process, and presents the **STT-AP metric** to evaluate object detection in videos. \n\n-----------------\n\n# Metrics for object detection\n  \nThe motivation of this project is the lack of consensus used by different works and implementations concerning the **evaluation metrics of the object detection problem**. Although on-line competitions use their own metrics to evaluate the task of object detection, just some of them offer reference code snippets to calculate the accuracy of the detected objects.  \nResearchers who want to evaluate their work using different datasets than those offered by the competitions, need to implement their own version of the metrics. Sometimes a wrong or different implementation can create different and biased results. Ideally, in order to have trustworthy benchmarking among different approaches, it is necessary to have a flexible implementation that can be used by everyone regardless the dataset used.  \n\n**This project provides easy-to-use functions implementing the same metrics used by the the most popular competitions of object detection**. Our implementation does not require modifications of your detection model to complicated input formats, avoiding conversions to XML or JSON files. We simplified the input data (ground truth bounding boxes and detected bounding boxes) and gathered in a single project the main metrics used by the academia and challenges. Our implementation was carefully compared against the official implementations and our results are exactly the same.   \n\nIn the topics below you can find an overview of the most popular metrics used in different competitions and works, as well as samples showing how to use our code.\n\n## Table of contents\n\n- [Motivation](#metrics-for-object-detection)\n- [Different competitions, different metrics](#different-competitions-different-metrics)\n- [Important definitions](#important-definitions)\n- [Metrics](#metrics)\n  - [Precision x Recall curve](#precision-x-recall-curve)\n  - [Average Precision](#average-precision)\n    - [11-point interpolation](#11-point-interpolation)\n    - [Interpolating all  points](#interpolating-all-points)\n- [**How to use this project**](#how-to-use-this-project)\n- [References](#references)\n\n<a name=\"different-competitions-different-metrics\"><\/a> \n## Different competitions, different metrics \n\n* **[PASCAL VOC Challenge](http://host.robots.ox.ac.uk/pascal/VOC/)** offers a Matlab script in order to evaluate the quality of the detected objects. Participants of the competition can use the provided Matlab script to measure the accuracy of their detections before submitting their results. The official documentation explaining their criteria for object detection metrics can be accessed [here](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/htmldoc/devkit_doc.html#SECTION00050000000000000000). The current metrics used by the current PASCAL VOC object detection challenge are the **Precision x Recall curve** and **Average Precision**.  \nThe PASCAL VOC Matlab evaluation code reads the ground truth bounding boxes from XML files, requiring changes in the code if you want to apply it to other datasets or to your specific cases. Even though projects such as [Faster-RCNN](https://github.com/rbgirshick/py-faster-rcnn) implement PASCAL VOC evaluation metrics, it is also necessary to convert the detected bounding boxes into their specific format. [Tensorflow](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/evaluation_protocols.md) framework also has their PASCAL VOC metrics implementation.  \n\n* **[COCO Detection Challenge](https://competitions.codalab.org/competitions/5181)** uses different metrics to evaluate the accuracy of object detection of different algorithms. [Here](http://cocodataset.org/#detection-eval) you can find a documentation explaining the 12 metrics used for characterizing the performance of an object detector on COCO. This competition offers Python and Matlab codes so users can verify their scores before submitting the results. It is also necessary to convert the results to a [format](http://cocodataset.org/#format-results) required by the competition.  \n\n* **[Google Open Images Dataset V4 Competition](https://storage.googleapis.com/openimages/web/challenge.html)** also uses mean Average Precision (mAP) over the 500 classes to evaluate the object detection task. \n\n* **[ImageNet Object Localization Challenge](https://www.kaggle.com/c/imagenet-object-detection-challenge)** defines an error for each image considering the class and the overlapping region between ground truth and detected boxes. The total error is computed as the average of all min errors among all test dataset images. [Here](https://www.kaggle.com/c/imagenet-object-localization-challenge#evaluation) are more details about their evaluation method.  \n\n## Important definitions  \n\n### Intersection Over Union (IOU)\n\n\nIntersection Over Union (IOU) is a measure based on Jaccard Index that evaluates the overlap between two bounding boxes. It requires a ground truth bounding box ![](http://latex.codecogs.com/gif.latex?B_%7Bgt%7D) and a predicted bounding box ![](http://latex.codecogs.com/gif.latex?B_p). By applying the IOU we can tell if a detection is valid (True Positive) or not (False Positive).  \n\nIOU is given by the overlapping area between the predicted bounding box and the ground truth bounding box divided by the area of union between them:  \n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Ctext%7BIOU%7D%3D%5Cfrac%7B%5Ctext%7Barea%7D%5Cleft%28B_%7Bp%7D%20%5Ccap%20B_%7Bgt%7D%20%5Cright%29%7D%7B%5Ctext%7Barea%7D%5Cleft%28B_%7Bp%7D%20%5Ccup%20B_%7Bgt%7D%20%5Cright%29%7D\">\n<\/p>\n\n<!---\n\\text{IOU}=\\frac{\\text{area}\\left(B_{p} \\cap B_{gt} \\right)}{\\text{area}\\left(B_{p} \\cup B_{gt} \\right)} \n--->\n\nThe image below illustrates the IOU between a ground truth bounding box (in green) and a detected bounding box (in red).\n\n<!--- IOU --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/iou.png\" align=\"center\"/><\/p>\n\n### True Positive, False Positive, False Negative and True Negative  \n\nSome basic concepts used by the metrics:  \n\n* **True Positive (TP)**: A correct detection. Detection with IOU ≥ _threshold_  \n* **False Positive (FP)**: A wrong detection. Detection with IOU < _threshold_  \n* **False Negative (FN)**: A ground truth not detected  \n* **True Negative (TN)**: Does not apply. It would represent a corrected misdetection. In the object detection task there are many possible bounding boxes that should not be detected within an image. Thus, TN would be all possible bounding boxes that were corrrectly not detected (so many possible boxes within an image). That's why it is not used by the metrics.\n\n_threshold_: depending on the metric, it is usually set to 50%, 75% or 95%.\n\n### Precision\n\nPrecision is the ability of a model to identify **only** the relevant objects. It is the percentage of correct positive predictions and is given by:\n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Ctext%7BPrecision%7D%20%3D%20%5Cfrac%7B%5Ctext%7BTP%7D%7D%7B%5Ctext%7BTP%7D&plus;%5Ctext%7BFP%7D%7D%3D%5Cfrac%7B%5Ctext%7BTP%7D%7D%7B%5Ctext%7Ball%20detections%7D%7D\">\n<\/p>\n\n<!---\n\\text{Precision} = \\frac{\\text{TP}}{\\text{TP}+\\text{FP}}=\\frac{\\text{TP}}{\\text{all detections}}\n--->\n\n### Recall \n\nRecall is the ability of a model to find all the relevant cases (all ground truth bounding boxes). It is the percentage of true positive detected among all relevant ground truths and is given by:\n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Ctext%7BRecall%7D%20%3D%20%5Cfrac%7B%5Ctext%7BTP%7D%7D%7B%5Ctext%7BTP%7D&plus;%5Ctext%7BFN%7D%7D%3D%5Cfrac%7B%5Ctext%7BTP%7D%7D%7B%5Ctext%7Ball%20ground%20truths%7D%7D\">\n<\/p>\n<!--- \n\\text{Recall} = \\frac{\\text{TP}}{\\text{TP}+\\text{FN}}=\\frac{\\text{TP}}{\\text{all ground truths}}\n--->\n\n## Metrics\n\nIn the topics below there are some comments on the most popular metrics used for object detection.\n\n### Precision x Recall curve\n\nThe Precision x Recall curve is a good way to evaluate the performance of an object detector as the confidence is changed by plotting a curve for each object class. An object detector of a particular class is considered good if its precision stays high as recall increases, which means that if you vary the confidence threshold, the precision and recall will still be high. Another way to identify a good object detector is to look for a detector that can identify only relevant objects (0 False Positives = high precision), finding all ground truth objects (0 False Negatives = high recall).  \n\nA poor object detector needs to increase the number of detected objects (increasing False Positives = lower precision) in order to retrieve all ground truth objects (high recall). That's why the Precision x Recall curve usually starts with high precision values, decreasing as recall increases. You can see an example of the Prevision x Recall curve in the next topic (Average Precision). This kind of curve is used by the PASCAL VOC 2012 challenge and is available in our implementation.  \n\n### Average Precision\n\nAnother way to compare the performance of object detectors is to calculate the area under the curve (AUC) of the Precision x Recall curve. As AP curves are often zigzag curves going up and down, comparing different curves (different detectors) in the same plot usually is not an easy task - because the curves tend to cross each other much frequently. That's why Average Precision (AP), a numerical metric, can also help us compare different detectors. In practice AP is the precision averaged across all recall values between 0 and 1.  \n\nFrom 2010 on, the method of computing AP by the PASCAL VOC challenge has changed. Currently, **the interpolation performed by PASCAL VOC challenge uses all data points, rather than interpolating only 11 equally spaced points as stated in their [paper](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&rep=rep1&type=pdf)**. As we want to reproduce their default implementation, our default code (as seen further) follows their most recent application (interpolating all data points). However, we also offer the 11-point interpolation approach. \n\n#### 11-point interpolation\n\nThe 11-point interpolation tries to summarize the shape of the Precision x Recall curve by averaging the precision at a set of eleven equally spaced recall levels [0, 0.1, 0.2, ... , 1]:\n\n<p align=\"center\">\n<img src=\"https://latex.codecogs.com/gif.latex?%5Ctext%7BAP%7D%3D%5Cfrac%7B1%7D%7B11%7D%20%5Csum_%7Br%5Cin%20%5Cleft%20%5C%7B%200%2C%200.1%2C%20...%2C1%20%5Cright%20%5C%7D%7D%5Crho_%7B%5Ctext%7Binterp%7D%5Cleft%20%28%20r%20%5Cright%20%29%7D\">\n<\/p>\n<!---\n\\text{AP}=\\frac{1}{11} \\sum_{r\\in \\left \\{ 0, 0.1, ...,1 \\right \\}}\\rho_{\\text{interp}\\left ( r \\right )}\n--->\n\nwith\n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Crho_%7B%5Ctext%7Binterp%7D%7D%20%3D%20%5Cmax_%7B%5Ctilde%7Br%7D%3A%5Ctilde%7Br%7D%20%5Cgeq%20r%7D%20%5Crho%5Cleft%20%28%20%5Ctilde%7Br%7D%20%5Cright%20%29\">\n<\/p>\n<!--- \n\\rho_{\\text{interp}} = \\max_{\\tilde{r}:\\tilde{r} \\geq r} \\rho\\left ( \\tilde{r} \\right )\n--->\n\nwhere ![](http://latex.codecogs.com/gif.latex?%5Crho%5Cleft%20%28%20%5Ctilde%7Br%7D%20%5Cright%20%29) is the measured precision at recall ![](http://latex.codecogs.com/gif.latex?%5Ctilde%7Br%7D).\n\nInstead of using the precision observed at each point, the AP is obtained by interpolating the precision only at the 11 levels ![](http://latex.codecogs.com/gif.latex?r) taking the **maximum precision whose recall value is greater than ![](http://latex.codecogs.com/gif.latex?r)**.\n\n#### Interpolating all points\n\nInstead of interpolating only in the 11 equally spaced points, you could interpolate through all points <img src=\"https://latex.codecogs.com/gif.latex?n\"> in such way that:\n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Csum_%7Bn%3D0%7D%20%5Cleft%20%28%20r_%7Bn&plus;1%7D%20-%20r_%7Bn%7D%20%5Cright%20%29%20%5Crho_%7B%5Ctext%7Binterp%7D%7D%5Cleft%20%28%20r_%7Bn&plus;1%7D%20%5Cright%20%29\">\n<\/p>\n<!---\n\\sum_{n=0} \\left ( r_{n+1} - r_{n} \\right ) \\rho_{\\text{interp}}\\left ( r_{n+1} \\right )\n--->\n \nwith\n\n<p align=\"center\"> \n<img src=\"https://latex.codecogs.com/gif.latex?%5Crho_%7B%5Ctext%7Binterp%7D%7D%5Cleft%20%28%20r_%7Bn&plus;1%7D%20%5Cright%20%29%20%3D%20%5Cmax_%7B%5Ctilde%7Br%7D%3A%5Ctilde%7Br%7D%20%5Cge%20r_%7Bn&plus;1%7D%7D%20%5Crho%20%5Cleft%20%28%20%5Ctilde%7Br%7D%20%5Cright%20%29\">\n<\/p>\n\n<!---\n\\rho_{\\text{interp}}\\left ( r_{n+1} \\right ) = \\max_{\\tilde{r}:\\tilde{r} \\ge r_{n+1}} \\rho \\left ( \\tilde{r} \\right )\n--->\n\n\nwhere ![](http://latex.codecogs.com/gif.latex?%5Crho%5Cleft%20%28%20%5Ctilde%7Br%7D%20%5Cright%20%29) is the measured precision at recall ![](http://latex.codecogs.com/gif.latex?%5Ctilde%7Br%7D).\n\nIn this case, instead of using the precision observed at only few points, the AP is now obtained by interpolating the precision at **each level**, ![](http://latex.codecogs.com/gif.latex?r) taking the **maximum precision whose recall value is greater or equal than ![](http://latex.codecogs.com/gif.latex?r&plus;1)**. This way we calculate the estimated area under the curve.\n\nTo make things more clear, we provided an example comparing both interpolations.\n\n\n#### An ilustrated example \n\nAn example helps us understand better the concept of the interpolated average precision. Consider the detections below:\n  \n<!--- Image samples 1 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/samples_1_v2.png\" align=\"center\"/><\/p>\n  \nThere are 7 images with 15 ground truth objects represented by the green bounding boxes and 24 detected objects represented by the red bounding boxes. Each detected object has a confidence level and is identified by a letter (A,B,...,Y).  \n\nThe following table shows the bounding boxes with their corresponding confidences. The last column identifies the detections as TP or FP. In this example a TP is considered if IOU ![](http://latex.codecogs.com/gif.latex?%5Cgeq) 30%, otherwise it is a FP. By looking at the images above we can roughly tell if the detections are TP or FP.\n\n<!--- Table 1 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/table_1_v2.png\" align=\"center\"/><\/p>\n\n<!---\n| Images | Detections | Confidences | TP or FP |\n|:------:|:----------:|:-----------:|:--------:|\n| Image 1 | A | 88% | FP |\n| Image 1 | B | 70% | TP |\n| Image 1 |\tC\t| 80% | FP |\n| Image 2 |\tD\t| 71% | FP |\n| Image 2 |\tE\t| 54% | TP |\n| Image 2 |\tF\t| 74% | FP |\n| Image 3 |\tG\t| 18% | TP |\n| Image 3 |\tH\t| 67% | FP |\n| Image 3 |\tI\t| 38% | FP |\n| Image 3 |\tJ\t| 91% | TP |\n| Image 3 |\tK\t| 44% | FP |\n| Image 4 |\tL\t| 35% | FP |\n| Image 4 |\tM\t| 78% | FP |\n| Image 4 |\tN\t| 45% | FP |\n| Image 4 |\tO\t| 14% | FP |\n| Image 5 |\tP\t| 62% | TP |\n| Image 5 |\tQ\t| 44% | FP |\n| Image 5 |\tR\t| 95% | TP |\n| Image 5 |\tS\t| 23% | FP |\n| Image 6 |\tT\t| 45% | FP |\n| Image 6 |\tU\t| 84% | FP |\n| Image 6 |\tV\t| 43% | FP |\n| Image 7 |\tX\t| 48% | TP |\n| Image 7 |\tY\t| 95% | FP |\n--->\n\nIn some images there are more than one detection overlapping a ground truth (Images 2, 3, 4, 5, 6 and 7). For those cases, the predicted box with the highest IOU is considered TP (e.g. in image 1 \"E\" is TP while \"D\" is FP because IOU between E and the groundtruth is greater than the IOU between D and the groundtruth). This rule is applied by the PASCAL VOC 2012 metric: \"e.g. 5 detections (TP) of a single object is counted as 1 correct detection and 4 false detections”.\n\nThe Precision x Recall curve is plotted by calculating the precision and recall values of the accumulated TP or FP detections.  For this, first we need to order the detections by their confidences, then we calculate the precision and recall for each accumulated detection as shown in the table below (Note that for recall computation, the denominator term (\"Acc TP + Acc FN\" or \"All ground truths\") is constant at 15 since GT boxes are constant irrespective of detections).: \n\n<!--- Table 2 --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/table_2_v2.png\" align=\"center\"/><\/p>\n\n<!---\n| Images | Detections | Confidences |  TP | FP | Acc TP | Acc FP | Precision | Recall |\n|:------:|:----------:|:-----------:|:---:|:--:|:------:|:------:|:---------:|:------:|\n| Image 5 |\tR\t| 95% | 1 | 0 | 1 | 0 | 1       | 0.0666 |\n| Image 7 |\tY\t| 95% | 0 | 1 | 1 | 1 | 0.5     | 0.6666 |\n| Image 3 |\tJ\t| 91% | 1 | 0 | 2 | 1 | 0.6666  | 0.1333 |\n| Image 1 | A | 88% | 0 | 1 | 2 | 2 | 0.5     | 0.1333 |\n| Image 6 |\tU\t| 84% | 0 | 1 | 2 | 3 | 0.4     | 0.1333 |\n| Image 1 |\tC\t| 80% | 0 | 1 | 2 | 4 | 0.3333  | 0.1333 |\n| Image 4 |\tM\t| 78% | 0 | 1 | 2 | 5 | 0.2857  | 0.1333 |\n| Image 2 |\tF\t| 74% | 0 | 1 | 2 | 6 | 0.25    | 0.1333 |\n| Image 2 |\tD\t| 71% | 0 | 1 | 2 | 7 | 0.2222  | 0.1333 |\n| Image 1 | B | 70% | 1 | 0 | 3 | 7 | 0.3     | 0.2    |\n| Image 3 |\tH\t| 67% | 0 | 1 | 3 | 8 | 0.2727  | 0.2    |\n| Image 5 |\tP\t| 62% | 1 | 0 | 4 | 8 | 0.3333  | 0.2666 |\n| Image 2 |\tE\t| 54% | 1 | 0 | 5 | 8 | 0.3846  | 0.3333 |\n| Image 7 |\tX\t| 48% | 1 | 0 | 6 | 8 | 0.4285  | 0.4    |\n| Image 4 |\tN\t| 45% | 0 | 1 | 6 | 9 | 0.7     | 0.4    |\n| Image 6 |\tT\t| 45% | 0 | 1 | 6 | 10 | 0.375  | 0.4    |\n| Image 3 |\tK\t| 44% | 0 | 1 | 6 | 11 | 0.3529 | 0.4    |\n| Image 5 |\tQ\t| 44% | 0 | 1 | 6 | 12 | 0.3333 | 0.4    |\n| Image 6 |\tV\t| 43% | 0 | 1 | 6 | 13 | 0.3157 | 0.4    |\n| Image 3 |\tI\t| 38% | 0 | 1 | 6 | 14 | 0.3    | 0.4    |\n| Image 4 |\tL\t| 35% | 0 | 1 | 6 | 15 | 0.2857 | 0.4    |\n| Image 5 |\tS\t| 23% | 0 | 1 | 6 | 16 | 0.2727 | 0.4    |\n| Image 3 |\tG\t| 18% | 1 | 0 | 7 | 16 | 0.3043 | 0.4666 |\n| Image 4 |\tO\t| 14% | 0 | 1 | 7 | 17 | 0.2916 | 0.4666 |\n--->\n \n Example computation for the 2nd row (Image 7):  Precision = TP/(TP+FP) = 1/2 = 0.5 and Recall = TP/(TP+FN) = 1/15 = 0.066\n \n Plotting the precision and recall values we have the following *Precision x Recall curve*:\n \n <!--- Precision x Recall graph --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/precision_recall_example_1_v2.png\" align=\"center\"/>\n<\/p>\n \nAs mentioned before, there are two different ways to measure the interpolted average precision: **11-point interpolation** and **interpolating all points**. Below we make a comparisson between them:\n\n#### Calculating the 11-point interpolation\n\nThe idea of the 11-point interpolated average precision is to average the precisions at a set of 11 recall levels (0,0.1,...,1). The interpolated precision values are obtained by taking the maximum precision whose recall value is greater than its current recall value as follows: \n\n<!--- interpolated precision curve --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/11-pointInterpolation.png\" align=\"center\"/>\n<\/p>\n\nBy applying the 11-point interpolation, we have:  \n\n![](http://latex.codecogs.com/gif.latex?AP%20%3D%20%5Cfrac%7B1%7D%7B11%7D%5Csum_%7Br%5Cin%5C%7B0%2C0.1%2C...%2C1%5C%7D%7D%5Crho_%7B%5Ctext%7Binterp%7D%5Cleft%20%28r%5Cright%20%29%7D)  \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%20%5Cfrac%7B1%7D%7B11%7D%20%5Cleft%20%28%201&plus;0.6666&plus;0.4285&plus;0.4285&plus;0.4285&plus;0&plus;0&plus;0&plus;0&plus;0&plus;0%20%5Cright%20%29)  \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%2026.84%5C%25)\n\n\n#### Calculating the interpolation performed in all points\n\nBy interpolating all points, the Average Precision (AP) can be interpreted as an approximated AUC of the Precision x Recall curve. The intention is to reduce the impact of the wiggles in the curve. By applying the equations presented before, we can obtain the areas as it will be demostrated here. We could also visually have the interpolated precision points by looking at the recalls starting from the highest (0.4666) to 0 (looking at the plot from right to left) and, as we decrease the recall, we collect the precision values that are the highest as shown in the image below:\n    \n<!--- interpolated precision AUC --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/interpolated_precision_v2.png\" align=\"center\"/>\n<\/p>\n  \nLooking at the plot above, we can divide the AUC into 4 areas (A1, A2, A3 and A4):\n  \n<!--- interpolated precision AUC --->\n<p align=\"center\">\n<img src=\"https://github.com/rafaelpadilla/Object-Detection-Metrics/blob/master/aux_images/interpolated_precision-AUC_v2.png\" align=\"center\"/>\n<\/p>\n\nCalculating the total area, we have the AP:  \n\n![](http://latex.codecogs.com/gif.latex?AP%20%3D%20A1%20&plus;%20A2%20&plus;%20A3%20&plus;%20A4)  \n  \n![](http://latex.codecogs.com/gif.latex?%5Ctext%7Bwith%3A%7D)  \n![](http://latex.codecogs.com/gif.latex?A1%20%3D%20%280.0666-0%29%5Ctimes1%20%3D%5Cmathbf%7B0.0666%7D)  \n![](http://latex.codecogs.com/gif.latex?A2%20%3D%20%280.1333-0.0666%29%5Ctimes0.6666%3D%5Cmathbf%7B0.04446222%7D)  \n![](http://latex.codecogs.com/gif.latex?A3%20%3D%20%280.4-0.1333%29%5Ctimes0.4285%20%3D%5Cmathbf%7B0.11428095%7D)  \n![](http://latex.codecogs.com/gif.latex?A4%20%3D%20%280.4666-0.4%29%5Ctimes0.3043%20%3D%5Cmathbf%7B0.02026638%7D)  \n   \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%200.0666&plus;0.04446222&plus;0.11428095&plus;0.02026638)  \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%200.24560955)  \n![](http://latex.codecogs.com/gif.latex?AP%20%3D%20%5Cmathbf%7B24.56%5C%25%7D)  \n\nThe results between the two different interpolation methods are a little different: 24.56% and 26.84% by the every point interpolation and the 11-point interpolation respectively.  \n\nOur default implementation is the same as VOC PASCAL: every point interpolation. If you want to use the 11-point interpolation, change the functions that use the argument ```method=MethodAveragePrecision.EveryPointInterpolation``` to ```method=MethodAveragePrecision.ElevenPointInterpolation```.   \n\nIf you want to reproduce these results, see the **[Sample 2](https://github.com/rafaelpadilla/Object-Detection-Metrics/tree/master/samples/sample_2/)**.\n<!--In order to evaluate your detections, you just need a simple list of `Detection` objects. A `Detection` object is a very simple class containing the class id, class probability and bounding boxes coordinates of the detected objects. This same structure is used for the groundtruth detections.-->\n\n## How to use this project\n\nThis project was created to evaluate your detections in a very easy way. If you want to evaluate your algorithm with the most used object detection metrics, you are in the right place.  \n\n[Sample_1](https://github.com/rafaelpadilla/Object-Detection-Metrics/tree/master/samples/sample_1) and [sample_2](https://github.com/rafaelpadilla/Object-Detection-Metrics/tree/master/samples/sample_2) are practical examples demonstrating how to access directly the core functions of this project, providing more flexibility on the usage of the metrics. But if you don't want to spend your time understanding our code, see the instructions below to easily evaluate your detections:  \n\nFollow the steps below to start evaluating your detections:\n\n1. [Create the ground truth files](#create-the-ground-truth-files)\n2. [Create your detection files](#create-your-detection-files)\n3. For **Pascal VOC metrics**, run the command: `python pascalvoc.py`  \n   If you want to reproduce the example above, run the command: `python pascalvoc.py -t 0.3`\n4. (Optional) [You can use arguments to control the IOU threshold, bounding boxes format, etc.](#optional-arguments)\n\n### Create the ground truth files\n\n- Create a separate ground truth text file for each image in the folder **groundtruths/**.\n- In these files each line should be in the format: `<class_name> <left> <top> <right> <bottom>`.    \n- E.g. The ground truth bounding boxes of the image \"2008_000034.jpg\" are represented in the file \"2008_000034.txt\":\n  ```\n  bottle 6 234 45 362\n  person 1 156 103 336\n  person 36 111 198 416\n  person 91 42 338 500\n  ```\n    \nIf you prefer, you can also have your bounding boxes in the format: `<class_name> <left> <top> <width> <height>` (see here [**\\***](#asterisk) how to use it). In this case, your \"2008_000034.txt\" would be represented as:\n  ```\n  bottle 6 234 39 128\n  person 1 156 102 180\n  person 36 111 162 305\n  person 91 42 247 458\n  ```\n\n### Create your detection files\n\n- Create a separate detection text file for each image in the folder **detections/**.\n- The names of the detection files must match their correspond ground truth (e.g. \"detections/2008_000182.txt\" represents the detections of the ground truth: \"groundtruths/2008_000182.txt\").\n- In these files each line should be in the following format: `<class_name> <confidence> <left> <top> <right> <bottom>` (see here [**\\***](#asterisk) how to use it).\n- E.g. \"2008_000034.txt\":\n    ```\n    bottle 0.14981 80 1 295 500  \n    bus 0.12601 36 13 404 316  \n    horse 0.12526 430 117 500 307  \n    pottedplant 0.14585 212 78 292 118  \n    tvmonitor 0.070565 388 89 500 196  \n    ```\n\nAlso if you prefer, you could have your bounding boxes in the format: `<class_name> <confidence> <left> <top> <width> <height>`.\n\n### Optional arguments\n\nOptional arguments:\n\n| Argument &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| Description | Example | Default |\n|:-------------:|:-----------:|:-----------:|:-----------:|\n| `-h`,<br>`--help ` |\tshow help message | `python pascalvoc.py -h` | |  \n|  `-v`,<br>`--version` | check version | `python pascalvoc.py -v` | |  \n| `-gt`,<br>`--gtfolder` | folder that contains the ground truth bounding boxes files | `python pascalvoc.py -gt /home/whatever/my_groundtruths/` | `/Object-Detection-Metrics/groundtruths`|  \n| `-det`,<br>`--detfolder` | folder that contains your detected bounding boxes files | `python pascalvoc.py -det /home/whatever/my_detections/` | `/Object-Detection-Metrics/detections/`|  \n| `-t`,<br>`--threshold` | IOU thershold that tells if a detection is TP or FP | `python pascalvoc.py -t 0.75` | `0.50` |  \n| `-gtformat` | format of the coordinates of the ground truth bounding boxes [**\\***](#asterisk) | `python pascalvoc.py -gtformat xyrb` | `xywh` |\n| `-detformat` | format of the coordinates of the detected bounding boxes [**\\***](#asterisk) | `python pascalvoc.py -detformat xyrb` | `xywh` | |  \n| `-gtcoords` | reference of the ground truth bounding bounding box coordinates.<br>If the annotated coordinates are relative to the image size (as used in YOLO), set it to `rel`.<br>If the coordinates are absolute values, not depending to the image size, set it to `abs` |  `python pascalvoc.py -gtcoords rel` | `abs` |  \n| `-detcoords` | reference of the detected bounding bounding box coordinates.<br>If the coordinates are relative to the image size (as used in YOLO), set it to `rel`.<br>If the coordinates are absolute values, not depending to the image size, set it to `abs` | `python pascalvoc.py -detcoords rel` | `abs` |  \n| `-imgsize ` | image size in the format `width,height` <int,int>.<br>Required if `-gtcoords` or `-detcoords` is set to `rel` | `python pascalvoc.py -imgsize 600,400` |  \n| `-sp`,<br>`--savepath` | folder where the plots are saved | `python pascalvoc.py -sp /home/whatever/my_results/` | `Object-Detection-Metrics/results/` |  \n| `-np`,<br>`--noplot` | if present no plot is shown during execution | `python pascalvoc.py -np` | not presented.<br>Therefore, plots are shown |  \n\n<a name=\"asterisk\"> <\/a>\n(**\\***) set `-gtformat xywh` and/or `-detformat xywh` if format is `<left> <top> <width> <height>`. Set to `-gtformat xyrb` and/or `-detformat xyrb`  if format is `<left> <top> <right> <bottom>`.\n  \n## References\n\n* The Relationship Between Precision-Recall and ROC Curves (Jesse Davis and Mark Goadrich)\nDepartment of Computer Sciences and Department of Biostatistics and Medical Informatics, University of\nWisconsin  \nhttp://pages.cs.wisc.edu/~jdavis/davisgoadrichcamera2.pdf\n\n* The PASCAL Visual Object Classes (VOC) Challenge  \nhttp://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.5766&rep=rep1&type=pdf\n\n* Evaluation of ranked retrieval results (Salton and Mcgill 1986)  \nhttps://www.amazon.com/Introduction-Information-Retrieval-COMPUTER-SCIENCE/dp/0070544840  \nhttps://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-ranked-retrieval-results-1.html\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"735A:7A4F8:183FCE:5EBC9A:6AB92D2C"},"text_sha256":"672cb446a8253bba90002b5756081aae713ba32b24bc8cdc3e2b203c0169ae8b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"endernewton/tf-faster-rcnn","input_row":{"repository":"endernewton/tf-faster-rcnn","url":"https://github.com/endernewton/tf-faster-rcnn","name":"tf-faster-rcnn","owner":"endernewton","description":"Tensorflow Faster RCNN for Object Detection","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3647,"issues":482,"created_at":"2017-01-23T19:51:32Z","updated_at":"2026-09-17T11:13:09Z","first_commit_at":"2017-01-23T19:51:33Z","last_commit_at":"2021-09-27T10:11:10Z","activity_months":56.100000000000001,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:21.665Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"endernewton/tf-faster-rcnn","visibility":"public","created_at":"2017-01-23T19:51:32Z","updated_at":"2026-09-17T11:13:09Z","private":false,"fork":false,"archived":false,"stargazers_count":3647,"open_issues_count":215,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1568","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0894:3C4024:1819DB1:1C41E22:6AB92D2D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1567","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17E9117:1C111AC:6AB92D2E"},"commit":{"sha":"0e61bacf863f9f466b54770f35a130514e85cac6","url":"https://github.com/endernewton/tf-faster-rcnn/commit/0e61bacf863f9f466b54770f35a130514e85cac6","date":"2018-04-13T04:42:58Z","author_date":"2018-04-13T04:42:58Z","committer_date":"2018-04-13T04:42:58Z","tree_sha":"78107b7e238e1c6e91fcbad5178fb47ed402d644","message_first_line":"Merge pull request #319 from Detry322/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1566","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0820:6E5BD:17B0F78:1BD7B0C:6AB92D2E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15997,"blob_sha":"77ae752f1a0dc1c090fc83874e7d4355d66972a2","priority":0}],"documents":[{"path":"README.md","size":15997,"blob_sha":"77ae752f1a0dc1c090fc83874e7d4355d66972a2","priority":0,"status":200,"text":"# tf-faster-rcnn\nA Tensorflow implementation of faster RCNN detection framework by Xinlei Chen (xinleic@cs.cmu.edu). This repository is based on the python Caffe implementation of faster RCNN available [here](https://github.com/rbgirshick/py-faster-rcnn).\n\n**Note**: Several minor modifications are made when reimplementing the framework, which give potential improvements. For details about the modifications and ablative analysis, please refer to the technical report [An Implementation of Faster RCNN with Study for Region Sampling](https://arxiv.org/pdf/1702.02138.pdf). If you are seeking to reproduce the results in the original paper, please use the [official code](https://github.com/ShaoqingRen/faster_rcnn) or maybe the [semi-official code](https://github.com/rbgirshick/py-faster-rcnn). For details about the faster RCNN architecture please refer to the paper [Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks](http://arxiv.org/pdf/1506.01497.pdf).\n\n### Detection Performance\nThe current code supports **VGG16**, **Resnet V1** and **Mobilenet V1** models. We mainly tested it on plain VGG16 and Resnet101 (thank you @philokey!) architecture. As the baseline, we report numbers using a single model on a single convolution layer, so no multi-scale, no multi-stage bounding box regression, no skip-connection, no extra input is used. The only data augmentation technique is left-right flipping during training following the original Faster RCNN. All models are released.\n\nWith VGG16 (``conv5_3``):\n  - Train on VOC 2007 trainval and test on VOC 2007 test, **70.8**.\n  - Train on VOC 2007+2012 trainval and test on VOC 2007 test ([R-FCN](https://github.com/daijifeng001/R-FCN) schedule), **75.7**.\n  - Train on COCO 2014 [trainval35k](https://github.com/rbgirshick/py-faster-rcnn/tree/master/models) and test on [minival](https://github.com/rbgirshick/py-faster-rcnn/tree/master/models) (*Iterations*: 900k/1190k), **30.2**.\n\nWith Resnet101 (last ``conv4``):\n  - Train on VOC 2007 trainval and test on VOC 2007 test, **75.7**.\n  - Train on VOC 2007+2012 trainval and test on VOC 2007 test (R-FCN schedule), **79.8**.\n  - Train on COCO 2014 trainval35k and test on minival (900k/1190k), **35.4**.\n\nMore Results:\n  - Train Mobilenet (1.0, 224) on COCO 2014 trainval35k and test on minival (900k/1190k), **21.8**.\n  - Train Resnet50 on COCO 2014 trainval35k and test on minival (900k/1190k), **32.4**.\n  - Train Resnet152 on COCO 2014 trainval35k and test on minival (900k/1190k), **36.1**.\n\nApproximate *baseline* [setup](https://github.com/endernewton/tf-faster-rcnn/blob/master/experiments/cfgs/res101-lg.yml) from [FPN](https://arxiv.org/abs/1612.03144) (this repository does not contain training code for FPN yet):\n  - Train Resnet50 on COCO 2014 trainval35k and test on minival (900k/1190k), **34.2**.\n  - Train Resnet101 on COCO 2014 trainval35k and test on minival (900k/1190k), **37.4**.\n  - Train Resnet152 on COCO 2014 trainval35k and test on minival (900k/1190k), **38.2**.\n\n**Note**:\n  - Due to the randomness in GPU training with Tensorflow especially for VOC, the best numbers are reported (with 2-3 attempts) here. According to my experience, for COCO you can almost always get a very close number (within ~0.2%) despite the randomness.\n  - The numbers are obtained with the **default** testing scheme which selects region proposals using non-maximal suppression (TEST.MODE nms), the alternative testing scheme (TEST.MODE top) will likely result in slightly better performance (see [report](https://arxiv.org/pdf/1702.02138.pdf), for COCO it boosts 0.X AP).\n  - Since we keep the small proposals (\\< 16 pixels width/height), our performance is especially good for small objects.\n  - We do not set a threshold (instead of 0.05) for a detection to be included in the final result, which increases recall.\n  - Weight decay is set to 1e-4.\n  - For other minor modifications, please check the [report](https://arxiv.org/pdf/1702.02138.pdf). Notable ones include using ``crop_and_resize``, and excluding ground truth boxes in RoIs during training.\n  - For COCO, we find the performance improving with more iterations, and potentially better performance can be achieved with even more iterations.\n  - For Resnets, we fix the first block (total 4) when fine-tuning the network, and only use ``crop_and_resize`` to resize the RoIs (7x7) without max-pool (which I find useless especially for COCO). The final feature maps are average-pooled for classification and regression. All batch normalization parameters are fixed. Learning rate for biases is not doubled.\n  - For Mobilenets, we fix the first five layers when fine-tuning the network. All batch normalization parameters are fixed. Weight decay for Mobilenet layers is set to 4e-5.\n  - For approximate [FPN](https://arxiv.org/abs/1612.03144) baseline setup we simply resize the image with 800 pixels, add 32^2 anchors, and take 1000 proposals during testing.\n  - Check out [here](http://ladoga.graphics.cs.cmu.edu/xinleic/tf-faster-rcnn/)/[here](http://xinlei.sp.cs.cmu.edu/xinleic/tf-faster-rcnn/)/[here](https://drive.google.com/open?id=0B1_fAEgxdnvJSmF3YUlZcHFqWTQ) for the latest models, including longer COCO VGG16 models and Resnet ones.\n  \n![](data/imgs/gt.png)      |  ![](data/imgs/pred.png)\n:-------------------------:|:-------------------------:\nDisplayed Ground Truth on Tensorboard |  Displayed Predictions on Tensorboard\n\n### Additional features\nAdditional features not mentioned in the [report](https://arxiv.org/pdf/1702.02138.pdf) are added to make research life easier:\n  - **Support for train-and-validation**. During training, the validation data will also be tested from time to time to monitor the process and check potential overfitting. Ideally training and validation should be separate, where the model is loaded every time to test on validation. However I have implemented it in a joint way to save time and GPU memory. Though in the default setup the testing data is used for validation, no special attempts is made to overfit on testing set.\n  - **Support for resuming training**. I tried to store as much information as possible when snapshoting, with the purpose to resume training from the latest snapshot properly. The meta information includes current image index, permutation of images, and random state of numpy. However, when you resume training the random seed for tensorflow will be reset (not sure how to save the random state of tensorflow now), so it will result in a difference. **Note** that, the current implementation still cannot force the model to behave deterministically even with the random seeds set. Suggestion/solution is welcome and much appreciated.\n  - **Support for visualization**. The current implementation will summarize ground truth boxes, statistics of losses, activations and variables during training, and dump it to a separate folder for tensorboard visualization. The computing graph is also saved for debugging.\n\n### Prerequisites\n  - A basic Tensorflow installation. The code follows **r1.2** format. If you are using r1.0, please check out the r1.0 branch to fix the slim Resnet block issue. If you are using an older version (r0.1-r0.12), please check out the r0.12 branch. While it is not required, for experimenting the original RoI pooling (which requires modification of the C++ code in tensorflow), you can check out my tensorflow [fork](https://github.com/endernewton/tensorflow) and look for ``tf.image.roi_pooling``.\n  - Python packages you might not have: `cython`, `opencv-python`, `easydict` (similar to [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn)). For `easydict` make sure you have the right version. I use 1.6.\n  - Docker users: Since the recent upgrade, the docker image on docker hub (https://hub.docker.com/r/mbuckler/tf-faster-rcnn-deps/) is no longer valid. However, you can still build your own image by using dockerfile located at `docker` folder (cuda 8 version, as it is required by Tensorflow r1.0.) And make sure following Tensorflow installation to install and use nvidia-docker[https://github.com/NVIDIA/nvidia-docker]. Last, after launching the container, you have to build the Cython modules within the running container. \n\n### Installation\n1. Clone the repository\n  ```Shell\n  git clone https://github.com/endernewton/tf-faster-rcnn.git\n  ```\n\n2. Update your -arch in setup script to match your GPU\n  ```Shell\n  cd tf-faster-rcnn/lib\n  # Change the GPU architecture (-arch) if necessary\n  vim setup.py\n  ```\n\n  | GPU model  | Architecture |\n  | ------------- | ------------- |\n  | TitanX (Maxwell/Pascal) | sm_52 |\n  | GTX 960M | sm_50 |\n  | GTX 1080 (Ti) | sm_61 |\n  | Grid K520 (AWS g2.2xlarge) | sm_30 |\n  | Tesla K80 (AWS p2.xlarge) | sm_37 |\n\n  **Note**: You are welcome to contribute the settings on your end if you have made the code work properly on other GPUs. Also even if you are only using CPU tensorflow, GPU based code (for NMS) will be used by default, so please set **USE_GPU_NMS False** to get the correct output.\n\n\n3. Build the Cython modules\n  ```Shell\n  make clean\n  make\n  cd ..\n  ```\n\n4. Install the [Python COCO API](https://github.com/pdollar/coco). The code requires the API to access COCO dataset.\n  ```Shell\n  cd data\n  git clone https://github.com/pdollar/coco.git\n  cd coco/PythonAPI\n  make\n  cd ../../..\n  ```\n\n### Setup data\nPlease follow the instructions of py-faster-rcnn [here](https://github.com/rbgirshick/py-faster-rcnn#beyond-the-demo-installation-for-training-and-testing-models) to setup VOC and COCO datasets (Part of COCO is done). The steps involve downloading data and optionally creating soft links in the ``data`` folder. Since faster RCNN does not rely on pre-computed proposals, it is safe to ignore the steps that setup proposals.\n\nIf you find it useful, the ``data/cache`` folder created on my side is also shared [here](http://ladoga.graphics.cs.cmu.edu/xinleic/tf-faster-rcnn/cache.tgz).\n\n### Demo and Test with pre-trained models\n1. Download pre-trained model\n  ```Shell\n  # Resnet101 for voc pre-trained on 07+12 set\n  ./data/scripts/fetch_faster_rcnn_models.sh\n  ```\n  **Note**: if you cannot download the models through the link, or you want to try more models, you can check out the following solutions and optionally update the downloading script:\n  - Another server [here](http://xinlei.sp.cs.cmu.edu/xinleic/tf-faster-rcnn/).\n  - Google drive [here](https://drive.google.com/open?id=0B1_fAEgxdnvJSmF3YUlZcHFqWTQ).\n\n2. Create a folder and a soft link to use the pre-trained model\n  ```Shell\n  NET=res101\n  TRAIN_IMDB=voc_2007_trainval+voc_2012_trainval\n  mkdir -p output/${NET}/${TRAIN_IMDB}\n  cd output/${NET}/${TRAIN_IMDB}\n  ln -s ../../../data/voc_2007_trainval+voc_2012_trainval ./default\n  cd ../../..\n  ```\n\n3. Demo for testing on custom images\n  ```Shell\n  # at repository root\n  GPU_ID=0\n  CUDA_VISIBLE_DEVICES=${GPU_ID} ./tools/demo.py\n  ```\n  **Note**: Resnet101 testing probably requires several gigabytes of memory, so if you encounter memory capacity issues, please install it with CPU support only. Refer to [Issue 25](https://github.com/endernewton/tf-faster-rcnn/issues/25).\n\n4. Test with pre-trained Resnet101 models\n  ```Shell\n  GPU_ID=0\n  ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc_0712 res101\n  ```\n  **Note**: If you cannot get the reported numbers (79.8 on my side), then probably the NMS function is compiled improperly, refer to [Issue 5](https://github.com/endernewton/tf-faster-rcnn/issues/5).\n\n### Train your own model\n1. Download pre-trained models and weights. The current code support VGG16 and Resnet V1 models. Pre-trained models are provided by slim, you can get the pre-trained models [here](https://github.com/tensorflow/models/tree/master/research/slim#pre-trained-models) and set them in the ``data/imagenet_weights`` folder. For example for VGG16 model, you can set up like:\n   ```Shell\n   mkdir -p data/imagenet_weights\n   cd data/imagenet_weights\n   wget -v http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz\n   tar -xzvf vgg_16_2016_08_28.tar.gz\n   mv vgg_16.ckpt vgg16.ckpt\n   cd ../..\n   ```\n   For Resnet101, you can set up like:\n   ```Shell\n   mkdir -p data/imagenet_weights\n   cd data/imagenet_weights\n   wget -v http://download.tensorflow.org/models/resnet_v1_101_2016_08_28.tar.gz\n   tar -xzvf resnet_v1_101_2016_08_28.tar.gz\n   mv resnet_v1_101.ckpt res101.ckpt\n   cd ../..\n   ```\n\n2. Train (and test, evaluation)\n  ```Shell\n  ./experiments/scripts/train_faster_rcnn.sh [GPU_ID] [DATASET] [NET]\n  # GPU_ID is the GPU you want to test on\n  # NET in {vgg16, res50, res101, res152} is the network arch to use\n  # DATASET {pascal_voc, pascal_voc_0712, coco} is defined in train_faster_rcnn.sh\n  # Examples:\n  ./experiments/scripts/train_faster_rcnn.sh 0 pascal_voc vgg16\n  ./experiments/scripts/train_faster_rcnn.sh 1 coco res101\n  ```\n  **Note**: Please double check you have deleted soft link to the pre-trained models before training. If you find NaNs during training, please refer to [Issue 86](https://github.com/endernewton/tf-faster-rcnn/issues/86). Also if you want to have multi-gpu support, check out [Issue 121](https://github.com/endernewton/tf-faster-rcnn/issues/121).\n\n3. Visualization with Tensorboard\n  ```Shell\n  tensorboard --logdir=tensorboard/vgg16/voc_2007_trainval/ --port=7001 &\n  tensorboard --logdir=tensorboard/vgg16/coco_2014_train+coco_2014_valminusminival/ --port=7002 &\n  ```\n\n4. Test and evaluate\n  ```Shell\n  ./experiments/scripts/test_faster_rcnn.sh [GPU_ID] [DATASET] [NET]\n  # GPU_ID is the GPU you want to test on\n  # NET in {vgg16, res50, res101, res152} is the network arch to use\n  # DATASET {pascal_voc, pascal_voc_0712, coco} is defined in test_faster_rcnn.sh\n  # Examples:\n  ./experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16\n  ./experiments/scripts/test_faster_rcnn.sh 1 coco res101\n  ```\n\n5. You can use ``tools/reval.sh`` for re-evaluation\n\n\nBy default, trained networks are saved under:\n\n```\noutput/[NET]/[DATASET]/default/\n```\n\nTest outputs are saved under:\n\n```\noutput/[NET]/[DATASET]/default/[SNAPSHOT]/\n```\n\nTensorboard information for train and validation is saved under:\n\n```\ntensorboard/[NET]/[DATASET]/default/\ntensorboard/[NET]/[DATASET]/default_val/\n```\n\nThe default number of training iterations is kept the same to the original faster RCNN for VOC 2007, however I find it is beneficial to train longer (see [report](https://arxiv.org/pdf/1702.02138.pdf) for COCO), probably due to the fact that the image batch size is one. For VOC 07+12 we switch to a 80k/110k schedule following [R-FCN](https://github.com/daijifeng001/R-FCN). Also note that due to the nondeterministic nature of the current implementation, the performance can vary a bit, but in general it should be within ~1% of the reported numbers for VOC, and ~0.2% of the reported numbers for COCO. Suggestions/Contributions are welcome.\n\n### Citation\nIf you find this implementation or the analysis conducted in our report helpful, please consider citing:\n\n    @article{chen17implementation,\n        Author = {Xinlei Chen and Abhinav Gupta},\n        Title = {An Implementation of Faster RCNN with Study for Region Sampling},\n        Journal = {arXiv preprint arXiv:1702.02138},\n        Year = {2017}\n    }\n    \nOr for a formal paper, [Spatial Memory Network](https://arxiv.org/abs/1704.04224):\n\n    @article{chen2017spatial,\n      title={Spatial Memory for Context Reasoning in Object Detection},\n      author={Chen, Xinlei and Gupta, Abhinav},\n      journal={arXiv preprint arXiv:1704.04224},\n      year={2017}\n    }\n\nFor convenience, here is the faster RCNN citation:\n\n    @inproceedings{renNIPS15fasterrcnn,\n        Author = {Shaoqing Ren and Kaiming He and Ross Girshick and Jian Sun},\n        Title = {Faster {R-CNN}: Towards Real-Time Object Detection\n                 with Region Proposal Networks},\n        Booktitle = {Advances in Neural Information Processing Systems ({NIPS})},\n        Year = {2015}\n    }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22A:3B6DE:177D25:5DF8F6:6AB92D2C"},"text_sha256":"504589dd6b52bf14d21d21ff662299fd128a8d307f59c2fe938d8c3211d13369"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1565","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093F:0BA1:D9EF97:1001BC6:6AB92D2F"},"commit":{"sha":"b4da911705925ec00e8359b76a2d7260f6d1d314","url":"https://github.com/endernewton/tf-faster-rcnn/commit/b4da911705925ec00e8359b76a2d7260f6d1d314","date":"2021-09-27T10:11:10Z","author_date":"2021-09-27T10:11:10Z","committer_date":"2021-09-27T10:11:10Z","tree_sha":"15d4ad49c78c442b8a30b05601d308190bdc6f7e","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1564","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0781:1C46F8:17DBF90:1C0348D:6AB92D2F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16282,"blob_sha":"580bf768799c691b49865b6f68bbe31d14f825a2","priority":0}],"documents":[{"path":"README.md","size":16282,"blob_sha":"580bf768799c691b49865b6f68bbe31d14f825a2","priority":0,"status":200,"text":"# tf-faster-rcnn is deprecated:\nFor a good and more up-to-date implementation for faster/mask RCNN with multi-gpu support, please see the example in TensorPack [here](https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN).\n\n# tf-faster-rcnn\nA Tensorflow implementation of faster RCNN detection framework by Xinlei Chen (xinleic@cs.cmu.edu). This repository is based on the python Caffe implementation of faster RCNN available [here](https://github.com/rbgirshick/py-faster-rcnn).\n\n**Note**: Several minor modifications are made when reimplementing the framework, which give potential improvements. For details about the modifications and ablative analysis, please refer to the technical report [An Implementation of Faster RCNN with Study for Region Sampling](https://arxiv.org/pdf/1702.02138.pdf). If you are seeking to reproduce the results in the original paper, please use the [official code](https://github.com/ShaoqingRen/faster_rcnn) or maybe the [semi-official code](https://github.com/rbgirshick/py-faster-rcnn). For details about the faster RCNN architecture please refer to the paper [Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks](http://arxiv.org/pdf/1506.01497.pdf).\n\n### Detection Performance\nThe current code supports **VGG16**, **Resnet V1** and **Mobilenet V1** models. We mainly tested it on plain VGG16 and Resnet101 (thank you @philokey!) architecture. As the baseline, we report numbers using a single model on a single convolution layer, so no multi-scale, no multi-stage bounding box regression, no skip-connection, no extra input is used. The only data augmentation technique is left-right flipping during training following the original Faster RCNN. All models are released.\n\nWith VGG16 (``conv5_3``):\n  - Train on VOC 2007 trainval and test on VOC 2007 test, **70.8**.\n  - Train on VOC 2007+2012 trainval and test on VOC 2007 test ([R-FCN](https://github.com/daijifeng001/R-FCN) schedule), **75.7**.\n  - Train on COCO 2014 [trainval35k](https://github.com/rbgirshick/py-faster-rcnn/tree/master/models) and test on [minival](https://github.com/rbgirshick/py-faster-rcnn/tree/master/models) (*Iterations*: 900k/1190k), **30.2**.\n\nWith Resnet101 (last ``conv4``):\n  - Train on VOC 2007 trainval and test on VOC 2007 test, **75.7**.\n  - Train on VOC 2007+2012 trainval and test on VOC 2007 test (R-FCN schedule), **79.8**.\n  - Train on COCO 2014 trainval35k and test on minival (900k/1190k), **35.4**.\n\nMore Results:\n  - Train Mobilenet (1.0, 224) on COCO 2014 trainval35k and test on minival (900k/1190k), **21.8**.\n  - Train Resnet50 on COCO 2014 trainval35k and test on minival (900k/1190k), **32.4**.\n  - Train Resnet152 on COCO 2014 trainval35k and test on minival (900k/1190k), **36.1**.\n\nApproximate *baseline* [setup](https://github.com/endernewton/tf-faster-rcnn/blob/master/experiments/cfgs/res101-lg.yml) from [FPN](https://arxiv.org/abs/1612.03144) (this repository does not contain training code for FPN yet):\n  - Train Resnet50 on COCO 2014 trainval35k and test on minival (900k/1190k), **34.2**.\n  - Train Resnet101 on COCO 2014 trainval35k and test on minival (900k/1190k), **37.4**.\n  - Train Resnet152 on COCO 2014 trainval35k and test on minival (900k/1190k), **38.2**.\n\n**Note**:\n  - Due to the randomness in GPU training with Tensorflow especially for VOC, the best numbers are reported (with 2-3 attempts) here. According to my experience, for COCO you can almost always get a very close number (within ~0.2%) despite the randomness.\n  - The numbers are obtained with the **default** testing scheme which selects region proposals using non-maximal suppression (TEST.MODE nms), the alternative testing scheme (TEST.MODE top) will likely result in slightly better performance (see [report](https://arxiv.org/pdf/1702.02138.pdf), for COCO it boosts 0.X AP).\n  - Since we keep the small proposals (\\< 16 pixels width/height), our performance is especially good for small objects.\n  - We do not set a threshold (instead of 0.05) for a detection to be included in the final result, which increases recall.\n  - Weight decay is set to 1e-4.\n  - For other minor modifications, please check the [report](https://arxiv.org/pdf/1702.02138.pdf). Notable ones include using ``crop_and_resize``, and excluding ground truth boxes in RoIs during training.\n  - For COCO, we find the performance improving with more iterations, and potentially better performance can be achieved with even more iterations.\n  - For Resnets, we fix the first block (total 4) when fine-tuning the network, and only use ``crop_and_resize`` to resize the RoIs (7x7) without max-pool (which I find useless especially for COCO). The final feature maps are average-pooled for classification and regression. All batch normalization parameters are fixed. Learning rate for biases is not doubled.\n  - For Mobilenets, we fix the first five layers when fine-tuning the network. All batch normalization parameters are fixed. Weight decay for Mobilenet layers is set to 4e-5.\n  - For approximate [FPN](https://arxiv.org/abs/1612.03144) baseline setup we simply resize the image with 800 pixels, add 32^2 anchors, and take 1000 proposals during testing.\n  - Check out [here](http://ladoga.graphics.cs.cmu.edu/xinleic/tf-faster-rcnn/)/[here](http://xinlei.sp.cs.cmu.edu/xinleic/tf-faster-rcnn/)/[here](https://drive.google.com/open?id=0B1_fAEgxdnvJSmF3YUlZcHFqWTQ) for the latest models, including longer COCO VGG16 models and Resnet ones.\n  \n![](data/imgs/gt.png)      |  ![](data/imgs/pred.png)\n:-------------------------:|:-------------------------:\nDisplayed Ground Truth on Tensorboard |  Displayed Predictions on Tensorboard\n\n### Additional features\nAdditional features not mentioned in the [report](https://arxiv.org/pdf/1702.02138.pdf) are added to make research life easier:\n  - **Support for train-and-validation**. During training, the validation data will also be tested from time to time to monitor the process and check potential overfitting. Ideally training and validation should be separate, where the model is loaded every time to test on validation. However I have implemented it in a joint way to save time and GPU memory. Though in the default setup the testing data is used for validation, no special attempts is made to overfit on testing set.\n  - **Support for resuming training**. I tried to store as much information as possible when snapshoting, with the purpose to resume training from the latest snapshot properly. The meta information includes current image index, permutation of images, and random state of numpy. However, when you resume training the random seed for tensorflow will be reset (not sure how to save the random state of tensorflow now), so it will result in a difference. **Note** that, the current implementation still cannot force the model to behave deterministically even with the random seeds set. Suggestion/solution is welcome and much appreciated.\n  - **Support for visualization**. The current implementation will summarize ground truth boxes, statistics of losses, activations and variables during training, and dump it to a separate folder for tensorboard visualization. The computing graph is also saved for debugging.\n\n### Prerequisites\n  - A basic Tensorflow installation. The code follows **r1.2** format. If you are using r1.0, please check out the r1.0 branch to fix the slim Resnet block issue. If you are using an older version (r0.1-r0.12), please check out the r0.12 branch. While it is not required, for experimenting the original RoI pooling (which requires modification of the C++ code in tensorflow), you can check out my tensorflow [fork](https://github.com/endernewton/tensorflow) and look for ``tf.image.roi_pooling``.\n  - Python packages you might not have: `cython`, `opencv-python`, `easydict` (similar to [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn)). For `easydict` make sure you have the right version. I use 1.6.\n  - Docker users: Since the recent upgrade, the docker image on docker hub (https://hub.docker.com/r/mbuckler/tf-faster-rcnn-deps/) is no longer valid. However, you can still build your own image by using dockerfile located at `docker` folder (cuda 8 version, as it is required by Tensorflow r1.0.) And make sure following Tensorflow installation to install and use nvidia-docker[https://github.com/NVIDIA/nvidia-docker]. Last, after launching the container, you have to build the Cython modules within the running container. \n\n### Installation\n1. Clone the repository\n  ```Shell\n  git clone https://github.com/endernewton/tf-faster-rcnn.git\n  ```\n\n2. Update your -arch in setup script to match your GPU\n  ```Shell\n  cd tf-faster-rcnn/lib\n  # Change the GPU architecture (-arch) if necessary\n  vim setup.py\n  ```\n\n  | GPU model  | Architecture |\n  | ------------- | ------------- |\n  | TitanX (Maxwell/Pascal) | sm_52 |\n  | GTX 960M | sm_50 |\n  | GTX 1080 (Ti) | sm_61 |\n  | Grid K520 (AWS g2.2xlarge) | sm_30 |\n  | Tesla K80 (AWS p2.xlarge) | sm_37 |\n\n  **Note**: You are welcome to contribute the settings on your end if you have made the code work properly on other GPUs. Also even if you are only using CPU tensorflow, GPU based code (for NMS) will be used by default, so please set **USE_GPU_NMS False** to get the correct output.\n\n\n3. Build the Cython modules\n  ```Shell\n  make clean\n  make\n  cd ..\n  ```\n\n4. Install the [Python COCO API](https://github.com/pdollar/coco). The code requires the API to access COCO dataset.\n  ```Shell\n  cd data\n  git clone https://github.com/pdollar/coco.git\n  cd coco/PythonAPI\n  make\n  cd ../../..\n  ```\n\n### Setup data\nPlease follow the instructions of py-faster-rcnn [here](https://github.com/rbgirshick/py-faster-rcnn#beyond-the-demo-installation-for-training-and-testing-models) to setup VOC and COCO datasets (Part of COCO is done). The steps involve downloading data and optionally creating soft links in the ``data`` folder. Since faster RCNN does not rely on pre-computed proposals, it is safe to ignore the steps that setup proposals.\n\nIf you find it useful, the ``data/cache`` folder created on my side is also shared [here](http://ladoga.graphics.cs.cmu.edu/xinleic/tf-faster-rcnn/cache.tgz).\n\n### Demo and Test with pre-trained models\n1. Download pre-trained model\n  ```Shell\n  # Resnet101 for voc pre-trained on 07+12 set\n  ./data/scripts/fetch_faster_rcnn_models.sh\n  ```\n  **Note**: if you cannot download the models through the link, or you want to try more models, you can check out the following solutions and optionally update the downloading script:\n  - Another server [here](http:/xinleic.xyz/data/tf-faster-rcnn/).\n  - Google drive [here](https://drive.google.com/drive/folders/0B1_fAEgxdnvJSmF3YUlZcHFqWTQ?resourcekey=0-3IJ2gZLaeRUOBsa26PigQg&usp=sharing).\n\n2. Create a folder and a soft link to use the pre-trained model\n  ```Shell\n  NET=res101\n  TRAIN_IMDB=voc_2007_trainval+voc_2012_trainval\n  mkdir -p output/${NET}/${TRAIN_IMDB}\n  cd output/${NET}/${TRAIN_IMDB}\n  ln -s ../../../data/voc_2007_trainval+voc_2012_trainval ./default\n  cd ../../..\n  ```\n\n3. Demo for testing on custom images\n  ```Shell\n  # at repository root\n  GPU_ID=0\n  CUDA_VISIBLE_DEVICES=${GPU_ID} ./tools/demo.py\n  ```\n  **Note**: Resnet101 testing probably requires several gigabytes of memory, so if you encounter memory capacity issues, please install it with CPU support only. Refer to [Issue 25](https://github.com/endernewton/tf-faster-rcnn/issues/25).\n\n4. Test with pre-trained Resnet101 models\n  ```Shell\n  GPU_ID=0\n  ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc_0712 res101\n  ```\n  **Note**: If you cannot get the reported numbers (79.8 on my side), then probably the NMS function is compiled improperly, refer to [Issue 5](https://github.com/endernewton/tf-faster-rcnn/issues/5).\n\n### Train your own model\n1. Download pre-trained models and weights. The current code support VGG16 and Resnet V1 models. Pre-trained models are provided by slim, you can get the pre-trained models [here](https://github.com/tensorflow/models/tree/master/research/slim#pre-trained-models) and set them in the ``data/imagenet_weights`` folder. For example for VGG16 model, you can set up like:\n   ```Shell\n   mkdir -p data/imagenet_weights\n   cd data/imagenet_weights\n   wget -v http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz\n   tar -xzvf vgg_16_2016_08_28.tar.gz\n   mv vgg_16.ckpt vgg16.ckpt\n   cd ../..\n   ```\n   For Resnet101, you can set up like:\n   ```Shell\n   mkdir -p data/imagenet_weights\n   cd data/imagenet_weights\n   wget -v http://download.tensorflow.org/models/resnet_v1_101_2016_08_28.tar.gz\n   tar -xzvf resnet_v1_101_2016_08_28.tar.gz\n   mv resnet_v1_101.ckpt res101.ckpt\n   cd ../..\n   ```\n\n2. Train (and test, evaluation)\n  ```Shell\n  ./experiments/scripts/train_faster_rcnn.sh [GPU_ID] [DATASET] [NET]\n  # GPU_ID is the GPU you want to test on\n  # NET in {vgg16, res50, res101, res152} is the network arch to use\n  # DATASET {pascal_voc, pascal_voc_0712, coco} is defined in train_faster_rcnn.sh\n  # Examples:\n  ./experiments/scripts/train_faster_rcnn.sh 0 pascal_voc vgg16\n  ./experiments/scripts/train_faster_rcnn.sh 1 coco res101\n  ```\n  **Note**: Please double check you have deleted soft link to the pre-trained models before training. If you find NaNs during training, please refer to [Issue 86](https://github.com/endernewton/tf-faster-rcnn/issues/86). Also if you want to have multi-gpu support, check out [Issue 121](https://github.com/endernewton/tf-faster-rcnn/issues/121).\n\n3. Visualization with Tensorboard\n  ```Shell\n  tensorboard --logdir=tensorboard/vgg16/voc_2007_trainval/ --port=7001 &\n  tensorboard --logdir=tensorboard/vgg16/coco_2014_train+coco_2014_valminusminival/ --port=7002 &\n  ```\n\n4. Test and evaluate\n  ```Shell\n  ./experiments/scripts/test_faster_rcnn.sh [GPU_ID] [DATASET] [NET]\n  # GPU_ID is the GPU you want to test on\n  # NET in {vgg16, res50, res101, res152} is the network arch to use\n  # DATASET {pascal_voc, pascal_voc_0712, coco} is defined in test_faster_rcnn.sh\n  # Examples:\n  ./experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16\n  ./experiments/scripts/test_faster_rcnn.sh 1 coco res101\n  ```\n\n5. You can use ``tools/reval.sh`` for re-evaluation\n\n\nBy default, trained networks are saved under:\n\n```\noutput/[NET]/[DATASET]/default/\n```\n\nTest outputs are saved under:\n\n```\noutput/[NET]/[DATASET]/default/[SNAPSHOT]/\n```\n\nTensorboard information for train and validation is saved under:\n\n```\ntensorboard/[NET]/[DATASET]/default/\ntensorboard/[NET]/[DATASET]/default_val/\n```\n\nThe default number of training iterations is kept the same to the original faster RCNN for VOC 2007, however I find it is beneficial to train longer (see [report](https://arxiv.org/pdf/1702.02138.pdf) for COCO), probably due to the fact that the image batch size is one. For VOC 07+12 we switch to a 80k/110k schedule following [R-FCN](https://github.com/daijifeng001/R-FCN). Also note that due to the nondeterministic nature of the current implementation, the performance can vary a bit, but in general it should be within ~1% of the reported numbers for VOC, and ~0.2% of the reported numbers for COCO. Suggestions/Contributions are welcome.\n\n### Citation\nIf you find this implementation or the analysis conducted in our report helpful, please consider citing:\n\n    @article{chen17implementation,\n        Author = {Xinlei Chen and Abhinav Gupta},\n        Title = {An Implementation of Faster RCNN with Study for Region Sampling},\n        Journal = {arXiv preprint arXiv:1702.02138},\n        Year = {2017}\n    }\n    \nOr for a formal paper, [Spatial Memory Network](https://arxiv.org/abs/1704.04224):\n\n    @article{chen2017spatial,\n      title={Spatial Memory for Context Reasoning in Object Detection},\n      author={Chen, Xinlei and Gupta, Abhinav},\n      journal={arXiv preprint arXiv:1704.04224},\n      year={2017}\n    }\n\nFor convenience, here is the faster RCNN citation:\n\n    @inproceedings{renNIPS15fasterrcnn,\n        Author = {Shaoqing Ren and Kaiming He and Ross Girshick and Jian Sun},\n        Title = {Faster {R-CNN}: Towards Real-Time Object Detection\n                 with Region Proposal Networks},\n        Booktitle = {Advances in Neural Information Processing Systems ({NIPS})},\n        Year = {2015}\n    }\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9876:3B1F3:186689:5EE3F1:6AB92D2E"},"text_sha256":"44014eb7b3af7b4f07f2d70b300e95e6a76e2aabe311d2f035dec15c71aaaab6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hooram/ownphotos","input_row":{"repository":"hooram/ownphotos","url":"https://github.com/hooram/ownphotos","name":"ownphotos","owner":"hooram","description":"Self hosted alternative to Google Photos ","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2757,"issues":120,"created_at":"2017-07-17T08:56:54Z","updated_at":"2026-09-25T17:30:09Z","first_commit_at":"2017-05-23T09:09:16Z","last_commit_at":"2021-01-11T15:32:23Z","activity_months":43.670000000000002,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:24.485Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hooram/ownphotos","visibility":"public","created_at":"2017-07-17T08:56:54Z","updated_at":"2026-09-25T17:30:09Z","private":false,"fork":false,"archived":false,"stargazers_count":2757,"open_issues_count":86,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1563","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:17EB9F3:1C13672:6AB92D30"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1562","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0825:37D6E2:1824FBC:1C4D1BE:6AB92D30"},"commit":{"sha":"e5e7488566bd47cf77fef5ffc7679bbb04428833","url":"https://github.com/hooram/ownphotos/commit/e5e7488566bd47cf77fef5ffc7679bbb04428833","date":"2018-05-22T10:31:50Z","author_date":"2018-05-22T10:31:50Z","committer_date":"2018-05-22T10:31:50Z","tree_sha":"979eb28e6af7839b2ef4a7ca70dbad44ececb964","message_first_line":"One more package"},"tree_request_status":200,"tree_rate":{"github_remaining":"1561","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17E5CB4:1C0DCC4:6AB92D31"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7831,"blob_sha":"45deb98e4d95b4323b0f8d869f43d52e54d69470","priority":0}],"documents":[{"path":"README.md","size":7831,"blob_sha":"45deb98e4d95b4323b0f8d869f43d52e54d69470","priority":0,"status":200,"text":"<div style=\"text-align:center\"><img width=\"100\" src =\"/screenshots/logo.png\"/><\/div>\n\n# Ownphotos\n\n[DEMO](https://demo.ownphotos.io)\n\n- ID: demo\n- Password: demo1234\n\n## What is it?\n\n- Self hosted wannabe Google Photos clone, with a slight focus on cool graphs\n- Django backend & React frontend. \n- In development. \n\n**Currently the project is in very early stages, so run it only for the sake of checking it out.**\n\n### Features\n\n#### - Currently implemented:\n  \n  - Label some faces manually, and train a face classifier to label the rest.\n  - View photos by people in them.\n  - Automatically generate \"event\" albums with nice titles, like \"Thursday in Berlin\"\n  - See photos on the map\n  - Backend caching\n  - View photos grouped by date\n  - \"Optimized\" frontend (react virtualized... I tried my best.)\n  - Detect objects in photos, and make them searchable by objects \n  - Search photos by the location \n  - Authentication (using JWT)\n\n\n#### - Upcoming\n\n  - Short term:\n    - Create custom albums\n\n  - Longer term, i.e. haven't thought much about them\n    - Share photos/albums\n    - Basic photo editing, like rotation\n    - Tag undetected face\n    - Add cool graphs\n\n  - Finally:\n    - dockerize\n\n\n## What does it use?\n\n- **Face detection:** [face_recognition](https://github.com/ageitgey/face_recognition) \n- **Face classification/clusterization:** scikit-learn\n- **Object detection:** [densecap](https://github.com/jcjohnson/densecap), [places365](http://places.csail.mit.edu/)\n- **Reverse geocoding:** [Mapbox](https://www.mapbox.com/): You need to have an API key. First 50,000 geocode lookups are free every month.\n\n\n## How do I run it?\n\nTested on Ubuntu 16.04 and macOS Sierra.\n\n### Backend\n\n\n\n**See `Dockerfile`. This should have most of the information you need. You might need to pip install some python packages that are not included in the requirements.txt (sorry about that).**\n\n\n\nMake sure you have Python version >= 3.5. \n\n**Install Boost.**\n\n*For Ubuntu*\n```bash\nsudo apt-get install libboost-all-dev cmake docker.io docker-compose\n```\n\n*For macOS*\n```bash\nbrew install boost-python --with-python3 --without-python\n```\n\n**Create and activate a python virtual environment**\n\n\n```bash\nsudo apt install python-pip\npip install virtualenv\ncd && mkdir venvs\nvirtualenv -p /usr/bin/python3 ~/venvs/ownphotos \nsource ~/venvs/ownphotos/bin/activate\n```\n\n**Install dlib and its Python binding** (make sure you're within the above virtual environment)\n\n\n```bash\ngit clone https://github.com/davisking/dlib.git\ncd dlib\nmkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1;\ncmake --build .\ncd ..\npython3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA\n```\n\n**Clone the repo and install requirements**\n\n```bash\ncd\ngit clone https://github.com/hooram/ownphotos-backend.git\ncd ownphotos-backend\npip install -r requirements.txt\n```\n\n**Setup PostgreSQL database:**\n\nJust use docker\n\n```\ndocker run --name ownphotos-db -e POSTGRES_PASSWORD=q1W@e3R$ -e POSTGRES_DB=ownphotos -d postgres\n```\nCheck the ip of the postgresql docker container by \n\n```\ndocker inspect ownphotos-db | grep IPAddress\n```\n\nShould be something like 172.17.0.#. Open `ownphotos/settings.py` and change the db host to that ip in the `DATABASE` dictionary. Should be around line 100 or so.\n\n**Setup redis:**\n\nAlso just use docker\n\n```\ndocker run --name ownphotos-redis -d redis\n```\n\nCheck the ip of the redis Docker container by\n\n```\ndocker inspect ownphotos-redis | grep IPAddress\n```\n\nAgain, should be something like 172.17.0.#. Open `ownphotos/settings.py` and change the hostname in the `CACHES` dictionary. Should be around line 120 or so. \n\n**Create db and add admin user**\n\n```bash\npython manage.py migrate --run-syncdb\npython manage.py createsuperuser # will prompt for username and password. use admin/password\n```\n\n**Edit `config.py` file to add directories where your photos live**\n\n\n**(Optional) Install & run densecap**\n\nFollow the instructions [here](/densecap/README.md). You can use CUDA if you want, which will speed up caption generation considerably. On CPU (i7-4765T), generating captions for one photo takes ~10 seconds. On a GPU (gtx970), it takes ~4 seconds per each photo. \n\nDensecap itself is written in torch, and the script `densecap/webcam/daemon.th` will start the daemon. The script watches a directory for image files in `densecap/webcam/input`, and it will drop a json file containing the captions for image files in the said photos into `densecap/webcam/output`. There's a flask server that deals with communicating with the django backend for receiving base64 encoded image files, and drops it into the `densecap/webcam/input` folder, and returns the captions back to the django backend. It's kind of a convoluted way to do it, but works for now. To run it, \n\n```\ncd densecap/\nth webcam/daemon.lua & python webcam/server.py\n\n```\n\nThe flask server will listen on port 5000. The only request you can make is POST to `/` with the request body consisting of base64 encoded image file.\n\n\n\n**Download and install the model files for places365 pretrained model**\n\nhttps://drive.google.com/open?id=1Zbe4NcwocGtZ7l7naGKnn7HorMeLejJU\nUnzip the contents into `api/places365/model/`.\n\n\n**Install Spacy default english model**\n```\npython -m spacy download en_core_web_sm\n```\n\n\n\n**Start the server process** (make sure it's running on port 8000, or go through the entire front end code to replace occurances of `localhost:8000` with the appropriate `hostname:port`)\n\n```bash\npython manage.py runserver\n```\n\n\n\n\n### Frontend\n\nInstall node and npm. For development I am using node v6.11.0 and npm v5.1.0.\n\nClone the repo, `cd` into it and start server\n\n```bash\ncd && git clone https://github.com/hooram/ownphotos-frontend.git\ncd ownphotos-frontend\nnpm install\nnpm start\n```\n\nA browser window should open, where you can mess around!\n\n# Screenshots\n\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/01.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/02.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/03.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/04.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/05.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/06.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/07.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/08.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/09.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/10.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/11.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/12.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/13.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/14.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/15.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/16.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/17.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/18.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/19.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/20.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/21.png)\n![](https://s3.eu-central-1.amazonaws.com/ownphotos-deploy/ownphotos_screenshots/22.png)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F5EE:1F1FB6:17E67F:5E62A2:6AB92D2E"},"text_sha256":"6a80353f2d8bd41af6a8899f7a2805d061f29346674e945651b54be08fbf0f0b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1560","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:182C7FC:1C54791:6AB92D32"},"commit":{"sha":"180de5746468ec64b725723e03657dc21317f3a9","url":"https://github.com/hooram/ownphotos/commit/180de5746468ec64b725723e03657dc21317f3a9","date":"2021-01-11T15:32:23Z","author_date":"2021-01-11T15:32:23Z","committer_date":"2021-01-11T15:32:23Z","tree_sha":"1991ea64acf35d1c3b5b50f542066a5885c08e36","message_first_line":"Put link to LibrePhotos Fixes #137"},"tree_request_status":200,"tree_rate":{"github_remaining":"1559","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0915:3C4024:181A0B8:1C4219A:6AB92D32"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4704,"blob_sha":"dd918e4108098649858218f588282b79a1dd3041","priority":0}],"documents":[{"path":"README.md","size":4704,"blob_sha":"dd918e4108098649858218f588282b79a1dd3041","priority":0,"status":200,"text":"# Ownphotos development has moved to [LibrePhotos](https://github.com/LibrePhotos/librephotos)\nOwnphotos development has moved to LibrePhotos\nUse it here: https://github.com/LibrePhotos/librephotos\n\n\n<br/><br/><br/>\n### OLD project for archive only, use LibrePhotos\n\n<div style=\"text-align:center\"><img width=\"100\" src =\"/screenshots/logo.png\"/><\/div>\n\n# Ownphotos\n\n## Screenshots\n\n![](https://github.com/hooram/ownphotos/blob/dev/screenshots/Screenshot_2018-11-27_14-56-21.png?raw=true)\n![](https://github.com/hooram/ownphotos/blob/dev/screenshots/Screenshot_2018-11-27_14-57-50.png?raw=true)\n![](https://github.com/hooram/ownphotos/blob/dev/screenshots/Screenshot_2018-11-27_15-01-49.png?raw=true)\n\n## Live demo\nLive [demo avilable here](https://demo.ownphotos.io).\nUser is demo, password is demo1234.\n\n## Discord Server\nhttps://discord.gg/dPCdTBN\n\n## What is it?\n\n- Self hosted wannabe Google Photos clone, with a slight focus on cool graphs\n- Django backend & React frontend. \n- In development. Contributions are welcome!\n\n**Currently the project is in very early stages, so run it only for the sake of checking it out.**\n\n### Features\n\n#### - Currently implemented:\n  \n  - Label some faces manually, and train a face classifier to label the rest.\n  - View photos by people in them.\n  - Automatically generate \"event\" albums with nice titles, like \"Thursday in Berlin\"\n  - See photos on the map\n  - Backend caching\n  - View photos grouped by date\n  - \"Optimized\" frontend (react virtualized... I tried my best.)\n  - Detect objects in photos, and make them searchable by objects \n  - Search photos by the location \n  - Authentication (using JWT)\n  - Create custom albums\n  - Docker ready\n  \n#### - Upcoming\n\n  - Short term:\n    - Share photos/albums\n    - Stability\n\n  - Longer term, i.e. haven't thought much about them\n    - Basic photo editing, like rotation\n    - Tag undetected face\n    - Add cool graphs\n\n\n\n\n## What does it use?\n\n- **Face detection:** [face_recognition](https://github.com/ageitgey/face_recognition) \n- **Face classification/clusterization:** scikit-learn\n- **Object detection:** [densecap](https://github.com/jcjohnson/densecap), [places365](http://places.csail.mit.edu/)\n- **Reverse geocoding:** [Mapbox](https://www.mapbox.com/): You need to have an API key. First 50,000 geocode lookups are free every month.\n\n\n## How do I run it?\n\n### Docker\n\nOwnphotos comes with separate backend and frontend\nservers. The backend serves the restful API, and the frontend serves, well,\nthe frontend. They are connected via a proxy.\nThe easiest way to do it is using Docker.\n\nIf you want the backend server to be reachable by\n`ownphotos-api.example.com` and the frontend by `ownphotos.example.com` from\noutside. You must account for the corsaCross-Origin Resource Sharing (CORS) in your proxy.\n\n## Docker-compose method (Recommended)\n\n```\nwget https://raw.githubusercontent.com/hooram/ownphotos/dev/docker-compose.yml.template\ncp docker-compose.yml.template docker-compose.yml\n```\n\nOpen `docker-compose.yml` in your favorite text editor and make changes in the lines with `# CHANGE ME`\n\n```\ndocker-compose up -d\n```\n\nYou should have ownphotos accessible after a few seconds of bootup on: [localhost:3000](http://localhost:3000)\nUser is admin, password is admin and its important you change it on a public server via the ``docker-compose.yml`` file.\n\n## First steps after setting up\n\nYou need to log in as the admin user, and set up the directory for the users. To do this, click the top right button, and go to \"Admin Area\". On this page, it will show a list of users, and manually set the \"Scan Directory\" for the desired user. Only an admin can do this. And then you can go to Dashboard - Library and click the Green \"Scan photos (file system)\" button. If you have a Nextcloud instance, you can also input this in the Dashboard-Library page. Once logged in (the little circle next to \"Nextcloud Scan Directory will be green), you can choose a top level directory in your logged in Nextcloud account. Once this works, you can click the blue \"Scan photos (Nextcloud)\". The backend system will essentially copy the contents of the Nextcloud directory you specified. \n\nThe basic idea is this:\n\n- For scanning photos that reside in the local file system\n  - Only the admin user can change the \"scan directory\" of the users, including the admin itself.\n  - Normal users cannot change his/her own \"scan directory\"\n  - Only the admin can find the page to control this under the \"user icon (top right) - admin area\"\n- For scannign photos that reside in external Nextcloud instances\n  - Any user can change his/her own Nextcloud endpoint, and choose a top level directory in the Nextcloud account.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFB2:40CE8:18150A:5E9115:6AB92D32"},"text_sha256":"b2fb42c86efd449fac89180daa50d13ca6db21a35e9bdbfba19c4a30cf2c80a6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"photonixapp/photonix","input_row":{"repository":"photonixapp/photonix","url":"https://github.com/photonixapp/photonix","name":"photonix","owner":"photonixapp","description":"A modern, web-based photo management server. Run it on your home server and it will let you find the right photo from your collection on any device. Smart filtering is made possible by object recognition, face recognition, location awareness, color analysis and other ML algorithms.","language":"Python","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":1956,"issues":285,"created_at":"2017-03-07T22:30:32Z","updated_at":"2026-09-18T01:05:41Z","first_commit_at":"2017-03-07T22:30:33Z","last_commit_at":"2026-07-20T20:03:01Z","activity_months":112.41,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:27.114Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"photonixapp/photonix","visibility":"public","created_at":"2017-03-07T22:30:32Z","updated_at":"2026-09-18T01:05:41Z","private":false,"fork":false,"archived":false,"stargazers_count":1956,"open_issues_count":146,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"1558","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:1811796:1C396BE:6AB92D33"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1557","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:181C4A0:1C448AB:6AB92D33"},"commit":{"sha":"023a27d7bef7e4fe9b6ec22b56c3113917141156","url":"https://github.com/photonixapp/photonix/commit/023a27d7bef7e4fe9b6ec22b56c3113917141156","date":"2017-08-13T13:41:57Z","author_date":"2017-08-13T13:41:57Z","committer_date":"2017-08-13T13:41:57Z","tree_sha":"b33682c1963f9a1f57f6d5d88e14c23b6ae099c8","message_first_line":"Upgraded to Debian Stretch base image"},"tree_request_status":200,"tree_rate":{"github_remaining":"1556","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DA:37D6E2:182517C:1C4D402:6AB92D33"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1174,"blob_sha":"c539c1f993c096898db67ca0bd15608ced956e48","priority":0}],"documents":[{"path":"README.md","size":1174,"blob_sha":"c539c1f993c096898db67ca0bd15608ced956e48","priority":0,"status":200,"text":"# photo-manager\n\nPhoto management application based on web technologies.\n\nThis project is currently in early stages. I have a lot of thoughts on how I want photo management and viewing to work. I'm on the way to an MVP and it's shaping up nicely so stay tuned... also please suggest a name for this thing! :)\n\nThe easiest way to try it out is with docker-compose (though there are currently no pre-built images so it will take a while to download and build).\n\n```\ngit clone git@github.com:damianmoore/photo-manager.git\ncd photo-manager/\ndocker-compose build\ndocker-compose up\n```\n\nA few seconds after starting you should be able to go to [http://localhost:8888/](http://localhost:8888/) in your browser.\n\nYou can move some photos into the folder `data/photos` and they should get detected and imported immediately. Once you have finished trying out the system you can edit the volume in the `docker-compose.yml` file where it says `./data/photos` to mount wherever you usually keep photos. System database, thumbnails and other cache data is stored separately from the photos so shouldn't pollute the area. You are responsible for keeping your own backups in case of error.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1DFA:326565:17C1C5:5E3F92:6AB92D33"},"text_sha256":"b5d27622cdb395e95b1085ee12a0cb95ebdb2e9419370ef803974e04e6a98506"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1555","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17D5B2F:1BFC923:6AB92D34"},"commit":{"sha":"64c8f73c89d655f3581e7fcad2619e88ca7dd98c","url":"https://github.com/photonixapp/photonix/commit/64c8f73c89d655f3581e7fcad2619e88ca7dd98c","date":"2026-04-10T20:49:21Z","author_date":"2026-04-10T20:49:21Z","committer_date":"2026-04-10T20:49:21Z","tree_sha":"ecc276970767dcef2cddc82410ca98a96f8813e1","message_first_line":"Fix test_thumbnails 404 by setting ENV before Django URL loading"},"tree_request_status":200,"tree_rate":{"github_remaining":"1554","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C1:E80A6:17C01E5:1BE8431:6AB92D34"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5444,"blob_sha":"89a56eb83e7e4299ef1fd31da4180c39990ac1ea","priority":0},{"path":"SECURITY.md","size":1638,"blob_sha":"80745c1e457d0932e84b70109bf6ad57ed34cf8d","priority":1}],"documents":[{"path":"README.md","size":5444,"blob_sha":"89a56eb83e7e4299ef1fd31da4180c39990ac1ea","priority":0,"status":200,"text":"# Photonix Photo Manager\n\n![GitHub](https://img.shields.io/github/license/photonixapp/photonix) [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/photonixapp/photonix)](https://hub.docker.com/r/photonixapp/photonix/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/photonixapp)](https://github.com/sponsors/photonixapp) [![Docker Pulls](https://img.shields.io/docker/pulls/photonixapp/photonix)](https://hub.docker.com/r/photonixapp/photonix/) [![](https://img.shields.io/travis/damianmoore/photonix/master.svg)](https://travis-ci.org/damianmoore/photonix/branches) [![](https://img.shields.io/codecov/c/github/damianmoore/photonix.svg)](https://codecov.io/gh/damianmoore/photonix) [![](https://img.shields.io/uptimerobot/status/m781745452-4f90c0e2a56b2086dd0c5092.svg?label=demo%20site)](https://demo.photonix.org/) [![](https://img.shields.io/uptimerobot/ratio/m781745452-4f90c0e2a56b2086dd0c5092.svg)](https://demo.photonix.org/)\n\nThis is a photo management application based on web technologies. Run it on your home server and it will let you find what you want from your photo collection using any device. Smart filtering is made possible automatically by object recognition, location awareness, color analysis and other algorithms.\n\n![Screenshot of photo list view](https://epixstudios.co.uk/uploads/filer_public/52/dc/52dcdff4-d96d-4dfd-b158-b57b0696154e/photo_list.jpg)\n\nThis project is currently in development and not feature complete for a version 1.0 yet. If you don't mind putting up with broken parts or want to help out, run the Docker image and give it a go. I'd love for other contributors to get involved.\n\n## Community and Social\n\nPlease join in the discussion and help us gain visibility by following us on social media. Much appreciated :)\n\n- [Gitter live chat](https://gitter.im/photonixapp/community)\n- [Docker Hub](https://hub.docker.com/r/photonixapp/photonix/)\n- [Twitter](https://twitter.com/photonixapp)\n- [Instagram](https://www.instagram.com/photonixapp/)\n- [LinkedIn](https://www.linkedin.com/company/photonixapp/)\n- [Indie Hackers](https://www.indiehackers.com/product/photonix-photo-organizer-app)\n\n## Sponsorship\n\nIf you get value from Photonix or like where we're heading then we'd really appreciate it if you considered sponsoring us on a monthly basis.\n\n- [GitHub Sponsors](https://github.com/sponsors/photonixapp)\n- [Patreon](https://www.patreon.com/photonixapp)\n\n## Installing & Running\n\nThe easiest way to run it is with [Docker Compose](https://docs.docker.com/compose/install/#install-compose) using the pre-built image following these steps.\n\nCreate a new directory to run inside and download the example Docker Compose file.\n\n    mkdir photonix\n    cd photonix\n    curl https://raw.githubusercontent.com/photonixapp/photonix/master/docker/docker-compose.example.yml > docker-compose.yml\n\nMake volume directories for data stored outside the container.\n\n    mkdir -p  data/photos\n\nBring up Docker Compose which will pull and run the required Docker images.\n\n    docker-compose up\n\nA few seconds after starting you should be able to go to [http://localhost:8888/](http://localhost:8888/) in your browser.\n\nYou'll need to create a username, password and library. Right now this needs to be done on the command-line so run this in a new terminal window. Replace `USERNAME` with your own username.\n\n    docker-compose run photonix python photonix/manage.py createsuperuser --username USERNAME --email example@example.com\n    docker-compose run photonix python photonix/manage.py create_library USERNAME \"My Library\"\n\nYou can move some photos into the folder `data/photos` and they should get detected and imported immediately. Once you have finished trying out the system you can edit the volume in the `docker-compose.yml` file where it says `./data/photos` to mount wherever you usually keep photos. System database, thumbnails and other cache data is stored separately from the photos so shouldn't pollute the area. You are responsible for keeping your own backups in case of error.\n\n## Upgrading\n\nIf you are using the pre-built Docker image you can use kill, pull and bring back up using the following:\n\n    # Ctrl-C to kill\n    docker-compose pull\n    docker-compose up\n\n## Developing\n\nThere is a [`Makefile`](./Makefile) and separate Docker Compose file `docker-compose.dev.yml` that you should use if you want to work on the project. Check out the repo and this setup will build the image, mount the code as volumes, hot-reload JS changes to the browser and reload the Python server for most changes.\n\n    git clone git@github.com:photonixapp/photonix.git\n    cd photonix\n    mkdir -p  data/photos\n    make build\n    make start\n\nIf you get errors such as `Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address alerady in use` then you probably have an existing server such as Postgres listening on the standard port. You can change Photonix's services to use alternative port numbers by editing `docker/docker-compose.dev.yml` and setting `'5432:5432'` to be `'5433:5432'` for example. This is for Postgres but is it a similar solution for Redis or the webserver ports.\n\nIf you want to access the Bash or Python shells for development, you can use the following command.\n\n    make shell\n\n## Testing\n\nPyTest is used as a test runner and for creating fixtures. The easiest way to run the tests is within the Docker container like this:\n\n    make test\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:18152A:5E91A9:6AB92D35"},"text_sha256":"aaf9ca2cc61e0a6c3a8a9c2b4c9cd83ada3c965764148d2e47f3bf43dcb64b3b"},{"path":"SECURITY.md","size":1638,"blob_sha":"80745c1e457d0932e84b70109bf6ad57ed34cf8d","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| latest  | :white_check_mark: |\n\n## Reporting a Vulnerability\n\nWe take the security of Photonix seriously. If you discover a security vulnerability, please report it responsibly.\n\n**Please do NOT open a public GitHub issue for security vulnerabilities.**\n\nInstead, please email us at:\n\n📧 **[security@epixstudios.co.uk](mailto:security@epixstudios.co.uk)**\n\n### What to include\n\n- A description of the vulnerability\n- Steps to reproduce the issue\n- Any potential impact you've identified\n- Your name/handle for credit (optional)\n\n### What to expect\n\n- **Acknowledgement:** We will acknowledge receipt of your report within **48 hours**.\n- **Assessment:** We will investigate and provide an initial assessment within **7 days**.\n- **Resolution:** We aim to release a fix within **30 days** of confirmation, depending on complexity.\n- **Disclosure:** We will coordinate with you on public disclosure timing.\n\n### Safe harbour\n\nWe consider security research conducted in good faith to be authorised. We will not pursue legal action against researchers who:\n\n- Act in good faith to avoid privacy violations, data destruction, or service disruption\n- Only interact with accounts they own or with explicit permission\n- Report vulnerabilities through the process outlined above\n- Allow reasonable time for resolution before public disclosure\n\n## Credit\n\nWe are happy to credit security researchers who report valid vulnerabilities, unless they prefer to remain anonymous.\n\nThank you for helping keep Photonix and its users safe! 🔐\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4EF8:2C474:18192D:5E9672:6AB92D35"},"text_sha256":"00eae9a475a3a053f9e387d71875b3623259c0dacc61a4a501d6a211c5307e20"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"AlexeyAB/Yolo_mark","input_row":{"repository":"AlexeyAB/Yolo_mark","url":"https://github.com/AlexeyAB/Yolo_mark","name":"Yolo_mark","owner":"AlexeyAB","description":"GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2","language":"C++","license_spdx_id":"Unlicense","license_name":"The Unlicense","license_osi_approved":"true","stars":1842,"issues":194,"created_at":"2016-12-17T21:25:07Z","updated_at":"2026-09-10T22:53:02Z","first_commit_at":"2016-12-17T21:25:07Z","last_commit_at":"2019-04-24T09:59:27Z","activity_months":28.170000000000002,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:29.995Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"AlexeyAB/Yolo_mark","visibility":"public","created_at":"2016-12-17T21:25:07Z","updated_at":"2026-09-10T22:53:02Z","private":false,"fork":false,"archived":false,"stargazers_count":1842,"open_issues_count":146,"license_spdx_id":"Unlicense","license_name":"The Unlicense"},"error":"","rate":{"github_remaining":"1553","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:17D9825:1C01A1F:6AB92D36"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1552","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0800:62B94:17D718B:1BFF087:6AB92D36"},"commit":{"sha":"0fb2f84fd77488e48d22c7ba30e23eafabdf09f9","url":"https://github.com/AlexeyAB/Yolo_mark/commit/0fb2f84fd77488e48d22c7ba30e23eafabdf09f9","date":"2018-05-22T15:00:11Z","author_date":"2018-05-22T15:00:11Z","committer_date":"2018-05-22T15:00:11Z","tree_sha":"830310a2cd293397d959f86c7c13f682019822fc","message_first_line":"Merge pull request #49 from jing-vision/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1551","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EB:71F98:184CC0C:1C748CF:6AB92D36"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3884,"blob_sha":"3d8f8997745e7bd8e7a2503f54398ae6fd238da6","priority":0}],"documents":[{"path":"README.md","size":3884,"blob_sha":"3d8f8997745e7bd8e7a2503f54398ae6fd238da6","priority":0,"status":200,"text":"# Yolo_mark\n**Windows** & **Linux** GUI for marking bounded boxes of objects in images for training Yolo v3 and v2\n\n* To compile on **Windows** open `yolo_mark.sln` in MSVS2013/2015, compile it **x64 & Release** and run the file: `x64/Release/yolo_mark.cmd`. Change paths in `yolo_mark.sln` to the OpenCV 2.x/3.x installed on your computer:\n\n    * (right click on project) -> properties -> C/C++ -> General -> Additional Include Directories: `C:\\opencv_3.0\\opencv\\build\\include;`\n        \n    * (right click on project) -> properties -> Linker -> General -> Additional Library Directories: `C:\\opencv_3.0\\opencv\\build\\x64\\vc14\\lib;`\n\n* To compile on **Linux** type in console 3 commands:\n    ```\n    cmake .\n    make\n    ./linux_mark.sh\n    ```\n\nSupported both: OpenCV 2.x and OpenCV 3.x\n\n--------\n\n1. To test, simply run \n  * **on Windows:** `x64/Release/yolo_mark.cmd`\n  * **on Linux:** `./linux_mark.sh`\n\n2. To use for labeling your custom images:\n\n * delete all files from directory `x64/Release/data/img`\n * put your `.jpg`-images to this directory `x64/Release/data/img`\n * change numer of classes (objects for detection) in file `x64/Release/data/obj.data`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/data/obj.data#L1\n * put names of objects, one for each line in file `x64/Release/data/obj.names`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/data/obj.names\n * run file: `x64\\Release\\yolo_mark.cmd`\n\n3. To training for your custom objects, you should change 2 lines in file `x64/Release/yolo-obj.cfg`:\n\n * set number of classes (objects): https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/yolo-obj.cfg#L230\n * set `filter`-value equal to `(classes + 5)*5`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/yolo-obj.cfg#L224\n\n\n 3.1 Download pre-trained weights for the convolutional layers (76 MB): http://pjreddie.com/media/files/darknet19_448.conv.23 \n \n 3.2 Put files: `yolo-obj.cfg`, `data/train.txt`, `data/obj.names`, `data/obj.data`, `darknet19_448.conv.23` and directory `data/img` near with executable `darknet`-file, and start training: `darknet detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23`\n\nFor a detailed description, see: https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects\n\n----\n\n#### How to get frames from videofile:\n\nTo get frames from videofile (save each N frame, in example N=10), you can use this command:\n* on Windows: `yolo_mark.exe data/img cap_video test.mp4 10`\n* on Linux: `./yolo_mark x64/Release/data/img cap_video test.mp4 10`\n\nDirectory `data/img` should be created before this. Also on Windows, the file `opencv_ffmpeg340_64.dll` from `opencv\\build\\bin` should be placed near with `yolo_mark.exe`.\n\nAs a result, many frames will be collected in the directory `data/img`. Then you can label them manually using such command: \n* on Windows: `yolo_mark.exe data/img data/train.txt data/obj.names`\n* on Linux: `./yolo_mark x64/Release/data/img x64/Release/data/train.txt x64/Release/data/obj.names`\n\n----\n\n#### Here are:\n\n* /x64/Release/\n  * `yolo_mark.cmd` - example hot to use yolo mark: `yolo_mark.exe data/img data/train.txt data/obj.names`\n  * `train_obj.cmd` - example how to train yolo for your custom objects (put this file near with darknet.exe): `darknet.exe detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23`\n  * `yolo-obj.cfg` - example of yoloV3-neural-network for 2 object\n* /x64/Release/data/\n  * `obj.names` - example of list with object names\n  * `obj.data` - example with configuration for training Yolo v3\n  * `train.txt` - example with list of image filenames for training Yolo v3\n  \n* /x64/Release/data/img/`air4.txt` - example with coordinates of objects on image `air4.jpg` with aircrafts (class=0)\n\n![Image of Yolo_mark](https://habrastorage.org/files/229/f06/277/229f06277fcc49279342b7edfabbb47a.jpg)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B006:3CC8A:17EEE4:5E6CC1:6AB92D36"},"text_sha256":"53b0f11e088ebf75e5ae5102ac52865340fac046ae7a73cd09f3e2231f08bf2b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1550","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17E6085:1C0E167:6AB92D37"},"commit":{"sha":"ea049f3f1a4812500526db409e61e34c7bdcd4da","url":"https://github.com/AlexeyAB/Yolo_mark/commit/ea049f3f1a4812500526db409e61e34c7bdcd4da","date":"2019-04-24T09:59:27Z","author_date":"2019-04-24T09:59:27Z","committer_date":"2019-04-24T09:59:27Z","tree_sha":"f71f46e085443b640fafbf792522ace1232dffbb","message_first_line":"Merge pull request #130 from tinohager/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1549","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0801:6C6ED:1807F90:1C2FAF5:6AB92D37"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4558,"blob_sha":"7be251299718a8ffa367a7abae163f8dbedb3f72","priority":0}],"documents":[{"path":"README.md","size":4558,"blob_sha":"7be251299718a8ffa367a7abae163f8dbedb3f72","priority":0,"status":200,"text":"# Yolo_mark\n**Windows** & **Linux** GUI for marking bounded boxes of objects in images for training Yolo v3 and v2\n\n* To compile on **Windows** open `yolo_mark.sln` in MSVS2013/2015, compile it **x64 & Release** and run the file: `x64/Release/yolo_mark.cmd`. Change paths in `yolo_mark.sln` to the OpenCV 2.x/3.x installed on your computer:\n\n    * (right click on project) -> properties -> C/C++ -> General -> Additional Include Directories: `C:\\opencv_3.0\\opencv\\build\\include;`\n        \n    * (right click on project) -> properties -> Linker -> General -> Additional Library Directories: `C:\\opencv_3.0\\opencv\\build\\x64\\vc14\\lib;`\n\n* To compile on **Linux** type in console 3 commands:\n    ```\n    cmake .\n    make\n    ./linux_mark.sh\n    ```\n\nSupported both: OpenCV 2.x and OpenCV 3.x\n\n--------\n\n1. To test, simply run \n  * **on Windows:** `x64/Release/yolo_mark.cmd`\n  * **on Linux:** `./linux_mark.sh`\n\n2. To use for labeling your custom images:\n\n * delete all files from directory `x64/Release/data/img`\n * put your `.jpg`-images to this directory `x64/Release/data/img`\n * change numer of classes (objects for detection) in file `x64/Release/data/obj.data`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/data/obj.data#L1\n * put names of objects, one for each line in file `x64/Release/data/obj.names`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/data/obj.names\n * run file: `x64\\Release\\yolo_mark.cmd`\n\n3. To training for your custom objects, you should change 2 lines in file `x64/Release/yolo-obj.cfg`:\n\n * set number of classes (objects): https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/yolo-obj.cfg#L230\n * set `filter`-value \n   * For Yolov2 `(classes + 5)*5`: https://github.com/AlexeyAB/Yolo_mark/blob/master/x64/Release/yolo-obj.cfg#L224\n   * For Yolov3 `(classes + 5)*3`\n\n 3.1 Download pre-trained weights for the convolutional layers (76 MB): http://pjreddie.com/media/files/darknet19_448.conv.23 \n \n 3.2 Put files: `yolo-obj.cfg`, `data/train.txt`, `data/obj.names`, `data/obj.data`, `darknet19_448.conv.23` and directory `data/img` near with executable `darknet`-file, and start training: `darknet detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23`\n\nFor a detailed description, see: https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects\n\n----\n\n#### How to get frames from videofile:\n\nTo get frames from videofile (save each N frame, in example N=10), you can use this command:\n* on Windows: `yolo_mark.exe data/img cap_video test.mp4 10`\n* on Linux: `./yolo_mark x64/Release/data/img cap_video test.mp4 10`\n\nDirectory `data/img` should be created before this. Also on Windows, the file `opencv_ffmpeg340_64.dll` from `opencv\\build\\bin` should be placed near with `yolo_mark.exe`.\n\nAs a result, many frames will be collected in the directory `data/img`. Then you can label them manually using such command: \n* on Windows: `yolo_mark.exe data/img data/train.txt data/obj.names`\n* on Linux: `./yolo_mark x64/Release/data/img x64/Release/data/train.txt x64/Release/data/obj.names`\n\n----\n\n#### Here are:\n\n* /x64/Release/\n  * `yolo_mark.cmd` - example hot to use yolo mark: `yolo_mark.exe data/img data/train.txt data/obj.names`\n  * `train_obj.cmd` - example how to train yolo for your custom objects (put this file near with darknet.exe): `darknet.exe detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23`\n  * `yolo-obj.cfg` - example of yoloV3-neural-network for 2 object\n* /x64/Release/data/\n  * `obj.names` - example of list with object names\n  * `obj.data` - example with configuration for training Yolo v3\n  * `train.txt` - example with list of image filenames for training Yolo v3\n  \n* /x64/Release/data/img/`air4.txt` - example with coordinates of objects on image `air4.jpg` with aircrafts (class=0)\n\n![Image of Yolo_mark](https://habrastorage.org/files/229/f06/277/229f06277fcc49279342b7edfabbb47a.jpg)\n\n### Instruction manual\n\n#### Mouse control\n\nButton | Description | \n--- | --- |\nLeft | Draw box\nRight | Move box\n\n#### Keyboard Shortcuts\n\nShortcut | Description | \n--- | --- |\n<kbd>→<\/kbd> | Next image |\n<kbd>←<\/kbd> | Previous image |\n<kbd>r<\/kbd> | Delete selected box (mouse hovered) |\n<kbd>c<\/kbd> | Clear all marks on the current image |\n<kbd>p<\/kbd> | Copy previous mark |\n<kbd>o<\/kbd> | Track objects |\n<kbd>ESC<\/kbd> | Close application |\n<kbd>n<\/kbd> | One object per image |\n<kbd>0-9<\/kbd> | Object id |\n<kbd>m<\/kbd> | Show coords |\n<kbd>w<\/kbd> | Line width |\n<kbd>k<\/kbd> | Hide object name |\n<kbd>h<\/kbd> | Help |\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F3E:11E74B:17B3D9:5E3045:6AB92D38"},"text_sha256":"a7298353a870629cddaaab81a6d77b427881ea3e38fa9ae2c34f8c6f68d04a8c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cheind/py-motmetrics","input_row":{"repository":"cheind/py-motmetrics","url":"https://github.com/cheind/py-motmetrics","name":"py-motmetrics","owner":"cheind","description":":bar_chart: Benchmark multiple object trackers (MOT) in Python","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1488,"issues":159,"created_at":"2017-04-07T15:16:59Z","updated_at":"2026-09-08T05:29:42Z","first_commit_at":"2017-04-07T05:23:16Z","last_commit_at":"2026-07-17T11:48:07Z","activity_months":111.31,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:32.528Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cheind/py-motmetrics","visibility":"public","created_at":"2017-04-07T15:16:59Z","updated_at":"2026-09-08T05:29:42Z","private":false,"fork":false,"archived":false,"stargazers_count":1488,"open_issues_count":67,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1548","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0799:228A99:18002FF:1C284FB:6AB92D38"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1547","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:17AD182:1BD50C0:6AB92D38"},"commit":{"sha":"d0f0ac8e92a157f097bb50a0068aa37a2342e03f","url":"https://github.com/cheind/py-motmetrics/commit/d0f0ac8e92a157f097bb50a0068aa37a2342e03f","date":"2018-03-21T13:04:26Z","author_date":"2018-03-21T13:04:26Z","committer_date":"2018-03-21T13:04:26Z","tree_sha":"45f9eb7fffe96bc5360fa678391a11233dadfd65","message_first_line":"Merge tag 'v1.1.2' into develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"1546","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:12AC9F2:16049A0:6AB92D39"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":16866,"blob_sha":"9557ea033390b3f0eee3082638e5073c0e79cf3f","priority":0}],"documents":[{"path":"Readme.md","size":16866,"blob_sha":"9557ea033390b3f0eee3082638e5073c0e79cf3f","priority":0,"status":200,"text":"[![PyPI version](https://badge.fury.io/py/motmetrics.svg)](https://badge.fury.io/py/motmetrics) [![](https://travis-ci.org/cheind/py-motmetrics.svg?branch=master)](https://travis-ci.org/cheind/py-motmetrics)\n\n## py-motmetrics\n\nThe **py-motmetrics** library provides a Python implementation of metrics for benchmarking multiple object trackers (MOT).\n\nWhile benchmarking single object trackers is rather straightforward, measuring the performance of multiple object trackers needs careful design as multiple correspondence constellations can arise (see image below). A variety of methods have been proposed in the past and while there is no general agreement on a single method, the methods of [[1,2,3,4]](#References) have received considerable attention in recent years. **py-motmetrics** implements these [metrics](#Metrics).\n\n<div style=\"text-align:center;\">\n\n![](motmetrics/etc/mot.png)<br/>\n*Pictures courtesy of Bernardin, Keni, and Rainer Stiefelhagen [[1]](#References)*\n<\/div>\n\nIn particular **py-motmetrics** supports `CLEAR-MOT`[[1,2]](#References) metrics and `ID`[[4]](#References) metrics. Both metrics attempt to find a minimum cost assignment between ground truth objects and predictions. However, while CLEAR-MOT solves the assignment problem on a local per-frame basis, `ID-MEASURE` solves the bipartite graph matching by finding the minimum cost of objects and predictions over all frames. This [blog-post](http://vision.cs.duke.edu/DukeMTMC/IDmeasures.html) by Ergys illustrates the differences in more detail.\n\n### Features at a glance\n- *Variety of metrics* <br/>\nProvides MOTA, MOTP, track quality measures, global ID measures and more. The results are [comparable](#MOTChallengeCompatibility) with the popular [MOTChallenge][MOTChallenge] benchmarks.\n- *Distance agnostic* <br/>\nSupports Euclidean, Intersection over Union and other distances measures.\n- *Complete event history* <br/> \nTracks all relevant per-frame events suchs as correspondences, misses, false alarms and switches.\n- *Flexible solver backend* <br/> \nSupport for switching minimum assignment cost solvers. Supports `scipy`, `ortools`, `munkres` out of the box. Auto-tunes solver selection based on [availability and problem size](#SolverBackends).\n- *Easy to extend* <br/> \nEvents and summaries are utilizing [pandas][pandas] for data structures and analysis. New metrics can reuse already computed values from depending metrics.\n\n<a name=\"Metrics\"><\/a>\n### Metrics\n\n**py-motmetrics** implements the following metrics. The metrics have been aligned with what is reported by [MOTChallenge][MOTChallenge] benchmarks.\n\n```python\nimport motmetrics as mm\n# List all default metrics\nmh = mm.metrics.create()\nprint(mh.list_metrics_markdown())\n```\n\nName|Description\n:---|:---\nnum_frames|Total number of frames.\nobj_frequencies|Total number of occurrences of individual objects over all frames.\npred_frequencies|Total number of occurrences of individual predictions over all frames.\nnum_matches|Total number matches.\nnum_switches|Total number of track switches.\nnum_false_positives|Total number of false positives (false-alarms).\nnum_misses|Total number of misses.\nnum_detections|Total number of detected objects including matches and switches.\nnum_objects|Total number of unique object appearances over all frames.\nnum_predictions|Total number of unique prediction appearances over all frames.\nnum_unique_objects|Total number of unique object ids encountered.\ntrack_ratios|Ratio of assigned to total appearance count per unique object id.\nmostly_tracked|Number of objects tracked for at least 80 percent of lifespan.\npartially_tracked|Number of objects tracked between 20 and 80 percent of lifespan.\nmostly_lost|Number of objects tracked less than 20 percent of lifespan.\nnum_fragmentations|Total number of switches from tracked to not tracked.\nmotp|Multiple object tracker precision.\nmota|Multiple object tracker accuracy.\nprecision|Number of detected objects over sum of detected and false positives.\nrecall|Number of detections over number of objects.\nid_global_assignment|ID measures: Global min-cost assignment for ID measures.\nidfp|ID measures: Number of false positive matches after global min-cost matching.\nidfn|ID measures: Number of false negatives matches after global min-cost matching.\nidtp|ID measures: Number of true positives matches after global min-cost matching.\nidp|ID measures: global min-cost precision.\nidr|ID measures: global min-cost recall.\nidf1|ID measures: global min-cost F1 score.\n\n<a name=\"MOTChallengeCompatibility\"><\/a>\n### MOTChallenge compatibility\n\n**py-motmetrics** produces results compatible with popular [MOTChallenge][MOTChallenge] benchmarks. Below are two results taken from MOTChallenge [Matlab devkit][devkit] corresponding to the results of the CEM tracker on the training set of the 2015 MOT 2DMark.\n\n```\n\nTUD-Campus\n IDF1  IDP  IDR| Rcll  Prcn   FAR| GT  MT  PT  ML|   FP    FN  IDs   FM| MOTA  MOTP MOTAL \n 55.8 73.0 45.1| 58.2  94.1  0.18|  8   1   6   1|   13   150    7    7| 52.6  72.3  54.3\n\nTUD-Stadtmitte\n IDF1  IDP  IDR| Rcll  Prcn   FAR| GT  MT  PT  ML|   FP    FN  IDs   FM| MOTA  MOTP MOTAL \n 64.5 82.0 53.1| 60.9  94.0  0.25| 10   5   4   1|   45   452    7    6| 56.4  65.4  56.9\n\n```\n\nIn comparison to **py-motmetrics**\n\n```\n                IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP  FN IDs  FM  MOTA  MOTP\nTUD-Campus     55.8% 73.0% 45.1% 58.2% 94.1%  8  1  6  1 13 150   7   7 52.6% 0.277\nTUD-Stadtmitte 64.5% 82.0% 53.1% 60.9% 94.0% 10  5  4  1 45 452   7   6 56.4% 0.346\n```\n\nBesides naming conventions, the only obvious differences are\n- Metric `FAR` is missing. This metric is given implicitly and can be recovered by `FalsePos / Frames * 100`.\n- Metric `MOTP` seems to be off. To convert compute `(1 - MOTP) * 100`. [MOTChallenge][MOTChallenge] benchmarks compute `MOTP` as percentage, while **py-motmetrics** sticks to the original definition of average distance over number of assigned objects [[1]](#References).\n\nYou can compare tracker results to ground truth in MOTChallenge format by\n```\npython -m motmetrics.apps.eval_motchallenge --help\n```\n\n### Installation\n\n#### PyPi and development installs\n\nTo install **py-motmetrics** use `pip`\n\n```\npip install motmetrics\n```\n\nPython 3.5/3.6 and numpy, pandas and scipy is required. If no binary packages are available for your platform and building source packages fails, you might want to try a distribution like Conda (see below) to install dependencies.\n\nAlternatively for developing, clone or fork this repository and install in editing mode.\n\n```\npip install -e <path/to/setup.py>\n```\n\n#### Conda\nIn case you are using Conda, a simple way to run **py-motmetrics** is to create a virtual environment with all the necessary dependencies\n\n```\nconda env create -f environment.yml\n> activate motmetrics-env\n```\n\nThen activate / source the `motmetrics-env` and install **py-motmetrics** and run the tests.\n\n```\nactivate motmetrics-env\npip install .\npytest\n```\n\nIn case you already have an environment you install the dependencies from within your environment by\n\n```\nconda install --file requirements.txt\npip install .\npytest\n```\n\n### Usage\n\n#### Populating the accumulator\n\n```python\nimport motmetrics as mm\nimport numpy as np\n\n# Create an accumulator that will be updated during each frame\nacc = mm.MOTAccumulator(auto_id=True)\n\n# Call update once for per frame. For now, assume distances between\n# frame objects / hypotheses are given.\nacc.update(\n    ['a', 'b'],                 # Ground truth objects in this frame\n    [1, 2, 3],                  # Detector hypotheses in this frame\n    [\n        [0.1, np.nan, 0.3],     # Distances from object 'a' to hypotheses 1, 2, 3\n        [0.5,  0.2,   0.3]      # Distances from object 'b' to hypotheses 1, 2, 3\n    ]\n)\n```\n\nThe code above updates an event accumulator with data from a single frame. Here we assume that pairwise object / hypothesis distances have already been computed. Note `np.nan` inside the distance matrix. It signals that `a` cannot be paired with hypothesis `2`. To inspect the current event history simple print the events associated with the accumulator.\n\n```python\nprint(acc.events) # a pandas DataFrame containing all events\n\n\"\"\"\n                Type  OId HId    D\nFrameId Event\n0       0        RAW    a   1  0.1\n        1        RAW    a   2  NaN\n        2        RAW    a   3  0.3\n        3        RAW    b   1  0.5\n        4        RAW    b   2  0.2\n        5        RAW    b   3  0.3\n        6      MATCH    a   1  0.1\n        7      MATCH    b   2  0.2\n        8         FP  NaN   3  NaN\n\"\"\"\n```\n\nThe above data frame contains `RAW` and MOT events. To obtain just MOT events type\n\n```python\nprint(acc.mot_events) # a pandas DataFrame containing MOT only events\n\n\"\"\"\n                Type  OId HId    D\nFrameId Event\n0       6      MATCH    a   1  0.1\n        7      MATCH    b   2  0.2\n        8         FP  NaN   3  NaN\n\"\"\"\n```\n\nMeaning object `a` was matched to hypothesis `1` with distance 0.1. Similarily, `b` was matched to `2` with distance 0.2. Hypothesis `3` could not be matched to any remaining object and generated a false positive (FP). Possible assignments are computed by minimizing the total assignment distance (Kuhn-Munkres algorithm).\n\nContinuing from above\n\n```python\nframeid = acc.update(\n    ['a', 'b'],\n    [1],\n    [\n        [0.2], \n        [0.4]\n    ]\n)\nprint(acc.mot_events.loc[frameid])\n\n\"\"\"\n        Type OId  HId    D\nEvent\n2      MATCH   a    1  0.2\n3       MISS   b  NaN  NaN\n\"\"\"\n```\n\nWhile `a` was matched, `b` couldn't be matched because no hypotheses are left to pair with.\n\n```python\nframeid = acc.update(\n    ['a', 'b'],\n    [1, 3],\n    [\n        [0.6, 0.2],\n        [0.1, 0.6]\n    ]\n)\nprint(acc.mot_events.loc[frameid])\n\n\"\"\"\n         Type OId HId    D\nEvent\n4       MATCH   a   1  0.6\n5      SWITCH   b   3  0.6\n\"\"\"\n```\n\n`b` is now tracked by hypothesis `3` leading to a track switch. Note, although a pairing `(a, 3)` with cost less than 0.6 is possible, the algorithm prefers prefers to continue track assignments from past frames which is a property of MOT metrics. \n\n#### Computing metrics\nOnce the accumulator has been populated you can compute and display metrics. Continuing the example from above\n\n```python\nmh = mm.metrics.create()\nsummary = mh.compute(acc, metrics=['num_frames', 'mota', 'motp'], name='acc')\nprint(summary)\n\n\"\"\"\n     num_frames  mota  motp\nacc           3   0.5  0.34\n\"\"\"\n```\n\nComputing metrics for multiple accumulators or accumulator views is also possible\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]], \n    metrics=['num_frames', 'mota', 'motp'], \n    names=['full', 'part'])    \nprint(summary)\n\n\"\"\"\n      num_frames  mota      motp\nfull           3   0.5  0.340000\npart           2   0.5  0.166667\n\"\"\"\n```\n\nFinally, you may want to reformat column names and how column values are displayed. \n\n```python\nstrsummary = mm.io.render_summary(\n    summary, \n    formatters={'mota' : '{:.2%}'.format}, \n    namemap={'mota': 'MOTA', 'motp' : 'MOTP'}\n)\nprint(strsummary)\n\n\"\"\"\n      num_frames   MOTA      MOTP\nfull           3 50.00%  0.340000\npart           2 50.00%  0.166667 \n\"\"\"\n```\n\nFor MOTChallenge **py-motmetrics** provides predefined metric selectors, formatters and metric names, so that the result looks alike what is provided via their Matlab `devkit`.\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]], \n    metrics=mm.metrics.motchallenge_metrics, \n    names=['full', 'part'])\n\nstrsummary = mm.io.render_summary(\n    summary, \n    formatters=mh.formatters, \n    namemap=mm.io.motchallenge_metric_names\n)\nprint(strsummary)\n\n\"\"\"\n      IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP FN IDs  FM  MOTA  MOTP\nfull 83.3% 83.3% 83.3% 83.3% 83.3%  2  1  1  0  1  1   1   1 50.0% 0.340\npart 75.0% 75.0% 75.0% 75.0% 75.0%  2  1  1  0  1  1   0   0 50.0% 0.167\n\"\"\"\n```\n\nIn order to generate an overall summary that computes the metrics jointly over all accumulators add `generate_overall=True` as follows\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]], \n    metrics=mm.metrics.motchallenge_metrics, \n    names=['full', 'part'],\n    generate_overall=True\n    )\n\nstrsummary = mm.io.render_summary(\n    summary, \n    formatters=mh.formatters, \n    namemap=mm.io.motchallenge_metric_names\n)\nprint(strsummary)\n\n\"\"\"\n         IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP FN IDs  FM  MOTA  MOTP\nfull    83.3% 83.3% 83.3% 83.3% 83.3%  2  1  1  0  1  1   1   1 50.0% 0.340\npart    75.0% 75.0% 75.0% 75.0% 75.0%  2  1  1  0  1  1   0   0 50.0% 0.167\nOVERALL 80.0% 80.0% 80.0% 80.0% 80.0%  4  2  2  0  2  2   1   1 50.0% 0.275\n\"\"\"\n```\n\n#### Computing distances\nUp until this point we assumed the pairwise object/hypothesis distances to be known. Usually this is not the case. You are mostly given either rectangles or points (centroids) of related objects. To compute a distance matrix from them you can use `motmetrics.distance` module as shown below.\n\n##### Euclidean norm squared on points\n\n```python\n# Object related points\no = np.array([\n    [1., 2],\n    [2., 2],\n    [3., 2],\n])\n\n# Hypothesis related points\nh = np.array([\n    [0., 0],\n    [1., 1],      \n])\n\nC = mm.distances.norm2squared_matrix(o, h, max_d2=5.)\n\n\"\"\"\n[[  5.   1.]\n [ nan   2.]\n [ nan   5.]]\n\"\"\"\n```\n\n##### Intersection over union norm for 2D rectangles\n```python\na = np.array([\n    [0, 0, 20, 100],    # Format X, Y, Width, Height\n    [0, 0, 0.8, 1.5],\n])\n\nb = np.array([\n    [0, 0, 1, 2],\n    [0, 0, 1, 1],\n    [0.1, 0.2, 2, 2],\n])\nmm.distances.iou_matrix(a, b, max_iou=0.5)\n\n\"\"\"\n[[ 0.          0.5                nan]\n [ 0.4         0.42857143         nan]]\n\"\"\"\n```\n\n<a name=\"SolverBackends\"><\/a>\n#### Solver backends\nFor large datasets solving the minimum cost assignment becomes the dominant runtime part. **py-motmetrics** therefore supports these solvers out of the box\n  - `lapsolver` - https://github.com/cheind/py-lapsolver\n  - `lapjv` - https://github.com/gatagat/lap\n  - `scipy` - https://github.com/scipy/scipy/tree/master/scipy  \n  - `ortools` - https://github.com/google/or-tools\n  - `munkres` - http://software.clapper.org/munkres/\n\nA comparison for different sized matrices is shown below (taken from [here](https://github.com/cheind/py-lapsolver#benchmarks))\n\nPlease note that the x-axis is scaled logarithmically. Missing bars indicate excessive runtime or errors in returned result. \n![](https://github.com/cheind/py-lapsolver/raw/master/lapsolver/etc/benchmark-dtype-numpy.float32.png)\n\nBy default **py-motmetrics** will try to find a LAP solver in the order of the list above. In order to temporarly replace the default solver use\n\n```python\ncosts = ...\nmysolver = lambda x: ... # solver code that returns pairings\n\nwith lap.set_default_solver(mysolver): \n    ...\n```\n\n### Running tests\n**py-motmetrics** uses the pytest framework. To run the tests, simply `cd` into the source directly and run `pytest`.\n\n<a name=\"References\"><\/a>\n### References\n1. Bernardin, Keni, and Rainer Stiefelhagen. \"Evaluating multiple object tracking performance: the CLEAR MOT metrics.\" \nEURASIP Journal on Image and Video Processing 2008.1 (2008): 1-10.\n2. Milan, Anton, et al. \"Mot16: A benchmark for multi-object tracking.\" arXiv preprint arXiv:1603.00831 (2016).\n3. Li, Yuan, Chang Huang, and Ram Nevatia. \"Learning to associate: Hybridboosted multi-target tracker for crowded scene.\" \nComputer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009.\n4. Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking. E. Ristani, F. Solera, R. S. Zou, R. Cucchiara and C. Tomasi. ECCV 2016 Workshop on Benchmarking Multi-Target Tracking.\n\n### License\n\n```\nMIT License\n\nCopyright (c) 2017 Christoph Heindl\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n\n[Pandas]: http://pandas.pydata.org/\n[MOTChallenge]: https://motchallenge.net/\n[devkit]: https://motchallenge.net/devkit/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3BB8:3B1F3:186705:5EE58D:6AB92D39"},"text_sha256":"a9011fb3c18e4682d659510adb2a637321321c15ba05233162b15b1576eebb8b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1545","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0848:78367:1827E55:1C4FC23:6AB92D3A"},"commit":{"sha":"057504b5bc6c8e9b1ef336e76cb6adcfbd30f7b0","url":"https://github.com/cheind/py-motmetrics/commit/057504b5bc6c8e9b1ef336e76cb6adcfbd30f7b0","date":"2025-06-17T05:44:04Z","author_date":"2025-06-17T05:44:04Z","committer_date":"2025-06-17T05:44:04Z","tree_sha":"a899672eea8eb8d782b4fc9ce3d438bf19692716","message_first_line":"Hota bugs (#203)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1544","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:17ED8CA:1C152FB:6AB92D3A"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":25668,"blob_sha":"3c65ec2566783b647c7ff2b919b2137d540b84fd","priority":0}],"documents":[{"path":"Readme.md","size":25668,"blob_sha":"3c65ec2566783b647c7ff2b919b2137d540b84fd","priority":0,"status":200,"text":"[![PyPI version](https://badge.fury.io/py/motmetrics.svg)](https://badge.fury.io/py/motmetrics) [![Build Status](https://github.com/cheind/py-motmetrics/actions/workflows/python-package.yml/badge.svg)](https://github.com/cheind/py-motmetrics/actions/workflows/python-package.yml) [![DOI](https://zenodo.org/badge/87559569.svg)](https://doi.org/10.5281/zenodo.14014773)\n\n# py-motmetrics\n\nThe **py-motmetrics** library provides a Python implementation of metrics for benchmarking multiple object trackers (MOT).\n\nWhile benchmarking single object trackers is rather straightforward, measuring the performance of multiple object trackers needs careful design as multiple correspondence constellations can arise (see image below). A variety of methods have been proposed in the past and while there is no general agreement on a single method, the methods of [[1,2,3,4]](#References) have received considerable attention in recent years. **py-motmetrics** implements these [metrics](#Metrics).\n\n<div style=\"text-align:center;\">\n\n![](./motmetrics/etc/mot.png)<br/>\n\n_Pictures courtesy of Bernardin, Keni, and Rainer Stiefelhagen [[1]](#References)_\n\n<\/div>\n\nIn particular **py-motmetrics** supports `CLEAR-MOT`[[1,2]](#References) metrics and `ID`[[4]](#References) metrics. Both metrics attempt to find a minimum cost assignment between ground truth objects and predictions. However, while CLEAR-MOT solves the assignment problem on a local per-frame basis, `ID-MEASURE` solves the bipartite graph matching by finding the minimum cost of objects and predictions over all frames. This [blog-post](https://web.archive.org/web/20190413133409/http://vision.cs.duke.edu:80/DukeMTMC/IDmeasures.html) by Ergys illustrates the differences in more detail.\n\n## Features at a glance\n\n-   _Variety of metrics_ <br/>\n    Provides MOTA, MOTP, track quality measures, global ID measures and more. The results are [comparable](#MOTChallengeCompatibility) with the popular [MOTChallenge][motchallenge] benchmarks [(\\*1)](#asterixcompare).\n-   _Distance agnostic_ <br/>\n    Supports Euclidean, Intersection over Union and other distances measures.\n-   _Complete event history_ <br/>\n    Tracks all relevant per-frame events suchs as correspondences, misses, false alarms and switches.\n-   _Flexible solver backend_ <br/>\n    Support for switching minimum assignment cost solvers. Supports `scipy`, `ortools`, `munkres` out of the box. Auto-tunes solver selection based on [availability and problem size](#SolverBackends).\n-   _Easy to extend_ <br/>\n    Events and summaries are utilizing [pandas][pandas] for data structures and analysis. New metrics can reuse already computed values from depending metrics.\n\n<a name=\"Metrics\"><\/a>\n\n## Metrics\n\n**py-motmetrics** implements the following metrics. The metrics have been aligned with what is reported by [MOTChallenge][motchallenge] benchmarks.\n\n```python\nimport motmetrics as mm\n# List all default metrics\nmh = mm.metrics.create()\nprint(mh.list_metrics_markdown())\n```\n\n| Name                 | Description                                                                        |\n| :------------------- | :--------------------------------------------------------------------------------- |\n| num_frames           | Total number of frames.                                                            |\n| num_matches          | Total number matches.                                                              |\n| num_switches         | Total number of track switches.                                                    |\n| num_false_positives  | Total number of false positives (false-alarms).                                    |\n| num_misses           | Total number of misses.                                                            |\n| num_detections       | Total number of detected objects including matches and switches.                   |\n| num_objects          | Total number of unique object appearances over all frames.                         |\n| num_predictions      | Total number of unique prediction appearances over all frames.                     |\n| num_unique_objects   | Total number of unique object ids encountered.                                     |\n| mostly_tracked       | Number of objects tracked for at least 80 percent of lifespan.                     |\n| partially_tracked    | Number of objects tracked between 20 and 80 percent of lifespan.                   |\n| mostly_lost          | Number of objects tracked less than 20 percent of lifespan.                        |\n| num_fragmentations   | Total number of switches from tracked to not tracked.                              |\n| motp                 | Multiple object tracker precision.                                                 |\n| mota                 | Multiple object tracker accuracy.                                                  |\n| precision            | Number of detected objects over sum of detected and false positives.               |\n| recall               | Number of detections over number of objects.                                       |\n| idfp                 | ID measures: Number of false positive matches after global min-cost matching.      |\n| idfn                 | ID measures: Number of false negatives matches after global min-cost matching.     |\n| idtp                 | ID measures: Number of true positives matches after global min-cost matching.      |\n| idp                  | ID measures: global min-cost precision.                                            |\n| idr                  | ID measures: global min-cost recall.                                               |\n| idf1                 | ID measures: global min-cost F1 score.                                             |\n| obj_frequencies      | `pd.Series` Total number of occurrences of individual objects over all frames.     |\n| pred_frequencies     | `pd.Series` Total number of occurrences of individual predictions over all frames. |\n| track_ratios         | `pd.Series` Ratio of assigned to total appearance count per unique object id.      |\n| id_global_assignment | `dict` ID measures: Global min-cost assignment for ID measures.                    |\n| deta_alpha           | HOTA: Detection Accuracy (DetA) for a given threshold.                             |\n| assa_alpha           | HOTA: Association Accuracy (AssA) for a given threshold.                           |\n| hota_alpha           | HOTA: Higher Order Tracking Accuracy (HOTA) for a given threshold.                 |\n\n<a name=\"MOTChallengeCompatibility\"><\/a>\n\n## MOTChallenge compatibility\n\n**py-motmetrics** produces results compatible with popular [MOTChallenge][motchallenge] benchmarks [(\\*1)](#asterixcompare). Below are two results taken from MOTChallenge [Matlab devkit][devkit] corresponding to the results of the CEM tracker on the training set of the 2015 MOT 2DMark.\n\n```\n\nTUD-Campus\n IDF1  IDP  IDR| Rcll  Prcn   FAR| GT  MT  PT  ML|   FP    FN  IDs   FM| MOTA  MOTP MOTAL\n 55.8 73.0 45.1| 58.2  94.1  0.18|  8   1   6   1|   13   150    7    7| 52.6  72.3  54.3\n\nTUD-Stadtmitte\n IDF1  IDP  IDR| Rcll  Prcn   FAR| GT  MT  PT  ML|   FP    FN  IDs   FM| MOTA  MOTP MOTAL\n 64.5 82.0 53.1| 60.9  94.0  0.25| 10   5   4   1|   45   452    7    6| 56.4  65.4  56.9\n\n```\n\nIn comparison to **py-motmetrics**\n\n```\n                IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP  FN IDs  FM  MOTA  MOTP\nTUD-Campus     55.8% 73.0% 45.1% 58.2% 94.1%  8  1  6  1 13 150   7   7 52.6% 0.277\nTUD-Stadtmitte 64.5% 82.0% 53.1% 60.9% 94.0% 10  5  4  1 45 452   7   6 56.4% 0.346\n```\n\n<a name=\"asterixcompare\"><\/a>(\\*1) Besides naming conventions, the only obvious differences are\n\n-   Metric `FAR` is missing. This metric is given implicitly and can be recovered by `FalsePos / Frames * 100`.\n-   Metric `MOTP` seems to be off. To convert compute `(1 - MOTP) * 100`. [MOTChallenge][motchallenge] benchmarks compute `MOTP` as percentage, while **py-motmetrics** sticks to the original definition of average distance over number of assigned objects [[1]](#References).\n\nYou can compare tracker results to ground truth in MOTChallenge format by\n\n```\npython -m motmetrics.apps.eval_motchallenge --help\n```\n\nFor MOT16/17, you can run\n\n```\npython -m motmetrics.apps.evaluateTracking --help\n```\n\n## Installation\n\nTo install latest development version of **py-motmetrics** (usually a bit more recent than PyPi below)\n\n```\npip install git+https://github.com/cheind/py-motmetrics.git\n```\n\n### Install via PyPi\n\nTo install **py-motmetrics** use `pip`\n\n```\npip install motmetrics\n```\n\nPython 3.5/3.6/3.9 and numpy, pandas and scipy is required. If no binary packages are available for your platform and building source packages fails, you might want to try a distribution like Conda (see below) to install dependencies.\n\nAlternatively for developing, clone or fork this repository and install in editing mode.\n\n```\npip install -e <path/to/setup.py>\n```\n\n### Install via Conda\n\nIn case you are using Conda, a simple way to run **py-motmetrics** is to create a virtual environment with all the necessary dependencies\n\n```\nconda env create -f environment.yml\n> activate motmetrics-env\n```\n\nThen activate / source the `motmetrics-env` and install **py-motmetrics** and run the tests.\n\n```\nactivate motmetrics-env\npip install .\npytest\n```\n\nIn case you already have an environment you install the dependencies from within your environment by\n\n```\nconda install --file requirements.txt\npip install .\npytest\n```\n\n## Usage\n\n### Populating the accumulator\n\n```python\nimport motmetrics as mm\nimport numpy as np\n\n# Create an accumulator that will be updated during each frame\nacc = mm.MOTAccumulator(auto_id=True)\n\n# Call update once for per frame. For now, assume distances between\n# frame objects / hypotheses are given.\nacc.update(\n    [1, 2],                     # Ground truth objects in this frame\n    [1, 2, 3],                  # Detector hypotheses in this frame\n    [\n        [0.1, np.nan, 0.3],     # Distances from object 1 to hypotheses 1, 2, 3\n        [0.5,  0.2,   0.3]      # Distances from object 2 to hypotheses 1, 2, 3\n    ]\n)\n```\n\nThe code above updates an event accumulator with data from a single frame. Here we assume that pairwise object / hypothesis distances have already been computed. Note `np.nan` inside the distance matrix. It signals that object `1` cannot be paired with hypothesis `2`. To inspect the current event history simple print the events associated with the accumulator.\n\n```python\nprint(acc.events) # a pandas DataFrame containing all events\n\n\"\"\"\n                Type  OId HId    D\nFrameId Event\n0       0        RAW    1   1  0.1\n        1        RAW    1   2  NaN\n        2        RAW    1   3  0.3\n        3        RAW    2   1  0.5\n        4        RAW    2   2  0.2\n        5        RAW    2   3  0.3\n        6      MATCH    1   1  0.1\n        7      MATCH    2   2  0.2\n        8         FP  NaN   3  NaN\n\"\"\"\n```\n\nThe above data frame contains `RAW` and MOT events. To obtain just MOT events type\n\n```python\nprint(acc.mot_events) # a pandas DataFrame containing MOT only events\n\n\"\"\"\n                Type  OId HId    D\nFrameId Event\n0       6      MATCH    1   1  0.1\n        7      MATCH    2   2  0.2\n        8         FP  NaN   3  NaN\n\"\"\"\n```\n\nMeaning object `1` was matched to hypothesis `1` with distance 0.1. Similarily, object `2` was matched to hypothesis `2` with distance 0.2. Hypothesis `3` could not be matched to any remaining object and generated a false positive (FP). Possible assignments are computed by minimizing the total assignment distance (Kuhn-Munkres algorithm).\n\nContinuing from above\n\n```python\nframeid = acc.update(\n    [1, 2],\n    [1],\n    [\n        [0.2],\n        [0.4]\n    ]\n)\nprint(acc.mot_events.loc[frameid])\n\n\"\"\"\n        Type OId  HId    D\nEvent\n2      MATCH   1    1  0.2\n3       MISS   2  NaN  NaN\n\"\"\"\n```\n\nWhile object `1` was matched, object `2` couldn't be matched because no hypotheses are left to pair with.\n\n```python\nframeid = acc.update(\n    [1, 2],\n    [1, 3],\n    [\n        [0.6, 0.2],\n        [0.1, 0.6]\n    ]\n)\nprint(acc.mot_events.loc[frameid])\n\n\"\"\"\n         Type OId HId    D\nEvent\n4       MATCH   1   1  0.6\n5      SWITCH   2   3  0.6\n\"\"\"\n```\n\nObject `2` is now tracked by hypothesis `3` leading to a track switch. Note, although a pairing `(1, 3)` with cost less than 0.6 is possible, the algorithm prefers prefers to continue track assignments from past frames which is a property of MOT metrics.\n\n### Computing metrics\n\nOnce the accumulator has been populated you can compute and display metrics. Continuing the example from above\n\n```python\nmh = mm.metrics.create()\nsummary = mh.compute(acc, metrics=['num_frames', 'mota', 'motp'], name='acc')\nprint(summary)\n\n\"\"\"\n     num_frames  mota  motp\nacc           3   0.5  0.34\n\"\"\"\n```\n\nComputing metrics for multiple accumulators or accumulator views is also possible\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]],\n    metrics=['num_frames', 'mota', 'motp'],\n    names=['full', 'part'])\nprint(summary)\n\n\"\"\"\n      num_frames  mota      motp\nfull           3   0.5  0.340000\npart           2   0.5  0.166667\n\"\"\"\n```\n\nFinally, you may want to reformat column names and how column values are displayed.\n\n```python\nstrsummary = mm.io.render_summary(\n    summary,\n    formatters={'mota' : '{:.2%}'.format},\n    namemap={'mota': 'MOTA', 'motp' : 'MOTP'}\n)\nprint(strsummary)\n\n\"\"\"\n      num_frames   MOTA      MOTP\nfull           3 50.00%  0.340000\npart           2 50.00%  0.166667\n\"\"\"\n```\n\nFor MOTChallenge **py-motmetrics** provides predefined metric selectors, formatters and metric names, so that the result looks alike what is provided via their Matlab `devkit`.\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]],\n    metrics=mm.metrics.motchallenge_metrics,\n    names=['full', 'part'])\n\nstrsummary = mm.io.render_summary(\n    summary,\n    formatters=mh.formatters,\n    namemap=mm.io.motchallenge_metric_names\n)\nprint(strsummary)\n\n\"\"\"\n      IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP FN IDs  FM  MOTA  MOTP\nfull 83.3% 83.3% 83.3% 83.3% 83.3%  2  1  1  0  1  1   1   1 50.0% 0.340\npart 75.0% 75.0% 75.0% 75.0% 75.0%  2  1  1  0  1  1   0   0 50.0% 0.167\n\"\"\"\n```\n\nIn order to generate an overall summary that computes the metrics jointly over all accumulators add `generate_overall=True` as follows\n\n```python\nsummary = mh.compute_many(\n    [acc, acc.events.loc[0:1]],\n    metrics=mm.metrics.motchallenge_metrics,\n    names=['full', 'part'],\n    generate_overall=True\n    )\n\nstrsummary = mm.io.render_summary(\n    summary,\n    formatters=mh.formatters,\n    namemap=mm.io.motchallenge_metric_names\n)\nprint(strsummary)\n\n\"\"\"\n         IDF1   IDP   IDR  Rcll  Prcn GT MT PT ML FP FN IDs  FM  MOTA  MOTP\nfull    83.3% 83.3% 83.3% 83.3% 83.3%  2  1  1  0  1  1   1   1 50.0% 0.340\npart    75.0% 75.0% 75.0% 75.0% 75.0%  2  1  1  0  1  1   0   0 50.0% 0.167\nOVERALL 80.0% 80.0% 80.0% 80.0% 80.0%  4  2  2  0  2  2   1   1 50.0% 0.275\n\"\"\"\n```\n\n#### [Underdeveloped] Computing HOTA metrics\n\nComputing HOTA metrics is also possible. However, it cannot be used with the `Accumulator` class directly, as HOTA requires to computing a reweighting matrix from all the frames at the beginning. Here is an example of how to use it:\n\n```python\nimport os\nimport numpy as np\nimport motmetrics as mm\n\n\ndef compute_motchallenge(dir_name):\n    # `gt.txt` and `test.txt` should be prepared in MOT15 format\n    df_gt = mm.io.loadtxt(os.path.join(dir_name, \"gt.txt\"))\n    df_test = mm.io.loadtxt(os.path.join(dir_name, \"test.txt\"))\n    # Require different thresholds for matching\n    th_list = np.arange(0.05, 0.99, 0.05)\n    res_list = mm.utils.compare_to_groundtruth_reweighting(df_gt, df_test, \"iou\", distth=th_list)\n    return res_list\n\n# `data_dir` is the directory containing the gt.txt and test.txt files\nacc = compute_motchallenge(\"data_dir\")\nmh = mm.metrics.create()\n\nsummary = mh.compute_many(\n    acc,\n    metrics=[\n        \"deta_alpha\",\n        \"assa_alpha\",\n        \"hota_alpha\",\n    ],\n    generate_overall=True,  # `Overall` is the average we need only\n)\nstrsummary = mm.io.render_summary(\n    summary.iloc[[-1], :],  # Use list to preserve `DataFrame` type\n    formatters=mh.formatters,\n    namemap={\"hota_alpha\": \"HOTA\", \"assa_alpha\": \"ASSA\", \"deta_alpha\": \"DETA\"},\n)\nprint(strsummary)\n\"\"\"\n# data_dir=motmetrics/data/TUD-Campus\n         DETA  ASSA  HOTA\nOVERALL 41.8% 36.9% 39.1%\n# data_dir=motmetrics/data/TUD-Stadtmitte\n         DETA  ASSA  HOTA\nOVERALL 39.2% 40.9% 39.8%\n\"\"\"\n```\n\n### Computing distances\n\nUp until this point we assumed the pairwise object/hypothesis distances to be known. Usually this is not the case. You are mostly given either rectangles or points (centroids) of related objects. To compute a distance matrix from them you can use `motmetrics.distance` module as shown below.\n\n#### Euclidean norm squared on points\n\n```python\n# Object related points\no = np.array([\n    [1., 2],\n    [2., 2],\n    [3., 2],\n])\n\n# Hypothesis related points\nh = np.array([\n    [0., 0],\n    [1., 1],\n])\n\nC = mm.distances.norm2squared_matrix(o, h, max_d2=5.)\n\n\"\"\"\n[[  5.   1.]\n [ nan   2.]\n [ nan   5.]]\n\"\"\"\n```\n\n#### Intersection over union norm for 2D rectangles\n\n```python\na = np.array([\n    [0, 0, 1, 2],    # Format X, Y, Width, Height\n    [0, 0, 0.8, 1.5],\n])\n\nb = np.array([\n    [0, 0, 1, 2],\n    [0, 0, 1, 1],\n    [0.1, 0.2, 2, 2],\n])\nmm.distances.iou_matrix(a, b, max_iou=0.5)\n\n\"\"\"\n[[ 0.          0.5                nan]\n [ 0.4         0.42857143         nan]]\n\"\"\"\n```\n\n<a name=\"SolverBackends\"><\/a>\n\n### Solver backends\n\nFor large datasets solving the minimum cost assignment becomes the dominant runtime part. **py-motmetrics** therefore supports these solvers out of the box\n\n-   `lapsolver` - https://github.com/cheind/py-lapsolver\n-   `lapjv` - https://github.com/gatagat/lap\n-   `scipy` - https://github.com/scipy/scipy/tree/master/scipy\n-   `ortools<9.4` - https://github.com/google/or-tools\n-   `munkres` - http://software.clapper.org/munkres/\n\nA comparison for different sized matrices is shown below (taken from [here](https://github.com/cheind/py-lapsolver#benchmarks))\n\nPlease note that the x-axis is scaled logarithmically. Missing bars indicate excessive runtime or errors in returned result.\n![](https://github.com/cheind/py-lapsolver/raw/master/lapsolver/etc/benchmark-dtype-numpy.float32.png)\n\nBy default **py-motmetrics** will try to find a LAP solver in the order of the list above. In order to temporarly replace the default solver use\n\n```python\ncosts = ...\nmysolver = lambda x: ... # solver code that returns pairings\n\nwith lap.set_default_solver(mysolver):\n    ...\n```\n\n## For custom dataset\n\nUse this section as a guide for calculating MOT metrics for your custom dataset.\n\nBefore you begin, make sure to have Ground truth and your Tracker output data in the form of text files. The code below assumes MOT16 format for the ground truth as well as the tracker ouput. The data is arranged in the following sequence:\n\n````\n<frame number>, <object id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <confidence>, <x>, <y>, <z>\n````\n\nA sample ground truth/tracker output file is shown below. If you are using a custom dataset, then it is highly likely that you will have to create your own ground truth file. If you already have a MOT16 format ground truth file, you can use it directly otherwise, you will need a MOT16 annotator tool to create the annotations (ground truth). You can use any tool to create your ground truth data, just make sure it is as per MOT16 format.\n\nIf you can't find a tool to create your ground truth files, you can use this free MOT16 annotator [tool](https://github.com/khalidw/MOT16_Annotator) to create ground truth for your dataset which can then be used in conjunction with your tracker output to generate the MOT metrics.\n\n````\n1,1,763.00,272.00,189.00,38.00,1,-1,-1,-1\n1,2,412.00,265.00,153.00,30.00,1,-1,-1,-1\n2,1,762.00,269.00,185.00,41.00,1,-1,-1,-1\n2,2,413.00,267.00,151.00,26.00,1,-1,-1,-1\n3,1,760.00,272.00,186.00,38.00,1,-1,-1,-1\n````\n\nYou can read more about MOT16 format [here](https://arxiv.org/abs/1603.00831).\n\nFollowing function loads the ground truth and tracker object files, processes them and produces a set of metrices.\n\n```python\ndef motMetricsEnhancedCalculator(gtSource, tSource):\n  # import required packages\n  import motmetrics as mm\n  import numpy as np\n  \n  # load ground truth\n  gt = np.loadtxt(gtSource, delimiter=',')\n\n  # load tracking output\n  t = np.loadtxt(tSource, delimiter=',')\n\n  # Create an accumulator that will be updated during each frame\n  acc = mm.MOTAccumulator(auto_id=True)\n\n  # Max frame number maybe different for gt and t files\n  for frame in range(int(gt[:,0].max())):\n    frame += 1 # detection and frame numbers begin at 1\n\n    # select id, x, y, width, height for current frame\n    # required format for distance calculation is X, Y, Width, Height \\\n    # We already have this format\n    gt_dets = gt[gt[:,0]==frame,1:6] # select all detections in gt\n    t_dets = t[t[:,0]==frame,1:6] # select all detections in t\n\n    C = mm.distances.iou_matrix(gt_dets[:,1:], t_dets[:,1:], \\\n                                max_iou=0.5) # format: gt, t\n\n    # Call update once for per frame.\n    # format: gt object ids, t object ids, distance\n    acc.update(gt_dets[:,0].astype('int').tolist(), \\\n              t_dets[:,0].astype('int').tolist(), C)\n\n  mh = mm.metrics.create()\n\n  summary = mh.compute(acc, metrics=['num_frames', 'idf1', 'idp', 'idr', \\\n                                     'recall', 'precision', 'num_objects', \\\n                                     'mostly_tracked', 'partially_tracked', \\\n                                     'mostly_lost', 'num_false_positives', \\\n                                     'num_misses', 'num_switches', \\\n                                     'num_fragmentations', 'mota', 'motp' \\\n                                    ], \\\n                      name='acc')\n\n  strsummary = mm.io.render_summary(\n      summary,\n      #formatters={'mota' : '{:.2%}'.format},\n      namemap={'idf1': 'IDF1', 'idp': 'IDP', 'idr': 'IDR', 'recall': 'Rcll', \\\n               'precision': 'Prcn', 'num_objects': 'GT', \\\n               'mostly_tracked' : 'MT', 'partially_tracked': 'PT', \\\n               'mostly_lost' : 'ML', 'num_false_positives': 'FP', \\\n               'num_misses': 'FN', 'num_switches' : 'IDsw', \\\n               'num_fragmentations' : 'FM', 'mota': 'MOTA', 'motp' : 'MOTP',  \\\n              }\n  )\n  print(strsummary)\n```\n\nRun the function by pointing to the ground truth and tracker output file. A sample output is shown below.\n\n```python\n# Calculate the MOT metrics\nmotMetricsEnhancedCalculator('gt/groundtruth.txt', \\\n                             'to/trackeroutput.txt')\n\"\"\"\n     num_frames  IDF1       IDP       IDR      Rcll      Prcn   GT  MT  PT  ML  FP  FN  IDsw  FM      MOTA      MOTP\nacc         150  0.75  0.857143  0.666667  0.743295  0.955665  261   0   2   0   9  67     1  12  0.704981  0.244387\n\"\"\"\n```\n\n## Running tests\n\n**py-motmetrics** uses the pytest framework. To run the tests, simply `cd` into the source directly and run `pytest`.\n\n<a name=\"References\"><\/a>\n\n### References\n\n1. Bernardin, Keni, and Rainer Stiefelhagen. \"Evaluating multiple object tracking performance: the CLEAR MOT metrics.\"\n   EURASIP Journal on Image and Video Processing 2008.1 (2008): 1-10.\n2. Milan, Anton, et al. \"Mot16: A benchmark for multi-object tracking.\" arXiv preprint arXiv:1603.00831 (2016).\n3. Li, Yuan, Chang Huang, and Ram Nevatia. \"Learning to associate: Hybridboosted multi-target tracker for crowded scene.\"\n   Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009.\n4. Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking. E. Ristani, F. Solera, R. S. Zou, R. Cucchiara and C. Tomasi. ECCV 2016 Workshop on Benchmarking Multi-Target Tracking.\n\n## Docker\n\n### Update ground truth and test data:\n\n/data/train directory should contain MOT 2D 2015 Ground Truth files.\n/data/test directory should contain your results.\n\nYou can check usage and directory listing at\nhttps://github.com/cheind/py-motmetrics/blob/master/motmetrics/apps/eval_motchallenge.py\n\n### Build Image\n\ndocker build -t desired-image-name -f Dockerfile .\n\n### Run Image\n\ndocker run desired-image-name\n\n(credits to [christosavg](https://github.com/christosavg))\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2017-2022 Christoph Heindl\nCopyright (c) 2018 Toka\nCopyright (c) 2019-2022 Jack Valmadre\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n[pandas]: http://pandas.pydata.org/\n[motchallenge]: https://motchallenge.net/\n[devkit]: https://motchallenge.net/devkit/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DBBA:3BCC6:17E79F:5E655A:6AB92D3A"},"text_sha256":"4d5e52f155c89bb04065415e1f36e5ef1a7c3d50a3f15bfb21bf479b0c0fe6d1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"qfgaohao/pytorch-ssd","input_row":{"repository":"qfgaohao/pytorch-ssd","url":"https://github.com/qfgaohao/pytorch-ssd","name":"pytorch-ssd","owner":"qfgaohao","description":"MobileNetV1, MobileNetV2, VGG based SSD/SSD-lite implementation in Pytorch 1.0 / Pytorch 0.4. Out-of-box support for retraining on Open Images dataset. ONNX and Caffe2 support. Experiment Ideas like CoordConv.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1430,"issues":173,"created_at":"2018-05-18T04:56:09Z","updated_at":"2026-09-11T18:09:13Z","first_commit_at":"2018-05-18T05:16:10Z","last_commit_at":"2023-03-11T09:50:27Z","activity_months":57.759999999999998,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:35.935Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"qfgaohao/pytorch-ssd","visibility":"public","created_at":"2018-05-18T04:56:09Z","updated_at":"2026-09-11T18:09:13Z","private":false,"fork":false,"archived":false,"stargazers_count":1430,"open_issues_count":111,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1543","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0847:767EB:180BB50:1C3425F:6AB92D3B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1542","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:180BB8D:1C342A9:6AB92D3C"},"commit":{"sha":"3d554329ca8079b91f2b3625309a842871ac4402","url":"https://github.com/qfgaohao/pytorch-ssd/commit/3d554329ca8079b91f2b3625309a842871ac4402","date":"2018-05-24T06:26:45Z","author_date":"2018-05-24T06:26:45Z","committer_date":"2018-05-24T06:26:45Z","tree_sha":"de38e24090c740c75b8c18dbbfa4a457a627cf2f","message_first_line":"Merge branch 'master' of github.com:qfgaohao/pytorch-vision"},"tree_request_status":200,"tree_rate":{"github_remaining":"1541","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BA:71C58:17CF66C:1BF7A88:6AB92D3C"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1540","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0816:156040:17E8C9F:1C10420:6AB92D3D"},"commit":{"sha":"7a839cbc8c3fb39679856b4dc42a1ab19ec07581","url":"https://github.com/qfgaohao/pytorch-ssd/commit/7a839cbc8c3fb39679856b4dc42a1ab19ec07581","date":"2023-03-11T09:50:27Z","author_date":"2023-03-11T09:50:27Z","committer_date":"2023-03-11T09:50:27Z","tree_sha":"5290e0fa51f5bc0f5244610a2251b58aadfab938","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1539","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:17BDCD4:1BE5314:6AB92D3D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9948,"blob_sha":"4133195f749baadc75d52f8a5127aa1a966750ea","priority":0}],"documents":[{"path":"README.md","size":9948,"blob_sha":"4133195f749baadc75d52f8a5127aa1a966750ea","priority":0,"status":200,"text":"# Single Shot MultiBox Detector Implementation in Pytorch\n\nThis repo implements [SSD (Single Shot MultiBox Detector)](https://arxiv.org/abs/1512.02325). The implementation is heavily influenced by the projects [ssd.pytorch](https://github.com/amdegroot/ssd.pytorch) and [Detectron](https://github.com/facebookresearch/Detectron).\nThe design goal is modularity and extensibility.\n\nCurrently, it has MobileNetV1, MobileNetV2, and VGG based SSD/SSD-Lite implementations. \n\nIt also has out-of-box support for retraining on Google Open Images dataset.\n\n![Example of Mobile SSD](readme_ssd_example.jpg  \"Example of Mobile SSD(Courtesy of https://www.pexels.com/@mirit-assaf-299757 for the image.\")\n\n## Dependencies\n1. Python 3.6+\n2. OpenCV\n3. Pytorch 1.0 or Pytorch 0.4+\n4. Caffe2\n5. Pandas\n6. Boto3 if you want to train models on the Google OpenImages Dataset.\n\n## Download models\n\n**Please download the models and put them into the folder \"./models\". The following sections will need them.** URL: https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing\n\n## Run the demo\n### Run the live MobilenetV1 SSD demo\n\n```bash\n# If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_demo.py mb1-ssd models/mobilenet-v1-ssd-mp-0_675.pth models/voc-model-labels.txt \n```\n### Run the live demo in Caffe2\n\n```bash\n# If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_caffe2.py models/mobilenet-v1-ssd_init_net.pb models/mobilenet-v1-ssd_predict_net.pb models/voc-model-labels.txt \n```\n\nYou can see a decent speed boost by using Caffe2.\n\n### Run the live MobileNetV2 SSD Lite demo\n\n```bash\n# If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython run_ssd_live_demo.py mb2-ssd-lite models/mb2-ssd-lite-mp-0_686.pth models/voc-model-labels.txt \n```\n\nThe above MobileNetV2 SSD-Lite model is not ONNX-Compatible, as it uses Relu6 which is not supported by ONNX.\nThe code supports the ONNX-Compatible version. Once I have trained a good enough MobileNetV2 model with Relu, I will upload\nthe corresponding Pytorch and Caffe2 models.\n\nYou may notice MobileNetV2 SSD/SSD-Lite is slower than MobileNetV1 SSD/Lite on PC. However, MobileNetV2 is faster on mobile devices.\n\n## Pretrained Models\n\n### Mobilenet V1 SSD\n\nIf you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\n\nModel: mobilenet-v1-ssd-mp-0_675.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6742489426027927\nbicycle: 0.7913672875238116\nbird: 0.612096015101108\nboat: 0.5616407126931772\nbottle: 0.3471259064860268\nbus: 0.7742298893362103\ncar: 0.7284171192326804\ncat: 0.8360675520354323\nchair: 0.5142295855384792\ncow: 0.6244090341627014\ndiningtable: 0.7060035669312754\ndog: 0.7849252606216821\nhorse: 0.8202146617282785\nmotorbike: 0.793578272243471\nperson: 0.7042670984734087\npottedplant: 0.40257147509774405\nsheep: 0.6071252282334352\nsofa: 0.7549120254763918\ntrain: 0.8270992920206008\ntvmonitor: 0.6459903029666852\n\nAverage Precision Across All Classes:0.6755\n```\n\n### MobileNetV2 SSD-Lite\n\nIf you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\n\nModel: mb2-ssd-lite-mp-0_686.pth\n\n```\nAverage Precision Per-class:\naeroplane: 0.6973327307871002\nbicycle: 0.7823755921687233\nbird: 0.6342429230125619\nboat: 0.5478160937380846\nbottle: 0.3564069147093762\nbus: 0.7882037885117419\ncar: 0.7444122242934775\ncat: 0.8198865557991936\nchair: 0.5378973422880109\ncow: 0.6186076149254742\ndiningtable: 0.7369559500950861\ndog: 0.7848265495754562\nhorse: 0.8222948787839229\nmotorbike: 0.8057808854619948\nperson: 0.7176976451996411\npottedplant: 0.42802932547480066\nsheep: 0.6259124005994047\nsofa: 0.7840368059271103\ntrain: 0.8331588002612781\ntvmonitor: 0.6555051795079904\nAverage Precision Across All Classes:0.6860690100560214\n```\n\nThe code to re-produce the model:\n\n```bash\n# If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.\npython train_ssd.py --dataset_type voc  --datasets ~/data/VOC0712/VOC2007 ~/data/VOC0712/VOC2012 --validation_dataset ~/data/VOC0712/test/VOC2007/ --net mb2-ssd-lite --base_net models/mb2-imagenet-71_8.pth  --scheduler cosine --lr 0.01 --t_max 200 --validation_epochs 5 --num_epochs 200\n```\n\n### VGG SSD\n\nModel: vgg16-ssd-mp-0_7726.pth\n\n\n```\nAverage Precision Per-class:\naeroplane: 0.7957406334737802\nbicycle: 0.8305351156180996\nbird: 0.7570969203281721\nboat: 0.7043869846367731\nbottle: 0.5151666571756393\nbus: 0.8375121237865507\ncar: 0.8581508869699901\ncat: 0.8696185705648963\nchair: 0.6165431194526735\ncow: 0.8066422244852381\ndiningtable: 0.7629391213959706\ndog: 0.8444541531856452\nhorse: 0.8691922094815812\nmotorbike: 0.8496564646906418\nperson: 0.793785185549561\npottedplant: 0.5233462463152305\nsheep: 0.7786762429478917\nsofa: 0.8024887701948746\ntrain: 0.8713861172265407\ntvmonitor: 0.7650514925384194\nAverage Precision Across All Classes:0.7726184620009084\n```\n\nThe code to re-produce the model:\n\n```bash\nwget -P models https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\npython train_ssd.py --datasets ~/data/VOC0712/VOC2007/ ~/data/VOC0712/VOC2012/ --validation_dataset ~/data/VOC0712/test/VOC2007/ --net vgg16-ssd --base_net models/vgg16_reducedfc.pth  --batch_size 24 --num_epochs 200 --scheduler \"multi-step” —-milestones “120,160”\n```\n## Training\n\n```bash\npython train_ssd.py --datasets ~/data/VOC0712/VOC2007/ ~/data/VOC0712/VOC2012/ --validation_dataset ~/data/VOC0712/test/VOC2007/ --net mb1-ssd --base_net models/mobilenet_v1_with_relu_69_5.pth  --batch_size 24 --num_epochs 200 --scheduler cosine --lr 0.01 --t_max 200\n```\n\n\nThe dataset path is the parent directory of the folders: Annotations, ImageSets, JPEGImages, SegmentationClass and SegmentationObject. You can use multiple datasets to train.\n\n\n## Evaluation\n\n```bash\npython eval_ssd.py --net mb1-ssd  --dataset ~/data/VOC0712/test/VOC2007/ --trained_model models/mobilenet-v1-ssd-mp-0_675.pth --label_file models/voc-model-labels.txt \n```\n\n## Convert models to ONNX and Caffe2 models\n\n```bash\npython convert_to_caffe2_models.py mb1-ssd models/mobilenet-v1-ssd-mp-0_675.pth models/voc-model-labels.txt \n```\n\nThe converted models are models/mobilenet-v1-ssd.onnx, models/mobilenet-v1-ssd_init_net.pb and models/mobilenet-v1-ssd_predict_net.pb. The models in the format of pbtxt are also saved for reference.\n\n## Retrain on Open Images Dataset\n\nLet's we are building a model to detect guns for security purpose.\n\nBefore you start you can try the demo.\n\n```bash\npython run_ssd_example.py mb1-ssd models/gun_model_2.21.pth models/open-images-model-labels.txt ~/Downloads/big.JPG\n```\n\n![Example of Gun Detection](gun.jpg)\n\n\nIf you manage to get more annotated data, the accuracy could become much higher.\n\n### Download data\n\n```bash\npython open_images_downloader.py --root ~/data/open_images --class_names \"Handgun,Shotgun\" --num_workers 20\n```\n\nIt will download data into the folder ~/data/open_images.\n\nThe content of the data directory looks as follows.\n\n```\nclass-descriptions-boxable.csv       test                        validation\nsub-test-annotations-bbox.csv        test-annotations-bbox.csv   validation-annotations-bbox.csv\nsub-train-annotations-bbox.csv       train\nsub-validation-annotations-bbox.csv  train-annotations-bbox.csv\n```\n\nThe folders train, test, validation contain the images. The files like sub-train-annotations-bbox.csv \nis the annotation file.\n\n### Retrain\n\n```bash\npython train_ssd.py --dataset_type open_images --datasets ~/data/open_images --net mb1-ssd --pretrained_ssd models/mobilenet-v1-ssd-mp-0_675.pth --scheduler cosine --lr 0.01 --t_max 100 --validation_epochs 5 --num_epochs 100 --base_net_lr 0.001  --batch_size 5\n```\n\nYou can freeze the base net, or all the layers except the prediction heads. \n\n```\n  --freeze_base_net     Freeze base net layers.\n  --freeze_net          Freeze all the layers except the prediction head.\n```\n\nYou can also use different learning rates \nfor the base net, the extra layers and the prediction heads.\n\n```\n  --lr LR, --learning-rate LR\n  --base_net_lr BASE_NET_LR\n                        initial learning rate for base net.\n  --extra_layers_lr EXTRA_LAYERS_LR\n```\n\nAs subsets of open images data can be very unbalanced, it also provides\na handy option to roughly balance the data.\n\n```\n  --balance_data        Balance training data by down-sampling more frequent\n                        labels.\n```\n\n### Test on image\n\n```bash\npython run_ssd_example.py mb1-ssd models/mobilenet-v1-ssd-Epoch-99-Loss-2.2184619531035423.pth models/open-images-model-labels.txt ~/Downloads/gun.JPG\n```\n\n\n## ONNX Friendly VGG16 SSD\n\n! The model is not really ONNX-Friendly due the issue mentioned here \"https://github.com/qfgaohao/pytorch-ssd/issues/33#issuecomment-467533485\"\n\nThe Scaled L2 Norm Layer has been replaced with BatchNorm to make the net ONNX compatible.\n\n### Train\n\nThe pretrained based is borrowed from https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth .\n\n```bash\npython train_ssd.py --datasets ~/data/VOC0712/VOC2007/ ~/data/VOC0712/VOC2012/ --validation_dataset ~/data/VOC0712/test/VOC2007/ --net \"vgg16-ssd\" --base_net models/vgg16_reducedfc.pth  --batch_size 24 --num_epochs 150 --scheduler cosine --lr 0.0012 --t_max 150 --validation_epochs 5\n```\n\n### Eval\n\n```bash\npython eval_ssd.py --net vgg16-ssd  --dataset ~/data/VOC0712/test/VOC2007/ --trained_model models/vgg16-ssd-Epoch-115-Loss-2.819455094383535.pth --label_file models/voc-model-labels.txt\n```\n\n## TODO\n\n1. Resnet34 Based Model.\n2. BatchNorm Fusion.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:181215:5E8EFA:6AB92D3D"},"text_sha256":"4407568e58e4a3e2084e026a3f97fbcb1b7192216f79519d87806a5e1749ce7b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"madhawav/YOLO3-4-Py","input_row":{"repository":"madhawav/YOLO3-4-Py","url":"https://github.com/madhawav/YOLO3-4-Py","name":"YOLO3-4-Py","owner":"madhawav","description":"A Python wrapper on Darknet. Compatible with YOLO V3.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":510,"issues":125,"created_at":"2018-04-01T15:26:25Z","updated_at":"2026-07-14T00:15:24Z","first_commit_at":"2018-04-01T13:52:58Z","last_commit_at":"2021-11-27T23:26:55Z","activity_months":43.899999999999999,"ai_ml_match_topics":"object-detection","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:38.338Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"madhawav/YOLO3-4-Py","visibility":"public","created_at":"2018-04-01T15:26:25Z","updated_at":"2026-07-14T00:15:24Z","private":false,"fork":false,"archived":false,"stargazers_count":510,"open_issues_count":5,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1538","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17CF75E:1BF7B9C:6AB92D3E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1537","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:180B387:1C33352:6AB92D3E"},"commit":{"sha":"4e98c1b07e3723a32f892157bef2110f7666ccec","url":"https://github.com/madhawav/YOLO3-4-Py/commit/4e98c1b07e3723a32f892157bef2110f7666ccec","date":"2018-05-10T19:15:19Z","author_date":"2018-05-10T19:15:19Z","committer_date":"2018-05-10T19:15:19Z","tree_sha":"1c1fb1022b083d141d6f90f4828ad6beedd5cbf9","message_first_line":"Updated status image"},"tree_request_status":200,"tree_rate":{"github_remaining":"1536","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:182583B:1C4DBFC:6AB92D3F"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":3138,"blob_sha":"f6fb4ed2e0b138de4c631afaacb70db5b6347844","priority":0}],"documents":[{"path":"Readme.md","size":3138,"blob_sha":"f6fb4ed2e0b138de4c631afaacb70db5b6347844","priority":0,"status":200,"text":"# YOLO3-4-Py\n[![PyPI Badge](https://img.shields.io/badge/PyPI-0.1.0rc12-blue.svg)](https://pypi.org/project/yolo34py)\n[![PyPI Badge](https://img.shields.io/badge/PyPI-0.1.0rc12--gpu-blue.svg)](https://pypi.org/project/yolo34py-gpu)\n[![Build Status](https://travis-ci.org/madhawav/YOLO3-4-Py.svg?branch=master)](https://travis-ci.org/madhawav/YOLO3-4-Py)\n\nA Python wrapper on [Darknet](https://github.com/pjreddie/darknet). Compatible with latest [YOLO V3](https://pjreddie.com/darknet/yolo).\nYOLO 3.0 is a real-time Object Detector by [pjreddie](https://pjreddie.com/).\n\n![OutputImage](doc/output.jpg)\nImage source: http://absfreepic.com/free-photos/download/crowded-cars-on-street-4032x2272_48736.html\n\n## Pre-requisites\n1) Python 3.5\n2) Numpy `pip3 install numpy`\n3) Cython `pip3 install cython`\n4) Optionally, OpenCV 3.x with Python bindings. (Tested on OpenCV 3.4.0)\n    - You can use [this script](tools/install_opencv34.sh) to automate Open CV 3.4 installation (Tested on Ubuntu 16.04).\n    - Performance of this approach is better than not using OpenCV.\n    - Installations from PyPI distributions does not use OpenCV.\n```\nNOTE: OpenCV 3.4.1 has a bug which causes Darknet to fail. Therefore this wrapper would not work with OpenCV 3.4.1.\nMore details are available at https://github.com/pjreddie/darknet/issues/502\n```\n\n## Installation\nInstallation from PyPI distribution (as described below) is the most convenient approach if you intend to use yolo34py for your projects.\n\n### Installation of CPU Only Version\n```bash\npip3 install yolo34py\n```\n\n### Installation of GPU Accelerated Version\n```bash\npip3 install yolo34py-gpu\n```\n\n```\nNOTE: PyPI Deployments does not use OpenCV due to complexity involved in installation. \nTo get best performance, it is recommended to install from source with OpenCV enabled.\n```\n\n## How to demos in local machine?\n1) If you have not installed already, run `python3 setup.py build_ext --inplace` to install library locally.\n2) Download \"yolov3\" model file and config files using `sh download_models.sh`.\n3) Run `python3 webcam_demo.py`, `python3 video_demo.py` or `python3 image_demo.py`\n\n## How to run demo using docker?\n1) Navigate to [docker](/docker) directory.\n2) Copy sample images into the `input` directory. Or else run [input/download_sample_images.sh](docker/input/download_sample_images.sh)\n3) Run `sh run.sh`\n4) Observe the outputs generated in `output` directory.\n\n## Installation from Source\n1) Set environment variables\n - To enable GPU acceleration, `export GPU=1`.\n - To enable OpenCV, `export OPENCV=1`\n \n2) Navigate to source root and run `pip3 install .` to install library.\n\n### Using a custom version of Darknet\n1) Set environment variable DARKNET_HOME to download location of darknet.\n2) Add DARKNET_HOME to LD_LIBRARY_PATH. `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DARKNET_HOME`\n3) Continue instructions for _installation from source_.\n\n## Having trouble? \nKindly raise your issues in the issues section of GitHub repository.\n\n## Like to contribute?\nFeel free to send PRs or discuss on possible future improvements in issues section. \nYour contributions are most welcome!\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDD4:11E74B:17B41A:5E3139:6AB92D3D"},"text_sha256":"a101878364cc2d4a350ff4c8c805d859210feead4101494a2611265c07dd1d2c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1535","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:17BDE86:1BE54C4:6AB92D3F"},"commit":{"sha":"64e67bcb8d0e44ca56ac54166d6057530ec5cc9f","url":"https://github.com/madhawav/YOLO3-4-Py/commit/64e67bcb8d0e44ca56ac54166d6057530ec5cc9f","date":"2021-11-27T23:26:55Z","author_date":"2021-11-27T23:26:55Z","committer_date":"2021-11-27T23:26:55Z","tree_sha":"0164d250b7b5e71645cb1e0d28518ed02f42a307","message_first_line":"Merge pull request #141 from RemiLacroix-IDRIS/fix_cuda_home_check"},"tree_request_status":200,"tree_rate":{"github_remaining":"1534","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:17F37D2:1C1BDC6:6AB92D40"},"tree_truncated":false,"document_candidates":[{"path":"Readme.md","size":4166,"blob_sha":"42fa4315eeaf31126ef7f36e175091b490ccffe7","priority":0}],"documents":[{"path":"Readme.md","size":4166,"blob_sha":"42fa4315eeaf31126ef7f36e175091b490ccffe7","priority":0,"status":200,"text":"# YOLO3-4-Py\n[![PyPI Badge](https://img.shields.io/badge/PyPI-0.2.0-blue.svg)](https://pypi.org/project/yolo34py)\n[![PyPI Badge](https://img.shields.io/badge/PyPI-0.2.0--gpu-blue.svg)](https://pypi.org/project/yolo34py-gpu)\n[![Build Status](https://travis-ci.org/madhawav/YOLO3-4-Py.svg?branch=master)](https://travis-ci.org/madhawav/YOLO3-4-Py)\n\nA Python wrapper on [Darknet](https://github.com/pjreddie/darknet). Compatible with latest [YOLO V3](https://pjreddie.com/darknet/yolo).\nYOLO 3.0 is an Object Detector by [pjreddie](https://pjreddie.com/).\n\n![OutputImage](doc/output.jpg)\nImage source: http://absfreepic.com/free-photos/download/crowded-cars-on-street-4032x2272_48736.html\n\n## Google Colab Demo\nRefer the following link to preview YOLO3-4-Py in Google Colab: [[Google Colab](https://colab.research.google.com/drive/1DGzgpb8VR69EqSEb3bco6nSZQ_59eUZf?usp=sharing)]. \n\nCopy the notebook to your drive and run all cells. Ensure that you are in a GPU runtime. You can change the runtime by accessing the menu __Runtime__/__Change runtime type__.\n## What's New?\n* 2021-02-27 - Fixed the pkg-config related issue affecting some users of Ubuntu 20.04 and later.\n* 2020-06-18 - Added a sample Google Colab notebook demonstrating functionality.\n* 2019-01-15 - Added nvidia-docker support.\n* 2018-08-04 - Option to select the preferred GPU - `pydarknet.set_cuda_device(GPU_INDEX)`\n* 2018-04-23 - [PyPI Release of RC12](https://pypi.org/project/yolo34py-gpu)\n\n## Pre-requisites\n1) Python 3.5+\n2) Python3-Dev (For Ubuntu, `sudo apt-get install python3-dev`)\n3) Numpy `pip3 install numpy`\n4) Cython `pip3 install cython`\n5) Optionally, OpenCV 3.x with Python bindings. (Tested on OpenCV 3.4.0)\n    - You can use [this script](tools/install_opencv34.sh) to automate Open CV 3.4 installation (Tested on Ubuntu 16.04).\n    - Performance of this approach is better than not using OpenCV.\n    - Installations from PyPI distributions does not use OpenCV.\n```\nNOTE: OpenCV 3.4.1 has a bug which causes Darknet to fail. Therefore this wrapper would not work with OpenCV 3.4.1.\nMore details are available at https://github.com/pjreddie/darknet/issues/502\n```\n\n## Installation\nInstallation from PyPI distribution (as described below) is the most convenient approach if you intend to use yolo34py for your projects.\n\n### Installation of CPU Only Version\n```bash\npython3 -m pip install yolo34py\n```\n\n### Installation of GPU Accelerated Version\n```bash\npython3 -m pip install yolo34py-gpu\n```\n\n```\nNOTE: PyPI Deployments does not use OpenCV due to complexity involved in installation. \nTo get best performance, it is recommended to install from source with OpenCV enabled.\n```\n```\nNOTE: Make sure CUDA_HOME environment variable is set.\n```\n\n## How to run demos in local machine?\n1) If you have not installed already, run `python3 setup.py build_ext --inplace` to install library locally.\n2) Download \"yolov3\" model file and config files using `sh download_models.sh`.\n3) Run `python3 webcam_demo.py`, `python3 video_demo.py` or `python3 image_demo.py`\n\n## How to run demo using docker?\n1) Navigate to [docker](/docker) directory.\n2) Copy sample images into the `input` directory. Or else run [input/download_sample_images.sh](docker/input/download_sample_images.sh)\n3) Run `sh run.sh` or `sh run-gpu.sh`\n4) Observe the outputs generated in `output` directory.\n```\nGPU Version requires nvidia-docker\n```\n\n## Installation from Source\n1) Set environment variables\n - To enable GPU acceleration, `export GPU=1`.\n - To enable OpenCV, `export OPENCV=1`\n \n2) Navigate to `./src` and run `pip3 install .` to install library.\n\n### Using a custom version of Darknet\n1) Set environment variable DARKNET_HOME to download location of darknet.\n2) Add DARKNET_HOME to LD_LIBRARY_PATH. `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DARKNET_HOME`\n3) Continue instructions for _installation from source_.\n\n## Having trouble? \nKindly raise your issues in the issues section of GitHub repository.\n\n## Like to contribute?\nFeel free to send PRs or discuss on possible future improvements in issues section. \nYour contributions are most welcome!\n\n## Looking for YOLO v4?\nhttps://github.com/AlexeyAB/darknet\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"735A:7A4F8:18408A:5EBF5C:6AB92D3F"},"text_sha256":"a10689dc1f4a79c1338ccfac52c0013f0b06d532c7c2d5d58fd5494db4937cd9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hankcs/HanLP","input_row":{"repository":"hankcs/HanLP","url":"https://github.com/hankcs/HanLP","name":"HanLP","owner":"hankcs","description":"中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":36507,"issues":1424,"created_at":"2014-10-09T06:36:16Z","updated_at":"2026-09-27T00:00:02Z","first_commit_at":"2014-10-09T06:37:10Z","last_commit_at":"2026-09-15T06:49:59Z","activity_months":143.19999999999999,"ai_ml_match_topics":"natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:40.690Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hankcs/HanLP","visibility":"public","created_at":"2014-10-09T06:36:16Z","updated_at":"2026-09-27T00:00:02Z","private":false,"fork":false,"archived":false,"stargazers_count":36507,"open_issues_count":12,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1533","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17DCA7C:1C04173:6AB92D40"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1532","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E3:72BD3:1811FFF:1C3A0D1:6AB92D41"},"commit":{"sha":"746726b79d6f9500196c420e0dc52e8c142f9de5","url":"https://github.com/hankcs/HanLP/commit/746726b79d6f9500196c420e0dc52e8c142f9de5","date":"2018-05-24T02:36:46Z","author_date":"2018-05-24T02:36:46Z","committer_date":"2018-05-24T02:36:46Z","tree_sha":"88c1a87ea5a3e0db1a07c72cad5a29d553ebfbef","message_first_line":"Merge pull request #837 from linuxsong/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1531","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:180A52A:1C32918:6AB92D41"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":41875,"blob_sha":"ac5d3b23bb5fba3be3d2af32b6d4692d3c9897b2","priority":0}],"documents":[{"path":"README.md","size":41875,"blob_sha":"ac5d3b23bb5fba3be3d2af32b6d4692d3c9897b2","priority":0,"status":200,"text":"HanLP: Han Language Processing\n=====\n\n汉语言处理包\n[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/hankcs/hanlp/maven-metadata.xml.svg)](https://mvnrepository.com/artifact/com.hankcs/hanlp)\n[![GitHub release](https://img.shields.io/github/release/hankcs/HanLP.svg)](https://github.com/hankcs/hanlp/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Docker Stars](https://img.shields.io/docker/stars/samurais/hanlp-api.svg?maxAge=2592000)](https://hub.docker.com/r/samurais/hanlp-api/)\n\n------\n\n**HanLP**是由一系列模型与算法组成的NLP工具包，目标是普及自然语言处理在生产环境中的应用。**HanLP**具备功能完善、性能高效、架构清晰、语料时新、可自定义的特点。\n\n**HanLP**提供下列功能：\n\n* 中文分词\n    * HMM-Bigram（速度与精度最佳平衡；一百兆内存）\n        * [最短路分词](https://github.com/hankcs/HanLP#1-%E7%AC%AC%E4%B8%80%E4%B8%AAdemo)、[N-最短路分词](https://github.com/hankcs/HanLP#5-n-%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84%E5%88%86%E8%AF%8D)\n    * 由字构词（侧重精度，可识别新词；适合NLP任务）\n        * [感知机分词](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)、[CRF分词](https://github.com/hankcs/HanLP#6-crf%E5%88%86%E8%AF%8D)\n    * 词典分词（侧重速度，每秒数千万字符；省内存）\n        * [极速词典分词](https://github.com/hankcs/HanLP#7-%E6%9E%81%E9%80%9F%E8%AF%8D%E5%85%B8%E5%88%86%E8%AF%8D)\n    * 所有分词器都支持：\n        * [索引全切分模式](https://github.com/hankcs/HanLP#4-%E7%B4%A2%E5%BC%95%E5%88%86%E8%AF%8D)\n        * [用户自定义词典](https://github.com/hankcs/HanLP#8-%E7%94%A8%E6%88%B7%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%8D%E5%85%B8)\n        * [兼容繁体中文](https://github.com/hankcs/HanLP/blob/master/src/test/java/com/hankcs/demo/DemoPerceptronLexicalAnalyzer.java#L29)\n        * [训练用户自己的领域模型](https://github.com/hankcs/HanLP/wiki)\n* 词性标注\n    * [HMM词性标注](https://github.com/hankcs/HanLP/blob/master/src/main/java/com/hankcs/hanlp/seg/Segment.java#L584)（速度快）\n    * [感知机词性标注](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)、[CRF词性标注](https://github.com/hankcs/HanLP/wiki/CRF%E8%AF%8D%E6%B3%95%E5%88%86%E6%9E%90)（精度高）\n* 命名实体识别\n    * 基于HMM角色标注的命名实体识别 （速度快）\n        * [中国人名识别](https://github.com/hankcs/HanLP#9-%E4%B8%AD%E5%9B%BD%E4%BA%BA%E5%90%8D%E8%AF%86%E5%88%AB)、[音译人名识别](https://github.com/hankcs/HanLP#10-%E9%9F%B3%E8%AF%91%E4%BA%BA%E5%90%8D%E8%AF%86%E5%88%AB)、[日本人名识别](https://github.com/hankcs/HanLP#11-%E6%97%A5%E6%9C%AC%E4%BA%BA%E5%90%8D%E8%AF%86%E5%88%AB)、[地名识别](https://github.com/hankcs/HanLP#12-%E5%9C%B0%E5%90%8D%E8%AF%86%E5%88%AB)、[实体机构名识别](https://github.com/hankcs/HanLP#13-%E6%9C%BA%E6%9E%84%E5%90%8D%E8%AF%86%E5%88%AB)\n    * 基于线性模型的命名实体识别（精度高）\n        * [感知机命名实体识别](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)、[CRF命名实体识别](https://github.com/hankcs/HanLP/wiki/CRF%E8%AF%8D%E6%B3%95%E5%88%86%E6%9E%90)\n* 关键词提取\n    * [TextRank关键词提取](https://github.com/hankcs/HanLP#14-%E5%85%B3%E9%94%AE%E8%AF%8D%E6%8F%90%E5%8F%96)\n* 自动摘要\n    * [TextRank自动摘要](https://github.com/hankcs/HanLP#15-%E8%87%AA%E5%8A%A8%E6%91%98%E8%A6%81)\n* 短语提取\n    * [基于互信息和左右信息熵的短语提取](https://github.com/hankcs/HanLP#16-%E7%9F%AD%E8%AF%AD%E6%8F%90%E5%8F%96)\n* [拼音转换](https://github.com/hankcs/HanLP#17-%E6%8B%BC%E9%9F%B3%E8%BD%AC%E6%8D%A2)\n    * 多音字、声母、韵母、声调\n* [简繁转换](https://github.com/hankcs/HanLP#18-%E7%AE%80%E7%B9%81%E8%BD%AC%E6%8D%A2)\n    * 简繁分歧词（简体、繁体、臺灣正體、香港繁體）\n* [文本推荐](https://github.com/hankcs/HanLP#19-%E6%96%87%E6%9C%AC%E6%8E%A8%E8%8D%90)\n    * 语义推荐、拼音推荐、字词推荐\n* 依存句法分析\n    * [基于神经网络的高性能依存句法分析器](https://github.com/hankcs/HanLP#21-%E4%BE%9D%E5%AD%98%E5%8F%A5%E6%B3%95%E5%88%86%E6%9E%90)\n    * [MaxEnt依存句法分析](https://github.com/hankcs/HanLP/blob/master/src/main/java/com/hankcs/hanlp/dependency/MaxEntDependencyParser.java)\n* [文本分类](https://github.com/hankcs/HanLP/wiki/%E6%96%87%E6%9C%AC%E5%88%86%E7%B1%BB%E4%B8%8E%E6%83%85%E6%84%9F%E5%88%86%E6%9E%90)\n    * [情感分析](https://github.com/hankcs/HanLP/wiki/%E6%96%87%E6%9C%AC%E5%88%86%E7%B1%BB%E4%B8%8E%E6%83%85%E6%84%9F%E5%88%86%E6%9E%90#%E6%83%85%E6%84%9F%E5%88%86%E6%9E%90)\n* [word2vec](https://github.com/hankcs/HanLP/wiki/word2vec)\n    * 词向量训练、加载、词语相似度计算、语义运算、查询、KMeans聚类\n    * 文档语义相似度计算\n* 语料库工具\n\n在提供丰富功能的同时，**HanLP**内部模块坚持低耦合、模型坚持惰性加载、服务坚持静态提供、词典坚持明文发布，使用非常方便，同时自带一些语料处理工具，帮助用户训练自己的模型。\n\n------\n\n## 项目主页\n\n[在线演示](http://hanlp.hankcs.com/)、[Python调用](https://github.com/hankcs/pyhanlp)、[Solr及Lucene插件](https://github.com/hankcs/hanlp-lucene-plugin)、[国内下载](http://hanlp.dksou.com/HanLP.html)、[更多信息](https://github.com/hankcs/HanLP/wiki)。\n\n------\n\n## 下载与配置\n\n### 方式一、Maven\n\n为了方便用户，特提供内置了数据包的Portable版，只需在pom.xml加入：\n\n```\n<dependency>\n    <groupId>com.hankcs<\/groupId>\n    <artifactId>hanlp<\/artifactId>\n    <version>portable-1.6.4<\/version>\n<\/dependency>\n```\n\n零配置，即可使用基本功能（除由字构词、依存句法分析外的全部功能）。如果用户有自定义的需求，可以参考方式二，使用hanlp.properties进行配置。\n\n### 方式二、下载jar、data、hanlp.properties\n\n**HanLP**将数据与程序分离，给予用户自定义的自由。\n\n#### 1、下载：[data.zip](http://nlp.hankcs.com/download.php?file=data) \n\n下载后解压到任意目录，接下来通过配置文件告诉HanLP数据包的位置。\n\n**HanLP**中的数据分为*词典*和*模型*，其中*词典*是词法分析必需的，*模型*是句法分析必需的。\n\n    data\n    │\n    ├─dictionary\n    └─model\n\n用户可以自行增删替换，如果不需要句法分析等功能的话，随时可以删除model文件夹。\n\n- 模型跟词典没有绝对的区别，隐马模型被做成人人都可以编辑的词典形式，不代表它不是模型。\n- GitHub代码库中已经包含了data.zip中的词典，直接编译运行自动缓存即可；模型则需要额外下载。\n\n#### 2、下载jar和配置文件：[hanlp-release.zip](http://nlp.hankcs.com/download.php?file=jar)\n\n配置文件的作用是告诉HanLP数据包的位置，只需修改第一行\n\n    root=D:/JavaProjects/HanLP/\n\n为data的**父目录**即可，比如data目录是`/Users/hankcs/Documents/data`，那么`root=/Users/hankcs/Documents/` 。\n\n- 如果选用mini词典的话，则需要修改配置文件：\n```\nCoreDictionaryPath=data/dictionary/CoreNatureDictionary.mini.txt\nBiGramDictionaryPath=data/dictionary/CoreNatureDictionary.ngram.mini.txt\n```\n\n最后将`hanlp.properties`放入classpath即可，对于任何项目，都可以放到src或resources目录下，编译时IDE会自动将其复制到classpath中。\n\n如果放置不当，HanLP会提示当前环境下的合适路径，并且尝试从项目根目录读取数据集。\n\n## 调用方法\n\n**HanLP**几乎所有的功能都可以通过工具类`HanLP`快捷调用，当你想不起来调用方法时，只需键入`HanLP.`，IDE应当会给出提示，并展示**HanLP**完善的文档。\n\n所有Demo都位于[com.hankcs.demo](https://github.com/hankcs/HanLP/tree/master/src/test/java/com/hankcs/demo)下，比文档覆盖了更多细节，更新更及时，强烈建议运行一遍。\n\n### 1. 第一个Demo\n\n```java\nSystem.out.println(HanLP.segment(\"你好，欢迎使用HanLP汉语处理包！\"));\n```\n- 内存要求\n  * 内存120MB以上（-Xms120m -Xmx120m -Xmn64m），标准数据包（35万核心词库+默认用户词典），分词测试正常。全部词典和模型都是惰性加载的，不使用的模型相当于不存在，可以自由删除。\n  * **HanLP**对词典的数据结构进行了长期的优化，可以应对绝大多数场景。哪怕**HanLP**的词典上百兆也无需担心，因为在内存中被精心压缩过。如果内存非常有限，请使用小词典。**HanLP**默认使用大词典，同时提供小词典，请参考配置文件章节。\n- 写给正在编译**HanLP**的开发者\n  * 如果你正在编译运行从Github检出的**HanLP**代码，并且没有下载data缓存，那么首次加载词典/模型会发生一个*自动缓存*的过程。\n  * *自动缓存*的目的是为了加速词典载入速度，在下次载入时，缓存的词典文件会带来毫秒级的加载速度。由于词典体积很大，*自动缓存*会耗费一些时间，请耐心等待。\n  * *自动缓存*缓存的不是明文词典，而是双数组Trie树、DAWG、AhoCorasickDoubleArrayTrie等数据结构。\n\n### 2. 标准分词\n\n```java\nList<Term> termList = StandardTokenizer.segment(\"商品和服务\");\nSystem.out.println(termList);\n```\n- 说明\n  * **HanLP**中有一系列“开箱即用”的静态分词器，以`Tokenizer`结尾，在接下来的例子中会继续介绍。\n  * `HanLP.segment`其实是对`StandardTokenizer.segment`的包装。\n  * 分词结果包含词性，每个词性的意思请查阅[《HanLP词性标注集》](http://www.hankcs.com/nlp/part-of-speech-tagging.html#h2-8)。\n- 算法详解\n  * [《词图的生成》](http://www.hankcs.com/nlp/segment/the-word-graph-is-generated.html)\n\n### 3. NLP分词\n\n```java\nSystem.out.println(NLPTokenizer.segment(\"我新造一个词叫幻想乡你能识别并标注正确词性吗？\"));\n// 注意观察下面两个“希望”的词性、两个“晚霞”的词性\nSystem.out.println(NLPTokenizer.analyze(\"我的希望是希望张晚霞的背影被晚霞映红\").translateLabels());\nSystem.out.println(NLPTokenizer.analyze(\"支援臺灣正體香港繁體：微软公司於1975年由比爾·蓋茲和保羅·艾倫創立。\"));\n```\n- 说明\n  * NLP分词`NLPTokenizer`会执行全部命名实体识别和词性标注。\n  * 欢迎用户在自己的语料上[训练新模型](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)以适应新领域、识别新的命名实体。\n\n### 4. 索引分词\n\n```java\nList<Term> termList = IndexTokenizer.segment(\"主副食品\");\nfor (Term term : termList)\n{\n    System.out.println(term + \" [\" + term.offset + \":\" + (term.offset + term.word.length()) + \"]\");\n}\n```\n- 说明\n  * 索引分词`IndexTokenizer`是面向搜索引擎的分词器，能够对长词全切分，另外通过`term.offset`可以获取单词在文本中的偏移量。\n  * 任何分词器都可以通过基类`Segment`的`enableIndexMode`方法激活索引模式。\n\n### 5. N-最短路径分词\n\n```java\nSegment nShortSegment = new NShortSegment().enableCustomDictionary(false).enablePlaceRecognize(true).enableOrganizationRecognize(true);\nSegment shortestSegment = new DijkstraSegment().enableCustomDictionary(false).enablePlaceRecognize(true).enableOrganizationRecognize(true);\nString[] testCase = new String[]{\n        \"今天，刘志军案的关键人物,山西女商人丁书苗在市二中院出庭受审。\",\n        \"刘喜杰石国祥会见吴亚琴先进事迹报告团成员\",\n        };\nfor (String sentence : testCase)\n{\n    System.out.println(\"N-最短分词：\" + nShortSegment.seg(sentence) + \"\\n最短路分词：\" + shortestSegment.seg(sentence));\n}\n```\n- 说明\n  * N最短路分词器`NShortSegment`比最短路分词器慢，但是效果稍微好一些，对命名实体识别能力更强。\n  * 一般场景下最短路分词的精度已经足够，而且速度比N最短路分词器快几倍，请酌情选择。\n- 算法详解\n  * [《N最短路径的Java实现与分词应用》](http://www.hankcs.com/nlp/segment/n-shortest-path-to-the-java-implementation-and-application-segmentation.html)\n\n### 6. CRF分词\n\n```java\nSegment segment = new CRFSegment();\nsegment.enablePartOfSpeechTagging(true);\nList<Term> termList = segment.seg(\"你看过穆赫兰道吗\");\nSystem.out.println(termList);\nfor (Term term : termList)\n{\n    if (term.nature == null)\n    {\n        System.out.println(\"识别到新词：\" + term.word);\n    }\n}\n```\n- 说明\n  * CRF对新词有很好的识别能力，但是开销较大。\n- 算法详解\n  * [《CRF分词的纯Java实现》](http://www.hankcs.com/nlp/segment/crf-segmentation-of-the-pure-java-implementation.html)\n  * [《CRF++模型格式说明》](http://www.hankcs.com/nlp/the-crf-model-format-description.html)\n\n### 7. 极速词典分词\n\n```java\n/**\n * 演示极速分词，基于AhoCorasickDoubleArrayTrie实现的词典分词，适用于“高吞吐量”“精度一般”的场合\n * @author hankcs\n */\npublic class DemoHighSpeedSegment\n{\n    public static void main(String[] args)\n    {\n        String text = \"江西鄱阳湖干枯，中国最大淡水湖变成大草原\";\n        System.out.println(SpeedTokenizer.segment(text));\n        long start = System.currentTimeMillis();\n        int pressure = 1000000;\n        for (int i = 0; i < pressure; ++i)\n        {\n            SpeedTokenizer.segment(text);\n        }\n        double costTime = (System.currentTimeMillis() - start) / (double)1000;\n        System.out.printf(\"分词速度：%.2f字每秒\", text.length() * pressure / costTime);\n    }\n}\n```\n- 说明\n  * 极速分词是词典最长分词，速度极其快，精度一般。\n  * 在i7-6700K上跑出了4500万字每秒的速度。\n- 算法详解\n  * [《Aho Corasick自动机结合DoubleArrayTrie极速多模式匹配》](http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html)\n\n### 8. 用户自定义词典\n\n```java\n/**\n * 演示用户词典的动态增删\n *\n * @author hankcs\n */\npublic class DemoCustomDictionary\n{\n    public static void main(String[] args)\n    {\n        // 动态增加\n        CustomDictionary.add(\"攻城狮\");\n        // 强行插入\n        CustomDictionary.insert(\"白富美\", \"nz 1024\");\n        // 删除词语（注释掉试试）\n//        CustomDictionary.remove(\"攻城狮\");\n        System.out.println(CustomDictionary.add(\"单身狗\", \"nz 1024 n 1\"));\n        System.out.println(CustomDictionary.get(\"单身狗\"));\n\n        String text = \"攻城狮逆袭单身狗，迎娶白富美，走上人生巅峰\";  // 怎么可能噗哈哈！\n\n        // AhoCorasickDoubleArrayTrie自动机扫描文本中出现的自定义词语\n        final char[] charArray = text.toCharArray();\n        CustomDictionary.parseText(charArray, new AhoCorasickDoubleArrayTrie.IHit<CoreDictionary.Attribute>()\n        {\n            @Override\n            public void hit(int begin, int end, CoreDictionary.Attribute value)\n            {\n                System.out.printf(\"[%d:%d]=%s %s\\n\", begin, end, new String(charArray, begin, end - begin), value);\n            }\n        });\n\n        // 自定义词典在所有分词器中都有效\n        System.out.println(HanLP.segment(text));\n    }\n}\n```\n- 说明\n  * `CustomDictionary`是一份全局的用户自定义词典，可以随时增删，影响全部分词器。\n  * 另外可以在任何分词器中关闭它。通过代码动态增删不会保存到词典文件。\n- 追加词典\n  * `CustomDictionary`主词典文本路径是`data/dictionary/custom/CustomDictionary.txt`，用户可以在此增加自己的词语（不推荐）；也可以单独新建一个文本文件，通过配置文件`CustomDictionaryPath=data/dictionary/custom/CustomDictionary.txt; 我的词典.txt;`来追加词典（推荐）。\n  * 始终建议将相同词性的词语放到同一个词典文件里，便于维护和分享。\n- 词典格式\n  * 每一行代表一个单词，格式遵从`[单词] [词性A] [A的频次] [词性B] [B的频次] ...` 如果不填词性则表示采用词典的默认词性。\n  * 词典的默认词性默认是名词n，可以通过配置文件修改：`全国地名大全.txt ns;`如果词典路径后面空格紧接着词性，则该词典默认是该词性。\n  * 在统计分词中，并不保证自定义词典中的词一定被切分出来。用户可在理解后果的情况下通过`Segment#enableCustomDictionaryForcing`强制生效。\n  * 关于用户词典的更多信息请参考**词典说明**一章。\n- 算法详解\n  * [《Trie树分词》](http://www.hankcs.com/program/java/tire-tree-participle.html)\n  * [《Aho Corasick自动机结合DoubleArrayTrie极速多模式匹配》](http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html)\n\n### 9. 中国人名识别\n\n```java\nString[] testCase = new String[]{\n        \"签约仪式前，秦光荣、李纪恒、仇和等一同会见了参加签约的企业家。\",\n        \"王国强、高峰、汪洋、张朝阳光着头、韩寒、小四\",\n        \"张浩和胡健康复员回家了\",\n        \"王总和小丽结婚了\",\n        \"编剧邵钧林和稽道青说\",\n        \"这里有关天培的有关事迹\",\n        \"龚学平等领导,邓颖超生前\",\n        };\nSegment segment = HanLP.newSegment().enableNameRecognize(true);\nfor (String sentence : testCase)\n{\n    List<Term> termList = segment.seg(sentence);\n    System.out.println(termList);\n}\n```\n- 说明\n  * 目前分词器基本上都默认开启了中国人名识别，比如`HanLP.segment()`接口中使用的分词器等等，用户不必手动开启；上面的代码只是为了强调。\n  * 有一定的误命中率，比如误命中`关键年`，则可以通过在`data/dictionary/person/nr.txt`加入一条`关键年 A 1`来排除`关键年`作为人名的可能性，也可以将`关键年`作为新词登记到自定义词典中。\n  * 如果你通过上述办法解决了问题，欢迎向我提交pull request，词典也是宝贵的财富。\n  * 建议NLP用户使用感知机或CRF词法分析器，精度更高。\n- 算法详解\n  * [《实战HMM-Viterbi角色标注中国人名识别》](http://www.hankcs.com/nlp/chinese-name-recognition-in-actual-hmm-viterbi-role-labeling.html)\n\n### 10. 音译人名识别\n\n```java\nString[] testCase = new String[]{\n                \"一桶冰水当头倒下，微软的比尔盖茨、Facebook的扎克伯格跟桑德博格、亚马逊的贝索斯、苹果的库克全都不惜湿身入镜，这些硅谷的科技人，飞蛾扑火似地牺牲演出，其实全为了慈善。\",\n                \"世界上最长的姓名是简森·乔伊·亚历山大·比基·卡利斯勒·达夫·埃利奥特·福克斯·伊维鲁莫·马尔尼·梅尔斯·帕特森·汤普森·华莱士·普雷斯顿。\",\n        };\nSegment segment = HanLP.newSegment().enableTranslatedNameRecognize(true);\nfor (String sentence : testCase)\n{\n    List<Term> termList = segment.seg(sentence);\n    System.out.println(termList);\n}\n```\n- 说明\n  * 目前分词器基本上都默认开启了音译人名识别，用户不必手动开启；上面的代码只是为了强调。\n- 算法详解\n  * [《层叠隐马模型下的音译人名和日本人名识别》](http://www.hankcs.com/nlp/name-transliteration-cascaded-hidden-markov-model-and-japanese-personal-names-recognition.html)\n\n### 11. 日本人名识别\n\n```java\nString[] testCase = new String[]{\n        \"北川景子参演了林诣彬导演的《速度与激情3》\",\n        \"林志玲亮相网友:确定不是波多野结衣？\",\n};\nSegment segment = HanLP.newSegment().enableJapaneseNameRecognize(true);\nfor (String sentence : testCase)\n{\n    List<Term> termList = segment.seg(sentence);\n    System.out.println(termList);\n}\n```\n- 说明\n  * 目前标准分词器默认关闭了日本人名识别，用户需要手动开启；这是因为日本人名的出现频率较低，但是又消耗性能。\n- 算法详解\n  * [《层叠隐马模型下的音译人名和日本人名识别》](http://www.hankcs.com/nlp/name-transliteration-cascaded-hidden-markov-model-and-japanese-personal-names-recognition.html)\n\n### 12. 地名识别\n\n```java\nString[] testCase = new String[]{\n        \"武胜县新学乡政府大楼门前锣鼓喧天\",\n        \"蓝翔给宁夏固原市彭阳县红河镇黑牛沟村捐赠了挖掘机\",\n};\nSegment segment = HanLP.newSegment().enablePlaceRecognize(true);\nfor (String sentence : testCase)\n{\n    List<Term> termList = segment.seg(sentence);\n    System.out.println(termList);\n}\n```\n- 说明\n  * 目前标准分词器都默认关闭了地名识别，用户需要手动开启；这是因为消耗性能，其实多数地名都收录在核心词典和用户自定义词典中。\n  * 在生产环境中，能靠词典解决的问题就靠词典解决，这是最高效稳定的方法。\n  * 建议对命名实体识别要求较高的用户使用[感知机词法分析器](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)。\n- 算法详解\n  * [《实战HMM-Viterbi角色标注地名识别》](http://www.hankcs.com/nlp/ner/place-names-to-identify-actual-hmm-viterbi-role-labeling.html)\n\n### 13. 机构名识别\n\n```java\nString[] testCase = new String[]{\n    \"我在上海林原科技有限公司兼职工作，\",\n    \"我经常在台川喜宴餐厅吃饭，\",\n    \"偶尔去地中海影城看电影。\",\n};\nSegment segment = HanLP.newSegment().enableOrganizationRecognize(true);\nfor (String sentence : testCase)\n{\n    List<Term> termList = segment.seg(sentence);\n    System.out.println(termList);\n}\n```\n- 说明\n  * 目前分词器默认关闭了机构名识别，用户需要手动开启；这是因为消耗性能，其实常用机构名都收录在核心词典和用户自定义词典中。\n  * HanLP的目的不是演示动态识别，在生产环境中，能靠词典解决的问题就靠词典解决，这是最高效稳定的方法。\n  * 建议对命名实体识别要求较高的用户使用[感知机词法分析器](https://github.com/hankcs/HanLP/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E6%84%9F%E7%9F%A5%E6%9C%BA%E6%A0%87%E6%B3%A8%E6%A1%86%E6%9E%B6)。\n- 算法详解\n  * [《层叠HMM-Viterbi角色标注模型下的机构名识别》](http://www.hankcs.com/nlp/ner/place-name-recognition-model-of-the-stacked-hmm-viterbi-role-labeling.html)\n\n### 14. 关键词提取\n\n```java\nString content = \"程序员(英文Programmer)是从事程序开发、维护的专业人员。一般将程序员分为程序设计人员和程序编码人员，但两者的界限并不非常清楚，特别是在中国。软件从业人员分为初级程序员、高级程序员、系统分析员和项目经理四大类。\";\nList<String> keywordList = HanLP.extractKeyword(content, 5);\nSystem.out.println(keywordList);\n```\n- 说明\n  * 内部采用`TextRankKeyword`实现，用户可以直接调用`TextRankKeyword.getKeywordList(document, size)`\n- 算法详解\n  * [《TextRank算法提取关键词的Java实现》](http://www.hankcs.com/nlp/textrank-algorithm-to-extract-the-keywords-java-implementation.html)\n\n### 15. 自动摘要\n\n```java\nString document = \"算法可大致分为基本算法、数据结构的算法、数论算法、计算几何的算法、图的算法、动态规划以及数值分析、加密算法、排序算法、检索算法、随机化算法、并行算法、厄米变形模型、随机森林算法。\\n\" +\n        \"算法可以宽泛的分为三类，\\n\" +\n        \"一，有限的确定性算法，这类算法在有限的一段时间内终止。他们可能要花很长时间来执行指定的任务，但仍将在一定的时间内终止。这类算法得出的结果常取决于输入值。\\n\" +\n        \"二，有限的非确定算法，这类算法在有限的时间内终止。然而，对于一个（或一些）给定的数值，算法的结果并不是唯一的或确定的。\\n\" +\n        \"三，无限的算法，是那些由于没有定义终止定义条件，或定义的条件无法由输入的数据满足而不终止运行的算法。通常，无限算法的产生是由于未能确定的定义终止条件。\";\nList<String> sentenceList = HanLP.extractSummary(document, 3);\nSystem.out.println(sentenceList);\n```\n- 说明\n  * 内部采用`TextRankSentence`实现，用户可以直接调用`TextRankSentence.getTopSentenceList(document, size)`。\n- 算法详解\n  * [《TextRank算法自动摘要的Java实现》](http://www.hankcs.com/nlp/textrank-algorithm-java-implementation-of-automatic-abstract.html)\n\n### 16. 短语提取\n\n```java\nString text = \"算法工程师\\n\" +\n                \"算法（Algorithm）是一系列解决问题的清晰指令，也就是说，能够对一定规范的输入，在有限时间内获得所要求的输出。如果一个算法有缺陷，或不适合于某个问题，执行这个算法将不会解决这个问题。不同的算法可能用不同的时间、空间或效率来完成同样的任务。一个算法的优劣可以用空间复杂度与时间复杂度来衡量。算法工程师就是利用算法处理事物的人。\\n\" +\n                \"\\n\" +\n                \"1职位简介\\n\" +\n                \"算法工程师是一个非常高端的职位；\\n\" +\n                \"专业要求：计算机、电子、通信、数学等相关专业；\\n\" +\n                \"学历要求：本科及其以上的学历，大多数是硕士学历及其以上；\\n\" +\n                \"语言要求：英语要求是熟练，基本上能阅读国外专业书刊；\\n\" +\n                \"必须掌握计算机相关知识，熟练使用仿真工具MATLAB等，必须会一门编程语言。\\n\" +\n                \"\\n\" +\n                \"2研究方向\\n\" +\n                \"视频算法工程师、图像处理算法工程师、音频算法工程师 通信基带算法工程师\\n\" +\n                \"\\n\" +\n                \"3目前国内外状况\\n\" +\n                \"目前国内从事算法研究的工程师不少，但是高级算法工程师却很少，是一个非常紧缺的专业工程师。算法工程师根据研究领域来分主要有音频/视频算法处理、图像技术方面的二维信息算法处理和通信物理层、雷达信号处理、生物医学信号处理等领域的一维信息算法处理。\\n\" +\n                \"在计算机音视频和图形图像技术等二维信息算法处理方面目前比较先进的视频处理算法：机器视觉成为此类算法研究的核心；另外还有2D转3D算法(2D-to-3D conversion)，去隔行算法(de-interlacing)，运动估计运动补偿算法(Motion estimation/Motion Compensation)，去噪算法(Noise Reduction)，缩放算法(scaling)，锐化处理算法(Sharpness)，超分辨率算法(Super Resolution),手势识别(gesture recognition),人脸识别(face recognition)。\\n\" +\n                \"在通信物理层等一维信息领域目前常用的算法：无线领域的RRM、RTT，传送领域的调制解调、信道均衡、信号检测、网络优化、信号分解等。\\n\" +\n                \"另外数据挖掘、互联网搜索算法也成为当今的热门方向。\\n\" +\n                \"算法工程师逐渐往人工智能方向发展。\";\nList<String> phraseList = HanLP.extractPhrase(text, 10);\nSystem.out.println(phraseList);\n```\n- 说明\n  * 内部采用`MutualInformationEntropyPhraseExtractor`实现，用户可以直接调用`MutualInformationEntropyPhraseExtractor.extractPhrase(text, size)`。\n- 算法详解\n  * [《基于互信息和左右信息熵的短语提取识别》](http://www.hankcs.com/nlp/extraction-and-identification-of-mutual-information-about-the-phrase-based-on-information-entropy.html)\n\n### 17. 拼音转换\n\n```java\n/**\n * 汉字转拼音\n * @author hankcs\n */\npublic class DemoPinyin\n{\n    public static void main(String[] args)\n    {\n        String text = \"重载不是重任\";\n        List<Pinyin> pinyinList = HanLP.convertToPinyinList(text);\n        System.out.print(\"原文,\");\n        for (char c : text.toCharArray())\n        {\n            System.out.printf(\"%c,\", c);\n        }\n        System.out.println();\n\n        System.out.print(\"拼音（数字音调）,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin);\n        }\n        System.out.println();\n\n        System.out.print(\"拼音（符号音调）,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getPinyinWithToneMark());\n        }\n        System.out.println();\n\n        System.out.print(\"拼音（无音调）,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getPinyinWithoutTone());\n        }\n        System.out.println();\n\n        System.out.print(\"声调,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getTone());\n        }\n        System.out.println();\n\n        System.out.print(\"声母,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getShengmu());\n        }\n        System.out.println();\n\n        System.out.print(\"韵母,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getYunmu());\n        }\n        System.out.println();\n\n        System.out.print(\"输入法头,\");\n        for (Pinyin pinyin : pinyinList)\n        {\n            System.out.printf(\"%s,\", pinyin.getHead());\n        }\n        System.out.println();\n    }\n}\n```\n- 说明\n  * **HanLP**不仅支持基础的汉字转拼音，还支持声母、韵母、音调、音标和输入法首字母首声母功能。\n  * **HanLP**能够识别多音字，也能给繁体中文注拼音。\n  * 最重要的是，**HanLP**采用的模式匹配升级到`AhoCorasickDoubleArrayTrie`，性能大幅提升，能够提供毫秒级的响应速度！\n- 算法详解\n  * [《汉字转拼音与简繁转换的Java实现》](http://www.hankcs.com/nlp/java-chinese-characters-to-pinyin-and-simplified-conversion-realization.html#h2-17)\n\n### 18. 简繁转换\n\n```java\n/**\n * 简繁转换\n * @author hankcs\n */\npublic class DemoTraditionalChinese2SimplifiedChinese\n{\n    public static void main(String[] args)\n    {\n        System.out.println(HanLP.convertToTraditionalChinese(\"用笔记本电脑写程序\"));\n        System.out.println(HanLP.convertToSimplifiedChinese(\"「以後等妳當上皇后，就能買士多啤梨慶祝了」\"));\n    }\n}\n```\n- 说明\n  * **HanLP**能够识别简繁分歧词，比如`打印机=印表機`。许多简繁转换工具不能区分“以后”“皇后”中的两个“后”字，**HanLP**可以。\n- 算法详解\n  * [《汉字转拼音与简繁转换的Java实现》](http://www.hankcs.com/nlp/java-chinese-characters-to-pinyin-and-simplified-conversion-realization.html#h2-17)\n\n### 19. 文本推荐\n\n```java\n/**\n * 文本推荐(句子级别，从一系列句子中挑出与输入句子最相似的那一个)\n * @author hankcs\n */\npublic class DemoSuggester\n{\n    public static void main(String[] args)\n    {\n        Suggester suggester = new Suggester();\n        String[] titleArray =\n        (\n                \"威廉王子发表演说 呼吁保护野生动物\\n\" +\n                \"《时代》年度人物最终入围名单出炉 普京马云入选\\n\" +\n                \"“黑格比”横扫菲：菲吸取“海燕”经验及早疏散\\n\" +\n                \"日本保密法将正式生效 日媒指其损害国民知情权\\n\" +\n                \"英报告说空气污染带来“公共健康危机”\"\n        ).split(\"\\\\n\");\n        for (String title : titleArray)\n        {\n            suggester.addSentence(title);\n        }\n\n        System.out.println(suggester.suggest(\"发言\", 1));       // 语义\n        System.out.println(suggester.suggest(\"危机公共\", 1));   // 字符\n        System.out.println(suggester.suggest(\"mayun\", 1));      // 拼音\n    }\n}\n```\n- 说明\n  * 在搜索引擎的输入框中，用户输入一个词，搜索引擎会联想出最合适的搜索词，**HanLP**实现了类似的功能。\n  * 可以动态调节每种识别器的权重\n\n### 20. 语义距离\n\n```java\n/**\n * 演示词向量的训练与应用\n *\n * @author hankcs\n */\npublic class DemoWord2Vec\n{\n    public static void main(String[] args) throws IOException\n    {\n        WordVectorModel wordVectorModel = trainOrLoadModel();\n        printNearest(\"中国\", wordVectorModel);\n        printNearest(\"美丽\", wordVectorModel);\n        printNearest(\"购买\", wordVectorModel);\n\n        // 文档向量\n        DocVectorModel docVectorModel = new DocVectorModel(wordVectorModel);\n        String[] documents = new String[]{\n            \"山东苹果丰收\",\n            \"农民在江苏种水稻\",\n            \"奥运会女排夺冠\",\n            \"世界锦标赛胜出\",\n            \"中国足球失败\",\n        };\n\n        System.out.println(docVectorModel.similarity(documents[0], documents[1]));\n        System.out.println(docVectorModel.similarity(documents[0], documents[4]));\n\n        for (int i = 0; i < documents.length; i++)\n        {\n            docVectorModel.addDocument(i, documents[i]);\n        }\n\n        printNearestDocument(\"体育\", documents, docVectorModel);\n        printNearestDocument(\"农业\", documents, docVectorModel);\n        printNearestDocument(\"我要看比赛\", documents, docVectorModel);\n        printNearestDocument(\"要不做饭吧\", documents, docVectorModel);\n    }\n}\n```\n- 说明\n  * [word2vec文档](https://github.com/hankcs/HanLP/wiki/word2vec)\n  * [《word2vec原理推导与代码分析》](http://www.hankcs.com/nlp/word2vec.html)\n\n### 21. 依存句法分析\n\n```java\n/**\n * 依存句法分析（MaxEnt和神经网络句法模型需要-Xms1g -Xmx1g -Xmn512m）\n * @author hankcs\n */\npublic class DemoDependencyParser\n{\n    public static void main(String[] args)\n    {\n        CoNLLSentence sentence = HanLP.parseDependency(\"徐先生还具体帮助他确定了把画雄鹰、松鼠和麻雀作为主攻目标。\");\n        System.out.println(sentence);\n        // 可以方便地遍历它\n        for (CoNLLWord word : sentence)\n        {\n            System.out.printf(\"%s --(%s)--> %s\\n\", word.LEMMA, word.DEPREL, word.HEAD.LEMMA);\n        }\n        // 也可以直接拿到数组，任意顺序或逆序遍历\n        CoNLLWord[] wordArray = sentence.getWordArray();\n        for (int i = wordArray.length - 1; i >= 0; i--)\n        {\n            CoNLLWord word = wordArray[i];\n            System.out.printf(\"%s --(%s)--> %s\\n\", word.LEMMA, word.DEPREL, word.HEAD.LEMMA);\n        }\n        // 还可以直接遍历子树，从某棵子树的某个节点一路遍历到虚根\n        CoNLLWord head = wordArray[12];\n        while ((head = head.HEAD) != null)\n        {\n            if (head == CoNLLWord.ROOT) System.out.println(head.LEMMA);\n            else System.out.printf(\"%s --(%s)--> \", head.LEMMA, head.DEPREL);\n        }\n    }\n}\n```\n- 说明\n  * 内部采用`NeuralNetworkDependencyParser`实现，用户可以直接调用`NeuralNetworkDependencyParser.compute(sentence)`\n  * 也可以调用基于最大熵的依存句法分析器`MaxEntDependencyParser.compute(sentence)`\n- 算法详解\n  * [《基于神经网络分类模型与转移系统的判决式依存句法分析器》](http://www.hankcs.com/nlp/parsing/neural-network-based-dependency-parser.html)\n  * [《最大熵依存句法分析器的实现》](http://www.hankcs.com/nlp/parsing/to-achieve-the-maximum-entropy-of-the-dependency-parser.html)\n\n## 词典说明\n本章详细介绍**HanLP**中的词典格式，满足用户自定义的需要。**HanLP**中有许多词典，它们的格式都是相似的，形式都是文本文档，随时可以修改。\n### 基本格式\n词典分为词频词性词典和词频词典。\n\n- 词频词性词典（如`CoreNatureDictionary.txt`）\n   * 每一行代表一个单词，格式遵从`[单词] [词性A] [A的频次] [词性B] [B的频次] ...`。\n   * 支持省略词性和频次，直接一行一个单词。\n   * `.txt`词典文件的分隔符为空格或制表符，所以不支持含有空格的词语。如果需要支持空格，请使用英文逗号`,`分割的**纯文本**`.csv`文件。在使用Excel等富文本编辑器时，则请注意保存为**纯文本**形式。\n- 词频词典（如`CoreNatureDictionary.ngram.txt`）\n  * 每一行代表一个单词或条目，格式遵从`[单词] [单词的频次]`。\n  * 每一行的分隔符为空格或制表符。\n\n少数词典有自己的专用格式，比如同义词词典兼容《同义词词林扩展版》的文本格式，而转移矩阵词典则是一个csv表格。\n\n下文主要介绍通用词典，如不注明，词典特指通用词典。\n\n### 数据结构\n\nTrie树（字典树）是**HanLP**中使用最多的数据结构，为此，我实现了通用的Trie树，支持泛型、遍历、储存、载入。\n\n用户自定义词典采用AhoCorasickDoubleArrayTrie和二分Trie树储存，其他词典采用基于[双数组Trie树(DoubleArrayTrie)](http://www.hankcs.com/program/java/%E5%8F%8C%E6%95%B0%E7%BB%84trie%E6%A0%91doublearraytriejava%E5%AE%9E%E7%8E%B0.html)实现的[AC自动机AhoCorasickDoubleArrayTrie](http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html)。关于一些常用数据结构的性能评估，请参考[wiki](https://github.com/hankcs/HanLP/wiki/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84)。\n\n### 储存形式\n\n词典有两个形态：文本文件(filename.txt)和缓存文件(filename.txt.bin或filename.txt.trie.dat和filename.txt.trie.value)。\n\n- 文本文件 \n  * 采用明文储存，UTF-8编码，CRLF换行符。\n- 缓存文件\n  * 就是一些二进制文件，通常在文本文件的文件名后面加上.bin表示。有时候是.trie.dat和.trie.value。后者是历史遗留产物，分别代表trie树的数组和值。\n  * 如果你修改了任何词典，只有删除缓存才能生效。\n\n### 修改方法\n\nHanLP的核心词典训练自人民日报2014语料，语料不是完美的，总会存在一些错误。这些错误可能会导致分词出现奇怪的结果，这时请打开调试模式排查问题：\n```java\nHanLP.Config.enableDebug();\n```\n- 核心词性词频词典\n  * 比如你在`data/dictionary/CoreNatureDictionary.txt`中发现了一个不是词的词，或者词性标注得明显不对，那么你可以修改它，然后删除缓存文件使其生效。\n  * 目前`CoreNatureDictionary.ngram.txt`的缓存依赖于`CoreNatureDictionary.txt`的缓存，修改了后者之后必须同步删除前者的缓存，否则可能出错\n- 核心二元文法词典\n  * 二元文法词典`data/dictionary/CoreNatureDictionary.ngram.txt`储存的是两个词的接续，如果你发现不可能存在这种接续时，删掉即可。\n  * 你也可以添加你认为合理的接续，但是这两个词必须同时在核心词典中才会生效。\n- 命名实体识别词典\n  * 基于角色标注的命名实体识别比较依赖词典，所以词典的质量大幅影响识别质量。\n  * 这些词典的格式与原理都是类似的，请阅读[相应的文章](http://www.hankcs.com/category/nlp/ner/)或代码修改它。\n\n如果问题解决了，欢迎向我提交一个pull request，这是我在代码库中保留明文词典的原因，众人拾柴火焰高！\n\n------\n\n## 版权\n\n### Apache License Version 2.0\n\n如不特殊注明，所有模块都以此协议授权使用。\n\n### 上海林原信息科技有限公司\n- HanLP产品初始知识产权归上海林原信息科技有限公司所有，任何人和企业可以无偿使用，可以对产品、源代码进行任何形式的修改，可以打包在其他产品中进行销售。\n- 任何使用了HanLP的全部或部分功能、词典、模型的项目、产品或文章等形式的成果必须显式注明HanLP及此项目主页。\n\n### 其他版权方\n- 自`1.2.4`后是个人维护，还会接受任何人与任何公司向本项目开源的模块。\n- 充分尊重所有版权方的贡献，本项目不占有这些新模块的版权。\n\n### 鸣谢\n感谢下列优秀开源项目：\n\n- [darts-clone-java](https://github.com/hiroshi-manabe/darts-clone-java)\n- [SharpICTCLAS](http://www.cnblogs.com/zhenyulu/archive/2007/04/18/718383.html)\n- [snownlp](https://github.com/isnowfy/snownlp)\n- [ansj_seg](https://github.com/NLPchina/ansj_seg)\n- [nlp-lang](https://github.com/NLPchina/nlp-lang)\n\n感谢NLP界各位学者老师的著作：\n\n- 《基于角色标注的中国人名自动识别研究》张华平 刘群\n- 《基于层叠隐马尔可夫模型的中文命名实体识别》俞鸿魁 张华平 刘群 吕学强 施水才\n- 《基于角色标注的中文机构名识别》俞鸿魁 张华平 刘群\n- 《基于最大熵的依存句法分析》 辛霄 范士喜 王轩 王晓龙\n- An Efficient Implementation of Trie Structures, JUN-ICHI AOE AND KATSUSHI MORIMOTO\n- TextRank: Bringing Order into Texts, Rada Mihalcea and Paul Tarau\n\n感谢上海林原信息科技有限公司的刘先生，允许我利用工作时间开发HanLP，提供服务器和域名，并且促成了开源。感谢诸位用户的关注和使用，HanLP并不完善，未来还恳求各位NLP爱好者多多关照，提出宝贵意见。\n\n作者 [@hankcs](http://weibo.com/hankcs/)\n\n2014年12月16日\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D20:727CE:175D30:5DDC12:6AB92D41"},"text_sha256":"9fef4964c8a4473ccc7328d7d0b3707d683c6c6cd16a8dc477715c58ac5a49b0"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1530","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E4:B1202:17B837A:1BDFD1B:6AB92D42"},"commit":{"sha":"fc462f25a864c319a24efda5c4976e4e39c52f3f","url":"https://github.com/hankcs/HanLP/commit/fc462f25a864c319a24efda5c4976e4e39c52f3f","date":"2025-11-15T23:08:03Z","author_date":"2025-11-15T23:02:29Z","committer_date":"2025-11-15T23:08:03Z","tree_sha":"9cbfabc49b23751a3c2846d0ab344350bca961d3","message_first_line":"Add definition of mQuaf, close https://github.com/hankcs/HanLP/issues/1965"},"tree_request_status":200,"tree_rate":{"github_remaining":"1529","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:17C3B85:1BEBCCD:6AB92D43"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11231,"blob_sha":"31d7516c3ee20b66b7b38306853ef10f92092df0","priority":0}],"documents":[{"path":"README.md","size":11231,"blob_sha":"31d7516c3ee20b66b7b38306853ef10f92092df0","priority":0,"status":200,"text":"<div align=\"center\"><img src=\"https://file.hankcs.com/img/hanlp-github-banner.png\" height=\"100px\"/><\/div>\n\n<h2 align=\"center\">HanLP: Han Language Processing<\/h2>\n\n<div align=\"center\">\n    <a href=\"https://github.com/hankcs/HanLP/actions/workflows/unit-tests.yml\">\n       <img alt=\"Unit Tests\" src=\"https://github.com/hankcs/hanlp/actions/workflows/unit-tests.yml/badge.svg?branch=master\">\n    <\/a>\n    <a href=\"https://pypi.org/project/hanlp/\">\n        <img alt=\"PyPI Version\" src=\"https://img.shields.io/pypi/v/hanlp?color=blue\">\n    <\/a>\n    <a href=\"https://pypi.org/project/hanlp/\">\n        <img alt=\"Python Versions\" src=\"https://img.shields.io/pypi/pyversions/hanlp?colorB=blue\">\n    <\/a>\n    <a href=\"https://pepy.tech/project/hanlp\">\n        <img alt=\"Downloads\" src=\"https://static.pepy.tech/badge/hanlp\">\n    <\/a>\n    <a href=\"https://colab.research.google.com/drive/1KPX6t1y36TOzRIeB4Kt3uJ1twuj6WuFv?usp=sharing\">\n        <img alt=\"Open In Colab\" src=\"https://file.hankcs.com/img/colab-badge.svg\">\n    <\/a>\n<\/div>\n\n<h4 align=\"center\">\n    <a href=\"https://github.com/hankcs/HanLP/tree/doc-zh\">中文<\/a> |\n    <a href=\"https://github.com/hankcs/HanLP/tree/doc-ja\">日本語<\/a> |\n    <a href=\"https://hanlp.hankcs.com/docs/\">Docs<\/a> |\n    <a href=\"https://bbs.hankcs.com/\">Forum<\/a>\n<\/h4>\n\nHanLP is the multilingual NLP library designed for researchers and enterprises, built on PyTorch and TensorFlow 2.x to advance state-of-the-art deep learning techniques in academia and industry. HanLP was designed from day one to be\nefficient, user-friendly and extendable.\n\nThanks to open-access corpora like Universal Dependencies and OntoNotes, HanLP 2.1 now offers 10 joint tasks on [130\nlanguages](https://hanlp.hankcs.com/docs/api/hanlp/pretrained/mtl.html#hanlp.pretrained.mtl.UD_ONTONOTES_TOK_POS_LEM_FEA_NER_SRL_DEP_SDP_CON_MMINILMV2L6): tokenization, lemmatization, part-of-speech tagging, token feature extraction, dependency parsing,\nconstituency parsing, semantic role labeling, semantic dependency parsing, abstract meaning representation (AMR)\nparsing.\n\nFor end users, HanLP offers light-weighted RESTful APIs and native Python APIs.\n\n## RESTful APIs\n\nTiny packages in several KBs for agile development and mobile applications. Although anonymous users are welcomed, an\nauth key is suggested\nand [a free one can be applied here](https://bbs.hankcs.com/t/apply-for-free-hanlp-restful-apis/3178) under\nthe [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.\n\n<details>\n  <summary>Click to expand tutorials for RESTful APIs<\/summary>\n\n  ### Python\n\n  ```bash\n  pip install hanlp_restful\n  ```\n\n  Create a client with our API endpoint and your auth.\n\n  ```python\n  from hanlp_restful import HanLPClient\n  HanLP = HanLPClient('https://hanlp.hankcs.com/api', auth=None, language='mul') # Support en, ja, zh, mul\n  ```\n\n  ### Java\n\n  Insert the following dependency into your `pom.xml`.\n\n  ```xml\n  <dependency>\n    <groupId>com.hankcs.hanlp.restful<\/groupId>\n    <artifactId>hanlp-restful<\/artifactId>\n    <version>0.0.15<\/version>\n  <\/dependency>\n  ```\n\n  Create a client with our API endpoint and your auth.\n\n  ```java\n  HanLPClient HanLP = new HanLPClient(\"https://hanlp.hankcs.com/api\", null, \"mul\"); // Support en, ja, zh, mul\n  ```\n\n  ### Quick Start\n\n  No matter which language you use, the same interface can be used to parse a document.\n\n  ```python\n  HanLP.parse(\n      \"In 2021, HanLPv2.1 delivers state-of-the-art multilingual NLP techniques to production environments. 2021年、HanLPv2.1は次世代の最先端多言語NLP技術を本番環境に導入します。2021年 HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。\")\n  ```\n\n  See [docs](https://hanlp.hankcs.com/docs/tutorial.html) for visualization, annotation guidelines and more details.\n\n<\/details>\n\n\n## Native APIs\n\n```bash\npip install hanlp\n```\n\nHanLP requires Python 3.6 or higher. While GPU or TPU acceleration is recommended, it is not mandatory.\n\n### Quick Start\n\n```python\nimport hanlp\n\nHanLP = hanlp.load(hanlp.pretrained.mtl.UD_ONTONOTES_TOK_POS_LEM_FEA_NER_SRL_DEP_SDP_CON_XLMR_BASE)\nprint(HanLP(['In 2021, HanLPv2.1 delivers state-of-the-art multilingual NLP techniques to production environments.',\n             '2021年、HanLPv2.1は次世代の最先端多言語NLP技術を本番環境に導入します。',\n             '2021年 HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。']))\n```\n\n- In particular, the Python `HanLPClient` can also be used as a callable function following the same semantics.\n  See [docs](https://hanlp.hankcs.com/docs/tutorial.html) for visualization, annotation guidelines and more details.\n- To process English, Chinese or Japanese, HanLP provides mono-lingual models in each language which significantly outperform the\n  multilingual model. See [docs](https://hanlp.hankcs.com/docs/api/hanlp/pretrained/index.html) for the list of models.\n\n## Train Your Own Models\n\nTo write DL models is not hard, the real hard thing is to write a model able to reproduce the scores in papers. The\nsnippet below shows how to surpass the state-of-the-art tokenizer in 6 minutes.\n\n```python\ntokenizer = TransformerTaggingTokenizer()\nsave_dir = 'data/model/cws/sighan2005_pku_bert_base_96.7'\ntokenizer.fit(\n    SIGHAN2005_PKU_TRAIN_ALL,\n    SIGHAN2005_PKU_TEST,  # Conventionally, no devset is used. See Tian et al. (2020).\n    save_dir,\n    'bert-base-chinese',\n    max_seq_len=300,\n    char_level=True,\n    hard_constraint=True,\n    sampler_builder=SortingSamplerBuilder(batch_size=32),\n    epochs=3,\n    adam_epsilon=1e-6,\n    warmup_steps=0.1,\n    weight_decay=0.01,\n    word_dropout=0.1,\n    seed=1660853059,\n)\ntokenizer.evaluate(SIGHAN2005_PKU_TEST, save_dir)\n```\n\nThe result is guaranteed to be `96.73` as the random seed is fixed. Different from some overclaiming papers and\nprojects, HanLP promises every single digit in our scores is reproducible. Any issues on reproducibility will be treated\nand solved as a top-priority fatal bug.\n\n## Performance\n\nThe performance of multi-task learning models is shown in the following table.\n\n<table><thead><tr><th rowspan=\"2\">lang<\/th><th rowspan=\"2\">corpora<\/th><th rowspan=\"2\">model<\/th><th colspan=\"2\">tok<\/th><th colspan=\"4\">pos<\/th><th colspan=\"3\">ner<\/th><th rowspan=\"2\">dep<\/th><th rowspan=\"2\">con<\/th><th rowspan=\"2\">srl<\/th><th colspan=\"4\">sdp<\/th><th rowspan=\"2\">lem<\/th><th rowspan=\"2\">fea<\/th><th rowspan=\"2\">amr<\/th><\/tr><tr><th>fine<\/th><th>coarse<\/th><th>ctb<\/th><th>pku<\/th><th>863<\/th><th>ud<\/th><th>pku<\/th><th>msra<\/th><th>ontonotes<\/th><th>SemEval16<\/th><th>DM<\/th><th>PAS<\/th><th>PSD<\/th><\/tr><\/thead><tbody><tr><td rowspan=\"2\">mul<\/td><td rowspan=\"2\">UD2.7<br>OntoNotes5<\/td><td>small<\/td><td>98.62<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>93.23<\/td><td>-<\/td><td>-<\/td><td>74.42<\/td><td>79.10<\/td><td>76.85<\/td><td>70.63<\/td><td>-<\/td><td>91.19<\/td><td>93.67<\/td><td>85.34<\/td><td>87.71<\/td><td>84.51<\/td><td>-<\/td><\/tr><tr><td>base<\/td><td>98.97<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>90.32<\/td><td>-<\/td><td>-<\/td><td>80.32<\/td><td>78.74<\/td><td>71.23<\/td><td>73.63<\/td><td>-<\/td><td>92.60<\/td><td>96.04<\/td><td>81.19<\/td><td>85.08<\/td><td>82.13<\/td><td>-<\/td><\/tr><tr><td rowspan=\"5\">zh<\/td><td rowspan=\"2\">open<\/td><td>small<\/td><td>97.25<\/td><td>-<\/td><td>96.66<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>95.00<\/td><td>84.57<\/td><td>87.62<\/td><td>73.40<\/td><td>84.57<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><\/tr><tr><td>base<\/td><td>97.50<\/td><td>-<\/td><td>97.07<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>96.04<\/td><td>87.11<\/td><td>89.84<\/td><td>77.78<\/td><td>87.11<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><\/tr><tr><td rowspan=\"3\">close<\/td><td>small<\/td><td>96.70<\/td><td>95.93<\/td><td>96.87<\/td><td>97.56<\/td><td>95.05<\/td><td>-<\/td><td>96.22<\/td><td>95.74<\/td><td>76.79<\/td><td>84.44<\/td><td>88.13<\/td><td>75.81<\/td><td>74.28<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><\/tr><tr><td>base<\/td><td>97.52<\/td><td>96.44<\/td><td>96.99<\/td><td>97.59<\/td><td>95.29<\/td><td>-<\/td><td>96.48<\/td><td>95.72<\/td><td>77.77<\/td><td>85.29<\/td><td>88.57<\/td><td>76.52<\/td><td>73.76<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><\/tr><tr><td>ernie<\/td><td>96.95<\/td><td>97.29<\/td><td>96.76<\/td><td>97.64<\/td><td>95.22<\/td><td>-<\/td><td>97.31<\/td><td>96.47<\/td><td>77.95<\/td><td>85.67<\/td><td>89.17<\/td><td>78.51<\/td><td>74.10<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><td>-<\/td><\/tr><\/tbody><\/table>\n\n- Multi-task learning models often under-perform their single-task learning counterparts according to our latest\n  research. Similarly, mono-lingual models often outperform multi-lingual models. Therefore, we strongly recommend the\n  use of [a single-task mono-lingual model](https://hanlp.hankcs.com/docs/api/hanlp/pretrained/index.html) if you are\n  targeting at high accuracy instead of faster speed.\n- A state-of-the-art [AMR model](https://hanlp.hankcs.com/docs/api/hanlp/pretrained/amr.html) has been released.\n\n## Citing\n\nIf you use HanLP in your research, please cite [our EMNLP paper](https://aclanthology.org/2021.emnlp-main.451):\n\n```bibtex\n@inproceedings{he-choi-2021-stem,\n    title = \"The Stem Cell Hypothesis: Dilemma behind Multi-Task Learning with Transformer Encoders\",\n    author = \"He, Han and Choi, Jinho D.\",\n    booktitle = \"Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing\",\n    month = nov,\n    year = \"2021\",\n    address = \"Online and Punta Cana, Dominican Republic\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/2021.emnlp-main.451\",\n    pages = \"5555--5577\",\n    abstract = \"Multi-task learning with transformer encoders (MTL) has emerged as a powerful technique to improve performance on closely-related tasks for both accuracy and efficiency while a question still remains whether or not it would perform as well on tasks that are distinct in nature. We first present MTL results on five NLP tasks, POS, NER, DEP, CON, and SRL, and depict its deficiency over single-task learning. We then conduct an extensive pruning analysis to show that a certain set of attention heads get claimed by most tasks during MTL, who interfere with one another to fine-tune those heads for their own objectives. Based on this finding, we propose the Stem Cell Hypothesis to reveal the existence of attention heads naturally talented for many tasks that cannot be jointly trained to create adequate embeddings for all of those tasks. Finally, we design novel parameter-free probes to justify our hypothesis and demonstrate how attention heads are transformed across the five tasks during MTL through label analysis.\",\n}\n```\n\n## License\n\n### Codes\n\nHanLP is licensed under **Apache License 2.0**. You can use HanLP in your commercial products for free. We would\nappreciate it if you add a link to HanLP on your website.\n\n### Models\n\nUnless otherwise specified, all models in HanLP are licensed\nunder  [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).\n\n## References\n\nhttps://hanlp.hankcs.com/docs/references.html\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C324:09BF:B3231:2E54B4:6AB92D42"},"text_sha256":"8f785cb7e826e4d078c63993dffd27d9c6598b6caff13d25440293349d8f9834"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"languagetool-org/languagetool","input_row":{"repository":"languagetool-org/languagetool","url":"https://github.com/languagetool-org/languagetool","name":"languagetool","owner":"languagetool-org","description":"Style and Grammar Checker for 25+ Languages","language":"Java","license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1","license_osi_approved":"true","stars":15090,"issues":6181,"created_at":"2013-08-08T16:37:22Z","updated_at":"2026-09-27T05:01:37Z","first_commit_at":"2003-05-19T00:09:52Z","last_commit_at":"2026-09-27T05:01:31Z","activity_months":280.30000000000001,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:44.044Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"languagetool-org/languagetool","visibility":"public","created_at":"2013-08-08T16:37:22Z","updated_at":"2026-09-27T05:01:37Z","private":false,"fork":false,"archived":false,"stargazers_count":15090,"open_issues_count":2149,"license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1"},"error":"","rate":{"github_remaining":"1528","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FD:37D6E2:1825B23:1C4DF91:6AB92D44"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1527","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B4:1B4E7A:17C3AB8:1BEBBCA:6AB92D44"},"commit":{"sha":"0fb32c4053d2fcc45bf12b2e1d07a1bacba9fc75","url":"https://github.com/languagetool-org/languagetool/commit/0fb32c4053d2fcc45bf12b2e1d07a1bacba9fc75","date":"2018-05-24T20:42:03Z","author_date":"2018-05-24T20:41:45Z","committer_date":"2018-05-24T20:42:03Z","tree_sha":"7337f6c2b8aa5d1ecb1e125145f8d4f89f8d7129","message_first_line":"[de-simple] improve rulegroup"},"tree_request_status":200,"tree_rate":{"github_remaining":"1526","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:182D39A:1C555A5:6AB92D44"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4045,"blob_sha":"4f0c585be19d35ca4b7be38614ed57e56a7aa536","priority":0}],"documents":[{"path":"README.md","size":4045,"blob_sha":"4f0c585be19d35ca4b7be38614ed57e56a7aa536","priority":0,"status":200,"text":"LanguageTool is an Open Source proofreading software for English, French, German,\nPolish, Russian, and [more than 20 other languages](https://languagetool.org/languages/).\nIt finds many errors that a simple spell checker cannot detect.\n\nLanguageTool is freely available under the LGPL 2.1 or later.\n\nFor more information, please see our homepage at https://languagetool.org,\n[this README](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/README.md),\nand [CHANGES](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/CHANGES.md).\n\n#### Contributions\n\n[The development overview](http://wiki.languagetool.org/development-overview) describes\nhow you can contribute error detection rules.\n\nSee ['easy fix' issues](https://github.com/languagetool-org/languagetool/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+fix%22)\nfor issues to get started.\n\nFor more technical details, see [our wiki](http://wiki.languagetool.org).\n\n#### Scripted installation and building\nTo install or build using a script, simply type:\n```\ncurl -L https://git.io/vNqdP | sudo bash <options>\nsudo bash install.sh <options>\n```\n\n```\nUsage: install.sh <option> <package>\nOptions:\n   -h --help                   Show help\n   -b --build                  Builds packages from the bleeding edge development copy of LanguageTool\n   -c --command <command>      Specifies post-installation command to run (default gui when screen is detected)\n   -q --quiet                  Shut up LanguageTool installer! Only tell me important stuff!\n   -t --text <file>            Specifies what text to be spellchecked by LanguageTool command line (default spellcheck.txt)\n   -d --depth <value>          Specifies the depth to clone when building LanguageTool yourself (default 1).\n   -p --package <package>      Specifies package to install when building (default all)\n   -o --override <OS>          Override automatic OS detection with <OS>\n   -a --accept                 Accept the oracle license at http://java.com/license. Only run this if you have seen the license and agree to its terms!\n   -r --remove <all/partial>   Removes LanguageTool install. <all> uninstalls the dependencies that were auto-installed. (default partial)\n\nPackages(only if -b is specified):\n   standalone                  Installs standalone package\n   wikipedia                   Installs Wikipedia package\n   office-extension            Installs the LibreOffice/OpenOffice extension package\n\nCommands:\n   GUI                         Runs GUI version of LanguageTool\n   commandline                 Runs command line version of LanguageTool\n   server                      Runs server version of LanguageTool\n```\n\n#### Alternate way to build from source\n\nBefore start: you will need to clone from GitHub and install Java 8 and Apache Maven.\n\nWarning: a complete clone requires downloading more than 360 MB and needs more than 500 MB on disk.\nThis can be reduced if you only need the last few revisions of the master branch\nby creating a shallow clone:\n\n    git clone --depth 5 https://github.com/languagetool-org/languagetool.git\n\nA shallow clone downloads less than 60 MB and needs less than 200 MB on disk.\n\nIn the root project folder, run:\n\n    mvn clean test\n\n(sometimes you can skip Maven step for repeated builds)\n\n    ./build.sh languagetool-standalone package -DskipTests\n\nTest the result in `languagetool-standalone/target/`.\n\n    ./build.sh languagetool-wikipedia package -DskipTests\n\nTest the result in `languagetool-wikipedia/target`.\n\n    ./build.sh languagetool-office-extension package -DskipTests\n\nTest the result in `languagetool-office-extension/target`, rename the `*.zip` to `*.oxt` to install it in LibreOffice/OpenOffice.\n\nNow you can use the bleeding edge development copy of LanguageTool `*.jar` files, be aware that it might contain regressions.\n\n#### License\n\nUnless otherwise noted, this software is distributed under the LGPL, see file [COPYING.txt](https://github.com/languagetool-org/languagetool/blob/master/COPYING.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"808A:3E1C8:17FF84:5E7D8D:6AB92D45"},"text_sha256":"90453ca07dedae25ae55ead9b72384ec743d1b9d32c8b0e5711bdfe111bad9ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1525","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091B:72BD3:18122ED:1C3A478:6AB92D45"},"commit":{"sha":"9383fcf9f64967fa4546c849f95b7b8805390d5e","url":"https://github.com/languagetool-org/languagetool/commit/9383fcf9f64967fa4546c849f95b7b8805390d5e","date":"2026-06-30T07:44:04Z","author_date":"2026-06-30T07:44:04Z","committer_date":"2026-06-30T07:44:04Z","tree_sha":"3dd429423e4b5e274b8033e4332202457df8fca5","message_first_line":"[ca] new DISPOSAT_A"},"tree_request_status":200,"tree_rate":{"github_remaining":"1524","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:1821706:1C49D46:6AB92D46"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5927,"blob_sha":"eea689ae7261f6f57d34e5553d5e0df7767a39e9","priority":0}],"documents":[{"path":"README.md","size":5927,"blob_sha":"eea689ae7261f6f57d34e5553d5e0df7767a39e9","priority":0,"status":200,"text":"## LanguageTool\n\n**LanguageTool** is open-source proofreading software for English, Spanish, French, German,\nPortuguese, Polish, Dutch, and [more than 20 other languages](https://languagetool.org/languages/).\nIt finds many errors that a simple spell checker cannot detect.\n\n* [LanguageTool Forum](https://forum.languagetool.org)\n\n* [How to run your own LanguageTool server](https://dev.languagetool.org/http-server)\n\n* [HTTP API documentation](https://languagetool.org/http-api/swagger-ui/#!/default/post_check)\n\n* [How to use our public server via HTTP](https://dev.languagetool.org/public-http-api)\n\n* [How to use LanguageTool from Java](https://dev.languagetool.org/java-api) ([Javadoc](https://languagetool.org/development/api/index.html?org/languagetool/JLanguageTool.html))\n\nFor more information, please see our homepage, at [`languagetool.org`](https://languagetool.org),\n[this `README`](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/README.md),\nand [`CHANGES`](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/CHANGES.md).\n\nThe LanguageTool core (this repo) is freely available under the LGPL 2.1 or later.\n\n## Docker\n\nTry one of the following projects for a community-contributed Docker file:\n\n`github.com`                                                                      | `hub.docker.com/r`\n----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------\n[`meyayl/docker-languagetool`](https://github.com/meyayl/docker-languagetool)     | [`meyay/languagetool`](https://hub.docker.com/r/meyay/languagetool)\n[`Erikvl87/docker-languagetool`](https://github.com/Erikvl87/docker-languagetool) | [`erikvl87/languagetool`](https://hub.docker.com/r/erikvl87/languagetool)\n[`silvio/docker-languagetool`](https://github.com/silvio/docker-languagetool)     | [`silviof/docker-languagetool`](https://hub.docker.com/r/silviof/docker-languagetool)\n\n## Contributions\n\n[The development overview](https://dev.languagetool.org/development-overview) describes\nhow you can contribute error detection rules.\n\nFor more technical details, see [our dev pages](https://dev.languagetool.org).\n\n## Scripted installation and building\n\nTo install or build using a script, simply type:\n\n```sh\n#!/usr/bin/env sh\ncurl -L https://raw.githubusercontent.com/languagetool-org/languagetool/master/install.sh | sudo bash $options\n```\n\nIf you wish to have more options, download the `install.sh` script. Usage options follow:\n\n<blockquote>\n\n```HTML\nsudo bash install.sh <options>\n\nUsage: install.sh <option> <package>\nOptions:\n   -h --help                   Show help\n   -b --build                  Builds packages from the bleeding edge development copy of LanguageTool\n   -c --command <command>      Specifies post-installation command to run (default gui when screen is detected)\n   -q --quiet                  Shut up LanguageTool installer! Only tell me important stuff!\n   -t --text <file>            Specifies what text to be spellchecked by LanguageTool command line (default spellcheck.txt)\n   -d --depth <value>          Specifies the depth to clone when building LanguageTool yourself (default 1).\n   -p --package <package>      Specifies package to install when building (default all)\n   -o --override <OS>          Override automatic OS detection with <OS>\n   -a --accept                 Accept the oracle license at http://java.com/license. Only run this if you have seen the license and agree to its terms!\n   -r --remove <all/partial>   Removes LanguageTool install. <all> uninstalls the dependencies that were auto-installed. (default partial)\n\nPackages(only if -b is specified):\n   standalone                  Installs standalone package\n   wikipedia                   Installs Wikipedia package\n   office-extension            Installs the LibreOffice/OpenOffice extension package\n\nCommands:\n   GUI                         Runs GUI version of LanguageTool\n   commandline                 Runs command line version of LanguageTool\n   server                      Runs server version of LanguageTool\n```\n\n<\/blockquote>\n\n## Alternate way to build from source\n\nBefore start: you will need to clone from GitHub and install Java 17 and Apache Maven.\n\nWarning: a complete clone requires downloading more than 500 MiB and needs more than 1 500 MiB on disk.\nThis can be reduced, if you only need the last few revisions of the master branch\nby creating a shallow clone:\n\n```sh\n#!/usr/bin/env sh\ngit clone --depth 5 https://github.com/languagetool-org/languagetool.git\n```\n\nA shallow clone downloads less than 60 MiB, and needs less than 200 MiB on disk.\n\nIn the root project folder, run:\n\n```sh\n#!/usr/bin/env sh\nmvn clean test\n```\n\n(Sometimes, you can skip Maven step for repeated builds.)\n\n```sh\n#!/usr/bin/env sh\n./build.sh languagetool-standalone package -DskipTests\n```\n\nTest the result in `languagetool-standalone/target/`.\n\n```sh\n#!/usr/bin/env sh\n./build.sh languagetool-wikipedia package -DskipTests\n```\n\nTest the result in `languagetool-wikipedia/target`.\n\nNow, you can use the bleeding edge development copy of LanguageTool `*.jar` files, be aware that it might contain regressions.\n\n### How to run under Mac M1 or M2\n\n1. Install Brew for Rosetta:\n\n   ```sh\n   #!/usr/bin/env sh\n   arch -x86_64 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n   ```\n\n1. Install OpenJDK for Rosetta:\n\n   ```sh\n   #!/usr/bin/env sh\n   arch -x86_64 brew install openjdk\n   ```\n\n1. Install Maven for Rosetta:\n\n   ```sh\n   #!/usr/bin/env sh\n   arch -x86_64 brew install maven\n   ```\n\n1. Now, run the build scripts.\n\n### License\n\nUnless otherwise noted, this software – the LanguageTool core – is distributed under the LGPL; see\n[`COPYING.txt`](https://github.com/languagetool-org/languagetool/blob/master/COPYING.txt).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDF8:3C4A0:17CB4D:5E4AB0:6AB92D46"},"text_sha256":"999c7c74959a7bef9b355b09f23146c144988eae5cfb6a23acc5e5674d5f4d7b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"google/sentencepiece","input_row":{"repository":"google/sentencepiece","url":"https://github.com/google/sentencepiece","name":"sentencepiece","owner":"google","description":"Unsupervised text tokenizer for Neural Network-based text generation.","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":12103,"issues":846,"created_at":"2017-03-07T10:03:48Z","updated_at":"2026-09-27T09:07:29Z","first_commit_at":"2017-03-07T10:43:50Z","last_commit_at":"2026-09-27T09:07:22Z","activity_months":114.68000000000001,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:47.791Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"google/sentencepiece","visibility":"public","created_at":"2017-03-07T10:03:48Z","updated_at":"2026-09-27T09:07:29Z","private":false,"fork":false,"archived":false,"stargazers_count":12103,"open_issues_count":6,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1523","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C9:71E0C:1808764:1C2F744:6AB92D47"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1522","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0876:6C9BF:1819CEB:1C420D4:6AB92D48"},"commit":{"sha":"4f7af0dfadbf547264296d46924055842c901b60","url":"https://github.com/google/sentencepiece/commit/4f7af0dfadbf547264296d46924055842c901b60","date":"2018-05-13T13:03:47Z","author_date":"2018-05-13T13:03:47Z","committer_date":"2018-05-13T13:03:47Z","tree_sha":"ce7b1da3601f75aab8fe333c07f53cde3470304d","message_first_line":"Merge pull request #86 from google/sr"},"tree_request_status":200,"tree_rate":{"github_remaining":"1521","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0819:180242:180B98F:1C33A8D:6AB92D48"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13568,"blob_sha":"3aa8b77797dd11b7d6f562b467befe5489b55159","priority":0}],"documents":[{"path":"README.md","size":13568,"blob_sha":"3aa8b77797dd11b7d6f562b467befe5489b55159","priority":0,"status":200,"text":"# SentencePiece\n\n[![Build Status](https://travis-ci.org/google/sentencepiece.svg?branch=master)](https://travis-ci.org/google/sentencepiece) [![Coverage Status](https://coveralls.io/repos/github/google/sentencepiece/badge.svg?branch=master)](https://coveralls.io/github/google/sentencepiece?branch=master)\n\nSentencePiece is an unsupervised text tokenizer and detokenizer mainly for\nNeural Network-based text generation systems where the vocabulary size\nis predetermined prior to the neural model training. SentencePiece implements\n**subword units** (e.g., **byte-pair-encoding (BPE)** [[Sennrich et al.](http://www.aclweb.org/anthology/P16-1162)]) and \n**unigram language model** [[Kudo.](https://arxiv.org/abs/1804.10959)])\nwith the extension of direct training from raw sentences. \nSubword segmentation with unigram language model supports probabilistic subword sampling for **subword regularization** [[Kudo.](https://arxiv.org/abs/1804.10959)], a simple technique to improve the robustness of NMT model. SentencePiece allows us to make a purely end-to-end system that does not depend on language-specific pre/postprocessing.\n\n**This is not an official Google product.**\n\n## Technical highlights\n- **Multiple subword algorithms**: **BPE**  [[Sennrich et al.](http://www.aclweb.org/anthology/P16-1162)] and **unigram language model** [[Kudo.](https://arxiv.org/abs/1804.10959)] are supported.\n- **Subword regularization**: SentencePiece implements subword sampling for [subword regularization](https://arxiv.org/abs/1804.10959) which helps to improve the robustness and accuracy of NMT models.\n- **Purely data driven**: SentencePiece trains tokenization and detokenization\n  models from only raw sentences. No pre-tokenization ([Moses tokenizer](https://github.com/moses-smt/mosesdecoder/blob/master/scripts/tokenizer/tokenizer.perl)/[MeCab](http://taku910.github.io/mecab/)/[KyTea](http://www.phontron.com/kytea/)) is required.\n- **Language independent**: SentencePiece treats the sentences just as sequences of Unicode characters. There is no language-dependent logic.\n- **Fast and lightweight**: Segmentation speed is around 50k sentences/sec, and memory footprint is around 6MB.\n- **Self-contained**: The same tokenization/detokenization is obtained as long as the same model file is used.\n- **Direct vocabulary id generation**: SentencePiece manages vocabulary to id mapping and can directly generate vocabulary id sequences from raw sentences.\n- **NFKC-based normalization**: SentencePiece performs NFKC-based text normalization.\n\n## Comparisons with other implementations\n|Feature|SentencePiece|[subword-nmt](https://github.com/rsennrich/subword-nmt)|[WordPiece](https://arxiv.org/pdf/1609.08144.pdf)|\n|:---|:---:|:---:|:---:|\n|Supported algorithm|BPE, unigram, char, word|BPE|BPE*|\n|OSS?|Yes|Yes|Google internal|\n|Subword regularization|[Yes](#subword-regularization)|No|No|\n|Python Library (pip)|[Yes](python/README.md)|No|N/A|\n|C++ Library|[Yes](doc/api.md)|No|N/A|\n|Pre-segmentation required?|[No](#whitespace-is-treated-as-a-basic-symbol)|Yes|Yes|\n|Customizable normalization (e.g., NFKC)|[Yes](doc/normalization.md)|No|N/A|\n|Direct id generation|[Yes](#end-to-end-example)|No|N/A|\n\nNote that BPE algorithm used in WordPiece is slightly different from the original BPE.\n\n## Overview\n### What is SentencePiece?\nSentencePiece is a re-impelemtation of **sub-word units**, an effective way to alleviate the open vocabulary\n  problems in neural machine translation. SentencePiece supports two segmentation algorithms, **byte-pair-encoding (BPE)** [[Sennrich et al.](http://www.aclweb.org/anthology/P16-1162)] and **unigram language model** [[Kudo.](https://arxiv.org/abs/1804.10959)]. Here are the high level differences from other implementations.\n\n#### The number of unique tokens is predetermined\nNeural Machine Translation models typically operate with a fixed\nvocabulary. Unlike most unsupervised word segmentation algorithms, which\nassume an infinite vocabulary, SentencePiece trains the segmentation model such\nthat the final vocabulary size is fixed, e.g., 8k, 16k, or 32k.\n\nNote that SentencePices specifies the final vocabulary size for training, which is different from \n[subword-nmt](https://github.com/rsennrich/subword-nmt) that uses the number of merge operations.\nThe number of merge operations is a BPE-specific parameter and not applicable to other segmentation algorithms, including unigram, word and character.\n\n#### Trains from raw sentences\nPrevious sub-word implementations assume that the input sentences are pre-tokenized. This constraint was required for efficient training, but makes the preprocessing complicated as we have to run language dependent tokenizers in advance.\nThe implementation of SentencePiece is fast enough to train the model from raw sentences. This is useful for training the tokenizer and detokenizer for Chinese, Japanese and Korean where no explicit spaces exist between words.\n\n#### Whitespace is treated as a basic symbol\nThe first step of Natural Language processing is text tokenization. For\nexample, a standard English tokenizer would segment the text \"Hello world.\" into the\nfollowing three tokens.\n\n> [Hello] [World] [.]\n\nOne observation is that the original input and tokenized sequence are **NOT\nreversibly convertible**. For instance, the information that is no space between\n“World” and “.” is dropped from the tokenized sequence, since e.g., `Tokenize(“World.”) == Tokenize(“World .”)`\n\nSentencePiece treats the input text just as a sequence of Unicode characters. Whitespace is also handled as a normal symbol. To handle the whitespace as a basic token explicitly, SentencePiece first escapes the whitespace with a meta symbol \"▁\" (U+2581) as follows.\n\n> Hello▁World.\n\nThen, this text is segmented into small pieces, for example:\n\n> [Hello] [▁Wor] [ld] [.]\n\nSince the whitespace is preserved in the segmented text, we can detokenize the text without any ambiguities.\n\n```\n  detokenized = ''.join(pieces).replace('_', ' ')\n```\n\nThis feature makes it possible to perform detokenization without relying on language-specific resources.\n\nNote that we cannot apply the same lossless conversions when splitting the\nsentence with standard word segmenters, since they treat the whitespace as a\nspecial symbol. Tokenized sequences do not preserve the necessary information to restore the original sentence.\n\n* (en) Hello world.   → [Hello] [World] [.]   \\(A space between Hello and World\\)\n* (ja) こんにちは世界。  → [こんにちは] [世界] [。] \\(No space between こんにちは and 世界\\)\n\n#### Subword regularization\nSubword regularization [[Kudo.](https://arxiv.org/abs/1804.10959)] is a simple regularization method\nthat virtually augments training data with on-the-fly subword sampling, which helps to improve the accuracy as well as robustness of NMT models.\n\nTo enable subword regularization, you would like to integrate SentencePiece library \n([C++](doc/api.md#sampling-subword-regularization)/[Python](python/README.md)) into the NMT system to sample one segmentation for each parameter update, which is different from the standard off-line data preparations. Here's the example of [Python library](python/README.md). You can find that 'New York' is segmented differently on each ``SampleEncode`` call. The details of sampling parameters are found in [sentencepiece_processor.h](src/sentencepiece_processor.h).\n\n```\n>>> import sentencepiece as spm\n>>> s = spm.SentencePieceProcessor()\n>>> s.Load('spm.model')\n>>> for n in range(5):\n...     s.SampleEncode('New York', -1, 0.1)\n... \n['▁', 'N', 'e', 'w', '▁York']\n['▁', 'New', '▁York']\n['▁', 'New', '▁Y', 'o', 'r', 'k']\n['▁', 'New', '▁York']\n['▁', 'New', '▁York']\n```\n\n## Installation\n\n### Python module\nSentencePiece provides Python wrapper that supports both SentencePiece training and segmentation.\nFor Linux (x64/i686) environment, you can install Python binary package of SentencePiece with.\n\n```\n% pip install sentencepiece\n```\n\nFor more detail, see [Python module](python/README.md)\n\n### C++ (from source)\nThe following tools and libraries are required to build SentencePiece:\n\n* GNU autotools (autoconf automake libtool)\n* C++11 compiler\n* [protobuf](https://github.com/google/protobuf) library\n\nOn Ubuntu, autotools can be installed with apt-get:\n```\n% sudo apt-get install autoconf automake libtool pkg-config libprotobuf9v5 protobuf-compiler libprotobuf-dev\n```\nThe name of the protobuf library is different between ubuntu distros. Please enter appropriate command for your Ubuntu version.\n\nOn ubuntu 14.04 LTS (Trusty Tahr):\n```\n% sudo apt-get install libprotobuf8\n```\n\nOn ubuntu 16.04 LTS (Xenial Xerus):\n```\n% sudo apt-get install libprotobuf9v5\n```\n\nOn ubuntu 17.10 (Artful Aardvark) and Later:\n```\n% sudo apt-get install libprotobuf10\n```\n\nOn OSX, you can use brew:\n```\n% brew install protobuf autoconf automake libtool\n```\n\nIf want to use self-prepared protobuf library, setup below environment variables before build:\n```\n% export PROTOBUF=<path_to_protobuf>\n% export PROTOC=\"$PROTOBUF/bin/protoc\"\n% export PROTOBUF_LIBS=\"-L$PROTOBUF/lib -lprotobuf -D_THREAD_SAFE\"\n% export PROTOBUF_CFLAGS=\"-I$PROTOBUF/include -D_THREAD_SAFE\" \n```\n\n### Build and Install SentencePiece\n```\n% cd /path/to/sentencepiece\n% ./autogen.sh\n% ./configure\n% make\n% make check\n% sudo make install\n$ sudo ldconfig -v\n```\n## Usage instructions\n### Train SentencePiece Model\n```\n% spm_train --input=<input> --model_prefix=<model_name> --vocab_size=8000 --model_type=<type>\n```\n* `--input`: one-sentence-per-line **raw** corpus file. No need to run\n  tokenizer, normalizer or preprocessor. By default, SentencePiece normalizes\n  the input with Unicode NFKC. You can pass a comma-separated list of files.\n* `--model_prefix`: output model name prefix. `<model_name>.model` and `<model_name>.vocab` are generated.\n* `--vocab_size`: vocabulary size, e.g., 8000, 16000, or 32000\n* `--model_type`: model type. Choose from `unigram` (default), `bpe`, `char`, or `word`. The input sentence must be pretokenized when using `word` type.\n\nNote that `spm_train` loads only the first `--input_sentence_size` sentences (default value is 10M).\n\nUse `--help` flag to display all parameters for training.\n\n### Encode raw text into sentence pieces/ids\n```\n% spm_encode --model=<model_file> --output_format=piece < input > output\n% spm_encode --model=<model_file> --output_format=id < input > output\n```\n\nUse `--extra_options` flag to insert the BOS/EOS markers or reverse the input sequence.\n```\n% spm_encode --extra_options=eos (add <\/s> only)\n% spm_encode --extra_options=bos:eos (add <s> and <\/s>)\n% spm_encode --extra_options=reverse:bos:eos (reverse input and add <s> and <\/s>)\n```\n\nSentencePiece supports nbest segmentation and segmentation sampling with `--output_format=(nbest|sample)_(piece|id)` flags.\n```\n% spm_encode --model=<model_file> --output_format=sample_piece --nbest_size=-1 --alpha=0.5 < input > output\n% spm_encode --model=<model_file> --output_format=nbest_id --nbest_size=10 < input > output\n```\n\n### Decode sentence pieces/ids into raw text\n```\n% spm_decode --model=<model_file> --input_format=piece < input > output\n% spm_decode --model=<model_file> --input_format=id < input > output\n```\nUse `--extra_options` flag to decode the text in reverse order.\n```\n% spm_decode --extra_options=reverse < input > output\n```\n\n### End-to-End Example\n```\n% spm_train --input=data/botchan.txt --model_prefix=m --vocab_size=1000\nunigram_model_trainer.cc(494) LOG(INFO) Starts training with :\ninput: \"../data/botchan.txt\"\n... <snip>\nunigram_model_trainer.cc(529) LOG(INFO) EM sub_iter=1 size=1100 obj=10.4973 num_tokens=37630 num_tokens/piece=34.2091\ntrainer_interface.cc(272) LOG(INFO) Saving model: m.model\ntrainer_interface.cc(281) LOG(INFO) Saving vocabs: m.vocab\n\n% echo \"I saw a girl with a telescope.\" | spm_encode --model=m.model\n▁I ▁saw ▁a ▁girl ▁with ▁a ▁ te le s c o pe .\n\n% echo \"I saw a girl with a telescope.\" | spm_encode --model=m.model --output_format=id\n9 459 11 939 44 11 4 142 82 8 28 21 132 6\n\n% echo \"9 459 11 939 44 11 4 142 82 8 28 21 132 6\" | spm_decode --model=m.model --input_format=id\nI saw a girl with a telescope.\n```\nYou can find that the original input sentence is restored from the vocabulary id sequence.\n\n### Export vocabulary list\n```\n% spm_export_vocab --model=<model_file> --output=<output file>\n```\n```<output file>``` stores a list of vocabulary and emission log probabilities. The vocabulary id corresponds to the line number in this file.\n\n### Redefine special meta tokens\n  By default, SentencePiece uses Unknown (&lt;unk&gt;), BOS (&lt;s&gt;) and EOS (&lt;/s&gt;) tokens which have the ids of 0, 1, and 2 respectively. We can redefine this mapping in training phase as follows.\n  \n```\n% spm_train --bos_id=0 --eos_id=1 --unk_id=2 --input=... --model_prefix=...\n```\nWhen setting -1 id e.g., ```bos_id=-1```, this special token is disabled. Note that the unknow id cannot be removed. In addition, these ids must start with 0 and be continous. We can define an id for padding (&lt;pad&gt;). Padding id is disabled by default. You can assign an id as ```--pad_id=3```.  \n\nIf you want to assign another special tokens, please see [Use custom symbols](doc/special_symbols.md).\n\n## Advanced topics\n\n* [SentencePiece Experiments](doc/experiments.md)\n* [SentencePieceProcessor C++ API](doc/api.md)\n* [Use custom text normalization rules](doc/normalization.md)\n* [Use custom symbols](doc/special_symbols.md)\n* [Segmentation and training algorithms in detail]\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B812:3BCC6:17E81B:5E6760:6AB92D48"},"text_sha256":"000c4847f7ae5822598951c23a5afa5099a9b9a1ee782363af7a61c179a9f08b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1520","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17E6A96:1C0ED96:6AB92D49"},"commit":{"sha":"20ab5fbbbb8e14074275fd91119fdebc4098225e","url":"https://github.com/google/sentencepiece/commit/20ab5fbbbb8e14074275fd91119fdebc4098225e","date":"2026-06-30T06:49:29Z","author_date":"2026-06-30T06:47:38Z","committer_date":"2026-06-30T06:49:29Z","tree_sha":"d1f6ccb615a843eb6a3f316161d28036409960f5","message_first_line":"Fix Unigram float score overflow and NaN/Inf corruption"},"tree_request_status":200,"tree_rate":{"github_remaining":"1519","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:1802FD1:1C2B243:6AB92D49"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8407,"blob_sha":"90f71e99e2d2170138218731a837292d400d4f4b","priority":0}],"documents":[{"path":"README.md","size":8407,"blob_sha":"90f71e99e2d2170138218731a837292d400d4f4b","priority":0,"status":200,"text":"# SentencePiece\n\n[![Build C++](https://github.com/google/sentencepiece/actions/workflows/cmake.yml/badge.svg)](https://github.com/google/sentencepiece/actions/workflows/cmake.yml)\n[![Build Wheels](https://github.com/google/sentencepiece/actions/workflows/wheel.yml/badge.svg)](https://github.com/google/sentencepiece/actions/workflows/wheel.yml)\n[![GitHub Issues](https://img.shields.io/github/issues/google/sentencepiece.svg)](https://github.com/google/sentencepiece/issues)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sentencepiece)\n[![PyPI version](https://badge.fury.io/py/sentencepiece.svg)](https://badge.fury.io/py/sentencepiece)\n[![PyPi downloads](https://img.shields.io/pypi/dm/sentencepiece?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/sentencepiece/)\n[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)\n[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)\n\nSentencePiece is a fast, lightweight, and unsupervised text tokenizer and detokenizer designed for neural network-based text generation systems (such as Large Language Models) where the vocabulary size is fixed prior to training.\n\nIt implements **subword units**—including **Byte-Pair-Encoding (BPE)** [[Sennrich et al.](https://www.aclweb.org/anthology/P16-1162)] and the **unigram language model** [[Kudo.](https://arxiv.org/abs/1804.10959)]—with the ability to train directly from raw sentences. By treating input text as a raw sequence of Unicode characters, SentencePiece enables a purely end-to-end, language-independent pipeline that completely eliminates the need for language-specific pre- or post-processing.\n\n***This is not an official Google product.***\n\n---\n\n## Quick Start (Python)\n\nSentencePiece provides an easy-to-use Python module. Install it via `pip`:\n\n```bash\npip install sentencepiece\n```\n\n### Basic Example\n\nHere is how to train a model, encode text into tokens/IDs, and decode them back to the original string:\n\n```python\nimport sentencepiece as spm\n\n# 1. Train a model directly from a raw text file.\n# (No pre-tokenization or language-specific preprocessing required!)\nspm.SentencePieceTrainer.train(\n    input='data/botchan.txt', \n    model_prefix='m', \n    vocab_size=1000\n)\n\n# 2. Load the trained model.\nsp = spm.SentencePieceProcessor(model_file='m.model')\n\n# 3. Encode raw text into subword pieces (strings) or vocabulary IDs (integers).\ntext = \"I saw a girl with a telescope.\"\npieces = sp.encode(text, out_type=str)\nids = sp.encode(text, out_type=int)\n\nprint(f\"Pieces: {pieces}\")\n# Output: ['▁I', '▁saw', '▁a', '▁girl', '▁with', '▁a', '▁', 'te', 'le', 's', 'c', 'o', 'pe', '.']\n\nprint(f\"IDs:    {ids}\")\n# Output: [9, 459, 11, 939, 44, 11, 4, 142, 82, 8, 28, 21, 132, 6]\n\n# 4. Decode IDs or pieces back into the original text.\n# The reconstruction is completely lossless and reversible!\nprint(sp.decode(ids))\n# Output: \"I saw a girl with a telescope.\"\n\nprint(sp.decode(pieces))\n# Output: \"I saw a girl with a telescope.\"\n```\n\n---\n\n## Why SentencePiece?\n\n### 1. Reversible & Lossless Tokenization (Whitespace as a Basic Symbol)\nTraditional tokenizers drop whitespace information (e.g., treating `Tokenize(\"World.\")` identically to `Tokenize(\"World .\")`), making detokenization ambiguous and language-dependent. \n\nSentencePiece treats the input text as a raw sequence of Unicode characters. It escapes whitespaces with a meta-symbol `▁` (U+2581) and includes it in the tokenization. This design ensures that **detokenization is a simple, lossless string join operation**, entirely independent of the language:\n```python\n# Lossless detokenization\noriginal_text = \"\".join(pieces).replace(\"▁\", \" \")\n```\n\n### 2. Purely Data-Driven & Language-Independent\nSentencePiece trains tokenization and detokenization models directly from raw sentences. It does **not** require language-specific pre-tokenizers (such as Moses, MeCab, or KyTea). This makes it highly effective for languages without explicit word boundaries, such as Chinese, Japanese, and Korean.\n\n### 3. Subword Regularization & BPE-Dropout\nTo improve the robustness and accuracy of translation and language models, SentencePiece supports on-the-fly subword sampling during training. By sampling different segmentations for the same input text (Subword Regularization for Unigram, BPE-Dropout for BPE), it virtually augments your training data and makes the model more resilient to spelling variations and noise.\n\n```python\n# Sample different segmentations on-the-fly\nfor _ in range(3):\n    print(sp.encode('New York', out_type=str, enable_sampling=True, alpha=0.1, nbest_size=-1))\n# May output:\n# ['▁', 'N', 'e', 'w', '▁York']\n# ['▁New', '▁York']\n# ['▁New', '▁Y', 'o', 'r', 'k']\n```\n\n### 4. Fast, Lightweight, and Self-Contained\n- **Performance**: Written in highly optimized C++. Segmentation speed is around 50,000 sentences per second, with a memory footprint of only ~6MB.\n- **Self-Contained**: The generated `.model` file contains the entire normalization rules, vocabulary mapping, and segmentation model. You are guaranteed to get the exact same tokenization results in any environment (C++, Python, Go, etc.) as long as you use the same model file.\n\n---\n\n## Performance Benchmark (SentencePiece vs. Hugging Face Fast)\n\n### Benchmark Setup\n*   **Environment**: 24-core CPU, Python 3.13.\n*   **Dataset**: Balanced raw multilingual text from FLORES-200 (parallel sentences in English, Chinese, Japanese, and Thai; 11.29 MB, 60,720 lines). CJK and Thai texts are raw and do not contain artificial space delimiters.\n*   **Batch Request Size**: The entire dataset (**60,720 sentences**) is fed as a **single batch request** (a single Python `list[str]`) in one call.\n*   **Metric**: Encoding throughput in **MB/s** (higher is better).\n\n### 1. Unigram Model: T5-base (32k vocab)\n\n| Tokenizer | 1 Thread | 2 Threads | 4 Threads | 8 Threads | 16 Threads | 24 Threads |\n| :--- | :---: | :---: | :---: | :---: | :---: | :---: |\n| **SentencePiece** | **27.41** | **43.83** | **71.62** | **102.08** | **123.33** | **127.60** |\n| Hugging Face Fast | 3.78 | 7.15 | 12.45 | 20.33 | 27.00 | 31.49 |\n\n### 2. BPE Model: Gemma 3 (256k vocab)\n\n| Tokenizer | 1 Thread | 2 Threads | 4 Threads | 8 Threads | 16 Threads | 24 Threads |\n| :--- | :---: | :---: | :---: | :---: | :---: | :---: |\n| **SentencePiece** | **7.44** | **12.82** | **23.03** | **36.66** | **48.65** | **52.43** |\n| Hugging Face Fast | 3.66 | 6.37 | 10.45 | 15.54 | 21.05 | 20.48 |\n\n### Why performance does not scale linearly:\nWhile the core tokenization (C++ or Rust) runs in parallel, the final step of converting the native results (C++ vector of vectors or Rust vector of vectors) into Python objects (`list[list[int]]` or `list[Encoding]`) is **sequential and must be done on Python's main thread (GIL-locked)**. At high thread counts, this single-threaded serialization step becomes the dominant bottleneck, capping the scaling performance.\n\nFor the detailed analysis and single-thread reference comparison, see [Performance Benchmark Details](doc/performance_benchmark.md).\n\nTo run these benchmarks yourself, see the [reproduction instructions and scripts](benchmark/README.md).\n\n---\n\n## Documentation & Resources\n\nFor detailed guides, API references, and advanced usage, please refer to the following resources:\n\n*   [Command Line Interface (CLI) & Build Guide](doc/cli.md)\n*   [C++ API Reference](doc/cpp.md)\n*   [Python API Reference](python/README.md) & [Python Module Directory](python/)\n*   [Python Tokenizer Comparison Cheat Sheet](python/tokenizer_comparison_cheat_sheet.md)\n*   [Performance Benchmark Details](doc/performance_benchmark.md)\n*   [Performance Benchmark Code & Reproduction Guide](benchmark/README.md)\n*   [Training Options Reference](doc/options.md)\n*   [Text Normalization & Custom Rules](doc/normalization.md)\n*   [Special Symbols & Control Tokens](doc/special_symbols.md)\n*   [Vocabulary Piece Constraints](doc/piece_constraints.md)\n*   [Model Protobuf Schema](doc/model_proto.md)\n*   [Docker Deployment Guide](contrib/docker/README.md)\n*   [NLCodec BPE Trainer (Contrib)](contrib/nlcodec/README.md)\n\n---\n\n## License\nSentencePiece is licensed under the [Apache 2.0 License](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C52C:349C76:178FAC:5E0B77:6AB92D47"},"text_sha256":"d5b3b8f0b79151e24069dfc10f68b1441ab91853a04afe4cb993379efa7bd7d6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"stanfordnlp/CoreNLP","input_row":{"repository":"stanfordnlp/CoreNLP","url":"https://github.com/stanfordnlp/CoreNLP","name":"CoreNLP","owner":"stanfordnlp","description":"CoreNLP: A Java suite of core NLP tools for tokenization, sentence segmentation, NER, parsing, coreference, sentiment analysis, etc.","language":"Java","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":10122,"issues":1144,"created_at":"2013-06-27T21:13:49Z","updated_at":"2026-09-27T07:35:26Z","first_commit_at":"2013-06-27T21:44:08Z","last_commit_at":"2026-09-25T05:02:07Z","activity_months":158.91,"ai_ml_match_topics":"natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:50.651Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"stanfordnlp/CoreNLP","visibility":"public","created_at":"2013-06-27T21:13:49Z","updated_at":"2026-09-27T14:19:40Z","private":false,"fork":false,"archived":false,"stargazers_count":10121,"open_issues_count":192,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1518","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"082B:8656E:17E2DA2:1C0AD57:6AB92D4A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1517","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:1817A1A:1C3FE1F:6AB92D4B"},"commit":{"sha":"258e5f049b62fd373e20c5df74fbb48cb6ce4fbc","url":"https://github.com/stanfordnlp/CoreNLP/commit/258e5f049b62fd373e20c5df74fbb48cb6ce4fbc","date":"2018-05-24T23:45:24Z","author_date":"2018-05-24T23:45:24Z","committer_date":"2018-05-24T23:45:24Z","tree_sha":"b434bbbab2568a17a1e3bf6bd702d595c84af0de","message_first_line":"update path"},"tree_request_status":200,"tree_rate":{"github_remaining":"1516","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17E6BA7:1C0EEE1:6AB92D4B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6855,"blob_sha":"8e4fc82495a06f10b526a0bd571c66c9a0e43290","priority":0}],"documents":[{"path":"README.md","size":6855,"blob_sha":"8e4fc82495a06f10b526a0bd571c66c9a0e43290","priority":0,"status":200,"text":"# Stanford CoreNLP\n\n[![Build Status](https://travis-ci.org/stanfordnlp/CoreNLP.svg?branch=master)](https://travis-ci.org/stanfordnlp/CoreNLP)\n[![Maven Central](https://img.shields.io/maven-central/v/edu.stanford.nlp/stanford-corenlp.svg)](https://mvnrepository.com/artifact/edu.stanford.nlp/stanford-corenlp)\n[![Twitter](https://img.shields.io/twitter/follow/stanfordnlp.svg?style=social&label=Follow)](https://twitter.com/stanfordnlp/)\n\nStanford CoreNLP provides a set of natural language analysis tools written in Java. It can take raw human language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize and interpret dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases or word dependencies, and indicate which noun phrases refer to the same entities. It was originally developed for English, but now also provides varying levels of support for (Modern Standard) Arabic, (mainland) Chinese, French, German, and Spanish. Stanford CoreNLP is an integrated framework, which make it very easy to apply a bunch of language analysis tools to a piece of text. Starting from plain text, you can run all the tools with just two lines of code. Its analyses provide the foundational building blocks for higher-level and domain-specific text understanding applications. Stanford CoreNLP is a set of stable and well-tested natural language processing tools, widely used by various groups in academia, industry, and government. The tools variously use rule-based, probabilistic machine learning, and deep learning components.\n\nThe Stanford CoreNLP code is written in Java and licensed under the GNU General Public License (v3 or later). Note that this is the full GPL, which allows many free uses, but not its use in proprietary software that you distribute to others.\n\n### Build Instructions\n\nSeveral times a year we distribute a new version of the software, which corresponds to a stable commit.\n\nDuring the time between releases, one can always use the latest, under development version of our code.\n\nHere are some helpful instructions to use the latest code:\n\n#### Provided build\n\nSometimes we will provide updated jars here which have the latest version of the code.\n\nAt present [the current released version of the code](https://stanfordnlp.github.io/CoreNLP/#download) is our most recent released jar, though you can always build the very latest from GitHub HEAD yourself.\n\n<!---\n[stanford-corenlp.jar (last built: 2017-04-14)](http://nlp.stanford.edu/software/stanford-corenlp-2017-04-14-build.jar)\n-->\n\n#### Build with Ant\n\n1. Make sure you have Ant installed, details here: [http://ant.apache.org/](http://ant.apache.org/)\n2. Compile the code with this command: `cd CoreNLP ; ant`\n3. Then run this command to build a jar with the latest version of the code: `cd CoreNLP/classes ; jar -cf ../stanford-corenlp.jar edu`\n4. This will create a new jar called stanford-corenlp.jar in the CoreNLP folder which contains the latest code\n5. The dependencies that work with the latest code are in CoreNLP/lib and CoreNLP/liblocal, so make sure to include those in your CLASSPATH.\n6. When using the latest version of the code make sure to download the latest versions of the [corenlp-models](http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar), [english-models](http://nlp.stanford.edu/software/stanford-english-corenlp-models-current.jar), and [english-models-kbp](http://nlp.stanford.edu/software/stanford-english-kbp-corenlp-models-current.jar) and include them in your CLASSPATH.  If you are processing languages other than English, make sure to download the latest version of the models jar for the language you are interested in.\n\n#### Build with Maven\n\n1. Make sure you have Maven installed, details here: [https://maven.apache.org/](https://maven.apache.org/)\n2. If you run this command in the CoreNLP directory: `mvn package` , it should run the tests and build this jar file: `CoreNLP/target/stanford-corenlp-3.7.0.jar`\n3. When using the latest version of the code make sure to download the latest versions of the [corenlp-models](http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar), [english-models](http://nlp.stanford.edu/software/stanford-english-corenlp-models-current.jar), and [english-models-kbp](http://nlp.stanford.edu/software/stanford-english-kbp-corenlp-models-current.jar) and include them in your CLASSPATH.  If you are processing languages other than English, make sure to download the latest version of the models jar for the language you are interested in.  \n4. If you want to use Stanford CoreNLP as part of a Maven project you need to install the models jars into your Maven repository.  Below is a sample command for installing the Spanish models jar.  For other languages just change the language name in the command.  To install `stanford-corenlp-models-current.jar` you will need to set `-Dclassifier=models`.  Here is the sample command for Spanish: `mvn install:install-file -Dfile=/location/of/stanford-spanish-corenlp-models-current.jar -DgroupId=edu.stanford.nlp -DartifactId=stanford-corenlp -Dversion=3.9.1 -Dclassifier=models-spanish -Dpackaging=jar` \n\n### Useful resources\n\nYou can find releases of Stanford CoreNLP on [Maven Central](https://search.maven.org/#artifactdetails%7Cedu.stanford.nlp%7Cstanford-corenlp%7C3.7.0%7Cjar).\n\nYou can find more explanation and documentation on [the Stanford CoreNLP homepage](http://stanfordnlp.github.io/CoreNLP/).\n\nThe most recent models associated with the code in the HEAD of this repository can be found [here](http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar).\n\nSome of the larger (English) models -- like the shift-reduce parser and WikiDict -- are not distributed with our default models jar.\nThe most recent version of these models can be found [here](http://nlp.stanford.edu/software/stanford-english-corenlp-models-current.jar).\n\nWe distribute resources for other languages as well, including [Arabic models](http://nlp.stanford.edu/software/stanford-arabic-corenlp-models-current.jar),\n[Chinese models](http://nlp.stanford.edu/software/stanford-chinese-corenlp-models-current.jar),\n[French models](http://nlp.stanford.edu/software/stanford-french-corenlp-models-current.jar),\n[German models](http://nlp.stanford.edu/software/stanford-german-corenlp-models-current.jar),\nand [Spanish models](http://nlp.stanford.edu/software/stanford-spanish-corenlp-models-current.jar).\n\nFor information about making contributions to Stanford CoreNLP, see the file [CONTRIBUTING.md](CONTRIBUTING.md).\n\nQuestions about CoreNLP can either be posted on StackOverflow with the tag [stanford-nlp](http://stackoverflow.com/questions/tagged/stanford-nlp),\n  or on the [mailing lists](https://nlp.stanford.edu/software/#Mail).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D36A:727CE:175D8C:5DDDA0:6AB92D1C"},"text_sha256":"d85371542bc0df1ef44957e397f765144e5034ee35c7e1e1a1cdd6b1953a69d1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1515","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17CFF62:1BF8559:6AB92D4C"},"commit":{"sha":"c03b4be7e8cc3f9e024a2d4acdc3082d49312eca","url":"https://github.com/stanfordnlp/CoreNLP/commit/c03b4be7e8cc3f9e024a2d4acdc3082d49312eca","date":"2026-06-28T21:44:42Z","author_date":"2026-06-28T21:44:42Z","committer_date":"2026-06-28T21:44:42Z","tree_sha":"704265bb13ce798217bd65abb8c3555e43d496e9","message_first_line":"Unnecessary cast left a warning"},"tree_request_status":200,"tree_rate":{"github_remaining":"1514","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:18031EA:1C2B4C5:6AB92D4C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9303,"blob_sha":"387f9f4602bd525ac8f814f00e5245f36563af6a","priority":0},{"path":"SECURITY.md","size":166,"blob_sha":"d34fee67f064a9f54e652253a6d1c7cce78aa686","priority":1}],"documents":[{"path":"README.md","size":9303,"blob_sha":"387f9f4602bd525ac8f814f00e5245f36563af6a","priority":0,"status":200,"text":"# Stanford CoreNLP\n\n[![Run Tests](https://github.com/stanfordnlp/CoreNLP/actions/workflows/run-tests.yaml/badge.svg)](https://github.com/stanfordnlp/CoreNLP/actions/workflows/run-tests.yaml)\n[![Maven Central](https://img.shields.io/maven-central/v/edu.stanford.nlp/stanford-corenlp.svg)](https://mvnrepository.com/artifact/edu.stanford.nlp/stanford-corenlp)\n[![Twitter](https://img.shields.io/twitter/follow/stanfordnlp.svg?style=social&label=Follow)](https://twitter.com/stanfordnlp/)\n\n[Stanford CoreNLP](http://stanfordnlp.github.io/CoreNLP/) provides a set of natural language analysis tools written in Java. It can take raw human language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize and interpret dates, times, and numeric quantities, mark up the structure of sentences in terms of syntactic phrases or dependencies, and indicate which noun phrases refer to the same entities. It was originally developed for English, but now also provides varying levels of support for (Modern Standard) Arabic, (mainland) Chinese, French, German, Hungarian, Italian, and Spanish. Stanford CoreNLP is an integrated framework, which makes it very easy to apply a bunch of language analysis tools to a piece of text. Starting from plain text, you can run all the tools with just two lines of code. Its analyses provide the foundational building blocks for higher-level and domain-specific text understanding applications. Stanford CoreNLP is a set of stable and well-tested natural language processing tools, widely used by various groups in academia, industry, and government. The tools variously use rule-based, probabilistic machine learning, and deep learning components.\n\nThe Stanford CoreNLP code is written in Java and licensed under the GNU General Public License (v2 or later). Note that this is the full GPL, which allows many free uses, but not its use in proprietary software that you distribute to others.\n\n### Build Instructions\n\nSeveral times a year we distribute a new version of the software, which corresponds to a stable commit.\n\nDuring the time between releases, one can always use the latest, under development version of our code.\n\nHere are some helpful instructions to use the latest code:\n\n#### Provided build\n\nSometimes we will provide updated jars here which have the latest version of the code.\n\nAt present, [the current released version of the code](https://stanfordnlp.github.io/CoreNLP/#download) is our most recent released jar, though you can always build the very latest from GitHub HEAD yourself.\n\n<!---\n[stanford-corenlp.jar (last built: 2017-04-14)](http://nlp.stanford.edu/software/stanford-corenlp-2017-04-14-build.jar)\n-->\n\n#### Build with Ant\n\n1. Make sure you have Ant installed, details here: [http://ant.apache.org/](http://ant.apache.org/)\n2. Compile the code with this command: `cd CoreNLP ; ant`\n3. Then run this command to build a jar with the latest version of the code: `cd CoreNLP/classes ; jar -cf ../stanford-corenlp.jar edu`\n4. This will create a new jar called stanford-corenlp.jar in the CoreNLP folder which contains the latest code\n5. The dependencies that work with the latest code are in CoreNLP/lib and CoreNLP/liblocal, so make sure to include those in your CLASSPATH.\n6. When using the latest version of the code make sure to download the latest versions of the [corenlp-models](http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar), [english-models](http://nlp.stanford.edu/software/stanford-english-corenlp-models-current.jar), and [english-models-kbp](http://nlp.stanford.edu/software/stanford-english-kbp-corenlp-models-current.jar) and include them in your CLASSPATH.  If you are processing languages other than English, make sure to download the latest version of the models jar for the language you are interested in.\n\n#### Build with Maven\n\n1. Make sure you have Maven installed, details here: [https://maven.apache.org/](https://maven.apache.org/)\n2. If you run this command in the CoreNLP directory: `mvn package` , it should run the tests and build this jar file: `CoreNLP/target/stanford-corenlp-4.5.4.jar`\n3. When using the latest version of the code make sure to download the latest versions of the [corenlp-models](http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar), [english-extra-models](http://nlp.stanford.edu/software/stanford-english-extra-corenlp-models-current.jar), and [english-kbp-models](http://nlp.stanford.edu/software/stanford-english-kbp-corenlp-models-current.jar) and include them in your CLASSPATH.  If you are processing languages other than English, make sure to download the latest version of the models jar for the language you are interested in.  \n4. If you want to use Stanford CoreNLP as part of a Maven project you need to install the models jars into your Maven repository.  Below is a sample command for installing the Spanish models jar.  For other languages just change the language name in the command.  To install `stanford-corenlp-models-current.jar` you will need to set `-Dclassifier=models`.  Here is the sample command for Spanish: `mvn install:install-file -Dfile=/location/of/stanford-spanish-corenlp-models-current.jar -DgroupId=edu.stanford.nlp -DartifactId=stanford-corenlp -Dversion=4.5.4 -Dclassifier=models-spanish -Dpackaging=jar`\n\n#### Models\n\nThe models jars that correspond to the latest code can be found in the table below.\n\nSome of the larger (English) models -- like the shift-reduce parser and WikiDict -- are not distributed with our default models jar.\nThese require downloading the English (extra) and English (kbp) jars. Resources for other languages require usage of the corresponding\nmodels jar.\n\nThe best way to get the models is to use git-lfs and clone them from Hugging Face Hub.\n\nFor instance, to get the French models, run the following commands:\n\n```\n# Make sure you have git-lfs installed\n# (https://git-lfs.github.com/)\ngit lfs install\n\ngit clone https://huggingface.co/stanfordnlp/corenlp-french\n```\n\nThe jars can be directly downloaded from the links below or the Hugging Face Hub page as well. \n\n| Language | Model Jar | Last Updated |\n| --- | --- | --- |\n| Arabic  | [download](https://nlp.stanford.edu/software/stanford-arabic-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-arabic/tree/main) | 4.5.6 |\n| Chinese | [download](https://nlp.stanford.edu/software/stanford-chinese-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-chinese/tree/main)| 4.5.6 |\n| English (extra) | [download](https://nlp.stanford.edu/software/stanford-english-extra-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-english-extra/tree/main) | 4.5.6 |\n| English (KBP) | [download](https://nlp.stanford.edu/software/stanford-english-kbp-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-english-kbp/tree/main) | 4.5.6 |\n| French | [download](https://nlp.stanford.edu/software/stanford-french-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-french/tree/main) | 4.5.6 |\n| German | [download](https://nlp.stanford.edu/software/stanford-german-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-german/tree/main) | 4.5.6 |\n| Hungarian | [download](https://nlp.stanford.edu/software/stanford-hungarian-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-hungarian/tree/main) | 4.5.6 |\n| Italian | [download](https://nlp.stanford.edu/software/stanford-italian-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-italian/tree/main)| 4.5.6 |\n| Spanish | [download](https://nlp.stanford.edu/software/stanford-spanish-corenlp-models-current.jar) [(HF Hub)](https://huggingface.co/stanfordnlp/corenlp-spanish/tree/main)| 4.5.6 |\n\nThank you to [Hugging Face](https://huggingface.co/) for helping with our hosting!\n\n### Install by Gradle\n\nIf you don't know Gradle itself, see official site: https://gradle.org\n\nWrite the following in your build.gradle according to [Maven Central](https://search.maven.org/artifact/edu.stanford.nlp/stanford-corenlp/4.5.5/jar):\n\n```Gradle\ndependencies {\n    implementation 'edu.stanford.nlp:stanford-corenlp:4.5.5'\n}\n```\n\nIf you want to analyse English, add following:\n\n```Gradle\n    implementation \"edu.stanford.nlp:stanford-corenlp:4.5.5:models\"\n    implementation \"edu.stanford.nlp:stanford-corenlp:4.5.5:models-english\"\n    implementation \"edu.stanford.nlp:stanford-corenlp:4.5.5:models-english-kbp\"\n```\n\nIf you use another version, replace \"4.5.5\" to a version you use.\n\n### Useful resources\n\nYou can find releases of Stanford CoreNLP on [Maven Central](https://search.maven.org/artifact/edu.stanford.nlp/stanford-corenlp/4.5.4/jar).\n\nYou can find more explanation and documentation on [the Stanford CoreNLP homepage](http://stanfordnlp.github.io/CoreNLP/).\n\nFor information about making contributions to Stanford CoreNLP, see the file [CONTRIBUTING.md](CONTRIBUTING.md).\n\nQuestions about CoreNLP can either be posted on StackOverflow with the tag [stanford-nlp](http://stackoverflow.com/questions/tagged/stanford-nlp),\n  or on the [mailing lists](https://nlp.stanford.edu/software/#Mail).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C18E:3CC8A:17EFAB:5E6FDB:6AB92D4C"},"text_sha256":"30ac4e04eac2efa15d3d6d6f0f4705b0c979ddc9f9d7a084bf252622256f0dbd"},{"path":"SECURITY.md","size":166,"blob_sha":"d34fee67f064a9f54e652253a6d1c7cce78aa686","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report security issues on our github: https://github.com/stanfordnlp/CoreNLP/security/advisories?state=Triage\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F9E:2B291E:18524C:5ED2A5:6AB92D4C"},"text_sha256":"6fcc5d7df801ed93855b207b337da1c952604a7449aa38e39f4a18b742bfe576"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"sloria/TextBlob","input_row":{"repository":"sloria/TextBlob","url":"https://github.com/sloria/TextBlob","name":"TextBlob","owner":"sloria","description":"Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":9548,"issues":279,"created_at":"2013-06-30T18:29:18Z","updated_at":"2026-09-26T22:26:07Z","first_commit_at":"2013-06-30T18:07:53Z","last_commit_at":"2026-09-22T00:08:38Z","activity_months":158.71000000000001,"ai_ml_match_topics":"natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:54.059Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"sloria/TextBlob","visibility":"public","created_at":"2013-06-30T18:29:18Z","updated_at":"2026-09-26T22:26:07Z","private":false,"fork":false,"archived":false,"stargazers_count":9548,"open_issues_count":71,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1513","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EC:278AC2:187A284:1CA28E5:6AB92D4E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1512","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:181A0D5:1C42563:6AB92D4E"},"commit":{"sha":"b436b76e5b87cd65a7fcd29b85a660bacf6b47a1","url":"https://github.com/sloria/TextBlob/commit/b436b76e5b87cd65a7fcd29b85a660bacf6b47a1","date":"2018-04-12T02:10:32Z","author_date":"2018-04-12T02:10:32Z","committer_date":"2018-04-12T02:10:32Z","tree_sha":"85c92fdc50a3bb94ff04d0a064840787f1474d97","message_first_line":"Merge pull request #199 from sloria/pyup-update-sphinx-1.6.6-to-1.7.2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1511","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:17FC013:1C2427A:6AB92D4E"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3236,"blob_sha":"ec76ed55a870fb89571c919b0043ba4bf3bf53fb","priority":0}],"documents":[{"path":"README.rst","size":3236,"blob_sha":"ec76ed55a870fb89571c919b0043ba4bf3bf53fb","priority":0,"status":200,"text":"\nTextBlob: Simplified Text Processing\n====================================\n\n.. image:: https://badge.fury.io/py/textblob.svg\n    :target: http://badge.fury.io/py/textblob\n    :alt: Latest version\n\n.. image:: https://travis-ci.org/sloria/TextBlob.svg?branch=master\n    :target: https://travis-ci.org/sloria/TextBlob\n    :alt: Travis-CI\n\nHomepage: `https://textblob.readthedocs.io/ <https://textblob.readthedocs.io/>`_\n\n`TextBlob` is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.\n\n\n.. code-block:: python\n\n    from textblob import TextBlob\n\n    text = '''\n    The titular threat of The Blob has always struck me as the ultimate movie\n    monster: an insatiably hungry, amoeba-like mass able to penetrate\n    virtually any safeguard, capable of--as a doomed doctor chillingly\n    describes it--\"assimilating flesh on contact.\n    Snide comparisons to gelatin be damned, it's a concept with the most\n    devastating of potential consequences, not unlike the grey goo scenario\n    proposed by technological theorists fearful of\n    artificial intelligence run rampant.\n    '''\n\n    blob = TextBlob(text)\n    blob.tags           # [('The', 'DT'), ('titular', 'JJ'),\n                        #  ('threat', 'NN'), ('of', 'IN'), ...]\n\n    blob.noun_phrases   # WordList(['titular threat', 'blob',\n                        #            'ultimate movie monster',\n                        #            'amoeba-like mass', ...])\n\n    for sentence in blob.sentences:\n        print(sentence.sentiment.polarity)\n    # 0.060\n    # -0.341\n\n    blob.translate(to=\"es\")  # 'La amenaza titular de The Blob...'\n\nTextBlob stands on the giant shoulders of `NLTK`_ and `pattern`_, and plays nicely with both.\n\nFeatures\n--------\n\n- Noun phrase extraction\n- Part-of-speech tagging\n- Sentiment analysis\n- Classification (Naive Bayes, Decision Tree)\n- Language translation and detection powered by Google Translate\n- Tokenization (splitting text into words and sentences)\n- Word and phrase frequencies\n- Parsing\n- `n`-grams\n- Word inflection (pluralization and singularization) and lemmatization\n- Spelling correction\n- Add new models or languages through extensions\n- WordNet integration\n\nGet it now\n----------\n::\n\n    $ pip install -U textblob\n    $ python -m textblob.download_corpora\n\nExamples\n--------\n\nSee more examples at the `Quickstart guide`_.\n\n.. _`Quickstart guide`: https://textblob.readthedocs.io/en/latest/quickstart.html#quickstart\n\n\nDocumentation\n-------------\n\nFull documentation is available at https://textblob.readthedocs.io/.\n\nRequirements\n------------\n\n- Python >= 2.7 or >= 3.4\n\nProject Links\n-------------\n\n- Docs: https://textblob.readthedocs.io/\n- Changelog: https://textblob.readthedocs.io/en/latest/changelog.html\n- PyPI: https://pypi.python.org/pypi/TextBlob\n- Issues: https://github.com/sloria/TextBlob/issues\n\nLicense\n-------\n\nMIT licensed. See the bundled `LICENSE <https://github.com/sloria/TextBlob/blob/master/LICENSE>`_ file for more details.\n\n.. _pattern: http://www.clips.ua.ac.be/pattern\n.. _NLTK: http://nltk.org/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E92:A58F2:1771CE:5DF234:6AB92D4E"},"text_sha256":"01ab42a9a4f920f4e34280e2f9e7ad8a2b66f964808a5a58bba54ae4f83ff6af"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1510","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0851:3203A7:17ADF17:1BD60F7:6AB92D4F"},"commit":{"sha":"7cfef30e0c58a05311adbcb52f578835eb37288c","url":"https://github.com/sloria/TextBlob/commit/7cfef30e0c58a05311adbcb52f578835eb37288c","date":"2026-06-22T20:57:32Z","author_date":"2026-06-22T20:57:32Z","committer_date":"2026-06-22T20:57:32Z","tree_sha":"d86b7853686f87284a940a3caa2d550df201367f","message_first_line":"[pre-commit.ci] pre-commit autoupdate (#574)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1509","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:17ADF64:1BD6144:6AB92D50"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3018,"blob_sha":"cdef58d28062078be4e5511714b4359606b1c6a4","priority":0},{"path":"SECURITY.md","size":192,"blob_sha":"92ec2bb600a1e1f3ad8666d355b485b696332790","priority":1}],"documents":[{"path":"README.rst","size":3018,"blob_sha":"cdef58d28062078be4e5511714b4359606b1c6a4","priority":0,"status":200,"text":"\nTextBlob: Simplified Text Processing\n====================================\n\n.. image:: https://badgen.net/pypi/v/TextBlob\n    :target: https://pypi.org/project/textblob/\n    :alt: Latest version\n\n.. image:: https://github.com/sloria/TextBlob/actions/workflows/build-release.yml/badge.svg\n    :target: https://github.com/sloria/TextBlob/actions/workflows/build-release.yml\n    :alt: Build status\n\n\nHomepage: `https://textblob.readthedocs.io/ <https://textblob.readthedocs.io/>`_\n\n`TextBlob` is a Python library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, and more.\n\n\n.. code-block:: python\n\n    from textblob import TextBlob\n\n    text = \"\"\"\n    The titular threat of The Blob has always struck me as the ultimate movie\n    monster: an insatiably hungry, amoeba-like mass able to penetrate\n    virtually any safeguard, capable of--as a doomed doctor chillingly\n    describes it--\"assimilating flesh on contact.\n    Snide comparisons to gelatin be damned, it's a concept with the most\n    devastating of potential consequences, not unlike the grey goo scenario\n    proposed by technological theorists fearful of\n    artificial intelligence run rampant.\n    \"\"\"\n\n    blob = TextBlob(text)\n    blob.tags  # [('The', 'DT'), ('titular', 'JJ'),\n    #  ('threat', 'NN'), ('of', 'IN'), ...]\n\n    blob.noun_phrases  # WordList(['titular threat', 'blob',\n    #            'ultimate movie monster',\n    #            'amoeba-like mass', ...])\n\n    for sentence in blob.sentences:\n        print(sentence.sentiment.polarity)\n    # 0.060\n    # -0.341\n\n\nTextBlob stands on the giant shoulders of `NLTK`_ and `pattern`_, and plays nicely with both.\n\nFeatures\n--------\n\n- Noun phrase extraction\n- Part-of-speech tagging\n- Sentiment analysis\n- Classification (Naive Bayes, Decision Tree)\n- Tokenization (splitting text into words and sentences)\n- Word and phrase frequencies\n- Parsing\n- `n`-grams\n- Word inflection (pluralization and singularization) and lemmatization\n- Spelling correction\n- Add new models or languages through extensions\n- WordNet integration\n\nGet it now\n----------\n::\n\n    $ pip install -U textblob\n    $ python -m textblob.download_corpora\n\nExamples\n--------\n\nSee more examples at the `Quickstart guide`_.\n\n.. _`Quickstart guide`: https://textblob.readthedocs.io/en/latest/quickstart.html#quickstart\n\n\nDocumentation\n-------------\n\nFull documentation is available at https://textblob.readthedocs.io/.\n\nProject Links\n-------------\n\n- Docs: https://textblob.readthedocs.io/\n- Changelog: https://textblob.readthedocs.io/en/latest/changelog.html\n- PyPI: https://pypi.python.org/pypi/TextBlob\n- Issues: https://github.com/sloria/TextBlob/issues\n\nLicense\n-------\n\nMIT licensed. See the bundled `LICENSE <https://github.com/sloria/TextBlob/blob/master/LICENSE>`_ file for more details.\n\n.. _pattern: https://github.com/clips/pattern/\n.. _NLTK: http://nltk.org/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EFE:3BCC6:17E86C:5E6862:6AB92D50"},"text_sha256":"4b50deef7acd30ed290810790753bf44273b038916fddadd9c9e7b1bc06823f1"},{"path":"SECURITY.md","size":192,"blob_sha":"92ec2bb600a1e1f3ad8666d355b485b696332790","priority":1,"status":200,"text":"# Security Contact Information\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1758:3FD49:1798D5:5E195E:6AB92D50"},"text_sha256":"11b29af3fbc59455392f530459fbbc7e2cede796e385e3bfa06c029977306c02"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"deanmalmgren/textract","input_row":{"repository":"deanmalmgren/textract","url":"https://github.com/deanmalmgren/textract","name":"textract","owner":"deanmalmgren","description":"extract text from any document. no muss. no fuss.","language":"HTML","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4724,"issues":271,"created_at":"2014-07-03T20:36:59Z","updated_at":"2026-09-27T06:40:07Z","first_commit_at":"2014-07-03T20:36:59Z","last_commit_at":"2026-09-01T12:05:09Z","activity_months":145.94999999999999,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:56.901Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"deanmalmgren/textract","visibility":"public","created_at":"2014-07-03T20:36:59Z","updated_at":"2026-09-27T06:40:07Z","private":false,"fork":false,"archived":false,"stargazers_count":4724,"open_issues_count":57,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1508","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0842:E80A6:17C13AF:1BE995A:6AB92D50"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1507","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080D:2BC4E5:183C74C:1C64830:6AB92D51"},"commit":{"sha":"ce1bf764e55cc95211d8c10bd7a204504cfb6c3c","url":"https://github.com/deanmalmgren/textract/commit/ce1bf764e55cc95211d8c10bd7a204504cfb6c3c","date":"2018-04-20T19:14:46Z","author_date":"2018-04-20T19:14:46Z","committer_date":"2018-04-20T19:14:46Z","tree_sha":"aa49071b40f1e9954b69aaa9ed968bccd47cc6a0","message_first_line":"Add .tsv and .tab support to index doc"},"tree_request_status":200,"tree_rate":{"github_remaining":"1506","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17EA707:1C12C02:6AB92D51"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1603,"blob_sha":"7868055b3b30adaf5b969a3656fe320844c6d952","priority":0}],"documents":[{"path":"README.rst","size":1603,"blob_sha":"7868055b3b30adaf5b969a3656fe320844c6d952","priority":0,"status":200,"text":".. NOTES FOR CREATING A RELEASE:\n..\n..   * bumpversion {major|minor|patch}\n..   * git push && git push --tags\n..   * python setup.py sdist upload\n..   * convert into release https://github.com/deanmalmgren/textract/releases\n\ntextract\n========\n\nExtract text from any document. No muss. No fuss.\n\n`Full documentation <http://textract.readthedocs.org>`__.\n\n|Build Status| |Version| |Downloads| |Test Coverage| |Documentation Status|\n|Updates| |Stars| |Forks|\n\n.. |Build Status| image:: https://travis-ci.org/deanmalmgren/textract.svg?branch=master\n   :target: https://travis-ci.org/deanmalmgren/textract\n\n.. |Version| image:: https://img.shields.io/pypi/v/textract.svg\n   :target: https://warehouse.python.org/project/textract/\n\n.. |Downloads| image:: https://img.shields.io/pypi/dm/textract.svg\n   :target: https://warehouse.python.org/project/textract/\n\n.. |Test Coverage| image:: https://coveralls.io/repos/deanmalmgren/textract/badge.png\n   :target: https://coveralls.io/r/deanmalmgren/textract\n\n.. |Documentation Status| image:: https://readthedocs.org/projects/textract/badge/?version=latest\n   :target: https://readthedocs.org/projects/textract/?badge=latest\n\n.. |Updates| image:: https://pyup.io/repos/github/deanmalmgren/textract/shield.svg\n    :target: https://pyup.io/repos/github/deanmalmgren/textract/\n\n.. |Stars| image:: https://img.shields.io/github/stars/deanmalmgren/textract.svg\n    :target: https://github.com/deanmalmgren/textract/stargazers\n\n.. |Forks| image:: https://img.shields.io/github/forks/deanmalmgren/textract.svg\n    :target: https://github.com/deanmalmgren/textract/network\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F34C:24970A:186066:5EDE66:6AB92D50"},"text_sha256":"a0888cb8339b2662779995a20c896af148877f65d8d920511083b3e81c9ce9c1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1505","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17EE783:1C1647B:6AB92D52"},"commit":{"sha":"5bede6515f1fabd9bb9ca76547580e927ecb6a0b","url":"https://github.com/deanmalmgren/textract/commit/5bede6515f1fabd9bb9ca76547580e927ecb6a0b","date":"2026-05-07T01:32:22Z","author_date":"2026-05-07T01:32:22Z","committer_date":"2026-05-07T01:32:22Z","tree_sha":"ab0af4889a4e40db746d5fff8452219bac02869d","message_first_line":"fix(#185): resolve missing wheel (#560)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1504","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:181A36A:1C42896:6AB92D52"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1647,"blob_sha":"889d5732b15cabb4470b2aaaadc314f3e64c1491","priority":0}],"documents":[{"path":"README.rst","size":1647,"blob_sha":"889d5732b15cabb4470b2aaaadc314f3e64c1491","priority":0,"status":200,"text":".. NOTES FOR CREATING A RELEASE:\n..\n..   * bumpversion {major|minor|patch}\n..   * git push && git push --tags\n..   * twine upload -r textract dist/*\n..   * convert into release https://github.com/deanmalmgren/textract/releases\n\ntextract\n========\n\nExtract text from any document. No muss. No fuss.\n\n`Full documentation <http://textract.readthedocs.org>`__.\n\n|Build Status| |Version| |Downloads| |Test Coverage| |Documentation Status|\n|Updates| |Stars| |Forks|\n\n.. |Build Status| image:: https://travis-ci.org/deanmalmgren/textract.svg?branch=master\n   :target: https://travis-ci.org/deanmalmgren/textract\n\n.. |Version| image:: https://img.shields.io/pypi/v/textract.svg\n   :target: https://warehouse.python.org/project/textract/\n\n.. |Downloads| image:: https://img.shields.io/pypi/dm/textract.svg\n   :target: https://warehouse.python.org/project/textract/\n\n.. |Test Coverage| image:: https://coveralls.io/repos/github/deanmalmgren/textract/badge.svg?branch=master\n    :target: https://coveralls.io/github/deanmalmgren/textract?branch=master\n\n.. |Documentation Status| image:: https://readthedocs.org/projects/textract/badge/?version=latest\n   :target: https://readthedocs.org/projects/textract/?badge=latest\n\n.. |Updates| image:: https://pyup.io/repos/github/deanmalmgren/textract/shield.svg\n    :target: https://pyup.io/repos/github/deanmalmgren/textract/\n\n.. |Stars| image:: https://img.shields.io/github/stars/deanmalmgren/textract.svg\n    :target: https://github.com/deanmalmgren/textract/stargazers\n\n.. |Forks| image:: https://img.shields.io/github/forks/deanmalmgren/textract.svg\n    :target: https://github.com/deanmalmgren/textract/network\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADB2:35999:17A93F:5E2A78:6AB92D52"},"text_sha256":"6c70badbe4c33ada17534d8f8eebeefbc069ae149da2f5cb00ad8f82c4cdfa38"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"bentrevett/pytorch-sentiment-analysis","input_row":{"repository":"bentrevett/pytorch-sentiment-analysis","url":"https://github.com/bentrevett/pytorch-sentiment-analysis","name":"pytorch-sentiment-analysis","owner":"bentrevett","description":"Tutorials on getting started with PyTorch and TorchText for sentiment analysis.","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4611,"issues":111,"created_at":"2017-12-13T13:36:40Z","updated_at":"2026-09-24T00:41:26Z","first_commit_at":"2017-12-13T13:36:41Z","last_commit_at":"2024-01-22T21:45:38Z","activity_months":73.299999999999997,"ai_ml_match_topics":"natural-language-processing; nlp; transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:50:59.308Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"bentrevett/pytorch-sentiment-analysis","visibility":"public","created_at":"2017-12-13T13:36:40Z","updated_at":"2026-09-24T00:41:26Z","private":false,"fork":false,"archived":false,"stargazers_count":4611,"open_issues_count":7,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1503","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089B:B1202:17B8E4E:1BE0A08:6AB92D53"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1502","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:179C7EB:1BC4CBA:6AB92D53"},"commit":{"sha":"51cdb909c8d8b89b862345521af23a602e1a56ae","url":"https://github.com/bentrevett/pytorch-sentiment-analysis/commit/51cdb909c8d8b89b862345521af23a602e1a56ae","date":"2018-03-06T15:50:02Z","author_date":"2018-03-06T15:50:02Z","committer_date":"2018-03-06T15:50:02Z","tree_sha":"8049e4579c7c7f492b1c1c35b8e724a88345752b","message_first_line":"parameter search now ran with a bash script"},"tree_request_status":200,"tree_rate":{"github_remaining":"1501","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081B:3203A7:17AE1AE:1BD63FF:6AB92D54"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":285,"blob_sha":"75efab7820e7857e139c482c4f5fe5ecfbc8b69b","priority":0}],"documents":[{"path":"README.md","size":285,"blob_sha":"75efab7820e7857e139c482c4f5fe5ecfbc8b69b","priority":0,"status":200,"text":"# pytorch-sentiment-analysis\nSome examples on sentiment analysis using PyTorch.\n\nIncludes:\n- imdb classification\n- imdb parameter search\n- born again networks for imdb classification (in progress)\n\nPlanned:\n- Kaggle Toxic Classification\n- More models, RNN w/ self-attention, CNN, etc.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCB6:38C7FC:17FF8D:5AACEF:6AB92D53"},"text_sha256":"1a0ebc93196246c3d7f70dc2b6b6ae9983cba630f2d6499a1c779be443ffa509"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1500","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:1817FCA:1C404F4:6AB92D54"},"commit":{"sha":"329f654b2cfaed22fee432569ebd7a2674584f79","url":"https://github.com/bentrevett/pytorch-sentiment-analysis/commit/329f654b2cfaed22fee432569ebd7a2674584f79","date":"2024-01-22T21:45:38Z","author_date":"2024-01-22T21:45:38Z","committer_date":"2024-01-22T21:45:38Z","tree_sha":"4b911b2bf29d309eb9c57da6c0afd75da75e4167","message_first_line":"actually fix readme links"},"tree_request_status":200,"tree_rate":{"github_remaining":"1499","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:180F5E7:1C3726E:6AB92D54"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3870,"blob_sha":"c3049540cec422b52eb5bc3715cb702695bebe64","priority":0}],"documents":[{"path":"README.md","size":3870,"blob_sha":"c3049540cec422b52eb5bc3715cb702695bebe64","priority":0,"status":200,"text":"# PyTorch Sentiment Analysis\n\nThis repo contains tutorials covering understanding and implementing sequence classification models using [PyTorch](https://github.com/pytorch/pytorch), with Python 3.9. Specifically, we'll train models to predict sentiment from movie reviews.\n\n**If you find any mistakes or disagree with any of the explanations, please do not hesitate to [submit an issue](https://github.com/bentrevett/pytorch-sentiment-analysis/issues/new). I welcome any feedback, positive or negative!**\n\n## Getting Started\n\nInstall the required dependencies with: `pip install -r requirements.txt --upgrade`.\n\n## Tutorials\n\n-   1 - [Neural Bag of Words](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/main/1%20-%20Neural%20Bag%20of%20Words.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/main/1%20-%20Neural%20Bag%20of%20Words.ipynb)\n\n    This tutorial covers the workflow of a sequence classification project with PyTorch. We'll cover the basics of sequence classification using a simple, but effective, neural bag-of-words model, and how to use the datasets/torchtext libaries to simplify data loading/preprocessing.\n\n-   2 - [Recurrent Neural Networks](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/main/2%20-%20Recurrent%20Neural%20Networks.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/main/2%20-%20Recurrent%20Neural%20Networks.ipynb)\n\n    Now we have the basic sequence classification workflow covered, this tutorial will focus on improving our results by switching to a recurrent neural network (RNN) model. We'll cover the theory behind RNNs, and look at an implementation of the long short-term memory (LSTM) RNN, one of the most common variants of RNN.\n\n-   3 - [Convolutional Neural Networks](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/main/3%20-%20Convolutional%20Neural%20Networks.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/main/3%20-%20Convolutional%20Neural%20Networks.ipynb)\n\n    Next, we'll cover convolutional neural networks (CNNs) for sentiment analysis. This model will be an implementation of [Convolutional Neural Networks for Sentence Classification](https://arxiv.org/abs/1408.5882).\n\n-   4 - [Transformers](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/main/4%20-%20Transformers.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/main/4%20-%20Transformers.ipynb)\n\n    Finally, we'll show how to use the transformers library to load a pre-trained transformer model, specifically the BERT model from [this](https://arxiv.org/abs/1810.04805) paper, and use it for sequence classification.\n\n## Legacy Tutorials\n\nPrevious versions of these tutorials used features from the torchtext library which are no longer available. These are stored in the [legacy](https://github.com/bentrevett/pytorch-sentiment-analysis/tree/main/legacy) directory.\n\n## References\n\nHere are some things I looked at while making these tutorials. Some of it may be out of date.\n\n-   http://anie.me/On-Torchtext/\n-   http://mlexplained.com/2018/02/08/a-comprehensive-tutorial-to-torchtext/\n-   https://github.com/spro/practical-pytorch\n-   https://gist.github.com/Tushar-N/dfca335e370a2bc3bc79876e6270099e\n-   https://gist.github.com/HarshTrivedi/f4e7293e941b17d19058f6fb90ab0fec\n-   https://github.com/keras-team/keras/blob/master/examples/imdb_fasttext.py\n-   https://github.com/Shawn1993/cnn-text-classification-pytorch\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3DE:324E19:181B7C:5E9C49:6AB92D55"},"text_sha256":"9ebc89f3263809101c71236f2ee957369fa39e803a02e096685bd9d2084cbcff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"JohnSnowLabs/spark-nlp","input_row":{"repository":"JohnSnowLabs/spark-nlp","url":"https://github.com/JohnSnowLabs/spark-nlp","name":"spark-nlp","owner":"JohnSnowLabs","description":"State of the Art Natural Language Processing","language":"Scala","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4158,"issues":914,"created_at":"2017-09-24T19:36:44Z","updated_at":"2026-09-26T16:43:18Z","first_commit_at":"2017-09-24T19:36:45Z","last_commit_at":"2026-09-26T16:43:12Z","activity_months":108.04000000000001,"ai_ml_match_topics":"natural-language-processing; nlp; llm; transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:51:01.563Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"JohnSnowLabs/spark-nlp","visibility":"public","created_at":"2017-09-24T19:36:44Z","updated_at":"2026-09-26T16:43:18Z","private":false,"fork":false,"archived":false,"stargazers_count":4158,"open_issues_count":32,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1498","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:188B1A5:1CB397F:6AB92D55"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1497","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0838:1C46F8:17DD772:1C05115:6AB92D55"},"commit":{"sha":"38e9a3949304200aef39e5889b5ac1d128e95cc6","url":"https://github.com/JohnSnowLabs/spark-nlp/commit/38e9a3949304200aef39e5889b5ac1d128e95cc6","date":"2018-05-23T13:03:39Z","author_date":"2018-05-23T13:03:39Z","committer_date":"2018-05-23T13:03:39Z","tree_sha":"2b2091c727463b88fd3c107ae22f2dac8be95c66","message_first_line":"Merge pull request #216 from easimadi/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1496","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085D:71E0C:180908E:1C30213:6AB92D56"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3429,"blob_sha":"88b6853568f6be3a4bc02d49ffb9d2b26b6a5a1b","priority":0}],"documents":[{"path":"README.md","size":3429,"blob_sha":"88b6853568f6be3a4bc02d49ffb9d2b26b6a5a1b","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/JohnSnowLabs/spark-nlp.svg?branch=master)](https://travis-ci.org/JohnSnowLabs/spark-nlp)\n# Spark-NLP\nJohn Snow Labs Spark-NLP is a natural language processing library built on top of Apache Spark ML. It provides simple, performant & accurate NLP annotations for machine learning pipelines, that scale easily in a distributed environment.\n\n# Project's website\nTake a look at our official spark-nlp page: http://nlp.johnsnowlabs.com/ for user documentation and examples\n\n# Slack community channel\nQuestions? Feedback? Request access sending an email to nlp@johnsnowlabs.com\n\n# Usage\n\n## spark-packages\n\nThis library has been uploaded to the spark-packages repository https://spark-packages.org/package/JohnSnowLabs/spark-nlp .\n\nTo use the most recent version just add the `--packages JohnSnowLabs:spark-nlp:1.5.4` to you spark command\n\n```sh\nspark-shell --packages JohnSnowLabs:spark-nlp:1.5.4\n```\n\n```sh\npyspark --packages JohnSnowLabs:spark-nlp:1.5.4\n```\n\n```sh\nspark-submit --packages JohnSnowLabs:spark-nlp:1.5.4\n```\n\n## Jupyter Notebook\n\n```\nexport SPARK_HOME=/path/to/your/spark/folder\nexport PYSPARK_DRIVER_PYTHON=jupyter\nexport PYSPARK_DRIVER_PYTHON_OPTS=notebook\n\npyspark --packages JohnSnowLabs:spark-nlp:1.5.4\n```\n\n## Apache Zeppelin\nThis way will work for both Scala and Python\n```\nexport SPARK_SUBMIT_OPTIONS=\"--packages JohnSnowLabs:spark-nlp:1.5.4\"\n```\nAlternatively, add the following Maven Coordinates to the interpreter's library list\n```\ncom.johnsnowlabs.nlp:spark-nlp_2.11:1.5.4\n```\n\n## Python without explicit Spark installation\nIf you installed pyspark through pip, you can now install sparknlp through pip\n```\npip install --index-url https://test.pypi.org/simple/ spark-nlp==1.5.4\n```\nThen you'll have to create a SparkSession manually, for example:\n```\nspark = SparkSession.builder \\\n    .appName(\"ner\")\\\n    .master(\"local[4]\")\\\n    .config(\"spark.driver.memory\",\"4G\")\\\n    .config(\"spark.driver.maxResultSize\", \"2G\") \\\n    .config(\"spark.driver.extraClassPath\", \"lib/sparknlp.jar\")\\\n    .config(\"spark.kryoserializer.buffer.max\", \"500m\")\\\n    .getOrCreate()\n```\n\n## Maven central\n\nOur package is deployed to maven central. In order to add this package as a dependency in your application:\n\n#### Maven\n\n```xml\n<dependency>\n  <groupId>com.johnsnowlabs.nlp<\/groupId>\n  <artifactId>spark-nlp_2.11<\/artifactId>\n  <version>1.5.4<\/version>\n<\/dependency>\n```\n\n#### SBT\n```sbtshell\nlibraryDependencies += \"com.johnsnowlabs.nlp\" % \"spark-nlp_2.11\" % \"1.5.4\"\n```\n\nIf you are using `scala 2.11`\n\n```sbtshell\nlibraryDependencies += \"com.johnsnowlabs.nlp\" %% \"spark-nlp\" % \"1.5.4\"\n```\n\n## Using the jar manually \n\nIf for some reason you need to use the jar, you can download the jar from the project's website: http://nlp.johnsnowlabs.com/\n\nFrom there you can use it in your project setting the `--classpath`\n\nTo add jars to spark programs use the `--jars` option\n\n```sh\nspark-shell --jars spark-nlp.jar\n```\n\nThe preferred way to use the library when running spark programs is using the `--packages` option as specified in the `spark-packages` section.\n\n# Contribute\nWe appreciate any sort of contributions:\n* ideas\n* feedback\n* documentation\n* bug reports\n* nlp training and testing corpora\n* development and testing\n\nClone the repo and submit your pull-requests! Or directly create issues in this repo.\n\n# Contact\nnlp@johnsnowlabs.com\n\n# John Snow Labs\nhttp://johnsnowlabs.com/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:173D5E:5DBE1F:6AB92D56"},"text_sha256":"75e2fa28025bdc2fc81e59f9fc154081f6d211b27d609aff5829344aae73128a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1495","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:179B7AB:1BC2114:6AB92D57"},"commit":{"sha":"fcede1de1962b215026c1757d7c054e6d99bb9fe","url":"https://github.com/JohnSnowLabs/spark-nlp/commit/fcede1de1962b215026c1757d7c054e6d99bb9fe","date":"2026-06-24T23:24:19Z","author_date":"2026-06-24T23:24:19Z","committer_date":"2026-06-24T23:24:19Z","tree_sha":"245ed0631e8a8c610e5a141acc062cad85c59e1c","message_first_line":"Delete build_sat_notebook.py (#14783)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1494","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0854:35C5DA:17BED95:1BE66D4:6AB92D57"},"tree_truncated":true,"document_candidates":[{"path":"README.md","size":17890,"blob_sha":"d04670fa807f2383355155bcadbb03c679851d37","priority":0},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_InLegalBERT_en.md","size":3937,"blob_sha":"2a5c249b1099dcb0c2d25c31a40c0d3e33ec54b2","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md","size":2861,"blob_sha":"0e7dceeca64069bda5143ea45c8e14887eeef380","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legalbert_adept_en.md","size":4023,"blob_sha":"5dc84ccc68d550dd4d7604688b03104a73ec86a8","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lsg16k_Italian_Legal_it.md","size":4066,"blob_sha":"022feacea52d3c7dfe20159b3139c0aeb91fe4b0","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md","size":2795,"blob_sha":"4245ee3f06c1b48de33e27c092c71dc6056c341a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md","size":2810,"blob_sha":"153274bc0b1d2d8c42ad1a8a2df20cbec913c17d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md","size":1960,"blob_sha":"755bba585f5518c7f22d31c598d1ec59fce91b56","priority":1},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_action_policy_plans_classifier_en.md","size":2605,"blob_sha":"0287ba11282f9ec88ed846a18a7efa6192ae1fda","priority":1},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_all_mpnet_base_v2_ftlegal_v3_en.md","size":2591,"blob_sha":"76e076e96782cc622ae8c55d710b4e69b6a43bee","priority":1},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune_en.md","size":2699,"blob_sha":"3af998f5f8239dd4734b2c694088afb3a35b145f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-07-action_policy_plans_classifier_en.md","size":2576,"blob_sha":"7cc9b8271e468614a9b4c22c28bc6b6c081d580d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-07-all_mpnet_base_v2_ftlegal_v3_en.md","size":2561,"blob_sha":"a9b240367cd9836d2db1897d7111ba1a3f6e39f0","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-07-multi_qa_mpnet_base_dot_v1_legal_finetune_en.md","size":2684,"blob_sha":"f24c83762935d73a6d79080776457b1a74c75b3f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-alglegal3_bert_base_arabertv2_en.md","size":2605,"blob_sha":"908a790f6a0698882ede24b623a4334d26ec681a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_base_arabertv2_algarlegalbert_en.md","size":2650,"blob_sha":"f942e4c9350d2581e58d8c8da16a79259b5d40b8","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_base_uncased_finetune_security_en.md","size":2638,"blob_sha":"ab915d7a7e8509666486c6d02aa804ca558e7394","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_large_portuguese_cased_legal_mlm_pt.md","size":2654,"blob_sha":"b65c271db095619ed57737ec018439b009a41034","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_large_portuguese_cased_legal_tsdae_pt.md","size":2672,"blob_sha":"481a8fb59f782a78fb28e9e64e664fb5cb5817ae","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-inlegalbert_cbp_lkg_triples_finetuned_en.md","size":2656,"blob_sha":"003e102784eb39c94bf0b5cb6f5ee3325927c0d3","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-kaz_legal_bert_5_en.md","size":2497,"blob_sha":"f749093710f761d01d3a3b9ca67da6f4a95b9eba","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-kaz_legal_bert_en.md","size":2479,"blob_sha":"ddd445cde44b74fa1a25cb9a8a9eb37eacb7746a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-legal_bert_base_uncased_finetuned_ledgarscotus7_en.md","size":2767,"blob_sha":"8fb546e076f123ca597bd22846ae564bff54493f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-lsg16k_italian_legal_bert_it.md","size":2542,"blob_sha":"f325623813471318af77df0b46f52b0da710b432","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-09-pt_legalbert_en.md","size":2440,"blob_sha":"ad6c68aa3c6656527846bdd2f012ac09aea496aa","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_en.md","size":2461,"blob_sha":"787d76eff6446881cc0f93589cdd4fd2737a427b","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_inscotus_and_ledgar_14epoch_en.md","size":2713,"blob_sha":"6887e2996598182ead58f6ea353a74675762b4c4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_inscotus_and_ledgar_en.md","size":2641,"blob_sha":"9310c0c7819043ffc15319cd10a24ad5e726fbe2","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert6_en.md","size":2470,"blob_sha":"410b1b7c62914069e084e94cfe7cdeb3cced6dc3","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-algarlegalbert1_large_arabertv2_en.md","size":2621,"blob_sha":"d1a780f6d78143479ac917123fa06a3298dd6eac","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bert_base_uncased_en.md","size":2524,"blob_sha":"f6ab8e6b0aea41af9e5ad2531d842b93f3cc834d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bert_small_uncased_en.md","size":2533,"blob_sha":"433d1f39c8066a6be179877e95e0edd4f166d423","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bertimbau_large_pt.md","size":2513,"blob_sha":"2b9ea254a999c33f0318021b93bdcd27a6b25e3c","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-legalbertpt_fp_en.md","size":2464,"blob_sha":"9f8486bd7aaeb819e89f9b7755aac0177bb560ec","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-12-legalbertpt_sardinian_en.md","size":2520,"blob_sha":"bfc82201ef1ea0df1ce6799ec69ec466dd16f216","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_base_arabertv2_en.md","size":2569,"blob_sha":"46c5273fbbb754461314c439b6f6f6739cfa7921","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_large_arabertv2_en.md","size":2576,"blob_sha":"470ed97e8f00d2b5abcd27501caf00080f183840","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_nonumber_base_arabertv2_en.md","size":2650,"blob_sha":"0ed7d52a89de754e37ebb8bfd11e17b2cc8c0e63","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_nonumber_large_arabertv2_en.md","size":2657,"blob_sha":"1f5104e2a5d6ea2c5ce36efe707caccd91f4b10e","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts_larger20_5_1_en.md","size":2764,"blob_sha":"435aeeb1d244bc6369ce7504d61ec378d0930e18","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts_larger4010_en.md","size":2746,"blob_sha":"dfd10511e03d9952c782a5325658cdd39a550bab","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts10train10val_en.md","size":2755,"blob_sha":"074215c3c9423f71e1af3823e11411fc6ca9a172","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_definitions_en.md","size":2665,"blob_sha":"ed5356442609bdcfa7eb3baa71e431beaa560d33","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_definitions_longer_en.md","size":2728,"blob_sha":"c3274873f0bb6ce3776d7dad9bcaaf3d3836320b","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_tiny_finetuned_legal_definitions_en.md","size":2655,"blob_sha":"e30e903e9dfbb601dbe99088ded81b0924c40a67","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-bertimbau_legal_pt.md","size":2461,"blob_sha":"6bfe1d930377522239e5015f5d56ab54a353147b","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-custom_legalbert_en.md","size":2464,"blob_sha":"28074d6aa750f47d21d2f31b2b0c85a120d494dc","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-danish_legal_bert_base_da.md","size":2522,"blob_sha":"bddeda23e86fba235157c2035024b4cb7c1c8859","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-indo_legalbert_id.md","size":2450,"blob_sha":"3b082f0dec52ca91b66dc25447cf1bbb77785369","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-inlegalbert_cbp_lkg_finetuned_en.md","size":2584,"blob_sha":"12dec567dbd2311f7feabb7d53c638361cc9e9d8","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-inlegalbert_en.md","size":2413,"blob_sha":"e589b3dc1280a4c3cdd7526275fe3addd9017334","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bert_base_cased_ptbr_pt.md","size":2566,"blob_sha":"5584191dc3f44e5fb0023dea90eab3bbc41b1ac2","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bert_base_uncased_finetuned_rramicus_en.md","size":2752,"blob_sha":"29fa712a5d4e73b8fa8c33196226929641a409c6","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bertimbau_base_pt.md","size":2506,"blob_sha":"28b0a0221a83b3005fd1a99ad90a13021309beb6","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_hebert_en.md","size":2422,"blob_sha":"508141215a8c84d8a998149867a1573910322b3f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_en.md","size":2539,"blob_sha":"40968056fea7e24b642c4eaab845aad4eb9be793","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v1_en.md","size":2566,"blob_sha":"446b310aff75d4b087527e247258f2ae599ff531","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v2_en.md","size":2566,"blob_sha":"dca64da8b739451812575535a83ebff9f9d72634","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v3_en.md","size":2566,"blob_sha":"05faa53af7c6cae64433ad2197b8a2a3328299d8","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v4_en.md","size":2566,"blob_sha":"3c192c002de76317c50f0db0b7daea7d6ac2e748","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legalbert_adept_en.md","size":2479,"blob_sha":"30fc217e2ac076e006f4749719fc85b3a7dc0938","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-legalnlp_bert_pt.md","size":2461,"blob_sha":"ac59b8243b994d729eeb482c360ff70a630a469f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg_legal_base_uncased_4096_en.md","size":2551,"blob_sha":"709bbed08aba511a3d6e78ac87f2eef4647eaa75","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg_legal_small_uncased_4096_en.md","size":2560,"blob_sha":"269581411ea0dc9d20b7299b183d5c988529b77a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg4k_italian_legal_bert_it.md","size":2533,"blob_sha":"f3839e77af29a0273b1b118de12c54c4ef328683","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-13-pak_legal_bert_small_uncased_en.md","size":2575,"blob_sha":"68b62e03dd9250295c7091d162c2c082e45534c4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-14-InLegalBERT_cbp_lkg_triples_finetuned_en.md","size":2656,"blob_sha":"e77417718d3a5833587beecf36ad08b8c3dc024a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-14-legal_hebert_ft_en.md","size":2449,"blob_sha":"87a87782f0a4e69164cb91f04c9418d2c204e221","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-14-legalbert_large_1.7m_1_en.md","size":2527,"blob_sha":"2129067405d6a552559cc9adc9775240dfc771df","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-14-legalbert_large_1.7m_2_en.md","size":2527,"blob_sha":"512842ee82e8d7b490c416c8448684a82b6ed3b7","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-14-lsg16k_Italian_Legal_BERT_it.md","size":2542,"blob_sha":"9db6537f150c15bf948118f0548d205cc6c552b4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_full_corpus_10.0_en.md","size":2722,"blob_sha":"16a4bef397b6e45631ceb6383bb82287f681e72a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_full_corpus_3.0_en.md","size":2713,"blob_sha":"316e5e5bcf3328e6fe38d152d20f9b44d7d29abc","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545_en.md","size":2992,"blob_sha":"7bd19e82e8bdf79eef294b4d6450535dd892c506","priority":1},{"path":"docs/_posts/ahmedlone127/2023-09-18-autotrain_security_text_classification_albert_688320769_en.md","size":2930,"blob_sha":"2615a6b3544b243adf728176f9b424ab8657492b","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-25-legal_bert_based_uncase_en.md","size":2893,"blob_sha":"f1abf912760c7cfd0ac2a9e745ac9443e8de2836","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-25-legal_bert_tpb_clause_class_en.md","size":2929,"blob_sha":"db9dffa14be5d49bae6c683d5d0f843b20c5dfb8","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-26-bert_tiny_finetuned_legal_definitions_downstream_alt_en.md","size":3150,"blob_sha":"27202426745ac1140aa0c877ef730989dc270900","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-26-bert_tiny_finetuned_legal_definitions_longer_downstream_alt_en.md","size":3213,"blob_sha":"0a3cab42e534bcd80b8e1dafd561932c1abbb8d5","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-26-burmese_legal_bert_small_en.md","size":2882,"blob_sha":"78d07ccc94ac623fda256fdfd4b99a71fb094d17","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-26-legal_bert_test2_en.md","size":2815,"blob_sha":"2dad795ddf4f888b76b5a43319f6f1a8450e0f83","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_en.md","size":2980,"blob_sha":"f9b942048cf031c64575019eba0ff87a9daf6369","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer10_en.md","size":3061,"blob_sha":"48f8076f3835fc71be465442996626c280ca3eb0","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer20_en.md","size":3061,"blob_sha":"528d7f0863fb890e6acd5735dc6854d8c022f046","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer30_en.md","size":3061,"blob_sha":"88f66c06cfc831864f430c9b30749a931c0569db","priority":1},{"path":"docs/_posts/ahmedlone127/2023-10-31-legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz_en.md","size":3223,"blob_sha":"4448cbb2bbb72eda43b14d93eb91b38a292552f9","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-01-bert_large_legal_sentence_classification_en.md","size":3041,"blob_sha":"414ad1ac80576d2a334e4f616bf73486e48a4511","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-01-bert_sequence_classifier_priv_consent_en.md","size":2989,"blob_sha":"d684f32050afe906640cae51df18cdcfd254a6fd","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-06-bert_ner_legalbert_beneficiary_single_en.md","size":3444,"blob_sha":"33e7f4503754322ecdc9c1683809d5c5a46d4391","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-06-bert_ner_legalbert_clause_combined_en.md","size":3429,"blob_sha":"88fa8df5211e1a900d5931b1ac8d925639e4aa91","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-07-gbert_legal_ner_de.md","size":2537,"blob_sha":"78c089ec9674d68329089fdf7989e8067e960cba","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-07-legal_bert_ner_base_cased_ptbr_pt.md","size":2683,"blob_sha":"4c385926fa641fe7dd5a8b162af1854f00d1c236","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-07-roberta_finetuned_privacy_detection_zh.md","size":2705,"blob_sha":"a10cdd8aaaabf3ab30a3d0c802d97c1212ac9977","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-08-greek_legal_bert_v2_finetuned_ner_en.md","size":2710,"blob_sha":"c2622e5685b7956dc8f0b2b69d3279f893af7c23","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-08-greek_legal_bert_v2_finetuned_ner_v3_en.md","size":2737,"blob_sha":"82dbd46202cf3bd3b09cce6efe5e75f327b0e469","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-08-ner_gdpr_en.md","size":2479,"blob_sha":"95d9bf1cc15e4ba4f2dbd59e26c40d468a4c0d4e","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-16-legal_bert_base_cuad_en.md","size":2757,"blob_sha":"5a394cccbd6761a14e73764c95ab3804b1385d77","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-17-bert_finetuned_squad_legalbert_en.md","size":2820,"blob_sha":"4383799f2ed5bbbf18feec36fad0c80ef76ad310","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-17-bert_large_question_answering_finetuned_legal_en.md","size":2989,"blob_sha":"402d4dd6d3314758f03fff770113d6a1b3661708","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-17-inlegalbert_cbp_lkg_qa_triples_w_context_finetuned_en.md","size":3015,"blob_sha":"2536f036400da7ee2eebf1b2156264068a6eacfe","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-17-legal_document_question_answering_zh.md","size":2856,"blob_sha":"34608015d4a6fbdce5a653e53dbf61957a6d9de1","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-18-distilbert_base_uncased_finetuned_eoir_privacy_en.md","size":3133,"blob_sha":"2f95c727701c9d9a700f7624d1d0e75220a8a376","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-18-distilbert_sequence_classifier_policy_distilbert_7d_en.md","size":3861,"blob_sha":"8cdab7d82dad2ac5b27a867d7a53adb8f6d22c3d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-19-compliance_monitoring_oms_en.md","size":2938,"blob_sha":"8b64f0c12f5228a041cd017152db49bacbcd9eed","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-19-distilbert_fine_tuned_terms_en.md","size":2953,"blob_sha":"05aa3bb5ceba85dca768f0068f1313d8763c91b0","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-20-cybersecurity_ner_v2_en.md","size":2626,"blob_sha":"ba3d89c291251d59a0795c6e287945d0deee4ac5","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-20-distilbert_fine_tuned_terms_v2_en.md","size":2980,"blob_sha":"88df8a6de9ed255f37a84921968998c1dd7b915f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-20-distilbert_finetuned_ai4privacy_isotonic_en.md","size":2782,"blob_sha":"1b7b45f1fdf48f6585014d09bae31fcb32cff953","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-bert_cybersecurity_ner_en.md","size":2635,"blob_sha":"0f1202cea1d4270cbff72fb31bc6fb9fc1fdc545","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-cybersecurity_ner_bnsapa_en.md","size":2634,"blob_sha":"799b45b9f45263a267942fcfb883ff19cb97d9eb","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-cybersecurity_ner_sudipadhikari_en.md","size":2711,"blob_sha":"92cde17c3d2b49e095d38a7f2ad619e692cf0199","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_finetuned_ai4privacy_50k_en.md","size":2746,"blob_sha":"2acd8399e7144965b13bca228bd14cc7bab02e1a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_finetuned_ai4privacy_singhtanmay6735_en.md","size":2859,"blob_sha":"c12834ae911b99cecf4245d2cdcda2a80177065c","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_legal_chunk_en.md","size":2644,"blob_sha":"42d3dc452ad5e1f72e45ac679ea4cb8a146f1409","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_legal_definitions_en.md","size":2698,"blob_sha":"e641819b8af7c6268b6e128ba7251038c745f41a","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-21-fine_tuned_cybersecurity_ner_en.md","size":2680,"blob_sha":"d9c455e0b27a949c6a166f0c15ad298b1c1ab565","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-22-fine_tuned_cybersecurity_ner2_en.md","size":2689,"blob_sha":"1c4107b1ddaf8dbd2933c9e29e1012160202e27d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-26-distilbert_base_uncased_finetuned_legal_data_en.md","size":2991,"blob_sha":"a87140c239cd449108508d08d1367a92c5136ecb","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_autotrain_security_texts_classification_688020754_en.md","size":3429,"blob_sha":"3cf236a4967130932d3552ac9950d7324974d513","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_autotrain_security_texts_classification_distil_688220764_en.md","size":3492,"blob_sha":"2061aa0d97cb3fb8c4f36d8905743dd935b7c659","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_covid_policy_21_en.md","size":3722,"blob_sha":"e74f1887b39c1dccf9bd4adcc80f7cfddc76a3a4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_policyberta_7d_en.md","size":3525,"blob_sha":"5cc91151761faf08c67eb8f5dfcdc0b088b5c463","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-30-opp_115_privacy_contact_information_en.md","size":3016,"blob_sha":"5ffd325e3545c914f869663edecdba17e66cc4ba","priority":1},{"path":"docs/_posts/ahmedlone127/2023-11-30-privacy_intent_en.md","size":2824,"blob_sha":"bee89ff8bf3b28b216e53304ddb97dde196dcaf2","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-02-legal_components_roberta_en.md","size":2914,"blob_sha":"b13121dc1f050df531c0330b5bb1f594927fafc5","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-02-roberta_large_legal_v2_en.md","size":2894,"blob_sha":"c5d7a4dbb48cd46b39e077722e71e38937119ca4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-13-mitre_cybersecurity_en.md","size":2818,"blob_sha":"252a14c92390b403271d9402a5b0f2e59243824d","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-13-roberta_ner_roberta_large_legal_act_extraction_en.md","size":4235,"blob_sha":"209e5a6d5458dfcd2e81d733330db47326affb5f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-13-social_policy_roberta_en.md","size":2822,"blob_sha":"73b4c7186a5df1690ee2de570a730b9e8906e730","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-22-legal_qa_en.md","size":2640,"blob_sha":"31faf121f1aa52f2b426a8bcc8115f7f1f97eb59","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-22-legal_roberta_base_cuad_en.md","size":2802,"blob_sha":"788bef2241727339b0bf999820a8e2e3a5183bb4","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-22-roberta_finetuned_qa_policy_2_ppsingh_en.md","size":2902,"blob_sha":"17798a5eb2de0b92929b943fbd70f860f720720f","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-23-roberta_finetuned_qa_policy_0_1_en.md","size":2856,"blob_sha":"7f94a2c4d817be293a5ff06462d7e7a31734c125","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-23-roberta_finetuned_qa_policy_short_en.md","size":2880,"blob_sha":"0e81da09265d0f56bac8f1b1585210ad752b8610","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-24-roberta_finetuned_qa_policy_2_peter2000_en.md","size":2924,"blob_sha":"e714e51b2b8dbc5dacee0b366f08df4f5b9894e9","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-24-roberta_finetuned_qa_policy_long_en.md","size":2871,"blob_sha":"4c66ef6b601709674ff20b39b8e017590e112675","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-29-legal_doctrine_coding_challenge_en.md","size":2986,"blob_sha":"a36b98fa050127e4d032c08cd96ad946ce7cb8ce","priority":1},{"path":"docs/_posts/ahmedlone127/2023-12-31-distilbert_base_uncased_multil_cls_legal_en.md","size":3070,"blob_sha":"3195eede9ba14e14efd9ca4be3de35e213abf469","priority":1},{"path":"docs/_posts/ahmedlone127/2024-01-01-distilbert_base_uncased_finetuned_legal_en.md","size":3061,"blob_sha":"c0dfdc2e2a898917bee9b0105c55194ea95e1734","priority":1},{"path":"docs/_posts/ahmedlone127/2024-01-19-autotrain_l_data_protection_194_95265146323_en.md","size":3109,"blob_sha":"42b447191c99a4d7b4ae73b4bc814fc87bd727f1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_german_en.md","size":2648,"blob_sha":"0910b4602e46c132ce411c60365cd8bf354578a6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_german_pipeline_en.md","size":2011,"blob_sha":"b38affcec5640a5f19b2fbdf84d7b02b54c5aa10","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_multitask_czech_en.md","size":2730,"blob_sha":"61313e590e92f94a1832040511c8aa2500096ab6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_multitask_czech_pipeline_en.md","size":2093,"blob_sha":"19e5cb096d64a73ab1489622810ba1e98e435eb8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_czech_english_en.md","size":2761,"blob_sha":"f371f62b08b04300bf8bd0895bff7db14a41c9ee","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_czech_english_pipeline_en.md","size":2124,"blob_sha":"eda69a3d200c744241bd2ff85a17e395b300c5a3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_french_spanish_en.md","size":2769,"blob_sha":"4ad4bac7fe1375f4e1689d044f4d2048ef97a41e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_french_spanish_pipeline_en.md","size":2132,"blob_sha":"e7e8bf5762d032a109c5ced97fe72cdb849747dd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_trans_swedish_german_small_finetuned_en.md","size":2877,"blob_sha":"4bba3f4b218f93c7c013eef8becbd661830c56ad","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_trans_swedish_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"62554c3e6befd6ef8b1b30118310060bfbbb8060","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_italian_spanish_en.md","size":2777,"blob_sha":"030acdd58a3512fb3ab582c9a55b1ffcf54f94fb","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_italian_spanish_pipeline_en.md","size":2140,"blob_sha":"7ad06195736cf48f603e6c94722242bd899c9ca6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_swedish_spanish_en.md","size":2777,"blob_sha":"9865ad9335cd1dc8a72cca65ce09c176b44a6734","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_swedish_spanish_pipeline_en.md","size":2140,"blob_sha":"000ed114cdb772380adb806117433f1020c1b132","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_czech_italian_en.md","size":2725,"blob_sha":"3233dc378e721ac4953f08447b5a6eb46f806bb6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_czech_italian_pipeline_en.md","size":2088,"blob_sha":"03c589d4b68bf79c60f23e1a79ea5cfd91ba3d09","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_spanish_czech_small_finetuned_en.md","size":2869,"blob_sha":"d001bdad240c0da8426dd57e7b92e45cae56a134","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_spanish_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"d1b310ab7f060d32d9652a6b25bb9844d7335842","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_cls_multitask_english_en.md","size":2746,"blob_sha":"f0b20d15554ec7bb7310fa2364cc173c0594964d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_cls_multitask_english_pipeline_en.md","size":2109,"blob_sha":"b4e14f1dae8a3c2d21b06e86820c7a82ec007061","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_finetuned_summ_swedish_en.md","size":2755,"blob_sha":"3be5472b8c3265edc7724e85cbf0c7b6f3bc093c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_finetuned_summ_swedish_pipeline_en.md","size":2118,"blob_sha":"1191cb767ce4a0bf93cd9327d07c45430ed83840","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_multitask_french_english_en.md","size":2769,"blob_sha":"0bd791bc2bc86276f6b53dfc57ea3ab20af04458","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_multitask_french_english_pipeline_en.md","size":2132,"blob_sha":"38779eb2e91451c3d366fe3c42167c45cbef30dd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_french_en.md","size":2657,"blob_sha":"606abce5f1bff719d9496f39923b93058b0b8164","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_french_pipeline_en.md","size":2020,"blob_sha":"672829e017333e703d992ee0a466da5017732128","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_multitask_swedish_en.md","size":2755,"blob_sha":"cccef03cf9ea9e8e7c341ee11bcf2236ad21f91f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_multitask_swedish_pipeline_en.md","size":2118,"blob_sha":"80b125cc4d55379c987b2cd820e81c9bcf2cc252","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_czech_swedish_small_finetuned_en.md","size":2869,"blob_sha":"4985fabd132ba11e6686351477da55971ba357f6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_czech_swedish_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"bb88c0d943432c5d152c6f8cea6159275e5c6de7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_english_en.md","size":2733,"blob_sha":"2e312b0bb1e00208c006129af7eb632cfc4da666","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_english_pipeline_en.md","size":2096,"blob_sha":"3b0ad8058d2b05f046de2c557fad14a6f1836c50","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_italian_en.md","size":2733,"blob_sha":"f60cdd393d0d8d815bba6ef54d38f82ec394e004","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_italian_pipeline_en.md","size":2096,"blob_sha":"8e5e7289c43ace1f05afe8ff761b34c827d6a43a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_italian_small_finetuned_en.md","size":2877,"blob_sha":"cb83f2812bcb817cc5f49b813006ae27ed372107","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_italian_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"0c4a2227b2f9c5fb5a07d4b890bcb66cd0570629","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_swedish_en.md","size":2733,"blob_sha":"b0023e4b0693f714d337c40366afb1f8793c41d3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_swedish_pipeline_en.md","size":2096,"blob_sha":"6224c2c1ffab955dd11e08b02aa618a9438741aa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_spanish_swedish_small_finetuned_en.md","size":2885,"blob_sha":"f9858b617fbc5a972259fdbaea590676ba33437a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"0af0a28e64fc4542b3a5dc2d108b26af898c7e03","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_multitask_french_swedish_en.md","size":2769,"blob_sha":"b452a8c578ddcee5b0266efc3acbddece5311b67","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_multitask_french_swedish_pipeline_en.md","size":2132,"blob_sha":"e6ae45ea25cafa74198b34fc03dbaa917f4af0b1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_english_czech_small_finetuned_en.md","size":2869,"blob_sha":"f6c22857b18ad33cb46a17b07bceb71430f09474","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_english_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"335ce3f10c3f7b191466a5935a8fbec16ae92776","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_french_spanish_small_finetuned_en.md","size":2877,"blob_sha":"0779e515062f2f2a79e831ad1fd7104059aeca6d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_french_spanish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"e38e6baa9226ce3aa95ed95c47837cd17f74c977","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_german_spanish_en.md","size":2733,"blob_sha":"1fcbc7f943bc94a4f974317e5641f2fbd68bf08f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_german_spanish_pipeline_en.md","size":2096,"blob_sha":"d112cd0541512794b8b3dd5e37bbe5e6f18b6c27","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_swedish_czech_en.md","size":2725,"blob_sha":"cfde144ca4856d61ef03b27002ed539a56de5c6d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_swedish_czech_pipeline_en.md","size":2088,"blob_sha":"5a6ed203332ef2eeeae412c013b4562128389218","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_english_en.md","size":2656,"blob_sha":"17bcd76ece7f1e9009c04d97ea657aa9c2d53508","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_english_pipeline_en.md","size":2019,"blob_sha":"cef093b19ed92dbae3424ae34a16e685ee3d5bbd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_french_en.md","size":2648,"blob_sha":"368647bf3665873e8f82daa5aef8f9eaeb58500d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_french_pipeline_en.md","size":2011,"blob_sha":"09bc93ebb89dba630e1f51e67093fcc33e93946f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_summ_italian_en.md","size":2665,"blob_sha":"ed26f1cd5d77a347e4b292a41834d32a5c2e51a7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_summ_italian_pipeline_en.md","size":2028,"blob_sha":"de3fc5c64936d123441e0b6db63760d50c63d35a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_french_czech_en.md","size":2717,"blob_sha":"ef6df74decfa342cce34c804d4b59bee1c76ee07","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_french_czech_pipeline_en.md","size":2080,"blob_sha":"3ba77401348c853a1202a7474a652a9e7d59163d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_german_czech_en.md","size":2717,"blob_sha":"48ccce3bb26a846534d263b8d87fd6e7ed9a4c7c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_german_czech_pipeline_en.md","size":2080,"blob_sha":"fb4a87920fce213136a5f511f085da0077900e9e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-mt5_small_ai4privacy_en.md","size":2614,"blob_sha":"24e186f1131e533291488a8f5a657c1db15e0912","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-mt5_small_ai4privacy_pipeline_en.md","size":1977,"blob_sha":"b42919f36c869dbf86560fe4e947f6927da0f47b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-t5_small_ai4privacy_en.md","size":2607,"blob_sha":"6a0c10e7925095b5aa7e2f0a8bc70d22592fc0c9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-05-t5_small_ai4privacy_pipeline_en.md","size":1970,"blob_sha":"e8e22a6835be4dcb50a88f0e2cf727bc0c76e97b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-06-legal_t5_small_trans_english_french_en.md","size":2733,"blob_sha":"84c44c519bdc3761bbca384007cc5ff9659e3e13","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_czech_en.md","size":2640,"blob_sha":"32004dca1c1c273bacadc74ef301b150d04be775","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_czech_pipeline_en.md","size":2003,"blob_sha":"609a525401acbc7b865bdb2a0024002d77e6b2d1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_finetuned_german_en.md","size":2738,"blob_sha":"3ff6bc773e37799d8406a29018caca50f504d746","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_finetuned_german_pipeline_en.md","size":2101,"blob_sha":"83befe6ed8bdcc8cf10269c44a7b564d20aa60ae","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_french_czech_en.md","size":2753,"blob_sha":"fcb36b5a444698e65b4921709d5636d76b11b30c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_french_czech_pipeline_en.md","size":2116,"blob_sha":"3d3ca5eb95a1434a4107755173c1871f5724e7cd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_german_swedish_en.md","size":2769,"blob_sha":"24914367bcb8cb95d6a6bfd205fd74a104459316","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_german_swedish_pipeline_en.md","size":2132,"blob_sha":"de1fcf5888dc4fa6486381d6fb07bf52f0379be0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_czech_french_small_finetuned_en.md","size":2861,"blob_sha":"56bf49e4adc4c9238c1ed18f08d5ebdeca065b0c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_czech_french_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"f99575ded671bcfa70cdfcd5936e65728a3d9471","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_spanish_small_finetuned_en.md","size":2885,"blob_sha":"399485d1b2dd73b03b30fc417e3335d7910a9c77","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"3bf8b1e76e98be279b3d108067f712c842160b44","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_swedish_en.md","size":2741,"blob_sha":"4443d9231ffb0cd62a35dab210b7e22266f668bc","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_swedish_pipeline_en.md","size":2104,"blob_sha":"e029032c61b0db2c1d8218248e950458ecb54833","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_italian_swedish_small_finetuned_en.md","size":2885,"blob_sha":"f5117be4cbdf6b502fb114b707d2cd2a2c2350f9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_italian_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"8ef8eff3f3d1229f58951a5774e49ab6bb1b1820","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_swedish_spanish_small_finetuned_en.md","size":2885,"blob_sha":"3125933afb14ada9762d625bb8418daa09a9ac80","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"86c353f5b047d9bb08e5d2b5de37da160a9a607c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_finetuned_czech_en.md","size":2730,"blob_sha":"06e49a493586d57ae836b808a5c8e8a709c732e1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_finetuned_czech_pipeline_en.md","size":2093,"blob_sha":"6ce810570be391f4e1773f63833ac592f4ec9194","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_italian_en.md","size":2656,"blob_sha":"4179ee78a9c007b4e96c51940f0d2c9aec802238","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_italian_pipeline_en.md","size":2019,"blob_sha":"18bce7fa2e92acc149f5dee15348a511b34d2aba","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_multitask_french_en.md","size":2738,"blob_sha":"188650acf46f2bdc0cf8dc0cbda1e49ad8849e14","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_multitask_french_pipeline_en.md","size":2101,"blob_sha":"7599843da2bd909541c53945419aa9f1789309dc","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_english_czech_en.md","size":2761,"blob_sha":"f0817fd7b1e58158176276ddd1daf50d1146ee80","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_english_czech_pipeline_en.md","size":2124,"blob_sha":"7f45425908cb0706575efab8381a1b5979362be2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_german_spanish_en.md","size":2769,"blob_sha":"31b3e0b8027ee60637c1cf304d07ae1030514ee0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_german_spanish_pipeline_en.md","size":2132,"blob_sha":"4e4ab02feb507564e8fd3bcde9674aeb5d1025ec","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_english_en.md","size":2777,"blob_sha":"661d70e100598e2d4d0fe4ec5a2a7ff9031a2c78","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_english_pipeline_en.md","size":2140,"blob_sha":"52088cef8382ed1288e9a756dac4e38c536c580b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_german_en.md","size":2769,"blob_sha":"ab8d719f4a4cd715c522c369a3cad7312c7b1f24","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_german_pipeline_en.md","size":2132,"blob_sha":"26be498e8ac090d6b3a338c2d15d452e29ceaad1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_english_en.md","size":2725,"blob_sha":"a766659e2f01e784603b5c1e35aa004656bbbeb0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_english_pipeline_en.md","size":2088,"blob_sha":"202aaf6e05e8d619d60eb301e49f234701683d97","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_swedish_en.md","size":2725,"blob_sha":"c6a52ee5fb47bed47fed9d7d448bfa1efa256893","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_swedish_pipeline_en.md","size":2088,"blob_sha":"40f6e70cf108d09ee488c0507450b91f64c089e4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_english_italian_en.md","size":2741,"blob_sha":"d0446a95324db2655559f68bcdea6107d937d01a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_english_italian_pipeline_en.md","size":2104,"blob_sha":"0f85b40ce113cd378e9dd86b04bb7df526f8d5c6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_french_english_small_finetuned_en.md","size":2877,"blob_sha":"7fe317381e24a6c4d2197f6497d5da1909a8d5aa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_french_english_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"2c29da058775fa12f1a0f891dc82a80ee169a16e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_german_french_en.md","size":2725,"blob_sha":"0ff228fc675bbb8c7eca46ff1d1a1b97b1ab1a88","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_german_french_pipeline_en.md","size":2088,"blob_sha":"0752aefdb5ffef16860e91ec2a21431dacdfec92","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_italian_spanish_small_finetuned_en.md","size":2885,"blob_sha":"69c5bf50b4be2979aea6e7d855b927f3017fe308","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_italian_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"a21e85f7474b6b2c1160acb4ec099ebaf3eb24d1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_czech_en.md","size":2725,"blob_sha":"f0e02a83b2c78db1742c504e21bc64bcde23ba7c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_czech_pipeline_en.md","size":2088,"blob_sha":"d79bbed5a061481acae57e36df7efbc872ddcd41","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_swedish_en.md","size":2741,"blob_sha":"f61fb95baaf1f79a6549e390b91165e15384c51d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_swedish_pipeline_en.md","size":2104,"blob_sha":"63662c13f6cd435daf646907af7e6a5f59b4fa3a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_english_small_finetuned_en.md","size":2885,"blob_sha":"87c50cfbce838b105a07559f667e90386b218f67","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"864e542d8a65762e2bb4d22f19a3179998a6688a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_italian_en.md","size":2741,"blob_sha":"cf2d9aa37b42c077ba55cefb70ffe7d7c9ac386b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_italian_pipeline_en.md","size":2104,"blob_sha":"6044e44aded7d0eb237556b3367ab3106c799908","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legalbench_summarizer_en.md","size":2652,"blob_sha":"875c84806b093b9376f33f58470c84b21003c6e9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-08-legalbench_summarizer_pipeline_en.md","size":2015,"blob_sha":"50cd5b2a61d5d093656d8401aef000ede140bab1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_cls_multitask_italian_en.md","size":2746,"blob_sha":"eb703a12c50024fe3aedd5ccc2af0775084cf1d0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_cls_multitask_italian_pipeline_en.md","size":2109,"blob_sha":"0d2ba42a8a23237ad47a3ff152edc13aebc0a860","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_czech_italian_en.md","size":2761,"blob_sha":"654789d5f02f5799c5b56b93d5f0f29da3af4355","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_czech_italian_pipeline_en.md","size":2124,"blob_sha":"c6e1aab10f9f886ba2f5f44c3134ac2f7080b653","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_french_italian_en.md","size":2769,"blob_sha":"be0ce00f2d7a8d9a74ed55d9a0cdcf645babb344","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_french_italian_pipeline_en.md","size":2132,"blob_sha":"7a42ac05cd2bcd3d488eb2dcba199866d706b00f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_german_french_small_finetuned_en.md","size":2869,"blob_sha":"22cde69d404fcb23506fc2b8562af232eb01f58f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_german_french_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"1664faa1e966b6dad8bf300ab7cc54b7589a2143","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_swedish_spanish_en.md","size":2741,"blob_sha":"bfc5dfba18ec1d66ffaa4aca3034e03971634773","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_swedish_spanish_pipeline_en.md","size":2104,"blob_sha":"adcf945dd430ca0ca56616156ff4012108cddf7e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_cls_multitask_german_en.md","size":2738,"blob_sha":"ffabdb032a33a76639b66fc96b6d9ea25403e251","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_cls_multitask_german_pipeline_en.md","size":2101,"blob_sha":"dff08900c1ffad22f9c5cc485b4f2de1f36e6873","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_finetuned_summ_czech_en.md","size":2739,"blob_sha":"b5be898749cbe5470b492c5af0ab69f0f3bffb2b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_finetuned_summ_czech_pipeline_en.md","size":2102,"blob_sha":"9f5a7c0eb760e55eff0b5666708d10821d6311df","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_multitask_english_italian_en.md","size":2777,"blob_sha":"1d80a94ab3a9ba34f12be3f3766a5ee544e2ed9c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_multitask_english_italian_pipeline_en.md","size":2140,"blob_sha":"c61a905b35929e14ad0cab2296f81e01eea6d6dd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_czech_german_en.md","size":2717,"blob_sha":"a9e4a9d8fdf03f92284cb0d4a70d4361081f5fd0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_czech_german_pipeline_en.md","size":2080,"blob_sha":"62a45eb73d99436c45f2fc17364d3c59ff9e6d50","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_swedish_english_en.md","size":2741,"blob_sha":"a5b2b7c719c8845f5e6b0dcdc690882f98e4c43e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_swedish_english_pipeline_en.md","size":2104,"blob_sha":"16a565394d28f35791870865b81621a8fe8846e0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-flan_t5_summerize_legal_doc_en.md","size":2674,"blob_sha":"1b2f11f2e27dec5880bee733a91fe5a8e86c7ad1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_key_tonga_tonga_islands_text_en.md","size":2719,"blob_sha":"519183bada8e56bfc1ff970b2ccf407d7003d32b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_key_tonga_tonga_islands_text_pipeline_en.md","size":2082,"blob_sha":"51dd3e394e6362f6861c363d5aed2a8469827313","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_cls_finetuned_italian_en.md","size":2746,"blob_sha":"c221bc7657984ed4be786ce79b7383152643f196","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_cls_finetuned_italian_pipeline_en.md","size":2109,"blob_sha":"ed58fe318350c84570a150492f6b46f9755e7832","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_english_swedish_en.md","size":2777,"blob_sha":"0c07319d8d726452eb8a772bbd8dbac33f949506","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_english_swedish_pipeline_en.md","size":2140,"blob_sha":"5fe75db665730287355bc2e7269d16e5fbebfc5d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_english_en.md","size":2777,"blob_sha":"4e63e04ded7da6aafcf9d9c0ec49162b67629719","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_english_pipeline_en.md","size":2140,"blob_sha":"3ae274dc69c1ec434c0d658bf0932e23998ea112","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_german_en.md","size":2769,"blob_sha":"0da0381df28dc3eec1c804005b02f10aebd92a71","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_german_pipeline_en.md","size":2132,"blob_sha":"d5cce56f20bd7001ae6dcf0e33bc701964d4a952","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_spanish_french_en.md","size":2769,"blob_sha":"404fab641239811863620d272853e24fabc89d27","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_spanish_french_pipeline_en.md","size":2132,"blob_sha":"efe48d0e1fd7e8c8039288a433acbef57fe3461d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_czech_spanish_en.md","size":2725,"blob_sha":"6cda1bdf6a964a84f4c370aacf12fd7f8910a022","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_czech_spanish_pipeline_en.md","size":2088,"blob_sha":"5d57c6de93d30ceda3c233f338213c9a8905a710","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_french_en.md","size":2733,"blob_sha":"3828d115e4d92bb93a8d027122a9b16aeb6c4904","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_french_pipeline_en.md","size":2096,"blob_sha":"16550a6911c928b81efeb62b9ad4a8f9f97cbe30","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_german_small_finetuned_en.md","size":2877,"blob_sha":"cc98db34534ff7609de4e51c39d15b456e1ac16c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"2f058aef0dcaeb0376205512e7ffbe4f3bdc5a0e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_french_italian_small_finetuned_en.md","size":2877,"blob_sha":"85228fbcb16ac8af213995f49f48626815b9b965","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_french_italian_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"5d4ac19b40999f8aa6a863765c34ed24bcae0d0a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-t5_base_ai4privacy_en.md","size":2596,"blob_sha":"aed0ea3aa8c1f3a859cdd6243b00b5753aac202f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-11-t5_base_ai4privacy_pipeline_en.md","size":1959,"blob_sha":"f9c9bfc459bc405c45e99aa83c780463fd4b291f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_base_en.md","size":2548,"blob_sha":"0f94a696017760ba377aca09a7a8b737ce154d48","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_base_pipeline_en.md","size":1911,"blob_sha":"3f43c66cd6782b119544ab42ada5b0fd608d3724","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_finetuned_summ_italian_en.md","size":2755,"blob_sha":"3d2d75dddaef1a785b5b5541d4a972af1551e8e0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_finetuned_summ_italian_pipeline_en.md","size":2118,"blob_sha":"bc728bc2e435e8c26222f06d38a6195a6c86c2f2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_multitask_italian_swedish_en.md","size":2777,"blob_sha":"c43fae50f4da89df041449137bd39a96bd824d3e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_multitask_italian_swedish_pipeline_en.md","size":2140,"blob_sha":"54b96688074bd86bd1826fb250c802b88567af9e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_czech_small_finetuned_en.md","size":2869,"blob_sha":"be6bb1b94590a6a66312350c8ed86627ac885065","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"039639dd0eb4096b3ea5949be30d23a3c262b0b2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_english_small_finetuned_en.md","size":2885,"blob_sha":"9b98a448783cf289e5f92326256dbbbb3171ecda","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"f2c4bf4b4c90cc9ba56bd85f0338df3aa59c265b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_text_summarizer_aiguy68_en.md","size":2686,"blob_sha":"1a45fd0ff271dafc4e08a961d2e457fb631e60be","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_text_summarizer_aiguy68_pipeline_en.md","size":2049,"blob_sha":"cd728f1baace7536db2879105833bc6ddc9eac9d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-13-t5_small_finetuned_policy_en.md","size":2661,"blob_sha":"190a75e035b24718cef10be6ef32286b790b4938","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-13-t5_small_finetuned_policy_pipeline_en.md","size":2024,"blob_sha":"4fac86e97cb68b3b7cb738a615adf48b4a3ff9f7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_large_chunked_en.md","size":2629,"blob_sha":"48c1ee876fe1ab2e6bfe0c8a1a776c435a5d74da","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_large_chunked_pipeline_en.md","size":1992,"blob_sha":"c2f81c2ab090c1d39bb4c76bb7c22f873a546850","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_small_summ_english_en.md","size":2665,"blob_sha":"76b40a1a66ff32e3239f62b8de90076db9d4d83b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_small_summ_english_pipeline_en.md","size":2028,"blob_sha":"cd59215bf2c38bdb94bac9d3654969f4b515a8a1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_french_en.md","size":2753,"blob_sha":"5200a038bb1754aa70772c15e7927764303e38cd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_french_pipeline_en.md","size":2116,"blob_sha":"cc0005e5a4f7d008e401ed2ed28f50014b17fcf8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_german_en.md","size":2753,"blob_sha":"fe71009b623e4ec47b03aadd1f28e061efe457fb","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_german_pipeline_en.md","size":2116,"blob_sha":"10eb9919eb852f66392269f28057f21a57460b80","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_french_german_en.md","size":2761,"blob_sha":"f4a25451d420cd0ce746ba5ea507ae40343adbd5","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_french_german_pipeline_en.md","size":2124,"blob_sha":"a62c3182dfa4aec35fed41c65ea5e222c905976b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_summ_multitask_english_en.md","size":2755,"blob_sha":"8007861c90ed91a1d31085b072c9ab31ac1b8c1f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_summ_multitask_english_pipeline_en.md","size":2118,"blob_sha":"e4ffdcd5b8663b355573cd936993792e69eb2b0d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_english_french_small_finetuned_en.md","size":2877,"blob_sha":"0cfe3576b01becc380f8858dba0571326c27f974","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_english_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"e726cf6b9d90c908a6c53f3262e090c415bd05bd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_italian_french_small_finetuned_en.md","size":2877,"blob_sha":"132fe5f288376fb95dce1cd96c095b84f65808af","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_italian_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"663561e0cf7c2cbcf0bc6df8201bef011ad858a4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-flan_t5_summerize_legal_doc_padded_en.md","size":2737,"blob_sha":"fbedeeda5cd62e94ebfcf287d3f5c3550e89830e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-flan_t5_summerize_legal_doc_padded_pipeline_en.md","size":2100,"blob_sha":"be7a770c339b4a4144070a46b88c9129b76b57db","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_flan_t5_chunked_en.md","size":2620,"blob_sha":"2a066862b132474fc7de55ceeb7502f7113f0ca8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_flan_t5_chunked_pipeline_en.md","size":1983,"blob_sha":"e58644549b9852730605ebc4906c1b7dbb1d3c6d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_large_hybrid_en.md","size":2620,"blob_sha":"67e7302bd4613698076956c0f94c588b95b5ee84","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_large_hybrid_pipeline_en.md","size":1983,"blob_sha":"69f07af2519701fd1a205e7d8838e7ae36623086","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_cls_finetuned_french_en.md","size":2738,"blob_sha":"436c5f508e752a2d19b791c094aa9ea3ed056d49","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_cls_finetuned_french_pipeline_en.md","size":2101,"blob_sha":"052ddc13b654a263020ba20dd271e73a08ef0e05","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_finetuned_summ_french_en.md","size":2747,"blob_sha":"d2508058729d02963211e33181f2cb9232fc6203","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_finetuned_summ_french_pipeline_en.md","size":2110,"blob_sha":"8f8f6e3c5d572bcc06a5122b91143ccf47949901","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_multitask_swedish_czech_en.md","size":2761,"blob_sha":"89a8b54c61e14302b862b2a44e03026e7af6785d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_multitask_swedish_czech_pipeline_en.md","size":2124,"blob_sha":"8bce5f0b426eb80b388617010786c1d5a539a028","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_czech_en.md","size":2725,"blob_sha":"0609384b533476f3a08c80a19618b0b88ed0e6df","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_czech_pipeline_en.md","size":2088,"blob_sha":"7066678740398ed5c29d10a8b9753724facb7892","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_swedish_en.md","size":2741,"blob_sha":"7404d45577ec8aaba3496975b0d5a08cc72aeb14","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_swedish_pipeline_en.md","size":2104,"blob_sha":"9fa97bcfbd78c7c8693abc8b706393e93cd259f8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_cls_swedish_en.md","size":2656,"blob_sha":"dd47be1a2b031b4d3f9ac1f5e8e1168c0ff66072","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_cls_swedish_pipeline_en.md","size":2019,"blob_sha":"82571b6de331dee70d9fc70d8400730f322d28d1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_german_english_en.md","size":2769,"blob_sha":"0460122d56bbe0c71d500c1cf4de0b7d7dbdfb65","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_german_english_pipeline_en.md","size":2132,"blob_sha":"92e4170df6e2493419d0a806a9d91c83f3f1cdfe","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_italian_en.md","size":2777,"blob_sha":"29c6913b849aa7f7963eed5948a1da96692bb511","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_italian_pipeline_en.md","size":2140,"blob_sha":"8218c0477c94f7daee90367472612d271e79f6a7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_swedish_en.md","size":2777,"blob_sha":"332701f98024421299ab2025d3124dd904b675af","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_swedish_pipeline_en.md","size":2140,"blob_sha":"c9c65dfb12d345896bcc7934a5eecab7cad68da9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_english_italian_small_finetuned_en.md","size":2885,"blob_sha":"3ff36e18016c3189eb3bd3fc04ebacb133195000","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_english_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"817c501f4ff8f30a59e759c03a21733cb1180ed7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_french_swedish_small_finetuned_en.md","size":2877,"blob_sha":"a68c8816a55574d644f2726604f5ef87942b221a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_french_swedish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"5870723fc7b96636cabb913cc11cce6eb3ea3be3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_german_czech_small_finetuned_en.md","size":2861,"blob_sha":"9781d55a1fbd880409433b6c94bdb3938769ff38","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_german_czech_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"a880b8a02d78d18bf5f052f9c90bc6a6f8b19949","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_en.md","size":2733,"blob_sha":"a085a3b90fd3d4e10baaf1b899c27076c834538b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_pipeline_en.md","size":2096,"blob_sha":"dfb4a684752a4b800bf0c99085501c1e66628256","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_small_finetuned_en.md","size":2877,"blob_sha":"9c5f6529be2f7b9cd719edfa216e84278fa6e167","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"a493fc3fdbfaf21e675d6044cade0041e91d0815","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_en.md","size":2741,"blob_sha":"d8bc851aebb89da5fca53728bde6b1ef4934e093","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_pipeline_en.md","size":2104,"blob_sha":"6db3146c7642206aa6eee69f88962974646561ce","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_small_finetuned_en.md","size":2885,"blob_sha":"e41b4a0a6974f4db07285b237eebb30b310870b7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"c152a6ae9a4d83cc706beb6054d1e28b9a730236","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_text_simplifier_en.md","size":2629,"blob_sha":"8ae0ed473e51c22d55e1ff56ae7f902942be948d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_text_simplifier_pipeline_en.md","size":1992,"blob_sha":"9bf38ff598e10dfbfe421c8d69bec7f6e4095465","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_finetuned_english_en.md","size":2746,"blob_sha":"984c047633d42770cb444ccade83fe204ab81225","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_finetuned_english_pipeline_en.md","size":2109,"blob_sha":"b020d1036b48b278a4bc4cba77744931a1faaab3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_multitask_swedish_en.md","size":2746,"blob_sha":"18f21584f49085cc7de7ac975b4353aeb3aef584","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_multitask_swedish_pipeline_en.md","size":2109,"blob_sha":"4dd39c633d2e474fd60f968478b56ab73a8f5222","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_summ_multitask_italian_en.md","size":2755,"blob_sha":"29fd36cc8551635de7c49866f96d171667a91a62","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_summ_multitask_italian_pipeline_en.md","size":2118,"blob_sha":"9996616f5575a855e54a542b61b191790e127392","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_czech_spanish_small_finetuned_en.md","size":2869,"blob_sha":"9e66b96cf95df412f645b5abfae15d65c5d812e9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_czech_spanish_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"a1ea43a7c19814a7e3a38661daa6015ad3dcd227","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_german_spanish_small_finetuned_en.md","size":2877,"blob_sha":"5eec4e8d24bea0a60d8dabcf4dece6edbc5bf1cd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_german_spanish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"8272825a67386a350758f135120afc15d9d1be28","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_swedish_czech_small_finetuned_en.md","size":2869,"blob_sha":"7faa6d569653c697946eb2f969bde1afaa4fd81d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_swedish_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"b084b0d9c9669e7f894a5b644ae127565a217c06","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_base_chunked_en.md","size":2620,"blob_sha":"109d16b816fc1b707edbae30ed0ae4e7b0828804","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_base_chunked_pipeline_en.md","size":1983,"blob_sha":"c687af477267f397e8172f179f28245fcb4dcf1b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_cls_spanish_en.md","size":2656,"blob_sha":"cda9e932942dcf913c7ab65ad5f1262b7f3b8707","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_cls_spanish_pipeline_en.md","size":2019,"blob_sha":"2f5250eb174c866d064668f515fff602a36bdfad","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_czech_spanish_en.md","size":2761,"blob_sha":"64396472b690c073b54b825c0f3c34467955cf95","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_czech_spanish_pipeline_en.md","size":2124,"blob_sha":"d017cde024d39b91340f68de7d85347943af6389","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_spanish_czech_en.md","size":2761,"blob_sha":"a9942b8992dbb788b307f56cd71759703a4320aa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_spanish_czech_pipeline_en.md","size":2124,"blob_sha":"27bcefbe3fb3e168d067e5ea5e17aa6715d6afeb","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_french_en.md","size":2769,"blob_sha":"7bb0bf516626015e3c1bf60cf4fb80bbc9b788e2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_french_pipeline_en.md","size":2132,"blob_sha":"18219f757894eb549607c6922412efb3ba7c9ecc","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_german_en.md","size":2769,"blob_sha":"b8de0024334654b4f12017c7cca7eec72e7d7c7a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_german_pipeline_en.md","size":2132,"blob_sha":"2407d1c5d7b0fa4945171a638dde9f05c058f973","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_summ_spanish_en.md","size":2665,"blob_sha":"5c2f9177c2611e288e2ff9b5e061e7cea43403f6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_summ_spanish_pipeline_en.md","size":2028,"blob_sha":"a25d4c8af9e6efcc1b147a2a47a4c7557bb26b20","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_czech_italian_small_finetuned_en.md","size":2869,"blob_sha":"9127518fc5a03b014453a1fd9aa271694f35986d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_czech_italian_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"102b62e0d3eb171e3dcdaff01c5eccbcad95b8b9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_english_czech_en.md","size":2725,"blob_sha":"9684f7dc6a3bd6ef4e4f046a84d1dbc117247e1f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_english_czech_pipeline_en.md","size":2088,"blob_sha":"b9aa4efd981b5aca7cd26c633b000528baf62d89","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_french_german_en.md","size":2725,"blob_sha":"61ead87259c9d55a770aed96fc33d6227aa05e8f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_french_german_pipeline_en.md","size":2088,"blob_sha":"7b0b65dfa7e2670b576bd982d01f95f8908c5092","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_english_small_finetuned_en.md","size":2877,"blob_sha":"3a923e0170854c933f13f0adab793c0a61284c3b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_english_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"60a5c0ab7aa982eb1e6fbd15a241a1926a218cca","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_italian_en.md","size":2733,"blob_sha":"668818cd4b9f475e554fd9027af5f2fec451c9c0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_italian_pipeline_en.md","size":2096,"blob_sha":"c5d79083628f6e964fb82425654343aecf316ea0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_italian_english_en.md","size":2741,"blob_sha":"d54930fa4fc3e874fb8f58a39c91472ef77e2b93","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_italian_english_pipeline_en.md","size":2104,"blob_sha":"45c5e66c575b330beb4ece55898fececc353ee3d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-russian_t5absum_for_legaltext_en.md","size":2698,"blob_sha":"b97ddc2ad8197f10e34ffe76745a127614365381","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-21-russian_t5absum_for_legaltext_pipeline_en.md","size":2061,"blob_sha":"902c58308dd776dd7c6b68f6eaf5283ad855f9bd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_large_en.md","size":2557,"blob_sha":"9545a34ac5370240d75b32d3b934e7309b3ec875","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_large_pipeline_en.md","size":1920,"blob_sha":"17cb9caaab7177531a0c1e46b52ad1f0fe5555f8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_finetuned_summ_german_en.md","size":2747,"blob_sha":"42b4de307e96e1c9a9ea497e10bffd2addbcbf14","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_finetuned_summ_german_pipeline_en.md","size":2110,"blob_sha":"bf31db42a826d48cea76accdc25b3d7543380b79","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_czech_french_en.md","size":2717,"blob_sha":"ad66460eee0be3aeb99ce42e0b91b06b12121e91","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_czech_french_pipeline_en.md","size":2080,"blob_sha":"920655a9b5c89625da5a2063cc3f567eecf3afed","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_french_small_finetuned_en.md","size":2877,"blob_sha":"80d43e6c6244242fdfd53fb716b7deaee86a84cf","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"b092ba21ca3e3be60ed7347994cd8ace0cffdc41","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_german_en.md","size":2733,"blob_sha":"24debd8fcf2fcd2e87fedda74e38189c842a2294","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_german_pipeline_en.md","size":2096,"blob_sha":"0f54f6e993041677a02579e73f2799217edb3c2a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_swedish_italian_small_finetuned_en.md","size":2885,"blob_sha":"f1489b1a3001a0c5d11049b80e4563468e699ee4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_swedish_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"ffdb8340e864af8f14a0d87b1a3cda8d18bea69a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-vit5_large_legal_lora_en.md","size":2620,"blob_sha":"4ed23c53ccf23973fb0d2b686a92108dbb3ccbd8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-22-vit5_large_legal_lora_pipeline_en.md","size":1983,"blob_sha":"2a002a8b2f4ace57d43c7711e522f7f4e0f7a709","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_chunked_en.md","size":2631,"blob_sha":"015c9e862b15974c6b1bdffc36d533760967e4e1","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_chunked_pipeline_en.md","size":1994,"blob_sha":"30711b4b83731d2ea594c1528a471c90793d964d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_cls_multitask_spanish_en.md","size":2746,"blob_sha":"7ad1374f02c937ba41a9524bc8580f9930dc6178","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_cls_multitask_spanish_pipeline_en.md","size":2109,"blob_sha":"3df044b8f1dbae73eb00c2abc2a63aeedf74706d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_en.md","size":2559,"blob_sha":"2cc49a0242a3a8d989271a191203a6d453da658e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_czech_swedish_en.md","size":2761,"blob_sha":"ebdc195e814d57a1e1da6561f60ea1571732a50a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_czech_swedish_pipeline_en.md","size":2124,"blob_sha":"61b13d7e5ddd9b753f53ab36750679b80ab7a0f0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_german_italian_en.md","size":2769,"blob_sha":"819100f5ff1c9fe12bd190fd16c958160453301f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_pipeline_en.md","size":1922,"blob_sha":"5ec6a5a8870c0b51a367c67ab17c57c9f606df5c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_german_en.md","size":2657,"blob_sha":"22bf1e3e1f4533fd945c81bc8807301496f6691d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_german_pipeline_en.md","size":2020,"blob_sha":"073e98b34ba609252c82ce7c33def3b800979b74","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_multitask_czech_en.md","size":2739,"blob_sha":"c5eb3b85a416a3d012363c32df1b5889bfa15154","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_multitask_czech_pipeline_en.md","size":2102,"blob_sha":"8ff201d75298995129bdb7163e2bf07cd600a126","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_english_swedish_small_finetuned_en.md","size":2885,"blob_sha":"11e7fa9f7348168a8c7e144207e0b242a5001136","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_english_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"316502a33b27f8772182f75d921767dd649072fa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_french_spanish_en.md","size":2733,"blob_sha":"41ca3c3ec0e58eb45cd908a771c80781b681b920","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_french_spanish_pipeline_en.md","size":2096,"blob_sha":"61d76d1ade96e122387f4816d73497d6cf9ebfc8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_cls_finetuned_swedish_en.md","size":2746,"blob_sha":"7ecb223b168d034f9e192ec3d7702e704ee541ca","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_cls_finetuned_swedish_pipeline_en.md","size":2109,"blob_sha":"3da54e09ff6d209c8a575b405b31e15a84f59686","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_french_en.md","size":2769,"blob_sha":"0c94b5cb5c04fadb3242e9220929f000db0bbc98","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_french_pipeline_en.md","size":2132,"blob_sha":"17bdc5545cfbd10fa769b06c413242f39cbca986","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_spanish_en.md","size":2777,"blob_sha":"8f23765133548260328293110e8ad9dc35d379cc","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_spanish_pipeline_en.md","size":2140,"blob_sha":"742e17f1a1addc4806fb348044a7c53b514204c8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_german_italian_pipeline_en.md","size":2132,"blob_sha":"d40c2f888cc81148072b88ae4cae0e46d0aee686","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_czech_english_small_finetuned_en.md","size":2869,"blob_sha":"43d841ab00e514400c0b9e11cc4ca3363d683a52","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_czech_english_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"7f07f64d693736595cd5bdf646eb969e36bb8967","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_italian_french_en.md","size":2733,"blob_sha":"0aea3eff9505da274b16504fa040586a1afe9f33","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_italian_french_pipeline_en.md","size":2096,"blob_sha":"b8e7f42500f06373d639dbdd48132ade0cfc948d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_spanish_german_small_finetuned_en.md","size":2877,"blob_sha":"94c3349030145ff8b5411a3b0e2f834e935ff750","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_spanish_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"529a567394c6cd97965e4c341f4ac2eb32b39fd8","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_en.md","size":2733,"blob_sha":"ef345b519cf5b136501894b164d2a62ed5a600f6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_pipeline_en.md","size":2096,"blob_sha":"85d5649bbada97413af73d83c0ab71c953639c5e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_small_finetuned_en.md","size":2877,"blob_sha":"7e2f3f12cd1f4b6cae40d169d11d3c4129a3564f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"ef95d6ea2b09d6ddfba08026fe048175c5777b26","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_english_en.md","size":2755,"blob_sha":"f6e310199d53a8a4bcfbdbe3f846fe836d520fbd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_english_pipeline_en.md","size":2118,"blob_sha":"d8c7a90c2304187e5787d66bc812f9d5a89dcf01","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_spanish_en.md","size":2755,"blob_sha":"9af8810c939aa8d672cc02d3693d87490c9bbafe","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_spanish_pipeline_en.md","size":2118,"blob_sha":"3545d52e8c68da15b2702296ad2972cbf7c10215","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_summ_multitask_french_en.md","size":2747,"blob_sha":"fb3a84ae3d34922985c370dd9be93d41f0775362","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_summ_multitask_french_pipeline_en.md","size":2110,"blob_sha":"471a07be429974316e71f9bc3cac7e8d154cabed","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_trans_french_swedish_en.md","size":2733,"blob_sha":"01c815886278ee0b677a70fa4262dfeb875f8038","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_trans_french_swedish_pipeline_en.md","size":2096,"blob_sha":"9c04d8336f498c5cb33d6e3f7621bb1c01e8a2ec","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-t5_small_finetuned_legal_tech_ukrainian_en.md","size":2774,"blob_sha":"68b6ae8809b0b4bac423278775c61c4cda14b0af","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-25-t5_small_finetuned_legal_tech_ukrainian_pipeline_en.md","size":2137,"blob_sha":"3543a8ba414a7a70b6a9aac7d2257843cb85afab","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_english_german_en.md","size":2769,"blob_sha":"eacc1408f651bf28e4a364bcd0d20e6618f34d93","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_english_german_pipeline_en.md","size":2132,"blob_sha":"a78d0f0aa16dc17729cff76d24c29969049d9cfe","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_german_french_en.md","size":2761,"blob_sha":"25a412d84d27aca1f0d7de708bd3a2ad69dbed47","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_german_french_pipeline_en.md","size":2124,"blob_sha":"75b5b24264666f2f1956046aa281c9a39655ed8e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_italian_french_en.md","size":2769,"blob_sha":"a760c140cfa9c5c29d7fec1475a8b422b7073375","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_italian_french_pipeline_en.md","size":2132,"blob_sha":"b763a8cac81e991cd6c9b76f31055b94a6cb2f67","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_swedish_italian_en.md","size":2777,"blob_sha":"3dba6a428b0ecf4292619deac3c46e97c9c2858b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_swedish_italian_pipeline_en.md","size":2140,"blob_sha":"2796a034701d195adbda09259cea9d69c78c36e4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_czech_en.md","size":2649,"blob_sha":"5a164b4600242b5de5cf02233b748d7d7417c709","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_czech_pipeline_en.md","size":2012,"blob_sha":"17444a3cdc2bba4ae88c6394b728ccaa8e4af629","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_swedish_en.md","size":2665,"blob_sha":"169325cd82fa9239be9062866bdea21df770cdfe","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_swedish_pipeline_en.md","size":2028,"blob_sha":"a1648df65e505cacec8e775d5479eb763b16e656","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_english_german_en.md","size":2733,"blob_sha":"af1d78e04b9207a1726e9fd2dfd57ca4bb5011fa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_english_german_pipeline_en.md","size":2096,"blob_sha":"db324fc604b0fff74bb7fc729bb8ad5481e412c9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_czech_small_finetuned_en.md","size":2861,"blob_sha":"aac37f17418b44a62db3cd062f0cbfab4a3ddac9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_czech_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"b9621f0ea4dff2411879ca1fea6e5d6365cc5a9b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_german_small_finetuned_en.md","size":2869,"blob_sha":"9c0b55419861987a305581bfa53c1722c7dbfaee","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_german_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"3bb091dfd3858831c1b6a4f2383a8afae90276dd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_english_en.md","size":2733,"blob_sha":"239357b9d014191c68b4eef63f806c3558804749","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_english_pipeline_en.md","size":2096,"blob_sha":"47910a4bd78b969e693b1fd0852a2dc176261a84","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_swedish_small_finetuned_en.md","size":2877,"blob_sha":"34523981f63b1efa0ae649768300b5d669fe54f2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_swedish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"6e3df59ee2501b719ad7ac9926b439f50a214751","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_italian_spanish_en.md","size":2741,"blob_sha":"e03d863847b66f54cd0b0b5372b1a847bbfe57ae","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_italian_spanish_pipeline_en.md","size":2104,"blob_sha":"b8636a1c6dfd32cc64dc9618d628a5d0fb46454e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_en.md","size":2741,"blob_sha":"35485819a472b3afe99088b35245a0d37761dbe0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_pipeline_en.md","size":2104,"blob_sha":"61cbd5625686406bfe5999d37851d7eef06f02b0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_small_finetuned_en.md","size":2885,"blob_sha":"ea2b7b7426d7dab7900be00d4e4c21169946555b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"1d926cfe6f8dc7ae27b4894942df45cb44266d9e","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_swedish_german_en.md","size":2733,"blob_sha":"bb2707c1972230283484eb921e4c62fb94927b26","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_swedish_german_pipeline_en.md","size":2096,"blob_sha":"94cbf653d70123594a090ddc2edb32926a095b23","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_cls_finetuned_spanish_en.md","size":2746,"blob_sha":"21e5648150206bed9ba6c5bbcd8c78f1f47d4d02","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_cls_finetuned_spanish_pipeline_en.md","size":2109,"blob_sha":"9574d74980113f99a9a02d8a7ad100a67fea6f0c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_italian_czech_en.md","size":2761,"blob_sha":"9df284102a2b14e3d50b68e47dd2594c7dfb9fa6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_italian_czech_pipeline_en.md","size":2124,"blob_sha":"12cfceadef36fea87fa4b23c0bea2eec07ea8825","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_swedish_english_en.md","size":2777,"blob_sha":"5f5d863da3766433e9fce0fc74ca8651193de14f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_swedish_english_pipeline_en.md","size":2140,"blob_sha":"08fa9f5eb74664a9013d45043ca694e7885b0468","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_summ_multitask_german_en.md","size":2747,"blob_sha":"51582d809d3c512d1509028a0e0c85ffe0656306","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_summ_multitask_german_pipeline_en.md","size":2110,"blob_sha":"a5c42982db79e52d6303f94f247e1dbfed4061f0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_trans_czech_german_small_finetuned_en.md","size":2861,"blob_sha":"3d6016966c7248df80d9cbb7ee5a59c146ee65a0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_trans_czech_german_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"c644ee947104550dd5be707604c5803a07f80dad","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-27-russian_t5_model_forlegaltext_rouge_en.md","size":2750,"blob_sha":"fb28f2e5685b0984da638897b842dfbf0adc68b7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-28-legal_t5_small_summ_multitask_spanish_en.md","size":2755,"blob_sha":"d93dd74e3ff0b7cb82ce89386d94db126cdd520c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-28-legal_t5_small_summ_multitask_spanish_pipeline_en.md","size":2118,"blob_sha":"fae07f91ee8ac01e0dfdddd555cf8c6ffd942728","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline_pt.md","size":2363,"blob_sha":"e084254adcd6a747cef171d72e58df57e396cba4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pt.md","size":2707,"blob_sha":"6eefffd951c1899eb53faf2b1c14d6ca77dcac2b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline_pt.md","size":2381,"blob_sha":"77f45653ea7c7074ee2ff02e9aa857690210681b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pt.md","size":2723,"blob_sha":"7c7e67d2617db65a2967c7b9f02007bce0f10ad2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-distilbert_base_german_cased_finetuned_ai4privacy_v2_de.md","size":3201,"blob_sha":"bc5157c1398ba51ea5abf50ffcf73066232996e9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline_de.md","size":2298,"blob_sha":"1ae0fae6ceae6196afa43542f43a102886444944","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-fine_tune_embedding_bge_base_hrpolicy_vfinal_en.md","size":2779,"blob_sha":"24f78285de0015c7e1c8fccb4113aa7a7efb277a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline_en.md","size":2143,"blob_sha":"c11f6cfc9e3d7d71fe9c2ceb6e1bf1040adf428f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-gqa_roberta_legal_squad_complete_augmented_2000_en.md","size":3227,"blob_sha":"436523321fb45c9c231e0952f07134669cf57d63","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-gqa_roberta_legal_squad_complete_augmented_2000_pipeline_en.md","size":2225,"blob_sha":"9b98ce2bfb742aa5bd7df56528190fd88155aacf","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-greeklegalroberta_v3_el.md","size":2859,"blob_sha":"c199ce968b2cad67fbf6d06650458bb8140c250c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-greeklegalroberta_v3_pipeline_el.md","size":1988,"blob_sha":"87ea90da9618486da87f768f1f10465f115addb0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_roberta_base_saibo_creator_en.md","size":2933,"blob_sha":"096b488513675cd03e698903041d7cddbaf21c60","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_roberta_base_saibo_creator_pipeline_en.md","size":2062,"blob_sha":"9673f560a8a65a9781d43414fbe073a869ec4953","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_xlm_roberta_base_pipeline_xx.md","size":1990,"blob_sha":"e20d7077be8233451f9dc1d972c6c0561d83ec7f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_xlm_roberta_base_xx.md","size":2861,"blob_sha":"a1b3361a4126d23b2a2d08774bbae249968ddc05","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_embeddings_custom_legalbert_en.md","size":2465,"blob_sha":"5bc8b467b886b40b539b1f0ffc43512941f7e18b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_embeddings_custom_legalbert_pipeline_en.md","size":2030,"blob_sha":"6c11c20ea42caa2d06d871112fa96009bd9b0b35","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_finetuned_cuad_legalbert1_en.md","size":3041,"blob_sha":"5b3301847308dfb0d82d7af59df3b0f1d5b9e462","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_finetuned_cuad_legalbert1_pipeline_en.md","size":2048,"blob_sha":"8bd8cc304713002c4b7f003823a0afd6cff511e9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-distilcamembert_french_legal_fr.md","size":2887,"blob_sha":"4fc8da3bbb9d1c36957c8d6d06d4be1ade0e6051","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-distilcamembert_french_legal_pipeline_fr.md","size":2049,"blob_sha":"89aab384e7ff5e1125b096812d85074300808363","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-finetunned_legal_deberta_v3_base_en.md","size":3104,"blob_sha":"da8139087e9220529d20ed46a1daf7344a116435","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-finetunned_legal_deberta_v3_base_pipeline_en.md","size":2102,"blob_sha":"7e8f9610e0f68f5641689d895826263f605dc801","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_camembert_base_fr.md","size":2863,"blob_sha":"ebd09c9a75d700af492f573a2d28f4569b028d62","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_camembert_base_pipeline_fr.md","size":1984,"blob_sha":"7028ad53943fbda42995e42d504e1a63121f5f9a","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_roberta_base_lexlms_en.md","size":2856,"blob_sha":"9aaf93157d49aa77c670ae5a5f43b25003aeab39","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_roberta_base_lexlms_pipeline_en.md","size":1985,"blob_sha":"73707bdf1c2fdf23c02d267509bd4613b11b4cc5","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legalbert_en.md","size":2704,"blob_sha":"cfe3f3e222e705a95a2557e8884cf919b62c1edc","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-legalbert_pipeline_en.md","size":1845,"blob_sha":"7c76b102d85a644f50e45664ed59fb6d856ead7f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-privacy_masknig_en.md","size":2882,"blob_sha":"180ce6dbcea06cb6b82a0c823bccd44de388d8ca","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-privacy_masknig_pipeline_en.md","size":1979,"blob_sha":"e8dd95be2126e5cd852c431fc0f1b54a04613dcf","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_embeddings_legal_roberta_base_en.md","size":3054,"blob_sha":"8c4bc8b72886f1bb06720d267b5428e483e644a0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_embeddings_legal_roberta_base_pipeline_en.md","size":2078,"blob_sha":"ba0f31197da21db9a9dd39946142f31fd456abad","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_large_swiss_legal_gsw.md","size":2007,"blob_sha":"e7e064227638362f118578e2c8e4f0fc2c73b1bd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_large_swiss_legal_pipeline_gsw.md","size":2052,"blob_sha":"57c68050e918ebaf3f8c674ac7f22b43468187d9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-sent_custom_legalbert_en.md","size":2938,"blob_sha":"376d2f1ed8958e470e6ef1d3c6ea3cc6e02e35c5","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-02-sent_custom_legalbert_pipeline_en.md","size":1998,"blob_sha":"2ce785dc60965281e3313567ab379075b76ff74d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-bert_embeddings_legalbert_en.md","size":2374,"blob_sha":"63e681d71b3f49344d490a3271f4dea96e76b9e0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-bert_embeddings_legalbert_pipeline_en.md","size":1967,"blob_sha":"803c665e10a1e1b8bd2e4c704ed86b188a061170","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-cybertuned_securityllm_en.md","size":2836,"blob_sha":"c060fbc53a06017bb9b4499e89a8dcceb3057732","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-cybertuned_securityllm_pipeline_en.md","size":1965,"blob_sha":"6c4340741f94b9cc7d759c6192928db610cc70f0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-deberta_v3_base_finetuned_ai4privacy_v2_en.md","size":3068,"blob_sha":"7f822321de07980ce577ca74d49d707fd8197e8d","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-deberta_v3_base_finetuned_ai4privacy_v2_pipeline_en.md","size":2174,"blob_sha":"d1b20d7ee691fe9f370cb4f9259c3a0ac28086d3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalevalrr_en.md","size":2498,"blob_sha":"5d47d9b600da9de8f4583691c88ad91d0cc1d197","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalevalrr_pipeline_en.md","size":1855,"blob_sha":"b1422bedb4d707164154585480400463fe783805","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalro_bert_for_rhetorical_role_labeling_en.md","size":3146,"blob_sha":"66912a4aea23538400b764cb02317faeda26bfd6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalro_bert_for_rhetorical_role_labeling_pipeline_en.md","size":2223,"blob_sha":"ab0010762a8b438ebada6d5cf10d389a67864e1f","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-mini_legal_distillbert_en.md","size":2993,"blob_sha":"43063ad1c59c142bad9252c8109aabc2dc956aae","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-mini_legal_distillbert_pipeline_en.md","size":2061,"blob_sha":"b4c0808afe14ae45509eda8ab7f4a880e70a43f3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-policy_qa_burmese_finetuned_en.md","size":3028,"blob_sha":"fca6712efd283183c2381414861907023e1e631c","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-policy_qa_burmese_finetuned_pipeline_en.md","size":2035,"blob_sha":"04a08ea1df4c2fc6d0ff027b19cd69371fbf7c4b","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline_pt.md","size":2327,"blob_sha":"f162330e5599403f7410d783b4abeb158dfd75c9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pt.md","size":2688,"blob_sha":"9e59564bbd70a1f9e16f4051157166db2ae825bf","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bert_small_uncased_en.md","size":3007,"blob_sha":"bd96446debc3486367880b1d7566f602605f78be","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bert_small_uncased_pipeline_en.md","size":2067,"blob_sha":"5f2ffcd03a7a5449b385f6ae70e53a7d24639ef4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bertimbau_base_pipeline_pt.md","size":2040,"blob_sha":"7a9421251ec9a693cfe5ec044ab3fa6e9d70d1c2","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bertimbau_base_pt.md","size":2980,"blob_sha":"5d59c7cf3d4d08444e5722976dcd405839fba7cf","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_hebert_en.md","size":2896,"blob_sha":"153e3c09211c51e37faec9e85f7148d020cc4249","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_hebert_pipeline_en.md","size":1956,"blob_sha":"884bdc8ee42b3f587cb6ff8ec4e560fec78cc1f5","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-deberta_v3_base_ai4privacy_english_en.md","size":3027,"blob_sha":"7f6e4149dafa58f2cf873377d75da96e5750bdd6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-deberta_v3_base_ai4privacy_english_pipeline_en.md","size":2133,"blob_sha":"dd659b1fd94655da4bd74afd16011ba32b5374e9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-gdpr_anonymiseingsmodel_ganm_en.md","size":2966,"blob_sha":"dbf719974589aba7eb6e9609e64146fe0b6829e3","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-gdpr_anonymiseingsmodel_ganm_pipeline_en.md","size":2081,"blob_sha":"e1beb5e4423a5086ae2fd5ffda10e0940a2f32d4","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-gqa_roberta_german_legal_squad_2000_de.md","size":3117,"blob_sha":"6bed11faab0133fc8f3dffb244e4408459da2ca6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-gqa_roberta_german_legal_squad_2000_pipeline_de.md","size":2115,"blob_sha":"5837a2c60992dbb1b157bb9a3b1adaf3c9599da6","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_roberta_large_en.md","size":2807,"blob_sha":"ee0c1ffeef565236cf9069c7886232c7780572f7","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_roberta_large_pipeline_en.md","size":1936,"blob_sha":"94a44849e723a247fe33abf9c1b3fd818c8489ed","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_xlm_roberta_large_pipeline_xx.md","size":1997,"blob_sha":"f24ebbb053e1f1453e5f2039beff195589950eaa","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_xlm_roberta_large_xx.md","size":2868,"blob_sha":"bb1efdbd41e4e542803ee61a09e71a2d6f5175d5","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-mdeberta_v3_base_finetuned_ai4privacy_v2_en.md","size":3077,"blob_sha":"ece4fb42a6c2c04ea9d97f052a0d8d0af1097ce0","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline_en.md","size":2183,"blob_sha":"1a4b6229d0af34e5039729cfc416648d8bcd06fd","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-monobert_legal_french_fr.md","size":2976,"blob_sha":"1929f0411fa9c973e13b9446547e11b4f0bdfad9","priority":1},{"path":"docs/_posts/ahmedlone127/2024-09-04-monobert_legal_french_pipeline_fr.md","size":2047,"blob_sha":"e98ced63b65efe94b2de8049e278c4a08b4e34b7","priority":1},{"path":"docs/_posts/Digaari/2021-09-06-sent_bert_base_uncased_legal_en.md","size":2830,"blob_sha":"086dbc151421263f8387099983c668147fff433d","priority":1},{"path":"docs/_posts/Digaari/2021-09-07-bert_base_uncased_legal_en.md","size":2759,"blob_sha":"2fb31dd3ed4a5e6669bef426dd75733d6ec07d66","priority":1},{"path":"docs/_posts/Mary-Sci/2022-12-12-roberta_embeddings_legal_base_en.md","size":3129,"blob_sha":"792dda524046c43aa12de2c7f7535a2cccc3c553","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_bulgarian_legal_bul.md","size":2010,"blob_sha":"0f2ed1627a546c4e1b5f170c50498271d42ca7b8","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_croatian_legal_hr.md","size":1992,"blob_sha":"ed0fa8cb0384f0f066295164b426931e6bbb7706","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_czech_legal_cs.md","size":1959,"blob_sha":"625f7c7f2b1a47950451b533b071cf8c4003b218","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_danish_legal_da.md","size":1970,"blob_sha":"d5b27915e80f198356cc78edaa6512dec9ed0a12","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_dutch_legal_nl.md","size":1959,"blob_sha":"7097b03dce140cb42825d6c309eb363b67fd42f0","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_estonian_legal_et.md","size":1992,"blob_sha":"fc180603796264ec2ca2ad6f541061f25f478bb4","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_finnish_legal_fi.md","size":1981,"blob_sha":"285001f1c9065335e27fd7e02275c5e15bfcb466","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_french_legal_fr.md","size":1970,"blob_sha":"1da354103d0ff326ee1384bd6c4218c64bcba5c9","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_greek_legal_el.md","size":1959,"blob_sha":"8989d8679575a777bed3f04c9b4d9bea89b4832d","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_hungarian_legal_hu.md","size":2003,"blob_sha":"8ffc4693b26bb58d17b8a4b94ef5bd717c5d51e5","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_irish_legal_gle.md","size":1966,"blob_sha":"bd54ee76062952a75c55b4ea4d9d61f108f23c55","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_italian_legal_it.md","size":1981,"blob_sha":"441aeb292357e461cdae0bdb6612037d20363361","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_latvian_legal_lv.md","size":1981,"blob_sha":"6fdf65b7ecd9169ef075be9645d48e17f5aeeaf0","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_lithuanian_legal_lt.md","size":2014,"blob_sha":"3b3b6a1d3f5b0f2215fc6bb2879237af2e8d9337","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_maltese_legal_mt.md","size":1981,"blob_sha":"0fdaf8b041b237aa1b0b6dcf42949461c6587237","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_polish_legal_pl.md","size":1970,"blob_sha":"789ef0056c9b50ce8f7a5c7fb4a9ef6d15c298bd","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_portuguese_legal_pt.md","size":2014,"blob_sha":"6663047f0811308cc44a1e3cd37bb64670c3fc6e","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_romanian_legal_ro.md","size":1992,"blob_sha":"52ce140859f8ebd51e8639d88db7768113d888f6","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_spanish_legal_es.md","size":1981,"blob_sha":"1d61f148dfd25bfa920a0f9ea4bc9b009bf70e4e","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_swiss_legal_gsw.md","size":1966,"blob_sha":"b2d9efceb0cd19f27280d556b52bcf4c029c768a","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_french_legal_fr.md","size":1976,"blob_sha":"b8338cbef6647ce99370e3e67b333e2f04f30f56","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_german_legal_de.md","size":1976,"blob_sha":"6028ad0993d112593baa435d4fbb2487fffa2d24","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_italian_legal_it.md","size":1987,"blob_sha":"2fdd0303ad6803a1d8f1373c5b9bc5e9472196d7","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_swiss_legal_gsw.md","size":1973,"blob_sha":"578d477c1a65e113fafcc83693a10e149afe3fc5","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_english_legal_en.md","size":1997,"blob_sha":"9f56483468269cecbc3e80b50c21865f4ee170a6","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_slovak_legal_sk.md","size":1970,"blob_sha":"2fa84fb5ec186e8dce78eabbc53b2799e1fb17e0","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_swedish_legal_se.md","size":1981,"blob_sha":"26527fbc0fcf1b0aa458c6c2513b2f5309d75fc4","priority":1},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_large_english_legal_en.md","size":2003,"blob_sha":"a9331cc90b61291b51d1f1dc330e023fe7d72410","priority":1},{"path":"docs/_posts/Mary-Sci/2023-05-25-camembert_french_legal_fr.md","size":2832,"blob_sha":"19ea192a264009961153fb373184b3204224d872","priority":1},{"path":"docs/_posts/Mary-Sci/2023-05-25-distilcamembert_french_legal_fr.md","size":2886,"blob_sha":"d9e69189199f0edc02c118ae3cfa3579398b1d2f","priority":1},{"path":"docs/_posts/Mary-Sci/2023-05-28-longformer_base_english_legal_en.md","size":2947,"blob_sha":"88ff5b470c932db7953a4d1de0c7f5ef750a3585","priority":1},{"path":"docs/_posts/Mary-Sci/2023-05-28-longformer_large_english_legal_en.md","size":2960,"blob_sha":"1892e2e093f9809598ed203ff4f52b98bf896559","priority":1},{"path":"docs/_posts/Mary-Sci/2023-05-28-xlm_longformer_base_english_legal_en.md","size":2989,"blob_sha":"de8f8f11dc3e5bd73b7076c696f069f49d68b11e","priority":1}],"documents":[{"path":"README.md","size":17890,"blob_sha":"d04670fa807f2383355155bcadbb03c679851d37","priority":0,"status":200,"text":"# Spark NLP: State-of-the-Art Natural Language Processing & LLMs Library\n\n<p align=\"center\">\n    <a href=\"https://github.com/JohnSnowLabs/spark-nlp/actions\" alt=\"build\">\n        <img src=\"https://github.com/JohnSnowLabs/spark-nlp/workflows/build/badge.svg\" /><\/a>\n    <a href=\"https://github.com/JohnSnowLabs/spark-nlp/releases\" alt=\"Current Release Version\">\n        <img src=\"https://img.shields.io/github/v/release/JohnSnowLabs/spark-nlp.svg?style=flat-square&logo=github\" /><\/a>\n    <a href=\"https://search.maven.org/artifact/com.johnsnowlabs.nlp/spark-nlp_2.12\" alt=\"Maven Central\">\n        <img src=\"https://maven-badges.herokuapp.com/maven-central/com.johnsnowlabs.nlp/spark-nlp_2.12/badge.svg\" /><\/a>\n    <a href=\"https://badge.fury.io/py/spark-nlp\" alt=\"PyPI version\">\n        <img src=\"https://badge.fury.io/py/spark-nlp.svg\" /><\/a>\n    <a href=\"https://anaconda.org/JohnSnowLabs/spark-nlp\" alt=\"Anaconda-Cloud\">\n        <img src=\"https://anaconda.org/johnsnowlabs/spark-nlp/badges/version.svg\" /><\/a>\n    <a href=\"https://github.com/JohnSnowLabs/spark-nlp/blob/master/LICENSE\" alt=\"License\">\n        <img src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" /><\/a>\n    <a href=\"https://pypi.org/project/spark-nlp/\" alt=\"PyPi downloads\">\n        <img src=\"https://static.pepy.tech/personalized-badge/spark-nlp?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pip%20downloads\" /><\/a>\n<\/p>\n\nSpark NLP is a state-of-the-art Natural Language Processing library built on top of Apache Spark. It provides **simple**, **performant** & **accurate** NLP annotations for machine learning pipelines that **scale** easily in a distributed environment.\n\nSpark NLP comes with **100000+** pretrained **pipelines** and **models** in more than **200+** languages.\nIt also offers tasks such as **Tokenization**, **Word Segmentation**, **Part-of-Speech Tagging**, Word and Sentence **Embeddings**, **Named Entity Recognition**, **Dependency Parsing**, **Spell Checking**, **Text Classification**, **Sentiment Analysis**, **Token Classification**, **Machine Translation** (+180 languages), **Summarization**, **Question Answering**, **Table Question Answering**, **Text Generation**, **Image Classification**, **Image to Text (captioning)**, **Automatic Speech Recognition**, **Zero-Shot Learning**, and many more [NLP tasks](#features).\n\n**Spark NLP** is the only open-source NLP library in **production** that offers state-of-the-art transformers such as **BERT**, **CamemBERT**, **ALBERT**, **ELECTRA**, **XLNet**, **DistilBERT**, **RoBERTa**, **DeBERTa**, **XLM-RoBERTa**, **Longformer**, **ELMO**, **Universal Sentence Encoder**, **Llama-2**, **M2M100**, **BART**, **Instructor**, **E5**, **Google T5**, **MarianMT**, **OpenAI GPT2**, **Vision Transformers (ViT)**, **OpenAI Whisper**, **Llama**, **Mistral**, **Phi**, **Qwen2**, and many more not only to **Python** and **R**, but also to **JVM** ecosystem (**Java**, **Scala**, and **Kotlin**) at **scale** by extending **Apache Spark** natively.\n\n## Model Importing Support\n\nSpark NLP provides easy support for importing models from various popular frameworks:\n\n- **TensorFlow**\n- **ONNX**\n- **OpenVINO**\n- **Llama.cpp (GGUF)**\n\nThis wide range of support allows you to seamlessly integrate models from different sources into your Spark NLP workflows, enhancing flexibility and compatibility with existing machine learning ecosystems.\n\n## Project's website\n\nTake a look at our official Spark NLP page: [https://sparknlp.org/](https://sparknlp.org/) for user\ndocumentation and examples\n\n## Features\n\n- [Text Preprocessing](https://sparknlp.org/docs/en/features#text-preproccesing)\n- [Parsing and Analysis](https://sparknlp.org/docs/en/features#parsing-and-analysis)\n- [Sentiment and Classification](https://sparknlp.org/docs/en/features#sentiment-and-classification)\n- [Embeddings](https://sparknlp.org/docs/en/features#embeddings)\n- [Classification and Question Answering](https://sparknlp.org/docs/en/features#classification-and-question-answering-models)\n- [Machine Translation and Generation](https://sparknlp.org/docs/en/features#machine-translation-and-generation)\n- [Image and Speech](https://sparknlp.org/docs/en/features#image-and-speech)\n- [Integration and Interoperability (ONNX, OpenVINO)](https://sparknlp.org/docs/en/features#integration-and-interoperability)\n- [Pre-trained Models (36000+ in +200 languages)](https://sparknlp.org/docs/en/features#pre-trained-models)\n- [Multi-lingual Support](https://sparknlp.org/docs/en/features#multi-lingual-support)\n\n## Quick Start\n\nThis is a quick example of how to use a Spark NLP pre-trained pipeline in Python and PySpark:\n\n```sh\n$ java -version\n# should be Java 8 or 11 (Oracle or OpenJDK)\n$ conda create -n sparknlp python=3.7 -y\n$ conda activate sparknlp\n# spark-nlp by default is based on pyspark 3.x\n$ pip install spark-nlp==6.4.2 pyspark==3.3.1\n```\n\nIn Python console or Jupyter `Python3` kernel:\n\n```python\n# Import Spark NLP\nfrom sparknlp.base import *\nfrom sparknlp.annotator import *\nfrom sparknlp.pretrained import PretrainedPipeline\nimport sparknlp\n\n# Start SparkSession with Spark NLP\n# start() functions has 3 parameters: gpu, apple_silicon, and memory\n# sparknlp.start(gpu=True) will start the session with GPU support\n# sparknlp.start(apple_silicon=True) will start the session with macOS M1 & M2 support\n# sparknlp.start(memory=\"16G\") to change the default driver memory in SparkSession\nspark = sparknlp.start()\n\n# Download a pre-trained pipeline\npipeline = PretrainedPipeline('explain_document_dl', lang='en')\n\n# Your testing dataset\ntext = \"\"\"\nThe Mona Lisa is a 16th century oil painting created by Leonardo.\nIt's held at the Louvre in Paris.\n\"\"\"\n\n# Annotate your testing dataset\nresult = pipeline.annotate(text)\n\n# What's in the pipeline\nlist(result.keys())\nOutput: ['entities', 'stem', 'checked', 'lemma', 'document',\n         'pos', 'token', 'ner', 'embeddings', 'sentence']\n\n# Check the results\nresult['entities']\nOutput: ['Mona Lisa', 'Leonardo', 'Louvre', 'Paris']\n```\n\nFor more examples, you can visit our dedicated [examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples) to showcase all Spark NLP use cases!\n\n### Packages Cheatsheet\n\nThis is a cheatsheet for corresponding Spark NLP Maven package to Apache Spark / PySpark major version:\n\n| Apache Spark            | Spark NLP on CPU   | Spark NLP on GPU           | Spark NLP on AArch64 (linux)   | Spark NLP on Apple Silicon           |\n|-------------------------|--------------------|----------------------------|--------------------------------|--------------------------------------|\n| 3.0/3.1/3.2/3.3/3.4/3.5 | `spark-nlp`        | `spark-nlp-gpu`            | `spark-nlp-aarch64`            | `spark-nlp-silicon`                  |\n| Start Function          | `sparknlp.start()` | `sparknlp.start(gpu=True)` | `sparknlp.start(aarch64=True)` | `sparknlp.start(apple_silicon=True)` |\n\nNOTE: `M1/M2` and `AArch64` are under `experimental` support. Access and support to these architectures are limited by the\ncommunity and we had to build most of the dependencies by ourselves to make them compatible. We support these two\narchitectures, however, they may not work in some environments.\n\n## Pipelines and Models\n\nFor a quick example of using pipelines and models take a look at our official [documentation](https://sparknlp.org/docs/en/install#pipelines-and-models)\n\n#### Please check out our Models Hub for the full list of [pre-trained models](https://sparknlp.org/models) with examples, demo, benchmark, and more\n\n## Platform and Ecosystem Support\n\n### Apache Spark Support\n\nSpark NLP *6.4.2* has been built on top of Apache Spark 3.4 while fully supports Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, and 3.5.x\n\n| Spark NLP | Apache Spark 3.5.x | Apache Spark 3.4.x | Apache Spark 3.3.x | Apache Spark 3.2.x | Apache Spark 3.1.x | Apache Spark 3.0.x | Apache Spark 2.4.x | Apache Spark 2.3.x |\n|-----------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|\n| 6.x.x and up     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.5.x     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.4.x     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.3.x     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.2.x     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.1.x     | Partially          | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n| 5.0.x     | YES                | YES                | YES                | YES                | YES                | YES                | NO                 | NO                 |\n\nFind out more about `Spark NLP` versions from our [release notes](https://github.com/JohnSnowLabs/spark-nlp/releases).\n\n### Scala and Python Support\n\n| Spark NLP | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10| Scala 2.11 | Scala 2.12 |\n|-----------|------------|------------|------------|------------|------------|------------|------------|\n| 6.0.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.5.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.4.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.3.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.2.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.1.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n| 5.0.x     | NO         | YES        | YES        | YES        | YES        | NO         | YES        |\n\nFind out more about 4.x `SparkNLP` versions in our official [documentation](https://sparknlp.org/docs/en/install#apache-spark-support)\n\n### Databricks Support\n\nSpark NLP 6.4.2 has been tested and is compatible with the following runtimes:\n\n| **CPU**            | **GPU**            |\n|--------------------|--------------------|\n| 14.1 / 14.1 ML     | 14.1 ML & GPU      |\n| 14.2 / 14.2 ML     | 14.2 ML & GPU      |\n| 14.3 / 14.3 ML     | 14.3 ML & GPU      |\n| 15.0 / 15.0 ML     | 15.0 ML & GPU      |\n| 15.1 / 15.1 ML     | 15.1 ML & GPU      |\n| 15.2 / 15.2 ML     | 15.2 ML & GPU      |\n| 15.3 / 15.3 ML     | 15.3 ML & GPU      |\n| 15.4 / 15.4 ML     | 15.4 ML & GPU      |\n| 16.4 / 16.4 ML     | 16.4 ML & GPU      |\n\nWe are compatible with older runtimes. For a full list check databricks support in our official [documentation](https://sparknlp.org/docs/en/install#databricks-support)\n\n### EMR Support\n\nSpark NLP 6.4.2 has been tested and is compatible with the following EMR releases:\n\n| **EMR Release**    |\n|--------------------|\n| emr-6.13.0         |\n| emr-6.14.0         |\n| emr-6.15.0         |\n| emr-7.0.0          |\n| emr-7.1.0          |\n| emr-7.2.0          |\n| emr-7.3.0          |\n| emr-7.4.0          |\n| emr-7.5.0          |\n| emr-7.6.0          |\n| emr-7.7.0          |\n| emr-7.8.0          |\n\n\nWe are compatible with older EMR releases. For a full list check EMR support in our official [documentation](https://sparknlp.org/docs/en/install#emr-support)\n\nFull list of [Amazon EMR 6.x releases](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-6x.html)\nFull list of [Amazon EMR 7.x releases](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-7x.html)\n\nNOTE: The EMR 6.1.0 and 6.1.1 are not supported.\n\n## Installation\n\n### Command line (requires internet connection)\n\nTo install spark-nlp packages through command line follow [these instructions](https://sparknlp.org/docs/en/install#command-line) from our official documentation\n\n### Scala\n\nSpark NLP supports Scala 2.12.15 if you are using Apache Spark 3.0.x, 3.1.x, 3.2.x, 3.3.x, and 3.4.x versions. Our packages are\ndeployed to Maven central. To add any of our packages as a dependency in your application you can follow [these instructions](https://sparknlp.org/docs/en/install#scala-and-java)\nfrom our official documentation.\n\nIf you are interested, there is a simple SBT project for Spark NLP to guide you on how to use it in your\nprojects [Spark NLP Starter](https://github.com/maziyarpanahi/spark-nlp-starter)\n\n### Python\n\nSpark NLP supports Python 3.7.x and above depending on your major PySpark version.\nCheck all available installations for Python in our official [documentation](https://sparknlp.org/docs/en/install#python)\n\n### Compiled JARs\n\nTo compile the jars from source follow [these instructions](https://sparknlp.org/docs/en/compiled#jars) from our official documentation\n\n## Platform-Specific Instructions\n\nFor detailed instructions on how to use Spark NLP on supported platforms, please refer to our official documentation:\n\n| Platform                | Supported Language(s) |\n|-------------------------|-----------------------|\n| [Apache Zeppelin](https://sparknlp.org/docs/en/install#apache-zeppelin)      | Scala, Python         |\n| [Jupyter Notebook](https://sparknlp.org/docs/en/install#jupter-notebook) | Python                |\n| [Google Colab Notebook](https://sparknlp.org/docs/en/install#google-colab-notebook) | Python                |\n| [Kaggle Kernel](https://sparknlp.org/docs/en/install#kaggle-kernel)        | Python                |\n| [Databricks Cluster](https://sparknlp.org/docs/en/install#databricks-cluster)    | Scala, Python         |\n| [EMR Cluster](https://sparknlp.org/docs/en/install#emr-cluster)           | Scala, Python         |\n| [GCP Dataproc Cluster](https://sparknlp.org/docs/en/install#gcp-dataproc) | Scala, Python         |\n\n### Offline\n\nSpark NLP library and all the pre-trained models/pipelines can be used entirely offline with no access to the Internet.\nPlease check [these instructions](https://sparknlp.org/docs/en/install#s3-integration) from our official documentation\nto use Spark NLP offline.\n\n## Advanced Settings\n\nYou can change Spark NLP configurations via Spark properties configuration.\nPlease check [these instructions](https://sparknlp.org/docs/en/install#sparknlp-properties) from our official documentation.\n\n### S3 Integration\n\nIn Spark NLP we can define S3 locations to:\n\n- Export log files of training models\n- Store tensorflow graphs used in `NerDLApproach`\n\nPlease check [these instructions](https://sparknlp.org/docs/en/install#s3-integration) from our official documentation.\n\n## Documentation\n\n### Examples\n\nNeed more **examples**? Check out our dedicated [Spark NLP Examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples)\nrepository to showcase all Spark NLP use cases!\n\nAlso, don't forget to check [Spark NLP in Action](https://sparknlp.org/demos) built by Streamlit.\n\n#### All examples: [spark-nlp/examples](https://github.com/JohnSnowLabs/spark-nlp/tree/master/examples)\n\n### FAQ\n\n[Check our Articles and Videos page here](https://sparknlp.org/learn)\n\n### Citation\n\nWe have published a [paper](https://www.sciencedirect.com/science/article/pii/S2665963821000063) that you can cite for\nthe Spark NLP library:\n\n```bibtex\n@article{KOCAMAN2021100058,\n    title = {Spark NLP: Natural language understanding at scale},\n    journal = {Software Impacts},\n    pages = {100058},\n    year = {2021},\n    issn = {2665-9638},\n    doi = {https://doi.org/10.1016/j.simpa.2021.100058},\n    url = {https://www.sciencedirect.com/science/article/pii/S2665963.2.300063},\n    author = {Veysel Kocaman and David Talby},\n    keywords = {Spark, Natural language processing, Deep learning, Tensorflow, Cluster},\n    abstract = {Spark NLP is a Natural Language Processing (NLP) library built on top of Apache Spark ML. It provides simple, performant & accurate NLP annotations for machine learning pipelines that can scale easily in a distributed environment. Spark NLP comes with 1100+ pretrained pipelines and models in more than 192+ languages. It supports nearly all the NLP tasks and modules that can be used seamlessly in a cluster. Downloaded more than 2.7 million times and experiencing 9x growth since January 2020, Spark NLP is used by 54% of healthcare organizations as the world’s most widely used NLP library in the enterprise.}\n    }\n}\n```\n\n## Community support\n\n- [Slack](https://join.slack.com/t/spark-nlp/shared_invite/zt-198dipu77-L3UWNe_AJ8xqDk0ivmih5Q) For live discussion with the Spark NLP community and the team\n- [GitHub](https://github.com/JohnSnowLabs/spark-nlp) Bug reports, feature requests, and contributions\n- [Discussions](https://github.com/JohnSnowLabs/spark-nlp/discussions) Engage with other community members, share ideas,\n  and show off how you use Spark NLP!\n- [Medium](https://medium.com/spark-nlp) Spark NLP articles\n- [YouTube](https://www.youtube.com/channel/UCmFOjlpYEhxf_wJUDuz6xxQ/videos) Spark NLP video tutorials\n\n## Contributing\n\nWe appreciate any sort of contributions:\n\n- ideas\n- feedback\n- documentation\n- bug reports\n- NLP training and testing corpora\n- Development and testing\n\nClone the repo and submit your pull-requests! Or directly create issues in this repo.\n\n## John Snow Labs\n\n[http://johnsnowlabs.com](http://johnsnowlabs.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B32:35999:17A9E0:5E2C9C:6AB92D60"},"text_sha256":"98b1658f5a3dfe4e48318c474f52cf370c494cfc1939ee5b7031097bcb00a59c"},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_InLegalBERT_en.md","size":3937,"blob_sha":"2a5c249b1099dcb0c2d25c31a40c0d3e33ec54b2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Legal English BERT Embeddings (from law-ai)\nauthor: John Snow Labs\nname: bert_embeddings_InLegalBERT\ndate: 2023-06-21\ntags: [bert, en, embeddings, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BERT Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `InLegalBERT` is a English model originally trained by `law-ai`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_InLegalBERT_en_5.0.0_3.0_1687336959265.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_InLegalBERT_en_5.0.0_3.0_1687336959265.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n documentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = BertEmbeddings.pretrained(\"bert_embeddings_InLegalBERT\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_InLegalBERT\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = BertEmbeddings.pretrained(\"bert_embeddings_InLegalBERT\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_InLegalBERT\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_InLegalBERT|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|407.2 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6910:09ED:E6CAD:3FA821:6AB92D60"},"text_sha256":"e30d70d7468dd78a771151b8556453b48dc24b1896039f65c93f94bd5e7fc6b0"},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md","size":2861,"blob_sha":"0e7dceeca64069bda5143ea45c8e14887eeef380","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Legal English Bert Embeddings (Base, Uncased)\nauthor: John Snow Labs\nname: bert_embeddings_legal_bert_base_uncased\ndate: 2023-06-21\ntags: [bert, embeddings, en, open_source, legal, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nLegal Pretrained Bert Embeddings model, trained with uncased text, uploaded to Hugging Face, adapted and imported into Spark NLP. `legal-bert-base-uncased` is a English model orginally trained by `nlpaueb`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_legal_bert_base_uncased_en_5.0.0_3.0_1687341978829.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_legal_bert_base_uncased_en_5.0.0_3.0_1687341978829.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n.setInputCol(\"text\") \\\n.setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n.setInputCols(\"document\") \\\n.setOutputCol(\"token\")\n\nembeddings = BertEmbeddings.pretrained(\"bert_embeddings_legal_bert_base_uncased\",\"en\") \\\n.setInputCols([\"document\", \"token\"]) \\\n.setOutputCol(\"embeddings\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n.setInputCol(\"text\") \n.setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer() \n.setInputCols(Array(\"document\"))\n.setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_legal_bert_base_uncased\",\"en\") \n.setInputCols(Array(\"document\", \"token\")) \n.setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.legal_bert_base_uncased\").predict(\"\"\"I love Spark NLP\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_legal_bert_base_uncased|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|407.2 MB|\n|Case sensitive:|false|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F06:3BCC6:17E95F:5E6B2D:6AB92D61"},"text_sha256":"f7aa8830b57c597a63293c3c324ba6370008d0dc117a75f1e72a9146d41d4744"},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legalbert_adept_en.md","size":4023,"blob_sha":"5dc84ccc68d550dd4d7604688b03104a73ec86a8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal BERT Embeddings\nauthor: John Snow Labs\nname: bert_embeddings_legalbert_adept\ndate: 2023-06-21\ntags: [bert, en, english, embeddings, transformer, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BERT Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalbert-adept` is a English model originally trained by `hatemestinbejaia`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_adept_en_5.0.0_3.0_1687335917569.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_adept_en_5.0.0_3.0_1687335917569.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n documentAssembler = nlp.DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = nlp.Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = nlp.BertEmbeddings.pretrained(\"bert_embeddings_legalbert_adept\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = nlp.Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_legalbert_adept\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = nlp.DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = nlp.Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = nlp.BertEmbeddings.pretrained(\"bert_embeddings_legalbert_adept\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = nlp.Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_legalbert_adept\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_legalbert_adept|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|407.2 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3BB8:3B1F3:1868F6:5EEBB8:6AB92D61"},"text_sha256":"b43284e93f9a12ce78341db89c1e8ac8ab86b121120a97e98b04e687ee02210f"},{"path":"docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lsg16k_Italian_Legal_it.md","size":4066,"blob_sha":"022feacea52d3c7dfe20159b3139c0aeb91fe4b0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal BERT Embeddings\nauthor: John Snow Labs\nname: bert_embeddings_lsg16k_Italian_Legal\ndate: 2023-06-21\ntags: [longformer, it, italian, embeddings, transformer, open_source, onnx]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BERT Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `lsg16k-Italian-Legal-BERT` is a Italian model originally trained by `dlicari`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_lsg16k_Italian_Legal_it_5.0.0_3.0_1687335744395.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_lsg16k_Italian_Legal_it_5.0.0_3.0_1687335744395.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n documentAssembler = nlp.DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = nlp.Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = nlp.BertEmbeddings.pretrained(\"bert_embeddings_lsg16k_Italian_Legal\",\"it\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = nlp.Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"Adoro Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_lsg16k_Italian_Legal\",\"it\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"Adoro Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = nlp.DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\ntokenizer = nlp.Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = nlp.BertEmbeddings.pretrained(\"bert_embeddings_lsg16k_Italian_Legal\",\"it\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = nlp.Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"Adoro Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"bert_embeddings_lsg16k_Italian_Legal\",\"it\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"Adoro Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_lsg16k_Italian_Legal|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|it|\n|Size:|454.6 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27C8:2E8679:17DC8D:5E5C36:6AB92D61"},"text_sha256":"1bccb2f42dd8d1c0e6d5be6313716abbdf1fecc89179e783e9c2fe199ae0e0f7"},{"path":"docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md","size":2795,"blob_sha":"4245ee3f06c1b48de33e27c092c71dc6056c341a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Spanish Legal Electra Word Embeddings Base model\nauthor: John Snow Labs\nname: legalectra_base\ndate: 2023-06-21\ntags: [open_source, legalectra, embeddings, electra, legal, es, onnx]\ntask: Embeddings\nlanguage: es\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Spanish Legal Word Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalectra-base-spanish` is a English model originally trained by `mrm8488`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalectra_base_es_5.0.0_3.0_1687336669896.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalectra_base_es_5.0.0_3.0_1687336669896.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nelectra = BertEmbeddings.pretrained(\"legalectra_base\",\"es\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, electra])\n\ndata = spark.createDataFrame([[\"Amo a Spark NLP.\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval electra = BertEmbeddings.pretrained(\"legalectra_base\",\"es\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, electra))\n\nval data = Seq(\"Amo a Spark NLP.\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"es.embed.bert.base_legal\").predict(\"\"\"Amo a Spark NLP.\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalectra_base|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|es|\n|Size:|408.5 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3F8:241B62:17B4F1:5E3797:6AB92D62"},"text_sha256":"95a92019a78bcd7e8e98003e75878fe170f1f19d3b47ff6e1902bce207bda743"},{"path":"docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md","size":2810,"blob_sha":"153274bc0b1d2d8c42ad1a8a2df20cbec913c17d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Spanish Electra Legal Word Embeddings Small model\nauthor: John Snow Labs\nname: legalectra_small\ndate: 2023-06-21\ntags: [open_source, legalectra, embeddings, electra, legal, small, es, onnx]\ntask: Embeddings\nlanguage: es\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Spanish Legal Word Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalectra-small-spanish` is a English model originally trained by `mrm8488`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalectra_small_es_5.0.0_3.0_1687336489949.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalectra_small_es_5.0.0_3.0_1687336489949.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nelectra = BertEmbeddings.pretrained(\"legalectra_small\",\"es\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, electra])\n\ndata = spark.createDataFrame([[\"Amo a Spark NLP.\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n      .setInputCol(\"text\") \n      .setOutputCol(\"document\")\n \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval electra = BertEmbeddings.pretrained(\"legalectra_small\",\"es\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, electra))\n\nval data = Seq(\"Amo a Spark NLP.\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"es.embed.bert.small_legal\").predict(\"\"\"Amo a Spark NLP.\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalectra_small|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|es|\n|Size:|51.2 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8CC0:11316A:17EF72:5E709B:6AB92D61"},"text_sha256":"98aa24cf4e2970c5a9606ef97037b39d6d422c9410883535fda35c139ac90919"},{"path":"docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md","size":1960,"blob_sha":"755bba585f5518c7f22d31c598d1ec59fce91b56","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Swiss Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_swiss_legal\ndate: 2023-06-26\ntags: [gsw, swiss, embeddings, transformer, open_source, legal, onnx]\ntask: Embeddings\nlanguage: gsw\nedition: Spark NLP 5.0.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-swiss-roberta-base` is a Swiss model originally trained by `joelito`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_swiss_legal_gsw_5.0.0_3.0_1687788882271.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_swiss_legal_gsw_5.0.0_3.0_1687788882271.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n{:.model-param}\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swiss_legal\", \"gsw\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swiss_legal\", \"gsw\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_swiss_legal|\n|Compatibility:|Spark NLP 5.0.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|gsw|\n|Size:|692.1 MB|\n|Case sensitive:|true|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7486:40B0C:17F23F:5E74D8:6AB92D62"},"text_sha256":"8a85ef6e89c722b957bf2db5aa12847baba80deedca00d3b96abf3ab223bcf76"},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_action_policy_plans_classifier_en.md","size":2605,"blob_sha":"0287ba11282f9ec88ed846a18a7efa6192ae1fda","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mpnet_embedding_action_policy_plans_classifier TFMPNetModel from ppsingh\nauthor: John Snow Labs\nname: mpnet_embedding_action_policy_plans_classifier\ndate: 2023-08-18\ntags: [mpnet, en, open_source, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.0\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained mpnet  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mpnet_embedding_action_policy_plans_classifier` is a English model originally trained by ppsingh.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mpnet_embedding_action_policy_plans_classifier_en_5.1.0_3.0_1692375624301.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mpnet_embedding_action_policy_plans_classifier_en_5.1.0_3.0_1692375624301.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n\ninstruction = MPNetEmbeddings \\\n    .pretrained(\"mpnet_embedding_action_policy_plans_classifier\", \"en\")\\\n    .setInputCols([\"documents\"]) \\\n    .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline(stages=[\n  document_assembler,\n  instruction,\n])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n\nval instruction = MPNetEmbeddings\n    .pretrained(\"mpnet_embedding_action_policy_plans_classifier\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, instruction))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mpnet_embedding_action_policy_plans_classifier|\n|Compatibility:|Spark NLP 5.1.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|409.9 MB|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F6EA:3B6DE:177F10:5E008C:6AB92D63"},"text_sha256":"4651036b4147868b7fe1a88d51da50e0cb646ea695807db2b8714c754bf3f307"},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_all_mpnet_base_v2_ftlegal_v3_en.md","size":2591,"blob_sha":"76e076e96782cc622ae8c55d710b4e69b6a43bee","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mpnet_embedding_all_mpnet_base_v2_ftlegal_v3 TFMPNetModel from sukantan\nauthor: John Snow Labs\nname: mpnet_embedding_all_mpnet_base_v2_ftlegal_v3\ndate: 2023-08-18\ntags: [mpnet, en, open_source, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.0\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained mpnet  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mpnet_embedding_all_mpnet_base_v2_ftlegal_v3` is a English model originally trained by sukantan.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mpnet_embedding_all_mpnet_base_v2_ftlegal_v3_en_5.1.0_3.0_1692377160570.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mpnet_embedding_all_mpnet_base_v2_ftlegal_v3_en_5.1.0_3.0_1692377160570.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n\ninstruction = MPNetEmbeddings \\\n    .pretrained(\"mpnet_embedding_all_mpnet_base_v2_ftlegal_v3\", \"en\")\\\n    .setInputCols([\"documents\"]) \\\n    .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline(stages=[\n  document_assembler,\n  instruction,\n])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n\nval instruction = MPNetEmbeddings\n    .pretrained(\"mpnet_embedding_all_mpnet_base_v2_ftlegal_v3\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, instruction))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mpnet_embedding_all_mpnet_base_v2_ftlegal_v3|\n|Compatibility:|Spark NLP 5.1.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|410.0 MB|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B7D0:3B1F3:186914:5EEC45:6AB92D62"},"text_sha256":"9f57726790b424a340c3a23d8c4cc836e1a7d181d838dc4d9d9519b14c1ee684"},{"path":"docs/_posts/ahmedlone127/2023-08-18-mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune_en.md","size":2699,"blob_sha":"3af998f5f8239dd4734b2c694088afb3a35b145f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune TFMPNetModel from oliviamga2\nauthor: John Snow Labs\nname: mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune\ndate: 2023-08-18\ntags: [mpnet, en, open_source, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.0\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained mpnet  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune` is a English model originally trained by oliviamga2.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune_en_5.1.0_3.0_1692376503346.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune_en_5.1.0_3.0_1692376503346.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n\ninstruction = MPNetEmbeddings \\\n    .pretrained(\"mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune\", \"en\")\\\n    .setInputCols([\"documents\"]) \\\n    .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline(stages=[\n  document_assembler,\n  instruction,\n])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n\nval instruction = MPNetEmbeddings\n    .pretrained(\"mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, instruction))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mpnet_embedding_multi_qa_mpnet_base_dot_v1_legal_finetune|\n|Compatibility:|Spark NLP 5.1.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|410.0 MB|","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"24FC:2C474:181B2C:5E9D88:6AB92D63"},"text_sha256":"a38c40c4ca5c4a34de0f44b4510d247c45478501ca6185be2ea8591847b94444"},{"path":"docs/_posts/ahmedlone127/2023-09-07-action_policy_plans_classifier_en.md","size":2576,"blob_sha":"7cc9b8271e468614a9b4c22c28bc6b6c081d580d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English action_policy_plans_classifier MPNetEmbeddings from ppsingh\nauthor: John Snow Labs\nname: action_policy_plans_classifier\ndate: 2023-09-07\ntags: [mpnet, en, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained MPNetEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`action_policy_plans_classifier` is a English model originally trained by ppsingh.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/action_policy_plans_classifier_en_5.1.1_3.0_1694128081191.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/action_policy_plans_classifier_en_5.1.1_3.0_1694128081191.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =MPNetEmbeddings.pretrained(\"action_policy_plans_classifier\",\"en\") \\\n            .setInputCols([\"documents\"]) \\\n            .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n    \nval embeddings = MPNetEmbeddings \n    .pretrained(\"action_policy_plans_classifier\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|action_policy_plans_classifier|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|406.9 MB|\n\n## References\n\nhttps://huggingface.co/ppsingh/action-policy-plans-classifier","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7272:4F9CC:172771:5DA767:6AB92D61"},"text_sha256":"85c2af26f0db3d3e9c2c1f8a5c22a510c205e2a84ae5ad8224e190bf64292e04"},{"path":"docs/_posts/ahmedlone127/2023-09-07-all_mpnet_base_v2_ftlegal_v3_en.md","size":2561,"blob_sha":"a9b240367cd9836d2db1897d7111ba1a3f6e39f0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English all_mpnet_base_v2_ftlegal_v3 MPNetEmbeddings from sukantan\nauthor: John Snow Labs\nname: all_mpnet_base_v2_ftlegal_v3\ndate: 2023-09-07\ntags: [mpnet, en, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained MPNetEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`all_mpnet_base_v2_ftlegal_v3` is a English model originally trained by sukantan.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/all_mpnet_base_v2_ftlegal_v3_en_5.1.1_3.0_1694124734019.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/all_mpnet_base_v2_ftlegal_v3_en_5.1.1_3.0_1694124734019.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =MPNetEmbeddings.pretrained(\"all_mpnet_base_v2_ftlegal_v3\",\"en\") \\\n            .setInputCols([\"documents\"]) \\\n            .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n    \nval embeddings = MPNetEmbeddings \n    .pretrained(\"all_mpnet_base_v2_ftlegal_v3\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|all_mpnet_base_v2_ftlegal_v3|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/sukantan/all-mpnet-base-v2-ftlegal-v3","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:179BB1:564CB1:6AB92D65"},"text_sha256":"afe32d4ff610892860088b9eb6a8fd410f24e69c8e8def48e7d18a37cee84b51"},{"path":"docs/_posts/ahmedlone127/2023-09-07-multi_qa_mpnet_base_dot_v1_legal_finetune_en.md","size":2684,"blob_sha":"f24c83762935d73a6d79080776457b1a74c75b3f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English multi_qa_mpnet_base_dot_v1_legal_finetune MPNetEmbeddings from oliviamga2\nauthor: John Snow Labs\nname: multi_qa_mpnet_base_dot_v1_legal_finetune\ndate: 2023-09-07\ntags: [mpnet, en, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained MPNetEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`multi_qa_mpnet_base_dot_v1_legal_finetune` is a English model originally trained by oliviamga2.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/multi_qa_mpnet_base_dot_v1_legal_finetune_en_5.1.1_3.0_1694128585719.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/multi_qa_mpnet_base_dot_v1_legal_finetune_en_5.1.1_3.0_1694128585719.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =MPNetEmbeddings.pretrained(\"multi_qa_mpnet_base_dot_v1_legal_finetune\",\"en\") \\\n            .setInputCols([\"documents\"]) \\\n            .setOutputCol(\"mpnet_embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"documents\")\n    \nval embeddings = MPNetEmbeddings \n    .pretrained(\"multi_qa_mpnet_base_dot_v1_legal_finetune\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"mpnet_embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|multi_qa_mpnet_base_dot_v1_legal_finetune|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents]|\n|Output Labels:|[mpnet_embeddings]|\n|Language:|en|\n|Size:|407.0 MB|\n\n## References\n\nhttps://huggingface.co/oliviamga2/multi-qa-mpnet-base-dot-v1_legal_finetune","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"939A:1F1FB6:17E82D:5E6A1D:6AB92D62"},"text_sha256":"e7c2da4e88da2aa3aa0720d72f35ad60748a3099b1640c66358cceab4971feb8"},{"path":"docs/_posts/ahmedlone127/2023-09-09-alglegal3_bert_base_arabertv2_en.md","size":2605,"blob_sha":"908a790f6a0698882ede24b623a4334d26ec681a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English alglegal3_bert_base_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: alglegal3_bert_base_arabertv2\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`alglegal3_bert_base_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/alglegal3_bert_base_arabertv2_en_5.1.1_3.0_1694279972460.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/alglegal3_bert_base_arabertv2_en_5.1.1_3.0_1694279972460.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"alglegal3_bert_base_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"alglegal3_bert_base_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|alglegal3_bert_base_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|504.8 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgLegal3_bert-base-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DAE:18CDF1:179BBC:564CD1:6AB92D65"},"text_sha256":"4eb1e2684368131286d33db48ed1f251b69582a089a45c01d93ec39b190ce61b"},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_base_arabertv2_algarlegalbert_en.md","size":2650,"blob_sha":"f942e4c9350d2581e58d8c8da16a79259b5d40b8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_base_arabertv2_algarlegalbert BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: bert_base_arabertv2_algarlegalbert\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_base_arabertv2_algarlegalbert` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_base_arabertv2_algarlegalbert_en_5.1.1_3.0_1694279683923.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_base_arabertv2_algarlegalbert_en_5.1.1_3.0_1694279683923.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_base_arabertv2_algarlegalbert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_base_arabertv2_algarlegalbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_base_arabertv2_algarlegalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|504.8 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/bert-base-arabertv2-AlgArLegalBert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"311A:1A3D83:187EB4:5F01FB:6AB92D5E"},"text_sha256":"a50357403297a1ee6b7ed616ea14f3d7cc554094a1d4c32d3ca8895403015fc6"},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_base_uncased_finetune_security_en.md","size":2638,"blob_sha":"ab915d7a7e8509666486c6d02aa804ca558e7394","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_base_uncased_finetune_security BertEmbeddings from forcorpus\nauthor: John Snow Labs\nname: bert_base_uncased_finetune_security\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_base_uncased_finetune_security` is a English model originally trained by forcorpus.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_base_uncased_finetune_security_en_5.1.1_3.0_1694283220765.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_base_uncased_finetune_security_en_5.1.1_3.0_1694283220765.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_base_uncased_finetune_security\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_base_uncased_finetune_security\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_base_uncased_finetune_security|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/forcorpus/bert-base-uncased-finetune-security","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B524:3FD49:179A09:5E1D23:6AB92D65"},"text_sha256":"11bab27b659d96dbd682ab72eff84389ffef94bd7aa9a03566da30ab37432dab"},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_large_portuguese_cased_legal_mlm_pt.md","size":2654,"blob_sha":"b65c271db095619ed57737ec018439b009a41034","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese bert_large_portuguese_cased_legal_mlm BertEmbeddings from stjiris\nauthor: John Snow Labs\nname: bert_large_portuguese_cased_legal_mlm\ndate: 2023-09-09\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_large_portuguese_cased_legal_mlm` is a Portuguese model originally trained by stjiris.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_large_portuguese_cased_legal_mlm_pt_5.1.1_3.0_1694284288827.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_large_portuguese_cased_legal_mlm_pt_5.1.1_3.0_1694284288827.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_large_portuguese_cased_legal_mlm\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_large_portuguese_cased_legal_mlm\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_large_portuguese_cased_legal_mlm|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/stjiris/bert-large-portuguese-cased-legal-mlm","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"834C:3EACB:17C42A:5E46E1:6AB92D66"},"text_sha256":"1ebfe450544461dbfd126ca7ae37f837eeea56854562fcbb32325a89d78074f1"},{"path":"docs/_posts/ahmedlone127/2023-09-09-bert_large_portuguese_cased_legal_tsdae_pt.md","size":2672,"blob_sha":"481a8fb59f782a78fb28e9e64e664fb5cb5817ae","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese bert_large_portuguese_cased_legal_tsdae BertEmbeddings from stjiris\nauthor: John Snow Labs\nname: bert_large_portuguese_cased_legal_tsdae\ndate: 2023-09-09\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_large_portuguese_cased_legal_tsdae` is a Portuguese model originally trained by stjiris.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_large_portuguese_cased_legal_tsdae_pt_5.1.1_3.0_1694280251721.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_large_portuguese_cased_legal_tsdae_pt_5.1.1_3.0_1694280251721.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_large_portuguese_cased_legal_tsdae\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_large_portuguese_cased_legal_tsdae\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_large_portuguese_cased_legal_tsdae|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/stjiris/bert-large-portuguese-cased-legal-tsdae","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C7B8:375F4:17D730:5E5B2E:6AB92D66"},"text_sha256":"a772f421de625ccf28396773da633988a9dc52167f0de0edc865681a4e373c3d"},{"path":"docs/_posts/ahmedlone127/2023-09-09-inlegalbert_cbp_lkg_triples_finetuned_en.md","size":2656,"blob_sha":"003e102784eb39c94bf0b5cb6f5ee3325927c0d3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English inlegalbert_cbp_lkg_triples_finetuned BertEmbeddings from kinshuk-h\nauthor: John Snow Labs\nname: inlegalbert_cbp_lkg_triples_finetuned\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`inlegalbert_cbp_lkg_triples_finetuned` is a English model originally trained by kinshuk-h.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_triples_finetuned_en_5.1.1_3.0_1694266522167.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_triples_finetuned_en_5.1.1_3.0_1694266522167.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"inlegalbert_cbp_lkg_triples_finetuned\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"inlegalbert_cbp_lkg_triples_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|inlegalbert_cbp_lkg_triples_finetuned|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/kinshuk-h/InLegalBERT-cbp-lkg-triples-finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A14:727CE:175E91:5DE1BC:6AB92D67"},"text_sha256":"8ac877e0ac1962e5994e94d36f4624bb8b1ff261a24e2278c46b087fc0a99569"},{"path":"docs/_posts/ahmedlone127/2023-09-09-kaz_legal_bert_5_en.md","size":2497,"blob_sha":"f749093710f761d01d3a3b9ca67da6f4a95b9eba","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English kaz_legal_bert_5 BertEmbeddings from kaisar-barlybay-sse\nauthor: John Snow Labs\nname: kaz_legal_bert_5\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`kaz_legal_bert_5` is a English model originally trained by kaisar-barlybay-sse.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/kaz_legal_bert_5_en_5.1.1_3.0_1694279378634.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/kaz_legal_bert_5_en_5.1.1_3.0_1694279378634.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"kaz_legal_bert_5\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"kaz_legal_bert_5\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|kaz_legal_bert_5|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|408.0 MB|\n\n## References\n\nhttps://huggingface.co/kaisar-barlybay-sse/kaz_legal_bert_5","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFE4:11E74B:17B585:5E3732:6AB92D67"},"text_sha256":"50fd4f4da2fd55806b0fe27187574e546f957f5182945aed99a2a5da4cf37f5b"},{"path":"docs/_posts/ahmedlone127/2023-09-09-kaz_legal_bert_en.md","size":2479,"blob_sha":"ddd445cde44b74fa1a25cb9a8a9eb37eacb7746a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English kaz_legal_bert BertEmbeddings from kaisar-barlybay-sse\nauthor: John Snow Labs\nname: kaz_legal_bert\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`kaz_legal_bert` is a English model originally trained by kaisar-barlybay-sse.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/kaz_legal_bert_en_5.1.1_3.0_1694278999873.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/kaz_legal_bert_en_5.1.1_3.0_1694278999873.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"kaz_legal_bert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"kaz_legal_bert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|kaz_legal_bert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|408.0 MB|\n\n## References\n\nhttps://huggingface.co/kaisar-barlybay-sse/kaz_legal_bert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D2C:3CC8A:17F088:5E73C7:6AB92D62"},"text_sha256":"9c6687938dafcab74a9629e67cd67a2a2921d2c63a9dd26ebe2cd73a52f5a5fe"},{"path":"docs/_posts/ahmedlone127/2023-09-09-legal_bert_base_uncased_finetuned_ledgarscotus7_en.md","size":2767,"blob_sha":"8fb546e076f123ca597bd22846ae564bff54493f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_base_uncased_finetuned_ledgarscotus7 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: legal_bert_base_uncased_finetuned_ledgarscotus7\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_base_uncased_finetuned_ledgarscotus7` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_finetuned_ledgarscotus7_en_5.1.1_3.0_1694278582359.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_finetuned_ledgarscotus7_en_5.1.1_3.0_1694278582359.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bert_base_uncased_finetuned_ledgarscotus7\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bert_base_uncased_finetuned_ledgarscotus7\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_base_uncased_finetuned_ledgarscotus7|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/legal-bert-base-uncased-finetuned-ledgarscotus7","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A22A:3B6DE:177F4E:5E0192:6AB92D68"},"text_sha256":"5448909e2998e7c5a6cb0c825cacb57c8598c61f54c7da98313c22f763911cd0"},{"path":"docs/_posts/ahmedlone127/2023-09-09-lsg16k_italian_legal_bert_it.md","size":2542,"blob_sha":"f325623813471318af77df0b46f52b0da710b432","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Italian lsg16k_italian_legal_bert BertEmbeddings from dlicari\nauthor: John Snow Labs\nname: lsg16k_italian_legal_bert\ndate: 2023-09-09\ntags: [bert, it, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`lsg16k_italian_legal_bert` is a Italian model originally trained by dlicari.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/lsg16k_italian_legal_bert_it_5.1.1_3.0_1694259755707.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/lsg16k_italian_legal_bert_it_5.1.1_3.0_1694259755707.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"lsg16k_italian_legal_bert\",\"it\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"lsg16k_italian_legal_bert\", \"it\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|lsg16k_italian_legal_bert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|it|\n|Size:|454.6 MB|\n\n## References\n\nhttps://huggingface.co/dlicari/lsg16k-Italian-Legal-BERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"73C4:324E19:181C25:5E9F25:6AB92D68"},"text_sha256":"7aaef70a697ed3371cb86b06d0d366d6c641188d6558d306df5a93b991e7b48b"},{"path":"docs/_posts/ahmedlone127/2023-09-09-pt_legalbert_en.md","size":2440,"blob_sha":"ad6c68aa3c6656527846bdd2f012ac09aea496aa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English pt_legalbert BertEmbeddings from SharedBailii\nauthor: John Snow Labs\nname: pt_legalbert\ndate: 2023-09-09\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`pt_legalbert` is a English model originally trained by SharedBailii.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/pt_legalbert_en_5.1.1_3.0_1694266151456.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/pt_legalbert_en_5.1.1_3.0_1694266151456.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"pt_legalbert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"pt_legalbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|pt_legalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/SharedBailii/PT-LegalBert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"859A:149227:182E38:5EB1E9:6AB92D68"},"text_sha256":"1f3cfa28025c31d9bb61cb07e963acddc01d0615998d455519a1eab5c4220c7e"},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_en.md","size":2461,"blob_sha":"787d76eff6446881cc0f93589cdd4fd2737a427b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English akeylegalbert BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: akeylegalbert\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`akeylegalbert` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/akeylegalbert_en_5.1.1_3.0_1694557063708.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/akeylegalbert_en_5.1.1_3.0_1694557063708.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"akeylegalbert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"akeylegalbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|akeylegalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AkeyLegalBert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"28FC:3CC8A:17F095:5E73FB:6AB92D63"},"text_sha256":"21c8557957cd20ac51b43e9688b3487bf045897f63dae40dcc57ae100cf81b7c"},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_inscotus_and_ledgar_14epoch_en.md","size":2713,"blob_sha":"6887e2996598182ead58f6ea353a74675762b4c4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English akeylegalbert_inscotus_and_ledgar_14epoch BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: akeylegalbert_inscotus_and_ledgar_14epoch\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`akeylegalbert_inscotus_and_ledgar_14epoch` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/akeylegalbert_inscotus_and_ledgar_14epoch_en_5.1.1_3.0_1694554005394.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/akeylegalbert_inscotus_and_ledgar_14epoch_en_5.1.1_3.0_1694554005394.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"akeylegalbert_inscotus_and_ledgar_14epoch\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"akeylegalbert_inscotus_and_ledgar_14epoch\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|akeylegalbert_inscotus_and_ledgar_14epoch|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AkeyLegalBert_inScotus_and_Ledgar_14epoch","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:181C2B:5E9F45:6AB92D69"},"text_sha256":"ece08de05b7d3d445328ad0df5f3e761b789d5636e49f42966a152c3b2546b02"},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert_inscotus_and_ledgar_en.md","size":2641,"blob_sha":"9310c0c7819043ffc15319cd10a24ad5e726fbe2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English akeylegalbert_inscotus_and_ledgar BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: akeylegalbert_inscotus_and_ledgar\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`akeylegalbert_inscotus_and_ledgar` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/akeylegalbert_inscotus_and_ledgar_en_5.1.1_3.0_1694553675259.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/akeylegalbert_inscotus_and_ledgar_en_5.1.1_3.0_1694553675259.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"akeylegalbert_inscotus_and_ledgar\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"akeylegalbert_inscotus_and_ledgar\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|akeylegalbert_inscotus_and_ledgar|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AkeyLegalBert_inScotus_and_Ledgar","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"72F2:2C474:181B60:5E9E6D:6AB92D6A"},"text_sha256":"1b1f94b6ceb34d96c6b8f665dbcb77bfef79b79db18f50e14722e7ae5713e3a0"},{"path":"docs/_posts/ahmedlone127/2023-09-12-akeylegalbert6_en.md","size":2470,"blob_sha":"410b1b7c62914069e084e94cfe7cdeb3cced6dc3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English akeylegalbert6 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: akeylegalbert6\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`akeylegalbert6` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/akeylegalbert6_en_5.1.1_3.0_1694557526003.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/akeylegalbert6_en_5.1.1_3.0_1694557526003.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"akeylegalbert6\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"akeylegalbert6\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|akeylegalbert6|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AkeyLegalBert6","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4EF0:3BCC6:17E9E5:5E6CEA:6AB92D67"},"text_sha256":"65ba7e070ff4189a7002ceaa93d9c494b2d4a9dcfa9f2a10d1bce8d9a651d307"},{"path":"docs/_posts/ahmedlone127/2023-09-12-algarlegalbert1_large_arabertv2_en.md","size":2621,"blob_sha":"d1a780f6d78143479ac917123fa06a3298dd6eac","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English algarlegalbert1_large_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: algarlegalbert1_large_arabertv2\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`algarlegalbert1_large_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/algarlegalbert1_large_arabertv2_en_5.1.1_3.0_1694555945058.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/algarlegalbert1_large_arabertv2_en_5.1.1_3.0_1694555945058.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"algarlegalbert1_large_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"algarlegalbert1_large_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|algarlegalbert1_large_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|1.4 GB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgArLegalBert1-large-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F55A:3C4A0:17CCB0:5E4FF9:6AB92D6A"},"text_sha256":"4ac34dc06a16cfd9641c5020b537bc3b7c033668f2e24c7f81dc358257d18b2f"},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bert_base_uncased_en.md","size":2524,"blob_sha":"f6ab8e6b0aea41af9e5ad2531d842b93f3cc834d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_base_uncased BertEmbeddings from nlpaueb\nauthor: John Snow Labs\nname: legal_bert_base_uncased\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_base_uncased` is a English model originally trained by nlpaueb.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_en_5.1.1_3.0_1694561549951.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_en_5.1.1_3.0_1694561549951.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bert_base_uncased\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bert_base_uncased\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_base_uncased|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/nlpaueb/legal-bert-base-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E34C:326565:17C360:5E475F:6AB92D6A"},"text_sha256":"bd014ee848dafc1897e14ddcf677fcd9204f5a03e623c37be78d429f9584583c"},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bert_small_uncased_en.md","size":2533,"blob_sha":"433d1f39c8066a6be179877e95e0edd4f166d423","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_small_uncased BertEmbeddings from nlpaueb\nauthor: John Snow Labs\nname: legal_bert_small_uncased\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_small_uncased` is a English model originally trained by nlpaueb.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_small_uncased_en_5.1.1_3.0_1694561644609.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_small_uncased_en_5.1.1_3.0_1694561644609.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bert_small_uncased\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bert_small_uncased\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_small_uncased|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|130.6 MB|\n\n## References\n\nhttps://huggingface.co/nlpaueb/legal-bert-small-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9F48:11316A:17EFE0:5E7243:6AB92D6C"},"text_sha256":"840cecf838c46c6714e6f16124dbef80ec346041a090c3d57b8f60a731f7cc2c"},{"path":"docs/_posts/ahmedlone127/2023-09-12-legal_bertimbau_large_pt.md","size":2513,"blob_sha":"2b9ea254a999c33f0318021b93bdcd27a6b25e3c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese legal_bertimbau_large BertEmbeddings from rufimelo\nauthor: John Snow Labs\nname: legal_bertimbau_large\ndate: 2023-09-12\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bertimbau_large` is a Portuguese model originally trained by rufimelo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bertimbau_large_pt_5.1.1_3.0_1694562841145.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bertimbau_large_pt_5.1.1_3.0_1694562841145.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bertimbau_large\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bertimbau_large\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bertimbau_large|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/rufimelo/Legal-BERTimbau-large","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C6:2C474:181B76:5E9EB1:6AB92D6A"},"text_sha256":"224774225c9c4d49ce913d9c49dcc94070bab32d6917d58778425a52dbb62933"},{"path":"docs/_posts/ahmedlone127/2023-09-12-legalbertpt_fp_en.md","size":2464,"blob_sha":"9f8486bd7aaeb819e89f9b7755aac0177bb560ec","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbertpt_fp BertEmbeddings from raquelsilveira\nauthor: John Snow Labs\nname: legalbertpt_fp\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbertpt_fp` is a English model originally trained by raquelsilveira.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbertpt_fp_en_5.1.1_3.0_1694549902826.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbertpt_fp_en_5.1.1_3.0_1694549902826.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalbertpt_fp\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalbertpt_fp\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbertpt_fp|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|405.8 MB|\n\n## References\n\nhttps://huggingface.co/raquelsilveira/legalbertpt_fp","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4388:3BCC6:17EA04:5E6D35:6AB92D6C"},"text_sha256":"4a8636eafa8a3c393deea70cae09833da77503ca218f50c784477d971c9b25e9"},{"path":"docs/_posts/ahmedlone127/2023-09-12-legalbertpt_sardinian_en.md","size":2520,"blob_sha":"bfc82201ef1ea0df1ce6799ec69ec466dd16f216","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbertpt_sardinian BertEmbeddings from raquelsilveira\nauthor: John Snow Labs\nname: legalbertpt_sardinian\ndate: 2023-09-12\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbertpt_sardinian` is a English model originally trained by raquelsilveira.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbertpt_sardinian_en_5.1.1_3.0_1694550099835.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbertpt_sardinian_en_5.1.1_3.0_1694550099835.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalbertpt_sardinian\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalbertpt_sardinian\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbertpt_sardinian|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|425.1 MB|\n\n## References\n\nhttps://huggingface.co/raquelsilveira/legalbertpt_sc","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9876:3B1F3:186986:5EEDAE:6AB92D6C"},"text_sha256":"049c4a7da930768e8268599c3f2d4888560d51a1c21c3f1a537b86c397911a16"},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_base_arabertv2_en.md","size":2569,"blob_sha":"46c5273fbbb754461314c439b6f6f6739cfa7921","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English algarlegal_base_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: algarlegal_base_arabertv2\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`algarlegal_base_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/algarlegal_base_arabertv2_en_5.1.1_3.0_1694566807785.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/algarlegal_base_arabertv2_en_5.1.1_3.0_1694566807785.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"algarlegal_base_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"algarlegal_base_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|algarlegal_base_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|504.8 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgArLegal-base-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F8C2:09BF:B3371:2E5AAE:6AB92D6D"},"text_sha256":"93aa94cd06ed38cb088b815006e6d83c9aaadd32aa062b3ece4fd94bc7aa4f4f"},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_large_arabertv2_en.md","size":2576,"blob_sha":"470ed97e8f00d2b5abcd27501caf00080f183840","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English algarlegal_large_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: algarlegal_large_arabertv2\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`algarlegal_large_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/algarlegal_large_arabertv2_en_5.1.1_3.0_1694566592236.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/algarlegal_large_arabertv2_en_5.1.1_3.0_1694566592236.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"algarlegal_large_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"algarlegal_large_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|algarlegal_large_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|1.4 GB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgArLegal-large-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27C8:2E8679:17DD27:5E5E42:6AB92D63"},"text_sha256":"10649569e518f79a68fbe667535addfe9648deb22bc2dc91ac8dc82844661d1d"},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_nonumber_base_arabertv2_en.md","size":2650,"blob_sha":"0ed7d52a89de754e37ebb8bfd11e17b2cc8c0e63","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English algarlegal_nonumber_base_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: algarlegal_nonumber_base_arabertv2\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`algarlegal_nonumber_base_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/algarlegal_nonumber_base_arabertv2_en_5.1.1_3.0_1694567513179.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/algarlegal_nonumber_base_arabertv2_en_5.1.1_3.0_1694567513179.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"algarlegal_nonumber_base_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"algarlegal_nonumber_base_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|algarlegal_nonumber_base_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|504.8 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgArLegal-Nonumber-base-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DD2:3BCC6:17EA1B:5E6D74:6AB92D6E"},"text_sha256":"a592097724ae29ee51197f2ea129b17c8a68c1e461b5244c6cdf93442389d3cc"},{"path":"docs/_posts/ahmedlone127/2023-09-13-algarlegal_nonumber_large_arabertv2_en.md","size":2657,"blob_sha":"1f5104e2a5d6ea2c5ce36efe707caccd91f4b10e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English algarlegal_nonumber_large_arabertv2 BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: algarlegal_nonumber_large_arabertv2\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`algarlegal_nonumber_large_arabertv2` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/algarlegal_nonumber_large_arabertv2_en_5.1.1_3.0_1694567316136.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/algarlegal_nonumber_large_arabertv2_en_5.1.1_3.0_1694567316136.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"algarlegal_nonumber_large_arabertv2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"algarlegal_nonumber_large_arabertv2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|algarlegal_nonumber_large_arabertv2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|1.4 GB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/AlgArLegal-Nonumber-large-arabertv2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EEE2:3BCC6:17EA23:5E6D81:6AB92D6E"},"text_sha256":"8b8f37ea52e283c1aa5ee314045439a340cd4dc430b7229f0291238e673495a1"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts_larger20_5_1_en.md","size":2764,"blob_sha":"435aeeb1d244bc6369ce7504d61ec378d0930e18","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_legal_contracts_larger20_5_1 BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_legal_contracts_larger20_5_1\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_legal_contracts_larger20_5_1` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts_larger20_5_1_en_5.1.1_3.0_1694572830320.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts_larger20_5_1_en_5.1.1_3.0_1694572830320.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_small_finetuned_legal_contracts_larger20_5_1\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_small_finetuned_legal_contracts_larger20_5_1\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_legal_contracts_larger20_5_1|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|106.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-legal-contracts-larger20-5-1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:181C4B:5E9FDD:6AB92D6D"},"text_sha256":"67fdef0d9ed71baadce06a852f0d201096ed44ca67b3906dd678bba6c48fb1b0"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts_larger4010_en.md","size":2746,"blob_sha":"dfd10511e03d9952c782a5325658cdd39a550bab","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_legal_contracts_larger4010 BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_legal_contracts_larger4010\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_legal_contracts_larger4010` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts_larger4010_en_5.1.1_3.0_1694572295418.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts_larger4010_en_5.1.1_3.0_1694572295418.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_small_finetuned_legal_contracts_larger4010\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_small_finetuned_legal_contracts_larger4010\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_legal_contracts_larger4010|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|106.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-legal-contracts-larger4010","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB94:149227:182E6D:5EB2AF:6AB92D6E"},"text_sha256":"e0e6d78675af4e1d6820f0e83888818096da0f91b7f947f07ff9071f46b16665"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_contracts10train10val_en.md","size":2755,"blob_sha":"074215c3c9423f71e1af3823e11411fc6ca9a172","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_legal_contracts10train10val BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_legal_contracts10train10val\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_legal_contracts10train10val` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts10train10val_en_5.1.1_3.0_1694569317652.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_contracts10train10val_en_5.1.1_3.0_1694569317652.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_small_finetuned_legal_contracts10train10val\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_small_finetuned_legal_contracts10train10val\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_legal_contracts10train10val|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|107.0 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-legal-contracts10train10val","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86AC:40CE8:181760:5E9A2B:6AB92D6F"},"text_sha256":"9e73f8b24eaf6396078197042485f5dbd261394511f939c39c796123806c2cb6"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_definitions_en.md","size":2665,"blob_sha":"ed5356442609bdcfa7eb3baa71e431beaa560d33","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_legal_definitions BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_legal_definitions\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_legal_definitions` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_definitions_en_5.1.1_3.0_1694568934992.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_definitions_en_5.1.1_3.0_1694568934992.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_small_finetuned_legal_definitions\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_small_finetuned_legal_definitions\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_legal_definitions|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|106.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-legal-definitions","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:181C51:5E9FFE:6AB92D70"},"text_sha256":"e3b0dabdacf103fe4fb7152881cdfbcd6af7b39911b620c626fed5f96cd8f4ca"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_small_finetuned_legal_definitions_longer_en.md","size":2728,"blob_sha":"c3274873f0bb6ce3776d7dad9bcaaf3d3836320b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_legal_definitions_longer BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_legal_definitions_longer\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_legal_definitions_longer` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_definitions_longer_en_5.1.1_3.0_1694569019352.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_legal_definitions_longer_en_5.1.1_3.0_1694569019352.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_small_finetuned_legal_definitions_longer\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_small_finetuned_legal_definitions_longer\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_legal_definitions_longer|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|106.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-legal-definitions-longer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A06C:18CDF1:179C2C:564E20:6AB92D70"},"text_sha256":"3640bb415b1b34038d0e74134d637a036352aadbaeea970eab523406f2a5551f"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bert_tiny_finetuned_legal_definitions_en.md","size":2655,"blob_sha":"e30e903e9dfbb601dbe99088ded81b0924c40a67","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_tiny_finetuned_legal_definitions BertEmbeddings from muhtasham\nauthor: John Snow Labs\nname: bert_tiny_finetuned_legal_definitions\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_tiny_finetuned_legal_definitions` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_en_5.1.1_3.0_1694564433910.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_en_5.1.1_3.0_1694564433910.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bert_tiny_finetuned_legal_definitions\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bert_tiny_finetuned_legal_definitions\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_tiny_finetuned_legal_definitions|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|16.7 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-tiny-finetuned-legal-definitions","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED42:376DE:1821ED:5EA70C:6AB92D70"},"text_sha256":"258327cf12f09ba8529f48fd85b24614f15d4d73f49da593a7d5e23930487e8c"},{"path":"docs/_posts/ahmedlone127/2023-09-13-bertimbau_legal_pt.md","size":2461,"blob_sha":"6bfe1d930377522239e5015f5d56ab54a353147b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese bertimbau_legal BertEmbeddings from mynoguti\nauthor: John Snow Labs\nname: bertimbau_legal\ndate: 2023-09-13\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bertimbau_legal` is a Portuguese model originally trained by mynoguti.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bertimbau_legal_pt_5.1.1_3.0_1694571645436.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bertimbau_legal_pt_5.1.1_3.0_1694571645436.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"bertimbau_legal\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"bertimbau_legal\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bertimbau_legal|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|405.9 MB|\n\n## References\n\nhttps://huggingface.co/mynoguti/BERTimbau_Legal","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1FD6:372D9:17E921:5E6DDA:6AB92D70"},"text_sha256":"3df3897d2228ad15aee0639fa05f9a0a884f511cef959387754be01a0d41cd57"},{"path":"docs/_posts/ahmedlone127/2023-09-13-custom_legalbert_en.md","size":2464,"blob_sha":"28074d6aa750f47d21d2f31b2b0c85a120d494dc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English custom_legalbert BertEmbeddings from casehold\nauthor: John Snow Labs\nname: custom_legalbert\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`custom_legalbert` is a English model originally trained by casehold.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/custom_legalbert_en_5.1.1_3.0_1694597799860.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/custom_legalbert_en_5.1.1_3.0_1694597799860.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"custom_legalbert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"custom_legalbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|custom_legalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|411.6 MB|\n\n## References\n\nhttps://huggingface.co/casehold/custom-legalbert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6816:3BCC6:17EA5F:5E6E3E:6AB92D71"},"text_sha256":"6dfb665015140c5f975d3f17e8264ccf211fc052e5233a897f6d304f1dc71796"},{"path":"docs/_posts/ahmedlone127/2023-09-13-danish_legal_bert_base_da.md","size":2522,"blob_sha":"bddeda23e86fba235157c2035024b4cb7c1c8859","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Danish danish_legal_bert_base BertEmbeddings from coastalcph\nauthor: John Snow Labs\nname: danish_legal_bert_base\ndate: 2023-09-13\ntags: [bert, da, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: da\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`danish_legal_bert_base` is a Danish model originally trained by coastalcph.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/danish_legal_bert_base_da_5.1.1_3.0_1694589626739.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/danish_legal_bert_base_da_5.1.1_3.0_1694589626739.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"danish_legal_bert_base\",\"da\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"danish_legal_bert_base\", \"da\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|danish_legal_bert_base|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|da|\n|Size:|411.6 MB|\n\n## References\n\nhttps://huggingface.co/coastalcph/danish-legal-bert-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4254:3EACB:17C4A3:5E487C:6AB92D70"},"text_sha256":"f6551f575ccca16587196d2d35e78ddc51ebb3ecb7d895b43a42f4ee73ec0b33"},{"path":"docs/_posts/ahmedlone127/2023-09-13-indo_legalbert_id.md","size":2450,"blob_sha":"3b082f0dec52ca91b66dc25447cf1bbb77785369","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Indonesian indo_legalbert BertEmbeddings from archi-ai\nauthor: John Snow Labs\nname: indo_legalbert\ndate: 2023-09-13\ntags: [bert, id, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: id\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`indo_legalbert` is a Indonesian model originally trained by archi-ai.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/indo_legalbert_id_5.1.1_3.0_1694623791636.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/indo_legalbert_id_5.1.1_3.0_1694623791636.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"indo_legalbert\",\"id\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"indo_legalbert\", \"id\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|indo_legalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|id|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/archi-ai/Indo-LegalBERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3528:376DE:182207:5EA754:6AB92D70"},"text_sha256":"0d1f973731b8852f3a0f90b7ef41a2b3c619da517ca23a285ac63031802766d6"},{"path":"docs/_posts/ahmedlone127/2023-09-13-inlegalbert_cbp_lkg_finetuned_en.md","size":2584,"blob_sha":"12dec567dbd2311f7feabb7d53c638361cc9e9d8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English inlegalbert_cbp_lkg_finetuned BertEmbeddings from kinshuk-h\nauthor: John Snow Labs\nname: inlegalbert_cbp_lkg_finetuned\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`inlegalbert_cbp_lkg_finetuned` is a English model originally trained by kinshuk-h.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_finetuned_en_5.1.1_3.0_1694606435709.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_finetuned_en_5.1.1_3.0_1694606435709.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"inlegalbert_cbp_lkg_finetuned\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"inlegalbert_cbp_lkg_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|inlegalbert_cbp_lkg_finetuned|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/kinshuk-h/InLegalBERT-cbp-lkg-finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D90:3FD49:179AC2:5E1F4D:6AB92D71"},"text_sha256":"be7189102fc06adc4b0448f5753584b6b4973b9b76c872c281f8c49a7f4c8e36"},{"path":"docs/_posts/ahmedlone127/2023-09-13-inlegalbert_en.md","size":2413,"blob_sha":"e589b3dc1280a4c3cdd7526275fe3addd9017334","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English inlegalbert BertEmbeddings from law-ai\nauthor: John Snow Labs\nname: inlegalbert\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`inlegalbert` is a English model originally trained by law-ai.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/inlegalbert_en_5.1.1_3.0_1694582770345.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/inlegalbert_en_5.1.1_3.0_1694582770345.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"inlegalbert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"inlegalbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|inlegalbert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/law-ai/InLegalBERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B812:3BCC6:17EA7E:5E6E82:6AB92D70"},"text_sha256":"ed2f88dcb1bc7c15b191f99c4737b854b9ab3792794cab11baddf5b3a9542821"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bert_base_cased_ptbr_pt.md","size":2566,"blob_sha":"5584191dc3f44e5fb0023dea90eab3bbc41b1ac2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese legal_bert_base_cased_ptbr BertEmbeddings from dominguesm\nauthor: John Snow Labs\nname: legal_bert_base_cased_ptbr\ndate: 2023-09-13\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_base_cased_ptbr` is a Portuguese model originally trained by dominguesm.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_base_cased_ptbr_pt_5.1.1_3.0_1694591089960.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_base_cased_ptbr_pt_5.1.1_3.0_1694591089960.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bert_base_cased_ptbr\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bert_base_cased_ptbr\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_base_cased_ptbr|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|470.0 MB|\n\n## References\n\nhttps://huggingface.co/dominguesm/legal-bert-base-cased-ptbr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED42:376DE:18220C:5EA774:6AB92D73"},"text_sha256":"aaa7c42eff2d819bbde592604d84abbb617f0fb7580c236e12be1eba0bf6c022"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bert_base_uncased_finetuned_rramicus_en.md","size":2752,"blob_sha":"29fa712a5d4e73b8fa8c33196226929641a409c6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_base_uncased_finetuned_rramicus BertEmbeddings from repro-rights-amicus-briefs\nauthor: John Snow Labs\nname: legal_bert_base_uncased_finetuned_rramicus\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_base_uncased_finetuned_rramicus` is a English model originally trained by repro-rights-amicus-briefs.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_finetuned_rramicus_en_5.1.1_3.0_1694567706023.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_base_uncased_finetuned_rramicus_en_5.1.1_3.0_1694567706023.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bert_base_uncased_finetuned_rramicus\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bert_base_uncased_finetuned_rramicus\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_base_uncased_finetuned_rramicus|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/repro-rights-amicus-briefs/legal-bert-base-uncased-finetuned-RRamicus","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D90:3FD49:179ACD:5E1F72:6AB92D73"},"text_sha256":"8a89e5277716e33b0888722ef9b3a14f3bad585666b7b6b2f81af5cd0441a6df"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_bertimbau_base_pt.md","size":2506,"blob_sha":"28b0a0221a83b3005fd1a99ad90a13021309beb6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese legal_bertimbau_base BertEmbeddings from rufimelo\nauthor: John Snow Labs\nname: legal_bertimbau_base\ndate: 2023-09-13\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bertimbau_base` is a Portuguese model originally trained by rufimelo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bertimbau_base_pt_5.1.1_3.0_1694563613858.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bertimbau_base_pt_5.1.1_3.0_1694563613858.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_bertimbau_base\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_bertimbau_base\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bertimbau_base|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|405.8 MB|\n\n## References\n\nhttps://huggingface.co/rufimelo/Legal-BERTimbau-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A52A:3A3DD:17AABB:5E2F00:6AB92D74"},"text_sha256":"4475144aa0d952f5e254b723520f4bd0ba79cc128992358dae59ef3155c7c9bc"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_hebert_en.md","size":2422,"blob_sha":"508141215a8c84d8a998149867a1573910322b3f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_hebert BertEmbeddings from avichr\nauthor: John Snow Labs\nname: legal_hebert\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_hebert` is a English model originally trained by avichr.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_hebert_en_5.1.1_3.0_1694641249619.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_hebert_en_5.1.1_3.0_1694641249619.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_hebert\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_hebert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_hebert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|462.5 MB|\n\n## References\n\nhttps://huggingface.co/avichr/Legal-heBERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C20:3AC15:181420:5E972C:6AB92D75"},"text_sha256":"b23ee807c59ee2bd13ca33301dd9e8210d7d176e1f70537dae3d4a15ebfe7240"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_en.md","size":2539,"blob_sha":"40968056fea7e24b642c4eaab845aad4eb9be793","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_indobert_pytorch BertEmbeddings from kapanjagocoding\nauthor: John Snow Labs\nname: legal_indobert_pytorch\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_indobert_pytorch` is a English model originally trained by kapanjagocoding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_en_5.1.1_3.0_1694636800311.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_en_5.1.1_3.0_1694636800311.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_indobert_pytorch\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_indobert_pytorch\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_indobert_pytorch|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|403.6 MB|\n\n## References\n\nhttps://huggingface.co/kapanjagocoding/legal-indobert-pytorch","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E68E:3CC8A:17F125:5E75D7:6AB92D75"},"text_sha256":"e9f3118a9c830865a43307cf888d81bacaec409e01b2d0e4f059bddca5bca87d"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v1_en.md","size":2566,"blob_sha":"446b310aff75d4b087527e247258f2ae599ff531","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_indobert_pytorch_v1 BertEmbeddings from kapanjagocoding\nauthor: John Snow Labs\nname: legal_indobert_pytorch_v1\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_indobert_pytorch_v1` is a English model originally trained by kapanjagocoding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v1_en_5.1.1_3.0_1694637779586.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v1_en_5.1.1_3.0_1694637779586.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_indobert_pytorch_v1\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_indobert_pytorch_v1\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_indobert_pytorch_v1|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|408.1 MB|\n\n## References\n\nhttps://huggingface.co/kapanjagocoding/legal-indobert-pytorch-v1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C2:3A3DD:17AACB:5E2F2B:6AB92D75"},"text_sha256":"2a777bd4a8d195ec5e86a83079072a6f7c2d2a8e7febfd73275838c33bddbd31"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v2_en.md","size":2566,"blob_sha":"dca64da8b739451812575535a83ebff9f9d72634","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_indobert_pytorch_v2 BertEmbeddings from kapanjagocoding\nauthor: John Snow Labs\nname: legal_indobert_pytorch_v2\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_indobert_pytorch_v2` is a English model originally trained by kapanjagocoding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v2_en_5.1.1_3.0_1694637348680.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v2_en_5.1.1_3.0_1694637348680.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_indobert_pytorch_v2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_indobert_pytorch_v2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_indobert_pytorch_v2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|403.6 MB|\n\n## References\n\nhttps://huggingface.co/kapanjagocoding/legal-indobert-pytorch-v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A52A:3A3DD:17AAD0:5E2F37:6AB92D75"},"text_sha256":"e7de2fd86cb5ab0eecabd68e2e5ee7d3a2ae86b30a2330f7c664794b4f10409e"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v3_en.md","size":2566,"blob_sha":"05faa53af7c6cae64433ad2197b8a2a3328299d8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_indobert_pytorch_v3 BertEmbeddings from kapanjagocoding\nauthor: John Snow Labs\nname: legal_indobert_pytorch_v3\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_indobert_pytorch_v3` is a English model originally trained by kapanjagocoding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v3_en_5.1.1_3.0_1694638150002.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v3_en_5.1.1_3.0_1694638150002.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_indobert_pytorch_v3\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_indobert_pytorch_v3\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_indobert_pytorch_v3|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|408.2 MB|\n\n## References\n\nhttps://huggingface.co/kapanjagocoding/legal-indobert-pytorch-v3","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27C8:2E8679:17DD83:5E5F9E:6AB92D76"},"text_sha256":"3106ba53e2f757357bb0cb145e06041af37daa143b8149f195291d2ec8561bb8"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legal_indobert_pytorch_v4_en.md","size":2566,"blob_sha":"3c192c002de76317c50f0db0b7daea7d6ac2e748","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_indobert_pytorch_v4 BertEmbeddings from kapanjagocoding\nauthor: John Snow Labs\nname: legal_indobert_pytorch_v4\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_indobert_pytorch_v4` is a English model originally trained by kapanjagocoding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v4_en_5.1.1_3.0_1694643325435.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_indobert_pytorch_v4_en_5.1.1_3.0_1694643325435.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_indobert_pytorch_v4\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_indobert_pytorch_v4\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_indobert_pytorch_v4|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|408.1 MB|\n\n## References\n\nhttps://huggingface.co/kapanjagocoding/legal-indobert-pytorch-v4","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9B66:2B291E:185379:5ED875:6AB92D76"},"text_sha256":"0492ebda61dcfee06fa0ff7d0fc0fa9043e195f6a8a1d78c505731baba317574"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legalbert_adept_en.md","size":2479,"blob_sha":"30fc217e2ac076e006f4749719fc85b3a7dc0938","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbert_adept BertEmbeddings from hatemestinbejaia\nauthor: John Snow Labs\nname: legalbert_adept\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbert_adept` is a English model originally trained by hatemestinbejaia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbert_adept_en_5.1.1_3.0_1694567799021.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbert_adept_en_5.1.1_3.0_1694567799021.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalbert_adept\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalbert_adept\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbert_adept|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/hatemestinbejaia/legalbert-adept","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:179AE8:5E1FD9:6AB92D75"},"text_sha256":"0c6ae483b606b7d985e5f66e01465f44cfdc33a6b402fe0fa8dda9fab71d1e73"},{"path":"docs/_posts/ahmedlone127/2023-09-13-legalnlp_bert_pt.md","size":2461,"blob_sha":"ac59b8243b994d729eeb482c360ff70a630a469f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese legalnlp_bert BertEmbeddings from felipemaiapolo\nauthor: John Snow Labs\nname: legalnlp_bert\ndate: 2023-09-13\ntags: [bert, pt, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalnlp_bert` is a Portuguese model originally trained by felipemaiapolo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalnlp_bert_pt_5.1.1_3.0_1694580772789.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalnlp_bert_pt_5.1.1_3.0_1694580772789.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalnlp_bert\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalnlp_bert\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalnlp_bert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|405.8 MB|\n\n## References\n\nhttps://huggingface.co/felipemaiapolo/legalnlp-bert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4DA:345ED4:17A5C5:5E2980:6AB92D77"},"text_sha256":"952eaa316bb86527a45c676a59382bbc532e93f725fbaa8afee5a74a7ff32757"},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg_legal_base_uncased_4096_en.md","size":2551,"blob_sha":"709bbed08aba511a3d6e78ac87f2eef4647eaa75","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English lsg_legal_base_uncased_4096 BertEmbeddings from ccdv\nauthor: John Snow Labs\nname: lsg_legal_base_uncased_4096\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`lsg_legal_base_uncased_4096` is a English model originally trained by ccdv.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/lsg_legal_base_uncased_4096_en_5.1.1_3.0_1694590941145.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/lsg_legal_base_uncased_4096_en_5.1.1_3.0_1694590941145.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"lsg_legal_base_uncased_4096\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"lsg_legal_base_uncased_4096\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|lsg_legal_base_uncased_4096|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|417.6 MB|\n\n## References\n\nhttps://huggingface.co/ccdv/lsg-legal-base-uncased-4096","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"58E2:7A4F8:184260:5EC768:6AB92D77"},"text_sha256":"44e8cea2d4e46c5171eb679f4f0d0d44f26718b08333e7317a75d85e680115ab"},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg_legal_small_uncased_4096_en.md","size":2560,"blob_sha":"269581411ea0dc9d20b7299b183d5c988529b77a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English lsg_legal_small_uncased_4096 BertEmbeddings from ccdv\nauthor: John Snow Labs\nname: lsg_legal_small_uncased_4096\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`lsg_legal_small_uncased_4096` is a English model originally trained by ccdv.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/lsg_legal_small_uncased_4096_en_5.1.1_3.0_1694591070073.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/lsg_legal_small_uncased_4096_en_5.1.1_3.0_1694591070073.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"lsg_legal_small_uncased_4096\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"lsg_legal_small_uncased_4096\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|lsg_legal_small_uncased_4096|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|137.4 MB|\n\n## References\n\nhttps://huggingface.co/ccdv/lsg-legal-small-uncased-4096","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:17F30C:5E77EF:6AB92D78"},"text_sha256":"d24f6a26b79d7e64f40c2d37f0fcc1749bee779068ae371a904c449e5ff77c47"},{"path":"docs/_posts/ahmedlone127/2023-09-13-lsg4k_italian_legal_bert_it.md","size":2533,"blob_sha":"f3839e77af29a0273b1b118de12c54c4ef328683","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Italian lsg4k_italian_legal_bert BertEmbeddings from dlicari\nauthor: John Snow Labs\nname: lsg4k_italian_legal_bert\ndate: 2023-09-13\ntags: [bert, it, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`lsg4k_italian_legal_bert` is a Italian model originally trained by dlicari.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/lsg4k_italian_legal_bert_it_5.1.1_3.0_1694596094098.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/lsg4k_italian_legal_bert_it_5.1.1_3.0_1694596094098.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"lsg4k_italian_legal_bert\",\"it\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"lsg4k_italian_legal_bert\", \"it\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|lsg4k_italian_legal_bert|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|it|\n|Size:|419.2 MB|\n\n## References\n\nhttps://huggingface.co/dlicari/lsg4k-Italian-Legal-BERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F1CC:29FD16:185708:5EDB92:6AB92D78"},"text_sha256":"6f99eb9c6ba40aac446df61660fa3705780d7742e2d25ac14e094104cba352e8"},{"path":"docs/_posts/ahmedlone127/2023-09-13-pak_legal_bert_small_uncased_en.md","size":2575,"blob_sha":"68b62e03dd9250295c7091d162c2c082e45534c4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English pak_legal_bert_small_uncased BertEmbeddings from AISystems\nauthor: John Snow Labs\nname: pak_legal_bert_small_uncased\ndate: 2023-09-13\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`pak_legal_bert_small_uncased` is a English model originally trained by AISystems.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/pak_legal_bert_small_uncased_en_5.1.1_3.0_1694596392979.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/pak_legal_bert_small_uncased_en_5.1.1_3.0_1694596392979.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"pak_legal_bert_small_uncased\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"pak_legal_bert_small_uncased\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|pak_legal_bert_small_uncased|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|130.5 MB|\n\n## References\n\nhttps://huggingface.co/AISystems/PAK-LEGAL-BERT-small-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"792A:A58F2:17735F:5DF877:6AB92D78"},"text_sha256":"e64022bdd5e73797cdec231fea15eca774f3e807415d65ea77bb434464d4ec9e"},{"path":"docs/_posts/ahmedlone127/2023-09-14-InLegalBERT_cbp_lkg_triples_finetuned_en.md","size":2656,"blob_sha":"e77417718d3a5833587beecf36ad08b8c3dc024a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English InLegalBERT_cbp_lkg_triples_finetuned BertEmbeddings from kinshuk-h\nauthor: John Snow Labs\nname: InLegalBERT_cbp_lkg_triples_finetuned\ndate: 2023-09-14\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`InLegalBERT_cbp_lkg_triples_finetuned` is a English model originally trained by kinshuk-h.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/InLegalBERT_cbp_lkg_triples_finetuned_en_5.1.1_3.0_1694694447567.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/InLegalBERT_cbp_lkg_triples_finetuned_en_5.1.1_3.0_1694694447567.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"InLegalBERT_cbp_lkg_triples_finetuned\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"InLegalBERT_cbp_lkg_triples_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|InLegalBERT_cbp_lkg_triples_finetuned|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/kinshuk-h/InLegalBERT-cbp-lkg-triples-finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDD4:11E74B:17B629:5E39BD:6AB92D78"},"text_sha256":"7a8c1c71e39fd6c265ab6598731a39ff7d919d75ba40d54a6329590abdbc8fc2"},{"path":"docs/_posts/ahmedlone127/2023-09-14-legal_hebert_ft_en.md","size":2449,"blob_sha":"87a87782f0a4e69164cb91f04c9418d2c204e221","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_hebert_ft BertEmbeddings from avichr\nauthor: John Snow Labs\nname: legal_hebert_ft\ndate: 2023-09-14\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_hebert_ft` is a English model originally trained by avichr.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_hebert_ft_en_5.1.1_3.0_1694656937535.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_hebert_ft_en_5.1.1_3.0_1694656937535.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legal_hebert_ft\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legal_hebert_ft\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_hebert_ft|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|407.9 MB|\n\n## References\n\nhttps://huggingface.co/avichr/Legal-heBERT_ft","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7272:4F9CC:17283A:5DAA75:6AB92D79"},"text_sha256":"e0adb8afb138338027f1c1655e8ee60215a84d4244793d6f24654392b6143f08"},{"path":"docs/_posts/ahmedlone127/2023-09-14-legalbert_large_1.7m_1_en.md","size":2527,"blob_sha":"2129067405d6a552559cc9adc9775240dfc771df","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbert_large_1.7m_1 BertEmbeddings from pile-of-law\nauthor: John Snow Labs\nname: legalbert_large_1.7m_1\ndate: 2023-09-14\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbert_large_1.7m_1` is a English model originally trained by pile-of-law.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbert_large_1.7m_1_en_5.1.1_3.0_1694651512853.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbert_large_1.7m_1_en_5.1.1_3.0_1694651512853.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalbert_large_1.7m_1\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalbert_large_1.7m_1\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbert_large_1.7m_1|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|643.5 MB|\n\n## References\n\nhttps://huggingface.co/pile-of-law/legalbert-large-1.7M-1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:180171:5AB1C3:6AB92D7A"},"text_sha256":"a5a6f1ff39a9256f98c57e7bb756a6fa15f9746ea8b539bb108ef003dd07ac81"},{"path":"docs/_posts/ahmedlone127/2023-09-14-legalbert_large_1.7m_2_en.md","size":2527,"blob_sha":"512842ee82e8d7b490c416c8448684a82b6ed3b7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbert_large_1.7m_2 BertEmbeddings from pile-of-law\nauthor: John Snow Labs\nname: legalbert_large_1.7m_2\ndate: 2023-09-14\ntags: [bert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbert_large_1.7m_2` is a English model originally trained by pile-of-law.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbert_large_1.7m_2_en_5.1.1_3.0_1694653987323.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbert_large_1.7m_2_en_5.1.1_3.0_1694653987323.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"legalbert_large_1.7m_2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"legalbert_large_1.7m_2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbert_large_1.7m_2|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|645.3 MB|\n\n## References\n\nhttps://huggingface.co/pile-of-law/legalbert-large-1.7M-2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BBE2:3EACB:17C4ED:5E49B8:6AB92D74"},"text_sha256":"9e07c9843d7a4e6abeda86335458e4e411a17c5fd1695ad9e4758e0273e96966"},{"path":"docs/_posts/ahmedlone127/2023-09-14-lsg16k_Italian_Legal_BERT_it.md","size":2542,"blob_sha":"9db6537f150c15bf948118f0548d205cc6c552b4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Italian lsg16k_Italian_Legal_BERT BertEmbeddings from dlicari\nauthor: John Snow Labs\nname: lsg16k_Italian_Legal_BERT\ndate: 2023-09-14\ntags: [bert, it, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 5.1.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`lsg16k_Italian_Legal_BERT` is a Italian model originally trained by dlicari.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/lsg16k_Italian_Legal_BERT_it_5.1.1_3.0_1694693338486.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/lsg16k_Italian_Legal_BERT_it_5.1.1_3.0_1694693338486.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =BertEmbeddings.pretrained(\"lsg16k_Italian_Legal_BERT\",\"it\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = BertEmbeddings \n    .pretrained(\"lsg16k_Italian_Legal_BERT\", \"it\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|lsg16k_Italian_Legal_BERT|\n|Compatibility:|Spark NLP 5.1.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|it|\n|Size:|454.6 MB|\n\n## References\n\nhttps://huggingface.co/dlicari/lsg16k-Italian-Legal-BERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DF7C:35EBC:179EC5:5E2387:6AB92D79"},"text_sha256":"77a624de938aed517e0ab1f96ca607e8ce8e7a9fb4cb7e6f40beb5c4727255ba"},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_full_corpus_10.0_en.md","size":2722,"blob_sha":"16a4bef397b6e45631ceb6383bb82287f681e72a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English kaz_legal_distilbert_full_corpus_10.0 DistilBertEmbeddings from kaisar-barlybay-sse\nauthor: John Snow Labs\nname: kaz_legal_distilbert_full_corpus_10.0\ndate: 2023-09-15\ntags: [distilbert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`kaz_legal_distilbert_full_corpus_10.0` is a English model originally trained by kaisar-barlybay-sse.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_full_corpus_10.0_en_5.1.2_3.0_1694781030169.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_full_corpus_10.0_en_5.1.2_3.0_1694781030169.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =DistilBertEmbeddings.pretrained(\"kaz_legal_distilbert_full_corpus_10.0\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = DistilBertEmbeddings \n    .pretrained(\"kaz_legal_distilbert_full_corpus_10.0\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|kaz_legal_distilbert_full_corpus_10.0|\n|Compatibility:|Spark NLP 5.1.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|248.9 MB|\n\n## References\n\nhttps://huggingface.co/kaisar-barlybay-sse/kaz_legal_distilbert_full_corpus_10.0","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C2:3A3DD:17AB0D:5E2FF4:6AB92D7A"},"text_sha256":"b1405a535a40406779598d8d43f401a0efd79993f4cf60709a78f8054b2144e0"},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_full_corpus_3.0_en.md","size":2713,"blob_sha":"316e5e5bcf3328e6fe38d152d20f9b44d7d29abc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English kaz_legal_distilbert_full_corpus_3.0 DistilBertEmbeddings from kaisar-barlybay-sse\nauthor: John Snow Labs\nname: kaz_legal_distilbert_full_corpus_3.0\ndate: 2023-09-15\ntags: [distilbert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`kaz_legal_distilbert_full_corpus_3.0` is a English model originally trained by kaisar-barlybay-sse.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_full_corpus_3.0_en_5.1.2_3.0_1694780769803.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_full_corpus_3.0_en_5.1.2_3.0_1694780769803.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =DistilBertEmbeddings.pretrained(\"kaz_legal_distilbert_full_corpus_3.0\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = DistilBertEmbeddings \n    .pretrained(\"kaz_legal_distilbert_full_corpus_3.0\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|kaz_legal_distilbert_full_corpus_3.0|\n|Compatibility:|Spark NLP 5.1.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|248.8 MB|\n\n## References\n\nhttps://huggingface.co/kaisar-barlybay-sse/kaz_legal_distilbert_full_corpus_3.0","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E74:35999:17AAEE:5E30B8:6AB92D79"},"text_sha256":"59675a189e03588200a86bcdeedef40167327c492f8e1477df1553e3201afa3d"},{"path":"docs/_posts/ahmedlone127/2023-09-15-kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545_en.md","size":2992,"blob_sha":"7bd19e82e8bdf79eef294b4d6450535dd892c506","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545 DistilBertEmbeddings from kaisar-barlybay-sse\nauthor: John Snow Labs\nname: kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545\ndate: 2023-09-15\ntags: [distilbert, en, open_source, fill_mask, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.1.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertEmbeddings  model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545` is a English model originally trained by kaisar-barlybay-sse.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545_en_5.1.2_3.0_1694782306602.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545_en_5.1.2_3.0_1694782306602.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nembeddings =DistilBertEmbeddings.pretrained(\"kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"embeddings\")\n\npipeline = Pipeline().setStages([document_assembler, embeddings])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval embeddings = DistilBertEmbeddings \n    .pretrained(\"kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"embeddings\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, embeddings))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545|\n|Compatibility:|Spark NLP 5.1.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|249.0 MB|\n\n## References\n\nhttps://huggingface.co/kaisar-barlybay-sse/kaz_legal_distilbert_legal_corpus_312818008_words_4.945454545454545","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:173F48:5DC41A:6AB92D7A"},"text_sha256":"456c2472cae33ea7e0d567482a8c5f61d4d053c9237b2255d23ad8174e165e6f"},{"path":"docs/_posts/ahmedlone127/2023-09-18-autotrain_security_text_classification_albert_688320769_en.md","size":2930,"blob_sha":"2615a6b3544b243adf728176f9b424ab8657492b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English autotrain_security_text_classification_albert_688320769 AlbertForSequenceClassification from vlsb\nauthor: John Snow Labs\nname: autotrain_security_text_classification_albert_688320769\ndate: 2023-09-18\ntags: [albert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: AlbertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained AlbertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`autotrain_security_text_classification_albert_688320769` is a English model originally trained by vlsb.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/autotrain_security_text_classification_albert_688320769_en_5.1.2_3.0_1695068193893.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/autotrain_security_text_classification_albert_688320769_en_5.1.2_3.0_1695068193893.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \nsequenceClassifier = AlbertForSequenceClassification.pretrained(\"autotrain_security_text_classification_albert_688320769\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, sequenceClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval sequenceClassifier = AlbertForSequenceClassification  \n    .pretrained(\"autotrain_security_text_classification_albert_688320769\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"class\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, sequenceClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|autotrain_security_text_classification_albert_688320769|\n|Compatibility:|Spark NLP 5.1.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|44.2 MB|\n\n## References\n\nhttps://huggingface.co/vlsb/autotrain-security-text-classification-albert-688320769","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53B2:3B1F3:186A32:5EEFFD:6AB92D7B"},"text_sha256":"04fffe8602a0db86e9d196646c3bc3c0dd7d11ea835eb2d90b6e7e6e77759c61"},{"path":"docs/_posts/ahmedlone127/2023-10-25-legal_bert_based_uncase_en.md","size":2893,"blob_sha":"f1abf912760c7cfd0ac2a9e745ac9443e8de2836","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_based_uncase BertForSequenceClassification from amanbawa96\nauthor: John Snow Labs\nname: legal_bert_based_uncase\ndate: 2023-10-25\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_based_uncase` is a English model originally trained by amanbawa96.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_based_uncase_en_5.1.4_3.4_1698264650160.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_based_uncase_en_5.1.4_3.4_1698264650160.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_based_uncase\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_based_uncase\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_based_uncase|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|409.6 MB|\n\n## References\n\nhttps://huggingface.co/amanbawa96/legal-bert-based-uncase","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A452:3E1C8:1801AB:5E85AA:6AB92D7C"},"text_sha256":"6c174b4d1a51930a8e22ccf72cdd8827703506349ac8ba92abaf0a7980558c4e"},{"path":"docs/_posts/ahmedlone127/2023-10-25-legal_bert_tpb_clause_class_en.md","size":2929,"blob_sha":"db9dffa14be5d49bae6c683d5d0f843b20c5dfb8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_tpb_clause_class BertForSequenceClassification from frankkuete\nauthor: John Snow Labs\nname: legal_bert_tpb_clause_class\ndate: 2023-10-25\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_tpb_clause_class` is a English model originally trained by frankkuete.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_tpb_clause_class_en_5.1.4_3.4_1698237815681.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_tpb_clause_class_en_5.1.4_3.4_1698237815681.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_tpb_clause_class\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_tpb_clause_class\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_tpb_clause_class|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|409.5 MB|\n\n## References\n\nhttps://huggingface.co/frankkuete/legal-bert-tpb-clause-class","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"652A:7A4F8:184281:5EC807:6AB92D7D"},"text_sha256":"80ab5f2bcf238317eae17aeeb0cb74ad954c0177b39e6a2ce5be5018016bf013"},{"path":"docs/_posts/ahmedlone127/2023-10-26-bert_tiny_finetuned_legal_definitions_downstream_alt_en.md","size":3150,"blob_sha":"27202426745ac1140aa0c877ef730989dc270900","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_tiny_finetuned_legal_definitions_downstream_alt BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_tiny_finetuned_legal_definitions_downstream_alt\ndate: 2023-10-26\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_tiny_finetuned_legal_definitions_downstream_alt` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_downstream_alt_en_5.1.4_3.4_1698361780403.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_downstream_alt_en_5.1.4_3.4_1698361780403.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_tiny_finetuned_legal_definitions_downstream_alt\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_tiny_finetuned_legal_definitions_downstream_alt\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_tiny_finetuned_legal_definitions_downstream_alt|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|16.7 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-tiny-finetuned-legal-definitions-downstream-alt","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF66:3AC15:18145B:5E9838:6AB92D7B"},"text_sha256":"cf66f9ebaa5d1ba3650b72e83d221f1e2a6e8063ea14a1d6b578c9d0bba51f28"},{"path":"docs/_posts/ahmedlone127/2023-10-26-bert_tiny_finetuned_legal_definitions_longer_downstream_alt_en.md","size":3213,"blob_sha":"0a3cab42e534bcd80b8e1dafd561932c1abbb8d5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_tiny_finetuned_legal_definitions_longer_downstream_alt BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_tiny_finetuned_legal_definitions_longer_downstream_alt\ndate: 2023-10-26\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_tiny_finetuned_legal_definitions_longer_downstream_alt` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_longer_downstream_alt_en_5.1.4_3.4_1698362214023.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_tiny_finetuned_legal_definitions_longer_downstream_alt_en_5.1.4_3.4_1698362214023.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_tiny_finetuned_legal_definitions_longer_downstream_alt\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_tiny_finetuned_legal_definitions_longer_downstream_alt\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_tiny_finetuned_legal_definitions_longer_downstream_alt|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|16.7 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-tiny-finetuned-legal-definitions-longer-downstream-alt","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59A0:285814:17480B:5DCCCC:6AB92D79"},"text_sha256":"60af4e7834f7dace0df6a2aaba262a70588dc2232e57e1e01cb8645fa313b3b2"},{"path":"docs/_posts/ahmedlone127/2023-10-26-burmese_legal_bert_small_en.md","size":2882,"blob_sha":"78d07ccc94ac623fda256fdfd4b99a71fb094d17","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English burmese_legal_bert_small BertForSequenceClassification from wiorz\nauthor: John Snow Labs\nname: burmese_legal_bert_small\ndate: 2023-10-26\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`burmese_legal_bert_small` is a English model originally trained by wiorz.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/burmese_legal_bert_small_en_5.1.4_3.4_1698318113342.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/burmese_legal_bert_small_en_5.1.4_3.4_1698318113342.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"burmese_legal_bert_small\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"burmese_legal_bert_small\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|burmese_legal_bert_small|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|131.6 MB|\n\n## References\n\nhttps://huggingface.co/wiorz/my_legal_bert_small","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4BC:1F1FB6:17E8F5:5E6D87:6AB92D7C"},"text_sha256":"d2420923473108051bfe15b9b9949bdf688210b1dd2c258b00820749e8b42a2b"},{"path":"docs/_posts/ahmedlone127/2023-10-26-legal_bert_test2_en.md","size":2815,"blob_sha":"2dad795ddf4f888b76b5a43319f6f1a8450e0f83","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_test2 BertForSequenceClassification from wiorz\nauthor: John Snow Labs\nname: legal_bert_test2\ndate: 2023-10-26\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_test2` is a English model originally trained by wiorz.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_test2_en_5.1.4_3.4_1698320290761.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_test2_en_5.1.4_3.4_1698320290761.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_test2\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_test2\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_test2|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|131.6 MB|\n\n## References\n\nhttps://huggingface.co/wiorz/legal_bert_test2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C190:09ED:E6E00:3FACC0:6AB92D7D"},"text_sha256":"0bd81d739219ceff74598d9a18f3bbe12500535166fa5e92f44e86cc0c8847db"},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_en.md","size":2980,"blob_sha":"f9b942048cf031c64575019eba0ff87a9daf6369","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_eoir_privacy BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_eoir_privacy\ndate: 2023-10-27\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_eoir_privacy` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_en_5.1.4_3.4_1698380605530.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_en_5.1.4_3.4_1698380605530.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_eoir_privacy|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|107.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-eoir_privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C4A6:3CC8A:17F184:5E7724:6AB92D7E"},"text_sha256":"15580cbfe8087e5a814503c52d42697117e4d34bf1bf72f9d901c872f973bc9c"},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer10_en.md","size":3061,"blob_sha":"48f8076f3835fc71be465442996626c280ca3eb0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_eoir_privacy_longer10 BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_eoir_privacy_longer10\ndate: 2023-10-27\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_eoir_privacy_longer10` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer10_en_5.1.4_3.4_1698381602797.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer10_en_5.1.4_3.4_1698381602797.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer10\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer10\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_eoir_privacy_longer10|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|107.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-eoir_privacy-longer10","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DE7A:326565:17C3E6:5E49F3:6AB92D72"},"text_sha256":"b16b8fd5792c734bb46bc4b3fc8e3bfeead6c62d1b5aaca79a3ed5b9604abe17"},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer20_en.md","size":3061,"blob_sha":"528d7f0863fb890e6acd5735dc6854d8c022f046","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_eoir_privacy_longer20 BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_eoir_privacy_longer20\ndate: 2023-10-27\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_eoir_privacy_longer20` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer20_en_5.1.4_3.4_1698382251783.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer20_en_5.1.4_3.4_1698382251783.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer20\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer20\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_eoir_privacy_longer20|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|107.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-eoir_privacy-longer20","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A9E:345ED4:17A5FF:5E2AAD:6AB92D7F"},"text_sha256":"c5cf4d4c677f47550e734f065ac48b269f44bd8cd4fa0fa5c5272a239307e8fb"},{"path":"docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_longer30_en.md","size":3061,"blob_sha":"88f66c06cfc831864f430c9b30749a931c0569db","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_small_finetuned_eoir_privacy_longer30 BertForSequenceClassification from muhtasham\nauthor: John Snow Labs\nname: bert_small_finetuned_eoir_privacy_longer30\ndate: 2023-10-27\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_small_finetuned_eoir_privacy_longer30` is a English model originally trained by muhtasham.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer30_en_5.1.4_3.4_1698382833161.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_longer30_en_5.1.4_3.4_1698382833161.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer30\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_small_finetuned_eoir_privacy_longer30\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_small_finetuned_eoir_privacy_longer30|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|107.9 MB|\n\n## References\n\nhttps://huggingface.co/muhtasham/bert-small-finetuned-eoir-privacy-longer30","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DC8:285814:17481F:5DCD18:6AB92D7A"},"text_sha256":"c76bbc6acbb7aeaffb082275570e9daa41a5c5c0f6fde7a5731bc16fc5b76e80"},{"path":"docs/_posts/ahmedlone127/2023-10-31-legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz_en.md","size":3223,"blob_sha":"4448cbb2bbb72eda43b14d93eb91b38a292552f9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz BertForSequenceClassification from wiorz\nauthor: John Snow Labs\nname: legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz\ndate: 2023-10-31\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz` is a English model originally trained by wiorz.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz_en_5.1.4_3.4_1698781198477.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz_en_5.1.4_3.4_1698781198477.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_samoan_gen1_large_defined_summarized_chuvash_1_wiorz|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|409.5 MB|\n\n## References\n\nhttps://huggingface.co/wiorz/legal_bert_sm_gen1_large_defined_summarized_cv_1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A98:17E138:17B3E7:5E3904:6AB92D79"},"text_sha256":"854bf0e00b3b1ef3e13c2cbe487b1555aacf67781ccee978c7417257365f2e69"},{"path":"docs/_posts/ahmedlone127/2023-11-01-bert_large_legal_sentence_classification_en.md","size":3041,"blob_sha":"414ad1ac80576d2a334e4f616bf73486e48a4511","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_large_legal_sentence_classification BertForSequenceClassification from samkas125\nauthor: John Snow Labs\nname: bert_large_legal_sentence_classification\ndate: 2023-11-01\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_large_legal_sentence_classification` is a English model originally trained by samkas125.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_large_legal_sentence_classification_en_5.1.4_3.4_1698812412977.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_large_legal_sentence_classification_en_5.1.4_3.4_1698812412977.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_large_legal_sentence_classification\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_large_legal_sentence_classification\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_large_legal_sentence_classification|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/samkas125/bert-large-legal-sentence-classification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17F198:5E7793:6AB92D7F"},"text_sha256":"064fdfd38f9845d77c2277259f0aed3c020e06fce96c2e324ee0d275d5f505cb"},{"path":"docs/_posts/ahmedlone127/2023-11-01-bert_sequence_classifier_priv_consent_en.md","size":2989,"blob_sha":"d684f32050afe906640cae51df18cdcfd254a6fd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English BertForSequenceClassification Cased model (from Adi2K)\nauthor: John Snow Labs\nname: bert_sequence_classifier_priv_consent\ndate: 2023-11-01\ntags: [en, open_source, bert, sequence_classification, ner, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.1.4\nspark_version: 3.4\nsupported: true\nengine: onnx\nannotator: BertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `Priv-Consent` is a English model originally trained by `Adi2K`.\n\n## Predicted Entities\n\n`NOT`, `CON`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_sequence_classifier_priv_consent_en_5.1.4_3.4_1698803896285.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_sequence_classifier_priv_consent_en_5.1.4_3.4_1698803896285.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nsequenceClassifier = BertForSequenceClassification.pretrained(\"bert_sequence_classifier_priv_consent\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval sequenceClassifier = BertForSequenceClassification.pretrained(\"bert_sequence_classifier_priv_consent\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"ner\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_sequence_classifier_priv_consent|\n|Compatibility:|Spark NLP 5.1.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|409.4 MB|\n|Case sensitive:|true|\n|Max sentence length:|128|\n\n## References\n\nReferences\n\n- https://huggingface.co/Adi2K/Priv-Consent","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"59A0:285814:174826:5DCD39:6AB92D81"},"text_sha256":"b4514d29fe56818ef52cfe0aafecc6c0fe455bc423b0c693d25943d00d1ac720"},{"path":"docs/_posts/ahmedlone127/2023-11-06-bert_ner_legalbert_beneficiary_single_en.md","size":3444,"blob_sha":"33e7f4503754322ecdc9c1683809d5c5a46d4391","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English BertForTokenClassification Cased model (from Anery)\nauthor: John Snow Labs\nname: bert_ner_legalbert_beneficiary_single\ndate: 2023-11-06\ntags: [bert, ner, open_source, en, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalbert_beneficiary_single` is a English model originally trained by `Anery`.\n\n## Predicted Entities\n\n`AC`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_ner_legalbert_beneficiary_single_en_5.2.0_3.0_1699296397141.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_ner_legalbert_beneficiary_single_en_5.2.0_3.0_1699296397141.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n        .setInputCol(\"text\") \\\n        .setOutputCol(\"document\")\n\nsentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\\\n       .setInputCols([\"document\"])\\\n       .setOutputCol(\"sentence\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"sentence\") \\\n    .setOutputCol(\"token\")\n\ntokenClassifier = BertForTokenClassification.pretrained(\"bert_ner_legalbert_beneficiary_single\",\"en\") \\\n    .setInputCols([\"sentence\", \"token\"]) \\\n    .setOutputCol(\"ner\")\n\npipeline = Pipeline(stages=[documentAssembler, sentenceDetector, tokenizer, tokenClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n          .setInputCol(\"text\") \n          .setOutputCol(\"document\")\n\nval sentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n       .setInputCols(Array(\"document\"))\n       .setOutputCol(\"sentence\")\n\nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"sentence\"))\n    .setOutputCol(\"token\")\n\nval tokenClassifier = BertForTokenClassification.pretrained(\"bert_ner_legalbert_beneficiary_single\",\"en\") \n    .setInputCols(Array(\"sentence\", \"token\")) \n    .setOutputCol(\"ner\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler,sentenceDetector, tokenizer, tokenClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.ner.bert.legal\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_ner_legalbert_beneficiary_single|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|407.3 MB|\n|Case sensitive:|true|\n|Max sentence length:|128|\n\n## References\n\nReferences\n\n- https://huggingface.co/Anery/legalbert_beneficiary_single","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:182F26:5EB552:6AB92D80"},"text_sha256":"bf040a5e119f8f7ced03a170a8b50c9e0afd9c9091c82038a6d95a7e42722641"},{"path":"docs/_posts/ahmedlone127/2023-11-06-bert_ner_legalbert_clause_combined_en.md","size":3429,"blob_sha":"88fa8df5211e1a900d5931b1ac8d925639e4aa91","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English BertForTokenClassification Cased model (from Anery)\nauthor: John Snow Labs\nname: bert_ner_legalbert_clause_combined\ndate: 2023-11-06\ntags: [bert, ner, open_source, en, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalbert_clause_combined` is a English model originally trained by `Anery`.\n\n## Predicted Entities\n\n`AC`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_ner_legalbert_clause_combined_en_5.2.0_3.0_1699293384321.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_ner_legalbert_clause_combined_en_5.2.0_3.0_1699293384321.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n        .setInputCol(\"text\") \\\n        .setOutputCol(\"document\")\n\nsentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\\\n       .setInputCols([\"document\"])\\\n       .setOutputCol(\"sentence\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"sentence\") \\\n    .setOutputCol(\"token\")\n\ntokenClassifier = BertForTokenClassification.pretrained(\"bert_ner_legalbert_clause_combined\",\"en\") \\\n    .setInputCols([\"sentence\", \"token\"]) \\\n    .setOutputCol(\"ner\")\n\npipeline = Pipeline(stages=[documentAssembler, sentenceDetector, tokenizer, tokenClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n          .setInputCol(\"text\") \n          .setOutputCol(\"document\")\n\nval sentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n       .setInputCols(Array(\"document\"))\n       .setOutputCol(\"sentence\")\n\nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"sentence\"))\n    .setOutputCol(\"token\")\n\nval tokenClassifier = BertForTokenClassification.pretrained(\"bert_ner_legalbert_clause_combined\",\"en\") \n    .setInputCols(Array(\"sentence\", \"token\")) \n    .setOutputCol(\"ner\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler,sentenceDetector, tokenizer, tokenClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.ner.bert.legal.by_anery\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_ner_legalbert_clause_combined|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|130.6 MB|\n|Case sensitive:|true|\n|Max sentence length:|128|\n\n## References\n\nReferences\n\n- https://huggingface.co/Anery/legalbert_clause_combined","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C190:09ED:E6E13:3FAD55:6AB92D80"},"text_sha256":"8d7c9c4ea8267ae0ccee89f4d4f1c99fe8f46db7c7e83d1afdffcd5445d0c98f"},{"path":"docs/_posts/ahmedlone127/2023-11-07-gbert_legal_ner_de.md","size":2537,"blob_sha":"78c089ec9674d68329089fdf7989e8067e960cba","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German gbert_legal_ner BertForTokenClassification from PaDaS-Lab\nauthor: John Snow Labs\nname: gbert_legal_ner\ndate: 2023-11-07\ntags: [bert, de, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: de\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gbert_legal_ner` is a German model originally trained by PaDaS-Lab.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gbert_legal_ner_de_5.2.0_3.0_1699387731402.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gbert_legal_ner_de_5.2.0_3.0_1699387731402.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"gbert_legal_ner\",\"de\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"gbert_legal_ner\", \"de\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gbert_legal_ner|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|de|\n|Size:|407.0 MB|\n\n## References\n\nhttps://huggingface.co/PaDaS-Lab/gbert-legal-ner","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4938:24970A:1861BF:5EE53C:6AB92D82"},"text_sha256":"fe1b06caecb25588f900bbbae8cbfc185f805ccf7fa3e12ef5e18a07ab04d0d4"},{"path":"docs/_posts/ahmedlone127/2023-11-07-legal_bert_ner_base_cased_ptbr_pt.md","size":2683,"blob_sha":"4c385926fa641fe7dd5a8b162af1854f00d1c236","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese legal_bert_ner_base_cased_ptbr BertForTokenClassification from dominguesm\nauthor: John Snow Labs\nname: legal_bert_ner_base_cased_ptbr\ndate: 2023-11-07\ntags: [bert, pt, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: pt\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_ner_base_cased_ptbr` is a Portuguese model originally trained by dominguesm.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_ner_base_cased_ptbr_pt_5.2.0_3.0_1699388720293.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_ner_base_cased_ptbr_pt_5.2.0_3.0_1699388720293.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"legal_bert_ner_base_cased_ptbr\",\"pt\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"legal_bert_ner_base_cased_ptbr\", \"pt\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_ner_base_cased_ptbr|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|pt|\n|Size:|405.9 MB|\n\n## References\n\nhttps://huggingface.co/dominguesm/legal-bert-ner-base-cased-ptbr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"834C:3EACB:17C53C:5E4B01:6AB92D78"},"text_sha256":"d033da25d72939324cf4544c7824409136c24940f8847e874a849f9a7c5822c6"},{"path":"docs/_posts/ahmedlone127/2023-11-07-roberta_finetuned_privacy_detection_zh.md","size":2705,"blob_sha":"a10cdd8aaaabf3ab30a3d0c802d97c1212ac9977","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Chinese roberta_finetuned_privacy_detection BertForTokenClassification from gyr66\nauthor: John Snow Labs\nname: roberta_finetuned_privacy_detection\ndate: 2023-11-07\ntags: [bert, zh, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: zh\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_privacy_detection` is a Chinese model originally trained by gyr66.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_privacy_detection_zh_5.2.0_3.0_1699386723039.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_privacy_detection_zh_5.2.0_3.0_1699386723039.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"roberta_finetuned_privacy_detection\",\"zh\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"roberta_finetuned_privacy_detection\", \"zh\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_privacy_detection|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|zh|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/gyr66/RoBERTa-finetuned-privacy-detection","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B90:3BCC6:17EB3C:5E70EF:6AB92D77"},"text_sha256":"3e11e5bdcf2f48517c9265c5253f9271250a083e7dfca9eac9afbfa41966dfc6"},{"path":"docs/_posts/ahmedlone127/2023-11-08-greek_legal_bert_v2_finetuned_ner_en.md","size":2710,"blob_sha":"c2622e5685b7956dc8f0b2b69d3279f893af7c23","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English greek_legal_bert_v2_finetuned_ner BertForTokenClassification from amichailidis\nauthor: John Snow Labs\nname: greek_legal_bert_v2_finetuned_ner\ndate: 2023-11-08\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`greek_legal_bert_v2_finetuned_ner` is a English model originally trained by amichailidis.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/greek_legal_bert_v2_finetuned_ner_en_5.2.0_3.0_1699474919715.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/greek_legal_bert_v2_finetuned_ner_en_5.2.0_3.0_1699474919715.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"greek_legal_bert_v2_finetuned_ner\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"greek_legal_bert_v2_finetuned_ner\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|greek_legal_bert_v2_finetuned_ner|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|421.0 MB|\n\n## References\n\nhttps://huggingface.co/amichailidis/greek_legal_bert_v2-finetuned-ner","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E10:1A3D83:187FCD:5F0652:6AB92D82"},"text_sha256":"7a28208186421a1dcac68071a599de35c60d878522750d488f2f09cd4ca23b0b"},{"path":"docs/_posts/ahmedlone127/2023-11-08-greek_legal_bert_v2_finetuned_ner_v3_en.md","size":2737,"blob_sha":"82dbd46202cf3bd3b09cce6efe5e75f327b0e469","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English greek_legal_bert_v2_finetuned_ner_v3 BertForTokenClassification from amichailidis\nauthor: John Snow Labs\nname: greek_legal_bert_v2_finetuned_ner_v3\ndate: 2023-11-08\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`greek_legal_bert_v2_finetuned_ner_v3` is a English model originally trained by amichailidis.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/greek_legal_bert_v2_finetuned_ner_v3_en_5.2.0_3.0_1699417541056.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/greek_legal_bert_v2_finetuned_ner_v3_en_5.2.0_3.0_1699417541056.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"greek_legal_bert_v2_finetuned_ner_v3\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"greek_legal_bert_v2_finetuned_ner_v3\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|greek_legal_bert_v2_finetuned_ner_v3|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|421.0 MB|\n\n## References\n\nhttps://huggingface.co/amichailidis/greek_legal_bert_v2-finetuned-ner-V3","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2090:3CC8A:17F1AD:5E77F2:6AB92D83"},"text_sha256":"827b355bdee030d4d4aaefa4849368c05cb6b23b01db83d75b2e91b0139838f6"},{"path":"docs/_posts/ahmedlone127/2023-11-08-ner_gdpr_en.md","size":2479,"blob_sha":"95d9bf1cc15e4ba4f2dbd59e26c40d468a4c0d4e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English ner_gdpr BertForTokenClassification from buerokratt\nauthor: John Snow Labs\nname: ner_gdpr\ndate: 2023-11-08\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`ner_gdpr` is a English model originally trained by buerokratt.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/ner_gdpr_en_5.2.0_3.0_1699454308894.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/ner_gdpr_en_5.2.0_3.0_1699454308894.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = BertForTokenClassification.pretrained(\"ner_gdpr\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = BertForTokenClassification  \n    .pretrained(\"ner_gdpr\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|ner_gdpr|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|463.5 MB|\n\n## References\n\nhttps://huggingface.co/buerokratt/ner_gdpr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F364:3AC5A:180336:5E88EC:6AB92D83"},"text_sha256":"357beed49f2413e98dea7a5e65274daaa7e45b3062bd1b1e61702afb4aaadaad"},{"path":"docs/_posts/ahmedlone127/2023-11-16-legal_bert_base_cuad_en.md","size":2757,"blob_sha":"5a394cccbd6761a14e73764c95ab3804b1385d77","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_bert_base_cuad BertForQuestionAnswering from alex-apostolo\nauthor: John Snow Labs\nname: legal_bert_base_cuad\ndate: 2023-11-16\ntags: [bert, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_bert_base_cuad` is a English model originally trained by alex-apostolo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_bert_base_cuad_en_5.2.0_3.0_1700118130405.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_bert_base_cuad_en_5.2.0_3.0_1700118130405.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"legal_bert_base_cuad\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering  \n    .pretrained(\"legal_bert_base_cuad\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_bert_base_cuad|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|407.3 MB|\n\n## References\n\nhttps://huggingface.co/alex-apostolo/legal-bert-base-cuad","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CB0:3E1DA:17AF3D:5E355A:6AB92D83"},"text_sha256":"946dbd71c3ef9a51ee512e02463fdeccd37d0bd060025ee368d7cabfea5de09b"},{"path":"docs/_posts/ahmedlone127/2023-11-17-bert_finetuned_squad_legalbert_en.md","size":2820,"blob_sha":"4383799f2ed5bbbf18feec36fad0c80ef76ad310","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_finetuned_squad_legalbert BertForQuestionAnswering from Jasu\nauthor: John Snow Labs\nname: bert_finetuned_squad_legalbert\ndate: 2023-11-17\ntags: [bert, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_finetuned_squad_legalbert` is a English model originally trained by Jasu.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_finetuned_squad_legalbert_en_5.2.0_3.0_1700206944958.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_finetuned_squad_legalbert_en_5.2.0_3.0_1700206944958.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"bert_finetuned_squad_legalbert\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering  \n    .pretrained(\"bert_finetuned_squad_legalbert\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_finetuned_squad_legalbert|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|407.3 MB|\n\n## References\n\nhttps://huggingface.co/Jasu/bert-finetuned-squad-legalbert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:1853C9:5EDA4A:6AB92D84"},"text_sha256":"3eecce1bdf1d47b1d3bca49db78ea0521955424af66a29666aa5ae526d870f01"},{"path":"docs/_posts/ahmedlone127/2023-11-17-bert_large_question_answering_finetuned_legal_en.md","size":2989,"blob_sha":"402d4dd6d3314758f03fff770113d6a1b3661708","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_large_question_answering_finetuned_legal BertForQuestionAnswering from atharvamundada99\nauthor: John Snow Labs\nname: bert_large_question_answering_finetuned_legal\ndate: 2023-11-17\ntags: [bert, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_large_question_answering_finetuned_legal` is a English model originally trained by atharvamundada99.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_large_question_answering_finetuned_legal_en_5.2.0_3.0_1700180647015.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_large_question_answering_finetuned_legal_en_5.2.0_3.0_1700180647015.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"bert_large_question_answering_finetuned_legal\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering  \n    .pretrained(\"bert_large_question_answering_finetuned_legal\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_large_question_answering_finetuned_legal|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/atharvamundada99/bert-large-question-answering-finetuned-legal","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE1A:3E1C8:180201:5E86FE:6AB92D85"},"text_sha256":"05f5fba33a47574f958f86841667b3b706fe64b644023976ca4c2cf46c266a14"},{"path":"docs/_posts/ahmedlone127/2023-11-17-inlegalbert_cbp_lkg_qa_triples_w_context_finetuned_en.md","size":3015,"blob_sha":"2536f036400da7ee2eebf1b2156264068a6eacfe","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English inlegalbert_cbp_lkg_qa_triples_w_context_finetuned BertForQuestionAnswering from kinshuk-h\nauthor: John Snow Labs\nname: inlegalbert_cbp_lkg_qa_triples_w_context_finetuned\ndate: 2023-11-17\ntags: [bert, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`inlegalbert_cbp_lkg_qa_triples_w_context_finetuned` is a English model originally trained by kinshuk-h.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_qa_triples_w_context_finetuned_en_5.2.0_3.0_1700219140911.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/inlegalbert_cbp_lkg_qa_triples_w_context_finetuned_en_5.2.0_3.0_1700219140911.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"inlegalbert_cbp_lkg_qa_triples_w_context_finetuned\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering  \n    .pretrained(\"inlegalbert_cbp_lkg_qa_triples_w_context_finetuned\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|inlegalbert_cbp_lkg_qa_triples_w_context_finetuned|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|407.2 MB|\n\n## References\n\nhttps://huggingface.co/kinshuk-h/InLegalBERT-cbp-lkg-qa-triples-w-context-finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2090:3CC8A:17F1C0:5E7831:6AB92D84"},"text_sha256":"4bd38dd32bd8e4dccc0a7f623e29c076de111fb197d1bd26378ffbe15f41fe42"},{"path":"docs/_posts/ahmedlone127/2023-11-17-legal_document_question_answering_zh.md","size":2856,"blob_sha":"34608015d4a6fbdce5a653e53dbf61957a6d9de1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Chinese legal_document_question_answering BertForQuestionAnswering from NchuNLP\nauthor: John Snow Labs\nname: legal_document_question_answering\ndate: 2023-11-17\ntags: [bert, zh, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: zh\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_document_question_answering` is a Chinese model originally trained by NchuNLP.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_document_question_answering_zh_5.2.0_3.0_1700185572714.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_document_question_answering_zh_5.2.0_3.0_1700185572714.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"legal_document_question_answering\",\"zh\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering  \n    .pretrained(\"legal_document_question_answering\", \"zh\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_document_question_answering|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|zh|\n|Size:|381.0 MB|\n\n## References\n\nhttps://huggingface.co/NchuNLP/Legal-Document-Question-Answering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:1853D4:5EDA76:6AB92D85"},"text_sha256":"1c79e619edced660a18b28b7793a5b8e671f211293a0b8e9b113eba9b22dacee"},{"path":"docs/_posts/ahmedlone127/2023-11-18-distilbert_base_uncased_finetuned_eoir_privacy_en.md","size":3133,"blob_sha":"2f95c727701c9d9a700f7624d1d0e75220a8a376","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_base_uncased_finetuned_eoir_privacy DistilBertForSequenceClassification from pile-of-law\nauthor: John Snow Labs\nname: distilbert_base_uncased_finetuned_eoir_privacy\ndate: 2023-11-18\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_uncased_finetuned_eoir_privacy` is a English model originally trained by pile-of-law.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_eoir_privacy_en_5.2.0_3.0_1700351801285.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_eoir_privacy_en_5.2.0_3.0_1700351801285.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_finetuned_eoir_privacy\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_finetuned_eoir_privacy\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_uncased_finetuned_eoir_privacy|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.4 MB|\n\n## References\n\nhttps://huggingface.co/pile-of-law/distilbert-base-uncased-finetuned-eoir_privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4ADE:11E74B:17B6B6:5E3BB6:6AB92D85"},"text_sha256":"91b6df5d58eec36fbc9da2267611aeba98968f97cc4d8a035009a4c9c4172eab"},{"path":"docs/_posts/ahmedlone127/2023-11-18-distilbert_sequence_classifier_policy_distilbert_7d_en.md","size":3861,"blob_sha":"8cdab7d82dad2ac5b27a867d7a53adb8f6d22c3d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English DistilBertForSequenceClassification Cased model (from MoritzLaurer)\nauthor: John Snow Labs\nname: distilbert_sequence_classifier_policy_distilbert_7d\ndate: 2023-11-18\ntags: [distilbert, sequence_classification, open_source, en, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `policy-distilbert-7d` is a English model originally trained by `MoritzLaurer`.\n\n## Predicted Entities\n\n`economy`, `political system`, `welfare and quality of life`, `fabric of society`, `external relations`, `freedom and democracy`, `social groups`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_sequence_classifier_policy_distilbert_7d_en_5.2.0_3.0_1700337994808.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_sequence_classifier_policy_distilbert_7d_en_5.2.0_3.0_1700337994808.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n        .setInputCol(\"text\") \\\n        .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nsequenceClassifier_loaded = DistilBertForSequenceClassification.pretrained(\"distilbert_sequence_classifier_policy_distilbert_7d\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer,sequenceClassifier_loaded])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n          .setInputCol(\"text\") \n          .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval sequenceClassifier_loaded = DistilBertForSequenceClassification.pretrained(\"distilbert_sequence_classifier_policy_distilbert_7d\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer,sequenceClassifier_loaded))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.classify.distil_bert.by_moritzlaurer\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_sequence_classifier_policy_distilbert_7d|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|249.5 MB|\n|Case sensitive:|true|\n|Max sentence length:|128|\n\n## References\n\nReferences\n\n- https://huggingface.co/MoritzLaurer/policy-distilbert-7d\n- https://manifesto-project.wzb.eu/down/data/2020b/codebooks/codebook_MPDataset_MPDS2020b.pdf\n- https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_fscore_support.html\n- https://manifesto-project.wzb.eu/information/documents/information\n- https://manifesto-project.wzb.eu/datasets\n- https://scikit-learn.org/stable/modules/generated/sklearn.metrics.balanced_accuracy_score.html","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E28:18233:17BABB:5E3FDE:6AB92D86"},"text_sha256":"a1fbb2116ade46a2e82f6f8ef279728423129bdcbbcf72d2bbd5953709efb2d4"},{"path":"docs/_posts/ahmedlone127/2023-11-19-compliance_monitoring_oms_en.md","size":2938,"blob_sha":"8b64f0c12f5228a041cd017152db49bacbcd9eed","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English compliance_monitoring_oms DistilBertForSequenceClassification from Vineetttt\nauthor: John Snow Labs\nname: compliance_monitoring_oms\ndate: 2023-11-19\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`compliance_monitoring_oms` is a English model originally trained by Vineetttt.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/compliance_monitoring_oms_en_5.2.0_3.0_1700390529101.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/compliance_monitoring_oms_en_5.2.0_3.0_1700390529101.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"compliance_monitoring_oms\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"compliance_monitoring_oms\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|compliance_monitoring_oms|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/Vineetttt/compliance_monitoring_oms","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C908:3E724:181FF5:5EA5C1:6AB92D86"},"text_sha256":"92e13bdb379f3884e59daa2b39f5921dd1bf34f6d40ceeb4087e523fd4a8a94b"},{"path":"docs/_posts/ahmedlone127/2023-11-19-distilbert_fine_tuned_terms_en.md","size":2953,"blob_sha":"05aa3bb5ceba85dca768f0068f1313d8763c91b0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_fine_tuned_terms DistilBertForSequenceClassification from alexskrn\nauthor: John Snow Labs\nname: distilbert_fine_tuned_terms\ndate: 2023-11-19\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_fine_tuned_terms` is a English model originally trained by alexskrn.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_fine_tuned_terms_en_5.2.0_3.0_1700424950540.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_fine_tuned_terms_en_5.2.0_3.0_1700424950540.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_fine_tuned_terms\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_fine_tuned_terms\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_fine_tuned_terms|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/alexskrn/distilbert-fine-tuned-terms","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:179F4E:5E257C:6AB92D87"},"text_sha256":"e52368f7cbaf08319d57e376975f2945b6b0080d809d252b51d17f0252b12da4"},{"path":"docs/_posts/ahmedlone127/2023-11-20-cybersecurity_ner_v2_en.md","size":2626,"blob_sha":"ba3d89c291251d59a0795c6e287945d0deee4ac5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English cybersecurity_ner_v2 DistilBertForTokenClassification from sudipadhikari\nauthor: John Snow Labs\nname: cybersecurity_ner_v2\ndate: 2023-11-20\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`cybersecurity_ner_v2` is a English model originally trained by sudipadhikari.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_v2_en_5.2.0_3.0_1700520525724.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_v2_en_5.2.0_3.0_1700520525724.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"cybersecurity_ner_v2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"cybersecurity_ner_v2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|cybersecurity_ner_v2|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/sudipadhikari/cybersecurity_ner-v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D2C:3CC8A:17F1D8:5E787E:6AB92D86"},"text_sha256":"4d7252f74730b38a70ca222825c842529d83763a350ed58408ab930b53e69eca"},{"path":"docs/_posts/ahmedlone127/2023-11-20-distilbert_fine_tuned_terms_v2_en.md","size":2980,"blob_sha":"88df8a6de9ed255f37a84921968998c1dd7b915f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_fine_tuned_terms_v2 DistilBertForSequenceClassification from alexskrn\nauthor: John Snow Labs\nname: distilbert_fine_tuned_terms_v2\ndate: 2023-11-20\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_fine_tuned_terms_v2` is a English model originally trained by alexskrn.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_fine_tuned_terms_v2_en_5.2.0_3.0_1700460229264.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_fine_tuned_terms_v2_en_5.2.0_3.0_1700460229264.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_fine_tuned_terms_v2\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_fine_tuned_terms_v2\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_fine_tuned_terms_v2|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/alexskrn/distilbert-fine-tuned-terms_v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DE86:3CC8A:17F1DB:5E788B:6AB92D87"},"text_sha256":"e1dbb7b4c0ea5fa01a35d304f5e034c832e7fc912fb994db6eaa3b0228f03f1d"},{"path":"docs/_posts/ahmedlone127/2023-11-20-distilbert_finetuned_ai4privacy_isotonic_en.md","size":2782,"blob_sha":"1b7b45f1fdf48f6585014d09bae31fcb32cff953","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_finetuned_ai4privacy_isotonic DistilBertForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: distilbert_finetuned_ai4privacy_isotonic\ndate: 2023-11-20\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_finetuned_ai4privacy_isotonic` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_isotonic_en_5.2.0_3.0_1700519894965.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_isotonic_en_5.2.0_3.0_1700519894965.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_finetuned_ai4privacy_isotonic\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"distilbert_finetuned_ai4privacy_isotonic\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_finetuned_ai4privacy_isotonic|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.6 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/distilbert_finetuned_ai4privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1A6E:35EBC:179F61:5E25A0:6AB92D86"},"text_sha256":"9daa7ab6d18ba00e5a181169c6e599c6e52ba05530f7087cea6da035cf1b7297"},{"path":"docs/_posts/ahmedlone127/2023-11-21-bert_cybersecurity_ner_en.md","size":2635,"blob_sha":"0f1202cea1d4270cbff72fb31bc6fb9fc1fdc545","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_cybersecurity_ner DistilBertForTokenClassification from danitamayo\nauthor: John Snow Labs\nname: bert_cybersecurity_ner\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_cybersecurity_ner` is a English model originally trained by danitamayo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_cybersecurity_ner_en_5.2.0_3.0_1700525254778.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_cybersecurity_ner_en_5.2.0_3.0_1700525254778.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"bert_cybersecurity_ner\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"bert_cybersecurity_ner\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_cybersecurity_ner|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/danitamayo/bert-cybersecurity-NER","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B5EC:3BCC6:17EB91:5E71D3:6AB92D88"},"text_sha256":"f37f14c63af1ea6f6ca20dbab522fe7bd4e1667e512196071d0f3e07172fd4ea"},{"path":"docs/_posts/ahmedlone127/2023-11-21-cybersecurity_ner_bnsapa_en.md","size":2634,"blob_sha":"799b45b9f45263a267942fcfb883ff19cb97d9eb","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English cybersecurity_ner_bnsapa DistilBertForTokenClassification from bnsapa\nauthor: John Snow Labs\nname: cybersecurity_ner_bnsapa\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`cybersecurity_ner_bnsapa` is a English model originally trained by bnsapa.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_bnsapa_en_5.2.0_3.0_1700548582368.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_bnsapa_en_5.2.0_3.0_1700548582368.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"cybersecurity_ner_bnsapa\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"cybersecurity_ner_bnsapa\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|cybersecurity_ner_bnsapa|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/bnsapa/cybersecurity-ner","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"472E:11316A:17F114:5E769B:6AB92D88"},"text_sha256":"8acb404d7cfa69b2dfe1daf683b28dd10dbd693ba82fb8805dbb96b3636e37a1"},{"path":"docs/_posts/ahmedlone127/2023-11-21-cybersecurity_ner_sudipadhikari_en.md","size":2711,"blob_sha":"92cde17c3d2b49e095d38a7f2ad619e692cf0199","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English cybersecurity_ner_sudipadhikari DistilBertForTokenClassification from sudipadhikari\nauthor: John Snow Labs\nname: cybersecurity_ner_sudipadhikari\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`cybersecurity_ner_sudipadhikari` is a English model originally trained by sudipadhikari.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_sudipadhikari_en_5.2.0_3.0_1700530787903.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/cybersecurity_ner_sudipadhikari_en_5.2.0_3.0_1700530787903.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"cybersecurity_ner_sudipadhikari\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"cybersecurity_ner_sudipadhikari\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|cybersecurity_ner_sudipadhikari|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/sudipadhikari/cybersecurity_ner","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"CF66:3AC15:1814E8:5E9A1F:6AB92D89"},"text_sha256":"1f61b5fd028ac33bd03c4c5c42e2882460fb68dc6ab1f4e0d76db4079ff23e88"},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_finetuned_ai4privacy_50k_en.md","size":2746,"blob_sha":"2acd8399e7144965b13bca228bd14cc7bab02e1a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_finetuned_ai4privacy_50k DistilBertForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: distilbert_finetuned_ai4privacy_50k\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_finetuned_ai4privacy_50k` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_50k_en_5.2.0_3.0_1700576951848.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_50k_en_5.2.0_3.0_1700576951848.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_finetuned_ai4privacy_50k\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"distilbert_finetuned_ai4privacy_50k\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_finetuned_ai4privacy_50k|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.6 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/distilbert_finetuned_ai4privacy_50k","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CB4:7A4F8:1842F0:5EC9E8:6AB92D8A"},"text_sha256":"d4282130c347f42c8d2146825be678f803162db234a4d2053ab1a8f91862fcca"},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_finetuned_ai4privacy_singhtanmay6735_en.md","size":2859,"blob_sha":"c12834ae911b99cecf4245d2cdcda2a80177065c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_finetuned_ai4privacy_singhtanmay6735 DistilBertForTokenClassification from singhtanmay6735\nauthor: John Snow Labs\nname: distilbert_finetuned_ai4privacy_singhtanmay6735\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_finetuned_ai4privacy_singhtanmay6735` is a English model originally trained by singhtanmay6735.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_singhtanmay6735_en_5.2.0_3.0_1700540909754.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_finetuned_ai4privacy_singhtanmay6735_en_5.2.0_3.0_1700540909754.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_finetuned_ai4privacy_singhtanmay6735\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"distilbert_finetuned_ai4privacy_singhtanmay6735\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_finetuned_ai4privacy_singhtanmay6735|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.6 MB|\n\n## References\n\nhttps://huggingface.co/singhtanmay6735/distilbert_finetuned_ai4privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5410:2E8679:17DE54:5E628C:6AB92D8A"},"text_sha256":"f6d4a4dd5fba615a68221230083bbdf15cf160196ab0b46269f177d2248bc2de"},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_legal_chunk_en.md","size":2644,"blob_sha":"42d3dc452ad5e1f72e45ac679ea4cb8a146f1409","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_legal_chunk DistilBertForTokenClassification from SpectaclesLLC\nauthor: John Snow Labs\nname: distilbert_legal_chunk\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_legal_chunk` is a English model originally trained by SpectaclesLLC.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_legal_chunk_en_5.2.0_3.0_1700547400127.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_legal_chunk_en_5.2.0_3.0_1700547400127.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_legal_chunk\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"distilbert_legal_chunk\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_legal_chunk|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|243.8 MB|\n\n## References\n\nhttps://huggingface.co/SpectaclesLLC/distilbert-legal-chunk","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCB6:38C7FC:180243:5AB3C1:6AB92D8A"},"text_sha256":"c9908a6bbf9c415f9470c6bb4ea84737a01fd395b99334db001cec9813a0e4ac"},{"path":"docs/_posts/ahmedlone127/2023-11-21-distilbert_legal_definitions_en.md","size":2698,"blob_sha":"e641819b8af7c6268b6e128ba7251038c745f41a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_legal_definitions DistilBertForTokenClassification from SpectaclesLLC\nauthor: John Snow Labs\nname: distilbert_legal_definitions\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_legal_definitions` is a English model originally trained by SpectaclesLLC.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_legal_definitions_en_5.2.0_3.0_1700543003113.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_legal_definitions_en_5.2.0_3.0_1700543003113.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_legal_definitions\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"distilbert_legal_definitions\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_legal_definitions|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|243.8 MB|\n\n## References\n\nhttps://huggingface.co/SpectaclesLLC/distilbert-legal-definitions","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D3C:3B6DE:1780C5:5E06AF:6AB92D8B"},"text_sha256":"14e8b774f5ac97579fcec5927feda7a45e1a866ab7c30b9009b5864897d7bc6e"},{"path":"docs/_posts/ahmedlone127/2023-11-21-fine_tuned_cybersecurity_ner_en.md","size":2680,"blob_sha":"d9c455e0b27a949c6a166f0c15ad298b1c1ab565","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English fine_tuned_cybersecurity_ner DistilBertForTokenClassification from Abiral7\nauthor: John Snow Labs\nname: fine_tuned_cybersecurity_ner\ndate: 2023-11-21\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`fine_tuned_cybersecurity_ner` is a English model originally trained by Abiral7.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/fine_tuned_cybersecurity_ner_en_5.2.0_3.0_1700538826843.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/fine_tuned_cybersecurity_ner_en_5.2.0_3.0_1700538826843.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"fine_tuned_cybersecurity_ner\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"fine_tuned_cybersecurity_ner\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|fine_tuned_cybersecurity_ner|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/Abiral7/fine-tuned-cybersecurity-ner","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E1B6:B08CF:17616C:5DE8B2:6AB92D88"},"text_sha256":"62e769374fa46b92b26f3d894dd1c1db38c605c614576f78c08af2679d38089f"},{"path":"docs/_posts/ahmedlone127/2023-11-22-fine_tuned_cybersecurity_ner2_en.md","size":2689,"blob_sha":"1c4107b1ddaf8dbd2933c9e29e1012160202e27d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English fine_tuned_cybersecurity_ner2 DistilBertForTokenClassification from Abiral7\nauthor: John Snow Labs\nname: fine_tuned_cybersecurity_ner2\ndate: 2023-11-22\ntags: [bert, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`fine_tuned_cybersecurity_ner2` is a English model originally trained by Abiral7.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/fine_tuned_cybersecurity_ner2_en_5.2.0_3.0_1700620715184.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/fine_tuned_cybersecurity_ner2_en_5.2.0_3.0_1700620715184.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"documents\")\n    \n    \ntokenClassifier = DistilBertForTokenClassification.pretrained(\"fine_tuned_cybersecurity_ner2\",\"en\") \\\n            .setInputCols([\"documents\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"embeddings\")\n    \nval tokenClassifier = DistilBertForTokenClassification  \n    .pretrained(\"fine_tuned_cybersecurity_ner2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|fine_tuned_cybersecurity_ner2|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|247.3 MB|\n\n## References\n\nhttps://huggingface.co/Abiral7/fine-tuned-cybersecurity-ner2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B8E:285814:174897:5DCEE8:6AB92D8B"},"text_sha256":"baf7c1d169ebe12f600a4ebc33e2a62c5e774865fe42a680fbc286fc6658de2d"},{"path":"docs/_posts/ahmedlone127/2023-11-26-distilbert_base_uncased_finetuned_legal_data_en.md","size":2991,"blob_sha":"a87140c239cd449108508d08d1367a92c5136ecb","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_base_uncased_finetuned_legal_data DistilBertForQuestionAnswering from MariamD\nauthor: John Snow Labs\nname: distilbert_base_uncased_finetuned_legal_data\ndate: 2023-11-26\ntags: [distilbert, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_uncased_finetuned_legal_data` is a English model originally trained by MariamD.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_legal_data_en_5.2.0_3.0_1701016348121.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_legal_data_en_5.2.0_3.0_1701016348121.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = DistilBertForQuestionAnswering.pretrained(\"distilbert_base_uncased_finetuned_legal_data\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = DistilBertForQuestionAnswering  \n    .pretrained(\"distilbert_base_uncased_finetuned_legal_data\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_uncased_finetuned_legal_data|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|247.2 MB|\n\n## References\n\nhttps://huggingface.co/MariamD/distilbert-base-uncased-finetuned-legal_data","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E06:35EBC:179F98:5E263C:6AB92D8C"},"text_sha256":"5690f3e60dfa09753d496ea3a75e4618b128e8b505cb2869e9fb9c90120615d2"},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_autotrain_security_texts_classification_688020754_en.md","size":3429,"blob_sha":"3cf236a4967130932d3552ac9950d7324974d513","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English RoBertaForSequenceClassification Cased model (from vlsb)\nauthor: John Snow Labs\nname: roberta_classifier_autotrain_security_texts_classification_688020754\ndate: 2023-11-29\ntags: [en, open_source, roberta, sequence_classification, classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-security-texts-classification-roberta-688020754` is a English model originally trained by `vlsb`.\n\n## Predicted Entities\n\n`irrelevant`, `relevant`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_classifier_autotrain_security_texts_classification_688020754_en_5.2.0_3.0_1701220929000.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_classifier_autotrain_security_texts_classification_688020754_en_5.2.0_3.0_1701220929000.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nseq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_autotrain_security_texts_classification_688020754\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, seq_classifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n      .setInputCols(Array(\"text\"))\n      .setOutputCols(Array(\"document\"))\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval seq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_autotrain_security_texts_classification_688020754\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, seq_classifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.classify.roberta.security_text.\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_classifier_autotrain_security_texts_classification_688020754|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|439.6 MB|\n|Case sensitive:|true|\n|Max sentence length:|256|\n\n## References\n\nReferences\n\n- https://huggingface.co/vlsb/autotrain-security-texts-classification-roberta-688020754","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D066:40B0C:17F3C3:5E7AC7:6AB92D8C"},"text_sha256":"f326c8775a7c61097eb9fd25046a03b798b2bab455187a60448909176826d1ff"},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_autotrain_security_texts_classification_distil_688220764_en.md","size":3492,"blob_sha":"2061aa0d97cb3fb8c4f36d8905743dd935b7c659","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English RoBertaForSequenceClassification Cased model (from vlsb)\nauthor: John Snow Labs\nname: roberta_classifier_autotrain_security_texts_classification_distil_688220764\ndate: 2023-11-29\ntags: [en, open_source, roberta, sequence_classification, classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-security-texts-classification-distilroberta-688220764` is a English model originally trained by `vlsb`.\n\n## Predicted Entities\n\n`irrelevant`, `relevant`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_classifier_autotrain_security_texts_classification_distil_688220764_en_5.2.0_3.0_1701220222735.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_classifier_autotrain_security_texts_classification_distil_688220764_en_5.2.0_3.0_1701220222735.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nseq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_autotrain_security_texts_classification_distil_688220764\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, seq_classifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n      .setInputCols(Array(\"text\"))\n      .setOutputCols(Array(\"document\"))\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval seq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_autotrain_security_texts_classification_distil_688220764\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, seq_classifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.classify.roberta.security_text.distilled\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_classifier_autotrain_security_texts_classification_distil_688220764|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|309.0 MB|\n|Case sensitive:|true|\n|Max sentence length:|256|\n\n## References\n\nReferences\n\n- https://huggingface.co/vlsb/autotrain-security-texts-classification-distilroberta-688220764","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E1CC:3BF56:176FF2:5DF6F2:6AB92D8C"},"text_sha256":"e0f4d321fcb870b240cf15ffb2cbfb7c84f523ea13914cb90176dad3244fb079"},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_covid_policy_21_en.md","size":3722,"blob_sha":"e74f1887b39c1dccf9bd4adcc80f7cfddc76a3a4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English RobertaForSequenceClassification Cased model (from MoritzLaurer)\nauthor: John Snow Labs\nname: roberta_classifier_covid_policy_21\ndate: 2023-11-29\ntags: [en, open_source, roberta, sequence_classification, classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RobertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `covid-policy-roberta-21` is a English model originally trained by `MoritzLaurer`.\n\n## Predicted Entities\n\n`Quarantine`, `Health Monitoring`, `Lockdown`, `Restrictions of Mass Gatherings`, `Health Testing`, `Public Awareness Measures`, `Closure and Regulation of Schools`, `Restriction and Regulation of Businesses`, `COVID-19 Vaccines`, `Other Policy Not Listed Above`, `Internal Border Restrictions`, `Restriction and Regulation of Government Services`, `Curfew`, `Social Distancing`, `Health Resources`, `External Border Restrictions`, `Anti-Disinformation Measures`, `Hygiene`, `Other`, `Declaration of Emergency`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_classifier_covid_policy_21_en_5.2.0_3.0_1701222254481.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_classifier_covid_policy_21_en_5.2.0_3.0_1701222254481.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nseq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_covid_policy_21\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, seq_classifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n      .setInputCols(Array(\"text\"))\n      .setOutputCols(Array(\"document\"))\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval seq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_covid_policy_21\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, seq_classifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.classify.roberta.covid.by_moritzlaurer\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_classifier_covid_policy_21|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|309.1 MB|\n|Case sensitive:|true|\n|Max sentence length:|256|\n\n## References\n\nReferences\n\n- https://huggingface.co/MoritzLaurer/covid-policy-roberta-21\n- https://www.ceps.eu/ceps-staff/moritz-laurer/","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C720:3D40A:174005:5DC6B9:6AB92D8A"},"text_sha256":"f21c5801db04c37741d43afb6b07c532663899da2fb35fd90bd410e709bcfc37"},{"path":"docs/_posts/ahmedlone127/2023-11-29-roberta_classifier_policyberta_7d_en.md","size":3525,"blob_sha":"5cc91151761faf08c67eb8f5dfcdc0b088b5c463","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English RobertaForSequenceClassification Cased model (from niksmer)\nauthor: John Snow Labs\nname: roberta_classifier_policyberta_7d\ndate: 2023-11-29\ntags: [en, open_source, roberta, sequence_classification, classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RobertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `PolicyBERTa-7d` is a English model originally trained by `niksmer`.\n\n## Predicted Entities\n\n`welfare and quality of life`, `fabric of society`, `external relations`, `freedom and democracy`, `economy`, `political system`, `social groups`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_classifier_policyberta_7d_en_5.2.0_3.0_1701233188536.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_classifier_policyberta_7d_en_5.2.0_3.0_1701233188536.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nseq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_policyberta_7d\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"class\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, seq_classifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n      .setInputCols(Array(\"text\"))\n      .setOutputCols(Array(\"document\"))\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval seq_classifier = RoBertaForSequenceClassification.pretrained(\"roberta_classifier_policyberta_7d\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, seq_classifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.classify.policyberta.by_niksmer\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_classifier_policyberta_7d|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|457.4 MB|\n|Case sensitive:|true|\n|Max sentence length:|256|\n\n## References\n\nReferences\n\n- https://huggingface.co/niksmer/PolicyBERTa-7d\n- https://manifesto-project.wzb.eu/\n- https://manifesto-project.wzb.eu/datasets\n- https://manifesto-project.wzb.eu/down/papers/handbook_2021_version_5.pdf\n- https://manifesto-project.wzb.eu/down/tutorials/main-dataset.html#measuring-parties-left-right-positions","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6722:3E1DA:17AF74:5E3680:6AB92D8D"},"text_sha256":"8f91478b001af1adba62865740fca52be3cb6d2beaa62bc3f630c9ab60b8a35c"},{"path":"docs/_posts/ahmedlone127/2023-11-30-opp_115_privacy_contact_information_en.md","size":3016,"blob_sha":"5ffd325e3545c914f869663edecdba17e66cc4ba","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English opp_115_privacy_contact_information RoBertaForSequenceClassification from jakariamd\nauthor: John Snow Labs\nname: opp_115_privacy_contact_information\ndate: 2023-11-30\ntags: [roberta, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`opp_115_privacy_contact_information` is a English model originally trained by jakariamd.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/opp_115_privacy_contact_information_en_5.2.0_3.0_1701346370927.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/opp_115_privacy_contact_information_en_5.2.0_3.0_1701346370927.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = RoBertaForSequenceClassification.pretrained(\"opp_115_privacy_contact_information\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = RoBertaForSequenceClassification.pretrained(\"opp_115_privacy_contact_information\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|opp_115_privacy_contact_information|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|468.5 MB|\n\n## References\n\nhttps://huggingface.co/jakariamd/opp_115_privacy_contact_information","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1836:2B291E:185431:5EDBA6:6AB92D8E"},"text_sha256":"1ff356ceb200b2e7d070dafe44b716590fc66d13dbbf3dc1d369dec3fc24c593"},{"path":"docs/_posts/ahmedlone127/2023-11-30-privacy_intent_en.md","size":2824,"blob_sha":"bee89ff8bf3b28b216e53304ddb97dde196dcaf2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English privacy_intent RoBertaForSequenceClassification from remzicam\nauthor: John Snow Labs\nname: privacy_intent\ndate: 2023-11-30\ntags: [roberta, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`privacy_intent` is a English model originally trained by remzicam.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/privacy_intent_en_5.2.0_3.0_1701351223346.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/privacy_intent_en_5.2.0_3.0_1701351223346.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = RoBertaForSequenceClassification.pretrained(\"privacy_intent\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = RoBertaForSequenceClassification.pretrained(\"privacy_intent\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|privacy_intent|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|468.5 MB|\n\n## References\n\nhttps://huggingface.co/remzicam/privacy_intent","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:17401D:5DC71D:6AB92D8D"},"text_sha256":"2764ea03171ad2dbcc16e7c6c6f1a7b00a59426d9939bcd95a5b3a96e71076a9"},{"path":"docs/_posts/ahmedlone127/2023-12-02-legal_components_roberta_en.md","size":2914,"blob_sha":"b13121dc1f050df531c0330b5bb1f594927fafc5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_components_roberta RoBertaForSequenceClassification from nihiluis\nauthor: John Snow Labs\nname: legal_components_roberta\ndate: 2023-12-02\ntags: [roberta, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_components_roberta` is a English model originally trained by nihiluis.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_components_roberta_en_5.2.0_3.0_1701487273799.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_components_roberta_en_5.2.0_3.0_1701487273799.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = RoBertaForSequenceClassification.pretrained(\"legal_components_roberta\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = RoBertaForSequenceClassification.pretrained(\"legal_components_roberta\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_components_roberta|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|468.0 MB|\n\n## References\n\nhttps://huggingface.co/nihiluis/legal-components-roberta","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185436:5EDBC3:6AB92D8D"},"text_sha256":"875aafa930e5fd55406f119990e845c9a4366558bd826e80b6e1dc799e6d9c19"},{"path":"docs/_posts/ahmedlone127/2023-12-02-roberta_large_legal_v2_en.md","size":2894,"blob_sha":"c5d7a4dbb48cd46b39e077722e71e38937119ca4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_large_legal_v2 RoBertaForSequenceClassification from timoneda\nauthor: John Snow Labs\nname: roberta_large_legal_v2\ndate: 2023-12-02\ntags: [roberta, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_large_legal_v2` is a English model originally trained by timoneda.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_legal_v2_en_5.2.0_3.0_1701499737843.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_legal_v2_en_5.2.0_3.0_1701499737843.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = RoBertaForSequenceClassification.pretrained(\"roberta_large_legal_v2\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = RoBertaForSequenceClassification.pretrained(\"roberta_large_legal_v2\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_legal_v2|\n|Compatibility:|Spark NLP 5.2.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/timoneda/roberta-large-legal-v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"21C8:40CE8:18188C:5E9F05:6AB92D8E"},"text_sha256":"daa347af829552569462d3ff0eab939447332e89a1c4550c1677d74c6169b7cb"},{"path":"docs/_posts/ahmedlone127/2023-12-13-mitre_cybersecurity_en.md","size":2818,"blob_sha":"252a14c92390b403271d9402a5b0f2e59243824d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mitre_cybersecurity RoBertaForTokenClassification from barghavani\nauthor: John Snow Labs\nname: mitre_cybersecurity\ndate: 2023-12-13\ntags: [roberta, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mitre_cybersecurity` is a English model originally trained by barghavani.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mitre_cybersecurity_en_5.2.1_3.0_1702511156931.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mitre_cybersecurity_en_5.2.1_3.0_1702511156931.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\\n        .setInputCols([\"document\"]) \\\n        .setOutputCol(\"token\")\n        \n    \ntokenClassifier = RoBertaForTokenClassification.pretrained(\"mitre_cybersecurity\",\"en\") \\\n            .setInputCols([\"document\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n\nval tokenizer = Tokenizer() \\\n        .setInputCols(Array(\"document\")) \\\n        .setOutputCol(\"token\")\n\nval tokenClassifier = RoBertaForTokenClassification  \n    .pretrained(\"mitre_cybersecurity\", \"en\")\n    .setInputCols(Array(\"document\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mitre_cybersecurity|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|466.1 MB|\n\n## References\n\nhttps://huggingface.co/barghavani/MITRE_cybersecurity","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:174032:5DC74F:6AB92D8F"},"text_sha256":"78914254785938b212aeaa2964c8768551cc49fae6016ad7646ee53924f8f0f3"},{"path":"docs/_posts/ahmedlone127/2023-12-13-roberta_ner_roberta_large_legal_act_extraction_en.md","size":4235,"blob_sha":"209e5a6d5458dfcd2e81d733330db47326affb5f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English RobertaForTokenClassification Large Cased model (from Lexemo)\nauthor: John Snow Labs\nname: roberta_ner_roberta_large_legal_act_extraction\ndate: 2023-12-13\ntags: [bert, ner, open_source, en, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RobertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `roberta_large_legal_act_extraction` is a English model originally trained by `Lexemo`.\n\n## Predicted Entities\n\n`another_act_sequence_start`, `another_act_equal_previous_act`, `article_relevant_previous_act`, `abbreviation_relevant_following_act`, `article_relevant_following_act`, `article_current`, `service_label`, `another_act_abbreviation`, `abbreviation_relevant_previous_act`, `article_relevant_previous_act_range_start`, `another_article_equal_previous_article`, `article_relevant_previous_act_range_end`, `article_relevant_current_act`, `article_relevant_current_act_range_start`, `article_relevant_current_act_range_end`, `article_relevant_following_act_range_end`, `article_relevant_following_act_range_start`, `another_act_sequence_end`, `another_act`, `current_act`, `treaty_name`, `treaty_abbreviation`\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_ner_roberta_large_legal_act_extraction_en_5.2.1_3.0_1702503657760.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_ner_roberta_large_legal_act_extraction_en_5.2.1_3.0_1702503657760.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n        .setInputCol(\"text\") \\\n        .setOutputCol(\"document\")\n\nsentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\\\n       .setInputCols([\"document\"])\\\n       .setOutputCol(\"sentence\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"sentence\") \\\n    .setOutputCol(\"token\")\n\ntokenClassifier = BertForTokenClassification.pretrained(\"roberta_ner_roberta_large_legal_act_extraction\",\"en\") \\\n    .setInputCols([\"sentence\", \"token\"]) \\\n    .setOutputCol(\"ner\")\n\npipeline = Pipeline(stages=[documentAssembler, sentenceDetector, tokenizer, tokenClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n          .setInputCol(\"text\") \n          .setOutputCol(\"document\")\n\nval sentenceDetector = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n       .setInputCols(Array(\"document\"))\n       .setOutputCol(\"sentence\")\n\nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"sentence\"))\n    .setOutputCol(\"token\")\n\nval tokenClassifier = BertForTokenClassification.pretrained(\"roberta_ner_roberta_large_legal_act_extraction\",\"en\") \n    .setInputCols(Array(\"sentence\", \"token\")) \n    .setOutputCol(\"ner\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler,sentenceDetector, tokenizer, tokenClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.ner.roberta.large_legal\").predict(\"\"\"PUT YOUR STRING HERE\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_ner_roberta_large_legal_act_extraction|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|1.3 GB|\n|Case sensitive:|true|\n|Max sentence length:|128|\n\n## References\n\nReferences\n\n- https://huggingface.co/Lexemo/roberta_large_legal_act_extraction","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6186:285814:1748BD:5DCF84:6AB92D90"},"text_sha256":"a502da9faa9f792fc3b6e8ace5c0aaa35b9624f23857af1c27374cbca2446a83"},{"path":"docs/_posts/ahmedlone127/2023-12-13-social_policy_roberta_en.md","size":2822,"blob_sha":"73b4c7186a5df1690ee2de570a730b9e8906e730","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English social_policy_roberta RoBertaForTokenClassification from GiladH\nauthor: John Snow Labs\nname: social_policy_roberta\ndate: 2023-12-13\ntags: [roberta, en, open_source, token_classification, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`social_policy_roberta` is a English model originally trained by GiladH.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/social_policy_roberta_en_5.2.1_3.0_1702510864717.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/social_policy_roberta_en_5.2.1_3.0_1702510864717.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\\n        .setInputCols([\"document\"]) \\\n        .setOutputCol(\"token\")\n        \n    \ntokenClassifier = RoBertaForTokenClassification.pretrained(\"social_policy_roberta\",\"en\") \\\n            .setInputCols([\"document\",\"token\"]) \\\n            .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n\nval tokenizer = Tokenizer() \\\n        .setInputCols(Array(\"document\")) \\\n        .setOutputCol(\"token\")\n\nval tokenClassifier = RoBertaForTokenClassification  \n    .pretrained(\"social_policy_roberta\", \"en\")\n    .setInputCols(Array(\"document\",\"token\")) \n    .setOutputCol(\"ner\") \n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|social_policy_roberta|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/GiladH/social_policy_roberta","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B63A:2B291E:185446:5EDC27:6AB92D90"},"text_sha256":"81b442bb45a5a2bbd6f033614b293120376051536efa7754fff8f98852563070"},{"path":"docs/_posts/ahmedlone127/2023-12-22-legal_qa_en.md","size":2640,"blob_sha":"31faf121f1aa52f2b426a8bcc8115f7f1f97eb59","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_qa RoBertaForQuestionAnswering from Beri\nauthor: John Snow Labs\nname: legal_qa\ndate: 2023-12-22\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_qa` is a English model originally trained by Beri.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_qa_en_5.2.1_3.0_1703285371740.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_qa_en_5.2.1_3.0_1703285371740.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"legal_qa\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"legal_qa\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_qa|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|447.4 MB|\n\n## References\n\nhttps://huggingface.co/Beri/legal-qa","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:18544B:5EDC37:6AB92D8F"},"text_sha256":"cae1f31e75a977d7e5c5f2ebf2ed2e477d91c1cd96470489a5fd400bfe5544cf"},{"path":"docs/_posts/ahmedlone127/2023-12-22-legal_roberta_base_cuad_en.md","size":2802,"blob_sha":"788bef2241727339b0bf999820a8e2e3a5183bb4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_base_cuad RoBertaForQuestionAnswering from alex-apostolo\nauthor: John Snow Labs\nname: legal_roberta_base_cuad\ndate: 2023-12-22\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_base_cuad` is a English model originally trained by alex-apostolo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_base_cuad_en_5.2.1_3.0_1703286095259.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_base_cuad_en_5.2.1_3.0_1703286095259.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"legal_roberta_base_cuad\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"legal_roberta_base_cuad\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_base_cuad|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|466.0 MB|\n\n## References\n\nhttps://huggingface.co/alex-apostolo/legal-roberta-base-cuad","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77C8:35999:17ABBA:5E340A:6AB92D90"},"text_sha256":"6c6fcc7266cd06ea8db04961977d823442a07006e50ab4bd64eeee3ab0c99824"},{"path":"docs/_posts/ahmedlone127/2023-12-22-roberta_finetuned_qa_policy_2_ppsingh_en.md","size":2902,"blob_sha":"17798a5eb2de0b92929b943fbd70f860f720720f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_finetuned_qa_policy_2_ppsingh RoBertaForQuestionAnswering from ppsingh\nauthor: John Snow Labs\nname: roberta_finetuned_qa_policy_2_ppsingh\ndate: 2023-12-22\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_qa_policy_2_ppsingh` is a English model originally trained by ppsingh.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_2_ppsingh_en_5.2.1_3.0_1703287808464.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_2_ppsingh_en_5.2.1_3.0_1703287808464.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"roberta_finetuned_qa_policy_2_ppsingh\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"roberta_finetuned_qa_policy_2_ppsingh\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_qa_policy_2_ppsingh|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|464.0 MB|\n\n## References\n\nhttps://huggingface.co/ppsingh/roberta-finetuned-qa-policy_2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185453:5EDC56:6AB92D8F"},"text_sha256":"c264280bb94fa7d5fa28f2b7c35eb3d443981859e70a9db0c95bb23a8b153a8b"},{"path":"docs/_posts/ahmedlone127/2023-12-23-roberta_finetuned_qa_policy_0_1_en.md","size":2856,"blob_sha":"7f94a2c4d817be293a5ff06462d7e7a31734c125","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_finetuned_qa_policy_0_1 RoBertaForQuestionAnswering from ppsingh\nauthor: John Snow Labs\nname: roberta_finetuned_qa_policy_0_1\ndate: 2023-12-23\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_qa_policy_0_1` is a English model originally trained by ppsingh.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_0_1_en_5.2.1_3.0_1703355124609.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_0_1_en_5.2.1_3.0_1703355124609.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"roberta_finetuned_qa_policy_0_1\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"roberta_finetuned_qa_policy_0_1\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_qa_policy_0_1|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|463.8 MB|\n\n## References\n\nhttps://huggingface.co/ppsingh/roberta-finetuned-qa-policy_0.1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D292:3B6DE:1780FE:5E07E0:6AB92D8F"},"text_sha256":"e881d3072ebffbea15f022c6a1c6d618889de8abec8e04b7dae49f19fbbe3dcd"},{"path":"docs/_posts/ahmedlone127/2023-12-23-roberta_finetuned_qa_policy_short_en.md","size":2880,"blob_sha":"0e81da09265d0f56bac8f1b1585210ad752b8610","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_finetuned_qa_policy_short RoBertaForQuestionAnswering from peter2000\nauthor: John Snow Labs\nname: roberta_finetuned_qa_policy_short\ndate: 2023-12-23\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_qa_policy_short` is a English model originally trained by peter2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_short_en_5.2.1_3.0_1703363983617.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_short_en_5.2.1_3.0_1703363983617.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"roberta_finetuned_qa_policy_short\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"roberta_finetuned_qa_policy_short\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_qa_policy_short|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|463.9 MB|\n\n## References\n\nhttps://huggingface.co/peter2000/roberta-finetuned-qa-policy_short","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAB2:345ED4:17A66A:5E2D2D:6AB92D92"},"text_sha256":"6da47127a2242b240323003a57db4e9661aec120e8b90bed9202304127de8f0c"},{"path":"docs/_posts/ahmedlone127/2023-12-24-roberta_finetuned_qa_policy_2_peter2000_en.md","size":2924,"blob_sha":"e714e51b2b8dbc5dacee0b366f08df4f5b9894e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_finetuned_qa_policy_2_peter2000 RoBertaForQuestionAnswering from peter2000\nauthor: John Snow Labs\nname: roberta_finetuned_qa_policy_2_peter2000\ndate: 2023-12-24\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_qa_policy_2_peter2000` is a English model originally trained by peter2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_2_peter2000_en_5.2.1_3.0_1703390219298.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_2_peter2000_en_5.2.1_3.0_1703390219298.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"roberta_finetuned_qa_policy_2_peter2000\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"roberta_finetuned_qa_policy_2_peter2000\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_qa_policy_2_peter2000|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|463.9 MB|\n\n## References\n\nhttps://huggingface.co/peter2000/roberta-finetuned-qa-policy_2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C82:18CDF1:179DB7:565233:6AB92D92"},"text_sha256":"7298e9fc6f8832c98bf6e82aec866a2ba24c218af81ec58058b7ae36d46c94c4"},{"path":"docs/_posts/ahmedlone127/2023-12-24-roberta_finetuned_qa_policy_long_en.md","size":2871,"blob_sha":"4c66ef6b601709674ff20b39b8e017590e112675","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_finetuned_qa_policy_long RoBertaForQuestionAnswering from peter2000\nauthor: John Snow Labs\nname: roberta_finetuned_qa_policy_long\ndate: 2023-12-24\ntags: [roberta, en, open_source, question_answering, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.2.1\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_finetuned_qa_policy_long` is a English model originally trained by peter2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_long_en_5.2.1_3.0_1703390749621.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_finetuned_qa_policy_long_en_5.2.1_3.0_1703390749621.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\n\ndocument_assembler = MultiDocumentAssembler() \\\n    .setInputCol([\"question\", \"context\"]) \\\n    .setOutputCol([\"document_question\", \"document_context\"])\n    \n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"roberta_finetuned_qa_policy_long\",\"en\") \\\n            .setInputCols([\"document_question\",\"document_context\"]) \\\n            .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([document_assembler, spanClassifier])\n\npipelineModel = pipeline.fit(data)\n\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\n\nval document_assembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering  \n    .pretrained(\"roberta_finetuned_qa_policy_long\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n\nval pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))\n\nval pipelineModel = pipeline.fit(data)\n\nval pipelineDF = pipelineModel.transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_finetuned_qa_policy_long|\n|Compatibility:|Spark NLP 5.2.1+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|464.0 MB|\n\n## References\n\nhttps://huggingface.co/peter2000/roberta-finetuned-qa-policy_long","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"80F6:1F1FB6:17E9BE:5E70CF:6AB92D92"},"text_sha256":"1d389c5f25287c3b4ed02508fcd3e9e439bd2bf20ae27338d5d78c775835c4b9"},{"path":"docs/_posts/ahmedlone127/2023-12-29-legal_doctrine_coding_challenge_en.md","size":2986,"blob_sha":"a36b98fa050127e4d032c08cd96ad946ce7cb8ce","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_doctrine_coding_challenge DistilBertForSequenceClassification from HAOUHAT\nauthor: John Snow Labs\nname: legal_doctrine_coding_challenge\ndate: 2023-12-29\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_doctrine_coding_challenge` is a English model originally trained by HAOUHAT.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_doctrine_coding_challenge_en_5.2.2_3.0_1703890713201.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_doctrine_coding_challenge_en_5.2.2_3.0_1703890713201.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"legal_doctrine_coding_challenge\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"legal_doctrine_coding_challenge\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_doctrine_coding_challenge|\n|Compatibility:|Spark NLP 5.2.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.4 MB|\n\n## References\n\nhttps://huggingface.co/HAOUHAT/legal-doctrine-Coding-Challenge","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185468:5EDC9A:6AB92D93"},"text_sha256":"314d1418ffcb6100070116dee84eee63f81e7ba95c013fa07df32e49b84387f4"},{"path":"docs/_posts/ahmedlone127/2023-12-31-distilbert_base_uncased_multil_cls_legal_en.md","size":3070,"blob_sha":"3195eede9ba14e14efd9ca4be3de35e213abf469","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_base_uncased_multil_cls_legal DistilBertForSequenceClassification from ThuyNT03\nauthor: John Snow Labs\nname: distilbert_base_uncased_multil_cls_legal\ndate: 2023-12-31\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_uncased_multil_cls_legal` is a English model originally trained by ThuyNT03.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_multil_cls_legal_en_5.2.2_3.0_1704045272398.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_multil_cls_legal_en_5.2.2_3.0_1704045272398.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_multil_cls_legal\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_multil_cls_legal\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_uncased_multil_cls_legal|\n|Compatibility:|Spark NLP 5.2.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/ThuyNT03/distilbert-base-uncased-multil-cls-legal","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD02:4F9CC:1728CC:5DAE03:6AB92D93"},"text_sha256":"f841384e35469ff06bcce7bf047fb796244be35014010115ef207f4fa99b21e3"},{"path":"docs/_posts/ahmedlone127/2024-01-01-distilbert_base_uncased_finetuned_legal_en.md","size":3061,"blob_sha":"c0dfdc2e2a898917bee9b0105c55194ea95e1734","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English distilbert_base_uncased_finetuned_legal DistilBertForSequenceClassification from ThuyNT03\nauthor: John Snow Labs\nname: distilbert_base_uncased_finetuned_legal\ndate: 2024-01-01\ntags: [bert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_uncased_finetuned_legal` is a English model originally trained by ThuyNT03.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_legal_en_5.2.2_3.0_1704115654797.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_uncased_finetuned_legal_en_5.2.2_3.0_1704115654797.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_finetuned_legal\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"distilbert_base_uncased_finetuned_legal\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_uncased_finetuned_legal|\n|Compatibility:|Spark NLP 5.2.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.4 MB|\n\n## References\n\nhttps://huggingface.co/ThuyNT03/distilbert-base-uncased-finetuned-legal","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFE4:11E74B:17B768:5E3E0C:6AB92D94"},"text_sha256":"2ea265a42fe3122da13261cbe9da503e626eefb51c1ef63358dc5a95d66d9987"},{"path":"docs/_posts/ahmedlone127/2024-01-19-autotrain_l_data_protection_194_95265146323_en.md","size":3109,"blob_sha":"42b447191c99a4d7b4ae73b4bc814fc87bd727f1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English autotrain_l_data_protection_194_95265146323 CamemBertForSequenceClassification from maxzancanaro\nauthor: John Snow Labs\nname: autotrain_l_data_protection_194_95265146323\ndate: 2024-01-19\ntags: [camembert, en, open_source, sequence_classification, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.2.4\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: CamemBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`autotrain_l_data_protection_194_95265146323` is a English model originally trained by maxzancanaro.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/autotrain_l_data_protection_194_95265146323_en_5.2.4_3.0_1705705270786.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/autotrain_l_data_protection_194_95265146323_en_5.2.4_3.0_1705705270786.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\ndocument_assembler = DocumentAssembler()\\\n    .setInputCol(\"text\")\\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer()\\\n    .setInputCols(\"document\")\\\n    .setOutputCol(\"token\")  \n    \nsequenceClassifier = CamemBertForSequenceClassification.pretrained(\"autotrain_l_data_protection_194_95265146323\",\"en\")\\\n            .setInputCols([\"document\",\"token\"])\\\n            .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])\n\ndata = spark.createDataFrame([[\"PUT YOUR STRING HERE\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n\n```\n```scala\n\nval document_assembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\") \n    .setOutputCol(\"token\")  \n    \nval sequenceClassifier = CamemBertForSequenceClassification.pretrained(\"autotrain_l_data_protection_194_95265146323\",\"en\")\n            .setInputCols(Array(\"document\",\"token\"))\n            .setOutputCol(\"class\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\n\nval data = Seq(\"PUT YOUR STRING HERE\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|autotrain_l_data_protection_194_95265146323|\n|Compatibility:|Spark NLP 5.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[documents, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|414.6 MB|\n\n## References\n\nhttps://huggingface.co/maxzancanaro/autotrain-l_data-protection_194-95265146323","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D54:3B1F3:186B3B:5EF3DC:6AB92D94"},"text_sha256":"3b7ad78b6cb17ae36b1abbc2161b8691be00ddb52a7b580e00e80fb53c0e9748"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_german_en.md","size":2648,"blob_sha":"0910b4602e46c132ce411c60365cd8bf354578a6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_german\ndate: 2024-08-01\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_german_en_5.4.2_3.0_1722538757517.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_german_en_5.4.2_3.0_1722538757517.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1CB8:1F1FB6:17E9D4:5E7115:6AB92D94"},"text_sha256":"03896b7baa5238563032033f8443bff6b07298ccc9920e54493bda71f3d91c7d"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_german_pipeline_en.md","size":2011,"blob_sha":"b38affcec5640a5f19b2fbdf84d7b02b54c5aa10","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_german_pipeline\ndate: 2024-08-01\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_german_pipeline_en_5.4.2_3.0_1722538611324.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_german_pipeline_en_5.4.2_3.0_1722538611324.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD28:372D9:17EAC1:5E7361:6AB92D93"},"text_sha256":"c753bcb121e0af0660bb21d8f5d451d48484f217679765eb8634944bee95a844"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_multitask_czech_en.md","size":2730,"blob_sha":"61313e590e92f94a1832040511c8aa2500096ab6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_czech\ndate: 2024-08-01\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_czech_en_5.4.2_3.0_1722551343860.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_czech_en_5.4.2_3.0_1722551343860.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185479:5EDCE7:6AB92D95"},"text_sha256":"76c94fc33a654010c19cc37ef857a2e5e7dd4c75a674d39257afeafb91b6a7ba"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_cls_multitask_czech_pipeline_en.md","size":2093,"blob_sha":"19e5cb096d64a73ab1489622810ba1e98e435eb8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_czech_pipeline\ndate: 2024-08-01\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_czech_pipeline_en_5.4.2_3.0_1722551419400.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_czech_pipeline_en_5.4.2_3.0_1722551419400.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1738:7A4F8:184367:5ECBD0:6AB92D96"},"text_sha256":"f27c7255aede5bb4800d3185ac26d7979280de418438ba73f368e2aeeb9f0c18"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_czech_english_en.md","size":2761,"blob_sha":"f371f62b08b04300bf8bd0895bff7db14a41c9ee","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_english\ndate: 2024-08-01\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_english_en_5.4.2_3.0_1722546103135.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_english_en_5.4.2_3.0_1722546103135.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D9A8:3BCC6:17EC3D:5E7418:6AB92D95"},"text_sha256":"31bab510546e592f4f47c367d1587248a7d80692ea34a3090246e0bc10e8d7da"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_czech_english_pipeline_en.md","size":2124,"blob_sha":"eda69a3d200c744241bd2ff85a17e395b300c5a3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_english_pipeline\ndate: 2024-08-01\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_english_pipeline_en_5.4.2_3.0_1722546180281.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_english_pipeline_en_5.4.2_3.0_1722546180281.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4222:2C474:181D40:5EA534:6AB92D96"},"text_sha256":"0b111fae5434e2dcb15b7cd1486fe6570957079c7699b50693b98460a70a8053"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_french_spanish_en.md","size":2769,"blob_sha":"4ad4bac7fe1375f4e1689d044f4d2048ef97a41e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_spanish\ndate: 2024-08-01\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_spanish_en_5.4.2_3.0_1722520292473.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_spanish_en_5.4.2_3.0_1722520292473.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:1740AD:5DC897:6AB92D91"},"text_sha256":"84c0f268775db776b49a6dee52d72254bc33f77f23fcd98bf15db632f5419274"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_multitask_french_spanish_pipeline_en.md","size":2132,"blob_sha":"e7e8bf5762d032a109c5ced97fe72cdb849747dd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_spanish_pipeline\ndate: 2024-08-01\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_spanish_pipeline_en_5.4.2_3.0_1722520369575.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_spanish_pipeline_en_5.4.2_3.0_1722520369575.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AEB4:3B7E2:172641:5DAF75:6AB92D90"},"text_sha256":"e7244ef2363a42a92c7acb66eee249f144ad1fb26cda506dce6d076eaf8cd6f7"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_trans_swedish_german_small_finetuned_en.md","size":2877,"blob_sha":"4bba3f4b218f93c7c013eef8becbd661830c56ad","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_german_small_finetuned\ndate: 2024-08-01\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_small_finetuned_en_5.4.2_3.0_1722544294739.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_small_finetuned_en_5.4.2_3.0_1722544294739.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AADE:3B1F3:186B5F:5EF450:6AB92D96"},"text_sha256":"7edd0389bc7bd13e68ebb58628475c6725ae7b9d8acc626aae5fda21b882be56"},{"path":"docs/_posts/ahmedlone127/2024-08-01-legal_t5_small_trans_swedish_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"62554c3e6befd6ef8b1b30118310060bfbbb8060","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_german_small_finetuned_pipeline\ndate: 2024-08-01\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_small_finetuned_pipeline_en_5.4.2_3.0_1722544371095.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_small_finetuned_pipeline_en_5.4.2_3.0_1722544371095.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F58:35EBC:17A054:5E2864:6AB92D98"},"text_sha256":"b9534da05fc32a3578481e64ee0c524240ee50bb368c9595265779decfcdc9d9"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_italian_spanish_en.md","size":2777,"blob_sha":"030acdd58a3512fb3ab582c9a55b1ffcf54f94fb","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_spanish\ndate: 2024-08-02\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_spanish_en_5.4.2_3.0_1722562255331.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_spanish_en_5.4.2_3.0_1722562255331.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"14F4:29FD16:185823:5EE03B:6AB92D98"},"text_sha256":"8ec3f0334b3f2f5f59d159b5f7ee72a3f48b696f8c6ed4db27a313150c3c29b7"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_italian_spanish_pipeline_en.md","size":2140,"blob_sha":"7ad06195736cf48f603e6c94722242bd899c9ca6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_spanish_pipeline\ndate: 2024-08-02\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_spanish_pipeline_en_5.4.2_3.0_1722562332013.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_spanish_pipeline_en_5.4.2_3.0_1722562332013.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E10:1A3D83:188103:5F09EF:6AB92D99"},"text_sha256":"f2e02c7f7617971361209fe13febf286802d40b1f663dbbb651f62011ab0fd01"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_swedish_spanish_en.md","size":2777,"blob_sha":"9865ad9335cd1dc8a72cca65ce09c176b44a6734","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_spanish\ndate: 2024-08-02\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_spanish_en_5.4.2_3.0_1722576186135.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_spanish_en_5.4.2_3.0_1722576186135.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8A4C:11316A:17F1D0:5E7938:6AB92D99"},"text_sha256":"795325a0b855d5eb1f465b3e475c1b3947e6c804f13f9ca193ce444428f2810e"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_multitask_swedish_spanish_pipeline_en.md","size":2140,"blob_sha":"000ed114cdb772380adb806117433f1020c1b132","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_spanish_pipeline\ndate: 2024-08-02\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_spanish_pipeline_en_5.4.2_3.0_1722576267696.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_spanish_pipeline_en_5.4.2_3.0_1722576267696.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"708A:3B7E2:17264E:5DAFBE:6AB92D94"},"text_sha256":"332ba09c8526326f0fb8e21a7694c1ad59c7a3cd50c43f0d846cfad8953c8c3a"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_czech_italian_en.md","size":2725,"blob_sha":"3233dc378e721ac4953f08447b5a6eb46f806bb6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_italian\ndate: 2024-08-02\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_en_5.4.2_3.0_1722583433217.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_en_5.4.2_3.0_1722583433217.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D5DC:3AC5A:180488:5E8CAB:6AB92D93"},"text_sha256":"ae10267cdaaf362915ccefc7be9a09019025ad50025171da74823fb25e208741"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_czech_italian_pipeline_en.md","size":2088,"blob_sha":"03c589d4b68bf79c60f23e1a79ea5cfd91ba3d09","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_italian_pipeline\ndate: 2024-08-02\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_pipeline_en_5.4.2_3.0_1722583510787.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_pipeline_en_5.4.2_3.0_1722583510787.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4B8:324E19:181D79:5EA5E8:6AB92D98"},"text_sha256":"23622d925eac59b352b42559e6a4eb45fe2a95128c243c56137a23c6680b1fcc"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_spanish_czech_small_finetuned_en.md","size":2869,"blob_sha":"d001bdad240c0da8426dd57e7b92e45cae56a134","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_czech_small_finetuned\ndate: 2024-08-02\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_small_finetuned_en_5.4.2_3.0_1722592628397.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_small_finetuned_en_5.4.2_3.0_1722592628397.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F4DE:376DE:182327:5EACCB:6AB92D99"},"text_sha256":"8f69c4736744726581b2fc8baf4d9608f2f3d28eb3cf38ab3f134abf65f4290e"},{"path":"docs/_posts/ahmedlone127/2024-08-02-legal_t5_small_trans_spanish_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"d1b310ab7f060d32d9652a6b25bb9844d7335842","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_czech_small_finetuned_pipeline\ndate: 2024-08-02\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_small_finetuned_pipeline_en_5.4.2_3.0_1722592703549.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_small_finetuned_pipeline_en_5.4.2_3.0_1722592703549.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4254:3EACB:17C66F:5E4EDF:6AB92D9B"},"text_sha256":"799fdc39612bf95ba6864c77f65d88621a7c7d0cfc82eb9710482f465ec2167a"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_cls_multitask_english_en.md","size":2746,"blob_sha":"f0b20d15554ec7bb7310fa2364cc173c0594964d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_english\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_english_en_5.4.2_3.0_1722725781980.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_english_en_5.4.2_3.0_1722725781980.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D576:2B291E:1854A8:5EDDA5:6AB92D99"},"text_sha256":"560af40a5cc165109f1e8c3a5af9d789aa416b06e7261a53fa0003e8b7491741"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_cls_multitask_english_pipeline_en.md","size":2109,"blob_sha":"b4e14f1dae8a3c2d21b06e86820c7a82ec007061","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_english_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_english_pipeline_en_5.4.2_3.0_1722725857810.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_english_pipeline_en_5.4.2_3.0_1722725857810.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1CB8:1F1FB6:17EA14:5E71FD:6AB92D9C"},"text_sha256":"8e7d614942bc9f5900b6b5328660aeaa5b6d8dae13c55815f3c5c1ac06a5ba33"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_finetuned_summ_swedish_en.md","size":2755,"blob_sha":"3be5472b8c3265edc7724e85cbf0c7b6f3bc093c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_swedish\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_swedish_en_5.4.2_3.0_1722728695330.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_swedish_en_5.4.2_3.0_1722728695330.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86B6:326565:17C4B8:5E4E0A:6AB92D9B"},"text_sha256":"35b6999cf7601176ce68614f21d79e61ca8cc4ed840c22e87f0221b8b59839ac"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_finetuned_summ_swedish_pipeline_en.md","size":2118,"blob_sha":"1191cb767ce4a0bf93cd9327d07c45430ed83840","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_swedish_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_swedish_pipeline_en_5.4.2_3.0_1722728771003.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_swedish_pipeline_en_5.4.2_3.0_1722728771003.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E8B0:1A3D83:188129:5F0A67:6AB92D9C"},"text_sha256":"f226b2c5fea077b008b935f3fdfa3a05fc750e77d3cf217bda1b7984dc7aa102"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_multitask_french_english_en.md","size":2769,"blob_sha":"0bd791bc2bc86276f6b53dfc57ea3ab20af04458","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_english\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_english_en_5.4.2_3.0_1722712422632.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_english_en_5.4.2_3.0_1722712422632.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1F7E:17E138:17B4DC:5E3D33:6AB92D9D"},"text_sha256":"d9ea3cf5594654aa6054f9e8082d2a3b3c1f2c030e0be95e1deb18dbc7d87974"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_multitask_french_english_pipeline_en.md","size":2132,"blob_sha":"38779eb2e91451c3d366fe3c42167c45cbef30dd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_english_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_english_pipeline_en_5.4.2_3.0_1722712498739.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_english_pipeline_en_5.4.2_3.0_1722712498739.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:1802FA:5AB5DE:6AB92D9D"},"text_sha256":"b053400cde586490a3f9ffb440a81b5b87eb026e79c52654d4a9f98082a0b9d9"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_french_en.md","size":2657,"blob_sha":"606abce5f1bff719d9496f39923b93058b0b8164","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_french\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_french_en_5.4.2_3.0_1722677863583.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_french_en_5.4.2_3.0_1722677863583.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|175.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6764:285814:17491D:5DD168:6AB92D9A"},"text_sha256":"f5ea171af046a5963c435c15ce040f0ce9a45bab938cb90fa388ce76c67560d7"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_french_pipeline_en.md","size":2020,"blob_sha":"672829e017333e703d992ee0a466da5017732128","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_french_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_french_pipeline_en_5.4.2_3.0_1722677939204.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_french_pipeline_en_5.4.2_3.0_1722677939204.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|175.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:18306A:5EB9D7:6AB92D9C"},"text_sha256":"0e2045cd1d1260c81b2670432a6d299c25e3dc916be9716bb4fa705ca9bb46d9"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_multitask_swedish_en.md","size":2755,"blob_sha":"cccef03cf9ea9e8e7c341ee11bcf2236ad21f91f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_swedish\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_swedish_en_5.4.2_3.0_1722720428816.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_swedish_en_5.4.2_3.0_1722720428816.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4A0:376DE:18234C:5EAD77:6AB92D9B"},"text_sha256":"35fcf02e454a2731a6a8aba4c05c33fe72c4d09b0766803d326c937bd184e49c"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_summ_multitask_swedish_pipeline_en.md","size":2118,"blob_sha":"80b125cc4d55379c987b2cd820e81c9bcf2cc252","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_swedish_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_swedish_pipeline_en_5.4.2_3.0_1722720502953.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_swedish_pipeline_en_5.4.2_3.0_1722720502953.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6ADC:3EACB:17C68B:5E4F52:6AB92D9E"},"text_sha256":"3d8583aa7d4b92be903ddc697a8107efbabac9857149e9ede5eb94bfc46f0c59"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_czech_swedish_small_finetuned_en.md","size":2869,"blob_sha":"4985fabd132ba11e6686351477da55971ba357f6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_swedish_small_finetuned\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_small_finetuned_en_5.4.2_3.0_1722724747000.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_small_finetuned_en_5.4.2_3.0_1722724747000.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4938:24970A:1862A3:5EE962:6AB92D9E"},"text_sha256":"d28dce7a2018331077159d959cf2a2a69cb9bd0fd3432a41cbb4d79d3b7b9b49"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_czech_swedish_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"bb88c0d943432c5d152c6f8cea6159275e5c6de7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_swedish_small_finetuned_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1722724823661.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1722724823661.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"61EE:241B62:17B776:5E40EB:6AB92D9F"},"text_sha256":"de144441c90d8d4b0c5b6f509e0d8092459e5f17478432be8acb91530436a3e7"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_english_en.md","size":2733,"blob_sha":"2e312b0bb1e00208c006129af7eb632cfc4da666","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_english\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_en_5.4.2_3.0_1722692607541.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_en_5.4.2_3.0_1722692607541.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D576:2B291E:1854CB:5EDE66:6AB92D9F"},"text_sha256":"3baeef2a98f1366a06e8fc1a875f90f9cc93e5b30415d5e860d948b9f9d52a58"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_english_pipeline_en.md","size":2096,"blob_sha":"3b0ad8058d2b05f046de2c557fad14a6f1836c50","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_english_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_pipeline_en_5.4.2_3.0_1722692681575.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_pipeline_en_5.4.2_3.0_1722692681575.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6910:09ED:E6F72:3FB22B:6AB92D9E"},"text_sha256":"19b8dd24ee5e1bcf54e96becced179b63a4746fd157a1b482e9b77afb61bdca0"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_italian_en.md","size":2733,"blob_sha":"f60cdd393d0d8d815bba6ef54d38f82ec394e004","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_italian\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_en_5.4.2_3.0_1722669097569.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_en_5.4.2_3.0_1722669097569.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0DD4:372D9:17EB4E:5E7548:6AB92DA0"},"text_sha256":"fb697b05d7434ea01f9218f678d6c3f720e0d13508c6809984a1fafe4042e5cf"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_french_italian_pipeline_en.md","size":2096,"blob_sha":"8e5e7289c43ace1f05afe8ff761b34c827d6a43a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_italian_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_pipeline_en_5.4.2_3.0_1722669172894.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_pipeline_en_5.4.2_3.0_1722669172894.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"647E:2E8679:17DF71:5E665C:6AB92DA1"},"text_sha256":"b5f9bd3ee7b66b1f32adb97ee3d3fd0085311283c6c7613a9d7f9698ef26c2b0"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_italian_small_finetuned_en.md","size":2877,"blob_sha":"cb83f2812bcb817cc5f49b813006ae27ed372107","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_italian_small_finetuned\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_small_finetuned_en_5.4.2_3.0_1722711483815.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_small_finetuned_en_5.4.2_3.0_1722711483815.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52FC:149227:1830A7:5EBAAE:6AB92DA1"},"text_sha256":"e6d62f8ea3ed7c06522ae5880bb14c66028ab47a289672a837b032d38d650a5e"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_italian_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"0c4a2227b2f9c5fb5a07d4b890bcb66cd0570629","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_italian_small_finetuned_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_small_finetuned_pipeline_en_5.4.2_3.0_1722711558546.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_small_finetuned_pipeline_en_5.4.2_3.0_1722711558546.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4254:3EACB:17C6B1:5E500B:6AB92DA0"},"text_sha256":"012eb4531c18039b0a6f43ca6b5a8b945b6639a81b3e9b6cabcf278ccf581255"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_swedish_en.md","size":2733,"blob_sha":"b0023e4b0693f714d337c40366afb1f8793c41d3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_swedish\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_en_5.4.2_3.0_1722705708876.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_en_5.4.2_3.0_1722705708876.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D576:2B291E:1854EF:5EDED8:6AB92DA1"},"text_sha256":"79cef6538380007ee43611872b60f703221fdd9553e09d3ada78a5b2322b4340"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_german_swedish_pipeline_en.md","size":2096,"blob_sha":"6224c2c1ffab955dd11e08b02aa618a9438741aa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_swedish_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_pipeline_en_5.4.2_3.0_1722705783622.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_pipeline_en_5.4.2_3.0_1722705783622.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A2A4:40CE8:18193F:5EA1E1:6AB92DA2"},"text_sha256":"9e15f8e29fcc47383250c6e99c887fc076e6fa05b85953bbf9c8b9d9710d812a"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_spanish_swedish_small_finetuned_en.md","size":2885,"blob_sha":"f9858b617fbc5a972259fdbaea590676ba33437a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_swedish_small_finetuned\ndate: 2024-08-03\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_small_finetuned_en_5.4.2_3.0_1722712545672.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_small_finetuned_en_5.4.2_3.0_1722712545672.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4A0:376DE:182386:5EAE33:6AB92DA2"},"text_sha256":"3d9bd2da424fa36fc389f66284e3277950cb6833d5cac887de32f783848c93d5"},{"path":"docs/_posts/ahmedlone127/2024-08-03-legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"0af0a28e64fc4542b3a5dc2d108b26af898c7e03","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline\ndate: 2024-08-03\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1722712622107.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1722712622107.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D1E:1F1FB6:17EA79:5E735F:6AB92DA2"},"text_sha256":"8d175df0d0860759a2a2d1b9f7a56f628a467d0b762a75f485855b336e29fc54"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_multitask_french_swedish_en.md","size":2769,"blob_sha":"b452a8c578ddcee5b0266efc3acbddece5311b67","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_swedish\ndate: 2024-08-04\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_swedish_en_5.4.2_3.0_1722733144178.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_swedish_en_5.4.2_3.0_1722733144178.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:18052F:5E8E81:6AB92DA3"},"text_sha256":"daa8e0d64358460d6af383b8f955de3116d567f6dc99bafa52c59da7bb4df10d"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_multitask_french_swedish_pipeline_en.md","size":2132,"blob_sha":"e6ae45ea25cafa74198b34fc03dbaa917f4af0b1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_swedish_pipeline\ndate: 2024-08-04\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_swedish_pipeline_en_5.4.2_3.0_1722733219271.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_swedish_pipeline_en_5.4.2_3.0_1722733219271.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C814:3FD49:179D62:5E2767:6AB92DA3"},"text_sha256":"7f7905847cf24dcdd39d26748ace047dfb754835159f945219e22dab11628411"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_english_czech_small_finetuned_en.md","size":2869,"blob_sha":"f6c22857b18ad33cb46a17b07bceb71430f09474","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_czech_small_finetuned\ndate: 2024-08-04\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_small_finetuned_en_5.4.2_3.0_1722761858689.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_small_finetuned_en_5.4.2_3.0_1722761858689.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5A9E:345ED4:17A705:5E2FD5:6AB92DA4"},"text_sha256":"dc41c14af06e49c46689bebadcf9f004ae7e9374370b833720d357bd727360f5"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_english_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"335ce3f10c3f7b191466a5935a8fbec16ae92776","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_czech_small_finetuned_pipeline\ndate: 2024-08-04\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_small_finetuned_pipeline_en_5.4.2_3.0_1722761932883.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_small_finetuned_pipeline_en_5.4.2_3.0_1722761932883.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"246C:3BF56:1770D0:5DFAAE:6AB92DA4"},"text_sha256":"f68e9b5e709e857eadb056b61d7fea509a955090f5f46caaf3b03ed4b5afe3d2"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_french_spanish_small_finetuned_en.md","size":2877,"blob_sha":"0779e515062f2f2a79e831ad1fd7104059aeca6d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_spanish_small_finetuned\ndate: 2024-08-04\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_small_finetuned_en_5.4.2_3.0_1722760081197.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_small_finetuned_en_5.4.2_3.0_1722760081197.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F032:29FD16:1858B8:5EE253:6AB92DA5"},"text_sha256":"a90b7ec2bbc060c211cd05c2a2098db129be773d324b9b21852a4f9ecc339fb9"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_french_spanish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"e38e6baa9226ce3aa95ed95c47837cd17f74c977","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_spanish_small_finetuned_pipeline\ndate: 2024-08-04\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1722760156198.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1722760156198.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1A6E:35EBC:17A11D:5E2AC4:6AB92DA5"},"text_sha256":"c111abb40606ba21f664fa44238b34405ec5ea586a174a45886070d7ca65cc27"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_german_spanish_en.md","size":2733,"blob_sha":"1fcbc7f943bc94a4f974317e5641f2fbd68bf08f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_spanish\ndate: 2024-08-04\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_en_5.4.2_3.0_1722810635350.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_en_5.4.2_3.0_1722810635350.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:17412B:5DCACF:6AB92DA5"},"text_sha256":"b6c49649c185151e1bc4dd8955708a55be57ac490e2c6d2182a6027ea1123283"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_german_spanish_pipeline_en.md","size":2096,"blob_sha":"d112cd0541512794b8b3dd5e37bbe5e6f18b6c27","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_spanish_pipeline\ndate: 2024-08-04\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_pipeline_en_5.4.2_3.0_1722810712122.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_pipeline_en_5.4.2_3.0_1722810712122.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"550E:3FA0D:179B0E:5E247E:6AB92DA6"},"text_sha256":"d81a05bc01633b570b41217f2108825811da554d9224e4c55e669ca07c91f8fa"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_swedish_czech_en.md","size":2725,"blob_sha":"cfde144ca4856d61ef03b27002ed539a56de5c6d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_czech\ndate: 2024-08-04\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_en_5.4.2_3.0_1722737078243.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_en_5.4.2_3.0_1722737078243.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.0 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C58:345ED4:17A723:5E302B:6AB92DA6"},"text_sha256":"d215173adfe1ae4660a06644fdbaf7b45b6c26e06537207b565025d61c9493b5"},{"path":"docs/_posts/ahmedlone127/2024-08-04-legal_t5_small_trans_swedish_czech_pipeline_en.md","size":2088,"blob_sha":"5a6ed203332ef2eeeae412c013b4562128389218","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_czech_pipeline\ndate: 2024-08-04\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_pipeline_en_5.4.2_3.0_1722737152898.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_pipeline_en_5.4.2_3.0_1722737152898.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.0 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2090:3CC8A:17F32C:5E7D6D:6AB92DA5"},"text_sha256":"da357cdfa4ccdb16abc98b15d5c24bede4eef7b98e2f42b0e2c2cde541353783"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_english_en.md","size":2656,"blob_sha":"17bcd76ece7f1e9009c04d97ea657aa9c2d53508","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_english\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_english_en_5.4.2_3.0_1722819255343.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_english_en_5.4.2_3.0_1722819255343.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E68E:3CC8A:17F331:5E7D79:6AB92DA6"},"text_sha256":"01a1aa06d5e966d852584b322e597716dcdfaab1f40c027fb34e4397252ed593"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_english_pipeline_en.md","size":2019,"blob_sha":"cef093b19ed92dbae3424ae34a16e685ee3d5bbd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_english_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_english_pipeline_en_5.4.2_3.0_1722819328071.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_english_pipeline_en_5.4.2_3.0_1722819328071.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AADE:3B1F3:186C25:5EF6E4:6AB92DA6"},"text_sha256":"cb3f5edb9710559fcda6caec20355e16ee05c3b41418f5618f62831b3c370e28"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_french_en.md","size":2648,"blob_sha":"368647bf3665873e8f82daa5aef8f9eaeb58500d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_french\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_french_en_5.4.2_3.0_1722840417631.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_french_en_5.4.2_3.0_1722840417631.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:17413E:5DCB16:6AB92DA7"},"text_sha256":"e9ebef560029d82c147084ee9253512bb1d450ffa06bf4fc72890b58a43429bb"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_cls_french_pipeline_en.md","size":2011,"blob_sha":"09bc93ebb89dba630e1f51e67093fcc33e93946f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_french_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_french_pipeline_en_5.4.2_3.0_1722840490633.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_french_pipeline_en_5.4.2_3.0_1722840490633.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B006:3CC8A:17F344:5E7DAE:6AB92DA8"},"text_sha256":"b1ac42af1db5914ded4d26f843c7e373c04d9479318bde2f530482bda6d8f6d2"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_summ_italian_en.md","size":2665,"blob_sha":"ed26f1cd5d77a347e4b292a41834d32a5c2e51a7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_italian\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_italian_en_5.4.2_3.0_1722895680606.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_italian_en_5.4.2_3.0_1722895680606.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|176.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E10:1A3D83:1881A4:5F0C5B:6AB92DA3"},"text_sha256":"67216c02517d1c28f65bf820bf027affc745fc5fa613fea1c4094f6756a2bee4"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_summ_italian_pipeline_en.md","size":2028,"blob_sha":"de3fc5c64936d123441e0b6db63760d50c63d35a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_italian_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_italian_pipeline_en_5.4.2_3.0_1722895753916.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_italian_pipeline_en_5.4.2_3.0_1722895753916.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|176.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8AA0:35EBC:17A160:5E2B59:6AB92DA9"},"text_sha256":"51feb8fcde6672f968b894e61c6763612fa1cb0a82fb273df4d047dec97ee3be"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_french_czech_en.md","size":2717,"blob_sha":"ef6df74decfa342cce34c804d4b59bee1c76ee07","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_czech\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_en_5.4.2_3.0_1722823380304.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_en_5.4.2_3.0_1722823380304.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F8C2:09BF:B3606:2E63FB:6AB92DA8"},"text_sha256":"2df2516bc19cb7ce1583512a6fe9746478a0e38462797ee0382a95cb49db4358"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_french_czech_pipeline_en.md","size":2080,"blob_sha":"3ba77401348c853a1202a7474a652a9e7d59163d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_czech_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_pipeline_en_5.4.2_3.0_1722823454208.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_pipeline_en_5.4.2_3.0_1722823454208.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4EA0:3FA0D:179B3A:5E2501:6AB92DA9"},"text_sha256":"d0b93408710f4cebc1a9cd24693e13e47312107357782536e35cc021328fdf4e"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_german_czech_en.md","size":2717,"blob_sha":"48ccce3bb26a846534d263b8d87fd6e7ed9a4c7c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_czech\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_en_5.4.2_3.0_1722836289246.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_en_5.4.2_3.0_1722836289246.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E06:35EBC:17A170:5E2B86:6AB92DAA"},"text_sha256":"d47fb8e777de6f2c87c9213880b85faf85cbbb9ebfe900f22e7bf6cec9f5af37"},{"path":"docs/_posts/ahmedlone127/2024-08-05-legal_t5_small_trans_german_czech_pipeline_en.md","size":2080,"blob_sha":"fb4a87920fce213136a5f511f085da0077900e9e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_czech_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_pipeline_en_5.4.2_3.0_1722836363702.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_pipeline_en_5.4.2_3.0_1722836363702.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4932:40CE8:18197A:5EA2DE:6AB92DAA"},"text_sha256":"c61d33ffdf30417d044410dd7a8074d968fbffcf6cc87cf9b235a8cac086b70b"},{"path":"docs/_posts/ahmedlone127/2024-08-05-mt5_small_ai4privacy_en.md","size":2614,"blob_sha":"24e186f1131e533291488a8f5a657c1db15e0912","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mt5_small_ai4privacy T5Transformer from Isotonic\nauthor: John Snow Labs\nname: mt5_small_ai4privacy\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mt5_small_ai4privacy` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mt5_small_ai4privacy_en_5.4.2_3.0_1722838266301.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mt5_small_ai4privacy_en_5.4.2_3.0_1722838266301.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"mt5_small_ai4privacy\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"mt5_small_ai4privacy\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mt5_small_ai4privacy|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/Isotonic/mt5-small-ai4privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185540:5EE002:6AB92DA9"},"text_sha256":"165b62a0ad662a1ddfab88bc3dde6b2d78cf85bdf44de087d06dec1d55ff3d0d"},{"path":"docs/_posts/ahmedlone127/2024-08-05-mt5_small_ai4privacy_pipeline_en.md","size":1977,"blob_sha":"b42919f36c869dbf86560fe4e947f6927da0f47b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mt5_small_ai4privacy_pipeline pipeline T5Transformer from Isotonic\nauthor: John Snow Labs\nname: mt5_small_ai4privacy_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mt5_small_ai4privacy_pipeline` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mt5_small_ai4privacy_pipeline_en_5.4.2_3.0_1722838416513.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mt5_small_ai4privacy_pipeline_en_5.4.2_3.0_1722838416513.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"mt5_small_ai4privacy_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"mt5_small_ai4privacy_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mt5_small_ai4privacy_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/Isotonic/mt5-small-ai4privacy\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17BC67:5E45D1:6AB92DAB"},"text_sha256":"28c72c608af0523710984ca658e8240a55d9b2da76a037d6f8d590ebb7266199"},{"path":"docs/_posts/ahmedlone127/2024-08-05-t5_small_ai4privacy_en.md","size":2607,"blob_sha":"6a0c10e7925095b5aa7e2f0a8bc70d22592fc0c9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_ai4privacy T5Transformer from Isotonic\nauthor: John Snow Labs\nname: t5_small_ai4privacy\ndate: 2024-08-05\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_ai4privacy` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_ai4privacy_en_5.4.2_3.0_1722845560625.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_ai4privacy_en_5.4.2_3.0_1722845560625.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"t5_small_ai4privacy\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"t5_small_ai4privacy\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_ai4privacy|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|349.8 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/t5-small-ai4privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86AC:40CE8:18197C:5EA2FC:6AB92DA8"},"text_sha256":"5edabe1ba529a5ad1edd21bbe094cbd6185b2584ee83402ebfb3ebef8251d347"},{"path":"docs/_posts/ahmedlone127/2024-08-05-t5_small_ai4privacy_pipeline_en.md","size":1970,"blob_sha":"e8e22a6835be4dcb50a88f0e2cf727bc0c76e97b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_ai4privacy_pipeline pipeline T5Transformer from Isotonic\nauthor: John Snow Labs\nname: t5_small_ai4privacy_pipeline\ndate: 2024-08-05\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_ai4privacy_pipeline` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_ai4privacy_pipeline_en_5.4.2_3.0_1722845582086.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_ai4privacy_pipeline_en_5.4.2_3.0_1722845582086.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"t5_small_ai4privacy_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"t5_small_ai4privacy_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_ai4privacy_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|349.8 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/t5-small-ai4privacy\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F24:3AC15:181684:5E9FA0:6AB92DAC"},"text_sha256":"eaf8c212f0e97af2ca8599ccdf92294f8e6a44d630515cd45bba31c52c7329e6"},{"path":"docs/_posts/ahmedlone127/2024-08-06-legal_t5_small_trans_english_french_en.md","size":2733,"blob_sha":"84c44c519bdc3761bbca384007cc5ff9659e3e13","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_french\ndate: 2024-08-06\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_en_5.4.2_3.0_1722925994542.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_en_5.4.2_3.0_1722925994542.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:178214:5E0BC7:6AB92DAC"},"text_sha256":"fef8174aa70795b3f0ce7def534598d3b2d0421853d9f03a41dc4d8921090a84"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_czech_en.md","size":2640,"blob_sha":"32004dca1c1c273bacadc74ef301b150d04be775","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_czech\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_czech_en_5.4.2_3.0_1723071474248.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_czech_en_5.4.2_3.0_1723071474248.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D3C:3B6DE:178218:5E0BD5:6AB92DAC"},"text_sha256":"f9a8e36012fb7e6db42fea57d55169f8615f86002e3e5affdd0cce2478d8a69b"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_czech_pipeline_en.md","size":2003,"blob_sha":"609a525401acbc7b865bdb2a0024002d77e6b2d1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_czech_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_czech_pipeline_en_5.4.2_3.0_1723071535038.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_czech_pipeline_en_5.4.2_3.0_1723071535038.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3DD2:18CDF1:179ECE:565557:6AB92D7D"},"text_sha256":"5a091007d906d1e73301d25ed1286d79eaaf6f61c091cbaf0f3a254b14fa3abe"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_finetuned_german_en.md","size":2738,"blob_sha":"3ff6bc773e37799d8406a29018caca50f504d746","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_german\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_german_en_5.4.2_3.0_1723056850162.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_german_en_5.4.2_3.0_1723056850162.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98A:3AC5A:1805D8:5E9054:6AB92DAD"},"text_sha256":"fa94c9bac8ddd5aa717aa483241671d1277d3ba9685c6e0a8808339d7e5467f6"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_cls_finetuned_german_pipeline_en.md","size":2101,"blob_sha":"83befe6ed8bdcc8cf10269c44a7b564d20aa60ae","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_german_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_german_pipeline_en_5.4.2_3.0_1723056912639.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_german_pipeline_en_5.4.2_3.0_1723056912639.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B548:375F4:17D91E:5E64DC:6AB92DAC"},"text_sha256":"0f9bcc2288ba7ab7ce624d80fe25737973712442ef394ceee1250e7f1cb1a85c"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_french_czech_en.md","size":2753,"blob_sha":"fcb36b5a444698e65b4921709d5636d76b11b30c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_czech\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_czech_en_5.4.2_3.0_1723050690576.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_czech_en_5.4.2_3.0_1723050690576.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A04:2C474:181E58:5EA90C:6AB92DAD"},"text_sha256":"b28ce82f47d4a424fec6f6604830f35eba933ec92edf557541a29c2d2afb6485"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_french_czech_pipeline_en.md","size":2116,"blob_sha":"3d3ca5eb95a1434a4107755173c1871f5724e7cd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_czech_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_czech_pipeline_en_5.4.2_3.0_1723050753954.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_czech_pipeline_en_5.4.2_3.0_1723050753954.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3466:326565:17C52E:5E5090:6AB92DAD"},"text_sha256":"2f4842125f9359f731c815a1f614357f91ff7ec86b3e5535388d3f7bf1f2e3c7"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_german_swedish_en.md","size":2769,"blob_sha":"24914367bcb8cb95d6a6bfd205fd74a104459316","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_swedish\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_swedish_en_5.4.2_3.0_1723055346339.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_swedish_en_5.4.2_3.0_1723055346339.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_german_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_german_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F76E:17E138:17B5A4:5E402F:6AB92DAE"},"text_sha256":"692f15917e1080a19ac44a75f7fb0095921a024518ab2d91bd0b042825ed3ea2"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_multitask_german_swedish_pipeline_en.md","size":2132,"blob_sha":"de1fcf5888dc4fa6486381d6fb07bf52f0379be0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_swedish_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_swedish_pipeline_en_5.4.2_3.0_1723055408898.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_swedish_pipeline_en_5.4.2_3.0_1723055408898.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_german_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_german_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7A8A:3B1F3:186C77:5EF822:6AB92DAE"},"text_sha256":"6fcd5bb99af6d04f5953b1a53e5f8ae9ad704d777140446e16c034d099c7901a"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_czech_french_small_finetuned_en.md","size":2861,"blob_sha":"56bf49e4adc4c9238c1ed18f08d5ebdeca065b0c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_french_small_finetuned\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_small_finetuned_en_5.4.2_3.0_1723067404616.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_small_finetuned_en_5.4.2_3.0_1723067404616.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E322:3AC15:1816A7:5EA050:6AB92DA8"},"text_sha256":"e750af5bfec6599089902ef7a01083caf8e8e8d96fc0168ecc804078310ad8f0"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_czech_french_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"f99575ded671bcfa70cdfcd5936e65728a3d9471","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_french_small_finetuned_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_small_finetuned_pipeline_en_5.4.2_3.0_1723067466550.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_small_finetuned_pipeline_en_5.4.2_3.0_1723067466550.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:1819A6:5EA3CC:6AB92DB0"},"text_sha256":"4907a7440ccd034653c1c2411496f48980adb72e1532bfff585918404970e3bc"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_spanish_small_finetuned_en.md","size":2885,"blob_sha":"399485d1b2dd73b03b30fc417e3335d7910a9c77","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_spanish_small_finetuned\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_spanish_small_finetuned_en_5.4.2_3.0_1723069961005.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_spanish_small_finetuned_en_5.4.2_3.0_1723069961005.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A3E:09ED:E703A:3FB4C3:6AB92DB0"},"text_sha256":"cab676eb0b65bedaaca71c4df247ed7d67272023605027408b58a9fa14225448"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"3bf8b1e76e98be279b3d108067f712c842160b44","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_spanish_small_finetuned_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723070022911.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723070022911.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"472E:11316A:17F2DA:5E7CCA:6AB92D8A"},"text_sha256":"87cbf30698ed2c72ef65ff24ad72820c89e32eca1bbb4a996456160918a450c7"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_swedish_en.md","size":2741,"blob_sha":"4443d9231ffb0cd62a35dab210b7e22266f668bc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_swedish\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_en_5.4.2_3.0_1723071372619.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_en_5.4.2_3.0_1723071372619.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F38C:3B7E2:172724:5DB34E:6AB92DB1"},"text_sha256":"fae4cbbbe16ec28792d4d1a19ddf7c6bf2cbcdad5510f6bbf949400c86b46d80"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_english_swedish_pipeline_en.md","size":2104,"blob_sha":"e029032c61b0db2c1d8218248e950458ecb54833","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_swedish_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_pipeline_en_5.4.2_3.0_1723071434265.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_pipeline_en_5.4.2_3.0_1723071434265.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4254:3EACB:17C778:5E528C:6AB92DB1"},"text_sha256":"fa10c75250eb5cc8c7ede5d72d8c17004257015428601646376faad9fbb77e24"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_italian_swedish_small_finetuned_en.md","size":2885,"blob_sha":"f5117be4cbdf6b502fb114b707d2cd2a2c2350f9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_swedish_small_finetuned\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_small_finetuned_en_5.4.2_3.0_1723072298072.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_small_finetuned_en_5.4.2_3.0_1723072298072.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:18233:17BCDF:5E46EB:6AB92DB2"},"text_sha256":"822b5d3c382decdf124e5016def3b14404a9f45028d46fff0d6a81e0c840bf0a"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_italian_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"8ef8eff3f3d1229f58951a5774e49ab6bb1b1820","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_swedish_small_finetuned_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1723072360993.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1723072360993.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C6:2C474:181E97:5EA9AF:6AB92DB2"},"text_sha256":"500323b54546ac70bdb21b6264f73cd8a08f9bc16fdaf906d87f69a4798bd5b6"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_swedish_spanish_small_finetuned_en.md","size":2885,"blob_sha":"3125933afb14ada9762d625bb8418daa09a9ac80","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_spanish_small_finetuned\ndate: 2024-08-07\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_small_finetuned_en_5.4.2_3.0_1723056555334.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_small_finetuned_en_5.4.2_3.0_1723056555334.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"742E:3CC8A:17F3C1:5E7F52:6AB92DB2"},"text_sha256":"b9caf81ff2c0ed6c7659b756f10d7f166f5c8dacd783250d967b020072dd6e27"},{"path":"docs/_posts/ahmedlone127/2024-08-07-legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"86c353f5b047d9bb08e5d2b5de37da160a9a607c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline\ndate: 2024-08-07\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723056618382.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723056618382.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C52C:349C76:17930C:5E1A8A:6AB92DB3"},"text_sha256":"71d6074116650ee449da91c2decf128eb71c98941e69c895f7037a8efe6c15e0"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_finetuned_czech_en.md","size":2730,"blob_sha":"06e49a493586d57ae836b808a5c8e8a709c732e1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_czech\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_czech_en_5.4.2_3.0_1723134208318.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_czech_en_5.4.2_3.0_1723134208318.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C58:345ED4:17A7D3:5E3241:6AB92DB2"},"text_sha256":"6cebec3f90fb92377aad956c109aa27e678dd455cb87c8f128c04c45c6737156"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_finetuned_czech_pipeline_en.md","size":2093,"blob_sha":"6ce810570be391f4e1773f63833ac592f4ec9194","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_czech_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_czech_pipeline_en_5.4.2_3.0_1723134270142.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_czech_pipeline_en_5.4.2_3.0_1723134270142.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4EF8:2C474:181EB3:5EA9F3:6AB92DB3"},"text_sha256":"9374aa8d3643771b1d8df260a6fdbd20a37abfa9e6b69e086cc8ed52c35ff037"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_italian_en.md","size":2656,"blob_sha":"4179ee78a9c007b4e96c51940f0d2c9aec802238","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_italian\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_italian_en_5.4.2_3.0_1723153373045.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_italian_en_5.4.2_3.0_1723153373045.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"27C8:2E8679:17E08C:5E6992:6AB92D83"},"text_sha256":"fd321f368ecd2adc17803d156e3ecfb91d0b8340f2556dec01e504ee79437761"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_italian_pipeline_en.md","size":2019,"blob_sha":"18bce7fa2e92acc149f5dee15348a511b34d2aba","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_italian_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_italian_pipeline_en_5.4.2_3.0_1723153427470.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_italian_pipeline_en_5.4.2_3.0_1723153427470.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3BB8:3B1F3:186CB5:5EF8E6:6AB92DB4"},"text_sha256":"4229e323a645ac24cff81d7f6aab3bbb2199d5142c6826330a6f9328f479339c"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_multitask_french_en.md","size":2738,"blob_sha":"188650acf46f2bdc0cf8dc0cbda1e49ad8849e14","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_french\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_french_en_5.4.2_3.0_1723161036566.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_french_en_5.4.2_3.0_1723161036566.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:180468:5AB936:6AB92DB3"},"text_sha256":"8256dda9ed5f4e81e2c1ab4260da83aa9242be666015e4a2f26da9a6cb385a4a"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_cls_multitask_french_pipeline_en.md","size":2101,"blob_sha":"7599843da2bd909541c53945419aa9f1789309dc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_french_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_french_pipeline_en_5.4.2_3.0_1723161099930.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_french_pipeline_en_5.4.2_3.0_1723161099930.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4932:40CE8:1819E1:5EA485:6AB92DB1"},"text_sha256":"5f3acf19968d67676c8d6fe9f5a149adb9f1905c11771da15713ba52c46d2067"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_english_czech_en.md","size":2761,"blob_sha":"f0817fd7b1e58158176276ddd1daf50d1146ee80","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_czech\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_czech_en_5.4.2_3.0_1723088378358.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_czech_en_5.4.2_3.0_1723088378358.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39F0:18233:17BD24:5E47BD:6AB92DB3"},"text_sha256":"dbed95c97dea985dcbabe3a400f7a4bf4cbc7e78f91b78133708ca38bf6ce8c1"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_english_czech_pipeline_en.md","size":2124,"blob_sha":"7f45425908cb0706575efab8381a1b5979362be2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_czech_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_czech_pipeline_en_5.4.2_3.0_1723088441254.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_czech_pipeline_en_5.4.2_3.0_1723088441254.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6764:285814:174A26:5DD54A:6AB92DB4"},"text_sha256":"a708eb7b8a7f41a7b92cf9df88bab5bfbc4e9387e7ef7a714e55038e975509ca"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_german_spanish_en.md","size":2769,"blob_sha":"31b3e0b8027ee60637c1cf304d07ae1030514ee0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_spanish\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_spanish_en_5.4.2_3.0_1723129504083.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_spanish_en_5.4.2_3.0_1723129504083.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_german_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_german_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CC0:3BF56:177170:5DFD32:6AB92D72"},"text_sha256":"bd382c663230b497508f7570bf177967983b77a87c7c38364d8a60bd894e4c2a"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_german_spanish_pipeline_en.md","size":2132,"blob_sha":"4e4ab02feb507564e8fd3bcde9674aeb5d1025ec","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_spanish_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_spanish_pipeline_en_5.4.2_3.0_1723129567567.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_spanish_pipeline_en_5.4.2_3.0_1723129567567.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_german_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_german_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C994:3C4A0:17CF29:5E5AD9:6AB92DB6"},"text_sha256":"808cc695412415db5acf0e87b41d6b1481bc9eab42982f01451d3a90d5208572"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_english_en.md","size":2777,"blob_sha":"661d70e100598e2d4d0fe4ec5a2a7ff9031a2c78","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_english\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_english_en_5.4.2_3.0_1723116498638.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_english_en_5.4.2_3.0_1723116498638.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"85E8:2C474:181EF4:5EAA80:6AB92DB6"},"text_sha256":"e8abfe38f93567bd1c0680fad0f5853098558d3094043d95b04e36e78b53d7e1"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_english_pipeline_en.md","size":2140,"blob_sha":"52088cef8382ed1288e9a756dac4e38c536c580b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_english_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_english_pipeline_en_5.4.2_3.0_1723116561699.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_english_pipeline_en_5.4.2_3.0_1723116561699.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C29C:3EACB:17C7C0:5E535D:6AB92DB6"},"text_sha256":"2b22b8656a1ad53850f752f461b34841307e6128f240fc44304c07075e858515"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_german_en.md","size":2769,"blob_sha":"ab8d719f4a4cd715c522c369a3cad7312c7b1f24","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_german\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_german_en_5.4.2_3.0_1723140177979.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_german_en_5.4.2_3.0_1723140177979.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4E92:3D501:1868B5:5EF492:6AB92DB7"},"text_sha256":"a24ecfd07f1520c94e0cd034419940e04ac62b0df9a36de4c9f0479b31dae864"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_multitask_spanish_german_pipeline_en.md","size":2132,"blob_sha":"26be498e8ac090d6b3a338c2d15d452e29ceaad1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_german_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_german_pipeline_en_5.4.2_3.0_1723140240577.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_german_pipeline_en_5.4.2_3.0_1723140240577.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"87B4:18233:17BD55:5E482D:6AB92DB7"},"text_sha256":"599d4c3397f00389612f03be8b38e14a9526a3a645e5660888b50b3993199444"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_english_en.md","size":2725,"blob_sha":"a766659e2f01e784603b5c1e35aa004656bbbeb0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_english\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_en_5.4.2_3.0_1723158764922.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_en_5.4.2_3.0_1723158764922.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BF7C:40B0C:17F581:5E8183:6AB92DB8"},"text_sha256":"dddb0c22b64f87d1ead69b98b25a40674984894746ce75aff42402c27559bf02"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_english_pipeline_en.md","size":2088,"blob_sha":"202aaf6e05e8d619d60eb301e49f234701683d97","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_english_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_pipeline_en_5.4.2_3.0_1723158826063.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_pipeline_en_5.4.2_3.0_1723158826063.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F486:241B62:17B875:5E44A6:6AB92DB8"},"text_sha256":"e38dab0ca8888a954ac8d50d3bf91bf82ffc0edef20f9498ea399e649a34de5c"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_swedish_en.md","size":2725,"blob_sha":"c6a52ee5fb47bed47fed9d7d448bfa1efa256893","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_swedish\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_en_5.4.2_3.0_1723148735425.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_en_5.4.2_3.0_1723148735425.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:1782B4:5E0DD5:6AB92DB2"},"text_sha256":"6ff4b538c4e9319c3a402f86c37afd931e9e18163d84c1403733cee2155e06d5"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_czech_swedish_pipeline_en.md","size":2088,"blob_sha":"40f6e70cf108d09ee488c0507450b91f64c089e4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_swedish_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_pipeline_en_5.4.2_3.0_1723148797273.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_swedish_pipeline_en_5.4.2_3.0_1723148797273.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E14:3FA0D:179BEE:5E276A:6AB92DB8"},"text_sha256":"ffcbcec65443e4f6e407578a641ef339c284f02145fa1b9bf303347679307efb"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_english_italian_en.md","size":2741,"blob_sha":"d0446a95324db2655559f68bcdea6107d937d01a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_italian\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_en_5.4.2_3.0_1723093237579.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_en_5.4.2_3.0_1723093237579.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:183215:5EBEB1:6AB92DB9"},"text_sha256":"6854ab34498ad45d1e41b6cb7ee66a83f4f24e8c65580a468dbb1495977fcf62"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_english_italian_pipeline_en.md","size":2104,"blob_sha":"0f85b40ce113cd378e9dd86b04bb7df526f8d5c6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_italian_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_pipeline_en_5.4.2_3.0_1723093298419.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_pipeline_en_5.4.2_3.0_1723093298419.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A52A:3A3DD:17ADA8:5E399F:6AB92DB4"},"text_sha256":"43fe25d051ad1a6a6d61260b58edc37db29ad2a647033cb04258c829658c57a3"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_french_english_small_finetuned_en.md","size":2877,"blob_sha":"7fe317381e24a6c4d2197f6497d5da1909a8d5aa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_english_small_finetuned\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_small_finetuned_en_5.4.2_3.0_1723081385021.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_small_finetuned_en_5.4.2_3.0_1723081385021.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E68E:3CC8A:17F416:5E8071:6AB92DB1"},"text_sha256":"1fcae7f55ddc98c0aa8d92cb3742ec1775acafc92e1cdf42896045741b1aeaf8"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_french_english_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"2c29da058775fa12f1a0f891dc82a80ee169a16e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_english_small_finetuned_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_small_finetuned_pipeline_en_5.4.2_3.0_1723081446610.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_english_small_finetuned_pipeline_en_5.4.2_3.0_1723081446610.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1A80:3B1F3:186D12:5EF9E6:6AB92DBB"},"text_sha256":"16287ecb5c7458b55cfe7f30766f7fd0fd0df5503834d62caaaee6e007dd82a0"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_german_french_en.md","size":2725,"blob_sha":"0ff228fc675bbb8c7eca46ff1d1a1b97b1ab1a88","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_french\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_en_5.4.2_3.0_1723138677658.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_en_5.4.2_3.0_1723138677658.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C908:3E724:1821CA:5EAD63:6AB92DBA"},"text_sha256":"0adcaf67a9fc7ff0f9143690970d77fcae2d0cbc4f6bbe57253b9a7edcd4e2a4"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_german_french_pipeline_en.md","size":2088,"blob_sha":"0752aefdb5ffef16860e91ec2a21431dacdfec92","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_french_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_pipeline_en_5.4.2_3.0_1723138739140.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_pipeline_en_5.4.2_3.0_1723138739140.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AD96:1A3D83:188268:5F0F1D:6AB92DB2"},"text_sha256":"f6d0c5d0b063f5a758e7e0cb7e6e943e99296c16723600b36dd9c7d90f156e6e"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_italian_spanish_small_finetuned_en.md","size":2885,"blob_sha":"69c5bf50b4be2979aea6e7d855b927f3017fe308","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_spanish_small_finetuned\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_small_finetuned_en_5.4.2_3.0_1723138256881.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_small_finetuned_en_5.4.2_3.0_1723138256881.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:174266:5DCE91:6AB92DBC"},"text_sha256":"acd5fd451eddbecdfa1e86e0ab300da9bea8c5c5769b5a87a56b78dc7621ce12"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_italian_spanish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"a21e85f7474b6b2c1160acb4ec099ebaf3eb24d1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_spanish_small_finetuned_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723138319134.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1723138319134.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F58:35EBC:17A26A:5E2EA4:6AB92DBC"},"text_sha256":"01aab9d049485ca3f16a6e1307aebc9ee46896b366ed5f7be276d6cf0835ddb8"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_czech_en.md","size":2725,"blob_sha":"f0e02a83b2c78db1742c504e21bc64bcde23ba7c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_czech\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_en_5.4.2_3.0_1723142559179.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_en_5.4.2_3.0_1723142559179.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9EE:1A3D83:188273:5F0F42:6AB92DBB"},"text_sha256":"fd9e709b48fc142ca540850329ffc2b87e56afdd68362a78a95188d5ffa78824"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_czech_pipeline_en.md","size":2088,"blob_sha":"d79bbed5a061481acae57e36df7efbc872ddcd41","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_czech_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_pipeline_en_5.4.2_3.0_1723142620231.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_czech_pipeline_en_5.4.2_3.0_1723142620231.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"472E:11316A:17F3AC:5E7EFF:6AB92DBD"},"text_sha256":"4092e715bd74cbab39924a86a5708ec90784a2f6114028ca188b25fd917c895b"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_swedish_en.md","size":2741,"blob_sha":"f61fb95baaf1f79a6549e390b91165e15384c51d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_swedish\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_en_5.4.2_3.0_1723098948480.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_en_5.4.2_3.0_1723098948480.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1FD6:372D9:17ECAE:5E79E4:6AB92DBD"},"text_sha256":"058f5af4a20caf111544cb59f133ec0562f64a73e556346186f2165664551bc6"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_spanish_swedish_pipeline_en.md","size":2104,"blob_sha":"63662c13f6cd435daf646907af7e6a5f59b4fa3a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_swedish_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_pipeline_en_5.4.2_3.0_1723099009860.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_swedish_pipeline_en_5.4.2_3.0_1723099009860.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F3E:349C76:17938B:5E1C47:6AB92DBE"},"text_sha256":"7b56529cea944bf02cc6b239f6bb2a3ce4e91263dd830fc9230040ae18b8ee39"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_english_small_finetuned_en.md","size":2885,"blob_sha":"87c50cfbce838b105a07559f667e90386b218f67","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_english_small_finetuned\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_small_finetuned_en_5.4.2_3.0_1723124038488.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_small_finetuned_en_5.4.2_3.0_1723124038488.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"20D4:38C7FC:18051D:5ABAAD:6AB92DBE"},"text_sha256":"897bac3bc459017d4625b13fed0a84062488c7aea33805dd491524739d902ef4"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"864e542d8a65762e2bb4d22f19a3179998a6688a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_english_small_finetuned_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_small_finetuned_pipeline_en_5.4.2_3.0_1723124100013.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_small_finetuned_pipeline_en_5.4.2_3.0_1723124100013.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D906:376DE:182461:5EB228:6AB92DBE"},"text_sha256":"c9af4b1dc3a5df42e024e46538aa0ff7b103025bacfea8a91f576ee9383b5af2"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_italian_en.md","size":2741,"blob_sha":"cf2d9aa37b42c077ba55cefb70ffe7d7c9ac386b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_italian\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_en_5.4.2_3.0_1723115513879.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_en_5.4.2_3.0_1723115513879.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4652:35999:17AE58:5E3BCF:6AB92DBE"},"text_sha256":"f55208fb7faf1cfd0f031999a5646ccf6a6fea1d7e0e469d5b25a7049a0e5e66"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legal_t5_small_trans_swedish_italian_pipeline_en.md","size":2104,"blob_sha":"6044e44aded7d0eb237556b3367ab3106c799908","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_italian_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_pipeline_en_5.4.2_3.0_1723115574477.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_pipeline_en_5.4.2_3.0_1723115574477.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCA6:24970A:1863AC:5EEE07:6AB92DBE"},"text_sha256":"006abcaa7fae3ec491b12d315d0b1c99fa164053b22021891be9d0439a858bed"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legalbench_summarizer_en.md","size":2652,"blob_sha":"875c84806b093b9376f33f58470c84b21003c6e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbench_summarizer T5Transformer from prithviraj-maurya\nauthor: John Snow Labs\nname: legalbench_summarizer\ndate: 2024-08-08\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbench_summarizer` is a English model originally trained by prithviraj-maurya.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbench_summarizer_en_5.4.2_3.0_1723133497306.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbench_summarizer_en_5.4.2_3.0_1723133497306.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legalbench_summarizer\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legalbench_summarizer\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbench_summarizer|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|257.8 MB|\n\n## References\n\nhttps://huggingface.co/prithviraj-maurya/legalbench_summarizer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A5F6:29FD16:1859E7:5EE677:6AB92DBE"},"text_sha256":"697c44975a310781cff8b9e1a06df6313b7072eb09e3ec4e6737778baa64332e"},{"path":"docs/_posts/ahmedlone127/2024-08-08-legalbench_summarizer_pipeline_en.md","size":2015,"blob_sha":"50cd5b2a61d5d093656d8401aef000ede140bab1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbench_summarizer_pipeline pipeline T5Transformer from prithviraj-maurya\nauthor: John Snow Labs\nname: legalbench_summarizer_pipeline\ndate: 2024-08-08\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbench_summarizer_pipeline` is a English model originally trained by prithviraj-maurya.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbench_summarizer_pipeline_en_5.4.2_3.0_1723133530952.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbench_summarizer_pipeline_en_5.4.2_3.0_1723133530952.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legalbench_summarizer_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legalbench_summarizer_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbench_summarizer_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|257.8 MB|\n\n## References\n\nhttps://huggingface.co/prithviraj-maurya/legalbench_summarizer\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4BC:1F1FB6:17EC14:5E7837:6AB92DBE"},"text_sha256":"cb868a98926cccc135b7dd421ec3fc179d4f0b60f7a0d50b49fc55f616c410d5"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_cls_multitask_italian_en.md","size":2746,"blob_sha":"eb703a12c50024fe3aedd5ccc2af0775084cf1d0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_italian\ndate: 2024-08-09\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_italian_en_5.4.2_3.0_1723167284703.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_italian_en_5.4.2_3.0_1723167284703.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5744:35EBC:17A292:5E2F32:6AB92DBC"},"text_sha256":"3455f7218c4d482a4e65fd2b0db16c2872a30511333aa766d7c407227a0903ff"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_cls_multitask_italian_pipeline_en.md","size":2109,"blob_sha":"0d2ba42a8a23237ad47a3ff152edc13aebc0a860","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_italian_pipeline\ndate: 2024-08-09\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_italian_pipeline_en_5.4.2_3.0_1723167341114.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_italian_pipeline_en_5.4.2_3.0_1723167341114.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFF2:11E74B:17B9B5:5E455A:6AB92DBF"},"text_sha256":"6e3d23a45c1b3b9ef171c10a98679d4902fe9e739b5a95edae3b9dc8c1297741"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_czech_italian_en.md","size":2761,"blob_sha":"654789d5f02f5799c5b56b93d5f0f29da3af4355","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_italian\ndate: 2024-08-09\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_italian_en_5.4.2_3.0_1723165959682.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_italian_en_5.4.2_3.0_1723165959682.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EB3A:3BCC6:17EE72:5E7B27:6AB92DC1"},"text_sha256":"166d2601525232ceed45835db64f809dc342120e94110d52cdd69d8686d5c7fd"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_czech_italian_pipeline_en.md","size":2124,"blob_sha":"c6e1aab10f9f886ba2f5f44c3134ac2f7080b653","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_italian_pipeline\ndate: 2024-08-09\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_italian_pipeline_en_5.4.2_3.0_1723166015952.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_italian_pipeline_en_5.4.2_3.0_1723166015952.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F38C:3B7E2:1727D1:5DB5CD:6AB92DC1"},"text_sha256":"491d6e593d3b239fa773ebc3cfe610fe3c3a89165ad76fa38ea16ac9b28ffb1d"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_french_italian_en.md","size":2769,"blob_sha":"be0ce00f2d7a8d9a74ed55d9a0cdcf645babb344","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_italian\ndate: 2024-08-09\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_italian_en_5.4.2_3.0_1723232756650.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_italian_en_5.4.2_3.0_1723232756650.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D3C:3B6DE:17832C:5E0F5D:6AB92DC2"},"text_sha256":"7391bce677495fb45d2bff30973dba7c971490a9eec8b8fbdb75ad62bfe6cbe6"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_multitask_french_italian_pipeline_en.md","size":2132,"blob_sha":"7a42ac05cd2bcd3d488eb2dcba199866d706b00f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_italian_pipeline\ndate: 2024-08-09\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_italian_pipeline_en_5.4.2_3.0_1723232815920.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_italian_pipeline_en_5.4.2_3.0_1723232815920.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4652:35999:17AE89:5E3C59:6AB92DC2"},"text_sha256":"eb8a12af5fd7e4c9a61157d8cc10a8cd2c84aaf332c344f6d8b2fd440c29906c"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_german_french_small_finetuned_en.md","size":2869,"blob_sha":"22cde69d404fcb23506fc2b8562af232eb01f58f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_french_small_finetuned\ndate: 2024-08-09\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_small_finetuned_en_5.4.2_3.0_1723163017668.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_small_finetuned_en_5.4.2_3.0_1723163017668.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"792A:A58F2:1775A8:5E0304:6AB92DC1"},"text_sha256":"3408e36bcf3225be1cd43dd08623e5ec9bbccee52112d01192ac9cf7af548421"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_german_french_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"1664faa1e966b6dad8bf300ab7cc54b7589a2143","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_french_small_finetuned_pipeline\ndate: 2024-08-09\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_small_finetuned_pipeline_en_5.4.2_3.0_1723163079169.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_french_small_finetuned_pipeline_en_5.4.2_3.0_1723163079169.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7E:1A3D83:1882A3:5F1047:6AB92DBA"},"text_sha256":"4fb2c77b7f410afc877604bf9de2ab6b09479372b29f091f1ecb431e44c44057"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_swedish_spanish_en.md","size":2741,"blob_sha":"bfc5dfba18ec1d66ffaa4aca3034e03971634773","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_spanish\ndate: 2024-08-09\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_en_5.4.2_3.0_1723204402749.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_en_5.4.2_3.0_1723204402749.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7CB4:324E19:181EBF:5EABD2:6AB92DC1"},"text_sha256":"7e0313391d587130ccec181db5bc09d94c63333a445f95638b84af630b01d030"},{"path":"docs/_posts/ahmedlone127/2024-08-09-legal_t5_small_trans_swedish_spanish_pipeline_en.md","size":2104,"blob_sha":"adcf945dd430ca0ca56616156ff4012108cddf7e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_spanish_pipeline\ndate: 2024-08-09\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_pipeline_en_5.4.2_3.0_1723204463767.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_spanish_pipeline_en_5.4.2_3.0_1723204463767.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F3E:349C76:1793CC:5E1D1D:6AB92DC3"},"text_sha256":"5e0446b16e1525dee16b9dc16ae22a8fb944efe04fdcc3ac87e1eca7ea0a90e0"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_cls_multitask_german_en.md","size":2738,"blob_sha":"ffabdb032a33a76639b66fc96b6d9ea25403e251","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_german\ndate: 2024-08-10\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_german_en_5.4.2_3.0_1723253289046.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_german_en_5.4.2_3.0_1723253289046.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D398:3D40A:1742CC:5DCFBE:6AB92DC1"},"text_sha256":"e6c39b2b553ecc3b3794cf4f1b975d17e58cbbcde25e8fc55b69bec9f694c31e"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_cls_multitask_german_pipeline_en.md","size":2101,"blob_sha":"dff08900c1ffad22f9c5cc485b4f2de1f36e6873","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_german_pipeline\ndate: 2024-08-10\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_german_pipeline_en_5.4.2_3.0_1723253351307.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_german_pipeline_en_5.4.2_3.0_1723253351307.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"708A:3B7E2:1727E8:5DB625:6AB92DC2"},"text_sha256":"25558fd604137fb1bb49d729c0b7514b90c259ce7fb863f88129f68da927e7f6"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_finetuned_summ_czech_en.md","size":2739,"blob_sha":"b5be898749cbe5470b492c5af0ab69f0f3bffb2b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_czech\ndate: 2024-08-10\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_czech_en_5.4.2_3.0_1723282565326.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_czech_en_5.4.2_3.0_1723282565326.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"550E:3FA0D:179C71:5E2936:6AB92DC4"},"text_sha256":"dff2b9a8fccb6eeadf839b8da47a4f5c1b194029cfabce96db12c97720595612"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_finetuned_summ_czech_pipeline_en.md","size":2102,"blob_sha":"9f5a7c0eb760e55eff0b5666708d10821d6311df","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_czech_pipeline\ndate: 2024-08-10\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_czech_pipeline_en_5.4.2_3.0_1723282626516.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_czech_pipeline_en_5.4.2_3.0_1723282626516.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BF7C:40B0C:17F5E6:5E835B:6AB92DC5"},"text_sha256":"d4b7f871bbb9209f29668d55c381fc2bc02f1d43ac57d6bbe02ecb0457c0b4c5"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_multitask_english_italian_en.md","size":2777,"blob_sha":"1d80a94ab3a9ba34f12be3f3766a5ee544e2ed9c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_italian\ndate: 2024-08-10\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_italian_en_5.4.2_3.0_1723271251724.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_italian_en_5.4.2_3.0_1723271251724.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4E92:3D501:1868F5:5EF65B:6AB92DBE"},"text_sha256":"72db8c981781ea9bffe414ff606632c9b81ab12bafc6ffcab630260e72a02494"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_multitask_english_italian_pipeline_en.md","size":2140,"blob_sha":"c61a905b35929e14ad0cab2296f81e01eea6d6dd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_italian_pipeline\ndate: 2024-08-10\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_italian_pipeline_en_5.4.2_3.0_1723271314616.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_italian_pipeline_en_5.4.2_3.0_1723271314616.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EECE:1F1FB6:17EC47:5E78EC:6AB92DC6"},"text_sha256":"b38e235ef98cd8a4146fc3600a7dbe4f8f00a9212743579c284567816aa8fa6d"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_czech_german_en.md","size":2717,"blob_sha":"a9e4a9d8fdf03f92284cb0d4a70d4361081f5fd0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_german\ndate: 2024-08-10\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_en_5.4.2_3.0_1723294452267.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_en_5.4.2_3.0_1723294452267.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C66E:2E8679:17E160:5E6C57:6AB92DBD"},"text_sha256":"f81f74d6ab3c2599bd61fd5c54a3519bef9aa5c2b74d2d0ad88b6b0a157f308f"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_czech_german_pipeline_en.md","size":2080,"blob_sha":"62a45eb73d99436c45f2fc17364d3c59ff9e6d50","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_german_pipeline\ndate: 2024-08-10\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_pipeline_en_5.4.2_3.0_1723294506386.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_pipeline_en_5.4.2_3.0_1723294506386.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16B2:4F9CC:172A5E:5DB52C:6AB92DC6"},"text_sha256":"958f73eafb32e103e932e888a459b4b007231ed32e7833c4f5be4a3d601d10b6"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_swedish_english_en.md","size":2741,"blob_sha":"a5b2b7c719c8845f5e6b0dcdc690882f98e4c43e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_english\ndate: 2024-08-10\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_en_5.4.2_3.0_1723264276515.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_en_5.4.2_3.0_1723264276515.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4C58:345ED4:17A8B5:5E353E:6AB92DC7"},"text_sha256":"9b0d795f20cdb57c3904f619c640ec60ae61741d31d97e80cef8845b43cd0c28"},{"path":"docs/_posts/ahmedlone127/2024-08-10-legal_t5_small_trans_swedish_english_pipeline_en.md","size":2104,"blob_sha":"16a565394d28f35791870865b81621a8fe8846e0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_english_pipeline\ndate: 2024-08-10\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_pipeline_en_5.4.2_3.0_1723264338116.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_english_pipeline_en_5.4.2_3.0_1723264338116.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"32CE:09BF:B3744:2E687B:6AB92D5E"},"text_sha256":"33130597ff3842c88dc05163df9fff896ae411a30e1e8c24a03c3f8e43010234"},{"path":"docs/_posts/ahmedlone127/2024-08-11-flan_t5_summerize_legal_doc_en.md","size":2674,"blob_sha":"1b2f11f2e27dec5880bee733a91fe5a8e86c7ad1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English flan_t5_summerize_legal_doc T5Transformer from shlomik\nauthor: John Snow Labs\nname: flan_t5_summerize_legal_doc\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`flan_t5_summerize_legal_doc` is a English model originally trained by shlomik.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_en_5.4.2_3.0_1723376886441.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_en_5.4.2_3.0_1723376886441.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"flan_t5_summerize_legal_doc\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"flan_t5_summerize_legal_doc\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|flan_t5_summerize_legal_doc|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/shlomik/flan-T5-summerize-legal-doc","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"808A:3E1C8:180493:5E90FD:6AB92DC7"},"text_sha256":"5341741f2e37a6d5913b8846d3f132bc7b8d6cc326196fc4743b665157c2b9ab"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_key_tonga_tonga_islands_text_en.md","size":2719,"blob_sha":"519183bada8e56bfc1ff970b2ccf407d7003d32b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_key_tonga_tonga_islands_text T5Transformer from Wikram\nauthor: John Snow Labs\nname: legal_key_tonga_tonga_islands_text\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_key_tonga_tonga_islands_text` is a English model originally trained by Wikram.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_key_tonga_tonga_islands_text_en_5.4.2_3.0_1723366797913.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_key_tonga_tonga_islands_text_en_5.4.2_3.0_1723366797913.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_key_tonga_tonga_islands_text\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_key_tonga_tonga_islands_text\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_key_tonga_tonga_islands_text|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|965.3 MB|\n\n## References\n\nhttps://huggingface.co/Wikram/Legal-key-to-text","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B524:3FD49:179F2A:5E2D09:6AB92DC7"},"text_sha256":"a8c66f60ab0c83f231399a9d5f373412832d95ad609612f32b99fdfb7e6e3a10"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_key_tonga_tonga_islands_text_pipeline_en.md","size":2082,"blob_sha":"51dd3e394e6362f6861c363d5aed2a8469827313","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_key_tonga_tonga_islands_text_pipeline pipeline T5Transformer from Wikram\nauthor: John Snow Labs\nname: legal_key_tonga_tonga_islands_text_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_key_tonga_tonga_islands_text_pipeline` is a English model originally trained by Wikram.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_key_tonga_tonga_islands_text_pipeline_en_5.4.2_3.0_1723366853635.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_key_tonga_tonga_islands_text_pipeline_en_5.4.2_3.0_1723366853635.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_key_tonga_tonga_islands_text_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_key_tonga_tonga_islands_text_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_key_tonga_tonga_islands_text_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|965.3 MB|\n\n## References\n\nhttps://huggingface.co/Wikram/Legal-key-to-text\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4E92:3D501:186909:5EF6BA:6AB92DC8"},"text_sha256":"0c1a3460bf008eb4f28f94c03c4e94435627c636dd94b6d0ac476421903b9e3b"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_cls_finetuned_italian_en.md","size":2746,"blob_sha":"c221bc7657984ed4be786ce79b7383152643f196","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_italian\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_italian_en_5.4.2_3.0_1723411801981.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_italian_en_5.4.2_3.0_1723411801981.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C66E:2E8679:17E172:5E6CA7:6AB92DC8"},"text_sha256":"7cd69ba6a32eabac23509c235cb1ec17254a2a442627a340bca93ecf195353b8"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_cls_finetuned_italian_pipeline_en.md","size":2109,"blob_sha":"ed58fe318350c84570a150492f6b46f9755e7832","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_italian_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_italian_pipeline_en_5.4.2_3.0_1723411855326.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_italian_pipeline_en_5.4.2_3.0_1723411855326.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C9EE:1A3D83:1882E0:5F111D:6AB92DC8"},"text_sha256":"d570b2631bf0b3c9d88dd9c4a1ecfd25539315b51ff4f1feba52ef0d4c6d222a"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_english_swedish_en.md","size":2777,"blob_sha":"0c07319d8d726452eb8a772bbd8dbac33f949506","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_swedish\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_swedish_en_5.4.2_3.0_1723402103970.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_swedish_en_5.4.2_3.0_1723402103970.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"967A:149227:1832E0:5EC12C:6AB92DC9"},"text_sha256":"1d1dc3c283469ef1dbcf7c41d5c97833fa255664de6ad906e3b10baa290523df"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_english_swedish_pipeline_en.md","size":2140,"blob_sha":"5fe75db665730287355bc2e7269d16e5fbebfc5d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_swedish_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_swedish_pipeline_en_5.4.2_3.0_1723402162052.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_swedish_pipeline_en_5.4.2_3.0_1723402162052.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F3E:349C76:179400:5E1DE4:6AB92DC8"},"text_sha256":"a949db900ccc4fd262a0517adc4e44a58422eb98c262675fa2fc3df436756b48"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_english_en.md","size":2777,"blob_sha":"4e63e04ded7da6aafcf9d9c0ec49162b67629719","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_english\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_english_en_5.4.2_3.0_1723387413913.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_english_en_5.4.2_3.0_1723387413913.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDF8:3C4A0:17CFFF:5E5DFF:6AB92DC8"},"text_sha256":"6d3e623da0a3ad1026662c8ac0c413e2d49215e127985f1299234eb4d120fef9"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_english_pipeline_en.md","size":2140,"blob_sha":"3ae274dc69c1ec434c0d658bf0932e23998ea112","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_english_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_english_pipeline_en_5.4.2_3.0_1723387468183.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_english_pipeline_en_5.4.2_3.0_1723387468183.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4B8:324E19:181EF2:5EACB5:6AB92DC9"},"text_sha256":"05fbc1ac13dbb94e755a28d62222efae74a7d246123b16837ad1644e60c45a1a"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_german_en.md","size":2769,"blob_sha":"0da0381df28dc3eec1c804005b02f10aebd92a71","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_german\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_german_en_5.4.2_3.0_1723353951164.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_german_en_5.4.2_3.0_1723353951164.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98C:1A3D83:1882EE:5F1157:6AB92DC9"},"text_sha256":"2d15a24f9419ac5ccf32128cc947e3fb4820de015c29d61ad9a0a29a37c09c3b"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_italian_german_pipeline_en.md","size":2132,"blob_sha":"d5cce56f20bd7001ae6dcf0e33bc701964d4a952","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_german_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_german_pipeline_en_5.4.2_3.0_1723354013059.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_german_pipeline_en_5.4.2_3.0_1723354013059.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A32:3AC5A:18077C:5E9545:6AB92DCB"},"text_sha256":"f151608cae643080551dc41a9790561d78b4ac24a1760e23fc4660144450cc97"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_spanish_french_en.md","size":2769,"blob_sha":"404fab641239811863620d272853e24fabc89d27","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_french\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_french_en_5.4.2_3.0_1723368141860.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_french_en_5.4.2_3.0_1723368141860.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D066:40B0C:17F624:5E8473:6AB92DCB"},"text_sha256":"317754b40b327e341dbe4541b1592f665376bab8df05dafa5995ec673af4b62e"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_multitask_spanish_french_pipeline_en.md","size":2132,"blob_sha":"efe48d0e1fd7e8c8039288a433acbef57fe3461d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_french_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_french_pipeline_en_5.4.2_3.0_1723368199093.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_french_pipeline_en_5.4.2_3.0_1723368199093.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6392:40B0C:17F62C:5E847F:6AB92DC5"},"text_sha256":"ce0b69c17d8f9de3bf9fff0a0dc48ddb54c9c661a1ee0d725803b2bddd3b1e65"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_czech_spanish_en.md","size":2725,"blob_sha":"6cda1bdf6a964a84f4c370aacf12fd7f8910a022","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_spanish\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_en_5.4.2_3.0_1723362117629.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_en_5.4.2_3.0_1723362117629.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EACA:727CE:176196:5DF009:6AB92DC6"},"text_sha256":"b0c8d0787df55805ad812141b262e0f9900e24155c6f1c052e69d2a4720c42f4"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_czech_spanish_pipeline_en.md","size":2088,"blob_sha":"5d57c6de93d30ceda3c233f338213c9a8905a710","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_spanish_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_pipeline_en_5.4.2_3.0_1723362171205.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_pipeline_en_5.4.2_3.0_1723362171205.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F56A:285814:174AF6:5DD8B6:6AB92DCD"},"text_sha256":"74cc0f1f007ddebeb85fb1c972e77da203d62588eb4d444afde85cc76d1b9dc8"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_french_en.md","size":2733,"blob_sha":"3828d115e4d92bb93a8d027122a9b16aeb6c4904","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_french\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_en_5.4.2_3.0_1723344861434.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_en_5.4.2_3.0_1723344861434.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BA76:3B1F3:186E2A:5EFD27:6AB92DCD"},"text_sha256":"164557adab6dca9d046a89c09686d69e490f1d3eda6495e44f3c16cc31f2c29d"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_french_pipeline_en.md","size":2096,"blob_sha":"16550a6911c928b81efeb62b9ad4a8f9f97cbe30","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_french_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_pipeline_en_5.4.2_3.0_1723344915718.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_pipeline_en_5.4.2_3.0_1723344915718.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4E92:3D501:186937:5EF797:6AB92DCD"},"text_sha256":"0150e9b82dc602131a3090f27beecc3f7d19d226f71ce05381babf21d94ab9b8"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_german_small_finetuned_en.md","size":2877,"blob_sha":"cc98db34534ff7609de4e51c39d15b456e1ac16c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_german_small_finetuned\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_small_finetuned_en_5.4.2_3.0_1723366211073.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_small_finetuned_en_5.4.2_3.0_1723366211073.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C98C:1A3D83:18830E:5F11F6:6AB92DCD"},"text_sha256":"c3390be7e08ee8994a0852df0c5bac2e8a0c5c739ed88512f56bebcde0e07bf9"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_english_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"2f058aef0dcaeb0376205512e7ffbe4f3bdc5a0e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_german_small_finetuned_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_small_finetuned_pipeline_en_5.4.2_3.0_1723366265566.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_small_finetuned_pipeline_en_5.4.2_3.0_1723366265566.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0928:3FA0D:179CD1:5E2AB6:6AB92DCE"},"text_sha256":"62cd499dc34d5516674ea9a753118163fb63c41b43359f73ab76c970e1a766b1"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_french_italian_small_finetuned_en.md","size":2877,"blob_sha":"85228fbcb16ac8af213995f49f48626815b9b965","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_italian_small_finetuned\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_small_finetuned_en_5.4.2_3.0_1723357704059.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_small_finetuned_en_5.4.2_3.0_1723357704059.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6CAC:3D40A:17432E:5DD155:6AB92DCE"},"text_sha256":"794008a4c761956f4116fc5d2cb5388e68a50c1fd04369ebdad2643492adcd3b"},{"path":"docs/_posts/ahmedlone127/2024-08-11-legal_t5_small_trans_french_italian_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"5d4ac19b40999f8aa6a863765c34ed24bcae0d0a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_italian_small_finetuned_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_small_finetuned_pipeline_en_5.4.2_3.0_1723357761090.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_italian_small_finetuned_pipeline_en_5.4.2_3.0_1723357761090.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:1817E2:5EA4FF:6AB92DCE"},"text_sha256":"b6c6404a4aa60a4ae1ac0713d5634067d5f1a326d16398037c2d9fc3d8286c32"},{"path":"docs/_posts/ahmedlone127/2024-08-11-t5_base_ai4privacy_en.md","size":2596,"blob_sha":"aed0ea3aa8c1f3a859cdd6243b00b5753aac202f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_base_ai4privacy T5Transformer from Isotonic\nauthor: John Snow Labs\nname: t5_base_ai4privacy\ndate: 2024-08-11\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_base_ai4privacy` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_base_ai4privacy_en_5.4.2_3.0_1723375437851.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_base_ai4privacy_en_5.4.2_3.0_1723375437851.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"t5_base_ai4privacy\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"t5_base_ai4privacy\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_base_ai4privacy|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Isotonic/t5-base-ai4privacy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:17433B:5DD173:6AB92DCF"},"text_sha256":"3e3a8088bb1ae5cbcd5fb01a1461c9dc0247b399270651bf04b1ee4db26106d4"},{"path":"docs/_posts/ahmedlone127/2024-08-11-t5_base_ai4privacy_pipeline_en.md","size":1959,"blob_sha":"f9c9bfc459bc405c45e99aa83c780463fd4b291f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_base_ai4privacy_pipeline pipeline T5Transformer from Isotonic\nauthor: John Snow Labs\nname: t5_base_ai4privacy_pipeline\ndate: 2024-08-11\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_base_ai4privacy_pipeline` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_base_ai4privacy_pipeline_en_5.4.2_3.0_1723375480581.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_base_ai4privacy_pipeline_en_5.4.2_3.0_1723375480581.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"t5_base_ai4privacy_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"t5_base_ai4privacy_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_base_ai4privacy_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Isotonic/t5-base-ai4privacy\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"80B0:3A3DD:17AED5:5E3D4A:6AB92DC9"},"text_sha256":"b4a1a2ef4e8747552407687f12920f0fa1294504d1fe29f118b84a42649f0ba0"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_base_en.md","size":2548,"blob_sha":"0f94a696017760ba377aca09a7a8b737ce154d48","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_base T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_base\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_base` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_base_en_5.4.2_3.0_1723436157408.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_base_en_5.4.2_3.0_1723436157408.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_base\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_base\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_base|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"80B0:3A3DD:17AEDA:5E3D56:6AB92DD0"},"text_sha256":"9e677420961d79e0693b923e071717209685395150f26120c75898b24762197c"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_base_pipeline_en.md","size":1911,"blob_sha":"3f43c66cd6782b119544ab42ada5b0fd608d3724","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_base_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_base_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_base_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_base_pipeline_en_5.4.2_3.0_1723436205141.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_base_pipeline_en_5.4.2_3.0_1723436205141.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_base_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_base_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-base\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:17944A:5E1F0D:6AB92DD0"},"text_sha256":"b1a0b90f2959820776e8c8b06f7d47fc0a934d98f016200311b39b7efda86cbf"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_finetuned_summ_italian_en.md","size":2755,"blob_sha":"3d2d75dddaef1a785b5b5541d4a972af1551e8e0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_italian\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_italian_en_5.4.2_3.0_1723440796331.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_italian_en_5.4.2_3.0_1723440796331.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6392:40B0C:17F670:5E853A:6AB92DCF"},"text_sha256":"11d459d64f4d8f330e9cfb3ba86ad07316f5b46775e1684ad4e73d91997eda57"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_finetuned_summ_italian_pipeline_en.md","size":2118,"blob_sha":"bc728bc2e435e8c26222f06d38a6195a6c86c2f2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_italian_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_italian_pipeline_en_5.4.2_3.0_1723440849321.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_italian_pipeline_en_5.4.2_3.0_1723440849321.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDBA:A58F2:177616:5E050D:6AB92DD0"},"text_sha256":"78972fc5fe293f4214671a7f141b21c49684ce87bd80c4cbad3c4f5c5cc1007e"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_multitask_italian_swedish_en.md","size":2777,"blob_sha":"c43fae50f4da89df041449137bd39a96bd824d3e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_swedish\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_swedish_en_5.4.2_3.0_1723431667536.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_swedish_en_5.4.2_3.0_1723431667536.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F56A:285814:174B31:5DD96A:6AB92DD2"},"text_sha256":"3741df1d9bcbd0554b78cf7a8e3dbf595daa9a698651aad8fecd345655674fef"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_multitask_italian_swedish_pipeline_en.md","size":2140,"blob_sha":"54b96688074bd86bd1826fb250c802b88567af9e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_swedish_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_swedish_pipeline_en_5.4.2_3.0_1723431723189.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_swedish_pipeline_en_5.4.2_3.0_1723431723189.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:17A0A6:5659CC:6AB92DD1"},"text_sha256":"cf03098a00ff48a69ea023505b4c434bec147ff8f29ef38ba730bb1556fda79a"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_czech_small_finetuned_en.md","size":2869,"blob_sha":"be6bb1b94590a6a66312350c8ed86627ac885065","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_czech_small_finetuned\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_small_finetuned_en_5.4.2_3.0_1723447825566.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_small_finetuned_en_5.4.2_3.0_1723447825566.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DC8:285814:174B3D:5DD984:6AB92DCE"},"text_sha256":"27718cb71faaa215970599fdbf8d21ca0117e7294a4eb1d1e39eb16577cdf3e5"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"039639dd0eb4096b3ea5949be30d23a3c262b0b2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_czech_small_finetuned_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_small_finetuned_pipeline_en_5.4.2_3.0_1723447878494.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_small_finetuned_pipeline_en_5.4.2_3.0_1723447878494.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D066:40B0C:17F684:5E857C:6AB92DD1"},"text_sha256":"53915ff721de89c5e430c6edf420be54a2e7cc2be4dc9467569f9af22bc34c04"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_english_small_finetuned_en.md","size":2885,"blob_sha":"9b98a448783cf289e5f92326256dbbbb3171ecda","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_english_small_finetuned\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_small_finetuned_en_5.4.2_3.0_1723462095524.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_small_finetuned_en_5.4.2_3.0_1723462095524.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB1C:1A3D83:188362:5F12C7:6AB92DD3"},"text_sha256":"32b37e086176406d8cbbada54cc65c504a68b074a30a9276c4379cf4f445eaae"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_t5_small_trans_italian_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"f2c4bf4b4c90cc9ba56bd85f0338df3aa59c265b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_english_small_finetuned_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_small_finetuned_pipeline_en_5.4.2_3.0_1723462150607.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_small_finetuned_pipeline_en_5.4.2_3.0_1723462150607.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F758:3FA0D:179D08:5E2B71:6AB92DD3"},"text_sha256":"2ae3635dcdcc60540a27bbc5d9d480a833b1d06e046cb7f01fd6b245d3ca67b1"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_text_summarizer_aiguy68_en.md","size":2686,"blob_sha":"1a45fd0ff271dafc4e08a961d2e457fb631e60be","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_text_summarizer_aiguy68 T5Transformer from aiguy68\nauthor: John Snow Labs\nname: legal_text_summarizer_aiguy68\ndate: 2024-08-12\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_text_summarizer_aiguy68` is a English model originally trained by aiguy68.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_text_summarizer_aiguy68_en_5.4.2_3.0_1723440847492.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_text_summarizer_aiguy68_en_5.4.2_3.0_1723440847492.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_text_summarizer_aiguy68\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_text_summarizer_aiguy68\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_text_summarizer_aiguy68|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|335.0 MB|\n\n## References\n\nhttps://huggingface.co/aiguy68/legal_text_summarizer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"967A:149227:183374:5EC2F4:6AB92DD3"},"text_sha256":"324ca454014bf75361b0b6ade3055682c5b4f6388c480916eb23dc2f7ad7f646"},{"path":"docs/_posts/ahmedlone127/2024-08-12-legal_text_summarizer_aiguy68_pipeline_en.md","size":2049,"blob_sha":"cd728f1baace7536db2879105833bc6ddc9eac9d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_text_summarizer_aiguy68_pipeline pipeline T5Transformer from aiguy68\nauthor: John Snow Labs\nname: legal_text_summarizer_aiguy68_pipeline\ndate: 2024-08-12\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_text_summarizer_aiguy68_pipeline` is a English model originally trained by aiguy68.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_text_summarizer_aiguy68_pipeline_en_5.4.2_3.0_1723440864892.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_text_summarizer_aiguy68_pipeline_en_5.4.2_3.0_1723440864892.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_text_summarizer_aiguy68_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_text_summarizer_aiguy68_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_text_summarizer_aiguy68_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|335.0 MB|\n\n## References\n\nhttps://huggingface.co/aiguy68/legal_text_summarizer\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DCA6:24970A:18644B:5EF0D9:6AB92DD3"},"text_sha256":"f78a0ac4e5cbfa66d1fda81a5138cde42626b75ec244ea33dbf0bf1cfc9ef418"},{"path":"docs/_posts/ahmedlone127/2024-08-13-t5_small_finetuned_policy_en.md","size":2661,"blob_sha":"190a75e035b24718cef10be6ef32286b790b4938","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_finetuned_policy T5Transformer from star-nox\nauthor: John Snow Labs\nname: t5_small_finetuned_policy\ndate: 2024-08-13\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_finetuned_policy` is a English model originally trained by star-nox.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_policy_en_5.4.2_3.0_1723510548078.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_policy_en_5.4.2_3.0_1723510548078.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"t5_small_finetuned_policy\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"t5_small_finetuned_policy\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_finetuned_policy|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|284.2 MB|\n\n## References\n\nhttps://huggingface.co/star-nox/t5-small-finetuned-policy","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:18180C:5EA5AB:6AB92DD3"},"text_sha256":"7b6e6728233620d823ff5f12f7a142a543a35c807fe08744a20735ee044cc99a"},{"path":"docs/_posts/ahmedlone127/2024-08-13-t5_small_finetuned_policy_pipeline_en.md","size":2024,"blob_sha":"4fac86e97cb68b3b7cb738a615adf48b4a3ff9f7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_finetuned_policy_pipeline pipeline T5Transformer from star-nox\nauthor: John Snow Labs\nname: t5_small_finetuned_policy_pipeline\ndate: 2024-08-13\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_finetuned_policy_pipeline` is a English model originally trained by star-nox.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_policy_pipeline_en_5.4.2_3.0_1723510577082.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_policy_pipeline_en_5.4.2_3.0_1723510577082.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"t5_small_finetuned_policy_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"t5_small_finetuned_policy_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_finetuned_policy_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|284.2 MB|\n\n## References\n\nhttps://huggingface.co/star-nox/t5-small-finetuned-policy\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"42C4:7A4F8:1845EE:5ED549:6AB92DD5"},"text_sha256":"8aabf5f0f5a161a6800beee36fd88e4929a6eef0074877fec19cbd3ba6dc39cd"},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_large_chunked_en.md","size":2629,"blob_sha":"48c1ee876fe1ab2e6bfe0c8a1a776c435a5d74da","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large_chunked T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large_chunked\ndate: 2024-08-16\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large_chunked` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_chunked_en_5.4.2_3.0_1723842593256.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_chunked_en_5.4.2_3.0_1723842593256.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_large_chunked\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_large_chunked\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large_chunked|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large-chunked","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C994:3C4A0:17D076:5E5F83:6AB92DD5"},"text_sha256":"56fcf89a87a93e8b50e71b2e3096bd44f36194a8f9a9a13a9ae151e2e1826228"},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_large_chunked_pipeline_en.md","size":1992,"blob_sha":"c2f81c2ab090c1d39bb4c76bb7c22f873a546850","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large_chunked_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large_chunked_pipeline\ndate: 2024-08-16\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large_chunked_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_chunked_pipeline_en_5.4.2_3.0_1723842730877.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_chunked_pipeline_en_5.4.2_3.0_1723842730877.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_large_chunked_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_large_chunked_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large_chunked_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large-chunked\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C18E:3CC8A:17F4EC:5E843B:6AB92DD6"},"text_sha256":"ce8220c5f9f84aebc12f5f9ab9d4f06ace5b5d6162329a855ab0e41bd550597f"},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_small_summ_english_en.md","size":2665,"blob_sha":"76b40a1a66ff32e3239f62b8de90076db9d4d83b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_english\ndate: 2024-08-16\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_english_en_5.4.2_3.0_1723802332838.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_english_en_5.4.2_3.0_1723802332838.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|175.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:18339F:5EC353:6AB92DD6"},"text_sha256":"e916435a5ef7d97ddcff1e1801844564174641a697dd32338e3c129c03f19c91"},{"path":"docs/_posts/ahmedlone127/2024-08-16-legal_t5_small_summ_english_pipeline_en.md","size":2028,"blob_sha":"cd59215bf2c38bdb94bac9d3654969f4b515a8a1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_english_pipeline\ndate: 2024-08-16\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_english_pipeline_en_5.4.2_3.0_1723802393477.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_english_pipeline_en_5.4.2_3.0_1723802393477.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|175.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8DEA:3FD49:179FD1:5E2F41:6AB92DD6"},"text_sha256":"864879f89355ea3c789c4eb7fefe14a82bca84ebddd6a18415af3f7fdb5a7432"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_french_en.md","size":2753,"blob_sha":"5200a038bb1754aa70772c15e7927764303e38cd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_french\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_french_en_5.4.2_3.0_1723905506151.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_french_en_5.4.2_3.0_1723905506151.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1BA2:35999:17AF74:5E3F64:6AB92DD6"},"text_sha256":"030f3925c13dc437047ea83a197c9e4327c6b54207eff47b281a72294b435b1c"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_french_pipeline_en.md","size":2116,"blob_sha":"cc0005e5a4f7d008e401ed2ed28f50014b17fcf8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_french_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_french_pipeline_en_5.4.2_3.0_1723905568568.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_french_pipeline_en_5.4.2_3.0_1723905568568.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13B6:3B6DE:178408:5E1276:6AB92DD7"},"text_sha256":"25e4f7ea9623261ac17e8a24cb5769141758b4ae64d983df60063bd19979ee90"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_german_en.md","size":2753,"blob_sha":"fe71009b623e4ec47b03aadd1f28e061efe457fb","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_german\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_german_en_5.4.2_3.0_1723861268419.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_german_en_5.4.2_3.0_1723861268419.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3EE8:3B7E2:1728B8:5DB8F7:6AB92DD7"},"text_sha256":"2e7a84f246696d607454fd54b1be166e509dcb722971fa3914b9024ab811d825"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_czech_german_pipeline_en.md","size":2116,"blob_sha":"10eb9919eb852f66392269f28057f21a57460b80","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_german_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_german_pipeline_en_5.4.2_3.0_1723861331065.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_german_pipeline_en_5.4.2_3.0_1723861331065.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"374C:11E74B:17BA8F:5E489A:6AB92DD8"},"text_sha256":"64db66b6d30a7a7dd779c13f454874ba7862f603cb65c784550611aeea3e2b10"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_french_german_en.md","size":2761,"blob_sha":"f4a25451d420cd0ce746ba5ea507ae40343adbd5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_german\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_german_en_5.4.2_3.0_1723921876720.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_german_en_5.4.2_3.0_1723921876720.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_french_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_french_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C814:3FD49:179FEC:5E2F89:6AB92DD8"},"text_sha256":"2e92e5863e21c3d1623618cd53ca198a72cf53f1686b8a5859143628e233a8c4"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_multitask_french_german_pipeline_en.md","size":2124,"blob_sha":"a62c3182dfa4aec35fed41c65ea5e222c905976b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_french_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_french_german_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_french_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_german_pipeline_en_5.4.2_3.0_1723921939814.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_french_german_pipeline_en_5.4.2_3.0_1723921939814.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_french_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_french_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_french_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_fr_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EAD2:18CDF1:17A0D9:565A91:6AB92DD7"},"text_sha256":"c9088a445b8f94ce40b641958e9db6cc1542e80d19d4e9c8240e12bd98f9df6c"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_summ_multitask_english_en.md","size":2755,"blob_sha":"8007861c90ed91a1d31085b072c9ab31ac1b8c1f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_english\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_english_en_5.4.2_3.0_1723913158274.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_english_en_5.4.2_3.0_1723913158274.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D54:3B1F3:186EAC:5EFEC1:6AB92DD9"},"text_sha256":"f1434eaacea72c8dea333bc0a78dc6786ee0e76dd032c6b18f4c24574a8251a5"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_summ_multitask_english_pipeline_en.md","size":2118,"blob_sha":"e4ffdcd5b8663b355573cd936993792e69eb2b0d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_english_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_english_pipeline_en_5.4.2_3.0_1723913220617.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_english_pipeline_en_5.4.2_3.0_1723913220617.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D9A8:3BCC6:17EFAF:5E7EDB:6AB92DD9"},"text_sha256":"cd258acb6c5704a98fb72605ffedf5e4065d2d1cd5618d13dc9b9a0eb837d8d3"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_english_french_small_finetuned_en.md","size":2877,"blob_sha":"0cfe3576b01becc380f8858dba0571326c27f974","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_french_small_finetuned\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_small_finetuned_en_5.4.2_3.0_1723870176416.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_small_finetuned_en_5.4.2_3.0_1723870176416.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4938:24970A:186474:5EF1B4:6AB92DDA"},"text_sha256":"11d0b094790fece5acfdebd1fbba4f600d7e569e9d88aaec4a62ab0f093e3bd6"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_english_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"e726cf6b9d90c908a6c53f3262e090c415bd05bd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_french_small_finetuned_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_small_finetuned_pipeline_en_5.4.2_3.0_1723870237028.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_french_small_finetuned_pipeline_en_5.4.2_3.0_1723870237028.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B812:3BCC6:17EFB6:5E7F2A:6AB92DD9"},"text_sha256":"55a817404632036884d1ffb5e98a0da966a2627ad0a63baf8cad2a2aff3f172b"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_italian_french_small_finetuned_en.md","size":2877,"blob_sha":"132fe5f288376fb95dce1cd96c095b84f65808af","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_french_small_finetuned\ndate: 2024-08-17\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_small_finetuned_en_5.4.2_3.0_1723858527262.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_small_finetuned_en_5.4.2_3.0_1723858527262.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:1743AE:5DD31F:6AB92DDA"},"text_sha256":"f615f4ed2fced1693bed73a3b843d5d991dc6762235a4930f6cbb2034d300298"},{"path":"docs/_posts/ahmedlone127/2024-08-17-legal_t5_small_trans_italian_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"663561e0cf7c2cbcf0bc6df8201bef011ad858a4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_french_small_finetuned_pipeline\ndate: 2024-08-17\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_small_finetuned_pipeline_en_5.4.2_3.0_1723858588827.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_small_finetuned_pipeline_en_5.4.2_3.0_1723858588827.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E86:A58F2:17764F:5E062A:6AB92DDA"},"text_sha256":"f25cf79604331e05346866432489cbdc3a113332fa7a1bcd181470bf99e6c0fd"},{"path":"docs/_posts/ahmedlone127/2024-08-18-flan_t5_summerize_legal_doc_padded_en.md","size":2737,"blob_sha":"fbedeeda5cd62e94ebfcf287d3f5c3550e89830e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English flan_t5_summerize_legal_doc_padded T5Transformer from shlomik\nauthor: John Snow Labs\nname: flan_t5_summerize_legal_doc_padded\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`flan_t5_summerize_legal_doc_padded` is a English model originally trained by shlomik.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_padded_en_5.4.2_3.0_1724007997246.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_padded_en_5.4.2_3.0_1724007997246.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"flan_t5_summerize_legal_doc_padded\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"flan_t5_summerize_legal_doc_padded\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|flan_t5_summerize_legal_doc_padded|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/shlomik/flan-T5-summerize-legal-doc-padded","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDDC:18233:17BF37:5E4DCE:6AB92DDA"},"text_sha256":"925d4587244fac91a3672b4a74d706e7d1fbf884f3b81332d5078bd8f2ef4458"},{"path":"docs/_posts/ahmedlone127/2024-08-18-flan_t5_summerize_legal_doc_padded_pipeline_en.md","size":2100,"blob_sha":"be7a770c339b4a4144070a46b88c9129b76b57db","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English flan_t5_summerize_legal_doc_padded_pipeline pipeline T5Transformer from shlomik\nauthor: John Snow Labs\nname: flan_t5_summerize_legal_doc_padded_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`flan_t5_summerize_legal_doc_padded_pipeline` is a English model originally trained by shlomik.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_padded_pipeline_en_5.4.2_3.0_1724008125002.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/flan_t5_summerize_legal_doc_padded_pipeline_en_5.4.2_3.0_1724008125002.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"flan_t5_summerize_legal_doc_padded_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"flan_t5_summerize_legal_doc_padded_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|flan_t5_summerize_legal_doc_padded_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/shlomik/flan-T5-summerize-legal-doc-padded\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F50:18CDF1:17A0F6:565ADA:6AB92DDB"},"text_sha256":"ba1e2c63c51da4d269354c8d2bb671de6d776c440f5c97766912ec5a21adda6c"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_flan_t5_chunked_en.md","size":2620,"blob_sha":"2a066862b132474fc7de55ceeb7502f7113f0ca8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_flan_t5_chunked T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_flan_t5_chunked\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_flan_t5_chunked` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_flan_t5_chunked_en_5.4.2_3.0_1723993707929.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_flan_t5_chunked_en_5.4.2_3.0_1723993707929.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_flan_t5_chunked\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_flan_t5_chunked\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_flan_t5_chunked|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-flan-t5-chunked","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:18233:17BF3E:5E4DF1:6AB92DDB"},"text_sha256":"d17b5919b763dee501624e969ab308b5343bafc071570b27e1864e6c0674ff25"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_flan_t5_chunked_pipeline_en.md","size":1983,"blob_sha":"e58644549b9852730605ebc4906c1b7dbb1d3c6d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_flan_t5_chunked_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_flan_t5_chunked_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_flan_t5_chunked_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_flan_t5_chunked_pipeline_en_5.4.2_3.0_1723993842209.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_flan_t5_chunked_pipeline_en_5.4.2_3.0_1723993842209.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_flan_t5_chunked_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_flan_t5_chunked_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_flan_t5_chunked_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-flan-t5-chunked\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17F52D:5E83DD:6AB92DD0"},"text_sha256":"ac109823995f580b9deedf97863867ae13e2e55cbe0ad97186a8a149ceeb896e"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_large_hybrid_en.md","size":2620,"blob_sha":"67e7302bd4613698076956c0f94c588b95b5ee84","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large_hybrid T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large_hybrid\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large_hybrid` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_hybrid_en_5.4.2_3.0_1723991385730.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_hybrid_en_5.4.2_3.0_1723991385730.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_large_hybrid\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_large_hybrid\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large_hybrid|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large-hybrid","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9580:7A4F8:184622:5ED66F:6AB92DD8"},"text_sha256":"b649855e445eacb189ec75719502c4ce6508af2654951df8c1bb0e2ff25ccbdb"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_large_hybrid_pipeline_en.md","size":1983,"blob_sha":"69f07af2519701fd1a205e7d8838e7ae36623086","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large_hybrid_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large_hybrid_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large_hybrid_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_hybrid_pipeline_en_5.4.2_3.0_1723991523836.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_hybrid_pipeline_en_5.4.2_3.0_1723991523836.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_large_hybrid_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_large_hybrid_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large_hybrid_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large-hybrid\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F508:3B1F3:186ED3:5EFF83:6AB92DDC"},"text_sha256":"34d8cbad51f95f045eaa9e16f9f7aa76cd0242c5c1588c28626e0f600c189113"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_cls_finetuned_french_en.md","size":2738,"blob_sha":"436c5f508e752a2d19b791c094aa9ea3ed056d49","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_french\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_french_en_5.4.2_3.0_1724019948346.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_french_en_5.4.2_3.0_1724019948346.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F1CC:29FD16:185B1C:5EEAE3:6AB92DDC"},"text_sha256":"44879894498512cfe38715652cf55efa1db091c67d965ae1bba2e6dbc95a2e6c"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_cls_finetuned_french_pipeline_en.md","size":2101,"blob_sha":"052ddc13b654a263020ba20dd271e73a08ef0e05","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_french_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_french_pipeline_en_5.4.2_3.0_1724020006295.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_french_pipeline_en_5.4.2_3.0_1724020006295.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"92F4:3FD49:17A02A:5E3081:6AB92DDD"},"text_sha256":"c0f90dc731d326adb48166b9c577f159066383e7d497e8f317895caacb289567"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_finetuned_summ_french_en.md","size":2747,"blob_sha":"d2508058729d02963211e33181f2cb9232fc6203","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_french\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_french_en_5.4.2_3.0_1723995818985.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_french_en_5.4.2_3.0_1723995818985.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6FE8:7A4F8:184633:5ED6AB:6AB92DDE"},"text_sha256":"2fa5868f8a3f72104e93eff528c8f42e2aa3bf291f8ae09dc76d20459ae1c153"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_finetuned_summ_french_pipeline_en.md","size":2110,"blob_sha":"8f8f6e3c5d572bcc06a5122b91143ccf47949901","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_french_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_french_pipeline_en_5.4.2_3.0_1723995876022.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_french_pipeline_en_5.4.2_3.0_1723995876022.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6788:149227:18341E:5EC4DE:6AB92DDE"},"text_sha256":"aa0117a39d49de6961c695582c70b5dd2800382cca80a66016dde294316a61f4"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_multitask_swedish_czech_en.md","size":2761,"blob_sha":"89a8b54c61e14302b862b2a44e03026e7af6785d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_czech\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_czech_en_5.4.2_3.0_1724024445280.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_czech_en_5.4.2_3.0_1724024445280.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E06:35EBC:17A3C3:5E33B2:6AB92DDE"},"text_sha256":"4cb13a6ef1c72432b6a14456e4fb87a6f3b0699866e415d946c932866abd2dba"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_multitask_swedish_czech_pipeline_en.md","size":2124,"blob_sha":"8bce5f0b426eb80b388617010786c1d5a539a028","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_czech_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_czech_pipeline_en_5.4.2_3.0_1724024504359.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_czech_pipeline_en_5.4.2_3.0_1724024504359.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8408:09ED:E71D6:3FBB7E:6AB92DDD"},"text_sha256":"0d1a9bbeabbf61f9aa9ba96b6db4bd05f1397cf754bcfe2fad29fcf064f13691"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_czech_en.md","size":2725,"blob_sha":"0609384b533476f3a08c80a19618b0b88ed0e6df","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_czech\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_en_5.4.2_3.0_1724007432089.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_en_5.4.2_3.0_1724007432089.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.0 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"374C:11E74B:17BAC8:5E49CC:6AB92DDF"},"text_sha256":"181b4fb63f3ecc1052ec975a7485f382f91797feba80e7d381e279e07afd1a65"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_czech_pipeline_en.md","size":2088,"blob_sha":"7066678740398ed5c29d10a8b9753724facb7892","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_czech_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_pipeline_en_5.4.2_3.0_1724007489828.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_czech_pipeline_en_5.4.2_3.0_1724007489828.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.0 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:18343B:5EC527:6AB92DDF"},"text_sha256":"375e736c1df6943ebfdea7bdad32f8d11194d26ef5461b2c80b289563eb52982"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_swedish_en.md","size":2741,"blob_sha":"7404d45577ec8aaba3496975b0d5a08cc72aeb14","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_swedish\ndate: 2024-08-18\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_en_5.4.2_3.0_1723989121196.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_en_5.4.2_3.0_1723989121196.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16B2:4F9CC:172B4A:5DB8FF:6AB92DE0"},"text_sha256":"86c8ebddcf724376a940e9435045a75a5f36a07ae570e69b23b4ec36b2d9d02b"},{"path":"docs/_posts/ahmedlone127/2024-08-18-legal_t5_small_trans_italian_swedish_pipeline_en.md","size":2104,"blob_sha":"9fa97bcfbd78c7c8693abc8b706393e93cd259f8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_swedish_pipeline\ndate: 2024-08-18\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_pipeline_en_5.4.2_3.0_1723989178439.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_swedish_pipeline_en_5.4.2_3.0_1723989178439.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5846:18233:17BF77:5E4EB3:6AB92DE0"},"text_sha256":"9f300183b732d7f6fbd277d7f32b3262dd89915ce11932bae1cac1c664743cfe"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_cls_swedish_en.md","size":2656,"blob_sha":"dd47be1a2b031b4d3f9ac1f5e8e1168c0ff66072","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_swedish\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_swedish_en_5.4.2_3.0_1724048577392.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_swedish_en_5.4.2_3.0_1724048577392.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F032:29FD16:185B45:5EEB7A:6AB92DDF"},"text_sha256":"eb0ccdbde0f6c4857215fbcfb45a3875de607ca65adbe931b8a9d68c17917cad"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_cls_swedish_pipeline_en.md","size":2019,"blob_sha":"82571b6de331dee70d9fc70d8400730f322d28d1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_swedish_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_swedish_pipeline_en_5.4.2_3.0_1724048638113.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_swedish_pipeline_en_5.4.2_3.0_1724048638113.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39F0:18233:17BF81:5E4ED2:6AB92DE0"},"text_sha256":"5f299e6f837f876b3e6aef4e36ea485fe89a1b8d0a68f3042f35d1dad5f0b1bb"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_german_english_en.md","size":2769,"blob_sha":"0460122d56bbe0c71d500c1cf4de0b7d7dbdfb65","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_english\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_english_en_5.4.2_3.0_1724095938389.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_english_en_5.4.2_3.0_1724095938389.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_german_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_german_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EEE2:3BCC6:17F008:5E8049:6AB92DE1"},"text_sha256":"3db07c47353f63935fa1ca7b21efdf8a8d1eb891e1e08ac180fd5cdb786c4a40"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_german_english_pipeline_en.md","size":2132,"blob_sha":"92e4170df6e2493419d0a806a9d91c83f3f1cdfe","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_english_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_english_pipeline_en_5.4.2_3.0_1724095999304.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_english_pipeline_en_5.4.2_3.0_1724095999304.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_german_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_german_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E14:3FA0D:179DD0:5E2DDC:6AB92DE1"},"text_sha256":"9f2376c2645aca5cf2bf1826e62f4d953878287f079a9beb22b6c37b6301ca3e"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_italian_en.md","size":2777,"blob_sha":"29c6913b849aa7f7963eed5948a1da96692bb511","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_italian\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_italian_en_5.4.2_3.0_1724067872247.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_italian_en_5.4.2_3.0_1724067872247.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17F573:5E8506:6AB92DE1"},"text_sha256":"65634f7aead264e620d5df510beb842a981a289122298615246b69c7a72d17e0"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_italian_pipeline_en.md","size":2140,"blob_sha":"8218c0477c94f7daee90367472612d271e79f6a7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_italian_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_italian_pipeline_en_5.4.2_3.0_1724067935989.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_italian_pipeline_en_5.4.2_3.0_1724067935989.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F0E:3D40A:1743FE:5DD453:6AB92DE2"},"text_sha256":"15823d6e55b75df4ad8ee4147d74d0b77cf4c70ab4f02d7224db2968da5fc031"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_swedish_en.md","size":2777,"blob_sha":"332701f98024421299ab2025d3124dd904b675af","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_swedish\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_swedish_en_5.4.2_3.0_1724069306854.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_swedish_en_5.4.2_3.0_1724069306854.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4BC:1F1FB6:17ED68:5E7D50:6AB92DE2"},"text_sha256":"66bc7b24587e80fbbe7626cc7ade730278402a6c0e9b7543ab968e2d83333034"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_multitask_spanish_swedish_pipeline_en.md","size":2140,"blob_sha":"c9c65dfb12d345896bcc7934a5eecab7cad68da9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_swedish_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_swedish_pipeline_en_5.4.2_3.0_1724069369093.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_swedish_pipeline_en_5.4.2_3.0_1724069369093.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D86C:35EBC:17A3F8:5E346A:6AB92DE2"},"text_sha256":"e1f25a8b858374251960c91e274f5960a90b6077c0d9e2e62a131da4ea173b9c"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_english_italian_small_finetuned_en.md","size":2885,"blob_sha":"3ff36e18016c3189eb3bd3fc04ebacb133195000","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_italian_small_finetuned\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_small_finetuned_en_5.4.2_3.0_1724072354643.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_small_finetuned_en_5.4.2_3.0_1724072354643.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DCA:2B291E:185741:5EE85C:6AB92DE3"},"text_sha256":"099bd7d6a117d79592642b3883e5f1c68a253aab61dd4a7c10bd20028a515b12"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_english_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"817c501f4ff8f30a59e759c03a21733cb1180ed7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_italian_small_finetuned_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724072416159.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724072416159.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:185745:5EE86E:6AB92DE4"},"text_sha256":"111a1f591a8c88d26ac971d72236bc4ef720058509f2c2466de10a2ad8f6ef93"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_french_swedish_small_finetuned_en.md","size":2877,"blob_sha":"a68c8816a55574d644f2726604f5ef87942b221a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_swedish_small_finetuned\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_small_finetuned_en_5.4.2_3.0_1724092268292.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_small_finetuned_en_5.4.2_3.0_1724092268292.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D9A8:3BCC6:17F02C:5E80B5:6AB92DE3"},"text_sha256":"19fef4cd0d67029fc72435e969a2c917da030d906a0537d77e606d2532700c3c"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_french_swedish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"5870723fc7b96636cabb913cc11cce6eb3ea3be3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_swedish_small_finetuned_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724092328289.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724092328289.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B9D2:11316A:17F591:5E8564:6AB92DDE"},"text_sha256":"1c0b4c14065f7121efeebcf0fe596a4d76ad3e098cc4e9fcf892527ec654d172"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_german_czech_small_finetuned_en.md","size":2861,"blob_sha":"9781d55a1fbd880409433b6c94bdb3938769ff38","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_czech_small_finetuned\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_small_finetuned_en_5.4.2_3.0_1724094859607.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_small_finetuned_en_5.4.2_3.0_1724094859607.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E06:35EBC:17A40A:5E34A3:6AB92DE4"},"text_sha256":"cbb97ea37f6cc126601ae483218350d242d1b5168a27ac613d61de8dab725fe4"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_german_czech_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"a880b8a02d78d18bf5f052f9c90bc6a6f8b19949","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_czech_small_finetuned_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724094919355.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724094919355.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F9E:A58F2:177697:5E07C1:6AB92DE4"},"text_sha256":"4653df504c471ce8009246aa974e20f16f78b44c31d3a3a4120153c4fd72acf9"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_en.md","size":2733,"blob_sha":"a085a3b90fd3d4e10baaf1b899c27076c834538b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_german\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_en_5.4.2_3.0_1724074893732.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_en_5.4.2_3.0_1724074893732.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F6EA:3B6DE:1784B2:5E14D2:6AB92DE6"},"text_sha256":"abfcd442abed49c7377be3d351a287dd0f828ac81c80242b35a4973339b1a9b0"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_pipeline_en.md","size":2096,"blob_sha":"dfb4a684752a4b800bf0c99085501c1e66628256","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_german_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_pipeline_en_5.4.2_3.0_1724074954329.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_pipeline_en_5.4.2_3.0_1724074954329.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:17A094:5E31D5:6AB92DE6"},"text_sha256":"3dbd55bbf50fd27745eded770d2ccc309cc8817b42bdf16a6847524b2c92b46b"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_small_finetuned_en.md","size":2877,"blob_sha":"9c5f6529be2f7b9cd719edfa216e84278fa6e167","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_german_small_finetuned\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_small_finetuned_en_5.4.2_3.0_1724032512128.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_small_finetuned_en_5.4.2_3.0_1724032512128.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17F046:5E8102:6AB92DE5"},"text_sha256":"1643cdc1fbfbb75c95e7f72c22f450fc3cb0aba9be81df90b363f77d02d2de05"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_italian_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"a493fc3fdbfaf21e675d6044cade0041e91d0815","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_german_small_finetuned_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_small_finetuned_pipeline_en_5.4.2_3.0_1724032572041.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_german_small_finetuned_pipeline_en_5.4.2_3.0_1724032572041.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3928:2C474:1820FC:5EB1D3:6AB92DE7"},"text_sha256":"96ee4d2a75df45c26d231c95e98b65c8e2fd4a8299f14d51e69094087984e491"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_en.md","size":2741,"blob_sha":"d8bc851aebb89da5fca53728bde6b1ef4934e093","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_italian\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_en_5.4.2_3.0_1724082681675.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_en_5.4.2_3.0_1724082681675.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"31B8:349C76:17952D:5E225D:6AB92DE7"},"text_sha256":"bbf9cd36e0af25ebe7c94543605e402e5a8ac7e08866d2ec6f0439fdbd257e36"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_pipeline_en.md","size":2104,"blob_sha":"6db3146c7642206aa6eee69f88962974646561ce","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_italian_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_pipeline_en_5.4.2_3.0_1724082741953.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_pipeline_en_5.4.2_3.0_1724082741953.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5DAE:18CDF1:17A170:565C42:6AB92DE4"},"text_sha256":"3efac1a33d5645b3de770f1015f2880ca12046990661ade797b1e39788ca7c5d"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_small_finetuned_en.md","size":2885,"blob_sha":"e41b4a0a6974f4db07285b237eebb30b310870b7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_italian_small_finetuned\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_small_finetuned_en_5.4.2_3.0_1724095472159.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_small_finetuned_en_5.4.2_3.0_1724095472159.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"822A:40B0C:17F779:5E88C3:6AB92DE7"},"text_sha256":"355eafd94281e81f1f000df81f50ece3dac7f51d85c4a6c5b14a74df614d1b91"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_t5_small_trans_spanish_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"c152a6ae9a4d83cc706beb6054d1e28b9a730236","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_italian_small_finetuned_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724095532306.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724095532306.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C72C:17E138:17B7A1:5E4862:6AB92DD6"},"text_sha256":"8708a8a0c3e1d3d02b8b93f76c091019b8bd8bfe8dfb876da133ee6f8cb7469f"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_text_simplifier_en.md","size":2629,"blob_sha":"8ae0ed473e51c22d55e1ff56ae7f902942be948d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_text_simplifier T5Transformer from marcus2000\nauthor: John Snow Labs\nname: legal_text_simplifier\ndate: 2024-08-19\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_text_simplifier` is a English model originally trained by marcus2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_text_simplifier_en_5.4.2_3.0_1724045216165.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_text_simplifier_en_5.4.2_3.0_1724045216165.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_text_simplifier\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_text_simplifier\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_text_simplifier|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/marcus2000/legal_text_simplifier","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF1C:3E1C8:180574:5E95B5:6AB92DE7"},"text_sha256":"a51106b6bdb2080a2e9068745707905e80837f4c2fe3be8abb23877cddb4e6e8"},{"path":"docs/_posts/ahmedlone127/2024-08-19-legal_text_simplifier_pipeline_en.md","size":1992,"blob_sha":"9bf38ff598e10dfbfe421c8d69bec7f6e4095465","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_text_simplifier_pipeline pipeline T5Transformer from marcus2000\nauthor: John Snow Labs\nname: legal_text_simplifier_pipeline\ndate: 2024-08-19\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_text_simplifier_pipeline` is a English model originally trained by marcus2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_text_simplifier_pipeline_en_5.4.2_3.0_1724045379775.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_text_simplifier_pipeline_en_5.4.2_3.0_1724045379775.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_text_simplifier_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_text_simplifier_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_text_simplifier_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/marcus2000/legal_text_simplifier\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1192:11316A:17F5C7:5E8606:6AB92DE8"},"text_sha256":"3b55d78b33413f943c824844c91af962f73186ceae166a384daf5c2a2c8ea553"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_finetuned_english_en.md","size":2746,"blob_sha":"984c047633d42770cb444ccade83fe204ab81225","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_english\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_english_en_5.4.2_3.0_1724153184333.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_english_en_5.4.2_3.0_1724153184333.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:174454:5DD589:6AB92DE8"},"text_sha256":"b39fb7aa91e3f9730d5ef4a2915644ee5ebea8d533ed54add3c308143c13fb69"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_finetuned_english_pipeline_en.md","size":2109,"blob_sha":"b020d1036b48b278a4bc4cba77744931a1faaab3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_english_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_english_pipeline_en_5.4.2_3.0_1724153244682.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_english_pipeline_en_5.4.2_3.0_1724153244682.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F58:35EBC:17A430:5E3571:6AB92DE9"},"text_sha256":"b03d05ef4f622c67c4d2557ccc3bdb99243c25ac672a37aa065a7fd9299be6b1"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_multitask_swedish_en.md","size":2746,"blob_sha":"18f21584f49085cc7de7ac975b4353aeb3aef584","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_swedish\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_swedish_en_5.4.2_3.0_1724189112902.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_swedish_en_5.4.2_3.0_1724189112902.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B30:3B1F3:186F75:5F01AF:6AB92DEA"},"text_sha256":"79d691e51a098777fc8fa1bfaeaa27a16cf80538fed3e06b5bf0f2d872168e05"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_cls_multitask_swedish_pipeline_en.md","size":2109,"blob_sha":"4dd39c633d2e474fd60f968478b56ab73a8f5222","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_swedish_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_swedish_pipeline_en_5.4.2_3.0_1724189172479.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_swedish_pipeline_en_5.4.2_3.0_1724189172479.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F3E:11E74B:17BB15:5E4B5F:6AB92DE8"},"text_sha256":"6ea2edcc5677c663752e789aa59567756a34924eb5dc15d3aacc9d46b1e10f1b"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_summ_multitask_italian_en.md","size":2755,"blob_sha":"29fd36cc8551635de7c49866f96d171667a91a62","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_italian\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_italian_en_5.4.2_3.0_1724190537725.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_italian_en_5.4.2_3.0_1724190537725.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AD74:40CE8:181B8D:5EAC3C:6AB92DEA"},"text_sha256":"4db4b204b8996fbf23c1a18136f1f2f2d06d30508c04bb012b8da2fe329ac258"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_summ_multitask_italian_pipeline_en.md","size":2118,"blob_sha":"9996616f5575a855e54a542b61b191790e127392","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_italian_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_italian_pipeline_en_5.4.2_3.0_1724190596527.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_italian_pipeline_en_5.4.2_3.0_1724190596527.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6396:3E1DA:17B3B5:5E4564:6AB92DB9"},"text_sha256":"d05b7527249690576dd8a315a61630824b8f30b65a88020921f311b1a041a2d2"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_czech_spanish_small_finetuned_en.md","size":2869,"blob_sha":"9e66b96cf95df412f645b5abfae15d65c5d812e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_spanish_small_finetuned\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_small_finetuned_en_5.4.2_3.0_1724174450099.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_small_finetuned_en_5.4.2_3.0_1724174450099.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9310:1F1FB6:17EDC2:5E7EB5:6AB92DEC"},"text_sha256":"ff036a8be16dc24e3b65bb74f11a63221798f2b0305a7abdc565ef9b4b24519f"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_czech_spanish_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"a1ea43a7c19814a7e3a38661daa6015ad3dcd227","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_spanish_small_finetuned_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1724174511311.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1724174511311.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7E:1A3D83:1884E2:5F1722:6AB92DE9"},"text_sha256":"2d96180a9b51f377d71f5f0017f309d86eab871e300819391d11dd31db5a9de6"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_german_spanish_small_finetuned_en.md","size":2877,"blob_sha":"5eec4e8d24bea0a60d8dabcf4dece6edbc5bf1cd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_spanish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_spanish_small_finetuned\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_spanish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_small_finetuned_en_5.4.2_3.0_1724177354478.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_small_finetuned_en_5.4.2_3.0_1724177354478.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_spanish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_spanish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_spanish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_es_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A7A:372D9:17EF20:5E8187:6AB92DD6"},"text_sha256":"2320617460b58a25337ad566ace73a59730f23f346738f43b79b033fdcb7391d"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_german_spanish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"8272825a67386a350758f135120afc15d9d1be28","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_spanish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_spanish_small_finetuned_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_spanish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1724177414316.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_spanish_small_finetuned_pipeline_en_5.4.2_3.0_1724177414316.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_spanish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_spanish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_spanish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_es_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6392:40B0C:17F7BB:5E89A8:6AB92DEC"},"text_sha256":"84916216abe8a6c624905d0169bab43e58f6ec5dbdecab31a1777e9e64ab3ebf"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_swedish_czech_small_finetuned_en.md","size":2869,"blob_sha":"7faa6d569653c697946eb2f969bde1afaa4fd81d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_czech_small_finetuned\ndate: 2024-08-20\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_small_finetuned_en_5.4.2_3.0_1724150829185.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_small_finetuned_en_5.4.2_3.0_1724150829185.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE1A:3E1C8:1805A0:5E964B:6AB92DEC"},"text_sha256":"c7537c897176c6ff1b7eb7269cdae3e64769c791e77e9de7b1748791b6b5117d"},{"path":"docs/_posts/ahmedlone127/2024-08-20-legal_t5_small_trans_swedish_czech_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"b084b0d9c9669e7f894a5b644ae127565a217c06","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_czech_small_finetuned_pipeline\ndate: 2024-08-20\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724150889614.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724150889614.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17C012:5E50B8:6AB92DEC"},"text_sha256":"dd7969cd127c37715624f0e4e2ed5768dbb3da5a3b321f5f32d8aef2dde622cf"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_base_chunked_en.md","size":2620,"blob_sha":"109d16b816fc1b707edbae30ed0ae4e7b0828804","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_base_chunked T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_base_chunked\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_base_chunked` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_base_chunked_en_5.4.2_3.0_1724210006601.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_base_chunked_en_5.4.2_3.0_1724210006601.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_base_chunked\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_base_chunked\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_base_chunked|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-base-chunked","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1582:1F1FB6:17EDDA:5E7F03:6AB92DEB"},"text_sha256":"0cd4b455ef9916c8f624c04691ffc4de5ff09989ee5bdd364e3d2627023c5b06"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_base_chunked_pipeline_en.md","size":1983,"blob_sha":"c687af477267f397e8172f179f28245fcb4dcf1b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_base_chunked_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_base_chunked_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_base_chunked_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_base_chunked_pipeline_en_5.4.2_3.0_1724210058596.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_base_chunked_pipeline_en_5.4.2_3.0_1724210058596.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_base_chunked_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_base_chunked_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_base_chunked_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-base-chunked\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B4A:40B0C:17F7CA:5E89DB:6AB92DEE"},"text_sha256":"5895e2f2bb9b957c2a201671989161f1faa802de4459668262467b25b115a096"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_cls_spanish_en.md","size":2656,"blob_sha":"cda9e932942dcf913c7ab65ad5f1262b7f3b8707","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_spanish\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_spanish_en_5.4.2_3.0_1724198951507.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_spanish_en_5.4.2_3.0_1724198951507.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|178.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:181BA5:5EACAC:6AB92DEE"},"text_sha256":"29241ed9e6af33a4303be6dc80ec33532ef9aa42052bf1c059ff12395e6ea197"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_cls_spanish_pipeline_en.md","size":2019,"blob_sha":"2f5250eb174c866d064668f515fff602a36bdfad","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_spanish_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_spanish_pipeline_en_5.4.2_3.0_1724199010106.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_spanish_pipeline_en_5.4.2_3.0_1724199010106.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|178.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:17A1D9:565D2E:6AB92DEC"},"text_sha256":"52eca62e4c41ed8e4f2ab5e1788ca15680d0a89a6f5dd846f2ef601f30d7a56e"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_czech_spanish_en.md","size":2761,"blob_sha":"64396472b690c073b54b825c0f3c34467955cf95","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_spanish\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_spanish_en_5.4.2_3.0_1724266070173.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_spanish_en_5.4.2_3.0_1724266070173.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5EB2:3BCC6:17F0B7:5E8278:6AB92DEF"},"text_sha256":"10df080e00bd4885070567bc1e07c299f39c7814f9f90f76c7ca2c8519e4b4ea"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_czech_spanish_pipeline_en.md","size":2124,"blob_sha":"d017cde024d39b91340f68de7d85347943af6389","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_spanish_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_spanish_pipeline_en_5.4.2_3.0_1724266132652.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_spanish_pipeline_en_5.4.2_3.0_1724266132652.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2CB4:7A4F8:1846BC:5ED91E:6AB92DEF"},"text_sha256":"5805270ab9b8921f7208e3b64757ed5e74eff73ff72c2faf7cb88da3d8e188f5"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_spanish_czech_en.md","size":2761,"blob_sha":"a9942b8992dbb788b307f56cd71759703a4320aa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_czech\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_czech_en_5.4.2_3.0_1724259810490.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_czech_en_5.4.2_3.0_1724259810490.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_spanish_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB1C:1A3D83:188516:5F17AE:6AB92DF0"},"text_sha256":"98822dd7c495db5400b32abeb1f320fe767b43d22505e1fb5348873ba7913e60"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_spanish_czech_pipeline_en.md","size":2124,"blob_sha":"27bcefbe3fb3e168d067e5ea5e17aa6715d6afeb","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_spanish_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_spanish_czech_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_spanish_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_czech_pipeline_en_5.4.2_3.0_1724259873651.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_spanish_czech_pipeline_en_5.4.2_3.0_1724259873651.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_spanish_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_spanish_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_spanish_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_es_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0928:3FA0D:179E96:5E3037:6AB92DF0"},"text_sha256":"f2fe497a64625d82c7ea9a549016edd2e53a186ef8cc8bbd15dd75ed6ba38450"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_french_en.md","size":2769,"blob_sha":"7bb0bf516626015e3c1bf60cf4fb80bbc9b788e2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_french\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_french_en_5.4.2_3.0_1724225065217.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_french_en_5.4.2_3.0_1724225065217.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52A6:29FD16:185C29:5EEE12:6AB92DF1"},"text_sha256":"51f7915b00df594e7cbca83fefda984912bcbe9689d4e2f89d3808d7e911f727"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_french_pipeline_en.md","size":2132,"blob_sha":"18219f757894eb549607c6922412efb3ba7c9ecc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_french_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_french_pipeline_en_5.4.2_3.0_1724225128395.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_french_pipeline_en_5.4.2_3.0_1724225128395.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"87B4:18233:17C047:5E5150:6AB92DE6"},"text_sha256":"b3cf671f275a70ea8793b7fe88c950d1171957809c9dc29823f7927bba448b2d"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_german_en.md","size":2769,"blob_sha":"b8de0024334654b4f12017c7cca7eec72e7d7c7a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_german\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_german_en_5.4.2_3.0_1724276200485.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_german_en_5.4.2_3.0_1724276200485.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6722:3E1DA:17B3EC:5E462E:6AB92DF1"},"text_sha256":"7b29eacb7cb42e8fa7e06ea5636af0faeb3260f71692808d9e11a73353d9e6da"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_multitask_swedish_german_pipeline_en.md","size":2132,"blob_sha":"2407d1c5d7b0fa4945171a638dde9f05c058f973","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_german_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_german_pipeline_en_5.4.2_3.0_1724276260725.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_german_pipeline_en_5.4.2_3.0_1724276260725.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"87B4:18233:17C052:5E5196:6AB92DF2"},"text_sha256":"e07b65a1af1052b1f75bd7c7decbd664fe88c17e44d8002bc5bacc219ab54725"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_summ_spanish_en.md","size":2665,"blob_sha":"5c2f9177c2611e288e2ff9b5e061e7cea43403f6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_spanish\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_spanish_en_5.4.2_3.0_1724219975801.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_spanish_en_5.4.2_3.0_1724219975801.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|175.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"92F4:3FD49:17A122:5E33B9:6AB92DF1"},"text_sha256":"9176efd34828333d000870290aa5e9239251c0215a0b336981c2081489389689"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_summ_spanish_pipeline_en.md","size":2028,"blob_sha":"a25d4c8af9e6efcc1b147a2a47a4c7557bb26b20","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_spanish_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_spanish_pipeline_en_5.4.2_3.0_1724220033884.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_spanish_pipeline_en_5.4.2_3.0_1724220033884.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|175.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CC0:3BF56:177340:5E05AB:6AB92DF0"},"text_sha256":"a6e45e541714aba63dd2d770341cb7748e8c81364ecd01d9bc16b121010243ae"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_czech_italian_small_finetuned_en.md","size":2869,"blob_sha":"9127518fc5a03b014453a1fd9aa271694f35986d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_italian_small_finetuned\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_small_finetuned_en_5.4.2_3.0_1724269203107.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_small_finetuned_en_5.4.2_3.0_1724269203107.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2958:3E1C8:1805D1:5E9705:6AB92DF2"},"text_sha256":"ec9965c8d8905ee5baf11e5600555c8516e2d51fad1adf0730a57efa3d4d83c5"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_czech_italian_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"102b62e0d3eb171e3dcdaff01c5eccbcad95b8b9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_italian_small_finetuned_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724269262877.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724269262877.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:17853A:5E16D5:6AB92DF1"},"text_sha256":"50102aa302200546eb8d13991c090f3d353b0959b34ea6b504c57dbc978c818e"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_english_czech_en.md","size":2725,"blob_sha":"9684f7dc6a3bd6ef4e4f046a84d1dbc117247e1f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_czech\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_en_5.4.2_3.0_1724277054877.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_en_5.4.2_3.0_1724277054877.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B548:375F4:17DAEB:5E6E6D:6AB92DF3"},"text_sha256":"fec33421136730f8ced8b5c4c67e5ec20472a7d2ddb0d67b8e88880b0553c603"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_english_czech_pipeline_en.md","size":2088,"blob_sha":"b9aa4efd981b5aca7cd26c633b000528baf62d89","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_czech_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_pipeline_en_5.4.2_3.0_1724277113838.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_czech_pipeline_en_5.4.2_3.0_1724277113838.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"682E:09ED:E72B0:3FBE98:6AB92DF3"},"text_sha256":"f11610226e610cbde9bea270076faad4e46ebd98fcd46c7a69ee012d13f56f0f"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_french_german_en.md","size":2725,"blob_sha":"61ead87259c9d55a770aed96fc33d6227aa05e8f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_german\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_en_5.4.2_3.0_1724279847256.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_en_5.4.2_3.0_1724279847256.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:1744B8:5DD6F7:6AB92DF2"},"text_sha256":"829cafc135ebf7c4759ff9aeb06e59839f5e55690207b116e9074d2294226304"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_french_german_pipeline_en.md","size":2088,"blob_sha":"7b0b65dfa7e2670b576bd982d01f95f8908c5092","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_german_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_pipeline_en_5.4.2_3.0_1724279904651.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_pipeline_en_5.4.2_3.0_1724279904651.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7D2A:B08CF:176656:5DF961:6AB92DF5"},"text_sha256":"ef5a8902ba093cac05846c4260c66f8aa0958004d380f474680498ed883f0523"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_english_small_finetuned_en.md","size":2877,"blob_sha":"3a923e0170854c933f13f0adab793c0a61284c3b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_english_small_finetuned\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_small_finetuned_en_5.4.2_3.0_1724269307554.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_small_finetuned_en_5.4.2_3.0_1724269307554.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B30:3B1F3:187014:5F035A:6AB92DF5"},"text_sha256":"077b6bc9103371f1110d2e3a7d9a0cf8adff039ee0456c51969e2d8de5273a1d"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_english_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"60a5c0ab7aa982eb1e6fbd15a241a1926a218cca","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_english_small_finetuned_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_small_finetuned_pipeline_en_5.4.2_3.0_1724269365436.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_small_finetuned_pipeline_en_5.4.2_3.0_1724269365436.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8CDC:3AC5A:18097B:5E9BCA:6AB92DF5"},"text_sha256":"d6fa0b3bc7d0a403ded504512bb05aebf12f2ff12bf24cee7e33fcf7bf60a223"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_italian_en.md","size":2733,"blob_sha":"668818cd4b9f475e554fd9027af5f2fec451c9c0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_italian\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_en_5.4.2_3.0_1724258491964.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_en_5.4.2_3.0_1724258491964.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"88A0:3A3DD:17B07E:5E4312:6AB92DF5"},"text_sha256":"2f5996b80a41fe1754dc2e4e599030c632e2638858b75f9576e390ece3693526"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_german_italian_pipeline_en.md","size":2096,"blob_sha":"c5d79083628f6e964fb82425654343aecf316ea0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_italian_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_pipeline_en_5.4.2_3.0_1724258553231.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_italian_pipeline_en_5.4.2_3.0_1724258553231.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5400:B08CF:176666:5DF99B:6AB92DF5"},"text_sha256":"ad392428c2a57d3b6c70ffa72d7d8d9b174c414a2fd401574a8c674b7141c92c"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_italian_english_en.md","size":2741,"blob_sha":"d54930fa4fc3e874fb8f58a39c91472ef77e2b93","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_english\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_en_5.4.2_3.0_1724267065183.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_en_5.4.2_3.0_1724267065183.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4DA:345ED4:17AA92:5E3C96:6AB92DDF"},"text_sha256":"deef7a0c47f861eb3dba7a760ac1ca4f6a6ff3c01a1cd571750483de2bba8fa8"},{"path":"docs/_posts/ahmedlone127/2024-08-21-legal_t5_small_trans_italian_english_pipeline_en.md","size":2104,"blob_sha":"45c5e66c575b330beb4ece55898fececc353ee3d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_english_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_pipeline_en_5.4.2_3.0_1724267125783.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_english_pipeline_en_5.4.2_3.0_1724267125783.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E69E:B08CF:17666C:5DF9B5:6AB92DF7"},"text_sha256":"5a30f45ac086dac17e2a206c157fdc78cc06db49da1363a3edcc85f89483239c"},{"path":"docs/_posts/ahmedlone127/2024-08-21-russian_t5absum_for_legaltext_en.md","size":2698,"blob_sha":"b97ddc2ad8197f10e34ffe76745a127614365381","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English russian_t5absum_for_legaltext T5Transformer from marcus2000\nauthor: John Snow Labs\nname: russian_t5absum_for_legaltext\ndate: 2024-08-21\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`russian_t5absum_for_legaltext` is a English model originally trained by marcus2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/russian_t5absum_for_legaltext_en_5.4.2_3.0_1724236725056.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/russian_t5absum_for_legaltext_en_5.4.2_3.0_1724236725056.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"russian_t5absum_for_legaltext\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"russian_t5absum_for_legaltext\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|russian_t5absum_for_legaltext|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|996.4 MB|\n\n## References\n\nhttps://huggingface.co/marcus2000/ru_t5absum_for_legaltext","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6432:18CDF1:17A22A:565E36:6AB92DF7"},"text_sha256":"9e0ac25f2b9d3de195a9a40fd90124f7d4a0dbaad040ef782834d56ffbf1adeb"},{"path":"docs/_posts/ahmedlone127/2024-08-21-russian_t5absum_for_legaltext_pipeline_en.md","size":2061,"blob_sha":"902c58308dd776dd7c6b68f6eaf5283ad855f9bd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English russian_t5absum_for_legaltext_pipeline pipeline T5Transformer from marcus2000\nauthor: John Snow Labs\nname: russian_t5absum_for_legaltext_pipeline\ndate: 2024-08-21\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`russian_t5absum_for_legaltext_pipeline` is a English model originally trained by marcus2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/russian_t5absum_for_legaltext_pipeline_en_5.4.2_3.0_1724236780104.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/russian_t5absum_for_legaltext_pipeline_en_5.4.2_3.0_1724236780104.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"russian_t5absum_for_legaltext_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"russian_t5absum_for_legaltext_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|russian_t5absum_for_legaltext_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|996.4 MB|\n\n## References\n\nhttps://huggingface.co/marcus2000/ru_t5absum_for_legaltext\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C5E0:4F9CC:172C14:5DBC7D:6AB92DF5"},"text_sha256":"7d066c8f10210fb7a2e72108c014551273d8045a65ff11cb4a47c278b44e4de4"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_large_en.md","size":2557,"blob_sha":"9545a34ac5370240d75b32d3b934e7309b3ec875","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_en_5.4.2_3.0_1724321673987.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_en_5.4.2_3.0_1724321673987.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_large\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_large\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17F66A:5E884B:6AB92DF8"},"text_sha256":"a507af04b47fe9c570adb87a20eac1f2d9d662a7150f10944fb9156d1636946a"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_large_pipeline_en.md","size":1920,"blob_sha":"17cb9caaab7177531a0c1e46b52ad1f0fe5555f8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_large_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_large_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_large_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_large_pipeline_en_5.4.2_3.0_1724321806564.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_large_pipeline_en_5.4.2_3.0_1724321806564.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_large_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_large_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_large_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.0 GB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-large\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F0E:3D40A:1744EB:5DD7C1:6AB92DF8"},"text_sha256":"5d7c49bc47d98e8d106448e0336c63d236aec4e13f85c855c85420e006891616"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_finetuned_summ_german_en.md","size":2747,"blob_sha":"42b4de307e96e1c9a9ea497e10bffd2addbcbf14","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_german\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_german_en_5.4.2_3.0_1724298643201.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_german_en_5.4.2_3.0_1724298643201.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F5EE:1F1FB6:17EE67:5E80A5:6AB92DF9"},"text_sha256":"3fe34701deddc55e52b720a10d2d65f7b5473b3ab3442de743201bd35899370f"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_finetuned_summ_german_pipeline_en.md","size":2110,"blob_sha":"bf31db42a826d48cea76accdc25b3d7543380b79","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_german_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_german_pipeline_en_5.4.2_3.0_1724298702848.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_german_pipeline_en_5.4.2_3.0_1724298702848.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:17A23B:565E65:6AB92DF8"},"text_sha256":"a80ee00f9ec279e3d5f0aec1dc126df5150e44245ac591cb2abffeae6a3dc7f3"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_czech_french_en.md","size":2717,"blob_sha":"ad66460eee0be3aeb99ce42e0b91b06b12121e91","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_french\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_en_5.4.2_3.0_1724295312879.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_en_5.4.2_3.0_1724295312879.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17C0C9:5E52CD:6AB92DF9"},"text_sha256":"641796aeb63252c6946c718b9be3fe9fff28f93b58371ba62e63f5d1048cbbca"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_czech_french_pipeline_en.md","size":2080,"blob_sha":"920655a9b5c89625da5a2063cc3f567eecf3afed","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_french_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_pipeline_en_5.4.2_3.0_1724295373548.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_french_pipeline_en_5.4.2_3.0_1724295373548.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.1 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7134:326565:17C71A:5E5ACB:6AB92DF3"},"text_sha256":"a5334aef44c21f31ce09b5f380201417d8a0b02e49f0d478c3cfa29ede55bcbb"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_french_small_finetuned_en.md","size":2877,"blob_sha":"80d43e6c6244242fdfd53fb716b7deaee86a84cf","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_french_small_finetuned\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_french_small_finetuned_en_5.4.2_3.0_1724351651993.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_french_small_finetuned_en_5.4.2_3.0_1724351651993.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9190:3A3DD:17B0B4:5E43E4:6AB92DF9"},"text_sha256":"48b5d8e4488871bdfb08719b14a95f90a5931e12707d3754ad2d895eff7791c8"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"b092ba21ca3e3be60ed7347994cd8ace0cffdc41","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_french_small_finetuned_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_french_small_finetuned_pipeline_en_5.4.2_3.0_1724351712003.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_french_small_finetuned_pipeline_en_5.4.2_3.0_1724351712003.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7238:3FD49:17A17E:5E351C:6AB92DFB"},"text_sha256":"f63d9c91d134cc475f282f77f74e3948a8e4be441a7c81e3f9a9e99366c83d53"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_german_en.md","size":2733,"blob_sha":"24debd8fcf2fcd2e87fedda74e38189c842a2294","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_german\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_en_5.4.2_3.0_1724323096954.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_en_5.4.2_3.0_1724323096954.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F50:18CDF1:17A25D:565EA6:6AB92DEE"},"text_sha256":"e40ba715ec1cff3feec7476610a6aa25a8116b73900089e1cb8339f353c1aa18"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_spanish_german_pipeline_en.md","size":2096,"blob_sha":"0f54f6e993041677a02579e73f2799217edb3c2a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_german_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_pipeline_en_5.4.2_3.0_1724323156848.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_pipeline_en_5.4.2_3.0_1724323156848.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3528:376DE:182647:5EBAC6:6AB92DFA"},"text_sha256":"e1954934dcc6ff1a4f372ec920a7e8ac1c4421ded22d1fae976f18fc7dd83801"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_swedish_italian_small_finetuned_en.md","size":2885,"blob_sha":"f1489b1a3001a0c5d11049b80e4563468e699ee4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_italian_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_italian_small_finetuned\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_italian_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_small_finetuned_en_5.4.2_3.0_1724292934523.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_small_finetuned_en_5.4.2_3.0_1724292934523.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_italian_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_italian_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_italian_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_it_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"96EC:324E19:181FFF:5EB35B:6AB92DFA"},"text_sha256":"2ac8f1e166e9ec7380869108a7a10223fa9aad88095eec516ed89f491a13fb92"},{"path":"docs/_posts/ahmedlone127/2024-08-22-legal_t5_small_trans_swedish_italian_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"ffdb8340e864af8f14a0d87b1a3cda8d18bea69a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_italian_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_italian_small_finetuned_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_italian_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724292995066.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_italian_small_finetuned_pipeline_en_5.4.2_3.0_1724292995066.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_italian_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_italian_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_italian_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_it_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"822A:40B0C:17F864:5E8C05:6AB92DFA"},"text_sha256":"a423fc04dea92b459e11afe98849c9dfdf5e73ba8ee89d666c4ce1595b23dbf4"},{"path":"docs/_posts/ahmedlone127/2024-08-22-vit5_large_legal_lora_en.md","size":2620,"blob_sha":"4ed23c53ccf23973fb0d2b686a92108dbb3ccbd8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English vit5_large_legal_lora T5Transformer from hduc-le\nauthor: John Snow Labs\nname: vit5_large_legal_lora\ndate: 2024-08-22\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`vit5_large_legal_lora` is a English model originally trained by hduc-le.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/vit5_large_legal_lora_en_5.4.2_3.0_1724314122963.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/vit5_large_legal_lora_en_5.4.2_3.0_1724314122963.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"vit5_large_legal_lora\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"vit5_large_legal_lora\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|vit5_large_legal_lora|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/hduc-le/vit5-large-legal-lora","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C2:3A3DD:17B0DC:5E4442:6AB92DD3"},"text_sha256":"ba4ca66fa2a1ef74ccdfe7d04736ff3c5ca525274cf9faf128c5a7817ee0697d"},{"path":"docs/_posts/ahmedlone127/2024-08-22-vit5_large_legal_lora_pipeline_en.md","size":1983,"blob_sha":"2a002a8b2f4ace57d43c7711e522f7f4e0f7a709","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English vit5_large_legal_lora_pipeline pipeline T5Transformer from hduc-le\nauthor: John Snow Labs\nname: vit5_large_legal_lora_pipeline\ndate: 2024-08-22\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`vit5_large_legal_lora_pipeline` is a English model originally trained by hduc-le.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/vit5_large_legal_lora_pipeline_en_5.4.2_3.0_1724314258571.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/vit5_large_legal_lora_pipeline_en_5.4.2_3.0_1724314258571.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"vit5_large_legal_lora_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"vit5_large_legal_lora_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|vit5_large_legal_lora_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|3.1 GB|\n\n## References\n\nhttps://huggingface.co/hduc-le/vit5-large-legal-lora\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A320:B08CF:17669C:5DFAA5:6AB92DFD"},"text_sha256":"de97650da24a7b5af6e6fc12a262fd61dc18c7b94b86f21ad199a7b7e4d33e37"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_chunked_en.md","size":2631,"blob_sha":"015c9e862b15974c6b1bdffc36d533760967e4e1","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_chunked T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_small_chunked\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_chunked` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_chunked_en_5.4.2_3.0_1724399855781.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_chunked_en_5.4.2_3.0_1724399855781.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_chunked\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_chunked\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_chunked|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|344.9 MB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-small-chunked","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"71A2:3B1F3:18707E:5F04C0:6AB92DFD"},"text_sha256":"499c3fac0a1b76e2bbcabc3dc8cb38e464955aa72e7028ac4b806b704f3e1509"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_chunked_pipeline_en.md","size":1994,"blob_sha":"30711b4b83731d2ea594c1528a471c90793d964d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_chunked_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_small_chunked_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_chunked_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_chunked_pipeline_en_5.4.2_3.0_1724399875261.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_chunked_pipeline_en_5.4.2_3.0_1724399875261.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_chunked_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_chunked_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_chunked_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|344.9 MB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-small-chunked\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D906:376DE:182658:5EBB0B:6AB92DF8"},"text_sha256":"d29772f2c20df6cfa481526cbe364da719fc2bf0c02d907d487225836b0a2c71"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_cls_multitask_spanish_en.md","size":2746,"blob_sha":"7ad1374f02c937ba41a9524bc8580f9930dc6178","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_spanish\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_spanish_en_5.4.2_3.0_1724392337724.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_spanish_en_5.4.2_3.0_1724392337724.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_multitask_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0884:3A3DD:17B0EB:5E4474:6AB92DFC"},"text_sha256":"4730140de21adeb674c1e0780cce0550498b61aa613f491a63d8d2bc3381c4c8"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_cls_multitask_spanish_pipeline_en.md","size":2109,"blob_sha":"3df044b8f1dbae73eb00c2abc2a63aeedf74706d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_multitask_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_multitask_spanish_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_multitask_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_spanish_pipeline_en_5.4.2_3.0_1724392399777.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_multitask_spanish_pipeline_en_5.4.2_3.0_1724392399777.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_multitask_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_multitask_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_multitask_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_multitask_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C6:2C474:1821F6:5EB573:6AB92DFD"},"text_sha256":"f431b2c9278d127782d6b6187fc39adcf66dbd3fdf1b17fdac4bfab307531ee0"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_en.md","size":2559,"blob_sha":"2cc49a0242a3a8d989271a191203a6d453da658e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_small\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_en_5.4.2_3.0_1724454584164.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_en_5.4.2_3.0_1724454584164.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|341.8 MB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-small","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E322:3AC15:181A06:5EAC60:6AB92DFC"},"text_sha256":"652f9b4064cca23cf4af2d12b027e37232d3ac4e1e0ed401a434546ba8a080f7"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_czech_swedish_en.md","size":2761,"blob_sha":"ebdc195e814d57a1e1da6561f60ea1571732a50a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_swedish\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_swedish_en_5.4.2_3.0_1724384233104.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_swedish_en_5.4.2_3.0_1724384233104.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_czech_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:17F87E:5E8C61:6AB92DFE"},"text_sha256":"c5ae459775ecaacd964309a5f2df7ed6923dbbb72cc55665ae3794fb72045cd1"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_czech_swedish_pipeline_en.md","size":2124,"blob_sha":"61b13d7e5ddd9b753f53ab36750679b80ab7a0f0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_czech_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_czech_swedish_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_czech_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_swedish_pipeline_en_5.4.2_3.0_1724384294544.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_czech_swedish_pipeline_en_5.4.2_3.0_1724384294544.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_czech_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_czech_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_czech_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_cs_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A7A:372D9:17EFFE:5E8466:6AB92DFE"},"text_sha256":"95342ca80fba69edf22da3577c650d18b80c70b0bdc0e35a4ce79dc0168f96fa"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_multitask_german_italian_en.md","size":2769,"blob_sha":"819100f5ff1c9fe12bd190fd16c958160453301f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_italian\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_italian_en_5.4.2_3.0_1724457554667.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_italian_en_5.4.2_3.0_1724457554667.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_german_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_german_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"28FC:3CC8A:17F5FE:5E8A0A:6AB92E00"},"text_sha256":"d851596a6c668ae4768edf7b9adb1b30c22c407cbed670cc7b7af55b93d2cbf6"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_pipeline_en.md","size":1922,"blob_sha":"5ec6a5a8870c0b51a367c67ab17c57c9f606df5c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_pipeline pipeline T5Transformer from Ashreen\nauthor: John Snow Labs\nname: legal_t5_small_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_pipeline` is a English model originally trained by Ashreen.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_pipeline_en_5.4.2_3.0_1724454602135.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_pipeline_en_5.4.2_3.0_1724454602135.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|341.8 MB|\n\n## References\n\nhttps://huggingface.co/Ashreen/legal-t5-small\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD28:372D9:17F006:5E8482:6AB92DFF"},"text_sha256":"626ed375d2992e5e5110af24b497d7cc1e52ebd26f8f9075b1412e145294f43c"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_german_en.md","size":2657,"blob_sha":"22bf1e3e1f4533fd945c81bc8807301496f6691d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_german\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_german_en_5.4.2_3.0_1724424633465.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_german_en_5.4.2_3.0_1724424633465.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|175.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"735A:7A4F8:184729:5EDB5E:6AB92E00"},"text_sha256":"b742d7b6807f4de86f07398ef96b1f9b841654bb5d2d06a00ef6923fd96836b5"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_german_pipeline_en.md","size":2020,"blob_sha":"073e98b34ba609252c82ce7c33def3b800979b74","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_german_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_german_pipeline_en_5.4.2_3.0_1724424691313.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_german_pipeline_en_5.4.2_3.0_1724424691313.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|175.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5082:3AC5A:1809FB:5E9D90:6AB92DFE"},"text_sha256":"b6850be7491bf11869a1d882082ed75e0fb2680026cc929f01aa8dd401894701"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_multitask_czech_en.md","size":2739,"blob_sha":"c5eb3b85a416a3d012363c32df1b5889bfa15154","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_czech\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_czech_en_5.4.2_3.0_1724376031141.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_czech_en_5.4.2_3.0_1724376031141.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F76E:17E138:17B863:5E4BF1:6AB92E00"},"text_sha256":"4e29fcb439788cfe9fa1273b9c70d451a794582572c3209cc3e1c9ea61cc486c"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_summ_multitask_czech_pipeline_en.md","size":2102,"blob_sha":"8ff201d75298995129bdb7163e2bf07cd600a126","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_czech_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_czech_pipeline_en_5.4.2_3.0_1724376091269.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_czech_pipeline_en_5.4.2_3.0_1724376091269.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0F90:3B6DE:1785A6:5E18D0:6AB92E01"},"text_sha256":"dfdffc33525f48e002256921be96fe56232c6ae4202da6398e83b6a3623d155a"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_english_swedish_small_finetuned_en.md","size":2885,"blob_sha":"11e7fa9f7348168a8c7e144207e0b242a5001136","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_swedish_small_finetuned\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_small_finetuned_en_5.4.2_3.0_1724386964839.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_small_finetuned_en_5.4.2_3.0_1724386964839.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D5A:3D40A:174556:5DD910:6AB92E02"},"text_sha256":"de6e2955f9c33e97523a4c293dc29cb997efb9be92b5f81b72883b0f711dc349"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_english_swedish_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"316502a33b27f8772182f75d921767dd649072fa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_swedish_small_finetuned_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724387024567.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724387024567.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B560:35999:17B1A3:5E4670:6AB92E00"},"text_sha256":"1767b5baa3e205bb5aad2dbf63837c95223278ea50713714a076942f4318cf57"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_french_spanish_en.md","size":2733,"blob_sha":"41ca3c3ec0e58eb45cd908a771c80781b681b920","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_spanish\ndate: 2024-08-23\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_en_5.4.2_3.0_1724434418574.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_en_5.4.2_3.0_1724434418574.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AAE:3E1DA:17B4C6:5E48E5:6AB92E01"},"text_sha256":"9c4133e241202a474460cc75eb8f91ac084546adf3e07d1736d8cbc3b8b85d8c"},{"path":"docs/_posts/ahmedlone127/2024-08-23-legal_t5_small_trans_french_spanish_pipeline_en.md","size":2096,"blob_sha":"61d76d1ade96e122387f4816d73497d6cf9ebfc8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_spanish_pipeline\ndate: 2024-08-23\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_pipeline_en_5.4.2_3.0_1724434475865.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_spanish_pipeline_en_5.4.2_3.0_1724434475865.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D7E:3CC8A:17F61E:5E8A80:6AB92E02"},"text_sha256":"70a54615f747f56ba014ffda9006377d296b4a3aac7ead810c885bec5db9ca35"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_cls_finetuned_swedish_en.md","size":2746,"blob_sha":"7ecb223b168d034f9e192ec3d7702e704ee541ca","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_swedish\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_swedish_en_5.4.2_3.0_1724491173897.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_swedish_en_5.4.2_3.0_1724491173897.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D576:2B291E:185892:5EED1C:6AB92DEE"},"text_sha256":"fdba9d6e1d92bc641d730b5d9ab4f6dc788325cb8dd5bf1547ec01b18a25251f"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_cls_finetuned_swedish_pipeline_en.md","size":2109,"blob_sha":"3da54e09ff6d209c8a575b405b31e15a84f59686","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_swedish_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_swedish_pipeline_en_5.4.2_3.0_1724491234228.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_swedish_pipeline_en_5.4.2_3.0_1724491234228.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"110E:40CE8:181C54:5EAF9D:6AB92E03"},"text_sha256":"e5a9b06bfcb6aafad8f1a4116ade855c48a77643a92cbf593559be7a60922e57"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_french_en.md","size":2769,"blob_sha":"0c94b5cb5c04fadb3242e9220929f000db0bbc98","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_french\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_french_en_5.4.2_3.0_1724483174884.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_french_en_5.4.2_3.0_1724483174884.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"42C4:7A4F8:184747:5EDBD9:6AB92E04"},"text_sha256":"c67545f989d0bbfce9ea459229e714114e764253683bcecf917470ba29a25f28"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_french_pipeline_en.md","size":2132,"blob_sha":"17bdc5545cfbd10fa769b06c413242f39cbca986","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_french_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_french_pipeline_en_5.4.2_3.0_1724483234612.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_french_pipeline_en_5.4.2_3.0_1724483234612.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F508:3B1F3:1870EF:5F05E6:6AB92E03"},"text_sha256":"0e2af87c68ca1675a0b2ed13e9005aa95deccc960b8fe487d17b16bcd962e6a4"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_spanish_en.md","size":2777,"blob_sha":"8f23765133548260328293110e8ad9dc35d379cc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_spanish\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_spanish_en_5.4.2_3.0_1724493843876.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_spanish_en_5.4.2_3.0_1724493843876.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ED42:376DE:182693:5EBBFE:6AB92E03"},"text_sha256":"005f0697ea223d96fb5cbc153a1972d9374d166e541f8e32b7b72fb57ec6a4f9"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_english_spanish_pipeline_en.md","size":2140,"blob_sha":"742e17f1a1addc4806fb348044a7c53b514204c8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_spanish_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_spanish_pipeline_en_5.4.2_3.0_1724493903399.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_spanish_pipeline_en_5.4.2_3.0_1724493903399.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:18098E:5AC438:6AB92E05"},"text_sha256":"618238853da39fbdcac9f4c494b4ca1dcc1bc21d5f8fb918ad3ccd74b489d8c6"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_multitask_german_italian_pipeline_en.md","size":2132,"blob_sha":"d40c2f888cc81148072b88ae4cae0e46d0aee686","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_italian_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_italian_pipeline_en_5.4.2_3.0_1724457614385.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_italian_pipeline_en_5.4.2_3.0_1724457614385.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_german_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_german_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:174581:5DD99C:6AB92E05"},"text_sha256":"c71ec05d9e8c63625e08df438e6b7fe2a2db6be40043e809cc66432d4ef41801"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_czech_english_small_finetuned_en.md","size":2869,"blob_sha":"43d841ab00e514400c0b9e11cc4ca3363d683a52","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_english_small_finetuned\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_small_finetuned_en_5.4.2_3.0_1724476969847.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_small_finetuned_en_5.4.2_3.0_1724476969847.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B48:3D40A:174584:5DD9DC:6AB92E05"},"text_sha256":"05965fe6062971552d314b96fad9175df4ea4d0a67cc166a3545135e0cb38c24"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_czech_english_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"7f07f64d693736595cd5bdf646eb969e36bb8967","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_english_small_finetuned_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_small_finetuned_pipeline_en_5.4.2_3.0_1724477028776.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_english_small_finetuned_pipeline_en_5.4.2_3.0_1724477028776.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B9C2:18CDF1:17A2CA:565FF4:6AB92E06"},"text_sha256":"171708c173f8f2e944a70dec3402dba18afc3914d2d88198511a800a3fa2797a"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_italian_french_en.md","size":2733,"blob_sha":"0aea3eff9505da274b16504fa040586a1afe9f33","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_french\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_en_5.4.2_3.0_1724491752164.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_en_5.4.2_3.0_1724491752164.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F9E:A58F2:1777B9:5E0C84:6AB92E06"},"text_sha256":"3da3b86e0f69acfa3adac9034c014df31ae66562706438e5701313423c01d968"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_italian_french_pipeline_en.md","size":2096,"blob_sha":"b8e7f42500f06373d639dbdd48132ade0cfc948d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_french_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_pipeline_en_5.4.2_3.0_1724491809872.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_french_pipeline_en_5.4.2_3.0_1724491809872.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:1858B6:5EED9C:6AB92E07"},"text_sha256":"c71c161c3b88f8967ee1f39087136349a82a1794dc8d43b06843875cde822352"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_spanish_german_small_finetuned_en.md","size":2877,"blob_sha":"94c3349030145ff8b5411a3b0e2f834e935ff750","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_german_small_finetuned\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_small_finetuned_en_5.4.2_3.0_1724496823288.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_small_finetuned_en_5.4.2_3.0_1724496823288.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E86:A58F2:1777BF:5E0C9B:6AB92E07"},"text_sha256":"f37de10aae418be4a7ee0367c95ec801e7c550404a03b0fdfe0b36cf880a233e"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_spanish_german_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"529a567394c6cd97965e4c341f4ac2eb32b39fd8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_german_small_finetuned_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_small_finetuned_pipeline_en_5.4.2_3.0_1724496882697.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_german_small_finetuned_pipeline_en_5.4.2_3.0_1724496882697.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7E86:A58F2:1777C5:5E0CA8:6AB92E08"},"text_sha256":"f39e34dbf79c10e862254b17999f279c7f18498b804df332add10395c069ac7e"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_en.md","size":2733,"blob_sha":"ef345b519cf5b136501894b164d2a62ed5a600f6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_french\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_en_5.4.2_3.0_1724471934516.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_en_5.4.2_3.0_1724471934516.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:1809C7:5AC49E:6AB92E06"},"text_sha256":"028c9900ba3e335983251cca9d7c1ffc04f1db69c93e6d912f471b03687e2d50"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_pipeline_en.md","size":2096,"blob_sha":"85d5649bbada97413af73d83c0ab71c953639c5e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_french_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_pipeline_en_5.4.2_3.0_1724471994477.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_pipeline_en_5.4.2_3.0_1724471994477.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F3E:11E74B:17BC4A:5E4FE0:6AB92DF8"},"text_sha256":"bc9cb76c6e34f9b8d045dc13bd583b15941b09abf21ac5d5e96f2db923a2a733"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_small_finetuned_en.md","size":2877,"blob_sha":"7e2f3f12cd1f4b6cae40d169d11d3c4129a3564f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_french_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_french_small_finetuned\ndate: 2024-08-24\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_french_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_small_finetuned_en_5.4.2_3.0_1724504442823.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_small_finetuned_en_5.4.2_3.0_1724504442823.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_french_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_french_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_french_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_fr_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"110E:40CE8:181C91:5EB087:6AB92E09"},"text_sha256":"a39676d78b6c07dde81fd47d11ed6e5d392627c56c547134cb148b3629e05935"},{"path":"docs/_posts/ahmedlone127/2024-08-24-legal_t5_small_trans_swedish_french_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"ef95d6ea2b09d6ddfba08026fe048175c5777b26","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_french_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_french_small_finetuned_pipeline\ndate: 2024-08-24\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_french_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_small_finetuned_pipeline_en_5.4.2_3.0_1724504502289.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_french_small_finetuned_pipeline_en_5.4.2_3.0_1724504502289.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_french_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_french_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_french_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_fr_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B4A:40B0C:17F914:5E8E27:6AB92E08"},"text_sha256":"c76e58c1f9b1e342fab7fdb60adb786d2f03bfaf1d6f6363070a7c268f5b63ab"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_english_en.md","size":2755,"blob_sha":"f6e310199d53a8a4bcfbdbe3f846fe836d520fbd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_english\ndate: 2024-08-25\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_english_en_5.4.2_3.0_1724607658684.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_english_en_5.4.2_3.0_1724607658684.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D4F0:372D9:17F08C:5E8627:6AB92E09"},"text_sha256":"e319a218c575dae6253ff61f716bb6714bbe51f16f2f64fd337e20e2c16ec89e"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_english_pipeline_en.md","size":2118,"blob_sha":"d8c7a90c2304187e5787d66bc812f9d5a89dcf01","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_english_pipeline\ndate: 2024-08-25\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_english_pipeline_en_5.4.2_3.0_1724607720388.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_english_pipeline_en_5.4.2_3.0_1724607720388.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3466:326565:17C791:5E5D03:6AB92E08"},"text_sha256":"91a04910f8a7f79c9785cf3f745bc774c1e0f97a7d05d4908e22a9f90bb9d6d5"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_spanish_en.md","size":2755,"blob_sha":"9af8810c939aa8d672cc02d3693d87490c9bbafe","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_spanish\ndate: 2024-08-25\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_spanish_en_5.4.2_3.0_1724562403449.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_spanish_en_5.4.2_3.0_1724562403449.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_finetuned_summ_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D2:3FD49:17A23E:5E378A:6AB92E0A"},"text_sha256":"afd0af369109cc8656fb548618ec50d5ce0a21201517a3011a928e851e3d5cba"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_finetuned_summ_spanish_pipeline_en.md","size":2118,"blob_sha":"3545d52e8c68da15b2702296ad2972cbf7c10215","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_finetuned_summ_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_finetuned_summ_spanish_pipeline\ndate: 2024-08-25\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_finetuned_summ_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_spanish_pipeline_en_5.4.2_3.0_1724562461100.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_finetuned_summ_spanish_pipeline_en_5.4.2_3.0_1724562461100.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_finetuned_summ_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_finetuned_summ_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_finetuned_summ_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_finetuned_summ_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B90:35999:17B1DC:5E47A7:6AB92E0A"},"text_sha256":"d934c58d7c97ea3edc5011f34390f270d9eaa8b6e7c089977bfe174231188cbc"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_summ_multitask_french_en.md","size":2747,"blob_sha":"fb3a84ae3d34922985c370dd9be93d41f0775362","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_french\ndate: 2024-08-25\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_french_en_5.4.2_3.0_1724619567728.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_french_en_5.4.2_3.0_1724619567728.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B678:18CDF1:17A313:56607F:6AB92E0B"},"text_sha256":"a63eddafa7f16bbe7c8ac35f63e2c2ce7d371c814b93ad24ddbdd32ef1df9d39"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_summ_multitask_french_pipeline_en.md","size":2110,"blob_sha":"471a07be429974316e71f9bc3cac7e8d154cabed","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_french_pipeline\ndate: 2024-08-25\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_french_pipeline_en_5.4.2_3.0_1724619629507.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_french_pipeline_en_5.4.2_3.0_1724619629507.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.8 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EEE2:3BCC6:17F1CC:5E86A6:6AB92E0B"},"text_sha256":"e92df959da088e738bc8e170ca892c26e8eb6e2646d327ec2c56d99819d64fdb"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_trans_french_swedish_en.md","size":2733,"blob_sha":"01c815886278ee0b677a70fa4262dfeb875f8038","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_swedish\ndate: 2024-08-25\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_en_5.4.2_3.0_1724622001768.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_en_5.4.2_3.0_1724622001768.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B7C:3EACB:17CAE2:5E5FE7:6AB92E0B"},"text_sha256":"d996162b87e7e74167270dc09fc7cd9b439b75ab457456d702d36aee46f740c0"},{"path":"docs/_posts/ahmedlone127/2024-08-25-legal_t5_small_trans_french_swedish_pipeline_en.md","size":2096,"blob_sha":"9c04d8336f498c5cb33d6e3f7621bb1c01e8a2ec","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_swedish_pipeline\ndate: 2024-08-25\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_pipeline_en_5.4.2_3.0_1724622062629.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_swedish_pipeline_en_5.4.2_3.0_1724622062629.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1CB8:1F1FB6:17EF8C:5E8401:6AB92E0B"},"text_sha256":"4e853ed12000c96e4a1dcc5202d5c6299ae822445c58a88f21738ce5f069c525"},{"path":"docs/_posts/ahmedlone127/2024-08-25-t5_small_finetuned_legal_tech_ukrainian_en.md","size":2774,"blob_sha":"68b6ae8809b0b4bac423278775c61c4cda14b0af","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_finetuned_legal_tech_ukrainian T5Transformer from Dharil\nauthor: John Snow Labs\nname: t5_small_finetuned_legal_tech_ukrainian\ndate: 2024-08-25\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_finetuned_legal_tech_ukrainian` is a English model originally trained by Dharil.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_legal_tech_ukrainian_en_5.4.2_3.0_1724598706500.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_legal_tech_ukrainian_en_5.4.2_3.0_1724598706500.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"t5_small_finetuned_legal_tech_ukrainian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"t5_small_finetuned_legal_tech_ukrainian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_finetuned_legal_tech_ukrainian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|334.5 MB|\n\n## References\n\nhttps://huggingface.co/Dharil/t5-small-finetuned-legal-tech-UK","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"88A0:3A3DD:17B186:5E469F:6AB92E0C"},"text_sha256":"065b717461c9c67003f4b9b70158edcb803dd06932b5a9ed1303a3bf39b4ee0c"},{"path":"docs/_posts/ahmedlone127/2024-08-25-t5_small_finetuned_legal_tech_ukrainian_pipeline_en.md","size":2137,"blob_sha":"3543a8ba414a7a70b6a9aac7d2257843cb85afab","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English t5_small_finetuned_legal_tech_ukrainian_pipeline pipeline T5Transformer from Dharil\nauthor: John Snow Labs\nname: t5_small_finetuned_legal_tech_ukrainian_pipeline\ndate: 2024-08-25\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`t5_small_finetuned_legal_tech_ukrainian_pipeline` is a English model originally trained by Dharil.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_legal_tech_ukrainian_pipeline_en_5.4.2_3.0_1724598726743.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/t5_small_finetuned_legal_tech_ukrainian_pipeline_en_5.4.2_3.0_1724598726743.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"t5_small_finetuned_legal_tech_ukrainian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"t5_small_finetuned_legal_tech_ukrainian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|t5_small_finetuned_legal_tech_ukrainian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|334.5 MB|\n\n## References\n\nhttps://huggingface.co/Dharil/t5-small-finetuned-legal-tech-UK\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4EA0:3FA0D:179FDB:5E34A0:6AB92E06"},"text_sha256":"9ef8d9e7d987fde72210c0ccd23fccad3c1dd33a6a1bc491670c59d82d31071e"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_english_german_en.md","size":2769,"blob_sha":"eacc1408f651bf28e4a364bcd0d20e6618f34d93","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_german\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_german_en_5.4.2_3.0_1724679478025.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_german_en_5.4.2_3.0_1724679478025.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_english_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_english_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C18E:3CC8A:17F681:5E8C04:6AB92E0D"},"text_sha256":"ce8b76c895b09935a8f18b7cbc85ad217671a0163468d49c0928c3d3a51c956f"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_english_german_pipeline_en.md","size":2132,"blob_sha":"a78d0f0aa16dc17729cff76d24c29969049d9cfe","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_english_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_english_german_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_english_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_german_pipeline_en_5.4.2_3.0_1724679555447.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_english_german_pipeline_en_5.4.2_3.0_1724679555447.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_english_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_english_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_english_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_en_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"671A:09BF:B39C1:2E72C7:6AB92E0C"},"text_sha256":"05f80c2865304e0ea98e2515e297f16bc70271b67e92770a82ab3482806e8019"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_german_french_en.md","size":2761,"blob_sha":"25a412d84d27aca1f0d7de708bd3a2ad69dbed47","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_french\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_french_en_5.4.2_3.0_1724712808171.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_french_en_5.4.2_3.0_1724712808171.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_german_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_german_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C90E:38C7FC:180A32:5AC597:6AB92E0A"},"text_sha256":"8126ba1695b9127d6055bcb089de1ba86ace85be267f085edb46fa964724bb4a"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_german_french_pipeline_en.md","size":2124,"blob_sha":"75b5b24264666f2f1956046aa281c9a39655ed8e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_german_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_german_french_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_german_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_french_pipeline_en_5.4.2_3.0_1724712870628.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_german_french_pipeline_en_5.4.2_3.0_1724712870628.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_german_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_german_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_german_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_de_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E69E:B08CF:176730:5DFD11:6AB92E09"},"text_sha256":"de00934646df6e703eff68cfb1368939b1fa1db94524dc9985e360d086fc10b2"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_italian_french_en.md","size":2769,"blob_sha":"a760c140cfa9c5c29d7fec1475a8b422b7073375","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_french T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_french\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_french` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_french_en_5.4.2_3.0_1724695052868.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_french_en_5.4.2_3.0_1724695052868.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_french\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_french\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_french|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_fr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0884:3A3DD:17B19E:5E46F4:6AB92E0E"},"text_sha256":"0b4ba9839c5b536b53a702009b96a615c56b7c14f3b8493d651ea40f225b19c8"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_italian_french_pipeline_en.md","size":2132,"blob_sha":"b763a8cac81e991cd6c9b76f31055b94a6cb2f67","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_french_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_french_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_french_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_french_pipeline_en_5.4.2_3.0_1724695114152.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_french_pipeline_en_5.4.2_3.0_1724695114152.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_french_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_french_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_fr\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C5E0:4F9CC:172CD1:5DBFA2:6AB92E0F"},"text_sha256":"c32d110be85763a8ece2c913210d5c83f718d1ad1f2c4a72b8d4b9b25bf7e5be"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_swedish_italian_en.md","size":2777,"blob_sha":"3dba6a428b0ecf4292619deac3c46e97c9c2858b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_italian T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_italian\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_italian` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_italian_en_5.4.2_3.0_1724699304725.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_italian_en_5.4.2_3.0_1724699304725.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_italian\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_italian\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_italian|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_it","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:1836DF:5ECCF5:6AB92E0F"},"text_sha256":"4986d0e72b8a6a05933e3160330ac1ec801ca4dc6bb5e576ef9394c1ee35b530"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_multitask_swedish_italian_pipeline_en.md","size":2140,"blob_sha":"2796a034701d195adbda09259cea9d69c78c36e4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_italian_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_italian_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_italian_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_italian_pipeline_en_5.4.2_3.0_1724699367333.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_italian_pipeline_en_5.4.2_3.0_1724699367333.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_italian_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_italian_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_italian_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_it\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"90A2:324E19:18207C:5EB5EE:6AB92E10"},"text_sha256":"9980c15c142d40ff4b1a9e541381571efe21a74d15f552e7ed4dd98b0cdd2b8e"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_czech_en.md","size":2649,"blob_sha":"5a164b4600242b5de5cf02233b748d7d7417c709","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_czech\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_czech_en_5.4.2_3.0_1724630709358.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_czech_en_5.4.2_3.0_1724630709358.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|175.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF1C:3E1C8:180715:5E9B82:6AB92E0F"},"text_sha256":"b6d05c498b261cf429a6d27cd9f4995b705ddbee0d231e45c6c1b2da232c04fd"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_czech_pipeline_en.md","size":2012,"blob_sha":"17444a3cdc2bba4ae88c6394b728ccaa8e4af629","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_czech_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_czech_pipeline_en_5.4.2_3.0_1724630769636.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_czech_pipeline_en_5.4.2_3.0_1724630769636.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|175.9 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:185911:5EEF09:6AB92E0E"},"text_sha256":"71f3103eb248e4ef4705446f7a9dd72f45af4ade46ffdc0f4c223e3cdb5e26ba"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_swedish_en.md","size":2665,"blob_sha":"169325cd82fa9239be9062866bdea21df770cdfe","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_swedish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_swedish\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_swedish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_swedish_en_5.4.2_3.0_1724673970502.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_swedish_en_5.4.2_3.0_1724673970502.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_swedish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_swedish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_swedish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|176.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_sv","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"964C:29FD16:185E1C:5EF380:6AB92E10"},"text_sha256":"0cdb62b29a42583105cc02435780a7e2266db44f7023eece3118260f0652ecf0"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_summ_swedish_pipeline_en.md","size":2028,"blob_sha":"a1648df65e505cacec8e775d5479eb763b16e656","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_swedish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_swedish_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_swedish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_swedish_pipeline_en_5.4.2_3.0_1724674030496.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_swedish_pipeline_en_5.4.2_3.0_1724674030496.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_swedish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_swedish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_swedish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|176.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_sv\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D9A8:3BCC6:17F1FA:5E8761:6AB92E10"},"text_sha256":"5a3443c50cfa5fcf0e8709cd8f6063dd602af8abb4c7e44d853ce830bcf1acd9"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_english_german_en.md","size":2733,"blob_sha":"af1d78e04b9207a1726e9fd2dfd57ca4bb5011fa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_german\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_en_5.4.2_3.0_1724641329799.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_en_5.4.2_3.0_1724641329799.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_english_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_english_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A32:3AC5A:180AFB:5EA055:6AB92E11"},"text_sha256":"3d541b78e624631c78ce66ae8e4f36130ac060582a553b0c36812e6244e7f90e"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_english_german_pipeline_en.md","size":2096,"blob_sha":"db324fc604b0fff74bb7fc729bb8ad5481e412c9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_english_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_english_german_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_english_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_pipeline_en_5.4.2_3.0_1724641390170.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_english_german_pipeline_en_5.4.2_3.0_1724641390170.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_english_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_english_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_english_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_en_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AEB6:A58F2:177818:5E0E23:6AB92E0F"},"text_sha256":"1cc39e5aecc6d80416d8f3e68daa2f62a37a1b4af6ec9010377c71011f6cef07"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_czech_small_finetuned_en.md","size":2861,"blob_sha":"aac37f17418b44a62db3cd062f0cbfab4a3ddac9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_czech_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_czech_small_finetuned\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_czech_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_small_finetuned_en_5.4.2_3.0_1724676447928.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_small_finetuned_en_5.4.2_3.0_1724676447928.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_czech_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_czech_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_czech_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_cs_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8F38:3AC5A:180B01:5EA06B:6AB92E12"},"text_sha256":"dabdfef9aefb7f8eaa6f18fffa92f49f2202ca80d9589b39e441aa0f07cde24a"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_czech_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"b9621f0ea4dff2411879ca1fea6e5d6365cc5a9b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_czech_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_czech_small_finetuned_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_czech_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724676508051.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_czech_small_finetuned_pipeline_en_5.4.2_3.0_1724676508051.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_czech_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_czech_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_czech_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_cs_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8CC0:11316A:17F796:5E8C5D:6AB92E11"},"text_sha256":"1076d0d832281b368db59dc28eb71c854fc27bc97451b85d2444d361b1b0db99"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_german_small_finetuned_en.md","size":2869,"blob_sha":"9c0b55419861987a305581bfa53c1722c7dbfaee","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_german_small_finetuned\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_small_finetuned_en_5.4.2_3.0_1724715495875.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_small_finetuned_en_5.4.2_3.0_1724715495875.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_french_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_french_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6C8C:3A3DD:17B1D3:5E4788:6AB92E12"},"text_sha256":"b38b7a8b98b5e97b5b84d426565dfec25ba8349d491db3e0b004ca716f9c1c07"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_french_german_small_finetuned_pipeline_en.md","size":2232,"blob_sha":"3bb091dfd3858831c1b6a4f2383a8afae90276dd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_french_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_french_german_small_finetuned_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_french_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_small_finetuned_pipeline_en_5.4.2_3.0_1724715557619.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_french_german_small_finetuned_pipeline_en_5.4.2_3.0_1724715557619.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_french_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_french_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_french_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_fr_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF1C:3E1C8:18072E:5E9BE8:6AB92E13"},"text_sha256":"1d28b30c15292e521b956c5ff32a6f9cef2db047248607b9dc17ececef15ff59"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_english_en.md","size":2733,"blob_sha":"239357b9d014191c68b4eef63f806c3558804749","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_english\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_en_5.4.2_3.0_1724675086945.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_en_5.4.2_3.0_1724675086945.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AEB6:A58F2:177824:5E0E57:6AB92E14"},"text_sha256":"b12bd320340c7106613f06bbf892bb7405f073db4f8195827c843be8a5fe6c38"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_english_pipeline_en.md","size":2096,"blob_sha":"47910a4bd78b969e693b1fd0852a2dc176261a84","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_english_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_pipeline_en_5.4.2_3.0_1724675147180.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_english_pipeline_en_5.4.2_3.0_1724675147180.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B452:3FA0D:17A02D:5E359E:6AB92E11"},"text_sha256":"4a3adc2509abbdafe9e94916328625aa4b6707bfebe4ed9cbf78cfe55c2e742d"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_swedish_small_finetuned_en.md","size":2877,"blob_sha":"34523981f63b1efa0ae649768300b5d669fe54f2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_swedish_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_swedish_small_finetuned\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_swedish_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_small_finetuned_en_5.4.2_3.0_1724671276469.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_small_finetuned_en_5.4.2_3.0_1724671276469.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_german_swedish_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_german_swedish_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_swedish_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_sv_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BF7C:40B0C:17F9C9:5E8FE9:6AB92E14"},"text_sha256":"82b2b79c487f63d3ed09c244e4e21b1485edebdaebe7e0a9406f7e49663f45a1"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_german_swedish_small_finetuned_pipeline_en.md","size":2240,"blob_sha":"6e3df59ee2501b719ad7ac9926b439f50a214751","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_german_swedish_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_german_swedish_small_finetuned_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_german_swedish_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724671338120.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_german_swedish_small_finetuned_pipeline_en_5.4.2_3.0_1724671338120.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_german_swedish_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_german_swedish_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_german_swedish_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_de_sv_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DEF4:372D9:17F109:5E87B0:6AB92E15"},"text_sha256":"8c866d8a6b1b84aa7225ad4a5605870a897832e248b3af7cfbdbf37f27d8a20a"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_italian_spanish_en.md","size":2741,"blob_sha":"e03d863847b66f54cd0b0b5372b1a847bbfe57ae","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_spanish\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_en_5.4.2_3.0_1724663587263.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_en_5.4.2_3.0_1724663587263.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_italian_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_italian_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4652:35999:17B224:5E48ED:6AB92E15"},"text_sha256":"a7d77d90333a9dcc66fa3d8faf66cf24a733ac7bfccd14c1fe9ab564f207a037"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_italian_spanish_pipeline_en.md","size":2104,"blob_sha":"b8636a1c6dfd32cc64dc9618d628a5d0fb46454e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_italian_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_italian_spanish_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_italian_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_pipeline_en_5.4.2_3.0_1724663647193.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_italian_spanish_pipeline_en_5.4.2_3.0_1724663647193.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_italian_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_italian_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_italian_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_it_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDBA:3D501:186B21:5F0171:6AB92E15"},"text_sha256":"0f29084e105a5023b385ea9029894fb3f6c7d90a6cbdbb27c84a62d4c0be7ab8"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_en.md","size":2741,"blob_sha":"35485819a472b3afe99088b35245a0d37761dbe0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_english\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_en_5.4.2_3.0_1724709963235.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_en_5.4.2_3.0_1724709963235.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D3F8:241B62:17BC6F:5E5306:6AB92E15"},"text_sha256":"8b8356b6f6d516bd30f43a3584d19c8e484c84df605c8386c250615a660e3239"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_pipeline_en.md","size":2104,"blob_sha":"61cbd5625686406bfe5999d37851d7eef06f02b0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_english_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_pipeline_en_5.4.2_3.0_1724710024191.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_pipeline_en_5.4.2_3.0_1724710024191.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.3 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D06:324E19:18209D:5EB6AD:6AB92E15"},"text_sha256":"cf2c08a226d10de797333cd46b7d8dcc3ec89887c67025ae87cf9952f5d96733"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_small_finetuned_en.md","size":2885,"blob_sha":"ea2b7b7426d7dab7900be00d4e4c21169946555b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_english_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_english_small_finetuned\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_english_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_small_finetuned_en_5.4.2_3.0_1724637168040.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_small_finetuned_en_5.4.2_3.0_1724637168040.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_english_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_spanish_english_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_english_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_en_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BBA2:A58F2:177846:5E0EC1:6AB92E15"},"text_sha256":"7ed332ebc48fb69ee6d8c96789999c551edebc35106a68bd40e60775cef4b5d9"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_spanish_english_small_finetuned_pipeline_en.md","size":2248,"blob_sha":"1d926cfe6f8dc7ae27b4894942df45cb44266d9e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_spanish_english_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_spanish_english_small_finetuned_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_spanish_english_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_small_finetuned_pipeline_en_5.4.2_3.0_1724637229051.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_spanish_english_small_finetuned_pipeline_en_5.4.2_3.0_1724637229051.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_spanish_english_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_spanish_english_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_spanish_english_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_es_en_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C6:2C474:182336:5EB972:6AB92E17"},"text_sha256":"569a781e3a30b631f5a3d84eb662c4d54736bbea2b638b6dfe73053fb6798c97"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_swedish_german_en.md","size":2733,"blob_sha":"bb2707c1972230283484eb921e4c62fb94927b26","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_german\ndate: 2024-08-26\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_en_5.4.2_3.0_1724638798528.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_en_5.4.2_3.0_1724638798528.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_swedish_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B84:3B1F3:187224:5F0944:6AB92E17"},"text_sha256":"9fcd74b2e305d8c8d92574426042ddc6eeac739e21fecf5202d15ba5c8eb7d9f"},{"path":"docs/_posts/ahmedlone127/2024-08-26-legal_t5_small_trans_swedish_german_pipeline_en.md","size":2096,"blob_sha":"94cbf653d70123594a090ddc2edb32926a095b23","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_swedish_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_swedish_german_pipeline\ndate: 2024-08-26\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_swedish_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_pipeline_en_5.4.2_3.0_1724638858724.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_swedish_german_pipeline_en_5.4.2_3.0_1724638858724.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_swedish_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_swedish_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_swedish_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|180.4 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_sv_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C190:09ED:E73E5:3FC3D9:6AB92E14"},"text_sha256":"b54c9e2af75f0b5efc997b4070aa015ff52dc7f7194c88cdfce9311402b04c70"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_cls_finetuned_spanish_en.md","size":2746,"blob_sha":"21e5648150206bed9ba6c5bbcd8c78f1f47d4d02","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_spanish\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_spanish_en_5.4.2_3.0_1724729785901.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_spanish_en_5.4.2_3.0_1724729785901.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_cls_finetuned_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:17464D:5DDC98:6AB92E18"},"text_sha256":"8274f50be1afde705b071553205f864eeef6570b1a79e2018f85e6b87fbb4d64"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_cls_finetuned_spanish_pipeline_en.md","size":2109,"blob_sha":"9574d74980113f99a9a02d8a7ad100a67fea6f0c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_cls_finetuned_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_cls_finetuned_spanish_pipeline\ndate: 2024-08-27\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_cls_finetuned_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_spanish_pipeline_en_5.4.2_3.0_1724729846170.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_cls_finetuned_spanish_pipeline_en_5.4.2_3.0_1724729846170.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_cls_finetuned_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_cls_finetuned_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_cls_finetuned_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.2 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_cls_finetuned_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E28:18233:17C295:5E5802:6AB92E19"},"text_sha256":"66e894af30362a601d3be59122aa5ca22f8a399fddd59601771253539e2db372"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_italian_czech_en.md","size":2761,"blob_sha":"9df284102a2b14e3d50b68e47dd2594c7dfb9fa6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_czech T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_czech\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_czech` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_czech_en_5.4.2_3.0_1724747043993.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_czech_en_5.4.2_3.0_1724747043993.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_czech\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_italian_czech\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_czech|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_cs","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3816:3B6DE:17869B:5E1C70:6AB92E19"},"text_sha256":"5475ad9122b26ead704b3c54db5889e391bc41e900134b8ab4eeca5dc7b05e2b"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_italian_czech_pipeline_en.md","size":2124,"blob_sha":"12cfceadef36fea87fa4b23c0bea2eec07ea8825","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_italian_czech_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_italian_czech_pipeline\ndate: 2024-08-27\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_italian_czech_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_czech_pipeline_en_5.4.2_3.0_1724747102936.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_italian_czech_pipeline_en_5.4.2_3.0_1724747102936.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_italian_czech_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_italian_czech_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_italian_czech_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_it_cs\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8408:09ED:E73EE:3FC40E:6AB92E19"},"text_sha256":"fcf821ab27f32994e83e208d56da6ec1e61552065c06453f0d5b236cfa01c299"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_swedish_english_en.md","size":2777,"blob_sha":"5f5d863da3766433e9fce0fc74ca8651193de14f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_english T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_english\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_english` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_english_en_5.4.2_3.0_1724749413063.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_english_en_5.4.2_3.0_1724749413063.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_english\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_multitask_swedish_english\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_english|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"110E:40CE8:181D47:5EB30E:6AB92E1A"},"text_sha256":"bfc35f0c2b61dec6b1f8f9ec4b87992a1c4c5f3c4f731272cf62be3713780270"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_multitask_swedish_english_pipeline_en.md","size":2140,"blob_sha":"08fa9f5eb74664a9013d45043ca694e7885b0468","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_multitask_swedish_english_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_multitask_swedish_english_pipeline\ndate: 2024-08-27\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_multitask_swedish_english_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_english_pipeline_en_5.4.2_3.0_1724749473858.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_multitask_swedish_english_pipeline_en_5.4.2_3.0_1724749473858.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_multitask_swedish_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_multitask_swedish_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_multitask_swedish_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.6 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_multitask_sv_en\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:1786A5:5E1C9C:6AB92E1A"},"text_sha256":"6b5fe7472be2b5900e8723fcfd9b8de65d918fa612220f303c291c8273da2327"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_summ_multitask_german_en.md","size":2747,"blob_sha":"51582d809d3c512d1509028a0e0c85ffe0656306","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_german T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_german\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_german` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_german_en_5.4.2_3.0_1724765110331.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_german_en_5.4.2_3.0_1724765110331.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_german\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_german\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_german|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_de","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F34C:24970A:18667A:5EFAE4:6AB92E19"},"text_sha256":"3d3e327cd4c3af17b40430e72aec239a92576825210747be5751966659f8e461"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_summ_multitask_german_pipeline_en.md","size":2110,"blob_sha":"a5c42982db79e52d6303f94f247e1dbfed4061f0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_german_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_german_pipeline\ndate: 2024-08-27\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_german_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_german_pipeline_en_5.4.2_3.0_1724765169511.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_german_pipeline_en_5.4.2_3.0_1724765169511.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_german_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_german_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_german_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.7 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_de\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E14:3FA0D:17A076:5E36CD:6AB92E19"},"text_sha256":"3700ee484fca4c4ba105352acb22fce48318717fa9a79129e0395a9f3f059dd5"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_trans_czech_german_small_finetuned_en.md","size":2861,"blob_sha":"3d6016966c7248df80d9cbb7ee5a59c146ee65a0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_german_small_finetuned T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_german_small_finetuned\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_german_small_finetuned` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_small_finetuned_en_5.4.2_3.0_1724760278312.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_small_finetuned_en_5.4.2_3.0_1724760278312.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_trans_czech_german_small_finetuned\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_trans_czech_german_small_finetuned\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_german_small_finetuned|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_de_small_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"834C:3EACB:17CB5D:5E621C:6AB92E14"},"text_sha256":"d5c2aaa76b4bbd24630e6503784419f04fb215d91aece9d5e0c2cdb9a952dde6"},{"path":"docs/_posts/ahmedlone127/2024-08-27-legal_t5_small_trans_czech_german_small_finetuned_pipeline_en.md","size":2224,"blob_sha":"c644ee947104550dd5be707604c5803a07f80dad","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_trans_czech_german_small_finetuned_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_trans_czech_german_small_finetuned_pipeline\ndate: 2024-08-27\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_trans_czech_german_small_finetuned_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_small_finetuned_pipeline_en_5.4.2_3.0_1724760338339.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_trans_czech_german_small_finetuned_pipeline_en_5.4.2_3.0_1724760338339.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_trans_czech_german_small_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_trans_czech_german_small_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_trans_czech_german_small_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_trans_cs_de_small_finetuned\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2958:3E1C8:18078D:5E9D56:6AB92E1A"},"text_sha256":"32af7d72e49861584e971b147190912d6f1c9067196eadc07fd040864b8b4683"},{"path":"docs/_posts/ahmedlone127/2024-08-27-russian_t5_model_forlegaltext_rouge_en.md","size":2750,"blob_sha":"fb28f2e5685b0984da638897b842dfbf0adc68b7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English russian_t5_model_forlegaltext_rouge T5Transformer from marcus2000\nauthor: John Snow Labs\nname: russian_t5_model_forlegaltext_rouge\ndate: 2024-08-27\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`russian_t5_model_forlegaltext_rouge` is a English model originally trained by marcus2000.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/russian_t5_model_forlegaltext_rouge_en_5.4.2_3.0_1724796281954.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/russian_t5_model_forlegaltext_rouge_en_5.4.2_3.0_1724796281954.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"russian_t5_model_forlegaltext_rouge\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"russian_t5_model_forlegaltext_rouge\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|russian_t5_model_forlegaltext_rouge|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|1.5 GB|\n\n## References\n\nhttps://huggingface.co/marcus2000/ru_t5_model_forlegaltext_rouge","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3F0E:3D40A:174685:5DDD3A:6AB92E16"},"text_sha256":"ac092541e5ca6f5a64fa318f44ac6b08730fcad32539cbb37f9ed2fd35590a8d"},{"path":"docs/_posts/ahmedlone127/2024-08-28-legal_t5_small_summ_multitask_spanish_en.md","size":2755,"blob_sha":"d93dd74e3ff0b7cb82ce89386d94db126cdd520c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_spanish T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_spanish\ndate: 2024-08-28\ntags: [en, open_source, onnx, t5, question_answering, summarization, translation, text_generation]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: T5Transformer\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_spanish` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_spanish_en_5.4.2_3.0_1724831558481.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_spanish_en_5.4.2_3.0_1724831558481.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n\nt5  = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_spanish\",\"en\") \\\n     .setInputCols([\"document\"]) \\\n     .setOutputCol(\"output\")\n\npipeline = Pipeline().setStages([documentAssembler, t5])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n\nval t5 = T5Transformer.pretrained(\"legal_t5_small_summ_multitask_spanish\", \"en\")\n    .setInputCols(Array(\"documents\")) \n    .setOutputCol(\"output\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, t5))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_spanish|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[output]|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_es","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CB0:3E1DA:17B606:5E4D14:6AB92E19"},"text_sha256":"6ba5d4c2d9f0a08cfbd0daaa16d85fc182c33e3bb55c78ab58faaeb5c3c4d65d"},{"path":"docs/_posts/ahmedlone127/2024-08-28-legal_t5_small_summ_multitask_spanish_pipeline_en.md","size":2118,"blob_sha":"fae07f91ee8ac01e0dfdddd555cf8c6ffd942728","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_t5_small_summ_multitask_spanish_pipeline pipeline T5Transformer from SEBIS\nauthor: John Snow Labs\nname: legal_t5_small_summ_multitask_spanish_pipeline\ndate: 2024-08-28\ntags: [en, open_source, pipeline, onnx]\ntask: [Question Answering, Summarization, Translation, Text Generation]\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained T5Transformer, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_t5_small_summ_multitask_spanish_pipeline` is a English model originally trained by SEBIS.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_spanish_pipeline_en_5.4.2_3.0_1724831620531.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_t5_small_summ_multitask_spanish_pipeline_en_5.4.2_3.0_1724831620531.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_t5_small_summ_multitask_spanish_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_t5_small_summ_multitask_spanish_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_t5_small_summ_multitask_spanish_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|179.5 MB|\n\n## References\n\nhttps://huggingface.co/SEBIS/legal_t5_small_summ_multitask_es\n\n## Included Models\n\n- DocumentAssembler\n- T5Transformer","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D54:3B1F3:18726C:5F0A23:6AB92E1A"},"text_sha256":"e9dc1a97b2b5fdff38f01d2f1506e56b6a50d93e2e29ca84cc305b8430ece905"},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline_pt.md","size":2363,"blob_sha":"e084254adcd6a747cef171d72e58df57e396cba4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline pipeline BertSentenceEmbeddings from stjiris\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline\ndate: 2024-08-31\ntags: [pt, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline` is a Portuguese model originally trained by stjiris.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline_pt_5.4.2_3.0_1725121448495.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline_pt_5.4.2_3.0_1725121448495.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline\", lang = \"pt\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline\", lang = \"pt\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/stjiris/bert-large-portuguese-cased-legal-mlm-gpl-nli-sts-v0\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BBA2:A58F2:177879:5E0FD8:6AB92E1D"},"text_sha256":"57c3ca9df63d2ee69321ae566a3a30534cf0cd2bf8599a558cb15c7f5bcaf78d"},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pt.md","size":2707,"blob_sha":"6eefffd951c1899eb53faf2b1c14d6ca77dcac2b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese Legal BERT Sentence Embedding Large Cased model\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0\ndate: 2024-08-31\ntags: [bert, pt, embeddings, sentence, open_source, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal BERT Sentence Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-large-portuguese-cased-legal-mlm-gpl-nli-sts-v0` is a Portuguese model originally trained by `stjiris`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pt_5.4.2_3.0_1725121381174.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0_pt_5.4.2_3.0_1725121381174.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0\", \"pt\") \\\n.setInputCols(\"sentence\") \\\n.setOutputCol(\"bert_sentence\")\n\nnlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, sent_embeddings ])\n  result = pipeline.fit(data).transform(data)\n```\n```scala\nvval sent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0\", \"pt\")\n.setInputCols(\"sentence\")\n.setOutputCol(\"bert_sentence\")\n\nval pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, sent_embeddings ))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_mlm_gpl_nli_sts_v0|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nReferences\n\n- https://huggingface.co/stjiris/bert-large-portuguese-cased-legal-mlm-gpl-nli-sts-v0\n- https://rufimelo99.github.io/SemanticSearchSystemForSTJ/\n- https://www.SBERT.net\n- https://github.com/rufimelo99\n- https://www.inesc-id.pt/projects/PR07005/","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D5A:3D40A:174692:5DDD6E:6AB92E1D"},"text_sha256":"ae553c37df00434e76c5d613a0749fdb16768fcfdcca609620cf524c92beeb32"},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline_pt.md","size":2381,"blob_sha":"77f45653ea7c7074ee2ff02e9aa857690210681b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline pipeline BertSentenceEmbeddings from stjiris\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline\ndate: 2024-08-31\ntags: [pt, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline` is a Portuguese model originally trained by stjiris.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline_pt_5.4.2_3.0_1725122131764.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline_pt_5.4.2_3.0_1725122131764.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline\", lang = \"pt\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline\", lang = \"pt\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/stjiris/bert-large-portuguese-cased-legal-tsdae-gpl-nli-sts-v1\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D36A:727CE:1764AF:5DFC13:6AB92E1D"},"text_sha256":"ac8bf9b2ea9a9872665b8e67054b77259062b3e47c5d25840d57a53abdf47380"},{"path":"docs/_posts/ahmedlone127/2024-08-31-sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pt.md","size":2723,"blob_sha":"7c7e67d2617db65a2967c7b9f02007bce0f10ad2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese Legal BERT Sentence Embedding Large Cased model\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1\ndate: 2024-08-31\ntags: [bert, pt, embeddings, sentence, open_source, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal BERT Sentence Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-large-portuguese-cased-legal-tsdae-gpl-nli-sts-v1` is a Portuguese model originally trained by `stjiris`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pt_5.4.2_3.0_1725122049754.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1_pt_5.4.2_3.0_1725122049754.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1\", \"pt\") \\\n.setInputCols(\"sentence\") \\\n.setOutputCol(\"bert_sentence\")\n\nnlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, sent_embeddings ])\n  result = pipeline.fit(data).transform(data)\n```\n```scala\nvval sent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1\", \"pt\")\n.setInputCols(\"sentence\")\n.setOutputCol(\"bert_sentence\")\n\nval pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, sent_embeddings ))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_tsdae_gpl_nli_sts_v1|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nReferences\n\n- https://huggingface.co/stjiris/bert-large-portuguese-cased-legal-tsdae-gpl-nli-sts-v1\n- https://rufimelo99.github.io/SemanticSearchSystemForSTJ/\n- https://www.SBERT.net\n- https://github.com/rufimelo99\n- https://www.inesc-id.pt/projects/PR07005/","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D36A:727CE:1764B1:5DFC1D:6AB92E1E"},"text_sha256":"a3b4cb2436d74ba4ae095d364078634116baa4cf1201ee40a92811711740377d"},{"path":"docs/_posts/ahmedlone127/2024-09-01-distilbert_base_german_cased_finetuned_ai4privacy_v2_de.md","size":3201,"blob_sha":"bc5157c1398ba51ea5abf50ffcf73066232996e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German distilbert_base_german_cased_finetuned_ai4privacy_v2 DistilBertForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: distilbert_base_german_cased_finetuned_ai4privacy_v2\ndate: 2024-09-01\ntags: [de, open_source, onnx, token_classification, distilbert, ner]\ntask: Named Entity Recognition\nlanguage: de\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_german_cased_finetuned_ai4privacy_v2` is a German model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_german_cased_finetuned_ai4privacy_v2_de_5.4.2_3.0_1725161373022.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_german_cased_finetuned_ai4privacy_v2_de_5.4.2_3.0_1725161373022.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = DistilBertForTokenClassification.pretrained(\"distilbert_base_german_cased_finetuned_ai4privacy_v2\",\"de\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = DistilBertForTokenClassification.pretrained(\"distilbert_base_german_cased_finetuned_ai4privacy_v2\", \"de\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_german_cased_finetuned_ai4privacy_v2|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|de|\n|Size:|250.6 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/distilbert-base-german-cased_finetuned_ai4privacy_v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C72C:17E138:17B996:5E5069:6AB92E1C"},"text_sha256":"0a13d1a34a27b43ca144cb1d48c6a57998721eabebc5954f281e6f4afe2038e8"},{"path":"docs/_posts/ahmedlone127/2024-09-01-distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline_de.md","size":2298,"blob_sha":"1ae0fae6ceae6196afa43542f43a102886444944","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline pipeline DistilBertForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline\ndate: 2024-09-01\ntags: [de, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: de\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline` is a German model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline_de_5.4.2_3.0_1725161387760.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline_de_5.4.2_3.0_1725161387760.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline\", lang = \"de\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline\", lang = \"de\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilbert_base_german_cased_finetuned_ai4privacy_v2_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|de|\n|Size:|250.6 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/distilbert-base-german-cased_finetuned_ai4privacy_v2\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DistilBertForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"868E:7A4F8:18482F:5EDFCA:6AB92E1E"},"text_sha256":"765def0db4220ccf7bbc66b6a0fa6d9976d44d0b64d97b3b88224704c8e23c98"},{"path":"docs/_posts/ahmedlone127/2024-09-01-fine_tune_embedding_bge_base_hrpolicy_vfinal_en.md","size":2779,"blob_sha":"24f78285de0015c7e1c8fccb4113aa7a7efb277a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English fine_tune_embedding_bge_base_hrpolicy_vfinal BGEEmbeddings from kr-manish\nauthor: John Snow Labs\nname: fine_tune_embedding_bge_base_hrpolicy_vfinal\ndate: 2024-09-01\ntags: [en, open_source, onnx, embeddings, bge]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BGEEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BGEEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`fine_tune_embedding_bge_base_hrpolicy_vfinal` is a English model originally trained by kr-manish.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/fine_tune_embedding_bge_base_hrpolicy_vfinal_en_5.5.0_3.0_1725229052816.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/fine_tune_embedding_bge_base_hrpolicy_vfinal_en_5.5.0_3.0_1725229052816.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\nembeddings = BGEEmbeddings.pretrained(\"fine_tune_embedding_bge_base_hrpolicy_vfinal\",\"en\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \n\nval embeddings = BGEEmbeddings.pretrained(\"fine_tune_embedding_bge_base_hrpolicy_vfinal\",\"en\") \n    .setInputCols(Array(\"document\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, embeddings))\nval data = Seq(\"I love spark-nlp).toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|fine_tune_embedding_bge_base_hrpolicy_vfinal|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[bge]|\n|Language:|en|\n|Size:|256.0 MB|\n\n## References\n\nhttps://huggingface.co/kr-manish/fine-tune-embedding-bge-base-HrPolicy_vfinal","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DCA:2B291E:185987:5EF133:6AB92E1F"},"text_sha256":"4824dcc2c0b56ea004817fd9128c47cf9f44a457b50cb079738e057f7e8e5ee0"},{"path":"docs/_posts/ahmedlone127/2024-09-01-fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline_en.md","size":2143,"blob_sha":"c11f6cfc9e3d7d71fe9c2ceb6e1bf1040adf428f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline pipeline BGEEmbeddings from kr-manish\nauthor: John Snow Labs\nname: fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline\ndate: 2024-09-01\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BGEEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline` is a English model originally trained by kr-manish.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline_en_5.5.0_3.0_1725229132660.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline_en_5.5.0_3.0_1725229132660.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|fine_tune_embedding_bge_base_hrpolicy_vfinal_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|256.0 MB|\n\n## References\n\nhttps://huggingface.co/kr-manish/fine-tune-embedding-bge-base-HrPolicy_vfinal\n\n## Included Models\n\n- DocumentAssembler\n- BGEEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"471A:326565:17C818:5E601B:6AB92E20"},"text_sha256":"d9c2f2ff0c6bf3cdb2964692a93eefcb1d521a1def7f9920c0c2e8a87be3f608"},{"path":"docs/_posts/ahmedlone127/2024-09-01-gqa_roberta_legal_squad_complete_augmented_2000_en.md","size":3227,"blob_sha":"436523321fb45c9c231e0952f07134669cf57d63","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English gqa_roberta_legal_squad_complete_augmented_2000 RoBertaForQuestionAnswering from farid1088\nauthor: John Snow Labs\nname: gqa_roberta_legal_squad_complete_augmented_2000\ndate: 2024-09-01\ntags: [en, open_source, onnx, question_answering, roberta]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gqa_roberta_legal_squad_complete_augmented_2000` is a English model originally trained by farid1088.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gqa_roberta_legal_squad_complete_augmented_2000_en_5.4.2_3.0_1725200162171.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gqa_roberta_legal_squad_complete_augmented_2000_en_5.4.2_3.0_1725200162171.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n             \ndocumentAssembler = MultiDocumentAssembler() \\\n     .setInputCol([\"question\", \"context\"]) \\\n     .setOutputCol([\"document_question\", \"document_context\"])\n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"gqa_roberta_legal_squad_complete_augmented_2000\",\"en\") \\\n     .setInputCols([\"document_question\",\"document_context\"]) \\\n     .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([documentAssembler, spanClassifier])\ndata = spark.createDataFrame([[\"What framework do I use?\",\"I use spark-nlp.\"]]).toDF(\"document_question\", \"document_context\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering.pretrained(\"gqa_roberta_legal_squad_complete_augmented_2000\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier))\nval data = Seq(\"What framework do I use?\",\"I use spark-nlp.\").toDS.toDF(\"document_question\", \"document_context\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gqa_roberta_legal_squad_complete_augmented_2000|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|465.8 MB|\n\n## References\n\nhttps://huggingface.co/farid1088/GQA_RoBERTa_legal_SQuAD_complete_augmented_2000","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"47C4:3AC15:181BE1:5EB1DE:6AB92E1E"},"text_sha256":"a2396f60843c90366a8a4d03dec0139e1e66c2e10e0a95c32699ac16199ca73e"},{"path":"docs/_posts/ahmedlone127/2024-09-01-gqa_roberta_legal_squad_complete_augmented_2000_pipeline_en.md","size":2225,"blob_sha":"9b98ce2bfb742aa5bd7df56528190fd88155aacf","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English gqa_roberta_legal_squad_complete_augmented_2000_pipeline pipeline RoBertaForQuestionAnswering from farid1088\nauthor: John Snow Labs\nname: gqa_roberta_legal_squad_complete_augmented_2000_pipeline\ndate: 2024-09-01\ntags: [en, open_source, pipeline, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gqa_roberta_legal_squad_complete_augmented_2000_pipeline` is a English model originally trained by farid1088.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gqa_roberta_legal_squad_complete_augmented_2000_pipeline_en_5.4.2_3.0_1725200187382.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gqa_roberta_legal_squad_complete_augmented_2000_pipeline_en_5.4.2_3.0_1725200187382.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"gqa_roberta_legal_squad_complete_augmented_2000_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"gqa_roberta_legal_squad_complete_augmented_2000_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gqa_roberta_legal_squad_complete_augmented_2000_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|465.8 MB|\n\n## References\n\nhttps://huggingface.co/farid1088/GQA_RoBERTa_legal_SQuAD_complete_augmented_2000\n\n## Included Models\n\n- MultiDocumentAssembler\n- RoBertaForQuestionAnswering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8276:18CDF1:17A410:566305:6AB92E20"},"text_sha256":"2f9123539e2f6905de7f286938592af60f37fd6ec64a79da201c65b91dd5d896"},{"path":"docs/_posts/ahmedlone127/2024-09-01-greeklegalroberta_v3_el.md","size":2859,"blob_sha":"c199ce968b2cad67fbf6d06650458bb8140c250c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Modern Greek (1453-) greeklegalroberta_v3 RoBertaEmbeddings from AI-team-UoA\nauthor: John Snow Labs\nname: greeklegalroberta_v3\ndate: 2024-09-01\ntags: [el, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: el\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`greeklegalroberta_v3` is a Modern Greek (1453-) model originally trained by AI-team-UoA.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/greeklegalroberta_v3_el_5.4.2_3.0_1725186645063.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/greeklegalroberta_v3_el_5.4.2_3.0_1725186645063.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"greeklegalroberta_v3\",\"el\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"greeklegalroberta_v3\",\"el\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|greeklegalroberta_v3|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|el|\n|Size:|465.5 MB|\n\n## References\n\nhttps://huggingface.co/AI-team-UoA/GreekLegalRoBERTa_v3","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53B2:3B1F3:1872B6:5F0AD8:6AB92E1D"},"text_sha256":"c1fa731ae72afdd7ce638affbc35cf865e01505396bdc5a6e135f36ee8ff94f4"},{"path":"docs/_posts/ahmedlone127/2024-09-01-greeklegalroberta_v3_pipeline_el.md","size":1988,"blob_sha":"87ea90da9618486da87f768f1f10465f115addb0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Modern Greek (1453-) greeklegalroberta_v3_pipeline pipeline RoBertaEmbeddings from AI-team-UoA\nauthor: John Snow Labs\nname: greeklegalroberta_v3_pipeline\ndate: 2024-09-01\ntags: [el, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: el\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`greeklegalroberta_v3_pipeline` is a Modern Greek (1453-) model originally trained by AI-team-UoA.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/greeklegalroberta_v3_pipeline_el_5.4.2_3.0_1725186668854.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/greeklegalroberta_v3_pipeline_el_5.4.2_3.0_1725186668854.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"greeklegalroberta_v3_pipeline\", lang = \"el\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"greeklegalroberta_v3_pipeline\", lang = \"el\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|greeklegalroberta_v3_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|el|\n|Size:|465.6 MB|\n\n## References\n\nhttps://huggingface.co/AI-team-UoA/GreekLegalRoBERTa_v3\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9580:7A4F8:184849:5EE01B:6AB92E20"},"text_sha256":"31f512d9333535b503ecd8220c5e46e6d65aba679d0ce2fbc499919c07ae1df2"},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_roberta_base_saibo_creator_en.md","size":2933,"blob_sha":"096b488513675cd03e698903041d7cddbaf21c60","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_base_saibo_creator RoBertaEmbeddings from Saibo-creator\nauthor: John Snow Labs\nname: legal_roberta_base_saibo_creator\ndate: 2024-09-01\ntags: [en, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_base_saibo_creator` is a English model originally trained by Saibo-creator.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_base_saibo_creator_en_5.4.2_3.0_1725165075794.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_base_saibo_creator_en_5.4.2_3.0_1725165075794.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_base_saibo_creator\",\"en\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_base_saibo_creator\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_base_saibo_creator|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|en|\n|Size:|466.0 MB|\n\n## References\n\nhttps://huggingface.co/Saibo-creator/legal-roberta-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"39F0:18233:17C311:5E5998:6AB92E21"},"text_sha256":"178d26a7c03dbb709ba7f6d80d1a01e443b214b6f29cd38b4010982fa43db597"},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_roberta_base_saibo_creator_pipeline_en.md","size":2062,"blob_sha":"9673f560a8a65a9781d43414fbe073a869ec4953","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_base_saibo_creator_pipeline pipeline RoBertaEmbeddings from Saibo-creator\nauthor: John Snow Labs\nname: legal_roberta_base_saibo_creator_pipeline\ndate: 2024-09-01\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_base_saibo_creator_pipeline` is a English model originally trained by Saibo-creator.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_base_saibo_creator_pipeline_en_5.4.2_3.0_1725165102152.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_base_saibo_creator_pipeline_en_5.4.2_3.0_1725165102152.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_roberta_base_saibo_creator_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_roberta_base_saibo_creator_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_base_saibo_creator_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|466.0 MB|\n\n## References\n\nhttps://huggingface.co/Saibo-creator/legal-roberta-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:1859B3:5EF1A4:6AB92E21"},"text_sha256":"ba06239382d808f6eaf8808040c9180cf4e1a28a70565d1e38222a7a84151768"},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_xlm_roberta_base_pipeline_xx.md","size":1990,"blob_sha":"e20d7077be8233451f9dc1d972c6c0561d83ec7f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Multilingual legal_xlm_roberta_base_pipeline pipeline RoBertaEmbeddings from joelniklaus\nauthor: John Snow Labs\nname: legal_xlm_roberta_base_pipeline\ndate: 2024-09-01\ntags: [xx, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: xx\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_xlm_roberta_base_pipeline` is a Multilingual model originally trained by joelniklaus.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_base_pipeline_xx_5.4.2_3.0_1725186346531.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_base_pipeline_xx_5.4.2_3.0_1725186346531.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_xlm_roberta_base_pipeline\", lang = \"xx\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_xlm_roberta_base_pipeline\", lang = \"xx\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_xlm_roberta_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|xx|\n|Size:|692.2 MB|\n\n## References\n\nhttps://huggingface.co/joelniklaus/legal-xlm-roberta-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F58:35EBC:17A67F:5E3DD6:6AB92E22"},"text_sha256":"7f18b4b6f2b0f58345ed27d2373a010936e277ee2c3e1ad76d1000c50d31d914"},{"path":"docs/_posts/ahmedlone127/2024-09-01-legal_xlm_roberta_base_xx.md","size":2861,"blob_sha":"a1b3361a4126d23b2a2d08774bbae249968ddc05","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Multilingual legal_xlm_roberta_base RoBertaEmbeddings from joelniklaus\nauthor: John Snow Labs\nname: legal_xlm_roberta_base\ndate: 2024-09-01\ntags: [xx, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: xx\nedition: Spark NLP 5.4.2\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_xlm_roberta_base` is a Multilingual model originally trained by joelniklaus.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_base_xx_5.4.2_3.0_1725186310436.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_base_xx_5.4.2_3.0_1725186310436.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"legal_xlm_roberta_base\",\"xx\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"legal_xlm_roberta_base\",\"xx\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_xlm_roberta_base|\n|Compatibility:|Spark NLP 5.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|xx|\n|Size:|692.2 MB|\n\n## References\n\nhttps://huggingface.co/joelniklaus/legal-xlm-roberta-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3BB8:3B1F3:1872CF:5F0B15:6AB92E22"},"text_sha256":"d074d08fd7653d4298e26c8e7683ae7036dd0d36785c1fe9f09795d438024e8f"},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_embeddings_custom_legalbert_en.md","size":2465,"blob_sha":"5bc8b467b886b40b539b1f0ffc43512941f7e18b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal BERT Embedding  Cased model\nauthor: John Snow Labs\nname: bert_embeddings_custom_legalbert\ndate: 2024-09-02\ntags: [en, open_source, embeddings, bert, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BERT Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `custom-legalbert` is a English model originally trained by `zlucia`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_custom_legalbert_en_5.5.0_3.0_1725314755008.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_custom_legalbert_en_5.5.0_3.0_1725314755008.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = BertEmbeddings.pretrained(\"bert_embeddings_custom_legalbert\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.legalbert.legal.custom.by_zlucia\").predict(\"\"\"I love Spark NLP\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_custom_legalbert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|411.6 MB|\n\n## References\n\nReferences\n\n- https://huggingface.co/zlucia/custom-legalbert\n- https://arxiv.org/abs/1808.06226\n- https://case.law/\n- https://arxiv.org/abs/2104.08671\n- https://github.com/reglab/casehold","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"671A:09BF:B3A7F:2E75D7:6AB92E21"},"text_sha256":"a31a25efa5515cd7c5ab02996364d65a59fe919892186e29c5fd862c830e581a"},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_embeddings_custom_legalbert_pipeline_en.md","size":2030,"blob_sha":"6c11c20ea42caa2d06d871112fa96009bd9b0b35","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_embeddings_custom_legalbert_pipeline pipeline BertEmbeddings from zlucia\nauthor: John Snow Labs\nname: bert_embeddings_custom_legalbert_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_embeddings_custom_legalbert_pipeline` is a English model originally trained by zlucia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_custom_legalbert_pipeline_en_5.5.0_3.0_1725314774837.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_custom_legalbert_pipeline_en_5.5.0_3.0_1725314774837.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"bert_embeddings_custom_legalbert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"bert_embeddings_custom_legalbert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_custom_legalbert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|411.6 MB|\n\n## References\n\nhttps://huggingface.co/zlucia/custom-legalbert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- BertEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F38C:3B7E2:172ACE:5DC37A:6AB92E23"},"text_sha256":"e76875f6b7f4a21ae14c03e52ec747e591a57cbcffd47359bf907a7b8347330b"},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_finetuned_cuad_legalbert1_en.md","size":3041,"blob_sha":"5b3301847308dfb0d82d7af59df3b0f1d5b9e462","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_finetuned_cuad_legalbert1 BertForQuestionAnswering from Jasu\nauthor: John Snow Labs\nname: bert_finetuned_cuad_legalbert1\ndate: 2024-09-02\ntags: [en, open_source, onnx, question_answering, bert]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_finetuned_cuad_legalbert1` is a English model originally trained by Jasu.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_finetuned_cuad_legalbert1_en_5.5.0_3.0_1725312853394.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_finetuned_cuad_legalbert1_en_5.5.0_3.0_1725312853394.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n             \ndocumentAssembler = MultiDocumentAssembler() \\\n     .setInputCol([\"question\", \"context\"]) \\\n     .setOutputCol([\"document_question\", \"document_context\"])\n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"bert_finetuned_cuad_legalbert1\",\"en\") \\\n     .setInputCols([\"document_question\",\"document_context\"]) \\\n     .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([documentAssembler, spanClassifier])\ndata = spark.createDataFrame([[\"What framework do I use?\",\"I use spark-nlp.\"]]).toDF(\"document_question\", \"document_context\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering.pretrained(\"bert_finetuned_cuad_legalbert1\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier))\nval data = Seq(\"What framework do I use?\",\"I use spark-nlp.\").toDS.toDF(\"document_question\", \"document_context\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_finetuned_cuad_legalbert1|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|407.3 MB|\n\n## References\n\nhttps://huggingface.co/Jasu/bert-finetuned-cuad-legalbert1","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17A691:5E3E41:6AB92E23"},"text_sha256":"e41453e717e8406bbdcff51bb9b808472a2058c1ac59c40c643f50f43a9745d2"},{"path":"docs/_posts/ahmedlone127/2024-09-02-bert_finetuned_cuad_legalbert1_pipeline_en.md","size":2048,"blob_sha":"8bd8cc304713002c4b7f003823a0afd6cff511e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_finetuned_cuad_legalbert1_pipeline pipeline BertForQuestionAnswering from Jasu\nauthor: John Snow Labs\nname: bert_finetuned_cuad_legalbert1_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_finetuned_cuad_legalbert1_pipeline` is a English model originally trained by Jasu.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_finetuned_cuad_legalbert1_pipeline_en_5.5.0_3.0_1725312874086.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_finetuned_cuad_legalbert1_pipeline_en_5.5.0_3.0_1725312874086.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"bert_finetuned_cuad_legalbert1_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"bert_finetuned_cuad_legalbert1_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_finetuned_cuad_legalbert1_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|407.3 MB|\n\n## References\n\nhttps://huggingface.co/Jasu/bert-finetuned-cuad-legalbert1\n\n## Included Models\n\n- MultiDocumentAssembler\n- BertForQuestionAnswering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"808A:3E1C8:180811:5E9EE5:6AB92E23"},"text_sha256":"765a33f573606f074bd7e7a204bda03416a3b00145846c2a271835c148ff21fe"},{"path":"docs/_posts/ahmedlone127/2024-09-02-distilcamembert_french_legal_fr.md","size":2887,"blob_sha":"4fc8da3bbb9d1c36957c8d6d06d4be1ade0e6051","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French Legal DistilCamemBert Embeddings Model\nauthor: John Snow Labs\nname: distilcamembert_french_legal\ndate: 2024-09-02\ntags: [open_source, camembert_embeddings, camembertformaskedlm, fr, onnx]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: CamemBertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-distilcamembert` is a French model originally trained by `maastrichtlawtech`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_fr_5.5.0_3.0_1725320859149.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_fr_5.5.0_3.0_1725320859149.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = CamemBertEmbeddings.pretrained(\"distilcamembert_french_legal\",\"fr\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"J'adore Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval embeddings = CamemBertEmbeddings.pretrained(\"distilcamembert_french_legal\",\"fr\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"J'adore Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilcamembert_french_legal|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[camembert]|\n|Language:|fr|\n|Size:|253.5 MB|\n\n## References\n\nReferences\n\nhttps://huggingface.co/maastrichtlawtech/legal-distilcamembert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EBBA:3B7E2:172AD7:5DC3A0:6AB92E14"},"text_sha256":"bfb03e45b29fe9817cc810ac71c87973741b25251487fc3c833a7da4607a9e48"},{"path":"docs/_posts/ahmedlone127/2024-09-02-distilcamembert_french_legal_pipeline_fr.md","size":2049,"blob_sha":"89aab384e7ff5e1125b096812d85074300808363","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French distilcamembert_french_legal_pipeline pipeline CamemBertEmbeddings from maastrichtlawtech\nauthor: John Snow Labs\nname: distilcamembert_french_legal_pipeline\ndate: 2024-09-02\ntags: [fr, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`distilcamembert_french_legal_pipeline` is a French model originally trained by maastrichtlawtech.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_pipeline_fr_5.5.0_3.0_1725320870896.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_pipeline_fr_5.5.0_3.0_1725320870896.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"distilcamembert_french_legal_pipeline\", lang = \"fr\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"distilcamembert_french_legal_pipeline\", lang = \"fr\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilcamembert_french_legal_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|fr|\n|Size:|253.5 MB|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/legal-distilcamembert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- CamemBertEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B560:35999:17B2F5:5E4B86:6AB92E24"},"text_sha256":"56de3a8e2ef5282f91a851084719db516650340a626d399f4808d70eb3619fb8"},{"path":"docs/_posts/ahmedlone127/2024-09-02-finetunned_legal_deberta_v3_base_en.md","size":3104,"blob_sha":"da8139087e9220529d20ed46a1daf7344a116435","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English finetunned_legal_deberta_v3_base DeBertaForQuestionAnswering from satishsingh90\nauthor: John Snow Labs\nname: finetunned_legal_deberta_v3_base\ndate: 2024-09-02\ntags: [en, open_source, onnx, question_answering, deberta]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DeBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`finetunned_legal_deberta_v3_base` is a English model originally trained by satishsingh90.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/finetunned_legal_deberta_v3_base_en_5.5.0_3.0_1725240218701.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/finetunned_legal_deberta_v3_base_en_5.5.0_3.0_1725240218701.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n             \ndocumentAssembler = MultiDocumentAssembler() \\\n     .setInputCol([\"question\", \"context\"]) \\\n     .setOutputCol([\"document_question\", \"document_context\"])\n    \nspanClassifier = DeBertaForQuestionAnswering.pretrained(\"finetunned_legal_deberta_v3_base\",\"en\") \\\n     .setInputCols([\"document_question\",\"document_context\"]) \\\n     .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([documentAssembler, spanClassifier])\ndata = spark.createDataFrame([[\"What framework do I use?\",\"I use spark-nlp.\"]]).toDF(\"document_question\", \"document_context\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = DeBertaForQuestionAnswering.pretrained(\"finetunned_legal_deberta_v3_base\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier))\nval data = Seq(\"What framework do I use?\",\"I use spark-nlp.\").toDS.toDF(\"document_question\", \"document_context\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|finetunned_legal_deberta_v3_base|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|569.2 MB|\n\n## References\n\nhttps://huggingface.co/satishsingh90/finetunned_legal_deberta_v3_base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B32:35999:17B2F9:5E4B96:6AB92E24"},"text_sha256":"d5ae43fcaafe4c6f1fddd33bdcada2d11e60118035ebbdeaa9dbde4ef82c2f46"},{"path":"docs/_posts/ahmedlone127/2024-09-02-finetunned_legal_deberta_v3_base_pipeline_en.md","size":2102,"blob_sha":"7e8f9610e0f68f5641689d895826263f605dc801","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English finetunned_legal_deberta_v3_base_pipeline pipeline DeBertaForQuestionAnswering from satishsingh90\nauthor: John Snow Labs\nname: finetunned_legal_deberta_v3_base_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForQuestionAnswering, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`finetunned_legal_deberta_v3_base_pipeline` is a English model originally trained by satishsingh90.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/finetunned_legal_deberta_v3_base_pipeline_en_5.5.0_3.0_1725240299329.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/finetunned_legal_deberta_v3_base_pipeline_en_5.5.0_3.0_1725240299329.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"finetunned_legal_deberta_v3_base_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"finetunned_legal_deberta_v3_base_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|finetunned_legal_deberta_v3_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|569.2 MB|\n\n## References\n\nhttps://huggingface.co/satishsingh90/finetunned_legal_deberta_v3_base\n\n## Included Models\n\n- MultiDocumentAssembler\n- DeBertaForQuestionAnswering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:17975F:5E2B69:6AB92E24"},"text_sha256":"29a2bbc35794b00fc8976a4ca7c94e7cf9664156252641597d487763feae691e"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_camembert_base_fr.md","size":2863,"blob_sha":"ebd09c9a75d700af492f573a2d28f4569b028d62","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French legal_camembert_base CamemBertEmbeddings from maastrichtlawtech\nauthor: John Snow Labs\nname: legal_camembert_base\ndate: 2024-09-02\ntags: [fr, open_source, onnx, embeddings, camembert]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: CamemBertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_camembert_base` is a French model originally trained by maastrichtlawtech.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_camembert_base_fr_5.5.0_3.0_1725296920563.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_camembert_base_fr_5.5.0_3.0_1725296920563.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = CamemBertEmbeddings.pretrained(\"legal_camembert_base\",\"fr\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = CamemBertEmbeddings.pretrained(\"legal_camembert_base\",\"fr\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_camembert_base|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[camembert]|\n|Language:|fr|\n|Size:|412.8 MB|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/legal-camembert-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"80B0:3A3DD:17B2B9:5E4ABB:6AB92E24"},"text_sha256":"37263212eeca81062c748f110b9eab096786f358c994503e2d421c7dd778e8f7"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_camembert_base_pipeline_fr.md","size":1984,"blob_sha":"7028ad53943fbda42995e42d504e1a63121f5f9a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French legal_camembert_base_pipeline pipeline CamemBertEmbeddings from maastrichtlawtech\nauthor: John Snow Labs\nname: legal_camembert_base_pipeline\ndate: 2024-09-02\ntags: [fr, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_camembert_base_pipeline` is a French model originally trained by maastrichtlawtech.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_camembert_base_pipeline_fr_5.5.0_3.0_1725296942103.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_camembert_base_pipeline_fr_5.5.0_3.0_1725296942103.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_camembert_base_pipeline\", lang = \"fr\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_camembert_base_pipeline\", lang = \"fr\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_camembert_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|fr|\n|Size:|412.9 MB|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/legal-camembert-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- CamemBertEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1192:11316A:17F88F:5E8F87:6AB92E26"},"text_sha256":"b6f9cf36eaebf6bbd89d1cbd76cce15feac5df6cf2ee40864ffe331e4750e5fc"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_roberta_base_lexlms_en.md","size":2856,"blob_sha":"9aaf93157d49aa77c670ae5a5f43b25003aeab39","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_base_lexlms RoBertaEmbeddings from lexlms\nauthor: John Snow Labs\nname: legal_roberta_base_lexlms\ndate: 2024-09-02\ntags: [en, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_base_lexlms` is a English model originally trained by lexlms.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_base_lexlms_en_5.5.0_3.0_1725265039429.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_base_lexlms_en_5.5.0_3.0_1725265039429.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_base_lexlms\",\"en\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_base_lexlms\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_base_lexlms|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|en|\n|Size:|465.3 MB|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-roberta-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"171A:2E8679:17E52E:5E7AEA:6AB92E26"},"text_sha256":"b9309e69dea7d3c1e28872a2b974837cf1f5eadbd1537f1379878f0d814f6dda"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legal_roberta_base_lexlms_pipeline_en.md","size":1985,"blob_sha":"73707bdf1c2fdf23c02d267509bd4613b11b4cc5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_base_lexlms_pipeline pipeline RoBertaEmbeddings from lexlms\nauthor: John Snow Labs\nname: legal_roberta_base_lexlms_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_base_lexlms_pipeline` is a English model originally trained by lexlms.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_base_lexlms_pipeline_en_5.5.0_3.0_1725265064303.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_base_lexlms_pipeline_en_5.5.0_3.0_1725265064303.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_roberta_base_lexlms_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_roberta_base_lexlms_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_base_lexlms_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|465.3 MB|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-roberta-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16B2:4F9CC:172D89:5DC321:6AB92E25"},"text_sha256":"c57a21edcb74c4cb63cb1b5ebf1f1e95f8d71fe34e3a69f06856d192a77fd28c"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legalbert_en.md","size":2704,"blob_sha":"cfe3f3e222e705a95a2557e8884cf919b62c1edc","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbert BertEmbeddings from casehold\nauthor: John Snow Labs\nname: legalbert\ndate: 2024-09-02\ntags: [en, open_source, onnx, embeddings, bert]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbert` is a English model originally trained by casehold.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbert_en_5.5.0_3.0_1725318399545.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbert_en_5.5.0_3.0_1725318399545.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = BertEmbeddings.pretrained(\"legalbert\",\"en\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = BertEmbeddings.pretrained(\"legalbert\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|406.9 MB|\n\n## References\n\nhttps://huggingface.co/casehold/legalbert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"856A:241B62:17BD62:5E55F4:6AB92E27"},"text_sha256":"c9d3f50a7411f273e9acbd9ea9baf8e7b46372632713932ec4b38b0beee8060b"},{"path":"docs/_posts/ahmedlone127/2024-09-02-legalbert_pipeline_en.md","size":1845,"blob_sha":"7c76b102d85a644f50e45664ed59fb6d856ead7f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalbert_pipeline pipeline BertEmbeddings from casehold\nauthor: John Snow Labs\nname: legalbert_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalbert_pipeline` is a English model originally trained by casehold.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalbert_pipeline_en_5.5.0_3.0_1725318420157.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalbert_pipeline_en_5.5.0_3.0_1725318420157.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legalbert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legalbert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalbert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|406.9 MB|\n\n## References\n\nhttps://huggingface.co/casehold/legalbert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- BertEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B90:35999:17B316:5E4C24:6AB92E27"},"text_sha256":"a77a1ceb322b7c534127b5765da4c66c345a47e8b57a8d0fd70e4a13d7f5312b"},{"path":"docs/_posts/ahmedlone127/2024-09-02-privacy_masknig_en.md","size":2882,"blob_sha":"180ce6dbcea06cb6b82a0c823bccd44de388d8ca","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English privacy_masknig DistilBertForTokenClassification from taro-pudding\nauthor: John Snow Labs\nname: privacy_masknig\ndate: 2024-09-02\ntags: [en, open_source, onnx, token_classification, distilbert, ner]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`privacy_masknig` is a English model originally trained by taro-pudding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/privacy_masknig_en_5.5.0_3.0_1725267426778.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/privacy_masknig_en_5.5.0_3.0_1725267426778.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = DistilBertForTokenClassification.pretrained(\"privacy_masknig\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = DistilBertForTokenClassification.pretrained(\"privacy_masknig\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|privacy_masknig|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|505.6 MB|\n\n## References\n\nhttps://huggingface.co/taro-pudding/privacy-masknig","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"08BE:3A3DD:17B2D0:5E4B0D:6AB92E26"},"text_sha256":"d17fe3ab627dfe7b9f91b5838e2c4e1b143f8df2670068569fff3f98404e2a0a"},{"path":"docs/_posts/ahmedlone127/2024-09-02-privacy_masknig_pipeline_en.md","size":1979,"blob_sha":"e8dd95be2126e5cd852c431fc0f1b54a04613dcf","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English privacy_masknig_pipeline pipeline DistilBertForTokenClassification from taro-pudding\nauthor: John Snow Labs\nname: privacy_masknig_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`privacy_masknig_pipeline` is a English model originally trained by taro-pudding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/privacy_masknig_pipeline_en_5.5.0_3.0_1725267456314.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/privacy_masknig_pipeline_en_5.5.0_3.0_1725267456314.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"privacy_masknig_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"privacy_masknig_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|privacy_masknig_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|505.6 MB|\n\n## References\n\nhttps://huggingface.co/taro-pudding/privacy-masknig\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DistilBertForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:181DC9:5EB53D:6AB92E28"},"text_sha256":"f774b26f59490f49324cfa060fe0d7062404341414ddd9ec7a7e1a3808a35077"},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_embeddings_legal_roberta_base_en.md","size":3054,"blob_sha":"8c4bc8b72886f1bb06720d267b5428e483e644a0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal RoBERTa Embeddings (CaseLaw, Base, Cased)\nauthor: John Snow Labs\nname: roberta_embeddings_legal_roberta_base\ndate: 2024-09-02\ntags: [roberta, embeddings, en, open_source, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal RoBERTa Embeddings model, uploaded to Hugging Face, adapted and imported into Spark NLP. `legal-roberta-base` is a English model orginally trained by `saibo`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_roberta_base_en_5.5.0_3.0_1725264385593.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_roberta_base_en_5.5.0_3.0_1725264385593.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n.setInputCol(\"text\") \\\n.setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n.setInputCols(\"document\") \\\n.setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"roberta_embeddings_legal_roberta_base\",\"en\") \\\n.setInputCols([\"document\", \"token\"]) \\\n.setOutputCol(\"embeddings\")\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n.setInputCol(\"text\") \n.setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer() \n.setInputCols(Array(\"document\"))\n.setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"roberta_embeddings_legal_roberta_base\",\"en\") \n.setInputCols(Array(\"document\", \"token\")) \n.setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.legal_roberta_base\").predict(\"\"\"I love Spark NLP\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_embeddings_legal_roberta_base|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|en|\n|Size:|466.0 MB|\n\n## References\n\nReferences\n\n- https://huggingface.co/saibo/legal-roberta-base\n- https://www.kaggle.com/uspto/patent-litigations\n- https://case.law/\n- https://www.kaggle.com/bigquery/patents\n- https://www.kaggle.com/sohier/beyond-queries-exploring-the-bigquery-api","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:183826:5ED126:6AB92E28"},"text_sha256":"c4376ec3f340a9a87ca25cabd994dcc6e65e3cd92145891b62488e02c13799b1"},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_embeddings_legal_roberta_base_pipeline_en.md","size":2078,"blob_sha":"ba0f31197da21db9a9dd39946142f31fd456abad","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English roberta_embeddings_legal_roberta_base_pipeline pipeline RoBertaEmbeddings from saibo\nauthor: John Snow Labs\nname: roberta_embeddings_legal_roberta_base_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_embeddings_legal_roberta_base_pipeline` is a English model originally trained by saibo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_roberta_base_pipeline_en_5.5.0_3.0_1725264410183.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_roberta_base_pipeline_en_5.5.0_3.0_1725264410183.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"roberta_embeddings_legal_roberta_base_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"roberta_embeddings_legal_roberta_base_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_embeddings_legal_roberta_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|466.0 MB|\n\n## References\n\nhttps://huggingface.co/saibo/legal-roberta-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"90A2:324E19:182108:5EB963:6AB92E29"},"text_sha256":"d987b3487486f529c5566a9a56a1d56e5d6ee7aa8bb799bff8113f629aeb03d7"},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_large_swiss_legal_gsw.md","size":2007,"blob_sha":"e7e064227638362f118578e2c8e4f0fc2c73b1bd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Swiss Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_swiss_legal\ndate: 2024-09-02\ntags: [gsw, swiss, embeddings, transformer, open_source, legal, onnx]\ntask: Embeddings\nlanguage: gsw\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-swiss-roberta-large` is a Swiss model originally trained by `joelito`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_gsw_5.5.0_3.0_1725264232623.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_gsw_5.5.0_3.0_1725264232623.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_swiss_legal\", \"gsw\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_swiss_legal\", \"gsw\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_swiss_legal|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|gsw|\n|Size:|1.6 GB|\n\n## References\n\nReferences\n\nhttps://huggingface.co/joelito/legal-swiss-roberta-large","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B560:35999:17B335:5E4C71:6AB92E29"},"text_sha256":"b99c827f51876dde884a027f20a761f13b001b81ff23452a82812952f4ac6ea8"},{"path":"docs/_posts/ahmedlone127/2024-09-02-roberta_large_swiss_legal_pipeline_gsw.md","size":2052,"blob_sha":"57c68050e918ebaf3f8c674ac7f22b43468187d9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Alemannic, Alsatian, Swiss German roberta_large_swiss_legal_pipeline pipeline RoBertaEmbeddings from joelito\nauthor: John Snow Labs\nname: roberta_large_swiss_legal_pipeline\ndate: 2024-09-02\ntags: [gsw, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: gsw\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`roberta_large_swiss_legal_pipeline` is a Alemannic, Alsatian, Swiss German model originally trained by joelito.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_pipeline_gsw_5.5.0_3.0_1725264317049.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_pipeline_gsw_5.5.0_3.0_1725264317049.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"roberta_large_swiss_legal_pipeline\", lang = \"gsw\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"roberta_large_swiss_legal_pipeline\", lang = \"gsw\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_swiss_legal_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|gsw|\n|Size:|1.6 GB|\n\n## References\n\nhttps://huggingface.co/joelito/legal-swiss-roberta-large\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E68E:3CC8A:17F791:5E9057:6AB92E2A"},"text_sha256":"817bcd4762b4fb653625e28f0880b5ab6e458b9443da6f52974ab58d60aa79af"},{"path":"docs/_posts/ahmedlone127/2024-09-02-sent_custom_legalbert_en.md","size":2938,"blob_sha":"376d2f1ed8958e470e6ef1d3c6ea3cc6e02e35c5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_custom_legalbert BertSentenceEmbeddings from casehold\nauthor: John Snow Labs\nname: sent_custom_legalbert\ndate: 2024-09-02\ntags: [en, open_source, onnx, sentence_embeddings, bert]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_custom_legalbert` is a English model originally trained by casehold.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_custom_legalbert_en_5.5.0_3.0_1725273267578.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_custom_legalbert_en_5.5.0_3.0_1725273267578.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\nsentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"sentence\")\n\nembeddings = BertSentenceEmbeddings.pretrained(\"sent_custom_legalbert\",\"en\") \\\n      .setInputCols([\"sentence\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, sentenceDL, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval sentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n\t.setInputCols(Array(\"document\"))\n\t.setOutputCol(\"sentence\")\n\nval embeddings = BertSentenceEmbeddings.pretrained(\"sent_custom_legalbert\",\"en\") \n    .setInputCols(Array(\"sentence\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, sentenceDL, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_custom_legalbert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|411.6 MB|\n\n## References\n\nhttps://huggingface.co/casehold/custom-legalbert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"834C:3EACB:17CBC1:5E642A:6AB92E29"},"text_sha256":"374633e941be5be3890df650c6f040c238cd81495724a89368ec00dee0b1fadb"},{"path":"docs/_posts/ahmedlone127/2024-09-02-sent_custom_legalbert_pipeline_en.md","size":1998,"blob_sha":"2ce785dc60965281e3313567ab379075b76ff74d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_custom_legalbert_pipeline pipeline BertSentenceEmbeddings from casehold\nauthor: John Snow Labs\nname: sent_custom_legalbert_pipeline\ndate: 2024-09-02\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_custom_legalbert_pipeline` is a English model originally trained by casehold.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_custom_legalbert_pipeline_en_5.5.0_3.0_1725273295373.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_custom_legalbert_pipeline_en_5.5.0_3.0_1725273295373.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_custom_legalbert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_custom_legalbert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_custom_legalbert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|412.2 MB|\n\n## References\n\nhttps://huggingface.co/casehold/custom-legalbert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B9E:09ED:E748E:3FC691:6AB92E2A"},"text_sha256":"38e7e2c6ba930bf4c16591f9270ae39df9351b415d3ccf427a04881022a746aa"},{"path":"docs/_posts/ahmedlone127/2024-09-03-bert_embeddings_legalbert_en.md","size":2374,"blob_sha":"63e681d71b3f49344d490a3271f4dea96e76b9e0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal BERT Embedding  Cased model\nauthor: John Snow Labs\nname: bert_embeddings_legalbert\ndate: 2024-09-03\ntags: [en, open_source, embeddings, bert, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BERT Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legalbert` is a English model originally trained by `zlucia`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_en_5.5.0_3.0_1725406768549.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_en_5.5.0_3.0_1725406768549.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n  \nembeddings = BertEmbeddings.pretrained(\"bert_embeddings_legalbert\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\")\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.legalbert.legal.by_zlucia\").predict(\"\"\"I love Spark NLP\"\"\")\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_legalbert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Size:|406.9 MB|\n\n## References\n\nReferences\n\n- https://huggingface.co/zlucia/legalbert\n- https://case.law/\n- https://arxiv.org/abs/2104.08671\n- https://github.com/reglab/casehold","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:17F8BD:5E9027:6AB92E29"},"text_sha256":"919a7d90c066f1ac06eae3c710855012093f157bd8f8bb16bd802f28813fde7b"},{"path":"docs/_posts/ahmedlone127/2024-09-03-bert_embeddings_legalbert_pipeline_en.md","size":1967,"blob_sha":"803c665e10a1e1b8bd2e4c704ed86b188a061170","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English bert_embeddings_legalbert_pipeline pipeline BertEmbeddings from zlucia\nauthor: John Snow Labs\nname: bert_embeddings_legalbert_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_embeddings_legalbert_pipeline` is a English model originally trained by zlucia.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_pipeline_en_5.5.0_3.0_1725406790199.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_embeddings_legalbert_pipeline_en_5.5.0_3.0_1725406790199.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"bert_embeddings_legalbert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"bert_embeddings_legalbert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_embeddings_legalbert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|406.9 MB|\n\n## References\n\nhttps://huggingface.co/zlucia/legalbert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- BertEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8A4C:11316A:17F8C3:5E9035:6AB92E21"},"text_sha256":"62283e0be01a7a85d54f9132ae616901fdef7a0d0c7717658a2512834c860481"},{"path":"docs/_posts/ahmedlone127/2024-09-03-cybertuned_securityllm_en.md","size":2836,"blob_sha":"c060fbc53a06017bb9b4499e89a8dcceb3057732","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English cybertuned_securityllm RoBertaEmbeddings from s2w-ai\nauthor: John Snow Labs\nname: cybertuned_securityllm\ndate: 2024-09-03\ntags: [en, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`cybertuned_securityllm` is a English model originally trained by s2w-ai.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/cybertuned_securityllm_en_5.5.0_3.0_1725374576329.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/cybertuned_securityllm_en_5.5.0_3.0_1725374576329.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"cybertuned_securityllm\",\"en\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"cybertuned_securityllm\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|cybertuned_securityllm|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|en|\n|Size:|466.1 MB|\n\n## References\n\nhttps://huggingface.co/s2w-ai/CyBERTuned-SecurityLLM","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD02:4F9CC:172DB5:5DC3C1:6AB92E20"},"text_sha256":"7628e88c7fb3ed44ec3646399219fd60f92ca3f7fff98d0e03587014ba16cace"},{"path":"docs/_posts/ahmedlone127/2024-09-03-cybertuned_securityllm_pipeline_en.md","size":1965,"blob_sha":"6c4340741f94b9cc7d759c6192928db610cc70f0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English cybertuned_securityllm_pipeline pipeline RoBertaEmbeddings from s2w-ai\nauthor: John Snow Labs\nname: cybertuned_securityllm_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`cybertuned_securityllm_pipeline` is a English model originally trained by s2w-ai.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/cybertuned_securityllm_pipeline_en_5.5.0_3.0_1725374601176.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/cybertuned_securityllm_pipeline_en_5.5.0_3.0_1725374601176.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"cybertuned_securityllm_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"cybertuned_securityllm_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|cybertuned_securityllm_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|466.1 MB|\n\n## References\n\nhttps://huggingface.co/s2w-ai/CyBERTuned-SecurityLLM\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DEF4:372D9:17F21A:5E8B6E:6AB92E2B"},"text_sha256":"5762cdc3fe4d93c1c0b7e86220f1aecb0b6d06af1d998735ea028f35580e789e"},{"path":"docs/_posts/ahmedlone127/2024-09-03-deberta_v3_base_finetuned_ai4privacy_v2_en.md","size":3068,"blob_sha":"7f822321de07980ce577ca74d49d707fd8197e8d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English deberta_v3_base_finetuned_ai4privacy_v2 DeBertaForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: deberta_v3_base_finetuned_ai4privacy_v2\ndate: 2024-09-03\ntags: [en, open_source, onnx, token_classification, deberta, ner]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DeBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`deberta_v3_base_finetuned_ai4privacy_v2` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/deberta_v3_base_finetuned_ai4privacy_v2_en_5.5.0_3.0_1725387714236.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/deberta_v3_base_finetuned_ai4privacy_v2_en_5.5.0_3.0_1725387714236.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = DeBertaForTokenClassification.pretrained(\"deberta_v3_base_finetuned_ai4privacy_v2\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = DeBertaForTokenClassification.pretrained(\"deberta_v3_base_finetuned_ai4privacy_v2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|deberta_v3_base_finetuned_ai4privacy_v2|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|587.9 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/deberta-v3-base_finetuned_ai4privacy_v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17A6F8:5E3F7E:6AB92E2A"},"text_sha256":"0362cda4514fdff904a07c2a6491f01e86cf05e027fbe0f55b8f11d7ee0be94c"},{"path":"docs/_posts/ahmedlone127/2024-09-03-deberta_v3_base_finetuned_ai4privacy_v2_pipeline_en.md","size":2174,"blob_sha":"d1b20d7ee691fe9f370cb4f9259c3a0ac28086d3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English deberta_v3_base_finetuned_ai4privacy_v2_pipeline pipeline DeBertaForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: deberta_v3_base_finetuned_ai4privacy_v2_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`deberta_v3_base_finetuned_ai4privacy_v2_pipeline` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/deberta_v3_base_finetuned_ai4privacy_v2_pipeline_en_5.5.0_3.0_1725387760561.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/deberta_v3_base_finetuned_ai4privacy_v2_pipeline_en_5.5.0_3.0_1725387760561.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"deberta_v3_base_finetuned_ai4privacy_v2_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"deberta_v3_base_finetuned_ai4privacy_v2_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|deberta_v3_base_finetuned_ai4privacy_v2_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|587.9 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/deberta-v3-base_finetuned_ai4privacy_v2\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DeBertaForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"20D4:38C7FC:180BA7:5AC959:6AB92E2C"},"text_sha256":"b98165dce68276412287c55f3338ab021789c269d5d9b956701a26135065d2f7"},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalevalrr_en.md","size":2498,"blob_sha":"5d47d9b600da9de8f4583691c88ad91d0cc1d197","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalevalrr MPNetEmbeddings from simplexico\nauthor: John Snow Labs\nname: legalevalrr\ndate: 2024-09-03\ntags: [en, open_source, onnx, embeddings, mpnet]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: MPNetEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained MPNetEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalevalrr` is a English model originally trained by simplexico.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalevalrr_en_5.5.0_3.0_1725350918757.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalevalrr_en_5.5.0_3.0_1725350918757.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \nembeddings = MPNetEmbeddings.pretrained(\"legalevalrr\",\"en\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval embeddings = MPNetEmbeddings.pretrained(\"legalevalrr\",\"en\") \n    .setInputCols(Array(\"document\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalevalrr|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document]|\n|Output Labels:|[mpnet]|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/simplexico/legalevalrr","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D06:324E19:182124:5EB9DD:6AB92E2C"},"text_sha256":"58f6bb60c639d659fb0c07d01048292996d1e9fd2bb682d25f530e943e6c1a99"},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalevalrr_pipeline_en.md","size":1855,"blob_sha":"b1422bedb4d707164154585480400463fe783805","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalevalrr_pipeline pipeline MPNetEmbeddings from simplexico\nauthor: John Snow Labs\nname: legalevalrr_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained MPNetEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalevalrr_pipeline` is a English model originally trained by simplexico.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalevalrr_pipeline_en_5.5.0_3.0_1725350938303.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalevalrr_pipeline_en_5.5.0_3.0_1725350938303.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legalevalrr_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legalevalrr_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalevalrr_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|407.1 MB|\n\n## References\n\nhttps://huggingface.co/simplexico/legalevalrr\n\n## Included Models\n\n- DocumentAssembler\n- MPNetEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"61EE:241B62:17BD9F:5E56CA:6AB92E2C"},"text_sha256":"667a3d1cf2e846dbeb433f75cdd748ae4b31f4d62c05bca014c3ef3e1b3c9ccc"},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalro_bert_for_rhetorical_role_labeling_en.md","size":3146,"blob_sha":"66912a4aea23538400b764cb02317faeda26bfd6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalro_bert_for_rhetorical_role_labeling RoBertaForSequenceClassification from engineersaloni159\nauthor: John Snow Labs\nname: legalro_bert_for_rhetorical_role_labeling\ndate: 2024-09-03\ntags: [en, open_source, onnx, sequence_classification, roberta]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalro_bert_for_rhetorical_role_labeling` is a English model originally trained by engineersaloni159.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalro_bert_for_rhetorical_role_labeling_en_5.5.0_3.0_1725402992901.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalro_bert_for_rhetorical_role_labeling_en_5.5.0_3.0_1725402992901.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\nsequenceClassifier  = RoBertaForSequenceClassification.pretrained(\"legalro_bert_for_rhetorical_role_labeling\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, sequenceClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval sequenceClassifier = RoBertaForSequenceClassification.pretrained(\"legalro_bert_for_rhetorical_role_labeling\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"class\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalro_bert_for_rhetorical_role_labeling|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|468.3 MB|\n\n## References\n\nhttps://huggingface.co/engineersaloni159/LegalRo-BERt_for_rhetorical_role_labeling","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5410:2E8679:17E593:5E7C05:6AB92E2C"},"text_sha256":"41d79a24e6a28bb1bfd3067a17f55e056cdc6ca37c14a47c64a08eb386b3e8ec"},{"path":"docs/_posts/ahmedlone127/2024-09-03-legalro_bert_for_rhetorical_role_labeling_pipeline_en.md","size":2223,"blob_sha":"ab0010762a8b438ebada6d5cf10d389a67864e1f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legalro_bert_for_rhetorical_role_labeling_pipeline pipeline RoBertaForSequenceClassification from engineersaloni159\nauthor: John Snow Labs\nname: legalro_bert_for_rhetorical_role_labeling_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForSequenceClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legalro_bert_for_rhetorical_role_labeling_pipeline` is a English model originally trained by engineersaloni159.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legalro_bert_for_rhetorical_role_labeling_pipeline_en_5.5.0_3.0_1725403020813.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legalro_bert_for_rhetorical_role_labeling_pipeline_en_5.5.0_3.0_1725403020813.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legalro_bert_for_rhetorical_role_labeling_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legalro_bert_for_rhetorical_role_labeling_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legalro_bert_for_rhetorical_role_labeling_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|468.3 MB|\n\n## References\n\nhttps://huggingface.co/engineersaloni159/LegalRo-BERt_for_rhetorical_role_labeling\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaForSequenceClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7DD8:727CE:17653B:5DFE62:6AB92E24"},"text_sha256":"5dc58c3bc2ddca6dad00e84f830ac7464b25243d01b38525a60b36e3cae5f6ab"},{"path":"docs/_posts/ahmedlone127/2024-09-03-mini_legal_distillbert_en.md","size":2993,"blob_sha":"43063ad1c59c142bad9252c8109aabc2dc956aae","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mini_legal_distillbert DistilBertForSequenceClassification from engineersaloni159\nauthor: John Snow Labs\nname: mini_legal_distillbert\ndate: 2024-09-03\ntags: [en, open_source, onnx, sequence_classification, distilbert]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DistilBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mini_legal_distillbert` is a English model originally trained by engineersaloni159.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mini_legal_distillbert_en_5.5.0_3.0_1725330283164.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mini_legal_distillbert_en_5.5.0_3.0_1725330283164.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\nsequenceClassifier  = DistilBertForSequenceClassification.pretrained(\"mini_legal_distillbert\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, sequenceClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval sequenceClassifier = DistilBertForSequenceClassification.pretrained(\"mini_legal_distillbert\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"class\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mini_legal_distillbert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/engineersaloni159/mini_legal_distillbert","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"471A:326565:17C881:5E6220:6AB92E2A"},"text_sha256":"8b9f3f98094e00e62a23dbaa35ec170b70f9798777bc60cdae6d8f184fe5ac2f"},{"path":"docs/_posts/ahmedlone127/2024-09-03-mini_legal_distillbert_pipeline_en.md","size":2061,"blob_sha":"b4c0808afe14ae45509eda8ab7f4a880e70a43f3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mini_legal_distillbert_pipeline pipeline DistilBertForSequenceClassification from engineersaloni159\nauthor: John Snow Labs\nname: mini_legal_distillbert_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Text Classification\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DistilBertForSequenceClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mini_legal_distillbert_pipeline` is a English model originally trained by engineersaloni159.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mini_legal_distillbert_pipeline_en_5.5.0_3.0_1725330295363.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mini_legal_distillbert_pipeline_en_5.5.0_3.0_1725330295363.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"mini_legal_distillbert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"mini_legal_distillbert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mini_legal_distillbert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|249.5 MB|\n\n## References\n\nhttps://huggingface.co/engineersaloni159/mini_legal_distillbert\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DistilBertForSequenceClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1B8C:3AC15:181CBC:5EB460:6AB92E2F"},"text_sha256":"795c954b8157ebce266071aba17d22f1a87df1a4602a0204f1602b1773e05095"},{"path":"docs/_posts/ahmedlone127/2024-09-03-policy_qa_burmese_finetuned_en.md","size":3028,"blob_sha":"fca6712efd283183c2381414861907023e1e631c","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English policy_qa_burmese_finetuned BertForQuestionAnswering from poojithat96\nauthor: John Snow Labs\nname: policy_qa_burmese_finetuned\ndate: 2024-09-03\ntags: [en, open_source, onnx, question_answering, bert]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`policy_qa_burmese_finetuned` is a English model originally trained by poojithat96.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/policy_qa_burmese_finetuned_en_5.5.0_3.0_1725351591281.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/policy_qa_burmese_finetuned_en_5.5.0_3.0_1725351591281.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n             \ndocumentAssembler = MultiDocumentAssembler() \\\n     .setInputCol([\"question\", \"context\"]) \\\n     .setOutputCol([\"document_question\", \"document_context\"])\n    \nspanClassifier = BertForQuestionAnswering.pretrained(\"policy_qa_burmese_finetuned\",\"en\") \\\n     .setInputCols([\"document_question\",\"document_context\"]) \\\n     .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([documentAssembler, spanClassifier])\ndata = spark.createDataFrame([[\"What framework do I use?\",\"I use spark-nlp.\"]]).toDF(\"document_question\", \"document_context\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = BertForQuestionAnswering.pretrained(\"policy_qa_burmese_finetuned\", \"en\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier))\nval data = Seq(\"What framework do I use?\",\"I use spark-nlp.\").toDS.toDF(\"document_question\", \"document_context\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|policy_qa_burmese_finetuned|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/poojithat96/policy_qa_my_finetuned","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52AE:18233:17C3AB:5E5BB2:6AB92E2F"},"text_sha256":"d5016522aea2c9b186f38c9d8d5a58030843524989f4034dbf444efd317ed2ed"},{"path":"docs/_posts/ahmedlone127/2024-09-03-policy_qa_burmese_finetuned_pipeline_en.md","size":2035,"blob_sha":"04a08ea1df4c2fc6d0ff027b19cd69371fbf7c4b","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English policy_qa_burmese_finetuned_pipeline pipeline BertForQuestionAnswering from poojithat96\nauthor: John Snow Labs\nname: policy_qa_burmese_finetuned_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Question Answering\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForQuestionAnswering, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`policy_qa_burmese_finetuned_pipeline` is a English model originally trained by poojithat96.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/policy_qa_burmese_finetuned_pipeline_en_5.5.0_3.0_1725351653206.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/policy_qa_burmese_finetuned_pipeline_en_5.5.0_3.0_1725351653206.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"policy_qa_burmese_finetuned_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"policy_qa_burmese_finetuned_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|policy_qa_burmese_finetuned_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/poojithat96/policy_qa_my_finetuned\n\n## Included Models\n\n- MultiDocumentAssembler\n- BertForQuestionAnswering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185A52:5EF3C2:6AB92E2C"},"text_sha256":"c733741c306934679263aec6b4952ea248d65b07ade25faa17a4561fd50e2d49"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline_pt.md","size":2327,"blob_sha":"f162330e5599403f7410d783b4abeb158dfd75c9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline pipeline BertSentenceEmbeddings from stjiris\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline\ndate: 2024-09-03\ntags: [pt, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline` is a Portuguese model originally trained by stjiris.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline_pt_5.5.0_3.0_1725356068648.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline_pt_5.5.0_3.0_1725356068648.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline\", lang = \"pt\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline\", lang = \"pt\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nhttps://huggingface.co/stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EFE4:11E74B:17BDCA:5E559C:6AB92E2E"},"text_sha256":"2f8051891f570a2188b6358ce6157e939dc901ba8c9cc7e577c811c5fc2c0b57"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pt.md","size":2688,"blob_sha":"9e59564bbd70a1f9e16f4051157166db2ae825bf","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese Legal BERT Sentence Embedding Large Cased model\nauthor: John Snow Labs\nname: sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1\ndate: 2024-09-03\ntags: [bert, pt, embeddings, sentence, open_source, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal BERT Sentence Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-large-portuguese-cased-legal-mlm-nli-sts-v1` is a Portuguese model originally trained by `stjiris`.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pt_5.5.0_3.0_1725356000518.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1_pt_5.5.0_3.0_1725356000518.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1\", \"pt\") \\\n  .setInputCols(\"sentence\") \\\n  .setOutputCol(\"bert_sentence\")\n\n  nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, sent_embeddings ])\n    result = pipeline.fit(data).transform(data)\n```\n```scala\nval sent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1\", \"pt\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"bert_sentence\")\n\n  val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, sent_embeddings ))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_bert_large_portuguese_cased_legal_mlm_nli_sts_v1|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|1.2 GB|\n\n## References\n\nReferences\n\n- https://huggingface.co/stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1\n- https://rufimelo99.github.io/SemanticSearchSystemForSTJ/\n- https://www.SBERT.net\n- https://github.com/rufimelo99\n- https://www.inesc-id.pt/projects/PR07005/","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2648:3BB77:17C826:5E6274:6AB92E30"},"text_sha256":"c8903e2210aad8cdabe74b861138f6280c7404fc976ca124c87f36263c9704a0"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bert_small_uncased_en.md","size":3007,"blob_sha":"bd96446debc3486367880b1d7566f602605f78be","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_legal_bert_small_uncased BertSentenceEmbeddings from nlpaueb\nauthor: John Snow Labs\nname: sent_legal_bert_small_uncased\ndate: 2024-09-03\ntags: [en, open_source, onnx, sentence_embeddings, bert]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_bert_small_uncased` is a English model originally trained by nlpaueb.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_bert_small_uncased_en_5.5.0_3.0_1725355910594.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_bert_small_uncased_en_5.5.0_3.0_1725355910594.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\nsentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"sentence\")\n\nembeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_bert_small_uncased\",\"en\") \\\n      .setInputCols([\"sentence\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, sentenceDL, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval sentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n\t.setInputCols(Array(\"document\"))\n\t.setOutputCol(\"sentence\")\n\nval embeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_bert_small_uncased\",\"en\") \n    .setInputCols(Array(\"sentence\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, sentenceDL, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_bert_small_uncased|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|130.6 MB|\n\n## References\n\nhttps://huggingface.co/nlpaueb/legal-bert-small-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6E28:18233:17C3BA:5E5BE2:6AB92E2F"},"text_sha256":"826a6bad2a47b707f937db7e03dccd645fbd3ae9375cf115ece9677eb342dfbb"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bert_small_uncased_pipeline_en.md","size":2067,"blob_sha":"5f2ffcd03a7a5449b385f6ae70e53a7d24639ef4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_legal_bert_small_uncased_pipeline pipeline BertSentenceEmbeddings from nlpaueb\nauthor: John Snow Labs\nname: sent_legal_bert_small_uncased_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_bert_small_uncased_pipeline` is a English model originally trained by nlpaueb.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_bert_small_uncased_pipeline_en_5.5.0_3.0_1725355917118.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_bert_small_uncased_pipeline_en_5.5.0_3.0_1725355917118.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_legal_bert_small_uncased_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_legal_bert_small_uncased_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_bert_small_uncased_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|131.1 MB|\n\n## References\n\nhttps://huggingface.co/nlpaueb/legal-bert-small-uncased\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"20D4:38C7FC:180BD0:5AC9C3:6AB92E31"},"text_sha256":"6bf4e95ec2c7d76cd5740059dd476cb368afe884a1eacb4a696d35e4abcc714e"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bertimbau_base_pipeline_pt.md","size":2040,"blob_sha":"7a9421251ec9a693cfe5ec044ab3fa6e9d70d1c2","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese sent_legal_bertimbau_base_pipeline pipeline BertSentenceEmbeddings from rufimelo\nauthor: John Snow Labs\nname: sent_legal_bertimbau_base_pipeline\ndate: 2024-09-03\ntags: [pt, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_bertimbau_base_pipeline` is a Portuguese model originally trained by rufimelo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_bertimbau_base_pipeline_pt_5.5.0_3.0_1725356061067.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_bertimbau_base_pipeline_pt_5.5.0_3.0_1725356061067.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_legal_bertimbau_base_pipeline\", lang = \"pt\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_legal_bertimbau_base_pipeline\", lang = \"pt\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_bertimbau_base_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|pt|\n|Size:|406.4 MB|\n\n## References\n\nhttps://huggingface.co/rufimelo/Legal-BERTimbau-base\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185A69:5EF3FD:6AB92E31"},"text_sha256":"68eb4c3d66a5aa1bd788c1852b441029897f82e439c9cb8c200af9894d02eb1b"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_bertimbau_base_pt.md","size":2980,"blob_sha":"5d59c7cf3d4d08444e5722976dcd405839fba7cf","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese sent_legal_bertimbau_base BertSentenceEmbeddings from rufimelo\nauthor: John Snow Labs\nname: sent_legal_bertimbau_base\ndate: 2024-09-03\ntags: [pt, open_source, onnx, sentence_embeddings, bert]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_bertimbau_base` is a Portuguese model originally trained by rufimelo.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_bertimbau_base_pt_5.5.0_3.0_1725356040780.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_bertimbau_base_pt_5.5.0_3.0_1725356040780.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\nsentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"sentence\")\n\nembeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_bertimbau_base\",\"pt\") \\\n      .setInputCols([\"sentence\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, sentenceDL, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval sentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n\t.setInputCols(Array(\"document\"))\n\t.setOutputCol(\"sentence\")\n\nval embeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_bertimbau_base\",\"pt\") \n    .setInputCols(Array(\"sentence\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, sentenceDL, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_bertimbau_base|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|405.8 MB|\n\n## References\n\nhttps://huggingface.co/rufimelo/Legal-BERTimbau-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"856A:241B62:17BDD4:5E5761:6AB92E32"},"text_sha256":"9354446b0e9e605ec6165bdd586ec5fdcb216857cc296fa33b71e5693c492302"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_hebert_en.md","size":2896,"blob_sha":"153e3c09211c51e37faec9e85f7148d020cc4249","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_legal_hebert BertSentenceEmbeddings from avichr\nauthor: John Snow Labs\nname: sent_legal_hebert\ndate: 2024-09-03\ntags: [en, open_source, onnx, sentence_embeddings, bert]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertSentenceEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_hebert` is a English model originally trained by avichr.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_hebert_en_5.5.0_3.0_1725355577698.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_hebert_en_5.5.0_3.0_1725355577698.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n\nsentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\") \\\n      .setInputCols([\"document\"]) \\\n      .setOutputCol(\"sentence\")\n\nembeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_hebert\",\"en\") \\\n      .setInputCols([\"sentence\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, sentenceDL, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval sentenceDL = SentenceDetectorDLModel.pretrained(\"sentence_detector_dl\", \"xx\")\n\t.setInputCols(Array(\"document\"))\n\t.setOutputCol(\"sentence\")\n\nval embeddings = BertSentenceEmbeddings.pretrained(\"sent_legal_hebert\",\"en\") \n    .setInputCols(Array(\"sentence\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, sentenceDL, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_hebert|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|462.5 MB|\n\n## References\n\nhttps://huggingface.co/avichr/Legal-heBERT","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F34:24970A:186721:5EFE05:6AB92E32"},"text_sha256":"a0a1f8b869d00d70db7738ec14a158508c47b02c182f4ade393950b6f9cf4a35"},{"path":"docs/_posts/ahmedlone127/2024-09-03-sent_legal_hebert_pipeline_en.md","size":1956,"blob_sha":"884bdc8ee42b3f587cb6ff8ec4e560fec78cc1f5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English sent_legal_hebert_pipeline pipeline BertSentenceEmbeddings from avichr\nauthor: John Snow Labs\nname: sent_legal_hebert_pipeline\ndate: 2024-09-03\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertSentenceEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`sent_legal_hebert_pipeline` is a English model originally trained by avichr.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_legal_hebert_pipeline_en_5.5.0_3.0_1725355601362.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_legal_hebert_pipeline_en_5.5.0_3.0_1725355601362.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"sent_legal_hebert_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"sent_legal_hebert_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_legal_hebert_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|463.0 MB|\n\n## References\n\nhttps://huggingface.co/avichr/Legal-heBERT\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- SentenceDetectorDLModel\n- BertSentenceEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FD6E:386840:1878F1:5F125C:6AB92E32"},"text_sha256":"9e45b0e30d4fb91e6aaffa5b9a14410cd05dcf2f7c751a5b71dbd4cec63d4c47"},{"path":"docs/_posts/ahmedlone127/2024-09-04-deberta_v3_base_ai4privacy_english_en.md","size":3027,"blob_sha":"7f6e4149dafa58f2cf873377d75da96e5750bdd6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English deberta_v3_base_ai4privacy_english DeBertaForTokenClassification from xXiaobuding\nauthor: John Snow Labs\nname: deberta_v3_base_ai4privacy_english\ndate: 2024-09-04\ntags: [en, open_source, onnx, token_classification, deberta, ner]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DeBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`deberta_v3_base_ai4privacy_english` is a English model originally trained by xXiaobuding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/deberta_v3_base_ai4privacy_english_en_5.5.0_3.0_1725473447117.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/deberta_v3_base_ai4privacy_english_en_5.5.0_3.0_1725473447117.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = DeBertaForTokenClassification.pretrained(\"deberta_v3_base_ai4privacy_english\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = DeBertaForTokenClassification.pretrained(\"deberta_v3_base_ai4privacy_english\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|deberta_v3_base_ai4privacy_english|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|596.2 MB|\n\n## References\n\nhttps://huggingface.co/xXiaobuding/deberta-v3-base_ai4privacy_en","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79BA:3B7E2:172B7E:5DC5D3:6AB92E31"},"text_sha256":"27fb56235daf7ed8f75d5833c6bc0d77956f6b2157999b1e75f8e3f5c16618d7"},{"path":"docs/_posts/ahmedlone127/2024-09-04-deberta_v3_base_ai4privacy_english_pipeline_en.md","size":2133,"blob_sha":"dd659b1fd94655da4bd74afd16011ba32b5374e9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English deberta_v3_base_ai4privacy_english_pipeline pipeline DeBertaForTokenClassification from xXiaobuding\nauthor: John Snow Labs\nname: deberta_v3_base_ai4privacy_english_pipeline\ndate: 2024-09-04\ntags: [en, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`deberta_v3_base_ai4privacy_english_pipeline` is a English model originally trained by xXiaobuding.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/deberta_v3_base_ai4privacy_english_pipeline_en_5.5.0_3.0_1725473482660.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/deberta_v3_base_ai4privacy_english_pipeline_en_5.5.0_3.0_1725473482660.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"deberta_v3_base_ai4privacy_english_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"deberta_v3_base_ai4privacy_english_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|deberta_v3_base_ai4privacy_english_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|596.2 MB|\n\n## References\n\nhttps://huggingface.co/xXiaobuding/deberta-v3-base_ai4privacy_en\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DeBertaForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FD0E:3E724:18248C:5EBD59:6AB92E15"},"text_sha256":"4800e61daa9e89a9a60135aa2ee5e6c25421062ce1acacec9ae4f99ababb12a7"},{"path":"docs/_posts/ahmedlone127/2024-09-04-gdpr_anonymiseingsmodel_ganm_en.md","size":2966,"blob_sha":"dbf719974589aba7eb6e9609e64146fe0b6829e3","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English gdpr_anonymiseingsmodel_ganm BertForTokenClassification from AI-aktindsigt\nauthor: John Snow Labs\nname: gdpr_anonymiseingsmodel_ganm\ndate: 2024-09-04\ntags: [en, open_source, onnx, token_classification, bert, ner]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: BertForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gdpr_anonymiseingsmodel_ganm` is a English model originally trained by AI-aktindsigt.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gdpr_anonymiseingsmodel_ganm_en_5.5.0_3.0_1725477941347.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gdpr_anonymiseingsmodel_ganm_en_5.5.0_3.0_1725477941347.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = BertForTokenClassification.pretrained(\"gdpr_anonymiseingsmodel_ganm\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = BertForTokenClassification.pretrained(\"gdpr_anonymiseingsmodel_ganm\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gdpr_anonymiseingsmodel_ganm|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|666.0 MB|\n\n## References\n\nhttps://huggingface.co/AI-aktindsigt/gdpr_anonymiseingsmodel_ganm","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5F30:241B62:17BDEA:5E57B7:6AB92E33"},"text_sha256":"102a8164e72d2e730c279df9837af3a1ea0da82c63d8bd048f3808602b728911"},{"path":"docs/_posts/ahmedlone127/2024-09-04-gdpr_anonymiseingsmodel_ganm_pipeline_en.md","size":2081,"blob_sha":"e1beb5e4423a5086ae2fd5ffda10e0940a2f32d4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English gdpr_anonymiseingsmodel_ganm_pipeline pipeline BertForTokenClassification from AI-aktindsigt\nauthor: John Snow Labs\nname: gdpr_anonymiseingsmodel_ganm_pipeline\ndate: 2024-09-04\ntags: [en, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained BertForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gdpr_anonymiseingsmodel_ganm_pipeline` is a English model originally trained by AI-aktindsigt.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gdpr_anonymiseingsmodel_ganm_pipeline_en_5.5.0_3.0_1725477972628.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gdpr_anonymiseingsmodel_ganm_pipeline_en_5.5.0_3.0_1725477972628.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"gdpr_anonymiseingsmodel_ganm_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"gdpr_anonymiseingsmodel_ganm_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gdpr_anonymiseingsmodel_ganm_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|666.0 MB|\n\n## References\n\nhttps://huggingface.co/AI-aktindsigt/gdpr_anonymiseingsmodel_ganm\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- BertForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2BF6:1F1FB6:17F1F9:5E8AB2:6AB92E32"},"text_sha256":"58ed02c3e88fe4b081c17d08075abb61609349c21a8d60e86ade688f382d540f"},{"path":"docs/_posts/ahmedlone127/2024-09-04-gqa_roberta_german_legal_squad_2000_de.md","size":3117,"blob_sha":"6bed11faab0133fc8f3dffb244e4408459da2ca6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German gqa_roberta_german_legal_squad_2000 RoBertaForQuestionAnswering from farid1088\nauthor: John Snow Labs\nname: gqa_roberta_german_legal_squad_2000\ndate: 2024-09-04\ntags: [de, open_source, onnx, question_answering, roberta]\ntask: Question Answering\nlanguage: de\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaForQuestionAnswering\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gqa_roberta_german_legal_squad_2000` is a German model originally trained by farid1088.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gqa_roberta_german_legal_squad_2000_de_5.5.0_3.0_1725479738226.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gqa_roberta_german_legal_squad_2000_de_5.5.0_3.0_1725479738226.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n             \ndocumentAssembler = MultiDocumentAssembler() \\\n     .setInputCol([\"question\", \"context\"]) \\\n     .setOutputCol([\"document_question\", \"document_context\"])\n    \nspanClassifier = RoBertaForQuestionAnswering.pretrained(\"gqa_roberta_german_legal_squad_2000\",\"de\") \\\n     .setInputCols([\"document_question\",\"document_context\"]) \\\n     .setOutputCol(\"answer\")\n\npipeline = Pipeline().setStages([documentAssembler, spanClassifier])\ndata = spark.createDataFrame([[\"What framework do I use?\",\"I use spark-nlp.\"]]).toDF(\"document_question\", \"document_context\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new MultiDocumentAssembler()\n    .setInputCol(Array(\"question\", \"context\")) \n    .setOutputCol(Array(\"document_question\", \"document_context\"))\n    \nval spanClassifier = RoBertaForQuestionAnswering.pretrained(\"gqa_roberta_german_legal_squad_2000\", \"de\")\n    .setInputCols(Array(\"document_question\",\"document_context\")) \n    .setOutputCol(\"answer\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier))\nval data = Seq(\"What framework do I use?\",\"I use spark-nlp.\").toDS.toDF(\"document_question\", \"document_context\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gqa_roberta_german_legal_squad_2000|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document_question, document_context]|\n|Output Labels:|[answer]|\n|Language:|de|\n|Size:|465.8 MB|\n\n## References\n\nhttps://huggingface.co/farid1088/GQA_RoBERTa_German_legal_SQuAD_2000","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7A:7A4F8:184901:5EE303:6AB92E34"},"text_sha256":"e1b40e1bb0c90127ab6609625785f27fd502cd0a2c8c7a0d22e42d7c702cf082"},{"path":"docs/_posts/ahmedlone127/2024-09-04-gqa_roberta_german_legal_squad_2000_pipeline_de.md","size":2115,"blob_sha":"5837a2c60992dbb1b157bb9a3b1adaf3c9599da6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German gqa_roberta_german_legal_squad_2000_pipeline pipeline RoBertaForQuestionAnswering from farid1088\nauthor: John Snow Labs\nname: gqa_roberta_german_legal_squad_2000_pipeline\ndate: 2024-09-04\ntags: [de, open_source, pipeline, onnx]\ntask: Question Answering\nlanguage: de\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaForQuestionAnswering, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`gqa_roberta_german_legal_squad_2000_pipeline` is a German model originally trained by farid1088.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/gqa_roberta_german_legal_squad_2000_pipeline_de_5.5.0_3.0_1725479764866.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/gqa_roberta_german_legal_squad_2000_pipeline_de_5.5.0_3.0_1725479764866.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"gqa_roberta_german_legal_squad_2000_pipeline\", lang = \"de\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"gqa_roberta_german_legal_squad_2000_pipeline\", lang = \"de\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|gqa_roberta_german_legal_squad_2000_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|de|\n|Size:|465.8 MB|\n\n## References\n\nhttps://huggingface.co/farid1088/GQA_RoBERTa_German_legal_SQuAD_2000\n\n## Included Models\n\n- MultiDocumentAssembler\n- RoBertaForQuestionAnswering","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"171A:2E8679:17E5E7:5E7CF9:6AB92E34"},"text_sha256":"b7462e08df085fd1f975823e437fb6c553003774c2a7ae8b645cf216ef2f7f77"},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_roberta_large_en.md","size":2807,"blob_sha":"ee0c1ffeef565236cf9069c7886232c7780572f7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_large RoBertaEmbeddings from lexlms\nauthor: John Snow Labs\nname: legal_roberta_large\ndate: 2024-09-04\ntags: [en, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_large` is a English model originally trained by lexlms.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_large_en_5.5.0_3.0_1725412321582.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_large_en_5.5.0_3.0_1725412321582.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_large\",\"en\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"legal_roberta_large\",\"en\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_large|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-roberta-large","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FFC2:24970A:18673B:5EFE97:6AB92E34"},"text_sha256":"3dbc184ab03c22d27da6999ed8a2d1efc68de26ae7f3dc576c00954d816629a9"},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_roberta_large_pipeline_en.md","size":1936,"blob_sha":"94a44849e723a247fe33abf9c1b3fd818c8489ed","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English legal_roberta_large_pipeline pipeline RoBertaEmbeddings from lexlms\nauthor: John Snow Labs\nname: legal_roberta_large_pipeline\ndate: 2024-09-04\ntags: [en, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_roberta_large_pipeline` is a English model originally trained by lexlms.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_roberta_large_pipeline_en_5.5.0_3.0_1725412397286.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_roberta_large_pipeline_en_5.5.0_3.0_1725412397286.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_roberta_large_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_roberta_large_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_roberta_large_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|1.3 GB|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-roberta-large\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB94:149227:1838CC:5ED328:6AB92E35"},"text_sha256":"b1d6bc024817fc79ff3071cdae241329ca3d77d08547b9c93bd5341cb643ddf2"},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_xlm_roberta_large_pipeline_xx.md","size":1997,"blob_sha":"f24ebbb053e1f1453e5f2039beff195589950eaa","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Multilingual legal_xlm_roberta_large_pipeline pipeline RoBertaEmbeddings from joelniklaus\nauthor: John Snow Labs\nname: legal_xlm_roberta_large_pipeline\ndate: 2024-09-04\ntags: [xx, open_source, pipeline, onnx]\ntask: Embeddings\nlanguage: xx\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_xlm_roberta_large_pipeline` is a Multilingual model originally trained by joelniklaus.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_large_pipeline_xx_5.5.0_3.0_1725413327209.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_large_pipeline_xx_5.5.0_3.0_1725413327209.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"legal_xlm_roberta_large_pipeline\", lang = \"xx\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"legal_xlm_roberta_large_pipeline\", lang = \"xx\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_xlm_roberta_large_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|xx|\n|Size:|1.6 GB|\n\n## References\n\nhttps://huggingface.co/joelniklaus/legal-xlm-roberta-large\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- RoBertaEmbeddings","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1A6E:35EBC:17A76A:5E4105:6AB92E35"},"text_sha256":"c802b9b33885baf607014ab1ca20e4a5be640a00d638b4e67f979294068ccfd5"},{"path":"docs/_posts/ahmedlone127/2024-09-04-legal_xlm_roberta_large_xx.md","size":2868,"blob_sha":"bb1efdbd41e4e542803ee61a09e71a2d6f5175d5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Multilingual legal_xlm_roberta_large RoBertaEmbeddings from joelniklaus\nauthor: John Snow Labs\nname: legal_xlm_roberta_large\ndate: 2024-09-04\ntags: [xx, open_source, onnx, embeddings, roberta]\ntask: Embeddings\nlanguage: xx\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RoBertaEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`legal_xlm_roberta_large` is a Multilingual model originally trained by joelniklaus.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_large_xx_5.5.0_3.0_1725413246394.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/legal_xlm_roberta_large_xx_5.5.0_3.0_1725413246394.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n \ndocumentAssembler = DocumentAssembler() \\\n      .setInputCol(\"text\") \\\n      .setOutputCol(\"document\")\n    \ntokenizer = Tokenizer() \\ \n      .setInputCols(\"document\") \\ \n      .setOutputCol(\"token\")\n\nembeddings = RoBertaEmbeddings.pretrained(\"legal_xlm_roberta_large\",\"xx\") \\\n      .setInputCols([\"document\", \"token\"]) \\\n      .setOutputCol(\"embeddings\")       \n        \npipeline = Pipeline().setStages([documentAssembler, tokenizer, embeddings])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler() \n    .setInputCol(\"text\") \n    .setOutputCol(\"document\")\n    \nval tokenizer = new Tokenizer() \n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval embeddings = RoBertaEmbeddings.pretrained(\"legal_xlm_roberta_large\",\"xx\") \n    .setInputCols(Array(\"document\", \"token\")) \n    .setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\nval data = Seq(\"I love spark-nlp\").toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|legal_xlm_roberta_large|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[roberta]|\n|Language:|xx|\n|Size:|1.6 GB|\n\n## References\n\nhttps://huggingface.co/joelniklaus/legal-xlm-roberta-large","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"635C:3FA0D:17A1B4:5E3B10:6AB92E35"},"text_sha256":"c0685cfec2e70fed6a9329e63e12f6e9c7eb377d13122f21423525ce8b305077"},{"path":"docs/_posts/ahmedlone127/2024-09-04-mdeberta_v3_base_finetuned_ai4privacy_v2_en.md","size":3077,"blob_sha":"ece4fb42a6c2c04ea9d97f052a0d8d0af1097ce0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mdeberta_v3_base_finetuned_ai4privacy_v2 DeBertaForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: mdeberta_v3_base_finetuned_ai4privacy_v2\ndate: 2024-09-04\ntags: [en, open_source, onnx, token_classification, deberta, ner]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: DeBertaForTokenClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mdeberta_v3_base_finetuned_ai4privacy_v2` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mdeberta_v3_base_finetuned_ai4privacy_v2_en_5.5.0_3.0_1725472870659.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mdeberta_v3_base_finetuned_ai4privacy_v2_en_5.5.0_3.0_1725472870659.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\ntokenClassifier  = DeBertaForTokenClassification.pretrained(\"mdeberta_v3_base_finetuned_ai4privacy_v2\",\"en\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"ner\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, tokenClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval tokenClassifier = DeBertaForTokenClassification.pretrained(\"mdeberta_v3_base_finetuned_ai4privacy_v2\", \"en\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"ner\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, tokenClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mdeberta_v3_base_finetuned_ai4privacy_v2|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[ner]|\n|Language:|en|\n|Size:|890.7 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/mdeberta-v3-base_finetuned_ai4privacy_v2","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDB2:372D9:17F2A4:5E8D2D:6AB92E36"},"text_sha256":"9fd4923499e8106f614ab975d6175f5f04543d332bf31edc72ed42bb085e8486"},{"path":"docs/_posts/ahmedlone127/2024-09-04-mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline_en.md","size":2183,"blob_sha":"1a4b6229d0af34e5039729cfc416648d8bcd06fd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline pipeline DeBertaForTokenClassification from Isotonic\nauthor: John Snow Labs\nname: mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline\ndate: 2024-09-04\ntags: [en, open_source, pipeline, onnx]\ntask: Named Entity Recognition\nlanguage: en\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained DeBertaForTokenClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline` is a English model originally trained by Isotonic.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline_en_5.5.0_3.0_1725472931903.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline_en_5.5.0_3.0_1725472931903.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline\", lang = \"en\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline\", lang = \"en\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|mdeberta_v3_base_finetuned_ai4privacy_v2_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|en|\n|Size:|890.8 MB|\n\n## References\n\nhttps://huggingface.co/Isotonic/mdeberta-v3-base_finetuned_ai4privacy_v2\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- DeBertaForTokenClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"481A:3B6DE:17880E:5E212E:6AB92E36"},"text_sha256":"4d029c8c93946283c214659f647fd11a8dcfcde285908a0902736a60ab5a8f30"},{"path":"docs/_posts/ahmedlone127/2024-09-04-monobert_legal_french_fr.md","size":2976,"blob_sha":"1929f0411fa9c973e13b9446547e11b4f0bdfad9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French monobert_legal_french CamemBertForSequenceClassification from maastrichtlawtech\nauthor: John Snow Labs\nname: monobert_legal_french\ndate: 2024-09-04\ntags: [fr, open_source, onnx, sequence_classification, camembert]\ntask: Text Classification\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nengine: onnx\nannotator: CamemBertForSequenceClassification\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`monobert_legal_french` is a French model originally trained by maastrichtlawtech.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/monobert_legal_french_fr_5.5.0_3.0_1725466656009.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/monobert_legal_french_fr_5.5.0_3.0_1725466656009.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n     \ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol('text') \\\n    .setOutputCol('document')\n    \ntokenizer = Tokenizer() \\\n    .setInputCols(['document']) \\\n    .setOutputCol('token')\n\nsequenceClassifier  = CamemBertForSequenceClassification.pretrained(\"monobert_legal_french\",\"fr\") \\\n     .setInputCols([\"documents\",\"token\"]) \\\n     .setOutputCol(\"class\")\n\npipeline = Pipeline().setStages([documentAssembler, tokenizer, sequenceClassifier])\ndata = spark.createDataFrame([[\"I love spark-nlp\"]]).toDF(\"text\")\npipelineModel = pipeline.fit(data)\npipelineDF = pipelineModel.transform(data)\n\n```\n```scala\n\nval documentAssembler = new DocumentAssembler()\n    .setInputCols(\"text\")\n    .setOutputCols(\"document\")\n    \nval tokenizer = new Tokenizer()\n    .setInputCols(Array(\"document\"))\n    .setOutputCol(\"token\")\n\nval sequenceClassifier = CamemBertForSequenceClassification.pretrained(\"monobert_legal_french\", \"fr\")\n    .setInputCols(Array(\"documents\",\"token\")) \n    .setOutputCol(\"class\") \n    \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))\nval data = Seq(\"I love spark-nlp\").toDS.toDF(\"text\")\nval pipelineModel = pipeline.fit(data)\nval pipelineDF = pipelineModel.transform(data)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|monobert_legal_french|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[document, token]|\n|Output Labels:|[class]|\n|Language:|fr|\n|Size:|415.0 MB|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/monobert-legal-french","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79BA:3B7E2:172BA1:5DC698:6AB92E36"},"text_sha256":"661151ee3e50a42b5e17934107671746708f10497c089f6cfada85a53c6df6c2"},{"path":"docs/_posts/ahmedlone127/2024-09-04-monobert_legal_french_pipeline_fr.md","size":2047,"blob_sha":"e98ced63b65efe94b2de8049e278c4a08b4e34b7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French monobert_legal_french_pipeline pipeline CamemBertForSequenceClassification from maastrichtlawtech\nauthor: John Snow Labs\nname: monobert_legal_french_pipeline\ndate: 2024-09-04\ntags: [fr, open_source, pipeline, onnx]\ntask: Text Classification\nlanguage: fr\nedition: Spark NLP 5.5.0\nspark_version: 3.0\nsupported: true\nannotator: PipelineModel\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertForSequenceClassification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`monobert_legal_french_pipeline` is a French model originally trained by maastrichtlawtech.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/monobert_legal_french_pipeline_fr_5.5.0_3.0_1725466675822.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/monobert_legal_french_pipeline_fr_5.5.0_3.0_1725466675822.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\n\npipeline = PretrainedPipeline(\"monobert_legal_french_pipeline\", lang = \"fr\")\nannotations =  pipeline.transform(df)   \n\n```\n```scala\n\nval pipeline = new PretrainedPipeline(\"monobert_legal_french_pipeline\", lang = \"fr\")\nval annotations = pipeline.transform(df)\n\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|monobert_legal_french_pipeline|\n|Type:|pipeline|\n|Compatibility:|Spark NLP 5.5.0+|\n|License:|Open Source|\n|Edition:|Official|\n|Language:|fr|\n|Size:|415.0 MB|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/monobert-legal-french\n\n## Included Models\n\n- DocumentAssembler\n- TokenizerModel\n- CamemBertForSequenceClassification","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A4A0:376DE:1827F4:5EC30B:6AB92E37"},"text_sha256":"d28f94f3db98b09275cf988dfc83267eabf252292c164960b7172b2bc630d9aa"},{"path":"docs/_posts/Digaari/2021-09-06-sent_bert_base_uncased_legal_en.md","size":2830,"blob_sha":"086dbc151421263f8387099983c668147fff433d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Legal BERT Sentence Base Uncased Embedding\nauthor: John Snow Labs\nname: sent_bert_base_uncased_legal\ndate: 2021-09-06\ntags: [legal, english, open_source, bert_sentence_embeddings, uncased, en]\ntask: Embeddings\nlanguage: en\nnav_key: models\nedition: Spark NLP 3.2.2\nspark_version: 3.0\nsupported: true\nrecommended: true\nannotator: BertSentenceEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nLEGAL-BERT is a family of BERT models for the legal domain, intended to assist legal NLP research, computational law, and legal technology applications. To pre-train the different variations of LEGAL-BERT, we collected 12 GB of diverse English legal text from several fields (e.g., legislation, court cases, contracts) scraped from publicly available resources. Sub-domains variants (CONTRACTS-, EURLEX-, ECHR-) and/or general LEGAL-BERT perform better than using BERT out of the box for domain-specific tasks. A light-weight model (33% the size of BERT-BASE) pre-trained from scratch on legal data with competitive perfomance is also available.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/sent_bert_base_uncased_legal_en_3.2.2_3.0_1630926286151.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/sent_bert_base_uncased_legal_en_3.2.2_3.0_1630926286151.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_base_uncased_legal\", \"en\") \\\n.setInputCols(\"sentence\") \\\n.setOutputCol(\"bert_sentence\")\n\nnlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, sent_embeddings ])\n```\n```scala\nval sent_embeddings = BertSentenceEmbeddings.pretrained(\"sent_bert_base_uncased_legal\", \"en\")\n.setInputCols(\"sentence\")\n.setOutputCol(\"bert_sentence\")\n\nval pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, sent_embeddings ))\n```\n\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed_sentence.bert.base_uncased_legal\").predict(\"\"\"Put your text here.\"\"\")\n```\n\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|sent_bert_base_uncased_legal|\n|Compatibility:|Spark NLP 3.2.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence]|\n|Output Labels:|[bert_sentence]|\n|Language:|en|\n|Case sensitive:|true|\n\n## Data Source\n\nThe model is imported from: https://huggingface.co/nlpaueb/legal-bert-base-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C324:09BF:B3B51:2E7913:6AB92E38"},"text_sha256":"8bd79c82cfd9b9efd66ecf15b233794f607c430658493b233930250dfd8ee29e"},{"path":"docs/_posts/Digaari/2021-09-07-bert_base_uncased_legal_en.md","size":2759,"blob_sha":"2fb31dd3ed4a5e6669bef426dd75733d6ec07d66","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Legal BERT Base Uncased Embedding\nauthor: John Snow Labs\nname: bert_base_uncased_legal\ndate: 2021-09-07\ntags: [english, legal, open_source, bert_embeddings, uncased, en]\ntask: Embeddings\nlanguage: en\nnav_key: models\nedition: Spark NLP 3.2.2\nspark_version: 3.0\nsupported: true\nrecommended: true\nannotator: BertEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nLEGAL-BERT is a family of BERT models for the legal domain, intended to assist legal NLP research, computational law, and legal technology applications. To pre-train the different variations of LEGAL-BERT, we collected 12 GB of diverse English legal text from several fields (e.g., legislation, court cases, contracts) scraped from publicly available resources. Sub-domains variants (CONTRACTS-, EURLEX-, ECHR-) and/or general LEGAL-BERT perform better than using BERT out of the box for domain-specific tasks. A light-weight model (33% the size of BERT-BASE) pre-trained from scratch on legal data with competitive perfomance is also available.\n\n## Predicted Entities\n\n\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_base_uncased_legal_en_3.2.2_3.0_1630999701913.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_base_uncased_legal_en_3.2.2_3.0_1630999701913.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nembeddings = BertEmbeddings.pretrained(\"bert_base_uncased_legal\", \"en\") \\\n.setInputCols(\"sentence\", \"token\") \\\n.setOutputCol(\"embeddings\")\n\nnlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, embeddings])\n```\n```scala\nval embeddings = BertEmbeddings.pretrained(\"bert_base_uncased_legal\", \"en\")\n.setInputCols(\"sentence\", \"token\")\n.setOutputCol(\"embeddings\")\n\nval pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, embeddings))\n```\n\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.bert.base_uncased_legal\").predict(\"\"\"Put your text here.\"\"\")\n```\n\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|bert_base_uncased_legal|\n|Compatibility:|Spark NLP 3.2.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[bert]|\n|Language:|en|\n|Case sensitive:|true|\n\n## Data Source\n\nThe model is imported from: https://huggingface.co/nlpaueb/legal-bert-base-uncased","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52FC:149227:1838EE:5ED392:6AB92E37"},"text_sha256":"6d86e60b83f17c3875e6c00f897f732bdc05e2eb4af31aebb914f196fc9ae884"},{"path":"docs/_posts/Mary-Sci/2022-12-12-roberta_embeddings_legal_base_en.md","size":3129,"blob_sha":"792dda524046c43aa12de2c7f7535a2cccc3c553","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal RobertaForMaskedLM Base Cased model\nauthor: John Snow Labs\nname: roberta_embeddings_legal_base\ndate: 2022-12-12\ntags: [en, open_source, roberta_embeddings, robertaformaskedlm]\ntask: Embeddings\nlanguage: en\nnav_key: models\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained RobertaForMaskedLM model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-roberta-base` is a English model originally trained by `saibo`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_base_en_4.2.4_3.0_1670858851348.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_embeddings_legal_base_en_4.2.4_3.0_1670858851348.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nroberta_loaded = RoBertaEmbeddings.pretrained(\"roberta_embeddings_legal_base\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, roberta_loaded])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval roberta_loaded = RoBertaEmbeddings.pretrained(\"roberta_embeddings_legal_base\",\"en\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(true)\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, roberta_loaded))\n\nval data = Seq(\"I love Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n\n\n{:.nlu-block}\n```python\nimport nlu\nnlu.load(\"en.embed.roberta.base_legal\").predict(\"\"\"I love Spark NLP\"\"\")\n```\n\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_embeddings_legal_base|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|468.7 MB|\n|Case sensitive:|true|\n\n## References\n\n- https://huggingface.co/saibo/legal-roberta-base\n- https://www.kaggle.com/uspto/patent-litigations\n- https://case.law/\n- https://www.kaggle.com/bigquery/patents\n- https://www.kaggle.com/sohier/beyond-queries-exploring-the-bigquery-api\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:1838F1:5ED39D:6AB92E38"},"text_sha256":"a456fef2d24aa207f2ea3ed4f16c5a596b958e30a7bfccc61cb51e9bf2be6da5"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_bulgarian_legal_bul.md","size":2010,"blob_sha":"0f2ed1627a546c4e1b5f170c50498271d42ca7b8","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Bulgarian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_bulgarian_legal\ndate: 2023-02-16\ntags: [bul, bulgarian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: bul\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-bulgarian-roberta-base` is a Bulgarian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_bulgarian_legal_bul_4.2.4_3.0_1676558917204.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_bulgarian_legal_bul_4.2.4_3.0_1676558917204.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_bulgarian_legal\", \"bul\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_bulgarian_legal\", \"bul\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_bulgarian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|bul|\n|Size:|416.1 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-bulgarian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0884:3A3DD:17B387:5E4D8C:6AB92E38"},"text_sha256":"b68a9947f311d80c1fea442b18d3e0a6d52d9b75e316d8388439e8ddfa20dcd6"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_croatian_legal_hr.md","size":1992,"blob_sha":"ed0fa8cb0384f0f066295164b426931e6bbb7706","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Croatian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_croatian_legal\ndate: 2023-02-16\ntags: [hr, croatian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: hr\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-croatian-roberta-base` is a Croatian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_croatian_legal_hr_4.2.4_3.0_1676576201975.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_croatian_legal_hr_4.2.4_3.0_1676576201975.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_croatian_legal\", \"hr\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_croatian_legal\", \"hr\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_croatian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|hr|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-croatian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD02:4F9CC:172E31:5DC5BB:6AB92E38"},"text_sha256":"afeb07c6ba524e03b23c4365ee019f1b7a9b2a7d709ffc2413b8b202982c7421"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_czech_legal_cs.md","size":1959,"blob_sha":"625f7c7f2b1a47950451b533b071cf8c4003b218","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Czech Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_czech_legal\ndate: 2023-02-16\ntags: [cs, czech, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: cs\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-czech-roberta-base` is a Czech model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_czech_legal_cs_4.2.4_3.0_1676561802836.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_czech_legal_cs_4.2.4_3.0_1676561802836.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_czech_legal\", \"cs\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_czech_legal\", \"cs\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_czech_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|cs|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-czech-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C324:09BF:B3B62:2E794A:6AB92E39"},"text_sha256":"7f8aed7ea15656281b1463c059ed4372ce99aa76dc49e7f1e626a0b3d8486f66"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_danish_legal_da.md","size":1970,"blob_sha":"d5b27915e80f198356cc78edaa6512dec9ed0a12","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Danish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_danish_legal\ndate: 2023-02-16\ntags: [da, danish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: da\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-danish-roberta-base` is a Danish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_danish_legal_da_4.2.4_3.0_1676576630307.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_danish_legal_da_4.2.4_3.0_1676576630307.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_danish_legal\", \"da\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_danish_legal\", \"da\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_danish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|da|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-danish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"17DC:24970A:186758:5EFF2B:6AB92E39"},"text_sha256":"e8f271dbc0e371938a2b9714b432a22865d68fff2709943194d8cabbc6f9f3e1"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_dutch_legal_nl.md","size":1959,"blob_sha":"7097b03dce140cb42825d6c309eb363b67fd42f0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Dutch Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_dutch_legal\ndate: 2023-02-16\ntags: [nl, dutch, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: nl\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-dutch-roberta-base` is a Dutch model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_dutch_legal_nl_4.2.4_3.0_1676561397040.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_dutch_legal_nl_4.2.4_3.0_1676561397040.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_dutch_legal\", \"nl\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_dutch_legal\", \"nl\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_dutch_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|nl|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-dutch-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D06:324E19:18217E:5EBBA9:6AB92E3A"},"text_sha256":"4b34bb0848b0c41b986d69172b8ffe5d7d40eb6caa583edbe675ef600de72150"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_estonian_legal_et.md","size":1992,"blob_sha":"fc180603796264ec2ca2ad6f541061f25f478bb4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Estonian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_estonian_legal\ndate: 2023-02-16\ntags: [et, estonian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: et\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-estonian-roberta-base` is a Estonian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_estonian_legal_et_4.2.4_3.0_1676577830758.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_estonian_legal_et_4.2.4_3.0_1676577830758.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_estonian_legal\", \"et\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_estonian_legal\", \"et\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_estonian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|et|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-estonian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"887C:7A4F8:184941:5EE3DB:6AB92E3A"},"text_sha256":"5713bc8c49e2801971fc5b4311ba9d4e482209f590e9161bd5a23fce2250b5e4"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_finnish_legal_fi.md","size":1981,"blob_sha":"285001f1c9065335e27fd7e02275c5e15bfcb466","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Finnish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_finnish_legal\ndate: 2023-02-16\ntags: [fi, finnish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: fi\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-finnish-roberta-base` is a Finnish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_finnish_legal_fi_4.2.4_3.0_1676561071432.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_finnish_legal_fi_4.2.4_3.0_1676561071432.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_finnish_legal\", \"fi\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_finnish_legal\", \"fi\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_finnish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|fi|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-finnish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6396:3E1DA:17B71A:5E516E:6AB92E3A"},"text_sha256":"d7a732ef7857f0d8e248d66b9d9337e9026c1bf8780b36cfec8bec33c98dddc9"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_french_legal_fr.md","size":1970,"blob_sha":"1da354103d0ff326ee1384bd6c4218c64bcba5c9","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_french_legal\ndate: 2023-02-16\ntags: [fr, french, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-french-roberta-base` is a French model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_french_legal_fr_4.2.4_3.0_1676580048854.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_french_legal_fr_4.2.4_3.0_1676580048854.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_french_legal\", \"fr\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_french_legal\", \"fr\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_french_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|fr|\n|Size:|416.2 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-french-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5744:35EBC:17A79C:5E41B1:6AB92E3B"},"text_sha256":"f63a6587e8262f213541e3f945e4f87ef7be22e61baea5874e49e85e940fe156"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_greek_legal_el.md","size":1959,"blob_sha":"8989d8679575a777bed3f04c9b4d9bea89b4832d","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Greek Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_greek_legal\ndate: 2023-02-16\ntags: [el, greek, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: el\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-greek-roberta-base` is a Greek model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_greek_legal_el_4.2.4_3.0_1676558051730.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_greek_legal_el_4.2.4_3.0_1676558051730.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_greek_legal\", \"el\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_greek_legal\", \"el\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_greek_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|el|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-greek-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD02:4F9CC:172E4A:5DC5FE:6AB92E3A"},"text_sha256":"a7006b2a9b94de8c9547938057e228ce1cea569f0f611bc025c20324e3c7f51d"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_hungarian_legal_hu.md","size":2003,"blob_sha":"8ffc4693b26bb58d17b8a4b94ef5bd717c5d51e5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Hungarian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_hungarian_legal\ndate: 2023-02-16\ntags: [hu, hungarian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: hu\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\n  type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-hungarian-roberta-base` is a Hungarian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_hungarian_legal_hu_4.2.4_3.0_1676558480899.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_hungarian_legal_hu_4.2.4_3.0_1676558480899.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_hungarian_legal\", \"hu\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_hungarian_legal\", \"hu\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_hungarian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|hu|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-hungarian-roberta-base","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C786:2B291E:185ACB:5EF583:6AB92E36"},"text_sha256":"0a9a37b438a00434965a71cd14456e7aa9eae5fc380ef40e0f3046b36ddb8c17"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_irish_legal_gle.md","size":1966,"blob_sha":"bd54ee76062952a75c55b4ea4d9d61f108f23c55","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Irish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_irish_legal\ndate: 2023-02-16\ntags: [gle, irish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: gle\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-irish-roberta-base` is a Irish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_irish_legal_gle_4.2.4_3.0_1676553431450.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_irish_legal_gle_4.2.4_3.0_1676553431450.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_irish_legal\", \"gle\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_irish_legal\", \"gle\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_irish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|gle|\n|Size:|415.9 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-irish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:181E9F:5EB817:6AB92E39"},"text_sha256":"ad3ca4c7c888b2f08ed3e5794ff4664bbccb7fcfe55265cf5206c361fc883ef9"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_italian_legal_it.md","size":1981,"blob_sha":"441aeb292357e461cdae0bdb6612037d20363361","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Italian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_italian_legal\ndate: 2023-02-16\ntags: [it, italian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-italian-roberta-base` is a Italian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_italian_legal_it_4.2.4_3.0_1676579541941.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_italian_legal_it_4.2.4_3.0_1676579541941.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_italian_legal\", \"it\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_italian_legal\", \"it\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_italian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|it|\n|Size:|416.2 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-italian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A06C:18CDF1:17A54A:56664C:6AB92E3C"},"text_sha256":"462d49dc27f10d699938b54caf116a078153f36ff0d56b7d75532254a4b9b2b4"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_latvian_legal_lv.md","size":1981,"blob_sha":"6fdf65b7ecd9169ef075be9645d48e17f5aeeaf0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Latvian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_latvian_legal\ndate: 2023-02-16\ntags: [lv, latvian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: lv\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-latvian-roberta-base` is a Latvian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_latvian_legal_lv_4.2.4_3.0_1676555343069.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_latvian_legal_lv_4.2.4_3.0_1676555343069.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_latvian_legal\", \"lv\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_latvian_legal\", \"lv\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_latvian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|lv|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-latvian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"29FC:375F4:17DC73:5E77F7:6AB92E3C"},"text_sha256":"0ab6546debf51a077ff3bc371e73137f7acbff975f5c5dd0ea5af99471f42341"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_lithuanian_legal_lt.md","size":2014,"blob_sha":"3b3b6a1d3f5b0f2215fc6bb2879237af2e8d9337","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Lithuanian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_lithuanian_legal\ndate: 2023-02-16\ntags: [lt, lithuanian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: lt\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-lithuanian-roberta-base` is a Lithuanian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_lithuanian_legal_lt_4.2.4_3.0_1676555711899.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_lithuanian_legal_lt_4.2.4_3.0_1676555711899.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_lithuanian_legal\", \"lt\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_lithuanian_legal\", \"lt\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_lithuanian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|lt|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-lithuanian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"32CE:09BF:B3B85:2E79B2:6AB92E21"},"text_sha256":"b8343275bdb5f6f09e6336edf4bd36c0c1948cdc3b13512cf255836223f5bc56"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_maltese_legal_mt.md","size":1981,"blob_sha":"0fdaf8b041b237aa1b0b6dcf42949461c6587237","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Maltese Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_maltese_legal\ndate: 2023-02-16\ntags: [mt, maltese, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: mt\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-maltese-roberta-base` is a Maltese model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_maltese_legal_mt_4.2.4_3.0_1676554739478.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_maltese_legal_mt_4.2.4_3.0_1676554739478.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_maltese_legal\", \"mt\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_maltese_legal\", \"mt\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_maltese_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|mt|\n|Size:|415.9 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-maltese-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:174793:5DE1CB:6AB92E3C"},"text_sha256":"5acb44998871865e9ff0edca1c71ed15e82928a68480673063ca0c7a9a984616"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_polish_legal_pl.md","size":1970,"blob_sha":"789ef0056c9b50ce8f7a5c7fb4a9ef6d15c298bd","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Polish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_polish_legal\ndate: 2023-02-16\ntags: [pl, polish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: pl\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-polish-roberta-base` is a Polish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_polish_legal_pl_4.2.4_3.0_1676556043773.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_polish_legal_pl_4.2.4_3.0_1676556043773.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_polish_legal\", \"pl\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_polish_legal\", \"pl\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_polish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|pl|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-polish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13B6:3B6DE:17884E:5E2204:6AB92E3C"},"text_sha256":"e43182a630fffa7bd37c8b38ea57b5eec5b558aad8cedd0657e4ac6af6d1924e"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_portuguese_legal_pt.md","size":2014,"blob_sha":"6663047f0811308cc44a1e3cd37bb64670c3fc6e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Portuguese Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_portuguese_legal\ndate: 2023-02-16\ntags: [pt, portuguese, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: pt\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-portuguese-roberta-base` is a Portuguese model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_portuguese_legal_pt_4.2.4_3.0_1676563448655.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_portuguese_legal_pt_4.2.4_3.0_1676563448655.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_portuguese_legal\", \"pt\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_portuguese_legal\", \"pt\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_portuguese_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|pt|\n|Size:|415.9 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-portuguese-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0CE4:18233:17C453:5E5DB1:6AB92E3D"},"text_sha256":"e7c1aa4febc8ec48f5a26dba0c915c73eb72e78e0c94faee9d417024a0e94d22"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_romanian_legal_ro.md","size":1992,"blob_sha":"52ce140859f8ebd51e8639d88db7768113d888f6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Romanian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_romanian_legal\ndate: 2023-02-16\ntags: [ro, romanian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: ro\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-romanian-roberta-base` is a Romanian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_romanian_legal_ro_4.2.4_3.0_1676556391039.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_romanian_legal_ro_4.2.4_3.0_1676556391039.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_romanian_legal\", \"ro\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_romanian_legal\", \"ro\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_romanian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|ro|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-romanian-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AAA2:40CE8:181EB9:5EB862:6AB92E3C"},"text_sha256":"2c31234917a60be549ac60cd58286e08d99bc482c7ee1582f3486e61d1cd1b4f"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_spanish_legal_es.md","size":1981,"blob_sha":"1d61f148dfd25bfa920a0f9ea4bc9b009bf70e4e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Spanish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_spanish_legal\ndate: 2023-02-16\ntags: [es, spanish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: es\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-spanish-roberta-base` is a Spanish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_spanish_legal_es_4.2.4_3.0_1676579126608.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_spanish_legal_es_4.2.4_3.0_1676579126608.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_spanish_legal\", \"es\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_spanish_legal\", \"es\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_spanish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|es|\n|Size:|416.2 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-spanish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B670:372D9:17F300:5E8E3F:6AB92E3D"},"text_sha256":"6e4e5e183b7b5ca59556fb8f01025a2fc12a73af72680d703e409d0058426d0a"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_base_swiss_legal_gsw.md","size":1966,"blob_sha":"b2d9efceb0cd19f27280d556b52bcf4c029c768a","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Swiss Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_swiss_legal\ndate: 2023-02-16\ntags: [gsw, swiss, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: gsw\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-swiss-roberta-base` is a Swiss model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_swiss_legal_gsw_4.2.4_3.0_1676580464742.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_swiss_legal_gsw_4.2.4_3.0_1676580464742.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swiss_legal\", \"gsw\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swiss_legal\", \"gsw\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_swiss_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|gsw|\n|Size:|695.1 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-swiss-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79BA:3B7E2:172BFF:5DC7A3:6AB92E3C"},"text_sha256":"9552c9d09eb5ab8ad73979e86f8a0b43c878833df58705f8e92b45c459c9110b"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_french_legal_fr.md","size":1976,"blob_sha":"b8338cbef6647ce99370e3e67b333e2f04f30f56","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_french_legal\ndate: 2023-02-16\ntags: [fr, french, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-french-roberta-large` is a French model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_french_legal_fr_4.2.4_3.0_1676556919312.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_french_legal_fr_4.2.4_3.0_1676556919312.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_french_legal\", \"fr\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_french_legal\", \"fr\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_french_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|fr|\n|Size:|1.3 GB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-french-roberta-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E322:3AC15:181D6A:5EB6B9:6AB92E3C"},"text_sha256":"0946e11608908b178d7e818f31e19ca67b11f7c8aa1be1497f4b7ef3a4dc2548"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_german_legal_de.md","size":1976,"blob_sha":"6028ad0993d112593baa435d4fbb2487fffa2d24","priority":1,"status":200,"text":"---\nlayout: model\ntitle: German Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_german_legal\ndate: 2023-02-16\ntags: [de, german, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: de\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-german-roberta-large` is a German model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_german_legal_de_4.2.4_3.0_1676578377503.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_german_legal_de_4.2.4_3.0_1676578377503.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_german_legal\", \"de\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_german_legal\", \"de\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_german_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|de|\n|Size:|1.3 GB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-german-roberta-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9CC8:3E1C8:18093B:5EA2C7:6AB92E3E"},"text_sha256":"6d91792e2f451a14844011d4779d55ff773d1c03476468aa13051c235662fa9b"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_italian_legal_it.md","size":1987,"blob_sha":"2fdd0303ad6803a1d8f1373c5b9bc5e9472196d7","priority":1,"status":200,"text":"---\nlayout: model\ntitle: italian Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_italian_legal\ndate: 2023-02-16\ntags: [it, italian, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: it\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-italian-roberta-large` is a Italian model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_italian_legal_it_4.2.4_3.0_1676557559157.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_italian_legal_it_4.2.4_3.0_1676557559157.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_italian_legal\", \"it\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_italian_legal\", \"it\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_italian_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|it|\n|Size:|1.3 GB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-italian-roberta-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3816:3B6DE:178864:5E224A:6AB92E3E"},"text_sha256":"33739657202c06c4e652c9f21702c2ee0edf154e1ea0545e339150e1425302f0"},{"path":"docs/_posts/Mary-Sci/2023-02-16-roberta_large_swiss_legal_gsw.md","size":1973,"blob_sha":"578d477c1a65e113fafcc83693a10e149afe3fc5","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Swiss Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_swiss_legal\ndate: 2023-02-16\ntags: [gsw, swiss, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: gsw\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\n type: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-swiss-roberta-large` is a Swiss model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_gsw_4.2.4_3.0_1676577298804.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_swiss_legal_gsw_4.2.4_3.0_1676577298804.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_swiss_legal\", \"gsw\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_swiss_legal\", \"gsw\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_swiss_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|gsw|\n|Size:|1.6 GB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-swiss-roberta-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17A7D2:5E4254:6AB92E3F"},"text_sha256":"e0d74c6197cdee0f589353a79201ab349c5f5e5c5b1a0b3a5e6c0b1a2c7c8f86"},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_english_legal_en.md","size":1997,"blob_sha":"9f56483468269cecbc3e80b50c21865f4ee170a6","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_english_legal\ndate: 2023-02-17\ntags: [en, english, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: en\nnav_key: models\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-english-roberta-base` is a English model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_english_legal_en_4.2.4_3.0_1676642304747.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_english_legal_en_4.2.4_3.0_1676642304747.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_english_legal\", \"en\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_english_legal\", \"en\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_english_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|416.0 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-english-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE1A:3E1C8:180947:5EA2EB:6AB92E31"},"text_sha256":"6d32095b849848fcbe7d9736e2556a8e81b6caa8566517b25701bb12cb384468"},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_slovak_legal_sk.md","size":1970,"blob_sha":"2fa84fb5ec186e8dce78eabbc53b2799e1fb17e0","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Slovak Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_slovak_legal\ndate: 2023-02-17\ntags: [sk, slovak, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: sk\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-slovak-roberta-base` is a Slovak model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_slovak_legal_sk_4.2.4_3.0_1676642929159.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_slovak_legal_sk_4.2.4_3.0_1676642929159.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_slovak_legal\", \"sk\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_slovak_legal\", \"sk\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_slovak_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|sk|\n|Size:|415.9 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-slovak-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A320:B08CF:1768B7:5E0403:6AB92E3E"},"text_sha256":"c9094929066f9eb75db37275940ee0a7048991d3e8f95dc6bba122ae5665f1cf"},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_base_swedish_legal_se.md","size":1981,"blob_sha":"26527fbc0fcf1b0aa458c6c2513b2f5309d75fc4","priority":1,"status":200,"text":"---\nlayout: model\ntitle: Swedish Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_base_swedish_legal\ndate: 2023-02-17\ntags: [se, swedish, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: se\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-swedish-roberta-base` is a Swedish model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_base_swedish_legal_se_4.2.4_3.0_1676643288694.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_base_swedish_legal_se_4.2.4_3.0_1676643288694.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swedish_legal\", \"se\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_base_swedish_legal\", \"se\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_base_swedish_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|se|\n|Size:|415.9 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-swedish-roberta-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E21A:3D40A:1747BD:5DE246:6AB92E3F"},"text_sha256":"628af6aaf1c1990a63afe53613aa5b19ee4152338f82a7ee153b6fcb4177660b"},{"path":"docs/_posts/Mary-Sci/2023-02-17-roberta_large_english_legal_en.md","size":2003,"blob_sha":"a9331cc90b61291b51d1f1dc330e023fe7d72410","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal Roberta Embeddings\nauthor: John Snow Labs\nname: roberta_large_english_legal\ndate: 2023-02-17\ntags: [en, english, embeddings, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: en\nnav_key: models\nedition: Spark NLP 4.2.4\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: RoBertaEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-english-roberta-large` is a English model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/roberta_large_english_legal_en_4.2.4_3.0_1676644962452.zip){:.button.button-orange}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/roberta_large_english_legal_en_4.2.4_3.0_1676644962452.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\nsentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_english_legal\", \"en\")\\\n  .setInputCols([\"sentence\"])\\\n  .setOutputCol(\"embeddings\")\n```\n```scala\nval sentence_embeddings = RoBertaEmbeddings.pretrained(\"roberta_large_english_legal\", \"en\")\n  .setInputCols(\"sentence\")\n  .setOutputCol(\"embeddings\"))\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|roberta_large_english_legal|\n|Compatibility:|Spark NLP 4.2.4+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|1.3 GB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/joelito/legal-english-roberta-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"374C:11E74B:17BE6B:5E57FE:6AB92E40"},"text_sha256":"258d9de597f1c0209d6b017435c5f42e4dd34b74f87ebc4553b7e6002283ddc4"},{"path":"docs/_posts/Mary-Sci/2023-05-25-camembert_french_legal_fr.md","size":2832,"blob_sha":"19ea192a264009961153fb373184b3204224d872","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French Legal CamemBert Embeddings Model\nauthor: John Snow Labs\nname: camembert_french_legal\ndate: 2023-05-25\ntags: [open_source, camembert_embeddings, camembertformaskedlm, fr, tensorflow]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 4.4.2\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: CamemBertEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-camembert` is a French model originally trained by `maastrichtlawtech`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/camembert_french_legal_fr_4.4.2_3.0_1685035847575.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/camembert_french_legal_fr_4.4.2_3.0_1685035847575.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = CamemBertEmbeddings.pretrained(\"camembert_french_legal\",\"fr\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"J'adore Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval embeddings = CamemBertEmbeddings.pretrained(\"camembert_french_legal\",\"fr\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"J'adore Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|camembert_french_legal|\n|Compatibility:|Spark NLP 4.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|fr|\n|Size:|415.8 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/legal-camembert\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"671A:09BF:B3BB8:2E7A4B:6AB92E40"},"text_sha256":"8feee86a9418bd89c3ede82641af02968178df895c04899b5bb873583457eed1"},{"path":"docs/_posts/Mary-Sci/2023-05-25-distilcamembert_french_legal_fr.md","size":2886,"blob_sha":"d9e69189199f0edc02c118ae3cfa3579398b1d2f","priority":1,"status":200,"text":"---\nlayout: model\ntitle: French Legal DistilCamemBert Embeddings Model\nauthor: John Snow Labs\nname: distilcamembert_french_legal\ndate: 2023-05-25\ntags: [open_source, camembert_embeddings, camembertformaskedlm, fr, tensorflow]\ntask: Embeddings\nlanguage: fr\nedition: Spark NLP 4.4.2\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: CamemBertEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained CamemBertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-distilcamembert` is a French model originally trained by `maastrichtlawtech`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_fr_4.4.2_3.0_1685031800112.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilcamembert_french_legal_fr_4.4.2_3.0_1685031800112.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCol(\"text\") \\\n    .setOutputCol(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = CamemBertEmbeddings.pretrained(\"distilcamembert_french_legal\",\"fr\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n\npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"J'adore Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler()\n    .setInputCol(\"text\")\n    .setOutputCol(\"document\")\n\nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n\nval embeddings = CamemBertEmbeddings.pretrained(\"distilcamembert_french_legal\",\"fr\")\n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)\n\nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"J'adore Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|distilcamembert_french_legal|\n|Compatibility:|Spark NLP 4.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|fr|\n|Size:|256.1 MB|\n|Case sensitive:|true|\n\n## References\n\nhttps://huggingface.co/maastrichtlawtech/legal-distilcamembert\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"52FC:149227:183958:5ED4CB:6AB92E3F"},"text_sha256":"48a70741a16c178eb10ebbf9e41fa5ea2dd4b8e2a75b37120d535bbb2a19587e"},{"path":"docs/_posts/Mary-Sci/2023-05-28-longformer_base_english_legal_en.md","size":2947,"blob_sha":"88ff5b470c932db7953a4d1de0c7f5ef750a3585","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal Longformer Base Embeddings Model\nauthor: John Snow Labs\nname: longformer_base_english_legal\ndate: 2023-05-28\ntags: [en, longformerformaskedlm, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 4.4.2\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: LongformerEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Longformer Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-longformer-base` is a English model originally trained by `lexlms`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/longformer_base_english_legal_en_4.4.2_3.0_1685282124579.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/longformer_base_english_legal_en_4.4.2_3.0_1685282124579.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCols(\"text\") \\\n    .setOutputCols(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = LongformerEmbeddings.pretrained(\"longformer_base_english_legal\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n    .setInputCols(Array(\"text\")) \n    .setOutputCols(Array(\"document\"))\n      \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n \nval embeddings = LongformerEmbeddings.pretrained(\"longformer_base_english_legal\",\"en\") \n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)    \n   \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|longformer_base_english_legal|\n|Compatibility:|Spark NLP 4.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|561.6 MB|\n|Case sensitive:|true|\n|Max sentence length:|4096|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-longformer-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"08BE:3A3DD:17B3E9:5E4EBD:6AB92E41"},"text_sha256":"17010ab1b2755c9939353d2f775bd4654eade19013c4a5067828844c85e953ff"},{"path":"docs/_posts/Mary-Sci/2023-05-28-longformer_large_english_legal_en.md","size":2960,"blob_sha":"1892e2e093f9809598ed203ff4f52b98bf896559","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal Longformer Large Embeddings Model\nauthor: John Snow Labs\nname: longformer_large_english_legal\ndate: 2023-05-28\ntags: [en, longformerformaskedlm, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 4.4.2\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: LongformerEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal Longformer Large Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-longformer-large` is a English model originally trained by `lexlms`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/longformer_large_english_legal_en_4.4.2_3.0_1685289330980.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/longformer_large_english_legal_en_4.4.2_3.0_1685289330980.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCols(\"text\") \\\n    .setOutputCols(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = LongformerEmbeddings.pretrained(\"longformer_large_english_legal\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n    .setInputCols(Array(\"text\")) \n    .setOutputCols(Array(\"document\"))\n      \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n \nval embeddings = LongformerEmbeddings.pretrained(\"longformer_large_english_legal\",\"en\") \n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)    \n   \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|longformer_large_english_legal|\n|Compatibility:|Spark NLP 4.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|1.6 GB|\n|Case sensitive:|true|\n|Max sentence length:|4096|\n\n## References\n\nhttps://huggingface.co/lexlms/legal-longformer-large\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A9E:345ED4:17AD2C:5E4761:6AB92E41"},"text_sha256":"a2d90e68b58ca9ba318dc0d2295c81f59b5bbdc31a222fd3fab2437ab629d5b1"},{"path":"docs/_posts/Mary-Sci/2023-05-28-xlm_longformer_base_english_legal_en.md","size":2989,"blob_sha":"de8f8f11dc3e5bd73b7076c696f069f49d68b11e","priority":1,"status":200,"text":"---\nlayout: model\ntitle: English Legal XLM-Longformer Base Embeddings Model\nauthor: John Snow Labs\nname: xlm_longformer_base_english_legal\ndate: 2023-05-28\ntags: [en, longformerformaskedlm, transformer, open_source, legal, tensorflow]\ntask: Embeddings\nlanguage: en\nedition: Spark NLP 4.4.2\nspark_version: 3.0\nsupported: true\nengine: tensorflow\nannotator: LongformerEmbeddings\narticle_header:\ntype: cover\nuse_language_switcher: \"Python-Scala-Java\"\n---\n\n## Description\n\nPretrained Legal XLM-Longformer Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `legal-xlm-longformer-base` is a English model originally trained by `joelito`.\n\n{:.btn-box}\n<button class=\"button button-orange\" disabled>Live Demo<\/button>\n<button class=\"button button-orange\" disabled>Open in Colab<\/button>\n[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/xlm_longformer_base_english_legal_en_4.4.2_3.0_1685286936656.zip){:.button.button-orange.button-orange-trans.arr.button-icon}\n[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/xlm_longformer_base_english_legal_en_4.4.2_3.0_1685286936656.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}\n\n## How to use\n\n\n\n<div class=\"tabs-box\" markdown=\"1\">\n{% include programmingLanguageSelectScalaPythonNLU.html %}\n\n```python\ndocumentAssembler = DocumentAssembler() \\\n    .setInputCols(\"text\") \\\n    .setOutputCols(\"document\")\n\ntokenizer = Tokenizer() \\\n    .setInputCols(\"document\") \\\n    .setOutputCol(\"token\")\n\nembeddings = LongformerEmbeddings.pretrained(\"xlm_longformer_base_english_legal\",\"en\") \\\n    .setInputCols([\"document\", \"token\"]) \\\n    .setOutputCol(\"embeddings\") \\\n    .setCaseSensitive(True)\n    \npipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])\n\ndata = spark.createDataFrame([[\"I love Spark NLP\"]]).toDF(\"text\")\n\nresult = pipeline.fit(data).transform(data)\n```\n```scala\nval documentAssembler = new DocumentAssembler() \n    .setInputCols(Array(\"text\")) \n    .setOutputCols(Array(\"document\"))\n      \nval tokenizer = new Tokenizer()\n    .setInputCols(\"document\")\n    .setOutputCol(\"token\")\n \nval embeddings = LongformerEmbeddings.pretrained(\"xlm_longformer_base_english_legal\",\"en\") \n    .setInputCols(Array(\"document\", \"token\"))\n    .setOutputCol(\"embeddings\")\n    .setCaseSensitive(True)    \n   \nval pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))\n\nval data = Seq(\"I love Spark NLP\").toDS.toDF(\"text\")\n\nval result = pipeline.fit(data).transform(data)\n```\n<\/div>\n\n{:.model-param}\n## Model Information\n\n{:.table-model}\n|---|---|\n|Model Name:|xlm_longformer_base_english_legal|\n|Compatibility:|Spark NLP 4.4.2+|\n|License:|Open Source|\n|Edition:|Official|\n|Input Labels:|[sentence, token]|\n|Output Labels:|[embeddings]|\n|Language:|en|\n|Size:|788.6 MB|\n|Case sensitive:|true|\n|Max sentence length:|4096|\n\n## References\n\nhttps://huggingface.co/joelito/legal-xlm-longformer-base\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D28:3FD49:17A4E4:5E402C:6AB92E41"},"text_sha256":"da5e226bfd03cf9049602a0aa4b46895a6c8657302bb56aedea38957ef060984"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":0,"D1_evidence":"sha=fcede1de1962b215026c1757d7c054e6d99bb9fe; file=docs/_posts/ahmedlone127/2023-10-27-bert_small_finetuned_eoir_privacy_en.md; text=Open in Colab [Download]( ){:.button.button-orange.button-orange-trans.arr.button-icon} [Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_small_finetuned_eoir_privacy_en_5.1.4_3.4_1698380605530.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} ## How to use {% include programmingLanguageSelectScalaPythonNLU.html %}","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":[]}}}
{"repository":"hunspell/hunspell","input_row":{"repository":"hunspell/hunspell","url":"https://github.com/hunspell/hunspell","name":"hunspell","owner":"hunspell","description":"The most popular spellchecking library.","language":"C++","license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1","license_osi_approved":"true","stars":2595,"issues":764,"created_at":"2015-06-11T11:57:22Z","updated_at":"2026-09-27T13:29:41Z","first_commit_at":"2010-02-23T09:08:57Z","last_commit_at":"2026-09-27T13:27:58Z","activity_months":199.09,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:40.304Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hunspell/hunspell","visibility":"public","created_at":"2015-06-11T11:57:22Z","updated_at":"2026-09-27T14:52:13Z","private":false,"fork":false,"archived":false,"stargazers_count":2595,"open_issues_count":103,"license_spdx_id":"LGPL-2.1","license_name":"GNU Lesser General Public License v2.1"},"error":"","rate":{"github_remaining":"1493","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079E:14A1F2:183347A:1C5DC6C:6AB92E6C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1492","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C4:380E1C:17F5A88:1C1F2CA:6AB92E6C"},"commit":{"sha":"f6cb720938ad8afd36fa08dd9dbc0b6c5882cb68","url":"https://github.com/hunspell/hunspell/commit/f6cb720938ad8afd36fa08dd9dbc0b6c5882cb68","date":"2018-05-17T12:19:19Z","author_date":"2018-05-17T12:14:19Z","committer_date":"2018-05-17T12:19:19Z","tree_sha":"13aee8702a1771338f1e1cd914ce29695512d771","message_first_line":"makealias: --minimize-diff: reuse free positions"},"tree_request_status":200,"tree_rate":{"github_remaining":"1491","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C6:767EB:18183AA:1C42FF7:6AB92E6D"},"tree_truncated":false,"document_candidates":[{"path":"README","size":9,"blob_sha":"42061c01a1c70097d1e4579f29a5adf40abdec95","priority":0},{"path":"README.md","size":7328,"blob_sha":"0592b4512870234f2a1510bc3d7a0d092f52085b","priority":0}],"documents":[{"path":"README","size":9,"blob_sha":"42061c01a1c70097d1e4579f29a5adf40abdec95","priority":0,"status":200,"text":"README.md","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B532:376DE:1829C0:5ECAAF:6AB92E6D"},"text_sha256":"b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5"},{"path":"README.md","size":7328,"blob_sha":"0592b4512870234f2a1510bc3d7a0d092f52085b","priority":0,"status":200,"text":"# About Hunspell\n\nHunspell is a spell checker and morphological analyzer library and\nprogram designed for languages with rich morphology and complex word\ncompounding or character encoding. Hunspell interfaces: Ispell-like\nterminal interface using Curses library, Ispell pipe interface, C++\nclass and C functions.\n\nHunspell's code base comes from the OpenOffice.org MySpell\n(http://lingucomponent.openoffice.org/MySpell-3.zip). See\nREADME.MYSPELL, AUTHORS.MYSPELL and license.myspell files. Hunspell is\ndesigned to eventually replace Myspell in OpenOffice.org.\n\nMain features of Hunspell spell checker and morphological analyzer:\n\n  - Unicode support (affix rules work only with the first 65535 Unicode\n    characters)\n  - Morphological analysis (in custom item and arrangement style) and\n    stemming\n  - Max. 65535 affix classes and twofold affix stripping (for\n    agglutinative languages, like Azeri, Basque, Estonian, Finnish,\n    Hungarian, Turkish, etc.)\n  - Support complex compounds (for example, Hungarian and German)\n  - Support language specific features (for example, special casing of\n    Azeri and Turkish dotted i, or German sharp s)\n  - Handle conditional affixes, circumfixes, fogemorphemes, forbidden\n    words, pseudoroots and homonyms.\n  - Free software. Versions 1.x are licenced under LGPL, GPL, MPL\n    tri-license. Version 2 is licenced only under GNU LGPL.\n\n# Dependencies\n\nBuild only dependencies:\n\n    g++ make autoconf automake autopoint libtool\n\nRuntime dependencies:\n\n|               | Mandatory        |Optional          |\n|---------------|------------------|------------------|\n|libhunspell 1  |                  |                  |\n|cmd line tool 1| libiconv gettext | ncurses readline |\n    \nRecommended tools for developers:\n\n    vim qtcreator clang-format cppcheck gdb libtool-bin doxygen plantuml\n\n# Compiling on GNU/Linux and Unixes\n\nWe first need to download the dependencies. On Linux, `gettext` and\n`libiconv` are part of the standard library. On other Unixes we\nneed to manually install them.\n\nFor Ubuntu:\n\n    sudo apt install autoconf automake autopoint libtool libboost-locale-dev \\\n                     libboost-system-dev\n\nThen run the following commands:\n\n    autoreconf -vfi\n    ./configure\n    make\n    sudo make install\n    sudo ldconfig\n\nFor dictionary development, use the `--with-warnings` option of\nconfigure.\n\nFor interactive user interface of Hunspell executable, use the\n`--with-ui option`.\n\nOptional developer packages:\n\n  - ncurses (need for --with-ui), eg. libncursesw5 for UTF-8\n  - readline (for fancy input line editing, configure parameter:\n    --with-readline)\n\nIn Ubuntu, the packages are:\n\n    libncurses5-dev libreadline-dev\n\n# Compiling on OSX and macOS\n\nOn macOS for compiler always use `clang` and not `g++` because Homebrew\ndependencies are build with that.\n\n    brew install autoconf automake libtool gettext boost\n    brew link gettext --force\n\nThen run the standard trio: autoreconf, configure, make. See above.\n\n# Compiling on Windows\n\n## 1\\. Compiling with Mingw64 and MSYS2\n\nDownload Msys2, update everything and install the following\n    packages:\n\n    pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool \\\n              mingw-w64-x86_64-boost\n\nOpen Mingw-w64 Win64 prompt and compile the same way as on Linux, see\nabove.\n\n## 2\\. Compiling in Cygwin environment\n\nDownload and install Cygwin environment for Windows with the following\nextra packages:\n\n  - make\n  - automake\n  - autoconf\n  - libtool\n  - gcc-g++ development package\n  - boost\n  - ncurses, readline (for user interface)\n  - iconv (character conversion)\n\nThen compile the same way as on Linux. Cygwin builds depend on\nCygwin1.dll.\n\n# Debugging\n\nIt is recommended to install a debug build of the standard library:\n\n    libstdc++6-6-dbg\n\nFor debugging we need to create a debug build and then we need to start\n`gdb`.\n\n    ./configure CXXFLAGS='-g -O0 -Wall -Wextra'\n    make\n    ./libtool --mode=execute gdb src/tools/hunspell\n\nYou can also pass the `CXXFLAGS` directly to `make` without calling\n`./configure`, but we don't recommend this way during long development\nsessions.\n\nIf you like to develop and debug with an IDE, see documentation at\nhttps://github.com/hunspell/hunspell/wiki/IDE-Setup\n\n# Testing\n\nTesting Hunspell (see tests in tests/ subdirectory):\n\n    make check\n\nor with Valgrind debugger:\n\n    make check\n    VALGRIND=[Valgrind_tool] make check\n\nFor example:\n\n    make check\n    VALGRIND=memcheck make check\n\n# Documentation\n\nfeatures and dictionary format:\n\n    man 5 hunspell\n    man hunspell\n    hunspell -h\n\nhttp://hunspell.github.io/\n\nDocumentation for developers can be generated from the source files by running:\n\n    doxygen\n\nThe result can be viewed by opening `doxygen/html/index.html` in a web browser.\nDoxygen will use Graphviz for generating all sorts of graphs and PlantUML\nfor generating UML diagrams. Make sure that the packages plantuml and graphviz are installed before running Doxygen. The latter is usually installed automatically\nwhen installing Doxygen.\n\n# Usage\n\nThe src/tools directory contains ten executables after compiling.\n\n  - The main executable:\n      - hunspell: main program for spell checking and others (see\n        manual)\n  - Example tools:\n      - analyze: example of spell checking, stemming and morphological\n        analysis\n      - chmorph: example of automatic morphological generation and\n        conversion\n      - example: example of spell checking and suggestion\n  - Tools for dictionary development:\n      - affixcompress: dictionary generation from large (millions of\n        words) vocabularies\n      - makealias: alias compression (Hunspell only, not back compatible\n        with MySpell)\n      - wordforms: word generation (Hunspell version of unmunch)\n      - hunzip: decompressor of hzip format\n      - hzip: compressor of hzip format\n      - munch (DEPRECATED, use affixcompress): dictionary generation\n        from vocabularies (it needs an affix file, too).\n      - unmunch (DEPRECATED, use wordforms): list all recognized words\n        of a MySpell dictionary\n\nAfter compiling and installing (see INSTALL) you can run the Hunspell\nspell checker (compiled with user interface) with a Hunspell or Myspell\ndictionary:\n\n    hunspell -d en_US text.txt\n\nor without interface:\n\n    hunspell\n    hunspell -d en_UK -l <text.txt\n\nDictionaries consist of an affix and dictionary file, see tests/ or\nhttp://wiki.services.openoffice.org/wiki/Dictionaries.\n\n# Using Hunspell library with GCC\n\nIncluding in your program:\n\n    #include <hunspell.hxx>\n\nLinking with Hunspell static library:\n\n    g++ -lhunspell-1.6 example.cxx\n    # or better, use pkg-config\n    g++ $(pkg-config --cflags --libs hunspell) example.cxx\n\n## Dictionaries\n\nMyspell & Hunspell dictionaries:\n\n  - https://github.com/hunspell/hunspell/wiki/Dictionaries-and-Contacts\n  - https://github.com/hunspell/hunspell/wiki/Dictionary-Packages\n  - http://extensions.libreoffice.org\n  - http://cgit.freedesktop.org/libreoffice/dictionaries\n  - http://extensions.openoffice.org\n  - http://wiki.services.openoffice.org/wiki/Dictionaries\n\nAspell dictionaries (need some conversion):\n\n  - ftp://ftp.gnu.org/gnu/aspell/dict\n\nConversion steps: see relevant feature request at\nhttp://hunspell.github.io/ .\n\nLászló Németh, nemeth at numbertext org\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AE0:3AC5A:18110C:5EB095:6AB92E66"},"text_sha256":"227504da5374bd42a28f145d463f203f53ddb1222bd7eab73d7461daf24bb260"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1490","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0813:71F98:1859961:1C83C2B:6AB92E6E"},"commit":{"sha":"c83e53fc456a14ff9bb0c572f7d688e88b346b75","url":"https://github.com/hunspell/hunspell/commit/c83e53fc456a14ff9bb0c572f7d688e88b346b75","date":"2026-06-15T10:35:51Z","author_date":"2026-06-15T09:29:56Z","committer_date":"2026-06-15T10:35:51Z","tree_sha":"a851d0c0f5a759b2d64691f36330ef3ba6990512","message_first_line":"Resolves #910 honour -p personal dictionary when HOME is unset"},"tree_request_status":200,"tree_rate":{"github_remaining":"1489","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0825:37D6E2:1831D66:1C5C68B:6AB92E6E"},"tree_truncated":false,"document_candidates":[{"path":"README","size":9,"blob_sha":"42061c01a1c70097d1e4579f29a5adf40abdec95","priority":0},{"path":"README.md","size":11834,"blob_sha":"5d462181e6a35d7b494078b839768734a1d45d07","priority":0}],"documents":[{"path":"README","size":9,"blob_sha":"42061c01a1c70097d1e4579f29a5adf40abdec95","priority":0,"status":200,"text":"README.md","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B532:376DE:1829C0:5ECAAF:6AB92E6D"},"text_sha256":"b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5"},{"path":"README.md","size":11834,"blob_sha":"5d462181e6a35d7b494078b839768734a1d45d07","priority":0,"status":200,"text":"# About Hunspell\n\nHunspell is a free spell checker and morphological analyzer library\nand command-line tool, licensed under LGPL/GPL/MPL tri-license.\n\nHunspell is used by LibreOffice office suite, free browsers, like\nMozilla Firefox and Google Chrome, and other tools and OSes, like\nLinux distributions and macOS. It is also a command-line tool for\nLinux, Unix-like and other OSes.\n\nIt is designed for quick and high quality spell checking and\ncorrecting for languages with word-level writing system,\nincluding languages with rich morphology, complex word compounding\nand character encoding.\n\nHunspell interfaces: Ispell-like terminal interface using Curses\nlibrary, Ispell pipe interface, C++/C APIs and shared library, also\nwith existing language bindings for other programming languages.\n\nHunspell's code base comes from OpenOffice.org's MySpell library,\ndeveloped by Kevin Hendricks (originally a C++ reimplementation of\nspell checking and affixation of Geoff Kuenning's International\nIspell from scratch, later extended with eg. n-gram suggestions),\nsee http://lingucomponent.openoffice.org/MySpell-3.zip, and\nits README, CONTRIBUTORS and license.readme (here: license.myspell) files.\n\nMain features of Hunspell library, developed by László Németh:\n\n  - Unicode support\n  - Highly customizable suggestions: word-part replacement tables and\n    stem-level phonetic and other alternative transcriptions to recognize\n    and fix all typical misspellings, don't suggest offensive words etc.\n  - Complex morphology: dictionary and affix homonyms; twofold affix\n    stripping to handle inflectional and derivational morpheme groups for\n    agglutinative languages, like Azeri, Basque, Estonian, Finnish, Hungarian,\n    Turkish; 64 thousand affix classes with arbitrary number of affixes;\n    conditional affixes, circumfixes, fogemorphemes, zero morphemes,\n    virtual dictionary stems, forbidden words to avoid overgeneration etc.\n  - Handling complex compounds (for example, for Finno-Ugric, German and\n    Indo-Aryan languages): recognizing compounds made of arbitrary\n    number of words, handle affixation within compounds etc.\n  - Custom dictionaries with affixation\n  - Stemming\n  - Morphological analysis (in custom item and arrangement style)\n  - Morphological generation\n  - SPELLML XML API over plain spell() API function for easier integration\n    of stemming, morpological generation and custom dictionaries with affixation\n  - Language specific algorithms, like special casing of Azeri or Turkish\n    dotted i and German sharp s, and special compound rules of Hungarian.\n\nMain features of Hunspell command line tool, developed by László Németh:\n\n  - Reimplementation of quick interactive interface of Geoff Kuenning's Ispell\n  - Parsing formats: text, OpenDocument, TeX/LaTeX, HTML/SGML/XML, nroff/troff\n  - Custom dictionaries with optional affixation, specified by a model word\n  - Multiple dictionary usage (for example hunspell -d en_US,de_DE,de_medical)\n  - Various filtering options (bad or good words/lines)\n  - Morphological analysis (option -m)\n  - Stemming (option -s)\n\nSee man hunspell, man 3 hunspell, man 5 hunspell for complete manual.\n\nTranslations: Hunspell has been translated into several languages already. If your language is missing or incomplete, please use [Weblate](https://hosted.weblate.org/engage/hunspell/) to help translate Hunspell.\n\n<a href=\"https://hosted.weblate.org/engage/hunspell/\">\n<img src=\"https://hosted.weblate.org/widgets/hunspell/-/translations/horizontal-auto.svg\" alt=\"Stanje prijevoda\" />\n<\/a>\n\n# Dependencies\n\nBuild only dependencies:\n\n    g++ make autoconf automake autopoint libtool\n\nRuntime dependencies:\n\n|               | Mandatory        | Optional         |\n|---------------|------------------|------------------|\n|libhunspell    |                  |                  |\n|hunspell tool  | libiconv gettext | ncurses readline |\n\n# Compiling on GNU/Linux and Unixes\n\nWe first need to download the dependencies. On Linux, `gettext` and\n`libiconv` are part of the standard library. On other Unixes we\nneed to manually install them.\n\nFor Ubuntu:\n\n    sudo apt install autoconf automake autopoint libtool\n\nThen run the following commands:\n\n    autoreconf -vfi\n    ./configure\n    make\n    sudo make install\n    sudo ldconfig\n\nFor a non-root install, use `DESTDIR` so libtool skips `ldconfig`:\n\n    make install DESTDIR=\"$HOME/hunspell-root\"\n\nFor dictionary development, use the `--with-warnings` option of\nconfigure.\n\nFor interactive user interface of Hunspell executable, use the\n`--with-ui` option.\n\nOptional developer packages:\n\n  - ncurses (need for --with-ui), eg. libncursesw5 for UTF-8\n  - readline (for fancy input line editing, configure parameter:\n    --with-readline)\n\nIn Ubuntu, the packages are:\n\n    libncurses5-dev libreadline-dev\n\n# Compiling on OSX and macOS\n\nOn macOS for compiler always use `clang` and not `g++` because Homebrew\ndependencies are build with that.\n\n    brew install autoconf automake libtool gettext\n    brew link gettext --force\n\nThen run:\n\n    autoreconf -vfi\n    ./configure\n    make\n    sudo make install\n\n# Compiling on Windows\n\n## Compiling with Mingw64 and MSYS2\n\nDownload Msys2, update everything and install the following\n    packages:\n\n    pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool \\\n              mingw-w64-x86_64-libiconv mingw-w64-x86_64-gettext\n\nOpen Mingw-w64 Win64 prompt and compile the same way as on Linux, see\nabove. Without `mingw-w64-x86_64-libiconv` the build still succeeds but\nthe `hunspell` tool cannot convert between dictionary encodings, so any\ntest or dictionary that declares a non-UTF-8 `SET` (e.g. ISO8859-1/2/15)\nwill fail at runtime.\n\n## Compiling in Cygwin environment\n\nDownload and install Cygwin environment for Windows with the following\nextra packages:\n\n  - make\n  - automake\n  - autoconf\n  - libtool\n  - gcc-g++ development package\n  - ncurses, readline (for user interface)\n  - iconv (character conversion)\n\nThen compile the same way as on Linux. Cygwin builds depend on\nCygwin1.dll.\n\n# Debugging\n\nIt is recommended to install a debug build of the standard library:\n\n    libstdc++6-6-dbg\n\nFor debugging we need to create a debug build and then we need to start\n`gdb`.\n\n    ./configure CXXFLAGS='-g -O0 -Wall -Wextra'\n    make\n    ./libtool --mode=execute gdb src/tools/hunspell\n\nYou can also pass the `CXXFLAGS` directly to `make` without calling\n`./configure`, but we don't recommend this way during long development\nsessions.\n\nIf you like to develop and debug with an IDE, see documentation at\nhttps://github.com/hunspell/hunspell/wiki/IDE-Setup\n\n# Testing\n\nTesting Hunspell (see tests in tests/ subdirectory):\n\n    make check\n\nor with Valgrind debugger:\n\n    make check\n    VALGRIND=[Valgrind_tool] make check\n\nFor example:\n\n    make check\n    VALGRIND=memcheck make check\n\n# Documentation\n\nfeatures and dictionary format:\n\n    man 5 hunspell\n    man hunspell\n    hunspell -h\n\nhttp://hunspell.github.io/\n\n# Usage\n\nAfter compiling and installing (see INSTALL) you can run the Hunspell\nspell checker (compiled with user interface) with a Hunspell or Myspell\ndictionary:\n\n    hunspell -d en_US text.txt\n\nor without interface:\n\n    hunspell\n    hunspell -d en_GB -l <text.txt\n\nDictionaries consist of an affix (.aff) and dictionary (.dic) file, for\nexample, download American English dictionary files of LibreOffice\n(older version, but with stemming and morphological generation) with\n\n    wget -O en_US.aff  https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.aff?id=a4473e06b56bfe35187e302754f6baaa8d75e54f\n    wget -O en_US.dic https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.dic?id=a4473e06b56bfe35187e302754f6baaa8d75e54f\n\nand with command line input and output, it's possible to check its work quickly,\nfor example with the input words \"example\", \"examples\", \"teached\" and\n\"verybaaaaaaaaaaaaaaaaaaaaaad\":\n\n    $ hunspell -d en_US\n    Hunspell 1.7.0\n    example\n    *\n\n    examples\n    + example\n\n    teached\n    & teached 9 0: taught, teased, reached, teaches, teacher, leached, beached\n\n    verybaaaaaaaaaaaaaaaaaaaaaad\n    # verybaaaaaaaaaaaaaaaaaaaaaad 0\n\nWhere in the output, `*` and `+` mean correct (accepted) words (`*` = dictionary stem,\n`+` = affixed forms of the following dictionary stem), and\n`&` and `#` mean bad (rejected) words (`&` = with suggestions, `#` = without suggestions)\n(see man hunspell).\n\nExample for stemming:\n\n    $ hunspell -d en_US -s\n    mice\n    mice mouse\n\nExample for morphological analysis (very limited with this English dictionary):\n\n    $ hunspell -d en_US -m\n    mice\n    mice  st:mouse ts:Ns\n\n    cats\n    cats  st:cat ts:0 is:Ns\n    cats  st:cat ts:0 is:Vs\n\n# Other executables\n\nThe src/tools directory contains the following executables after compiling.\n\n  - The main executable:\n      - hunspell: main program for spell checking and others (see\n        manual)\n  - Example tools:\n      - analyze: example of spell checking, stemming and morphological\n        analysis\n      - chmorph: example of automatic morphological generation and\n        conversion\n      - example: example of spell checking and suggestion\n  - Tools for dictionary development:\n      - affixcompress: dictionary generation from large (millions of\n        words) vocabularies\n      - makealias: alias compression (Hunspell only, not back compatible\n        with MySpell)\n      - wordforms: word generation (Hunspell version of unmunch)\n      - hunzip: decompressor of hzip format\n      - hzip: compressor of hzip format\n      - munch (DEPRECATED, use affixcompress): dictionary generation\n        from vocabularies (it needs an affix file, too).\n      - unmunch (DEPRECATED, use wordforms): list all recognized words\n        of a MySpell dictionary\n\nExample for morphological generation:\n\n    $ ~/hunspell/src/tools/analyze en_US.aff en_US.dic /dev/stdin\n    cat mice\n    generate(cat, mice) = cats\n    mouse cats\n    generate(mouse, cats) = mice\n    generate(mouse, cats) = mouses\n\nNote: morphological generation, stemming and analysis only work with\ndictionaries whose entries carry morphological description fields\n(`po:`, `st:`, `is:`, `ts:`, `al:`, `ds:`, `dp:` etc.; see man hunspell.5).\nThe example above relies on the older en_US dictionary linked earlier in\nthis README, which still ships these fields. Most current distributions\nof en_US, fr, nl and hu_HU do not, and `analyze`, `stem` and `generate`\nwill return empty results for them. This is a dictionary property, not\na library bug. See `tests/morph.aff` and `tests/morph.dic` for a minimal\nexample.\n\n# Using Hunspell library with GCC\n\nIncluding in your program:\n\n    #include <hunspell.hxx>\n\nLinking with Hunspell static library:\n\n    g++ -lhunspell-1.7 example.cxx\n    # or better, use pkg-config\n    g++ $(pkg-config --cflags --libs hunspell) example.cxx\n\n# Installing Hunspell (vcpkg)\n\nAlternatively, you can build and install hunspell using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:\n\n    git clone https://github.com/Microsoft/vcpkg.git\n    cd vcpkg\n    ./bootstrap-vcpkg.sh\n    ./vcpkg integrate install\n    ./vcpkg install hunspell\n\nThe hunspell port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\n## Dictionaries\n\nHunspell (MySpell) dictionaries:\n\n  - https://wiki.documentfoundation.org/Language_support_of_LibreOffice\n  - http://cgit.freedesktop.org/libreoffice/dictionaries\n  - http://extensions.libreoffice.org\n  - https://extensions.openoffice.org\n  - https://wiki.openoffice.org/wiki/Dictionaries\n\nAspell dictionaries (conversion: man 5 hunspell):\n\n  - ftp://ftp.gnu.org/gnu/aspell/dict\n\nLászló Németh, nemeth at numbertext org\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E838:24970A:18694B:5F06E9:6AB92E6F"},"text_sha256":"59238c5387ad679b8e6fc53478132fe345aee93b7cb8f578e080ad2677a02b2c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"nltk/nltk_data","input_row":{"repository":"nltk/nltk_data","url":"https://github.com/nltk/nltk_data","name":"nltk_data","owner":"nltk","description":"NLTK Data","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1832,"issues":151,"created_at":"2012-05-10T10:44:20Z","updated_at":"2026-09-22T04:31:31Z","first_commit_at":"2012-05-10T10:46:44Z","last_commit_at":"2026-07-01T00:40:19Z","activity_months":169.66,"ai_ml_match_topics":"natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:43.963Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"nltk/nltk_data","visibility":"public","created_at":"2012-05-10T10:44:20Z","updated_at":"2026-09-22T04:31:31Z","private":false,"fork":false,"archived":false,"stargazers_count":1832,"open_issues_count":52,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1488","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0899:725A9:18000E0:1C2ABF0:6AB92E70"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1487","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092C:6E429:180809E:1C326B3:6AB92E70"},"commit":{"sha":"abdfe67cef336d75ab0535203bec1fc99f289a28","url":"https://github.com/nltk/nltk_data/commit/abdfe67cef336d75ab0535203bec1fc99f289a28","date":"2018-05-14T03:45:38Z","author_date":"2018-05-14T03:45:38Z","committer_date":"2018-05-14T03:45:38Z","tree_sha":"ff27d3470400f98c2182658e2c1410cad006b3bf","message_first_line":"add verbnet 3.3, cf https://github.com/nltk/nltk/issues/2015"},"tree_request_status":200,"tree_rate":{"github_remaining":"1486","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EC:6C6ED:18151E6:1C3F355:6AB92E70"},"tree_truncated":false,"document_candidates":[{"path":"README.txt","size":127,"blob_sha":"0a1b3f058a7b3ab1af8c535bd2dad21299578660","priority":0}],"documents":[{"path":"README.txt","size":127,"blob_sha":"0a1b3f058a7b3ab1af8c535bd2dad21299578660","priority":0,"status":200,"text":"Data Distribution for NLTK\n\nInstall using NLTK downloader: nltk.download()\n\nFor instructions please see http://www.nltk.org/\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4652:35999:17B6A0:5E578B:6AB92E71"},"text_sha256":"fc737e60cd697dada3dc84380626bb2f3155065a077196510b865ed58223979e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1485","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E9:0AC4:12B9576:1613B6F:6AB92E71"},"commit":{"sha":"ff39ad241f7c021e3d4e277dd11bf17e268dba30","url":"https://github.com/nltk/nltk_data/commit/ff39ad241f7c021e3d4e277dd11bf17e268dba30","date":"2026-06-29T08:18:24Z","author_date":"2026-06-29T08:18:24Z","committer_date":"2026-06-29T08:18:24Z","tree_sha":"5ebe69dbc6dff923f8130fe067fe817c31a4b2ba","message_first_line":"Add OMW-2.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1484","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088B:14A1F2:1833810:1C5E09B:6AB92E71"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1685,"blob_sha":"f1f455176660e209d606ac2803a1af355dbb94af","priority":0}],"documents":[{"path":"README.md","size":1685,"blob_sha":"f1f455176660e209d606ac2803a1af355dbb94af","priority":0,"status":200,"text":"# Data Distribution for NLTK\n\nThis repository contains data packages (corpora, models, tokenizers, etc.) for use with [NLTK](https://www.nltk.org/).\n\n## Installation\n\nTo install data using the NLTK downloader, run:\n\n```python\nimport nltk\nnltk.download()\n```\n\nFor detailed instructions, please see the [NLTK website](https://www.nltk.org/).\n\n---\n\n## Recent Enhancements\n\n> **Note:** You do not need to update `index.xml` when adding or modifying packages. It is automatically rebuilt after changes are merged.\n\n### Licensing Transparency ([PR #242](https://github.com/nltk/nltk_data/pull/242))\n- Added a top-level `LICENSE` (Apache License 2.0) for the repository.\n- Added `LICENSE-OVERVIEW.md` summarizing the licensing structure, with emphasis on the diversity of dataset licenses and the importance of reviewing individual terms.\n- Added `DATASET-LICENSES.md` — a comprehensive, grouped list of all data packages and their licenses, highlighting any ambiguous or unclarified licensing.\n- These changes improve transparency, support responsible use, and aid compliance for all users.\n\n### Contribution Guidelines\n- Introduced a detailed `CONTRIBUTING.md` with step-by-step instructions for adding a new data package using Git and GitHub.\n- Please see `CONTRIBUTING.md` for instructions on adding datasets and making other contributions.\n- Contributors are encouraged to clarify dataset licenses and to consult the new licensing overview and dataset license table.\n\n---\n\n*For instructions on adding new data packages, please see [CONTRIBUTING.md](CONTRIBUTING.md). For licensing details, see [LICENSE-OVERVIEW.md](LICENSE-OVERVIEW.md) and [DATASET-LICENSES.md](DATASET-LICENSES.md).*","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B548:375F4:17DD6D:5E7EF7:6AB92E70"},"text_sha256":"c15eb1477201863e4ec02afe48dccf3490c4374b4fbb1fc3b1ce90809dc7cd24"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"boudinfl/pke","input_row":{"repository":"boudinfl/pke","url":"https://github.com/boudinfl/pke","name":"pke","owner":"boudinfl","description":"Python Keyphrase Extraction module","language":"Python","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1591,"issues":147,"created_at":"2015-11-13T08:11:45Z","updated_at":"2026-09-11T02:10:03Z","first_commit_at":"2015-11-13T08:11:28Z","last_commit_at":"2023-07-12T16:18:04Z","activity_months":91.930000000000007,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:46.534Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"boudinfl/pke","visibility":"public","created_at":"2015-11-13T08:11:45Z","updated_at":"2026-09-11T02:10:03Z","private":false,"fork":false,"archived":false,"stargazers_count":1591,"open_issues_count":4,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1483","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B9:754BF:17F2F00:1C1D6C1:6AB92E72"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1482","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0873:7418C:1839D4D:1C6442E:6AB92E72"},"commit":{"sha":"0f7e109eb3255ec933b71fe28d62f1529d4808d6","url":"https://github.com/boudinfl/pke/commit/0f7e109eb3255ec933b71fe28d62f1529d4808d6","date":"2018-05-11T07:57:42Z","author_date":"2018-05-11T07:57:42Z","committer_date":"2018-05-11T07:57:42Z","tree_sha":"1d03ad04fa34cb55cbfd3568f50eaaec8990e5ae","message_first_line":"Merge pull request #26 from boudinfl/python3"},"tree_request_status":200,"tree_rate":{"github_remaining":"1481","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0920:1DB627:1897F9D:1CC2A6B:6AB92E73"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14621,"blob_sha":"313f3a236e00b837083f5677aa38d1ea1c36dc58","priority":0}],"documents":[{"path":"README.md","size":14621,"blob_sha":"313f3a236e00b837083f5677aa38d1ea1c36dc58","priority":0,"status":200,"text":"# `pke` - python keyphrase extraction\n\n`pke` is an open source python-based keyphrase extraction toolkit. It provides\nan end-to-end keyphrase extraction pipeline in which each component can be\neasily modified or extented to develop new approaches. `pke` also allows for \neasy benchmarking of state-of-the-art keyphrase extraction approaches, and \nships with supervised models trained on the\n[SemEval-2010 dataset](http://aclweb.org/anthology/S10-1004).\n\n`pke` is compatible with Python 2.7 (Python 3.6 is WIP)\n\nIf you use `pke`, please cite the following paper:\n\n  * [Florian Boudin. **pke: an open source python-based keyphrase extraction toolkit**, *Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: System Demonstrations*](http://aclweb.org/anthology/C16-2015). [[bibtex](http://aclweb.org/anthology/C16-2015.bib)]\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Minimal example](#minimal-example)\n* [Usage](#usage)\n  - [Input formats](#input-formats)\n  - [Implemented models](#implemented-models)\n  - [Already trained supervised models](#already-trained-supervised-models)\n  - [Document Frequency counts](#document-frequency-counts)\n  - [Training supervised models](#training-supervised-models)\n  - [Extracting keyphrases from an input text](#extracting-keyphrases-from-an-input-text)\n* [Non English languages](#non-english-languages)\n* [Benchmarking](#benchmarking)\n* [Code documentation](#code-documentation)\n\n## Installation\n\nThe following modules are required:\n\n```bash\nnumpy\nscipy\nnltk\nnetworkx\nsklearn\nunidecode\nfuture\n```\n\nTo pip install `pke` from github:\n\n```bash\npip install git+https://github.com/boudinfl/pke.git\n```\n\n## Minimal example\n\n`pke` provides a standardized API for keyphrases from a document. Start by\ntyping the 5 lines below. For using another model, simply replace\n`pke.unsupervised.TopicRank` with another model ([list of implemented models](#implemented-models)).\n\n```python\nimport pke\n\n# initialize keyphrase extraction model, here TopicRank\nextractor = pke.unsupervised.TopicRank(input_file='/path/to/input')\n\n# load the content of the document, here document is expected to be in raw\n# format (i.e. a simple text file) and preprocessing is carried out using nltk\nextractor.read_document(format='raw')\n\n# keyphrase candidate selection, in the case of TopicRank: sequences of nouns\n# and adjectives\nextractor.candidate_selection()\n\n# candidate weighting, in the case of TopicRank: using a random walk algorithm\nextractor.candidate_weighting()\n\n# N-best selection, keyphrases contains the 10 highest scored candidates as\n# (keyphrase, score) tuples\nkeyphrases = extractor.get_n_best(n=10, stemming=False)\n```\n\nA detailed example is provided in the `examples/` directory.\n\n## Usage\n\n### Input formats\n\n`pke` currently supports the following input file formats (examples of formatted\ninput files are provided in the `examples/` directory):\n\n1. *raw text*: text preprocessing (i.e. tokenization, sentence splitting and \n   POS-tagging) is carried out using nltk. \n\n   Example of raw text:\n\n   ```\n   Efficient discovery of grid services is essential for the success of\n   grid computing. [...]\n   ```\n\n   To read raw text document:\n\n   ```python\n   extractor.read_document(format='raw')\n   ```\n\n2. *preprocessed text*: whitespace-separated POS-tagged tokens, one sentence per\n   line.\n\n   Example of preprocessed text:\n\n   ```\n   Efficient/NNP discovery/NN of/IN grid/NN services/NNS is/VBZ essential/JJ for/IN the/DT success/NN of/IN grid/JJ computing/NN ./.\n   [...]\n   ```\n\n   To read preprocessed text document:\n\n   ```python\n   extractor.read_document(format='preprocessed')\n   ```\n\n3. *Stanford XML CoreNLP*: output file produced using the annotators `tokenize`,\n   `ssplit`, `pos` and `lemma`. Document logical structure information can by\n   specified by incorporating attributes into the sentence elements of the\n   CoreNLP XML format.\n\n   Example of CoreNLP XML:\n\n   ```xml\n   <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n   <root>\n     <document>\n       <sentences>\n         <sentence id=\"1\" section=\"abstract\" type=\"bodyText\" confidence=\"0.925\">\n           <tokens>\n             <token id=\"1\">\n               <word>Efficient<\/word>\n               <lemma>efficient<\/lemma>\n               <CharacterOffsetBegin>362<\/CharacterOffsetBegin>\n               <CharacterOffsetEnd>371<\/CharacterOffsetEnd>\n               <POS>JJ<\/POS>\n             <\/token>\n             <token id=\"2\">\n               <word>discovery<\/word>\n               <lemma>discovery<\/lemma>\n               <CharacterOffsetBegin>372<\/CharacterOffsetBegin>\n               <CharacterOffsetEnd>381<\/CharacterOffsetEnd>\n               <POS>NN<\/POS>\n              <\/token>\n   [...]\n   ```\n\n   Here, the document logical structure information is added to the CoreNLP XML\n   output by the use of the `section`, `type` and `confidence` attributes. We\n   use the classification categories proposed by [Luong et al. (2012)](https://www.comp.nus.edu.sg/~kanmy/papers/ijdls-SectLabel.pdf).\n   In `pke`, document logical structure information is exploited by the WINGNUS\n   model and the following values are handled:\n\n   ```xml\n   section=\"title|abstract|introduction|related work|conclusions\"\n   type=\"sectionHeader|subsectionHeader|subsubsectionHeader|bodyText\"\n   ```\n\n   To read a CoreNLP XML document:\n\n   ```python\n   extractor.read_document(format='corenlp')\n   ```\n\n### Implemented models\n\n`pke` currently implements the following keyphrase extraction models:\n\n* Unsupervised models\n  * Statistical models\n    * [TfIdf](https://boudinfl.github.io/pke/build/html/unsupervised.html#tfidf)\n    * [KPMiner](https://boudinfl.github.io/pke/build/html/unsupervised.html#kpminer) [(El-Beltagy and Rafea, 2010)](http://www.aclweb.org/anthology/S10-1041.pdf)\n  * Graph-based models\n    * [SingleRank](https://boudinfl.github.io/pke/build/html/unsupervised.html#singlerank) [(Wan and Xiao, 2008)](http://www.aclweb.org/anthology/C08-1122.pdf)\n    * [TopicRank](https://boudinfl.github.io/pke/build/html/unsupervised.html#topicrank) [(Bougouin et al., 2013)](http://aclweb.org/anthology/I13-1062.pdf)\n    * [TopicalPageRank](https://boudinfl.github.io/pke/build/html/unsupervised.html#topicalpagerank) [(Sterckx et al., 2015)](http://users.intec.ugent.be/cdvelder/papers/2015/sterckx2015wwwb.pdf)\n    * [PositionRank](https://boudinfl.github.io/pke/build/html/unsupervised.html#positionrank) [(Florescu and Caragea, 2017)](http://www.aclweb.org/anthology/P17-1102.pdf)\n    * [MultipartiteRank](https://boudinfl.github.io/pke/build/html/unsupervised.html#multipartiterank) [(Boudin, 2018)](https://arxiv.org/abs/1803.08721)\n* Supervised models\n  * Feature-based models\n    * Kea [(Witten et al., 2005)](https://www.cs.waikato.ac.nz/ml/publications/2005/chap_Witten-et-al_Windows.pdf)\n    * WINGNUS [(Nguyen and Luong, 2010)](http://www.aclweb.org/anthology/S10-1035.pdf)\n\n### Already trained supervised models\n\n`pke` ships with a collection of already trained models (for supervised\nkeyphrase extraction approaches) and document frequency counts that were\ncomputed on the training set of the SemEval-2010 benchmark dataset. These\nare located into the `pke/models/` directory.\n\nFor details about the provided models, see [pke/models/README.md](pke/models/README.md).\n\n**These already trained models/DF counts are used by default if no parameters\nare given.**\n\n### Document Frequency counts\n\n`pke` ships with document frequency counts computed on the SemEval-2010\nbenchmark dataset. These counts are used in various models (TfIdf, KP-Miner,\nKea and WINGNUS). The following code illustrates how to compute new counts\nfrom another (or a larger) document collection:\n\n```python\nfrom pke import compute_document_frequency\nfrom string import punctuation\n\n# path to the collection of documents\ninput_dir = '/path/to/input/documents'\n\n# path to the DF counts dictionary, saved as a gzip tab separated values\noutput_file = '/path/to/output/'\n\n# compute df counts and store stem -> weight values\ncompute_document_frequency(input_dir=input_dir,\n                           output_file=output_file,\n                           format=\"corenlp\",            # input files format\n                           use_lemmas=False,    # do not use Stanford lemmas\n                           stemmer=\"porter\",            # use porter stemmer\n                           stoplist=list(punctuation),            # stoplist\n                           delimiter='\\t',            # tab separated output\n                           extension='xml',          # input files extension\n                           n=5)              # compute n-grams up to 5-grams\n```\n\nDF counts are stored as a ngram tab count file. The number of documents in the\ncollection, used to compute Inverse Document Frequency (IDF) weigths, is stored\nas an extra line --NB_DOC-- tab number_of_documents. Below is an example of such\na file:\n\n```bash\n--NB_DOC--  100\ngreedi alloc  1\nsinc trial structur 1\ncomplex question  1\n[...]\n```\n\nNewly computed DF counts should be loaded and given as parameter to \n`candidate_weighting()` for unsupervised models and `feature_extraction()` for\nsupervised models:\n\n```python\nimport pke\n\n# initialize TfIdf model\nextractor = pke.unsupervised.TfIdf(input_file='/path/to/input')\n\n# load the DF counts from file\ndf_counts = pke.load_document_frequency_file(input_file='/path/to/file')\n\n# load the content of the document\nextractor.read_document(format='raw')\n\n# keyphrase candidate selection\nextractor.candidate_selection()\n\n# candidate weighting with the provided DF counts\nextractor.candidate_weighting(df=df_counts)\n\n# N-best selection, keyphrases contains the 10 highest scored candidates as\n# (keyphrase, score) tuples\nkeyphrases = extractor.get_n_best(n=10)\n```\n\nA detailed example for computing new DF counts is given in\n`examples/compute-df-counts.py`.\n\n### Training supervised models\n\nHere is a minimal example for training a new supervised model:\n\n```python\nimport pke\n\n# load the DF counts from file\ndf_counts = pke.load_document_frequency_file('/path/to/file')\n\n# train a new Kea model\npke.train_supervised_model(input_dir='/path/to/input/documents/',\n                           reference_file='/path/to/reference/file',\n                           model_file='/path/to/model/file',\n                           df=df_counts,\n                           model=pke.supervised.Kea()) # here we train a Kea model\n```\n\nThe training data consists of a set of documents along with a reference file\ncontaining annotated keyphrases in the SemEval-2010 [format](http://docs.google.com/Doc?id=ddshp584_46gqkkjng4).\n\nA detailed example for training a supervised model is given in\n`examples/train-model.py`.\n\n### Extracting keyphrases from an input text\n\nWhile `pke` is first intended to process input files, it can be used to directly\nextract keyphrases from a given input text:\n\n```python\nimport pke\n\nextractor = pke.unsupervised.TopicRank()\n\ninput_text = u\"\"\"Keyphrase extraction is the task of identifying single or\n                 multi-word expressions that represent the main topics of a\n                 document. In this paper we present TopicRank, a graph-based\n                 keyphrase extraction method that relies on a topical\n                 representation of the document.\"\"\"\n\nextractor.read_text(input_text)\nextractor.candidate_selection()\nextractor.candidate_weighting()\nkeyphrases = extractor.get_n_best(n=10, stemming=False)\n```\n\n## Non English languages\n\nWhile the default language in `pke` is English, extracting keyphrases from\ndocuments in other languages is easily achieved by inputting already\npreprocessed documents, and setting the `language` parameter to the desired\nlanguage. The only language dependent resources used in `pke` are the stoplist\nand the stemming algorithm from `nltk` that is available in\n[11 languages](http://www.nltk.org/_modules/nltk/corpus.html).\n\nGiven an already preprocessed document (here in French):\n\n```\nFrance/NPP :/PONCT disparition/NC de/P Thierry/NPP Roland/NPP [...]\nLe/DET journaliste/NC et/CC commentateur/NC sportif/ADJ Thierry/NPP [...]\nCommentateur/NC mythique/ADJ des/P+D matchs/NC internationaux/ADJ [...]\n[...]\n```\n\nKeyphrase extraction can then be performed by:\n\n```python\nimport pke\n\n# initialize TopicRank and set the language to French (used during candidate\n# selection for filtering stopwords)\nextractor = pke.unsupervised.TopicRank(input_file='/path/to/input',\n                                       language='french')\n\n# load the content of the document and perform French stemming (instead of\n# Porter stemmer)\nextractor.read_document(format='preprocessed', stemmer='french')\n\n# keyphrase candidate selection, here sequences of nouns and adjectives\n# defined by the French POS tags NPP, NC and ADJ\nextractor.candidate_selection(pos=[\"NPP\", \"NC\", \"ADJ\"])\n\n# candidate weighting, here using a random walk algorithm\nextractor.candidate_weighting()\n\n# N-best selection, keyphrases contains the 10 highest scored candidates as\n# (keyphrase, score) tuples\nkeyphrases = extractor.get_n_best(n=10)\n```\n\n## Benchmarking\n\nWe evaluate the performance of our re-implementations using the SemEval-2010\nbenchmark dataset. This dataset is composed of 244 scientific articles (144 in\ntraining and 100 for test) collected from the ACM Digital Library (conference\nand workshop papers). Document logical structure information, required to\ncompute features in the WINGNUS approach, is annotated with\n[ParsCit](https://github.com/knmnyn/ParsCit). The [Stanford CoreNLP pipeline](http://stanfordnlp.github.io/CoreNLP/)\n(tokenization, sentence splitting and POS-tagging) is then applied to the\ndocuments from which irrelevant pieces of text (e.g. tables, equations,\nfootnotes) were filtered out. The dataset we use (lvl-2) can be found at\n[https://github.com/boudinfl/semeval-2010-pre](https://github.com/boudinfl/semeval-2010-pre).\n\nWe follow the evaluation procedure used in the SemEval-2010 competition and\nevaluate the performance of each implemented approach in terms of precision (P),\nrecall (R) and f-measure (F) at the top 10 keyphrases. We use the set of\ncombined (stemmed) author- and reader-assigned keyphrases as reference\nkeyphrases.\n\n| Approach   | P@10 | R@10 | F@10 |\n| ---------- | ---- | ---- | ---- |\n| TfIdf      | 20.0 | 14.1 | 16.4 |\n| TopicRank  | 15.6 | 10.8 | 12.6 |\n| SingleRank | 2.2  | 1.5  | 1.8  |\n| KP-Miner   | 24.1 | 17.0 | 19.8 |\n| Kea        | 23.5 | 16.6 | 19.3 |\n| WINGNUS    | 24.7 | 17.3 | 20.2 |\n\n## Code documentation\n\nFor code documentation, please visit [https://boudinfl.github.io/pke/](https://boudinfl.github.io/pke/).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BDD4:11E74B:17C0E1:5E602F:6AB92E73"},"text_sha256":"1dd5b488ed494917348275a403320e17eaa6238527b521e16b0575a387b97009"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1480","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0884:280FBC:17E2B99:1C0C0AC:6AB92E74"},"commit":{"sha":"69871ffdb720b83df23684fea53ec8776fd87e63","url":"https://github.com/boudinfl/pke/commit/69871ffdb720b83df23684fea53ec8776fd87e63","date":"2023-07-12T16:18:04Z","author_date":"2023-07-12T16:18:04Z","committer_date":"2023-07-12T16:18:04Z","tree_sha":"c1841b07caf630fd2b55a82e0fc99191126d205d","message_first_line":"Computing gap in TopicRank and MPRank never returns 0 (#229)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1479","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0839:74181:17A7F16:1BD275E:6AB92E74"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5264,"blob_sha":"30598e21ba6ef8cea0d73c40cebcc777ef72acf8","priority":0}],"documents":[{"path":"README.md","size":5264,"blob_sha":"30598e21ba6ef8cea0d73c40cebcc777ef72acf8","priority":0,"status":200,"text":"# `pke` - python keyphrase extraction\n\n`pke` is an **open source** python-based **keyphrase extraction** toolkit. It\nprovides an end-to-end keyphrase extraction pipeline in which each component can\nbe easily modified or extended to develop new models. `pke` also allows for \neasy benchmarking of state-of-the-art keyphrase extraction models, and \nships with supervised models trained on the\n[SemEval-2010 dataset](http://aclweb.org/anthology/S10-1004).\n\n![python-package workflow](https://github.com/boudinfl/pke/actions/workflows/python-package.yml/badge.svg)\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Minimal example](#minimal-example)\n* [Getting started](#getting-started)\n* [Implemented models](#implemented-models)\n* [Model performances](#model-performances)\n* [Citing pke](#citing-pke)\n\n## Installation\n\nTo pip install `pke` from github:\n\n```bash\npip install git+https://github.com/boudinfl/pke.git\n```\n\n`pke` relies on `spacy` (>= 3.2.3) for text processing and requires [models](https://spacy.io/usage/models) to be installed: \n\n```bash\n# download the english model\npython -m spacy download en_core_web_sm\n```\n\n## Minimal example\n\n`pke` provides a standardized API for extracting keyphrases from a document.\nStart by typing the 5 lines below. For using another model, simply replace\n`pke.unsupervised.TopicRank` with another model ([list of implemented models](#implemented-models)).\n\n```python\nimport pke\n\n# initialize keyphrase extraction model, here TopicRank\nextractor = pke.unsupervised.TopicRank()\n\n# load the content of the document, here document is expected to be a simple \n# test string and preprocessing is carried out using spacy\nextractor.load_document(input='text', language='en')\n\n# keyphrase candidate selection, in the case of TopicRank: sequences of nouns\n# and adjectives (i.e. `(Noun|Adj)*`)\nextractor.candidate_selection()\n\n# candidate weighting, in the case of TopicRank: using a random walk algorithm\nextractor.candidate_weighting()\n\n# N-best selection, keyphrases contains the 10 highest scored candidates as\n# (keyphrase, score) tuples\nkeyphrases = extractor.get_n_best(n=10)\n```\n\nA detailed example is provided in the [`examples/`](examples/) directory.\n\n## Getting started\n\nTo get your hands dirty with `pke`, we invite you to try our tutorials out.\n\n|                          Name                   |     Link     |\n| ----------------------------------------------  |  ----------  |\n| Getting started with `pke` and keyphrase extraction | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/keyphrasification/hands-on-with-pke/blob/main/part-1-graph-based-keyphrase-extraction.ipynb) |\n| Model parameterization                          | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/keyphrasification/hands-on-with-pke/blob/main/part-2-parameterization.ipynb) |\n| Benchmarking models                             | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/keyphrasification/hands-on-with-pke/blob/main/part-3-benchmarking-models.ipynb) |\n\n## Implemented models\n\n`pke` currently implements the following keyphrase extraction models:\n\n* Unsupervised models\n  * Statistical models\n    * FirstPhrases\n    * TfIdf\n    * KPMiner [(El-Beltagy and Rafea, 2010)](http://www.aclweb.org/anthology/S10-1041.pdf)\n    * YAKE [(Campos et al., 2020)](https://doi.org/10.1016/j.ins.2019.09.013)\n  * Graph-based models\n    * TextRank [(Mihalcea and Tarau, 2004)](http://www.aclweb.org/anthology/W04-3252.pdf)\n    * SingleRank  [(Wan and Xiao, 2008)](http://www.aclweb.org/anthology/C08-1122.pdf)\n    * TopicRank [(Bougouin et al., 2013)](http://aclweb.org/anthology/I13-1062.pdf)\n    * TopicalPageRank [(Sterckx et al., 2015)](http://users.intec.ugent.be/cdvelder/papers/2015/sterckx2015wwwb.pdf)\n    * PositionRank [(Florescu and Caragea, 2017)](http://www.aclweb.org/anthology/P17-1102.pdf)\n    * MultipartiteRank [(Boudin, 2018)](https://arxiv.org/abs/1803.08721)\n* Supervised models\n  * Feature-based models\n    * Kea [(Witten et al., 2005)](https://www.cs.waikato.ac.nz/ml/publications/2005/chap_Witten-et-al_Windows.pdf)\n\n## Model performances \n\nFor comparison purposes, overall results of implemented models on commonly-used benchmark datasets are available in [results](results.md).\nCode for reproducing these experiments are in the [benchmarking](examples/benchmarking-models.ipynb) notebook\n(also available on [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/boudinfl/pke/blob/main/examples/benchmarking-models.ipynb)).\n\n## Citing pke\n\nIf you use `pke`, please cite the following paper:\n\n```\n@InProceedings{boudin:2016:COLINGDEMO,\n  author    = {Boudin, Florian},\n  title     = {pke: an open source python-based keyphrase extraction toolkit},\n  booktitle = {Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: System Demonstrations},\n  month     = {December},\n  year      = {2016},\n  address   = {Osaka, Japan},\n  pages     = {69--73},\n  url       = {http://aclweb.org/anthology/C16-2015}\n}\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B532:376DE:182A04:5ECBD5:6AB92E74"},"text_sha256":"2cf3151015a3a5af88cb25b261d04a9427e5f44c60ebb2aa82516875e9454450"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"roshan-research/hazm","input_row":{"repository":"roshan-research/hazm","url":"https://github.com/roshan-research/hazm","name":"hazm","owner":"roshan-research","description":"Persian NLP Toolkit","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1426,"issues":249,"created_at":"2013-10-29T13:10:08Z","updated_at":"2026-09-22T16:17:56Z","first_commit_at":"2013-10-29T13:10:08Z","last_commit_at":"2026-04-01T18:55:05Z","activity_months":149.06,"ai_ml_match_topics":"natural-language-processing; nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:49.432Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"roshan-research/hazm","visibility":"public","created_at":"2013-10-29T13:10:08Z","updated_at":"2026-09-27T14:32:30Z","private":false,"fork":false,"archived":false,"stargazers_count":1427,"open_issues_count":8,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1478","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F4:0BA1:DAC50D:1011900:6AB92E75"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1477","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0788:6E429:1808470:1C32B19:6AB92E75"},"commit":{"sha":"6a60eb03b73978a90c16ffff6e4ed043ba817957","url":"https://github.com/roshan-research/hazm/commit/6a60eb03b73978a90c16ffff6e4ed043ba817957","date":"2018-05-09T17:49:31Z","author_date":"2018-05-09T17:49:31Z","committer_date":"2018-05-09T17:49:31Z","tree_sha":"cbd304c2a2ae2c89f75c6175bd089a1283251072","message_first_line":"fix install problem in windows (#123)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1476","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078C:2BC4E5:1848C76:1C73123:6AB92E76"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2901,"blob_sha":"0c4fab293d4753e083379a74207a4f1201f68695","priority":0}],"documents":[{"path":"README.md","size":2901,"blob_sha":"0c4fab293d4753e083379a74207a4f1201f68695","priority":0,"status":200,"text":"Hazm\n====\n\nPython library for digesting Persian text.\n\n+ Text cleaning\n+ Sentence and word tokenizer\n+ Word lemmatizer\n+ POS tagger\n+ Shallow parser\n+ Dependency parser\n+ Interfaces for Persian corpora\n+ [NLTK](http://nltk.org/) compatible\n+ Python 2.7, 3.4, 3.5 and 3.6 support\n+ [![Build Status](https://travis-ci.org/sobhe/hazm.png)](https://travis-ci.org/sobhe/hazm)\n\n\n## Usage\n\n```python\n>>> from __future__ import unicode_literals\n>>> from hazm import *\n\n>>> normalizer = Normalizer()\n>>> normalizer.normalize('اصلاح نويسه ها و استفاده از نیم‌فاصله پردازش را آسان مي كند')\n'اصلاح نویسه‌ها و استفاده از نیم‌فاصله پردازش را آسان می‌کند'\n\n>>> sent_tokenize('ما هم برای وصل کردن آمدیم! ولی برای پردازش، جدا بهتر نیست؟')\n['ما هم برای وصل کردن آمدیم!', 'ولی برای پردازش، جدا بهتر نیست؟']\n>>> word_tokenize('ولی برای پردازش، جدا بهتر نیست؟')\n['ولی', 'برای', 'پردازش', '،', 'جدا', 'بهتر', 'نیست', '؟']\n\n>>> stemmer = Stemmer()\n>>> stemmer.stem('کتاب‌ها')\n'کتاب'\n>>> lemmatizer = Lemmatizer()\n>>> lemmatizer.lemmatize('می‌روم')\n'رفت#رو'\n\n>>> tagger = POSTagger(model='resources/postagger.model')\n>>> tagger.tag(word_tokenize('ما بسیار کتاب می‌خوانیم'))\n[('ما', 'PRO'), ('بسیار', 'ADV'), ('کتاب', 'N'), ('می‌خوانیم', 'V')]\n\n>>> chunker = Chunker(model='resources/chunker.model')\n>>> tagged = tagger.tag(word_tokenize('کتاب خواندن را دوست داریم'))\n>>> tree2brackets(chunker.parse(tagged))\n'[کتاب خواندن NP] [را POSTP] [دوست داریم VP]'\n\n>>> parser = DependencyParser(tagger=tagger, lemmatizer=lemmatizer)\n>>> parser.parse(word_tokenize('زنگ‌ها برای که به صدا درمی‌آید؟'))\n<DependencyGraph with 8 nodes>\n\n```\n\n\n## Installation\nThe latest stabe verson of Hazm can be installed through `pip`:\n\n\tpip install hazm\n\nBut for testing or using Hazm with the latest updates you may use:\n\n\tpip install https://github.com/sobhe/hazm/archive/master.zip --upgrade\n\nWe have also trained [tagger and parser models](https://github.com/sobhe/hazm/releases/download/v0.5/resources-0.5.zip). You may put these models in the `resources` folder of your project.\n\n\n## Extensions\n\nNote: These are not official versions of hazm, not uptodate on functionality and are not supported by Sobhe.\n\n+ [**JHazm**](https://github.com/mojtaba-khallash/JHazm): A Java port of Hazm\n+ [**NHazm**](https://github.com/mojtaba-khallash/NHazm): A C# port of Hazm\n\n## Thanks\n\n+ to constributors: [Mojtaba Khallash](https://github.com/mojtaba-khallash) and [Mohsen Imany](https://github.com/imani).\n+ to [Virastyar](http://virastyar.ir/) project for persian word list.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BA58:3E1DA:17B99A:5E5A8A:6AB92E76"},"text_sha256":"64b09973ae7e3447bb907273730bb4c5dcae1f7e740ed945e14c46674336f743"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1475","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0888:0BA1:DAC629:1011A4F:6AB92E77"},"commit":{"sha":"a399c8293c5165544aaef76ead78bda9f4275888","url":"https://github.com/roshan-research/hazm/commit/a399c8293c5165544aaef76ead78bda9f4275888","date":"2026-04-01T18:55:05Z","author_date":"2026-04-01T18:55:05Z","committer_date":"2026-04-01T18:55:05Z","tree_sha":"5d5e56aa44f616685b16fd76d919663678c3a555","message_first_line":"Bump version from 0.12.0 to 0.12.1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1474","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0881:74C18:182E34F:1C58E70:6AB92E77"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7585,"blob_sha":"ba6bdd98038c93817c54436af82ef08f6f33abe4","priority":0}],"documents":[{"path":"README.md","size":7585,"blob_sha":"ba6bdd98038c93817c54436af82ef08f6f33abe4","priority":0,"status":200,"text":"# Hazm - Persian NLP Toolkit\n\n![Tests](https://img.shields.io/github/actions/workflow/status/roshan-research/hazm/test.yml?branch=master)\n![PyPI - Downloads](https://img.shields.io/github/downloads/roshan-research/hazm/total)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hazm)\n![GitHub](https://img.shields.io/github/license/roshan-research/hazm)\n\n[**Hazm**](https://www.roshan-ai.ir/hazm/) is a python library to perform natural language processing tasks on Persian text. It offers various features for analyzing, processing, and understanding Persian text. You can use Hazm to normalize text, tokenize sentences and words, lemmatize words, assign part-of-speech tags, identify dependency relations, create word and sentence embeddings, or read popular Persian corpora.\n\n[![sample](documentation/assets/sample.png)](documentation/assets/sample.png)\n\n## Features\n\n- **Normalization:** Converts text to a standard form (diacritics removal, ZWNJ correction, etc).\n- **Tokenization:** Splits text into sentences and words.\n- **Lemmatization:** Reduces words to their base forms.\n- **POS tagging:** Assigns a part of speech to each word.\n- **Dependency parsing:** Identifies the syntactic relations between words.\n- **Embedding:** Creates vector representations of words and sentences.\n- **Hugging Face Integration:** Automatically download and cache pretrained models from the Hub.\n- **Persian corpora reading:** Easily read popular Persian corpora with ready-made scripts.\n\n## Installation\n\nTo install the latest version of Hazm (requires Python 3.12+), run:\n\n    pip install hazm\n\nTo use the pretrained models from Hugging Face, ensure you have the `huggingface-hub` package:\n\n    pip install huggingface-hub\n\n## Pretrained-Models\n\nHazm supports automatic downloading of pretrained models. You can find all available models (POS Tagger, Chunker, Embeddings, etc.) on our official Hugging Face page:\n\n👉 [**Roshan Research on Hugging Face**](https://huggingface.co/roshan-research/models)\n\nWhen using Hazm, simply provide the `repo_id` and `model_filename` as shown in the examples below, and the library will handle the rest.\n\n## Usage\n\n```python\nfrom hazm import *\n\n# ===============================\n# Stemming\n# ===============================\nstemmer = Stemmer()\nstem = stemmer.stem('کتاب‌ها')\nprint(stem) # کتاب\n\n# ===============================\n# Normalizing\n# ===============================\nnormalizer = Normalizer()\nnormalized_text = normalizer.normalize('من کتاب های زیــــادی دارم .')\nprint(normalized_text) # من کتاب‌های زیادی دارم.\n\n# ===============================\n# Lemmatizing\n# ===============================\nlemmatizer = Lemmatizer()\nlem = lemmatizer.lemmatize('می‌نویسیم')\nprint(lem) # نوشت#نویس\n\n# ===============================\n# Sentence tokenizing\n# ===============================\nsentence_tokenizer = SentenceTokenizer()\nsent_tokens = sentence_tokenizer.tokenize('ما کتاب می‌خوانیم. یادگیری خوب است.')\nprint(sent_tokens) # ['ما کتاب می\\u200cخوانیم.', 'یادگیری خوب است.']\n\n# ===============================\n# Word tokenizing\n# ===============================\nword_tokenizer = WordTokenizer()\nword_tokens = word_tokenizer.tokenize('ما کتاب می‌خوانیم')\nprint(word_tokens) # ['ما', 'کتاب', 'می\\u200cخوانیم']\n\n# ===============================\n# Part of speech tagging\n# ===============================\ntagger = POSTagger(repo_id=\"roshan-research/hazm-postagger\", model_filename=\"pos_tagger.model\")\ntagged_words = tagger.tag(word_tokens)\nprint(tagged_words) # [('ما', 'PRON'), ('کتاب', 'NOUN'), ('می\\u200cخوانیم', 'VERB')]\n\n# ===============================\n# Chunking\n# ===============================\nchunker = Chunker(repo_id=\"roshan-research/hazm-chunker\", model_filename=\"chunker.model\")\nchunked_tree = tree2brackets(chunker.parse(tagged_words))\nprint(chunked_tree) # [ما NP] [کتاب NP] [می‌خوانیم VP]\n\n# ===============================\n# Word embedding\n# ===============================\nword_embedding = WordEmbedding.load(repo_id='roshan-research/hazm-word-embedding', model_filename='fasttext_skipgram_300.bin', model_type='fasttext')\nodd_word = word_embedding.doesnt_match(['کتاب', 'دفتر', 'قلم', 'پنجره'])\nprint(odd_word) # پنجره\n\n# ===============================\n# Sentence embedding\n# ===============================\nsent_embedding = SentEmbedding.load(repo_id='roshan-research/hazm-sent-embedding', model_filename='sent2vec-naab.model')\nsentence_similarity = sent_embedding.similarity('او شیر میخورد','شیر غذا می‌خورد')\nprint(sentence_similarity) # 0.4643607437610626\n\n# ===============================\n# Dependency parsing\n# ===============================\nparser = DependencyParser(tagger=tagger, lemmatizer=lemmatizer, repo_id=\"roshan-research/hazm-dependency-parser\", model_filename=\"langModel.mco\")\ndependency_graph = parser.parse(word_tokens)\nprint(dependency_graph)\n\"\"\"\n{0:  {'address': 0,\n      'ctag': 'TOP',\n      'deps': defaultdict(<class 'list'>, {'root': [3]}),\n      'feats': None,\n      'head': None,\n      'lemma': None,\n      'rel': None,\n      'tag': 'TOP',\n      'word': None},\n  1: {'address': 1,\n      'ctag': 'PRON',\n      'deps': defaultdict(<class 'list'>, {}),\n      'feats': '_',\n      'head': 3,\n      'lemma': 'ما',\n      'rel': 'SBJ',\n      'tag': 'PRON',\n      'word': 'ما'},\n  2: {'address': 2,\n      'ctag': 'NOUN',\n      'deps': defaultdict(<class 'list'>, {}),\n      'feats': '_',\n      'head': 3,\n      'lemma': 'کتاب',\n      'rel': 'OBJ',\n      'tag': 'NOUN',\n      'word': 'کتاب'},\n  3: {'address': 3,\n      'ctag': 'VERB',\n      'deps': defaultdict(<class 'list'>, {'SBJ': [1], 'OBJ': [2]}),\n      'feats': '_',\n      'head': 0,\n      'lemma': 'خواند#خوان',\n      'rel': 'root',\n      'tag': 'VERB',\n      'word': 'می\\u200cخوانیم'}})\n\n\"\"\"\n```\n\n## Documentation\n\nVisit https://roshan-ai.ir/hazm to view the full documentation.\n\n## Evaluation\n\n| Module name      |           |\n| :--------------- | --------- |\n| DependencyParser | **85.6%** |\n| POSTagger        | **98.8%** |\n| Chunker          | **93.4%** |\n| Lemmatizer       | **89.9%** |\n\n|                                | Metric          | Value   |\n| ------------------------------ | --------------- | ------- |\n| **SpacyPOSTagger**             | Precision       | 0.99250 |\n|                                | Recall          | 0.99249 |\n|                                | F1-Score        | 0.99249 |\n| **EZ Detection in SpacyPOSTagger** | Precision   | 0.99301 |\n|                                | Recall          | 0.99297 |\n|                                | F1-Score        | 0.99298 |\n| **SpacyChunker**                | Accuracy        | 96.53%  |\n|                                | F-Measure       | 95.00%  |\n|                                | Recall          | 95.17%  |\n|                                | Precision       | 94.83%  |\n| **SpacyDependencyParser**       | TOK Accuracy    | 99.06   |\n|                                | UAS             | 92.30   |\n|                                | LAS             | 89.15   |\n|                                | SENT Precision  | 98.84   |\n|                                | SENT Recall     | 99.38   |\n|                                | SENT F-Measure  | 99.11   |\n\n[![Star History Chart](https://api.star-history.com/svg?repos=roshan-research/hazm&type=Date)](https://star-history.com/#roshan-research/hazm&Date)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E022:386840:187B2A:5F1C4B:6AB92E77"},"text_sha256":"5f44a7ef3e3179211c50a8b851f1f4f8bc9ed0ebf53016ea1c4e537044102aff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PyThaiNLP/pythainlp","input_row":{"repository":"PyThaiNLP/pythainlp","url":"https://github.com/PyThaiNLP/pythainlp","name":"pythainlp","owner":"PyThaiNLP","description":"Thai natural language processing in Python","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1156,"issues":455,"created_at":"2016-06-23T14:57:26Z","updated_at":"2026-09-24T18:46:11Z","first_commit_at":"2016-06-23T14:57:28Z","last_commit_at":"2026-09-24T18:46:05Z","activity_months":123.03,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:52.640Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PyThaiNLP/pythainlp","visibility":"public","created_at":"2016-06-23T14:57:26Z","updated_at":"2026-09-24T18:46:11Z","private":false,"fork":false,"archived":false,"stargazers_count":1156,"open_issues_count":36,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1473","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FE:35D5A8:17F6AF7:1C21411:6AB92E78"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1472","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0939:156040:17F55B0:1C1F3C8:6AB92E79"},"commit":{"sha":"6754f9a01f07d923dcc838c0bd6ea23535cf187b","url":"https://github.com/PyThaiNLP/pythainlp/commit/6754f9a01f07d923dcc838c0bd6ea23535cf187b","date":"2018-05-13T09:02:19Z","author_date":"2018-05-13T09:02:19Z","committer_date":"2018-05-13T09:02:19Z","tree_sha":"e0eba2f074f59859b9ace19748fe254ca43e03f6","message_first_line":"PyThaiNLP 1.6.0.5"},"tree_request_status":200,"tree_rate":{"github_remaining":"1471","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081A:228A99:180D6BB:1C37FC3:6AB92E79"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4073,"blob_sha":"047c28cf801bc8d92de57d5c702c84c726ccb078","priority":0},{"path":"README.rst","size":385,"blob_sha":"2d19c5048a9336ee6f0e1fd0d304c2b40fda1f35","priority":0}],"documents":[{"path":"README.md","size":4073,"blob_sha":"047c28cf801bc8d92de57d5c702c84c726ccb078","priority":0,"status":200,"text":"![PyThaiNLP Logo](https://avatars0.githubusercontent.com/u/32934255?s=200&v=4)\n\n# PyThaiNLP\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cb946260c87a4cc5905ca608704406f7)](https://www.codacy.com/app/pythainlp/pythainlp_2?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=PyThaiNLP/pythainlp&amp;utm_campaign=Badge_Grade)[![pypi](https://img.shields.io/pypi/v/pythainlp.svg)](https://pypi.python.org/pypi/pythainlp)\n[![Build Status](https://travis-ci.org/PyThaiNLP/pythainlp.svg?branch=develop)](https://travis-ci.org/PyThaiNLP/pythainlp)\n[![Build status](https://ci.appveyor.com/api/projects/status/9g3mfcwchi8em40x?svg=true)](https://ci.appveyor.com/project/wannaphongcom/pythainlp-9y1ch)\n[![Coverage Status](https://coveralls.io/repos/github/PyThaiNLP/pythainlp/badge.svg?branch=dev)](https://coveralls.io/github/PyThaiNLP/pythainlp?branch=dev)\n\nThai natural language processing in Python.\n\nPyThaiNLP is a python module similar to `nltk` , but it's working primarily on\nThai language instead of English.\n\nIt supports both Python 2.7 and Python 3.\n\n### Capability\n\n- Thai word segmentation\n- Thai wordnet\n- Thai Character Clusters (TCC) and ETCC\n- Thai stop word\n- Thai meta sound\n- Thai soundex\n- Thai postaggers\n- Thai romanization\n- Thai misspellings detection and correction\n\nand much more.\n\n### Install\n\n**using pip.**\n\n```sh\n$ pip install pythainlp\n```\n\n### Documentation\n\nRead on [https://github.com/PyThaiNLP/pythainlp/tree/dev/docs](https://github.com/PyThaiNLP/pythainlp/tree/dev/docs)\n\n### License\n\nApache Software License 2.0\n\n## ภาษาไทย\n\nประมวลภาษาธรรมชาติภาษาไทยในภาษา Python\n\nNatural language processing หรือ การประมวลภาษาธรรมชาติ  โมดูล PyThaiNLP เป็นโมดูลที่ถูกพัฒนาขึ้นเพื่อพัฒนาการประมวลภาษาธรรมชาติภาษาไทยในภาษา Python และ**มันฟรี (ตลอดไป) เพื่อคนไทยและชาวโลกทุกคน !**\n\n> เพราะโลกขับเคลื่อนต่อไปด้วยการแบ่งปัน\n\nรองรับ Python 2.7 และ Python 3\n\n  - หน้าหลัก GitHub :  [https://github.com/PyThaiNLP/pythainlp/](https://github.com/PyThaiNLP/pythainlp/)\n\n### ความสามารถ\n  - ตัดคำภาษาไทย\n  - ถอดเสียงภาษาไทยเป็น Latin\n  - Postaggers ภาษาไทย\n  - อ่านตัวเลขเป็นข้อความภาษาไทย\n  - เรียงจำนวนคำของประโยค\n  - แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา\n  - เช็คคำผิดในภาษาไทย\n  - รองรับ  Thai Character Clusters (TCC) และ ETCC\n  - Thai WordNet\n  - Stop Word ภาษาไทย\n  - Meta Sound ภาษาไทย\n  - Thai Soundex\n  - และอื่น ๆ \n\n### ติดตั้ง\n\nรองรับ Python 2.7 และ Python 3\n\nรุ่นเสถียร\n\n```sh\n$ pip install pythainlp\n```\n\n### เอกสารการใช้งาน\n\nอ่านได้ที่  [https://github.com/PyThaiNLP/pythainlp/tree/dev/docs](https://github.com/PyThaiNLP/pythainlp/tree/dev/docs)\n\n### License\n\nApache Software License 2.0\n\nพัฒนาโดย PyThaiNLP\n\n### Logo\n\nออกแบบโดยคุณ วรุตม์ พสุธาดล จากการประกวดที่ https://www.facebook.com/groups/408004796247683/permalink/475864542795041/ และ https://www.facebook.com/groups/408004796247683/permalink/474262752955220/\n\n### สนับสนุน\n\nคุณสามารถร่วมพัฒนาโครงการนี้ได้ โดยการ Fork และส่ง pull requests กลับมา\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F8C2:09BF:B3E64:2E8348:6AB92E76"},"text_sha256":"80fc0b44414aa19191898675b6cc42e5bdb035e2bf7df62f1a3a6edd7bf78cac"},{"path":"README.rst","size":385,"blob_sha":"2d19c5048a9336ee6f0e1fd0d304c2b40fda1f35","priority":0,"status":200,"text":"================\nPyThaiNLP 1.6.0\n================\n\nThai natural language processing in Python.\n\nPyThaiNLP is a python module similar to nltk , but it's working primarily on\n\nThai language instead of English.\n\nIt supports both Python 2.7 and Python 3.\n\n\n**Install**\n\npip install pythainlp\n\n\nGitHub : https://github.com/wannaphongcom/pythainlp\n\n\n**License**\n\nApache Software License 2.0\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7F16:A58F2:177C0E:5E1D8E:6AB92E79"},"text_sha256":"ebe6dd46e35435ba0ed43052bc222039b6d78ff6bd741408fa8e9b8faab3ad93"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1470","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C5:7580A:18246D7:1C4F01F:6AB92E7A"},"commit":{"sha":"9bd4d92be6f7f41b2af036e950fbf265b8782cd0","url":"https://github.com/PyThaiNLP/pythainlp/commit/9bd4d92be6f7f41b2af036e950fbf265b8782cd0","date":"2026-06-25T17:34:01Z","author_date":"2026-06-25T17:34:01Z","committer_date":"2026-06-25T17:34:01Z","tree_sha":"caa219e5d08ab00afc6307ebf9ce5ac10551a922","message_first_line":"Merge pull request #1439 from PyThaiNLP/dependabot/pip/epitran-1.35.1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1469","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0875:6E429:1808917:1C3304A:6AB92E7A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12807,"blob_sha":"1235a3808393b775d98361f194464b9ab7eae0ac","priority":0},{"path":"SECURITY.md","size":966,"blob_sha":"7f8fc34fa110ab8ddf54bd1aab0318cbdfd76cb5","priority":1}],"documents":[{"path":"README.md","size":12807,"blob_sha":"1235a3808393b775d98361f194464b9ab7eae0ac","priority":0,"status":200,"text":"# PyThaiNLP: Thai Natural Language Processing in Python\n\n![Project Logo](./docs/images/logo.png)\n\n[![pypi](https://img.shields.io/pypi/v/pythainlp.svg)](https://pypi.python.org/pypi/pythainlp)\n[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3519354.svg)](https://doi.org/10.5281/zenodo.3519354)\n[![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Codacy Grade](https://app.codacy.com/project/badge/Grade/5821a0de122041c79999bbb280230ffb)](https://www.codacy.com/gh/PyThaiNLP/pythainlp/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=PyThaiNLP/pythainlp&amp;utm_campaign=Badge_Grade)\n[![Coverage Status](https://coveralls.io/repos/github/PyThaiNLP/pythainlp/badge.svg?branch=dev)](https://coveralls.io/github/PyThaiNLP/pythainlp?branch=dev)\n[![Google Colab Badge](https://badgen.net/badge/Launch%20Quick%20Start%20Guide/on%20Google%20Colab/blue?icon=terminal)](https://colab.research.google.com/github/PyThaiNLP/tutorials/blob/master/source/notebooks/pythainlp_get_started.ipynb)\n[![Facebook](https://img.shields.io/badge/Facebook-0866FF?style=flat&logo=facebook&logoColor=white)](https://www.facebook.com/pythainlp/)\n[![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#thainlp:matrix.org)\n\n[pythainlp.org](https://pythainlp.org/)\n| [Tutorials](https://pythainlp.org/tutorials)\n| [License info](https://pythainlp.org/dev-docs/notes/license.html)\n| [Model cards](https://github.com/PyThaiNLP/pythainlp/wiki/Model-Cards)\n| [Adopters](https://github.com/PyThaiNLP/pythainlp/blob/dev/INTHEWILD.md)\n| *[เอกสารภาษาไทย](https://github.com/PyThaiNLP/pythainlp/blob/dev/README_TH.md)*\n\nDesigned to be a Thai-focused counterpart to [NLTK](https://www.nltk.org/),\n**PyThaiNLP** provides standard tools for linguistic analysis under\nan Apache-2.0 license, with its data and models covered by CC0-1.0\nand CC-BY-4.0.\n\n```sh\npip install pythainlp\n```\n\n| Version | Python version | Changes | Documentation |\n|:-------:|:--------------:|:-------:|:-------------:|\n| [5.3.4](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md#533---2026-03-26) | [pythainlp.org/docs](https://pythainlp.org/docs) |\n| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.4...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) |\n\n## Features\n\n- **Linguistic units:** Sentence, word, and subword segmentation\n  (`sent_tokenize`, `word_tokenize`, `subword_tokenize`).\n- **Tagging:** Part-of-speech tagging (`pos_tag`).\n- **Transliteration:** Romanization (`transliterate`) and IPA conversion.\n- **Correction:** Spelling suggestion and correction (`spell`, `correct`).\n- **Utilities:** Soundex, collation, number-to-text (`bahttext`), datetime\n  formatting (`thai_strftime`), and keyboard layout correction.\n- **Data:** Built-in Thai character sets, word lists, and stop words.\n- **CLI:** Command-line interface via `thainlp`.\n\n  ```sh\n  thainlp data catalog  # List datasets\n  thainlp help          # Show usage\n  ```\n\n## Installation options\n\nTo install with specific extras (e.g., `translate`, `wordnet`, `full`):\n\n```sh\npip install \"pythainlp[extra1,extra2,...]\"\n```\n\nPossible `extras` included:\n\n- `compact` — install a stable and small subset of dependencies (recommended)\n- `translate` — machine translation support\n- `wordnet` — WordNet support\n- `full` — install all optional dependencies (may introduce conflicts)\n\nThe documentation website maintains the\n[full list of extras](https://pythainlp.org/dev-docs/notes/installation.html).\nTo see the specific libraries included in each extra,\nplease inspect the `[project.optional-dependencies]` section of\n[`pyproject.toml`](https://github.com/PyThaiNLP/pythainlp/blob/dev/pyproject.toml).\n\n## Environment variables\n\n| Variable | Description | Status |\n|---|---|---|\n| `PYTHAINLP_DATA` | Path to the data directory (default: `~/pythainlp-data`). | Current |\n| `PYTHAINLP_DATA_DIR` | Legacy alias for `PYTHAINLP_DATA`. Emits a `DeprecationWarning`. Setting both raises `ValueError`. | Deprecated; use `PYTHAINLP_DATA` |\n| `PYTHAINLP_OFFLINE` | Set to `1` to disable automatic corpus downloads. Explicit `download()` calls still work. | Current |\n| `PYTHAINLP_READ_ONLY` | Set to `1` to enable read-only mode, which prevents implicit background writes to PyThaiNLP's internal data directory (corpus downloads, catalog updates, directory creation). Explicit user-initiated saves to user-specified paths are unaffected. | Current |\n| `PYTHAINLP_READ_MODE` | Legacy alias for `PYTHAINLP_READ_ONLY`. Emits a `DeprecationWarning`. Setting both raises `ValueError`. | Deprecated; use `PYTHAINLP_READ_ONLY` |\n\n### Data directory\n\nPyThaiNLP downloads data (see the data catalog `db.json` at\n[pythainlp-corpus](https://github.com/PyThaiNLP/pythainlp-corpus))\nto `~/pythainlp-data` by default.\nSet the `PYTHAINLP_DATA` environment variable to override this location.\n(`PYTHAINLP_DATA_DIR` is still accepted but deprecated.)\n\nWhen using PyThaiNLP in distributed computing environments\n(e.g., Apache Spark), set the `PYTHAINLP_DATA` environment variable\ninside the function that will be distributed to worker nodes.\nSee details in\n[the documentation](https://pythainlp.org/dev-docs/notes/installation.html).\n\n### Offline mode\n\nSet `PYTHAINLP_OFFLINE=1` to disable **automatic** corpus downloads.\nWhen this variable is set and a corpus is not already cached locally,\na `FileNotFoundError` is raised instead of attempting a network download.\nExplicit calls to `pythainlp.corpus.download()` are unaffected.\nUse `pythainlp.is_offline_mode()` to check the current state programmatically.\n\n```python\nimport pythainlp\nprint(pythainlp.is_offline_mode())  # True if PYTHAINLP_OFFLINE=1\n```\n\n### Read-only mode\n\nSet `PYTHAINLP_READ_ONLY=1` to prevent implicit background writes to PyThaiNLP's\ninternal data directory. This blocks corpus downloads, catalog updates, and\nautomatic data directory creation — writes that happen as side effects the user\nmay not be aware of.\n\n> **Note:** Read-only mode is more restrictive than offline mode.\n> `PYTHAINLP_OFFLINE=1` blocks only *automatic* downloads triggered by\n> `get_corpus_path()`; explicit `pythainlp.corpus.download()` calls still work.\n> `PYTHAINLP_READ_ONLY=1` also blocks explicit `download()` calls, because any\n> download requires writing to the data directory.\n> Use `PYTHAINLP_READ_ONLY` when the data directory is on a read-only file system\n> (e.g., a read-only Docker volume or a shared cluster mount).\n\nOperations where the user explicitly specifies an output path are unaffected\n(e.g., `model.save(\"path\")`, `tagger.train(..., save_loc=\"path\")`,\n`thainlp misspell --output myfile.txt`).\n\nUse `pythainlp.is_read_only_mode()` to check the current state programmatically.\n\n```python\nimport pythainlp\nprint(pythainlp.is_read_only_mode())  # True if PYTHAINLP_READ_ONLY=1\n```\n\n## Testing\n\nWe test core functionalities on all officially supported Python versions.\n\nSee [tests/README.md](./tests/README.md) for test matrix and other details.\n\n## Contribute to PyThaiNLP\n\nPlease fork and create a pull request.\nSee [CONTRIBUTING.md](https://github.com/PyThaiNLP/pythainlp/blob/dev/CONTRIBUTING.md)\nfor guidelines and algorithm references.\n\n## Citations\n\nIf you use `PyThaiNLP` library in your project,\nplease cite the software as follows:\n\n> Phatthiyaphaibun, Wannaphong, Korakot Chaovavanich, Charin Polpanumas,\n> Arthit Suriyawongkul, Lalita Lowphansirikul, and Pattarawat Chormai.\n> “PyThaiNLP: Thai Natural Language Processing in Python”.\n> Zenodo, 2 June 2024. <https://doi.org/10.5281/zenodo.3519354>.\n\nwith this BibTeX entry:\n\n```bibtex\n@software{pythainlp,\n    title = \"{P}y{T}hai{NLP}: {T}hai Natural Language Processing in {P}ython\",\n    author = \"Phatthiyaphaibun, Wannaphong  and\n      Chaovavanich, Korakot  and\n      Polpanumas, Charin  and\n      Suriyawongkul, Arthit  and\n      Lowphansirikul, Lalita  and\n      Chormai, Pattarawat\",\n    doi = {10.5281/zenodo.3519354},\n    license = {Apache-2.0},\n    month = jun,\n    url = {https://github.com/PyThaiNLP/pythainlp/},\n    version = {v5.0.4},\n    year = {2024},\n}\n```\n\nTo cite our [NLP-OSS 2023](https://nlposs.github.io/2023/) academic paper,\nplease cite the paper as follows:\n\n> Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas,\n> Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai,\n> Peerat Limkonchotiwat, Thanathip Suntorntip, and Can Udomcharoenchaikit.\n> 2023.\n> [PyThaiNLP: Thai Natural Language Processing in Python.](https://aclanthology.org/2023.nlposs-1.4)\n> In Proceedings of the 3rd Workshop for Natural Language Processing\n> Open Source Software (NLP-OSS 2023),\n> pages 25–36, Singapore, Singapore.\n> Empirical Methods in Natural Language Processing.\n\nwith this BibTeX entry:\n\n```bibtex\n@inproceedings{phatthiyaphaibun-etal-2023-pythainlp,\n    title = \"{P}y{T}hai{NLP}: {T}hai Natural Language Processing in {P}ython\",\n    author = \"Phatthiyaphaibun, Wannaphong  and\n      Chaovavanich, Korakot  and\n      Polpanumas, Charin  and\n      Suriyawongkul, Arthit  and\n      Lowphansirikul, Lalita  and\n      Chormai, Pattarawat  and\n      Limkonchotiwat, Peerat  and\n      Suntorntip, Thanathip  and\n      Udomcharoenchaikit, Can\",\n    editor = \"Tan, Liling  and\n      Milajevs, Dmitrijs  and\n      Chauhan, Geeticka  and\n      Gwinnup, Jeremy  and\n      Rippeth, Elijah\",\n    booktitle = \"Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023)\",\n    month = dec,\n    year = \"2023\",\n    address = \"Singapore, Singapore\",\n    publisher = \"Empirical Methods in Natural Language Processing\",\n    url = \"https://aclanthology.org/2023.nlposs-1.4\",\n    pages = \"25--36\",\n    abstract = \"We present PyThaiNLP, a free and open-source natural language processing (NLP) library for Thai language implemented in Python. It provides a wide range of software, models, and datasets for Thai language. We first provide a brief historical context of tools for Thai language prior to the development of PyThaiNLP. We then outline the functionalities it provided as well as datasets and pre-trained language models. We later summarize its development milestones and discuss our experience during its development. We conclude by demonstrating how industrial and research communities utilize PyThaiNLP in their work. The library is freely available at https://github.com/pythainlp/pythainlp.\",\n}\n```\n\n## Sponsors\n\nSee [SPONSORS.md](https://github.com/PyThaiNLP/pythainlp/blob/dev/SPONSORS.md)\n\n## Acknowledgements\n\nPyThaiNLP was founded by Wannaphong Phatthiyaphaibun in 2016.\nHis contributions from 2021 were made during a PhD studentship supported by\n[Vidyasirimedhi Institute of Science and Technology (VISTEC)][vistec].\n\nThe contributions of Arthit Suriyawongkul to PyThaiNLP\nfrom November 2017 until August 2019 were funded by [Wisesight][].\nHis contributions from November 2019 until October 2024 were made during\na PhD studentship supported by\n[Taighde Éireann – Research Ireland][researchireland]\nunder Grant Number 18/CRT/6224\n([Research Ireland Centre for Research Training in Digitally-Enhanced Reality\n(d-real)][dreal]).\n\nThe contributions of Pattarawat Chormai to PyThaiNLP from 2018 until 2019\nwere made during a research internship at the\n[Natural Language Processing Lab,\nDepartment of Linguistics, Faculty of Arts,\nChulalongkorn University][nlp-chula].\n\nThe contributions of Korakot Chaovavanich and Lalita Lowphansirikul\nto PyThaiNLP from 2019 until 2022 were funded by the\n[VISTEC-depa Thailand AI Research Institute][airesearch].\n\nThe Mac Mini M1 used for macOS testing was donated by [MacStadium][].\nThis hardware was essential for the project's testing suite from October 2022\nto October 2023, filling a critical gap before GitHub Actions introduced\nnative support for Apple Silicon runners.\n\n[vistec]: https://www.vistec.ac.th/\n[airesearch]: https://airesearch.in.th/\n[wisesight]: https://wisesight.com/\n[researchireland]: https://www.researchireland.ie/\n[dreal]: https://d-real.ie/\n[nlp-chula]: https://attapol.github.io/lab.html\n[macstadium]: https://www.macstadium.com/\n\nWe have only one official repository at\n<https://github.com/PyThaiNLP/pythainlp>\nand another mirror at\n<https://gitlab.com/pythainlp/pythainlp>.\n\nBeware of malware if you use code from places other than these two.\n\nMade with ❤️ | PyThaiNLP Team 💻 | \"We build Thai NLP\" 🇹🇭\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"71A2:3B1F3:1877AB:5F19B1:6AB92E76"},"text_sha256":"fff5f243596141ee78a4c8afd90cc6061100ffd4bd65eb288a74b773ac17e16f"},{"path":"SECURITY.md","size":966,"blob_sha":"7f8fc34fa110ab8ddf54bd1aab0318cbdfd76cb5","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 5.3.x   | :white_check_mark: |\n| 5.2.x   | :white_check_mark: |\n| 5.1.x   | :x:                |\n| 5.0.x   | :x:                |\n| 4.0.x   | :x:                |\n| 3.1.x   | :x:                |\n| 3.0.x   | :x:                |\n| 2.3.x   | :x:                |\n| 2.2.x   | :x:                |\n| 2.1.x   | :x:                |\n| 2.0.x   | :x:                |\n| < 2.0   | :x:                |\n\n## Future Security Recommendations\n\nThe following security improvements are planned for future releases:\n\n- Migrate from pickle to a safer serialization format such as JSON or\n  [MessagePack][].\n- Upgrade the hashing algorithm for integrity verification from MD5 to SHA-256\n  or SHA-3.\n- Implement digital signatures for corpus files to ensure authenticity.\n- Add version tracking to the corpus to prevent rollback attacks.\n\n[MessagePack]: https://msgpack.org/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E838:24970A:1869A4:5F089F:6AB92E7A"},"text_sha256":"8405c630094ff88bb1ada70f36389d408213e9251a250513eb9ac0628f2da664"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"quanteda/quanteda","input_row":{"repository":"quanteda/quanteda","url":"https://github.com/quanteda/quanteda","name":"quanteda","owner":"quanteda","description":"An R package for the Quantitative Analysis of Textual Data","language":"R","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":889,"issues":1380,"created_at":"2012-08-15T10:15:43Z","updated_at":"2026-09-26T19:38:51Z","first_commit_at":"2012-08-15T10:15:43Z","last_commit_at":"2026-08-05T00:58:15Z","activity_months":167.63,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:56.278Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"quanteda/quanteda","visibility":"public","created_at":"2012-08-15T10:15:43Z","updated_at":"2026-09-26T19:38:51Z","private":false,"fork":false,"archived":false,"stargazers_count":889,"open_issues_count":54,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1468","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FF:278AC2:18869C5:1CB14F6:6AB92E7C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1467","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0820:6E5BD:17BE332:1BE7782:6AB92E7C"},"commit":{"sha":"0e6e1af625d28396b321334eb3150f3e5af4d9d7","url":"https://github.com/quanteda/quanteda/commit/0e6e1af625d28396b321334eb3150f3e5af4d9d7","date":"2018-05-24T16:23:30Z","author_date":"2018-05-24T16:23:30Z","committer_date":"2018-05-24T16:23:30Z","tree_sha":"c5652cb0d432e62ae77e7a87944caf2df13a7ea6","message_first_line":"Merge pull request #1364 from quanteda/issue-1363-XML-to-xml2"},"tree_request_status":200,"tree_rate":{"github_remaining":"1466","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083A:724D2:17F3789:1C1E01A:6AB92E7D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3568,"blob_sha":"1129da62240ab9dd121b37629531da8adf1bc560","priority":0}],"documents":[{"path":"README.md","size":3568,"blob_sha":"1129da62240ab9dd121b37629531da8adf1bc560","priority":0,"status":200,"text":"\n[![quanteda: quantitative analysis of textual\ndata](https://cdn.rawgit.com/quanteda/quanteda/master/images/quanteda_logo.svg)](http://quanteda.io)\n\n[![CRAN\nVersion](https://www.r-pkg.org/badges/version/quanteda)](https://CRAN.R-project.org/package=quanteda)\n[![Downloads](https://cranlogs.r-pkg.org/badges/quanteda)](https://CRAN.R-project.org/package=quanteda)\n[![Total\nDownloads](https://cranlogs.r-pkg.org/badges/grand-total/quanteda?color=orange)](https://CRAN.R-project.org/package=quanteda)\n[![Travis-CI Build\nStatus](https://travis-ci.org/quanteda/quanteda.svg?branch=master)](https://travis-ci.org/quanteda/quanteda)\n[![Appveyor Build\nstatus](https://ci.appveyor.com/api/projects/status/e3tf2h1ff0nlv249/branch/master?svg=true)](https://ci.appveyor.com/project/kbenoit/quanteda/branch/master)\n[![codecov](https://codecov.io/gh/quanteda/quanteda/branch/master/graph/badge.svg)](https://codecov.io/gh/quanteda/quanteda)\n[![DOI](https://zenodo.org/badge/5424649.svg)](https://zenodo.org/badge/latestdoi/5424649)\n\n## About\n\nAn R package for managing and analyzing text, created by [Kenneth\nBenoit](http://kenbenoit.net) in collaboration with a team of core\n[contributors](https://github.com/quanteda/quanteda/graphs/contributors):\n[Kohei Watanabe](https://github.com/koheiw), [Haiyan\nWang](https://github.com/HaiyanLW), [Paul\nNulty](https://github.com/pnulty), [Adam\nObeng](https://github.com/adamobeng), [Stefan\nMüller](http://muellerstefan.net), and [Akitaka\nMatsuo](http://amatsuo.net). Supported by the European Research Council\ngrant ERC-2011-StG 283794-QUANTESS.\n\nFor more details, see <http://docs.quanteda.io>.\n\n## How to Install\n\nThe normal way from CRAN, using your R GUI or\n\n``` r\ninstall.packages(\"quanteda\") \n```\n\nOr for the latest development version:\n\n``` r\n# devtools package required to install quanteda from Github \ndevtools::install_github(\"quanteda/quanteda\") \n```\n\nBecause this compiles some C++ and Fortran source code, you will need to\nhave installed the appropriate compilers.\n\n**If you are using a Windows platform**, this means you will need also\nto install the [Rtools](https://CRAN.R-project.org/bin/windows/Rtools/)\nsoftware available from CRAN.\n\n**If you are using macOS**, you should install the [macOS\ntools](https://cran.r-project.org/bin/macosx/tools/), namely the Clang\n6.x compiler and the GNU Fortran compiler (as **quanteda** requires\ngfortran to build).\n\n## How to Use\n\nSee the [quick start\nguide](http://docs.quanteda.io/articles/quickstart.html) to learn how to\nuse **quanteda**.\n\n## Leaving Feedback\n\nIf you like **quanteda**, please consider leaving [feedback or a\ntestimonial here](https://github.com/quanteda/quanteda/issues/461).\n\n## Contributing\n\nContributions in the form of feedback, comments, code, and bug reports\nare most welcome. How to contribute:\n\n  - Fork the source code, modify, and issue a [pull\n    request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)\n    through the [project GitHub\n    page](https://github.com/quanteda/quanteda). See our [Contributor\n    Code of\n    Conduct](https://github.com/quanteda/quanteda/blob/master/CONDUCT.md)\n    and the all-important **quanteda** [Style\n    Guide](https://github.com/quanteda/quanteda/wiki/Style-guide).\n  - Issues, bug reports, and wish lists: [File a GitHub\n    issue](https://github.com/quanteda/quanteda/issues).\n  - Usage questions: Submit a question on the [**quanteda** channel on\n    StackOverflow](https://stackoverflow.com/questions/tagged/quanteda).\n  - Contact [the maintainer](mailto:kbenoit@lse.ac.uk) by email.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"83A2:40B0C:17FF3D:5EA0FB:6AB92E7D"},"text_sha256":"6a19f3c12cd768a0652916963c56847b8d2b2e4a04932f879eacd0630a191bcd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1465","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0856:6E5BD:17BE45C:1BE78CE:6AB92E7E"},"commit":{"sha":"6b3419b0f4bb264683f6a5e15849c52989074ffc","url":"https://github.com/quanteda/quanteda/commit/6b3419b0f4bb264683f6a5e15849c52989074ffc","date":"2026-06-10T01:41:21Z","author_date":"2026-06-10T01:41:21Z","committer_date":"2026-06-10T01:41:21Z","tree_sha":"5834f7756ecd3a6d45caf5b13114ac2bd2a440e3","message_first_line":"Merge branch 'master' into dev-tokens_match"},"tree_request_status":200,"tree_rate":{"github_remaining":"1464","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DD:71C58:17DC818:1C07380:6AB92E7E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8347,"blob_sha":"dbd4ef4edbbbad6437c3b54e51a29a20aa53a374","priority":0}],"documents":[{"path":"README.md","size":8347,"blob_sha":"dbd4ef4edbbbad6437c3b54e51a29a20aa53a374","priority":0,"status":200,"text":"\n[![quanteda: quantitative analysis of textual\ndata](https://cdn.rawgit.com/quanteda/quanteda/master/images/quanteda_logo.svg)](http://quanteda.io)\n\n<!-- badges: start -->\n\n[![CRAN\nVersion](https://www.r-pkg.org/badges/version/quanteda)](https://CRAN.R-project.org/package=quanteda)\n[![](https://img.shields.io/badge/devel%20version-4.4-royalblue.svg)](https://github.com/quanteda/quanteda)\n[![Downloads](https://cranlogs.r-pkg.org/badges/quanteda)](https://CRAN.R-project.org/package=quanteda)\n[![Total\nDownloads](https://cranlogs.r-pkg.org/badges/grand-total/quanteda?color=orange)](https://CRAN.R-project.org/package=quanteda)\n[![R-CMD-check](https://github.com/quanteda/quanteda/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/quanteda/quanteda/actions/workflows/check-standard.yaml)\n[![codecov](https://codecov.io/gh/quanteda/quanteda/branch/master/graph/badge.svg)](https://app.codecov.io/gh/quanteda/quanteda)\n[![DOI](https://zenodo.org/badge/5424649.svg)](https://zenodo.org/badge/latestdoi/5424649)\n[![DOI](http://joss.theoj.org/papers/10.21105/joss.00774/status.svg)](https://doi.org/10.21105/joss.00774)\n<!-- badges: end -->\n\n## About\n\n**quanteda** is an R package for managing and analyzing text, created\nand maintained by [Kenneth Benoit](https://kenbenoit.net) and [Kohei\nWatanabe](https://blog.koheiw.net/). Its creation was funded by the\nEuropean Research Council grant ERC-2011-StG 283794-QUANTESS and its\ncontinued development is supported by the [Quanteda Initiative\nCIC](https://github.com/quanteda).\n\nFor more details, see <https://quanteda.io>.\n\n## **quanteda** version 4\n\nThe **quanteda** 4.0 is a major release that improves functionality and\nperformance and further improves function consistency by removing\npreviously deprecated functions. It also includes significant new\ntokeniser rules that make the default tokeniser smarter than ever, with\nnew Unicode and ICU-compliant rules enabling it to work more\nconsistently with even more languages.\n\nWe describe more fully these significant changes in:\n\n- an [article about the new external pointer tokens\n  objects](https://quanteda.io/articles/pkgdown/tokens_xptr.html);\n- an [article showing performance\n  benchmarks](https://quanteda.io/articles/pkgdown/benchmarks_xptr.html)\n  for the new external pointer tokens objects, as well as some of the\n  tokeniser improvements in v4; and\n- the [changelog for\n  v4](https://github.com/quanteda/quanteda/blob/master/NEWS.md#quanteda-40)\n  a full listing of the changes, improvements, and deprecations in v4.\n\n## The **quanteda** family of packages\n\nWe completed the trend of splitting **quanteda** into modular packages\nwith the release of v3. The quanteda family of packages includes the\nfollowing:\n\n- [**quanteda**](https://github.com/quanteda/quanteda): contains all of\n  the core natural language processing and textual data management\n  functions\n- [**quanteda.textmodels**](https://github.com/quanteda/quanteda.textmodels):\n  contains all of the text models and supporting functions, namely the\n  `textmodel_*()` functions. This was split from the main package with\n  the v2 release\n- [**quanteda.textstats**](https://github.com/quanteda/quanteda.textstats):\n  statistics for textual data, namely the `textstat_*()` functions,\n  split with the v3 release\n- [**quanteda.textplots**](https://github.com/quanteda/quanteda.textplots):\n  plots for textual data, namely the `textplot_*()` functions, split\n  with the v3 release\n\nWe are working on additional package releases, available in the meantime\nfrom our GitHub pages:\n\n- [**quanteda.sentiment**](https://github.com/quanteda/quanteda.sentiment):\n  Functions and lexicons for sentiment analysis using dictionaries\n- [**quanteda.tidy**](https://github.com/quanteda/quanteda.tidy):\n  Extensions for manipulating document variables in core **quanteda**\n  objects using your favourite **tidyverse** functions\n\nand more to come.\n\n## How To…\n\n### Install (binaries) from CRAN\n\nThe normal way from CRAN, using your R GUI or\n\n``` r\ninstall.packages(\"quanteda\") \n```\n\n**(New for quanteda v4.0)** For Linux users: Because all installations\non Linux are compiled, Linux users will first need to install the Intel\noneAPI Threading Building Blocks for parallel computing for installation\nto work.\n\nTo install TBB on Linux:\n\n``` bash\n# Fedora, CentOS, RHEL\nsudo yum install tbb-devel\n\n# Debian and Ubuntu\nsudo apt install libtbb-dev\n```\n\n### Compile from source (macOS and Windows)\n\nBecause this compiles some C++ and Fortran source code, you will need to\nhave installed the appropriate compilers to build the development\nversion.\n\nYou will also need to install TBB:\n\n**macOS:**\n\nFirst, you will need to install XCode command line tools.\n\n``` bash\nxcode-select --install\n```\n\nThen install the TBB libraries and the pkg-config utility: (after\ninstalling [Homebrew](https://brew.sh)):\n\n``` bash\nbrew install tbb pkg-config\n```\n\nFinally, you will need to install\n[gfortran](https://github.com/fxcoudert/gfortran-for-macOS/releases).\n\n**Windows:**\n\nInstall [RTools](https://cran.r-project.org/bin/windows/Rtools/), which\nincludes the TBB libraries.\n\n### Enable parallelisation\n\n**quanteda** takes advantage of parallel computing through the [TBB\n(Threading Building Blocks)\nlibrary](https://en.wikipedia.org/wiki/Threading_Building_Blocks) to\nspeed up computations. This guide provides step-by-step instructions on\nhow to set up your system for using Quanteda with parallel capabilities\non Windows, macOS, and Linux.\n\n**Windows:**\n\nDownload and install RTools from [RTools download\npage](https://cran.r-project.org/bin/windows/Rtools/).\n\n**macOS:**\n\n1.  **Install XCode Command Line Tools**\n    - Type the following command in the terminal:\n\n      ``` bash\n      xcode-select --install\n      ```\n2.  **Install Homebrew**\n    - If Homebrew is not installed, run:\n\n      ``` bash\n      /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n      ```\n3.  **Install TBB and pkg-config**\n    - After installing Homebrew, run:\n\n      ``` bash\n      brew install tbb pkg-config\n      ```\n4.  **Install gfortran**\n    - Required for compiling Fortran code, install using Homebrew:\n\n      ``` bash\n      brew install gcc\n      ```\n\n**Linux:**\n\nInstall TBB:\n\n- For Fedora, CentOS, RHEL:\n\n  ``` bash\n  sudo yum install tbb-devel\n  ```\n\n- For Debian and Ubuntu:\n\n  ``` bash\n  sudo apt install libtbb-dev\n  ```\n\nMore details are provided in the [quanteda\ndocumentation](http://quanteda.io/articles/pkgdown/parallelisation.html).\n\n### Use **quanteda**\n\nSee the [quick start\nguide](https://quanteda.io/articles/quickstart.html) to learn how to use\n**quanteda**.\n\n### Get Help\n\n- Read out documentation at <https://quanteda.io>.\n- Check out the [**quanteda**\n  cheatsheet](https://github.com/quanteda/quanteda/blob/master/tests/cheatsheet/quanteda-cheatsheet.pdf).\n- Submit a question on the **quanteda** channel on StackOverflow\n  (questions tagged as quanteda”).\n- See our [tutorial site](https://tutorials.quanteda.io/).\n\n### Cite the package\n\nBenoit, Kenneth, Kohei Watanabe, Haiyan Wang, Paul Nulty, Adam Obeng,\nStefan Müller, and Akitaka Matsuo. (2018) “[quanteda: An R package for\nthe quantitative analysis of textual\ndata](https://www.theoj.org/joss-papers/joss.00774/10.21105.joss.00774.pdf)”.\n*Journal of Open Source Software* 3(30), 774.\n<https://doi.org/10.21105/joss.00774>.\n\nFor a BibTeX entry, use the output from\n`citation(package = \"quanteda\")`.\n\n### Leave Feedback\n\nIf you like **quanteda**, please consider leaving [feedback or a\ntestimonial here](https://github.com/quanteda/quanteda/issues/461).\n\n### Contribute\n\nContributions in the form of feedback, comments, code, and bug reports\nare most welcome. How to contribute:\n\n- Fork the source code, modify, and issue a [pull\n  request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)\n  through the [project GitHub\n  page](https://github.com/quanteda/quanteda). See our [Contributor Code\n  of\n  Conduct](https://github.com/quanteda/quanteda/blob/master/CONDUCT.md)\n  and the all-important **quanteda** [Style\n  Guide](https://github.com/quanteda/quanteda/wiki/Style-guide).\n- Issues, bug reports, and wish lists: [File a GitHub\n  issue](https://github.com/quanteda/quanteda/issues).\n- Contact [the maintainer](mailto:kbenoit@lse.ac.uk) by email.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D828:241B62:17C1AF:5E63E4:6AB92E7F"},"text_sha256":"e9e2c3c9cc3b8a71ec68ccbb3caf3399522b1fdd5de8277d7a2c3391c7c2cea2"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"acl-org/acl-anthology","input_row":{"repository":"acl-org/acl-anthology","url":"https://github.com/acl-org/acl-anthology","name":"acl-anthology","owner":"acl-org","description":"Data and software for building the ACL Anthology.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":808,"issues":7411,"created_at":"2014-05-23T08:37:21Z","updated_at":"2026-09-27T08:52:37Z","first_commit_at":"2013-12-14T09:34:26Z","last_commit_at":"2026-09-22T20:35:31Z","activity_months":153.27000000000001,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:55:59.830Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"acl-org/acl-anthology","visibility":"public","created_at":"2014-05-23T08:37:21Z","updated_at":"2026-09-27T08:52:37Z","private":false,"fork":false,"archived":false,"stargazers_count":808,"open_issues_count":341,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1463","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0893:71E0C:1815AB9:1C3F09B:6AB92E7F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1462","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B4:78367:1835875:1C5FE26:6AB92E80"},"commit":{"sha":"4599b99cf2b824d1b1ea81fd8d2e66ab1309e7ef","url":"https://github.com/acl-org/acl-anthology/commit/4599b99cf2b824d1b1ea81fd8d2e66ab1309e7ef","date":"2018-04-03T20:57:20Z","author_date":"2018-04-03T20:57:20Z","committer_date":"2018-04-03T20:57:20Z","tree_sha":"e5cdb6ef4a723efb254f108b5b6239d338ee841f","message_first_line":"Merge pull request #56 from mjpost/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1461","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D1:0BA1:DACE95:10123D1:6AB92E80"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6691,"blob_sha":"612ee0bb9f5bf19a55c541e038ef4fe252973686","priority":0}],"documents":[{"path":"README.md","size":6691,"blob_sha":"612ee0bb9f5bf19a55c541e038ef4fe252973686","priority":0,"status":200,"text":"# ACL Anthology\n\n(This repo was originally wing-nus/acl and has been transferred over to acl-org as of 5 Jun 2017.  Please update accordingly.)\n\nThese are basic instructions on running the ACL Anthology Rails Application which drives http://aclanthology.info. \n\nAside from the documentation present in this codebase, usage of the software once installed is documented mostly on the [GitHub ACL Wiki](https://github.com/WING-NUS/acl/wiki)\n\nNote: If you are setting up the server and/or working on the server, please set the environment variable RAILS_ENV=production. One way is, each time you ssh to the server, run this once:\n```\n$ export RAILS_ENV=production\n```\n\n## Installation\nThese are the main steps to getting the ACL anthology running on your local machine. The whole process should take at least an hour or so, so be prepared. This is best done on any Linux based OS (MacOS, Ubuntu, Linux...) for the convience of tools used.\n\n### Prerequisites\nThe installation of this rails app assumes that you have a running Ruby on Rails installation with the following versions of core services:\n```\n  * Rails (4.0.1)\n  * Ruby (2.0.0)\n  * Bundle (1.3.5)\n  * PostgreSQL (9.3.1)\n  * Java (1.5 or higher)\n```\nIf you don't have a running copy, we strongly recommend using RVM to install Ruby, Rails and all its dependencies otherwise the process might change files and make your Rails install unusable. Also, the git command line tools or GUI are needed to clone the repository.  However, if you are using Debian, apparently using RVM causes all sorts of chaos, so you may want to skip this step.  **However, please take particular care about versions of Solr (farther down).**\n\n### Cloning\nBrowse to your designated folder and clone it using this git command (or with a git GUI tool). The process should take a while since the repository is quite big (about 150MB):\n```\n$ git clone https://github.com/WING-NUS/acl\n```\nAfter the cloning is done, go to the ACL directory and install all gems:\n```\n$ cd acl\n$ bundle install\n```\n\n### Database \nIf you don't have any other PostgreSQL database already running you need to create a username and grant the user writing access to the database. To do this open (in Debian) ``` /etc/postgresql/<version>/main/pg_hba.conf ``` in your editor and add the following line:\n\n```\n# TYPE  DATABASE  USER                    METHOD\n  local all      <database-username>      md5\n```\n\nand then re-start the database. You also need to edit the section \"production\" of the file ``` acl/config/database.yml ``` so that it uses the right database username and password.\n\nRun the following commands to initialize the database and run migrations:\n```\n$ rake db:create\n$ rake db:migrate\n```\nIngest the database with the ACL anthology information using this command:\n```\n$ rake db:seed\n```\nThis command requires Internet connectivity as it gets the data directly from the ACL website. To fully ingest the data, it will take a very long time, at least 30 mins. So you can go grab a coffie or a meal or something :) \n\nIf there is any error with the seeding process, most probably there is a problem with some of the xml files. Go to db/seeds.rb, ignore those files for the time being and inform the ACL editor to edit those xml files. In this case, or if for any reason you want to recreate and reseed the database, please use the drop command:\n```\n$ rake db:drop\n```\nAfter that you can start over and recreate the database.\n\nThis is only one of the two methods to create the database. You can [click here](https://github.com/WING-NUS/acl/wiki/Seeding-1:-Initial-database-seeding) to learn more about it or alternatively, you can use the second method: [Seeding 2: Individual elements](https://github.com/WING-NUS/acl/wiki/Seeding-2:-Individual-elements)\n\n### Indexing \n(*Indexing is a major feature in the Anthology software but requires a separate package, Solr.  The version that is currently (2016 Oct) used on the production server is Solr 3.5 which is pretty dated.  Recent versions of Solr have significantly changed architecture so it is recommended that you use 3.5 for the time being.*\n\n*We have been able to replicate Ruby on Rails install application at a number of sites, but currently (2016 Oct) not the Solr search part.  Without Solr, the search functionality will be broken and you can only use hyperlinks generated by the Rails app to find papers.*)\n\nBefore using the search functionality, we will need to run the Solr server locally and index the data. First, we will need to set the user. Open `jetty/solr/blacklight-core/conf/data-config.xml` (or just use find to find this file) and change line 5 to your current user account:\n```\nuser=\"user_account\"\npassword=\"\"\n```\nThen in the `jetty/solr/blacklight-core/conf/solrconfig.xml`, edit line 67 (it is for server only):\n```\n<str name=\"config\">/var/opt/solr/solr/blacklight-core/conf/data-config.xml<\/str>\nChange to:\n<str name=\"config\">data-config.xml<\/str>\n```\nFinally edit ``` jetty/etc/jetty.xml ``` line 80 and replace the given IP address with either your own (if you are running jetty from a different computer than the server) or ``` 127.0.0.1 ```.\n\nAfter saving all files, we can start the Solr server:\n```\n$ cd jetty; java -jar start.jar &\n```\nOpen a new terminal window and index the data:\n```\n$ rake acl:reindex_solr \n```\nYou can check the indexing process by going here (this is for the production server, and you have to be connected to SoC network):\n```\n<your server>:8983/solr/#/blacklight-core/dataimport//dataimport\n```\nAt this point, your setup is completed. You can run the Rails server to test the app. If you are not using a webserver, you can serve all request directly via Ruby. In order to do that, change line 23 in the file ``` config/environments/production.rb``` to ``` config.serve_static_assets = true ```. To run the Rails server call:\n```\n$ rake assets:precompile\n$ rails server\n```\nYou can go to the ACL rails app by going to http://localhost:3000/ in you browser.\n\n## Exporting data \n\nFor the export functions to work properly, we must first run some rake tasks to pre-generate the exported files. [Click here](https://github.com/WING-NUS/acl/wiki/Exporting) to read more about exporting.\n\n## License \nMaterials prior to 2016 here are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 International License. Permission is granted to make copies for the purposes of teaching and research. Materials published in or after 2016 are licensed on a Creative Commons Attribution 4.0 License.\n\nMin-Yen Kan (Editor, 2008-) / Steven Bird (Editor, 2001-2007) \nDeveloper team: Linh Hien Ng (linhhienng at gmail dot com), Duong Ho Tuan zamakkat at gmail dot com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4652:35999:17B72C:5E5A04:6AB92E7F"},"text_sha256":"90165382bddb6e92a90f52edd8ea206f0ae8b46dfc72fdc445f0286343af7fff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1460","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086C:62B94:17E4BBF:1C0F369:6AB92E81"},"commit":{"sha":"0b553a5e4cb485acabf45e4f7f85ee32649529bb","url":"https://github.com/acl-org/acl-anthology/commit/0b553a5e4cb485acabf45e4f7f85ee32649529bb","date":"2026-06-30T18:19:54Z","author_date":"2026-06-30T18:19:54Z","committer_date":"2026-06-30T18:19:54Z","tree_sha":"a2972a4df9929f141401a86af2c86f9cf77442e1","message_first_line":"Ingest ACL 2026 workshop proceedings (#8902)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1459","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D2:2D7D17:17A7A6A:1BD087D:6AB92E82"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7892,"blob_sha":"9c24fc63b2917a2b3b89e2bb177ac1920ba19fa2","priority":0},{"path":"data/xml/2022.legal.xml","size":22447,"blob_sha":"d5148e1c718803270fcb1ba5c0497c9f0d3a9eb8","priority":1},{"path":"data/xml/2024.legal.xml","size":18568,"blob_sha":"b6a269ed6b568d53733bdf669ccdfde20346f5fe","priority":1},{"path":"data/yaml/venues/legal.yaml","size":166,"blob_sha":"45a54a495f4b48d47f5f98c06d535323f59428aa","priority":1}],"documents":[{"path":"README.md","size":7892,"blob_sha":"9c24fc63b2917a2b3b89e2bb177ac1920ba19fa2","priority":0,"status":200,"text":"# ACL Anthology\n\n[![ACL Anthology Website](https://img.shields.io/badge/ACL_Anthology_Website-grey.svg?style=flat&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgo8c3ZnCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4wIgogICB3aWR0aD0iNjgiCiAgIGhlaWdodD0iNjgiCiAgIGlkPSJzdmcyIj4KICA8ZGVmcwogICAgIGlkPSJkZWZzNCIgLz4KICA8cGF0aAogICAgIGQ9Ik0gNDEuOTc3NTUzLC0yLjg0MjE3MDllLTAxNCBDIDQxLjk3NzU1MywxLjc2MTc4IDQxLjk3NzU1MywxLjQ0MjExIDQxLjk3NzU1MywzLjAxNTggTCA3LjQ4NjkwNTQsMy4wMTU4IEwgMCwzLjAxNTggTCAwLDEwLjUwMDc5IEwgMCwzOC40Nzg2NyBMIDAsNDYgTCA3LjQ4NjkwNTQsNDYgTCA0OS41MDA4MDIsNDYgTCA1Ni45ODc3MDgsNDYgTCA2OCw0NiBMIDY4LDMwLjk5MzY4IEwgNTYuOTg3NzA4LDMwLjk5MzY4IEwgNTYuOTg3NzA4LDEwLjUwMDc5IEwgNTYuOTg3NzA4LDMuMDE1OCBDIDU2Ljk4NzcwOCwxLjQ0MjExIDU2Ljk4NzcwOCwxLjc2MTc4IDU2Ljk4NzcwOCwtMi44NDIxNzA5ZS0wMTQgTCA0MS45Nzc1NTMsLTIuODQyMTcwOWUtMDE0IHogTSAxNS4wMTAxNTUsMTcuOTg1NzggTCA0MS45Nzc1NTMsMTcuOTg1NzggTCA0MS45Nzc1NTMsMzAuOTkzNjggTCAxNS4wMTAxNTUsMzAuOTkzNjggTCAxNS4wMTAxNTUsMTcuOTg1NzggeiAiCiAgICAgc3R5bGU9ImZpbGw6I2VkMWMyNDtmaWxsLW9wYWNpdHk6MTtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MTIuODk1NDExNDk7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46bWl0ZXI7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLWRhc2hvZmZzZXQ6MDtzdHJva2Utb3BhY2l0eToxIgogICAgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsIDExKSIKICAgICBpZD0icmVjdDIxNzgiIC8+Cjwvc3ZnPgo=)](https://aclanthology.org)\n[![GitHub contributors](https://img.shields.io/github/contributors/acl-org/acl-anthology)](https://github.com/acl-org/acl-anthology/graphs/contributors)\n[![Good first project issues](https://img.shields.io/github/issues/acl-org/acl-anthology/good%20first%20project)](https://github.com/acl-org/acl-anthology/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+project%22)\n[![License](https://img.shields.io/github/license/acl-org/acl-anthology)](LICENSE)\n[![acl-anthology on PyPI](https://img.shields.io/pypi/v/acl-anthology?logo=python&label=acl-anthology&labelColor=lightgray&color=3776AB)](https://pypi.org/project/acl-anthology/)\n\nThis repository contains:\n\n- [**Metadata for all papers, authors, and venues**](data/) on the [ACL Anthology website](https://aclanthology.org/).\n- **Code and instructions** for generating the website.\n- [**A Python package for accessing the metadata**](python/), also available on PyPI.\n\nThe official home of this repository is <https://github.com/acl-org/acl-anthology>.\n\n## Using the acl-anthology Python package\n\nPlease see the separate [README for the Python package](python/README.md) for detailed information.\n\n## Generating the Anthology website\n\nThese are basic instructions on generating the ACL Anthology website as seen on <https://aclanthology.org/>.\n\n### Prerequisites\n\nTo build the Anthology website, you will need:\n\n+ [**uv**](https://docs.astral.sh/uv/getting-started/installation/), the Python package manager\n+ [**Hugo 0.160.0**](https://gohugo.io) or higher (can be [downloaded directly\n  from their repo](https://github.com/gohugoio/hugo/releases); the ***extended\n  version*** is required!)\n+ [**Dart Sass**](https://sass-lang.com/install/), a CSS extension that is needed by Hugo.\n+ [**bibutils**](https://sourceforge.net/p/bibutils/home/Bibutils/) for creating\n  non-BibTeX citation formats (not strictly required to build the website, but\n  without them you need to invoke the build steps manually as laid out in the\n  [detailed README](README_detailed.md))\n\n### Building and deployment with GitHub\n\nThere is a GitHub actions action performing deployment directly from GitHub.  To use this, you need to\ndefine this variable in your repository settings (web interface: settings -> secrets):\n\n+ `PUBLISH_SSH_KEY`: the secret key in standard pem format for authentication (without a passphrase)\n\nGitHub will then automatically build and deploy the current master whenever the master branch changes.\nThis is done via the `upload` target in the Makefile.\n\n### Cloning\n\nClone the Anthology repo to your local machine:\n\n```bash\n$ git clone https://github.com/acl-org/acl-anthology\n```\n\n### Generating\n\nProvided you have correctly installed all requirements, building the website\nshould be as simple running `make` from the directory to which\nyou cloned the repo.\n\nThe fully generated website will be in `build/anthology` afterwards.  If any errors\noccur during this step, you can consult the [detailed\nREADME](README_detailed.md) for more information on the individual steps\nperformed to build the site.  You can see the resulting website by launching\na local webserver with `make serve`, which will serve it at http://localhost:8000.\n\nNote that building the website is quite a resource-intensive process;\nparticularly the last step, invoking Hugo, uses about 18~GB of system memory.\nBuilding the anthology takes about 10 minutes on a laptop with an SSD.\n\n(**Note:** This does *not* mean you need this amount of RAM in your system; in\nfact, the website builds fine on a laptop with 8 GB of RAM.  The system might\ntemporarily slow down due to swapping, however.  The figure of approx. 18 GB is\nthe maximum RAM usage reported when running `hugo --minify --stepAnalysis`.)\n\nThe anthology can be viewed locally by running `hugo server` in the\n`hugo/` directory.  Note that it rebuilds the site and therefore takes\nabout a minute to start.\n\n\n## Hosting a mirror of the ACL anthology\n\nFirst, creating a mirror is slow and stresses the ACL Anthology\ninfrastructure because on initial setup you have to download every\nsingle file of the Anthology from the official webserver.  This can\ntake up to 8 hours no matter how fast *your* connection is.  So please\ndon't play around with this just for fun.\n\nIf you want to host a mirror, you have to set two environment variables:\n - `ANTHOLOGY_PREFIX` the http prefix your mirror will be reachable under\n   e.g. https://example.com/my-awesome-mirror or http://aclanthology.lst.uni-saarland.de\n   (Notice that there is no slash at the end!)\n - `ANTHOLOGYFILES` the directory under which papers, attachments etc.\n   will reside on your webserver.  This directory needs to be readable\n   by your webserver (obviously) but should not be a subdirectory\n   of the anthology mirror directory.\n\nWith these variables set, you run `make` to create the pages and `make\nmirror` to mirror all additional files into the build/anthology-files\ndirectory.  If you created a mirror before already, it will only\ndownload the missing files.\n\nIf you want to mirror the papers but not all attachments, you can run\n`make mirror-no-attachments` instead.\n\nYou then rsync the `build/website/` directory to your webserver or, if\nyou serve the mirror in a subdirectory `FOO`, you mirror\n`build/website/FOO`.  The `build/anthology-files` directory needs to\nbe rsync-ed to the `ANTHOLOGYFILES` directory of your webserver.\n\nAs you probably want to keep the mirror up to date, you can modify the\nshell script `bin/acl-mirror-cronjob.sh` to your needs.\n\nYou will need this software on the server\n - rsync\n - git\n - python3 > 3.11.0\n - hugo >= 0.160.0\n - python3-venv\n\nNote that generating the anthology takes quite a bit of RAM, so make\nsure it is available on your machine.\n\n## Contributing\n\nIf you'd like to contribute to the ACL Anthology, please take a look at:\n\n- our [Github issues page](https://github.com/acl-org/acl-anthology/issues)\n- the [detailed README](README_detailed.md) which contains more in-depth information about generating and modifying the website.\n\n## History\n\nThis repo was originally wing-nus/acl and has been transferred over to acl-org as of 5 June 2017.\n\n## License\n\nThe code for building the ACL Anthology is distributed under the [Apache License, v2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D2:3FD49:17A810:5E4A9B:6AB92E81"},"text_sha256":"1756fa47b722027b2c7986177cb2ff743bb54d4519051869620df8fbf9c30dcd"},{"path":"data/xml/2022.legal.xml","size":22447,"blob_sha":"d5148e1c718803270fcb1ba5c0497c9f0d3a9eb8","priority":1,"status":200,"text":"<?xml version='1.0' encoding='UTF-8'?>\n<collection id=\"2022.legal\">\n  <volume id=\"1\" ingest-date=\"2022-09-23\" type=\"proceedings\">\n    <meta>\n      <booktitle>Proceedings of the Workshop on Ethical and Legal Issues in Human Language Technologies and Multilingual De-Identification of Sensitive Data In Language Resources within the 13th Language Resources and Evaluation Conference<\/booktitle>\n      <editor><first>Ingo<\/first><last>Siegert<\/last><\/editor>\n      <editor><first>Mickael<\/first><last>Rigault<\/last><\/editor>\n      <editor><first>Victoria<\/first><last>Arranz<\/last><\/editor>\n      <publisher>European Language Resources Association<\/publisher>\n      <address>Marseille, France<\/address>\n      <month>June<\/month>\n      <year>2022<\/year>\n      <url hash=\"dec2ece7\">2022.legal-1<\/url>\n      <venue>legal<\/venue>\n    <\/meta>\n    <frontmatter>\n      <url hash=\"26a1c1dc\">2022.legal-1.0<\/url>\n      <bibkey>legal-2022-ethical<\/bibkey>\n    <\/frontmatter>\n    <paper id=\"1\">\n      <title>Keynote Speech - Major developments in the legal framework concerning language resources<\/title>\n      <author><first>Pawel<\/first><last>Kamocki<\/last><\/author>\n      <pages>1<\/pages>\n      <abstract>Introductory Talk for the Workshop on Legal and Ethical Issues in Human Language Technologies, LREC 2022, Marseille, 24 June 2022<\/abstract>\n      <url hash=\"7d8862a1\">2022.legal-1.1<\/url>\n      <bibkey>kamocki-2022-keynote<\/bibkey>\n    <\/paper>\n    <paper id=\"2\">\n      <title>Sentiment Analysis and Topic Modeling for Public Perceptions of Air Travel: <fixed-case>COVID<\/fixed-case> Issues and Policy Amendments<\/title>\n      <author><first>Avery<\/first><last>Field<\/last><\/author>\n      <author><first>Aparna<\/first><last>Varde<\/last><\/author>\n      <author><first>Pankaj<\/first><last>Lal<\/last><\/author>\n      <pages>2–8<\/pages>\n      <abstract>Among many industries, air travel is impacted by the COVID pandemic. Airlines and airports rely on public sector information to enforce guidelines for ensuring health and safety of travelers. Such guidelines can be policy amendments or laws during the pandemic. In response to the inception of COVID preventive policies, travelers have exercised freedom of expression via the avenue of online reviews. This avenue facilitates voicing public concern while anonymizing / concealing user identity as needed. It is important to assess opinions on policy amendments to ensure transparency and openness, while also preserving confidentiality and ethics. Hence, this study leverages data science to analyze, with identity protection, the online reviews of airlines and airports since 2017, considering impacts of COVID issues and relevant policy amendments since 2020. Supervised learning with VADER sentiment analysis is deployed to predict changes in opinion from 2017 to date. Unsupervised learning with LDA topic modeling is employed to discover air travelers’ major areas of concern before and after the pandemic. This study reveals that COVID policies have worsened public perceptions of air travel and aroused notable new concerns, affecting economics, environment and health.<\/abstract>\n      <url hash=\"66844de4\">2022.legal-1.2<\/url>\n      <bibkey>field-etal-2022-sentiment<\/bibkey>\n    <\/paper>\n    <paper id=\"3\">\n      <title>Data Protection, Privacy and <fixed-case>US<\/fixed-case> Regulation<\/title>\n      <author id=\"denise-dipersio\"><first>Denise<\/first><last>DiPersio<\/last><\/author>\n      <pages>9–16<\/pages>\n      <abstract>This paper examines the state of data protection and privacy in the United States. There is no comprehensive federal data protection or data privacy law despite bipartisan and popular support. There are several data protection bills pending in the 2022 session of the US Congress, five of which are examined in Section 2 below. Although it is not likely that any will be enacted, the growing number reflects the concerns of citizens and lawmakers about the power of big data. Recent actions against data abuses, including data breaches, litigation and settlements, are reviewed in Section 3 of this paper. These reflect the real harm caused when personal data is misused. Section 4 contains a brief US copyright law update on the fair use exemption, highlighting a recent court decision and indications of a re-thinking of the fair use analysis. In Section 5, some observations are made on the role of privacy in data protection regulation. It is argued that privacy should be considered from the start of the data collection and technology development process. Enhanced awareness of ethical issues, including privacy, through university-level data science programs will also lay the groundwork for best practices throughout the data and development cycles.<\/abstract>\n      <url hash=\"fa7eacb2\">2022.legal-1.3<\/url>\n      <bibkey>dipersio-2022-data<\/bibkey>\n    <\/paper>\n    <paper id=\"4\">\n      <title>Pseudonymisation of Speech Data as an Alternative Approach to <fixed-case>GDPR<\/fixed-case> Compliance<\/title>\n      <author><first>Pawel<\/first><last>Kamocki<\/last><\/author>\n      <author><first>Ingo<\/first><last>Siegert<\/last><\/author>\n      <pages>17–21<\/pages>\n      <abstract>The debate on the use of personal data in language resources usually focuses — and rightfully so — on anonymisation. However, this very same debate usually ends quickly with the conclusion that proper anonymisation would necessarily cause loss of linguistically valuable information. This paper discusses an alternative approach — pseudonymisation. While pseudonymisation does not solve all the problems (inasmuch as pseudonymised data are still to be regarded as personal data and therefore their processing should still comply with the GDPR principles), it does provide a significant relief, especially — but not only — for those who process personal data for research purposes. This paper describes pseudonymisation as a measure to safeguard rights and interests of data subjects under the GDPR (with a special focus on the right to be informed). It also provides a concrete example of pseudonymisation carried out within a research project at the Institute of Information Technology and Communications of the Otto von Guericke University Magdeburg.<\/abstract>\n      <url hash=\"91ff8e31\">2022.legal-1.4<\/url>\n      <bibkey>kamocki-siegert-2022-pseudonymisation<\/bibkey>\n    <\/paper>\n    <paper id=\"5\">\n      <title>Categorizing legal features in a metadata-oriented task: defining the conditions of use<\/title>\n      <author><first>Mickaël<\/first><last>Rigault<\/last><\/author>\n      <author><first>Victoria<\/first><last>Arranz<\/last><\/author>\n      <author id=\"valerie-mapelli\"><first>Valérie<\/first><last>Mapelli<\/last><\/author>\n      <author id=\"penny-labropoulou\"><first>Penny<\/first><last>Labropoulou<\/last><\/author>\n      <author id=\"stelios-piperidis\"><first>Stelios<\/first><last>Piperidis<\/last><\/author>\n      <pages>22–26<\/pages>\n      <abstract>In recent times, more attention has been brought by the Human Language Technology (HLT) community to the legal framework for making available and reusing Language Resources (LR) and tools. Licensing is now an issue that is foreseen in most research projects and that is essential to provide legal certainty for repositories when distributing resources. Some repositories such as Zenodo or Quantum Stat do not offer the possibility to search for resources by licenses which can turn the searching for relevant resources a very complex task. Other repositories such as Hugging Face propose a search feature by license which may make it difficult to figure out what use can be made of such resources. During the European Language Grid (ELG) project, we moved a step forward to link metadata with the terms and conditions of use. In this paper, we document the process we undertook to categorize legal features of licenses listed in the SPDX license list and widely used in the HLT community as well as those licenses used within the ELG platform<\/abstract>\n      <url hash=\"f19eead8\">2022.legal-1.5<\/url>\n      <bibkey>rigault-etal-2022-categorizing<\/bibkey>\n    <\/paper>\n    <paper id=\"6\">\n      <title>About Migration Flows and Sentiment Analysis on <fixed-case>T<\/fixed-case>witter data: Building the Bridge between Technical and Legal Approaches to Data Protection<\/title>\n      <author><first>Thilo<\/first><last>Gottschalk<\/last><\/author>\n      <author><first>Francesca<\/first><last>Pichierri<\/last><\/author>\n      <pages>27–37<\/pages>\n      <abstract>Sentiment analysis has always been an important driver of political decisions and campaigns across all fields. Novel technologies allow automatizing analysis of sentiments on a big scale and hence provide allegedly more accurate outcomes. With user numbers in the billions and their increasingly important role in societal discussions, social media platforms become a glaring data source for these types of analysis. Due to its public availability, the relative ease of access and the sheer amount of available data, the Twitter API has become a particularly important source to researchers and data analysts alike. Despite the evident value of these data sources, the analysis of such data comes with legal, ethical and societal risks that should be taken into consideration when analysing data from Twitter. This paper describes these risks along the technical processing pipeline and proposes related mitigation measures.<\/abstract>\n      <url hash=\"99d4e1f0\">2022.legal-1.6<\/url>\n      <bibkey>gottschalk-pichierri-2022-migration<\/bibkey>\n    <\/paper>\n    <paper id=\"7\">\n      <title>Transparency and Explainability of a Machine Learning Model in the Context of Human Resource Management<\/title>\n      <author><first>Sebastien<\/first><last>Delecraz<\/last><\/author>\n      <author><first>Loukman<\/first><last>Eltarr<\/last><\/author>\n      <author><first>Olivier<\/first><last>Oullier<\/last><\/author>\n      <pages>38–43<\/pages>\n      <abstract>We introduce how the proprietary machine learning algorithms developed by Gojob, an HR Tech company, to match candidates to a job offer are as transparent and explainable as possible to users (i.e., our recruiters) and our clients (e.g. companies looking to fill jobs). We detail how our matching algorithm (which identifies the best candidates for a job offer) controls the fairness of its outcome. We have described the steps we have taken to ensure that the decisions made by our mathematical models not only inform but improve the performance of our recruiters.<\/abstract>\n      <url hash=\"e5d5a027\">2022.legal-1.7<\/url>\n      <bibkey>delecraz-etal-2022-transparency<\/bibkey>\n    <\/paper>\n    <paper id=\"8\">\n      <title>Public Interactions with Voice Assistant – Discussion of Different One-Shot Solutions to Preserve Speaker Privacy<\/title>\n      <author><first>Ingo<\/first><last>Siegert<\/last><\/author>\n      <author><first>Yamini<\/first><last>Sinha<\/last><\/author>\n      <author><first>Gino<\/first><last>Winkelmann<\/last><\/author>\n      <author><first>Oliver<\/first><last>Jokisch<\/last><\/author>\n      <author><first>Andreas<\/first><last>Wendemuth<\/last><\/author>\n      <pages>44–47<\/pages>\n      <abstract>In recent years, the use of voice assistants has rapidly grown. Hereby, above all, the user’s speech data is stored and processed on a cloud platform, being the decisive factor for a good performance in speech processing and understanding. Although usually, they can be found in private households, a lot of business cases are also employed using voice assistants for public places, be it as an information service, a tour guide, or a booking system. As long as the systems are used in private spaces, it could be argued that the usage is voluntary and that the user itself is responsible for what is processed by the voice assistant system. When leaving the private space, the voluntary use is not the case anymore, as users may be made aware that their voice is processed in the cloud and background voices can be unintendedly recorded and processed as well. Thus, the usage of voice assistants in public environments raises a lot of privacy concerns. In this contribution, we discuss possible anonymization solutions to hide the speakers’ identity, thus allowing a safe cloud processing of speech data. Thereby, we promote the public use of voice assistants.<\/abstract>\n      <url hash=\"4588bb37\">2022.legal-1.8<\/url>\n      <bibkey>siegert-etal-2022-public<\/bibkey>\n    <\/paper>\n    <paper id=\"9\">\n      <title>Keynote Speech - Voice anonymization and the <fixed-case>GDPR<\/fixed-case><\/title>\n      <author><first>Brij Mohan Lal<\/first><last>Srivastava<\/last><\/author>\n      <pages>48<\/pages>\n      <abstract>Talk for the Workshop on Legal and Ethical Issues in Human Language Technologies, LREC 2022, Marseille, 24 June 2022<\/abstract>\n      <url hash=\"a66f3ac7\">2022.legal-1.9<\/url>\n      <bibkey>srivastava-2022-keynote<\/bibkey>\n    <\/paper>\n    <paper id=\"10\">\n      <title>Cross-Clinic De-Identification of <fixed-case>S<\/fixed-case>wedish Electronic Health Records: Nuances and Caveats<\/title>\n      <author><first>Olle<\/first><last>Bridal<\/last><\/author>\n      <author><first>Thomas<\/first><last>Vakili<\/last><\/author>\n      <author><first>Marina<\/first><last>Santini<\/last><\/author>\n      <pages>49–52<\/pages>\n      <abstract>Privacy preservation of sensitive information is one of the main concerns in clinical text mining. Due to the inherent privacy risks of handling clinical data, the clinical corpora used to create the clinical Named Entity Recognition (NER) models underlying clinical de-identification systems cannot be shared. This situation implies that clinical NER models are trained and tested on data originating from the same institution since it is rarely possible to evaluate them on data belonging to a different organization. These restrictions on sharing make it very difficult to assess whether a clinical NER model has overfitted the data or if it has learned any undetected biases. This paper presents the results of the first-ever cross-institution evaluation of a Swedish de-identification system on Swedish clinical data. Alongside the encouraging results, we discuss differences and similarities across EHR naming conventions and NER tagsets.<\/abstract>\n      <url hash=\"e2e0c454\">2022.legal-1.10<\/url>\n      <bibkey>bridal-etal-2022-cross<\/bibkey>\n    <\/paper>\n    <paper id=\"11\">\n      <title>Generating Realistic Synthetic Curricula Vitae for Machine Learning Applications under Differential Privacy<\/title>\n      <author><first>Andrea<\/first><last>Bruera<\/last><\/author>\n      <author><first>Francesco<\/first><last>Alda<\/last><\/author>\n      <author><first>Francesco<\/first><last>Di Cerbo<\/last><\/author>\n      <pages>53–63<\/pages>\n      <abstract>Applications involving machine learning in Human Resources (HR, the management of human talent in order to accomplish organizational goals) must respect the privacy of the individuals whose data is being used. This is a difficult aim, given the extremely personal nature of text data handled by HR departments, such as Curricula Vitae (CVs).<\/abstract>\n      <url hash=\"258422b1\">2022.legal-1.11<\/url>\n      <bibkey>bruera-etal-2022-generating<\/bibkey>\n    <\/paper>\n    <paper id=\"12\">\n      <title><fixed-case>MAPA<\/fixed-case> Project: Ready-to-Go Open-Source Datasets and Deep Learning Technology to Remove Identifying Information from Text Documents<\/title>\n      <author><first>Victoria<\/first><last>Arranz<\/last><\/author>\n      <author id=\"khalid-choukri\"><first>Khalid<\/first><last>Choukri<\/last><\/author>\n      <author><first>Montse<\/first><last>Cuadros<\/last><\/author>\n      <author><first>Aitor<\/first><last>García Pablos<\/last><\/author>\n      <author><first>Lucie<\/first><last>Gianola<\/last><\/author>\n      <author><first>Cyril<\/first><last>Grouin<\/last><\/author>\n      <author><first>Manuel<\/first><last>Herranz<\/last><\/author>\n      <author id=\"patrick-paroubek\"><first>Patrick<\/first><last>Paroubek<\/last><\/author>\n      <author id=\"pierre-zweigenbaum\"><first>Pierre<\/first><last>Zweigenbaum<\/last><\/author>\n      <pages>64–72<\/pages>\n      <abstract>This paper presents the outcomes of the MAPA project, a set of annotated corpora for 24 languages of the European Union and an open-source customisable toolkit able to detect and substitute sensitive information in text documents from any domain, using state-of-the art, deep learning-based named entity recognition techniques. In the context of the project, the toolkit has been developed and tested on administrative, legal and medical documents, obtaining state-of-the-art results. As a result of the project, 24 dataset packages have been released and the de-identification toolkit is available as open source.<\/abstract>\n      <url hash=\"921a51db\">2022.legal-1.12<\/url>\n      <bibkey>arranz-etal-2022-mapa<\/bibkey>\n    <\/paper>\n    <paper id=\"13\">\n      <title><fixed-case>P<\/fixed-case>ri<fixed-case>PA<\/fixed-case>: A Tool for Privacy-Preserving Analytics of Linguistic Data<\/title>\n      <author><first>Jeremie<\/first><last>Clos<\/last><\/author>\n      <author><first>Emma<\/first><last>McClaughlin<\/last><\/author>\n      <author><first>Pepita<\/first><last>Barnard<\/last><\/author>\n      <author><first>Elena<\/first><last>Nichele<\/last><\/author>\n      <author><first>Dawn<\/first><last>Knight<\/last><\/author>\n      <author><first>Derek<\/first><last>McAuley<\/last><\/author>\n      <author><first>Svenja<\/first><last>Adolphs<\/last><\/author>\n      <pages>73–78<\/pages>\n      <abstract>The days of large amorphous corpora collected with armies of Web crawlers and stored indefinitely are, or should be, coming to an end. There is a wealth of hidden linguistic information that is increasingly difficult to access, hidden in personal data that would be unethical and technically challenging to collect using traditional methods such as Web crawling and mass surveillance of online discussion spaces. Advances in privacy regulations such as GDPR and changes in the public perception of privacy bring into question the problematic ethical dimension of extracting information from unaware if not unwilling participants. Modern corpora need to adapt, be focused on testing specific hypotheses, and be respectful of the privacy of the people who generated its data. Our work focuses on using a distributed participatory approach and continuous informed consent to solve these issues, by allowing participants to voluntarily contribute their own censored personal data at a granular level. We evaluate our approach in a three-pronged manner, testing the accuracy of measurement of statistical measures of language with respect to standard corpus linguistics tools, evaluating the usability of our application with a participant involvement panel, and using the tool for a case study on health communication.<\/abstract>\n      <url hash=\"dc88697c\">2022.legal-1.13<\/url>\n      <bibkey>clos-etal-2022-pripa<\/bibkey>\n    <\/paper>\n    <paper id=\"14\">\n      <title>Legal and Ethical Challenges in Recording Air Traffic Control Speech<\/title>\n      <author><first>Mickaël<\/first><last>Rigault<\/last><\/author>\n      <author><first>Claudia<\/first><last>Cevenini<\/last><\/author>\n      <author id=\"khalid-choukri\"><first>Khalid<\/first><last>Choukri<\/last><\/author>\n      <author><first>Martin<\/first><last>Kocour<\/last><\/author>\n      <author><first>Karel<\/first><last>Veselý<\/last><\/author>\n      <author><first>Igor<\/first><last>Szoke<\/last><\/author>\n      <author><first>Petr<\/first><last>Motlicek<\/last><\/author>\n      <author><first>Juan Pablo<\/first><last>Zuluaga-Gomez<\/last><\/author>\n      <author><first>Alexander<\/first><last>Blatt<\/last><\/author>\n      <author><first>Dietrich<\/first><last>Klakow<\/last><\/author>\n      <author><first>Allan<\/first><last>Tart<\/last><\/author>\n      <author><first>Pavel<\/first><last>Kolčárek<\/last><\/author>\n      <author><first>Jan<\/first><last>Černocký<\/last><\/author>\n      <pages>79–83<\/pages>\n      <abstract>In this paper the authors detail the various legal and ethical issues faced during the ATCO2 project. This project is aimed at developing tools to automatically collect and transcribe air traffic conversations, especially conversations between pilots and air controls towers. In this paper the authors will develop issues related to intellectual property, public data, privacy, and general ethics issues related to the collection of air-traffic control speech.<\/abstract>\n      <url hash=\"f8508690\">2022.legal-1.14<\/url>\n      <bibkey>rigault-etal-2022-legal<\/bibkey>\n    <\/paper>\n    <paper id=\"15\">\n      <title>It is not Dance, is Data: Gearing Ethical Circulation of Intangible Cultural Heritage practices in the Digital Space<\/title>\n      <author><first>Jorge<\/first><last>Yánez<\/last><\/author>\n      <author><first>Amel<\/first><last>Fraisse<\/last><\/author>\n      <pages>84–91<\/pages>\n      <abstract>The documentation, protection and dissemination of Intangible Cultural Heritage (ICH) in the digital age pose significant theoretical, technological and legal challenges. Through a multidisciplinary lens, this paper presents new approaches for collecting, documenting, encrypting and protecting ICH-related data for more ethical circulation. Human-movement recognition technologies such as motion capture, allows for the recording, extraction and reproduction of human movement with unprecedented precision. The once indistinguishable or hard-to-trace reproduction of dance steps between their creators and unauthorized third parties becomes patent through the transmission of embodied knowledge, but in the form of data. This new battlefield prompted by digital technologies only adds to the disputes within the creative industries, in terms of authorship, ownership and commodification of body language. For the sake of this paper, we are aiming to disentangle the various layers present in the process of digitisation of the dancing body, to identify its by-products as well as the possible arising ownership rights that might entail. ”Who owns what?”, the basic premise of intellectual property law, is transposed, in this case, onto the various types of data generated when intangible cultural heritage, in the form of dance, is digitised through motion capture and encrypted with blockchain technologies.<\/abstract>\n      <url hash=\"266f5d5c\">2022.legal-1.15<\/url>\n      <bibkey>yanez-fraisse-2022-dance<\/bibkey>\n    <\/paper>\n  <\/volume>\n<\/collection>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2042:17E138:17BD51:5E5F33:6AB92E7E"},"text_sha256":"6224d6aa01ef914f84e17c139f99ae5fe5ec044de3d5c18342dd13a49edd3e54"},{"path":"data/xml/2024.legal.xml","size":18568,"blob_sha":"b6a269ed6b568d53733bdf669ccdfde20346f5fe","priority":1,"status":200,"text":"<?xml version='1.0' encoding='UTF-8'?>\n<collection id=\"2024.legal\">\n  <volume id=\"1\" ingest-date=\"2024-05-18\" type=\"proceedings\">\n    <meta>\n      <booktitle>Proceedings of the Workshop on Legal and Ethical Issues in Human Language Technologies @ LREC-COLING 2024<\/booktitle>\n      <editor><first>Ingo<\/first><last>Siegert<\/last><\/editor>\n      <editor id=\"khalid-choukri\"><first>Khalid<\/first><last>Choukri<\/last><\/editor>\n      <publisher>ELRA and ICCL<\/publisher>\n      <address>Torino, Italia<\/address>\n      <month>May<\/month>\n      <year>2024<\/year>\n      <url hash=\"402027cc\">2024.legal-1<\/url>\n      <venue>legal<\/venue>\n      <venue>ws<\/venue>\n    <\/meta>\n    <frontmatter>\n      <url hash=\"878d6933\">2024.legal-1.0<\/url>\n      <bibkey>legal-2024-legal<\/bibkey>\n    <\/frontmatter>\n    <paper id=\"1\">\n      <title>Compliance by Design Methodologies in the Legal Governance Schemes of <fixed-case>E<\/fixed-case>uropean Data Spaces<\/title>\n      <author><first>Kossay<\/first><last>Talmoudi<\/last><\/author>\n      <author id=\"khalid-choukri\"><first>Khalid<\/first><last>Choukri<\/last><\/author>\n      <author><first>Isabelle<\/first><last>Gavanon<\/last><\/author>\n      <pages>1–5<\/pages>\n      <abstract>Creating novel ways of sharing data to boost the digital economy has been one of the growing priorities of the European Union. In order to realise a set of data-sharing modalities, the European Union funds several projects that aim to put in place Common Data Spaces. These infrastructures are set to be a catalyser for the data economy. However, many hurdles face their implementation. Legal compliance is still one of the major ambiguities of European Common Data Spaces and many initiatives intend to proactively integrate legal compliance schemes in the architecture of sectoral Data Spaces. The various initiatives must navigate a complex web of cross-cutting legal frameworks, including contract law, data protection, intellectual property, protection of trade secrets, competition law, European sovereignty, and cybersecurity obligations. As the conceptualisation of Data Spaces evolves and shows signs of differentiation from one sector to another, it is important to showcase the legal repercussions of the options of centralisation and decentralisation that can be observed in different Data Spaces. This paper will thus delve into their legal requirements and attempt to sketch out a stepping stone for understanding legal governance in data spaces.<\/abstract>\n      <url hash=\"eabf2214\">2024.legal-1.1<\/url>\n      <bibkey>talmoudi-etal-2024-compliance<\/bibkey>\n    <\/paper>\n    <paper id=\"2\">\n      <title>A Legal Framework for Natural Language Model Training in <fixed-case>P<\/fixed-case>ortugal<\/title>\n      <author><first>Ruben<\/first><last>Almeida<\/last><\/author>\n      <author><first>Evelin<\/first><last>Amorim<\/last><\/author>\n      <pages>6–12<\/pages>\n      <abstract>Recent advances in deep learning have promoted the advent of many computational systems capable of performing intelligent actions that, until then, were restricted to the human intellect. In the particular case of human languages, these advances allowed the introduction of applications like ChatGPT that are capable of generating coherent text without being explicitly programmed to do so. Instead, these models use large volumes of textual data to learn meaningful representations of human languages. Associated with these advances, concerns about copyright and data privacy infringements caused by these applications have emerged. Despite these concerns, the pace at which new natural language processing applications continued to be developed largely outperformed the introduction of new regulations. Today, communication barriers between legal experts and computer scientists motivate many unintentional legal infringements during the development of such applications. In this paper, a multidisciplinary team intends to bridge this communication gap and promote more compliant Portuguese NLP research by presenting a series of everyday NLP use cases, while highlighting the Portuguese legislation that may arise during its development.<\/abstract>\n      <url hash=\"90be3c2b\">2024.legal-1.2<\/url>\n      <bibkey>almeida-amorim-2024-legal<\/bibkey>\n    <\/paper>\n    <paper id=\"3\">\n      <title>Intellectual property rights at the training, development and generation stages of Large Language Models<\/title>\n      <author><first>Christin<\/first><last>Kirchhübel<\/last><\/author>\n      <author><first>Georgina<\/first><last>Brown<\/last><\/author>\n      <pages>13–18<\/pages>\n      <abstract>Large Language Models (LLMs) prompt new questions around Intellectual Property (IP): what is the IP status of the datasets used to train LLMs, the resulting LLMs themselves, and their outputs? The training needs of LLMs may be at odds with current copyright law, and there are active conversations around the ownership of their outputs. A report published by the House of Lords Committee following its inquiry into LLMs and generative AI criticises, among other things, the lack of government guidance, and stresses the need for clarity (through legislation, where appropriate) in this sphere. This paper considers the little guidance and caselaw there is involving AI more broadly to allow us to anticipate legal cases and arguments involving LLMs. Given the pre-emptive nature of this paper, it is not possible to provide comprehensive answers to these questions, but we hope to equip language technology communities with a more informed understanding of the current position with respect to UK copyright and patent law.<\/abstract>\n      <url hash=\"ca1c348e\">2024.legal-1.3<\/url>\n      <bibkey>kirchhubel-brown-2024-intellectual<\/bibkey>\n    <\/paper>\n    <paper id=\"4\">\n      <title>Ethical Issues in Language Resources and Language Technology – New Challenges, New Perspectives<\/title>\n      <author><first>Pawel<\/first><last>Kamocki<\/last><\/author>\n      <author><first>Andreas<\/first><last>Witt<\/last><\/author>\n      <pages>19–23<\/pages>\n      <abstract>This article elaborates on the author’s contribution to the previous edition of the LREC conference, in which they proposed a tentative taxonomy of ethical issues that affect Language Resources (LRs) and Language Technology (LT) at the various stages of their lifecycle (conception, creation, use and evaluation). The proposed taxonomy was built around the following ethical principles: Privacy, Property, Equality, Transparency and Freedom. In this article, the authors would like to: 1) examine whether and how this taxonomy stood the test of time, in light of the recent developments in the legal framework and popularisation of Large Language Models (LLMs); 2) provide some details and a tentative checklist on how the taxonomy can be applied in practice; and 3) develop the taxonomy by adding new principles (Accountability; Risk Anticipation and Limitation; Reliability and Limited Confidence), to address the technological developments in LLMs and the upcoming Artificial Intelligence Act.<\/abstract>\n      <url hash=\"ae181518\">2024.legal-1.4<\/url>\n      <bibkey>kamocki-witt-2024-ethical<\/bibkey>\n    <\/paper>\n    <paper id=\"5\">\n      <title>Legal and Ethical Considerations that Hinder the Use of <fixed-case>LLM<\/fixed-case>s in a <fixed-case>F<\/fixed-case>innish Institution of Higher Education<\/title>\n      <author><first>Mika<\/first><last>Hämäläinen<\/last><\/author>\n      <pages>24–27<\/pages>\n      <abstract>Large language models (LLMs) make it possible to solve many business problems easier than ever before. However, embracing LLMs in an organization may be slowed down due to ethical and legal considerations. In this paper, we will describe some of these issues we have faced at our university while developing university-level NLP tools to empower teaching and study planning. The identified issues touch upon topics such as GDPR, copyright, user account management and fear towards the new technology.<\/abstract>\n      <url hash=\"d5659e0f\">2024.legal-1.5<\/url>\n      <bibkey>hamalainen-2024-legal<\/bibkey>\n    <\/paper>\n    <paper id=\"6\">\n      <title>Implications of Regulations on Large Generative <fixed-case>AI<\/fixed-case> Models in the Super-Election Year and the Impact on Disinformation<\/title>\n      <author><first>Vera<\/first><last>Schmitt<\/last><\/author>\n      <author><first>Jakob<\/first><last>Tesch<\/last><\/author>\n      <author><first>Eva<\/first><last>Lopez<\/last><\/author>\n      <author><first>Tim<\/first><last>Polzehl<\/last><\/author>\n      <author><first>Aljoscha<\/first><last>Burchardt<\/last><\/author>\n      <author><first>Konstanze<\/first><last>Neumann<\/last><\/author>\n      <author><first>Salar<\/first><last>Mohtaj<\/last><\/author>\n      <author><first>Sebastian<\/first><last>Möller<\/last><\/author>\n      <pages>28–38<\/pages>\n      <abstract>With the rise of Large Generative AI Models (LGAIMs), disinformation online has become more concerning than ever before. Within the super-election year 2024, the influence of mis- and disinformation can severely influence public opinion. To combat the increasing amount of disinformation online, humans need to be supported by AI-based tools to increase the effectiveness of detecting false content. This paper examines the critical intersection of the AI Act with the deployment of LGAIMs for disinformation detection and the implications from research, deployer, and the user’s perspective. The utilization of LGAIMs for disinformation detection falls under the high-risk category defined in the AI Act, leading to several obligations that need to be followed after the enforcement of the AI Act. Among others, the obligations include risk management, transparency, and human oversight which pose the challenge of finding adequate technical interpretations. Furthermore, the paper articulates the necessity for clear guidelines and standards that enable the effective, ethical, and legally compliant use of AI. The paper contributes to the discourse on balancing technological advancement with ethical and legal imperatives, advocating for a collaborative approach to utilizing LGAIMs in safeguarding information integrity and fostering trust in digital ecosystems.<\/abstract>\n      <url hash=\"19ed3df7\">2024.legal-1.6<\/url>\n      <bibkey>schmitt-etal-2024-implications<\/bibkey>\n    <\/paper>\n    <paper id=\"7\">\n      <title>Selling Personal Information: Data Brokers and the Limits of <fixed-case>US<\/fixed-case> Regulation<\/title>\n      <author id=\"denise-dipersio\"><first>Denise<\/first><last>DiPersio<\/last><\/author>\n      <pages>39–46<\/pages>\n      <abstract>A principal pillar of the US Blueprint for an AI Bill of Rights is data privacy, specifically, that individuals should be protected from abusive practices by data collectors and data aggregators, and that users should have control over how their personal information is collected and used. An area that spotlights the need for such protections is found in the common practices of data brokers who scrape, purchase, process and reassemble personal information in bulk and sell it for a variety of downstream uses. Such activities almost always occur in the absence of users’ knowledge or meaningful consent, yet they are legal under US law. This paper examines how data brokers operate, provides some examples of recent US regulatory actions taken against them, summarizes federal efforts to redress data broker practices and concludes that as long as there continues to be no comprehensive federal data protection and privacy scheme, efforts to control such behavior will have only a limited effect. This paper also addresses the limits of informed consent on the use of personal information in language resources and suggests a solution in an holistic approach to data protection and privacy across the data/development life cycle.<\/abstract>\n      <url hash=\"497860df\">2024.legal-1.7<\/url>\n      <bibkey>dipersio-2024-selling<\/bibkey>\n    <\/paper>\n    <paper id=\"8\">\n      <title>What Can <fixed-case>I<\/fixed-case> Do with this Data Point? Towards Modeling Legal and Ethical Aspects of Linguistic Data Collection and (Re-)use<\/title>\n      <author><first>Annett<\/first><last>Jorschick<\/last><\/author>\n      <author><first>Paul T.<\/first><last>Schrader<\/last><\/author>\n      <author><first>Hendrik<\/first><last>Buschmeier<\/last><\/author>\n      <pages>47–51<\/pages>\n      <abstract>Linguistic data often inherits characteristics that limit open science practices such as data publication, sharing, and reuse. Part of the problem is researchers’ uncertainty about the legal requirements, which need to be considered at the beginning of study planning, when consent forms for participants, ethics applications, and data management plans need to be written. This paper presents a newly funded project that will develop a research data management infrastructure that will provide automated support to researchers in the planning, collection, storage, use, reuse, and sharing of data, taking into account ethical and legal aspects to encourage open science practices.<\/abstract>\n      <url hash=\"17e33536\">2024.legal-1.8<\/url>\n      <bibkey>jorschick-etal-2024-data<\/bibkey>\n    <\/paper>\n    <paper id=\"9\">\n      <title>Data-Envelopes for Cultural Heritage: Going beyond Datasheets<\/title>\n      <author><first>Mrinalini<\/first><last>Luthra<\/last><\/author>\n      <author><first>Maria<\/first><last>Eskevich<\/last><\/author>\n      <pages>52–65<\/pages>\n      <abstract>Cultural heritage data is a rich source of information about the history and culture development in the past. When used with due understanding of its intrinsic complexity it can both support research in social sciences and humanities, and become input for machine learning and artificial intelligence algorithms. In all cases ethical and contextual considerations can be encouraged when the relevant information is provided in a clear and well structured form to potential users before they begin to interact with the data. Proposed data-envelopes, basing on the existing documentation frameworks, address the particular needs and challenges of the cultural heritage field while combining machine-readability and user-friendliness. We develop and test data-envelopes usability on the data from the Huygens Institute for History and Culture of the Netherlands. This paper presents the following contributions: i) we highlight the complexity of CH data, featuring the unique ethical and contextual considerations they entail; ii) we evaluate and compare existing dataset documentation frameworks, examining their suitability for CH datasets; iii) we introduce the “data-envelope”–a machine readable adaptation of existing dataset documentation frameworks, to tackle the specificities of CH datasets. Its modular form is designed to serve not only the needs of machine learning (ML), but also and especially broader user groups varying from humanities scholars, governmental monitoring authorities to citizen scientists and the general public. Importantly, the data-envelope framework emphasises the legal and ethical dimensions of dataset documentation, facilitating compliance with evolving data protection regulations and enhancing the accountability of data stewardship in the cultural heritage sector. We discuss and invite the readers for further conversation on the topic of ethical considerations, and how the different audiences should be informed about the importance of datasets documentation management and their context.<\/abstract>\n      <url hash=\"ec3fd042\">2024.legal-1.9<\/url>\n      <bibkey>eskevich-luthra-2024-data<\/bibkey>\n    <\/paper>\n    <paper id=\"10\">\n      <title>Emotional Toll and Coping Strategies: Navigating the Effects of Annotating Hate Speech Data<\/title>\n      <author><first>Maryam M.<\/first><last>AlEmadi<\/last><\/author>\n      <author><first>Wajdi<\/first><last>Zaghouani<\/last><\/author>\n      <pages>66–72<\/pages>\n      <abstract>Freedom of speech on online social media platforms, often comes with the cost of hate speech production. Hate speech can be very harmful to the peace and development of societies as they bring about conflict and encourage crime. To regulate the hate speech content, moderators and annotators are employed. In our research, we look at the effects of prolonged exposure to hate speech on the mental and physical health of these annotators, as well as researchers with work revolving around the topic of hate speech. Through the methodology of analyzing literature, we found that prolonged exposure to hate speech does mentally and physically impact annotators and researchers in this field. We also propose solutions to reduce these negative impacts such as providing mental health services, fair labor practices, psychological assessments and interventions, as well as developing AI to assist in the process of hate speech detection.<\/abstract>\n      <url hash=\"9b0dd575\">2024.legal-1.10<\/url>\n      <bibkey>alemadi-zaghouani-2024-emotional<\/bibkey>\n    <\/paper>\n    <paper id=\"11\">\n      <title>User Perspective on Anonymity in Voice Assistants – A comparison between <fixed-case>G<\/fixed-case>ermany and <fixed-case>F<\/fixed-case>inland<\/title>\n      <author><first>Ingo<\/first><last>Siegert<\/last><\/author>\n      <author><first>Silas<\/first><last>Rech<\/last><\/author>\n      <author><first>Tom<\/first><last>Bäckström<\/last><\/author>\n      <author><first>Matthias<\/first><last>Haase<\/last><\/author>\n      <pages>73–78<\/pages>\n      <abstract>This study investigates the growing importance of voice assistants, particularly focusing on their usage patterns and associated user characteristics, trust perceptions, and concerns about data security. While previous research has identified correlations between the use of voice assistants and trust in these technologies, as well as data security concerns, little evidence exists regarding the relationship between individual user traits and perceived trust and security concerns. The study design involves surveying various user attributes, including technical proficiency, personality traits, and experience with digital technologies, alongside attitudes toward and usage of voice assistants. A comparison between Germany and Finland is conducted to explore potential cultural differences. The findings aim to inform strategies for enhancing voice assistant acceptance, including the implementation of anonymization methods.<\/abstract>\n      <url hash=\"f8c764bf\">2024.legal-1.11<\/url>\n      <bibkey>siegert-etal-2024-user<\/bibkey>\n    <\/paper>\n  <\/volume>\n<\/collection>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6788:149227:183C82:5EDF63:6AB92E83"},"text_sha256":"9c106cdc67f4f8c6d510788ce7901d8a6e871badd3eaf437961160bee0983f40"},{"path":"data/yaml/venues/legal.yaml","size":166,"blob_sha":"45a54a495f4b48d47f5f98c06d535323f59428aa","priority":1,"status":200,"text":"acronym: LEGAL\nname: Workshop on Ethical and Legal Issues in Human Language Technologies and Multilingual\n  De-Identification of Sensitive Data In Language Resources\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:179A8F:5E390E:6AB92E7E"},"text_sha256":"3271896030a7b853bc0e17d80d50f2539937ae1f7150eea5599542fdedbde475"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":1,"C4":0,"C5":0,"C6":0,"C7":1,"D1":1,"score":4,"D1_evidence":"sha=0b553a5e4cb485acabf45e4f7f85ee32649529bb; file=data/xml/2022.legal.xml; text=49–52 Privacy preservation of sensitive information is one of the main concerns in clinical text mining. Due to the inherent privacy risks of handling clinical data, the clinical corpora used to create the clinical Named Entity Recognition (NER) models underlying clinical de-identification systems cannot be shared. This situation implies that clinical NER models are trained and tested on data originating from the same institution since it is rarely possible to evaluate them on data belonging to a different organization. These restrictions on sharing make it very difficult to assess whether a clinical NER model has overfitted the data or if it","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C2":"sha=0b553a5e4cb485acabf45e4f7f85ee32649529bb; file=data/xml/2022.legal.xml; text=49–52 Privacy preservation of sensitive information is one of the main concerns in clinical text mining. Due to the inherent privacy risks of handling clinical data, the clinical corpora used to create the clinical Named Entity Recognition (NER) models underlying clinical de-identification systems cannot be shared. This situation implies that clinical NER models are trained and tested on data originating from the same institution since it is rarely possible to evaluate them on data belonging to a different organization. These restrictions on sharing make it very difficult to assess whether a clinical NER model has overfitted the data or if it","C3":"sha=0b553a5e4cb485acabf45e4f7f85ee32649529bb; file=data/xml/2022.legal.xml; text=f extracting information from unaware if not unwilling participants. Modern corpora need to adapt, be focused on testing specific hypotheses, and be respectful of the privacy of the people who generated its data. Our work focuses on using a distributed participatory approach and continuous informed consent to solve these issues, by allowing participants to voluntarily contribute their own censored personal data at a granular level. We evaluate our approach in a three-pronged manner, testing the accuracy of measurement of statistical measures of language with respect to standard corpus linguistics tools, evaluating the usability of our applica","C7":"sha=0b553a5e4cb485acabf45e4f7f85ee32649529bb; file=data/xml/2022.legal.xml; text=2022.legal-1.12 arranz-etal-2022-mapa P ri PA : A Tool for Privacy-Preserving Analytics of Linguistic Data Jeremie Clos Emma McClaughlin","C1":"sha=0b553a5e4cb485acabf45e4f7f85ee32649529bb; file=data/xml/2024.legal.xml; text=Denise DiPersio 39–46 A principal pillar of the US Blueprint for an AI Bill of Rights is data privacy, specifically, that individuals should be protected from abusive practices by data collectors and data aggregators, and that users should have control over how their personal information is collected and used. An area that spotlights the need for such protections is found in the common practices of data brokers who scrape, purchase, process and reassemble personal information in bulk and sell it for a variety of downstream uses. Such activities almost always occur in the absence of users’ knowledge or meaningful consent, yet they are legal un"}}}}
{"repository":"hellostealth/stealth","input_row":{"repository":"hellostealth/stealth","url":"https://github.com/hellostealth/stealth","name":"stealth","owner":"hellostealth","description":"An open source Ruby framework for text and voice chatbots. 🤖","language":"Ruby","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":598,"issues":102,"created_at":"2017-09-12T02:57:19Z","updated_at":"2026-09-25T11:19:50Z","first_commit_at":"2017-09-14T02:14:24Z","last_commit_at":"2025-08-18T21:45:44Z","activity_months":95.129999999999995,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:04.608Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hellostealth/stealth","visibility":"public","created_at":"2017-09-12T02:57:19Z","updated_at":"2026-09-25T11:19:50Z","private":false,"fork":false,"archived":false,"stargazers_count":598,"open_issues_count":22,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1458","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B1:73962:17FB525:1C25788:6AB92E84"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1457","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086D:6C6ED:181622E:1C4060D:6AB92E85"},"commit":{"sha":"bcb896012961cb3d48c64fa386a746483195516b","url":"https://github.com/hellostealth/stealth/commit/bcb896012961cb3d48c64fa386a746483195516b","date":"2018-05-24T16:26:25Z","author_date":"2018-05-24T16:26:25Z","committer_date":"2018-05-24T16:26:25Z","tree_sha":"dc89b4d97a554822377d2744d54c58e096a3fc20","message_first_line":"Merge pull request #66 from ignaciosiri/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1456","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0807:7418C:183ACE3:1C655F4:6AB92E85"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2118,"blob_sha":"6e80e73fa544833a2d67a0fef4f1b1636d99c780","priority":0}],"documents":[{"path":"README.md","size":2118,"blob_sha":"6e80e73fa544833a2d67a0fef4f1b1636d99c780","priority":0,"status":200,"text":"# <a href='https://hellostealth.org'><img src='logo.svg' height='120' alt='Stealth Logo' aria-label='hellostealth.org' /><\/a>\n\nStealth is a Ruby based framework for creating conversational (voice & chat) bots. It's design is inspired by Ruby on Rails's philosophy of convention over configuration. It has an MVC architecture with the slight caveat that `views` are aptly named `replies`.\n\n## Getting Started\n\nGetting started with Stealth is simple:\n\n```\n> gem install stealth\n> stealth new <bot>\n```\n\n## Service Integrations\n\nStealth is extensible. All service integrations are split out into separate Ruby Gems. Things like analytics and natural language processing ([NLP](https://en.wikipedia.org/wiki/Natural-language_processing)) can be added in as gems as well.\n\nCurrently, there are gems for:\n\n### Messaging\n* [Facebook Messenger](https://github.com/hellostealth/stealth-facebook)\n* [Twilio SMS](https://github.com/hellostealth/stealth-twilio)\n\n### Natural Language Processing\n* [AWS Comprehend](https://github.com/hellostealth/stealth-aws-comprehend)\n\n### Analytics\n* [Mixpanel](https://github.com/hellostealth/stealth-mixpanel)\n\n## Docs\n\nYou can find our full docs [here](https://hellostealth.org/docs).\n\n## Thanks\n\nStealth wouldn't exist without the great work of many other open source projects and people including:\n\n* [Ruby](https://www.ruby-lang.org/) for creating our favorite programming language;\n* [Ruby on Rails](http://rubyonrails.org) for projects like `ActiveRecord` and serving as an inspiration;\n* [Thor](http://whatisthor.com) for providing us with CLI tools and generators;\n* [Sinatra](http://sinatrarb.com) for providing a fantastic, modular way for handling HTTP requests;\n* [Sidekiq](https://sidekiq.org) for the super quick background jobs;\n* [standalone-migrations](https://github.com/thuss/standalone-migrations) for the help with Rails migrations;\n* [Dr. Robert Ford](http://westworld.wikia.com/wiki/Robert_Ford) a.k.a. Anthony Hopkins.\n\n## License\n\n\"Stealth\" and the Stealth logo are copyright (c) 2018 The Black Ops Bureau Inc.\n\nStealth source code is released under the MIT License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4D28:3FD49:17A82F:5E4B02:6AB92E84"},"text_sha256":"059d185ebce731121fbf07badfa15cb9931e58ece1f4ec42a14932efeda65938"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1455","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084B:74C18:182F050:1C59D39:6AB92E86"},"commit":{"sha":"c23ca410601da3149a411334e38d77658185ad31","url":"https://github.com/hellostealth/stealth/commit/c23ca410601da3149a411334e38d77658185ad31","date":"2025-08-18T21:45:44Z","author_date":"2025-08-18T21:45:44Z","committer_date":"2025-08-18T21:45:44Z","tree_sha":"55bcf229fb3170674d83057725c0b2f902b83986","message_first_line":"Fix redis connection url (#450)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1454","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0784:71C58:17DCECA:1C07B3F:6AB92E86"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2616,"blob_sha":"719bde41acd31ab76454dce615cca5e1c8a4892a","priority":0},{"path":"SECURITY.md","size":507,"blob_sha":"e1c08fc866a96226b902d2962900ddfc46176e1d","priority":1}],"documents":[{"path":"README.md","size":2616,"blob_sha":"719bde41acd31ab76454dce615cca5e1c8a4892a","priority":0,"status":200,"text":"# <a href='https://hellostealth.org'><img src='logo.svg' height='120' alt='Stealth Logo' aria-label='hellostealth.org' /><\/a>\n\nStealth is a Ruby framework for creating text and voice chatbots. It's design is inspired by Ruby on Rails's philosophy of convention over configuration. It has an MVC architecture with the slight caveat that `views` are aptly named `replies`.\n\n![CircleCI](https://img.shields.io/circleci/build/github/hellostealth/stealth?style=for-the-badge)\n![Gem (including prereleases)](https://img.shields.io/gem/v/stealth?include_prereleases&style=for-the-badge)\n\n## Features\n\n* Deploy anywhere, it's just a Rack app\n* Variants allow you to use a single codebase on multiple messaging platforms\n* Structured, universal reply format\n* Sessions utilize a state-machine concept and are Redis backed\n* Highly scalable. Incoming webhooks are processed via a Sidekiq queue\n* Built-in best practices: catch-alls (error handling), hello flows, goodbye flows\n\n## Getting Started\n\nGetting started with Stealth is simple:\n\n```\n> gem install stealth\n> stealth new <bot>\n```\n\n## Service Integrations\n\nStealth is extensible. All service integrations are split out into separate Ruby Gems. Things like analytics and natural language processing ([NLP](https://en.wikipedia.org/wiki/Natural-language_processing)) can be added in as gems as well.\n\nCurrently, there are gems for:\n\n### Messaging\n* [Facebook Messenger](https://github.com/hellostealth/stealth-facebook)\n* [Twilio SMS](https://github.com/hellostealth/stealth-twilio)\n* [Bandwidth](https://github.com/hellostealth/stealth-bandwidth) \n* [Smooch](https://github.com/hellostealth/stealth-smooch)\n\n### Voice\n* [Alexa Skill](https://github.com/hellostealth/stealth-alexa) (Early alpha)\n\n### Natural Language Processing\n* [Microsoft LUIS](https://github.com/hellostealth/stealth-luis)\n* [AWS Comprehend](https://github.com/hellostealth/stealth-aws-comprehend)\n\n### Analytics\n* [Mixpanel](https://github.com/hellostealth/stealth-mixpanel)\n\n## Docs\n\nYou can find our full docs [here](https://github.com/hellostealth/stealth/wiki). If something is not clear in the docs, please file an issue! We consider all shortcomings in the docs as bugs.\n\n## Versioning\n\nStealth is versioned using [Semantic Versioning](https://semver.org), but it's more like the Linux Kernel. Major version releases are just as arbitrary as minor version releases. We strive to never break anything with any version change. Patches are still issues as the \"third dot\" in the version string.\n\n## License\n\n\"Stealth\" and the Stealth logo are Copyright (c) 2017-2024 MAV Automated Ventures Inc.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C464:7A4F8:184BC7:5EEEC4:6AB92E86"},"text_sha256":"2678bdb06c52f85fedd74c5516184fc7f958b5d888ed235fe98b5ebf979807ed"},{"path":"SECURITY.md","size":507,"blob_sha":"e1c08fc866a96226b902d2962900ddfc46176e1d","priority":1,"status":200,"text":"## Security Policy\n\n<a href='https://hiremav.com/security'><img src='logo.svg' height='120' alt='Stealth Logo' aria-label='Stealth security' /><\/a>\n\n## Reporting a Vulnerability\n\n**Do not open up a GitHub issue if the bug is a security vulnerability in Stealth**.\n\nInstead, please refer to Mav's [security policy](https://hiremav.com/security).\n\n## Supported Versions\n\nPlease see our [maintenance policy](https://github.com/hellostealth/stealth/blob/master/MAINTENANCE.md) for currently supported versions.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DDA0:3AC5A:181259:5EB4B1:6AB92E71"},"text_sha256":"5e4c67b49d7f70b523f11d8c0440642b9a142e59c01ee25b30a215a8e5485509"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"malaysia-ai/malaya","input_row":{"repository":"malaysia-ai/malaya","url":"https://github.com/malaysia-ai/malaya","name":"malaya","owner":"malaysia-ai","description":" Natural Language Toolkit for Malaysian language, https://malaya.readthedocs.io/","language":"Jupyter Notebook","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":530,"issues":140,"created_at":"2018-03-12T02:23:35Z","updated_at":"2026-09-07T10:15:53Z","first_commit_at":"2018-03-12T02:23:35Z","last_commit_at":"2026-03-26T00:34:10Z","activity_months":96.450000000000003,"ai_ml_match_topics":"natural-language-processing","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:07.663Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"malaysia-ai/malaya","visibility":"public","created_at":"2018-03-12T02:23:35Z","updated_at":"2026-09-07T10:15:53Z","private":false,"fork":false,"archived":false,"stargazers_count":530,"open_issues_count":6,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1453","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090E:3BE445:17B761E:1BE0ABD:6AB92E87"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1452","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B2:1DB627:1899131:1CC3E83:6AB92E88"},"commit":{"sha":"e991893d3e73e97ee08c8221a61efba0beb21ec3","url":"https://github.com/malaysia-ai/malaya/commit/e991893d3e73e97ee08c8221a61efba0beb21ec3","date":"2018-04-06T07:55:59Z","author_date":"2018-04-06T07:55:59Z","committer_date":"2018-04-06T07:55:59Z","tree_sha":"e0a53e03ec265109f39f309225219397ad7128b4","message_first_line":"improve normalizer"},"tree_request_status":200,"tree_rate":{"github_remaining":"1451","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083C:DC698:181C470:1C46654:6AB92E88"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6082,"blob_sha":"6c8c1336f7281545dd529188dd8e8140614f3033","priority":0}],"documents":[{"path":"README.md","size":6082,"blob_sha":"6c8c1336f7281545dd529188dd8e8140614f3033","priority":0,"status":200,"text":"# Malaya\nNLTK like for bahasa Malaysia\n\n## Requirements\n  * Python >= 3.0\n  * Tensorflow >= 1.3\n  * NumPy >= 1.0\n  * Sklearn >= 0.18\n  * Fuzzywuzzy\n  * unidecode\n  * nltk\n  * scipy\n\n## Installation\n\n1. Install dependencies\n```bash\npip3 install sklearn fuzzywuzzy nltk unidecode numpy scipy python-levenshtein tensorflow==1.3\n```\n\n```python\nimport nltk\nnltk.download('punkt')\n```\n\n2. Clone this repository\n```bash\ngit clone https://github.com/DevconX/Malaya\n```\n\n3. install using setup.py\n```bash\npython3 setup.py install\n```\n\n## To do\n\n- [x] tokenizer\n- [x] stemming\n- [x] tatabahasa gathering\n- [x] Multinomial naive bayes\n- [x] Naive Part-Of-Speech\n- [x] number to words (currency, numbers, position, year)\n- [ ] stopwords\n- [x] normalizer\n- [ ] corpus gathering\n- [x] top-k hot topic (LSA, NMF, LDA)\n- [ ] sentiment analysis\n- [x] semantic and similar words searching\n- [ ] bahasa malaysia checker\n\n## Example\n\n#### Check more in example/example.ipynb\n\n```python\nimport malaya\n\nprint(malaya.stemming('makanan'))\n-> makan\n\nprint(malaya.naive_POS_string('bapa sedang menulis surat'))\n-> [('KN', 'bapa'), ('KETERANGAN', 'sedang'), ('KJ', 'menulis'), ('KN', 'surat')]\n\nprint(malaya.naive_POS_string('Dalam ayat pertama Kucing ialah pembuat, menangkap ialah perbuatan melampau dan seekor burung ialah benda yang kena buat atau penyambut'))\n-> [('KS', 'dalam'),\n ('KN', 'ayat'),\n ('KJ', 'pertama'),\n ('KN', 'kucing'),\n ('KPEMERI', 'ialah'),\n ('KJ', 'pembuat'),\n ('', ','),\n ('KJ', 'menangkap'),\n ('KPEMERI', 'ialah'),\n ('KJ', 'perbuatan'),\n ('KJ', 'melampau'),\n ('KH', 'dan'),\n ('KJ', 'seekor'),\n ('KN', 'burung'),\n ('KPEMERI', 'ialah'),\n ('KJ', 'benda'),\n ('KETERANGAN', 'yang'),\n ('KN', 'kena'),\n ('KN', 'buat'),\n ('KH', 'atau'),\n ('KJ', 'penyambut')]\n\nmalaya.to_cardinal(123456789)\n-> 'seratus dua puluh tiga juta empat ratus lima puluh enam ribu tujuh ratus lapan puluh sembilan'\n\nmalaya.to_ordinal(11)\n-> 'kesebelas'\n\nmalaya.classify_bayes('kelulusan perlu melalui jawatankuasa')\n-> negative: 0.589947\npositive: 0.410053\n\ncorpus_normalize = ['maka','serious','yeke','masing-masing']\nmalaya.train_normalize(corpus_normalize)\nmalaya.user_normalize('masing2')\n-> 'masing-masing'\nmalaya.user_normalize('srious')\n-> 'serious'\n```\n\n#### Semantic search example, semantic-example/example-semantic-search.ipynb\n```python\nmalaya.train_vector(corpus,10)\nepoch: 1000, loss: 4.156271\nepoch: 2000, loss: 3.501364\nepoch: 3000, loss: 2.607565\nepoch: 4000, loss: 2.888038\nepoch: 5000, loss: 2.324599\nepoch: 6000, loss: 2.288272\nepoch: 7000, loss: 1.827932\nepoch: 8000, loss: 2.251363\nepoch: 9000, loss: 1.611805\nepoch: 10000, loss: 1.972360\ndone train\n\nmalaya.semantic_search('mahathir')\n-> [(0, 'mahathir'),\n (1, 'ketokohan'),\n (2, 'berfikiran'),\n (3, 'guru'),\n (4, 'tnb'),\n (5, 'menyebut'),\n (6, 'muda'),\n (7, 'bermasalah'),\n (8, 'mengharapkan'),\n (9, 'hasil')]\n\nmalaya.semantic_search('najib')\n-> [(0, 'najib'),\n (1, 'dijadikan'),\n (2, 'mengatasi'),\n (3, 'tersedia'),\n (4, 'sampai'),\n (5, 'mencari'),\n (6, 'pucuk'),\n (7, 'restoran'),\n (8, 'stres'),\n (9, 'terhasil')]\n```\n\n#### k-topic modelling example, topic-example/example-topic.ipynb\n```python\nmalaya.train_lda(corpus,10)\nmalaya.topic_lda(10)\n-> [(0,\n  'kemahirannya memainkan kawasan peranan membangun luar membangunkan antara berkongsi pengalaman'),\n (1,\n  'penting berkembang negara harus mengeluarkan perlembagaan raya tersebut juga pilihan'),\n (2,\n  'ros pemilihan parti perlembagaan umno melebihi tempoh bulan keputusan benar'),\n (3, 'nak bayar macam mana mdb tutup selepas sewa tanah rumah'),\n (4, 'kalau minta mca kita tidak daripada lah ada apaapa tahunan'),\n (5, 'dan kami dalam tidak yang dengan untuk ia ini itu'),\n (6, 'yang dan dalam dengan menteri oleh itu seperti pengalaman telah'),\n (7, 'dan yang kita di akan dalam ini untuk saya itu'),\n (8, 'sebab akan tumpuan pada di dan untuk mahu rm harga'),\n (9, 'ada global perlu kerana kita pas pengalaman baiah percaya pilihanraya')]\n\nmalaya.train_nmf(corpus,10)\nmalaya.topic_nmf(10)\n-> [(0, 'yang dan dalam malaysia di dengan negara telah kepada itu'),\n (1, 'kita akan kalau bahasa ppsmi tak nak inggeris ilmu ambil'),\n (2, 'saya mungkin itu harap perlu membuat diri cina adalah tetapi'),\n (3, 'kami akan dan itu tiada dalam jppm pihak pesawat keduadua'),\n (4, 'ini masa untuk pada adalah rakyat bukan terus meningkatkan dan'),\n (5, 'tidak ada lagi pernah kerajaan pas boleh berlaku politik bulan'),\n (6, 'kapal jho low tak di itu ada dirampas dah mana'),\n (7, 'berjalan lancar gembira projek ia amat melihat dengan semakin saya'),\n (8,\n  'parti ros umno pemilihan perlembagaan keputusan kebenaran melebihi bersatu dah'),\n (9, 'orang asli masyarakat jakoa menjadi temiar harus mereka kerana sumber')]\n\nmalaya.train_lsa(corpus,10)\nmalaya.topic_lsa(10)\n-> [(0, 'dan yang kita dalam akan ini itu kami untuk dengan'),\n (1, 'kita kalau ini tak masa rakyat bahasa ada nak parti'),\n (2, 'saya tidak ada itu yang menteri mungkin mdb perdana tak'),\n (3, 'kami tidak akan itu ada parti tak mereka kita tiada'),\n (4, 'dalam negara ada tidak dengan yang pengalaman pas berkongsi mempunyai'),\n (5, 'tidak ia dengan ada lagi kerajaan pas berjalan pernah boleh'),\n (6, 'ini mereka masa pada parti yang kepada bukan oleh ros'),\n (7, 'dengan ia berjalan parti umno lancar ros pemilihan saya dan'),\n (8, 'untuk orang asli di ada ia kerajaan kapal malaysia bulan'),\n (9, 'yang di menteri untuk keputusan perdana ada sebelum apa sudah')]\n```\n\n## Warning\n\nInstall this library with fully aware that this library is still in alpha stage.\n\nThere is no type checking, no assert. Still on development process.\n\nPart Of Speech will not yet binded with any corpuses, I still having a problem with Dewan Pustaka.\n\nAlso, I cannot released primary corpuses for sentiment analysis and normalizer YET because got corporate issues.\n\nDocumentation will be released soon.\n\n## Disclaimer\n\nMost of the data gathered using crawlers crawled through targeted malaysia websites. I am not aware of any data protection.\n\n## Authors\n\n* **Husein Zolkepli** - *Initial work* - [huseinzol05](https://github.com/huseinzol05)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"08BE:3A3DD:17B6B0:5E5965:6AB92E88"},"text_sha256":"e7c2f3e73be06d4736ee79242859fd2484e7a9301c01f103bff9c4281e9e9c1c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1450","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BF:2D7D17:17A8054:1BD0F39:6AB92E89"},"commit":{"sha":"d3e6858667cbc96fa79da76a8da2c0960d3ca19f","url":"https://github.com/malaysia-ai/malaya/commit/d3e6858667cbc96fa79da76a8da2c0960d3ca19f","date":"2026-03-26T00:34:10Z","author_date":"2026-03-26T00:34:10Z","committer_date":"2026-03-26T00:34:10Z","tree_sha":"033d27ac81f31a3d65f1bed096255a9ba94226ed","message_first_line":"Merge pull request #300 from nieshies/fix/ordinal-issues"},"tree_request_status":200,"tree_rate":{"github_remaining":"1449","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0809:6E429:1809539:1C33E32:6AB92E89"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":3839,"blob_sha":"5182d0a8489dd4541cbfba97adb4d24a57799f08","priority":0}],"documents":[{"path":"README.rst","size":3839,"blob_sha":"5182d0a8489dd4541cbfba97adb4d24a57799f08","priority":0,"status":200,"text":".. raw:: html\n\n    <p align=\"center\">\n        <a href=\"#readme\">\n            <img alt=\"logo\" width=\"40%\" src=\"https://i.imgur.com/yi6jwST.png\">\n        <\/a>\n    <\/p>\n    <p align=\"center\">\n        <a href=\"https://pypi.python.org/pypi/malaya\"><img alt=\"Pypi version\" src=\"https://badge.fury.io/py/malaya.svg\"><\/a>\n        <a href=\"https://pypi.python.org/pypi/malaya\"><img alt=\"Python3 version\" src=\"https://img.shields.io/pypi/pyversions/malaya.svg\"><\/a>\n        <a href=\"https://github.com/huseinzol05/Malaya/blob/master/LICENSE\"><img alt=\"MIT License\" src=\"https://img.shields.io/github/license/huseinzol05/malaya.svg?color=blue\"><\/a>\n        <a href=\"https://malaya.readthedocs.io/\"><img alt=\"Documentation\" src=\"https://readthedocs.org/projects/malaya/badge/?version=latest\"><\/a>\n        <a href=\"https://pepy.tech/project/malaya\"><img alt=\"total stats\" src=\"https://static.pepy.tech/badge/malaya\"><\/a>\n        <a href=\"https://pepy.tech/project/malaya\"><img alt=\"download stats / month\" src=\"https://static.pepy.tech/badge/malaya/month\"><\/a>\n        <a href=\"https://discord.gg/J3aSWyMy9A\"><img alt=\"discord\" src=\"https://img.shields.io/badge/discord%20-Malaysia_AI-rgb(118,138,212).svg\"><\/a>\n    <\/p>\n\n=========\n\n**Malaya** is a Natural-Language-Toolkit library for bahasa Malaysia, powered by PyTorch.\n\nDocumentation\n--------------\n\nProper documentation is available at https://malaya.readthedocs.io/\n\nInstalling from the PyPI\n----------------------------------\n\n::\n\n    $ pip install malaya\n\nIt will automatically install all dependencies except for PyTorch. So you can choose your own PyTorch CPU / GPU version.\n\nOnly **Python >= 3.6.0**, and **PyTorch >= 1.10** are supported.\n\nIf you are a Windows user, make sure read https://malaya.readthedocs.io/en/latest/running-on-windows.html\n\nDevelopment Release\n---------------------------------\n\nInstall from `master` branch,\n\n::\n\n    $ pip install git+https://github.com/huseinzol05/malaya.git\n\n\nWe recommend to use **virtualenv** for development. \n\nDocumentation at https://malaya.readthedocs.io/en/latest/\n\nPretrained Models\n------------------\n\nMalaya also released Malaysian pretrained models, simply check at https://huggingface.co/mesolitica\n\nReferences\n-----------\n\nIf you use our software for research, please cite:\n\n::\n\n  @misc{Malaya, Natural-Language-Toolkit library for bahasa Malaysia, powered by PyTorch,\n    author = {Husein, Zolkepli},\n    title = {Malaya},\n    year = {2018},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/mesolitica/malaya}}\n  }\n\nAcknowledgement\n----------------\n\nThanks to,\n\n1. `KeyReply <https://www.keyreply.com/>`_ for private V100s cloud.\n\n.. raw:: html\n\n    <a href=\"#readme\">\n        <img alt=\"logo\" width=\"20%\" src=\"https://image4.owler.com/logo/keyreply_owler_20191024_163259_original.png\">\n    <\/a>\n\n2. `Nvidia <https://www.nvidia.com/en-us/>`_ for Azure credit.\n\n.. raw:: html\n\n    <a href=\"#readme\">\n        <img alt=\"logo\" width=\"20%\" src=\"https://www.nvidia.com/content/dam/en-zz/Solutions/about-nvidia/logo-and-brand/01-nvidia-logo-horiz-500x200-2c50-d@2x.png\">\n    <\/a>\n\n\n3. `Tensorflow Research Cloud <https://www.tensorflow.org/tfrc>`_ for free TPUs access.\n\n.. raw:: html\n\n    <a href=\"https://www.tensorflow.org/tfrc\">\n        <img alt=\"logo\" width=\"20%\" src=\"https://2.bp.blogspot.com/-xojf3dn8Ngc/WRubNXxUZJI/AAAAAAAAB1A/0W7o1hR_n20QcWyXHXDI1OTo7vXBR8f7QCLcB/s400/image2.png\">\n    <\/a>\n\n\nContributing\n----------------\n\nThank you for contributing this library, really helps a lot. Feel free to contact me to suggest me anything or want to contribute other kind of forms, we accept everything, not just code!\n\n.. raw:: html\n\n    <a href=\"#readme\">\n        <img alt=\"logo\" width=\"30%\" src=\"https://contributors-img.firebaseapp.com/image?repo=huseinzol05/malaya\">\n    <\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B532:376DE:182B19:5ECF21:6AB92E8A"},"text_sha256":"4511a701ff929bad0638f876f530f3452f008d2c9165fba91f0d727bf9c9161c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"spencermountain/compromise","input_row":{"repository":"spencermountain/compromise","url":"https://github.com/spencermountain/compromise","name":"compromise","owner":"spencermountain","description":"modest natural-language processing","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":12160,"issues":761,"created_at":"2011-07-05T09:04:38Z","updated_at":"2026-09-27T09:06:22Z","first_commit_at":"2011-07-12T12:34:23Z","last_commit_at":"2026-09-19T19:29:04Z","activity_months":182.27000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:10.635Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"spencermountain/compromise","visibility":"public","created_at":"2011-07-05T09:04:38Z","updated_at":"2026-09-27T09:06:22Z","private":false,"fork":false,"archived":false,"stargazers_count":12160,"open_issues_count":123,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1448","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E0:77994:181027A:1C3AC06:6AB92E8A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1447","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079B:0BA1:DAD6E7:1012D55:6AB92E8B"},"commit":{"sha":"338499cfea0406b9bdb7f710a1d026be864ccaa7","url":"https://github.com/spencermountain/compromise/commit/338499cfea0406b9bdb7f710a1d026be864ccaa7","date":"2018-05-22T18:01:11Z","author_date":"2018-05-22T18:01:11Z","committer_date":"2018-05-22T18:01:11Z","tree_sha":"a1cf9079a0a9a0da6546330b7f48f36d9db44bff","message_first_line":"Merge pull request #484 from papandreou/fix/changelog"},"tree_request_status":200,"tree_rate":{"github_remaining":"1446","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084E:280FBC:17E3FBA:1C0D76E:6AB92E8B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14716,"blob_sha":"4bf527adf3270375cfd6c9fdf707b32e38a80b2a","priority":0}],"documents":[{"path":"README.md","size":14716,"blob_sha":"4bf527adf3270375cfd6c9fdf707b32e38a80b2a","priority":0,"status":200,"text":"<div align=\"center\">\n  <img src=\"https://cloud.githubusercontent.com/assets/399657/21955696/46e882d4-da3e-11e6-94a6-720c34e27df7.jpg\" />\n<\/div>\n<div align=\"center\">\n  <a href=\"https://www.codacy.com/app/spencerkelly86/nlp_compromise\">\n    <img src=\"https://api.codacy.com/project/badge/grade/82cc8ebd98b64ed199d7be6021488062\" />\n  <\/a>\n  <a href=\"https://npmjs.org/package/compromise\">\n    <img src=\"https://img.shields.io/npm/v/compromise.svg?style=flat-square\" />\n  <\/a>\n  <a href=\"https://www.codacy.com/app/spencerkelly86/nlp_compromise\">\n    <img src=\"https://api.codacy.com/project/badge/Coverage/82cc8ebd98b64ed199d7be6021488062\" />\n  <\/a>\n  <div>modest natural-language processing in javascript<\/div>\n  <sub>\n    by\n    <a href=\"https://github.com/spencermountain\">Spencer Kelly<\/a> and\n    <a href=\"https://github.com/spencermountain/compromise/graphs/contributors\">\n      many contributors\n    <\/a>\n  <\/sub>\n<\/div>\n<br/>\n\n<!-- small enough for the browser... -->\n<img src=\"https://user-images.githubusercontent.com/399657/35828705-828fd2ca-0a8e-11e8-9f12-88e840b8b399.png\" />\n\n<!-- two gifs -->\n<table align=\"center\">\n  <tr>\n    <td>\n      <a href=\"http://compromise.cool\">\n        <img width=\"390\" src=\"https://user-images.githubusercontent.com/399657/35871664-cdab2bca-0b32-11e8-8827-81de658216fa.gif\" />\n      <\/a>\n    <\/td>\n    <td>\n      <a href=\"http://compromise.cool\">\n        <img width=\"390\" src=\"https://user-images.githubusercontent.com/399657/35871669-d05e8d26-0b32-11e8-99c6-0f8887ae40ea.gif\" />\n      <\/a>\n    <\/td>  \n  <\/tr>\n<\/table>\n\nsave yourself from **regex-whackamole**🤞:\n```js\nnlp(entireNovel).sentences().if('the #Adjective of times').out()\n// \"it was the blurst of times??\"\n```\n\nmove things around:\n```js\nnlp('she sells seashells by the seashore.').sentences().toFutureTense().out()\n// 'she will sell seashells...'\n```\nrespond to text input:\n```js\nif( doc.has('^simon says (shoot|fire) #Determiner lazer') ){\n  fireLazer()\n} else {\n  dontFire()\n}\n```\n\n<div align=\"center\">\n  compromise is not <a href=\"https://github.com/spencermountain/compromise/wiki/Justification\">the cleverest<\/a>.\n  <br/>\n  but it is\n  <a href=\"https://beta.observablehq.com/@spencermountain/compromise-filesize\">small,\n  <a href=\"https://beta.observablehq.com/@spencermountain/compromise-performance\">quick<\/a>, \n  and <a href=\"https://beta.observablehq.com/@spencermountain/compromise-accuracy\">good-enough<\/a> for a bunch of stuff.\n<\/div>\n\n----\n\n<!-- three-table section -->\n<div align=\"center\">\n  <table align=\"center\">\n    <tr align=\"center\">\n      <td align=\"center\">\n        <b>\n          &lt;script src&gt;\n        <\/b>\n        <div>\n           &nbsp; &nbsp; &nbsp; &nbsp; <a href=\"https://github.com/spencermountain/compromise/wiki/QuickStart\">one javascript file<\/a> &nbsp; &nbsp; &nbsp; &nbsp;\n        <\/div>\n      <\/td>\n      <td align=\"center\">\n        <b>🙏<\/b>\n        <div>\n          &nbsp; &nbsp; <kbd>npm install compromise<\/kbd> &nbsp; &nbsp;\n        <\/div>\n      <\/td>\n      <td align=\"center\">\n        <div>\n          <b>\n            <a href=\"https://github.com/spencermountain/compromise/wiki/Accuracy\">\n              86%\n            <\/a>\n          <\/b>\n          <div>\n            &nbsp; &nbsp; on the Penn treebank &nbsp; &nbsp;\n         <\/div>\n      <\/td>\n      <td align=\"center\">\n        <b>IE9+<\/b>\n        <div>\n           &nbsp; &nbsp; &nbsp;  caniuse, youbetcha &nbsp; &nbsp; &nbsp;\n        <\/div>\n      <\/td>\n    <\/tr>\n  <\/table>\n<\/div>\n\n<!-- Install section -->\n#### ⚡️ on the Client-side\n```html\n<script src=\"https://unpkg.com/compromise@latest/builds/compromise.min.js\"><\/script>\n<script>\n  var doc = nlp('dinosaur')\n\n  var str = doc.nouns().toPlural().out('text')\n  console.log(str)\n  // 'dinosaurs'\n<\/script>\n```\n\n#### 🌋 Server-side!\n```javascript\nvar nlp = require('compromise')\n\nvar doc = nlp('London is calling')\ndoc.sentences().toNegative()\n// 'London is not calling'\n```\n\n<table>\n   <tr>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://beta.observablehq.com/@spencermountain/nlp-compromise\">\n            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Part-of-Speech tagging &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>nouns! verbs! adjectives!<\/sub>\n         <\/div>\n      <\/td>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://beta.observablehq.com/@spencermountain/topics-named-entity-recognition\">\n            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Named-entities &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>people, places, organizations<\/sub>\n         <\/div>\n      <\/td>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://nlp-expo.firebaseapp.com/expo/parse-all-the-numbers-278986\">\n          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Number parsing &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>seven hundred and fifty == 750<\/sub>\n         <\/div>\n      <\/td>\n   <\/tr>\n   <tr>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://beta.observablehq.com/@spencermountain/tutorial-1\">\n            &nbsp; &nbsp; &nbsp; &nbsp; Template-matches &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>like a regex for a sentence<\/sub>\n         <\/div>\n      <\/td>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://beta.observablehq.com/@spencermountain/verbs\">\n            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Verb conjugation &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>all your base are belong<\/sub>\n         <\/div>\n      <\/td>\n      <td>\n         <div align=\"center\">\n            <a href=\"https://github.com/spencermountain/compromise/wiki/Usage\">\n            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Transformations &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n            <\/a>\n         <\/div>\n         <div align=\"center\">\n            <sub>contractions, style, mood..<\/sub>\n         <\/div>\n      <\/td>\n   <\/tr>\n<\/table>\n\n<!-- plugins section -->\n__**[plugins](https://beta.observablehq.com/@spencermountain/compromise-plugins)**__ allow adding vocabulary, fixing errors, and setting context quickly:\n```js\nvar plugin = {\n  tags:{\n    Character:{\n      isA: 'Noun'\n    }\n  },\n  words:{\n    itchy: 'Character',\n    scratchy: 'Character'\n  }\n}\nnlp.plugin(plugin)\nnlp(`Couldn't Itchy share his pie with Scratchy?`).debug()\n/*\n   couldn't   - #Modal, #Verb\n   itchy      - #Character, #Noun\n   share      - #Infinitive, #Verb\n   ...\n*/\n```\n\n## Examples:\n\n* <a href=\"https://beta.observablehq.com/@spencermountain/nouns\"><b>Plural/singular:<\/b><\/a> - grab the noun-phrases, make em plural:\n```js\ndoc = nlp('a bottle of beer on the wall.')\ndoc.nouns(0).toPlural()\ndoc.out('text')\n//'The bottles of beer on the wall.'\n```\n\n* <a href=\"https://github.com/spencermountain/compromise/wiki/Values\"><b>Number parsing:<\/b><\/a> - parse written-out numbers, and change their form:\n```js\ndoc = nlp('ninety five thousand and fifty two')\ndoc.values().toNumber().out()\n// '95052'\n\ndoc = nlp('the 23rd of December')\ndoc.values().add(2).toText()\ndoc.out('text')\n// 'the twenty fifth of December'\n```\n\n* <a href=\"https://github.com/spencermountain/compromise/wiki/Usage\"><b>Normalization:<\/b><\/a> - handle looseness & variety of random text:\n```js\ndoc = nlp(\"the guest-singer's björk   at seven thirty.\").normalize().out('text')\n// 'The guest singer is Bjork at 7:30.'\n```\n\n* <a href=\"https://beta.observablehq.com/@spencermountain/verbs\"><b>Tense:<\/b><\/a> - switch to/from conjugations of any verb\n```js\nlet doc = nlp('she sells seashells by the seashore.')\ndoc.sentences().toFutureTense().out('text')\n//'she will sell seashells...'\n\ndoc.verbs().conjugate()\n// [{ PastTense: 'sold',\n//    Infinitive: 'sell',\n//    Gerund: 'selling', ...\n// }]\n```\n\n* <a href=\"https://github.com/spencermountain/compromise/wiki/Contractions\"><b> Contractions:<\/b><\/a> - grab, expand and contract:\n```js\ndoc = nlp(\"we're not gonna take it, no we ain't gonna take it.\")\ndoc.has('going') // true\ndoc.match('are not').length // == 2\ndoc.contractions().expand().out()\n//'we are not going to take it, no we are not going to take it'\n```\n\n* <a href=\"https://beta.observablehq.com/@spencermountain/topics-named-entity-recognition\"><b> Named-entities:<\/b><\/a> - get the people, places, organizations:\n```js\ndoc = nlp('the opera about richard nixon visiting china')\ndoc.topics().data()\n// [\n//   { text: 'richard nixon' },\n//   { text: 'china' }\n// ]\n```\n\n* <a href=\"https://github.com/spencermountain/compromise/wiki/Lexicon\"><b>Custom lexicon:<\/b><\/a> - make it do what you'd like:\n```js\nvar lexicon={\n  'boston': 'MusicalGroup'\n}\ndoc = nlp('i heard Boston\\'s set in Chicago', lexicon)\n\n//alternatively, fix it 'in-post':\ndoc.match('heard #Possessive set').terms(1).tag('MusicalGroup')\n```\n\n* <a href=\"https://github.com/spencermountain/compromise/wiki/Output\"><b> Handy outputs:<\/b><\/a> - get sensible data:\n```js\ndoc = nlp('We like Roy! We like Roy!').sentences().out('array')\n// ['We like Roy!', 'We like Roy!']\n\ndoc = nlp('Tony Hawk').out('html')\n/*\n<span>\n  <span class=\"nl-Person nl-FirstName\">Tony<\/span>\n  <span>&nbsp;<\/span>\n  <span class=\"nl-Person nl-LastName\">Hawk<\/span>\n<\/span>\n*/\n```\n<h3 align=\"center\">\n  of course, there's <a href=\"https://github.com/spencermountain/compromise/wiki\">a lot more stuff<\/a>.\n<\/h3>\n<h4 align=\"center\">\n  <b>Join in -<\/b>\n  we're fun, using <b>semver<\/b>, and moving fast:\n<\/h4>\n\n<table>\n  <tr align=\"center\">\n    <td>\n      <a href=\"https://twitter.com/nlp_compromise\">\n        <img src=\"https://cloud.githubusercontent.com/assets/399657/21956672/a30cf206-da53-11e6-8c6c-0995cf2aef62.jpg\"/>\n        <div>&nbsp; &nbsp; &nbsp; &nbsp; Twitter &nbsp; &nbsp; &nbsp;  &nbsp;<\/div>\n      <\/a>\n    <\/td>\n    <td>\n      <a href=\"http://slack.compromise.cool/\">\n        <img src=\"https://cloud.githubusercontent.com/assets/399657/21956671/a30cbc82-da53-11e6-82d6-aaaaebc0bc93.jpg\"/>\n        <div>&nbsp; &nbsp; &nbsp; Slack group &nbsp; &nbsp; &nbsp; <\/div>\n      <\/a>\n    <\/td>\n    <td>\n      <a href=\"http://nlpcompromise.us12.list-manage2.com/subscribe?u=d5bd9bcc36c4bef0fd5f6e75f&id=8738c1f5ef\">\n        <img src=\"https://cloud.githubusercontent.com/assets/399657/21956670/a30be6e0-da53-11e6-9aaf-52a10b8c3195.jpg\"/>\n        <div>&nbsp; &nbsp; &nbsp; Mailing-list &nbsp; &nbsp; &nbsp; <\/div>\n      <\/a>\n    <\/td>\n    <td>\n      <a href=\"https://github.com/nlp-compromise/nlp_compromise/wiki/Projects\">\n        <img src=\"https://cloud.githubusercontent.com/assets/399657/26513481/a755ac38-4239-11e7-960a-1c26d85ddc1c.png\"/>\n        <div>&nbsp; &nbsp; &nbsp; &nbsp; Projects &nbsp; &nbsp; &nbsp; &nbsp; <\/div>\n      <\/a>\n    <\/td>\n    <td>\n      <a href=\"https://github.com/spencermountain/compromise/wiki/Contributing\">\n        <img src=\"https://cloud.githubusercontent.com/assets/399657/21956742/5985a89c-da55-11e6-87bc-4f0f1549d202.jpg\"/>\n        <div>&nbsp; &nbsp; &nbsp; Pull-requests &nbsp; &nbsp; &nbsp; <\/div>\n      <\/a>\n    <\/td>\n  <\/tr>\n<\/table>\n\n<div align=\"left\">\n  <a href=\"https://www.youtube.com/watch?v=WuPVS2tCg8s\">\n    <img width=\"300\" src=\"http://img.youtube.com/vi/WuPVS2tCg8s/mqdefault.jpg\"/>\n  <\/a>\n  <a href=\"https://www.youtube.com/watch?v=c_hmwFwvO0U\">\n    <img width=\"300\" src=\"https://user-images.githubusercontent.com/399657/27890263-88e1fd10-61bf-11e7-93f2-745167f88d58.png\"/>\n  <\/a>\n<\/div>\n\n<p><\/p>\n<ul align=\"left\">\n  <p>\n    <details>\n      <summary>☂️ Isn't javascript too...<\/summary>\n      <p><\/p>\n      <ul>\n        yeah!\n        <br/>\n        it wasn't built to compete with the stanford tagger, and may not fit every project.\n        <br/>\n        string stuff is synchronous too, and parallelizing is weird.\n        <br/>\n        See <a href=\"https://github.com/spencermountain/compromise/wiki/Speed\">here<\/a> for information about speed & performance, and\n        <a href=\"https://github.com/spencermountain/compromise/wiki/Justification\">here><\/a> for project motivations\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>  \n  <p>\n    <details>\n      <summary>💃 Can it run on my arduino-watch?<\/summary>\n      <p><\/p>\n      <ul>\n        Only if it's water-proof!\n        <br/>\n        Read <a href=\"https://github.com/spencermountain/compromise/wiki/QuickStart\">quickStart<\/a> for all sorts of funny environments.\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n  <p>\n    <details>\n      <summary>🌎 Other Languages?<\/summary>\n      <p><\/p>\n      <ul>\n        okay! <br/>\n        we've got work-in-progress forks for <a href=\"https://github.com/nlp-compromise/de-compromise\">German<\/a> and <a href=\"https://github.com/nlp-compromise/fr-compromise\">French<\/a>, in the same philosophy.\n        <br/>\n        Get involved!\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n  <p>\n    <details>\n      <summary>✨ Partial builds?<\/summary>\n      <p><\/p>\n      <ul>\n        compromise is one function so can't really be tree-shaken.\n        <br/> .. and the tagging methods are competitive, so it's not recommended to pull things out.\n        <br/>\n        It's best to load the library fully, given it's smaller than <a href=\"https://68.media.tumblr.com/tumblr_m674jlpyPT1ry8fquo1_250.gif\">this gif<\/a>.\n        <br/>\n        A plug-in scheme is in the works.\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n<\/ul>\n\n<hr/>\n\n### Also:\n* &nbsp; **[naturalNode](https://github.com/NaturalNode/natural)** - fancier statistical nlp in javascript\n* &nbsp; **[superScript](http://superscriptjs.com/)** - clever conversation engine in js\n* &nbsp; **[nodeBox Linguistics](https://www.nodebox.net/code/index.php/Linguistics)** - conjugation, inflection in javascript\n* &nbsp; **[reText](https://github.com/wooorm/retext)** - very impressive [text utilities](https://github.com/wooorm/retext/blob/master/doc/plugins.md) in javascript\n* &nbsp; **[jsPos](https://code.google.com/archive/p/jspos/)** - javascript build of the time-tested Brill-tagger\n* &nbsp; **[spaCy](https://spacy.io/)** - speedy, multilingual tagger in C/python\n\nFor the former promise-library, see [jnewman/compromise](https://github.com/jnewman/compromise)\n(Thanks [Joshua](https://github.com/jnewman)!)\n\n<div align=\"right\">\n(and don't forget 🙇\n<a href=\"http://www.nltk.org/\">NLTK<\/a>,\n<a href=\"https://gate.ac.uk\">GATE<\/a>,\n<a href=\"http://nlp.stanford.edu/software/lex-parser.shtml\">Stanford<\/a>,\nand\n<a href=\"http://cogcomp.cs.illinois.edu/page/software/\">Illinois<\/a> libs\n)\n<\/div>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C908:3E724:1826E0:5EC966:6AB92E89"},"text_sha256":"97516b937200afb3cd4951c0a772bc33788f76d10b125af9396910e79f425df5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1445","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0892:35D5A8:17F7BDC:1C2274D:6AB92E8C"},"commit":{"sha":"275148ffd0630da54d64edab961847b0270aadd4","url":"https://github.com/spencermountain/compromise/commit/275148ffd0630da54d64edab961847b0270aadd4","date":"2026-06-23T12:57:05Z","author_date":"2026-06-23T12:57:05Z","committer_date":"2026-06-23T12:57:05Z","tree_sha":"b85f797dc2413e9b700138d03dae34ee6d2bb311","message_first_line":"add money class methods"},"tree_request_status":200,"tree_rate":{"github_remaining":"1444","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0800:62B94:17E54C0:1C0FD9D:6AB92E8C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":62465,"blob_sha":"be6b9d9b138aedcc4af6e676a221f37b0827ea95","priority":0}],"documents":[{"path":"README.md","size":62465,"blob_sha":"be6b9d9b138aedcc4af6e676a221f37b0827ea95","priority":0,"status":200,"text":"<div align=\"center\">\n  <img height=\"15px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <div><b>compromise<\/b><\/div>\n  <img src=\"https://user-images.githubusercontent.com/399657/68222691-6597f180-ffb9-11e9-8a32-a7f38aa8bded.png\"/>\n  <div>modest natural language processing<\/div>\n  <div><code>npm install compromise<\/code><\/div>\n  <div align=\"center\">\n    <sub>\n      by\n      <a href=\"https://spencermounta.in/\">Spencer Kelly<\/a> and\n      <a href=\"https://github.com/spencermountain/compromise/graphs/contributors\">\n        many contributors\n      <\/a>\n    <\/sub>\n  <\/div>\n  <img height=\"22px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/div>\n\n<div align=\"center\">\n  <div>\n    <a href=\"https://npmjs.org/package/compromise\">\n    <img src=\"https://img.shields.io/npm/v/compromise.svg?style=flat-square\" />\n  <\/a>\n  <a href=\"https://codecov.io/gh/spencermountain/compromise\">\n    <img src=\"https://codecov.io/gh/spencermountain/compromise/branch/master/graph/badge.svg\" />\n  <\/a>\n  <a href=\"https://bundlephobia.com/result?p=compromise\">\n    <img src=\"https://img.shields.io/bundlephobia/min/compromise\"/>\n    <!-- <img src=\"https://badge-size.herokuapp.com/spencermountain/compromise/master/builds/compromise.min.js\" /> -->\n  <\/a>\n  <\/div>\n  <div align=\"center\">\n    <sub>\n     <a href=\"https://github.com/nlp-compromise/fr-compromise\">french<\/a> • <a href=\"https://github.com/nlp-compromise/de-compromise\">german<\/a>  • <a href=\"https://github.com/nlp-compromise/it-compromise\">italian<\/a> • <a href=\"https://github.com/nlp-compromise/es-compromise\">spanish<\/a>\n    <\/sub>\n  <\/div>\n<\/div>\n\n<!-- spacer -->\n<img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<div align=\"left\">\ndon't you find it strange,\n<br/>\n<ul>\n  <img height=\"2px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <sub>how easy <b>text<\/b> is to <b>make<\/b>,<\/sub>\n  <br/>\n  <img height=\"2px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n&nbsp;<i>↬<sub>ᔐᖜ<\/sub><b>↬<\/b><\/i> &nbsp; <sub><\/sub>\nand how hard it is to actually <b>parse<\/b> and <i>use<\/i>?\n\n<\/ul>\n<\/div>\n\n<!-- spacer -->\n<img height=\"45px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<div align=\"left\">\n  <img height=\"10px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>compromise <i><a href=\"https://observablehq.com/@spencermountain/compromise-justification\">tries its best<\/a><\/i> to turn text into data.\n  <br/>\n  <img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>it makes limited and sensible decisions.\n  <br/>\n  <sub >\n   <img height=\"15px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/> it's not as smart as you'd think.\n  <\/sub>\n\n<img height=\"45px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n <!--\n  it is\n  <a href=\"https://docs.compromise.cool/compromise-filesize\">small,\n  <a href=\"https://docs.compromise.cool/compromise-performance\">quick<\/a>,\n  and often <i><a href=\"https://docs.compromise.cool/compromise-accuracy\">good-enough<\/a><\/i>.\n  <br/> -->\n<\/div>\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n```js\nimport nlp from 'compromise'\n\nlet doc = nlp('she sells seashells by the seashore.')\ndoc.verbs().toPastTense()\ndoc.text()\n// 'she sold seashells by the seashore.'\n```\n\n<!-- spacer -->\n<img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<div align=\"left\">\n<i>don't be fancy, at all:<\/i>\n<\/div>\n\n```js\nif (doc.has('simon says #Verb')) {\n  return true\n}\n```\n\n<!-- spacer -->\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221814-05ed1680-ffb8-11e9-8b6b-c7528d163871.png\"/>\n<\/div>\n\n<div align=\"left\">\n<i>grab parts of the text:<\/i>\n<\/div>\n\n```js\nlet doc = nlp(entireNovel)\ndoc.match('the #Adjective of times').text()\n// \"the blurst of times?\"\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-match\">match docs<\/a>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221837-0d142480-ffb8-11e9-9d30-90669f1b897c.png\"/>\n<\/div>\n<!-- spacer -->\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<i>and get data:<\/i>\n\n```js\nimport plg from 'compromise-speech'\nnlp.extend(plg)\n\nlet doc = nlp('Milwaukee has certainly had its share of visitors..')\ndoc.compute('syllables')\ndoc.places().json()\n/*\n[{\n  \"text\": \"Milwaukee\",\n  \"terms\": [{\n    \"normal\": \"milwaukee\",\n    \"syllables\": [\"mil\", \"wau\", \"kee\"]\n  }]\n}]\n*/\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-json\">json docs<\/a>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221814-05ed1680-ffb8-11e9-8b6b-c7528d163871.png\"/>\n<\/div>\n\n<!-- spacer -->\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\navoid the problems of brittle parsers:\n\n```js\nlet doc = nlp(\"we're not gonna take it..\")\n\ndoc.has('gonna') // true\ndoc.has('going to') // true (implicit)\n\n// transform\ndoc.contractions().expand()\ndoc.text()\n// 'we are not going to take it..'\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-contractions\">contraction docs<\/a>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221814-05ed1680-ffb8-11e9-8b6b-c7528d163871.png\"/>\n<\/div>\n<!-- spacer -->\n<img height=\"30\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\nand whip stuff around like it's data:\n\n```js\nlet doc = nlp('ninety five thousand and fifty two')\ndoc.numbers().add(20)\ndoc.text()\n// 'ninety five thousand and seventy two'\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-values\">number docs<\/a>\n<\/div>\n\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221837-0d142480-ffb8-11e9-9d30-90669f1b897c.png\"/>\n<\/div>\n<!-- spacer -->\n<img height=\"30\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<sub>-because it actually is-<\/sub>\n\n```js\nlet doc = nlp('the purple dinosaur')\ndoc.nouns().toPlural()\ndoc.text()\n// 'the purple dinosaurs'\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/nouns\">noun docs<\/a>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221731-e8b84800-ffb7-11e9-8453-6395e0e903fa.png\"/>\n<\/div>\n\n<!-- spacer -->\n<img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\nUse it on the client-side:\n\n```html\n<script src=\"https://unpkg.com/compromise\"><\/script>\n<script>\n  var doc = nlp('two bottles of beer')\n  doc.numbers().minus(1)\n  document.body.innerHTML = doc.text()\n  // 'one bottle of beer'\n<\/script>\n```\n\nor likewise:\n\n```typescript\nimport nlp from 'compromise'\n\nvar doc = nlp('London is calling')\ndoc.verbs().toNegative()\n// 'London is not calling'\n```\n\n<img height=\"75px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<!--\n  bragging graphs\n -->\n<!-- spacer -->\n<img height=\"30\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\ncompromise is **~250kb** (minified):\n\n<div align=\"center\">\n  <!-- filesize -->\n  <a href=\"https://bundlephobia.com/result?p=compromise\">\n    <img width=\"600\" src=\"https://user-images.githubusercontent.com/399657/68234819-14dfc300-ffd0-11e9-8b30-cb8545707b29.png\"/>\n  <\/a>\n<\/div>\n\nit's pretty fast. It can run on keypress:\n\n<div align=\"center\">\n  <a href=\"https://observablehq.com/@spencermountain/compromise-performance\">\n    <img width=\"600\" src=\"https://user-images.githubusercontent.com/399657/159795115-ed62440a-be41-424c-baa4-8dd15c48377d.png\"/>\n  <\/a>\n<\/div>\n\nit works mainly by <a href=\"https://observablehq.com/@spencermountain/verbs\">conjugating all forms<\/a> of a basic word list.\n\nThe final lexicon is <a href=\"https://observablehq.com/@spencermountain/compromise-lexicon\">~14,000 words<\/a>:\n\n<div align=\"center\">\n  <img width=\"600\" src=\"https://user-images.githubusercontent.com/399657/68234805-0d201e80-ffd0-11e9-8dc6-f7a600352555.png\"/>\n<\/div>\n\nyou can read more about how it works, [here](https://observablehq.com/@spencermountain/compromise-internals). it's weird.\n\n<!-- spacer -->\n<img height=\"75px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<!--\n  one/two/three parts\n -->\n<p align=\"left\">\n  <sub>okay -<\/sub>\n  <h1>\n    <code>compromise/one<\/code>\n  <\/h1>\n  <p align=\"center\">A <code>tokenizer<\/code> of words, sentences, and punctuation.<\/p>\n  <img height=\"15px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<p>\n\n```js\nimport nlp from 'compromise/one'\n\nlet doc = nlp(\"Wayne's World, party time\")\nlet data = doc.json()\n/* [{\n  normal:\"wayne's world party time\",\n    terms:[{ text: \"Wayne's\", normal: \"wayne\" },\n      ...\n      ]\n  }]\n*/\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-tokenization\">tokenizer docs<\/a>\n<\/div>\n\n<b>compromise/one<\/b> splits your text up, wraps it in a handy API,\n\n<ul>\n  <sub>and does nothing else -<\/sub>\n<\/ul>\n\n<img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<b>/one<\/b> is quick - most sentences take a 10th of a millisecond.\n\nIt can do <b>~1mb<\/b> of text a second - or 10 wikipedia pages.\n\n<i>Infinite jest<\/i> takes 3s.\n\n<div align=\"right\">\n  You can also parallelize, or stream text to it with <a href=\"https://github.com/spencermountain/compromise/tree/master/plugins/speed\">compromise-speed<\/a>.\n<\/div>\n\n<!-- spacer -->\n<img height=\"60px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<!-- two -->\n<p align=\"center\">\n  <h1 align=\"left\">\n   <code>compromise/two<\/code>\n  <\/h1>\n  <p align=\"center\">A <code>part-of-speech<\/code> tagger, and grammar-interpreter.<\/p>\n  <img height=\"15px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <p>\n\n```js\nimport nlp from 'compromise/two'\n\nlet doc = nlp(\"Wayne's World, party time\")\nlet str = doc.match('#Possessive #Noun').text()\n// \"Wayne's World\"\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-tagger\">tagger docs<\/a>\n<\/div>\n\n<p>\n  <img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/p>\n<b>compromise/two<\/b> automatically calculates the very basic grammar of each word.\n\n<sub>this is more useful than people sometimes realize.<\/sub>\n\nLight grammar helps you write cleaner templates, and get closer to the information.\n\n<!-- Part-of-speech tagging is profoundly-difficult task to get 100% on. It is also a profoundly easy task to get 85% on. -->\n\n<img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\ncompromise has <b>83 tags<\/b>, arranged in <a href=\"https://observablehq.com/@spencermountain/compromise-tags\">a handsome graph<\/a>.\n\n<b>#FirstName<\/b> → <b>#Person<\/b> → <b>#ProperNoun<\/b> → <b>#Noun<\/b>\n\nyou can see the grammar of each word by running `doc.debug()`\n\nyou can see the reasoning for each tag with `nlp.verbose('tagger')`.\n\nif you prefer <a href=\"https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html\"><i>Penn tags<\/i><\/a>, you can derive them with:\n\n```js\nlet doc = nlp('welcome thrillho')\ndoc.compute('penn')\ndoc.json()\n```\n\n<img height=\"60px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<!-- three -->\n<p align=\"center\">\n  <h1 align=\"left\">\n   <code>compromise/three<\/code>\n  <\/h1>\n  <p align=\"center\"><code>Phrase<\/code> and sentence tooling.<\/p>\n  <img height=\"15px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <p>\n\n```js\nimport nlp from 'compromise/three'\n\nlet doc = nlp(\"Wayne's World, party time\")\nlet str = doc.people().normalize().text()\n// \"wayne\"\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-selections\">selection docs<\/a>\n<\/div>\n\n<b>compromise/three<\/b> is a set of tooling to <i>zoom into<\/i> and operate on parts of a text.\n\n`.numbers()` grabs all the numbers in a document, for example - and extends it with new methods, like `.subtract()`.\n\nWhen you have a phrase, or group of words, you can see additional metadata about it with `.json()`\n\n```js\nlet doc = nlp('four out of five dentists')\nconsole.log(doc.fractions().json())\n/*[{\n    text: 'four out of five',\n    terms: [ [Object], [Object], [Object], [Object] ],\n    fraction: { numerator: 4, denominator: 5, decimal: 0.8 }\n  }\n]*/\n```\n\n```js\nlet doc = nlp('$4.09CAD')\ndoc.money().json()\n/*[{\n    text: '$4.09CAD',\n    terms: [ [Object] ],\n    number: { prefix: '$', num: 4.09, suffix: 'cad'}\n  }\n]*/\n```\n\n<img height=\"80px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n## 🤖 For AI agents & LLMs\n\nPlain-text, copy-paste docs that render without JavaScript live in this repo:\n\n- **[AGENTS.md](./AGENTS.md)** — start here: mental model, rules, and gotchas\n- **[docs/concepts.md](./docs/concepts.md)** — the document/View/Term model, mutability, build tiers\n- **[docs/match-syntax.md](./docs/match-syntax.md)** — the `.match()` mini-language\n- **[docs/tags.md](./docs/tags.md)** — the complete, valid part-of-speech tagset\n- **[docs/api.md](./docs/api.md)** — every method, signature, and description\n- **[docs/recipes.md](./docs/recipes.md)** — solutions to common tasks\n- **[llms-full.txt](./docs/llms-full.txt)** — all of the above in one fetchable file\n\n<img height=\"80px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n## API\n\n### Compromise/one\n\n##### Output\n\n- **[.text()](https://observablehq.com/@spencermountain/compromise-text)** - return the document as text\n- **[.json()](https://observablehq.com/@spencermountain/compromise-json)** - return the document as data\n- **[.debug()](https://observablehq.com/@spencermountain/compromise-output)** - pretty-print the interpreted document\n- **[.out()](https://observablehq.com/@spencermountain/compromise-output)** - a named or custom output\n- **[.html({})](https://observablehq.com/@spencermountain/compromise-html)** - output custom html tags for matches\n- **[.wrap({})](https://observablehq.com/@spencermountain/compromise-output)** - produce custom output for document matches\n\n##### Utils\n\n- **[.found](https://observablehq.com/@spencermountain/compromise-utils)** _[getter]_ - is this document empty?\n- **[.docs](https://observablehq.com/@spencermountain/compromise-utils)** _[getter]_ get term objects as json\n- **[.length](https://observablehq.com/@spencermountain/compromise-utils)** _[getter]_ - count the # of characters in the document (string length)\n- **[.isView](https://observablehq.com/@spencermountain/compromise-utils)** _[getter]_ - identify a compromise object\n- **[.compute()](https://observablehq.com/@spencermountain/compromise-compute)** - run a named analysis on the document\n- **[.clone()](https://observablehq.com/@spencermountain/compromise-utils)** - deep-copy the document, so that no references remain\n- **[.termList()](https://observablehq.com/@spencermountain/compromise-accessors)** - return a flat list of all Term objects in match\n- **[.cache({})](https://observablehq.com/@spencermountain/compromise-cache)** - freeze the current state of the document, for speed-purposes\n- **[.uncache()](https://observablehq.com/@spencermountain/compromise-cache)** - un-freezes the current state of the document, so it may be transformed\n- **[.freeze({})](https://observablehq.com/@spencermountain/compromise-freeze)** - prevent any tags from being removed, in these terms\n- **[.unfreeze({})](https://observablehq.com/@spencermountain/compromise-freeze)** - allow tags to change again, as default\n\n##### Accessors\n\n- **[.all()](https://observablehq.com/@spencermountain/compromise-utils)** - return the whole original document ('zoom out')\n- **[.terms()](https://observablehq.com/@spencermountain/compromise-selections)** - split-up results by each individual term\n- **[.first(n)](https://observablehq.com/@spencermountain/compromise-accessors)** - use only the first result(s)\n- **[.last(n)](https://observablehq.com/@spencermountain/compromise-accessors)** - use only the last result(s)\n- **[.slice(n,n)](https://observablehq.com/@spencermountain/compromise-accessors)** - grab a subset of the results\n- **[.eq(n)](https://observablehq.com/@spencermountain/compromise-accessors)** - use only the nth result\n- **[.firstTerms()](https://observablehq.com/@spencermountain/compromise-accessors)** - get the first word in each match\n- **[.lastTerms()](https://observablehq.com/@spencermountain/compromise-accessors)** - get the end word in each match\n- **[.fullSentences()](https://observablehq.com/@spencermountain/compromise-accessors)** - get the whole sentence for each match\n- **[.groups()](https://observablehq.com/@spencermountain/compromise-accessors)** - grab any named capture-groups from a match\n- **[.wordCount()](https://observablehq.com/@spencermountain/compromise-utils)** - count the # of terms in the document\n- **[.confidence()](https://observablehq.com/@spencermountain/compromise-utils)** - an average score for pos tag interpretations\n\n##### Match\n\n_(match methods use the [match-syntax](https://docs.compromise.cool/compromise-match-syntax).)_\n\n- **[.match('')](https://observablehq.com/@spencermountain/compromise-match)** - return a new Doc, with this one as a parent\n- **[.not('')](https://observablehq.com/@spencermountain/compromise-match)** - return all results except for this\n- **[.matchOne('')](https://observablehq.com/@spencermountain/compromise-match)** - return only the first match\n- **[.if('')](https://observablehq.com/@spencermountain/compromise-match)** - return each current phrase, only if it contains this match ('only')\n- **[.ifNo('')](https://observablehq.com/@spencermountain/compromise-match)** - Filter-out any current phrases that have this match ('notIf')\n- **[.has('')](https://observablehq.com/@spencermountain/compromise-match)** - Return a boolean if this match exists\n- **[.before('')](https://observablehq.com/@spencermountain/compromise-match)** - return all terms before a match, in each phrase\n- **[.after('')](https://observablehq.com/@spencermountain/compromise-match)** - return all terms after a match, in each phrase\n- **[.union()](https://observablehq.com/@spencermountain/compromise-set)** - return combined matches without duplicates\n- **[.intersection()](https://observablehq.com/@spencermountain/compromise-set)** - return only duplicate matches\n- **[.complement()](https://observablehq.com/@spencermountain/compromise-set)** - get everything not in another match\n- **[.settle()](https://observablehq.com/@spencermountain/compromise-set)** - remove overlaps from matches\n- **[.growRight('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms immediately after each match\n- **[.growLeft('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms immediately before each match\n- **[.grow('')](https://observablehq.com/@spencermountain/compromise-match)** - add any matching terms before or after each match\n- **[.sweep(net)](https://observablehq.com/@spencermountain/compromise-sweep)** - apply a series of match objects to the document\n- **[.splitOn('')](https://observablehq.com/@spencermountain/compromise-split)** - return a Document with three parts for every match ('splitOn')\n- **[.splitBefore('')](https://observablehq.com/@spencermountain/compromise-split)** - partition a phrase before each matching segment\n- **[.splitAfter('')](https://observablehq.com/@spencermountain/compromise-split)** - partition a phrase after each matching segment\n- **[.join()](https://observablehq.com/@spencermountain/compromise-split)** - merge any neighbouring terms in each match\n- **[.joinIf(leftMatch, rightMatch)](https://observablehq.com/@spencermountain/compromise-split)** - merge any neighbouring terms under given conditions\n- **[.lookup([])](https://observablehq.com/@spencermountain/compromise-match)** - quick find for an array of string matches\n- **[.autoFill()](https://observablehq.com/@spencermountain/compromise-typeahead)** - create type-ahead assumptions on the document\n\n##### Tag\n\n- **[.tag('')](https://observablehq.com/@spencermountain/compromise-tagger)** - Give all terms the given tag\n- **[.tagSafe('')](https://observablehq.com/@spencermountain/compromise-tagger)** - Only apply tag to terms if it is consistent with current tags\n- **[.unTag('')](https://observablehq.com/@spencermountain/compromise-tagger)** - Remove this term from the given terms\n- **[.canBe('')](https://observablehq.com/@spencermountain/compromise-tagger)** - return only the terms that can be this tag\n\n##### Case\n\n- **[.toLowerCase()](https://observablehq.com/@spencermountain/compromise-case)** - turn every letter of every term to lower-cse\n- **[.toUpperCase()](https://observablehq.com/@spencermountain/compromise-case)** - turn every letter of every term to upper case\n- **[.toTitleCase()](https://observablehq.com/@spencermountain/compromise-case)** - upper-case the first letter of each term\n- **[.toCamelCase()](https://observablehq.com/@spencermountain/compromise-case)** - remove whitespace and title-case each term\n\n##### Whitespace\n\n- **[.pre('')](https://observablehq.com/@spencermountain/compromise-whitespace)** - add this punctuation or whitespace before each match\n- **[.post('')](https://observablehq.com/@spencermountain/compromise-whitespace)** - add this punctuation or whitespace after each match\n- **[.trim()](https://observablehq.com/@spencermountain/compromise-whitespace)** - remove start and end whitespace\n- **[.hyphenate()](https://observablehq.com/@spencermountain/compromise-whitespace)** - connect words with hyphen, and remove whitespace\n- **[.dehyphenate()](https://observablehq.com/@spencermountain/compromise-whitespace)** - remove hyphens between words, and set whitespace\n- **[.toQuotations()](https://observablehq.com/@spencermountain/compromise-whitespace)** - add quotation marks around these matches\n- **[.toParentheses()](https://observablehq.com/@spencermountain/compromise-whitespace)** - add brackets around these matches\n\n##### Loops\n\n- **[.map(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - run each phrase through a function, and create a new document\n- **[.forEach(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - run a function on each phrase, as an individual document\n- **[.filter(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - return only the phrases that return true\n- **[.find(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - return a document with only the first phrase that matches\n- **[.some(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - return true or false if there is one matching phrase\n- **[.random(fn)](https://observablehq.com/@spencermountain/compromise-loops)** - sample a subset of the results\n\n##### Insert\n\n- **[.replace(match, replace)](https://observablehq.com/@spencermountain/compromise-insert)** - search and replace match with new content\n- **[.replaceWith(replace)](https://observablehq.com/@spencermountain/compromise-insert)** - substitute-in new text\n- **[.remove()](https://observablehq.com/@spencermountain/compromise-insert)** - fully remove these terms from the document\n- **[.insertBefore(str)](https://observablehq.com/@spencermountain/compromise-insert)** - add these new terms to the front of each match (prepend)\n- **[.insertAfter(str)](https://observablehq.com/@spencermountain/compromise-insert)** - add these new terms to the end of each match (append)\n- **[.concat()](https://observablehq.com/@spencermountain/compromise-insert)** - add these new things to the end\n- **[.swap(fromLemma, toLemma)](https://observablehq.com/@spencermountain/compromise-root)** - smart replace of root-words,using proper conjugation\n\n##### Transform\n\n- **[.sort('method')](https://observablehq.com/@spencermountain/compromise-sorting)** - re-arrange the order of the matches (in place)\n- **[.reverse()](https://observablehq.com/@spencermountain/compromise-sorting)** - reverse the order of the matches, but not the words\n- **[.unique()](https://observablehq.com/@spencermountain/compromise-sorting)** - remove any duplicate matches\n\n##### Lib\n\n_(these methods are on the main `nlp` object)_\n\n- **[nlp.tokenize(str)](https://observablehq.com/@spencermountain/compromise-tokenization)** - parse text without running POS-tagging\n- **[nlp.lazy(str, match)](https://observablehq.com/@spencermountain/compromise-performance)** - scan through a text with minimal analysis\n- **[nlp.plugin({})](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - mix in a compromise-plugin\n- **[nlp.parseMatch(str)](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - pre-parse any match statements into json\n- **[nlp.world()](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - grab or change library internals\n- **[nlp.model()](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - grab all current linguistic data\n- **[nlp.methods()](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - grab or change internal methods\n- **[nlp.hooks()](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - see which compute methods run automatically\n- **[nlp.verbose(mode)](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - log our decision-making for debugging\n- **[nlp.version](https://observablehq.com/@spencermountain/compromise-constructor-methods)** - current semver version of the library\n\n- **[nlp.addWords(obj, isFrozen?)](https://observablehq.com/@spencermountain/compromise-plugin)** - add new words to the lexicon\n- **[nlp.addTags(obj)](https://observablehq.com/@spencermountain/compromise-plugin)** - add new tags to the tagSet\n- **[nlp.typeahead(arr)](https://observablehq.com/@spencermountain/compromise-typeahead)** - add words to the auto-fill dictionary\n- **[nlp.buildTrie(arr)](https://observablehq.com/@spencermountain/compromise-lookup)** - compile a list of words into a fast lookup form\n- **[nlp.buildNet(arr)](https://observablehq.com/@spencermountain/compromise-sweep)** - compile a list of matches into a fast match form\n\n<!-- spacer -->\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n### compromise/two:\n\n##### Contractions\n\n- **[.contractions()](https://observablehq.com/@spencermountain/compromise-contractions)** - things like \"didn't\"\n- **[.contractions().expand()](https://observablehq.com/@spencermountain/compromise-contractions)** - things like \"didn't\"\n- **[.contract()](https://observablehq.com/@spencermountain/compromise-contractions)** - things like \"didn't\"\n\n<!-- spacer -->\n<img height=\"30px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n### compromise/three:\n\n- **[.normalize({})](https://observablehq.com/@spencermountain/compromise-normalization)** - clean-up the text in various ways\n\n##### Nouns\n\n- **[.nouns()](https://observablehq.com/@spencermountain/nouns)** - return any subsequent terms tagged as a Noun\n  - **[.nouns().json()](https://observablehq.com/@spencermountain/nouns)** - overloaded output with noun metadata\n  - **[.nouns().parse()](https://observablehq.com/@spencermountain/nouns)** - get tokenized noun-phrase\n  - **[.nouns().isPlural()](https://observablehq.com/@spencermountain/nouns)** - return only plural nouns\n  - **[.nouns().isSingular()](https://observablehq.com/@spencermountain/nouns)** - return only singular nouns\n  - **[.nouns().toPlural()](https://observablehq.com/@spencermountain/nouns)** - `'football captain' → 'football captains'`\n  - **[.nouns().toSingular()](https://observablehq.com/@spencermountain/nouns)** - `'turnovers' → 'turnover'`\n  - **[.nouns().adjectives()](https://observablehq.com/@spencermountain/nouns)** - get any adjectives describing this noun\n\n##### Verbs\n\n- **[.verbs()](https://observablehq.com/@spencermountain/verbs)** - return any subsequent terms tagged as a Verb\n  - **[.verbs().json()](https://observablehq.com/@spencermountain/verbs)** - overloaded output with verb metadata\n  - **[.verbs().parse()](https://observablehq.com/@spencermountain/verbs)** - get tokenized verb-phrase\n  - **[.verbs().subjects()](https://observablehq.com/@spencermountain/verbs)** - what is doing the verb action\n  - **[.verbs().adverbs()](https://observablehq.com/@spencermountain/verbs)** - return the adverbs describing this verb.\n  - **[.verbs().isSingular()](https://observablehq.com/@spencermountain/verbs)** - return singular verbs like 'spencer walks'\n  - **[.verbs().isPlural()](https://observablehq.com/@spencermountain/verbs)** - return plural verbs like 'we walk'\n  - **[.verbs().isImperative()](https://observablehq.com/@spencermountain/verbs)** - only instruction verbs like 'eat it!'\n  - **[.verbs().toPastTense()](https://observablehq.com/@spencermountain/verbs)** - `'will go' → 'went'`\n  - **[.verbs().toPresentTense()](https://observablehq.com/@spencermountain/verbs)** - `'walked' → 'walks'`\n  - **[.verbs().toFutureTense()](https://observablehq.com/@spencermountain/verbs)** - `'walked' → 'will walk'`\n  - **[.verbs().toInfinitive()](https://observablehq.com/@spencermountain/verbs)** - `'walks' → 'walk'`\n  - **[.verbs().toGerund()](https://observablehq.com/@spencermountain/verbs)** - `'walks' → 'is walking'`\n  - **[.verbs().toPastParticiple()](https://observablehq.com/@spencermountain/verbs)** - `'drive' → 'had driven'`\n  - **[.verbs().conjugate()](https://observablehq.com/@spencermountain/verbs)** - return all conjugations of these verbs\n  - **[.verbs().isNegative()](https://observablehq.com/@spencermountain/verbs)** - return verbs with 'not', 'never' or 'no'\n  - **[.verbs().isPositive()](https://observablehq.com/@spencermountain/verbs)** - only verbs without 'not', 'never' or 'no'\n  - **[.verbs().toNegative()](https://observablehq.com/@spencermountain/verbs)** - `'went' → 'did not go'`\n  - **[.verbs().toPositive()](https://observablehq.com/@spencermountain/verbs)** - `\"didn't study\" → 'studied'`\n\n##### Numbers\n\n- **[.numbers()](https://observablehq.com/@spencermountain/compromise-values)** - grab all written and numeric values\n  - **[.numbers().parse()](https://observablehq.com/@spencermountain/compromise-values)** - get tokenized number phrase\n  - **[.numbers().get()](https://observablehq.com/@spencermountain/compromise-values)** - get a simple javascript number\n  - **[.numbers().json()](https://observablehq.com/@spencermountain/compromise-values)** - overloaded output with number metadata\n  - **[.numbers().toNumber()](https://observablehq.com/@spencermountain/compromise-values)** - convert 'five' to `5`\n  - **[.numbers().toLocaleString()](https://observablehq.com/@spencermountain/compromise-values)** - add commas, or nicer formatting for numbers\n  - **[.numbers().toText()](https://observablehq.com/@spencermountain/compromise-values)** - convert '5' to `five`\n  - **[.numbers().toOrdinal()](https://observablehq.com/@spencermountain/compromise-values)** - convert 'five' to `fifth` or `5th`\n  - **[.numbers().toCardinal()](https://observablehq.com/@spencermountain/compromise-values)** - convert 'fifth' to `five` or `5`\n  - **[.numbers().isOrdinal()](https://observablehq.com/@spencermountain/compromise-values)** - return only ordinal numbers\n  - **[.numbers().isCardinal()](https://observablehq.com/@spencermountain/compromise-values)** - return only cardinal numbers\n  - **[.numbers().isEqual(n)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers with this value\n  - **[.numbers().greaterThan(min)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers bigger than n\n  - **[.numbers().lessThan(max)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers smaller than n\n  - **[.numbers().between(min, max)](https://observablehq.com/@spencermountain/compromise-values)** - return numbers between min and max\n  - **[.numbers().isUnit(unit)](https://observablehq.com/@spencermountain/compromise-values)** - return only numbers in the given unit, like 'km'\n  - **[.numbers().set(n)](https://observablehq.com/@spencermountain/compromise-values)** - set number to n\n  - **[.numbers().add(n)](https://observablehq.com/@spencermountain/compromise-values)** - increase number by n\n  - **[.numbers().subtract(n)](https://observablehq.com/@spencermountain/compromise-values)** - decrease number by n\n  - **[.numbers().increment()](https://observablehq.com/@spencermountain/compromise-values)** - increase number by 1\n  - **[.numbers().decrement()](https://observablehq.com/@spencermountain/compromise-values)** - decrease number by 1\n- **[.money()](https://observablehq.com/@spencermountain/compromise-values)** - things like `'$2.50'`\n  - **[.money().get()](https://observablehq.com/@spencermountain/compromise-values)** - retrieve the parsed amount(s) of money\n  - **[.money().json()](https://observablehq.com/@spencermountain/compromise-values)** - currency + number info\n  - **[.money().currency()](https://observablehq.com/@spencermountain/compromise-values)** - which currency the money is in\n- **[.fractions()](https://observablehq.com/@spencermountain/compromise-values)** - like '2/3rds' or 'one out of five'\n  - **[.fractions().parse()](https://observablehq.com/@spencermountain/compromise-values)** - get tokenized fraction\n  - **[.fractions().get()](https://observablehq.com/@spencermountain/compromise-values)** - simple numerator, denominator data\n  - **[.fractions().json()](https://observablehq.com/@spencermountain/compromise-values)** - json method overloaded with fractions data\n  - **[.fractions().toDecimal()](https://observablehq.com/@spencermountain/compromise-values)** - '2/3' -> '0.66'\n  - **[.fractions().normalize()](https://observablehq.com/@spencermountain/compromise-values)** - 'four out of 10' -> '4/10'\n  - **[.fractions().toText()](https://observablehq.com/@spencermountain/compromise-values)** - '4/10' -> 'four tenths'\n  - **[.fractions().toPercentage()](https://observablehq.com/@spencermountain/compromise-values)** - '4/10' -> '40%'\n- **[.percentages()](https://observablehq.com/@spencermountain/compromise-values)** - like '2.5%'\n  - **[.percentages().get()](https://observablehq.com/@spencermountain/compromise-values)** - return the percentage number / 100\n  - **[.percentages().json()](https://observablehq.com/@spencermountain/compromise-values)** - json overloaded with percentage information\n  - **[.percentages().toFraction()](https://observablehq.com/@spencermountain/compromise-values)** - '80%' -> '8/10'\n\n##### Sentences\n\n- **[.sentences()](https://observablehq.com/@spencermountain/compromise-sentences)** - return a sentence class with additional methods\n  - **[.sentences().json()](https://observablehq.com/@spencermountain/compromise-sentences)** - overloaded output with sentence metadata\n  <!-- - **[.sentences().subjects()](https://observablehq.com/@spencermountain/compromise-sentences)** - return the main noun of each sentence -->\n  - **[.sentences().toPastTense()](https://observablehq.com/@spencermountain/compromise-sentences)** - `he walks` -> `he walked`\n  - **[.sentences().toPresentTense()](https://observablehq.com/@spencermountain/compromise-sentences)** - `he walked` -> `he walks`\n  - **[.sentences().toFutureTense()](https://observablehq.com/@spencermountain/compromise-sentences)** -- `he walks` -> `he will walk`\n  - **[.sentences().toInfinitive()](https://observablehq.com/@spencermountain/compromise-sentences)** -- verb root-form `he walks` -> `he walk`\n  - **[.sentences().toNegative()](https://observablehq.com/@spencermountain/compromise-sentences)** - - `he walks` -> `he didn't walk`\n  - **[.sentences().isQuestion()](https://observablehq.com/@spencermountain/compromise-sentences)** - return questions with a `?`\n  - **[.sentences().isExclamation()](https://observablehq.com/@spencermountain/compromise-sentences)** - return sentences with a `!`\n  - **[.sentences().isStatement()](https://observablehq.com/@spencermountain/compromise-sentences)** - return sentences without `?` or `!`\n\n##### Adjectives\n\n- **[.adjectives()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'quick'`\n  - **[.adjectives().json()](https://observablehq.com/@spencermountain/compromise-selections)** - get adjective metadata\n  - **[.adjectives().conjugate()](https://observablehq.com/@spencermountain/compromise-selections)** - return all inflections of these adjectives\n  - **[.adjectives().adverbs()](https://observablehq.com/@spencermountain/compromise-selections)** - get adverbs describing this adjective\n  - **[.adjectives().toComparative()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quicker'\n  - **[.adjectives().toSuperlative()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickest'\n  - **[.adjectives().toAdverb()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickly'\n  - **[.adjectives().toNoun()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickness'\n\n##### Misc selections\n\n- **[.clauses()](https://observablehq.com/@spencermountain/compromise-selections)** - split-up sentences into multi-term phrases\n- **[.chunks()](https://observablehq.com/@spencermountain/compromise-selections)** - split-up sentences noun-phrases and verb-phrases\n- **[.hyphenated()](https://observablehq.com/@spencermountain/compromise-selections)** - all terms connected with a hyphen or dash like `'wash-out'`\n- **[.phoneNumbers()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'(939) 555-0113'`\n- **[.addresses()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'23 Park Avenue'`\n- **[.hashTags()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'#nlp'`\n- **[.emails()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'hi@compromise.cool'`\n- **[.emoticons()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `:)`\n- **[.emojis()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `💋`\n- **[.atMentions()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'@nlp_compromise'`\n- **[.urls()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'compromise.cool'`\n- **[.pronouns()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'he'`\n- **[.conjunctions()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'but'`\n- **[.prepositions()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'of'`\n- **[.abbreviations()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'Mrs.'`\n- **[.people()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - names like 'John F. Kennedy'\n  - **[.people().json()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - get person-name metadata\n  - **[.people().parse()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - get person-name interpretation\n- **[.places()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - like 'Paris, France'\n- **[.organizations()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - like 'Google, Inc'\n- **[.topics()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - `people()` + `places()` + `organizations()`\n- **[.adverbs()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'quickly'`\n  - **[.adverbs().json()](https://observablehq.com/@spencermountain/compromise-selections)** - get adverb metadata\n- **[.acronyms()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'FBI'`\n  - **[.acronyms().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - remove periods from acronyms\n  - **[.acronyms().addPeriods()](https://observablehq.com/@spencermountain/compromise-selections)** - add periods to acronyms\n- **[.parentheses()](https://observablehq.com/@spencermountain/compromise-selections)** - return anything inside (parentheses)\n  - **[.parentheses().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - remove brackets\n- **[.possessives()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `\"Spencer's\"`\n  - **[.possessives().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - \"Spencer's\" -> \"Spencer\"\n- **[.quotations()](https://observablehq.com/@spencermountain/compromise-selections)** - return any terms inside paired quotation marks\n  - **[.quotations().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - remove quotation marks\n- **[.slashes()](https://observablehq.com/@spencermountain/compromise-selections)** - return any terms grouped by slashes\n  - **[.slashes().split()](https://observablehq.com/@spencermountain/compromise-selections)** - turn 'love/hate' into 'love hate'\n\n<p>\n<img height=\"85px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/p>\n\n<div align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/399657/68221814-05ed1680-ffb8-11e9-8b6b-c7528d163871.png\"/>\n<\/div>\n\n### .extend():\n\nThis library comes with a considerate, common-sense baseline for english grammar.\n\nYou're free to change, or lay-waste to any settings - which is the fun part actually.\n\nthe easiest part is just to suggest tags for any given words:\n\n```js\nlet myWords = {\n  kermit: 'FirstName',\n  fozzie: 'FirstName',\n}\nlet doc = nlp(muppetText, myWords)\n```\n\nor make heavier changes with a [compromise-plugin](https://observablehq.com/@spencermountain/compromise-plugins).\n\n```js\nimport nlp from 'compromise'\nnlp.extend({\n  // add new tags\n  tags: {\n    Character: {\n      isA: 'Person',\n      notA: 'Adjective',\n    },\n  },\n  // add or change words in the lexicon\n  words: {\n    kermit: 'Character',\n    gonzo: 'Character',\n  },\n  // change inflections\n  irregulars: {\n    get: {\n      pastTense: 'gotten',\n      gerund: 'gettin',\n    },\n  },\n  // add new methods to compromise\n  api: View => {\n    View.prototype.kermitVoice = function () {\n      this.sentences().prepend('well,')\n      this.match('i [(am|was)]').prepend('um,')\n      return this\n    }\n  },\n})\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-plugins\">.plugin() docs<\/a>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221848-11404200-ffb8-11e9-90cd-3adee8d8564f.png\"/>\n<\/div>\n\n<!-- spacer -->\n<div >\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/div>\n\n### Docs:\n\n##### gentle introduction:\n\n- **[#1) Input → output](https://docs.compromise.cool/tutorial-1)**\n- **[#2) Match & transform](https://docs.compromise.cool/compromise-tutorial-2)**\n- **[#3) Making a chat-bot](https://docs.compromise.cool/compromise-making-a-bot)**\n  <!-- * **[Tutorial #4]()**  -  Making a plugin -->\n\n<div >\n  <img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/div>\n\n##### Documentation:\n\n| Concepts                                                                                    |                                               API                                               |                                                                                Plugins |\n| ------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------: |\n| [Accuracy](https://observablehq.com/@spencermountain/compromise-accuracy)                   |           [Accessors](https://observablehq.com/@spencermountain/compromise-accessors)           |          [Adjectives](https://observablehq.com/@spencermountain/compromise-adjectives) |\n| [Caching](https://observablehq.com/@spencermountain/compromise-cache)                       | [Constructor-methods](https://observablehq.com/@spencermountain/compromise-constructor-methods) |                    [Dates](https://observablehq.com/@spencermountain/compromise-dates) |\n| [Case](https://observablehq.com/@spencermountain/compromise-case)                           |        [Contractions](https://observablehq.com/@spencermountain/compromise-contractions)        |                  [Export](https://observablehq.com/@spencermountain/compromise-export) |\n| [Filesize](https://observablehq.com/@spencermountain/compromise-filesize)                   |              [Insert](https://observablehq.com/@spencermountain/compromise-insert)              |                      [Hash](https://observablehq.com/@spencermountain/compromise-hash) |\n| [Internals](https://observablehq.com/@spencermountain/compromise-internals)                 |                [Json](https://observablehq.com/@spencermountain/compromise-json)                |                      [Html](https://observablehq.com/@spencermountain/compromise-html) |\n| [Justification](https://observablehq.com/@spencermountain/compromise-justification)         |        [Character Offsets](https://observablehq.com/@spencermountain/compromise-offsets)        |              [Keypress](https://observablehq.com/@spencermountain/compromise-keypress) |\n| [Lexicon](https://observablehq.com/@spencermountain/compromise-lexicon)                     |               [Loops](https://observablehq.com/@spencermountain/compromise-loops)               |                   [Ngrams](https://observablehq.com/@spencermountain/compromise-ngram) |\n| [Match-syntax](https://observablehq.com/@spencermountain/compromise-match-syntax)           |               [Match](https://observablehq.com/@spencermountain/compromise-match)               |                 [Numbers](https://observablehq.com/@spencermountain/compromise-values) |\n| [Performance](https://observablehq.com/@spencermountain/compromise-performance)             |                    [Nouns](https://observablehq.com/@spencermountain/nouns)                     |          [Paragraphs](https://observablehq.com/@spencermountain/compromise-paragraphs) |\n| [Plugins](https://observablehq.com/@spencermountain/compromise-plugins)                     |              [Output](https://observablehq.com/@spencermountain/compromise-output)              |                      [Scan](https://observablehq.com/@spencermountain/compromise-scan) |\n| [Projects](https://observablehq.com/@spencermountain/compromise-projects)                   |          [Selections](https://observablehq.com/@spencermountain/compromise-selections)          |            [Sentences](https://observablehq.com/@spencermountain/compromise-sentences) |\n| [Tagger](https://observablehq.com/@spencermountain/compromise-tagger)                       |             [Sorting](https://observablehq.com/@spencermountain/compromise-sorting)             |            [Syllables](https://observablehq.com/@spencermountain/compromise-syllables) |\n| [Tags](https://observablehq.com/@spencermountain/compromise-tags)                           |               [Split](https://observablehq.com/@spencermountain/compromise-split)               |            [Pronounce](https://observablehq.com/@spencermountain/compromise-pronounce) |\n| [Tokenization](https://observablehq.com/@spencermountain/compromise-tokenization)           |                [Text](https://observablehq.com/@spencermountain/compromise-text)                |                  [Strict](https://observablehq.com/@spencermountain/compromise-strict) |\n| [Named-Entities](https://observablehq.com/@spencermountain/topics-named-entity-recognition) |               [Utils](https://observablehq.com/@spencermountain/compromise-utils)               |            [Penn-tags](https://observablehq.com/@spencermountain/compromise-penn-tags) |\n| [Whitespace](https://observablehq.com/@spencermountain/compromise-whitespace)               |                    [Verbs](https://observablehq.com/@spencermountain/verbs)                     | [Typeahead](https://observablehq.com/@spencermountain/compromise/compromise-typeahead) |\n| [World data](https://observablehq.com/@spencermountain/compromise-world)                    |       [Normalization](https://observablehq.com/@spencermountain/compromise-normalization)       |                    [Sweep](https://observablehq.com/@spencermountain/compromise-sweep) |\n| [Fuzzy-matching](https://observablehq.com/@spencermountain/compromise-fuzzy-matching)       |          [Typescript](https://observablehq.com/@spencermountain/compromise-typescript)          |              [Mutation](https://observablehq.com/@spencermountain/compromise-mutation) |\n| [Root-forms](https://observablehq.com/@spencermountain/compromise-root)                     |\n\n<div >\n  <img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/div>\n\n##### Talks:\n\n- **[Language as an Interface](https://www.youtube.com/watch?v=WuPVS2tCg8s)** - by Spencer Kelly\n- **[Coding Chat Bots](https://www.youtube.com/watch?v=c_hmwFwvO0U)** - by KahWee Teng\n- **[On Typing and data](https://vimeo.com/496095722)** - by Spencer Kelly\n\n##### Articles:\n\n- **[Geocoding Social Conversations with NLP and JavaScript](http://compromise.cool)** - by Microsoft\n- **[Microservice Recipe](https://eventn.com/recipes/text-parsing-with-nlp-compromise)** - by Eventn\n- **[Adventure Game Sentence Parsing with Compromise](https://killalldefects.com/2020/02/20/adventure-game-sentence-parsing-with-compromise/)**\n- **[Building Text-Based Games](https://killalldefects.com/2019/09/24/building-text-based-games-with-compromise-nlp/)** - by Matt Eland\n- **[Fun with javascript in BigQuery](https://medium.com/@hoffa/new-in-bigquery-persistent-udfs-c9ea4100fd83#6e09)** - by Felipe Hoffa\n- **[Natural Language Processing... in the Browser?](https://dev.to/charlesdlandau/natural-language-processing-in-the-browser-52hj)** - by Charles Landau\n\n##### Some fun Applications:\n\n- **[Automated Bechdel Test](https://github.com/guardian/bechdel-test)** - by The Guardian\n- **[Story generation framework](https://perchance.org/welcome)** - by Jose Phrocca\n- **[Tumbler blog of lists](https://leanstooneside.tumblr.com/)** - horse-ebooks-like lists - by Michael Paulukonis\n- **[Video Editing from Transcription](https://newtheory.io/)** - by New Theory\n- **[Browser extension Fact-checking](https://github.com/AlexanderKidd/FactoidL)** - by Alexander Kidd\n- **[Siri shortcut](https://routinehub.co/shortcut/3260)** - by Michael Byrns\n- **[Amazon skill](https://github.com/tajddin/voiceplay)** - by Tajddin Maghni\n- **[Tasking Slack-bot](https://github.com/kevinsuh/toki)** - by Kevin Suh\n  [[see more]](https://observablehq.com/@spencermountain/compromise-projects)\n\n##### Comparisons\n\n- [Compromise and Spacy](https://observablehq.com/@spencermountain/compromise-and-spacy)\n- [Compromise and NLTK](https://observablehq.com/@spencermountain/compromise-and-nltk)\n\n<!-- spacer -->\n<div align=\"center\">\n  <img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <hr/>\n<\/div>\n<div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221632-b9094000-ffb7-11e9-99e0-b48edd6cdf8a.png\"/>\n<\/div>\n\n<!-- <div align=\"center\">\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221824-09809d80-ffb8-11e9-9ef0-6ed3574b0ce8.png\"/>\n<\/div> -->\n\n### Plugins:\n\nThese are some helpful extensions:\n\n##### Dates\n\n`npm install compromise-dates`\n\n- **[.dates()](https://observablehq.com/@spencermountain/compromise-dates)** - find dates like `June 8th` or `03/03/18`\n  - **[.dates().get()](https://observablehq.com/@spencermountain/compromise-dates)** - simple start/end json result\n  - **[.dates().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with date metadata\n  - **[.dates().format('')](https://observablehq.com/@spencermountain/compromise-dates)** - convert the dates to specific formats\n  - **[.dates().toShortForm()](https://observablehq.com/@spencermountain/compromise-dates)** - convert 'Wednesday' to 'Wed', etc\n  - **[.dates().toLongForm()](https://observablehq.com/@spencermountain/compromise-dates)** - convert 'Feb' to 'February', etc\n- **[.durations()](https://observablehq.com/@spencermountain/compromise-dates)** - `2 weeks` or `5mins`\n  - **[.durations().get()](https://observablehq.com/@spencermountain/compromise-dates)** - return simple json for duration\n  - **[.durations().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with duration metadata\n- **[.times()](https://observablehq.com/@spencermountain/compromise-dates)** - `4:30pm` or `half past five`\n  - **[.times().get()](https://observablehq.com/@spencermountain/compromise-dates)** - return simple json for times\n  - **[.times().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with time metadata\n\n##### Stats\n\n`npm install compromise-stats`\n\n- **[.tfidf({})](https://observablehq.com/@spencermountain/compromise-tfidf)** - rank words by frequency and uniqueness\n\n- **[.ngrams({})](https://observablehq.com/@spencermountain/compromise-ngram)** - list all repeating sub-phrases, by word-count\n- **[.unigrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams with one word\n- **[.bigrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams with two words\n- **[.trigrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams with three words\n- **[.startgrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams including the first term of a phrase\n- **[.endgrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams including the last term of a phrase\n- **[.edgegrams()](https://observablehq.com/@spencermountain/compromise-ngram)** - n-grams including the first or last term of a phrase\n\n##### Speech\n\n`npm install compromise-syllables`\n\n- **[.syllables()](https://observablehq.com/@spencermountain/compromise-syllables)** - split each term by its typical pronunciation\n- **[.soundsLike()](https://observablehq.com/@spencermountain/compromise-soundsLike)** - produce a estimated pronunciation\n\n##### Wikipedia\n\n`npm install compromise-wikipedia`\n\n- **[.wikipedia()](https://observablehq.com/@spencermountain/compromise-wikipedia)** - compressed article reconciliation\n\n<!-- spacer -->\n<div >\n  <img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n  <hr/>\n<\/div>\n\n### Typescript\n\nwe're committed to typescript/deno support, both in main and in the official-plugins:\n\n```ts\nimport nlp from 'compromise'\nimport stats from 'compromise-stats'\n\nconst nlpEx = nlp.extend(stats)\n\nnlpEx('This is type safe!').ngrams({ min: 1 })\n```\n\n<div align=\"right\">\n  <a href=\"https://docs.compromise.cool/compromise-typescript\">typescript docs<\/a>\n<\/div>\n\n<div >\n  <img height=\"50px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n<\/div>\n\n#### Limitations:\n\n- **slash-support:**\n  We currently split slashes up as different words, like we do for hyphens. so things like this don't work:\n  <code>nlp('the koala eats/shoots/leaves').has('koala leaves') //false<\/code>\n\n- **inter-sentence match:**\n  By default, sentences are the top-level abstraction.\n  Inter-sentence, or multi-sentence matches aren't supported without <a href=\"https://github.com/spencermountain/compromise/tree/master/plugins/paragraphs\">a plugin<\/a>:\n  <code>nlp(\"that's it. Back to Winnipeg!\").has('it back')//false<\/code>\n\n- **nested match syntax:**\n  the <s>danger<\/s> beauty of regex is that you can recurse indefinitely.\n  Our match syntax is much weaker. Things like this are not <i>(yet)<\/i> possible:\n  <code>doc.match('(modern (major|minor))? general')<\/code>\n  complex matches must be achieved with successive **.match()** statements.\n\n- **dependency parsing:**\n  Proper sentence transformation requires understanding the [syntax tree](https://en.wikipedia.org/wiki/Parse_tree) of a sentence, which we don't currently do.\n  We should! Help wanted with this.\n\n##### FAQ\n\n<ul align=\"left\">\n  <p>\n    <details>\n      <summary>☂️ Isn't javascript too...<\/summary>\n      <p><\/p>\n      <ul>\n        yeah it is!\n        <br/>\n        it wasn't built to compete with NLTK, and may not fit every project.\n        <br/>\n        string processing is synchronous too, and parallelizing node processes is weird.\n        <br/>\n        See <a href=\"https://observablehq.com/@spencermountain/compromise-performance\">here<\/a> for information about speed & performance, and\n        <a href=\"https://observablehq.com/@spencermountain/compromise-justification\">here<\/a> for project motivations\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n  <p>\n    <details>\n      <summary>💃 Can it run on my arduino-watch?<\/summary>\n      <p><\/p>\n      <ul>\n        Only if it's water-proof!\n        <br/>\n        Read <a href=\"https://observablehq.com/@spencermountain/compromise-quickstart\">quick start<\/a> for running compromise in workers, mobile apps, and all sorts of funny environments.\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n  <p>\n    <details>\n      <summary>🌎 Compromise in other Languages?<\/summary>\n      <p><\/p>\n      <ul>\n        we've got work-in-progress forks for <a href=\"https://github.com/nlp-compromise/de-compromise\">German<\/a>, <a href=\"https://github.com/nlp-compromise/fr-compromise\">French<\/a>, <a href=\"https://github.com/nlp-compromise/es-compromise\">Spanish<\/a>, and <a href=\"https://github.com/nlp-compromise/it-compromise\">Italian<\/a> in the same philosophy.\n        <br/>\n        and need some help.\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n  <p>\n    <details>\n      <summary>✨ Partial builds?<\/summary>\n      <p><\/p>\n      <ul>\n        we do offer a <a href=\"https://observablehq.com/@spencermountain/compromise-filesize\">tokenize-only<\/a> build, which has the POS-tagger pulled-out.\n        <br/>\n        but otherwise, compromise isn't easily tree-shaken.\n        <br/>\n        the tagging methods are competitive, and greedy, so it's not recommended to pull things out.\n        <br/>\n        Note that without a full POS-tagging, the contraction-parser won't work perfectly. (<i>(spencer's cool)<\/i> vs. <i>(spencer's house)<\/i>)\n        <br/>\n        It's recommended to run the library fully.\n      <\/ul>\n      <p><\/p>\n    <\/details>\n  <\/p>\n<\/ul>\n\n<div align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/399657/68221731-e8b84800-ffb7-11e9-8453-6395e0e903fa.png\"/>\n<\/div>\n\n#### See Also:\n\n- &nbsp; **[en-pos](https://github.com/finnlp/en-pos)** - very clever javascript pos-tagger _by [Alex Corvi](https://github.com/alexcorvi)_\n- &nbsp; **[naturalNode](https://github.com/NaturalNode/natural)** - fancier statistical nlp in javascript\n- &nbsp; **[winkJS](https://winkjs.org/)** - POS-tagger, tokenizer, machine-learning in javascript\n- &nbsp; **[dariusk/pos-js ](https://github.com/dariusk/pos-js)** - fastTag fork in javascript\n- &nbsp; **[compendium-js](https://github.com/Ulflander/compendium-js)** - POS and sentiment analysis in javascript\n- &nbsp; **[nodeBox linguistics](https://www.nodebox.net/code/index.php/Linguistics)** - conjugation, inflection in javascript\n- &nbsp; **[reText](https://github.com/wooorm/retext)** - very impressive [text utilities](https://github.com/wooorm/retext/blob/master/doc/plugins.md) in javascript\n- &nbsp; **[superScript](https://github.com/superscriptjs/superscript)** - conversation engine in js\n- &nbsp; **[jsPos](https://code.google.com/archive/p/jspos/)** - javascript build of the time-tested Brill-tagger\n\n- &nbsp; **[spaCy](https://spacy.io/)** - speedy, multilingual tagger in C/python\n- &nbsp; **[Prose](https://github.com/jdkato/prose/)** - quick tagger in Go by Joseph Kato\n- &nbsp; **[TextBlob](https://github.com/sloria/TextBlob)** - python tagger\n\n<img height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/>\n\n<b>MIT<\/b>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D828:241B62:17C284:5E6610:6AB92E8B"},"text_sha256":"18af2b3c93595a25e598c4a44baa55d4e4a0778e4b754b8457ea47e063c1215c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"data-privacy-stack/presidio","input_row":{"repository":"data-privacy-stack/presidio","url":"https://github.com/data-privacy-stack/presidio","name":"presidio","owner":"data-privacy-stack","description":"An open-source framework for detecting, redacting, masking, and anonymizing sensitive data (PII) across text, images, and structured data. Supports NLP, pattern matching, and customizable pipelines.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":11054,"issues":580,"created_at":"2018-05-04T11:08:58Z","updated_at":"2026-09-27T12:03:56Z","first_commit_at":"2018-05-04T11:08:59Z","last_commit_at":"2026-09-24T11:18:24Z","activity_months":100.69,"ai_ml_match_topics":"nlp; transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:14.096Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"data-privacy-stack/presidio","visibility":"public","created_at":"2018-05-04T11:08:58Z","updated_at":"2026-09-27T12:03:56Z","private":false,"fork":false,"archived":false,"stargazers_count":11054,"open_issues_count":149,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1443","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BE:0BA1:DAD964:101302E:6AB92E8E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1442","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D6:3BE445:17B7BCC:1BE1124:6AB92E8E"},"commit":{"sha":"8e834b01b96dcb0d9e351f3a0bc0857c330424f2","url":"https://github.com/data-privacy-stack/presidio/commit/8e834b01b96dcb0d9e351f3a0bc0857c330424f2","date":"2018-05-04T11:08:59Z","author_date":"2018-05-04T11:08:59Z","committer_date":"2018-05-04T11:08:59Z","tree_sha":"18f558d1db4ce09f8c211fa1e1bc5bf9e41de5a0","message_first_line":"Initial commit"},"tree_request_status":200,"tree_rate":{"github_remaining":"1441","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B5:71F98:185B48B:1C85B54:6AB92E8E"},"tree_truncated":false,"document_candidates":[],"documents":[],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1440","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0905:280FBC:17E42EB:1C0DB46:6AB92E8F"},"commit":{"sha":"43c2452d129c488e14783eff1c23677956ab6649","url":"https://github.com/data-privacy-stack/presidio/commit/43c2452d129c488e14783eff1c23677956ab6649","date":"2026-06-30T14:34:10Z","author_date":"2026-06-30T14:34:10Z","committer_date":"2026-06-30T14:34:10Z","tree_sha":"02fc5654bcf7b388045385ad10229e7c7a948c90","message_first_line":"Fix AU ABN accepting some invalid leading-zero numbers (#2109)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1439","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087D:767EB:1819F0F:1C44F90:6AB92E8F"},"tree_truncated":false,"document_candidates":[{"path":"README.MD","size":6722,"blob_sha":"94978150831ce33ad9b5e53ec70d9d56b284dcf4","priority":0},{"path":"SECURITY.md","size":1071,"blob_sha":"5290ac4edd0a056feded7f03fa6db6584b90dfcb","priority":1}],"documents":[{"path":"README.MD","size":6722,"blob_sha":"94978150831ce33ad9b5e53ec70d9d56b284dcf4","priority":0,"status":200,"text":"# Presidio - Data Protection and De-identification SDK\n## :mega: Presidio is moving to a new home! [Read more here](docs/project_transition.md) :mega:\n**Context aware, pluggable and customizable PII de-identification service for text and images.**\n\n---\n\n[![Build Status](https://github.com/data-privacy-stack/presidio/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/data-privacy-stack/presidio/actions/workflows/ci.yml)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n![Release](https://img.shields.io/github/release/data-privacy-stack/presidio.svg)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/6076/badge)](https://www.bestpractices.dev/projects/6076)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/presidio-analyzer.svg)](https://pypi.python.org/pypi/presidio-analyzer/)\n[![Discord](https://img.shields.io/badge/Discord-Join%20the%20community-5865F2?logo=discord&logoColor=white)](https://discord.gg/MewtBGFquB)\n\n| Component | Downloads | Coverage |\n|-----------|-----------|----------|\n| Presidio Analyzer | [![Pypi Downloads](https://img.shields.io/pypi/dm/presidio-analyzer.svg)](https://pypi.python.org/pypi/presidio-analyzer/) | [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/data-privacy-stack/presidio/coverage-data-presidio-analyzer/endpoint.json)](https://github.com/data-privacy-stack/presidio/tree/coverage-data-presidio-analyzer) |\n| Presidio Anonymizer | [![Pypi Downloads](https://img.shields.io/pypi/dm/presidio-anonymizer.svg)](https://pypi.python.org/pypi/presidio-anonymizer/) | [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/data-privacy-stack/presidio/coverage-data-presidio-anonymizer/endpoint.json)](https://github.com/data-privacy-stack/presidio/tree/coverage-data-presidio-anonymizer) |\n| Presidio Image-Redactor | [![Pypi Downloads](https://img.shields.io/pypi/dm/presidio-image-redactor.svg)](https://pypi.python.org/pypi/presidio-image-redactor/) | [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/data-privacy-stack/presidio/coverage-data-presidio-image-redactor/endpoint.json)](https://github.com/data-privacy-stack/presidio/tree/coverage-data-presidio-image-redactor) |\n| Presidio Structured | [![Pypi Downloads](https://img.shields.io/pypi/dm/presidio-structured.svg)](https://pypi.python.org/pypi/presidio-structured/) | [![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/data-privacy-stack/presidio/coverage-data-presidio-structured/endpoint.json)](https://github.com/data-privacy-stack/presidio/tree/coverage-data-presidio-structured) |\n## What is Presidio\n\nPresidio _(Origin from Latin praesidium ‘protection, garrison’)_ helps to ensure sensitive data is properly managed and governed. It provides fast **_identification_** and **_anonymization_** modules for private entities in text such as credit card numbers, names, locations, social security numbers, bitcoin wallets, US phone numbers, financial data and more.\n\n![Presidio demo gif](docs/assets/changing_text.gif)\n\n---\n\n### :blue_book: [Full documentation](https://data-privacy-stack.github.io/presidio)\n\n### :mega: [Project transition update](docs/project_transition.md)\n\n### :question: [Frequently Asked Questions](docs/faq.md)\n\n### :thought_balloon: [Demo](https://huggingface.co/spaces/presidio/presidio_demo)\n\n### :flight_departure: [Examples](https://data-privacy-stack.github.io/presidio/samples/)\n\n---\n\n\n### Goals\n\n- Allow organizations to preserve privacy in a simpler way by democratizing de-identification technologies and introducing transparency in decisions.\n- Embrace extensibility and customizability to a specific business need.\n- Facilitate both fully automated and semi-automated PII de-identification flows on multiple platforms.\n\n### Main features\n\n1. **Predefined** or **custom PII recognizers** leveraging _Named Entity Recognition_, _regular expressions_, _rule based logic_ and _checksum_ with relevant context in multiple languages.\n2. Options for connecting to external PII detection models.\n3. Multiple usage options, **from Python or PySpark workloads through Docker to Kubernetes**.\n4. **Customizability** in PII identification and de-identification.\n5. Module for **redacting PII text in images** (standard image types and DICOM medical images).\n\n:warning: Presidio can help identify sensitive/PII data in un/structured text. However, because it is using automated detection mechanisms, there is no guarantee that Presidio will find all sensitive information. Consequently, additional systems and protections should be employed.\n\n## Installing Presidio\n\n1. [Using pip](https://data-privacy-stack.github.io/presidio/installation/#using-pip)\n2. [Using Docker](https://data-privacy-stack.github.io/presidio/installation/#using-docker)\n3. [From source](https://data-privacy-stack.github.io/presidio/installation/#install-from-source)\n4. [Migrating from V1 to V2](./docs/presidio_V2.md)\n\n## Running Presidio\n\n1. [Getting started](https://data-privacy-stack.github.io/presidio/getting_started)\n2. [Setting up a development environment](https://data-privacy-stack.github.io/presidio/development)\n3. [PII de-identification in text](https://data-privacy-stack.github.io/presidio/text_anonymization)\n4. [PII de-identification in images](https://data-privacy-stack.github.io/presidio/image-redactor)\n5. [Usage samples and example deployments](https://data-privacy-stack.github.io/presidio/samples)\n\n---\n\n## Support\n\n- Before you submit an issue, please go over the [documentation](https://data-privacy-stack.github.io/presidio/).\n- For general discussions, please use the [GitHub repo's discussion board](https://github.com/data-privacy-stack/presidio/discussions).\n- If you have a usage question, found a bug or have a suggestion for improvement, please file a [GitHub issue](https://github.com/data-privacy-stack/presidio/issues).\n- For other matters, please email [presidio@dataprivacystack.org](mailto:presidio@dataprivacystack.org).\n\n## Contributing\n\nFor details on contributing to this repository, see the [contributing guide](CONTRIBUTING.md).\n\nThis project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Contributors\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n<a href=\"https://github.com/data-privacy-stack/presidio/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=data-privacy-stack/presidio\" />\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F422:3B6DE:178C29:5E2F14:6AB92E8E"},"text_sha256":"2c8d5de4dff3453f686e726ee79bdc4b87e01e3a2970a61159da9e7e0b407711"},{"path":"SECURITY.md","size":1071,"blob_sha":"5290ac4edd0a056feded7f03fa6db6584b90dfcb","priority":1,"status":200,"text":"# Security Policy\n\nWe take the security of this project seriously. If you believe you have found a security vulnerability, please report it to us responsibly using the instructions below.\n\n## Reporting a Vulnerability\n\n**Please do not open public GitHub issues for security vulnerabilities.**\n\nInstead, please use GitHub's **Private Vulnerability Reporting** feature:\n\n1. Navigate to the main page of the repository.\n2. Under the repository name, click **Security**.\n3. In the left sidebar, click **Reporting**.\n4. Click **Report a vulnerability** to open the advisory form.\n\nAlternatively, you can use this direct link: [Report a Security Vulnerability](https://github.com/data-privacy-stack/presidio/security/advisories/new)\n\n## Our Process\n\n* **Acknowledgment:** We will acknowledge receipt of your report within 48 hours.\n* **Evaluation:** We will investigate the issue and keep you updated via the private GitHub Advisory thread.\n* **Disclosure:** Once a fix is ready, we will coordinate the release and publish a Security Advisory to credit your work (if desired).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3A3E:09ED:E78CE:3FD5F8:6AB92E8E"},"text_sha256":"0adeffb4ec72a191932ddaeee6295ab0ba19ea3d59cf5c0e513f9537ff5e8a1e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"NLPchina/ansj_seg","input_row":{"repository":"NLPchina/ansj_seg","url":"https://github.com/NLPchina/ansj_seg","name":"ansj_seg","owner":"NLPchina","description":"ansj分词.ict的真正java实现.分词效果速度都超过开源版的ict. 中文分词,人名识别,词性标注,用户自定义词典","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6505,"issues":711,"created_at":"2012-09-05T05:56:24Z","updated_at":"2026-09-25T16:15:34Z","first_commit_at":"2012-09-05T05:56:25Z","last_commit_at":"2023-10-14T14:38:52Z","activity_months":133.25999999999999,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:16.676Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"NLPchina/ansj_seg","visibility":"public","created_at":"2012-09-05T05:56:24Z","updated_at":"2026-09-25T16:15:34Z","private":false,"fork":false,"archived":false,"stargazers_count":6505,"open_issues_count":54,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1438","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B6:278AC2:1887A87:1CB2834:6AB92E90"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1437","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079F:6E5BD:17BF3D3:1BE8AA9:6AB92E91"},"commit":{"sha":"1b9576a0b229818823e9deb0c237c5880171330a","url":"https://github.com/NLPchina/ansj_seg/commit/1b9576a0b229818823e9deb0c237c5880171330a","date":"2018-03-26T08:45:25Z","author_date":"2018-03-26T08:45:25Z","committer_date":"2018-03-26T08:45:25Z","tree_sha":"bcdb62263360fcf5652ac184047485ff755962da","message_first_line":"fix NLPchina/elasticsearch-analysis-ansj#109"},"tree_request_status":200,"tree_rate":{"github_remaining":"1436","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0870:724D2:17F48A7:1C1F3DE:6AB92E91"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2995,"blob_sha":"25f9e48607a42d7f10e279313902eaa88e087e46","priority":0}],"documents":[{"path":"README.md","size":2995,"blob_sha":"25f9e48607a42d7f10e279313902eaa88e087e46","priority":0,"status":200,"text":"Ansj中文分词\n==================\n\n [![1.X Build Status](https://travis-ci.org/NLPchina/ansj_seg.svg?branch=master)](https://travis-ci.org/NLPchina/ansj_seg) [![Gitter](https://badges.gitter.im/NLPchina/ansj_seg.svg)](https://gitter.im/NLPchina/ansj_seg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n\n#####使用帮助 : [3.x版本及之前](http://nlpchina.github.io/ansj_seg/) , [5.x版本及之后](https://github.com/NLPchina/ansj_seg/wiki)   在线测试地址 : <a href=\"http://demo.nlpcn.org\">http://demo.nlpcn.org<\/href>\n\n\n##### 摘要\n> 这是一个基于n-Gram+CRF+HMM的中文分词的java实现.\n\n> 分词速度达到每秒钟大约200万字左右（mac air下测试），准确率能达到96%以上\n\n> 目前实现了.中文分词. 中文姓名识别 . 用户自定义词典,关键字提取，自动摘要，关键字标记等功能\n\n> 可以应用到自然语言处理等方面,适用于对分词效果要求高的各种项目.\n\n\n#####  下载jar\n* 访问 [http://maven.nlpcn.org/org/ansj/](https://oss.sonatype.org/content/repositories/releases/org/ansj/ansj_seg/) 最好下载最新版 ansj_seg/\n  * 同时下载[nlp-lang.jar](https://oss.sonatype.org/content/repositories/releases/org/nlpcn/nlp-lang/) 需要和ansj_seg 配套..配套关系可以看jar包中的maven依赖,一般最新的ansj配最新的nlp-lang不会有错。\n* 导入到eclipse ，开始你的程序吧\n\n\n#####  maven\n\n````\n        \n        <dependency>\n            <groupId>org.ansj<\/groupId>\n            <artifactId>ansj_seg<\/artifactId>\n            <version>5.1.1<\/version>\n        <\/dependency>\n    \n````\n\n#####  调用demo\n\n如果你第一次下载只想测试测试效果可以调用这个简易接口\n\n<pre><code>\n String str = \"欢迎使用ansj_seg,(ansj中文分词)在这里如果你遇到什么问题都可以联系我.我一定尽我所能.帮助大家.ansj_seg更快,更准,更自由!\" ;\n System.out.println(ToAnalysis.parse(str));\n \n ﻿欢迎/v,使用/v,ansj/en,_,seg/en,,,(,ansj/en,中文/nz,分词/n,),在/p,这里/r,如果/c,你/r,遇到/v,什么/r,问题/n,都/d,可以/v,联系/v,我/r,./m,我/r,一定/d,尽我所能/l,./m,帮助/v,大家/r,./m,ansj/en,_,seg/en,更快/d,,,更/d,准/a,,,更/d,自由/a,!\n<\/code><\/pre>\n\n\n#####  Join Us\n\n心思了很久，不管有没有人帮忙把。我写上来，如果你有兴趣，有热情可以联系我。\n\n* 补充文档,增加调用实例和说明\n* 增加一些规则性Recognition，举例[身份证号码识别](https://github.com/NLPchina/ansj_seg/blob/master/src/main/java/org/ansj/recognition/impl/IDCardRecognition.java)，目前未完成的有 `时间识别`，`IP地址识别`，`邮箱识别`,`网址识别`，`词性识别`等...\n* 提供更加优化的CRF模型。替换ansj的默认模型。\n* 补充测试用例，n多地方测试不完全。如果你有兴趣可以帮忙啦！\n* 重构人名识别模型。增加机构名识别等模型。\n* 增加句法文法分析\n* 实现lstm的分词方式\n* 拾遗补漏...\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:180070:5EA480:6AB92E91"},"text_sha256":"8a042e36d22b34c53ae0f8a51f2212c158818a68768f7ab5e5ca1dd0f4fd0efe"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1435","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F5:6C9BF:1827E1F:1C52AAB:6AB92E92"},"commit":{"sha":"50787ca2c7031d2a18c5393a97d1a54432790785","url":"https://github.com/NLPchina/ansj_seg/commit/50787ca2c7031d2a18c5393a97d1a54432790785","date":"2023-10-14T14:38:52Z","author_date":"2023-10-14T14:38:52Z","committer_date":"2023-10-14T14:38:52Z","tree_sha":"89278415079d62b0d57acead125f83fe50667578","message_first_line":"fix testcase"},"tree_request_status":200,"tree_rate":{"github_remaining":"1434","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D3:35C5DA:17CBF30:1BF5EDF:6AB92E92"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2499,"blob_sha":"fb3d0f3b50c1c4655133d1973bcd38e9e4b470f9","priority":0}],"documents":[{"path":"README.md","size":2499,"blob_sha":"fb3d0f3b50c1c4655133d1973bcd38e9e4b470f9","priority":0,"status":200,"text":"Ansj中文分词\n==================\n\n [![1.X Build Status](https://travis-ci.org/NLPchina/ansj_seg.svg?branch=master)](https://travis-ci.org/NLPchina/ansj_seg) [![Gitter](https://badges.gitter.im/NLPchina/ansj_seg.svg)](https://gitter.im/NLPchina/ansj_seg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\n\n#####  使用帮助\n* 开发文档：[3.x版本及之前](http://nlpchina.github.io/ansj_seg/)，[5.x版本及之后](https://github.com/NLPchina/ansj_seg/wiki)\n\n\n\n##### 摘要\n> 这是一个基于n-Gram+CRF+HMM的中文分词的java实现。\n\n> 分词速度达到每秒钟大约200万字左右（mac air下测试），准确率能达到96%以上。\n\n> 目前实现了中文分词、中文姓名识别、用户自定义词典、关键字提取、自动摘要、关键字标记等功能。\n\n> 可以应用到自然语言处理等方面，适用于对分词效果要求高的各种项目。\n\n\n\n\n#####  maven\n\n````\n        \n        <dependency>\n            <groupId>org.ansj<\/groupId>\n            <artifactId>ansj_seg<\/artifactId>\n            <version>5.1.1<\/version>\n        <\/dependency>\n    \n````\n\n#####  调用demo\n\n如果你第一次下载只想测试测试效果可以调用这个简易接口\n\n<pre><code>\n String str = \"欢迎使用ansj_seg,(ansj中文分词)在这里如果你遇到什么问题都可以联系我.我一定尽我所能.帮助大家.ansj_seg更快,更准,更自由!\" ;\n System.out.println(ToAnalysis.parse(str));\n \n ﻿欢迎/v,使用/v,ansj/en,_,seg/en,,,(,ansj/en,中文/nz,分词/n,),在/p,这里/r,如果/c,你/r,遇到/v,什么/r,问题/n,都/d,可以/v,联系/v,我/r,./m,我/r,一定/d,尽我所能/l,./m,帮助/v,大家/r,./m,ansj/en,_,seg/en,更快/d,,,更/d,准/a,,,更/d,自由/a,!\n<\/code><\/pre>\n\n\n#####  Join Us\n\n想了很久，不管有没有人帮忙吧。我写上来，如果你有兴趣，有热情可以联系我。\n\n* 补充文档，增加调用实例和说明\n* 增加一些规则性Recognition，举例[身份证号码识别](https://github.com/NLPchina/ansj_seg/blob/master/src/main/java/org/ansj/recognition/impl/IDCardRecognition.java)，目前未完成的有 `时间识别`，`IP地址识别`，`邮箱识别`，`网址识别`，`词性识别`等...\n* 提供更加优化的CRF模型。替换ansj的默认模型。\n* 补充测试用例，n多地方测试不完全。如果你有兴趣可以帮忙啦！\n* 重构人名识别模型。增加机构名识别等模型。\n* 增加句法文法分析\n* 实现lstm的分词方式\n* 拾遗补漏...\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3928:2C474:1828C2:5ECC9B:6AB92E90"},"text_sha256":"878c96754bdf7e34a8f2c620d6808d825717061b3df092d1aa4c6821516e7193"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"aisingapore/TagUI","input_row":{"repository":"aisingapore/TagUI","url":"https://github.com/aisingapore/TagUI","name":"TagUI","owner":"aisingapore","description":"Free RPA tool by AI Singapore","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":6334,"issues":1304,"created_at":"2016-12-06T04:30:34Z","updated_at":"2026-09-24T15:01:33Z","first_commit_at":"2016-12-06T04:30:35Z","last_commit_at":"2026-09-20T11:49:19Z","activity_months":117.45,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:19.165Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"aisingapore/TagUI","visibility":"public","created_at":"2016-12-06T04:30:34Z","updated_at":"2026-09-24T15:01:33Z","private":false,"fork":false,"archived":false,"stargazers_count":6334,"open_issues_count":1,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1433","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C7:78367:1836775:1C60F72:6AB92E93"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1432","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C3:731F6:181826A:1C42FCE:6AB92E93"},"commit":{"sha":"b05b8a7d06ada1b8741ad084847d1f07a1a0e07f","url":"https://github.com/aisingapore/TagUI/commit/b05b8a7d06ada1b8741ad084847d1f07a1a0e07f","date":"2018-05-24T04:24:19Z","author_date":"2018-05-24T04:24:19Z","committer_date":"2018-05-24T04:24:19Z","tree_sha":"4c51b64a4cb3bee6cd85eb079005fab47b0f9d48","message_first_line":"Escape single quote for blocks only for needed types (all not JS/DOM)."},"tree_request_status":200,"tree_rate":{"github_remaining":"1431","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:180ECB6:1C39908:6AB92E93"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":54914,"blob_sha":"f6054de3fb9af66c00a273124f15ceb9186143a1","priority":0}],"documents":[{"path":"README.md","size":54914,"blob_sha":"f6054de3fb9af66c00a273124f15ceb9186143a1","priority":0,"status":200,"text":"<img src=\"https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/media/tebel_icon.png\" height=\"111\" align=\"right\">\n\n# TagUI\n\n[Why This](#why-this) | [Set Up](#set-up) | [To Use](#to-use) | [Cheat Sheet](#cheat-sheet) | [Developers](#developers-reference) | [**Tutorial**](https://github.com/kelaberetiv/TagUI/blob/master/src/media/RPA%20Workshop.md) | [**Slides**](https://prezi.com/p/f5vag20tuth8/) | [**Video**](https://www.youtube.com/watch?v=u1x2HOV9Jmg)\n\n***TagUI is now maintained by [AI Singapore (aisingapore.org)](https://www.aisingapore.org), a government-funded initiative to build local artificial intelligence capabilities. The intention is to add AI capabilities to TagUI while keeping it open-source and free to use. To get started, check out above hands-on tutorial, Prezi slides, or recorded video at FOSSASIA 2018.***\n\n### FEATURES\n***TagUI is a RPA / CLI tool for digital process automation***\n- automate Chrome visibly or headlessly\n- visual automation of websites and desktop\n- write in 20+ human languages & JavaScript\n- Chrome extension for recording web actions\n- R & Python integration for big data / AI / ML\n- CLI, REST API, advanced API calls covered\n\n# Why This\nThe goal of UI (user interface) automation is to reproduce cognitive interactions that you have with websites or your desktop, so that your computer can do it for you, base on your schedule or conditions. TagUI helps you rapidly automate your repetitive or time-critical tasks - use cases include process automation, data acquisition and testing of web apps.\n\nRead on for more info or jump right into the [flow samples section](https://github.com/kelaberetiv/TagUI#flow-samples) to see examples of TagUI automation in natural-language-like syntax. This is a full-feature and free open-source tool, so there's nothing to upgrade to or any paid subscription. To feedback suggestions or bugs, [raise an issue](https://github.com/kelaberetiv/TagUI/issues) or email ksoh@aisingapore.org.\n\n<details>\n  <summary>\n    Click to show differences between TagUI open-source RPA and commercial RPA software\n  <\/summary>\n  \n  ***Key Strengths***\n  - cross-platform, works on Windows, macOS, Linux\n  - increased security as users can view source code\n  - rapid iteration cycles in improvement of features\n  - $0 to use, under Apache 2.0 open-source license\n  - easy to use, thus rapid development + deployment\n  - easy for IT policies to deploy, simply unzip and run\n  - native integration with Python and R for AI / ML / DL\n  - easy API calls to Azure / Amazon cognitive services\n\n  ***Neutral Differences***\n  - scripts written in 21 human languages, not flowchart\n  - JavaScript for advanced scripting instead of C# / VB\n  - visual and OCR based automation for desktop apps\n  - open-source desktop automation integration planned\n\n  ***Key Weaknesses***\n  - lack of enterprise audit, control, dashboard, reporting\n  - lack of SLA or 24/7 support team for incident-handling\n  - lack of large development teams (easily > 30 people)\n  - lack of user / developer base grown over many years\n  - lack of consultancies / partners distribution network\n<\/details>\n\n### HOW IT WORKS\nTagUI converts your intentions in different human languages into lines of working JavaScript code that perform UI automation. Under the hood, it uses [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/), [Sikuli](http://sikulix.com), [CasperJS](http://casperjs.org), [PhantomJS](http://phantomjs.org) & [SlimerJS](https://slimerjs.org).\n\n```\nhttps://www.typeform.com\nclick login\ntype username as user@gmail.com\ntype password as 12345678\nclick btnlogin\ndownload https://admin.typeform.com/xxx to report.csv\n```\n\n<details>\n  <summary>\n    Click to show powerful and user-friendly features of TagUI that come right out of the box\n  <\/summary>\n\n  - For example, TagUI will instantly convert the automation flow above into 100+ lines of JavaScript code and automatically perform the steps to download a report. Conditions can also be written in natural language for making decisions or checking webpage. No further backend coding or step definition is required. This makes it easy for rapid prototyping, deployment and maintenance of UI automation, whether you are a developer or not. The language engine supports over 20 languages and can be modified or extended easily by users to improve accuracy or add more languages.\n\n  - The automation flow can be triggered from scheduling, command line (in natural language), API URL, email etc. Everything happens headlessly in the background without seeing any web browser, so that you can continue using the computer or server uninterrupted. Running on a visible web browser is also supported, using Chrome or Firefox browser (see chrome or firefox option below). API or command calls can be made with a single line to integrate with other services or apps. Continuous integration with CI/CD tools is possible using CasperJS framework and TagUI's Chrome integration.\n\n  - If you know JavaScript and want to be more expressive, you can even use JavaScript directly in the flow. If not, you will still enjoy friendly but powerful features such as repositories to store your reusable objects, flexible datatables for batch automation, and a Chrome extension which creates automation flows by recording your actions. For rapid prototyping, there's also an interactive live mode for trying out TagUI steps or JavaScript code in real-time. TagUI has built-in integration with Chrome / headless Chrome directly, which also works in live mode.\n\n  - There is automatic waiting for web elements to appear + error-checking + nesting of JavaScript code blocks. Not forgetting the option to run automation flows hosted online or auto-upload run results online for sharing. TagUI also supports visual automation of website and desktop through built-in integration with Sikuli. Instead of using element identifiers, images can be used to identify user interface elements to interact with. TagUI has native integrations with R and Python for big data and machine learning capabilities. R and Python are popular languages with many frameworks and packages in this space.\n  \n<\/details>\n  \n# Set Up\nTagUI is in v3.5 - it unzips and runs on macOS, Linux, Windows ([link to release notes](https://github.com/kelaberetiv/TagUI/releases))\n\nTip - for [cutting edge](https://github.com/kelaberetiv/TagUI/compare/v3.5.0...master) version, download [from here](https://github.com/kelaberetiv/TagUI/archive/master.zip) to overwrite an existing packaged installation\n\n### PACKAGED INSTALLATION\nEasiest way to use TagUI - no setup is needed, in most environments all required dependencies are packaged in.\n\nPlatform|macOS|Linux|Windows|Node.js (macOS/Linux)\n:------:|:---:|:---:|:-----:|:-------------------:\nPackage|[unzip and run](https://raw.githubusercontent.com/tebelorg/Tump/master/TagUI_macOS.zip)|[unzip and run](https://raw.githubusercontent.com/tebelorg/Tump/master/TagUI_Linux.zip)|[unzip and run](https://raw.githubusercontent.com/tebelorg/Tump/master/TagUI_Windows.zip)|[npm install tagui](https://www.npmjs.com/package/tagui)\n\n***Potential exceptions*** - On some Windows computers, if you see 'MSVCR110.dll is missing' error, install [this from Microsoft website](https://www.microsoft.com/en-us/download/details.aspx?id=30679) (choose vcredist_x86.exe) - this file is required to run the PHP engine. On some newer macOS versions, if you get a 'dyld: Library not loaded' error, [install OpenSSL in this way](https://github.com/kelaberetiv/TagUI/issues/86#issuecomment-372045221). For some flavours of Linux (Ubuntu for example), which do not have PHP pre-installed, google how to install PHP accordingly (Ubuntu for example, apt-get install php).\n\nOptional - configure web browser settings in tagui_config.txt, such as browser resolution, step timeout of 10s etc\n \n### MANUAL INSTALLATION\n<details>\n  <summary>\n    Click to show step-by-step setup if you prefer to download dependencies manually from their websites\n  <\/summary>\n  \n  1. PhantomJS (headless scriptable web browser) - http://phantomjs.org\n  2. CasperJS (navigation/testing for PhantomJS) - http://casperjs.org\n  3. SlimerJS (scriptable web browser for Firefox) - https://slimerjs.org\n  4. TagUI (general purpose web automation tool) - https://git.io/vMCTZ\n  5. PHP (only required for manual Windows setup) - http://windows.php.net\n\n  Tip - recommend putting TagUI to a folder path without spaces (some dependencies have issue with that). for manual Windows setup, 1. set SLIMERJS_EXECUTABLE env variable to point to slimerjs.bat, 2. put [GNU utilities](http://unxutils.sourceforge.net) (cut / gawk / grep / head / sort / tail / tee), [curl ssl](https://curl.haxx.se) in tagui\\src\\unx, 3. add phantomjs\\bin, casperjs\\bin, php folders to path\n\n<\/details>\n\n# To Use\n### COMMAND LINE\n```\n./tagui flow_filename option(s) for macOS/Linux, tagui flow_filename option(s) for Windows\n```\n- Flow filename (and its .csv) can be a local file or the URL of an online file\n- Automation flow filename can have no extension, .txt or .js or .tagui extension\n- Objects, keywords, datatables can be defined in flow_filename.csv (optional)\n\n<details>\n  <summary>\n    Click to show info on automation log files, and how to run tagui from any directory\n  <\/summary>\n  \n  After each automation run, a .log file will be created to store output of the execution, a .js file is the generated JavaScript file, a .raw is the expanded flow after reading in any module sub-scripts that are called in that flow. These files are for user reference purpose and can be helpful in debugging or troubleshooting the automation flow.\n\n  Tip - to run tagui from anywhere in macOS/Linux, use ln -sf /full_path/tagui/src/tagui /usr/local/bin/tagui to create symbolic link. To run tagui from anywhere in Windows, add tagui/src [folder to path](http://lmgtfy.com/?q=add+to+path+in+windows). Then tagui will be accessible from any folder. If you have issue running visible automation using Firefox/SlimerJS [check this setting](https://docs.slimerjs.org/current/installation.html#using-unstable-version-or-very-old-versions-of-firefox).\n  \n<\/details>\n\n<details>\n  <summary>\n    Click to show the command line options supported by TagUI and their purposes\n  <\/summary>\n  \n  Option|Purpose\n  :----:|:------\n  IMPORTANT|SAVE YOUR WORK BEFORE USING CHROME OR HEADLESS, TAGUI WILL RESTART CHROME\n  headless|run on invisible Chrome web browser instead of default PhantomJS (first install [Chrome](https://www.google.com/chrome/))\n  chrome|run on visible Chrome web browser instead of invisible PhantomJS (first install Chrome)\n  firefox|run on visible Firefox web browser instead of invisible browser (first install [Firefox](https://www.mozilla.org/en-US/firefox/new/))\n  upload|upload automation flow and result to [hastebin.com](https://hastebin.com) (expires 30 days after last view)\n  report|web report for sharing of run results on webserver (default is only a text log file)\n  debug|show run-time backend messages from PhantomJS for detailed tracing and logging\n  quiet|run without output except for explicit output (echo / show / check / errors etc)\n  speed|skip 3-second delay between datatable iterations (and skip restarting of Chrome)\n  test|testing with check step test assertions for CI/CD integration (output XUnit XML file)\n  baseline|output execution log and relative-path output files to a separate baseline directory\n  input(s)|add your own parameter(s) to be used in your automation flow as variables p1 to p9\n\n<\/details>\n\n<details>\n  <summary>\n    Click to show how to run TagUI scripts by double-clicking as desktop icons\n  <\/summary>\n  \n  To do that on Windows, create a .cmd or .bat file with contents like the following, which goes to the directory where you want to run the automation, and run tagui command on the file with your specified options. You can also [associate .tagui files directly](https://www.digitaltrends.com/computing/how-to-set-default-programs-and-file-types-in-windows-10) to be opened by tagui\\src\\tagui.cmd command. Double-clicking the .cmd or .bat file will start automation.\n\n  ```\n  @echo off\n  c:\n  cd c:\\folder\n  tagui filename quiet speed chrome\n  ```\n\n  To do that on macOS / Linux, create a file with contents like the following, which goes to the directory where you want to run the automation, and run tagui command on the file with your specified options. You will need to use the command chmod 700 on the file to give it execute permissions, so that it can be run by double-clicking on it.\n\n  ```\n  cd /Users/username/folder\n  tagui filename quiet speed chrome\n  ```\n\n<\/details>\n\n### BY SCHEDULING\nTo schedule an automation flow in crontab (macOS/Linux), for example at 8am daily\n```\n0 8 * * * /full_path_on_your_server/tagui flow_filename option(s)\n```\n\nTip - for Windows, use Task Scheduler instead (search schedule from Start Menu)\n\n### CHROME EXTENSION\nDownload from [Chrome Web Store](https://chrome.google.com/webstore/detail/tagui-web-automation/egdllmehgfgjebhlkjmcnhiocfcidnjk/) to use TagUI Chrome web browser extension for recording automation flows.\n\n<details>\n  <summary>\n    Click to show details about TagUI Chrome extension and what it can be used for\n  <\/summary>\n  \n  TagUI Chrome extension is based on [Resurrectio tool](https://github.com/ebrehault/resurrectio) and records steps such as page navigation, clicking web elements and entering information. To start recording automation flows, click TagUI icon on your Chrome toolbar. Right-click for shortcuts to some TagUI steps, such as capturing webpage screenshot or to show the element identifier.\n\n  The recording is not foolproof (for example, the underlying recording engine cannot capture frames, popup windows or tab key input). It is meant to simplify flow creation with some edits, instead of typing everything manually. [See this video](https://www.youtube.com/watch?v=bFvsc4a8hWQ) for an example of recording sequence of steps, editing for adjustments and playing back the automation.\n\n<\/details>\n\n### NATIVE LANGUAGES\nTo run TagUI flows in native languages or output flow execution in other languages ([see demo run](https://github.com/kelaberetiv/TagUI/issues/68#issuecomment-344380657))\n1. set your default flow language with [tagui_language variable](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui_config.txt) in tagui_config.txt\n2. write automation flow in native language base on [language definition .csv files](https://github.com/kelaberetiv/TagUI/tree/master/src/languages)\n3. optionally set tagui_language in flow to any other languages as output language\n\n<details>\n  <summary>\n    Click to show the 20+ human languages supported by TagUI and how to self-build language definitions\n  <\/summary>\n  \n  Tip - as Windows Unicode support is not as straightforward as macOS/Linux, doing this in Windows may require changing system locale, using chcp command, and selecting a font to display native language correctly ([more info](http://www.walkernews.net/2013/05/19/how-to-get-windows-command-prompt-displays-chinese-characters/))\n  \n  TagUI language engine supports over 20 languages and can be modified or extended easily by users to improve accuracy or add more languages. The languages are Bengali, Chinese, English, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Serbian, Spanish, Tagalog, Tamil, Thai, Vietnamese. This starting set is partly chosen base on the [list of most commonly used languages](https://www.babbel.com/en/magazine/the-10-most-spoken-languages-in-the-world), partly from the countries around where I'm from (Singapore), and partly from countries with a lot of developers.\n\n  If your native language is not in the above list, you can also automate building a new native language definition by using this language [build automation flow](https://github.com/kelaberetiv/TagUI/blob/master/src/languages/build) (src/languages/build) that self-builds the vocabulary set using Google Translate. To do that, update [build.csv](https://github.com/kelaberetiv/TagUI/blob/master/src/languages/build.csv) with the languages that you want to build and run `tagui build using chrome` in src/languages folder. Use quiet option to hide the verbose automation output. The generated files are named as their 2-character language codes to prevent overwriting existing language definitions by accident. To use the generated .csv files, rename them to their full language names. See [full list of languages possible](https://cloud.google.com/translate/docs/languages) to be generated by Google Translate.\n\n  Most of the language definitions are automatically self-built using Google Translate (except english.csv and chinese.csv), and would be wrong without understanding vocabulary used in UI interaction context. Native language users can update the language definition csv themselves and are welcome to submit PRs with correct words to be used. Some languages are very different from English structure (for eg, written from right to left, different order of adjective and noun) and would be impossible to use correctly in TagUI.\n\n<\/details>\n\n### VISUAL AUTOMATION\nTagUI has built-in integration with [Sikuli (base on OpenCV)](http://sikulix.com) to allow identifying web elements and desktop user interface elements for interaction. Steps that support visual automation are tap / click, hover / move, type / enter, select / choose, read / fetch, show / print, save, snap. Simply specify an image filename (.png or .bmp format) of what to look for visually, in place of the element identifier, to use visual automation alongside your usual automation steps.\n\n<details>\n  <summary>\n    Click to show where to download and install Sikuli, and a demo GIF of visual automation in action\n  <\/summary>\n  \n  Sikuli is excluded from TagUI packaged installation due to complex dependencies that are handled by its installer. First, make sure [Java JDK v8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) is installed. [Download Sikuli](http://sikulix.com/quickstart/) to tagui/src/tagui.sikuli folder and setup (choose option 1 - Pack1). If you have download error messages during setup, [unzip contents of this file](https://raw.githubusercontent.com/tebelorg/Tump/master/Sikuli-1.1.3.zip) to tagui/src/tagui.sikuli folder, right-click sikulixsetup-1.1.3.jar and open or run as administrator.\n\n  Relative paths are supported for image filenames (eg pc.png, images/button.bmp). A screen (real or Xvfb) is needed for visual automation. [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) (optical character recognition) is used for visually retrieving text.\n\n  ![Sample Visual Automation](https://raw.githubusercontent.com/tebelorg/Tump/master/visual_flow.gif)\n\n<\/details>\n\n### R INTEGRATION\nTagUI has built-in integration with R - an open-source software environment for statistical computing and graphics. R can be used for big data and machine learning. The r step can be used to run commands in R and retrieve the output of those commands. To use R integration in TagUI, first [download R software for your OS](https://www.r-project.org/). Make sure that Rscript command is accessible from your command prompt (added to path or symbolically linked).\n\n<details>\n  <summary>\n    Click to show how to use r step in your automation flow to send and receive data from R frameworks\n  <\/summary>\n  \n  In your automation flow, use the r step followed by the R commands to be executed, separated by `;`. You can then use the `cat()` command in R to output the result you want to be accessible in your automation flow as `r_result` variable. For a super basic example, below steps in your TagUI automation flow will output 3. If the result is JSON data, the JSON object `r_json` will be created for easy access to JSON data elements. If not, `r_json` will be null.\n  \n  ```\n  // using r step to denote R code, and getting back output from r_result\n  r a=1;b=2\n  r c=a+b\n  r cat(c)\n  echo r_result\n  \n  // alternatively, you can use r begin and r finish to denote a R code block\n  r begin\n  a=1;b=2\n  c=a+b\n  cat(c)\n  r finish\n  echo r_result\n  \n  // an example of passing dynamically generated variables to R integraton\n  phone = 1234567\n  name = 'donald duck'\n  r_step('phone = ' + phone)\n  r_step('name = \"' + name + '\"')\n\n  r cat(name)\n  echo r_result\n  r cat(phone)\n  echo r_result\n  ```\n\n  You can also use the `source()` command in R to run R scripts. For examples of using R for machine learning, check out this [essentials of machine learning algorithms](https://www.analyticsvidhya.com/blog/2017/09/common-machine-learning-algorithms/) article or this [guerilla guide to machine learning](https://www.kdnuggets.com/2017/05/guerrilla-guide-machine-learning-r.html) video series.\n\n<\/details>\n\n### PYTHON INTEGRATION\nTagUI has built-in integration with Python (works out of the box for both v2 & v3) - a programming language with many popular frameworks for big data and machine learning. The py step can be used to run commands in Python and retrieve the output of those commands. To use Python integration in TagUI, first [download Python for your OS](https://www.python.org/). macOS and Linux normally come pre-installed with Python. Make sure that python command is accessible from command prompt.\n\n<details>\n  <summary>\n    Click to show how to use py step in your automation flow to send and receive data from Python frameworks\n  <\/summary>\n\n  In your automation flow, use the py step followed by the Python commands to be executed, separated by `;`. You can then use the `print` command in Python to output the result you want to be accessible in your automation flow as `py_result` variable. For a super basic example, below steps in your TagUI automation flow will output 3. If the result is JSON data, the JSON object `py_json` will be created for easy access to JSON data elements. If not, `py_json` will be null.\n\n  ```\n  // using py step to denote Python code, and getting back output from py_result\n  py a=1;b=2\n  py c=a+b\n  py print(c)\n  echo py_result\n  \n  // alternatively, you can use py begin and py finish to denote a Python code block\n  py begin\n  a=1;b=2\n  c=a+b\n  print(c)\n  py finish\n  echo py_result\n  \n  // an example of passing dynamically generated variables to Python integraton\n  phone = 1234567\n  name = 'donald duck'\n  py_step('phone = ' + phone)\n  py_step('name = \"' + name + '\"')\n\n  py print(name)\n  echo py_result\n  py print(phone)\n  echo py_result\n  ```\n  You can also use the `execfile()` command in Python v2.X to run Python scripts. Or use `exec(open('filename').read())` in [Python v3.X to run Python scripts](https://stackoverflow.com/questions/436198/what-is-an-alternative-to-execfile-in-python-3). For examples of using Python for machine learning, check out this [essentials of machine learning algorithms](https://www.analyticsvidhya.com/blog/2017/09/common-machine-learning-algorithms/) article or this article on [Python deep learning frameworks](https://www.kdnuggets.com/2017/02/python-deep-learning-frameworks-overview.html).\n  \n<\/details>\n\n### CLI ASSISTANT\nTagUI scripts are already in natural-language-like syntax to convert to JavaScript code. What's even better is having natural-language-like syntax on the command line. Instead of typing `tagui download_bank_report june creditcard` to run the automation flow download_bank_report with parameters june creditcard, you can type `erina download my june creditcard bank report`. This may be more intuitive than recalling which automation filename you saved to run. For a demo of the CLI (command line interface) assistant in action, [see this video](https://www.youtube.com/watch?v=Sm4WNQ89gRA).\n\n<details>\n  <summary>\n    Click to show details on how you can rename your CLI assistant and the syntax used to invoke automations\n  <\/summary>\n  \n  The commands erina (macOS/Linux) and erina.cmd (Windows) can be renamed to some other name you like. The commands can be set up in the same way as the tagui / tagui.cmd above to be accessible from any folder. The command basically interprets this general syntax `erina single-word-action fillers options/parameters fillers single-or-multi-word-context` to call run the corresponding automation flow `action_context` with `options/parameters`.\n\n  Also, adding `using chrome` / `using headless` / `using firefox` at the end will let it run using the respective browsers. The default location where automation flows are searched for is in tagui/flows folder and can be changed in tagui_helper.php. Filler words (is, are, was, were, my, me) are ignored as they don't convey important information ([more design info](https://github.com/kelaberetiv/TagUI/issues/44#issuecomment-321108786)).\n\n<\/details>\n\n### FLOW SAMPLES\nFollowing automation flow samples ([tagui/src/samples folder](https://github.com/kelaberetiv/TagUI/tree/master/src/samples)) are included with TagUI\n\nFlow Sample |Purpose\n:-----------|:------\n[1_yahoo](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/1_yahoo)|searches github on Yahoo and captures screenshot of results\n[2_twitter](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/2_twitter)|goes to a Twitter page and saves some profile information\n[3_github](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/3_github)|goes to a GitHub page and downloads the repository file\n[4_conditions](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/4_conditions)|goes through examples of using conditions in natural language\n[5_repositories](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/5_repositories)|shows using repositories on Russian social media site VK.com\n[6_datatables](https://github.com/kelaberetiv/TagUI/tree/master/src/samples/6_datatables)|set of flows uses datatables to retrieve and act on GitHub info\n[7_testing](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/7_testing)|shows how to use check step assertions for CI/CD integration\n[8_hastebin](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/8_hastebin)|used by upload option to upload flow result to hastebin.com\n[9_misc](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/9_misc)|shows how to use steps popup, frame, dom, js, { and } block\n\n# Cheat Sheet\n### AUTOMATION WORKFLOW\n- What happens behind the scenes when you run an automation flow\n\n![TagUI Flowchart](https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/media/flowchart.png)\n\n### STEPS DESCRIPTION\n- TagUI auto-waits for a webpage element to appear and interacts with it as soon as it appears\n- Element identifier can be auto-recorded using TagUI Chrome extension, or [found from web browser](https://help.surveygizmo.com/help/how-to-find-element-ids-to-use-with-javascript)\n- Identifiers help to pinpoint which webpage elements you want to interact with ([examples in flow samples](https://github.com/kelaberetiv/TagUI#flow-samples))\n- TagUI auto-selects provided identifier in this order - xpath, css, id, name, class, title, aria-label, text(), href\n\nBasic Step|Parameters (separator in bold)|Purpose\n:---------|:-----------------------------|:------\nhttp(s)://|just enter full url of webpage ('+variable+' for variable)|go to specified webpage\ntap / click|element to click|click on an element\nhover / move|element to hover|move cursor to element\ntype / enter|element ***as*** text ([enter] = enter, [clear] = clear field)|enter element as text\nselect / choose|element to select ***as*** option value ([clear] = clear selection)|choose dropdown option\nread / fetch|element to read (page = webpage) ***to*** variable name|fetch element text to variable\nshow / print|element to read (page = webpage, ie raw html) |print element text to output\nsave|element (page = webpage) ***to*** optional filename|save element text to file\nload|filename ***to*** variable name|load file content to variable\necho|text (in quotation marks) and variables|print text/variables to output\ndump|text and variables ***to*** optional filename|save text/variables to file\nwrite|text and variables ***to*** optional filename|append text/variables to file\nsnap|element (page = webpage) ***to*** optional filename|save screenshot to file\nsnap (pdf)|page ***to*** filename.pdf (headless Chrome / PhantomJS)|save webpage to basic pdf\ntable|element (XPath selector only) ***to*** optional filename.csv|save basic html table to csv\ntagui|relative or absolute filename (see MODULES section)|run another tagui flow\n\nTip - to use variables where text is expected, '+variable+' can be used. XPath is an expressive way to identify web elements. If you know xpath and use xpath for element identifier, use double quotes for text //\\*[@title=\"Login\"]\n\n<details>\n  <summary>\n    Click to show pro steps such as wait, live, check, api, run, dom, js, r, py, vision, code blocks and variables\n  <\/summary>\n\n  Pro Step|Parameters (separator in bold)|Purpose\n  :-------|:-----------------------------|:------\n  wait|optional time in seconds (default is 5 seconds)|explicitly wait for some time\n  live|try steps or code interactively in Chrome / PhantomJS|enter live mode ([Firefox not yet](https://github.com/laurentj/slimerjs/issues/639))\n  check|condition **&#124;** text if true **&#124;** text if false (text in quotes)|check condition and print result\n  upload|element (CSS selector only) ***as*** filename to upload|upload file to website\n  download|url to download ***to*** filename to save|download from url to file\n  receive|url keyword to watch ***to*** filename to save|receive resource to file\n  frame|frame name **&#124;** subframe name if any|next step or block in frame/subframe\n  popup|url keyword of new tab window to look for|next step or block in new tab window\n  { and }|use { to start block and } to end block (on new line)|define block of steps and code\n  api|full url (including parameters) of api call|call api & save response to api_result\n  run|OS shell command including parameters|run OS command & save to run_result\n  dom|javascript code for document object model|run code in dom & save to dom_result\n  js|javascript statements (skip auto-detection)|treat as JS code explicitly\n  r|R statements for big data and machine learning|run R statements & save to r_result\n  py|python code for big data and machine learning|run python code & save to py_result\n  vision|custom visual automation commands|run custom sikuli commands\n  timeout|time in seconds before step errors out|change auto-wait timeout\n  variable_name| = value (for text, put in quotes, use + to concat)|define variable variable_name\n  // (on new line)|user comments (ignored during execution)|add user comments\n\n  Tip - for headless and visible Chrome, file downloads can be done using normal webpage interaction or specifying the URL as a navigation flow step. For Firefox and PhantomJS, the download and receive step can be used. As TagUI default execution context is local, to run javascript on webpage dom (eg document.querySelector) use dom step. Set dom_json variable to pass a variable for use in dom step. Or dom_json = {tmp_number: phone, tmp_text: name} to pass multiple variables for use in dom step (dom_json.tmp_number and dom_json.tmp_text).\n\n  For steps run, dom, js, r, py, vision, instead of typing the step and the command, you can use something like py begin followed by many lines of py code, and end with py finish to denote an entire code block. This saves typing the step repeatedly for a large integration code block. For steps r, py, vision, the helper functions r_step(), py_step(), vision_step() can be used to pass dynamic variables to those integrations. Below is an example for py step for passing dynamically generated varibles from TagUI to Python integration.\n\n  ```\n  phone = 1234567\n  name = 'donald duck'\n  py_step('phone = ' + phone)\n  py_step('name = \"' + name + '\"')\n\n  py print(name)\n  echo py_result\n  py print(phone)\n  echo py_result\n  ```\n  \n<\/details>\n\n### CONDITIONS EXAMPLES\n<details>\n  <summary>\n    Click to show how conditions can be expressed in natural language (optional brackets) or JavaScript\n  <\/summary>\n\n  - Conditions help in decision-making and taking different actions base on run-time context\n  - Write text in quotation marks (either \" or ' works) to differentiate text from variable names\n  - { and } block is required after for / while, auto-wait disables in while loop (will hang CasperJS)\n\n  Condition (in natural language)|JavaScript\n  :------------------------------|:---------\n  example - if day equals to \"Friday\"| if (day == \"Friday\")\n  example - if menu contains \"fruits\"| if (menu.indexOf(\"fruits\")>-1)\n  example - if A more than B and C not equals to D | if ((A > B) && (C != D))\n  example - for n from 1 to 4 | for (n=1; n<=4; n++)\n  example - while cupcakes equal to 12| while (cupcakes == 12)\n  contain|.indexOf(\"text\")>-1\n  not contain|.indexOf(\"text\")\\<0\n  equal to|==\n  not equal to|!=\n  more than / greater than / higher than|>\n  more than or equal to / greater than or equal to / higher than or equal to|>=\n  less than / lesser than / lower than|<\n  less than or equal to / lesser than or equal to / lower than or equal to|<=\n  and|&&\n  or|&#124;&#124;\n\n  Tip - use { and } step to define step/code blocks for powerful repetitive automation with for loop. When using contain / equal, you can write with or without s behind. You can use if present('element') to check if the element exists, before doing the step on next line. Other useful functions include visible('element'), count('element'), url(), title(), text(), timer(), which can be used in conditions and steps such as check or echo.\n\n<\/details>\n\n### MODULES\n<details>\n  <summary>\n    Click to show how you can call other TagUI automation flows within an automation flow file\n  <\/summary>\n\n  - This lets you reuse and compound automation scripts to build complex flows\n  - Sub-scripts can be multiple levels deep and be of any filename or extension\n  - To call sub-scripts, use tagui step followed by absolute or relative filename\n  - For example, tagui login_crm or tagui crm.login or tagui outlook.sendmail\n\n  Tip - tagui step works by expanding content of a sub-script into the flow, at the line where tagui step is used to call the sub-script. Thus variables that are accessible from the parent flow file will also be accessible from the sub-script. A .raw file will be created to store expanded contents of the automation flow (useful for checking error messages). Alternatively, try using run step to run tagui on a flow file, so that it is run as a separate child process.\n\n<\/details>\n\n### REPOSITORIES\n<details>\n  <summary>\n    Click to show how you can use repositories to make objects or steps reusable and improve readability\n  <\/summary>\n\n  - Save repository file with same name as your flow filename and with .csv behind\n  - Repository must have 2 columns, for example below (headers up to you to name)\n  - Using \\`object\\` in your flow replaces it with its definition (which can contain objects)\n  - For example, \\`type email\\` becomes type user-email-textbox as user@gmail.com\n\n  OBJECT|DEFINITION\n  :-----|:---------\n  email|user-email-textbox\n  create account|btn btn--green btn-xl signup-btn\n  type email|type \\`email\\` as user@gmail.com\n\n  Tip - be sure to include the header row, because the first row will be assumed as header and ignored. If your flow file ends with an extension (.txt or .js or .tagui), the repository file extension will be .txt.csv or .js.csv or .tagui.csv respectively.\n\n<\/details>\n\n### DATATABLES\n<details>\n  <summary>\n    Click to show how datatables extend the power of repositories files to manage batch automation\n  <\/summary>\n\n  - TagUI loops through each column to automate using values from different datasets\n  - Eg, echo \"TESTCASE - \\`testname\\`\" in your flow shows TESTCASE - Trade USDSGD\n  - Data-centric approach with rows representing data fields (usually row = test case)\n  - To auto-transpose a conventional datatable, save csv as flow\\_filename\\_transpose.csv\n\n  TEST TRADES|TEST #1|TEST #2|TEST #3\n  :----------|:------|:------|:------\n  testname|Trade USDSGD|Trade USDJPY|Trade EURUSD\n  username|test_account|test_account|test_account\n  password|12345678|12345678|12345678\n  currency-pair|USDSGD|USDJPY|EURUSD\n  size|10000|1000|100000\n  direction|BUY|SELL|BUY\n\n  Tip - be sure to include the header row, because the first row will be assumed as header and ignored. If your flow file ends with an extension (.txt or .js or .tagui), the datatable file extension will be .txt.csv or .js.csv or .tagui.csv respectively.\n\n<\/details>\n\n# Developers Reference\nTagUI is a young tool and it tries to do the task of automating UI interactions very well. It's designed to make prototyping, deployment and maintenance of UI automation easier by minimizing iteration time for each phase. Originally developed by a test automation engineer to avoid writing chunks of code when automating web interactions.\n\n### API\n\n<details>\n  <summary>\n    Click to show how to use the API webservice that comes with TagUI and how to make complex outgoing API calls\n  <\/summary>\n  \n  Automation flows can also be triggered via API URL. TagUI has an API service and runner for managing a queue of incoming requests via API. To set up, add a crontab entry on your server with the desired frequency to check and process incoming service requests. Below will check every 15 minutes and run pending flows in the queue. If there's an automation in progress, TagUI will wait for the next check instead of concurrently starting a new run.\n  ```\n  0,15,30,45 * * * * /full_path_on_your_server/tagui_crontab\n  ```\n\n  To call an automation flow from your application or web browser, use below API syntax. Custom input(s) supported. The default folder to look for flow_filename would be in tagui/src folder. Automation flows can also be triggered from emails using the API. For email integration, [check out Tmail](https://github.com/tebelorg/Tmail). It's an open-source mailbot to act on incoming emails or perform mass emailing; it also delivers emails by API. Emails with run-time variables can be sent directly from your flow with a single line (see flow sample 6C_datatables). If you have data transformation in your process pipeline [check out TLE](https://github.com/tebelorg/TLE), which can help with converting data.\n  ```\n  your_website_url/tagui_service.php?SETTINGS=\"flow_filename option(s)\"\n  ```\n\n  Besides integrating with web applications, TagUI can be extended to integrate with hardware (eg Arduino or Raspberry Pi) for physical world interactions or machine learning service providers for AI decision-making ability. Input parameters can be sent to an automation flow to be used as variables p1 to p9. Output parameters from an automation flow can be sent to your Arduino or application API URL (see samples 3_github and 6C_datatables).\n\n  For making outgoing API calls in your automation flow, to feed data somewhere or send emails etc, use the api step followed by full URL (including parameters) of the API call. Raw response from API will be saved in `api_result` variable. If the API response is JSON data, the variable `api_json` will be created for easy access to JSON data elements. If not, `api_json` will be null. For example, `api_json.parent_element.child_element` retrieves value of child_element.\n\n  ```js\n  api_config = {method:'PUT', header:['Header1: value1','Header2: value2'], body:{'id':123,'pwd':'abc'}};\n  ```\n  For advanced API calls, you can set above api_config variable which defaults as `{method:'GET', header:[], body:{}}`. Besides GET, you can use other methods such as POST, PUT, DELETE etc. You can define multiple headers in the format `'Header_name: header_value'` and provide a payload body for PUT requests for example. You can set it as above before using the api step, or set using `api_config.method = 'PUT';` and `api_config.header[0] = 'Header1: value1';` etc. `api_config.body` will be automatically converted to JSON format for sending to API endpoint.\n\n  In addition, macOS/Linux/Windows CLI commands can be executed using run step. This can be used to call other apps or services hosted locally on the OS, instead of being hosted through webservices. To use run step, specify the full command including parameters. Execution result will be stored in `run_result`, which can be used in your automation flow.\n\n<\/details>\n\n### CHROME\n\n<details>\n  <summary>\n    Click to show how TagUI has native integraton with visible and headless Chrome using DevTools Protocol\n  <\/summary>\n  \n  TagUI has built-in integration with Chrome web browser to run web automation in visible or headless mode. It uses a websocket connection to directly communicate automation JavaScript code and information to Chrome.\n\n  To develop new custom methods for Chrome integration, see this [TagUI issue](https://github.com/kelaberetiv/TagUI/issues/24#issuecomment-312361674) and [tagui_header.js](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui_header.js) for examples of websocket calls from TagUI to Chrome (via Chrome DevTools Protocol). The function `chrome_step(method, params)` sends message to Chrome and returns the response. You will see examples from simple websocket calls such as getting webpage title to stacked ones such as handling of frame or popup window. To tweak how TagUI launches / kills Chrome and the integration PHP process, see TagUI runner script for [macOS/Linux](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui) or [Windows](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui.cmd). \n\n  Probably the best way to see the websocket communication in action is to enter TagUI live mode (add live step in your automation flow), then `tail -f tagui_chrome.log` in another terminal to see the Chrome DevTools Protocol messages going to and fro as you enter TagUI steps or JavaScript code. If you are running on Windows, you can click on the PHP process window directly to see the messages.\n\n  At run-time TagUI will start a PHP thread in the background to manage the integration with Chrome for concurrent communication. The [Textalk PHP websocket](https://github.com/Textalk/websocket-php) is used as it is super-light and most importantly, it works even without any update for 2 years. The normal approach to integrate with Chrome is through [chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface) project or tools such as [Puppeteer](https://github.com/GoogleChrome/puppeteer) and [friends](https://medium.com/@kensoh/chromeless-chrominator-chromy-navalia-lambdium-ghostjs-autogcd-ef34bcd26907). However, that approach introduces Node.js dependency which means users without a Node.js development environment cannot run TagUI with Chrome. Outside of JavaScript ecosystem, there are also tools like [chromedp in Go language](https://github.com/knq/chromedp) to integrate with Chrome.\n\n  In order to retain TagUI unzip and run functionality, the approach of launching a [separate PHP thread](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui_chrome.php) is chosen. Since the TagUI [natural language interpreter](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui_parse.php) is already written in PHP, there is no new dependency. Also, doing websocket communication within the single-threaded JavaScript environment used by CasperJS is not possible as it involves a redesign of fundamental CasperJS methods such as casper.exists to support async/await or use JavaScript promises which are not yet supported by CasperJS (for compatibility with [latest PhantomJS](https://github.com/casperjs/casperjs/issues/1663#issuecomment-285952446)).\n\n  Like chrome-remote-interface, TagUI communicates with Chrome through [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). The protocol is primarily designed for debugging the web browser instead of web automation, so many methods are still in experimental status. However, the API is stable enough for TagUI steps to work with Chrome. When chrome or headless option is used, TagUI replaces CasperJS methods it uses with custom methods to talk to Chrome instead of PhantomJS. When firefox option is used or by default, TagUI doesn't invoke custom methods and PHP process.\n  \n<\/details>\n\n### TESTING\n<details>\n  <summary>\n    Click to show details of how TagUI can be used for test automation with integration to CI tools\n  <\/summary>\n  \n  The check step allows easy testing of conditions. When the test option is used, test assertions are automatically performed for check steps. This lets CasperJS framework output a XUnit XML file, which can be used for CI/CD integration with tools such as Jenkins. Below are examples of check steps, more examples in [sample flow 7_testing](https://github.com/kelaberetiv/TagUI/blob/master/src/samples/7_testing).\n\n  ```\n  // check whether the element search-buttons exists\n  check present('search-buttons') | 'search button exists' | 'search button does not exist'\n\n  // check whether the search button text is correct\n  read search-buttons to button\n  check button equals to 'Search' | 'search button text is correct - ' button | 'search button text is wrong - ' button\n\n  // check that the page has the text My Portfolio\n  check text() contains 'My Portfolio' | 'page text contains My Portfolio' | 'page text does not contain My Portfolio'\n\n  // check that number of header menu items are more than or equals to 6\n  check count('uh-tb-') more than or equals to 6 | 'header menu items >= 6' | 'header menu items < 6'\n  ```\n\n  CasperJS test scripts are inherently different in structure and syntax from its usual automation scripts. With the test option, TagUI automatically sets up your automation flow to work as a test script. TagUI allows you to reuse the same flow for testing or automation by running it with or without the test option. [More info](http://docs.casperjs.org/en/latest/testing.html) about CasperJS testing framework.\n\n  Note that CasperJS is not yet [supporting Chrome](https://github.com/casperjs/casperjs/issues/1825), below additional examples using CasperJS [built-in test assertions](http://docs.casperjs.org/en/latest/modules/tester.html) won't work when chrome or headless option is used. TagUI smart selector can still be accessed using tx('selector'). As TagUI allows you to write JavaScript / CasperJS code directly within the automation flow, advanced testing or coding techniques that can be implemented in CasperJS should work directly within your flow.\n  ```js\n  test.assertTextExists('ABOUT','Check for ABOUT text');\n  test.assertSelectorHasText(tx('header'), 'Interface automation','Check for phrase in header element');\n  ```\n\n  In the event you get an error saying that it cannot understand the step for your JavaScript line, raise an issue or modify the source code ([tagui_parse.php](https://github.com/kelaberetiv/TagUI/blob/master/src/tagui_parse.php) is where interpretation of natural language to CasperJS JavaScript code takes place). Alternatively, use step js to explicitly declare that whatever follows on that line is JavaScript code and ensure that the line is not treated as a TagUI step.\n\n<\/details>\n\n### FILES\n<details>\n  <summary>\n    Click to show details of the different files used by TagUI and their purposes\n  <\/summary>\n  \n  Core Files|Purpose\n  :---------|:------\n  tagui|main runner for TagUI automation\n  tagui.cmd|main runner for Windows platform\n  tagui_config.txt|web browser settings used for automation\n  tagui_parse.php|to interpret natural language into code\n  tagui_header.js|template for CasperJS / integrations code\n  tagui_footer.js|template for CasperJS / integrations code\n\n  Multi-Language |Purpose\n  :--------------|:------\n  translate.php|translation engine for native languages\n  translate.log|translation in English reference language\n\n  Chrome Integration |Purpose\n  :------------------|:------\n  tagui_chrome.php|PHP thread for Chrome integration\n  tagui_chrome.log|log for Chrome websocket transactions\n  tagui_chrome.in|interface in-file for Chrome integration\n  tagui_chrome.out|interface out-file for Chrome integration\n\n  Sikuli Integration |Purpose\n  :------------------|:------\n  tagui.py|interface for Sikuli visual automation\n  tagui.log|log for Sikuli Python transactions\n  tagui_windows.log|same as above but for Windows\n  tagui_sikuli.in|interface in-file for Sikuli integration\n  tagui_sikuli.out|interface out-file for Sikuli integration\n  tagui_sikuli.txt|Tesseract OCR integration interface file\n\n  R Integration |Purpose\n  :-------------|:------\n  tagui_r.R|interface for R integration\n  tagui_r.log|log for R platform transactions\n  tagui_r_windows.log|same as above but for Windows\n  tagui_r.in|interface in-file for R integration\n  tagui_r.out|interface out-file for R integration\n  tagui_r.txt|integration file for storing output\n\n  Python Integration |Purpose\n  :------------------|:------\n  tagui_py.py|interface for Python integration\n  tagui_py.log|log for Python platform transactions\n  tagui_py_windows.log|same as above but for Windows\n  tagui_py.in|interface in-file for Python integration\n  tagui_py.out|interface out-file for Python integration\n  tagui_py.txt|integration file for storing output\n\n  API Service |Purpose\n  :-----------|:------\n  tagui_crontab|to run service request batch from crontab\n  tagui_runner.php|retrieving service requests from queue\n  tagui_service.php|receiving service requests into queue\n  tagui_service.log|log to track service requests history\n  tagui_service.in|log to track incoming service requests\n  tagui_service.out|log to track processed service requests\n  tagui_service.act|service request batch ready to execute\n  tagui_service.run|service request batch currently running\n  tagui_service.done|service request batch finished running\n\n  CLI Assistant |Purpose\n  :-------------|:------\n  erina|natural language command line helper\n  erina.cmd|same as above but for Windows platform\n  tagui_helper.php|command line natural language parser\n  tagui_helper|generated normal TagUI command to run\n  tagui_helper.cmd|same as above but for Windows platform\n\n  Misc Files |Purpose\n  :----------|:------\n  tagui_report.php|to generate html report from text log\n  transpose.php|transpose conventional datatable csv\n  sleep.php|allow adding execution pause on Windows\n\n<\/details>\n\n### SECURITY\n<details>\n  <summary>\n    Click to show details of security concerns and features of TagUI\n  <\/summary>\n\n  Below architecture diagram for TagUI will be used to elaborate on this topic of security.\n\n  ![TagUI Flowchart](https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/media/flowchart.png)\n\n  As TagUI and the foundation it is built on is open-source software, it means users can read the source code of TagUI and all its dependencies to check if there is a security flaw or malicious code. This is an advantage compared to using commercial software that is closed-source, as users cannot see what is the code behind the software due to lack of visibility.\n\n  For open-source software, users and developers who spot security issues will raise issues to the maintainers and work towards a fix. For commercial software, other ways such as tracking the web traffic or file system activities have to be deployed to infer on what the software is doing.\n\n  Following are links to the source code for TagUI and its open-source dependencies. You can dig through the source code for the other open-source dependencies below, or assume that security issues would have been spotted by users and fixed, as these projects are mature and have large user bases.\n\n  - TagUI - https://github.com/kelaberetiv/TagUI\n  - Sikuli - https://github.com/RaiMan/SikuliX-2014\n  - CasperJS - https://github.com/casperjs/casperjs\n  - PhantomJS - https://github.com/ariya/phantomjs\n  - SlimerJS - https://github.com/laurentj/slimerjs\n  - Python - https://github.com/python/cpython\n  - R - https://github.com/wch/r-source\n  - PHP - https://github.com/php/php-src\n\n  Following are more comments specific to TagUI for the topic of security.\n\n  - By design, TagUI does not send outgoing web traffic or send outgoing data, other than what the user is automating on, for example visiting a website. However, there is an upload option, when used, TagUI will go to an [open-source service Hastebin](https://hastebin.com/about.md) that allows uploading of information to share via URL. This sends outgoing data of the automation execution log to that website and returns an URL to user so that user can share the output of the automation with colleagues or friends.\n\n  - TagUI allows running of automation files whether they are stored locally as a file on your laptop or computer, [or if the file is an online URL](https://github.com/kelaberetiv/TagUI#command-line). This means users should be cautious to run automation from online URLs unless they are sure that the online URL is a safe source and not doing something destructive. This can be checked by accessing the URL using a web-browser to see the automation steps performed in the online automation file.\n\n  - TagUI comes with a web service, that can be used to trigger automation flows if TagUI is installed on a web-server. More details in [Developers Reference section under API](https://github.com/kelaberetiv/TagUI#api). The design minimizes security risk by not forcing users to turn on exec() for their PHP configuration. This means execution of malicious commands cannot be injected through the web-service. Instead, the web-service works by using crontab to periodically check for automation requests. Webservice execution of online flows is now disabled by default so that malicious users cannot trigger execution of a malicious flow hosted online.\n\n  - TagUI has [very powerful features](https://github.com/kelaberetiv/TagUI#steps-description), including the ability to run command line programs, Python code, R code, API calls, and ability to make changes to the local file systems. These features can become security risks if a malicious automation flow file is executed. Imagine TagUI as a tool, such as fire. In evil hands it can be used to do evil things at scale. In good hands, it can be used to solve pain points related to digital processes that are repetitive and huge in volume.\n\n  - As TagUI can replicate what a normal human user can do on the computer, TagUI is restricted and compliant to the same security policies as the normal human user would be subjected to. For example, having to use a hardware token in order to access the laptop, or user password in order to login to the computer. Or having a 2FA hardware token in order to access confidential information from a web or enterprise application.\n\n<\/details>\n\n# License\nTagUI is open-source software released under Apache 2.0 license\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1ADA:2B291E:185E0B:5F02A5:6AB92E92"},"text_sha256":"925326d742fee63cf5e3c65a24fb1a77c9700cf694704141c6ec99fe4753d90f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1430","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D4:14A1F2:183542C:1C6010B:6AB92E95"},"commit":{"sha":"91aeb07f8e75ff400cc1444b7e485dd800d6c3f3","url":"https://github.com/aisingapore/TagUI/commit/91aeb07f8e75ff400cc1444b7e485dd800d6c3f3","date":"2025-03-02T14:58:11Z","author_date":"2025-03-02T14:58:11Z","committer_date":"2025-03-02T14:58:11Z","tree_sha":"13916dea36b4168a482f432a28637f293bb60fd6","message_first_line":"reference.rst - correct typo"},"tree_request_status":200,"tree_rate":{"github_remaining":"1429","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:181CE24:1C471C8:6AB92E95"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10529,"blob_sha":"a488a7c71af5c903de895dad82482ff676ff4b41","priority":0}],"documents":[{"path":"README.md","size":10529,"blob_sha":"a488a7c71af5c903de895dad82482ff676ff4b41","priority":0,"status":200,"text":"<img src=\"https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/media/tagui_logo.png\" height=\"111\" align=\"right\">\n\n# TagUI\n>**NOTICE: AI Singapore has discontinued maintenance and support of TagUI, but the project continues to be supported by open-source contributors and the community.**\n\n**Check out this [YouTube learning series](https://www.youtube.com/playlist?list=PL2gs9_mNDDvZSCPsJu4APZR6AaDzUY7R6). Take the [free course](https://learn.aisingapore.org/courses/learn-rpa-with-tagui-beginners-course/). Ask any questions at [our Telegram](https://t.me/rpa_chat).**\n\n**[Download v6.114](https://tagui.readthedocs.io/en/latest/setup.html)&ensp;|&ensp;[Usage Guide](https://tagui.readthedocs.io/en/latest/index.html)&ensp;|&ensp;[Demos](https://github.com/aimakerspace/TagUI-Bricks)&ensp;|&ensp;[Samples](https://github.com/kelaberetiv/TagUI/tree/master/flows/samples)&ensp;|&ensp;[Slides](https://docs.google.com/presentation/d/1pltAMzr0MZsttgg1w2ORH3ontR6Q51W9/edit?usp=sharing&ouid=115132044557947023533&rtpof=true&sd=true)&ensp;|&ensp;[Podcast](https://botnirvana.org/podcast/tagui/)&ensp;|&ensp;[Video](https://www.youtube.com/watch?v=C5itbB3sCq0)&ensp;|&ensp;[中文](http://www.tagui.com.cn)**\n\n---\n\nWrite flows in simple TagUI language and automate away repetitive time-consuming tasks on your computer. Tasks include those on websites (native support for Chrome and Edge), desktop apps, or the command line. The TagUI project is open-source and free forever. It's easy to setup and use, and works on Windows, macOS and Linux.\n\nBesides English, flows can be written in [22 other languages](https://github.com/kelaberetiv/TagUI/tree/master/src/languages), so you can do RPA using your [native language](https://github.com/kelaberetiv/TagUI/blob/master/flows/samples/8_chineseflow.tag). Check out this [demo video automating data collection](https://www.youtube.com/watch?v=o2WMUt0298U) in 4 different languages. With the new TagUI turbo mode, you can even run your automation 10X faster than normal human speed!\n\n# Language designed for RPA\n\nIn TagUI language, you use steps like `click` and `type` to interact with identifiers, which include web identifiers, image snapshots, screen coordinates, or [even text using OCR](https://tagui.readthedocs.io/en/latest/advanced.html#visual-automation-tricks). Below is an example to login to Xero accounting:\n\n```\nhttps://login.xero.com/identity/user/login\ntype email as user@gmail.com\ntype password as 12345678\nclick Log in\n```\n```\n// besides web identifiers, images of UI elements can be used\ntype email_box.png as user@gmail.com\ntype password_box.png as 12345678\nclick login_button.png\n```\n\nGrabbing data from a table on a website can be [as easy as below](https://tagui.readthedocs.io/en/latest/reference.html#table) (where n is the nth table on the webpage)\n\n```\ntable n to forex_rates.csv\n```\n\nMoving data between TagUI and Excel is as easy as using [standard Excel formula](https://tagui.readthedocs.io/en/latest/reference.html#excel) that you are familiar with\n```\ntop_salesman = [Monthly Report.xlsx]August!E11\n```\n\n# Do RPA Any Way You Want\n\nYou can use TagUI [MS Office Plug-ins](https://github.com/kelaberetiv/TagUI/blob/master/src/office/README.md) ([sample doc](https://github.com/kelaberetiv/TagUI/files/7031942/Week.3.docx)) to easily create and deploy Word doc as RPA robots, and set up RPA data parameters using Excel. Enjoy a full-featured RPA IDE with toolbar of TagUI steps and tooltips, snapshot tool to automate using computer vision, task pane for settings and run output. \n\nYou can also create and edit your RPA robots using commonly used text editors like Notepad, Notepad++, VS Code, Sublime, TextEdit, Vim, etc. For VS Code users, you can install [TagUI language extension](https://marketplace.visualstudio.com/items?itemName=TagUisupport.tagui-support). For Notepad++ users, you can download [TagUI plug-ins here](https://github.com/tilyanPristka/TagUI-Snippets-for-NotepadPP) for syntax highlighting, shortcuts and snippets.\n\nSome users might find it interesting or useful to use AI and machine learning (in particular LLM large language models), to help generate a template script, then they make the fine-tuning accordingly. [See this issue](https://github.com/aisingapore/TagUI/issues/1388) on some questions that I asked Anthropic's Claude 3.5 Sonnet and its responses.\n\n![Word Plug-in v3](https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/office/word/word_addin_v3.png)\n\n# Ecosystem and Communities\n\nTagUI has a bustling user community, and extended community champions create new RPA tools for their own communities, based on TagUI. Python users can [pip install rpa](https://github.com/tebelorg/RPA-Python) to use the #1 Python RPA package. There is also [TagUI for C# .NET](https://www.nuget.org/packages/tagui). For event-driven RPA with thousands of connectors, do check out [TagUI module for Node-RED](https://flows.nodered.org/node/node-red-contrib-tagui), a popular free and open-source workflow automation tool.\n\nFor Microsoft [Power Automate Desktop](https://flow.microsoft.com/en-us/desktop/) users, you'll be happy to know that there's 2-way integration with TagUI out of the box (for business continuity if you switch between the 2 apps). Also, do check out other leading open-source RPA tools, to see if they meet your needs better - [OpenRPA](https://github.com/open-rpa/openrpa) & [OpenFlow](https://github.com/open-rpa/openflow), [Robocorp](https://youtu.be/HAfQpNZVbKI). All of them support enterprise-grade orchestrating and running TagUI robots from their orchestrator.\n\n# Enterprise Security by design\n\nSecurity Considerations\n- TagUI default implementation is an on-user-computer on-prem RPA tool that does not exist on any cloud\n- TagUI is not a SaaS or software on the cloud running on vendor's cloud, it runs on actual users' computers\n- Industry-specific certifications like PCI-DSS, HIPAA, SOX aren't applicable because TagUI doesn't store data\n- In decentralised bottom-up RPA, not advisable and no need for bot credentials as users are held accountable\n\nData Considerations\n- For data at rest, storage encryption would be on user's computer's OS-level as it is run on user's computer\n- For data in use, recommend user to manually enter sensitive info like password before letting robot take over\n- For data in motion, users' enterprise app websites are now https by default for secure data entry and retrieval\n\nMore Information\n- [See this guide](https://github.com/kelaberetiv/TagUI/raw/master/src/media/TagUI%20Enterprise%20Setup%20v1.7.docx) on enterprise installation, including whitelisting details, TagUI architecture and dependencies\n- With -report option, there is a summary and detailed logs of robots, with support for centralised reporting\n\n# How to get started\n\nJoin the community and ask any questions at our [Telegram chat group](https://t.me/rpa_chat). Watch this [YouTube learning series](https://www.youtube.com/playlist?list=PL2gs9_mNDDvZSCPsJu4APZR6AaDzUY7R6). Take [TagUI free course](https://learn.aisingapore.org/courses/learn-rpa-with-tagui-beginners-course/) over one morning or afternoon, and start using the most popular open-source RPA software. Share this [TagUI slide deck](https://docs.google.com/presentation/d/1pltAMzr0MZsttgg1w2ORH3ontR6Q51W9/edit?usp=sharing&ouid=115132044557947023533&rtpof=true&sd=true) with your team or customers to win their buy-in to use TagUI.\n\nIf you are maintaining your own fork of TagUI (for eg tech leads, RPA consultants, individual developers), see this [maintainer training video series](https://www.youtube.com/watch?v=oq8HlJujraE) to understand how TagUI works behind the scenes, and for you to modify all aspects of TagUI and extend the software to your customers' exact needs, made-to-measure.\n\n# TagUI v5.11\nFor technical details of TagUI, such as architecture diagram and codebase structure, [see the old homepage](https://github.com/kelaberetiv/TagUI/tree/pre_v6) \n\n# Credits\n\nOpen-source project|Maintainer|From|How does this contribute to TagUI project\n:------------------|:---------|:---|:----------------------------------------\n[TagUI for China](http://www.tagui.com.cn)|[报表哥](https://www.zhihu.com/people/baobiaoge)|China|usage guide and repository in Chinese\n[TagUI for Notepad++](https://github.com/tilyanPristka/TagUI-Snippets-for-NotepadPP)|[Md Ardyansyah](https://www.linkedin.com/in/muhammad-ardyansyah/)|Indonesia|various TagUI plug-ins for Notepad++\n[TagUI for VS Code](https://marketplace.visualstudio.com/items?itemName=TagUisupport.tagui-support)|[Subhas Malik](https://www.linkedin.com/in/subhasmalik/)|India|language extension for Visual Studio Code\n[TagUI for Robocorp](https://youtu.be/HAfQpNZVbKI)|[Nived N](https://www.linkedin.com/in/nived-n-776470139/)|India|run TagUI in Robocorp or Robot Framework\n[TagUI for Node-RED](https://flows.nodered.org/node/node-red-contrib-tagui)|[Allan Zimmermann](https://www.linkedin.com/in/skadefro/)|Denmark|low-code event-driven workflow automation\n[TagUI for C# .NET](https://www.nuget.org/packages/tagui)|[Allan Zimmermann](https://www.linkedin.com/in/skadefro/)|Denmark|C# version of TagUI (Install-Package tagui)\n[TagUI for Docker](https://hub.docker.com/r/openiap/nodered-tagui)|[Allan Zimmermann](https://www.linkedin.com/in/skadefro/)|Denmark|replicable RPA environment for everyone\n[RPA for Python](https://github.com/tebelorg/RPA-Python)|[Ken Soh](https://github.com/kensoh)|Singapore|Python version of TagUI (pip install rpa)\n[TagUI v3.0](https://github.com/kensoh/TagUI/tree/before_aisg)|[Ken Soh](https://github.com/kensoh)|Singapore|personal project before AI Singapore\n[SikuliX](http://sikulix.com)|[Raimund Hocke](https://github.com/RaiMan/)|Germany|computer vision, OCR, input hardware\n[CasperJS](http://casperjs.org)|[Nicolas Perriault](https://github.com/n1k0)|France|high-level JavaScript execution engine\n[PhantomJS](https://github.com/ariya/phantomjs)|[Ariya Hidayat](https://github.com/ariya)|Indonesia|foundation JavaScript execution engine\n[SlimerJS](https://slimerjs.org)|[Laurent Jouanneau](https://github.com/laurentj)|France|browser automation for FireFox <= v59\n\n# Sponsor\nThis project was previously supported by the [National Research Foundation](https://www.nrf.gov.sg), Singapore under its AI Singapore Programme (AISG-RP-2019-050). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6394:35EBC:17ABD3:5E4FFC:6AB92E95"},"text_sha256":"e67bd6604f2b7c7aea5475fcd03b168b4309c2bb131399e6a2f2374de1799faa"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"vi3k6i5/flashtext","input_row":{"repository":"vi3k6i5/flashtext","url":"https://github.com/vi3k6i5/flashtext","name":"flashtext","owner":"vi3k6i5","description":"Extract Keywords from sentence or Replace keywords in sentences.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":5706,"issues":114,"created_at":"2017-08-15T18:03:01Z","updated_at":"2026-09-21T03:56:52Z","first_commit_at":"2017-08-15T18:00:27Z","last_commit_at":"2022-05-03T07:13:22Z","activity_months":56.560000000000002,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:22.587Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"vi3k6i5/flashtext","visibility":"public","created_at":"2017-08-15T18:03:01Z","updated_at":"2026-09-21T03:56:52Z","private":false,"fork":false,"archived":false,"stargazers_count":5706,"open_issues_count":70,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1428","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089C:A9DC0:17E411D:1C0EA0F:6AB92E96"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1427","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AF:A9DC0:17E414C:1C0EA60:6AB92E96"},"commit":{"sha":"b9e7e154851557e42900bd65f61c69e2f7769970","url":"https://github.com/vi3k6i5/flashtext/commit/b9e7e154851557e42900bd65f61c69e2f7769970","date":"2017-11-19T17:30:13Z","author_date":"2017-11-19T17:30:13Z","committer_date":"2017-11-19T17:30:13Z","tree_sha":"d00cd68844a43f7f109ada2f84d0e4f253ee957b","message_first_line":"added readme for get_all_keywords"},"tree_request_status":200,"tree_rate":{"github_remaining":"1426","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A0:3BE445:17B833C:1BE19F7:6AB92E97"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":7826,"blob_sha":"e6a913dabf2581f4350542f046bb8ec1f7a68a85","priority":0}],"documents":[{"path":"README.rst","size":7826,"blob_sha":"e6a913dabf2581f4350542f046bb8ec1f7a68a85","priority":0,"status":200,"text":"=========\nFlashText\n=========\n\n.. image:: https://api.travis-ci.org/vi3k6i5/flashtext.svg?branch=master\n   :target: https://travis-ci.org/vi3k6i5/flashtext\n   :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/flashtext/badge/?version=latest\n   :target: http://flashtext.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n.. image:: https://badge.fury.io/py/flashtext.svg\n   :target: https://badge.fury.io/py/flashtext\n   :alt: Version\n\n.. image:: https://coveralls.io/repos/github/vi3k6i5/flashtext/badge.svg?branch=master\n   :target: https://coveralls.io/github/vi3k6i5/flashtext?branch=master\n   :alt: Test coverage\n\n.. image:: https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000\n   :target: https://github.com/vi3k6i5/flashtext/blob/master/LICENSE\n   :alt: license\n\n\nThis module can be used to replace keywords in sentences or extract keywords from sentences. It is based on the `FlashText algorithm <https://arxiv.org/abs/1711.00046>`_.\n\n\nInstallation\n------------\n::\n\n    $ pip install flashtext\n\n\nAPI doc\n-------\n\nDocumentation can be found at `FlashText Read the Docs\n<http://flashtext.readthedocs.io/>`_.\n\n\nUsage\n-----\nExtract keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> # keyword_processor.add_keyword(<unclean name>, <standardised name>)\n    >>> keyword_processor.add_keyword('Big Apple', 'New York')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love Big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['New York', 'Bay Area']\n\nReplace keywords\n    >>> keyword_processor.add_keyword('New Delhi', 'NCR region')\n    >>> new_sentence = keyword_processor.replace_keywords('I love Big Apple and new delhi.')\n    >>> new_sentence\n    >>> # 'I love New York and NCR region.'\n\nCase Sensitive example\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor(case_sensitive=True)\n    >>> keyword_processor.add_keyword('Big Apple', 'New York')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['Bay Area']\n\nNo clean name for Keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('Big Apple')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['Big Apple', 'Bay Area']\n\nAdd Multiple Keywords simultaneously\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> # {'clean_name': ['list of unclean names']}\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> # Or add keywords from a list:\n    >>> keyword_processor.add_keywords_from_list([\"java\", \"python\"])\n    >>> keyword_processor.extract_keywords('I am a product manager for a java_2e platform')\n    >>> # output ['product management', 'java']\n\nTo Remove keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> print(keyword_processor.extract_keywords('I am a product manager for a java_2e platform'))\n    >>> # output ['product management', 'java']\n    >>> keyword_processor.remove_keyword('java_2e')\n    >>> # you can also remove keywords from a list/ dictionary\n    >>> keyword_processor.remove_keywords_from_dict({\"product management\": [\"PM\"]})\n    >>> keyword_processor.remove_keywords_from_list([\"java programing\"])\n    >>> keyword_processor.extract_keywords('I am a product manager for a java_2e platform')\n    >>> # output ['product management']\n\nTo check Number of terms in KeywordProcessor\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> print(len(keyword_processor))\n    >>> # output 4\n\nTo check if term is present in KeywordProcessor\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('j2ee', 'Java')\n    >>> 'j2ee' in keyword_processor\n    >>> # output: True\n    >>> keyword_processor.get_keyword('j2ee')\n    >>> # output: Java\n    >>> keyword_processor['colour'] = 'color'\n    >>> keyword_processor['colour']\n    >>> # output: color\n\nGet all keywords in dictionary\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('j2ee', 'Java')\n    >>> keyword_processor.add_keyword('onGoing', 'rendom')\n    >>> keyword_processor.get_all_keywords()\n    >>> # output: {'j2ee': 'Java', 'ongoing': 'rendom'}\n\nFor detecting Word Boundary currently any character other than this `\\\\w` `[A-Za-z0-9_]` is considered a word boundary.\n\nTo set or add characters as part of word characters\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('Big Apple')\n    >>> print(keyword_processor.extract_keywords('I love Big Apple/Bay Area.'))\n    >>> # ['Big Apple']\n    >>> keyword_processor.add_non_word_boundary('/')\n    >>> print(keyword_processor.extract_keywords('I love Big Apple/Bay Area.'))\n    >>> # []\n\n\nTest\n----\n::\n\n    $ git clone https://github.com/vi3k6i5/flashtext\n    $ cd flashtext\n    $ pip install pytest\n    $ python setup.py test\n\n\nBuild Docs\n----------\n::\n\n    $ git clone https://github.com/vi3k6i5/flashtext\n    $ cd flashtext/docs\n    $ pip install sphinx\n    $ make html\n    $ # open _build/html/index.html in browser to view it locally\n\n\nWhy not Regex?\n--------------\n\nIt's a custom algorithm based on `Aho-Corasick algorithm\n<https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm>`_ and `Trie Dictionary\n<https://en.wikipedia.org/wiki/Trie Dictionary>`_.\n\n.. image:: https://github.com/vi3k6i5/flashtext/raw/master/benchmark.png\n   :target: https://twitter.com/RadimRehurek/status/904989624589803520\n   :alt: Benchmark\n\n\nTime taken by FlashText to find terms in comparison to Regex.\n\n.. image:: https://thepracticaldev.s3.amazonaws.com/i/xruf50n6z1r37ti8rd89.png\n\n\nTime taken by FlashText to replace terms in comparison to Regex.\n\n.. image:: https://thepracticaldev.s3.amazonaws.com/i/k44ghwp8o712dm58debj.png\n\nLink to code for benchmarking the `Find Feature <https://gist.github.com/vi3k6i5/604eefd92866d081cfa19f862224e4a0>`_ and `Replace Feature <https://gist.github.com/vi3k6i5/dc3335ee46ab9f650b19885e8ade6c7a>`_.\n\nThe idea for this library came from the following `StackOverflow question\n<https://stackoverflow.com/questions/44178449/regex-replace-is-taking-time-for-millions-of-documents-how-to-make-it-faster>`_.\n\n\nReferences\n----------\n\nThe original paper published on `FlashText algorithm <https://arxiv.org/abs/1711.00046>`_.\n\nThe article published on `Medium freeCodeCamp <https://medium.freecodecamp.org/regex-was-taking-5-days-flashtext-does-it-in-15-minutes-55f04411025f>`_.\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/vi3k6i5/flashtext/issues\n- Source Code: https://github.com/vi3k6i5/flashtext/\n\n\nLicense\n-------\n\nThe project is licensed under the MIT license.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E9C:3BCC6:17F792:5E9BD8:6AB92E95"},"text_sha256":"80d3a589793cd3124b1f839d6d3f71baf749d3c319abb8058525c89e7b655cc8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1425","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089D:52542:17E8BBA:1C13924:6AB92E98"},"commit":{"sha":"f49274459bc9879789c6e6bb64bf05af755de0b3","url":"https://github.com/vi3k6i5/flashtext/commit/f49274459bc9879789c6e6bb64bf05af755de0b3","date":"2022-05-03T07:13:22Z","author_date":"2022-05-03T07:13:22Z","committer_date":"2022-05-03T07:13:22Z","tree_sha":"ee3191d02e71d55216e0fb86a4ec7818c3f90d78","message_first_line":"Merge pull request #84 from Quantmetry/fuzzy_matching"},"tree_request_status":200,"tree_rate":{"github_remaining":"1424","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AA:8656E:17F0B85:1C1B452:6AB92E98"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":9183,"blob_sha":"014d2c7533af976a249d26e428295e1b4554a35f","priority":0}],"documents":[{"path":"README.rst","size":9183,"blob_sha":"014d2c7533af976a249d26e428295e1b4554a35f","priority":0,"status":200,"text":"=========\nFlashText\n=========\n\n.. image:: https://api.travis-ci.org/vi3k6i5/flashtext.svg?branch=master\n   :target: https://travis-ci.org/vi3k6i5/flashtext\n   :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/flashtext/badge/?version=latest\n   :target: http://flashtext.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n.. image:: https://badge.fury.io/py/flashtext.svg\n   :target: https://badge.fury.io/py/flashtext\n   :alt: Version\n\n.. image:: https://coveralls.io/repos/github/vi3k6i5/flashtext/badge.svg?branch=master\n   :target: https://coveralls.io/github/vi3k6i5/flashtext?branch=master\n   :alt: Test coverage\n\n.. image:: https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000\n   :target: https://github.com/vi3k6i5/flashtext/blob/master/LICENSE\n   :alt: license\n\n\nThis module can be used to replace keywords in sentences or extract keywords from sentences. It is based on the `FlashText algorithm <https://arxiv.org/abs/1711.00046>`_.\n\n\nInstallation\n------------\n::\n\n    $ pip install flashtext\n\n\nAPI doc\n-------\n\nDocumentation can be found at `FlashText Read the Docs\n<http://flashtext.readthedocs.io/>`_.\n\n\nUsage\n-----\nExtract keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> # keyword_processor.add_keyword(<unclean name>, <standardised name>)\n    >>> keyword_processor.add_keyword('Big Apple', 'New York')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love Big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['New York', 'Bay Area']\n\nReplace keywords\n    >>> keyword_processor.add_keyword('New Delhi', 'NCR region')\n    >>> new_sentence = keyword_processor.replace_keywords('I love Big Apple and new delhi.')\n    >>> new_sentence\n    >>> # 'I love New York and NCR region.'\n\nCase Sensitive example\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor(case_sensitive=True)\n    >>> keyword_processor.add_keyword('Big Apple', 'New York')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['Bay Area']\n\nSpan of keywords extracted\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('Big Apple', 'New York')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love big Apple and Bay Area.', span_info=True)\n    >>> keywords_found\n    >>> # [('New York', 7, 16), ('Bay Area', 21, 29)]\n\nGet Extra information with keywords extracted\n    >>> from flashtext import KeywordProcessor\n    >>> kp = KeywordProcessor()\n    >>> kp.add_keyword('Taj Mahal', ('Monument', 'Taj Mahal'))\n    >>> kp.add_keyword('Delhi', ('Location', 'Delhi'))\n    >>> kp.extract_keywords('Taj Mahal is in Delhi.')\n    >>> # [('Monument', 'Taj Mahal'), ('Location', 'Delhi')]\n    >>> # NOTE: replace_keywords feature won't work with this.\n\nNo clean name for Keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('Big Apple')\n    >>> keyword_processor.add_keyword('Bay Area')\n    >>> keywords_found = keyword_processor.extract_keywords('I love big Apple and Bay Area.')\n    >>> keywords_found\n    >>> # ['Big Apple', 'Bay Area']\n\nAdd Multiple Keywords simultaneously\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> # {'clean_name': ['list of unclean names']}\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> # Or add keywords from a list:\n    >>> keyword_processor.add_keywords_from_list([\"java\", \"python\"])\n    >>> keyword_processor.extract_keywords('I am a product manager for a java_2e platform')\n    >>> # output ['product management', 'java']\n\nTo Remove keywords\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> print(keyword_processor.extract_keywords('I am a product manager for a java_2e platform'))\n    >>> # output ['product management', 'java']\n    >>> keyword_processor.remove_keyword('java_2e')\n    >>> # you can also remove keywords from a list/ dictionary\n    >>> keyword_processor.remove_keywords_from_dict({\"product management\": [\"PM\"]})\n    >>> keyword_processor.remove_keywords_from_list([\"java programing\"])\n    >>> keyword_processor.extract_keywords('I am a product manager for a java_2e platform')\n    >>> # output ['product management']\n\nTo check Number of terms in KeywordProcessor\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_dict = {\n    >>>     \"java\": [\"java_2e\", \"java programing\"],\n    >>>     \"product management\": [\"PM\", \"product manager\"]\n    >>> }\n    >>> keyword_processor.add_keywords_from_dict(keyword_dict)\n    >>> print(len(keyword_processor))\n    >>> # output 4\n\nTo check if term is present in KeywordProcessor\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('j2ee', 'Java')\n    >>> 'j2ee' in keyword_processor\n    >>> # output: True\n    >>> keyword_processor.get_keyword('j2ee')\n    >>> # output: Java\n    >>> keyword_processor['colour'] = 'color'\n    >>> keyword_processor['colour']\n    >>> # output: color\n\nGet all keywords in dictionary\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('j2ee', 'Java')\n    >>> keyword_processor.add_keyword('colour', 'color')\n    >>> keyword_processor.get_all_keywords()\n    >>> # output: {'colour': 'color', 'j2ee': 'Java'}\n\nFor detecting Word Boundary currently any character other than this `\\\\w` `[A-Za-z0-9_]` is considered a word boundary.\n\nTo set or add characters as part of word characters\n    >>> from flashtext import KeywordProcessor\n    >>> keyword_processor = KeywordProcessor()\n    >>> keyword_processor.add_keyword('Big Apple')\n    >>> print(keyword_processor.extract_keywords('I love Big Apple/Bay Area.'))\n    >>> # ['Big Apple']\n    >>> keyword_processor.add_non_word_boundary('/')\n    >>> print(keyword_processor.extract_keywords('I love Big Apple/Bay Area.'))\n    >>> # []\n\n\nTest\n----\n::\n\n    $ git clone https://github.com/vi3k6i5/flashtext\n    $ cd flashtext\n    $ pip install pytest\n    $ python setup.py test\n\n\nBuild Docs\n----------\n::\n\n    $ git clone https://github.com/vi3k6i5/flashtext\n    $ cd flashtext/docs\n    $ pip install sphinx\n    $ make html\n    $ # open _build/html/index.html in browser to view it locally\n\n\nWhy not Regex?\n--------------\n\nIt's a custom algorithm based on `Aho-Corasick algorithm\n<https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm>`_ and `Trie Dictionary\n<https://en.wikipedia.org/wiki/Trie Dictionary>`_.\n\n.. image:: https://github.com/vi3k6i5/flashtext/raw/master/benchmark.png\n   :target: https://twitter.com/RadimRehurek/status/904989624589803520\n   :alt: Benchmark\n\n\nTime taken by FlashText to find terms in comparison to Regex.\n\n.. image:: https://thepracticaldev.s3.amazonaws.com/i/xruf50n6z1r37ti8rd89.png\n\n\nTime taken by FlashText to replace terms in comparison to Regex.\n\n.. image:: https://thepracticaldev.s3.amazonaws.com/i/k44ghwp8o712dm58debj.png\n\nLink to code for benchmarking the `Find Feature <https://gist.github.com/vi3k6i5/604eefd92866d081cfa19f862224e4a0>`_ and `Replace Feature <https://gist.github.com/vi3k6i5/dc3335ee46ab9f650b19885e8ade6c7a>`_.\n\nThe idea for this library came from the following `StackOverflow question\n<https://stackoverflow.com/questions/44178449/regex-replace-is-taking-time-for-millions-of-documents-how-to-make-it-faster>`_.\n\n\nCitation\n----------\n\nThe original paper published on `FlashText algorithm <https://arxiv.org/abs/1711.00046>`_.\n\n::\n\n    @ARTICLE{2017arXiv171100046S,\n       author = {{Singh}, V.},\n        title = \"{Replace or Retrieve Keywords In Documents at Scale}\",\n      journal = {ArXiv e-prints},\n    archivePrefix = \"arXiv\",\n       eprint = {1711.00046},\n     primaryClass = \"cs.DS\",\n     keywords = {Computer Science - Data Structures and Algorithms},\n         year = 2017,\n        month = oct,\n       adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171100046S},\n      adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n    }\n\nThe article published on `Medium freeCodeCamp <https://medium.freecodecamp.org/regex-was-taking-5-days-flashtext-does-it-in-15-minutes-55f04411025f>`_.\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/vi3k6i5/flashtext/issues\n- Source Code: https://github.com/vi3k6i5/flashtext/\n\n\nLicense\n-------\n\nThe project is licensed under the MIT license.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DE8:29FD16:1865C2:5F0A2F:6AB92E95"},"text_sha256":"f7a4f6cb0df472002523624fe2197be5204757aa7694f0ca7a24cc5890f38ec8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"wooorm/franc","input_row":{"repository":"wooorm/franc","url":"https://github.com/wooorm/franc","name":"franc","owner":"wooorm","description":"Natural language detection","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":4416,"issues":109,"created_at":"2014-07-19T14:50:53Z","updated_at":"2026-09-27T11:55:10Z","first_commit_at":"2014-07-19T14:52:55Z","last_commit_at":"2024-03-27T12:12:55Z","activity_months":116.26000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:25.465Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"wooorm/franc","visibility":"public","created_at":"2014-07-19T14:50:53Z","updated_at":"2026-09-27T11:55:10Z","private":false,"fork":false,"archived":false,"stargazers_count":4416,"open_issues_count":6,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1423","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A1:380E1C:17F7D0B:1C21AD3:6AB92E99"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1422","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080D:2BC4E5:184AA42:1C7534F:6AB92E99"},"commit":{"sha":"71b741d00445cbf232fc59c789cb289cfd0d2449","url":"https://github.com/wooorm/franc/commit/71b741d00445cbf232fc59c789cb289cfd0d2449","date":"2018-04-30T14:13:25Z","author_date":"2018-04-30T14:13:25Z","committer_date":"2018-04-30T14:13:25Z","tree_sha":"158b24080fb551d94468928bb5bb1f8bcaa2639a","message_first_line":"franc-cli: 5.0.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1421","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:18186D4:1C434E5:6AB92E9A"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":5804,"blob_sha":"46cb8f5e72a9a4a8e88fca4827d4ac4a60766627","priority":0}],"documents":[{"path":"readme.md","size":5804,"blob_sha":"46cb8f5e72a9a4a8e88fca4827d4ac4a60766627","priority":0,"status":200,"text":"# ![franc][logo]\n\n[![Build Status][build-badge]][build-status]\n[![Coverage Status][coverage-badge]][coverage-status]\n\nDetect the language of text.\n\n## What’s so cool about franc?\n\n1.  **franc** can support more languages<sup>(†)<\/sup> than any other\n    library\n2.  **franc** is packaged with support for [82][s], [188][m], or [402][l]\n    languages\n3.  **franc** has a CLI\n\n† - Based on the [UDHR][], the most translated document in the world.\n\n## What’s not so cool about franc?\n\n**franc** supports many languages, so make sure to pass it big documents,\nto get reliable results.\n\n## Installation\n\n[npm][]:\n\n```sh\nnpm install franc\n```\n\nThis installs the [`franc`][m] package, with support for 188 languages\n(languages which have 1 million or more speakers).  [`franc-min`][s] (82\nlanguages, 8m or more speakers) and [`franc-all`][l] (all 402 possible\nlanguages) are also available.  Finally, use `franc-cli` to install the\n[CLI][].\n\nBrowser builds for [`franc-min`][s], [`franc`][m], and [`franc-all`][l] are\navailable on [GitHub Releases][releases].\n\n## Usage\n\n```javascript\nvar franc = require('franc')\n\nfranc('Alle menslike wesens word vry') // => 'afr'\nfranc('এটি একটি ভাষা একক IBM স্ক্রিপ্ট') // => 'ben'\nfranc('Alle menneske er fødde til fridom') // => 'nno'\nfranc('') // => 'und'\nfranc('the') // => 'und'\n\n/* You can change what’s too short (default: 10): */\nfranc('the', {minLength: 3}) // => 'sco'\n```\n\n###### `.all`\n\n```js\nconsole.log(franc.all('O Brasil caiu 26 posições'))\n```\n\nYields:\n\n```js\n[ [ 'por', 1 ],\n  [ 'src', 0.8797557538750587 ],\n  [ 'glg', 0.8708313762329732 ],\n  [ 'snn', 0.8633161108501644 ],\n  [ 'bos', 0.8172851103804604 ],\n  ... 116 more items ]\n```\n\n###### `whitelist`\n\n```js\nconsole.log(franc.all('O Brasil caiu 26 posições', {whitelist: ['por', 'spa']}))\n```\n\nYields:\n\n```js\n[ [ 'por', 1 ], [ 'spa', 0.799906059182715 ] ]\n```\n\n###### `blacklist`\n\n```js\nconsole.log(franc.all('O Brasil caiu 26 posições', {blacklist: ['src', 'glg']}))\n```\n\nYields:\n\n```js\n[ [ 'por', 1 ],\n  [ 'snn', 0.8633161108501644 ],\n  [ 'bos', 0.8172851103804604 ],\n  [ 'hrv', 0.8107092531705026 ],\n  [ 'lav', 0.810239549084077 ],\n  ... 114 more items ]\n```\n\n## CLI\n\nInstall:\n\n```bash\nnpm install franc-cli --global\n```\n\nUse:\n\n```text\nCLI to detect the language of text\n\nUsage: franc [options] <string>\n\nOptions:\n\n  -h, --help                    output usage information\n  -v, --version                 output version number\n  -m, --min-length <number>     minimum length to accept\n  -w, --whitelist <string>      allow languages\n  -b, --blacklist <string>      disallow languages\n  -a, --all                     display all guesses\n\nUsage:\n\n# output language\n$ franc \"Alle menslike wesens word vry\"\n# afr\n\n# output language from stdin (expects utf8)\n$ echo \"এটি একটি ভাষা একক IBM স্ক্রিপ্ট\" | franc\n# ben\n\n# blacklist certain languages\n$ franc --blacklist por,glg \"O Brasil caiu 26 posições\"\n# src\n\n# output language from stdin with whitelist\n$ echo \"Alle mennesker er født frie og\" | franc --whitelist nob,dan\n# nob\n```\n\n## Supported languages\n\n| Package | Languages | Speakers |\n| ------- | --------- | -------- |\n| [`franc-min`][s] | 82 | 8M or more |\n| [`franc`][m] | 188 | 1M or more |\n| [`franc-all`][l] | 402 | - |\n\n### Language code\n\nNote that franc returns [ISO 639-3][iso6393] codes (three letter codes).\n**Not** ISO 639-1 or ISO 639-2.  See also [GH-10][] and [GH-30][].\n\n## Ports\n\nFranc has been ported to several other programming languages.\n\n*   Elixir — [`paasaa`](https://github.com/minibikini/paasaa)\n*   Erlang — [`efranc`](https://github.com/G-Corp/efranc)\n*   Go — [`franco`](https://github.com/kapsteur/franco),\n    [`whatlanggo`](https://github.com/abadojack/whatlanggo)\n*   R — [`franc`](https://github.com/MangoTheCat/franc)\n*   Rust — [`whatlang-rs`](https://github.com/greyblake/whatlang-rs)\n\nThe works franc is derived from have themselves also been ported to other\nlanguages.\n\n## Derivation\n\nFranc is a derivative work from [guess-language][] (Python, LGPL),\n[guesslanguage][] (C++, LGPL), and [Language::Guess][language-guess]\n(Perl, GPL).  Their creators granted me the rights to distribute franc\nunder the MIT license: respectively, [Kent S. Johnson][grant-3],\n[Jacob R. Rideout][grant-2], and [Maciej Ceglowski][grant-1].\n\n## License\n\n[MIT][] © [Titus Wormer][home]\n\n<!-- Definitions -->\n\n[releases]: https://github.com/wooorm/franc/releases\n\n[logo]: https://cdn.rawgit.com/wooorm/franc/a162cc0/logo.svg\n\n[build-badge]: https://img.shields.io/travis/wooorm/franc.svg\n\n[build-status]: https://travis-ci.org/wooorm/franc\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/franc.svg\n\n[coverage-status]: https://codecov.io/github/wooorm/franc\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[guess-language]: https://github.com/kent37/guess-language\n\n[guesslanguage]: http://websvn.kde.org/branches/work/sonnet-refactoring/common/nlp/guesslanguage.cpp?view=markup\n\n[language-guess]: http://web.archive.org/web/20090228163219/http://languid.cantbedone.org/\n\n[grant-1]: https://github.com/wooorm/franc/issues/6#issuecomment-59669191\n\n[grant-2]: https://github.com/wooorm/franc/issues/6#issuecomment-60196819\n\n[grant-3]: https://github.com/wooorm/franc/issues/6#issuecomment-59936827\n\n[mit]: LICENSE\n\n[home]: http://wooorm.com\n\n[cli]: #cli\n\n[udhr]: http://unicode.org/udhr/\n\n[s]: https://github.com/wooorm/franc/tree/master/packages/franc-min\n\n[m]: https://github.com/wooorm/franc/tree/master/packages/franc\n\n[l]: https://github.com/wooorm/franc/tree/master/packages/franc-all\n\n[iso6393]: https://iso639-3.sil.org/code_tables/639/data\n\n[gh-10]: https://github.com/wooorm/franc/issues/10\n\n[gh-30]: https://github.com/wooorm/franc/issues/30\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B90:35999:17B85C:5E5DEB:6AB92E98"},"text_sha256":"281259cfb548ca6330688211631a649c141aa60655193a8be08a3c2a6ea936ab"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1420","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B0:52542:17E8DB7:1C13B6B:6AB92E9B"},"commit":{"sha":"398af8b77088974aff4f6c9e4bfd548ea4fb261e","url":"https://github.com/wooorm/franc/commit/398af8b77088974aff4f6c9e4bfd548ea4fb261e","date":"2024-03-27T12:12:55Z","author_date":"2024-03-27T12:12:55Z","committer_date":"2024-03-27T12:12:55Z","tree_sha":"aa7bc5d4692975f1170e3b2efa08e017f2706f07","message_first_line":"Add license file to each package"},"tree_request_status":200,"tree_rate":{"github_remaining":"1419","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E7:2EA1B4:17FCAB7:1C279DE:6AB92E9B"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":7914,"blob_sha":"1625c15ac6323328275f34d0cda31efd44572466","priority":0}],"documents":[{"path":"readme.md","size":7914,"blob_sha":"1625c15ac6323328275f34d0cda31efd44572466","priority":0,"status":200,"text":"# ![franc][logo]\n\n[![Build Status][build-badge]][build]\n[![Coverage Status][coverage-badge]][coverage]\n\nDetect the language of text.\n\n## What’s so cool about franc?\n\n1. **franc** can support more languages<sup>(†)<\/sup> than any other\n   library\n2. **franc** is packaged with support for [82][s], [186][m], or [419][l]\n   languages\n3. **franc** has a CLI\n\n† - Based on the [UDHR][], the most translated copyright-free document in the\nworld.\n\n## What’s not so cool about franc?\n\n**franc** supports many languages, which means it’s easily confused on small\nsamples.\nMake sure to pass it big documents to get reliable results.\n\n## Install\n\n> 👉 **Note**: this installs the [`franc`][m] package, with support for 187\n> languages (languages which have 1 million or more speakers).\n> [`franc-min`][s] (82 languages, 8m or more speakers) and [`franc-all`][l]\n> (all 414 possible languages) are also available.\n> Finally, use `franc-cli` to install the [CLI][].\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install franc\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {franc, francAll} from 'https://esm.sh/franc@6'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {franc, francAll} from 'https://esm.sh/franc@6?bundle'\n<\/script>\n```\n\n## Use\n\n```js\nimport {franc, francAll} from 'franc'\n\nfranc('Alle menslike wesens word vry') //=> 'afr'\nfranc('এটি একটি ভাষা একক IBM স্ক্রিপ্ট') //=> 'ben'\nfranc('Alle menneske er fødde til fridom') //=> 'nno'\n\nfranc('') //=> 'und' (language code that stands for undetermined)\n\n// You can change what’s too short (default: 10):\nfranc('the') //=> 'und'\nfranc('the', {minLength: 3}) //=> 'sco'\n\nconsole.log(francAll('Considerando ser essencial que os direitos humanos'))\n//=> [['por', 1], ['glg', 0.771284519307895], ['spa', 0.6034146900423971], …123 more items]\n\nconsole.log(francAll('Considerando ser essencial que os direitos humanos', {only: ['por', 'spa']}))\n//=> [['por', 1 ], ['spa', 0.6034146900423971]]\n\nconsole.log(francAll('Considerando ser essencial que os direitos humanos', {ignore: ['spa', 'glg']}))\n//=> [['por', 1], ['cat', 0.5367251059928957], ['src', 0.47461899851037015], …121 more items]\n```\n\n## API\n\nThis package exports the identifiers `franc`, `francAll`.\nThere is no default export.\n\n### `franc(value[, options])`\n\nGet the most probable language for the given value.\n\n###### Parameters\n\n* `value` (`string`) — value to test\n* `options` (`Options`, optional) — configuration\n\n###### Returns\n\nThe most probable language (`string`).\n\n### `francAll(value[, options])`\n\nGet the most probable language for the given value.\n\n###### Parameters\n\n* `value` (`string`) — value to test\n* `options` (`Options`, optional) — configuration\n\n###### Returns\n\nArray containing language—distance tuples (`Array<[string, number]>`).\n\n### `Options`\n\nConfiguration (`Object`, optional) with the following fields:\n\n###### `options.only`\n\nLanguages to allow (`Array<string>`, optional).\n\n###### `options.ignore`\n\nLanguages to ignore (`Array<string>`, optional).\n\n###### `options.minLength`\n\nMinimum length to accept (`number`, default: `10`).\n\n## CLI\n\nInstall:\n\n```sh\nnpm install franc-cli --global\n```\n\nUse:\n\n```text\nCLI to detect the language of text\n\nUsage: franc [options] <string>\n\nOptions:\n\n  -h, --help                    output usage information\n  -v, --version                 output version number\n  -m, --min-length <number>     minimum length to accept\n  -o, --only <string>           allow languages\n  -i, --ignore <string>         disallow languages\n  -a, --all                     display all guesses\n\nUsage:\n\n# output language\n$ franc \"Alle menslike wesens word vry\"\n# afr\n\n# output language from stdin (expects utf8)\n$ echo \"এটি একটি ভাষা একক IBM স্ক্রিপ্ট\" | franc\n# ben\n\n# ignore certain languages\n$ franc --ignore por,glg \"O Brasil caiu 26 posições\"\n# src\n\n# output language from stdin with only\n$ echo \"Alle mennesker er født frie og\" | franc --only nob,dan\n# nob\n```\n\n## Data\n\n###### Supported languages\n\n| Package | Languages | Speakers |\n| - | - | - |\n| [`franc-min`][s] | 82 | 8M or more |\n| [`franc`][m] | 187 | 1M or more |\n| [`franc-all`][l] | 414 | - |\n\n###### Language code\n\n> 👉 **Note**: franc returns [ISO 639-3][iso6393] codes (three letter codes).\n> **Not** ISO 639-1 or ISO 639-2.\n> See also [GH-10][] and [GH-30][].\n\nTo get more info about the languages represented by ISO 639-3, use\n[`iso-639-3`][iso-639-3].\nThere is also an index available to map ISO 639-3 to ISO 639-1 codes,\n[`iso-639-3/to-1.json`][iso-639-3-to-1], but note that not all 639-3 codes can\nbe represented in 639-1.\n\n## Types\n\nThese packages are fully typed with [TypeScript][].\nThey export the additional types `TrigramTuple` and `Options`.\n\n## Compatibility\n\nThese package are at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nThey also works in Deno and modern browsers.\n\n## Ports\n\nFranc has been ported to several other programming languages.\n\n* Elixir — [`paasaa`](https://github.com/minibikini/paasaa)\n* Erlang — [`efranc`](https://github.com/G-Corp/efranc)\n* Go — [`franco`](https://github.com/kapsteur/franco),\n  [`whatlanggo`](https://github.com/abadojack/whatlanggo)\n* R — [`franc`](https://github.com/MangoTheCat/franc)\n* Rust — [`whatlang-rs`](https://github.com/greyblake/whatlang-rs)\n* Dart — [`francd`](https://github.com/svonidze/francd)\n* Python — [`pyfranc`](https://github.com/cyb3rk0tik/pyfranc)\n\nThe works franc is derived from have themselves also been ported to other\nlanguages.\n\n## Derivation\n\nFranc is a derivative work from [guess-language][] (Python, LGPL),\n[guesslanguage][] (C++, LGPL), and [Language::Guess][language-guess]\n(Perl, GPL).\nTheir creators granted me the rights to distribute franc under the MIT license:\nrespectively, [Kent S. Johnson][grant-3], [Jacob R. Rideout][grant-2], and\n[Maciej Ceglowski][grant-1].\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## License\n\n[MIT][] © [Titus Wormer][home]\n\n<!-- Definitions -->\n\n[logo]: https://raw.githubusercontent.com/wooorm/franc/a162cc0/logo.svg?sanitize=true\n\n[build-badge]: https://github.com/wooorm/franc/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/franc/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/franc.svg\n\n[coverage]: https://codecov.io/github/wooorm/franc\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[guess-language]: https://github.com/kent37/guess-language\n\n[guesslanguage]: http://websvn.kde.org/branches/work/sonnet-refactoring/common/nlp/guesslanguage.cpp?view=markup\n\n[language-guess]: http://web.archive.org/web/20090228163219/http://languid.cantbedone.org/\n\n[grant-1]: https://github.com/wooorm/franc/issues/6#issuecomment-59669191\n\n[grant-2]: https://github.com/wooorm/franc/issues/6#issuecomment-60196819\n\n[grant-3]: https://github.com/wooorm/franc/issues/6#issuecomment-59936827\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[mit]: license\n\n[home]: http://wooorm.com\n\n[cli]: #cli\n\n[udhr]: http://unicode.org/udhr/\n\n[s]: https://github.com/wooorm/franc/tree/main/packages/franc-min\n\n[m]: https://github.com/wooorm/franc/tree/main/packages/franc\n\n[l]: https://github.com/wooorm/franc/tree/main/packages/franc-all\n\n[iso6393]: https://iso639-3.sil.org/code_tables/639/data\n\n[gh-10]: https://github.com/wooorm/franc/issues/10\n\n[gh-30]: https://github.com/wooorm/franc/issues/30\n\n[iso-639-3]: https://github.com/wooorm/iso-639-3\n\n[iso-639-3-to-1]: https://github.com/wooorm/iso-639-3/blob/main/iso6393-to-1.js\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A10C:345ED4:17B0E1:5E550B:6AB92E9B"},"text_sha256":"2bf98a82105f77fdcc19492fea435d9059528810b77fcb30a4994e7f2d84bdb5"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"miso-belica/sumy","input_row":{"repository":"miso-belica/sumy","url":"https://github.com/miso-belica/sumy","name":"sumy","owner":"miso-belica","description":"Module for automatic summarization of text documents and HTML pages.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3698,"issues":127,"created_at":"2013-02-20T12:56:48Z","updated_at":"2026-09-23T14:59:35Z","first_commit_at":"2013-02-20T13:12:18Z","last_commit_at":"2026-09-09T05:41:09Z","activity_months":162.56999999999999,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:28.080Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"miso-belica/sumy","visibility":"public","created_at":"2013-02-20T12:56:48Z","updated_at":"2026-09-23T14:59:35Z","private":false,"fork":false,"archived":false,"stargazers_count":3698,"open_issues_count":7,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1418","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"092E:6E4BB:1824719:1C4EC86:6AB92E9C"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1417","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:18285C3:1C533A8:6AB92E9C"},"commit":{"sha":"c703447da24afc4f3662d4b819b310a2ecb74d54","url":"https://github.com/miso-belica/sumy/commit/c703447da24afc4f3662d4b819b310a2ecb74d54","date":"2018-04-01T11:30:51Z","author_date":"2018-04-01T11:30:51Z","committer_date":"2018-04-01T11:30:51Z","tree_sha":"f4568e37744f7a448b4b7a9b5e4e6b40e01020a6","message_first_line":"Updated changelog with ISO language codes"},"tree_request_status":200,"tree_rate":{"github_remaining":"1416","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0844:731F6:181886E:1C436FF:6AB92E9C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6232,"blob_sha":"425343f24fba40e86c13572f8f8a26b45eb54a9d","priority":0},{"path":"README.rst","size":6141,"blob_sha":"5db88ad53f26fff36a302b933f96636e35801864","priority":0}],"documents":[{"path":"README.md","size":6232,"blob_sha":"425343f24fba40e86c13572f8f8a26b45eb54a9d","priority":0,"status":200,"text":"# Automatic text summarizer\n\n[![image](https://api.travis-ci.org/miso-belica/sumy.png?branch=master)](https://travis-ci.org/miso-belica/sumy)\n\nSimple library and command line utility for extracting summary from HTML\npages or plain texts. The package also contains simple evaluation\nframework for text summaries. Implemented summarization methods:\n\n-   **Luhn** - heurestic method,\n    [reference](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5392672)\n-   **Edmundson** heurestic method with previous statistic research,\n    [reference](http://dl.acm.org/citation.cfm?doid=321510.321519)\n-   **Latent Semantic Analysis, LSA** - one of the algorithm from\n    <http://scholar.google.com/citations?user=0fTuW_YAAAAJ&hl=en> I\n    think the author is using more advanced algorithms now.\n    [Steinberger, J. a Ježek, K. Using latent semantic an and\n    summary evaluation. In In Proceedings ISIM '04. 2004. S.\n    93-100.](http://www.kiv.zcu.cz/~jstein/publikace/isim2004.pdf)\n-   **LexRank** - Unsupervised approach inspired by algorithms PageRank\n    and HITS,\n    [reference](http://tangra.si.umich.edu/~radev/lexrank/lexrank.pdf)\n-   **TextRank** - Unsupervised approach, also using PageRank algorithm,\n    [reference](https://web.eecs.umich.edu/~mihalcea/papers/mihalcea.emnlp04.pdf)\n-   **SumBasic** - Method that is often used as a baseline in\n    the literature. Source: [Read about\n    SumBasic](http://www.cis.upenn.edu/~nenkova/papers/ipm.pdf)\n-   **KL-Sum** - Method that greedily adds sentences to a summary so\n    long as it decreases the KL Divergence. Source: [Read about\n    KL-Sum](http://www.aclweb.org/anthology/N09-1041)\n-   **Reduction** - Graph-based summarization, where a sentence salience is\n    computed as the sum of the weights of its edges to other sentences. The\n    weight of an edge between two sentences is computed in the same manner\n    as TextRank.\n\nHere are some other summarizers:\n\n-   <https://github.com/thavelick/summarize/> - Python, TF (very simple)\n-   [Reduction](https://github.com/adamfabish/Reduction) - Python,\n    TextRank (simple)\n-   [Open Text Summarizer](http://libots.sourceforge.net/) - C, TF\n    without normalization\n-   [Simple program that summarize\n    text](https://github.com/xhresko/text-summarizer) - Python, TF\n    without normalization\n-   [Intro to Computational\n    Linguistics](https://github.com/kylehardgrave/summarizer) - Java,\n    LexRank\n-   [Sumtract: Second project for UW LING\n    572](https://github.com/stefanbehr/sumtract) - Python\n-   [TextTeaser](https://github.com/MojoJolo/textteaser) - Scala\n-   [PyTeaser](https://github.com/xiaoxu193/PyTeaser) - TextTeaser port\n    in Python\n-   [Automatic Document\n    Summarizer](https://github.com/himanshujindal/Automatic-Text-Summarizer) -\n    Java, Bipartite HITS (no sources)\n-   [Pythia](https://github.com/giorgosera/pythia/blob/dev/analysis/summarization/summarization.py) -\n    Python, LexRank & Centroid\n-   [SWING](https://github.com/WING-NUS/SWING) - Ruby\n-   [Topic Networks](https://github.com/bobflagg/Topic-Networks) - R,\n    topic models & bipartite graphs\n-   [Almus: Automatic Text\n    Summarizer](http://textmining.zcu.cz/?lang=en&section=download) -\n    Java, LSA (without source code)\n-   [Musutelsa](http://www.musutelsa.jamstudio.eu/) - Java, LSA\n    (always freezes)\n-   <http://mff.bajecni.cz/index.php> - C++\n-   [MEAD](http://www.summarization.com/mead/) - Perl, various methods +\n    evaluation framework\n\n## Installation\n\nMake sure you have [Python](http://www.python.org/) 2.7/3.3+ and\n[pip](https://crate.io/packages/pip/)\n([Windows](http://docs.python-guide.org/en/latest/starting/install/win/),\n[Linux](http://docs.python-guide.org/en/latest/starting/install/linux/))\ninstalled. Run simply (preferred way):\n\n```sh\n$ [sudo] pip install sumy\n```\n\nOr for the fresh version:\n\n```sh\n$ [sudo] pip install git+git://github.com/miso-belica/sumy.git\n```\n\n## Usage\n\nSumy contains command line utility for quick summarization of documents.\n\n```sh\n$ sumy lex-rank --length=10 --url=http://en.wikipedia.org/wiki/Automatic_summarization # what's summarization?\n$ sumy luhn --language=czech --url=http://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n$ sumy edmundson --language=czech --length=3% --url=http://cs.wikipedia.org/wiki/Bitva_u_Lipan\n$ sumy --help # for more info\n```\n\nVarious evaluation methods for some summarization method can be executed\nby commands below:\n\n```sh\n$ sumy_eval lex-rank reference_summary.txt --url=http://en.wikipedia.org/wiki/Automatic_summarization\n$ sumy_eval lsa reference_summary.txt --language=czech --url=http://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n$ sumy_eval edmundson reference_summary.txt --language=czech --url=http://cs.wikipedia.org/wiki/Bitva_u_Lipan\n$ sumy_eval --help # for more info\n```\n\n## Python API\n\nOr you can use sumy like a library in your project. Create file `sumy_example.py` ([don't name it `sumy.py`](https://stackoverflow.com/questions/41334622/python-sumy-no-module-named-sumy-parsers-html)) with the code below to test it.\n\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division, print_function, unicode_literals\n\nfrom sumy.parsers.html import HtmlParser\nfrom sumy.parsers.plaintext import PlaintextParser\nfrom sumy.nlp.tokenizers import Tokenizer\nfrom sumy.summarizers.lsa import LsaSummarizer as Summarizer\nfrom sumy.nlp.stemmers import Stemmer\nfrom sumy.utils import get_stop_words\n\n\nLANGUAGE = \"czech\"\nSENTENCES_COUNT = 10\n\n\nif __name__ == \"__main__\":\n    url = \"http://www.zsstritezuct.estranky.cz/clanky/predmety/cteni/jak-naucit-dite-spravne-cist.html\"\n    parser = HtmlParser.from_url(url, Tokenizer(LANGUAGE))\n    # or for plain text files\n    # parser = PlaintextParser.from_file(\"document.txt\", Tokenizer(LANGUAGE))\n    stemmer = Stemmer(LANGUAGE)\n\n    summarizer = Summarizer(stemmer)\n    summarizer.stop_words = get_stop_words(LANGUAGE)\n\n    for sentence in summarizer(parser.document, SENTENCES_COUNT):\n        print(sentence)\n```\n\n## Contributing\n\nMake sure you have Python 2.7 or 3.3+ installed. Then, install all the required dependencies:\n\n```sh\n$ pip install -U pytest pytest-cov -e .\n```\n\nYou can run the tests via\n\n```sh\n$ pytest\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FD6E:386840:187CBD:5F21E8:6AB92E9C"},"text_sha256":"ee8d859b1c0b992d0cba7c22408fc2aee6ca7566c8b60d12e20ae3ef4bfbc173"},{"path":"README.rst","size":6141,"blob_sha":"5db88ad53f26fff36a302b933f96636e35801864","priority":0,"status":200,"text":"Automatic text summarizer\n=========================\n\n|image|\n\nSimple library and command line utility for extracting summary from HTML\npages or plain texts. The package also contains simple evaluation\nframework for text summaries. Implemented summarization methods:\n\n-  **Luhn** - heurestic method,\n   `reference <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5392672>`__\n-  **Edmundson** heurestic method with previous statistic research,\n   `reference <http://dl.acm.org/citation.cfm?doid=321510.321519>`__\n-  **Latent Semantic Analysis, LSA** - one of the algorithm from\n   http://scholar.google.com/citations?user=0fTuW_YAAAAJ&hl=en I think\n   the author is using more advanced algorithms now. `Steinberger, J. a\n   Ježek, K. Using latent semantic an and summary evaluation. In In\n   Proceedings ISIM '04. 2004. S.\n   93-100. <http://www.kiv.zcu.cz/~jstein/publikace/isim2004.pdf>`__\n-  **LexRank** - Unsupervised approach inspired by algorithms PageRank\n   and HITS,\n   `reference <http://tangra.si.umich.edu/~radev/lexrank/lexrank.pdf>`__\n-  **TextRank** - some sort of combination of a few resources that I\n   found on the internet. I really don't remember the sources. Probably\n   `Wikipedia <https://en.wikipedia.org/wiki/Automatic_summarization#Unsupervised_approaches:_TextRank_and_LexRank>`__\n   and some papers in 1st page of Google :)\n-  **SumBasic** - Method that is often used as a baseline in the\n   literature. Source: `Read about\n   SumBasic <http://www.cis.upenn.edu/~nenkova/papers/ipm.pdf>`__\n-  **KL-Sum** - Method that greedily adds sentences to a summary so long\n   as it decreases the KL Divergence. Source: `Read about\n   KL-Sum <http://www.aclweb.org/anthology/N09-1041>`__\n\nHere are some other summarizers:\n\n-  https://github.com/thavelick/summarize/ - Python, TF (very simple)\n-  `Reduction <https://github.com/adamfabish/Reduction>`__ - Python,\n   TextRank (simple)\n-  `Open Text Summarizer <http://libots.sourceforge.net/>`__ - C, TF\n   without normalization\n-  `Simple program that summarize\n   text <https://github.com/xhresko/text-summarizer>`__ - Python, TF\n   without normalization\n-  `Intro to Computational\n   Linguistics <https://github.com/kylehardgrave/summarizer>`__ - Java,\n   LexRank\n-  `Sumtract: Second project for UW LING\n   572 <https://github.com/stefanbehr/sumtract>`__ - Python\n-  `TextTeaser <https://github.com/MojoJolo/textteaser>`__ - Scala\n-  `PyTeaser <https://github.com/xiaoxu193/PyTeaser>`__ - TextTeaser\n   port in Python\n-  `Automatic Document\n   Summarizer <https://github.com/himanshujindal/Automatic-Text-Summarizer>`__\n   - Java, Bipartite HITS (no sources)\n-  `Pythia <https://github.com/giorgosera/pythia/blob/dev/analysis/summarization/summarization.py>`__\n   - Python, LexRank & Centroid\n-  `SWING <https://github.com/WING-NUS/SWING>`__ - Ruby\n-  `Topic Networks <https://github.com/bobflagg/Topic-Networks>`__ - R,\n   topic models & bipartite graphs\n-  `Almus: Automatic Text\n   Summarizer <http://textmining.zcu.cz/?lang=en&section=download>`__ -\n   Java, LSA (without source code)\n-  `Musutelsa <http://www.musutelsa.jamstudio.eu/>`__ - Java, LSA\n   (always freezes)\n-  http://mff.bajecni.cz/index.php - C++\n-  `MEAD <http://www.summarization.com/mead/>`__ - Perl, various methods\n   + evaluation framework\n\nInstallation\n------------\n\nMake sure you have `Python <http://www.python.org/>`__ 2.7/3.3+ and\n`pip <https://crate.io/packages/pip/>`__\n(`Windows <http://docs.python-guide.org/en/latest/starting/install/win/>`__,\n`Linux <http://docs.python-guide.org/en/latest/starting/install/linux/>`__)\ninstalled. Run simply (preferred way):\n\n.. code:: sh\n\n    $ [sudo] pip install sumy\n\nOr for the fresh version:\n\n.. code:: sh\n\n    $ [sudo] pip install git+git://github.com/miso-belica/sumy.git\n\nUsage\n-----\n\nSumy contains command line utility for quick summarization of documents.\n\n.. code:: sh\n\n    $ sumy lex-rank --length=10 --url=http://en.wikipedia.org/wiki/Automatic_summarization # what's summarization?\n    $ sumy luhn --language=czech --url=http://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n    $ sumy edmundson --language=czech --length=3% --url=http://cs.wikipedia.org/wiki/Bitva_u_Lipan\n    $ sumy --help # for more info\n\nVarious evaluation methods for some summarization method can be executed\nby commands below:\n\n.. code:: sh\n\n    $ sumy_eval lex-rank reference_summary.txt --url=http://en.wikipedia.org/wiki/Automatic_summarization\n    $ sumy_eval lsa reference_summary.txt --language=czech --url=http://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n    $ sumy_eval edmundson reference_summary.txt --language=czech --url=http://cs.wikipedia.org/wiki/Bitva_u_Lipan\n    $ sumy_eval --help # for more info\n\nPython API\n----------\n\nOr you can use sumy like a library in your project.\n\n.. code:: python\n\n    # -*- coding: utf-8 -*-\n\n    from __future__ import absolute_import\n    from __future__ import division, print_function, unicode_literals\n\n    from sumy.parsers.html import HtmlParser\n    from sumy.parsers.plaintext import PlaintextParser\n    from sumy.nlp.tokenizers import Tokenizer\n    from sumy.summarizers.lsa import LsaSummarizer as Summarizer\n    from sumy.nlp.stemmers import Stemmer\n    from sumy.utils import get_stop_words\n\n\n    LANGUAGE = \"czech\"\n    SENTENCES_COUNT = 10\n\n\n    if __name__ == \"__main__\":\n        url = \"http://www.zsstritezuct.estranky.cz/clanky/predmety/cteni/jak-naucit-dite-spravne-cist.html\"\n        parser = HtmlParser.from_url(url, Tokenizer(LANGUAGE))\n        # or for plain text files\n        # parser = PlaintextParser.from_file(\"document.txt\", Tokenizer(LANGUAGE))\n        stemmer = Stemmer(LANGUAGE)\n\n        summarizer = Summarizer(stemmer)\n        summarizer.stop_words = get_stop_words(LANGUAGE)\n\n        for sentence in summarizer(parser.document, SENTENCES_COUNT):\n            print(sentence)\n\nTests\n-----\n\nSetup:\n\n.. code:: sh\n\n    $ pip install pytest pytest-cov\n\nRun tests via\n\n.. code:: sh\n\n    $ py.test-2.7 && py.test-3.3 && py.test-3.4 && py.test-3.5\n\n.. |image| image:: https://api.travis-ci.org/miso-belica/sumy.png?branch=master\n   :target: https://travis-ci.org/miso-belica/sumy\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F486:241B62:17C337:5E68C6:6AB92E9C"},"text_sha256":"269e8b2b437c374e77624a332a019e9e7b780697bbb5bedd47c9e8f2db9b4d25"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1415","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C0:35C5DA:17CC5DE:1BF66E9:6AB92E9E"},"commit":{"sha":"503340bc5290fffe9fb8dc072fda42ac82aef4c5","url":"https://github.com/miso-belica/sumy/commit/503340bc5290fffe9fb8dc072fda42ac82aef4c5","date":"2026-06-23T09:52:42Z","author_date":"2026-06-22T16:52:45Z","committer_date":"2026-06-23T09:52:42Z","tree_sha":"d316f0784c285a08c75ccf0cf9b3fd4cfc50da5f","message_first_line":"Bump actions/checkout from 6 to 7"},"tree_request_status":200,"tree_rate":{"github_remaining":"1414","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F2:228A99:180F438:1C3A1B4:6AB92E9E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5033,"blob_sha":"86e3343f4d6cd1692f3fd40f61fb48ab645842af","priority":0}],"documents":[{"path":"README.md","size":5033,"blob_sha":"86e3343f4d6cd1692f3fd40f61fb48ab645842af","priority":0,"status":200,"text":"# Automatic text summarizer\n\n\n[![image](https://github.com/miso-belica/sumy/actions/workflows/run-tests.yml/badge.svg)](https://github.com/miso-belica/sumy/actions/workflows/run-tests.yml)\n[![GitPod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/miso-belica/sumy) \n\nSimple library and command line utility for extracting summary from HTML\npages or plain texts. The package also contains simple evaluation\nframework for text summaries. Implemented summarization methods are described in the [documentation](docs/summarizators.md). I also maintain a list of [alternative implementations](docs/alternatives.md) of the summarizers in various programming languages.\n\n## Is my natural language supported?\nThere is a [good chance](docs/index.md#Tokenizer) it is. But if not it is [not too hard to add](docs/how-to-add-new-language.md) it.\n\n## Installation\n\nMake sure you have [Python](http://www.python.org/) 3.8+ installed.\n\n### Using uv (recommended)\n\n[uv](https://docs.astral.sh/uv/) is a modern, fast Python package installer and resolver.\n\n```sh\n$ uv pip install sumy\n$ uv pip install git+https://github.com/miso-belica/sumy.git  # for the fresh version\n```\n\n### Using pip\n\n```sh\n$ pip install sumy\n$ pip install git+git://github.com/miso-belica/sumy.git  # for the fresh version\n```\n\n### For development\n\nIf you want to contribute or modify the code:\n\n```sh\n$ git clone https://github.com/miso-belica/sumy.git\n$ cd sumy\n$ uv sync               # Install dependencies (dev group included automatically)\n$ uv run pytest         # Run tests\n$ uv run sumy --help    # Run sumy using uv\n```\n\n## Usage\n\nThanks to some good soul out there, the easiest way to try sumy is in your browser at https://huggingface.co/spaces/issam9/sumy_space\n\nSumy contains command line utility for quick summarization of documents.\n\n```sh\n$ sumy lex-rank --length=10 --url=https://en.wikipedia.org/wiki/Automatic_summarization # what's summarization?\n$ sumy lex-rank --language=uk --length=30 --url=https://uk.wikipedia.org/wiki/Україна\n$ sumy luhn --language=czech --url=https://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n$ sumy edmundson --language=czech --length=3% --url=https://cs.wikipedia.org/wiki/Bitva_u_Lipan\n$ sumy --help # for more info\n```\n\nVarious evaluation methods for some summarization method can be executed\nby commands below:\n\n```sh\n$ sumy_eval lex-rank reference_summary.txt --url=https://en.wikipedia.org/wiki/Automatic_summarization\n$ sumy_eval lsa reference_summary.txt --language=czech --url=https://www.zdrojak.cz/clanky/automaticke-zabezpeceni/\n$ sumy_eval edmundson reference_summary.txt --language=czech --url=https://cs.wikipedia.org/wiki/Bitva_u_Lipan\n$ sumy_eval --help # for more info\n```\n\nIf you don't want to bother by the installation, you can try it as a container.\n\n```sh\n$ docker run --rm misobelica/sumy lex-rank --length=10 --url=https://en.wikipedia.org/wiki/Automatic_summarization\n```\n\n## Python API\n\nOr you can use sumy like a library in your project. Create file `sumy_example.py` ([don't name it `sumy.py`](https://stackoverflow.com/questions/41334622/python-sumy-no-module-named-sumy-parsers-html)) with the code below to test it.\n\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division, print_function, unicode_literals\n\nfrom sumy.parsers.html import HtmlParser\nfrom sumy.parsers.plaintext import PlaintextParser\nfrom sumy.nlp.tokenizers import Tokenizer\nfrom sumy.summarizers.lsa import LsaSummarizer as Summarizer\nfrom sumy.nlp.stemmers import Stemmer\nfrom sumy.utils import get_stop_words\n\n\nLANGUAGE = \"english\"\nSENTENCES_COUNT = 10\n\n\nif __name__ == \"__main__\":\n    url = \"https://en.wikipedia.org/wiki/Automatic_summarization\"\n    parser = HtmlParser.from_url(url, Tokenizer(LANGUAGE))\n    # or for plain text files\n    # parser = PlaintextParser.from_file(\"document.txt\", Tokenizer(LANGUAGE))\n    # parser = PlaintextParser.from_string(\"Check this out.\", Tokenizer(LANGUAGE))\n    stemmer = Stemmer(LANGUAGE)\n\n    summarizer = Summarizer(stemmer)\n    summarizer.stop_words = get_stop_words(LANGUAGE)\n\n    for sentence in summarizer(parser.document, SENTENCES_COUNT):\n        print(sentence)\n```\n\n## Interesting projects using sumy\n\nI found some interesting projects while browsing the internet or sometimes people wrote me an e-mail with questions, and I was curious how they use the sumy :)\n\n* [Learning to generate questions from text](https://software.intel.com/en-us/articles/using-natural-language-processing-for-smart-question-generation) - https://github.com/adityasarvaiya/Automatic_Question_Generation\n* Summarize your video to any duration - https://github.com/aswanthkoleri/VideoMash and similar https://github.com/OpenGenus/vidsum\n* Tool for collectively summarizing large discussions - https://github.com/amyxzhang/wikum\n* AutoTL;DR bot for [Lemmy](https://en.wikipedia.org/wiki/Lemmy_(software)) uses sumy: https://github.com/RikudouSage/LemmyAutoTldrBot\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3C0C:3A3DD:17B7AD:5E5CF8:6AB92E9E"},"text_sha256":"6f2279eeeee185e6f84f7909f73ecca310a9d7c90c4c1d71cb2ab44fae89ab11"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"textlint/textlint","input_row":{"repository":"textlint/textlint","url":"https://github.com/textlint/textlint","name":"textlint","owner":"textlint","description":"textlint is the pluggable linter for natural language text.","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":3194,"issues":471,"created_at":"2014-12-25T10:34:46Z","updated_at":"2026-09-27T00:58:46Z","first_commit_at":"2014-12-24T16:31:10Z","last_commit_at":"2026-09-27T00:58:41Z","activity_months":141.08000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:31.034Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"textlint/textlint","visibility":"public","created_at":"2014-12-25T10:34:46Z","updated_at":"2026-09-27T00:58:46Z","private":false,"fork":false,"archived":false,"stargazers_count":3194,"open_issues_count":64,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1413","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08EB:71F98:185C109:1C869D9:6AB92E9F"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1412","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DF:7418C:183C03F:1C66C98:6AB92E9F"},"commit":{"sha":"54873c02a2f9267806b402566105d546ee5339e8","url":"https://github.com/textlint/textlint/commit/54873c02a2f9267806b402566105d546ee5339e8","date":"2018-05-23T02:01:45Z","author_date":"2018-05-23T02:01:45Z","committer_date":"2018-05-23T02:01:45Z","tree_sha":"78b30afcb2385d59d3d7467c43c9e6998f6c5915","message_first_line":"chore(website): add textlint icon"},"tree_request_status":200,"tree_rate":{"github_remaining":"1411","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0931:731F6:1818A54:1C43926:6AB92E9F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":22651,"blob_sha":"4889e9f89218283d78c44abb859e5b07f865d0c8","priority":0}],"documents":[{"path":"README.md","size":22651,"blob_sha":"4889e9f89218283d78c44abb859e5b07f865d0c8","priority":0,"status":200,"text":"# textlint\n\n[![textlint logo](https://textlint.github.io/media/logo/spaced/textlint-logo.png)](https://textlint.github.io/)\n\n> The pluggable linting tool for text and markdown.  \ntextlint is similar to [ESLint](http://eslint.org/ \"ESLint\"), but it's for use with natural language.\n\n<!-- textlint-disable -->\n\n[![Travis CI Build Status](https://travis-ci.org/textlint/textlint.svg)](https://travis-ci.org/textlint/textlint)\n[![Build status](https://ci.appveyor.com/api/projects/status/4kwh41gxpc4h0obt?svg=true)](https://ci.appveyor.com/project/azu/textlint)\n\n<!-- textlint-enable -->\n\n## Online Demo\n\nVisit [https://textlint.github.io/](https://textlint.github.io/) to see textlint in action!\n\n## Features\n\n- No bundled rules.\n- To use a rule, install a textlint rule via npm.\n    - `npm install textlint-rule-xxx`.\n    - See [collection of textlint rules](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule \"Collection of textlint rule · textlint/textlint Wiki\")\n- [Markdown](./packages/@textlint/textlint-plugin-markdown) and [plain text](./packages/@textlint/textlint-plugin-text) are supported by default. Support is available for [HTML](https://github.com/textlint/textlint-plugin-html) and [other file formats](https://github.com/textlint/textlint#supported-file-formats) via plugins.\n- Supports the use of custom formatters and formatter bundles [formatter(reporter)](./packages/@textlint/linter-formatter)\n\n## Quick Tour\n\nFor a quick tour of textlint, checkout our [Getting Started](./docs/getting-started.md) guide :squirrel:\n\n## Installation\n\nYou can install the `textlint` command using npm:\n\n```\n$ npm install textlint --global\n```\n\n**Requirements**:\n\n- Node.js 4.0.0+\n- npm 2.0.0+\n\nIf you're not sure what version of Node you're running, you can run `node -v` in your console to find out.\n\n**:warning: Warning:**\n\n- If you have installed `textlint` globally you must install each reference rule globally as well.\n- If you have installed `textlint` locally you must install each rule locally as well.\n\nWe recommend installing `textlint` locally.\n\n### For Node.js beginners\n\nIf you've never used Node.js and npm, please see the following:\n\n- [Installing Node.js and updating npm | npm Documentation](https://docs.npmjs.com/getting-started/installing-node \"02 - Installing Node.js and updating npm | npm Documentation\")\n\n## Usage\n\n![screenshot lint pretty-error](docs/assets/screenshot-lint-pretty-error.png)\n\ntextlint has no default rules!!\n\nYou can run textlint with the `--rule` or `--rulesdir` flag to specify rules, or you can just use a `.textlintrc` config file.\n\n```sh\n# Install textlint's rule\nnpm install --global textlint-rule-no-todo\n```\n\nUse with `textlint-rule-no-todo` rule.\n(Allow to short `textlint-rule-no-todo` to `no-todo`)\n\n```sh\ntextlint --rule no-todo README.md\n```\n\n:memo: We recommended using `.textlintrc` to specify rules instead of `--rule` or `--rulesdir` flags.\nYour `.textlintrc` is a great way to maintain your rules.\n\n## CLI\n\nRun `textlint -h` for information on how to use the CLI.\n\n```\n$ textlint -h\ntextlint [options] file.md [file|dir|glob*]\n\nOptions:\n  -h, --help                 Show help.\n  -c, --config path::String  Use configuration from this file or sharable config.\n  --init                     Create the config file if not existed. - default: false\n  --fix                      Automatically fix problems\n  --dry-run                  Enable dry-run mode for --fix. Only show result, don't change the file.\n  --debug                    Outputs debugging information\n  -v, --version              Outputs the version number.\n\nUsing stdin:\n  --stdin                    Lint text provided on <STDIN>. - default: false\n  --stdin-filename String    Specify filename to process STDIN as\n\nOutput:\n  -o, --output-file path::String  Enable report to be written to a file.\n  -f, --format String        Use a specific output format.\n                             Available formatter          : checkstyle, compact, jslint-xml, json, junit, pretty-error, stylish, table, tap, unix\n                             Available formatter for fixer: compats, diff, json, stylish\n  --no-color                 Disable color in piped output.\n  --quiet                    Report errors only. - default: false\n\nSpecifying rules and plugins:\n  --plugin [String]          Set plugin package name\n  --rule [path::String]      Set rule package name\n  --preset [path::String]    Set preset package name and load rules from preset package.\n  --rulesdir [path::String]  Set rules from this directory and set all default rules to off.\n\nCaching:\n  --cache                    Only check changed files - default: false\n  --cache-location path::String  Path to the cache file or directory\n\nExperimental:\n  --experimental             Enable experimental flag.Some feature use on experimental.\n  --rules-base-directory path::String  Set module base directory. textlint load modules(rules/presets/plugins) from the base directory.\n```\n\nWhen running texlint, you can target files to lint using the glob patterns. Make sure that you enclose any glob parameter you pass in quotes.\n\n```sh\n$ textlint \"docs/**\"\n```\n\nExample:\n\n- :information_source: See [examples/cli](examples/cli)\n\n\n## .textlintrc\n\n`.textlintrc` is config file that is loaded as JSON, YAML or JS via [azu/rc-config-loader](https://github.com/azu/rc-config-loader).\n\nRunning textlint with the following arguments\n\n```\n$ textlint --rule no-todo --rule very-nice-rule README.md\n```\n\nis equivalent to running `textlint README.md` in a directory with a `.textlintrc` containing the following json\n\n```json\n{\n  \"rules\": {\n    \"no-todo\": true,\n    \"very-nice-rule\": true\n  }\n}\n```\n\nYou can also configure options for specific rules in your `.textlintrc` file.\n\n```json\n{\n  \"rules\": {\n    \"no-todo\": false, // disable\n    \"very-nice-rule\": {\n        \"key\": \"value\"\n    }\n  }\n}\n```\n\nFor example here we pass the options (\"key\": \"value\") to `very-nice-rule`.\n\nOptions can be specified in your `.textlintrc` file as follows:\n\n<!-- textlint-disable -->\n\n```js\n{\n  // Allow to comment in JSON\n  \"rules\": {\n    \"<rule-name>\": true | false | object\n  }\n}\n```\n\n<!-- textlint-enable -->\n\n:information_source: for more details see\n\n- [docs/configuring](docs/configuring.md)\n- [examples/config-file](examples/config-file)\n\n### Plugin\n\nA textlint plugin is a set of rules and rulesConfig or customize parser.\n\nTo enable plugin, put the \"plugin-name\" into `.textlinrc`.\n\n<!-- textlint-disable -->\n\n```js\n// `.textlinrc`\n{\n    \"plugins\": [\n        \"plugin-name\"\n    ],\n    // overwrite-plugins rules config\n    // <plugin>/<rule>\n    \"rules\": {\n        \"plugin-name/rule-name\" : false\n    }\n}\n```\n\n<!-- textlint-enable -->\n\n:information_source: See [docs/plugin.md](docs/plugin.md)\n\n### Supported file formats\n\ntextlint supports Markdown and plain text by default.\n\nInstall **Processor Plugin** and add new file format support.\n\nFor example, if you want to lint HTML, use [textlint-plugin-html](https://github.com/textlint/textlint-plugin-html \"textlint-plugin-html\") as a plugin.\n\n    npm install textlint-plugin-html\n\nAdd `\"html\"` to `.textlintrc`\n\n```\n{\n    \"plugins\": [\n        \"html\"\n    ]\n}\n```\n\nRun textlint on `.html` files:\n\n  textlint index.html\n\n- Example: [examples/html-plugin](examples/html-plugin)\n- Documentation: [docs/plugin.md](docs/plugin.md)\n\nOptional supported file types:\n\n- HTML: [textlint-plugin-html](https://github.com/textlint/textlint-plugin-html \"textlint-plugin-html\")\n- reStructuredText: [textlint-plugin-rst](https://github.com/jimo1001/textlint-plugin-rst \"textlint-plugin-rst\")\n- AsciiDoc/Asciidoctor: [textlint-plugin-asciidoc-loose](https://github.com/azu/textlint-plugin-asciidoc-loose \"textlint-plugin-asciidoc-loose\")\n- Re:VIEW: [textlint-plugin-review](https://github.com/orangain/textlint-plugin-review \"textlint-plugin-review\")\n\nSee [Processor Plugin List](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule#processor-plugin-list \"Processor Plugin List\") for details.\n\n\n### Rules list :green_heart:\n\ntextlint has not built-in rules, but there are 100+ pluggable rules:\n\n- [textlint-rule-no-todo](https://github.com/azu/textlint-rule-no-todo)\n- [textlint-rule-max-number-of-lines](https://github.com/azu/textlint-rule-max-number-of-lines)\n- [textlint-rule-common-misspellings](https://github.com/io-monad/textlint-rule-common-misspellings)\n- [etc...](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule)\n\nSee [A Collection of textlint rule · textlint/textlint Wiki](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule \"Collection of textlint rule · textlint/textlint Wiki\") for more details.\n\n\nIf you create a new rule, and add it to the wiki :)\n\n### Fixable\n\n[![textlint rule](https://img.shields.io/badge/textlint-fixable-green.svg?style=social)](https://textlint.github.io/)\n\nSome rules are fixable using the `--fix` command line flag.\n\n``` sh\n$ textlint --fix README.md\n# As a possible, textlint fix the content.\n```\n\n![fixable-error](./docs/assets/fixable-error.png)\n\nAlso, support [dry run](https://en.wikipedia.org/wiki/Dry_run_(testing) \"dry run\") mode.\n\n```\n$ textlint --fix --dry-run --format diff README.md\n# show the difference between fixed content and original content.\n```\n\nYou can copy and paste to your README.\n\n```markdown\n[![textlint fixable rule](https://img.shields.io/badge/textlint-fixable-green.svg?style=social)](https://textlint.github.io/)\n```\n\n### Built-in formatters\n\nUse the following formatters:\n\n- stylish (defaults)\n- compact\n- checkstyle\n- jslint-xml\n- junit\n- tap\n- table\n- pretty-error\n- json\n- unix\n\ne.g. use `pretty-error` formatter:\n\n```\n$ textlint -f pretty-error file.md\n```\n\nMore details in [@textlint/linter-formatter](./packages/@textlint/linter-formatter \"@textlint/linter-formatter\").\n\n## Use as node module\n\nYou can use textlint as node module.\n\n```\n$ npm install textlint --save-dev\n```\n\nMinimal usage:\n\n```js\nimport { TextLintEngine } from \"textlint\";\nconst engine = new TextLintEngine({\n    rulePaths: [\"path/to/rule-dir\"]\n});\nengine.executeOnFiles([\"README.md\"]).then(results => {\n    console.log(results[0].filePath); // => \"README.md\"\n    // messages are `TextLintMessage` array.\n    console.log(results[0].messages);\n    /*\n    [\n        {\n            id: \"rule-name\",\n            message:\"lint message\",\n            line: 1, // 1-based columns(TextLintMessage)\n            column:1 // 1-based columns(TextLintMessage)\n        }\n    ]\n     */\n    if (engine.isErrorResults(results)) {\n        const output = engine.formatResults(results);\n        console.log(output);\n    }\n});\n```\n\nLow level usage:\n\n```js\nimport { textlint } from \"textlint\";\ntextlint.setupRules({\n    // rule-key : rule function(see docs/rule.md)\n    \"rule-key\"(context) {\n        const exports = {};\n        exports[context.Syntax.Str] = function(node) {\n            context.report(node, new context.RuleError(\"error message\"));\n        };\n        return exports;\n    }\n});\ntextlint.lintMarkdown(\"# title\").then(results => {\n    console.log(results[0].filePath); // => \"README.md\"\n    console.log(results[0].messages); // => [{message:\"lint message\"}]\n});\n```\n\nMore details on:\n\n- See [docs/use-as-modules.md](docs/use-as-modules.md)\n\n\n## Conclusion\n\ntextlint has four extensible points:\n\n- [rule](docs/rule.md)\n    - rule is a rule for linting.\n- [filter rule](docs/filter-rule.md)\n    - filter rule is a rule for filtering result of errors.\n- [rule-preset](docs/rule-preset.md)\n    - rule-preset contains rules.\n- [plugin](docs/plugin.md)\n    - plugin contains a processor.\n\n![rule-preset-plugin](docs/assets/rule-preset-plugin.png)\n\n## FAQ: How to create rules?\n\nPlease see docs/\n\n- [docs/txtnode.md](docs/txtnode.md)\n    - What is TxtNode?\n- [docs/rule.md](docs/rule.md)\n    - How to create rules?\n    - Tutorial: creating `no-todo` rule.\n- [docs/rule-advanced.md](docs/rule-advanced.md)\n    - Advanced tutorial for creating rule.\n\n## FAQ: How to suppress error by comments like `<!-- textlint-disable -->`?\n\nYou can use filter rule like [textlint-filter-rule-comments](https://github.com/textlint/textlint-filter-rule-comments \"textlint-filter-rule-comments\").\n\nPlease see [docs/configuring.md](docs/configuring.md) for more details.\n\n## Integrations\n\n### App\n\n- [textlint-app](https://github.com/textlint/textlint-app \"textlint-app\")\n  - Standalone cross platform app. No need Node.js environment.\n\n### Build Systems\n\n- gulp plugin\n  - [gulp-textlint](https://github.com/textlint/gulp-textlint \"gulp-textlint\")\n- Grunt plugin\n  - [grunt-textlint](https://github.com/textlint/grunt-textlint \"grunt-textlint\")\n\n### Editors\n\n- Atom Editor\n  - [1000ch/linter-textlint](https://github.com/1000ch/linter-textlint \"1000ch/linter-textlint\")\n- SublimeText\n  - [joeybaker/sublimelinter-textlint](https://github.com/joeybaker/sublimelinter-textlint)\n- Vim\n  - [vim-textlint](https://github.com/heavenshell/vim-textlint \"vim-textlint\")\n  - [scrooloose/syntastic](https://github.com/vim-syntastic/syntastic \"scrooloose/syntastic\")\n    - See [Markdown](https://github.com/vim-syntastic/syntastic/wiki/Markdown \"Markdown\"), [Text](https://github.com/vim-syntastic/syntastic/wiki/Text \"Text\") and [HTML](https://github.com/vim-syntastic/syntastic/wiki/HTML \"HTML\") of [scrooloose/syntastic Wiki](https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checkers \"Syntax Checkers · scrooloose/syntastic Wiki\")\n- VS Code\n  - [taichi/vscode-textlint](https://github.com/taichi/vscode-textlint)\n- [micro](https://github.com/zyedidia/micro \"micro\")\n  - [hidaruma/micro-textlint-plugin](https://github.com/hidaruma/micro-textlint-plugin \"hidaruma/micro-textlint-plugin: textlint plugin for micro-editor\")\n- NetBeans\n  - [netbeans-textlint-plugin](https://github.com/junichi11/netbeans-textlint-plugin \"netbeans-textlint-plugin\")\n\n### Browser\n\n- Chrome Extension\n  - [Chrome: textlint-proofreader](https://chrome.google.com/webstore/detail/textlint-proofreader/hdongmdneapmhfblomidbafplpanpdmm)\n  - [io-monad/textlint-chrome-extension: textlint Chrome Extension](https://github.com/io-monad/textlint-chrome-extension \"io-monad/textlint-chrome-extension: textlint Chrome Extension\")\n\n### Other\n\n- [Pronto](https://github.com/prontolabs/pronto \"Pronto\"): [pronto-textlint](https://github.com/seikichi/pronto-textlint \"pronto-textlint\")\n- [reviewdog](https://github.com/haya14busa/reviewdog \"reviewdog\"): [azu/textlint-reviewdog-example](https://github.com/azu/textlint-reviewdog-example \"azu/textlint-reviewdog-example: textlint + reviewdog example project\")\n\n## Who's using textlint?\n\n- [survivejs/webpack-book](https://github.com/survivejs/webpack-book \"survivejs/webpack-book: From apprentice to master (CC BY-NC-ND)\")\n- [hoodiehq/hoodie](https://github.com/hoodiehq/hoodie \"hoodiehq/hoodie\")\n- [asciidwango/js-primer](https://github.com/asciidwango/js-primer \"asciidwango/js-primer: JavaScriptの入門書\")\n- [vuejs-jp/vuejs.org](https://github.com/vuejs-jp/jp.vuejs.org \"vuejs-jp/vuejs.org\")\n\n## Packages\n\nThis repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna). That means that we actually publish [several packages](./packages) to npm from the same codebase, including:\n\n### Core\n\nThese modules are parts of textlint.\n\n| Package                                  | Version                                  | Description                              |\n| :--------------------------------------- | :--------------------------------------- | :--------------------------------------- |\n| [`textlint`](./packages/textlint)        | [![npm](https://img.shields.io/npm/v/textlint.svg?style=flat-square)](https://www.npmjs.com/package/textlint) | textlint command line tool itself        |\n| [`@textlint/kernel`](./packages/@textlint/kernel) | [![npm](https://img.shields.io/npm/v/@textlint/kernel.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/kernel) | textlint main logic module. It is universal JavaScript. |\n| [`@textlint/linter-formatter`](./packages/@textlint/linter-formatter) | [![npm](https://img.shields.io/npm/v/@textlint/linter-formatter.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/linter-formatter) | textlint output formatter                |\n| [`@textlint/fixer-formatter`](./packages/@textlint/fixer-formatter) | [![npm](https://img.shields.io/npm/v/@textlint/fixer-formatter.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/fixer-formatter) | textlint output formatter for fixer      |\n| [`@textlint/textlint-plugin-markdown`](./packages/@textlint/textlint-plugin-markdown) | [![npm](https://img.shields.io/npm/v/@textlint/textlint-plugin-markdown.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/textlint-plugin-markdown) | markdown support for textlint            |\n| [`@textlint/textlint-plugin-text`](./packages/@textlint/textlint-plugin-text) | [![npm](https://img.shields.io/npm/v/@textlint/textlint-plugin-text.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/textlint-plugin-text) | plain text support for textlint          |\n| [`@textlint/ast-tester`](./packages/@textlint/ast-tester) | [![npm](https://img.shields.io/npm/v/@textlint/ast-tester.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-tester) | Compliance tests for textlint's AST      |\n| [`@textlint/markdown-to-ast`](./packages/@textlint/markdown-to-ast) | [![npm](https://img.shields.io/npm/v/@textlint/markdown-to-ast.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/markdown-to-ast) | markdown parser                          |\n| [`@textlint/ast-traverse`](./packages/@textlint/ast-traverse) | [![npm](https://img.shields.io/npm/v/@textlint/ast-traverse.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-traverse) | TxtNode traverse library                 |\n| [`@textlint/text-to-ast`](./packages/@textlint/text-to-ast)    | [![npm](https://img.shields.io/npm/v/@textlint/text-to-ast.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/text-to-ast) | plain text parser                        |\n\n\n### Rule/Plugin helper\n\nThese modules are useful for textlint rule/plugin author.\n\n| Package                                  | Version                                  | Description                              |\n| :--------------------------------------- | :--------------------------------------- | :--------------------------------------- |\n| [`@textlint/ast-node-types`](./packages/@textlint/ast-node-types) | [![npm](https://img.shields.io/npm/v/@textlint/ast-node-types.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-node-types) | [textlint AST(Abstract Syntax Tree)](./docs/txtnode.md) type definition |\n| [`textlint-tester`](./packages/textlint-tester) | [![npm](https://img.shields.io/npm/v/textlint-tester.svg?style=flat-square)](https://www.npmjs.com/package/textlint-tester) | textlint rule testing tools              |\n| [`textlint-scripts`](https://github.com/textlint/textlint-scripts) | [![npm](https://img.shields.io/npm/v/textlint-scripts.svg?style=flat-square)](https://www.npmjs.com/package/textlint-scripts) | textlint rule npm run-scripts            |\n| [`create-textlint-rule`](https://github.com/textlint/create-textlint-rule) | [![npm](https://img.shields.io/npm/v/create-textlint-rule.svg?style=flat-square)](https://www.npmjs.com/package/create-textlint-rule) | create textlint rule with no build configuration |\n\n\n### Integrations\n\nThese modules are useful integration with textlint.\n\n| Package                                  | Version                                  | Description              |\n| :--------------------------------------- | :--------------------------------------- | :----------------------- |\n| [`gulp-textlint`](./packages/gulp-textlint) | [![npm](https://img.shields.io/npm/v/gulp-textlint.svg?style=flat-square)](https://www.npmjs.com/package/gulp-textlint) | gulp plugin for textlint |\n\n\n### Internal\n\nThese modules are internal usage in the monorepo.\n\n| Package                                  | Version                                  | Description          |\n| :--------------------------------------- | :--------------------------------------- | :------------------- |\n| [`@textlint/feature-flag`](./packages/@textlint/feature-flag) | [![npm](https://img.shields.io/npm/v/@textlint/feature-flag.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/feature-flag) | feature flag manager |\n\n\n## Semantic Versioning Policy\n\ntextlint project follow [Semantic Versioning](https://semver.org/ \"Semantic Versioning\").\nHowever, textlint is not different with most semver project.\n\n- Patch release (intended to not break your lint build)\n    - A bug fix to the CLI or core (including formatters).\n    - Improvements to documentation.\n    - Non-user-facing changes such as refactoring.\n    - Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).\n- Minor release (might break your lint build)\n    - A new option.\n    - An existing rule is deprecated.\n    - A new CLI capability is created.\n    - New public API are added (new classes, new methods, new arguments to existing methods, etc.).\n        - It might break type interface(`.d.ts`)\n    - A new formatter is created.\n- Major release (break your lint build)\n    - A new option to an existing rule that results in ESLint reporting more errors by default.\n    - An existing formatter is removed.\n    - Part of the public API is removed or changed in an incompatible way.\n\n## Contributing\n\nFor bugs and feature requests, [please create an issue](https://github.com/textlint/textlint/issues).\n\nPull requests is always welcome.\n\nFor more details, see [Contributing Guide](docs/CONTRIBUTING.md).\n\n## License\n\nMIT © azu\n\nCopy some code from ESLint.\n\n    ESLint\n    Copyright (c) 2013 Nicholas C. Zakas. All rights reserved.\n    https://github.com/eslint/eslint/blob/master/LICENSE\n\n## Logos & Icons\n\nDownload from [textlint/media](https://github.com/textlint/media \"textlint/media: Official logo and icon.\").\n\n## Related Work\n\n<!-- textlint-disable -->\n\n[SCG: TextLint](http://scg.unibe.ch/research/textlint \"SCG: TextLint\") is similar project.\n\n[SCG: TextLint](http://scg.unibe.ch/research/textlint \"SCG: TextLint\")'s place is equal to my `textlint`(Fortuitously, project's name is the same too!).\n\n![concept](http://monosnap.com/image/Gr9CGbkSjl1FXEL0LIWzNDAj3c24JT.png)\n\nvia [Natural Language Checking with Program Checking Tools](https://www.slideshare.net/renggli/text-lint \"Natural Language Checking with Program Checking Tools\")\n\n## Acknowledgements\n\nThanks to [ESLint](https://eslint.org/ \"ESLint\").\n\n<!-- textlint-enable -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7486:40B0C:180114:5EA6C8:6AB92E9E"},"text_sha256":"44da6ad0df5fbb4ee200f90e085d82b6ebea4e8fb290c7cacfcb8aec265f3083"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1410","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081D:2D7D17:17A91D1:1BD23C8:6AB92EA1"},"commit":{"sha":"b795f2e988e2414e161820112cf3011c5a94b4d5","url":"https://github.com/textlint/textlint/commit/b795f2e988e2414e161820112cf3011c5a94b4d5","date":"2026-06-30T06:03:48Z","author_date":"2026-06-30T06:03:48Z","committer_date":"2026-06-30T06:03:48Z","tree_sha":"d76938dc8b72ce6047b8179ca1e16c83be6eb99b","message_first_line":"chore(deps): update dependency js-yaml to ^4.3.0 (#2080)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1409","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F0:71C58:17DE32E:1C09308:6AB92EA1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":25168,"blob_sha":"23e8f6b5cd9c36cdf554235e38508d8cfc1a8d92","priority":0}],"documents":[{"path":"README.md","size":25168,"blob_sha":"23e8f6b5cd9c36cdf554235e38508d8cfc1a8d92","priority":0,"status":200,"text":"# textlint\n\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://textlint.org/media/banner/banner_710x256.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://textlint.org/media/logo/spaced/textlint-logo.png\">\n  <img alt=\"textlint logo\" src=\"https://textlint.org/media/logo/spaced/textlint-logo.png\">\n<\/picture>\n\n> The pluggable linting tool for natural language.\n\ntextlint is similar to [ESLint](http://eslint.org/ \"ESLint\"), but it's for use with natural language.\n\n<!-- textlint-disable -->\n\n[![GitHub Actions Build Status](https://github.com/textlint/textlint/workflows/CI/badge.svg)](https://github.com/textlint/textlint/actions?workflow=CI)\n\n<!-- textlint-enable -->\n\n## Website\n\n- Online demo\n- Searchable documents\n- Release blog\n\nVisit [https://textlint.org/](https://textlint.org/).\n\n## Features\n\n- No bundled rules.\n- To use a rule, install a textlint rule via npm.\n    - `npm install textlint-rule-xxx`.\n    - See [collection of textlint rules](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule \"Collection of textlint rule · textlint/textlint Wiki\")\n- [Markdown](./packages/@textlint/textlint-plugin-markdown) and [plain text](./packages/@textlint/textlint-plugin-text) are supported by default. Support is available for [HTML](https://github.com/textlint/textlint-plugin-html) and [other file formats](https://github.com/textlint/textlint#supported-file-formats) via plugins.\n- Supports the use of custom formatters and formatter bundles [formatter(reporter)](./packages/@textlint/linter-formatter)\n\n## Quick Tour\n\nFor a quick tour of textlint, checkout our [Getting Started](./docs/getting-started.md) guide :squirrel:\n\n## Installation\n\nYou can install the `textlint` command using npm:\n\n```\n$ npm install textlint --save-dev\n```\n\n**Requirements**:\n\n- Node.js 20+\n\nIf you're not sure what version of Node you're running, you can run `node -v` in your console to find out.\n\n**:warning: Warning:**\n\n- If you have installed `textlint` globally you must install each reference rule globally as well.\n- If you have installed `textlint` locally you must install each rule locally as well.\n\nWe recommend installing `textlint` locally.\n\n### For Node.js beginners\n\nIf you've never used Node.js and npm, please see the following:\n\n- [Installing Node.js and updating npm | npm Documentation](https://docs.npmjs.com/getting-started/installing-node \"02 - Installing Node.js and updating npm | npm Documentation\")\n\n## Usage\n\n![screenshot lint pretty-error](docs/assets/screenshot-lint-pretty-error.png)\n\ntextlint has no default rules!!\n\nYou can run textlint with `.textlintrc.json` config file.\n\n```sh\n# Install textlint and rules into local directory\nnpm install --save-dev textlint textlint-rule-no-todo\n```\n\n`npx textlint --init` command creates `.textlintrc.json` file from installed rules.\n\n```bash\nnpx textlint --init\n```\n\n`.textlintrc.json` will be created like this:\n\n```json\n{\n    \"rules\": {\n        \"no-todo\": true\n    }\n}\n```\n\nLint files via textlint:\n\n```sh\nnpx textlint ./README.md\n```\n\n`textlint` load `.textlintrc.json` from current directory and lint `README.md`.\n\n## CLI\n\nRun `npx textlint -h` for information on how to use the CLI.\n\n```\n$ textlint [options] file.md [file|dir|glob*]\n\nOptions:\n  -h, --help                  Show help.\n  -c, --config path::String   Use configuration from this file or sharable config.\n  --ignore-path path::String  Specify path to a file containing patterns that describes files to ignore. - default: .textlintignore\n  --init                      Create the config file if not existed. - default: false\n  --fix                       Automatically fix problems\n  --dry-run                   Enable dry-run mode for --fix. Only show result, don't change the file.\n  --debug                     Outputs debugging information\n  --print-config              Print the config object to stdout\n  -v, --version               Outputs the version number.\n\nUsing stdin:\n  --stdin                     Lint text provided on <STDIN>. - default: false\n  --stdin-filename String     Specify filename to process STDIN as\n\nOutput:\n  -o, --output-file path::String  Enable report to be written to a file.\n  -f, --format String         Use a specific output format.\n\n                              Available formatter          : checkstyle, compact, github, jslint-xml, json, junit, pretty-error, stylish, table, tap, unix\n\n                              Available formatter for --fix: compats, diff, fixed-result, json, stylish - default: stylish\n  --no-color                  Disable color in piped output.\n  --quiet                     Report errors only. - default: false\n\nSpecifying rules and plugins:\n  --no-textlintrc             Disable .textlintrc\n  --plugin [String]           Set plugin package name\n  --rule [String]             Set rule package name\n  --preset [String]           Set preset package name and load rules from preset package.\n  --rulesdir [path::String]   Use additional rules from this directory\n\nCaching:\n  --cache                     Only check changed files - default: false\n  --cache-location path::String  Path to the cache file or directory - default: .textlintcache\n\nExperimental:\n  --experimental              Enable experimental flag.Some feature use on experimental.\n  --rules-base-directory path::String  Set module base directory. textlint load modules(rules/presets/plugins) from the base directory.\n  --mcp                       Start textlint as the Model Context Protocol (MCP) server.\n```\n\nWhen running textlint, you can target files to lint using the glob patterns.\nMake sure that you enclose any glob parameter you pass in quotes.\n\n```sh\n$ npx textlint \"docs/**\"\n```\n\nFor more details, see [CLI](./docs/cli.md) documentation.\n\n- Documentation: [CLI](./docs/cli.md)\n\nExample:\n\n- :information_source: See [examples/cli](examples/cli)\n\n## .textlintrc\n\n`.textlintrc` is config file that is loaded as JSON, YAML or JS via [azu/rc-config-loader](https://github.com/azu/rc-config-loader).\n\nRunning textlint with the following arguments\n\n```\n$ npx textlint --rule no-todo --rule very-nice-rule README.md\n```\n\nis equivalent to running `textlint README.md` in a directory with a `.textlintrc.json` containing the following json\n\n```json\n{\n  \"rules\": {\n    \"no-todo\": true,\n    \"very-nice-rule\": true\n  }\n}\n```\n\nYou can also configure options for specific rules in your `.textlintrc.json` file.\n\n```json\n{\n  \"rules\": {\n    \"no-todo\": false, // disable\n    \"very-nice-rule\": {\n        \"key\": \"value\"\n    }\n  }\n}\n```\n\nFor example here we pass the options (\"key\": \"value\") to `very-nice-rule`.\n\nOptions can be specified in your `.textlintrc.json` file as follows:\n\n<!-- textlint-disable -->\n\n```js\n{\n  // Allow to comment in JSON\n  \"rules\": {\n    \"<rule-name>\": true | false | object\n  }\n}\n```\n\n<!-- textlint-enable -->\n\n:information_source: for more details see\n\n- [docs/configuring](docs/configuring.md)\n- [examples/config-file](examples/config-file)\n\n### Plugin\n\nA textlint plugin is a set of rules and rulesConfig or customize parser.\n\nTo enable plugin, put the \"plugin-name\" into `.textlintrc.json`.\n\n<!-- textlint-disable -->\n\n```js\n// `.textlintrc.json`\n{\n    \"plugins\": [\n        \"plugin-name\"\n    ],\n    // overwrite-plugins rules config\n    // <plugin>/<rule>\n    \"rules\": {\n        \"plugin-name/rule-name\" : false\n    }\n}\n```\n\n<!-- textlint-enable -->\n\n:information_source: See [docs/plugin.md](docs/plugin.md)\n\n### Supported file formats\n\ntextlint supports Markdown and plain text by default.\n\nInstall **Processor Plugin** and add new file format support.\n\nFor example, if you want to lint HTML, use [textlint-plugin-html](https://github.com/textlint/textlint-plugin-html \"textlint-plugin-html\") as a plugin.\n\n    npm install textlint-plugin-html --save-dev\n\nAdd `\"html\"` to `.textlintrc.json`\n\n```\n{\n    \"plugins\": [\n        \"html\"\n    ]\n}\n```\n\nRun textlint on `.html` files:\n\n  textlint index.html\n\n- Example: [examples/html-plugin](examples/html-plugin)\n- Documentation: [docs/plugin.md](docs/plugin.md)\n\nOptional supported file types:\n\n- HTML: [textlint-plugin-html](https://github.com/textlint/textlint-plugin-html \"textlint-plugin-html\")\n- reStructuredText: [textlint-plugin-rst](https://github.com/jimo1001/textlint-plugin-rst \"textlint-plugin-rst\")\n  - Fork: [shiguredo/textlint-plugin-rst](https://github.com/shiguredo/textlint-plugin-rst)\n- AsciiDoc/Asciidoctor: [textlint-plugin-asciidoc-loose](https://github.com/azu/textlint-plugin-asciidoc-loose \"textlint-plugin-asciidoc-loose\")\n- Re:VIEW: [textlint-plugin-review](https://github.com/orangain/textlint-plugin-review \"textlint-plugin-review\")\n- Org-mode: [textlint-plugin-org](https://github.com/kijimaD/textlint-plugin-org \"textlint-plugin-org\")\n\nSee [Processor Plugin List](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule#processor-plugin-list \"Processor Plugin List\") for details.\n\n\n### Rules list :green_heart:\n\n- Check it: [A Collection of textlint rule · textlint/textlint Wiki](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule \"Collection of textlint rule · textlint/textlint Wiki\")\n\ntextlint has no built-in rules, but there are 100+ pluggable rules:\n\n- [textlint-rule-no-todo](https://github.com/textlint-rule/textlint-rule-no-todo)\n- [textlint-rule-max-number-of-lines](https://github.com/azu/textlint-rule-max-number-of-lines)\n- [textlint-rule-common-misspellings](https://github.com/io-monad/textlint-rule-common-misspellings)\n- [etc...](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule)\n\nSee [A Collection of textlint rule · textlint/textlint Wiki](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule \"Collection of textlint rule · textlint/textlint Wiki\") for more details.\n\nIf you create a new rule, please add it to the wiki :)\n\n### Fixable\n\n[![textlint rule](https://img.shields.io/badge/textlint-fixable-green.svg?style=social)](https://textlint.org/)\n\nSome rules are fixable using the `--fix` command line flag.\n\n``` sh\n$ npx textlint --fix README.md\n# If possible, textlint will fix the content.\n```\n\n![fixable-error](./docs/assets/fixable-error.png)\n\nAlso, support [dry run](https://en.wikipedia.org/wiki/Dry_run_(testing) \"dry run\") mode.\n\n```\n$ npx textlint --fix --dry-run --format diff README.md\n# show the difference between fixed content and original content.\n```\n\nYou can copy and paste to your README.\n\n```markdown\n[![textlint fixable rule](https://img.shields.io/badge/textlint-fixable-green.svg?style=social)](https://textlint.org/)\n```\n\n### Built-in formatters\n\nUse the following formatters:\n\n- stylish (defaults)\n- compact\n- checkstyle\n- github\n- jslint-xml\n- junit\n- tap\n- table\n- pretty-error\n- json\n- unix\n\ne.g. use `pretty-error` formatter:\n\n```\n$ npx textlint -f pretty-error file.md\n```\n\nMore details in [@textlint/linter-formatter](./packages/@textlint/linter-formatter \"@textlint/linter-formatter\").\n\n## Use as node module\n\nYou can use textlint as node module.\n\n```\n$ npm install textlint --save-dev\n```\n\nMinimal usage:\n\n```js\nimport { createLinter, loadTextlintrc, loadLinterFormatter } from \"textlint\";\nconst descriptor = await loadTextlintrc();\nconst linter = createLinter({ descriptor });\nconst results = await linter.lintFiles([\"*.md\"]);\n// textlint has two types formatter sets for linter and fixer\nconst formatter = await loadLinterFormatter({ formatterName: \"stylish\" });\nconst output = formatter.format(results);\nconsole.log(output);\n```\n\nFor more details, please read the following documents:\n\n- See [docs/use-as-modules.md](docs/use-as-modules.md)\n\n[@textlint/kernel](./packages/@textlint/kernel \"@textlint/kernel\") is a low level API for textlint.\nIt is useful for the browser or non-Node.js environments.\n\n```js\nimport { TextlintKernel } from \"@textlint/kernel\";\nconst kernel = new TextlintKernel();\nconst options = {\n    filePath: \"/path/to/file.md\",\n    ext: \".md\",\n    plugins: [\n        {\n            pluginId: \"markdown\",\n            plugin: require(\"@textlint/textlint-plugin-markdown\")\n        }\n    ],\n    rules: [\n        {\n            ruleId: \"no-todo\",\n            rule: require(\"textlint-rule-no-todo\").default\n        }\n    ]\n};\nkernel.lintText(\"TODO: text\", options).then(result => {\n    assert.ok(typeof result.filePath === \"string\");\n    assert.ok(result.messages.length === 1);\n});\n```\n\n\n\n## Conclusion\n\ntextlint has four extensible points:\n\n- [rule](docs/rule.md)\n    - rule is a rule for linting.\n- [filter rule](docs/filter-rule.md)\n    - filter rule is a rule for filtering result of errors.\n- [rule-preset](docs/rule-preset.md)\n    - rule-preset contains rules.\n- [plugin](docs/plugin.md)\n    - plugin contains a processor.\n\n![rule-preset-plugin](docs/assets/rule-preset-plugin.png)\n\n## FAQ: How to create rules?\n\nPlease see docs/\n\n- [docs/txtnode.md](docs/txtnode.md)\n    - What is TxtNode?\n- [docs/rule.md](docs/rule.md)\n    - How to create rules?\n    - Tutorial: creating `no-todo` rule.\n- [docs/rule-advanced.md](docs/rule-advanced.md)\n    - Advanced tutorial for creating rule.\n\n## FAQ: How to suppress error by comments like `<!-- textlint-disable -->`?\n\nYou can use filter rule like [textlint-filter-rule-comments](https://github.com/textlint/textlint-filter-rule-comments \"textlint-filter-rule-comments\").\n\nPlease see [Ignoring Text · textlint](https://textlint.org/docs/ignore.html) for more details.\n\n## Integrations\n\nFor more details, see [integrations document](./docs/integrations.md).\n\n### AI Assistants (MCP)\n\ntextlint can be used as a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server, enabling AI assistants to interact with textlint directly:\n\n```bash\nnpx textlint --mcp\n```\n\nSupported editors:\n- VS Code with GitHub Copilot\n- Cursor\n- Windsurf\n- etc.\n\nFor setup instructions, see [MCP Setup Guide](./docs/mcp.md).\n\n### App\n\n- [textlint-app](https://github.com/textlint/textlint-app \"textlint-app\")\n  - Standalone cross platform app. No need Node.js environment.\n\n### Build Systems\n\n- gulp plugin\n  - [gulp-textlint](https://github.com/textlint/gulp-textlint \"gulp-textlint\")\n- Grunt plugin\n  - [grunt-textlint](https://github.com/textlint/grunt-textlint \"grunt-textlint\")\n\n### Editors\n\n- Atom Editor\n  - [1000ch/linter-textlint](https://github.com/1000ch/linter-textlint \"1000ch/linter-textlint\")\n- SublimeText\n  - [joeybaker/sublimelinter-textlint](https://github.com/joeybaker/sublimelinter-textlint)\n- Vim\n  - [vim-textlint](https://github.com/heavenshell/vim-textlint \"vim-textlint\")\n  - [scrooloose/syntastic](https://github.com/vim-syntastic/syntastic \"scrooloose/syntastic\")\n    - See [Markdown](https://github.com/vim-syntastic/syntastic/wiki/Markdown \"Markdown\"), [Text](https://github.com/vim-syntastic/syntastic/wiki/Text \"Text\") and [HTML](https://github.com/vim-syntastic/syntastic/wiki/HTML \"HTML\") of [scrooloose/syntastic Wiki](https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checkers \"Syntax Checkers · scrooloose/syntastic Wiki\")\n- VS Code\n  - [textlint/vscode-textlint](https://github.com/textlint/vscode-textlint)\n- [micro](https://github.com/zyedidia/micro \"micro\")\n  - [hidaruma/micro-textlint-plugin](https://github.com/hidaruma/micro-textlint-plugin \"hidaruma/micro-textlint-plugin: textlint plugin for micro-editor\")\n- NetBeans\n  - [netbeans-textlint-plugin](https://github.com/junichi11/netbeans-textlint-plugin \"netbeans-textlint-plugin\")\n\n### Browser\n\n- Chrome Extension\n  - [Chrome: textlint-proofreader](https://chrome.google.com/webstore/detail/textlint-proofreader/hdongmdneapmhfblomidbafplpanpdmm)\n  - [io-monad/textlint-chrome-extension: textlint Chrome Extension](https://github.com/io-monad/textlint-chrome-extension \"io-monad/textlint-chrome-extension: textlint Chrome Extension\")\n\n### Other\n\n- [Pronto](https://github.com/prontolabs/pronto \"Pronto\"): [pronto-textlint](https://github.com/seikichi/pronto-textlint \"pronto-textlint\")\n- [reviewdog](https://github.com/reviewdog/reviewdog \"reviewdog\"): [azu/textlint-reviewdog-example](https://github.com/azu/textlint-reviewdog-example \"azu/textlint-reviewdog-example: textlint + reviewdog example project\")\n\n## Who's using textlint?\n\n- [survivejs/webpack-book](https://github.com/survivejs/webpack-book \"survivejs/webpack-book: From apprentice to master (CC BY-NC-ND)\")\n- [hoodiehq/hoodie](https://github.com/hoodiehq/hoodie \"hoodiehq/hoodie\")\n- [asciidwango/js-primer](https://github.com/asciidwango/js-primer \"asciidwango/js-primer: JavaScriptの入門書\")\n- [vuejs-jp/vuejs.org](https://github.com/vuejs-jp/jp.vuejs.org \"vuejs-jp/vuejs.org\")\n- [cypress-io/cypress-documentation](https://github.com/cypress-io/cypress-documentation \"cypress-io/cypress-documentation: Cypress Documentation including Guides, API, Plugins, Examples, & FAQ. docs.cypress.io\")\n\n## Packages\n\nThis repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna). That means that we actually publish [several packages](./packages) to npm from the same codebase, including:\n\n### Core\n\nThese modules are parts of textlint.\n\n| Package                                  | Version                                  | Description                                             |\n| :--------------------------------------- | :--------------------------------------- |:--------------------------------------------------------|\n| [`textlint`](./packages/textlint)        | [![npm](https://img.shields.io/npm/v/textlint.svg?style=flat-square)](https://www.npmjs.com/package/textlint) | textlint command line tool itself                       |\n| [`@textlint/kernel`](./packages/@textlint/kernel) | [![npm](https://img.shields.io/npm/v/@textlint/kernel.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/kernel) | textlint main logic module. It is universal JavaScript. |\n| [`@textlint/linter-formatter`](./packages/@textlint/linter-formatter) | [![npm](https://img.shields.io/npm/v/@textlint/linter-formatter.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/linter-formatter) | textlint output formatter                               |\n| [`@textlint/fixer-formatter`](./packages/@textlint/fixer-formatter) | [![npm](https://img.shields.io/npm/v/@textlint/fixer-formatter.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/fixer-formatter) | textlint output formatter for fixer                     |\n| [`@textlint/textlint-plugin-markdown`](./packages/@textlint/textlint-plugin-markdown) | [![npm](https://img.shields.io/npm/v/@textlint/textlint-plugin-markdown.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/textlint-plugin-markdown) | markdown support for textlint                           |\n| [`@textlint/textlint-plugin-text`](./packages/@textlint/textlint-plugin-text) | [![npm](https://img.shields.io/npm/v/@textlint/textlint-plugin-text.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/textlint-plugin-text) | plain text support for textlint                         |\n| [`@textlint/ast-tester`](./packages/@textlint/ast-tester) | [![npm](https://img.shields.io/npm/v/@textlint/ast-tester.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-tester) | Compliance tests for textlint's AST                     |\n| [`@textlint/markdown-to-ast`](./packages/@textlint/markdown-to-ast) | [![npm](https://img.shields.io/npm/v/@textlint/markdown-to-ast.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/markdown-to-ast) | markdown parser                                         |\n| [`@textlint/ast-traverse`](./packages/@textlint/ast-traverse) | [![npm](https://img.shields.io/npm/v/@textlint/ast-traverse.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-traverse) | TxtNode traverse library                                |\n| [`@textlint/text-to-ast`](./packages/@textlint/text-to-ast)    | [![npm](https://img.shields.io/npm/v/@textlint/text-to-ast.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/text-to-ast) | plain text parser                                       |\n| [`@textlint/config-loader`](./packages/@textlint/config-loader)    | [![npm](https://img.shields.io/npm/v/@textlint/config-loader.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/config-loader) | Load .textlintrc config file                            |\n\n\n### Rule/Plugin helper\n\nThese modules are useful for textlint rule/plugin author.\n\n| Package                                                                    | Version                                                                                                                                       | Description                                                             |\n| :------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |\n| [`@textlint/ast-node-types`](./packages/@textlint/ast-node-types)          | [![npm](https://img.shields.io/npm/v/@textlint/ast-node-types.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/ast-node-types) | [textlint AST(Abstract Syntax Tree)](./docs/txtnode.md) type definition |\n| [`textlint-tester`](./packages/textlint-tester)                            | [![npm](https://img.shields.io/npm/v/textlint-tester.svg?style=flat-square)](https://www.npmjs.com/package/textlint-tester)                   | textlint rule testing tools                                             |\n| [`textlint-scripts`](./packages/textlint-scripts)                          | [![npm](https://img.shields.io/npm/v/textlint-scripts.svg?style=flat-square)](https://www.npmjs.com/package/textlint-scripts)                 | textlint rule npm run-scripts                                           |\n| [`create-textlint-rule`](https://github.com/textlint/create-textlint-rule) | [![npm](https://img.shields.io/npm/v/create-textlint-rule.svg?style=flat-square)](https://www.npmjs.com/package/create-textlint-rule)         | create textlint rule with no build configuration                        |\n\n\n### Integrations\n\nThese modules are useful integration with textlint.\n\n| Package                                  | Version                                  | Description              |\n| :--------------------------------------- | :--------------------------------------- | :----------------------- |\n| [`gulp-textlint`](./packages/gulp-textlint) | [![npm](https://img.shields.io/npm/v/gulp-textlint.svg?style=flat-square)](https://www.npmjs.com/package/gulp-textlint) | gulp plugin for textlint |\n\n\n### Internal\n\nThese modules are internal usage in the monorepo.\n\n| Package                                  | Version                                  | Description          |\n| :--------------------------------------- | :--------------------------------------- | :------------------- |\n| [`@textlint/feature-flag`](./packages/@textlint/feature-flag) | [![npm](https://img.shields.io/npm/v/@textlint/feature-flag.svg?style=flat-square)](https://www.npmjs.com/package/@textlint/feature-flag) | feature flag manager |\n\n\n## Semantic Versioning Policy\n\ntextlint project follow [Semantic Versioning](https://semver.org/ \"Semantic Versioning\").\nHowever, textlint is not different from most semver project.\n\n- Patch release (intended to not break your lint build)\n    - A bug fix to the CLI or core (including formatters).\n    - Improvements to documentation.\n    - Non-user-facing changes such as refactoring.\n    - Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).\n- Minor release (might break your lint build)\n    - A new option.\n    - An existing rule is deprecated.\n    - A new CLI capability is created.\n    - New public API are added (new classes, new methods, new arguments to existing methods, etc.).\n        - It might break type interface(`.d.ts`)\n    - A new formatter is created.\n- Major release (break your lint build)\n    - A new option to an existing rule that results in textlint reporting more errors by default.\n    - An existing formatter is removed.\n    - Part of the public API is removed or changed in an incompatible way.\n\n## Contributing\n\nFor bugs and feature requests, [please create an issue](https://github.com/textlint/textlint/issues).\n\nPull requests are always welcome.\n\nFor more details, see [Contributing Guide](docs/CONTRIBUTING.md).\n\n## License\n\nMIT © azu\n\nCopy some code from ESLint.\n\n    ESLint\n    Copyright (c) 2013 Nicholas C. Zakas. All rights reserved.\n    https://github.com/eslint/eslint/blob/master/LICENSE\n\n## Logos & Icons\n\nDownload from [textlint/media](https://github.com/textlint/media \"textlint/media: Official logo and icon.\").\n\n## Related Work\n\n<!-- textlint-disable -->\n\n- [SCG: TextLint](http://scg.unibe.ch/research/textlint \"SCG: TextLint\")\n\n## Acknowledgements\n\nThanks to [ESLint](https://eslint.org/ \"ESLint\").\n\n<a href=\"https://www.netlify.com\">\n  <img src=\"https://www.netlify.com/img/global/badges/netlify-light.svg\"/>\n<\/a>\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/textlint/textlint)\n\n<!-- textlint-enable -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B90:35999:17B8A5:5E5F19:6AB92EA0"},"text_sha256":"b0afcde3c01858fd40d8d15cd8000f72adc82ddcfc6fd137fc88d59f9da19177"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"readbeyond/aeneas","input_row":{"repository":"readbeyond/aeneas","url":"https://github.com/readbeyond/aeneas","name":"aeneas","owner":"readbeyond","description":"aeneas is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment)","language":"Python","license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0","license_osi_approved":"true","stars":2867,"issues":219,"created_at":"2015-05-11T11:19:46Z","updated_at":"2026-09-25T14:25:04Z","first_commit_at":"2015-05-12T09:18:49Z","last_commit_at":"2020-05-13T19:46:24Z","activity_months":60.07,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:34.662Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"readbeyond/aeneas","visibility":"public","created_at":"2015-05-11T11:19:46Z","updated_at":"2026-09-25T14:25:04Z","private":false,"fork":false,"archived":false,"stargazers_count":2867,"open_issues_count":37,"license_spdx_id":"AGPL-3.0","license_name":"GNU Affero General Public License v3.0"},"error":"","rate":{"github_remaining":"1408","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0871:71C58:17DE41D:1C0941E:6AB92EA2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1407","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0906:180242:181A2C3:1C44DE9:6AB92EA3"},"commit":{"sha":"9d95535ad63eef4a98530cfdff033b8c35315ee1","url":"https://github.com/readbeyond/aeneas/commit/9d95535ad63eef4a98530cfdff033b8c35315ee1","date":"2017-03-16T12:48:53Z","author_date":"2017-03-16T12:48:53Z","committer_date":"2017-03-16T12:48:53Z","tree_sha":"f718d893ea08d09d578bead0e8c617e5849ec81a","message_first_line":"Merge pull request #171 from readbeyond/devel"},"tree_request_status":200,"tree_rate":{"github_remaining":"1406","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C3:3BE445:17B8B65:1BE2381:6AB92EA3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16358,"blob_sha":"310edc10265f104ecff80cca8849707ca5337bac","priority":0},{"path":"README.rst","size":16754,"blob_sha":"21268bc5715b8982ba982b3f708dcb2fdfef9b42","priority":0}],"documents":[{"path":"README.md","size":16358,"blob_sha":"310edc10265f104ecff80cca8849707ca5337bac","priority":0,"status":200,"text":"# aeneas\n\n**aeneas** is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment).\n\n* Version: 1.7.3\n* Date: 2017-03-15\n* Developed by: [ReadBeyond](http://www.readbeyond.it/)\n* Lead Developer: [Alberto Pettarin](http://www.albertopettarin.it/)\n* License: the GNU Affero General Public License Version 3 (AGPL v3)\n* Contact: [aeneas@readbeyond.it](mailto:aeneas@readbeyond.it)\n* Quick Links: [Home](http://www.readbeyond.it/aeneas/) - [GitHub](https://github.com/readbeyond/aeneas/) - [PyPI](https://pypi.python.org/pypi/aeneas/) - [Docs](http://www.readbeyond.it/aeneas/docs/) - [Tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html) - [Benchmark](https://readbeyond.github.io/aeneas-benchmark/) - [Mailing List](https://groups.google.com/d/forum/aeneas-forced-alignment) - [Web App](http://aeneasweb.org)\n\n\n## Goal\n\n**aeneas** automatically generates a **synchronization map**\nbetween a list of text fragments\nand an audio file containing the narration of the text.\nIn computer science this task is known as\n(automatically computing a) **forced alignment**.\n\nFor example, given\n[this text file](https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.xhtml)\nand\n[this audio file](https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.mp3),\n**aeneas** determines, for each fragment, the corresponding time interval in the audio file:\n\n```\n1                                                     => [00:00:00.000, 00:00:02.640]\nFrom fairest creatures we desire increase,            => [00:00:02.640, 00:00:05.880]\nThat thereby beauty's rose might never die,           => [00:00:05.880, 00:00:09.240]\nBut as the riper should by time decease,              => [00:00:09.240, 00:00:11.920]\nHis tender heir might bear his memory:                => [00:00:11.920, 00:00:15.280]\nBut thou contracted to thine own bright eyes,         => [00:00:15.280, 00:00:18.800]\nFeed'st thy light's flame with self-substantial fuel, => [00:00:18.800, 00:00:22.760]\nMaking a famine where abundance lies,                 => [00:00:22.760, 00:00:25.680]\nThy self thy foe, to thy sweet self too cruel:        => [00:00:25.680, 00:00:31.240]\nThou that art now the world's fresh ornament,         => [00:00:31.240, 00:00:34.400]\nAnd only herald to the gaudy spring,                  => [00:00:34.400, 00:00:36.920]\nWithin thine own bud buriest thy content,             => [00:00:36.920, 00:00:40.640]\nAnd tender churl mak'st waste in niggarding:          => [00:00:40.640, 00:00:43.640]\nPity the world, or else this glutton be,              => [00:00:43.640, 00:00:48.080]\nTo eat the world's due, by the grave and thee.        => [00:00:48.080, 00:00:53.240]\n```\n\n![Waveform with aligned labels, detail](wiki/align.png)\n\nThis synchronization map can be output to file\nin several formats, depending on its application:\n\n* research: Audacity (AUD), ELAN (EAF), TextGrid;\n* digital publishing: SMIL for EPUB 3;\n* closed captioning: SubRip (SRT), SubViewer (SBV/SUB), TTML, WebVTT (VTT);\n* Web: JSON;\n* further processing: CSV, SSV, TSV, TXT, XML.\n\n\n## System Requirements, Supported Platforms and Installation\n\n### System Requirements\n\n1. a reasonably recent machine (recommended 4 GB RAM, 2 GHz 64bit CPU)\n2. [Python](https://python.org/) 2.7 (Linux, OS X, Windows) or 3.5 or later (Linux, OS X)\n3. [FFmpeg](https://www.ffmpeg.org/)\n4. [eSpeak](http://espeak.sourceforge.net/)\n5. Python packages `BeautifulSoup4`, `lxml`, and `numpy`\n6. Python headers to compile the Python C/C++ extensions (optional but strongly recommended)\n7. A shell supporting UTF-8 (optional but strongly recommended)\n\n### Supported Platforms\n\n**aeneas** has been developed and tested on **Debian 64bit**,\nwith **Python 2.7** and **Python 3.5**,\nwhich are the **only supported platforms** at the moment.\nNevertheless, **aeneas** has been confirmed to work on\nother Linux distributions, Mac OS X, and Windows.\nSee the\n[PLATFORMS file](https://github.com/readbeyond/aeneas/blob/master/wiki/PLATFORMS.md)\nfor details.\n\nIf installing **aeneas** natively on your OS proves difficult,\nyou are strongly encouraged to use\n[aeneas-vagrant](https://github.com/readbeyond/aeneas-vagrant),\nwhich provides **aeneas** inside a virtualized Debian image\nrunning under\n[VirtualBox](https://www.virtualbox.org/)\nand\n[Vagrant](http://www.vagrantup.com/),\nwhich can be installed on any modern OS (Linux, Mac OS X, Windows).\n\n### Installation\n\nAll-in-one installers are available for Mac OS X and Windows,\nand a Bash script for deb-based Linux distributions (Debian, Ubuntu)\nis provided in this repository.\nIt is also possible to download a VirtualBox+Vagrant virtual machine.\nPlease see the\n[INSTALL file](https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md)\nfor detailed, step-by-step installation procedures for different operating systems.\n\nThe generic OS-independent procedure is simple:\n\n1. **Install**\n   [Python](https://python.org/) (2.7.x preferred),\n   [FFmpeg](https://www.ffmpeg.org/), and\n   [eSpeak](http://espeak.sourceforge.net/)\n\n2. Make sure the following **executables** can be called from your **shell**:\n   `espeak`, `ffmpeg`, `ffprobe`, `pip`, and `python`\n\n3. First install `numpy` with `pip` and then `aeneas` (this order is important):\n\n    ```bash\n    pip install numpy\n    pip install aeneas\n    ```\n\n4. To **check** whether you installed **aeneas** correctly, run:\n\n   ```bash\n    python -m aeneas.diagnostics\n    ```\n\n\n## Usage\n\n1. Run without arguments to get the **usage message**:\n\n    ```bash\n    python -m aeneas.tools.execute_task\n    python -m aeneas.tools.execute_job\n    ```\n\n    You can also get a list of **live examples**\n    that you can immediately run on your machine\n    thanks to the included files:\n\n    ```bash\n    python -m aeneas.tools.execute_task --examples\n    python -m aeneas.tools.execute_task --examples-all\n    ```\n\n2. To **compute a synchronization map** `map.json` for a pair\n   (`audio.mp3`, `text.txt` in\n   [plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN)\n   text format), you can run:\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        text.txt \\\n        \"task_language=eng|os_task_file_format=json|is_text_type=plain\" \\\n        map.json\n    ```\n\n   (The command has been split into lines with `\\` for visual clarity;\n   in production you can have the entire command on a single line\n   and/or you can use shell variables.)\n\n   To **compute a synchronization map** `map.smil` for a pair\n   (`audio.mp3`,\n   [page.xhtml](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.UNPARSED)\n   containing fragments marked by `id` attributes like `f001`),\n   you can run:\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        page.xhtml \\\n        \"task_language=eng|os_task_file_format=smil|os_task_file_smil_audio_ref=audio.mp3|os_task_file_smil_page_ref=page.xhtml|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]+|is_text_unparsed_id_sort=numeric\" \\\n        map.smil\n    ```\n\n   As you can see, the third argument (the _configuration string_)\n   specifies the parameters controlling the I/O formats\n   and the processing options for the task.\n   Consult the\n   [documentation](http://www.readbeyond.it/aeneas/docs/)\n   for details.\n\n3. If you have several tasks to process,\n   you can create a **job container**\n   to batch process them:\n\n    ```bash\n    python -m aeneas.tools.execute_job job.zip output_directory\n    ```\n\n   File `job.zip` should contain a `config.txt` or `config.xml`\n   configuration file, providing **aeneas**\n   with all the information needed to parse the input assets\n   and format the output sync map files.\n   Consult the\n   [documentation](http://www.readbeyond.it/aeneas/docs/)\n   for details.\n\nThe\n[documentation](http://www.readbeyond.it/aeneas/docs/)\ncontains a highly suggested\n[tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\nwhich explains how to use the built-in command line tools.\n\n\n## Documentation and Support\n\n* Documentation:\n  [http://www.readbeyond.it/aeneas/docs/](http://www.readbeyond.it/aeneas/docs/)\n* Command line tools tutorial:\n  [http://www.readbeyond.it/aeneas/docs/clitutorial.html](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\n* Library tutorial:\n  [http://www.readbeyond.it/aeneas/docs/libtutorial.html](http://www.readbeyond.it/aeneas/docs/libtutorial.html)\n* Old, verbose tutorial:\n  [A Practical Introduction To The aeneas Package](http://www.albertopettarin.it/blog/2015/05/21/a-practical-introduction-to-the-aeneas-package.html)\n* Mailing list:\n  [https://groups.google.com/d/forum/aeneas-forced-alignment](https://groups.google.com/d/forum/aeneas-forced-alignment)\n* Changelog:\n  [http://www.readbeyond.it/aeneas/docs/changelog.html](http://www.readbeyond.it/aeneas/docs/changelog.html)\n* High level description of how aeneas works:\n  [HOWITWORKS](https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md)\n* Development history:\n  [HISTORY](https://github.com/readbeyond/aeneas/blob/master/wiki/HISTORY.md)\n* Testing:\n  [TESTING](https://github.com/readbeyond/aeneas/blob/master/wiki/TESTING.md)\n* Benchmark suite:\n  [https://readbeyond.github.io/aeneas-benchmark/](https://readbeyond.github.io/aeneas-benchmark/)\n\n\n## Supported Features\n\n* Input text files in `parsed`, `plain`, `subtitles`, or `unparsed` (XML) format\n* Multilevel input text files in `mplain` and `munparsed` (XML) format\n* Text extraction from XML (e.g., XHTML) files using `id` and `class` attributes\n* Arbitrary text fragment granularity (single word, subphrase, phrase, paragraph, etc.)\n* Input audio file formats: all those readable by `ffmpeg`\n* Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB, TEXTGRID, TSV, TTML, TXT, VTT, XML\n* Confirmed working on 38 languages: AFR, ARA, BUL, CAT, CYM, CES, DAN, DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, JPN, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE, TUR, UKR\n* MFCC and DTW computed via Python C extensions to reduce the processing time\n* Several built-in TTS engine wrappers: AWS Polly TTS API, eSpeak (default), eSpeak-ng, Festival, MacOS (via say), Nuance TTS API\n* Default TTS (eSpeak) called via a Python C extension for fast audio synthesis\n* Possibility of running a custom, user-provided TTS engine Python wrapper (e.g., included example for speect)\n* Batch processing of multiple audio/text pairs\n* Download audio from a YouTube video\n* In multilevel mode, recursive alignment from paragraph to sentence to word level\n* In multilevel mode, MFCC resolution, MFCC masking, DTW margin, and TTS engine can be specified for each level independently\n* Robust against misspelled/mispronounced words, local rearrangements of words, background noise/sporadic spikes\n* Adjustable splitting times, including a max character/second constraint for CC applications\n* Automated detection of audio head/tail\n* Output an HTML file for fine tuning the sync map manually (`finetuneas` project)\n* Execution parameters tunable at runtime\n* Code suitable for Web app deployment (e.g., on-demand cloud computing instances)\n* Extensive test suite including 1,200+ unit/integration/performance tests, that run and must pass before each release\n\n\n## Limitations and Missing Features\n\n* Audio should match the text: large portions of spurious text or audio might produce a wrong sync map\n* Audio is assumed to be spoken: not suitable for song captioning, YMMV for CC applications\n* No protection against memory swapping: be sure your amount of RAM is adequate for the maximum duration of a single audio file (e.g., 4 GB RAM => max 2h audio; 16 GB RAM => max 10h audio)\n* [Open issues](https://github.com/readbeyond/aeneas/issues)\n\n### A Note on Word-Level Alignment\n\nA significant number of users runs **aeneas** to align audio and text\nat word-level (i.e., each fragment is a word).\nAlthough **aeneas** was not designed with word-level alignment in mind\nand the results might be inferior to\n[ASR-based forced aligners](https://github.com/pettarin/forced-alignment-tools)\nfor languages with good ASR models,\n**aeneas** offers some options to improve\nthe quality of the alignment at word-level:\n\n* multilevel text (since v1.5.1),\n* MFCC nonspeech masking (since v1.7.0, disabled by default),\n* use better TTS engines, like Festival or AWS/Nuance TTS API (since v1.5.0).\n\nIf you use the ``aeneas.tools.execute_task`` command line tool,\nyou can add ``--presets-word`` switch to enable MFCC nonspeech masking, for example:\n\n```bash\n$ python -m aeneas.tools.execute_task --example-words --presets-word\n$ python -m aeneas.tools.execute_task --example-words-multilevel --presets-word\n```\n\nIf you use **aeneas** as a library, just set the appropriate\n``RuntimeConfiguration`` parameters.\nPlease see the\n[command line tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\nfor details.\n\n\n## License\n\n**aeneas** is released under the terms of the\nGNU Affero General Public License Version 3.\nSee the\n[LICENSE file](https://github.com/readbeyond/aeneas/blob/master/LICENSE) for details.\n\nLicenses for third party code and files included in **aeneas**\ncan be found in the\n[licenses](https://github.com/readbeyond/aeneas/blob/master/licenses/README.md) directory.\n\nNo copy rights were harmed in the making of this project.\n\n\n## Supporting and Contributing\n\n### Sponsors\n\n* **July 2015**: [Michele Gianella](https://plus.google.com/+michelegianella/about) generously supported the development of the boundary adjustment code (v1.0.4)\n\n* **August 2015**: [Michele Gianella](https://plus.google.com/+michelegianella/about) partially sponsored the port of the MFCC/DTW code to C (v1.1.0)\n\n* **September 2015**: friends in West Africa partially sponsored the development of the head/tail detection code (v1.2.0)\n\n* **October 2015**: an anonymous donation sponsored the development of the \"YouTube downloader\" option (v1.3.0)\n\n* **April 2016**: the Fruch Foundation kindly sponsored the development and documentation of v1.5.0\n\n* **December 2016**: the [Centro Internazionale Del Libro Parlato \"Adriano Sernagiotto\"](http://www.libroparlato.org/) (Feltre, Italy) partially sponsored the development of the v1.7 series\n\n### Supporting\n\nWould you like supporting the development of **aeneas**?\n\nI accept sponsorships to\n\n* fix bugs,\n* add new features,\n* improve the quality and the performance of the code,\n* port the code to other languages/platforms, and\n* improve the documentation.\n\nFeel free to\n[get in touch](mailto:aeneas@readbeyond.it).\n\n### Contributing\n\nIf you think you found a bug\nor you have a feature request,\nplease use the\n[GitHub issue tracker](https://github.com/readbeyond/aeneas/issues)\nto submit it.\n\nIf you want to ask a question\nabout using **aeneas**,\nyour best option consists in sending an email to the\n[mailing list](https://groups.google.com/d/forum/aeneas-forced-alignment).\n\nFinally, code contributions are welcome!\nPlease refer to the\n[Code Contribution Guide](https://github.com/readbeyond/aeneas/blob/master/wiki/CONTRIBUTING.md)\nfor details about the branch policies and the code style to follow.\n\n\n## Acknowledgments\n\nMany thanks to **Nicola Montecchio**,\nwho suggested using MFCCs and DTW,\nand co-developed the first experimental code\nfor aligning audio and text.\n\n**Paolo Bertasi**, who developed the\nAPIs and Web application for ReadBeyond Sync,\nhelped shaping the structure of this package\nfor its asynchronous usage.\n\n**Chris Hubbard** prepared the files for\npackaging aeneas as a Debian/Ubuntu `.deb`.\n\n**Daniel Bair** prepared the `brew` formula\nfor installing **aeneas** and its dependencies on Mac OS X.\n\n**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts**\npackaged the installers for Mac OS X and Windows.\n\n**Firat Ozdemir** contributed the `finetuneas`\nHTML/JS code for fine tuning sync maps in the browser.\n\n**Willem van der Walt** contributed the code snippet\nto output a sync map in TextGrid format.\n\n**Chris Vaughn** contributed the MacOS TTS wrapper.\n\nAll the mighty\n[GitHub contributors](https://github.com/readbeyond/aeneas/graphs/contributors),\nand the members of the\n[Google Group](https://groups.google.com/d/forum/aeneas-forced-alignment).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"438E:09ED:E79A4:3FD8F3:6AB92EA3"},"text_sha256":"6263a1ca320584fc8e78ca40249842342ea6a450bc8b90a5e22f6a6ee8f9ca7d"},{"path":"README.rst","size":16754,"blob_sha":"21268bc5715b8982ba982b3f708dcb2fdfef9b42","priority":0,"status":200,"text":"aeneas\n======\n\n**aeneas** is a Python/C library and a set of tools to automagically\nsynchronize audio and text (aka forced alignment).\n\n-  Version: 1.7.3\n-  Date: 2017-03-15\n-  Developed by: `ReadBeyond <http://www.readbeyond.it/>`__\n-  Lead Developer: `Alberto Pettarin <http://www.albertopettarin.it/>`__\n-  License: the GNU Affero General Public License Version 3 (AGPL v3)\n-  Contact: aeneas@readbeyond.it\n-  Quick Links: `Home <http://www.readbeyond.it/aeneas/>`__ -\n   `GitHub <https://github.com/readbeyond/aeneas/>`__ -\n   `PyPI <https://pypi.python.org/pypi/aeneas/>`__ -\n   `Docs <http://www.readbeyond.it/aeneas/docs/>`__ -\n   `Tutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__\n   - `Benchmark <https://readbeyond.github.io/aeneas-benchmark/>`__ -\n   `Mailing\n   List <https://groups.google.com/d/forum/aeneas-forced-alignment>`__ -\n   `Web App <http://aeneasweb.org>`__\n\nGoal\n----\n\n**aeneas** automatically generates a **synchronization map** between a\nlist of text fragments and an audio file containing the narration of the\ntext. In computer science this task is known as (automatically computing\na) **forced alignment**.\n\nFor example, given `this text\nfile <https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.xhtml>`__\nand `this audio\nfile <https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.mp3>`__,\n**aeneas** determines, for each fragment, the corresponding time\ninterval in the audio file:\n\n::\n\n    1                                                     => [00:00:00.000, 00:00:02.640]\n    From fairest creatures we desire increase,            => [00:00:02.640, 00:00:05.880]\n    That thereby beauty's rose might never die,           => [00:00:05.880, 00:00:09.240]\n    But as the riper should by time decease,              => [00:00:09.240, 00:00:11.920]\n    His tender heir might bear his memory:                => [00:00:11.920, 00:00:15.280]\n    But thou contracted to thine own bright eyes,         => [00:00:15.280, 00:00:18.800]\n    Feed'st thy light's flame with self-substantial fuel, => [00:00:18.800, 00:00:22.760]\n    Making a famine where abundance lies,                 => [00:00:22.760, 00:00:25.680]\n    Thy self thy foe, to thy sweet self too cruel:        => [00:00:25.680, 00:00:31.240]\n    Thou that art now the world's fresh ornament,         => [00:00:31.240, 00:00:34.400]\n    And only herald to the gaudy spring,                  => [00:00:34.400, 00:00:36.920]\n    Within thine own bud buriest thy content,             => [00:00:36.920, 00:00:40.640]\n    And tender churl mak'st waste in niggarding:          => [00:00:40.640, 00:00:43.640]\n    Pity the world, or else this glutton be,              => [00:00:43.640, 00:00:48.080]\n    To eat the world's due, by the grave and thee.        => [00:00:48.080, 00:00:53.240]\n\n.. figure:: wiki/align.png\n   :alt: Waveform with aligned labels, detail\n\n   Waveform with aligned labels, detail\n\nThis synchronization map can be output to file in several formats,\ndepending on its application:\n\n-  research: Audacity (AUD), ELAN (EAF), TextGrid;\n-  digital publishing: SMIL for EPUB 3;\n-  closed captioning: SubRip (SRT), SubViewer (SBV/SUB), TTML, WebVTT\n   (VTT);\n-  Web: JSON;\n-  further processing: CSV, SSV, TSV, TXT, XML.\n\nSystem Requirements, Supported Platforms and Installation\n---------------------------------------------------------\n\nSystem Requirements\n~~~~~~~~~~~~~~~~~~~\n\n1. a reasonably recent machine (recommended 4 GB RAM, 2 GHz 64bit CPU)\n2. `Python <https://python.org/>`__ 2.7 (Linux, OS X, Windows) or 3.5 or\n   later (Linux, OS X)\n3. `FFmpeg <https://www.ffmpeg.org/>`__\n4. `eSpeak <http://espeak.sourceforge.net/>`__\n5. Python packages ``BeautifulSoup4``, ``lxml``, and ``numpy``\n6. Python headers to compile the Python C/C++ extensions (optional but\n   strongly recommended)\n7. A shell supporting UTF-8 (optional but strongly recommended)\n\nSupported Platforms\n~~~~~~~~~~~~~~~~~~~\n\n**aeneas** has been developed and tested on **Debian 64bit**, with\n**Python 2.7** and **Python 3.5**, which are the **only supported\nplatforms** at the moment. Nevertheless, **aeneas** has been confirmed\nto work on other Linux distributions, Mac OS X, and Windows. See the\n`PLATFORMS\nfile <https://github.com/readbeyond/aeneas/blob/master/wiki/PLATFORMS.md>`__\nfor details.\n\nIf installing **aeneas** natively on your OS proves difficult, you are\nstrongly encouraged to use\n`aeneas-vagrant <https://github.com/readbeyond/aeneas-vagrant>`__, which\nprovides **aeneas** inside a virtualized Debian image running under\n`VirtualBox <https://www.virtualbox.org/>`__ and\n`Vagrant <http://www.vagrantup.com/>`__, which can be installed on any\nmodern OS (Linux, Mac OS X, Windows).\n\nInstallation\n~~~~~~~~~~~~\n\nAll-in-one installers are available for Mac OS X and Windows, and a Bash\nscript for deb-based Linux distributions (Debian, Ubuntu) is provided in\nthis repository. It is also possible to download a VirtualBox+Vagrant\nvirtual machine. Please see the `INSTALL\nfile <https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md>`__\nfor detailed, step-by-step installation procedures for different\noperating systems.\n\nThe generic OS-independent procedure is simple:\n\n1. **Install** `Python <https://python.org/>`__ (2.7.x preferred),\n   `FFmpeg <https://www.ffmpeg.org/>`__, and\n   `eSpeak <http://espeak.sourceforge.net/>`__\n\n2. Make sure the following **executables** can be called from your\n   **shell**: ``espeak``, ``ffmpeg``, ``ffprobe``, ``pip``, and\n   ``python``\n\n3. First install ``numpy`` with ``pip`` and then ``aeneas`` (this order\n   is important):\n\n   .. code:: bash\n\n       pip install numpy\n       pip install aeneas\n\n4. To **check** whether you installed **aeneas** correctly, run:\n\n``bash     python -m aeneas.diagnostics``\n\nUsage\n-----\n\n1. Run without arguments to get the **usage message**:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task\n       python -m aeneas.tools.execute_job\n\n   You can also get a list of **live examples** that you can immediately\n   run on your machine thanks to the included files:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task --examples\n       python -m aeneas.tools.execute_task --examples-all\n\n2. To **compute a synchronization map** ``map.json`` for a pair\n   (``audio.mp3``, ``text.txt`` in\n   `plain <http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN>`__\n   text format), you can run:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task \\\n           audio.mp3 \\\n           text.txt \\\n           \"task_language=eng|os_task_file_format=json|is_text_type=plain\" \\\n           map.json\n\n(The command has been split into lines with ``\\`` for visual clarity; in\nproduction you can have the entire command on a single line and/or you\ncan use shell variables.)\n\nTo **compute a synchronization map** ``map.smil`` for a pair\n(``audio.mp3``,\n`page.xhtml <http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.UNPARSED>`__\ncontaining fragments marked by ``id`` attributes like ``f001``), you can\nrun:\n\n::\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        page.xhtml \\\n        \"task_language=eng|os_task_file_format=smil|os_task_file_smil_audio_ref=audio.mp3|os_task_file_smil_page_ref=page.xhtml|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]+|is_text_unparsed_id_sort=numeric\" \\\n        map.smil\n    ```\n\nAs you can see, the third argument (the *configuration string*)\nspecifies the parameters controlling the I/O formats and the processing\noptions for the task. Consult the\n`documentation <http://www.readbeyond.it/aeneas/docs/>`__ for details.\n\n3. If you have several tasks to process, you can create a **job\n   container** to batch process them:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_job job.zip output_directory\n\nFile ``job.zip`` should contain a ``config.txt`` or ``config.xml``\nconfiguration file, providing **aeneas** with all the information needed\nto parse the input assets and format the output sync map files. Consult\nthe `documentation <http://www.readbeyond.it/aeneas/docs/>`__ for\ndetails.\n\nThe `documentation <http://www.readbeyond.it/aeneas/docs/>`__ contains a\nhighly suggested\n`tutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__\nwhich explains how to use the built-in command line tools.\n\nDocumentation and Support\n-------------------------\n\n-  Documentation: http://www.readbeyond.it/aeneas/docs/\n-  Command line tools tutorial:\n   http://www.readbeyond.it/aeneas/docs/clitutorial.html\n-  Library tutorial:\n   http://www.readbeyond.it/aeneas/docs/libtutorial.html\n-  Old, verbose tutorial: `A Practical Introduction To The aeneas\n   Package <http://www.albertopettarin.it/blog/2015/05/21/a-practical-introduction-to-the-aeneas-package.html>`__\n-  Mailing list:\n   https://groups.google.com/d/forum/aeneas-forced-alignment\n-  Changelog: http://www.readbeyond.it/aeneas/docs/changelog.html\n-  High level description of how aeneas works:\n   `HOWITWORKS <https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md>`__\n-  Development history:\n   `HISTORY <https://github.com/readbeyond/aeneas/blob/master/wiki/HISTORY.md>`__\n-  Testing:\n   `TESTING <https://github.com/readbeyond/aeneas/blob/master/wiki/TESTING.md>`__\n-  Benchmark suite: https://readbeyond.github.io/aeneas-benchmark/\n\nSupported Features\n------------------\n\n-  Input text files in ``parsed``, ``plain``, ``subtitles``, or\n   ``unparsed`` (XML) format\n-  Multilevel input text files in ``mplain`` and ``munparsed`` (XML)\n   format\n-  Text extraction from XML (e.g., XHTML) files using ``id`` and\n   ``class`` attributes\n-  Arbitrary text fragment granularity (single word, subphrase, phrase,\n   paragraph, etc.)\n-  Input audio file formats: all those readable by ``ffmpeg``\n-  Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB,\n   TEXTGRID, TSV, TTML, TXT, VTT, XML\n-  Confirmed working on 38 languages: AFR, ARA, BUL, CAT, CYM, CES, DAN,\n   DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA,\n   JPN, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA,\n   SWE, TUR, UKR\n-  MFCC and DTW computed via Python C extensions to reduce the\n   processing time\n-  Several built-in TTS engine wrappers: AWS Polly TTS API, eSpeak\n   (default), eSpeak-ng, Festival, MacOS (via say), Nuance TTS API\n-  Default TTS (eSpeak) called via a Python C extension for fast audio\n   synthesis\n-  Possibility of running a custom, user-provided TTS engine Python\n   wrapper (e.g., included example for speect)\n-  Batch processing of multiple audio/text pairs\n-  Download audio from a YouTube video\n-  In multilevel mode, recursive alignment from paragraph to sentence to\n   word level\n-  In multilevel mode, MFCC resolution, MFCC masking, DTW margin, and\n   TTS engine can be specified for each level independently\n-  Robust against misspelled/mispronounced words, local rearrangements\n   of words, background noise/sporadic spikes\n-  Adjustable splitting times, including a max character/second\n   constraint for CC applications\n-  Automated detection of audio head/tail\n-  Output an HTML file for fine tuning the sync map manually\n   (``finetuneas`` project)\n-  Execution parameters tunable at runtime\n-  Code suitable for Web app deployment (e.g., on-demand cloud computing\n   instances)\n-  Extensive test suite including 1,200+ unit/integration/performance\n   tests, that run and must pass before each release\n\nLimitations and Missing Features\n--------------------------------\n\n-  Audio should match the text: large portions of spurious text or audio\n   might produce a wrong sync map\n-  Audio is assumed to be spoken: not suitable for song captioning, YMMV\n   for CC applications\n-  No protection against memory swapping: be sure your amount of RAM is\n   adequate for the maximum duration of a single audio file (e.g., 4 GB\n   RAM => max 2h audio; 16 GB RAM => max 10h audio)\n-  `Open issues <https://github.com/readbeyond/aeneas/issues>`__\n\nA Note on Word-Level Alignment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA significant number of users runs **aeneas** to align audio and text at\nword-level (i.e., each fragment is a word). Although **aeneas** was not\ndesigned with word-level alignment in mind and the results might be\ninferior to `ASR-based forced\naligners <https://github.com/pettarin/forced-alignment-tools>`__ for\nlanguages with good ASR models, **aeneas** offers some options to\nimprove the quality of the alignment at word-level:\n\n-  multilevel text (since v1.5.1),\n-  MFCC nonspeech masking (since v1.7.0, disabled by default),\n-  use better TTS engines, like Festival or AWS/Nuance TTS API (since\n   v1.5.0).\n\nIf you use the ``aeneas.tools.execute_task`` command line tool, you can\nadd ``--presets-word`` switch to enable MFCC nonspeech masking, for\nexample:\n\n.. code:: bash\n\n    $ python -m aeneas.tools.execute_task --example-words --presets-word\n    $ python -m aeneas.tools.execute_task --example-words-multilevel --presets-word\n\nIf you use **aeneas** as a library, just set the appropriate\n``RuntimeConfiguration`` parameters. Please see the `command line\ntutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__ for\ndetails.\n\nLicense\n-------\n\n**aeneas** is released under the terms of the GNU Affero General Public\nLicense Version 3. See the `LICENSE\nfile <https://github.com/readbeyond/aeneas/blob/master/LICENSE>`__ for\ndetails.\n\nLicenses for third party code and files included in **aeneas** can be\nfound in the\n`licenses <https://github.com/readbeyond/aeneas/blob/master/licenses/README.md>`__\ndirectory.\n\nNo copy rights were harmed in the making of this project.\n\nSupporting and Contributing\n---------------------------\n\nSponsors\n~~~~~~~~\n\n-  **July 2015**: `Michele\n   Gianella <https://plus.google.com/+michelegianella/about>`__\n   generously supported the development of the boundary adjustment code\n   (v1.0.4)\n\n-  **August 2015**: `Michele\n   Gianella <https://plus.google.com/+michelegianella/about>`__\n   partially sponsored the port of the MFCC/DTW code to C (v1.1.0)\n\n-  **September 2015**: friends in West Africa partially sponsored the\n   development of the head/tail detection code (v1.2.0)\n\n-  **October 2015**: an anonymous donation sponsored the development of\n   the \"YouTube downloader\" option (v1.3.0)\n\n-  **April 2016**: the Fruch Foundation kindly sponsored the development\n   and documentation of v1.5.0\n\n-  **December 2016**: the `Centro Internazionale Del Libro Parlato\n   \"Adriano Sernagiotto\" <http://www.libroparlato.org/>`__ (Feltre,\n   Italy) partially sponsored the development of the v1.7 series\n\nSupporting\n~~~~~~~~~~\n\nWould you like supporting the development of **aeneas**?\n\nI accept sponsorships to\n\n-  fix bugs,\n-  add new features,\n-  improve the quality and the performance of the code,\n-  port the code to other languages/platforms, and\n-  improve the documentation.\n\nFeel free to `get in touch <mailto:aeneas@readbeyond.it>`__.\n\nContributing\n~~~~~~~~~~~~\n\nIf you think you found a bug or you have a feature request, please use\nthe `GitHub issue\ntracker <https://github.com/readbeyond/aeneas/issues>`__ to submit it.\n\nIf you want to ask a question about using **aeneas**, your best option\nconsists in sending an email to the `mailing\nlist <https://groups.google.com/d/forum/aeneas-forced-alignment>`__.\n\nFinally, code contributions are welcome! Please refer to the `Code\nContribution\nGuide <https://github.com/readbeyond/aeneas/blob/master/wiki/CONTRIBUTING.md>`__\nfor details about the branch policies and the code style to follow.\n\nAcknowledgments\n---------------\n\nMany thanks to **Nicola Montecchio**, who suggested using MFCCs and DTW,\nand co-developed the first experimental code for aligning audio and\ntext.\n\n**Paolo Bertasi**, who developed the APIs and Web application for\nReadBeyond Sync, helped shaping the structure of this package for its\nasynchronous usage.\n\n**Chris Hubbard** prepared the files for packaging aeneas as a\nDebian/Ubuntu ``.deb``.\n\n**Daniel Bair** prepared the ``brew`` formula for installing **aeneas**\nand its dependencies on Mac OS X.\n\n**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts** packaged\nthe installers for Mac OS X and Windows.\n\n**Firat Ozdemir** contributed the ``finetuneas`` HTML/JS code for fine\ntuning sync maps in the browser.\n\n**Willem van der Walt** contributed the code snippet to output a sync\nmap in TextGrid format.\n\n**Chris Vaughn** contributed the MacOS TTS wrapper.\n\nAll the mighty `GitHub\ncontributors <https://github.com/readbeyond/aeneas/graphs/contributors>`__,\nand the members of the `Google\nGroup <https://groups.google.com/d/forum/aeneas-forced-alignment>`__.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C72C:17E138:17BEBF:5E6446:6AB92EA2"},"text_sha256":"2aa01bfaabb0413bb6c42c14ca319c50bda8428089c95f73e6266858a5143f13"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1405","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AB:7307A:17E04E1:1C0ADBF:6AB92EA5"},"commit":{"sha":"4d200a050690903b30b3d885b44714fecb23f18a","url":"https://github.com/readbeyond/aeneas/commit/4d200a050690903b30b3d885b44714fecb23f18a","date":"2020-05-13T19:46:24Z","author_date":"2020-05-13T19:46:24Z","committer_date":"2020-05-13T19:46:24Z","tree_sha":"7d8cde3565ab9769916c5db99742e08707d40299","message_first_line":"Merge pull request #245 from StephenMcConnel/CreatePython3DebianPackage-20200402"},"tree_request_status":200,"tree_rate":{"github_remaining":"1404","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0883:754BF:17F573A:1C20561:6AB92EA5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":16358,"blob_sha":"310edc10265f104ecff80cca8849707ca5337bac","priority":0},{"path":"README.rst","size":16754,"blob_sha":"21268bc5715b8982ba982b3f708dcb2fdfef9b42","priority":0}],"documents":[{"path":"README.md","size":16358,"blob_sha":"310edc10265f104ecff80cca8849707ca5337bac","priority":0,"status":200,"text":"# aeneas\n\n**aeneas** is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment).\n\n* Version: 1.7.3\n* Date: 2017-03-15\n* Developed by: [ReadBeyond](http://www.readbeyond.it/)\n* Lead Developer: [Alberto Pettarin](http://www.albertopettarin.it/)\n* License: the GNU Affero General Public License Version 3 (AGPL v3)\n* Contact: [aeneas@readbeyond.it](mailto:aeneas@readbeyond.it)\n* Quick Links: [Home](http://www.readbeyond.it/aeneas/) - [GitHub](https://github.com/readbeyond/aeneas/) - [PyPI](https://pypi.python.org/pypi/aeneas/) - [Docs](http://www.readbeyond.it/aeneas/docs/) - [Tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html) - [Benchmark](https://readbeyond.github.io/aeneas-benchmark/) - [Mailing List](https://groups.google.com/d/forum/aeneas-forced-alignment) - [Web App](http://aeneasweb.org)\n\n\n## Goal\n\n**aeneas** automatically generates a **synchronization map**\nbetween a list of text fragments\nand an audio file containing the narration of the text.\nIn computer science this task is known as\n(automatically computing a) **forced alignment**.\n\nFor example, given\n[this text file](https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.xhtml)\nand\n[this audio file](https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.mp3),\n**aeneas** determines, for each fragment, the corresponding time interval in the audio file:\n\n```\n1                                                     => [00:00:00.000, 00:00:02.640]\nFrom fairest creatures we desire increase,            => [00:00:02.640, 00:00:05.880]\nThat thereby beauty's rose might never die,           => [00:00:05.880, 00:00:09.240]\nBut as the riper should by time decease,              => [00:00:09.240, 00:00:11.920]\nHis tender heir might bear his memory:                => [00:00:11.920, 00:00:15.280]\nBut thou contracted to thine own bright eyes,         => [00:00:15.280, 00:00:18.800]\nFeed'st thy light's flame with self-substantial fuel, => [00:00:18.800, 00:00:22.760]\nMaking a famine where abundance lies,                 => [00:00:22.760, 00:00:25.680]\nThy self thy foe, to thy sweet self too cruel:        => [00:00:25.680, 00:00:31.240]\nThou that art now the world's fresh ornament,         => [00:00:31.240, 00:00:34.400]\nAnd only herald to the gaudy spring,                  => [00:00:34.400, 00:00:36.920]\nWithin thine own bud buriest thy content,             => [00:00:36.920, 00:00:40.640]\nAnd tender churl mak'st waste in niggarding:          => [00:00:40.640, 00:00:43.640]\nPity the world, or else this glutton be,              => [00:00:43.640, 00:00:48.080]\nTo eat the world's due, by the grave and thee.        => [00:00:48.080, 00:00:53.240]\n```\n\n![Waveform with aligned labels, detail](wiki/align.png)\n\nThis synchronization map can be output to file\nin several formats, depending on its application:\n\n* research: Audacity (AUD), ELAN (EAF), TextGrid;\n* digital publishing: SMIL for EPUB 3;\n* closed captioning: SubRip (SRT), SubViewer (SBV/SUB), TTML, WebVTT (VTT);\n* Web: JSON;\n* further processing: CSV, SSV, TSV, TXT, XML.\n\n\n## System Requirements, Supported Platforms and Installation\n\n### System Requirements\n\n1. a reasonably recent machine (recommended 4 GB RAM, 2 GHz 64bit CPU)\n2. [Python](https://python.org/) 2.7 (Linux, OS X, Windows) or 3.5 or later (Linux, OS X)\n3. [FFmpeg](https://www.ffmpeg.org/)\n4. [eSpeak](http://espeak.sourceforge.net/)\n5. Python packages `BeautifulSoup4`, `lxml`, and `numpy`\n6. Python headers to compile the Python C/C++ extensions (optional but strongly recommended)\n7. A shell supporting UTF-8 (optional but strongly recommended)\n\n### Supported Platforms\n\n**aeneas** has been developed and tested on **Debian 64bit**,\nwith **Python 2.7** and **Python 3.5**,\nwhich are the **only supported platforms** at the moment.\nNevertheless, **aeneas** has been confirmed to work on\nother Linux distributions, Mac OS X, and Windows.\nSee the\n[PLATFORMS file](https://github.com/readbeyond/aeneas/blob/master/wiki/PLATFORMS.md)\nfor details.\n\nIf installing **aeneas** natively on your OS proves difficult,\nyou are strongly encouraged to use\n[aeneas-vagrant](https://github.com/readbeyond/aeneas-vagrant),\nwhich provides **aeneas** inside a virtualized Debian image\nrunning under\n[VirtualBox](https://www.virtualbox.org/)\nand\n[Vagrant](http://www.vagrantup.com/),\nwhich can be installed on any modern OS (Linux, Mac OS X, Windows).\n\n### Installation\n\nAll-in-one installers are available for Mac OS X and Windows,\nand a Bash script for deb-based Linux distributions (Debian, Ubuntu)\nis provided in this repository.\nIt is also possible to download a VirtualBox+Vagrant virtual machine.\nPlease see the\n[INSTALL file](https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md)\nfor detailed, step-by-step installation procedures for different operating systems.\n\nThe generic OS-independent procedure is simple:\n\n1. **Install**\n   [Python](https://python.org/) (2.7.x preferred),\n   [FFmpeg](https://www.ffmpeg.org/), and\n   [eSpeak](http://espeak.sourceforge.net/)\n\n2. Make sure the following **executables** can be called from your **shell**:\n   `espeak`, `ffmpeg`, `ffprobe`, `pip`, and `python`\n\n3. First install `numpy` with `pip` and then `aeneas` (this order is important):\n\n    ```bash\n    pip install numpy\n    pip install aeneas\n    ```\n\n4. To **check** whether you installed **aeneas** correctly, run:\n\n   ```bash\n    python -m aeneas.diagnostics\n    ```\n\n\n## Usage\n\n1. Run without arguments to get the **usage message**:\n\n    ```bash\n    python -m aeneas.tools.execute_task\n    python -m aeneas.tools.execute_job\n    ```\n\n    You can also get a list of **live examples**\n    that you can immediately run on your machine\n    thanks to the included files:\n\n    ```bash\n    python -m aeneas.tools.execute_task --examples\n    python -m aeneas.tools.execute_task --examples-all\n    ```\n\n2. To **compute a synchronization map** `map.json` for a pair\n   (`audio.mp3`, `text.txt` in\n   [plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN)\n   text format), you can run:\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        text.txt \\\n        \"task_language=eng|os_task_file_format=json|is_text_type=plain\" \\\n        map.json\n    ```\n\n   (The command has been split into lines with `\\` for visual clarity;\n   in production you can have the entire command on a single line\n   and/or you can use shell variables.)\n\n   To **compute a synchronization map** `map.smil` for a pair\n   (`audio.mp3`,\n   [page.xhtml](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.UNPARSED)\n   containing fragments marked by `id` attributes like `f001`),\n   you can run:\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        page.xhtml \\\n        \"task_language=eng|os_task_file_format=smil|os_task_file_smil_audio_ref=audio.mp3|os_task_file_smil_page_ref=page.xhtml|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]+|is_text_unparsed_id_sort=numeric\" \\\n        map.smil\n    ```\n\n   As you can see, the third argument (the _configuration string_)\n   specifies the parameters controlling the I/O formats\n   and the processing options for the task.\n   Consult the\n   [documentation](http://www.readbeyond.it/aeneas/docs/)\n   for details.\n\n3. If you have several tasks to process,\n   you can create a **job container**\n   to batch process them:\n\n    ```bash\n    python -m aeneas.tools.execute_job job.zip output_directory\n    ```\n\n   File `job.zip` should contain a `config.txt` or `config.xml`\n   configuration file, providing **aeneas**\n   with all the information needed to parse the input assets\n   and format the output sync map files.\n   Consult the\n   [documentation](http://www.readbeyond.it/aeneas/docs/)\n   for details.\n\nThe\n[documentation](http://www.readbeyond.it/aeneas/docs/)\ncontains a highly suggested\n[tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\nwhich explains how to use the built-in command line tools.\n\n\n## Documentation and Support\n\n* Documentation:\n  [http://www.readbeyond.it/aeneas/docs/](http://www.readbeyond.it/aeneas/docs/)\n* Command line tools tutorial:\n  [http://www.readbeyond.it/aeneas/docs/clitutorial.html](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\n* Library tutorial:\n  [http://www.readbeyond.it/aeneas/docs/libtutorial.html](http://www.readbeyond.it/aeneas/docs/libtutorial.html)\n* Old, verbose tutorial:\n  [A Practical Introduction To The aeneas Package](http://www.albertopettarin.it/blog/2015/05/21/a-practical-introduction-to-the-aeneas-package.html)\n* Mailing list:\n  [https://groups.google.com/d/forum/aeneas-forced-alignment](https://groups.google.com/d/forum/aeneas-forced-alignment)\n* Changelog:\n  [http://www.readbeyond.it/aeneas/docs/changelog.html](http://www.readbeyond.it/aeneas/docs/changelog.html)\n* High level description of how aeneas works:\n  [HOWITWORKS](https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md)\n* Development history:\n  [HISTORY](https://github.com/readbeyond/aeneas/blob/master/wiki/HISTORY.md)\n* Testing:\n  [TESTING](https://github.com/readbeyond/aeneas/blob/master/wiki/TESTING.md)\n* Benchmark suite:\n  [https://readbeyond.github.io/aeneas-benchmark/](https://readbeyond.github.io/aeneas-benchmark/)\n\n\n## Supported Features\n\n* Input text files in `parsed`, `plain`, `subtitles`, or `unparsed` (XML) format\n* Multilevel input text files in `mplain` and `munparsed` (XML) format\n* Text extraction from XML (e.g., XHTML) files using `id` and `class` attributes\n* Arbitrary text fragment granularity (single word, subphrase, phrase, paragraph, etc.)\n* Input audio file formats: all those readable by `ffmpeg`\n* Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB, TEXTGRID, TSV, TTML, TXT, VTT, XML\n* Confirmed working on 38 languages: AFR, ARA, BUL, CAT, CYM, CES, DAN, DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, JPN, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE, TUR, UKR\n* MFCC and DTW computed via Python C extensions to reduce the processing time\n* Several built-in TTS engine wrappers: AWS Polly TTS API, eSpeak (default), eSpeak-ng, Festival, MacOS (via say), Nuance TTS API\n* Default TTS (eSpeak) called via a Python C extension for fast audio synthesis\n* Possibility of running a custom, user-provided TTS engine Python wrapper (e.g., included example for speect)\n* Batch processing of multiple audio/text pairs\n* Download audio from a YouTube video\n* In multilevel mode, recursive alignment from paragraph to sentence to word level\n* In multilevel mode, MFCC resolution, MFCC masking, DTW margin, and TTS engine can be specified for each level independently\n* Robust against misspelled/mispronounced words, local rearrangements of words, background noise/sporadic spikes\n* Adjustable splitting times, including a max character/second constraint for CC applications\n* Automated detection of audio head/tail\n* Output an HTML file for fine tuning the sync map manually (`finetuneas` project)\n* Execution parameters tunable at runtime\n* Code suitable for Web app deployment (e.g., on-demand cloud computing instances)\n* Extensive test suite including 1,200+ unit/integration/performance tests, that run and must pass before each release\n\n\n## Limitations and Missing Features\n\n* Audio should match the text: large portions of spurious text or audio might produce a wrong sync map\n* Audio is assumed to be spoken: not suitable for song captioning, YMMV for CC applications\n* No protection against memory swapping: be sure your amount of RAM is adequate for the maximum duration of a single audio file (e.g., 4 GB RAM => max 2h audio; 16 GB RAM => max 10h audio)\n* [Open issues](https://github.com/readbeyond/aeneas/issues)\n\n### A Note on Word-Level Alignment\n\nA significant number of users runs **aeneas** to align audio and text\nat word-level (i.e., each fragment is a word).\nAlthough **aeneas** was not designed with word-level alignment in mind\nand the results might be inferior to\n[ASR-based forced aligners](https://github.com/pettarin/forced-alignment-tools)\nfor languages with good ASR models,\n**aeneas** offers some options to improve\nthe quality of the alignment at word-level:\n\n* multilevel text (since v1.5.1),\n* MFCC nonspeech masking (since v1.7.0, disabled by default),\n* use better TTS engines, like Festival or AWS/Nuance TTS API (since v1.5.0).\n\nIf you use the ``aeneas.tools.execute_task`` command line tool,\nyou can add ``--presets-word`` switch to enable MFCC nonspeech masking, for example:\n\n```bash\n$ python -m aeneas.tools.execute_task --example-words --presets-word\n$ python -m aeneas.tools.execute_task --example-words-multilevel --presets-word\n```\n\nIf you use **aeneas** as a library, just set the appropriate\n``RuntimeConfiguration`` parameters.\nPlease see the\n[command line tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html)\nfor details.\n\n\n## License\n\n**aeneas** is released under the terms of the\nGNU Affero General Public License Version 3.\nSee the\n[LICENSE file](https://github.com/readbeyond/aeneas/blob/master/LICENSE) for details.\n\nLicenses for third party code and files included in **aeneas**\ncan be found in the\n[licenses](https://github.com/readbeyond/aeneas/blob/master/licenses/README.md) directory.\n\nNo copy rights were harmed in the making of this project.\n\n\n## Supporting and Contributing\n\n### Sponsors\n\n* **July 2015**: [Michele Gianella](https://plus.google.com/+michelegianella/about) generously supported the development of the boundary adjustment code (v1.0.4)\n\n* **August 2015**: [Michele Gianella](https://plus.google.com/+michelegianella/about) partially sponsored the port of the MFCC/DTW code to C (v1.1.0)\n\n* **September 2015**: friends in West Africa partially sponsored the development of the head/tail detection code (v1.2.0)\n\n* **October 2015**: an anonymous donation sponsored the development of the \"YouTube downloader\" option (v1.3.0)\n\n* **April 2016**: the Fruch Foundation kindly sponsored the development and documentation of v1.5.0\n\n* **December 2016**: the [Centro Internazionale Del Libro Parlato \"Adriano Sernagiotto\"](http://www.libroparlato.org/) (Feltre, Italy) partially sponsored the development of the v1.7 series\n\n### Supporting\n\nWould you like supporting the development of **aeneas**?\n\nI accept sponsorships to\n\n* fix bugs,\n* add new features,\n* improve the quality and the performance of the code,\n* port the code to other languages/platforms, and\n* improve the documentation.\n\nFeel free to\n[get in touch](mailto:aeneas@readbeyond.it).\n\n### Contributing\n\nIf you think you found a bug\nor you have a feature request,\nplease use the\n[GitHub issue tracker](https://github.com/readbeyond/aeneas/issues)\nto submit it.\n\nIf you want to ask a question\nabout using **aeneas**,\nyour best option consists in sending an email to the\n[mailing list](https://groups.google.com/d/forum/aeneas-forced-alignment).\n\nFinally, code contributions are welcome!\nPlease refer to the\n[Code Contribution Guide](https://github.com/readbeyond/aeneas/blob/master/wiki/CONTRIBUTING.md)\nfor details about the branch policies and the code style to follow.\n\n\n## Acknowledgments\n\nMany thanks to **Nicola Montecchio**,\nwho suggested using MFCCs and DTW,\nand co-developed the first experimental code\nfor aligning audio and text.\n\n**Paolo Bertasi**, who developed the\nAPIs and Web application for ReadBeyond Sync,\nhelped shaping the structure of this package\nfor its asynchronous usage.\n\n**Chris Hubbard** prepared the files for\npackaging aeneas as a Debian/Ubuntu `.deb`.\n\n**Daniel Bair** prepared the `brew` formula\nfor installing **aeneas** and its dependencies on Mac OS X.\n\n**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts**\npackaged the installers for Mac OS X and Windows.\n\n**Firat Ozdemir** contributed the `finetuneas`\nHTML/JS code for fine tuning sync maps in the browser.\n\n**Willem van der Walt** contributed the code snippet\nto output a sync map in TextGrid format.\n\n**Chris Vaughn** contributed the MacOS TTS wrapper.\n\nAll the mighty\n[GitHub contributors](https://github.com/readbeyond/aeneas/graphs/contributors),\nand the members of the\n[Google Group](https://groups.google.com/d/forum/aeneas-forced-alignment).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"438E:09ED:E79A4:3FD8F3:6AB92EA3"},"text_sha256":"6263a1ca320584fc8e78ca40249842342ea6a450bc8b90a5e22f6a6ee8f9ca7d"},{"path":"README.rst","size":16754,"blob_sha":"21268bc5715b8982ba982b3f708dcb2fdfef9b42","priority":0,"status":200,"text":"aeneas\n======\n\n**aeneas** is a Python/C library and a set of tools to automagically\nsynchronize audio and text (aka forced alignment).\n\n-  Version: 1.7.3\n-  Date: 2017-03-15\n-  Developed by: `ReadBeyond <http://www.readbeyond.it/>`__\n-  Lead Developer: `Alberto Pettarin <http://www.albertopettarin.it/>`__\n-  License: the GNU Affero General Public License Version 3 (AGPL v3)\n-  Contact: aeneas@readbeyond.it\n-  Quick Links: `Home <http://www.readbeyond.it/aeneas/>`__ -\n   `GitHub <https://github.com/readbeyond/aeneas/>`__ -\n   `PyPI <https://pypi.python.org/pypi/aeneas/>`__ -\n   `Docs <http://www.readbeyond.it/aeneas/docs/>`__ -\n   `Tutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__\n   - `Benchmark <https://readbeyond.github.io/aeneas-benchmark/>`__ -\n   `Mailing\n   List <https://groups.google.com/d/forum/aeneas-forced-alignment>`__ -\n   `Web App <http://aeneasweb.org>`__\n\nGoal\n----\n\n**aeneas** automatically generates a **synchronization map** between a\nlist of text fragments and an audio file containing the narration of the\ntext. In computer science this task is known as (automatically computing\na) **forced alignment**.\n\nFor example, given `this text\nfile <https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.xhtml>`__\nand `this audio\nfile <https://raw.githubusercontent.com/readbeyond/aeneas/master/aeneas/tests/res/container/job/assets/p001.mp3>`__,\n**aeneas** determines, for each fragment, the corresponding time\ninterval in the audio file:\n\n::\n\n    1                                                     => [00:00:00.000, 00:00:02.640]\n    From fairest creatures we desire increase,            => [00:00:02.640, 00:00:05.880]\n    That thereby beauty's rose might never die,           => [00:00:05.880, 00:00:09.240]\n    But as the riper should by time decease,              => [00:00:09.240, 00:00:11.920]\n    His tender heir might bear his memory:                => [00:00:11.920, 00:00:15.280]\n    But thou contracted to thine own bright eyes,         => [00:00:15.280, 00:00:18.800]\n    Feed'st thy light's flame with self-substantial fuel, => [00:00:18.800, 00:00:22.760]\n    Making a famine where abundance lies,                 => [00:00:22.760, 00:00:25.680]\n    Thy self thy foe, to thy sweet self too cruel:        => [00:00:25.680, 00:00:31.240]\n    Thou that art now the world's fresh ornament,         => [00:00:31.240, 00:00:34.400]\n    And only herald to the gaudy spring,                  => [00:00:34.400, 00:00:36.920]\n    Within thine own bud buriest thy content,             => [00:00:36.920, 00:00:40.640]\n    And tender churl mak'st waste in niggarding:          => [00:00:40.640, 00:00:43.640]\n    Pity the world, or else this glutton be,              => [00:00:43.640, 00:00:48.080]\n    To eat the world's due, by the grave and thee.        => [00:00:48.080, 00:00:53.240]\n\n.. figure:: wiki/align.png\n   :alt: Waveform with aligned labels, detail\n\n   Waveform with aligned labels, detail\n\nThis synchronization map can be output to file in several formats,\ndepending on its application:\n\n-  research: Audacity (AUD), ELAN (EAF), TextGrid;\n-  digital publishing: SMIL for EPUB 3;\n-  closed captioning: SubRip (SRT), SubViewer (SBV/SUB), TTML, WebVTT\n   (VTT);\n-  Web: JSON;\n-  further processing: CSV, SSV, TSV, TXT, XML.\n\nSystem Requirements, Supported Platforms and Installation\n---------------------------------------------------------\n\nSystem Requirements\n~~~~~~~~~~~~~~~~~~~\n\n1. a reasonably recent machine (recommended 4 GB RAM, 2 GHz 64bit CPU)\n2. `Python <https://python.org/>`__ 2.7 (Linux, OS X, Windows) or 3.5 or\n   later (Linux, OS X)\n3. `FFmpeg <https://www.ffmpeg.org/>`__\n4. `eSpeak <http://espeak.sourceforge.net/>`__\n5. Python packages ``BeautifulSoup4``, ``lxml``, and ``numpy``\n6. Python headers to compile the Python C/C++ extensions (optional but\n   strongly recommended)\n7. A shell supporting UTF-8 (optional but strongly recommended)\n\nSupported Platforms\n~~~~~~~~~~~~~~~~~~~\n\n**aeneas** has been developed and tested on **Debian 64bit**, with\n**Python 2.7** and **Python 3.5**, which are the **only supported\nplatforms** at the moment. Nevertheless, **aeneas** has been confirmed\nto work on other Linux distributions, Mac OS X, and Windows. See the\n`PLATFORMS\nfile <https://github.com/readbeyond/aeneas/blob/master/wiki/PLATFORMS.md>`__\nfor details.\n\nIf installing **aeneas** natively on your OS proves difficult, you are\nstrongly encouraged to use\n`aeneas-vagrant <https://github.com/readbeyond/aeneas-vagrant>`__, which\nprovides **aeneas** inside a virtualized Debian image running under\n`VirtualBox <https://www.virtualbox.org/>`__ and\n`Vagrant <http://www.vagrantup.com/>`__, which can be installed on any\nmodern OS (Linux, Mac OS X, Windows).\n\nInstallation\n~~~~~~~~~~~~\n\nAll-in-one installers are available for Mac OS X and Windows, and a Bash\nscript for deb-based Linux distributions (Debian, Ubuntu) is provided in\nthis repository. It is also possible to download a VirtualBox+Vagrant\nvirtual machine. Please see the `INSTALL\nfile <https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md>`__\nfor detailed, step-by-step installation procedures for different\noperating systems.\n\nThe generic OS-independent procedure is simple:\n\n1. **Install** `Python <https://python.org/>`__ (2.7.x preferred),\n   `FFmpeg <https://www.ffmpeg.org/>`__, and\n   `eSpeak <http://espeak.sourceforge.net/>`__\n\n2. Make sure the following **executables** can be called from your\n   **shell**: ``espeak``, ``ffmpeg``, ``ffprobe``, ``pip``, and\n   ``python``\n\n3. First install ``numpy`` with ``pip`` and then ``aeneas`` (this order\n   is important):\n\n   .. code:: bash\n\n       pip install numpy\n       pip install aeneas\n\n4. To **check** whether you installed **aeneas** correctly, run:\n\n``bash     python -m aeneas.diagnostics``\n\nUsage\n-----\n\n1. Run without arguments to get the **usage message**:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task\n       python -m aeneas.tools.execute_job\n\n   You can also get a list of **live examples** that you can immediately\n   run on your machine thanks to the included files:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task --examples\n       python -m aeneas.tools.execute_task --examples-all\n\n2. To **compute a synchronization map** ``map.json`` for a pair\n   (``audio.mp3``, ``text.txt`` in\n   `plain <http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN>`__\n   text format), you can run:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_task \\\n           audio.mp3 \\\n           text.txt \\\n           \"task_language=eng|os_task_file_format=json|is_text_type=plain\" \\\n           map.json\n\n(The command has been split into lines with ``\\`` for visual clarity; in\nproduction you can have the entire command on a single line and/or you\ncan use shell variables.)\n\nTo **compute a synchronization map** ``map.smil`` for a pair\n(``audio.mp3``,\n`page.xhtml <http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.UNPARSED>`__\ncontaining fragments marked by ``id`` attributes like ``f001``), you can\nrun:\n\n::\n\n    ```bash\n    python -m aeneas.tools.execute_task \\\n        audio.mp3 \\\n        page.xhtml \\\n        \"task_language=eng|os_task_file_format=smil|os_task_file_smil_audio_ref=audio.mp3|os_task_file_smil_page_ref=page.xhtml|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]+|is_text_unparsed_id_sort=numeric\" \\\n        map.smil\n    ```\n\nAs you can see, the third argument (the *configuration string*)\nspecifies the parameters controlling the I/O formats and the processing\noptions for the task. Consult the\n`documentation <http://www.readbeyond.it/aeneas/docs/>`__ for details.\n\n3. If you have several tasks to process, you can create a **job\n   container** to batch process them:\n\n   .. code:: bash\n\n       python -m aeneas.tools.execute_job job.zip output_directory\n\nFile ``job.zip`` should contain a ``config.txt`` or ``config.xml``\nconfiguration file, providing **aeneas** with all the information needed\nto parse the input assets and format the output sync map files. Consult\nthe `documentation <http://www.readbeyond.it/aeneas/docs/>`__ for\ndetails.\n\nThe `documentation <http://www.readbeyond.it/aeneas/docs/>`__ contains a\nhighly suggested\n`tutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__\nwhich explains how to use the built-in command line tools.\n\nDocumentation and Support\n-------------------------\n\n-  Documentation: http://www.readbeyond.it/aeneas/docs/\n-  Command line tools tutorial:\n   http://www.readbeyond.it/aeneas/docs/clitutorial.html\n-  Library tutorial:\n   http://www.readbeyond.it/aeneas/docs/libtutorial.html\n-  Old, verbose tutorial: `A Practical Introduction To The aeneas\n   Package <http://www.albertopettarin.it/blog/2015/05/21/a-practical-introduction-to-the-aeneas-package.html>`__\n-  Mailing list:\n   https://groups.google.com/d/forum/aeneas-forced-alignment\n-  Changelog: http://www.readbeyond.it/aeneas/docs/changelog.html\n-  High level description of how aeneas works:\n   `HOWITWORKS <https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md>`__\n-  Development history:\n   `HISTORY <https://github.com/readbeyond/aeneas/blob/master/wiki/HISTORY.md>`__\n-  Testing:\n   `TESTING <https://github.com/readbeyond/aeneas/blob/master/wiki/TESTING.md>`__\n-  Benchmark suite: https://readbeyond.github.io/aeneas-benchmark/\n\nSupported Features\n------------------\n\n-  Input text files in ``parsed``, ``plain``, ``subtitles``, or\n   ``unparsed`` (XML) format\n-  Multilevel input text files in ``mplain`` and ``munparsed`` (XML)\n   format\n-  Text extraction from XML (e.g., XHTML) files using ``id`` and\n   ``class`` attributes\n-  Arbitrary text fragment granularity (single word, subphrase, phrase,\n   paragraph, etc.)\n-  Input audio file formats: all those readable by ``ffmpeg``\n-  Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB,\n   TEXTGRID, TSV, TTML, TXT, VTT, XML\n-  Confirmed working on 38 languages: AFR, ARA, BUL, CAT, CYM, CES, DAN,\n   DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA,\n   JPN, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA,\n   SWE, TUR, UKR\n-  MFCC and DTW computed via Python C extensions to reduce the\n   processing time\n-  Several built-in TTS engine wrappers: AWS Polly TTS API, eSpeak\n   (default), eSpeak-ng, Festival, MacOS (via say), Nuance TTS API\n-  Default TTS (eSpeak) called via a Python C extension for fast audio\n   synthesis\n-  Possibility of running a custom, user-provided TTS engine Python\n   wrapper (e.g., included example for speect)\n-  Batch processing of multiple audio/text pairs\n-  Download audio from a YouTube video\n-  In multilevel mode, recursive alignment from paragraph to sentence to\n   word level\n-  In multilevel mode, MFCC resolution, MFCC masking, DTW margin, and\n   TTS engine can be specified for each level independently\n-  Robust against misspelled/mispronounced words, local rearrangements\n   of words, background noise/sporadic spikes\n-  Adjustable splitting times, including a max character/second\n   constraint for CC applications\n-  Automated detection of audio head/tail\n-  Output an HTML file for fine tuning the sync map manually\n   (``finetuneas`` project)\n-  Execution parameters tunable at runtime\n-  Code suitable for Web app deployment (e.g., on-demand cloud computing\n   instances)\n-  Extensive test suite including 1,200+ unit/integration/performance\n   tests, that run and must pass before each release\n\nLimitations and Missing Features\n--------------------------------\n\n-  Audio should match the text: large portions of spurious text or audio\n   might produce a wrong sync map\n-  Audio is assumed to be spoken: not suitable for song captioning, YMMV\n   for CC applications\n-  No protection against memory swapping: be sure your amount of RAM is\n   adequate for the maximum duration of a single audio file (e.g., 4 GB\n   RAM => max 2h audio; 16 GB RAM => max 10h audio)\n-  `Open issues <https://github.com/readbeyond/aeneas/issues>`__\n\nA Note on Word-Level Alignment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA significant number of users runs **aeneas** to align audio and text at\nword-level (i.e., each fragment is a word). Although **aeneas** was not\ndesigned with word-level alignment in mind and the results might be\ninferior to `ASR-based forced\naligners <https://github.com/pettarin/forced-alignment-tools>`__ for\nlanguages with good ASR models, **aeneas** offers some options to\nimprove the quality of the alignment at word-level:\n\n-  multilevel text (since v1.5.1),\n-  MFCC nonspeech masking (since v1.7.0, disabled by default),\n-  use better TTS engines, like Festival or AWS/Nuance TTS API (since\n   v1.5.0).\n\nIf you use the ``aeneas.tools.execute_task`` command line tool, you can\nadd ``--presets-word`` switch to enable MFCC nonspeech masking, for\nexample:\n\n.. code:: bash\n\n    $ python -m aeneas.tools.execute_task --example-words --presets-word\n    $ python -m aeneas.tools.execute_task --example-words-multilevel --presets-word\n\nIf you use **aeneas** as a library, just set the appropriate\n``RuntimeConfiguration`` parameters. Please see the `command line\ntutorial <http://www.readbeyond.it/aeneas/docs/clitutorial.html>`__ for\ndetails.\n\nLicense\n-------\n\n**aeneas** is released under the terms of the GNU Affero General Public\nLicense Version 3. See the `LICENSE\nfile <https://github.com/readbeyond/aeneas/blob/master/LICENSE>`__ for\ndetails.\n\nLicenses for third party code and files included in **aeneas** can be\nfound in the\n`licenses <https://github.com/readbeyond/aeneas/blob/master/licenses/README.md>`__\ndirectory.\n\nNo copy rights were harmed in the making of this project.\n\nSupporting and Contributing\n---------------------------\n\nSponsors\n~~~~~~~~\n\n-  **July 2015**: `Michele\n   Gianella <https://plus.google.com/+michelegianella/about>`__\n   generously supported the development of the boundary adjustment code\n   (v1.0.4)\n\n-  **August 2015**: `Michele\n   Gianella <https://plus.google.com/+michelegianella/about>`__\n   partially sponsored the port of the MFCC/DTW code to C (v1.1.0)\n\n-  **September 2015**: friends in West Africa partially sponsored the\n   development of the head/tail detection code (v1.2.0)\n\n-  **October 2015**: an anonymous donation sponsored the development of\n   the \"YouTube downloader\" option (v1.3.0)\n\n-  **April 2016**: the Fruch Foundation kindly sponsored the development\n   and documentation of v1.5.0\n\n-  **December 2016**: the `Centro Internazionale Del Libro Parlato\n   \"Adriano Sernagiotto\" <http://www.libroparlato.org/>`__ (Feltre,\n   Italy) partially sponsored the development of the v1.7 series\n\nSupporting\n~~~~~~~~~~\n\nWould you like supporting the development of **aeneas**?\n\nI accept sponsorships to\n\n-  fix bugs,\n-  add new features,\n-  improve the quality and the performance of the code,\n-  port the code to other languages/platforms, and\n-  improve the documentation.\n\nFeel free to `get in touch <mailto:aeneas@readbeyond.it>`__.\n\nContributing\n~~~~~~~~~~~~\n\nIf you think you found a bug or you have a feature request, please use\nthe `GitHub issue\ntracker <https://github.com/readbeyond/aeneas/issues>`__ to submit it.\n\nIf you want to ask a question about using **aeneas**, your best option\nconsists in sending an email to the `mailing\nlist <https://groups.google.com/d/forum/aeneas-forced-alignment>`__.\n\nFinally, code contributions are welcome! Please refer to the `Code\nContribution\nGuide <https://github.com/readbeyond/aeneas/blob/master/wiki/CONTRIBUTING.md>`__\nfor details about the branch policies and the code style to follow.\n\nAcknowledgments\n---------------\n\nMany thanks to **Nicola Montecchio**, who suggested using MFCCs and DTW,\nand co-developed the first experimental code for aligning audio and\ntext.\n\n**Paolo Bertasi**, who developed the APIs and Web application for\nReadBeyond Sync, helped shaping the structure of this package for its\nasynchronous usage.\n\n**Chris Hubbard** prepared the files for packaging aeneas as a\nDebian/Ubuntu ``.deb``.\n\n**Daniel Bair** prepared the ``brew`` formula for installing **aeneas**\nand its dependencies on Mac OS X.\n\n**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts** packaged\nthe installers for Mac OS X and Windows.\n\n**Firat Ozdemir** contributed the ``finetuneas`` HTML/JS code for fine\ntuning sync maps in the browser.\n\n**Willem van der Walt** contributed the code snippet to output a sync\nmap in TextGrid format.\n\n**Chris Vaughn** contributed the MacOS TTS wrapper.\n\nAll the mighty `GitHub\ncontributors <https://github.com/readbeyond/aeneas/graphs/contributors>`__,\nand the members of the `Google\nGroup <https://groups.google.com/d/forum/aeneas-forced-alignment>`__.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C72C:17E138:17BEBF:5E6446:6AB92EA2"},"text_sha256":"2aa01bfaabb0413bb6c42c14ca319c50bda8428089c95f73e6266858a5143f13"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"baidu/Familia","input_row":{"repository":"baidu/Familia","url":"https://github.com/baidu/Familia","name":"Familia","owner":"baidu","description":"A Toolkit for Industrial Topic Modeling","language":"C++","license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License","license_osi_approved":"true","stars":2644,"issues":103,"created_at":"2017-06-14T06:48:21Z","updated_at":"2026-09-14T17:57:43Z","first_commit_at":"2017-06-15T03:08:56Z","last_commit_at":"2021-07-01T08:28:32Z","activity_months":48.530000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:38.670Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"baidu/Familia","visibility":"public","created_at":"2017-06-14T06:48:21Z","updated_at":"2026-09-14T17:57:43Z","private":false,"fork":false,"archived":false,"stargazers_count":2644,"open_issues_count":28,"license_spdx_id":"BSD-3-Clause","license_name":"BSD 3-Clause \"New\" or \"Revised\" License"},"error":"","rate":{"github_remaining":"1403","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0789:6C9BF:1828CB7:1C53BA7:6AB92EA6"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1402","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AC:725A9:1802A41:1C2DC21:6AB92EA7"},"commit":{"sha":"e31e37d7308e40e2ca489f25721a17a28317939a","url":"https://github.com/baidu/Familia/commit/e31e37d7308e40e2ca489f25721a17a28317939a","date":"2018-05-11T05:36:48Z","author_date":"2018-05-11T05:36:48Z","committer_date":"2018-05-11T05:36:48Z","tree_sha":"206affe3a689552e64a7162f8e34ddf3b9df5d40","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1401","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B3:0AC4:12BBCC8:161695A:6AB92EA7"},"tree_truncated":false,"document_candidates":[{"path":"README.EN.md","size":4197,"blob_sha":"dfcf2d9bf60dff586a7a621ef60d9c3e992913ef","priority":0},{"path":"README.md","size":4738,"blob_sha":"f6faf5f66fecbc6f111db614614b43849dd5a07d","priority":0}],"documents":[{"path":"README.EN.md","size":4197,"blob_sha":"dfcf2d9bf60dff586a7a621ef60d9c3e992913ef","priority":0,"status":200,"text":"<a href=\"http://github.com/baidu/Familia\">\n\t<img style=\"vertical-align: top;\" src=\"https://raw.githubusercontent.com/wiki/baidu/Familia/img/logo.png?raw=true\" alt=\"logo\" height=\"140px\">\n<\/a>\n\n[![Build Status][image-1]][1]\n[![License][image-2]]()\n\n**Familia** is an open-source project, which implements three popular topic models based on the large-scale industrial data. They are Latent Dirichlet Allocation(LDA)、SentenceLDA and Topical Word Embedding(TWE). In addition, **Familia** offers several tools including lda-infer and lda-query-doc-sim. **Familia** could be easily applied to many tasks, such as document classification, document clustering and personalized recommendation. Due to the high cost of model training, we will continue to release well-trained topic models based on the various types of large-scale data.  \n\n## Introduction\nThe details of topic models implemented by **Familia** can be referred to [papers on topic models][3].\n\nGenerally, the applications adopting topic models are categorized into two parts: Semantic Representation and Semantic Matching.\n\n- **Semantic Representation**\n\n    Topic models are able to mine hidden dimensions (topics) from document collection and generate semantic representations of documents. These generated semantic representations can be used as features for document classification, document content analysis, and CTR     prediction.\n\n- **Semantic Matching**\n\n    We offer two methods to compute semantic similarity between documents:\n    -\tSemantic similarity between short-long documents, which can be applied to keyword extraction and computing query-document semantic  similarity.\n    -\tSemantic similarity between long-long documents, which can be applied to computing semantic similarity between user profile and news article.\n\nMore details can be referred to [**Familia Wiki**][4].\n\n## Compilation\nThe required third parties include `gflags-2.0`，`glogs-0.3.4`，`protobuf-2.5.0`. The complier should support `C++11`, `g++ >= 4.8` and be compatible with linux and mac. The deps could be obtained and installed automatically by running the following script.\n\n\t$ sh build.sh\n\n## Download\n\t$ cd model\n\t$ sh download_model.sh\n\nMore details can be referred to [Models][5].\n\n## Demo\n**Familia** demo includes the following functions:\n-\t**Semantic Representation**\n   utilize topic models to infer the topic distribution of the input document.\n   \n-\t**Semantic Matching**\n\tcompute semantic similarity between short-long or long-long documents.\n\n-\t**Topic Show**\n\tdemonstrate top words under each topic for users’ better understanding.\n  \nMore details can be referred to [Demos][6].\n\n## Tips\n* If libglog.so, libgflags.so and other dynamic libraries could not be found, please add third\\_party to the environmental parameter `LD_LIBRARY_PATH`.\n\n\t`export LD_LIBRARY_PATH=./third_party/lib:$LD_LIBRARY_PATH`\n\n## Contact\n[Github Issues][7]\n\n{familia} at baidu.com\n\n## Citation\n\nThe following article describes the Familia project and industrial cases powered by topic modeling. It bundles and translates the Chinese documentation of the website. We recommend citing this article as default.\n\nDi Jiang, Zeyu Chen, Rongzhong Lian, Siqi Bao and Chen Li. 2017. [Familia: An Open-Source Toolkit for Industrial Topic Modeling][8]. arXiv preprint arXiv:1707.09823.\n\n\t@article{jiang2017familia,\n\t  author = {Di Jiang and Zeyu Chen and Rongzhong Lian and Siqi Bao and Chen Li},\n\t  title = {{Familia: An Open-Source Toolkit for Industrial Topic Modeling}},\n\t  journal = {arXiv preprint arXiv:1707.09823},\n\t  year = {2017}\n\t}\n\n## Copyright and License\n\nFamilia is provided under the [BSD-3-Clause License][9].\n\n[1]:\thttp://travis-ci.org/baidu/Familia\n[3]:\thttps://github.com/baidu/Familia/wiki/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE\n[4]:\thttps://github.com/baidu/Familia/wiki\n[5]:\thttps://github.com/baidu/Familia/blob/master/model/README.md\n[6]:\thttps://github.com/baidu/Familia/wiki/Demo%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3\n[7]:\thttps://github.com/baidu/Familia/issues\n[8]:\thttps://arxiv.org/pdf/1707.09823.pdf\n[9]:\tLICENSE\n\n[image-1]:\thttps://travis-ci.org/baidu/Familia.svg?branch=master\n[image-2]:\thttps://img.shields.io/pypi/l/Django.svg\n \n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4106:09BF:B40E3:2E8ADB:6AB92EA7"},"text_sha256":"2a6384788588f7ea938273f6a03fa93a35ba6b2ab87ec0acd2420128505b19fb"},{"path":"README.md","size":4738,"blob_sha":"f6faf5f66fecbc6f111db614614b43849dd5a07d","priority":0,"status":200,"text":"<a href=\"http://github.com/baidu/Familia\">\n\t<img style=\"vertical-align: top;\" src=\"https://raw.githubusercontent.com/wiki/baidu/Familia/img/logo.png?raw=true\" alt=\"logo\" height=\"140px\">\n<\/a>\n\n[![Build Status][image-1]][1]\n[![License][image-2]]()\n\n**Familia** 开源项目包含文档主题推断工具、语义匹配计算工具以及基于工业级语料训练的三种主题模型：Latent Dirichlet Allocation(LDA)、SentenceLDA 和Topical Word Embedding(TWE)。 支持用户以“拿来即用”的方式进行文本分类、文本聚类、个性化推荐等多种场景的调研和应用。考虑到主题模型训练成本较高以及开源主题模型资源有限的现状，我们会陆续开放基于工业级语料训练的多个垂直领域的主题模型，以及这些模型在工业界的典型应用方式，助力主题模型技术的科研和落地。([**English**][10])\n\n## 应用介绍\n**Familia**目前包含的主题模型的对应论文介绍可以参考[相关论文][3]。\n\n主题模型在工业界的应用范式可以抽象为两大类: 语义表示和语义匹配。\n\n- **语义表示 (Semantic Representation)**\n    对文档进行主题降维，获得文档的语义表示，这些语义表示可以应用于文本分类、文本内容分析、CTR预估等下游应用。\n\n- **语义匹配 (Semantic Matching)**\n\n\t计算文本间的语义匹配度，我们提供两种文本类型的相似度计算方式:\n\n\t- 短文本-长文本相似度计算，使用场景包括文档关键词抽取、计算搜索引擎查询和网页的相似度等等。\n\t- 长文本-长文本相似度计算，使用场景包括计算两篇文档的相似度、计算用户画像和新闻的相似度等等。\n\n更详细的内容及工业界应用案例可以参考[**Familia Wiki**][4]\n\n## 代码编译\n第三方依赖包括`gflags-2.0`，`glogs-0.3.4`，`protobuf-2.5.0`, 同时要求编译器支持C++11, `g++ >= 4.8`, 兼容Linux和Mac操作系统。\n默认情况下执行以下脚本会自动获取依赖并安装。\n\n\t$ sh build.sh # 包含获取并安装第三方依赖的过程\n\n## 模型下载\n\n\t$ cd model\n\t$ sh download_model.sh\n\n* 关于模型的详细配置说明可以参考[模型说明][5]\n\n我们会陆续开放不同领域的多种主题模型，来满足更多不同的场景需求。\n\n## Demo\n**Familia**自带的Demo包含以下功能：\n-  **语义表示计算**\n   利用主题模型对输入文档进行主题推断，以得到文档的主题降维表示。\n\n-  **语义匹配计算**\n   计算文本之间的相似度，包括短文本-长文本、长文本-长文本间的相似度计算。\n\n-  **模型内容展现**\n    对模型的主题词，近邻词进行展现，方便用户对模型的主题有直观的理解。\n\n具体的Demo使用说明可以参考[使用文档][6]\n\n## 注意事项\n\n* 若出现找不到libglog.so, libgflags.so等动态库错误，请添加third\\_party至环境变量的`LD_LIBRARY_PATH`中。\n\n\t`export LD_LIBRARY_PATH=./third_party/lib:$LD_LIBRARY_PATH`\n\n* 代码中内置简易的FMM分词工具，只针对主题模型中出现的词表进行正向匹配。若对分词和语义准确度有更高要求，建议使用商用分词工具，并使用自定义词表的功能导入主题模型中的词表。\n\n## 问题咨询\n\n欢迎提交任何问题和Bug Report至[Github Issues][7].\n或者发送咨询邮件至{ familia } at baidu.com\n\n## Citation\n\nThe following article describes the Familia project and industrial cases powered by topic modeling. It bundles and translates the Chinese documentation of the website. We recommend citing this article as default.\n\nDi Jiang, Zeyu Chen, Rongzhong Lian, Siqi Bao and Chen Li. 2017. [Familia: An Open-Source Toolkit for Industrial Topic Modeling][8]. arXiv preprint arXiv:1707.09823.\n\n\t@article{jiang2017familia,\n\t  author = {Di Jiang and Zeyu Chen and Rongzhong Lian and Siqi Bao and Chen Li},\n\t  title = {{Familia: An Open-Source Toolkit for Industrial Topic Modeling}},\n\t  journal = {arXiv preprint arXiv:1707.09823},\n\t  year = {2017}\n\t}\n\n## Copyright and License\n\nFamilia is provided under the [BSD-3-Clause License][9].\n\n[1]:\thttp://travis-ci.org/baidu/Familia\n[3]:\thttps://github.com/baidu/Familia/wiki/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE\n[4]:\thttps://github.com/baidu/Familia/wiki\n[5]:\thttps://github.com/baidu/Familia/blob/master/model/README.md\n[6]:\thttps://github.com/baidu/Familia/wiki/Demo%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3\n[7]:\thttps://github.com/baidu/Familia/issues\n[8]:\thttps://arxiv.org/pdf/1707.09823.pdf\n[9]:\tLICENSE\n[10]:   https://github.com/baidu/Familia/blob/master/README.EN.md\n\n[image-1]:\thttps://travis-ci.org/baidu/Familia.svg?branch=master\n[image-2]:\thttps://img.shields.io/pypi/l/Django.svg\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"84AA:3BB77:17CD71:5E74F1:6AB92EA4"},"text_sha256":"940a4cfafd420e795b44e57502fe323ba9a270bf197e1d9d58e52ad419df8fe8"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1400","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D8:62B94:17E6792:1C113D9:6AB92EA8"},"commit":{"sha":"958febfd5fe7a61e46a35bfb084e71f806dde6a6","url":"https://github.com/baidu/Familia/commit/958febfd5fe7a61e46a35bfb084e71f806dde6a6","date":"2021-07-01T08:28:32Z","author_date":"2021-07-01T08:28:32Z","committer_date":"2021-07-01T08:28:32Z","tree_sha":"e26da90331da4fcc9cec249ecb8f5d3147ee9a1d","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1399","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FB:7580A:1826AE4:1C519DE:6AB92EA9"},"tree_truncated":false,"document_candidates":[{"path":"README.EN.md","size":6623,"blob_sha":"ee1d3424cf3164feab8e10acedd72b25a3d1cef2","priority":0},{"path":"README.md","size":7512,"blob_sha":"c54ce2a3eeccbcce01c92faebc579e1e12a071fa","priority":0}],"documents":[{"path":"README.EN.md","size":6623,"blob_sha":"ee1d3424cf3164feab8e10acedd72b25a3d1cef2","priority":0,"status":200,"text":"<a href=\"http://github.com/baidu/Familia\">\n\t<img style=\"vertical-align: top;\" src=\"https://raw.githubusercontent.com/wiki/baidu/Familia/img/logo.png?raw=true\" alt=\"logo\" height=\"140px\">\n<\/a>\n\n[![Build Status][image-1]][1]\n[![License][image-2]]()\n\n**Familia** is an open-source project, which implements three popular topic models based on the large-scale industrial data. They are Latent Dirichlet Allocation(LDA)、SentenceLDA and Topical Word Embedding(TWE). In addition, **Familia** offers several tools including lda-infer and lda-query-doc-sim. **Familia** could be easily applied to many tasks, such as document classification, document clustering and personalized recommendation. Due to the high cost of model training, we will continue to release well-trained topic models based on the various types of large-scale data.  \n\n## News!!!\nRecently, we launched the Familia's LDA model in [PaddleHub](https://github.com/PaddlePaddle/PaddleHub) 1.8 version. According to different datasets, we launched three LDA models: lda_news, lda_novel, lda_webpage.\n\nPaddleHub is very convenient to use. Let's use lda_news as an example.\n\n1. First, before using PaddleHub, you need to install the PaddlePaddle deep learning framework. For more installation instructions, please refer to [PaddlePaddle Quick Installation] (https://www.paddlepaddle.org.cn/install/quick).\n\n2. Install Paddlehub: `pip install paddlehub`\n\n3. lda_news model installation: `hub install lda_news`\n\n4. API usage\n``` python\nimport paddlehub as hub\n\nlda_news = hub.Module(name=\"lda_news\")\njsd, hd = lda_news.cal_doc_distance(doc_text1=\"今天的天气如何，适合出去游玩吗\", doc_text2=\"感觉今天的天气不错，可以出去玩一玩了\")\n# jsd = 0.003109, hd = 0.0573171\n\nlda_sim = lda_news.cal_query_doc_similarity(query='百度搜索引擎', document='百度是全球最大的中文搜索引擎、致力于让网民更便捷地获取信息，找到所求。百度超过千亿的中文网页数据库，可以瞬间找到相关的搜索结果。')\n# LDA similarity = 0.06826\n\nresults = lda_news.cal_doc_keywords_similarity('百度是全球最大的中文搜索引擎、致力于让网民更便捷地获取信息，找到所求。百度超过千亿的中文网页数据库，可以瞬间找到相关的搜索结果。')\n# [{'word': '百度', 'similarity': 0.12943492762349573}, \n#  {'word': '信息', 'similarity': 0.06139783578769882}, \n#  {'word': '找到', 'similarity': 0.055296603463188265}, \n#  {'word': '搜索', 'similarity': 0.04270794098349327}, \n#  {'word': '全球', 'similarity': 0.03773627056367886}, \n#  {'word': '超过', 'similarity': 0.03478658388202199}, \n#  {'word': '相关', 'similarity': 0.026295857219683725}, \n#  {'word': '获取', 'similarity': 0.021313585287833996}, \n#  {'word': '中文', 'similarity': 0.020187103312009513}, \n#  {'word': '搜索引擎', 'similarity': 0.007092890537169911}]\n```\nMore detailed introduction and usage can be found here: https://www.paddlepaddle.org.cn/hublist?filter=en_category&value=SemanticModel\n\n\n## Introduction\nThe details of topic models implemented by **Familia** can be referred to [papers on topic models][3].\n\nGenerally, the applications adopting topic models are categorized into two parts: Semantic Representation and Semantic Matching.\n\n- **Semantic Representation**\n\n    Topic models are able to mine hidden dimensions (topics) from document collection and generate semantic representations of documents. These generated semantic representations can be used as features for document classification, document content analysis, and CTR     prediction.\n\n- **Semantic Matching**\n\n    We offer two methods to compute semantic similarity between documents:\n    -\tSemantic similarity between short-long documents, which can be applied to keyword extraction and computing query-document semantic  similarity.\n    -\tSemantic similarity between long-long documents, which can be applied to computing semantic similarity between user profile and news article.\n\nMore details can be referred to [**Familia Wiki**][4].\n\n## Compilation\nThe required third parties include `gflags-2.0`，`glogs-0.3.4`，`protobuf-2.5.0`. The complier should support `C++11`, `g++ >= 4.8` and be compatible with linux and mac. The deps could be obtained and installed automatically by running the following script.\n\n\t$ sh build.sh\n\n## Download\n\t$ cd model\n\t$ sh download_model.sh\n\nMore details can be referred to [Models][5].\n\n## Demo\n**Familia** demo includes the following functions:\n-\t**Semantic Representation**\n   utilize topic models to infer the topic distribution of the input document.\n   \n-\t**Semantic Matching**\n\tcompute semantic similarity between short-long or long-long documents.\n\n-\t**Topic Show**\n\tdemonstrate top words under each topic for users’ better understanding.\n  \nMore details can be referred to [Demos][6].\n\n## Tips\n* If libglog.so, libgflags.so and other dynamic libraries could not be found, please add third\\_party to the environmental parameter `LD_LIBRARY_PATH`.\n\n\t`export LD_LIBRARY_PATH=./third_party/lib:$LD_LIBRARY_PATH`\n\n## Contact\n[Github Issues][7]\n\n{familia} at baidu.com\n\n## Citation\n\nThe following article describes the Familia project and industrial cases powered by topic modeling. It bundles and translates the Chinese documentation of the website. We recommend citing this article as default.\n\nDi Jiang, Yuanfeng Song, Rongzhong Lian, Siqi Bao, Jinhua Peng, Huang He and Hua Wu. 2018. [Familia: A Configurable Topic Modeling Framework for Industrial Text Engineering][8]. arXiv preprint arXiv:1808.03733.\n\n\t@article{jiang2018familia,\n  \t  author = {Di Jiang and Yuanfeng Song and Rongzhong Lian and Siqi Bao and Jinhua Peng and Huang He and Hua Wu},\n  \t  title = {{Familia: A Configurable Topic Modeling Framework for Industrial Text Engineering}},\n  \t  journal = {arXiv preprint arXiv:1808.03733},\n  \t  year = {2018}\n\t}\n\nFurther Reading: [Federated Topic Modeling][11]\n\n## Copyright and License\n\nFamilia is provided under the [BSD-3-Clause License][9].\n\n[1]:\thttp://travis-ci.org/baidu/Familia\n[3]:\thttps://github.com/baidu/Familia/wiki/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE\n[4]:\thttps://github.com/baidu/Familia/wiki\n[5]:\thttps://github.com/baidu/Familia/blob/master/model/README.md\n[6]:\thttps://github.com/baidu/Familia/wiki/Demo%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3\n[7]:\thttps://github.com/baidu/Familia/issues\n[8]:\thttps://arxiv.org/abs/1808.03733v2\n[9]:\tLICENSE\n[11]:   https://github.com/baidu/Familia/blob/master/papers/FTM.pdf\n\n[image-1]:\thttps://travis-ci.org/baidu/Familia.svg?branch=master\n[image-2]:\thttps://img.shields.io/pypi/l/Django.svg\n \n\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6AD2:149227:183E5A:5EE55D:6AB92EA8"},"text_sha256":"ffedf938e53e2479884fe6d526c112004ba1e3b16181162e1c171842b329d1b9"},{"path":"README.md","size":7512,"blob_sha":"c54ce2a3eeccbcce01c92faebc579e1e12a071fa","priority":0,"status":200,"text":"<a href=\"http://github.com/baidu/Familia\">\n\t<img style=\"vertical-align: top;\" src=\"https://raw.githubusercontent.com/wiki/baidu/Familia/img/logo.png?raw=true\" alt=\"logo\" height=\"140px\">\n<\/a>\n\n[![Build Status][image-1]][1]\n[![License][image-2]]()\n\n**Familia** 开源项目包含文档主题推断工具、语义匹配计算工具以及基于工业级语料训练的三种主题模型：Latent Dirichlet Allocation(LDA)、SentenceLDA 和Topical Word Embedding(TWE)。 支持用户以“拿来即用”的方式进行文本分类、文本聚类、个性化推荐等多种场景的调研和应用。考虑到主题模型训练成本较高以及开源主题模型资源有限的现状，我们会陆续开放基于工业级语料训练的多个垂直领域的主题模型，以及这些模型在工业界的典型应用方式，助力主题模型技术的科研和落地。([**English**][10])\n\n## News!!!\n\n近期，我们在[PaddleHub](https://github.com/PaddlePaddle/PaddleHub) 1.8版本中上线了**Familia**中的LDA模型，根据数据集的不同，区分为lda_news、lda_novel和lda_webpage。\n\nPaddleHub使用起来非常便捷，我们以lda_news的使用来进行例子介绍。\n\n1. 首先，在使用PaddleHub之前，需要先安装PaddlePaddle深度学习框架，更多安装说明请查阅[飞桨快速安装](https://www.paddlepaddle.org.cn/install/quick)。\n\n2. 安装Paddlehub: `pip install paddlehub`\n\n3. lda_news模型安装：`hub install lda_news`\n\n4. 具体使用：\n``` python\nimport paddlehub as hub\n\nlda_news = hub.Module(name=\"lda_news\")\njsd, hd = lda_news.cal_doc_distance(doc_text1=\"今天的天气如何，适合出去游玩吗\", doc_text2=\"感觉今天的天气不错，可以出去玩一玩了\")\n# jsd = 0.003109, hd = 0.0573171\n\nlda_sim = lda_news.cal_query_doc_similarity(query='百度搜索引擎', document='百度是全球最大的中文搜索引擎、致力于让网民更便捷地获取信息，找到所求。百度超过千亿的中文网页数据库，可以瞬间找到相关的搜索结果。')\n# LDA similarity = 0.06826\n\nresults = lda_news.cal_doc_keywords_similarity('百度是全球最大的中文搜索引擎、致力于让网民更便捷地获取信息，找到所求。百度超过千亿的中文网页数据库，可以瞬间找到相关的搜索结果。')\n# [{'word': '百度', 'similarity': 0.12943492762349573}, \n#  {'word': '信息', 'similarity': 0.06139783578769882}, \n#  {'word': '找到', 'similarity': 0.055296603463188265}, \n#  {'word': '搜索', 'similarity': 0.04270794098349327}, \n#  {'word': '全球', 'similarity': 0.03773627056367886}, \n#  {'word': '超过', 'similarity': 0.03478658388202199}, \n#  {'word': '相关', 'similarity': 0.026295857219683725}, \n#  {'word': '获取', 'similarity': 0.021313585287833996}, \n#  {'word': '中文', 'similarity': 0.020187103312009513}, \n#  {'word': '搜索引擎', 'similarity': 0.007092890537169911}]\n```\n\n更加具体的介绍和使用方法可以看这里：https://www.paddlepaddle.org.cn/hublist?filter=en_category&value=SemanticModel \n\n\n## 应用介绍\n**Familia**目前包含的主题模型的对应论文介绍可以参考[相关论文][3]。\n\n主题模型在工业界的应用范式可以抽象为两大类: 语义表示和语义匹配。\n\n- **语义表示 (Semantic Representation)**\n    对文档进行主题降维，获得文档的语义表示，这些语义表示可以应用于文本分类、文本内容分析、CTR预估等下游应用。\n\n- **语义匹配 (Semantic Matching)**\n\n\t计算文本间的语义匹配度，我们提供两种文本类型的相似度计算方式:\n\n\t- 短文本-长文本相似度计算，使用场景包括文档关键词抽取、计算搜索引擎查询和网页的相似度等等。\n\t- 长文本-长文本相似度计算，使用场景包括计算两篇文档的相似度、计算用户画像和新闻的相似度等等。\n\n更详细的内容及工业界应用案例可以参考[**Familia Wiki**][4] ，\n如果想要对上述应用范式进行基于Web的可视化展示，可以参考[**Familia-Visualization**][12]。\n\n## 代码编译\n第三方依赖包括`gflags-2.0`，`glogs-0.3.4`，`protobuf-2.5.0`, 同时要求编译器支持C++11, `g++ >= 4.8`, 兼容Linux和Mac操作系统。\n默认情况下执行以下脚本会自动获取依赖并安装。\n\n\t$ sh build.sh # 包含获取并安装第三方依赖的过程\n\n## 模型下载\n\n\t$ cd model\n\t$ sh download_model.sh\n\n* 关于模型的详细配置说明可以参考[模型说明][5]\n\n我们会陆续开放不同领域的多种主题模型，来满足更多不同的场景需求。\n\n## Demo\n**Familia**自带的Demo包含以下功能：\n-  **语义表示计算**\n   利用主题模型对输入文档进行主题推断，以得到文档的主题降维表示。\n\n-  **语义匹配计算**\n   计算文本之间的相似度，包括短文本-长文本、长文本-长文本间的相似度计算。\n\n-  **模型内容展现**\n    对模型的主题词，近邻词进行展现，方便用户对模型的主题有直观的理解。\n\n具体的Demo使用说明可以参考[使用文档][6]\n\n## 注意事项\n\n* 若出现找不到libglog.so, libgflags.so等动态库错误，请添加third\\_party至环境变量的`LD_LIBRARY_PATH`中。\n\n\t`export LD_LIBRARY_PATH=./third_party/lib:$LD_LIBRARY_PATH`\n\n* 代码中内置简易的FMM分词工具，只针对主题模型中出现的词表进行正向匹配。若对分词和语义准确度有更高要求，建议使用商用分词工具，并使用自定义词表的功能导入主题模型中的词表。\n\n## 问题咨询\n\n欢迎提交任何问题和Bug Report至[Github Issues][7]。\n或者发送咨询邮件至{ familia } at baidu.com\n\n## Docker\n\n```\ndocker run -d \\\n    --name familia \\\n    -e MODEL_NAME=news \\\n    -p 5000:5000 \\\n    orctom/familia\n```\nMODEL_NAME can be one of `news`/`novel`/`webpage`/`webo`\n\n### API\n\n```\nhttp://localhost:5000/swagger/\n```\n\n## Citation\n\nThe following article describes the Familia project and industrial cases powered by topic modeling. It bundles and translates the Chinese documentation of the website. We recommend citing this article as default.\n\nDi Jiang, Yuanfeng Song, Rongzhong Lian, Siqi Bao, Jinhua Peng, Huang He, Hua Wu. 2018. [Familia: A Configurable Topic Modeling Framework for Industrial Text Engineering][8]. arXiv preprint arXiv:1808.03733.\n\t\n\t@article{jiang2018familia,\n\t  author = {Di Jiang and Yuanfeng Song and Rongzhong Lian and Siqi Bao and Jinhua Peng and Huang He and Hua Wu},\n\t  title = {{Familia: A Configurable Topic Modeling Framework for Industrial Text Engineering}},\n\t  journal = {arXiv preprint arXiv:1808.03733},\n\t  year = {2018}\n\t}\n\t\nFurther Reading: [Federated Topic Modeling][11]\n\n\n## Copyright and License\n\nFamilia is provided under the [BSD-3-Clause License][9].\n\n[1]:\thttp://travis-ci.org/baidu/Familia\n[3]:\thttps://github.com/baidu/Familia/wiki/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE\n[4]:\thttps://github.com/baidu/Familia/wiki\n[5]:\thttps://github.com/baidu/Familia/blob/master/model/README.md\n[6]:\thttps://github.com/baidu/Familia/wiki/Demo%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3\n[7]:\thttps://github.com/baidu/Familia/issues\n[8]:\thttps://arxiv.org/abs/1808.03733v2\n[9]:\tLICENSE\n[10]:   https://github.com/baidu/Familia/blob/master/README.EN.md\n[11]:   https://github.com/baidu/Familia/blob/master/papers/FTM.pdf\n[12]:   https://github.com/gmission/Familia-Visualization\n\n[image-1]:\thttps://travis-ci.org/baidu/Familia.svg?branch=master\n[image-2]:\thttps://img.shields.io/pypi/l/Django.svg\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"12E0:B08CF:176C0E:5E12FE:6AB92EA9"},"text_sha256":"b78965842d5f1b7eeebb776f37769e9bf7606bf4ccd8e5bccbb7ff30e25e881b"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fhamborg/news-please","input_row":{"repository":"fhamborg/news-please","url":"https://github.com/fhamborg/news-please","name":"news-please","owner":"fhamborg","description":"news-please - an integrated web crawler and information extractor for news that just works","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2493,"issues":182,"created_at":"2016-12-18T17:00:02Z","updated_at":"2026-09-23T19:49:45Z","first_commit_at":"2016-09-17T09:43:47Z","last_commit_at":"2026-04-14T21:17:41Z","activity_months":114.86,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:42.187Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fhamborg/news-please","visibility":"public","created_at":"2016-12-18T17:00:02Z","updated_at":"2026-09-23T19:49:45Z","private":false,"fork":false,"archived":false,"stargazers_count":2493,"open_issues_count":9,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1398","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FB:72727:17D30B3:1BFDDC7:6AB92EAA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1397","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"530F:74E6D:182C56E:1C5774A:6AB92EAA"},"commit":{"sha":"4e5245ded38c707a889edfad8480b3a5b1b2a3ec","url":"https://github.com/fhamborg/news-please/commit/4e5245ded38c707a889edfad8480b3a5b1b2a3ec","date":"2018-05-21T10:44:13Z","author_date":"2018-05-21T10:44:13Z","committer_date":"2018-05-21T10:44:13Z","tree_sha":"054075cdd3c5fb196d8eacf84cfbf0c1ff7a62d8","message_first_line":"Merge pull request #58 from ntlf/elastic-query"},"tree_request_status":200,"tree_rate":{"github_remaining":"1396","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C5:72727:17D3136:1BFDE55:6AB92EAA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10724,"blob_sha":"86ff583dd21f64f24abb3437b999b553f94c2b71","priority":0}],"documents":[{"path":"README.md","size":10724,"blob_sha":"86ff583dd21f64f24abb3437b999b553f94c2b71","priority":0,"status":200,"text":"# **news-please** #\n\n## Announcement\nIf you're interested in news analysis, you might also want to check out our new project, [Giveme5W](https://github.com/fhamborg/Giveme5W) - a tool that extracts phrases answering the journalistic five W questions to describe an article's main event, i.e., who did what, when, where, and why.\n \n[![PyPI version](https://badge.fury.io/py/news-please.svg)](https://badge.fury.io/py/news-please)\n\n<img align=\"right\" height=\"128px\" width=\"128px\" src=\"https://raw.githubusercontent.com/fhamborg/news-please/master/misc/logo/logo-256.png\" /> \n\nnews-please is an open source, easy-to-use news crawler that extracts structured information from almost any news website. It can follow recursively internal hyperlinks and read RSS feeds to fetch both most recent and also old, archived articles. You only need to provide the root URL of the news website. news-please combines the power of multiple state-of-the-art libraries and tools, such as [scrapy](https://scrapy.org/), [Newspaper](https://github.com/codelucas/newspaper), and [readability](https://github.com/buriy/python-readability). news-please also features a library mode, which allows developers to use the crawling and extraction functionality within their own program. Moreover, news-please allows to conveniently [crawl and extract articles](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/commoncrawl.py) from commoncrawl.org.\n\n## Extracted information\n* headline\n* lead paragraph\n* main content (textual)\n* main image\n* author's name\n* publication date\n* language\n\n## Features\n* **works out of the box**: install with pip, add URLs of your pages, run :-)\n* run news-please conveniently with the **CLI** or use it as a **library** within your own software or to extract articles from **the news archive of commoncrawl.org**\n* runs on your favorite Python version (2.7 and 3+)\n\n### Modes and use cases\nnews-please supports three use cases, which are explained in more detail in the following.\n\n#### CLI mode\n* stores extracted results in **JSON files or ElasticSearch** (you can implement other storages easily)\n* **simple but extensive configuration** (if you want to tweak the results)\n* revisions: crawl articles multiple times and track changes\n\n#### Library mode\n* crawl and extract information given a list of article URLs. \n\n#### News archive from commoncrawl.org\n* commoncrawl.org provides an extensive, free-to-use archive of news articles from small and major publishers world wide\n* news-please enables users to conveniently download and extract articles from commoncrawl.org\n* you can optionally define filter criteria, such as news publisher(s) or the date period, within which articles need to be published\n* clone the news-please repository, adapt the config section in [newsplease/examples/commoncrawl.py](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/commoncrawl.py), and execute `python3 -m newsplease.examples.commoncrawl`\n\n## Getting started\nIt's super easy, we promise!\n\n### Installation\nWe prefer Python 3, but Python 2.7 is supported, too!\n```\n$ pip3 install news-please \n```\n\n### Use within your own code (as a library)\nYou can access the core functionality of news-please, i.e. extraction of semi-structured information from one or more news articles, in your own code by using news-please in library mode. If you want to use news-please's full website extraction (given only the root URL) or continuous crawling mode (using RSS), you need to use the CLI mode.\n```python\nfrom newsplease import NewsPlease\narticle = NewsPlease.from_url('https://www.nytimes.com/2017/02/23/us/politics/cpac-stephen-bannon-reince-priebus.html?hp')\nprint(article.title)\n```\nA sample of an extracted article can be found [here (as a JSON file)](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/sample.json).\n\nIf you want to crawl multiple articles at a time\n```python\nNewsPlease.from_urls([url1, url2, ...])\n```\nor if you have a file containing all URLs (each line containing a single URL)\n```python\nNewsPlease.from_file(path)\n```\nor if you have raw HTML data (you can also provide the original URL to increase the accuracy of extracting the correct publishing date)\n```python\nNewsPlease.from_html(html, url=None) \n```\nor if you have a [WARC file](https://github.com/webrecorder/warcio) (also check out our [commoncrawl workflow](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/commoncrawl.py), which provides convenient methods to filter commoncrawl's archive for specific hosts and dates)\n```\nNewsPlease.from_warc(warc_record)\n```\nIn library mode, news-please will attempt to download and extract information from each URL. The previously described functions are blocking, i.e., will return once news-please has attempted all URLs. The resulting list contains all successfully extracted articles.\n\n### Run the crawler (via the CLI)\n\n```\n$ news-please\n```\n\nnews-please will then start crawling a few examples pages. To terminate the process press `CTRL+C`. news-please will then shut down within 5-60 seconds. You can also press `CTRL+C` twice, which will immediately kill the process (not recommended, though).\n\nThe results are stored by default in JSON files in the `data` folder. In the default configuration, news-please also stores the original HTML files.\n\n### Crawl other pages\n\nOf course, you want to crawl other websites. Simply go into the [`sitelist.hjson`](https://github.com/fhamborg/news-please/wiki/user-guide#sitelisthjson) file and add the root URLs of the news outlets' web pages of your choice. \n\n### ElasticSearch\n\nnews-please also supports export to ElasticSearch. Using Elasticsearch will also enable the versioning feature. First, enable it in the [`config.cfg`](https://github.com/fhamborg/news-please/wiki/configuration) at the config directory, which is by default `~/news-please/config` but can also be changed with the `-c` parameter to a custom location. In case the directory does not exist, a default directory will be created at the specified location.\n\n    [Scrapy]\n    \n    ITEM_PIPELINES = {\n                       'newsplease.pipeline.pipelines.ArticleMasterExtractor':100,\n                       'newsplease.pipeline.pipelines.ElasticsearchStorage':350\n                     }\n\nThat's it! Except, if your Elasticsearch database is not located at `http://localhost:9200`, uses a different username/password or CA-certificate authentication. In these cases, you will also need to change the following.\n\n    [Elasticsearch]\n\n    host = localhost\n    port = 9200    \n\n    ...\n\n    # Credentials used  for authentication (supports CA-certificates):\n    \n    use_ca_certificates = False           # True if authentification needs to be performed \n    ca_cert_path = '/path/to/cacert.pem'  \n    client_cert_path = '/path/to/client_cert.pem'  \n    client_key_path = '/path/to/client_key.pem'  \n    username = 'root'  \n    secret = 'password' \n\n### What's next?\n\nWe have collected a bunch of useful information for both [users](https://github.com/fhamborg/news-please/wiki/user-guide)  and [developers](https://github.com/fhamborg/news-please/wiki/developer-guide). As a user, you will most likely only deal with two files: [`sitelist.hjson`](https://github.com/fhamborg/news-please/wiki/user-guide#sitelisthjson) (to define sites to be crawled) and [`config.cfg`](https://github.com/fhamborg/news-please/wiki/configuration) (probably only rarely, in case you want to tweak the configuration).\n\n## Wiki and support\nYou can find more information on usage and development in our [wiki](https://github.com/fhamborg/news-please/wiki)! Before contacting us, please check out the wiki. If you still have questions on how to use news-please, please create a new [issue](https://github.com/fhamborg/news-please/issues) on GitHub. Make sure to include information about your Python version, operating system, which version of news-please you are running, and how use news-please (installed or git clone).\n\n## Acknowledgements\nThis project would not have been possible without the contributions of the following students (ordered alphabetically):\n\n* Moritz Bock\n* Michael Fried\n* Jonathan Hassler\n* Markus Klatt\n* Kevin Kress\n* Sören Lachnit\n* Marvin Pafla\n* Franziska Schlor\n* Matt Sharinghousen\n* Claudio Spener\n* Moritz Steinmaier\n\nWe also thank all other contributors, which you can find on the [contributors' page](https://github.com/fhamborg/news-please/graphs/contributors)!\n\n## How to cite\nIf you are using news-please, please cite our [paper](http://www.gipp.com/wp-content/papercite-data/pdf/hamborg2017.pdf) ([ResearchGate](https://www.researchgate.net/publication/314072045_news-please_A_Generic_News_Crawler_and_Extractor), [Mendeley](https://www.mendeley.com/research-papers/newsplease-generic-news-crawler-extractor/)):\n```\n@InProceedings{Hamborg2017,\n  author     = {Hamborg, Felix and Meuschke, Norman and Breitinger, Corinna and Gipp, Bela},\n  title      = {news-please: A Generic News Crawler and Extractor},\n  year       = {2017},\n  booktitle  = {Proceedings of the 15th International Symposium of Information Science},\n  location   = {Berlin},\n  editor     = {Gaede, Maria and Trkulja, Violeta and Petra, Vivien},\n  pages      = {218--223},\n  month      = {March}\n}\n```\nYou can find more information on this and other news projects on our [website](https://felix.hamborg.eu/).\n\n## Contribution and custom features\nDo you want to contribute? Great, we are always happy for any support on this project! Just send a pull request. By contributing to this project, you agree that your contributions will be licensed under the project's license (see below). If you have questions or issues while working on the code, e.g., when implementing a new feature that you would like to have added to news-please, open an issue on GitHub and we'll be happy to help you. Please note that we usually do not have enough resources to implement features requested by users - instead we recommend to implement them yourself, and send a pull request. \n\n## License\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use news-please except in compliance with the License. A copy of the License is included in the project, see the file [LICENSE.txt](LICENSE.txt).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The news-please logo is courtesy of [Mario Hamborg](https://mario.hamborg.eu/). \n\nCopyright 2016-2018 The news-please team\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D604:3BB77:17CDA0:5E756F:6AB92EAB"},"text_sha256":"9e58231f0de8738659138be2f0c879b973a4526df258663420dac6e06a0330af"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1395","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AA:77994:181183F:1C3C5F9:6AB92EAB"},"commit":{"sha":"f899850be2bb0059da101c13502ec88af057f974","url":"https://github.com/fhamborg/news-please/commit/f899850be2bb0059da101c13502ec88af057f974","date":"2026-04-14T21:17:41Z","author_date":"2026-04-14T21:17:41Z","committer_date":"2026-04-14T21:17:41Z","tree_sha":"9a145d1c53870e358d4175dae4fbf4babb155748","message_first_line":"Remove outdated announcements from README"},"tree_request_status":200,"tree_rate":{"github_remaining":"1394","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B7:1C46F8:17EC214:1C16599:6AB92EAC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14565,"blob_sha":"a2b03f23c316101f630de308d23e18029a02c11d","priority":0}],"documents":[{"path":"README.md","size":14565,"blob_sha":"a2b03f23c316101f630de308d23e18029a02c11d","priority":0,"status":200,"text":"# **news-please** #\n\n[![PyPI version](https://img.shields.io/pypi/v/news-please.svg)](https://pypi.org/project/news-please/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4120316.svg)](http://dx.doi.org/10.5281/zenodo.4120316)\n\n<img align=\"right\" height=\"128px\" width=\"128px\" src=\"https://raw.githubusercontent.com/fhamborg/news-please/master/misc/logo/logo-256.png\" />\n\nnews-please is an open source, easy-to-use news crawler that extracts structured information from almost any news website. It can recursively follow internal hyperlinks and read RSS feeds to fetch both most recent and also old, archived articles. You only need to provide the root URL of the news website to crawl it completely. news-please combines the power of multiple state-of-the-art libraries and tools, such as [scrapy](https://scrapy.org/), [Newspaper](https://github.com/AndyTheFactory/newspaper4k), and [readability](https://github.com/buriy/python-readability).\n\nnews-please also allows Python developers to use the crawling and extraction functionality within their own program. Moreover, news-please allows to conveniently [crawl and extract articles](/newsplease/examples/commoncrawl.py) from the (very) large news archive at commoncrawl.org.\n\nIf you want to contribute to news-please, please first read [here](#contributions).\n\n## Extracted information\nnews-please extracts the following attributes from news articles. An examplary json file as extracted by news-please can be found [here](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/sample.json).\n* headline\n* lead paragraph\n* main text\n* main image\n* name(s) of author(s)\n* publication date\n* language\n\n## Features\n* **works out of the box**: install with pip, add URLs of your pages, run :-)\n* run news-please conveniently using its [**CLI**](#run-the-crawler-via-the-cli) mode\n* use it as a [**library**](#use-within-your-own-code-as-a-library) within your own software\n* extract articles from [**commoncrawl.org's news archive**](#news-archive-from-commoncrawlorg)\n\n### Modes and use cases\nnews-please supports three main use cases, which are explained in more detail in the following.\n\n#### CLI mode\n* stores extracted results in JSON files, PostgreSQL, ElasticSearch, Redis, or your own storage\n* simple but extensive configuration (if you want to tweak the results)\n* revisions: crawl articles multiple times and track changes\n\n#### Library mode\n* crawl and extract information given a list of article URLs\n* to use news-please within your own Python code\n\n#### News archive from commoncrawl.org\n* commoncrawl.org provides an extensive, free-to-use archive of news articles from small and major publishers world wide\n* news-please enables users to conveniently download and extract articles from commoncrawl.org\n* you can optionally define filter criteria, such as news publisher(s) or the date period, within which articles need to be published\n* clone the news-please repository, adapt the config section in [newsplease/examples/commoncrawl.py](/newsplease/examples/commoncrawl.py), and execute `python3 -m newsplease.examples.commoncrawl`\n\n## Getting started\nIt's super easy, we promise!\n\n### Installation\nnews-please runs on Python 3.8+.\n```bash\n$ pip install news-please\n```\n\n### Use within your own code (as a library)\nYou can access the core functionality of news-please, i.e. extraction of semi-structured information from one or more news articles, in your own code by using news-please in library mode. If you want to use news-please's full website extraction (given only the root URL) or continuous crawling mode (using RSS), you'll need to use the CLI mode, which is described later.\n```python\nfrom newsplease import NewsPlease\narticle = NewsPlease.from_url('https://www.nytimes.com/2017/02/23/us/politics/cpac-stephen-bannon-reince-priebus.html?hp')\nprint(article.title)\n```\nA sample of an extracted article can be found [here (as a JSON file)](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/sample.json).\n\nIf you want to crawl multiple articles at a time, optionally with any optional parameter taken by [requests.request()](https://requests.readthedocs.io/en/latest/api/#requests.request) \n```python\nNewsPlease.from_urls([url1, url2, ...], request_args={\"timeout\": 6})\n```\nor if you have a file containing all URLs (each line containing a single URL)\n```python\nNewsPlease.from_file(path)\n```\nor if you have raw HTML data (you can also provide the original URL to increase the accuracy of extracting the publishing date)\n```python\nNewsPlease.from_html(html, url=None)\n```\nor if you have a [WARC file](https://github.com/webrecorder/warcio) (also check out our [commoncrawl workflow](https://github.com/fhamborg/news-please/blob/master/newsplease/examples/commoncrawl.py), which provides convenient methods to filter commoncrawl's archive for specific news outlets and dates)\n```python\nNewsPlease.from_warc(warc_record)\n```\nIn library mode, news-please will attempt to download and extract information from each URL. The previously described functions are blocking, i.e., will return once news-please has attempted all URLs. The resulting list contains all successfully extracted articles.\n\nFinally, you can process the extracted information contained in the article object(s). For example, to export into a JSON format, you may use:\n\n```python\nimport json\n\nwith open(\"article.json\", \"w\") as file:\n    json.dump(article.get_serializable_dict(), file)\n```\n\n### Run the crawler (via the CLI)\n\n```bash\n$ news-please\n```\n\nnews-please will then start crawling a few examples pages. To terminate the process press `CTRL+C`. news-please will then shut down within 5-60 seconds. You can also press `CTRL+C` twice, which will immediately kill the process (not recommended, though).\n\nThe results are stored by default in JSON files in the `data` folder. In the default configuration, news-please also stores the original HTML files.\n\n### Crawl other pages\n\nMost likely, you will not want to crawl from the websites provided in our example configuration. Simply head over to the [`sitelist.hjson`](https://github.com/fhamborg/news-please/wiki/user-guide#sitelisthjson) file and add the root URLs of the news outlets' web pages of your choice. news-please also can extract the most recent events from the [GDELT project](https://www.gdeltproject.org/), see [here](https://github.com/fhamborg/news-please/blob/master/newsplease/crawler/spiders/gdelt_crawler.py).\n\n### ElasticSearch\n\nnews-please also supports export to ElasticSearch. Using Elasticsearch will also enable the versioning feature. First, enable it in the [`config.cfg`](https://github.com/fhamborg/news-please/wiki/configuration) at the config directory, which is by default `~/news-please/config` but can also be changed with the `-c` parameter to a custom location. In case the directory does not exist, a default directory will be created at the specified location.\n\n```cfg\n[Scrapy]\nITEM_PIPELINES = {\n  'newsplease.pipeline.pipelines.ArticleMasterExtractor':100,\n  'newsplease.pipeline.pipelines.ElasticsearchStorage':350\n}\n```\n\nThat's it! Except, if your Elasticsearch database is not located at `http://localhost:9200`, uses a different username/password or CA-certificate authentication. In these cases, you will also need to change the following.\n\n```cfg\n[Elasticsearch]\nhost = localhost\nport = 9200\n...\n\n# Credentials used  for authentication (supports CA-certificates):\nuse_ca_certificates = False           # True if authentification needs to be performed\nca_cert_path = '/path/to/cacert.pem'\nclient_cert_path = '/path/to/client_cert.pem'\nclient_key_path = '/path/to/client_key.pem'\nusername = 'root'\nsecret = 'password'\n```\n\n### PostgreSQL\nnews-please allows for storing of articles to a PostgreSQL database, including the versioning feature. To export to PostgreSQL, open the corresponding config file (`config_lib.cfg` for library mode and `config.cfg` for CLI mode) and add the PostgresqlStorage module to the pipeline and adjust the database credentials:\n\n```cfg\n[Scrapy]\nITEM_PIPELINES = {\n  'newsplease.pipeline.pipelines.ArticleMasterExtractor':100,\n  'newsplease.pipeline.pipelines.PostgresqlStorage':350\n}\n\n[Postgresql]\n# Postgresql-Connection required for saving meta-informations\nhost = localhost\nport = 5432\ndatabase = 'news-please'\n# schema = 'news-please'\nuser = 'user'\npassword = 'password'\n```\nIf you plan to use news-please and its export to PostgreSQL in a production environment, we recommend to uninstall the `psycopg2-binary` package and install `psycopg2`. We use the former since it does not require a C compiler in order to be installed. See [here](https://pypi.org/project/psycopg2-binary/), for more information on differences between `psycopg2` and `psycopg2-binary` and how to setup a production environment.\n\n### Redis\nnews-please allows to store articles on a Redis database, including the versioning feature. To export to Redis, open the corresponding config file (`config_lib.cfg` for library mode and `config.cfg` for CLI mode) and add the RedisStorage module to the pipeline and adjust the connection credentials:\n\n```cfg\n[Scrapy]\nITEM_PIPELINES = {\n  'newsplease.pipeline.pipelines.ArticleMasterExtractor':100,\n  'newsplease.pipeline.pipelines.RedisStorage':350\n}\n\n[Redis]\nhost = localhost\nport = 6379\ndb = 0\n\n# You can add any redis connection parameter here\nssl_check_hostname = True\nusername = \"news-please\"\nmax_connections = 24\n```\n\nThis pipeline should also be compatible with AWS Elasticache and GCP MemoryStore\n\n### What's next?\nWe have collected a bunch of useful information for both [users](https://github.com/fhamborg/news-please/wiki/user-guide)  and [developers](https://github.com/fhamborg/news-please/wiki/developer-guide). As a user, you will most likely only deal with two files: [`sitelist.hjson`](https://github.com/fhamborg/news-please/wiki/user-guide#sitelisthjson) (to define sites to be crawled) and [`config.cfg`](https://github.com/fhamborg/news-please/wiki/configuration) (probably only rarely, in case you want to tweak the configuration).\n\n## Support\nYou can find more information on usage and development in our [wiki](https://github.com/fhamborg/news-please/wiki)! Before contacting us, please check out the wiki. If you still have questions on how to use news-please, please create a new [question](https://github.com/fhamborg/news-please/discussions) in Discussionson here on GitHub. Please understand that we are not able to provide individual support via email. We think that help is more valuable if it is shared publicly so that more people can benefit from it. However, if you still require individual support, e.g., due to confidentiality of your project, we may be able to provide you with private consultation. Contact [us](mailto:felix@textada.org) for information about pricing and further details.\n\n### Issues\nFor bug reports, we ask you to use the Bug report template. Make sure you're using the latest version of news-please, since we cannot give support for older versions. As described earlier, we cannot give support for issues or questions sent by email.\n\n### Donation\nYour donations are greatly appreciated! They will free us up to work on this project more, to take on tasks such as adding new features, bug-fix support, and addressing further concerns with the library. \n\n* [GitHub Sponsors](https://github.com/sponsors/fhamborg)\n\n## Acknowledgements\nThis project would not have been possible without the contributions of the following students (ordered alphabetically):\n\n* Moritz Bock\n* Michael Fried\n* Jonathan Hassler\n* Markus Klatt\n* Kevin Kress\n* Sören Lachnit\n* Marvin Pafla\n* Franziska Schlor\n* Matt Sharinghousen\n* Claudio Spener\n* Moritz Steinmaier\n\nWe also thank all other contributors, which you can find on the [contributors page](https://github.com/fhamborg/news-please/graphs/contributors)!\n\n## How to cite\nIf you are using news-please, please cite our [paper](http://www.gipp.com/wp-content/papercite-data/pdf/hamborg2017.pdf) ([ResearchGate](https://www.researchgate.net/publication/314072045_news-please_A_Generic_News_Crawler_and_Extractor), [Mendeley](https://www.mendeley.com/research-papers/newsplease-generic-news-crawler-extractor/)):\n```\n@InProceedings{Hamborg2017,\n  author     = {Hamborg, Felix and Meuschke, Norman and Breitinger, Corinna and Gipp, Bela},\n  title      = {news-please: A Generic News Crawler and Extractor},\n  year       = {2017},\n  booktitle  = {Proceedings of the 15th International Symposium of Information Science},\n  location   = {Berlin},\n  doi        = {10.5281/zenodo.4120316},\n  pages      = {218--223},\n  month      = {March}\n}\n```\nYou can find more information on this and other news projects on our [website](https://felix.hamborg.eu/).\n\n## Contributions\nDo you want to contribute? Great, we are always happy for any support on this project! We are particularly looking for pull requests that fix [bugs](https://github.com/fhamborg/news-please/issues). We also welcome pull requests that contribute your own ideas. \n\nBy contributing to this project, you agree that your contributions will be licensed under the project's [license](#license).\n\n### Pull requests\nWe love contributions by our users! If you plan to submit a pull request, please open an issue first and desribe the issue you want to fix or what you want to improve and how! This way, we can discuss whether your idea could be added to news-please in the first place and, if so, how it could best be implemented in order to fit into architecture and coding style. In the issue, please state that you're planning to implement the described features. \n\n### Custom features\nUnfortunately, we do not have resources to implement features requested by users. Instead, we recommend that you implement features you need and if you'd like open a pull request here so that the community can benefit from your improvements, too.\n\n## License\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use news-please except in compliance with the License. A copy of the License is included in the project, see the file [LICENSE.txt](LICENSE.txt).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The news-please logo is courtesy of [Mario Hamborg](https://mario.hamborg.eu/).\n\nCopyright 2016-2024 The news-please team\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"73C4:324E19:1825D1:5ECC76:6AB92EAB"},"text_sha256":"3cf5335f24dbdabb7281a171066265d6e2d6aa08540bbebb312637cbcb2647cf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"undertheseanlp/underthesea","input_row":{"repository":"undertheseanlp/underthesea","url":"https://github.com/undertheseanlp/underthesea","name":"underthesea","owner":"undertheseanlp","description":"Underthesea - AI Assistant","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1806,"issues":299,"created_at":"2017-03-01T10:24:26Z","updated_at":"2026-09-25T04:49:35Z","first_commit_at":"2017-03-01T10:23:59Z","last_commit_at":"2026-09-05T05:06:15Z","activity_months":114.15000000000001,"ai_ml_match_topics":"nlp; llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:44.979Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"undertheseanlp/underthesea","visibility":"public","created_at":"2017-03-01T10:24:26Z","updated_at":"2026-09-25T04:49:35Z","private":false,"fork":false,"archived":false,"stargazers_count":1806,"open_issues_count":38,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1393","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078A:6E4BB:18251E3:1C4F96B:6AB92EAD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1392","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0850:228A99:180FE82:1C3ADCA:6AB92EAD"},"commit":{"sha":"315e6eb12765932331229be9082c3534ec8fbb03","url":"https://github.com/undertheseanlp/underthesea/commit/315e6eb12765932331229be9082c3534ec8fbb03","date":"2018-05-06T14:40:27Z","author_date":"2018-05-06T14:40:27Z","committer_date":"2018-05-06T14:40:27Z","tree_sha":"7bf98d5230143885d9f5a228d26a89fdc994666b","message_first_line":"Merge pull request #183 from magizbox/develop"},"tree_request_status":200,"tree_rate":{"github_remaining":"1391","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085F:70FF5:17FC0EF:1C26C0A:6AB92EAD"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":8861,"blob_sha":"63cec94f30247fc70cc858dd8fd0b3d06c98db2d","priority":0},{"path":"README.vi.rst","size":9336,"blob_sha":"ad80609d3272b6fb6828a491c3379ec7dfce25ac","priority":0}],"documents":[{"path":"README.rst","size":8861,"blob_sha":"63cec94f30247fc70cc858dd8fd0b3d06c98db2d","priority":0,"status":200,"text":"====================================\nUnderthesea - Vietnamese NLP Toolkit\n====================================\n\n\n.. image:: https://img.shields.io/pypi/v/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/pypi/pyversions/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/pypi/l/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/travis/magizbox/underthesea.svg\n        :target: https://travis-ci.org/magizbox/underthesea\n\n.. image:: https://readthedocs.org/projects/underthesea/badge/?version=latest\n        :target: http://underthesea.readthedocs.io/en/latest/\n        :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/magizbox/underthesea/shield.svg\n        :target: https://pyup.io/repos/github/magizbox/underthesea/\n        :alt: Updates\n\n.. image:: https://img.shields.io/badge/chat-on%20facebook-green.svg\n    :target: https://www.facebook.com/undertheseanlp/\n\n|\n\n`[English] <https://github.com/magizbox/underthesea/>`_\n`[Tiếng Việt] <https://github.com/magizbox/underthesea/blob/master/README.vi.rst>`_\n\n.. image:: https://raw.githubusercontent.com/magizbox/underthesea/master/logo.jpg\n        :target: https://raw.githubusercontent.com/magizbox/underthesea/master/logo.jpg\n\n**underthesea** is a suite of open source Python modules, data sets and tutorials supporting research and development in Vietnamese Natural Language Processing.\n\n* Free software: GNU General Public License v3\n* Documentation: `https://underthesea.readthedocs.io <http://underthesea.readthedocs.io/en/latest/>`_\n* Live demo: `underthesea app <http://magizbox.com:9386/#/>`_\n* Facebook Page: `https://www.facebook.com/undertheseanlp/ <https://www.facebook.com/undertheseanlp/>`_\n\nInstallation\n----------------------------------------\n\nTo install underthesea, simply:\n\n.. code-block:: bash\n\n    $ pip install underthesea==1.1.8a0\n    ✨🍰✨\n\nSatisfaction, guaranteed.\n\nUsage\n----------------------------------------\n\n* `1. Word Segmentation <#1-word-segmentation>`_\n* `2. POS Tagging <#2-pos-tagging>`_\n* `3. Chunking <#3-chunking>`_\n* `4. Named Entity Recognition <#4-named-entity-recognition>`_\n* `5. Text Classification <#5-text-classification>`_\n* `6. Sentiment Analysis <#6-sentiment-analysis>`_\n\n\n****************************************\n1. Word Segmentation\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-94%25-red.svg\n        :target: https://github.com/undertheseanlp/word_tokenize\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n        :target: https://github.com/undertheseanlp/word_tokenize\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#word_sent\n\nUsage\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import word_tokenize\n    >>> sentence = 'Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò'\n\n    >>> word_tokenize(sentence)\n    ['Chàng trai', '9X', 'Quảng Trị', 'khởi nghiệp', 'từ', 'nấm', 'sò']\n\n    >>> word_tokenize(sentence, format=\"text\")\n    'Chàng_trai 9X Quảng_Trị khởi_nghiệp từ nấm sò'\n\n****************************************\n2. POS Tagging\n****************************************\n\n.. image:: https://img.shields.io/badge/accuracy-92.3%25-red.svg\n        :target: https://github.com/undertheseanlp/pos_tag\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n        :target: https://github.com/undertheseanlp/pos_tag\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#pos-tag\n\nUsage\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import pos_tag\n    >>> pos_tag('Chợ thịt chó nổi tiếng ở Sài Gòn bị truy quét')\n    [('Chợ', 'N'),\n     ('thịt', 'N'),\n     ('chó', 'N'),\n     ('nổi tiếng', 'A'),\n     ('ở', 'E'),\n     ('Sài Gòn', 'Np'),\n     ('bị', 'V'),\n     ('truy quét', 'V')]\n\n****************************************\n3. Chunking\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-77%25-red.svg\n\t\t:target: https://github.com/undertheseanlp/chunking\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n\t\t:target: https://github.com/undertheseanlp/chunking\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#chunking\n\nUsage\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import chunk\n    >>> text = 'Bác sĩ bây giờ có thể thản nhiên báo tin bệnh nhân bị ung thư?'\n    >>> chunk(text)\n    [('Bác sĩ', 'N', 'B-NP'),\n     ('bây giờ', 'P', 'I-NP'),\n     ('có thể', 'R', 'B-VP'),\n     ('thản nhiên', 'V', 'I-VP'),\n     ('báo tin', 'N', 'B-NP'),\n     ('bệnh nhân', 'N', 'I-NP'),\n     ('bị', 'V', 'B-VP'),\n     ('ung thư', 'N', 'I-VP'),\n     ('?', 'CH', 'O')]\n\n****************************************\n4. Named Entity Recognition\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-86.6%25-red.svg\n\t\t:target: https://github.com/undertheseanlp/ner\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n\t\t:target: https://github.com/undertheseanlp/ner\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#ner\n\nUsage\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import ner\n    >>> text = 'Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump'\n    >>> ner(text)\n    [('Chưa', 'R', 'O', 'O'),\n     ('tiết lộ', 'V', 'B-VP', 'O'),\n     ('lịch trình', 'V', 'B-VP', 'O'),\n     ('tới', 'E', 'B-PP', 'O'),\n     ('Việt Nam', 'Np', 'B-NP', 'B-LOC'),\n     ('của', 'E', 'B-PP', 'O'),\n     ('Tổng thống', 'N', 'B-NP', 'O'),\n     ('Mỹ', 'Np', 'B-NP', 'B-LOC'),\n     ('Donald', 'Np', 'B-NP', 'B-PER'),\n     ('Trump', 'Np', 'B-NP', 'I-PER')]\n\n****************************************\n5. Text Classification\n****************************************\n\n.. image:: https://img.shields.io/badge/accuracy-86.7%25-red.svg\n    :target: https://github.com/undertheseanlp/classification\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n    :target: https://github.com/undertheseanlp/classification\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#classify\n\nInstall dependencies and download default model\n\n.. code-block:: bash\n\n    $ pip install Cython\n    $ pip install joblib future scipy numpy scikit-learn\n    $ pip install -U fasttext --no-cache-dir --no-deps --force-reinstall\n    $ underthesea data\n\nUsage\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import classify\n    >>> classify('HLV đầu tiên ở Premier League bị sa thải sau 4 vòng đấu')\n    ['The thao']\n    >>> classify('Hội đồng tư vấn kinh doanh Asean vinh danh giải thưởng quốc tế')\n    ['Kinh doanh']\n    >>> classify('Đánh giá “rạp hát tại gia” Samsung Soundbar Sound+ MS750')\n    ['Vi tinh']\n\n****************************************\n6. Sentiment Analysis\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-59.5%25-red.svg\n\t\t:target: https://github.com/undertheseanlp/sentiment\n\n.. image:: https://img.shields.io/badge/✎-custom%20models-blue.svg\n    :target: https://github.com/undertheseanlp/sentiment\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#sentiment\n\nInstall dependencies\n\n.. code-block:: bash\n\n    $ pip install future scipy numpy scikit-learn==0.19.0 joblib\n\nUsage\n\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import sentiment\n    >>> sentiment('Gọi mấy lần mà lúc nào cũng là các chuyên viên đang bận hết ạ', domain='bank')\n    ('CUSTOMER SUPPORT#NEGATIVE',)\n    >>> sentiment('bidv cho vay hay ko phu thuoc y thich cua thang tham dinh, ko co quy dinh ro rang', domain='bank')\n    ('LOAN#NEGATIVE',)\n\nUp Coming Features\n----------------------------------------\n\n* Text to Speech\n* Automatic Speech Recognition\n* Machine Translation\n* Dependency Parsing\n\nContributing\n----------------------------------------\n\nDo you want to contribute with underthesea development? Great! Please read more details at `CONTRIBUTING.rst. <https://github.com/magizbox/underthesea/blob/master/CONTRIBUTING.rst>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F3E:349C76:179C61:5E3F9E:6AB92EAD"},"text_sha256":"ff76ae74a5584968c311a444fc9a00b5f9a574f024e1c272f5abc00228e797d5"},{"path":"README.vi.rst","size":9336,"blob_sha":"ad80609d3272b6fb6828a491c3379ec7dfce25ac","priority":0,"status":200,"text":"========================================================\nUnderthesea - Công cụ xử lý ngôn ngữ tự nhiên tiếng Việt\n========================================================\n\n.. image:: https://img.shields.io/pypi/v/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/pypi/pyversions/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/pypi/l/underthesea.svg\n        :target: https://pypi.python.org/pypi/underthesea\n\n.. image:: https://img.shields.io/travis/magizbox/underthesea.svg\n        :target: https://travis-ci.org/magizbox/underthesea\n\n.. image:: https://readthedocs.org/projects/underthesea/badge/?version=latest\n        :target: http://underthesea.readthedocs.io/en/latest/\n        :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/magizbox/underthesea/shield.svg\n        :target: https://pyup.io/repos/github/magizbox/underthesea/\n        :alt: Updates\n\n.. image:: https://img.shields.io/badge/liên%20hệ-qua%20facebook-green.svg\n    :target: https://www.facebook.com/undertheseanlp/\n\n|\n\n`[English] <https://github.com/magizbox/underthesea/>`_\n`[Tiếng Việt] <https://github.com/magizbox/underthesea/blob/master/README.vi.rst>`_\n\n.. image:: https://raw.githubusercontent.com/magizbox/underthesea/master/logo.jpg\n        :target: https://raw.githubusercontent.com/magizbox/underthesea/master/logo.jpg\n\n**underthesea** là tập hợp các dự án, nguồn dữ liệu mở, tài liệu hướng dẫn với mục đích hỗ trợ việc nghiên cứu và phát triển trong lĩnh vực xử lý ngôn ngữ tự nhiên tiếng Việt.\n\n* Nguồn mở: GNU General Public License v3\n* Tài liệu: `https://underthesea.readthedocs.io <http://underthesea.readthedocs.io/en/latest/>`_\n* Demo: `underthesea app <http://magizbox.com:9386/#/>`_\n* Facebook Page: `https://www.facebook.com/undertheseanlp/ <https://www.facebook.com/undertheseanlp/>`_\n\nCài đặt\n----------------------------------------\n\nViệc cài đặt underthesea được thực hiện thông qua pip\n\n.. code-block:: bash\n\n    $ pip install underthesea==1.1.8a0\n    ✨🍰✨\n\n\nSử dụng\n----------------------------------------\n\n* `1. Tách từ <#1-tách-từ>`_\n* `2. Gán nhãn từ loại <#2-gán-nhãn-từ-loại>`_\n* `3. Xác định cụm từ <#3-xác-định-cụm-từ>`_\n* `4. Nhận diện thực thể có tên <#4-nhận-diện-thực-thể-có-tên>`_\n* `5. Phân loại văn bản <#5-phân-loại-văn-bản>`_\n* `6. Phân tích cảm xúc <#6-phân-tích-cảm-xúc>`_\n\n\n****************************************\n1. Tách từ\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-94%25-red.svg\n        :target: https://github.com/magizbox/underthesea.word_sent\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n        :target: https://github.com/undertheseanlp/word_sent\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#word_sent\n\nSử dụng\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import word_tokenize\n    >>> sentence = 'Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò'\n\n    >>> word_tokenize(sentence)\n    ['Chàng trai', '9X', 'Quảng Trị', 'khởi nghiệp', 'từ', 'nấm', 'sò']\n\n    >>> word_tokenize(sentence, format=\"text\")\n    'Chàng_trai 9X Quảng_Trị khởi_nghiệp từ nấm sò'\n\n****************************************\n2. Gán nhãn từ loại\n****************************************\n\n.. image:: https://img.shields.io/badge/accuracy-92.3%25-red.svg\n        :target: https://github.com/magizbox/underthesea.pos_tag\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n        :target: https://github.com/undertheseanlp/pos_tag\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#pos-tag\n\nSử dụng\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import pos_tag\n    >>> pos_tag('Chợ thịt chó nổi tiếng ở Sài Gòn bị truy quét')\n    [('Chợ', 'N'),\n     ('thịt', 'N'),\n     ('chó', 'N'),\n     ('nổi tiếng', 'A'),\n     ('ở', 'E'),\n     ('Sài Gòn', 'Np'),\n     ('bị', 'V'),\n     ('truy quét', 'V')]\n\n****************************************\n3. Xác định cụm từ\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-77%25-red.svg\n\t\t:target: https://github.com/magizbox/underthesea.chunking\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n\t\t:target: https://github.com/undertheseanlp/chunking\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#chunking\n\nSử dụng\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import chunk\n    >>> text = 'Bác sĩ bây giờ có thể thản nhiên báo tin bệnh nhân bị ung thư?'\n    >>> chunk(text)\n    [('Bác sĩ', 'N', 'B-NP'),\n     ('bây giờ', 'P', 'I-NP'),\n     ('có thể', 'R', 'B-VP'),\n     ('thản nhiên', 'V', 'I-VP'),\n     ('báo tin', 'N', 'B-NP'),\n     ('bệnh nhân', 'N', 'I-NP'),\n     ('bị', 'V', 'B-VP'),\n     ('ung thư', 'N', 'I-VP'),\n     ('?', 'CH', 'O')]\n\n****************************************\n4. Nhận diện thực thể có tên\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-86.6%25-red.svg\n\t\t:target: https://github.com/magizbox/underthesea.ner\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n\t\t:target: https://github.com/undertheseanlp/ner\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#ner\n\nSử dụng\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import ner\n    >>> text = 'Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump'\n    >>> ner(text)\n    [('Chưa', 'R', 'O', 'O'),\n     ('tiết lộ', 'V', 'B-VP', 'O'),\n     ('lịch trình', 'V', 'B-VP', 'O'),\n     ('tới', 'E', 'B-PP', 'O'),\n     ('Việt Nam', 'Np', 'B-NP', 'B-LOC'),\n     ('của', 'E', 'B-PP', 'O'),\n     ('Tổng thống', 'N', 'B-NP', 'O'),\n     ('Mỹ', 'Np', 'B-NP', 'B-LOC'),\n     ('Donald', 'Np', 'B-NP', 'B-PER'),\n     ('Trump', 'Np', 'B-NP', 'I-PER')]\n\n****************************************\n5. Phân loại văn bản\n****************************************\n\n.. image:: https://img.shields.io/badge/accuracy-86.7%25-red.svg\n    :target: https://github.com/magizbox/underthesea.classification\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n    :target: https://github.com/undertheseanlp/classification\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#classify\n\nCài đặt các gói liên quan và tải mô hình\n\n.. code-block:: bash\n\n    $ pip install Cython\n    $ pip install joblib future scipy numpy scikit-learn\n    $ pip install -U fasttext --no-cache-dir --no-deps --force-reinstall\n    $ underthesea data\n\nSử dụng\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import classify\n    >>> classify('HLV đầu tiên ở Premier League bị sa thải sau 4 vòng đấu')\n    ['The thao']\n    >>> classify('Hội đồng tư vấn kinh doanh Asean vinh danh giải thưởng quốc tế')\n    ['Kinh doanh']\n    >>> classify('Đánh giá “rạp hát tại gia” Samsung Soundbar Sound+ MS750')\n    ['Vi tinh']\n\n****************************************\n6. Phân tích cảm xúc\n****************************************\n\n.. image:: https://img.shields.io/badge/F1-59.5%25-red.svg\n\t\t:target: https://github.com/undertheseanlp/sentiment\n\n.. image:: https://img.shields.io/badge/✎-tùy%20biến%20mô%20hình-blue.svg\n    :target: https://github.com/undertheseanlp/sentiment\n\n.. image:: https://img.shields.io/badge/★-api-green.svg\n    :target: http://underthesea.readthedocs.io/en/latest/package_reference.html#sentiment\n\nCài đặt các gói liên quan\n\n.. code-block:: bash\n\n    $ pip install future scipy numpy scikit-learn==0.19.0 joblib\n\nSử dụng\n\n\n.. code-block:: python\n\n    >>> # -*- coding: utf-8 -*-\n    >>> from underthesea import sentiment\n    >>> sentiment('Gọi mấy lần mà lúc nào cũng là các chuyên viên đang bận hết ạ', domain='bank')\n    ('CUSTOMER SUPPORT#NEGATIVE',)\n    >>> sentiment('bidv cho vay hay ko phu thuoc y thich cua thang tham dinh, ko co quy dinh ro rang', domain='bank')\n    ('LOAN#NEGATIVE',)\n\nCác tính năng sắp tới\n----------------------------------------\n\n* Tổng hợp tiếng nói\n* Nhận dạng tiếng nói\n* Dịch máy\n* Phân tích cú pháp phụ thuộc\n\nĐóng góp\n----------------------------------------\n\nBạn đang muốn đóng góp cho dự án underthesea? Tuyệt vời! Đọc hướng dẫn chi tiết tại `CONTRIBUTING.rst. <https://github.com/magizbox/underthesea/blob/master/CONTRIBUTING.rst>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4F3E:349C76:179C66:5E3FAB:6AB92EAE"},"text_sha256":"52d88362c858e885a594b55ff427cc4ffbdc02f55c72bead46d71f94a8a50727"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1390","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078E:2EA1B4:17FD76F:1C28916:6AB92EAF"},"commit":{"sha":"39d7506666144665a01f481956d867c6885f8c95","url":"https://github.com/undertheseanlp/underthesea/commit/39d7506666144665a01f481956d867c6885f8c95","date":"2026-06-28T08:09:25Z","author_date":"2026-06-28T08:09:25Z","committer_date":"2026-06-28T08:09:25Z","tree_sha":"426c4756205ec41e7a584b63eda2983c1667599c","message_first_line":"Merge pull request #1049 from undertheseanlp/fix/ruff-b904-tts-import"},"tree_request_status":200,"tree_rate":{"github_remaining":"1389","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0821:3BE445:17B9314:1BE2CC1:6AB92EAF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9932,"blob_sha":"d10e7de607a4a3f363c08463ee1e075fe91f4077","priority":0}],"documents":[{"path":"README.md","size":9932,"blob_sha":"d10e7de607a4a3f363c08463ee1e075fe91f4077","priority":0,"status":200,"text":"<p align=\"center\">\n  <br>\n  <img src=\"https://raw.githubusercontent.com/undertheseanlp/underthesea/main/docs/static/img/logo.png\"/>\n  <br/>\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://pypi.python.org/pypi/underthesea\">\n    <img src=\"https://img.shields.io/pypi/v/underthesea.svg\">\n  <\/a>\n  <a href=\"https://pypi.python.org/pypi/underthesea\">\n    <img src=\"https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue\">\n  <\/a>\n  <a href=\"http://undertheseanlp.com/\">\n    <img src=\"https://img.shields.io/badge/demo-live-brightgreen\">\n  <\/a>\n  <a href=\"https://undertheseanlp.github.io/underthesea/\">\n    <img src=\"https://img.shields.io/badge/docs-live-brightgreen\">\n  <\/a>\n  <a href=\"https://colab.research.google.com/drive/1gD8dSMSE_uNacW4qJ-NSnvRT85xo9ZY2\">\n    <img src=\"https://img.shields.io/badge/colab-ff9f01?logo=google-colab&logoColor=white\">\n  <\/a>\n  <a href=\"https://www.facebook.com/undertheseanlp/\">\n    <img src=\"https://img.shields.io/badge/Facebook-1877F2?logo=facebook&logoColor=white\">\n  <\/a>\n  <a href=\"https://www.youtube.com/channel/UC9Jv1Qg49uprg6SjkyAqs9A\">\n    <img src=\"https://img.shields.io/badge/YouTube-FF0000?logo=youtube&logoColor=white\">\n  <\/a>\n<\/p>\n\n<br/>\n\n<p align=\"center\">\n  <a href=\"https://github.com/undertheseanlp/underthesea/blob/main/docs/contribute/SPONSORS.md\">\n    <img src=\"https://img.shields.io/badge/sponsors-30-red?style=social&logo=GithubSponsors\">\n  <\/a>\n<\/p>\n\n<h3 align=\"center\">\nOpen-source Agentic AI Toolkit\n<\/h3>\n\n`Underthesea` is:\n\n🌊 **An Agentic AI Toolkit.** Since v9.3.0, Underthesea is an open-source Agentic AI Toolkit with built-in Vietnamese NLP capabilities. It provides multi-provider AI Agent support and a suite of Python modules for [Vietnamese Natural Language Processing](https://github.com/undertheseanlp/underthesea).\n\n🎁 [**Support Us!**](#-support-us) Every bit of support helps us achieve our goals. Thank you so much. 💝💝💝\n\n## Installation\n\n```bash\n$ pip install underthesea\n```\n\n## Agent\n\nMulti-provider AI Agent with **zero external dependencies**. Communicates with LLM APIs using only Python stdlib (`urllib` + `json`) — no `openai`, `anthropic`, or `google-genai` packages required.\n\n**Providers:** OpenAI | Azure OpenAI | Anthropic Claude | Google Gemini\n\n### Quick Start\n\n```bash\n# Pick one provider:\n$ export OPENAI_API_KEY=sk-...\n# or Azure:\n$ export AZURE_OPENAI_API_KEY=... && export AZURE_OPENAI_ENDPOINT=https://...\n# or Anthropic:\n$ export ANTHROPIC_API_KEY=sk-ant-...\n# or Gemini:\n$ export GOOGLE_API_KEY=...\n```\n\n```python\nfrom underthesea.agent import Agent, LLM\n\nagent = Agent(name=\"assistant\", provider=LLM())\nagent(\"Hello!\")\n```\n\n### Providers\n\nEach provider is its own class, following the [Anthropic SDK](https://docs.anthropic.com/en/api/client-sdks) pattern.\n\n```python\nfrom underthesea.agent import Agent, OpenAI, AzureOpenAI, Anthropic, Gemini, LLM\n\n# OpenAI\nagent = Agent(name=\"bot\", provider=OpenAI(api_key=\"sk-...\"))\n\n# Azure OpenAI\nagent = Agent(name=\"bot\", provider=AzureOpenAI(\n    api_key=\"...\",\n    endpoint=\"https://my.openai.azure.com\",\n    deployment=\"gpt-4\",\n))\n\n# Anthropic Claude\nagent = Agent(name=\"bot\", provider=Anthropic(api_key=\"sk-ant-...\"))\n\n# Google Gemini\nagent = Agent(name=\"bot\", provider=Gemini(api_key=\"...\"))\n\n# Auto-detect from environment variables\nagent = Agent(name=\"bot\", provider=LLM())\n```\n\n### Streaming\n\n```python\nfor chunk in agent.stream(\"Explain what an AI agent is\"):\n    print(chunk, end=\"\", flush=True)\n```\n\n### Tool Calling\n\n```python\nfrom underthesea.agent import Agent, Tool, OpenAI\n\ndef get_weather(location: str) -> dict:\n    \"\"\"Get current weather for a location.\"\"\"\n    return {\"location\": location, \"temp\": 25, \"condition\": \"sunny\"}\n\nagent = Agent(\n    name=\"assistant\",\n    provider=OpenAI(),\n    tools=[Tool(get_weather)],\n    instruction=\"You are a helpful assistant.\",\n)\n\nagent(\"What's the weather in Hanoi?\")\n# 'The weather in Hanoi is 25°C and sunny.'\n```\n\n### Default Tools\n\n12 built-in tools: calculator, datetime, web search, wikipedia, file I/O, shell, python exec.\n\n```python\nfrom underthesea.agent import Agent, default_tools, LLM\n\nagent = Agent(name=\"assistant\", provider=LLM(), tools=default_tools)\nagent(\"Calculate sqrt(144) + 10\")\n```\n\n### Multi-Session\n\nLong-running agents with context reset and structured handoff between sessions, following [Anthropic harness patterns](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents).\n\n```python\nfrom underthesea.agent import Agent, Session, AzureOpenAI\n\nagent = Agent(name=\"researcher\", provider=AzureOpenAI(...))\nsession = Session(agent, progress_file=\"progress.json\")\nsession.create_task(\"Analyze documents\", [\n    \"Read and classify documents\",\n    \"Summarize each group\",\n    \"Write final report\",\n])\nsession.run_until_complete(max_sessions=5)\n```\n\n### Tracing\n\nEvery agent call is automatically traced to `~/.underthesea/traces/`. Disable with `UNDERTHESEA_TRACE_DISABLED=1`.\n\n```python\nfrom underthesea.agent import Agent, LangfuseTracer, calculator_tool\n\n# Auto local trace (default) — zero config\nagent = Agent(name=\"bot\", tools=[calculator_tool])\nagent(\"What is 2+2?\")\n# >> Trace [a1b2c3] bot\n#    |-- Generation: llm.chat #1 (gpt-4.1-mini) ... 1200ms | 100->18 tokens\n#    |-- Tool: tool.calculator ... 0ms\n#    |-- Generation: llm.chat #2 (gpt-4.1-mini) ... 800ms | 150->12 tokens\n# << Trace [a1b2c3] [ok] 2000ms -> ~/.underthesea/traces/20260411_trace_a1b2c3.json\n\n# Langfuse (pip install langfuse)\nagent = Agent(name=\"bot\", tools=[calculator_tool], tracer=LangfuseTracer())\n\n# @trace decorator — nested functions become child spans\nfrom underthesea.agent.trace import trace, LocalTracer\n\n@trace(LocalTracer())\ndef pipeline(text):\n    return Agent(name=\"bot\")(text)  # auto-inherits trace context\n```\n\n### Serving (A2A)\n\nExpose any agent over the [A2A protocol](https://github.com/google-agentic-commerce/AP2) — JSON-RPC `message/stream` over HTTP+SSE with a discoverable `AgentCard` and an optional bundled chat UI. The server is a raw ASGI app with **no web-framework dep** in the base install — plug it into any ASGI server you like.\n\n```bash\n# Optional convenience extra: uvicorn + starlette + httpx\n$ pip install 'underthesea[agent-server]'\n```\n\n```python\nfrom underthesea.agent import Agent, Tool\nfrom underthesea.agent.server import serve\n\ndef add(a: int, b: int) -> int:\n    \"\"\"Add two integers.\"\"\"\n    return a + b\n\nagent = Agent(name=\"MathAgent\", instruction=\"...\", tools=[Tool(add)])\nserve(agent, port=8000, path=\"/a2a/math\", ui=True)\n# → GET  http://127.0.0.1:8000/a2a/math/ui            (bundled chat UI)\n# → GET  http://127.0.0.1:8000/a2a/math/.well-known/agent-card.json\n# → POST http://127.0.0.1:8000/a2a/math               (JSON-RPC message/stream, SSE)\n```\n\nFor custom routing or your own ASGI server, use `make_app()`:\n\n```python\nfrom underthesea.agent.server import make_app\n\napp = make_app(agent, path=\"/a2a/math\")  # → raw ASGI callable\n# uvicorn module:app\n# hypercorn module:app\n# daphne module:app\n```\n\nOne `Agent` is spawned per A2A `contextId` so each conversation keeps its own history. Tool calls are streamed live as `tool_call` artifacts; the agent's reply arrives as a `text` artifact when the loop finishes.\n\n### Architecture\n\n```\nunderthesea.agent\n├── providers/\n│   ├── OpenAI          # api.openai.com\n│   ├── AzureOpenAI     # *.openai.azure.com\n│   ├── Anthropic       # api.anthropic.com\n│   └── Gemini          # generativelanguage.googleapis.com\n├── trace/\n│   ├── LocalTracer     # JSON files to ~/.underthesea/traces/\n│   ├── LangfuseTracer  # Langfuse v4 observability\n│   └── @trace          # Decorator with auto-nesting\n├── server/\n│   ├── make_app        # Raw ASGI callable (JSON-RPC + SSE + AgentCard)\n│   ├── serve           # uvicorn convenience entrypoint\n│   └── static/         # Bundled chat UI (ui=True)\n├── Agent               # Tool calling loop + streaming\n├── LLM                 # Auto-detect provider from env vars\n├── Session             # Multi-session orchestration\n├── Tool                # Function → tool wrapper\n└── default_tools       # 12 built-in tools\n```\n\n## Vietnamese NLP\n\nSee full documentation at [NLP.md](NLP.md).\n\n| Pipeline | Usage |\n|----------|-------|\n| Sentence Segmentation | `sent_tokenize(text)` |\n| Text Normalization | `text_normalize(text)` |\n| Word Segmentation | `word_tokenize(text)` |\n| POS Tagging | `pos_tag(text)` |\n| Chunking | `chunk(text)` |\n| Named Entity Recognition | `ner(text)` |\n| Text Classification | `classify(text)` |\n| Sentiment Analysis | `sentiment(text)` |\n| Language Detection | `lang_detect(text)` |\n| Dependency Parsing | `dependency_parse(text)` |\n| Translation | `translate(text)` |\n| Text-to-Speech | `tts(text)` |\n\n```python\nfrom underthesea import word_tokenize, ner, sentiment\n\nword_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\")\n# [\"Chàng trai\", \"9X\", \"Quảng Trị\", \"khởi nghiệp\", \"từ\", \"nấm\", \"sò\"]\n\nner(\"Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump\")\n# [... ('Việt Nam', 'Np', 'B-NP', 'B-LOC'), ... ('Donald', 'Np', 'B-NP', 'B-PER'), ('Trump', 'Np', 'B-NP', 'I-PER')]\n\nsentiment(\"Sản phẩm hơi nhỏ nhưng chất lượng tốt, đóng gói cẩn thận.\")\n# 'positive'\n```\n\n## Contributing\n\nDo you want to contribute with underthesea development? Great! Please read more details at [Contributing Guide](https://undertheseanlp.github.io/underthesea/docs/developer/contributing)\n\n## 💝 Support Us\n\nIf you found this project helpful and would like to support our work, you can just buy us a coffee ☕.\n\nYour support is our biggest encouragement 🎁!\n\n<img src=\"https://raw.githubusercontent.com/undertheseanlp/underthesea/main/docs/static/img/support.png\"/>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE42:3B6DE:178D8A:5E3407:6AB92EAF"},"text_sha256":"af5908f784356098d1867b7e43f3299a5f632da1695c1e2ca19c27b8b8fe2c1d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"microsoft/Recognizers-Text","input_row":{"repository":"microsoft/Recognizers-Text","url":"https://github.com/microsoft/Recognizers-Text","name":"Recognizers-Text","owner":"microsoft","description":"Microsoft.Recognizers.Text provides recognition and resolution of numbers, units, date/time, etc. in multiple languages (ZH, EN, FR, ES, PT, DE, IT, TR, HI, NL. Partial support for JA, KO, AR, SV). Packages available at: https://www.nuget.org/profiles/Recognizers.Text, https://www.npmjs.com/~recognizers.text","language":"C#","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1796,"issues":921,"created_at":"2017-04-17T19:45:47Z","updated_at":"2026-09-22T09:52:04Z","first_commit_at":"2017-04-17T19:45:47Z","last_commit_at":"2026-01-23T05:47:42Z","activity_months":105.2,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:49.028Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"microsoft/Recognizers-Text","visibility":"public","created_at":"2017-04-17T19:45:47Z","updated_at":"2026-09-22T09:52:04Z","private":false,"fork":false,"archived":false,"stargazers_count":1796,"open_issues_count":225,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1388","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085B:37D6E2:1834C32:1C5FD62:6AB92EB1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1387","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0803:74181:17AABBF:1BD5B68:6AB92EB1"},"commit":{"sha":"e2db33b297d2f90f97beb0167e310718b303048b","url":"https://github.com/microsoft/Recognizers-Text/commit/e2db33b297d2f90f97beb0167e310718b303048b","date":"2018-05-22T04:45:30Z","author_date":"2018-05-22T04:45:30Z","committer_date":"2018-05-22T04:45:30Z","tree_sha":"ae438fa03c1b32ef297c6730bcfa15417939673a","message_first_line":"Support cases like \"during the day\" as durations in English (#569)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1386","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0786:7418C:183CB97:1C67A33:6AB92EB1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2519,"blob_sha":"1765b393e12a9779e1ea3566d018afdf2c2b8e98","priority":0}],"documents":[{"path":"README.md","size":2519,"blob_sha":"1765b393e12a9779e1ea3566d018afdf2c2b8e98","priority":0,"status":200,"text":"# Microsoft Recognizers Text Overview\r\n\r\n![Build Status](https://msrasia.visualstudio.com/_apis/public/build/definitions/310c848f-b260-4305-9255-b97bfb69974b/116/badge)\r\n![Build Status](https://ci.appveyor.com/api/projects/status/github/Microsoft/Recognizers-Text?branch=master&svg=true&passingText=all%20plats%20-%20OK)\r\n\r\nMicrosoft.Recognizers.Text provides robust recognition and resolution of entities like numbers, units, and date/time; expressed in multiple languages. Full support for Chinese, English, French, Spanish, and Portuguese. Partial support for German and Japanese. More on the way.\r\n\r\n# Utilizing the Project\r\n\r\nMicrosoft.Recognizers.Text powers pre-built entities in both [**LUIS: Language Understanding Intelligent Service**](https://www.luis.ai/home) and [**Microsoft Bot Framework**](https://dev.botframework.com/); and is also available as standalone packages (for the base classes and the different entity recognizers).\r\n\r\nThe Microsoft.Recognizers.Text packages currently target three platforms:\r\n* [C# version](https://github.com/Microsoft/Recognizers-Text/tree/master/.NET) - **NuGet packages** available at: https://www.nuget.org/profiles/Recognizers.Text\r\n* [JavaScript version](https://github.com/Microsoft/Recognizers-Text/tree/master/JavaScript/packages/recognizers-text-suite) - **NPM packages** available at: https://www.npmjs.com/~recognizers.text\r\n* [Python version](https://github.com/Microsoft/Recognizers-Text/tree/master/Python) (in progress)\r\n\r\nContributions are greatly welcome! Both for fixes and extensions in the currently supported languages and for expansion to new ones.\r\nEspecially for Japanese, Italian, Korean, and Dutch.\r\n\r\n# Contributing\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n\r\nThe links below provide tips and an overview on how to contribute. Thank you!\r\n\r\n* [Overview and language resources](https://blog.botframework.com/2018/01/24/contributing-luis-microsoft-recognizers-text-part-1/)\r\n* [Implementing language specific behaviour](https://blog.botframework.com/2018/02/01/contributing-luis-microsoft-recognizers-text-part-2/)\r\n* [Test specs and testing in general](https://blog.botframework.com/2018/02/01/contributing-luis-microsoft-recognizers-text-part-3/)\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7F16:A58F2:177E66:5E2631:6AB92EB2"},"text_sha256":"0af31b981ab31a5d1668077e1543806caf5fbb21d2615d8ea01761c893ededca"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1385","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0919:7307A:17E0D0F:1C0B7B5:6AB92EB3"},"commit":{"sha":"da7edcff59f669b2a460ab9d400e36298f0d658e","url":"https://github.com/microsoft/Recognizers-Text/commit/da7edcff59f669b2a460ab9d400e36298f0d658e","date":"2026-01-23T05:47:42Z","author_date":"2026-01-23T05:47:42Z","committer_date":"2026-01-23T05:47:42Z","tree_sha":"755222faf8e8b5054b7d77300721a4bf03669b52","message_first_line":"Remove unused NuGet.CommandLine dependency to fix CVE-2024-0057 (#3203)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1384","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0933:72727:17D366A:1BFE4A2:6AB92EB3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":9549,"blob_sha":"3c2a5c0188d49555ead8499b8082abcfcaf2565c","priority":0},{"path":"SECURITY.md","size":2780,"blob_sha":"f7b89984f0fb5dd204028bc525e19eefc0859f4f","priority":1}],"documents":[{"path":"README.md","size":9549,"blob_sha":"3c2a5c0188d49555ead8499b8082abcfcaf2565c","priority":0,"status":200,"text":"# Microsoft Recognizers Text Overview\r\n\r\n![Build Status](https://msrasia.visualstudio.com/_apis/public/build/definitions/310c848f-b260-4305-9255-b97bfb69974b/116/badge)\r\n![Build Status](https://ci.appveyor.com/api/projects/status/github/Microsoft/Recognizers-Text?branch=master&svg=true&passingText=all%20plats%20-%20OK)\r\n\r\nMicrosoft.Recognizers.Text provides robust recognition and resolution of entities like numbers, units, and date/time; expressed in multiple languages. Full support for Chinese, English, French, Spanish, Portuguese, German, Italian, Turkish, Hindi, and Dutch. Partial support for Japanese, Korean, Arabic, and Swedish. More on the way.\r\n\r\n# Utilizing the Project\r\n\r\nMicrosoft.Recognizers.Text powers pre-built entities in [**LUIS: Language Understanding Intelligent Service**](https://www.luis.ai/home), [**Power Virtual Agents**](https://powervirtualagents.microsoft.com/en-us/), and [**Microsoft Bot Framework**](https://dev.botframework.com/); base entity types in [**Text Analytics Cognitive Service**](https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking); and it is also available as standalone packages (for the base classes and the different entity recognizers).\r\n\r\nThe Microsoft.Recognizers.Text packages currently target four platforms:\r\n* [C#/.NET](https://github.com/Microsoft/Recognizers-Text/tree/master/.NET) - **NuGet packages** available at: https://www.nuget.org/profiles/Recognizers.Text\r\n* [JavaScript/TypeScript](https://github.com/Microsoft/Recognizers-Text/tree/master/JavaScript/packages/recognizers-text-suite) - **NPM packages** available at: https://www.npmjs.com/~recognizers.text\r\n* [Python](https://github.com/Microsoft/Recognizers-Text/tree/master/Python) - **PyPI packages** available at: https://pypi.org/user/recognizers-text/ (alpha)\r\n* [Java](https://github.com/Microsoft/Recognizers-Text/tree/master/Java) (in progress)\r\n\r\nContributions are greatly welcome! Both for fixes and extensions in the currently supported languages and for expansion to new ones.\r\nEspecially for Japanese, Korean, Arabic, Swedish, and others! More info below.\r\n\r\n.NET is the primary package version and contributions propagate to the other platforms with time.\r\n\r\n## Citing the Recognizers-Text project\r\n\r\nIf you utilize the recognizers in academic works, please cite it as below (you can omit the version number or update it to a specific version if relevant):\r\n\r\n```tex\r\n@software{soft:recognizers-text,\r\n  author    = {Wenhao Huang and Zijia Lin and Chris McConnell and B{\\\"{o}}rje F. Karlsson},\r\n  title     = {{Recognizers-Text}: {R}ecognition and resolution of numbers, units, and date/time entities expressed across multiple languages},\r\n  month     = jul,\r\n  year      = 2017,\r\n  publisher = {Zenodo},\r\n  version   = {1.0.0},\r\n  doi       = {10.5281/zenodo.6860598},\r\n  url       = {https://doi.org/10.5281/zenodo.6860598}\r\n}\r\n```\r\n\r\nFeel free to change \"@software\" to \"@misc\" if it better fits your templates.\r\n\r\n# Help\r\n\r\nIf you have any questions, please go ahead and [open an issue](https://github.com/Microsoft/Recognizers-Text/issues/new/choose), even if it's not an actual bug. Issues are an acceptable discussion forum as well.\r\n\r\n# Contributing\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n\r\nGood starting points for contribution are:\r\n* the list of [open issues](https://github.com/Microsoft/Recognizers-Text/issues) (especially those marked as ```help wanted```); \r\n* the json spec cases temporarily marked as ```NotSupported``` ([Specs](./Specs)); and\r\n* translating json test spec cases that work in English, but don't yet exist in a target language.\r\n\r\nThe links below describe the project structure and provide both an overview and tips on how to contribute (although some steps may have become a little out-of-date). Thank you!\r\n\r\n* [Overview and language resources](https://blog.botframework.com/2018/01/24/contributing-luis-microsoft-recognizers-text-part-1/)\r\n* [Implementing language specific behaviour](https://blog.botframework.com/2018/02/01/contributing-luis-microsoft-recognizers-text-part-2/)\r\n* [Test specs and testing in general](https://blog.botframework.com/2018/02/12/contributing-luis-microsoft-recognizers-text-part-3/)\r\n\r\n# Supported Entities across Cultures\r\n\r\nThe table below summarizes the currently supported entities. Support for English is usually more complete than others. The primary platform is .NET (shown in table) and support should propagate to the others.\r\n\r\n| Entity Type       | EN      | ZH-CN   | NL    | FR     | DE    | IT      | JA     | KO     | PT     | ES      |\r\n|:-----------------:|:-------:|:-------:|:-----:|:------:|:-----:|:-------:|:------:|:------:|:------:|:-------:| \r\n| Number (cardinal)    | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | ✓     | ✓      | ✓       |\r\n| Ordinal              | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | ✓     | ✓      | ✓       |\r\n| Percentage           | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | ✓     | ✓      | ✓       |\r\n| Number Range         | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | PA/EO  | ✓      | ✓     | ✓       |\r\n| Unit - Age           | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | PA/EO  | ✓     | ✓       |\r\n| Unit - Currency      | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | PA/EO  | ✓     | ✓       |\r\n| Unit - Dimensions    | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | PA/EO  | ✓      | ✓      | \r\n| Unit - Temperature   | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | ✓     | ✓      | ✓      | \r\n| Choice - Boolean     | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | **SO** | ✓     | ✓       | \r\n| Seq. - E-mail        | G    | G*       | G    | G      | G     | G       | G*     | G*     | G      | G       |\r\n| Seq. - GUID          | G    | G        | G    | G      | G     | G       | G      | G      | G      | G       |\r\n| Seq. - Social        | G    | G        | G    | G      | G     | G       | G      | G      | G      | G       |\r\n| Seq. - IP Address    | G    | G        | G    | G      | G     | G       | G      | G      | G      | G       |\r\n| Seq. - Phone Number  | G    | G        | G    | G      | G     | G       | G      | G      | G      | G       |\r\n| Seq. - URL           | G    | G*       | G    | G      | G     | G       | G*     | G*     | G      | G       |\r\n| DateTime (+subtypes) | ✓    | ✓       | ✓    | ✓     | ✓     | ✓       | ✓      | **SO** | ✓     | ✓       | \r\n\r\n| Entity Type       | SV      | BG      | TR    | HI     | AR     |         |        |        |        |         |\r\n|:-----------------:|:-------:|:-------:|:-----:|:------:|:------:|:-------:|:------:|:------:|:------:|:-------:| \r\n| Number (cardinal)    | ✓    | :x:     | ✓    | ✓      | PA/EO  |         |        |        |        |         |\r\n| Ordinal              | ✓    | :x:     | ✓    | ✓      | PA/EO  |         |        |        |        |         |\r\n| Percentage           | ✓    | :x:     | ✓    | ✓      | PA/EO  |         |        |        |        |         |\r\n| Number Range         | :x:  | :x:     | ✓     | ✓     | PA/EO  |         |        |        |        |         |\r\n| Unit - Age           | ✓    | :x:     | ✓     | ✓     | :x:    |         |        |        |        |         |\r\n| Unit - Currency      | ✓    | :x:     | ✓     | ✓     | :x:    |         |        |        |        |         |\r\n| Unit - Dimensions    | ✓    | :x:     | ✓     | ✓     | :x:    |         |        |        |        |         | \r\n| Unit - Temperature   | ✓    | :x:     | ✓     | ✓     | :x:    |         |        |        |        |         | \r\n| Choice - Boolean     | ✓    | ✓      | ✓     | ✓      | ✓     |         |        |        |        |         |\r\n| Seq. - E-mail        | G    | G       | G     | G      | G      |         |        |        |        |         |\r\n| Seq. - GUID          | G    | G       | G     | G      | G      |         |        |        |        |         |\r\n| Seq. - Social        | G    | G       | G     | G      | G      |         |        |        |        |         |\r\n| Seq. - IP Address    | G    | G       | G     | G      | G      |         |        |        |        |         |\r\n| Seq. - Phone Number  | :x:  | :x:     | :x:   | :x:    | :x:    |         |        |        |        |         |\r\n| Seq. - URL           | G    | G       | G     | G*     | G*     |         |        |        |        |         |\r\n| DateTime (+subtypes) | **SP** | :x:     | ✓     | ✓     | **SO** |         |        |        |        |         |\r\n\r\n* G: Generic entity, not language-specific (* unicode TLDs not-supported);\r\n* EO: Extraction-only (parsing/resolution/normalization pending);\r\n* PA: Partial support (type not fully supported);\r\n* SO: Specs-only (test specs coverage OK, but support pending);\r\n* SP: Partial specs;\r\n* SI: Very initial specs (typically language support start for a new language).\r\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C190:09ED:E7A79:3FDB89:6AB92EAB"},"text_sha256":"cf53fb228045d216c5e0fd2f628bf1d1f6c132c1663da3eb0b1e1c042b72fc91"},{"path":"SECURITY.md","size":2780,"blob_sha":"f7b89984f0fb5dd204028bc525e19eefc0859f4f","priority":1,"status":200,"text":"<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->\n\n## Security\n\nMicrosoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\n\nIf you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.\n\n## Reporting Security Issues\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\nInstead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).\n\nIf you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).\n\nYou should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). \n\nPlease include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:\n\n  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)\n  * Full paths of source file(s) related to the manifestation of the issue\n  * The location of the affected source code (tag/branch/commit or direct URL)\n  * Any special configuration required to reproduce the issue\n  * Step-by-step instructions to reproduce the issue\n  * Proof-of-concept or exploit code (if possible)\n  * Impact of the issue, including how an attacker might exploit the issue\n\nThis information will help us triage your report more quickly.\n\nIf you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.\n\n## Preferred Languages\n\nWe prefer all communications to be in English.\n\n## Policy\n\nMicrosoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3DD2:18CDF1:17A9DA:5673C3:6AB92EB4"},"text_sha256":"830e94b83c3b6f45ceee5609de6249b2125927f95532e68427f09c99eed5e663"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"chrismattmann/tika-python","input_row":{"repository":"chrismattmann/tika-python","url":"https://github.com/chrismattmann/tika-python","name":"tika-python","owner":"chrismattmann","description":"Tika-Python is a Python binding to the Apache Tika™ REST services allowing Tika to be called natively in the Python community.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1666,"issues":309,"created_at":"2014-06-26T15:04:49Z","updated_at":"2026-09-03T07:20:51Z","first_commit_at":"2014-06-26T15:05:15Z","last_commit_at":"2026-08-01T19:12:45Z","activity_months":145.18000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:52.761Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"chrismattmann/tika-python","visibility":"public","created_at":"2014-06-26T15:04:49Z","updated_at":"2026-09-03T07:20:51Z","private":false,"fork":false,"archived":false,"stargazers_count":1666,"open_issues_count":1,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1383","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0900:71F98:185D163:1C87CB8:6AB92EB4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1382","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E1:6E429:180B37E:1C361EC:6AB92EB5"},"commit":{"sha":"111ead6d3c212b2cab586697164caadedadce1da","url":"https://github.com/chrismattmann/tika-python/commit/111ead6d3c212b2cab586697164caadedadce1da","date":"2018-03-15T03:55:08Z","author_date":"2018-03-15T03:55:08Z","committer_date":"2018-03-15T03:55:08Z","tree_sha":"e18f146acde440fce95b6f65edc9b8509de8946e","message_first_line":"Merge pull request #175 from textshuttle/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1381","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086A:0AC4:12BC54A:161738E:6AB92EB5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":10329,"blob_sha":"385f1b7e7cfd8b867d3d1478aec09d3cf245d7fe","priority":0}],"documents":[{"path":"README.md","size":10329,"blob_sha":"385f1b7e7cfd8b867d3d1478aec09d3cf245d7fe","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/chrismattmann/tika-python.svg?branch=master)](https://travis-ci.org/chrismattmann/tika-python)\n[![Coverage Status](https://coveralls.io/repos/github/chrismattmann/tika-python/badge.svg?branch=master)](https://coveralls.io/github/chrismattmann/tika-python?branch=master)\n\ntika-python\n===========\nA Python port of the [Apache Tika](http://tika.apache.org/)\nlibrary that makes Tika available using the\n[Tika REST Server](http://wiki.apache.org/tika/TikaJAXRS). \n\nThis makes Apache Tika available as a Python library, \ninstallable via Setuptools, Pip and Easy Install.\n\nTo use this library, you need to have Java 7+ installed on your\nsystem as tika-python starts up the Tika REST server in the\nbackground.\n\nInspired by [Aptivate Tika](https://github.com/aptivate/python-tika).\n\nInstallation (with pip)\n-----------------------\n1. `pip install tika`\n\nInstallation (without pip)\n--------------------------\n1. `python setup.py build`  \n2. `python setup.py install`  \n\nEnvironment Variables\n---------------------\nThese are read once, when tika/tika.py is initially loaded and used throughout after that.\n\n1. `TIKA_VERSION` - set to the version string, e.g., 1.12 or default to current Tika version.\n2. `TIKA_SERVER_JAR` - set to the full URL to the remote Tika server jar to download and cache.\n3. `TIKA_SERVER_ENDPOINT` - set to the host (local or remote) for the running Tika server jar.\n4. `TIKA_CLIENT_ONLY` - if set to True, then `TIKA_SERVER_JAR` is ignored, and relies on the value for `TIKA_SERVER_ENDPOINT` and treats Tika like a REST client.\n5. `TIKA_TRANSLATOR` - set to the fully qualified class name (defaults to Lingo24) for the Tika translator implementation.\n6. `TIKA_SERVER_CLASSPATH` - set to a string (delimited by ':' for each additional path) to prepend to the Tika server jar path.\n7. `TIKA_LOG_PATH` - set to a directory with write permissions and the `tika.log` and `tika-server.log` files will be placed in this directory.\n8. `TIKA_PATH` - set to a directory with write permissions and the `tika_server.jar` file will be placed in this directory.\n\nTesting it out\n==============\n\nParser Interface (backwards compat prior to REST)\n-------------------------------------------------\n```\n#!/usr/bin/env python\nimport tika\ntika.initVM()\nfrom tika import parser\nparsed = parser.from_file('/path/to/file')\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n```\n\nParser Interface\n----------------------\nThe parser interface extracts text and metadata using the /rmeta \ninterface. This is one of the better ways to get the internal XHTML\ncontent extracted.\n\nNote: \n![Alert Icon](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon28.png \"Alert\")\nThe parser interface needs the following environment variable set on the console for printing of the extracted content.\n```export PYTHONIOENCODING=utf8```\n\n```\n#!/usr/bin/env python\nimport tika\nfrom tika import parser\nparsed = parser.from_file('/path/to/file')\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n\n# Optionally, you can pass Tika server URL along with the call\n# what's useful for multi-instance execution or when Tika is dockerzed/linked\nparsed = parser.from_file('/path/to/file', 'http://tika:9998/tika')\nstring_parsed = parser.from_buffer('Good evening, Dave', 'http://tika:9998/tika')\n```\n\nSpecify Output Format To XHTML\n---------------------\nThe parser interface is optionally able to output the content as XHTML rather than plain text.\n\nNote: \n![Alert Icon](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon28.png \"Alert\")\nThe parser interface needs the following environment variable set on the console for printing of the extracted content.\n```export PYTHONIOENCODING=utf8```\n\n```\n#!/usr/bin/env python\nimport tika\nfrom tika import parser\nparsed = parser.from_file('/path/to/file', xmlContent=True)\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n\n# Note: This is also available when parsing from the buffer.\n```\n\nUnpack Interface\n----------------\nThe unpack interface handles both metadata and text extraction in a single\ncall and internally returns back a tarball of metadata and text entries that\nis internally unpacked, reducing the wire load for extraction.\n\n```\n#!/usr/bin/env python\nimport tika\nfrom tika import unpack\nparsed = unpack.from_file('/path/to/file')\n```\n\nDetect Interface\n----------------------\nThe detect interface provides a IANA MIME type classification for the\nprovided file.\n\n```\n#!/usr/bin/env python\nimport tika\nfrom tika import detector\nprint(detector.from_file('/path/to/file'))\n```\n\nConfig Interface\n----------------------\nThe config interface allows you to inspect the Tika Server environment's\nconfiguration including what parsers, mime types, and detectors the \nserver has been configured with.\n\n```\n#!/usr/bin/env python\nimport tika\nfrom tika import config\nprint(config.getParsers())\nprint(config.getMimeTypes())\nprint(config.getDetectors())\n```\n\nLanguage Detection Interface\n---------------------------------\nThe language detection interface provides a 2 character language \ncode texted based on the text in provided file.\n\n```\n#!/usr/bin/env python\nfrom tika import language\nprint(language.from_file('/path/to/file'))\n```\n\nTranslate Interface\n------------------------\nThe translate interface translates the text automatically extracted\nby Tika from the source language to the destination language.\n\n```\n#!/usr/bin/env python\nfrom tika import translate\nprint(translate.from_file('/path/to/spanish', 'es', 'en'))\n```\n\nUsing a Buffer\n--------------\nNote you can also use a Parser and Detector\n.from_buffer(string) method to dynamically parser\na string buffer in Python and/or detect its MIME\ntype. This is useful if you've already loaded\nthe content into memory.\n\nUsing Client Only Mode\n----------------------\nYou can set Tika to use Client only mode by setting\n```python\nimport tika\ntika.TikaClientOnly = True\n```\n\nThen you can run any of the methods and it will fully\nomit the check to see if the service on localhost is\nrunning and omit printing the check messages.\n\nChanging the Tika Classpath\n---------------------------\nYou can update the classpath that Tika server uses by\nsetting the classpath as a set of ':' delimited strings.\nFor example if you want to get Tika-Python working with \n[GeoTopicParsing](http://wiki.apache.org/tika/GeoTopicParser),\nyou can do this, replace paths below with your own paths, as\nidentified [here](http://wiki.apache.org/tika/GeoTopicParser) \nand make sure that you have done this:\n\nkill Tika server (if already running):\n\n```bash\nps aux | grep java | grep Tika\nkill -9 PID\n```\n\n```python\nimport tika.tika\nimport os\nfrom tika import parser\nhome = os.getenv('HOME')\ntika.tika.TikaServerClasspath = home + '/git/geotopicparser-utils/mime:'+home+'/git/geotopicparser-utils/models/polar'\nparsed = parser.from_file(home + '/git/geotopicparser-utils/geotopics/polar.geot')\nprint parsed[\"metadata\"]\n```\n\nNew Command Line Client Tool\n============================\nWhen you install Tika-Python you also get a new command\nline client tool, `tika-python` installed in your /path/to/python/bin\ndirectory.\n\nThe options and help for the command line tool can be seen by typing\n`tika-python` without any arguments. This will also download a copy of\nthe tika-server jar and start it if you haven't done so already.\n\n```\ntika.py [-v] [-o <outputDir>] [--server <TikaServerEndpoint>] [--install <UrlToTikaServerJar>] [--port <portNumber>] <command> <option> <urlOrPathToFile>\n\ntika.py parse all test.pdf test2.pdf                   (write output JSON metadata files for test1.pdf_meta.json and test2.pdf_meta.json)\ntika.py detect type test.pdf                           (returns mime-type as text/plain)\ntika.py language file french.txt                       (returns language e.g., fr as text/plain)\ntika.py translate fr:en french.txt                     (translates the file french.txt from french to english)\ntika.py config mime-types                              (see what mime-types the Tika Server can handle)\n\nA simple python and command-line client for Tika using the standalone Tika server (JAR file).\nAll commands return results in JSON format by default (except text in text/plain).\n\nTo parse docs, use:\ntika.py parse <meta | text | all> <path>\n\nTo check the configuration of the Tika server, use:\ntika.py config <mime-types | detectors | parsers>\n\nCommands:\n  parse  = parse the input file and write a JSON doc file.ext_meta.json containing the extracted metadata, text, or both\n  detect type = parse the stream and 'detect' the MIME/media type, return in text/plain\n  language file = parse the file stream and identify the language of the text, return its 2 character code in text/plain\n  translate src:dest = parse and extract text and then translate the text from source language to destination language\n  config = return a JSON doc describing the configuration of the Tika server (i.e. mime-types it\n             can handle, or installed detectors or parsers)\n\nArguments:\n  urlOrPathToFile = file to be parsed, if URL it will first be retrieved and then passed to Tika\n\nSwitches:\n  --verbose, -v                  = verbose mode\n  --encode, -e           = encode response in UTF-8\n  --csv, -c    = report detect output in comma-delimited format\n  --server <TikaServerEndpoint>  = use a remote Tika Server at this endpoint, otherwise use local server\n  --install <UrlToTikaServerJar> = download and exec Tika Server (JAR file), starting server on default port 9998\n\nExample usage as python client:\n-- from tika import runCommand, parse1\n-- jsonOutput = runCommand('parse', 'all', filename)\n or\n-- jsonOutput = parse1('all', filename)\n```\n\nQuestions, comments?\n===================\nSend them to [Chris A. Mattmann](mailto:chris.a.mattmann@jpl.nasa.gov).\n\nContributors\n============\n* Chris A. Mattmann, JPL\n* Brian D. Wilson, JPL\n* Dongni Zhao, USC\n* Kenneth Durri, University of Maryland\n* Tyler Palsulich, New York University & Google\n* Joe Germuska, Northwestern University\n* Vlad Shvedov, Profinda.com\n* Diogo Vieira, Globo.com\n* Aron Ahmadia, Continuum Analytics\n* Karanjeet Singh, USC\n* Renat Nasyrov, Yandex\n* James Brooking, Blackbeard\n* Yash Tanna, USC\n* Igor Tokarev, Freelance\n* Imraan Parker, Freelance\n\nLicense\n=======\n[Apache License, version 2](http://www.apache.org/licenses/LICENSE-2.0)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4254:3EACB:17D0E3:5E788F:6AB92EAF"},"text_sha256":"b66f324d3557b598c9e8414820df4722ee58b92784a31de286b3ea250b3622bb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1380","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0855:14A1F2:1836990:1C61A83:6AB92EB6"},"commit":{"sha":"7603ea4e0dcf25a890802242af248e307fdec731","url":"https://github.com/chrismattmann/tika-python/commit/7603ea4e0dcf25a890802242af248e307fdec731","date":"2026-06-10T00:23:50Z","author_date":"2026-06-10T00:23:50Z","committer_date":"2026-06-10T00:23:50Z","tree_sha":"fdb91a832410285b2b71d10d587f3885fe082a2c","message_first_line":"Merge pull request #484 from afuetterer/443-docs"},"tree_request_status":200,"tree_rate":{"github_remaining":"1379","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DB:74181:17AAEE8:1BD5F2E:6AB92EB6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":14109,"blob_sha":"3a5582ecd409434d89c8772ba91689ffca264498","priority":0}],"documents":[{"path":"README.md","size":14109,"blob_sha":"3a5582ecd409434d89c8772ba91689ffca264498","priority":0,"status":200,"text":"tika-python\n===========\n\n[![PyPI Downloads](https://static.pepy.tech/badge/tika)](https://pepy.tech/projects/tika)\n[![Latest release](https://img.shields.io/pypi/v/tika.svg?style=flat)](https://pypi.python.org/pypi/tika/)\n[![License](https://img.shields.io/github/license/chrismattmann/tika-python?style=flat)](https://github.com/chrismattmann/tika-python/blob/master/LICENSE.txt)\n\n[![Build Status](https://github.com/chrismattmann/tika-python/actions/workflows/ci.yml/badge.svg)](https://github.com/chrismattmann/tika-python/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/chrismattmann/tika-python/badge.svg?branch=master)](https://coveralls.io/github/chrismattmann/tika-python?branch=master)\n[![Docs Status](https://github.com/chrismattmann/tika-python/actions/workflows/documentation.yml/badge.svg)](https://github.com/chrismattmann/tika-python/actions/workflows/documentation.yml)\n\nA Python port of the [Apache Tika](http://tika.apache.org/)\nlibrary that makes Tika available using the\n[Tika REST Server](https://cwiki.apache.org/confluence/display/TIKA/TikaServer).\n\nThis makes Apache Tika available as a Python library,\ninstallable via Setuptools, Pip and Easy Install.\n\nTo use this library, you need to have Java 11+ installed on your\nsystem as tika-python starts up the Tika REST server in the\nbackground.\n\nInspired by [Aptivate Tika](https://github.com/aptivate/python-tika).\n\nInstallation (with pip)\n-----------------------\n1. `pip install tika`\n\nAirgap Environment Setup\n------------------------\nTo get this working in a disconnected environment, download a tika server file (both tika-server.jar and tika-server.jar.md5, which can be found [here](https://repo1.maven.org/maven2/org/apache/tika/tika-server-standard/)) and set the TIKA_SERVER_JAR environment variable to TIKA_SERVER_JAR=\"file:///<yourpath>/tika-server-standard.jar\" which successfully tells `python-tika` to \"download\" this file and move it to `/tmp/tika-server-standard.jar` and run as background process.\n\nThis is the only way to run `python-tika` without internet access. Without this set, the default is to check the tika version and pull latest every time from Apache.\n\nEnvironment Variables\n---------------------\nThese are read once, when tika/tika.py is initially loaded and used throughout after that.\n\n1. `TIKA_VERSION` - set to the version string, e.g., 1.12 or default to current Tika version.\n2. `TIKA_SERVER_JAR` - set to the full URL to the remote Tika server jar to download and cache.\n3. `TIKA_SERVER_ENDPOINT` - set to the host (local or remote) for the running Tika server jar.\n4. `TIKA_CLIENT_ONLY` - if set to True, then `TIKA_SERVER_JAR` is ignored, and relies on the value for `TIKA_SERVER_ENDPOINT` and treats Tika like a REST client.\n3. `TIKA_JAR_HASH_ALGO` - set to `sha1` when running on FIPS-compliant systems; default value is `md5`.\n4. `TIKA_SERVER_ENDPOINT` - set to the host (local or remote) for the running Tika server jar.\n5. `TIKA_CLIENT_ONLY` - if set to True, then `TIKA_SERVER_JAR` is ignored, and relies on the value for `TIKA_SERVER_ENDPOINT` and treats Tika like a REST client.\n6. `TIKA_TRANSLATOR` - set to the fully qualified class name (defaults to Lingo24) for the Tika translator implementation.\n7. `TIKA_SERVER_CLASSPATH` - set to a string (delimited by ':' for each additional path) to prepend to the Tika server jar path.\n8. `TIKA_LOG_PATH` - set to a directory with write permissions and the `tika.log` and `tika-server.log` files will be placed in this directory.\n9. `TIKA_PATH` - set to a directory with write permissions and the `tika_server.jar` file will be placed in this directory.\n10. `TIKA_JAVA` - set the Java runtime name, e.g., `java` or `java9`\n11. `TIKA_STARTUP_SLEEP` - number of seconds (`float`) to wait per check if Tika server is launched at runtime\n12. `TIKA_STARTUP_MAX_RETRY` - number of checks (`int`) to attempt for Tika server startup if launched at runtime\n13. `TIKA_JAVA_ARGS` - set java runtime arguments, e.g, `-Xmx4g`\n14. `TIKA_LOG_FILE` - set the filename for the log file. default: `tika.log`. if it is an empty string (`''`), no log file is created.\n\nTesting it out\n==============\n\nParser Interface (backwards compat prior to REST)\n-------------------------------------------------\n```python\nimport tika\ntika.initVM()\nfrom tika import parser\nparsed = parser.from_file('/path/to/file')\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n```\n\nParser Interface\n----------------------\nThe parser interface extracts text and metadata using the /rmeta\ninterface. This is one of the better ways to get the internal XHTML\ncontent extracted.\n\nNote:\n![Alert Icon](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon28.png \"Alert\")\nThe parser interface needs the following environment variable set on the console for printing of the extracted content.\n```export PYTHONIOENCODING=utf8```\n\n```python\nfrom tika import parser\nparsed = parser.from_file('/path/to/file')\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n```\n\nOptionally, you can pass Tika server URL along with the call\nwhat's useful for multi-instance execution or when Tika is dockerzed/linked.\n\n```python\nparsed = parser.from_file('/path/to/file', 'http://tika:9998/tika')\nstring_parsed = parser.from_buffer('Good evening, Dave', 'http://tika:9998/tika')\n```\n\nYou can also pass a binary stream\n\n```python\nwith open(file, 'rb') as file_obj:\n    response = tika.parser.from_file(file_obj)\n```\n\nGzip compression\n---------------------\nSince Tika 1.24.1 gzip compression of input and output streams is allowed.\n\nInput compression can be achieved with gzip or zlib:\n```python\nimport zlib\n\nwith open(file, 'rb') as file_obj:\n    return tika.parser.from_buffer(zlib.compress(file_obj.read()))\n\n...\n\nimport gzip\n\nwith open(file, 'rb') as file_obj:\n    return tika.parser.from_buffer(gzip.compress(file_obj.read()))\n```\n\nAnd output with the header:\n```python\nwith open(file, 'rb') as file_obj:\n    return tika.parser.from_file(file_obj, headers={'Accept-Encoding': 'gzip, deflate'})\n```\n\nSpecify Output Format To XHTML\n---------------------\nThe parser interface is optionally able to output the content as XHTML rather than plain text.\n\nNote:\n![Alert Icon](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon28.png \"Alert\")\nThe parser interface needs the following environment variable set on the console for printing of the extracted content.\n```export PYTHONIOENCODING=utf8```\n\n```python\nfrom tika import parser\nparsed = parser.from_file('/path/to/file', xmlContent=True)\nprint(parsed[\"metadata\"])\nprint(parsed[\"content\"])\n\n# Note: This is also available when parsing from the buffer.\n```\n\nUnpack Interface\n----------------\nThe unpack interface handles both metadata and text extraction in a single\ncall and internally returns back a tarball of metadata and text entries that\nis internally unpacked, reducing the wire load for extraction.\n\n```python\nfrom tika import unpack\nparsed = unpack.from_file('/path/to/file')\n```\n\nDetect Interface\n----------------------\nThe detect interface provides a IANA MIME type classification for the\nprovided file.\n\n```python\nfrom tika import detector\nprint(detector.from_file('/path/to/file'))\n```\n\nConfig Interface\n----------------------\nThe config interface allows you to inspect the Tika Server environment's\nconfiguration including what parsers, mime types, and detectors the\nserver has been configured with.\n\n```python\nfrom tika import config\nprint(config.getParsers())\nprint(config.getMimeTypes())\nprint(config.getDetectors())\n```\n\nLanguage Detection Interface\n---------------------------------\nThe language detection interface provides a 2 character language\ncode texted based on the text in provided file.\n\n```python\nfrom tika import language\nprint(language.from_file('/path/to/file'))\n```\n\nTranslate Interface\n------------------------\nThe translate interface translates the text automatically extracted\nby Tika from the source language to the destination language.\n\n```python\nfrom tika import translate\nprint(translate.from_file('/path/to/spanish', 'es', 'en'))\n```\n\nUsing a Buffer\n--------------\nNote you can also use a Parser and Detector\n.from_buffer(string|BufferedIOBase) method to dynamically parser\na string or bytes buffer in Python and/or detect its MIME\ntype. This is useful if you've already loaded\nthe content into memory.\n\n```python\nstring_parsed = parser.from_buffer('Good evening, Dave')\nbyte_data: bytes = b'B\\xc3\\xa4ume'\nparsed = parser.from_buffer(io.BytesIO(byte_data))\n```\n\nUsing Client Only Mode\n----------------------\nYou can set Tika to use Client only mode by setting\n\n```python\nimport tika.tika\ntika.tika.TikaClientOnly = True\n```\n\nThen you can run any of the methods and it will fully\nomit the check to see if the service on localhost is\nrunning and omit printing the check messages.\n\nChanging the Tika Classpath\n---------------------------\nYou can update the classpath that Tika server uses by\nsetting the classpath as a set of ':' delimited strings.\nFor example if you want to get Tika-Python working with\n[GeoTopicParsing](https://cwiki.apache.org/confluence/display/TIKA/GeoTopicParser),\nyou can do this, replace paths below with your own paths, as\nidentified [here](https://cwiki.apache.org/confluence/display/TIKA/GeoTopicParser)\nand make sure that you have done this:\n\nkill Tika server (if already running):\n\n```bash\nps aux | grep java | grep Tika\nkill -9 PID\n```\n\n```python\nimport os\nimport tika.tika\nfrom tika import parser\nhome = os.getenv('HOME')\ntika.tika.TikaServerClasspath = home + '/git/geotopicparser-utils/mime:'+home+'/git/geotopicparser-utils/models/polar'\nparsed = parser.from_file(home + '/git/geotopicparser-utils/geotopics/polar.geot')\nprint parsed[\"metadata\"]\n```\n\nCustomizing the Tika Server Request\n---------------------------\nYou may customize the outgoing HTTP request to Tika server by setting `requestOptions` on the `.from_file` and `.from_buffer` methods (Parser, Unpack , Detect, Config, Language, Translate). It should be a dictionary of arguments that will be passed to the request method. The [request method documentation](https://requests.kennethreitz.org/en/master/api/#requests.request) specifies valid arguments. This will override any defaults except for `url` and `params `/`data`.\n\n```python\nfrom tika import parser\nparsed = parser.from_file('/path/to/file', requestOptions={'timeout': 120})\n```\n\nNew Command Line Client Tool\n============================\nWhen you install Tika-Python you also get a new command\nline client tool, `tika-python` installed in your /path/to/python/bin\ndirectory.\n\nThe options and help for the command line tool can be seen by typing\n`tika-python` without any arguments. This will also download a copy of\nthe tika-server jar and start it if you haven't done so already.\n\n```bash\ntika.py [-v] [-o <outputDir>] [--server <TikaServerEndpoint>] [--install <UrlToTikaServerJar>] [--port <portNumber>] <command> <option> <urlOrPathToFile>\n\ntika.py parse all test.pdf test2.pdf                   (write output JSON metadata files for test1.pdf_meta.json and test2.pdf_meta.json)\ntika.py detect type test.pdf                           (returns mime-type as text/plain)\ntika.py language file french.txt                       (returns language e.g., fr as text/plain)\ntika.py translate fr:en french.txt                     (translates the file french.txt from french to english)\ntika.py config mime-types                              (see what mime-types the Tika Server can handle)\n\nA simple python and command-line client for Tika using the standalone Tika server (JAR file).\nAll commands return results in JSON format by default (except text in text/plain).\n\nTo parse docs, use:\ntika.py parse <meta | text | all> <path>\n\nTo check the configuration of the Tika server, use:\ntika.py config <mime-types | detectors | parsers>\n\nCommands:\n  parse  = parse the input file and write a JSON doc file.ext_meta.json containing the extracted metadata, text, or both\n  detect type = parse the stream and 'detect' the MIME/media type, return in text/plain\n  language file = parse the file stream and identify the language of the text, return its 2 character code in text/plain\n  translate src:dest = parse and extract text and then translate the text from source language to destination language\n  config = return a JSON doc describing the configuration of the Tika server (i.e. mime-types it\n             can handle, or installed detectors or parsers)\n\nArguments:\n  urlOrPathToFile = file to be parsed, if URL it will first be retrieved and then passed to Tika\n\nSwitches:\n  --verbose, -v                  = verbose mode\n  --encode, -e           = encode response in UTF-8\n  --csv, -c    = report detect output in comma-delimited format\n  --server <TikaServerEndpoint>  = use a remote Tika Server at this endpoint, otherwise use local server\n  --install <UrlToTikaServerJar> = download and exec Tika Server (JAR file), starting server on default port 9998\n\nExample usage as python client:\n-- from tika import runCommand, parse1\n-- jsonOutput = runCommand('parse', 'all', filename)\n or\n-- jsonOutput = parse1('all', filename)\n```\n\nQuestions, comments?\n===================\nSend them to [Chris A. Mattmann](mailto:chris.mattmann@gmail.com).\n\nContributors\n============\n* Chris A. Mattmann, JPL\n* Brian D. Wilson, JPL\n* Dongni Zhao, USC\n* Kenneth Durri, University of Maryland\n* Tyler Palsulich, New York University & Google\n* Joe Germuska, Northwestern University\n* Vlad Shvedov, Profinda.com\n* Diogo Vieira, Globo.com\n* Aron Ahmadia, Continuum Analytics\n* Karanjeet Singh, USC\n* Renat Nasyrov, Yandex\n* James Brooking, Blackbeard\n* Yash Tanna, USC\n* Igor Tokarev, Freelance\n* Imraan Parker, Freelance\n* Annie K. Didier, JPL\n* Juan Elosua, TEGRA Cybersecurity Center\n* Carina de Oliveira Antunes, CERN\n* Ana Mensikova, JPL\n* Heinz-Alexander Fütterer, WZB Berlin Social Science Center\n\nThanks\n======\nThanks to the [DARPA MEMEX](http://memex.jpl.nasa.gov) program for funding most of the original portions of this work.\n\nLicense\n=======\n[Apache License, version 2](http://www.apache.org/licenses/LICENSE-2.0)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"416C:09ED:E7A9E:3FDBF6:6AB92EB6"},"text_sha256":"d36db2c08dddfcdd12be550e0f4faed7301e9731a4f22c15429299aee24813ee"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"fergiemcdowall/search-index","input_row":{"repository":"fergiemcdowall/search-index","url":"https://github.com/fergiemcdowall/search-index","name":"search-index","owner":"fergiemcdowall","description":"A persistent, network resilient, full text search library for the browser and Node.js","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1421,"issues":449,"created_at":"2013-07-04T07:56:35Z","updated_at":"2026-09-09T08:56:09Z","first_commit_at":"2013-07-04T07:56:35Z","last_commit_at":"2026-08-18T08:15:52Z","activity_months":157.46000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:55.675Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"fergiemcdowall/search-index","visibility":"public","created_at":"2013-07-04T07:56:35Z","updated_at":"2026-09-09T08:56:09Z","private":false,"fork":false,"archived":false,"stargazers_count":1421,"open_issues_count":7,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1378","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0782:74181:17AAF8E:1BD5FEE:6AB92EB7"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1377","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C8:71F98:185D389:1C87F30:6AB92EB8"},"commit":{"sha":"a2615870e3ae5c7adf131b85ff6c876654a6dfed","url":"https://github.com/fergiemcdowall/search-index/commit/a2615870e3ae5c7adf131b85ff6c876654a6dfed","date":"2018-02-01T07:46:33Z","author_date":"2018-02-01T07:46:33Z","committer_date":"2018-02-01T07:46:33Z","tree_sha":"38163b926761d317d3ed050e139319861970f712","message_first_line":"Merge pull request #437 from aral/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1376","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C6:74E6D:182CDEE:1C58188:6AB92EB8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2581,"blob_sha":"5ae7e04a83f135b6e494ffdeda986382fe011be7","priority":0}],"documents":[{"path":"README.md","size":2581,"blob_sha":"5ae7e04a83f135b6e494ffdeda986382fe011be7","priority":0,"status":200,"text":"# search-index\n### A streaming, network resilient, persistent full-text search library for the browser and Node.js\n\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/fergiemcdowall/search-index)\n[![npm](https://img.shields.io/npm/v/search-index.svg?style=flat-square)](https://www.npmjs.com/package/search-index)\n[![npm](https://img.shields.io/npm/dm/search-index.svg?style=flat-square)](https://npm-stat.com/charts.html?package=search-index)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENCE)\n[![Travis](https://img.shields.io/travis/rust-lang/rust.svg?style=flat-square)](https://travis-ci.org/fergiemcdowall/search-index)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)\n\n```javascript\nconst getData = function(err, myIndex) {\n  readStreamOfDocuments        // <- a stream of documents to be indexed\n    .pipe(myIndex.feed())      // <- an extendable document processing pipeline (do objectMode: true for a stream of objects)\n}\nrequire('search-index')(options, getData) // <- make a new index\n```\n\n`search-index` is a freetext search library for JavaScript. You can use it to drop fantabulous search functionality into your javascript applications\n\nFind out how to use the `search-index` module here:\n\n### For the impatient\n * [Quickstart](./docs/quickstart.md)\n * [Simple web demo](https://fergiemcdowall.github.io/search-index/demo/)\n\n### API\n\n * [API reference](./docs/API.md)\n\n### Documentation\n * [Create an index](./docs/create.md)\n * [Add documents](./docs/add.md)\n * [Search documents](./docs/search.md)\n * [Aggregate documents (buckets and categories)](./docs/aggregations.md)\n * [Set up autocomplete and query suggestions](./docs/autosuggest.md)\n * [Sync an index](./docs/replicate.md)\n * [Run search-index in the browser](./docs/browser.md)\n * [Sync from a server to a browser](./docs/browserSync.md)\n * [Work with Gulp.js](./docs/gulp.md)\n\n<!--\n### Other How-tos and Articles on the Interwebs\n * [Getting started with search-index](#)\n * [How to implement stemming in search-index](#)\n * [How to implement synonyms in search-index](#)\n * [Create a Network-Resiliant Search Application](#)\n * [Functionality vs index size (how to shrink your index)](#)\n * [Teasers and Search Term Highlighting](#)\n-->\n### Release notes\n\n * See [releases page](https://github.com/fergiemcdowall/search-index/releases) on GitHub\n\n### Contribute\n\n * [Contribution guidelines](./docs/contributing.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DC8A:3E1C8:181099:5EB790:6AB92EB8"},"text_sha256":"3e92c9282baaf8a126dc3d39d988e00274068855c8e45e5d8df506afc737027d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1375","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C7:37D6E2:18350BB:1C602E0:6AB92EB9"},"commit":{"sha":"030e7b6d7b6ef8bd03920ea9cc2f2a67a4700ac6","url":"https://github.com/fergiemcdowall/search-index/commit/030e7b6d7b6ef8bd03920ea9cc2f2a67a4700ac6","date":"2025-04-04T08:54:24Z","author_date":"2025-04-04T08:54:24Z","committer_date":"2025-04-04T08:54:24Z","tree_sha":"2002ba17a3fffae459aabaf25616b633b0c5609c","message_first_line":"fixed race condition when initing document count to 0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1374","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EB:62B94:17E721E:1C12054:6AB92EB9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1220,"blob_sha":"cc41ead5cc3443b53b92a9db79a682160365a3e1","priority":0}],"documents":[{"path":"README.md","size":1220,"blob_sha":"cc41ead5cc3443b53b92a9db79a682160365a3e1","priority":0,"status":200,"text":"# search-index\n\n### A network resilient, persistent full-text search library for the browser and Node.js\n\n[![npm](https://img.shields.io/npm/v/search-index.svg?style=flat-square)](https://www.npmjs.com/package/search-index)\n[![npm](https://img.shields.io/npm/dm/search-index.svg?style=flat-square)](https://npm-stat.com/charts.html?package=search-index)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENCE)\n[![Build Status](https://travis-ci.org/fergiemcdowall/search-index.svg?branch=master)](https://travis-ci.org/fergiemcdowall/search-index)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)\n\n\n## Quick start\n\n```javascript\nimport { SearchIndex } from 'search-index' \n\n// initialize an index\nconst { PUT, QUERY } = new SearchIndex(options)\n\n// add documents to the index\nawait PUT(documents)\n\n// read documents from the index\nconst results = await QUERY(query)\n```\n\n## Documentation\n\n* [Browser\n  demo](https://codesandbox.io/p/github/fergiemcdowall/search-index-demo/)\n  ([source code](https://github.com/fergiemcdowall/search-index-demo))\n* [API](docs/API.md)\n* [FAQ](docs/FAQ.md)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"35E2:3E1DA:17BC8E:5E64C7:6AB92EB8"},"text_sha256":"e0bd62ad3afa5968f0082ca8c9b603d2b0e159557d250de59c66a18f5b70a45e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"paschmann/rasa-ui","input_row":{"repository":"paschmann/rasa-ui","url":"https://github.com/paschmann/rasa-ui","name":"rasa-ui","owner":"paschmann","description":"Rasa UI is a frontend for the Rasa Framework","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":959,"issues":208,"created_at":"2017-05-09T19:48:50Z","updated_at":"2026-08-18T03:31:24Z","first_commit_at":"2017-05-09T19:48:50Z","last_commit_at":"2025-11-12T14:20:44Z","activity_months":102.13,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:56:58.263Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"paschmann/rasa-ui","visibility":"public","created_at":"2017-05-09T19:48:50Z","updated_at":"2026-08-18T03:31:24Z","private":false,"fork":false,"archived":false,"stargazers_count":959,"open_issues_count":40,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1373","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CD:8656E:17F2052:1C1CD35:6AB92EBA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1372","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B4:1B4E7A:17D3C30:1BFEAC0:6AB92EBA"},"commit":{"sha":"d19fb8fad5df47154ba378f7e132f4169b264e06","url":"https://github.com/paschmann/rasa-ui/commit/d19fb8fad5df47154ba378f7e132f4169b264e06","date":"2018-05-18T20:00:13Z","author_date":"2018-05-18T20:00:13Z","committer_date":"2018-05-18T20:00:13Z","tree_sha":"f83bfa9f9d2cb37dcd676e8b77c3e8bb4acb04c0","message_first_line":"updated nodejs version in docker file"},"tree_request_status":200,"tree_rate":{"github_remaining":"1371","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0874:77994:1812160:1C3D11C:6AB92EBB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4829,"blob_sha":"1ef3836f25581d3db80654ee76db05488e35de71","priority":0}],"documents":[{"path":"README.md","size":4829,"blob_sha":"1ef3836f25581d3db80654ee76db05488e35de71","priority":0,"status":200,"text":"[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/paschmann/rasa-ui/)\n\n# Rasa UI\n\nRasa UI is a web application built on top of, and for, [Rasa NLU](https://github.com/RasaHQ/rasa_nlu). Rasa UI provides a web application to quickly and easily be able to create agents, define intents and entities. It also provides some convenience features for Rasa NLU, like training your models, monitoring usage or viewing logs. Our goal is to replace api.ai/Dialogflow with Rasa, so a lot of the terminology and usage concepts are similar.\n\n## Features in 1.0\n- Webhook option for Agents\n- Authentication module can be extended to a different IDP and session is handled by JWT token\n- Webhooks also receive User information part of JWT Token in the Bearer Authorization Header\n- User level Tracking of conversations\n- New Insights to show the frequently used intents and more drill down details on utterances to be added\n- Import Agents in rasa format\n- Docker container capabilities\n- Existing apps can migrate to this version after running the db-alters.sql under resources and updating their codebase to master.(Although a backup of the data is recommended as rasa-uui is still in Beta version)\n- Adapted to rasa_nlu 0.10.x Projects Structure. Each Agent in UI translates to a Project on the NLU.\n\n![Screenshot1](https://github.com/paschmann/rasa-ui/blob/master/resources/insights.png)\n\n\n## Features\n- Training data stored in DB\n- UI for managing training data\n- Initiate training from UI\n- Review Rasa configuration and component pipelines\n- Log requests for usage tracking, history, improvements\n- Usage dashboard\n- Easily execute intent parsing using different models\n\n![Screenshot1](https://github.com/paschmann/rasa-ui/blob/master/resources/rasa_ui_1.png)\n\n## Getting Started\n\nRasa UI can run directly on your Rasa NLU instance, or on a separate machine. Technically Rasa NLU is not required, you could just use the UI for managing training data.\n\n\n### Prerequisites\n\n[Rasa NLU](https://github.com/golastmile/rasa_nlu) - Version 8.2.?+\n\n[PostgreSQL](https://www.postgresql.org/) - Used for storing training data (entities, intents, synonyms, etc.)\n\n[Node.js/npm](https://nodejs.org/en/) - Serves Rasa UI and acts as a middleware server for logging (to the PostgreSQL DB)\n\n\n### Installing\n\nPlease ensure prerequisites are fulfilled\n\nClone/download the Rasa UI repository. Install npm packages for both Server and Web.\n\n```\ngit clone https://github.com/paschmann/rasaui.git\ncd rasaui && npm install\n```\n\nPlease see the [wiki](https://github.com/paschmann/rasa-ui/wiki/Rasa-UI-Install-Guide) for more detailed instructions.\n\n#### Docker Setup\nIn order to run this setup in docker you need to run the following command to build out the image:\n\n`docker build -t rasa-ui .` - Make sure to perform this from the location where the Dockerfile is.\n\nNow we can spin up our docker instance with the following command:\n\n**Use Your External Rasa Server**\nIn this command we are setting the env variables rasanluendpoint and rasacoreendpoint to our own specific values, you can supply only 1 or both of these depending on if you want to use NLU or Core or both externally.\n\n`docker run -e \"rasanluendpoint=http://youripaddress:5000\" -e \"rasacoreendpoint=http://youripaddress:5005\" -itd -p 5001:5001 rasa-ui` \n\n**Use Built In Rasa**\nThis command will use the built in Rasa NLU and Core\n\n`docker run -itd -p 5001:5001 rasa-ui`\n\n## DB Setup\n- Execute `dbcreate.sql` on postgreSQL. (If migrating from an older version of rasa-ui, execute `db-alters.sql`)\n- All the Tables and views should be setup\n\n## RasaNLU Setup\n- Update your package.json file to include the IP Addresses of your rasa_nlu server and the connection string of your postgres instance.\n- Optional: Update your web/src/app.js file to include the IP Addresses of your local middleware server (no need to change this if they are running on the same instance)\n\n## Running\nRun npm start from the server folder (rasa-ui)\n\n```\nnpm start\n```\nYour web application should be available on http://localhost:5001\n\n## Logging\n\nSince Rasa UI can be used to log events/intent parsing/training etc. we would suggest changing your endpoints for your API calls to \"pass through\" the Rasa UI middleware layer. All API requests are simply forwarded, logged and then returned.\n\ne.g. Instead of calling: http://localhost:5000/parse?q=hello%20there rather call: http://localhost:5001/api/v2/rasa/parse?q=hello%20there\n\n## Contributing\n\nPlease read [contributing.md](contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Contributers\n\n* **Paul Aschmann**\n* **Pradeep Mamillapalli**\n\n## License\n\nThis project is licensed under the MIT License - see the [license](license) file for details\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"128A:345ED4:17B24F:5E59E3:6AB92EB5"},"text_sha256":"e0d9fc113c9de7335e904d27fa676e3aec81e4efb5017afc655f1318f3a3d211"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1370","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083D:7418C:183D22E:1C681F5:6AB92EBB"},"commit":{"sha":"3ca59a9d901475704723987b02e4cd33b057d891","url":"https://github.com/paschmann/rasa-ui/commit/3ca59a9d901475704723987b02e4cd33b057d891","date":"2025-11-12T14:20:44Z","author_date":"2025-11-12T14:20:44Z","committer_date":"2025-11-12T14:20:44Z","tree_sha":"278e4c028ff3b21d57d41a80edfe72c499ed1553","message_first_line":"no message"},"tree_request_status":200,"tree_rate":{"github_remaining":"1369","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08DC:724D2:17F64C4:1C214FC:6AB92EBC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4165,"blob_sha":"d5e18fa80196659f5e84cede22c55ab467a0d4e9","priority":0}],"documents":[{"path":"README.md","size":4165,"blob_sha":"d5e18fa80196659f5e84cede22c55ab467a0d4e9","priority":0,"status":200,"text":"[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/paschmann/rasa-ui/)\n\n# Rasa UI \n\nRasa UI is a web application built on top of, and for [Rasa](https://github.com/RasaHQ/rasa). Rasa UI provides a web application to quickly and easily be able to create and manage bots, NLU components (Regex, Examples, Entities, Intents, etc.) and Core components (Stories, Actions, Responses, etc.) through a web interface. It also provides some convenience features for Rasa, like training and loading your models, monitoring usage or viewing logs.\n\n## Features\n\n- UI for creating and managing training data - Examples, Intents, Entities, Synonyms, Regex, Stories, Actions, Responses\n- Manage multiple bots from a single UI/instance of Rasa UI\n- Create, manage and load different versions of your models for testing and optimizing\n- Log requests for usage tracking, history and improvements to your models\n- Easily execute intent parsing using different models\n- Data is stored in a SQLite DB for backing up/sharing\n- Can be used with or without a Rasa backend to manage your training data\n\n<img src=\"/web/src/assets/img/screenshot1.png\" width=\"500\">\n<img src=\"/web/src/assets/img/screenshot2.png\" width=\"500\">\n\n## Getting Started\n\nRasa UI can run on your Rasa instance, or on a separate machine. Technically Rasa is not required, you could just use the UI for managing training data.\n\n### Prerequisites\n\n[Node.js/npm](https://nodejs.org/en/) - Serves Rasa UI - Required\n\n[Rasa](https://github.com/RasaHQ/rasa) - Developed against Version 1.2+ - Optional\n\n### Installing\n\n1. Clone/download the Rasa UI repository or a [release](https://www.github.com/paschmann/rasa-ui)\n2. Install npm packages.\n3. Set Rasa Server variable in package.json\n\n```\ngit clone https://github.com/paschmann/rasa-ui.git\ncd rasa-ui\nnpm install\n```\n\n## Running\n\nRun npm start from the server folder (rasa-ui)\n\n```\nnpm start\n```\nYour web application should be available on http://localhost:5001\n\n## Running from Docker\n\nIf you **already** have a Rasa instance setup and running, you can run Rasa UI from docker hub using [paschmann/rasa-ui](https://hub.docker.com/r/paschmann/rasa-ui/). You will need to edit the environment variables, specifically the **rasa_endpoint**.\n\nIf you **dont** have a Rasa instance setup, you can run both Rasa and Rasa UI using the [docker-compose file](https://github.com/paschmann/rasa-ui/blob/master/docker-compose.yml), copy the file to a local directory and run the command below:\n\n```\ndocker-compose up\n```\n\nThe docker-compose up command will use the docker-compose.yml file to create both the Rasa container and Rasa UI container, and create a networked connection between both.\n\n## Upgrading\n\nBecause Rasa UI uses a Database to store training data, and other content, in the event the database schema changes, you will need to modify your database when upgrading to newer versions of Rasa UI. Please review the server/db migration folder for upgrade scripts from and to newer versions if you have existing data and want to maintain it. If you are upgrading from Rasa UI prior to v.3.0.0 there is no data migration path as previously postgres was used, and now sqlite is being used.\n\n## Logging\n\nSince Rasa UI can be used to log events/intent parsing/training etc. we would suggest changing your endpoints for your API calls to \"pass through\" Rasa UI. All API requests are simply logged, forwarded to Rasa and then returned.\n\ne.g. Instead of POST'ing to your Rasa instance which is normally something like http://localhost:5005/model/parse?q=hello you can POST to Rasa UI (e.g. http://localhost:5001/api/v2/rasa/model/parse?q=hello)\n\n## Contributing\n\nPlease read [contributing.md](contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Contributers\n\nRasa UI is possible thanks to all the awesome contributers, thank you!\n\n* **Pradeep Mamillapalli**\n* **elvay1**\n* **huberrom**\n* **ClaasBrueggemann**\n* **btran10**\n* **btotharye**\n* **beevelop**\n\n## License\n\nThis project is licensed under the MIT License - see the [license](license) file for details\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8408:09ED:E7B00:3FDCDF:6AB92EBC"},"text_sha256":"6f5fca3b4017e02ca24fd04a0f63b4e7613011db0f9da54a52cfeb1b5b49764d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cltk/cltk","input_row":{"repository":"cltk/cltk","url":"https://github.com/cltk/cltk","name":"cltk","owner":"cltk","description":"The Classical Language Toolkit","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":921,"issues":593,"created_at":"2014-01-11T23:59:47Z","updated_at":"2026-09-19T03:59:39Z","first_commit_at":"2014-01-12T00:03:16Z","last_commit_at":"2026-08-01T22:16:44Z","activity_months":150.62,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:00.827Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cltk/cltk","visibility":"public","created_at":"2014-01-11T23:59:47Z","updated_at":"2026-09-19T03:59:39Z","private":false,"fork":false,"archived":false,"stargazers_count":921,"open_issues_count":4,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1368","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D2:A9DC0:17E5AB3:1C10857:6AB92EBC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1367","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0790:767EB:181BCEF:1C472FB:6AB92EBD"},"commit":{"sha":"de900425322eb3e4d2a0935b6f944214078ca953","url":"https://github.com/cltk/cltk/commit/de900425322eb3e4d2a0935b6f944214078ca953","date":"2018-05-24T20:05:15Z","author_date":"2018-05-24T20:05:15Z","committer_date":"2018-05-24T20:05:15Z","tree_sha":"9b36116b9a9349536dd54caaf4cd946c634d9b5e","message_first_line":"Merge pull request #18 from Sedictious/Automata_test"},"tree_request_status":200,"tree_rate":{"github_remaining":"1366","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"081E:35C5DA:17CDA52:1BF7F29:6AB92EBD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4141,"blob_sha":"b101967db932a016e94b06a197446b126aac16eb","priority":0}],"documents":[{"path":"README.md","size":4141,"blob_sha":"b101967db932a016e94b06a197446b126aac16eb","priority":0,"status":200,"text":"# The Classical Language Toolkit\n\n[![PyPi downloads](http://img.shields.io/pypi/v/cltk.svg?style=flat)](https://pypi.python.org/pypi/cltk/) [![Documentation Status](https://readthedocs.org/projects/cltk/badge/?version=latest)](http://docs.cltk.org/en/latest/?badge=latest) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.593336.svg)](https://doi.org/10.5281/zenodo.593336)\n\n[![Build Status](https://travis-ci.org/cltk/cltk.svg?branch=master)](https://travis-ci.org/cltk/cltk) [![codecov.io](http://codecov.io/github/cltk/cltk/coverage.svg?branch=master)](http://codecov.io/github/cltk/cltk?branch=master)\n\n[![Join the chat at https://gitter.im/cltk/cltk](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cltk/cltk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) <a href=\"https://zenhub.io\"><img src=\"https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png\"><\/a>\n\n\n## About\n\nThe Classical Language Toolkit (CLTK) offers natural language processing (NLP) support for the languages of Ancient, Classical, and Medieval Eurasia. Greek and Latin functionality are currently most complete. The goals of the CLTK are to:\n\n*   compile analysis-friendly corpora;\n*   collect and generate linguistic data;\n*   act as a free and open platform for generating scientific research.\n\n\n## Documentation\n\nThe docs are at [docs.cltk.org](http://docs.cltk.org).\n\n\n### Installation\n\nCLTK supports Python version 3.6. The software only runs on POSIX–compliant operating systems (Linux, Mac OS X, FreeBSD, etc.).\n\n``` bash\n$ pip install cltk\n```\n\nSee docs for [complete installation instructions](http://docs.cltk.org/en/latest/installation.html).\n\nThe [CLTK organization curates corpora](https://github.com/cltk) which can be downloaded directly or, better, [imported by the toolkit](http://docs.cltk.org/en/latest/importing_corpora.html).\n\n\n## Contributing\n\nSee the [Quickstart for contributors](https://github.com/cltk/cltk/wiki/Quickstart-for-contributors) for an overview of the process. If you're looking to start with a small contribution, see the [Issue tracker for \"easy\" jobs](https://github.com/cltk/cltk/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy) needing to be done. Bigger projects may be found at [Project ideas](https://github.com/cltk/cltk/wiki/Project-ideas) page. Of course, new ideas are always welcome.\n\n\n## Citation\n\nEach major release of the CLTK is given a [DOI](http://en.wikipedia.org/wiki/Digital_object_identifier), a type of unique identity for digital documents. This DOI ought to be included in your citation, as it will allow researchers to reproduce your results should the CLTK's API or codebase change. To find the CLTK's current DOI, observe the blue `DOI` button in the repository's home on GitHub. To the end of your bibliographic entry, append `DOI ` plus the current identifier. You may also add version/release number, located in the `pypi` button at the project's GitHub repository homepage.\n\nThus, please cite core software as something like:\n```\nKyle P. Johnson et al.. (2014-2017). CLTK: The Classical Language Toolkit. DOI 10.5281/zenodo.<current_release_id>\n```\n\nA style-neutral BibTeX entry would look like this:\n```\n@Misc{johnson2014,\nauthor = {Kyle P. Johnson et al.},\ntitle = {CLTK: The Classical Language Toolkit},\nhowpublished = {\\url{https://github.com/cltk/cltk}},\nnote = {{DOI} 10.5281/zenodo.<current_release_id>},\nyear = {2014--2017},\n}\n```\n\n\n[Many contributors](https://github.com/cltk/cltk/blob/master/contributors.md) have made substantial contributions to the CLTK. For scholarship about particular code, it might be proper to cite these individuals as authors of the work under discussion.\n\n\n## Gratitude\n\nWe are thankful for the following organizations that have offered support:\n\n* Google Summer of Code (sponsoring two students, 2016 & 2017)\n* JetBrains (licenses for PyCharm and WebStorm)\n* Google Cloud Platform (with credits for the Classical Language Archive and API)\n\n\n## License\n\nThe CLTK is Copyright (c) 2017 Kyle P. Johnson, under the MIT License. See [LICENSE](https://github.com/cltk/cltk/blob/master/LICENSE) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5C20:38C7FC:181211:5ADA83:6AB92EBD"},"text_sha256":"470123c0da0e97d197be47925d416a21dcaaaf874061df565b1806a2598697c3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1365","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E8:1DB627:189B9B0:1CC6D97:6AB92EBE"},"commit":{"sha":"f079e2900f57c5cc933c7f9a04cb494a24d93ba7","url":"https://github.com/cltk/cltk/commit/f079e2900f57c5cc933c7f9a04cb494a24d93ba7","date":"2026-02-12T05:33:22Z","author_date":"2026-02-12T05:33:22Z","committer_date":"2026-02-12T05:33:22Z","tree_sha":"168e5afc0e643ff04eea9099e25589f47ce31c60","message_first_line":"Merge pull request #1330 from cltk/write-inflectional-class"},"tree_request_status":200,"tree_rate":{"github_remaining":"1364","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0793:278AC2:18899A8:1CB4D1A:6AB92EBE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4572,"blob_sha":"6709713b87f1e7995ae775e93fc5f4796d8b8728","priority":0}],"documents":[{"path":"README.md","size":4572,"blob_sha":"6709713b87f1e7995ae775e93fc5f4796d8b8728","priority":0,"status":200,"text":"The Classical Language Toolkit (CLTK) is a Python library offering natural language processing (NLP) for pre-modern languages.\n\n## Installation\n\nFor the CLTK's latest version:\n\n```bash\npip install cltk\n```\n\nOptional extras\n\n- GenAI (OpenAI-backed annotation):\n\n```bash\npip install \"cltk[openai]\"\n```\n\n- Stanza (discriminative NLP backends powered by Stanford Stanza):\n\n```bash\npip install \"cltk[stanza]\"\n```\n\nYou can combine extras, for example:\n\n```bash\npip install \"cltk[openai,stanza]\"\n\n# or include local LLM support as well\npip install \"cltk[openai,stanza,ollama]\"\n```\n\n- Local LLMs via Ollama:\n\nInstall the optional extra and ensure an Ollama server is running locally:\n\n```bash\npip install \"cltk[ollama]\"\n```\n\nBy default, when using `backend='ollama'`, CLTK uses the model `llama3.1:8b`. To choose a different local model, pass the `model` parameter to `NLP(...)`, e.g. `qwen2.5:14b`, `gemma2:27b`, `llama3.1:70b`, or any Ollama model string.\n\n### Choosing a model\n\n- OpenAI backend (GenAI in the cloud):\n\n```python\nfrom cltk import NLP\n\n# Default model is \"gpt-5-mini\" when backend='openai'\nnlp = NLP('lati1261', backend='openai')\n\n# Choose a specific model\nnlp_big = NLP('lati1261', backend='openai', model='gpt-5')\n\n# Requires OPENAI_API_KEY to be set in the environment\n# (e.g., via a .env file or shell env var)\n```\n\n- Ollama backend (local LLMs):\n\n```python\nfrom cltk import NLP\n\n# Default model is \"llama3.1:8b\" when backend='ollama'\nnlp_local = NLP('lati1261', backend='ollama')\n\n# Choose a specific local model (any installed/pullable Ollama model)\nnlp_qwen = NLP('lati1261', backend='ollama', model='qwen2.5:14b')\n\n# To use the hosted Ollama Cloud, set OLLAMA_CLOUD_API_KEY\n# and choose backend='ollama-cloud'. The same model strings apply.\n```\n\nFor more information, see [Installation docs](https://docs.cltk.org/en/latest/installation.html) or, to install from source, [Development](https://docs.cltk.org/en/latest/development.html).\n\nPre-1.0 software remains available on the [branch v0.1.x](https://github.com/cltk/cltk/tree/v0.1.x) and docs at <https://legacy.cltk.org>. Install it with `pip install \"cltk<1.0\"`.\n\n## Documentation\n\nDocumentation at <https://docs.cltk.org>.\n\n## Citation\n\nWhen using the CLTK, please cite [the following publication](https://aclanthology.org/2021.acl-demo.3), including the DOI:\n\nJohnson, Kyle P., Patrick J. Burns, John Stewart, Todd Cook, Clément Besnier, and William J. B. Mattingly. \"The Classical Language Toolkit: An NLP Framework for Pre-Modern Languages.\" In *Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations*, pp. 20-29. 2021. 10.18653/v1/2021.acl-demo.3\n\nThe complete BibTeX entry:\n\n```bibtex\n@inproceedings{johnson-etal-2021-classical,\n    title = \"The {C}lassical {L}anguage {T}oolkit: {A}n {NLP} Framework for Pre-Modern Languages\",\n    author = \"Johnson, Kyle P.  and\n      Burns, Patrick J.  and\n      Stewart, John  and\n      Cook, Todd  and\n      Besnier, Cl{\\'e}ment  and\n      Mattingly, William J. B.\",\n    booktitle = \"Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations\",\n    month = aug,\n    year = \"2021\",\n    address = \"Online\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/2021.acl-demo.3\",\n    doi = \"10.18653/v1/2021.acl-demo.3\",\n    pages = \"20--29\",\n    abstract = \"This paper announces version 1.0 of the Classical Language Toolkit (CLTK), an NLP framework for pre-modern languages. The vast majority of NLP, its algorithms and software, is created with assumptions particular to living languages, thus neglecting certain important characteristics of largely non-spoken historical languages. Further, scholars of pre-modern languages often have different goals than those of living-language researchers. To fill this void, the CLTK adapts ideas from several leading NLP frameworks to create a novel software architecture that satisfies the unique needs of pre-modern languages and their researchers. Its centerpiece is a modular processing pipeline that balances the competing demands of algorithmic diversity with pre-configured defaults. The CLTK currently provides pipelines, including models, for almost 20 languages.\",\n}\n```\n\n## License\n\nCopyright (c) 2014–present Kyle P. Johnson under the [MIT License](https://github.com/cltk/cltk/blob/master/LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E68E:3CC8A:17FE68:5EA785:6AB92EBE"},"text_sha256":"fd484c0faab16c454199fdaee800dcc1077ef446d461ed25aebea46577dd58ed"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"bab2min/Kiwi","input_row":{"repository":"bab2min/Kiwi","url":"https://github.com/bab2min/Kiwi","name":"Kiwi","owner":"bab2min","description":"Kiwi(지능형 한국어 형태소 분석기)","language":"C++","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":784,"issues":111,"created_at":"2017-02-21T12:35:12Z","updated_at":"2026-09-27T12:55:58Z","first_commit_at":"2017-02-21T12:33:13Z","last_commit_at":"2026-09-15T17:23:56Z","activity_months":114.76000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:03.448Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"bab2min/Kiwi","visibility":"public","created_at":"2017-02-21T12:35:12Z","updated_at":"2026-09-27T12:55:58Z","private":false,"fork":false,"archived":false,"stargazers_count":784,"open_issues_count":18,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1363","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0857:3BE445:17B9E8C:1BE3A2D:6AB92EBF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1362","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0831:52542:17EA7A9:1C159A0:6AB92EBF"},"commit":{"sha":"a173e0a94334967f4040603c093f0d3f3bf83482","url":"https://github.com/bab2min/Kiwi/commit/a173e0a94334967f4040603c093f0d3f3bf83482","date":"2018-05-10T17:09:28Z","author_date":"2018-05-10T17:09:28Z","committer_date":"2018-05-10T17:09:28Z","tree_sha":"838c66f3365559dfa51d15c4d5e3653fdac6722a","message_first_line":"fixed bug from cached position"},"tree_request_status":200,"tree_rate":{"github_remaining":"1361","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F1:DC698:181EA38:1C492F1:6AB92EC0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2521,"blob_sha":"aa2a3554a9c4dedf6800b0fc1d2ef7138ce83392","priority":0}],"documents":[{"path":"README.md","size":2521,"blob_sha":"aa2a3554a9c4dedf6800b0fc1d2ef7138ce83392","priority":0,"status":200,"text":"# Kiwi\n## 지능형 한국어 형태소 분석기(Korean Intelligent Word Identifier)\n\n### 개요\nKiwi는 C++기반의 한국어 형태소 분석기 라이브러리입니다. \n입력한 단어나 문장을 세종 품사 태그에 따라 분석하고 그 태그를 붙여줍니다. \n현재는 개발 초기 단계로 분석기는 약 80%의 정확도로 해당 텍스트를 분석해 낼 수 있습니다.\n\n### 업데이트 내역\n\n* v0.1: 첫 릴리즈. 약 80% 정확도\n* v0.2: 정확도 85%까지 향상.\n\n  상호정보량 맵을 이용하여 분석 모호성 감소\n\n  서술격 조사 생략 추적 가능해짐\n  \n  (분석 속도: 0.08MB/s)\n\n* v0.3 : 알고리즘 및 메모리 관리 최적화\n\n  실행속도 약 86% 향상 (분석 속도: 0.14MB/s)\n  \n* v0.4 : 알고리즘 개선\n\n  실행속도 약 101% 향상 (분석 속도: 0.28MB/s)\n\n### 성능\n\n* 비문학(신문기사): 0.825\n* 문학작품: 0.851\n\n결과 예시\n\n    프랑스의 세계적인 의상 디자이너 엠마누엘 웅가로가 실내 장식용 직물 디자이너로 나섰다.\n    (정답) 프랑스/NNP\t의/JKG\t세계/NNG\t적/XSN\t이/VCP\tㄴ/ETM\t의상/NNG\t디자이너/NNG\t엠마누엘/NNP\t웅가로/NNP\t가/JKS\t실내/NNG\t장식/NNG\t용/XSN\t직물/NNG\t디자이너/NNG\t로/JKB\t나서/VV\t었/EP\t다/EF\t./SF\n    (Kiwi) 프랑스/NNP\t의/JKG\t세계/NNG\t적/XSN\t이/VCP\tㄴ/ETM\t의상/NNG\t디자이너/NNG\t엠마누엘/NNP\t웅/NNP\t가로/NNG\t가/JKS\t실내/NNG\t장식/NNG\t용/XSN\t직물/NNG\t디자이너/NNG\t로/JKB\t나서/VV\t었/EP\t다/EF\t./SF\n    \n    둥글둥글한 돌은 아무리 굴러도 흔적이 남지 않습니다.\n    (정답) 둥글둥글/MAG\t하/XSA\tㄴ/ETM\t돌/NNG\t은/JX\t아무리/MAG\t구르/VV\t어도/EC\t흔적/NNG\t이/JKS\t남/VV\t지/EC\t않/VX\t습니다/EF\t./SF\n    (Kiwi) 둥글둥글/MAG\t하/XSV\tㄴ/ETM\t돌/NNG\t은/JX\t아무리/MAG\t구르/VV\t어도/EC\t흔적/NNG\t이/JKS\t남/VV\t지/EC\t않/VX\t습니다/EF\t./SF\n\n\t하늘을 훨훨 나는 새처럼\n\t(정답) 하늘/NNG\t을/JKO\t훨훨/MAG\t날/VV\t는/ETM\t새/NNG\t처럼/JKB\n\t(Kiwi) 하늘/NNG\t을/JKO\t훨훨/MAG\t날/VV\t는/ETM\t새/NNG\t처럼/JKB\n\n\t아버지가방에들어가신다\n\t(정답) 아버지/NNG\t가/JKS\t방/NNG\t에/JKB\t들어가/VV\t시/EP\tㄴ다/EF\n\t(Kiwi) 아버지/NNG\t가방/NNG\t에/JKB\t들어가/VV\t시/EP\tㄴ다/EF\n\n### 데모\n\nhttps://lab.bab2min.pe.kr/kiwi 에서 데모를 실행해 볼 수 있습니다.\n\n\n### 라이센스\nKiwi는 LGPL v3 라이센스로 배포됩니다. \n\n이메일: bab2min@gmail.com\n\n블로그: http://bab2min.tistory.com/560\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDBA:3D501:187050:5F1965:6AB92EC0"},"text_sha256":"e6ba08410fe424fb7452d0c68443f519b541be01fd0dc34af71269904fee8213"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1360","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083B:71C58:17DF8D6:1C0AC70:6AB92EC1"},"commit":{"sha":"693d6f2e029cd7635853ae32d917c315c5efa3f4","url":"https://github.com/bab2min/Kiwi/commit/693d6f2e029cd7635853ae32d917c315c5efa3f4","date":"2026-06-10T15:29:55Z","author_date":"2026-06-10T15:29:55Z","committer_date":"2026-06-10T15:29:55Z","tree_sha":"de065708fed8e8f5baabe45908fe73fb81ef39a6","message_first_line":"Bump version to 0.23.2 in CMakeLists.txt and Macro.h"},"tree_request_status":200,"tree_rate":{"github_remaining":"1359","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C1:14A1F2:1837255:1C62481:6AB92EC1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":18715,"blob_sha":"ff83971c9855856d38133e539164171612749852","priority":0}],"documents":[{"path":"README.md","size":18715,"blob_sha":"ff83971c9855856d38133e539164171612749852","priority":0,"status":200,"text":"# Kiwi : 지능형 한국어 형태소 분석기(Korean Intelligent Word Identifier)\n\n![KiwiLogo](https://repository-images.githubusercontent.com/82677855/eb9fa478-175d-47a5-8e07-0e169c030ff5)\n\nx86_64: \n[![Action Status Centos5](https://github.com/bab2min/Kiwi/workflows/Centos7/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n[![Action Status Windows](https://github.com/bab2min/Kiwi/workflows/Windows/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n[![Action Status Ubuntu](https://github.com/bab2min/Kiwi/workflows/Ubuntu/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n[![Action Status macOS](https://github.com/bab2min/Kiwi/workflows/macOS/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n\nOther:\n[![Action Status ARM64](https://github.com/bab2min/Kiwi/workflows/Arm64-Centos7/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n[![Action Status PPC64LE](https://github.com/bab2min/Kiwi/workflows/PPC64LE-Centos7/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n[![WASM Bindings](https://github.com/bab2min/Kiwi/actions/workflows/wasm.yml/badge.svg)](https://github.com/bab2min/Kiwi/actions)\n\nKiwi는 빠른 속도와 범용적인 성능을 지향하는 한국어 형태소 분석기 라이브러리입니다. 한국어 처리에 관심 있는 사람이면 누구나 쉽게 사용할 수 있도록 오픈 소스로 공개 중이며, C++로 구현된 코어 라이브러리를 래핑하여 다양한 프로그래밍 언어에 사용할 수 있도록 준비 중입니다. \n\n형태소 분석은 세종 품사 태그 체계를 기반으로 하고 있으며 모델 학습에는 세종계획 말뭉치와 모두의 말뭉치를 사용하고 있습니다. 웹 텍스트의 경우 약 87%, 문어 텍스트의 경우 약 94% 정도의 정확도로 한국어 문장의 형태소를 분석해 낼 수 있습니다. 또한 간단한 오타의 경우 모델 스스로 교정하는 기능을 지원합니다(0.13.0버전 이후). \n\n아직 부족한 부분이 많기에 개발자분들의 많은 관심과 기여 부탁드립니다.\n\n## 특징\n\n![속도](https://bab2min.github.io/kiwipiepy/images/TokenizeSpeed.PNG)\n\n텍스트 분석 속도가 다른 한국어 형태소분석기들과 비교하여 꽤 빠른 편입니다. 자세한 벤치마크 결과는 [이 문서](https://docs.google.com/spreadsheets/d/1XmuYKDpV5d_WTGNgY73BJGHZ8_AUZKQXpEys819qH2Y/edit?gid=1956520937#gid=1956520937)에서 확인 가능합니다.\n\n![모호성 해소 성능](https://bab2min.github.io/kiwipiepy/images/DisambAcc.PNG)\n\n또한 자체적으로 경량 언어모델을 탑재하여 모호성이 있는 경우에도 제법 정확하게 형태소를 분석해냅니다. CoNg 모델에서부터는 모호성 해소 성능이 더욱 크게 향상되었습니다. (모호성 해소 성능 평가는 [이 페이지](https://github.com/bab2min/kiwipiepy/tree/main/benchmark/disambiguate)에서 수행가능합니다. )\n\n![문장 분리 성능](https://bab2min.github.io/kiwipiepy/images/SentSplit_F1.PNG)\n\n문장 분리 기능을 비롯한 다양한 편의기능을 제공합니다.  (문장 분리 성능 평가는 [이 페이지](https://github.com/bab2min/kiwipiepy/tree/main/benchmark/sentence_split)에서 수행가능합니다. )\n\n라이브러리 차원에서 멀티스레딩을 지원하기 때문에 대량의 텍스트를 분석해야할 경우 멀티코어를 활용하여 빠른 분석이 가능합니다.\n\n## 웹 데모 페이지\n최신 버전의 Kiwi를 사용해볼 수 있는 [웹 데모 페이지](https://kiwi.bab2min.pe.kr/)를 제공하고 있습니다. \n간단하게 테스트를 해보실 경우 웹 데모 페이지를 사용하시고 대량의 텍스트 처리가 필요한 경우 아래 설명된 방법으로 Kiwi를 설치하셔서 로컬에서 구동하시는 걸 권장해드립니다.\n\n## 설치\n\n### C++\n\n#### 컴파일된 바이너리 다운로드\nhttps://github.com/bab2min/Kiwi/releases 에서 Windows, Linux, macOS, Android 버전으로 컴파일된 Library 파일과 모델 파일을 다운로드 받을 수 있습니다.\n\n#### Windows\nVisual Studio 2019 이상을 사용하여 `Kiwi.sln` 파일을 실행하여 컴파일할 수 있습니다.\n\n#### Linux\n이 레포지토리를 clone한 뒤 cmake>=3.12를 사용하여 컴파일합니다. \n모델 파일은 용량이 큰 관계로 [Git LFS](https://git-lfs.github.com/)를 통해 공유됩니다. 따라서 `git clone`에 앞서 Git LFS가 설치되어있는지 확인해주세요.\n\n##### gcc >= 7 이상 혹은 기타 c++17 호환 컴파일러 사용가능 환경\n```console\n$ git clone https://github.com/bab2min/Kiwi\n$ cd Kiwi\n$ git lfs pull\n$ git submodule sync\n$ git submodule update --init --recursive\n$ mkdir build && cd build\n$ cmake -DCMAKE_BUILD_TYPE=Release ../\n$ make\n$ make install\n$ ldconfig\n```\n\n설치가 잘 됐는지 확인하기 위해서는 `kiwi-evaluator`를 실행해봅니다.\n```console\n$ ./kiwi-evaluator --model ../models/base ../eval_data/* --largest\nLoading Time : 981.745 ms\nArchType : avx2\nLM Size : 34.1853 MB\nMem Usage : 278.129 MB\n\nTest file: eval_data/web.txt\n0.862114, 0.852863\nTotal (158 lines) Time : 301.702 ms\nTime per Line : 1.9095 ms\n================\nTest file: eval_data/written.txt\n0.942892, 0.943506\nTotal (33 lines) Time : 62.3999 ms\nTime per Line : 1.89091 ms\n================\nTest file: eval_data/web_with_typos.txt\n0.754417, 0.720886\nTotal (97 lines) Time : 99.7661 ms\nTime per Line : 1.02852 ms\n================\n\n================\nAvg Score\n0.853141, 0.839085\n================\n```\n\n0.13.0 버전부터 추가된 오타 교정 기능이 잘 작동하는지 확인하기 위해서는 다음과 같이 실행합니다.\n```console\n$ ./kiwi-evaluator --model ../models/base ../eval_data/* --largest --typo 6\nLoading Time : 9414.45 ms\nArchType : avx2\nLM Size : 34.1853 MB\nMem Usage : 693.945 MB\n\nTest file: eval_data/web.txt\n0.86321, 0.85566\nTotal (158 lines) Time : 432.236 ms\nTime per Line : 2.73567 ms\n================\nTest file: eval_data/written.txt\n0.941712, 0.942217\nTotal (33 lines) Time : 95.3079 ms\nTime per Line : 2.88812 ms\n================\nTest file: eval_data/web_with_typos.txt\n0.869582, 0.865393\nTotal (97 lines) Time : 169.416 ms\nTime per Line : 1.74656 ms\n================\n\n================\nAvg Score\n0.891501, 0.887757\n================\n```\n\n### C API\ninclude/kiwi/capi.h 를 참조하세요.\n\n#### 컴파일된 바이너리 다운로드\nhttps://github.com/bab2min/Kiwi/releases 에서 Windows, Linux, macOS, Android 버전으로 컴파일된 Library 파일과 모델 파일을 다운로드 받을 수 있습니다.\n\n### C# Wrapper\nhttps://github.com/bab2min/kiwi-gui 에서 공식 GUI 툴에 사용되는 C# Wrapper를 찾으실 수 있습니다. \n\n또한 EX3님께서 기여해주신 wrapper인 [NetKiwi](https://github.com/EX3exp/NetKiwi)가 있습니다.\n\n### Python3 Wrapper\n또한 Python3용 API인 Kiwipiepy가 제공됩니다. 이에 대해서는 https://github.com/bab2min/kiwipiepy 를 참조하시길 바랍니다.\n\n### Java Wrapper\nJava 1.8 이상에서 사용 가능한 KiwiJava가 Java binding으로 제공됩니다. 이에 대해서는 [bindings/java](bindings/java)를 참조하시길 바랍니다.\n\n### Android Library\nAndroid NDK를 통해 Android 앱에서 사용할 수 있는 AAR 라이브러리가 제공됩니다. GitHub Releases에서 `kiwi-android-VERSION.aar` 파일을 다운로드하여 Android 프로젝트에 추가하면 됩니다. \n- **최소 요구사항**: Android API Level 21+, ARM64 아키텍처\n- **사용법**: [bindings/java](bindings/java)의 README 참조\n- **패키지**: AAR 형태로 제공되어 Gradle 프로젝트에 쉽게 통합 가능\n\n### Swift Wrapper\niOS 12.0 이상 및 macOS 10.14 이상에서 사용 가능한 Swift binding이 제공 예정입니다. 조금만 기다려주세요.\n- **최소 요구사항**: iOS 12.0+ / macOS 10.14+, Swift 5.7+\n- **사용법**: [bindings/swift](bindings/swift)의 README 참조\n- **설치**: Swift Package Manager 지원\n\n### R Wrapper\n[mrchypark](https://github.com/mrchypark)님께서 기여해주신 R언어용 wrapper인 [elbird](https://mrchypark.github.io/elbird/)가 있습니다.\n\n### GO Wrapper\n[codingpot](https://discord.gg/rnNJBag42N) 커뮤니티가 작업해주신 go언어용 wrapper인 [kiwigo](https://github.com/codingpot/kiwigo)가 있습니다.\n\n### Web Assembly (Javascript/Typescript)\n[RicBent](https://github.com/RicBent)님께서 기여해주신 Web Assembly binding이 있습니다. 이에 대해서는 [bindings/wasm](bindings/wasm)를 참조하시길 바랍니다.\n\n### Rust Wrapper\n[JAICHANGPARK](https://github.com/JAICHANGPARK)님께서 개발하신 Rust용 wrapper인 [kiwi-rs](https://github.com/JAICHANGPARK/kiwi-rs)가 있습니다.\n\n### Flutter Wrapper\n[JAICHANGPARK](https://github.com/JAICHANGPARK)님께서 개발하신 Rust용 wrapper인 [flutter_kiwi_nlp](https://github.com/JAICHANGPARK/flutter_kiwi_nlp)가 있습니다. \n\n### 응용 프로그램\nKiwi는 C# 기반의 GUI 형태로도 제공됩니다.\n형태소 분석기는 사용해야하지만 별도의 프로그래밍 지식이 없는 경우 이 프로그램을 사용하시면 됩니다.\n다음 프로그램은 Windows에서만 구동 가능합니다.\nhttps://github.com/bab2min/kiwi-gui 에서 다운받을 수 있습니다.\n\n## 업데이트 내역\n업데이트 내역은 [릴리즈 노트](//github.com/bab2min/Kiwi/releases)를 참고해주세요.\n\n## 품사 태그\n\n세종 품사 태그를 기초로 하되, 일부 품사 태그를 추가/수정하여 사용하고 있습니다.\n\n<table class='sp'>\n<tr><th>대분류<\/th><th>태그<\/th><th>설명<\/th><\/tr>\n<tr><th rowspan='5'>체언(N)<\/th><td>NNG<\/td><td>일반 명사<\/td><\/tr>\n<tr><td>NNP<\/td><td>고유 명사<\/td><\/tr>\n<tr><td>NNB<\/td><td>의존 명사<\/td><\/tr>\n<tr><td>NR<\/td><td>수사<\/td><\/tr>\n<tr><td>NP<\/td><td>대명사<\/td><\/tr>\n<tr><th rowspan='5'>용언(V)<\/th><td>VV<\/td><td>동사<\/td><\/tr>\n<tr><td>VA<\/td><td>형용사<\/td><\/tr>\n<tr><td>VX<\/td><td>보조 용언<\/td><\/tr>\n<tr><td>VCP<\/td><td>긍정 지정사(이다)<\/td><\/tr>\n<tr><td>VCN<\/td><td>부정 지정사(아니다)<\/td><\/tr>\n<tr><th rowspan='1'>관형사<\/th><td>MM<\/td><td>관형사<\/td><\/tr>\n<tr><th rowspan='2'>부사(MA)<\/th><td>MAG<\/td><td>일반 부사<\/td><\/tr>\n<tr><td>MAJ<\/td><td>접속 부사<\/td><\/tr>\n<tr><th rowspan='1'>감탄사<\/th><td>IC<\/td><td>감탄사<\/td><\/tr>\n<tr><th rowspan='9'>조사(J)<\/th><td>JKS<\/td><td>주격 조사<\/td><\/tr>\n<tr><td>JKC<\/td><td>보격 조사<\/td><\/tr>\n<tr><td>JKG<\/td><td>관형격 조사<\/td><\/tr>\n<tr><td>JKO<\/td><td>목적격 조사<\/td><\/tr>\n<tr><td>JKB<\/td><td>부사격 조사<\/td><\/tr>\n<tr><td>JKV<\/td><td>호격 조사<\/td><\/tr>\n<tr><td>JKQ<\/td><td>인용격 조사<\/td><\/tr>\n<tr><td>JX<\/td><td>보조사<\/td><\/tr>\n<tr><td>JC<\/td><td>접속 조사<\/td><\/tr>\n<tr><th rowspan='5'>어미(E)<\/th><td>EP<\/td><td>선어말 어미<\/td><\/tr>\n<tr><td>EF<\/td><td>종결 어미<\/td><\/tr>\n<tr><td>EC<\/td><td>연결 어미<\/td><\/tr>\n<tr><td>ETN<\/td><td>명사형 전성 어미<\/td><\/tr>\n<tr><td>ETM<\/td><td>관형형 전성 어미<\/td><\/tr>\n<tr><th rowspan='1'>접두사<\/th><td>XPN<\/td><td>체언 접두사<\/td><\/tr>\n<tr><th rowspan='4'>접미사(XS)<\/th><td>XSN<\/td><td>명사 파생 접미사<\/td><\/tr>\n<tr><td>XSV<\/td><td>동사 파생 접미사<\/td><\/tr>\n<tr><td>XSA<\/td><td>형용사 파생 접미사<\/td><\/tr>\n<tr><td>XSM<\/td><td>부사 파생 접미사<sup>*<\/sup><\/td><\/tr>\n<tr><th rowspan='1'>어근<\/th><td>XR<\/td><td>어근<\/td><\/tr>\n<tr><th rowspan='12'>부호, 외국어, 특수문자(S)<\/th><td>SF<\/td><td>종결 부호(. ! ?)<\/td><\/tr>\n<tr><td>SP<\/td><td>구분 부호(, / : ;)<\/td><\/tr>\n<tr><td>SS<\/td><td>인용 부호 및 괄호(' \" ( ) [ ] < > { } ― ‘ ’ “ ” ≪ ≫ 등)<\/td><\/tr>\n<tr><td>SSO<\/td><td>SS 중 여는 부호<sup>*<\/sup><\/td><\/tr>\n<tr><td>SSC<\/td><td>SS 중 닫는 부호<sup>*<\/sup><\/td><\/tr>\n<tr><td>SE<\/td><td>줄임표(…)<\/td><\/tr>\n<tr><td>SO<\/td><td>붙임표(- ~)<\/td><\/tr>\n<tr><td>SW<\/td><td>기타 특수 문자<\/td><\/tr>\n<tr><td>SL<\/td><td>알파벳(A-Z a-z)<\/td><\/tr>\n<tr><td>SH<\/td><td>한자<\/td><\/tr>\n<tr><td>SN<\/td><td>숫자(0-9)<\/td><\/tr>\n<tr><td>SB<\/td><td>순서 있는 글머리(가. 나. 1. 2. 가) 나) 등)<sup>*<\/sup><\/td><\/tr>\n<tr><th rowspan='1'>분석 불능<\/th><td>UN<\/td><td>분석 불능<sup>*<\/sup><\/td><\/tr>\n<tr><th rowspan='6'>웹(W)<\/th><td>W_URL<\/td><td>URL 주소<sup>*<\/sup><\/td><\/tr>\n<tr><td>W_EMAIL<\/td><td>이메일 주소<sup>*<\/sup><\/td><\/tr>\n<tr><td>W_HASHTAG<\/td><td>해시태그(#abcd)<sup>*<\/sup><\/td><\/tr>\n<tr><td>W_MENTION<\/td><td>멘션(@abcd)<sup>*<\/sup><\/td><\/tr>\n<tr><td>W_SERIAL<\/td><td>일련번호(전화번호, 통장번호, IP주소 등)<sup>*<\/sup><\/td><\/tr>\n<tr><td>W_EMOJI<\/td><td>이모지<sup>*<\/sup><\/td><\/tr>\n<tr><th rowspan='3'>기타<\/th><td>Z_CODA<\/td><td>덧붙은 받침<sup>*<\/sup><\/td><\/tr>\n<tr><td>Z_SIOT<\/td><td>사이시옷<sup>*<\/sup><\/td><\/tr>\n<tr><td>USER0~4<\/td><td>사용자 정의 태그<sup>*<\/sup><\/td><\/tr>\n<\/table>\n\n<sup>*<\/sup> 세종 품사 태그와 다른 독자적인 태그입니다.\n\n0.12.0 버전부터 `VV`, `VA`, `VX`, `XSA` 태그에 불규칙 활용여부를 명시하는 접미사 `-R`와 `-I`이 덧붙을 수 있습니다. \n`-R`은 규칙 활용, `-I`은 불규칙 활용을 나타냅니다.\n\n## 성능\n\n**결과 예시**\n```text\n프랑스의 세계적인 의상 디자이너 엠마누엘 웅가로가 실내 장식용 직물 디자이너로 나섰다.\n(정답) 프랑스/NNP\t의/JKG\t세계/NNG\t적/XSN\t이/VCP\tㄴ/ETM\t의상/NNG\t디자이너/NNG\t엠마누엘/NNP\t웅가로/NNP\t가/JKS\t실내/NNG\t장식/NNG\t용/XSN\t직물/NNG\t디자이너/NNG\t로/JKB\t나서/VV\t었/EP\t다/EF\t./SF\n(Kiwi) 프랑스/NNP\t의/JKG\t세계/NNG\t적/XSN\t이/VCP\tᆫ/ETM\t의상/NNG\t디자이너/NNG\t엠마누/NNP\t에/JKB\tᆯ/JKO\t웅가로/NNP\t가/JKS\t실내/NNG\t장식/NNG\t용/XSN\t직물/NNG\t디자이너/NNG\t로/JKB\t나서/VV\t었/EP\t다/EF\t./SF\n\n둥글둥글한 돌은 아무리 굴러도 흔적이 남지 않습니다.\n(정답) 둥글둥글/MAG\t하/XSA\tㄴ/ETM\t돌/NNG\t은/JX\t아무리/MAG\t구르/VV\t어도/EC\t흔적/NNG\t이/JKS\t남/VV\t지/EC\t않/VX\t습니다/EF\t./SF\n(Kiwi) 둥글둥글/MAG\t하/XSA\tᆫ/ETM\t돌/NNG\t은/JX\t아무리/MAG\t구르/VV\t어도/EC\t흔적/NNG\t이/JKS\t남/VV\t지/EC\t않/VX\t습니다/EF\t./SF\n\n하늘을 훨훨 나는 새처럼\n(정답) 하늘/NNG\t을/JKO\t훨훨/MAG\t날/VV\t는/ETM\t새/NNG\t처럼/JKB\n(Kiwi) 하늘/NNG\t을/JKO\t훨훨/MAG\t날/VV\t는/ETM\t새/NNG\t처럼/JKB\n\n아버지가방에들어가신다\n(정답) 아버지/NNG\t가/JKS\t방/NNG\t에/JKB\t들어가/VV\t시/EP\tㄴ다/EF\n(Kiwi) 아버지/NNG\t가/JKS\t방/NNG\t에/JKB\t들어가/VV\t시/EP\tᆫ다/EC\n```\n## 데모\n\nhttps://lab.bab2min.pe.kr/kiwi 에서 데모를 실행해 볼 수 있습니다.\n\n\n## 라이센스\nKiwi는 LGPL v3 라이센스로 배포됩니다. \n\n이메일: bab2min@gmail.com\n\n블로그: http://bab2min.tistory.com/560\n\n## 기여하기\n자세한 내용은 [CONTRIBUTING.md](CONTRIBUTING.md) 에서 확인해주세요.\n\n## 인용하기\nDOI 혹은 아래의 BibTex를 이용해 인용해주세요.\n[![DOI](https://img.shields.io/badge/DOI-10.23287/KJDH.2024.1.1.6-1BB31B.svg)](https://doi.org/10.23287/KJDH.2024.1.1.6)\n```text\n@article{43508,\ntitle = {Kiwi: 통계적 언어 모델과 Skip-Bigram을 이용한  한국어 형태소 분석기 구현},\njournal = {디지털인문학},\nvolume = {1},\nnumber = {1},\npage = {109-136},\nyear = {2024},\nissn = {3058-311X},\ndoi = {https://doi.org/10.23287/KJDH.2024.1.1.6},\nurl = {https://kjdh/v.1/1/109/43508},\nauthor = {민철 이},\nkeywords = {한국어, 자연어처리, 형태소 분석기, 모호성 해소, 언어 모델},\nabstract = {한국어 형태소 분석 시 모델이 마주하는 어려움 중 하나는 모호성이다. 이는 한국어에서 기저형이 전혀 다른 형태소 조합이 동일한 표면형을 가질 수 있기 때문에 발생하며 이를 바르게 분석하기 위해서는 문맥을 고려하는 능력이 모델에게 필수적이다. 형태소 분석기 Kiwi는 이를 해결하기 위해 근거리 맥락을 고려하는 통계적 언어 모델과 원거리 맥락을 고려하는 Skip-Bigram 모델을 조합하는 방식을 제안한다. 제안된 방식은 모호성 해소에서 평균 정확도 86.7%를 달성하여 평균 50~70%에 머무르는 기존의 오픈소스 형태소 분석기, 특히 딥러닝 기반의 분석기들보다도 앞서는 결과를 보였다. 또한 최적화된 경량 모델을 사용한 덕분에 타 분석기보다 빠른 속도를 보여 대량의 텍스트를 분석하는 데에도 유용하게 쓰일 수 있다. 오픈소스로 공개된 Kiwi는 전술한 특징들 덕분에 텍스트 마이닝, 자연어처리, 인문학 등 다양한 분야에서 널리 사용되고 있다. 본 연구는 형태소 분석의 정확도와 효율성을 모두 개선했으나, 미등록어 처리와 한국어 방언 분석 등의 과제에서 한계를 보여 이에 대한 추가 보완이 필요하다.},\n}\n```\n```text\n@article{43508,\ntitle = {Kiwi: Developing a Korean Morphological Analyzer  Based on Statistical Language Models and Skip-Bigram},\njournal = {Korean Journal of Digital Humanities},\nvolume = {1},\nnumber = {1},\npage = {109-136},\nyear = {2024},\nissn = {3058-311X},\ndoi = {https://doi.org/10.23287/KJDH.2024.1.1.6},\nurl = {https://kjdh/v.1/1/109/43508},\nauthor = {Min-chul Lee},\nkeywords = {한국어, 자연어처리, 형태소 분석기, 모호성 해소, 언어 모델},\nabstract = {One of the challenges faced by models in Korean morphological analysis is ambiguity. This arises because different combinations of morphemes with completely different base forms can share the same surface form in Korean, necessitating the model's ability to consider context for accurate analysis. The morphological analyzer Kiwi addresses this issue by proposing a combination of a statistical language model that considers local context and a Skip-Bigram model that considers global context. This proposed method achieved an average accuracy of 86.7% in resolving ambiguities, outperforming existing open-source morphological analyzers, particularly deep learning-based ones, which typically achieve between 50-70%. Additionally, thanks to the optimized lightweight model, Kiwi shows faster speeds compared to other analyzers, making it useful for analyzing large volumes of text. Kiwi, released as open source, is widely used in various fields such as text mining, natural language processing, and the humanities due to these features. Although this study improved both the accuracy and efficiency of morphological analysis, it shows limitations in handling out-of-vocabulary problem and analyzing Korean dialects, necessitating further improvements in these areas.},\n}\n```\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D998:376DE:182D57:5ED79A:6AB92EC0"},"text_sha256":"a0568fbd295f16497dc36a37f177a2db8820dd4fc63d3ee935b5e65556b4a447"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"openeventdata/mordecai","input_row":{"repository":"openeventdata/mordecai","url":"https://github.com/openeventdata/mordecai","name":"mordecai","owner":"openeventdata","description":"Full text geoparsing as a Python library","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":766,"issues":100,"created_at":"2016-06-23T19:49:45Z","updated_at":"2026-09-09T01:01:54Z","first_commit_at":"2015-04-21T17:15:16Z","last_commit_at":"2021-02-01T14:39:18Z","activity_months":69.409999999999997,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:06.518Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"openeventdata/mordecai","visibility":"public","created_at":"2016-06-23T19:49:45Z","updated_at":"2026-09-09T01:01:54Z","private":false,"fork":false,"archived":false,"stargazers_count":766,"open_issues_count":28,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1358","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C8:35D5A8:17FA22E:1C2542A:6AB92EC2"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1357","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0872:DC698:181EC96:1C49598:6AB92EC2"},"commit":{"sha":"f9c610816e270c88b01b3bdfe49ecaefad856e79","url":"https://github.com/openeventdata/mordecai/commit/f9c610816e270c88b01b3bdfe49ecaefad856e79","date":"2018-01-22T22:09:40Z","author_date":"2018-01-22T22:09:40Z","committer_date":"2018-01-22T22:09:40Z","tree_sha":"766f59590863662b81ac12afaf37cb70e38d08cc","message_first_line":"Merge pull request #46 from openeventdata/hotfix"},"tree_request_status":200,"tree_rate":{"github_remaining":"1356","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086B:1B4E7A:17D43BB:1BFF35F:6AB92EC3"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":6517,"blob_sha":"ed17bcb19fe4f5614eede6ad534a6ce74bb3e9ad","priority":0}],"documents":[{"path":"README.md","size":6517,"blob_sha":"ed17bcb19fe4f5614eede6ad534a6ce74bb3e9ad","priority":0,"status":200,"text":"![](paper/mordecai_geoparsing.png)\n\nFull text geoparsing as a Python library. Extract the place names from a piece of\ntext, resolve them to the correct place, and return their coordinates and\nstructured geographic information.\n\nExample usage\n-------------\n\n```\n>>> from mordecai import Geoparser\n>>> geo = Geoparser()\n>>> geo.geoparse(\"I traveled from Oxford to Ottawa.\")\n\n[{'country_conf': 0.96474487,\n  'country_predicted': 'GBR',\n  'geo': {'admin1': 'England',\n   'country_code3': 'GBR',\n   'feature_class': 'P',\n   'feature_code': 'PPLA2',\n   'geonameid': '2640729',\n   'lat': '51.75222',\n   'lon': '-1.25596',\n   'place_name': 'Oxford'},\n  'spans': [{'end': 22, 'start': 16}],\n  'word': 'Oxford'},\n {'country_conf': 0.83302397,\n  'country_predicted': 'CAN',\n  'geo': {'admin1': 'Ontario',\n   'country_code3': 'CAN',\n   'feature_class': 'P',\n   'feature_code': 'PPLC',\n   'geonameid': '6094817',\n   'lat': '45.41117',\n   'lon': '-75.69812',\n   'place_name': 'Ottawa'},\n  'spans': [{'end': 32, 'start': 26}],\n  'word': 'Ottawa'}]\n```\n\nMordecai requires a running Elasticsearch service with Geonames in it. See\n\"Installation\" below for instructions.\n\n\nInstallation and Requirements\n--------------------\n\n1. Mordecai is on PyPI and can be installed for Python 3 with pip:\n\n```\npip install mordecai\n```\n\n2. You should then download the required spaCy NLP model:\n\n```\npython -m spacy download en_core_web_lg\n```\n\n3. In order to work, Mordecai needs access to a Geonames gazetteer running in\nElasticsearch. The easiest way to set it up is by running the following\ncommands (you must have [Docker](https://docs.docker.com/engine/installation/)\ninstalled first).\n\n```\ndocker pull elasticsearch:5.5.2\nwget https://s3.amazonaws.com/ahalterman-geo/geonames_index.tar.gz --output-file=wget_log.txt\ntar -xzf geonames_index.tar.gz\ndocker run -d -p 127.0.0.1:9200:9200 -v $(pwd)/geonames_index/:/usr/share/elasticsearch/data elasticsearch:5.5.2\n```\n\nSee the [es-geonames](https://github.com/openeventdata/es-geonames) for the code used\nto produce this index.\n\nHow does it work?\n-----------------\n\nMordecai takes in unstructured text and returns structured geographic information extracted\nfrom it. \n\n- It uses [spaCy](https://github.com/explosion/spaCy/)'s named entity recognition to\n  extract placenames from the text.\n\n- It uses the [geonames](http://www.geonames.org/)\n  gazetteer in an [Elasticsearch](https://www.elastic.co/products/elasticsearch) index \n  (with some custom logic) to find the potential coordinates of\n  extracted place names.\n\n- It uses neural networks implemented in [Keras](https://keras.io/) and trained on new annotated\n  data labeled with [Prodigy](https://prodi.gy/) to infer the correct country and correct gazetteer entries for each\n  placename. \n\nThe training data for the two models includes copyrighted text so cannot be\nshared freely, but get in touch with me if you're interested in it.\n\nAPI\n--------\n\nWhen instantiating the `Geoparser()` module, the following options can be changed:\n\n- `es_ip` : Where the Geonames Elasticsearch service is running. Defaults to\n    `localhost`, which is where it runs if you're using the default Docker\n    setup described above.\n- `es_port` : What port the Geonames Elasticsearch service is running on.\n    Defaults to `9200`, which is where the Docker setup has it\n- `country_confidence` : Set the country model confidence below which no\n    geolocation will be returned. If it's really low, the model's probably\n    wrong and will return weird results. Defaults to `0.6`. \n- `verbose` : Return all the features used in the country picking model?\n    Defaults to `False`. \n- `n_threads`: used in the `batch_geoparse` method to set the number of threads\n    to run spaCy's `nlp.pipe` process and `geoparse` as a whole.\n\n`geoparse` is the primary endpoint and the only one that most users will need.\nOther methods are primarily internal to Mordecai but may be directly useful in\nsome cases:\n\n- `infer_country` take a document and attempts to infer the most probable\n    country for each.\n- `query_geonames` and `query_geonames_country` can be used for performing a\n    search over Geonames in Elasticsearch\n- methods with the `_feature` prefix are internal methods for\n    calculating country picking features from text.\n\n`batch_geoparse` is an experimental endpoint that takes in a list of documents,\nbatch processes them, and returns a corresponding list of lists. It currently\naround twice as fast as `geoparse`.\n\nTests\n-----\n\nMordecai includes a few unit tests. To run the tests, `cd` into the\n`mordecai` directory and run:\n\n```\npytest\n```\n\nThe tests require access to a running Elastic/Geonames service to\ncomplete. The tests are currently failing on TravisCI with an unexplained\nsegfault but run fine locally. Mordecai has only been tested with Python 3.\n\n\nAcknowledgements\n----------------\n\nAn earlier verion of this software was donated to the Open Event Data Alliance\nby Caerus Associates.  See [Releases](https://github.com/openeventdata/mordecai/releases) or the [legacy-docker](https://github.com/openeventdata/mordecai/tree/legacy-docker) branch for the\n2015-2016 and the 2016-2017 production versions of Mordecai.\n\nThis work was funded in part by DARPA's XDATA program, the U.S. Army Research\nLaboratory and the U.S. Army Research Office through the Minerva Initiative\nunder grant number W911NF-13-0332, and the National Science Foundation under\naward number SBE-SMA-1539302. Any opinions, findings, and conclusions or\nrecommendations expressed in this material are those of the authors and do not\nnecessarily reflect the views of DARPA, ARO, Minerva, NSF, or the U.S.\ngovernment.\n\nCiting\n------\n\nSend a note if you use Mordecai! It's always interesting to hear what people\nare doing with it and whether it's doing what they want it to.\n\nIf you use this software in academic work, please cite as \n\nAndrew Halterman, (2017). Mordecai: Full Text Geoparsing and Event Geocoding. *Journal of Open Source\nSoftware*, 2(9), 91, doi:10.21105/joss.00091\n\n```\n@article{halterman2017mordecai,\n  title={Mordecai: Full Text Geoparsing and Event Geocoding},\n  author={Halterman, Andrew},\n  journal={The Journal of Open Source Software},\n  volume={2},\n  number={9},\n  year={2017},\n  doi={10.21105/joss.00091}\n}\n```\n\nContributing\n------------\n\nContributions via pull requests are welcome. Please make sure that changes\npass the unit tests. Any bugs and problems can be reported\non the repo's [issues page](https://github.com/openeventdata/mordecai/issues).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C72E:18233:17C9A7:5E71CA:6AB92EC2"},"text_sha256":"a73e161e2c332dcb3af853151b4bf10ed9b6228919ea2823fc57a2b8e265ffa3"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1355","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08D7:1B4E7A:17D447C:1BFF431:6AB92EC4"},"commit":{"sha":"9d37110f6cd1275852548fc53fd7a21bb77593f9","url":"https://github.com/openeventdata/mordecai/commit/9d37110f6cd1275852548fc53fd7a21bb77593f9","date":"2021-02-01T14:39:18Z","author_date":"2021-02-01T14:39:18Z","committer_date":"2021-02-01T14:39:18Z","tree_sha":"74b4115c8c589ee4aae469048f3e8d8afa63dadf","message_first_line":"Update README.md"},"tree_request_status":200,"tree_rate":{"github_remaining":"1354","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093E:3203A7:17BD8C1:1BE8825:6AB92EC4"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7420,"blob_sha":"decd120a35404ce945bd7a24c407ce15af2e5ad3","priority":0}],"documents":[{"path":"README.md","size":7420,"blob_sha":"decd120a35404ce945bd7a24c407ce15af2e5ad3","priority":0,"status":200,"text":"![](paper/mordecai_geoparsing.png)\n\nFull text geoparsing as a Python library. Extract the place names from a\npiece of English-language text, resolve them to the correct place, and return\ntheir coordinates and structured geographic information.\n\n**Mordecai is ready for an upgrade!** Please take the user survey [here](https://z0l4ihmu0ud.typeform.com/to/b8FmCfMt) \nto help shape what v3 will look like.\n\nExample usage\n-------------\n\n```\n>>> from mordecai import Geoparser\n>>> geo = Geoparser()\n>>> geo.geoparse(\"I traveled from Oxford to Ottawa.\")\n\n[{'country_conf': 0.96474487,\n  'country_predicted': 'GBR',\n  'geo': {'admin1': 'England',\n   'country_code3': 'GBR',\n   'feature_class': 'P',\n   'feature_code': 'PPLA2',\n   'geonameid': '2640729',\n   'lat': '51.75222',\n   'lon': '-1.25596',\n   'place_name': 'Oxford'},\n  'spans': [{'end': 22, 'start': 16}],\n  'word': 'Oxford'},\n {'country_conf': 0.83302397,\n  'country_predicted': 'CAN',\n  'geo': {'admin1': 'Ontario',\n   'country_code3': 'CAN',\n   'feature_class': 'P',\n   'feature_code': 'PPLC',\n   'geonameid': '6094817',\n   'lat': '45.41117',\n   'lon': '-75.69812',\n   'place_name': 'Ottawa'},\n  'spans': [{'end': 32, 'start': 26}],\n  'word': 'Ottawa'}]\n```\n\nMordecai requires a running Elasticsearch service with Geonames in it. See\n\"Installation\" below for instructions.\n\n\nInstallation and Requirements\n--------------------\n\n1. Mordecai is on PyPI and can be installed for Python 3 with pip:\n\n```\npip install mordecai\n```\n\n**Note**: It's *strongly* recommended that you run Mordecai in a virtual\nenvironment. The libraries that Mordecai depends on are not always the most\nrecent versions and using a virtual environment prevents libraries from being\ndowngraded or running into other issues:\n\n```\npython -m venv mordecai-env\nsource mordecai-env/bin/activate\npip install mordecai\n```\n\n2. You should then download the required spaCy NLP model:\n\n```\npython -m spacy download en_core_web_lg\n```\n\n3. In order to work, Mordecai needs access to a Geonames gazetteer running in\nElasticsearch. The easiest way to set it up is by running the following\ncommands (you must have [Docker](https://docs.docker.com/engine/installation/)\ninstalled first).\n\n```\ndocker pull elasticsearch:5.5.2\nwget https://andrewhalterman.com/files/geonames_index.tar.gz --output-file=wget_log.txt\ntar -xzf geonames_index.tar.gz\ndocker run -d -p 127.0.0.1:9200:9200 -v $(pwd)/geonames_index/:/usr/share/elasticsearch/data elasticsearch:5.5.2\n```\n\nSee the [es-geonames](https://github.com/openeventdata/es-geonames) for the code used\nto produce this index.\n\nTo update the index, simply shut down the old container, re-download the index\nfrom s3, and restart the container with the new index.\n\nCiting\n------\n\nIf you use this software in academic work, please cite as \n\n```\n@article{halterman2017mordecai,\n  title={Mordecai: Full Text Geoparsing and Event Geocoding},\n  author={Halterman, Andrew},\n  journal={The Journal of Open Source Software},\n  volume={2},\n  number={9},\n  year={2017},\n  doi={10.21105/joss.00091}\n}\n```\n\nHow does it work?\n-----------------\n\nMordecai takes in unstructured text and returns structured geographic information extracted\nfrom it. \n\n- It uses [spaCy](https://github.com/explosion/spaCy/)'s named entity recognition to\n  extract placenames from the text.\n\n- It uses the [geonames](http://www.geonames.org/)\n  gazetteer in an [Elasticsearch](https://www.elastic.co/products/elasticsearch) index \n  (with some custom logic) to find the potential coordinates of\n  extracted place names.\n\n- It uses neural networks implemented in [Keras](https://keras.io/) and trained on new annotated\n  English-language data labeled with [Prodigy](https://prodi.gy/) to infer the correct country and correct gazetteer entries for each\n  placename. \n\nThe training data for the two models includes copyrighted text so cannot be\nshared freely. Applying Mordecai to non-English language text would require labeling data\nin the target language and retraining.\n\nAPI and Configuration\n---------------------\n\nWhen instantiating the `Geoparser()` module, the following options can be changed:\n\n- `es_hosts` : List of hosts where the Geonames Elasticsearch service is\n    running. Defaults to `['localhost']`, which is where it runs if you're using\n    the default Docker setup described above.\n- `es_port` : What port the Geonames Elasticsearch service is running on.\n    Defaults to `9200`, which is where the Docker setup has it\n- `es_ssl` : Whether Elasticsearch requires an SSL connection.\n    Defaults to `False`.\n- `es_auth` : Optional HTTP auth parameters to use with ES.\n    If provided, it should be a two-tuple of `(user, password)`.\n- `country_confidence` : Set the country model confidence below which no\n    geolocation will be returned. If it's really low, the model's probably\n    wrong and will return weird results. Defaults to `0.6`. \n- `verbose` : Return all the features used in the country picking model?\n    Defaults to `False`. \n- `threads`: whether to use threads to make parallel queries to the\n    Elasticsearch database. Defaults to `True`, which gives a ~6x speedup.\n\n`geoparse` is the primary endpoint and the only one that most users will need.\nOther, mostly internal, methods may be useful in some cases:\n\n- `lookup_city` takes a city name, country, and (optionally) ADM1/state/governorate and \n    does a rule-based lookup for the city.\n- `infer_country` take a document and attempts to infer the most probable\n    country for each.\n- `query_geonames` and `query_geonames_country` can be used for performing a\n    search over Geonames in Elasticsearch\n- methods with the `_feature` prefix are internal methods for\n    calculating country picking features from text.\n\n`batch_geoparse` takes in a list of documents and uses spaCy's `nlp.pipe`\nmethod to process them more efficiently in the NLP step. \n\nAdvanced users on large machines can increase the `lru_cache` parameter from 250\nto 1000. This will use more memory but will increase parsing speed.\n\nTests\n-----\n\nMordecai includes unit tests. To run the tests, `cd` into the\n`mordecai` directory and run:\n\n```\npytest\n```\n\nThe tests require access to a running Elastic/Geonames service to\ncomplete. The tests are currently failing on TravisCI with an unexplained\nsegfault but run fine locally. Mordecai has only been tested with Python 3.\n\n\nAcknowledgements\n----------------\n\nAn earlier verion of this software was donated to the Open Event Data Alliance\nby Caerus Associates.  See [Releases](https://github.com/openeventdata/mordecai/releases) \nor the [legacy-docker](https://github.com/openeventdata/mordecai/tree/legacy-docker) branch for the\n2015-2016 and the 2016-2017 production versions of Mordecai.\n\nThis work was funded in part by DARPA's XDATA program, the U.S. Army Research\nLaboratory and the U.S. Army Research Office through the Minerva Initiative\nunder grant number W911NF-13-0332, and the National Science Foundation under\naward number SBE-SMA-1539302. Any opinions, findings, and conclusions or\nrecommendations expressed in this material are those of the authors and do not\nnecessarily reflect the views of DARPA, ARO, Minerva, NSF, or the U.S.\ngovernment.\n\n\nContributing\n------------\n\nContributions via pull requests are welcome. Please make sure that changes\npass the unit tests. Any bugs and problems can be reported\non the repo's [issues page](https://github.com/openeventdata/mordecai/issues).\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1D20:3AC5A:181596:5EBEAE:6AB92EC0"},"text_sha256":"574694fc6dee1b3c912733de6b8a01200c38a01ff2e6f85c7062b6d3593052b1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"titipata/pubmed_parser","input_row":{"repository":"titipata/pubmed_parser","url":"https://github.com/titipata/pubmed_parser","name":"pubmed_parser","owner":"titipata","description":":clipboard: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":738,"issues":114,"created_at":"2015-03-05T05:13:57Z","updated_at":"2026-09-19T03:11:23Z","first_commit_at":"2015-03-05T05:25:01Z","last_commit_at":"2025-07-31T15:29:15Z","activity_months":124.88,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:09.304Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"titipata/pubmed_parser","visibility":"public","created_at":"2015-03-05T05:13:57Z","updated_at":"2026-09-19T03:11:23Z","private":false,"fork":false,"archived":false,"stargazers_count":738,"open_issues_count":21,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1353","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087F:71F98:185DEB2:1C88C03:6AB92EC5"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1352","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084A:278AC2:1889FB2:1CB53FC:6AB92EC5"},"commit":{"sha":"591c9df29b798332e115beef39e2ed04edafea67","url":"https://github.com/titipata/pubmed_parser/commit/591c9df29b798332e115beef39e2ed04edafea67","date":"2018-05-22T14:33:23Z","author_date":"2018-05-22T14:33:23Z","committer_date":"2018-05-22T14:33:23Z","tree_sha":"f31ed88c9e673b6340ba1085eb76ce0700716036","message_first_line":"Adding DOI to result of web parser"},"tree_request_status":200,"tree_rate":{"github_remaining":"1351","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091D:A9DC0:17E6252:1C110FC:6AB92EC6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11574,"blob_sha":"4b18e2496ebaa253a95b9d4ae19f503eca4d82f0","priority":0}],"documents":[{"path":"README.md","size":11574,"blob_sha":"4b18e2496ebaa253a95b9d4ae19f503eca4d82f0","priority":0,"status":200,"text":"# Parser for Pubmed Open-Access XML Subset and MEDLINE XML Dataset\n\n[![Join the chat at https://gitter.im/titipata/pubmed_parser](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/titipata/pubmed_parser?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/titipata/pubmed_parser/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/31697087.svg)](https://zenodo.org/badge/latestdoi/31697087)\n\nPython parser for [PubMed Open-Access (OA) subset](http://www.ncbi.nlm.nih.gov/pmc/tools/ftp/)\n and [MEDLINE XML](https://www.nlm.nih.gov/bsd/licensee/) repository. See\n [wiki page](https://github.com/titipata/pubmed_parser/wiki) on how to download and\n process dataset using the repository.\n\n**note**\n- `path` provided to function can be path to compressed or uncompressed xml file.\nWe provide example files in [`data`](data/) folder.\n- for website parser, you should scrape with pause. Please see\n[copyright notice](https://www.ncbi.nlm.nih.gov/pmc/about/copyright/#copy-PMC) because your IP\ncan get blocked if you try to download in bulk.\n\n## Parsers available\n\n#### Parse Pubmed OA XML information\n\nWe created a simple parser for PubMed Open Access Subset where you can give\nan XML path or string to the function called `parse_pubmed_xml` which will return\na dictionary with the following information:\n\n - `full_title`: article's title\n - `abstract`: abstract\n - `journal`: Journal name\n - `pmid`: Pubmed ID\n - `pmc`: Pubmed Central ID\n - `doi`: DOI of the article\n - `publisher_id`: publisher ID\n - `author_list`: list of authors with affiliation keys in the following format\n\n ```python\n [['last_name_1', 'first_name_1', 'aff_key_1'],\n  ['last_name_1', 'first_name_1', 'aff_key_2'],\n  ['last_name_2', 'first_name_2', 'aff_key_1'], ...]\n ```\n - `affiliation_list`: list of affiliation keys and affiliation strings in the following format\n ```python\n [['aff_key_1', 'affiliation_1'],\n  ['aff_key_2', 'affiliation_2'], ...]\n ```\n\n - `publication_year`: publication year\n - `subjects`: list of subjects listed in the article separated by semicolon.\n Sometimes, it only contains type of article, such as research article, review, proceedings, etc.\n\n```python\nimport pubmed_parser as pp\ndict_out = pp.parse_pubmed_xml(path)\n```\n\n#### Parse Pubmed OA citation references\n\nThe function `parse_pubmed_references` will process a Pubmed Open Access XML\nfile and return a list of the PMID it cites.\nEach dictionary has keys as follows\n\n- `pmid`: Pubmed ID of the article\n- `pmc`: Pubmed Central ID of the article\n- `article_title`: title of cited article\n- `journal`: journal name\n- `journal_type`: type of journal\n- `pmid_cited`: Pubmed ID of article that article cites\n- `doi_cited`: DOI of article that article cites\n\n```python\ndicts_out = pp.parse_pubmed_references(path) # return list of dictionary\n```\n\n#### Parse Pubmed OA images and captions\n\nThe function `parse_pubmed_caption` can parse image captions from given path\nto XML file. It will return reference index that you can refer back to actual\nimages. The function will return list of dictionary which has following keys\n\n- `pmid`: Pubmed ID\n- `pmc`: Pubmed Central ID\n- `fig_caption`: string of caption\n- `fig_id`: reference id for figure (use to refer in XML article)\n- `fig_label`: label of the figure\n- `graphic_ref`: reference to image file name provided from Pubmed OA\n\n```python\ndicts_out = pp.parse_pubmed_caption(path) # return list of dictionary\n```\n\n#### Parse Pubmed OA Paragraph\n\nFor someone who might be interested in parsing the text surrounding\na citation, the library also provides that functionality.\nYou can use `parse_pubmed_paragraph` to parse text and reference PMIDs.\nThis function will return a list of dictionaries, where each entry will have\nfollowing keys:\n\n- `pmid`: Pubmed ID\n- `pmc`: Pubmed Central ID\n- `text`: full text of the paragraph\n- `reference_ids`: list of reference code within that paragraph.\nThis IDs can merge with output from `parse_pubmed_references`.\n- `section`: section of paragraph (e.g. Background, Discussion, Appendix, etc.)\n\n```python\ndicts_out = pp.parse_pubmed_paragraph('data/6605965a.nxml', all_paragraph=False)\n```\n\n#### Parse Pubmed OA Table [WIP]\n\nYou can use `parse_pubmed_table` to parse table from XML file. This function\nwill return list of dictionaries where each has following keys.\n\n- `pmid`: Pubmed ID\n- `pmc`: Pubmed Central ID\n- `caption`: caption of the table\n- `label`: lable of the table\n- `table_columns`: list of column name\n- `table_values`: list of values inside the table\n- `table_xml`: raw xml text of the table (return if `return_xml=True`)\n\n```python\ndicts_out = pp.parse_pubmed_table('data/medline16n0902.xml.gz', return_xml=False)\n```\n\n#### Parse Medline NML XML\n\nMedline NML XML has a different XML format than PubMed Open Access.\nYou can use the function `parse_medline_xml` to parse that format.\nThis function will return list of dictionaries, where each element contains:\n\n- `pmid`: Pubmed ID\n- `pmc`: Pubmed Central ID\n- `other_id`: Other IDs found, each separated by `;`\n- `title`: title of the article\n- `abstract`: abstract of the article\n- `affiliation`: corresponding author's affiliation. If multiple, each separated by `\\n` and will\ncorrespond to each authors\n- `authors`: authors, each separated by `;`\n- `mesh_terms`: list of MeSH terms with corresponding MeSH ID, each separated by `;` e.g. `'D000161:Acoustic Stimulation; D000328:Adult; ...`\n- `keywords`: list of keywords, each separated by `;`\n- `pubdate`: Publication date. Defaults to year information only.\n- `journal`: journal of the given paper\n- `medline_ta`: this is abbreviation of the journal name\n- `nlm_unique_id`: NLM unique identification\n- `issn_linking`: ISSN linkage, typically use to link with Web of Science dataset\n- `country`: Country extracted from journal information field\n- `delete`: boolean if `False` means paper got updated so you might have two\nXMLs for the same paper. You can delete the record of deleted paper\nbecause it got updated.\n\n```python\ndicts_out = pp.parse_medline_xml('data/medline16n0902.xml.gz', year_info_only=False, nlm_category=False) # return list of dictionary\n```\n\nTo extract month and day information from PubDate, set `year_info_only=True`.\nWe also allow parsing structured abstract and we can control display of each\nsection or label by changing `nlm_category` argument.\n\n\n#### Parse Medline Grant ID\n\nUse `parse_medline_grant_id` in order to parse MEDLINE grant IDs from XML file.\nThis will return a list of dictionaries, each containing\n\n- `pmid`: Pubmed ID\n- `grant_id`: Grant ID\n- `grant_acronym`: Acronym of grant\n- `country`: Country where grant funding from\n- `agency`: Grant agency\n\nIf no Grant ID is found, it will return `None`\n\n\n#### Parse Medline XML from eutils website\n\nYou can use PubMed parser to parse XML file from [E-Utilities](http://www.ncbi.nlm.nih.gov/books/NBK25501/)\nusing `parse_xml_web`. For this function, you can provide a single `pmid` as an input and\nget a dictionary with following keys\n\n- `title`: title\n- `abstract`: abstract\n- `journal`: journal\n- `affiliation`: affiliation of first author\n- `authors`: string of authors, separated by `;`\n- `year`: Publication year\n- `keywords`: keywords or MESH terms of the article\n\n```python\ndict_out = pp.parse_xml_web(pmid, save_xml=False)\n```\n\n#### Parse Medline XML citations from website\n\nThe function `parse_citation_web` allows you to get the citations to a given\nPubMed ID or PubMed Central ID. This will return a dictionary which contains the following keys\n\n- `pmc`: Pubmed Central ID\n- `pmid`: Pubmed ID\n- `doi`: DOI of the article\n- `n_citations`: number of citations for given articles\n- `pmc_cited`: list of PMCs that cite the given PMC\n\n```python\ndict_out = pp.parse_citation_web(doc_id, id_type='PMC')\n```\n\n#### Parse Outgoing XML citations from website\n\nThe function `parse_outgoing_citation_web` allows you to get the articles a given\narticle cites, given a PubMed ID or PubMed Central ID. This will return a dictionary\nwhich contains the following keys\n\n- `n_citations`: number of cited articles\n- `doc_id`: the document identifier given\n- `id_type`: the type of identifier given. Either 'PMID' or 'PMC'\n- `pmid_cited`: list of PMIDs cited by the article\n\n```python\ndict_out = pp.parse_outgoing_citation_web(doc_id, id_type='PMID')\n```\n\nIdentifiers should be passed as strings. PubMed Central ID's are default, and\nshould be passed as strings *without* the 'PMC' prefix. If no citations are\nfound, or if no article is found matching `doc_id` in the indicated database,\nit will return `None`.\n\n\n## Install package\n\nClone the repository and install using `pip`.\n\n```bash\n$ git clone https://github.com/titipata/pubmed_parser\n$ pip install ./pubmed_parser\n```\n\n## Example Usage for Pubmed OA\n\nAn example usage is shown as follows\n\n```python\nimport pubmed_parser as pp\npath_xml = pp.list_xml_path('data') # list all xml paths under directory\npubmed_dict = pp.parse_pubmed_xml(path_xml[0]) # dictionary output\nprint(pubmed_dict)\n\n{'abstract': u\"Background Despite identical genotypes and ...\",\n 'affiliation_list':\n  [['I1': 'Department of Biological Sciences, ...'],\n   ['I2': 'Biology Department, Queens College, and the Graduate Center ...']],\n  'author_list':\n  [['Dennehy', 'John J', 'I1'],\n   ['Dennehy', 'John J', 'I2'],\n   ['Wang', 'Ing-Nang', 'I1']],\n 'full_title': u'Factors influencing lysis time stochasticity in bacteriophage \\u03bb',\n 'journal': 'BMC Microbiology',\n 'pmc': '3166277',\n 'pmid': '21810267',\n 'publication_year': '2011',\n 'publisher_id': '1471-2180-11-174',\n 'subjects': 'Research Article'}\n```\n\n\n## Example Usage with PySpark\n\nThis is snippet to parse all Pubmed Open Access subset using\nPySpark 2.1\n\n```python\nimport os\nimport pubmed_parser as pp\nfrom pyspark.sql import Row\n\npath_all = pp.list_xml_path('/path/to/xml/folder/')\npath_rdd = spark.sparkContext.parallelize(path_all, numSlices=10000)\nparse_results_rdd = path_rdd.map(lambda x: Row(file_name=os.path.basename(x),\n                                               **pp.parse_pubmed_xml(x)))\npubmed_oa_df = parse_results_rdd.toDF() # Spark dataframe\npubmed_oa_df_sel = pubmed_oa_df[['full_title', 'abstract', 'doi',\n                                 'file_name', 'pmc', 'pmid',\n                                 'publication_year', 'publisher_id',\n                                 'journal', 'subjects']] # select columns\npubmed_oa_df_sel.write.parquet('pubmed_oa.parquet', mode='overwrite') # write dataframe\n```\n\nSee [scripts](https://github.com/titipata/pubmed_parser/tree/master/scripts)\nfolder for more information.\n\n\n## Members\n\n- [Titipat Achakulvisut](http://titipata.github.io), Northwestern University\n- [Daniel E. Acuna](http://scienceofscience.org/about), Rehabilitation Institute of Chicago and Northwestern University\n\nand [contributors](https://github.com/titipata/pubmed_parser/graphs/contributors)\n\n\n## Dependencies\n\n- [lxml](http://lxml.de/)\n- [unidecode](https://pypi.python.org/pypi/Unidecode)\n- [requests](http://docs.python-requests.org/en/master/)\n\n## Citation\n\nIf you use this package, please cite it like this\n\n> Titipat Achakulvisut, Daniel E. Acuna (2015) \"_Pubmed Parser_\" [http://github.com/titipata/pubmed_parser](http://github.com/titipata/pubmed_parser).\nhttp://doi.org/10.5281/zenodo.159504\n\n\n## Acknowledgement\n\nPackage is developed in [Konrad Kording's Lab](http://kordinglab.com/) at Northwestern University\n\n\n## License\n\nMIT License Copyright (c) 2015, 2016 Titipat Achakulvisut, Daniel E. Acuna\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6B32:35999:17B9A6:5E63F7:6AB92EC3"},"text_sha256":"29e107c41c89ff19ecd09ceaacdcf0fc3abb506374edf298cb5f722455b5749d"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1350","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087C:72727:17D45AF:1BFF61C:6AB92EC6"},"commit":{"sha":"b493fb9abd8e43ff031b884a89a900ebf5d06e86","url":"https://github.com/titipata/pubmed_parser/commit/b493fb9abd8e43ff031b884a89a900ebf5d06e86","date":"2025-07-31T15:29:15Z","author_date":"2025-07-31T15:29:15Z","committer_date":"2025-07-31T15:29:15Z","tree_sha":"fab9e04230ba0baed8aa90d0ea0f182675c144ba","message_first_line":"Handle missing dates in PMC records (close #169)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1349","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AB:6E429:180C1CD:1C37256:6AB92EC7"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":15300,"blob_sha":"96a2a7b9c4636e7d8c43a3d4d5f68bd296b52583","priority":0}],"documents":[{"path":"README.md","size":15300,"blob_sha":"96a2a7b9c4636e7d8c43a3d4d5f68bd296b52583","priority":0,"status":200,"text":"# Pubmed Parser: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset\n\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/titipata/pubmed_parser/blob/master/LICENSE) [![DOI](https://joss.theoj.org/papers/10.21105/joss.01979/status.svg)](https://doi.org/10.21105/joss.01979)\n [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3660006.svg)](https://doi.org/10.5281/zenodo.3660006) [![Build Status](https://travis-ci.com/titipata/pubmed_parser.svg?branch=master)](https://travis-ci.com/titipata/pubmed_parser)\n\nPubmed Parser is a Python library for parsing the [PubMed Open-Access (OA) subset](http://www.ncbi.nlm.nih.gov/pmc/tools/ftp/)\n , [MEDLINE XML](https://www.nlm.nih.gov/bsd/licensee/) repositories, and [Entrez Programming Utilities (E-utils)](https://eutils.ncbi.nlm.nih.gov/). It uses the `lxml` library to parse this information into a Python dictionary which can be easily used for research, such as in text mining and natural language processing pipelines.\n\nFor available APIs and details about the dataset, please see our [wiki page](https://github.com/titipata/pubmed_parser/wiki) or\n [documentation page](http://titipata.github.io/pubmed_parser/) for more details. Below, we list some of the core funtionalities and code examples.\n\n## Available Parsers\n\n* `path` provided to a function can be the path to a compressed or uncompressed XML file. We provide example files in the [ `data` ](data/) folder.\n* for website parsing, you should scrape with pause. Please see the [copyright notice](https://www.ncbi.nlm.nih.gov/pmc/about/copyright/#copy-PMC) because your IP can get blocked if you try to download in bulk.\n\nBelow, we list available parsers from `pubmed_parser`.\n\n  * [Parse PubMed OA XML information](#parse-pubmed-oa-xml-information)\n  * [Parse PubMed OA citation references](#parse-pubmed-oa-citation-references)\n  * [Parse PubMed OA images and captions](#parse-pubmed-oa-images-and-captions)\n  * [Parse PubMed OA Paragraph](#parse-pubmed-oa-paragraph)\n  * [Parse PubMed OA Table [WIP]](#parse-pubmed-oa-table-wip)\n  * [Parse MEDLINE XML](#parse-medline-xml)\n  * [Parse MEDLINE Grant ID](#parse-medline-grant-id)\n  * [Parse MEDLINE XML from eutils website](#parse-medline-xml-from-eutils-website)\n  * [Parse MEDLINE XML citations from website](#parse-medline-xml-citations-from-website)\n  * [Parse Outgoing XML citations from website](#parse-outgoing-xml-citations-from-website)\n\n### Parse PubMed OA XML information\n\nWe created a simple parser for the PubMed Open Access Subset where you can give an XML path or string to the function called `parse_pubmed_xml` which will return a dictionary with the following information:\n\n* `full_title` : article's title\n* `abstract` : abstract\n* `journal` : Journal name\n* `pmid` : PubMed ID\n* `pmc` : PubMed Central ID\n* `doi` : DOI of the article\n* `publisher_id` : publisher ID\n* `author_list` : list of authors with affiliation keys in the following format\n\n``` python\n [['last_name_1', 'first_name_1', 'aff_key_1'],\n  ['last_name_1', 'first_name_1', 'aff_key_2'],\n  ['last_name_2', 'first_name_2', 'aff_key_1'], ...]\n ```\n\n* `affiliation_list` : list of affiliation keys and affiliation strings in the following format\n\n``` python\n [['aff_key_1', 'affiliation_1'],\n  ['aff_key_2', 'affiliation_2'], ...]\n```\n\n* `publication_year` : publication year\n* `subjects` : list of subjects listed in the article separated by semicolon. Sometimes, it only contains the type of the article, such as a research article, review proceedings, etc.\n\n``` python\nimport pubmed_parser as pp\ndict_out = pp.parse_pubmed_xml(path)\n```\n\n### Parse PubMed OA citation references\n\nThe function `parse_pubmed_references` will process a Pubmed Open Access XML file and return a list of the PMIDs it cites. Each dictionary has keys as follows\n\n* `pmid` : PubMed ID of the article\n* `pmc` : PubMed Central ID of the article\n* `article_title` : title of cited article\n* `journal` : journal name\n* `journal_type` : type of journal\n* `pmid_cited` : PubMed ID of article that article cites\n* `doi_cited` : DOI of article that article cites\n* `year` : Publication year as it appears in the reference (may include letter suffix, e.g.2007a)\n\n``` python\ndicts_out = pp.parse_pubmed_references(path) # return list of dictionary\n```\n\n### Parse PubMed OA images and captions\n\nThe function `parse_pubmed_caption` can parse image captions from a given path to XML file. It will return reference index that you can refer back to actual images. The function will return list of dictionary which has following keys\n\n* `pmid` : PubMed ID\n* `pmc` : PubMed Central ID\n* `fig_caption` : string of caption\n* `fig_id` : reference id for figure (use to refer in XML article)\n* `fig_label` : label of the figure\n* `graphic_ref` : reference to image file name provided from Pubmed OA\n\n``` python\ndicts_out = pp.parse_pubmed_caption(path) # return list of dictionary\n```\n\n### Parse PubMed OA Paragraph\n\nFor someone who might be interested in parsing the text surrounding a citation, the library also provides that functionality. You can use `parse_pubmed_paragraph` to parse text and reference PMIDs. This function will return a list of dictionaries, where each entry will have following keys:\n\n* `pmid` : PubMed ID\n* `pmc` : PubMed Central ID\n* `text` : full text of the paragraph\n* `reference_ids` : list of reference code within that paragraph.\n\nThis IDs can merge with output from `parse_pubmed_references` .\n\n* `section` : section of paragraph (e.g. Background, Discussion, Appendix, etc.)\n\n``` python\ndicts_out = pp.parse_pubmed_paragraph('data/6605965a.nxml', all_paragraph=False)\n```\n\n### Parse PubMed OA Table [WIP]\n\nYou can use `parse_pubmed_table` to parse table from XML file. This function will return list of dictionaries where each has following keys.\n\n* `pmid` : PubMed ID\n* `pmc` : PubMed Central ID\n* `caption` : caption of the table\n* `label` : lable of the table\n* `table_columns` : list of column name\n* `table_values` : list of values inside the table\n* `table_xml` : raw xml text of the table (return if `return_xml=True`)\n\n``` python\ndicts_out = pp.parse_pubmed_table('data/medline16n0902.xml.gz', return_xml=False)\n```\n\n### Parse MEDLINE XML\n\nMEDLINE XML has a different XML format than PubMed Open Access. The structure of XML files can be found in MEDLINE/PubMed DTD [here](https://www.nlm.nih.gov/databases/dtd/). You can use the function `parse_medline_xml` to parse that format. This function will return list of dictionaries, where each element contains:\n\n* `pmid` : PubMed ID\n* `pmc` : PubMed Central ID\n* `doi` : DOI\n* `other_id` : Other IDs found, each separated by `;`\n* `title` : title of the article\n* `abstract` : abstract of the article\n* `authors` : authors, each separated by `;`\n* `mesh_terms` : list of MeSH terms with corresponding MeSH ID, each separated by `;` e.g. `'D000161:Acoustic Stimulation; D000328:Adult; ...`\n* `publication_types` : list of publication type list each separated by `;` e.g. `'D016428:Journal Article'`\n* `keywords` : list of keywords, each separated by `;`\n* `chemical_list` : list of chemical terms, each separated by `;`\n* `pubdate` : Publication date. Defaults to year information only.\n* `journal` : journal of the given paper\n* `medline_ta` : this is abbreviation of the journal name\n* `nlm_unique_id` : NLM unique identification\n* `issn_linking` : ISSN linkage, typically use to link with Web of Science dataset\n* `country` : Country extracted from journal information field\n* `reference` : string of PMID each separated by `;` or list of references made to the article\n* `delete` : boolean if `False` means paper got updated so you might have two\n* `languages` : list of languages, separated by `;`\n* `vernacular_title`: vernacular title. Defaults to empty string whenever non-available.\n\nXMLs for the same paper. You can delete the record of deleted paper because it got updated.\n\n``` python\ndicts_out = pp.parse_medline_xml('data/medline16n0902.xml.gz',\n                                 year_info_only=False,\n                                 nlm_category=False,\n                                 author_list=False,\n                                 reference_list=False) # return list of dictionary\n```\n\nTo extract month and day information from PubDate, set `year_info_only=True`. We also allow parsing structured abstract and we can control display of each section or label by changing `nlm_category` argument.\n\n### Parse MEDLINE Grant ID\n\nUse `parse_grant_id` in order to parse MEDLINE grant IDs from XML file. This will return a list of dictionaries, each containing\n\n* `pmid` : PubMed ID\n* `grant_id` : Grant ID\n* `grant_acronym` : Acronym of grant\n* `country` : Country where grant funding from\n* `agency` : Grant agency\n\nIf no Grant ID is found, it will return `None`\n\n### Parse MEDLINE XML from eutils website\n\nYou can use PubMed parser to parse XML file from [E-Utilities](http://www.ncbi.nlm.nih.gov/books/NBK25501/) using `parse_xml_web` . For this function, you can provide a single `pmid` as an input and get a dictionary with following keys\n\n* `title` : title\n* `abstract` : abstract\n* `journal` : journal\n* `affiliation` : affiliation of first author\n* `authors` : string of authors, separated by `;`\n* `year` : Publication year\n* `keywords` : keywords or MESH terms of the article\n\n``` python\ndict_out = pp.parse_xml_web(pmid, save_xml=False)\n```\n\n### Parse MEDLINE XML citations from website\n\nThe function `parse_citation_web` allows you to get the citations to a given PubMed ID or PubMed Central ID. This will return a dictionary which contains the following keys\n\n* `pmc` : PubMed Central ID\n* `pmid` : PubMed ID\n* `doi` : DOI of the article\n* `n_citations` : number of citations for given articles\n* `pmc_cited` : list of PMCs that cite the given PMC\n\n``` python\ndict_out = pp.parse_citation_web(doc_id, id_type='PMC')\n```\n\n### Parse Outgoing XML citations from website\n\nThe function `parse_outgoing_citation_web` allows you to get the articles a given article cites, given a PubMed ID or PubMed Central ID. This will return a dictionary which contains the following keys\n\n* `n_citations` : number of cited articles\n* `doc_id` : the document identifier given\n* `id_type` : the type of identifier given. Either `'PMID'` or `'PMC'`\n* `pmid_cited` : list of PMIDs cited by the article\n\n``` python\ndict_out = pp.parse_outgoing_citation_web(doc_id, id_type='PMID')\n```\n\nIdentifiers should be passed as strings. PubMed Central ID's are default, and should be passed as strings *without* the `'PMC'` prefix. If no citations are found, or if no article is found matching `doc_id` in the indicated database, it will return `None`.\n\n## Installation\n\nYou can install the most update version of the package directly from the repository\n\n``` bash\npip install git+https://github.com/titipata/pubmed_parser.git\n```\n\nor install recent release with [PyPI](https://pypi.org/project/pubmed-parser/) using\n\n``` bash\npip install pubmed-parser\n```\n\nor clone the repository and install using `pip`\n\n``` bash\ngit clone https://github.com/titipata/pubmed_parser\npip install ./pubmed_parser\n```\n\nYou can test your installation by running `pytest --cov=pubmed_parser tests/ --verbose`\nin the root of the repository.\n\n## Example snippet to parse PubMed OA dataset\n\nAn example usage is shown as follows\n\n``` python\nimport pubmed_parser as pp\npath_xml = pp.list_xml_path('data') # list all xml paths under directory\npubmed_dict = pp.parse_pubmed_xml(path_xml[0]) # dictionary output\nprint(pubmed_dict)\n\n{'abstract': u\"Background Despite identical genotypes and ...\",\n 'affiliation_list':\n  [['I1': 'Department of Biological Sciences, ...'],\n   ['I2': 'Biology Department, Queens College, and the Graduate Center ...']],\n  'author_list':\n  [['Dennehy', 'John J', 'I1'],\n   ['Dennehy', 'John J', 'I2'],\n   ['Wang', 'Ing-Nang', 'I1']],\n 'full_title': u'Factors influencing lysis time stochasticity in bacteriophage \\u03bb',\n 'journal': 'BMC Microbiology',\n 'pmc': '3166277',\n 'pmid': '21810267',\n 'publication_year': '2011',\n 'publisher_id': '1471-2180-11-174',\n 'subjects': 'Research Article'}\n```\n\n## Example Usage with PySpark\n\nThis is a snippet to parse all PubMed Open Access subset using [PySpark 2.1](https://spark.apache.org/docs/latest/api/python/index.html)\n\n``` python\nimport os\nimport pubmed_parser as pp\nfrom pyspark.sql import Row\n\npath_all = pp.list_xml_path('/path/to/xml/folder/')\npath_rdd = spark.sparkContext.parallelize(path_all, numSlices=10000)\nparse_results_rdd = path_rdd.map(lambda x: Row(file_name=os.path.basename(x),\n                                               **pp.parse_pubmed_xml(x)))\npubmed_oa_df = parse_results_rdd.toDF() # Spark dataframe\npubmed_oa_df_sel = pubmed_oa_df[['full_title', 'abstract', 'doi',\n                                 'file_name', 'pmc', 'pmid',\n                                 'publication_year', 'publisher_id',\n                                 'journal', 'subjects']] # select columns\npubmed_oa_df_sel.write.parquet('pubmed_oa.parquet', mode='overwrite') # write dataframe\n```\n\nSee [scripts](https://github.com/titipata/pubmed_parser/tree/master/scripts)\nfolder for more information.\n\n## Core Members\n\n* [Titipat Achakulvisut](http://titipata.github.io)\n* [Daniel E. Acuna](http://scienceofscience.org/about)\n\nand [contributors](https://github.com/titipata/pubmed_parser/graphs/contributors)\n\n## Dependencies\n\n* [lxml](http://lxml.de/)\n* [unidecode](https://pypi.python.org/pypi/Unidecode)\n* [requests](http://docs.python-requests.org/en/master/)\n\n## Citation\n\nIf you use Pubmed Parser, please cite it from [JOSS](https://joss.theoj.org/papers/10.21105/joss.01979) as follows\n\n> Achakulvisut et al., (2020). Pubmed Parser: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset XML Dataset. Journal of Open Source Software, 5(46), 1979, https://doi.org/10.21105/joss.01979\n\nor using BibTex\n\n```\n@article{Achakulvisut2020,\n  doi = {10.21105/joss.01979},\n  url = {https://doi.org/10.21105/joss.01979},\n  year = {2020},\n  publisher = {The Open Journal},\n  volume = {5},\n  number = {46},\n  pages = {1979},\n  author = {Titipat Achakulvisut and Daniel Acuna and Konrad Kording},\n  title = {Pubmed Parser: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset XML Dataset},\n  journal = {Journal of Open Source Software}\n}\n```\n\n## Contributions\n\nWe welcome contributions from anyone who would like to improve Pubmed Parser. You can create [GitHub issues](https://github.com/titipata/pubmed_parser/issues) to discuss questions or issues relating to the repository. We suggest you to read our [Contributing Guidelines](https://github.com/titipata/pubmed_parser/blob/master/CONTRIBUTING.md) before creating issues, reporting bugs, or making a contribution to the repository.\n\n## Acknowledgement\n\nThis package is developed in [Konrad Kording's Lab](http://kordinglab.com/) at the University of Pennsylvania. We would like to thank reviewers and the editor from [JOSS](https://joss.readthedocs.io/en/latest/) including [`tleonardi`](https://github.com/tleonardi), [`timClicks`](https://github.com/timClicks), and [`majensen`](https://github.com/majensen). They made our repository much better!\n\n## License\n\nMIT License Copyright (c) 2015-2020 Titipat Achakulvisut, Daniel E. Acuna\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F7E:386840:187EA1:5F286F:6AB92EC7"},"text_sha256":"64b4e5e411cb2971badf4f274ee7dcde2c7fa782078950192e5af7c4c1256d0a"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"akoumjian/datefinder","input_row":{"repository":"akoumjian/datefinder","url":"https://github.com/akoumjian/datefinder","name":"datefinder","owner":"akoumjian","description":"Find dates inside text using Python and get back datetime objects","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":664,"issues":160,"created_at":"2016-01-02T22:23:12Z","updated_at":"2026-09-27T12:12:30Z","first_commit_at":"2016-01-02T22:20:40Z","last_commit_at":"2026-03-25T21:30:03Z","activity_months":122.7,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:12.162Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"akoumjian/datefinder","visibility":"public","created_at":"2016-01-02T22:23:12Z","updated_at":"2026-09-27T12:12:30Z","private":false,"fork":false,"archived":false,"stargazers_count":664,"open_issues_count":6,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1348","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0795:156040:17F9072:1C237FE:6AB92EC8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1347","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0785:DC698:181F175:1C49B1A:6AB92EC8"},"commit":{"sha":"e648129e4aaa08c598676372f1f10d6e33f1b436","url":"https://github.com/akoumjian/datefinder/commit/e648129e4aaa08c598676372f1f10d6e33f1b436","date":"2017-02-17T15:50:14Z","author_date":"2017-02-17T15:50:14Z","committer_date":"2017-02-17T15:50:14Z","tree_sha":"e770680ab0e3cee6e528272ba5ca0639b85aed31","message_first_line":"Merge pull request #38 from rawouter/master"},"tree_request_status":200,"tree_rate":{"github_remaining":"1346","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CA:74C18:1832131:1C5D63E:6AB92EC8"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":1770,"blob_sha":"711968606f05c6b1f0880eab1d4493a2b76cadf2","priority":0}],"documents":[{"path":"README.rst","size":1770,"blob_sha":"711968606f05c6b1f0880eab1d4493a2b76cadf2","priority":0,"status":200,"text":"datefinder - extract dates from text\n====================================\n\n.. image:: https://img.shields.io/travis/akoumjian/datefinder/master.svg\n    :target: https://travis-ci.org/akoumjian/datefinder\n    :alt: travis build status\n\n.. image:: https://img.shields.io/pypi/dm/datefinder.svg\n    :target: https://pypi.python.org/pypi/datefinder/\n    :alt: pypi downloads per day\n\n.. image:: https://img.shields.io/pypi/v/datefinder.svg\n    :target: https://pypi.python.org/pypi/datefinder\n    :alt: pypi version\n\n.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg\n    :target: https://gitter.im/datefinder/Lobby\n    :alt: gitter chat\n\n\nA python module for locating dates inside text. Use this package to extract all sorts \nof date like strings from a document and turn them into datetime objects.\n\nThis module finds the likely datetime strings and then uses the  \n`dateparser <https://github.com/scrapinghub/dateparser>`_ package to convert \nto the datetime object.\n\n\nInstallation\n------------\n\n.. code-block:: sh\n\n    pip install datefinder\n\n\nHow to Use\n----------\n\n\n.. automodule:: datefinder\n   :members: find_dates\n\n\n.. code-block:: python\n\n    In [1]: string_with_dates = \"\"\"\n       ...: ...\n       ...: entries are due by January 4th, 2017 at 8:00pm\n       ...: ...\n       ...: created 01/15/2005 by ACME Inc. and associates.\n       ...: ...\n       ...: \"\"\"\n\n    In [2]: import datefinder\n\n    In [3]: matches = datefinder.find_dates(string_with_dates)\n\n    In [4]: for match in matches:\n       ...:     print match\n       ...:\n    2017-01-04 20:00:00\n    2005-01-15 00:00:00\n\n\nSupport\n-------\n\nYou can talk to us on `Gitter <https://gitter.im/datefinder/Lobby>`_ or just submit an issue on `github <https://github.com/akoumjian/datefinder/issues/>`_. \n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C190:09ED:E7BB1:3FDEF5:6AB92EC9"},"text_sha256":"39fa60043652ca1acfa44f80fd84659662b248ebc0596009d534572e506f74ff"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1345","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BE:6E429:180C3F4:1C374FB:6AB92EC9"},"commit":{"sha":"e4777a04fce8677aa816f6fc016f2848fe8ccaf5","url":"https://github.com/akoumjian/datefinder/commit/e4777a04fce8677aa816f6fc016f2848fe8ccaf5","date":"2026-03-25T21:30:03Z","author_date":"2026-03-25T21:30:03Z","committer_date":"2026-03-25T21:30:03Z","tree_sha":"6ad688db9d21e79686565ce4a5c3df451292d716","message_first_line":"Fix sdist smoke install mode for 1.0.0 build workflows"},"tree_request_status":200,"tree_rate":{"github_remaining":"1344","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0886:228A99:1811403:1C3C6A3:6AB92EC9"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":10327,"blob_sha":"b1b3fd5ab5ab73db28d576fa59e8adc7d88b6208","priority":0}],"documents":[{"path":"README.rst","size":10327,"blob_sha":"b1b3fd5ab5ab73db28d576fa59e8adc7d88b6208","priority":0,"status":200,"text":"datefinder - extract dates from text\n====================================\n\n.. image:: https://github.com/akoumjian/datefinder/actions/workflows/python-package.yml/badge.svg\n    :target: https://github.com/akoumjian/datefinder\n    :alt: Build Status\n\n.. image:: https://img.shields.io/pypi/dm/datefinder.svg\n    :target: https://pypi.python.org/pypi/datefinder/\n    :alt: pypi downloads per day\n\n.. image:: https://img.shields.io/pypi/v/datefinder.svg\n    :target: https://pypi.python.org/pypi/datefinder\n    :alt: pypi version\n\n\nA python module for locating dates inside text. Use this package to extract date-like\nstrings from documents and turn them into useful datetime/temporal objects.\n\nAs of ``1.0.0``, ``find_dates(...)`` defaults to the v2 compatibility engine.\nThe original engine remains available as ``find_dates_legacy(...)``.\n\n\nInstallation\n------------\n\nRequires Python 3.9+.\n\n**With pip**\n\n.. code-block:: sh\n\n    pip install datefinder\n\nIf a compatible prebuilt wheel is unavailable for your platform, pip will build\nfrom source and requires a Rust toolchain.\n\n**Note:  I do not publish the version on conda forge and cannot verify its integrity.**\n\nWhat You Can Do With datefinder\n-------------------------------\n\n``datefinder`` is a Python date parser for extracting dates from unstructured text.\nIt is useful when your data is not already normalized, for example:\n\n- emails, tickets, and support conversations\n- contracts, policies, and legal text\n- logs, reports, and markdown/wiki pages\n- scraped HTML and mixed-format documents\n\nYou can use it to:\n\n- parse explicit calendar dates like ``January 4th, 2017`` or ``2024-11-03 18:00``\n- parse relative expressions like ``tomorrow``, ``yesterday``, and ``in 3 days``\n- parse multiple date formats in one pass (month-name, slash, ISO, hyphen)\n- anchor relative parsing to a reference/base date\n- return either compatibility datetimes or typed structured match objects\n\nIn short: if you need to find and parse dates from text in Python, especially\ninside large documents with mixed formatting, ``datefinder`` is designed for that.\n\nCommon workflows:\n\n- migration from legacy date extraction code:\n  use ``find_dates_legacy(...)`` for parity, then move to ``find_dates(...)``\n- modern typed extraction:\n  use ``extract(...)`` to get match kinds, spans, confidence, and structured values\n- command line processing:\n  use ``datefinder --engine extract --json`` in shell pipelines\n\nExample (Python):\n\n.. code-block:: python\n\n    import datefinder\n    from datetime import datetime, timezone\n\n    text = \"Meeting tomorrow; launch on 2024-11-03 18:00 UTC.\"\n    ref = datetime(2026, 3, 19, 12, 0, tzinfo=timezone.utc)\n\n    # Compatibility datetimes\n    print(list(datefinder.find_dates(text, base_date=ref)))\n\n    # Typed extraction\n    for match in datefinder.extract(text, reference_dt=ref):\n        print(match.kind, match.text, match.value)\n\nExample (CLI):\n\n.. code-block:: sh\n\n    datefinder --reference \"2026-03-19T12:00:00+00:00\" --json \\\n      \"Meeting tomorrow; launch on 2024-11-03 18:00 UTC.\"\n\nHow to Use\n----------\n\n\n.. code-block:: python\n\n    In [1]: string_with_dates = \"\"\"\n       ...: ...\n       ...: entries are due by January 4th, 2017 at 8:00pm\n       ...: ...\n       ...: created 01/15/2005 by ACME Inc. and associates.\n       ...: ...\n       ...: \"\"\"\n\n    In [2]: import datefinder\n\n    In [3]: matches = datefinder.find_dates(string_with_dates)\n\n    In [4]: for match in matches:\n       ...:     print(match)\n       ...:\n    2017-01-04 20:00:00\n    2005-01-15 00:00:00\n\nCLI\n---\n\nThe package now includes a CLI entrypoint:\n\n.. code-block:: sh\n\n    datefinder --json \"tomorrow and 2024-12-10\"\n\nYou can also run it as a module:\n\n.. code-block:: sh\n\n    python -m datefinder --engine extract --json --reference \"2026-03-18T00:00:00+00:00\" \"in 3 days\"\n\nEngine options:\n\n- ``default``: ``find_dates(...)`` (v2 compatibility default)\n- ``legacy``: ``find_dates_legacy(...)``\n- ``compat``: ``find_dates_compat(...)``\n- ``extract``: typed ``extract(...)`` output\n\nCommon options:\n\n- ``--reference <ISO8601>``: anchor for relative dates/times (equivalent to ``base_date``/``reference_dt``)\n- ``--first {month,day,year}``: disambiguation for numeric dates\n- ``--strict``: stricter matching\n- ``--json`` / ``--pretty``: machine-readable output\n- ``--source`` / ``--index``: include source span details (``default``/``legacy`` only)\n- ``--locale <code>``: locale hint for ``extract`` (repeatable)\n- ``--no-month-only``: disable month-only inference (``\"May\" -> YYYY-05-01``)\n- ``--compact-numeric``: enable compact numeric parsing (e.g. ``20240315``)\n- ``--no-multiline``: disable cross-line matching\n\nExamples:\n\n.. code-block:: sh\n\n    # default engine (v2 compatibility), anchored relative parsing\n    datefinder --reference \"2026-03-19T12:00:00+00:00\" --json \"tomorrow and 2024-12-10\"\n\n    # explicit legacy behavior, include source text and indices\n    datefinder --engine legacy --source --index --json \"created 01/15/2005 by ACME\"\n\n    # typed extract output with locale hints\n    datefinder --engine extract --locale en --locale fr --pretty --json \"in 3 days and demain\"\n\n    # read long input from stdin\n    cat document.txt | datefinder --engine extract --json\n\nRelative and duration values:\n\n- ``default`` / ``legacy`` / ``compat`` engines emit datetimes.\n- ``extract`` emits typed values:\n  - ``relative`` includes both ``resolved_datetime`` and ``delta_seconds``.\n  - ``duration`` includes ``total_seconds`` and normalized components.\n\n\nV2 Typed API\n------------\n\nThis repository includes a v2 extraction API with typed match objects and\nfirst-class support for relative expressions and durations.\n\n.. code-block:: python\n\n    import datefinder\n    from datetime import datetime, timezone\n\n    matches = datefinder.extract(\n        \"in 3 days we deploy on 2024-11-03 18:00\",\n        reference_dt=datetime.now(timezone.utc),\n    )\n    for m in matches:\n        print(m.kind, m.text, m.value)\n\nThere is also a compatibility helper for migrating existing code:\n\n.. code-block:: python\n\n    for dt in datefinder.find_dates_compat(\"tomorrow and 2024-12-10\"):\n        print(dt)\n\nIf you need the original parser behavior exactly:\n\n.. code-block:: python\n\n    for dt in datefinder.find_dates_legacy(\"April 9, 2013 at 6:11 a.m.\"):\n        print(dt)\n\nRust kernel source is under ``rust/datefinder-kernel`` and is required for v2/default\nruntime behavior.\n\nRust Portability\n----------------\n\n- Compiled Rust extensions are platform-specific, they do not run on every system by default.\n- Release wheel targets:\n  - Linux glibc: ``x86_64`` and ``aarch64`` (manylinux2014)\n  - Linux musl: ``x86_64`` and ``aarch64`` (musllinux_1_2)\n  - macOS: ``x86_64`` and ``arm64``\n  - Windows: ``x86_64``\n- If no compatible wheel is available, ``pip`` builds from source and requires a Rust toolchain.\n\n\nConformance and Ambiguity Reports\n---------------------------------\n\nBuild a reproducible corpus from legacy tests and generate differential reports\nbetween legacy behavior and ``find_dates_compat``:\n\n.. code-block:: sh\n\n    python scripts/build_conformance_corpus.py\n    python scripts/diff_legacy_v2.py\n\nThis writes:\n\n- ``conformance/legacy_parity_cases.jsonl``\n- ``conformance/reports/legacy_v2_diff_report.md``\n- ``conformance/reports/ambiguity_showcase.md``\n- ``conformance/reports/behavior_change_changelog.md``\n\nThe ambiguity showcase also supports interpretation judgments in\n``conformance/interpretation_judgments.jsonl`` to assess whether legacy\nbehavior is semantically preferable for ambiguous real-world cases.\n\nSee also:\n\n- ``CONTRIBUTING.md`` for developer setup and validation commands.\n- ``RELEASE.md`` for release checklist.\n\n\nBenchmark Snapshot\n------------------\n\nThe command below generates a local benchmark snapshot comparing:\n\n- ``v2``: ``datefinder.extract(...)``\n- ``legacy``: ``datefinder.find_dates_legacy(...)``\n- ``dateparser``: ``dateparser.search.search_dates``\n- ``duckling_http``: Duckling ``POST /parse``\n\nRun:\n\n.. code-block:: sh\n\n    # optional: run duckling locally\n    docker run --rm -p 8000:8000 rasa/duckling:latest\n\n    python bench/bench_readme_compare.py \\\n      --iterations-small 12 \\\n      --iterations-large 2\n\nLatest local snapshot (2026-03-19 UTC):\n\n+------------------+--------+---------------+-------------------+----------------------+-------------------------+---------------+------------------+----------------------+\n| dataset          | size   | v2 median (s) | legacy median (s) | dateparser median (s)| duckling_http median (s)| v2 vs legacy  | v2 vs dateparser | v2 vs duckling_http  |\n+==================+========+===============+===================+======================+=========================+===============+==================+======================+\n| core_corpus      | 498    | 0.000236      | 0.003042          | 0.180596             | 0.050266                | 12.91x        | 766.74x          | 213.41x              |\n+------------------+--------+---------------+-------------------+----------------------+-------------------------+---------------+------------------+----------------------+\n| seattle_html_76k | 74838  | 0.037436      | 0.281466          | 0.771712             | 25.353595               | 7.52x         | 20.61x           | 677.24x              |\n+------------------+--------+---------------+-------------------+----------------------+-------------------------+---------------+------------------+----------------------+\n| test_data_560k   | 552301 | 0.239391      | 2.840845          | n/a                  | n/a                     | 11.87x        | n/a              | n/a                  |\n+------------------+--------+---------------+-------------------+----------------------+-------------------------+---------------+------------------+----------------------+\n\nNotes:\n\n- ``n/a`` means unavailable/failed for that dataset in this run.\n- ``dateparser``/``duckling_http`` are skipped by default for documents larger than 200k bytes unless forced.\n- Match counts differ across engines because behavior targets differ (e.g. relative/duration support and false-positive tolerance).\n- Results are hardware/environment dependent and should be treated as directional.\n\nRelease Notes\n-------------\n\n- ``docs/releases/1.0.0.md`` documents GA scope, behavior changes, and migration.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C908:3E724:18287E:5ED1DC:6AB92ECA"},"text_sha256":"2671e0cc40b06d0ab0c9f667ca6c424562929e9f32cc727198f5db6d19d780cd"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"hubtype/botonic","input_row":{"repository":"hubtype/botonic","url":"https://github.com/hubtype/botonic","name":"botonic","owner":"hubtype","description":"Build chatbots and conversational experiences using React","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":625,"issues":139,"created_at":"2018-03-25T21:19:51Z","updated_at":"2026-09-22T17:30:45Z","first_commit_at":"2018-03-25T21:20:30Z","last_commit_at":"2026-09-22T13:43:36Z","activity_months":101.93000000000001,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:14.758Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"hubtype/botonic","visibility":"public","created_at":"2018-03-25T21:19:51Z","updated_at":"2026-09-22T17:30:45Z","private":false,"fork":false,"archived":false,"stargazers_count":625,"open_issues_count":64,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1343","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079A:3203A7:17BDE14:1BE8E1D:6AB92ECA"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1342","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A1:380E1C:17FA085:1C2441F:6AB92ECB"},"commit":{"sha":"084dc69c0d700eb8f34a3d563f50eb7164ffc204","url":"https://github.com/hubtype/botonic/commit/084dc69c0d700eb8f34a3d563f50eb7164ffc204","date":"2018-05-23T15:02:38Z","author_date":"2018-05-23T15:02:38Z","committer_date":"2018-05-23T15:02:38Z","tree_sha":"c79251ffd4f168e51ec8c2f4f3e0bb19d45efd30","message_first_line":"fix: error handler if bot does not build correctly"},"tree_request_status":200,"tree_rate":{"github_remaining":"1341","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078D:731F6:181A9B5:1C45DB9:6AB92ECB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3881,"blob_sha":"3a6547bab13676c73e40143689723268000cee88","priority":0}],"documents":[{"path":"README.md","size":3881,"blob_sha":"3a6547bab13676c73e40143689723268000cee88","priority":0,"status":200,"text":"botonic\n=======\n\nBuild chatbots using React\n\n[![Version](https://img.shields.io/npm/v/botonic.svg)](https://npmjs.org/package/botonic)\n[![CircleCI](https://circleci.com/gh/ericmarcos/botonic/tree/master.svg?style=shield)](https://circleci.com/gh/ericmarcos/botonic/tree/master)\n[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/ericmarcos/botonic?branch=master&svg=true)](https://ci.appveyor.com/project/ericmarcos/botonic/branch/master)\n[![Codecov](https://codecov.io/gh/ericmarcos/botonic/branch/master/graph/badge.svg)](https://codecov.io/gh/ericmarcos/botonic)\n[![Downloads/week](https://img.shields.io/npm/dw/botonic.svg)](https://npmjs.org/package/botonic)\n[![License](https://img.shields.io/npm/l/botonic.svg)](https://github.com/ericmarcos/botonic/blob/master/package.json)\n\n<!-- toc -->\n* [Usage](#usage)\n* [Commands](#commands)\n<!-- tocstop -->\n# Usage\n<!-- usage -->\n```sh-session\n$ npm install -g botonic\n$ botonic COMMAND\nrunning command...\n$ botonic (-v|--version|version)\nbotonic/0.2.0 darwin-x64 node-v10.1.0\n$ botonic --help [COMMAND]\nUSAGE\n  $ botonic COMMAND\n...\n```\n<!-- usagestop -->\n# Commands\n<!-- commands -->\n* [botonic deploy [BOT_NAME]](#botonic-deploy-bot-name)\n* [botonic help [COMMAND]](#botonic-help-command)\n* [botonic input INPUT](#botonic-input-input)\n* [botonic login](#botonic-login)\n* [botonic logout](#botonic-logout)\n* [botonic new NAME [TEMPLATENAME]](#botonic-new-name-templatename)\n* [botonic run [INPUT]](#botonic-run-input)\n\n## botonic deploy [BOT_NAME]\n\nDeploy Botonic project to botonic.io cloud\n\n```\nUSAGE\n  $ botonic deploy [BOT_NAME]\n\nEXAMPLE\n  $ botonic deploy\n  Building...\n  Creating bundle...\n  Uploading...\n  🚀 Bot deployed!\n```\n\n_See code: [src/commands/deploy.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/deploy.ts)_\n\n## botonic help [COMMAND]\n\ndisplay help for botonic\n\n```\nUSAGE\n  $ botonic help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v1.2.3/src/commands/help.ts)_\n\n## botonic input INPUT\n\nGet response from a single input\n\n```\nUSAGE\n  $ botonic input INPUT\n\nOPTIONS\n  -c, --context=context  Context of current session\n  -p, --path=path        Path to botonic project. Defaults to current dir.\n  -r, --route=route      Route of the current bot state.\n\nEXAMPLE\n  $ botonic input \"{\\\"type\\\": \\\"text\\\", \\\"data\\\": \\\"hi\\\"}\"\n  Hello!\n```\n\n_See code: [src/commands/input.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/input.ts)_\n\n## botonic login\n\nLog in to Botonic\n\n```\nUSAGE\n  $ botonic login\n\nOPTIONS\n  -p, --path=path  Path to botonic project. Defaults to current dir.\n```\n\n_See code: [src/commands/login.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/login.ts)_\n\n## botonic logout\n\nLog out of Botonic\n\n```\nUSAGE\n  $ botonic logout\n\nOPTIONS\n  -p, --path=path  Path to botonic project. Defaults to current dir.\n```\n\n_See code: [src/commands/logout.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/logout.ts)_\n\n## botonic new NAME [TEMPLATENAME]\n\nCreate a new Botonic project\n\n```\nUSAGE\n  $ botonic new NAME [TEMPLATENAME]\n\nARGUMENTS\n  NAME          name of the bot folder\n  TEMPLATENAME  OPTIONAL name of the bot template\n\nEXAMPLE\n  $ botonic new test_bot\n  Creating...\n  ✨ test_bot was successfully created!\n```\n\n_See code: [src/commands/new.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/new.ts)_\n\n## botonic run [INPUT]\n\nStart interactive session\n\n```\nUSAGE\n  $ botonic run [INPUT]\n\nOPTIONS\n  -p, --path=path  Path to botonic project. Defaults to current dir.\n\nEXAMPLE\n  $ botonic run\n  Your bot is ready, start talking:\n  [you] > Hi\n  [bot] > Bye!\n```\n\n_See code: [src/commands/run.ts](https://github.com/hubtype/botonic/blob/v0.2.0/src/commands/run.ts)_\n<!-- commandsstop -->\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77C8:35999:17B9C7:5E64DA:6AB92ECB"},"text_sha256":"3aa9fba742ec1e86db0d3370773e8f1654d8c5ed8e337d603ecd0af7d41781ba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1340","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0864:72BD3:182243B:1C4D59B:6AB92ECC"},"commit":{"sha":"3ed5a645e63f0e7e345283c3d4f10e644e7ad9e3","url":"https://github.com/hubtype/botonic/commit/3ed5a645e63f0e7e345283c3d4f10e644e7ad9e3","date":"2026-06-29T14:45:12Z","author_date":"2026-06-29T14:45:12Z","committer_date":"2026-06-29T14:45:12Z","tree_sha":"afce4ea9140470a122612411d6a6c14090203982","message_first_line":"update CHANGELOGs"},"tree_request_status":200,"tree_rate":{"github_remaining":"1339","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B8:74181:17AC0EB:1BD73E6:6AB92ECC"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4770,"blob_sha":"ee268640796a0cac205df94088278ab21f8a018e","priority":0}],"documents":[{"path":"README.md","size":4770,"blob_sha":"ee268640796a0cac205df94088278ab21f8a018e","priority":0,"status":200,"text":"# Botonic\n\n<p align=\"center\">\n<img src=\"https://botonic-doc-static.netlify.com/images/banner.png\"/>\n<\/p>\n<p align=\"center\" style=\"text-align: center;\"><a href=\"https://botonic.io\">Website<\/a> |  <a href=\"https://botonic.io/blog\">Blog<\/a>  |  <a href=\"https://botonic.io/docs/welcome\">Docs<\/a> |  <a href=\"https://botonic.io/examples\">Examples<\/a>  |  <a href=\"https://botonic.io/blog/2021/03/10/introducing-botonic-office-hours\">Friday Office Hours<\/a><\/p>\n<hr>\n\n# <center>Build Chatbots and Conversational Apps Using React<\/center>\n\n[![botonic](https://img.shields.io/badge/cli-botonic-brightgreen.svg)](https://botonic.io)\n[![Version](https://img.shields.io/npm/v/@botonic/cli.svg)](https://npmjs.org/package/@botonic/cli)\n[![Downloads/week](https://img.shields.io/npm/dw/@botonic/cli.svg)](https://npmjs.org/package/@botonic/cli)\n[![License](https://img.shields.io/npm/l/@botonic/cli.svg)](https://github.com/hubtype/botonic/blob/master/package.json)\n<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://twitter.com/intent/follow?screen_name=botonic_\"><img src=\"https://camo.githubusercontent.com/9e04e9647d574f9e2ad27f93d6eade8f5e9d6b9fed6c50ad6399742b7713ba1f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f626f746f6e69635f3f7374796c653d736f6369616c\" alt=\"Twitter Follow\" data-canonical-src=\"https://img.shields.io/twitter/follow/botonic_?style=social\" style=\"max-width:100%;\"><\/a>\n\n\n# 🐣 Introducing Botonic Open Source Framework\n\n[Botonic](https://botonic.io) is an open source full-stack framework to create chatbots and modern conversational apps made with ❤️ by [Hubtype](https://www.hubtype.com/).\n\nIt's built on top of:\n\n⚛️ [React](https://reactjs.org/) | \n⚡ [Serverless](https://www.serverless.com/) |\n💡 [Tensorflow.js](https://www.tensorflow.org/js)\n\nAnd it works on:\n\n💬 Messaging apps like **Whatsapp**, **Facebook Messenger**, **Telegram**, **Twitter DMs** |\n🌐 Your website |\n📱 Your mobile app\n\nWith Botonic you can focus on creating the best conversational experience for your users instead of dealing with different messaging APIs, AI/NLP complexity or managing and scaling infrastructure.\nIt also comes with a battery of plugins so you can easily integrate popular services into your project, for instance:\n\n- Analytics ([Google Analytics](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-google-analytics), [Dashbot](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-dashbot))\n- CMS ([Contentful](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-contentful), Sanity)\n- NLU ([Dialogflow](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-dialogflow), [Watson](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-watson), [Luis](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-luis), [Inbenta](https://github.com/hubtype/botonic/tree/master/packages/botonic-plugin-inbenta))\n\n_If you'd like to see more plugins/integrations, please submit an issue or a pull request_\n\n# 🚀 Quick Start\n\n### Prerequisites\n- Node (v10 or above) and NPM are required. \n- LTS version of [NodeJS Installer](https://nodejs.org/) is recommended.\n- You can verify the installation running `npm --version` and `node --version` on a terminal.\n\n### Step 1 - Install\n\n```\n$> npm install -g @botonic/cli\n```\n\n### Step 2 - Create a bot\n\n```\n$> botonic new myBot tutorial\n```\n\n### Step 3 - Run your bot\n\nRun your bot locally while developing:\n\n```\n$> cd myBot\n$> botonic serve\n```\n\n`botonic serve` is just an alias for `npm run start` which will start a local server at http://localhost:8080. While you develop, the server will auto reload every time you make changes to your code.\n\n### Step 4 - Deploy\n\n```\n$> botonic deploy\n```\n\nCheck out the [Getting Started Tutorial](https://botonic.io/docs/getting-started): a step-by-step guide to start building high quality conversational apps.\n\n# 🤝 Contributing\n\n- **⭐⭐ Give us a Star on GitHub ⭐⭐**\n- Submit an [issue](https://github.com/hubtype/botonic/issues) if you find a bug or want to request a feature.\n- Join our [Slack](https://slack.botonic.io/) community, let us know what you're building and give us feedback.\n- PRs are welcome! Just follow our [Code of Conduct](https://github.com/hubtype/botonic/blob/master/CODE_OF_CONDUCT.md) and [Contributing Guide](https://github.com/hubtype/botonic/blob/master/CONTRIBUTING.md)\n\n# 👏 Supporters\n\n[![Stargazers repo roster for @hubtype/botonic](https://reporoster.com/stars/hubtype/botonic)](https://github.com/hubtype/botonic/stargazers) \n\n[![Forkers repo roster for @hubtype/botonic](https://reporoster.com/forks/hubtype/botonic)](https://github.com/hubtype/botonic/network/members)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9E46:7A4F8:184E3F:5EF907:6AB92ECC"},"text_sha256":"e03e8bf2ccb268b87d4f86d716e1552df604386b140c0c8cfd10b38dc6b4d8ed"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"theopenconversationkit/tock","input_row":{"repository":"theopenconversationkit/tock","url":"https://github.com/theopenconversationkit/tock","name":"tock","owner":"theopenconversationkit","description":"Tock, the open source conversational AI toolkit.","language":"Kotlin","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":612,"issues":1330,"created_at":"2017-03-10T08:35:36Z","updated_at":"2026-09-25T09:46:00Z","first_commit_at":"2017-03-10T08:35:37Z","last_commit_at":"2026-09-25T09:45:05Z","activity_months":114.52,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:17.669Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"theopenconversationkit/tock","visibility":"public","created_at":"2017-03-10T08:35:36Z","updated_at":"2026-09-25T09:46:00Z","private":false,"fork":false,"archived":false,"stargazers_count":612,"open_issues_count":46,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1338","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"083E:77994:18131A8:1C3E392:6AB92ECD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1337","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0913:35D5A8:17FABCA:1C25F35:6AB92ECE"},"commit":{"sha":"540367ce6732479db1f3c015a4a458919187b2ef","url":"https://github.com/theopenconversationkit/tock/commit/540367ce6732479db1f3c015a4a458919187b2ef","date":"2018-05-24T12:12:54Z","author_date":"2018-05-24T12:12:46Z","committer_date":"2018-05-24T12:12:54Z","tree_sha":"878bf017fad571b038c559d632e13799de5f5e8d","message_first_line":"fixes #264 property tock.logback.fileAppender=true throws NPE"},"tree_request_status":200,"tree_rate":{"github_remaining":"1336","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080A:6C9BF:182AC3B:1C5600A:6AB92ECE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":689,"blob_sha":"c166637f7ab6dd637a6070dde085dcb395edbbb9","priority":0},{"path":"docs/dokka/tock/fr.vsct.tock.bot.connector.ga.model.response/-g-a-proposed-order/terms-of-service-url.html","size":1016,"blob_sha":"f4012a3d9b3591fc1a75dc1fd8715268e0e6ce3a","priority":1},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-obfuscator-service/index.html","size":1382,"blob_sha":"81edac30ea7283b2126d1a41e329e6bf9e83eabb","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-obfuscator-service/string-obfuscators.html","size":1251,"blob_sha":"d8dda7ba25cdfe7c3ad0ac621e3624a146a2d1d5","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-property-based-auth-provider/authenticate.html","size":1959,"blob_sha":"44ccb5039953fda4fb152286979e97f207f93635","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-property-based-auth-provider/index.html","size":2100,"blob_sha":"8621c7678162a83f4a7fa3fc67670191a2f80028","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/-init-.html","size":2350,"blob_sha":"2ae88283763a5bf57f3ea21990b36278172e7da0","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/displayed.html","size":1081,"blob_sha":"98ef4b77db64b096d03a10675f9ff8f14ff53979","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/index.html","size":5758,"blob_sha":"29c2233cdc9d09312cb540210d2055f9221f1042","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/regex.html","size":974,"blob_sha":"5bb01e151629c68b54360b2f510deed59acda652","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/replacement-regexp.html","size":1177,"blob_sha":"8eb2aedfa828e87c518c0692c46cd410b24f3c48","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/replacement.html","size":1077,"blob_sha":"85487a884197f9be02300f5c471028814f236ccb","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/display.html","size":781,"blob_sha":"3645e6151ad0ca61f27f5c75492fb495f567dd50","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/index.html","size":1055,"blob_sha":"a433b73845de26899d8b407c24e65548f6d4d706","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/normal.html","size":762,"blob_sha":"0c108fafdbe5698fa70ecad6cd075c250fe3f8ba","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/deregister-obfuscators.html","size":1078,"blob_sha":"db37b1d32bbe2715546592a9c2f410830f4e4e41","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/index.html","size":4166,"blob_sha":"5f858d2f3e88f89fe415231addd085880386d0e7","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/obfuscate.html","size":3130,"blob_sha":"2f123e774b97446ea412cfd4b3b68497711e071b","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/register-obfuscator.html","size":1478,"blob_sha":"114e5e8a824028e06bfad3c621e551acba5154e3","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/displayed.html","size":1024,"blob_sha":"ea846635f734bae7b9e4c91b4190491b486a2dde","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/index.html","size":4208,"blob_sha":"952b3ad7ed83bbcf06f1c3ec0a1be4c9ed710130","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/obfuscate.html","size":1782,"blob_sha":"ef6cd095b0d3e10bd7f67fd7a6cae2779b69bc7a","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/regex.html","size":925,"blob_sha":"8a72ae64fdfe22a492426199427ca35cb361560f","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/replacement-regexp.html","size":1103,"blob_sha":"68c9eb841004484954fe8940094a57bc24092e0c","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/replacement.html","size":1016,"blob_sha":"30082dd4111d2a0b477f5ef4e9bdc629e1009665","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/admin.html","size":755,"blob_sha":"1ce0f749d2626a17e210523c1df082cd08e4cd93","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/bot-user.html","size":769,"blob_sha":"a33ffcb2d1b44cd623eb37007b6c79b8bf29e2ca","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/index.html","size":2170,"blob_sha":"1cfcd9d0781c8e165bb4129b66dfe73adaf1f4c3","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/nlp-user.html","size":773,"blob_sha":"0c0d81fb25d3dbe0bdbb92b10e1afe259d6074a0","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/technical-admin.html","size":814,"blob_sha":"ec09c8027ab4c40e62b5718e6e860c9a0ef42abe","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/to-role.html","size":1185,"blob_sha":"83e59c5a56f05ca801945d66797ea391768b1b66","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/-init-.html","size":1925,"blob_sha":"f32764315e8594a347d1143710fe3ccdde9bd91d","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/do-is-permitted.html","size":2008,"blob_sha":"efaff128f83e9e8908764dba919fb534eff8b13b","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/index.html","size":5767,"blob_sha":"71e702967a9f581bc222daccbf17496c1e91783b","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/namespace.html","size":850,"blob_sha":"ef0071a855caea267586525a22dbce6ac2957a24","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/principal.html","size":829,"blob_sha":"6ad52156fb3a091e0352df0bcd62c656f88bbc03","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/roles.html","size":1019,"blob_sha":"ca75e6474ed312930f3ea7d7ca551c77b8ed3cd5","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/set-auth-provider.html","size":1201,"blob_sha":"1f792f154919b8a6219b5a13e78318d4558446db","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/user.html","size":820,"blob_sha":"6837cbd761105fe3e424cc6a2e89c77acc6c0393","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/decrypt.html","size":1136,"blob_sha":"160f6e4c2b618c497621fd1142d50cc6cd718f0a","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/encrypt.html","size":1136,"blob_sha":"806414e85b4e90fb65e1902d9ac2d5bfe113a2bf","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/encryption-enabled.html","size":859,"blob_sha":"928ccc3948104eaa1801b621e5b832de2f1737c5","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/index.html","size":5173,"blob_sha":"beadbd3e98427ea16b12e6095ab60389eac1f03a","priority":2},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/init-encryptor.html","size":893,"blob_sha":"3488c157e8a5fdd8cd2bcb92b6bf7107dac64428","priority":2}],"documents":[{"path":"README.md","size":689,"blob_sha":"c166637f7ab6dd637a6070dde085dcb395edbbb9","priority":0,"status":200,"text":"[![Gitter](https://badges.gitter.im/tockchat/Lobby.svg)](https://gitter.im/tockchat/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)\n[![Build Status](https://travis-ci.org/voyages-sncf-technologies/tock.png)](https://travis-ci.org/voyages-sncf-technologies/tock)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/fr.vsct.tock/tock-root/badge.svg)](https://maven-badges.herokuapp.com/maven-central/fr.vsct.tock/tock-root)\n\n# Tock - The Open Conversation Kit\n \nBuild assistants & chatbots with ease.\n \nFull documentation: [https://voyages-sncf-technologies.github.io/tock](https://voyages-sncf-technologies.github.io/tock/index.html)\n  \n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9310:1F1FB6:17FA11:5EA41F:6AB92ECF"},"text_sha256":"306831b75844a10f39f2e3a0386739f5e3d8939faec9707a5d307de76325b874"},{"path":"docs/dokka/tock/fr.vsct.tock.bot.connector.ga.model.response/-g-a-proposed-order/terms-of-service-url.html","size":1016,"blob_sha":"f4012a3d9b3591fc1a75dc1fd8715268e0e6ce3a","priority":1,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>GAProposedOrder.termsOfServiceUrl - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.bot.connector.ga.model.response<\/a>&nbsp;/&nbsp;<a href=\"index.html\">GAProposedOrder<\/a>&nbsp;/&nbsp;<a href=\"./terms-of-service-url.html\">termsOfServiceUrl<\/a><br/>\n<br/>\n<h1>termsOfServiceUrl<\/h1>\n<a name=\"fr.vsct.tock.bot.connector.ga.model.response.GAProposedOrder$termsOfServiceUrl\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">termsOfServiceUrl<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">?<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/bot/connector-ga/src/main/kotlin/fr/vsct/tock/bot/connector/ga/model/response/GAProposedOrder.kt#L11\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EDBA:3D501:1870E2:5F1BBE:6AB92ECF"},"text_sha256":"677d7853fc6e1be9556171b372166063dbe6e2fcedaec7f66242043d37add3fc"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-obfuscator-service/index.html","size":1382,"blob_sha":"81edac30ea7283b2126d1a41e329e6bf9e83eabb","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>ObfuscatorService - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">ObfuscatorService<\/a><br/>\n<br/>\n<h1>ObfuscatorService<\/h1>\n<code><span class=\"keyword\">interface <\/span><span class=\"identifier\">ObfuscatorService<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/ObfuscatorService.kt#L22\">(source)<\/a>\n<p>To load obfuscators via service loaders.<\/p>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"string-obfuscators.html\">stringObfuscators<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">stringObfuscators<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"../-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code>\n<p>Returns the string obfuscators to register.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6816:3BCC6:17F94D:5EA3E7:6AB92ED0"},"text_sha256":"ab123c8ed339bfb61a06704c6724b52471ea244816ec962fb83d9cf50db0d447"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-obfuscator-service/string-obfuscators.html","size":1251,"blob_sha":"d8dda7ba25cdfe7c3ad0ac621e3624a146a2d1d5","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>ObfuscatorService.stringObfuscators - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">ObfuscatorService<\/a>&nbsp;/&nbsp;<a href=\"./string-obfuscators.html\">stringObfuscators<\/a><br/>\n<br/>\n<h1>stringObfuscators<\/h1>\n<a name=\"fr.vsct.tock.shared.security.ObfuscatorService$stringObfuscators()\"><\/a>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">stringObfuscators<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"../-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/ObfuscatorService.kt#L27\">(source)<\/a>\n<p>Returns the string obfuscators to register.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE42:3B6DE:178F34:5E3940:6AB92ED0"},"text_sha256":"8e8e545c65168a58a227d0ab6a32235dec5795b3553da3839345fb58f3baf568"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-property-based-auth-provider/authenticate.html","size":1959,"blob_sha":"44ccb5039953fda4fb152286979e97f207f93635","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>PropertyBasedAuthProvider.authenticate - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">PropertyBasedAuthProvider<\/a>&nbsp;/&nbsp;<a href=\"./authenticate.html\">authenticate<\/a><br/>\n<br/>\n<h1>authenticate<\/h1>\n<a name=\"fr.vsct.tock.shared.security.PropertyBasedAuthProvider$authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler((io.vertx.core.AsyncResult((io.vertx.ext.auth.User)))))\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">authenticate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.PropertyBasedAuthProvider$authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler((io.vertx.core.AsyncResult((io.vertx.ext.auth.User)))))/authInfo\">authInfo<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">JsonObject<\/span><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.PropertyBasedAuthProvider$authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler((io.vertx.core.AsyncResult((io.vertx.ext.auth.User)))))/resultHandler\">resultHandler<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">Handler<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">AsyncResult<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">User<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/PropertyBasedAuthProvider.kt#L41\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9580:7A4F8:184E6A:5EF9A1:6AB92ED0"},"text_sha256":"9810ed8d5e938e02332c59d51ea98b7017403dd99005184031b243e553ce59c1"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-property-based-auth-provider/index.html","size":2100,"blob_sha":"8621c7678162a83f4a7fa3fc67670191a2f80028","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>PropertyBasedAuthProvider - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">PropertyBasedAuthProvider<\/a><br/>\n<br/>\n<h1>PropertyBasedAuthProvider<\/h1>\n<code><span class=\"keyword\">object <\/span><span class=\"identifier\">PropertyBasedAuthProvider<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AuthProvider<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/PropertyBasedAuthProvider.kt#L32\">(source)<\/a>\n<p>Simple <a href=\"#\">AuthProvider<\/a> used in dev mode.<\/p>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"authenticate.html\">authenticate<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">authenticate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.PropertyBasedAuthProvider$authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler((io.vertx.core.AsyncResult((io.vertx.ext.auth.User)))))/authInfo\">authInfo<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">JsonObject<\/span><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.PropertyBasedAuthProvider$authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler((io.vertx.core.AsyncResult((io.vertx.ext.auth.User)))))/resultHandler\">resultHandler<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">Handler<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">AsyncResult<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">User<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C720:3D40A:174F9F:5DFA49:6AB92ECD"},"text_sha256":"0108a53ef566208cc4e8d688f9166b0a350285799f04432ad496d2357c24fd0f"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/-init-.html","size":2350,"blob_sha":"2ae88283763a5bf57f3ea21990b36278172e7da0","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator.<init> - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">SimpleObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./-init-.html\">&lt;init&gt;<\/a><br/>\n<br/>\n<h1>&lt;init&gt;<\/h1>\n<a name=\"fr.vsct.tock.shared.security.SimpleObfuscator$&lt;init&gt;(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)\"><\/a>\n<code><span class=\"identifier\">SimpleObfuscator<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/regex\">regex<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/replacement\">replacement<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/displayed\">displayed<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;replacement<span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/replacementRegexp\">replacementRegexp<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;replacement.toRegex(RegexOption.LITERAL)<span class=\"symbol\">)<\/span><\/code>\n<p>Simple implementation for <a href=\"../-string-obfuscator/index.html\">StringObfuscator<\/a>.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13BC:1A3D83:188ECC:5F3A4C:6AB92EC0"},"text_sha256":"dc8d96c557ff8e9870229bbbfa26701f5562e0277f2b57fcf02d31c0cc8a7e81"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/displayed.html","size":1081,"blob_sha":"98ef4b77db64b096d03a10675f9ff8f14ff53979","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator.displayed - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">SimpleObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./displayed.html\">displayed<\/a><br/>\n<br/>\n<h1>displayed<\/h1>\n<a name=\"fr.vsct.tock.shared.security.SimpleObfuscator$displayed\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">displayed<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/SimpleObfuscator.kt#L24\">(source)<\/a>\n<p>Overrides <a href=\"../-string-obfuscator/displayed.html\">StringObfuscator.displayed<\/a><\/p>\n<p>Used in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17AE57:5E5918:6AB92ED1"},"text_sha256":"a53a7186e7a64d9e0f72c972d4b5b6476c46f0059cdecff73d51066a2d2184c6"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/index.html","size":5758,"blob_sha":"29c2233cdc9d09312cb540210d2055f9221f1042","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">SimpleObfuscator<\/a><br/>\n<br/>\n<h1>SimpleObfuscator<\/h1>\n<code><span class=\"keyword\">data<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">SimpleObfuscator<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/SimpleObfuscator.kt#L22\">(source)<\/a>\n<p>Simple implementation for <a href=\"../-string-obfuscator/index.html\">StringObfuscator<\/a>.<\/p>\n<h3>Constructors<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"-init-.html\">&lt;init&gt;<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"identifier\">SimpleObfuscator<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/regex\">regex<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/replacement\">replacement<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/displayed\">displayed<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;replacement<span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.SimpleObfuscator$<init>(kotlin.text.Regex, kotlin.String, kotlin.String, kotlin.text.Regex)/replacementRegexp\">replacementRegexp<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;replacement.toRegex(RegexOption.LITERAL)<span class=\"symbol\">)<\/span><\/code>\n<p>Simple implementation for <a href=\"../-string-obfuscator/index.html\">StringObfuscator<\/a>.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Properties<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"displayed.html\">displayed<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">displayed<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Used in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"regex.html\">regex<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">regex<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code>\n<p>The search regexp.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"replacement.html\">replacement<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">replacement<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>The replacement string - should have the same size than the replaced string.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"replacement-regexp.html\">replacementRegexp<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">replacementRegexp<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code>\n<p>To match the replacement string in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Inherited Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"../-string-obfuscator/obfuscate.html\">obfuscate<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">open<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/text\">text<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/mode\">mode<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator-mode/index.html\"><span class=\"identifier\">StringObfuscatorMode<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;normal<span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Obfuscate the parameter.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BF7C:40B0C:180382:5EAEA7:6AB92ED2"},"text_sha256":"554ccdd206e718074e316783b8c25d9c5c63239c66d92e5e3ad745d97f2660a4"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/regex.html","size":974,"blob_sha":"5bb01e151629c68b54360b2f510deed59acda652","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator.regex - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">SimpleObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./regex.html\">regex<\/a><br/>\n<br/>\n<h1>regex<\/h1>\n<a name=\"fr.vsct.tock.shared.security.SimpleObfuscator$regex\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">regex<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/SimpleObfuscator.kt#L22\">(source)<\/a>\n<p>Overrides <a href=\"../-string-obfuscator/regex.html\">StringObfuscator.regex<\/a><\/p>\n<p>The search regexp.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2C60:386840:187F2C:5F2A4C:6AB92ED2"},"text_sha256":"eccd4f896f1ac61325ae82723f3ef61a4e8f4f773f934e4b2a6c02ea34195a6a"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/replacement-regexp.html","size":1177,"blob_sha":"8eb2aedfa828e87c518c0692c46cd410b24f3c48","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator.replacementRegexp - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">SimpleObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./replacement-regexp.html\">replacementRegexp<\/a><br/>\n<br/>\n<h1>replacementRegexp<\/h1>\n<a name=\"fr.vsct.tock.shared.security.SimpleObfuscator$replacementRegexp\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">replacementRegexp<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/SimpleObfuscator.kt#L25\">(source)<\/a>\n<p>Overrides <a href=\"../-string-obfuscator/replacement-regexp.html\">StringObfuscator.replacementRegexp<\/a><\/p>\n<p>To match the replacement string in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7134:326565:17CDF0:5E7976:6AB92ED2"},"text_sha256":"d0246cda5d795115e991bc4eeb40fcb4b6564c9f11f26941d26eb2604b6818bf"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-simple-obfuscator/replacement.html","size":1077,"blob_sha":"85487a884197f9be02300f5c471028814f236ccb","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>SimpleObfuscator.replacement - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">SimpleObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./replacement.html\">replacement<\/a><br/>\n<br/>\n<h1>replacement<\/h1>\n<a name=\"fr.vsct.tock.shared.security.SimpleObfuscator$replacement\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">replacement<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/SimpleObfuscator.kt#L23\">(source)<\/a>\n<p>Overrides <a href=\"../-string-obfuscator/replacement.html\">StringObfuscator.replacement<\/a><\/p>\n<p>The replacement string - should have the same size than the replaced string.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"24FC:2C474:182BC4:5ED6A4:6AB92ED2"},"text_sha256":"05e25c1020bb861febb598588e7a1d2caa6ebdfc765e2a1c4f257ef9acfdcdbf"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/display.html","size":781,"blob_sha":"3645e6151ad0ca61f27f5c75492fb495f567dd50","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorMode.display - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscatorMode<\/a>&nbsp;/&nbsp;<a href=\"./display.html\">display<\/a><br/>\n<br/>\n<h1>display<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorMode.display\"><\/a>\n<code><span class=\"identifier\">display<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorMode.kt#L31\">(source)<\/a>\n<p>Replace already obfuscated strings by a fixed string of unspecified size.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D036:40CE8:182601:5ED02B:6AB92ECE"},"text_sha256":"481be7c6b38d242d723bec5aeed04f6a43a3ea4624d5883628fbd5e3002efbac"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/index.html","size":1055,"blob_sha":"a433b73845de26899d8b407c24e65548f6d4d706","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorMode - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">StringObfuscatorMode<\/a><br/>\n<br/>\n<h1>StringObfuscatorMode<\/h1>\n<code><span class=\"keyword\">enum<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">StringObfuscatorMode<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorMode.kt#L22\">(source)<\/a>\n<p>Modes of string obfuscation.<\/p>\n<h3>Enum Values<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"normal.html\">normal<\/a><\/p>\n<\/td>\n<td>\n<p>Replace matching strings by a fixed string of the same size.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"display.html\">display<\/a><\/p>\n<\/td>\n<td>\n<p>Replace already obfuscated strings by a fixed string of unspecified size.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5CB0:3E1DA:17BD66:5E6889:6AB92ED2"},"text_sha256":"0929bc06d56f7c098fde945c2a2a526296142e05975568ff016999025adfb15d"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-mode/normal.html","size":762,"blob_sha":"0c108fafdbe5698fa70ecad6cd075c250fe3f8ba","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorMode.normal - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscatorMode<\/a>&nbsp;/&nbsp;<a href=\"./normal.html\">normal<\/a><br/>\n<br/>\n<h1>normal<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorMode.normal\"><\/a>\n<code><span class=\"identifier\">normal<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorMode.kt#L27\">(source)<\/a>\n<p>Replace matching strings by a fixed string of the same size.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"12AE:3CC8A:17FF3E:5EAA9D:6AB92ED3"},"text_sha256":"86cf24f796c94cce31df83afb2359b62870ddedcd575bdd1a4c77c8e2a8f092c"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/deregister-obfuscators.html","size":1078,"blob_sha":"db37b1d32bbe2715546592a9c2f410830f4e4e41","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorService.deregisterObfuscators - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscatorService<\/a>&nbsp;/&nbsp;<a href=\"./deregister-obfuscators.html\">deregisterObfuscators<\/a><br/>\n<br/>\n<h1>deregisterObfuscators<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorService$deregisterObfuscators()\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">deregisterObfuscators<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorService.kt#L54\">(source)<\/a>\n<p>Remove all current obfuscators.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"26CE:11316A:180152:5EAB7E:6AB92ED3"},"text_sha256":"43c1ea8c1de58e82a44f87e5cd7ec1cf912d67c59ddc2eedbe1beeb08fd0f37b"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/index.html","size":4166,"blob_sha":"5f858d2f3e88f89fe415231addd085880386d0e7","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorService - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">StringObfuscatorService<\/a><br/>\n<br/>\n<h1>StringObfuscatorService<\/h1>\n<code><span class=\"keyword\">object <\/span><span class=\"identifier\">StringObfuscatorService<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorService.kt#L27\">(source)<\/a>\n<p>To manage obfuscations.<\/p>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"deregister-obfuscators.html\">deregisterObfuscators<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">deregisterObfuscators<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code>\n<p>Remove all current obfuscators.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"obfuscate.html\">obfuscate<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.collections.List((kotlin.String)))/texts\">texts<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code><br/>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/text\">text<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">?<\/span><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/mode\">mode<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator-mode/index.html\"><span class=\"identifier\">StringObfuscatorMode<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;StringObfuscatorMode.normal<span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">?<\/span><\/code><\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"register-obfuscator.html\">registerObfuscator<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">registerObfuscator<\/span><span class=\"symbol\">(<\/span><span class=\"keyword\">vararg<\/span> <span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$registerObfuscator(kotlin.Array((fr.vsct.tock.shared.security.StringObfuscator)))/newObfuscators\">newObfuscators<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code>\n<p>Register obfuscators.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5410:2E8679:17ED23:5E95E2:6AB92ED3"},"text_sha256":"36bc111d695460e3d5a124e745dab7fbc92bd30fd7e1e71e57341a80e59b8f40"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/obfuscate.html","size":3130,"blob_sha":"2f123e774b97446ea412cfd4b3b68497711e071b","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorService.obfuscate - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscatorService<\/a>&nbsp;/&nbsp;<a href=\"./obfuscate.html\">obfuscate<\/a><br/>\n<br/>\n<h1>obfuscate<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.collections.List((kotlin.String)))\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.collections.List((kotlin.String)))/texts\">texts<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html\"><span class=\"identifier\">List<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorService.kt#L58\">(source)<\/a><br/>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/text\">text<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">?<\/span><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/mode\">mode<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator-mode/index.html\"><span class=\"identifier\">StringObfuscatorMode<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;StringObfuscatorMode.normal<span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">?<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorService.kt#L62\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8CC0:11316A:18015B:5EAB91:6AB92ED4"},"text_sha256":"6a655d851ce3951b3c2c640624f44f7e57251b9d59a8aa06452b315f4b1984a6"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator-service/register-obfuscator.html","size":1478,"blob_sha":"114e5e8a824028e06bfad3c621e551acba5154e3","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscatorService.registerObfuscator - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscatorService<\/a>&nbsp;/&nbsp;<a href=\"./register-obfuscator.html\">registerObfuscator<\/a><br/>\n<br/>\n<h1>registerObfuscator<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscatorService$registerObfuscator(kotlin.Array((fr.vsct.tock.shared.security.StringObfuscator)))\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">registerObfuscator<\/span><span class=\"symbol\">(<\/span><span class=\"keyword\">vararg<\/span> <span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscatorService$registerObfuscator(kotlin.Array((fr.vsct.tock.shared.security.StringObfuscator)))/newObfuscators\">newObfuscators<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscatorService.kt#L47\">(source)<\/a>\n<p>Register obfuscators.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FF1C:3E1C8:1811C4:5EBBDB:6AB92ED4"},"text_sha256":"1ebd4ff4b257028d1b71b42461c4db998ffcb15d2b21acb0cb4d6102330fd346"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/displayed.html","size":1024,"blob_sha":"ea846635f734bae7b9e4c91b4190491b486a2dde","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator.displayed - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./displayed.html\">displayed<\/a><br/>\n<br/>\n<h1>displayed<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscator$displayed\"><\/a>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">displayed<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L45\">(source)<\/a>\n<p>Used in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A160:B08CF:176D23:5E18E0:6AB92ED2"},"text_sha256":"56c38cfffbcc9b32ef960ab529ff226aed2798f70c6628a6410c8c370bd2fe35"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/index.html","size":4208,"blob_sha":"952b3ad7ed83bbcf06f1c3ec0a1be4c9ed710130","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">StringObfuscator<\/a><br/>\n<br/>\n<h1>StringObfuscator<\/h1>\n<code><span class=\"keyword\">interface <\/span><span class=\"identifier\">StringObfuscator<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L25\">(source)<\/a>\n<p>Replaces a string by an other String.<\/p>\n<h3>Properties<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"displayed.html\">displayed<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">displayed<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Used in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"regex.html\">regex<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">regex<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code>\n<p>The search regexp.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"replacement.html\">replacement<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">replacement<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>The replacement string - should have the same size than the replaced string.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"replacement-regexp.html\">replacementRegexp<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">replacementRegexp<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code>\n<p>To match the replacement string in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"obfuscate.html\">obfuscate<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">open<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/text\">text<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/mode\">mode<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator-mode/index.html\"><span class=\"identifier\">StringObfuscatorMode<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;normal<span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Obfuscate the parameter.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Inheritors<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"../-simple-obfuscator/index.html\">SimpleObfuscator<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">data<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">SimpleObfuscator<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<a href=\"./index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><\/code>\n<p>Simple implementation for <a href=\"./index.html\">StringObfuscator<\/a>.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5C20:38C7FC:181319:5ADD33:6AB92ED4"},"text_sha256":"4c10c8cc056afc0b35ec8e8ea586effd89044e756009bc9adf5fcac85993d6d3"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/obfuscate.html","size":1782,"blob_sha":"ef6cd095b0d3e10bd7f67fd7a6cae2779b69bc7a","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator.obfuscate - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./obfuscate.html\">obfuscate<\/a><br/>\n<br/>\n<h1>obfuscate<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)\"><\/a>\n<code><span class=\"keyword\">open<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">obfuscate<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/text\">text<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.StringObfuscator$obfuscate(kotlin.String, fr.vsct.tock.shared.security.StringObfuscatorMode)/mode\">mode<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"../-string-obfuscator-mode/index.html\"><span class=\"identifier\">StringObfuscatorMode<\/span><\/a>&nbsp;<span class=\"symbol\">=<\/span>&nbsp;normal<span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L50\">(source)<\/a>\n<p>Obfuscate the parameter.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EE42:3B6DE:178F74:5E39F6:6AB92ED4"},"text_sha256":"b932d86957e827f278dd58b687f1d5bcb9c6837bf756baa790af21dfbe328423"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/regex.html","size":925,"blob_sha":"8a72ae64fdfe22a492426199427ca35cb361560f","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator.regex - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./regex.html\">regex<\/a><br/>\n<br/>\n<h1>regex<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscator$regex\"><\/a>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">regex<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L30\">(source)<\/a>\n<p>The search regexp.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FE1A:3E1C8:1811D3:5EBBFE:6AB92ED5"},"text_sha256":"c243996c40c5c714e767bc67ffeee7cacf8a605f1911a15039ee5183d5fb4a81"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/replacement-regexp.html","size":1103,"blob_sha":"68c9eb841004484954fe8940094a57bc24092e0c","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator.replacementRegexp - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./replacement-regexp.html\">replacementRegexp<\/a><br/>\n<br/>\n<h1>replacementRegexp<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscator$replacementRegexp\"><\/a>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">replacementRegexp<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html\"><span class=\"identifier\">Regex<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L40\">(source)<\/a>\n<p>To match the replacement string in <a href=\"../-string-obfuscator-mode/display.html\">StringObfuscatorMode.display<\/a> mode.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A9E:345ED4:17B36E:5E5DD3:6AB92ED4"},"text_sha256":"cd9714156619901be4bc56352876797a92af02ea881175f96cfbca26350c12ec"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-string-obfuscator/replacement.html","size":1016,"blob_sha":"30082dd4111d2a0b477f5ef4e9bdc629e1009665","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>StringObfuscator.replacement - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">StringObfuscator<\/a>&nbsp;/&nbsp;<a href=\"./replacement.html\">replacement<\/a><br/>\n<br/>\n<h1>replacement<\/h1>\n<a name=\"fr.vsct.tock.shared.security.StringObfuscator$replacement\"><\/a>\n<code><span class=\"keyword\">abstract<\/span> <span class=\"keyword\">val <\/span><span class=\"identifier\">replacement<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/StringObfuscator.kt#L35\">(source)<\/a>\n<p>The replacement string - should have the same size than the replaced string.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BC58:3C4A0:17DAAA:5E8605:6AB92ED6"},"text_sha256":"f7f00337118a9a922a3ce611887650e0a234ae2f217fe03d6fe4405198bb408a"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/admin.html","size":755,"blob_sha":"1ce0f749d2626a17e210523c1df082cd08e4cd93","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole.admin - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUserRole<\/a>&nbsp;/&nbsp;<a href=\"./admin.html\">admin<\/a><br/>\n<br/>\n<h1>admin<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUserRole.admin\"><\/a>\n<code><span class=\"identifier\">admin<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L37\">(source)<\/a>\n<p>An admin is allowed to update applications and builds, and to export/intent sentences dump.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DC8A:3E1C8:1811DE:5EBC21:6AB92ED6"},"text_sha256":"dd458f9d1d47f929ca66be52a379ffb3a002ed277bee853521be8fea962589b9"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/bot-user.html","size":769,"blob_sha":"a33ffcb2d1b44cd623eb37007b6c79b8bf29e2ca","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole.botUser - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUserRole<\/a>&nbsp;/&nbsp;<a href=\"./bot-user.html\">botUser<\/a><br/>\n<br/>\n<h1>botUser<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUserRole.botUser\"><\/a>\n<code><span class=\"identifier\">botUser<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L33\">(source)<\/a>\n<p>A bot user is allowed to modify answer &amp; i18n, and to consult dialogs and conversations.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"35E2:3E1DA:17BD87:5E68F9:6AB92ED5"},"text_sha256":"db56ff7e42cd076cfb6959cf12678c87276ac74a23285aaac495f897ecc69f78"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/index.html","size":2170,"blob_sha":"1cfcd9d0781c8e165bb4129b66dfe73adaf1f4c3","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">TockUserRole<\/a><br/>\n<br/>\n<h1>TockUserRole<\/h1>\n<code><span class=\"keyword\">enum<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">TockUserRole<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L24\">(source)<\/a>\n<p>The user roles for <a href=\"../-tock-user/index.html\">TockUser<\/a>.<\/p>\n<h3>Enum Values<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"nlp-user.html\">nlpUser<\/a><\/p>\n<\/td>\n<td>\n<p>A nlp user is allowed to qualify and search sentences, but not to update applications or builds.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"bot-user.html\">botUser<\/a><\/p>\n<\/td>\n<td>\n<p>A bot user is allowed to modify answer &amp; i18n, and to consult dialogs and conversations.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"admin.html\">admin<\/a><\/p>\n<\/td>\n<td>\n<p>An admin is allowed to update applications and builds, and to export/intent sentences dump.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"technical-admin.html\">technicalAdmin<\/a><\/p>\n<\/td>\n<td>\n<p>A technical admin has access to all encrypted sentence, and to export/intent application dumps.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Companion Object Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"to-role.html\">toRole<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">toRole<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUserRole.Companion$toRole(kotlin.String)/role\">role<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"./index.html\"><span class=\"identifier\">TockUserRole<\/span><\/a><span class=\"symbol\">?<\/span><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B9C2:18CDF1:17AB1B:567785:6AB92ED6"},"text_sha256":"c393d5aa03c95bdf9e062237b843d281d46a63564b75f8a9b53fc87449821c30"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/nlp-user.html","size":773,"blob_sha":"0c0d81fb25d3dbe0bdbb92b10e1afe259d6074a0","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole.nlpUser - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUserRole<\/a>&nbsp;/&nbsp;<a href=\"./nlp-user.html\">nlpUser<\/a><br/>\n<br/>\n<h1>nlpUser<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUserRole.nlpUser\"><\/a>\n<code><span class=\"identifier\">nlpUser<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L29\">(source)<\/a>\n<p>A nlp user is allowed to qualify and search sentences, but not to update applications or builds.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"63CA:326565:17CE1D:5E7A41:6AB92ED6"},"text_sha256":"a5e53ad0a83a5572121bf643d8c5d05f724a8a335c91651255b5f9f2b9d070ce"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/technical-admin.html","size":814,"blob_sha":"ec09c8027ab4c40e62b5718e6e860c9a0ef42abe","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole.technicalAdmin - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUserRole<\/a>&nbsp;/&nbsp;<a href=\"./technical-admin.html\">technicalAdmin<\/a><br/>\n<br/>\n<h1>technicalAdmin<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUserRole.technicalAdmin\"><\/a>\n<code><span class=\"identifier\">technicalAdmin<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L41\">(source)<\/a>\n<p>A technical admin has access to all encrypted sentence, and to export/intent application dumps.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4DCA:2B291E:186098:5F0C79:6AB92ED7"},"text_sha256":"8a371c72c7428fb54d099f46d05e8c30f3b86d019544dc65a1fcc49b6cf3fe31"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user-role/to-role.html","size":1185,"blob_sha":"83e59c5a56f05ca801945d66797ea391768b1b66","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUserRole.toRole - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUserRole<\/a>&nbsp;/&nbsp;<a href=\"./to-role.html\">toRole<\/a><br/>\n<br/>\n<h1>toRole<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUserRole.Companion$toRole(kotlin.String)\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">toRole<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUserRole.Companion$toRole(kotlin.String)/role\">role<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"index.html\"><span class=\"identifier\">TockUserRole<\/span><\/a><span class=\"symbol\">?<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUserRole.kt#L46\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"40FC:3AC5A:18166F:5EC199:6AB92ED7"},"text_sha256":"2941c72648d5ce022549d874cb9cbd125a72719ec8c2033f31bbe8990fb357d4"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/-init-.html","size":1925,"blob_sha":"f32764315e8594a347d1143710fe3ccdde9bd91d","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.<init> - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./-init-.html\">&lt;init&gt;<\/a><br/>\n<br/>\n<h1>&lt;init&gt;<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$&lt;init&gt;(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))\"><\/a>\n<code><span class=\"identifier\">TockUser<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/user\">user<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/namespace\">namespace<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/roles\">roles<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html\"><span class=\"identifier\">Set<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><\/code>\n<p>Tock implementation of vertx <a href=\"#\">User<\/a>.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37C8:727CE:176B5A:5E171A:6AB92ED6"},"text_sha256":"599a44087e264823627528b44302aedee294853202c03d5d33152d8fe275fe20"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/do-is-permitted.html","size":2008,"blob_sha":"efaff128f83e9e8908764dba919fb534eff8b13b","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.doIsPermitted - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./do-is-permitted.html\">doIsPermitted<\/a><br/>\n<br/>\n<h1>doIsPermitted<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$doIsPermitted(kotlin.String, io.vertx.core.Handler((io.vertx.core.AsyncResult((kotlin.Boolean)))))\"><\/a>\n<code><span class=\"keyword\">protected<\/span> <span class=\"keyword\">fun <\/span><span class=\"identifier\">doIsPermitted<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$doIsPermitted(kotlin.String, io.vertx.core.Handler((io.vertx.core.AsyncResult((kotlin.Boolean)))))/permissionOrRole\">permissionOrRole<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$doIsPermitted(kotlin.String, io.vertx.core.Handler((io.vertx.core.AsyncResult((kotlin.Boolean)))))/handler\">handler<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">Handler<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">AsyncResult<\/span><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html\"><span class=\"identifier\">Boolean<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L36\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AB1C:1A3D83:188F38:5F3B4B:6AB92ED7"},"text_sha256":"861f3e1ecb80c8aec78ab082bd5e81579a73ab0f43602863d2d3a6e2e64ed846"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/index.html","size":5767,"blob_sha":"71e702967a9f581bc222daccbf17496c1e91783b","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">TockUser<\/a><br/>\n<br/>\n<h1>TockUser<\/h1>\n<code><span class=\"keyword\">data<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">TockUser<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AbstractUser<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L30\">(source)<\/a>\n<p>Tock implementation of vertx <a href=\"#\">User<\/a>.<\/p>\n<h3>Constructors<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"-init-.html\">&lt;init&gt;<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"identifier\">TockUser<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/user\">user<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/namespace\">namespace<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$<init>(kotlin.String, kotlin.String, kotlin.collections.Set((kotlin.String)))/roles\">roles<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html\"><span class=\"identifier\">Set<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><\/code>\n<p>Tock implementation of vertx <a href=\"#\">User<\/a>.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Properties<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"namespace.html\">namespace<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">namespace<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code><\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"roles.html\">roles<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">roles<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html\"><span class=\"identifier\">Set<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code><\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"user.html\">user<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">user<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"do-is-permitted.html\">doIsPermitted<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">doIsPermitted<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$doIsPermitted(kotlin.String, io.vertx.core.Handler((io.vertx.core.AsyncResult((kotlin.Boolean)))))/permissionOrRole\">permissionOrRole<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">, <\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$doIsPermitted(kotlin.String, io.vertx.core.Handler((io.vertx.core.AsyncResult((kotlin.Boolean)))))/handler\">handler<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">Handler<\/span><span class=\"symbol\">&lt;<\/span><span class=\"identifier\">AsyncResult<\/span><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html\"><span class=\"identifier\">Boolean<\/span><\/a><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">&gt;<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code><\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"principal.html\">principal<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">principal<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><span class=\"identifier\">JsonObject<\/span><\/code><\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"set-auth-provider.html\">setAuthProvider<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">setAuthProvider<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$setAuthProvider(io.vertx.ext.auth.AuthProvider)/authProvider\">authProvider<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AuthProvider<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"332E:1A3D83:188F3D:5F3B56:6AB92ED8"},"text_sha256":"9b15a9c2ea5a7bd4eaf9d12ec564875aa1488a8718c6850a8120edfff0d456cf"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/namespace.html","size":850,"blob_sha":"ef0071a855caea267586525a22dbce6ac2957a24","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.namespace - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./namespace.html\">namespace<\/a><br/>\n<br/>\n<h1>namespace<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$namespace\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">namespace<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L32\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17CA87:5E7521:6AB92ED8"},"text_sha256":"86e2d2097826fd73642744ca940ee978a14bfd97c86f36fe6f446edfb7a06e1a"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/principal.html","size":829,"blob_sha":"6ad52156fb3a091e0352df0bcd62c656f88bbc03","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.principal - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./principal.html\">principal<\/a><br/>\n<br/>\n<h1>principal<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$principal()\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">principal<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><span class=\"identifier\">JsonObject<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L44\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8C40:241B62:17C564:5E714C:6AB92ED8"},"text_sha256":"818eac7def9335c41a6547fd436273dbb63e2d64ac2c87377b9257627d1cf8c0"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/roles.html","size":1019,"blob_sha":"ca75e6474ed312930f3ea7d7ca551c77b8ed3cd5","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.roles - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./roles.html\">roles<\/a><br/>\n<br/>\n<h1>roles<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$roles\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">roles<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html\"><span class=\"identifier\">Set<\/span><\/a><span class=\"symbol\">&lt;<\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">&gt;<\/span><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L33\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8BB4:3EACB:17D26A:5E7DE7:6AB92ED8"},"text_sha256":"632c1151dfb301e083a4db6f613a3bd8975a3b2dd82340ae61d78f1f4e30b818"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/set-auth-provider.html","size":1201,"blob_sha":"1f792f154919b8a6219b5a13e78318d4558446db","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.setAuthProvider - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./set-auth-provider.html\">setAuthProvider<\/a><br/>\n<br/>\n<h1>setAuthProvider<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$setAuthProvider(io.vertx.ext.auth.AuthProvider)\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">setAuthProvider<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security.TockUser$setAuthProvider(io.vertx.ext.auth.AuthProvider)/authProvider\">authProvider<\/span><span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AuthProvider<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L40\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3B48:40B0C:1803E7:5EAFB8:6AB92ED8"},"text_sha256":"e45ff0be0f67cab4dc08b854c3a146821f35259bb5432b3c7f8674ffe01670b9"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/-tock-user/user.html","size":820,"blob_sha":"6837cbd761105fe3e424cc6a2e89c77acc6c0393","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>TockUser.user - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"../index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"index.html\">TockUser<\/a>&nbsp;/&nbsp;<a href=\"./user.html\">user<\/a><br/>\n<br/>\n<h1>user<\/h1>\n<a name=\"fr.vsct.tock.shared.security.TockUser$user\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">user<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/TockUser.kt#L31\">(source)<\/a>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D73C:3CC8A:17FF83:5EABA3:6AB92ED7"},"text_sha256":"d142968d3eeb0ea3f59c5ba4ce17f108d9b6f40503818c196d9d4a9bfca368e1"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/decrypt.html","size":1136,"blob_sha":"160f6e4c2b618c497621fd1142d50cc6cd718f0a","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>decrypt - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./decrypt.html\">decrypt<\/a><br/>\n<br/>\n<h1>decrypt<\/h1>\n<a name=\"fr.vsct.tock.shared.security$decrypt(kotlin.String)\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">decrypt<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security$decrypt(kotlin.String)/s\">s<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/encryptor.kt#L59\">(source)<\/a>\n<p>Decrypt a string and return the result.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"887C:7A4F8:184EB5:5EFAF3:6AB92ED9"},"text_sha256":"959c2ba9b49cc6c7b0214ebc85b5d67ddcae2295b59738612f2851b2294f6bbf"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/encrypt.html","size":1136,"blob_sha":"806414e85b4e90fb65e1902d9ac2d5bfe113a2bf","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>encrypt - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./encrypt.html\">encrypt<\/a><br/>\n<br/>\n<h1>encrypt<\/h1>\n<a name=\"fr.vsct.tock.shared.security$encrypt(kotlin.String)\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">encrypt<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security$encrypt(kotlin.String)/s\">s<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/encryptor.kt#L52\">(source)<\/a>\n<p>Encrypt a string and return the result.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9D2E:727CE:176B7B:5E17A1:6AB92ED9"},"text_sha256":"23f36831b9d1936607e8388c216eb9241e27be443692060e9b35639bb9eee4fe"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/encryption-enabled.html","size":859,"blob_sha":"928ccc3948104eaa1801b621e5b832de2f1737c5","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>encryptionEnabled - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./encryption-enabled.html\">encryptionEnabled<\/a><br/>\n<br/>\n<h1>encryptionEnabled<\/h1>\n<a name=\"fr.vsct.tock.shared.security$encryptionEnabled\"><\/a>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">encryptionEnabled<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html\"><span class=\"identifier\">Boolean<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/encryptor.kt#L47\">(source)<\/a>\n<p>Is encryption enabled?<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9B66:2B291E:1860BE:5F0D01:6AB92ED9"},"text_sha256":"04cb7e570b8a3e8119206415b362820671b1606c9bd4d71548e09a26e90c29c3"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/index.html","size":5173,"blob_sha":"beadbd3e98427ea16b12e6095ab60389eac1f03a","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>fr.vsct.tock.shared.security - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"./index.html\">fr.vsct.tock.shared.security<\/a><br/>\n<br/>\n<h2>Package fr.vsct.tock.shared.security<\/h2>\n<p>User definition and encryption methods<\/p>\n<h3>Types<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"-obfuscator-service/index.html\">ObfuscatorService<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">interface <\/span><span class=\"identifier\">ObfuscatorService<\/span><\/code>\n<p>To load obfuscators via service loaders.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-property-based-auth-provider/index.html\">PropertyBasedAuthProvider<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">object <\/span><span class=\"identifier\">PropertyBasedAuthProvider<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AuthProvider<\/span><\/code>\n<p>Simple <a href=\"#\">AuthProvider<\/a> used in dev mode.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-simple-obfuscator/index.html\">SimpleObfuscator<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">data<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">SimpleObfuscator<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<a href=\"-string-obfuscator/index.html\"><span class=\"identifier\">StringObfuscator<\/span><\/a><\/code>\n<p>Simple implementation for <a href=\"-string-obfuscator/index.html\">StringObfuscator<\/a>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-string-obfuscator/index.html\">StringObfuscator<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">interface <\/span><span class=\"identifier\">StringObfuscator<\/span><\/code>\n<p>Replaces a string by an other String.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-string-obfuscator-mode/index.html\">StringObfuscatorMode<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">enum<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">StringObfuscatorMode<\/span><\/code>\n<p>Modes of string obfuscation.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-string-obfuscator-service/index.html\">StringObfuscatorService<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">object <\/span><span class=\"identifier\">StringObfuscatorService<\/span><\/code>\n<p>To manage obfuscations.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-tock-user/index.html\">TockUser<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">data<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">TockUser<\/span>&nbsp;<span class=\"symbol\">:<\/span>&nbsp;<span class=\"identifier\">AbstractUser<\/span><\/code>\n<p>Tock implementation of vertx <a href=\"#\">User<\/a>.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"-tock-user-role/index.html\">TockUserRole<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">enum<\/span> <span class=\"keyword\">class <\/span><span class=\"identifier\">TockUserRole<\/span><\/code>\n<p>The user roles for <a href=\"-tock-user/index.html\">TockUser<\/a>.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Properties<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"encryption-enabled.html\">encryptionEnabled<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">val <\/span><span class=\"identifier\">encryptionEnabled<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html\"><span class=\"identifier\">Boolean<\/span><\/a><\/code>\n<p>Is encryption enabled?<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Functions<\/h3>\n<table>\n<tbody>\n<tr>\n<td>\n<p><a href=\"decrypt.html\">decrypt<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">decrypt<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security$decrypt(kotlin.String)/s\">s<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Decrypt a string and return the result.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"encrypt.html\">encrypt<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">encrypt<\/span><span class=\"symbol\">(<\/span><span class=\"identifier\" id=\"fr.vsct.tock.shared.security$encrypt(kotlin.String)/s\">s<\/span><span class=\"symbol\">:<\/span>&nbsp;<a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\"><span class=\"identifier\">String<\/span><\/a><\/code>\n<p>Encrypt a string and return the result.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><a href=\"init-encryptor.html\">initEncryptor<\/a><\/p>\n<\/td>\n<td>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">initEncryptor<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code>\n<p>Init encryption utilities.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F390:3BCC6:17F9E8:5EA5A1:6AB92ED9"},"text_sha256":"4a9be5ef98f329dbeeea205e446f3b76bc91ab9cafee06dd484a8fd2892117cb"},{"path":"docs/dokka/tock/fr.vsct.tock.shared.security/init-encryptor.html","size":893,"blob_sha":"3488c157e8a5fdd8cd2bcb92b6bf7107dac64428","priority":2,"status":200,"text":"<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>initEncryptor - tock<\/title>\n<link rel=\"stylesheet\" href=\"../../style.css\">\n<\/HEAD>\n<BODY>\n<a href=\"../index.html\">tock<\/a>&nbsp;/&nbsp;<a href=\"index.html\">fr.vsct.tock.shared.security<\/a>&nbsp;/&nbsp;<a href=\"./init-encryptor.html\">initEncryptor<\/a><br/>\n<br/>\n<h1>initEncryptor<\/h1>\n<a name=\"fr.vsct.tock.shared.security$initEncryptor()\"><\/a>\n<code><span class=\"keyword\">fun <\/span><span class=\"identifier\">initEncryptor<\/span><span class=\"symbol\">(<\/span><span class=\"symbol\">)<\/span><span class=\"symbol\">: <\/span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit<\/span><\/a><\/code> <a href=\"https://github.com/voyages-sncf-technologies/tock/blob/master/shared/src/main/kotlin/fr/vsct/tock/shared/security/encryptor.kt#L66\">(source)<\/a>\n<p>Init encryption utilities.<\/p>\n<\/BODY>\n<\/HTML>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6900:3BCC6:17F9EB:5EA5A8:6AB92ED8"},"text_sha256":"a7322665f9047f57b124075a145cf3927a168cc2601e9f3d8f65eca9cee4e7d9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1335","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091A:725A9:18051C4:1C30A10:6AB92EDB"},"commit":{"sha":"a47a114fc86b1cbc055d60865fca3132c6fce5a0","url":"https://github.com/theopenconversationkit/tock/commit/a47a114fc86b1cbc055d60865fca3132c6fce5a0","date":"2026-06-23T17:15:07Z","author_date":"2026-06-23T17:15:07Z","committer_date":"2026-06-23T17:15:07Z","tree_sha":"6fbf1fa3f46589e99efcd936e2a5e5f78f999334","message_first_line":"resolve #2058 [Bot Engine] add transientContext argument to pushNotification (#2059)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1334","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084D:754BF:17F7EB9:1C2334B:6AB92EDB"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3426,"blob_sha":"049ac2ef23fef326956952fd1e585b2e8bb5cba2","priority":0},{"path":"docs/docs/en/admin/security.md","size":18105,"blob_sha":"79c53239e46a61ae346afffba62b7fe7b189274d","priority":1},{"path":"docs/docs/fr/admin/security.md","size":19384,"blob_sha":"bfff988c593a201ac84cc513e8d9e89120dfd0d6","priority":1}],"documents":[{"path":"README.md","size":3426,"blob_sha":"049ac2ef23fef326956952fd1e585b2e8bb5cba2","priority":0,"status":200,"text":"[![Build Status](https://app.travis-ci.com/theopenconversationkit/tock.png)](https://app.travis-ci.com/github/theopenconversationkit/tock)\n[![Maven Central](https://img.shields.io/maven-central/v/ai.tock/tock-root.svg)](https://search.maven.org/search?q=tock)\n[![Release Date](https://img.shields.io/github/release-date/theopenconversationkit/tock)](https://github.com/theopenconversationkit/tock/releases)\n\n[![Gitter](https://badges.gitter.im/tockchat/Lobby.svg)](https://gitter.im/tockchat/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)\n[![Contributors](https://img.shields.io/github/contributors-anon/theopenconversationkit/tock)](https://github.com/theopenconversationkit/tock/graphs/contributors)\n[![Commit Activity](https://img.shields.io/github/commit-activity/m/theopenconversationkit/tock)](https://github.com/theopenconversationkit/tock/pulse/monthly)\n\n[![Home](https://img.shields.io/website?label=home&down_message=offline&up_message=doc.tock.ai&url=https%3A%2F%2Fdoc.tock.ai)](https://doc.tock.ai)\n[![Demo](https://img.shields.io/badge/demo-live-blue)](https://demo.tock.ai)\n[![License](https://img.shields.io/github/license/theopenconversationkit/tock)](https://github.com/theopenconversationkit/tock/blob/master/LICENSE)\n\n# Tock - The Open Conversation Kit\n\n<img alt=\"Tock Logo\" src=\"http://doc.tock.ai/tock/master/img/logo.svg\" style=\"width: 150px;\"><br>\n\n_Curious about what Tock is or, who is using it? Check out our [website](https://doc.tock.ai)!_\n\nOpen Conversational AI platform to build Bots:\n\n* _Natural Language Processing_ open source stack, compatible with OpenNLP, Stanford, Rasa and more\n* _Tock Studio_ user interface to build stories and analytics\n* _Conversational DSL_ for Kotlin, Nodejs, Python and REST API\n* _Built-in connectors_ for numerous text/voice channels: Messenger, WhatsApp, Google Assistant, Alexa, Twitter and more\n* _Provided toolkits_ for custom Web/Mobile integration with React and Flutter\n* _Deploy anywhere_ in the Cloud or On-Premise with Docker\n \n🏠 Home: [https://doc.tock.ai](https://doc.tock.ai)\n \n🕮 Documentation: [https://doc.tock.ai/tock/master/](https://doc.tock.ai/tock/master/)\n\n🐋 Docker configurations: [https://github.com/theopenconversationkit/tock-docker](https://github.com/theopenconversationkit/tock-docker)\n\n▶️ Live demo: [https://demo.tock.ai](https://demo.tock.ai)\n  \n💬 Contact: [https://gitter.im/tockchat/Lobby](https://gitter.im/tockchat/Lobby)\n\n🔢 Versions: [https://gitter.im/tockchat/tock-news](https://gitter.im/tockchat/tock-news)\n\n## Kotlin developers : use ktlint\n\nIn order to format your code with [ktlint](https://pinterest.github.io/ktlint):\n```bash\nmvn antrun:run@ktlint-format\n```\n\nYou may need to build snapshot before:\n```bash\nmvn install -Dktlint.fail=false\n```\n\n\n## Python developers : use Pre-commit\n\nThe python part of the project uses **pre-commit** to automate code checks and formatting before each commit, ensuring consistent code quality and reducing errors.<br/>\nIt is very important to always execute these hooks to maintain the quality of the code.\n\n### Installation\n1. Install `pre-commit`:\n   ```bash\n   pip install pre-commit\n   ```\n2. Set up the hooks in your repository:\n   ```bash\n    pre-commit install\n   ```\n### Usage\n\nHooks will run automatically on each commit.<br/>\nTo run them manually on all files, use:\n   ```bash\n   pre-commit run --all-files\n   ```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8528:17E138:17C0EB:5E6CBC:6AB92EDB"},"text_sha256":"d39f8474f8b75aa34c46b4f94e304afc0d06ddcd5e68521b0c35ca70f935bb5f"},{"path":"docs/docs/en/admin/security.md","size":18105,"blob_sha":"79c53239e46a61ae346afffba62b7fe7b189274d","priority":1,"status":200,"text":"---\ntitle: Security\n---\n[//]: # (Traduit avec Google Translate et Reverso)\n\n# Security\n\n## Users *Tock Studio*\n\n### Authentication\n\nTock supports several authentication systems for the administration interface.\nIt uses the corresponding [vert.x](https://vertx.io/docs/vertx-auth-common/java/) libraries.\n\nHere are the systems available by default (all implementations of `TockAuthProvider`):\n\n- One model per \"properties\", used by default.\nThe code is available in the [`PropertyBasedAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/PropertyBasedAuthProvider.kt) class\n\n- A generic [_OAuth2_](https://oauth.net/2/) model.\n\n- A [_OAuth2_](https://oauth.net/2/) model adapted to [`Keycloak`](https://www.keycloak.org/).\n\n- A [_OAuth2_](https://oauth.net/2/) model specific to Github, an example of which is given by [`GithubOAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/GithubOAuthProvider.kt)\n\nIt is also possible to integrate CAS authentication (SSO), in the case of an enterprise-type installation.\nThis model requires inheriting from a base model, but allows you to match a user profile according to your\nown constraints and specificities.\n\nDetails and configuration examples are given further down this page.\n\nIf these models do not fit your needs, it is relatively easy to develop others\nbased on the examples above. Feel free to contribute to the project and contact us for any questions!\n\n### Roles\n\nTock allows you to assign several _roles_ or authorization levels to users in the _Tock Studio_ interfaces.\n\nDepending on the authentication system used (by properties, _0Auth_, etc.) each user is assigned\none or more of these roles, giving them different accesses in the application.\n\nThe available roles are defined in the `TockUserRole` enum:\n\n| Role | Description |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------|\n| `nlpUser` | NLP platform user, allowed to qualify and search sentences. |\n| ~~`faqNlpUser`~~ | ~~FAQ NLP platform user, allowed to qualify and search sentences.~~<br/> (Deprecated: Use the 'nlpUser' role instead) |\n| ~~`faqBotUser`~~ | ~~A faq bot user is allowed to manage the FAQ content, and train the FAQ~~<br/> (Deprecated: Use the 'botUser' role instead) |\n| `botUser` | Bot platform user, allowed to create and modify stories, rules and answers. |\n| `admin` | Allowed to update applications and configurations/connectors, import/export intents, sentences, stories, etc. |\n| `technicalAdmin` | Allowed to access encrypted data, import/export application dumps, etc. |\n\n\nHow to configure which _Tock Studio_ user has which role depends on the authentication mode,\nin other words the implementation of `TockAuthProvider` used.\n\n### Implementation by properties\n\nThe configuration by \"properties\" is used by default. It does not depend on any third-party system\nto work.\n\nThis mode consists of configuring users and roles by properties or environment variables.\n\nDepending on the deployment mode used, these variables can be defined either directly on the command line,\nor in a descriptor such as `docker-compose.yml`, `dockerrun.aws.json` or other.\n\n> If no variable is defined (for example in the descriptors provided in the repository\n> [`tock-docker`](https://github.com/theopenconversationkit/tock-docker)), default values ​​are used.\n\nHere are the properties and their default values:\n\n| Environment Variable     | Default Value          | Description                                      |\n|--------------------------|------------------------|--------------------------------------------------|\n| `tock_users`             | `admin@app.com`       | Identifiers (comma-separated).                  |\n| `tock_passwords`         | `password`            | Passwords (comma-separated).                    |\n| `tock_organizations`     | `app`                | Organizations (comma-separated).                |\n| `tock_roles`             | Empty (i.e., all roles)| Roles separated by `|` (then by commas).         |\n\n\nTo define the identity and roles of several users, separate the values ​​by commas.\n\n> **Warning:** each of these properties must have the same number of values ​​(and in the same order) to\n> allow correlation of these values ​​(index by index, for each user)\n\nBelow is an example in Docker-Compose format:\n\n```yaml\n{ \"name\" : \"tock_users\", \"value\" : \"alice@tock.ai,bob@tock.ai\" },\n{ \"name\" : \"tock_passwords\", \"value\" : \"secret1,secret2\" },\n{ \"name\" : \"tock_organizations\", \"value\" : \"tock,tock\" },\n{ \"name\" : \"tock_roles\", \"value\" : \"botUser,nlpUser|botUser|admin|technicalAdmin\" },\n```\n\nIn this example, Alice has the `botUser` role, while Bob has all the roles.\n\n> For more information on how this implementation works, see the class\n> [`PropertyBasedAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/PropertyBasedAuthProvider.kt).\n\n### Generic 0Auth2 Implementation\n\nThis generic implementation is to be used whenever you want to set up an OAuth2 configuration.\n\nHere are the properties and their default values:\n\n| Environment Variable                  | Example Value           | Description                                         | Example                            |\n|----------------------------------------|-------------------------|-----------------------------------------------------|------------------------------------|\n| `tock_oauth2_enabled`                  | `true`                  | Enable OAuth2 authentication                        |                                    |\n| `tock_oauth2_client_id`                | `CLIENT_ID`             | Client ID to query the GitHub API                   |                                    |\n| `tock_oauth2_secret_key`               | `SECRET_KEY`            | Password to query the GitHub API                    |                                    |\n| `tock_oauth2_site_url`                 | `https://provider`      | OAuth2 provider URL                                 |                                    |\n| `tock_oauth2_access_token_path`        | `/oauth2/token`         | Relative path to retrieve the access token          |                                    |\n| `tock_oauth2_authorize_path`           | `/oauth2/authorize`     | Relative path to retrieve the authorization         |                                    |\n| `tock_oauth2_userinfo_path`            | `/oauth2/userInfo`      | Relative path to retrieve user information          |                                    |\n| `tock_oauth2_proxy_host`               |                         | Proxy host (leave blank if no proxy is used)        |                                    |\n| `tock_oauth2_proxy_port`               |                         | Optional proxy port                                 |                                    |\n| `tock_oauth2_user_role_attribute`      | `custom:roles`          | Attribute read from the token for role mapping      |                                    |\n| `tock_custom_roles_mapping`            |                         | Link between OAuth profiles and Tock roles          |                                    |\n| `tock_custom_namespace_mapping`        |                         | Link between OAuth profiles and Tock namespaces     | `id1=sncf|id2=sncf`                |\n| `tock_bot_admin_rest_default_base_url` | `http://localhost:8080` | Redirect to Tock Studio URL if necessary            |                                    |\n\nIt is necessary to indicate in callback url `https://[host admin]/rest/callback`.\n\n### 0Auth2 implementation for Keycloak\n\nThis OAuth2 Keycloak implementation is to be used as soon as you want to configure an OAuth2 configuration with Keycloak.\n\nHere are the properties and their proposed values:\n\n> Warning, by default, no adapter is activated, it is imperative to set the tock_keycloak_enabled key corresponding to our adapter to true.\n\n| Environment variable | Example value | Description |\n| ----------------------------------- | ----------------------------------- | ----------------------------------------------- |\n| `tock_keycloak_enabled` | `true` | Enabling 0Auth2 authentication |\n| `tock_keycloak_client_id` | `CLIENT_ID` | Client id created on Keycloak |\n| `tock_keycloak_secret_key` | `SECRET_KEY` | Secret key generated by Keycloak |\n| `tock_keycloak_site_url` | `https://keycloak/realms/myrealm` | Keycloak Realm Url |\n| `tock_keycloak_access_token_path` | `/protocol/openid-connect/token` | Relative path to retrieve the access token |\n| `tock_keycloak_authorize_path` | `/protocol/openid-connect/auth` | Relative path for the authorize |\n| `tock_keycloak_userinfo_path` | `/protocol/openid-connect/userinfo` | Relative path for the userinfo |\n| `tock_keycloak_proxy_host` | | proxy host (do not specify if no proxy) |\n| `tock_keycloak_proxy_port` | | optional proxy port |\n| `tock_custom_namespace_mapping` | `tock_namespace` | Attribute read in the token for the namespace |\n| `tock_keycloak_user_role_attribute` | `tock_roles` | Attribute read in the token for the roles |\n\nIt is necessary to indicate in callback url `https://[host admin]/rest/callback`.\n\nA basic configuration requires to define tock_keycloak_client_id and tock_keycloak_secret_key with the corresponding values ​​on Keycloak.\n\nIt is also necessary to pass the address of the keycloak Realm via tock_keycloak_site_url.\n\nIt is however not necessary to define tock_keycloak_access_token_path, tock_keycloak_authorize_path and tock_keycloak_userinfo_path since the default values ​​are suitable for Keycloak if the realm address is specified correctly.\n\nIf tock_custom_namespace_mapping is not set or the attribute is not found, the default \"app\" namespace is used.\n\n### 0Auth/GitHub Implementation\n\nThis rather simplistic implementation is used as an example, as well as for the public demo platform\n[https://demo.tock.ai](https://demo.tock.ai).\n\nIt consists of querying the GitHub API to verify the identity of a user from their token (`access_token`).\n\n> Note: no other data in the GitHub profile is accessed by Tock, apart from the identifier.\n\nIn this mode, enabled by the `tock_github_oauth_enabled` property, each user automatically receives all\n_Tock Studio_ roles and an organization (ie. namespace) with the same name as their identifier.\n\nHere are the properties and their default values:\n\n| Environment Variable                | Default Value  | Description                                       |\n|-------------------------------------|----------------|---------------------------------------------------|\n| `tock_github_oauth_enabled`         | `false`        | Enable OAuth/GitHub authentication.              |\n| `tock_github_oauth_client_id`       | `CLIENT_ID`    | Identifier to query the GitHub API.              |\n| `tock_github_oauth_secret_key`      | `SECRET_KEY`   | Password to query the GitHub API.                |\n| `tock_github_api_request_timeout_ms`| `5000`         | Identity verification timeout (GitHub API).      |\n\n> For more information on how this implementation works, see the class\n> [`GithubOAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/GithubOAuthProvider.kt).\n\n### SSO/CAS Implementation\n\nThis implementation is intended to serve as a bridge between an enterprise environment and Tock.\nIt is therefore partly specific to each enterprise, insofar as it is necessary to map\na user profile to Tock groups and roles.\n\nIt is composed of:\n\n- An implementation of the CAS authentication mechanism integrated into Tock \\( based on ['PAC4J'](https://www.pac4j.org/) \\)\n- Your externalized module which will inherit this implementation, with a (re)definition of roles/groups according to the\nuser profile\n\n> CAS authentication is enterprise specific and requires the development of a dedicated external module for tock\n>\n> CAS module example: ['samples/tock-sample-cas-auth-provider'](https://github.com/theopenconversationkit/tock/blob/master/samples/tock-sample-cas-auth-provider/)\n\nHere are the properties and their default values:\n\n| Environment variable | Default value | Description |\n| --------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `tock_cas_auth_enabled` | `false` | Enable PAC4J/CAS authentication. |\n| `tock_cas_auth_proxy_host` | `127.0.0.1` | Proxy host (do not specify if no proxy) |\n| `tock_cas_auth_proxy_port` | `3128` | Optional proxy port |\n| `tock_cas_join_same_namespace_per_user` | `true` | When creating the user, if the namespace already exists and other users are already present, the new user joins the same existing namespace |\n\n> For more information on how this implementation works, see the class\n> [`CASAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/CASAuthProvider.kt).\n\nAdditional note:\n\n> When authentication is of type SSO the Logout button is not available\n\n## Data\n\nSince users can transmit personal data to bots through their conversations, it is important\nto think about the nature of the data handled in _Tock Studio_ or stored by Tock, and\nto implement appropriate protection mechanisms (anonymization, encryption,\nretention period, role-based access restrictions, etc.).\n\n> See in particular the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) regulation.\n\n### Data encryption\n\n#### Database encryption\n\nIt is recommended to deploy your MongoDB databases in [encrypted_ mode](https://docs.mongodb.com/manual/tutorial/configure-encryption/).\n\n#### Application encryption\n\nTock can perform an application encryption (optional) of some fields in the database, independently of the\nencryption of the database itself.\n\nThis is the role of the environment variable `tock_encrypt_pass`, which allows to indicate a password\nto encrypt and decrypt these fields. By default in the `prod` environment, Tock encrypts all user data\ndeemed sensitive provided that `tock_encrypt_pass` is defined.\n\n> For more details, you can refer to the [source code](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/Encryptors.kt).\n\n> Note: defining `tock_encrypt_pass` is required to use the NLP entity anonymization functions in\n> the _Tock Studio_ interfaces.\n\n### Anonymization\n\nIt is often desirable that certain sentences be anonymized whether in the _logs_ (logging)\nor in the interface (_Tock Studio_). For example, contact details, loyalty card numbers, etc.\nshould not be read by _Tock Studio_ users or by platform administrators.\n\n#### By the framework\n\nTo anonymize this data, Tock provides in its framework a solution based on\n_regular expressions (RegExp)_ whose basic interface is [`StringObfuscator`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/StringObfuscator.kt).\n\n#### By the NLP model\n\nTock also allows to anonymize in _Tock Studio_ (_Inbox_ view in particular.) the values ​​of the entities\nrecognized by the NLP model.\n\nThis anonymization by entity type is configured in the _Language Understanding > Entities_ view. Only\nusers with an `admin` or `technicalAdmin` role in _Tock Studio_ can enable/disable this feature.\n\n> For more information, see [_Roles_](../../admin/security.md#roles).\n\nIn views where sentences are displayed anonymized (_Inbox_, _Search_ for example), an `admin` or\n`technicalAdmin` can decide to still display (for himself only) a non-anonymized sentence using the\n_Reveal the sentence_ (eye open) action.\n> Note: Setting `tock_encrypt_pass` is required to use NLP entity anonymization functions in\n> _Tock Studio_ interfaces.\n\n### Anonymization\n\nIt is often desirable that certain sentences be anonymized whether in the _logs_ (logging)\nor in the interface (_Tock Studio_). For example, contact details, loyalty card numbers, etc.\nshould not be read by either _Tock Studio_ users or platform administrators.\n\n#### By the framework\n\nTo anonymize this data, Tock provides in its framework a solution based on\n_regular expressions (RegExp)_ whose basic interface is [`StringObfuscator`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/StringObfuscator.kt).\n\n#### By the NLP model\n\nTock also allows to anonymize in _Tock Studio_ (_Inbox_ view in particular.) the values ​​of the entities\nrecognized by the NLP model.\n\nThis anonymization by entity types is configured in the _Language Understanding > Entities_ view. Only\nusers with an `admin` or `technicalAdmin` role in _Tock Studio_ can enable/disable this feature.\n\n> For more information, see [_Roles_](../../admin/security.md#roles).\n\nIn the views where the sentences are displayed anonymized (_Inbox_, _Search_ for example), an `admin` or\n`technicalAdmin` can decide to still display (for himself only) a non-anonymized sentence thanks to the\n_Reveal the sentence_ action (open eye).\n\n> Note: Setting `tock_encrypt_pass` is required to use NLP entity anonymization features in\n> _Tock Studio_ interfaces.\n\n### Storage & Retention\n\nTock automatically stores different types of data, ranging from non-sensitive information (Stories\nconfiguration and bot responses, intent structure, browsing statistics for all users, etc.) to more personal data (conversation details, user preferences, etc.).\n\nDepending on their nature and use in Tock (NLP, monitoring, debugging, etc.),\n\nthese data have specific, configurable retention periods. **Each Tock user decides and configures\nhow long the stored data is retained, based on their needs.**\n\nThe [_Installation > Data Retention_](../../admin/installation.md#data-retention) section describes the different\ntypes of data retained and how to modify their retention period.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:180426:5EB08A:6AB92ED8"},"text_sha256":"19ddf7d7649f93e0c6138caab9a7941381445f30b34a0c2808626101dba1b05e"},{"path":"docs/docs/fr/admin/security.md","size":19384,"blob_sha":"bfff988c593a201ac84cc513e8d9e89120dfd0d6","priority":1,"status":200,"text":"---\ntitle: Sécurité\n---\n\n# Sécurite\n\n## Utilisateurs *Tock Studio*\n\n### Authentification\n\nTock supporte plusieurs systèmes d'authentification pour l'interface d'administration.\nIl utilise les librairies [vert.x](https://vertx.io/docs/vertx-auth-common/java/) correspondantes.\n\nVoici les systèmes disponibles par défaut (tous implémentations de `TockAuthProvider`) :\n\n- Un modèle par \"propriétés\", utilisé par défaut.\n  Le code est disponible dans la classe [`PropertyBasedAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/PropertyBasedAuthProvider.kt)\n\n- Un modèle [_OAuth2_](https://oauth.net/2/) générique.\n\n- Un modèle [_OAuth2_](https://oauth.net/2/) adapté à [`Keycloak`](https://www.keycloak.org/).\n\n- Un modèle [_OAuth2_](https://oauth.net/2/) spécifique pour Github dont un exemple est donné par [`GithubOAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/GithubOAuthProvider.kt)\n\nIl est également possible d'intégrer une authentification CAS (SSO), dans le cas d'une installation de type entreprise.\nCe modèle nécessite d'hériter d'un modèle de base, mais permet de faire correspondre un profil utilisateur selon vos\npropres contraintes et spécificités.\n\nDes détails et exemples de configuration sont donnés plus bas dans cette page.\n\nSi ces modèles ne correspondent pas à votre besoin, il est relativement simple d'en développer d'autres\nen se basant sur les exemples ci-dessus. N'hésitez pas à contribuer au projet et à nous contacter pour toute question!\n\n### Roles\n\nTock permet d'affecter plusieurs _rôles_ ou niveaux d'habilitations aux utilisateurs dans les interfaces _Tock Studio_.\nEn fonction du système d'authentification utilisé (par propriétés, _0Auth_, etc.) chaque utilisateur se voit assigné\nun ou plusieurs de ces rôles, lui donnant différents accès dans l'application.\n\nLes rôles disponibles sont définis dans l'enum `TockUserRole`:\n\n| Rôle            | Description                                                                                                                  |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------|\n| `nlpUser`       | NLP platform user, allowed to qualify and search sentences.                                                                  |\n| ~~`faqNlpUser`~~ | ~~FAQ NLP platform user, allowed to qualify and search sentences.~~<br/> (Deprecated: Use the 'nlpUser' role instead)        |\n| ~~`faqBotUser`~~ | ~~A faq bot user is allowed to manage the FAQ content, and train the FAQ~~<br/> (Deprecated: Use the 'botUser' role instead) |\n| `botUser`       | Bot platform user, allowed to create and modify stories, rules and answers.                                                  |\n| `admin`         | Allowed to update applications and configurations/connectors, import/export intents, sentences, stories, etc..               |\n| `technicalAdmin` | Allowed to access encrypted data, import/export application dumps, etc.                                                      |\n\n\nLa manière de configurer quel utilisateur _Tock Studio_ a quel rôle dépend du mode d'authentification,\nautrement dit l'implémentation de `TockAuthProvider` utilisée.\n\n### Implementation par proprietes\n\nLa configuration par \"propriétés\" est utilisée par défaut. Elle ne dépend d'aucun système tiers\npour fonctionner.\n\nCe mode consiste a configurer utilisateurs et rôles par des propriétés ou variables d'environnement.\nSelon le mode de déploiement utilisé, ces variables peuvent être définies soit directement en ligne de commande,\nsoit dans un descripteur type `docker-compose.yml`, `dockerrun.aws.json` ou autre.\n\n> Si aucune variable n'est définie (par exemple dans les descripteurs fournis dans le dépôt\n> [`tock-docker`](https://github.com/theopenconversationkit/tock-docker)), des valeurs par défaut sont utilisées.\n\nVoici les propriétés et leurs valeurs par défaut :\n\n| Variable d'environnement | Valeur par défaut         | Description                                    |\n|--------------------------|---------------------------|------------------------------------------------|\n| `tock_users`             | `admin@app.com`           | Identifiants (séparés par des virgules).       |\n| `tock_passwords`         | `password`                | Mots de passe (séparés par des virgules).      |\n| `tock_organizations`     | `app`                     | Organisations (séparées par des virgules).     |\n| `tock_roles`             | Vide (i.e., tous les rôles)| Rôles séparés par des `|` (puis par des virgules). |\n\n\nPour définir l'identité et les rôles de plusieurs utilisateurs, on sépare les valeurs par des virgules.\n\n> **Attention :** chacune de ces propriétés doit posséder le même nombre de valeurs (et dans le même ordre) pour\n> permettre de corréler ces valeurs (index par index, pour chaque utilisateur).\n\nCi-dessous un exemple au format Docker-Compose :\n\n```yaml\n{ \"name\" : \"tock_users\", \"value\" : \"alice@tock.ai,bob@tock.ai\" },\n{ \"name\" : \"tock_passwords\", \"value\" : \"secret1,secret2\" },\n{ \"name\" : \"tock_organizations\", \"value\" : \"tock,tock\" },\n{ \"name\" : \"tock_roles\", \"value\" : \"botUser,nlpUser|botUser|admin|technicalAdmin\" },\n```\n\nDans cet exemple, Alice a le rôle `botUser`, alors que Bob a tous les rôles.\n\n> Pour en savoir plus sur le fonctionnement précis de cette implémentation, voir la classe\n> [`PropertyBasedAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/PropertyBasedAuthProvider.kt).\n\n### Implementation 0Auth2 generique\n\nCette implémentation générique est à utiliser dès que vous souhaitez paramétrer une configuration OAuth2.\n\nVoici les propriétés et leurs valeurs par défaut :\n\n| Variable d'environnement               | Exemple de valeur       | Description                                        | Exemple                     |\n|----------------------------------------|-------------------------|----------------------------------------------------|-----------------------------|\n| `tock_oauth2_enabled`                  | `true`                  | Activation de l'authentification OAuth2            |                             |\n| `tock_oauth2_client_id`                | `CLIENT_ID`             | Identifiant pour interroger l'API GitHub           |                             |\n| `tock_oauth2_secret_key`               | `SECRET_KEY`            | Mot de passe pour interroger l'API GitHub          |                             |\n| `tock_oauth2_site_url`                 | `https://provider`      | URL du provider OAuth2                             |                             |\n| `tock_oauth2_access_token_path`        | `/oauth2/token`         | Chemin relatif pour récupérer l'access token       |                             |\n| `tock_oauth2_authorize_path`           | `/oauth2/authorize`     | Chemin relatif pour récupérer l'authorize          |                             |\n| `tock_oauth2_userinfo_path`            | `/oauth2/userInfo`      | Chemin relatif pour récupérer les userinfo         |                             |\n| `tock_oauth2_proxy_host`               |                         | Hôte du proxy (ne pas indiquer si pas de proxy)    |                             |\n| `tock_oauth2_proxy_port`               |                         | Port optionnel du proxy                            |                             |\n| `tock_oauth2_user_role_attribute`      | `custom:roles`          | Attribut lu dans le token pour le mapping du rôle  |                             |\n| `tock_custom_roles_mapping`            |                         | Lien entre les profils OAuth et les rôles Tock     |                             |\n| `tock_custom_namespace_mapping`        |                         | Lien entre les profils OAuth et les namespaces Tock| `id1=sncf|id2=sncf`         |\n| `tock_bot_admin_rest_default_base_url` | `http://localhost:8080` | Redirection vers l'URL de Tock Studio si besoin    |                             |\n\n\n\nIl est nécessaire d'indiquer en callback url `https://[host admin]/rest/callback`.\n\n### Implementation 0Auth2 pour Keycloak\n\nCette implémentation OAuth2 Keycloak est à utiliser dès que vous souhaitez paramétrer une configuration OAuth2 avec Keycloak.\n\nVoici les propriétés et leurs valeurs proposées :\n\n> Attention, par défaut, aucun adapteur n'étant activé, il faut impérativement mettre la clé tock_keycloak_enabled correspondant à notre adaptateur à true.\n\n| Variable d'environnement            | Exemple de valeur                   | Description                                     |\n| ----------------------------------- | ----------------------------------- | ----------------------------------------------- |\n| `tock_keycloak_enabled`             | `true`                              | Activation de l'authentification 0Auth2         |\n| `tock_keycloak_client_id`           | `CLIENT_ID`                         | Client id crée sur Keycloak                     |\n| `tock_keycloak_secret_key`          | `SECRET_KEY`                        | Secret key générée par Keycloak                 |\n| `tock_keycloak_site_url`            | `https://keycloak/realms/myrealm`   | Url du Realm Keycloak                           |\n| `tock_keycloak_access_token_path`   | `/protocol/openid-connect/token`    | Chemin relatif pour récupérer l'access token    |\n| `tock_keycloak_authorize_path`      | `/protocol/openid-connect/auth`     | Chemin relatif pour l'authorize                 |\n| `tock_keycloak_userinfo_path`       | `/protocol/openid-connect/userinfo` | Chemin relatif pour les userinfo                |\n| `tock_keycloak_proxy_host`          |                                     | host du proxy (ne pas indiquer si pas de proxy) |\n| `tock_keycloak_proxy_port`          |                                     | port optionnel du proxy                         |\n| `tock_custom_namespace_mapping`     | `tock_namespace`                    | Attribut lu dans le token pour le namespace     |\n| `tock_keycloak_user_role_attribute` | `tock_roles`                        | Attribut lu dans le token pour les roles        |\n\nIl est nécessaire d'indiquer en callback url `https://[host admin]/rest/callback`.\n\nUne configuration basique nécessite de définir tock_keycloak_client_id et tock_keycloak_secret_key avec les valeurs correspondantes sur Keycloak.\n\nIl est également nécessaire de passer l'adresse du Realm keycloak via tock_keycloak_site_url.\n\nIl n'est en revanche alors pas nécessaire de définir tock_keycloak_access_token_path, tock_keycloak_authorize_path et tock_keycloak_userinfo_path puisque les valeurs par défaut conviennent pour Keycloak si l'on spécifie bien l'adresse du realm.\n\nSi tock_custom_namespace_mapping n'est pas défini ou si l'attribut n'est pas trouvé, le namespace \"app\" par défaut est utilisé.\n\n### Implementation 0Auth/GitHub\n\nCette implémentation assez simpliste est utilisée à titre d'exemple, ainsi que pour la plateforme publique de démo\n[https://demo.tock.ai](https://demo.tock.ai).\n\nElle consiste à interroger l'API GitHub pour vérifier l'identité d'un utilisateur à partir de son jeton (`access_token`).\n\n> Remarque : aucune autre donnée du profil GitHub n'est accédée par Tock, à part l'identifiant.\n\nDans ce mode, activé par la propriété `tock_github_oauth_enabled`, chaque utilisateur reçoit automatiquement tous\nles rôles _Tock Studio_ et une organisation (ie. namespace) du même nom que son identifiant.\n\nVoici les propriétés et leurs valeurs par défaut :\n\n| Variable d'environnement             | Valeur par défaut | Description                                      |\n| ------------------------------------ | ----------------- | ------------------------------------------------ |\n| `tock_github_oauth_enabled`          | `false`           | Activation de l'authentification 0Auth/GitHub.   |\n| `tock_github_oauth_client_id`        | `CLIENT_ID`       | Identifiant pour interroger l'API GitHub.        |\n| `tock_github_oauth_secret_key`       | `SECRET_KEY`      | Mot de passe pour interroger l'API GitHub.       |\n| `tock_github_api_request_timeout_ms` | `5000`            | Timeout vérification de l'identité (API GitHub). |\n\n> Pour en savoir plus sur le fonctionnement précis de cette implémentation, voir la classe\n> [`GithubOAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/GithubOAuthProvider.kt).\n\n### Implementation SSO/CAS\n\nCette implémentation a pour vocation de servir de pont entre un environnement entreprise et Tock.\nElle est donc en partie spécifique à chaque entreprise, dans la mesure ou il est nécessaire de faire correspondre\nun profil utilisateur vers des groupes et rôles Tock.\n\nElle est composée de :\n\n- Une implémentation du mécanisme d'authentification CAS intégrée à Tock \\( basée sur ['PAC4J'](https://www.pac4j.org/) \\)\n- Votre module externalisé qui va hériter de cette implémentation, avec une (re)définition des rôles/groupes selon le\n  profil utilisateur\n\n> L'authentification CAS est spécifique à l'entreprise, et nécessite un module dédié externe à développer pour Tock\n>\n> Example de module CAS: ['samples/tock-sample-cas-auth-provider'](https://github.com/theopenconversationkit/tock/blob/master/samples/tock-sample-cas-auth-provider/)\n\nVoici les propriétés et leurs valeurs par défaut :\n\n| Variable d'environnement                | Valeur par défaut | Description                                                                                                                                                                |\n| --------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `tock_cas_auth_enabled`                 | `false`           | Activation de l'authentification PAC4J/CAS.                                                                                                                                |\n| `tock_cas_auth_proxy_host`              | `127.0.0.1`       | Host du proxy (ne pas indiquer si pas de proxy)                                                                                                                            |\n| `tock_cas_auth_proxy_port`              | `3128`            | Port optionnel du proxy                                                                                                                                                    |\n| `tock_cas_join_same_namespace_per_user` | `true`            | Lors de la création de l'utilisateur, si le namespace existe déjà et que d'autres utilisateurs sont déjà présent, le nouvel utilisateur rejoint le même namespace existant |\n\n> Pour en savoir plus sur le fonctionnement précis de cette implémentation, voir la classe\n> [`CASAuthProvider`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/auth/CASAuthProvider.kt).\n\nNote complémentaire:\n\n> Lorsque l'authentification est de type SSO le bouton de Logout n'est pas disponible\n\n## Donnees\n\nLes utilisateurs pouvant transmettre aux bots des données personnelles à travers leurs conversations, il est important\nde réfléchir à la nature des données manipulées dans _Tock Studio_ ou stockées par Tock, et\nde mettre en oeuvre des mécanismes de protection appropriés (anonymisation, chiffrement,\ndurée de rétention, restrictions d'accès basées sur des rôles, etc.).\n\n> Voir en particulier la réglementation [RGPD](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation).\n\n### Chiffrement des donnees\n\n#### Chiffrement de la base\n\nIl est recommandé de déployer vos bases de données MongoDB en [mode _chiffré_](https://docs.mongodb.com/manual/tutorial/configure-encryption/).\n\n#### Chiffrement applicatif\n\nTock peut réaliser un chiffrement applicatif (facultatif) de certains champs en base de données, indépendamment du\nchiffrement de la base elle-même.\n\nC'est le rôle de la variable d'environnement `tock_encrypt_pass`, qui permet d'indiquer un mot de passe\npour chiffrer et déchiffrer ces champs. Par défaut en environnement `prod`, Tock chiffre toutes les données utilisateurs\njugées sensibles à condition que `tock_encrypt_pass` soit défini.\n\n> Pour plus de détails, vous pouvez vous réferrer au [code source](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/Encryptors.kt).\n\n> Remarque : définir `tock_encrypt_pass` est requis pour utiliser les fonctions d'anonymisation d'entités NLP dans\n> les interfaces _Tock Studio_.\n\n### Anonymisation\n\nIl est souvent souhaitable que certaines phrases soient anonymisées que ce soit dans les _logs_ (journalisation)\nou dans l'interface (_Tock Studio_). Par exemple, des coordonnées, numéros de cartes de fidélité, etc.\nne devraient être lus ni par les utilisateurs de _Tock Studio_ ni par les administrateurs de la plateforme.\n\n#### Par le framework\n\nPour anonymiser ces données, Tock met à disposition dans son framework une solution basée sur des\n_expressions régulières (RegExp)_ dont l'interface de base est [`StringObfuscator`](https://github.com/theopenconversationkit/tock/blob/master/shared/src/main/kotlin/security/StringObfuscator.kt).\n\n#### Par le modèle NLP\n\nTock permet également d'anonymiser dans _Tock Studio_ (vue _Inbox_ notamment.) les valeurs des entités\nreconnues par le modèle NLP.\n\nCette anonymisation par types d'entités se configure dans la vue _Language Understanding > Entities_. Seuls les\nutilisateurs ayant un rôle `admin` ou `technicalAdmin` dans _Tock Studio_ peuvent activer/désactiver cette fonctionnalité.\n\n> Pour en savoir plus, voir [_Rôles_](#roles).\n\nDans les vues où les phrases sont affichées anonymisées (_Inbox_, _Search_ par exemple), un `admin` ou\n`technicalAdmin` peut décider d'afficher quand même (pour lui-même uniquement) une phrase non anonymisée grâce à l'action\n_Reveal the sentence_ (oeil ouvert).\n\n> Remarque : définir `tock_encrypt_pass` est requis pour utiliser les fonctions d'anonymisation d'entités NLP dans\n> les interfaces _Tock Studio_.\n\n### Stockage & conservation\n\nTock stocke automatiquement différents types de données, allant d'informations peu sensibles (configuration de Stories\net réponses du bot, structure des intentions, statistiques de navigation tous utilisateurs confondus, etc.) à des données\nplus personnelles (détails des conversations, préférences utilisateurs, etc.).\n\nEn fonction de leur nature et leur utilisation dans le fonctionnement de Tock (NLP, supervision, debug...),\nces données ont des durées de rétention spécifiques, et configurables. **Chaque utilisateur de Tock décide et configure\ncombien de temps les données stockées sont conservées, en fonction de ses besoins.**\n\nLa section [_Installation > Conservation des données_](installation.md#conservation-des-donnees) décrit les différents\ntypes de données conservées et comment modifier leur durée de rétention.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"79BA:3B7E2:17326C:5DDFAB:6AB92EDD"},"text_sha256":"059133e256aac0b3ab74326e415fe3a0e91dc0103af6b8f2c96769f2b22586dc"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":1,"C6":0,"C7":1,"D1":1,"score":4,"D1_evidence":"sha=a47a114fc86b1cbc055d60865fca3132c6fce5a0; file=docs/docs/en/admin/security.md; text=> When authentication is of type SSO the Logout button is not available ## Data Since users can transmit personal data to bots through their conversations, it is important to think about the nature of the data handled in _Tock Studio_ or stored by Tock, and to implement appropriate protection mechanisms (anonymization, encryption,","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=a47a114fc86b1cbc055d60865fca3132c6fce5a0; file=docs/docs/en/admin/security.md; text=> When authentication is of type SSO the Logout button is not available ## Data Since users can transmit personal data to bots through their conversations, it is important to think about the nature of the data handled in _Tock Studio_ or stored by Tock, and to implement appropriate protection mechanisms (anonymization, encryption,","C2":"sha=a47a114fc86b1cbc055d60865fca3132c6fce5a0; file=docs/docs/en/admin/security.md; text=> When authentication is of type SSO the Logout button is not available ## Data Since users can transmit personal data to bots through their conversations, it is important to think about the nature of the data handled in _Tock Studio_ or stored by Tock, and to implement appropriate protection mechanisms (anonymization, encryption,","C5":"sha=a47a114fc86b1cbc055d60865fca3132c6fce5a0; file=docs/docs/en/admin/security.md; text=configuration and bot responses, intent structure, browsing statistics for all users, etc.) to more personal data (conversation details, user preferences, etc.). Depending on their nature and use in Tock (NLP, monitoring, debugging, etc.), these data have specific, configurable retention periods. Each Tock user decides and configures how long the stored data is retained, based on their needs.","C7":"sha=a47a114fc86b1cbc055d60865fca3132c6fce5a0; file=docs/docs/en/admin/security.md; text=Since users can transmit personal data to bots through their conversations, it is important to think about the nature of the data handled in _Tock Studio_ or stored by Tock, and to implement appropriate protection mechanisms (anonymization, encryption, retention period, role-based access restrictions, etc.). ### Data encryption"}}}}
{"repository":"samtecspg/articulate","input_row":{"repository":"samtecspg/articulate","url":"https://github.com/samtecspg/articulate","name":"articulate","owner":"samtecspg","description":"A platform for building conversational interfaces with intelligent agents (chatbots)","language":"JavaScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":592,"issues":1059,"created_at":"2017-10-25T17:32:59Z","updated_at":"2026-09-02T10:18:13Z","first_commit_at":"2017-09-19T18:41:51Z","last_commit_at":"2020-07-30T20:57:36Z","activity_months":34.329999999999998,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:33.903Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"samtecspg/articulate","visibility":"public","created_at":"2017-10-25T17:32:59Z","updated_at":"2026-09-02T10:18:13Z","private":false,"fork":false,"archived":false,"stargazers_count":592,"open_issues_count":142,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1333","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07ED:1C46F8:17EE733:1C190D6:6AB92EDD"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1332","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090A:2D7D17:17ABF40:1BD589D:6AB92EDE"},"commit":{"sha":"821bec0d13a69bf608e1616054447a79359bff2b","url":"https://github.com/samtecspg/articulate/commit/821bec0d13a69bf608e1616054447a79359bff2b","date":"2018-05-24T16:18:32Z","author_date":"2018-05-24T16:18:32Z","committer_date":"2018-05-24T16:18:32Z","tree_sha":"78bacf5a1c8e1a08298e4a106d511e46e1eec0ad","message_first_line":"Fixed size of help icon for extra training data"},"tree_request_status":200,"tree_rate":{"github_remaining":"1331","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0914:71E0C:1819F5F:1C440E5:6AB92EDE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1999,"blob_sha":"6eca58b3f2c63097cd0d4eac058afe9d1ace3819","priority":0}],"documents":[{"path":"README.md","size":1999,"blob_sha":"6eca58b3f2c63097cd0d4eac058afe9d1ace3819","priority":0,"status":200,"text":"![articulate logo](./docs/img/articulate-logo.png)\n\n## A platform for building conversational interfaces with intelligent agents\n\n[![Join the chat at https://gitter.im/samtecspg/articulate](https://badges.gitter.im/samtecspg/articulate.svg)](https://gitter.im/samtecspg/articulate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n![Articulate Interface](./docs/img/main-ilus.png)\n\n## Documentation\n\nhttps://samtecspg.github.io/articulate/\n\n## QUICK START\n\nMake sure you've got these programs installed:\n\n   * [Docker](https://docs.docker.com/engine/installation/) (If faced with any choices, get the Community Edition (\"CE\"))\n   * [`docker-compose`](https://docs.docker.com/compose/install/) (should be auto-installed as part of Docker on mac and windows)\n   \n> Running on Docker Machine or in the cloud, make sure to check out our [alternate installation](https://samtecspg.github.io/articulate/getting_started/cloud-installation) docs.\n\n> Docker for Windows and Docker for mac users, make sure you are [allocating at least 4Gb of RAM to Docker](https://docs.docker.com/docker-for-mac/#advanced).\n\n1. Download the current release zip (articulate-vX.X.X.zip): https://github.com/samtecspg/articulate/releases/latest\n\n2. Unzip and get a terminal or CMD in the release directory\n\n3. run `docker-compose up` (`sudo` might be needed)\n\n4. point your web browser at  http://localhost:3000 and enjoy Articulate\n\n## License\n```\nCopyright 2018 Samtec.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E2E6:2C474:182C8F:5ED8D4:6AB92EDE"},"text_sha256":"595f8863015c822a57f06fb763b43508a729769af1fa7ff4e7e7e9b284c01274"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1330","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0861:8656E:17F3EDF:1C1F051:6AB92EDF"},"commit":{"sha":"b7925c191f6e9065384d5e04796a4d3303f2ee9b","url":"https://github.com/samtecspg/articulate/commit/b7925c191f6e9065384d5e04796a4d3303f2ee9b","date":"2020-07-30T20:57:36Z","author_date":"2020-07-30T20:57:36Z","committer_date":"2020-07-30T20:57:36Z","tree_sha":"9f95ad4e6c4cabcf8e58eda13f4ecfbbc1f1e773","message_first_line":"Fix Typo (#1009)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1329","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0835:1B4E7A:17D5A57:1C00D8B:6AB92EE0"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2316,"blob_sha":"3ef4d800b329efa8f9bf3340cdf655c27a55769c","priority":0},{"path":"docs/reference/terms.md","size":2038,"blob_sha":"cce187e8b98e2a4d50dcfe5084d5ee1aa1642ab3","priority":1}],"documents":[{"path":"README.md","size":2316,"blob_sha":"3ef4d800b329efa8f9bf3340cdf655c27a55769c","priority":0,"status":200,"text":"![](./docs/img/articulate-logo.png)\n\n# Introducing Articulate\n## A platform for building conversational interfaces with intelligent agents\n\n[![Join the chat at https://gitter.im/samtecspg/articulate](https://badges.gitter.im/samtecspg/articulate.svg)](https://gitter.im/samtecspg/articulate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n![](https://img.shields.io/github/license/samtecspg/articulate.svg)\n![](https://img.shields.io/github/downloads/samtecspg/articulate/total.svg)\n![](https://img.shields.io/github/tag/samtecspg/articulate.svg)\n\nArticulate is a platform for building conversational interfaces with intelligent agents. It is built primarily on top of Rasa NLU, which internally uses Duckling, spaCy, and tensorFlow. It implements a custom dialogue management solution capable of deep complex dialog, but with a focus on simplicity in use.\n\nIf you're ready to get started then jump straight to [basic installation](./docs/getting-started/basic-installation.md)\n\n![](./docs/img/laptop-mockup.png)\n\n## The Team\n\n### Smart Platform Group\n\nSPG is a team of full stack developers, machine learning engineers, and UX designers working to solve the problem of Enterprise data at scale. We love Open Source and are pleased to be able to build open source projects along our journey.\n\n### Samtec, Inc.\n\nSamtec is our mothership. Nearly all members of the SPG team got started as engineers, developers, or business users inside of Samtec. Recognizing problems faced by Samtec, and likely by other enterprises of the same scale, SPG was created to address some of those needs. We are driven by our love for Samtec as a company and family to build products that improve the experiences and services of Samtec's customers.\n\n## License\n\nCopyright 2018 Samtec.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17AF0C:5E5B75:6AB92EDF"},"text_sha256":"62fcf7a8c22ffb578a2ef5f21e0bdc8d7f80f144f2ad19fb4c2fbe65897393fe"},{"path":"docs/reference/terms.md","size":2038,"blob_sha":"cce187e8b98e2a4d50dcfe5084d5ee1aa1642ab3","priority":1,"status":200,"text":"# Terms\n\nThe below terms are sorted alphabetically.\n\n## Action\nAn action is the steps Articulate takes to fulfill a users requests. Actions can call fill slots, call webhooks, and generate responses. In more traditional chatbot terms - Articulates actions could be considered *intents*.\n\n## Agent\nAn agent is the top level grouping in Articulate. It is synonymous with your chatbot. A single agent can contain multiple categories, actions, sayings, and keywords. Often times agents are given names like `Samson`, `Siri`, or `Alexa`. They can be single purposed or multi-purposed depending on the conversation requirements.\n\n## Category\nA category is a grouping under an agent. Categories are mostly organizational. In an enterprise categories might be similar to departments: engineering, sales, marketing, etc.  For smaller chatbots you may only have two categories: small talk and your primary. if you really don't want to you don't have to use categories. In that case just create a \"default\" category and put all your sayings there.\n\n## Fulfillment\nFulfillment is the process/steps used to satisfy (or fulfill) a users requests. If a user asks to order a pizza the process of identifying what type of pizza the user wants, making a system call (webhook) to enter the order into a system, and responding to the user would fulfill their request.\n\n## Keyword\nA keyword is a word or phrase often found inside of a sentence that is important for the fulfillment of an action. For example in order to order a pizza you would need to know what toppings to put on it. So Toppings is an example of a keyword. A keyword can have values (ham) and synonyms for those values (Canadian bacon).\n\n## Modifier\nModifiers are special sayings, directly attached to keywords. For example, yes and no are keywords, but the phrase \"sounds right\" could also have the same meaning as \"yes\". Modifiers are called such because they *modify* slot values. They can Add, remove, set, or unset slot values.\n\n## Webhook\n\n## Slot\n\n## Response\n\n## Intent\n\n## Entity\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BC58:3C4A0:17DB46:5E87EC:6AB92EE1"},"text_sha256":"5a3fb37da2dab9fc8049e140b418d8c3ddfacd2c3e709e5c42cf935e798b8f74"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"CAMeL-Lab/camel_tools","input_row":{"repository":"CAMeL-Lab/camel_tools","url":"https://github.com/CAMeL-Lab/camel_tools","name":"camel_tools","owner":"CAMeL-Lab","description":"A suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.","language":"Python","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":581,"issues":117,"created_at":"2017-10-05T09:19:46Z","updated_at":"2026-09-25T13:18:52Z","first_commit_at":"2017-10-05T09:18:13Z","last_commit_at":"2026-06-08T11:32:06Z","activity_months":104.08,"ai_ml_match_topics":"nlp","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:37.811Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"CAMeL-Lab/camel_tools","visibility":"public","created_at":"2017-10-05T09:19:46Z","updated_at":"2026-09-25T13:18:52Z","private":false,"fork":false,"archived":false,"stargazers_count":581,"open_issues_count":35,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1328","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0787:77994:1813F7F:1C3F3CF:6AB92EE1"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1327","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E2:725A9:18055F4:1C30EF5:6AB92EE2"},"commit":{"sha":"2d947d7149959f3b1c61de9cb612b8607354bd1c","url":"https://github.com/CAMeL-Lab/camel_tools/commit/2d947d7149959f3b1c61de9cb612b8607354bd1c","date":"2017-10-05T09:18:13Z","author_date":"2017-10-05T09:18:13Z","committer_date":"2017-10-05T09:18:13Z","tree_sha":"1099719fd6cf314cc6cafb57b0e8e56f642a7108","message_first_line":"First commit."},"tree_request_status":200,"tree_rate":{"github_remaining":"1326","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0818:280FBC:17E7CA0:1C11F1A:6AB92EE2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":536,"blob_sha":"20a77a4fcad68043495c3cdae01a647456a0cb03","priority":0}],"documents":[{"path":"README.md","size":536,"blob_sha":"20a77a4fcad68043495c3cdae01a647456a0cb03","priority":0,"status":200,"text":"# CAMeL Tools\n\n## Introduction\nA suite of morphological analysis and disamiguation tools for Arabic developed by the [CAMeL Lab](https://nyuad.nyu.edu/en/research/faculty-research/camel-lab.html) at [New York University Abu Dhabi](http://nyuad.nyu.edu/).\n\n\n## Installation\n\n### Dependencies\n\n### CAMeL Tools\n\n### Test Installation\n\n\n## Usage\n\n### CLI Tools\n\n#### Basic Usage\n\n#### Configuration\n\n### Python Library\n\n\n## Contribute\nIf you would like to contribute to CAMeL Tools, please read the\n[CONTRIBUTE.md](./CONTRIBUTING.md) file.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B524:3FD49:17AC3D:5E5953:6AB92EE2"},"text_sha256":"94e7f9854f9a9266f204f613e9ecdeffdade22b0d92ce48cb56f8f342b32f1cf"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1325","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086F:74181:17AD039:1BD85E7:6AB92EE3"},"commit":{"sha":"be79ca9fc493f0df795375a7255bafef246a802d","url":"https://github.com/CAMeL-Lab/camel_tools/commit/be79ca9fc493f0df795375a7255bafef246a802d","date":"2026-06-08T11:32:06Z","author_date":"2026-06-08T11:32:06Z","committer_date":"2026-06-08T11:32:06Z","tree_sha":"b42896d4149d6c8c9f40a2268f1ef60e1e34e5c4","message_first_line":"Disabled transformers warnings."},"tree_request_status":200,"tree_rate":{"github_remaining":"1324","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BD:77994:1814103:1C3F57E:6AB92EE3"},"tree_truncated":false,"document_candidates":[{"path":"README.rst","size":8325,"blob_sha":"69a2253e698f19f61dd6f3d2aed7761f4e57aa4c","priority":0}],"documents":[{"path":"README.rst","size":8325,"blob_sha":"69a2253e698f19f61dd6f3d2aed7761f4e57aa4c","priority":0,"status":200,"text":"CAMeL Tools\n===========\n\n\n.. image:: https://img.shields.io/pypi/v/camel-tools.svg\n   :target: https://pypi.org/project/camel-tools\n   :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/camel-tools.svg\n   :target: https://pypi.org/project/camel-tools\n   :alt: PyPI Python Version\n\n.. image:: https://readthedocs.org/projects/camel-tools/badge/?version=latest\n   :target: https://camel-tools.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/l/camel-tools.svg\n   :target: https://opensource.org/licenses/MIT\n   :alt: MIT License\n\n|\n\n.. image:: camel_tools_logo.png\n   :target: camel_tools_logo.png\n   :alt: CAMeL Tools Logo\n\n\nIntroduction\n------------\n\nCAMeL Tools is  suite of Arabic natural language processing tools developed by\nthe\n`CAMeL Lab <http://camel-lab.com>`_\nat `New York University Abu Dhabi <http://nyuad.nyu.edu/>`_.\n\n    **Please use** `GitHub Issues <https://github.com/CAMeL-Lab/camel_tools/issues>`_\n    **to report a bug or if you need help using CAMeL Tools.**\n\n\nInstallation\n------------\n\nYou will need Python 3.11 - 3.14 (64-bit) as well as\n`the Rust compiler <https://www.rust-lang.org/learn/get-started>`_ installed.\n\nLinux/macOS\n~~~~~~~~~~~\n\nYou will need to install some additional dependencies on Linux and macOS.\nPrimarily CMake, and Boost.\n\nOn Ubuntu/Debian you can install these dependencies by running:\n\n.. code-block:: bash\n\n   sudo apt-get install cmake libboost-all-dev\n\nOn macOS you can install them using Homewbrew by running:\n\n.. code-block:: bash\n\n   brew install cmake boost\n\n.. _linux-macos-install-pip:\n\nInstall using pip\n^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   pip install camel-tools\n\n   # or run the following if you already have camel_tools installed\n   pip install camel-tools --upgrade\n\nOn Apple silicon Macs you may have to run the following instead:\n\n.. code-block:: bash\n\n   CMAKE_OSX_ARCHITECTURES=arm64 pip install camel-tools\n\n   # or run the following if you already have camel_tools installed\n   CMAKE_OSX_ARCHITECTURES=arm64 pip install camel-tools --upgrade\n\n.. _linux-macos-install-source:\n\nInstall from source\n^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   # Clone the repo\n   git clone https://github.com/CAMeL-Lab/camel_tools.git\n   cd camel_tools\n\n   # Install from source\n   pip install .\n\n   # or run the following if you already have camel_tools installed\n   pip install --upgrade .\n\n.. _linux-macos-install-data:\n\nInstalling data\n^^^^^^^^^^^^^^^\n\nTo install the datasets required by CAMeL Tools components run one of the\nfollowing:\n\n.. code-block:: bash\n\n   # To install all datasets\n   camel_data -i all\n\n   # or just the datasets for morphology and MLE disambiguation only\n   camel_data -i light\n\n   # or just the default datasets for each component\n   camel_data -i defaults\n\nSee `Available Packages <https://camel-tools.readthedocs.io/en/latest/reference/packages.html>`_\nfor a list of all available datasets.\n\nBy default, data is stored in ``~/.camel_tools``.\nAlternatively, if you would like to install the data in a different location,\nyou need to set the :code:`CAMELTOOLS_DATA` environment variable to the desired\npath.\n\nAdd the following to your :code:`.bashrc`, :code:`.zshrc`, :code:`.profile`,\netc:\n\n.. code-block:: bash\n\n   export CAMELTOOLS_DATA=/path/to/camel_tools_data\n\nWindows\n~~~~~~~\n\n**Note:** CAMeL Tools has been tested on Windows 10. The Dialect Identification\ncomponent is not available on Windows at this time.\n\n.. _windows-install-pip:\n\nInstall using pip\n^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   pip install camel-tools -f https://download.pytorch.org/whl/torch_stable.html\n\n   # or run the following if you already have camel_tools installed\n   pip install --upgrade -f https://download.pytorch.org/whl/torch_stable.html camel-tools\n\n.. _windows-install-source:\n\nInstall from source\n^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   # Clone the repo\n   git clone https://github.com/CAMeL-Lab/camel_tools.git\n   cd camel_tools\n\n   # Install from source\n   pip install -f https://download.pytorch.org/whl/torch_stable.html .\n   pip install --upgrade -f https://download.pytorch.org/whl/torch_stable.html .\n\n.. _windows-install-data:\n\nInstalling data\n^^^^^^^^^^^^^^^\n\nTo install the data packages required by CAMeL Tools components, run one of the\nfollowing commands:\n\n.. code-block:: bash\n\n   # To install all datasets\n   camel_data -i all\n\n   # or just the datasets for morphology and MLE disambiguation only\n   camel_data -i light\n\n   # or just the default datasets for each component\n   camel_data -i defaults\n\nSee `Available Packages <https://camel-tools.readthedocs.io/en/latest/reference/packages.html>`_\nfor a list of all available datasets.\n\nBy default, data is stored in\n``C:\\Users\\your_user_name\\AppData\\Roaming\\camel_tools``.\nAlternatively, if you would like to install the data in a different location,\nyou need to set the ``CAMELTOOLS_DATA`` environment variable to the desired\npath. Below are the instructions to do so (on Windows 10):\n\n* Press the **Windows** button and type ``env``.\n* Click on **Edit the system environment variables (Control panel)**.\n* Click on the **Environment Variables...** button.\n* Click on the **New...** button under the **User variables** panel.\n* Type ``CAMELTOOLS_DATA`` in the **Variable name** input box and the\n  desired data path in **Variable value**. Alternatively, you can browse for the\n  data directory by clicking on the **Browse Directory...** button.\n* Click **OK** on all the opened windows.\n\n\nDocumentation\n-------------\n\nTo get started, you can follow along\n`the Guided Tour <https://colab.research.google.com/drive/1Y3qCbD6Gw1KEw-lixQx1rI6WlyWnrnDS?usp=sharing>`_\nfor a quick overview of the components provided by CAMeL Tools.\n\nYou can find the\n`full online documentation here <https://camel-tools.readthedocs.io/en/stable/>`_ for both\nthe command-line tools and the Python API.\n\nAlternatively, you can build your own local copy of the documentation as\nfollows:\n\n.. code-block:: bash\n\n   # Install dependencies\n   pip install sphinx myst-parser sphinx-rtd-theme\n\n   # Go to docs subdirectory\n   cd docs\n\n   # Build HTML docs\n   make html\n\nThis should compile all the HTML documentation in to ``docs/build/html``.\n\n\nCitation\n--------\n\nIf you find CAMeL Tools useful in your research, please cite\n`our paper <https://www.aclweb.org/anthology/2020.lrec-1.868/>`_:\n\n.. code-block:: bibtex\n\n   @inproceedings{obeid-etal-2020-camel,\n      title = \"{CAM}e{L} Tools: An Open Source Python Toolkit for {A}rabic Natural Language Processing\",\n      author = \"Obeid, Ossama  and\n         Zalmout, Nasser  and\n         Khalifa, Salam  and\n         Taji, Dima  and\n         Oudah, Mai  and\n         Alhafni, Bashar  and\n         Inoue, Go  and\n         Eryani, Fadhl  and\n         Erdmann, Alexander  and\n         Habash, Nizar\",\n      booktitle = \"Proceedings of the 12th Language Resources and Evaluation Conference\",\n      month = may,\n      year = \"2020\",\n      address = \"Marseille, France\",\n      publisher = \"European Language Resources Association\",\n      url = \"https://www.aclweb.org/anthology/2020.lrec-1.868\",\n      pages = \"7022--7032\",\n      abstract = \"We present CAMeL Tools, a collection of open-source tools for Arabic natural language processing in Python. CAMeL Tools currently provides utilities for pre-processing, morphological modeling, Dialect Identification, Named Entity Recognition and Sentiment Analysis. In this paper, we describe the design of CAMeL Tools and the functionalities it provides.\",\n      language = \"English\",\n      ISBN = \"979-10-95546-34-4\",\n   }\n\n\nLicense\n-------\n\nCAMeL Tools is available under the MIT license.\nSee the `LICENSE file\n<https://github.com/CAMeL-Lab/camel_tools/blob/master/LICENSE>`_\nfor more info.\n\n\nContribute\n----------\n\nIf you would like to contribute to CAMeL Tools, please read the\n`CONTRIBUTE.rst\n<https://github.com/CAMeL-Lab/camel_tools/blob/master/CONTRIBUTING.rst>`_\nfile.\n\n\nContributors\n------------\n\n* `Ossama Obeid <https://github.com/owo>`_\n* `Go Inoue <https://github.com/go-inoue>`_\n* `Bashar Alhafni <https://github.com/balhafni>`_\n* `Salam Khalifa <https://github.com/slkh>`_\n* `Dima Taji <https://github.com/dima-taji>`_\n* `Nasser Zalmout <https://github.com/nzal>`_\n* `Nizar Habash <https://github.com/nizarhabash1>`_\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2958:3E1C8:18126E:5EBE30:6AB92EE2"},"text_sha256":"cefaeabf6dcddb0963dce5d231c2f935473b1eb2184308f01b637705f632e306"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"gitleaks/gitleaks","input_row":{"repository":"gitleaks/gitleaks","url":"https://github.com/gitleaks/gitleaks","name":"gitleaks","owner":"gitleaks","description":"Find secrets with Gitleaks 🔑","language":"Go","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":29512,"issues":986,"created_at":"2018-01-27T18:19:31Z","updated_at":"2026-09-27T13:50:00Z","first_commit_at":"2018-01-27T18:20:41Z","last_commit_at":"2026-07-22T16:50:33Z","activity_months":101.77,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:40.517Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"gitleaks/gitleaks","visibility":"public","created_at":"2018-01-27T18:19:31Z","updated_at":"2026-09-27T14:26:46Z","private":false,"fork":false,"archived":false,"stargazers_count":29513,"open_issues_count":484,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1323","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B5:62B94:17E9380:1C146FD:6AB92EE4"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1322","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07E7:73962:17FF9AF:1C2A7E5:6AB92EE4"},"commit":{"sha":"91eb014f17d59c44311054f2e4403ad1b1c4e874","url":"https://github.com/gitleaks/gitleaks/commit/91eb014f17d59c44311054f2e4403ad1b1c4e874","date":"2018-05-16T19:11:23Z","author_date":"2018-05-16T19:11:23Z","committer_date":"2018-05-16T19:11:23Z","tree_sha":"e18b3f93110a692b3735c8cc348b17f98e4e7120","message_first_line":"add gitleaks-ci"},"tree_request_status":200,"tree_rate":{"github_remaining":"1321","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0876:6C9BF:182BC57:1C572F8:6AB92EE5"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4138,"blob_sha":"e698feea3591d0fc975bbfb3943b2585e4edd6ec","priority":0}],"documents":[{"path":"README.md","size":4138,"blob_sha":"e698feea3591d0fc975bbfb3943b2585e4edd6ec","priority":0,"status":200,"text":"<p align=\"center\">\n  <img alt=\"gitleaks\" src=\"https://raw.githubusercontent.com/zricethezav/gifs/master/gitleaks4.png\" height=\"140\" />\n  <p align=\"center\">\n      <a href=\"https://travis-ci.org/zricethezav/gitleaks\"><img alt=\"Travis\" src=\"https://img.shields.io/travis/zricethezav/gitleaks/master.svg?style=flat-square\"><\/a>\n  <\/p>\n<\/p>\n\n## Audit git repos for secrets and keys\n\n#### Installing\n\n```bash\ngo get -u github.com/zricethezav/gitleaks\n```\nOr download from release binaries [here](https://github.com/zricethezav/gitleaks/releases)\n\n#### Usage and Explanation\n\n![Alt Text](https://github.com/zricethezav/gifs/blob/master/gitleaks.gif)\n\n```bash\n./gitleaks [options] <url/path>\n```\n\nGitleaks audits local and remote repos by running regex checks against all commits.\n\n#### Options\n```\nusage: gitleaks [options] <URL>/<path_to_repo>\n\nOptions:\n -u --user              Git user mode\n -r --repo              Git repo mode\n -o --org               Git organization mode\n -l --local             Local mode, gitleaks will look for local repo in <path>\n -t --temp              Clone to temporary directory\n -v --verbose           Verbose mode, will output leaks as gitleaks finds them\n --report-path=<STR>    Save report to path, gitleaks default behavior is to save report to pwd\n --clone-path=<STR>     Gitleaks will clone repos here, default pwd\n --concurrency=<INT>    Upper bound on concurrent diffs\n --regex-file=<STR>     Path to regex file for external regex matching\n --since=<STR>          Commit to stop at\n --b64Entropy=<INT>     Base64 entropy cutoff (default is 70)\n --hexEntropy=<INT>     Hex entropy cutoff (default is 40)\n -e --entropy           Enable entropy\n -h --help              Display this message\n --token=<STR>          Github API token\n --stopwords            Enables stopwords\n```\n\n#### Exit Codes \ncode | explanation\n -------------|-------------\n0 | Gitleaks succeeded with no leaks\n1 | Gitleaks failed or wasn't attempted due to execution failure\n2 | Gitleaks succeeded and leaks were present during the audit\n\nUse these codes to hook gitleaks into whatever pipeline you're running\n\n#### Examples\n```bash\ngitleaks\n```\nRun audit on current working directory if `.git` is present \n\n```bash\ngitleaks --local $HOME/audits/some/repo\n```\nRun audit on repo located in `HOME/audits/some/repo` if `.git` is present \n\n```bash\ngitleaks https://github.com/some/repo\n```\nRun audit on `github.com/some/repo.git` and clone repo to \n\n```bash\ngitleaks --clone-path=$HOME/Desktop/audits https://github.com/some/repo\n```\nRun audit on `github.com/some/repo.git` and clone repo to $HOME/Desktop/audits \n\n```bash\ngitleaks --temp https://github.com/some/repo\n```\nRun audit on `github.com/some/repo.git` and clone repo to $TMPDIR (this will remove repos after audit is complete)\n\n```bash\ngitleaks --temp -u https://github.com/some-user\n```\nRun audit on all of `some-user`'s repos. Again, `--temp` flag will clone all repos into $TMPDIR after be removed after audit \n\n```bash\ngitleaks --regex-file=myregex.txt\n```\nRun audit on current working directory if `.git` is present and check for additional external regexes defined in `myregex.txt`. myregex.txt is just a text file containing a regular experession per line.\nSample external `regex-file`: \n\n```\n[a-z0-9_-]{3,16}\n[a-z]{3,16}\n```\n\n\n\n\n### If you find a valid leak in a repo\nPlease read the [Github article on removing sensitive data from a repository](https://help.github.com/articles/removing-sensitive-data-from-a-repository/) to remove the sensitive information from your history.\n\n### Run me with docker\n\nSimply run `docker run --rm --name=gitleaks zricethezav/gitleaks https://github.com/zricethezav/gitleaks`\n\nOr build the image yourself to get the latest version :\n\n```\ndocker build -t gitleaks .\ndocker run --rm --name=gitleaks gitleaks https://github.com/zricethezav/gitleaks\n```\n\n##### Consider using Gitleaks-CI\n[Gitleaks-CI](https://github.com/zricethezav/gitleaks-ci) is 50 lines of bash code that checks your PRs for secrets you probably shouldn't be commiting\n\n##### Support\nBTC: 397zNMQnSUzGaqYw8XVa9YjNPiRpSZWkhX\n\nETH: 0x07eFa8c73235e18C9D7E7A1679751Aa9363CD99B\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"86B6:326565:17CEC6:5E7C7E:6AB92EE5"},"text_sha256":"4c7107cae074195f22c06bf500a09143e47ad492f6fbb112b66b41e4ac131d36"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1320","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A4:37D6E2:18371F2:1C6298C:6AB92EE6"},"commit":{"sha":"652f743b4347b6ae48da6f87c54a047718206a0f","url":"https://github.com/gitleaks/gitleaks/commit/652f743b4347b6ae48da6f87c54a047718206a0f","date":"2026-06-24T04:11:57Z","author_date":"2026-06-24T04:11:57Z","committer_date":"2026-06-24T04:11:57Z","tree_sha":"64db685179ef9b480160fe691461f18b35a819e6","message_first_line":"build(deps): bump the actions group with 2 updates"},"tree_request_status":200,"tree_rate":{"github_remaining":"1319","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A5:35D5A8:17FBC2A:1C272A9:6AB92EE6"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":29328,"blob_sha":"6bdd5d960fd9f81a5221819509c4e9f5cb7d251e","priority":0},{"path":"SECURITY.md","size":735,"blob_sha":"1750c8d4fa84344f4093f0aa225efd65bdb1c4e6","priority":1}],"documents":[{"path":"README.md","size":29328,"blob_sha":"6bdd5d960fd9f81a5221819509c4e9f5cb7d251e","priority":0,"status":200,"text":"# Gitleaks\n\n```\n┌─○───┐\n│ │╲  │\n│ │ ○ │\n│ ○ ░ │\n└─░───┘\n```\n\n> [!WARNING]\n> Gitleaks is feature complete. I'm not merging new features into Gitleaks. Future releases will be security patches only. I'm shifting my focus to [Betterleaks](https://github.com/betterleaks/betterleaks)\n\n[license]: ./LICENSE\n[badge-license]: https://img.shields.io/github/license/gitleaks/gitleaks.svg\n[go-docs-badge]: https://pkg.go.dev/badge/github.com/gitleaks/gitleaks/v8?status\n[go-docs]: https://pkg.go.dev/github.com/zricethezav/gitleaks/v8\n[badge-build]: https://github.com/gitleaks/gitleaks/actions/workflows/test.yml/badge.svg\n[build]: https://github.com/gitleaks/gitleaks/actions/workflows/test.yml\n[go-report-card-badge]: https://goreportcard.com/badge/github.com/gitleaks/gitleaks/v8\n[go-report-card]: https://goreportcard.com/report/github.com/gitleaks/gitleaks/v8\n[dockerhub]: https://hub.docker.com/r/zricethezav/gitleaks\n[dockerhub-badge]: https://img.shields.io/docker/pulls/zricethezav/gitleaks.svg\n[gitleaks-action]: https://github.com/gitleaks/gitleaks-action\n[gitleaks-badge]: https://img.shields.io/badge/protected%20by-gitleaks-blue\n\n\n[![GitHub Action Test][badge-build]][build]\n[![Docker Hub][dockerhub-badge]][dockerhub]\n[![Gitleaks Action][gitleaks-badge]][gitleaks-action]\n[![GoDoc][go-docs-badge]][go-docs]\n[![GoReportCard][go-report-card-badge]][go-report-card]\n[![License][badge-license]][license]\n\nGitleaks is a tool for **detecting** secrets like passwords, API keys, and tokens in git repos, files, and whatever else you wanna throw at it via `stdin`. If you wanna learn more about how the detection engine works check out this blog: [Regex is (almost) all you need](https://lookingatcomputer.substack.com/p/regex-is-almost-all-you-need).\n\n```\n➜  ~/code(master) gitleaks git -v\n\n    ○\n    │╲\n    │ ○\n    ○ ░\n    ░    gitleaks\n\n\nFinding:     \"export BUNDLE_ENTERPRISE__CONTRIBSYS__COM=cafebabe:deadbeef\",\nSecret:      cafebabe:deadbeef\nRuleID:      sidekiq-secret\nEntropy:     2.609850\nFile:        cmd/generate/config/rules/sidekiq.go\nLine:        23\nCommit:      cd5226711335c68be1e720b318b7bc3135a30eb2\nAuthor:      John\nEmail:       john@users.noreply.github.com\nDate:        2022-08-03T12:31:40Z\nFingerprint: cd5226711335c68be1e720b318b7bc3135a30eb2:cmd/generate/config/rules/sidekiq.go:sidekiq-secret:23\n```\n\n\n## Getting Started\n\nGitleaks can be installed using Homebrew, Docker, or Go. Gitleaks is also available in binary form for many popular platforms and OS types on the [releases page](https://github.com/gitleaks/gitleaks/releases). In addition, Gitleaks can be implemented as a pre-commit hook directly in your repo or as a GitHub action using [Gitleaks-Action](https://github.com/gitleaks/gitleaks-action).\n\n### Installing\n\n```bash\n# MacOS\nbrew install gitleaks\n\n# Docker (DockerHub)\ndocker pull zricethezav/gitleaks:latest\ndocker run -v ${path_to_host_folder_to_scan}:/path zricethezav/gitleaks:latest [COMMAND] [OPTIONS] [SOURCE_PATH]\n\n# Docker (ghcr.io)\ndocker pull ghcr.io/gitleaks/gitleaks:latest\ndocker run -v ${path_to_host_folder_to_scan}:/path ghcr.io/gitleaks/gitleaks:latest [COMMAND] [OPTIONS] [SOURCE_PATH]\n\n# From Source (make sure `go` is installed)\ngit clone https://github.com/gitleaks/gitleaks.git\ncd gitleaks\nmake build\n```\n\n### Pre-Commit\n\n1. Install pre-commit from https://pre-commit.com/#install\n2. Create a `.pre-commit-config.yaml` file at the root of your repository with the following content:\n\n   ```\n   repos:\n     - repo: https://github.com/gitleaks/gitleaks\n       rev: v8.24.2\n       hooks:\n         - id: gitleaks\n   ```\n\n   for a [native execution of gitleaks](https://github.com/gitleaks/gitleaks/releases) or use the [`gitleaks-docker` pre-commit ID](https://github.com/gitleaks/gitleaks/blob/master/.pre-commit-hooks.yaml) for executing gitleaks using the [official Docker images](#docker)\n\n3. Auto-update the config to the latest repos' versions by executing `pre-commit autoupdate`\n4. Install with `pre-commit install`\n5. Now you're all set!\n\n```\n➜ git commit -m \"this commit contains a secret\"\nDetect hardcoded secrets.................................................Failed\n```\n\nNote: to disable the gitleaks pre-commit hook you can prepend `SKIP=gitleaks` to the commit command\nand it will skip running gitleaks\n\n```\n➜ SKIP=gitleaks git commit -m \"skip gitleaks check\"\nDetect hardcoded secrets................................................Skipped\n```\n\n## Usage\n\n```\nGitleaks scans code, past or present, for secrets\n\nUsage:\n  gitleaks [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  dir         scan directories or files for secrets\n  git         scan git repositories for secrets\n  help        Help about any command\n  stdin       detect secrets from stdin\n  version     display gitleaks version\n\nFlags:\n  -b, --baseline-path string          path to baseline with issues that can be ignored\n  -c, --config string                 config file path\n                                      order of precedence:\n                                      1. --config/-c\n                                      2. env var GITLEAKS_CONFIG\n                                      3. env var GITLEAKS_CONFIG_TOML with the file content\n                                      4. (target path)/.gitleaks.toml\n                                      If none of the four options are used, then gitleaks will use the default config\n      --diagnostics string            enable diagnostics (http OR comma-separated list: cpu,mem,trace). cpu=CPU prof, mem=memory prof, trace=exec tracing, http=serve via net/http/pprof\n      --diagnostics-dir string        directory to store diagnostics output files when not using http mode (defaults to current directory)\n      --enable-rule strings           only enable specific rules by id\n      --exit-code int                 exit code when leaks have been encountered (default 1)\n  -i, --gitleaks-ignore-path string   path to .gitleaksignore file or folder containing one (default \".\")\n  -h, --help                          help for gitleaks\n      --ignore-gitleaks-allow         ignore gitleaks:allow comments\n  -l, --log-level string              log level (trace, debug, info, warn, error, fatal) (default \"info\")\n      --max-archive-depth int         allow scanning into nested archives up to this depth (default \"0\", no archive traversal is done)\n      --max-decode-depth int          allow recursive decoding up to this depth (default \"0\", no decoding is done)\n      --max-target-megabytes int      files larger than this will be skipped\n      --no-banner                     suppress banner\n      --no-color                      turn off color for verbose output\n      --redact uint[=100]             redact secrets from logs and stdout. To redact only parts of the secret just apply a percent value from 0..100. For example --redact=20 (default 100%)\n  -f, --report-format string          output format (json, csv, junit, sarif, template)\n  -r, --report-path string            report file\n      --report-template string        template file used to generate the report (implies --report-format=template)\n      --timeout int                   set a timeout for gitleaks commands in seconds (default \"0\", no timeout is set)\n  -v, --verbose                       show verbose output from scan\n      --version                       version for gitleaks\n\nUse \"gitleaks [command] --help\" for more information about a command.\n```\n\n### Commands\n\n⚠️ v8.19.0 introduced a change that deprecated `detect` and `protect`. Those commands are still available but\nare hidden in the `--help` menu. Take a look at this [gist](https://gist.github.com/zricethezav/b325bb93ebf41b9c0b0507acf12810d2) for easy command translations.\nIf you find v8.19.0 broke an existing command (`detect`/`protect`), please open an issue.\n\nThere are three scanning modes: `git`, `dir`, and `stdin`.\n\n#### Git\n\nThe `git` command lets you scan local git repos. Under the hood, gitleaks uses the `git log -p` command to scan patches.\nYou can configure the behavior of `git log -p` with the `log-opts` option.\nFor example, if you wanted to run gitleaks on a range of commits you could use the following\ncommand: `gitleaks git -v --log-opts=\"--all commitA..commitB\" path_to_repo`. See the [git log](https://git-scm.com/docs/git-log) documentation for more information.\nIf there is no target specified as a positional argument, then gitleaks will attempt to scan the current working directory as a git repo.\n\n#### Dir\n\nThe `dir` (aliases include `files`, `directory`) command lets you scan directories and files. Example: `gitleaks dir -v path_to_directory_or_file`.\nIf there is no target specified as a positional argument, then gitleaks will scan the current working directory.\n\n#### Stdin\n\nYou can also stream data to gitleaks with the `stdin` command. Example: `cat some_file | gitleaks -v stdin`\n\n### Creating a baseline\n\nWhen scanning large repositories or repositories with a long history, it can be convenient to use a baseline. When using a baseline,\ngitleaks will ignore any old findings that are present in the baseline. A baseline can be any gitleaks report. To create a gitleaks report, run gitleaks with the `--report-path` parameter.\n\n```\ngitleaks git --report-path gitleaks-report.json # This will save the report in a file called gitleaks-report.json\n```\n\nOnce as baseline is created it can be applied when running the detect command again:\n\n```\ngitleaks git --baseline-path gitleaks-report.json --report-path findings.json\n```\n\nAfter running the detect command with the --baseline-path parameter, report output (findings.json) will only contain new issues.\n\n## Pre-Commit hook\n\nYou can run Gitleaks as a pre-commit hook by copying the example `pre-commit.py` script into\nyour `.git/hooks/` directory.\n\n## Load Configuration\n\nThe order of precedence is:\n\n1. `--config/-c` option:\n      ```bash\n      gitleaks git --config /home/dev/customgitleaks.toml .\n      ```\n2. Environment variable `GITLEAKS_CONFIG` with the file path:\n      ```bash\n      export GITLEAKS_CONFIG=\"/home/dev/customgitleaks.toml\"\n      gitleaks git .\n      ```\n3. Environment variable `GITLEAKS_CONFIG_TOML` with the file content:\n      ```bash\n      export GITLEAKS_CONFIG_TOML=`cat customgitleaks.toml`\n      gitleaks git .\n      ```\n4. A `.gitleaks.toml` file within the target path:\n      ```bash\n      gitleaks git .\n      ```\n\nIf none of the four options are used, then gitleaks will use the default config.\n\n## Configuration\n\nGitleaks offers a configuration format you can follow to write your own secret detection rules:\n\n```toml\n# Title for the gitleaks configuration file.\ntitle = \"Custom Gitleaks configuration\"\n\n# You have basically two options for your custom configuration:\n#\n# 1. define your own configuration, default rules do not apply\n#\n#    use e.g., the default configuration as starting point:\n#    https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml\n#\n# 2. extend a configuration, the rules are overwritten or extended\n#\n#    When you extend a configuration the extended rules take precedence over the\n#    default rules. I.e., if there are duplicate rules in both the extended\n#    configuration and the default configuration the extended rules or\n#    attributes of them will override the default rules.\n#    Another thing to know with extending configurations is you can chain\n#    together multiple configuration files to a depth of 2. Allowlist arrays are\n#    appended and can contain duplicates.\n\n# useDefault and path can NOT be used at the same time. Choose one.\n[extend]\n# useDefault will extend the default gitleaks config built in to the binary\n# the latest version is located at:\n# https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml\nuseDefault = true\n# or you can provide a path to a configuration to extend from.\n# The path is relative to where gitleaks was invoked,\n# not the location of the base config.\n# path = \"common_config.toml\"\n# If there are any rules you don't want to inherit, they can be specified here.\ndisabledRules = [ \"generic-api-key\"]\n\n# An array of tables that contain information that define instructions\n# on how to detect secrets\n[[rules]]\n# Unique identifier for this rule\nid = \"awesome-rule-1\"\n\n# Short human-readable description of the rule.\ndescription = \"awesome rule 1\"\n\n# Golang regular expression used to detect secrets. Note Golang's regex engine\n# does not support lookaheads.\nregex = '''one-go-style-regex-for-this-rule'''\n\n# Int used to extract secret from regex match and used as the group that will have\n# its entropy checked if `entropy` is set.\nsecretGroup = 3\n\n# Float representing the minimum shannon entropy a regex group must have to be considered a secret.\nentropy = 3.5\n\n# Golang regular expression used to match paths. This can be used as a standalone rule or it can be used\n# in conjunction with a valid `regex` entry.\npath = '''a-file-path-regex'''\n\n# Keywords are used for pre-regex check filtering. Rules that contain\n# keywords will perform a quick string compare check to make sure the\n# keyword(s) are in the content being scanned. Ideally these values should\n# either be part of the identiifer or unique strings specific to the rule's regex\n# (introduced in v8.6.0)\nkeywords = [\n  \"auth\",\n  \"password\",\n  \"token\",\n]\n\n# Array of strings used for metadata and reporting purposes.\ntags = [\"tag\",\"another tag\"]\n\n    # ⚠️ In v8.21.0 `[rules.allowlist]` was replaced with `[[rules.allowlists]]`.\n    # This change was backwards-compatible: instances of `[rules.allowlist]` still  work.\n    #\n    # You can define multiple allowlists for a rule to reduce false positives.\n    # A finding will be ignored if _ANY_ `[[rules.allowlists]]` matches.\n    [[rules.allowlists]]\n    description = \"ignore commit A\"\n    # When multiple criteria are defined the default condition is \"OR\".\n    # e.g., this can match on |commits| OR |paths| OR |stopwords|.\n    condition = \"OR\"\n    commits = [ \"commit-A\", \"commit-B\"]\n    paths = [\n      '''go\\.mod''',\n      '''go\\.sum'''\n    ]\n    # note: stopwords targets the extracted secret, not the entire regex match\n    # like 'regexes' does. (stopwords introduced in 8.8.0)\n    stopwords = [\n      '''client''',\n      '''endpoint''',\n    ]\n\n    [[rules.allowlists]]\n    # The \"AND\" condition can be used to make sure all criteria match.\n    # e.g., this matches if |regexes| AND |paths| are satisfied.\n    condition = \"AND\"\n    # note: |regexes| defaults to check the _Secret_ in the finding.\n    # Acceptable values for |regexTarget| are \"secret\" (default), \"match\", and \"line\".\n    regexTarget = \"match\"\n    regexes = [ '''(?i)parseur[il]''' ]\n    paths = [ '''package-lock\\.json''' ]\n\n# You can extend a particular rule from the default config. e.g., gitlab-pat\n# if you have defined a custom token prefix on your GitLab instance\n[[rules]]\nid = \"gitlab-pat\"\n# all the other attributes from the default rule are inherited\n\n    [[rules.allowlists]]\n    regexTarget = \"line\"\n    regexes = [ '''MY-glpat-''' ]\n\n\n# ⚠️ In v8.25.0 `[allowlist]` was replaced with `[[allowlists]]`.\n#\n# Global allowlists have a higher order of precedence than rule-specific allowlists.\n# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no\n# secrets will be detected for said commit. The same logic applies for regexes and paths.\n[[allowlists]]\ndescription = \"global allow list\"\ncommits = [ \"commit-A\", \"commit-B\", \"commit-C\"]\npaths = [\n  '''gitleaks\\.toml''',\n  '''(.*?)(jpg|gif|doc)'''\n]\n# note: (global) regexTarget defaults to check the _Secret_ in the finding.\n# Acceptable values for regexTarget are \"match\" and \"line\"\nregexTarget = \"match\"\nregexes = [\n  '''219-09-9999''',\n  '''078-05-1120''',\n  '''(9[0-9]{2}|666)-\\d{2}-\\d{4}''',\n]\n# note: stopwords targets the extracted secret, not the entire regex match\n# like 'regexes' does. (stopwords introduced in 8.8.0)\nstopwords = [\n  '''client''',\n  '''endpoint''',\n]\n\n# ⚠️ In v8.25.0, `[[allowlists]]` have a new field called |targetRules|.\n#\n# Common allowlists can be defined once and assigned to multiple rules using |targetRules|.\n# This will only run on the specified rules, not globally.\n[[allowlists]]\ntargetRules = [\"awesome-rule-1\", \"awesome-rule-2\"]\ndescription = \"Our test assets trigger false-positives in a couple rules.\"\npaths = ['''tests/expected/._\\.json$''']\n```\n\nRefer to the default [gitleaks config](https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml) for examples or follow the [contributing guidelines](https://github.com/gitleaks/gitleaks/blob/master/CONTRIBUTING.md) if you would like to contribute to the default configuration. Additionally, you can check out [this gitleaks blog post](https://blog.gitleaks.io/stop-leaking-secrets-configuration-2-3-aeed293b1fbf) which covers advanced configuration setups.\n\n### Additional Configuration\n\n#### Composite Rules (Multi-part or `required` Rules)\nIn v8.28.0 Gitleaks introduced composite rules, which are made up of a single \"primary\" rule and one or more auxiliary or `required` rules. To create a composite rule, add a `[[rules.required]]` table to the primary rule specifying an `id` and optionally `withinLines` and/or `withinColumns` proximity constraints. A fragment is a chunk of content that Gitleaks processes at once (typically a file, part of a file, or git diff), and proximity matching instructs the primary rule to only report a finding if the auxiliary `required` rules also find matches within the specified area of the fragment.\n\n**Proximity matching:** Using the `withinLines` and `withinColumns` fields instructs the primary rule to only report a finding if the auxiliary `required` rules also find matches within the specified proximity. You can set:\n\n- **`withinLines: N`** - required findings must be within N lines (vertically)\n- **`withinColumns: N`** - required findings must be within N characters (horizontally)\n- **Both** - creates a rectangular search area (both constraints must be satisfied)\n- **Neither** - fragment-level matching (required findings can be anywhere in the same fragment)\n\nHere are diagrams illustrating each proximity behavior:\n\n```\np = primary captured secret\na = auxiliary (required) captured secret\nfragment = section of data gitleaks is looking at\n\n\n    *Fragment-level proximity*\n    Any required finding in the fragment\n          ┌────────┐\n   ┌──────┤fragment├─────┐\n   │      └──────┬─┤     │ ┌───────┐\n   │             │a│◀────┼─│✓ MATCH│\n   │          ┌─┐└─┘     │ └───────┘\n   │┌─┐       │p│        │\n   ││a│    ┌─┐└─┘        │ ┌───────┐\n   │└─┘    │a│◀──────────┼─│✓ MATCH│\n   └─▲─────┴─┴───────────┘ └───────┘\n     │    ┌───────┐\n     └────│✓ MATCH│\n          └───────┘\n\n\n   *Column bounded proximity*\n   `withinColumns = 3`\n          ┌────────┐\n   ┌────┬─┤fragment├─┬───┐\n   │      └──────┬─┤     │ ┌───────────┐\n   │    │        │a│◀┼───┼─│+1C ✓ MATCH│\n   │          ┌─┐└─┘     │ └───────────┘\n   │┌─┐ │     │p│    │   │\n┌──▶│a│  ┌─┐  └─┘        │ ┌───────────┐\n│  │└─┘ ││a│◀────────┼───┼─│-2C ✓ MATCH│\n│  │       ┘             │ └───────────┘\n│  └── -3C ───0C─── +3C ─┘\n│  ┌─────────┐\n│  │ -4C ✗ NO│\n└──│  MATCH  │\n   └─────────┘\n\n\n   *Line bounded proximity*\n   `withinLines = 4`\n         ┌────────┐\n   ┌─────┤fragment├─────┐\n  +4L─ ─ ┴────────┘─ ─ ─│\n   │                    │\n   │              ┌─┐   │ ┌────────────┐\n   │         ┌─┐  │a│◀──┼─│+1L ✓ MATCH │\n   0L  ┌─┐   │p│  └─┘   │ ├────────────┤\n   │   │a│◀──┴─┴────────┼─│-1L ✓ MATCH │\n   │   └─┘              │ └────────────┘\n   │                    │ ┌─────────┐\n  -4L─ ─ ─ ─ ─ ─ ─ ─┌─┐─│ │-5L ✗ NO │\n   │                │a│◀┼─│  MATCH  │\n   └────────────────┴─┴─┘ └─────────┘\n\n\n   *Line and column bounded proximity*\n   `withinLines = 4`\n   `withinColumns = 3`\n         ┌────────┐\n   ┌─────┤fragment├─────┐\n  +4L   ┌└────────┴ ┐   │\n   │            ┌─┐     │ ┌───────────────┐\n   │    │       │a│◀┼───┼─│+2L/+1C ✓ MATCH│\n   │         ┌─┐└─┘     │ └───────────────┘\n   0L   │    │p│    │   │\n   │         └─┘        │\n   │    │           │   │ ┌────────────┐\n  -4L    ─ ─ ─ ─ ─ ─┌─┐ │ │-5L/+3C ✗ NO│\n   │                │a│◀┼─│   MATCH    │\n   └───-3C────0L───+3C┴─┘ └────────────┘\n```\n\n<details><summary>Some final quick thoughts on composite rules.<\/summary>This is an experimental feature! It's subject to change so don't go sellin' a new B2B SaaS feature built ontop of this feature. Scan type (git vs dir) based context is interesting. I'm monitoring the situation. Composite rules might not be super useful for git scans because gitleaks only looks at additions in the git history. It could be useful to scan non-additions in git history for `required` rules. Oh, right this is a readme, I'll shut up now.<\/details>\n\n#### gitleaks:allow\n\nIf you are knowingly committing a test secret that gitleaks will catch you can add a `gitleaks:allow` comment to that line which will instruct gitleaks\nto ignore that secret. Ex:\n\n```\nclass CustomClass:\n    discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ'  #gitleaks:allow\n\n```\n\n#### .gitleaksignore\n\nYou can ignore specific findings by creating a `.gitleaksignore` file at the root of your repo. In release v8.10.0 Gitleaks added a `Fingerprint` value to the Gitleaks report. Each leak, or finding, has a Fingerprint that uniquely identifies a secret. Add this fingerprint to the `.gitleaksignore` file to ignore that specific secret. See Gitleaks' [.gitleaksignore](https://github.com/gitleaks/gitleaks/blob/master/.gitleaksignore) for an example. Note: this feature is experimental and is subject to change in the future.\n\n#### Decoding\n\nSometimes secrets are encoded in a way that can make them difficult to find\nwith just regex. Now you can tell gitleaks to automatically find and decode\nencoded text. The flag `--max-decode-depth` enables this feature (the default\nvalue \"0\" means the feature is disabled by default).\n\nRecursive decoding is supported since decoded text can also contain encoded\ntext.  The flag `--max-decode-depth` sets the recursion limit. Recursion stops\nwhen there are no new segments of encoded text to decode, so setting a really\nhigh max depth doesn't mean it will make that many passes. It will only make as\nmany as it needs to decode the text. Overall, decoding only minimally increases\nscan times.\n\nThe findings for encoded text differ from normal findings in the following\nways:\n\n- The location points the bounds of the encoded text\n  - If the rule matches outside the encoded text, the bounds are adjusted to\n    include that as well\n- The match and secret contain the decoded value\n- Two tags are added `decoded:<encoding>` and `decode-depth:<depth>`\n\nCurrently supported encodings:\n\n- **percent** - Any printable ASCII percent encoded values\n- **hex** - Any printable ASCII hex encoded values >= 32 characters\n- **base64** - Any printable ASCII base64 encoded values >= 16 characters\n\n#### Archive Scanning\n\nSometimes secrets are packaged within archive files like zip files or tarballs,\nmaking them difficult to discover. Now you can tell gitleaks to automatically\nextract and scan the contents of archives. The flag `--max-archive-depth`\nenables this feature for both `dir` and `git` scan types. The default value of\n\"0\" means this feature is disabled by default.\n\nRecursive scanning is supported since archives can also contain other archives.\nThe `--max-archive-depth` flag sets the recursion limit. Recursion stops when\nthere are no new archives to extract, so setting a very high max depth just\nsets the potential to go that deep. It will only go as deep as it needs to.\n\nThe findings for secrets located within an archive will include the path to the\nfile inside the archive. Inner paths are separated with `!`.\n\nExample finding (shortened for brevity):\n\n```\nFinding:     DB_PASSWORD=8ae31cacf141669ddfb5da\n...\nFile:        testdata/archives/nested.tar.gz!archives/files.tar!files/.env.prod\nLine:        4\nCommit:      6e6ee6596d337bb656496425fb98644eb62b4a82\n...\nFingerprint: 6e6ee6596d337bb656496425fb98644eb62b4a82:testdata/archives/nested.tar.gz!archives/files.tar!files/.env.prod:generic-api-key:4\nLink:        https://github.com/leaktk/gitleaks/blob/6e6ee6596d337bb656496425fb98644eb62b4a82/testdata/archives/nested.tar.gz\n```\n\nThis means a secret was detected on line 4 of `files/.env.prod.` which is in\n`archives/files.tar` which is in `testdata/archives/nested.tar.gz`.\n\nCurrently supported formats:\n\nThe [compression](https://github.com/mholt/archives?tab=readme-ov-file#supported-compression-formats)\nand [archive](https://github.com/mholt/archives?tab=readme-ov-file#supported-archive-formats)\nformats supported by mholt's [archives package](https://github.com/mholt/archives)\nare supported.\n\n#### Reporting\n\nGitleaks has built-in support for several report formats: [`json`](https://github.com/gitleaks/gitleaks/blob/master/testdata/expected/report/json_simple.json), [`csv`](https://github.com/gitleaks/gitleaks/blob/master/testdata/expected/report/csv_simple.csv?plain=1), [`junit`](https://github.com/gitleaks/gitleaks/blob/master/testdata/expected/report/junit_simple.xml), and [`sarif`](https://github.com/gitleaks/gitleaks/blob/master/testdata/expected/report/sarif_simple.sarif).\n\nIf none of these formats fit your need, you can create your own report format with a [Go `text/template` .tmpl file](https://www.digitalocean.com/community/tutorials/how-to-use-templates-in-go#step-4-writing-a-template) and the `--report-template` flag. The template can use [extended functionality from the `Masterminds/sprig` template library](https://masterminds.github.io/sprig/).\n\nFor example, the following template provides a custom JSON output:\n```gotemplate\n# jsonextra.tmpl\n[{{ $lastFinding := (sub (len . ) 1) }}\n{{- range $i, $finding := . }}{{with $finding}}\n    {\n        \"Description\": {{ quote .Description }},\n        \"StartLine\": {{ .StartLine }},\n        \"EndLine\": {{ .EndLine }},\n        \"StartColumn\": {{ .StartColumn }},\n        \"EndColumn\": {{ .EndColumn }},\n        \"Line\": {{ quote .Line }},\n        \"Match\": {{ quote .Match }},\n        \"Secret\": {{ quote .Secret }},\n        \"File\": \"{{ .File }}\",\n        \"SymlinkFile\": {{ quote .SymlinkFile }},\n        \"Commit\": {{ quote .Commit }},\n        \"Entropy\": {{ .Entropy }},\n        \"Author\": {{ quote .Author }},\n        \"Email\": {{ quote .Email }},\n        \"Date\": {{ quote .Date }},\n        \"Message\": {{ quote .Message }},\n        \"Tags\": [{{ $lastTag := (sub (len .Tags ) 1) }}{{ range $j, $tag := .Tags }}{{ quote . }}{{ if ne $j $lastTag }},{{ end }}{{ end }}],\n        \"RuleID\": {{ quote .RuleID }},\n        \"Fingerprint\": {{ quote .Fingerprint }}\n    }{{ if ne $i $lastFinding }},{{ end }}\n{{- end}}{{ end }}\n]\n```\n\nUsage:\n```sh\n$ gitleaks dir ~/leaky-repo/ --report-path \"report.json\" --report-format template --report-template testdata/report/jsonextra.tmpl\n```\n\n## Sponsorships\n\n<p align=\"left\">\n\t<h3><a href=\"https://coderabbit.ai/?utm_source=oss&utm_medium=sponsorship&utm_campaign=gitleaks\">coderabbit.ai<\/h3>\n\t  <a href=\"https://coderabbit.ai/?utm_source=oss&utm_medium=sponsorship&utm_campaign=gitleaks\">\n\t\t  <img alt=\"CodeRabbit.ai Sponsorship\" src=\"https://github.com/gitleaks/gitleaks/assets/15034943/76c30a85-887b-47ca-9956-17a8e55c6c41\" width=200>\n\t  <\/a>\n<\/p>\n\n\n## Exit Codes\n\nYou can always set the exit code when leaks are encountered with the --exit-code flag. Default exit codes below:\n\n```\n0 - no leaks present\n1 - leaks or error encountered\n126 - unknown flag\n```\n\n### Join the Discord! [![Discord](https://img.shields.io/discord/1102689410522284044.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/8Hzbrnkr7E)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"31B8:349C76:179EC9:5E4816:6AB92EE6"},"text_sha256":"65e87e68f4a16aefa1f1fba55b2e7a9b9bc8716393b7ddb013fc7c7bef4e4bc1"},{"path":"SECURITY.md","size":735,"blob_sha":"1750c8d4fa84344f4093f0aa225efd65bdb1c4e6","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version | Supported |\n|---------|-----------|\n| Latest  | Yes       |\n\n## Reporting a Vulnerability\n\nIf you discover a security vulnerability in gitleaks, please report it responsibly:\n\n1. **Do not open a public issue.**\n2. Use [GitHub's private vulnerability reporting](https://github.com/gitleaks/gitleaks/security/advisories/new) to submit your report directly.\n3. Include a description of the vulnerability, steps to reproduce, and any relevant logs or screenshots.\n\n## Scope\n\nThis policy covers `gitleaks` (this repository). For vulnerabilities in `gitleaks-action`, please report them at [gitleaks/gitleaks-action](https://github.com/gitleaks/gitleaks-action/security/advisories/new).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"844E:3E1DA:17BE40:5E6B7D:6AB92EE7"},"text_sha256":"0a39ecd62b2b18934e4cf72087fdf60fdd38b742514453bed8707970364dbbe9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"apache/seatunnel","input_row":{"repository":"apache/seatunnel","url":"https://github.com/apache/seatunnel","name":"seatunnel","owner":"apache","description":"SeaTunnel is a multimodal, high-performance, distributed, massive data integration tool.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":9681,"issues":4971,"created_at":"2017-08-05T09:14:47Z","updated_at":"2026-09-27T13:32:53Z","first_commit_at":"2017-08-05T14:30:14Z","last_commit_at":"2026-09-27T13:23:19Z","activity_months":109.72,"ai_ml_match_topics":"llm; multimodal","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:43.984Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apache/seatunnel","visibility":"public","created_at":"2017-08-05T09:14:47Z","updated_at":"2026-09-27T14:45:08Z","private":false,"fork":false,"archived":false,"stargazers_count":9681,"open_issues_count":782,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1318","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0858:380E1C:17FB592:1C25CB8:6AB92EE8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1317","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0837:6C6ED:181AA27:1C45A10:6AB92EE8"},"commit":{"sha":"074492e9239f0c844b8a84d28e482b720be2cafe","url":"https://github.com/apache/seatunnel/commit/074492e9239f0c844b8a84d28e482b720be2cafe","date":"2018-05-13T13:38:09Z","author_date":"2018-05-13T13:38:09Z","committer_date":"2018-05-13T13:38:09Z","tree_sha":"0f1f57b758618111bc9541c37289e05ec95348c9","message_first_line":"Merge pull request #125 from InterestingLab/rickyhuo.fixbug.grok"},"tree_request_status":200,"tree_rate":{"github_remaining":"1316","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E8:72727:17D5EAD:1C01359:6AB92EE8"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3707,"blob_sha":"60435ef5a139046bea2ddf86515be0c3e3602402","priority":0}],"documents":[{"path":"README.md","size":3707,"blob_sha":"60435ef5a139046bea2ddf86515be0c3e3602402","priority":0,"status":200,"text":"# Waterdrop [![Build Status](https://travis-ci.org/InterestingLab/waterdrop.svg?branch=master)](https://travis-ci.org/InterestingLab/waterdrop)\n\n[![Join the chat at https://gitter.im/interestinglab_waterdrop/Lobby](https://badges.gitter.im/interestinglab_waterdrop/Lobby.svg)](https://gitter.im/interestinglab_waterdrop/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nWaterdrop 是一个`非常易用`，`高性能`，能够应对`海量数据`的`实时`数据处理产品，构建于Apache Spark之上。\n\n## 为什么我们需要 Waterdrop\n\nDatabricks 开源的 Apache Spark 对于分布式数据处理来说是一个伟大的进步。我们在使用 Spark 时发现了很多可圈可点之处，同时我们也发现了我们的机会 —— 通过我们的努力让Spark的使用更简单，更高效，并将业界和我们使用Spark的优质经验固化到Waterdrop这个产品中，明显减少学习成本，加快分布式数据处理能力在生产环境落地。\n\n除了大大简化分布式数据处理难度外，Waterdrop尽所能为您解决可能遇到的问题：\n* 数据丢失与重复\n* 任务堆积与延迟\n* 吞吐量低\n* 应用到生产环境周期长\n* 缺少应用运行状态监控\n\n\n\"Waterdrop\" 的中文是“水滴”，来自中国当代科幻小说作家刘慈欣的《三体》系列，它是三体人制造的宇宙探测器，会反射几乎全部的电磁波，表面绝对光滑，温度处于绝对零度，全部由被强互作用力紧密锁死的质子与中子构成，无坚不摧。在末日之战中，仅一个水滴就摧毁了人类太空武装力量近2千艘战舰。\n\n## Waterdrop 使用场景\n\n* 海量数据ETL\n* 海量数据聚合\n* 多源数据处理\n\n## Waterdrop 的特性\n\n* 简单易用，灵活配置，无需开发\n* 实时流式处理\n* 高性能\n* 海量数据处理能力\n* 模块化和插件化，易于扩展\n* 支持利用SQL做数据处理和聚合\n* 支持Spark 2.x\n\n## Waterdrop 的工作流程\n\nInput[数据源输入] -> Filter[数据处理] -> Output[结果输出]\n\n多个Filter构建了数据处理的Pipeline，满足各种各样的数据处理需求，如果您熟悉SQL，也可以直接通过SQL构建数据处理的Pipeline，简单高效。目前Waterdrop支持的[Filter列表](zh-cn/configuration/filter-plugin), 仍然在不断扩充中。您也可以开发自己的数据处理插件，整个系统是易于扩展的。\n\n## Waterdrop 支持的插件\n\n* Input plugin\n\nFake, File, Hdfs, Kafka, S3, Socket, 自行开发的Input plugin\n\n* Filter plugin\n\nAdd, Checksum, Convert, Date, Drop, Grok, Json, Kv, Lowercase, Remove, Rename, Repartition, Replace, Sample, Split, Sql, Table, Truncate, Uppercase, Uuid, 自行开发的Filter plugin\n\n* Output plugin\n\nElasticsearch, File, Hdfs, Jdbc, Kafka, Mysql, S3, Stdout, 自行开发的Output plugin\n\n## 环境依赖\n\n需要以下Spark集群环境的任意一种：\n* Spark on Yarn\n* Spark Standalone\n* Spark on Mesos\n\n如果您的数据量较小或者只是做功能验证，也可以仅使用local模式启动，无需集群环境。\n\n## 文档\n\n关于Waterdrop的[详细文档](https://interestinglab.github.io/waterdrop/)\n\n## 社区分享\n\n[Waterdrop介绍PPT](http://slides.com/garyelephant/waterdrop/fullscreen?token=GKrQoxJi)\n\n## 贡献观点和代码\n\n提交问题和建议：https://github.com/InterestingLab/waterdrop/issues\n\n贡献代码：https://github.com/InterestingLab/waterdrop/pulls\n\n## 开发者\n\n感谢[所有开发者](https://github.com/InterestingLab/waterdrop/graphs/contributors)\n\n## 联系项目负责人\n\nGaryelephant : garygaowork@gmail.com, 微信: garyelephant\n\nRickyHuo : huochen1994@163.com, 微信: chodomatte1994\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37CA:3CC8A:18008D:5EAE62:6AB92EE8"},"text_sha256":"28770b8252f97c10347739da81ab5e3ba8b6b576017f4877c9afc824dfa59192"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1315","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0907:228A99:1812B9C:1C3E22C:6AB92EE9"},"commit":{"sha":"e880195fcabfdd0cbd029928cd8d11d0de69e816","url":"https://github.com/apache/seatunnel/commit/e880195fcabfdd0cbd029928cd8d11d0de69e816","date":"2026-06-30T15:20:59Z","author_date":"2026-06-30T15:20:59Z","committer_date":"2026-06-30T15:20:59Z","tree_sha":"ac2e762bbb5764b3e69d32c4f828a8381c1ab716","message_first_line":"[Fix][E2E] Wait for Postgres CDC WAL stream readiness (#11202)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1314","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0849:71F98:185FAC0:1C8ACA3:6AB92EE9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5807,"blob_sha":"d1c315b69f3f10126dbdf5eb373994157f5b14b0","priority":0},{"path":"docs/en/engines/zeta/security.md","size":4409,"blob_sha":"b3c1b4257c4935bdc3e1cd66c152120e9e7bd000","priority":1},{"path":"docs/zh/engines/zeta/security.md","size":4216,"blob_sha":"e0729e7a37d7d8bd8a2c547aef259c910db8a71f","priority":1},{"path":"seatunnel-dist/release-docs/licenses/LICENSE-jetty-security.txt","size":23152,"blob_sha":"46f4f25246450e63c092ea7c9b4b540472693855","priority":1}],"documents":[{"path":"README.md","size":5807,"blob_sha":"d1c315b69f3f10126dbdf5eb373994157f5b14b0","priority":0,"status":200,"text":"# Apache SeaTunnel\n\n<img src=\"https://seatunnel.apache.org/image/logo.png\" alt=\"SeaTunnel Logo\" height=\"200px\" align=\"right\" />\n\n[![Build Workflow](https://github.com/apache/seatunnel/actions/workflows/build_main.yml/badge.svg?branch=dev)](https://github.com/apache/seatunnel/actions/workflows/build_main.yml)\n[![Join Slack](https://img.shields.io/badge/slack-%23seatunnel-4f8eba?logo=slack)](https://s.apache.org/seatunnel-slack)\n[![Twitter Follow](https://img.shields.io/twitter/follow/ASFSeaTunnel.svg?label=Follow&logo=twitter)](https://twitter.com/ASFSeaTunnel)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/apache/seatunnel)\n\n## Overview\nSeaTunnel is a multimodal, high-performance, distributed data integration tool, capable of synchronizing vast amounts of data daily. It's trusted by numerous companies for its efficiency and stability.\n\n## Why Choose SeaTunnel\nSeaTunnel addresses common data integration challenges:\n- **Diverse Data Sources**: Seamlessly integrates with hundreds of evolving data sources.\n- **Multimodal Data Integration**: Supports the integration of video, images, binary files, structured and unstructured text data.\n- **Complex Synchronization Scenarios**: Supports various synchronization methods, including real-time, CDC, and full database synchronization.\n- **Resource Efficiency**: Minimizes computing resources and JDBC connections for real-time synchronization.\n- **Quality and Monitoring**: Provides data quality and monitoring to prevent data loss or duplication.\n\n## Key Features\n- **Diverse Connectors**: Offers support for over 160 connectors, with ongoing expansion.\n- **Batch-Stream Integration**: Easily adaptable connectors simplify data integration management.\n- **Distributed Snapshot Algorithm**: Ensures data consistency across synchronized data.\n- **Multi-Engine Support**: Works with SeaTunnel Zeta Engine, Flink, and Spark.\n- **JDBC Multiplexing and Log Parsing**: Efficiently synchronizes multi-tables and databases.\n- **High Throughput and Low Latency**: Provides high-throughput data synchronization with low latency.\n- **Real-Time Monitoring**: Offers detailed insights during synchronization.\n\n## SeaTunnel Workflow\n![SeaTunnel Workflow](docs/images/architecture_diagram.png)\n\nConfigure jobs, select execution engines, and parallelize data using Source Connectors. Easily develop and extend connectors to meet your needs.\n\n## Supported Connectors\n- [Source Connectors](https://seatunnel.apache.org/docs/connectors/source)\n- [Sink Connectors](https://seatunnel.apache.org/docs/connectors/sink)\n- [Transform Connectors](https://seatunnel.apache.org/docs/transforms)\n\n## Getting Started\nDownload SeaTunnel from the [Official Website](https://seatunnel.apache.org/download).\nChoose your runtime execution engine:\n- [SeaTunnel Zeta Engine](https://seatunnel.apache.org/docs/getting-started/locally/quick-start-seatunnel-engine)\n- [Spark](https://seatunnel.apache.org/docs/getting-started/locally/quick-start-spark)\n- [Flink](https://seatunnel.apache.org/docs/getting-started/locally/quick-start-flink)\n\n## Multimodal Data Integration\n- Most data integration tools support structured and unstructured text data, and SeaTunnel does as well. Simply refer to the desired Source/Sink to use.\n- For integrating video, images, and binary files with SeaTunnel, please refer to the documentation for detailed instructions.\n\n## Apache SeaTunnel Tools\nSeaTunnel Tools provides a range of peripheral tools, including Apache SeaTunnel Mcp Server, etc,please refer to [SeaTunnel Tools](https://github.com/apache/seatunnel-tools).\n\n## Users\nCompanies and organizations worldwide use SeaTunnel for research, production, and commercial products. \nExplore real-world use cases of SeaTunnel, such as JP morgan, S7, JDT, Bytedance, Tencent Cloud. More use cases can be found on the [SeaTunnel Users](https://seatunnel.apache.org/user).\n\n## Code of Conduct\nParticipate in this project in accordance with the Contributor Covenant [Code of Conduct](https://www.apache.org/foundation/policies/conduct).\n\n## Contributors\nWe appreciate all developers for their contributions. See the [List Of Contributors](https://github.com/apache/seatunnel/graphs/contributors).\n\n## How to Compile\nRefer to this [Setup](https://seatunnel.apache.org/docs/developer/setup) for compilation instructions.\n\n## Contact Us\n- Mail list: **dev@seatunnel.apache.org**. Subscribe by sending an email to `dev-subscribe@seatunnel.apache.org`.\n- Slack: [Join SeaTunnel Slack](https://s.apache.org/seatunnel-slack)\n- Twitter: [ASFSeaTunnel on Twitter](https://twitter.com/ASFSeaTunnel)\n\n## Landscapes\nSeaTunnel enriches the [CNCF CLOUD NATIVE Landscape](https://landscape.cncf.io/?landscape=observability-and-analysis&license=Apache+License+2.0).\n\n## License\n[Apache 2.0 License](LICENSE)\n\n## Frequently Asked Questions\n\n### 1. How do I install SeaTunnel?\n\nFollow the [Local Deployment](https://seatunnel.apache.org/docs/getting-started/locally/deployment) on SeaTunnel website to get \nstarted quickly.\nPlease refer to the [Cluster Deployment](https://seatunnel.apache.org/docs/engines/zeta/hybrid-cluster-deployment)\n\n### 2. Where can I find documentation and tutorials?\n[Official Documentation](https://seatunnel.apache.org/docs) includes detailed guides and tutorials to help you get started.\n\n### 3. Is there a community or support channel?\nYou can submit an issue on [GitHub Issues](https://github.com/apache/seatunnel/issues).\nJoin our Slack community [SeaTunnel Slack](https://s.apache.org/seatunnel-slack).\nMore information, please refer to [FAQ](https://seatunnel.apache.org/docs/faq). \n\n### 4. How can I contribute to SeaTunnel?\nWe welcome contributions! Please refer to our [Contribution Guidelines](https://seatunnel.apache.org/docs/developer/coding-guide) for details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:1804E7:5EB2DB:6AB92EEA"},"text_sha256":"7920e42cd5ca866033931b2d4940239c6d00ad8ce48e2a7dfd08d6937813753c"},{"path":"docs/en/engines/zeta/security.md","size":4409,"blob_sha":"b3c1b4257c4935bdc3e1cd66c152120e9e7bd000","priority":1,"status":200,"text":"# Security\n\n## Basic Authentication\n\nYou can secure your Web UI by enabling basic authentication. This will require users to enter a username and password when accessing the web interface.\n\n| Parameter Name | Required | Description |\n|----------------|----------|-------------|\n| `enable-basic-auth` | No | Whether to enable basic authentication, default is `false` |\n| `basic-auth-username` | No | The username for basic authentication, default is `admin` |\n| `basic-auth-password` | No | The password for basic authentication, default is `admin` |\n\n```yaml\nseatunnel:\n  engine:\n    http:\n      enable-http: true\n      port: 8080\n      enable-basic-auth: true\n      basic-auth-username: \"your_username\"\n      basic-auth-password: \"your_password\"\n```\n\n## HTTPS Configuration\n\nYou can secure your REST-API-V2 service by enabling HTTPS. Both HTTP and HTTPS can be enabled simultaneously, or only one of them can be enabled.\n\n| Parameter Name | Required | Description |\n|----------------|----------|-------------|\n| `enable-http` | No | Whether to enable HTTP service, default is `true` |\n| `port` | No | HTTP service port, default is `8080` |\n| `enable-https` | No | Whether to enable HTTPS service, default is `false` |\n| `https-port` | No | HTTPS service port, default is `8443` |\n| `key-store-path` | Required when `enable-https` is `true` | Path to the KeyStore file, used to store the server's private key and certificate |\n| `key-store-password` | Required when `enable-https` is `true` | KeyStore password |\n| `key-manager-password` | Required when `enable-https` is `true` | KeyManager password, usually the same as the KeyStore password |\n| `trust-store-path` | No | Path to the TrustStore file, used to verify client certificates |\n| `trust-store-password` | No | TrustStore password |\n\n**Note**: When `trust-store-path` and `trust-store-password` are not empty, mutual SSL authentication (client authentication) will be enabled, requiring the client to provide a valid certificate.\n\n```yaml\nseatunnel:\n  engine:\n    http:\n      enable-http: true\n      port: 8080\n      enable-https: true\n      https-port: 8443\n      key-store-path: \"${YOUR_KEY_STORE_PATH}\"\n      key-store-password: \"${YOUR_KEY_STORE_PASSWORD}\"\n      key-manager-password: \"${YOUR_KEY_MANAGER_PASSWORD}\"\n      # Optional: Mutual authentication\n      trust-store-path: \"${YOUR_TRUST_STORE_PATH}\"\n      trust-store-password: \"${YOUR_TRUST_STORE_PASSWORD}\"\n```\n\n### Example of Generating Keys\n\n```shell\n#!/bin/bash\n\n# Define the project root directory\nPROJECT_DIR=\"/Users/mac/IdeaProjects/data\"\n\n# Define passwords\nSERVER_KEYSTORE_PASSWORD=\"server_keystore_password\"\nSERVER_KEY_PASSWORD=\"server_keystore_password\"\nCLIENT_KEYSTORE_PASSWORD=\"client_keystore_password\"\nCLIENT_KEY_PASSWORD=\"client_keystore_password\"\nSERVER_TRUSTSTORE_PASSWORD=\"server_truststore_password\"\nCLIENT_TRUSTSTORE_PASSWORD=\"client_truststore_password\"\n\n# Generate server keystore\nkeytool -genkeypair \\\n  -alias server \\\n  -keyalg RSA \\\n  -keysize 2048 \\\n  -validity 365 \\\n  -keystore \"$PROJECT_DIR/server_keystore.jks\" \\\n  -storepass \"$SERVER_KEYSTORE_PASSWORD\" \\\n  -keypass \"$SERVER_KEY_PASSWORD\" \\\n  -dname \"CN=localhost,OU=IT,O=MyCompany,L=Shanghai,ST=Shanghai,C=CN\"\n\n# Export server certificate\nkeytool -exportcert \\\n  -alias server \\\n  -keystore \"$PROJECT_DIR/server_keystore.jks\" \\\n  -storepass \"$SERVER_KEYSTORE_PASSWORD\" \\\n  -file \"$PROJECT_DIR/server.crt\"\n\n# Generate client keystore\nkeytool -genkeypair \\\n  -alias client \\\n  -keyalg RSA \\\n  -keysize 2048 \\\n  -validity 365 \\\n  -keystore \"$PROJECT_DIR/client_keystore.jks\" \\\n  -storepass \"$CLIENT_KEYSTORE_PASSWORD\" \\\n  -keypass \"$CLIENT_KEY_PASSWORD\" \\\n  -dname \"CN=client,OU=IT,O=MyCompany,L=Shanghai,ST=Shanghai,C=CN\"\n\n# Export client certificate\nkeytool -exportcert \\\n  -alias client \\\n  -keystore \"$PROJECT_DIR/client_keystore.jks\" \\\n  -storepass \"$CLIENT_KEYSTORE_PASSWORD\" \\\n  -file \"$PROJECT_DIR/client.crt\"\n\n# Create server truststore and import client certificate\nkeytool -importcert \\\n  -alias client \\\n  -file \"$PROJECT_DIR/client.crt\" \\\n  -keystore \"$PROJECT_DIR/server_truststore.jks\" \\\n  -storepass \"$SERVER_TRUSTSTORE_PASSWORD\" \\\n  -noprompt\n\n# Create client truststore and import server certificate\nkeytool -importcert \\\n  -alias server \\\n  -file \"$PROJECT_DIR/server.crt\" \\\n  -keystore \"$PROJECT_DIR/client_truststore.jks\" \\\n  -storepass \"$CLIENT_TRUSTSTORE_PASSWORD\" \\\n  -noprompt\n```","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E31C:40B0C:1804EB:5EB2E6:6AB92EEB"},"text_sha256":"29c9d5e99d2bb5aed0ab03431862269b52653d42a6eb0b1073c2d9cabce9bbeb"},{"path":"docs/zh/engines/zeta/security.md","size":4216,"blob_sha":"e0729e7a37d7d8bd8a2c547aef259c910db8a71f","priority":1,"status":200,"text":"---\nsidebar_position: 16\ntitle: 安全配置\n---\n\n# 安全配置\n\n## Basic 认证\n\n您可以通过开启 Basic 认证来保护您的 Web UI。这将要求用户在访问 Web 界面时输入用户名和密码。\n\n| 参数名称 | 是否必填 | 参数描述 |\n|--------|---------|--------|\n| `enable-basic-auth` | 否 | 是否开启Basic 认证，默认为 `false` |\n| `basic-auth-username` | 否 | Basic 认证的用户名，默认为 `admin` |\n| `basic-auth-password` | 否 | Basic 认证的密码，默认为 `admin` |\n\n```yaml\nseatunnel:\n  engine:\n    http:\n      enable-http: true\n      port: 8080\n      enable-basic-auth: true\n      basic-auth-username: \"your_username\"\n      basic-auth-password: \"your_password\"\n```\n\n## HTTPS 配置\n\n您可以通过开启 HTTPS 来保护您的 API 服务。HTTP 和 HTTPS 可同时开启，也可以只开启其中一个。\n\n| 参数名称 | 是否必填 | 参数描述 |\n|--------|---------|--------|\n| `enable-http` | 否 | 是否开启 HTTP 服务，默认为 `true` |\n| `port` | 否 | HTTP 服务端口，默认为 `8080` |\n| `enable-https` | 否 | 是否开启 HTTPS 服务，默认为 `false` |\n| `https-port` | 否 | HTTPS 服务端口，默认为 `8443` |\n| `key-store-path` | 当 `enable-https` 为 `true` 时必填 | KeyStore 文件路径，用于存储服务器私钥和证书 |\n| `key-store-password` | 当 `enable-https` 为 `true` 时必填 | KeyStore 密码 |\n| `key-manager-password` | 当 `enable-https` 为 `true` 时必填 | KeyManager 密码，通常与 KeyStore 密码相同 |\n| `trust-store-path` | 否 | TrustStore 文件路径，用于验证客户端证书 |\n| `trust-store-password` | 否 | TrustStore 密码 |\n\n**注意**：当 `trust-store-path` 和 `trust-store-password` 配置项不为空时，将启用双向 SSL 认证（客户端认证），要求客户端提供有效证书。\n\n```yaml\nseatunnel:\n  engine:\n    http:\n      enable-http: true\n      port: 8080\n      enable-https: true\n      https-port: 8443\n      key-store-path: \"${YOUR_KEY_STORE_PATH}\"\n      key-store-password: \"${YOUR_KEY_STORE_PASSWORD}\"\n      key-manager-password: \"${YOUR_KEY_MANAGER_PASSWORD}\"\n      # 可选：双向认证\n      trust-store-path: \"${YOUR_TRUST_STORE_PATH}\"\n      trust-store-password: \"${YOUR_TRUST_STORE_PASSWORD}\"\n```\n\n### 生成密钥样例\n\n```shell\n#!/bin/bash\n\n# 定义项目根目录\nPROJECT_DIR=\"/Users/mac/IdeaProjects/data\"\n\n# 定义密码\nSERVER_KEYSTORE_PASSWORD=\"server_keystore_password\"\nSERVER_KEY_PASSWORD=\"server_keystore_password\"\nCLIENT_KEYSTORE_PASSWORD=\"client_keystore_password\"\nCLIENT_KEY_PASSWORD=\"client_keystore_password\"\nSERVER_TRUSTSTORE_PASSWORD=\"server_truststore_password\"\nCLIENT_TRUSTSTORE_PASSWORD=\"client_truststore_password\"\n\n# 生成服务端密钥库\nkeytool -genkeypair \\\n  -alias server \\\n  -keyalg RSA \\\n  -keysize 2048 \\\n  -validity 365 \\\n  -keystore \"$PROJECT_DIR/server_keystore.jks\" \\\n  -storepass \"$SERVER_KEYSTORE_PASSWORD\" \\\n  -keypass \"$SERVER_KEY_PASSWORD\" \\\n  -dname \"CN=localhost,OU=IT,O=MyCompany,L=Shanghai,ST=Shanghai,C=CN\"\n\n# 导出服务端证书\nkeytool -exportcert \\\n  -alias server \\\n  -keystore \"$PROJECT_DIR/server_keystore.jks\" \\\n  -storepass \"$SERVER_KEYSTORE_PASSWORD\" \\\n  -file \"$PROJECT_DIR/server.crt\"\n\n# 生成客户端密钥库\nkeytool -genkeypair \\\n  -alias client \\\n  -keyalg RSA \\\n  -keysize 2048 \\\n  -validity 365 \\\n  -keystore \"$PROJECT_DIR/client_keystore.jks\" \\\n  -storepass \"$CLIENT_KEYSTORE_PASSWORD\" \\\n  -keypass \"$CLIENT_KEY_PASSWORD\" \\\n  -dname \"CN=client,OU=IT,O=MyCompany,L=Shanghai,ST=Shanghai,C=CN\"\n\n# 导出客户端证书\nkeytool -exportcert \\\n  -alias client \\\n  -keystore \"$PROJECT_DIR/client_keystore.jks\" \\\n  -storepass \"$CLIENT_KEYSTORE_PASSWORD\" \\\n  -file \"$PROJECT_DIR/client.crt\"\n\n# 创建服务端信任库并导入客户端证书\nkeytool -importcert \\\n  -alias client \\\n  -file \"$PROJECT_DIR/client.crt\" \\\n  -keystore \"$PROJECT_DIR/server_truststore.jks\" \\\n  -storepass \"$SERVER_TRUSTSTORE_PASSWORD\" \\\n  -noprompt\n\n# 创建客户端信任库并导入服务端证书\nkeytool -importcert \\\n  -alias server \\\n  -file \"$PROJECT_DIR/server.crt\" \\\n  -keystore \"$PROJECT_DIR/client_truststore.jks\" \\\n  -storepass \"$CLIENT_TRUSTSTORE_PASSWORD\" \\\n  -noprompt\n```\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"09EA:11E74B:17C623:5E72B2:6AB92EEA"},"text_sha256":"058914e731ff965dd8972e25b3f1d91cb88cb381539a7d666ff4e949f293569e"},{"path":"seatunnel-dist/release-docs/licenses/LICENSE-jetty-security.txt","size":23152,"blob_sha":"46f4f25246450e63c092ea7c9b4b540472693855","priority":1,"status":200,"text":"This program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0, or the Apache Software License\n2.0 which is available at https://www.apache.org/licenses/LICENSE-2.0.\n\n\n\nEclipse Public License - v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC\nLICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM\nCONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\na) in the case of the initial Contributor, the initial code and documentation\n   distributed under this Agreement, and\nb) in the case of each subsequent Contributor:\n    i) changes to the Program, and\n   ii) additions to the Program;\n\n   where such changes and/or additions to the Program originate from and are\n   distributed by that particular Contributor. A Contribution 'originates'\n   from a Contributor if it was added to the Program by such Contributor\n   itself or anyone acting on such Contributor's behalf. Contributions do not\n   include additions to the Program which: (i) are separate modules of\n   software distributed in conjunction with the Program under their own\n   license agreement, and (ii) are not derivative works of the Program.\n\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents\" mean patent claims licensable by a Contributor which are\nnecessarily infringed by the use or sale of its Contribution alone or when\ncombined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this\nAgreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement,\nincluding all Contributors.\n\n2. GRANT OF RIGHTS\n  a) Subject to the terms of this Agreement, each Contributor hereby grants\n     Recipient a non-exclusive, worldwide, royalty-free copyright license to\n     reproduce, prepare derivative works of, publicly display, publicly\n     perform, distribute and sublicense the Contribution of such Contributor,\n     if any, and such derivative works, in source code and object code form.\n  b) Subject to the terms of this Agreement, each Contributor hereby grants\n     Recipient a non-exclusive, worldwide, royalty-free patent license under\n     Licensed Patents to make, use, sell, offer to sell, import and otherwise\n     transfer the Contribution of such Contributor, if any, in source code and\n     object code form. This patent license shall apply to the combination of\n     the Contribution and the Program if, at the time the Contribution is\n     added by the Contributor, such addition of the Contribution causes such\n     combination to be covered by the Licensed Patents. The patent license\n     shall not apply to any other combinations which include the Contribution.\n     No hardware per se is licensed hereunder.\n  c) Recipient understands that although each Contributor grants the licenses\n     to its Contributions set forth herein, no assurances are provided by any\n     Contributor that the Program does not infringe the patent or other\n     intellectual property rights of any other entity. Each Contributor\n     disclaims any liability to Recipient for claims brought by any other\n     entity based on infringement of intellectual property rights or\n     otherwise. As a condition to exercising the rights and licenses granted\n     hereunder, each Recipient hereby assumes sole responsibility to secure\n     any other intellectual property rights needed, if any. For example, if a\n     third party patent license is required to allow Recipient to distribute\n     the Program, it is Recipient's responsibility to acquire that license\n     before distributing the Program.\n  d) Each Contributor represents that to its knowledge it has sufficient\n     copyright rights in its Contribution, if any, to grant the copyright\n     license set forth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under\nits own license agreement, provided that:\n\n  a) it complies with the terms and conditions of this Agreement; and\n  b) its license agreement:\n      i) effectively disclaims on behalf of all Contributors all warranties\n         and conditions, express and implied, including warranties or\n         conditions of title and non-infringement, and implied warranties or\n         conditions of merchantability and fitness for a particular purpose;\n     ii) effectively excludes on behalf of all Contributors all liability for\n         damages, including direct, indirect, special, incidental and\n         consequential damages, such as lost profits;\n    iii) states that any provisions which differ from this Agreement are\n         offered by that Contributor alone and not by any other party; and\n     iv) states that source code for the Program is available from such\n         Contributor, and informs licensees how to obtain it in a reasonable\n         manner on or through a medium customarily used for software exchange.\n\nWhen the Program is made available in source code form:\n\n  a) it must be made available under this Agreement; and\n  b) a copy of this Agreement must be included with each copy of the Program.\n     Contributors may not remove or alter any copyright notices contained\n     within the Program.\n\nEach Contributor must identify itself as the originator of its Contribution,\nif\nany, in a manner that reasonably allows subsequent Recipients to identify the\noriginator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with\nrespect to end users, business partners and the like. While this license is\nintended to facilitate the commercial use of the Program, the Contributor who\nincludes the Program in a commercial product offering should do so in a manner\nwhich does not create potential liability for other Contributors. Therefore,\nif a Contributor includes the Program in a commercial product offering, such\nContributor (\"Commercial Contributor\") hereby agrees to defend and indemnify\nevery other Contributor (\"Indemnified Contributor\") against any losses,\ndamages and costs (collectively \"Losses\") arising from claims, lawsuits and\nother legal actions brought by a third party against the Indemnified\nContributor to the extent caused by the acts or omissions of such Commercial\nContributor in connection with its distribution of the Program in a commercial\nproduct offering. The obligations in this section do not apply to any claims\nor Losses relating to any actual or alleged intellectual property\ninfringement. In order to qualify, an Indemnified Contributor must:\na) promptly notify the Commercial Contributor in writing of such claim, and\nb) allow the Commercial Contributor to control, and cooperate with the\nCommercial Contributor in, the defense and any related settlement\nnegotiations. The Indemnified Contributor may participate in any such claim at\nits own expense.\n\nFor example, a Contributor might include the Program in a commercial product\noffering, Product X. That Contributor is then a Commercial Contributor. If\nthat Commercial Contributor then makes performance claims, or offers\nwarranties related to Product X, those performance claims and warranties are\nsuch Commercial Contributor's responsibility alone. Under this section, the\nCommercial Contributor would have to defend claims against the other\nContributors related to those performance claims and warranties, and if a\ncourt requires any other Contributor to pay any damages as a result, the\nCommercial Contributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR\nIMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each\nRecipient is solely responsible for determining the appropriateness of using\nand distributing the Program and assumes all risks associated with its\nexercise of rights under this Agreement , including but not limited to the\nrisks and costs of program errors, compliance with applicable laws, damage to\nor loss of data, programs or equipment, and unavailability or interruption of\noperations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY\nCONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION\nLOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE\nEXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY\nOF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under\napplicable law, it shall not affect the validity or enforceability of the\nremainder of the terms of this Agreement, and without further action by the\nparties hereto, such provision shall be reformed to the minimum extent\nnecessary to make such provision valid and enforceable.\n\nIf Recipient institutes patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Program itself\n(excluding combinations of the Program with other software or hardware)\ninfringes such Recipient's patent(s), then such Recipient's rights granted\nunder Section 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to\ncomply with any of the material terms or conditions of this Agreement and does\nnot cure such failure in a reasonable period of time after becoming aware of\nsuch noncompliance. If all Recipient's rights under this Agreement terminate,\nRecipient agrees to cease use and distribution of the Program as soon as\nreasonably practicable. However, Recipient's obligations under this Agreement\nand any licenses granted by Recipient relating to the Program shall continue\nand survive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in\norder to avoid inconsistency the Agreement is copyrighted and may only be\nmodified in the following manner. The Agreement Steward reserves the right to\npublish new versions (including revisions) of this Agreement from time to\ntime. No one other than the Agreement Steward has the right to modify this\nAgreement. The Eclipse Foundation is the initial Agreement Steward. The\nEclipse Foundation may assign the responsibility to serve as the Agreement\nSteward to a suitable separate entity. Each new version of the Agreement will\nbe given a distinguishing version number. The Program (including\nContributions) may always be distributed subject to the version of the\nAgreement under which it was received. In addition, after a new version of the\nAgreement is published, Contributor may elect to distribute the Program\n(including its Contributions) under the new version. Except as expressly\nstated in Sections 2(a) and 2(b) above, Recipient receives no rights or\nlicenses to the intellectual property of any Contributor under this Agreement,\nwhether expressly, by implication, estoppel or otherwise. All rights in the\nProgram not expressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the\nintellectual property laws of the United States of America. No party to this\nAgreement will bring a legal action under this Agreement more than one year\nafter the cause of action arose. Each party waives its rights to a jury trial in\nany resulting litigation.\n\n\n\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"77C8:35999:17BAF9:5E6999:6AB92EEC"},"text_sha256":"41cee10347b097e5d5358ad56b427c49751df3ae959bfce47d512c352c3c3979"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"pbek/QOwnNotes","input_row":{"repository":"pbek/QOwnNotes","url":"https://github.com/pbek/QOwnNotes","name":"QOwnNotes","owner":"pbek","description":"QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.","language":"C++","license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0","license_osi_approved":"true","stars":5889,"issues":3052,"created_at":"2014-12-02T14:38:05Z","updated_at":"2026-09-27T12:20:15Z","first_commit_at":"2014-11-29T15:48:42Z","last_commit_at":"2026-09-26T19:05:56Z","activity_months":141.88999999999999,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:49.323Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"pbek/QOwnNotes","visibility":"public","created_at":"2014-12-02T14:38:05Z","updated_at":"2026-09-27T12:20:15Z","private":false,"fork":false,"archived":false,"stargazers_count":5889,"open_issues_count":69,"license_spdx_id":"GPL-2.0","license_name":"GNU General Public License v2.0"},"error":"","rate":{"github_remaining":"1313","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F9:3BE445:17BC04D:1BE616D:6AB92EED"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1312","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0845:2EA1B4:1800368:1C2BCBE:6AB92EED"},"commit":{"sha":"bc9d9dd1b3786c93b9cc75f8c1fee893057aff99","url":"https://github.com/pbek/QOwnNotes/commit/bc9d9dd1b3786c93b9cc75f8c1fee893057aff99","date":"2018-05-24T15:55:57Z","author_date":"2018-05-24T15:55:57Z","committer_date":"2018-05-24T15:55:57Z","tree_sha":"52259fa5bedf8378f2d3c5d8e28f5e6e308d9fcb","message_first_line":"library update"},"tree_request_status":200,"tree_rate":{"github_remaining":"1311","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"089E:73962:17FFF83:1C2AEEC:6AB92EEE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8744,"blob_sha":"82f8b5d14a27b1e84a97d304fe4f474c305450bc","priority":0}],"documents":[{"path":"README.md","size":8744,"blob_sha":"82f8b5d14a27b1e84a97d304fe4f474c305450bc","priority":0,"status":200,"text":"# [QOwnNotes](http://www.qownnotes.org \"QOwnNotes Offical Site\")\n\n[Installation](http://www.qownnotes.org/installation) |\n[Changelog](https://github.com/pbek/QOwnNotes/blob/develop/CHANGELOG.md) |\n[Issues](https://github.com/pbek/QOwnNotes/issues) |\n[Releases](https://github.com/pbek/QOwnNotes/releases) |\n[Shortcuts](https://github.com/pbek/QOwnNotes/blob/develop/SHORTCUTS.md) |\n[Documentation](http://docs.qownnotes.org) |\n[Knowledge base](http://www.qownnotes.org/Knowledge-base) |\n[Screenshots](http://www.qownnotes.org) |\n[ownCloud API](https://marketplace.owncloud.com/apps/qownnotesapi) |\n[Nextcloud API](https://apps.nextcloud.com/apps/qownnotesapi) |\n[IRC Chat](https://kiwiirc.com/client/irc.freenode.net/#qownnotes) |\n[Gitter Chat](https://gitter.im/qownnotes/qownnotes)\n\n[![Build Status Linux / OS X](https://travis-ci.org/pbek/QOwnNotes.svg?branch=develop)](https://travis-ci.org/pbek/QOwnNotes)\n[![Build Status Windows](https://ci.appveyor.com/api/projects/status/github/pbek/QOwnNotes)](https://ci.appveyor.com/project/pbek/qownnotes)\n[![Coverage Status](https://coveralls.io/repos/pbek/QOwnNotes/badge.svg?branch=develop&service=github)](https://coveralls.io/github/pbek/QOwnNotes?branch=develop)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/pbek/QOwnNotes.svg)](http://isitmaintained.com/project/pbek/QOwnNotes \"Percentage of issues still open\")\n[![Crowdin](https://d322cqt584bo4o.cloudfront.net/qownnotes/localized.svg)](https://crowdin.com/project/qownnotes)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/qownnotes/qownnotes)\n[![Documentation](https://readthedocs.org/projects/qownnotes/badge/?version=develop)](http://docs.qownnotes.org)\n\n[QOwnNotes](http://www.qownnotes.org) is the **open source notepad** with [**markdown support**](https://github.com/pbek/QOwnNotes/blob/develop/src/demonotes/Markdown%20Cheatsheet.md) and **todo list manager** for **GNU/Linux**, **Mac OS X** and **Windows**, that works together with the default notes application of [**ownCloud**](https://github.com/owncloud/notes) and [**Nextcloud**](https://github.com/Nextcloud/notes).\n\nYou are able to **write down** your **thoughts** with **QOwnNotes** and **edit or search** for them later from your **mobile device**, like with [CloudNotes](http://peterandlinda.com/cloudnotes/) or the **ownCloud / Nextcloud web-service**.\n\nThe notes are stored as **plain text files** and are **synced with ownCloud's / Nextcloud's file sync** functionality.\nOf course other software, like [Syncthing](https://syncthing.net) or [Dropbox](https://www.dropbox.com) can be used too.\n\nI like the concept of having notes accessible in plain text files, like it is done in the ownCloud / Nextcloud notes apps, to gain a maximum of **freedom**, but I was not able to find a decent desktop note taking tool or a text editor, that handles them well. Out of this need **QOwnNotes** was born.\n\nVisit the project page here: [QOwnNotes project page](http://www.qownnotes.org)\n\nTo manage your **todo lists** in the web and on your mobile devices, you need to install the Tasks backend on [ownCloud](https://marketplace.owncloud.com/apps/tasks) or [Nextcloud](https://apps.nextcloud.com/apps/tasks).\n\nTo get more on-line features for your notes, like **versioning** and **trash** access, you might also want to install the [QOwnNotesAPI](https://github.com/pbek/qownnotesapi) app on your server.\n\nTo access your ownCloud notes from your **mobile device** you may want to get these:\n- For Android and OwnCloud: [MyOwnNotes](https://f-droid.org/app/org.aykit.MyOwnNotes)\n- For Android and Nextcloud: [Notes](https://f-droid.org/packages/it.niedermann.owncloud.notes)\n- For iOS: [CloudNotes](https://itunes.apple.com/app/cloudnotes-owncloud-notes/id813973264)\n\nOn Android you could also use any sync-tool like *Synchronize Ultimate* or *FolderSync* to sync your note files and use software like *neutriNotes* or [**Markor**](https://f-droid.org/packages/net.gsantner.markor/) to edit your notes.\n\n## Screenshot\n\n![Screenhot](screenshots/screenshot.png)\n\nYou can visit the [QOwnNotes project page](http://www.qownnotes.org) for more **screenshots**.\n\n## Features\n\n- multiple note folders can be used\n- older versions of your notes can be restored from your ownCloud / Nextcloud server (install [QOwnNotesAPI](https://github.com/pbek/qownnotesapi) on your server)\n- trashed notes can be restored from your ownCloud / Nextcloud server (install [QOwnNotesAPI](https://github.com/pbek/qownnotesapi) on your server)\n- sub-string searching of notes is possible and search results are highlighted in the notes\n- application can be operated with customizable keyboard shortcuts\n- external changes of note files are watched (notes or note list are reloaded)\n- differences between current note and externally changed note are showed in a dialog\n- markdown highlighting of notes and a markdown preview mode\n- notes are getting their name from the first line of the note text (just like in the ownCloud notes web-application) and the note text files are automatically renamed, if the the first line changes\n    - this feature can also be turned off and you can use any filename you like\n- manage your ownCloud todo lists (ownCloud tasks or Tasks Plus / Calendar Plus)\n- encryption of notes (AES-256 is built in or you can use custom encryption methods like\n  **[Keybase.io](https://keybase.io)** ([encryption-keybase.qml](https://github.com/pbek/QOwnNotes/blob/develop/doc/scripting/encryption-keybase.qml)) or\n  **PGP** ([encryption-pgp.qml](https://github.com/pbek/QOwnNotes/blob/develop/doc/scripting/encryption-pgp.qml)))\n- dark mode theme support\n- all panels can be placed wherever you want, they can even float or stack (fully dockable)\n- toolbars are fully customizable\n- support for freedesktop theme icons, so you can use QOwnNotes with your\n  native desktop icons and with your favorite dark desktop theme\n  QOwnNotes supports Freedesktop icon themes\n- QOwnNotes is available in many different languages like English, German,\n  French, Polish, Chinese, Russian, Portuguese, Hungarian, Dutch and Spanish\n    - [your kind help](http://www.qownnotes.org/Knowledge-base/How-can-I-help-to-translate-QOwnNotes)\n      is needed to maintain these translations or to translate QOwnNotes\n      in more languages\n- support for hierarchical note tagging and note subfolders\n- support for sharing notes on your ownCloud / Nextcloud server\n- portable mode for carrying QOwnNotes around on USB sticks\n- Evernote import\n\n## Building QOwnNotes\n\nTo get the most current features you can build the application from the source\ncode. Download the latest source here:\n[QOwnNotes Source on GitHub as ZIP](https://github.com/pbek/QOwnNotes/archive/develop.zip)\n\nAlternatively you can also checkout the code directly from the git repository:\n\n```shell\ngit clone https://github.com/pbek/QOwnNotes.git -b master\ncd QOwnNotes\ngit submodule update --init\n```\n\nThen download [Qt Creator](http://www.qt.io/download-open-source), open the\nproject file `src/QOwnNotes.pro` and click on *Build / Run*.\n\nOr you can build it directly in your terminal:\n\n```shell\ncd src\nqmake\nmake\n```\n\nPlease feel free to contribute source code to this project, make suggestions or report troubles on the [QOwnNotes issues page](https://github.com/pbek/QOwnNotes/issues)!\n\nYou can also visit [QOwnNotes on GitHub](https://github.com/pbek/QOwnNotes).\n\n## Chat\n\n### IRC\n\nIf you are having trouble or would like to help out, join `#qownnotes` on Freenode.\n\nKiwi IRC (IRC in your web browser): [QOwnNotes IRC](https://kiwiirc.com/client/irc.freenode.net/#qownnotes)\n\n### Join the Gitter channel\n\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/qownnotes/qownnotes)\n\n## Minimum software requirements\n\n- A desktop operating system, that supports [Qt](http://www.qt.io/)\n- Qt 5.3+\n- gcc 4.8+\n\n## Disclaimer\n\nThis SOFTWARE PRODUCT is provided by THE PROVIDER \"as is\" and \"with all faults.\" THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT.\n\nThere are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.\n\n[![Piwik Stats](https://p.bekerle.com/piwik.php?idsite=3&rec=1)](http://www.qownnotes.org)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"D0BE:376DE:182F36:5EDE66:6AB92EED"},"text_sha256":"2c60f8bd4bebbd9e568eb94b42182f31acc698dcf0e2828a4ba411682a161a51"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1310","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CA:3C4024:182CFE4:1C586F3:6AB92EEE"},"commit":{"sha":"013f1b239df671f62e1aae605aa6cc73aed1da93","url":"https://github.com/pbek/QOwnNotes/commit/013f1b239df671f62e1aae605aa6cc73aed1da93","date":"2026-06-29T16:43:30Z","author_date":"2026-06-29T16:43:30Z","committer_date":"2026-06-29T16:43:30Z","tree_sha":"617ef4a5c245754348a71af8fce142503e625279","message_first_line":"#3651 macos: attempt to fix app closing issue"},"tree_request_status":200,"tree_rate":{"github_remaining":"1309","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B9:724D2:17F8B2D:1C241BB:6AB92EEF"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12408,"blob_sha":"84c0b698b512a03df895879d7f44b3507bd17b00","priority":0},{"path":"PRIVACY.md","size":1290,"blob_sha":"802d3bc869395458a8c373d3a4b7458f73ab9a4d","priority":1}],"documents":[{"path":"README.md","size":12408,"blob_sha":"84c0b698b512a03df895879d7f44b3507bd17b00","priority":0,"status":200,"text":"# [QOwnNotes](https://www.qownnotes.org \"QOwnNotes Official Site\")\n\n[Installation](https://www.qownnotes.org/installation) |\n[Changelog](https://www.qownnotes.org/changelog.html) |\n[Issues](https://github.com/pbek/QOwnNotes/issues) |\n[Shortcuts](https://www.qownnotes.org/getting-started/shortcuts.html) |\n[Documentation](https://www.qownnotes.org/getting-started/concept.html) |\n[Privacy Policy](./PRIVACY.md) |\n[Screenshots](https://www.qownnotes.org/getting-started/overview.html) |\n[Nextcloud API App](https://apps.nextcloud.com/apps/qownnotesapi) |\n[ownCloud API App](https://marketplace.owncloud.com/apps/qownnotesapi) |\n[Matrix room](https://matrix.to/#/#qownnotes:matrix.org) |\n[Telegram Group](https://t.me/QOwnNotes) |\n[IRC Chat](https://web.libera.chat/#qownnotes) |\n[Mastodon](https://social.qownnotes.org/@qownnotes) |\n[QOwnNotes Web Companion Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/qownnotes-web-companion/) |\n[QOwnNotes Web Companion Chrome extension](https://chrome.google.com/webstore/detail/qownnotes-web-companion/pkgkfnampapjbopomdpnkckbjdnpkbkp) |\n[QOwnNotes Web App](https://app.qownnotes.org/) |\n[QOwnNotes Tor Hidden Service](http://qownnotn3bknenanjs5u4nf3f2law2tzmqklux3c5e2xbvzcksmxm6yd.onion/)\n\n[![Build Status GitHub Actions](https://github.com/pbek/QOwnNotes/actions/workflows/build-test.yml/badge.svg)](https://github.com/pbek/QOwnNotes/actions/workflows/build-test.yml)\n[![Build Status Windows](https://ci.appveyor.com/api/projects/status/github/pbek/QOwnNotes)](https://ci.appveyor.com/project/pbek/qownnotes)\n[![Snap Status](https://snapcraft.io/qownnotes/badge.svg)](https://snapcraft.io/qownnotes)\n[![Coverage Status](https://coveralls.io/repos/pbek/QOwnNotes/badge.svg?branch=main&service=github)](https://coveralls.io/github/pbek/QOwnNotes?branch=main)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/pbek/QOwnNotes.svg)](http://isitmaintained.com/project/pbek/QOwnNotes \"Percentage of issues still open\")\n[![Crowdin](https://d322cqt584bo4o.cloudfront.net/qownnotes/localized.svg)](https://crowdin.com/project/qownnotes)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/qownnotes/qownnotes)\n\n[QOwnNotes](https://www.qownnotes.org) is the **open source notepad** with\n[**Markdown support**](https://github.com/pbek/QOwnNotes/blob/main/src/demonotes/Markdown%20Cheatsheet.md)\nand **todo list manager** for **GNU/Linux**, **macOS** and **Windows**,\nthat works together with [**Nextcloud Notes**](https://github.com/Nextcloud/notes)\nand [**ownCloud Notes**](https://github.com/owncloud/notes).\n\nYou are able to **write down** your **thoughts** with **QOwnNotes** and\n**edit or search** for them later from your **mobile device**, like with\n[Nextcloud Notes for Android](https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes)\nor the **Nextcloud / ownCloud web-service**.\n\nThe notes are stored as **plain text markdown files** and are\n**synced with Nextcloud's/ownCloud's file sync** functionality.\nOf course other software, like [Syncthing](https://syncthing.net) or\n[Dropbox](https://www.dropbox.com) can be used too.\n\nIf you like the concept of having notes accessible in plain text files, like it\nis done in the Nextcloud / ownCloud notes apps to gain a maximum of **freedom**\nthen QOwnNotes is for you.\n\nVisit the project page here: [QOwnNotes project page](https://www.qownnotes.org)\n\nTo manage your **todo lists** in the web and on your mobile devices, you need to\ninstall the Tasks backend on [Nextcloud](https://apps.nextcloud.com/apps/tasks)\nor [ownCloud](https://marketplace.owncloud.com/apps/tasks).\n\nTo get more on-line features for your notes, like **versioning** and **trash** access,\nyou might also want to install the [QOwnNotesAPI](https://github.com/pbek/qownnotesapi)\napp on your server.\n\nTo access your ownCloud notes from your **mobile device** you may want to get one of these:\n\n- For Android and OwnCloud: [MyOwnNotes](https://f-droid.org/app/org.aykit.MyOwnNotes)\n- For Android and Nextcloud: [Notes](https://f-droid.org/packages/it.niedermann.owncloud.notes)\n- For iOS: [CloudNotes](https://itunes.apple.com/app/cloudnotes-owncloud-notes/id813973264)\n\nOn Android you could also use any sync-tool like _Synchronize Ultimate_ or _FolderSync_\nto sync your note files and use software like _neutriNotes_ or\n[**Markor**](https://f-droid.org/packages/net.gsantner.markor/) to edit your notes.\n\nOn iOS [Notebooks](https://www.notebooksapp.com/ios)\nmay also work well (syncing notes via WebDAV).\n\n## Screenshot\n\n![Screenhot](screenshots/screenshot.png)\n\nYou can visit the [QOwnNotes project page](https://www.qownnotes.org) for more **screenshots**.\n\n## Features\n\n- written in C++ and optimized for **low resource consumption** (no CPU and memory-hungry Electron app)\n- **multiple note folders** can be used\n- you can **use your existing text or markdown files**, no need for an import most of the time\n- older **versions of your notes** can be restored from your Nextcloud / ownCloud server\n  (install [QOwnNotesAPI](https://github.com/pbek/qownnotesapi) on your server)\n- **trashed notes** can be restored from your Nextcloud / ownCloud server\n  (install [QOwnNotesAPI](https://github.com/pbek/qownnotesapi) on your server)\n  - there also are **local trash** and **system trash** modes\n- sub-string searching of notes is possible and search results are highlighted in the notes\n- application can be operated with **customizable keyboard shortcuts**\n  - supports **global keyboard shortcuts on Wayland**\n- external changes of note files are watched (notes or note list are reloaded)\n- differences between current note and externally changed note are shown in a dialog\n- **markdown highlighting** of notes and a markdown **preview**\n  - includes **inline image previews**, **heading folding**, and optional hiding of Markdown formatting syntax\n- optional **wiki-style note links** like `[[Note]]` with auto-completion, heading anchors, aliases, backlinks, and refactoring support\n- **[spellchecking](https://www.qownnotes.org/editor/spellchecking.html)** and optional **[LanguageTool grammar and style checking](https://www.qownnotes.org/editor/languagetool.html)**, **[Harper grammar and style checking](https://www.qownnotes.org/editor/harper.html)**, and **[Markdown LSP](https://www.qownnotes.org/editor/markdownlsp.html)** support (e.g. [Marksman](https://github.com/artempyanykh/marksman) for completions and diagnostics, or [Rumdl](https://github.com/rvben/rumdl) for linting)\n- **tabbing support** for editing notes\n- scripting support and an online [script repository](https://github.com/qownnotes/scripts)\n  where you can install scripts inside the application\n- built-in **AI support** with script integration for providers like **OpenAI** and **Groq**\n  - includes a built-in **MCP server** so external AI agents can search and fetch notes securely\n- [QOwnNotes Web Companion browser extension](https://github.com/qownnotes/web-companion)\n  to add notes from the selected text and other features\n  - visit the [Chrome Web Store](https://chrome.google.com/webstore/detail/qownnotes-web-companion/pkgkfnampapjbopomdpnkckbjdnpkbkp)\n    page to install the app on Google Chrome\n  - visit the [Firefox Add-ons](https://addons.mozilla.org/firefox/addon/qownnotes-web-companion)\n    page to install the app on Mozilla Firefox\n- notes are getting their name from the first line of the note text (just like\n  in the Nextcloud / ownCloud notes web-application) and the note text files are\n  automatically renamed, if the first line changes\n  - this feature can also be turned off, and you can use any filename you like\n- manage your Nextcloud / ownCloud todo lists (ownCloud tasks or Tasks Plus / Calendar Plus), or use another **CalDAV** server\n- create [Nextcloud Deck](https://apps.nextcloud.com/apps/deck) cards and link to them in your notes\n- **encryption of notes** (AES-256 is built in, or you can use custom encryption methods like\n  **[Keybase.io](https://keybase.io)** ([encryption-keybase.qml](https://github.com/pbek/QOwnNotes/blob/main/docs/scripting/examples/encryption-keybase.qml)) or\n  **PGP** ([encryption-pgp.qml](https://github.com/pbek/QOwnNotes/blob/main/docs/scripting/examples/encryption-pgp.qml)))\n- **dark mode** theme support, live theme switching, and custom **color modes**\n- all **panels can be placed wherever you want**, they can even float or stack (fully dockable)\n- **toolbars** are **fully customizable**\n- support for **freedesktop theme icons**, so you can use QOwnNotes with your\n  native desktop icons and with your favorite dark desktop theme\n  QOwnNotes supports Freedesktop icon themes\n- support for hierarchical **note tagging** and **note subfolders**\n  - linked files and attachments can be managed from the **Navigation panel**\n- support for **sharing notes** on your Nextcloud / ownCloud server\n- **portable mode** for carrying QOwnNotes around on USB sticks\n- **Vim mode**\n- **distraction free mode**, **full-screen mode**, **typewriter mode**\n- Evernote (now with large files and optional **YAML front matter** metadata) and Joplin import\n- QOwnNotes is **available in over 60 different languages** like English, German,\n  French, Polish, Chinese, Japanese, Russian, Portuguese, Hungarian, Dutch and Spanish\n  - [Your help](https://www.qownnotes.org/contributing/translation.html) is\n    very much appreciated to improve these translations or to translate\n    QOwnNotes in more languages\n  - Join the fun at **[Crowdin](https://crowdin.com/project/qownnotes)**\n    to **help** with the **translations**\n\n## Installation\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/qownnotes.svg?columns=3)](https://repology.org/project/qownnotes/versions)\n\nPlease visit [Installation](https://www.qownnotes.org/installation) for all the ways to install QOwnNotes.\n\n## Building QOwnNotes\n\nTo get the most current features you can build the application from the source\ncode. Download the latest source here:\n[QOwnNotes Source on GitHub as ZIP](https://github.com/pbek/QOwnNotes/archive/main.zip)\n\nAlternatively you can also check out the code directly from the git repository:\n\n```shell\ngit clone https://github.com/pbek/QOwnNotes.git -b release --depth=1\ncd QOwnNotes\ngit submodule update --init\n```\n\nThen download [Qt Creator](https://www.qt.io/download-open-source), you will also\nneed the packages `qtwebsockets` to build QOwnNotes with Qt6\n(only `qtwebsockets` for Qt5). If you build under Windows, you want to stick to\n_MinGw 64-bit_.\n\nAfterward open the project file `src/QOwnNotes.pro` and click on\n**Build** / **Build Project QOwnNotes**.\n\nOr you can build it directly in your terminal:\n\n```shell\ncd src\n\n# build binary translation files if you want another language than English\nlrelease QOwnNotes.pro\n\n# prepare build process and build the application\nqmake\nmake -j4\n```\n\n### Building QOwnNotes For Development\n\nIf you are going to work with the code, then you can do the following instead of the above:\n\n```shell\ncd src\nqmake CONFIG+=DEV_MODE CONFIG+=debug ..\nmake -j4\n```\n\nThe `DEV_MODE` variable enabled higher warning levels + precompiled headers.\n\nPlease feel free to contribute source code to this project, make suggestions or\nreport troubles on the [QOwnNotes issues page](https://github.com/pbek/QOwnNotes/issues)!\n\nYou can also visit [QOwnNotes on GitHub](https://github.com/pbek/QOwnNotes).\n\n## Minimum software requirements\n\n- A desktop operating system, that supports [Qt](https://www.qt.io)\n- Qt 5.5+ / Qt 6.0+\n- gcc 4.8+\n\n## Disclaimer\n\nThis SOFTWARE PRODUCT is provided by THE PROVIDER \"as is\" and \"with all faults.\"\nTHE PROVIDER makes no representations or warranties of any kind concerning the\nsafety, suitability, lack of viruses, inaccuracies, typographical errors, or\nother harmful components of this SOFTWARE PRODUCT.\n\nThere are inherent dangers in the use of any software, and you are solely\nresponsible for determining whether this SOFTWARE PRODUCT is compatible with\nyour equipment and other software installed on your equipment. You are also\nsolely responsible for the protection of your equipment and backup of your data,\nand THE PROVIDER will not be liable for any damages you may suffer in connection\nwith using, modifying, or distributing this SOFTWARE PRODUCT.\n\n[![Matomo Stats](https://p.bekerle.com/piwik.php?idsite=3&rec=1)](https://www.qownnotes.org)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6654:3E1DA:17BEAD:5E6CF2:6AB92EED"},"text_sha256":"aa98af7eab188058be09118155e79a838e19b608931586d2f5dc4961488f413b"},{"path":"PRIVACY.md","size":1290,"blob_sha":"802d3bc869395458a8c373d3a4b7458f73ab9a4d","priority":1,"status":200,"text":"# Privacy Policy for QOwnNotes\n\n## 1. Introduction\n\nThis policy outlines how QOwnNotes handles privacy-related requests and manages personal information in our GitHub repository.\n\n## 2. How We Use Information\n\nInformation in our repository is used for:\n\n- Project development and improvement\n- Bug tracking and feature requests\n- Community interaction and collaboration\n\n## 3. Privacy Requests\n\nWe respect your privacy rights. If you wish to have your personal information anonymized or removed:\n\na. **Self-Service Option**:\n\n- You can edit or delete your own comments and contributions.\n- For issues you've created, you can close them if no longer relevant.\n\nb. **Anonymization Requests**:\n\n- Contact GitHub Support to request anonymization of your content.\n- We will cooperate with GitHub to fulfill valid requests.\n\n## 4. Data Retention\n\n- Public contributions remain part of the project's history unless removed or anonymized through the processes described above.\n- We do not collect or retain private information beyond what is publicly shared on GitHub.\n\n## 5. Changes to This Policy\n\nWe may update this policy as needed. Significant changes will be communicated through our GitHub repository.\n\n## 6. Contact\n\nFor questions about this policy, please open an issue in our repository.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5C20:38C7FC:1814AF:5AE0C9:6AB92EEF"},"text_sha256":"eaf12a06420c267e89c95e17879c471ee7a7d99fcbf35610e7313fce8643e4d6"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":2,"D1_evidence":"sha=013f1b239df671f62e1aae605aa6cc73aed1da93; file=PRIVACY.md; text=## 1. Introduction This policy outlines how QOwnNotes handles privacy-related requests and manages personal information in our GitHub repository. ## 2. How We Use Information","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=013f1b239df671f62e1aae605aa6cc73aed1da93; file=PRIVACY.md; text=## 1. Introduction This policy outlines how QOwnNotes handles privacy-related requests and manages personal information in our GitHub repository. ## 2. How We Use Information","C2":"sha=013f1b239df671f62e1aae605aa6cc73aed1da93; file=PRIVACY.md; text=This policy outlines how QOwnNotes handles privacy-related requests and manages personal information in our GitHub repository. ## 2. How We Use Information Information in our repository is used for: - Project development and improvement"}}}}
{"repository":"mock-server/mockserver-monorepo","input_row":{"repository":"mock-server/mockserver-monorepo","url":"https://github.com/mock-server/mockserver-monorepo","name":"mockserver-monorepo","owner":"mock-server","description":"MockServer is an HTTP(S) mock server and proxy for testing that lets you mock APIs, inspect and modify live traffic, and inject failures. It supports HTTP/1.1, HTTP/2, gRPC, WebSockets, TCP and more on a single port, with additional support for HTTP/3, message brokers, and AI/LLM APIs.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4976,"issues":1279,"created_at":"2013-02-26T06:09:52Z","updated_at":"2026-09-27T12:56:23Z","first_commit_at":"2013-02-26T06:09:52Z","last_commit_at":"2026-09-27T12:56:13Z","activity_months":162.99000000000001,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:57:52.718Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"mock-server/mockserver-monorepo","visibility":"public","created_at":"2013-02-26T06:09:52Z","updated_at":"2026-09-27T12:56:23Z","private":false,"fork":false,"archived":false,"stargazers_count":4976,"open_issues_count":0,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1308","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0808:77994:18149C7:1C3FFE3:6AB92EF0"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1307","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A9:76AED:181EF13:1C4A858:6AB92EF1"},"commit":{"sha":"64dfe2f64fb52b7d1cf01526092154139f611589","url":"https://github.com/mock-server/mockserver-monorepo/commit/64dfe2f64fb52b7d1cf01526092154139f611589","date":"2018-03-12T22:49:02Z","author_date":"2018-03-12T22:49:02Z","committer_date":"2018-03-12T22:49:02Z","tree_sha":"c813fba4c863ca6946a28ee4efb5739679266105","message_first_line":"added support for ping websockets and renamed handler"},"tree_request_status":200,"tree_rate":{"github_remaining":"1306","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0894:3C4024:182D17D:1C588CB:6AB92EF1"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7754,"blob_sha":"18a01bfc459b98b67835f2f7e241ec9c90f11f77","priority":0}],"documents":[{"path":"README.md","size":7754,"blob_sha":"18a01bfc459b98b67835f2f7e241ec9c90f11f77","priority":0,"status":200,"text":"MockServer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![Build status](https://badge.buildkite.com/3b6803f4fe98cb5ed7bf18292a1434f800b53d8fecb92811d8.svg?branch=master&style=square&theme=slack)](https://buildkite.com/mockserver/mockserver)\n========== \n\n\n\n# Documentation\n\nFor usage guide please see: [www.mock-server.com](http://www.mock-server.com/)\n\nFor chat room: [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jamesdbloom/mockserver?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n# Versions\n\n### Maven Central [![mockserver](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-netty/badge.svg?style=flat)](http://search.maven.org/#search%7Cga%7C1%7Cmockserver)\n\nMaven Central contains the following MockServer artifacts:\n\n* [mockserver-netty](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-netty) - an HTTP(S) web server that mocks and records requests and responses\n* [mockserver-netty:jar-with-dependencies](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-netty) - mockserver-netty (as above) with all dependencies embedded\n* [mockserver-war](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-war) - a deployable WAR for mocking HTTP(S) responses (for any JEE web server)\n* [mockserver-proxy-war](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-proxy-war) - a deployable WAR that records requests and responses (for any JEE web server)\n* [mockserver-maven-plugin](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-maven-plugin) - a maven plugin to start, stop and fork MockServer using maven\n* [mockserver-client-java](https://maven-badges.herokuapp.com/maven-central/org.mock-server/mockserver-client-java) - a Java client to communicate with both the server and the proxy\n\nIn addition MockServer SNAPSHOT artifacts can also be found on [Sonatype](https://oss.sonatype.org/index.html#nexus-search;quick~org.mock-server).\n\n### Node Module & Grunt Plugin\n\nNPM Registry contains the following module:\n\n* [mockserver-node](https://www.npmjs.org/package/mockserver-node) - a Node.js module and Grunt plugin to start and stop MockServer\n    [![mockserver-node](https://nodei.co/npm/mockserver-node.png?downloads=true)](https://www.npmjs.org/package/mockserver-node)\n* [mockserver-client-node](https://www.npmjs.org/package/mockserver-client) - a Node.js client for both the MockServer and the proxy \n    [![mockserver-client-node](https://nodei.co/npm/mockserver-client.png?downloads=true)](https://www.npmjs.org/package/mockserver-client)\n\n### Docker Hub\n\nDocker Hub contains the following artifacts:\n\n* [MockServer Docker Container](https://hub.docker.com/r/jamesdbloom/mockserver/) - a Docker container containing the Netty MockServer and proxy\n\n### Helm Chart\n\n* [MockServer Helm Chart](helm/mockserver/README.md) - a Helm Chart that installs MockServer to a Kubernetes cluster\n\n### MockServer Clients\n\n* [mockserver-client-ruby ![mockserver-client](https://badge.fury.io/rb/mockserver-client.png)](https://rubygems.org/gems/mockserver-client) - Ruby client for both the MockServer and the proxy \n* [mockserver-client-java](http://search.maven.org/#search%7Cga%7C1%7Cmockserver-client-java) - a Java client for both the MockServer and the proxy \n* [mockserver-client-node](https://www.npmjs.org/package/mockserver-client) - a Node.js and [browser](https://rawgit.com/jamesdbloom/mockserver-client-node/mockserver-5.3.0/mockServerClient.js) client for both the MockServer and the proxy\n\n### API Versions\nDate       | Version | Java API                                                              | REST API\n:--------- |:------- |:--------------------------------------------------------------------- |:-----------\n25-Dec-17  | 5.3.0\t | [Java API](http://mock-server.com/versions/5.3.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.2.x)\n17-Dec-17  | 5.2.3\t | [Java API](http://mock-server.com/versions/5.2.3/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.2.x)\n12-Dec-17  | 5.2.2\t | [Java API](http://mock-server.com/versions/5.2.2/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.2.x)\n11-Dec-17  | 5.2.1\t | [Java API](http://mock-server.com/versions/5.2.1/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.2.x)\n10-Dec-17  | 5.2.0\t | [Java API](http://mock-server.com/versions/5.2.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.2.x)\n06-Dec-17  | 5.1.1\t | [Java API](http://mock-server.com/versions/5.1.1/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.1.x)\n05-Dec-17  | 5.1.0\t | [Java API](http://mock-server.com/versions/5.1.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.1.x)\n05-Dec-17  | 5.0.1\t | [Java API](http://mock-server.com/versions/5.0.1/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.0.x)\n04-Dec-17  | 5.0.0\t | [Java API](http://mock-server.com/versions/5.0.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.0.x)\n30-Nov-17  | 4.1.0\t | [Java API](http://mock-server.com/versions/4.1.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/4.x.x)\n28-Nov-17  | 4.0.0\t | [Java API](http://mock-server.com/versions/4.0.0/apidocs/index.html)  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/4.x.x)\n16-Nov-17  | 3.12\t | [Java API](http://mock-server.com/versions/3.12/apidocs/index.html)   | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n10-Sep-17  | 3.11\t | [Java API](http://mock-server.com/versions/3.11/apidocs/index.html)   | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n22-Jun-17  | 3.10.8\t | [Java API](http://mock-server.com/versions/3.10.8/apidocs/index.html) | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n02-May-17  | 3.10.7\t | [Java API](http://mock-server.com/versions/3.10.7/apidocs/index.html) | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n27-Apr-17  | 3.10.6\t | [Java API](http://mock-server.com/versions/3.10.6/apidocs/index.html) | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n25-Apr-17  | 3.10.5\t | [Java API](http://mock-server.com/versions/3.10.5/apidocs/index.html) | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n06-Mar-16  | 3.10.4\t |  | [REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server_api/3.x.x)\n\n# Issues\n\nIf you have any problems, please [check the project issues](https://github.com/jamesdbloom/mockserver/issues?state=open).\n\n# Contributions\n\nPull requests are, of course, very welcome! Please read our [contributing to the project](https://github.com/jamesdbloom/mockserver/wiki/Contributing-to-the-project) guide first. Then head over to the [open issues](https://github.com/jamesdbloom/mockserver/issues?state=open) to see what we need help with. Make sure you let us know if you intend to work on something. Also, check out the [milestones](https://github.com/jamesdbloom/mockserver/milestones) to see what is planned for future releases.\n\n# Maintainers\n* [James D Bloom](http://blog.jamesdbloom.com)\n\n[![Analytics](https://ga-beacon.appspot.com/UA-32687194-4/mockserver/README.md)](https://github.com/igrigorik/ga-beacon)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5E10:1A3D83:1890BD:5F3FB6:6AB92EF1"},"text_sha256":"701a1f385ad9d0c4aadd44f3ea879c27277b12649eb76647cab5dc982458003c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1305","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079C:2D7D17:17ACB85:1BD672C:6AB92EF2"},"commit":{"sha":"223a176b9b1850667f002cf85a18aaeacd34ba4e","url":"https://github.com/mock-server/mockserver-monorepo/commit/223a176b9b1850667f002cf85a18aaeacd34ba4e","date":"2026-06-30T23:52:15Z","author_date":"2026-06-30T23:52:15Z","committer_date":"2026-06-30T23:52:15Z","tree_sha":"7017726d056f1a0ebde59060bd9cd6d7fdb25c63","message_first_line":"build(deps): bump the maven-minor-and-patch group (#2384)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1304","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0877:6E4BB:18283DA:1C533BF:6AB92EF2"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":28498,"blob_sha":"c82720507537e129c66573d04cd99cbc9f68cc11","priority":0},{"path":".claude/agents/security-auditor.md","size":3915,"blob_sha":"9f56a8a0dd25572c3a5cf9190da00da6c8489bd0","priority":1},{"path":".opencode/agents/security-auditor.md","size":3631,"blob_sha":"df52644ab96a9e76545cdcae799c5cac7607563e","priority":1},{"path":".opencode/rules/testing-policy.md","size":4181,"blob_sha":"523ed03596249121190cb06cce46ba55bf698ed2","priority":1},{"path":"docs/code/llm-security-audit.md","size":8895,"blob_sha":"4614f81a9adae8a7a80649e67aa369b28c4da8e0","priority":1},{"path":"docs/code/tls-and-security.md","size":34108,"blob_sha":"ac4330474570c0e663a44d95d22249c92f9e3243","priority":1},{"path":"docs/operations/security.md","size":28732,"blob_sha":"d388ec3800316cb5bf72e5b52550b1fa366207fe","priority":1},{"path":"docs/operations/snyk-security.md","size":6248,"blob_sha":"f09ce70c5c799370866005f18176288ab124db54","priority":1},{"path":"docs/plans/later/security-defaults.md","size":12447,"blob_sha":"6e01bf4384fd99131bb81c2e90408566c43fdbe3","priority":1},{"path":"jekyll-www.mock-server.com/.well-known/security.txt","size":187,"blob_sha":"79c0c3503d6bcedc8a882a564aceee340a6e3cb4","priority":1},{"path":"jekyll-www.mock-server.com/mock_server/dashboard_privacy.html","size":10312,"blob_sha":"32c51928907814e4be5926bcabda7a39d3a698b4","priority":1},{"path":"SECURITY.md","size":12637,"blob_sha":"13c96565e5c7b7cbf4557ed5176771a39db30c3f","priority":1}],"documents":[{"path":"README.md","size":28498,"blob_sha":"c82720507537e129c66573d04cd99cbc9f68cc11","priority":0,"status":200,"text":"MockServer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [![Build status](https://badge.buildkite.com/3b6803f4fe98cb5ed7bf18292a1434f800b53d8fecb92811d8.svg?branch=master&style=square&theme=slack)](https://buildkite.com/mockserver/mockserver) \n[![GitHub license](https://img.shields.io/github/license/mock-server/mockserver-monorepo.svg)](https://github.com/mock-server/mockserver-monorepo/blob/master/LICENSE.md) \n[![GitHub stars](https://img.shields.io/github/stars/mock-server/mockserver-monorepo.svg)](https://github.com/mock-server/mockserver-monorepo/stargazers) \n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/mockserver)](https://artifacthub.io/packages/search?repo=mockserver)\n=====\n\nMockServer is an HTTP(S) **mock server** and **proxy** for testing. It does three things:\n\n- **Mock** the APIs your application depends on, so you can develop and test against systems that are unavailable, incomplete, or hard to reproduce.\n- **Proxy** real traffic to record, inspect, and modify requests and responses in flight — and pause them at interactive **proxy breakpoints** to step through, edit, or abort each exchange like a debugger for network traffic.\n- **Chaos engineering** — make dependencies misbehave on demand, injecting latency, dropped connections, and errors to test how your application copes when the systems it relies on degrade or fail.\n\n**Speaks every protocol your stack uses.** HTTP/1.1 & HTTPS, HTTP/2, gRPC & gRPC-Web, WebSockets and raw TCP are auto-detected from the first bytes of each connection, so one MockServer port handles them all with no per-protocol configuration. Beyond that core: HTTP/3 (QUIC — experimental, on its own UDP port), JSON-RPC for MCP/A2A mocking, AsyncAPI-driven message-broker testing against external Kafka and MQTT brokers, and mocked AI/LLM chat-completion APIs (OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI, Ollama).\n\n### Main Features\n\n- **Mock any API** — HTTP/1.1, HTTPS, HTTP/2, HTTP/3, gRPC, gRPC-Web, JSON-RPC, WebSockets, raw TCP, and message brokers (Kafka, MQTT). Match requests on method, path, query, headers, cookies and body (JSON, XML, JSONPath, XPath, regex, OpenAPI) and return configured responses.\n- **Proxy & record** — port forwarding, web (HTTP) proxy, HTTPS tunneling (CONNECT) and SOCKS, with full visibility of even TLS-encrypted traffic.\n- **Dynamic responses** — response templating (Velocity, Mustache, JavaScript), class/closure callbacks and webhooks.\n- **OpenAPI** — generate expectations directly from an OpenAPI/Swagger specification.\n- **Verification** — assert which requests were received, in what order, and how many times.\n- **Chaos & resilience testing** — inject latency, dropped/slow connections and failures to test how your system copes with a misbehaving dependency.\n- **LLM / AI mocking** — mock chat-completion APIs for OpenAI, Anthropic, Gemini, Bedrock, Azure OpenAI and Ollama (including streaming), plus a built-in MCP server for AI coding assistants.\n- **Live dashboard** — watch requests, expectations and logs in real time at `/mockserver/dashboard`.\n- **Clients & integrations** — Java, JavaScript/Node, Python and Ruby clients, plus JUnit and Spring support.\n- **Run anywhere** — Docker, Helm/Kubernetes, JAR or WAR, with optional clustered state for multi-instance deployments.\n\nSee the [changelog](changelog.md) for what has shipped in each version.\n\n### Getting started in 60 seconds\n\nRun MockServer with Docker, then mock an endpoint and call it:\n\n```bash\n# 1. Start MockServer\ndocker run -d --rm -p 1080:1080 mockserver/mockserver\n\n# 2. Mock an endpoint: GET /hello -> 200 \"Hello World\"\n#    (MockServer exposes a REST control plane on the same port)\ncurl -X PUT http://localhost:1080/mockserver/expectation \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n        \"httpRequest\":  { \"method\": \"GET\", \"path\": \"/hello\" },\n        \"httpResponse\": { \"statusCode\": 200, \"body\": \"Hello World\" }\n      }'\n\n# 3. Call your mock\ncurl http://localhost:1080/hello\n# -> Hello World\n```\n\n…or, on macOS / Linux, install it with [Homebrew](https://brew.sh/) and run the `mockserver` command directly:\n\n```bash\nbrew install mockserver\nmockserver run --port 1080\n```\n\n#### One-command recipes\n\nFor common end-to-end setups, the [`examples/docker-compose`](examples/docker-compose) recipes are a single `docker compose up` each — mock from an OpenAPI spec, a record/replay proxy, a contract-validating proxy, or a chaos proxy:\n\n```bash\ncd examples/docker-compose/mock-from-openapi\ndocker compose up\ncurl http://localhost:1080/pets\n```\n\nThe same can be done from any client library or the dashboard at <http://localhost:1080/mockserver/dashboard>. For more configuration options see the [Docker documentation](https://www.mock-server.com/where/docker.html).\n\nFor every way to run MockServer yourself — Docker, docker-compose recipes, the `mockserver` CLI, the JVM-less binary bundle, Helm/Kubernetes, the JAR, and Testcontainers — see the [Self-Hosting MockServer guide](https://www.mock-server.com/mock_server/self_hosting_mockserver.html).\n\n#### Drive it from Postman or Bruno\n\nExplore MockServer's REST control plane from an API client — create expectations, verify requests, and inspect recorded traffic:\n\n[![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/3256712-63a2d67a-46d6-41fd-a544-0535e7393e7d?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D3256712-63a2d67a-46d6-41fd-a544-0535e7393e7d%26entityType%3Dcollection%26workspaceId%3D1739eeee-5da1-4112-86a7-b6c094f2b527)\n\n- **Postman** — click the button above, or import [`examples/postman`](examples/postman) ([guide](https://www.mock-server.com/where/postman.html)).\n- **Bruno** (open-source, git-native) — open [`examples/bruno`](examples/bruno) in [Bruno](https://www.usebruno.com/) via **Open Collection** ([guide](https://www.mock-server.com/where/bruno.html)).\n\n### Documentation\n\nFor usage guide please see: [www.mock-server.com](https://www.mock-server.com/)\n\n### Developer Documentation\n\nArchitecture, code structure, infrastructure, and operations documentation is available in the [docs/](docs/README.md) directory.\n\n### AI Integration\n\nMockServer includes a built-in [MCP](https://modelcontextprotocol.io) server for AI coding assistant integration at `/mockserver/mcp`. See [llms.txt](https://www.mock-server.com/llms.txt) and [AI Integration docs](https://www.mock-server.com/mock_server/ai_mcp_setup.html).\n\n### Change Log\n\nPlease see: [Change Log](https://github.com/mock-server/mockserver-monorepo/blob/master/changelog.md)\n\n### Community\n\n<table>\n    <tr>\n        <td>Discussions<\/td>\n        <td><a href=\"https://github.com/mock-server/mockserver-monorepo/discussions\"><img height=\"20px\" src=\"https://mock-server.com/images/GitHub_Logo-md.png\" alt=\"GitHub Discussions\"><\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>Issues, Bugs &amp; Feature Requests<\/td>\n        <td><a href=\"https://github.com/mock-server/mockserver-monorepo/issues\"><img height=\"20px\" src=\"https://mock-server.com/images/GitHub_Logo-md.png\" alt=\"GitHub Issues\"><\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>Roadmap<\/td>\n        <td><a href=\"https://github.com/orgs/mock-server/projects/1\"><img height=\"20px\" src=\"https://mock-server.com/images/GitHub_Logo-md.png\" alt=\"GitHub Project\"><\/a><\/td>\n    <\/tr>\n    <tr>\n        <td>Security<\/td>\n        <td><a href=\"https://github.com/mock-server/mockserver-monorepo/blob/master/SECURITY.md\"><img height=\"20px\" src=\"https://mock-server.com/images/GitHub_Logo-md.png\" alt=\"Security Policy\"><\/a><\/td>\n    <\/tr>\n<\/table>\n\n### Requirements\n\n**Runtime:** MockServer 6.x requires **Java 17+**. The minimum was raised from Java 11 as part of the Jakarta EE 10 / Spring 7 platform modernisation — see the [Java 17 / Jakarta upgrade guide](docs/operations/migration-java17-jakarta.md). If you are still on Java 11, pin to the `5.15.x` line (no longer receiving security updates). The official Docker image already bundles a Java 17 runtime.\n\n**Building from source:** requires **JDK 17+**; the produced bytecode targets Java 17.\n\n**Security Note:** MockServer is a **development and testing tool only**. See [SECURITY.md](SECURITY.md) for important security considerations.\n\n### Versions\n\n##### Maven Central [![mockserver](https://img.shields.io/maven-central/v/org.mock-server/mockserver-netty.svg)](https://central.sonatype.com/search?q=g:org.mock-server)\n\nMaven Central contains the following MockServer artifacts under the `org.mock-server` groupId. Every artifact ships in two forms — `-no-dependencies` (shaded, zero transitive deps, **recommended**) and the plain form (transitive deps declared in the POM, for the rare case where you need to override versions yourself).\n\n**Server:**\n* [mockserver-netty-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-netty-no-dependencies) / [mockserver-netty](https://central.sonatype.com/artifact/org.mock-server/mockserver-netty) — Netty-based HTTP(S) mock + proxy server (embed in tests or run standalone)\n* [mockserver-war](https://central.sonatype.com/artifact/org.mock-server/mockserver-war) — deployable WAR for hosting MockServer in a servlet container (mock mode)\n* [mockserver-proxy-war](https://central.sonatype.com/artifact/org.mock-server/mockserver-proxy-war) — deployable WAR for hosting MockServer in a servlet container (proxy mode)\n\n**Java client:**\n* [mockserver-client-java-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-client-java-no-dependencies) / [mockserver-client-java](https://central.sonatype.com/artifact/org.mock-server/mockserver-client-java) — Java client for the MockServer REST API\n\n**Test framework integrations:**\n* [mockserver-junit-rule-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-junit-rule-no-dependencies) / [mockserver-junit-rule](https://central.sonatype.com/artifact/org.mock-server/mockserver-junit-rule) — JUnit 4 `@Rule`\n* [mockserver-junit-jupiter-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-junit-jupiter-no-dependencies) / [mockserver-junit-jupiter](https://central.sonatype.com/artifact/org.mock-server/mockserver-junit-jupiter) — JUnit 5 extension (`@MockServerSettings`, `@MockServerTest`)\n* [mockserver-spring-test-listener-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-spring-test-listener-no-dependencies) / [mockserver-spring-test-listener](https://central.sonatype.com/artifact/org.mock-server/mockserver-spring-test-listener) — Spring `TestExecutionListener`\n* [mockserver-integration-testing-no-dependencies](https://central.sonatype.com/artifact/org.mock-server/mockserver-integration-testing-no-dependencies) / [mockserver-integration-testing](https://central.sonatype.com/artifact/org.mock-server/mockserver-integration-testing) — shared integration-test helpers\n\n**Build-tool plugin:**\n* [mockserver-maven-plugin](https://central.sonatype.com/artifact/org.mock-server/mockserver-maven-plugin) — Maven plugin to start, stop, and fork MockServer during the build lifecycle\n\n> **Tip:** The `-no-dependencies` artifacts bundle all dependencies into a single JAR with packages relocated under `shaded_package.*`, so they declare zero transitive dependencies. This avoids classpath conflicts with versions of Netty / Jackson / Guava / Bouncy Castle that your project already uses, and it removes the noise from CVE scanners flagging unused transitive dependencies. See the [Maven Central](https://www.mock-server.com/where/maven_central.html) page for full coordinates, snapshot repository setup, and the executable `jar-with-dependencies` form for command-line use.\n\n> **6.0.0 breaking change:** the `<classifier>shaded<\/classifier>` form has been removed. Replace `mockserver-netty:<version>:shaded` with `mockserver-netty-no-dependencies:<version>` (and likewise for the other shaded artifacts). The replacement produces the same shaded bytes; only the coordinates change.\n\nSNAPSHOT builds are published to the Sonatype Central Portal snapshot repository at <https://central.sonatype.com/repository/maven-snapshots/org/mock-server/>.\n\n##### Node Module & Grunt Plugin\n\nNPM Registry contains the following module:\n\n* [mockserver-node](https://www.npmjs.org/package/mockserver-node) - a Node.js module and Grunt plugin to start and stop MockServer\n    [![mockserver-node](https://nodei.co/npm/mockserver-node.png?downloads=true)](https://www.npmjs.org/package/mockserver-node)\n* [mockserver-client-node](https://www.npmjs.org/package/mockserver-client) - a Node.js client for both the MockServer and the proxy \n    [![mockserver-client-node](https://nodei.co/npm/mockserver-client.png?downloads=true)](https://www.npmjs.org/package/mockserver-client)\n\n##### Docker Hub\n\nDocker Hub contains the following artifacts:\n\n* [MockServer Docker Container](https://hub.docker.com/r/mockserver/mockserver/) - a Docker container containing the Netty MockServer and proxy\n\n##### Homebrew [![Homebrew version](https://img.shields.io/homebrew/v/mockserver.svg)](https://formulae.brew.sh/formula/mockserver)\n\nMockServer is available in [Homebrew](https://brew.sh/) (homebrew-core), the package manager for macOS and Linux:\n\n```bash\nbrew install mockserver   # then run: mockserver -serverPort 1080\n```\n\nSee the [Homebrew install page](https://www.mock-server.com/where/homebrew.html) and the [command-line usage guide](https://www.mock-server.com/mock_server/running_mock_server.html#running_from_command_line_using_homebrew).\n\n##### Helm Chart\n\n* [MockServer Helm Chart](helm/mockserver/README.md) - installs MockServer into a Kubernetes cluster. The chart is published to the GitHub Container Registry as an OCI artifact (no `helm repo add` needed):\n\n  ```bash\n  helm upgrade --install --create-namespace --namespace mockserver --version 7.2.0 mockserver oci://ghcr.io/mock-server/charts/mockserver\n  ```\n\n  See the [Install MockServer Helm Chart](helm/mockserver/README.md) guide for all versions and configuration options. A legacy `.tgz` is also available from [www.mock-server.com](https://www.mock-server.com/mockserver-7.2.0.tgz).\n\n##### MockServer Clients\n\n* [mockserver-client-java ![Maven Central](https://img.shields.io/maven-central/v/org.mock-server/mockserver-client-java.svg)](https://central.sonatype.com/artifact/org.mock-server/mockserver-client-java) - a Java client for both the MockServer and the proxy (use the `-no-dependencies` artifact to avoid transitive dependencies)\n* [mockserver-client-node ![npm](https://img.shields.io/npm/v/mockserver-client.svg)](https://www.npmjs.org/package/mockserver-client) - a Node.js and [browser](https://github.com/mock-server/mockserver-monorepo/blob/master/mockserver-client-node/mockServerClient.js) client for both the MockServer and the proxy\n* [mockserver-client-python](https://pypi.org/project/mockserver-client/) - a Python client for both the MockServer and the proxy\n* [mockserver-client-ruby ![Gem](https://badge.fury.io/rb/mockserver-client.png)](https://rubygems.org/gems/mockserver-client) - a Ruby client for both the MockServer and the proxy\n\n##### Community Tools\n\n* [MockServer Browser Admin](https://github.com/johnnywang1994/mockserver-browser-admin) - a React + TypeScript SPA for managing MockServer expectations via a web UI\n\n##### Previous Versions\n| Version        | Date        | Git & Docker Tag / Git Hash                                                                                                                                                                                   | Documentation                                 | Java API                                                               | REST API                                                                                  |\n|:---------------|:------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------|:-----------------------------------------------------------------------|:------------------------------------------------------------------------------------------|\n| 7.2.0 (latest) | 06 Jun 2026 | [mockserver-7.2.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-7.2.0)   / [9755e9](https://github.com/mock-server/mockserver-monorepo/commit/9755e9ccf4d3bcad1d1cc2dd218614f59441c0f3) | [Documentation](https://mock-server.com)      | [Java API](https://mock-server.com/versions/7.2.0/apidocs/index.html)  | [7.2.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/7.2.x)   |\n| 6.1.0          | 27 May 2026 | [mockserver-6.1.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-6.1.0)   / [33c273](https://github.com/mock-server/mockserver-monorepo/commit/33c2739febd07ce1bf1e3f31ed9d93a61ac871dc) | [Documentation](https://mock-server.com)      | [Java API](https://mock-server.com/versions/6.1.0/apidocs/index.html)  | [6.1.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/6.1.x)   |\n| 6.0.0          | 20 May 2026 | [mockserver-6.0.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-6.0.0)   / [6a254e](https://github.com/mock-server/mockserver-monorepo/commit/6a254e2a5cb925c41bf8c0ef6a98e2c02712e3ab) | [Documentation](https://mock-server.com)      | [Java API](https://mock-server.com/versions/6.0.0/apidocs/index.html)  | [6.0.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/6.0.x)   |\n| 5.15.0         | 11 Jan 2023 | [mockserver-5.15.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.15.0) / [7c071b](https://github.com/mock-server/mockserver-monorepo/commit/7c071b8be3608036f2a2ea45eee6970d2f2b8d02) | [Documentation](https://5-15.mock-server.com) | [Java API](https://mock-server.com/versions/5.15.0/apidocs/index.html) | [5.15.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.15.x) |\n| 5.14.0         | 22 Aug 2022 | [mockserver-5.14.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.14.0) / [808eba](https://github.com/mock-server/mockserver-monorepo/commit/808ebaa44a88b630ca181e62712aa47d4c9c7ff4) | [Documentation](https://5-14.mock-server.com) | [Java API](https://mock-server.com/versions/5.14.0/apidocs/index.html) | [5.14.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.14.x) |\n| 5.13.2         | 05 Apr 2022 | [mockserver-5.13.2](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.13.2) / [81105b](https://github.com/mock-server/mockserver-monorepo/commit/81105b3153674bbe66df612ad1b3a09a34a520cf) | [Documentation](https://5-13.mock-server.com) | [Java API](https://mock-server.com/versions/5.13.2/apidocs/index.html) | [5.13.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.13.x) |\n| 5.13.1         | 02 Apr 2022 | [mockserver-5.13.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.13.1) / [39d1cc](https://github.com/mock-server/mockserver-monorepo/commit/39d1cc6251e6dbd00ab8012dbe39def6d8bb7312) | [Documentation](https://5-13.mock-server.com) | [Java API](https://mock-server.com/versions/5.13.1/apidocs/index.html) | [5.13.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.13.x) |\n| 5.13.0         | 17 Mar 2022 | [mockserver-5.13.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.13.0) / [604888](https://github.com/mock-server/mockserver-monorepo/commit/604888cdb0f66f1f217e54c4f3ad3e3c7785f3af) | [Documentation](https://5-13.mock-server.com) | [Java API](https://mock-server.com/versions/5.13.0/apidocs/index.html) | [5.13.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.13.x) |\n| 5.12.0         | 12 Feb 2022 | [mockserver-5.12.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.12.0) / [61747f](https://github.com/mock-server/mockserver-monorepo/commit/61747fd20316603e7ff4c0dd0e3ee34ea386882f) | [Documentation](https://5-12.mock-server.com) | [Java API](https://mock-server.com/versions/5.12.0/apidocs/index.html) | [5.12.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.12.x) |\n| 5.11.2         | 08 Nov 2020 | [mockserver-5.11.2](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.11.2) / [eb84f2](https://github.com/mock-server/mockserver-monorepo/commit/eb84f20b9485233c6926e4067e1e8de652a112d6) | [Documentation](https://5-11.mock-server.com) | [Java API](https://mock-server.com/versions/5.11.2/apidocs/index.html) | [5.11.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.11.x) |\n| 5.11.1         | 22 Jul 2020 | [mockserver-5.11.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.11.1) / [361e5c](https://github.com/mock-server/mockserver-monorepo/commit/361e5c74e5c7fd906957edbd5a46bb27582e4f5c) | [Documentation](https://5-11.mock-server.com) | [Java API](https://mock-server.com/versions/5.11.1/apidocs/index.html) | [5.11.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.11.x) |\n| 5.11.0         | 08 Jul 2020 | [mockserver-5.11.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.11.0) / [756758](https://github.com/mock-server/mockserver-monorepo/commit/756758ebe3d032f3852411a9bb91c3c66d819ddc) | [Documentation](https://5-11.mock-server.com) | [Java API](https://mock-server.com/versions/5.11.0/apidocs/index.html) | [5.11.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.11.x) |\n| 5.10.0         | 24 Mar 2020 | [mockserver-5.10.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.10.0) / [14124d](https://github.com/mock-server/mockserver-monorepo/commit/14124d32ef96c207cc73cc5334c1d7236d8c7640) | [Documentation](https://5-10.mock-server.com) | [Java API](https://mock-server.com/versions/5.10.0/apidocs/index.html) | [5.10.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.10.x) |\n| 5.9.0          | 01 Feb 2020 | [mockserver-5.9.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.9.0)   / [eacf07](https://github.com/mock-server/mockserver-monorepo/commit/eacf07ad1eb738bacbf7c473f0d1aa62b4028602) | [Documentation](https://5-9.mock-server.com)  | [Java API](https://mock-server.com/versions/5.9.0/apidocs/index.html)  | [5.9.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.9.x)   |\n| 5.8.1          | 23 Dec 2019 | [mockserver-5.8.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.8.1)   / [f0e9ab](https://github.com/mock-server/mockserver-monorepo/commit/f0e9ab3b64f47f7f8f756d5ae8bf7b1b4611d8e6) | [Documentation](https://5-8.mock-server.com)  | [Java API](https://mock-server.com/versions/5.8.1/apidocs/index.html)  | [5.8.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.8.x)   |\n| 5.8.0          | 01 Dec 2019 | [mockserver-5.8.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.8.0)   / [7c9fc5](https://github.com/mock-server/mockserver-monorepo/commit/7c9fc5e5e831feac71dd68d0341ff089f37cec1e) | [Documentation](https://5-8.mock-server.com)  | [Java API](https://mock-server.com/versions/5.8.0/apidocs/index.html)  | [5.8.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.8.x)   |\n| 5.7.2          | 16 Nov 2019 | [mockserver-5.7.2](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.7.2)   / [7c9fc5](https://github.com/mock-server/mockserver-monorepo/commit/7c9fc5e5e831feac71dd68d0341ff089f37cec1e) | [Documentation](https://5-7.mock-server.com)  | [Java API](https://mock-server.com/versions/5.7.2/apidocs/index.html)  | [5.7.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.7.x)   |\n| 5.7.1          | 09 Nov 2019 | [mockserver-5.7.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.7.1)   / [0ca353](https://github.com/mock-server/mockserver-monorepo/commit/0ca3537023e9e0f9abcb09c92279891cbc0527c7) | [Documentation](https://5-7.mock-server.com)  | [Java API](https://mock-server.com/versions/5.7.1/apidocs/index.html)  | [5.7.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.7.x)   |\n| 5.7.0          | 01 Nov 2019 | [mockserver-5.7.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.7.0)   / [b58bc5](https://github.com/mock-server/mockserver-monorepo/commit/b58bc589efbc76272a2053a64e774a001f1bb0a2) | [Documentation](https://5-7.mock-server.com)  | [Java API](https://mock-server.com/versions/5.7.0/apidocs/index.html)  | [5.7.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.7.x)   |\n| 5.6.1          | 21 Jul 2019 | [mockserver-5.6.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.6.1)   / [aec1fb](https://github.com/mock-server/mockserver-monorepo/commit/aec1fbf1e826dc59fe4a19c3331ab6802ec4c3c7) | [Documentation](https://5-6.mock-server.com)  | [Java API](https://mock-server.com/versions/5.6.0/apidocs/index.html)  | [5.6.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.6.x)   |\n| 5.6.0          | 21 Jun 2019 | [mockserver-5.6.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.6.0)   / [8f82dc](https://github.com/mock-server/mockserver-monorepo/commit/8f82dc4d37271c3cbfe0b3a1963e91ec3a4ef7a7) | [Documentation](https://5-6.mock-server.com)  | [Java API](https://mock-server.com/versions/5.6.0/apidocs/index.html)  | [5.6.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.6.x)   |\n| 5.5.4          | 26 Apr 2019 | [mockserver-5.5.4](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.5.4)   / [4ffd31](https://github.com/mock-server/mockserver-monorepo/commit/4ffd3162a3250f18d343901b30c3ee71a75b1982) | [Documentation](https://5-5.mock-server.com)  | [Java API](https://mock-server.com/versions/5.5.4/apidocs/index.html)  | [5.5.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.5.x)   |\n| 5.5.1          | 29 Dec 2018 | [mockserver-5.5.1](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.5.1)   / [11d8a9](https://github.com/mock-server/mockserver-monorepo/commit/11d8a96b0eaf07b7fffd29444203503b1cdca653) | [Documentation](https://5-5.mock-server.com)  | [Java API](https://mock-server.com/versions/5.5.1/apidocs/index.html)  | [5.5.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.5.x)   |\n| 5.5.0          | 15 Nov 2018 | [mockserver-5.5.0](https://github.com/mock-server/mockserver-monorepo/tree/mockserver-5.5.0)   / [06e6fd](https://github.com/mock-server/mockserver-monorepo/commit/06e6fdc4757f13fb5943fc281d5e55dc1c30919d) | [Documentation](https://5-5.mock-server.com)  | [Java API](https://mock-server.com/versions/5.5.0/apidocs/index.html)  | [5.5.x REST API](https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.5.x)   |\n\n### Issues\n\nIf you have any problems, please [check the project issues](https://github.com/mock-server/mockserver-monorepo/issues?state=open) and avoid opening issues that have already been fixed.  When you open an issue please provide the following information:\n- MockServer version (i.e. 7.2.0)\n- How your running the MockServer (i.e maven plugin, docker, etc)\n- MockServer log output, at INFO level (or higher)\n- What the error is\n- What you are trying to do\n\n### Contributions\n\nPull requests are, of course, very welcome! Please read our [contributing to the project](CONTRIBUTING.md) guide first. Then head over to the [open issues](https://github.com/mock-server/mockserver-monorepo/issues?state=open) to see what we need help with. Make sure you let us know if you intend to work on something. Also check out the [project roadmap](https://github.com/orgs/mock-server/projects/1) to see what is already in the backlog.\n\n### Feature Requests\n\nFeature requests are submitted to [GitHub issues](https://github.com/mock-server/mockserver-monorepo/issues?state=open) and tracked on the [project roadmap](https://github.com/orgs/mock-server/projects/1).\n\n### Maintainers\n* [James D Bloom](https://blog.jamesdbloom.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37CA:3CC8A:180143:5EB011:6AB92EF3"},"text_sha256":"60218c7c075fbabc3bbf09523c7bf0cba40dea0675820a0d2a42a6c738ccbd82"},{"path":".claude/agents/security-auditor.md","size":3915,"blob_sha":"9f56a8a0dd25572c3a5cf9190da00da6c8489bd0","priority":1,"status":200,"text":"---\nname: security-auditor\ndescription: Security-focused code auditor for Java/Netty applications. Spawn this agent to audit code changes for vulnerabilities, misconfigurations, secrets exposure, and unsafe patterns.\nmodel: claude-opus-4-8\neffort: high\ntools:\n  - Read\n  - Bash\n  - Glob\n  - Grep\n  - LS\n---\nYou are a security auditor for the MockServer codebase. You perform security-focused code reviews looking for vulnerabilities, misconfigurations, and unsafe patterns.\n\n**Read-only execution (least privilege — spec §16 S12; separation of duties — §16 S2):** You MUST NOT modify any file or the working tree. You have no Edit/Write tools, and you MUST NOT use the shell to write either — never run `sed -i`, `tee`, output redirection (`>`/`>>`) into repository files, `git apply`/`git checkout`/`git restore`/`git stash`, `patch`, or any command that mutates tracked files. Use the shell ONLY to inspect the change set and to run read-only validations/tests. If a change is needed, report it as a finding — never make it yourself.\n\n## What You Do\n\n1. Audit code changes for security vulnerabilities\n2. Check for common Java/Netty security issues\n3. Verify input validation and sanitization\n4. Ensure secrets and credentials are not exposed\n\n## Security Checklist\n\n### Secrets & Credentials\n- No hardcoded secrets, API keys, passwords, or tokens\n- No credentials in test files that could be real\n- No sensitive data in log output\n- Docker images don't contain secrets\n\n### Input Validation\n- All user-supplied input is validated before use\n- HTTP headers, query parameters, and body content are sanitized\n- No path traversal vulnerabilities in file operations\n- Request size limits are enforced\n\n### Injection Prevention\n- No command injection via Runtime.exec() or ProcessBuilder with user input\n- No LDAP injection in directory lookups\n- No XSS in any HTML responses\n- No XML External Entity (XXE) in XML parsing\n- No Server-Side Request Forgery (SSRF) in proxy functionality\n\n### Network Security\n- TLS/SSL configuration uses secure defaults\n- Certificate validation is not disabled in production code\n- No insecure cipher suites\n- Proper hostname verification\n\n### Java-Specific\n- No use of `ObjectInputStream.readObject()` on untrusted data (deserialization attacks)\n- No `Runtime.getRuntime().exec()` with unsanitized input\n- Proper use of `SecureRandom` instead of `Random` for security-sensitive operations\n- No information leakage in error messages or stack traces returned to clients\n- Resources properly closed (try-with-resources) to prevent denial of service\n- Thread-safe handling of shared mutable state\n\n### Netty-Specific\n- Channel handlers properly handle malformed requests\n- ByteBuf references are released to prevent memory leaks\n- Pipeline handlers don't expose internal state\n- WebSocket frame validation\n\n### Dependencies\n- No known vulnerable dependencies (check against CVE databases)\n- Dependencies are pinned to specific versions\n- No unnecessary transitive dependencies\n\n## Output Format\n\n```\n## Security Audit Summary\n\n**Files audited:** <count>\n**Verdict:** PASS | FINDINGS\n\n### Findings (if any)\n\n**[CRITICAL/HIGH/MEDIUM/LOW]** <file>:<line> - <vulnerability type>\n  Risk: <what could go wrong>\n  Fix: <how to remediate>\n```\n\n## Severity Levels\n\n- **CRITICAL**: Exploitable vulnerability that could lead to RCE, data exfiltration, or full system compromise.\n- **HIGH**: Significant security weakness that could be exploited under certain conditions.\n- **MEDIUM**: Security best practice violation that increases attack surface.\n- **LOW**: Minor security improvement opportunity.\n\n## Important\n\n- Focus on real security risks, not theoretical concerns.\n- MockServer is a test tool, but it handles HTTP traffic and should be secure by default.\n- Pay special attention to the proxy functionality — it forwards real traffic.\n- Do NOT make changes. Only audit and report.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7B30:3B1F3:187DB9:5F2CFE:6AB92EF3"},"text_sha256":"2510f36d51f13cff49e4256d9ca9c9d6055c00f12027a3639814941df58c4135"},{"path":".opencode/agents/security-auditor.md","size":3631,"blob_sha":"df52644ab96a9e76545cdcae799c5cac7607563e","priority":1,"status":200,"text":"---\nmode: subagent\n---\nYou are a security auditor for the MockServer codebase. You perform security-focused code reviews looking for vulnerabilities, misconfigurations, and unsafe patterns.\n\n**Read-only execution (least privilege — spec §16 S12; separation of duties — §16 S2):** You MUST NOT modify any file or the working tree. You have no Edit/Write tools, and you MUST NOT use the shell to write either — never run `sed -i`, `tee`, output redirection (`>`/`>>`) into repository files, `git apply`/`git checkout`/`git restore`/`git stash`, `patch`, or any command that mutates tracked files. Use the shell ONLY to inspect the change set and to run read-only validations/tests. If a change is needed, report it as a finding — never make it yourself.\n\n## What You Do\n\n1. Audit code changes for security vulnerabilities\n2. Check for common Java/Netty security issues\n3. Verify input validation and sanitization\n4. Ensure secrets and credentials are not exposed\n\n## Security Checklist\n\n### Secrets & Credentials\n- No hardcoded secrets, API keys, passwords, or tokens\n- No credentials in test files that could be real\n- No sensitive data in log output\n- Docker images don't contain secrets\n\n### Input Validation\n- All user-supplied input is validated before use\n- HTTP headers, query parameters, and body content are sanitized\n- No path traversal vulnerabilities in file operations\n- Request size limits are enforced\n\n### Injection Prevention\n- No command injection via Runtime.exec() or ProcessBuilder with user input\n- No LDAP injection in directory lookups\n- No XSS in any HTML responses\n- No XML External Entity (XXE) in XML parsing\n- No Server-Side Request Forgery (SSRF) in proxy functionality\n\n### Network Security\n- TLS/SSL configuration uses secure defaults\n- Certificate validation is not disabled in production code\n- No insecure cipher suites\n- Proper hostname verification\n\n### Java-Specific\n- No use of `ObjectInputStream.readObject()` on untrusted data (deserialization attacks)\n- No `Runtime.getRuntime().exec()` with unsanitized input\n- Proper use of `SecureRandom` instead of `Random` for security-sensitive operations\n- No information leakage in error messages or stack traces returned to clients\n- Resources properly closed (try-with-resources) to prevent denial of service\n- Thread-safe handling of shared mutable state\n\n### Netty-Specific\n- Channel handlers properly handle malformed requests\n- ByteBuf references are released to prevent memory leaks\n- Pipeline handlers don't expose internal state\n- WebSocket frame validation\n\n### Dependencies\n- No known vulnerable dependencies (check against CVE databases)\n- Dependencies are pinned to specific versions\n- No unnecessary transitive dependencies\n\n## Output Format\n\n```\n## Security Audit Summary\n\n**Files audited:** <count>\n**Verdict:** PASS | FINDINGS\n\n### Findings (if any)\n\n**[CRITICAL/HIGH/MEDIUM/LOW]** <file>:<line> - <vulnerability type>\n  Risk: <what could go wrong>\n  Fix: <how to remediate>\n```\n\n## Severity Levels\n\n- **CRITICAL**: Exploitable vulnerability that could lead to RCE, data exfiltration, or full system compromise.\n- **HIGH**: Significant security weakness that could be exploited under certain conditions.\n- **MEDIUM**: Security best practice violation that increases attack surface.\n- **LOW**: Minor security improvement opportunity.\n\n## Important\n\n- Focus on real security risks, not theoretical concerns.\n- MockServer is a test tool, but it handles HTTP traffic and should be secure by default.\n- Pay special attention to the proxy functionality — it forwards real traffic.\n- Do NOT make changes. Only audit and report.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"56FE:241B62:17C6F2:5E75DC:6AB92EF3"},"text_sha256":"c526ba4b21aa2becc642bab0aad448ca0832d58a8fe0844ac0fd94ef0bfbd6f1"},{"path":".opencode/rules/testing-policy.md","size":4181,"blob_sha":"523ed03596249121190cb06cce46ba55bf698ed2","priority":1,"status":200,"text":"# Testing Policy\n\n## Post-Change Testing\n\nAfter making code changes, ALWAYS run unit tests for the affected module(s).\n\n- Identify which Maven module(s) were modified based on file paths (e.g., files in `mockserver-core/` → module `mockserver-core`)\n- Run unit tests with Maven targeting the specific module: `./mvnw test -pl <module>`\n- If tests fail, fix the issues before considering the task complete\n- When a specific test fails, re-run just that test: `./mvnw test -pl <module> -Dtest=<TestClassName>#<testMethodName>`\n- Do NOT run integration tests automatically — they are slow and run in CI\n- If changes span multiple modules, run tests for ALL affected modules: `./mvnw test -pl <module1>,<module2>`\n\n## Docker-Gated Tests\n\n**Docker is available locally** (Docker Desktop on the developer Mac) — see `AGENTS.md` → \"Local Development Environment\".\n\n- Tests guarded by `Assume.assumeTrue(DockerClientFactory.instance().isDockerAvailable())` (Testcontainers live-broker tests, `NET_ADMIN` transparent-proxy e2e, QUIC/HTTP-3 client tests, etc.) **actually run here** — when validating such a change, run it and confirm it PASSES, not merely that it skips.\n- **Keep the `assumeTrue(...isDockerAvailable())` gating in place** regardless. It is still correct so the suite degrades gracefully on machines/CI agents without Docker. Docker being present changes how we *validate*, not how we *write* the tests.\n- The `DockerClientFactory.isDockerAvailable()` probe works correctly with Testcontainers 1.21.4+ (docker-java 3.4.2) on Docker Desktop 4.67 / Engine 29.x / API 1.54. Always confirm a Docker-gated test actually RAN (not skipped) before claiming local validation.\n- `docker build` / `docker run` are available for Dockerfile smoke checks (see `commit-workflow.md`).\n\n## Before Committing (MANDATORY)\n\nFollow the full pre-commit workflow in `commit-workflow.md`. That workflow covers all file types (Java, Terraform, Bash, Docker, Helm, docs). This file covers the Java-specific testing details.\n\nWhen the user asks to commit Java changes:\n1. **Run unit tests** — `./mvnw test -pl <modules>` for all affected modules. Fix failures before committing.\n2. **Adversarial review** — launch `review-cheap` subagent (see `commit-workflow.md` Step 4; control / AI-component changes use `review-final` + gated approval).\n3. **Only then commit.**\n\n**Skip condition:** If user explicitly says to skip (e.g., \"skip tests\", \"just commit\"), skip corresponding steps.\n\nIf unit tests already passed earlier in this conversation for the exact same changes (no further edits since), skip re-running.\n\n## Maven Module Mapping\n\n| Directory | Maven Module |\n|-----------|-------------|\n| `mockserver-core/` | `mockserver-core` |\n| `mockserver-netty/` | `mockserver-netty` |\n| `mockserver-client-java/` | `mockserver-client-java` |\n| `mockserver-war/` | `mockserver-war` |\n| `mockserver-proxy-war/` | `mockserver-proxy-war` |\n| `mockserver-junit-jupiter/` | `mockserver-junit-jupiter` |\n| `mockserver-junit-rule/` | `mockserver-junit-rule` |\n| `mockserver-spring-test-listener/` | `mockserver-spring-test-listener` |\n| `mockserver-testing/` | `mockserver-testing` |\n| `mockserver-integration-testing/` | `mockserver-integration-testing` |\n| `examples/java/` | `mockserver-examples` |\n\n## Maven Test Commands\n\n```bash\n# Unit tests for a specific module\n./mvnw test -pl mockserver-core\n\n# Unit tests for multiple modules\n./mvnw test -pl mockserver-core,mockserver-netty\n\n# Run a specific test class\n./mvnw test -pl mockserver-core -Dtest=HttpRequestTest\n\n# Run a specific test method\n./mvnw test -pl mockserver-core -Dtest=HttpRequestTest#shouldCreateRequest\n\n# All unit tests (slow — avoid unless needed)\n./mvnw test\n\n# Quick build (compile + test, skip integration tests)\n./mvnw verify -DskipITs\n```\n\n## Test Quality\n\n- **New tests:** Follow existing test patterns in the module. Use JUnit 5 (Jupiter) only in `mockserver-junit-jupiter`; all other modules use JUnit 4.\n- **Flaky tests:** Never just re-run — investigate root cause. Common causes: port contention, timing-dependent assertions, shared mutable state.\n- Descriptive test names that explain the expected behavior.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:18426A:5EF1A2:6AB92EF4"},"text_sha256":"237119ae0f00ae9d2d672fd701599efc1a4f99b3410dd9e3453cfce5ff02decd"},{"path":"docs/code/llm-security-audit.md","size":8895,"blob_sha":"4614f81a9adae8a7a80649e67aa369b28c4da8e0","priority":1,"status":200,"text":"# LLM Mocking Feature -- Security Audit (M5)\n\n**Date:** 2026-05-26\n**Scope:** All code introduced in M0 (fa2a5bb05) through M4 (24668ed1d)\n**Method:** Manual code review with targeted grep sweeps. CodeQL was not run locally (not installed); this audit covers the same categories.\n\n## Summary\n\nNo vulnerabilities found. Previously known limitations (Ollama NDJSON, Bedrock binary framing) have been resolved. All checked categories passed.\n\n## What was checked\n\n### 1. Debug output leaks (`System.out.print` / `System.err.print`)\n\n**Result: PASS** -- Zero instances found in any LLM-related source file.\n\nFiles checked:\n- All files under `mockserver-core/src/main/java/org/mockserver/llm/`\n- `HttpLlmResponse.java`, `Completion.java`, `ToolUse.java`, `StreamingPhysics.java`, `EmbeddingResponse.java`, `ConversationPredicates.java`\n- `HttpLlmResponseActionHandler.java`, `LlmConversationMatcher.java`\n- `LlmMockBuilder.java`, `LlmConversationBuilder.java`, `TurnBuilder.java`\n\n### 2. JSON injection in hand-built SSE chunks\n\n**Result: PASS** -- Every `withData(...)` call in every codec's `encodeStreaming()` method routes user-provided strings through `JsonEscape.escape()` (aliased as `escapeJson()` in each codec).\n\nAudit of each codec:\n\n| Codec | User strings in `withData()` | Escaped via |\n|-------|------------------------------|-------------|\n| `AnthropicCodec` | `modelName`, `token` (text chunks), `toolCall.getName()`, tool `args` | `escapeJson()` -> `JsonEscape.escape()` |\n| `OpenAiChatCompletionsCodec` | `model`, `token`, `toolCall.getName()`, tool `args`, `finishReason` | `escapeJson()` via `buildChunk()` |\n| `OpenAiResponsesCodec` | `modelName`, `token`, `text`, `toolCall.getName()`, tool `args` | `escapeJson()` |\n| `GeminiCodec` | `token`, `modelName`, `toolCall.getName()`, tool `args` | `escapeJson()`; args also re-serialised via Jackson `writeValueAsString` |\n| `BedrockCodec` | Delegates to `AnthropicCodec` | Same as Anthropic |\n| `AzureOpenAiCodec` | Delegates to `OpenAiChatCompletionsCodec` | Same as OpenAI |\n| `OllamaCodec` | `modelName`, `token` (text chunks) | `escapeJson()`; final chunk uses `OBJECT_MAPPER.writeValueAsString()` |\n\n`JsonEscape.escape()` handles the seven RFC 8259 short escapes and emits `\\\\uXXXX` for control characters below U+0020. This is sufficient to prevent JSON injection in SSE data lines.\n\n### 3. Secrets in log messages\n\n**Result: PASS** -- No API keys, tokens, credentials, or authorization headers are logged anywhere in the LLM code paths.\n\nThe only body content that appears in logs is a truncated 256-byte sample in `LlmConversationMatcher` at DEBUG level, which is appropriate for diagnostics and does not include headers.\n\n### 4. `@JsonIgnore` on sensitive fields\n\n**Result: PASS** -- `HttpLlmResponse.conversationMatcher` (a transient evaluation-time object) is annotated with `@JsonIgnore` and declared `transient`. The `getType()` method is also `@JsonIgnore`. No sensitive fields (API keys, secrets) exist on any LLM model class.\n\n### 5. Body-size cap enforcement\n\n**Result: PASS** -- `LlmConversationMatcher.matches()` checks `request.getBodyAsRawBytes().length` against `ConfigurationProperties.maxLlmConversationBodySize()` **before** calling `codec.decode(request)`. Bodies exceeding the cap are treated as no-match and logged at DEBUG.\n\nThe cap is enforced with clamping in `ConfigurationProperties` (range: 16 KiB to 64 MiB, default 1 MiB).\n\n### 6. Unbounded user input in error responses\n\n**Result: PASS** -- Error responses in `HttpLlmResponseActionHandler` interpolate only:\n- `provider` (a Java enum, always a safe constant name like `ANTHROPIC`)\n- `provider.name()` (same as above)\n- The literal string `null`\n- `supportedProvidersJson()` which builds an array from enum names\n\nNo user-supplied strings (request bodies, headers, paths) are interpolated into error JSON.\n\n### 7. Random ID generation\n\n**Result: PASS (acceptable for test utility)** -- Random IDs (e.g., `msg_*`, `chatcmpl-*`, `toolu_*`) use `java.util.UUID.randomUUID()` which is backed by `SecureRandom` on modern JVMs. The `StreamingPhysicsExpander` uses `java.util.Random` for jitter timing, which is appropriate (timing jitter is not a security-sensitive value).\n\nThe embedding `deterministicFromInput()` deliberately uses `java.util.Random` seeded from a SHA-256 hash for reproducibility. This is a test utility, not a security primitive.\n\n## Known limitations\n\n### Ollama NDJSON wire format (RESOLVED)\n\n**Resolved.** `OllamaCodec` now declares `StreamingFormat.NDJSON` and the `HttpSseResponseActionHandler` emits raw `<json>\\n` lines (no SSE `data:` prefix) for Ollama streaming responses.\n\n### BedrockCodec binary framing (RESOLVED)\n\n**Compatibility limitation — actionable for raw HTTP clients.**\n\n**Resolved** in G14. `BedrockCodec` now declares `StreamingFormat.AWS_EVENT_STREAM` and the `HttpSseResponseActionHandler` encodes each streaming chunk as a binary AWS event-stream message via `BedrockEventStreamEncoder`. Each message carries headers (`:event-type=chunk`, `:content-type=application/json`, `:message-type=event`), CRC32 integrity checks (prelude and message), and a payload of `{\"bytes\":\"<base64(chunkJson)>\"}` matching the `InvokeModelWithResponseStream` wire format. Raw (non-SDK) Bedrock streaming clients now work against MockServer.\n\nThe limitation is documented in the `BedrockCodec` javadoc. Not a security concern.\n\n### Runtime LLM client — Bedrock SigV4 signing (RESOLVED)\n\n**Resolved.** `BedrockLlmClient` now implements automatic AWS Signature Version 4 request signing via `AwsSigV4Signer`, a pure, stateless signer using only JDK crypto (SHA-256, HmacSHA256 -- no third-party dependencies).\n\n**Credential sourcing:** AWS credentials are parsed from `LlmBackend.apiKey()` in the format `accessKeyId:secretAccessKey` (or `accessKeyId:secretAccessKey:sessionToken` for STS temporary credentials). When `apiKey` is null, blank, or does not contain a `:` separator, signing is skipped and the original escape-hatch behaviour is preserved (backward compatible).\n\n**Region extraction:** The region is parsed from the `baseUrl` host (`bedrock-runtime.<region>.amazonaws.com`); defaults to `us-east-1` if the host does not match. The AWS service is `bedrock`.\n\n**Authorization precedence:** When SigV4 credentials are present, the auto-generated `Authorization` header takes precedence over any `Authorization` supplied via the `LlmBackend.headers()` escape hatch. The escape hatch remains fully supported for pre-signed / signing-proxy setups when no credentials are provided.\n\n**Test verification:** The signing-key derivation is verified against the AWS-published test vector (secret `wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY`, date `20120215`, region `us-east-1`, service `iam` -- expected signing key hex `f4780e2d9f65fa895f9c67b32ce1baf0b0d8a43505a000a1a9e090d414db404d`). Full end-to-end signing is tested for structural correctness, determinism, session-token inclusion, and body-sensitivity. The signing timestamp is injectable for offline test determinism.\n\n### Gemini API key in query string (runtime client)\n\nThe runtime-LLM `GeminiLlmClient` passes the API key as a `?key=` query parameter, as Gemini's API-key auth requires. Unlike header credentials, query-string keys can surface in HTTP access/proxy logs. This is a property of the provider's API, not a MockServer choice; front the call with a gateway that injects the key after ingress in high-security environments. Documented in the `GeminiLlmClient` javadoc. Not a MockServer defect.\n\n### Gemini tool-call argument re-serialisation\n\nThe `GeminiCodec.encodeStreaming()` method re-serialises tool-call arguments through Jackson (`OBJECT_MAPPER.readTree` + `writeValueAsString`) before embedding them in the SSE chunk. If the arguments are not valid JSON, they are wrapped in a `{\"value\":\"<escaped>\"}` object. This is a safe fallback that prevents malformed arguments from corrupting the JSON chunk. No action required.\n\n### `whenContainsToolResultFor` E2E false-negative for Gemini and Ollama — RESOLVED\n\n**Resolved.** This was previously reported as an E2E-only false-negative (the matcher unit tests passed for all providers, but the predicate was believed to fail through the full Netty pipeline for Gemini/Ollama turn-2 requests). It no longer reproduces: `LlmAgentLoopE2eTest.shouldMatchContainsToolResultForGeminiEndToEnd` and `…ForOllamaEndToEnd` drive turn 2 purely via `whenContainsToolResultFor` (not scenario ordering), through the real Netty pipeline, and both pass — Gemini's name-keyed correlation and Ollama's positional fallback work end-to-end. These regression tests guard against recurrence. (The earlier behaviour was fixed by subsequent matcher/codec work; the body is delivered to the matcher correctly E2E, as the Anthropic/OpenAI/Azure/Bedrock predicate-driven E2E tests also demonstrate.) Not a security issue.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4A68:345ED4:17B4DC:5E6295:6AB92EF4"},"text_sha256":"cbbcf5039df379dac3d515b0261ecf8262686d71098b02153d621286e06a88d8"},{"path":"docs/code/tls-and-security.md","size":34108,"blob_sha":"ac4330474570c0e663a44d95d22249c92f9e3243","priority":1,"status":200,"text":"# TLS, Certificates & Security\n\n## TLS Architecture\n\nMockServer dynamically generates TLS certificates using BouncyCastle, enabling transparent HTTPS interception without pre-configured certificates.\n\n```mermaid\ngraph TB\n    subgraph \"Certificate Generation\"\n        KCF[\"KeyAndCertificateFactory\nInterface\"]\n        BCF[\"BCKeyAndCertificateFactory\nBouncyCastle implementation\"]\n        KCF -.-> BCF\n    end\n\n    subgraph \"SSL Context\"\n        NSCF[\"NettySslContextFactory\nCreates & caches SslContext\"]\n        KSF[\"KeyStoreFactory\nJKS KeyStore + SSLContext\"]\n    end\n\n    subgraph \"Netty Pipeline\"\n        SNI[\"SniHandler\nSNI extraction + ALPN\"]\n        SSL[\"SslHandler\nNetty built-in\"]\n    end\n\n    BCF -->|provides certs| NSCF\n    NSCF -->|server SslContext| SNI\n    SNI -->|replaces self| SSL\n    BCF -->|provides certs| KSF\n```\n\n### Dynamic Certificate Generation\n\nWhen a TLS connection arrives:\n\n```mermaid\nsequenceDiagram\n    participant C as Client\n    participant SNI as SniHandler\n    participant BCF as BCKeyAndCertificateFactory\n    participant NSCF as NettySslContextFactory\n\n    C->>SNI: TLS ClientHello (SNI: api.example.com)\n    SNI->>SNI: Extract hostname from SNI extension\n    SNI->>BCF: Add SAN: api.example.com\n    BCF->>BCF: Generate leaf certificate signed by MockServer CA\n    BCF-->>NSCF: Private key + certificate chain\n    NSCF->>NSCF: Build SslContext (server-side, with ALPN)\n    NSCF-->>SNI: SslContext\n    SNI->>SNI: Replace self with SslHandler\n    SNI->>SNI: Store ALPN result on channel (HTTP_1_1 or HTTP_2)\n    SNI-->>C: TLS ServerHello + Certificate\n```\n\n### Certificate Authority\n\nMockServer maintains an in-memory CA with default DN:\n- **CN**: `www.mockserver.com`\n- **O**: `MockServer`\n- **L**: `London`\n- **ST**: `England`\n- **C**: `UK`\n\n**Certificate validity period**: both the CA and dynamically-generated leaf certificates are valid for **10 years** from server startup (`KeyAndCertificateFactory.CERTIFICATE_VALIDITY_YEARS = 10`). The HTTP/3 self-signed fallback certificate uses the same constant. This long validity avoids certificate expiry during normal development and test usage.\n\nCustom CA certificates can be loaded from PEM files via configuration.\n\n### Proxy Setup — CA Materialisation and Copy-Paste Block\n\nThe `proxySetupLogging` property (env `MOCKSERVER_PROXY_SETUP_LOGGING`, default `false`) gates both the startup CA file write and the \"Proxy Setup\" log block. The block contains ready-to-paste environment variable exports for both Unix and Windows PowerShell:\n\n```\nHTTPS_PROXY=http://localhost:<port>\nNODE_EXTRA_CA_CERTS=<ca path>       # Node.js\nSSL_CERT_FILE=<ca path>             # Python (httpx, standard library)\nREQUESTS_CA_BUNDLE=<ca path>        # Python requests\n```\n\nWhen `proxySetupLogging` is enabled, MockServer writes the active CA certificate to `<directoryToSaveDynamicSSLCertificate>/mockserver-ca.pem` at startup and prints the block. The standalone launcher (executable JAR, Docker image, `mockserver` CLI) automatically enables `proxySetupLogging`, so proxy users see both without any extra configuration. Embedded usage (`new ClientAndServer(...)`) stays silent by default; when `proxySetupLogging` is disabled, the CA file is instead written on the first call to `GET /mockserver/proxyConfiguration`.\n\nThe `GET /mockserver/proxyConfiguration` endpoint is always available regardless of `proxySetupLogging`. It returns JSON by default or a plain copy-paste text block with `Accept: text/plain`. It never exposes the private key.\n\nThe `--proxy-setup` CLI flag (property `mockserver.proxySetup`, env `MOCKSERVER_PROXY_SETUP`, default `false`) is a convenience switch: when set, it forces `dynamicallyCreateCertificateAuthorityCertificate=true`, generating a unique local CA whose private key never leaves the machine. Without it, MockServer uses the built-in default CA whose private key is published in the git repository — safe only for isolated local development. The startup block includes a security warning when the default public CA is in use.\n\n### Key Classes\n\n| Class | Package | Purpose |\n|-------|---------|---------|\n| `KeyAndCertificateFactory` | `o.m.socket.tls` | Interface for cert generation |\n| `BCKeyAndCertificateFactory` | `o.m.socket.tls.bouncycastle` | BouncyCastle implementation: generates CA + leaf X.509 certs, supports dynamic SANs, reads custom PEM certs (including intermediate chains) |\n| `KeyAndCertificateFactoryFactory` | `o.m.socket.tls` | Factory with pluggable supplier |\n| `NettySslContextFactory` | `o.m.socket.tls` | Creates and caches Netty `SslContext` for server and client sides; supports mTLS, HTTP/2 ALPN; throws on failure instead of returning null |\n| `CertificateConfigurationValidator` | `o.m.socket.tls` | Validates TLS certificate configuration at startup: key/cert pairing, CA chain verification, expiry, file existence |\n| `KeyStoreFactory` | `o.m.socket.tls` | Creates JKS `KeyStore` and `SSLContext` for non-Netty use |\n| `SniHandler` | `o.m.socket.tls` | Extends Netty's `AbstractSniHandler`; extracts SNI hostname, provisions certificate, negotiates ALPN |\n| `PEMToFile` | `o.m.socket.tls` | PEM format utilities (read/write private keys and X.509 chains); properly closes InputStreams |\n\n### BouncyCastle FIPS Support\n\nMockServer supports both standard BouncyCastle (`bcprov-jdk18on`) and BouncyCastle FIPS (`bc-fips`) as the JCE provider for certificate generation. The provider is selected automatically at runtime:\n\n1. `KeyAndCertificateFactoryFactory.isBouncyCastleAvailable()` checks if `org.bouncycastle.jce.provider.BouncyCastleProvider` is on the classpath\n2. If available, `BCKeyAndCertificateFactory` is used; otherwise, MockServer falls back to JDK default crypto\n\n`BCKeyAndCertificateFactory` uses lazy initialization:\n- The provider name `\"BC\"` is hardcoded as a string constant (not referencing `BouncyCastleProvider.PROVIDER_NAME`) to avoid triggering class loading of the provider class at factory construction time\n- `ensureProviderRegistered()` is called on first use (synchronized) and registers the provider via `Security.addProvider(new BouncyCastleProvider())`\n- This design supports both `bcprov-jdk18on` (standard) and `bc-fips` (FIPS) since both register under the `\"BC\"` provider name\n\nTo use FIPS mode, replace the `bcprov-jdk18on` dependency with `bc-fips` in your classpath. No configuration changes are needed.\n\n### Startup Certificate Validation\n\nWhen custom TLS certificates are configured (`privateKeyPath` and `x509CertificatePath`), `CertificateConfigurationValidator` runs eagerly during `NettySslContextFactory.createServerSslContext()` and performs these checks:\n\n| Check | Behaviour on Failure |\n|-------|---------------------|\n| Both `privateKeyPath` and `x509CertificatePath` must be set together | **Hard failure** with message naming both properties |\n| Private key file must be valid PEM | **Hard failure** |\n| Certificate file must be valid PEM | **Hard failure** |\n| Certificate must not be expired or not-yet-valid | **Hard failure** with expiry/notBefore date |\n| Private key must match certificate (sign-verify challenge) | **Hard failure** |\n| Leaf certificate must be signed by configured CA | **Hard failure** |\n| CA certificate file must be valid PEM (when non-default) | **Hard failure** |\n| CA private key file must be valid PEM (when non-default) | **Hard failure** |\n| Certificate should include `serverAuth` EKU | **WARN log** (not hard failure) |\n\nValidation only runs when custom certs are provided. Default/auto-generated certificate deployments are unaffected.\n\n### Intermediate CA Chain Support\n\nWhen `x509CertificatePath` contains multiple PEM-encoded certificates, `BCKeyAndCertificateFactory` loads the full chain using `PEMToFile.x509ChainFromPEMFile()`. The first certificate is the leaf; subsequent certificates are intermediates. The full chain `[leaf, intermediate₁, ..., intermediateₙ, CA]` is sent during TLS handshake.\n\n### SSL Context Caching\n\n`NettySslContextFactory` caches `SslContext` objects to avoid regenerating them for every connection. It creates separate contexts for:\n- **Server-side**: For accepting client connections (with the dynamically-generated certificate)\n- **Client-side**: For forwarding to upstream servers (with configurable trust)\n\n### Forward Proxy Trust\n\nWhen forwarding requests, MockServer's `NettyHttpClient` needs to trust upstream servers. Three modes are supported via `ForwardProxyTLSX509CertificatesTrustManager`:\n\n| Mode | Behaviour |\n|------|-----------|\n| `ANY` | Trust all certificates (insecure, useful for testing) |\n| `JVM` | Use the JVM's default truststore |\n| `CUSTOM` | Use a custom CA chain from configuration |\n\n### Forward Target SSRF Validation\n\nWhen `forwardProxyBlockPrivateNetworks` is `true` (default `false`), MockServer validates the target host before opening any outbound connection. `InetAddressValidator.validateForwardTarget` resolves the hostname and rejects addresses in these ranges:\n\n| Blocked range | Reason |\n|--------------|--------|\n| `169.254.169.254` / `fd00:ec2::254` | Cloud instance metadata (AWS/GCP/Azure/Oracle) |\n| Loopback (`127.0.0.0/8`, `::1`) | Localhost |\n| Link-local (`169.254.0.0/16`, `fe80::/10`) | Link-local |\n| RFC 1918 private / RFC 4193 unique-local (`fc00::/7`) | Private network |\n| Wildcard / any-local | Bind-all addresses |\n\nThe validation runs in `HttpForwardActionHandler`, `HttpForwardValidateActionHandler`, `HttpForwardWithFallbackActionHandler`, `HttpForwardTemplateActionHandler`, and several `HttpState` call sites that accept an explicit forward target. After validation, the address is passed as an **unresolved** `InetSocketAddress` (`InetSocketAddress.createUnresolved`), so the actual DNS lookup happens on the Netty event loop rather than the calling thread — this guards against a TOCTOU window between validation and connection.\n\nThe feature is opt-in because MockServer is most commonly used to mock services running on localhost, Docker bridge networks, or Kubernetes service IPs, where blocking private addresses would prevent normal usage.\n\n## Mutual TLS (mTLS)\n\nMockServer supports mTLS for both incoming connections and the control plane.\n\nA complete end-to-end mTLS example with self-generated certificates, Docker Compose configuration, and curl commands is available in [`examples/docker-compose/docker_compose_with_mtls/`](../../examples/docker-compose/docker_compose_with_mtls/). The consumer-facing documentation is on the [HTTPS & TLS page](https://www.mock-server.com/mock_server/HTTPS_TLS.html#mtls_examples).\n\n### Incoming Connection mTLS\n\nWhen `tlsMutualAuthenticationRequired` is configured, `PortUnificationHandler` checks for TLS on the channel. If the connection is not TLS, it returns **426 Upgrade Required** and disconnects.\n\nClient certificates are extracted from the SSL session via `SniHandler.retrieveClientCertificates()` and stored as a channel attribute (`UPSTREAM_CLIENT_CERTIFICATES`).\n\n### Control Plane mTLS\n\nControl plane endpoints (`/mockserver/expectation`, `/mockserver/verify`, etc.) can require mTLS authentication. When configured, `HttpState.controlPlaneRequestAuthenticated()` validates the client certificate chain against the configured trust store.\n\n## Control Plane Authentication\n\n```mermaid\nflowchart TD\n    REQ([Control Plane Request]) --> AUTH{\"Authentication\nconfigured?\"}\n    AUTH -->|No| ALLOW([Proceed])\n    AUTH -->|Yes| TYPE{Auth type?}\n    TYPE -->|mTLS| MTLS[\"Validate client\ncertificate chain\"]\n    TYPE -->|JWT| JWT[\"Validate Bearer token\nnimbus-jose-jwt\"]\n    TYPE -->|Both| CHAIN[\"mTLS AND JWT\nboth must pass\"]\n    MTLS -->|Pass| ALLOW\n    MTLS -->|Fail| DENY([401/403])\n    JWT -->|Pass| ALLOW\n    JWT -->|Fail| DENY\n    CHAIN -->|Both pass| ALLOW\n    CHAIN -->|Either fails| DENY\n```\n\nAuthentication is configured in `MockServer.createServerBootstrap()` and validated in `HttpState.controlPlaneRequestAuthenticated()`:\n\n| Configuration | Handler | Mechanism |\n|---------------|---------|-----------|\n| `controlPlaneTLSMutualAuthenticationCAChain` | mTLS handler | Validates client cert against CA chain |\n| `controlPlaneJWTAuthenticationJWKSource` | JWT handler | Validates Bearer token using JWK source |\n| `controlPlaneOidcAuthenticationRequired` | OIDC handler | Verifies an external-IdP Bearer token (issuer + audience + scopes) and surfaces a verified principal |\n| Two or more configured | Chained handler | Every configured handler must succeed (logical AND) |\n\n### Verified OIDC Control-Plane Authentication\n\n`OidcAuthenticationHandler` (`o.m.authentication.oidc`) lets an external OIDC IdP govern the control plane. It is off by default — with no `controlPlaneOidc*` configuration the control plane behaves byte-for-byte as before. When `controlPlaneOidcAuthenticationRequired` is enabled it:\n\n1. extracts the single `Authorization: Bearer <jwt>` access token (missing or non-Bearer → `AuthenticationException` → 401);\n2. resolves the IdP JWK set — directly from `controlPlaneOidcJwksUri`, or by fetching `{controlPlaneOidcIssuer}/.well-known/openid-configuration` and reading its `jwks_uri`;\n3. verifies the token signature and asserts issuer (`controlPlaneOidcIssuer`), audience (`controlPlaneOidcAudience`), `exp`/`nbf` (60s skew), and that the granted scopes contain every `controlPlaneOidcRequiredScopes` entry. Scopes are read from `controlPlaneOidcScopeClaim` (default `scope`, space-delimited; array claims such as `scp`/`roles`/`groups` are also supported);\n4. returns an `AuthenticationResult` carrying the **verified** principal (`sub`), source `verified-oidc`, a redaction-safe claim subset (`sub`/`iss`/`aud`/`scope`/`groups`/`email` — never the raw token) and the normalised scope set.\n\nThe verified principal flows into the control-plane audit log (`AuditEntry.principalSource == \"verified-oidc\"`, `principal == sub`) instead of the unverified best-effort extraction. Wave 1 authenticates only; scope-based authorization/403 enforcement is a later wave.\n\n**Secure-by-default hardening** (the OIDC handler only — the legacy `JWTAuthenticationHandler` is unchanged):\n\n- **Asymmetric algorithms only.** The OIDC validator accepts only asymmetric JWS families (`RS*`, `PS*`, `ES*`, `EdDSA`). HMAC (`HS256/384/512`) and the unsecured `alg=none` are rejected — accepting HMAC against a public JWK set is the classic algorithm-confusion attack (forge an HMAC token using the public key bytes as the shared secret).\n- **`exp` required.** A token without an `exp` claim is rejected (nimbus only checks expiry when the claim is present, so without this a no-`exp` token would be valid forever). Real OIDC tokens always carry `exp`.\n- **`iss` or `aud` required.** At least one of `controlPlaneOidcIssuer` / `controlPlaneOidcAudience` must be configured. If both are blank the handler **fails construction** (logs an error, leaves the validator null so every request 401s fail-closed) — with neither set, any validly-signed token from the configured JWKS would be accepted regardless of who it was minted for.\n- **HTTPS JWKS required.** A remote `controlPlaneOidcJwksUri` / `controlPlaneOidcIssuer` (used for discovery) must use `https://`. Plaintext `http://` is permitted **only** to `localhost`/loopback (local testing); file/classpath JWKS paths are unaffected. An `http://` URL to any other host fails construction (fail-closed), preventing MITM on plaintext key retrieval.\n- **Generic 401 body.** On an OIDC authentication failure the client receives a generic `Unauthorized for control plane` body; the detailed reason (expected issuer/audience/scopes, signature failure) is logged **server-side only**. The legacy JWT/mTLS path still echoes its detailed reason to the client (unchanged). This is driven by `AuthenticationException.isClientSafeMessage()` — `false` for OIDC-originated exceptions, `true` (the default) for all others.\n\n### Control-Plane Authorization (claims→scopes)\n\nAuthentication answers *who* a caller is; **authorization** answers *what they may do*. On top of verified OIDC authentication, MockServer adds a coarse, hierarchical role model — \"RBAC by standards conformance\" — that maps a verified principal's scopes/groups to one of three roles and enforces a read/mutate split on the control plane.\n\nOff by default: with `controlPlaneAuthorizationEnabled=false` (the default) no authorization check runs and the control plane behaves byte-for-byte as before (verified authentication only). Authentication is unaffected by this switch.\n\n**Role model.** Roles are strictly hierarchical — `ADMIN ⊇ MUTATE ⊇ READ`:\n\n| Role | Grants |\n|------|--------|\n| `read` | Read-only control-plane operations (every `GET`, plus the read `PUT`s: `retrieve`, `verify`, `verifySequence`, `verifySLO`, `diff`, `explainUnmatched`, `debugMismatch`, `files/retrieve`, `files/list`) |\n| `mutate` | Everything `read` grants **plus** all mutations (creating expectations, clearing, resetting, binding ports, etc.) |\n| `admin` | Everything `mutate` grants (ceiling for future admin-only operations; currently a strict superset of `mutate`) |\n\n**Mapping.** `controlPlaneScopeMapping` maps a verified scope/group **value** to a role. Serialized form is a comma-separated list of `value=role` pairs, e.g. `platform-admins=admin,qa-team=mutate,viewers=read`. The scope values come from the same verified scope set as authentication (`controlPlaneOidcScopeClaim` — `scope`/`scp`/`roles`/`groups`). Unrecognised roles and malformed pairs are skipped at parse time so a typo can never silently widen access.\n\n**Enforcement** (in `HttpState.controlPlaneRequestAuthenticated`, after authentication succeeds and before the operation runs):\n\n1. the operation's **required role** is derived from the existing read/mutate split (`isControlPlaneRead` → `READ`; otherwise `MUTATE`);\n2. the principal's verified scopes are mapped through `controlPlaneScopeMapping` into its **granted roles**;\n3. if no granted role `satisfies` the required role, the request is denied with a generic **`403 Forbidden`** (`Forbidden for control plane`) and an audit entry is recorded with **`outcome=FORBIDDEN`**. The denial detail (granted vs required role) is logged at INFO **server-side only**, so authorization policy is not disclosed to the client.\n4. otherwise the operation proceeds and is audited with `outcome=AUTHORIZED` (as before).\n\n**Fail-closed, requires a verified principal.** Authorization maps the *verified* scope set, so it requires control-plane OIDC authentication to be enabled. A principal with no scopes, or whose scopes map to no role, is granted nothing and is **denied every mutation** (and every read unless it has a `READ`-or-higher role). A `read`-only principal passes reads but is `403`'d on mutations; an `admin` principal passes everything. FORBIDDEN denials are always recorded when auditing is enabled, even for reads (unlike AUTHORIZED reads, which honour `controlPlaneAuditReads`).\n\nClasses: `ControlPlaneRole` (enum, `o.m.authentication.authorization`) with `satisfies(required)`; `ControlPlaneAuthorizer` (same package) maps scopes→roles and decides allow/deny.\n\n**Coverage — exactly what authorization protects.** The authorization decision runs in `HttpState.controlPlaneRequestAuthenticated`. Every operation dispatched through `HttpState.handle` is covered: all expectation CRUD (`PUT/POST /expectation`), `clear`, `reset`, retrieve/verify, mode/bind-config, drift/chaos/SLO, replay, contract-test, and so on. A handful of routes are serviced directly in the Netty layer (`HttpRequestHandler`) outside `HttpState.handle`; their coverage is:\n\n| Route | Authn | Authz | Notes |\n|-------|-------|-------|-------|\n| `PUT /mockserver/configuration` (mutates live config) | yes | **yes** | Routed through the shared `HttpState.controlPlaneRequestAuthenticated` gate, so it takes the same read/mutate authorization as `handle`-dispatched mutations (classified `MUTATE`). A read-only principal is `403`'d; mutate/admin proceed. |\n| `GET /mockserver/configuration` | yes | yes | Same gate, classified `READ`. |\n| `GET /mockserver/openapi.yaml`, `GET /mockserver/llm/optimisationReport` | yes | yes | Reads; routed through the shared gate. |\n| `GET /mockserver/status`, `GET /mockserver/ready` | **no** | **no** | Deliberately open: these are liveness/readiness probes and must be reachable by health-check infrastructure without credentials. |\n| `PUT /mockserver/bind` | yes | **yes (MUTATE)** | Auth-gated in `HttpRequestHandler` via the same `controlPlaneRequestAuthenticated` call as every other mutation. An unauthenticated caller receives 401/403 before any port is rebound. Default (no auth configured) is a no-op: the gate returns true and binding proceeds. |\n| `PUT /mockserver/stop` | yes | **yes (MUTATE)** | Auth-gated identically to `/bind` — an unauthenticated caller cannot stop the server. Default (no auth configured) is a no-op: the gate returns true and `/stop` proceeds. |\n| MCP control plane (`POST /mockserver/mcp` over HTTP/1.1, HTTP/2, HTTP/3, and JSON-RPC batch) | yes | **yes — per-tool read/mutate** | MCP requests are **authenticated** (same mTLS/JWT/OIDC as every control-plane route). When `controlPlaneAuthorizationEnabled` is true, per-tool **read/mutate authorization** is enforced: `McpToolRegistry` classifies each tool as read or mutate (fail-closed — an unclassified tool defaults to MUTATE), and `McpRequestProcessor` calls `HttpState.controlPlaneToolAuthorized` before executing the tool. A read-only principal is `403`'d on mutating tools (`create_expectation`, `clear_expectations`, `reset`, etc.). When `controlPlaneAuthorizationEnabled` is false (the default), no authorization check runs. |\n\nHTTP/3 non-MCP control-plane requests re-dispatch into `HttpState.handle`, so they inherit full authorization automatically.\n\n### Enriched Authentication SPI (`AuthenticationResult`)\n\nThe `AuthenticationHandler` SPI gained a richer, default-adapted method alongside the legacy boolean:\n\n```java\ndefault AuthenticationResult authenticate(HttpRequest request) {\n    return controlPlaneRequestAuthenticated(request)\n        ? AuthenticationResult.authenticated(null, \"none\", Map.of(), Set.of())\n        : AuthenticationResult.unauthenticated();\n}\n```\n\n`AuthenticationResult` is immutable and carries `authenticated`, `principal` (null = anonymous), `principalSource`, a read-only `claims` map and a read-only `scopes` set. Existing and third-party handlers that implement only the boolean method keep working unchanged — the default adapter treats their `true` as authenticated-but-anonymous. `ChainedAuthenticationHandler.authenticate()` ANDs every delegate, returns unauthenticated if any fails, and otherwise selects the first delegate with a non-null principal (so an OIDC/JWT principal wins over an mTLS-only null) while unioning all delegates' scopes.\n\n### MCP Endpoint Authentication\n\nThe MCP endpoint (`/mockserver/mcp`) enforces the same control-plane **authentication** as all other control-plane routes. When `controlPlaneTLSMutualAuthenticationCAChain` and/or `controlPlaneJWTAuthenticationJWKSource` are configured, MCP requests must satisfy the same mTLS and/or JWT requirements. Unauthenticated MCP requests receive a `401 Unauthorized` response with a JSON-RPC error body. This ensures that enabling MCP does not widen the attack surface of a secured MockServer instance.\n\n**Per-tool authorization.** When `controlPlaneAuthorizationEnabled=true`, per-tool read/mutate authorization is enforced at the MCP layer (see the coverage table above): `McpToolRegistry` classifies each tool as read or mutate (fail-closed), and `McpRequestProcessor` enforces the role check via `HttpState.controlPlaneToolAuthorized` before executing any tool call.\n\n### Authentication Classes\n\n| Class | Package | Purpose |\n|-------|---------|---------|\n| `AuthenticationHandler` | `o.m.authentication` | Core interface: legacy `controlPlaneRequestAuthenticated(HttpRequest): boolean` plus default-adapted `authenticate(HttpRequest): AuthenticationResult` |\n| `AuthenticationResult` | `o.m.authentication` | Immutable enriched outcome: authenticated flag, verified principal, principalSource, read-only claims/scopes |\n| `ChainedAuthenticationHandler` | `o.m.authentication` | Chains multiple `AuthenticationHandler` instances (logical AND — all must pass); combines results selecting the first verified principal and unioning scopes |\n| `AuthenticationException` | `o.m.authentication` | Thrown on authentication failure |\n| `MTLSAuthenticationHandler` | `o.m.authentication.mtls` | Validates client certificate chain against configured CA certificates via `X509Certificate.verify()` |\n| `JWTAuthenticationHandler` | `o.m.authentication.jwt` | Loads JWK keys from URL (`RemoteJWKSet`) or file (`ImmutableJWKSet`), extracts Bearer token from `Authorization` header, delegates to `JWTValidator` |\n| `OidcAuthenticationHandler` | `o.m.authentication.oidc` | Verifies an external-IdP OIDC Bearer token (signature + issuer + audience + exp/nbf + required scopes) and returns a verified-principal `AuthenticationResult`; resolves the JWK set directly or via OIDC discovery |\n| `ControlPlaneRole` | `o.m.authentication.authorization` | Coarse hierarchical role enum (`READ` < `MUTATE` < `ADMIN`) with `satisfies(required)` |\n| `ControlPlaneAuthorizer` | `o.m.authentication.authorization` | Maps a principal's verified scopes through `controlPlaneScopeMapping` into granted roles and decides allow/deny against the operation's required role |\n| `JWTValidator` | `o.m.authentication.jwt` | Validates JWT tokens using nimbus-jose-jwt; supports `withExpectedAudience()`, `withMatchingClaims()`, `withRequiredClaims()` |\n| `JWTGenerator` | `o.m.authentication.jwt` | Generates JWT tokens with configurable claims (used in tests) |\n| `JWKGenerator` | `o.m.authentication.jwt` | Generates JWK sets from `AsymmetricKeyPair` objects (RSA and EC key types) |\n\n### Supported JWS Algorithms\n\n`JWTValidator` supports 11 JWS algorithms — **asymmetric families only**. HMAC (`HS256/384/512`)\nis rejected: the validator verifies against a public-key JWK set loaded from a URL or file, and\naccepting HMAC there is the classic algorithm-confusion forgery vector (an attacker signs an HMAC\ntoken using the public key bytes as the shared secret). This matches `OidcJWTValidator`.\n\n| Family | Algorithms |\n|--------|-----------|\n| RSA PKCS#1 | `RS256`, `RS384`, `RS512` |\n| ECDSA | `ES256`, `ES256K`, `ES384`, `ES512` |\n| RSA-PSS | `PS256`, `PS384`, `PS512` |\n| EdDSA | `EdDSA` |\n\n### JWT Authentication\n\nUses `nimbus-jose-jwt` library. The JWT handler:\n1. Extracts the `Authorization: Bearer <token>` header\n2. Validates the token against the configured JWK source\n3. Checks required claims (issuer, audience, etc.)\n\n## Proxy Authentication\n\nFor HTTP CONNECT proxy requests, MockServer supports Basic authentication:\n\n1. `HttpRequestHandler` checks the `Proxy-Authorization` header\n2. Validates against configured username/password\n3. On failure: returns **407 Proxy Authentication Required** with `Proxy-Authenticate: Basic` header\n\nSOCKS5 proxy also supports username/password authentication (configured separately).\n\n## Data Plane Authentication\n\nAll of the authentication above protects the **control plane** (`/mockserver/*`) or the `CONNECT`\nproxy. The **data plane** — the mocked endpoints themselves — is open by default. An opt-in,\ndefault-off gate (`dataPlaneAuthenticationRequired`) can require credentials on every mocked request.\n\n```mermaid\nflowchart TD\n    REQ([Request reaches data-plane dispatch]) --> EN{\"dataPlaneAuthenticationRequired?\"}\n    EN -->|false default| PROC([processAction — serve mock])\n    EN -->|true| CFG{\"Any scheme configured?\"}\n    CFG -->|No| DENY([401 — fail closed])\n    CFG -->|Yes| ANY{\"Request satisfies ANY configured scheme? (Basic / Bearer / API-key)\"}\n    ANY -->|Yes| PROC\n    ANY -->|No| DENY401([401 + WWW-Authenticate])\n```\n\nThe gate sits at the top of the data-plane `else` branch in `HttpRequestHandler.channelRead0`, just\nbefore the existing mTLS-upgrade check and `httpActionHandler.processAction(...)`. Because control-plane\nroutes, health/status/ready probes and `CONNECT` are all matched in **earlier** branches, reaching this\nbranch already means the request is a genuine data-plane request — so control-plane administration,\nliveness/readiness probes and the proxy `CONNECT` handshake are never gated by data-plane auth.\n\n| Aspect | Behaviour |\n|--------|-----------|\n| Default | `dataPlaneAuthenticationRequired=false` — no gate, byte-identical to a server without the feature |\n| Schemes | HTTP Basic, Bearer token, API-key header — any combination |\n| Multi-scheme | **Accept-any** (logical OR): a request is accepted if it satisfies any one configured scheme. Adding a scheme can only widen the accepted set |\n| Required-but-unconfigured | **Fail-closed**: every data-plane request is rejected (401) rather than allowed |\n| Failure response | `401 Unauthorized`, body `Unauthorized for data plane`; `WWW-Authenticate: Basic realm=\"…\"` when Basic is configured, else `Bearer` when Bearer is configured, else no challenge (API-key-only) |\n| Secret comparison | Constant-time (`MessageDigest.isEqual` on UTF-8 bytes) for password / token / API-key value; credential values never logged |\n\nThe policy/decision lives in core (`DataPlaneAuthenticator`, `o.m.authentication.dataplane`) so it is unit\ntestable; the Netty handlers only invoke it and write the 401. The invocation + 401-writing is itself\nfactored into a single shared netty helper (`DataPlaneAuthenticationGate.isAuthenticated(...)`) so that\n**every** data-plane dispatch path enforces it identically — there is no transport on which the gate can be\nskipped. `configuration.dataPlaneAuthenticationRequired()` is a single boolean read, so the default-off\npath adds nothing measurable to the hot path.\n\n**Scope.** The gate covers every HTTP data-plane dispatch path:\n\n- **HTTP/1.1, HTTP/2 and gRPC-over-h2** — `HttpRequestHandler`, just before `httpActionHandler.processAction(...)`.\n- **HTTP/3 (QUIC), including gRPC-over-HTTP/3** — `Http3MockServerHandler`, at both the normal and the\n  gRPC data-plane dispatch sites, before `processAction(...)`. HTTP/3 carries the same HTTP\n  `Authorization` / api-key headers, so it is the same request type and the same gate applies. (This path\n  previously bypassed the gate — a fail-open — and is now closed.)\n- Requests tunnelled through a `CONNECT` proxy are decrypted and re-dispatched back through\n  `HttpRequestHandler`, so they are gated too once enabled.\n\nOn all of the above, control-plane (`/mockserver/*`), liveness/status/ready probes and `CONNECT` are routed\nthrough `httpState.handle(...)` (or earlier branches) **before** the gate, so they remain reachable without\ndata-plane credentials — an operator can still administer a locked-down server.\n\n**Out of scope.** Raw-binary proxy traffic handled by `BinaryRequestProxyingHandler` is a non-HTTP byte\nstream (no HTTP request structure), so HTTP credentials are not meaningful there and the gate does not\napply. mTLS for incoming connections (`tlsMutualAuthenticationRequired`) is an orthogonal transport-layer\ncheck handled earlier in `PortUnificationHandler` and is unaffected.\n\n### Data-Plane Authentication Properties\n\n| Property | Default | Purpose |\n|----------|---------|---------|\n| `dataPlaneAuthenticationRequired` | false | Master switch — require auth on mocked endpoints |\n| `dataPlaneBasicAuthenticationUsername` | (none) | HTTP Basic username (Basic active only when both username and password are set) |\n| `dataPlaneBasicAuthenticationPassword` | (none) | HTTP Basic password |\n| `dataPlaneBasicAuthenticationRealm` | MockServer | Realm advertised in the `WWW-Authenticate: Basic` challenge |\n| `dataPlaneBearerAuthenticationToken` | (none) | Expected `Authorization: Bearer <token>` value |\n| `dataPlaneApiKeyAuthenticationHeader` | (none) | Header name carrying the API key (e.g. `X-API-Key`) |\n| `dataPlaneApiKeyAuthenticationValue` | (none) | Expected API-key value (API-key active only when both header and value are set) |\n\n## TLS Configuration Properties\n\n| Property | Default | Purpose |\n|----------|---------|---------|\n| `tlsMutualAuthenticationRequired` | false | Require client certificates |\n| `tlsMutualAuthenticationCertificateChain` | (none) | PEM file with trusted CA chain for client certs |\n| `dynamicallyCreateCertificateAuthorityCertificate` | false | Auto-generate CA cert |\n| `certificateAuthorityPrivateKey` | (auto) | PEM file for custom CA private key |\n| `certificateAuthorityCertificate` | (auto) | PEM file for custom CA certificate |\n| `forwardProxyTLSX509CertificatesTrustManagerType` | ANY | Trust mode for upstream connections |\n| `forwardProxyTLSCustomTrustX509Certificates` | (none) | PEM file for custom upstream trust |\n| `controlPlaneTLSMutualAuthenticationRequired` | false | Require mTLS for control plane |\n| `controlPlaneTLSMutualAuthenticationCAChain` | (none) | CA chain for control plane mTLS |\n| `controlPlaneJWTAuthenticationJWKSource` | (none) | JWK source URL for JWT validation |\n| `controlPlaneJWTAuthenticationRequired` | false | Require JWT for control plane |\n| `controlPlaneOidcAuthenticationRequired` | false | Require verified external-IdP OIDC token for control plane |\n| `controlPlaneOidcIssuer` | (none) | Required `iss`; also used for OIDC discovery of the JWKS URI |\n| `controlPlaneOidcJwksUri` | (none) | JWK set URI (skips discovery when set) |\n| `controlPlaneOidcAudience` | (none) | Required `aud` on control-plane tokens |\n| `controlPlaneOidcRequiredScopes` | (empty) | Scopes that must all be present |\n| `controlPlaneOidcScopeClaim` | scope | Claim holding granted scopes (`scope`/`scp`/`roles`/`groups`) |\n| `controlPlaneAuthorizationEnabled` | false | Enforce coarse role-based authorization of control-plane requests (requires a verified principal) |\n| `controlPlaneScopeMapping` | (empty) | Map verified scope/group values to roles, e.g. `platform-admins=admin,qa-team=mutate,viewers=read` |\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6F9A:40B0C:180593:5EB469:6AB92EF2"},"text_sha256":"3a966ca14ace014a8dad2fbf82c897262f3fc0b392324601ce46f780e626fcc8"},{"path":"docs/operations/security.md","size":28732,"blob_sha":"d388ec3800316cb5bf72e5b52550b1fa366207fe","priority":1,"status":200,"text":"# Security\n\nMockServer's security scanning, vulnerability management, and the security posture of released and pre-release artifacts.\n\n## Overview\n\nMockServer is a **development and testing tool** -- it is not designed for production deployment. Its security posture reflects this: the project invests heavily in automated scanning and dependency management to keep the supply chain clean, while deliberately retaining certain capabilities (like SSRF forwarding and trust-all TLS) that are essential for testing but would be vulnerabilities in a production service.\n\nUsers who need to lock down a MockServer deployment can harden these capabilities through configuration. The consumer-facing [**API Security: Configuration Hardening**](https://www.mock-server.com/mock_server/control_plane_authorisation.html#configuration_hardening) guide ([source](../../jekyll-www.mock-server.com/mock_server/control_plane_authorisation.html)) documents the recommended property values -- loopback binding, SSRF blocking, upstream TLS validation, the TLS protocol floor, response-template class restrictions, request-parsing limits, and control-plane authentication (mTLS/JWT).\n\nSee [SECURITY.md](../../SECURITY.md) for the full security policy, including intentional security behaviours and vulnerability reporting.\n\n## Control-plane audit logging\n\nWhen MockServer runs as shared infrastructure, an opt-in audit log records *who changed mock state* (control-plane mutations: who/what/when/where/outcome) so changes are accountable. It is off by default and is **not** data-plane traffic logging. Enable it with `controlPlaneAuditEnabled` and retrieve it via `GET /mockserver/audit`. See [event-system.md](../code/event-system.md#control-plane-audit-log) and [configuration-reference.md](../code/configuration-reference.md#controlplaneauditenabled-controlplaneauditmaxentries-controlplaneauditreads).\n\nSecurity-relevant properties of the audit log:\n\n- **Records no bodies and no headers.** Each entry stores only redacted, structural metadata (method, control-plane path with the query string dropped, logical operation, source address, best-effort principal, outcome). It can never become a sink for request payloads or credential headers.\n- **Redaction (by omission).** The path's query string is stripped, and no header or body is ever stored, so there is no credential-bearing free text to scrub; the `summary` field is unused (`null`) in v1. The best-effort principal parser reads only the JWT `sub` claim (or the mTLS subject CN) and never stores the raw bearer token. (If a non-null `summary` is added later it must be scrubbed via `FixtureRedactor`'s default sensitive set + `***REDACTED***` at that point.)\n- **Default-off and fail-soft.** When disabled, control-plane operations behave byte-for-byte identically. The audit emit is wrapped in `try/catch` and can never throw into the request path.\n- **Best-effort, UNVERIFIED principal (v1).** The principal is read from an unverified JWT `sub` (no signature verification) or the mTLS client-certificate CN, else `anonymous`. **Verified identity is a later unit (1.5-A)** — do not treat the v1 principal as an authenticated subject; treat it as a hint correlated with the (separately enforced) control-plane authentication.\n\n## Static Analysis: CodeQL\n\nGitHub's CodeQL semantic analysis runs automatically on:\n- Every push to `master`\n- Every pull request targeting `master`\n- Weekly (Tuesdays at 22:00 UTC)\n\nCodeQL scans **four languages** in the monorepo:\n\n| Language | Scope |\n|----------|-------|\n| Java | `mockserver/` (server, core, clients, integrations) |\n| JavaScript | `mockserver-ui/`, `mockserver-client-node/`, `mockserver-node/` |\n| Python | `mockserver-client-python/` |\n| Ruby | `mockserver-client-ruby/` |\n\nResults appear in the [GitHub Security tab](https://github.com/mock-server/mockserver-monorepo/security/code-scanning). CodeQL detects issues including SQL injection, path traversal, insecure deserialization, cross-site scripting, and other OWASP Top 10 categories.\n\n**Workflow:** [`.github/workflows/codeql-analysis.yml`](../../.github/workflows/codeql-analysis.yml)\n\n## Dependency Scanning: Dependabot\n\nDependabot monitors **8 package ecosystems** across the monorepo for outdated and vulnerable dependencies:\n\n| Ecosystem | Directory(ies) | PR Limit |\n|-----------|----------------|:--------:|\n| Maven | `/mockserver` | 20 |\n| Maven | `/mockserver/mockserver-maven-plugin` | 10 |\n| npm | `/mockserver-ui`, `/mockserver-client-node`, `/mockserver-node`, `/.opencode` | 10 |\n| pip | `/mockserver-client-python` | 10 |\n| Bundler | `/mockserver-client-ruby`, `/jekyll-www.mock-server.com` | 10 |\n| GitHub Actions | `/` | 10 |\n| Docker | `/docker` + subdirs, `/docker_build/*` | 10 |\n| Terraform | `/terraform/*` | 10 |\n\nThe Docker and Terraform directory columns are summarised; Dependabot has no glob support, so each directory is listed explicitly in [`.github/dependabot.yml`](../../.github/dependabot.yml) (10 Docker dirs, 4 Terraform dirs). When you add a new Docker/Terraform directory, add it there too or it will not be scanned.\n\nDependabot runs **daily** and opens pull requests for version updates and security patches. Minor and patch updates are **grouped per ecosystem** (e.g. `maven-minor-and-patch`) so related bumps land in a single PR instead of many.\n\n### Namespace Migration Status\n\nThe `javax` → `jakarta` namespace migration is **complete** (Spring 7, Spring Boot 4, Tomcat 11, Jetty 12, Jersey 4, jakarta.* artifacts at EE 10+). The Dependabot ignore list no longer carries jakarta-related blocks. JDK-namespace `javax.*` (e.g. `javax.net.ssl`, `javax.xml.*`, `javax.script.*`, `javax.annotation.Nullable` JSR-305) remains unchanged — those classes ship with the JDK and stay `javax`.\n\nSee the Java compatibility policy in [AGENTS.md](../../AGENTS.md#java-compatibility-policy).\n\n### Version Ceilings (Java 17 Floor)\n\nMockServer targets **Java 17** as the minimum supported runtime. Some dependencies drop Java 17 support in newer major lines, so they are pinned below the version that requires a newer JDK. These ceilings are enforced in `.github/dependabot.yml` with explicit `versions: [\">=X.0.0\"]` ignore entries (stricter than ignoring only `version-update:semver-major`, and applied in **every** Maven block that references the dependency).\n\n| Dependency | Ceiling | Reason |\n|------------|---------|--------|\n| `com.puppycrawl.tools:checkstyle` | `< 13.0.0` (stay on 12.x) | checkstyle 13.x is compiled for Java 21 (class file version 65.0) and fails to load under Java 17 — see the CodeQL `Analyze (java)` build, which runs on Java 17 |\n| `org.infinispan:infinispan-core` | `< 15.0.0` (stay on 14.0.x) | Infinispan 15.x requires Java 21+. The 14.0.x line is the last to support Java 17. Used only by `mockserver-state-infinispan`. |\n| `com.graphql-java:graphql-java` | `< 25.0.0` (precautionary) | graphql-java 22.x–24.x ship Java 11 bytecode and run fine on Java 17 (verified by `mockserver-core` build/tests on the Java 17 target). The ceiling is precautionary: a future major (25.x) could raise the runtime floor, so it must be manually verified on Java 17 before adoption. Pulls in `com.graphql-java:java-dataloader` (3.3.x); ANTLR4 runtime and `reactive-streams` arrive transitively. Used by `org.mockserver.graphql.*` for schema-driven GraphQL response synthesis. |\n\n**When raising the Java floor:** remove the corresponding ceiling here and the matching ignore entries in `.github/dependabot.yml`, then let the dependency upgrade. The Dependabot ignore does not block **manual** version bumps in `pom.xml` — keep this table in mind when hand-editing dependency versions.\n\n### Native / Platform Dependencies\n\nDependencies that interact with the OS kernel or native libraries, added for specific platform features. These are safe on all platforms — callers detect availability at runtime and fall through when unavailable.\n\n| Dependency | Version | Module | Purpose | Java 17 compatible |\n|------------|---------|--------|---------|:---:|\n| `net.java.dev.jna:jna` | `${jna.version}` (5.19.0) | `mockserver-netty` | JNA-based `getsockopt(SO_ORIGINAL_DST)` for transparent proxy original-destination resolution (`SoOriginalDstResolver`). O(1) socket option read, tried before the O(n) conntrack table scan. | Yes (supports Java 8+) |\n| `io.netty:netty-transport-classes-epoll` | `${netty.version}` | `mockserver-core`, `mockserver-netty` | Pure-Java API classes for `EpollSocketChannel`, `EpollEventLoopGroup`, `EpollServerSocketChannel`, and `Epoll.isAvailable()` — needed at compile time by `NettyTransport` (transport selection) and `SoOriginalDstResolver` (fd extraction). No native classifier (the `.so` is only needed at runtime on Linux). | Yes (follows Netty BOM) |\n| `io.netty:netty-transport-native-epoll` (classifier: `linux-x86_64`) | `${netty.version}` | `mockserver-netty` (runtime) | Native JNI library that activates `Epoll.isAvailable()` on Linux x86_64. Bundled in the distribution jar-with-dependencies and Docker images. Inert on non-Linux platforms. | Yes (follows Netty BOM) |\n| `io.netty:netty-transport-native-epoll` (classifier: `linux-aarch_64`) | `${netty.version}` | `mockserver-netty` (runtime) | Native JNI library that activates `Epoll.isAvailable()` on Linux aarch64 (ARM64). Bundled in the distribution jar-with-dependencies and Docker images. Inert on non-Linux/non-ARM platforms. | Yes (follows Netty BOM) |\n| `io.netty:netty-codec-http3` | `${netty.version}` | `mockserver-netty` (compile) | HTTP/3 codec for experimental QUIC support (graduated from the Netty incubator into mainline Netty 4.2). Transitively pulls `netty-codec-native-quic` with native classifiers for linux-x86_64, linux-aarch_64, osx-x86_64, osx-aarch_64, windows-x86_64. The native artifact contains a BoringSSL JNI binding. Fail-soft at runtime: if the native cannot be loaded, `Quic.isAvailable()` returns false and the HTTP/3 server is not started. | Yes (follows Netty BOM) |\n\n### Embedded Data Grid Dependencies (Optional Module)\n\nDependencies introduced by `mockserver-state-infinispan`, which provides the Infinispan-backed `StateBackend` for clustered MockServer state. This module is **optional** -- it is not pulled into `mockserver-core` or any other module. Its transitive dependencies enter CodeQL/Dependabot scan scope only when the module is included in the reactor build.\n\n| Dependency | Version | Module | Purpose | Java 17 compatible |\n|------------|---------|--------|---------|:---:|\n| `org.infinispan:infinispan-core` | 14.0.35.Final | `mockserver-state-infinispan` | Embedded (non-server) Infinispan cache manager for LOCAL and clustered KV stores. Provides the `StateBackend` implementation when `stateBackend=infinispan` is configured. | Yes (14.0.x line targets Java 11+; 15.x raises to Java 21) |\n| `org.jgroups:jgroups` | (transitive of infinispan-core) | `mockserver-state-infinispan` | Cluster transport for Infinispan. In LOCAL mode (default, `clusterEnabled=false`), no JGroups transport is started. In clustered mode (`clusterEnabled=true`), JGroups provides the SHARED_LOOPBACK in-JVM transport (for testing) or TCP transport for multi-host clustering. The default built-in JGroups stack (`jgroups-loopback.xml`) uses SHARED_LOOPBACK, which does not open network sockets; custom multi-host stacks use TCP bound to loopback by default. | Yes |\n| `org.infinispan.protostream:protostream` | (transitive of infinispan-core) | `mockserver-state-infinispan` | Protocol Buffers serialization framework used internally by Infinispan. Not used directly by MockServer's clustered wire format (which uses `JavaSerializationMarshaller` with an explicit allow-list). | Yes |\n\n**JGroups network security note:** In LOCAL mode (default, `clusterEnabled=false`), JGroups does not open any network listeners. In clustered mode (`clusterEnabled=true`), the default built-in JGroups stack uses `SHARED_LOOPBACK` transport (in-process, no network I/O), suitable for embedded testing. For multi-host clustering, users must provide a custom JGroups stack via the `clusterTransportConfig` property pointing to a JGroups XML file with a real transport (TCP/UDP) and appropriate discovery protocol (TCPPING, DNS_PING, etc.). The TCP transport should be configured with explicit bind addresses and firewall rules appropriate to the deployment environment.\n\n**Infinispan serialization allow-list (P0 security gate -- RESOLVED in Phase 2c):** The Phase 2b LOCAL-mode backend used `global.serialization().allowList().addRegexp(\".*\")` -- a wildcard that permits deserialization of any class. This was safe in LOCAL mode because caches are heap-only with no network marshalling. Phase 2c **resolves this P0 gate** by configuring the clustered path with:\n\n1. `JavaSerializationMarshaller` as the explicit marshaller (instead of ProtoStream, to handle the generic `VersionedWrapper<V>` types without per-type proto schema definitions)\n2. An **explicit package allow-list** restricted to exactly the types that cross the wire:\n   - `org.mockserver.state.infinispan.*` (VersionedWrapper)\n   - `org.mockserver.state.*` (ExpectationEntry, Blob)\n   - `org.mockserver.mock.*`, `org.mockserver.model.*`, `org.mockserver.matchers.*` (domain model)\n   - `com.fasterxml.jackson.*` (ObjectNode for CRUD entities)\n   - `java.lang.*`, `java.util.*`, `java.time.*`, `[B` (JDK types, byte arrays)\n\nThe `ExpectationEntry` uses custom `writeObject`/`readObject` to serialize the `Expectation` as its JSON string (via `ExpectationDTO`), avoiding the need for the entire domain model to implement `Serializable`. The LOCAL-mode path retains the `\".*\"` wildcard because heap-only storage never deserializes untrusted bytes.\n\n### Cloud Blob Store Dependencies (Optional Modules)\n\nDependencies introduced by the cloud blob store modules, which provide durable `BlobStore` implementations for S3, GCS, and Azure Blob Storage. Each module is **optional** -- it is not pulled into `mockserver-core` or any other module. mockserver-core has **zero** compile-time or runtime dependencies on any cloud SDK; the cloud modules self-register via reflection when present on the classpath. Their transitive dependencies enter CodeQL/Dependabot scan scope only when the module is included in the reactor build.\n\n| Dependency | Version | Module | Purpose | Java 17 compatible |\n|------------|---------|--------|---------|:---:|\n| `software.amazon.awssdk:s3` | 2.31.9 | `mockserver-blob-s3` | AWS SDK v2 S3 client for the S3-backed `BlobStore`. Supports any S3-compatible store (MinIO, LocalStack) via endpoint override. | Yes (targets Java 8+) |\n| `com.google.cloud:google-cloud-storage` | 2.49.0 | `mockserver-blob-gcs` | Google Cloud Storage client for the GCS-backed `BlobStore`. Supports fake-gcs-server for testing. | Yes (targets Java 8+) |\n| `com.azure:azure-storage-blob` | 12.29.1 | `mockserver-blob-azure` | Azure Blob Storage client for the Azure-backed `BlobStore`. Supports Azurite emulator for testing. | Yes (targets Java 8+) |\n\n**Dependency isolation:** Each cloud SDK lives exclusively in its own module. The `mockserver-core` dependency tree contains no AWS, Google Cloud, or Azure artifacts. This is enforced by the module structure: core depends only on its own SPI interfaces (`BlobStore`, `BlobStoreFactory`), and cloud modules register their implementations via `StateBackendFactory.registerBlobStoreFactory()` at startup, discovered by reflection when `blobStoreType` is configured.\n\n### Test Dependencies (Docker-Gated)\n\nTest-scoped dependencies used for Docker-gated integration tests. These are never bundled in released artifacts.\n\n| Dependency | Version | Module | Purpose |\n|------------|---------|--------|---------|\n| `org.testcontainers:testcontainers` | 1.21.4 | `mockserver-async`, `mockserver-blob-s3`, `mockserver-blob-gcs`, `mockserver-blob-azure` (test) | Core Testcontainers API for Docker-gated integration tests |\n| `org.testcontainers:kafka` | 1.21.4 | `mockserver-async` (test) | Kafka container module for live-broker integration tests |\n\nThe Testcontainers version (1.21.4) is aligned with the existing `mockserver-testcontainers` module. Note that `mockserver-testcontainers` depends on `org.testcontainers:testcontainers` (and its transitive `docker-java-*` 3.4.2 artifacts) at **compile scope** — not test scope — because its public `MockServerContainer` extends Testcontainers' `GenericContainer`; consumers of `mockserver-testcontainers` therefore resolve Testcontainers 1.21.4 transitively (overridable via their own dependency management), and these artifacts are in CodeQL/Dependabot scan scope for that module. The 1.20.6 to 1.21.4 bump was required to fix `DockerClientFactory.isDockerAvailable()` returning false on Docker Desktop 4.67+ / Engine 29.x / API 1.54 — the bundled docker-java 3.4.1 in 1.20.6 got a 400 on the info endpoint; 1.21.4 bundles docker-java 3.4.2 and includes explicit fixes for recent Docker Engine API changes. MQTT integration tests use a `GenericContainer` with `eclipse-mosquitto:2.0` (no additional Testcontainers module needed). Transparent-proxy end-to-end tests (`SoOriginalDstEndToEndIT`, `TproxyEndToEndIT`) use the Docker CLI directly (via `ProcessBuilder`) to build and run privileged containers with NET_ADMIN for iptables REDIRECT/TPROXY rule setup — they do not use Testcontainers.\n\n### Maven Dependency Graph Submission\n\nGitHub's built-in dependency graph automatically indexes all manifest files (`pom.xml`, `package.json`, `Gemfile`, `requirements.txt`) and their transitive dependencies. This enables Dependabot vulnerability alerts for the full dependency tree -- currently tracking 2000+ packages including 347 Maven dependencies.\n\n## Vulnerability Scanning: Snyk\n\nSnyk provides a second layer of vulnerability scanning, independent of Dependabot:\n\n- **PR status checks:** Two Snyk integrations (`security/snyk (mockserver)` and `security/snyk (jamesdbloom)`) run on every pull request\n- **Dashboard:** [app.snyk.io/org/mockserver/projects](https://app.snyk.io/org/mockserver/projects)\n- **Policy file:** [`.snyk`](../../.snyk) documents any vulnerability IDs that are explicitly ignored, along with the rationale and a review date\n\nThe `.snyk` policy file excludes `mockserver-examples` (sample code, not shipped). As of the Java 17 / Jakarta EE 10 modernisation the ignore list is **empty** — the Java-11-era ignores (which suppressed ~20 Spring/Jetty/Boot/OkHttp/Reactor CVEs whose only fix required Java 17+) were removed once those vulnerable versions left the dependency tree. Vulnerabilities are now resolved through normal upgrades; add a new, dated ignore only when a deliberate constraint genuinely blocks a fix.\n\n### Renewing Snyk ignores\n\nWhen an ignore **is** added, give it a dated `expires:` (convention: 3 months out) so it cannot silently outlive its rationale. Renewal is a manual checkpoint: before the expiry date, re-run the Snyk scan, confirm the constraint still holds, and either remove the ignore (if the fix is now available) or refresh the `expires:` date with an updated reason. An empty ignore list (the current state) needs no renewal.\n\nSee [Snyk Security](snyk-security.md) for the full triage workflow, CLI commands, and vulnerability status by module.\n\n## CI/CD Infrastructure Security\n\nControls applied to the Buildkite build infrastructure and release pipeline. See [AWS Infrastructure](../infrastructure/aws-infrastructure.md) and [CI/CD](../infrastructure/ci-cd.md) for full details.\n\n### Least-Privilege CI Secrets\n\nEach agent queue receives only the Secrets Manager policies it actually consumes — the single `buildkite-read-build-secrets` policy has been replaced by per-secret, per-queue policies:\n\n| Queue | IAM policies attached | Rationale |\n|-------|----------------------|-----------|\n| `default` | `read-build-secrets-default` (API token + Sonatype), `read-dockerhub-secret`, `ecr-public-push` | Snapshot Docker push on master |\n| `trigger` | `read-buildkite-api-token` | Trigger polling only needs API token |\n| `perf` | `read-buildkite-api-token`, `perf-results` | Commit guard + S3 results |\n| `release` | `read-build-secrets-release`, `read-release-secrets`, `read-dockerhub-secret`, `ecr-public-push`, `release-website-tfstate` | Full release publishing |\n\nThe `dependency-cache` policy is detached from all queues (runtime wiring reverted pending cache-integrity implementation).\n\n### Release Secret Hygiene (File-based, not env vars)\n\nRelease scripts write secrets to `0600` files under `.tmp/` (volume-mounted into Docker containers) rather than passing them as `docker run -e` flags. This prevents secrets appearing in `/proc/1/environ` or `docker inspect` output on the agent host.\n\n### Released Image Signing\n\nAll release Docker images (Docker Hub + ECR) are cosign-signed by digest after push, using the same key stored in `mockserver-release/cosign-key`. This allows consumers to verify image provenance. The release Docker step runs on the **release** queue (the only queue granted `read_release_secrets`, which includes the cosign key) and auto-installs a checksum-pinned cosign binary; signing is non-fatal if the key is unavailable. See [Docker](../infrastructure/docker.md#verifying-image-signatures) for the verification command.\n\n### CloudTrail Audit Events\n\nThe CloudTrail trail (`mockserver-management-trail`) uses advanced event selectors to capture:\n- All management events (which include every Secrets Manager API call — `GetSecretValue` on `mockserver-build/` and `mockserver-release/` secrets is logged here)\n- All S3 object-level **data** events on the Terraform state bucket (`mockserver-terraform-state/`)\n\nSecrets Manager is not a supported CloudTrail data-event resource type, so secret access is audited via management events rather than a dedicated data-event selector (an `AWS::SecretsManager::Secret` data selector is rejected by the CloudTrail API with `InvalidEventSelectorsException`).\n\n### GuardDuty Alerting\n\nGuardDuty findings with severity ≥ 7 (HIGH and CRITICAL) trigger an EventBridge rule that forwards to the existing `buildkite-mockserver-alerts` SNS topic. The SNS topic is encrypted with `alias/aws/sns`.\n\n### KMS Encryption at Rest\n\n| Resource | CMK |\n|----------|-----|\n| Terraform state bucket | `alias/mockserver-terraform-state` (bootstrap CMK, rotation enabled) |\n| AWS Config delivery bucket | CloudTrail CMK (`alias/mockserver-cloudtrail`, shared) |\n| SNS alerts topic | `alias/aws/sns` (AWS-managed) |\n\n### VPC Flow Logs\n\nVPC flow logs are set to `traffic_type = ALL` on all four VPCs (default, trigger, release, perf queues), capturing both accepted and rejected traffic. Previously only REJECT traffic was logged.\n\n### Tfstate Lock Scoping\n\nThe `buildkite-release-website-tfstate` IAM policy grants `s3:DeleteObject` only on `website/terraform.tfstate.tflock` (the S3-native lock file), not on the state file itself. GetObject/PutObject on the state file are separate statements. This prevents accidental or malicious deletion of the live state.\n\n## AI Security Review\n\nIn addition to automated scanning, every code change receives a security-focused review as part of the [AI-assisted development process](ai-assisted-development.md):\n\n### Dedicated Security Auditor Agent\n\nA specialist `security-auditor` AI agent performs targeted security reviews with a checklist covering:\n\n- **Secrets & credentials** -- hardcoded tokens, API keys, connection strings, leaked PEM/JKS content, `.env` files\n- **Input validation** -- untrusted data paths, missing bounds checks, charset assumptions\n- **Injection prevention** -- command injection, LDAP injection, XSS, XXE, SSRF\n- **Network security** -- TLS defaults, certificate validation, cipher suite selection, hostname verification\n- **Java-specific** -- unsafe deserialization, `Runtime.exec()` usage, weak random, information leakage\n- **Netty-specific** -- malformed request handling, ByteBuf release, pipeline state, WebSocket validation\n- **Dependencies** -- known CVEs, version pinning, transitive dependency risk\n\n### Security Lens in Every Code Review\n\nThe Review Constitution (applied to every commit, not just security-flagged ones) includes an **Insecurity lens** based on STRIDE threat modelling with 13 security principles, including MockServer-specific rules:\n\n- TLS certificate validation must be explicit\n- Control plane must be protectable\n- Template injection must be prevented\n- CORS headers must not weaken security\n\n## GitHub Security Features\n\nThe repository uses several GitHub security features:\n\n| Feature | Status | Purpose |\n|---------|--------|---------|\n| [Code scanning (CodeQL)](https://github.com/mock-server/mockserver-monorepo/security/code-scanning) | Active | Static analysis for vulnerabilities |\n| [Dependabot alerts](https://github.com/mock-server/mockserver-monorepo/security/dependabot) | Active | Vulnerable dependency detection |\n| [Dependabot security updates](https://github.com/mock-server/mockserver-monorepo/security/dependabot) | Active | Automatic PRs for security fixes |\n| [Dependency graph](https://github.com/mock-server/mockserver-monorepo/network/dependencies) | Active | Transitive dependency visibility |\n| [Security advisories](https://github.com/mock-server/mockserver-monorepo/security/advisories) | Active | Private vulnerability reporting |\n| Secret scanning | Active (GitHub default) | Prevents accidental secret commits |\n\n## SNAPSHOT and Pre-Release Versions\n\n### What are SNAPSHOT versions?\n\nIn the Maven ecosystem, a `-SNAPSHOT` suffix (e.g., `5.16.0-SNAPSHOT`) indicates the **in-development** version of the next release. SNAPSHOT artifacts are published to the Sonatype snapshots repository and represent the latest state of the `master` branch.\n\n### Security status of pre-release artifacts\n\n**SNAPSHOT and pre-release versions may contain unresolved security advisories.** This applies to:\n\n| Artifact | Pre-Release Identifier | Registry |\n|----------|----------------------|----------|\n| Java JARs | `-SNAPSHOT` suffix (e.g., `5.16.0-SNAPSHOT`) | Maven Central snapshots |\n| Docker images | `latest` and `SNAPSHOT` tags | Docker Hub |\n| Node.js packages | Published only at release time | npm |\n| Python package | Published only at release time | PyPI |\n| Ruby gem | Published only at release time | RubyGems |\n\n**At formal release time**, all known security issues are resolved to the extent technically possible. This means:\n\n1. All Dependabot and Snyk alerts with available patches are addressed\n2. Dependencies are updated to their latest compatible versions\n3. Any new CodeQL findings are reviewed and resolved\n4. The Snyk policy file's ignore expiry dates are reviewed and renewed only when a deliberate constraint still prevents a fix\n\n**Between releases**, the `master` branch and SNAPSHOT artifacts may temporarily carry unresolved advisories -- for example, when a new CVE is published against a dependency but the fix has not yet been integrated.\n\n### Base Image OS CVEs (Expected Baseline)\n\nContainer scanners (Trivy, Grype, the ArtifactHub Helm security report) will always list a residual set of CVEs against the Debian OS packages baked into the `gcr.io/distroless/java17` base image (`libc6`, `libexpat1`, `zlib1g`, `libuuid1`, `libpng16`, `liblcms2-2`, `libbz2-1.0`). These belong to the JRE base layer, not to MockServer code or its Maven dependencies, and are **expected** — most carry `Fixed in: -` (no upstream Debian patch yet), so they cannot be remediated at build time regardless of the JRE/Java version. The pinned base-image digests are kept current automatically by Dependabot's `docker` ecosystem, so fixes are adopted as soon as distroless rebuilds. See [Docker → Base Image CVE Baseline](../infrastructure/docker.md#base-image-cve-baseline) for the full triage guide.\n\n### Recommendations for Consumers\n\n- **For maximum security:** Pin to a specific release version (e.g., `7.2.0`), not `latest` or `SNAPSHOT`\n- **For Renovate/Dependabot users:** Configure version constraints to only match release versions, not SNAPSHOTs\n- **For Docker users:** Use versioned tags (e.g., `mockserver/mockserver:7.2.0`) rather than `latest`\n- **Subscribe to releases:** Watch the [GitHub releases page](https://github.com/mock-server/mockserver-monorepo/releases) for new versions with resolved security issues\n\n## Vulnerability Reporting\n\nTo report a security vulnerability in MockServer, use:\n- **GitHub Security Advisories:** https://github.com/mock-server/mockserver-monorepo/security/advisories/new\n- **Email:** Contact the maintainers through GitHub\n\nDo not open public issues for security vulnerabilities. See [SECURITY.md](../../SECURITY.md) for full reporting guidelines.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"28FC:3CC8A:180160:5EB055:6AB92EF4"},"text_sha256":"837688446f8c6cbfca0d9f40c6f6f150b3cea8c1afcbdf96af8b6f6e8cfa3847"},{"path":"docs/operations/snyk-security.md","size":6248,"blob_sha":"f09ce70c5c799370866005f18176288ab124db54","priority":1,"status":200,"text":"# Snyk Security Scanning\n\n## Overview\n\nMockServer uses [Snyk](https://snyk.io) for continuous security vulnerability scanning of Maven dependencies. Snyk automatically scans pull requests and reports vulnerabilities before they are merged.\n\n## Namespace Migration Status\n\nThe `javax`→`jakarta` namespace migration is **complete**. MockServer now targets Jakarta EE 10, Spring Framework 7.0.7, Tomcat 11, and Jetty 12. The `.snyk` policy file no longer carries ignore rules blocked solely by the old `javax` constraint.\n\nFor full details see [docs/operations/security.md](security.md).\n\n## Integration Points\n\n### PR Status Checks\n\nSnyk runs automatically on all pull requests via two integrations:\n\n1. **`security/snyk (mockserver)`** - Scans against the `mockserver` organization\n2. **`security/snyk (jamesdbloom)`** - Scans against the personal organization\n\nBoth checks must pass for a PR to be merged. Results are visible in the PR status checks with links to detailed reports on app.snyk.io.\n\n### Web Dashboard\n\n**URL:** https://app.snyk.io/org/mockserver/projects\n\nThe Snyk dashboard provides:\n- Real-time vulnerability monitoring across all Maven modules\n- Severity ratings (Critical, High, Medium, Low)\n- Remediation guidance\n- License compliance information\n\n## Snyk CLI\n\n### Installation\n\nThe Snyk CLI is already installed via Homebrew:\n\n```bash\nsnyk --version\n```\n\n### Authentication\n\nSnyk CLI uses OAuth for authentication:\n\n```bash\nsnyk auth\n```\n\nThis opens a browser window for authentication. The CLI stores credentials securely in the system keychain.\n\n### Running Scans Locally\n\n#### Scan all Maven modules\n\n```bash\nsnyk test --maven-aggregate-project\n```\n\n#### Scan main project only\n\n```bash\nsnyk test --file=pom.xml --package-manager=maven\n```\n\n#### Generate JSON output for analysis\n\n```bash\nsnyk test --maven-aggregate-project --json > snyk-report.json\n```\n\n#### Monitor project (upload to Snyk dashboard)\n\n```bash\nsnyk monitor --maven-aggregate-project\n```\n\n### Common Commands\n\n| Command | Description |\n|---------|-------------|\n| `snyk test` | Test for vulnerabilities |\n| `snyk monitor` | Upload snapshot to Snyk for continuous monitoring |\n| `snyk test --severity-threshold=high` | Only fail on high/critical severity |\n| `snyk test -d` | Debug mode (verbose output) |\n| `snyk ignore --id=SNYK-JAVA-...` | Ignore a specific vulnerability |\n\n## Vulnerability Triage\n\n### Compatibility Constraints\n\nThe `javax`→`jakarta` namespace migration is complete (Spring 7.0.7, Jakarta EE 10, Jetty 12, Tomcat 11). Previously blocked upgrades are now unblocked. See [docs/operations/security.md](security.md) for the current dependency policy and any remaining constraints.\n\n### Vulnerability Categories\n\nSnyk reports vulnerabilities in several categories. Prioritize based on:\n\n1. **Severity** (Critical > High > Medium > Low)\n2. **Exploitability** (Is the vulnerable code path actually used in MockServer?)\n3. **Remediation path** (Is a fixed version available and compatible?)\n\n### Decision Tree\n\n```mermaid\nflowchart TD\n    START[Snyk reports vulnerability] --> SEVERITY{Severity?}\n    SEVERITY -->|Critical/High| EXPLOITABLE{\"Exploitable in\\nMockServer context?\"}\n    SEVERITY -->|Medium/Low| REVIEW[Review in backlog]\n    \n    EXPLOITABLE -->|Yes| FIXAVAIL{\"Fixed version\\navailable?\"}\n    EXPLOITABLE -->|No| DOCUMENT[\"Document why not exploitable\\nAdd to .snyk ignore list\"]\n\n    FIXAVAIL -->|Yes| UPGRADE[Upgrade dependency]\n    FIXAVAIL -->|No| RISK{\"Accept risk or\\nfind alternative?\"}\n    \n    RISK -->|Accept risk| DOCUMENT\n    RISK -->|Find alternative| BACKPORT[\"Backport fix or\\nfind workaround\"]\n```\n\n### Current Status (as of June 2026)\n\n**All modules:** ✅ No known vulnerabilities blocked by namespace constraints. The `javax`→`jakarta` migration is complete; Spring 7.0.7, Jetty 12, and Tomcat 11 are now in use.\n\nFor any outstanding vulnerabilities, consult the Snyk dashboard at https://app.snyk.io/org/mockserver/projects.\n\n## Snyk Policy File\n\n**File:** `.snyk`\n\nMockServer uses a Snyk policy file to document vulnerabilities that are ignored with documented reasons (e.g., not exploitable in MockServer's context, or mitigated by isolation to test-only modules).\n\n### Policy Structure\n\nThe `.snyk` file contains:\n- **Ignore rules** for vulnerabilities that cannot be fixed or are not exploitable\n- **Expiration dates** to trigger periodic review\n- **Documented reasons** explaining each ignore decision\n\n### Adding New Ignores\n\nTo ignore a new vulnerability:\n\n```bash\n# Interactive - prompts for reason and expiration\nsnyk ignore --id=SNYK-JAVA-ORGSPRINGFRAMEWORK-12008931\n\n# Command line - specify all parameters\nsnyk ignore --id=SNYK-JAVA-ORGSPRINGFRAMEWORK-12008931 \\\n  --reason=\"Not exploitable in MockServer context: only used in test-only examples module.\" \\\n  --expires=\"2026-08-11\"\n```\n\nOr manually edit the `.snyk` file following the existing format.\n\n### Testing with Policy\n\n```bash\n# Test with policy file (default location: .snyk)\nsnyk test --maven-aggregate-project\n\n# Specify custom policy location\nsnyk test --policy-path=.snyk\n```\n\n### Policy Review Process\n\nThe expiration dates in the policy file trigger automatic Snyk notifications when they approach. This ensures:\n- Regular review of ignored vulnerabilities\n- Updates when backports or fixed versions become available\n\n## Integration with Dependabot\n\nSnyk and Dependabot work together:\n\n1. **Dependabot** proposes dependency upgrades (automated PRs)\n2. **Snyk** scans the PRs for new/resolved vulnerabilities\n3. Both checks must pass before merge\n\n## GitHub Actions Integration\n\nSnyk checks run automatically via GitHub's built-in Snyk integration. No custom workflow is required. The integration is configured at the organization/repository level in GitHub settings.\n\n## Next Steps\n\n1. **Regular monitoring:** Review Snyk dashboard monthly for new vulnerabilities\n2. **Backport evaluation:** For critical vulnerabilities, evaluate if backports or fixed upstream versions are available\n\n## References\n\n- Snyk CLI documentation: https://docs.snyk.io/snyk-cli\n- Snyk Maven documentation: https://docs.snyk.io/scan-using-snyk/supported-languages-and-frameworks/java-and-kotlin\n- MockServer Java compatibility policy: `AGENTS.md`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2706:B08CF:176EE8:5E1E23:6AB92EF4"},"text_sha256":"2f5200fb6a75342df8e940771fc0e19b282cb8e66e232e4b44bddfa971051fb9"},{"path":"docs/plans/later/security-defaults.md","size":12447,"blob_sha":"6e01bf4384fd99131bb81c2e90408566c43fdbe3","priority":1,"status":200,"text":"# Security Defaults — Next Major Release\n\n**Status:** Planned — all eight items still open (verified 2026-06-19: every property and mitigation is wired in `ConfigurationProperties.java` / `Configuration.java`, and every default is still the insecure value below; none has been flipped). Insecure-by-default configuration values to flip in a single major release.\n**Created:** 2026-05-26 (supersedes `security-remediation.md`)\n**Last verified against code:** 2026-06-19\n**Scope:** Configuration default changes only. All underlying mitigations (timeouts, validators, body limits, secure RNG, XXE blocks) have already shipped and are wired behind these properties; only the defaults remain.\n\n## Goals\n\n1. Ship every insecure default flip in one release so users perform a single migration.\n2. Each flip is **fully reversible** by setting one property — no functionality is removed.\n3. DEF-1, DEF-2, DEF-3, and DEF-4 already emit a WARN today when set to their insecure values, so users of those properties have had a deprecation window. DEF-5, DEF-6, DEF-7, and DEF-8 do **not** currently warn — each implementation PR for those four items must add a startup WARN in a prior minor release before the default is flipped.\n4. One consolidated migration guide. One major version bump.\n\n## Items\n\n| ID | Property | Old default | New default | Breaking? |\n|----|----------|-------------|-------------|-----------|\n| DEF-1 | `forwardProxyTLSX509CertificatesTrustManagerType` | `ANY` | `JVM` | Yes |\n| DEF-2 | `velocityDisallowClassLoading` | `false` | `true` | Yes |\n| DEF-3 | JavaScript template class access (`javascriptDisallowedClasses` → `javascriptAllowedClasses`) | deny-list (empty) | allowlist (safe core types) | Yes |\n| DEF-4 | `tlsAllowInsecureProtocols` | `true` | `false` | Yes (drops TLSv1/1.1) |\n| DEF-5 | `forwardProxyBlockPrivateNetworks` | `false` | `true` | Yes |\n| DEF-6 | `localBoundIP` | `\"\"` (all interfaces, `0.0.0.0`) | `127.0.0.1` | Yes (large impact) |\n| DEF-7 | `attemptToProxyIfNoMatchingExpectation` | `true` | `false` | Yes |\n| DEF-8 | `maxInitialLineLength` / `maxHeaderSize` / `maxChunkSize` | `Integer.MAX_VALUE` | `8 KiB` / `16 KiB` / `16 KiB` | Hardening; breaks only pathological clients |\n\n---\n\n## DEF-1 — Forward-proxy trusts JVM trust store, not everything\n\n**Property:** `mockserver.forwardProxyTLSX509CertificatesTrustManagerType`\n**Defined:** `mockserver-core/.../ConfigurationProperties.java`\n**Today:** Defaults to `ANY`, which installs `InsecureTrustManagerFactory.INSTANCE` and accepts self-signed, expired, hostname-mismatched, and otherwise invalid certificates when MockServer acts as an HTTPS forward proxy.\n**Flip:** Default to `JVM` so the JDK trust store validates upstream certificates the same way any standard Java HTTPS client would.\n**Opt-out:** `mockserver.forwardProxyTLSX509CertificatesTrustManagerType=ANY` (a WARN is logged when this is in effect — already implemented). Users with a small set of trusted self-signed CAs should prefer `=CUSTOM` plus `mockserver.forwardProxyTLSCustomTrustX509Certificates` pointing at the CA bundle, rather than disabling validation entirely.\n**Why it's safe to flip now:** the WARN has been in place since the prior security remediation pass; no functionality is removed.\n\n---\n\n## DEF-2 — Velocity templates block class loading\n\n**Property:** `mockserver.velocityDisallowClassLoading`\n**Today:** Defaults to `false`. A user-supplied Velocity template can call `$Class.forName(\"java.lang.Runtime\").getRuntime().exec(...)`.\n**Flip:** Default to `true`, installing `SecureUberspector` so templates cannot reach arbitrary classes.\n**Opt-out:** `mockserver.velocityDisallowClassLoading=false` (WARN already logged).\n**Notes:** Velocity templates that legitimately need class loading are rare; the opt-out covers them.\n\n---\n\n## DEF-3 — JavaScript templates use an allowlist, not a deny-list\n\n**Today:** `javascriptDisallowedClasses` is a deny-list defaulting to empty, so all classes (`java.lang.Runtime`, `java.io.File`, etc.) are reachable via `Java.type(...)`. A WARN is logged when the deny-list is empty.\n**Flip:** Introduce `mockserver.javascriptAllowedClasses` (new property) and switch to allowlist semantics. Default allowlist covers common safe types only:\n\n```\njava.lang.String, java.lang.Integer, java.lang.Long, java.lang.Double, java.lang.Boolean,\njava.util.List, java.util.Map, java.util.Set, java.util.ArrayList, java.util.HashMap\n```\n\n**Opt-out:** Extend the allowlist via `mockserver.javascriptAllowedClasses=...`. The legacy `javascriptDisallowedClasses` property is removed (deprecation period was the WARN log).\n**Why this is more invasive than DEF-1/2:** the property name itself changes. Migration guide must call this out explicitly.\n\n---\n\n## DEF-4 — Drop TLSv1 and TLSv1.1 by default\n\n**Property:** `mockserver.tlsAllowInsecureProtocols`\n**Today:** Defaults to `true`. The `tlsProtocols` default is `\"TLSv1,TLSv1.1,TLSv1.2\"`, so deprecated TLSv1 and TLSv1.1 (vulnerable to BEAST, POODLE; deprecated per RFC 8996) are still honoured. A WARN is logged when `tlsProtocols` includes them.\n**Flip:** Default `tlsAllowInsecureProtocols` to `false`. TLSv1 and TLSv1.1 entries are stripped from `tlsProtocols`, leaving **TLSv1.2 only** out of the box. TLSv1.3 is *not* added by this flip — users who want TLSv1.3 must add it to `tlsProtocols` explicitly.\n**Opt-out:** `mockserver.tlsAllowInsecureProtocols=true`.\n**Affected users:** Anyone whose tests still target ancient TLS stacks (very rare in 2026). Opt-out is one property.\n**Consider also:** flipping the `tlsProtocols` default to `\"TLSv1.2,TLSv1.3\"` in the same release so TLSv1.3 is on by default. Out of scope of this plan as written, but worth deciding at implementation time.\n\n---\n\n## DEF-5 — Block SSRF to private networks by default\n\n**Property:** `mockserver.forwardProxyBlockPrivateNetworks`\n**Today:** Defaults to `false` (was originally introduced as opt-in to avoid breaking localhost / Docker / k8s setups). The validator (`InetAddressValidator`) is already wired into both forward action handlers.\n**Flip:** Default to `true`. Forward actions whose target resolves to RFC 1918, loopback, link-local, or AWS metadata (`169.254.169.254`, `fd00:ec2::254`) are rejected.\n**Opt-out:** `mockserver.forwardProxyBlockPrivateNetworks=false`.\n**Compatibility risk:** This is the highest-impact flip for tests that use MockServer to forward between containers. The migration guide must document opt-out clearly with example Docker Compose / k8s usage.\n\n---\n\n## DEF-6 — Bind to loopback by default\n\n**Property:** `mockserver.localBoundIP`\n**Today:** Defaults to `\"\"` which resolves to `0.0.0.0`, listening on every interface. A developer on a shared / corporate network exposes their MockServer instance to the LAN by default.\n**Flip:** Default to `127.0.0.1` (IPv4 loopback). Inside containers users must set `0.0.0.0` explicitly to reach MockServer from the host.\n**Opt-out:** `mockserver.localBoundIP=0.0.0.0` or any specific interface.\n**Compatibility risk:** **This is the most disruptive flip in this release.** Every Docker / Kubernetes / Helm deployment will need to set `MOCKSERVER_LOCAL_BOUND_IP=0.0.0.0`. Bundle this change with:\n- An updated Dockerfile `ENV MOCKSERVER_LOCAL_BOUND_IP=0.0.0.0` (so the container image keeps working out-of-the-box; the loopback default only takes effect for raw JAR / WAR users)\n- Updated `docker-compose` and Helm chart examples\n- A prominent section in the migration guide\n\nIf the disruption is judged too high, an alternative is to keep `0.0.0.0` and add a startup banner warning when not on loopback. **Recommendation: flip the default; bake `0.0.0.0` into the container ENV.**\n\n---\n\n## DEF-7 — Don't proxy unmatched requests by default\n\n**Property:** `mockserver.attemptToProxyIfNoMatchingExpectation`\n**Today:** Defaults to `true`. Any inbound request that doesn't match an expectation is forwarded to the request's `Host:` header, turning MockServer into an open proxy if exposed.\n**Flip:** Default to `false`. Unmatched requests return `404 Not Found` (existing fallback path).\n**Opt-out:** `mockserver.attemptToProxyIfNoMatchingExpectation=true`.\n**Compatibility risk:** Affects users running MockServer as a forward proxy that records or selectively mocks traffic. The opt-out preserves the exact previous behaviour. Document the opt-out alongside the proxy / recording examples in the consumer docs.\n\n---\n\n## DEF-8 — Bound HTTP parsing limits\n\n**Properties:** `mockserver.maxInitialLineLength`, `mockserver.maxHeaderSize`, `mockserver.maxChunkSize`\n**Today:** All default to `Integer.MAX_VALUE` (~2 GiB). A single malicious client can exhaust the heap by sending an unbounded header or request line — none of the already-shipped body limits cover the request line or headers.\n**Flip:** Defaults aligned with Netty's own defaults and standard reverse proxies:\n\n| Property | New default |\n|----------|-------------|\n| `maxInitialLineLength` | 8192 (8 KiB) |\n| `maxHeaderSize` | 16384 (16 KiB) |\n| `maxChunkSize` | 16384 (16 KiB) |\n\n**Opt-out:** Set the relevant property higher. The existing `maxRequestBodySize` (10 MiB) and `maxResponseBodySize` (50 MiB) defaults are unchanged.\n**Compatibility risk:** Negligible for real-world traffic. Tests that intentionally craft huge headers/URIs to exercise edge cases must opt out.\n\n---\n\n## Items considered and rejected\n\nFor the record so future contributors don't re-litigate:\n\n- **`tlsMutualAuthenticationRequired` → `true`**: rejected. Forcing every inbound connection to present a client certificate would break virtually every user; mTLS remains opt-in.\n- **`controlPlaneTLSMutualAuthenticationRequired` → `true`**: rejected for the same reason; the control-plane mTLS path is unchanged.\n- **`dynamicallyCreateCertificateAuthorityCertificate` → `true`**: rejected. Flipping breaks every client that has already trusted the bundled MockServer CA. The default static CA is documented as a test-only convenience.\n- **`preventCertificateDynamicUpdate` → `true`**: rejected. Dynamic SAN updates are part of the documented proxy flow; flipping would silently break in-flight tests.\n- **`initializationClass` allowlist**: not in this release. The property is empty by default, so the attack surface only opens if a user already configures arbitrary class loading. Track separately if a real exploit path emerges.\n- **CORS defaults**: already safe — `corsAllowOrigin`, `corsAllowMethods`, `corsAllowHeaders` all default to empty and `corsAllowCredentials` to `false`. Nothing to flip.\n\n---\n\n## Release & migration\n\n- **Version:** Single major version bump.\n- **Migration guide:** One document with one section per `DEF-*` ID, each containing: *what changed*, *how to detect if you're affected*, and *one-line opt-out*.\n- **Release notes:** Top-line summary \"secure-by-default\" framing; explicit BREAKING block listing all eight flips.\n- **Container image:** Set `ENV MOCKSERVER_LOCAL_BOUND_IP=0.0.0.0` in the Dockerfile so the container experience is unchanged. Document this carve-out clearly so users running the raw JAR/WAR know they're getting the loopback default.\n- **Helm chart:** Pass `MOCKSERVER_LOCAL_BOUND_IP=0.0.0.0` (already needed for in-cluster reachability).\n- **Pre-release validation:** Run the full Buildkite suite plus a manual smoke test against the official Docker image and the Helm chart to confirm `DEF-6` does not break the default container path.\n\n## Implementation order\n\nAll flips are independent property changes; order does not matter functionally. Suggested PR sequencing for review clarity:\n\n0. **Prerequisite (prior minor release):** add startup WARN logs for DEF-5, DEF-6, DEF-7, and DEF-8 when set to their insecure defaults. These four items have no existing deprecation log, so a release window with a WARN must precede the default flip.\n1. DEF-1, DEF-2, DEF-4 — single-character default changes; trivial review.\n2. DEF-5, DEF-7 — boolean flips on existing well-tested validators.\n3. DEF-8 — three numeric defaults; verify all integration tests still pass.\n4. DEF-6 — bind-address change; bundled with Dockerfile ENV and Helm chart updates.\n5. DEF-3 — property rename + allowlist semantics; needs the migration guide entry written before merging.\n\nEach PR must update `jekyll-www.mock-server.com/mock_server/configuration_properties.html` and the relevant `docs/` entry under `code/` or `operations/`.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F2AE:11E74B:17C6AC:5E7429:6AB92EF4"},"text_sha256":"5536ed41c02163c86ace8d70d92aa157c3b6773ceda92102ed05c08ff1925e39"},{"path":"jekyll-www.mock-server.com/.well-known/security.txt","size":187,"blob_sha":"79c0c3503d6bcedc8a882a564aceee340a6e3cb4","priority":1,"status":200,"text":"Contact: mailto:jamesdbloom+mockserver@gmail.com\nContact: https://twitter.com/jamesdbloom\nExpires: 2027-06-04T00:00:00.000Z\nCanonical: https://www.mock-server.com/.well-known/security.txt","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E322:3AC15:1826B8:5ED421:6AB92EF5"},"text_sha256":"319de62a9d0319e26db18a7e45e96c89641522f7ccf77e1d75305bc355375f80"},{"path":"jekyll-www.mock-server.com/mock_server/dashboard_privacy.html","size":10312,"blob_sha":"32c51928907814e4be5926bcabda7a39d3a698b4","priority":1,"status":200,"text":"---\ntitle: Dashboard Privacy\nshortTitle: Dashboard Privacy\ndescription: What the MockServer dashboard usage analytics collects, what it never collects, and how to disable it.\nlayout: page\npageOrder: 99\nsection: 'Operations'\nsubsection: true\nsitemap:\n  priority: 0.5\n  changefreq: 'monthly'\n  lastmod: 2026-06-24T00:00:00+00:00\nkeywords: dashboard analytics, privacy, PostHog, cookieless, Do Not Track, opt-out, anonymous usage data\n---\n\n<p><strong>On this page:<\/strong><\/p>\n<ul>\n  <li><a href=\"#why-we-collect\">Why we collect this<\/a><\/li>\n  <li><a href=\"#when-collected\">When it's collected<\/a><\/li>\n  <li><a href=\"#what-is-collected\">What is collected<\/a><\/li>\n  <li><a href=\"#what-is-not-collected\">What is never collected<\/a><\/li>\n  <li><a href=\"#cookieless\">Cookieless and cross-site identifier free<\/a><\/li>\n  <li><a href=\"#how-to-disable\">How to disable<\/a><\/li>\n<\/ul>\n\n<h2 id=\"why-we-collect\">Why we collect this<\/h2>\n\n<p>MockServer is free, open source, and maintained for the whole community. We collect a little anonymous\nusage data for one reason: <strong>to understand how the dashboard is actually used so we can make it\nbetter for everyone<\/strong>.<\/p>\n\n<p>Knowing which features people genuinely rely on — and which ones they never reach, or struggle to find —\nlets us spend our limited maintainer time where it does the most good. Concretely, this data helps us:<\/p>\n\n<ul>\n  <li><strong>Improve the most useful features<\/strong> — invest effort in the parts of the dashboard people\n  use most, instead of guessing.<\/li>\n  <li><strong>Maximise usability<\/strong> — spot where users hit errors or abandon a workflow, so we can\n  smooth out the rough edges.<\/li>\n  <li><strong>Avoid wasted work<\/strong> — retire or rethink features that aren't earning their keep, and\n  prioritise the ones that deliver real value.<\/li>\n  <li><strong>Benefit every MockServer user<\/strong> — every improvement we make from this feedback ships\n  back to the community in the next open source release.<\/li>\n<\/ul>\n\n<p>This is deliberately a <em>good-faith, minimal<\/em> measurement: it is anonymous, cookieless, carries\nnone of your mock or request data (see below), and exists purely to help us build a more useful tool for\nthe people who depend on it. If you'd still rather not take part, disabling it takes one click and changes\nnothing about how MockServer works for you — see <a href=\"#how-to-disable\">How to disable<\/a>.<\/p>\n\n<h2 id=\"when-collected\">When it's collected<\/h2>\n\n<p>Analytics is <strong>off by default and only ever runs in the official, pre-configured\ndistributions<\/strong> — never in a plain build and never in local development. It is active only when\nMockServer is run from:<\/p>\n\n<ul>\n  <li>the official <strong>Docker images<\/strong> (<span class=\"inline_code\">docker-standard<\/span>,\n  <span class=\"inline_code\">docker-graaljs<\/span>, <span class=\"inline_code\">docker-clustered<\/span>),<\/li>\n  <li>the official <strong>Helm chart<\/strong> deployment, or<\/li>\n  <li>the official <strong>binary launcher<\/strong> bundles.<\/li>\n<\/ul>\n\n<p>These artefacts are the only ones that ship with an analytics endpoint and key baked in. Everywhere\nelse it stays completely inactive, with <strong>no events sent and no consent note shown<\/strong>:<\/p>\n\n<ul>\n  <li>the plain downloadable <strong>JAR<\/strong>,<\/li>\n  <li>any <strong>embedded / library / dependency<\/strong> use of MockServer,<\/li>\n  <li><strong>local development<\/strong>, tests, and CI.<\/li>\n<\/ul>\n\n<p>Even in the distributions where it is active, it is measured purely from the <strong>dashboard UI in\nyour browser<\/strong> — it has nothing to do with the mock or proxy traffic flowing through MockServer —\nand it still respects every <a href=\"#how-to-disable\">opt-out signal<\/a> (Do&nbsp;Not&nbsp;Track, Global\nPrivacy Control, the dashboard <strong>Opt out<\/strong> button, or the operator master switch). A small,\none-line note appears in the dashboard the first time analytics becomes active, so you are always told\nit is on and can opt out at any time.<\/p>\n\n<h2 id=\"what-is-collected\">What is collected<\/h2>\n\n<p>When an operator enables analytics (by supplying a self-hosted PostHog endpoint and key), the dashboard\nmay send a small set of coarse, anonymous usage events. No free-text values from your mocks, requests,\nor environment are ever included.<\/p>\n\n<p>The four event types are:<\/p>\n\n<table class=\"table table-striped\">\n  <thead>\n    <tr><th>Event<\/th><th>When sent<\/th><th>Properties carried<\/th><\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><span class=\"inline_code\">app_open<\/span><\/td>\n      <td>Once per page load, after all activation gates pass<\/td>\n      <td>App version, surface (<span class=\"inline_code\">browser<\/span> or <span class=\"inline_code\">ide-embedded<\/span>), colour theme (<span class=\"inline_code\">light<\/span> / <span class=\"inline_code\">dark<\/span> / <span class=\"inline_code\">system<\/span>), artefact distribution label (<span class=\"inline_code\">docker-standard<\/span> / <span class=\"inline_code\">docker-graaljs<\/span> / <span class=\"inline_code\">docker-clustered<\/span> / <span class=\"inline_code\">helm<\/span> / <span class=\"inline_code\">binary<\/span> / <span class=\"inline_code\">unknown<\/span>) — set automatically by the official artefact, never by user input<\/td>\n    <\/tr>\n    <tr>\n      <td><span class=\"inline_code\">view_change<\/span><\/td>\n      <td>Each time you switch dashboard tab<\/td>\n      <td>The tab name (e.g. <span class=\"inline_code\">traffic<\/span>, <span class=\"inline_code\">composer<\/span>, <span class=\"inline_code\">chaos<\/span>)<\/td>\n    <\/tr>\n    <tr>\n      <td><span class=\"inline_code\">feature_used<\/span><\/td>\n      <td>When you trigger a specific feature action<\/td>\n      <td>Feature name from a closed enumeration (e.g. <span class=\"inline_code\">expectation_created<\/span>, <span class=\"inline_code\">chaos_started<\/span>, <span class=\"inline_code\">load_run_started<\/span>) and optionally a mode (<span class=\"inline_code\">quick<\/span> or <span class=\"inline_code\">advanced<\/span>)<\/td>\n    <\/tr>\n    <tr>\n      <td><span class=\"inline_code\">error_shown<\/span><\/td>\n      <td>When the dashboard displays an error to you<\/td>\n      <td>A coarse category from a closed enumeration (<span class=\"inline_code\">load_failed<\/span>, <span class=\"inline_code\">save_failed<\/span>, <span class=\"inline_code\">connection_failed<\/span>, <span class=\"inline_code\">validation_failed<\/span>, <span class=\"inline_code\">unknown<\/span>) — never an error message or stack trace<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"what-is-not-collected\">What is never collected<\/h2>\n\n<p>The analytics module is <strong>structurally<\/strong> incapable of sending the following data. Every\npublic function accepts only values from a closed, whitelisted set — there is no code path that\naccepts a free-text string and forwards it to the analytics backend.<\/p>\n\n<ul>\n  <li>Request URLs, paths, query strings, or hostnames<\/li>\n  <li>Request or response headers (including <span class=\"inline_code\">Authorization<\/span>, <span class=\"inline_code\">Cookie<\/span>, or any other credential)<\/li>\n  <li>Request or response bodies<\/li>\n  <li>Expectation JSON, mock configurations, or scenario state<\/li>\n  <li>Server ports, IP addresses, or file paths<\/li>\n  <li>Error messages or stack traces<\/li>\n  <li>Any data from the mocked or proxied traffic passing through MockServer<\/li>\n<\/ul>\n\n<h2 id=\"cookieless\">Cookieless and cross-site identifier free<\/h2>\n\n<p>Analytics is initialised with PostHog's <span class=\"inline_code\">persistence: 'memory'<\/span> option. This means:<\/p>\n\n<ul>\n  <li>No cookies are set.<\/li>\n  <li>No persistent identifier is written to <span class=\"inline_code\">localStorage<\/span> or <span class=\"inline_code\">sessionStorage<\/span> for tracking purposes.<\/li>\n  <li>Each page load is independent — there is no mechanism to correlate sessions or track an individual across visits.<\/li>\n  <li>PostHog autocapture and session recording are both disabled.<\/li>\n<\/ul>\n\n<h2 id=\"how-to-disable\">How to disable<\/h2>\n\n<p>There are three independent ways to disable analytics:<\/p>\n\n<h3>1. Operator: disable for the whole deployment<\/h3>\n\n<p>Set the <span class=\"inline_code\">dashboardAnalyticsEnabled<\/span> configuration property to <span class=\"inline_code\">false<\/span>.\nThis is the authoritative master switch — when it is off, the analytics module never loads and the\nconsent note is never shown, regardless of any other setting.<\/p>\n\n<pre class=\"code\" style=\"padding: 2px;\"><code class=\"code\">-Dmockserver.dashboardAnalyticsEnabled=\"false\"<\/code><\/pre>\n<pre class=\"code\" style=\"padding: 2px;\"><code class=\"code\">MOCKSERVER_DASHBOARD_ANALYTICS_ENABLED=false<\/code><\/pre>\n\n<p>Analytics is active only in the official Docker images (<span class=\"inline_code\">docker-standard<\/span>,\n<span class=\"inline_code\">docker-graaljs<\/span>, <span class=\"inline_code\">docker-clustered<\/span>), Helm chart deployments, and the official\nbinary launcher bundles — these artefacts have <span class=\"inline_code\">dashboardAnalyticsEndpoint<\/span> and\n<span class=\"inline_code\">dashboardAnalyticsKey<\/span> pre-configured. The plain downloadable JAR and any embedded /\nlibrary / dependency use have both properties empty, so analytics is always inactive there regardless of\nany other setting.<\/p>\n\n<h3>2. Individual: opt out via the dashboard note<\/h3>\n\n<p>When analytics is active, a small one-line disclosure note appears in the dashboard on first use. Clicking\n<strong>Opt out<\/strong> records your choice in the browser's <span class=\"inline_code\">localStorage<\/span>\nunder the key <span class=\"inline_code\">mockserver.analytics.optOut<\/span>, stops any in-flight PostHog capture\nimmediately, and prevents analytics from running on any subsequent page load in that browser.<\/p>\n\n<h3>3. Individual: browser Do Not Track or Global Privacy Control<\/h3>\n\n<p>If your browser has <strong>Do Not Track<\/strong> (<span class=\"inline_code\">navigator.doNotTrack === '1'<\/span>)\nor <strong>Global Privacy Control<\/strong> (<span class=\"inline_code\">navigator.globalPrivacyControl === true<\/span>)\nenabled, the analytics module detects this automatically during its activation check and becomes a\npermanent no-op for that page load — no events are sent and no note is shown.<\/p>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8D5A:3D40A:175187:5E000F:6AB92EF4"},"text_sha256":"304babb9b6f916521c34b257f31bdc1cb6a9ac3ffc7b0fe4ccf91fc0fd3c17ec"},{"path":"SECURITY.md","size":12637,"blob_sha":"13c96565e5c7b7cbf4557ed5176771a39db30c3f","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nMockServer requires **Java 17** as the minimum supported runtime (raised from Java 11 in the 6.x line as part of the Jakarta EE 10 / Spring 7 platform modernisation). Currently supported versions:\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 7.2.x   | :white_check_mark: |\n| 6.0.x   | :white_check_mark: |\n| < 6.0   | :x:                |\n\nThe latest minor in the current major line receives fixes; older minors are best-effort. The `5.15.x` line is the last Java 11-compatible release and no longer receives security updates.\n\n## Security Posture\n\n### MockServer is a Development and Testing Tool\n\n**Important:** MockServer is designed for **development, testing, and QA environments only**. It should **never** be deployed in production or exposed to untrusted networks.\n\n### Java 17 Platform and Security Updates\n\nMockServer targets **Java 17** as the minimum supported runtime. The 6.x line completed the Jakarta EE 10 / Servlet 6 modernisation, so the dependency stack now tracks current, actively-patched major versions:\n\n- **Minimum Java version:** Java 17\n- **Spring Framework:** 7.x\n- **Spring Boot:** 4.x (test/example dependency only)\n- **Jetty:** 12.x · **Tomcat embed:** 11.x · **Jersey:** 4.x (Jetty/Tomcat are test/example dependencies, not server runtime)\n\nBecause these are current major lines, security fixes that previously required dropping Java 11 are now available and applied through normal dependency upgrades. The earlier Java-11 ceiling — which had pinned Spring to 5.3.x and Jetty to 9.4.x and blocked roughly 20 security fixes — no longer applies; those ignores have been removed from the [`.snyk`](.snyk) policy.\n\n### Dependabot Alerts\n\nDependency alerts are now resolved through normal upgrades rather than suppressed for compatibility. The only remaining version ceiling is `com.puppycrawl.tools:checkstyle < 13.0.0` (checkstyle 13.x requires a Java 21 runtime); it is build-tooling only, not shipped in any artifact. See [docs/operations/security.md](docs/operations/security.md) for the full scanning and triage workflow.\n\n### Risk Assessment\n\nMost reported vulnerabilities require **attacker-controlled input** to exploit:\n\n- **Unsafe deserialization** - Requires attacker to control serialized data sent to MockServer\n- **Path traversal** - Requires attacker to control file paths in requests\n- **DataBinder issues** - Requires specific attack patterns against Spring MVC/WebFlux\n\nIn a **development/testing environment** where:\n- MockServer is not exposed to untrusted networks\n- Only developers/testers have access\n- No sensitive production data is processed\n\n...these vulnerabilities pose **minimal practical risk**.\n\n### Dismissed Alerts\n\nThe following types of alerts are dismissed as **not applicable** to MockServer's use case:\n\n1. **Spring deserialization vulnerabilities** - MockServer does not deserialize untrusted user data through Spring's mechanisms\n2. **Spring MVC path traversal** - MockServer uses its own request routing, not Spring MVC's file serving\n3. **DataBinder case sensitivity** - Not exploitable in MockServer's mocking/proxying use case\n\n## Intentional Security Behaviors\n\nMockServer intentionally includes capabilities that would be **dangerous in a production service** but are **required features for a testing tool**. These are **not vulnerabilities** — they are essential for MockServer's purpose.\n\n### Why These Features Exist\n\nAs a testing tool, MockServer must allow developers to:\n- Mock internal services and APIs\n- Test security controls in their own applications\n- Simulate various network conditions and edge cases\n- Create realistic test scenarios including \"dangerous\" inputs\n\n**Important:** All expectations and templates are created by **trusted developers/testers**, not by external attackers. MockServer assumes:\n- ✅ All users are trusted (developers, testers, CI/CD systems)\n- ✅ All expectations are trusted (you control what you mock)\n- ✅ The network is trusted (isolated dev/test environment)\n- ✅ No production data or systems are involved\n\n### Intentional Behaviors (Features, Not Bugs)\n\n#### 1. Server-Side Request Forgery (SSRF) - **INTENTIONAL**\n\n**What it does:** MockServer's forward action can send requests to any host/port, including:\n- Internal IPs: `127.0.0.1`, `localhost`, `10.0.0.0/8`, `192.168.0.0/16`\n- Cloud metadata endpoints: `169.254.169.254`\n- Private networks and internal services\n\n**Why it's needed:**\n```java\n// Valid use case: Mock localhost microservice\nmockServerClient\n    .when(request().withPath(\"/orders\"))\n    .forward(forward().withHost(\"localhost\").withPort(8080));\n\n// Valid use case: Test AWS SDK behavior with metadata service\nmockServerClient\n    .when(request().withPath(\"/api/config\"))\n    .forward(forward().withHost(\"169.254.169.254\").withPath(\"/latest/meta-data/\"));\n```\n\n**Security control:** MockServer should never be exposed to untrusted networks.\n\n---\n\n#### 2. Regular Expression Denial of Service (ReDoS) - **INTENTIONAL**\n\n**What it does:** Regex matchers accept user-defined patterns without timeout or complexity limits.\n\n**Why it's needed:**\n```java\n// Valid use case: Test how your app handles expensive regex\nmockServerClient\n    .when(request().withPath(\"(a+)+\"))  // Pathological regex pattern in path\n    .respond(response().withStatusCode(200));\n\n// Testing scenario: Validate your system's regex timeout logic\n```\n\n**Security control:** Users control all matchers (trusted input). Optional timeout can be configured if needed.\n\n---\n\n#### 3. Trust-All TLS Certificates (Default) - **INTENTIONAL**\n\n**What it does:** Forward proxy accepts all TLS certificates by default:\n- Self-signed certificates\n- Expired certificates\n- Wrong hostnames\n- Invalid certificate chains\n\n**Default setting:** `forwardProxyTLSX509CertificatesTrustManagerType=ANY`\n\n**Why it's needed:**\n```java\n// Valid use case: Forward to staging environment with self-signed cert\nmockServerClient\n    .when(request().withPath(\"/api\"))\n    .forward(forward()\n        .withHost(\"staging.internal\")\n        .withScheme(HTTPS));\n```\n\n**Security control:** Users can configure `JVM` or `CUSTOM` trust modes if validation is needed for specific test scenarios.\n\n---\n\n#### 4. Template Code Execution (Velocity/JavaScript) - **INTENTIONAL**\n\n**What it does:** \n- Velocity templates can load Java classes (when `velocityDisallowClassLoading=false`, default)\n- JavaScript templates can access Java classes via `Java.type()`\n\n**Why it's needed:**\n```velocity\n## Valid use case: Generate dynamic responses using Java classes\n## Note: Class loading requires velocityDisallowClassLoading=false (default)\n#set($runtime = $request.class.classLoader.loadClass(\"java.lang.Runtime\"))\n#set($uuid = $request.class.classLoader.loadClass(\"java.util.UUID\"))\nResponse ID: $uuid.randomUUID().toString()\n```\n\n```javascript\n// Valid use case: Complex response generation logic\nvar UUID = Java.type(\"java.util.UUID\");\nreturn { requestId: UUID.randomUUID().toString() };\n```\n\n**Security control:** Templates are written by developers (trusted code), not by external users.\n\n---\n\n#### 5. JsonPath / XPath Denial of Service - **INTENTIONAL**\n\n**What it does:** JsonPath and XPath expressions can use recursive descent (`..`) and complex queries without timeout.\n\n**Why it's needed:**\n```java\n// Valid use case: Test expensive JsonPath evaluation\nmockServerClient\n    .when(request().withBody(jsonPath(\"$..book[?(@.price < 10)]\")))\n    .respond(response().withBody(\"found\"));\n\n// Testing scenario: Validate your system handles complex JSON queries\n```\n\n**Security control:** Users control all matchers. Optional timeout can be configured if needed.\n\n---\n\n#### 6. XML External Entity (XXE) Processing - **INTENTIONAL**\n\n**What it does:** XML matchers do not disable external entity processing by default.\n\n**Why it's needed:**\n```xml\n<!-- Valid use case: Test your app's XXE defenses -->\n<!DOCTYPE foo [<!ENTITY xxe SYSTEM \"file:///etc/passwd\">]>\n<request>&xxe;<\/request>\n```\n\n**Security control:** All XML is user-controlled test data, not attacker input.\n\n---\n\n#### 7. Legacy TLS Protocol Support (TLSv1.0/1.1) - **INTENTIONAL**\n\n**What it does:** MockServer supports TLSv1.0 and TLSv1.1 (deprecated by RFC 8996).\n\n**Default setting:** `tlsProtocols=TLSv1,TLSv1.1,TLSv1.2`\n\n**Why it's needed:**\n- Testing applications that must support legacy clients\n- Testing embedded devices with old TLS stacks\n- Validating TLS version negotiation logic\n- Testing against systems that haven't upgraded yet\n\n**Security control:** Modern TLS (1.2/1.3) is still supported. Users can restrict to modern versions if desired.\n\n---\n\n#### 8. Unbounded Request/Response Bodies - **INTENTIONAL**\n\n**What it does:** HTTP object aggregators accept up to `Integer.MAX_VALUE` (2GB) body size.\n\n**Why it's needed:**\n```java\n// Valid use case: Test large file upload handling\nmockServerClient\n    .when(request().withPath(\"/upload\"))\n    .respond(response().withBody(new byte[1024 * 1024 * 100]));  // 100MB response\n```\n\n**Security control:** Configure JVM heap size appropriately for your test scenarios.\n\n---\n\n### Summary: Features vs Vulnerabilities\n\n| Behavior | In Production Service | In Testing Tool |\n|----------|----------------------|-----------------|\n| Forward to localhost | 🔴 SSRF vulnerability | ✅ Required feature |\n| Accept all TLS certs | 🔴 MITM vulnerability | ✅ Required feature |\n| Execute template code | 🔴 RCE vulnerability | ✅ Required feature |\n| Process XXE | 🔴 Information disclosure | ✅ Required feature |\n| No regex timeout | 🔴 DoS vulnerability | ✅ Required feature |\n| Legacy TLS versions | 🔴 Weak encryption | ✅ Required feature |\n\n### What IS a Real Vulnerability?\n\nMockServer **will fix** actual security issues such as:\n- ✅ **Correctness bugs** (e.g., logic errors in matchers)\n- ✅ **Memory leaks** (e.g., ByteBuf leaks)\n- ✅ **Unintended information disclosure** (e.g., logging secrets)\n- ✅ **Weak cryptography in certs** (e.g., predictable serial numbers) — **Fixed in 6.0.x**\n\nMockServer **will not restrict** intentional features that enable testing.\n\n## Best Practices\n\nTo use MockServer securely:\n\n### ✅ DO:\n- Run MockServer only in **development, testing, or QA environments**\n- Restrict network access to **trusted users only** (developers, testers, CI/CD)\n- Use MockServer behind a **firewall or VPN**\n- Stop MockServer instances when not in use\n- Keep MockServer updated to the latest version for bug fixes\n\n### ❌ DO NOT:\n- Deploy MockServer in **production environments**\n- Expose MockServer directly to the **public internet**\n- Use MockServer to handle **sensitive production data**\n- Rely on MockServer for **security-critical operations**\n- Keep MockServer running unnecessarily\n\n## Reporting a Vulnerability\n\nIf you discover a security vulnerability in MockServer itself (not dependency alerts), please report it via:\n\n- **GitHub Security Advisories:** https://github.com/mock-server/mockserver-monorepo/security/advisories/new\n- **Email:** Contact the maintainers through GitHub\n\nPlease **do not** open public issues for security vulnerabilities.\n\n### What to include:\n\n1. Description of the vulnerability\n2. Steps to reproduce\n3. Potential impact\n4. Suggested fix (if available)\n\nWe will respond within **7 days** and work with you to understand and address the issue.\n\n## Upgrade Path\n\nMockServer 6.x requires **Java 17 or later**. If you are still on Java 11:\n\n1. **Upgrade your environment to Java 17+** to run MockServer 6.x (and pick up the patched Spring 7 / Jetty 12 dependency stack).\n2. If you cannot move off Java 11 yet, **pin to MockServer 5.15.x** (the last Java 11-compatible line) — note it no longer receives security updates.\n\nSee the [Java 17 / Jakarta EE 10 upgrade guide](docs/operations/migration-java17-jakarta.md) for the consumer-facing breaking changes (servlet namespace, container requirements, removed shaded classifier).\n\n## Further Reading\n\nFor a consolidated overview of all security scanning and tooling (CodeQL, Dependabot, Snyk, AI security review, and SNAPSHOT security policy), see [docs/operations/security.md](docs/operations/security.md).\n\nFor details on how AI-assisted development is governed, including adversarial code review by independent AI models, see [docs/operations/ai-assisted-development.md](docs/operations/ai-assisted-development.md).\n\n## Questions?\n\nFor security-related questions, see:\n- [GitHub Discussions](https://github.com/mock-server/mockserver-monorepo/discussions)\n- [GitHub Issues](https://github.com/mock-server/mockserver-monorepo/issues)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3EE8:3B7E2:17338D:5DE35E:6AB92EF5"},"text_sha256":"5721e70f377721e80222d91142ca0981dd063d0b28a9e0eef343e5bb80c9a2c4"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":1,"D1_evidence":"sha=223a176b9b1850667f002cf85a18aaeacd34ba4e; file=SECURITY.md; text=The following types of alerts are dismissed as not applicable to MockServer's use case: 1. Spring deserialization vulnerabilities - MockServer does not deserialize untrusted user data through Spring's mechanisms 2. Spring MVC path traversal - MockServer uses its own request routing, not Spring MVC's file serving","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=223a176b9b1850667f002cf85a18aaeacd34ba4e; file=SECURITY.md; text=The following types of alerts are dismissed as not applicable to MockServer's use case: 1. Spring deserialization vulnerabilities - MockServer does not deserialize untrusted user data through Spring's mechanisms 2. Spring MVC path traversal - MockServer uses its own request routing, not Spring MVC's file serving"}}}}
{"repository":"Atmosphere/atmosphere","input_row":{"repository":"Atmosphere/atmosphere","url":"https://github.com/Atmosphere/atmosphere","name":"atmosphere","owner":"Atmosphere","description":"Portable AI agent runtime for the JVM. One @Agent class runs on Spring AI, LangChain4j, Anthropic, or 9 more behind one SPI. Token streaming, tool calls, human approvals, and governance over WebSocket, SSE, gRPC, or WebTransport/HTTP3. Speaks MCP, A2A, and AG-UI.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":3814,"issues":2154,"created_at":"2010-06-30T14:26:23Z","updated_at":"2026-09-25T14:01:55Z","first_commit_at":"2010-04-27T15:19:19Z","last_commit_at":"2026-09-24T23:54:27Z","activity_months":196.91999999999999,"ai_ml_match_topics":"llm; ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:00.377Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Atmosphere/atmosphere","visibility":"public","created_at":"2010-06-30T14:26:23Z","updated_at":"2026-09-25T14:01:55Z","private":false,"fork":false,"archived":false,"stargazers_count":3814,"open_issues_count":8,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1303","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EA:1B4E7A:17D6B03:1C02124:6AB92EF8"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1302","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090F:380E1C:17FC0AF:1C269F1:6AB92EF8"},"commit":{"sha":"d556f4d76b2243ed51a69d08a278273d80c07ec5","url":"https://github.com/Atmosphere/atmosphere/commit/d556f4d76b2243ed51a69d08a278273d80c07ec5","date":"2018-05-15T18:25:02Z","author_date":"2018-05-14T20:17:47Z","committer_date":"2018-05-15T18:25:02Z","tree_sha":"4ffc5fa80d3056e46199bb32243e0c958c437874","message_first_line":"Fix the integer overflow in AtmosphereResource#suspend"},"tree_request_status":200,"tree_rate":{"github_remaining":"1301","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0882:156040:17FB122:1C25EEE:6AB92EF9"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":8107,"blob_sha":"6f101f09b06110070f70ba9c79c83fb7ed5f4a16","priority":0}],"documents":[{"path":"README.md","size":8107,"blob_sha":"6f101f09b06110070f70ba9c79c83fb7ed5f4a16","priority":0,"status":200,"text":"<p align=\"center\">\n<img src=\"http://atmosphere.github.io/atmosphere/images/atmosphere.png\" alt=\"LOGO\"/>\n<\/p>\n### Welcome to Atmosphere: The Asynchronous WebSocket/Comet Framework\nThe Atmosphere Framework contains client and server side components for building Asynchronous Web Applications. The majority of [popular frameworks](https://github.com/Atmosphere/atmosphere/wiki/Atmosphere-PlugIns-and-Extensions) are either supporting Atmosphere or supported natively by the framework. The Atmosphere Framework supports all major [Browsers and Servers](https://github.com/Atmosphere/atmosphere/wiki/Supported-WebServers-and-Browsers).\n\n<p align=\"center\">Follow us on <a href=\"http://www.twitter.com/atmo_framework\">Twitter<\/a><\/p>\nAtmosphere transparently supports WebSockets, Server Sent Events (SSE), Long-Polling, HTTP Streaming (Forever frame) and JSONP.\n\nThe Atmosphere Framework Stack consists of: \n\n<p align=\"center\">\n  <img src=\"http://atmosphere.github.io/atmosphere/images/stack.png\"Atmosphere Framework Stack\" alt=\"Atmosphere Stack\"/>\n<\/p>\nThe Atmosphere Framework Stack works on all Servlet based servers including Tomcat, JBoss Jetty, Resin, GlassFish, Undertow, WebSphere, WebLogic etc. Not running a Servlet Container? [Netty](http://atmosphere.github.io/nettosphere/), [Play! Framework](http://atmosphere.github.io/atmosphere-play/) or [Vert.x](https://github.com/Atmosphere/atmosphere-vertx). We support a variety of extensions like [STOMP](https://github.com/Atmosphere/atmosphere-stomp/), [Redis](https://github.com/Atmosphere/atmosphere-extensions/tree/master/redis), [Hazelcast](https://github.com/Atmosphere/atmosphere-extensions/tree/master/hazelcast), [JMS](https://github.com/Atmosphere/atmosphere-extensions/tree/master/jms), [JGroups](https://github.com/Atmosphere/atmosphere-extensions/tree/master/jgroups) and [many more](https://github.com/Atmosphere/atmosphere-extensions/). Support for [Socket.IO](https://github.com/Atmosphere/atmosphere-extensions/tree/master/socketio), [SockJS](https://github.com/Atmosphere/atmosphere-extensions/tree/master/sockjs) and [Cometd](https://github.com/Atmosphere/atmosphere-extensions/tree/master/cometd) are also available.\n\nUsing another framework? Look at the list of supported [extensions](https://github.com/Atmosphere/atmosphere/wiki/Atmosphere-PlugIns-and-Extensions). Easiest way to learn Atmosphere is by trying a [sample](https://github.com/Atmosphere/atmosphere-samples/). \n\nAtmosphere's Java/Scala/Android Client is called [wAsync](https://github.com/Atmosphere/wasync).\n\n### Atmosphere.Next \nActive Development of Atmosphere 3 started. [Join the community to help](https://github.com/Atmosphere/atmosphere/issues/1911)\n\n### Commercial support\nCommercial Support is available via [Async-IO.org](http://async-io.org) \n\n### Tutorial\n\nGet started using this step by step [tutorial](http://async-io.org/tutorial.html).\n\n### Official Documentation\nOur Wiki contains [several tutorials](https://github.com/Atmosphere/atmosphere/wiki) for getting started as well as [FAQ](https://github.com/Atmosphere/atmosphere/wiki/Frequently-Asked-Questions). You can also browse the framework's [Javadoc](http://atmosphere.github.com/atmosphere/apidocs/) for Server Components, and [atmosphere.js](https://github.com/Atmosphere/atmosphere/wiki/jQuery.atmosphere.js-atmosphere.js-API) for Client Components.\n\n### Quick Start\n\nThe Atmosphere Framework ships with many examples describing how to implement WebSockets, Server-Sent Events, Long-Polling, HTTP Streaming and JSONP client applications. Take a look at [this page](https://github.com/Atmosphere/atmosphere-samples/) to pick the best sample to start with.\n\n### To use Atmosphere, add the following dependency:\n```xml\n     <dependency>\n         <groupId>org.atmosphere<\/groupId>\n         <artifactId>atmosphere-{atmosphere-module}<\/artifactId>\n         <version>2.4.2<\/version>\n      <\/dependency>\n```\n      \nWhere atmosphere-module can be: sockjs, kafka, jersey, runtime (main module), spring, guice, redis, hazelcast, jms, rabbitmq, jgroups or gwt. Our official releases are available from Maven Central [download](http://search.maven.org/#search|ga|1|atmosphere).\n\n#### Jump directly inside the code: WebSockets, Server-Sent Events (SSE), Long-Polling, JSONP and HTTP Streaming!\n\nTake a look at the PubSub [Client](https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/jersey-pubsub/src/main/webapp/index.html#L34)-[Server](https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/jersey-pubsub/src/main/java/org/atmosphere/samples/pubsub/JerseyPubSub.java#L36) or the infamous Chat [Client](https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/chat/src/main/webapp/javascript/application.js#L1)-[Server](https://github.com/Atmosphere/atmosphere-samples/blob/master/samples/chat/src/main/java/org/atmosphere/samples/chat/Chat.java#L32) to realize how simple Atmosphere is!\n\n[Top](#Top)\n\nIf you are interested, subscribe to our [mailing list](http://groups.google.com/group/atmosphere-framework) for more info!.\n\n[Top](#Top)\n\n#### Versions\n\n[Change Log](./CHANGELOG.md)\n\n2.4.x: [2.4.2](https://goo.gl/TulSUl) [2.4.1](https://github.com/Atmosphere/atmosphere/issues?q=label%3A2.4.1+is%3Aclosed) [2.4.0](https://goo.gl/GpB1B1)\n\n2.3.x: release: [2.3.6](https://github.com/Atmosphere/atmosphere/issues?q=is%3Aissue+is%3Aclosed+label%3A2.3.6) [2.3.5](https://goo.gl/BVr1PS) [2.3.4](https://goo.gl/5eiQXb) [2.3.3](https://goo.gl/6Yfr0p ) [2.3.2](https://goo.gl/PQ60X0 ) [2.3.1](https://goo.gl/6o9gjc) [2.3.0](https://github.com/Atmosphere/atmosphere/issues?q=label%3A2.3.0+is%3Aclosed)\n\n2.2.x release: [2.2.9](https://goo.gl/DkOD2l) [2.2.8](https://goo.gl/WoPC3N) [2.2.7](https://goo.gl/biW2Co) [2.2.6](http://goo.gl/kqZSb0) [2.2.5](http://goo.gl/2lNzg2) [2.2.4](http://goo.gl/bOLCW2) [2.2.3](http://goo.gl/1DXKP3) [2.2.2](http://goo.gl/i3W2v5) [2.2.1](http://goo.gl/glEj7L) [2.2.0](http://goo.gl/3hrlZH)\n\n#### End Of Life Versions (go to [http://async-io.org](http://async-io.org) for commercial support)\n\n2.1.x release: [2.1.12](https://goo.gl/r829Vr) [2.1.11](https://goo.gl/E9xH2y) [2.1.10](http://goo.gl/2zuMql) [2.1.9](http://goo.gl/3HyZCK) [2.1.8](http://goo.gl/YxX1m9) [2.1.7](http://goo.gl/p41cCc) [2.1.6](http://goo.gl/UYvBxA) [2.1.5](http://goo.gl/jx5pdc ) [2.1.4](http://goo.gl/5HiZM7) [2.1.2](http://goo.gl/0BSpfj) [2.1.1](http://goo.gl/F9fr45) [2.1.0](https://github.com/Atmosphere/atmosphere/issues?labels=2.1&page=1&state=closed)\n\n2.0.x release: [2.0.10](https://github.com/Atmosphere/atmosphere/issues?q=is%3Aissue+label%3A2.0.10+is%3Aclosed) [2.0.9](https://github.com/Atmosphere/atmosphere/issues?q=is%3Aissue+label%3A2.0.9+is%3Aclosed) [2.0.8](https://github.com/Atmosphere/atmosphere/issues?labels=2.0.8&page=1&state=closed) [2.0.7](http://goo.gl/nefkn7) [2.0.6](http://goo.gl/MvFSR1) [2.0.5](http://goo.gl/jFLDZc) [2.0.4](http://goo.gl/zTbcgC) [2.0.3](https://github.com/Atmosphere/atmosphere/issues?labels=2.0.3&page=1&state=closed) [2.0.2] (http://goo.gl/44qnsU) [2.0.1](https://github.com/Atmosphere/atmosphere/issues?labels=2.0.1&page=1&state=closed)\n\n1.0 release: 1.0.19 [1.0.17](http://goo.gl/y2QImv) [1.0.16](http://goo.gl/aWhhtS) [1.0.14](http://goo.gl/Ni3e5l) [1.0.13](https://github.com/Atmosphere/atmosphere/issues?labels=1.0.13&milestone=&page=1&state=closed) [1.0.11](http://goo.gl/TUzk2) [1.0.10](http://goo.gl/teWkz) [1.0.8](https://github.com/Atmosphere/atmosphere/issues?labels=1.0.8&page=1&state=open) [1.0.6](http://goo.gl/Grd2F) [1.0.5](http://goo.gl/nVRyu) [1.0.4](http://goo.gl/r24xA) [1.0.3](https://github.com/Atmosphere/atmosphere/issues?labels=1.0.3&page=1&state=closed) [1.0.2](http://goo.gl/RqaS9) [1.0.1](http://goo.gl/UILd3 ) [1.0](https://github.com/Atmosphere/atmosphere/issues?labels=1.0.0&page=1&state=closed)\n\n[Top](#Top)\n\n## Build Status\n[![Build Status](https://travis-ci.org/Atmosphere/atmosphere.svg?branch=master)](https://travis-ci.org/Atmosphere/atmosphere)\n\n![Analytics](https://ga-beacon.appspot.com/UA-31990725-2/Atmosphere/atmosphere)\n\n@Copyright 2016 [Async-IO.org](http://async-io.org)\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:179FBF:5E4B3D:6AB92EF6"},"text_sha256":"3443516f160743971570d4091f9f6c47596cc4f97e6f7dda86213ec4b6f31181"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1300","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A8:DC698:18213E6:1C4C3B0:6AB92EF9"},"commit":{"sha":"31423f4c8abd80cad86277abf0dad91041d80e38","url":"https://github.com/Atmosphere/atmosphere/commit/31423f4c8abd80cad86277abf0dad91041d80e38","date":"2026-06-30T23:54:42Z","author_date":"2026-06-30T23:53:48Z","committer_date":"2026-06-30T23:54:42Z","tree_sha":"6843cdbb5c0fb0f6bbc49dd3fee18d6069d60d64","message_first_line":"fix(atmosphere.js): capture durable run-id in transport for reconnect resume"},"tree_request_status":200,"tree_rate":{"github_remaining":"1299","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0878:E80A6:17D3796:1BFF15D:6AB92EFA"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26327,"blob_sha":"8baf7ccacc9e6484c359e204711bb2f05131ae61","priority":0},{"path":".github/workflows/policy-as-code-engines.yml","size":6523,"blob_sha":"80f73288c6e5f8e61fc70cdf85130e3d3a392e20","priority":1},{"path":"docs/benchmarks/policy-eval.md","size":4538,"blob_sha":"c247b8ffa5cc72a88bb979781147b413f39ffd2c","priority":1},{"path":"docs/governance-policy-plane.md","size":25793,"blob_sha":"587761aedc0b184852edcf77c58cbda405664894","priority":1},{"path":"SECURITY.md","size":455,"blob_sha":"e5bb2da3b99011891927623af37884856f8ed7ba","priority":1}],"documents":[{"path":"README.md","size":26327,"blob_sha":"8baf7ccacc9e6484c359e204711bb2f05131ae61","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"logo.png\" alt=\"Atmosphere\" width=\"120\"/>\n<\/p>\n\n<h1 align=\"center\">Atmosphere<\/h1>\n\n<p align=\"center\">\n  The real-time JVM engine for streaming, governable AI agents. Atmosphere's broadcaster transport — WebSocket, SSE, long-polling, gRPC — is the foundation; declare behavior with <code>@Agent<\/code> and Atmosphere owns runtime dispatch, reconnect, authorization, observability, and the governance path.\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://central.sonatype.com/artifact/org.atmosphere/atmosphere-runtime\"><img src=\"https://img.shields.io/maven-central/v/org.atmosphere/atmosphere-runtime?label=Maven%20Central&color=blue\" alt=\"Maven Central\"/><\/a>\n  <a href=\"https://www.npmjs.com/package/atmosphere.js\"><img src=\"https://img.shields.io/npm/v/atmosphere.js?label=atmosphere.js&color=blue\" alt=\"npm\"/><\/a>\n  <a href=\"https://github.com/Atmosphere/atmosphere/actions/workflows/ci.yml\"><img src=\"https://github.com/Atmosphere/atmosphere/actions/workflows/ci.yml/badge.svg?branch=main\" alt=\"CI: Core\"/><\/a>\n  <a href=\"https://github.com/Atmosphere/atmosphere/actions/workflows/e2e.yml\"><img src=\"https://github.com/Atmosphere/atmosphere/actions/workflows/e2e.yml/badge.svg?branch=main\" alt=\"CI: E2E\"/><\/a>\n  <a href=\"https://github.com/Atmosphere/atmosphere/actions/workflows/ci-js.yml\"><img src=\"https://github.com/Atmosphere/atmosphere/actions/workflows/ci-js.yml/badge.svg?branch=main\" alt=\"CI: atmosphere.js\"/><\/a>\n<\/p>\n\n---\n\nAtmosphere is built for teams that need AI agents to behave like production services: streaming over real transports, guarded before every tool call, observable by tenant and run, and portable across AI frameworks without rewriting the endpoint.\n\n## Why Atmosphere\n\n| Need | What Atmosphere provides |\n|---|---|\n| Stream to real clients | WebSocket, SSE, long-polling, and gRPC run through one broadcaster pipeline as always-on defaults; WebTransport over HTTP/3 is optional (needs `jetty-http3-server` or `reactor-netty-http` on the classpath plus a dev cert) |\n| Swap AI integrations | One `AgentRuntime` SPI with twelve runtime adapters and contract-tested capability flags |\n| Govern execution | Policy admission, `@AgentScope`, human approval, plan-and-verify, cost ceilings, PII rewriting, and admin kill switches |\n| Pause for humans | Durable HITL approvals hibernate without holding a thread, persist workflow state, and resume through REST approval surfaces |\n| Resume long runs | Durable sessions, run IDs, replay buffers, checkpoints, and reconnect-safe continuation |\n| Expose the same agent everywhere | Browser endpoints plus MCP (stateless **2026-07-28** RC + sessions back to 2024-11-05), A2A, AG-UI, Slack, Telegram, Discord, WhatsApp, and Messenger modules |\n\n## Scope\n\nAtmosphere is a JVM framework, not an agent-hosting platform. We ship the primitives your application uses at runtime; the host you choose (Tomcat, Jetty, Netty, Undertow, Quarkus, Spring Boot, or any servlet container) owns compute and scheduling. Payment rails and commerce primitives are out of scope. Compared to the agent-platform stack vocabulary that has emerged around offerings like Cloudflare Agents, AWS Bedrock Agents, and Vertex AI Agents:\n\n| Layer | What Atmosphere ships | Provided by your stack |\n|---|---|---|\n| [Streaming transport](https://atmosphere.github.io/docs/reference/core/) | `atmosphere-runtime` over WebSocket, SSE, long-polling (always-on defaults), gRPC, plus optional WebTransport/HTTP-3 (needs `jetty-http3-server` or `reactor-netty-http` on the classpath plus a dev cert) | — |\n| [Runtime dispatch](https://atmosphere.github.io/docs/tutorial/11-ai-adapters/) | `atmosphere-ai` `AgentRuntime` SPI + 12 adapters with contract-tested capability flags | Model hosting (we call providers; we do not host weights) |\n| [Orchestration](https://atmosphere.github.io/docs/agents/coordinator/) | `@Coordinator`, `AgentFleet`, handoffs, conditional routing, event-sourced coordination journal (`CoordinationJournal` SPI with causal `EventEnvelope` lineage, `CoordinationProjection` DAG-from-log, `FileCoordinationJournal` append-only NDJSON persistence, `CoordinationFork` what-if branching), result evaluation, and durable hibernating `Workflow<S>` over `CheckpointStore` (per-step retry, resume across JVM restart, no thread held while hibernated) — durable step execution, not wall-clock triggering | Cron / wall-clock scheduling (your container scheduler or a dedicated scheduler fires the workflow) |\n| [Memory](https://atmosphere.github.io/docs/reference/durable-sessions/) | `AiConversationMemory` per-conversation history (in-memory, plus durable SQLite/Redis through the `ConversationPersistence` SPI in `atmosphere-durable-sessions{-sqlite,-redis}`), `LongTermMemory` per-user facts (`InMemoryLongTermMemory`, `SqliteLongTermMemory`, `RedisLongTermMemory`), `SemanticRecallInterceptor` for BYO vector-store recall | Managed vector stores (use Spring AI's `VectorStore`, LangChain4j embeddings, or your own) |\n| [Governance](https://atmosphere.github.io/docs/reference/governance/) | Policy admission, `@AgentScope`, plan-and-verify, PII redaction, cost ceilings, durable HITL approvals, admin kill switches | — |\n| [Protocol surface](https://atmosphere.github.io/docs/reference/mcp/) | MCP, A2A, AG-UI, Slack/Telegram/Discord/WhatsApp/Messenger channel adapters | — |\n| [Code execution](https://atmosphere.github.io/docs/reference/sandbox/) | `atmosphere-sandbox` `SandboxProvider` SPI + `DockerSandboxProvider` default | Browser automation, headless Chromium |\n| [SDK](https://atmosphere.github.io/docs/clients/javascript/) | `atmosphere.js` (React, Vue, Svelte, React Native, vanilla TS), `wasync` (JVM client) | — |\n\nThe differentiator is the streaming + JVM + governance combination: long-lived stateful agent sessions over real-time transports, with policy admission on the critical path. For stateless, bursty, autonomous agents that should hibernate when idle, a serverless agent platform is usually the better fit. For human-in-the-loop, multi-channel, governed agents inside an existing JVM stack, Atmosphere is the fit.\n\n## Quick Start\n\n### Run a sample\n\n```bash\nbrew install Atmosphere/tap/atmosphere\n\n# Or:\ncurl -fsSL https://raw.githubusercontent.com/Atmosphere/atmosphere/main/cli/install.sh | sh\n\natmosphere run spring-boot-multi-agent-startup-team\n```\n\n### Create an app\n\n```bash\natmosphere new my-agent --template ai-chat\ncd my-agent\nLLM_API_KEY=your-key ./mvnw spring-boot:run\n```\n\n### Swap the runtime adapter\n\n```bash\n# Built-in is the default. This injects the Spring AI adapter dependencies.\natmosphere new my-agent --template ai-chat --runtime spring-ai\n\n# Use --force when a sample already pins a runtime adapter.\natmosphere new my-agent --template ai-tools --runtime langchain4j --force\n```\n\n### Import a skill\n\n```bash\natmosphere import https://github.com/anthropics/skills/blob/main/skills/frontend-design/SKILL.md\ncd frontend-design\nLLM_API_KEY=your-key ./mvnw spring-boot:run\n```\n\n## Terminology\n\n| Term | Meaning in Atmosphere | Examples |\n|---|---|---|\n| Model provider | The model/API vendor or endpoint that serves tokens | OpenAI, Gemini compatibility endpoint, Ollama, DashScope, local OpenAI-compatible proxies |\n| Runtime adapter | The Atmosphere integration that implements `AgentRuntime` | Built-in, Spring AI, LangChain4j, Google ADK, Embabel, Koog, Semantic Kernel, AgentScope, Spring AI Alibaba, Anthropic, Cohere, CrewAI |\n| Capability | A feature advertised by a runtime adapter and pinned by contract tests | tool calling, embeddings, streaming, structured output, prompt caching |\n\nUse **provider** for model vendors and **runtime adapter** for Atmosphere integrations. Not every runtime adapter exposes every capability.\n\n## `@Agent`\n\nOne annotation declares the agent. Modules on the classpath decide which endpoints and integrations are registered.\n\n```java\n@Agent(name = \"my-agent\", description = \"What this agent does\")\npublic class MyAgent {\n\n    @Prompt\n    public void onMessage(String message, StreamingSession session) {\n        session.stream(message);\n    }\n\n    @Command(value = \"/status\", description = \"Show status\")\n    public String status() {\n        return \"All systems operational\";\n    }\n\n    @Command(value = \"/reset\", description = \"Reset data\",\n             confirm = \"This will delete all data. Are you sure?\")\n    public String reset() {\n        return dataService.resetAll();\n    }\n\n    @AiTool(name = \"lookup\", description = \"Look up data\")\n    public String lookup(@Param(\"query\") String query) {\n        return dataService.find(query);\n    }\n}\n```\n\n| Module on classpath | What gets registered |\n|---|---|\n| [`atmosphere-agent`](https://atmosphere.github.io/docs/agents/agent/) | Browser endpoint at `/atmosphere/agent/my-agent`, streaming AI dispatch, memory, commands, `/help` |\n| [`atmosphere-mcp`](https://atmosphere.github.io/docs/reference/mcp/) | MCP endpoint at `/atmosphere/agent/my-agent/mcp` — session protocol + stateless 2026-07-28 RC (Tasks, MCP Apps, OAuth resource server) |\n| [`atmosphere-a2a`](https://atmosphere.github.io/docs/agents/a2a/) | A2A endpoint at `/atmosphere/agent/my-agent/a2a` with Agent Card discovery |\n| [`atmosphere-agui`](https://atmosphere.github.io/docs/agents/agui/) | AG-UI endpoint at `/atmosphere/agent/my-agent/agui` |\n| [`atmosphere-channels`](https://atmosphere.github.io/docs/tutorial/23-channels/) | Slack, Telegram, Discord, WhatsApp, and Messenger dispatch |\n| [`atmosphere-admin`](https://atmosphere.github.io/docs/reference/admin/) | Admin dashboard and `/api/admin/*` control surfaces |\n| built-in console | Console UI at `/atmosphere/console/` |\n\n## AI Runtime Adapters\n\n`atmosphere-ai` ships the `AgentRuntime` SPI plus the Built-in OpenAI-compatible adapter. Eleven additional adapters live in separate modules — nine wrap a third-party framework, and two (`atmosphere-anthropic`, `atmosphere-cohere`) are native HTTP+SSE clients for the Anthropic Messages API and the Cohere v2 chat API respectively. Drop one runtime adapter on the classpath and the same `@Agent` code dispatches through it.\n\nCapabilities are intentionally not identical. The authoritative matrix is pinned by `AbstractAgentRuntimeContractTest.expectedCapabilities()`, so a runtime cannot drift from its declared feature set without breaking tests.\n\n| Runtime adapter | Backing framework | Spring Boot | Capability highlights | Notes |\n|---|---|---|---|---|\n| [`atmosphere-ai`](https://atmosphere.github.io/docs/reference/ai/) (Built-in) | OpenAI-compatible HTTP client | 3.5 / 4.0 | tool calling, JSON mode, vision, audio, prompt caching, token usage, native retry, tool-call deltas | Default. Works with OpenAI-compatible endpoints such as OpenAI, Gemini compatibility endpoints, Ollama, and local proxies. |\n| [`atmosphere-spring-ai`](https://atmosphere.github.io/docs/integrations/spring-ai/) | Spring AI 2.0.0 | 4.0 | tool calling, structured output, vision, audio, prompt caching, token usage | Best fit for Spring Boot applications already using Spring AI. |\n| [`atmosphere-langchain4j`](https://atmosphere.github.io/docs/integrations/langchain4j/) | LangChain4j 1.17.0 | 4.0 | tool calling, structured output, vision, audio, prompt caching, token usage | Best fit for LangChain4j tool ecosystems and non-Spring services. |\n| [`atmosphere-adk`](https://atmosphere.github.io/docs/integrations/adk/) | Google ADK 1.5.0 | 4.0 | agent orchestration, tool calling, multi-modal, prompt caching | Multi-agent runtime with `AGENT_ORCHESTRATION`. |\n| [`atmosphere-koog`](https://atmosphere.github.io/docs/integrations/koog/) | JetBrains Koog 1.0.0 | 4.0 | agent orchestration, tool calling, multi-modal, prompt caching, cancellation | Multi-agent runtime. |\n| [`atmosphere-semantic-kernel`](https://atmosphere.github.io/docs/integrations/semantic-kernel/) | Microsoft Semantic Kernel 1.5.0 | 4.0 | tool calling, structured output, vision, token usage | No audio path through the SK Java SDK today. |\n| [`atmosphere-agentscope`](https://atmosphere.github.io/docs/integrations/agentscope/) | Alibaba AgentScope 1.0.12 | 4.0 | tool calling, structured output, vision, audio, conversation memory, token usage, cancellation | `AgentScopeToolBridge` routes every `@AiTool` invocation through `ToolExecutionHelper.executeWithApproval`. |\n| [`atmosphere-embabel`](https://atmosphere.github.io/docs/integrations/embabel/) | Embabel 0.5.0 | 3.5 only | agent orchestration, tool calling, vision, conversation memory | Requires `atmosphere-spring-boot3-starter` and the `-Pspring-boot3` profile. |\n| [`atmosphere-spring-ai-alibaba`](https://atmosphere.github.io/docs/integrations/spring-ai-alibaba/) | Spring AI Alibaba 1.1.2.3 | 3.5 only | tool calling, structured output, vision, audio, conversation memory, token usage | Buffered streaming (the upstream `ReactAgent.call()` returns one `AssistantMessage`); `UsageCapturingChatModel` decorator threads token usage. Token-by-token streaming should use another adapter until Alibaba ships a Spring AI 2.x-aligned agent framework. |\n| [`atmosphere-anthropic`](https://atmosphere.github.io/docs/integrations/anthropic/) | Anthropic Messages API (no third-party SDK) | 3.5 / 4.0 | tool calling, structured output, conversation memory, token usage, per-request retry | Native HTTP+SSE client; tool loop capped at five rounds, cancellation-aware. Configure via `anthropic.api.key` (system property or `AiConfig.LlmSettings`); custom headers (`Helicone-Auth`, tenant IDs, tracing) are passthrough with reserved-header filtering. |\n| [`atmosphere-cohere`](https://atmosphere.github.io/docs/integrations/cohere/) | Cohere v2 chat API (no third-party SDK) | 3.5 / 4.0 | tool calling, structured output, vision, multi-modal, conversation memory, token usage, per-request retry | Native HTTP+SSE client against `POST /v2/chat`; tool dispatch routes through `ToolExecutionHelper.executeWithApproval`. Configure via `cohere.api.key` (system property or `AiConfig.LlmSettings`). |\n| [`atmosphere-crewai`](https://atmosphere.github.io/docs/integrations/crewai/) | CrewAI 1.14+ sidecar bridge | 3.5 / 4.0 | agent orchestration, tool calling, structured output, token usage, cancellation | Java HTTP+SSE bridge to a Python CrewAI sidecar. Availability is gated by a live `/health` probe, not classpath presence. |\n\nSee the full [capability matrix](modules/ai/README.md#capability-matrix) for text streaming, tool calling, structured output, system prompts, agent orchestration, conversation memory, tool approval, vision, audio, multi-modal, prompt caching, token usage, retry, passivation, and tool-call deltas.\n\n## Enterprise Controls\n\nAtmosphere keeps governance on the critical path rather than as an afterthought.\n\n| Control | Module | What it does |\n|---|---|---|\n| [Policy admission](https://atmosphere.github.io/docs/reference/governance/) | `atmosphere-ai` | `GovernancePolicy`, `PolicyRing`, allow/deny lists, rate limits, time windows, metadata requirements |\n| [Scope enforcement](https://atmosphere.github.io/docs/tutorial/31-agent-scope/) | `atmosphere-ai` | `@AgentScope` blocks out-of-purpose prompts before runtime dispatch |\n| [Human approval](https://atmosphere.github.io/docs/reference/tool-approval-policy/) | `atmosphere-agent`, `atmosphere-ai` | command confirmations, permission modes, tool approval policies |\n| [Durable HITL workflows](https://atmosphere.github.io/docs/tutorial/24-durable-hitl/) | `atmosphere-checkpoint`, `atmosphere-durable-sessions` | checkpointed approval gates, REST approve/reject/resume endpoints, and reconnect-safe replay for long-running agent work |\n| [Stateful interactions](https://atmosphere.github.io/docs/reference/interactions/) | `atmosphere-interactions` | stateful agent turns with a durable `steps[]` log, `background` runs retrievable after disconnect, conversation chaining via `previous_interaction_id`, and live step streaming over WebSocket; REST surface at `/api/interactions` (mutations default-deny) |\n| [Plan-and-verify](https://atmosphere.github.io/docs/tutorial/33-plan-and-verify/) | `atmosphere-verifier` | verifies LLM-emitted tool workflows before execution; six structural verifiers run today (control-flow gate, allowlist, well-formedness, capability, taint, automaton); a seventh SMT backend ships as `atmosphere-verifier-smt` (SMTInterpol pure-JVM default, Z3 opt-in via native libs) proving numeric invariants over symbolic tool-call data flow; the no-op default applies only when that module is absent. A native-Java implementation of Erik Meijer's [*Guardians of the Agents*](https://cacm.acm.org/practice/guardians-of-the-agents/) (CACM, Jan 2026) pattern |\n| [PII and cost controls](https://atmosphere.github.io/docs/reference/governance/) | `atmosphere-ai` | stream-level PII redaction, token usage, per-tenant cost ceilings |\n| [Admin control plane](https://atmosphere.github.io/docs/reference/admin/) | `atmosphere-admin` | dashboard, REST/MCP control surfaces, kill switches, journal flow viewer, governance decisions, **workflow authoring UI** (authoring + persistence; manifest execution runtime not yet wired), **eval dashboard** |\n| Enterprise console bundle | `atmosphere-admin-bundle` | single Maven dep aggregating `spring-boot-starter` + `admin` + `ai` + `coordinator` + `agent` + `rag` + `checkpoint` + `durable-sessions` |\n| [Compliance evidence](https://atmosphere.github.io/docs/tutorial/32-owasp-agentic-matrix/) | `atmosphere-ai`, `atmosphere-admin` | OWASP Agentic Top 10, EU AI Act, HIPAA, SOC 2 matrices and AGT-compatible verification output |\n| [Sandbox execution](https://atmosphere.github.io/docs/reference/sandbox/) | `atmosphere-sandbox` | `DockerSandboxProvider` default and `SandboxProvider` SPI for isolated code execution |\n\nGovernance policy can be YAML-driven:\n\n```yaml\nversion: \"1.0\"\npolicies:\n  - name: deny-destructive-sql\n    type: deny-list\n    config:\n      phrases: [\"DROP TABLE\", \"TRUNCATE\", \"DELETE FROM\"]\n  - name: tenant-cost-ceiling\n    type: cost-ceiling\n    config:\n      ceilingDollars: 50.0\n```\n\nOr annotation-driven:\n\n```java\n@AiEndpoint(path = \"/support\")\n@AgentScope(\n    purpose = \"Customer support: orders, billing, store hours\",\n    forbiddenTopics = {\"code\", \"programming\", \"medical advice\"},\n    onBreach = AgentScope.Breach.POLITE_REDIRECT)\npublic class SupportAgent { /* @Prompt method */ }\n```\n\nSee the [governance policy plane reference](docs/governance-policy-plane.md), [governance docs](https://atmosphere.github.io/docs/reference/governance/), and [`spring-boot-ms-governance-chat`](samples/spring-boot-ms-governance-chat/) sample.\n\n## Client Libraries\n\nInstall the TypeScript client:\n\n```bash\nnpm install atmosphere.js\n```\n\nUse React, Vue, Svelte, React Native, or the low-level client directly:\n\n```tsx\nimport { useStreaming } from 'atmosphere.js/react';\n\nfunction Chat() {\n  const { fullText, isStreaming, send } = useStreaming({\n    request: {\n      url: '/atmosphere/agent/my-agent',\n      transport: 'webtransport',\n      fallbackTransport: 'websocket',\n    },\n  });\n\n  return <p>{fullText}<\/p>;\n}\n```\n\nFor Java/Kotlin clients, use [wAsync](modules/wasync/) for async WebSocket, SSE, long-polling, and gRPC clients.\n\n## Flagship Samples\n\n| Sample | Shows |\n|---|---|\n| [startup team](samples/spring-boot-multi-agent-startup-team/) | `@Coordinator` with A2A specialists, governance, checkpoints, skills, admin control plane |\n| [ai-chat](samples/spring-boot-ai-chat/) | Streaming AI chat with auth, caching, and runtime adapter portability |\n| [ai-tools](samples/spring-boot-ai-tools/) | Framework-agnostic `@AiTool` methods and approval gates |\n| [checkpoint-agent](samples/spring-boot-checkpoint-agent/) | Checkpointed `@Coordinator` workflow with REST approval/resume |\n| [ai-classroom](samples/spring-boot-ai-classroom/) | Multi-room collaborative AI with React Native / Expo client |\n| [guarded-email-agent](samples/spring-boot-guarded-email-agent/) | Plan-and-verify taint protection before any email tool fires |\n| [ms-governance-chat](samples/spring-boot-ms-governance-chat/) | Microsoft Agent Governance Toolkit-compatible YAML and decision endpoint |\n| [mcp-server](samples/spring-boot-mcp-server/) | MCP tools, resources, prompts, and an MCP App (SEP-1865) with a bidirectional bridge, rendered in the console |\n| [rag-chat](samples/spring-boot-rag-chat/) | Retrieval-augmented generation with `ContextProvider` |\n| [channels-chat](samples/spring-boot-channels-chat/) | Slack, Telegram, Discord, WhatsApp, and Messenger channel dispatch |\n| [coding-agent](samples/spring-boot-coding-agent/) | Docker sandbox provider for clone/read/stream coding workflows |\n\n[All samples](samples/) · [`cli/samples.json`](cli/samples.json) · [`atmosphere install`](cli/README.md#sample-catalog--atmosphere-install) for the interactive picker.\n\n## Add Atmosphere to an App\n\n```xml\n<!-- Spring Boot 4.0 starter -->\n<dependency>\n    <groupId>org.atmosphere<\/groupId>\n    <artifactId>atmosphere-spring-boot-starter<\/artifactId>\n    <version>${atmosphere.version}<\/version>\n<\/dependency>\n\n<!-- Agent module: @Agent, @Prompt, @Command, @AiTool -->\n<dependency>\n    <groupId>org.atmosphere<\/groupId>\n    <artifactId>atmosphere-agent<\/artifactId>\n    <version>${atmosphere.version}<\/version>\n<\/dependency>\n```\n\nAdd only what you need:\n\n- **AI runtime**: `atmosphere-ai` or one runtime adapter from the [runtime table](#ai-runtime-adapters)\n- **Protocols**: [`atmosphere-mcp`](https://atmosphere.github.io/docs/reference/mcp/), [`atmosphere-a2a`](https://atmosphere.github.io/docs/agents/a2a/), [`atmosphere-agui`](https://atmosphere.github.io/docs/agents/agui/)\n- **Channels**: [`atmosphere-channels`](https://atmosphere.github.io/docs/tutorial/23-channels/)\n- **Multi-agent**: [`atmosphere-coordinator`](https://atmosphere.github.io/docs/agents/coordinator/)\n- **Admin/control plane**: [`atmosphere-admin`](https://atmosphere.github.io/docs/reference/admin/)\n- **Plan-and-verify**: [`atmosphere-verifier`](https://atmosphere.github.io/docs/tutorial/33-plan-and-verify/)\n- **Sandbox**: [`atmosphere-sandbox`](https://atmosphere.github.io/docs/reference/sandbox/)\n- **Durable sessions**: [`atmosphere-durable-sessions`](https://atmosphere.github.io/docs/reference/durable-sessions/) plus `atmosphere-durable-sessions-sqlite` or `atmosphere-durable-sessions-redis`\n- **Checkpoints**: [`atmosphere-checkpoint`](https://atmosphere.github.io/docs/reference/checkpoint/)\n- **Audit sinks**: `atmosphere-ai-audit-kafka`, `atmosphere-ai-audit-postgres`\n- **[Policy engines](https://atmosphere.github.io/docs/reference/governance/)**: `atmosphere-ai-policy-rego` (OPA), `atmosphere-ai-policy-cedar` (AWS Cedar)\n\nFor Spring Boot 3.5 deployments, including Embabel or Spring AI Alibaba, use `atmosphere-spring-boot3-starter` and build with `-Pspring-boot3`.\n\n**Requirements:** Java 21+ · Spring Boot 4.0.7 or Spring Boot 3.5 via `-Pspring-boot3` · Quarkus 3.36.0+ · current release from the Maven Central badge above.\n\n## Documentation\n\n[Tutorial](https://atmosphere.github.io/docs/tutorial/01-introduction/) · [Full docs](https://atmosphere.github.io/docs/) · [CLI](cli/README.md) · [Javadoc](https://atmosphere.github.io/apidocs/) · [Samples](samples/)\n\n| Topic | Reference docs |\n|---|---|\n| Architecture & transports | [Architecture](https://atmosphere.github.io/docs/architecture/) · [Transports](https://atmosphere.github.io/docs/tutorial/04-transports/) · [Broadcaster](https://atmosphere.github.io/docs/tutorial/05-broadcaster/) · [WebTransport](https://atmosphere.github.io/docs/reference/webtransport/) · [Clustering](https://atmosphere.github.io/docs/tutorial/16-clustering/) |\n| AI runtimes | [AI adapters](https://atmosphere.github.io/docs/tutorial/11-ai-adapters/) · [Runtime selection](https://atmosphere.github.io/docs/reference/runtime-selection/) · [AI reference](https://atmosphere.github.io/docs/reference/ai/) |\n| Agents & protocols | [`@Agent`](https://atmosphere.github.io/docs/agents/agent/) · [MCP](https://atmosphere.github.io/docs/reference/mcp/) · [A2A](https://atmosphere.github.io/docs/agents/a2a/) · [AG-UI](https://atmosphere.github.io/docs/agents/agui/) · [Coordinator](https://atmosphere.github.io/docs/agents/coordinator/) · [Channels](https://atmosphere.github.io/docs/tutorial/23-channels/) |\n| Governance & verification | [Governance](https://atmosphere.github.io/docs/reference/governance/) · [Agent scope](https://atmosphere.github.io/docs/tutorial/31-agent-scope/) · [Plan-and-verify (Meijer)](https://atmosphere.github.io/docs/tutorial/33-plan-and-verify/) · [Tool approval](https://atmosphere.github.io/docs/reference/tool-approval-policy/) · [OWASP Agentic matrix](https://atmosphere.github.io/docs/tutorial/32-owasp-agentic-matrix/) |\n| Durability & state | [Durable sessions](https://atmosphere.github.io/docs/reference/durable-sessions/) · [Durable HITL](https://atmosphere.github.io/docs/tutorial/24-durable-hitl/) · [Checkpoints](https://atmosphere.github.io/docs/reference/checkpoint/) · [Interactions](https://atmosphere.github.io/docs/reference/interactions/) |\n| Operations | [Admin & control plane](https://atmosphere.github.io/docs/reference/admin/) · [Observability](https://atmosphere.github.io/docs/reference/observability/) · [Benchmarks](https://atmosphere.github.io/docs/reference/benchmarks/) |\n| Clients | [JavaScript](https://atmosphere.github.io/docs/clients/javascript/) · [React Native](https://atmosphere.github.io/docs/clients/react-native/) · [Java / wAsync](https://atmosphere.github.io/docs/clients/java/) |\n\n## Commercial Support\n\nProduction support tiers, compliance attestation, Microsoft Agent Governance Toolkit interop, plan-and-verify adoption, A2A v1.0.0 alignment, and legacy Atmosphere 2.x / 3.x long-term support are available from [Async-IO](https://async-io.live/#support). Book a 30-minute architecture call: [async-io.live/contact](https://async-io.live/contact/).\n\n## Companion Projects\n\n| Project | Description |\n|---|---|\n| [atmosphere-skills](https://github.com/Atmosphere/atmosphere-skills) | Curated agent skill files: personality, tools, guardrails |\n| [homebrew-tap](https://github.com/Atmosphere/homebrew-tap) | Homebrew formulae for the Atmosphere CLI |\n\n## License\n\nApache 2.0 - Copyright 2008-2026 [Async-IO.org](https://async-io.live)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"71A2:3B1F3:187E0B:5F2E3D:6AB92EFB"},"text_sha256":"f54cc0ae74cca55e4cec81d2b5611263eb67d107c9e0a17c916c34605339f476"},{"path":".github/workflows/policy-as-code-engines.yml","size":6523,"blob_sha":"80f73288c6e5f8e61fc70cdf85130e3d3a392e20","priority":1,"status":200,"text":"name: \"CI: Policy-as-Code Engines (OPA / Cedar)\"\n\n# Runs the binary-gated integration tests for the governance policy-as-code\n# adapters against the REAL engines:\n#   - modules/ai-policy-rego  -> OpaSubprocessEvaluatorIntegrationTest (real `opa`)\n#   - modules/ai-policy-cedar -> CedarCliAuthorizerIntegrationTest     (real `cedar`)\n#\n# Both tests self-skip via JUnit `assumeTrue` when the engine is absent, so\n# they are green everywhere else. This workflow installs the engines so the\n# tests actually execute somewhere in CI (the governing requirement) instead\n# of being eternally skipped. Each job asserts the suite RAN (skipped=0), so a\n# silently-skipped integration test fails the lane.\n#\n# Split rationale:\n#   * opa   ships a prebuilt static binary -> cheap, PR-blocking lane.\n#   * cedar ships NO prebuilt CLI (verified: cedar-policy/cedar releases carry\n#     no binary assets) -> must `cargo install cedar-policy-cli`, which compiles\n#     from source (~minutes). That is deliberately a NON-PR-blocking lane:\n#     schedule + manual dispatch + push that touches the cedar module. The\n#     installed binary is cached so reruns are fast. There is no `pull_request`\n#     trigger on the cedar job, so it never gates a PR on a multi-minute build.\n\non:\n  push:\n    branches: [ '**' ]\n    paths:\n      - 'modules/ai-policy-rego/**'\n      - 'modules/ai-policy-cedar/**'\n      - 'modules/ai/**'\n      - '.github/workflows/policy-as-code-engines.yml'\n  pull_request:\n    branches: [ main ]\n    paths:\n      - 'modules/ai-policy-rego/**'\n      - 'modules/ai/**'\n      - '.github/workflows/policy-as-code-engines.yml'\n  schedule:\n    # Weekly on Monday 05:30 UTC — keeps the cedar lane (and the slow cargo\n    # build) exercised even when nobody touches the module.\n    - cron: '30 5 * * 1'\n  workflow_dispatch:\n\npermissions:\n  contents: read\n\njobs:\n  rego-opa:\n    name: Rego / OPA integration (prebuilt opa)\n    runs-on: ubuntu-latest\n    timeout-minutes: 20\n    env:\n      OPA_VERSION: v0.68.0\n    steps:\n      - uses: actions/checkout@v7\n\n      - name: Set up JDK 21\n        uses: actions/setup-java@v5\n        with:\n          java-version: 21\n          distribution: temurin\n          cache: 'maven'\n\n      - name: Install OPA (prebuilt static binary)\n        run: |\n          set -euo pipefail\n          curl -fsSL -o /usr/local/bin/opa \\\n            \"https://openpolicyagent.org/downloads/${OPA_VERSION}/opa_linux_amd64_static\"\n          chmod +x /usr/local/bin/opa\n          opa version\n\n      - name: Build dependency closure (skip tests)\n        run: ./mvnw -B install -pl modules/ai-policy-rego -am -DskipTests -Dgpg.skip=true\n\n      - name: Run Rego integration test against real opa\n        run: |\n          set -euo pipefail\n          ./mvnw -B test -pl modules/ai-policy-rego \\\n            -Dtest=OpaSubprocessEvaluatorIntegrationTest \\\n            -Datmosphere.opa.path=\"$(command -v opa)\" \\\n            -Dgpg.skip=true\n\n      - name: Assert the integration test actually RAN (skipped=0)\n        run: |\n          set -euo pipefail\n          report=modules/ai-policy-rego/target/surefire-reports/org.atmosphere.ai.policy.rego.OpaSubprocessEvaluatorIntegrationTest.txt\n          test -f \"$report\" || { echo \"::error::no surefire report — test did not run\"; exit 1; }\n          grep -q \"Tests run: 3, Failures: 0, Errors: 0, Skipped: 0\" \"$report\" \\\n            || { echo \"::error::opa integration test was skipped or did not pass\"; cat \"$report\"; exit 1; }\n          echo \"Rego/OPA integration test ran green against the real binary:\"\n          cat \"$report\"\n\n      - name: Upload test results\n        if: failure()\n        uses: actions/upload-artifact@v7\n        with:\n          name: rego-opa-surefire-reports\n          path: modules/ai-policy-rego/target/surefire-reports/\n\n  cedar-cli:\n    name: Cedar CLI integration (cargo-built cedar)\n    # Non-PR-blocking: no pull_request trigger reaches this job. It runs on\n    # schedule, manual dispatch, and pushes that touch the cedar module.\n    if: github.event_name != 'pull_request'\n    runs-on: ubuntu-latest\n    timeout-minutes: 30\n    env:\n      CEDAR_CLI_VERSION: 4.11.2\n    steps:\n      - uses: actions/checkout@v7\n\n      - name: Set up JDK 21\n        uses: actions/setup-java@v5\n        with:\n          java-version: 21\n          distribution: temurin\n          cache: 'maven'\n\n      - name: Cache cedar CLI binary\n        id: cedar-cache\n        uses: actions/cache@v6\n        with:\n          path: ~/.cargo/bin/cedar\n          key: cedar-cli-${{ env.CEDAR_CLI_VERSION }}-${{ runner.os }}\n\n      - name: Install cedar CLI (cargo install from source)\n        if: steps.cedar-cache.outputs.cache-hit != 'true'\n        run: |\n          set -euo pipefail\n          # cedar-policy/cedar ships no prebuilt CLI binary, so build from\n          # crates.io. --locked keeps the build reproducible. Cached above so\n          # this only pays the compile cost on a cache miss / version bump.\n          cargo install cedar-policy-cli --version \"${CEDAR_CLI_VERSION}\" --locked\n\n      - name: Verify cedar on PATH\n        run: |\n          set -euo pipefail\n          echo \"$HOME/.cargo/bin\" >> \"$GITHUB_PATH\"\n          \"$HOME/.cargo/bin/cedar\" --version\n\n      - name: Build dependency closure (skip tests)\n        run: ./mvnw -B install -pl modules/ai-policy-cedar -am -DskipTests -Dgpg.skip=true\n\n      - name: Run Cedar integration test against real cedar\n        run: |\n          set -euo pipefail\n          ./mvnw -B test -pl modules/ai-policy-cedar \\\n            -Dtest=CedarCliAuthorizerIntegrationTest \\\n            -Datmosphere.cedar.path=\"$HOME/.cargo/bin/cedar\" \\\n            -Dgpg.skip=true\n\n      - name: Assert the integration test actually RAN (skipped=0)\n        run: |\n          set -euo pipefail\n          report=modules/ai-policy-cedar/target/surefire-reports/org.atmosphere.ai.policy.cedar.CedarCliAuthorizerIntegrationTest.txt\n          test -f \"$report\" || { echo \"::error::no surefire report — test did not run\"; exit 1; }\n          grep -q \"Tests run: 3, Failures: 0, Errors: 0, Skipped: 0\" \"$report\" \\\n            || { echo \"::error::cedar integration test was skipped or did not pass\"; cat \"$report\"; exit 1; }\n          echo \"Cedar integration test ran green against the real binary:\"\n          cat \"$report\"\n\n      - name: Upload test results\n        if: failure()\n        uses: actions/upload-artifact@v7\n        with:\n          name: cedar-cli-surefire-reports\n          path: modules/ai-policy-cedar/target/surefire-reports/\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"608C:35EBC:17B074:5E5FC7:6AB92EFA"},"text_sha256":"78f8fa72f191575ab3b92e661a7b7bf1bccb938d82fbdb37b20c5dda5c213097"},{"path":"docs/benchmarks/policy-eval.md","size":4538,"blob_sha":"c247b8ffa5cc72a88bb979781147b413f39ffd2c","priority":1,"status":200,"text":"# Governance Policy-Plane Microbenchmark\n\nSource: `modules/benchmarks/src/main/java/org/atmosphere/benchmarks/jmh/PolicyEvalBenchmark.java`\n\nSix JMH benchmarks covering the governance hot path:\n\n| Scenario | What it measures |\n|---|---|\n| `ruleBasedScopeAdmit` | `RuleBasedScopeGuardrail` on an in-scope query (admit path) |\n| `ruleBasedScopeDeny` | `RuleBasedScopeGuardrail` on the canonical \"write Python code\" off-topic query (deny path) |\n| `semanticIntentScopeAdmit` | `SemanticIntentScopeGuardrail` with a static-vector `EmbeddingRuntime` (measures cosine + threshold cost, not network RTT) |\n| `msAgentOsRuleMatch` | `MsAgentOsPolicy.evaluate` against a 9-rule priority-sorted MS-schema chain |\n| `ruleBasedInjectionSafe` | `RuleBasedInjectionClassifier` on a benign retrieval document |\n| `ruleBasedInjectionFlagged` | `RuleBasedInjectionClassifier` on a \"ignore previous instructions\" prompt-injection document |\n\nEach scenario reports **average time per evaluation** in microseconds.\n\n## Status — measurements not yet published\n\n**No numbers are published from this harness yet.** The benchmark's own\nJavadoc says it plainly:\n\n> Before publishing any number from this benchmark, pair with peer\n> review — JMH results are easy to misinterpret (class loading, JIT\n> transitions, allocation pressure).\n\nPublishing a number that turns out wrong costs more credibility than\nnot publishing one. Specifically, the Atmosphere governance plane is\npositioned alongside Microsoft Agent Governance Toolkit's own marketing\nnumbers (\"<0.1 ms p99 enforcement\", \"31,000+ ops/sec on 100-rule\npolicies\"), and our Verification Discipline (`feedback_no_fabricated_stats.md`)\nforbids citing competitor numbers without our own measurement. Trading\none set of unverified numbers for another set of unverified numbers\n(different reason) is the failure mode.\n\n**Required before publication:**\n\n1. Run the harness on a **production-representative box** — Linux x86_64,\n   8+ pinned cores, no thermal throttling, kernel scheduler isolation\n   (`isolcpus`), ASLR / address-space randomization controlled. A\n   developer laptop is not representative.\n2. Run with the documented JMH baseline methodology — five-minute\n   warmup, ten-minute measurement, three forks, per-JVM `-Xmx2g`.\n3. **External methodology review** of the run setup and harness\n   interpretation — JMH allocation pressure, escape-analysis effects\n   on `Blackhole.consume`, thermal stability of the chosen box.\n4. Any comparison statement against MS Agent Governance Toolkit must\n   measure both stacks on the **same hardware** with the **same\n   methodology**. \"Atmosphere is faster than MS\" with one of those held\n   constant is a marketing artifact, not a measurement.\n\nWhen those conditions are met, replace this file's *Results* section\nbelow with the published numbers.\n\n## Reproducing the run\n\n```bash\n# Build the JMH uberjar (modules/benchmarks/target/benchmarks.jar\n# contains the JMH harness plus every Atmosphere class needed).\n./mvnw install -pl modules/benchmarks -am -DskipTests\n\n# Run the policy-eval suite. Default JMH config matches the\n# PolicyEvalBenchmark @Warmup / @Measurement annotations:\n#   5 warmup iterations × 1s, 10 measurement iterations × 1s, 1 fork.\njava -jar modules/benchmarks/target/benchmarks.jar \\\n     PolicyEvalBenchmark \\\n     -rf json -rff policy-eval-$(uname -m).json\n```\n\nFor a peer-review-quality run, override the harness defaults to the\nfive-minute warmup / ten-minute measurement / three-fork baseline:\n\n```bash\njava -jar modules/benchmarks/target/benchmarks.jar \\\n     PolicyEvalBenchmark \\\n     -wi 5 -w 60s \\\n     -i 10 -r 60s \\\n     -f 3 \\\n     -rf json -rff policy-eval-$(uname -m)-baseline.json\n```\n\nThe JMH JSON output is what an external reviewer reads — not a\nhuman-edited summary.\n\n## Results\n\n*Awaiting peer-reviewed run. See \"Status\" above.*\n\nWhen numbers land, this section should follow the format:\n\n```\nHardware: <CPU>, <cores pinned>, <RAM>, <kernel>, <JVM>\nMethodology: 5 × 60s warmup, 10 × 60s measurement, 3 forks, -Xmx2g\nReviewer: <name + date>\nRaw JSON: <link to committed result file>\n\nScenario                          Mode  Cnt   Score   Error  Units\nruleBasedScopeAdmit               avgt  …     …       ±  …   us/op\nruleBasedScopeDeny                avgt  …     …       ±  …   us/op\n…\n```\n\n## Related\n\n- [Governance policy plane reference](../governance-policy-plane.md)\n- `BusinessMdcBenchmark` — sister harness pinning the per-turn MDC cost\n  on `AiEndpointHandler.invokePrompt`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3E24:3CC8A:1801CF:5EB19D:6AB92EFB"},"text_sha256":"c5ed6d6e237502054470a8199bf15e1dce199208f9ab25776ef8de9c264a8df1"},{"path":"docs/governance-policy-plane.md","size":25793,"blob_sha":"587761aedc0b184852edcf77c58cbda405664894","priority":1,"status":200,"text":"# Governance Policy Plane\n\nDeclarative governance policies — admit / deny / transform every AI turn — loaded from YAML ([Atmosphere-native schema](#atmosphere-native-type-dispatch) or [Microsoft Agent Governance Toolkit](https://github.com/microsoft/agent-governance-toolkit) schema verbatim), enforced on every `@AiEndpoint`, introspected through the admin console, and queryable via a Microsoft-compatible `POST /check` decision endpoint.\n\n**Module:** `atmosphere-ai`. Admin-surface pieces live in `atmosphere-admin`; the Spring Boot auto-configuration is in `atmosphere-spring-boot-starter`.\n\n---\n\n## Why this exists\n\nAtmosphere has had `AiGuardrail` from the beginning — PII redaction, cost ceilings, output drift detection — but every guardrail was imperative Java code. The policy plane layers a declarative identity-carrying SPI on top so that:\n\n1. **Operators can author governance in YAML**, not Java. Change `atmosphere-policies.yaml`, restart, governance posture changes. No recompilation.\n2. **Audit trails are pinned to policy identity**. Every admit / deny / transform decision records the `name`, `source` URI, and `version` of the matching policy — not just \"some guardrail fired.\"\n3. **The vocabulary matches external ecosystems.** `admit` / `deny` / `transform` lines up with OPA/Rego and the Microsoft Agent Governance Toolkit. An operator fluent in either toolchain can read an Atmosphere policy without re-learning the model.\n4. **Existing `AiGuardrail` implementations keep working.** The SPI is strictly additive; adapters bridge the two directions.\n\n---\n\n## Architecture\n\n```\n                     ┌──────────────────────────────────────────────────────────┐\n                     │                     atmosphere-policies.yaml             │\n                     │   (Atmosphere-native `policies:` OR MS `rules:`)         │\n                     └────────────────────────────┬─────────────────────────────┘\n                                                  │\n                         YamlPolicyParser auto-detects schema\n                                                  │\n                     ┌────────────────────────────▼─────────────────────────────┐\n                     │     List<GovernancePolicy>                               │\n                     │  • PolicyRegistry type-dispatch (pii-redaction, etc.)    │\n                     │  • MsAgentOsPolicy (rules-over-context)                  │\n                     └────────────────────────────┬─────────────────────────────┘\n                                                  │\n                  framework.getAtmosphereConfig()\n                    .properties()\n                    .put(POLICIES_PROPERTY, policies)\n                                                  │\n    ┌─────────────────────────────────────────────┼────────────────────────────────┐\n    │                                             │                                │\n    ▼                                             ▼                                ▼\nAiEndpointProcessor                     PolicyAdmissionGate              GovernanceController\n (for @AiEndpoint                          (for non-pipeline                (admin HTTP surface)\n  handlers; wraps                           code paths like                     │\n  policies via                              demo responders)                    │\n  PolicyAsGuardrail                            │                                │\n  into the guardrail                           │                                │\n  list)                                        │                                │\n    │                                          │                                │\n    ▼                                          ▼                                ▼\nAiPipeline.execute                    PolicyAdmissionGate.Result       GET /api/admin/governance/policies\n pre-admission loop → Deny aborts     (caller matches Admit/Denied)    GET /api/admin/governance/summary\n Transform rewrites request                                            POST /api/admin/governance/check\n response-side reuses                                                   (MS `PolicyProviderHandler`-compatible)\n GuardrailCapturingSession\n```\n\nThree consumer surfaces, one policy list. Every surface reads the same `POLICIES_PROPERTY` bag, so Spring beans, ServiceLoader entries, and YAML files all converge on the same enforcement chain.\n\n---\n\n## Concepts\n\n### `GovernancePolicy` SPI\n\n`org.atmosphere.ai.governance.GovernancePolicy` — the declarative SPI:\n\n```java\npublic interface GovernancePolicy {\n    String POLICIES_PROPERTY = \"org.atmosphere.ai.governance.policies\";\n\n    String name();      // stable identity for audit trail\n    String source();    // yaml:/path/file.yaml | classpath:file.yaml | code:<fqn>\n    String version();   // semver | ISO date | sha256:… — operator choice\n\n    PolicyDecision evaluate(PolicyContext context);\n}\n```\n\n`PolicyContext` carries the phase (`PRE_ADMISSION` / `POST_RESPONSE`), the `AiRequest`, and the accumulated response text. `PolicyDecision` is a sealed type: `Admit`, `Transform(modifiedRequest)`, `Deny(reason)`.\n\nImplementations must be thread-safe, side-effect-free (except for metrics/logging), and MUST NOT throw — exceptions fail-closed to Deny at every admission seam.\n\n### `PolicyParser` SPI\n\n`org.atmosphere.ai.governance.PolicyParser` — parse a declarative artifact into `List<GovernancePolicy>`. The SPI contract supports `java.util.ServiceLoader` discovery; three implementations ship in-tree:\n\n- **`YamlPolicyParser`** (`format() = \"yaml\"`, `modules/ai`) — SnakeYAML `SafeConstructor` (no arbitrary class instantiation). Auto-detects Atmosphere-native vs Microsoft Agent Governance Toolkit schema by inspecting the root keys. Registered via `META-INF/services/org.atmosphere.ai.governance.PolicyParser`, so adding `atmosphere-ai` to the classpath is enough to wire it up.\n- **`RegoPolicyParser`** (`modules/ai-policy-rego`) — wraps an external OPA process via `RegoEvaluator`. Registered via `META-INF/services/org.atmosphere.ai.governance.PolicyParser` (same as `YamlPolicyParser`), so adding `atmosphere-ai-policy-rego` to the classpath is enough to auto-discover it. Programmatic wiring (`new RegoPolicyParser(registry)`) remains available for callers who want explicit control.\n- **`CedarPolicyParser`** (`modules/ai-policy-cedar`) — Cedar policy text via `CedarAuthorizer` / `CedarCliAuthorizer`. Same posture as Rego: ships a `META-INF/services/org.atmosphere.ai.governance.PolicyParser` entry, so adding `atmosphere-ai-policy-cedar` to the classpath auto-discovers it.\n\nThird-party parsers can register either path. ServiceLoader auto-discovery is the SPI-level recipe (ship a `PolicyParser` impl plus a `META-INF/services/org.atmosphere.ai.governance.PolicyParser` entry); all three in-tree adapters (Yaml/Rego/Cedar) ship such an entry, so they auto-discover from the classpath. Programmatic wiring remains available for callers who want explicit control.\n\nThe audit-sink family follows the same posture: `AsyncAuditSink` ships in `modules/ai`; `KafkaAuditSink` (`modules/ai-audit-kafka`) and `JdbcAuditSink` (`modules/ai-audit-postgres`) are wired programmatically as well — no `META-INF/services` entries.\n\n### `PolicyRegistry` and built-in types\n\n`org.atmosphere.ai.governance.PolicyRegistry` maps YAML `type:` names to factory functions. Eleven built-in types ship (`PolicyRegistry.java:80-91`):\n\n| `type:` | Wraps / produces | Required config keys |\n|---|---|---|\n| `pii-redaction` | `PiiRedactionGuardrail` | `mode: redact \\| block` (default `redact`) |\n| `cost-ceiling` | `CostCeilingGuardrail` | `budget-usd: <number>` |\n| `output-length-zscore` | `OutputLengthZScoreGuardrail` | `window-size`, `z-threshold`, `min-samples` |\n| `deny-list` | `DenyListPolicy` | at least one of `phrases: [...]`, `regex: [...]` |\n| `allow-list` | `AllowListPolicy` | at least one of `phrases: [...]`, `regex: [...]` |\n| `message-length` | `MessageLengthPolicy` | `max-chars: <positive int>` |\n| `rate-limit` | `RateLimitPolicy` | `limit: <positive int>`, `window-seconds: <positive int>` |\n| `concurrency-limit` | `ConcurrencyLimitPolicy` | `max-concurrent: <positive int>` |\n| `time-window` | `TimeWindowPolicy` | `start`, `end` (HH:mm), `zone`, `days: [MONDAY, ...]` (defaults Mon–Fri UTC 09:00–17:00) |\n| `metadata-presence` | `MetadataPresencePolicy` | `required-keys: [...]` |\n| `authorization` | `AuthorizationPolicy` | `required-roles: [...]` |\n\nUnknown `type:` names fail-closed at parse time with `IllegalArgumentException` — silent drops are not an option.\n\nRegister a custom type in code:\n\n```java\nvar registry = new PolicyRegistry();\nregistry.register(\"my-domain-policy\", descriptor ->\n        new MyDomainPolicy(descriptor.name(), descriptor.source(),\n                descriptor.version(), descriptor.config()));\nvar parser = new YamlPolicyParser(registry);\n```\n\n### `PolicyRing` — concentric-ring composition\n\n`org.atmosphere.ai.governance.PolicyRing` composes a list of policies into evaluation rings, cheapest first, short-circuiting on the first terminal decision. Purpose-built for stacks where a rule-based scope check can reject the bulk of traffic in sub-millisecond time before paying for a 100–500 ms LLM-classifier tier.\n\nEvaluation order (lower ring index = evaluated first):\n\n1. **Ring 1 (outermost / cheapest)** — rule-based, regex, keyword\n2. **Ring 2** — embedding-similarity, hash lookups, cached classifiers\n3. **Ring 3 (innermost / most expensive)** — LLM-classifier, remote RAG scans\n\nRing indices are operator-defined integers; within a ring, policies evaluate in insertion order. A `PolicyDecision.Deny` from any ring terminates evaluation; a `PolicyDecision.Transform` rewrites the request and the next ring sees the rewritten form; `PolicyDecision.Admit` moves on.\n\nError isolation is fail-closed by default: a policy that throws is treated as a `Deny` (same semantics as the `AiPipeline`'s per-policy error handling). Operators who want \"log and continue\" wrap the errant policy in `DryRunPolicy` first.\n\n```java\nvar ring = PolicyRing.builder(\"layered-defence\")\n        .source(\"inline\")\n        .version(\"1.0.0\")\n        .ring(1, denyListPolicy, allowListPolicy)               // rule-based\n        .ring(2, embeddingSimilarityPolicy)                     // similarity\n        .ring(3, llmClassifierPolicy)                           // LLM tier\n        .build();\n```\n\n### `PolicyAdmissionGate`\n\n`org.atmosphere.ai.governance.PolicyAdmissionGate` — utility that runs the policy chain on an `AiRequest` **outside the pipeline**. Exists because some `@Prompt` handlers respond locally (demo producers, canned responders) and therefore never invoke `AiPipeline.execute`. Without the gate those paths would bypass governance entirely — the classroom sample was the first casualty.\n\n```java\nvar gate = PolicyAdmissionGate.admit(resource, new AiRequest(message));\nswitch (gate) {\n    case PolicyAdmissionGate.Result.Denied denied ->\n            session.error(new SecurityException(\"Denied by \" + denied.policyName()));\n    case PolicyAdmissionGate.Result.Admitted admitted ->\n            // forward admitted.request().message() to your local responder\n}\n```\n\n### `GuardrailAsPolicy` and `PolicyAsGuardrail`\n\nInterop adapters so the imperative and declarative layers share one enforcement seam:\n\n- `GuardrailAsPolicy` wraps any `AiGuardrail` as a `GovernancePolicy` with default identity (`code:<fqn>`, version `embedded`) or explicit identity.\n- `PolicyAsGuardrail` wraps any `GovernancePolicy` as an `AiGuardrail`. Used internally by `AiEndpointProcessor` to merge policies into the guardrail list consumed by `AiPipeline`. `Transform` decisions on the post-response path are downgraded to `Pass` with a warning (streamed text is not retroactively rewritable).\n\n---\n\n## YAML schemas\n\n### Atmosphere-native (type-dispatch)\n\n```yaml\nversion: \"1.0\"\npolicies:\n  - name: customer-pii-guard\n    type: pii-redaction\n    version: \"1.0\"\n    config:\n      mode: redact            # redact | block\n\n  - name: drift-watcher\n    type: output-length-zscore\n    config:\n      window-size: 50\n      z-threshold: 3.0\n      min-samples: 10\n\n  - name: tenant-budget\n    type: cost-ceiling\n    config:\n      budget-usd: 100.00\n```\n\nEach entry maps to a built-in type and gets wrapped as a `GuardrailAsPolicy` over the corresponding guardrail.\n\n### Microsoft Agent Governance Toolkit (rules-over-context)\n\n`YamlPolicyParser` auto-detects the MS schema — documents with a top-level `rules:` sequence — and produces a single `MsAgentOsPolicy` that preserves MS's first-match-by-priority evaluation semantic verbatim. All nine comparison operators and all four actions are supported:\n\n```yaml\nversion: \"1.0\"\nname: production-policy\ndescription: Company-wide policy — verbatim example from MS's docs\nrules:\n  - name: block-delete-database\n    condition: { field: tool_name, operator: eq, value: delete_database }\n    action: deny\n    priority: 100\n    message: \"Destructive action: deleting databases is never allowed\"\n\n  - name: escalate-transfer-funds\n    condition: { field: tool_name, operator: eq, value: transfer_funds }\n    action: deny\n    priority: 90\n    message: \"Sensitive action: transfer_funds requires human approval\"\n\n  - name: allow-search-documents\n    condition: { field: tool_name, operator: eq, value: search_documents }\n    action: allow\n    priority: 80\n\ndefaults:\n  action: allow\n```\n\n| Operator | Semantic (port of MS's `_match_condition`) |\n|---|---|\n| `eq` / `ne` | Loose equality (numeric cross-type aware) |\n| `gt` / `lt` / `gte` / `lte` | Comparable-based ordering |\n| `in` | Value appears in target list |\n| `contains` | Substring (strings) or membership (collections) |\n| `matches` | Regex via `Pattern.matcher().find()` |\n\n| Action | Decision mapping |\n|---|---|\n| `allow` | `PolicyDecision.admit()` |\n| `deny` / `block` | `PolicyDecision.deny(message)` |\n| `audit` | `PolicyDecision.admit()` + structured INFO log |\n\n**Context map bridge** — rule `field:` references map to:\n\n| Context key | `AiRequest` source |\n|---|---|\n| `message`, `system_prompt`, `model` | direct fields |\n| `user_id`, `session_id`, `agent_id`, `conversation_id` | direct fields |\n| `phase` | `pre_admission` \\| `post_response` |\n| `response` | accumulated response text (post-response only) |\n| *anything else* | `AiRequest.metadata()` entries by exact key |\n\nTwo schemas are mutually exclusive per document — a YAML file carrying both `rules:` and `policies:` raises `IOException` at parse time.\n\n### Conformance\n\n`MsAgentOsYamlConformanceTest` copies example YAMLs byte-for-byte from `microsoft/agent-governance-toolkit@April-2026` (`docs/tutorials/policy-as-code/examples/`). If MS changes their upstream schema and our fixtures go stale, the test fails — parity is pinned in CI, not in marketing copy.\n\n---\n\n## Wiring in a Spring Boot app\n\n```java\n@Configuration\npublic class PoliciesConfig {\n    private static final String POLICY_FILE = \"atmosphere-policies.yaml\";\n\n    @Bean\n    Object atmospherePolicyPlaneLoader(AtmosphereFramework framework) throws IOException {\n        var resource = new ClassPathResource(POLICY_FILE);\n        if (!resource.exists()) return List.of();\n        try (var in = resource.getInputStream()) {\n            var policies = new YamlPolicyParser().parse(\n                    \"classpath:\" + POLICY_FILE, in);\n            framework.getAtmosphereConfig().properties()\n                    .put(GovernancePolicy.POLICIES_PROPERTY, policies);\n            return policies;\n        }\n    }\n}\n```\n\n`AtmosphereAiAutoConfiguration` also bridges Spring-managed `GovernancePolicy` beans onto `POLICIES_PROPERTY` automatically — so custom-coded policies work by dropping an `@Component` bean into the context.\n\nFor non-Spring deployments, register a `GovernancePolicy` `ServiceLoader` entry at `META-INF/services/org.atmosphere.ai.governance.GovernancePolicy`.\n\n---\n\n## Admin HTTP surface\n\nAll three endpoints are exposed by `AtmosphereAdminEndpoint` (Spring Boot) once `atmosphere-admin` is on the classpath. Wire-compatible with Microsoft Agent Governance Toolkit's `PolicyProviderHandler` ASGI app.\n\n### `GET /api/admin/governance/policies`\n\n```json\n[\n  {\n    \"name\": \"customer-pii-guard\",\n    \"source\": \"classpath:atmosphere-policies.yaml\",\n    \"version\": \"1.0\",\n    \"className\": \"org.atmosphere.ai.governance.GuardrailAsPolicy\"\n  }\n]\n```\n\nReports runtime-confirmed state only (Correctness Invariant #5, Runtime Truth) — the list reflects what `AiEndpointProcessor` will actually apply on a turn, not what the YAML file or Spring beans might intend.\n\n### `GET /api/admin/governance/summary`\n\n```json\n{ \"policyCount\": 2, \"sources\": [\"classpath:atmosphere-policies.yaml\"] }\n```\n\n### `POST /api/admin/governance/check`\n\nWire-compatible with MS's `POST /check`. Payload:\n\n```json\n{ \"agent_id\": \"agent-a\", \"action\": \"call_tool\", \"context\": { \"tool_name\": \"delete_database\" } }\n```\n\nResponse:\n\n```json\n{\n  \"allowed\": false,\n  \"decision\": \"deny\",\n  \"reason\": \"Destructive action: deleting databases is never allowed\",\n  \"matched_policy\": \"production-policy\",\n  \"matched_source\": \"classpath:atmosphere-policies.yaml\",\n  \"evaluation_ms\": 3.27\n}\n```\n\nExternal gateways (Envoy, Kong, Azure APIM) that already speak to MS's ASGI policy provider can point at this endpoint to use Atmosphere as the decision service without code changes.\n\n### `GET /api/admin/governance/health`\n\nOperator snapshot: kill-switch state, dry-run counters, SLO status, and\nper-policy hash fingerprints for supply-chain drift detection.\n\n```json\n{\n  \"generatedAt\": \"2026-04-23T20:45:00Z\",\n  \"killSwitch\": { \"armed\": false },\n  \"policies\": [\n    { \"name\": \"scope.support\", \"source\": \"yaml:...\", \"version\": \"1\",\n      \"digest\": \"sha256:458be9dba...\" }\n  ],\n  \"dryRuns\": [], \"slos\": []\n}\n```\n\n### `GET /api/admin/governance/agt-verify`\n\nCompliance export shaped for Microsoft's `agt verify` CLI — 25 findings\nspanning OWASP Agentic Top 10 + EU AI Act / HIPAA / SOC2. External\nprocurement tooling that already consumes MS's compliance package format\ncan round-trip this output.\n\n```json\n{\n  \"schemaVersion\": \"agt-verify/1\",\n  \"findings\": [\n    { \"framework\": \"OWASP_AGENTIC_TOP_10\", \"controlId\": \"A01\",\n      \"title\": \"Goal Hijacking\", \"status\": \"COVERED\",\n      \"evidence\": [\n        { \"class\": \"org.atmosphere.ai.annotation.AgentScope\",\n          \"test\":  \"org.atmosphere.ai.governance.scope.RuleBasedScopeGuardrailTest\",\n          \"consumerGrep\": \"@AgentScope\" }\n      ]\n    }\n  ],\n  \"summary\": { \"OWASP_AGENTIC_TOP_10\": { \"COVERED\": 9, \"NOT_ADDRESSED\": 1 } }\n}\n```\n\nThe `EvidenceConsumerGrepPinTest` CI gate walks `modules/**/src/main` +\n`samples/**/src/main` and asserts every non-blank `consumerGrep` pattern\nfinds a production caller — claimed coverage can't drift.\n\n### `POST /api/admin/governance/kill-switch/arm`\n\nBreak-glass — halts every admission decision without a redeploy.\n\n```bash\ncurl -X POST http://localhost:8080/api/admin/governance/kill-switch/arm \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"reason\":\"incident-42\",\"operator\":\"oncall\"}'\n```\n\nResponse stamps `{armed: true, reason, operator, armedAt}`. Disarm with\n`POST /kill-switch/disarm` to restore traffic. Verified live on\nspring-boot-multi-agent-startup-team: the same prompt that admitted at\n0.11ms denies at 0.09ms while armed.\n\n### `POST /api/admin/governance/reload`\n\nHot-reload a policy wrapped in `SwappablePolicy`. Request body carries\n`{swapName, yaml}`; response carries the outgoing + incoming delegate\nidentity so the admin trail can log the swap.\n\n---\n\n## Multi-agent governance\n\nSingle-endpoint admission is only half the story — cross-agent dispatches\nneed the same enforcement. `FleetInterceptor` (module `atmosphere-coordinator`)\ngates every outbound `AgentCall` before it leaves the coordinator.\n\n### `FleetInterceptor` SPI\n\n```java\n@FunctionalInterface\npublic interface FleetInterceptor {\n    Decision before(AgentCall call);\n    sealed interface Decision {\n        record Proceed() implements Decision {}\n        record Rewrite(AgentCall modifiedCall) implements Decision {}\n        record Deny(String reason) implements Decision {}\n    }\n}\n```\n\nInstall via `AgentFleet.withInterceptor(interceptor)`. Denies synthesize\na failed `AgentResult` without consuming the transport hop; rewrites\nforward modified args; proceed admits unchanged.\n\n### `GovernanceFleetInterceptor`\n\nBridge from `FleetInterceptor` to a `GovernancePolicy` chain. Every outbound\n`AgentCall` is synthesized into an `AiRequest(skill + args)` and evaluated\nagainst the configured policies. Dispatch-edge metadata\n(`fleet.dispatch.agent`, `fleet.dispatch.skill`) is stamped so policies\ncan inspect the dispatch target.\n\n```java\n@Prompt\npublic void onPrompt(String msg, AgentFleet fleet, StreamingSession s) {\n    var governed = fleet.withInterceptor(new GovernanceFleetInterceptor(policies));\n    var research = governed.agent(\"research\").call(\"web_search\", args);\n    // a coordinator mistakenly dispatching \"write Python\" to research\n    // gets denied at the fleet boundary — not just at the user entry\n}\n```\n\n### Commitment records on cross-agent dispatch\n\nEvery dispatch emits a W3C Verifiable-Credential-subtype `CommitmentRecord`\nwhen both (a) an `Ed25519CommitmentSigner` is installed on the fleet via\n`JournalingAgentFleet.signer(signer)`, and (b) `CommitmentRecordsFlag`\nis enabled (flag-off default; flip with the system\nproperty `atmosphere.ai.governance.commitment-records.enabled=true` or\n`CommitmentRecordsFlag.override(Boolean.TRUE)`).\n\n```java\n// In your Spring @Configuration:\n@Bean CommitmentSigner commitmentSigner() {\n    return Ed25519CommitmentSigner.generate();\n}\n@PostConstruct void enable() {\n    CommitmentRecordsFlag.override(Boolean.TRUE);\n}\n\n// In your coordinator's @Prompt:\nif (signer != null && fleet instanceof JournalingAgentFleet journaling) {\n    journaling.signer(signer).principal(\"user:\" + resource.uuid());\n}\n```\n\nRecords surface in the admin **Commitments** tab with Ed25519 verification\nstatus. This is the unique combination: streaming transport + durable\ncheckpoints + cryptographic audit trail that survives pause/resume.\n\n---\n\n## Which samples demonstrate which goals\n\n| Sample | MS YAML | Scope | Commitments | OWASP | E2E tests |\n|---|:-:|:-:|:-:|:-:|:-:|\n| [spring-boot-ms-governance-chat](../samples/spring-boot-ms-governance-chat/) | ✅ | ✅ | — | ✅ | — |\n| [spring-boot-ai-classroom](../samples/spring-boot-ai-classroom/) | ✅ | ✅ | — | — | 8 |\n| [spring-boot-multi-agent-startup-team](../samples/spring-boot-multi-agent-startup-team/) | ✅ | ✅ | ✅ | ✅ | 10 |\n| [spring-boot-checkpoint-agent](../samples/spring-boot-checkpoint-agent/) | — | — | ✅ | — | 3 |\n| [spring-boot-mcp-server](../samples/spring-boot-mcp-server/) | — | ✅ | — | ✅ | 7 |\n\nEach sample boots the real Spring Boot context in its e2e tests and\nasserts goal flows fire at runtime — no mocking at the governance seam.\nSee `StartupTeamGovernanceE2ETest`, `ClassroomGovernanceE2ETest`,\n`CheckpointGovernanceE2ETest`, `McpGovernanceE2ETest`.\n\n---\n\n## Correctness invariants honored\n\n| Invariant (see `.claude/CLAUDE.md`) | How it's honored |\n|---|---|\n| **#2 Terminal-path completeness** | Policy exceptions are fail-closed — any throw inside `evaluate()` becomes `Deny` |\n| **#5 Runtime truth** | `GovernanceController` reports `POLICIES_PROPERTY` contents; not what was requested, not what's on the classpath |\n| **#7 Mode parity** | `PolicyPlaneSourceParityTest` asserts YAML / programmatic / ServiceLoader sources yield identical admission decisions across Spring Boot + bare-JVM + Quarkus (SPI-level) |\n\nSpring vs Quarkus parity at the framework level: `AiEndpointProcessor.instantiatePolicies()` uses ServiceLoader + `POLICIES_PROPERTY` — both deployments hit the same merge path. The Spring auto-config just adds a bean-to-property bridge; Quarkus users put policies directly in framework properties via a build step or the same ServiceLoader path.\n\n---\n\n## Related\n\n- **Sample**: [`samples/spring-boot-ms-governance-chat/`](../samples/spring-boot-ms-governance-chat/) — ships a verbatim MS YAML policy and demonstrates every operator + action in a live chat gated by the built-in Atmosphere AI console.\n- **Reference**: [atmosphere.github.io `reference/governance.md`](https://atmosphere.github.io/docs/reference/governance/) — full API reference.\n- **Tutorial**: [atmosphere.github.io `tutorial/30-governance-policy-plane.md`](https://atmosphere.github.io/docs/tutorial/30-governance-policy-plane/) — walk-through from empty project to MS-YAML-enforced chat.\n- **Module README**: [`modules/ai/README.md`](../modules/ai/README.md#governance-policy-plane) — quick-start snippet + operator table.\n- **Microsoft Agent Governance Toolkit**: [github.com/microsoft/agent-governance-toolkit](https://github.com/microsoft/agent-governance-toolkit) — the upstream toolkit whose YAML schema Atmosphere consumes verbatim.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"9316:3BCC6:17FBB4:5EAB0D:6AB92EFA"},"text_sha256":"dc6748ac244c70a41f0811ce2b100a4b55b6c99d9e2d1d0a2972d4587a0342ef"},{"path":"SECURITY.md","size":455,"blob_sha":"e5bb2da3b99011891927623af37884856f8ed7ba","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nUse this section to tell people about which versions of your project are\ncurrently being supported with security updates.\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 4.0.x   | :white_check_mark: |\n| 3.1.x   | :white_check_mark: |\n| 2.7.x   | :white_check_mark: |\n| 2.6.x   | :white_check_mark: |\n| < 2.6   | :x:                |\n\n\n## Reporting a Vulnerability\n\nemail: jfarcand@apache.org\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"FB90:11316A:180371:5EB1D8:6AB92EFA"},"text_sha256":"91040376c162e09cb0a7a3fead58f244f17ac6c77de6e26390de8973555c2f30"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"alfredfrancis/ai-chatbot-framework","input_row":{"repository":"alfredfrancis/ai-chatbot-framework","url":"https://github.com/alfredfrancis/ai-chatbot-framework","name":"ai-chatbot-framework","owner":"alfredfrancis","description":"A python chatbot framework with Natural Language Understanding and Artificial Intelligence.","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2169,"issues":123,"created_at":"2016-12-16T19:10:56Z","updated_at":"2026-09-26T04:19:18Z","first_commit_at":"2016-05-12T05:37:23Z","last_commit_at":"2026-08-26T12:14:49Z","activity_months":123.47,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:04.832Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"alfredfrancis/ai-chatbot-framework","visibility":"public","created_at":"2016-12-16T19:10:56Z","updated_at":"2026-09-26T04:19:18Z","private":false,"fork":false,"archived":false,"stargazers_count":2169,"open_issues_count":11,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1298","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C2:6E5BD:17C3B57:1BEDF4A:6AB92EFC"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1297","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07B6:6C6ED:181B7D4:1C46A48:6AB92EFD"},"commit":{"sha":"f2400079714d94dd4f66bc035f9ed3368afdea61","url":"https://github.com/alfredfrancis/ai-chatbot-framework/commit/f2400079714d94dd4f66bc035f9ed3368afdea61","date":"2018-05-24T20:38:08Z","author_date":"2018-05-24T20:38:08Z","committer_date":"2018-05-24T20:38:08Z","tree_sha":"c97098fd38a32db578cb460f83e7cfca9155a50d","message_first_line":"added flask logger"},"tree_request_status":200,"tree_rate":{"github_remaining":"1296","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0832:73962:180093C:1C2BA72:6AB92EFD"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4022,"blob_sha":"2c17dac940f9a95de559034ca6931ed76cb232c2","priority":0}],"documents":[{"path":"README.md","size":4022,"blob_sha":"2c17dac940f9a95de559034ca6931ed76cb232c2","priority":0,"status":200,"text":"# IKY\n[![Join the chat at https://gitter.im/ai-chatbot-framework/Lobby](https://badges.gitter.im/ai-chatbot-framework/Lobby.svg)](https://gitter.im/ai-chatbot-framework/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/alfredfrancis/ai-chatbot-framework.svg?branch=master)](https://travis-ci.org/alfredfrancis/ai-chatbot-framework)\n### An AI Chatbot framework built in Python\n\n\n\nBuilding a chatbot can sound daunting, but it’s totally doable. IKY is an AI powered conversational dialog interface built in Python. With IKY it’s easy to create Natural Language conversational scenarios with no coding efforts whatsoever. The smooth UI makes it effortless to create and train conversations to the bot and it continuously gets smarter as it learns from conversations it has with people. IKY can live on any channel of your choice (such as Messenger, Slack etc.) by integrating it’s API with that platform.\n\nYou don’t need to be an expert at artificial intelligence to create an awesome chatbot that has artificial intelligence. With this basic project you can create an artificial intelligence powered chatting machine in no time.There may be scores of bugs. So feel free to contribute  via pull requests.\n\n![](https://image.ibb.co/eMJ9Wx/Screen_Shot_2018_04_28_at_1_45_28_PM.png)\n\n### Installation\n\n### Using docker-compose (Recommended) \n```sh\ndocker-compose build\ndocker-compose up -d\ndocker-compose exec iky_backend python manage.py init\n```\n\n### Using Docker\n```sh\n\n# build docker images\ndocker build -t iky_backend:2.0.0 .\ndocker build -t iky_gateway:2.0.0 frontend/.\n\n# start iky backend\ndocker run --name=iky_backend -e=\"APPLICATION_ENV=Production\" iky_backend:2.0.0\n\n# setup default intents\ndocker exec -it iky_backend python manage.py init\n\n# start iky gateway with frontend\ndocker run --name=iky_gateway --link iky_backend:iky_backend -p 8080:80 iky_gateway:2.0.0\n\n```\n\n### without docker\n\n#### backend\n\n* Setup Virtualenv and install python requirements\n```sh\nmake setup\n\nmake run_dev\n\nsource venv/bin/activate && python manage.py init\n```\n* Production\n```sh\nmake run_prod\n```\n\n#### frontend\n* Development\n```sh\ncd frontend\nnpm install\nng serve\n```\n* Production\n```sh\ncd frontend\nng build --prod --environment=python\n```\nserve files in dist/ folder using nginx or any webserver\n\n### Heroku\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\n* add your dev/production configurations in config.py\n\n### DB\n\n#### Restore\nYou can import some default intents using follwing steps\n\n- goto http://localhost:8080/agent/default/settings\n- click 'choose file'\n- choose 'examples/default_intents.json file'\n- click import\n\n### Screenshots\n\n![](https://image.ibb.co/i9ReWx/Screen_Shot_2018_04_28_at_1_38_15_PM.png)\n---\n![](https://image.ibb.co/ivXKWx/Screen_Shot_2018_04_28_at_1_38_36_PM.png)\n---\n![](https://image.ibb.co/nf9Bdc/Screen_Shot_2018_04_28_at_1_38_57_PM.png)\n---\n![](https://image.ibb.co/b4q1dc/Screen_Shot_2018_04_28_at_1_43_06_PM.png)\n### Tutorial\n\nCheckout this basic tutorial on youtube,\n\n[![IMAGE ALT TEXT HERE](https://preview.ibb.co/fj9N3v/Screenshot_from_2017_04_05_03_11_04.png)](https://www.youtube.com/watch?v=S1Fj7WinaBA)\n\n\nWatch tutorial on [Fullfilling your Chatbot Intent with an API Call - Recipe Search Bot](https://www.youtube.com/watch?v=gqO69ojLobQ)\n\nPlease visit my [website](http://alfredfrancis.github.io) to see my personal chatbot in action\n\n### Todos\n *  Write Unit Tests\n *  PEP-8 compliance\n *  Word2Vec Integration\n *  NLTK to Spacy migration\n *  PyCRFSuite to sklearn-crfsuite migration\n *  Support follow up conversations\n \n ### Dependencies documentations\n* [NLTK documentation](www.nltk.org/)\n* [SKLearn documentation](http://scikit-learn.org/)\n* [CRFsuite documentation](http://www.chokkan.org/software/crfsuite/)\n* [python CRfSuite](https://python-crfsuite.readthedocs.io/en/latest/)\n\n**Free Software, Hell Yeah!**\n<hr><\/hr>\n\n_Made with :heart: at God's Own Country_.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C464:7A4F8:185016:5F0033:6AB92EFC"},"text_sha256":"5217e0470bb99eacb16d948dc6a9e5b1a4cfd1273ae0cdecc8891c85be9563d1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1295","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CE:7307A:17E410A:1C0F4D4:6AB92EFE"},"commit":{"sha":"5f57f99a66377f44c6b494cfc5491c2483250f09","url":"https://github.com/alfredfrancis/ai-chatbot-framework/commit/5f57f99a66377f44c6b494cfc5491c2483250f09","date":"2025-02-03T21:17:40Z","author_date":"2025-02-03T21:11:44Z","committer_date":"2025-02-03T21:17:40Z","tree_sha":"71c472d6d5bb0b2c5dba58075c77c77b3b1608ec","message_first_line":"document bot architecture (#195)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1294","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"088E:380E1C:17FC4B3:1C26E99:6AB92EFE"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2402,"blob_sha":"e4eb93048dfd7468ad5790a9270acf853125fdcd","priority":0}],"documents":[{"path":"README.md","size":2402,"blob_sha":"e4eb93048dfd7468ad5790a9270acf853125fdcd","priority":0,"status":200,"text":"<img src=\"https://i.ibb.co/vLR1wpG/logo.png\" width=\"280\"/>\n\n[![Join the chat at https://gitter.im/ai-chatbot-framework/Lobby](https://badges.gitter.im/ai-chatbot-framework/Lobby.svg)](https://gitter.im/ai-chatbot-framework/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://github.com/alfredfrancis/ai-chatbot-framework/actions/workflows/evaluate-backend.yml/badge.svg)](https://github.com/alfredfrancis/ai-chatbot-framework/actions/workflows/evaluate-backend.yml) [![Build Status](https://github.com/alfredfrancis/ai-chatbot-framework/actions/workflows/evaluate-frontend.yml/badge.svg)](https://github.com/alfredfrancis/ai-chatbot-framework/actions/workflows/evaluate-frontend.yml)\n\n\nAI Chatbot Framework is an open-source, self-hosted, DIY Chatbot building platform built in Python. With this tool, it’s easy to create Natural Language conversational scenarios with no coding efforts whatsoever. \nThe smooth UI makes it effortless to create and train conversations to the bot. AI Chatbot Framework can live on any channel of your choice (such as Messenger, Slack etc.).\n\nYou don’t need to be an expert at artificial intelligence to create an awesome chatbot that has AI capabilities. With this project you can create an AI powered chatbot in no time.  Read the [documentation](docs/README.md) to get started.\n\n![](docs/screenshots/admin_chat_screenshot.png)\n\n## Features\n- Fully Self-Hosted\n- Low-Code, DIY Admin Dashboard for Bot Development\n- Multi-turn Conversations\n- API request fulfilment (Tool Calling)\n- Persistent Memory & Context Management\n- Advanced Natural Language Understanding (NLU)\n  - Spacy Word Embeddings\n  - Intent Recognition (ML)\n  - Entity Extraction (ML)\n  - Zero shot NLU using Large Language Models (LLMs)\n- Knowledge Base & FAQ answering using RAG (in development)\n- Conversation Logs\n- Channel Integrations\n  - Web via REST API/Chat Snippet\n  - Facebook Messenger\n  - Slack (coming soon)\n  - WhatsApp via Twilio (coming soon)\n\n### Documentation\n\nCheck out our [documentation](docs/README.md) to get started.\n\n### Tech Stack\n\n - Python / FastAPI / Pydantic\n - MongoDB / Motor\n - React / NextJS\n - scikit-learn / Tensorflow / Keras\n - Spacy / python-crfsuite\n - Docker / docker-compose / Kubernetes / Helm\n\n### Contributing\n\nWant to contribute? Check out our [contribution guidelines](CONTRIBUTING.md).\n\n<hr><\/hr>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13BC:1A3D83:189163:5F41CC:6AB92EFA"},"text_sha256":"945ef3fb8143cd4036ef75b78c34058609f2a8081b45a7198fe9565d0476aeb9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"lmbelo/pyscripter","input_row":{"repository":"lmbelo/pyscripter","url":"https://github.com/lmbelo/pyscripter","name":"pyscripter","owner":"lmbelo","description":"Pyscripter is a feature-rich but lightweight Python IDE","language":"Pascal","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":1251,"issues":1241,"created_at":"2015-08-24T16:15:19Z","updated_at":"2026-09-23T06:09:11Z","first_commit_at":"2006-09-19T02:47:39Z","last_commit_at":"2025-11-24T20:01:29Z","activity_months":230.18000000000001,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:07.355Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"lmbelo/pyscripter","visibility":"public","created_at":"2015-08-24T16:15:19Z","updated_at":"2026-09-23T06:09:11Z","private":false,"fork":false,"archived":false,"stargazers_count":1251,"open_issues_count":50,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1293","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0879:2BC4E5:184F3A7:1C7A8F0:6AB92EFF"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1292","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BA:71C58:17E2627:1C0E14B:6AB92EFF"},"commit":{"sha":"15ebcea700c653e88ea7e08d86c511a6f0f356af","url":"https://github.com/lmbelo/pyscripter/commit/15ebcea700c653e88ea7e08d86c511a6f0f356af","date":"2018-05-24T22:13:30Z","author_date":"2018-05-24T22:13:30Z","committer_date":"2018-05-24T22:13:30Z","tree_sha":"6cb46673e8595c31eede885e4b62f4b55ec1d48d","message_first_line":"#879"},"tree_request_status":200,"tree_rate":{"github_remaining":"1291","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0846:72727:17D6D80:1C0250C:6AB92F00"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":717,"blob_sha":"89cf8d736ca1e253357279321a54b2dc4992a076","priority":0}],"documents":[{"path":"README.md","size":717,"blob_sha":"89cf8d736ca1e253357279321a54b2dc4992a076","priority":0,"status":200,"text":"PyScripter is a free and open-source  Python Integrated Development\nEnvironment (IDE) created with the ambition to become competitive in\nfunctionality with commercial Windows-based IDEs available for other\nlanguages.\n\n* [![Download PyScripter](https://img.shields.io/sourceforge/dt/pyscripter.svg)](https://sourceforge.net/projects/pyscripter/files/)\n* [Features](https://github.com/pyscripter/pyscripter/wiki/Features)\n* [Screenshots](https://github.com/pyscripter/pyscripter/wiki/Screenshots)\n* [Blog](https://pyscripter.blogspot.com/)\n* [Support](https://groups.google.com/forum/#!forum/pyscripter)\n\nLicence: MIT\n\n![Screenshot](https://raw.githubusercontent.com/wiki/pyscripter/pyscripter/images/CodeFolding.jpg)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6BCE:386840:188141:5F3163:6AB92EFE"},"text_sha256":"e9b2c220b187a9f3ad368177e1dd0b6749d4eaf51a8ade07f621bf6a591caec1"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1290","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0791:78367:183B2A7:1C667BA:6AB92F00"},"commit":{"sha":"7b571704f478a8ea17d7eac9394fa2ac48eb53e7","url":"https://github.com/lmbelo/pyscripter/commit/7b571704f478a8ea17d7eac9394fa2ac48eb53e7","date":"2025-11-24T20:01:29Z","author_date":"2025-11-24T20:01:29Z","committer_date":"2025-11-24T20:01:29Z","tree_sha":"1f049458c5cf3f734d184ce2a0d5f15c3cfb2098","message_first_line":"Merge pull request #1495 from pyscripter/translations_locale-default-pot--master_fr"},"tree_request_status":200,"tree_rate":{"github_remaining":"1289","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"090C:14A1F2:1839D78:1C65777:6AB92F01"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":1176,"blob_sha":"5c960d22ee4477d73ed483b1bddcd0652c418e8f","priority":0}],"documents":[{"path":"README.md","size":1176,"blob_sha":"5c960d22ee4477d73ed483b1bddcd0652c418e8f","priority":0,"status":200,"text":"PyScripter is a free and open-source  Python Integrated Development\nEnvironment (IDE) created with the ambition to become competitive in\nfunctionality with commercial Windows-based IDEs available for other\nlanguages.\n\n [![Download PyScripter](https://img.shields.io/sourceforge/dt/pyscripter.svg)](https://sourceforge.net/projects/pyscripter/files/)\n [![paypal](https://img.shields.io/badge/Donate-PayPal-brightgreen.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SX9B6G2GF5K4U)\n\n* [Download](https://sourceforge.net/projects/pyscripter/files/)  \n* [Features](https://github.com/pyscripter/pyscripter/wiki/Features)\n* [LLM-assisted coding](https://github.com/pyscripter/pyscripter/wiki/LLM_Support)\n* [Screenshots](https://github.com/pyscripter/pyscripter/wiki/Screenshots)\n* [Video tutorials](https://github.com/pyscripter/pyscripter/wiki/Videos)\n* [Blog](https://pyscripter.blogspot.com/)\n* [Support](https://github.com/pyscripter/pyscripter/discussions)\n* [Licence: MIT](https://github.com/pyscripter/pyscripter/blob/master/LICENSE)\n\n![Screenshot](https://raw.githubusercontent.com/wiki/pyscripter/pyscripter/images/PyScripter_main_window.png)\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2E4E:3AC15:18275F:5ED62D:6AB92F00"},"text_sha256":"206c3e751b7c17ef48328b75ba870cb3b5d0a49c34b2c4f3dba5abcbd9db1b6f"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"codelibs/fess","input_row":{"repository":"codelibs/fess","url":"https://github.com/codelibs/fess","name":"fess","owner":"codelibs","description":"Open-source, self-hosted enterprise & site search server built on OpenSearch. Crawls web / file / DB / cloud sources, 20+ languages, REST API, and AI/RAG & semantic search. Apache-2.0.","language":"Java","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1138,"issues":2585,"created_at":"2013-09-13T04:50:05Z","updated_at":"2026-09-27T06:02:29Z","first_commit_at":"2013-09-13T04:50:05Z","last_commit_at":"2026-09-27T06:02:24Z","activity_months":156.44,"ai_ml_match_topics":"llm","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:10.566Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"codelibs/fess","visibility":"public","created_at":"2013-09-13T04:50:05Z","updated_at":"2026-09-27T06:02:29Z","private":false,"fork":false,"archived":false,"stargazers_count":1138,"open_issues_count":15,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1288","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0897:8656E:17F553E:1C20AD1:6AB92F02"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1287","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08FA:380E1C:17FC7A9:1C271F8:6AB92F03"},"commit":{"sha":"4862e26ffa5126fc9e899cd23d1bedba3510b46d","url":"https://github.com/codelibs/fess/commit/4862e26ffa5126fc9e899cd23d1bedba3510b46d","date":"2018-05-24T05:25:26Z","author_date":"2018-05-24T05:25:26Z","committer_date":"2018-05-24T05:25:26Z","tree_sha":"5c05c33980dfcada2a39db3a4ef975403f66d8aa","message_first_line":"[WIP] Admin API Test: searchlist #1054"},"tree_request_status":200,"tree_rate":{"github_remaining":"1286","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AF:2BC4E5:184F64C:1C7AC0C:6AB92F03"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4727,"blob_sha":"09668cf9708f1ed8bed23151d45dcf121fd8b25e","priority":0}],"documents":[{"path":"README.md","size":4727,"blob_sha":"09668cf9708f1ed8bed23151d45dcf121fd8b25e","priority":0,"status":200,"text":"Enterprise Search Server: Fess [![Build Status](https://travis-ci.org/codelibs/fess.svg?branch=master)](https://travis-ci.org/codelibs/fess)\n====\n\n## Overview\n\nFess is very powerful and easily deployable Enterprise Search Server.\nYou can install and run Fess quickly on any platforms, which have Java runtime environment.\nFess is provided under Apache license.\n\nFess is Elasticsearch based search server, but knowledge/experience about Elasticsearch is NOT needed because of All-in-One Enterprise Search Server.\nFess provides Administration GUI to configure the system on your browser.\nFess also contains a crawler, which can crawl documents on Web/FileSystem/DB and supports many file formats, such as MS Office, pdf and zip.\n\nFor Site Search feature, see [FSS JS Genertor](https://fss-generator.codelibs.org/docs/manual).\nFess Site Search is Google Site Search alternative.\n\n## Web Sites\n\n[fess.codelibs.org](http://fess.codelibs.org/)\n\n## Issues/Questions\n\nPlease check filed [questions](https://github.com/codelibs/fess/issues?q=label%3Aquestion), and then file an [issue](https://github.com/codelibs/fess/issues \"issue\") if not filed.\n\n## Getting Started\n\n### Download\n\nFess 12.1 is available.\nThe release page is [HERE](https://github.com/codelibs/fess/releases \"download\").\n\n### Install/Run Fess\n\n    $ unzip fess-12.1.x.zip\n    $ cd fess-12.1.x\n    $ ./bin/fess\n\nFor the details, see [Installation Guide](http://fess.codelibs.org/11.3/install/index.html).\n\n### Access Fess\n\n- Search UI: http://localhost:8080/\n\n![Search UI](http://fess.codelibs.org/_images/fess_search_result1.png)\n\n- Admin UI: http://localhost:8080/admin/ (username/password is admin/admin)\n\n![Admin UI](http://fess.codelibs.org/_images/fess_admin_dashboard.png)\n\nYou can register crawling targets on Web/File System/Data Store of admin pages, and then start Crawler on Scheduler page manually.\n\n## Fess on Docker Hub\n\nWe provide Docker image on Docker Hub.\nFor more details, see [Public Repository](https://hub.docker.com/r/codelibs/fess/).\n\n## Migration from Other Systems\n\nPlease see [MIGRATION.md](https://github.com/codelibs/fess/blob/master/MIGRATION.md).\n\n## X-Pack Support\n\nPlease see [fess-xpack](https://github.com/codelibs/fess-xpack).\n\n## Localization\n\n### Japanese\n\n - [Web Site](http://fess.codelibs.org/ja/)\n\n### Korean\n\n - [PDF Document](https://github.com/nocode2k/fess/releases/download/11.0.1-ko/Fess-ko_11.0.1_manual.pdf)\n - [Forum](https://github.com/nocode2k/fess-kr-forum)\n\n## Development Information\n\n### Get Source Code\n\nFirst of all, clone Fess's repository:\n\n    $ cd ~/workspace\n    $ git clone https://github.com/codelibs/fess.git\n\nand then import it as Maven project on Eclipse or other IDE.\n\n### Setup for Elasticsearch Plugins\n\nRun antrun:run to download plugins into plugins directory:\n\n    $ mvn antrun:run\n\n### Run Fess\n\nRun or debug org.codelibs.fess.FessBoot on IDE, and then access http://localhost:8080/\n\n### Build Package\n\nRun package goal and then the release file is created in target/releases.\n\n    $ mvn package\n    $ mvn rpm:rpm   # .rpm package\n    $ mvn jdeb:jdeb # .deb package\n\n### Generate Source Code\n\n    $ mvn dbflute:download # (one time command)\n    $ mvn dbflute:freegen\n    $ mvn license:format\n\n### Integration Tests\n\nLaunch Fess Server and run the following command:\n\n    $ mvn test -P integrationTests -Dtest.fess.url=\"http://localhost:8080\" -Dtest.es.url=\"http://localhost:9201\"\n\n### Translate In Your Language\n\nFess is internationalized software.\n\nIf you want to add labels/messages for your language, please translate properties file and then rename to fess\\_\\*\\_[lang].properties.\n\n* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)\n* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)\n\nFor search/index analyzer, if [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contains lang\\_[lang] for your language, please modify analyzer for your language. For more details about elasticsearch's analyzer, see [Analyzers](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html).\n\nWe are waiting for pull requests of your language.\n\n## Powered By\n\n* [Lasta Di](https://github.com/lastaflute/lasta-di \"Lasta Di\"): DI Container\n* [LastaFlute](https://github.com/lastaflute/lastaflute \"LastaFlute\"): Web Framework\n* [Lasta Job](https://github.com/lastaflute/lasta-job \"Lasta Job\"): Job Scheduler\n* [Fess Crawler](https://github.com/codelibs/fess-crawler \"Fess Crawler\"): Web Crawler\n* [Elasticsearch](https://github.com/elastic/elasticsearch \"Elasticsearch\"): Search Engine\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5010:B08CF:176F90:5E206E:6AB92F04"},"text_sha256":"4d5365ad0cd357eebde37f8341b59f8df7ad2c994f412e65f56fd822797ee681"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1285","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08AD:6E4BB:1828FD1:1C541D8:6AB92F04"},"commit":{"sha":"7c651bd93a53a89ce6dfde95386db154f96e2890","url":"https://github.com/codelibs/fess/commit/7c651bd93a53a89ce6dfde95386db154f96e2890","date":"2026-06-25T13:54:35Z","author_date":"2026-06-25T13:54:35Z","committer_date":"2026-06-25T13:54:35Z","tree_sha":"a1200cd0347dc01ae681427594439bc9f35ebd6f","message_first_line":"Forward advanced-search link state when query is empty (bootstrap theme) (#3177)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1284","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B7:74C18:1834B5D:1C607E1:6AB92F05"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7992,"blob_sha":"5f4e36a411669f41526c5185d7096f074acc30bd","priority":0}],"documents":[{"path":"README.md","size":7992,"blob_sha":"5f4e36a411669f41526c5185d7096f074acc30bd","priority":0,"status":200,"text":"# Fess: Enterprise Search Server\n[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)\n![GitHub Release](https://img.shields.io/github/v/release/codelibs/fess)\n\n\n## Overview\n\nFess is a very powerful and easily deployable Enterprise Search Server. You can quickly install and run Fess on any platform where you can run the Java Runtime Environment. Fess is provided under the [Apache License 2.0](LICENSE).\n\nFess is based on [OpenSearch](https://github.com/opensearch-project/OpenSearch), but knowledge/experience about OpenSearch is _not_ required. Fess provides an easy to use Administration GUI to configure the system via your browser.\nFess also contains a Crawler, which can crawl documents on a [web server](https://fess.codelibs.org/15.6/admin/webconfig-guide.html), [file system](https://fess.codelibs.org/15.6/admin/fileconfig-guide.html), or [Data Store](https://fess.codelibs.org/15.6/admin/dataconfig-guide.html) (such as a CSV or database). Many file formats are supported including (but not limited to): Microsoft Office, PDF, and zip.\n\n*[Fess Site Search](https://github.com/codelibs/fess-site-search)* is a free alternative to [Google Site Search](https://enterprise.google.com/search/products/gss.html). For more details, see the [FSS JS Generator documentation](https://fss-generator.codelibs.org/docs/manual).\n\n## Website\n\n[fess.codelibs.org](https://fess.codelibs.org/)\n\n## Issues/Questions\n\n[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)\n\n## Getting Started\n\nThere are 2 ways to try Fess. The first is to download and install yourself. The second is to use [Docker](https://www.docker.com/products/docker-engine).\n\n### Download and Install/Run\n\nFess 15.6 is now available and can be downloaded on the [Releases page](https://github.com/codelibs/fess/releases \"download\"). Downloads come in 3 flavors: deb, rpm, zip.\n\nThe following commands show how to use the zip download:\n\n    $ unzip fess-15.6.x.zip\n    $ cd fess-15.6.x\n    $ ./bin/fess\n\nFor more details, see the [Installation Guide](https://fess.codelibs.org/15.6/install/index.html).\n\n### Docker\n\nWe provide Docker images on [ghcr.io](https://github.com/orgs/codelibs/packages). We also provide a Docker Compose (YAML) file in [this repository](https://github.com/codelibs/docker-fess/tree/master/compose). \n\n### Browser UI\n\n- Search UI: http://localhost:8080/\n\n![Search UI](https://fess.codelibs.org/_images/fess_search_result1.png)\n\n- Admin UI: http://localhost:8080/admin/ (default username/password is admin/admin)\n\n![Admin UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)\n\nYou can register crawling targets in the Admin UI on the (Web, File, Data Store) crawler configuration pages, and then start the Crawler manually on the [Scheduler page](https://fess.codelibs.org/15.6/admin/scheduler-guide.html).\n\n## Migration from another search provider\n\nPlease see [MIGRATION.md](MIGRATION.md).\n\n## Data Store\n\nCurrently, Fess supports crawling the following [storage locations and APIs](https://fess.codelibs.org/15.6/admin/dataconfig-guide.html):\n\n - [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)\n - [Box](https://github.com/codelibs/fess-ds-box)\n - [CSV](https://github.com/codelibs/fess-ds-csv)\n - [Database](https://github.com/codelibs/fess-ds-db)\n - [Dropbox](https://github.com/codelibs/fess-ds-dropbox)\n - [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)\n - [Git](https://github.com/codelibs/fess-ds-git)\n - [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)\n - [G Suite](https://github.com/codelibs/fess-ds-gsuite)\n - [JSON](https://github.com/codelibs/fess-ds-json)\n - [Office 365](https://github.com/codelibs/fess-ds-office365)\n - [S3](https://github.com/codelibs/fess-ds-s3)\n - [Salesforce](https://github.com/codelibs/fess-ds-salesforce)\n - [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)\n - [Slack](https://github.com/codelibs/fess-ds-slack)\n\n## Theme\n\n - [Simple](https://github.com/codelibs/fess-theme-simple)\n - [Classic](https://github.com/codelibs/fess-theme-classic)\n\n## Ingest\n\n - [Logger](https://github.com/codelibs/fess-ingest-logger)\n - [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)\n\n## Script\n\n - [Groovy](https://github.com/codelibs/fess-script-groovy)\n - [OGNL](https://github.com/codelibs/fess-script-ognl)\n\n## Development Information\n\n### Get Source Code\n\n1. Clone Fess's repository:\n    ```\n    $ cd ~/workspace\n    $ git clone https://github.com/codelibs/fess.git\n    ```\n    \n2. Import the cloned repository as a [Maven](https://maven.apache.org/) project on [Eclipse](https://www.eclipse.org/eclipseide/) or another IDE.\n\n### Setup for OpenSearch Plugins\n\nRun antrun:run to download plugins into the plugins directory:\n\n    $ mvn antrun:run\n\n### Run Fess\n\nRun or debug org.codelibs.fess.FessBoot on your IDE, and then access http://localhost:8080/\n\n### Build Package\n\nRun the `package` goal and then the release file will be created in target/releases.\n\n    $ mvn package\n    $ mvn rpm:rpm   # .rpm package\n    $ mvn jdeb:jdeb # .deb package\n\n### Generate Source Code\n\n    $ mvn dbflute:download # (one time command)\n    $ mvn dbflute:freegen\n    $ mvn license:format\n\n### Integration Tests\n\nIntegration tests require a running Fess server with OpenSearch. Follow these steps:\n\n#### 1. Build Fess\n\n    $ mvn antrun:run  # Download OpenSearch plugins (if not done)\n    $ mvn package     # Build the package\n\n#### 2. Start Fess Server\n\n    $ unzip target/releases/fess-*.zip\n    $ ./fess-*/bin/fess &\n\nWait for Fess to be ready (this may take up to 60 seconds):\n\n    $ curl -s \"http://localhost:8080/api/v1/health\"\n\nYou should see a JSON response when Fess is ready.\n\n#### 3. Clone Test Data\n\nRequired for SearchApiTests:\n\n    $ git clone https://github.com/codelibs/fess-testdata.git /tmp/fess-testdata\n\n#### 4. Run Integration Tests\n\n    $ mvn test -P integrationTests -Dtest.fess.url=\"http://localhost:8080\" -Dtest.search_engine.url=\"http://localhost:9201\"\n\nTo run a single test case:\n\n    $ mvn test -P integrationTests -Dtest.fess.url=\"http://localhost:8080\" -Dtest.search_engine.url=\"http://localhost:9201\" -Dtest=SearchApiTests\n\n### Translate In Your Language\n\nFess is internationalized software.\n\nIf you want to add labels/messages for your language, please translate properties file and then rename to fess\\_\\*\\_[lang].properties.\n\n* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)\n* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)\n\nFor search/index analyzer, if [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contains lang\\_[lang] for your language, please modify the analyzer for your language. For more details about Analyzers, see the [OpenSearch documentation](https://opensearch.org/docs/latest/analyzers/search-analyzers/).\n\nWe welcome pull requests for your language.\n\n### Translations\n\n- [日本語 (Japanese)](docs/ja/README.md)\n- [简体中文 (Simplified Chinese)](docs/zh-CN/README.md)\n- [Español (Spanish)](docs/es/README.md)\n- [Português (Brazilian Portuguese)](docs/pt-BR/README.md)\n- [Français (French)](docs/fr/README.md)\n- [Deutsch (German)](docs/de/README.md)\n- [한국어 (Korean)](docs/ko/README.md)\n\n## Powered By\n\n* [Lasta Di](https://github.com/lastaflute/lasta-di \"Lasta Di\"): DI Container\n* [LastaFlute](https://github.com/lastaflute/lastaflute \"LastaFlute\"): Web Framework\n* [Lasta Job](https://github.com/lastaflute/lasta-job \"Lasta Job\"): Job Scheduler\n* [Fess Crawler](https://github.com/codelibs/fess-crawler \"Fess Crawler\"): Web Crawler\n* [OpenSearch](https://opensearch.org/ \"OpenSearch\"): Search Engine\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BA58:3E1DA:17BF7E:5E7042:6AB92F04"},"text_sha256":"ee9e1364c48a2463a7d260806fe91051d1ec47e66f1ea4a008d57d4730028796"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"cfug/dio","input_row":{"repository":"cfug/dio","url":"https://github.com/cfug/dio","name":"dio","owner":"cfug","description":"A powerful HTTP client for Dart and Flutter, which supports global settings, Interceptors, FormData, aborting and canceling a request, files uploading and downloading, requests timeout, custom adapters, etc.","language":"Dart","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":12842,"issues":1877,"created_at":"2018-04-20T04:33:43Z","updated_at":"2026-09-25T23:42:14Z","first_commit_at":"2018-04-24T10:07:22Z","last_commit_at":"2026-09-04T02:46:12Z","activity_months":100.34999999999999,"ai_ml_match_topics":"transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:14.340Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"cfug/dio","visibility":"public","created_at":"2018-04-20T04:33:43Z","updated_at":"2026-09-25T23:42:14Z","private":false,"fork":false,"archived":false,"stargazers_count":12842,"open_issues_count":43,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1283","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0915:3C4024:182DEBF:1C59878:6AB92F06"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1282","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0912:37D6E2:1838659:1C641F4:6AB92F06"},"commit":{"sha":"f8a2caa2d93504b39ccbc3f8d822f2876eff696c","url":"https://github.com/cfug/dio/commit/f8a2caa2d93504b39ccbc3f8d822f2876eff696c","date":"2018-05-06T00:32:02Z","author_date":"2018-05-06T00:32:02Z","committer_date":"2018-05-06T00:32:02Z","tree_sha":"0ec706c6d0b7e5e93a30c671d7391557b12b8960","message_first_line":"add `path` type for get method"},"tree_request_status":200,"tree_rate":{"github_remaining":"1281","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0783:724D2:17F9A7C:1C253D9:6AB92F07"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17013,"blob_sha":"6156812249bd48a2501990a70646cfaf038af97e","priority":0}],"documents":[{"path":"README.md","size":17013,"blob_sha":"6156812249bd48a2501990a70646cfaf038af97e","priority":0,"status":200,"text":"# dio \n\n[![build statud](https://img.shields.io/travis/flutterchina/dio/master.svg?style=flat-square)](https://travis-ci.org/flutterchina/dio)\n[![Pub](https://img.shields.io/pub/v/dio.svg?style=flat-square)](https://pub.dartlang.org/packages/dio)\n[![coverage](https://img.shields.io/codecov/c/github/flutterchina/dio/master.svg?style=flat-square)](https://codecov.io/github/flutterchina/dio?branch=master)\n[![support](https://img.shields.io/badge/platform-flutter%7Cdart%20vm-ff69b4.svg?style=flat-square)](https://github.com/flutterchina/dio)\n\nA powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout etc. \n\n### Add dependency\n\n```yaml\ndependencies:\n  dio: ^0.0.6\n```\n\n## Super simple to use\n\n```dart\nimport 'package:dio/dio.dart';\nDio dio = new Dio();\nResponse<String> response=await dio.get(\"https://www.google.com/\");\nprint(response.data);\n```\n\n## Table of contents \n\n- [Examples](#examples)\n\n- [Dio APIs](#dio-apis)\n\n- [Request Options](#request-options)\n\n- [Response Schema](#response-schema)\n\n- [Interceptors](#interceptors)\n\n- [Handling Errors](#handling-errors)\n\n- [Using application/x-www-form-urlencoded format](#using-application/x-www-form-urlencoded-format)\n\n- [Sending FormData](#sending-formdata)\n\n- [Transformer](#transformer)\n\n- [Set proxy and HttpClient config](#set-proxy-and-httpclient-config)\n\n- [Cancellation](#cancellation)\n\n- [Cookie Manager](#cookie-manager)\n\n- [Features and bugs](#features-and-bugs)\n\n  ​\n\n## Examples\n\nPerforming a `GET` request:\n\n```dart\nResponse response;\nresponse=await dio.get(\"/test?id=12&name=wendu\")\nprint(response.data.toString());\n// Optionally the request above could also be done as\nresponse=await dio.get(\"/test\",data:{\"id\":12,\"name\":\"wendu\"})\nprint(response.data.toString());\n```\n\nPerforming a `POST` request:\n\n```dart\nresponse=await dio.post(\"/test\",data:{\"id\":12,\"name\":\"wendu\"})\n```\n\nPerforming multiple concurrent requests:\n\n```dart\nresponse= await Future.wait([dio.post(\"/info\"),dio.get(\"/token\")]);\n```\n\nDownloading a file:\n\n```dart\nresponse=await dio.download(\"https://www.google.com/\",\"./xx.html\")\n```\n\nSending FormData:\n\n```dart\nFormData formData = new FormData.from({\n   \"name\": \"wendux\",\n   \"age\": 25,\n});\nresponse = await dio.post(\"/info\", data: formData)\n```\n\nUploading multiple files to server by  FormData:\n\n```dart\nFormData formData = new FormData.from({\n   \"name\": \"wendux\",\n   \"age\": 25,\n   \"file1\": new UploadFileInfo(new File(\"./upload.txt\"), \"upload1.txt\")\n   \"file2\": new UploadFileInfo(new File(\"./upload.txt\"), \"upload2.txt\")\n});\nresponse = await dio.post(\"/info\", data: formData)\n```\n\n…you can find all examples code  [here](https://github.com/wendux/dio/tree/master/example).\n\n## Dio APIs\n\n### Creating an instance and set default configs.\n\nYou can create  instance of Dio with a optional `Options` object:\n\n```dart\nDio dio = new Dio; // with default Options\n\n// Set default configs\ndio.options.baseUrl=\"https://www.xx.com/api\" \ndio.options.connectTimeout = 5000; //5s\ndio.options.receiveTimeout=3000;  \n\n// or new Dio with a Options instance.\nOptions options= new Options(\n    baseUrl:\"https://www.xx.com/api\",\n    connectTimeout:5000,\n    receiveTimeout:3000\n);\nDio dio = new Dio(options);\n```\n\nThe core API in Dio instance is :\n\n**Future<Response> request(String path, {data, Options options,CancelToken cancelToken})**\n\n```dart\nresponse=await request(\"/test\", data: {\"id\":12,\"name\":\"xx\"}, new Options(method:\"GET\"));\n```\n\n### Request method aliases\n\nFor convenience aliases have been provided for all supported request methods.\n\n**Future<Response> get(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> post(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> put(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> delete(path, {data, Options options,CancelToken cancelToken})**\n\n**Future<Response> head(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> put(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> path(path, {data, Options options,CancelToken cancelToken})** \n\n**Future<Response> download(String urlPath, savePath,**\n    **{OnDownloadProgress onProgress, data, bool flush: false, Options options,CancelToken cancelToken})**\n\n\n## Request Options\n\nThese are the available config options for making requests.  Requests will default to `GET` if `method` is not specified.\n\n```dart\n{\n  /// Http method.\n  String method;\n\n  /// Request base url, it can contain sub path, like: \"https://www.google.com/api/\".\n  String baseUrl;\n\n  /// Http request headers.\n  Map<String, dynamic> headers;\n\n   /// Timeout in milliseconds for opening  url.\n  int connectTimeout;\n\n   ///  Whenever more than [receiveTimeout] (in milliseconds) passes between two events from response stream,\n  ///  [Dio] will throw the [DioError] with [DioErrorType.RECEIVE_TIMEOUT].\n  ///  Note: This is not the receiving time limitation.\n  int receiveTimeout;\n\n  /// Request data, can be any type.\n  T data;\n\n  /// If the `path` starts with \"http(s)\", the `baseURL` will be ignored, otherwise,\n  /// it will be combined and then resolved with the baseUrl.\n  String path=\"\";\n\n  /// The request Content-Type. The default value is [ContentType.JSON].\n  /// If you want to encode request body with \"application/x-www-form-urlencoded\",\n  /// you can set `ContentType.parse(\"application/x-www-form-urlencoded\")`, and [Dio]\n  /// will automatically encode the request body.\n  ContentType contentType;\n\n  /// [responseType] indicates the type of data that the server will respond with\n  /// options which defined in [ResponseType] are `JSON`, `STREAM`, `PLAIN`.\n  ///\n  /// The default value is `JSON`, dio will parse response string to json object automatically\n  /// when the content-type of response is \"application/json\".\n  ///\n  /// If you want to receive response data with binary bytes, for example,\n  /// downloading a image, use `STREAM`.\n  ///\n  /// If you want to receive the response data with String, use `PLAIN`.\n  ResponseType responseType;\n\n  /// Custom field that you can retrieve it later in [Interceptor]、[TransFormer] and the [Response] object.\n  Map<String, dynamic> extra;\n}\n```\n\nThere is a complete example [here](https://github.com/wendux/dio/tree/master/example/options.dart).\n\n## Response Schema\n\nThe response for a request contains the following information.\n\n```dart\n{\n  /// Response body. may have been transformed, please refer to [ResponseType].\n  T data;\n  /// Response headers.\n  HttpHeaders headers;\n  /// The corresponding request info.\n  Options request;\n  /// Http status code.\n  int statusCode;\n  /// Custom field that you can retrieve it later in `then`.\n  Map<String, dynamic> extra;\n}\n```\n\nWhen request  is succeed, you will receive the response as follows:\n\n```dart\nResponse response=await dio.get(\"https://www.google.com\");\nprint(response.data);\nprint(response.headers);\nprint(response.request);\nprint(statusCode);\n```\n\n## Interceptors\n\nEach Dio instance has a `RequestInterceptor` and a `ResponseInterceptor`, by which you can intercept requests or responses before they are handled by `then` or `catchError`.\n\n```dart\n dio.interceptor.request.onSend = (Options options){\n     // Do something before request is sent\n     return options; //continue\n     // If you want to resolve the request with some custom data，\n     // you can return a `Response` object or return `dio.resolve(data)`.\n     // If you want to reject the request with a error message, \n     // you can return a `DioError` object or return `dio.reject(errMsg)`    \n }\n dio.interceptor.response.onSuccess = (Response response) {\n     // Do something with response data\n     return response; // continue\n };\n dio.interceptor.response.onError = (DioError e){\n     // Do something with response error\n     return DioError;//continue\n }    \n```\n\nIf you may need to remove an interceptor later you can.\n\n```dart\ndio.interceptor.request.onSend=null;\ndio.interceptor.response.onSuccess=null;\ndio.interceptor.response.onError=null;\n```\n\n### Resolve and reject the request\n\nIn all  interceptors, you can interfere with thire execution flow.  If you want to resolve the request/response with some custom data， you can return a `Response` object or return `dio.resolve(data)`.  If you want to reject the request/response with a error message,  you can return a `DioError` object or return `dio.reject(errMsg)` . \n\n```dart\n dio.interceptor.request.onSend = (Options options){\n     return dio.resolve(\"fake data\")    \n }\n Response response= await dio.get(\"/test\");\n print(response.data);//\"fake data\"\n```\n\n### Supports Async tasks in Interceptors\n\nInterceptors not only support  synchronous tasks , but also supports asynchronous tasks, for example:\n\n```dart\n  dio.interceptor.request.onSend = (Options options) async{\n     //...If no token, request token firstly.\n     Response response = await dio.get(\"/token\");\n     //Set the token to headers \n     options.headers[\"token\"] = response.data[\"data\"][\"token\"];\n     return options; //continue   \n }\n```\n\n### Lock/unlock the interceptors\n\nyou can lock/unlock the interceptors by calling their `lock()`/`unlock` method. Once the request/response interceptor is locked, the incoming request/response will be added to a queue  before they enter the interceptor, they will not be continued until the interceptor is unlocked.\n\n```dart\ntokenDio=new Dio(); //Create a new instance to request the token.\ntokenDio.options=dio;\ndio.interceptor.request.onSend = (Options options) async{\n     // If no token, request token firstly and lock this interceptor\n     // to prevent other request enter this interceptor.\n     dio.interceptor.request.lock(); \n     // We use a new Dio(to avoid dead lock) instance to request token. \n     Response response = await tokenDio.get(\"/token\");\n     //Set the token to headers \n     options.headers[\"token\"] = response.data[\"data\"][\"token\"];\n     dio.interceptor.request.unlock() \n     return options; //continue   \n }\n```\n\n### aliases\n\nWhen the **request** interceptor is locked, the incoming request will pause, this is equivalent to we locked the current dio instance,  Therefore,  Dio provied the two aliases for the `lock/unlock` of **request** interceptors.\n\n**dio.lock() ==  dio.interceptor.request.lock()**\n\n**dio.unlock() ==  dio.interceptor.request.unlock()**\n\n\n\n### Example\n\nBecause of security reasons, we need all the requests to set up a csrfToken in the header, if csrfToken does not exist, we need to request a csrfToken first, and then perform the network request, because the request csrfToken progress is asynchronous, so we need to execute this async request in request interceptor. the code is as follows:\n\n```dart\ndio.interceptor.request.onSend = (Options options) {\n    print('send request：path:${options.path}，baseURL:${options.baseUrl}');\n    if (csrfToken == null) {\n      print(\"no token，request token firstly...\");\n      //lock the dio.\n      dio.lock();\n      return tokenDio.get(\"/token\").then((d) {\n        options.headers[\"csrfToken\"] = csrfToken = d.data['data']['token'];\n        print(\"request token succeed, value: \" + d.data['data']['token']);\n        print('continue to perform request：path:${options.path}，baseURL:${options.path}');\n        return options;\n      }).whenComplete(() => dio.unlock()); // unlock the dio\n    } else {\n      options.headers[\"csrfToken\"] = csrfToken;\n      return options;\n    }\n  };\n```\n\nFor complete codes click [here](https://github.com/wendux/dio/tree/master/example/interceptorLock.dart).\n\n## Handling Errors\n\nWhen a error occurs, Dio will wrap the `Error/Exception` to a `DioError`:\n\n```dart\n  try {\n    //404  \n    await dio.get(\"https://wendux.github.io/xsddddd\");\n   } on DioError catch(e) {\n      // The request was made and the server responded with a status code\n      // that falls out of the range of 2xx and is also not 304.\n      if(e.response) {\n        print(e.response.data) \n        print(e.response.headers) \n        print(e.response.request)    \n      } else{\n        // Something happened in setting up or sending the request that triggered an Error  \n        print(e.request)  \n        print(e.message)\n      }  \n  }\n```\n\n### DioError scheme\n\n```dart\n {\n  /// Response info, it may be `null` if the request can't reach to\n  /// the http server, for example, occurring a dns error, network is not available.\n  Response response;\n\n  /// Error descriptions.\n  String message;\n  \n  DioErrorType type;\n\n  /// Error stacktrace info\n  StackTrace stackTrace;\n}\n```\n\n### DioErrorType\n\n```dart\nenum DioErrorType {\n  /// Default error type, usually occurs before connecting the server.\n  DEFAULT,\n\n  /// When opening  url timeout, it occurs.\n  CONNECT_TIMEOUT,\n\n  ///  Whenever more than [receiveTimeout] (in milliseconds) passes between two events from response stream,\n  ///  [Dio] will throw the [DioError] with [DioErrorType.RECEIVE_TIMEOUT].\n  ///\n  ///  Note: This is not the receiving time limitation.\n  RECEIVE_TIMEOUT,\n\n  /// When the server response, but with a incorrect status, such as 404, 503...\n  RESPONSE,\n\n  /// When the request is cancelled, dio will throw a error with this type.\n  CANCEL\n}\n```\n\n\n\n## Using application/x-www-form-urlencoded format\n\nBy default, Dio serializes request data(except String type) to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can :\n\n```dart\n//Instance level\ndio.options.contentType=ContentType.parse(\"application/x-www-form-urlencoded\");\n//or works once\ndio.post(\"/info\",data:{\"id\":5}, options: new Options(contentType:ContentType.parse(\"application/x-www-form-urlencoded\")))    \n```\n\nThere is a  example [here](https://github.com/wendux/dio/tree/master/example/options.dart).\n\n## Sending FormData\n\nYou can also send FormData with Dio, which will send data in the `multipart/form-data`, and it supports upload files.\n\n```dart\nFormData formData = new FormData.from({\n    \"name\": \"wendux\",\n    \"age\": 25,\n    \"file\": new UploadFileInfo(new File(\"./example/upload.txt\"), \"upload.txt\")\n});\nresponse = await dio.post(\"/info\", data: formData)\n```\n\n> Note: Just the post method suppots FormData.\n\nThere is a complete example [here](https://github.com/wendux/dio/tree/master/example/formdata.dart).\n\n## Transformer\n\n`TransFormer` allows changes to the request/response data before it is sent/received to/from the server. This is only applicable for request methods 'PUT', 'POST', and 'PATCH'. Dio has already implemented a `DefaultTransformer`, and as the default `TransFormer`. If you want to custom the transformation of request/response data, you can provide a `TransFormer` by your self, and replace the `DefaultTransformer` by setting the `dio.transformer`.\n\nThere is example for [customing transformer](https://github.com/wendux/dio/blob/master/example/transformer.dart).\n\n## Set proxy and HttpClient config\n\nDio use HttpClient to send http request, so you can config the `dio.httpClient` to support `porxy`, for example:\n\n```dart\n  dio.onHttpClientCreate = (HttpClient client) {\n    client.findProxy = (uri) {\n      //proxy all request to localhost:8888\n      return \"PROXY localhost:8888\";\n    };\n  };\n```\n\nThere is a complete example [here](https://github.com/wendux/dio/tree/master/example/proxy.dart).\n\n## Cancellation\n\nYou can cancel a request using a *cancel token*.   One token can be shared with multiple requests.  when a token's  `cancel` method invoked, all requests with this token will be cancelled.\n\n```dart\nCancelToken token = new CancelToken();\ndio.get(url1, cancelToken: token);\ndio.get(url2, cancelToken: token);\n\n// cancel the requests with \"cancelled\" message.\ntoken.cancel(\"cancelled\");\n```\n\nThere is a complete example [here](https://github.com/wendux/dio/tree/master/example/cancelRequest.dart).\n\n## Cookie Manager\n\nYou can manage the request/response cookies using `cookieJar` .  \n\n> The dio cookie manage API is based on the withdrawn [cookie_jar](https://github.com/flutterchina/cookie_jar). \n\nYou can create a `CookieJar` or `PersistCookieJar` to manage cookies automaticlly, and dio use the  `CookieJar` by default, which saves the cookies **in RAM**. If you want to persists cookies,  you can use the `PersistCookieJar` class,  the example codes as follows:\n\n```dart\nvar dio = new Dio();\ndio.cookieJar=new PersistCookieJar(\"./cookies\");\n```\n\n`PersistCookieJar` is a cookie manager which implements the standard cookie policy declared in RFC. `PersistCookieJar` persists the cookies in files, so if the application exit, the cookies always exist unless call `delete` explicitly.\n\n\nMore details about [cookie_jar](https://github.com/flutterchina/)  see : https://github.com/flutterchina/cookie_jar .\n\n## Copyright & License\n\nThis open source project authorized by https://flutterchina.club , and the license is MIT.\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/wendux/dio/issues\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"708A:3B7E2:17343D:5DE5EB:6AB92F06"},"text_sha256":"e748f67e597c1942f77c8a4bd146e9da06cb4f56dcd286cc4745d2d0443e658c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1280","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FC:767EB:181F2A4:1C4B202:6AB92F08"},"commit":{"sha":"e11fef1d868b4022caeada16bac95b5f7d215b8d","url":"https://github.com/cfug/dio/commit/e11fef1d868b4022caeada16bac95b5f7d215b8d","date":"2026-06-29T13:29:30Z","author_date":"2026-06-29T13:29:30Z","committer_date":"2026-06-29T13:29:30Z","tree_sha":"cce19e217ea8f4ba0f8c42560587afc4a5a11a25","message_first_line":"🔖 dio v5.10.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1279","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BC:228A99:18140B0:1C3FB1B:6AB92F08"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2758,"blob_sha":"77ee74bf6a635b1aaaa450f62bac01faee4bbb96","priority":0},{"path":"COMPATIBILITY_POLICY.md","size":920,"blob_sha":"0a1b39bd83b64c7fa9529c6a29f95419cd593e37","priority":1},{"path":"SECURITY.md","size":240,"blob_sha":"b1b6e845c4a9b5647c0180cdd7044b3530258d33","priority":1}],"documents":[{"path":"README.md","size":2758,"blob_sha":"77ee74bf6a635b1aaaa450f62bac01faee4bbb96","priority":0,"status":200,"text":"# dio\n\nLanguage: English | [简体中文](README-ZH.md)\n\nThis is the base repo of the **dio** project.\nPlease move specific paths for project instructions.\n\n> Don't forget to add [#dio](https://pub.dev/packages?q=topic%3Adio)\n> topic to your published dio related packages!\n> See more: https://dart.dev/tools/pub/pubspec#topics\n\n## Versioning\n\n**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>\nSee the [Migration Guide][] for the complete breaking changes list.**\n\nTo know about our compatibility policy, see the [Compatibility Policy][] doc.\n\n[Migration Guide]: https://pub.dev/documentation/dio/latest/topics/Migration%20Guide-topic.html\n[Compatibility Policy]: COMPATIBILITY_POLICY.md\n\n## All Packages\n\n### dio\n\n- dio: [link](dio)\n  [![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio)\n\n### Plugins\n\n- cookie_manager: [link](plugins/cookie_manager)\n  [![Pub](https://img.shields.io/pub/v/dio_cookie_manager.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_cookie_manager)\n- compatibility_layer: [link](plugins/compatibility_layer)\n  [![Pub](https://img.shields.io/pub/v/dio_compatibility_layer.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_compatibility_layer)\n- http2_adapter: [link](plugins/http2_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_http2_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_http2_adapter)\n- native_dio_adapter: [link](plugins/native_dio_adapter)\n  [![Pub](https://img.shields.io/pub/v/native_dio_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/native_dio_adapter)\n- web_adapter: [link](plugins/web_adapter)\n  [![Pub](https://img.shields.io/pub/v/dio_web_adapter.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio_web_adapter)\n\n### Examples\n\n- example: [link](example_dart)\n- example_flutter_app: [link](example_flutter_app)\n\n## Copyright & License\n\nThe project and its underlying projects\nare originally authored by\n[@wendux](https://github.com/wendux)\nwith the organization\n[@flutterchina](https://github.com/flutterchina),\nstarted being maintained by\n[Chinese Flutter User Group (@cfug)](https://github.com/cfug)\nsince 2023.\n\nThe project consents [the MIT license](LICENSE).\n\n## Star History\n\n<a href=\"https://star-history.com/#cfug/dio&Date\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date&theme=dark\" />\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date\" />\n    <img alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=cfug/dio&type=Date\" />\n  <\/picture>\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"37C8:727CE:176D5C:5E1EAA:6AB92EF5"},"text_sha256":"3cc60265c1b244e4e13ea39d804b5e9695e1894d5b74a0389af4aff5c53dfe34"},{"path":"COMPATIBILITY_POLICY.md","size":920,"blob_sha":"0a1b39bd83b64c7fa9529c6a29f95419cd593e37","priority":1,"status":200,"text":"# Compatibility Policy\n\nAs an open-source project, all activities happened when the maintainers have spare time and energy.\nThe support range is limited due to the above condition.\nTherefore, we have a general compatibility policy to help people\nthat are not actively adapting SDK updates or intended to use any old SDKs to acknowledge the support range.\n\n## Policy Details\n\nFor all packages, the oldest Dart SDK we typically support\nis one that was **released less than 2 years ago**.\n\n### Exceptions\n\n- The minimum SDK version will follow the dependencies' requirement.\n  For example: `http2: ^2.1.0` requires Dart SDK >=3.0.0.\n- The implementation can no longer compatible between the latest and previous SDKs.\n- Previous SDKs have security issues that require to use a new version.\n\nTo raise your suggestions and reports, use the issue tracker\nor contact cfug-team@googlegroups.com if you want to do this privately.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0952:17E138:17C311:5E73C7:6AB92F06"},"text_sha256":"3aef0865f79682a6940643c252e349400014d10ff97c8d9d54f4d1766fe3e8ff"},{"path":"SECURITY.md","size":240,"blob_sha":"b1b6e845c4a9b5647c0180cdd7044b3530258d33","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version | Supported |\n|---------|-----------|\n| >=5.0   | ✅         |\n| < 5.0   | ❌         |\n\n## Reporting a Vulnerability\n\nContact cfug-team@googlegroups.com with your vulnerability report.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"31B8:349C76:17A09A:5E4DE1:6AB92F09"},"text_sha256":"f03f63c9b355c084fd9fee6a607b2f5b05452c84e22819846e4580a679e9e693"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"PaddlePaddle/PaddleSpeech","input_row":{"repository":"PaddlePaddle/PaddleSpeech","url":"https://github.com/PaddlePaddle/PaddleSpeech","name":"PaddleSpeech","owner":"PaddlePaddle","description":"Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":12689,"issues":2025,"created_at":"2017-11-14T12:36:30Z","updated_at":"2026-09-26T23:41:29Z","first_commit_at":"2017-05-22T13:01:41Z","last_commit_at":"2026-06-12T09:15:14Z","activity_months":108.67,"ai_ml_match_topics":"transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:17.943Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"PaddlePaddle/PaddleSpeech","visibility":"public","created_at":"2017-11-14T12:36:30Z","updated_at":"2026-09-26T23:41:29Z","private":false,"fork":false,"archived":false,"stargazers_count":12689,"open_issues_count":275,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1278","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0792:71F98:18610B1:1C8C67C:6AB92F09"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1277","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07CF:228A99:181421E:1C3FCC1:6AB92F0A"},"commit":{"sha":"0886a2beaa2715b952a5983b121e934eb113817b","url":"https://github.com/PaddlePaddle/PaddleSpeech/commit/0886a2beaa2715b952a5983b121e934eb113817b","date":"2018-05-24T05:39:39Z","author_date":"2018-05-24T05:39:39Z","committer_date":"2018-05-24T05:39:39Z","tree_sha":"991dd9faba8156c72beb83e4ca09c2db7114b2df","message_first_line":"Merge pull request #234 from kuke/fix_issues_link"},"tree_request_status":200,"tree_rate":{"github_remaining":"1276","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08C9:71E0C:181BD8B:1C46471:6AB92F0A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27740,"blob_sha":"6c92f1ec9a16482d56bfa36c5df3b69753b7e6d1","priority":0}],"documents":[{"path":"README.md","size":27740,"blob_sha":"6c92f1ec9a16482d56bfa36c5df3b69753b7e6d1","priority":0,"status":200,"text":"# DeepSpeech2 on PaddlePaddle\n\n*DeepSpeech2 on PaddlePaddle* is an open-source implementation of end-to-end Automatic Speech Recognition (ASR) engine, based on [Baidu's Deep Speech 2 paper](http://proceedings.mlr.press/v48/amodei16.pdf), with [PaddlePaddle](https://github.com/PaddlePaddle/Paddle) platform. Our vision is to empower both industrial application and academic research on speech recognition, via an easy-to-use, efficient and scalable implementation, including training, inference & testing module, distributed [PaddleCloud](https://github.com/PaddlePaddle/cloud) training, and demo deployment. Besides, several pre-trained models for both English and Mandarin are also released.\n\n## Table of Contents\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [Data Preparation](#data-preparation)\n- [Training a Model](#training-a-model)\n- [Data Augmentation Pipeline](#data-augmentation-pipeline)\n- [Inference and Evaluation](#inference-and-evaluation)\n- [Running in Docker Container](#running-in-docker-container)\n- [Distributed Cloud Training](#distributed-cloud-training)\n- [Hyper-parameters Tuning](#hyper-parameters-tuning)\n- [Training for Mandarin Language](#training-for-mandarin-language)\n- [Trying Live Demo with Your Own Voice](#trying-live-demo-with-your-own-voice)\n- [Released Models](#released-models)\n- [Experiments and Benchmarks](#experiments-and-benchmarks)\n- [Questions and Help](#questions-and-help)\n\n\n\n## Installation\n\nTo avoid the trouble of environment setup, [running in Docker container](#running-in-docker-container) is highly recommended. Otherwise follow the guidelines below to install the dependencies manually.\n\n### Prerequisites\n- Python 2.7 only supported\n- PaddlePaddle the latest version (please refer to the [Installation Guide](https://github.com/PaddlePaddle/Paddle#installation))\n\n### Setup\n- Make sure these libraries or tools installed: `pkg-config`, `flac`, `ogg`, `vorbis`, `boost` and `swig`, e.g. installing them via `apt-get`:\n\n```bash\nsudo apt-get install -y pkg-config libflac-dev libogg-dev libvorbis-dev libboost-dev swig\n```\n\n- Run the setup script for the remaining dependencies\n\n```bash\ngit clone https://github.com/PaddlePaddle/DeepSpeech.git\ncd DeepSpeech\nsh setup.sh\n```\n\n## Getting Started\n\nSeveral shell scripts provided in `./examples` will help us to quickly give it a try, for most major modules, including data preparation, model training, case inference and model evaluation, with a few public dataset (e.g. [LibriSpeech](http://www.openslr.org/12/), [Aishell](http://www.openslr.org/33)). Reading these examples will also help you to understand how to make it work with your own data.\n\nSome of the scripts in `./examples` are configured with 8 GPUs. If you don't have 8 GPUs available, please modify `CUDA_VISIBLE_DEVICES` and `--trainer_count`. If you don't have any GPU available, please set `--use_gpu` to False to use CPUs instead. Besides, if out-of-memory problem occurs, just reduce `--batch_size` to fit.\n\nLet's take a tiny sampled subset of [LibriSpeech dataset](http://www.openslr.org/12/) for instance.\n\n- Go to directory\n\n    ```bash\n    cd examples/tiny\n    ```\n\n    Notice that this is only a toy example with a tiny sampled subset of LibriSpeech. If you would like to try with the complete dataset (would take several days for training), please go to `examples/librispeech` instead.\n- Prepare the data\n\n    ```bash\n    sh run_data.sh\n    ```\n\n    `run_data.sh` will download dataset, generate manifests, collect normalizer's statistics and build vocabulary. Once the data preparation is done, you will find the data (only part of LibriSpeech) downloaded in `~/.cache/paddle/dataset/speech/libri` and the corresponding manifest files generated in `./data/tiny` as well as a mean stddev file and a vocabulary file. It has to be run for the very first time you run this dataset and is reusable for all further experiments.\n- Train your own ASR model\n\n    ```bash\n    sh run_train.sh\n    ```\n\n    `run_train.sh` will start a training job, with training logs printed to stdout and model checkpoint of every pass/epoch saved to `./checkpoints/tiny`. These checkpoints could be used for training resuming, inference, evaluation and deployment.\n- Case inference with an existing model\n\n    ```bash\n    sh run_infer.sh\n    ```\n\n    `run_infer.sh` will show us some speech-to-text decoding results for several (default: 10) samples with the trained model. The performance might not be good now as the current model is only trained with a toy subset of LibriSpeech. To see the results with a better model, you can download a well-trained (trained for several days, with the complete LibriSpeech) model and do the inference:\n\n    ```bash\n    sh run_infer_golden.sh\n    ```\n- Evaluate an existing model\n\n    ```bash\n    sh run_test.sh\n    ```\n\n    `run_test.sh` will evaluate the model with Word Error Rate (or Character Error Rate) measurement. Similarly, you can also download a well-trained model and test its performance:\n\n    ```bash\n    sh run_test_golden.sh\n    ```\n\nMore detailed information are provided in the following sections. Wish you a happy journey with the *DeepSpeech2 on PaddlePaddle* ASR engine!\n\n\n## Data Preparation\n\n### Generate Manifest\n\n*DeepSpeech2 on PaddlePaddle* accepts a textual **manifest** file as its data set interface. A manifest file summarizes a set of speech data, with each line containing some meta data (e.g. filepath, transcription, duration) of one audio clip, in [JSON](http://www.json.org/) format, such as:\n\n```\n{\"audio_filepath\": \"/home/work/.cache/paddle/Libri/134686/1089-134686-0001.flac\", \"duration\": 3.275, \"text\": \"stuff it into you his belly counselled him\"}\n{\"audio_filepath\": \"/home/work/.cache/paddle/Libri/134686/1089-134686-0007.flac\", \"duration\": 4.275, \"text\": \"a cold lucid indifference reigned in his soul\"}\n```\n\nTo use your custom data, you only need to generate such manifest files to summarize the dataset. Given such summarized manifests, training, inference and all other modules can be aware of where to access the audio files, as well as their meta data including the transcription labels.\n\nFor how to generate such manifest files, please refer to `data/librispeech/librispeech.py`, which will download data and generate manifest files for LibriSpeech dataset.\n\n### Compute Mean & Stddev for Normalizer\n\nTo perform z-score normalization (zero-mean, unit stddev) upon audio features, we have to estimate in advance the mean and standard deviation of the features, with some training samples:\n\n```bash\npython tools/compute_mean_std.py \\\n--num_samples 2000 \\\n--specgram_type linear \\\n--manifest_paths data/librispeech/manifest.train \\\n--output_path data/librispeech/mean_std.npz\n```\n\nIt will compute the mean and standard deviation of power spectrum feature with 2000 random sampled audio clips listed in `data/librispeech/manifest.train` and save the results to `data/librispeech/mean_std.npz` for further usage.\n\n\n### Build Vocabulary\n\nA vocabulary of possible characters is required to convert the transcription into a list of token indices for training, and in decoding, to convert from a list of indices back to text again. Such a character-based vocabulary can be built with `tools/build_vocab.py`.\n\n```bash\npython tools/build_vocab.py \\\n--count_threshold 0 \\\n--vocab_path data/librispeech/eng_vocab.txt \\\n--manifest_paths data/librispeech/manifest.train\n```\n\nIt will write a vocabuary file `data/librispeeech/eng_vocab.txt` with all transcription text in `data/librispeech/manifest.train`, without vocabulary truncation (`--count_threshold 0`).\n\n### More Help\n\nFor more help on arguments:\n\n```bash\npython data/librispeech/librispeech.py --help\npython tools/compute_mean_std.py --help\npython tools/build_vocab.py --help\n```\n\n## Training a model\n\n`train.py` is the main caller of the training module. Examples of usage are shown below.\n\n- Start training from scratch with 8 GPUs:\n\n    ```\n    CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train.py --trainer_count 8\n    ```\n\n- Start training from scratch with 16 CPUs:\n\n    ```\n    python train.py --use_gpu False --trainer_count 16\n    ```\n- Resume training from a checkpoint:\n\n    ```\n    CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \\\n    python train.py \\\n    --init_model_path CHECKPOINT_PATH_TO_RESUME_FROM\n    ```\n\nFor more help on arguments:\n\n```bash\npython train.py --help\n```\nor refer to `example/librispeech/run_train.sh`.\n\n## Data Augmentation Pipeline\n\nData augmentation has often been a highly effective technique to boost the deep learning performance. We augment our speech data by synthesizing new audios with small random perturbation (label-invariant transformation) added upon raw audios. You don't have to do the syntheses on your own, as it is already embedded into the data provider and is done on the fly, randomly for each epoch during training.\n\nSix optional augmentation components are provided to be selected, configured and inserted into the processing pipeline.\n\n  - Volume Perturbation\n  - Speed Perturbation\n  - Shifting Perturbation\n  - Online Bayesian normalization\n  - Noise Perturbation (need background noise audio files)\n  - Impulse Response (need impulse audio files)\n\nIn order to inform the trainer of what augmentation components are needed and what their processing orders are, it is required to prepare in advance an *augmentation configuration file* in [JSON](http://www.json.org/) format. For example:\n\n```\n[{\n    \"type\": \"speed\",\n    \"params\": {\"min_speed_rate\": 0.95,\n               \"max_speed_rate\": 1.05},\n    \"prob\": 0.6\n},\n{\n    \"type\": \"shift\",\n    \"params\": {\"min_shift_ms\": -5,\n               \"max_shift_ms\": 5},\n    \"prob\": 0.8\n}]\n```\n\nWhen the `--augment_conf_file` argument of `trainer.py` is set to the path of the above example configuration file, every audio clip in every epoch will be processed: with 60% of chance, it will first be speed perturbed with a uniformly random sampled speed-rate between 0.95 and 1.05, and then with 80% of chance it will be shifted in time with a random sampled offset between -5 ms and 5 ms. Finally this newly synthesized audio clip will be feed into the feature extractor for further training.\n\nFor other configuration examples, please refer to `conf/augmenatation.config.example`.\n\nBe careful when utilizing the data augmentation technique, as improper augmentation will do harm to the training, due to the enlarged train-test gap.\n\n## Inference and Evaluation\n\n### Prepare Language Model\n\nA language model is required to improve the decoder's performance. We have prepared two language models (with lossy compression) for users to download and try. One is for English and the other is for Mandarin. Users can simply run this to download the preprared language models:\n\n```bash\ncd models/lm\nsh download_lm_en.sh\nsh download_lm_ch.sh\n```\n\nIf you wish to train your own better language model, please refer to [KenLM](https://github.com/kpu/kenlm) for tutorials. Here we provide some tips to show how we preparing our English and Mandarin language models. You can take it as a reference when you train your own.\n\n#### English LM\n\nThe English corpus is from the [Common Crawl Repository](http://commoncrawl.org) and you can download it from [statmt](http://data.statmt.org/ngrams/deduped_en). We use part en.00 to train our English language model. There are some preprocessing steps before training:\n\n  * Characters not in \\[A-Za-z0-9\\s'\\] (\\s represents whitespace characters) are removed and Arabic numbers are converted to English numbers like 1000 to one thousand.\n  * Repeated whitespace characters are squeezed to one and the beginning whitespace characters are removed. Notice that all transcriptions are lowercase, so all characters are converted to lowercase.\n  * Top 400,000 most frequent words are selected to build the vocabulary and the rest are replaced with 'UNKNOWNWORD'.\n\nNow the preprocessing is done and we get a clean corpus to train the language model. Our released language model are trained with agruments '-o 5 --prune 0 1 1 1 1'. '-o 5' means the max order of language model is 5. '--prune 0 1 1 1 1' represents count thresholds for each order and more specifically it will prune singletons for orders two and higher. To save disk storage we convert the arpa file to 'trie' binary file with arguments '-a 22 -q 8 -b 8'. '-a' represents the maximum number of leading bits of pointers in 'trie' to chop. '-q -b' are quantization parameters for probability and backoff.\n\n#### Mandarin LM\n\nDifferent from the English language model, Mandarin language model is character-based where each token is a Chinese character. We use internal corpus to train the released Mandarin language models. The corpus contain billions of tokens. The preprocessing has tiny difference from English language model and main steps include:\n\n  * The beginning and trailing whitespace characters are removed.\n  * English punctuations and Chinese punctuations are removed.\n  * A whitespace character between two tokens is inserted.\n\nPlease notice that the released language models only contain Chinese simplified characters. After preprocessing done we can begin to train the language model. The key training arguments for small LM is '-o 5 --prune 0 1 2 4 4' and '-o 5' for large LM. Please refer above section for the meaning of each argument. We also convert the arpa file to binary file using default settings.\n\n### Speech-to-text Inference\n\nAn inference module caller `infer.py` is provided to infer, decode and visualize speech-to-text results for several given audio clips. It might help to have an intuitive and qualitative evaluation of the ASR model's performance.\n\n- Inference with GPU:\n\n    ```bash\n    CUDA_VISIBLE_DEVICES=0 python infer.py --trainer_count 1\n    ```\n\n- Inference with CPUs:\n\n    ```bash\n    python infer.py --use_gpu False --trainer_count 12\n    ```\n\nWe provide two types of CTC decoders: *CTC greedy decoder* and *CTC beam search decoder*. The *CTC greedy decoder* is an implementation of the simple best-path decoding algorithm, selecting at each timestep the most likely token, thus being greedy and locally optimal. The [*CTC beam search decoder*](https://arxiv.org/abs/1408.2873) otherwise utilizes a heuristic breadth-first graph search for reaching a near global optimality; it also requires a pre-trained KenLM language model for better scoring and ranking. The decoder type can be set with argument `--decoding_method`.\n\nFor more help on arguments:\n\n```\npython infer.py --help\n```\nor refer to `example/librispeech/run_infer.sh`.\n\n### Evaluate a Model\n\nTo evaluate a model's performance quantitatively, please run:\n\n- Evaluation with GPUs:\n\n    ```bash\n    CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python test.py --trainer_count 8\n    ```\n\n- Evaluation with CPUs:\n\n    ```bash\n    python test.py --use_gpu False --trainer_count 12\n    ```\n\nThe error rate (default: word error rate; can be set with `--error_rate_type`) will be printed.\n\nFor more help on arguments:\n\n```bash\npython test.py --help\n```\nor refer to `example/librispeech/run_test.sh`.\n\n## Hyper-parameters Tuning\n\nThe hyper-parameters $\\alpha$ (language model weight) and $\\beta$ (word insertion weight) for the [*CTC beam search decoder*](https://arxiv.org/abs/1408.2873) often have a significant impact on the decoder's performance. It would be better to re-tune them on the validation set when the acoustic model is renewed.\n\n`tools/tune.py` performs a 2-D grid search over the hyper-parameter $\\alpha$ and $\\beta$. You must provide the range of $\\alpha$ and $\\beta$, as well as the number of their attempts.\n\n- Tuning with GPU:\n\n    ```bash\n    CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \\\n    python tools/tune.py \\\n    --trainer_count 8 \\\n    --alpha_from 1.0 \\\n    --alpha_to 3.2 \\\n    --num_alphas 45 \\\n    --beta_from 0.1 \\\n    --beta_to 0.45 \\\n    --num_betas 8\n    ```\n\n- Tuning with CPU:\n\n    ```bash\n    python tools/tune.py --use_gpu False\n    ```\n The grid search will print the WER (word error rate) or CER (character error rate) at each point in the hyper-parameters space, and draw the error surface optionally. A proper hyper-parameters range should include the global minima of the error surface for WER/CER, as illustrated in the following figure.\n\n<p align=\"center\">\n<img src=\"docs/images/tuning_error_surface.png\" width=550>\n<br/>An example error surface for tuning on the dev-clean set of LibriSpeech\n<\/p>\n\nUsually, as the figure shows, the variation of language model weight ($\\alpha$) significantly affect the performance of CTC beam search decoder. And a better procedure is to first tune on serveral data batches (the number can be specified) to find out the proper range of hyper-parameters, then change to the whole validation set to carray out an accurate tuning.\n\nAfter tuning, you can reset $\\alpha$ and $\\beta$ in the inference and evaluation modules to see if they really help improve the ASR performance. For more help\n\n```bash\npython tune.py --help\n```\nor refer to `example/librispeech/run_tune.sh`.\n\n## Running in Docker Container\n\nDocker is an open source tool to build, ship, and run distributed applications in an isolated environment. A Docker image for this project has been provided in [hub.docker.com](https://hub.docker.com) with all the dependencies installed, including the pre-built PaddlePaddle, CTC decoders, and other necessary Python and third-party packages. This Docker image requires the support of NVIDIA GPU, so please make sure its availiability and the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) has been installed.\n\nTake several steps to launch the Docker image:\n\n- Download the Docker image\n\n```bash\nnvidia-docker pull paddlepaddle/deep_speech:latest-gpu\n```\n\n- Clone this repository\n\n```\ngit clone https://github.com/PaddlePaddle/DeepSpeech.git\n```\n\n- Run the Docker image\n\n```bash\nsudo nvidia-docker run -it -v $(pwd)/DeepSpeech:/DeepSpeech paddlepaddle/deep_speech:latest-gpu /bin/bash\n```\nNow go back and start from the [Getting Started](#getting-started) section, you can execute training, inference and hyper-parameters tuning similarly in the Docker container.\n\n## Distributed Cloud Training\n\nWe also provide a cloud training module for users to do the distributed cluster training on [PaddleCloud](https://github.com/PaddlePaddle/cloud), to achieve a much faster training speed with multiple machines. To start with this, please first install PaddleCloud client and register a PaddleCloud account, as described in [PaddleCloud Usage](https://github.com/PaddlePaddle/cloud/blob/develop/doc/usage_cn.md#%E4%B8%8B%E8%BD%BD%E5%B9%B6%E9%85%8D%E7%BD%AEpaddlecloud).\n\nPlease take the following steps to submit a training job:\n\n- Go to directory:\n\n    ```bash\n    cd cloud\n    ```\n- Upload data:\n\n    Data must be uploaded to PaddleCloud filesystem to be accessed within a cloud job. `pcloud_upload_data.sh` helps do the data packing and uploading:\n\n    ```bash\n    sh pcloud_upload_data.sh\n    ```\n\n    Given input manifests, `pcloud_upload_data.sh` will:\n\n    - Extract the audio files listed in the input manifests.\n    - Pack them into a specified number of tar files.\n    - Upload these tar files to PaddleCloud filesystem.\n    - Create cloud manifests by replacing local filesystem paths with PaddleCloud filesystem paths. New manifests will be used to inform the cloud jobs of audio files' location and their meta information.\n\n    It should be done only once for the very first time to do the cloud training. Later, the data is kept persisitent on the cloud filesystem and reusable for further job submissions.\n\n    For argument details please refer to [Train DeepSpeech2 on PaddleCloud](https://github.com/PaddlePaddle/DeepSpeech/tree/develop/cloud).\n\n - Configure training arguments:\n\n    Configure the cloud job parameters in `pcloud_submit.sh` (e.g. `NUM_NODES`, `NUM_GPUS`, `CLOUD_TRAIN_DIR`, `JOB_NAME` etc.) and then configure other hyper-parameters for training in `pcloud_train.sh` (just as what you do for local training).\n\n    For argument details please refer to [Train DeepSpeech2 on PaddleCloud](https://github.com/PaddlePaddle/DeepSpeech/tree/develop/cloud).\n\n - Submit the job:\n\n    By running:\n\n    ```bash\n    sh pcloud_submit.sh\n    ```\n    a training job has been submitted to PaddleCloud, with the job name printed to the console.\n\n  - Get training logs\n\n    Run this to list all the jobs you have submitted, as well as their running status:\n\n    ```bash\n    paddlecloud get jobs\n    ```\n\n    Run this, the corresponding job's logs will be printed.\n    ```bash\n    paddlecloud logs -n 10000 $REPLACED_WITH_YOUR_ACTUAL_JOB_NAME\n    ```\n\nFor more information about the usage of PaddleCloud, please refer to [PaddleCloud Usage](https://github.com/PaddlePaddle/cloud/blob/develop/doc/usage_cn.md#提交任务).\n\nFor more information about the DeepSpeech2 training on PaddleCloud, please refer to\n[Train DeepSpeech2 on PaddleCloud](https://github.com/PaddlePaddle/DeepSpeech/tree/develop/cloud).\n\n## Training for Mandarin Language\n\nThe key steps of training for Mandarin language are same to that of English language and we have also provided an example for Mandarin training with Aishell in ```examples/aishell```. As mentioned above, please execute ```sh run_data.sh```, ```sh run_train.sh```, ```sh run_test.sh``` and ```sh run_infer.sh``` to do data preparation, training, testing and inference correspondingly. We have also prepared a pre-trained model (downloaded by ./models/aishell/download_model.sh) for users to try with ```sh run_infer_golden.sh``` and ```sh run_test_golden.sh```. Notice that, different from English LM, the Mandarin LM is character-based and please run ```tools/tune.py``` to find an optimal setting.\n\n## Trying Live Demo with Your Own Voice\n\nUntil now, an ASR model is trained and tested qualitatively (`infer.py`) and quantitatively (`test.py`) with existing audio files. But it is not yet tested with your own speech. `deploy/demo_server.py` and `deploy/demo_client.py` helps quickly build up a real-time demo ASR engine with the trained model, enabling you to test and play around with the demo, with your own voice.\n\nTo start the demo's server, please run this in one console:\n\n```bash\nCUDA_VISIBLE_DEVICES=0 \\\npython deploy/demo_server.py \\\n--trainer_count 1 \\\n--host_ip localhost \\\n--host_port 8086\n```\n\nFor the machine (might not be the same machine) to run the demo's client, please do the following installation before moving on.\n\nFor example, on MAC OS X:\n\n```bash\nbrew install portaudio\npip install pyaudio\npip install pynput\n```\n\nThen to start the client, please run this in another console:\n\n```bash\nCUDA_VISIBLE_DEVICES=0 \\\npython -u deploy/demo_client.py \\\n--host_ip 'localhost' \\\n--host_port 8086\n```\n\nNow, in the client console, press the `whitespace` key, hold, and start speaking. Until finishing your utterance, release the key to let the speech-to-text results shown in the console. To quit the client, just press `ESC` key.\n\nNotice that `deploy/demo_client.py` must be run on a machine with a microphone device, while `deploy/demo_server.py` could be run on one without any audio recording hardware, e.g. any remote server machine. Just be careful to set the `host_ip` and `host_port` argument with the actual accessible IP address and port, if the server and client are running with two separate machines. Nothing should be done if they are running on one single machine.\n\nPlease also refer to `examples/mandarin/run_demo_server.sh`, which will first download a pre-trained Mandarin model (trained with 3000 hours of internal speech data) and then start the demo server with the model. With running `examples/mandarin/run_demo_client.sh`, you can speak Mandarin to test it. If you would like to try some other models, just update `--model_path` argument in the script.  \n\nFor more help on arguments:\n\n```bash\npython deploy/demo_server.py --help\npython deploy/demo_client.py --help\n```\n\n## Released Models\n\n#### Speech Model Released\n\nLanguage  | Model Name | Training Data | Hours of Speech\n:-----------: | :------------: | :----------: |  -------:\nEnglish  | [LibriSpeech Model](http://cloud.dlnel.org/filepub/?uuid=117cde63-cd59-4948-8b80-df782555f7d6) | [LibriSpeech Dataset](http://www.openslr.org/12/) | 960 h\nEnglish  | [BaiduEN8k Model](http://cloud.dlnel.org/filepub/?uuid=37a1c211-ec47-494c-973c-31437a10ae90) | Baidu Internal English Dataset | 8628 h\nMandarin | [Aishell Model](http://cloud.dlnel.org/filepub/?uuid=61de63b9-6904-4809-ad95-0cc5104ab973) | [Aishell Dataset](http://www.openslr.org/33/) | 151 h\nMandarin | [BaiduCN1.2k Model](http://cloud.dlnel.org/filepub/?uuid=499569a6-0025-4f40-83e6-1c99527431a6) | Baidu Internal Mandarin Dataset | 1204 h\n\n#### Language Model Released\n\nLanguage Model | Training Data | Token-based | Size | Descriptions\n:-------------:| :------------:| :-----: | -----: | :-----------------\n[English LM](http://paddlepaddle.bj.bcebos.com/model_zoo/speech/common_crawl_00.prune01111.trie.klm) |  [CommonCrawl(en.00)](http://web-language-models.s3-website-us-east-1.amazonaws.com/ngrams/en/deduped/en.00.deduped.xz) | Word-based | 8.3 GB | Pruned with 0 1 1 1 1; <br/> About 1.85 billion n-grams; <br/> 'trie'  binary with '-a 22 -q 8 -b 8'\n[Mandarin LM Small](http://cloud.dlnel.org/filepub/?uuid=d21861e4-4ed6-45bb-ad8e-ae417a43195e) | Baidu Internal Corpus | Char-based | 2.8 GB | Pruned with 0 1 2 4 4; <br/> About 0.13 billion n-grams; <br/> 'probing' binary with default settings\n[Mandarin LM Large](http://cloud.dlnel.org/filepub/?uuid=245d02bb-cd01-4ebe-b079-b97be864ec37) | Baidu Internal Corpus | Char-based | 70.4 GB | No Pruning; <br/> About 3.7 billion n-grams; <br/> 'probing' binary with default settings\n\n## Experiments and Benchmarks\n\n#### Benchmark Results for English Models (Word Error Rate)\n\nTest Set                | LibriSpeech Model | BaiduEN8K Model\n:---------------------  | ---------------:  | -------------------:\nLibriSpeech Test-Clean  |   6.85            |   5.41\nLibriSpeech Test-Other  |   21.18           |   13.85\nVoxForge American-Canadian | 12.12          |   7.13\nVoxForge Commonwealth   |   19.82           |   14.93\nVoxForge European       |   30.15           |   18.64\nVoxForge Indian         |   53.73           |   25.51\nBaidu Internal Testset  |   40.75           |   8.48\n\nFor reproducing benchmark results on VoxForge data, we provide a script to download data and generate VoxForge dialect manifest files. Please go to ```data/voxforge``` and execute ```sh run_data.sh``` to get VoxForge dialect manifest files. Notice that VoxForge data may keep updating and the generated manifest files may have difference from those we evaluated on.\n\n#### Benchmark Results for Mandarin Model (Character Error Rate)\n\nTest Set                |  BaiduCN1.2k Model\n:---------------------  |  -------------------:\nBaidu Internal Testset  |   12.64\n\n#### Acceleration with Multi-GPUs\n\nWe compare the training time with 1, 2, 4, 8, 16 Tesla K40m GPUs (with a subset of LibriSpeech samples whose audio durations are between 6.0 and 7.0 seconds).  And it shows that a **near-linear** acceleration with multiple GPUs has been achieved. In the following figure, the time (in seconds) cost for training is printed on the blue bars.\n\n<img src=\"docs/images/multi_gpu_speedup.png\" width=450><br/>\n\n| # of GPU  | Acceleration Rate |\n| --------  | --------------:   |\n| 1         | 1.00 X |\n| 2         | 1.97 X |\n| 4         | 3.74 X |\n| 8         | 6.21 X |\n|16         | 10.70 X |\n\n`tools/profile.sh` provides such a profiling tool.\n\n## Questions and Help\n\nYou are welcome to submit questions and bug reports in [Github Issues](https://github.com/PaddlePaddle/DeepSpeech/issues). You are also welcome to contribute to this project.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5010:B08CF:176FE5:5E21AC:6AB92F0B"},"text_sha256":"58ccb161a6717c0c24f68b461ce962bbfdd9482afabfd39c9ff6f8d6bd54f3ce"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1275","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"086E:1C46F8:17F07E2:1C1B6F7:6AB92F0B"},"commit":{"sha":"6b25a400008d393f9c3af837b3c692b17f29ee1a","url":"https://github.com/PaddlePaddle/PaddleSpeech/commit/6b25a400008d393f9c3af837b3c692b17f29ee1a","date":"2026-06-12T09:15:14Z","author_date":"2026-06-12T09:15:14Z","committer_date":"2026-06-12T09:15:14Z","tree_sha":"418c61dba6476d5cc46feda306886b885651af4a","message_first_line":"Bump lodash-es from 4.17.23 to 4.18.1 in /demos/speech_web/web_client (#4161)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1274","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0819:180242:181EAD3:1C4A2D6:6AB92F0C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":49371,"blob_sha":"28846ccb3f8cb2468b30c3b5e87a75879b802341","priority":0},{"path":"docs/source/audio_api/paddleaudio.compliance.kaldi.rst","size":172,"blob_sha":"81bb7d648f86ed3e620c41e6efdbdc5a06963370","priority":1},{"path":"docs/source/audio_api/paddleaudio.compliance.librosa.rst","size":178,"blob_sha":"553e4d3a5c1bee417cb3bcd3ae37afd64f3cb355","priority":1},{"path":"docs/source/audio_api/paddleaudio.compliance.rst","size":276,"blob_sha":"137599bb3e072c497447335218715780ffd7f981","priority":1}],"documents":[{"path":"README.md","size":49371,"blob_sha":"28846ccb3f8cb2468b30c3b5e87a75879b802341","priority":0,"status":200,"text":"([简体中文](./README_cn.md)|English)\n<p align=\"center\">\n  <img src=\"./docs/images/PaddleSpeech_logo.png\" />\n<\/p>\n\n<p align=\"center\">\n    <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-Apache%202-red.svg\"><\/a>\n    <a href=\"https://github.com/PaddlePaddle/PaddleSpeech/releases\"><img src=\"https://img.shields.io/github/v/release/PaddlePaddle/PaddleSpeech?color=ffa\"><\/a>\n    <a href=\"support os\"><img src=\"https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg\"><\/a>\n    <a href=\"\"><img src=\"https://img.shields.io/badge/python-3.8+-aff.svg\"><\/a>\n    <a href=\"https://github.com/PaddlePaddle/PaddleSpeech/graphs/contributors\"><img src=\"https://img.shields.io/github/contributors/PaddlePaddle/PaddleSpeech?color=9ea\"><\/a>\n    <a href=\"https://github.com/PaddlePaddle/PaddleSpeech/commits\"><img src=\"https://img.shields.io/github/commit-activity/m/PaddlePaddle/PaddleSpeech?color=3af\"><\/a>\n    <a href=\"https://github.com/PaddlePaddle/PaddleSpeech/issues\"><img src=\"https://img.shields.io/github/issues/PaddlePaddle/PaddleSpeech?color=9cc\"><\/a>\n    <a href=\"https://github.com/PaddlePaddle/PaddleSpeech/stargazers\"><img src=\"https://img.shields.io/github/stars/PaddlePaddle/PaddleSpeech?color=ccf\"><\/a>\n    <a href=\"=https://pypi.org/project/paddlespeech/\"><img src=\"https://img.shields.io/pypi/dm/PaddleSpeech\"><\/a>\n    <a href=\"=https://pypi.org/project/paddlespeech/\"><img src=\"https://static.pepy.tech/badge/paddlespeech\"><\/a>\n    <a href=\"https://huggingface.co/spaces\"><img src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue\"><\/a>\n<\/p>\n<div align=\"center\">  \n<h4>\n    <a href=\"#quick-start\"> Quick Start <\/a>\n  | <a href=\"#documents\"> Documents <\/a>\n  | <a href=\"#model-list\"> Models List <\/a>\n  | <a href=\"https://aistudio.baidu.com/aistudio/course/introduce/25130\"> AIStudio Courses <\/a>\n  | <a href=\"https://arxiv.org/abs/2205.12007\"> NAACL2022 Best Demo Award Paper <\/a>\n  | <a href=\"https://gitee.com/paddlepaddle/PaddleSpeech\"> Gitee <\/a>\n<\/h4>\n<\/div>\n\n------------------------------------------------------------------------------------\n\n**PaddleSpeech** is an open-source toolkit on [PaddlePaddle](https://github.com/PaddlePaddle/Paddle) platform for a variety of critical tasks in speech and audio, with the state-of-art and influential models. \n\n**PaddleSpeech** won the [NAACL2022 Best Demo Award](https://2022.naacl.org/blog/best-demo-award/), please check out our paper on [Arxiv](https://arxiv.org/abs/2205.12007).\n\n##### Speech Recognition\n\n<div align = \"center\">\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Input Audio  <\/th>\n      <th width=\"550\"> Recognition Result  <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n   <tr>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/PaddleAudio/en.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200 style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n      <td >I knocked at the door on the ancient side of the building.<\/td>\n    <\/tr>\n    <tr>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/PaddleAudio/zh.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n      <td>我认为跑步最重要的就是给我带来了身体健康。<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<\/div>\n\n##### Speech Translation (English to Chinese)\n\n<div align = \"center\">\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Input Audio  <\/th>\n      <th width=\"550\"> Translations Result  <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n   <tr>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/PaddleAudio/en.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200 style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n      <td >我 在 这栋 建筑 的 古老 门上 敲门。<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<\/div>\n\n##### Text-to-Speech\n<div align = \"center\">\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th width=\"550\" > Input Text<\/th>\n      <th>Synthetic Audio<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n   <tr>\n      <td>Life was like a box of chocolates, you never know what you're gonna get.<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/tacotron2_ljspeech_waveflow_samples_0.2/sentence_1.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>早上好，今天是2020/10/29，最低温度是-3°C。<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/parakeet_espnet_fs2_pwg_demo/tn_g2p/parakeet/001.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>季姬寂，集鸡，鸡即棘鸡。棘鸡饥叽，季姬及箕稷济鸡。鸡既济，跻姬笈，季姬忌，急咭鸡，鸡急，继圾几，季姬急，即籍箕击鸡，箕疾击几伎，伎即齑，鸡叽集几基，季姬急极屐击鸡，鸡既殛，季姬激，即记《季姬击鸡记》。<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/jijiji.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>大家好，我是 parrot 虚拟老师，我们来读一首诗，我与春风皆过客，I and the spring breeze are passing by，你携秋水揽星河，you take the autumn water to take the galaxy。<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/labixiaoxin.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>宜家唔系事必要你讲，但系你所讲嘅说话将会变成呈堂证供。<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/chengtangzhenggong.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>各个国家有各个国家嘅国歌<\/td>\n      <td align = \"center\">\n      <a href=\"https://paddlespeech.cdn.bcebos.com/Parakeet/docs/demos/gegege.wav\" rel=\"nofollow\">\n            <img align=\"center\" src=\"./docs/images/audio_icon.png\" width=\"200\" style=\"max-width: 100%;\"><\/a><br>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<\/div>\n\nFor more synthesized audios, please refer to [PaddleSpeech Text-to-Speech samples](https://paddlespeech.readthedocs.io/en/latest/tts/demo.html).\n\n##### Punctuation Restoration\n<div align = \"center\">\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th width=\"390\"> Input Text <\/th>\n      <th width=\"390\"> Output Text <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n   <tr>\n      <td>今天的天气真不错啊你下午有空吗我想约你一起去吃饭<\/td>\n      <td>今天的天气真不错啊！你下午有空吗？我想约你一起去吃饭。<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<\/div>\n\n\n### Features\n\nVia the easy-to-use, efficient, flexible and scalable implementation, our vision is to empower both industrial application and academic research, including training, inference & testing modules, and deployment process. To be more specific, this toolkit features at:\n- 📦  **Ease of Use**: low barriers to install, [CLI](#quick-start), [Server](#quick-start-server), and [Streaming Server](#quick-start-streaming-server) is available to quick-start your journey.\n- 🏆  **Align to the State-of-the-Art**: we provide high-speed and ultra-lightweight models, and also cutting-edge technology. \n- 🏆  **Streaming ASR and TTS System**: we provide production ready streaming asr and streaming tts system.\n- 💯  **Rule-based Chinese frontend**: our frontend contains Text Normalization and Grapheme-to-Phoneme (G2P, including Polyphone and Tone Sandhi). Moreover, we use self-defined linguistic rules to adapt Chinese context.\n- 📦  **Varieties of Functions that Vitalize both Industrial and Academia**:\n  - 🛎️  *Implementation of critical audio tasks*: this toolkit contains audio functions like  Automatic Speech Recognition, Text-to-Speech Synthesis, Speaker Verification, KeyWord Spotting, Audio Classification, and Speech Translation, etc.\n  - 🔬  *Integration of mainstream models and datasets*: the toolkit implements modules that participate in the whole pipeline of the speech tasks, and uses mainstream datasets like LibriSpeech, LJSpeech, AIShell, CSMSC, etc. See also [model list](#model-list) for more details.\n  - 🧩  *Cascaded models application*: as an extension of the typical traditional audio tasks, we combine the workflows of the aforementioned tasks with other fields like Natural language processing (NLP) and Computer Vision (CV).\n\n### Recent Update\n- 🎉 2025.09.01: Add [Whisper large v3 and turbo model](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/demos/whisper).\n- 🤗 2025.08.11: Add [code-switch online model and server demo](./examples/tal_cs/asr1/).\n- 👑 2023.05.31: Add [WavLM ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr5), WavLM fine-tuning for ASR on LibriSpeech.\n- 🎉 2023.05.18: Add [Squeezeformer](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/aishell/asr1), Squeezeformer training for ASR on Aishell.\n- 👑 2023.05.04: Add [HuBERT ASR-en](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/examples/librispeech/asr4), HuBERT fine-tuning for ASR on LibriSpeech.\n- ⚡ 2023.04.28: Fix [0-d tensor](https://github.com/PaddlePaddle/PaddleSpeech/pull/3214), with the upgrade of paddlepaddle==2.5, the problem of modifying 0-d tensor has been solved.\n- 👑 2023.04.25: Add [AMP for U2 conformer](https://github.com/PaddlePaddle/PaddleSpeech/pull/3167).\n- 🔥 2023.04.06: Add [subtitle file (.srt format) generation example](./demos/streaming_asr_server).\n- 🔥 2023.03.14: Add SVS(Singing Voice Synthesis) examples with Opencpop dataset, including [DiffSinger](./examples/opencpop/svs1)、[PWGAN](./examples/opencpop/voc1) and [HiFiGAN](./examples/opencpop/voc5), the effect is continuously optimized.\n- 👑 2023.03.09: Add [Wav2vec2ASR-zh](./examples/aishell/asr3).\n- 🎉 2023.03.07: Add [TTS ARM Linux C++ Demo (with C++ Chinese Text Frontend)](./demos/TTSArmLinux).\n- 🔥 2023.03.03 Add Voice Conversion [StarGANv2-VC synthesize pipeline](./examples/vctk/vc3).\n- 🎉 2023.02.16: Add [Cantonese TTS](./examples/canton/tts3).\n- 🔥 2023.01.10: Add [code-switch asr CLI and Demos](./demos/speech_recognition).\n- 👑 2023.01.06: Add [code-switch asr tal_cs recipe](./examples/tal_cs/asr1/).\n- 🎉 2022.12.02: Add [end-to-end Prosody Prediction pipeline](./examples/csmsc/tts3_rhy) (including using prosody labels in Acoustic Model).\n- 🎉 2022.11.30: Add [TTS Android Demo](./demos/TTSAndroid).\n- 🤗 2022.11.28: PP-TTS and PP-ASR demos are available in [AIStudio](https://aistudio.baidu.com/aistudio/modelsoverview) and [official website\n of paddlepaddle](https://www.paddlepaddle.org.cn/models).\n- 👑 2022.11.18: Add [Whisper CLI and Demos](https://github.com/PaddlePaddle/PaddleSpeech/pull/2640), support multi language recognition and translation.\n- 🔥 2022.11.18: Add [Wav2vec2 CLI and Demos](./demos/speech_ssl), Support ASR and Feature Extraction.\n- 🎉 2022.11.17: Add [male voice for TTS](https://github.com/PaddlePaddle/PaddleSpeech/pull/2660).\n- 🔥 2022.11.07: Add [U2/U2++ C++ High Performance Streaming ASR Deployment](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/runtime/examples/u2pp_ol/wenetspeech).\n- 👑 2022.11.01: Add [Adversarial Loss](https://arxiv.org/pdf/1907.04448.pdf) for [Chinese English mixed TTS](./examples/zh_en_tts/tts3).\n- 🔥 2022.10.26: Add [Prosody Prediction](./examples/other/rhy) for TTS.\n- 🎉 2022.10.21: Add [SSML](https://github.com/PaddlePaddle/PaddleSpeech/discussions/2538) for TTS Chinese Text Frontend.\n- 👑 2022.10.11: Add [Wav2vec2ASR-en](./examples/librispeech/asr3), wav2vec2.0 fine-tuning for ASR on LibriSpeech.\n- 🔥 2022.09.26: Add Voice Cloning, TTS finetune, and [ERNIE-SAT](https://arxiv.org/abs/2211.03545) in [PaddleSpeech Web Demo](./demos/speech_web).\n- ⚡ 2022.09.09: Add AISHELL-3 Voice Cloning [example](./examples/aishell3/vc2) with ECAPA-TDNN speaker encoder.\n- ⚡ 2022.08.25: Release TTS [finetune](./examples/other/tts_finetune/tts3) example.\n- 🔥 2022.08.22: Add [ERNIE-SAT](https://arxiv.org/abs/2211.03545) models: [ERNIE-SAT-vctk](./examples/vctk/ernie_sat)、[ERNIE-SAT-aishell3](./examples/aishell3/ernie_sat)、[ERNIE-SAT-zh_en](./examples/aishell3_vctk/ernie_sat).\n- 🔥 2022.08.15: Add [g2pW](https://github.com/GitYCC/g2pW) into TTS Chinese Text Frontend.\n- 🔥 2022.08.09: Release [Chinese English mixed TTS](./examples/zh_en_tts/tts3).\n- ⚡ 2022.08.03: Add ONNXRuntime infer for  TTS CLI.\n- 🎉 2022.07.18: Release VITS: [VITS-csmsc](./examples/csmsc/vits)、[VITS-aishell3](./examples/aishell3/vits)、[VITS-VC](./examples/aishell3/vits-vc).\n- 🎉 2022.06.22: All TTS models support ONNX format.\n- 🍀 2022.06.17: Add [PaddleSpeech Web Demo](./demos/speech_web).\n- 👑 2022.05.13: Release [PP-ASR](./docs/source/asr/PPASR.md)、[PP-TTS](./docs/source/tts/PPTTS.md)、[PP-VPR](docs/source/vpr/PPVPR.md).\n- 👏🏻 2022.05.06: `PaddleSpeech Streaming Server` is available for `Streaming ASR` with `Punctuation Restoration` and `Token Timestamp` and `Text-to-Speech`.\n- 👏🏻 2022.05.06: `PaddleSpeech Server` is available for `Audio Classification`, `Automatic Speech Recognition` and `Text-to-Speech`, `Speaker Verification` and `Punctuation Restoration`.\n- 👏🏻 2022.03.28: `PaddleSpeech CLI` is available for `Speaker Verification`.\n- 👏🏻 2021.12.10: `PaddleSpeech CLI` is available for `Audio Classification`, `Automatic Speech Recognition`, `Speech Translation (English to Chinese)` and `Text-to-Speech`.\n\n### Community\n- Scan the QR code below with your Wechat, you can access to official technical exchange group and get the bonus ( more than 20GB learning materials, such as papers, codes and videos ) and the live link of the lessons. Look forward to your participation.\n\n<div align=\"center\">\n<img src=\"https://user-images.githubusercontent.com/30135920/212860467-9e943cc3-8be8-49a4-97fd-7c94aad8e979.jpg\"  width = \"200\"  />\n<\/div>\n\n## Installation\n\nWe strongly recommend our users to install PaddleSpeech in **Linux** with *python>=3.8*. \n\n### **Dependency Introduction**\n\n+ gcc >= 4.8.5\n+ paddlepaddle\n+ python >= 3.8\n+ OS support:  Linux(recommend), Windows, Mac OSX\n\nPaddleSpeech depends on paddlepaddle. For installation, please refer to the official website of [paddlepaddle](https://www.paddlepaddle.org.cn/en) and choose according to your own machine. Here is an example of the cpu version.\n\n```bash\npip install paddlepaddle -i https://mirror.baidu.com/pypi/simple\n```\nYou can also specify the version of paddlepaddle or install the develop version. \n```bash\n# install 2.4.1 version. Note, 2.4.1 is just an example, please follow the minimum dependency of paddlepaddle for your selection\npip install paddlepaddle==2.4.1 -i https://mirror.baidu.com/pypi/simple\n# install develop version\npip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html\n```\n\nThere are two quick installation methods for PaddleSpeech, one is pip installation, and the other is source code compilation (recommended).\n### pip install\n\n```shell\npip install pytest-runner\npip install paddlespeech\n```\n\n### source code compilation\n\n```shell\ngit clone https://github.com/PaddlePaddle/PaddleSpeech.git\ncd PaddleSpeech\npip install pytest-runner\npip install .\n# If you need to install in editable mode, you need to use --use-pep517. The command is as follows:\n# pip install -e . --use-pep517\n```\n\nFor more installation problems, such as conda environment, librosa-dependent, gcc problems, kaldi installation, etc., you can refer to this [installation document](./docs/source/install.md). If you encounter problems during installation, you can leave a message on [#2150](https://github.com/PaddlePaddle/PaddleSpeech/issues/2150) and find related problems\n\n\n<a name=\"quickstart\"><\/a>\n## Quick Start\n\nDevelopers can have a try of our models with [PaddleSpeech Command Line](./paddlespeech/cli/README.md) or Python. Change `--input` to test your own audio/text and support 16k wav format audio.\n\n**You can also quickly experience it in AI Studio 👉🏻 [PaddleSpeech API Demo](https://aistudio.baidu.com/aistudio/projectdetail/4353348?sUid=2470186&shared=1&ts=1660876445786)**\n\n\nTest audio sample download\n\n```shell\nwget -c https://paddlespeech.cdn.bcebos.com/PaddleAudio/zh.wav\nwget -c https://paddlespeech.cdn.bcebos.com/PaddleAudio/en.wav\n```\n\n### Automatic Speech Recognition\n\n<details><summary>&emsp;（Click to expand）Open Source Speech Recognition<\/summary>\n\n**command line experience**\n\n```shell\npaddlespeech asr --lang zh --input zh.wav\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.asr.infer import ASRExecutor\n>>> asr = ASRExecutor()\n>>> result = asr(audio_file=\"zh.wav\")\n>>> print(result)\n我认为跑步最重要的就是给我带来了身体健康\n```\n<\/details>\n\n### Text-to-Speech\n\n<details><summary>&emsp;Open Source Speech Synthesis<\/summary>\n\nOutput 24k sample rate wav format audio\n\n\n**command line experience**\n\n```shell\npaddlespeech tts --input \"你好，欢迎使用百度飞桨深度学习框架！\" --output output.wav\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.tts.infer import TTSExecutor\n>>> tts = TTSExecutor()\n>>> tts(text=\"今天天气十分不错。\", output=\"output.wav\")\n```\n- You can experience in [Huggingface Spaces](https://huggingface.co/spaces) [TTS Demo](https://huggingface.co/spaces/KPatrick/PaddleSpeechTTS)\n\n<\/details>\n\n### Audio Classification\n\n<details><summary>&emsp;An open-domain sound classification tool<\/summary>\n\nSound classification model based on 527 categories of AudioSet dataset\n\n**command line experience**\n\n```shell\npaddlespeech cls --input zh.wav\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.cls.infer import CLSExecutor\n>>> cls = CLSExecutor()\n>>> result = cls(audio_file=\"zh.wav\")\n>>> print(result)\nSpeech 0.9027186632156372\n```\n\n<\/details>\n\n### Voiceprint Extraction\n\n<details><summary>&emsp;Industrial-grade voiceprint extraction tool<\/summary>\n\n**command line experience**\n\n```shell\npaddlespeech vector --task spk --input zh.wav\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.vector import VectorExecutor\n>>> vec = VectorExecutor()\n>>> result = vec(audio_file=\"zh.wav\")\n>>> print(result) # 187维向量\n[ -0.19083306   9.474295   -14.122263    -2.0916545    0.04848729\n   4.9295826    1.4780062    0.3733844   10.695862     3.2697146\n  -4.48199     -0.6617882   -9.170393   -11.1568775   -1.2358263 ...]\n```\n\n<\/details>\n\n### Punctuation Restoration\n\n<details><summary>&emsp;Quick recovery of text punctuation, works with ASR models<\/summary>\n\n**command line experience**\n\n```shell\npaddlespeech text --task punc --input 今天的天气真不错啊你下午有空吗我想约你一起去吃饭\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.text.infer import TextExecutor\n>>> text_punc = TextExecutor()\n>>> result = text_punc(text=\"今天的天气真不错啊你下午有空吗我想约你一起去吃饭\")\n今天的天气真不错啊！你下午有空吗？我想约你一起去吃饭。\n```\n\n<\/details>\n\n### Speech Translation\n\n<details><summary>&emsp;End-to-end English to Chinese Speech Translation Tool<\/summary>\n\nUse pre-compiled kaldi related tools, only support experience in Ubuntu system\n\n**command line experience**\n\n```shell\npaddlespeech st --input en.wav\n```\n\n**Python API experience**\n\n```python\n>>> from paddlespeech.cli.st.infer import STExecutor\n>>> st = STExecutor()\n>>> result = st(audio_file=\"en.wav\")\n['我 在 这栋 建筑 的 古老 门上 敲门 。']\n```\n\n<\/details>\n\n\n<a name=\"quickstartserver\"><\/a>\n## Quick Start Server\n\nDevelopers can have a try of our speech server with [PaddleSpeech Server Command Line](./paddlespeech/server/README.md).\n\n**You can try it quickly in AI Studio (recommend): [SpeechServer](https://aistudio.baidu.com/aistudio/projectdetail/4354592?sUid=2470186&shared=1&ts=1660877827034)**\n\n**Start server**     \n\n```shell\npaddlespeech_server start --config_file ./demos/speech_server/conf/application.yaml\n```\n\n**Access Speech Recognition Services**     \n\n```shell\npaddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input input_16k.wav\n```\n\n**Access Text to Speech Services**     \n\n```shell\npaddlespeech_client tts --server_ip 127.0.0.1 --port 8090 --input \"您好，欢迎使用百度飞桨语音合成服务。\" --output output.wav\n```\n\n**Access Audio Classification Services**     \n```shell\npaddlespeech_client cls --server_ip 127.0.0.1 --port 8090 --input input.wav\n```\n\n\nFor more information about server command lines, please see: [speech server demos](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/demos/speech_server)\n\n\n<a name=\"quickstartstreamingserver\"><\/a>\n## Quick Start Streaming Server\n\nDevelopers can have a try of  [streaming asr](./demos/streaming_asr_server/README.md) and [streaming tts](./demos/streaming_tts_server/README.md) server.\n\n**Start Streaming Speech Recognition Server**\n\n```\npaddlespeech_server start --config_file ./demos/streaming_asr_server/conf/application.yaml\n```\n\n**Access Streaming Speech Recognition Services**     \n\n```\npaddlespeech_client asr_online --server_ip 127.0.0.1 --port 8090 --input input_16k.wav\n```\n\n**Start Streaming Text to Speech  Server**\n\n```\npaddlespeech_server start --config_file ./demos/streaming_tts_server/conf/tts_online_application.yaml\n```\n\n**Access Streaming Text to Speech Services**     \n\n```\npaddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol http --input \"您好，欢迎使用百度飞桨语音合成服务。\" --output output.wav\n```\n\nFor more information please see:  [streaming asr](./demos/streaming_asr_server/README.md) and [streaming tts](./demos/streaming_tts_server/README.md) \n\n<a name=\"ModelList\"><\/a>\n\n## Model List\n\nPaddleSpeech supports a series of most popular models. They are summarized in [released models](./docs/source/released_model.md) and attached with available pretrained models.\n\n<a name=\"SpeechToText\"><\/a>\n\n**Speech-to-Text** contains *Acoustic Model*, *Language Model*, and *Speech Translation*, with the following details:\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th>Speech-to-Text Module Type<\/th>\n      <th>Dataset<\/th>\n      <th>Model Type<\/th>\n      <th>Example<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td rowspan=\"4\">Speech Recogination<\/td>\n      <td rowspan=\"2\" >Aishell<\/td>\n      <td >DeepSpeech2 RNN + Conv based Models<\/td>\n      <td>\n      <a href = \"./examples/aishell/asr0\">deepspeech2-aishell<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>Transformer based Attention Models <\/td>\n      <td>\n      <a href = \"./examples/aishell/asr1\">u2.transformer.conformer-aishell<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td> Librispeech<\/td>\n      <td>Transformer based Attention Models <\/td>\n      <td>\n      <a href = \"./examples/librispeech/asr0\">deepspeech2-librispeech<\/a> / <a href = \"./examples/librispeech/asr1\">transformer.conformer.u2-librispeech<\/a>  / <a href = \"./examples/librispeech/asr2\">transformer.conformer.u2-kaldi-librispeech<\/a>\n      <\/td>\n      <\/td>\n    <\/tr>\n  <tr>\n      <td>TIMIT<\/td>\n      <td>Unified Streaming & Non-streaming Two-pass<\/td>\n      <td>\n    <a href = \"./examples/timit/asr1\"> u2-timit<\/a>\n      <\/td>\n  <\/tr>\n  <tr>\n  <td>Alignment<\/td>\n  <td>THCHS30<\/td>\n  <td>MFA<\/td>\n  <td>\n  <a href = \".examples/thchs30/align0\">mfa-thchs30<\/a>\n  <\/td>\n  <\/tr>\n   <tr>\n      <td rowspan=\"1\">Language Model<\/td>\n      <td colspan = \"2\">Ngram Language Model<\/td>\n      <td>\n      <a href = \"./examples/other/ngram_lm\">kenlm<\/a>\n      <\/td>\n    <\/tr>\n  <tr>\n      <td rowspan=\"2\">Speech Translation (English to Chinese)<\/td> \n      <td rowspan=\"2\">TED En-Zh<\/td>\n      <td>Transformer + ASR MTL<\/td>\n      <td>\n      <a href = \"./examples/ted_en_zh/st0\">transformer-ted<\/a>\n      <\/td>\n  <\/tr>\n  <tr>\n      <td>FAT + Transformer + ASR MTL<\/td>\n      <td>\n      <a href = \"./examples/ted_en_zh/st1\">fat-st-ted<\/a>\n      <\/td>\n  <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"TextToSpeech\"><\/a>\n\n**Text-to-Speech** in PaddleSpeech mainly contains three modules: *Text Frontend*, *Acoustic Model* and *Vocoder*. Acoustic Model and Vocoder models are listed as follow:\n\n<table>\n  <thead>\n    <tr>\n      <th> Text-to-Speech Module Type <\/th>\n      <th> Model Type <\/th>\n      <th> Dataset <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td> Text Frontend <\/td>\n      <td colspan=\"2\"> &emsp; <\/td>\n      <td>\n      <a href = \"./examples/other/tn\">tn<\/a> / <a href = \"./examples/other/g2p\">g2p<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td rowspan=\"6\">Acoustic Model<\/td>\n      <td>Tacotron2<\/td>\n      <td>LJSpeech / CSMSC<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/tts0\">tacotron2-ljspeech<\/a> / <a href = \"./examples/csmsc/tts0\">tacotron2-csmsc<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>Transformer TTS<\/td>\n      <td>LJSpeech<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/tts1\">transformer-ljspeech<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>SpeedySpeech<\/td>\n      <td>CSMSC<\/td>\n      <td >\n      <a href = \"./examples/csmsc/tts2\">speedyspeech-csmsc<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>FastSpeech2<\/td>\n      <td>LJSpeech / VCTK / CSMSC / AISHELL-3 / ZH_EN / finetune<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/tts3\">fastspeech2-ljspeech<\/a> / <a href = \"./examples/vctk/tts3\">fastspeech2-vctk<\/a> / <a href = \"./examples/csmsc/tts3\">fastspeech2-csmsc<\/a> / <a href = \"./examples/aishell3/tts3\">fastspeech2-aishell3<\/a> / <a href = \"./examples/zh_en_tts/tts3\">fastspeech2-zh_en<\/a> / <a href = \"./examples/other/tts_finetune/tts3\">fastspeech2-finetune<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td><a href = \"https://arxiv.org/abs/2211.03545\">ERNIE-SAT<\/a><\/td>\n      <td>VCTK / AISHELL-3 / ZH_EN<\/td>\n      <td>\n      <a href = \"./examples/vctk/ernie_sat\">ERNIE-SAT-vctk<\/a> / <a href = \"./examples/aishell3/ernie_sat\">ERNIE-SAT-aishell3<\/a> / <a href = \"./examples/aishell3_vctk/ernie_sat\">ERNIE-SAT-zh_en<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>DiffSinger<\/td>\n      <td>Opencpop<\/td>\n      <td>\n      <a href = \"./examples/opencpop/svs1\">DiffSinger-opencpop<\/a>\n      <\/td>\n   <\/tr>\n   <tr>\n      <td rowspan=\"6\">Vocoder<\/td>\n      <td >WaveFlow<\/td>\n      <td >LJSpeech<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/voc0\">waveflow-ljspeech<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td >Parallel WaveGAN<\/td>\n      <td >LJSpeech / VCTK / CSMSC / AISHELL-3 / Opencpop<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/voc1\">PWGAN-ljspeech<\/a> / <a href = \"./examples/vctk/voc1\">PWGAN-vctk<\/a> / <a href = \"./examples/csmsc/voc1\">PWGAN-csmsc<\/a> /  <a href = \"./examples/aishell3/voc1\">PWGAN-aishell3<\/a> / <a href = \"./examples/opencpop/voc1\">PWGAN-opencpop<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td >Multi Band MelGAN<\/td>\n      <td >CSMSC<\/td>\n      <td>\n      <a href = \"./examples/csmsc/voc3\">Multi Band MelGAN-csmsc<\/a> \n      <\/td>\n    <\/tr> \n    <tr>\n      <td >Style MelGAN<\/td>\n      <td >CSMSC<\/td>\n      <td>\n      <a href = \"./examples/csmsc/voc4\">Style MelGAN-csmsc<\/a> \n      <\/td>\n    <\/tr>\n    <tr>\n      <td>HiFiGAN<\/td>\n      <td>LJSpeech / VCTK / CSMSC / AISHELL-3 / Opencpop<\/td>\n      <td>\n      <a href = \"./examples/ljspeech/voc5\">HiFiGAN-ljspeech<\/a> / <a href = \"./examples/vctk/voc5\">HiFiGAN-vctk<\/a> / <a href = \"./examples/csmsc/voc5\">HiFiGAN-csmsc<\/a> / <a href = \"./examples/aishell3/voc5\">HiFiGAN-aishell3<\/a> / <a href = \"./examples/opencpop/voc5\">HiFiGAN-opencpop<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>WaveRNN<\/td>\n      <td>CSMSC<\/td>\n      <td>\n      <a href = \"./examples/csmsc/voc6\">WaveRNN-csmsc<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td rowspan=\"5\">Voice Cloning<\/td>\n      <td>GE2E<\/td>\n      <td >Librispeech, etc.<\/td>\n      <td>\n      <a href = \"./examples/other/ge2e\">GE2E<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>SV2TTS (GE2E + Tacotron2)<\/td>\n      <td>AISHELL-3<\/td>\n      <td>\n      <a href = \"./examples/aishell3/vc0\">VC0<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>SV2TTS (GE2E + FastSpeech2)<\/td>\n      <td>AISHELL-3<\/td>\n      <td>\n      <a href = \"./examples/aishell3/vc1\">VC1<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>SV2TTS (ECAPA-TDNN + FastSpeech2)<\/td>\n      <td>AISHELL-3<\/td>\n      <td>\n      <a href = \"./examples/aishell3/vc2\">VC2<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td>GE2E + VITS<\/td>\n      <td>AISHELL-3<\/td>\n      <td>\n      <a href = \"./examples/aishell3/vits-vc\">VITS-VC<\/a>\n      <\/td>\n    <\/tr>\n    <tr>\n      <td rowspan=\"3\">End-to-End<\/td>\n      <td>VITS<\/td>\n      <td>CSMSC / AISHELL-3<\/td>\n      <td>\n      <a href = \"./examples/csmsc/vits\">VITS-csmsc<\/a> / <a href = \"./examples/aishell3/vits\">VITS-aishell3<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"AudioClassification\"><\/a>\n\n**Audio Classification**\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Task <\/th>\n      <th> Dataset <\/th>\n      <th> Model Type <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n  <tr>\n      <td>Audio Classification<\/td>\n      <td>ESC-50<\/td>\n      <td>PANN<\/td>\n      <td>\n      <a href = \"./examples/esc50/cls0\">pann-esc50<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"KeywordSpotting\"><\/a>\n\n**Keyword Spotting**\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Task <\/th>\n      <th> Dataset <\/th>\n      <th> Model Type <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n  <tr>\n      <td>Keyword Spotting<\/td>\n      <td>hey-snips<\/td>\n      <td>MDTC<\/td>\n      <td>\n      <a href = \"./examples/hey_snips/kws0\">mdtc-hey-snips<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"SpeakerVerification\"><\/a>\n\n**Speaker Verification**\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Task <\/th>\n      <th> Dataset <\/th>\n      <th> Model Type <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n  <tr>\n      <td>Speaker Verification<\/td>\n      <td>VoxCeleb1/2<\/td>\n      <td>ECAPA-TDNN<\/td>\n      <td>\n      <a href = \"./examples/voxceleb/sv0\">ecapa-tdnn-voxceleb12<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"SpeakerDiarization\"><\/a>\n\n**Speaker Diarization**\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Task <\/th>\n      <th> Dataset <\/th>\n      <th> Model Type <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n  <tr>\n      <td>Speaker Diarization<\/td>\n     <td>AMI<\/td>\n      <td>ECAPA-TDNN + AHC / SC<\/td>\n      <td>\n      <a href = \"./examples/ami/sd0\">ecapa-tdnn-ami<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<a name=\"PunctuationRestoration\"><\/a>\n\n**Punctuation Restoration**\n\n<table style=\"width:100%\">\n  <thead>\n    <tr>\n      <th> Task <\/th>\n      <th> Dataset <\/th>\n      <th> Model Type <\/th>\n      <th> Example <\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n  <tr>\n      <td>Punctuation Restoration<\/td>\n      <td>IWLST2012_zh<\/td>\n      <td>Ernie Linear<\/td>\n      <td>\n      <a href = \"./examples/iwslt2012/punc0\">iwslt2012-punc0<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n## Documents\n\nNormally, [Speech SoTA](https://paperswithcode.com/area/speech), [Audio SoTA](https://paperswithcode.com/area/audio) and [Music SoTA](https://paperswithcode.com/area/music) give you an overview of the hot academic topics in the related area. To focus on the tasks in PaddleSpeech, you will find the following guidelines are helpful to grasp the core ideas.\n\n- [Installation](./docs/source/install.md)\n- [Quick Start](#quickstart)\n- [Some Demos](./demos/README.md)\n- Tutorials\n  - [Automatic Speech Recognition](./docs/source/asr/quick_start.md)\n    - [Introduction](./docs/source/asr/models_introduction.md)\n    - [Data Preparation](./docs/source/asr/data_preparation.md)\n    - [Ngram LM](./docs/source/asr/ngram_lm.md)\n  - [Text-to-Speech](./docs/source/tts/quick_start.md)\n    - [Introduction](./docs/source/tts/models_introduction.md)\n    - [Advanced Usage](./docs/source/tts/advanced_usage.md)\n    - [Chinese Rule Based Text Frontend](./docs/source/tts/zh_text_frontend.md)\n    - [Test Audio Samples](https://paddlespeech.readthedocs.io/en/latest/tts/demo.html)\n  - Speaker Verification\n    - [Audio Searching](./demos/audio_searching/README.md)\n    - [Speaker Verification](./demos/speaker_verification/README.md)\n  - [Audio Classification](./demos/audio_tagging/README.md)\n  - [Speech Translation](./demos/speech_translation/README.md)\n  - [Speech Server](./demos/speech_server/README.md)\n- [Released Models](./docs/source/released_model.md)\n  - [Speech-to-Text](#SpeechToText)\n  - [Text-to-Speech](#TextToSpeech)\n  - [Audio Classification](#AudioClassification)\n  - [Speaker Verification](#SpeakerVerification)\n  - [Speaker Diarization](#SpeakerDiarization)\n  - [Punctuation Restoration](#PunctuationRestoration)\n- [Community](#Community)\n- [Welcome to contribute](#contribution)\n- [License](#License)\n\nThe Text-to-Speech module is originally called [Parakeet](https://github.com/PaddlePaddle/Parakeet), and now merged with this repository. If you are interested in academic research about this task, please see [TTS research overview](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/docs/source/tts#overview). Also, [this document](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/docs/source/tts/models_introduction.md) is a good guideline for the pipeline components.\n\n\n## ⭐ Examples\n- **[PaddleBoBo](https://github.com/JiehangXie/PaddleBoBo): Use PaddleSpeech TTS to generate virtual human voice.**\n  \n<div align=\"center\"><a href=\"https://www.bilibili.com/video/BV1cL411V71o?share_source=copy_web\"><img src=\"https://ai-studio-static-online.cdn.bcebos.com/06fd746ab32042f398fb6f33f873e6869e846fe63c214596ae37860fe8103720\" / width=\"500px\"><\/a><\/div>\n\n- [PaddleSpeech Demo Video](https://paddlespeech.readthedocs.io/en/latest/demo_video.html)\n\n- **[VTuberTalk](https://github.com/jerryuhoo/VTuberTalk): Use PaddleSpeech TTS and ASR to clone voice from videos.**\n\n\n## Citation\n\nTo cite PaddleSpeech for research, please use the following format.\n\n```text\n@inproceedings{zhang2022paddlespeech,\n    title = {PaddleSpeech: An Easy-to-Use All-in-One Speech Toolkit},\n    author = {Hui Zhang, Tian Yuan, Junkun Chen, Xintong Li, Renjie Zheng, Yuxin Huang, Xiaojie Chen, Enlei Gong, Zeyu Chen, Xiaoguang Hu, dianhai yu, Yanjun Ma, Liang Huang},\n    booktitle = {Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Demonstrations},\n    year = {2022},\n    publisher = {Association for Computational Linguistics},\n}\n\n@InProceedings{pmlr-v162-bai22d,\n  title = {{A}$^3${T}: Alignment-Aware Acoustic and Text Pretraining for Speech Synthesis and Editing},\n  author = {Bai, He and Zheng, Renjie and Chen, Junkun and Ma, Mingbo and Li, Xintong and Huang, Liang},\n  booktitle = {Proceedings of the 39th International Conference on Machine Learning},\n  pages = {1399--1411},\n  year = {2022},\n  volume = {162},\n  series = {Proceedings of Machine Learning Research},\n  month = {17--23 Jul},\n  publisher = {PMLR},\n  pdf = {https://proceedings.mlr.press/v162/bai22d/bai22d.pdf},\n  url = {https://proceedings.mlr.press/v162/bai22d.html},\n}\n\n@inproceedings{zheng2021fused,\n  title={Fused acoustic and text encoding for multimodal bilingual pretraining and speech translation},\n  author={Zheng, Renjie and Chen, Junkun and Ma, Mingbo and Huang, Liang},\n  booktitle={International Conference on Machine Learning},\n  pages={12736--12746},\n  year={2021},\n  organization={PMLR}\n}\n```\n\n<a name=\"contribution\"><\/a>\n## Contribute to PaddleSpeech\n\nYou are warmly welcome to submit questions in [discussions](https://github.com/PaddlePaddle/PaddleSpeech/discussions) and bug reports in [issues](https://github.com/PaddlePaddle/PaddleSpeech/issues)! Also, we highly appreciate if you are willing to contribute to this project!\n\n### Contributors\n<p align=\"center\">\n<a href=\"https://github.com/zh794390558\"><img src=\"https://avatars.githubusercontent.com/u/3038472?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Jackwaterveg\"><img src=\"https://avatars.githubusercontent.com/u/87408988?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/yt605155624\"><img src=\"https://avatars.githubusercontent.com/u/24568452?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Honei\"><img src=\"https://avatars.githubusercontent.com/u/11361692?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/KPatr1ck\"><img src=\"https://avatars.githubusercontent.com/u/22954146?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/kuke\"><img src=\"https://avatars.githubusercontent.com/u/3064195?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/lym0302\"><img src=\"https://avatars.githubusercontent.com/u/34430015?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/SmileGoat\"><img src=\"https://avatars.githubusercontent.com/u/56786796?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/xinghai-sun\"><img src=\"https://avatars.githubusercontent.com/u/7038341?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/pkuyym\"><img src=\"https://avatars.githubusercontent.com/u/5782283?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/LittleChenCc\"><img src=\"https://avatars.githubusercontent.com/u/10339970?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/qingen\"><img src=\"https://avatars.githubusercontent.com/u/3139179?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/D-DanielYang\"><img src=\"https://avatars.githubusercontent.com/u/23690325?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Mingxue-Xu\"><img src=\"https://avatars.githubusercontent.com/u/92848346?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/745165806\"><img src=\"https://avatars.githubusercontent.com/u/20623194?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/jerryuhoo\"><img src=\"https://avatars.githubusercontent.com/u/24245709?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/WilliamZhang06\"><img src=\"https://avatars.githubusercontent.com/u/97937340?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/chrisxu2016\"><img src=\"https://avatars.githubusercontent.com/u/18379485?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/iftaken\"><img src=\"https://avatars.githubusercontent.com/u/30135920?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/lfchener\"><img src=\"https://avatars.githubusercontent.com/u/6771821?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/BarryKCL\"><img src=\"https://avatars.githubusercontent.com/u/48039828?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/mmglove\"><img src=\"https://avatars.githubusercontent.com/u/38800877?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/gongel\"><img src=\"https://avatars.githubusercontent.com/u/24390500?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/luotao1\"><img src=\"https://avatars.githubusercontent.com/u/6836917?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/wanghaoshuang\"><img src=\"https://avatars.githubusercontent.com/u/7534971?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/kslz\"><img src=\"https://avatars.githubusercontent.com/u/54951765?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/JiehangXie\"><img src=\"https://avatars.githubusercontent.com/u/51190264?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/david-95\"><img src=\"https://avatars.githubusercontent.com/u/15189190?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/THUzyt21\"><img src=\"https://avatars.githubusercontent.com/u/91456992?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/buchongyu2\"><img src=\"https://avatars.githubusercontent.com/u/29157444?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/iclementine\"><img src=\"https://avatars.githubusercontent.com/u/16222986?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/phecda-xu\"><img src=\"https://avatars.githubusercontent.com/u/46859427?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/freeliuzc\"><img src=\"https://avatars.githubusercontent.com/u/23568094?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/ZeyuChen\"><img src=\"https://avatars.githubusercontent.com/u/1371212?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/ccrrong\"><img src=\"https://avatars.githubusercontent.com/u/101700995?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/AK391\"><img src=\"https://avatars.githubusercontent.com/u/81195143?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/qingqing01\"><img src=\"https://avatars.githubusercontent.com/u/7845005?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/0x45f\"><img src=\"https://avatars.githubusercontent.com/u/23097963?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/vpegasus\"><img src=\"https://avatars.githubusercontent.com/u/22723154?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/ericxk\"><img src=\"https://avatars.githubusercontent.com/u/4719594?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Betterman-qs\"><img src=\"https://avatars.githubusercontent.com/u/61459181?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/sneaxiy\"><img src=\"https://avatars.githubusercontent.com/u/32832641?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Doubledongli\"><img src=\"https://avatars.githubusercontent.com/u/20540661?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/apps/dependabot\"><img src=\"https://avatars.githubusercontent.com/in/29110?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/kvinwang\"><img src=\"https://avatars.githubusercontent.com/u/6442159?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/chenkui164\"><img src=\"https://avatars.githubusercontent.com/u/34813030?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/PaddleZhang\"><img src=\"https://avatars.githubusercontent.com/u/97284124?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/billishyahao\"><img src=\"https://avatars.githubusercontent.com/u/96406262?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/BrightXiaoHan\"><img src=\"https://avatars.githubusercontent.com/u/25839309?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/jiqiren11\"><img src=\"https://avatars.githubusercontent.com/u/82639260?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/ryanrussell\"><img src=\"https://avatars.githubusercontent.com/u/523300?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/GT-ZhangAcer\"><img src=\"https://avatars.githubusercontent.com/u/46156734?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/tensor-tang\"><img src=\"https://avatars.githubusercontent.com/u/21351065?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/hysunflower\"><img src=\"https://avatars.githubusercontent.com/u/52739577?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/oyjxer\"><img src=\"https://avatars.githubusercontent.com/u/16233945?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/JamesLim-sy\"><img src=\"https://avatars.githubusercontent.com/u/61349199?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/limpidezza\"><img src=\"https://avatars.githubusercontent.com/u/71760778?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/windstamp\"><img src=\"https://avatars.githubusercontent.com/u/34057289?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/AshishKarel\"><img src=\"https://avatars.githubusercontent.com/u/58069375?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/chesterkuo\"><img src=\"https://avatars.githubusercontent.com/u/6285069?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/YDX-2147483647\"><img src=\"https://avatars.githubusercontent.com/u/73375426?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/AdamBear\"><img src=\"https://avatars.githubusercontent.com/u/2288870?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/wwhu\"><img src=\"https://avatars.githubusercontent.com/u/6081200?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/lispc\"><img src=\"https://avatars.githubusercontent.com/u/2833376?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/harisankarh\"><img src=\"https://avatars.githubusercontent.com/u/1307053?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/pengzhendong\"><img src=\"https://avatars.githubusercontent.com/u/10704539?s=60&v=4\" width=75 height=75><\/a>\n<a href=\"https://github.com/Jackiexiao\"><img src=\"https://avatars.githubusercontent.com/u/18050469?s=60&v=4\" width=75 height=75><\/a>\n<\/p>\n\n## Acknowledgement\n- Many thanks to [HighCWu](https://github.com/HighCWu) for adding [VITS-aishell3](./examples/aishell3/vits) and [VITS-VC](./examples/aishell3/vits-vc) examples.\n- Many thanks to [david-95](https://github.com/david-95) for fixing multi-punctuation bug、contributing to multiple program and data, and adding [SSML](https://github.com/PaddlePaddle/PaddleSpeech/discussions/2538) for TTS Chinese Text Frontend. \n- Many thanks to [BarryKCL](https://github.com/BarryKCL) for improving TTS Chinses Frontend based on [G2PW](https://github.com/GitYCC/g2pW).\n- Many thanks to [yeyupiaoling](https://github.com/yeyupiaoling)/[PPASR](https://github.com/yeyupiaoling/PPASR)/[PaddlePaddle-DeepSpeech](https://github.com/yeyupiaoling/PaddlePaddle-DeepSpeech)/[VoiceprintRecognition-PaddlePaddle](https://github.com/yeyupiaoling/VoiceprintRecognition-PaddlePaddle)/[AudioClassification-PaddlePaddle](https://github.com/yeyupiaoling/AudioClassification-PaddlePaddle) for years of attention, constructive advice and great help.\n- Many thanks to [mymagicpower](https://github.com/mymagicpower) for the Java implementation of ASR upon [short](https://github.com/mymagicpower/AIAS/tree/main/3_audio_sdks/asr_sdk) and [long](https://github.com/mymagicpower/AIAS/tree/main/3_audio_sdks/asr_long_audio_sdk) audio files.\n- Many thanks to [JiehangXie](https://github.com/JiehangXie)/[PaddleBoBo](https://github.com/JiehangXie/PaddleBoBo) for developing Virtual Uploader(VUP)/Virtual YouTuber(VTuber) with PaddleSpeech TTS function.\n- Many thanks to [745165806](https://github.com/745165806)/[PaddleSpeechTask](https://github.com/745165806/PaddleSpeechTask) for contributing Punctuation Restoration model.\n- Many thanks to [kslz](https://github.com/745165806) for supplementary Chinese documents.\n- Many thanks to [awmmmm](https://github.com/awmmmm) for contributing fastspeech2 aishell3 conformer pretrained model.\n- Many thanks to [phecda-xu](https://github.com/phecda-xu)/[PaddleDubbing](https://github.com/phecda-xu/PaddleDubbing) for developing a dubbing tool with GUI based on PaddleSpeech TTS model.\n- Many thanks to [jerryuhoo](https://github.com/jerryuhoo)/[VTuberTalk](https://github.com/jerryuhoo/VTuberTalk) for developing a GUI tool based on PaddleSpeech TTS and code for making datasets from videos based on PaddleSpeech ASR.\n- Many thanks to [vpegasus](https://github.com/vpegasus)/[xuesebot](https://github.com/vpegasus/xuesebot) for developing a rasa chatbot,which is able to speak and listen thanks to PaddleSpeech.\n- Many thanks to [chenkui164](https://github.com/chenkui164)/[FastASR](https://github.com/chenkui164/FastASR) for the C++ inference implementation of PaddleSpeech ASR.\n- Many thanks to [heyudage](https://github.com/heyudage)/[VoiceTyping](https://github.com/heyudage/VoiceTyping) for the real-time voice typing tool implementation of PaddleSpeech ASR streaming services.\n- Many thanks to [EscaticZheng](https://github.com/EscaticZheng)/[ps3.9wheel-install](https://github.com/EscaticZheng/ps3.9wheel-install) for the python3.9 prebuilt wheel for PaddleSpeech installation in Windows without Visual Studio.\nBesides, PaddleSpeech depends on a lot of open source repositories. See [references](./docs/source/reference.md) for more information.\n- Many thanks to [chinobing](https://github.com/chinobing)/[FastAPI-PaddleSpeech-Audio-To-Text](https://github.com/chinobing/FastAPI-PaddleSpeech-Audio-To-Text) for converting audio to text based on FastAPI and PaddleSpeech.\n- Many thanks to [MistEO](https://github.com/MistEO)/[Pallas-Bot](https://github.com/MistEO/Pallas-Bot) for QQ bot based on PaddleSpeech TTS.\n\n<a name=\"License\"><\/a>\n## License\n\nPaddleSpeech is provided under the [Apache-2.0 License](./LICENSE).\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/PaddlePaddle/PaddleSpeech.svg)](https://starchart.cc/PaddlePaddle/PaddleSpeech)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F6F4:17E138:17C33B:5E7459:6AB92F0C"},"text_sha256":"b85367b9bff16b22585c882ed0e2fbd3e1ddf84cc8ab67983b452019ade9e61b"},{"path":"docs/source/audio_api/paddleaudio.compliance.kaldi.rst","size":172,"blob_sha":"81bb7d648f86ed3e620c41e6efdbdc5a06963370","priority":1,"status":200,"text":"paddleaudio.compliance.kaldi module\n===================================\n\n.. automodule:: paddleaudio.compliance.kaldi\n   :members:\n   :undoc-members:\n   :show-inheritance:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"859A:149227:1843A9:5EF5C8:6AB92F05"},"text_sha256":"708b515f1ed2784f00152731e6fc716e4d03317bb37ea286407dd9e9d3609e02"},{"path":"docs/source/audio_api/paddleaudio.compliance.librosa.rst","size":178,"blob_sha":"553e4d3a5c1bee417cb3bcd3ae37afd64f3cb355","priority":1,"status":200,"text":"paddleaudio.compliance.librosa module\n=====================================\n\n.. automodule:: paddleaudio.compliance.librosa\n   :members:\n   :undoc-members:\n   :show-inheritance:\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"4B7C:3EACB:17D4EF:5E865D:6AB92F0D"},"text_sha256":"91aae2965a29b222a498096ee50a7b84169d3c010945a30a64aeb1d1df3508dd"},{"path":"docs/source/audio_api/paddleaudio.compliance.rst","size":276,"blob_sha":"137599bb3e072c497447335218715780ffd7f981","priority":1,"status":200,"text":"paddleaudio.compliance package\n==============================\n\n.. automodule:: paddleaudio.compliance\n   :members:\n   :undoc-members:\n   :show-inheritance:\n\nSubmodules\n----------\n\n.. toctree::\n   :maxdepth: 4\n\n   paddleaudio.compliance.kaldi\n   paddleaudio.compliance.librosa\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3B48:40B0C:1806D7:5EB892:6AB92F0D"},"text_sha256":"5ff045dff38b01e00a25d8ef59acf22eb8cc268aa683ee60c557f1187984fe72"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"Kyubyong/transformer","input_row":{"repository":"Kyubyong/transformer","url":"https://github.com/Kyubyong/transformer","name":"transformer","owner":"Kyubyong","description":"A TensorFlow Implementation of the Transformer: Attention Is All You Need","language":"Python","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":4474,"issues":160,"created_at":"2017-06-17T11:08:40Z","updated_at":"2026-09-24T02:49:05Z","first_commit_at":"2017-06-17T11:08:41Z","last_commit_at":"2019-09-24T01:54:24Z","activity_months":27.219999999999999,"ai_ml_match_topics":"transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:22.528Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"Kyubyong/transformer","visibility":"public","created_at":"2017-06-17T11:08:40Z","updated_at":"2026-09-24T02:49:05Z","private":false,"fork":false,"archived":false,"stargazers_count":4474,"open_issues_count":136,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1273","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0930:2BC4E5:184FFA9:1C7B6F0:6AB92F0E"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1272","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0895:70FF5:1800937:1C2C016:6AB92F0E"},"commit":{"sha":"6672f93c57ee97412a92989ed075d65244400227","url":"https://github.com/Kyubyong/transformer/commit/6672f93c57ee97412a92989ed075d65244400227","date":"2017-10-26T03:05:17Z","author_date":"2017-10-26T03:05:17Z","committer_date":"2017-10-26T03:05:17Z","tree_sha":"0c09167474af336e6b39b9d5304b641b98a9d37f","message_first_line":"Update train.py"},"tree_request_status":200,"tree_rate":{"github_remaining":"1271","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"091F:73962:1801624:1C2C9A3:6AB92F0F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4769,"blob_sha":"6d5cf9ad72a213697dc6eb9ecf4dc809bf2c7184","priority":0}],"documents":[{"path":"README.md","size":4769,"blob_sha":"6d5cf9ad72a213697dc6eb9ecf4dc809bf2c7184","priority":0,"status":200,"text":"# A TensorFlow Implementation of the Transformer: Attention Is All You Need\n\n## Requirements\n  * NumPy >= 1.11.1\n  * TensorFlow >= 1.2 (Probably 1.1 should work, too, though I didn't test it)\n  * regex\n  * nltk\n\n## Why This Project?\nI tried to implement the idea in [Attention Is All You Need](https://arxiv.org/abs/1706.03762). They authors claimed that their model, the Transformer, outperformed the state-of-the-art one in machine translation with only attention, no CNNs, no RNNs. How cool it is! At the end of the paper, they promise they will make their code available soon, but apparently it is not so yet. I have two goals with this project. One is I wanted to have a full understanding of the paper. Often it's hard for me to have a good grasp before writing some code for it. Another is to share my code with people who are interested in this model before the official code is unveiled.\n\n## Differences with the original paper\nI don't intend to replicate the paper exactly. Rather, I aim to implement the main ideas in the paper and verify them in a SIMPLE and QUICK way. In this respect, some parts in my code are different than those in the paper. Among them are\n* I used the IWSLT 2016 de-en dataset, not the wmt dataset because the former is much smaller, and requires no special preprocessing.\n* I constructed vocabulary with words, not subwords for simplicity. Of course, you can try bpe or word-piece if you want.\n* I parameterized positional encoding. The paper used some sinusoidal formula, but Noam, one of the authors, says they both work. See the [discussion in reddit](https://www.reddit.com/r/MachineLearning/comments/6gwqiw/r_170603762_attention_is_all_you_need_sota_nmt/)\n* The paper adjusted the learning rate to global steps. I fixed the learning to a small number, 0.0001 simply because training was reasonably fast enough with the small dataset (Only a couple of hours on a single GTX 1060!!).\n\n## File description\n  * `hyperparams.py` includes all hyper parameters that are needed.\n  * `prepro.py` creates vocabulary files for the source and the target.\n  * `data_load.py` contains functions regarding loading and batching data.\n  * `modules.py` has all building blocks for encoder/decoder networks.\n  * `train.py` has the model.\n  * `eval.py` is for evaluation.\n\n## Training\n* STEP 1. Download [IWSLT 2016 German–English parallel corpus](https://wit3.fbk.eu/download.php?release=2016-01&type=texts&slang=de&tlang=en) and extract it to `corpora/` folder.\n```sh\nwget -qO- --show-progress https://wit3.fbk.eu/archive/2016-01//texts/de/en/de-en.tgz | tar xz; mv de-en corpora\n```\n* STEP 2. Adjust hyper parameters in `hyperparams.py` if necessary.\n* STEP 3. Run `prepro.py` to generate vocabulary files to the `preprocessed` folder.\n* STEP 4. Run `train.py` or download the [pretrained files](https://www.dropbox.com/s/fo5wqgnbmvalwwq/logdir.zip?dl=0).\n\n## Training Loss and Accuracy\n* Training Loss\n<img src=\"fig/mean_loss.png\">\n\n* Training Accuracy\n<img src=\"fig/accuracy.png\">\n\n## Evaluation\n  * Run `eval.py`.\n\n## Results\nI got a BLEU score of 17.14. (Recollect I trained with a small dataset, limited vocabulary) Some of the evaluation results are as follows. Details are available in the `results` folder.\n\nsource: Sie war eine jährige Frau namens Alex<br>\nexpected: She was a yearold woman named Alex<br>\ngot: She was a woman named yearold name\n\nsource: Und als ich das hörte war ich erleichtert<br>\nexpected: Now when I heard this I was so relieved<br>\ngot: And when I heard that I was an <UNK>\n\nsource: Meine Kommilitonin bekam nämlich einen Brandstifter als ersten Patienten<br>\nexpected: My classmate got an arsonist for her first client<br>\ngot: Because my first <UNK> came from an in patients\n\nsource: Das kriege ich hin dachte ich mir<br>\nexpected: This I thought I could handle<br>\ngot: I'll go ahead and I thought\n\nsource: Aber ich habe es nicht hingekriegt<br>\nexpected: But I didn't handle it<br>\ngot: But I didn't <UNK> it\n\nsource: Ich hielt dagegen<br>\nexpected: I pushed back<br>\ngot: I thought about it\n\nsource: Das ist es was Psychologen einen AhaMoment nennen<br>\nexpected: That's what psychologists call an Aha moment<br>\ngot: That's what a <UNK> like a <UNK>\n\nsource: Meldet euch wenn ihr in euren ern seid<br>\nexpected: Raise your hand if you're in your s<br>\ngot: Get yourself in your s\n\nsource: Ich möchte ein paar von euch sehen<br>\nexpected: I really want to see some twentysomethings here<br>\ngot: I want to see some of you\n\nsource: Oh yeah Ihr seid alle unglaublich<br>\nexpected: Oh yay Y'all's awesome<br>\ngot: Oh yeah you all are incredibly\n\nsource: Dies ist nicht meine Meinung Das sind Fakten<br>\nexpected: This is not my opinion These are the facts<br>\ngot: This is not my opinion These are facts\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1582:1F1FB6:17FCB1:5EADB5:6AB92F0F"},"text_sha256":"6ba6f9929dabe7dcd0e86ab0765dcba9f55b19f89e7725425c5841ef41e26fca"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1270","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08F5:2D7D17:17AE1AD:1BD811F:6AB92F0F"},"commit":{"sha":"fb023bb097e08d53baf25b46a9da490beba51a21","url":"https://github.com/Kyubyong/transformer/commit/fb023bb097e08d53baf25b46a9da490beba51a21","date":"2019-09-24T01:54:24Z","author_date":"2019-09-24T01:54:24Z","committer_date":"2019-09-24T01:54:24Z","tree_sha":"871c5eec07b2b769de498db9ca3f69901af8c7d2","message_first_line":"removed query masking"},"tree_request_status":200,"tree_rate":{"github_remaining":"1269","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0802:1C46F8:17F0B89:1C1BB24:6AB92F10"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":2800,"blob_sha":"b3faf418ab825d7d4b20796bff5d917ee4d86d54","priority":0}],"documents":[{"path":"README.md","size":2800,"blob_sha":"b3faf418ab825d7d4b20796bff5d917ee4d86d54","priority":0,"status":200,"text":"# **[UPDATED]** A TensorFlow Implementation of [Attention Is All You Need](https://arxiv.org/abs/1706.03762)\n\nWhen I opened this repository in 2017, there was no official code yet.\nI tried to implement the paper as I understood, but to no surprise\nit had several bugs. I realized them mostly thanks to people who issued here, so\nI'm very grateful to all of them. Though there is the [official implementation](https://github.com/tensorflow/tensor2tensor) as well as\nseveral other unofficial github repos, I decided to update my own one.\nThis update focuses on:\n* readable / understandable code writing\n* modularization (but not too much)\n* revising known bugs. (masking, positional encoding, ...)\n* updating to TF1.12. (tf.data, ...)\n* adding some missing components (bpe, shared weight matrix, ...)\n* including useful comments in the code.\n\nI still stick to IWSLT 2016 de-en. I guess if you'd like to test on a big data such\nas WMT, you would rely on the official implementation.\nAfter all, it's pleasant to check quickly if your model works.\nThe initial code for TF1.2 is moved to the [tf1.2_lecacy](tf1.2_legacy) folder for the record.\n\n## Requirements\n* python==3.x (Let's move on to python 3 if you still use python 2)\n* tensorflow==1.12.0\n* numpy>=1.15.4\n* sentencepiece==0.1.8\n* tqdm>=4.28.1\n\n## Training\n* STEP 1. Run the command below to download [IWSLT 2016 German–English parallel corpus](https://wit3.fbk.eu/download.php?release=2016-01&type=texts&slang=de&tlang=en).\n```\nbash download.sh\n```\n It should be extracted to `iwslt2016/de-en` folder automatically.\n* STEP 2. Run the command below to create preprocessed train/eval/test data.\n```\npython prepro.py\n```\nIf you want to change the vocabulary size (default:32000), do this.\n```\npython prepro.py --vocab_size 8000\n```\nIt should create two folders `iwslt2016/prepro` and `iwslt2016/segmented`.\n\n* STEP 3. Run the following command.\n```\npython train.py\n```\nCheck `hparams.py` to see which parameters are possible. For example,\n```\npython train.py --logdir myLog --batch_size 256 --dropout_rate 0.5\n```\n\n* STEP 3. Or download the pretrained models.\n```\nwget https://dl.dropbox.com/s/4lom1czy5xfzr4q/log.zip; unzip log.zip; rm log.zip\n```\n\n\n## Training Loss Curve\n<img src=\"fig/loss.png\">\n\n## Learning rate\n<img src=\"fig/lr.png\">\n\n## Bleu score on devset\n<img src=\"fig/bleu.png\">\n\n\n## Inference (=test)\n* Run\n```\npython test.py --ckpt log/1/iwslt2016_E19L2.64-29146 (OR yourCkptFile OR yourCkptFileDirectory)\n```\n\n## Results\n* Typically, machine translation is evaluated with Bleu score.\n* All evaluation results are available in [eval/1](eval/1) and [test/1](test/1).\n\n|tst2013 (dev) | tst2014 (test) |\n|--|--|\n|28.06|23.88|\n\n## Notes\n* Beam decoding will be added soon.\n* I'm going to update the code when TF2.0 comes out if possible.","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F7E:386840:1881BF:5F33B2:6AB92F10"},"text_sha256":"b06edb444084fd9c4d1479a9d86c1e93c4148778b99c4e005a863075fc463b79"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"posthtml/posthtml","input_row":{"repository":"posthtml/posthtml","url":"https://github.com/posthtml/posthtml","name":"posthtml","owner":"posthtml","description":"PostHTML is a tool to transform HTML/XML with JS plugins","language":"JavaScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2960,"issues":140,"created_at":"2015-06-24T14:28:28Z","updated_at":"2026-09-22T10:54:20Z","first_commit_at":"2015-06-24T14:32:46Z","last_commit_at":"2025-10-07T07:17:02Z","activity_months":123.45,"ai_ml_match_topics":"transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:24.915Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"posthtml/posthtml","visibility":"public","created_at":"2015-06-24T14:28:28Z","updated_at":"2026-09-22T10:54:20Z","private":false,"fork":false,"archived":false,"stargazers_count":2960,"open_issues_count":18,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1268","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0902:74C18:1835553:1C6134A:6AB92F10"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1267","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"078F:72727:17D7B27:1C034FB:6AB92F11"},"commit":{"sha":"d87a6150b82983a921798fa81b0e7f23cc48cfdc","url":"https://github.com/posthtml/posthtml/commit/d87a6150b82983a921798fa81b0e7f23cc48cfdc","date":"2018-05-21T09:57:52Z","author_date":"2018-05-21T09:57:52Z","committer_date":"2018-05-21T09:57:52Z","tree_sha":"b3ac6746e499826f17d9402f2bfb8185145ff35a","message_first_line":"Merge pull request #267 from mohsen1/patch-1"},"tree_request_status":200,"tree_rate":{"github_remaining":"1266","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B8:156040:17FC3D4:1C27496:6AB92F11"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":26730,"blob_sha":"ce83b2ff47b41ac31466a0e6ce321bf3fdd82cc1","priority":0}],"documents":[{"path":"README.md","size":26730,"blob_sha":"ce83b2ff47b41ac31466a0e6ce321bf3fdd82cc1","priority":0,"status":200,"text":"[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Tests][build]][build-url]\n[![Coverage][cover]][cover-url]\n[![Standard Code Style][code-style]][code-style-url]\n[![Chat][chat]][chat-url]\n\n# PostHTML <img align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML\" src=\"http://posthtml.github.io/posthtml/logo.svg\">\n\nPostHTML is a tool for transforming HTML/XML with JS plugins. PostHTML itself is very small. It includes only a HTML parser, a HTML node tree API and a node tree stringifier.\n\nAll HTML transformations are made by plugins. And these plugins are just small plain JS functions, which receive a HTML node tree, transform it, and return a modified tree.\n\nFor more detailed information about PostHTML in general take a look at the [docs][docs].\n\n### Dependencies\n\n| Name | Status | Description |\n|:----:|:------:|:-----------:|\n|[posthtml-parser][parser]|[![npm][parser-badge]][parser-npm]| Parser HTML/XML to PostHTMLTree |\n|[posthtml-render][render]|[![npm][render-badge]][render-npm]| Render PostHTMLTree to HTML/XML |\n\n\n[docs]: https://github.com/posthtml/posthtml/blob/master/docs\n\n[parser]: https://github.com/posthtml/posthtml-parser\n[parser-badge]: https://img.shields.io/npm/v/posthtml-parser.svg\n[parser-npm]: https://npmjs.com/package/posthtml-parser\n\n[render]: https://github.com/posthtml/posthtml-render\n[render-badge]: https://img.shields.io/npm/v/posthtml-render.svg\n[render-npm]: https://npmjs.com/package/posthtml-render\n\n## Install\n\n```bash\nnpm i -D posthtml\n```\n\n## Usage\n\n### API\n\n**Sync**\n\n```js\nimport posthtml from 'posthtml'\n\nconst html = `\n  <component>\n    <title>Super Title<\/title>\n    <text>Awesome Text<\/text>\n  <\/component>\n`\n\nconst result = posthtml()\n  .use(require('posthtml-custom-elements')())\n  .process(html, { sync: true })\n  .html\n\nconsole.log(result)\n```\n\n```html\n<div class=\"component\">\n  <div class=\"title\">Super Title<\/div>\n  <div class=\"text\">Awesome Text<\/div>\n<\/div>\n```\n\n> :warning: Async Plugins can't be used in sync mode and will throw an Error. It's recommended to use PostHTML asynchronously whenever possible.\n\n**Async**\n\n```js\nimport posthtml from 'posthtml'\n\nconst html = `\n  <html>\n    <body>\n      <p class=\"wow\">OMG<\/p>\n    <\/body>\n  <\/html>\n`\n\nposthtml(\n  [\n    require('posthtml-to-svg-tags')(),\n    require('posthtml-extend-attrs')({\n      attrsTree: {\n        '.wow' : {\n          id: 'wow_id',\n          fill: '#4A83B4',\n          'fill-rule': 'evenodd',\n          'font-family': 'Verdana'\n        }\n      }\n    })\n  ])\n  .process(html/*, options */)\n  .then((result) =>  console.log(result.html))\n```\n\n```html\n<svg xmlns=\"http://www.w3.org/2000/svg\">\n  <text\n    class=\"wow\"\n    id=\"wow_id\"\n    fill=\"#4A83B4\"\n    fill-rule=\"evenodd\" font-family=\"Verdana\">\n      OMG\n  <\/text>\n<\/svg>\n```\n\n**Directives**\n\n```js\nimport posthtml from 'posthtml'\n\nconst php = `\n  <component>\n    <title><?php echo $title; ?><\/title>\n    <text><?php echo $article; ?><\/text>\n  <\/component>\n`\n\nconst result = posthtml()\n  .use(require('posthtml-custom-elements')())\n  .process(html, {\n    directives: [\n      { name: '?php', start: '<', end: '>' }\n    ]\n  })\n  .html\n\nconsole.log(result)\n```\n\n```html\n<div class=\"component\">\n  <div class=\"title\"><?php echo $title; ?><\/div>\n  <div class=\"text\"><?php echo $article; ?><\/div>\n<\/div>\n```\n\n### [CLI](https://npmjs.com/package/posthtml-cli)\n\n```bash\nnpm i posthtml-cli\n```\n\n```json\n\"scripts\": {\n  \"posthtml\": \"posthtml -o output.html -i input.html -c config.json\"\n}\n```\n\n```bash\nnpm run posthtml\n```\n\n### [Gulp](https://gulpjs.com)\n\n```bash\nnpm i -D gulp-posthtml\n```\n\n```js\nimport tap from 'gulp-tap'\nimport posthtml from 'gulp-posthtml'\nimport { task, src, dest } from 'gulp'\n\ntask('html', () => {\n  let path\n\n  const plugins = [ require('posthtml-include')({ root: `${path}` }) ]\n  const options = {}\n\n  src('src/**/*.html')\n    .pipe(tap((file) => path = file.path))\n    .pipe(posthtml(plugins, options))\n    .pipe(dest('build/'))\n})\n```\n\nCheck [project-stub](https://github.com/posthtml/project-stub) for an example with Gulp\n\n### [Grunt](https://gruntjs.com)\n\n```bash\nnpm i -D grunt-posthtml\n```\n\n```js\nposthtml: {\n  options: {\n    use: [\n      require('posthtml-doctype')({ doctype: 'HTML 5' }),\n      require('posthtml-include')({ root: './', encoding: 'utf-8' })\n    ]\n  },\n  build: {\n    files: [\n      {\n        dot: true,\n        cwd: 'html/',\n        src: ['*.html'],\n        dest: 'tmp/',\n        expand: true,\n      }\n    ]\n  }\n}\n```\n\n### [Webpack](https://webpack.js.org)\n\n```bash\nnpm i -D html-loader posthtml-loader\n```\n\n#### v1.x\n\n**webpack.config.js**\n\n```js\nconst config = {\n  module: {\n    loaders: [\n      {\n        test: /\\.html$/,\n        loader: 'html!posthtml'\n      }\n    ]\n  },\n  posthtml: (ctx) => ({\n      parser: require('posthtml-pug'),\n      plugins: [\n        require('posthtml-bem')()\n      ]\n  })\n}\n\nexport default config\n```\n\n#### v2.x\n\n**webpack.config.js**\n\n```js\nimport { LoaderOptionsPlugin } from 'webpack'\n\nconst config = {\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: [\n          {\n            loader: 'html-loader',\n            options: { minimize: true }\n          },\n          {\n            loader: 'posthtml-loader'\n          }\n        ]\n      }\n    ]\n  },\n  plugins: [\n    new LoaderOptionsPlugin({\n       options: {\n         posthtml(ctx) {\n          return {\n            parser: require('posthtml-pug'),\n            plugins: [\n              require('posthtml-bem')()\n            ]\n          }\n        }\n      }\n    })\n  ]\n}\n\nexport default config\n```\n\n### [Rollup](https://rollupjs.org/)\n\n```bash\n$ npm i rollup-plugin-posthtml -D\n# or\n$ npm i rollup-plugin-posthtml-template -D\n```\n\n```js\nimport { join } from 'path';\n\nimport posthtml from 'rollup-plugin-posthtml-template';\n// or\n// import posthtml from 'rollup-plugin-posthtml';\n\nimport sugarml from 'posthtml-sugarml';  // npm i posthtml-sugarml -D\nimport include from 'posthtml-include';  // npm i posthtml-include -D\n\nexport default {\n  entry: join(__dirname, 'main.js'),\n  dest: join(__dirname, 'bundle.js'),\n  format: 'iife',\n  plugins: [\n    posthtml({\n      parser: sugarml(),\n      plugins: [include()],\n      template: true  // only rollup-plugin-posthtml-template\n    })\n  ]\n};\n```\n\n## Parser\n\n```js\nimport pug from 'posthtml-pug'\n\nposthtml().process(html, { parser: pug(options) }).then((result) => result.html)\n```\n\n| Name |Status|Description|\n|:-----|:-----|:----------|\n|[posthtml-pug][pug]|[![npm][pug-badge]][pug-npm]|Pug Parser|\n|[sugarml][sugar]|[![npm][sugar-badge]][sugar-npm]|SugarML Parser|\n\n\n[pug]: https://github.com/posthtml/posthtml-pug\n[pug-badge]: https://img.shields.io/npm/v/posthtml-pug.svg\n[pug-npm]: https://npmjs.com/package/posthtml-pug\n\n[sugar]: https://github.com/posthtml/sugarml\n[sugar-badge]: https://img.shields.io/npm/v/sugarml.svg\n[sugar-npm]: https://npmjs.com/package/sugarml\n\n## [Plugins](http://maltsev.github.io/posthtml-plugins)\n\nIn case you want to develop your own plugin, we recommend using [posthtml-plugin-boilerplate][plugin] for getting started.\n\n[plugin]: https://github.com/posthtml/posthtml-plugin-boilerplate\n\n#### TEXT\n\n| Name |Status|Description|\n|:-----|:-----|:----------|\n|[posthtml-md][md]|[![npm][md-badge]][md-npm]|Easily use context-sensitive markdown within HTML|\n|[posthtml-lorem][lorem]|[![npm][lorem-badge]][lorem-npm]|Add lorem ipsum placeholder text to any document|\n|[posthtml-retext][text]|[![npm][text-badge]][text-npm]|Extensible system for analysing and manipulating natural language|\n|[prevent-widows][prevent-widows]|[![npm][prevent-widows-badge]][prevent-widows-npm]|Prevent widows from appearing at the end of paragraphs|\n\n[md]: https://github.com/jonathantneal/posthtml-md\n[md-badge]: https://img.shields.io/npm/v/posthtml-md.svg\n[md-npm]: https://npmjs.com/package/posthtml-md\n\n[text]: https://github.com/voischev/posthtml-retext\n[text-badge]: https://img.shields.io/npm/v/posthtml-retext.svg\n[text-npm]: https://npmjs.com/package/posthtml-retext\n\n[lorem]: https://github.com/jonathantneal/posthtml-lorem\n[lorem-badge]: https://img.shields.io/npm/v/posthtml-lorem.svg\n[lorem-npm]: https://npmjs.com/package/posthtml-lorem\n\n[prevent-widows]: https://github.com/bashaus/prevent-widows\n[prevent-widows-badge]: https://img.shields.io/npm/v/prevent-widows.svg\n[prevent-widows-npm]: https://npmjs.com/package/prevent-widows\n\n#### HTML\n\n|Name|Status|Description|\n|:---|:----:|:----------|\n|[posthtml-doctype][doctype]|[![npm][doctype-badge]][doctype-npm]|Set !DOCTYPE|\n|[posthtml-head-elements][head]|[![npm][head-badge]][head-npm]|Include head elements from JSON file|\n|[posthtml-include][include]|[![npm][include-badge]][include-npm]|Include HTML|\n|[posthtml-modules][modules]|[![npm][modules-badge]][modules-npm]|Include and process HTML|\n|[posthtml-extend][extend]|[![npm][extend-badge]][extend-npm]|Extend Layout (Pug-like)|\n|[posthtml-extend-attrs][attrs]|[![npm][attrs-badge]][attrs-npm]|Extend Attrs|\n|[posthtml-expressions][exp]|[![npm][exp-badge]][exp-npm]|Template Expressions|\n|[posthtml-inline-assets][assets]|[![npm][assets-badge]][assets-npm]|Inline external scripts, styles, and images|\n|[posthtml-static-react][react]|[![npm][react-badge]][react-npm]| Render custom elements as static React components|\n|[posthtml-custom-elements][elem]|[![npm][elem-badge]][elem-npm]|Use custom elements|\n|[posthtml-web-component][web]|[![npm][web-badge]][web-npm]|Web Component server-side rendering, Component as a Service (CaaS)|\n|[posthtml-spaceless][spaceless]|[![npm][spaceless-badge]][spaceless-npm]|Remove whitespace between HTML tags|\n|[posthtml-cache][cache]|[![npm][cache-badge]][cache-npm]|Add a nanoid to links in you tags|\n|[posthtml-highlight][highlight]|[![npm][highlight-badge]][highlight-npm]|Syntax highlight code elements|\n\n[cache]: https://github.com/posthtml/posthtml-cache\n[cache-badge]: https://img.shields.io/npm/v/posthtml-cache.svg\n[cache-npm]: https://npmjs.com/package/posthtml-cache\n\n[spaceless]: https://github.com/posthtml/posthtml-spaceless\n[spaceless-badge]: https://img.shields.io/npm/v/posthtml-spaceless.svg\n[spaceless-npm]: https://npmjs.com/package/posthtml-spaceless\n\n[doctype]: https://github.com/posthtml/posthtml-doctype\n[doctype-badge]: https://img.shields.io/npm/v/posthtml-doctype.svg\n[doctype-npm]: https://npmjs.com/package/posthtml-doctype\n\n[head]: https://github.com/TCotton/posthtml-head-elements\n[head-badge]: https://img.shields.io/npm/v/posthtml-head-elements.svg\n[head-npm]: https://npmjs.com/package/posthtml-head-elements\n\n[include]: https://github.com/posthtml/posthtml-include\n[include-badge]: https://img.shields.io/npm/v/posthtml-include.svg\n[include-npm]: https://npmjs.com/package/posthtml-include\n\n[modules]: https://github.com/posthtml/posthtml-modules\n[modules-badge]: https://img.shields.io/npm/v/posthtml-modules.svg\n[modules-npm]: https://npmjs.com/package/posthtml-modules\n\n[content]: https://github.com/posthtml/posthtml-content\n[content-badge]: https://img.shields.io/npm/v/posthtml-content.svg\n[content-npm]: https://npmjs.com/package/posthtml-content\n\n[exp]: https://github.com/posthtml/posthtml-exp\n[exp-badge]: https://img.shields.io/npm/v/posthtml-exp.svg\n[exp-npm]: https://npmjs.com/package/posthtml-exp\n\n[extend]: https://github.com/posthtml/posthtml-extend\n[extend-badge]: https://img.shields.io/npm/v/posthtml-extend.svg\n[extend-npm]: https://npmjs.com/package/posthtml-extend\n\n[attrs]: https://github.com/theprotein/posthtml-extend-attrs\n[attrs-badge]: https://img.shields.io/npm/v/posthtml-extend-attrs.svg\n[attrs-npm]: https://npmjs.com/package/posthtml-extend-attrs\n\n[assets]: https://github.com/jonathantneal/posthtml-inline-assets\n[assets-badge]: https://img.shields.io/npm/v/posthtml-inline-assets.svg\n[assets-npm]: https://npmjs.com/package/posthtml-inline-assets\n\n[elem]: https://github.com/posthtml/posthtml-custom-elements\n[elem-badge]: https://img.shields.io/npm/v/posthtml-custom-elements.svg\n[elem-npm]: https://npmjs.com/package/posthtml-custom-elements\n\n[web]: https://github.com/island205/posthtml-web-component\n[web-badge]: https://img.shields.io/npm/v/posthtml-web-component.svg\n[web-npm]: https://npmjs.com/package/posthtml-web-components\n\n[prefix]: https://github.com/stevenbenisek/posthtml-prefix-class\n[prefix-badge]: https://img.shields.io/npm/v/posthtml-prefix-class.svg\n[prefix-npm]: https://npmjs.com/package/posthtml-prefix-class\n\n[react]: https://github.com/rasmusfl0e/posthtml-static-react\n[react-badge]: https://img.shields.io/npm/v/posthtml-static-react.svg\n[react-npm]: https://npmjs.com/package/posthtml-static-react\n\n[highlight]: https://github.com/caseyWebb/posthtml-highlight\n[highlight-badge]: https://img.shields.io/npm/v/posthtml-highlight.svg\n[highlight-npm]: https://npmjs.com/package/posthtml-highlight\n\n#### CSS\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[posthtml-bem][bem]|[![npm][bem-badge]][bem-npm]|Support BEM naming in html structure|\n|[posthtml-postcss][css]|[![npm][css-badge]][css-npm]|Use [PostCSS][css-gh] in HTML document|\n|[posthtml-px2rem][px2rem]|[![npm][px2rem-badge]][px2rem-npm]|Change px to rem in Inline CSS|\n|[posthtml-css-modules][css-modules]|[![npm][css-modules-badge]][css-modules-npm]|Use CSS modules in HTML|\n|[posthtml-postcss-modules][postcss-modules]|[![npm][postcss-modules-badge]][postcss-modules-npm]|CSS Modules in html|\n|[posthtml-classes][classes]|[![npm][classes-badge]][classes-npm]|Get a list of classes from HTML|\n|[posthtml-prefix-class][prefix]|[![npm][prefix-badge]][prefix-npm]|Prefix class names\n|[posthtml-modular-css][modular]|[![npm][modular-badge]][modular-npm]|Make CSS modular|\n|[posthtml-inline-css][in]|[![npm][in-badge]][in-npm]|CSS Inliner|\n|[posthtml-collect-styles][collect-styles]|[![npm][collect-styles-badge]][collect-styles-npm]|Collect styles from html and put it in the head|\n|[posthtml-collect-inline-styles][collect]|[![npm][collect-badge]][collect-npm]|Collect inline styles and insert to head tag|\n|[posthtml-style-to-file][style]|[![npm][style-badge]][style-npm]| Save HTML style nodes and attributes to CSS file|\n|[posthtml-color-shorthand-hex-to-six-digit][hex]|[![npm][hex-badge]][hex-npm]|Enforce all hex color codes to be 6-char long|\n\n\n[bem]: https://github.com/rajdee/posthtml-bem\n[bem-badge]: https://img.shields.io/npm/v/posthtml-bem.svg\n[bem-npm]: https://npmjs.com/package/posthtml-bem\n\n[css]: https://github.com/posthtml/posthtml-postcss\n[css-badge]: https://img.shields.io/npm/v/posthtml-postcss.svg\n[css-npm]: https://npmjs.com/package/posthtml-postcss\n[css-gh]: https://github.com/postcss/postcss\n\n[postcss-modules]: https://github.com/posthtml/posthtml-postcss-modules\n[postcss-modules-badge]: https://img.shields.io/npm/v/posthtml-postcss-modules.svg\n[postcss-modules-npm]: https://npmjs.com/package/posthtml-postcss-modules\n\n[css-modules]: https://github.com/posthtml/posthtml-css-modules\n[css-modules-badge]: https://img.shields.io/npm/v/posthtml-css-modules.svg\n[css-modules-npm]: https://npmjs.com/package/posthtml-css-modules\n\n[collect-styles]: https://github.com/posthtml/posthtml-collect-styles\n[collect-styles-badge]: https://img.shields.io/npm/v/posthtml-collect-styles.svg\n[collect-styles-npm]: https://npmjs.com/package/posthtml-collect-styles\n\n[collect]: https://github.com/totora0155/posthtml-collect-inline-styles\n[collect-badge]: https://img.shields.io/npm/v/posthtml-collect-inline-styles.svg\n[collect-npm]: https://npmjs.com/package/posthtml-collect-inline-styles\n\n[px2rem]: https://github.com/weixin/posthtml-px2rem\n[px2rem-badge]: https://img.shields.io/npm/v/posthtml-px2rem.svg\n[px2rem-npm]: https://npmjs.com/package/posthtml-px2rem\n\n[classes]: https://github.com/rajdee/posthtml-classes\n[classes-badge]: https://img.shields.io/npm/v/posthtml-classes.svg\n[classes-npm]: https://npmjs.com/package/posthtml-classes\n\n[prefix]: https://github.com/stevenbenisek/posthtml-prefix-class\n[prefix-badge]: https://img.shields.io/npm/v/posthtml-prefix-class.svg\n[prefix-npm]: https://npmjs.com/package/posthtml-prefix-class\n\n[modular]: https://github.com/admdh/posthtml-modular-css\n[modular-badge]: https://img.shields.io/npm/v/posthtml-modular-css.svg\n[modular-npm]: https://npmjs.com/package/posthtml-modular-css\n\n[in]: https://github.com/posthtml/posthtml-inline-css\n[in-badge]: https://img.shields.io/npm/v/posthtml-inline-css.svg\n[in-npm]: https://npmjs.com/package/posthtml-inline-css\n\n[style]: https://github.com/posthtml/posthtml-style-to-file\n[style-badge]: https://img.shields.io/npm/v/posthtml-style-to-file.svg\n[style-npm]: https://npmjs.com/package/posthtml-style-to-file\n\n[hex]: https://github.com/code-and-send/posthtml-color-shorthand-hex-to-six-digit\n[hex-badge]: https://img.shields.io/npm/v/posthtml-color-shorthand-hex-to-six-digit.svg\n[hex-npm]: https://npmjs.com/package/posthtml-color-shorthand-hex-to-six-digit\n\n#### IMG & SVG\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[posthtml-img-autosize][img]|[![npm][img-badge]][img-npm]|Auto setting the width and height of \\<img\\>|\n|[posthtml-to-svg-tags][svg]|[![npm][svg-badge]][svg-npm]|Convert html tags to svg equals|\n|[posthtml-webp][webp]|[![npm][webp-badge]][webp-npm]|Add WebP support for images|\n|[posthtml-favicons][favicons]|[![npm][favicons-badge]][favicons-npm]|Generate Favicons and add related tags|\n\n[img]: https://github.com/posthtml/posthtml-img-autosize\n[img-badge]: https://img.shields.io/npm/v/posthtml-img-autosize.svg\n[img-npm]: https://npmjs.com/package/posthtml-img-autosize\n\n[svg]: https://github.com/theprotein/posthtml-to-svg-tags\n[svg-badge]: https://img.shields.io/npm/v/posthtml-to-svg-tags.svg\n[svg-npm]: https://npmjs.com/package/posthtml-to-svg-tags\n\n[webp]: https://github.com/seokirill/posthtml-webp\n[webp-badge]: https://img.shields.io/npm/v/posthtml-webp.svg\n[webp-npm]: https://npmjs.com/package/posthtml-webp\n\n[favicons]: https://github.com/mohsen1/posthtml-favicons\n[favicons-badge]: https://img.shields.io/npm/v/posthtml-favicons.svg\n[favicons-npm]: https://www.npmjs.com/package/posthtml-favicons\n\n#### Accessibility\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[posthtml-aria-tabs][aria]|[![npm][aria-badge]][aria-npm]|Write accessible tabs with minimal markup|\n|[posthtml-alt-always][alt]|[![npm][alt-badge]][alt-npm]|Always add alt attribute for images that don't have it|\n|[posthtml-schemas][schemas]|[![npm][schemas-badge]][schemas-npm]| Add microdata to your HTML|\n\n\n[alt]: https://github.com/ismamz/posthtml-alt-always\n[alt-badge]: https://img.shields.io/npm/v/posthtml-alt-always.svg\n[alt-npm]: https://npmjs.com/package/posthtml-alt-always\n\n[aria]: https://github.com/jonathantneal/posthtml-aria-tabs\n[aria-badge]: https://img.shields.io/npm/v/posthtml-aria-tabs.svg\n[aria-npm]: https://npmjs.com/package/posthtml-aria-tabs\n\n[schemas]: https://github.com/jonathantneal/posthtml-schemas\n[schemas-badge]: https://img.shields.io/npm/v/posthtml-schemas.svg\n[schemas-npm]: https://npmjs.com/package/posthtml-schemas\n\n#### Optimization\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[posthtml-shorten][shorten]|[![npm][shorten-badge]][shorten-npm]|Shorten URLs in HTML|\n|[posthtml-uglify][uglify]|[![npm][uglify-badge]][uglify-npm]|Shorten CSS in HTML|\n|[posthtml-minifier][minifier]|[![npm][minifier-badge]][minifier-npm]|Minify HTML|\n|[posthtml-remove-attributes][remove]|[![npm][remove-badge]][remove-npm]|Remove attributes unconditionally or with content match|\n|[posthtml-remove-tags][remove-tags]|[![npm][remove-tags-badge]][remove-tags-npm]|Remove tags with content match|\n|[posthtml-remove-duplicates][remove-duplicates]|[![npm][remove-duplicates-badge]][remove-duplicates-npm]|Remove duplicate elements from your html|\n|[posthtml-transformer][transform]|[![npm][transform-badge]][transform-npm]|Process HTML by directives in node attrs, such as inline scripts and styles, remove useless tags, concat scripts and styles etc.|\n|[htmlnano][nano]|[![npm][nano-badge]][nano-npm]|HTML Minifier|\n|[posthtml-email-remove-unused-css][unused]|[![npm][unused-badge]][unused-npm]|Remove unused CSS from email templates|\n\n\n[remove]: https://github.com/princed/posthtml-remove-attributes\n[remove-badge]: https://img.shields.io/npm/v/posthtml-remove-attributes.svg\n[remove-npm]: https://npmjs.com/package/posthtml-remove-attributes\n\n[remove-tags]: https://github.com/posthtml/posthtml-remove-tags\n[remove-tags-badge]: https://img.shields.io/npm/v/posthtml-remove-tags.svg\n[remove-tags-npm]: https://npmjs.com/package/posthtml-remove-tags\n\n[remove-duplicates]: https://github.com/canvaskisa/posthtml-remove-duplicates\n[remove-duplicates-badge]: https://img.shields.io/npm/v/posthtml-remove-duplicates.svg\n[remove-duplicates-npm]: https://npmjs.com/package/posthtml-remove-duplicates\n\n[minifier]: https://github.com/Rebelmail/posthtml-minifier\n[minifier-badge]: https://img.shields.io/npm/v/posthtml-minifier.svg\n[minifier-npm]: https://npmjs.com/package/posthtml-minifier\n\n[shorten]: https://github.com/Rebelmail/posthtml-shorten\n[shorten-badge]: https://img.shields.io/npm/v/posthtml-shorten.svg\n[shorten-npm]: https://npmjs.com/package/posthtml-shorten\n\n[uglify]: https://github.com/Rebelmail/posthtml-uglify\n[uglify-badge]: https://img.shields.io/npm/v/posthtml-uglify.svg\n[uglify-npm]: https://npmjs.com/package/posthtml-uglify\n\n[nano]: https://github.com/maltsev/htmlnano\n[nano-badge]: https://img.shields.io/npm/v/htmlnano.svg\n[nano-npm]: https://npmjs.com/package/htmlnano\n\n[unused]: https://github.com/code-and-send/posthtml-email-remove-unused-css\n[unused-badge]: https://img.shields.io/npm/v/posthtml-email-remove-unused-css.svg\n[unused-npm]: https://npmjs.com/package/posthtml-email-remove-unused-css\n\n[transform]: https://github.com/flashlizi/posthtml-transformer\n[transform-badge]: https://img.shields.io/npm/v/posthtml-transformer.svg\n[transform-npm]: https://npmjs.com/package/posthtml-transformer\n\n#### Workflow\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[posthtml-load-plugins][plugins]|[![npm][plugins-badge]][plugins-npm]|Autoload Plugins\n|[posthtml-load-options][options]|[![npm][options-badge]][options-npm]|Autoload Options (Parser && Render)|\n|[posthtml-load-config][config]|[![npm][config-badge]][config-npm]|Autoload Config (Plugins && Options)|\n|[posthtml-w3c][w3c]|[![npm][w3c-badge]][w3c-npm]|Validate HTML with W3C Validation|\n|[posthtml-hint][hint]|[![npm][hint-badge]][hint-npm]|Lint HTML with HTML Hint|\n|[posthtml-tidy][tidy]|[![npm][tidy-badge]][tidy-npm]|Sanitize HTML with HTML Tidy|\n\n[options]: https://github.com/posthtml/posthtml-load-options\n[options-badge]: https://img.shields.io/npm/v/posthtml-load-options.svg\n[options-npm]: https://npmjs.com/package/posthtml-load-options\n\n[plugins]: https://github.com/posthtml/posthtml-load-plugins\n[plugins-badge]: https://img.shields.io/npm/v/posthtml-load-plugins.svg\n[plugins-npm]: https://npmjs.com/package/posthtml-load-plugins\n\n[config]: https://github.com/posthtml/posthtml-load-config\n[config-badge]: https://img.shields.io/npm/v/posthtml-load-config.svg\n[config-npm]: https://npmjs.com/package/posthtml-load-config\n\n[tidy]: https://github.com/michael-ciniawsky/posthtml-tidy\n[tidy-badge]: https://img.shields.io/npm/v/posthtml-tidy.svg\n[tidy-npm]: https://npmjs.com/package/posthtml-tidy\n\n[hint]: https://github.com/posthtml/posthtml-hint\n[hint-badge]: https://img.shields.io/npm/v/posthtml-hint.svg\n[hint-npm]: https://npmjs.com/package/posthtml-hint\n\n[w3c]: https://github.com/posthtml/posthtml-w3c\n[w3c-badge]: https://img.shields.io/npm/v/posthtml-w3c.svg\n[w3c-npm]: https://npmjs.com/package/posthtml-w3c\n\n## Middleware\n\n|Name|Status|Description|\n|:---|:-----|:----------|\n|[koa-posthtml][koa]|[![npm][koa-badge]][koa-npm]|Koa Middleware|\n|[hapi-posthtml][hapi]|[![npm][hapi-badge]][hapi-npm]|Hapi Plugin|\n|[express-posthtml][express]|[![npm][express-badge]][express-npm]|Express Middleware|\n|[electron-posthtml][electron]|[![npm][electron-badge]][electron-npm]|Electron Plugin|\n|[metalsmith-posthtml][metalsmith]|[![npm][metalsmith-badge]][metalsmith-npm]|Metalsmith Plugin|\n\n\n[koa]: https://github.com/posthtml/koa-posthtml\n[koa-badge]: https://img.shields.io/npm/v/koa-posthtml.svg\n[koa-npm]: https://npmjs.com/package/koa-posthtml\n\n[hapi]: https://github.com/posthtml/hapi-posthtml\n[hapi-badge]: https://img.shields.io/npm/v/hapi-posthtml.svg\n[hapi-npm]: https://npmjs.com/package/hapi-posthtml\n\n[express]: https://github.com/posthtml/express-posthtml\n[express-badge]: https://img.shields.io/npm/v/express-posthtml.svg\n[express-npm]: https://npmjs.com/package/express-posthtml\n\n[electron]: https://github.com/posthtml/electron-posthtml\n[electron-badge]: https://img.shields.io/npm/v/electron-posthtml.svg\n[electron-npm]: https://npmjs.com/package/electron-posthtml\n\n[metalsmith]: https://github.com/posthtml/metalsmith-posthtml\n[metalsmith-badge]: https://img.shields.io/npm/v/metalsmith-posthtml.svg\n[metalsmith-npm]: https://npmjs.com/package/metalsmith-posthtml\n\n## Maintainers\n\n<table>\n  <tbody>\n   <tr>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/1510217?v=3&s=150\">\n      <br />\n      <a href=\"https://github.com/voischev\">Ivan Voischev<\/a>\n    <\/td>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/982072?v=3&s=150\">\n      <br />\n      <a href=\"https://github.com/awinogradov\">Anton Winogradov<\/a>\n    <\/td>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/677518?v=3&s=150\">\n      <br />\n      <a href=\"https://github.com/zxqfox\">Alexej Yaroshevich<\/a>\n    <\/td>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/1813468?v=3&s=150\">\n      <br />\n      <a href=\"https://github.com/Yeti-or\">Vasiliy<\/a>\n    <\/td>\n   <\/tr>\n  <tbody>\n<\/table>\n\n## Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [CONTRIBUTING](CONTRIBUTING.md).\n\n## LICENSE\n\n[MIT](LICENSE)\n\n\n[npm]: https://img.shields.io/npm/v/posthtml.svg\n[npm-url]: https://npmjs.com/package/posthtml\n\n[deps]: https://david-dm.org/posthtml/posthtml.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml\n\n[build]: https://travis-ci.org/posthtml/posthtml.svg?branch=master\n[build-url]: https://travis-ci.org/posthtml/posthtml?branch=master\n\n[cover]: https://coveralls.io/repos/posthtml/posthtml/badge.svg?branch=master\n[cover-url]: https://coveralls.io/r/posthtml/posthtml?branch=master\n\n[code-style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[code-style-url]: http://standardjs.com/\n\n[chat]: https://badges.gitter.im/posthtml/posthtml.svg\n[chat-url]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\"\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"6D02:3D501:187330:5F253A:6AB92F11"},"text_sha256":"512027de6f298940fb194c9bb558929dda463a0df148a57787a14f4d3ca749a7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1265","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0801:6C6ED:181C851:1C47D72:6AB92F12"},"commit":{"sha":"4e160d3c7a5afa29ca8d383d96ab8b1dce5b1ae8","url":"https://github.com/posthtml/posthtml/commit/4e160d3c7a5afa29ca8d383d96ab8b1dce5b1ae8","date":"2025-10-07T07:17:02Z","author_date":"2025-10-07T07:17:02Z","committer_date":"2025-10-07T07:17:02Z","tree_sha":"8ef71f2d64043ffb748b74048c84299ab588f40d","message_first_line":"0.16.7"},"tree_request_status":200,"tree_rate":{"github_remaining":"1264","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07BF:6C9BF:182DE00:1C59A3D:6AB92F13"},"tree_truncated":false,"document_candidates":[{"path":"readme.md","size":7457,"blob_sha":"1f582f1ccf9ec357dbb2857a6b0d02fac6a6d67f","priority":0}],"documents":[{"path":"readme.md","size":7457,"blob_sha":"1f582f1ccf9ec357dbb2857a6b0d02fac6a6d67f","priority":0,"status":200,"text":"# PostHTML <img align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML\" src=\"http://posthtml.github.io/posthtml/logo.svg\">\n\nPostHTML is a tool for transforming HTML/XML with JS plugins. PostHTML itself is very small. It includes only a HTML parser, a HTML node tree API and a node tree stringifier.\n\nAll HTML transformations are made by plugins. And these plugins are just small plain JS functions, which receive a HTML node tree, transform it, and return a modified tree.\n\nFor more detailed information about PostHTML in general take a look at the [docs](https://github.com/posthtml/posthtml/tree/master/docs).\n\n### Dependencies\n\n| Name | Description |\n|:----:|:-----------:|\n|[posthtml-parser](https://github.com/posthtml/posthtml-parser)| Parser HTML/XML to PostHTMLTree |\n|[posthtml-render](https://github.com/posthtml/posthtml-render)| Render PostHTMLTree to HTML/XML |\n\n## Create to your project\n\n```bash\nnpm init posthtml\n```\n\n## Install\n\n```bash\nnpm i -D posthtml\n```\n\n## Usage\n\n### API\n\n**Sync**\n\n```js\nimport posthtml from 'posthtml'\n\nconst html = `\n  <component>\n    <title>Super Title<\/title>\n    <text>Awesome Text<\/text>\n  <\/component>\n`\n\nconst result = posthtml()\n  .use(require('posthtml-custom-elements')())\n  .process(html, { sync: true })\n  .html\n\nconsole.log(result)\n```\n\n```html\n<div class=\"component\">\n  <div class=\"title\">Super Title<\/div>\n  <div class=\"text\">Awesome Text<\/div>\n<\/div>\n```\n\n> :warning: Async Plugins can't be used in sync mode and will throw an Error. It's recommended to use PostHTML asynchronously whenever possible.\n\n**Async**\n\n```js\nimport posthtml from 'posthtml'\n\nconst html = `\n  <html>\n    <body>\n      <p class=\"wow\">OMG<\/p>\n    <\/body>\n  <\/html>\n`\n\nposthtml(\n  [\n    require('posthtml-to-svg-tags')(),\n    require('posthtml-extend-attrs')({\n      attrsTree: {\n        '.wow' : {\n          id: 'wow_id',\n          fill: '#4A83B4',\n          'fill-rule': 'evenodd',\n          'font-family': 'Verdana'\n        }\n      }\n    })\n  ])\n  .process(html/*, options */)\n  .then((result) =>  console.log(result.html))\n```\n\n```html\n<svg xmlns=\"http://www.w3.org/2000/svg\">\n  <text\n    class=\"wow\"\n    id=\"wow_id\"\n    fill=\"#4A83B4\"\n    fill-rule=\"evenodd\" font-family=\"Verdana\">\n      OMG\n  <\/text>\n<\/svg>\n```\n\n**Directives**\n\n```js\nimport posthtml from 'posthtml'\n\nconst php = `\n  <component>\n    <title><?php echo $title; ?><\/title>\n    <text><?php echo $article; ?><\/text>\n  <\/component>\n`\n\nconst result = posthtml()\n  .use(require('posthtml-custom-elements')())\n  .process(html, {\n    directives: [\n      { name: '?php', start: '<', end: '>' }\n    ]\n  })\n  .html\n\nconsole.log(result)\n```\n\n```html\n<div class=\"component\">\n  <div class=\"title\"><?php echo $title; ?><\/div>\n  <div class=\"text\"><?php echo $article; ?><\/div>\n<\/div>\n```\n\n### [CLI](https://npmjs.com/package/posthtml-cli)\n\n```bash\nnpm i posthtml-cli\n```\n\n```json\n\"scripts\": {\n  \"posthtml\": \"posthtml -o output.html -i input.html -c config.json\"\n}\n```\n\n```bash\nnpm run posthtml\n```\n\n### [Gulp](https://gulpjs.com)\n\n```bash\nnpm i -D gulp-posthtml\n```\n\n```js\nimport tap from 'gulp-tap'\nimport posthtml from 'gulp-posthtml'\nimport { task, src, dest } from 'gulp'\n\ntask('html', () => {\n  let path\n\n  const plugins = [ require('posthtml-include')({ root: `${path}` }) ]\n  const options = {}\n\n  src('src/**/*.html')\n    .pipe(tap((file) => path = file.path))\n    .pipe(posthtml(plugins, options))\n    .pipe(dest('build/'))\n})\n```\n\nCheck [project-stub](https://github.com/posthtml/project-stub) for an example with Gulp\n\n### [Grunt](https://gruntjs.com)\n\n```bash\nnpm i -D grunt-posthtml\n```\n\n```js\nposthtml: {\n  options: {\n    use: [\n      require('posthtml-doctype')({ doctype: 'HTML 5' }),\n      require('posthtml-include')({ root: './', encoding: 'utf-8' })\n    ]\n  },\n  build: {\n    files: [\n      {\n        dot: true,\n        cwd: 'html/',\n        src: ['*.html'],\n        dest: 'tmp/',\n        expand: true,\n      }\n    ]\n  }\n}\n```\n\n### [Webpack](https://webpack.js.org)\n\n```bash\nnpm i -D html-loader posthtml-loader\n```\n\n#### v1.x\n\n**webpack.config.js**\n\n```js\nconst config = {\n  module: {\n    loaders: [\n      {\n        test: /\\.html$/,\n        loader: 'html!posthtml'\n      }\n    ]\n  },\n  posthtml: (ctx) => ({\n    parser: require('posthtml-pug'),\n    plugins: [\n      require('posthtml-bem')()\n    ]\n  })\n}\n\nexport default config\n```\n\n#### v2.x\n\n**webpack.config.js**\n\n```js\nimport { LoaderOptionsPlugin } from 'webpack'\n\nconst config = {\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: [\n          {\n            loader: 'html-loader',\n            options: { minimize: true }\n          },\n          {\n            loader: 'posthtml-loader'\n          }\n        ]\n      }\n    ]\n  },\n  plugins: [\n    new LoaderOptionsPlugin({\n      options: {\n        posthtml(ctx) {\n          return {\n            parser: require('posthtml-pug'),\n            plugins: [\n              require('posthtml-bem')()\n            ]\n          }\n        }\n      }\n    })\n  ]\n}\n\nexport default config\n```\n\n### [Rollup](https://rollupjs.org/)\n\n```bash\n$ npm i rollup-plugin-posthtml -D\n# or\n$ npm i rollup-plugin-posthtml-template -D\n```\n\n```js\nimport { join } from 'path';\n\nimport posthtml from 'rollup-plugin-posthtml-template';\n// or\n// import posthtml from 'rollup-plugin-posthtml';\n\nimport sugarml from 'posthtml-sugarml';  // npm i posthtml-sugarml -D\nimport include from 'posthtml-include';  // npm i posthtml-include -D\n\nexport default {\n  entry: join(__dirname, 'main.js'),\n  dest: join(__dirname, 'bundle.js'),\n  format: 'iife',\n  plugins: [\n    posthtml({\n      parser: sugarml(),\n      plugins: [include()],\n      template: true  // only rollup-plugin-posthtml-template\n    })\n  ]\n};\n```\n\n## Parser\n\n```js\nimport pug from 'posthtml-pug'\n\nposthtml().process(html, { parser: pug(options) }).then((result) => result.html)\n```\n\n| Name |Description|\n|:-----|:----------|\n|[posthtml-pug](https://github.com/posthtml/posthtml-pug)|Pug Parser|\n|[sugarml](https://github.com/posthtml/sugarml)|SugarML Parser|\n\n\n## Plugins\n\nIn case you want to develop your own plugin, we recommend using [posthtml-plugin-starter][plugin] to get started.\n\n- [posthtml-plugins](http://maltsev.github.io/posthtml-plugins)\n- [awesome-posthtml](https://github.com/posthtml/awesome-posthtml)\n\n[plugin]: https://github.com/posthtml/posthtml-plugin-starter\n\n## Maintainers\n\n<table>\n  <tbody>\n   <tr>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars0.githubusercontent.com/u/2789192?s=460&v=4\">\n      <br />\n      <a href=\"https://github.com/scrum\">Ivan Demidov<\/a>\n    <\/td>\n    <td align=\"center\">\n      <img width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/1510217?v=3&s=150\">\n      <br />\n      <a href=\"https://github.com/voischev\">Ivan Voischev<\/a>\n    <\/td>\n   <\/tr>\n  <tbody>\n<\/table>\n\n## Contributors\n\n<a href=\"https://github.com/posthtml/posthtml/graphs/contributors\"><img src=\"https://opencollective.com/posthtml/contributors.svg?width=890&button=false\" /><\/a>\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/posthtml#backer)]\n\n<a href=\"https://opencollective.com/posthtml#backers\" target=\"_blank\"><img src=\"https://opencollective.com/posthtml/backers.svg?width=885&button=false\"><\/a>\n\n[chat]: https://badges.gitter.im/posthtml/PostHTML.svg\n[chat-url]: https://gitter.im/posthtml/posthtml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\"\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"7664:24970A:186E3E:5F1DF4:6AB92F12"},"text_sha256":"8acb58ea52c8e9ff6ec93a76319cf5dc42a48101b34d858317edc2f697fa6738"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"flugg/laravel-responder","input_row":{"repository":"flugg/laravel-responder","url":"https://github.com/flugg/laravel-responder","name":"laravel-responder","owner":"flugg","description":"A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.","language":"PHP","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":888,"issues":138,"created_at":"2016-06-25T19:36:04Z","updated_at":"2026-09-24T09:47:53Z","first_commit_at":"2016-06-25T19:35:36Z","last_commit_at":"2026-09-22T11:59:07Z","activity_months":122.89,"ai_ml_match_topics":"transformer","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:27.875Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"flugg/laravel-responder","visibility":"public","created_at":"2016-06-25T19:36:04Z","updated_at":"2026-09-24T09:47:53Z","private":false,"fork":false,"archived":false,"stargazers_count":888,"open_issues_count":38,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1263","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0859:7580A:182B717:1C572F7:6AB92F13"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1262","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08BA:280FBC:17E9F3B:1C147CA:6AB92F14"},"commit":{"sha":"63a866e0c21a6a0f16fe6997f2d85c98eba54510","url":"https://github.com/flugg/laravel-responder/commit/63a866e0c21a6a0f16fe6997f2d85c98eba54510","date":"2018-04-28T12:29:09Z","author_date":"2018-04-28T12:29:09Z","committer_date":"2018-04-28T12:29:09Z","tree_sha":"5f65ffe9b6f799f74d7690540bf11be8d90d75af","message_first_line":"Merge pull request #119 from tayfunkayahan/only-functionality-not-working-with-relationships"},"tree_request_status":200,"tree_rate":{"github_remaining":"1261","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0916:70FF5:1800DAD:1C2C52F:6AB92F14"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":41844,"blob_sha":"b0d32d1d3372bde3362013b9e6a82dc182d55e1d","priority":0}],"documents":[{"path":"README.md","size":41844,"blob_sha":"b0d32d1d3372bde3362013b9e6a82dc182d55e1d","priority":0,"status":200,"text":"<p align=\"center\"><img src=\"http://designiack.no/package-logo.png\" width=\"396\" height=\"111\"><\/p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/flugger/laravel-responder\"><img src=\"https://poser.pugx.org/flugger/laravel-responder/v/stable?format=flat-square\" alt=\"Latest Stable Version\"><\/a>\n    <a href=\"https://packagist.org/packages/flugger/laravel-responder\"><img src=\"https://img.shields.io/packagist/dt/flugger/laravel-responder.svg?style=flat-square\" alt=\"Packagist Downloads\"><\/a>\n    <a href=\"LICENSE.md\"><img src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\" alt=\"Software License\"><\/a>\n    <a href=\"https://travis-ci.org/flugger/laravel-responder\"><img src=\"https://img.shields.io/travis/flugger/laravel-responder/master.svg?style=flat-square\" alt=\"Build Status\"><\/a>\n    <a href=\"https://scrutinizer-ci.com/g/flugger/laravel-responder/?branch=master\"><img src=\"https://img.shields.io/scrutinizer/g/flugger/laravel-responder.svg?style=flat-square\" alt=\"Code Quality\"><\/a>\n    <a href=\"https://scrutinizer-ci.com/g/flugger/laravel-responder/code-structure/master\"><img src=\"https://img.shields.io/scrutinizer/coverage/g/flugger/laravel-responder.svg?style=flat-square\" alt=\"Test Coverage\"><\/a>\n    <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PRMC9WLJY8E46&lc=NO&item_name=Laravel%20Responder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted\"><img src=\"https://img.shields.io/badge/donate-PayPal-yellow.svg?style=flat-square\" alt=\"Donate\"><\/a>\n<\/p>\n\nLaravel Responder is a package for building API responses, integrating [Fractal](https://github.com/thephpleague/fractal) into Laravel and Lumen. It can transform your data using transformers, create and serialize success- and error responses, handle exceptions and assist you with testing your responses.\n\n***\n### **2018 Update: Version 3.0 Released! 🎉**\n\n_3.0 has been released with many bug fixes, tons of new features and some breaking changes. Make sure to check out the [changelog](CHANGELOG.md) to get an overview of everything fresh. The [Creating Transformers](#creating-transformers) and [Transforming Data](#transforming-data) sections of the documentation has also been rewritten for clarity and to account for the new changes._\n***\n\n# Table of Contents\n\n- [Introduction](#introduction)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Creating Responses](#creating-responses)\n    - [Creating Success Responses](#creating-success-responses)\n    - [Creating Transformers](#creating-transformers)\n    - [Transforming Data](#transforming-data)\n    - [Creating Error Responses](#creating-error-responses)\n    - [Handling Exceptions](#handling-exceptions)\n- [Contributing](#contributing)\n- [Donating](#contributing)\n- [License](#license)\n\n# Introduction\n\nLaravel lets you return models directly from a controller method to convert it to JSON. This is a quick way to build APIs but leaves your database columns exposed. [Fractal](https://fractal.thephpleague.com), a popular PHP package from [The PHP League](https://thephpleague.com/), solves this by introducing transformers. However, it can be a bit cumbersome to integrate into the framework as seen below:\n\n```php\n public function index()\n {\n    $resource = new Collection(User::all(), new UserTransformer());\n\n    return response()->json((new Manager)->createData($resource)->toArray());\n }\n```\n\nNot _that_ bad, but we all get a little spoiled by Laravel's magic. Wouldn't it be better if we could refactor it to:\n\n```php\npublic function index()\n{\n    return responder()->success(User::all())->respond();\n}\n```\n\nThe package will allow you to do this and much more. The goal has been to create a high-quality package that feels like native Laravel. A package that lets you embrace the power of Fractal, while hiding it behind beautiful abstractions. There has also been put a lot of focus and thought to the documentation. Happy exploration!\n\n# Requirements\n\nThis package requires:\n- PHP __7.0__+\n- Laravel __5.1__+ or Lumen __5.1__+\n\n# Installation\n\nTo get started, install the package through Composer:\n\n```shell\ncomposer require flugger/laravel-responder\n```\n\n## Laravel\n\n#### Register Service Provider\n\nAppend the following line to the `providers` key in `config/app.php` to register the package:\n\n```php\nFlugg\\Responder\\ResponderServiceProvider::class,\n```\n\n***\n_The package supports auto-discovery, so if you use Laravel 5.5 or later you may skip registering the service provider and facades as they will be registered automatically._\n***\n\n#### Register Facades _(optional)_\n\nIf you like facades, you may also append the `Responder` and `Transformation` facades to the `aliases` key:\n\n```php\n'Responder' => Flugg\\Responder\\Facades\\Responder::class,\n'Transformation' => Flugg\\Responder\\Facades\\Transformation::class,\n```\n\n#### Publish Package Assets _(optional)_\n\nYou may additionally publish the package configuration and language file using the `vendor:publish` Artisan command:\n\n```shell\nphp artisan vendor:publish --provider=\"Flugg\\Responder\\ResponderServiceProvider\"\n```\n\nThis will publish a `responder.php` configuration file in your `config` folder. It will also publish an `errors.php` file inside your `lang/en` folder which can be used for storing error messages.\n\n## Lumen\n\n#### Register Service Provider\n\nAdd the following line to `app/bootstrap.php` to register the package:\n\n```php\n$app->register(Flugg\\Responder\\ResponderServiceProvider::class);\n```\n\n#### Register Facades _(optional)_\n\nYou may also add the following lines to `app/bootstrap.php` to register the facades:\n\n```php\nclass_alias(Flugg\\Responder\\Facades\\Responder::class, 'Responder');\nclass_alias(Flugg\\Responder\\Facades\\Transformation::class, 'Transformation');\n```\n\n#### Publish Package Assets _(optional)_\n\nSeeing there is no `vendor:publish` command in Lumen, you will have to create your own `config/responder.php` file if you want to configure the package.\n\n# Usage\n\nThis documentation assumes some knowledge of how [Fractal](https://github.com/thephpleague/fractal) works.\n\n## Creating Responses\n\nThe package has a `Responder` service class, which has a `success` and `error` method to build success- and error responses respectively. To use the service and begin creating responses, pick one of the options below:\n\n#### Option 1: Inject `Responder` Service\n\nYou may inject the `Flugg\\Responder\\Responder` service class directly into your controller methods:\n\n```php\npublic function index(Responder $responder)\n{\n    return $responder->success();\n}\n```\n\nYou can also use the `error` method to create error responses:\n\n```php\nreturn $responder->error();\n```\n\n#### Option 2: Use `responder` Helper\n\nIf you're a fan of Laravel's `response` helper function, you may like the `responder` helper function:\n\n```php\nreturn responder()->success();\n```\n```php\nreturn responder()->error();\n```\n\n#### Option 3: Use `Responder` Facade\n\nOptionally, you may use the `Responder` facade to create responses:\n\n```php\nreturn Responder::success();\n```\n```php\nreturn Responder::error();\n```\n\n#### Option 4: Use `MakesApiResponses` Trait\n\nLastly, the package provides a `Flugg\\Responder\\Http\\MakesResponses` trait you can use in your controllers:\n\n```php\nreturn $this->success();\n```\n\n```php\nreturn $this->error();\n```\n\n***\n_Which option you pick is up to you, they are all equivalent, the important thing is to stay consistent. The helper function (option 2) will be used for the remaining of the documentation._\n***\n\n### Building Responses\n\nThe `success` and `error` methods return a `SuccessResponseBuilder` and `ErrorResponseBuilder` respectively, which both extend an abstract `ResponseBuilder`, giving them common behaviors. They will be converted to JSON when returned from a controller, but you can explicitly create an instance of `Illuminate\\Http\\JsonResponse` with the `respond` method:\n\n```php\nreturn responder()->success()->respond();\n```\n\n```php\nreturn responder()->error()->respond();\n```\n\nThe status code is set to `200` by default, but can be changed by setting the first parameter. You can also pass a list of headers as the second argument:\n\n```php\nreturn responder()->success()->respond(201, ['x-foo' => true]);\n```\n\n```php\nreturn responder()->error()->respond(404, ['x-foo' => false]);\n```\n\n***\n_Consider always using the `respond` method for consistency's sake._\n***\n\n### Casting Response Data\n\nInstead of converting the response to a `JsonResponse` using the `respond` method, you can cast the response data to a few other types, like an array:\n\n```php\nreturn responder()->success()->toArray();\n```\n\n```php\nreturn responder()->error()->toArray();\n```\n\nYou also have a `toCollection` and `toJson` method at your disposal.\n\n### Decorating Response\n\nA response decorator allows for last minute changes to the response before it's returned. The package comes with two response decorators out of the box adding a `status` and `success` field to the response output. The `decorators` key in the configuration file defines a list of all enabled response decorators:\n\n```php\n'decorators' => [\n    \\Flugg\\Responder\\Http\\Responses\\Decorators\\StatusCodeDecorator::class,\n    \\Flugg\\Responder\\Http\\Responses\\Decorators\\SuccessFlagDecorator::class,\n],\n```\n\nYou may disable a decorator by removing it from the list, or add your own decorator extending the abstract class `Flugg\\Responder\\Http\\Responses\\Decorators\\ResponseDecorator`. You can also add additional decorators per response:\n\n```php\nreturn responder()->success()->decorator(ExampleDecorator::class)->respond();\n```\n```php\nreturn responder()->error()->decorator(ExampleDecorator::class)->respond();\n```\n\n***\n\nThe package also ships with some situational decorators disabled by default, but which can be added to the decorator list: \n- `PrettyPrintDecorator` decorator will beautify the JSON output;\n\n```php\n\\Flugg\\Responder\\Http\\Responses\\Decorators\\PrettyPrintDecorator::class,\n```\n\n- `EscapeHtmlDecorator` decorator, based on the \"sanitize input, escape output\" concept, will escape HTML entities in all strings returned by your API. You can securely store input data \"as is\" (even malicious HTML tags) being sure that it will be outputted as un-harmful strings. Note that, using this decorator, printing data as text will result in the wrong representation and you must print it as HTML to retrieve the original value.\n\n```php\n\\Flugg\\Responder\\Http\\Responses\\Decorators\\EscapeHtmlDecorator::class,\n```\n\n***\n\n## Creating Success Responses\n\nAs briefly demonstrated above, success responses are created using the `success` method:\n\n```php\nreturn responder()->success()->respond();\n```\n\nAssuming no changes have been made to the configuration, the above code would output the following JSON:\n\n```json\n{\n    \"status\": 200,\n    \"success\": true,\n    \"data\": null\n}\n```\n\n### Setting Response Data\n\nThe `success` method takes the response data as the first argument:\n\n```php\nreturn responder()->success(Product::all())->respond();\n```\n\nIt accepts the same data types as you would normally return from your controllers, however, it also supports query builder and relationship instances:\n\n```php\nreturn responder()->success(Product::where('id', 1))->respond();\n```\n\n```php\nreturn responder()->success(Product::first()->shipments())->respond();\n```\n\n***\n_The package will run the queries and convert them to collections behind the scenes._\n***\n\n### Transforming Response Data\n\nThe response data will be transformed with Fractal if you've attached a transformer to the response. There are two ways to attach a transformer; either _explicitly_ by setting it on the response, or _implicitly_ by binding it to a model. Let's look at both ways in greater detail.\n\n#### Setting Transformer On Response\n\nYou can attach a transformer to the response by sending a second argument to the `success` method. For instance, below we're attaching a simple closure transformer, transforming a list of products to only output their names:\n\n```php\nreturn responder()->success(Product::all(), function ($product) {\n    return ['name' => $product->name];\n})->respond();\n```\n\nYou may also transform using a dedicated transformer class:\n\n```php\nreturn responder()->success(Product::all(), ProductTransformer::class)->respond();\n```\n\n```php\nreturn responder()->success(Product::all(), new ProductTransformer)->respond();\n```\n\n***\n_You can read more about creating dedicated transformer classes in the [Creating Transformers](#creating-transformers) chapter._\n***\n\n#### Binding Transformer To Model\n\nIf no transformer is set, the package will search the response data for an element implementing the `Flugg\\Responder\\Contracts\\Transformable` interface to resolve a transformer from. You can take use of this by implementing the `Transformable` interface in your models:\n\n```php\nclass Product extends Model implements Transformable {}\n```\n\nYou can satisfy the contract by adding a `transformer` method that returns the corresponding transformer:\n\n```php\n/**\n * Get a transformer for the class.\n *\n * @return \\Flugg\\Responder\\Transformers\\Transformer|string|callable\n */\npublic function transformer()\n{\n    return ProductTransformer::class;\n}\n```\n\n***\n_You're not limited to returning a class name string, you can return a transformer instance or closure transformer, just like the second parameter of the `success` method._\n***\n\nInstead of implementing the `Transformable` contract for all models, an alternative approach is to bind the transformers using the `bind` method on the `TransformerResolver` class. You can place the code below within `AppServiceProvider` or an entirely new `TransformerServiceProvider`:\n\n```php\nuse Flugg\\Responder\\Contracts\\Transformers\\TransformerResolver;\n\npublic function boot()\n{\n    $this->app->make(TransformerResolver::class)->bind([\n        \\App\\Product::class => \\App\\Transformers\\ProductTransformer::class,\n        \\App\\Shipment::class => \\App\\Transformers\\ShipmentTransformer::class,\n    ]);\n}\n```\n\nAfter you've bound a transformer to a model you can skip the second parameter and still transform the data:\n\n```php\nreturn responder()->success(Product::all())->respond();\n```\n\n***\n_As you might have noticed, unlike Fractal, you don't need to worry about creating resource objects like `Item` and `Collection`. The package will make one for you based on the data type, however, you may wrap your data in a resource to override this._\n***\n\n### Setting Resource Key\n\nIf the data you send into the response is a model or contains a list of models, a resource key will implicitly be resolved from the model's table name. You can overwrite this by adding a `getResourceKey` method to your model:\n\n```php\npublic function getResourceKey(): string {\n    return 'products';\n}\n```\n\nYou can also explicitly set a resource key on a response by sending a third argument to the ´success` method:\n\n```php\nreturn responder()->success(Product::all(), ProductTransformer::class, 'products')->respond();\n```\n\n### Paginating Response Data\n\nSending a paginator to the `success` method will set pagination meta data and transform the data automatically, as well as append any query string parameters to the paginator links.\n\n```php\nreturn responder()->success(Product::paginate())->respond();\n```\n\nAssuming there are no products and the default configuration is used, the JSON output would look like:\n\n```json\n{\n    \"success\": true,\n    \"status\": 200,\n    \"data\": null,\n    \"pagination\": {\n        \"total\": 0,\n        \"count\": 0,\n        \"perPage\": 15,\n        \"currentPage\": 1,\n        \"totalPages\": 1\n    }\n}\n```\n\n#### Setting Paginator On Response\n\nInstead of sending a paginator as data, you may set the data and paginator seperately, like you traditionally would with Fractal. You can manually set a paginator using the `paginator` method, which expects an instance of `League\\Fractal\\Pagination\\IlluminatePaginatorAdapter`:\n\n```php\n$paginator = Product::paginate();\n$adapter = new IlluminatePaginatorAdapter($paginator);\n\nreturn responder()->success($paginator->getCollection())->paginator($adapter)->respond();\n```\n\n#### Setting Cursor On Response\n\nYou can also set cursors using the `cursor` method, expecting an instance of `League\\Fractal\\Pagination\\Cursor`:\n\n```php\nif ($request->has('cursor')) {\n    $products = Product::where('id', '>', request()->cursor)->take(request()->limit)->get();\n} else {\n    $products = Product::take(request()->limit)->get();\n}\n\n$cursor = new Cursor(request()->cursor, request()->previous, $products->last()->id ?? null, Product::count());\n\nreturn responder()->success($products)->cursor($cursor)->respond();\n```\n\n### Including Relationships\n\nIf a transformer class is attached to the response, you can include relationships using the `with` method:\n\n```php\nreturn responder()->success(Product::all())->with('shipments')->respond();\n```\n\nYou can send multiple arguments and specify nested relations using dot notation:\n\n```php\nreturn responder()->success(Product::all())->with('shipments', 'orders.customer')->respond();\n```\n\nAll relationships will be automatically eager loaded, and just like you would when using `with` or `load` to eager load with Eloquent, you may use a callback to specify additional query constraints. Like in the example below, where we're only including related shipments that hasn't yet been shipped:\n\n```php\nreturn responder()->success(Product::all())->with(['shipments' => function ($query) {\n    $query->whereNull('shipped_at');\n}])->respond();\n```\n\n#### Including From Query String\n\nRelationships are loaded from a query string parameter if the `load_relations_parameter` configuration key is set to a string. By default, it's set to `with`, allowing you to automatically include relations from the query string:\n\n```\nGET /products?with=shipments,orders.customer\n```\n\n#### Excluding Default Relations\n\nIn your transformer classes, you may specify relations to automatically load. You may disable any of these relations using the `without` method:\n\n```php\nreturn responder()->success(Product::all())->without('comments')->respond();\n```\n\n### Filtering Transformed Data\n\nThe technique of filtering the transformed data to only return what we need is called sparse fieldsets and can be specified using the `only` method:\n\n```php\nreturn responder()->success(Product::all())->only('id', 'name')->respond();\n```\n\nWhen including relationships, you may also want to filter fields on related resources as well. This can be done by instead specifying an array where each key represents the resource keys for the resources being filtered\n\n```php\nreturn responder()->success(Product::all())->with('shipments')->only([\n    'products' => ['id', 'name'],\n    'shipments' => ['id']\n])->respond();\n```\n\n#### Filtering From Query String\n\nFields will automatically be filtered if the `filter_fields_parameter` configuration key is set to a string. It defaults to `only`, allowing you to filter fields from the query string:\n\n```\nGET /products?only=id,name\n```\n\nYou may automatically filter related resources by setting the parameter to a key-based array:\n\n```\nGET /products?with=shipments&only[products]=id,name&only[shipments]=id\n```\n\n### Adding Meta Data\n\nYou may want to attach additional meta data to your response. You can do this using the `meta` method:\n\n```php\nreturn responder()->success(Product::all())->meta(['count' => Product::count()])->respond();\n```\n\nWhen using the default serializer, the meta data will simply be appended to the response array:\n\n```json\n{\n    \"success\": true,\n    \"status\": 200,\n    \"data\": [],\n    \"count\": 0\n}\n```\n\n### Serializing Response Data\n\nAfter the data has been transformed, it will be serialized using the specified success serializer in the configuration file, which defaults to the package's own `Flugg\\Responder\\Serializers\\SuccessSerializer`. You can overwrite this on your responses using the `serializer` method:\n\n```php\nreturn responder()->success()->serializer(JsonApiSerializer::class)->respond();\n```\n\n```php\nreturn responder()->success()->serializer(new JsonApiSerializer())->respond();\n```\n\nAbove we're using Fractal's `JsonApiSerializer` class. Fractal also ships with an `ArraySerializer` and `DataArraySerializer` class. If none of these suit your taste, feel free to create your own serializer by extending `League\\Fractal\\Serializer\\SerializerAbstract`. You can read more about it in [Fractal's documentation](http://fractal.thephpleague.com/serializers/).\n\n## Creating Transformers\n\nA dedicated transformer class gives you a convenient location to transform data and allows you to reuse the transformer at multiple places. It also allows you to include and transform relationships. You can create a transformer using the `make:transformer` Artisan command:\n\n```shell\nphp artisan make:transformer ProductTransformer\n```\n\nThe command will generate a new `ProductTransformer.php` file in the `app/Transformers` folder:\n\n```php\n<?php\n\nnamespace App\\Transformers;\n\nuse App\\User;\nuse Flugg\\Responder\\Transformers\\Transformer;\n\nclass ProductTransformer extends Transformer\n{\n    /**\n     * List of available relations.\n     *\n     * @var string[]\n     */\n    protected $relations = [];\n\n    /**\n     * A list of autoloaded default relations.\n     *\n     * @var array\n     */\n    protected $load = [];\n\n    /**\n     * Transform the model.\n     *\n     * @param  \\App\\Product $product\n     * @return array\n     */\n    public function transform(Product $product): array\n    {\n        return [\n            'id' => (int) $product->id,\n        ];\n    }\n}\n```\n\nIt will automatically resolve a model name from the name provided. For instance, the package will extract `Product` from `ProductTransformer` and assume the models live directly in the `app` folder (as per Laravel's convention). If you store them somewhere else, you can use the `--model` (or `-m`) option to override it: \n\n```shell\nphp artisan make:transformer ProductTransformer --model=\"App\\Models\\Product\"\n```\n\n#### Creating Plain Transformers\n\nThe transformer file generated above is a model transformer expecting an `App\\Product` model for the `transform` method. However, we can create a plain transformer by applying the `--plain` (or `-p`) modifier:\n\n```shell\nphp artisan make:transformer ProductTransformer --plain\n```\n\nThis will remove the typehint from the `transform` method and add less boilerplate code.\n\n### Setting Relationships\n\nThe `$relations` and `$load` properties in the transformer are the equivalent to Fractal's own `$availableIncludes` and `$defaultIncludes`. In addition to the slight name change, the package uses the `$relations` and `$load` properties to map out all available relationships for eager loading, so in contrast to Fractal, you should map the relationship to their corresponding transformer:\n\n```php\nprotected $relations = [\n    'shipments' => ShipmentTransformer::class,\n];\n```\n\n***\n_You can choose to skip the mapping and just pass the strings like with Fractal, but that means the package wont be able to eager load relationships automatically._\n***\n\n#### Setting Whitelisted Relationships\n\nThe `$relations` property specifies a list of relations available to be included. You can set it to a wildcard allowing the access to all relations on the transformer:\n\n```php\nprotected $relations = ['*'];\n```\n\nIf you want to whitelist certain relations, you can set a list of relations mapped to their corresponding transformers:\n\n```php\nprotected $relations = [\n    'shipments' => ShipmentTransformer::class,\n    'orders' => OrderTransformer::class,\n];\n```\n\n***\n_**Security warning:** Since the transformer doesn't know what relations exists on a model unless you specify it in `$relations` or `$load`, you're technically allowing calls to any method on your model when using a wildcard. You should therefore consider always specifying a whitelist._\n***\n\n#### Setting Autoloaded Relationships\n\nThe `$load` property specifies a list of relations to be autoloaded every time you transform data with the transformer:\n\n```php\nprotected $load = [\n    'shipments' => ShipmentTransformer::class,\n    'orders' => OrderTransformer::class,\n];\n```\n\n***\n_You don't have to add relations to both `$relations` and `$load`, all relations in `$load` will be available by nature._\n***\n\n### Including Relationships\n\nWhile Fractal requires you to to create a method in your transformer for every included relation, this package lets you skip this when transforming models, as it will automatically fetch relationships from the model. You may of course override this functionality by creating an \"include\" method:\n\n```php\n/**\n * Include related shipments.\n *\n * @param  \\App\\Product $product\n * @return mixed\n */\npublic function includeShipments(Product $product)\n{\n    return $product->shipments;\n}\n```\n\nUnlike Fractal you can just return the data directly without wrapping it in an `item` or `collection` method.\n\n***\n_You should be careful with executing database calls inside the include methods as you might end up with an unexpected amount of hits to the database._\n***\n\n#### Using Include Parameters\n\nFractal can parse query string parameters which can be used when including relations. For more information about how to format the parameters see Fractal's [documentation on parameters](https://fractal.thephpleague.com/transformers/#include-parameters). You may access the parameters by adding a second parameter to the \"include\" method:\n\n```php\npublic function includeShipments(Product $product, Collection $parameters)\n{\n    return $product->shipments->take($parameters->get('limit'));\n}\n```\n\n***\n_To be as decoupled from Fractal as possible the parameters (which are normally accessed using `League\\Fractal\\ParamBag`) are accessed as Laravel collections instead._\n***\n\n#### Adding Query Constraints\n\nJust as you can specify a query constraint when including a relationship with the `with` method, you can also add query constraints as a \"load\" method on the transformer. This will automatically be applied when extracting relationships for eager loading.\n\n```php\n/**\n * Load shipments with constraints.\n *\n * @param  \\Illuminate\\Database\\Eloquent\\Builder $query\n * @return \\Illuminate\\Database\\Eloquent\\Builder\n */\npublic function loadShipments($query)\n{\n    return $query->whereNull('shipped_at');\n}\n```\n\n***\n_Note: You cannot mix \"include\" and \"load\" methods because the package doesn't eager load relationships included with an \"include\" method._\n***\n\n### Filtering Relationships\n\nAfter a relation has been included, you can make any last second changes to it using a filter method. For instance, below we're filtering the list of related shipments to only include shipments that has not been shipped:\n\n```php\n/**\n * Filter included shipments.\n *\n * @param  \\Illuminate\\Database\\Eloquent\\Collection $shipments\n * @return \\Illuminate\\Support\\Collection\n */\npublic function filterShipments($shipments)\n{\n    return $shipments->filter(function ($shipment) {\n        return is_null($shipment->shipped_at);\n    });\n}\n```\n\n## Transforming Data\n\nWe've looked at how to transform response data of success responses, however, there may be other places than your controllers where you want to transform data. An example is broadcasted events where you're exposing data using websockets instead of HTTP. You just want to return the transformed data, not an entire response. \n\nIt's possible to simply transform data by newing up the transformer and calling `transform`:\n\n```php\nreturn (new ProductTransformer)->transform(Product::first());\n```\n\nHowever, this approach might become a bit messy when building transformations with relationships:\n\n```php\nreturn array_merge((new ProductTransformer)->transform($product = Product::first()), [\n    'shipments' => $product->shipments->map(function ($shipment) {\n        return (new ShipmentTransformer)->transform($shipment);\n    })\n]);\n```\n\nYuck! Imagine that with multiple nested relationships. Let's explore a simpler way to handle this.\n\n### Building Transformations\n\nThe `SuccessResponseBuilder` actually delegates all of the transformation work to a dedicated `Flugg\\Responder\\TransformBuilder` class. We can use this class ourself to transform data. For instance, if the product and shipment transformers were bound to the models, we could replicate the code above in the following way:\n\n```php\npublic function index(TransformBuilder $transformation)\n{\n    return $transformation->resource(Product::all())->with('shipments')->transform();\n}\n```\n\nInstead of using the `success` method on the `Responder` service, we use the `resouce` method on the `TransformBuilder` with the same method signature. We also use `transform` to execute the transformation instead of `respond` as we did when creating responses. In addition to the `with` method, you also have access to the other transformation methods like `without`, `only`, `meta` and `serializer`.\n\n***\n_Using `toArray` on the `Responder` service is almost the same as the code above, however, it will also include response decorators which might not be desired._\n***\n\n### Transforming Without Serializing\n\nWhen using the `TransformBuilder` to transform data it will still serialize the data using the configured serializer. Fractal requires the use of a serializer to transform data, but sometimes we're just interested in the raw transformed data. The package ships with a `Flugg\\Responder\\Serializers\\NoopSerializer` to solve this, a no-op serializer which leaves the transformed data untouched:\n\n```php\nreturn $transformation->resource(Product::all())->serializer(NoopSerializer::class)->transform();\n```\n\nIf you think this is looking messy, don't worry, there's a quicker way. In fact, you will probably never even need to utilize the `NoopSerializer` or `TransformBuilder` manually, but it helps to know how it works. The `Flugg\\Responder\\Transformation` is a class which can be used for quickly transforming data without serializing.\n\n#### Option 1: The `Transformation` Service\n\nThe `Transformation` class utilizes the `TransformBuilder` class to build a transformation using the `NoopSerializer`. You can inject the `Transformation` class and call `make` to obtain an instance of `TransformBuilder` which gives you access to all of the chainable methods including `with`, like below:\n\n```php\npublic function __construct(Transformation $transformation)\n{\n    $transformation->make(Product::all())->with('shipments')->transform();\n}\n```\n\n#### Option 2: The `transformation` Helper\n\nYou can use the `transformation` helper function to transform data without serializing:\n\n```php\ntransformation(Product::all())->with('shipments')->transform();\n```\n\n#### Option 3: The `Transformation` Facade\n\nYou can also use the `Transformation` facade to achieve the same thing:\n\n```php\nTransformation::make(Product::all())->with('shipments')->transform();\n```\n\n### Transforming To Camel Case\n\nModel attributes are traditionally specified in snake case, however, you might prefer to use camel case for the response fields. A transformer makes for a perfect location to convert the fields, as seen from the `soldOut` field in the example below:\n\n```php\nreturn responder()->success(Product::all(), function ($product) {\n    return ['soldOut' => (bool) $product->sold_out];    \n})->respond();\n```\n\n#### Transforming Request Parameters\n\nAfter responding with camel case, you probably want to let people send in request data using camel cased parameters as well. The package provides a `Flugg\\Responder\\Http\\Middleware\\ConvertToSnakeCase` middleware you can append to the `$middleware` array in `app/Http/Kernel.php` to convert all parameters to snake case automatically:\n\n```php\nprotected $middleware = [\n    // ...\n    \\Flugg\\Responder\\Http\\Middleware\\ConvertToSnakeCase::class,\n];\n```\n\n***\n_The middleware will run before request validation, so you should specify your validation rules in snake case as well._\n***\n\n## Creating Error Responses\n\nWhenever a consumer of your API does something unexpected, you can return an error response describing the problem. As briefly shown in a previous chapter, an error response can be created using the `error` method:\n\n```php\nreturn responder()->error()->respond();\n```\n\nThe error response has knowledge about an error code, a corresponding error message and optionally some error data. With the default configuration, the above code would output the following JSON:\n\n```json\n{\n    \"success\": false,\n    \"status\": 500,\n    \"error\": {\n        \"code\": null,\n        \"message\": null\n    }\n}\n```\n\n### Setting Error Code & Message\n\nYou can fill the first parameter of the `error` method to set an error code:\n\n```php\nreturn responder()->error('sold_out_error')->respond();\n```\n\n***\n_You may optionally use integers for error codes._\n***\n\nIn addition, you may set the second parameter to an error message describing the error:\n\n```php\nreturn responder()->error('sold_out_error', 'The requested product is sold out.')->respond();\n```\n\n#### Set Messages In Language Files\n\nYou can set the error messages in a language file, which allows for returning messages in different languages. The configuration file has an `error_message_files` key defining a list of language files with error messages. By default, it is set to `['errors']`, meaning it will look for an `errors.php` file inside `resources/lang/en`. You can use these files to map error codes to corresponding error messages:\n\n```php\nreturn [\n    'sold_out_error' => 'The requested product is sold out.',\n];\n```\n\n#### Register Messages Using `ErrorMessageResolver`\n\nInstead of using language files, you may alternatively set error messages directly on the `ErrorMessageResolver` class. You can place the code below within `AppServiceProvider` or an entirely new `TransformerServiceProvider`:\n\n```php\nuse Flugg\\Responder\\ErrorMessageResolver;\n\npublic function boot()\n{\n    $this->app->make(ErrorMessageResolver::class)->register([\n        'sold_out_error' => 'The requested product is sold out.',\n    ]);\n}\n```\n\n### Adding Error Data\n\nYou may want to set additional data on the error response. Like in the example below, we're returning a list of shipments with the `sold_out` error response, giving the consumer information about when a new shipment for the product might arrive.\n\n```php\nreturn responder()->error('sold_out')->data(['shipments' => Shipment::all()])->respond();\n```\n\nThe error data will be appended to the response data. Assuming we're using the default serializer and there are no shipments in the database, the code above would look like:\n\n```json\n{\n    \"success\": false,\n    \"status\": 500,\n    \"error\": {\n        \"code\": \"sold_out\",\n        \"message\": \"The requested product is sold out.\",\n        \"shipments\": []\n    }\n}\n```\n\n### Serializing Response Data\n\nSimilarly to success responses, error responses will be serialized using the specified error serializer in the configuration file. This defaults to the package's own `Flugg\\Responder\\Serializers\\ErrorSerializer`, but can of course be changed by using the `serializer` method:\n\n```php\nreturn responder()->error()->serializer(ExampleErrorSerializer::class)->respond();\n```\n\n```php\nreturn responder()->success()->serializer(new ExampleErrorSerializer())->respond();\n```\n\nYou can create your own error serializer by implementing the `Flugg\\Responder\\Contracts\\ErrorSerializer` contract.\n\n## Handling Exceptions\n\nNo matter how much we try to avoid them, exceptions do happen. Responding to the exceptions in an elegant manner will improve the user experience of your API. The package can enhance your exception handler to automatically turn exceptions in to error responses. If you want to take use of this, you can either use the package's exception handler or include a trait as described in further details below.\n\n#### Option 1: Replace `Handler` Class\n\nTo use the package's exception handler you need to replace the default import in `app/Exceptions/Handler.php`:\n\n```php\nuse Illuminate\\Foundation\\Exceptions\\Handler as ExceptionHandler;\n```\n\nWith the package's handler class:\n\n```php\nuse Flugg\\Responder\\Exceptions\\Handler as ExceptionHandler;\n```\n\n***\nThis will not work with Lumen as its exception handler is incompatible with Laravel's. Look instead at the second option below.\n***\n\n#### Option 2: Use `ConvertsExceptions` Trait\n\nThe package's exception handler uses the `Flugg\\Responder\\Exceptions\\ConvertsExceptions` trait to load of most of its work. Instead of replacing the exception handler, you can use the trait in your own handler class. To replicate the behavior of the exception handler, you would also have to add the following code to the `render` method:\n\n```php\npublic function render($request, Exception $exception)\n{\n    $this->convertDefaultException($exception);\n\n    if ($exception instanceof HttpException) {\n        return $this->renderResponse($exception);\n    }\n\n    return parent::render($request, $exception);\n}\n```\n\nIf you only want to return JSON error responses on requests actually asking for JSON, you may wrap the code above in a `wantsJson` check as seen below:\n\n```php\nif ($request->wantsJson()) {\n    $this->convertDefaultException($exception);\n\n    if ($exception instanceof HttpException) {\n        return $this->renderResponse($exception);\n    }\n}\n```\n\n### Converting Exceptions\n\nOnce you've implemented one of the above options, the package will convert some of Laravel's exceptions to an exception extending `Flugg\\Responder\\Exceptions\\Http\\HttpException`. It will then convert these to an error response. The table below shows which Laravel exceptions are converted and what they are converted to. All the exceptions on the right is under the `Flugg\\Responder\\Exceptions\\Http` namespace and extends `Flugg\\Responder\\Exceptions\\Http\\HttpException`. All exceptions extending the `HttpException` class will be automatically converted to an error response. \n\n| Caught Exceptions                                               | Converted To                 |\n| --------------------------------------------------------------- | ---------------------------- |\n| `Illuminate\\Auth\\AuthenticationException`                       | `UnauthenticatedException`   |\n| `Illuminate\\Auth\\Access\\AuthorizationException`                 | `UnauthorizedException`      |\n| `Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException`  | `PageNotFoundException`      |\n| `Illuminate\\Database\\Eloquent\\ModelNotFoundException`           | `PageNotFoundException`      |\n| `Illuminate\\Database\\Eloquent\\RelationNotFoundException`        | `RelationNotFoundException`  |\n| `Illuminate\\Validation\\ValidationException`                     | `ValidationFailedException`  |\n\nYou can disable the conversions of some of the exceptions above using the `$dontConvert` property:\n\n```php\n/**\n * A list of default exception types that should not be converted.\n *\n * @var array\n */\nprotected $dontConvert = [\n    ModelNotFoundException::class,\n];\n```\n\n***\nIf you're using the trait option, you can disable all the default conversions by removing the call to `convertDefaultException` in the `render` method.\n***\n\n#### Convert Custom Exceptions\n\nIn addition to letting the package convert Laravel exceptions, you can also convert your own exceptions using the `convert` method in the `render` method:\n\n```php\n$this->convert($exception, [\n    InvalidValueException => PageNotFoundException,\n]);\n```\n\nYou can optionally give it a closure that throws the new exception, if you want to give it constructor parameters: \n\n```php\n$this->convert($exception, [\n    MaintenanceModeException => function ($exception) {\n        throw new ServerDownException($exception->retryAfter);\n    },\n]);\n```\n\n### Creating HTTP Exceptions\n\nAn exception class is a convenient place to store information about an error. The package provides an abstract exception class `Flugg\\Responder\\Exceptions\\Http\\HttpException`, which has knowledge about status code, an error code and an error message. Continuing on our product example from above, we could create our own `HttpException` class:\n\n```php\n<?php\n\nnamespace App\\Exceptions;\n\nuse Flugg\\Responder\\Exceptions\\Http\\HttpException;\n\nclass SoldOutException extends HttpException\n{\n    /**\n     * The HTTP status code.\n     *\n     * @var int\n     */\n    protected $status = 400;\n\n    /**\n     * The error code.\n     *\n     * @var string|null\n     */\n    protected $errorCode = 'sold_out_error';\n\n    /**\n     * The error message.\n     *\n     * @var string|null\n     */\n    protected $message = 'The requested product is sold out.';\n}\n```\n\nYou can also add a `data` method returning additional error data:\n\n```php\n/**\n * Retrieve additional error data.\n *\n * @return array|null\n */\npublic function data()\n{\n    return [\n        'shipments' => Shipment::all()\n    ];\n}\n```\n\nIf you're letting the package handle exceptions, you can now throw the exception anywhere in your application and it will automatically be rendered to an error response.\n\n```php\nthrow new SoldOutException();\n```\n\n# Contributing\n\nContributions are more than welcome and you're free to create a pull request on Github. You can run tests with the following command:\n\n```shell\nvendor/bin/phpunit\n```\n\nIf you find bugs or have suggestions for improvements, feel free to submit an issue on Github. However, if it's a security related issue, please send an email to flugged@gmail.com instead.\n\n# Donating\n\nThe package is completely free to use, however, a lot of time has been put into making it. If you want to show your appreciation by leaving a small donation, you can do so by clicking [here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PRMC9WLJY8E46&lc=NO&item_name=Laravel%20Responder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted). Thanks!\n\n# License\n\nLaravel Responder is free software distributed under the terms of the MIT license. See [license.md](license.md) for more details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E1C6:727CE:176DDA:5E2055:6AB92F14"},"text_sha256":"c620001251203bed1911fa7148d4cb7081c553bc11327aa49b264c84c2ee3915"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1260","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07C0:6E4BB:182A04D:1C554A9:6AB92F16"},"commit":{"sha":"35e85128e7ae417bbb21a4e80afee15edff75c79","url":"https://github.com/flugg/laravel-responder/commit/35e85128e7ae417bbb21a4e80afee15edff75c79","date":"2026-06-25T15:10:19Z","author_date":"2026-06-25T15:10:19Z","committer_date":"2026-06-25T15:10:19Z","tree_sha":"7952bc61cd6643d41794a6a4ed8ed7a35d5dc2a6","message_first_line":"```txt"},"tree_request_status":200,"tree_rate":{"github_remaining":"1259","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085A:74E6D:1831254:1C5D178:6AB92F16"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":41008,"blob_sha":"9780c75de86f2e6a96b8204554c9a8e8fc85a72e","priority":0}],"documents":[{"path":"README.md","size":41008,"blob_sha":"9780c75de86f2e6a96b8204554c9a8e8fc85a72e","priority":0,"status":200,"text":"<p align=\"center\"><img src=\"https://user-images.githubusercontent.com/1271812/111231999-824f2b00-85ea-11eb-9afc-c0176529a234.png\" width=\"500px\"><\/p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/flugger/laravel-responder\"><img src=\"https://poser.pugx.org/flugger/laravel-responder/v/stable?format=flat-square\" alt=\"Latest Stable Version\"><\/a>\n    <a href=\"https://packagist.org/packages/flugger/laravel-responder\"><img src=\"https://img.shields.io/packagist/dt/flugger/laravel-responder.svg?style=flat-square\" alt=\"Packagist Downloads\"><\/a>\n    <a href=\"LICENSE.md\"><img src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\" alt=\"Software License\"><\/a>\n    <a href=\"https://travis-ci.org/flugger/laravel-responder\"><img src=\"https://img.shields.io/travis/flugger/laravel-responder/master.svg?style=flat-square\" alt=\"Build Status\"><\/a>\n    <a href=\"https://scrutinizer-ci.com/g/flugger/laravel-responder/?branch=master\"><img src=\"https://img.shields.io/scrutinizer/g/flugger/laravel-responder.svg?style=flat-square\" alt=\"Code Quality\"><\/a>\n    <a href=\"https://scrutinizer-ci.com/g/flugger/laravel-responder/code-structure/master\"><img src=\"https://img.shields.io/scrutinizer/coverage/g/flugger/laravel-responder.svg?style=flat-square\" alt=\"Test Coverage\"><\/a>\n    <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PRMC9WLJY8E46&lc=NO&item_name=Laravel%20Responder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted\"><img src=\"https://img.shields.io/badge/donate-PayPal-yellow.svg?style=flat-square\" alt=\"Donate\"><\/a>\n<\/p>\n\nLaravel Responder is a package for building API responses, integrating [Fractal](https://github.com/thephpleague/fractal) into Laravel and Lumen. It can transform your data using transformers, create and serialize success- and error responses, handle exceptions and assist you with testing your responses.\n\n# Table of Contents\n\n- [Introduction](#introduction)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Creating Responses](#creating-responses)\n    - [Creating Success Responses](#creating-success-responses)\n    - [Creating Transformers](#creating-transformers)\n    - [Transforming Data](#transforming-data)\n    - [Creating Error Responses](#creating-error-responses)\n    - [Handling Exceptions](#handling-exceptions)\n- [Contributing](#contributing)\n- [Donating](#contributing)\n- [License](#license)\n\n# Introduction\n\nLaravel lets you return models directly from a controller method to convert it to JSON. This is a quick way to build APIs but leaves your database columns exposed. [Fractal](https://fractal.thephpleague.com), a popular PHP package from [The PHP League](https://thephpleague.com/), solves this by introducing transformers. However, it can be a bit cumbersome to integrate into the framework as seen below:\n\n```php\n public function index()\n {\n    $resource = new Collection(User::all(), new UserTransformer());\n\n    return response()->json((new Manager)->createData($resource)->toArray());\n }\n```\n\nNot _that_ bad, but we all get a little spoiled by Laravel's magic. Wouldn't it be better if we could refactor it to:\n\n```php\npublic function index()\n{\n    return responder()->success(User::all())->respond();\n}\n```\n\nThe package will allow you to do this and much more. The goal has been to create a high-quality package that feels like native Laravel. A package that lets you embrace the power of Fractal, while hiding it behind beautiful abstractions. There has also been put a lot of focus and thought to the documentation. Happy exploration!\n\n# Requirements\n\nThis package requires:\n- PHP __7.0__+\n- Laravel __5.1__+ or Lumen __5.1__+\n\n# Installation\n\nTo get started, install the package through Composer:\n\n```shell\ncomposer require flugger/laravel-responder\n```\n\n## Laravel\n\n#### Register Service Provider\n\nAppend the following line to the `providers` key in `config/app.php` to register the package:\n\n```php\nFlugg\\Responder\\ResponderServiceProvider::class,\n```\n\n***\n_The package supports auto-discovery, so if you use Laravel 5.5 or later you may skip registering the service provider and facades as they will be registered automatically._\n***\n\n#### Register Facades _(optional)_\n\nIf you like facades, you may also append the `Responder` and `Transformation` facades to the `aliases` key:\n\n```php\n'Responder' => Flugg\\Responder\\Facades\\Responder::class,\n'Transformation' => Flugg\\Responder\\Facades\\Transformation::class,\n```\n\n#### Publish Package Assets _(optional)_\n\nYou may additionally publish the package configuration and language file using the `vendor:publish` Artisan command:\n\n```shell\nphp artisan vendor:publish --provider=\"Flugg\\Responder\\ResponderServiceProvider\"\n```\n\nThis will publish a `responder.php` configuration file in your `config` folder. It will also publish an `errors.php` file inside your `lang/en` folder which can be used for storing error messages.\n\n## Lumen\n\n#### Register Service Provider\n\nAdd the following line to `app/bootstrap.php` to register the package:\n\n```php\n$app->register(Flugg\\Responder\\ResponderServiceProvider::class);\n```\n\n#### Register Facades _(optional)_\n\nYou may also add the following lines to `app/bootstrap.php` to register the facades:\n\n```php\nclass_alias(Flugg\\Responder\\Facades\\Responder::class, 'Responder');\nclass_alias(Flugg\\Responder\\Facades\\Transformation::class, 'Transformation');\n```\n\n#### Publish Package Assets _(optional)_\n\nSeeing there is no `vendor:publish` command in Lumen, you will have to create your own `config/responder.php` file if you want to configure the package.\n\n# Usage\n\nThis documentation assumes some knowledge of how [Fractal](https://github.com/thephpleague/fractal) works.\n\n## Creating Responses\n\nThe package has a `Responder` service class, which has a `success` and `error` method to build success- and error responses respectively. To use the service and begin creating responses, pick one of the options below:\n\n#### Option 1: Inject `Responder` Service\n\nYou may inject the `Flugg\\Responder\\Responder` service class directly into your controller methods:\n\n```php\npublic function index(Responder $responder)\n{\n    return $responder->success();\n}\n```\n\nYou can also use the `error` method to create error responses:\n\n```php\nreturn $responder->error();\n```\n\n#### Option 2: Use `responder` Helper\n\nIf you're a fan of Laravel's `response` helper function, you may like the `responder` helper function:\n\n```php\nreturn responder()->success();\n```\n```php\nreturn responder()->error();\n```\n\n#### Option 3: Use `Responder` Facade\n\nOptionally, you may use the `Responder` facade to create responses:\n\n```php\nreturn Responder::success();\n```\n```php\nreturn Responder::error();\n```\n\n#### Option 4: Use `MakesResponses` Trait\n\nLastly, the package provides a `Flugg\\Responder\\Http\\MakesResponses` trait you can use in your controllers:\n\n```php\nreturn $this->success();\n```\n\n```php\nreturn $this->error();\n```\n\n***\n_Which option you pick is up to you, they are all equivalent, the important thing is to stay consistent. The helper function (option 2) will be used for the remaining of the documentation._\n***\n\n### Building Responses\n\nThe `success` and `error` methods return a `SuccessResponseBuilder` and `ErrorResponseBuilder` respectively, which both extend an abstract `ResponseBuilder`, giving them common behaviors. They will be converted to JSON when returned from a controller, but you can explicitly create an instance of `Illuminate\\Http\\JsonResponse` with the `respond` method:\n\n```php\nreturn responder()->success()->respond();\n```\n\n```php\nreturn responder()->error()->respond();\n```\n\nThe status code is set to `200` by default, but can be changed by setting the first parameter. You can also pass a list of headers as the second argument:\n\n```php\nreturn responder()->success()->respond(201, ['x-foo' => true]);\n```\n\n```php\nreturn responder()->error()->respond(404, ['x-foo' => false]);\n```\n\n***\n_Consider always using the `respond` method for consistency's sake._\n***\n\n### Casting Response Data\n\nInstead of converting the response to a `JsonResponse` using the `respond` method, you can cast the response data to a few other types, like an array:\n\n```php\nreturn responder()->success()->toArray();\n```\n\n```php\nreturn responder()->error()->toArray();\n```\n\nYou also have a `toCollection` and `toJson` method at your disposal.\n\n### Decorating Response\n\nA response decorator allows for last minute changes to the response before it's returned. The package comes with two response decorators out of the box adding a `status` and `success` field to the response output. The `decorators` key in the configuration file defines a list of all enabled response decorators:\n\n```php\n'decorators' => [\n    \\Flugg\\Responder\\Http\\Responses\\Decorators\\StatusCodeDecorator::class,\n    \\Flugg\\Responder\\Http\\Responses\\Decorators\\SuccessFlagDecorator::class,\n],\n```\n\nYou may disable a decorator by removing it from the list, or add your own decorator extending the abstract class `Flugg\\Responder\\Http\\Responses\\Decorators\\ResponseDecorator`. You can also add additional decorators per response:\n\n```php\nreturn responder()->success()->decorator(ExampleDecorator::class)->respond();\n```\n```php\nreturn responder()->error()->decorator(ExampleDecorator::class)->respond();\n```\n\n***\n\nThe package also ships with some situational decorators disabled by default, but which can be added to the decorator list: \n- `PrettyPrintDecorator` decorator will beautify the JSON output;\n\n```php\n\\Flugg\\Responder\\Http\\Responses\\Decorators\\PrettyPrintDecorator::class,\n```\n\n- `EscapeHtmlDecorator` decorator, based on the \"sanitize input, escape output\" concept, will escape HTML entities in all strings returned by your API. You can securely store input data \"as is\" (even malicious HTML tags) being sure that it will be outputted as un-harmful strings. Note that, using this decorator, printing data as text will result in the wrong representation and you must print it as HTML to retrieve the original value.\n\n```php\n\\Flugg\\Responder\\Http\\Responses\\Decorators\\EscapeHtmlDecorator::class,\n```\n\n***\n\n## Creating Success Responses\n\nAs briefly demonstrated above, success responses are created using the `success` method:\n\n```php\nreturn responder()->success()->respond();\n```\n\nAssuming no changes have been made to the configuration, the above code would output the following JSON:\n\n```json\n{\n    \"status\": 200,\n    \"success\": true,\n    \"data\": null\n}\n```\n\n### Setting Response Data\n\nThe `success` method takes the response data as the first argument:\n\n```php\nreturn responder()->success(Product::all())->respond();\n```\n\nIt accepts the same data types as you would normally return from your controllers, however, it also supports query builder and relationship instances:\n\n```php\nreturn responder()->success(Product::where('id', 1))->respond();\n```\n\n```php\nreturn responder()->success(Product::first()->shipments())->respond();\n```\n\n***\n_The package will run the queries and convert them to collections behind the scenes._\n***\n\n### Transforming Response Data\n\nThe response data will be transformed with Fractal if you've attached a transformer to the response. There are two ways to attach a transformer; either _explicitly_ by setting it on the response, or _implicitly_ by binding it to a model. Let's look at both ways in greater detail.\n\n#### Setting Transformer On Response\n\nYou can attach a transformer to the response by sending a second argument to the `success` method. For instance, below we're attaching a simple closure transformer, transforming a list of products to only output their names:\n\n```php\nreturn responder()->success(Product::all(), function ($product) {\n    return ['name' => $product->name];\n})->respond();\n```\n\nYou may also transform using a dedicated transformer class:\n\n```php\nreturn responder()->success(Product::all(), ProductTransformer::class)->respond();\n```\n\n```php\nreturn responder()->success(Product::all(), new ProductTransformer)->respond();\n```\n\n***\n_You can read more about creating dedicated transformer classes in the [Creating Transformers](#creating-transformers) chapter._\n***\n\n#### Binding Transformer To Model\n\nIf no transformer is set, the package will search the response data for an element implementing the `Flugg\\Responder\\Contracts\\Transformable` interface to resolve a transformer from. You can take use of this by implementing the `Transformable` interface in your models:\n\n```php\nclass Product extends Model implements Transformable {}\n```\n\nYou can satisfy the contract by adding a `transformer` method that returns the corresponding transformer:\n\n```php\n/**\n * Get a transformer for the class.\n *\n * @return \\Flugg\\Responder\\Transformers\\Transformer|string|callable\n */\npublic function transformer()\n{\n    return ProductTransformer::class;\n}\n```\n\n***\n_You're not limited to returning a class name string, you can return a transformer instance or closure transformer, just like the second parameter of the `success` method._\n***\n\nInstead of implementing the `Transformable` contract for all models, an alternative approach is to bind the transformers using the `bind` method on the `TransformerResolver` class. You can place the code below within `AppServiceProvider` or an entirely new `TransformerServiceProvider`:\n\n```php\nuse Flugg\\Responder\\Contracts\\Transformers\\TransformerResolver;\n\npublic function boot()\n{\n    $this->app->make(TransformerResolver::class)->bind([\n        \\App\\Product::class => \\App\\Transformers\\ProductTransformer::class,\n        \\App\\Shipment::class => \\App\\Transformers\\ShipmentTransformer::class,\n    ]);\n}\n```\n\nAfter you've bound a transformer to a model you can skip the second parameter and still transform the data:\n\n```php\nreturn responder()->success(Product::all())->respond();\n```\n\n***\n_As you might have noticed, unlike Fractal, you don't need to worry about creating resource objects like `Item` and `Collection`. The package will make one for you based on the data type, however, you may wrap your data in a resource object to override this._\n***\n\n### Setting Resource Key\n\nIf the data you send into the response is a model or contains a list of models, a resource key will implicitly be resolved from the model's table name. You can overwrite this by adding a `getResourceKey` method to your model:\n\n```php\npublic function getResourceKey(): string {\n    return 'products';\n}\n```\n\nYou can also explicitly set a resource key on a response by sending a third argument to the ´success` method:\n\n```php\nreturn responder()->success(Product::all(), ProductTransformer::class, 'products')->respond();\n```\n\n### Paginating Response Data\n\nSending a paginator to the `success` method will set pagination meta data and transform the data automatically, as well as append any query string parameters to the paginator links.\n\n```php\nreturn responder()->success(Product::paginate())->respond();\n```\n\nAssuming there are no products and the default configuration is used, the JSON output would look like:\n\n```json\n{\n    \"success\": true,\n    \"status\": 200,\n    \"data\": [],\n    \"pagination\": {\n        \"total\": 0,\n        \"count\": 0,\n        \"perPage\": 15,\n        \"currentPage\": 1,\n        \"totalPages\": 1,\n        \"links\": []\n    }\n}\n```\n\n#### Setting Paginator On Response\n\nInstead of sending a paginator as data, you may set the data and paginator seperately, like you traditionally would with Fractal. You can manually set a paginator using the `paginator` method, which expects an instance of `League\\Fractal\\Pagination\\IlluminatePaginatorAdapter`:\n\n```php\n$paginator = Product::paginate();\n$adapter = new IlluminatePaginatorAdapter($paginator);\n\nreturn responder()->success($paginator->getCollection())->paginator($adapter)->respond();\n```\n\n#### Setting Cursor On Response\n\nYou can also set cursors using the `cursor` method, expecting an instance of `League\\Fractal\\Pagination\\Cursor`:\n\n```php\nif ($request->has('cursor')) {\n    $products = Product::where('id', '>', request()->cursor)->take(request()->limit)->get();\n} else {\n    $products = Product::take(request()->limit)->get();\n}\n\n$cursor = new Cursor(request()->cursor, request()->previous, $products->last()->id ?? null, Product::count());\n\nreturn responder()->success($products)->cursor($cursor)->respond();\n```\n\n### Including Relationships\n\nIf a transformer class is attached to the response, you can include relationships using the `with` method:\n\n```php\nreturn responder()->success(Product::all())->with('shipments')->respond();\n```\n\nYou can send multiple arguments and specify nested relations using dot notation:\n\n```php\nreturn responder()->success(Product::all())->with('shipments', 'orders.customer')->respond();\n```\n\nAll relationships will be automatically eager loaded, and just like you would when using `with` or `load` to eager load with Eloquent, you may use a callback to specify additional query constraints. Like in the example below, where we're only including related shipments that hasn't yet been shipped:\n\n```php\nreturn responder()->success(Product::all())->with(['shipments' => function ($query) {\n    $query->whereNull('shipped_at');\n}])->respond();\n```\n\n#### Including From Query String\n\nRelationships are loaded from a query string parameter if the `load_relations_parameter` configuration key is set to a string. By default, it's set to `with`, allowing you to automatically include relations from the query string:\n\n```\nGET /products?with=shipments,orders.customer\n```\n\n#### Excluding Default Relations\n\nIn your transformer classes, you may specify relations to automatically load. You may disable any of these relations using the `without` method:\n\n```php\nreturn responder()->success(Product::all())->without('comments')->respond();\n```\n\n### Filtering Transformed Data\n\nThe technique of filtering the transformed data to only return what we need is called sparse fieldsets and can be specified using the `only` method:\n\n```php\nreturn responder()->success(Product::all())->only('id', 'name')->respond();\n```\n\nWhen including relationships, you may also want to filter fields on related resources as well. This can be done by instead specifying an array where each key represents the resource keys for the resources being filtered\n\n```php\nreturn responder()->success(Product::all())->with('shipments')->only([\n    'products' => ['id', 'name'],\n    'shipments' => ['id']\n])->respond();\n```\n\n#### Filtering From Query String\n\nFields will automatically be filtered if the `filter_fields_parameter` configuration key is set to a string. It defaults to `only`, allowing you to filter fields from the query string:\n\n```\nGET /products?only=id,name\n```\n\nYou may automatically filter related resources by setting the parameter to a key-based array:\n\n```\nGET /products?with=shipments&only[products]=id,name&only[shipments]=id\n```\n\n### Adding Meta Data\n\nYou may want to attach additional meta data to your response. You can do this using the `meta` method:\n\n```php\nreturn responder()->success(Product::all())->meta(['count' => Product::count()])->respond();\n```\n\nWhen using the default serializer, the meta data will simply be appended to the response array:\n\n```json\n{\n    \"success\": true,\n    \"status\": 200,\n    \"data\": [],\n    \"count\": 0\n}\n```\n\n### Serializing Response Data\n\nAfter the data has been transformed, it will be serialized using the specified success serializer in the configuration file, which defaults to the package's own `Flugg\\Responder\\Serializers\\SuccessSerializer`. You can overwrite this on your responses using the `serializer` method:\n\n```php\nreturn responder()->success()->serializer(JsonApiSerializer::class)->respond();\n```\n\n```php\nreturn responder()->success()->serializer(new JsonApiSerializer())->respond();\n```\n\nAbove we're using Fractal's `JsonApiSerializer` class. Fractal also ships with an `ArraySerializer` and `DataArraySerializer` class. If none of these suit your taste, feel free to create your own serializer by extending `League\\Fractal\\Serializer\\SerializerAbstract`. You can read more about it in [Fractal's documentation](http://fractal.thephpleague.com/serializers/).\n\n## Creating Transformers\n\nA dedicated transformer class gives you a convenient location to transform data and allows you to reuse the transformer at multiple places. It also allows you to include and transform relationships. You can create a transformer using the `make:transformer` Artisan command:\n\n```shell\nphp artisan make:transformer ProductTransformer\n```\n\nThe command will generate a new `ProductTransformer.php` file in the `app/Transformers` folder:\n\n```php\n<?php\n\nnamespace App\\Transformers;\n\nuse App\\User;\nuse Flugg\\Responder\\Transformers\\Transformer;\n\nclass ProductTransformer extends Transformer\n{\n    /**\n     * List of available relations.\n     *\n     * @var string[]\n     */\n    protected $relations = [];\n\n    /**\n     * A list of autoloaded default relations.\n     *\n     * @var array\n     */\n    protected $load = [];\n\n    /**\n     * Transform the model.\n     *\n     * @param  \\App\\Product $product\n     * @return array\n     */\n    public function transform(Product $product): array\n    {\n        return [\n            'id' => (int) $product->id,\n        ];\n    }\n}\n```\n\nIt will automatically resolve a model name from the name provided. For instance, the package will extract `Product` from `ProductTransformer` and assume the models live directly in the `app` folder (as per Laravel's convention). If you store them somewhere else, you can use the `--model` (or `-m`) option to override it: \n\n```shell\nphp artisan make:transformer ProductTransformer --model=\"App\\Models\\Product\"\n```\n\n#### Creating Plain Transformers\n\nThe transformer file generated above is a model transformer expecting an `App\\Product` model for the `transform` method. However, we can create a plain transformer by applying the `--plain` (or `-p`) modifier:\n\n```shell\nphp artisan make:transformer ProductTransformer --plain\n```\n\nThis will remove the typehint from the `transform` method and add less boilerplate code.\n\n### Setting Relationships\n\nThe `$relations` and `$load` properties in the transformer are the equivalent to Fractal's own `$availableIncludes` and `$defaultIncludes`. In addition to the slight name change, the package uses the `$relations` and `$load` properties to map out all available relationships for eager loading, so in contrast to Fractal, you should map the relationship to their corresponding transformer:\n\n```php\nprotected $relations = [\n    'shipments' => ShipmentTransformer::class,\n];\n```\n\n***\n_You can choose to skip the mapping and just pass the strings like with Fractal, but that means the package wont be able to eager load relationships automatically._\n***\n\n#### Setting Whitelisted Relationships\n\nThe `$relations` property specifies a list of relations available to be included. You can set a list of relations mapped to their corresponding transformers:\n\n```php\nprotected $relations = [\n    'shipments' => ShipmentTransformer::class,\n    'orders' => OrderTransformer::class,\n];\n```\n\n#### Setting Autoloaded Relationships\n\nThe `$load` property specifies a list of relations to be autoloaded every time you transform data with the transformer:\n\n```php\nprotected $load = [\n    'shipments' => ShipmentTransformer::class,\n    'orders' => OrderTransformer::class,\n];\n```\n\n***\n_You don't have to add relations to both `$relations` and `$load`, all relations in `$load` will be available by nature._\n***\n\n### Including Relationships\n\nWhile Fractal requires you to to create a method in your transformer for every included relation, this package lets you skip this when transforming models, as it will automatically fetch relationships from the model. You may of course override this functionality by creating an \"include\" method:\n\n```php\n/**\n * Include related shipments.\n *\n * @param  \\App\\Product $product\n * @return mixed\n */\npublic function includeShipments(Product $product)\n{\n    return $product->shipments;\n}\n```\n\nUnlike Fractal you can just return the data directly without wrapping it in an `item` or `collection` method.\n\n***\n_You should be careful with executing database calls inside the include methods as you might end up with an unexpected amount of hits to the database._\n***\n\n#### Using Include Parameters\n\nFractal can parse query string parameters which can be used when including relations. For more information about how to format the parameters see Fractal's [documentation on parameters](https://fractal.thephpleague.com/transformers/#include-parameters). You may access the parameters by adding a second parameter to the \"include\" method:\n\n```php\npublic function includeShipments(Product $product, Collection $parameters)\n{\n    return $product->shipments->take($parameters->get('limit'));\n}\n```\n\n***\n_To be as decoupled from Fractal as possible the parameters (which are normally accessed using `League\\Fractal\\ParamBag`) are accessed as Laravel collections instead._\n***\n\n#### Adding Query Constraints\n\nJust as you can specify a query constraint when including a relationship with the `with` method, you can also add query constraints as a \"load\" method on the transformer. This will automatically be applied when extracting relationships for eager loading.\n\n```php\n/**\n * Load shipments with constraints.\n *\n * @param  \\Illuminate\\Database\\Eloquent\\Builder $query\n * @return \\Illuminate\\Database\\Eloquent\\Builder\n */\npublic function loadShipments($query)\n{\n    return $query->whereNull('shipped_at');\n}\n```\n\n***\n_Note: You cannot mix \"include\" and \"load\" methods because the package doesn't eager load relationships included with an \"include\" method._\n***\n\n### Filtering Relationships\n\nAfter a relation has been included, you can make any last second changes to it using a filter method. For instance, below we're filtering the list of related shipments to only include shipments that has not been shipped:\n\n```php\n/**\n * Filter included shipments.\n *\n * @param  \\Illuminate\\Database\\Eloquent\\Collection $shipments\n * @return \\Illuminate\\Support\\Collection\n */\npublic function filterShipments($shipments)\n{\n    return $shipments->filter(function ($shipment) {\n        return is_null($shipment->shipped_at);\n    });\n}\n```\n\n## Transforming Data\n\nWe've looked at how to transform response data of success responses, however, there may be other places than your controllers where you want to transform data. An example is broadcasted events where you're exposing data using websockets instead of HTTP. You just want to return the transformed data, not an entire response. \n\nIt's possible to simply transform data by newing up the transformer and calling `transform`:\n\n```php\nreturn (new ProductTransformer)->transform(Product::first());\n```\n\nHowever, this approach might become a bit messy when building transformations with relationships:\n\n```php\nreturn array_merge((new ProductTransformer)->transform($product = Product::first()), [\n    'shipments' => $product->shipments->map(function ($shipment) {\n        return (new ShipmentTransformer)->transform($shipment);\n    })\n]);\n```\n\nYuck! Imagine that with multiple nested relationships. Let's explore a simpler way to handle this.\n\n### Building Transformations\n\nThe `SuccessResponseBuilder` actually delegates all of the transformation work to a dedicated `Flugg\\Responder\\TransformBuilder` class. We can use this class ourself to transform data. For instance, if the product and shipment transformers were bound to the models, we could replicate the code above in the following way:\n\n```php\npublic function index(TransformBuilder $transformation)\n{\n    return $transformation->resource(Product::all())->with('shipments')->transform();\n}\n```\n\nInstead of using the `success` method on the `Responder` service, we use the `resource` method on the `TransformBuilder` with the same method signature. We also use `transform` to execute the transformation instead of `respond` as we did when creating responses. In addition to the `with` method, you also have access to the other transformation methods like `without`, `only`, `meta` and `serializer`.\n\n***\n_Using `toArray` on the `Responder` service is almost the same as the code above, however, it will also include response decorators which might not be desired._\n***\n\n### Transforming Without Serializing\n\nWhen using the `TransformBuilder` to transform data it will still serialize the data using the configured serializer. Fractal requires the use of a serializer to transform data, but sometimes we're just interested in the raw transformed data. The package ships with a `Flugg\\Responder\\Serializers\\NoopSerializer` to solve this, a no-op serializer which leaves the transformed data untouched:\n\n```php\nreturn $transformation->resource(Product::all())->serializer(NoopSerializer::class)->transform();\n```\n\nIf you think this is looking messy, don't worry, there's a quicker way. In fact, you will probably never even need to utilize the `NoopSerializer` or `TransformBuilder` manually, but it helps to know how it works. The `Flugg\\Responder\\Transformation` is a class which can be used for quickly transforming data without serializing.\n\n#### Option 1: The `Transformation` Service\n\nThe `Transformation` class utilizes the `TransformBuilder` class to build a transformation using the `NoopSerializer`. You can inject the `Transformation` class and call `make` to obtain an instance of `TransformBuilder` which gives you access to all of the chainable methods including `with`, like below:\n\n```php\npublic function __construct(Transformation $transformation)\n{\n    $transformation->make(Product::all())->with('shipments')->transform();\n}\n```\n\n#### Option 2: The `transformation` Helper\n\nYou can use the `transformation` helper function to transform data without serializing:\n\n```php\ntransformation(Product::all())->with('shipments')->transform();\n```\n\n#### Option 3: The `Transformation` Facade\n\nYou can also use the `Transformation` facade to achieve the same thing:\n\n```php\nTransformation::make(Product::all())->with('shipments')->transform();\n```\n\n### Transforming To Camel Case\n\nModel attributes are traditionally specified in snake case, however, you might prefer to use camel case for the response fields. A transformer makes for a perfect location to convert the fields, as seen from the `soldOut` field in the example below:\n\n```php\nreturn responder()->success(Product::all(), function ($product) {\n    return ['soldOut' => (bool) $product->sold_out];    \n})->respond();\n```\n\n#### Transforming Request Parameters\n\nAfter responding with camel case, you probably want to let people send in request data using camel cased parameters as well. The package provides a `Flugg\\Responder\\Http\\Middleware\\ConvertToSnakeCase` middleware you can append to the `$middleware` array in `app/Http/Kernel.php` to convert all parameters to snake case automatically:\n\n```php\nprotected $middleware = [\n    // ...\n    \\Flugg\\Responder\\Http\\Middleware\\ConvertToSnakeCase::class,\n];\n```\n\n***\n_The middleware will run before request validation, so you should specify your validation rules in snake case as well._\n***\n\n## Creating Error Responses\n\nWhenever a consumer of your API does something unexpected, you can return an error response describing the problem. As briefly shown in a previous chapter, an error response can be created using the `error` method:\n\n```php\nreturn responder()->error()->respond();\n```\n\nThe error response has knowledge about an error code, a corresponding error message and optionally some error data. With the default configuration, the above code would output the following JSON:\n\n```json\n{\n    \"success\": false,\n    \"status\": 500,\n    \"error\": {\n        \"code\": null,\n        \"message\": null\n    }\n}\n```\n\n### Setting Error Code & Message\n\nYou can fill the first parameter of the `error` method to set an error code:\n\n```php\nreturn responder()->error('sold_out_error')->respond();\n```\n\n***\n_You may optionally use integers for error codes._\n***\n\nIn addition, you may set the second parameter to an error message describing the error:\n\n```php\nreturn responder()->error('sold_out_error', 'The requested product is sold out.')->respond();\n```\n\n#### Set Messages In Language Files\n\nYou can set the error messages in a language file, which allows for returning messages in different languages. The configuration file has an `error_message_files` key defining a list of language files with error messages. By default, it is set to `['errors']`, meaning it will look for an `errors.php` file inside `resources/lang/en`. You can use these files to map error codes to corresponding error messages:\n\n```php\nreturn [\n    'sold_out_error' => 'The requested product is sold out.',\n];\n```\n\n#### Register Messages Using `ErrorMessageResolver`\n\nInstead of using language files, you may alternatively set error messages directly on the `ErrorMessageResolver` class. You can place the code below within `AppServiceProvider` or an entirely new `TransformerServiceProvider`:\n\n```php\nuse Flugg\\Responder\\ErrorMessageResolver;\n\npublic function boot()\n{\n    $this->app->make(ErrorMessageResolver::class)->register([\n        'sold_out_error' => 'The requested product is sold out.',\n    ]);\n}\n```\n\n### Adding Error Data\n\nYou may want to set additional data on the error response. Like in the example below, we're returning a list of shipments with the `sold_out` error response, giving the consumer information about when a new shipment for the product might arrive.\n\n```php\nreturn responder()->error('sold_out')->data(['shipments' => Shipment::all()])->respond();\n```\n\nThe error data will be appended to the response data. Assuming we're using the default serializer and there are no shipments in the database, the code above would look like:\n\n```json\n{\n    \"success\": false,\n    \"status\": 500,\n    \"error\": {\n        \"code\": \"sold_out\",\n        \"message\": \"The requested product is sold out.\",\n        \"shipments\": []\n    }\n}\n```\n\n### Serializing Response Data\n\nSimilarly to success responses, error responses will be serialized using the specified error serializer in the configuration file. This defaults to the package's own `Flugg\\Responder\\Serializers\\ErrorSerializer`, but can of course be changed by using the `serializer` method:\n\n```php\nreturn responder()->error()->serializer(ExampleErrorSerializer::class)->respond();\n```\n\n```php\nreturn responder()->success()->serializer(new ExampleErrorSerializer())->respond();\n```\n\nYou can create your own error serializer by implementing the `Flugg\\Responder\\Contracts\\ErrorSerializer` contract.\n\n## Handling Exceptions\n\nNo matter how much we try to avoid them, exceptions do happen. Responding to the exceptions in an elegant manner will improve the user experience of your API. The package can enhance your exception handler to automatically turn exceptions in to error responses. If you want to take use of this, you can either use the package's exception handler or include a trait as described in further details below.\n\n#### Option 1: Replace `Handler` Class\n\nTo use the package's exception handler you need to replace the default import in `app/Exceptions/Handler.php`:\n\n```php\nuse Illuminate\\Foundation\\Exceptions\\Handler as ExceptionHandler;\n```\n\nWith the package's handler class:\n\n```php\nuse Flugg\\Responder\\Exceptions\\Handler as ExceptionHandler;\n```\n\n***\nThis will not work with Lumen as its exception handler is incompatible with Laravel's. Look instead at the second option below.\n***\n\n#### Option 2: Use `ConvertsExceptions` Trait\n\nThe package's exception handler uses the `Flugg\\Responder\\Exceptions\\ConvertsExceptions` trait to load of most of its work. Instead of replacing the exception handler, you can use the trait in your own handler class. To replicate the behavior of the exception handler, you would also have to add the following code to the `render` method:\n\n```php\npublic function render($request, Exception $exception)\n{\n    $this->convertDefaultException($exception);\n\n    if ($exception instanceof HttpException) {\n        return $this->renderResponse($exception);\n    }\n\n    return parent::render($request, $exception);\n}\n```\n\nIf you only want to return JSON error responses on requests actually asking for JSON, you may wrap the code above in a `wantsJson` check as seen below:\n\n```php\nif ($request->wantsJson()) {\n    $this->convertDefaultException($exception);\n\n    if ($exception instanceof HttpException) {\n        return $this->renderResponse($exception);\n    }\n}\n```\n\n### Converting Exceptions\n\nOnce you've implemented one of the above options, the package will convert some of Laravel's exceptions to an exception extending `Flugg\\Responder\\Exceptions\\Http\\HttpException`. It will then convert these to an error response. The table below shows which Laravel exceptions are converted and what they are converted to. All the exceptions on the right is under the `Flugg\\Responder\\Exceptions\\Http` namespace and extends `Flugg\\Responder\\Exceptions\\Http\\HttpException`. All exceptions extending the `HttpException` class will be automatically converted to an error response. \n\n| Caught Exceptions                                               | Converted To                 |\n| --------------------------------------------------------------- | ---------------------------- |\n| `Illuminate\\Auth\\AuthenticationException`                       | `UnauthenticatedException`   |\n| `Illuminate\\Auth\\Access\\AuthorizationException`                 | `UnauthorizedException`      |\n| `Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException`  | `PageNotFoundException`      |\n| `Illuminate\\Database\\Eloquent\\ModelNotFoundException`           | `PageNotFoundException`      |\n| `Illuminate\\Database\\Eloquent\\RelationNotFoundException`        | `RelationNotFoundException`  |\n| `Illuminate\\Validation\\ValidationException`                     | `ValidationFailedException`  |\n\nYou can disable the conversions of some of the exceptions above using the `$dontConvert` property:\n\n```php\n/**\n * A list of default exception types that should not be converted.\n *\n * @var array\n */\nprotected $dontConvert = [\n    ModelNotFoundException::class,\n];\n```\n\n***\nIf you're using the trait option, you can disable all the default conversions by removing the call to `convertDefaultException` in the `render` method.\n***\n\n#### Convert Custom Exceptions\n\nIn addition to letting the package convert Laravel exceptions, you can also convert your own exceptions using the `convert` method in the `render` method:\n\n```php\n$this->convert($exception, [\n    InvalidValueException => PageNotFoundException,\n]);\n```\n\nYou can optionally give it a closure that throws the new exception, if you want to give it constructor parameters: \n\n```php\n$this->convert($exception, [\n    MaintenanceModeException => function ($exception) {\n        throw new ServerDownException($exception->retryAfter);\n    },\n]);\n```\n\n### Creating HTTP Exceptions\n\nAn exception class is a convenient place to store information about an error. The package provides an abstract exception class `Flugg\\Responder\\Exceptions\\Http\\HttpException`, which has knowledge about status code, an error code and an error message. Continuing on our product example from above, we could create our own `HttpException` class:\n\n```php\n<?php\n\nnamespace App\\Exceptions;\n\nuse Flugg\\Responder\\Exceptions\\Http\\HttpException;\n\nclass SoldOutException extends HttpException\n{\n    /**\n     * The HTTP status code.\n     *\n     * @var int\n     */\n    protected $status = 400;\n\n    /**\n     * The error code.\n     *\n     * @var string|null\n     */\n    protected $errorCode = 'sold_out_error';\n\n    /**\n     * The error message.\n     *\n     * @var string|null\n     */\n    protected $message = 'The requested product is sold out.';\n}\n```\n\nYou can also add a `data` method returning additional error data:\n\n```php\n/**\n * Retrieve additional error data.\n *\n * @return array|null\n */\npublic function data()\n{\n    return [\n        'shipments' => Shipment::all()\n    ];\n}\n```\n\nIf you're letting the package handle exceptions, you can now throw the exception anywhere in your application and it will automatically be rendered to an error response.\n\n```php\nthrow new SoldOutException();\n```\n\n# Contributing\n\nContributions are more than welcome and you're free to create a pull request on Github. You can run tests with the following command:\n\n```shell\nvendor/bin/phpunit\n```\n\nIf you find bugs or have suggestions for improvements, feel free to submit an issue on Github. However, if it's a security related issue, please send an email to flugged@gmail.com instead.\n\n# Donating\n\nThe package is completely free to use, however, a lot of time has been put into making it. If you want to show your appreciation by leaving a small donation, you can do so by clicking [here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PRMC9WLJY8E46&lc=NO&item_name=Laravel%20Responder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted). Thanks!\n\n# License\n\nLaravel Responder is free software distributed under the terms of the MIT license. See [license.md](license.md) for more details.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"53B2:3B1F3:187F09:5F325A:6AB92F16"},"text_sha256":"bdbe8d241e064aec177e7cc9f101ff4a1cc3c20319b1c4bfd92e16d3a865195c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"combust/mleap","input_row":{"repository":"combust/mleap","url":"https://github.com/combust/mleap","name":"mleap","owner":"combust","description":"MLeap: Deploy ML Pipelines to Production","language":"Scala","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":1544,"issues":480,"created_at":"2016-08-23T03:51:03Z","updated_at":"2026-09-21T21:42:43Z","first_commit_at":"2016-09-15T18:26:37Z","last_commit_at":"2026-07-21T17:36:54Z","activity_months":118.13,"ai_ml_match_topics":"transformers","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:31.981Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"combust/mleap","visibility":"public","created_at":"2016-08-23T03:51:03Z","updated_at":"2026-09-21T21:42:43Z","private":false,"fork":false,"archived":false,"stargazers_count":1544,"open_issues_count":111,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1258","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087A:731F6:181DED1:1C49C47:6AB92F18"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1257","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08A5:74181:17AF532:1BDB17C:6AB92F18"},"commit":{"sha":"5f8ae74b5d2e0bd6b6281fdc8764c6c21c3ee42e","url":"https://github.com/combust/mleap/commit/5f8ae74b5d2e0bd6b6281fdc8764c6c21c3ee42e","date":"2018-05-21T15:31:59Z","author_date":"2018-05-21T15:31:59Z","committer_date":"2018-05-21T15:31:59Z","tree_sha":"c7cbe7b63b35af1dec02f4cbf1a7b8a2c8d92315","message_first_line":"Setting version to 0.11.0-SNAPSHOT"},"tree_request_status":200,"tree_rate":{"github_remaining":"1256","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07AD:72BD3:18259A8:1C51474:6AB92F18"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":11072,"blob_sha":"ffe9cc80e1ebec3b7a1ba65c4a814ff5e82d68a5","priority":0}],"documents":[{"path":"README.md","size":11072,"blob_sha":"ffe9cc80e1ebec3b7a1ba65c4a814ff5e82d68a5","priority":0,"status":200,"text":"<a href=\"http://mleap-docs.combust.ml\"><img src=\"logo.png\" alt=\"MLeap Logo\" width=\"176\" height=\"70\" /><\/a>\n\n[![Gitter](https://badges.gitter.im/combust/mleap.svg)](https://gitter.im/combust/mleap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n[![Build Status](https://travis-ci.org/combust/mleap.svg?branch=master)](https://travis-ci.org/combust/mleap)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ml.combust.mleap/mleap-base_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ml.combust.mleap/mleap-base_2.11)\n\nDeploying machine learning data pipelines and algorithms should not be a time-consuming or difficult task. MLeap allows data scientists and engineers to deploy machine learning pipelines from Spark and Scikit-learn to a portable format and execution engine.\n\n## Documentation\n\nDocumentation is available at [mleap-docs.combust.ml](http://mleap-docs.combust.ml).\n\nRead [Serializing a Spark ML Pipeline and Scoring with MLeap](https://github.com/combust-ml/mleap/wiki/Serializing-a-Spark-ML-Pipeline-and-Scoring-with-MLeap) to gain a full sense of what is possible.\n\n## Introduction\n\nUsing the MLeap execution engine and serialization format, we provide a performant, portable and easy-to-integrate production library for machine learning data pipelines and algorithms.\n\nFor portability, we build our software on the JVM and only use serialization formats that are widely-adopted.\n\nWe also provide a high level of integration with existing technologies.\n\nOur goals for this project are:\n\n1. Allow Researchers/Data Scientists and Engineers to continue to build data pipelines and train algorithms with Spark and Scikit-Learn\n2. Extend Spark/Scikit/TensorFlow by providing ML Pipelines serialization/deserialization to/from a common framework (Bundle.ML)\n3. Use MLeap Runtime to execute your pipeline and algorithm without dependenices on Spark or Scikit (numpy, pandas, etc)\n\n## Overview\n\n1. Core execution engine implemented in Scala\n2. [Spark](http://spark.apache.org/), PySpark and Scikit-Learn support\n3. Export a model with Scikit-learn or Spark and execute it using the MLeap Runtime (without dependencies on the Spark Context, or sklearn/numpy/pandas/etc)\n4. Choose from 2 portable serialization formats (JSON, Protobuf)\n5. Implement your own custom data types and transformers for use with MLeap data frames and transformer pipelines\n6. Extensive test coverage with full parity tests for Spark and MLeap pipelines\n7. Optional Spark transformer extension to extend Spark's default transformer offerings\n\n<img src=\"assets/images/single-runtime.jpg\" alt=\"Unified Runtime\"/>\n\n## Requirements\n\nMLeap is built against Scala 2.11 and Java 8.  Because we depend heavily on Typesafe config for MLeap, we only support Java 8 at the\nmoment.\n\n## Setup\n\n### Link with Maven or SBT\n\n#### SBT\n\n```sbt\nlibraryDependencies += \"ml.combust.mleap\" %% \"mleap-runtime\" % \"0.10.0\"\n```\n\n#### Maven\n\n```pom\n<dependency>\n    <groupId>ml.combust.mleap<\/groupId>\n    <artifactId>mleap-runtime_2.11<\/artifactId>\n    <version>0.10.0<\/version>\n<\/dependency>\n```\n\n### For Spark Integration\n\n#### SBT\n\n```sbt\nlibraryDependencies += \"ml.combust.mleap\" %% \"mleap-spark\" % \"0.10.0\"\n```\n\n#### Maven\n\n```pom\n<dependency>\n    <groupId>ml.combust.mleap<\/groupId>\n    <artifactId>mleap-spark_2.11<\/artifactId>\n    <version>0.10.0<\/version>\n<\/dependency>\n```\n\n### Spark Packages\n\n```bash\n$ bin/spark-shell --packages ml.combust.mleap:mleap-spark_2.11:0.10.0\n```\n\n### PySpark Integration\n\nInstall MLeap from pypy\n```bash\n$ pip install mleap\n```\n\n\n## Using the Library\n\nFor more complete examples, see our other Git repository: [MLeap Demos](https://github.com/combust/mleap-demo)\n\n### Create and Export a Spark Pipeline\n\nThe first step is to create our pipeline in Spark. For our example we will manually build a simple Spark ML pipeline.\n\n\n```scala\nimport ml.combust.bundle.BundleFile\nimport ml.combust.mleap.spark.SparkSupport._\nimport org.apache.spark.ml.Pipeline\nimport org.apache.spark.ml.bundle.SparkBundleContext\nimport org.apache.spark.ml.feature.{Binarizer, StringIndexer}\nimport org.apache.spark.sql._\nimport org.apache.spark.sql.functions._\nimport resource._\n\n  val datasetName = \"./examples/spark-demo.csv\"\n\n  val dataframe: DataFrame = spark.sqlContext.read.format(\"csv\")\n    .option(\"header\", true)\n    .load(datasetName)\n    .withColumn(\"test_double\", col(\"test_double\").cast(\"double\"))\n\n  // User out-of-the-box Spark transformers like you normally would\n  val stringIndexer = new StringIndexer().\n    setInputCol(\"test_string\").\n    setOutputCol(\"test_index\")\n\n  val binarizer = new Binarizer().\n    setThreshold(0.5).\n    setInputCol(\"test_double\").\n    setOutputCol(\"test_bin\")\n\n  val pipelineEstimator = new Pipeline()\n    .setStages(Array(stringIndexer, binarizer))\n\n  val pipeline = pipelineEstimator.fit(dataframe)\n\n  // then serialize pipeline\n  val sbc = SparkBundleContext().withDataset(pipeline.transform(dataframe))\n  for(bf <- managed(BundleFile(\"jar:file:/tmp/simple-spark-pipeline.zip\"))) {\n    pipeline.writeBundle.save(bf)(sbc).get\n  }\n```\n\nThe dataset used for training can be found [here](https://github.com/combust/mleap/tree/master/examples/spark-demo.csv)\n\nSpark pipelines are not meant to be run outside of Spark. They require a DataFrame and therefore a SparkContext to run. These are expensive data structures and libraries to include in a project. With MLeap, there is no dependency on Spark to execute a pipeline. MLeap dependencies are lightweight and we use fast data structures to execute your ML pipelines.\n\n### PySpark Integration\n\nImport the MLeap library in your PySpark job\n\n```python\nimport mleap.pyspark\nfrom mleap.pyspark.spark_support import SimpleSparkSerializer\n```\n\n### Create and Export a Scikit-Learn Pipeline\n\n```python\nimport pandas as pd\n\nfrom mleap.sklearn.pipeline import Pipeline\nfrom mleap.sklearn.preprocessing.data import FeatureExtractor, LabelEncoder, ReshapeArrayToN1\nfrom sklearn.preprocessing import OneHotEncoder\n\ndata = pd.DataFrame(['a', 'b', 'c'], columns=['col_a'])\n\ncategorical_features = ['col_a']\n\nfeature_extractor_tf = FeatureExtractor(input_scalars=categorical_features, \n                                         output_vector='imputed_features', \n                                         output_vector_items=categorical_features)\n\n# Label Encoder for x1 Label \nlabel_encoder_tf = LabelEncoder(input_features=feature_extractor_tf.output_vector_items,\n                               output_features='{}_label_le'.format(categorical_features[0]))\n\n# Reshape the output of the LabelEncoder to N-by-1 array\nreshape_le_tf = ReshapeArrayToN1()\n\n# Vector Assembler for x1 One Hot Encoder\none_hot_encoder_tf = OneHotEncoder(sparse=False)\none_hot_encoder_tf.mlinit(prior_tf = label_encoder_tf, \n                          output_features = '{}_label_one_hot_encoded'.format(categorical_features[0]))\n\none_hot_encoder_pipeline_x0 = Pipeline([\n                                         (feature_extractor_tf.name, feature_extractor_tf),\n                                         (label_encoder_tf.name, label_encoder_tf),\n                                         (reshape_le_tf.name, reshape_le_tf),\n                                         (one_hot_encoder_tf.name, one_hot_encoder_tf)\n                                        ])\n\none_hot_encoder_pipeline_x0.mlinit()\none_hot_encoder_pipeline_x0.fit_transform(data)\none_hot_encoder_pipeline_x0.serialize_to_bundle('/tmp', 'mleap-scikit-test-pipeline', init=True)\n\n# array([[ 1.,  0.,  0.],\n#        [ 0.,  1.,  0.],\n#        [ 0.,  0.,  1.]])\n```\n\n### Load and Transform Using MLeap\n\nBecuase we export Spark and Scikit-learn pipelines to a standard format, we can use either our Spark-trained pipeline or our Scikit-learn pipeline from the previous steps to demonstrate usage of MLeap in this section. The choice is yours!\n\n```scala\nimport ml.combust.bundle.BundleFile\nimport ml.combust.mleap.runtime.MleapSupport._\nimport resource._\n// load the Spark pipeline we saved in the previous section\nval bundle = (for(bundleFile <- managed(BundleFile(\"jar:file:/tmp/simple-spark-pipeline.zip\"))) yield {\n  bundleFile.loadMleapBundle().get\n}).opt.get\n\n// create a simple LeapFrame to transform\nimport ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row}\nimport ml.combust.mleap.core.types._\n\n// MLeap makes extensive use of monadic types like Try\nval schema = StructType(StructField(\"test_string\", ScalarType.String),\n  StructField(\"test_double\", ScalarType.Double)).get\nval data = Seq(Row(\"hello\", 0.6), Row(\"MLeap\", 0.2))\nval frame = DefaultLeapFrame(schema, data)\n\n// transform the dataframe using our pipeline\nval mleapPipeline = bundle.root\nval frame2 = mleapPipeline.transform(frame).get\nval data2 = frame2.dataset\n\n// get data from the transformed rows and make some assertions\nassert(data2(0).getDouble(2) == 1.0) // string indexer output\nassert(data2(0).getDouble(3) == 1.0) // binarizer output\n\n// the second row\nassert(data2(1).getDouble(2) == 2.0)\nassert(data2(1).getDouble(3) == 0.0)\n```\n\n## Documentation\n\nFor more documentation, please see our [documentation](http://mleap-docs.combust.ml), where you can learn to:\n\n1. Implement custom transformers that will work with Spark, MLeap and Scikit-learn\n2. Implement custom data types to transform with Spark and MLeap pipelines\n3. Transform with blazing fast speeds using optimized row-based transformers\n4. Serialize MLeap data frames to various formats like avro, json, and a custom binary format\n5. Implement new serialization formats for MLeap data frames\n6. Work through several demonstration pipelines which use real-world data to create predictive pipelines\n7. Supported Spark transformers\n8. Supported Scikit-learn transformers\n9. Custom transformers provided by MLeap\n\n## Contributing\n\n* Write documentation.\n* Write a tutorial/walkthrough for an interesting ML problem\n* Contribute an Estimator/Transformer from Spark\n* Use MLeap at your company and tell us what you think\n* Make a feature request or report a bug in github\n* Make a pull request for an existing feature request or bug report\n* Join the discussion of how to get MLeap into Spark as a dependency. Talk with us on Gitter (see link at top of README.md)\n\n## Thank You\n\nThank you to [Swoop](https://www.swoop.com/) for supporting the XGboost\nintegration.\n\n## Contact Information\n\n* Hollin Wilkins (hollin@combust.ml)\n* Mikhail Semeniuk (mikhail@combust.ml)\n* Anca Sarb (sarb.anca@gmail.com)\n\n## License\n\nSee LICENSE and NOTICE file in this repository.\n\nCopyright 2016 Combust, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17CC62:5E7E11:6AB92F17"},"text_sha256":"e606c24d99b1b74f0f8f6805b1d0607dd0710a7e69641f20971dcc3079c9b87c"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1255","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080E:731F6:181E070:1C49E0B:6AB92F19"},"commit":{"sha":"027342cac5c96d6cb4f56046634a5f0487849a67","url":"https://github.com/combust/mleap/commit/027342cac5c96d6cb4f56046634a5f0487849a67","date":"2026-03-09T20:50:47Z","author_date":"2026-03-09T20:50:47Z","committer_date":"2026-03-09T20:50:47Z","tree_sha":"aea0cbee13c86230ecb7fc2a5267c46dfe885665","message_first_line":"Merge pull request #896 from combust/feature/u/ltrottier/fix_gpg_for_release"},"tree_request_status":200,"tree_rate":{"github_remaining":"1254","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0805:71C58:17E3D4B:1C0FBE9:6AB92F1A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":13566,"blob_sha":"a0966683bda76b540fc95fdf6d6f0a75f19a39fd","priority":0}],"documents":[{"path":"README.md","size":13566,"blob_sha":"a0966683bda76b540fc95fdf6d6f0a75f19a39fd","priority":0,"status":200,"text":"<a href=\"https://combust.github.io/mleap-docs/\"><img src=\"logo.png\" alt=\"MLeap Logo\" width=\"176\" height=\"70\" /><\/a>\n\n[![Gitter](https://badges.gitter.im/combust/mleap.svg)](https://gitter.im/combust/mleap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n[![Build Status](https://travis-ci.org/combust/mleap.svg?branch=master)](https://travis-ci.org/combust/mleap)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ml.combust.mleap/mleap-base_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ml.combust.mleap/mleap-base_2.12)\n\nDeploying machine learning data pipelines and algorithms should not be a time-consuming or difficult task. MLeap allows data scientists and engineers to deploy machine learning pipelines from Spark and Scikit-learn to a portable format and execution engine.\n\n## Documentation\n\nDocumentation is available at [https://combust.github.io/mleap-docs/](https://combust.github.io/mleap-docs/).\n\nRead [Serializing a Spark ML Pipeline and Scoring with MLeap](https://github.com/combust-ml/mleap/wiki/Serializing-a-Spark-ML-Pipeline-and-Scoring-with-MLeap) to gain a full sense of what is possible.\n\n## Introduction\n\nUsing the MLeap execution engine and serialization format, we provide a performant, portable and easy-to-integrate production library for machine learning data pipelines and algorithms.\n\nFor portability, we build our software on the JVM and only use serialization formats that are widely-adopted.\n\nWe also provide a high level of integration with existing technologies.\n\nOur goals for this project are:\n\n1. Allow Researchers/Data Scientists and Engineers to continue to build data pipelines and train algorithms with Spark and Scikit-Learn\n2. Extend Spark/Scikit/TensorFlow by providing ML Pipelines serialization/deserialization to/from a common framework (Bundle.ML)\n3. Use MLeap Runtime to execute your pipeline and algorithm without dependenices on Spark or Scikit (numpy, pandas, etc)\n\n## Overview\n\n1. Core execution engine implemented in Scala\n2. [Spark](http://spark.apache.org/), PySpark and Scikit-Learn support\n3. Export a model with Scikit-learn or Spark and execute it using the MLeap Runtime (without dependencies on the Spark Context, or sklearn/numpy/pandas/etc)\n4. Choose from 2 portable serialization formats (JSON, Protobuf)\n5. Implement your own custom data types and transformers for use with MLeap data frames and transformer pipelines\n6. Extensive test coverage with full parity tests for Spark and MLeap pipelines\n7. Optional Spark transformer extension to extend Spark's default transformer offerings\n\n<img src=\"assets/images/single-runtime.jpg\" alt=\"Unified Runtime\"/>\n\n## Dependency Compatibility Matrix\n\nOther versions besides those listed below may also work (especially more recent Java versions for the JRE), \nbut these are the configurations which are tested by mleap.\n\n| MLeap Version | Spark Version | Scala Version    | Java Version | Python Version | XGBoost Version | Tensorflow Version |\n|---------------|---------------|------------------|--------------|----------------|-----------------|--------------------|\n| 0.24.0        | 4.0.1         | 2.13.16          | 17           | 3.9 - 3.13     | 2.0.3           | 2.10.1             |\n| 0.23.4        | 3.4.4         | 2.12.18          | 11           | 3.7 - 3.12     | 1.7.6           | 2.10.1             |\n| 0.23.3        | 3.4.0         | 2.12.18          | 11           | 3.7, 3.8       | 1.7.6           | 2.10.1             |\n| 0.23.2        | 3.4.0         | 2.12.18          | 11           | 3.7, 3.8       | 1.7.6           | 2.10.1             |\n| 0.23.1        | 3.4.0         | 2.12.18          | 11           | 3.7, 3.8       | 1.7.6           | 2.10.1             |\n| 0.23.0        | 3.4.0         | 2.12.13          | 11           | 3.7, 3.8       | 1.7.3           | 2.10.1             |\n| 0.22.0        | 3.3.0         | 2.12.13          | 11           | 3.7, 3.8       | 1.6.1           | 2.7.0              |\n| 0.21.1        | 3.2.0         | 2.12.13          | 11           | 3.7            | 1.6.1           | 2.7.0              |\n| 0.21.0        | 3.2.0         | 2.12.13          | 11           | 3.6, 3.7       | 1.6.1           | 2.7.0              |\n| 0.20.0        | 3.2.0         | 2.12.13          | 8            | 3.6, 3.7       | 1.5.2           | 2.7.0              |\n| 0.19.0        | 3.0.2         | 2.12.13          | 8            | 3.6, 3.7       | 1.3.1           | 2.4.1              |\n| 0.18.1        | 3.0.2         | 2.12.13          | 8            | 3.6, 3.7       | 1.0.0           | 2.4.1              |\n| 0.18.0        | 3.0.2         | 2.12.13          | 8            | 3.6, 3.7       | 1.0.0           | 2.4.1              |\n| 0.17.0        | 2.4.5         | 2.11.12, 2.12.10 | 8            | 3.6, 3.7       | 1.0.0           | 1.11.0             |\n\n## Setup\n\n### Link with Maven or SBT\n\n#### SBT\n\n```sbt\nlibraryDependencies += \"ml.combust.mleap\" %% \"mleap-runtime\" % \"0.24.0\"\n```\n\n#### Maven\n\n```pom\n<dependency>\n    <groupId>ml.combust.mleap<\/groupId>\n    <artifactId>mleap-runtime_2.13<\/artifactId>\n    <version>0.24.0<\/version>\n<\/dependency>\n```\n\n### For Spark Integration\n\n#### SBT\n\n```sbt\nlibraryDependencies += \"ml.combust.mleap\" %% \"mleap-spark\" % \"0.24.0\"\n```\n\n#### Maven\n\n```pom\n<dependency>\n    <groupId>ml.combust.mleap<\/groupId>\n    <artifactId>mleap-spark_2.13<\/artifactId>\n    <version>0.24.0<\/version>\n<\/dependency>\n```\n\n### PySpark Integration\n\nInstall MLeap from [PyPI](https://pypi.org/project/mleap/)\n```bash\n$ pip install mleap\n```\n\n## Using the Library\n\nFor more complete examples, see our other Git repository: [MLeap Demos](https://github.com/combust/mleap-demo)\n\n### Create and Export a Spark Pipeline\n\nThe first step is to create our pipeline in Spark. For our example we will manually build a simple Spark ML pipeline.\n\n\n```scala\nimport ml.combust.bundle.BundleFile\nimport ml.combust.mleap.spark.SparkSupport._\nimport org.apache.spark.ml.Pipeline\nimport org.apache.spark.ml.bundle.SparkBundleContext\nimport org.apache.spark.ml.feature.{Binarizer, StringIndexer}\nimport org.apache.spark.sql._\nimport org.apache.spark.sql.functions._\nimport scala.util.Using\n\n  val datasetName = \"./examples/spark-demo.csv\"\n\n  val dataframe: DataFrame = spark.sqlContext.read.format(\"csv\")\n    .option(\"header\", true)\n    .load(datasetName)\n    .withColumn(\"test_double\", col(\"test_double\").cast(\"double\"))\n\n  // User out-of-the-box Spark transformers like you normally would\n  val stringIndexer = new StringIndexer().\n    setInputCol(\"test_string\").\n    setOutputCol(\"test_index\")\n\n  val binarizer = new Binarizer().\n    setThreshold(0.5).\n    setInputCol(\"test_double\").\n    setOutputCol(\"test_bin\")\n\n  val pipelineEstimator = new Pipeline()\n    .setStages(Array(stringIndexer, binarizer))\n\n  val pipeline = pipelineEstimator.fit(dataframe)\n\n  // then serialize pipeline\n  val sbc = SparkBundleContext().withDataset(pipeline.transform(dataframe))\n  Using(BundleFile(\"jar:file:/tmp/simple-spark-pipeline.zip\")) { bf =>\n    pipeline.writeBundle.save(bf)(sbc).get\n  }\n```\n\nThe dataset used for training can be found [here](https://github.com/combust/mleap/tree/master/examples/spark-demo.csv)\n\nSpark pipelines are not meant to be run outside of Spark. They require a DataFrame and therefore a SparkContext to run. These are expensive data structures and libraries to include in a project. With MLeap, there is no dependency on Spark to execute a pipeline. MLeap dependencies are lightweight and we use fast data structures to execute your ML pipelines.\n\n### PySpark Integration\n\nImport the MLeap library in your PySpark job\n\n```python\nimport mleap.pyspark\nfrom mleap.pyspark.spark_support import SimpleSparkSerializer\n```\n\nSee [PySpark Integration of python/README.md](python/README.md#pyspark-integration) for more.\n\n### Create and Export a Scikit-Learn Pipeline\n\n```python\nimport pandas as pd\n\nfrom mleap.sklearn.pipeline import Pipeline\nfrom mleap.sklearn.preprocessing.data import FeatureExtractor, LabelEncoder, ReshapeArrayToN1\nfrom sklearn.preprocessing import OneHotEncoder\n\ndata = pd.DataFrame(['a', 'b', 'c'], columns=['col_a'])\n\ncategorical_features = ['col_a']\n\nfeature_extractor_tf = FeatureExtractor(input_scalars=categorical_features, \n                                         output_vector='imputed_features', \n                                         output_vector_items=categorical_features)\n\n# Label Encoder for x1 Label \nlabel_encoder_tf = LabelEncoder(input_features=feature_extractor_tf.output_vector_items,\n                               output_features='{}_label_le'.format(categorical_features[0]))\n\n# Reshape the output of the LabelEncoder to N-by-1 array\nreshape_le_tf = ReshapeArrayToN1()\n\n# Vector Assembler for x1 One Hot Encoder\none_hot_encoder_tf = OneHotEncoder(sparse=False)\none_hot_encoder_tf.mlinit(prior_tf = label_encoder_tf, \n                          output_features = '{}_label_one_hot_encoded'.format(categorical_features[0]))\n\none_hot_encoder_pipeline_x0 = Pipeline([\n                                         (feature_extractor_tf.name, feature_extractor_tf),\n                                         (label_encoder_tf.name, label_encoder_tf),\n                                         (reshape_le_tf.name, reshape_le_tf),\n                                         (one_hot_encoder_tf.name, one_hot_encoder_tf)\n                                        ])\n\none_hot_encoder_pipeline_x0.mlinit()\none_hot_encoder_pipeline_x0.fit_transform(data)\none_hot_encoder_pipeline_x0.serialize_to_bundle('/tmp', 'mleap-scikit-test-pipeline', init=True)\n\n# array([[ 1.,  0.,  0.],\n#        [ 0.,  1.,  0.],\n#        [ 0.,  0.,  1.]])\n```\n\n### Load and Transform Using MLeap\n\nBecause we export Spark and Scikit-learn pipelines to a standard format, we can use either our Spark-trained pipeline or our Scikit-learn pipeline from the previous steps to demonstrate usage of MLeap in this section. The choice is yours!\n\n```scala\nimport ml.combust.bundle.BundleFile\nimport ml.combust.mleap.runtime.MleapSupport._\nimport scala.util.Using\n// load the Spark pipeline we saved in the previous section\nval bundle = Using(BundleFile(\"jar:file:/tmp/simple-spark-pipeline.zip\"))) { bundleFile =>\n  bundleFile.loadMleapBundle().get\n}).opt.get\n\n// create a simple LeapFrame to transform\nimport ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row}\nimport ml.combust.mleap.core.types._\n\n// MLeap makes extensive use of monadic types like Try\nval schema = StructType(StructField(\"test_string\", ScalarType.String),\n  StructField(\"test_double\", ScalarType.Double)).get\nval data = Seq(Row(\"hello\", 0.6), Row(\"MLeap\", 0.2))\nval frame = DefaultLeapFrame(schema, data)\n\n// transform the dataframe using our pipeline\nval mleapPipeline = bundle.root\nval frame2 = mleapPipeline.transform(frame).get\nval data2 = frame2.dataset\n\n// get data from the transformed rows and make some assertions\nassert(data2(0).getDouble(2) == 1.0) // string indexer output\nassert(data2(0).getDouble(3) == 1.0) // binarizer output\n\n// the second row\nassert(data2(1).getDouble(2) == 2.0)\nassert(data2(1).getDouble(3) == 0.0)\n```\n\n## Documentation\n\nFor more documentation, please see our [documentation](https://combust.github.io/mleap-docs/), where you can learn to:\n\n1. Implement custom transformers that will work with Spark, MLeap and Scikit-learn\n2. Implement custom data types to transform with Spark and MLeap pipelines\n3. Transform with blazing fast speeds using optimized row-based transformers\n4. Serialize MLeap data frames to various formats like avro, json, and a custom binary format\n5. Implement new serialization formats for MLeap data frames\n6. Work through several demonstration pipelines which use real-world data to create predictive pipelines\n7. Supported Spark transformers\n8. Supported Scikit-learn transformers\n9. Custom transformers provided by MLeap\n\n## Contributing\n\n* Write documentation.\n* Write a tutorial/walkthrough for an interesting ML problem\n* Contribute an Estimator/Transformer from Spark\n* Use MLeap at your company and tell us what you think\n* Make a feature request or report a bug in github\n* Make a pull request for an existing feature request or bug report\n* Join the discussion of how to get MLeap into Spark as a dependency. Talk with us on Gitter (see link at top of README.md)\n\n## Building\n\nPlease ensure you have sbt 1.9.3, java 11, scala 2.12.18\n\n1. Initialize the git submodules `git submodule update --init --recursive`\n2. Run `sbt compile`\n\n## Thank You\n\nThank you to [Swoop](https://www.swoop.com/) for supporting the XGboost\nintegration.\n\n## Contributors Information\n\n* Jason Sleight ([jsleight](https://github.com/jsleight))\n* Talal Riaz ([talalryz](https://github.com/talalryz))\n* Weichen Xu ([WeichenXu123](https://github.com/WeichenXu123))\n\n## Past contributors\n* Hollin Wilkins (hollin@combust.ml)\n* Mikhail Semeniuk (mikhail@combust.ml)\n* Anca Sarb (sarb.anca@gmail.com)\n* Ryan Vogan (rvogan@yelp.com)\n\n\n## License\n\nSee LICENSE and NOTICE file in this repository.\n\nCopyright 20 Combust, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"55F6:B08CF:17708A:5E240C:6AB92F19"},"text_sha256":"fc5ec642acc2e33e25806f66281ca1bef2aa232c24ac84d565f317154db8debb"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"micro/go-micro","input_row":{"repository":"micro/go-micro","url":"https://github.com/micro/go-micro","name":"go-micro","owner":"micro","description":"A Go agent harness and service framework","language":"Go","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":23079,"issues":2173,"created_at":"2015-01-13T23:30:18Z","updated_at":"2026-09-26T07:24:07Z","first_commit_at":"2015-01-13T23:31:27Z","last_commit_at":"2026-09-26T05:57:39Z","activity_months":140.38,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:35.677Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"micro/go-micro","visibility":"public","created_at":"2015-01-13T23:30:18Z","updated_at":"2026-09-26T07:24:07Z","private":false,"fork":false,"archived":false,"stargazers_count":23079,"open_issues_count":4,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1253","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080B:6E4BB:182A508:1C559F5:6AB92F1B"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1252","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08B2:72727:17D847C:1C03F93:6AB92F1C"},"commit":{"sha":"909e13a24ae228d686281e7fc53c7da1ddc27ae5","url":"https://github.com/micro/go-micro/commit/909e13a24ae228d686281e7fc53c7da1ddc27ae5","date":"2018-05-10T16:42:46Z","author_date":"2018-05-10T16:42:46Z","committer_date":"2018-05-10T16:42:46Z","tree_sha":"dde631f45d5b6346e5a9e27cdbab107333a70851","message_first_line":"Merge pull request #254 from micro/message"},"tree_request_status":200,"tree_rate":{"github_remaining":"1251","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E2:6C9BF:182E641:1C5A37D:6AB92F1C"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12370,"blob_sha":"368d6ceaeeab535510145109de893447d3ebcd5a","priority":0}],"documents":[{"path":"README.md","size":12370,"blob_sha":"368d6ceaeeab535510145109de893447d3ebcd5a","priority":0,"status":200,"text":"# Go Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GoDoc](https://godoc.org/github.com/micro/go-micro?status.svg)](https://godoc.org/github.com/micro/go-micro) [![Travis CI](https://api.travis-ci.org/micro/go-micro.svg?branch=master)](https://travis-ci.org/micro/go-micro) [![Go Report Card](https://goreportcard.com/badge/micro/go-micro)](https://goreportcard.com/report/github.com/micro/go-micro)\n\nGo Micro is a pluggable RPC framework for distributed systems development.\n\nThe **micro** philosophy is sane defaults with a pluggable architecture. We provide defaults to get you started quickly but everything can be easily swapped out. It comes with built in support for {json,proto}-rpc encoding, consul or multicast dns for service discovery, http for communication and random hashed client side load balancing.\n\nPlugins are available at [github.com/micro/go-plugins](https://github.com/micro/go-plugins).\n\nFollow us on [Twitter](https://twitter.com/microhq) or join the [Slack](http://slack.micro.mu/) community.\n\n## Features\n\nGo Micro abstracts away the details of distributed systems. Here are the main features.\n\n- **Service Discovery** - Automatic service registration and name resolution\n- **Load Balancing** - Client side load balancing built on discovery\n- **Message Encoding** - Dynamic encoding based on content-type with protobuf and json support\n- **Sync Streaming** - RPC based communication with support for bidirectional streaming\n- **Async Messaging** - Native PubSub messaging built in for event driven architectures\n\nGo Micro supports both the Service and Function programming models. Read on to learn more.\n\n## Docs\n\nFor more detailed information on the architecture, installation and use of go-micro checkout the [docs](https://micro.mu/docs).\n\n## Learn By Example\n\nAn example service can be found in [**examples/service**](https://github.com/micro/examples/tree/master/service) and function in [**examples/function**](https://github.com/micro/examples/tree/master/function). \n\nThe [**examples**](https://github.com/micro/examples) directory contains examples for using things such as middleware/wrappers, selector filters, pub/sub, grpc, plugins and much more. For the complete greeter example look at [**examples/greeter**](https://github.com/micro/examples/tree/master/greeter). Other examples can be found throughout the GitHub repository.\n\nWatch the [Golang UK Conf 2016](https://www.youtube.com/watch?v=xspaDovwk34) video for a high level overview.\n\n## Getting started\n\n- [Install Protobuf](#install-protobuf)\n- [Service Discovery](#service-discovery)\n- [Writing a Service](#writing-a-service)\n- [Writing a Function](#writing-a-function)\n- [Publish & Subscribe](#publish--subscribe)\n- [Plugins](#plugins)\n- [Wrappers](#wrappers)\n\n## Install Protobuf\n\nProtobuf is required for code generation\n\nYou'll need to install:\n\n- [protoc-gen-micro](https://github.com/micro/protoc-gen-micro)\n\n## Service Discovery\n\nService discovery is used to resolve service names to addresses. \n\n### Consul\n\n[Consul](https://www.consul.io/) is used as the default service discovery system. \n\nDiscovery is pluggable. Find plugins for etcd, kubernetes, zookeeper and more in the [micro/go-plugins](https://github.com/micro/go-plugins) repo.\n\n[Install guide](https://www.consul.io/intro/getting-started/install.html)\n\n### Multicast DNS\n\n[Multicast DNS](https://en.wikipedia.org/wiki/Multicast_DNS) is a built in service discovery plugin for a zero dependency configuration. \n\nPass `--registry=mdns` to any command or the enviroment variable `MICRO_REGISTRY=mdns`\n\n```\nMICRO_REGISTRY=mdns go run main.go\n```\n\n## Writing a service\n\nThis is a simple greeter RPC service example\n\nFind this example at [examples/service](https://github.com/micro/examples/tree/master/service).\n\n### Create service proto\n\nOne of the key requirements of microservices is strongly defined interfaces. Micro uses protobuf to achieve this.\n\nHere we define the Greeter handler with the method Hello. It takes a HelloRequest and HelloResponse both with one string arguments.\n\n```proto\nsyntax = \"proto3\";\n\nservice Greeter {\n\trpc Hello(HelloRequest) returns (HelloResponse) {}\n}\n\nmessage HelloRequest {\n\tstring name = 1;\n}\n\nmessage HelloResponse {\n\tstring greeting = 2;\n}\n```\n\n### Generate the proto\n\nAfter writing the proto definition we must compile it using protoc with the micro plugin.\n\n```shell\nprotoc --proto_path=$GOPATH/src:. --micro_out=. --go_out=. path/to/greeter.proto\n```\n\n### Write the service\n\nBelow is the code for the greeter service. \n\nIt does the following:\n\n1. Implements the interface defined for the Greeter handler\n2. Initialises a micro.Service\n3. Registers the Greeter handler\n4. Runs the service\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\tmicro \"github.com/micro/go-micro\"\n\tproto \"github.com/micro/examples/service/proto\"\n)\n\ntype Greeter struct{}\n\nfunc (g *Greeter) Hello(ctx context.Context, req *proto.HelloRequest, rsp *proto.HelloResponse) error {\n\trsp.Greeting = \"Hello \" + req.Name\n\treturn nil\n}\n\nfunc main() {\n\t// Create a new service. Optionally include some options here.\n\tservice := micro.NewService(\n\t\tmicro.Name(\"greeter\"),\n\t)\n\n\t// Init will parse the command line flags.\n\tservice.Init()\n\n\t// Register handler\n\tproto.RegisterGreeterHandler(service.Server(), new(Greeter))\n\n\t// Run the server\n\tif err := service.Run(); err != nil {\n\t\tfmt.Println(err)\n\t}\n}\n```\n\n### Run service\n```\ngo run examples/service/main.go\n```\n\nOutput\n```\n2016/03/14 10:59:14 Listening on [::]:50137\n2016/03/14 10:59:14 Broker Listening on [::]:50138\n2016/03/14 10:59:14 Registering node: greeter-ca62b017-e9d3-11e5-9bbb-68a86d0d36b6\n```\n\n### Define a client\n\nBelow is the client code to query the greeter service. \n\nThe generated proto includes a greeter client to reduce boilerplate code.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\tmicro \"github.com/micro/go-micro\"\n\tproto \"github.com/micro/examples/service/proto\"\n)\n\n\nfunc main() {\n\t// Create a new service. Optionally include some options here.\n\tservice := micro.NewService(micro.Name(\"greeter.client\"))\n\tservice.Init()\n\n\t// Create new greeter client\n\tgreeter := proto.NewGreeterService(\"greeter\", service.Client())\n\n\t// Call the greeter\n\trsp, err := greeter.Hello(context.TODO(), &proto.HelloRequest{Name: \"John\"})\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// Print response\n\tfmt.Println(rsp.Greeting)\n}\n```\n\n### Run the client\n\n```shell\ngo run client.go\n```\n\nOutput\n```\nHello John\n```\n\n## Writing a Function\n\nGo Micro includes the Function programming model. \n\nA Function is a one time executing Service which exits after completing a request. \n\n### Defining a Function\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\tproto \"github.com/micro/examples/function/proto\"\n\t\"github.com/micro/go-micro\"\n)\n\ntype Greeter struct{}\n\nfunc (g *Greeter) Hello(ctx context.Context, req *proto.HelloRequest, rsp *proto.HelloResponse) error {\n\trsp.Greeting = \"Hello \" + req.Name\n\treturn nil\n}\n\nfunc main() {\n\t// create a new function\n\tfnc := micro.NewFunction(\n\t\tmicro.Name(\"greeter\"),\n\t)\n\n\t// init the command line\n\tfnc.Init()\n\n\t// register a handler\n\tfnc.Handle(new(Greeter))\n\n\t// run the function\n\tfnc.Run()\n}\n```\n\nIt's that simple.\n\n## Publish & Subscribe\n\nGo-micro has a built in message broker interface for event driven architectures.\n\nPubSub operates on the same protobuf generated messages as RPC. They are encoded/decoded automatically and sent via the broker. \nBy default go-micro includes a point-to-point http broker but this can be swapped out via go-plugins.\n\n### Publish\n\n\nCreate a new publisher with a `topic` name and service client\n\n```go\np := micro.NewPublisher(\"events\", service.Client())\n```\n\nPublish a proto message\n\n```go\np.Publish(context.TODO(), &proto.Event{Name: \"event\"})\n```\n\n### Subscribe\n\nCreate a message handler. It's signature should be `func(context.Context, v interface{}) error`.\n\n```go\nfunc ProcessEvent(ctx context.Context, event *proto.Event) error {\n\tfmt.Printf(\"Got event %+v\\n\", event)\n\treturn nil\n}\n```\n\nRegister the message handler with a `topic`\n\n```go\nmicro.RegisterSubscriber(\"events\", ProcessEvent)\n```\n\nSee [examples/pubsub](https://github.com/micro/examples/tree/master/pubsub) for a complete example.\n\n## Plugins\n\nBy default go-micro only provides a few implementation of each interface at the core but it's completely pluggable. There's already dozens of plugins which are available at [github.com/micro/go-plugins](https://github.com/micro/go-plugins). Contributions are welcome!\n\n### Build with plugins\n\nIf you want to integrate plugins simply link them in a separate file and rebuild\n\nCreate a plugins.go file\n\n```go\nimport (\n        // etcd v3 registry\n        _ \"github.com/micro/go-plugins/registry/etcdv3\"\n        // nats transport\n        _ \"github.com/micro/go-plugins/transport/nats\"\n        // kafka broker\n        _ \"github.com/micro/go-plugins/broker/kafka\"\n)\n```\n\nBuild binary\n\n```shell\n// For local use\ngo build -i -o service ./main.go ./plugins.go\n```\n\nFlag usage of plugins\n```shell\nservice --registry=etcdv3 --transport=nats --broker=kafka\n```\n\n### Plugin as option\n\nAlternatively you can set the plugin as an option to a service\n\n```go\n\nimport (\n        \"github.com/micro/go-micro\" \n        // etcd v3 registry\n        \"github.com/micro/go-plugins/registry/etcdv3\"\n        // nats transport\n        \"github.com/micro/go-plugins/transport/nats\"\n        // kafka broker\n        \"github.com/micro/go-plugins/broker/kafka\"\n)\n\nfunc main() {\n\tregistry := etcdv3.NewRegistry()\n\tbroker := kafka.NewBroker()\n\ttransport := nats.NewTransport()\n\n        service := micro.NewService(\n                micro.Name(\"greeter\"),\n                micro.Registry(registry),\n                micro.Broker(broker),\n                micro.Transport(transport),\n        )\n\n\tservice.Init()\n\tservice.Run()\n}\n```\n\n### Write plugins\n\nPlugins are a concept built on Go's interface. Each package maintains a high level interface abstraction. \nSimply implement the interface and pass it in as an option to the service.\n\nThe service discovery interface is called [Registry](https://godoc.org/github.com/micro/go-micro/registry#Registry). \nAnything which implements this interface can be used as a registry. The same applies to the other packages.\n\n```go\ntype Registry interface {\n    Register(*Service, ...RegisterOption) error\n    Deregister(*Service) error\n    GetService(string) ([]*Service, error)\n    ListServices() ([]*Service, error)\n    Watch() (Watcher, error)\n    String() string\n}\n```\n\nBrowse [go-plugins](https://github.com/micro/go-plugins) to get a better idea of implementation details.\n\n## Wrappers\n\nGo-micro includes the notion of middleware as wrappers. The client or handlers can be wrapped using the decorator pattern.\n\n### Handler\n\nHere's an example service handler wrapper which logs the incoming request\n\n```go\n// implements the server.HandlerWrapper\nfunc logWrapper(fn server.HandlerFunc) server.HandlerFunc {\n\treturn func(ctx context.Context, req server.Request, rsp interface{}) error {\n\t\tfmt.Printf(\"[%v] server request: %s\", time.Now(), req.Method())\n\t\treturn fn(ctx, req, rsp)\n\t}\n}\n```\n\nIt can be initialised when creating the service\n\n```go\nservice := micro.NewService(\n\tmicro.Name(\"greeter\"),\n\t// wrap the handler\n\tmicro.WrapHandler(logWrapper),\n)\n```\n\n### Client\n\nHere's an example of a client wrapper which logs requests made\n\n```go\ntype logWrapper struct {\n\tclient.Client\n}\n\nfunc (l *logWrapper) Call(ctx context.Context, req client.Request, rsp interface{}, opts ...client.CallOption) error {\n\tfmt.Printf(\"[wrapper] client request to service: %s method: %s\\n\", req.Service(), req.Method())\n\treturn l.Client.Call(ctx, req, rsp)\n}\n\n// implements client.Wrapper as logWrapper\nfunc logWrap(c client.Client) client.Client {\n\treturn &logWrapper{c}\n}\n```\n\nIt can be initialised when creating the service\n\n```go\nservice := micro.NewService(\n\tmicro.Name(\"greeter\"),\n\t// wrap the client\n\tmicro.WrapClient(logWrap),\n)\n```\n\n## Other Languages\n\nCheck out [ja-micro](https://github.com/Sixt/ja-micro) to write services in Java\n\n## Sponsors\n\nSixt is an Enterprise Sponsor of Micro\n\n<a href=\"https://micro.mu/blog/2016/04/25/announcing-sixt-sponsorship.html\"><img src=\"https://micro.mu/sixt_logo.png\" width=150px height=\"auto\" /><\/a>\n\nBecome a sponsor by backing micro on [Patreon](https://www.patreon.com/microhq)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"B738:B08CF:177096:5E2445:6AB92F1A"},"text_sha256":"6da94d67d56ee182848c3ea4b53b45c1c34ebb94bac0cbea67d8bad15f46713e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1250","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080F:2EA1B4:18027A7:1C2E6D3:6AB92F1D"},"commit":{"sha":"88e2b58711edaa4d1d5923380d911f0de49a86d3","url":"https://github.com/micro/go-micro/commit/88e2b58711edaa4d1d5923380d911f0de49a86d3","date":"2026-06-30T23:38:51Z","author_date":"2026-06-30T23:38:51Z","committer_date":"2026-06-30T23:38:51Z","tree_sha":"f4301202bc6f27175a09b415d48423258a7b0fb6","message_first_line":"docs(priorities): refresh architect queue (#3503)"},"tree_request_status":200,"tree_rate":{"github_remaining":"1249","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D9:74E6D:183189E:1C5D88B:6AB92F1D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17870,"blob_sha":"92cd8b3bff1d198c2a15200f3fae7b8c5ce79304","priority":0},{"path":"internal/website/docs/guides/mcp-security.md","size":10514,"blob_sha":"428dcee913d86d343119f920e2abacc157b20054","priority":1},{"path":"internal/website/docs/SECURITY_MIGRATION.md","size":5237,"blob_sha":"a1bf828b195b8a0a40f33c1792b24719f81e6820","priority":1},{"path":"internal/website/docs/TLS_SECURITY_UPDATE.md","size":1282,"blob_sha":"7008fe829b37b4025a910184dba5ec4fb8edce53","priority":1},{"path":"SECURITY.md","size":4415,"blob_sha":"4bda494d223cb6ab52362fd64be4e785b0798fdb","priority":1}],"documents":[{"path":"README.md","size":17870,"blob_sha":"92cd8b3bff1d198c2a15200f3fae7b8c5ce79304","priority":0,"status":200,"text":"# Go Micro [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/go-micro.dev/v6?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/go-micro/go-micro)](https://goreportcard.com/report/github.com/go-micro/go-micro)\n\nGo Micro is an **agent harness** and service framework for Go.\n\nA harness is the runtime around an agent: the tools it can call, the memory it keeps, the guardrails that bound it, the workflows that trigger it, the services it depends on, and the protocols other agents use to reach it. \n\nGo Micro gives you the harness as Go code. Build an agent and it gets a model, memory, tools, planning, delegation, guardrails, and service discovery; it is reachable over [MCP](https://modelcontextprotocol.io/) and [A2A](https://a2a-protocol.org). Write services and every endpoint becomes an AI-callable tool. Orchestrate the deterministic parts with durable flows. Agents, services, and flows share one runtime because an agent is a distributed system, and building one is building a service.\n\n## Sponsors\n\n<a href=\"https://go-micro.dev/blog/3\"><img src=\"https://upload.wikimedia.org/wikipedia/commons/7/78/Anthropic_logo.svg\" height=\"26\" /><\/a>\n&nbsp;&nbsp;\n<a href=\"https://go-micro.dev/blog/29\"><img src=\"https://upload.wikimedia.org/wikipedia/commons/4/4d/OpenAI_Logo.svg\" height=\"26\" /><\/a>\n&nbsp;&nbsp;\n<a href=\"https://go-micro.dev/blog/8\"><img src=\"https://www.atlascloud.ai/logo.svg\" height=\"26\" /><\/a>\n\n**Want to support Go Micro and see your logo here?** [Become a sponsor](https://discord.gg/WeMU5AGxD) — reach out on Discord.\n\n## Commercial Support\n\nRunning Go Micro in production, or building on it and want help? Paid **support, consulting, training, and retainers** are available directly from the maintainer — and they're what keep the project maintained. See [**Support**](SUPPORT.md) for the tiers, or [open a request](https://github.com/micro/go-micro/issues/new?template=commercial_support.md).\n\n## Contents\n\n- [Quick Start](#quick-start)\n- [Why an Agent Harness](#why-an-agent-harness)\n- [Writing Services](#writing-services)\n- [Building Agents](#building-agents) — [Plan & Delegate](#plan--delegate), [Pluggable](#batteries-included-pluggable), [Paid tools (x402)](#paid-tools-x402), [A2A](#reachable-by-other-agents-a2a)\n- [Features](#features)\n- [CLI](#cli)\n- [Multi-Service Projects](#multi-service-projects)\n- [Data Model](#data-model)\n- [AI Providers](#ai-providers)\n- [Examples](#examples)\n- [Commercial Support](#commercial-support)\n- [Docs](#docs)\n\n## Quick Start\n\nInstall the CLI:\n\n```bash\n# Binary (no Go required)\ncurl -fsSL https://go-micro.dev/install.sh | sh\n\n# Or with Go\ngo install go-micro.dev/v6/cmd/micro@v6\n```\n\n### Fastest start — no API key\n\nScaffold a service, run it, call it:\n\n```bash\nmicro new helloworld\ncd helloworld\nmicro run\n```\n\nThen in another terminal:\n\n```bash\ncurl -X POST http://localhost:8080/api/helloworld/Helloworld.Call \\\n  -H 'Content-Type: application/json' -d '{\"name\":\"World\"}'\n```\n\nThis scaffold → run → call path is covered by the no-secret CI harness. To run\nthe same local contract (including the 0→hero services → agents → workflows path,\nchat/inspect CLI boundaries, and deploy dry-run), use:\n\n```bash\nmake harness\n```\n\n### Generate from a prompt — with an LLM key\n\nSet a provider key, describe what you want, and the AI designs services, writes handlers, compiles, and starts them:\n\n```bash\nexport ANTHROPIC_API_KEY=sk-ant-...   # or OPENAI_API_KEY, GEMINI_API_KEY, ...\nmicro run --prompt \"a task management system with categories\" --provider anthropic\n```\n\nThe AI designs the architecture, you review it, then it generates handlers with real business logic, compiles them, and starts them:\n\n```\nServices:\n  ● task — Task management with status tracking\n  ● project — Project organization\n\nGenerate? [Y/n]\n\nMicro\n  Services:\n    ● task\n    ● project\n  Agents:\n    ◆ agent\n```\n\nThen talk to your services from the console:\n\n```\n> Create a project called Launch, then add three tasks to it\n\n→ project_Project_Create({\"name\":\"Launch\"})\n← {\"record\":{\"id\":\"p1...\"},\"success\":true}\n→ task_Task_Create({\"title\":\"Design specs\",\"project_id\":\"p1...\"})\n→ task_Task_Create({\"title\":\"Write code\",\"project_id\":\"p1...\"})\n→ task_Task_Create({\"title\":\"Ship it\",\"project_id\":\"p1...\"})\n\nCreated project Launch and added three tasks to it.\n```\n\nWhen you need a capability that doesn't exist, the agent generates a new service mid-conversation:\n\n```\n> I need to track shipping. Create a shipment for order 123 to London.\n\n  ⚡ generating shipping service...\n  ✓ shipping\n  → shipping_Shipping_Create({\"order_id\":\"123\",\"destination\":\"London\"})\n  ← {\"record\":{\"id\":\"xyz...\",\"status\":\"pending\"}}\n\n  Created shipment for order 123 going to London.\n```\n\nEdit the generated code by hand at any time — re-running preserves your changes. [Read more](https://go-micro.dev/blog/13).\n\n## Why an Agent Harness\n\nThe first wave of agent frameworks helped developers put a model in a loop. The next problem is operating that loop: connecting it to real tools, scoping what it can touch, preserving state, routing work to specialists, recovering from failures, observing what happened, and letting other agents call it. That is harness work.\n\nGo Micro's answer is to make the harness the same thing you already deploy:\n\n- **Tools are services** — endpoint metadata becomes tool schema; RPC executes the call.\n- **Agents are services** — they register, discover, load-balance, and expose `Agent.Chat`.\n- **Workflows are durable code paths** — use flows when the path is known; dispatch to agents when it is not.\n- **Safety lives at execution** — `MaxSteps`, `LoopLimit`, `ApproveTool`, and tool wrappers run where actions happen.\n- **Interop is built in** — MCP for tools, A2A for agents, x402 for paid tools.\n\nUse Go Micro when the agent has to operate a system, not just answer a prompt.\n\n## Writing Services\n\nUnder the hood, a service is a struct with methods. Doc comments and `@example` tags become tool descriptions for AI agents automatically.\n\n```go\npackage main\n\nimport (\n    \"context\"\n\n    \"go-micro.dev/v6\"\n)\n\ntype Request struct {\n    Name string `json:\"name\"`\n}\n\ntype Response struct {\n    Message string `json:\"message\"`\n}\n\ntype Say struct{}\n\n// Hello greets a person by name.\n// @example {\"name\": \"Alice\"}\nfunc (h *Say) Hello(ctx context.Context, req *Request, rsp *Response) error {\n    rsp.Message = \"Hello \" + req.Name\n    return nil\n}\n\nfunc main() {\n    service := micro.NewService(\"greeter\")\n    service.Handle(new(Say))\n    service.Run()\n}\n```\n\nRun it and everything is accessible — REST, gRPC, MCP, agent playground:\n\n```bash\nmicro run\n# Dashboard:   http://localhost:8080\n# API:         http://localhost:8080/api/{service}/{method}\n# Agent:       http://localhost:8080/agent\n# MCP Tools:   http://localhost:8080/mcp/tools\n```\n\nYou can also scaffold a service from a template:\n\n```bash\nmicro new helloworld\nmicro new contacts --template crud\n```\n\n## Building Agents\n\nAn Agent is a service with an LLM inside it. It has a proto-defined `Agent.Chat` RPC endpoint, registers in the registry, and is callable like any service:\n\n```go\nagent := micro.NewAgent(\"task-mgr\",\n    micro.AgentServices(\"task\", \"project\"),\n    micro.AgentPrompt(\"You manage tasks and projects. You understand deadlines and priorities.\"),\n    micro.AgentProvider(\"anthropic\"),\n)\nagent.Run()\n```\n\nThe agent discovers its services from the registry, scopes its tools to their endpoints, and maintains conversation memory in the store. It registers itself so `micro chat` and other agents can find it.\n\n```go\n// Programmatic interaction\nresp, _ := agent.Ask(ctx, \"What tasks are overdue?\")\nfmt.Println(resp.Reply)\n```\n\nMultiple agents coordinate via RPC — each is a service with an `Agent.Chat` endpoint. `micro chat` routes to the right one.\n\n```bash\nmicro agent list                    # list registered agents\nmicro call task-mgr Agent.Chat '{\"message\": \"What tasks are overdue?\"}'\n```\n\n### Plan & Delegate\n\nEvery agent gets two built-in harness capabilities, exposed as tools — no extra setup or separate graph runtime:\n\n- **`plan`** — for multi-step work, the agent records an ordered plan in its store-backed memory and stays oriented across turns.\n- **`delegate`** — the agent hands a self-contained subtask to another agent. If a registered agent already owns the relevant services, the hand-off goes over RPC to that agent; otherwise a focused, short-lived sub-agent is created for the subtask with its own isolated context.\n\nThis keeps intelligence distributed: an agent doesn't need to know *how* to do everything, only *who* does. See [examples/agent-plan-delegate](examples/agent-plan-delegate/).\n\n```go\n// A sub-agent is just an agent — created with New, talked to with Ask.\n// delegate-first: reuse a registered agent, or spin up a focused one.\nresp, _ := agent.Ask(ctx, \"Plan the launch, create the tasks, and have comms notify the owner.\")\n```\n\n### Batteries included, pluggable\n\nJust as a service composes pluggable abstractions (registry, broker, store), an agent composes a **model**, **memory**, and **tools** — sane defaults out of the box, each swappable.\n\n```go\nagent := micro.NewAgent(\"assistant\",\n    micro.AgentProvider(\"anthropic\"),                 // model — swap the provider\n    micro.AgentCompactMemory(40, 12),                 // memory — durable, summarized, recallable\n    micro.AgentTool(\"weather\", \"Get the weather for a city\",\n        map[string]any{\"city\": map[string]any{\"type\": \"string\"}},\n        func(ctx context.Context, in map[string]any) (string, error) {\n            return getWeather(in[\"city\"].(string))    // tools beyond your services — any function\n        }),\n    micro.AgentMaxSteps(8),                            // guardrails\n)\n```\n\n**Memory** is durable and store-backed by default (Postgres, NATS KV, or file), so an agent picks up where it left off after a restart — or supply your own with `AgentMemory`. Long-running agents can opt into `AgentCompactMemory(maxMessages, keepRecent)`: older turns are collapsed into a deterministic summary, recent turns stay verbatim, and relevant archived turns are recalled on future asks without replaying the whole conversation. **Tools** are your services automatically, plus any function you register with `AgentTool`.\n\n### Paid tools (x402)\n\nEvery endpoint is an AI-callable tool — and it can be a *paid* tool. Go Micro supports [x402](https://x402.org), the HTTP 402 payment standard for agents, so a tool can require a stablecoin payment and an agent can settle it autonomously. It's opt-in and carries no crypto in the framework: verification is delegated to a pluggable facilitator (Coinbase, Alchemy, self-hosted), so Base and Solana are just different facilitators.\n\n```bash\n# Charge for tool calls at the MCP gateway (off unless you set a pay-to address)\nmicro mcp serve --x402_pay_to 0xYourAddress --x402_network solana --x402_amount 10000\n# Per-tool amounts via a config file\nmicro mcp serve --x402_config x402.json\n```\n\nSee the [Payments (x402) guide](internal/website/docs/guides/x402-payments.md).\n\n### Reachable by other agents (A2A)\n\nWithin a Go Micro system, agents reach each other over RPC. To make them reachable by agents on *other* frameworks, Go Micro speaks the [Agent2Agent (A2A) protocol](https://a2a-protocol.org). The A2A gateway discovers your agents from the registry, generates an Agent Card for each from its metadata — the same way the MCP gateway derives tools from service endpoints — and translates incoming A2A tasks to the agent's `Agent.Chat` RPC. No per-agent code: register an agent and it's reachable over A2A.\n\n```bash\nmicro a2a serve --address :4000    # gateway: expose every registered agent over A2A\nmicro a2a list                     # agents and their Agent Card URLs\n```\n\nOr skip the gateway entirely — an agent can serve its own A2A endpoint directly, handling tasks in-process:\n\n```go\nmicro.NewAgent(\"task-mgr\", micro.AgentServices(\"task\"), micro.AgentA2A(\":4000\"))\n```\n\nIt works both ways. To call an agent on another framework, an `a2a.Client` is wired into the two places that hand off work: `flow.A2A(url)` as a workflow step (the cross-framework `Dispatch`), and `delegate` to an `http(s)` URL from inside an agent.\n\nMCP exposes your services as tools; A2A exposes your agents as agents. See the [A2A guide](internal/website/docs/guides/a2a-protocol.md).\n\n## Features\n\n### AI\n\n| Feature | Details |\n|---------|---------|\n| Agents | `micro.NewAgent()` — intelligent layer that manages services |\n| Plan & delegate | Built-in agent tools — plan multi-step work, delegate subtasks to other agents |\n| Pluggable memory | Durable store-backed conversation memory by default; swap with `AgentMemory` |\n| Custom tools | `AgentTool` — give an agent any function as a tool, beyond its services |\n| Guardrails | `MaxSteps` (stop on count), `LoopLimit` (stop repeated no-progress calls), `ApproveTool` (human-in-the-loop) |\n| Tool middleware | `AgentWrapTool` — wrap tool execution for logging, metrics, or retries (like client/server wrappers) |\n| Workflows | `micro.NewFlow()` — event-driven; one step, ordered durable steps, or triggers an agent |\n| Durable execution | Checkpointed flow steps survive a crash and resume where they stopped; store-backed by default, pluggable backend |\n| MCP gateway | Every endpoint is an AI tool automatically |\n| A2A gateway | Every agent is reachable over the Agent2Agent protocol; cards generated from the registry (`micro a2a`) |\n| Payments (x402) | Opt-in per-call payments for tools via the x402 standard; pluggable facilitator (Base, Solana, …) |\n| 7 LLM providers | Anthropic, OpenAI, Gemini, Groq, Mistral, Together, Atlas Cloud |\n| Interactive console | `micro run` includes a chat console for talking to services |\n| Service generation | `micro run --prompt` — describe a system, get running services |\n\n### Framework\n\n| Feature | Details |\n|---------|---------|\n| Service registry | mDNS (default), Consul, etcd |\n| RPC client/server | gRPC transport, load balancing, streaming |\n| Pub/sub events | NATS, RabbitMQ, HTTP broker |\n| Key-value store | File (bbolt), Postgres, NATS KV |\n| Typed model layer | CRUD + queries, SQLite/Postgres backends |\n| Everything swappable | All abstractions are Go interfaces |\n\n### Developer experience & deployment\n\n| Feature | Details |\n|---------|---------|\n| Hot reload | `micro run` watches files, rebuilds on change |\n| Templates | `micro new --template crud/pubsub/api` |\n| One-command deploy | `micro deploy user@server` — SSH + systemd, no Docker |\n\n## CLI\n\n| Command | Purpose |\n|---------|---------|\n| `micro run --prompt \"...\"` | Generate services + agent, start with interactive console |\n| `micro run` | Dev mode: hot reload, gateway, interactive console |\n| `micro run -d` | Detached mode (no console) |\n| `micro chat` | Standalone chat (when not using micro run) |\n| `micro agent list` | List registered agents |\n| `micro new myservice` | Scaffold a service |\n| `micro call service endpoint '{}'` | Call a service or agent from the CLI |\n| `micro build` | Compile production binaries |\n| `micro deploy user@server` | Deploy via SSH + systemd |\n\n## Multi-Service Projects\n\nRun multiple services together:\n\n```go\nusers := micro.NewService(\"users\", micro.Address(\":9001\"))\norders := micro.NewService(\"orders\", micro.Address(\":9002\"))\n\nusers.Handle(new(Users))\norders.Handle(new(Orders))\n\ng := micro.NewGroup(users, orders)\ng.Run()\n```\n\nOr use a `micro.mu` config file:\n\n```\nservice users\n    path ./users\n\nservice orders\n    path ./orders\n    depends users\n```\n\n## Data Model\n\nTyped persistence with CRUD and queries:\n\n```go\ntype User struct {\n    ID    string `json:\"id\" model:\"key\"`\n    Name  string `json:\"name\"`\n    Email string `json:\"email\" model:\"index\"`\n}\n\ndb := service.Model()\ndb.Register(&User{})\ndb.Create(ctx, &User{ID: \"1\", Name: \"Alice\", Email: \"alice@example.com\"})\n\nvar results []*User\ndb.List(ctx, &results, model.Where(\"email\", \"alice@example.com\"))\n```\n\nBackends: memory (default), SQLite, Postgres.\n\n## AI Providers\n\nSwap providers with a single import — same interface everywhere:\n\n| Provider | Default Model |\n|----------|---------------|\n| Anthropic | `claude-sonnet-4-20250514` |\n| OpenAI | `gpt-4o` |\n| Google Gemini | `gemini-2.5-flash` |\n| Groq | `llama-3.3-70b-versatile` |\n| Mistral | `mistral-large-latest` |\n| Together AI | `Llama-3.3-70B-Instruct-Turbo` |\n| Atlas Cloud | `llama-3.3-70b` |\n\n```go\nm := ai.New(\"anthropic\", ai.WithAPIKey(key))\nresp, _ := m.Generate(ctx, &ai.Request{Prompt: \"hello\"})\n```\n\n## Examples\n\n- [hello-world](examples/hello-world/) — Basic RPC service\n- [multi-service](examples/multi-service/) — Multiple services in one binary\n- [mcp](examples/mcp/) — MCP integration with AI agents\n- [agent-plan-delegate](examples/agent-plan-delegate/) — Agent planning and multi-agent delegation\n- [grpc-interop](examples/grpc-interop/) — Call go-micro from any gRPC client\n\nSee [all examples](examples/README.md).\n\n## Docs\n\n- [Getting Started](internal/website/docs/getting-started.md)\n- [AI Integration](internal/website/docs/ai-integration.md)\n- [Agents and Workflows](internal/website/docs/guides/agents-and-workflows.md)\n- [Agent Design](internal/docs/AGENT_DESIGN.md)\n- [Plan & Delegate](internal/website/docs/guides/plan-delegate.md)\n- [Agent Guardrails](internal/website/docs/guides/agent-guardrails.md)\n- [Payments (x402)](internal/website/docs/guides/x402-payments.md)\n- [MCP & AI Agents](internal/website/docs/mcp.md)\n- [Data Model](internal/website/docs/model.md)\n- [Deployment](internal/website/docs/deployment.md)\n- [Plugins](internal/website/docs/plugins.md)\n\nPackage reference: https://pkg.go.dev/go-micro.dev/v6\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A320:B08CF:1770A5:5E2480:6AB92F1D"},"text_sha256":"96ed9a6448a05310f41099c88a05c6dee5fbd1922e15f65df37d89632e1fe875"},{"path":"internal/website/docs/guides/mcp-security.md","size":10514,"blob_sha":"428dcee913d86d343119f920e2abacc157b20054","priority":1,"status":200,"text":"---\nlayout: default\n---\n\n# MCP Security Guide\n\nThis guide covers how to secure your MCP gateway for production use, including authentication, per-tool scopes, rate limiting, and audit logging.\n\n## Overview\n\nThe MCP gateway provides four layers of security:\n\n1. **Authentication** - Verify the caller's identity via bearer tokens\n2. **Scopes** - Control which tools each token can access\n3. **Rate Limiting** - Prevent abuse with per-tool rate limits\n4. **Audit Logging** - Record every tool call for compliance and debugging\n\n## Authentication\n\n### Bearer Token Auth\n\nThe MCP gateway uses bearer token authentication. Tokens are validated by the configured `auth.Auth` provider.\n\n```go\nimport (\n    \"go-micro.dev/v6/gateway/mcp\"\n    \"go-micro.dev/v6/auth\"\n)\n\ngateway := mcp.ListenAndServe(\":3000\", mcp.Options{\n    Registry: service.Options().Registry,\n    Auth:     authProvider, // auth.Auth implementation\n})\n```\n\nAgents pass tokens in the `Authorization` header:\n\n```bash\ncurl -X POST http://localhost:3000/mcp/call \\\n  -H \"Authorization: Bearer <token>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"tasks.TaskService.Create\", \"input\": {\"title\": \"New task\"}}'\n```\n\n### Using micro run / micro server\n\nWhen using `micro run` or `micro server`, authentication is handled automatically:\n\n- **Development mode (`micro run`):** Auth is disabled by default for easy development\n- **Production mode (`micro server`):** JWT auth is enabled with user management at `/auth`\n\nCreate tokens with specific scopes via the dashboard at `/auth/tokens`.\n\n## Per-Tool Scopes\n\nScopes control which tools a token can access. There are two ways to set scopes.\n\n### Service-Level Scopes\n\nSet scopes when registering your handler. These travel with the service through the registry:\n\n```go\nhandler := service.Server().NewHandler(\n    new(TaskService),\n    server.WithEndpointScopes(\"TaskService.Get\", \"tasks:read\"),\n    server.WithEndpointScopes(\"TaskService.List\", \"tasks:read\"),\n    server.WithEndpointScopes(\"TaskService.Create\", \"tasks:write\"),\n    server.WithEndpointScopes(\"TaskService.Update\", \"tasks:write\"),\n    server.WithEndpointScopes(\"TaskService.Delete\", \"tasks:admin\"),\n)\n```\n\n### Gateway-Level Scopes\n\nOverride or add scopes at the gateway without modifying services. Gateway scopes take precedence:\n\n```go\nmcp.ListenAndServe(\":3000\", mcp.Options{\n    Registry: reg,\n    Auth:     authProvider,\n    Scopes: map[string][]string{\n        \"tasks.TaskService.Create\": {\"tasks:write\"},\n        \"tasks.TaskService.Delete\": {\"tasks:admin\"},\n        \"billing.Billing.Charge\":   {\"billing:admin\"},\n    },\n})\n```\n\n### Scope Enforcement\n\nWhen a tool is called:\n\n1. Gateway checks if the tool has required scopes\n2. If scopes are defined, the caller's token must include at least one matching scope\n3. A token with scope `*` has unrestricted access (admin)\n4. If no scopes are defined for a tool, any authenticated token can call it\n5. Denied calls return `403 Forbidden`\n\n### Common Scope Patterns\n\n| Pattern | Use Case |\n|---------|----------|\n| `service:read` | Read-only access to a service |\n| `service:write` | Create and update operations |\n| `service:admin` | Delete and destructive operations |\n| `*` | Full admin access (use sparingly) |\n| `internal` | Internal-only tools not exposed to external agents |\n\n### Token Examples\n\n```\nToken A: scopes=[\"tasks:read\"]\n  ✅ Can call TaskService.Get, TaskService.List\n  ❌ Cannot call TaskService.Create, TaskService.Delete\n\nToken B: scopes=[\"tasks:read\", \"tasks:write\"]\n  ✅ Can call Get, List, Create, Update\n  ❌ Cannot call TaskService.Delete (needs tasks:admin)\n\nToken C: scopes=[\"*\"]\n  ✅ Can call everything (admin)\n```\n\n## Rate Limiting\n\nPrevent abuse with per-tool rate limiting using a token bucket algorithm:\n\n```go\nmcp.ListenAndServe(\":3000\", mcp.Options{\n    Registry: reg,\n    RateLimit: &mcp.RateLimitConfig{\n        RequestsPerSecond: 10,  // Sustained rate\n        Burst:             20,  // Allow bursts up to 20\n    },\n})\n```\n\nWhen the rate limit is exceeded, calls return `429 Too Many Requests`.\n\n### Choosing Rate Limits\n\n| Service Type | Requests/sec | Burst | Rationale |\n|-------------|-------------|-------|-----------|\n| Read-heavy API | 50 | 100 | High throughput, low cost |\n| Write API | 10 | 20 | Moderate, prevents spam |\n| Expensive operation | 2 | 5 | Protect downstream resources |\n| Internal tool | 100 | 200 | Trusted callers, higher limits |\n\n## Audit Logging\n\nRecord every tool call for compliance, debugging, and analytics:\n\n```go\nmcp.ListenAndServe(\":3000\", mcp.Options{\n    Registry: reg,\n    Auth:     authProvider,\n    AuditFunc: func(record mcp.AuditRecord) {\n        log.Printf(\"[AUDIT] tool=%s account=%s allowed=%v duration=%v err=%v\",\n            record.Tool,\n            record.AccountID,\n            record.Allowed,\n            record.Duration,\n            record.Error,\n        )\n    },\n})\n```\n\n### AuditRecord Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `Tool` | `string` | Full tool name (e.g., `tasks.TaskService.Create`) |\n| `AccountID` | `string` | Caller's account ID from the auth token |\n| `Scopes` | `[]string` | Scopes on the caller's token |\n| `Allowed` | `bool` | Whether the call was permitted |\n| `Duration` | `time.Duration` | How long the call took |\n| `Error` | `error` | Error if the call failed |\n| `TraceID` | `string` | UUID trace ID for correlation |\n| `DeniedReason` | `string` | Why the call was denied (empty if allowed) |\n\n### Production Audit Logging\n\nFor production, send audit records to a structured logging system:\n\n```go\nAuditFunc: func(r mcp.AuditRecord) {\n    // Structured JSON logging\n    logger.Info(\"mcp_tool_call\",\n        \"tool\", r.Tool,\n        \"account\", r.AccountID,\n        \"allowed\", r.Allowed,\n        \"duration_ms\", r.Duration.Milliseconds(),\n        \"trace_id\", r.TraceID,\n    )\n\n    // Alert on denied calls\n    if !r.Allowed {\n        alerting.Notify(\"MCP access denied\",\n            \"tool\", r.Tool,\n            \"account\", r.AccountID,\n        )\n    }\n},\n```\n\n## Tracing\n\nEvery MCP tool call gets a UUID trace ID, propagated via metadata headers:\n\n| Header | Description |\n|--------|-------------|\n| `Mcp-Trace-Id` | UUID for the tool call |\n| `Mcp-Tool-Name` | Name of the tool called |\n| `Mcp-Account-Id` | Caller's account ID |\n\nThese are available in your handler via context metadata:\n\n```go\nfunc (t *TaskService) Create(ctx context.Context, req *CreateRequest, rsp *CreateResponse) error {\n    md, _ := metadata.FromContext(ctx)\n    traceID := md[\"Mcp-Trace-Id\"]\n    log.Printf(\"Creating task, trace: %s\", traceID)\n    // ...\n}\n```\n\n### OpenTelemetry Integration\n\nFor full distributed tracing, plug in an OpenTelemetry trace provider:\n\n```go\nimport (\n    \"go.opentelemetry.io/otel\"\n    \"go-micro.dev/v6/gateway/mcp\"\n)\n\nmcp.ListenAndServe(\":3000\", mcp.Options{\n    Registry:      reg,\n    TraceProvider: otel.GetTracerProvider(),\n})\n```\n\nEach tool call creates a span (`mcp.tool.call`) with these attributes:\n\n| Attribute | Example |\n|-----------|---------|\n| `mcp.tool.name` | `tasks.TaskService.Create` |\n| `mcp.transport` | `http`, `websocket`, `stdio` |\n| `mcp.account.id` | `user-123` |\n| `mcp.trace.id` | `a1b2c3d4-...` |\n| `mcp.auth.allowed` | `true` |\n| `mcp.auth.denied_reason` | `insufficient_scope` |\n| `mcp.scopes.required` | `tasks:write` |\n| `mcp.rate_limited` | `false` |\n\nThe gateway propagates W3C trace context downstream, so you get end-to-end traces from agent → gateway → service in Jaeger, Zipkin, or any OTel-compatible backend.\n\n## WebSocket Authentication\n\nThe WebSocket transport supports two authentication methods:\n\n### Connection-Level Auth (Recommended)\n\nPass the token in the WebSocket upgrade request:\n\n```javascript\nconst ws = new WebSocket(\"ws://localhost:3000/mcp/ws\", {\n  headers: { \"Authorization\": \"Bearer <token>\" }\n});\n```\n\nThe token is validated once on connection and applies to all messages on that connection.\n\n### Per-Message Auth\n\nFor stateless connections, pass a `_token` parameter with each tool call:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"tasks.TaskService.Create\",\n    \"arguments\": {\"title\": \"New task\"},\n    \"_token\": \"Bearer <token>\"\n  }\n}\n```\n\nConnection-level auth takes precedence over per-message auth.\n\n## Production Checklist\n\nBefore deploying MCP to production:\n\n- [ ] **Auth enabled** - Configure an `auth.Auth` provider\n- [ ] **Scopes defined** - Every write/delete endpoint has required scopes\n- [ ] **Rate limits set** - Appropriate limits for each service type\n- [ ] **Audit logging active** - All calls logged to a persistent store\n- [ ] **HTTPS/TLS** - MCP gateway behind TLS termination\n- [ ] **Token rotation** - Process for rotating compromised tokens\n- [ ] **Monitoring** - Alerts on high error rates or denied calls\n- [ ] **Testing** - Verified scope enforcement with `micro mcp test`\n\n## Full Example\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    \"go-micro.dev/v6\"\n    \"go-micro.dev/v6/auth\"\n    \"go-micro.dev/v6/gateway/mcp\"\n    \"go-micro.dev/v6/server\"\n)\n\nfunc main() {\n    service := micro.NewService(\"tasks\",\n        micro.Address(\":8081\"),\n    )\n    service.Init()\n\n    // Register handler with scopes\n    handler := service.Server().NewHandler(\n        &TaskService{tasks: make(map[string]*Task)},\n        server.WithEndpointScopes(\"TaskService.Get\", \"tasks:read\"),\n        server.WithEndpointScopes(\"TaskService.Create\", \"tasks:write\"),\n        server.WithEndpointScopes(\"TaskService.Delete\", \"tasks:admin\"),\n    )\n    service.Server().Handle(handler)\n\n    // Start MCP gateway with full security\n    go mcp.ListenAndServe(\":3000\", mcp.Options{\n        Registry: service.Options().Registry,\n        Auth:     service.Options().Auth,\n        Scopes: map[string][]string{\n            // Gateway-level overrides\n            \"billing.Billing.Charge\": {\"billing:admin\"},\n        },\n        RateLimit: &mcp.RateLimitConfig{\n            RequestsPerSecond: 10,\n            Burst:             20,\n        },\n        AuditFunc: func(r mcp.AuditRecord) {\n            log.Printf(\"[AUDIT] tool=%s account=%s allowed=%v duration=%v\",\n                r.Tool, r.AccountID, r.Allowed, r.Duration)\n        },\n    })\n\n    service.Run()\n}\n```\n\n## Next Steps\n\n- [Building AI-Native Services](ai-native-services.md) - End-to-end tutorial\n- [Tool Description Best Practices](tool-descriptions.md) - Write effective documentation\n- [Agent Integration Patterns](agent-patterns.md) - Multi-agent architectures\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"73C4:324E19:182AED:5EDE3A:6AB92F1E"},"text_sha256":"163b84331c0ae6e02c0f77e723fad38eb79d65d7f92dc250e79301161759200f"},{"path":"internal/website/docs/SECURITY_MIGRATION.md","size":5237,"blob_sha":"a1bf828b195b8a0a40f33c1792b24719f81e6820","priority":1,"status":200,"text":"# TLS Security Migration Guide\n\n## Overview\n\nGo Micro v6 verifies TLS certificates by default. This guide is for teams\nupgrading from v5, where TLS verification was disabled by default for backward\ncompatibility.\n\n## Current Status (v6)\n\n**Default Behavior**: TLS certificate verification is **enabled** by default\n(`InsecureSkipVerify: false`).\n\n**What changed from v5**: v5 allowed `MICRO_TLS_SECURE=true` to opt into\ncertificate verification. In v6, secure verification is the default and\n`MICRO_TLS_SECURE` is no longer used.\n\n**Development escape hatch**: for local self-signed certificates only, set\n`MICRO_TLS_INSECURE=true` or provide an explicit insecure TLS config.\n\n## Migration Path from v5\n\n### 1. Remove the old opt-in flag\n\nDelete any use of the v5-only environment variable:\n\n```bash\nunset MICRO_TLS_SECURE\n```\n\nNo replacement is required for production: verification is already on in v6.\n\n### 2. Use the default secure config\n\nMost services need no TLS-specific code. If you configure TLS explicitly, use a standard `crypto/tls` config with verification enabled:\n\n```go\nimport (\n    \"crypto/tls\"\n    \"go-micro.dev/v6/broker\"\n)\n\n// Create broker with certificate verification enabled.\nb := broker.NewHttpBroker(\n    broker.TLSConfig(&tls.Config{MinVersion: tls.VersionTLS12}),\n)\n```\n\n### 3. Provide a custom trust root when needed\n\nFor private CAs, provide your own TLS configuration:\n\n```go\nimport (\n    \"crypto/tls\"\n    \"crypto/x509\"\n    \"go-micro.dev/v6/broker\"\n    \"os\"\n)\n\n// Load CA certificates\ncaCert, err := os.ReadFile(\"/path/to/ca-cert.pem\")\nif err != nil {\n    log.Fatal(err)\n}\n\ncaCertPool := x509.NewCertPool()\ncaCertPool.AppendCertsFromPEM(caCert)\n\n// Create custom TLS config\ntlsConfig := &tls.Config{\n    RootCAs:    caCertPool,\n    MinVersion: tls.VersionTLS12,\n}\n\n// Create broker with custom config\nb := broker.NewHttpBroker(\n    broker.TLSConfig(tlsConfig),\n)\n```\n\n### 4. Use insecure mode only for local development\n\nIf a development environment still uses self-signed certificates that are not in\nyour trust store, opt out explicitly:\n\n```bash\nexport MICRO_TLS_INSECURE=true\n```\n\nor in code:\n\n```go\nbroker.TLSConfig(&tls.Config{InsecureSkipVerify: true, MinVersion: tls.VersionTLS12})\n```\n\nDo not use insecure mode in production.\n\n## Production Deployment Strategy\n\n### Rolling Upgrade Considerations\n\nThe default changed at the v6 major-version boundary. Before rolling v6 into a\nfleet that uses TLS, verify that:\n\n1. All services present certificates trusted by their peers.\n2. Private or self-signed CAs are installed consistently on every host.\n3. Certificates include the DNS names or IP subject alternative names used by\n   clients.\n4. Any deliberate development-only insecure settings are excluded from\n   production manifests.\n\n### Recommended Approach\n\n1. **Test in Staging** with the same certificate chain and service names used in\n   production.\n2. **Remove v5 flags** such as `MICRO_TLS_SECURE`; they no longer control v6.\n3. **Monitor for Issues**: watch for TLS handshake failures or certificate\n   validation errors.\n4. **Use explicit insecure mode only in dev** when a short-lived environment\n   cannot yet provide trusted certificates.\n\n### Multi-Host/Multi-Process Considerations\n\n**Certificate Trust**: With secure mode as the default, ensure:\n\n1. All hosts trust the same root CAs.\n2. Self-signed certificates are properly distributed if used.\n3. Certificate validity periods are monitored.\n4. Certificate chains are complete.\n\n**Service Mesh Alternative**: Consider using a service mesh (Istio, Linkerd, etc.) for:\n- Automatic mTLS between services\n- Certificate management and rotation\n- No application code changes required\n\n## Testing Your Migration\n\n### Verify Secure Mode is Active\n\n```go\npackage main\n\nimport (\n    \"crypto/tls\"\n    \"fmt\"\n)\n\nfunc main() {\n    config := &tls.Config{MinVersion: tls.VersionTLS12}\n    fmt.Printf(\"InsecureSkipVerify: %v (should be false)\\n\", config.InsecureSkipVerify)\n}\n```\n\n### Test Certificate Validation\n\nCreate a test service and verify it:\n- Accepts valid certificates\n- Rejects invalid/self-signed certificates (when not in CA)\n- Properly validates certificate chains\n\n## Common Issues and Solutions\n\n### Issue: \"x509: certificate signed by unknown authority\"\n\n**Cause**: The server certificate is not signed by a trusted CA\n\n**Solution**:\n1. Add the CA certificate to the trusted root CAs\n2. Use a properly signed certificate\n3. For development only: use `MICRO_TLS_INSECURE=true` or an explicit insecure TLS config\n\n### Issue: \"x509: certificate has expired\"\n\n**Cause**: Server certificate has expired\n\n**Solution**:\n1. Renew the certificate\n2. Implement certificate rotation\n3. Monitor certificate expiry dates\n\n### Issue: Services can't communicate after upgrading to v6\n\n**Cause**: Certificates that v5 accepted by default are now verified.\n\n**Solution**:\n1. Ensure all services use certificates from a trusted CA\n2. Distribute CA certificates to all nodes\n3. Verify certificate SANs match service addresses\n4. Use insecure mode only as a temporary local-development workaround\n\n## Questions?\n\nFor issues or questions about TLS security migration, open an issue on GitHub or\ncheck the documentation at https://go-micro.dev/docs/.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2D6A:727CE:176E2D:5E21D2:6AB92F1E"},"text_sha256":"3b9488d91c1de416abe0b6fbaa8e1028493ad97c099a450f692f24ddcaa1ad9e"},{"path":"internal/website/docs/TLS_SECURITY_UPDATE.md","size":1282,"blob_sha":"7008fe829b37b4025a910184dba5ec4fb8edce53","priority":1,"status":200,"text":"# TLS Security Update - Important Information\n\n## What Changed\n\nGo Micro v6 verifies TLS certificates by default. This completes the v5 security\nmigration where verification was opt-in.\n\n## Current Behavior (v6.x)\n\n**Default**: TLS certificate verification is **enabled**.\n- `MICRO_TLS_SECURE` was a v5 opt-in flag and is no longer used.\n- For local development with untrusted self-signed certificates, opt out\n  explicitly with `MICRO_TLS_INSECURE=true` or an explicit insecure TLS config.\n\n## Production Recommendation\n\nFor production deployments:\n1. Use CA-signed certificates or distribute your private CA to every host.\n2. Remove old `MICRO_TLS_SECURE` settings from v5-era manifests.\n3. Do not set `MICRO_TLS_INSECURE=true` in production.\n4. Consider service mesh mTLS (Istio, Linkerd) if certificate lifecycle should be\n   managed outside the application.\n\n## Migration Timeline\n\n- **v5.x**: Insecure by default, opt-in security via `MICRO_TLS_SECURE=true`.\n- **v6.x current**: Secure by default; use `MICRO_TLS_INSECURE=true` only for an\n  explicit development opt-out.\n\n## Documentation\n\nSee [SECURITY_MIGRATION.md](SECURITY_MIGRATION.html) for the detailed migration\nguide.\n\n## Questions?\n\nOpen an issue on GitHub or check the documentation at https://go-micro.dev/docs/.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"A52A:3A3DD:17BD3B:5E708C:6AB92F1F"},"text_sha256":"4fe18e026fdb9a2286d8ff25375e9abd5f73955834ae8c3f570974bc00fdae39"},{"path":"SECURITY.md","size":4415,"blob_sha":"4bda494d223cb6ab52362fd64be4e785b0798fdb","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\nWe actively support the following versions of go-micro:\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 5.x     | :white_check_mark: |\n| 4.x     | :x:                |\n| 3.x     | :x:                |\n| < 3.0   | :x:                |\n\n## Reporting a Vulnerability\n\n**Please do not report security vulnerabilities through public GitHub issues.**\n\n### How to Report\n\nSend security vulnerability reports to: **security@go-micro.dev**\n\nOr use GitHub's private security advisory feature:\nhttps://github.com/micro/go-micro/security/advisories/new\n\n### What to Include\n\nPlease include as much of the following information as possible:\n\n- Type of vulnerability (e.g., RCE, XSS, SQL injection, etc.)\n- Full paths of source file(s) related to the vulnerability\n- Location of the affected source code (tag/branch/commit or direct URL)\n- Step-by-step instructions to reproduce the issue\n- Proof-of-concept or exploit code (if possible)\n- Impact of the issue, including how an attacker might exploit it\n\n### Response Timeline\n\n- **Acknowledgment**: Within 48 hours\n- **Initial Assessment**: Within 5 business days\n- **Fix Timeline**: Depends on severity\n  - Critical: 7 days\n  - High: 14 days\n  - Medium: 30 days\n  - Low: Next release cycle\n\n### Disclosure Policy\n\n- We follow **coordinated disclosure**\n- We'll work with you to understand and fix the issue\n- We'll credit you in the security advisory (unless you prefer to remain anonymous)\n- Please give us reasonable time to fix before public disclosure\n- We'll publish a security advisory on GitHub when the fix is released\n\n## Security Best Practices\n\nWhen using go-micro in production:\n\n### TLS/Transport Security\n\n```go\nimport \"go-micro.dev/v5/transport\"\n\n// Enable TLS verification (recommended)\nos.Setenv(\"MICRO_TLS_SECURE\", \"true\")\n\n// Or use SecureConfig explicitly\ntlsConfig := transport.SecureConfig()\n```\n\nSee [TLS Security Update](internal/website/docs/TLS_SECURITY_UPDATE.md) for details.\n\n### Authentication\n\n```go\nimport \"go-micro.dev/v5/auth\"\n\n// Use JWT authentication\nservice := micro.NewService(\n    micro.Auth(auth.NewAuth()),\n)\n```\n\n### Input Validation\n\nAlways validate and sanitize inputs in your handlers:\n\n```go\nfunc (h *Handler) Create(ctx context.Context, req *Request, rsp *Response) error {\n    // Validate input\n    if req.Name == \"\" {\n        return errors.BadRequest(\"handler.create\", \"name is required\")\n    }\n    \n    // Sanitize and process\n    // ...\n}\n```\n\n### Rate Limiting\n\nImplement rate limiting for public-facing services:\n\n```go\nimport \"go-micro.dev/v5/client\"\n\n// Client-side rate limiting\nclient.NewClient(\n    client.RequestTimeout(time.Second * 5),\n    client.Retries(3),\n)\n```\n\n### Secrets Management\n\nNever commit secrets to version control:\n\n```go\n// Good: Use environment variables\napiKey := os.Getenv(\"API_KEY\")\n\n// Better: Use a secrets manager\nimport \"github.com/hashicorp/vault/api\"\n```\n\n### Dependency Security\n\nRegularly update dependencies:\n\n```bash\n# Check for vulnerabilities\ngo list -json -m all | nancy sleuth\n\n# Update dependencies\ngo get -u ./...\ngo mod tidy\n```\n\n## Known Security Considerations\n\n### Reflection Usage\n\ngo-micro uses reflection for automatic handler registration. While this is a deliberate design choice for developer productivity, be aware:\n\n- Type safety is enforced at runtime, not compile time\n- Malformed requests won't crash services (errors are returned)\n- See [Performance Considerations](internal/website/docs/performance.md)\n\n### TLS Certificate Verification\n\n**Default behavior in v5**: TLS certificate verification is **disabled** for backward compatibility.\n\n**Production recommendation**: Enable secure mode:\n\n```bash\nexport MICRO_TLS_SECURE=true\n```\n\nThis will be the default in v6.\n\n## Security Updates\n\nSecurity updates are published as:\n- GitHub Security Advisories\n- Release notes with `[SECURITY]` prefix\n- CVE entries for critical issues\n\nSubscribe to releases: https://github.com/micro/go-micro/releases\n\n## Bug Bounty\n\nWe currently do not offer a bug bounty program, but we greatly appreciate responsible disclosure and will publicly credit researchers who report valid security issues.\n\n## Questions?\n\nFor security questions that are not vulnerabilities, please:\n- Open a discussion: https://github.com/micro/go-micro/discussions\n- Join Discord: https://discord.gg/WeMU5AGxD\n- Email: support@go-micro.dev\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"F38C:3B7E2:17350B:5DE97B:6AB92F1F"},"text_sha256":"12a6a25e633b1b637eb5c111ef6146fdbd7c26c2c4e0de85bc5f50f886a2d4e9"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"judge0/judge0","input_row":{"repository":"judge0/judge0","url":"https://github.com/judge0/judge0","name":"judge0","owner":"judge0","description":"Robust, fast, scalable, and sandboxed open-source online code execution system for humans and AI.","language":"HTML","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":4450,"issues":475,"created_at":"2017-01-27T19:47:35Z","updated_at":"2026-09-27T08:23:44Z","first_commit_at":"2016-08-22T19:18:57Z","last_commit_at":"2026-09-25T20:44:43Z","activity_months":121.09,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:40.853Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"judge0/judge0","visibility":"public","created_at":"2017-01-27T19:47:35Z","updated_at":"2026-09-27T08:23:44Z","private":false,"fork":false,"archived":false,"stargazers_count":4450,"open_issues_count":198,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1248","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"093A:754BF:17FB1C9:1C26ED1:6AB92F20"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1247","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0794:74C18:1836289:1C62249:6AB92F21"},"commit":{"sha":"72d810acd9d51b7da1c264afe6fa31740b9701ac","url":"https://github.com/judge0/judge0/commit/72d810acd9d51b7da1c264afe6fa31740b9701ac","date":"2018-03-03T17:06:17Z","author_date":"2018-03-03T17:06:17Z","committer_date":"2018-03-03T17:06:17Z","tree_sha":"ed4beff1c586c618fa8d4910e23e226d16bb2470","message_first_line":"Added news annoucement about Judge0 API 2.0.0"},"tree_request_status":200,"tree_rate":{"github_remaining":"1246","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"087E:78367:183CBED:1C6850B:6AB92F21"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":7854,"blob_sha":"643488a2950c6ec70196cc5d066b304b69e2429a","priority":0}],"documents":[{"path":"README.md","size":7854,"blob_sha":"643488a2950c6ec70196cc5d066b304b69e2429a","priority":0,"status":200,"text":"# [NEWS] Please read [this](https://judge0.com/announcement-of-judge0-api-2-0-0/) blog post (1 min read) before continuing. \n\n# Judge0 API\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://github.com/judge0/api/blob/master/LICENSE)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/hermanzdosilovic)\n\n## About\n**Judge0 API** is an web API for code compilation and execution. Complete and detailed API documentation is available\non https://api.judge0.com.\n\n## Content\n1. [Supported Languages](#supported-languages)\n2. [Project Organization](#project-organization)\n3. [Quick Development Setup](#quick-development-setup)\n4. [Quick Production Setup](#quick-production-setup)\n5. [About Docker Images](#about-docker-images)\n6. [Adding New Compiler or Interpreter](#adding-new-compiler-or-interpreter)\n7. [HTTPS In Production](#https-in-production)\n8. [Notes](#notes)\n\n## Supported Languages\n|#|Name|\n|:---:|:---:|\n|1 |Bash (4.4)|\n|2 |Bash (4.0)|\n|3 |Basic (fbc 1.05.0)|\n|4 |C (gcc 7.2.0)|\n|5 |C (gcc 6.4.0)|\n|6 |C (gcc 6.3.0)|\n|7 |C (gcc 5.4.0)|\n|8 |C (gcc 4.9.4)|\n|9 |C (gcc 4.8.5)|\n|10|C++ (g++ 7.2.0)|\n|11|C++ (g++ 6.4.0)|\n|12|C++ (g++ 6.3.0)|\n|13|C++ (g++ 5.4.0)|\n|14|C++ (g++ 4.9.4)|\n|15|C++ (g++ 4.8.5)|\n|16|C# (mono 5.4.0.167)|\n|17|C# (mono 5.2.0.224)|\n|18|Clojure (1.8.0)|\n|19|Crystal (0.23.1)|\n|20|Elixir (1.5.1)|\n|21|Erlang (OTP 20.0)|\n|22|Go (1.9)|\n|23|Haskell (ghc 8.2.1)|\n|24|Haskell (ghc 8.0.2)|\n|25|Insect (5.0.0)|\n|26|Java (OpenJDK 9 with Eclipse OpenJ9)|\n|27|Java (OpenJDK 8)|\n|28|Java (OpenJDK 7)|\n|29|JavaScript (nodejs 8.5.0)|\n|30|JavaScript (nodejs 7.10.1)|\n|31|OCaml (4.05.0)|\n|32|Octave (4.2.0)|\n|33|Pascal (fpc 3.0.0)|\n|34|Python (3.6.0)|\n|35|Python (3.5.3)|\n|36|Python (2.7.9)|\n|37|Python (2.6.9)|\n|38|Ruby (2.4.0)|\n|39|Ruby (2.3.3)|\n|40|Ruby (2.2.6)|\n|41|Ruby (2.1.9)|\n|42|Rust (1.20.0)|\n|43|Text (plain text)|\n\n## Project Organization\nJudge0 API is a [Rails 5](http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/) application organized in two major components:\n\n* [Rails API](https://github.com/rails-api/rails-api)\n  * accepts requests and creates background jobs for Worker.\n* [Worker](https://github.com/resque/resque)\n  * accepts new jobs and process them as they arrive. Worker has only one job - [IsolateJob](https://github.com/judge0/api/blob/master/app/jobs/isolate_job.rb), that job runs untrusted programs in sandboxed environment.\n\n## Quick Development Setup\nSetting up your development environment is easy thanks to [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/). So please install those before continuing.\n\nBecause we are running our development environment in Docker you don't need to have Ruby, Rails, PostgreSQL, Redis, etc. installed on your computer. You just need to:\n1. Pull [judge0/api](https://hub.docker.com/r/judge0/api/) image:\n    ```\n    $ docker pull judge0/api\n    ```\n2. Copy `judge0-api.conf.default` to `judge0-api.conf`.\n3. Run development shell (it will take a while only first time):\n    ```\n    $ ./scripts/dev-shell\n    ```\n4. Create, migrate and seed the database:\n    ```\n    $ rails db:setup\n    ```\n\n`scripts/dev-shell` script will open you new **development shell** always in the same container, and if container doesn't exist it will create one for you.\n\nYou need to run Rails API and Worker in order to have Judge0 API fully operational:\n\n1. Open new development shell and in there run Rails API server:\n    ```\n    $ ./scripts/dev-run-server\n    ```\n2. Open new development shell again and in there run Worker process:\n    ```\n    $ ./scripts/dev-run-worker\n    ```\n3. Open http://localhost:3000 in your browser.\n\nThis is minimal setup for development environment, now you can open your favorite editor in your host and start developing Judge0 API.\n\n## Quick Production Setup\nTo host your own Judge0 API you need to install [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) on your server and after you are done proceed with the following:\n\n1. Copy [docker-compose.prod.yml](https://github.com/judge0/api/blob/master/docker-compose.prod.yml) on your server and save it as `docker-compose.yml`\n    ```\n    $ wget https://raw.githubusercontent.com/judge0/api/master/docker-compose.prod.yml -O docker-compose.yml\n    ```\n\n2. Save [judge0-api.conf.default](https://github.com/judge0/api/blob/master/judge0-api.conf.default) to your server as `judge0-api.conf`\n    ```\n    $ wget https://raw.githubusercontent.com/judge0/api/master/judge0-api.conf.default -O judge0-api.conf\n    ```\n3. In `judge0-api.conf` change `RAILS_ENV` to `production`.\n4. Run database:\n    ```\n    $ docker-compose up -d db\n    ```\n\n5. Run all other services:\n    ```\n    $ docker-compose up -d\n    ```\n\n6. Open `http://<IP OF YOUR SERVER>:3000` in your browser.\n\n## About Docker Images\nThis project has two Dockerfiles:\n1. [Dockerfile](https://github.com/judge0/api/blob/master/Dockerfile)\n   * builds `judge0/api:latest` image\n\n2. [Dockerfile.dev](https://github.com/judge0/api/blob/master/Dockerfile.dev)\n   * build `judge0/api:dev` image\n\n`judge0/api:latest` is built FROM `judge0/api-base:latest` image which contains installed compilers and sandbox environment. This image represents production image of Judge0 API.\n\n`judge0/api:dev` is your local development image built FROM `judge0/api:latest`. It is not pushed to Docker Hub. That is why you first need to pull `judge0/api:latest` before building your development environment.\n\n## Adding New Compiler or Interpreter\nTo add new compiler or interpreter you first need to install it into Judge0 API Base image. Instructions on how to do that can be found in documentation for [Judge0 API Base](https://github.com/judge0/api-base).\n\nAfter you have added your favorite compiler/interpreter to Judge0 API Base image you need to define how this compiler/interpreter is used. This is done in [`db/seeds.rb`](https://github.com/judge0/api/blob/master/db/seeds.rb) file.\n\nYou have four attributes:\n* `name` - name of your language you are supporting, include also compiler name and version\n* `source_file` - in what file should user's source code be saved before it is compiled\n* `compile_cmd` - how this file is compiled, interpreted languages won't have this attribute\n* `run_cmd` - how should we run this compiled or interpreted language\n\nWe already provided enough examples for most common languages, be sure to check that out.\n\n## HTTPS In Production\nTo use HTTPS in production we are going to use https://letsencrypt.org/.\n\nYou need to have your own domain for this to work. Just use [docker-compose.prod.https.yml](https://github.com/judge0/api/blob/master/docker-compose.prod.yml) insted of [docker-compose.prod.yml](https://github.com/judge0/api/blob/master/docker-compose.prod.yml) and change `VIRTUAL_HOST`, `LETSENCRYPT_HOST` and `LETSENCRYPT_EMAIL` variables.\n\nEverything else you need to do is described in [Quick Production Setup](#quick-production-setup) section.\n\n## Notes\nJudge0 API is simple to use and develop only if you are comfortable with using Docker and Docker Compose.\n\nDocker and Docker Compose allow us to get rid of all dependencies, and concentrate on what is important - features, functionality and reliability.\n\nPlease before working with Judge0 API project, make yourself comfortable with Docker and Docker Compose, because we are using it extensively.\n\nWe will add extensive documentation in the future about how and why we are using Docker and Docker Compose here, but this documentation won't substitute your knowledge of this technologies.\n\nFeel free to ask us any questions in [Issues](https://github.com/judge0/api/issues) directly. :)\n\n## Donate\nIf you like Judge0, please consider making a [donation](https://www.paypal.me/hermanzdosilovic) to support this project.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"C882:3E1C8:181547:5EC7DB:6AB92F20"},"text_sha256":"378e4c3ed92d2275cfb0c729fb53a60045425433254930d59f8ac7efab62bbef"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1245","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"080C:E80A6:17D5542:1C013D0:6AB92F22"},"commit":{"sha":"e13861e0317bad44c7ac843840d7471e7d64a1b9","url":"https://github.com/judge0/judge0/commit/e13861e0317bad44c7ac843840d7471e7d64a1b9","date":"2026-06-30T16:34:40Z","author_date":"2026-06-30T16:34:40Z","committer_date":"2026-06-30T16:34:40Z","tree_sha":"9a0a131931439c27bc0a79dead280ba72c9ebd7d","message_first_line":"Add My Code Weapon paper"},"tree_request_status":200,"tree_rate":{"github_remaining":"1244","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EE:74181:17AFDE4:1BDBB60:6AB92F22"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":45517,"blob_sha":"e5e4034337bf34d08fb7d000fb6cbd72a53be878","priority":0},{"path":"PRIVACY_POLICY.md","size":432,"blob_sha":"1d7d69635f02f7cd37575274d7f651b08e917ab8","priority":1},{"path":"SECURITY.md","size":476,"blob_sha":"7822e0268192f25d1febf08b7fa293aae54d3990","priority":1}],"documents":[{"path":"README.md","size":45517,"blob_sha":"e5e4034337bf34d08fb7d000fb6cbd72a53be878","priority":0,"status":200,"text":"[![Judge0 Wallpaper](./.github/Judge0%20Wallpaper%2002%20Center%20White%208192x4608.png)](https://judge0.com)\n\n# Judge0\n[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/Judge0HQ)](https://x.com/Judge0HQ)\n[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/hermanzvonimir)](https://x.com/hermanzvonimir)\n\n[![License](https://img.shields.io/github/license/judge0/judge0?color=2185d0&style=flat-square)](LICENSE)\n[![Release](https://img.shields.io/github/v/release/judge0/judge0?color=2185d0&style=flat-square)](https://github.com/judge0/judge0/releases)\n[![Stars](https://img.shields.io/github/stars/judge0/judge0?color=2185d0&style=flat-square)](https://github.com/judge0/judge0/stargazers)\n\nEstablished in August 2016.\n\nCode execution made simple for every business.\n\nRobust, fast, scalable, and sandboxed open-source online code execution system for humans and AI.\n\n## Table of Contents\n\n* [About](#about)\n* [Features](#features)\n* [Get Started](#get-started)\n* [Flavors](#flavors)\n* [Citation](#citation)\n* [References](#references)\n* [Showcase](#showcase)\n* [Community](#community)\n* [Author and Contributors](#author-and-contributors)\n* [Changelog](#changelog)\n* [Special Thanks](#special-thanks)\n* [License](#license)\n\n## About\n\n[Judge0](https://judge0.com) (pronounced like \"judge zero\") is a robust, scalable, and [open-source](https://github.com/judge0/judge0) **online code execution system**. You can use it to build a wide range of applications that need online code execution features. Some examples include AI agents, competitive programming platforms, e-learning platforms, candidate assessment and recruitment platforms, online code editors, online IDEs, and many more.\n\nJudge0 is an open-source online code execution system that enables the robust, fast, scalable, and sandboxed execution of AI-generated code, with support for multiple languages and frameworks.\n\nIn our research paper [Robust and Scalable Online Code Execution System](https://paper.judge0.com), we present Judge0's modern modular architecture that can be easily deployed and scaled. We study its design, comment on the various challenges in building such systems, and compare it with other available online code execution systems and online judge systems.\n\nTo see Judge0 in action, try [Judge0 IDE](https://ide.judge0.com) - our free and open-source online code editor.\n\n## Features\n\n* [Self-hostable](https://github.com/judge0/judge0/blob/master/CHANGELOG.md#deployment-procedure) or [fully managed (SaaS)](https://judge0.com#pricing)\n* Quick and easy self-hosting [installation](https://github.com/judge0/judge0/blob/master/CHANGELOG.md#deployment-procedure)\n* Rich and verbose [API documentation](https://ce.judge0.com)\n* Simple HTTP JSON API for easy integration\n* [Official Python SDK](https://github.com/judge0/judge0-python) for easy integration\n* Scalable architecture for handling high loads\n* Sandboxed compilation and execution of untrusted code\n* Support for 90+ languages (see the full [list of supported languages](https://ide.judge0.com))\n* Compilation and execution of multi-file programs (i.e. projects)\n* Support for additional files alongside the single-file user's program\n* Support for custom user-defined compiler options, command-line arguments, and time and memory limits\n* Detailed execution results\n* Webhooks (HTTP callbacks)\n\nFor more information about these and other features, please [read the documentation](https://ce.judge0.com).\n\n## Get Started\n\nYou have plenty of options to get started with Judge0:\n1. [Use our Judge0 Cloud via Rapid](https://rapidapi.com/organization/judge0)\n2. [Use our Judge0 Cloud by directly working with us](https://judge0.com/#pricing)\n3. [Self-host Judge0 on your own infrastructure](https://github.com/judge0/judge0/blob/master/CHANGELOG.md#deployment-procedure)\n\nIntegrating Judge0 into your application is easy. You can either use our simple HTTP JSON API or use our [official Python SDK](https://github.com/judge0/judge0-python).\n\n### HTTP JSON API\n```bash\ncurl \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"language_id\": 109,\n      \"source_code\": \"print(f\\\"hello, {input()}\\\")\",\n      \"stdin\": \"Alice\"\n  }' \\\n  \"https://ce.judge0.com/submissions?wait=true\"\n```\n\n### Python SDK\n```python\n# pip install judge0\nimport judge0\nresult = judge0.run(source_code=\"print(f'hello, {input()}')\", stdin=\"Alice\", language=judge0.PYTHON)\nprint(result.stdout)\n```\n\n## Flavors\n\nJudge0 comes in two flavors: [Judge0 CE](https://rapidapi.com/judge0-official/api/judge0-ce) and [Judge0 Extra CE](https://rapidapi.com/judge0-official/api/judge0-extra-ce). They differ mostly in the supported languages.\n\nYou can find the source code for Judge0 CE on the `master` branch, while you can find the source code for Judge0 Extra CE on the `extra` branch.\n\n## Citation\n\nPlease [cite us](https://ieeexplore.ieee.org/abstract/document/9245310) if you use Judge0 in your research:\n\n```bibtex\n@INPROCEEDINGS{9245310,\n  author={Došilović, Herman Zvonimir and Mekterović, Igor},\n  booktitle={2020 43rd International Convention on Information, Communication and Electronic Technology (MIPRO)},\n  title={Robust and Scalable Online Code Execution System},\n  year={2020},\n  volume={},\n  number={},\n  pages={1627-1632},\n  keywords={Production systems;Operating systems;Systems architecture;Computer architecture;Programming profession;Open source software;Recruitment;online code execution system;online judge system;untrusted code execution},\n  doi={10.23919/MIPRO48935.2020.9245310}\n}\n```\n\n## References\n\n### Industry\n\n[These companies, institutions, and organizations use Judge0.](https://judge0.com)\n\n### Academia\n\nThese scientific articles cite Judge0.\n\n* [«SYNCODING» - COLLABORATIVE CODE WRITING](https://ikee.lib.auth.gr/record/359400)\n* [A comparison between online compilers: A Case Study](https://ieeexplore.ieee.org/document/9797096/)\n* [A Game-Changing Instructor Tool to Reinforce Coding Concepts](https://dl.acm.org/doi/10.1145/3328778.3372610)\n* [A ML-Based Stock Trading Model for Profit Predication](https://www.researchgate.net/publication/353328644_A_ML-Based_Stock_Trading_Model_for_Profit_Predication)\n* [A Secure and Scalable System for Online Code Execution and Evaluation using Containerization and Kubernetes](https://www.jetir.org/papers/JETIR2302226.pdf)\n* [A Secure, Scalable, and Integrated Smart Platform for Teaching and Coding](https://www.taylorfrancis.com/chapters/edit/10.1201/9781032673479-20/secure-scalable-integrated-smart-platform-teaching-coding-mohit-dua-giri-sainath-reddy-ramesh-vishnoi-satyam-tomar-shelza-dua)\n* [A Strategy Based on Technological Maps for the Identification of the State-of-the-Art Techniques in Software Development Projects: Virtual Judge Projects as a Case Study](https://link.springer.com/chapter/10.1007/978-3-319-98998-3_27)\n* [A Survey of Vibe Coding with Large Language Models](https://arxiv.org/abs/2510.12399)\n* [ADAPTIVE MENTORING WITH IMMEDIATE FEEDBACK FOR THE DEVELOPMENT OF PROGRAMMING SKILLS](https://library.iated.org/view/PEREZROJAS2024ADA)\n* [Advanced lab analysis system using apache spark](https://pubs.aip.org/aip/acp/article/2492/1/030016/2892049)\n* [Agent Harness Engineering: A Survey](https://openreview.net/forum?id=3hXEPbG0dh)\n* [AI-Powered Code Evaluation and Learning Assessment Platform](https://www.researchgate.net/publication/400479340_AI-Powered_Code_Evaluation_and_Learning_Assessment_Platform)\n* [An Online Judge System in Learning Management System](https://books.google.hr/books?id=KxyLEQAAQBAJ&lpg=PA327&ots=f0nMFB8KtH&lr=lang_en&pg=PA327#v=onepage&q&f=false)\n* [Analiza performansi sustava za udaljeno izvršavanje programskog kôda](https://repozitorij.fer.unizg.hr/islandora/object/fer%3A7913)\n* [Arena Acadnet - An Educational Platform for Practicing and Solving Coding Challenges](https://www.researchgate.net/publication/397088048_Arena_Acadnet_-_An_Educational_Platform_for_Practicing_and_Solving_Coding_Challenges)\n* [Artificial Intelligence and Computer-Supported Collaborative Learning in Programming: A Systematic Mapping Study](https://www.researchgate.net/publication/368884293_Artificial_Intelligence_and_Computer-Supported_Collaborative_Learning_in_Programming_A_Systematic_Mapping_Study)\n* [Automatic Evaluation of Student Software Solutions in a Virtualized Environment](https://ieeexplore.ieee.org/document/10159927)\n* [Automatic marking system for programming subject](http://eprints.utar.edu.my/5990/)\n* [Automatic question generation for JavaScript programming courses](https://ntnuopen.ntnu.no/ntnu-xmlui/handle/11250/3088497)\n* [Big Data based Advanced Lab Analysis System using Apache Spark](https://ieeexplore.ieee.org/abstract/document/9489186)\n* [BrainCode: A Coding Practice Platform with AI-Assisted Learning andReal-Time Code Execution](https://ijrpr.com/uploads/V7ISSUE5/IJRPR64488.pdf)\n* [Bridging code and timely feedback: integrating generative AI into a programming platform](https://peerj.com/articles/cs-3070/)\n* [Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation](https://www.researchgate.net/publication/407172299_Bridging_Functional_Correctness_and_Runtime_Efficiency_Gaps_in_LLM-Based_Code_Translation)\n* [Building a Comprehensive Automated Programming Assessment System](https://ieeexplore.ieee.org/document/9079865)\n* [Canvas Coding: una piattaforma di gioco per studenti basata sulla programmazione creativa = Canvas Coding: a gaming platform for students based on creative programming](https://webthesis.biblio.polito.it/29496/)\n* [Code Master: A Web-Based Competitive Programming Practice Platform](https://www.ijsreat.com/archiver/archives/code_master_a_web_based_competitive_programming_practice_platform.pdf)\n* [Code Verse](https://www.researchgate.net/publication/381988455_Code_Verse)\n* [CodeCoach: An Interactive ProgrammingAssistance Tool](https://www.researchgate.net/publication/376610279_CodeCoach_An_Interactive_ProgrammingAssistance_Tool)\n* [CODEGEEK: A NEXT-GENERATION CODING PLATFORM WITH AI- DRIVEN FEEDBACK](https://elibrary.ru/item.asp?id=82002080)\n* [CODEGEN: A React-Based Online Coding Workspace with Advanced Features and Real-Time Execution](https://www.researchgate.net/publication/386243931_CODEGEN_A_React-Based_Online_Coding_Workspace_with_Advanced_Features_and_Real-Time_Execution)\n* [CODELOOP 2.0: AN INTELLIGENT ADAPTIVE PROGRAMMING SKILL BUILDING PLATFORM](https://www.irjmets.com/upload_newfiles/irjmets80500131386/paper_file/irjmets80500131386.pdf)\n* [Computing students’ design preferences and barriers when solving short programming problems](https://peer.asee.org/computing-students-design-preferences-and-barriers-when-solving-short-programming-problems)\n* [Creating a Platform for Competitive Programming Training with Integration of Automatic Decision Checking System](https://www.researchgate.net/publication/391464412_Creating_a_Platform_for_Competitive_Programming_Training_with_Integration_of_Automatic_Decision_Checking_System)\n* [Creating Exercises with Generative AI for Teaching Introductory Secure Programming: Are We There Yet?](https://dl.acm.org/doi/abs/10.1145/3770762.3772572)\n* [CURIOSMAZE: plataforma web educativa diseñada como herramienta de refuerzo para evaluar el pensamiento lógico y las competencias en programación, utilizando Judge0 como sistema de ejecución de código, para la Unidad Educativa Juan Pablo II](https://repositorio.puce.edu.ec/items/da89d5a6-6485-4cb9-b87d-e1fd236043f3)\n* [Data science in Java/JavaScript programming environment for AI-assisted programming](https://dr.ntu.edu.sg/entities/publication/98e3138a-c5e5-4b11-a3d0-fa6cab679d67)\n* [Dataset for Validation and Performance Testing of Online Judges](https://revistas.setrem.com.br/index.php/reabtic/article/view/462/225)\n* [Desarrollo de una plataforma orientada al refuerzo en la evaluación del nivel de programación](https://oa.upm.es/63124/)\n* [Desenvolvimento de um software Web para auxiliar o processo de ensino-aprendizagem da disciplina de Introdução à Ciência da Computação (ICC) da UNESP - Instituto de Ciência e Tecnologia de Sorocaba](https://repositorio.unesp.br/items/145d27dd-354b-45ee-b465-ef9e9b25d03f)\n* [Design and Implementation of a Real-Time Feedback System for Enhancing College-Level Coding Proficiency](https://isjem.com/download/design-and-implementation-of-a-real-time-feedback-system-for-enhancing-college-level-coding-proficiency-2/)\n* [DESIGN-BASED DEVELOPMENT OF A MULTI-TYPE QUIZ AUTHORING TOOL FOR ACTIVE LEARNING](https://library.iated.org/view/PHAM2025DES)\n* [Designing a Platform to Train Secure Programming Skills With Attack-and-Defend Exercises](https://people.cs.vt.edu/tilevich/papers/educon2025.pdf)\n* [Development of a Centralized Competitive Coding Platform for College Students](https://www.ijert.org/development-of-a-centralized-competitive-coding-platform-for-college-students-ijertconv14is040064)\n* [Development of a System for Automated Testing of Program Code for the Educational Process in the Discipline \"Programming Languages](https://geosib.sgugit.ru/upload/geosibir/sborniki/2023/tom-7-1/164-171.pdf)\n* [ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?](https://arxiv.org/abs/2407.14044)\n* [Evaluation of an Online Judge for Concurrent Programming Learning](https://ieeexplore.ieee.org/abstract/document/10346201)\n* [Exploiter le Language Server Protocol pour créer un éditeur de code nomade et ergonomique](https://pure.unamur.be/ws/portalfiles/portal/98847091/2024_LoirS_Memoire.pdf)\n* [Exploring Automated Code Evaluation Systems and Resources for Code Analysis: A Comprehensive Survey](https://arxiv.org/abs/2307.08705)\n* [Full-stack web development for auto-assessment platform](https://dr.ntu.edu.sg/handle/10356/162927)\n* [Future-Proofing Programmers: Optimal Knowledge Tracing for AI-Assisted Personalized Education](https://arxiv.org/abs/2509.23996)\n* [Future-Proofing Programmers: Optimal knowledge tracing for artificial intelligence-assisted personalized education [Special Issue on Artificial Intelligence for Education: A Signal Processing Perspective]](https://www.researchgate.net/publication/400928531_Future-Proofing_Programmers_Optimal_knowledge_tracing_for_artificial_intelligence-assisted_personalized_education_Special_Issue_on_Artificial_Intelligence_for_Education_A_Signal_Processing_Perspective)\n* [Grid-Coding: An Accessible, Efficient, and Structured Coding Paradigm for Blind and Low-Vision Programmers](https://dl.acm.org/doi/abs/10.1145/3526113.3545620)\n* [Integrated Interview And Coding Practice Platform](https://www.ijert.org/research/integrated-interview-and-coding-practice-platform-IJERTV15IS042335.pdf)\n* [JediCode -- A Gamefied Approach to Competitive Coding](https://arxiv.org/abs/2311.10244)\n* [KOA: An AI-Integrated Productivity Intelligence Platform for Coding Skill Development and Real-Time Performance Analytics](https://www.researchgate.net/publication/399160152_KOA_An_AI-Integrated_Productivity_Intelligence_Platform_for_Coding_Skill_Development_and_Real-Time_Performance_Analytics)\n* [Labsense: an Ai Integrated Lab Examination Evaluation System](https://www.ijsat.org/research-paper.php?id=10885)\n* [Large Language Models in der Berufsausbildung von IT-Fachkräften]()\n* [Learn To Code Fast](https://www.ijert.org/learn-to-code-fast)\n* [Learn With Cresvia: AI Powered Gamified learning and Coding Platform for Engineering Students](https://www.ijraset.com/best-journal/learnwithcresvia-ai-powered-gamified-learning-and-coding-platform-for-engineering-students)\n* [MAGECODE: Machine-Generated Code Detection Method Using Large Language Models](https://ieeexplore.ieee.org/abstract/document/10772217)\n* [Modul za obavljanje korisnički definiranih programa u sustavu za automatsko ocjenjivanje programskog kôda Edgar](https://repozitorij.fer.unizg.hr/en/islandora/object/fer%3A12816)\n* [My Code Weapon: Adaptive Problem Recommendation and Knowledge Retention Scheduling in AI-assisted Programming Education](https://dl.acm.org/doi/epdf/10.1145/3774398.3811573)\n* [Nacionalni repozitorij završnih i diplomskih radova ZIR](https://zir.nsk.hr/islandora/search/dabar_search_keywords_mt:(%22Judge0%22))\n* [NEOLEARN: AI – DRIVEN SYSTEM FOR STUDENT ASSESSMENT AND ADAPTIVE LEARNING](https://www.irjmets.com/upload_newfiles/irjmets71200034667/paper_file/irjmets71200034667.pdf)\n* [Online Automatic Assessment System for Program Code: Architecture and Experiences](https://www.researchgate.net/publication/353329318_Online_Automatic_Assessment_System_for_Program_Code_Architecture_and_Experiences)\n* [Online Judge System: Requirements, Architecture, and Experiences](https://www.worldscientific.com/doi/10.1142/S0218194022500346)\n* [PEERLINK: A Comprehensive Collaborative Platform](https://ijsrset.com/index.php/home/article/view/IJSRSET25122209)\n* [Pengembangan Sistem Manajemen Evaluasi Pembelajaran Terintegrasi Dengan Online Judge](https://journals.upi-yai.ac.id/index.php/ikraith-informatika/article/view/1405)\n* [PERSSISTANT: A Progress Estimation System to Personalize Learning Trajectories](https://documentserver.uhasselt.be/handle/1942/44162)\n* [Predviđanje uspjeha studenata u sustavu za automatsko ocjenjivanje programskog kôda Edgar](https://repozitorij.unizg.hr/islandora/object/fer:12103)\n* [Programmable Questions in Edgar](https://ieeexplore.ieee.org/abstract/document/10159897)\n* [Prototip integracije sustava za strojno učenje u sustav Edgar](https://repozitorij.fer.unizg.hr/islandora/object/fer%3A10234)\n* [Protótipo de uma ferramenta gamificada para a aplicação de atividades práticas em sala de aula em uma disciplina de introdução à programação](http://repositorio.uft.edu.br/handle/11612/3789)\n* [Rancang Bangun Sistem Online Judge dan Pendeteksian Plagiarisme Menggunakan Arsitektur Serverless](https://journal.unesa.ac.id/index.php/jieet/article/view/8363)\n* [Real Time Code Collaboration and Interview Platform](https://ijsrset.com/index.php/home/article/view/IJSRSET2513849/IJSRSET2513849)\n* [Repozitorij Fakulteta elektrotehnike i računarstva Sveučilišta u Zagrebu](https://repozitorij.fer.unizg.hr/islandora/search/dabar_search_keywords_mt:(%22Judge0%22))\n* [Requirements for an Online Integrated Development Environment for Automated Programming Assessment Systems](https://www.eduardfrankford.com/pdfs/CSEDU2024.pdf)\n* [Robust and Scalable Online Code Execution System](https://www.researchgate.net/publication/346751837_Robust_and_Scalable_Online_Code_Execution_System)\n* [Scaling Automated Programming Assessment Systems](https://www.researchgate.net/publication/368528043_Scaling_Automated_Programming_Assessment_Systems)\n* [SCRIPT: Implementing an Intelligent Tutoring System for Programming in a German University Context](https://arxiv.org/abs/2604.16117)\n* [Software de retos de programación](https://repositorio.tdea.edu.co/handle/tdea/3593)\n* [Supporting Software Quality with Probabilistic Reasoning and Practical Secure Programming Education](https://vtechworks.lib.vt.edu/items/2ef6ede2-7099-4b3c-a95e-f584bda235e2)\n* [The Development of an Interactive Programming Learning Platform with AI-Driven Feedback and Online Code Execution for the Java Language](https://www.researchgate.net/publication/403899607_The_Development_of_an_Interactive_Programming_Learning_Platform_with_AI-Driven_Feedback_and_Online_Code_Execution_for_the_Java_Language)\n* [Thinking beyond chatbots' threat to education: Visualizations to elucidate the writing and coding process](https://www.mdpi.com/2474186)\n* [Usability and Security of Trusted Platform Module (TPM) Library APIs](https://www.usenix.org/conference/soups2022/presentation/rao)\n* [Voice-Enabled Intelligent IDE in Cloud](https://link.springer.com/chapter/10.1007/978-981-15-3607-6_5)\n* [Web aplikacija za provjeru programskog koda](https://repozitorij.etfos.hr/en/islandora/object/etfos:3574)\n* [Web sustav za automatsku provjeru i vrednovanje programskih rješenja](https://www.unirepository.svkri.uniri.hr/islandora/object/riteh:4684)\n* [Web-aplikacija za obavljanje i dijeljenje programskih odsječaka u različitim programskim jezicima](https://repozitorij.fer.unizg.hr/islandora/object/fer%3A3607)\n* [Web-aplikacija za rješavanje programskih zadataka s elementima društvene mreže](https://repozitorij.fer.unizg.hr/islandora/object/fer%3A9899)\n* [Yet Another Coding Platform (YACP)](https://research.engr.oregonstate.edu/si-lab/archive/2023_rohit.pdf)\n* [Видеомессенджер для совместной работой над кодом](https://elar.urfu.ru/handle/10995/135781)\n* [Платформа для спільної роботи викладача та студента під час іспиту](https://ela.kpi.ua/handle/123456789/31297)\n* [ПОЯСНЮВАЛЬНА ЗАПИСКА ДО БАКАЛАВРСЬКОЇ РОБОТИ на тему ТРЕНАЖЕР З ТЕМИ «ПОБУДОВА БЛОК-СХЕМ АЛГОРИТМІВ ЦИКЛІЧНОЇ СТРУКТУРИ НА ПРИКЛАДІ ЦИКЛУ WHILE» ДИСТАНЦІЙНОГО НАВЧАЛЬНОГО КУРСУ «ПРОГРАМУВАННЯ ІІ» ТА РОЗРОБКА ЙОГО ПРОГРАМНОГО ЗАБЕЗПЕЧЕННЯ](http://dspace.puet.edu.ua/handle/123456789/11371)\n* [Розробка структури та програмна реалізація інтерфейсу WEB-редактора](http://dp.knute.edu.ua/jspui/bitstream/123456789/8142/1/%D0%92%D0%9A%D0%A0_%D0%9A%D0%BE%D0%B2%D1%82%D1%83%D0%BD_%D0%A4%D0%86%D0%A2%20%204-10.pdf)\n\n### Other Online References\n\n* [10 Amazing Free Tools For Your Blog Posts And Developer Projects](https://cbrincoveanu.hashnode.dev/10-amazing-free-tools-for-your-blog-posts-and-developer-projects)\n* [20 Best Productivity Tools for Developers in 2026](https://geekflare.com/dev/productivity-tools-developers/)\n* [21 Productivity Apps for Programmers](https://geekflare.com/productivity-apps-for-programmers/)\n* [3.0! My CF-Mobile, codeforces app for phones has been a completely powerful tool.](https://codeforces.com/blog/B1ossoms)\n* [A pair programming platform to help you get better at technical interviews: building out the platform](https://medium.com/codingsquad/a-pair-programming-platform-to-help-you-get-better-at-technical-interviews-building-out-the-14c03762ebf4)\n* [AI Cheating in Coding Interviews: Rounds' Anti-Cheat Solution](https://judge0.com/blog/ai-cheating-in-coding-interviews-rounds-anti-cheat-solution)\n* [AI Code editor - Judge0 + Chatbot](https://www.youtube.com/watch?v=2EW6mHsxVhA)\n* [AI Code Editor - Judge0 Integration | AI-Powered Coding Experience](https://www.youtube.com/watch?v=INFFmvbVkbQ)\n* [AI Code Editor](https://www.youtube.com/watch?v=E0zB9aBJ-tw)\n* [AI Code Editor](https://www.youtube.com/watch?v=mXIXKoOXcNQ)\n* [AI Craft IDE - The Future of AI-Powered Coding & Debugging! 🔥](https://www.youtube.com/watch?v=ZEqAhNko-HY)\n* [Best E2B Alternatives for AI Code Sandboxes (2026)](https://www.beam.cloud/blog/best-e2b-alternatives)\n* [Best Websites Every Programmer Should Visit](https://dev.to/envoy_/best-websites-every-programmer-should-visit-540a)\n* [Beyond the Browser: Understanding CSS Runners and Online Tools](https://www.oreateai.com/blog/beyond-the-browser-understanding-css-runners-and-online-tools/ad32abb1ae2b230dd77ccecb0aae20fe)\n* [Build a Live Code Editor & Playground like HackerRank Using Vue](https://www.youtube.com/watch?v=AruJ23XlBps)\n* [Build an Online Code Compiler with Next.js 15 (JavaScript, Python, C++, Java, more..) Source Code](https://www.youtube.com/watch?v=oziCi_5aYsk)\n* [Build Your Own Code Editor using React, CodeMirror and Judge0 | Unique React API Project I AccioJob](https://www.youtube.com/watch?v=Tg4_Zyyx-QA)\n* [Build your own LeetCode | Online Code Execution Engiene | Judge0](https://www.youtube.com/watch?v=uOlP7njiaCg)\n* [Build Your Own LeetCode-Style Coding Platform with ⚡ Angular 19 & 🔥 Judge0](https://medium.com/@joshnah/build-your-own-leetcode-style-coding-platform-with-angular-19-judge0-a5b1107b71a4)\n* [Build, Automate and Deploy a LeetCode Clone | MERN](https://www.youtube.com/playlist?list=PL5LqTNtiVovVWED7HpQ0Jj6VEQqgRRJUX)\n* [Building a Leetcode clone backend](https://kibichomurage.medium.com/building-a-leetcode-clone-backend-462fa1084aa5)\n* [Building Beyond the Clone: Scaling Systems and Finding Purpose in the Pivot](https://medium.com/@neeharikagudipudi/building-beyond-the-clone-scaling-systems-and-finding-purpose-in-the-pivot-e8c3733f91aa)\n* [Building CodeNova: System Design Deep Dive into an AI-Enhanced Coding Platform](https://dev.to/bchikara/building-codenova-system-design-deep-dive-into-an-ai-enhanced-coding-platform-11d4)\n* [Building Scalable Code Execution Platforms Using Judge0](https://blog.nife.io/post/building-scalable-code-execution-platforms-using-judge0/)\n* [C Code Runner with Monaco Editor | Judge0 API Integration Fetching Github repo](https://www.youtube.com/watch?v=OIfhZ5gA_L0)\n* [Code Execution in Kestra’s AI Agents Powered by Judge0](https://judge0.com/blog/code-execution-in-kestras-ai-agents-powered-by-judge0)\n* [CodeAIDE Walkthrough | Online AI IDE Project](https://www.youtube.com/watch?v=Z7fe3DVCqWo)\n* [Codeforces Lite Version 1.1.0 is out! Run codes directly in an inbuilt code editor!](https://codeforces.com/blog/entry/136529)\n* [CodeX | IDE + AI | Judge0 | OpenRouter | Tailwind CSS](https://www.youtube.com/watch?v=VLwhqqEm2L8)\n* [Deployment on Google Cloud](https://hackmd.io/@hIUpwGqPS4asgJ4ccgfoMw/SJ3ClK63K)\n* [Designing a Race-ready Backend for our Competitive coding portal with Golang, Echo & Redis : Part one](https://blogs.codechefvit.com/pitlane-to-production-p1)\n* [Designing Online Judge or Leetcode](https://tianpan.co/notes/243-designing-online-judge-or-leetcode)\n* [Devlog #1: Designing a Scalable Coding Interview System](https://www.youtube.com/watch?v=5tq2egyKTEk)\n* [DevTranspiler – Production-Grade AI Code Transpilation Platform](https://www.youtube.com/watch?v=745UXlJigoQ)\n* [Éditeur de code en ligne : le gratuit ou le payant, comment choisir ?](https://www.chrogeek.com/editeur-de-code-en-ligne/)\n* [Excellent Online Code Editors](https://cssauthor.com/best-online-code-editors/)\n* [Excellent Online Code Editors](https://integratedcybersecurity.ai/excellent-online-code-editors/)\n* [Exploiting Symlinks: A Deep Dive into CVE-2024–28185 and CVE-2024–28189 of Judge0 Sandboxes](https://infosecwriteups.com/exploiting-symlinks-a-deep-dive-into-cve-2024-28185-and-cve-2024-28189-of-judge0-sandboxes-36bd471cfc4d)\n* [From AWS Credits to Running Code in the Cloud - What I Learned Deploying Judge0 on EC2](https://peerlist.io/adityadhanraj/articles/aws-judge0-free-credit)\n* [From Zero to Production: Building a Feishu AI Assistant with Clawdbot on AWS EC2](https://www.linkedin.com/pulse/from-zero-production-building-feishu-ai-assistant-clawdbot-zhang-r8oye/)\n* [get an exhaustive list of solutions for sandboxed execution of python (local, remote)](https://github.com/Arize-ai/phoenix/issues/11756)\n* [Go Playground MCP Server: The Ultimate Guide for AI Engineers](https://skywork.ai/skypage/en/go-playground-mcp-server-ai-engineers-guide/1981583589895106560)\n* [How code execution works in OpenLearning platform](https://web.archive.org/web/20260205095342/https://code-execution.openlearning.com/)\n* [How Coding Websites Run Your Code Safely: The Judge0 Story](https://peerlist.io/adityadhanraj/articles/judge0-working)\n* [How I Built a Code Judge That Serves 1M+ Users](https://web.archive.org/web/20260201131823/https://www.linkedin.com/posts/neetcodeio_%F0%9D%97%9B%F0%9D%97%BC%F0%9D%98%84-%F0%9D%97%9C-%F0%9D%97%95%F0%9D%98%82%F0%9D%97%B6%F0%9D%97%B9%F0%9D%98%81-%F0%9D%97%AE-%F0%9D%97%96%F0%9D%97%BC%F0%9D%97%B1%F0%9D%97%B2-%F0%9D%97%9D%F0%9D%98%82%F0%9D%97%B1%F0%9D%97%B4-activity-7323003422079700992-GV3l)\n* [How I fully compromised the “most advanced code execution system in the world”, Daniel Cooper](https://www.youtube.com/watch?v=aW-w0c3v7Mw)\n* [How to Build a Code Editor with React that Compiles and Executes in 40+ Languages](https://thelinuxcode.com/how-to-build-a-code-editor-with-react-that-compiles-and-executes-in-40-languages/)\n* [How to Build a Code Editor with React that Compiles and Executes in 40+ Languages](https://www.freecodecamp.org/news/how-to-build-react-based-code-editor/)\n* [How to Build a LeetCode-Style Platform - The Real System Design Nobody Talks About](https://akashdwivedi.me/blog/system-design-leetcode)\n* [How to build an online compiler! RCE - remote code execution engine](https://www.youtube.com/watch?v=Cm2J9ew8oVw)\n* [How to Build an Online Java Compiler](https://medium.com/javarevisited/how-to-build-an-online-java-compiler-c3210cca1917)\n* [How to Choose the Right Server Based on Your Application](https://polygontechnology.io/how-to-choose-the-right-server-for-your-application)\n* [How to create a code editor for 40+ languages ​​with React](https://prog.world/how-to-create-a-code-editor-for-40-languages-with-react/)\n* [How to deploy judge0 compiler on AWS EC2 | Deploying compiler engine | Judge0 CE](https://www.youtube.com/watch?v=lw1XCvHEO6Y)\n* [How to Install Judge0 on WSL and Linux – Step-by-Step Guide for Developers](https://www.youtube.com/watch?v=mvNgqrx2cfA)\n* [How to Self-Host a Code Execution Sandbox for AI Agents (2026)](https://www.beam.cloud/blog/how-to-self-host-code-sandbox)\n* [How to self-host Judge0 API on your PC locally | All you need to know](https://medium.com/@denishoti/how-to-self-host-judge0-api-on-your-pc-locally-all-you-need-to-know-ad8a2b64fd1)\n* [How Topalupu Works: AI Mock Interviews for FAANG — A Complete Case Study](https://topalupu.com/blog/topalupu-how-it-works-case-study)\n* [How we designed a code evaluation pipeline using Judge0 with Golang, Echo & Redis.](https://blogs.codechefvit.com/pitlane-to-production-p2)\n* [I added video calls inside a real-time coding editor (CodeKaro)](https://dev.to/akhilesh_singhmaurya_1c2/i-added-video-calls-inside-a-real-time-coding-editor-codekaro-5ccc)\n* [I Built a Competitive Coding Platform from Scratch — Here’s How It Works](https://medium.com/@jsubhra502/i-built-a-competitive-coding-platform-from-scratch-heres-how-it-works-390814f334ee)\n* [I built a free Java practice playground with a built-in compiler — here's what I learned (and what's inside)](https://dev.to/priyanshu_rauth/i-built-a-free-java-practice-playground-with-a-built-in-compiler-heres-what-i-learned-and-1be0)\n* [I Built a Real-Time 1v1 Coding Battle Platform in Days Using Kiro](https://dev.to/aieradev/i-built-a-real-time-1v1-coding-battle-platform-in-days-using-kiro-25de)\n* [I Built My Own Automated Coding Judge (Like LeetCode) | Full System Breakdown](https://www.youtube.com/watch?v=wf5U_gcn6Do)\n* [I coded Codeforces.com in under 4 hours](https://www.youtube.com/watch?v=vABb1y4fmwE)\n* [Implementation Documentation: Judge0 in Frontend Projects](https://medium.com/@victor.c.okoye/implementation-documentation-judge0-in-frontend-projects-58a14a68e3fa)\n* [In a Defense of Reinventing the Wheel: Coding to Stay Sane in a Legacy Hell](https://frombadge.medium.com/in-a-defense-of-reinventing-the-wheel-coding-to-stay-sane-in-a-legacy-hell-3c7e0b7e585b)\n* [Installing Judge0 in MacOS(Silicon)](https://karan5772.hashnode.dev/installing-judge0-in-macossilicon)\n* [Interactive Shell Demonstration Video | Get instant terminals and IDE | interactiveshell.com](https://www.youtube.com/watch?v=bCQtK70ovmM)\n* [Introducing AI Agents: Autonomous Orchestration with Declarative Workflows](https://kestra.io/blogs/introducing-ai-agents)\n* [Introducing Feenyx: Technical Skill Assessments that Feel Like Real Work](https://judge0.com/blog/introducing-feenyx-technical-skill-assessments-that-feel-like-real-work)\n* [Judge0 • Online Code Execution System • Synchronous & Asynchronous Code Execution Demo](https://www.youtube.com/watch?v=jCu5pUYMih0)\n* [Judge0 Alternative for AI Agents](https://www.freestyle.sh/blog/product/judge0-alternative-ai-agents)\n* [Judge0 CE on Exit-Saas.io](https://exit-saas.io/alternatives/judge0-ce)\n* [Judge0 Code Execution MCP Server: Your AI Agent's New Superpower](https://skywork.ai/skypage/en/judge0-code-execution-ai-agent/1980518601593573376)\n* [Judge0 Deployment on AWS Elastic Beanstalk Linux 2: A Developer’s Lifesaver](https://medium.com/@techrox/judge0-deployment-on-aws-elastic-beanstalk-linux-2-a-developers-lifesaver-3b7aaf4662b8)\n* [Judge0 Extension Demo - 1st Project || Headstarter.co || Software engineer in residency](https://www.youtube.com/watch?v=6cewVaYKNyA)\n* [Judge0 IDE on Product Hunt](https://www.producthunt.com/products/judge0-ide)\n* [Judge0 on AKS Cluster Setup](https://github.com/MelloB1989/judge0.k8s)\n* [Judge0 on Awesome Docker Compose](https://awesome-docker-compose.com/judge0)\n* [Judge0 on AWS Lightsail - Complete Setup Guide](https://github.com/bharattpawar/judge0vps/blob/main/install.md)\n* [judge0 on Mac M3 macOS Sequoia](https://girishkr.medium.com/judge0-on-mac-m3-macos-sequoia-26946b85d67c)\n* [Judge0 on PeerPush](https://peerpush.net/p/judge0)\n* [Judge0 Python API: Online Compiler Judge Sandbox Executions Languages Metrics 2026](https://www.johal.in/judge0-python-api-online-compiler-judge-sandbox-executions-languages-metrics-2026)\n* [Judge0 Sandbox Escape](https://tantosec.com/blog/judge0/)\n* [Judge0在线代码执行系统：从沙箱安全到多语言支持的深度解析](https://blog.csdn.net/jam55/article/details/153546749)\n* [Judge0安全漏洞全解析：从沙箱逃逸到防护方案（附最新补丁指南）](https://blog.csdn.net/weixin_29233857/article/details/158514257)\n* [Judge0让代码执行变得这么简单 | 开源API系统](https://www.youtube.com/watch?v=qnm0Xh2ZjjM)\n* [Leo: Your 24/7 Mock Coding Interviewer](https://judge0.com/blog/leo-your-24-7-mock-coding-interviewer)\n* [Let’s Deploy our Online Code Executor in Google Cloud](https://dev.to/nilmadhabmondal/let-s-deploy-our-online-code-executor-in-google-cloud-41b0)\n* [Let’s Deploy our Online Code Executor in Google Cloud](https://medium.com/javarevisited/lets-deploy-our-online-code-executor-in-google-cloud-e76a9fabac57)\n* [Let’s Develop an Online Code Editor & Compiler like HackerRank](https://levelup.gitconnected.com/lets-develop-an-online-code-editor-compiler-like-hackerrank-c433d8db060d)\n* [Let’s Develop An Online Code Editor/Compiler Like HackerRank](https://medium.com/javascript-in-plain-english/lets-develop-an-online-code-editor-compiler-like-hackerrank-702881803eee)\n* [LitCode](https://devpost.com/software/litcode)\n* [Make your own online compiler in React](https://medium.com/@akashgp09/make-your-own-online-compiler-in-react-%EF%B8%8F-b06bc29dd202)\n* [Making a Code Execution Platform](https://rustedcompiler.medium.com/making-a-code-execution-platform-a120d912ce5b)\n* [ML Pub Club #25: The Secret Tool of AI Agents](https://luma.com/lwkmqkut)\n* [Monky - AI Coding Assistant](https://devpost.com/software/monky-ai-coding-assistant)\n* [Online IDE | React | Monaco Editor | Judge0 API | Mini Project](https://www.youtube.com/watch?v=w29FWBRJ-EQ)\n* [Online OJ项目](https://blog.csdn.net/2403_88365785/article/details/159351850)\n* [OWASP TOP 10 FOR AI — LLM02: INSECURE OUTPUT HANDLING](https://medium.com/@shivayadav2820/owasp-top-10-for-ai-llm02-insecure-output-handling-aa65a45f16b5)\n* [Programski jezik Go - FER 2019./2020. - Prvo predavanje](https://youtu.be/mq18_oSNkHE?t=966)\n* [Racing Against Time: How We Built a Fair, Server-Synchronized Contest Timer at Scale](https://blogs.codechefvit.com/pitlane-to-production-p3)\n* [Reliable, reproducible code execution for scalable coding assessments](https://judge0.com/blog/reliable-reproducible-code-execution-for-scalable-coding-assessments)\n* [Running sqlite on the browser](https://manfonly.medium.com/running-sqlite-on-the-browser-45c5a7352fd)\n* [Rustbox vs Judge0: Choosing a Cloud Runtime for Untrusted Code](https://rustbox.sh/blog/rustbox-vs-judge0-cloud-runtime-untrusted-code)\n* [Self-Hosting Judge0 from Scratch on Windows 11 (Beginner-Friendly, No Docker Knowledge Required)](https://medium.com/@vanshikakriika/self-hosting-judge0-from-scratch-on-windows-11-beginner-friendly-no-docker-knowledge-required-a8fc93ce0a86)\n* [Self-Hosting Judge0: A Step-by-Step Guide Using Amazon EC2, Lambda, and S3](https://tutorialsdojo.com/self-hosting-judge0-a-step-by-step-guide-using-aws-ec2-lambda-and-s3)\n* [Setting Up Ubuntu and Judge0 on Windows: A Complete Guide for Developers](https://medium.com/@gauravkmaurya09/setting-up-ubuntu-and-judge0-on-windows-a-complete-guide-for-developers-%EF%B8%8F-45f7e3e8bc0b)\n* [Snorkel AI: How Judge0 Transformed Our Code Preference Analysis Pipeline](https://judge0.com/blog/snorkel-ai-how-judge0-transformed-our-code-preference-analysis-pipeline)\n* [SocraticAI: Adding AI capabilities to the Judge0 IDE](https://www.youtube.com/watch?v=98xezoHYNtU)\n* [Stop signing up for 10 different APIs. Here's one key for 38 developer tools.](https://dev.to/robocular/stop-signing-up-for-10-different-apis-heres-one-key-for-38-developer-tools-28el)\n* [Sudjelovanje FER-a na Smotri Sveučilišta 2019.](https://web.archive.org/web/20220527143632/https://www.fer.unizg.hr/novosti?%40=2utqx)\n* [Summer Internship Experience '21](https://blog.ishandeveloper.com/hackerrank)\n* [Svečana 672. sjednica Fakultetskog vijeća FER-a](https://web.archive.org/web/20220527143506/https://www.fer.unizg.hr/novosti?%40=2utg3)\n* [System Design Interview: Design LeetCode (Online Judge) w/ a Ex-Meta Staff Engineer](https://www.youtube.com/watch?v=1xHADtekTNg)\n* [Tech Stack I used to Build neetcode.io](https://www.youtube.com/watch?v=KAYny6V1rB0)\n* [The Easiest Way to Start Coding!](https://medium.com/the-foss-albatross/the-easiest-way-to-start-coding-30cf99ee039d)\n* [The Judge0 Journey: From Shared API Keys to Production-Ready Code Execution](https://medium.com/@adhyakhilosia13/the-judge0-journey-from-shared-api-keys-to-production-ready-code-execution-7f6b7a81baaa)\n* [The ultimate guide to choosing a Compiler API for your workflow](https://www.jdoodle.com/blog/guide_choosing_the_best_compiler_api)\n* [Top 11 Java IDEs and Online Compilers for Productive Development](https://geekflare.com/top-java-ide-and-online-compilers)\n* [Top 33 Best Cloud IDE For The Developers (2022 Review)](https://www.fossguru.com/best-cloud-ide-review/)\n* [Tutorial isi api key di pc platform](https://www.youtube.com/watch?v=z1ErJCATLuo)\n* [Understanding the Unique Complexity of a Toptal Level Platform](https://www.abbacustechnologies.com/timeline-to-build-a-website-like-toptal-in-2026/)\n* [Understanding the Unique Complexity of an edX Level Platform](https://www.abbacustechnologies.com/timeline-to-create-a-website-like-edx-in-2026/)\n* [Unleash the Coder Within: Hosting Your Own LeetCode with Judge0!](https://medium.com/@writetoxyte/unleash-the-coder-within-hosting-your-own-leetcode-with-judge0-31009e09aa56)\n* [USACO Guide - Running Code Online](https://usaco.guide/general/running-code-online)\n* [Virginia Science Olympiad Code Testing Environment Demo](https://www.youtube.com/watch?v=FQ2HTml3WS8)\n* [We Built an Open-Source Coding Exam Platform Because Every Vendor Let Us Down](https://dev.to/mickyarun/we-built-an-open-source-coding-exam-platform-because-every-vendor-let-us-down-a7m)\n* [Weak Control - Measuring the performance gap in Trusted Editing](https://scriptedsynapses.substack.com/p/weak-control)\n* [Web application for authoring and sharing code snippets in different programming languages](https://repozitorij.fer.unizg.hr/en/islandora/object/fer%3A3607)\n* [Why I Stopped Self-Hosting](https://www.youtube.com/watch?v=TkysPcpK0aQ)\n* [Your own Leetcode with Deployment](https://www.youtube.com/watch?v=6nkNUDNhSYI)\n* [多语言代码执行沙盒 judge0 部署](https://blog.csdn.net/qq_20919883/article/details/160027311)\n* [开源在线评测系统（OJ）沙盒解决方案对比分析](https://blog.csdn.net/bhl120/article/details/158467526)\n* [手把手教你用Docker部署Judge0：打造自己的在线代码评测系统](https://blog.csdn.net/ggg99/article/details/153605598)\n* [自社採用サービスに「コーディングテスト機能（オンラインジャッジ）」を実装した話 — Judge0 セルフホスト × Go × CodeMirror 6](https://qiita.com/appsaiyouba/items/e25c23079e23696da09e)\n\n## Showcase\n\nThese open-source projects are using Judge0. You can add yours as well by creating a PR.\n\n* [Official Judge0 IDE by Judge0](https://ide.judge0.com)\n* [Official Judge0 Python SDK by Judge0](https://github.com/judge0/judge0-python)\n* [AtalJudge by Eli Pedro](https://github.com/elipcs/AtalJudge)\n* [Chat completion with AI models (Judge0 as the code execution tool the LLM may use to augment its response) by Kestra](https://kestra.io/plugins/plugin-ai/completion/io.kestra.plugin.ai.completion.chatcompletion)\n* [Code Execution service at OpenLearning platform](https://web.archive.org/web/20260205094401/https://help.openlearning.com/t/x2ypb80/post-custom-with-code-execution)\n* [Code Training with GRPO by Alibaba ModelScope](https://swift.readthedocs.io/en/v3.10/BestPractices/GRPO-Code-Training.html)\n* [Codeforces Lite by Maanas Sehgal](https://github.com/MaanasSehgal/Codeforces-Lite)\n* [CodeWarz by Philkhana Sidharth](https://www.youtube.com/watch?v=mAE7Fdyrkgc)\n* [Competitive Coding Portal by CodeChefVIT](https://github.com/CodeChefVIT/cookoff-9.0-backend)\n* [Deadlock - Competitive Programming Battle Arena by warun7](https://github.com/warun7/deadlock)\n* [Deploy Judge0 CE in one click installation via Hostinger](https://www.hostinger.com/applications/judge0-ce)\n* [Dev Arsenal by Akhmad Khudri](https://devpost.com/software/dev-arsenal)\n* [DraftCode.io by Rotonda](https://dev.to/mulelur/i-built-draftcodeio-a-modern-open-leetcode-style-platform-for-coding-challenges-p9a)\n* [Edura - AI Powered Study & Learning Companion by apurva k](https://devpost.com/software/eduniverse-ai-powered-learning-platform)\n* [Judge0 CE MCP Server by BACH-AI-Tools](https://glama.ai/mcp/servers/@BACH-AI-Tools/judge0_ce)\n* [Judge0 CE MCP Server by bachstudio via Evanth](https://chat.evanth.io/discover/mcp/bachstudio-bach-judge0_ce)\n* [Judge0 CE MCP Server by bachstudio via LobeHub](https://lobehub.com/mcp/bachstudio-bach-judge0_ce)\n* [Judge0 integration with HMP OJ](https://deepwiki.com/subratshakya/HMPOJ/4.2-judge0-integration)\n* [Judge0 MCP Server by javaguru via npmjs](https://www.npmjs.com/package/@javaguru/server-judge0)\n* [Judge0 MCP Server by ZefanHu via PulseMCP](https://www.pulsemcp.com/servers/judge0-code-execution)\n* [Judge0 MCP Server via PulseMCP](https://www.pulsemcp.com/servers/judge0-code-execution/serverjson)\n* [LeetBattles by levelingpotato Ma, Shyam Patel, and Ericeric422](https://devpost.com/software/leetbattles)\n* [LeetCode clone by Kartik Joshi](https://github.com/kdj309/leetcode-clone)\n* [LibreChat Code Interpreter Bridge for Judge0 by leondape](https://github.com/leondape/librechat-code-interpreter-judge0-bridge)\n* [Pomelo by SOSC](https://sosc.org.in/projects/pomelo)\n* [PyGuide.ai by Daevik Jain and Jeremy Siu](https://devpost.com/software/pyguide-ai)\n* [QuizMaster by Sagar Saini](https://dev.to/sagar_saini/quizmaster-learn-create-and-play-41jg)\n* [Robust Design by Joshua](https://robustdesign.io)\n* [Slashcoder by Jatin Sahu](https://devpost.com/software/slashcoder)\n* [Unofficial Judge0 PHP Client by Xefreh](https://github.com/Xefreh/judge0-php-client)\n* [Unofficial Judge0 Python Client by Aaron Walker](https://github.com/vCra/judge0api)\n* [Unofficial Judge0 Python Client by Roslovets](https://github.com/Roslovets-Inc/judge0-client)\n* [Using Judge0 as Code Execution Engine in LangChain4j](https://docs.langchain4j.dev/integrations/code-execution-engines/judge0)\n\n## Community\n\nJoin our community - get help, share feedback, and contribute. Whether you're integrating Judge0, building with the API, or reporting bugs, your participation helps improve the project for everyone.\n\n* [Visit Judge0 website](https://judge0.com)\n* [Read Judge0 blog](https://blog.judge0.com)\n* [Subscribe to Judge0 newsletter](https://newsletter.judge0.com)\n* [Join Judge0 Discord server](https://discord.judge0.com)\n* [Follow Judge0 on X](https://x.com/Judge0HQ)\n* [Follow Judge0 on LinkedIn](https://www.linkedin.com/company/judge0)\n* [Read Judge0 research paper](https://paper.judge0.com)\n* [Watch Judge0 asciicasts](https://asciinema.org/~hermanzdosilovic)\n* [Report an issue](https://github.com/judge0/judge0/issues/new)\n* [Contact Judge0 team via email](mailto:contact@judge0.com)\n* [Schedule a meeting with Judge0 team](https://meet.judge0.com)\n\n## Author and Contributors\n\nJudge0 was created by [Herman Zvonimir Došilović](https://hermanz.dosilovic.com) in August 2016.\n\nThanks to all [contributors](https://github.com/judge0/judge0/graphs/contributors) for contributing to this project.\n\n[![](https://contributors-img.web.app/image?repo=judge0/judge0)](https://github.com/judge0/judge0/graphs/contributors)\n\n## Changelog\n\nYou can find the detailed specification of changes between versions in the [CHANGELOG.md](CHANGELOG.md).\n\n## Special Thanks\n\nSpecial thanks to open-source projects without whom Judge0 wouldn't exist: [Isolate](https://github.com/ioi/isolate), [Docker](https://github.com/docker), and [Ruby on Rails](https://github.com/rails/rails).\n\n## License\n\nJudge0 is licensed under the [GNU General Public License v3.0](LICENSE).\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"1126:386840:188256:5F364A:6AB92F23"},"text_sha256":"f538d38e9962e1a2af4c2a8a201305d29efc568afbb32e32e8098f3b287cf244"},{"path":"PRIVACY_POLICY.md","size":432,"blob_sha":"1d7d69635f02f7cd37575274d7f651b08e917ab8","priority":1,"status":200,"text":"# Privacy Policy\nThis document is for those who consume Judge0 and not for those who deploy Judge0 to their own infrastructure.\n\nIf you deploy Judge0 to your own infrastructure then you should read about [telemetry](TELEMETRY.md).\n\n## Collected Data\nJudge0 does **not** store any personal information.\n\nFor every submission Judge0 stores the data that has been well documented [here](https://api.judge0.com/#submissions-submission).","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13D6:18233:17CCA6:5E7F80:6AB92F23"},"text_sha256":"feffb363cfa1c1e34d018d7d0bf7312b81f08d80f928132368523b8f4957f65d"},{"path":"SECURITY.md","size":476,"blob_sha":"7822e0268192f25d1febf08b7fa293aae54d3990","priority":1,"status":200,"text":"# Security Policy\n\n## Supported Versions\n\n| Version          | Supported          |\n| ---------------- | ------------------ |\n| >= 1.13.0        | :white_check_mark: |\n| >= 1.13.0-extra  | :white_check_mark: |\n| < 1.13.0         | :x:                |\n| < 1.13.0-extra   | :x:                |\n\n## Reporting a Vulnerability\n\nPlease report vulnerability via GitHub or email at security@judge0.com.\n\nYour reports will be reviewed ASAP, and an update will also be released ASAP.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"5010:B08CF:1770C4:5E2524:6AB92F22"},"text_sha256":"17a203abc59ed9c9cb79cb19abb5ebb7acf731c2f2e75d0c39b532cfaaad30f7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":1,"D1_evidence":"sha=e13861e0317bad44c7ac843840d7471e7d64a1b9; file=PRIVACY_POLICY.md; text=If you deploy Judge0 to your own infrastructure then you should read about [telemetry](TELEMETRY.md). ## Collected Data Judge0 does not store any personal information. For every submission Judge0 stores the data that has been well documented [here]( ).","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=e13861e0317bad44c7ac843840d7471e7d64a1b9; file=PRIVACY_POLICY.md; text=If you deploy Judge0 to your own infrastructure then you should read about [telemetry](TELEMETRY.md). ## Collected Data Judge0 does not store any personal information. For every submission Judge0 stores the data that has been well documented [here]( )."}}}}
{"repository":"datopian/portaljs","input_row":{"repository":"datopian/portaljs","url":"https://github.com/datopian/portaljs","name":"portaljs","owner":"datopian","description":"🌀 AI-native framework for building data portals. Scaffold a full portal from a brief and load datasets in minutes with agentic skills — any backend (CKAN, GitHub, Frictionless).","language":"TypeScript","license_spdx_id":"MIT","license_name":"MIT License","license_osi_approved":"true","stars":2354,"issues":786,"created_at":"2011-10-14T21:44:30Z","updated_at":"2026-09-26T05:30:54Z","first_commit_at":"2011-03-09T03:48:57Z","last_commit_at":"2026-09-07T12:11:55Z","activity_months":185.97999999999999,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:44.343Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"datopian/portaljs","visibility":"public","created_at":"2011-10-14T21:44:30Z","updated_at":"2026-09-26T05:30:54Z","private":false,"fork":false,"archived":false,"stargazers_count":2354,"open_issues_count":74,"license_spdx_id":"MIT","license_name":"MIT License"},"error":"","rate":{"github_remaining":"1243","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F2:7418C:18423BE:1C6E025:6AB92F24"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1242","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07F6:6E4BB:182AC0B:1C56218:6AB92F24"},"commit":{"sha":"fa5ff306740fffc17cd3c83d8c4121782ba66567","url":"https://github.com/datopian/portaljs/commit/fa5ff306740fffc17cd3c83d8c4121782ba66567","date":"2017-09-08T05:45:53Z","author_date":"2017-09-08T05:45:53Z","committer_date":"2017-09-08T05:45:53Z","tree_sha":"3d183fb0abf69c06e7bbf129c461c87f0fcc037a","message_first_line":"[demos][xs]: fix link to Data Explorer - http://explorer.okfnlabs.org/."},"tree_request_status":200,"tree_rate":{"github_remaining":"1241","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07EF:724D2:17FB204:1C26F22:6AB92F25"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":5969,"blob_sha":"14551b79948ff6381414316d30d3eac702f095c0","priority":0}],"documents":[{"path":"README.md","size":5969,"blob_sha":"14551b79948ff6381414316d30d3eac702f095c0","priority":0,"status":200,"text":"[![Build Status](https://travis-ci.org/okfn/recline.png)](https://travis-ci.org/okfn/recline)\n\nA simple but powerful library for building data applications in pure Javascript and HTML.\n\n<h3><a href=\"http://okfnlabs.org/recline/\">Recline Website - including Overview, Documentation, Demos etc<\/a><\/h3>\n\n## Features\n\n* Open-source (and heavy reuser of existing open-source libraries)\n* Pure javascript (no Flash) and designed for integration -- so it is easy to\n  embed in other sites and applications\n* View and edit your data in clean grid interface\n* Bulk update/clean your data using an easy scripting UI\n* Visualize your data\n* And more ... see <http://okfnlabs.org/recline/>\n\n## Contributing\n\nSee CONTRIBUTING.md.\n\n### Contributors\n\n* [Rufus Pollock](http://rufuspollock.org/)\n* [Max Ogden](http://maxogden.com/)\n* [John Glover](https://github.com/johnglover)\n* [James Casbon](http://casbon.me/)\n* [Adrià Mercader](http://amercader.net/)\n* [Dominik Moritz](https://github.com/domoritz)\n* [Friedrich Lindenberg](http://pudo.org/)\n* [Alioune Dia](https://github.com/aliounedia)\n* [kielni](https://github.com/kielni)\n* And [many more](https://github.com/okfn/recline/graphs/contributors)\n\n## Changelog\n\n\n### v0.7 - Summer 2014 (tbc)\n\n[v0.7 milestone](https://github.com/okfn/recline/issues?milestone=7)\n\nPossible breaking changes\n\n* Support for row/add/delete/Reorder for recline slickGrid check `_includes/recline-deps.html` for slcikGrid plugins required #396\n* Upgraded timelinejs lib - #316\n* Removed csv backend (as now in separate repo) #444\n\n### v0.6 - Summer 2013\n\n[v0.6 milestone](https://github.com/okfn/recline/issues?milestone=5) (more than 40 issues)\n\nPossible breaking changes\n\n* Many backends moved to their own repositories #314\n* Upgarde to Backbone v1.0 #351\n* Updated Leaflet to latest version 0.4.4 #220\n* Added marker clustering in map view to handle a large number of markers (and allowed it to disabled)\n* Dataset.restore method removed (not used internally except from Multiview.restore)\n* Views no longer call render in initialize but must be called client code\n* Backend.Memory.Store attribute for holding 'records' renamed to `records` from `data`\n* Option to use underscore.deferred vendor library and not use jQuery (jQuery no longer required if just using recline.dataset.js)\n* View.el is now the raw DOM element. If you want a jQuery-wrapped version, use view.$el. #350\n* Pager widget now takes Dataset object rather than QueryState object #386\n\n### v0.5 - July 5th 2012 (first public release)\n\n[40 closed issues](https://github.com/okfn/recline/issues?milestone=2&page=1&state=closed)\n\nLots of breaking changes to the API from v0.4 (should be very few going forwards) including:\n\n* State only stores backend (name) and dataset url (in url field) rather than entire dataset object\n* Backends heavily reorganized\n* Rename Document -> Record\n* Rename DataExplorer view to MultiView\n* ...\n\n### v0.4 - April 26th 2012\n\n[23 closed issues](https://github.com/okfn/recline/issues?milestone=2&page=1&state=closed) including:\n\n* Map view using Leaflet - #69, #64, #89, #97\n* Term filter support - #66\n* Faceting support- #62\n* Tidy up CSS and JS - #81 and #78\n* Manage and serialize view and dataset state (plus support for embed and permalinks) - #88, #67\n* Graph view improvements e.g. handle date types correctly - #75\n* Write support for ES backend - #61\n* Remove JQuery-UI dependency in favour of bootstrap modal - #46\n* Improved CSV import support - #92\n\n### v0.3 - March 31st 2012\n\n[16 closed issues](https://github.com/okfn/recline/issues?milestone=1&state=closed) including:\n\n* ElasticSearch (and hence DataHub/CKAN) backend - #54\n* Loading of local CSV files - #36\n* Fully worked out Data Query support - #34, #49, #53, #57\n* New Field model object for richer field information - #25\n* Upgrade to Bootstrap v2.0 - #55\n* Recline Data Explorer app improvements e.g. #39 (import menu)\n* Graph improvements - #58 (more graph types, graph interaction)\n\n### v0.2 - Feb 24th 2012\n\n[17 closed issues](https://github.com/okfn/recline/issues?milestone=3&state=closed) including:\n\n* Major refactor of backend and model relationship - #35 and #43\n* Support Google Docs Spreadsheets as a Backend - #15\n* Support for online CSV and Excel files via DataProxy backend - #31\n* Data Explorer is customizable re loaded views - #42\n* Start of documentation - #33\n* Views in separate files - #41\n* Better error reporting from backends on JSONP errors - #30\n* Sorting and show/hide of columns in data grid - #23, #29\n* Support for pagination - #27\n* Split backends into separate files to make them easier to maintain and reuse separately #50\n\n### v0.1 - Jan 28th 2012\n\n* Core models and structure including Dataset and Document\n* Memory and webstore backends\n* Grid, Graph and Data Explorer views\n* Bootstrap-based theme - #22\n\n## Copyright and License\n\nCopyright 2011 Max Ogden and Rufus Pollock.\n\nLicensed under the MIT license:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BB9C:3AC15:1828EA:5EDBCF:6AB92F25"},"text_sha256":"855442726c10b08636e08dfa7cc477f6311551ee7459a6d08cfb27aa5ffa77ee"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1240","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0921:0AC4:12C14E7:161D0FF:6AB92F25"},"commit":{"sha":"b61b1f6945d3cb70815633aa67ae000dc91ee49d","url":"https://github.com/datopian/portaljs/commit/b61b1f6945d3cb70815633aa67ae000dc91ee49d","date":"2026-06-30T21:16:18Z","author_date":"2026-06-30T21:16:18Z","committer_date":"2026-06-30T21:16:18Z","tree_sha":"48ad232c2f9ee4ce5aa70535e756f7765d9760f2","message_first_line":"feat: add 6 new FAQ questions from issue #1502"},"tree_request_status":200,"tree_rate":{"github_remaining":"1239","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08CB:70FF5:1801BA1:1C2D564:6AB92F26"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12489,"blob_sha":"00576d1824a12dedda964b0192ab981b7e2293f9","priority":0},{"path":"SECURITY.md","size":105,"blob_sha":"b4bc1380fefa7b1afc83782931f591aa438bb607","priority":1}],"documents":[{"path":"README.md","size":12489,"blob_sha":"00576d1824a12dedda964b0192ab981b7e2293f9","priority":0,"status":200,"text":"<p align=\"center\">\n  <img src=\"assets/portaljs-logo.svg\" alt=\"PortalJS\" width=\"96\" height=\"96\" />\n  <h1 align=\"center\">PortalJS<\/h1>\n  <p align=\"center\">\n    <b>The AI-native framework for building data portals.<\/b>\n    <br />\n    Describe the portal you want — your agent helps you choose an architecture, scaffolds it, and loads your data.\n    <br />\n    <br />\n    <a href=\"https://www.portaljs.com/opensource\">Docs<\/a>\n    ·\n    <a href=\"https://github.com/datopian/portaljs/discussions\">Discussions<\/a>\n    ·\n    <a href=\"https://github.com/datopian/portaljs/issues/new\">Report a bug<\/a>\n    <br />\n    <br />\n    <a href=\"https://discord.gg/krmj5HM6He\"><img src=\"https://dcbadge.limes.pink/api/server/krmj5HM6He\" alt=\"Join our Discord server\"/><\/a>\n    <img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT License\"/>\n  <\/p>\n<\/p>\n\n---\n\n## Quickstart\n\n**Create a portal** — one command, nothing to install beyond Node 18+:\n\n```bash\nnpm create portaljs@latest my-portal\ncd my-portal\nnpm run dev      # → http://localhost:3000\n```\n\nYou get the three surfaces — Home, a Catalog (`/search`), and a dataset Showcase\n(`/@<namespace>/<slug>`) — over sample data. Plain, editable Next.js, no lock-in. Add your\nown CSV/JSON to `datasets.json` and it renders automatically.\n\n**Build it with your AI assistant** — PortalJS ships [Claude Code](https://claude.com/claude-code)\nskills that do the assembly. Install them once (into `~/.claude/commands`):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/datopian/portaljs/main/scripts/install-portaljs-skills.sh | bash\n```\n\nThen, in a Claude Code session from any directory:\n\n```text\n/portaljs-architect    not sure what stack you need? start here\n/portaljs-new-portal   \"Auckland Council open data portal\"\n/portaljs-add-dataset  ./data/air-quality.csv\n```\n\n`/portaljs-new-portal` scaffolds the three surfaces; `/portaljs-add-dataset` (or `/portaljs-add-resource`) loads data;\n`/portaljs-connect-ckan` points it at a CKAN backend; `/portaljs-deploy` ships it. ([All skills + install →](.claude/INSTALL.md))\n\n**Prefer the bare template** — plain Next.js, no AI, no lock-in:\n\n```bash\nnpx tiged datopian/portaljs/examples/portaljs-catalog my-portal\ncd my-portal && npm install && npm run dev      # → http://localhost:3000\n```\n\nYou get Home, a Catalog (`/search`), and a dataset Showcase (`/@<namespace>/<slug>`) over\nsample data. Add your own CSV/JSON to `datasets.json` and it renders automatically.\n\n⭐ If it's useful, a star helps others find it.\n\n## Why PortalJS\n\nBuilding a data portal has always meant more than a website. You have to decide where\nthe data lives, how it's versioned, how people search it, how it's served, and how it's\ngoverned — and then wire a frontend on top. Teams either over-build on a heavy data\nwarehouse they don't need, or under-build on a pile of scripts that doesn't scale.\n\nPortalJS is an **open-source, agentic skills framework that helps data teams build,\ndevelop, and ship data portals — and the data infrastructure underneath them.** It isn't\nonly a frontend. The skills do two jobs:\n\n- **Advise** — given _what you're building_, _what your data is_, and _what it's for_,\n  they recommend an architecture: storage, compute, catalog, access, hosting, metadata.\n- **Build** — they scaffold that stack as plain, editable Next.js code with no lock-in.\n\nIt is **opinionated but open**: the recommended modern path is git + object storage\n(Cloudflare R2) + Parquet + [DuckLake](https://ducklake.select/) + DuckDB — an open\nlakehouse instead of a classic warehouse — but a traditional datastore (CKAN, a\nwarehouse) stays a first-class option when you need it. You always own plain code.\n\nBuilt and maintained in the open by [Datopian](https://www.datopian.com/) and the\nPortalJS community.\n\n## Architecture at a glance\n\n```text\n        🧑  you describe what you want to build\n        │\n        ▼\n╭─ 🤖  AGENTIC SKILLS ──────────────────────────────────  decide + build\n│   /portaljs-architect · /portaljs-new-portal · /portaljs-add-dataset · /portaljs-add-chart · /portaljs-add-map …\n╰─  generates plain, editable Next.js code — no lock-in\n        │\n        ▼\n╭─ 🖥️  SURFACES ────────────────────────────────────────  what users see\n│   🏠 Home /      🔎 Catalog /search      📊 Showcase /@ns/slug\n╰─  read data through one DataProvider contract\n        │\n        ▼\n╭─ 🔌  PROVIDERS ───────────────────────────────────────  pluggable backends\n│   📁 static·git     🐘 CKAN     🔭 OpenMetadata     🗂️ git-LFS + R2\n╰─  swap the source without touching a page\n        │\n        ▼\n📦  STORAGE + COMPUTE  —  choose your point on the spectrum:\n\n      flat files  ─▶  Git-LFS + R2  ─▶  Parquet + DuckLake + 🦆 DuckDB  ─▶  warehouse / CKAN\n      simplest                          ⭐ open lakehouse (default)            heaviest\n\n☁️  Substrate  —  Cloudflare R2 (storage) · Workers (runtime) · D1 (catalog) · Pages (static)\n     object storage stays S3-compatible — R2 is the default, never a lock-in\n```\n\n**Three surfaces.** Every data portal is built from three: a **Home** page that explains\nit and offers search, a **Catalog** (`/search`) to discover datasets, and a **Showcase**\n(`/@<namespace>/<slug>`) to explore one dataset — metadata, preview, download/API, and\ncharts/maps. ([Core concepts →](https://www.portaljs.com/docs/core-concepts))\n\n**One seam.** The surfaces read data only through a `DataProvider`, so the source — static\nfiles today, a CKAN or lakehouse backend tomorrow — can change without touching a page.\n\nSee [`ROADMAP.md`](ROADMAP.md) for the full model and the\n[architecture decision framework](https://www.portaljs.com/docs/architecture/decision-framework)\nfor how `/portaljs-architect` turns your needs into a stack.\n\n## Build a portal with your AI assistant\n\nPortalJS ships [Claude Code](https://claude.com/claude-code) skills that turn a brief into\na working portal.\n\n### Setup\n\nInstall the skills once into your personal scope so they're available from **any**\ndirectory:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/datopian/portaljs/main/scripts/install-portaljs-skills.sh | bash\n```\n\nRestart Claude Code (or open a new session) and type `/` to see them. See\n[`.claude/INSTALL.md`](.claude/INSTALL.md) for other install options (versioned plugin, or\nrunning straight from a clone of this repo).\n\n### Use\n\nIf you're not sure how to set up your portal, start with the advisor, then build:\n\n```text\n/portaljs-architect    we have ~200 public CSVs, updated quarterly, and must publish DCAT-AP\n/portaljs-new-portal   \"Auckland Council open data portal\"\n/portaljs-add-dataset  ./data/air-quality.csv\n/portaljs-add-dataset  https://example.com/parks.geojson\n```\n\nThe skills are **interactive** — if your brief is thin, they interview you in short rounds\nrather than erroring. `/portaljs-architect` recommends a stack and hands off; `/portaljs-new-portal`\nscaffolds the three surfaces; `/portaljs-add-dataset` appends to the `datasets.json` manifest and\nthe showcase renders automatically at `/@<namespace>/<slug>`. Run `npm run dev` and you\nhave a portal.\n\n**Prefer to build by hand?** The skills are a convenience, not a requirement — scaffold the\ntemplate directly with the CLI:\n\n```bash\nnpm create portaljs@latest my-portal\n```\n\n(Or grab the bare template with no prompts: `npx tiged datopian/portaljs/examples/portaljs-catalog my-portal`.)\n\n### Available skills\n\n| Skill | What it does |\n|-------|--------------|\n| [`/portaljs-architect`](.claude/commands/portaljs-architect.md) | Recommend an architecture (storage/compute/catalog/access/hosting/metadata) from your needs, then hand off — the advisory entry point |\n| [`/portaljs-new-portal`](.claude/commands/portaljs-new-portal.md) | Scaffold a new portal (Home + Catalog + Showcase) from a brief |\n| [`/portaljs-add-dataset`](.claude/commands/portaljs-add-dataset.md) | Add a CSV, TSV, JSON, or GeoJSON dataset — appends to the manifest; its showcase renders automatically |\n| [`/portaljs-add-chart`](.claude/commands/portaljs-add-chart.md) | Add a chart to a dataset's showcase Views section |\n| [`/portaljs-add-map`](.claude/commands/portaljs-add-map.md) | Render GeoJSON on an interactive map in the showcase |\n| [`/portaljs-connect-ckan`](.claude/commands/portaljs-connect-ckan.md) | Feed the catalog and showcases from a CKAN backend |\n| [`/portaljs-deploy`](.claude/commands/portaljs-deploy.md) | Deploy to Cloudflare Pages, Vercel, or static hosting |\n| [`/portaljs-check-data-quality`](.claude/commands/portaljs-check-data-quality.md) | Audit a dataset for quality issues (schema, nulls, types) |\n\nMore skill families — metadata schemas (Frictionless/DCAT), more backends (OpenMetadata,\ngit-LFS+R2), a DuckDB data layer, and access control — are on the [roadmap](ROADMAP.md).\nWrite your own — see [`.claude/AUTHORING.md`](.claude/AUTHORING.md).\n\n## What's in this repo\n\n```text\n.claude/commands/    the agentic skills (slash commands)\nexamples/            reference portals — portaljs-catalog is the canonical template\npackages/\n  core/              layout/UI components            (@portaljs/core)\n  ckan/              CKAN catalog UI + React          (@portaljs/ckan)\n  ckan-api-client-js/ pure CKAN API client            (@portaljs/ckan-api-client-js)\nsite/                portaljs.com — the marketing site + docs\nROADMAP.md           direction, the four contracts, sequencing\n```\n\nThe canonical template, [`examples/portaljs-catalog`](examples/portaljs-catalog/), is where\nthe three surfaces and the `DataProvider` seam live — read it before building.\n\n## What makes it different\n\n- 🌱 **Open source, MIT, no lock-in** — every skill emits plain Next.js you can fork and own.\n- 🧭 **Advisory, not just generative** — `/portaljs-architect` helps you _decide_ the infrastructure, not only scaffold a UI.\n- 🦆 **Open lakehouse by default** — git + R2 + Parquet + DuckLake + DuckDB over a heavy warehouse, with DuckDB as the query engine. A datastore/warehouse stays a supported choice.\n- ☁️ **Cloudflare-first, portable** — R2 / Workers / D1 / Pages as the default substrate, but object storage stays S3-compatible.\n- 🧩 **Decoupled, any backend** — one `DataProvider` contract in front of [CKAN](https://ckan.org/), [DKAN](https://getdkan.org/), [OpenMetadata](https://open-metadata.org/), [DataHub](https://datahubproject.io/), GitHub, [Frictionless](https://frictionlessdata.io/), plain files — or your own.\n- 🎨 **Bring your own stack** — adopt the template or lift the skills and the three-surface model into an app you already have.\n\n## Examples\n\nReference implementations live in [`examples/`](examples/):\n\n| Example | Backend |\n|---------|---------|\n| [`portaljs-catalog`](examples/portaljs-catalog/) | **Canonical template** — Home + Catalog + Showcase over a static manifest |\n| [`portaljs-template`](examples/portaljs-template/) | Minimal single-page starter |\n| [`ckan`](examples/ckan/) · [`ckan-ssg`](examples/ckan-ssg/) | CKAN |\n| [`github-backed-catalog`](examples/github-backed-catalog/) | GitHub |\n| [`dataset-frictionless`](examples/dataset-frictionless/) | Frictionless Data Package |\n| [`fivethirtyeight`](examples/fivethirtyeight/) · [`openspending`](examples/openspending/) · [`turing`](examples/turing/) | Real-world portals |\n\n## Community & support\n\n- 💬 **Discord** — live chat and help: [join the server](https://discord.gg/krmj5HM6He)\n- 🗣️ **Discussions** — questions, ideas, show-and-tell: [github.com/datopian/portaljs/discussions](https://github.com/datopian/portaljs/discussions)\n- 🐛 **Issues** — bugs and feature requests: [open an issue](https://github.com/datopian/portaljs/issues/new)\n- 📖 **Docs** — [portaljs.com/opensource](https://www.portaljs.com/opensource)\n\n## Contributing\n\nPortalJS is built in the open and we welcome contributions of all sizes — new skills,\nexamples, docs, and fixes. See [CONTRIBUTING.md](CONTRIBUTING.md) to get started, and read\n[ROADMAP.md](ROADMAP.md) and [VISION.md](VISION.md) for where the project is headed.\n\n## License\n\n[MIT](license) © [Datopian](https://www.datopian.com/)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"890A:324E19:182B5C:5EDFB7:6AB92F27"},"text_sha256":"ba19a616694e99fc16b4e5df1ccc16a0777a7d795696230e43793805aca49baf"},{"path":"SECURITY.md","size":105,"blob_sha":"b4bc1380fefa7b1afc83782931f591aa438bb607","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report security issues to `security@datopian.com`","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"BD2A:1F1FB6:17FD6E:5EB129:6AB92F27"},"text_sha256":"2bf4566921a91c49e451642d961a454163e802ad012618c8fc745c4f08ef0dba"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"OpenVidu/openvidu","input_row":{"repository":"OpenVidu/openvidu","url":"https://github.com/OpenVidu/openvidu","name":"openvidu","owner":"OpenVidu","description":"OpenVidu Platform: self-hosted real-time video and audio for your apps, built on LiveKit and mediasoup","language":"TypeScript","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2131,"issues":657,"created_at":"2016-10-10T13:31:27Z","updated_at":"2026-09-25T16:38:57Z","first_commit_at":"2016-10-10T13:31:27Z","last_commit_at":"2026-09-25T16:38:47Z","activity_months":119.48999999999999,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:48.160Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"OpenVidu/openvidu","visibility":"public","created_at":"2016-10-10T13:31:27Z","updated_at":"2026-09-25T16:38:57Z","private":false,"fork":false,"archived":false,"stargazers_count":2131,"open_issues_count":104,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1238","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0840:6C9BF:182EE3E:1C5ACE3:6AB92F28"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1237","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07FD:78367:183D00A:1C68A0C:6AB92F28"},"commit":{"sha":"1beed6c0a4b4919344ee8517e11149d1987bf162","url":"https://github.com/OpenVidu/openvidu/commit/1beed6c0a4b4919344ee8517e11149d1987bf162","date":"2018-05-23T13:26:55Z","author_date":"2018-05-23T13:26:55Z","committer_date":"2018-05-23T13:26:55Z","tree_sha":"2a8fab00057293e9d3df452a5f5358733c441e2c","message_first_line":"openvidu-testapp: VideoElementEvents input parameter typed"},"tree_request_status":200,"tree_rate":{"github_remaining":"1236","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0804:724D2:17FB49E:1C27241:6AB92F28"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":670,"blob_sha":"d79db3673bfa3e60f66a7c7839a6d2e3bd212169","priority":0}],"documents":[{"path":"README.md","size":670,"blob_sha":"d79db3673bfa3e60f66a7c7839a6d2e3bd212169","priority":0,"status":200,"text":"[![License badge](https://img.shields.io/badge/license-Apache2-orange.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Documentation badge](https://readthedocs.org/projects/fiware-orion/badge/?version=latest)](https://openvidu.io/docs/home/)\n[![Docker badge](https://img.shields.io/docker/pulls/fiware/orion.svg)](https://hub.docker.com/r/openvidu/)\n[![Support badge](https://img.shields.io/badge/support-sof-yellowgreen.svg)](https://groups.google.com/forum/#!forum/openvidu)\n\n[![][OpenViduLogo]](https://openvidu.io)\n\nopenvidu\n===\n\nVisit [openvidu.io](https://openvidu.io)\n\n[OpenViduLogo]: https://secure.gravatar.com/avatar/5daba1d43042f2e4e85849733c8e5702?s=120\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"16C6:2C474:18300A:5EE477:6AB92F29"},"text_sha256":"54e241e25e8a96c5987f73f011e0ed22c29983af9d206fb0c19c621ac0720a91"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1235","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"085C:35D5A8:17FEAD1:1C2A961:6AB92F29"},"commit":{"sha":"6aadaf6a731ab8b4c863b3ca8da4b1baf3cfca8f","url":"https://github.com/OpenVidu/openvidu/commit/6aadaf6a731ab8b4c863b3ca8da4b1baf3cfca8f","date":"2026-06-25T10:03:56Z","author_date":"2026-06-25T10:03:56Z","committer_date":"2026-06-25T10:03:56Z","tree_sha":"0767fb8efb3aaa922655e2c8d476b4457d8cb854","message_first_line":"openvidu-testapp: allow disabling interim transcription events"},"tree_request_status":200,"tree_rate":{"github_remaining":"1234","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"079D:35C5DA:17D28D3:1BFDACE:6AB92F2A"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":4097,"blob_sha":"ded7e9c1818b487626569cab507ee2c389245951","priority":0}],"documents":[{"path":"README.md","size":4097,"blob_sha":"ded7e9c1818b487626569cab507ee2c389245951","priority":0,"status":200,"text":"[![Backers on Open Collective](https://opencollective.com/openvidu/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/openvidu/sponsors/badge.svg)](#sponsors)\n[![License badge](https://img.shields.io/badge/license-Apache2-orange.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![OpenVidu Tests](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-ce-test.yml/badge.svg)](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-ce-test.yml)\n[![Npm version](https://img.shields.io/npm/v/openvidu-browser?label=npm-version)](https://npmjs.org/package/openvidu-browser)\n[![Npm downloads](https://img.shields.io/npm/dw/openvidu-browser?label=npm2-downloads)](https://npmjs.org/package/openvidu-browser)\n\n\n[![Documentation Status](https://readthedocs.org/projects/openvidu/badge/?version=stable)](https://docs.openvidu.io/en/stable/?badge=stable)\n[![Docker badge](https://img.shields.io/docker/pulls/openvidu/openvidu-server-kms.svg)](https://hub.docker.com/r/openvidu/openvidu-server-kms)\n[![Support badge](https://img.shields.io/badge/support-sof-yellowgreen.svg)](https://openvidu.discourse.group/)\n[![Twitter Follow](https://img.shields.io/twitter/follow/openvidu.svg?style=social)](https://twitter.com/openvidu)\n\n[![][OpenViduLogo]](https://openvidu.io)\n\nopenvidu\n===\n\nVisit [openvidu.io](https://openvidu.io)\n\n## Community Forum\n\nVisit [OpenVidu Community Forum](https://openvidu.discourse.group/)\n\n[OpenViduLogo]: https://secure.gravatar.com/avatar/5daba1d43042f2e4e85849733c8e5702?s=120\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. \n<a href=\"https://github.com/OpenVidu/openvidu/contributors\"><img src=\"https://opencollective.com/openvidu/contributors.svg?width=890&button=false\" /><\/a>\n\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/openvidu#backer)]\n\n<a href=\"https://opencollective.com/openvidu#backers\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/backers.svg?width=890\"><\/a>\n\n## Acknowledgments\n\nOpenVidu has been supported under project \"CPP2021-008720 NewGenVidu: An elastic, user-friendly and privacy-friendly videoconferencing platform\", funded by MCIN/AEI/10.13039/501100011033 and by the European Union-NextGenerationEU/PRTR.\n\n<img height=\"75px\" src=\"https://docs.openvidu.io/en/stable/img/logos/support.jpg\">\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/openvidu#sponsor)]\n\n<a href=\"https://opencollective.com/openvidu/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/0/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/1/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/2/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/3/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/4/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/5/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/6/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/7/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/8/avatar.svg\"><\/a>\n<a href=\"https://opencollective.com/openvidu/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/openvidu/sponsor/9/avatar.svg\"><\/a>\n\n\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"DDD8:3E1C8:181585:5EC917:6AB92F2A"},"text_sha256":"b017d5bb23b6095d6899ef3fb68fa976d23d39f70c0f2ff267eaff7e57f05959"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Menções isoladas a privacy/GDPR sem contexto semântico suficiente foram classificadas como 0.","evidence":[]}}}
{"repository":"apioo/fusio","input_row":{"repository":"apioo/fusio","url":"https://github.com/apioo/fusio","name":"fusio","owner":"apioo","description":"Self-Hosted API Management for Builders","language":"PHP","license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0","license_osi_approved":"true","stars":2117,"issues":632,"created_at":"2015-07-29T16:34:52Z","updated_at":"2026-09-24T21:32:31Z","first_commit_at":"2013-11-24T13:45:25Z","last_commit_at":"2026-09-24T21:31:18Z","activity_months":153.99000000000001,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:50.880Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"apioo/fusio","visibility":"public","created_at":"2015-07-29T16:34:52Z","updated_at":"2026-09-24T21:32:31Z","private":false,"fork":false,"archived":false,"stargazers_count":2117,"open_issues_count":169,"license_spdx_id":"Apache-2.0","license_name":"Apache License 2.0"},"error":"","rate":{"github_remaining":"1233","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0904:754BF:17FB85D:1C276A2:6AB92F2A"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1232","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"08E3:6E4BB:182AFEC:1C56696:6AB92F2B"},"commit":{"sha":"7b8cf30d86acc72d26aa2199da159429a59ca09d","url":"https://github.com/apioo/fusio/commit/7b8cf30d86acc72d26aa2199da159429a59ca09d","date":"2018-05-16T09:54:21Z","author_date":"2018-05-16T09:54:21Z","committer_date":"2018-05-16T09:54:21Z","tree_sha":"fa4921b1c5b3f95902943c731fbca02a8af73741","message_first_line":"use https"},"tree_request_status":200,"tree_rate":{"github_remaining":"1231","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A2:7580A:182C847:1C58702:6AB92F2B"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":12934,"blob_sha":"516372a3046de4af13b16aa4691e905b9cbe7e6d","priority":0}],"documents":[{"path":"README.md","size":12934,"blob_sha":"516372a3046de4af13b16aa4691e905b9cbe7e6d","priority":0,"status":200,"text":"\n<p align=\"center\">\n    <a href=\"https://www.fusio-project.org/\" target=\"_blank\"><img src=\"https://www.fusio-project.org/img/fusio_64px.png\"><\/a>\n<\/p>\n\n# About\n\nFusio is an open source API management platform which helps to build and manage \nRESTful APIs. We think that there is a huge potential in the API economy. \nWhether you need an API to expose your business functionality, build micro \nservices, develop SPAs or Mobile-Apps. Because of this we think that Fusio is a \ngreat tool to simplify building such APIs. More information on \nhttps://www.fusio-project.org/\n\n# Why\n\nThe originally idea of Fusio was to provide a tool which lets you easily build a\ngreat API beside an existing application. I.e. in case you have already a web\napplication on a domain `acme.com` Fusio helps you to build the fitting API\nat `api.acme.com`. Beside this use case you can also use Fusio to build a new \nAPI from scratch or use it internally i.e. for micro services.\n\nTo build the API Fusio can connect to many different databases, message queue\nsystems or internal web services. There are also many ways to integrate your\n[business logic](http://fusio.readthedocs.io/en/latest/development/business_logic.html)\ninto the API of Fusio.\n\n# Features\n\nFusio covers all important aspects of the API lifecycle so you can concentrate\non building the actual business logic of your API.\n\n* __Versioning__  \n  It is possible to define different versions of your endpoint. A concrete \n  version can be requested through the `Accept` header i.e. `application/vnd.acme.v1+json`\n* __Documentation__  \n  Fusio generates automatically a documentation of the API endpoints based on \n  the provided schema definitions.\n* __Validation__  \n  Fusio uses the standard JSONSchema to validate incoming request data\n* __Authorization__  \n  Fusio uses OAuth2 for API authorization. Each app can be limited to scopes to \n  request only specific endpoints of the API.\n* __Analytics__  \n  Fusio monitors all API activities and shows them on a dashboard so you always \n  know what is happening with your API. \n* __Rate limiting__  \n  It is possible to limit the requests to a specific threshold.\n* __Specification__  \n  Fusio generates different specification formats for the defined API endpoints\n  i.e. OpenAPI, Swagger, RAML.\n* __User management__  \n  Fusio provides an API where new users can login or register a new account \n  through GitHub, Google, Facebook or through normal email registration.\n* __Logging__  \n  All errors which occur in your endpoint are logged and are visible at the \n  backend including all information from the request.\n* __Connection__  \n  Fusio provides an [adapter](https://www.fusio-project.org/adapter) system to\n  connect to external services. By default we provide the HTTP and SQL \n  connection type but there are many other types available i.e. MongoDB, Amqp, \n  Cassandra.\n* __Migration__  \n  Fusio has a migration system which allows you to change the database schema\n  on deployment.\n* __Testing__  \n  Fusio provides an api test case wherewith you can test every endpoint \n  response without setting up a local web server.\n\nBasically with Fusio you only have to define the schema (request/response) of \nyour API endpoints and implement the business logic. All other aspects are \ncovered by Fusio.\n\n# Architecture\n\nTo give you a first overview, every request which arrives at Fusio goes through\nthe following lifecycle:\n\n![Request_Flow](https://github.com/apioo/fusio/blob/master/doc/_static/request_flow.png)\n\nFusio tries to assign the incoming request to a fitting route. The route \ncontains all schema information about the incoming request and outgoing \nresponses. Those schemas are also used at the documentation which is \nautomatically available. If a request schema was provided the incoming request \nbody gets validated after this schema. In case everything is ok the action \nwhich is assigned to the route gets executed.\n\nAn action represents the code which handles an incoming request and produces a \nresponse. Each action can use connections to accomplish this task. A connection \nuses a library which helps to work with a remote service. I.e. the SQL \nconnection uses the Doctrine DBAL library to work with a database (it returns\na `Doctrine\\DBAL\\Connection` instance). A connection always returns a fully \nconfigured object so you never have to deal with any credentials in an action. \nThere are already many different actions available which you can use i.e. to\ncreate an API based on a database table.\n\nWith Fusio we want to remove as many layers as possible so that you can work\nin your action directly with a specific library. Because of this Fusio has no \nmodel or entity system like many other frameworks, instead we recommend to write\nplain SQL in case you work with a relational database. We think that building API \nendpoints based on models/entities limits the way how you would design a \nresponse. You only need to describe the request and response in the JSON schema \nformat. This schema is then the contract of your API endpoint, how you produce \nthis response technically is secondary. Fusio provides the mentioned \nconnections, which help you to create complete customized responses based on \ncomplicated SQL queries, message queue inserts or multiple remote HTTP calls.\n\n# Development\n\nFusio provides two ways to develop an API. The first way is to build API \nendpoints only through the backend interface by using all available actions.\nThrough this you can solve already many tasks especially through the usage of\nthe [v8 action](https://www.fusio-project.org/documentation/v8).\n\nThe other way is to use the deploy mechanism. Through this you can use normal\nPHP files to implement your business logic and thus you can use the complete PHP \necosystem. Therefor you need to define a `.fusio.yml` \n[deploy file](http://fusio.readthedocs.io/en/latest/deploy.html) which specifies \nthe available routes and actions of the system. This file can be deployed with \nthe following command:\n\n```\nphp bin/fusio deploy\n```\n\nThe action of each route contains the source which handles the business logic. \nThis can be i.e. a simple php file, php class or a url. More information in the \n`src/` folder. In the following an example action to build an API response \nfrom a database:\n\n```php\n<?php\n/**\n * @var \\Fusio\\Engine\\ConnectorInterface $connector\n * @var \\Fusio\\Engine\\RequestInterface $request\n * @var \\Fusio\\Engine\\Response\\FactoryInterface $response\n * @var \\Fusio\\Engine\\ProcessorInterface $processor\n * @var \\Psr\\Log\\LoggerInterface $logger\n * @var \\Psr\\SimpleCache\\CacheInterface $cache\n */\n\n/** @var \\Doctrine\\DBAL\\Connection $connection */\n$connection = $connector->getConnection('Default-Connection');\n\n$count   = $connection->fetchColumn('SELECT COUNT(*) FROM app_todo');\n$entries = $connection->fetchAll('SELECT * FROM app_todo WHERE status = 1 ORDER BY insertDate DESC LIMIT 16');\n\nreturn $response->build(200, [], [\n    'totalResults' => $count,\n    'entry' => $entries,\n]);\n```\n\nIn the code we get the `Default-Connection` which we have defined previously in\nour `.fusio.yml` deploy file. In this case the connection returns a \n`\\Doctrine\\DBAL\\Connection` instance but we have already \n[many adapters](https://www.fusio-project.org/adapter) to connect to different \nservices. Then we simply fire some queries and return the response.\n\n# Backend\n\nFusio provides several apps which work with the internal backend API. These apps\ncan be used to manage and work with the API. This section gives a high level \noverview what the Fusio system provides and how the application is structured. \nLets take a look at the components which are provided by Fusio:\n\n![Overview](https://github.com/apioo/fusio/blob/master/doc/_static/overview.png)\n\n## API\n\nIf you install a Fusio system it setups the default API. Through the API it is \npossible to manage the complete system. Because of that Fusio has some reserved \npaths which are needed by the system.\n\n* `/backend`  \n  Endpoints for the system configuration\n* `/consumer`  \n  Endpoints for the consumer i.e. register new accounts or create new apps \n* `/doc`  \n  Endpoints for the documentation\n* `/authorization`  \n  Endpoints for the consumer to get i.e. information about the user itself and \n  to revoke an obtained access token\n* `/export`  \n  Endpoints to export the documentation into other formats i.e. swagger\n\nThere is also a complete [documentation](http://demo.fusio-project.org/internal/#!/page/about)\nabout all internal API endpoints.\n\n# Apps\n\nThe following apps are working with the Fusio API.\n\n## Backend\n\n![Backend](https://github.com/apioo/fusio/blob/master/doc/_static/backend.png)\n\nThe backend app is the app where the administrator can configure the system. The\napp is located at `/fusio/`.\n\n## Developer\n\n![Developer](https://github.com/apioo/fusio/blob/master/doc/_static/developer.png)\n\nThe developer app is designed to quickly setup an API program where new \ndevelopers can register and create/manage their apps. The app is located at \n`/developer/`.\n\n## Documentation\n\n![Documentation](https://github.com/apioo/fusio/blob/master/doc/_static/documentation.png)\n\nThe documentation app simply provides an overview of all available endpoints. \nIt is possible to export the API definition into other schema formats like i.e. \nSwagger. The app is located at `/documentation/`.\n\n## Swagger-UI\n\n![Swagger-UI](https://github.com/apioo/fusio/blob/master/doc/_static/swagger-ui.png)\n\nThe [swagger-ui](https://github.com/swagger-api/swagger-ui) app renders a \ndocumentation based on the OpenAPI specification. The app is located at \n`/swagger-ui/`.\n\n# Installation\n\nIt is possible to install Fusio either through composer or manually file \ndownload. Place the project into the www directory of the web server.\n\n## Composer\n\n```\ncomposer create-project fusio/fusio\n```\n\n## Download\n\nhttps://github.com/apioo/fusio/releases\n\n## Configuration\n\n* __Adjust the configuration file__  \n  Open the file `.env` in the Fusio directory and change the key \n  `FUSIO_URL` to the domain pointing to the public folder. Also insert the \n  database credentials to the `FUSIO_DB_*` keys.\n* __Execute the installation command__  \n  The installation script inserts the Fusio database schema into the provided \n  database. It can be executed with the following command \n  `php bin/fusio install`.\n* __Create administrator user__  \n  After the installation is complete you have to create a new administrator \n  account. Therefor you can use the following command `php bin/fusio adduser`. \n  Choose as account type \"Administrator\".\n\nYou can verify the installation by visiting the `FUSIO_URL` with a browser. You\nshould see a API response that the installation was successful. The backend is\navailable at `/fusio/`.\n\n## Docker\n\nAlternatively it is also possible to setup a Fusio system through docker. This\nhas the advantage that you automatically get a complete running Fusio system\nwithout configuration. This is especially great for testing and evaluation. To \nsetup the container you have to checkout the [repository](https://github.com/apioo/fusio-docker) \nand run the following command:\n\n```\ndocker-compose up -d\n```\n\nThis builds the Fusio system with a predefined backend account. The credentials \nare taken from the env variables `FUSIO_BACKEND_USER`, `FUSIO_BACKEND_EMAIL` \nand `FUSIO_BACKEND_PW` in the `docker-compose.yml`. If you are planing to run \nthe container on the internet you must change these credentials.\n\n# Documentation\n\nThe official documentation is available at http://fusio.readthedocs.org/\n\n# Use cases\n\nToday there are many use cases where you need a great documented REST API. In \nthe following we list the most popular choices where Fusio comes in to play.\n\n## Business functionality\n\nExposing an API of your business functionality is a great way to extend your \nproduct. You enable customers to integrate it into other applications which\ngives the possibility to open up for new markets. With Fusio you can build such \nAPIs and integrate them seamlessly into your product. We also see many companies\nwhich use the API itself as the core product.\n\n## Micro services\n\nWith Fusio you can simply build small micro services which solve a specific task\nin a complex system.\n\n## Javascript applications\n\nJavascript frameworks like i.e. AngularJS or EmberJS becoming the standard. With\nFusio you can easily build a backend for such applications. So you dont have to\nbuild the backend part by yourself.\n\n## Mobile apps\n\nAlmost all mobile apps need some form to interact with a remote service. This is\nmostly done through REST APIs. With Fusio you can easily build such APIs which \nthen can also be used by other applications.\n\n# Contribution\n\nIf you have found bugs or want to make feature requests use the bug tracker on \nGitHub. For code contributions feel free to send a pull request through GitHub, \nthere we can discuss all details of the changes.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"AADA:11316A:180549:5EB8ED:6AB92F29"},"text_sha256":"d9b48fc8b7b47a70f6b99e42fdd77582ba9acc9176c045bb9a65d3378024810e"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1230","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0925:1C46F8:17F2185:1C1D478:6AB92F2C"},"commit":{"sha":"dcc085ce5b588d7c08fa8d2343da64a1da252536","url":"https://github.com/apioo/fusio/commit/dcc085ce5b588d7c08fa8d2343da64a1da252536","date":"2026-06-04T22:41:17Z","author_date":"2026-06-04T22:41:17Z","committer_date":"2026-06-04T22:41:17Z","tree_sha":"c3fbec1863006eb43a83fa8608a56484e5c47e92","message_first_line":"update changelog"},"tree_request_status":200,"tree_rate":{"github_remaining":"1229","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07DD:3C4024:182FB4C:1C5B9EC:6AB92F2D"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":17268,"blob_sha":"d0e7d9783e4f76722c8e7c1c41709a576e0889f2","priority":0}],"documents":[{"path":"README.md","size":17268,"blob_sha":"d0e7d9783e4f76722c8e7c1c41709a576e0889f2","priority":0,"status":200,"text":"\n<p align=\"center\">\n    <a href=\"https://www.fusio-project.org/\" target=\"_blank\">\n        <img src=\"https://www.fusio-project.org/img/fusio_64px.png\" width=\"64\">\n    <\/a>\n<\/p>\n\n<h1 align=\"center\">Fusio<\/h1>\n\n<p align=\"center\">\n  <strong>Open Source API Management Platform<\/strong><br />\n  Turn your business logic into scalable API products for humans and AI agents.\n<\/p>\n\n<p align=\"center\">\n  <a href=\"https://docs.fusio-project.org/\">📖 Documentation<\/a> •\n  <a href=\"https://www.youtube.com/watch?v=U7QYGKknw_Q\">📺 Video Walkthrough (15m)<\/a> •\n  <a href=\"https://discord.gg/eMrMgwsc6e\">💬 Discord Community<\/a>\n<\/p>\n\n---\n\nFusio is a self-hosted, open-source backend platform and API gateway written in PHP that bridges the gap between your\ninternal infrastructure and the outside world. Whether you are exposing legacy databases, orchestrating microservices,\nor building custom business logic, Fusio handles the heavy lifting. It transforms your services into a professional API\nproduct, complete with an automated developer portal, SDK generation, and monetization tools. With native MCP support,\nFusio also acts as a bridge to the AI ecosystem, allowing you to turn your backend logic into tools for autonomous\nagents.\n\n## 🚀 Features\n\n* **Database API Gateway** - Instantly expose legacy SQL/NoSQL databases (MySQL, PostgreSQL, etc.) as REST APIs.\n* **Microservice Gateway** - Securely route, orchestrate, and load-balance traffic between your distributed services.\n* **Custom API Logic** - Build powerful backend logic using reusable actions in PHP or Javascript.\n* **Agent Development** - Use your custom API logic as \"Tools\" to build and power autonomous AI agents.\n* **AI-Assisted Development** - Generate custom backend logic and schemas using natural language prompts.\n* **MCP Integration** - Native support for the Model Context Protocol to expose APIs to AI ecosystems.\n* **API Developer Portal** - A self-service portal for third-party developers with docs, testing tools, and keys.\n* **SDK Automation** - Zero-effort generation of client SDKs for all major programming languages.\n* **API Monetization** - Turn your API into a product with subscription plans, quotas, and automated billing.\n* **Analytics & Monitoring** - Real-time tracking of API usage, performance metrics, and error logging.\n\n## 📦 Installation\n\n### 🐳 Docker\n\nThe fastest way to try Fusio locally is with Docker and docker-compose.\n\n```yaml\nservices:\n  fusio:\n    image: fusio/fusio\n    restart: always\n    environment:\n      FUSIO_PROJECT_KEY: \"42eec18ffdbffc9fda6110dcc705d6ce\"\n      FUSIO_CONNECTION: \"pdo-mysql://fusio:61ad6c605975@mysql-fusio/fusio\"\n      FUSIO_BACKEND_USER: \"test\"\n      FUSIO_BACKEND_EMAIL: \"demo@fusio-project.org\"\n      FUSIO_BACKEND_PW: \"test1234\"\n    ports:\n      - \"8080:80\"\n\n  mysql-fusio:\n    image: mysql:8.0\n    restart: always\n    environment:\n      MYSQL_RANDOM_ROOT_PASSWORD: \"1\"\n      MYSQL_USER: \"fusio\"\n      MYSQL_PASSWORD: \"61ad6c605975\"\n      MYSQL_DATABASE: \"fusio\"\n    volumes:\n      - ./db:/var/lib/mysql\n```\n\n> docker compose up -d\n\n**After startup**\n\n* Backend: http://localhost:8080/apps/fusio\n* Login with the credentials you configured\n* For the first steps, take a look at our [Getting Started](https://docs.fusio-project.org/docs/bootstrap) guide\n\n### 🛠️ Manual Installation\n\n* __Download artifact__\n\n  You can either download the official [release](https://github.com/apioo/fusio/releases) or clone the repository.\n  ```bash\n  git clone https://github.com/apioo/fusio.git\n  ```\n\n* __Configure `.env`__\n\n  Configure fitting database credentials at the `APP_CONNECTION` variable, all other parameters are optional.\n  ```bash\n  APP_CONNECTION=pdo-mysql://root:password@localhost/fusio\n  APP_URL=http://localhost:8080\n  ```\n\n  > It is also recommended to provide the `APP_URL` which contains the domain pointing to the public folder i.e.\n    `https://api.my_domain.com` or `https://my_domain.com/fusio`, this is required if you host Fusio inside\n    a sub-folder otherwise Fusio tries to detect the domain via the Host header.\n\n  Supported DBs:\n  * MySQL: `pdo-mysql://user:pass@host/db`\n  * PostgreSQL: `pdo-pgsql://user:pass@host/db`\n  * SQLite: `pdo-sqlite:///fusio.sqlite`\n\n* __Run migrations__\n  ```bash\n  php bin/fusio migrate\n  ```\n\n* __Create administrator user__\n  ```bash\n  php bin/fusio adduser\n  ```\n\n  > Choose Administrator as account type.\n\n* __Install backend app__\n  ```bash\n  php bin/fusio marketplace:install fusio\n  ```\n\n* __Start server (dev only)__\n  ```bash\n  php -S 127.0.0.1:8080 -t public\n  ```\n\n  > This should be only used for testing, for production you need a classical Nginx/Apache setup or use Docker, take a look at our [installation documentation](https://docs.fusio-project.org/docs/installation/) for more details.\n\n### 🌐 Web-Installer\n\nInstead of manual installation you can also use the web installer script located at `/install.php`\nto complete the installation. After installation, it is recommended to delete this \"install\" script.\n\n## 🧭 Getting Started\n\nUse our [Getting Started](https://docs.fusio-project.org/docs/bootstrap) guide to build your first action and configure\nan operation to expose the action as API endpoint.\n\n### Action\n\nAt the core of Fusio, you describe your business logic in an Action. An Action is a PHP class that receives an incoming\nrequest and returns a response.\n\n```php\n<?php\n\nnamespace App\\Action;\n\nuse Fusio\\Engine;\n\nclass MyAction implements Engine\\ActionInterface\n{\n    public function handle(Engine\\RequestInterface $request, Engine\\ParametersInterface $configuration, Engine\\ContextInterface $context): mixed\n    {\n        return [\n            'hello' => 'world'\n        ];\n    }\n}\n```\n\nOnce defined, this action can be bound to an Operation so that it executes for a specific HTTP method and path.\n\n#### Configuration\n\nFusio allows you to build actions that are configurable directly from the backend. In the example below, we add a\n`message` configuration parameter so a user can customize the response without changing the code.\n\n```php\n<?php\n\nnamespace App\\Action;\n\nuse Fusio\\Engine;\n\nclass MyAction extends Engine\\ActionAbstract\n{\n    public function handle(Engine\\RequestInterface $request, Engine\\ParametersInterface $configuration, Engine\\ContextInterface $context): mixed\n    {\n        return [\n            'hello' => $configuration->get('message'),\n        ];\n    }\n\n    public function configure(Engine\\Form\\BuilderInterface $builder, Engine\\Form\\ElementFactoryInterface $elementFactory): void\n    {\n        $builder->add($elementFactory->newInput('message', 'Message', 'text', 'The message which should be returned'));\n    }\n}\n```\n\nIn the backend, this parameter is now exposed via a generated form:\n\n![Action_Configuration](https://www.fusio-project.org/media/backend/action_configuration.png)\n\nThis concept makes actions highly reusable for both developers and non-technical users. We also provide a\n[preset of actions](https://docs.fusio-project.org/docs/backend/api/action/) for common tasks. If you build an action\nyou'd like to share, check out our [Adapter](https://www.fusio-project.org/adapter) page. See our\n[custom action](https://docs.fusio-project.org/docs/development/custom_action) documentation for more details.\n\n#### Worker\n\nFusio provides Worker actions, which allow you to develop logic directly in the backend without building custom PHP\nclasses.\n\n![Worker_PHP_Designer](https://www.fusio-project.org/media/backend/worker_php_designer.png)\n\nThis also enables you to build actions in other languages like JavaScript or Python, which is ideal if your team is more\nfamiliar with those ecosystems. Learn more in the [worker documentation](https://docs.fusio-project.org/docs/action/worker).\n\n#### AI\n\nWith the 7.0 release, we introduced a new Agent concept that allows you to generate worker actions using AI.\n\n![Agent_Message](https://www.fusio-project.org/media/backend/agent_message.png)\n\nThis makes developing backend logic accessible to everyone. Simply describe the logic you need:\n\n> return a list of popular composers of the 19th century\n\nThe Agent then generates the appropriate action logic automatically. Fusio supports multiple providers, including\nOllama, ChatGPT, and Gemini, so you are never locked into a specific AI. Explore the AI\n[agent documentation](https://docs.fusio-project.org/docs/ai/) for more.\n\n## 🧩 Apps\n\nFusio includes a flexible app system that lets you install various web-based apps to support different API-related use\ncases. These apps are typically simple JavaScript frontends that interact with Fusio's internal API.\n\nYou can browse all available apps in the [Fusio Marketplace](https://www.fusio-project.org/marketplace),\nand install them using either the CLI:\n\n```bash\nphp bin/fusio marketplace:install fusio\n```\n\nor directly through the backend interface.\n\n### 🖥️ Backend\n\n![Backend](https://www.fusio-project.org/media/backend/dashboard.png)\n\nThe backend app is the main app to configure and manage your API located at `/apps/fusio/`.\n\n### 💡 VSCode\n\nFusio provides a [VSCode extension](https://marketplace.visualstudio.com/items?itemName=Fusio.fusio)\nwhich can be used to simplify action development.\n\n## 🔗 Integration\n\n### 🧰 SDK\n\nTo build and integrate applications with Fusio, you can use one of our officially supported SDKs, which simplify\ninteraction with a Fusio instance. Alternatively, you can directly communicate with the REST API for full control and\nflexibility.\n\n| Language       | GitHub                                                  | Package                                                            | Example                                                     |\n|----------------|---------------------------------------------------------|--------------------------------------------------------------------|-------------------------------------------------------------|\n| __C#__         | [GitHub](https://github.com/apioo/fusio-sdk-csharp)     | [NuGet](https://www.nuget.org/packages/Fusio.SDK)                  | [Example](https://github.com/apioo/fusio-sample-csharp-cli) |\n| __Go__         | [GitHub](https://github.com/apioo/fusio-sdk-go)         | [go get](https://github.com/apioo/fusio-sdk-go)                    | [Example](https://github.com/apioo/fusio-sample-go-cli)     |\n| __Java__       | [GitHub](https://github.com/apioo/fusio-sdk-java)       | [Maven](https://mvnrepository.com/artifact/org.fusio-project/sdk)  | [Example](https://github.com/apioo/fusio-sample-java-cli)   |\n| __Javascript__ | [GitHub](https://github.com/apioo/fusio-sdk-javascript) | [NPM](https://www.npmjs.com/package/fusio-sdk)                     |                                                             |\n| __PHP__        | [GitHub](https://github.com/apioo/fusio-sdk-php)        | [Packagist](https://packagist.org/packages/fusio/sdk)              | [Example](https://github.com/apioo/fusio-sample-php-cli)    |\n| __Python__     | [GitHub](https://github.com/apioo/fusio-sdk-python)     | [PyPI](https://pypi.org/project/fusio-sdk/)                        | [Example](https://github.com/apioo/fusio-sample-python-cli) |\n\n### 🖥️ Frontend\n\n| Framework | GitHub                                                           | Package                                             | Example |\n|-----------|------------------------------------------------------------------|-----------------------------------------------------|---------|\n| Angular   | [GitHub](https://github.com/apioo/fusio-sdk-javascript-angular)  | [NPM](https://www.npmjs.com/package/ngx-fusio-sdk)  | [Example](https://github.com/apioo/fusio-sample-javascript-angular)        |\n\n### 📡 REST API\n\n| Domain   | Documentation                                       | Specification                                                                           |\n|----------|-----------------------------------------------------|-----------------------------------------------------------------------------------------|\n| Backend  | [ReDoc](https://www.fusio-project.org/api/backend)  | [OpenAPI](https://demo.fusio-project.org/system/generator/spec-openapi?filter=backend)  |\n| Consumer | [ReDoc](https://www.fusio-project.org/api/consumer) | [OpenAPI](https://demo.fusio-project.org/system/generator/spec-openapi?filter=consumer) |\n| System   | [ReDoc](https://www.fusio-project.org/api/system)   | [OpenAPI](https://demo.fusio-project.org/system/generator/spec-openapi?filter=system)   |\n\n## 🌍 Ecosystem\n\nBesides our core product, we offer additional services to augment the functionality of Fusio.\n\n* [Marketplace](https://www.fusio-project.org/marketplace)  \n  The Fusio marketplace is the place to share apps and actions with other Fusio users, it helps to quickly build your\n  API by using existing code from other users. You can register and configure the credentials at your local Fusio\n  installation under System / Config s. `marketplace_client_id` and `marketplace_client_secret` then you can use the\n  panel under Development / Marketplace to install apps or actions.\n* [SDKgen](https://sdkgen.app/)  \n  SDK as a service platform which helps you to generate client SDKs for your API in different languages like `CSharp`,\n  `Go`, `Java` and `Python` which helps your customers to interact with your API. Therefor you need to register at the\n  SDKgen app and provide the credentials under System / Config s. `sdkgen_client_id` and `sdkgen_client_secret`.\n  Then you can generate the SDK directly at the backend under Development / SDK. \n* [TypeHub](https://typehub.cloud/)  \n  API and data design platform, basically you can push your API specification to this platform so that users can simply\n  discover your API. It tracks all changes of your API so that you have always a clean history how your API evolves.\n* [APIgen](https://apigen.app/)  \n  Service which generates fully working Fusio APIs based on a data model. It also includes a simple Angular frontend app\n  to CRUD your models. It can be seen as low-code generator to quickly generate CRUD APIs but the generated code is\n  clean and can be also used as foundation for your next app.\n* [APImon](https://apimon.app/)  \n  Simple API monitoring service which helps to monitor your Fusio installation. It is optimized for Fusio, but it can be\n  also used for different API endpoints. APImon invokes your endpoints in specific intervals and notifies you about\n  changes. It also includes an uptime page for your users for example s. https://api.apimon.app/status/fusio_marketplace\n\n## 🏷️ Domains\n\nBy default, the entire Fusio project can be hosted on a single domain. In this setup:\n\n* Your API is served from the root path (e.g., https://acme.com/).\n* Web apps like the developer portal and admin backend are accessible under the `/apps` directory (e.g., https://acme.com/apps/developer).\n\nThis setup is quick to get started with and requires no additional configuration. For production environments, we\nrecommend a subdomain-based structure:\n\n* __api.acme.com__  \n  Hosts only the Fusio API. In this setup, you can safely remove the `apps/` folder from the `public/` directory.\n* __developer.acme.com__  \n  Hosts the **Developer App**, a portal where third-party developers can register, view documentation, and access their credentials. \n* __fusio.acme.com__ (optional)  \n  Hosts the **Backend App**, used to manage your Fusio instance. You can also host this on a separate internal domain.\n\n> Note: This is just a suggested setup. You're free to choose any domain or subdomain structure that best fits your infrastructure.\n\n## 📚 Documentation\n\nPlease check out our official documentation website where we bundle all documentation resources:\n\nhttps://docs.fusio-project.org/\n\n## 🤝 Support & Community\n\nIf you have questions, found a bug, or want to share your feedback, we are active across the following channels:\n\n* **[GitHub Discussions](https://github.com/apioo/fusio/discussions)** - Best for \"How-to\" questions, architectural feedback, and sharing feature ideas.\n* **[Discord Community](https://discord.gg/eMrMgwsc6e)** - Join our real-time chat to connect with other Fusio developers and the core maintainers.\n* **[Issue Tracker](https://github.com/apioo/fusio/issues)** - Report technical bugs or reproducible errors. Please check the **[Documentation](https://docs.fusio-project.org/)** first.\n* **[Direct Contact](https://www.fusio-project.org/contact)** - Reach out via our official website for specific inquiries or high-level feedback.\n\n## 🤝 Partners\n\nWe're grateful to our partners who support the Fusio project and share our vision of advancing open API development.\n\nIf your company is interested in becoming a partner and being listed here, consider [becoming a sponsor](https://github.com/sponsors/chriskapp).\n\n<a href=\"https://jb.gg/OpenSource\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://www.jetbrains.com/company/brand/img/logo_jb_dos_3.svg\">\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg\">\n   <img alt=\"JetBrains logo.\" src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg\">\n <\/picture>\n<\/a>\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"ADE0:11316A:180561:5EB93D:6AB92F2C"},"text_sha256":"c9d8187832508dbe3ab3a9e1f15e1bfb1cd798a88d98eb54bd8c9153a44a5468"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":0,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":0,"score":0,"D1_evidence":"","note":"Nenhuma evidência semântica suficiente encontrada nos documentos candidatos.","evidence":[]}}}
{"repository":"matthiasn/lotti","input_row":{"repository":"matthiasn/lotti","url":"https://github.com/matthiasn/lotti","name":"lotti","owner":"matthiasn","description":"A private logbook with a staff of personal AI assistants. Agents read what you record and propose what to do next — you approve the changes. End-to-end encrypted sync between your own devices — servers only ever see ciphertext. Local AI optional.","language":"Dart","license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0","license_osi_approved":"true","stars":1180,"issues":193,"created_at":"2016-03-16T15:01:59Z","updated_at":"2026-09-27T13:29:40Z","first_commit_at":"2016-03-16T15:01:59Z","last_commit_at":"2026-09-27T13:29:34Z","activity_months":126.38,"ai_ml_match_topics":"ai-agents","has_pre_gdpr_activity":"true","has_post_gdpr_activity":"true"},"source_sha256":"30540b1c1bcd94f5b9afc0a77f92a103e83c7388aa09907a99e786e7ffc32a11","collector_protocol_version":"open-source-no-size-limit-expanded-topics-2026-09","observed_at":"2026-09-27T14:58:53.932Z","accessibility":{"http_status":200,"accessible":true,"metadata":{"full_name":"matthiasn/lotti","visibility":"public","created_at":"2016-03-16T15:01:59Z","updated_at":"2026-09-27T14:33:59Z","private":false,"fork":false,"archived":false,"stargazers_count":1180,"open_issues_count":12,"license_spdx_id":"GPL-3.0","license_name":"GNU General Public License v3.0"},"error":"","rate":{"github_remaining":"1228","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"084F:180242:1820418:1C4BFFB:6AB92F2D"}},"pre":{"until":"2018-05-24T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1227","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0896:76AED:1821BF8:1C4DC8F:6AB92F2E"},"commit":{"sha":"d0046d8cd4cadc993722d504b36eda8a31d3970d","url":"https://github.com/matthiasn/lotti/commit/d0046d8cd4cadc993722d504b36eda8a31d3970d","date":"2018-05-24T23:24:15Z","author_date":"2018-05-24T23:24:15Z","committer_date":"2018-05-24T23:24:15Z","tree_sha":"ddbc4ba57ecff4f46304c9ba15bb3c874b0753f9","message_first_line":"24h chart from GraphQL"},"tree_request_status":200,"tree_rate":{"github_remaining":"1226","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07D0:3203A7:17C22C7:1BEDEF7:6AB92F2E"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":3753,"blob_sha":"479f2eb5f304828d190c1c0e2326944e51005a64","priority":0}],"documents":[{"path":"README.md","size":3753,"blob_sha":"479f2eb5f304828d190c1c0e2326944e51005a64","priority":0,"status":200,"text":"# meo\n\n**meo** is a **personal information manager** for recording and improving my life. It starts with a **geo-aware journal** where each entry captures your geo-location and whatever you want to note about that moment. You can use hashtags and mentions to better organize your information. You can also track your **tasks** and **habits**.\n\nHere's how that currently looks like:\n\n![screenshot](http://matthiasnehlsen.com/images/2018-03-08-meo-charts.png)\n\n\n## Motivation\n\nSee this [blog post](http://matthiasnehlsen.com/blog/2018/03/15/introducing-meo/) for the background. More blog posts to follow.\n\n\n## Components\n\n**meo** consists of a **[Clojure](https://clojure.org/)** and **[ClojureScript](https://github.com/clojure/clojurescript)** system spanning an **Electron** application and a backend that runs on the **[JVM](https://en.wikipedia.org/wiki/Java_virtual_machine)**. There's also a **mobile companion app** written in **ClojureScript** on top of **[React Native](https://facebook.github.io/react-native/)**, see `./rn-app` in this repository. All subsystems in meo make use of the **[systems-toolbox](https://github.com/matthiasn/systems-toolbox)** for its architecture.\n\nHere's how the app currently looks like:\n\n![screenshot](http://matthiasnehlsen.com/images/2018-03-08-mobile.png)\n\n\n## Installation\n\nThere are two install scripts, one for Ubuntu and one for the Mac. These install the dependencies required. If anything is missing, please submit a pull request. And have a look at what the script for your platform does before blindly running it, and typing in your superuser password, which is required for `apt` in the Linux version.\n \n For Mac:\n\n    $ ./install_mac.sh\n     \nFor Linux: \n     \n    $ ./install_ubuntu.sh\n\nThen, you need to install the JavaScript dependencies:\n\n    $ yarn install\n \nOnce that is done, you need to compile the ClojureScript code into JavaScript. These need to be run with the `cljs` profile. Using this profile keeps the size of the uberjar for the JVM-based backend smaller. I usually run one or more of these in different terminals or split views:\n\n    $ lein with-profile cljs cljsbuild auto main\n    $ lein with-profile cljs cljsbuild auto renderer-dev\n    $ lein with-profile cljs cljsbuild auto updater\n\nAlternatively, you use these aliases (see project.clj);\n\n    $ lein cljs-main-dev\n    $ lein cljs-renderer-dev\n    $ lein cljs-updater-dev\n\nThese need to be running in separate terminals, as they watch the file system for changes in auto mode.\n\nNext, you need to compile the SCSS files into CSS:\n\n    $ lein sass4clj auto\n \n\n## Usage\n\nOnce you have completed all the steps in the previous section, all you need to do is:\n\n    $ lein run\n    $ npm start\n\n\n## Packaging\n\nYou can also package the application using the publish script:\n\n    $ ./publish.sh -m beta\n\nThis script will completely build and package the meo desktop application. It will try to upload the application into an S3 bucket if credentials are in the environment. But even without valid credentials, you will still find the packaged application under `./dist/`.\n\n\n## Tests\n\n    $ lein test\n\nor\n\n    $ lein test2junit\n\n\n[![CircleCI Build Status](https://circleci.com/gh/matthiasn/meo.svg?&style=shield)](https://circleci.com/gh/matthiasn/meo)\n[![TravisCI Build Status](https://travis-ci.org/matthiasn/meo.svg?branch=master)](https://travis-ci.org/matthiasn/meo)\n\n\n## How to help\n\nContributions and pull requests are very welcome. Please check the open issues for where help is required the most, and file issues for anything that you find.\n\n\n## License\n\nCopyright © 2016-2018 **[Matthias Nehlsen](http://www.matthiasnehlsen.com)**. Distributed under the **GNU AFFERO PUBLIC LICENSE**, Version 3. See separate LICENSE file.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"0B5E:349C76:17A242:5E538A:6AB92F2E"},"text_sha256":"072079f5dd6f27fe14507d9ee3c27733c5bc06bc0c4b9f30c45309eb69673d20"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":0,"C3":0,"C4":0,"C5":0,"C6":0,"C7":0,"D1":1,"score":1,"D1_evidence":"sha=d0046d8cd4cadc993722d504b36eda8a31d3970d; file=README.md; text=# meo meo is a personal information manager for recording and improving my life. It starts with a geo-aware journal where each entry captures your geo-location and whatever you want to note about that moment. You can use hashtags and mentions to better organize your information.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=d0046d8cd4cadc993722d504b36eda8a31d3970d; file=README.md; text=# meo meo is a personal information manager for recording and improving my life. It starts with a geo-aware journal where each entry captures your geo-location and whatever you want to note about that moment. You can use hashtags and mentions to better organize your information."}}},"post":{"until":"2026-06-30T23:59:59Z","commit_request_status":200,"commit_rate":{"github_remaining":"1225","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"0880:278AC2:188EC03:1CBAD15:6AB92F2F"},"commit":{"sha":"5703dfe40797bb36531ed3ad9a1b21ae9adf848e","url":"https://github.com/matthiasn/lotti/commit/5703dfe40797bb36531ed3ad9a1b21ae9adf848e","date":"2026-06-28T15:18:52Z","author_date":"2026-06-28T15:18:52Z","committer_date":"2026-06-28T15:18:52Z","tree_sha":"5ec613b7ffcedacfea34e2a08e4430b398e839a3","message_first_line":"chore: upgrade deps & bump version"},"tree_request_status":200,"tree_rate":{"github_remaining":"1224","github_reset":"1790522329","github_resource":"core","retry_after":"","request_id":"07A3:74E6D:18323C0:1C5E5B4:6AB92F2F"},"tree_truncated":false,"document_candidates":[{"path":"README.md","size":27879,"blob_sha":"7d0435f8aa8042e40ac7118e2ad33df9d40c1213","priority":0},{"path":"docs/adr/0002-wake-scheduling-and-throttling-policy.md","size":2762,"blob_sha":"9813e8d7cb27547e6b5076b4cfb54625d428c06a","priority":1},{"path":"docs/adr/0004-task-agent-tool-execution-policy.md","size":3483,"blob_sha":"f9a8b5800068467ee80fee4b0b4304136ce9fb6b","priority":1},{"path":"docs/adr/0005-template-model-resolution-policy.md","size":2065,"blob_sha":"072d11675dc7f263729b7eb658af68d3186d2d94","priority":1},{"path":"docs/adr/0012-recursive-self-improvement-depth-policy.md","size":3847,"blob_sha":"aca542690a11aa08daee230ed896d419695012c2","priority":1},{"path":"docs/implementation_plans/2026-02-28_agent_privacy_profiles.md","size":35241,"blob_sha":"29ca763d9d36364e3ea180c46a62b63422858dbb","priority":1},{"path":"PRIVACY.md","size":7710,"blob_sha":"58f98141ec56a6692960bac26c8f51a032d89c78","priority":1},{"path":"SECURITY.md","size":195,"blob_sha":"be1d6c32156b8f69034a59e45068084a6a62ce0b","priority":1}],"documents":[{"path":"README.md","size":27879,"blob_sha":"7d0435f8aa8042e40ac7118e2ad33df9d40c1213","priority":0,"status":200,"text":"# Lotti\n\n[![codecov](https://codecov.io/gh/matthiasn/lotti/graph/badge.svg?token=VB6FWvA1yW)](https://codecov.io/gh/matthiasn/lotti) [![Flathub Downloads](https://img.shields.io/flathub/downloads/com.matthiasn.lotti?style=flat&label=Flathub%20installs)](https://flathub.org/en/apps/com.matthiasn.lotti) [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/matthiasn/lotti/total?label=GitHub%20Releases%20downloads)](https://github.com/matthiasn/lotti/releases)\n\n**A private, open‑source logbook with a local agentic layer that helps you get things done.**\n\nLotti is the system of record for the things you actually do — tasks, time recordings, voice notes, transcriptions, journal entries, habits, and health data — paired with an **agentic layer** of long‑living AI agents that observe, suggest, summarise, and nudge.\n\nThe logbook is local. The agents run on your machine. With reasoning‑capable models like **Qwen 3.6 35B A3B** (Mixture of Experts, ~3B active parameters), the model the agents call can run locally too — so, hardware permitting, your data never has to leave the device at all. You configure the provider and the model per category; anything OpenAI‑compatible plugs in directly, and other providers can be extended.\n\n![Task details page on macOS](https://raw.githubusercontent.com/matthiasn/lotti-docs/main/images/0.9.998/task_details_screenshot_macos.png)\n\n## Download\n\n| Platform                 | Where to get it                                                                                                                                 |\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Linux**                | [Flathub](https://flathub.org/en/apps/com.matthiasn.lotti) (recommended) or `tar.gz` on [Releases](https://github.com/matthiasn/lotti/releases) |\n| **macOS**                | Signed + notarized DMG on [Releases](https://github.com/matthiasn/lotti/releases)                                                               |\n| **iOS / iPadOS / macOS** | TestFlight (limited; invitation only)                                                                                                           |\n| **Android**              | APK on [Releases](https://github.com/matthiasn/lotti/releases)                                                                                  |\n| **Android**              | Play Store internal testing (limited; invitation only)                                                                                          |\n| **Windows**              | Build from [source](docs/DEVELOPMENT.md) for now                                                                                                |\n\n[![Get it on Flathub](https://flathub.org/api/badge?locale=en)](https://flathub.org/en/apps/com.matthiasn.lotti)\n\n---\n\n## Table of Contents\n\n- [What is Lotti?](#what-is-lotti)\n- [The Agentic Layer](#the-agentic-layer)\n- [Local Execution & Data Sovereignty](#local-execution--data-sovereignty)\n- [Architecture: Two Databases, Human‑in‑the‑Loop](#architecture-two-databases-human-in-the-loop)\n- [Core Features](#core-features)\n- [Use Cases](#use-cases)\n- [Sync, Encryption, and Caveats](#sync-encryption-and-caveats)\n- [Where Lotti Is Right Now](#where-lotti-is-right-now)\n- [Getting Started](#getting-started)\n- [Pricing & Sustainability](#pricing--sustainability)\n- [Contributing](#contributing)\n- [Documentation](#documentation)\n- [Technical Stack](#technical-stack)\n- [Philosophy](#philosophy)\n- [License](#license)\n\n---\n\n## What is Lotti?\n\nLotti is two things in one application:\n\n1. **A personal logbook** — the system of record for facts about your work and life. Time recordings, audio notes (transcribed locally with Whisper or Voxtral, or via a cloud model of your choice), journal entries, tasks, habits, and health data.\n2. **An agentic layer on top of that logbook** — long‑living AI agents that read what you've recorded, think about it, and help you act on it. Entirely private if you so choose, and provide capable hardware.\n\nThe logbook side is what you'd expect from a good personal information manager: structured, durable, exportable, yours. The agentic side is where things get interesting.\n\n---\n\n## The Agentic Layer\n\nLotti's agents are **long‑living entities with memories**. They wake up when there is relevant new information, or on a cadence, look at what's happened since they last ran, and produce a report. They remember their previous reports. They have opinions. They are, by design, a little unpredictable — interesting to interact with rather than mechanical.\n\nCrucially, **you shape them**. Their behavior and personality are not fixed. If an agent is too pushy, too verbose, or focused on the wrong things, you can tune it — and you can keep tuning it. This tuning process is formalized as 1-on-1 with the respective agent template.\n\n### A thousand agents in your pocket\n\nA single device (even a phone) can host **thousands of long‑living agents** without breaking a sweat. The author currently runs north of a thousand task agents on a phone, all idle most of the time and reacting only to changes in the entities they actually care about. The trick isn't a big timer loop — it's that agents subscribe to **fine‑grained entity‑change notifications**, so an agent sleeps cheaply and only wakes when something it watches actually moves.\n\nThat matters because the agentic experience scales with your life: a task agent per task that needs ongoing thought, a project agent per project, a planner per area of focus. Lotti is designed to make that fan‑out feel ordinary.\n\n### Anatomy of an Agent: Mission, Soul, Report Directive\n\nEvery agent in Lotti is defined by three components:\n\n- **Mission** — *what the agent is supposed to do.* The job description: \"watch this category of tasks and surface what's blocked,\" \"review my time recordings against my goals,\" etc.\n- **Soul** — *the personality and characteristics.* How the agent talks to you, what it cares about, how forgiving or pedantic it is. A soul is reusable across templates and agent types: define a voice once, and any agent — task watcher, reviewer, journal companion — can wear it.\n- **Report Directive** — *the shape of the output of a wake cycle.* When an agent wakes up and runs, the report directive defines what it shows you — the surface where the assistant says \"here's what I think needs your attention.\"\n\nMission, soul, and report directive together turn a generic LLM call into something resembling a coherent collaborator (most of the time — they are still LLMs).\n\n### Grievances and Weekly 1‑on‑1s\n\nYou can **file a grievance with an agent.** It isn't a form, and you don't have to use any particular phrase — saying \"hey, I want to file a grievance about X\" works, but so does just venting at the agent when it's annoying you. It picks up the grievance either way and records it. In the next **weekly 1‑on‑1 session** (or whatever cadence you set), the agent brings it up, you talk it through, and the two of you reconcile what changes. Watching that play out, and seeing the agent actually adjust, is one of the most interesting parts of the whole system.\n\nThe result is an assistant that *evolves*. You're not configuring a tool — you're managing a relationship.\n\n### Where the agentic layer is today, and where it's going\n\nThe current focus is on **task agents** and their evolution: agents that watch tasks in your realm, reason about them, and have tools to interact with you and propose changes — new checklist items, status updates, suggested edits — every one of which still requires your approval before it lands in the user database. A **long‑lived day‑planning agent** also ships today (see ADR 0022): it wakes on a cadence and on relevant changes to propose how a day should be shaped given what's on your plate and what you've said matters.\n\nNext agent types on the roadmap:\n\n- **Week planners** — agents that propose how a week should be shaped, extending the day‑planning loop to a longer horizon.\n- **Long‑term commitment monitors** — agents that watch the things you said you'd care about over months, not days, and surface drift before it becomes a problem.\n- **Effort‑against‑goals balancers** — agents that look at where your time and energy actually went and weigh that against what you said you wanted.\n\nSame building blocks (mission, soul, report directive, grievances, human‑in‑the‑loop), different jobs.\n\n---\n\n## Local Execution & Data Sovereignty\n\nMost AI‑powered productivity tools require you to upload and store your personal data on their servers. Lotti doesn't. Your tasks, audio, journal entries, and time recordings live on your devices and nowhere else.\n\nThere's finally at least one local **model** good enough to drive the agents — **Qwen 3.6 35B A3B** is the one validated in daily use, and others probably work too. For a long time, the choice was \"use a frontier cloud model and accept that data leaves the machine\" or \"use a local model and accept that the agents won't really work.\" Qwen 3.6 closes that gap — a 35B parameter Mixture‑of‑Experts model with only ~3B active parameters per token, which is what makes it practical to run on a personal machine while still being smart enough to drive the agentic loop.\n\n### Hardware reality check\n\nRunning this locally is **power‑hungry**. Tested extensively on an M4 Max with 128 GB of RAM, the laptop hums audibly under sustained agent load and battery drains noticeably faster than during normal work. Think \"last‑generation Intel i9 MacBook Pro on a heavy build\" — that kind of fan noise. It's feasible though, and the quality is finally there.\n\n### Hybrid is the realistic answer\n\nThe author runs Lotti **hybrid**:\n\n- **Local model** for highly private categories — personal journaling, health, anything you'd rather not hand to a cloud provider.\n- **Gemini Flash** (or your cloud provider of choice) for everything else — open‑source work, day‑to‑day task management, anything where the data isn't that sensitive. It's faster still, but much cheaper on your battery, and frees up the local machine for the categories that actually need it.\n\nLocally available today:\n\n- 🎙️ **Voice / transcription** — Whisper and Voxtral (Mistral) run fully offline.\n- 🧠 **Thinking** — Qwen 3.6 and similar reasoning‑capable local models drive the agentic loop, not just shallow autocomplete.\n- 🤝 **Per‑category provider choice** — you decide on a per‑category basis where inference happens. Same UX, different trust boundary.\n\nWhen you do opt into a cloud provider, Lotti uses **your own API keys**, and your data is shared only for that specific inference call — there is no Lotti backend in the middle holding your data. For users who want options beyond US frontier cloud, **European‑hosted, no‑retention, GDPR‑compliant providers** are supported, and **Chinese providers** (Qwen via Alibaba, for instance) also work well — pick the jurisdiction and the price/performance point that fits  your specific needs.\n\n**Image generation isn't local yet.** Cover‑art generation currently goes through a cloud provider (Nano Banana Pro on Gemini, or Qwen/Wan via Alibaba — see [Visual journaling](#visual-journaling-cover-art-for-your-life)). A reliable, local Python‑based image‑generation service following the same pattern as our local Voxtral integration is one of the **few areas where outside contributions are actively wanted** — see [Contributing](#contributing).\n\n---\n\n## Architecture: Two Databases, Human‑in‑the‑Loop\n\nLotti enforces a strict separation between *what you said/wrote* and *what an agent thinks*. They live in **different databases on disk** for a reason.\n\n### The User Database — the system of record\n\nThis is the database we treat with care. It contains the facts: your tasks, your notes, your audio, your time recordings, your journal entries. We do not let agents write into it freely.\n\n### The Agentic Database — agents' working memory\n\nThis is where agent state lives: agent definitions, memories, wake cycle history, internal reasoning traces, intermediate results. It's allowed to grow, and it's allowed to be **pruned**. There is no guarantee of permanence here — the agentic database can be thrown away and recreated without losing anything that matters about *you*. If it grows too large, pruning strategies will be able to trim it back in the future. The agents may lose or compress some memory; the logbook does not.\n\n### Human‑in‑the‑Loop, by Design\n\nThe split between the two databases has one practical consequence: **anything an agent suggests must be approved by you before it lands in the user database.** Agents propose. You dispose.\n\nThere are two narrow exceptions, both for fields that are still empty on a task: **if a task has no title yet, an agent may set the initial title automatically, and if it has no language yet, an agent may set the initial language automatically.** Any subsequent edit to either — or to anything else — requires your explicit approval.\n\n```mermaid\nflowchart LR\n    subgraph Agentic[\"Agentic DB (prunable, recreatable)\"]\n        A[Agent state & memories]\n        W[Wake cycle reports]\n        S[Suggestions]\n    end\n    subgraph User[\"User DB (system of record)\"]\n        T[Tasks]\n        J[Journal & audio]\n        M[Metrics & habits]\n    end\n    A --> W --> S\n    S -->|requires user approval| T\n    S -.->|exception: initial title & language only| T\n```\n\nThe reason this matters: the rule isn't enforced by being careful in prompts, it's enforced by the storage layout. Agent‑authored content sits in a different file on disk and reaches the user database only through a code path that requires your approval. Even a misbehaving agent can't bypass that — it has nowhere to write.\n\n---\n\n## Core Features\n\nBeyond the agentic layer, the logbook side covers:\n\n### Tracking\n- **Tasks** — full lifecycle (open, groomed, in progress, blocked, on hold, done, rejected), with priorities, due dates, labels, projects, and cover art\n- **Audio recordings** — captured locally, transcribed by Whisper, Voxtral, or your chosen cloud model\n- **Time tracking** — recorded against tasks and projects\n- **Journal entries** — written reflections and documentation\n- **Habits** — daily habits and routines, with three completion types (success / fail / skip)\n- **Health data** — import from Apple Health and similar sources\n- **Custom metrics** — track anything that matters to you\n\n### AI‑augmented workflows\n- **Smart summaries** of tasks\n- **Audio → checklist** conversion of rambling voice notes\n- **Image cover art** for tasks and journal entries\n- **Context recap** when you return to a task after a break\n- **Generate Coding Prompt** skill — turns a task plus your notes into a structured Markdown \n  coding brief ready to paste into Claude Code, OpenCode, Codex, Cursor, or your AI \n  coding assistant of choice\n- **Generate Design Prompt** skill — turns task context plus notes into a UI/UX exploration \n  prompt (defaults to several functional prototypes, enforces design‑system alignment when one \n  is mentioned), ready to paste into Claude Design, OpenDesign, Figma Make, or similar\n- **Generate Image Prompt** and **Generate Research Prompt** skills round out the same pattern for cover‑art generation and Deep‑Research‑style briefs\n- **Per‑category provider configuration** — local for personal stuff, cloud for work, your call\n\n### Privacy & sync\n- **Local‑only storage** — there is no cloud storage. Data lives on your devices, full stop.\n- **End‑to‑end encrypted sync** between *your* devices via [Matrix](https://matrix.org), with **Vodozemac** providing the Megolm crypto in Rust. See [Sync, Encryption, and Caveats](#sync-encryption-and-caveats) for what is and isn't encrypted.\n- **Bring your own keys** for cloud providers, if you choose to use them\n- **Jurisdiction choice** — European‑hosted, no‑retention, GDPR‑compliant providers are supported, and Chinese providers (Qwen via Alibaba, etc.) also work well, alongside US frontier cloud models, and fully local\n- **Portable, exportable, no vendor lock‑in** — your data stays accessible to you, independent of any subscription or service\n- **No accounts (other than the Matrix one you bring), no telemetry, no lock‑in**\n\n---\n\n## Use Cases\n\nTwo workflows in particular are why the author keeps building this app.\n\n### On‑the‑go dictation\n\nYou're walking in a forest, or you're driving, and the ideas show up. You don't want to stop and type, and you don't want to lose them.\n\nYou hold the record button, talk for as long as you want, and stop. Lotti transcribes the audio (locally with Voxtral or Whisper later on the desktop, or right away via your cloud provider). An agent then organizes what you said into actionable checklist items, attaches them to the right task, and surfaces the result for your approval the next time you sit down (or look at your phone, in case your chose cloud inference).\n\n### Visual journaling: cover art for your life\n\nCover art for tasks isn't decoration — it's a *visual index of what your day/week/month was actually about*.\n\nEach task can have an AI‑generated image, created with **Nano Banana Pro (Gemini)** or **Qwen/Wan (Alibaba)** (whichever you've configured). You're the one who guides the art, and you keep the result. Years from now, when you look back at \"what was I doing in May 2026?\", you don't have to read a wall of text — you will be able to scroll an Instagram‑style grid of cover art and the texture of that period of your life comes back at a glance.\n\nThis is one of the strongest arguments for keeping a logbook like this open‑source and yours: a subscription‑based product gives you a \"download my data\" button at best, but no tool to make that data meaningful afterward. Lotti's cover art belongs to you, in a database you can read, in a file format that will outlive any of us (JSON stored in SQLite).\n\n---\n\n## Sync, Encryption, and Caveats\n\nLotti syncs between *your own* devices over Matrix. There is no Lotti backend; homeservers (self‑hosted or public) only relay end‑to‑end encrypted payloads.\n\n### What is encrypted\n\n- **Sync traffic** — every sync payload (logbook entries, agent state, suggestions, attachments) is end‑to‑end encrypted using **Matrix + Vodozemac** (the Rust implementation of Olm/Megolm). Homeservers see ciphertext, never unencrypted data. Both the user database and the agentic database sync this way.\n- **Cloud inference calls** — sent over TLS to whichever provider you configured, using your own API key.\n\n### What is not (yet) encrypted\n\n- **Local databases at rest.** The on‑device SQLite files live inside your OS user account and are not separately encrypted by Lotti today. This is a real caveat: if your device is compromised at the OS level, an attacker with that level of access can read the databases. But then again, when an attacker has OS level access, you're screwed anyway. App‑level at‑rest encryption is considered for inclusion on the roadmap; until it lands, treat Lotti's on‑device data with the same care you'd give any personal app on the same device. If this trade‑off matters for your threat model, please weigh it before adopting Lotti for the most sensitive categories.\n\n---\n\n## Where Lotti Is Right Now\n\nThe application is in active daily use. The agentic layer is real, working, and shipping. A few things are worth knowing if you're picking it up now:\n\n- **Design system rollout is in progress.** Some screens follow the new design system, some don't yet, so you'll see visual inconsistencies. The path to full App Store polish is an ongoing effort.\n- **The agentic layer is new.** Mission/soul/report‑directive ergonomics, grievance handling, and pruning strategies are areas of active development — feedback here is especially valuable.\n- **Local image generation isn't there yet.** See the contribution call below.\n- **At‑rest encryption isn't there yet.** See [Sync, Encryption, and Caveats](#sync-encryption-and-caveats).\n\n---\n\n## Getting Started\n\nPick the guide that matches what you want to do:\n\n- 🤖 [Set up AI — local (Ollama) or cloud (Gemini Flash)](GETTING_STARTED.md) — the fastest way to a working agent\n- ✅ [Basic task management](docs/BASIC_TASK_MANAGEMENT.md) — the everyday voice‑to‑checklist workflow\n- 📖 [Manual](docs/MANUAL.md) — how to use Lotti\n\nFor developers:\n\n- Install Flutter via [FVM](https://fvm.app/) (the repo includes `.fvmrc`)\n- `make deps` — install dependencies\n- `make analyze` — static analysis\n- `make test` — unit tests\n- `make build_runner` — code generation\n- `make l10n` — regenerate localizations\n- `fvm flutter run -d macos` — run on macOS (or `-d <device>` for others)\n\n**Linux only** — install emoji font support for proper rendering:\n```bash\n# Debian/Ubuntu: sudo apt install fonts-noto-color-emoji\n# Fedora: sudo dnf install google-noto-emoji-color-fonts\n# Arch:   sudo pacman -S noto-fonts-emoji\n./linux/install_emoji_fonts.sh\n```\n\nSee [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) for the full developer setup.\n\n---\n\n## Pricing & Sustainability\n\nA short, honest version of where this is headed.\n\n**Linux is and will always be free, with maximum functionality.** No paywalls, no upsells. The same promise extends to any future fully open‑source mobile operating system. The one thing this *doesn't* include is hosted sync infrastructure — running someone else's homeserver is a real cost, and that won't be free; you can either self‑host Matrix or bring your own homeserver.\n\n**On other platforms, the basics will stay free too.** Task and journal capture, the task agent, voice transcription, the everyday loop — all free.\n\n**More advanced agent features may eventually be in‑app purchases on platforms where IAP is the norm** (iOS/macOS, Android, Windows). The candidates: day‑ and week‑planner agents, overarching project‑management agents, longer‑horizon commitment monitors. The exact split isn't set yet.\n\n---\n\n## Contributing\n\nContributions are welcome — but with deliberate boundaries. Please read this before opening a PR.\n\n### What's very welcome\n\n- 🐛 **Issues and bug reports** — the best place to start. Tell us what broke and how to reproduce it.\n- 🌍 **Translations** — new languages, corrections, improvements to existing locales (currently English, German, Spanish, French, Romanian, Czech). AI‑assisted translations are fine **provided you contribute from a real‑name, established GitHub profile** (not a recently created throwaway).\n- 💡 **Discussion of new features** — open an issue, describe what you'd like to have and why, and let's agree on the shape before any code is written.\n- 🐍 **Local image generation service** — a reliable, local Python‑based image‑gen service (following the same architecture as our local Voxtral integration) is a **specifically wanted contribution**. If you have experience in this area and want to take it on, please open an issue first so we can align on the integration shape.\n\n### What will be rejected by default\n\n**Unsolicited large pull requests.** This isn't gatekeeping — it's three real constraints:\n\n1. **AI‑generated code varies wildly in quality.** A 2,000‑line PR from someone we've never spoken to is, statistically, expensive to review carefully and easy to accept incorrectly.\n2. **Review capacity is limited.** Maintainer time is the binding constraint on what can land.\n3. **Trust matters.** Lotti holds people's personal data on their own devices. A large unreviewed PR — well‑meant or not — is a vector for problems we can't afford to ship.\n\nSo: **for any non‑trivial feature, open an issue first.** We'll talk about it, agree on scope, and then a PR might be welcome. Small, focused PRs that fix a clear bug are also welcome without prior discussion.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the formal version.\n\n---\n\n## Documentation\n\n- [Getting Started with AI](GETTING_STARTED.md) — set up local Ollama or cloud Gemini\n- [Manual](docs/MANUAL.md) — how to use Lotti\n- [Basic Task Management](docs/BASIC_TASK_MANAGEMENT.md) — voice‑to‑checklist workflow\n- [Architecture](docs/ARCHITECTURE.md) — technical design\n- [Background](docs/BACKGROUND.md) — the story behind the project\n- [Privacy Policy](PRIVACY.md)\n- [Contributing](CONTRIBUTING.md)\n\n---\n\n## Technical Stack\n\n- **Frontend** — [Flutter](https://flutter.dev) (iOS, macOS, Android, Windows, Linux)\n- **Local AI** — [Ollama](https://ollama.com) for general LLM hosting ([Qwen](https://github.com/QwenLM) 3.6 35B A3B and similar reasoning‑capable models for the agentic loop), [Whisper](https://github.com/openai/whisper) and [Voxtral](https://mistral.ai/news/voxtral) ([Mistral](https://mistral.ai)) for offline speech‑to‑text\n- **Cloud AI (optional, per category)** — [OpenAI](https://openai.com), [Anthropic](https://www.anthropic.com), [Google Gemini](https://ai.google.dev) (Flash and Pro tiers, including Nano Banana Pro for image generation), [Mistral](https://mistral.ai), [Alibaba](https://www.alibabacloud.com) ([Qwen](https://github.com/QwenLM) + Wan image models), [Nebius](https://nebius.com), [OpenRouter](https://openrouter.ai), or any OpenAI‑compatible provider\n- **Storage** — local [SQLite](https://sqlite.org) via [Drift](https://drift.simonbinder.eu), with strict separation between user DB (system of record) and agentic DB (working memory)\n- **Sync** — end‑to‑end encrypted via [Matrix](https://matrix.org), using [**Vodozemac**](https://github.com/matrix-org/vodozemac) (Rust) for Megolm crypto. Both databases sync; homeservers only relay encrypted payloads\n- **Testing** — comprehensive unit and integration tests; also a growing number of property‑based / generative tests using [Glados](https://pub.dev/packages/glados)\n\n---\n\n## Philosophy\n\n1. **Your data is yours.** The user database is the system of record. No company should own your thoughts and experiences — and definitely not behind a subscription that expires.\n2. **AI as a tool, not a service.** Use AI capabilities without subscriptions or vendor lock‑in. As local models improve, more of the experience moves on‑device — but cloud stays a first‑class, à‑la‑carte option for the categories where you've decided it's fine and useful.\n3. **Privacy by design.** Choose exactly what to share, when, and with whom. The architecture, not the marketing copy, enforces the privacy story.\n4. **Human‑in‑the‑loop.** Agents propose, you dispose. Every change to the system of record passes through you (with two narrow, documented exceptions — the initial title and initial language of an otherwise empty task).\n5. **Agents you can shape.** Mission, soul, report directive, grievances, 1‑on‑1s — agents are collaborators you tune over time, not appliances you configure once.\n\n---\n\n## License\n\nLotti is open source under [LICENSE](LICENSE).\n\n## Acknowledgments\n\nThanks to the [Flutter](https://flutter.dev) team, the [Qwen](https://github.com/QwenLM) and [Mistral](https://mistral.ai) teams for their open weights models, [OpenAI](https://openai.com) for the [Whisper](https://github.com/openai/whisper) open weights, the [Ollama](https://ollama.com) project, the [Matrix.org](https://matrix.org) community, the [Vodozemac](https://github.com/matrix-org/vodozemac) authors, and everyone contributing translations, issues, and ideas.\n\n---\n\n**Building in public** — [Substack](https://matthiasnehlsen.substack.com)\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"8FE4:241B62:17C92A:5E7ECE:6AB92F30"},"text_sha256":"5ecf2ec66f55bcd9d50cd9a86323e1c65ce8cddb7d19931c124d5baa84f85b06"},{"path":"docs/adr/0002-wake-scheduling-and-throttling-policy.md","size":2762,"blob_sha":"9813e8d7cb27547e6b5076b4cfb54625d428c06a","priority":1,"status":200,"text":"# ADR 0002: Wake Scheduling and Throttling Policy\n\n- Status: Accepted\n- Date: 2026-02-27\n\n## Context\n\nTask edits can arrive in bursts while a wake is already running. The runtime\nneeds deterministic behavior for queueing, throttling, and manual reanalysis\nwithout double-running an agent.\n\n## Decision\n\n1. Use defer-first scheduling for subscription wakes:\n   - First matching subscription signal enqueues a wake and starts a throttle\n     window (`120s`) before drain.\n2. Coalesce incoming tokens per agent while queued/throttled:\n   - Merge tokens into the first queued job for that agent instead of\n     creating duplicate jobs.\n3. Manual wakes override queued subscription work:\n   - Clear throttle for the agent.\n   - Remove queued jobs for the same agent.\n   - Enqueue one manual job immediately.\n4. Keep drain single-flight:\n   - `processNext()` is guarded so only one drain loop runs at a time.\n   - New drain requests set a flag and are handled by the active loop.\n5. Persist throttle state:\n   - Persist `nextWakeAt` on set/clear so UI and restart behavior stay\n     consistent.\n6. Keep a safety net:\n   - Periodic timer (`60s`) triggers drain when queue has pending jobs and\n     no drain is active.\n\n## Scheduling Flow\n\n```mermaid\nflowchart TD\n  N[\"Notification batch\"] --> M{\"Matches subscription?\"}\n  M -- \"No\" --> X[\"Drop\"]\n  M -- \"Yes\" --> S{\"Suppressed?\"}\n  S -- \"Yes\" --> X\n  S -- \"No\" --> T{\"Agent throttled?\"}\n  T -- \"Yes\" --> C[\"Merge tokens or enqueue deferred job\"]\n  T -- \"No\" --> E[\"Enqueue subscription job\"]\n  E --> D[\"Set throttle deadline (nextWakeAt)\"]\n  D --> Q[\"Deferred drain timer\"]\n  C --> Q\n  Q --> R[\"processNext / _drain\"]\n  R --> J[\"Execute wake job\"]\n```\n\n## Manual Wake Override\n\n```mermaid\nsequenceDiagram\n  participant UI as \"Agent UI\"\n  participant O as \"WakeOrchestrator\"\n  participant Q as \"WakeQueue\"\n\n  UI->>O: \"enqueueManualWake(agentId)\"\n  O->>O: \"clearThrottle(agentId)\"\n  O->>Q: \"removeByAgent(agentId)\"\n  O->>Q: \"enqueue(manual job)\"\n  O->>O: \"processNext()\"\n```\n\n## Consequences\n\n- Bursty edits collapse into one queued wake per agent with merged tokens.\n- Manual reanalysis runs immediately and supersedes stale queued subscription\n  work.\n- Throttle behavior survives app restarts via persisted `nextWakeAt`.\n- Drain execution remains deterministic without overlapping loops.\n\n## Related\n\n- [ADR 0027: Wake Notification Propagation and Storm Prevention](./0027-wake-notification-propagation-and-storm-prevention.md)\n  — the origin-routing model and cross-entity fan-out that decide *which* write\n  reaches this throttle path, and on behalf of which agents.\n- `lib/features/agents/wake/wake_orchestrator.dart`\n- `lib/features/agents/wake/wake_queue.dart`\n- `lib/features/agents/wake/run_key_factory.dart`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"13BC:1A3D83:1893E9:5F49D3:6AB92F31"},"text_sha256":"6e67a84e2338144439da765aa3a9e1b5006cdb300d04b95e1d5d3e8032478b0d"},{"path":"docs/adr/0004-task-agent-tool-execution-policy.md","size":3483,"blob_sha":"f9a8b5800068467ee80fee4b0b4304136ce9fb6b","priority":1,"status":200,"text":"# ADR 0004: Task Agent Tool Execution Policy and Audit Trail\n\n- Status: Accepted\n- Date: 2026-02-27\n\n## Context\n\nTool calls are the mutation boundary between LLM output and journal data. The\nruntime needs strong policy enforcement, durable audit messages, and explicit\nself-notification suppression data.\n\n## Decision\n\n1. Enforce category scope fail-closed in `AgentToolExecutor`:\n   - Resolve target entity category before mutation.\n   - Deny when category is missing or not in agent allowlist.\n2. Persist action/result audit messages for each tool call:\n   - Persist action message before execution.\n   - Persist tool result message after execution.\n   - Record policy denial metadata when denied.\n3. Use deterministic operation IDs:\n   - Derive `operationId` from run key + tool/action stable inputs.\n4. Capture vector clocks after successful mutations:\n   - Read vector clock of mutated entity.\n   - Expose map of `mutatedEntries` for orchestrator suppression.\n5. Keep audit write failures non-fatal where possible:\n   - Do not mask policy decisions or handler outcome when audit writes fail.\n\n## Tool Call Flow\n\n```mermaid\nsequenceDiagram\n  participant S as \"TaskAgentStrategy\"\n  participant E as \"AgentToolExecutor\"\n  participant H as \"Task Tool Handler\"\n  participant J as \"Journal DB\"\n  participant A as \"AgentSyncService\"\n\n  S->>E: \"execute(toolName, args, targetEntityId)\"\n  E->>E: \"resolve category + enforce allowlist\"\n  alt \"policy denied\"\n    E->>A: \"persist action message (policyDenied=true)\"\n    E-->>S: \"ToolExecutionResult(policyDenied)\"\n  else \"policy allowed\"\n    E->>A: \"persist action message\"\n    E->>H: \"execute handler\"\n    H->>J: \"mutate entity\"\n    H-->>E: \"ToolExecutionResult\"\n    E->>J: \"read vector clock\"\n    E->>A: \"persist toolResult message\"\n    E-->>S: \"ToolExecutionResult + mutatedEntries update\"\n  end\n```\n\n## Consequences\n\n- Tool scope is enforced consistently before mutations.\n- Audit history is durable and tied to deterministic operation IDs.\n- Orchestrator suppression gets precise post-mutation vector clocks.\n\n## Addendum 2026-04-18: `retract_suggestions`\n\nThe task-agent tool surface gained `retract_suggestions`, an immediate\n(non-deferred) tool that lets the agent withdraw its own previously\nproposed change items without a user prompt. It fits the same execution\npolicy as the other immediate tools (`update_report`,\n`record_observations`, `get_related_task_details`):\n\n- Routed through `TaskAgentStrategy.processToolCalls` and dispatched via\n  `SuggestionRetractionService`.\n- Action + tool-result messages are persisted on the same audit path as\n  any other tool call, so every retraction leaves an auditable trail.\n- The mutation target is agent-side state only (`ChangeSetEntity` +\n  `ChangeDecisionEntity` in `agent.sqlite`). No journal entity is touched,\n  so category-scope enforcement is inherited from the owning task but\n  does not require resolving a separate target entity category.\n- Concurrency: `SuggestionRetractionService` writes the decision record\n  first, then re-reads the parent change set before transitioning the\n  item — same ordering as `ChangeSetConfirmationService.confirmItem`.\n  Racing a user confirmation produces either outcome (confirmed or\n  retracted) cleanly; both leave a matching decision record.\n\n## Related\n\n- `lib/features/agents/tools/agent_tool_executor.dart`\n- `lib/features/agents/workflow/task_agent_strategy.dart`\n- `lib/features/agents/service/suggestion_retraction_service.dart`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"3248:149227:18454B:5EFB46:6AB92F31"},"text_sha256":"5f91eb0c2c0109844c15815f508734e7580e9745bb44fa343f106a42a65e21a5"},{"path":"docs/adr/0005-template-model-resolution-policy.md","size":2065,"blob_sha":"072d11675dc7f263729b7eb658af68d3186d2d94","priority":1,"status":200,"text":"# ADR 0005: Template Model and Provider Resolution Policy\n\n- Status: Accepted\n- Date: 2026-02-27\n\n## Context\n\nTask-agent and template-evolution workflows both rely on template-selected\nmodel IDs. Runtime provider selection must stay deterministic and fail clearly\nwhen configuration is incomplete.\n\n## Decision\n\n1. Model selection precedence for task-agent wake:\n   - Use active template version model when present.\n   - Fallback to template head model when version model is null.\n2. Resolve provider via configured model metadata:\n   - Find `AiConfigModel` by `providerModelId`.\n   - Resolve provider from the model's `inferenceProviderId`.\n3. Require valid provider config:\n   - Provider must be an `AiConfigInferenceProvider`.\n   - Provider must have non-empty API key.\n4. Abort workflow when provider cannot be resolved:\n   - Task-agent wake returns failure (`No Gemini provider configured`).\n   - Template evolution start/proposal operations stop early.\n\n## Resolution Flow\n\n```mermaid\nflowchart TD\n  T[\"Template + active version\"] --> M[\"Select modelId (version first)\"]\n  M --> R[\"resolveInferenceProvider(modelId)\"]\n  R --> C[\"Find AiConfigModel by providerModelId\"]\n  C --> P[\"Load provider by inferenceProviderId\"]\n  P --> V{\"Provider valid + apiKey present?\"}\n  V -- \"Yes\" --> OK[\"Proceed with conversation call\"]\n  V -- \"No\" --> FAIL[\"Abort workflow with provider error\"]\n```\n\n## Usage Sites\n\n```mermaid\nflowchart LR\n  A[\"TaskAgentWorkflow.execute\"] --> R[\"resolveInferenceProvider\"]\n  B[\"TemplateEvolutionWorkflow.startSession\"] --> R\n  C[\"TemplateEvolutionWorkflow.proposeDirectives\"] --> R\n```\n\n## Consequences\n\n- Model/provider routing is deterministic across agent runtime paths.\n- Missing or invalid provider config fails early instead of failing during\n  inference calls.\n- Task-agent and template-evolution workflows share one resolver contract.\n\n## Related\n\n- `lib/features/agents/workflow/task_agent_workflow.dart`\n- `lib/features/agents/workflow/template_evolution_workflow.dart`\n- `lib/features/agents/util/inference_provider_resolver.dart`\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"EF74:3B7E2:17359F:5DEC0A:6AB92F31"},"text_sha256":"15a6864e758da8d79587e1529d4605e5977d2719699e5c71958bc84112cc08c7"},{"path":"docs/adr/0012-recursive-self-improvement-depth-policy.md","size":3847,"blob_sha":"aca542690a11aa08daee230ed896d419695012c2","priority":1,"status":200,"text":"# ADR 0012: Recursive Self-Improvement Depth Policy\n\n- Status: Proposed\n- Date: 2026-03-01\n\n## Context\n\nThe self-learning cycle is inherently recursive: an improver agent evolves a task agent\ntemplate, but the improver itself is governed by a template that could also be improved.\nThis creates a chain:\n\n- **Level 0**: Task agents (governed by task template)\n- **Level 1**: Template improver (governs task template, governed by improver template)\n- **Level 2**: Meta-improver (governs improver template, governed by meta-improver template)\n- **Level N**: ...\n\nWithout a policy, this recursion is unbounded. An unbounded chain risks:\n1. **Runaway self-modification**: each level changes the level below, creating cascading\n   rewrites that are difficult to audit or revert.\n2. **Drift from human intent**: after enough recursive improvements, the original\n   human-authored intent may be diluted.\n3. **Resource waste**: each recursion level costs LLM tokens and compute.\n4. **Debugging complexity**: failures in deeply nested improvers are hard to diagnose.\n\n## Decision\n\n1. **Fixed recursion depth cap of 2**:\n   - Level 0: Task agents — improved weekly by Level 1\n   - Level 1: Template improver — improved monthly by Level 2\n   - Level 2: Meta-improver — its own template is **human-curated only** (no Level 3 agent)\n\n2. **Enforcement mechanism**: each improver agent stores `recursionDepth` in its\n   `AgentSlots`. The `ImproverAgentService.create()` method:\n   - Reads the target template's current improver (if any) to determine depth\n   - Rejects creation if the resulting depth would exceed 2\n   - Stores the computed depth in the new agent's slots\n\n3. **Frequency scaling by depth**:\n   - Level 1 (template improver): weekly ritual\n   - Level 2 (meta-improver): monthly ritual\n   - This natural scaling prevents high-frequency cascading changes\n\n4. **Human override**: the meta-improver's template (Level 2) can only be edited\n   through the existing manual template editing UI. No agent can modify it.\n\n```mermaid\nflowchart TD\n    subgraph \"Level 0: Task Execution\"\n        TA[\"Task Agent Instances\"]\n    end\n\n    subgraph \"Level 1: Weekly Improvement\"\n        L1[\"Template Improver\\n(recursionDepth: 1)\\nRitual: weekly\"]\n        L1 -->|\"improves\"| TT[\"Task Template\"]\n        TT -->|\"governs\"| TA\n    end\n\n    subgraph \"Level 2: Monthly Meta-Improvement\"\n        L2[\"Meta-Improver\\n(recursionDepth: 2)\\nRitual: monthly\"]\n        L2 -->|\"improves\"| IT[\"Improver Template\"]\n        IT -->|\"governs\"| L1\n    end\n\n    subgraph \"Level 3: Human Boundary\"\n        HUMAN[\"Human Curator\\n(manual editing only)\"]\n        HUMAN -->|\"curates\"| MT[\"Meta-Improver Template\"]\n        MT -->|\"governs\"| L2\n    end\n\n    style HUMAN fill:#fcc,stroke:#c00,stroke-width:2px,color:#000\n    style L1 fill:#bbf,stroke:#333,color:#000\n    style L2 fill:#ff9,stroke:#333,color:#000\n```\n\n## Consequences\n\n### Positive\n- Human oversight is preserved at the top of the chain — the system cannot fully\n  self-modify without human involvement.\n- Two levels of automated improvement provide meaningful self-learning while remaining\n  auditable.\n- Frequency scaling (weekly → monthly) naturally dampens cascading changes.\n- Simple enforcement via slot-stored depth — no complex graph traversal needed.\n\n### Negative\n- Fixed depth may be too restrictive for future use cases (e.g., domain-specific\n  improvement chains). This can be revisited if evidence warrants it.\n- Monthly cadence for Level 2 means meta-improvements are slow to propagate.\n\n### Neutral\n- The depth cap is a policy decision, not a technical limitation. The infrastructure\n  supports arbitrary depth — only the service layer enforces the cap.\n- Level 2 meta-improver is optional — the system works with only Level 1 improvers.\n  Meta-improvement is an enhancement, not a requirement.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2B7E:1A3D83:1893F4:5F49F0:6AB92F31"},"text_sha256":"d6051e919ca63f9471b3e6e7dcc3cde7789b64722ad0dce531f942a25790a6af"},{"path":"docs/implementation_plans/2026-02-28_agent_privacy_profiles.md","size":35241,"blob_sha":"29ca763d9d36364e3ea180c46a62b63422858dbb","priority":1,"status":200,"text":"# Agent Privacy Profiles — Implementation Plan\n\n**Date**: 2026-02-28\n**Priority**: P1\n**Status**: Planning\n\n## 1. Problem Statement\n\nCurrently, agents are assigned a single `modelId` (a `providerModelId` string like\n`'models/gemini-3-flash-preview'`) directly on their template. This is unintuitive\nbecause:\n\n- Users must understand provider-specific model identifiers.\n- Different capabilities (thinking, vision, transcription) all share the same\n  model, even when specialized models would be more appropriate.\n- Switching an agent between cloud providers requires editing each template\n  individually.\n- There is no way to express intent like \"keep my data local\" or \"use European\n  infrastructure\" — the user has to know which models map to which providers.\n\n## 2. Solution Overview\n\nIntroduce **Inference Profiles** — named configurations that bundle model\nassignments for each capability slot:\n\n| Slot | Purpose | Model Constraint |\n|---|---|---|\n| **Thinking** | Agentic reasoning, tool calling | `supportsFunctionCalling == true` |\n| **Image Recognition** | Vision analysis of attached images | `inputModalities` contains `image` |\n| **Transcription** | Audio-to-text processing | `inputModalities` contains `audio` |\n| **Image Generation** | Cover art, visual mnemonics | `outputModalities` contains `image` |\n\nA profile is a first-class entity stored in the existing `ai_config.sqlite`\ndatabase alongside providers, models, and prompts.\n\n### Key Concepts\n\n- **Profile** = named bundle of (thinkingModelId, imageRecognitionModelId, transcriptionModelId, imageGenerationModelId)\n- **Template.profileId** replaces **Template.modelId** as the primary model reference\n- **Runtime resolution** goes: template → profile → per-slot model → provider\n- **Backward compatibility**: templates with a `modelId` but no `profileId` continue\n  to work exactly as today (the `modelId` is used for the thinking slot; the\n  remaining three slots — image recognition, transcription, and image generation\n  — are null in the legacy path)\n\n## 3. Data Architecture\n\n### 3.1 New Freezed Variant: `AiConfig.inferenceProfile`\n\nAdd a new variant to the existing `AiConfig` sealed union in\n`lib/features/ai/model/ai_config.dart`:\n\n```dart\nconst factory AiConfig.inferenceProfile({\n  required String id,\n  required String name,\n  required DateTime createdAt,\n\n  /// providerModelId string for agentic thinking (tool calling, reasoning).\n  /// e.g. 'models/gemini-3-flash-preview'. Resolved at runtime via\n  /// resolveInferenceProvider() which finds the matching AiConfigModel\n  /// and its AiConfigInferenceProvider.\n  required String thinkingModelId,\n\n  /// providerModelId string for image recognition / vision tasks.\n  /// e.g. 'models/gemini-3-flash-preview' or 'qwen3-vl-flash'.\n  String? imageRecognitionModelId,\n\n  /// providerModelId string for audio transcription.\n  /// e.g. 'voxtral-mini-latest' or 'models/gemini-3-flash-preview'.\n  String? transcriptionModelId,\n\n  /// providerModelId string for image generation (cover art, visual mnemonics).\n  /// e.g. 'models/gemini-3-pro-image-preview' or 'gpt-image-1.5'.\n  String? imageGenerationModelId,\n\n  /// Whether this is a system-seeded default (non-deletable).\n  @Default(false) bool isDefault,\n\n  /// Whether this profile requires a desktop environment (e.g. Ollama).\n  @Default(false) bool desktopOnly,\n\n  DateTime? updatedAt,\n  String? description,\n}) = AiConfigInferenceProfile;\n```\n\nPrivacy intent is encoded in the profile **name** (e.g. \"Local (Ollama)\",\n\"Mistral EU\", \"Gemini Flash\"). There is no `privacy` enum — the app cannot\nenforce data residency guarantees, so it is the user's responsibility to\nconfigure profiles appropriately. A profile named \"Local\" that references\ncloud models is a user error, not something we police.\n\nThe `AiConfigType` enum gains a new value:\n\n```dart\nenum AiConfigType {\n  inferenceProvider,\n  prompt,\n  model,\n  inferenceProfile, // NEW\n}\n```\n\n### 3.2 Template Model Reference Changes\n\nIn `AgentTemplateEntity`, **add** `profileId` alongside the existing `modelId`:\n\n```dart\nconst factory AgentDomainEntity.agentTemplate({\n  // ... existing fields ...\n  required String modelId,        // KEPT for backward compatibility\n  String? profileId,              // NEW — takes precedence when set\n  // ...\n}) = AgentTemplateEntity;\n```\n\nSimilarly for `AgentTemplateVersionEntity`:\n\n```dart\nconst factory AgentDomainEntity.agentTemplateVersion({\n  // ... existing fields ...\n  String? modelId,                // KEPT for backward compatibility\n  String? profileId,              // NEW — takes precedence when set\n  // ...\n}) = AgentTemplateVersionEntity;\n```\n\nAnd in `AgentConfig`:\n\n```dart\n@freezed\nabstract class AgentConfig with _$AgentConfig {\n  const factory AgentConfig({\n    @Default(5) int maxTurnsPerWake,\n    @Default('models/gemini-3-flash-preview') String modelId,\n    String? profileId,            // NEW\n  }) = _AgentConfig;\n}\n```\n\n### 3.3 Entity-Relationship Diagram\n\nThe profile stores `providerModelId` strings (e.g. `'models/gemini-3-flash-preview'`)\nfor each slot — the same kind of string currently stored on `AgentTemplateEntity.modelId`.\nThe existing `resolveInferenceProvider()` function already handles the full\n`providerModelId → AiConfigModel → AiConfigInferenceProvider` lookup chain, so\nprofiles do **not** reference models or providers directly.\n\n```mermaid\nerDiagram\n    AiConfigInferenceProfile {\n        string id PK\n        string name\n        string thinkingModelId \"providerModelId string\"\n        string imageRecognitionModelId \"providerModelId string, nullable\"\n        string transcriptionModelId \"providerModelId string, nullable\"\n        string imageGenerationModelId \"providerModelId string, nullable\"\n        bool isDefault\n        bool desktopOnly\n    }\n\n    AgentTemplateEntity {\n        string id PK\n        string displayName\n        string modelId \"legacy providerModelId\"\n        string profileId \"new, preferred\"\n    }\n\n    AgentTemplateVersionEntity {\n        string id PK\n        string agentId \"groups versions under a template\"\n        string modelId \"legacy snapshot\"\n        string profileId \"snapshot\"\n    }\n\n    AgentTemplateEntity }o--o| AiConfigInferenceProfile : \"profileId\"\n    AgentTemplateVersionEntity }o--o| AiConfigInferenceProfile : \"profileId\"\n```\n\nAt runtime, each `providerModelId` from a profile slot is resolved via the\nexisting `resolveInferenceProvider()` which queries the `AiConfigModel` table\nto find the matching model, then looks up its `AiConfigInferenceProvider`.\nThis chain is unchanged from today — profiles are purely a grouping layer.\n\n### 3.4 Storage\n\nProfiles are stored in the existing `ai_configs` table in `ai_config.sqlite`\n(same table as providers, models, and prompts). The `type` column will contain\n`'inferenceProfile'`. No schema migration is needed — the table already uses a\ngeneric `serialized TEXT` column for JSON payloads.\n\n## 4. Data Flow\n\n### 4.1 Runtime Model Resolution\n\n```mermaid\nsequenceDiagram\n    participant Orchestrator as WakeOrchestrator\n    participant Workflow as TaskAgentWorkflow\n    participant Resolver as ProfileResolver\n    participant AiConfigRepo as AiConfigRepository\n\n    Orchestrator->>Workflow: execute(agentIdentity, ...)\n    Workflow->>Workflow: resolveTemplate(agentId)\n    Note over Workflow: templateCtx = (template, version)\n    Note over Workflow: profileId = agent.config.profileId<br/>?? version.profileId<br/>?? template.profileId\n\n    alt profileId != null\n        Workflow->>Resolver: resolveFromProfile(profileId)\n        Resolver->>AiConfigRepo: getConfigById(profileId)\n        AiConfigRepo-->>Resolver: AiConfigInferenceProfile\n        Note over Resolver: Extract thinkingModelId (providerModelId string)\n        Resolver->>Resolver: resolveInferenceProvider(thinkingModelId)\n        Note over Resolver: Existing function: providerModelId → AiConfigModel → Provider\n    else Legacy path (no profileId anywhere)\n        Workflow->>Resolver: resolveFromModelId(version.modelId ?? template.modelId)\n        Resolver->>Resolver: resolveInferenceProvider(modelId)\n    end\n\n    Resolver-->>Workflow: ResolvedProfile(modelId, provider, ...)\n    Workflow->>Workflow: sendMessage(model: modelId, provider: provider)\n```\n\n### 4.2 Resolution Logic (Pseudocode)\n\n```text\nresolveModelsForWake(agentIdentity, templateCtx):\n  // Agent-level override (set during creation) takes priority,\n  // then version snapshot, then template default.\n  profileId = agentIdentity.config.profileId\n               ?? templateCtx.version.profileId\n               ?? templateCtx.template.profileId\n\n  if profileId != null:\n    profile = aiConfigRepo.getConfigById(profileId)\n    if profile is AiConfigInferenceProfile:\n      // Each slot stores a providerModelId string.\n      // resolveInferenceProvider() is the existing function that does:\n      //   providerModelId → find AiConfigModel → find AiConfigInferenceProvider\n      return ResolvedProfile(\n        thinking: resolveInferenceProvider(profile.thinkingModelId),\n        imageRecognition: profile.imageRecognitionModelId != null\n          ? resolveInferenceProvider(profile.imageRecognitionModelId!)\n          : null,\n        transcription: profile.transcriptionModelId != null\n          ? resolveInferenceProvider(profile.transcriptionModelId!)\n          : null,\n        imageGeneration: profile.imageGenerationModelId != null\n          ? resolveInferenceProvider(profile.imageGenerationModelId!)\n          : null,\n      )\n\n  // Legacy fallback: use modelId for thinking slot only\n  modelId = templateCtx.version.modelId ?? templateCtx.template.modelId\n  return ResolvedProfile(\n    thinking: resolveInferenceProvider(modelId),\n    imageRecognition: null,\n    transcription: null,\n    imageGeneration: null,\n  )\n```\n\n### 4.3 Per-Capability Dispatch\n\nCurrently `TaskAgentWorkflow.execute()` only uses the thinking model. The\nprofile resolution refactor returns a `ResolvedProfile` struct with all four\nslots (thinking, imageRecognition, transcription, imageGeneration). Today, only\nthe `thinking` slot is used by the workflow's `sendMessage` call. The remaining\nthree slots are plumbed through but only activated when the corresponding\ncapabilities are added in future iterations (vision tool, transcription tool,\nimage generation tool). This plan focuses on the thinking slot as the primary\npath.\n\n## 5. Pre-defined Default Profiles\n\nSeeded idempotently on first launch via a new `seedDefaultProfiles()` method in\n`AiConfigRepository` (similar pattern to `AgentTemplateService.seedDefaults()`).\n\nAll `providerModelId` values below are taken from `known_models.dart` to\nensure they match what `ModelPrepopulationService` creates. The profile name\ncommunicates privacy intent to the user (e.g. \"Local\" = on-device, \"EU\" =\nGDPR-compliant infrastructure).\n\n| Profile Name | Thinking | Image Recognition | Transcription | Image Generation | Desktop Only |\n|---|---|---|---|---|---|\n| Gemini Flash | `models/gemini-3-flash-preview` | `models/gemini-3-flash-preview` | `models/gemini-3-flash-preview` | `models/gemini-3-pro-image-preview` | No |\n| Gemini Pro | `models/gemini-3.1-pro-preview` | `models/gemini-3.1-pro-preview` | `models/gemini-3.1-pro-preview` | `models/gemini-3-pro-image-preview` | No |\n| OpenAI | `gpt-5.2` | `gpt-5-nano` | `gpt-4o-transcribe` | `gpt-image-1.5` | No |\n| Mistral (EU) | `magistral-medium-2509` | `mistral-small-2501` | `voxtral-mini-latest` | — | No |\n| Alibaba | `qwen3-max` | `qwen3-vl-flash` | `qwen3-omni-flash` | `wan2.6-image` | No |\n| Local (Ollama) | `qwen3:8b` | `gemma3:4b` | — | — | **Yes** |\n\n**Important**: Profile seeding only creates the profile entity. The referenced\n`providerModelId` values must already exist as `AiConfigModel` entries (created\nvia the existing `ModelPrepopulationService` when a user configures a provider).\nProfiles referencing models that don't exist yet are valid — the runtime will\ngracefully fail with a log message, same as today.\n\n### Profile IDs\n\nDefault profiles use well-known IDs for idempotent seeding:\n\n```dart\nconst profileGeminiFlashId = 'profile-gemini-flash-001';\nconst profileGeminiProId   = 'profile-gemini-pro-001';\nconst profileOpenAiId      = 'profile-openai-001';\nconst profileMistralEuId   = 'profile-mistral-eu-001';\nconst profileAlibabaId     = 'profile-alibaba-001';\nconst profileLocalId       = 'profile-local-001';\n```\n\n## 6. Backward Compatibility Strategy\n\n### 6.1 Zero-Migration Approach\n\nNo data migration is performed on existing templates or agents. Instead:\n\n1. **`profileId` is nullable** on `AgentTemplateEntity`, `AgentTemplateVersionEntity`,\n   and `AgentConfig`. When `null`, the existing `modelId` field is used as-is.\n\n2. **Resolution order** (agent-level override takes highest precedence):\n   ```text\n   agent.config.profileId → version.profileId → template.profileId → version.modelId → template.modelId\n   ```\n\n3. **First non-null wins**. Existing templates that have `modelId` set but no\n   `profileId` continue to work without any changes.\n\n4. **UI migration path**: When a user edits an existing template and selects a\n   profile, the `profileId` is set and the template-level `modelId` is kept\n   unchanged (for rollback safety). From that point forward, `profileId` takes\n   precedence.\n\n### 6.2 Template Version Snapshots\n\nWhen a new template version is created while a profile is assigned:\n- Both `profileId` and `modelId` are captured on the version.\n- `modelId` is set to `profile.thinkingModelId` for backward-compatible tooling\n  that reads `modelId` (e.g., wake run logs, token usage records).\n\n### 6.3 Sync Compatibility\n\nProfiles are stored in `ai_config.sqlite` as an `AiConfig.inferenceProfile`\nvariant. AI configs already sync between devices via the outbox pattern:\n`AiConfigRepository.saveConfig()` enqueues `SyncMessage.aiConfig` messages,\nand incoming sync applies them via `SyncEventProcessor` with `fromSync: true`.\nSince profiles are just another `AiConfig` variant, they get this sync behavior\nfor free — no additional sync plumbing needed.\n\nThe `profileId` on templates also syncs (via the agent DB's `AgentSyncService`).\nA receiving device will have both the profile and the template reference after\nsync completes. In the unlikely event a template arrives before its referenced\nprofile, the legacy `modelId` fallback ensures the agent can still wake.\n\n## 7. UI Design\n\n### 7.1 Profile Management Page\n\n**Route**: `/settings/ai/profiles`\n**Access**: New tab in the existing AI Settings page, or a new section under\nAgent Settings.\n\n#### State Machine\n\n```mermaid\nstateDiagram-v2\n    [*] --> Loading\n    Loading --> ProfileList : profiles loaded\n    Loading --> Error : load failed\n    Error --> Loading : retry\n\n    ProfileList --> CreateProfile : tap FAB\n    ProfileList --> EditProfile : tap profile card\n    ProfileList --> ConfirmDelete : swipe / long-press delete\n\n    CreateProfile --> Saving : submit form\n    EditProfile --> Saving : submit form\n    Saving --> ProfileList : success\n    Saving --> CreateProfile : error (show snackbar)\n    Saving --> EditProfile : error (show snackbar)\n\n    ConfirmDelete --> Deleting : confirm\n    ConfirmDelete --> ProfileList : cancel\n    Deleting --> ProfileList : success\n    Deleting --> ProfileList : error (show snackbar, profile kept)\n```\n\n#### Profile Form Fields\n\n| Field | Type | Required | Notes |\n|---|---|---|---|\n| Name | text | yes | Free-form display name (encodes privacy intent, e.g. \"Local (Ollama)\") |\n| Description | text | no | Optional description |\n| Thinking Model | model picker | yes | Filtered: `supportsFunctionCalling == true` |\n| Image Recognition Model | model picker | no | Filtered: `inputModalities` contains `image` |\n| Transcription Model | model picker | no | Filtered: `inputModalities` contains `audio` |\n| Image Generation Model | model picker | no | Filtered: `outputModalities` contains `image` |\n| Desktop Only | toggle | no | When true, profile hidden on mobile |\n\nThe model picker reuses the existing `AgentModelSelector` pattern (provider\nfilter → model list) but with per-slot filtering based on capability\nrequirements.\n\n### 7.2 Profile Selection in Template Creation/Editing\n\nReplace the current `AgentModelSelector` in `agent_template_detail_page.dart`\nwith a new `ProfileSelector` widget. The selector shows:\n\n1. A list of available profiles.\n2. Each profile card shows: name and the model names for each slot.\n3. Desktop-only profiles are hidden when `!isDesktop`.\n4. Tapping a profile sets `profileId` on the template.\n5. A \"Custom\" option at the bottom falls back to the current model selector for\n   power users who want direct model selection.\n\n### 7.3 Profile Selection During Task Agent Creation\n\nProfile selection is **mandatory when creating an agent** (not on subsequent\nwakes — once created, the agent uses its stored profile for all future wakes).\n\nThe creation flow uses a **Wolt multi-page modal** (via\n`ModalUtils.showMultiPageModal` from `lib/widgets/modal/modal_utils.dart`) with\na `pageIndexNotifier` controlling the page transition. This replaces the current\n`showModalBottomSheet` approach with a structured two-page wizard.\n\n**Flow in `task_agent_report_section.dart`**:\n\n1. User taps \"Create Agent\" on a task.\n2. A Wolt multi-page modal opens.\n3. **Page 1 — Template selection**: If templates exist for the task's category\n   and there is a single match, auto-select it and skip to page 2. If multiple\n   match, show a template list. If none match, auto-create a template with\n   default directives and skip to page 2. The page's sticky action bar has a\n   \"Next\" button (disabled until a template is selected).\n4. **Page 2 — Profile selection**: Shows all available profiles (filtered by\n   `desktopOnly` on mobile). If the template selected in page 1 has a\n   `profileId` set, that profile is pre-selected; otherwise no profile is\n   highlighted. A back button in the nav bar returns to page 1. The sticky\n   action bar has a \"Create\" button (disabled until a profile is selected).\n5. User taps \"Create\". The modal closes and the agent is created with the\n   selected `profileId` stored on `AgentConfig.profileId`.\n\nThis ensures the user is always conscious of which models their agent will use.\n\n**Persistence**: The selected profile is written to `AgentConfig.profileId` at\ncreation time via `TaskAgentService.createTaskAgent()`. Currently the\n`AgentConfig(...)` constructor call inside `createTaskAgent` is:\n```dart\nconfig: AgentConfig(modelId: templateEntity.modelId),\n```\nThis becomes:\n```dart\nconfig: AgentConfig(\n  modelId: profile.thinkingModelId,  // for backward-compat logs/tooling\n  profileId: profileId,              // from the user's selection\n),\n```\nThe `profileId` on `AgentConfig` takes precedence over the template's\n`profileId` at runtime (see Section 4.2 resolution order). Subsequent wakes\nread the stored `AgentConfig.profileId` — no re-selection needed.\n\n### 7.4 Reassigning a Profile on an Existing Agent\n\nAfter creation, the user can change the agent's profile from the agent detail\npage (`agent_detail_page.dart`). This updates `AgentConfig.profileId` on the\nexisting `AgentIdentityEntity` — subsequent wakes use the new profile.\n\n**UI**: A tappable profile chip/row in the agent detail page header area,\nshowing the current profile name. Tapping opens the same profile selection\nsheet used during creation (Section 7.3), pre-selecting the current profile.\n\n**Service**: Add `TaskAgentService.updateAgentProfile(agentId, profileId)`:\n1. Load the `AgentIdentityEntity`.\n2. Update `config` with the new `profileId` via `copyWith`.\n3. Also update `config.modelId` to `profile.thinkingModelId` for backward\n   compatibility (wake run logs, token usage records).\n4. Persist via `syncService.upsertEntity()`.\n\nThis is a lightweight update — no new template version is created, no agent\nstate reset. The next wake simply resolves the new profile.\n\n### 7.5 User Flow Diagrams\n\n#### Creating an Agent on a Task\n\n```mermaid\nflowchart TD\n    A[Tap 'Create Agent'] --> W[Open Wolt multi-page modal]\n\n    W --> H{Category templates?}\n    H -->|Single| J[Auto-select, skip to page 2]\n    H -->|Multiple| K[\"Page 1: template list\"]\n    H -->|None| L[Auto-create, skip to page 2]\n\n    K --> M[Select template, tap Next]\n    M --> B[Page 2: load profiles]\n    J --> B\n    L --> B\n\n    B --> C{Desktop?}\n    C -->|Yes| D[All profiles]\n    C -->|No| E[Filter desktopOnly]\n    D --> F{Template has profileId?}\n    E --> F\n    F -->|Yes| F1[Pre-select]\n    F -->|No| F2[No pre-selection]\n    F1 --> G[Select profile, tap Create]\n    F2 --> G\n\n    G --> N[Close modal, createTaskAgent]\n    N --> O[Agent created, profileId set]\n    O --> P[First wake]\n```\n\n#### Reassigning a Profile on an Existing Agent\n\n```mermaid\nflowchart TD\n    A[Open agent detail] --> B[Profile chip shown]\n    B --> C[Tap chip]\n    C --> D[Profile sheet, current selected]\n    D --> E[Pick new profile]\n    E --> F[updateAgentProfile]\n    F --> G[Set profileId + modelId]\n    G --> H[Persist + sync]\n    H --> I[Next wake uses new profile]\n```\n\n#### Agent Wake Cycle (Model Resolution)\n\n```mermaid\nflowchart TD\n    A[Wake triggered] --> B[Load identity + template]\n    B --> C{agent profileId?}\n    C -->|Yes| D[Agent-level profileId]\n    C -->|No| E{version profileId?}\n    E -->|Yes| F[Version-level profileId]\n    E -->|No| G{template profileId?}\n    G -->|Yes| H[Template-level profileId]\n    G -->|No| I[Legacy: use modelId]\n\n    D --> J[Load profile]\n    F --> J\n    H --> J\n\n    J --> J1{Profile found?}\n    J1 -->|Yes| K[Extract thinkingModelId]\n    J1 -->|No| J2{Has legacy modelId?}\n    J2 -->|Yes| I\n    J2 -->|No| X1[Abort wake, log error]\n\n    K --> L[resolveInferenceProvider]\n    I --> L\n\n    L --> L1{Model found?}\n    L1 -->|Yes| L2{Provider found?}\n    L1 -->|No| X2[Abort wake, log error]\n    L2 -->|Yes| L3{API key valid?}\n    L2 -->|No| X2\n    L3 -->|Yes| N[sendMessage]\n    L3 -->|No, required| X2\n    L3 -->|No, not required| N\n```\n\n#### Managing Profiles in Settings\n\n```mermaid\nflowchart TD\n    A[Settings → Profiles] --> B[Load list]\n    B --> C[Show profiles + slots]\n\n    C --> D{Action}\n    D -->|Tap FAB| E[Create form]\n    D -->|Tap profile| F[Edit form]\n    D -->|Swipe| G[Confirm delete]\n\n    E --> H[Fill name + slots]\n    F --> H\n    H --> I[Save via repository]\n    I --> J[Syncs via outbox]\n\n    G --> K{In use?}\n    K -->|No| L[Delete]\n    K -->|By templates| M[Block, warn]\n    K -->|By agents| M\n```\n\n## 8. Platform & Provider Logic\n\n### 8.1 Platform Gating\n\nLocal profiles (where `desktopOnly == true`) are filtered out on mobile:\n\n```dart\nfinal visibleProfiles = profiles.where((p) {\n  if (p.desktopOnly && !isDesktop) return false;\n  return true;\n}).toList();\n```\n\nUses existing `isDesktop` from `lib/utils/platform.dart`.\n\n### 8.2 Ollama / Local Provider API Key Handling\n\nThe existing `resolveInferenceProvider()` in\n`lib/features/agents/util/inference_provider_resolver.dart` rejects providers\nwith empty API keys (the `provider.apiKey.isEmpty` guard). However, local\nproviders (Ollama, Voxtral, Whisper) don't require API keys — see\n`ProviderConfig.noApiKeyRequired` in\n`lib/features/ai/constants/provider_config.dart`.\n\n**Fix**: Patch `resolveInferenceProvider()` directly to respect\n`ProviderConfig.noApiKeyRequired`. This is the smallest change and benefits all\ncallers (not just profile-based resolution):\n\n```dart\nif (provider.apiKey.isEmpty &&\n    ProviderConfig.requiresApiKey(provider.inferenceProviderType)) {\n  // Only reject if the provider type actually needs a key.\n  return null;\n}\n```\n\n### 8.3 No Enforced Data Flow Isolation\n\nThe app does not enforce that a profile named \"Local\" only contains local\nmodels. This is the user's responsibility — the profile name communicates\nintent, and the user configures the model slots accordingly. Mixing local and\ncloud models in a single profile is allowed (it may even be desirable, e.g.\nlocal transcription + cloud thinking).\n\n## 9. File Inventory\n\n### New Files\n\n| File | Purpose |\n|---|---|\n| `lib/features/ai/model/resolved_profile.dart` | `ResolvedProfile` data class for runtime |\n| `lib/features/ai/util/profile_resolver.dart` | Resolution logic: profile → models → providers |\n| `lib/features/ai/util/profile_seeding_service.dart` | Seeds default profiles on first launch |\n| `lib/features/ai/state/inference_profile_controller.dart` | Riverpod controller for profile CRUD |\n| `lib/features/ai/ui/inference_profile_page.dart` | Profile management list page |\n| `lib/features/ai/ui/inference_profile_form.dart` | Create/edit profile form |\n| `lib/features/agents/ui/profile_selector.dart` | Profile picker for template editing |\n| `lib/features/agents/ui/agent_creation_modal.dart` | Wolt two-page modal: template → profile selection |\n| `test/features/ai/model/inference_profile_test.dart` | Unit tests for profile model |\n| `test/features/ai/util/profile_resolver_test.dart` | Unit tests for resolution logic |\n| `test/features/ai/util/profile_seeding_service_test.dart` | Seeding tests |\n| `test/features/ai/state/inference_profile_controller_test.dart` | Controller tests |\n| `test/features/ai/ui/inference_profile_page_test.dart` | Widget tests |\n| `test/features/ai/ui/inference_profile_form_test.dart` | Widget tests |\n| `test/features/agents/ui/profile_selector_test.dart` | Widget tests |\n| `test/features/agents/ui/agent_creation_modal_test.dart` | Widget tests for two-page modal flow |\n\n### Modified Files\n\n| File | Changes |\n|---|---|\n| `lib/features/ai/model/ai_config.dart` | Add `inferenceProfile` variant, `AiConfigType.inferenceProfile` |\n| `lib/features/agents/model/agent_domain_entity.dart` | Add `profileId` to `agentTemplate` and `agentTemplateVersion` |\n| `lib/features/agents/model/agent_config.dart` | Add `profileId` to `AgentConfig` |\n| `lib/features/agents/workflow/task_agent_workflow.dart` | Use `ProfileResolver` instead of direct `resolveInferenceProvider` |\n| `lib/features/agents/util/inference_provider_resolver.dart` | Keep for legacy fallback, call from `ProfileResolver` |\n| `lib/features/agents/service/agent_template_service.dart` | Accept `profileId` in `createTemplate`/`updateTemplate` |\n| `lib/features/agents/service/task_agent_service.dart` | Accept `profileId` in `createTaskAgent`, add `updateAgentProfile` method, write to `AgentConfig` |\n| `lib/features/agents/ui/agent_template_detail_page.dart` | Replace `AgentModelSelector` with `ProfileSelector` |\n| `lib/features/agents/ui/agent_detail_page.dart` | Add tappable profile chip for reassignment (Section 7.4) |\n| `lib/features/agents/ui/task_agent_report_section.dart` | Show profile selection sheet during agent creation |\n| `lib/features/agents/ui/agent_model_selector.dart` | Keep for \"Custom\" fallback, add profile-aware mode |\n| `lib/features/ai/repository/ai_config_repository.dart` | Add profile query helpers |\n| `lib/l10n/app_en.arb` | Profile-related labels |\n| `lib/l10n/app_de.arb` | Profile-related labels (German) |\n| `lib/l10n/app_es.arb` | Profile-related labels (Spanish) |\n| `lib/l10n/app_fr.arb` | Profile-related labels (French) |\n| `lib/l10n/app_ro.arb` | Profile-related labels (Romanian) |\n\n## 10. Implementation Phases\n\n### Phase 1: Data Model & Resolution (Core)\n1. Add `AiConfig.inferenceProfile` variant to the sealed union.\n2. Add `AiConfigType.inferenceProfile` enum value.\n3. Run `make build_runner` to regenerate freezed/json code.\n4. Add `profileId` to `AgentTemplateEntity`, `AgentTemplateVersionEntity`, `AgentConfig`.\n5. Run `make build_runner` again.\n6. Fix `resolveInferenceProvider()` to respect `ProviderConfig.noApiKeyRequired`\n   for local providers (Ollama, Voxtral, Whisper) — see Section 8.2.\n7. Create `ResolvedProfile` data class.\n8. Create `ProfileResolver` with the resolution logic from Section 4.2.\n9. Write unit tests for `ProfileResolver` (legacy fallback, profile resolution,\n   missing profile, missing model, local provider with no API key).\n10. Refactor `TaskAgentWorkflow.execute()` to use `ProfileResolver`.\n11. Verify existing agent wake cycles still work (backward compatibility).\n\n### Phase 2: Seeding & Repository\n1. Create `ProfileSeedingService` with default profile definitions.\n2. Add profile query helpers to `AiConfigRepository`.\n3. Wire seeding into app startup (alongside existing template seeding).\n4. Write seeding tests (idempotent, handles partial seeds).\n\n### Phase 3: Profile Management UI\n1. Create `InferenceProfileController` (Riverpod, CRUD operations).\n2. Build `InferenceProfilePage` (list with FAB).\n3. Build `InferenceProfileForm` (create/edit form).\n4. Implement deletion guard: before deleting a profile, query templates,\n   template versions, and agent configs referencing its ID. If any exist,\n   show a warning and block deletion. Add a `profileInUse(profileId)` helper\n   to `AgentTemplateService` (keeps it on the agent side, avoiding cross-DB\n   coupling from AI config into agent DB reads). The helper queries template,\n   template-version, and agent-identity tables within the agent DB — versions\n   must be checked because they can be rolled back to, and a dangling\n   `profileId` would break that path. Keep this as a thin orchestration\n   method — delegate the actual queries to the existing repository/DAO layer\n   rather than accumulating direct DB access in the service.\n5. Add routing and navigation entry point.\n6. Add localization strings.\n7. Write widget tests, including deletion guard (profile in use → blocked,\n   profile not in use → deleted).\n\n### Phase 4: Template & Agent Creation Integration\n1. Create `ProfileSelector` widget (reusable for both template editing and\n   agent creation flows).\n2. Replace `AgentModelSelector` in template detail page with `ProfileSelector`.\n3. Update `AgentTemplateService.createTemplate` to accept `profileId`, storing\n   it on both the template and the initial version.\n4. Update `AgentTemplateService.updateTemplate` to accept `profileId`. When\n   `profileId` changes (mirroring the existing `modelId`-change branch in\n   `updateTemplate`'s version-creation logic), create a new template version capturing\n   the new `profileId`. Set `modelId` on the version to\n   `profile.thinkingModelId` for backward-compatible wake run logs.\n5. Update `AgentTemplateService.createVersion` to snapshot `profileId` from the\n   template onto the new version entity (alongside the existing `modelId`\n   snapshot).\n6. Update `TaskAgentService.createTaskAgent` to accept a **required** `profileId`\n   parameter (`String profileId`, not nullable). This enforces the mandatory\n   profile selection rule (Section 7.3) at the API boundary — callers cannot\n   create agents without choosing a profile. Update the `AgentConfig(...)`\n   constructor call inside `createTaskAgent` to:\n   `config: AgentConfig(modelId: profile.thinkingModelId, profileId: profileId)`.\n   Resolve the profile first to extract `thinkingModelId` for the backward-compat\n   `modelId` field (consistent with `updateAgentProfile` and version snapshots).\n7. Rewrite agent creation in `task_agent_report_section.dart` to use a Wolt\n   multi-page modal (`ModalUtils.showMultiPageModal` with `pageIndexNotifier`).\n   Create a new `AgentCreationModal` widget with two pages:\n   - Page 1: template selection (auto-skip when single/none match).\n   - Page 2: profile selection (pre-selects template's `profileId` if set).\n   On \"Create\", close the modal and pass both `templateId` and `profileId`\n   to `TaskAgentService.createTaskAgent`. This replaces the current\n   `showModalBottomSheet` approach in `_showTemplateSelectionSheet`.\n8. Add `TaskAgentService.updateAgentProfile(agentId, profileId)` method that\n   updates `AgentConfig.profileId` and `AgentConfig.modelId` on the existing\n   `AgentIdentityEntity` and persists via `syncService.upsertEntity()`.\n9. Add a tappable profile chip to `agent_detail_page.dart` that shows the\n   current profile name and opens the profile selection sheet for reassignment\n   (Section 7.4). On selection, calls `updateAgentProfile`.\n10. Write widget tests for agent creation flow, profile reassignment flow,\n    and versioning unit tests.\n\n### Phase 5: Polish & Cleanup\n1. Add CHANGELOG entry.\n2. Update feature README for agents.\n3. Full analyzer pass (`dart-mcp.analyze_files`).\n4. Full formatter pass (`dart-mcp.dart_format`).\n5. Run targeted test suites.\n\n## 11. Risks & Mitigations\n\n| Risk | Likelihood | Impact | Mitigation |\n|---|---|---|---|\n| Profile references dangling model IDs | Medium | Low | Runtime already handles missing models gracefully (returns null, logs) |\n| Template arrives before profile during sync race | Low | Low | Fallback to `modelId` resolution until profile syncs; AI configs sync via same outbox pipeline |\n| Breaking existing agent wakes during refactor | Low | High | `profileId` is nullable; all existing code paths preserved as fallback |\n| Build runner failures from sealed union changes | Low | Medium | Add variant to `AiConfig` first, stabilize, then add template fields |\n\n## 12. Testing Strategy\n\n- **Unit tests**: `ProfileResolver` with all resolution paths (profile-first,\n  legacy-fallback, missing entities, mixed scenarios).\n- **Unit tests**: `ProfileSeedingService` idempotency.\n- **Unit tests**: `TaskAgentService.createTaskAgent` — requires `profileId`,\n  persists it into `AgentConfig.profileId`, sets `AgentConfig.modelId` from\n  `profile.thinkingModelId` for backward compatibility.\n- **Unit tests**: `TaskAgentService.updateAgentProfile` — updates config,\n  persists, syncs.\n- **Widget tests**: `InferenceProfilePage`, `InferenceProfileForm`,\n  `ProfileSelector` — test CRUD flows, desktop-only gating, deletion guard\n  (profile in use by template/agent → blocked with warning, unused → deleted).\n- **Widget tests**: `AgentDetailPage` — profile chip renders current profile\n  name, tapping opens selection sheet, selecting a new profile calls\n  `updateAgentProfile`.\n- **Widget tests**: `TaskAgentReportSection` — agent creation shows profile\n  selection sheet first, selected profile passed to `createTaskAgent`.\n- **Integration**: Existing `task_agent_workflow_test.dart` should continue\n  passing without changes (backward compatibility proof).\n- **Manual**: Create a profile, assign to template, trigger agent wake, verify\n  correct model is used in wake run log. Reassign profile on existing agent,\n  trigger next wake, verify new model is used.\n\n## 13. Out of Scope\n\n- **Per-slot runtime dispatch** (using image recognition model for vision tool\n  calls, transcription model for audio, image generation model for cover art):\n  The profile stores all four slots, but the runtime only uses the thinking\n  model today. Multi-slot dispatch is a follow-up.\n- **API key sync**: Profiles sync between devices, but API keys on inference\n  providers are already synced separately. No additional key management needed.\n- **Privacy enforcement**: The system does not enforce data residency. The\n  profile name communicates intent; actual model configuration is the user's\n  responsibility.\n- **Cost estimation**: No cost tracking per profile. Token usage tracking already\n  exists per wake and can be aggregated by profile in a future iteration.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"2F7E:386840:1882EC:5F3882:6AB92F32"},"text_sha256":"4554bc9e1ed1b052bbd8478767a514d3eed0b80e2d9efab13fc716d6d48c9fd0"},{"path":"PRIVACY.md","size":7710,"blob_sha":"58f98141ec56a6692960bac26c8f51a032d89c78","priority":1,"status":200,"text":"# Lotti Privacy Policy\n\n*Last updated: April 29th, 2026*\n\nTrust at a glance:\n- No telemetry or analytics\n- Local‑only by default; no Lotti cloud service\n- End‑to‑end encrypted sync via Matrix (optional)\n\n## Core Privacy Commitment\n\nLotti is built on a fundamental principle: **your data belongs to you**. All information you record in Lotti—tasks, audio recordings, journal entries, health data, and personal reflections—is stored exclusively on your own devices. There is no Lotti cloud service, no centralized data collection, and no analytics tracking your usage.\n\n## Data Storage & Ownership\n\n### Local Storage\n- All data is stored locally on your devices using SQLite\n- No data is uploaded to any Lotti servers (because there are none)\n- You maintain complete ownership and control of your information\n- Data can be exported at any time for backup or migration\n\n### Device Synchronization\n- Sync between your devices uses end-to-end encryption via Matrix protocol\n- Encryption keys are exchanged via QR code, never transmitted over the network\n- Matrix provides decentralized, secure communication for sync\n- No third party has access to your encryption keys or synced data\n\n## AI Integration & Privacy\n\n### Your Choice, Your Control\nLotti offers AI capabilities through various providers, but you control exactly how and when AI is used:\n\n- **Per-Category Configuration**: Choose different AI providers (or none) for each category of data\n- **Local-Only Option**: Use Ollama for completely offline AI inference\n- **Cloud Providers**: When you choose cloud AI (OpenAI, Anthropic, Gemini), data is:\n    - Sent only for specific inference requests you initiate\n    - Transmitted using your own API keys\n    - Request/response data is transmitted only for inference but may be logged temporarily by the provider according to their retention policy\n    - Subject to the provider's privacy policy and data retention practices\n    - **Important**: Review your provider's retention policies and privacy settings. Consider requesting zero-retention or enterprise plans if available for enhanced privacy\n\n### GDPR-Compliant Options\n- European-hosted AI providers with no-retention policies are available\n- These providers process your data without storing it\n- You maintain the right to choose which provider to use or to use none at all\n\n## Audio Transcription\n\n- **Local Option**: Use OpenAI's Whisper model running entirely on your device\n- **Cloud Option**: Use multimodal AI providers (like Gemini) for transcription\n- You choose which method to use on a per-recording basis\n- Audio files remain on your device regardless of transcription method\n\n## Device Permissions\n\nLotti requests only the permissions it actually uses. Each one stays on-device unless you explicitly act in a way that sends data out (e.g. an AI inference call you initiate, or Matrix sync you've enabled).\n\n- **Microphone (`RECORD_AUDIO` / iOS microphone)**: used only when you start an audio recording. Recordings are stored locally; nothing is transmitted unless you choose to transcribe with a cloud provider.\n- **Camera (`CAMERA`)**: used only on-device to scan the QR code that exchanges Matrix sync keys between your devices. The camera preview is never recorded, saved, or transmitted.\n- **Location (`ACCESS_COARSE_LOCATION`, `ACCESS_FINE_LOCATION`)**: optional geo-tagging of journal entries you create. Captured coordinates are stored only in your local database and synced (end-to-end encrypted) between your own devices. They are never sent to Lotti, to advertisers, or to any third party. AI providers receive location data only if you explicitly include a geo-tagged entry in an inference request.\n- **Health (`health` plugin / HealthKit / Health Connect)**: Lotti can read activity, sleep, heart-rate, workout and similar metrics that you have already chosen to record on your device, so you can correlate them with your journal. Reads are opt-in per category and happen on-device. Health data is never uploaded to a Lotti server (there is none) and is treated like any other journal data: it's only sent to a third party if you explicitly send a containing entry to an AI provider you configured.\n- **Storage / media (`READ_EXTERNAL_STORAGE`, `WRITE_EXTERNAL_STORAGE`, `ACCESS_MEDIA_LOCATION`)**: used to attach photos and files to journal entries, to import/export data, and to read media you select. Lotti only touches files you pick.\n- **Foreground service (`FOREGROUND_SERVICE`)**: used to keep long-running audio recording and sync work alive while the app is in the background, with a system notification visible the whole time. No background data collection happens outside these explicit user actions.\n- **Notifications (`POST_NOTIFICATIONS`)**: used for reminders and habit prompts you've set up yourself, and to display the foreground-service notification.\n- **Network (`INTERNET`, `ACCESS_NETWORK_STATE`)**: used to talk to the AI providers and Matrix homeserver you configure, and to detect connectivity. Lotti makes no other network calls.\n\n## What We Don't Do\n\n- ❌ No telemetry or usage analytics\n- ❌ No cloud accounts or user profiles\n- ❌ No data mining or profiling\n- ❌ No advertising or marketing tracking\n- ❌ No sharing with third parties (except AI providers you explicitly choose)\n- ❌ No backend servers collecting your data\n\n## Security Considerations\n\n### Current State\n- Device storage currently relies on your device's built-in security\n- We strongly recommend enabling device encryption (FileVault on macOS, BitLocker on Windows, etc.)\n- End-to-end encryption is used for device synchronization\n\n### Future Improvements\n- On-device database encryption is planned for future releases\n- Additional security features are under development\n\n## Open Source Transparency\n\nLotti is fully open source under [LICENSE](LICENSE). This means:\n- Anyone can audit the code to verify our privacy claims\n- The community can identify and report potential privacy issues\n- Development happens in public here on [GitHub](https://github.com/matthiasn/lotti)\n\n## Beta Testing\n\nWhen participating in beta testing:\n- **TestFlight (iOS/macOS)**: Requires providing your Apple ID to receive invitations\n- **Google Play (Android)**: Closed and open testing tracks are distributed through the Google Play Store, which collects whatever account/device data Google's own terms describe; Lotti itself receives nothing extra from these channels\n- **Other platforms**: Direct download from GitHub Releases requires no personal information\n\n## Your Rights\n\nYou have complete control over your data:\n- **Access**: Direct access to all your data via the app\n- **Export**: Export your data at any time\n- **Deletion**: Delete any or all data instantly\n- **Portability**: Your data is stored in standard formats\n- **Control**: Choose what AI services (if any) can process your data\n\n## Contact\n\nFor privacy-related questions or concerns:\n- Open an issue on [GitHub](https://github.com/matthiasn/lotti/issues)\n- Join the discussion on [GitHub Discussions](https://github.com/matthiasn/lotti/discussions)\n\n## Changes to This Policy\n\nAs Lotti evolves, this privacy policy may be updated. Changes will be:\n- Announced on the GitHub repository\n- Included in release notes\n- Never retroactively reduce your privacy rights\n- There might come a cloud‑based service for making access to providers simpler without requiring individual API keys, but this would be entirely opt-in and would follow the privacy goals outlined here, with an explicit no data retention policy\n\n---\n\n**Remember**: Lotti is designed for a future where AI augments our capabilities without compromising our privacy. Your data stays yours, always.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"32CE:09BF:B46AB:2E9FDC:6AB92F32"},"text_sha256":"235ca2d9fcd19729bdb7938cac551ac4b5177fbab54d94ab18f2619f3a14da3b"},{"path":"SECURITY.md","size":195,"blob_sha":"be1d6c32156b8f69034a59e45068084a6a62ce0b","priority":1,"status":200,"text":"# Security Policy\n\n## Reporting a Vulnerability\n\nPlease report any kind of vulnerability or other security-related concern in the **[Issues section](https://github.com/matthiasn/lotti/issues)**.\n","fetch_note":"","rate":{"github_remaining":"","github_reset":"","github_resource":"","retry_after":"","request_id":"E846:B08CF:177159:5E2762:6AB92F32"},"text_sha256":"b69334e8dff92ee7303afd1c322bb8173cc96e743fb91eead078aa269f7989a7"}],"classification_rule_version":"semantic-conservative-2026-09-c1-c4-r2","classification":{"C1":1,"C2":1,"C3":0,"C4":1,"C5":0,"C6":1,"C7":1,"D1":1,"score":5,"D1_evidence":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=README.md; text=--- ## Local Execution & Data Sovereignty Most AI‑powered productivity tools require you to upload and store your personal data on their servers. Lotti doesn't. Your tasks, audio, journal entries, and time recordings live on your devices and nowhere else.","note":"Classificação semantic-conservative-2026-09-c1-c4-r2 por evidência textual contextualizada.","evidence":{"C1":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=README.md; text=--- ## Local Execution & Data Sovereignty Most AI‑powered productivity tools require you to upload and store your personal data on their servers. Lotti doesn't. Your tasks, audio, journal entries, and time recordings live on your devices and nowhere else.","C7":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=README.md; text=There is no Lotti backend; homeservers (self‑hosted or public) only relay end‑to‑end encrypted payloads. ### What is encrypted - Sync traffic — every sync payload (logbook entries, agent state, suggestions, attachments) is end‑to‑end encrypted using Matrix + Vodozemac (the Rust implementation of Olm/Megolm). Homeservers see ciphertext, never unencrypted data. Both the user database and the agentic database sync this way.","C2":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=PRIVACY.md; text=### GDPR-Compliant Options - European-hosted AI providers with no-retention policies are available - These providers process your data without storing it - You maintain the right to choose which provider to use or to use none at all ## Audio Transcription","C4":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=PRIVACY.md; text=Closed and open testing tracks are distributed through the Google Play Store, which collects whatever account/device data Google's own terms describe; Lotti itself receives nothing extra from these channels - Other platforms : Direct download from GitHub Releases requires no personal information ## Your Rights You have complete control over your data: - Access : Direct access to all your data via the app","C6":"sha=5703dfe40797bb36531ed3ad9a1b21ae9adf848e; file=PRIVACY.md; text=- Encryption keys are exchanged via QR code, never transmitted over the network - Matrix provides decentralized, secure communication for sync - No third party has access to your encryption keys or synced data ## AI Integration & Privacy ### Your Choice, Your Control"}}}}
